[Matrix] Chat History Persistence (localStorage per agent) #60
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What & Why
Agent chat messages live only in memory and are lost on every page reload. For the Matrix to function as a real command center, operators need conversation continuity — especially for Timmy as primary orchestrator. All agents should retain their last 100 messages across sessions.
Done looks like
Out of scope
Tasks
loadChatHistory(agentId)andsaveChatHistory(agentId, messages)inui.js. Use localStorage keymatrix:chat:<agentId>. Cap at 100 messages, dropping oldest when over limit.saveChatHistorywhenever a new message is added (both user sends and assistant responses). Add a timestamp field to each message object.selectAgent(), callloadChatHistory(agentId)and pre-populate chat render before mounting live WebSocket listener. Render with existing_addChatMessagestyling.index.html. Wire inui.jsto removematrix:chat:<agentId>from localStorage and clear rendered chat.Relevant files
the-matrix/js/ui.jsthe-matrix/index.htmlthe-matrix/style.css