Allow /fork to open a new terminal and add copilot --fork
Nessuno ha ancora preso questa issue.
- Lingua principale
- Shell
- Stelle
- 11.2k
- Fork
- 1.9k
- Merge medio
- 14h 16m
- PR unite (30g)
- 6
Descrizione
Describe the feature or problem you'd like to solve
The interactive /fork command moves the current terminal into the fork, and Copilot CLI has no startup option for creating a fork from an existing session. This makes parallel terminal workflows unnecessarily manual.
Proposed solution
Support both of these entry points:
- Add
copilot --fork=<session-id> --name=<new-session-name>. It should create a new fork of the supplied session, apply the optional name to the new fork, and start the fork in the process that invoked the command. The source session name should remain unchanged. - Add an option such as
/fork --new-terminal [name]. It should create the fork in a new terminal window or tab while the current terminal remains in the original session.
The command line option provides a portable building block when automatic terminal launching is unavailable. Users can combine it with their preferred terminal application.
If /fork --new-terminal cannot identify or launch the current terminal application, it should return the new session ID and a ready-to-run copilot --resume=<new-session-id> command instead of silently changing behavior.
Example prompts or workflows
- Run
/fork --new-terminal investigate-authduring a task. The fork opens separately, and the original session remains visible and interactive. - Run
wt new-tab copilot --fork=<session-id> --name=investigate-authto create and name a fork in a new Windows Terminal tab. - Run
copilot --fork=<session-id> --name=alternative-designfrom another shell to create, name, and enter a fork of a specific session. - Run
!wt new-tab copilot --fork=<session-id> --name=side-investigationinside Copilot CLI to launch the fork without abandoning the current session.
Additional context
This replaces #4578, which was submitted without the Feature Request form.
This is a focused follow-up to #2058. That issue requested the core /fork command and mentioned a new terminal window or tab in its proposed solution. The core command now exists, but terminal selection and process startup interfaces are still missing.
Related issue #1697 also describes working with forked sessions in separate terminals.
Confirmed with GitHub Copilot CLI 1.0.81-8: both copilot --fork=<session-id> and copilot --branch=<session-id> are rejected as unknown options.
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia con il comando interattivo esistente /fork e con i percorsi di analisi delle opzioni CLI e di avvio dei processi. Traccia il modo in cui le sessioni vengono create e riprese, quindi verifica i workflow richiesti della riga di comando e di /fork --new-terminal, incluso il comando di ripresa di fallback e il nome della sessione sorgente invariato.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- shell
- Ambito
- cli
- Tipo di issue
- Funzionalità
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Attiva
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 38/100