Refacto is a Visual Studio Code extension that allows you to refactor your code using an local AI model. The extension sends your selected code to a server running the Llama CPP model, which returns a refactored version of your code.
- Refactor Selected Code: Simply select the code you want to refactor, right-click, and choose "✨ Refacto selected code" from the context menu.
- a llama cpp server
- vscode
- Install Visual Studio Code 1.50.0 or higher
- Launch Code
- From the command palette
Ctrl-Shift-P
(Windows, Linux) orCmd-Shift-P
(OSX) - Select
Install Extension
- Choose the extension
refacto
- Reload Visual Studio Code
npm i
npm run compile
- Select the code you want to refactor.
- Right-click and choose "✨ Refacto selected code" from the context menu.
- The refactored code will replace your selected code.
llama-cpp.serverUrl
: URL of the Llama CPP server. Default ishttp://127.0.0.1:8080/completion
.
If you find any bugs or have a feature request, please open an issue on github!