Add tool to rename model using the LSP server #425
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Not sure if we should merge this, but I am keen to start a discussion on adding this kind of tools.
Leveraging the existing scaffolding on how to call the LSP, this PR adds the ability to rename models using the LSP.
What the LSP allows is:
The LSP doesn't rename references to models in the YAML files, but I think that it will do it in the future. So, leveraging the LSP would give us this ability "for free".
What the LSP does is return what parts of which files need to be udpated. This tool takes this information and then do the updates to the files by itself (approach 1).
There is an alternative approach (approach 2) where we just provide the files to be updated as context to the LLM and then let the LLM update the files by itself
The advantage of 1. is that we could technically call it from a MCP server with no text-editing capabilities (like Claude Desktop), but the drawback is that we need a lot of boilerplate code to manage editing the text.
If we are keen to add tools like this one we could also add a similar about renaming columns.