Open
Description
Describe the need of your request
When selecting an indented function, such as a class method, and requesting a change through the chat, the returned implementation lacks the original indentation. This leads to two main issues:
- The diff view under
Diff Selection
highlights the entire function as changed, even if only a small part was actually modified, due to indentation differences. - Using
Insert at Caret
results in an incorrectly indented function, which requires manual adjustment and interrupts the workflow.
Proposed solution
Ensure that the returned code preserves the original indentation level of the selected function. This would allow for accurate diffs and proper insertion at the correct indentation level, reducing friction during iterative development within nested scopes.
Additional context
No response