Comment by _andrei_
1 year ago
Pretty nice, made a CLI app for this as well, seems like a common need: https://github.com/3rd/promptpack
But sending whole files isn't always optimal, I'm thinking there has to be a better way, like picking workspace symbols and pulling in only the code they depend on from other files. Something something LSP/tree-sitter-based.
This is what aider does, using tree sitter to extract the AST from each source file. It uses the ASTs to build a call graph. And then does a graph optimization to identify the most relevant parts of the code base, given the current state of the LLM chat.
There’s more details in this article:
https://aider.chat/2023/10/22/repomap.html
Ah wasn't aware, nice work!
aider is super limited. solid approach but needs a lot of work to make it usable
Cool, thanks for sharing.
That's a great point.
A tree-based file path browser with ability to select all or individual functions or classes would be cool.
Jetbrains IDEs have a good interface for symbols via the refactoring UI. Maybe I'll look there for some inspiration.