fix: accept Claude/Gemini tool param aliases

This commit is contained in:
hsrvc
2026-01-12 14:53:44 +08:00
committed by Peter Steinberger
parent 231d2d5fdf
commit 5dc187f00c
2 changed files with 2 additions and 0 deletions

View File

@@ -7,6 +7,7 @@
- Anthropic: merge consecutive user turns (preserve newest metadata) before validation to avoid “Incorrect role information” errors. (#804 — thanks @ThomsenDrake) - Anthropic: merge consecutive user turns (preserve newest metadata) before validation to avoid “Incorrect role information” errors. (#804 — thanks @ThomsenDrake)
- Discord/Slack: centralize reply-thread planning so auto-thread replies stay in the created thread without parent reply refs. - Discord/Slack: centralize reply-thread planning so auto-thread replies stay in the created thread without parent reply refs.
- Update: run `clawdbot doctor --non-interactive` during updates to avoid TTY hangs. (#781 — thanks @ronyrus) - Update: run `clawdbot doctor --non-interactive` during updates to avoid TTY hangs. (#781 — thanks @ronyrus)
- Tools: allow Claude/Gemini tool param aliases (`file_path`, `old_string`, `new_string`) while enforcing required params at runtime. (#793 — thanks @hsrvc)
## 2026.1.12-3 ## 2026.1.12-3

View File

@@ -545,6 +545,7 @@ function createSandboxedEditTool(root: string) {
root, root,
); );
} }
// Normalize tool parameters from Claude Code conventions to pi-coding-agent conventions. // Normalize tool parameters from Claude Code conventions to pi-coding-agent conventions.
// Claude Code uses file_path/old_string/new_string while pi-coding-agent uses path/oldText/newText. // Claude Code uses file_path/old_string/new_string while pi-coding-agent uses path/oldText/newText.
// This prevents models trained on Claude Code from getting stuck in tool-call loops. // This prevents models trained on Claude Code from getting stuck in tool-call loops.