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

Method SwitchAgent

pkg/app/app.go:944–948  ·  view source on GitHub ↗

SwitchAgent switches the currently active agent for subsequent user messages

(agentName string)

Source from the content-addressed store, hash-verified

942
943// SwitchAgent switches the currently active agent for subsequent user messages
944func (a *App) SwitchAgent(agentName string) error {
945 // Called from the Bubble Tea event loop, which has no context; this is
946 // a TUI-root boundary.
947 return a.runtime.SetCurrentAgent(a.ctx(), agentName)
948}
949
950// SetCurrentAgentModel sets the model for the current agent and persists
951// the override in the session. Returns an error if model switching is not

Callers 1

handleSwitchAgentMethod · 0.80

Calls 1

SetCurrentAgentMethod · 0.65

Tested by

no test coverage detected