free-coding-models 0.5.87 → 0.5.89

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -21,6 +21,7 @@
21
21
 
22
22
  import { buildCliHelpLines } from './cli-help.js'
23
23
  import { renderRouterDashboard as renderRouterDashboardOverlay } from '../core/router-dashboard.js'
24
+ import { renderRouterV2Dashboard as renderRouterV2DashboardOverlay } from '../core/router-v2/tui-dashboard.js'
24
25
  import { renderPlayground as renderPlaygroundOverlay } from '../core/playground.js'
25
26
  import { themeColors, getThemeStatusLabel, getProviderRgb } from './theme.js'
26
27
  import { getProviderBillingNote, getProviderLabelWithBilling } from '../core/provider-metadata.js'
@@ -1016,6 +1017,8 @@ export function createOverlayRenderers(state, deps) {
1016
1017
  lines.push(` ${key('Ctrl+P')} Open ⚡️ command palette ${hint('(search and run actions quickly)')}`)
1017
1018
  lines.push(` ${key('Ctrl+A')} AI Speed Test ${hint('(benchmark selected model → time + TPS)')}`)
1018
1019
  lines.push(` ${key('Ctrl+U')} Global AI Speed Test ${hint('(benchmark all models; Settings can auto-run it on startup)')}`)
1020
+ lines.push(` ${key('Ctrl+T')} Test selected model via Router v2 ${hint('(real request through the daemon: gate + failover included)')}`)
1021
+ lines.push(` ${key('Ctrl+Shift+T')} Test all visible models via Router v2 ${hint('(results stream into the Shift+V dashboard)')}`)
1019
1022
  lines.push(` ${key('Shift+P')} Re-probe failed rows ${hint('(retry only rows showing auth fail / 429 / 404 / timeout - not the whole list)')}`)
1020
1023
  lines.push(` ${key('Ctrl+Shift+P')} Probe All Models ${hint('(test all configured models; auto-hide broken 404/410)')}`)
1021
1024
  lines.push(` ${key('Space')} Expand selected row ${hint('(2-line detail: provider, endpoint, full model id; Space again or move to collapse)')}`)
@@ -1413,6 +1416,12 @@ export function createOverlayRenderers(state, deps) {
1413
1416
  return renderRouterDashboardOverlay(state, { LOCAL_VERSION })
1414
1417
  }
1415
1418
 
1419
+ // 📖 Router v2 (BETA) overlay (Shift+V): hardened failover daemon view with
1420
+ // request chains, DEGRADED states and pinned-model tests through the router.
1421
+ function renderRouterV2Dashboard() {
1422
+ return renderRouterV2DashboardOverlay(state, { LOCAL_VERSION })
1423
+ }
1424
+
1416
1425
  // ─── Playground overlay ───────────────────────────────────────────────────────
1417
1426
  // 📖 Renders the in-TUI chat playground when the user presses `;` or opens
1418
1427
  // 📖 it from the command palette. All chat traffic flows to the local
@@ -1648,6 +1657,7 @@ export function createOverlayRenderers(state, deps) {
1648
1657
  renderChangelog,
1649
1658
  renderInstalledModels,
1650
1659
  renderRouterDashboard,
1660
+ renderRouterV2Dashboard,
1651
1661
  renderPlayground,
1652
1662
  renderIncompatibleFallback,
1653
1663
  renderTokenUsage,
@@ -292,6 +292,28 @@ export function createTuiState({
292
292
  routerDashboardEverOpened: false,
293
293
  routerDashboardCursorIndex: 0,
294
294
 
295
+ // 📖 Router v2 (BETA) dashboard overlay (Shift+V). Talks to the parallel
296
+ // v2 daemon on port 19380: same defensive polling shape as v1 plus
297
+ // pinned-model test results and the persisted request-chain history.
298
+ routerV2DashboardOpen: false,
299
+ routerV2Status: 'idle',
300
+ routerV2BaseUrl: null,
301
+ routerV2Port: null,
302
+ routerV2Health: null,
303
+ routerV2Stats: null,
304
+ routerV2History: null,
305
+ routerV2Error: null,
306
+ routerV2ScrollOffset: 0,
307
+ routerV2CursorIndex: 0,
308
+ routerV2PollTimer: null,
309
+ routerV2EventAbort: null,
310
+ routerV2Notice: null,
311
+ routerV2NoticeTimer: null,
312
+ routerV2TestResults: new Map(),
313
+ routerV2TestRunning: new Set(),
314
+ routerV2BatchTest: null,
315
+ routerV2LastEventAt: null,
316
+
295
317
  // 📖 Custom text filter (Ctrl+P → type text → Enter). Ephemeral — not saved to config.
296
318
  customTextFilter: null,
297
319