Add preset store with three built-in presets (Strict mode, Research only, Full access) and localStorage persistence for custom presets. Integrate preset selector into ConfigSidebar with load, save, and delete actions. Built-in presets cannot be deleted. Closes #14 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1.5 KiB
1.5 KiB
Issue #14: Preset configurations
Status: COMPLETED
Issue: #14
Branch: feature/issue-14-preset-configs
Acceptance Criteria
- Save current config as a named preset
- Load preset from a list
- Delete custom presets
- 2-3 built-in default presets shipped:
- "Strict mode" — no overrides, restricted tools (FS Write, Run Shell, Run Code, Package Install disabled)
- "Research only" — limited tool set for read-only operations (Memory Write, FS Write, Run Code, Run Shell, Package Install disabled)
- "Full access" — all overrides relaxed (OverrideLevel.ALL), no tools disabled
- Presets persisted in localStorage
- Built-in presets cannot be deleted
Implementation
New Files
src/lib/stores/presets.svelte.ts— preset store with built-in presets and localStorage persistence for custom presets
Modified Files
src/lib/components/ConfigSidebar.svelte— added preset selector section at the top with load, save, and delete functionality
Key Decisions
- Built-in presets are hardcoded constants, not stored in localStorage
- Custom presets stored under
llm-multiverse-presetslocalStorage key - Overwriting a custom preset with the same name is allowed; overwriting built-in presets is not
- Preset config uses a plain interface (
PresetConfig) rather than protobuf types for clean serialization - Preset section placed at the top of the sidebar before Override Level, matching the issue instructions