fix: tool call UI cleanup (#515)

Co-authored-by: Letta <noreply@letta.com>
This commit is contained in:
Charles Packer
2026-01-11 12:22:22 -08:00
committed by GitHub
parent ab3d429925
commit c07a5edd88
6 changed files with 110 additions and 29 deletions

View File

@@ -16,8 +16,8 @@ export function getDisplayToolName(rawName: string): string {
if (rawName === "edit" || rawName === "multi_edit") return "Update";
if (rawName === "read") return "Read";
if (rawName === "bash") return "Bash";
if (rawName === "grep") return "Grep";
if (rawName === "glob") return "Glob";
if (rawName === "grep" || rawName === "Grep") return "Search";
if (rawName === "glob" || rawName === "Glob") return "Glob";
if (rawName === "ls") return "LS";
if (rawName === "todo_write" || rawName === "TodoWrite") return "TODO";
if (rawName === "EnterPlanMode" || rawName === "ExitPlanMode")
@@ -29,7 +29,7 @@ export function getDisplayToolName(rawName: string): string {
if (rawName === "shell_command" || rawName === "shell") return "Bash";
if (rawName === "read_file") return "Read";
if (rawName === "list_dir") return "LS";
if (rawName === "grep_files") return "Grep";
if (rawName === "grep_files") return "Search";
if (rawName === "apply_patch") return "Patch";
// Codex toolset (PascalCase)
@@ -37,7 +37,7 @@ export function getDisplayToolName(rawName: string): string {
if (rawName === "ShellCommand" || rawName === "Shell") return "Bash";
if (rawName === "ReadFile") return "Read";
if (rawName === "ListDir") return "LS";
if (rawName === "GrepFiles") return "Grep";
if (rawName === "GrepFiles") return "Search";
if (rawName === "ApplyPatch") return "Patch";
// Gemini toolset (snake_case)
@@ -45,7 +45,7 @@ export function getDisplayToolName(rawName: string): string {
if (rawName === "read_file_gemini") return "Read";
if (rawName === "list_directory") return "LS";
if (rawName === "glob_gemini") return "Glob";
if (rawName === "search_file_content") return "Grep";
if (rawName === "search_file_content") return "Search";
if (rawName === "write_file_gemini") return "Write";
if (rawName === "write_todos") return "TODO";
if (rawName === "read_many_files") return "Read Multiple";
@@ -55,7 +55,7 @@ export function getDisplayToolName(rawName: string): string {
if (rawName === "ReadFileGemini") return "Read";
if (rawName === "ListDirectory") return "LS";
if (rawName === "GlobGemini") return "Glob";
if (rawName === "SearchFileContent") return "Grep";
if (rawName === "SearchFileContent") return "Search";
if (rawName === "WriteFileGemini") return "Write";
if (rawName === "WriteTodos") return "TODO";
if (rawName === "ReadManyFiles") return "Read Multiple";