Commit graph

3 commits

Author SHA1 Message Date
Manohar
0970160f29 feat(dashboard): chat-context streaming, telegram thread card, digest/sidebar tweaks, file-tasks route 2026-06-05 19:49:23 +00:00
76620da6b2 chore: save working state before bind-mount setup (pre tiger write access) 2026-04-25 20:05:51 +00:00
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