@adminforth/agent 2.3.2 → 2.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -313,6 +313,16 @@ export function createAgentChatManager({
|
|
|
313
313
|
return;
|
|
314
314
|
}
|
|
315
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
|
+
}
|
|
316
326
|
editingTurnId.value = turnId;
|
|
317
327
|
lastMessage.value = text;
|
|
318
328
|
try {
|