mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-28 06:31:58 +00:00
chat - remove obsolete triggerSetupWithoutDialog action (#268126)
This commit is contained in:
parent
34620b040d
commit
1974b16331
@ -943,7 +943,7 @@ export class ChatSetupContribution extends Disposable implements IWorkbenchContr
|
||||
});
|
||||
}
|
||||
|
||||
override async run(accessor: ServicesAccessor, mode?: ChatModeKind, options?: { forceSignInDialog?: boolean; forceNoDialog?: boolean; additionalScopes?: readonly string[]; forceAnonymous?: boolean }): Promise<boolean> {
|
||||
override async run(accessor: ServicesAccessor, mode?: ChatModeKind, options?: { forceSignInDialog?: boolean; additionalScopes?: readonly string[]; forceAnonymous?: boolean }): Promise<boolean> {
|
||||
const viewsService = accessor.get(IViewsService);
|
||||
const layoutService = accessor.get(IWorkbenchLayoutService);
|
||||
const instantiationService = accessor.get(IInstantiationService);
|
||||
@ -960,14 +960,6 @@ export class ChatSetupContribution extends Disposable implements IWorkbenchContr
|
||||
chatWidget?.input.setChatMode(mode);
|
||||
}
|
||||
|
||||
if (options?.forceNoDialog) {
|
||||
const chatWidget = await showCopilotView(viewsService, layoutService);
|
||||
ChatSetup.getInstance(instantiationService, context, controller).skipDialog();
|
||||
chatWidget?.acceptInput(localize('setupChat', "Set up chat."));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
const setup = ChatSetup.getInstance(instantiationService, context, controller);
|
||||
const { success } = await setup.run(options);
|
||||
if (success === false && !lifecycleService.willShutdown) {
|
||||
@ -1005,25 +997,6 @@ export class ChatSetupContribution extends Disposable implements IWorkbenchContr
|
||||
}
|
||||
}
|
||||
|
||||
class ChatSetupTriggerWithoutDialogAction extends Action2 {
|
||||
|
||||
constructor() {
|
||||
super({
|
||||
id: 'workbench.action.chat.triggerSetupWithoutDialog',
|
||||
title: ChatSetupTriggerAction.CHAT_SETUP_ACTION_LABEL
|
||||
});
|
||||
}
|
||||
|
||||
override async run(accessor: ServicesAccessor): Promise<unknown> {
|
||||
const commandService = accessor.get(ICommandService);
|
||||
const telemetryService = accessor.get(ITelemetryService);
|
||||
|
||||
telemetryService.publicLog2<WorkbenchActionExecutedEvent, WorkbenchActionExecutedClassification>('workbenchActionExecuted', { id: CHAT_SETUP_ACTION_ID, from: 'api' });
|
||||
|
||||
return commandService.executeCommand(CHAT_SETUP_ACTION_ID, undefined, { forceNoDialog: true });
|
||||
}
|
||||
}
|
||||
|
||||
class ChatSetupTriggerAnonymouslyAction extends Action2 {
|
||||
|
||||
constructor() {
|
||||
@ -1169,7 +1142,6 @@ export class ChatSetupContribution extends Disposable implements IWorkbenchContr
|
||||
registerAction2(ChatSetupTriggerAction);
|
||||
registerAction2(ChatSetupTriggerForceSignInDialogAction);
|
||||
registerAction2(ChatSetupFromAccountsAction);
|
||||
registerAction2(ChatSetupTriggerWithoutDialogAction);
|
||||
registerAction2(ChatSetupTriggerAnonymouslyAction);
|
||||
registerAction2(UpgradePlanAction);
|
||||
registerAction2(EnableOveragesAction);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user