Description
There is currently no way to export or download a chat session's history from the dashboard. Users who want to save conversations, share them, or analyze them offline have no built-in option to do so.
This issue is about adding an "Export" or "Download" button to the session/chat view that allows users to download the conversation in JSON format (raw structured data) and/or Markdown format (human-readable).
Where to look
src/components/views/ChatView.tsx — The main chat view component. This is where the export button should be placed, likely in the header area or as a toolbar action. The chat messages are available as chatMessages (array of ChatMessage objects).
src/components/views/SessionDetailView.tsx — The session detail wrapper that renders ChatView. An export button could alternatively be placed in this component's header/toolbar area.
src/types/openclaw.ts — Defines the ChatMessage interface (line ~286) with fields like role, content, timestamp, model, runId, etc. This is the data structure you will be serializing.
src/lib/utils.ts — Good place to add export helper functions (e.g., exportAsJSON(), exportAsMarkdown()).
src/lib/browser-utils.ts — May already contain browser-related utilities; file download logic could go here.
Acceptance criteria
Description
There is currently no way to export or download a chat session's history from the dashboard. Users who want to save conversations, share them, or analyze them offline have no built-in option to do so.
This issue is about adding an "Export" or "Download" button to the session/chat view that allows users to download the conversation in JSON format (raw structured data) and/or Markdown format (human-readable).
Where to look
src/components/views/ChatView.tsx— The main chat view component. This is where the export button should be placed, likely in the header area or as a toolbar action. The chat messages are available aschatMessages(array ofChatMessageobjects).src/components/views/SessionDetailView.tsx— The session detail wrapper that rendersChatView. An export button could alternatively be placed in this component's header/toolbar area.src/types/openclaw.ts— Defines theChatMessageinterface (line ~286) with fields likerole,content,timestamp,model,runId, etc. This is the data structure you will be serializing.src/lib/utils.ts— Good place to add export helper functions (e.g.,exportAsJSON(),exportAsMarkdown()).src/lib/browser-utils.ts— May already contain browser-related utilities; file download logic could go here.Acceptance criteria
## User/## Assistantheaders and readable content)chat-{agentName}-{sessionKey}-{date}.json) and triggers a browser file download