Skip to content

feat(app): export session as json from ui - #40781

Merged
Hona merged 3 commits into
anomalyco:devfrom
Hona:export-session-json
Aug 6, 2026
Merged

feat(app): export session as json from ui#40781
Hona merged 3 commits into
anomalyco:devfrom
Hona:export-session-json

Conversation

@Hona

@Hona Hona commented Aug 6, 2026

Copy link
Copy Markdown
Member

Adds the ability to export the full session transcript as a JSON file directly from the UI:

  • Added Export... option to the 3-dot session dropdown menu
  • Added Export session action button in the Context tab
  • Added session.export command palette action (/export)

@Hona
Hona requested a review from Brendonovich as a code owner August 6, 2026 01:25
Copilot AI lite review requested due to automatic review settings August 6, 2026 01:25

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds UI-driven export of a session’s full transcript as a JSON file, wiring the export action into multiple session entry points in the app.

Changes:

  • Introduces session-export utilities to build export payloads, generate a safe filename, and trigger a JSON download.
  • Adds an export command palette action (/export) and UI entry points (session menus + Context tab action).
  • Adds i18n strings and unit tests for filename/payload construction.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
packages/app/src/utils/session-export.ts New helpers to build session export data, derive filename, and download JSON
packages/app/src/utils/session-export.test.ts Tests for export filename generation and export payload shape
packages/app/src/pages/session/use-session-commands.tsx Adds session.export command and export handler
packages/app/src/pages/session/timeline/message-timeline.tsx Adds “Export…” option in session dropdown menus and export handler
packages/app/src/i18n/en.ts Adds command/context/toast strings for session export
packages/app/src/components/session/session-context-tab.tsx Adds “Export session” action button in Context tab

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

import { createSessionTabs } from "@/pages/session/helpers"
import { extractPromptFromParts } from "@/utils/prompt"
import { UserMessage } from "@opencode-ai/sdk/v2"
import { Message, Part, UserMessage } from "@opencode-ai/sdk/v2"
@Hona
Hona merged commit f1adabc into anomalyco:dev Aug 6, 2026
8 checks passed
charlesverge pushed a commit to charlesverge/opencode that referenced this pull request Aug 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants