extract_function
Extracts a selected block of code into a new helper function by detecting parameters with regex, and returns the call site. Use dry_run=false to apply changes.
Instructions
Extract a contiguous block of lines into a new helper function.
Brace-counting + regex param detection — not a full AST parser. Returns the
proposed helper, call site, and parameter list. Set dry_run=False to write.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| source | Yes | ||
| line_start | Yes | ||
| line_end | Yes | ||
| new_name | Yes | ||
| return_type | No | void | |
| target_file | No | ||
| dry_run | No |