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

Function patch

packages/opencode/src/plugin/install.ts:168–179  ·  view source on GitHub ↗
(text: string, path: Array<string | number>, value: unknown, insert = false)

Source from the content-addressed store, hash-verified

166}
167
168function patch(text: string, path: Array<string | number>, value: unknown, insert = false) {
169 return applyEdits(
170 text,
171 modify(text, path, value, {
172 formattingOptions: {
173 tabSize: 2,
174 insertSpaces: true,
175 },
176 isArrayInsertion: insert,
177 }),
178 )
179}
180
181function patchPluginList(
182 text: string,

Callers 2

patchPluginListFunction · 0.70
DiffViewerFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected