on main help sign in
fix(onboarding): address `c` key press not working on onboarding (#1663)
commitb945baa3ddf8dd81e090514b06a35ade3d508363 authorAndrey Nering <andreynering@users.noreply.github.com> dateThu 18 Dec 2025, 16:53 (1 year ago) parent5b66c8d
1 file changed+17−19
internal/tui/components/chat/splash/splash.go+17−19
internal/tui/components/chat/splash/splash.go+17−19
@@ -205,25 +205,23 @@ func (s *splashCmp) Update(msg tea.Msg) (util.Model, tea.Cmd) {
205205 }
206206 case tea.KeyPressMsg:
207207 switch {
208− case key.Matches(msg, s.keyMap.Copy):
209− if s.showClaudeOAuth2 && s.claudeOAuth2.State == claude.OAuthStateURL {
210− return s, tea.Sequence(
211− tea.SetClipboard(s.claudeOAuth2.URL),
212− func() tea.Msg {
213− _ = clipboard.WriteAll(s.claudeOAuth2.URL)
214− return nil
215− },
216− util.ReportInfo("URL copied to clipboard"),
217− )
218− } else if s.showClaudeAuthMethodChooser {
219− u, cmd := s.claudeAuthMethodChooser.Update(msg)
220− s.claudeAuthMethodChooser = u.(*claude.AuthMethodChooser)
221− return s, cmd
222− } else if s.showClaudeOAuth2 {
223− u, cmd := s.claudeOAuth2.Update(msg)
224− s.claudeOAuth2 = u.(*claude.OAuth2)
225− return s, cmd
226− }
208+ case key.Matches(msg, s.keyMap.Copy) && s.showClaudeOAuth2 && s.claudeOAuth2.State == claude.OAuthStateURL:
209+ return s, tea.Sequence(
210+ tea.SetClipboard(s.claudeOAuth2.URL),
211+ func() tea.Msg {
212+ _ = clipboard.WriteAll(s.claudeOAuth2.URL)
213+ return nil
214+ },
215+ util.ReportInfo("URL copied to clipboard"),
216+ )
217+ case key.Matches(msg, s.keyMap.Copy) && s.showClaudeAuthMethodChooser:
218+ u, cmd := s.claudeAuthMethodChooser.Update(msg)
219+ s.claudeAuthMethodChooser = u.(*claude.AuthMethodChooser)
220+ return s, cmd
221+ case key.Matches(msg, s.keyMap.Copy) && s.showClaudeOAuth2:
222+ u, cmd := s.claudeOAuth2.Update(msg)
223+ s.claudeOAuth2 = u.(*claude.OAuth2)
224+ return s, cmd
227225 case key.Matches(msg, s.keyMap.Back):
228226 if s.showClaudeAuthMethodChooser {
229227 s.claudeAuthMethodChooser.SetDefaults()