MCPcopy Index your code
hub / github.com/coder/coder / applyDefaults

Method applyDefaults

agent/agentcontextconfig/api.go:81–88  ·  view source on GitHub ↗

applyDefaults fills zero-valued fields with their defaults.

()

Source from the content-addressed store, hash-verified

79
80// applyDefaults fills zero-valued fields with their defaults.
81func (c Config) applyDefaults() Config {
82 c.InstructionsDirs = cmp.Or(c.InstructionsDirs, DefaultInstructionsDir)
83 c.InstructionsFile = cmp.Or(c.InstructionsFile, DefaultInstructionsFile)
84 c.SkillsDirs = cmp.Or(c.SkillsDirs, DefaultSkillsDir)
85 c.SkillMetaFile = cmp.Or(c.SkillMetaFile, DefaultSkillMetaFile)
86 c.MCPConfigFiles = cmp.Or(c.MCPConfigFiles, DefaultMCPConfigFile)
87 return c
88}
89
90// ReadEnvConfig reads the CODER_AGENT_EXP_* environment
91// variables, falling back to defaults for unset values.

Callers 2

ReadEnvConfigFunction · 0.80
NewAPIFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected