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

Function fail

packages/core/src/tool/apply-patch.ts:78–84  ·  view source on GitHub ↗
(path: string)

Source from the content-addressed store, hash-verified

76 execute: (input, context) => {
77 const applied: Array<typeof Applied.Type> = []
78 const fail = (path: string) => {
79 const prefix =
80 applied.length === 0
81 ? `Unable to apply patch at ${path}`
82 : `Patch partially applied before failing at ${path}. Applied: ${applied.map((item) => item.resource).join(", ")}`
83 return new ToolFailure({ message: prefix })
84 }
85 return Effect.gen(function* () {
86 const source = {
87 type: "tool" as const,

Callers 1

apply-patch.tsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected