Built-in functions.view returns no content for large files despite documenting automatic truncation
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 72/100
Hướng nghiên cứu
Issue xác định công cụ tích hợp sẵn functions.view và đưa ra trường hợp có thể tái hiện bằng một tệp văn bản 26.400 byte không có view_range. Trước tiên, hãy tìm phần triển khai và mô tả của công cụ, sau đó so sánh phản hồi với tệp lớn với hành vi cắt ngắn được tài liệu mô tả. Hoàn thành khi hành vi và mô tả khớp nhau; hãy tái hiện trường hợp này và kiểm tra ví dụ view_range vẫn hoạt động.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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
- Ngôn ngữ chính
- Python
- Star
- 11.5k
- Fork
- 2k
- Merge trung bình
- 6 giờ 34 phút
- Pull request đã merge (30 ngày)
- 3
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không 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 github/copilot-cli
-
area:plugins
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
github/copilot-cli#5567 ·
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 78/100
github/copilot-cli#5489 ·
-
triage
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 74/100
github/copilot-cli#5377 ·
-
area:platform-windows area:tools
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 74/100
github/copilot-cli#5340 ·
-
area:configuration area:models
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
github/copilot-cli#5287 ·
Tất cả issue của github/copilot-cli
Issue tương tự
-
fidelity
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
backlog
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
sagemathinc/sagebrush#3434 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
marketing
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày
-
documentation good first issue help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
wuisabel-gif/MemWhale#576 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Status: Triage Suggestion
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
GTNewHorizons/GT-New-Horizons-Modpack#27957 ·
Maintainer thường phản hồi trong vòng 1 ngày