OpenClawDashboard/bridge
Manohar Gupta 6621c6b28b feat(chat): server-side persistence via SQLite
Chat history now survives hard refresh, tab close, and multi-device use.

Schema:
  chat_messages(id, session_id, role, content, meta, created_at)
  + index on (session_id, created_at DESC)

Bridge endpoints:
  POST   /tiger/chat          — unchanged externally, now persists
                                user + agent messages alongside the
                                existing LLM dispatch
  GET    /tiger/chat/history  — ?sessionId=X&limit=200 → ordered messages
  DELETE /tiger/chat/history  — ?sessionId=X → wipe history

Dashboard:
  /api/chat/history           — proxy route, bridge token stays server-side
  contexts/chat-context.tsx   — ChatProvider hydrates messages from the
                                history endpoint on mount; clearChat()
                                now also hits DELETE /api/chat/history

Design: single-session model for now (DEFAULT_SESSION_ID constant matches
the openclaw agent --session-id used by the dispatch call). Multi-session
support would require session UI + session-aware routing — deferred to a
later feature sprint.

Tradeoff noted: message data is duplicated between our SQLite and whatever
state OpenClaw keeps internally. Chose duplication over coupling — if
OpenClaw session semantics change, dashboard history remains intact.
2026-04-18 19:10:47 +00:00
..
src feat(chat): server-side persistence via SQLite 2026-04-18 19:10:47 +00:00
.gitignore feat: complete Tiger dashboard implementation 2026-04-12 23:27:51 +05:30
package.json feat: complete Tiger dashboard implementation 2026-04-12 23:27:51 +05:30
tsconfig.json feat: complete Tiger dashboard implementation 2026-04-12 23:27:51 +05:30