Code Transforms¶
Select code, describe the change in English, get the result. Ideal for mechanical refactoring — converting promise chains to async/await, adding error handling, renaming patterns across a block — without manually rewriting every line.
Transform selected code using natural language instructions.
Usage¶
- Select the code you want to modify
- Press
Ctrl+Shift+M(Cmd+Shift+Mon Mac) - Enter your instruction (e.g., "Add error handling", "Convert to async/await", "Add TypeScript types")
- The selection is replaced with the modified code
Configuration¶
| Setting | Default | Description |
|---|---|---|
sidekick.transformModel |
auto |
Model tier — resolves to powerful for quality |
sidekick.transformContextLines |
50 |
Lines of context before/after selection |
Tips¶
- Be specific in your instructions for better results
- The transform uses surrounding code context to understand the codebase style
- Uses the
powerfultier by default for high-quality refactoring