@@ -97,13 +97,13 @@ func (m *modelDialogCmp) Init() tea.Cmd {
98 modelItems = append(modelItems, commands.NewItemSection(name))
98 modelItems = append(modelItems, commands.NewItemSection(name))
99 for _, model := range provider.Models {
99 for _, model := range provider.Models {
100− if model.ID == agentModel.ID && provider.ID == agentProvider.ID {
101− selectIndex = len(modelItems) // Set the selected index to the current model
103 modelItems = append(modelItems, completions.NewCompletionItem(model.Name, ModelOption{
100 modelItems = append(modelItems, completions.NewCompletionItem(model.Name, ModelOption{
104 Provider: provider,
101 Provider: provider,
105 Model: model,
102 Model: model,
104+ if model.ID == agentModel.ID && provider.ID == agentProvider.ID {
105+ selectIndex = len(modelItems) - 1 // Set the selected index to the current model