singularity-forge/packages/pi-coding-agent/src
Mikael Hugo ccdd3027ab perf(read): stream lines when offset/limit provided to avoid loading entire file
When offset or limit are specified, use Node.js readline streaming instead of
loading the entire file into memory. This fixes the truncation issue for large
files (>50KB) where the read tool would return truncated content even when
requesting a small slice.

- Add readLinesStreamed() for memory-efficient line reading
- Add countLines() for total line count without full read
- Use streaming path when offset !== undefined || limit !== undefined
- Keep existing full-file read path when no offset/limit specified
- Add tests for streaming behavior with large files

Fixes the long-standing issue where reading large files like src/headless.ts
(~50KB) with offset/limit would still hit truncation limits.
2026-05-04 15:20:16 +02:00
..
cli chore: commit headless follow-up changes 2026-05-02 06:55:12 +02:00
core perf(read): stream lines when offset/limit provided to avoid loading entire file 2026-05-04 15:20:16 +02:00
modes fix(sf): recover model routes and self-feedback 2026-05-02 22:07:10 +02:00
resources/extensions/memory fix: convert node:test API calls to vitest equivalents 2026-05-02 04:42:38 +02:00
tests test: stabilize vitest compatibility 2026-05-02 05:36:57 +02:00
types fix(gsd): align ADR-009 integration with type-safe builds 2026-04-14 20:46:46 -05:00
utils rip out antigravity from SF + pi-coding-agent UI/config layer 2026-04-19 10:39:36 +02:00
cli.ts port(pi-mono): disable undici body/headers idle timeouts on global dispatcher (refs ea90a6783) 2026-04-29 14:35:08 +02:00
config.ts chore: node 24 native APIs, import.meta.dirname, parsers rename, dep updates 2026-05-02 06:18:25 +02:00
index.ts Harden SF model routing and harness contracts 2026-04-30 07:41:24 +02:00
main.ts Rename @sf-run/* → @singularity-forge/* package scope 2026-04-15 22:56:33 +02:00
migrations.ts fix(migrations): drop press-any-key block to avoid stdin wedge 2026-04-21 00:56:18 +02:00