This pull request extracts a separate `Codegen` struct that models the interaction with OpenAI and takes care of diffing, auto-indenting and reporting regions to highlight. As part of this refactoring, we're now relying less on the AI model to indent code. The new logic lets tree-sitter decide how the first line should be indented. Then, for every subsequent line reported by ChatGPT, it calculates an indent delta relative to the first reported line and applies it to the indent level chosen by tree-sitter. Release Notes: - Improved auto-indentation when using the inline assistant.
7 files changedLine totals unavailable