Merge 333354024d
into 0e575b2809
This commit is contained in:
commit
2bc349a9f8
20 changed files with 899 additions and 722 deletions
|
@ -2,7 +2,7 @@ use agent_client_protocol as acp;
|
|||
use anyhow::Result;
|
||||
use futures::{FutureExt as _, future::Shared};
|
||||
use gpui::{App, AppContext, Entity, SharedString, Task};
|
||||
use project::{Project, terminals::TerminalKind};
|
||||
use project::Project;
|
||||
use schemars::JsonSchema;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::{
|
||||
|
@ -144,15 +144,22 @@ impl AgentTool for TerminalTool {
|
|||
let terminal = self
|
||||
.project
|
||||
.update(cx, |project, cx| {
|
||||
project.create_terminal(
|
||||
TerminalKind::Task(task::SpawnInTerminal {
|
||||
project.create_terminal_task(
|
||||
task::SpawnInTerminal {
|
||||
command: Some(program),
|
||||
args,
|
||||
cwd: working_dir.clone(),
|
||||
env,
|
||||
..Default::default()
|
||||
}),
|
||||
},
|
||||
cx,
|
||||
project
|
||||
.active_entry()
|
||||
.and_then(|entry_id| project.worktree_id_for_entry(entry_id, cx))
|
||||
.map(|worktree_id| project::ProjectPath {
|
||||
worktree_id,
|
||||
path: Arc::from(Path::new("")),
|
||||
}),
|
||||
)
|
||||
})?
|
||||
.await?;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue