You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Improve message deduplication for assistant responses
Enhance streaming message display conditions
Diagram Walkthrough
flowchart LR
A["Message Received"] --> B["Check is_append"]
B --> C["Update Dialog Logic"]
C --> D["Improved Deduplication"]
D --> E["Enhanced Display"]
The deduplication condition now depends on !message.is_append. If upstream messages omit this flag or send null/undefined, the check treats them as appends (falsy) and skips deduplication. Confirm producers always set is_append explicitly and default behavior is intended.
if (!message.is_streaming) {
if (dialogs[dialogs.length-1]?.message_id===message.message_id&&dialogs[dialogs.length-1]?.sender?.role===UserRole.Assistant&&!message.is_append
) {
dialogs[dialogs.length-1] = {
...message,
is_chat_message: true
isStreamEnd now includes !isThinking. Ensure isThinking is always accurate across the stream lifecycle; otherwise end-of-stream controls may remain hidden despite streaming being false, causing stalled UI affordances.
Added is_append to the model JSDoc, but no default or description of semantics. Clarify whether it’s required, default value, and how it interacts with is_streaming to avoid ambiguity in consumers.
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
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.
PR Type
Enhancement
Description
Add
is_appendproperty to message handling logicImprove message deduplication for assistant responses
Enhance streaming message display conditions
Diagram Walkthrough
File Walkthrough
chat-box.svelte
Enhance message handling and display logicsrc/routes/chat/[agentId]/[conversationId]/chat-box.svelte
is_appendcheck in message deduplication logicisThinkingcondition in stream end detectionconversationTypes.js
Add is_append property to message typesrc/lib/helpers/types/conversationTypes.js
is_appendboolean property to ChatResponseModel type definition