fix: Tool call improvements for Windows systems

This commit is contained in:
2026-04-08 12:49:43 -06:00
parent e98bf56a2b
commit ed59051f3d
8 changed files with 57 additions and 22 deletions
+7 -1
View File
@@ -50,7 +50,13 @@ def parse_raw_data(data):
def parse_argv():
agent_func = sys.argv[1]
agent_data = sys.argv[2]
tool_data_file = os.environ.get("LLM_TOOL_DATA_FILE")
if tool_data_file and os.path.isfile(tool_data_file):
with open(tool_data_file, "r", encoding="utf-8") as f:
agent_data = f.read()
else:
agent_data = sys.argv[2]
if (not agent_data) or (not agent_func):
print("Usage: ./{agent_name}.py <agent-func> <agent-data>", file=sys.stderr)