Change summary
internal/ui/chat/assistant.go | 2 +-
internal/ui/chat/tools.go | 2 +-
internal/ui/chat/user.go | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
Detailed changes
@@ -258,7 +258,7 @@ func (a *AssistantMessageItem) HandleMouseClick(btn ansi.MouseButton, x, y int)
// HandleKeyEvent implements KeyEventHandler.
func (a *AssistantMessageItem) HandleKeyEvent(key tea.KeyMsg) (bool, tea.Cmd) {
- if key.String() == "c" {
+ if k := key.String(); k == "c" || k == "y" {
text := a.message.Content().Text
return true, common.CopyToClipboard(text, "Message copied to clipboard")
}
@@ -420,7 +420,7 @@ func (t *baseToolMessageItem) HandleMouseClick(btn ansi.MouseButton, x, y int) b
// HandleKeyEvent implements KeyEventHandler.
func (t *baseToolMessageItem) HandleKeyEvent(key tea.KeyMsg) (bool, tea.Cmd) {
- if key.String() == "c" {
+ if k := key.String(); k == "c" || k == "y" {
text := t.formatToolForCopy()
return true, common.CopyToClipboard(text, "Tool content copied to clipboard")
}
@@ -96,7 +96,7 @@ func (m *UserMessageItem) renderAttachments(width int) string {
// HandleKeyEvent implements KeyEventHandler.
func (m *UserMessageItem) HandleKeyEvent(key tea.KeyMsg) (bool, tea.Cmd) {
- if key.String() == "c" {
+ if k := key.String(); k == "c" || k == "y" {
text := m.message.Content().Text
return true, common.CopyToClipboard(text, "Message copied to clipboard")
}