We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6778937 commit 47058beCopy full SHA for 47058be
1 file changed
custom/composables/agentStore/useAgentChat.ts
@@ -313,6 +313,16 @@ export function createAgentChatManager({
313
return;
314
}
315
await stopActiveTurnAndWaitForIdle();
316
+ // The edited text already folds in the turn's steer sub-messages, so drop those extra
317
+ // user messages first — otherwise they linger after the edit as duplicate bubbles.
318
+ const withoutTurnSteers = chat.messages.filter((message: any) =>
319
+ message.id === messageId
320
+ || message.role !== 'user'
321
+ || message.metadata?.turnId !== turnId
322
+ );
323
+ if (withoutTurnSteers.length !== chat.messages.length) {
324
+ chat.messages = withoutTurnSteers;
325
+ }
326
editingTurnId.value = turnId;
327
lastMessage.value = text;
328
try {
0 commit comments