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

Function toolInlineInfo

packages/opencode/src/cli/cmd/run/tool.ts:1300–1312  ·  view source on GitHub ↗
(part: ToolPart)

Source from the content-addressed store, hash-verified

1298}
1299
1300export function toolInlineInfo(part: ToolPart): ToolInline {
1301 const ctx = frame(part)
1302 const draw = rule(ctx.name)?.run
1303 try {
1304 if (draw) {
1305 return draw(props(ctx))
1306 }
1307 } catch {
1308 return fallbackInline(ctx)
1309 }
1310
1311 return fallbackInline(ctx)
1312}
1313
1314export function toolScroll(phase: ToolPhase, ctx: ToolFrame): string {
1315 const draw = rule(ctx.name)?.scroll?.[phase]

Callers 2

toolFunction · 0.85
toolErrorFunction · 0.85

Calls 5

frameFunction · 0.85
ruleFunction · 0.85
propsFunction · 0.85
fallbackInlineFunction · 0.85
drawFunction · 0.70

Tested by

no test coverage detected