on main help sign in
chore: make thinking mode persistent
commit780459f7ee9e6a15b634f0f5d057e3a0889c4567 authorKujtim Hoxha <kujtimii.h@gmail.com> dateMon 27 Oct 2025, 14:33 (1 year ago) parentf172aaa
1 file changed+6−1
internal/tui/page/chat/chat.go+6−1
internal/tui/page/chat/chat.go+6−1
@@ -535,7 +535,12 @@ func (p *chatPage) toggleThinking() tea.Cmd {
535535
536536 // Toggle the thinking mode
537537 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+ }
539544
540545 // Update the agent with the new configuration
541546 if err := p.app.UpdateAgentModel(context.TODO()); err != nil {