mirror of
https://gitee.com/wanwujie/deer-flow
synced 2026-04-08 16:24:45 +08:00
- Backend: Convert non-string content (lists, dicts) to JSON strings in _create_event_stream_message to ensure frontend always receives string content - Frontend: Add type guard before calling startsWith() on toolCall.result for defensive programming This fixes the TypeError: toolCall.result.startsWith is not a function when tools return complex objects.
This commit is contained in:
@@ -105,7 +105,7 @@ const ActivityListItem = React.memo(({ messageId }: { messageId: string }) => {
|
||||
if (message) {
|
||||
if (!message.isStreaming && message.toolCalls?.length) {
|
||||
for (const toolCall of message.toolCalls) {
|
||||
if (toolCall.result?.startsWith("Error")) {
|
||||
if (typeof toolCall.result === "string" && toolCall.result?.startsWith("Error")) {
|
||||
return null;
|
||||
}
|
||||
if (toolCall.name === "web_search") {
|
||||
|
||||
Reference in New Issue
Block a user