MCPcopy Index your code
hub / github.com/continuedev/continue / createBeforeAfterDiff

Function createBeforeAfterDiff

core/nextEdit/context/diffFormatting.ts:83–102  ·  view source on GitHub ↗
(
  beforeContent: string,
  afterContent: string,
  filePath: string,
)

Source from the content-addressed store, hash-verified

81};
82
83export const createBeforeAfterDiff = (
84 beforeContent: string,
85 afterContent: string,
86 filePath: string,
87) => {
88 const normalizedBefore = beforeContent.endsWith("\n")
89 ? beforeContent
90 : beforeContent + "\n";
91 const normalizedAfter = afterContent.endsWith("\n")
92 ? afterContent
93 : afterContent + "\n";
94
95 const result: BeforeAfterDiff = {
96 filePath: filePath,
97 beforeContent: normalizedBefore,
98 afterContent: normalizedAfter,
99 };
100
101 return result;
102};
103
104const createTokenLineDiff = (
105 beforeContent: string,

Callers 2

finalizeClusterMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected