Skip to content

feat: selective message copying from session transcript #22648

Closed as not planned

Description

@leoncheng57

Problem

Currently, when copying a session transcript, users can only copy the entire session or the last message. There is no way to select a subset of messages to copy. This is inconvenient when:

  • You only need a specific exchange (e.g., one question and its answer) from a long session
  • You want to share a portion of a conversation without irrelevant context
  • You need to extract specific assistant responses without the surrounding back-and-forth

Proposed Solution

Add a new copyWithOptions command (slash command: /copy-with-options) that opens an interactive dialog where users can:

  1. View a list of all session messages with previews (first 60 characters), model name, duration, and timestamps
  2. Toggle individual messages for inclusion using Space
  3. Select all messages with Ctrl+A
  4. Navigate with arrow keys (with wrapping) and mouse hover/click
  5. Confirm with Enter to copy the selected messages to the clipboard

The copied output should be a formatted Markdown transcript of only the selected messages, without the session metadata header (title, ID, timestamps), since a partial selection doesn't represent a full session export.

This command complements — not replaces — the existing copy command.

Acceptance Criteria

  • New /copy-with-options slash command registered in the session command list
  • Interactive dialog with keyboard-first navigation (up/down, space, ctrl+a, enter, esc)
  • Mouse support (click to toggle, hover to highlight)
  • Message previews show truncated text content, model/source info, and timing
  • Scrollable list for sessions with many messages
  • Warning shown if user tries to confirm with no messages selected
  • Success toast with count of copied messages
  • Error handling with user-facing toast on failure
  • Existing copy and export commands unaffected
  • Unit test coverage for selection logic and command handler workflow

Related

  • May also help with selective export workflows

Activity

  1. added
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on Apr 15, 2026
  2. github-actions commented on Apr 15, 2026

    @github-actions
    Contributor

    This issue doesn't fully meet our contributing guidelines.

    What needs to be fixed:

    • The issue does not use one of the three required templates (Bug Report, Feature Request, or Question)
    • Feature requests must have a title starting with [FEATURE]: — current title is feat: selective message copying from session transcript
    • Feature requests must include the verification checkbox confirming the feature hasn't been suggested before

    Please edit this issue to address the above within 2 hours, or it will be automatically closed.


    This issue might be a duplicate of existing issues. Please check:

    • feat: Copy Mode for OpenCode #2755: "feat: Copy Mode for OpenCode" — also addresses copying content from session messages, with similar motivation around limited copy functionality

    If you believe this was flagged incorrectly, please let a maintainer know.

  3. github-actions commented on Apr 15, 2026

    @github-actions
    Contributor

    This issue has been automatically closed because it was not updated to meet our contributing guidelines within the 2-hour window.

    Feel free to open a new issue that follows our issue templates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

coreAnything pertaining to core functionality of the application (opencode server stuff)

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions