fix: should also copy on `y` (additionally to `c`) (#1989)
commit9622c2591282b8377d7ab0821cff1cac4799c9f0
authorAndrey Nering <andreynering@users.noreply.github.com>
dateMon 26 Jan 2026, 11:55 (9 months ago)
parenta0e9d35
internal/ui/chat/assistant.go+1−1
@@ -258,7 +258,7 @@ func (a *AssistantMessageItem) HandleMouseClick(btn ansi.MouseButton, x, y int)
258258
259259// HandleKeyEvent implements KeyEventHandler.
260260func (a *AssistantMessageItem) HandleKeyEvent(key tea.KeyMsg) (bool, tea.Cmd) {
261− if key.String() == "c" {
261+ if k := key.String(); k == "c" || k == "y" {
262262 text := a.message.Content().Text
263263 return true, common.CopyToClipboard(text, "Message copied to clipboard")
264264 }
internal/ui/chat/tools.go+1−1
@@ -420,7 +420,7 @@ func (t *baseToolMessageItem) HandleMouseClick(btn ansi.MouseButton, x, y int) b
420420
421421// HandleKeyEvent implements KeyEventHandler.
422422func (t *baseToolMessageItem) HandleKeyEvent(key tea.KeyMsg) (bool, tea.Cmd) {
423− if key.String() == "c" {
423+ if k := key.String(); k == "c" || k == "y" {
424424 text := t.formatToolForCopy()
425425 return true, common.CopyToClipboard(text, "Tool content copied to clipboard")
426426 }
internal/ui/chat/user.go+1−1
@@ -96,7 +96,7 @@ func (m *UserMessageItem) renderAttachments(width int) string {
9696
9797// HandleKeyEvent implements KeyEventHandler.
9898func (m *UserMessageItem) HandleKeyEvent(key tea.KeyMsg) (bool, tea.Cmd) {
99− if key.String() == "c" {
99+ if k := key.String(); k == "c" || k == "y" {
100100 text := m.message.Content().Text
101101 return true, common.CopyToClipboard(text, "Message copied to clipboard")
102102 }