new aii local model

This commit is contained in:
k
2026-09-24 11:19:26 +02:00
parent 796a883d70
commit 562ab5191f
9 changed files with 364 additions and 76 deletions
+9 -1
View File
@@ -82,10 +82,18 @@ No router library — a tiny history wrapper (`lib/route.ts`: `navigate()`,
copy button and dependency-free syntax highlighting (`lib/highlight.tsx` —
regex tokenizer, no highlight.js, so the Nix offline lockfile is untouched).
- Admin Center tabs are deep-linkable (`/admin`, `/admin/models`,
`/admin/access`, … — `lib/route.ts` `adminTabFromPath`, SPA fallback serves
`/admin/stats`, `/admin/access`, … — `lib/route.ts` `adminTabFromPath`, SPA fallback serves
them all). Models tab: `OllamaNodes.tsx` (pool with weights, per-node live
status + 1h–30d load charts, generation timeout) and `OllamaCatalog.tsx`
(live Hugging Face GGUF search + one-click `hf.co/…` pull to a node).
Stats tab: `StatsSection.tsx` (node/window pickers, bar/area/line dock, SVG
tooltips, platform host cards).
- Accent color (`lib/accent.ts`) derives the 50–950 ramp from one hex and
also repaints the SVG favicon (data URL) so the tab icon matches the dress.
- Voice (`lib/voice.ts`, no dependency): `Chat.tsx` composer mic with live
waveform + speech-recognition transcript (editable before send), per-bubble
TTS playback with glow, `Settings → Voice` prefs (voice/lang/speed/pitch,
localStorage), admin-editable preview lines.
## Theming
+38 -8
View File
@@ -84,14 +84,16 @@ Notes:
## Admin Center (`/admin`) & self-registration
The sidebar **Admin Center** button (admin only) opens the `/admin` page with
six deep-linkable tabs (`/admin` = accounts, `/admin/models`, `/admin/access`,
`/admin/reports`, `/admin/features`, `/admin/mail`): **Accounts** (same
manager as before), **Access** (access-request wishlist triage, see below),
**Reports**, **Models** (node pool, per-model policy, Ollama library + HF
catalog), **Features** (server-side switches), **Mail** (SMTP credentials
viewer + connectivity tester: `GET /api/admin/mail`,
`POST /api/admin/mail/verify`, `POST /api/admin/mail/test`, admin Bearer
only — plus the password-recovery rate limits below).
seven deep-linkable tabs (`/admin` = accounts, `/admin/models`,
`/admin/stats`, `/admin/access`, `/admin/reports`, `/admin/features`,
`/admin/mail`): **Accounts** (same manager as before), **Access**
(access-request wishlist triage, see below), **Reports**, **Models** (node
pool, per-model policy, Ollama library + HF catalog), **Stats** (pool load
charts + platform host facts, see below), **Features** (server-side
switches + voice-preview lines), **Mail** (SMTP credentials viewer +
connectivity tester: `GET /api/admin/mail`, `POST /api/admin/mail/verify`,
`POST /api/admin/mail/test`, admin Bearer only — plus the password-recovery
rate limits below).
- `registration_enabled` (default off): when on, the login page shows a
working **Register** button — anyone can create an account (key shown once)
@@ -173,6 +175,34 @@ invalidate the model list cache; `listModels` merges tags across nodes.
`GET …/nodes/:id/stats?window=1h|6h|24h|7d|30d`,
`GET /api/admin/ollama/probe?host=…`.
## Telemetry sub-page (`/admin/stats`) + platform facts
The **Stats** tab is the pool observatory: node picker, window picker
(1h / 6h / 24h / 7d / 30d), chart-type dock (bar / area / line SVG charts
with hover tooltips: requests, errors, avg latency, tokens), totals tiles,
and a latency underlay. Below, **platform host facts** for this server —
hostname, kernel, arch/CPU, app + system uptime, load average, memory bar,
runtime, network interfaces/IPs (`GET /api/admin/platform`, admin only).
Disk meters are intentionally absent (models live on the Ollama hosts).
## Voice: dictation + playback
- **Composer mic** (browser speech recognition — Chrome/Edge): records with
a live gradient waveform, timer and live transcript; **Stop** drops the
transcript into the composer, editable before sending; **Discard** throws
it away. Unsupported browsers get a disabled mic with an explanatory
tooltip. No audio leaves the browser (no server STT endpoint yet —
whisper.cpp via `WHISPER_BIN` is the documented next step).
- **Message playback**: every assistant bubble has a Listen button
(speechSynthesis, Siri-style breathing glow while speaking, click again to
stop; playback stops on send / new message / conversation switch).
- **Settings → Voice** (per browser, localStorage): language (auto-detect
per message via `detectLang`, or forced), voice picker grouped by locale,
speed, pitch, and one-tap previews of the admin-set lines.
- **Admin Center → Features → Voice previews**: the default playback lines
(`voice_previews` setting, 1–6 lines; empty list resets to the built-ins),
also served to users via `GET /api/tools`.
## Personal providers (BYOK)
Users can connect their own `OpenAI` / `Anthropic` / `DeepSeek` / `Gemini`