MCPcopy Index your code
hub / github.com/anomalyco/opencode / edit.ts

File edit.ts

packages/opencode/src/tool/edit.ts:None–None  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1// the approaches in this edit tool are sourced from
2// https://github.com/cline/cline/blob/main/evals/diff-edits/diff-apply/diff-06-23-25.ts
3// https://github.com/google-gemini/gemini-cli/blob/main/packages/core/src/utils/editCorrector.ts
4// https://github.com/cline/cline/blob/main/evals/diff-edits/diff-apply/diff-06-26-25.ts

Callers

nothing calls this directly

Calls 13

trimDiffFunction · 0.85
levenshteinFunction · 0.85
normalizeWhitespaceFunction · 0.85
removeIndentationFunction · 0.85
unescapeStringFunction · 0.85
fileMethod · 0.80
pushMethod · 0.80
lockFunction · 0.70
detectLineEndingFunction · 0.70
convertToLineEndingFunction · 0.70
normalizeLineEndingsFunction · 0.70
replaceFunction · 0.70

Tested by

no test coverage detected