Skip to content

feat: implement improved copy command with options#15173

Open
leoncheng57 wants to merge 1 commit intoanomalyco:devfrom
leoncheng57:feature/copy-command-with-options
Open

feat: implement improved copy command with options#15173
leoncheng57 wants to merge 1 commit intoanomalyco:devfrom
leoncheng57:feature/copy-command-with-options

Conversation

@leoncheng57
Copy link

@leoncheng57 leoncheng57 commented Feb 26, 2026

Issue for this PR

Closes #2118

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Adds a new copyWithOptions command that allows users to copy messages with customizable formatting options. Users can now select exactly which messages in the session to copy with formatting retained. This does not replace the existing copy command.

  • The new copyWithOptions command that enables selective copying of session messages
  • Solves the problem where users could only copy entire session transcripts or the last message—now they can choose exactly which messages to export
  • Adds a DialogCopyMessages component that provides a keyboard-navigable interface where users can view message previews, toggle selections with spacebar, select all with Ctrl+A, and confirm with Enter
  • TUI user interface with keyboard-first navigation (up/down arrows, space, Enter, Ctrl+A)
  • Includes unit test coverage validating both the command handler logic and the dialog component behavior

How did you verify your code works?

  • Added unit tests for the new DialogCopyMessages component
  • Extensive manual testing to see that all the copy commands and different options are working

Screenshots / recordings

image
PR.recording.mov

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@github-actions github-actions bot added needs:compliance This means the issue will auto-close after 2 hours. and removed needs:compliance This means the issue will auto-close after 2 hours. labels Feb 26, 2026
@github-actions
Copy link
Contributor

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

@leoncheng57 leoncheng57 force-pushed the feature/copy-command-with-options branch from 45d5acc to 064f72e Compare February 26, 2026 05:46
@leoncheng57 leoncheng57 reopened this Feb 26, 2026
This commit includes:
- Add selective copy dialog for User msgs and AI responses
- Expand copy dialog to support both user and assistant messages
- Fix scrolling issues and improve type safety
@leoncheng57 leoncheng57 force-pushed the feature/copy-command-with-options branch from 064f72e to 3a4d5e5 Compare February 26, 2026 06:06
@leoncheng57 leoncheng57 changed the title feat: implement copy command with options feat: implement improved copy command with options Feb 26, 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.

Add a /copy command to copy latest message (or allow scrolling while selecting text)

1 participant