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

Function agentOptionFlags

pkg/runtime/runtime.go:846–861  ·  view source on GitHub ↗

agentOptionFlags lists the agent's enabled boolean options as stable, hyphenated display names. AddDate/AddEnvironmentInfo/RedactSecrets read the agent's effective (resolved) values; CodeModeTools is only knowable from the retained config because the runtime folds it into a single wrapper toolset.

(a *agent.Agent, cfg latest.AgentConfig, hasCfg bool)

Source from the content-addressed store, hash-verified

844// agent's effective (resolved) values; CodeModeTools is only knowable from the
845// retained config because the runtime folds it into a single wrapper toolset.
846func agentOptionFlags(a *agent.Agent, cfg latest.AgentConfig, hasCfg bool) []string {
847 var opts []string
848 if a.AddDate() {
849 opts = append(opts, "add-date")
850 }
851 if a.AddEnvironmentInfo() {
852 opts = append(opts, "add-environment-info")
853 }
854 if a.RedactSecrets() {
855 opts = append(opts, "redact-secrets")
856 }
857 if hasCfg && cfg.CodeModeTools {
858 opts = append(opts, "code-mode-tools")
859 }
860 return opts
861}
862
863// configSkillNames lists the cleanly-resolvable skill names from the agent
864// config: inline skill names, the Include allow-list, and referenced skill

Callers 1

AgentConfigInfoMethod · 0.85

Calls 3

AddDateMethod · 0.80
AddEnvironmentInfoMethod · 0.80
RedactSecretsMethod · 0.80

Tested by

no test coverage detected