on main help sign in
chore: make thinking mode persistent
780459fKujtim Hoxha
internal/tui/page/chat/chat.go+6−1
@@ -535,7 +535,12 @@ func (p *chatPage) toggleThinking() tea.Cmd {
535
535
536 // Toggle the thinking mode
536 // Toggle the thinking mode
537 currentModel.Think = !currentModel.Think
537 currentModel.Think = !currentModel.Think
538− cfg.Models[agentCfg.Model] = currentModel
538+ if err := cfg.UpdatePreferredModel(agentCfg.Model, currentModel); err != nil {
539+ return util.InfoMsg{
540+ Type: util.InfoTypeError,
541+ Msg: "Failed to update thinking mode: " + err.Error(),
542+ }
543+ }
539
544
540 // Update the agent with the new configuration
545 // Update the agent with the new configuration
541 if err := p.app.UpdateAgentModel(context.TODO()); err != nil {
546 if err := p.app.UpdateAgentModel(context.TODO()); err != nil {