MCPcopy Create free account
hub / github.com/AI45Lab/Code / expand_home

Function expand_home

core/src/agent_api/agent_bootstrap.rs:72–81  ·  view source on GitHub ↗
(source: &str)

Source from the content-addressed store, hash-verified

70}
71
72fn expand_home(source: &str) -> String {
73 let Some(rest) = source.strip_prefix("~/") else {
74 return source.to_string();
75 };
76
77 match std::env::var_os("HOME").or_else(|| std::env::var_os("USERPROFILE")) {
78 Some(home) => PathBuf::from(home).join(rest).display().to_string(),
79 None => source.to_string(),
80 }
81}
82
83fn base_agent_config(config: &CodeConfig) -> AgentConfig {
84 let mut auto_delegation = config.auto_delegation.clone();

Callers 1

load_code_configFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected