Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions ui/desktop/src/hooks/useChatStream.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,8 @@ async function streamFromResponse(
}
case 'UpdateConversation': {
log.messages('conversation-update', event.conversation.length);
// WARNING: Since Message handler uses this local variable, we need to update it here to avoid the client clobbering it.
// Longterm fix is to only send the agent the new messages, not the entire conversation.
currentMessages = event.conversation;
updateMessages(event.conversation);
break;
Expand Down
3 changes: 3 additions & 0 deletions ui/desktop/src/hooks/useMessageStream.ts
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,9 @@ export function useMessageStream({
}

case 'UpdateConversation': {
// WARNING: Since Message handler uses this local variable, we need to update it here to avoid the client clobbering it.
// Longterm fix is to only send the agent the new messages, not the entire conversation.
currentMessages = parsedEvent.conversation;
setMessages(parsedEvent.conversation);
break;
}
Expand Down
Loading