diff --git a/tui.tsx b/tui.tsx index 75d6a77..bda7c6f 100644 --- a/tui.tsx +++ b/tui.tsx @@ -280,7 +280,7 @@ const tui: TuiPlugin = async (api) => { bump() } - let llamaServerUrls: string[] = ["http://localhost:8080"] + let llamaServerUrls: string[] = [] let llamaServerModel: string | undefined const pollMetrics = async () => { @@ -508,11 +508,11 @@ const tui: TuiPlugin = async (api) => { }) try { - if (!llamaServerUrls.length) { - llamaServerUrls = await loadConfigUrls(api) - } + const configUrls = await loadConfigUrls(api) + llamaServerUrls = configUrls.length > 0 ? configUrls : ["http://localhost:8080"] } catch (e) { console.error("[oc-ls-stats] loadConfigUrls error:", e) + llamaServerUrls = ["http://localhost:8080"] } api.slots.register({