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

Function toolPart

packages/opencode/test/cli/run/entry.body.test.ts:10–20  ·  view source on GitHub ↗
(tool: string, state: ToolPart["state"], id = `${tool}-1`, messageID = `msg-${tool}`)

Source from the content-addressed store, hash-verified

8}
9
10function toolPart(tool: string, state: ToolPart["state"], id = `${tool}-1`, messageID = `msg-${tool}`): ToolPart {
11 return {
12 id,
13 sessionID: "session-1",
14 messageID,
15 type: "tool",
16 callID: `call-${id}`,
17 tool,
18 state,
19 } as ToolPart
20}
21
22function toolCommit(input: {
23 tool: string

Callers 1

toolCommitFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected