[claude] Matrix chat history persistence — localStorage per-agent, 100-msg cap, Clear button (#43) #63

Merged
Rockachopa merged 1 commits from claude/issue-43 into main 2026-03-23 20:40:13 +00:00

1 Commits

Author SHA1 Message Date
Alexander Whitestone
4ae158f950 feat: add Matrix chat history persistence with localStorage
Some checks failed
CI / Typecheck & Lint (pull_request) Failing after 0s
- Implement loadChatHistory(agentId) and saveChatHistory(agentId, messages)
  using localStorage key matrix:chat:<agentId> with 100-msg cap
- Each message stored with timestamp, displayed as [HH:MM] prefix
- appendChatMessage now persists to localStorage on every call
- Restore chat history on page load via renderChatHistory()
- Add clearChatHistory() and "CLEAR HISTORY" button in UI
- Wire websocket.js and session.js chat messages through appendChatMessage
  for persistence of both user sends and assistant responses

Fixes #43

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 21:52:38 -04:00