mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-08 09:08:48 +01:00
tools: fix double auto-approval message shown for terminal calls (#264369)
* tools: fix double auto-approval message shown for terminal calls * rm copilot-restored file
This commit is contained in:
+2
-2
@@ -18,8 +18,8 @@
|
||||
|
||||
.chat-confirmation-widget + .chat-tool-approval-message {
|
||||
margin: -12px 6px 16px;
|
||||
opacity: 0.8;
|
||||
font-size: 12px;
|
||||
color: var(--vscode-descriptionForeground);
|
||||
font-size: var(--vscode-chat-font-size-body-s);
|
||||
}
|
||||
|
||||
.chat-confirmation-widget .chat-confirmation-widget-title {
|
||||
|
||||
+13
-4
@@ -83,15 +83,18 @@ export class ChatToolInvocationPart extends Disposable implements IChatContentPa
|
||||
this._onDidChangeHeight.fire();
|
||||
}));
|
||||
|
||||
const approval = this.createApprovalMessage();
|
||||
if (approval) {
|
||||
this.domNode.appendChild(approval);
|
||||
// todo@connor4312/tyriar: standardize how these are displayed
|
||||
if (!(this.subPart instanceof ChatTerminalToolProgressPart)) {
|
||||
const approval = this.createApprovalMessage();
|
||||
if (approval) {
|
||||
this.domNode.appendChild(approval);
|
||||
}
|
||||
}
|
||||
};
|
||||
render();
|
||||
}
|
||||
|
||||
private createApprovalMessage(): HTMLElement | undefined {
|
||||
private get autoApproveMessageContent() {
|
||||
const reason = this.toolInvocation.isConfirmed;
|
||||
if (!reason || typeof reason === 'boolean') {
|
||||
return;
|
||||
@@ -117,6 +120,12 @@ export class ChatToolInvocationPart extends Disposable implements IChatContentPa
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
return md;
|
||||
}
|
||||
|
||||
private createApprovalMessage(): HTMLElement | undefined {
|
||||
const md = this.autoApproveMessageContent;
|
||||
if (!md) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user