Skip to content
Source
Sign inSign up
pingdotgg/t3code

[Feature]: [UX] Terminal style history for chat input text field. #1777

ClosedPratyushChauhan(GitHub profile, opens in a new tab) opened this issue 4 comments

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I am describing a concrete problem or use case, not just a vague idea.

Area

apps/desktop

Problem or use case

As a user, I want to press the UP arrow key, to populate my chat input text field with the previous message in the chat history.

Proposed solution

When the user is focused on the chat input text field, pressing the UP arrow key should populate the text field with the previous message.

Why this matters

Improves UX while using chat.

Smallest useful scope

--

Alternatives considered

No response

Risks or tradeoffs

No response

Examples or references

No response

Contribution

  • I would be open to helping implement this.
  1. PratyushChauhan(GitHub profile, opens in a new tab) added labelsenhancement

  2. PratyushChauhan(GitHub profile, opens in a new tab) added labelsneeds-triage

  3. Simple enough change, made a minimal pr.

  4. The files that need to be edited for this feature are a high action space, as a result merge conflicts keep getting introduced. Will make a pr on this once the repo is open for contributions, else I'll just have to keep closing my PRs.

  5. Would like this too. One detail worth pinning down in the spec, since it is the difference between this being useful and being annoying:

    Up should only recall history when the composer is empty. If there is already text in the box, Up should move the caret within that text as it does today — otherwise the key becomes unusable for editing a multi-line prompt, which is most of them.

    That matches the terminal behaviour the title refers to (readline/zsh only pull from history when the line is empty, or when the caret is on the first line), and it keeps the change additive rather than taking an existing key away.

    The rest, in roughly the order I would want it:

    • Up on an empty composer fills it with your previous message; Up again steps further back.
    • Down steps forward, and past the newest entry returns the composer to empty.
    • Editing a recalled message and then navigating away should not clobber the stored history entry.

    Smallest useful version is just the first bullet.

  6. Note that Codex desktop does support this feature and I love it, have been missing it a lot since switching!

Sign in to join this conversation.