diff --git a/internal/tui/components/chat/splash/splash.go b/internal/tui/components/chat/splash/splash.go index a7cf0b27de678dc63d1f9058a5d9d6bd3957d2ae..f459eaa3788fa350305f8636684ad5b3d3aad69c 100644 --- a/internal/tui/components/chat/splash/splash.go +++ b/internal/tui/components/chat/splash/splash.go @@ -196,6 +196,9 @@ func (s *splashCmp) Update(msg tea.Msg) (tea.Model, tea.Cmd) { } if s.isOnboarding && !s.needsAPIKey { modelInx := s.modelList.SelectedIndex() + if modelInx == -1 { + return s, nil + } items := s.modelList.Items() selectedItem := items[modelInx].(completions.CompletionItem).Value().(models.ModelOption) if s.isProviderConfigured(string(selectedItem.Provider.ID)) {