feat(code): tree-sitter symbol extraction + auto-indexing

Symbol extraction (symbols.rs):
- tree-sitter parsers for Rust, TypeScript, Python
- Extracts: functions, structs, enums, traits, classes, interfaces
- Signatures, docstrings, line ranges for each symbol
- extract_project_symbols() walks project directory
- Skips hidden/vendor/target/node_modules, files >100KB

Proto: IndexSymbols + SymbolEntry messages for client→server symbol relay

Client: after SessionReady, extracts symbols and sends IndexSymbols
to Sol for indexing into the code search index.

14 unit tests for symbol extraction across Rust/TS/Python.
This commit is contained in:
2026-03-24 00:42:03 +00:00
parent c6d6dbe5c8
commit 73d7d6c15b
6 changed files with 774 additions and 0 deletions

View File

@@ -29,6 +29,10 @@ futures = "0.3"
crossbeam-channel = "0.5"
textwrap = "0.16"
tui-markdown = "=0.3.6"
tree-sitter = "0.24"
tree-sitter-rust = "0.23"
tree-sitter-typescript = "0.23"
tree-sitter-python = "0.23"
[dev-dependencies]
tokio-stream = { version = "0.1", features = ["net"] }