@@ -71,7 +71,7 @@ type OAuth struct {
71var _ Dialog = (*OAuth)(nil)
71var _ Dialog = (*OAuth)(nil)
73// newOAuth creates a new device flow component.
73// newOAuth creates a new device flow component.
74−func newOAuth(com *common.Common, provider catwalk.Provider, model config.SelectedModel, modelType config.SelectedModelType, oAuthProvider OAuthProvider) (*OAuth, error) {
74+func newOAuth(com *common.Common, provider catwalk.Provider, model config.SelectedModel, modelType config.SelectedModelType, oAuthProvider OAuthProvider) (*OAuth, tea.Cmd) {
75 t := com.Styles
75 t := com.Styles
77 m := OAuth{}
77 m := OAuth{}
@@ -101,7 +101,7 @@ func newOAuth(com *common.Common, provider catwalk.Provider, model config.Select
102 m.keyMap.Close = CloseKey
102 m.keyMap.Close = CloseKey
104− return &m, nil
104+ return &m, tea.Batch(m.spinner.Tick, m.oAuthProvider.initiateAuth)
107// ID implements Dialog.
107// ID implements Dialog.
@@ -109,11 +109,6 @@ func (m *OAuth) ID() string {
109 return OAuthID
109 return OAuthID
112−// Init implements Dialog.
113−func (m *OAuth) Init() tea.Cmd {
114− return tea.Batch(m.spinner.Tick, m.oAuthProvider.initiateAuth)
117// HandleMsg handles messages and state transitions.
112// HandleMsg handles messages and state transitions.
118func (m *OAuth) HandleMsg(msg tea.Msg) Action {
113func (m *OAuth) HandleMsg(msg tea.Msg) Action {
119 switch msg := msg.(type) {
114 switch msg := msg.(type) {