(toolName: string, input: ToolInput, fallback: string | undefined)
| 263 | // For shell tools, surface the actual command as the title so it stays visible |
| 264 | // before output lands; non-shell tools keep their model-provided title. |
| 265 | function toolTitle(toolName: string, input: ToolInput, fallback: string | undefined) { |
| 266 | if (isShell(toolName)) return shellCommand(input) ?? fallback ?? toolName |
| 267 | return fallback || toolName |
| 268 | } |
| 269 | |
| 270 | // Enrich shell rawInput with the resolved working directory so clients can show |
| 271 | // where the command runs, unless the model already specified one. |
no test coverage detected