mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-15 17:00:59 +00:00
fix(coding-agent): handle scoped models after logout (#1194)
This commit is contained in:
parent
fe534b2200
commit
f7c03ef6a2
3 changed files with 37 additions and 15 deletions
|
|
@ -155,11 +155,14 @@ export class ScopedModelsSelectorComponent extends Container implements Focusabl
|
|||
}
|
||||
|
||||
private buildItems(): ModelItem[] {
|
||||
return getSortedIds(this.enabledIds, this.allIds).map((id) => ({
|
||||
fullId: id,
|
||||
model: this.modelsById.get(id)!,
|
||||
enabled: isEnabled(this.enabledIds, id),
|
||||
}));
|
||||
// Filter out IDs that no longer have a corresponding model (e.g., after logout)
|
||||
return getSortedIds(this.enabledIds, this.allIds)
|
||||
.filter((id) => this.modelsById.has(id))
|
||||
.map((id) => ({
|
||||
fullId: id,
|
||||
model: this.modelsById.get(id)!,
|
||||
enabled: isEnabled(this.enabledIds, id),
|
||||
}));
|
||||
}
|
||||
|
||||
private getFooterText(): string {
|
||||
|
|
|
|||
|
|
@ -3261,6 +3261,8 @@ export class InteractiveMode {
|
|||
// All enabled or none enabled = no filter
|
||||
this.session.setScopedModels([]);
|
||||
}
|
||||
await this.updateAvailableProviderCount();
|
||||
this.ui.requestRender();
|
||||
};
|
||||
|
||||
this.showSelector((done) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue