@@ -138,11 +138,19 @@ export class FetchWebPageTool implements IToolImpl {
138
138
let confirmationTitle : string ;
139
139
let confirmationMessage : string | MarkdownString ;
140
140
if ( urlsNeedingConfirmation . length === 1 ) {
141
- confirmationTitle = localize ( 'fetchWebPage.confirmationTitle.singular' , 'Fetch untrusted web page?' ) ;
142
- confirmationMessage = urlsNeedingConfirmation [ 0 ] . toString ( ) ;
141
+ confirmationTitle = localize ( 'fetchWebPage.confirmationTitle.singular' , 'Fetch web page?' ) ;
142
+ confirmationMessage = new MarkdownString (
143
+ urlsNeedingConfirmation [ 0 ] . toString ( ) + '\n\n$(info) ' +
144
+ localize ( 'fetchWebPage.confirmationMessage.singular' , 'Web content may contain malicious code or attempt prompt injection attacks.' ) ,
145
+ { supportThemeIcons : true }
146
+ ) ;
143
147
} else {
144
- confirmationTitle = localize ( 'fetchWebPage.confirmationTitle.plural' , 'Fetch untrusted web pages?' ) ;
145
- confirmationMessage = new MarkdownString ( urlsNeedingConfirmation . map ( uri => `- ${ uri . toString ( ) } ` ) . join ( '\n' ) ) ;
148
+ confirmationTitle = localize ( 'fetchWebPage.confirmationTitle.plural' , 'Fetch web pages?' ) ;
149
+ confirmationMessage = new MarkdownString (
150
+ urlsNeedingConfirmation . map ( uri => `- ${ uri . toString ( ) } ` ) . join ( '\n' ) + '\n\n$(info) ' +
151
+ localize ( 'fetchWebPage.confirmationMessage.plural' , 'Web content may contain malicious code or attempt prompt injection attacks.' ) ,
152
+ { supportThemeIcons : true }
153
+ ) ;
146
154
}
147
155
result . confirmationMessages = { title : confirmationTitle , message : confirmationMessage , allowAutoConfirm : true } ;
148
156
}
0 commit comments