agent: Fix subagent permission prompt showing up in multiple cards (#50475)
Release Notes: - N/A
This commit is contained in:
1 parent
e1ff92c8fd
commit
f3fdf078da
1 file changed
+4
-2
@@ -6381,7 +6381,9 @@ impl ThreadView {
|
||||
|
||||
let is_running = matches!(
|
||||
tool_call.status,
|
||||
ToolCallStatus::Pending | ToolCallStatus::InProgress
|
||||
ToolCallStatus::Pending
|
||||
| ToolCallStatus::InProgress
|
||||
| ToolCallStatus::WaitingForConfirmation { .. }
|
||||
);
|
||||
|
||||
let is_failed = matches!(
|
||||
@@ -6596,7 +6598,7 @@ impl ThreadView {
|
||||
.read(cx)
|
||||
.pending_tool_call(thread.read(cx).session_id(), cx);
|
||||
|
||||
if let Some((_, subagent_tool_call_id, _)) = pending_tool_call {
|
||||
if is_running && let Some((_, subagent_tool_call_id, _)) = pending_tool_call {
|
||||
if let Some((entry_ix, tool_call)) =
|
||||
thread.read(cx).tool_call(&subagent_tool_call_id)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user