feat: /export slash command — export conversation to Markdown #291

Closed
opened 2026-07-12 01:29:23 +02:00 by dries · 0 comments
Owner

Part of OpenCode command parity (transparent-layer goal). OpenCode's TUI has /export to export the current conversation to Markdown. The TUI opens it in $EDITOR; on web the natural equivalent is a download.

Scope

  • Add export to BUILTIN_COMMANDS (frontend/src/lib/commands/builtinCommands.ts).
  • Serialize the session's messages/parts to Markdown and trigger a browser download (session-<title>.md).
  • Prefer server-side rendering if OpenCode's SDK exposes an export; otherwise render client-side from the parts we already display.

Reference

OpenCode docs: https://opencode.ai/docs/tui#export

Notes

$EDITOR path is terminal-only and N/A for web; download is the web-native mapping. Keep formatting close to OpenCode's export so output is portable.

Part of OpenCode command parity (transparent-layer goal). OpenCode's TUI has `/export` to export the current conversation to Markdown. The TUI opens it in $EDITOR; on web the natural equivalent is a **download**. ## Scope - Add `export` to `BUILTIN_COMMANDS` (frontend/src/lib/commands/builtinCommands.ts). - Serialize the session's messages/parts to Markdown and trigger a browser download (`session-<title>.md`). - Prefer server-side rendering if OpenCode's SDK exposes an export; otherwise render client-side from the parts we already display. ## Reference OpenCode docs: https://opencode.ai/docs/tui#export ## Notes $EDITOR path is terminal-only and N/A for web; download is the web-native mapping. Keep formatting close to OpenCode's export so output is portable.
dries closed this issue 2026-07-12 10:10:43 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
dries/ocman#291
No description provided.