agent: Use current shell (#28470)
Release Notes: - agent: Replace `bash` tool with `terminal` tool which uses the current shell --------- Co-authored-by: Bennet <bennet@zed.dev> Co-authored-by: Antonio <antonio@zed.dev>
This commit is contained in:
parent
8ac378b86e
commit
90bcde116f
15 changed files with 334 additions and 74 deletions
|
@ -14,12 +14,15 @@ use std::{
|
|||
time::Duration,
|
||||
};
|
||||
use text::LineEnding;
|
||||
use util::ResultExt;
|
||||
use util::{ResultExt, get_system_shell};
|
||||
|
||||
#[derive(Serialize)]
|
||||
pub struct AssistantSystemPromptContext {
|
||||
pub worktrees: Vec<WorktreeInfoForSystemPrompt>,
|
||||
pub has_rules: bool,
|
||||
pub os: String,
|
||||
pub arch: String,
|
||||
pub shell: String,
|
||||
}
|
||||
|
||||
impl AssistantSystemPromptContext {
|
||||
|
@ -30,6 +33,9 @@ impl AssistantSystemPromptContext {
|
|||
Self {
|
||||
worktrees,
|
||||
has_rules,
|
||||
os: std::env::consts::OS.to_string(),
|
||||
arch: std::env::consts::ARCH.to_string(),
|
||||
shell: get_system_shell(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue