From d8aaa73573c46a8a23f6c6850d38438ad395752c Mon Sep 17 00:00:00 2001 From: hugocasa Date: Tue, 22 Sep 2026 19:07:43 +0200 Subject: [PATCH] feat: chat with a saved agent from the agent editor (#11292) * feat: chat with a saved agent from the agent editor * fix: keep agent chats apart from a same-path flow's conversations * fix: point an agent editor chat's model gap at the agent, not a step * fix: match the memory gate's icon to the chat's empty state --- .../flows/content/AgentEditorHost.svelte | 202 +++++++++++++++--- .../flows/content/AgentEditorModal.svelte | 37 +++- .../flows/conversations/FlowChat.svelte | 13 +- .../conversations/FlowChatInterface.svelte | 11 +- .../flows/conversations/agentChatInputs.ts | 12 +- .../conversations/agentEditorChat.test.ts | 76 +++++++ .../flows/conversations/agentEditorChat.ts | 101 +++++++++ 7 files changed, 406 insertions(+), 46 deletions(-) create mode 100644 frontend/src/lib/components/flows/conversations/agentEditorChat.test.ts create mode 100644 frontend/src/lib/components/flows/conversations/agentEditorChat.ts diff --git a/frontend/src/lib/components/flows/content/AgentEditorHost.svelte b/frontend/src/lib/components/flows/content/AgentEditorHost.svelte index b6a98160be..4f69d3a1a1 100644 --- a/frontend/src/lib/components/flows/content/AgentEditorHost.svelte +++ b/frontend/src/lib/components/flows/content/AgentEditorHost.svelte @@ -1,7 +1,16 @@ {#if draft.refusal} @@ -359,7 +434,7 @@ - +
- - - - -
- + +
+ +
+ + +
+ +
+
+ + + +
+
+ {#if chatMounted} +
+ {#if chatGap?.memory} +
+ +

Chat needs managed memory

+

+ {chatGap.memoryCanTurnOn + ? 'Without it, every message would be answered without the ones before it.' + : 'This agent replays a fixed list of messages. Switch its memory to managed to chat with it.'} +

+ {#if chatGap.memoryCanTurnOn && !readOnly} + + {/if} +
+ {:else if chatGap?.noStream} +
+ + + {chatGap.noStream === 'image' + ? 'Image answers do not stream: each one shows once its run ends.' + : 'Streaming is off: each answer shows once its run ends.'} + + {#if chatGap.noStream === 'off' && !readOnly} + + {/if} +
+ {/if} + +
+ +
- - - - - + {/if} +
diff --git a/frontend/src/lib/components/flows/content/AgentEditorModal.svelte b/frontend/src/lib/components/flows/content/AgentEditorModal.svelte index a6e113f39b..ea45761bf9 100644 --- a/frontend/src/lib/components/flows/content/AgentEditorModal.svelte +++ b/frontend/src/lib/components/flows/content/AgentEditorModal.svelte @@ -1,5 +1,7 @@