codegraph_explore: a character or symbol-only budget beside maxFiles
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 48/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- typescript
- Lĩnh vực
- tooling
Hướng nghiên cứu
Bắt đầu ở src/mcp/tools.ts, nơi doc tier của #1699 đã tiêu một hạn mức theo từng file theo thứ hạng, và lần theo cách schema đầu vào của codegraph_explore (maxFiles) đi vào việc render các section. Quyết định biến thể nào sẽ xây dựng (ngân sách maxChars so với các neighbor chỉ gồm symbol dạng name (file:line)), rồi đối chiếu với kích thước câu trả lời đã đo trong phần thân issue. Xong nghĩa là một tham số ngân sách mới làm thay đổi số ký tự của câu trả lời đúng như bảng dự đoán, trong khi hành vi maxFiles hiện có vẫn giữ nguyên.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
maxFiles is the only size knob on codegraph_explore, and it counts files, not characters. Each file that makes the cut contributes whole symbol bodies plus its share of the blast-radius and relationships sections, so a small maxFiles does not give a small answer. Ask: a maxChars budget, or a mode that returns only the named symbols' source with caller names and no bodies for the neighbours.
Measured (1.6.0, Windows, ~500-file TypeScript/Vue repo)
One symbol query, the same every time, varying only maxFiles:
maxFiles |
answer size |
|---|---|
| 1 | 5.4k |
| 3 | 8.1k |
| 6 | 20.5k |
| 12 | 20.7k |
| unset | 7.7k |
Natural-language queries are worse: at maxFiles: 3 the answer was still 13–24k characters in 7 of 8 calls, because a file that matches on a prose term renders its matched sections whole.
Why it matters on the client side
Every later turn re-reads the whole context, so answer size is the cost that compounds. On a paired A/B (headless Claude Code, Opus, n = 12) the tool cut a discovery task from 5.67 to 3.33 calls and still raised cost per task by a median $0.13, and the ~21.7k-character mean answer is the reason (a bounded Read averages ~4.6k on the same repo). Telling the model about maxFiles in the repo rules did not help: a rule naming the cap changed calls +0.67 and cost −$0.14 per task, neither under p .3 at n = 9.
What did shrink answers was a shape change, not a count: the section-first doc tier in #1699 renders a markdown hit's top sections under a per-file source cap and drops the graph sections when no code file rendered, and the doc-question chain went from a median 4 calls to 1 with cost per cell $0.30 against $0.54. A code-side equivalent would be the ask here: a character budget the tool spends in rank order, or a symbols-only mode where neighbours appear as name (file:line) rather than as source.
Happy to send a PR for either if the maintainer has a preference; #1699's doc tier in src/mcp/tools.ts already spends a per-file cap in rank order, so maxChars is mostly plumbing a value from the input schema into the same place.
- Ngôn ngữ chính
- C
- Star
- 73.2k
- Fork
- 4.7k
- Merge trung bình
- 13 giờ 27 phút
- Pull request đã merge (30 ngày)
- 518
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
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 colbymchenry/codegraph
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 90/100
colbymchenry/codegraph#2634 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Windows: bundled Node v24.16.0 can abort at exit (nodejs/node#56645); please bundle Node >= 24.20.0Có thể đã có người làm @Ancienttwo đã nhận 5 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
colbymchenry/codegraph#2617 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Invalid regular expression: /\boperator++\s*(?:<[^<>()]*>)?\s*\(/: Nothing to repeat (v1.6.2)Đang mở
Độ khó 2/5 Dưới một giờ Mức phù hợp với người mới 72/100
colbymchenry/codegraph#2482 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
codegraph ui - does not workĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
colbymchenry/codegraph#1900 · 2 bình luận · 5 reaction ·
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 72/100
colbymchenry/codegraph#1700 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của colbymchenry/codegraph
Issue tương tự
-
v9.6.0: CMake incorrectly enforces presence of libevdevCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
Maintainer thường phản hồi trong vòng 1 ngày
-
IoTSDK
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
Azure/azure-iot-sdk-c#2776 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
[Bug] Unhandled ValueError terminates watchdog thread when GISRC value contains multiple colonsĐang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug Component component: net
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
RT-Thread/rt-thread#11913 · 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 72/100
contiki-ng/contiki-ng#3289 ·
Maintainer thường phản hồi trong vòng 3 ngày