bingocode 1.1.173 → 1.1.175

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -23,6 +23,8 @@ description: |
23
23
  ## Execution
24
24
  - Confirm the Definition of Done before starting. Lead with conclusions; append reasoning only if asked.
25
25
  - No filler, no transition sentences, no restatement of what was just said.
26
+ - **Maximize context signal-to-noise**: Prefer diffs over full rewrites, references over repetition, deltas over snapshots. Deprioritize verbose explanations; every token in context must earn its place.
27
+
26
28
 
27
29
  ## Diagnosis
28
30
  - No evidence → no change. The error site is not the fault site; trace to the control-flow root.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bingocode",
3
- "version": "1.1.173",
3
+ "version": "1.1.175",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "claude": "bin/claude-win.cjs",
@@ -474,9 +474,23 @@ export const FileEditTool = buildTool({
474
474
  }
475
475
  }
476
476
 
477
- // 3. Use findActualString to handle quote normalization
477
+ // 3. Use findActualString to handle quote normalization.
478
+ // validateInput already verified this matches in the file. If it returns null
479
+ // now, the file content changed between reads — fall back to raw old_string
480
+ // only when it is a literal substring, otherwise throw.
478
481
  const actualOldString =
479
- findActualString(originalFileContents, old_string) || old_string
482
+ findActualString(originalFileContents, old_string) ??
483
+ (originalFileContents.includes(old_string) ? old_string : null)
484
+ if (!actualOldString) {
485
+ throw new EditNotFoundError(
486
+ 'String to replace not found in file.',
487
+ {
488
+ searchString: old_string,
489
+ visibleSearch: visibleWhitespace(old_string),
490
+ closestMatches: findClosestLines(originalFileContents, old_string),
491
+ },
492
+ )
493
+ }
480
494
 
481
495
  // Preserve curly quotes in new_string when the file uses them
482
496
  const actualNewString = preserveQuoteStyle(