mirror of
https://github.com/coder/code-server.git
synced 2026-05-09 13:57:26 +02:00
Update to VS Code 1.52.1
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { INotification, INotificationHandle, INotificationActions, INotificationProgress, NoOpNotification, Severity, NotificationMessage, IPromptChoice, IStatusMessageOptions, NotificationsFilter, INotificationProgressProperties } from 'vs/platform/notification/common/notification';
|
||||
import { INotification, INotificationHandle, INotificationActions, INotificationProgress, NoOpNotification, Severity, NotificationMessage, IPromptChoice, IStatusMessageOptions, NotificationsFilter, INotificationProgressProperties, IPromptChoiceWithMenu } from 'vs/platform/notification/common/notification';
|
||||
import { toErrorMessage } from 'vs/base/common/errorMessage';
|
||||
import { Event, Emitter } from 'vs/base/common/event';
|
||||
import { Disposable, IDisposable, toDisposable } from 'vs/base/common/lifecycle';
|
||||
@@ -695,6 +695,7 @@ export class ChoiceAction extends Action {
|
||||
readonly onDidRun = this._onDidRun.event;
|
||||
|
||||
private readonly _keepOpen: boolean;
|
||||
private readonly _menu: ChoiceAction[] | undefined;
|
||||
|
||||
constructor(id: string, choice: IPromptChoice) {
|
||||
super(id, choice.label, undefined, true, async () => {
|
||||
@@ -707,6 +708,11 @@ export class ChoiceAction extends Action {
|
||||
});
|
||||
|
||||
this._keepOpen = !!choice.keepOpen;
|
||||
this._menu = !choice.isSecondary && (<IPromptChoiceWithMenu>choice).menu ? (<IPromptChoiceWithMenu>choice).menu.map((c, index) => new ChoiceAction(`${id}.${index}`, c)) : undefined;
|
||||
}
|
||||
|
||||
get menu(): ChoiceAction[] | undefined {
|
||||
return this._menu;
|
||||
}
|
||||
|
||||
get keepOpen(): boolean {
|
||||
|
||||
Reference in New Issue
Block a user