Allow Permission Request to only require a ToolCallUpdate instead of a full tool call (#36319)
Release Notes: - N/A
This commit is contained in:
parent
7b3fe0a474
commit
332626e582
11 changed files with 63 additions and 61 deletions
|
@ -514,10 +514,11 @@ impl NativeAgentConnection {
|
|||
thread.request_tool_call_authorization(tool_call, options, cx)
|
||||
})?;
|
||||
cx.background_spawn(async move {
|
||||
if let Some(option) = recv
|
||||
.await
|
||||
.context("authorization sender was dropped")
|
||||
.log_err()
|
||||
if let Some(recv) = recv.log_err()
|
||||
&& let Some(option) = recv
|
||||
.await
|
||||
.context("authorization sender was dropped")
|
||||
.log_err()
|
||||
{
|
||||
response
|
||||
.send(option)
|
||||
|
@ -530,7 +531,7 @@ impl NativeAgentConnection {
|
|||
AgentResponseEvent::ToolCall(tool_call) => {
|
||||
acp_thread.update(cx, |thread, cx| {
|
||||
thread.upsert_tool_call(tool_call, cx)
|
||||
})?;
|
||||
})??;
|
||||
}
|
||||
AgentResponseEvent::ToolCallUpdate(update) => {
|
||||
acp_thread.update(cx, |thread, cx| {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue