chat - remove obsolete triggerSetupWithoutDialog action (#268126)

This commit is contained in:
Benjamin Pasero 2025-09-24 11:17:29 +02:00 committed by GitHub
parent 34620b040d
commit 1974b16331
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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);