Commit 441ebb4
committed
fix(providers): auto-poll and refresh button so local provider models appear without a full reload
When Hecate starts before Ollama / LM Studio the first discovery attempt
fails (connection refused), caches that failure for 30 s, and the UI
has no way to pick up the result once the local server comes up — the
dashboard only loads once on page open.
Two fixes:
- ProvidersView mounts a 30 s setInterval that calls a new lightweight
refreshProviders action (/admin/providers + /v1/models only, not the
full loadDashboard). Models appear automatically within one poll cycle
after the local server starts, matching the backend's
capabilitiesLocalFailureTTL.
- A "Refresh" button in the providers header lets the operator trigger
an immediate re-discovery without navigating away. The button shows
"Refreshing…" and is disabled while the fetch is in flight.1 parent 89fb04d commit 441ebb4
3 files changed
Lines changed: 49 additions & 2 deletions
File tree
- ui/src
- app
- features/providers
- test
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
385 | 385 | | |
386 | 386 | | |
387 | 387 | | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
388 | 406 | | |
389 | 407 | | |
390 | 408 | | |
| |||
1172 | 1190 | | |
1173 | 1191 | | |
1174 | 1192 | | |
| 1193 | + | |
1175 | 1194 | | |
1176 | 1195 | | |
1177 | 1196 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
38 | 43 | | |
39 | 44 | | |
40 | 45 | | |
41 | 46 | | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
42 | 57 | | |
43 | 58 | | |
44 | 59 | | |
| |||
242 | 257 | | |
243 | 258 | | |
244 | 259 | | |
245 | | - | |
| 260 | + | |
246 | 261 | | |
247 | 262 | | |
248 | 263 | | |
249 | 264 | | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
250 | 277 | | |
251 | 278 | | |
252 | 279 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
| 119 | + | |
119 | 120 | | |
120 | 121 | | |
121 | 122 | | |
| |||
0 commit comments