MCPcopy Create free account
hub / github.com/continuedev/continue / generateDiff

Function generateDiff

extensions/cli/src/tools/writeFile.ts:15–29  ·  view source on GitHub ↗
(
  oldContent: string,
  newContent: string,
  filePath: string,
)

Source from the content-addressed store, hash-verified

13import { Tool, ToolCallPreview } from "./types.js";
14
15export function generateDiff(
16 oldContent: string,
17 newContent: string,
18 filePath: string,
19): string {
20 return createTwoFilesPatch(
21 filePath,
22 filePath,
23 oldContent,
24 newContent,
25 undefined,
26 undefined,
27 { context: 3 },
28 );
29}
30
31export const writeFileTool: Tool = {
32 name: "Write",

Callers 3

writeFile.tsFile · 0.85
edit.tsFile · 0.85
multiEdit.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected