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
Removing the !message.is_append guard changes update behavior for the last assistant message; verify that streamed or partial assistant messages are not mistakenly replaced instead of appended, and that multi-chunk responses still render correctly.
if (!message.is_streaming) {
if (dialogs[dialogs.length-1]?.message_id===message.message_id&&dialogs[dialogs.length-1]?.sender?.role===UserRole.Assistant
) {
dialogs[dialogs.length-1] = {
...message,
is_chat_message: true
After removing is_append from the JSDoc type, ensure all call sites and APIs no longer send or rely on this field to avoid unexpected runtime properties and confusion in downstream consumers.
Removing the is_append guard alters how incoming assistant messages replace the last dialog entry; verify this doesn’t regress streaming or multi-chunk message assembly where partials used to rely on is_append.
if (!message.is_streaming) {
if (dialogs[dialogs.length-1]?.message_id===message.message_id&&dialogs[dialogs.length-1]?.sender?.role===UserRole.Assistant
) {
dialogs[dialogs.length-1] = {
...message,
is_chat_message: true
Why: The suggestion correctly identifies a "magic number" used in multiple places and proposes replacing it with a constant, which is a good practice for improving code readability and maintainability.
Low
More
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
Remove unused
is_appendproperty from chat message handlingIncrease log filter size from 80 to 100 entries
Diagram Walkthrough
File Walkthrough
chat-box.svelte
Remove unused is_append checksrc/routes/chat/[agentId]/[conversationId]/chat-box.svelte
is_appendcondition from message replacement logicconversationTypes.js
Remove is_append from type definitionsrc/lib/helpers/types/conversationTypes.js
is_appendproperty from ChatResponseModel type definitionpersist-log.svelte
Increase log filter sizessrc/routes/chat/[agentId]/[conversationId]/persist-log/persist-log.svelte