From 780459f7ee9e6a15b634f0f5d057e3a0889c4567 Mon Sep 17 00:00:00 2001 From: Kujtim Hoxha Date: Mon, 27 Oct 2025 14:33:22 +0100 Subject: [PATCH] chore: make thinking mode persistent --- internal/tui/page/chat/chat.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/internal/tui/page/chat/chat.go b/internal/tui/page/chat/chat.go index 2882a36679111bb42a9c9710ae20ae9b9e499d8b..a9517f8bbef927166cf6674d2ce1a1535df7235c 100644 --- a/internal/tui/page/chat/chat.go +++ b/internal/tui/page/chat/chat.go @@ -535,7 +535,12 @@ func (p *chatPage) toggleThinking() tea.Cmd { // Toggle the thinking mode currentModel.Think = !currentModel.Think - cfg.Models[agentCfg.Model] = currentModel + if err := cfg.UpdatePreferredModel(agentCfg.Model, currentModel); err != nil { + return util.InfoMsg{ + Type: util.InfoTypeError, + Msg: "Failed to update thinking mode: " + err.Error(), + } + } // Update the agent with the new configuration if err := p.app.UpdateAgentModel(context.TODO()); err != nil {