mirror of
https://git.sync.wtf/troed/oc-ls-stats.git
synced 2026-08-31 09:43:38 +03:00
fix: always load provider URLs from config, fallback to localhost
This commit is contained in:
@@ -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({
|
||||
|
||||
Reference in New Issue
Block a user