TUI provider management dialogs - model picker, model manager, provider router. Config I/O and data helpers live in tui/config.clj.
The channel-neutral brain — status probing, limits, live model
catalogs, presets, persistence shapes — lives in
com.blockether.vis.internal.providers (exposed through vis.core)
and can be SHARED across channels. This namespace owns only the
lanterna interaction layer.
ALL provider OAuth is driven ENTIRELY through the gateway —
Anthropic + Codex over browser/PKCE, GitHub Copilot over device code —
via /v1/providers/:id/auth/{start,complete,poll,cancel} and /logout.
The TUI therefore needs NO provider extension on its own classpath, holds
no credential secret at any moment, and behaves identically when attached
to a gateway on another machine.
TUI provider management dialogs - model picker, model manager, provider router.
Config I/O and data helpers live in tui/config.clj.
The channel-neutral brain — status probing, limits, live model
catalogs, presets, persistence shapes — lives in
`com.blockether.vis.internal.providers` (exposed through `vis.core`)
and can be SHARED across channels. This namespace owns only the
lanterna interaction layer.
ALL provider OAuth is driven ENTIRELY through the gateway —
Anthropic + Codex over browser/PKCE, GitHub Copilot over device code —
via `/v1/providers/:id/auth/{start,complete,poll,cancel}` and `/logout`.
The TUI therefore needs NO provider extension on its own classpath, holds
no credential secret at any moment, and behaves identically when attached
to a gateway on another machine.(auth-provider-items)One row per auth-capable provider, labelled with its GATEWAY auth verdict.
The N status probes fan out onto worker futures and are joined once, so opening the dialog costs one round trip of latency instead of N serialized blocking gateway calls on the UI thread.
One row per auth-capable provider, labelled with its GATEWAY auth verdict. The N status probes fan out onto worker futures and are joined once, so opening the dialog costs one round trip of latency instead of N serialized blocking gateway calls on the UI thread.
(authenticate-provider! screen provider)(authenticate-provider! screen provider force?)The ONE auth entry point for every channel action (auth dialog, provider
manager, add-provider). EVERY kind goes through the gateway: device for
GitHub Copilot, PKCE for Codex/Anthropic, api-key for everything else.
No provider credential is ever exchanged or written in the TUI process.
The ONE auth entry point for every channel action (auth dialog, provider manager, add-provider). EVERY kind goes through the gateway: device for GitHub Copilot, PKCE for Codex/Anthropic, `api-key` for everything else. No provider credential is ever exchanged or written in the TUI process.
(provider-action-items provider)(provider-action-items provider status)(provider-action-items provider status is-fallback)(provider-action-items provider status is-fallback is-default)Actions for one provider row.
is-fallback (the row already carries the FALLBACK tag) is what adds
:clear-fallback; is-default (the row holds the PRIMARY tag) is what
REMOVES :fallback. The daemon refuses a fallback naming the primary's own
provider, so offering that action on the primary's card is a guaranteed
rejection dialog — the web settings panel disables the same button for the
same reason. Pass both values to the painter and the key handler or the two
menus disagree.
Actions for one provider row. `is-fallback` (the row already carries the FALLBACK tag) is what adds `:clear-fallback`; `is-default` (the row holds the PRIMARY tag) is what REMOVES `:fallback`. The daemon refuses a fallback naming the primary's own provider, so offering that action on the primary's card is a guaranteed rejection dialog — the web settings panel disables the same button for the same reason. Pass both values to the painter and the key handler or the two menus disagree.
(show-provider-dialog! screen)(show-provider-dialog! screen current-config)(show-provider-dialog! screen current-config _opts)Provider manager dialog. Esc saves and closes. Provider order has no routing semantics; choose exactly one default provider/model pair.
Provider manager dialog. Esc saves and closes. Provider order has no routing semantics; choose exactly one default provider/model pair.
(show-provider-status! screen provider)(show-provider-status! screen provider status limits)Status + limits as the RICH canonical markdown form, painted through the IR walker — the same report the web renders as markdown. The fallback arity fetches diagnostics through the gateway, never through local provider OAuth.
Status + limits as the RICH canonical markdown form, painted through the IR walker — the same report the web renders as markdown. The fallback arity fetches diagnostics through the gateway, never through local provider OAuth.
(show-welcome! screen)First-run welcome screen. The single primary action (Enter) drops straight
into the provider picker; ? explains how the key is used; Esc quits.
Returns {:providers [cfg]} once a provider is added, or nil if the user
quits without connecting one.
First-run welcome screen. The single primary action (Enter) drops straight
into the provider picker; `?` explains how the key is used; Esc quits.
Returns `{:providers [cfg]}` once a provider is added, or nil if the user
quits without connecting one.cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |