Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

feat(tui): add a switch to disable the CLI's own terminal-title (OSC 0) writes

Aperta Adatta ai principianti
#4,010 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
75/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
shell, typescript
Ambito
cli

Direzione di ricerca

Cerca le chiamate alle funzioni updateTerminalTitle o setTitle nel codice TUI, probabilmente in un file che gestisce gli eventi di avvio, ripresa, cambio sessione e modifica del titolo. La modifica consiste nel saltare condizionalmente quelle scritture in base a una nuova variabile d'ambiente (ad esempio KIMI_CODE_DISABLE_TERMINAL_TITLE) o a una chiave di configurazione tui.toml. Testa eseguendo la CLI con il flag impostato e verificando che il titolo del terminale non venga sovrascritto.

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

Descrizione

What version of Kimi Code is running?

kimi --version: 2.0.2 (installed via Homebrew, /opt/homebrew/bin/kimi)

What platform is your computer?

macOS, Ghostty terminal (also relevant to tmux, WezTerm, iTerm2 — any terminal that displays OSC 0 in tab titles).

What feature would you like to see?

An official switch to disable the TUI's own terminal-title management, so a shell wrapper (or the user's own setup) can own the tab title.

Background: the TUI writes the session title (or the product name, before a title is generated) to the terminal via OSC 0 on session start, resume, session switch, and every session-title change. There is currently no env var, config.toml key, or tui.toml key to turn this off.

For comparison, Claude Code has CLAUDE_CODE_DISABLE_TERMINAL_TITLE=1 for exactly this purpose. Prior art on the other side: #1885 (open) proposes putting more state into the title — so a toggle would serve both camps: users who want the tab to say "kimi: " from their shell wrapper, and users who want a working-state spinner there.

Concrete use case: a fish wrapper around the kimi binary sets the Ghostty tab title to kimi: <dirname> (basename only, since titlebar tabs truncate from the right). Today the wrapper's title is overwritten within a second by the CLI's own OSC 0 write. With a switch, the wrapper sets the title once and nothing fights it; on exit the terminal's shell integration restores the cwd title at the next prompt.

Requested shape (any of these is fine):

  • An env var, e.g. KIMI_CODE_DISABLE_TERMINAL_TITLE=1 (mirrors Claude's naming), or
  • a tui.toml key, e.g. terminal_title = false (mirrors the shape requested in #1885, which suggested a tui.toml flag for its own titling).

Ideally the switch suppresses all OSC 0 writes from the TUI (updateTerminalTitle / setTitle call sites: session start, resume, switch, and title-change events).

What is the current workaround?

None that isn't fragile — the only option today would be racing or filtering the CLI's output, which isn't worth it. Until this exists, the wrapper approach is unusable.

Related
  • #1885 — proposes mirroring working state into the terminal title (also asks for a tui.toml flag around titling).
Lingua principale
TypeScript
Stelle
7.5k
Fork
1.2k
Merge medio
12h 48m
PR unite (30g)
315

Preparare l'ambiente

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.

Altre issue di MoonshotAI/kimi-code

Tutte le issue di MoonshotAI/kimi-code

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.