@@ -32,7 +32,6 @@ import { ChatSetupController } from './chatSetupController.js';
3232import { IChatSetupResult , ChatSetupAnonymous , InstallChatEvent , InstallChatClassification , ChatSetupStrategy , ChatSetupResultValue } from './chatSetup.js' ;
3333import { IDefaultAccountService } from '../../../../../platform/defaultAccount/common/defaultAccount.js' ;
3434import { IHostService } from '../../../../services/host/browser/host.js' ;
35- import { IWorkbenchAssignmentService } from '../../../../services/assignment/common/assignmentService.js' ;
3635
3736const defaultChat = {
3837 publicCodeMatchesUrl : product . defaultChatAgent ?. publicCodeMatchesUrl ?? '' ,
@@ -51,7 +50,7 @@ export class ChatSetup {
5150 let instance = ChatSetup . instance ;
5251 if ( ! instance ) {
5352 instance = ChatSetup . instance = instantiationService . invokeFunction ( accessor => {
54- return new ChatSetup ( context , controller , accessor . get ( ITelemetryService ) , accessor . get ( IWorkbenchLayoutService ) , accessor . get ( IKeybindingService ) , accessor . get ( IChatEntitlementService ) as ChatEntitlementService , accessor . get ( ILogService ) , accessor . get ( IChatWidgetService ) , accessor . get ( IWorkspaceTrustRequestService ) , accessor . get ( IMarkdownRendererService ) , accessor . get ( IDefaultAccountService ) , accessor . get ( IHostService ) , accessor . get ( IWorkbenchAssignmentService ) ) ;
53+ return new ChatSetup ( context , controller , accessor . get ( ITelemetryService ) , accessor . get ( IWorkbenchLayoutService ) , accessor . get ( IKeybindingService ) , accessor . get ( IChatEntitlementService ) as ChatEntitlementService , accessor . get ( ILogService ) , accessor . get ( IChatWidgetService ) , accessor . get ( IWorkspaceTrustRequestService ) , accessor . get ( IMarkdownRendererService ) , accessor . get ( IDefaultAccountService ) , accessor . get ( IHostService ) ) ;
5554 } ) ;
5655 }
5756
@@ -75,14 +74,13 @@ export class ChatSetup {
7574 @IMarkdownRendererService private readonly markdownRendererService : IMarkdownRendererService ,
7675 @IDefaultAccountService private readonly defaultAccountService : IDefaultAccountService ,
7776 @IHostService private readonly hostService : IHostService ,
78- @IWorkbenchAssignmentService private readonly experimentService : IWorkbenchAssignmentService ,
7977 ) { }
8078
8179 skipDialog ( ) : void {
8280 this . skipDialogOnce = true ;
8381 }
8482
85- async run ( options ?: { disableChatViewReveal ?: boolean ; forceSignInDialog ?: boolean ; additionalScopes ?: readonly string [ ] ; forceAnonymous ?: ChatSetupAnonymous ; dialogIcon ?: ThemeIcon ; dialogTitle ?: string ; dialogHideSkip ?: boolean } ) : Promise < IChatSetupResult > {
83+ async run ( options ?: { disableChatViewReveal ?: boolean ; forceSignInDialog ?: boolean ; additionalScopes ?: readonly string [ ] ; forceAnonymous ?: ChatSetupAnonymous ; dialogIcon ?: ThemeIcon ; dialogTitle ?: string } ) : Promise < IChatSetupResult > {
8684 if ( this . pendingRun ) {
8785 return this . pendingRun ;
8886 }
@@ -96,7 +94,7 @@ export class ChatSetup {
9694 }
9795 }
9896
99- private async doRun ( options ?: { disableChatViewReveal ?: boolean ; forceSignInDialog ?: boolean ; additionalScopes ?: readonly string [ ] ; forceAnonymous ?: ChatSetupAnonymous ; dialogIcon ?: ThemeIcon ; dialogTitle ?: string ; dialogHideSkip ?: boolean } ) : Promise < IChatSetupResult > {
97+ private async doRun ( options ?: { disableChatViewReveal ?: boolean ; forceSignInDialog ?: boolean ; additionalScopes ?: readonly string [ ] ; forceAnonymous ?: ChatSetupAnonymous ; dialogIcon ?: ThemeIcon ; dialogTitle ?: string } ) : Promise < IChatSetupResult > {
10098 this . context . update ( { later : false } ) ;
10199
102100 const dialogSkipped = this . skipDialogOnce ;
@@ -162,11 +160,10 @@ export class ChatSetup {
162160 return { success, dialogSkipped } ;
163161 }
164162
165- private async showDialog ( options ?: { forceSignInDialog ?: boolean ; forceAnonymous ?: ChatSetupAnonymous ; dialogIcon ?: ThemeIcon ; dialogTitle ?: string ; dialogHideSkip ?: boolean } ) : Promise < ChatSetupStrategy > {
163+ private async showDialog ( options ?: { forceSignInDialog ?: boolean ; forceAnonymous ?: ChatSetupAnonymous ; dialogIcon ?: ThemeIcon ; dialogTitle ?: string } ) : Promise < ChatSetupStrategy > {
166164 const disposables = new DisposableStore ( ) ;
167165
168- const useCloseButton = options ?. dialogHideSkip || await this . experimentService . getTreatment < boolean > ( 'chatSetupDialogCloseButton' ) ;
169- const buttons = this . getButtons ( options , useCloseButton ) ;
166+ const buttons = this . getButtons ( options ) ;
170167
171168 const dialog = disposables . add ( new Dialog (
172169 this . layoutService . activeContainer ,
@@ -178,8 +175,8 @@ export class ChatSetup {
178175 detail : ' ' , // workaround allowing us to render the message in large
179176 icon : options ?. dialogIcon ?? Codicon . copilotLarge ,
180177 alignment : DialogContentsAlignment . Vertical ,
181- cancelId : useCloseButton ? buttons . length : buttons . length - 1 ,
182- disableCloseButton : ! useCloseButton ,
178+ cancelId : buttons . length ,
179+ disableCloseButton : false ,
183180 renderFooter : footer => footer . appendChild ( this . createDialogFooter ( disposables , options ) ) ,
184181 buttonOptions : buttons . map ( button => button [ 2 ] )
185182 } , this . keybindingService , this . layoutService , this . hostService )
@@ -191,7 +188,7 @@ export class ChatSetup {
191188 return buttons [ button ] ?. [ 1 ] ?? ChatSetupStrategy . Canceled ;
192189 }
193190
194- private getButtons ( options ?: { forceSignInDialog ?: boolean ; forceAnonymous ?: ChatSetupAnonymous } , useCloseButton ?: boolean ) : Array < [ string , ChatSetupStrategy , { styleButton ?: ( button : IButton ) => void } | undefined ] > {
191+ private getButtons ( options ?: { forceSignInDialog ?: boolean ; forceAnonymous ?: ChatSetupAnonymous } ) : Array < [ string , ChatSetupStrategy , { styleButton ?: ( button : IButton ) => void } | undefined ] > {
195192 type ContinueWithButton = [ string , ChatSetupStrategy , { styleButton ?: ( button : IButton ) => void } | undefined ] ;
196193 const styleButton = ( ...classes : string [ ] ) => ( { styleButton : ( button : IButton ) => button . element . classList . add ( ...classes ) } ) ;
197194
@@ -225,10 +222,6 @@ export class ChatSetup {
225222 buttons = [ [ localize ( 'setupAIButton' , "Use AI Features" ) , ChatSetupStrategy . DefaultSetup , undefined ] ] ;
226223 }
227224
228- if ( ! useCloseButton ) {
229- buttons . push ( [ localize ( 'skipForNow' , "Skip for now" ) , ChatSetupStrategy . Canceled , styleButton ( 'link-button' , 'skip-button' ) ] ) ;
230- }
231-
232225 return buttons ;
233226 }
234227
0 commit comments