apply_refactoring
Apply a refactoring pattern directly to a code target, modifying files. Use preview_refactoring beforehand to review changes.
Instructions
Apply a refactoring to the codebase.
This actually modifies files. Use preview_refactoring first to see what changes will be made. Changes can be reverted with git.
Args: refactoring: Name of the refactoring (e.g., 'extract-method') target: Target in language-native format (e.g., 'src/order.py::Order::calculate#L10-L15') params: Refactoring-specific parameters
Returns: TOON-formatted string with results of the applied refactoring.
Example: apply_refactoring( refactoring="rename-method", target="src/order.py::Order::calc_total", params={"new_name": "calculate_total"} )
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| refactoring | Yes | ||
| target | Yes | ||
| params | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |