MCPcopy Index your code
hub / github.com/docker/docker-agent / CycleAgentThinkingLevel

Method CycleAgentThinkingLevel

pkg/app/app.go:1003–1014  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

1001// as a model override). Returns an error wrapping [runtime.ErrUnsupported]
1002// when the runtime or model cannot cycle thinking levels.
1003func (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

Callers

nothing calls this directly

Calls 3

refreshAgentInfoMethod · 0.95
CurrentAgentNameMethod · 0.65

Tested by

no test coverage detected