search_graph: clarify how to find a known symbol without specifying its label

Đang mở Phù hợp với người mới
#3,131 1 bình luận 1 reaction 0 người được giao Xem trên GitHub

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ó
1/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
82/100
Loại issue
Tài liệu
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
typescript
Lĩnh vực
devtools

Hướng nghiên cứu

Tìm phần mô tả công cụ search_graph và tài liệu của công cụ, sau đó làm rõ sự khác nhau giữa tìm kiếm BM25 bằng query và tra cứu bằng name_pattern. Giải thích rằng tìm kiếm BM25 không có nhãn sẽ loại trừ các nút Variable, và tên chính xác cần dùng mẫu đã escape và có neo. Công việc hoàn tất khi cả phần mô tả công cụ lẫn tài liệu đều giải thích các hành vi này; issue cho biết một bài kiểm thử E2E đã xác minh tìm kiếm cấu trúc.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

documentation enhancement parsing/quality ux/behavior
What problem does this solve?

The current search_graph tool description does not clearly explain when to use query versus name_pattern.

For example, given an indexed TypeScript declaration:

export const nativeScaleRefreshMarker = 913;

The following BM25 search does not return the declaration:

{
  "project": "<project>",
  "query": "nativeScaleRefreshMarker",
  "limit": 6,
  "format": "json"
}

This is intentional. BM25_UNLABELLED_EXCLUSION excludes Variable, File, Folder and Project nodes to prevent path matches from crowding out other definitions.

However, clients can already find a known symbol without knowing its label by using an anchored name_pattern and omitting query:

{
  "project": "<project>",
  "name_pattern": "^nativeScaleRefreshMarker$",
  "limit": 6,
  "format": "json"
}
Proposed solution

Update the search_graph tool description and documentation to explain that:

  • query uses BM25 full-text search. Without a label filter, Variable nodes are excluded.
  • name_pattern can locate known symbols without requiring their node label.
  • For literal symbol names, clients should escape regex metacharacters and use anchored patterns.

No changes to BM25 ranking, candidate selection or the database schema are needed.

Verification

A native E2E test confirmed that structural search finds both variable declarations in a repository containing 2,105 competing functions, without specifying a label or changing BM25 behavior.

Confirmations
  • I searched existing issues and this is not a duplicate.
Ngôn ngữ chính
C
Star
45.8k
Fork
3.8k
Merge trung bình
2 ngày 18 giờ
Pull request đã merge (30 ngày)
108

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

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của DeusData/codebase-memory-mcp

Tất cả issue của DeusData/codebase-memory-mcp

Issue tương tự

Thêm issue về C

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.