ai: the AI nav page — Manage tab (model catalog, settings, service)

New AI nav item and /ai route with Chat and Manage tabs (Chat is a
placeholder until the SSE chat lands).  The Manage tab mirrors the
Map/Zim download UX: the model catalog with the RAM-based tier
recommendation and a Pi 4 performance hint, downloads through the
download manager (progress on the Downloads page), active-model
select, enable toggle, idle-unload minutes, and llama-server
start/stop through the Controller (compose service name in docker,
systemd unit natively).  AiModelRow is in the theme-sample gallery.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Roland 2026-08-25 21:56:36 -06:00
parent 682481b0b7
commit 15552c2da7
No known key found for this signature in database
GPG key ID: 1BA620CE6C9A4680
7 changed files with 381 additions and 0 deletions

View file

@ -44,6 +44,7 @@ import {
} from './ui';
import {paletteColorNames} from '../themes/mantine';
import {contrastingColor} from './Common';
import {AiModelRow} from './Ai';
import {navBarStyle, navColorNames, useNavColors} from '../themes/navColors';
import {IconMenu2} from '@tabler/icons-react';
@ -694,6 +695,32 @@ export function ThemeSamplePage() {
</Table>
</Section>
<Section label='AI model catalog'>
{/* The real AiModelRow from the AI page's Manage tab, in both of its states. */}
<Table>
<Table.Header>
<Table.Row>
<Table.HeaderCell>Model</Table.HeaderCell>
<Table.HeaderCell>Tier</Table.HeaderCell>
<Table.HeaderCell>Size</Table.HeaderCell>
<Table.HeaderCell/>
</Table.Row>
</Table.Header>
<Table.Body>
<AiModelRow model={{
name: 'Qwen3-1.7B-Q4_K_M.gguf', tier: 'small', size: 1_200_000_000,
description: 'The default assistant for 4GB devices (Pi 4/5).',
downloaded: true, active: true,
}} onDownload={() => {}}/>
<AiModelRow model={{
name: 'Qwen3-4B-Instruct-2507-Q4_K_M.gguf', tier: 'medium', size: 2_600_000_000,
description: 'The default assistant for 8GB+ devices.',
downloaded: false, active: false,
}} onDownload={() => {}}/>
</Table.Body>
</Table>
</Section>
<Section label='Form controls'>
<Panel>
<div style={{display: 'grid', gridTemplateColumns: '2fr 1fr 1fr', gap: 12}}>