Some checks failed
CI / test (push) Failing after 3s
CI / frontend (push) Failing after 3s
CI / golangci-lint (push) Failing after 3s
Security Scan / backend-security (push) Failing after 3s
Security Scan / frontend-security (push) Failing after 5s
CI / windsurf-platform (macos-latest) (push) Has been cancelled
CI / windsurf-platform (windows-latest) (push) Has been cancelled
71 lines
2.0 KiB
Go
71 lines
2.0 KiB
Go
package antigravity
|
|
|
|
import "strings"
|
|
|
|
var claudeCodeBuiltinToolNameMap = map[string]string{
|
|
"read": "Read",
|
|
"read_file": "Read",
|
|
"readfile": "Read",
|
|
"write": "Write",
|
|
"write_file": "Write",
|
|
"writefile": "Write",
|
|
"edit": "Edit",
|
|
"apply_patch": "Edit",
|
|
"applypatch": "Edit",
|
|
"bash": "Bash",
|
|
"execute_bash": "Bash",
|
|
"executebash": "Bash",
|
|
"exec_bash": "Bash",
|
|
"execbash": "Bash",
|
|
"glob": "Glob",
|
|
"list_files": "Glob",
|
|
"listfiles": "Glob",
|
|
"grep": "Grep",
|
|
"search_files": "Grep",
|
|
"searchfiles": "Grep",
|
|
"webfetch": "WebFetch",
|
|
"web_fetch": "WebFetch",
|
|
"fetch": "WebFetch",
|
|
"websearch": "WebSearch",
|
|
"web_search": "WebSearch",
|
|
"agent": "Agent",
|
|
"askuserquestion": "AskUserQuestion",
|
|
"ask_user_question": "AskUserQuestion",
|
|
"enterplanmode": "EnterPlanMode",
|
|
"enter_plan_mode": "EnterPlanMode",
|
|
"exitplanmode": "ExitPlanMode",
|
|
"exit_plan_mode": "ExitPlanMode",
|
|
"croncreate": "CronCreate",
|
|
"cron_create": "CronCreate",
|
|
"crondelete": "CronDelete",
|
|
"cron_delete": "CronDelete",
|
|
"schedulewakeup": "ScheduleWakeup",
|
|
"schedule_wakeup": "ScheduleWakeup",
|
|
"sendmessage": "SendMessage",
|
|
"send_message": "SendMessage",
|
|
"skill": "Skill",
|
|
"taskcreate": "TaskCreate",
|
|
"task_create": "TaskCreate",
|
|
"tasklist": "TaskList",
|
|
"task_list": "TaskList",
|
|
"taskoutput": "TaskOutput",
|
|
"task_output": "TaskOutput",
|
|
"taskstop": "TaskStop",
|
|
"task_stop": "TaskStop",
|
|
"taskupdate": "TaskUpdate",
|
|
"task_update": "TaskUpdate",
|
|
}
|
|
|
|
func normalizeClaudeCodeToolName(name string) string {
|
|
trimmed := strings.TrimSpace(name)
|
|
if trimmed == "" {
|
|
return ""
|
|
}
|
|
|
|
if mapped, ok := claudeCodeBuiltinToolNameMap[strings.ToLower(trimmed)]; ok {
|
|
return mapped
|
|
}
|
|
|
|
return trimmed
|
|
}
|