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
This commit is contained in:
Classic298
2026-07-24 05:34:14 +02:00
committed by GitHub
parent 7ef0530b24
commit 0f8d12201c

View File

@@ -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 } : {})