Skip to content

Commit 7c8c31f

Browse files
committed
feat: Rework terminal command tools, add support for long-running command
1 parent 29cf32c commit 7c8c31f

File tree

15 files changed

+949
-238
lines changed

15 files changed

+949
-238
lines changed

Cargo.lock

Lines changed: 69 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ ignore = "0.4"
4040
clap = { version = "4.5", features = ["derive"] }
4141
paste = "1.0.15"
4242
heck = "0.5.0"
43+
process-wrap = { version = "8.2.1", features = ["tokio1"] }
4344

4445
# web search and fetch related
4546
percent-encoding = "2.3.1"

src/agent/event.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,10 @@ pub struct AgentStatus {
5353
/// Status of a command tool call
5454
#[derive(Clone, Debug, Default)]
5555
pub struct AgentCommandStatus {
56-
pub command: String,
56+
pub command_id: usize,
57+
pub command: Option<String>,
5758
pub output: String,
59+
pub is_active: bool,
5860
}
5961

6062
/// Events that are sent from the agent to UI
@@ -63,7 +65,7 @@ pub enum AgentOutputEvent {
6365
AddMessage(Message),
6466
UpdateMessage(Message),
6567
NewTask,
66-
ExecuteCommand(AgentCommandStatus),
68+
CommandStatus(Vec<AgentCommandStatus>),
6769
AgentStatus(AgentStatus),
6870
HighlightFile(String, bool),
6971
}

0 commit comments

Comments
 (0)