@@ -54,7 +54,7 @@ describe("NextEditPromptEngine", () => {
5454 { filepath : "/path/to/file1.ts" , content : "const b = 2;" } ,
5555 ] ,
5656 currentFileContent : "function test() {\n const a = 1;\n return a;\n}" ,
57- editDiffHistory : "diff --git a/file.ts b/file.ts\n@@ -1,3 +1,4 @@" ,
57+ editDiffHistory : [ "diff --git a/file.ts b/file.ts\n@@ -1,3 +1,4 @@" ] ,
5858 editableRegionStartLine : 0 ,
5959 editableRegionEndLine : 3 ,
6060 userEdits : "Added constant a" ,
@@ -91,8 +91,9 @@ describe("NextEditPromptEngine", () => {
9191 windowEnd : 3 , // Math.min(helper.fileLines.length - 1, helper.pos.line + 25)
9292 editableRegionStartLine : 0 , // Math.max(0, helper.pos.line - 1) within window
9393 editableRegionEndLine : 2 , // Math.min(helper.pos.line + 5) within window
94- editDiffHistory :
95- "diff --git a/file.ts b/file.ts\nindex 123..456 789\n--- a/file.ts\n+++ b/file.ts\n@@ -1,3 +1,4 @@\n function test() {\n+ const a = 1;\n return a;\n }" , // unified diff
94+ editDiffHistory : [
95+ "diff --git a/file.ts b/file.ts\nindex 123..456 789\n--- a/file.ts\n+++ b/file.ts\n@@ -1,3 +1,4 @@\n function test() {\n+ const a = 1;\n return a;\n }" ,
96+ ] , // unified diff
9697 currentFilePath : "/path/to/file.ts" ,
9798 languageShorthand : "ts" ,
9899 } ;
@@ -106,7 +107,6 @@ describe("NextEditPromptEngine", () => {
106107 expect ( result . prompt . content ) . toContain ( "### Context:" ) ;
107108 expect ( result . prompt . content ) . toContain ( "### User Edits:" ) ;
108109 expect ( result . prompt . content ) . toContain ( "### User Excerpts:" ) ;
109- expect ( result . prompt . content ) . toContain ( "```ts" ) ;
110110
111111 expect ( result . userEdits ) . toBe ( instinctCtx . editDiffHistory ) ;
112112 expect ( result . userExcerpts ) . toContain ( INSTINCT_USER_CURSOR_IS_HERE_TOKEN ) ;
@@ -223,7 +223,7 @@ describe("NextEditPromptEngine", () => {
223223 { filepath : "/path/to/file1.ts" , content : "const b = 2;" } ,
224224 ] ,
225225 currentFileContent : "function test() {\n const a = 1;\n return a;\n}" ,
226- editDiffHistory : "diff --git a/file.ts b/file.ts\n@@ -1,3 +1,4 @@" ,
226+ editDiffHistory : [ "diff --git a/file.ts b/file.ts\n@@ -1,3 +1,4 @@" ] ,
227227 editableRegionStartLine : 0 ,
228228 editableRegionEndLine : 3 ,
229229 userEdits : "Added constant a" ,
0 commit comments