vscode_listCodeusages tool should implement some form of caching
- Dominant language
- TypeScript
- Stars
- 193k
- Forks
- 42.4k
- PR merge metrics
- PR metrics pending
Description
- Copilot Chat Extension Version: 0.54.0
- VS Code Version: 1.130.0
- OS Version: Windows_NT x64 10.0.26100
- Feature (e.g. agent/edit/ask mode): Agent
- Selected model (e.g. GPT 4.1, Claude 3.7 Sonnet): Claude Sonnet 4.6
Steps to Reproduce:
1. The inflation of token cost is easily seen on a large database with a large number of references to a symbol. But any workspace can be used to test this.
2. Manually invoke the tool by asking Copilot "#usages find me all the references to "
3. The usages tool will document all references of requested symbol and save them to a temporary "context.txt" file to refer to.
4. Each subsequent call to the usages tool will recreate the "context.txt", consuming large amounts of tokens for especially large databases. This can become very expensive for small tasks like "Find the first x references to , remove them, then find the remaining references."
5. Caching of symbols should be implemented to avoid the need to recreate the "context.txt" file at each invoke of the tool.
Contributor guide
Assessment
This issue has not been assessed yet.