diff --git a/crates/agent_ui/src/acp/thread_view.rs b/crates/agent_ui/src/acp/thread_view.rs index 1e9ff72f3d8c6bd094c886d3a74e36acfdba49e5..5c2cfcd27188d248686fcc94e9481e22fa2917c0 100644 --- a/crates/agent_ui/src/acp/thread_view.rs +++ b/crates/agent_ui/src/acp/thread_view.rs @@ -4669,6 +4669,12 @@ impl AcpServerView { ToolCallStatus::Rejected | ToolCallStatus::Canceled | ToolCallStatus::Failed ); + let confirmation_options = match &tool_call.status { + ToolCallStatus::WaitingForConfirmation { options, .. } => Some(options), + _ => None, + }; + let needs_confirmation = confirmation_options.is_some(); + let output = terminal_data.output(); let command_finished = output.is_some(); let truncated_output = @@ -4741,7 +4747,7 @@ impl AcpServerView { .color(Color::Muted), ), ) - .when(!command_finished, |header| { + .when(!command_finished && !needs_confirmation, |header| { header .gap_1p5() .child( @@ -4924,6 +4930,14 @@ impl AcpServerView { })), ) }) + .when_some(confirmation_options, |this, options| { + this.child(self.render_permission_buttons( + options, + entry_ix, + tool_call.id.clone(), + cx, + )) + }) .into_any() }