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.

貢獻指南

開啟貢獻指南

研究方向

首先追蹤現有的 /copy 動作以及 CLI 已經呈現的 markdown 結構,接著檢查觸發複製到剪貼簿的方式。完成條件是:/copy 預設提供完整回應,以及個別預覽、帶有語言標籤的 fenced 程式碼區塊,且選取任何選項時只複製該片段。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
markdown, shell
領域
cli
Issue 類型
功能
難度
4/5
預估耗時
3-5 天
活躍度
冷清
描述清晰度
基本清楚
新手友好度
55/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。