github / github/copilot-cli

Allow pinning the GitHub theme to dark or light

Aperta
#4,620 1 commento 3 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

area:theming-accessibility
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  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.

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia in app.js tracciando come viene analizzato il tema github e come viene selezionata la relativa tavolozza chiara o scura. Conferma il comportamento automatico esistente di github, quindi verifica che le varianti esplicite github-dark e github-light possano rimanere fisse mentre github semplice continui a seguire l'aspetto segnalato.

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

Valutazione

Stack tecnologico
javascript
Ambito
cli
Tipo di issue
Funzionalità
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Attiva
Chiarezza
Abbastanza chiara
Idoneità per principianti
67/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.