feat: 使用 platform 模块获取 Shell 信息,优化系统环境信息提示词生成
This commit is contained in:
parent
fc628239a4
commit
881c73c79f
@ -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());
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user