Files
llm-multiverse-ui/implementation-plans/issue-016.md
2026-03-12 12:33:48 +01:00

38 lines
2.1 KiB
Markdown

---
---
# Issue #16: Memory candidates viewer
**Status:** COMPLETED
**Issue:** https://git.shahondin1624.de/llm-multiverse/llm-multiverse-ui/issues/16
**Branch:** `feature/issue-16-memory-viewer`
## Acceptance Criteria
- [x] Dedicated `/memory` route
- [x] List of `MemoryCandidate` entries
- [x] Each entry shows: content, source badge, confidence score
- [x] Entries grouped by session
- [x] Confidence score visualized (progress bar with color-coding)
- [x] Filterable by source or confidence threshold
## Implementation
### New Files
- `src/lib/stores/memory.svelte.ts` — reactive store for memory candidates grouped by session ID, with localStorage persistence, sample/demo data, and `addCandidates()` / `getAllBySession()` / `clearSession()` API
- `src/lib/components/MemoryCandidateCard.svelte` — card component displaying a single memory candidate with content, color-coded source badge (Tool Output=blue, Model Knowledge=purple, Web=green, Unspecified=gray), and horizontal confidence progress bar with percentage
- `src/routes/memory/+page.svelte` — dedicated memory route with session-grouped layout, source dropdown filter, confidence threshold slider, empty state, and back-to-chat link
- `src/routes/memory/+page.ts` — SSR disabled for this route
### Modified Files
- `src/routes/+page.svelte` — added Memory Candidates navigation link on the home page
- `src/routes/chat/+page.svelte` — added Memory link in the header next to Lineage; wired up capture of `finalResult.newMemoryCandidates` into the memory store
### Key Decisions
- Uses sample/demo data seeded into localStorage on first load, since the orchestrator doesn't currently include memory candidates in typical responses
- `StoredMemoryCandidate` type decouples the UI store from protobuf Message dependency (same pattern as lineage's `SimpleAgentIdentifier`)
- Confidence bar color-coded: green (>=80%), amber (>=50%), red (<50%)
- Source badge colors match the project's existing badge conventions (blue, purple, green, gray)
- Grid layout (1-3 columns responsive) for candidate cards within each session group
- Filter controls use a source dropdown and a range slider for confidence threshold