MCPcopy Create free account
hub / github.com/xerrors/Yuxi / loadingMessageChunk

Function loadingMessageChunk

web/src/composables/useAgentStreamHandler.js:54–61  ·  view source on GitHub ↗
(chunk)

Source from the content-addressed store, hash-verified

52}
53
54const loadingMessageChunk = (chunk) => {
55 const semanticChunk = streamEventToMessageChunk(chunk?.stream_event)
56 if (semanticChunk) return semanticChunk
57
58 const msg = chunk?.msg
59 if (msg?.event) return null
60 return msg || null
61}
62
63// 工具结果不走 messages 流,而是以 method=tools 的 stream_event 事件返回(tool-started/tool-finished)。
64// 取出 tool-finished 的 output(一条 ToolMessage 字典),交给 msgChunks 与 AI 消息按 tool_call_id 关联。

Callers 1

handleStreamChunkFunction · 0.85

Calls 1

Tested by

no test coverage detected