feat(cli): opt-in persistence of unsent prompt draft to survive crashes

Aperta
#30,508 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

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

Direzione di ricerca

Start by locating the CLI configuration, command registration, and input handling entry points, then review the existing tests and documentation conventions. Implement the opt-in general.saveDraftPrompt setting and /save-prompt command, with atomic persistence scoped to the current project and restoration on startup. Verify the behavior with tests covering persistence, crash or restart recovery, and the default-off setting, then update the CLI documentation.

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

Descrizione

status/need-triage
What would you like to be added?

An opt-in setting, general.saveDraftPrompt (default off), and a /save-prompt command to toggle it. When on, unsent input is saved to disk and restored on the next start in the same project.

Why is this needed?

Submitted prompts are saved as they happen, but text still being typed lives only in memory. A crash, closed terminal or power cut loses it, which hurts most for long prompts.

Related: #20948 (closed) asked for the unsent buffer in input history, mainly for accidental deletion. This is complementary and narrower: crash recovery via a small file, with no change to history or key handling.

Additional context

I worked on an implementation with tests and docs: on a fork. Writes are atomic (temp file + rename).

Known limits: terminals in the same project share one draft, and turning the setting off leaves an existing draft file on disk.

Happy to open a PR if a maintainer agrees :)

Lingua principale
TypeScript
Stelle
109k
Fork
15k
Merge medio
1g 24m
PR unite (30g)
91

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 google-gemini/gemini-cli

Tutte le issue di google-gemini/gemini-cli

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.