MCPcopy
hub / github.com/anomalyco/opencode / patchFile

Function patchFile

packages/app/e2e/smoke/session-timeline.fixture.ts:150–161  ·  view source on GitHub ↗
(seed: number, type: "add" | "update" | "delete")

Source from the content-addressed store, hash-verified

148}
149
150function patchFile(seed: number, type: "add" | "update" | "delete") {
151 return {
152 filePath: `src/generated/patch-${seed}.ts`,
153 relativePath: `src/generated/patch-${seed}.ts`,
154 type,
155 additions: (seed % 7) + 1,
156 deletions: type === "add" ? 0 : seed % 4,
157 patch: patch(seed, 520),
158 before: type === "add" ? undefined : code(seed, 18),
159 after: type === "delete" ? undefined : code(seed + 1, 24),
160 }
161}
162
163function fileDiff(file: string, seed: number) {
164 return {

Callers 1

toolPartFunction · 0.70

Calls 2

patchFunction · 0.70
codeFunction · 0.70

Tested by

no test coverage detected