on main help sign in
feat(bangmode): copy message result
commitf46387bb525c8bf27fed2a7e8adf28aceff2ab68 authorKieran Klukas <kieran@dunkirk.sh> dateFri 19 Jun 2026, 12:48 (4 months ago) parent47ed0f3
1 file changed+5−2
internal/ui/chat/shell.go+5−2
internal/ui/chat/shell.go+5−2
@@ -152,9 +152,12 @@ func (s *ShellItem) HandleMouseClick(btn ansi.MouseButton, x, y int) bool {
152152 return btn == ansi.MouseLeft
153153}
154154
155−// HandleKeyEvent implements KeyEventHandler for horizontal scrolling.
155+// HandleKeyEvent implements KeyEventHandler for copy and horizontal scrolling.
156156func (s *ShellItem) HandleKeyEvent(key tea.KeyMsg) (bool, tea.Cmd) {
157− switch key.String() {
157+ switch k := key.String(); k {
158+ case "c", "y":
159+ text := "$ " + s.command + "\n" + s.output
160+ return true, common.CopyToClipboard(text, "Shell output copied to clipboard")
158161 case "shift+left", "H":
159162 if s.xOffset > 0 {
160163 s.xOffset = max(0, s.xOffset-shellHScrollStep)