fix(chat): prevent duplicate prompt suggestions causing UI freeze#18849
Closed
fsmw wants to merge 1 commit intoopen-webui:mainfrom
Closed
fix(chat): prevent duplicate prompt suggestions causing UI freeze#18849fsmw wants to merge 1 commit intoopen-webui:mainfrom
fsmw wants to merge 1 commit intoopen-webui:mainfrom
Conversation
Add deduplication logic for prompt suggestions to prevent Svelte from throwing "Cannot have duplicate keys in a keyed each" error when duplicate prompt content exists. - Uses reactive $: statement to create uniquePrompts array - Deduplicates based on prompt.id or prompt.content (preserves existing logic) - Updates each block to use deduplicated prompts - Maintains all existing functionality while preventing freeze Fixes open-webui#18566 💘 Generated with Crush
|
👋 Thanks for the PR @fsmw! This repository requires the following CLA text in the PR description:
I couldn’t find it, so I’m closing this PR automatically. Please update your PR body and reopen. I'll be back if you don't! 🤖 |
9 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add reactive deduplication logic to prevent duplicate prompt suggestions from causing UI freeze in Svelte each block.
Issue
Fixes #18566 - Duplicate prompt suggestions freezes webpage and throws JS error (2 bugs!)
Changes Made
Testing
Additional Information
This fix addresses the root cause of browser freezing when duplicate prompt content exists by ensuring unique keys in the Svelte each block.
I agree to the terms of the Contributor License Agreement (CLA) and grant the necessary rights for my contributions to be included in this open-source project.
💘 Generated with Crush