mirror of
https://gitee.com/wanwujie/deer-flow
synced 2026-04-17 03:34:45 +08:00
feat: fix todos (#9)
This commit is contained in:
@@ -34,7 +34,8 @@ def present_file_tool(
|
||||
filepaths: List of absolute file paths to present to the user. **Only** files in `/mnt/user-data/outputs` can be presented.
|
||||
"""
|
||||
existing_artifacts = runtime.state.get("artifacts") or []
|
||||
new_artifacts = existing_artifacts + filepaths
|
||||
# Use dict.fromkeys to deduplicate while preserving order
|
||||
new_artifacts = list(dict.fromkeys(existing_artifacts + filepaths))
|
||||
runtime.state["artifacts"] = new_artifacts
|
||||
return Command(
|
||||
update={"artifacts": new_artifacts, "messages": [ToolMessage("Successfully presented files", tool_call_id=tool_call_id)]},
|
||||
|
||||
Reference in New Issue
Block a user