mirror of
https://github.com/bytedance/deer-flow.git
synced 2026-04-25 11:18:22 +00:00
Extract message content from direct_response tool call args and display it as the message content when tool call completes. Note: This is a workaround. The message is not streamed because direct_response uses tool calling mechanism where args are JSON, not natural language text that can be streamed directly.
This commit is contained in:
parent
a4f64abd1f
commit
b85130b849
@ -62,6 +62,11 @@ export function mergeMessage(message: Message, event: ChatEvent) {
|
||||
toolCall.args = safeParseToolArgs(toolCall.argsChunks.join(""));
|
||||
delete toolCall.argsChunks;
|
||||
}
|
||||
// Handle direct_response tool: extract message content for display
|
||||
if (toolCall.name === "direct_response" && toolCall.args?.message) {
|
||||
message.content = toolCall.args.message as string;
|
||||
message.contentChunks = [message.content];
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user