Skip to content

Commit 1591ace

Browse files
authored
More inline chat fixes (microsoft#208780)
* disable send dropdown menu rendering for anything but panel chat location fixes microsoft#208569 * fix microsoft#208634
1 parent 9ed28b5 commit 1591ace

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

src/vs/workbench/contrib/chat/browser/chatInputPart.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -372,9 +372,11 @@ export class ChatInputPart extends Disposable implements IHistoryNavigationWidge
372372
},
373373
hiddenItemStrategy: HiddenItemStrategy.Ignore, // keep it lean when hiding items and avoid a "..." overflow menu
374374
actionViewItemProvider: (action, options) => {
375-
if ((action.id === SubmitAction.ID || action.id === CancelAction.ID) && action instanceof MenuItemAction) {
376-
const dropdownAction = this.instantiationService.createInstance(MenuItemAction, { id: 'chat.moreExecuteActions', title: localize('notebook.moreExecuteActionsLabel', "More..."), icon: Codicon.chevronDown }, undefined, undefined, undefined);
377-
return this.instantiationService.createInstance(ChatSubmitDropdownActionItem, action, dropdownAction);
375+
if (this.location === ChatAgentLocation.Panel) {
376+
if ((action.id === SubmitAction.ID || action.id === CancelAction.ID) && action instanceof MenuItemAction) {
377+
const dropdownAction = this.instantiationService.createInstance(MenuItemAction, { id: 'chat.moreExecuteActions', title: localize('notebook.moreExecuteActionsLabel', "More..."), icon: Codicon.chevronDown }, undefined, undefined, undefined);
378+
return this.instantiationService.createInstance(ChatSubmitDropdownActionItem, action, dropdownAction);
379+
}
378380
}
379381

380382
return undefined;

src/vs/workbench/contrib/inlineChat/browser/inlineChatWidget.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -553,9 +553,10 @@ export class InlineChatWidget {
553553
const isTempMessage = typeof ops.resetAfter === 'number';
554554
if (isTempMessage && !this._elements.statusLabel.dataset['state']) {
555555
const statusLabel = this._elements.statusLabel.innerText;
556+
const title = this._elements.statusLabel.dataset['title'];
556557
const classes = Array.from(this._elements.statusLabel.classList.values());
557558
setTimeout(() => {
558-
this.updateStatus(statusLabel, { classes, keepMessage: true });
559+
this.updateStatus(statusLabel, { classes, keepMessage: true, title });
559560
}, ops.resetAfter);
560561
}
561562
const renderedMessage = renderLabelWithIcons(message);
@@ -568,7 +569,11 @@ export class InlineChatWidget {
568569
delete this._elements.statusLabel.dataset['state'];
569570
}
570571

571-
this._elements.statusLabel.dataset['title'] = ops.title;
572+
if (ops.title) {
573+
this._elements.statusLabel.dataset['title'] = ops.title;
574+
} else {
575+
delete this._elements.statusLabel.dataset['title'];
576+
}
572577
this._onDidChangeHeight.fire();
573578
}
574579

0 commit comments

Comments
 (0)