gemini-cli icon indicating copy to clipboard operation
gemini-cli copied to clipboard

Draft prompts created against prompts from history should be preserved when using Arrow Up and Arrow Down to navigate between prompts

Open gundermanc opened this issue 11 months ago • 3 comments

What happened?

  • I used Arrow Up to select a previously used prompt as a starting point for a new prompt.
  • I then added several more lines to the middle of it, then used the arrow keys to move the cursor back to the end of the text box.
  • In the process I accidentally arrowed past the end of the prompt box, causing the prompt to be wiped out and a different prompt retrieved from history.
  • Using Arrow Up again, I can get back to the historical version of the prompt I used to start my new prompt, but my new prompt was lost.

What did you expect to happen?

I expect drafted prompts to be preserved when using Arrow Up and Arrow Down to navigate the prompt history.

Client information

Client Information

Run gemini to enter the interactive CLI, then run the /about command.

╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│                                                                                                                                    │
│ About Gemini CLI                                                                                                                   │
│                                                                                                                                    │
│ CLI Version                                   0.19.4                                                                               │
│ Git Commit                                    935114875                                                                            │
│ Model                                         auto                                                                                 │
│ Sandbox                                       no sandbox                                                                           │
│ OS                                            darwin                                                                               │
│ Auth Method                                   gemini-api-key                                                                       │
│                                                                                                                                    │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯


Login information

API Key

Anything else we need to know?

This is a suggested UX improvement

gundermanc avatar Dec 06 '25 00:12 gundermanc

Found possible duplicate issues:

  • #13790

If you believe this is not a duplicate, please remove the status/possible-duplicate label.

gemini-cli[bot] avatar Dec 06 '25 00:12 gemini-cli[bot]

Found possible duplicate issues:

If you believe this is not a duplicate, please remove the status/possible-duplicate label.

I don't think this is a duplicate. This issue is specifically suggesting that we should keep drafts made on prompts from history as part of the history, even if they aren't invoked by the user with RETURN/ENTER.

gundermanc avatar Dec 06 '25 00:12 gundermanc

Is this still open for contribution? I'd like to work on it.

tomsen02 avatar Dec 11 '25 01:12 tomsen02

/assign

Debashich avatar Feb 25 '26 22:02 Debashich

👋 @Debashich, thanks for your interest in this issue! We're reserving self-assignment for issues that have been marked with the help wanted label. Feel free to check out our list of issues that need attention.

gemini-cli[bot] avatar Feb 25 '26 22:02 gemini-cli[bot]

@bdmorgan @gundermanc Tagging for visibility. This PR #20471 addresses issue #14617. I have also integrated the feedback from the automated review.

Debashich avatar Feb 26 '26 20:02 Debashich