wip: context-meter + model-label UI and provider/inference tweaks
Checkpoint of in-flight work so the orchestrator branch can rebase onto a clean main: ContextBar → ContextMeter, model-label helper, model/agent picker + provider-snapshot/registry changes, inference payload + message-columns. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -34,7 +34,14 @@ export async function fetchLlamaSwapModels(config: Config): Promise<ProviderMode
|
||||
const res = await fetch(`${config.LLAMA_SWAP_URL}/v1/models`);
|
||||
if (!res.ok) return [];
|
||||
const parsed = (await res.json()) as { data?: Array<{ id: string }> };
|
||||
return (parsed.data ?? []).map((m) => ({ id: m.id, label: m.id }));
|
||||
const models = (parsed.data ?? []).map((m) => ({ id: m.id, label: m.id }));
|
||||
// Hoist the configured DEFAULT_MODEL to the front so the BooCoder picker —
|
||||
// which defaults to models[0] (no isDefault on llama-swap entries) — selects
|
||||
// the same model the dispatcher falls back to. Rest keep llama-swap's order.
|
||||
const def = config.DEFAULT_MODEL;
|
||||
const i = models.findIndex((m) => m.id === def);
|
||||
if (i > 0) models.unshift(models.splice(i, 1)[0]!);
|
||||
return models;
|
||||
} catch {
|
||||
return [];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user