github / github/copilot-cli

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

Aperta
#3,435 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
area:input-keyboard
Lingua principale
Shell
Stelle
11.2k
Fork
1.9k
Merge medio
14h 16m
PR unite (30g)
6

Descrizione

### 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.

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Start by tracing the existing /copy action and the markdown structure the CLI already renders, then inspect how clipboard copying is triggered. Done means /copy offers the full response by default plus individually previewed, language-tagged fenced code blocks, and selecting any option copies only that segment.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
markdown, shell
Ambito
cli
Tipo di issue
Funzionalità
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Tranquilla
Chiarezza
Abbastanza chiara
Idoneità per principianti
55/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.