Skip to content

Commit cf1e798

Browse files
committed
Add message about auto approve rule being added
1 parent cbfcac6 commit cf1e798

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,11 @@ export class TerminalConfirmationWidgetSubPart extends BaseChatToolInvocationSub
190190
throw new ErrorNoTelemetry(`Cannot add new rule, existing setting is unexpected format`);
191191
}
192192
await this.configurationService.updateValue(TerminalContribSettingId.AutoApprove, newValue);
193+
if (newRules.length === 1) {
194+
terminalData.autoApproveInfo = new MarkdownString(localize('newRule', 'Auto approve rule {0} added', `\`${newRules[0].key}\``));
195+
} else if (newRules.length > 1) {
196+
terminalData.autoApproveInfo = new MarkdownString(localize('newRule.plural', 'Auto approve rules {0} added', newRules.map(r => `\`${r.key}\``).join(', ')));
197+
}
193198
break;
194199
}
195200
case 'configure': {

0 commit comments

Comments
 (0)