MCPcopy Create free account
hub / github.com/anomalyco/opencode / toolTitle

Function toolTitle

packages/opencode/src/acp/tool.ts:265–268  ·  view source on GitHub ↗
(toolName: string, input: ToolInput, fallback: string | undefined)

Source from the content-addressed store, hash-verified

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.
265function 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.

Callers 4

pendingToolCallFunction · 0.85
runningToolUpdateFunction · 0.85
errorToolUpdateFunction · 0.85

Calls 2

isShellFunction · 0.85
shellCommandFunction · 0.85

Tested by

no test coverage detected