[Bug]: Byte-capped Read reports prefix count as whole-file total
Maintainer thường phản hồi trong vòng 1 ngày
@neriousy đang làm issue này rồi.
Từ ngày 4/10/2026.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
Description
The legacy Read tool reports a partial scan count as the whole-file total when it stops at the 50 KiB byte cap. For a 1,000-line file, it returns lines 1–506 with truncated: true but incorrectly reports totalLines: 507.
Steps to reproduce
- Create a file containing 1,000 lines of 100 ASCII characters each, joined by newlines without a trailing newline.
- Read it with the legacy Read tool from offset 1 with limit 2000.
- Inspect the raw tool metadata: the returned range is 1–506 and continuation starts at 507, but
totalLinesis 507 instead of an unknown total.
Expected behavior
Omit totalLines when the byte cap prevents scanning to EOF. Report the exact total after a complete scan. Returned text and continuation offsets should stay unchanged.
OpenCode version
Source checkout dev at 907b3bc518fa48e90e8ec24dd327d13eee71c36c; Bun 1.3.14 test runtime.
Operating System
Windows 11 x64.
Terminal
Git Bash; native Bun invoked through Python.
- Ngôn ngữ chính
- TypeScript
- Star
- 221k
- Fork
- 29.6k
- Merge trung bình
- 4 giờ 35 phút
- Pull request đã merge (30 ngày)
- 521
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của anomalyco/opencode
-
triaging
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
anomalyco/opencode#58821 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
anomalyco/opencode#58774 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
anomalyco/opencode#58725 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Snapshot capture failure (EPERM spawning git) fails the whole step despite the best-effort contractCó thể đã có người làm @Dopetaiga đã nhận 1 ngày trước. Đang mởreproduced
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
anomalyco/opencode#58685 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
tui: PHP code blocks without `<?php` are not syntax highlightedCó thể đã có người làm @SwastikTripathi đã nhận 1 ngày trước. Đang mởreproduced
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
anomalyco/opencode#58664 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của anomalyco/opencode
Issue tương tự
-
VS Code extension: clickable file links in chat drop the :line suffix, never jump to the lineĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
MoonshotAI/kimi-code#4398 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Xiaomi Mimo语音识别服务异常Đang mởpending triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
Maintainer thường phản hồi trong vòng 1 ngày
-
package-lock.json : les binaires natifs macOS et Linux de unrs-resolver ont disparu depuis #1823Đang mởbug dependencies
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
AxaFrance/design-system#2064 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100