Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

[Bug]: Byte-capped Read reports prefix count as whole-file total

オープン
#53,230 コメント 1 件 リアクション 0 件 担当者 1 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@neriousy がすでに取り組んでいます。

2026年10月4日 から。

  • #53231 @Sypher760-gif による — オープン
  • #53324 @kpdagrt22 による — オープン

評価

この issue はまだ評価されていません。

説明

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
  1. Create a file containing 1,000 lines of 100 ASCII characters each, joined by newlines without a trailing newline.
  2. Read it with the legacy Read tool from offset 1 with limit 2000.
  3. Inspect the raw tool metadata: the returned range is 1–506 and continuation starts at 507, but totalLines is 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.

主要言語
TypeScript
スター
212k
フォーク
28.1k
平均マージ
8時間 49分
マージ済み PR(30日)
348

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

anomalyco/opencode のほかの issue

anomalyco/opencode の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。