Skip to content

Navigate prompt history in prompt field via arrow up/down #4139

@fabb

Description

@fabb

What problem does this proposed feature solve?

Insert previous prompts again, e.g. after deleting part of the history, or when repeating a similar task.

Describe the proposed solution in detail

In VSCode it‘s a UX principle that in input fields (e.g. search fields, commit message field, copilot prompt field), past values can be accessed with arrow up/down.

If the current field contains multiple lines, then the cursor must be in the first line when pressing arrow up to replace the text with the previous value in history. The cursor stays in the first line in that case. Arrow up can be pressed multiple times to go back in history. Arrow down goes forward in history, but again, only when the cursor is in the last line. The cursor stays in the last line in that case.

When having entered something already but not yet submitted, and then going back in history with arrow up, the entered text is not lost because it is added as temporary newest history entry, and can easily be restored with arrow down.

Technical considerations or implementation details (optional)

If available, use VSCode api that provides this functionality.

Describe alternatives considered (if any)

Not really, arrow up/down is so ingrained in VSCode UX that it feels weird to not have it in an input field.

Additional Context & Mockups

No response

Proposal Checklist

  • I have searched existing Issues and Discussions to ensure this proposal is not a duplicate.
  • This proposal is for a specific, actionable change intended for implementation (not a general idea).
  • I understand that this proposal requires review and approval before any development work begins.

Are you interested in implementing this feature if approved?

  • Yes, I would like to contribute to implementing this feature.

Metadata

Metadata

Labels

Issue - In ProgressSomeone is actively working on this. Should link to a PR soon.UI/UXUI/UX related or focusedenhancementNew feature or requestfeature requestFeature request, not a bug

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions