CycleAgentThinkingLevel advances the current agent's thinking-effort level to the next value in its provider's cycle and returns the newly selected level. The change applies to the running session only (it is not persisted as a model override). Returns an error wrapping [runtime.ErrUnsupported] when
(ctx context.Context)
| 1001 | // as a model override). Returns an error wrapping [runtime.ErrUnsupported] |
| 1002 | // when the runtime or model cannot cycle thinking levels. |
| 1003 | func (a *App) CycleAgentThinkingLevel(ctx context.Context) (effort.Level, error) { |
| 1004 | agentName := a.runtime.CurrentAgentName(ctx) |
| 1005 | level, err := a.runtime.CycleAgentThinkingLevel(ctx, agentName) |
| 1006 | if err != nil { |
| 1007 | return "", err |
| 1008 | } |
| 1009 | // Refresh only the agent/team info so the sidebar reflects the updated |
| 1010 | // thinking level. We intentionally avoid reEmitStartupInfo here: it would |
| 1011 | // re-run tool discovery and make the sidebar's tool count flicker. |
| 1012 | a.refreshAgentInfo(ctx) |
| 1013 | return level, nil |
| 1014 | } |
| 1015 | |
| 1016 | // SetAgentThinkingLevel sets the current agent's thinking-effort level to the |
| 1017 | // requested value and returns the applied level. Like |
nothing calls this directly
no test coverage detected