This commit is contained in:
Denis Badurina 2026-01-23 15:02:52 +01:00
parent 73734a23a1
commit 09d1b099b7
No known key found for this signature in database
GPG key ID: 839BAEC88E931477
3 changed files with 30 additions and 2 deletions

View file

@ -476,6 +476,9 @@ export class InteractiveMode {
this.footerDataProvider.onBranchChange(() => {
this.ui.requestRender();
});
// Initialize available provider count for footer display
await this.updateAvailableProviderCount();
}
/**
@ -2781,6 +2784,13 @@ export class InteractiveMode {
}
}
/** Update the footer's available provider count from current model candidates */
private async updateAvailableProviderCount(): Promise<void> {
const models = await this.getModelCandidates();
const uniqueProviders = new Set(models.map((m) => m.provider));
this.footerDataProvider.setAvailableProviderCount(uniqueProviders.size);
}
private showModelSelector(initialSearchInput?: string): void {
this.showSelector((done) => {
const selector = new ModelSelectorComponent(
@ -3173,6 +3183,7 @@ export class InteractiveMode {
try {
this.session.modelRegistry.authStorage.logout(providerId);
this.session.modelRegistry.refresh();
await this.updateAvailableProviderCount();
this.showStatus(`Logged out of ${providerName}`);
} catch (error: unknown) {
this.showError(`Logout failed: ${error instanceof Error ? error.message : String(error)}`);
@ -3267,6 +3278,7 @@ export class InteractiveMode {
// Success
restoreEditor();
this.session.modelRegistry.refresh();
await this.updateAvailableProviderCount();
this.showStatus(`Logged in to ${providerName}. Credentials saved to ${getAuthPath()}`);
} catch (error: unknown) {
restoreEditor();