agent: Only require confirmation for batch tool when subset of tool calls require confirmation (#28363)

Release Notes:

- agent: Only require confirmation for batch tool when subset of tool
calls require confirmation
This commit is contained in:
Bennet Bo Fenner 2025-04-08 15:37:10 -06:00 committed by GitHub
parent ef4b5b0698
commit 47eaf274d6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
23 changed files with 33 additions and 24 deletions

View file

@ -1414,7 +1414,7 @@ impl Thread {
for tool_use in pending_tool_uses.iter() {
if let Some(tool) = self.tools.tool(&tool_use.name, cx) {
if tool.needs_confirmation()
if tool.needs_confirmation(&tool_use.input, cx)
&& !AssistantSettings::get_global(cx).always_allow_tool_actions
{
self.tool_use.confirm_tool_use(

View file

@ -201,7 +201,7 @@ impl ToolUseState {
let (icon, needs_confirmation) = if let Some(tool) = self.tools.tool(&tool_use.name, cx)
{
(tool.icon(), tool.needs_confirmation())
(tool.icon(), tool.needs_confirmation(&tool_use.input, cx))
} else {
(IconName::Cog, false)
};