@@ -46,12 +46,12 @@ import { MarkdownString } from '../../../../base/common/htmlContent.js';
4646
4747const defaultChat = {
4848 extensionId : product . defaultChatAgent ?. extensionId ?? '' ,
49+ chatExtensionId : product . defaultChatAgent ?. chatExtensionId ?? '' ,
4950 name : product . defaultChatAgent ?. name ?? '' ,
5051 icon : Codicon [ product . defaultChatAgent ?. icon as keyof typeof Codicon ?? 'commentDiscussion' ] ,
5152 chatWelcomeTitle : product . defaultChatAgent ?. chatWelcomeTitle ?? '' ,
5253 documentationUrl : product . defaultChatAgent ?. documentationUrl ?? '' ,
5354 privacyStatementUrl : product . defaultChatAgent ?. privacyStatementUrl ?? '' ,
54- collectionDocumentationUrl : product . defaultChatAgent ?. collectionDocumentationUrl ?? '' ,
5555 skusDocumentationUrl : product . defaultChatAgent ?. skusDocumentationUrl ?? '' ,
5656 providerId : product . defaultChatAgent ?. providerId ?? '' ,
5757 providerName : product . defaultChatAgent ?. providerName ?? '' ,
@@ -468,7 +468,7 @@ class ChatSetupController extends Disposable {
468468
469469 installResult = 'installed' ;
470470 } catch ( error ) {
471- this . logService . trace ( `[chat setup] install: error ${ error } ` ) ;
471+ this . logService . error ( `[chat setup] install: error ${ error } ` ) ;
472472
473473 installResult = isCancellationError ( error ) ? 'cancelled' : 'failedInstall' ;
474474 }
@@ -519,7 +519,7 @@ class ChatSetupWelcomeContent extends Disposable {
519519 const limitedSkuHeaderElement = this . element . appendChild ( $ ( 'p' ) ) . appendChild ( this . _register ( markdown . render ( new MarkdownString ( limitedSkuHeader , { isTrusted : true } ) ) ) . element ) ;
520520
521521 const telemetryLabel = localize ( 'telemetryLabel' , "Allow {0} to use my data, including Prompts, Suggestions, and Code Snippets, for product improvements" , defaultChat . providerName ) ;
522- const { container : telemetryContainer , checkbox : telemetryCheckbox } = this . createCheckBox ( telemetryLabel , this . telemetryService . telemetryLevel === TelemetryLevel . NONE ? false : false ) ;
522+ const { container : telemetryContainer , checkbox : telemetryCheckbox } = this . createCheckBox ( telemetryLabel , this . telemetryService . telemetryLevel === TelemetryLevel . NONE ? false : true ) ;
523523
524524 const detectionLabel = localize ( 'detectionLabel' , "Allow suggestions matching public code" ) ;
525525 const { container : detectionContainer , checkbox : detectionCheckbox } = this . createCheckBox ( detectionLabel , true ) ;
@@ -530,23 +530,24 @@ class ChatSetupWelcomeContent extends Disposable {
530530 this . _register ( button . onDidClick ( ( ) => this . controller . setup ( telemetryCheckbox . checked , detectionCheckbox . checked ) ) ) ;
531531
532532 // Footer
533- const footer = localize ( { key : 'privacyFooter' , comment : [ '{Locked="]({0})"}' ] } , "By proceeding you agree to our [privacy statement]({0}). You can [learn more ]({1}) about {2}." , defaultChat . privacyStatementUrl , defaultChat . documentationUrl , defaultChat . name ) ;
533+ const footer = localize ( { key : 'privacyFooter' , comment : [ '{Locked="]({0})"}' ] } , "By proceeding you agree to our [privacy statement]({0}). Click [here ]({1}) to learn more about {2}." , defaultChat . privacyStatementUrl , defaultChat . documentationUrl , defaultChat . name ) ;
534534 this . element . appendChild ( $ ( 'p' ) ) . appendChild ( this . _register ( markdown . render ( new MarkdownString ( footer , { isTrusted : true } ) ) ) . element ) ;
535535
536536 // Update based on model state
537537 this . _register ( Event . runAndSubscribe ( this . controller . onDidChange , ( ) => this . update ( [ limitedSkuHeaderElement , telemetryContainer , detectionContainer ] , [ telemetryCheckbox , detectionCheckbox ] , button ) ) ) ;
538538 }
539539
540540 private createCheckBox ( label : string , checked : boolean ) : { container : HTMLElement ; checkbox : Checkbox } {
541- const container = this . element . appendChild ( $ ( 'p' ) ) ;
541+ const container = this . element . appendChild ( $ ( 'p.checkbox-container ' ) ) ;
542542 const checkbox = this . _register ( new Checkbox ( label , checked , defaultCheckboxStyles ) ) ;
543543 container . appendChild ( checkbox . domNode ) ;
544544
545- const checkboxLabel = container . appendChild ( $ ( 'div' ) ) ;
545+ const checkboxLabel = container . appendChild ( $ ( 'div.checkbox-label ' ) ) ;
546546 checkboxLabel . textContent = label ;
547547 this . _register ( addDisposableListener ( checkboxLabel , EventType . CLICK , ( ) => {
548548 if ( checkbox ?. enabled ) {
549549 checkbox . checked = ! checkbox . checked ;
550+ checkbox . focus ( ) ;
550551 }
551552 } ) ) ;
552553
@@ -717,17 +718,20 @@ class ChatSetupTriggerAction extends Action2 {
717718 override async run ( accessor : ServicesAccessor ) : Promise < void > {
718719 const viewsService = accessor . get ( IViewsService ) ;
719720 const instantiationService = accessor . get ( IInstantiationService ) ;
721+ const configurationService = accessor . get ( IConfigurationService ) ;
720722
721723 instantiationService . createInstance ( ChatSetupContextKeys ) . update ( { triggered : true } ) ;
722724
723725 showChatView ( viewsService ) ;
726+
727+ configurationService . updateValue ( 'chat.commandCenter.enabled' , true ) ;
724728 }
725729}
726730
727731class ChatSetupHideAction extends Action2 {
728732
729733 static readonly ID = 'workbench.action.chat.hideSetup' ;
730- static readonly TITLE = localize2 ( 'hideChatSetup' , "Hide {0}" , defaultChat . name ) ;
734+ static readonly TITLE = localize2 ( 'hideChatSetup' , "Hide {0}... " , defaultChat . name ) ;
731735
732736 constructor ( ) {
733737 super ( {
@@ -737,8 +741,8 @@ class ChatSetupHideAction extends Action2 {
737741 precondition : ChatContextKeys . Setup . installed . negate ( ) ,
738742 menu : {
739743 id : MenuId . ChatCommandCenter ,
740- group : 'a_first ' ,
741- order : 2 ,
744+ group : 'z_hide ' ,
745+ order : 1 ,
742746 when : ChatContextKeys . Setup . installed . negate ( )
743747 }
744748 } ) ;
@@ -753,8 +757,8 @@ class ChatSetupHideAction extends Action2 {
753757
754758 const { confirmed } = await dialogService . confirm ( {
755759 message : localize ( 'hideChatSetupConfirm' , "Are you sure you want to hide {0}?" , defaultChat . name ) ,
756- detail : localize ( 'hideChatSetupDetail' , "You can restore chat controls from the 'chat.commandCenter.enabled' setting." ) ,
757- primaryButton : localize ( 'hideChatSetup ' , "Hide {0}" , defaultChat . name )
760+ detail : localize ( 'hideChatSetupDetail' , "You can restore it by running the '{0}' command." , ChatSetupTriggerAction . TITLE . value ) ,
761+ primaryButton : localize ( 'hideChatSetupButton ' , "Hide {0}" , defaultChat . name )
758762 } ) ;
759763
760764 if ( ! confirmed ) {
0 commit comments