on main help sign in
chore: small fix
commit042725f1e262c675674da6aa879567d2b18b37b8 authorKujtim Hoxha <kujtimii.h@gmail.com> dateMon 27 Oct 2025, 15:15 (1 year ago) parent780459f
3 files changed+2−11
internal/agent/coordinator.go−1 internal/tui/page/chat/chat.go+1−6 internal/tui/tui.go+1−4
internal/agent/coordinator.go−1
@@ -655,7 +655,6 @@ func (c *coordinator) buildProvider(providerCfg config.ProviderConfig, model con
655655 headers["anthropic-beta"] = "interleaved-thinking-2025-05-14"
656656 }
657657 }
658− slog.Info("Headers", "headers", headers)
659658
660659 // TODO: make sure we have
661660 apiKey, _ := c.cfg.Resolve(providerCfg.APIKey)
internal/tui/page/chat/chat.go+1−6
@@ -543,12 +543,7 @@ func (p *chatPage) toggleThinking() tea.Cmd {
543543 }
544544
545545 // Update the agent with the new configuration
546− if err := p.app.UpdateAgentModel(context.TODO()); err != nil {
547− return util.InfoMsg{
548− Type: util.InfoTypeError,
549− Msg: "Failed to update thinking mode: " + err.Error(),
550− }
551− }
546+ go p.app.UpdateAgentModel(context.TODO())
552547
553548 status := "disabled"
554549 if currentModel.Think {
internal/tui/tui.go+1−4
@@ -199,10 +199,7 @@ func (a *appModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
199199
200200 config.Get().UpdatePreferredModel(msg.ModelType, msg.Model)
201201
202− // Update the agent with the new model/provider configuration
203− if err := a.app.UpdateAgentModel(context.TODO()); err != nil {
204− return a, util.ReportError(fmt.Errorf("model changed to %s but failed to update agent: %v", msg.Model.Model, err))
205− }
202+ go a.app.UpdateAgentModel(context.TODO())
206203
207204 modelTypeName := "large"
208205 if msg.ModelType == config.SelectedModelTypeSmall {