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

@ -42,6 +42,7 @@ export class FooterDataProvider {
private cachedBranch: string | null | undefined = undefined;
private gitWatcher: FSWatcher | null = null;
private branchChangeCallbacks = new Set<() => void>();
private availableProviderCount = 0;
constructor() {
this.setupGitWatcher();
@ -90,6 +91,16 @@ export class FooterDataProvider {
this.extensionStatuses.clear();
}
/** Number of unique providers with available models (for footer display) */
getAvailableProviderCount(): number {
return this.availableProviderCount;
}
/** Internal: update available provider count */
setAvailableProviderCount(count: number): void {
this.availableProviderCount = count;
}
/** Internal: cleanup */
dispose(): void {
if (this.gitWatcher) {
@ -126,8 +137,8 @@ export class FooterDataProvider {
}
}
/** Read-only view for extensions - excludes setExtensionStatus and dispose */
/** Read-only view for extensions - excludes setExtensionStatus, setAvailableProviderCount and dispose */
export type ReadonlyFooterDataProvider = Pick<
FooterDataProvider,
"getGitBranch" | "getExtensionStatuses" | "onBranchChange"
"getGitBranch" | "getExtensionStatuses" | "getAvailableProviderCount" | "onBranchChange"
>;