MCPcopy Create free account
hub / github.com/Work-Fisher/code-claw / buildSyntheticCreatePatch

Function buildSyntheticCreatePatch

tools/claw-launcher-ui/server.mjs:1657–1669  ·  view source on GitHub ↗
(content)

Source from the content-addressed store, hash-verified

1655}
1656
1657function buildSyntheticCreatePatch(content) {
1658 return [
1659 {
1660 oldStart: 0,
1661 oldLines: 0,
1662 newStart: 1,
1663 newLines: String(content).split('\n').length,
1664 lines: String(content)
1665 .split('\n')
1666 .map(line => `+${line}`),
1667 },
1668 ]
1669}
1670
1671function isFileEditLike(value) {
1672 if (!value || typeof value !== 'object' || Array.isArray(value)) {

Callers 1

extractDiffBundleFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected