fix(coding-agent): propagate autocomplete to custom editors (#1372)

setupAutocomplete only sets the provider on defaultEditor. When an
extension customizes the editor via setEditorComponent during
session_start, the custom editor is created before setupAutocomplete
runs, so it never receives the autocomplete provider. This breaks forced
file suggestions, slash commands, and all other completions.

Set the provider on the active editor too when it differs from the
default, covering initial load, reload, and settings changes.
This commit is contained in:
Sviatoslav Abakumov 2026-02-07 18:48:18 +04:00 committed by GitHub
parent 4c2d78f6cb
commit 3cf5e23c0d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -359,6 +359,9 @@ export class InteractiveMode {
fdPath,
);
this.defaultEditor.setAutocompleteProvider(this.autocompleteProvider);
if (this.editor !== this.defaultEditor) {
this.editor.setAutocompleteProvider?.(this.autocompleteProvider);
}
}
async init(): Promise<void> {