Option to restrict prompt history navigation to the current session

Ouverte
#5,576 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

Évaluation

Difficulté
4/5
Temps estimé
3-5 jours
Accessibilité débutants
48/100
Type d'issue
Fonctionnalité
Clarté
Plutôt claire
Activité
Active
Stack technique
python
Domaine
cli

Piste de recherche

The issue does not name relevant files or tests. Start by tracing how the CLI stores prompt history and handles up/down-arrow navigation, including session resume behavior. Done means a configurable session scope limits navigation to prompts from the current session, including resumed sessions; the proposed global-history shortcut is described as ideal rather than required.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

area:input-keyboard area:sessions
Describe the feature or problem you'd like to solve

Add option to restrict up/down-arrow prompt history navigation to current session, avoiding unrelated prompts from other sessions.

Proposed solution

Introduce a configuration option for the scope of prompt history navigation, e.g.:

promptHistoryScope: "global" — current behavior.

promptHistoryScope: "session" — restrict up/down-arrow navigation to prompts submitted in the current session, including when resuming an existing session.

Ideally, global history would remain accessible through a separate keyboard shortcut or Ctrl+R, even when session-specific navigation is enabled.

This would improve usability for developers working with multiple concurrent Copilot CLI sessions without changing the behavior for users who prefer global history.

Example prompts or workflows

Parallel sessions: Work on two different tasks in separate Copilot CLI sessions. Pressing the up-arrow recalls the previous prompt for the current task rather than a prompt from another session.

Resuming a session: Resume a session from yesterday and easily retrieve its previous prompts, regardless of how many other sessions have been used in the meantime.

Iterative prompt refinement: Retrieve and slightly modify a previous prompt without having to navigate through unrelated prompts submitted in other sessions.

Cross-project workflows: Run Copilot CLI in multiple repositories simultaneously while keeping prompt history navigation scoped to the respective session.

Additional context

This is similar to the distinction between local and shared command history in traditional shells.

Since Copilot CLI already maintains individual session histories, the relevant information appears to be available.

I find this particularly relevant when using Copilot CLI as a long-running development agent, with multiple concurrent sessions in separate terminal windows or tmux panes.

Langage dominant
Python
Étoiles
11.5k
Forks
2k
Merge moyen
6 h 34 min
PR mergées (30 j)
3

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de github/copilot-cli

Toutes les issues de github/copilot-cli

Issues similaires

Plus d'issues Python

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.