feat(app): export session as json from ui - #40781
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
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-exportutilities 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" |
charlesverge
pushed a commit
to charlesverge/opencode
that referenced
this pull request
Aug 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds the ability to export the full session transcript as a JSON file directly from the UI:
Export...option to the 3-dot session dropdown menuExport sessionaction button in the Context tabsession.exportcommand palette action (/export)