Terminal tool improvements (#29924)

WIP

- On macOS/Linux, run the command in bash instead of the user's shell
- Try to prevent the agent from running commands that expect interaction

Release Notes:

- Agent Beta: Switched to using `bash` (if available) instead of the
user's shell when calling the terminal tool.
- Agent Beta: Prevented the agent from hanging when trying to run
interactive commands.

---------

Co-authored-by: WeetHet <stas.ale66@gmail.com>
This commit is contained in:
Cole Miller 2025-05-05 15:57:03 -04:00 committed by GitHub
parent 9cb5ffac25
commit c12e6376b8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 143 additions and 25 deletions

View file

@ -61,7 +61,7 @@ pub fn init(http_client: Arc<HttpClientWithUrl>, cx: &mut App) {
assistant_tool::init(cx);
let registry = ToolRegistry::global(cx);
registry.register_tool(TerminalTool);
registry.register_tool(TerminalTool::new(cx));
registry.register_tool(CreateDirectoryTool);
registry.register_tool(CopyPathTool);
registry.register_tool(DeletePathTool);