mirror of
https://gitee.com/wanwujie/deer-flow
synced 2026-04-18 12:04:45 +08: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:
@@ -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];
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user