@oh-my-pi/hashline 16.0.5 → 16.0.7
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.
- package/package.json +1 -1
- 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
|
+
"version": "16.0.7",
|
|
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
|
|
208
|
-
|
|
209
|
-
`range, a search hit, or a
|
|
210
|
-
|
|
211
|
-
`
|
|
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
|
|