Three major features for the LLM playground module:
1. Chat history persistence — conversations and messages are saved to
IndexedDB (encrypted at rest), survive page reload, and sync via
mana-sync. Sidebar shows conversation list with load/delete. Auto-
titles from first user message. Lazy conversation creation on first
send.
2. Token/usage display — llm.ts now yields a StreamChunk union type
(delta | usage). Token counts (prompt + completion) are shown beneath
each assistant message and persisted per message record.
3. Model comparison — toggle comparison mode in the config bar, select
2-4 models, and see responses streamed side-by-side in a CSS grid.
Each comparison round is tied by a comparisonGroupId. All streams
have independent AbortControllers. Follow-up messages use the first
model's response as conversation context.
New files: stores/conversations.svelte.ts
New tables: playgroundConversations, playgroundMessages (encrypted)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>