Skip to content

Commit 10219e2

Browse files
authored
Merge pull request #263258 from microsoft/tyriar/allow
Change continue to allow for all tool confirmations
2 parents 62888ce + d249833 commit 10219e2

File tree

3 files changed

+19
-19
lines changed

3 files changed

+19
-19
lines changed

src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatExtensionsInstallToolSubPart.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -47,22 +47,22 @@ export class ExtensionsInstallConfirmationWidgetSubPart extends BaseChatToolInvo
4747
dom.append(this.domNode, chatExtensionsContentPart.domNode);
4848

4949
if (toolInvocation.isConfirmed === undefined) {
50-
const continueLabel = localize('continue', "Continue");
51-
const continueKeybinding = keybindingService.lookupKeybinding(AcceptToolConfirmationActionId)?.getLabel();
52-
const continueTooltip = continueKeybinding ? `${continueLabel} (${continueKeybinding})` : continueLabel;
50+
const allowLabel = localize('allow', "Allow");
51+
const allowKeybinding = keybindingService.lookupKeybinding(AcceptToolConfirmationActionId)?.getLabel();
52+
const allowTooltip = allowKeybinding ? `${allowLabel} (${allowKeybinding})` : allowLabel;
5353

5454
const cancelLabel = localize('cancel', "Cancel");
5555
const cancelKeybinding = keybindingService.lookupKeybinding(CancelChatActionId)?.getLabel();
5656
const cancelTooltip = cancelKeybinding ? `${cancelLabel} (${cancelKeybinding})` : cancelLabel;
57-
const enableContinueButtonEvent = this._register(new Emitter<boolean>());
57+
const enableAllowButtonEvent = this._register(new Emitter<boolean>());
5858

5959
const buttons: IChatConfirmationButton<ConfirmedReason>[] = [
6060
{
61-
label: continueLabel,
61+
label: allowLabel,
6262
data: { type: ToolConfirmKind.UserAction },
63-
tooltip: continueTooltip,
63+
tooltip: allowTooltip,
6464
disabled: true,
65-
onDidChangeDisablement: enableContinueButtonEvent.event
65+
onDidChangeDisablement: enableAllowButtonEvent.event
6666
},
6767
{
6868
label: cancelLabel,
@@ -77,7 +77,7 @@ export class ExtensionsInstallConfirmationWidgetSubPart extends BaseChatToolInvo
7777
context.container,
7878
{
7979
title: toolInvocation.confirmationMessages?.title ?? localize('installExtensions', "Install Extensions"),
80-
message: toolInvocation.confirmationMessages?.message ?? localize('installExtensionsConfirmation', "Click the Install button on the extension and then press Continue when finished."),
80+
message: toolInvocation.confirmationMessages?.message ?? localize('installExtensionsConfirmation', "Click the Install button on the extension and then press Allow when finished."),
8181
buttons,
8282
}
8383
));
@@ -94,7 +94,7 @@ export class ExtensionsInstallConfirmationWidgetSubPart extends BaseChatToolInvo
9494
const disposable = this._register(extensionManagementService.onInstallExtension(e => {
9595
if (extensionsContent.extensions.some(id => areSameExtensions({ id }, e.identifier))) {
9696
disposable.dispose();
97-
enableContinueButtonEvent.fire(false);
97+
enableAllowButtonEvent.fire(false);
9898
}
9999
}));
100100
}

src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatTerminalToolConfirmationSubPart.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -300,13 +300,13 @@ export class ChatTerminalToolConfirmationSubPart extends BaseChatToolInvocationS
300300
}
301301

302302
private _createButtons(moreActions: (IChatConfirmationButton<TerminalNewAutoApproveButtonData> | Separator)[] | undefined): IChatConfirmationButton<boolean | TerminalNewAutoApproveButtonData>[] {
303-
const continueLabel = localize('continue', "Continue");
304-
const continueKeybinding = this.keybindingService.lookupKeybinding(AcceptToolConfirmationActionId)?.getLabel();
305-
const continueTooltip = continueKeybinding ? `${continueLabel} (${continueKeybinding})` : continueLabel;
303+
const allowLabel = localize('allow', "Allow");
304+
const allowKeybinding = this.keybindingService.lookupKeybinding(AcceptToolConfirmationActionId)?.getLabel();
305+
const allowTooltip = allowKeybinding ? `${allowLabel} (${allowKeybinding})` : allowLabel;
306306
return [
307307
{
308-
label: continueLabel,
309-
tooltip: continueTooltip,
308+
label: allowLabel,
309+
tooltip: allowTooltip,
310310
data: true,
311311
moreActions,
312312
},

src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatToolConfirmationSubPart.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,9 @@ export class ToolConfirmationSubPart extends BaseChatToolInvocationSubPart {
7171
throw new Error('Confirmation messages are missing');
7272
}
7373
const { title, message, allowAutoConfirm, disclaimer } = toolInvocation.confirmationMessages;
74-
const continueLabel = localize('continue', "Continue");
75-
const continueKeybinding = keybindingService.lookupKeybinding(AcceptToolConfirmationActionId)?.getLabel();
76-
const continueTooltip = continueKeybinding ? `${continueLabel} (${continueKeybinding})` : continueLabel;
74+
const allowLabel = localize('allow', "Allow");
75+
const allowKeybinding = keybindingService.lookupKeybinding(AcceptToolConfirmationActionId)?.getLabel();
76+
const allowTooltip = allowKeybinding ? `${allowLabel} (${allowKeybinding})` : allowLabel;
7777
const cancelLabel = localize('cancel', "Cancel");
7878
const cancelKeybinding = keybindingService.lookupKeybinding(CancelChatActionId)?.getLabel();
7979
const cancelTooltip = cancelKeybinding ? `${cancelLabel} (${cancelKeybinding})` : cancelLabel;
@@ -89,9 +89,9 @@ export class ToolConfirmationSubPart extends BaseChatToolInvocationSubPart {
8989

9090
const buttons: IChatConfirmationButton<ConfirmationOutcome>[] = [
9191
{
92-
label: continueLabel,
92+
label: allowLabel,
9393
data: ConfirmationOutcome.Allow,
94-
tooltip: continueTooltip,
94+
tooltip: allowTooltip,
9595
moreActions: !allowAutoConfirm ? undefined : [
9696
{ label: localize('allowSession', 'Allow in this Session'), data: ConfirmationOutcome.AllowSession, tooltip: localize('allowSesssionTooltip', 'Allow this tool to run in this session without confirmation.') },
9797
{ label: localize('allowWorkspace', 'Allow in this Workspace'), data: ConfirmationOutcome.AllowWorkspace, tooltip: localize('allowWorkspaceTooltip', 'Allow this tool to run in this workspace without confirmation.') },

0 commit comments

Comments
 (0)