feat(desktop): add markdown format option to session export - #10703
Merged
DOsinga merged 3 commits intoAug 4, 2026
Conversation
Collaborator
|
Merge conflicts! |
DOsinga
enabled auto-merge
August 4, 2026 19:46
DOsinga
approved these changes
Aug 4, 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.
Summary
Session History's Download action only produced JSON, which is useful for re-import but not for reading or sharing a transcript. This adds a format picker (JSON / Markdown) to that button and wires Markdown through to the same formatter the CLI already uses for
goose session export --format markdown, so both paths produce identical output.The formatter lived in
goose-cli, which the ACP server (in thegoosecrate) cannot depend on without a dependency cycle, so it moves togoose/src/session/export_markdown.rsand both crates now share it. The move is a pure relocation — git records it as a 92% rename and the 33 unit tests move unchanged.Changes:
goose-cli/src/session/export.rs→goose/src/session/export_markdown.rs, alongsideexport_session_to_markdownfromgoose-cli/src/commands/session.rs. NoCargo.tomledits.ExportSessionRequestgains aformatfield (SessionExportFormat,#[serde(default)], defaults toJson), so clients omitting it still receive JSON. Regeneratedacp-schema.jsonandui/sdk/src/generated/.SessionManager::export_session_markdown.export_sessionand theSessionStoragetrait are untouched, so Nostr sharing and diagnostics are unaffected.en.jsonand all 15 translated catalogs.Notes for reviewers:
Conversation::user_visible_messages()), matching CLI output byte-for-byte and excluding assistant-only content.Import Sessionaccepts JSON formats only, which the menu wording reflects.sessions.toast.exported,sessions.action.export) so punctuation stays language-correct. A native-speaker glance atkoandhiwould be welcome.Testing
Automated:
cargo test -p goose --lib session::export_markdown— 33 relocated tests plus a newmarkdown_export_handles_empty_conversationcargo test -p goose-sdk-types --lib custom_requests— asserts a request withoutformatdefaults to JSON, and thatmarkdowndeserializescargo test -p goose-cli --lib,cargo fmt --check,cargo clippy --workspace --all-targets -- -D warningsjust check-acp-schema— generated files in sync with the Rust typespnpm run lint:check(typecheck + eslint +i18n-check+ locale validation across all 15 locales) andpnpm run test:run— 592 passingManual:
goose session export --format markdown, then diffed the two filesRelated Issues
Fixes #10253
Discussion: N/A
Screenshots/Demos (for UX changes)