Repository navigation
dsh-code-atlas —— 给 agent 一张能核对的仓库地图(tree-sitter WASM + 每文件一行 F/R/A/S) #8965
qlheric
started this conversation in
Show Your Plugins!
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
同类里已经有 dsh-code-index(好用的符号索引)。我这个补的是它没有的那一层:每文件一行的 F/R/A/S,而且每条都能指回出处。
名字@行号eval、child_process、rm -rf、shell:true、硬编码密钥、关 TLS 校验、777),每条带行号S只给候选,不给结论 —— 它只负责指出"这里有人写过规矩"或"这里出现了危险写法",判断留给你。这样它不会编。跑出来是什么样(本机一个真实工作区):
装
两个 WASM 依赖(
web-tree-sitter、tree-sitter-wasms)会跟着装上,不用装编译器。两个取舍值得说一下
tree-sitter/regex)。解析器出问题不该毁掉整次索引。.dsh_probe/下克隆来参考的几个仓库也扫进去了,1094 个文件、9.46 秒;加了这条线之后 252 个文件、0.82 秒。不设这道线,别人的仓库就会污染你的地图。"导出"的判据按语言写死了:JS/TS 看
export_statement、Go 看首字母大写、Rust 看pub/visibility_modifier、Python 和 Ruby 与 Bash 看是不是_开头、C/C++ 看是不是static。19 个用例。已知边界:调用图还没做(R 列只到文件级依赖),索引现在是全量重建、单文件上限 512KB。
https://github.com/qlheric/dsh-code-atlas
All reactions