feat: prettify tool result rendering (#538)

Co-authored-by: Letta <noreply@letta.com>
This commit is contained in:
Charles Packer
2026-01-14 12:00:49 -08:00
committed by GitHub
parent 480a270f53
commit 12c84c6d0a
2 changed files with 119 additions and 0 deletions

View File

@@ -210,3 +210,29 @@ export function isShellTool(name: string): boolean {
n === "runshellcommand"
);
}
/**
* Checks if a tool is a search/grep tool
*/
export function isSearchTool(name: string): boolean {
return (
name === "grep" ||
name === "Grep" ||
name === "grep_files" ||
name === "GrepFiles" ||
name === "search_file_content" ||
name === "SearchFileContent"
);
}
/**
* Checks if a tool is a glob tool
*/
export function isGlobTool(name: string): boolean {
return (
name === "glob" ||
name === "Glob" ||
name === "glob_gemini" ||
name === "GlobGemini"
);
}