From 0f8d12201ce69267aca8ec925f0863f66152c3b7 Mon Sep 17 00:00:00 2001 From: Classic298 <27028174+Classic298@users.noreply.github.com> Date: Fri, 24 Jul 2026 05:34:14 +0200 Subject: [PATCH] fix: empty assistant message content in action function body (#26798) Assistant responses are now stored as structured output items on message.output, with message.content left empty. The action payload built in chatActionHandler still sent message.content only, so action functions received assistant messages with an empty content property. Derive the content from the structured output via getOutputText, falling back to message.content, matching how the rest of Chat.svelte resolves assistant text. Fixes #26672 --- src/lib/components/chat/Chat.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/components/chat/Chat.svelte b/src/lib/components/chat/Chat.svelte index 100d7c5d6e..d47a91697a 100644 --- a/src/lib/components/chat/Chat.svelte +++ b/src/lib/components/chat/Chat.svelte @@ -2060,7 +2060,7 @@ messages: messages.map((m) => ({ id: m.id, role: m.role, - content: m.content, + content: getOutputText(m.output) || m.content, info: m.info ? m.info : undefined, timestamp: m.timestamp, ...(m.sources ? { sources: m.sources } : {})