(source: &str)
| 70 | } |
| 71 | |
| 72 | fn 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 | |
| 83 | fn base_agent_config(config: &CodeConfig) -> AgentConfig { |
| 84 | let mut auto_delegation = config.auto_delegation.clone(); |