Skip to content

Commit 68bf1b5

Browse files
Update index.ts, typo "hunk" -> "chunk" changed in System prompt and error messages. Retained hunk in function, variables names.
Retained typo "hunk" in variables and functions. But the System prompt for unified diff edit, that goes to LLMs and the error messages, changed the typo.
1 parent b262fb7 commit 68bf1b5

File tree

1 file changed

+4
-4
lines changed
  • src/core/diff/strategies/new-unified

1 file changed

+4
-4
lines changed

src/core/diff/strategies/new-unified/index.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ Your diff here
246246
if (!parsedDiff.hunks.length) {
247247
return {
248248
success: false,
249-
error: "No hunks found in diff. Please ensure your diff includes actual changes and follows the unified diff format.",
249+
error: "No chunks found in diff. Please ensure your diff includes actual changes and follows the unified diff format.",
250250
}
251251
}
252252

@@ -259,7 +259,7 @@ Your diff here
259259
} = findBestMatch(contextStr, result, 0, this.confidenceThreshold)
260260

261261
if (confidence < this.confidenceThreshold) {
262-
console.log("Full hunk application failed, trying sub-hunks strategy")
262+
console.log("Full chunk application failed, trying sub-chunks strategy")
263263
// Try splitting the hunk into smaller hunks
264264
const subHunks = this.splitHunk(hunk)
265265
let subHunkSuccess = true
@@ -304,7 +304,7 @@ Your diff here
304304
errorMsg += `- Context Lines: ${contextLines} out of ${totalLines} total lines (${Math.floor(
305305
contextRatio * 100,
306306
)}%)\n`
307-
errorMsg += `- Attempted to split into ${subHunks.length} sub-hunks but still failed\n`
307+
errorMsg += `- Attempted to split into ${subHunks.length} sub-chunks but still failed\n`
308308

309309
if (contextRatio < 0.2) {
310310
errorMsg += "\nPossible Issues:\n"
@@ -318,7 +318,7 @@ Your diff here
318318
errorMsg += "\nPossible Issues:\n"
319319
errorMsg += "- The diff may be targeting a different version of the file\n"
320320
errorMsg +=
321-
"- There may be too many changes in a single hunk, try splitting the changes into multiple hunks\n"
321+
"- There may be too many changes in a single chunk, try splitting the changes into multiple chunks\n"
322322
}
323323

324324
if (startLine && endLine) {

0 commit comments

Comments
 (0)