@oh-my-pi/hashline 16.0.4 → 16.0.6

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/messages.ts +7 -5
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@oh-my-pi/hashline",
4
- "version": "16.0.4",
4
+ "version": "16.0.6",
5
5
  "description": "Hashline: a compact, line-anchored patch language and applier. Pluggable FS/IO so it works over disk, in-memory, or any custom backend.",
6
6
  "homepage": "https://omp.sh",
7
7
  "author": "Can Boluk",
package/src/messages.ts CHANGED
@@ -203,12 +203,14 @@ function formatLineRanges(lines: readonly number[]): string {
203
203
  * files; reject and make the model re-read those exact lines first.
204
204
  */
205
205
  export function unseenLinesMessage(sectionPath: string, unseenLines: readonly number[], tag: string): string {
206
+ const ranges = formatLineRanges(unseenLines);
207
+ const selector = ranges.replace(/, /g, ",");
206
208
  return (
207
- `This edit targets line(s) ${formatLineRanges(unseenLines)} of ${sectionPath} that were not shown in the ` +
208
- `read/search output for ${HL_FILE_PREFIX}${sectionPath}${HL_FILE_HASH_SEP}${tag}${HL_FILE_SUFFIX} a partial ` +
209
- `range, a search hit, or a structural summary that collapsed bodies was displayed, not those exact lines. ` +
210
- `Re-read those lines, then re-issue the edit against the fresh tag. NEVER author hunks against line numbers ` +
211
- `you have not seen in the current snapshot.`
209
+ `This edit anchors to lines ${ranges} of ${sectionPath} that ` +
210
+ `${HL_FILE_PREFIX}${sectionPath}${HL_FILE_HASH_SEP}${tag}${HL_FILE_SUFFIX} never displayed (it showed a ` +
211
+ `partial range, a search hit, or a folded summary). Re-read them in full first with a ranged read like ` +
212
+ `\`${sectionPath}:${selector}\` it skips summarization and mints a fresh tag (a plain re-read just re-folds ` +
213
+ `them) then re-issue the edit.`
212
214
  );
213
215
  }
214
216