mirror of
https://gitee.com/wanwujie/deer-flow
synced 2026-04-18 20:14:44 +08:00
fix: fix broken when SSE
This commit is contained in:
@@ -159,9 +159,12 @@ export function extractPresentFilesFromMessage(message: Message) {
|
||||
if (message.type !== "ai" || !hasPresentFiles(message)) {
|
||||
return [];
|
||||
}
|
||||
const files = [];
|
||||
const files: string[] = [];
|
||||
for (const toolCall of message.tool_calls ?? []) {
|
||||
if (toolCall.name === "present_files") {
|
||||
if (
|
||||
toolCall.name === "present_files" &&
|
||||
Array.isArray(toolCall.args.filepaths)
|
||||
) {
|
||||
files.push(...(toolCall.args.filepaths as string[]));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user