feat(tui): implement live model fetching and enhance model selection menus
This commit is contained in:
@@ -165,5 +165,16 @@ export async function runTui(): Promise<void> {
|
||||
sessionId: state.sessionId,
|
||||
} as Record<string, unknown>;
|
||||
|
||||
// Prime the /models list in the background so /model shows live models
|
||||
// instead of a hardcoded catalog; the menu falls back until it lands.
|
||||
if (runtime.listModels) {
|
||||
void runtime.listModels().then((models) => {
|
||||
if (models.length > 0) {
|
||||
state.misc.availableModels = models;
|
||||
state.dirty = true;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
await bootTui(state);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user