extract_function
Extract a contiguous block of lines into a new helper function. Detects parameters and call site using brace-counting and regex. Set dry_run=false to write 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 | ||
| dry_run | No | ||
| line_end | Yes | ||
| new_name | Yes | ||
| line_start | Yes | ||
| return_type | No | void | |
| target_file | No |