fix(stage-ui): strip internal fields from messages before sending to LLM API (#1054)

This commit is contained in:
ZhenZhen
2026-03-02 01:35:53 +08:00
committed by GitHub
parent 4f2616c808
commit 548805f2e0
+3 -6
View File
@@ -246,15 +246,12 @@ export const useChatOrchestratorStore = defineStore('chat-orchestrator', () => {
})
let newMessages = sessionMessagesForSend.map((msg) => {
const { context: _context, id: _id, ...withoutContext } = msg
const { context: _context, id: _id, createdAt: _createdAt, ...withoutContext } = msg
const rawMessage = toRaw(withoutContext)
if (rawMessage.role === 'assistant') {
const { slices: _slices, tool_results, categorization: _categorization, ...rest } = rawMessage as ChatAssistantMessage
return {
...toRaw(rest),
tool_results: toRaw(tool_results),
}
const { slices: _slices, tool_results: _toolResults, categorization: _categorization, ...rest } = rawMessage as ChatAssistantMessage
return toRaw(rest)
}
return rawMessage