mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-08 17:19: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 {
|
.chat-confirmation-widget + .chat-tool-approval-message {
|
||||||
margin: -12px 6px 16px;
|
margin: -12px 6px 16px;
|
||||||
opacity: 0.8;
|
color: var(--vscode-descriptionForeground);
|
||||||
font-size: 12px;
|
font-size: var(--vscode-chat-font-size-body-s);
|
||||||
}
|
}
|
||||||
|
|
||||||
.chat-confirmation-widget .chat-confirmation-widget-title {
|
.chat-confirmation-widget .chat-confirmation-widget-title {
|
||||||
|
|||||||
+13
-4
@@ -83,15 +83,18 @@ export class ChatToolInvocationPart extends Disposable implements IChatContentPa
|
|||||||
this._onDidChangeHeight.fire();
|
this._onDidChangeHeight.fire();
|
||||||
}));
|
}));
|
||||||
|
|
||||||
const approval = this.createApprovalMessage();
|
// todo@connor4312/tyriar: standardize how these are displayed
|
||||||
if (approval) {
|
if (!(this.subPart instanceof ChatTerminalToolProgressPart)) {
|
||||||
this.domNode.appendChild(approval);
|
const approval = this.createApprovalMessage();
|
||||||
|
if (approval) {
|
||||||
|
this.domNode.appendChild(approval);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
render();
|
render();
|
||||||
}
|
}
|
||||||
|
|
||||||
private createApprovalMessage(): HTMLElement | undefined {
|
private get autoApproveMessageContent() {
|
||||||
const reason = this.toolInvocation.isConfirmed;
|
const reason = this.toolInvocation.isConfirmed;
|
||||||
if (!reason || typeof reason === 'boolean') {
|
if (!reason || typeof reason === 'boolean') {
|
||||||
return;
|
return;
|
||||||
@@ -117,6 +120,12 @@ export class ChatToolInvocationPart extends Disposable implements IChatContentPa
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return md;
|
||||||
|
}
|
||||||
|
|
||||||
|
private createApprovalMessage(): HTMLElement | undefined {
|
||||||
|
const md = this.autoApproveMessageContent;
|
||||||
if (!md) {
|
if (!md) {
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user