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

Function failTool

packages/opencode/src/cli/cmd/run/session-data.ts:734–741  ·  view source on GitHub ↗
(part: ToolPart, text: string)

Source from the content-addressed store, hash-verified

732}
733
734function failTool(part: ToolPart, text: string): SessionCommit {
735 return toolCommit(part, {
736 text,
737 phase: "final",
738 toolState: "error",
739 toolError: text,
740 })
741}
742
743// Emits "interrupted" final entries for all in-flight parts. Called when a turn is aborted.
744export function flushInterrupted(data: SessionData, commits: SessionCommit[]) {

Callers 1

reduceSessionDataFunction · 0.70

Calls 1

toolCommitFunction · 0.70

Tested by

no test coverage detected