github / github/copilot-cli

Allow pinning the GitHub theme to dark or light

Ouverte
#4,620 1 commentaire 3 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

area:theming-accessibility
Langage dominant
Shell
Étoiles
11.2k
Forks
1.9k
Merge moyen
14 h 16 min
PR mergées (30 j)
6

Description

Describe the feature or problem you'd like to solve

The  github  color mode follows the reported OS or terminal appearance, and there's no way to pin it. I want the GitHub palette in dark, permanently, while macOS stays in Light during the day. That combination isn't reachable today.

Proposed solution

Requested change: accept an explicit variant, such as  /theme github-dark  and  /theme github-light , with plain  github  keeping today's automatic behavior. A separate "follow OS appearance" toggle would work equally well.

Example prompts or workflows

No response

Additional context

What happens now: my terminal profile is black, but macOS switches to Light on its daytime schedule. Every running CLI session flips to a white background at once, usually noticed on wake from sleep. Restarting fixes it, because startup derives colors from the terminal's actual palette instead.

The relevant behavior, from  app.js  in 1.0.81-9:

if (n() === "github") {
let c = l === "light" ? { bg: cse, fg: Pq } // #ffffff
: { bg: lse, fg: Rq }; // #0D1117
t(d => d && { ...d, ...c }); return
}

 github  is the only mode that hard-follows the light/dark signal. Every other mode re-queries the terminal's real colors, so those stay dark. That makes the palette choice and the follow-the-OS behavior one setting when they're really two.

Worth noting the workaround isn't obvious. Setting a fixed theme in the terminal emulator can work, since the terminal's  DECSET 996/997  reply takes priority over macOS appearance, but that changes the emulator's own window chrome as a side effect. There's no fix available from within the CLI.

Guide de contribution

Ouvrir le guide de contribution

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.

Piste de recherche

Commencez dans app.js en retraçant la manière dont le thème github est analysé et dont sa palette claire ou sombre est sélectionnée. Confirmez le comportement automatique existant de github, puis vérifiez que les variantes explicites github-dark et github-light peuvent rester fixes tandis que github simple continue de suivre l’apparence signalée.

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

Évaluation

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

Recevez les nouvelles issues par e-mail

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