Skip to content

Commit b4b07a0

Browse files
committed
Further polishing cases
1 parent 0c6da45 commit b4b07a0

File tree

4 files changed

+20
-23
lines changed

4 files changed

+20
-23
lines changed

src/vs/workbench/contrib/chat/browser/chatContentParts/media/chatConfirmationWidget.css

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -182,10 +182,12 @@
182182
padding: 5px 9px;
183183
display: flex;
184184
justify-content: space-between;
185+
column-gap: 10px;
185186

186187
.chat-buttons {
187188
display: flex;
188189
column-gap: 10px;
190+
align-items: center;
189191
}
190192

191193
.monaco-button {
@@ -212,19 +214,6 @@
212214
}
213215
}
214216

215-
/* .chat-confirmation-widget2 .chat-buttons-container {
216-
background: var(--vscode-chat-requestBackground);
217-
border: 1px solid var(--vscode-chat-requestBorder);
218-
border-top: none;
219-
border-bottom-left-radius: 4px;
220-
border-bottom-right-radius: 4px;
221-
padding: 8px 9px;
222-
display: flex;
223-
justify-content: space-between;
224-
align-items: center;
225-
margin-top: 0;
226-
} */
227-
228217
.chat-confirmation-widget2.hideButtons .chat-buttons-container {
229218
display: none;
230219
}

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,18 +87,18 @@ export class ChatTerminalToolConfirmationSubPart extends BaseChatToolInvocationS
8787
terminalData = migrateLegacyTerminalToolSpecificData(terminalData);
8888

8989
const { title, message, disclaimer, terminalCustomActions } = toolInvocation.confirmationMessages;
90-
const continueLabel = localize('continue', "Continue");
91-
const continueKeybinding = keybindingService.lookupKeybinding(AcceptToolConfirmationActionId)?.getLabel();
92-
const continueTooltip = continueKeybinding ? `${continueLabel} (${continueKeybinding})` : continueLabel;
90+
const runLabel = localize('run', "Run");
91+
const runKeybinding = keybindingService.lookupKeybinding(AcceptToolConfirmationActionId)?.getLabel();
92+
const runTooltip = runKeybinding ? `${runLabel} (${runKeybinding})` : runLabel;
9393
const cancelLabel = localize('cancel', "Cancel");
9494
const cancelKeybinding = keybindingService.lookupKeybinding(CancelChatActionId)?.getLabel();
9595
const cancelTooltip = cancelKeybinding ? `${cancelLabel} (${cancelKeybinding})` : cancelLabel;
9696

9797
const buttons: IChatConfirmationButton[] = [
9898
{
99-
label: continueLabel,
99+
label: runLabel,
100100
data: true,
101-
tooltip: continueTooltip,
101+
tooltip: runTooltip,
102102
moreActions: terminalCustomActions,
103103
},
104104
{

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

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import { AcceptToolConfirmationActionId } from '../../actions/chatToolActions.js
3030
import { IChatCodeBlockInfo, IChatWidgetService } from '../../chat.js';
3131
import { renderFileWidgets } from '../../chatInlineAnchorWidget.js';
3232
import { ICodeBlockRenderOptions } from '../../codeBlockPart.js';
33-
import { SimpleChatConfirmationWidget, ChatCustomConfirmationWidget, IChatConfirmationButton } from '../chatConfirmationWidget.js';
33+
import { SimpleChatConfirmationWidget, ChatCustomConfirmationWidget, IChatConfirmationButton, ChatConfirmationWidget } from '../chatConfirmationWidget.js';
3434
import { IChatContentPartRenderContext } from '../chatContentParts.js';
3535
import { IChatMarkdownAnchorService } from '../chatMarkdownAnchorService.js';
3636
import { ChatMarkdownContentPart, EditorPool } from '../chatMarkdownContentPart.js';
@@ -107,10 +107,18 @@ export class ToolConfirmationSubPart extends BaseChatToolInvocationSubPart {
107107

108108
let confirmWidget: SimpleChatConfirmationWidget | ChatCustomConfirmationWidget;
109109
if (typeof message === 'string') {
110+
const tool = languageModelToolsService.getTool(toolInvocation.toolId);
110111
confirmWidget = this._register(this.instantiationService.createInstance(
111-
SimpleChatConfirmationWidget,
112+
ChatConfirmationWidget,
112113
this.context.container,
113-
{ title, subtitle: toolInvocation.originMessage, buttons, message, toolbarData: { arg: toolInvocation, partType: 'chatToolConfirmation' } }
114+
{
115+
title,
116+
icon: tool?.icon && 'id' in tool.icon ? tool.icon : Codicon.tools,
117+
subtitle: toolInvocation.originMessage,
118+
buttons,
119+
message,
120+
toolbarData: { arg: toolInvocation, partType: 'chatToolConfirmation' }
121+
}
114122
));
115123
} else {
116124
const codeBlockRenderOptions: ICodeBlockRenderOptions = {

src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/bufferOutputPolling.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,8 @@ export function promptForMorePolling(command: string, token: CancellationToken,
163163
let part: ChatElicitationRequestPart | undefined = undefined;
164164
const promise = new Promise<boolean>(resolve => {
165165
const thePart = part = new ChatElicitationRequestPart(
166-
new MarkdownString(localize('poll.terminal.waiting', "Continue waiting for `{0}` to finish?", command)),
167-
new MarkdownString(localize('poll.terminal.polling', "Copilot will continue to poll for output to determine when the terminal becomes idle for up to 2 minutes.")),
166+
new MarkdownString(localize('poll.terminal.waiting', "Continue waiting?")),
167+
new MarkdownString(localize('poll.terminal.polling', "This will continue to poll for output to determine when the terminal becomes idle for up to 2 minutes.")),
168168
'',
169169
localize('poll.terminal.accept', 'Yes'),
170170
localize('poll.terminal.reject', 'No'),

0 commit comments

Comments
 (0)