From 31b28ade010711c578d4be58c0dc439badebe000 Mon Sep 17 00:00:00 2001 From: Allen Hutchison Date: Fri, 13 Jun 2025 17:44:14 -0700 Subject: Improvements to web-fetch tool (#1030) --- .../messages/ToolConfirmationMessage.tsx | 32 ++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'packages/cli/src/ui/components/messages/ToolConfirmationMessage.tsx') diff --git a/packages/cli/src/ui/components/messages/ToolConfirmationMessage.tsx b/packages/cli/src/ui/components/messages/ToolConfirmationMessage.tsx index b747cabc..e1e53ff6 100644 --- a/packages/cli/src/ui/components/messages/ToolConfirmationMessage.tsx +++ b/packages/cli/src/ui/components/messages/ToolConfirmationMessage.tsx @@ -115,6 +115,38 @@ export const ToolConfirmationMessage: React.FC< }, { label: 'No (esc)', value: ToolConfirmationOutcome.Cancel }, ); + } else if (confirmationDetails.type === 'info') { + const infoProps = confirmationDetails; + const displayUrls = + infoProps.urls && + !(infoProps.urls.length === 1 && infoProps.urls[0] === infoProps.prompt); + + bodyContent = ( + + {infoProps.prompt} + {displayUrls && infoProps.urls && infoProps.urls.length > 0 && ( + + URLs to fetch: + {infoProps.urls.map((url) => ( + - {url} + ))} + + )} + + ); + + question = `Do you want to proceed?`; + options.push( + { + label: 'Yes, allow once', + value: ToolConfirmationOutcome.ProceedOnce, + }, + { + label: 'Yes, allow always', + value: ToolConfirmationOutcome.ProceedAlways, + }, + { label: 'No (esc)', value: ToolConfirmationOutcome.Cancel }, + ); } else { // mcp tool confirmation const mcpProps = confirmationDetails as ToolMcpConfirmationDetails; -- cgit v1.2.3