Skip to content

Commit 1ce2839

Browse files
committed
Inline the redundant activeModelId wrapper in product-host
1 parent b2d4762 commit 1ce2839

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

src/tui-opentui/product-host.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -550,7 +550,7 @@ export async function mountProductHost(
550550
const { groups } = groupModelsForPicker(currentModels)
551551
const group = groups.get(groupProvider)
552552
if (group !== undefined) {
553-
openLevel(annotateCurrent(group.rows, activeModelId()), openModels)
553+
openLevel(annotateCurrent(group.rows, config.activeModelId?.()), openModels)
554554
}
555555
return
556556
}
@@ -574,11 +574,9 @@ export async function mountProductHost(
574574
})
575575
}
576576

577-
const activeModelId = (): string | undefined => config.activeModelId?.()
578-
579577
openModels = (): void => {
580578
const { top, groups } = groupModelsForPicker(currentModels)
581-
const activeId = activeModelId()
579+
const activeId = config.activeModelId?.()
582580
// The active model's own row already reads "(current)" via annotateCurrent
583581
// below; when it lives inside a provider group, mark the group row too
584582
// so the pick is visible without descending into it.

0 commit comments

Comments
 (0)