opencode icon indicating copy to clipboard operation
opencode copied to clipboard

[FEATURE]: Support cursor position and text selection using mouse in chat input - Like Warp

Open thaoula opened this issue 2 months ago • 6 comments

Feature hasn't been suggested before.

  • [x] I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

Hi Team,

Have to say great product 💪🏻

Is it possible to enable mouse behaviour in the chat input area to allow the following -

  1. Cursor positioning. You click a location in the prompt and the cursor will move to that location.
  2. Text selection. You click a word, or select a word . The text will select and the cursor will be placed at the end of the selection.

These features exist in Warp and are quite handy for quickly updating parts of the prompt or input.

The main use case for this feature request, at least for me, is to be able to quickly fix voice-to-text transcription mistakes in the prompt.

Kind Regards, Tarek

thaoula avatar Nov 03 '25 04:11 thaoula

This issue might be a duplicate of existing issues. Please check:

  • #3370: Similar request for text selection and navigation, but focused on keyboard shortcuts rather than mouse interaction
  • #2550: General input box usability improvements including mouse support, but less specific about the Warp-like cursor positioning and text selection features

Feel free to ignore if none of these address your specific case.

github-actions[bot] avatar Nov 03 '25 04:11 github-actions[bot]

The selection to edit should work mostly, but currently opencode has a selection event handler that copies the selection to clipboard and then clears the selection.

  • opentui needs a way for a Renderable to prevent the default for selection event if a selection is contained/starts/ends in it
  • opentui Textarea needs to handle mouse clicks to position the cursor

kommander avatar Nov 04 '25 14:11 kommander

Will come

kommander avatar Nov 13 '25 00:11 kommander