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

オープン
#30,508 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
65/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
typescript
領域
cli

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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 :)

主要言語
TypeScript
スター
109k
フォーク
15k
平均マージ
1日 24分
マージ済み PR(30日)
91

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

google-gemini/gemini-cli のほかの issue

google-gemini/gemini-cli の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。