3 ms·
Pretty nice, made a CLI app for this as well, seems like a common need: https://github.com/3rd/promptpack https://github.com/3rd/promptpack But sending whole f
by _andrei_ 2y ago
Pretty nice, made a CLI app for this as well, seems like a common need: https://github.com/3rd/promptpack 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.
- bredren 2y agoCool, 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.
- anotherpaulg 2y agoThis 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 https://aider.chat/2023/10/22/repomap.html
- arthurcolle 2y agoaider is super limited. solid approach but needs a lot of work to make it usable
- _andrei_ 2y agoAh wasn't aware, nice work!