-
Playground conversations + post-add model picker (#944)
发布于
2026-08-20 21:06:48 +00:00 - Playground conversations + post-add model picker
Two dashboard features:
Persistent Playground conversations. New playground_conversations table
(migration 20260820_000001) and /api/conversations CRUD behind the
dashboard session gate; a collapsible sidebar lists conversations with
auto-titles (first user message, 40 chars) and relative times, with
inline rename and confirm-to-delete. Transcripts save at exchange end
(never per stream delta), including per-message routing meta, reasoning
traces, and error bubbles; Clear starts a new conversation and keeps
the old one. Active conversation id is remembered across reloads.
Transcripts are capped at 2 MB with an honest 413.Model picker after adding a key. When a newly added provider key's
platform has six or more catalog models, a dialog offers checkboxes to
limit which models the key serves — saved as ONE PATCH to the existing
modelScope field. Everything-selected saves nothing (scope stays null,
so future catalog models keep flowing); Confirm is disabled on an empty
selection because an empty scope would mean "serve everything". Small
catalogs, keyless gateways, and bulk imports skip the dialog. No new
server surface.24 new i18n keys translated across all 60 locales (check:i18n: 856
keys). Verified in headless Chromium end to end: transcripts survive
reload, switching restores model + system prompt, streaming and
scroll-follow unregressed.Co-Authored-By: Claude Fable 5 noreply@anthropic.com
- Full-bleed three-column Playground with a settings rail
The Playground becomes three edge-to-edge columns: conversations on the
left, the chat in the middle, and a new collapsible settings rail on the
right holding the model picker, the system prompt, and new sampling
controls (temperature, top_p, max_tokens — sliders/input with per-knob
on/off switches; only enabled knobs are sent, values persist in
localStorage and survive toggling off). Below lg both rails start
collapsed so the chat keeps the width.Full-bleed is route-scoped: a PageContainer in App.tsx keeps every other
page's container classes byte-identical and lets /playground fill the
viewport under the nav without hardcoded heights.New client/src/lib/playground-sampling.ts (pure clamp/serialize/request
assembly, 17 tests); ranges mirror the server's zod bounds exactly.
8 new i18n keys translated across all 60 locales (864 total).
Streaming, scroll-follow, conversations, attachments, and fusion are
unregressed — both browser e2e suites pass on the new layout.Co-Authored-By: Claude Fable 5 noreply@anthropic.com
- Drop the New badge from the fusion picker entry
Co-Authored-By: Claude Fable 5 noreply@anthropic.com
Co-authored-by: Claude Fable 5 noreply@anthropic.com
下载附件