big-gulp-reads 1.0.0 → 1.0.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
- ## [1.0.0] - 2026-02-14
3
+ ## [1.0.1] - 2026-11-14
4
+
5
+ - Fixed the oversized-first-line notice to report the line's actual size instead of repeating the limit.
6
+
7
+ ## [1.0.0] - 2026-11-14
4
8
 
5
9
  - Initial release: read tool override with configurable KB/line limits (default 200KB / 5000 lines) and /big-gulp-reads command.
@@ -128,7 +128,9 @@ export default function (pi: ExtensionAPI) {
128
128
 
129
129
  let outputText: string;
130
130
  if (truncation.firstLineExceedsLimit) {
131
- outputText = `[Line ${startLineDisplay} is ${formatSize(maxBytes)}, exceeds ${formatSize(maxBytes)} limit. Use bash: sed -n '${startLineDisplay}p' ${params.path} | head -c ${maxBytes}]`;
131
+ // truncateHead does not report the oversized line's byte count, so measure it here.
132
+ const firstLineBytes = Buffer.byteLength(selected[0] ?? "", "utf-8");
133
+ outputText = `[Line ${startLineDisplay} is ${formatSize(firstLineBytes)}, exceeds ${formatSize(maxBytes)} limit. Use bash: sed -n '${startLineDisplay}p' ${params.path} | head -c ${maxBytes}]`;
132
134
  } else if (truncation.truncated) {
133
135
  const endLineDisplay = startLineDisplay + truncation.outputLines - 1;
134
136
  const nextOffset = endLineDisplay + 1;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "big-gulp-reads",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Override pi's built-in read tool with a larger, configurable truncation limit",
5
5
  "keywords": ["pi-package"],
6
6
  "license": "MIT",