Improve Readability
Use the Improve Readability command to refactor code for clarity and structure without changing functionality.
Overview
This command reorganizes and cleans up your code, making it easier to read and maintain.
Why Use It
Use Improve Readability to make your code more accessible to collaborators. Clear code reduces errors and simplifies future updates.
Common Use Cases
- Your code has become complex and difficult to follow.
- You want to make your codebase more accessible to other developers.
- You are preparing code for a review or handoff.
- You need to clean up code after several development iterations.
Prerequisites
- Install and enable WiseGPT in VS Code.
- Open the file you want to work on.
Steps
2
Select Command
Right-click the selected code and choose WiseGPT, then select Improve Readability.
tip
You can also click on the light bulb (💡) icon next to the selected code and then select Improve Readability.
3
Review Code
WiseGPT refactors the code in the Chat interface. Review the changes to ensure they meet your requirements, then apply the changes to your codebase.
Troubleshooting
What if WiseGPT stops with an error?
WiseGPT may have encountered a parsing issue.
Check your code for syntax errors such as unclosed brackets, then try running the command again.