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

Function unableToEdit

packages/core/src/tool/edit.ts:110–119  ·  view source on GitHub ↗
(effect: Effect.Effect<A, E, R>)

Source from the content-addressed store, hash-verified

108 ],
109 execute: (input, context) => {
110 const unableToEdit = <A, E, R>(effect: Effect.Effect<A, E, R>) =>
111 effect.pipe(
112 Effect.mapError((error) =>
113 error instanceof FileMutation.StaleContentError
114 ? new ToolFailure({
115 message: "File changed after permission approval. Read it again before editing.",
116 })
117 : new ToolFailure({ message: `Unable to edit ${input.path}` }),
118 ),
119 )
120
121 return Effect.gen(function* () {
122 const permissionSource = {

Callers 1

edit.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected