Extract Function
extractFunctionExtract a selected code range into a new function with automatic parameter and return type detection. Get rename locations for meaningful naming.
Instructions
Extract the selected code range into a new function. TypeScript auto-detects parameters and return type. The response includes renameFilename/renameLocation so you can follow up with rename_symbol to give the function a meaningful name.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | File path (absolute or relative to cwd) | |
| endLine | Yes | 1-based end line | |
| preview | Yes | If true, only preview changes | |
| endOffset | Yes | 1-based end character offset | |
| startLine | Yes | 1-based start line | |
| startOffset | Yes | 1-based start character offset |