github / github/copilot-cli

/copy: allow selecting which part of the response to copy (e.g., just a code block)

未关闭
#3,435 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
area:input-keyboard
主要语言
Shell
星标
11.2k
派生
1.9k
平均合并
14 小时 16 分钟
30 天内合并 PR
6

描述

### Summary

Today `/copy` copies the entire last assistant response to the clipboard. Often I only want a specific part — most commonly a single fenced code block from a longer answer that also includes prose, multiple commands, or several code snippets.

### Request

When I run `/copy`, present a picker of copyable segments from the last response, for example:

- The full response (current behavior, as default)
- Each fenced code block, listed individually with a short preview and language tag

Selecting one copies just that segment to the clipboard.

### Prior art

Claude Code does this: invoking its copy action on a response that contains fenced code shows a small menu so you can pick the whole response or any individual code block.

### Why

Right now if the response has prose plus a code block, I have to either:
- `/copy` the whole thing and then manually strip the prose in another editor, or
- Select with the mouse, which is fiddly across wrapped lines / terminal renderers and often picks up stray characters (see related copy-selection issues).

A built-in picker keyed off the markdown structure the CLI already renders would be much nicer.

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。