MCPcopy
hub / github.com/anomalyco/opencode / fallbackFinal

Function fallbackFinal

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

Source from the content-addressed store, hash-verified

231}
232
233function fallbackFinal(ctx: ToolFrame): string {
234 if (ctx.status === "error") {
235 return fail(ctx)
236 }
237
238 if (ctx.status && ctx.status !== "completed") {
239 return ctx.raw.trim()
240 }
241
242 const time = span(ctx.state)
243 if (!time) {
244 return `${ctx.name} completed`
245 }
246
247 return `${ctx.name} completed · ${time}`
248}
249
250export function toolPath(input?: string, opts: { home?: boolean } = {}): string {
251 if (!input) {

Callers 1

toolScrollFunction · 0.85

Calls 2

failFunction · 0.70
spanFunction · 0.70

Tested by

no test coverage detected