Slash Commands
Optimize Code
💡Usage
Taking VSCode as an example, CodeSouler currently supports the following methods for code fixing, optimization, and refactoring:
1. Right-click on selected code block
Select the code block you want to comment on, right-click, and choose "Fix this Code" or "Optimize this Code" from the CodeSouler options. When there are problematic code sections marked with red underlines that need to be addressed, you can select "Fix this Code" to have CodeSouler provide solutions. When some code needs to be optimized, you can use "Optimize this Code" to refactor it for better robustness and readability.
2. Write prompts in the chat box
After selecting a specific code block, write a prompt like "Please refactor this code to ensure code robustness", and CodeSouler can also achieve code optimization and refactoring effects.