mirror of
https://github.com/Microsoft/vscode
synced 2024-08-28 05:19:39 +00:00
More inline chat fixes (#208780)
* disable send dropdown menu rendering for anything but panel chat location fixes https://github.com/microsoft/vscode/issues/208569 * fix https://github.com/microsoft/vscode/issues/208634
This commit is contained in:
parent
9ed28b5d67
commit
1591ace90e
|
@ -372,9 +372,11 @@ export class ChatInputPart extends Disposable implements IHistoryNavigationWidge
|
|||
},
|
||||
hiddenItemStrategy: HiddenItemStrategy.Ignore, // keep it lean when hiding items and avoid a "..." overflow menu
|
||||
actionViewItemProvider: (action, options) => {
|
||||
if ((action.id === SubmitAction.ID || action.id === CancelAction.ID) && action instanceof MenuItemAction) {
|
||||
const dropdownAction = this.instantiationService.createInstance(MenuItemAction, { id: 'chat.moreExecuteActions', title: localize('notebook.moreExecuteActionsLabel', "More..."), icon: Codicon.chevronDown }, undefined, undefined, undefined);
|
||||
return this.instantiationService.createInstance(ChatSubmitDropdownActionItem, action, dropdownAction);
|
||||
if (this.location === ChatAgentLocation.Panel) {
|
||||
if ((action.id === SubmitAction.ID || action.id === CancelAction.ID) && action instanceof MenuItemAction) {
|
||||
const dropdownAction = this.instantiationService.createInstance(MenuItemAction, { id: 'chat.moreExecuteActions', title: localize('notebook.moreExecuteActionsLabel', "More..."), icon: Codicon.chevronDown }, undefined, undefined, undefined);
|
||||
return this.instantiationService.createInstance(ChatSubmitDropdownActionItem, action, dropdownAction);
|
||||
}
|
||||
}
|
||||
|
||||
return undefined;
|
||||
|
|
|
@ -553,9 +553,10 @@ export class InlineChatWidget {
|
|||
const isTempMessage = typeof ops.resetAfter === 'number';
|
||||
if (isTempMessage && !this._elements.statusLabel.dataset['state']) {
|
||||
const statusLabel = this._elements.statusLabel.innerText;
|
||||
const title = this._elements.statusLabel.dataset['title'];
|
||||
const classes = Array.from(this._elements.statusLabel.classList.values());
|
||||
setTimeout(() => {
|
||||
this.updateStatus(statusLabel, { classes, keepMessage: true });
|
||||
this.updateStatus(statusLabel, { classes, keepMessage: true, title });
|
||||
}, ops.resetAfter);
|
||||
}
|
||||
const renderedMessage = renderLabelWithIcons(message);
|
||||
|
@ -568,7 +569,11 @@ export class InlineChatWidget {
|
|||
delete this._elements.statusLabel.dataset['state'];
|
||||
}
|
||||
|
||||
this._elements.statusLabel.dataset['title'] = ops.title;
|
||||
if (ops.title) {
|
||||
this._elements.statusLabel.dataset['title'] = ops.title;
|
||||
} else {
|
||||
delete this._elements.statusLabel.dataset['title'];
|
||||
}
|
||||
this._onDidChangeHeight.fire();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue