MCPcopy Index your code
hub / github.com/anomalyco/opencode / toolError

Function toolError

packages/opencode/src/cli/cmd/run/tool.ts:211–222  ·  view source on GitHub ↗
(ctx: ToolFrame)

Source from the content-addressed store, hash-verified

209}
210
211function toolError(ctx: ToolFrame): string {
212 if (ctx.error) {
213 return ctx.error
214 }
215
216 const state = text(ctx.state.error).trim()
217 if (state) {
218 return state
219 }
220
221 return ctx.raw.trim()
222}
223
224function fallbackStart(ctx: ToolFrame): string {
225 const extra = info(ctx.input)

Callers 2

failFunction · 0.70
scrollGlobFinalFunction · 0.70

Calls 1

textFunction · 0.70

Tested by

no test coverage detected