Skip to content

feat: extend hover copy button to tool results and intermediate AI text#200

Open
AgarwalPragy wants to merge 1 commit into
matt1398:mainfrom
AgarwalPragy:feat/extend-copy-button-coverage
Open

feat: extend hover copy button to tool results and intermediate AI text#200
AgarwalPragy wants to merge 1 commit into
matt1398:mainfrom
AgarwalPragy:feat/extend-copy-button-coverage

Conversation

@AgarwalPragy
Copy link
Copy Markdown

@AgarwalPragy AgarwalPragy commented May 14, 2026

Two more surfaces benefit from the same hover CopyButton pattern that bff0910 added to LastOutputDisplay's text variant:

  • LastOutputDisplay tool_result block: inline CopyButton in the header
  • TextItem: copyable on MarkdownViewer, matching ThinkingItem

Validation

  • pnpm typecheck, pnpm test (722/722), pnpm lint:fix, pnpm build — all pass
  • Manually verified in dev

Summary by CodeRabbit

  • New Features

    • Markdown content is now copyable.
  • Style

    • Copy button for tool results repositioned for improved accessibility.

Review Change Stack

Follow-up to bff0910 which added a hover CopyButton to the text variant
of LastOutputDisplay. Two more surfaces in the chat view show copyable
prose and benefit from the same affordance:

- LastOutputDisplay tool_result block: adds an inline CopyButton in the
  header row (right-aligned next to the tool name / error badge)
- TextItem: passes copyable to MarkdownViewer so intermediate AI text
  outputs (inside the expanded view of an AI group) get the same hover
  copy button that ThinkingItem already has

No behavior change to selection logic; both are always-visible affordances
matching the existing CopyButton pattern.
@coderabbitai coderabbitai Bot added the feature request New feature or request label May 14, 2026
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request enhances the chat interface by adding copy functionality to key components. It introduces a CopyButton to the LastOutputDisplay for tool results and enables the copyable prop on the MarkdownViewer within TextItem. As there are no review comments to evaluate, I have no further feedback to provide.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 14, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: e01ccd05-81d0-441c-bd4f-1b1baf727eb4

📥 Commits

Reviewing files that changed from the base of the PR and between 16cc3c8 and a08576d.

📒 Files selected for processing (2)
  • src/renderer/components/chat/LastOutputDisplay.tsx
  • src/renderer/components/chat/items/TextItem.tsx

📝 Walkthrough

Walkthrough

This PR adds copy-to-clipboard enhancements to two chat UI components. The tool result display now right-aligns its copy button in the header row, and the text item component enables inline copying for markdown content via the copyable prop.

Changes

Copy functionality enhancements

Layer / File(s) Summary
Tool result copy button positioning
src/renderer/components/chat/LastOutputDisplay.tsx
The CopyButton for lastOutput.toolResult is wrapped in a right-aligned container (ml-auto), positioning the copy control at the end of the tool-result header row.
Markdown content copy enablement
src/renderer/components/chat/items/TextItem.tsx
TextItem passes the copyable prop to MarkdownViewer, enabling users to copy displayed markdown content.

Possibly related PRs

  • matt1398/claude-devtools#182: Modifies LastOutputDisplay.tsx to adjust CopyButton behavior and positioning in the last-output UI.
  • matt1398/claude-devtools#145: Modifies markdown/copy-to-clipboard UI in chat components, adjusting where the copy button appears and how copying behaves.

Suggested labels

feature request

🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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

Labels

feature request New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant