Built-in functions.view returns no content for large files despite documenting automatic truncation
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 72/100
調査の方向性
issue では組み込みの functions.view ツールが特定されており、view_range を指定せずに 26,400 バイトのテキストファイルを使う再現可能なケースが示されています。まずツールの実装と説明を見つけ、大きなファイルへの応答を、ドキュメントに記載された切り詰め動作と比較してください。動作と説明が一致すれば完了です。ケースを再現し、view_range の例が引き続き動作することを確認してください。
索引モデルが issue の本文から書いたものです。
説明
Describe the bug
The built-in functions.view tool’s description says text files larger than 20KB are truncated. However, reading a larger file without view_range returns only a size-limit message, with no file content.
The exact text from the tool description is:
View files, images, or directories.
- Images return base64 data and MIME type.
- Text files return their content.
- Directories list non-hidden entries up to 2 levels deep.
pathmust be absolute.- Files over 20KB are truncated; use
view_rangefor sections.
Thus, it's expected that just calling view for a text file larger than 20KB would return a truncated version of that content at 20KB.
Affected version
1.0.112
Steps to reproduce the behavior
- Create a synthetic 26,400-byte, 800-line text file:
python3 -c 'from pathlib import Path; Path("view-size-repro.md").write_text("0123456789abcdef0123456789abcdef\n" * 800, encoding="utf-8")' - In Copilot CLI, ask:
Use the built-in view tool to read view-size-repro.md.
For this test, omit view_range and forceReadLargeFiles. - Observe that the tool returns only:
File too large to read at once (25.8 KB). Consider using the rg tool to search within the file, or view with view_range to read specific sections. - Ask it to read the same file with view_range: [1,5]. The five lines are returned successfully.
Expected behavior
functions.view behavior should match the tool description, whether that means adjusting the tool description or the tool behavior
Additional context
No response
- 主要言語
- Python
- スター
- 11.5k
- フォーク
- 2k
- 平均マージ
- 6時間 34分
- マージ済み PR(30日)
- 3
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
github/copilot-cli のほかの issue
-
area:plugins
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
github/copilot-cli#5567 ·
-
難易度 1/5 1〜3時間 初心者へのやさしさ 78/100
github/copilot-cli#5489 ·
-
triage
難易度 1/5 1時間未満 初心者へのやさしさ 74/100
github/copilot-cli#5377 ·
-
area:platform-windows area:tools
難易度 1/5 1時間未満 初心者へのやさしさ 74/100
github/copilot-cli#5340 ·
-
area:configuration area:models
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
github/copilot-cli#5287 ·
github/copilot-cli の issue をすべて見る
似ている issue
-
fidelity
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
backlog
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
sagemathinc/sagebrush#3434 ·
メンテナーはふだん 1 日以内に返信
-
marketing
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信
-
documentation good first issue help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
wuisabel-gif/MemWhale#576 ·
メンテナーはふだん 1 日以内に返信
-
Status: Triage Suggestion
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
GTNewHorizons/GT-New-Horizons-Modpack#27957 ·
メンテナーはふだん 1 日以内に返信