Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

/refactor Slash Command #19

Open
sestinj opened this issue Sep 4, 2023 · 0 comments
Open

/refactor Slash Command #19

sestinj opened this issue Sep 4, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@sestinj
Copy link
Contributor

sestinj commented Sep 4, 2023

For situations where you are looking to find all occurrences of some pattern, or usages of a function, etc... and you need to edit all of them, but it is slightly more complicated that find and replace.

The /refactor slash command would:

  1. Find all occurrences of a pattern in the codebase, either by using ripgrep, or semantic search, or other
  2. Write a prompt for each of these and pass each to the LLM in parallel
  3. Once all edits are done, parse them so that the edit can be applied to the file
  4. Apply them to each of the files. One way of doing this is with sdk.ide.showDiff, but we might also consider a better refactoring UI here.

If you're interested in working on this, feel free to reach out and ask questions first

@sestinj sestinj converted this from a draft issue Sep 4, 2023
@sestinj sestinj added the enhancement New feature or request label Sep 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Development

No branches or pull requests

1 participant