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:
Agus Zubiaga 2025-04-09 23:38:36 -06:00 committed by GitHub
parent 8ac378b86e
commit 90bcde116f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 334 additions and 74 deletions

View file

@ -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(),
}
}
}