Skip to content

feat(desktop): add /copy session transcript command#15574

Open
anduimagui wants to merge 4 commits intoanomalyco:devfrom
anduimagui:feat/desktop-session-copy-transcript
Open

feat(desktop): add /copy session transcript command#15574
anduimagui wants to merge 4 commits intoanomalyco:devfrom
anduimagui:feat/desktop-session-copy-transcript

Conversation

@anduimagui
Copy link

@anduimagui anduimagui commented Mar 1, 2026

What does this PR do?

Desktop did not support the /copy session transcript command that exists in TUI, so users could not copy full transcripts from the desktop command flow.

This PR adds desktop parity by introducing session.copy in app commands, wiring native desktop clipboard write, and adding the required desktop capability permission. It also moves transcript formatting to @opencode-ai/util so the app imports a shared formatter as a first step toward unifying Desktop/TUI copy behavior in a follow-up.

Type of change

  • feat (adds a feature)
  • fix (non-breaking bug fix)
  • docs (documentation only)
  • refactor (non-breaking internal improvement)

How did you verify your code works?

  • Ran bun --cwd packages/util run typecheck
  • Ran bun --cwd packages/app run build
  • Ran bun --cwd packages/desktop tauri dev
  • Manually tested in Desktop app: executed /copy in a session and verified transcript content was copied to clipboard
  • Rebasing branch onto latest dev resolved prior packages/desktop/src/menu.ts conflict and PR is mergeable

Checklist

  • I tested these changes locally
  • I only included changes related to this PR
  • I updated permissions/config where required (clipboard-manager:allow-write-text)

Screenshots

Screenshot 2026-03-01 at 13 43 20

Issue for this PR

Closes #12545


File-level summary

  • packages/app/src/pages/session/use-session-commands.tsx: add session.copy slash command and use shared transcript formatter
  • packages/util/src/session-transcript.ts: shared transcript formatting utility (app now imports this)
  • packages/desktop/src/index.tsx: native clipboard write via Tauri clipboard manager
  • packages/desktop/src-tauri/capabilities/default.json: add clipboard-manager:allow-write-text
  • packages/desktop/src/menu.ts: add menu action for session.copy

Follow-up (separate PR): migrate TUI to this shared formatter path for a single unified copy implementation across TUI/Desktop.

@anduimagui anduimagui requested a review from adamdotdevin as a code owner March 1, 2026 13:39
@github-actions github-actions bot added the needs:compliance This means the issue will auto-close after 2 hours. label Mar 1, 2026
@anduimagui anduimagui force-pushed the feat/desktop-session-copy-transcript branch from 0e14edc to 8873f81 Compare March 1, 2026 13:43
@github-actions github-actions bot removed the needs:compliance This means the issue will auto-close after 2 hours. label Mar 1, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Mar 1, 2026

Thanks for updating your PR! It now meets our contributing guidelines. 👍

@anduimagui anduimagui changed the title feat(desktop): add /copy session transcript parity feat(desktop): add /copy session transcript command Mar 1, 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.

[FEATURE]: TUI Shortcuts in Desktop Application

1 participant