Add code action tool and rename tool (#28453)

Having a separate rename tool seems to make the agent more likely to use
it compared to having it be part of the code actions tool.

Release Notes:

- Added code action tool and rename tool.
This commit is contained in:
Richard Feldman 2025-04-09 22:38:01 -04:00 committed by GitHub
parent 0e72a7e6ce
commit 6db4ab381c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 650 additions and 2 deletions

View file

@ -0,0 +1,15 @@
Renames a symbol across your codebase using the language server's semantic knowledge.
This tool performs a rename refactoring operation on a specified symbol. It uses the project's language server to analyze the code and perform the rename correctly across all files where the symbol is referenced.
Unlike a simple find and replace, this tool understands the semantic meaning of the code, so it only renames the specific symbol you specify and not unrelated text that happens to have the same name.
Examples of symbols you can rename:
- Variables
- Functions
- Classes/structs
- Fields/properties
- Methods
- Interfaces/traits
The language server handles updating all references to the renamed symbol throughout the codebase.