Skip to content

[Enhancement] Add One-Click 'Copy Code' Button to Output Blocks #685

@2379278408

Description

@2379278408

🌟 Feature Request: Copy Code Button

Current Pain Point

When MonkeyCode generates code blocks in the chat response, it is difficult and tedious for users to copy them.

  • Selection issues: Double-clicking or dragging to select large blocks of code is cumbersome, especially for long scripts.
  • Scrolling: Navigating to copy text while the scrollbar moves is a bad UX.

Suggestion

Add a One-Click Copy Button (Icon) to the top-right corner of every code block.

  • Icon: Use a standard clipboard icon (📋 or Copy).
  • Feedback: Change icon to Check (✅) or tooltip "Copied!" briefly after clicking.

Why this matters

  • Efficiency: Developers frequently copy-paste code to local editors or terminals to test. This is a high-frequency action.
  • Standard Practice: Almost all modern AI coding tools (Cursor, GitHub Copilot, Claude) include this as a baseline feature.

Mockup Idea

+---------------------------------------+
| Python                               [📋 Copy] |
+---------------------------------------+
| import os                             |
| ...                                   |
+---------------------------------------+

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions