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
+5 -2
View File
@@ -13,7 +13,11 @@ main() {
}
parse_argv() {
tool_data="$1"
if [[ -n "$LLM_TOOL_DATA_FILE" ]] && [[ -f "$LLM_TOOL_DATA_FILE" ]]; then
tool_data="$(cat "$LLM_TOOL_DATA_FILE")"
else
tool_data="$1"
fi
if [[ -z "$tool_data" ]]; then
die "usage: ./{function_name}.sh <tool-data>"
fi
@@ -54,7 +58,6 @@ run() {
if [[ "$OS" == "Windows_NT" ]]; then
set -o igncr
tool_path="$(cygpath -w "$tool_path")"
tool_data="$(echo "$tool_data" | sed 's/\\/\\\\/g')"
fi
jq_script="$(cat <<-'EOF'