Changeset 0.10.1 (#57)

This commit is contained in:
2026-02-24 16:51:08 +00:00
parent ea03f956ca
commit 13772ebd6c
11 changed files with 472 additions and 159 deletions

View File

@@ -2,6 +2,50 @@
All notable changes to Chat Switchboard.
## [0.10.1] — 2026-02-24
### Added
- **Admin System Prompt** — Global system prompt configured in Admin Settings.
Injected as the first system message in every conversation, before user/preset
system prompts. Users cannot override or disable it. Stored in
`global_settings['system_prompt']`.
- **Personas tab** — User presets moved from the Models tab to their own
"Personas" tab in Settings. Tab is hidden when admin disables user presets
(`allow_user_personas` policy).
- **Team Management modal** — Team admin functionality extracted from Settings
into its own tabbed modal (Members, Providers, Presets, Usage, Activity).
Accessed via "Team Management" flyout menu item, or "Manage →" on team cards
in Settings. Multi-team admins see a picker first; single-team admins go
straight to the tabbed view. Back arrow in header returns to picker.
- **Preview pane: clear button** — Trash icon in the preview header resets the
iframe and shows the empty hint. Also auto-clears when deleting a chat that
had active preview content.
- **Preview/Notes pane: fullscreen** — Expand button in the header toggles
fullscreen mode (panel fills entire viewport width).
- **Preview/Notes pane: resizable** — Drag the left edge of the side panel
to resize (280px70vw). Width resets on close.
- **Code block: download** — "Download" button on every code block. Infers
file extension from language tag (e.g. `python``.py`, `go``.go`).
### Changed
- **Personal Usage scoped to BYOK** — `GET /usage` and the user Usage tab now
only show consumption against personal (BYOK) providers. Global provider
usage is the org's cost, not the user's. New `QueryByUserPersonal` store
method filters on `scope = 'personal' AND owner_id = user_id`. Admin usage
views remain unaffected. Usage tab hidden when admin disables user providers
(`allow_user_byok` policy).
- **OpenAI streaming usage race** — Deferred the Done event until the usage
chunk arrives. Previously, finish_reason fired Done before the usage chunk
(which has `choices: []`), so streaming token counts were always 0 for all
OpenAI-compatible providers.
### Fixed
- **Usage logging zero-token guard** — Removed early exit in `logUsage` that
suppressed rows when tokens were 0. Combined with the streaming race above,
this meant no streaming usage was ever recorded.
- **Live chat completion test** — `TestLive_VeniceChatCompletion` sent wrong
field names (`messages`/`config_id` instead of `content`/`provider_config_id`).
## [0.10.0] — 2026-02-24
### Added