on main help sign in
fix(tui): chat: remove paste key binding from onboarding

The keybinding does not bind to any action in the app but rather assumes the terminal application's default paste behavior. We shouldn't assume that and instead leave it to the terminal emulator and user to handle pasting. On most macOS terminals the default paste keybinding is `cmd+v` and on most Windows and Linux terminals it is `ctrl+shift+v`.

commit911dc9b40f3a9ca014ace15a5a42df2786622823 authorAyman Bagabas <ayman.bagabas@gmail.com> dateMon 14 Jul 2025, 09:55 (1 year ago) parent2aa5f61
1 file changed−15
internal/tui/page/chat/chat.go−15
internal/tui/page/chat/chat.go−15
@@ -2,7 +2,6 @@ package chat
22
33import (
44 "context"
5− "runtime"
65 "time"
76
87 "github.com/charmbracelet/bubbles/v2/help"
@@ -615,26 +614,12 @@ func (a *chatPage) Help() help.KeyMap {
615614 fullList = append(fullList, []key.Binding{v})
616615 }
617616 case a.isOnboarding && a.splash.IsShowingAPIKey():
618− var pasteKey key.Binding
619− if runtime.GOOS != "darwin" {
620− pasteKey = key.NewBinding(
621− key.WithKeys("ctrl+v"),
622− key.WithHelp("ctrl+v", "paste API key"),
623− )
624− } else {
625− pasteKey = key.NewBinding(
626− key.WithKeys("cmd+v"),
627− key.WithHelp("cmd+v", "paste API key"),
628− )
629− }
630617 shortList = append(shortList,
631618 // Go back
632619 key.NewBinding(
633620 key.WithKeys("esc"),
634621 key.WithHelp("esc", "back"),
635622 ),
636− // Paste
637− pasteKey,
638623 // Quit
639624 key.NewBinding(
640625 key.WithKeys("ctrl+c"),