diff --git a/src/agent/system_prompt.rs b/src/agent/system_prompt.rs index 00f48f9..7927358 100644 --- a/src/agent/system_prompt.rs +++ b/src/agent/system_prompt.rs @@ -84,7 +84,9 @@ pub fn generate_system_env_prompt(config: &crate::config::LLMProviderConfig) -> _ => OS, }; - let shell = env::var("SHELL").unwrap_or_else(|_| "unknown".to_string()); + // 使用 platform 模块获取 Shell 信息,与 bash 工具保持一致 + let shell_info = crate::platform::ShellInfo::default(); + let shell = shell_info.executable; let cwd = env::current_dir() .map(|p| p.display().to_string()) .unwrap_or_else(|_| "unknown".to_string());