diff --git a/frontend/src/lib/components/flows/content/AgentHistoryInput.svelte b/frontend/src/lib/components/flows/content/AgentHistoryInput.svelte
index 24b82ef7e9..3825228bf0 100644
--- a/frontend/src/lib/components/flows/content/AgentHistoryInput.svelte
+++ b/frontend/src/lib/components/flows/content/AgentHistoryInput.svelte
@@ -16,6 +16,9 @@
chatInputEnabled?: boolean
/** Why no memory id applies to this step, when the agent reads no memory. */
memoryUnusedNote?: string
+ /** What providing messages starts from: the list a legacy `manual` memory already sends, which the
+ * step's own messages replace at runtime. */
+ seedMessages?: unknown[]
/** The step's editor for one history input, with the error to show under it. */
field: Snippet<[AgentHistoryKey, string | undefined]>
/** Called for each key this row removes, so the form forgets its validity. */
@@ -28,6 +31,7 @@
tooltip = undefined,
chatInputEnabled = false,
memoryUnusedNote = undefined,
+ seedMessages = undefined,
field,
onRemoveKey = undefined
}: Props = $props()
@@ -50,7 +54,12 @@
remove('memory_id')
remove('messages')
if (next === 'here') args.memory_id = { type: 'static', value: '' }
- if (next === 'messages') args.messages = { type: 'static', value: [] }
+ if (next === 'messages') {
+ args.messages = {
+ type: 'static',
+ value: structuredClone($state.snapshot(seedMessages ?? []))
+ }
+ }
}
@@ -59,7 +68,11 @@
{memoryUnusedNote}
+ + {#if source !== 'messages'} +{memoryUnusedNote}
+ {/if} {#if source === 'here'}