[PR #12583] feat(tui): clear prompt on double input_clear with inline indicator #14280

Open
opened 2026-02-16 18:19:05 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/12583

State: open
Merged: No


Fixes: #7079, Closes: #7319

What does this PR do?

  • Add double-tap behavior for input_clear in prompt input.
  • First tap arms clear mode; second tap within timeout clears prompt input.
  • Show inline hint in the input area: <keybind> again to clear.

I wanted to add a visual indicator and miss click prevention (through double click) on input clearing, providing a similar experience to other TUIs.

How did you verify your code works?

  • Open TUI prompt with non-empty input.
  • Press input_clear once -> input remains, indicator appears.
  • Press input_clear again within ~2s -> input clears.
  • Wait >2s after first press -> indicator resets, no clear on delayed second press.
  • Indicator doesn't appear when prompt input is empty

https://github.com/user-attachments/assets/04a8917f-49d7-4474-8add-e753c02bd286

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/12583 **State:** open **Merged:** No --- Fixes: #7079, Closes: #7319 ### What does this PR do? - Add double-tap behavior for `input_clear` in prompt input. - First tap arms clear mode; second tap within timeout clears prompt input. - Show inline hint in the input area: `<keybind> again to clear`. I wanted to add a visual indicator and miss click prevention (through double click) on input clearing, providing a similar experience to other TUIs. ### How did you verify your code works? - Open TUI prompt with non-empty input. - Press `input_clear` once -> input remains, indicator appears. - Press `input_clear` again within ~2s -> input clears. - Wait >2s after first press -> indicator resets, no clear on delayed second press. - Indicator doesn't appear when prompt input is empty https://github.com/user-attachments/assets/04a8917f-49d7-4474-8add-e753c02bd286
yindo added the pull-request label 2026-02-16 18:19:05 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#14280