MCPcopy Create free account
hub / github.com/apache/maka / patchContent

Function patchContent

packages/runtime/src/apply-patch-file.ts:31–39  ·  view source on GitHub ↗
(content: string, diff: string, mode?: 'create')

Source from the content-addressed store, hash-verified

29}
30
31function patchContent(content: string, diff: string, mode?: 'create'): string {
32 try {
33 return applyDiff(content, diff, mode);
34 } catch (error) {
35 throw new ApplyPatchRejectedError(
36 error instanceof Error ? error.message : 'ApplyPatch could not be applied.',
37 );
38 }
39}

Callers 2

createPatchedFileFunction · 0.85
updatePatchedFileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected