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

Function ReadEnvConfig

agent/agentcontextconfig/api.go:92–100  ·  view source on GitHub ↗

ReadEnvConfig reads the CODER_AGENT_EXP_* environment variables, falling back to defaults for unset values.

()

Source from the content-addressed store, hash-verified

90// ReadEnvConfig reads the CODER_AGENT_EXP_* environment
91// variables, falling back to defaults for unset values.
92func ReadEnvConfig() Config {
93 return Config{
94 InstructionsDirs: strings.TrimSpace(os.Getenv(EnvInstructionsDirs)),
95 InstructionsFile: strings.TrimSpace(os.Getenv(EnvInstructionsFile)),
96 SkillsDirs: strings.TrimSpace(os.Getenv(EnvSkillsDirs)),
97 SkillMetaFile: strings.TrimSpace(os.Getenv(EnvSkillMetaFile)),
98 MCPConfigFiles: strings.TrimSpace(os.Getenv(EnvMCPConfigFiles)),
99 }.applyDefaults()
100}
101
102// envVarKeys returns every CODER_AGENT_EXP_* env var key
103// used by the context configuration subsystem.

Callers 5

workspaceAgentFunction · 0.92
WithContextConfigFromEnvFunction · 0.92
TestResolveFunction · 0.92
TestNewAPI_LazyDirectoryFunction · 0.92

Calls 1

applyDefaultsMethod · 0.80

Tested by 3

TestResolveFunction · 0.74
TestNewAPI_LazyDirectoryFunction · 0.74