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

Function frame

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

Source from the content-addressed store, hash-verified

1244}
1245
1246function frame(part: ToolPart): ToolFrame {
1247 const state = dict(part.state)
1248 return {
1249 raw: "",
1250 name: part.tool,
1251 input: dict(state.input),
1252 meta: "metadata" in part.state ? dict(part.state.metadata) : {},
1253 state,
1254 status: text(state.status),
1255 error: text(state.error),
1256 }
1257}
1258
1259export function toolFrame(commit: StreamCommit, raw: string): ToolFrame {
1260 const state = dict(commit.part?.state)

Callers 1

toolInlineInfoFunction · 0.85

Calls 2

dictFunction · 0.70
textFunction · 0.70

Tested by

no test coverage detected