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

Function toolCommit

packages/opencode/src/cli/cmd/run/session-data.ts:622–635  ·  view source on GitHub ↗
(
  part: ToolPart,
  next: Pick<SessionCommit, "text" | "phase" | "toolState"> & { toolError?: string },
)

Source from the content-addressed store, hash-verified

620}
621
622function toolCommit(
623 part: ToolPart,
624 next: Pick<SessionCommit, "text" | "phase" | "toolState"> & { toolError?: string },
625): SessionCommit {
626 return {
627 kind: "tool",
628 source: "tool",
629 messageID: part.messageID,
630 partID: part.id,
631 tool: part.tool,
632 part,
633 ...next,
634 }
635}
636
637function shellPartID(callID: string): string {
638 return `shell:${callID}`

Callers 3

startToolFunction · 0.70
doneToolFunction · 0.70
failToolFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected