@@ -634,11 +634,18 @@ export class SettingsEditor2 extends EditorPane {
634634 if ( ! setupHidden && showSuggestions ) {
635635 const showAiResultActionClassNames = [ 'action-label' , ThemeIcon . asClassName ( preferencesAiResultsIcon ) ] ;
636636 const searchServiceEnabled = this . aiSettingsSearchService . isEnabled ( ) ;
637+
637638 this . showAiResultsAction = this . _register ( new Action ( SETTINGS_EDITOR_COMMAND_SHOW_AI_RESULTS ,
638- localize ( 'showAiResultsDescription' , "Search settings with AI" ) , showAiResultActionClassNames . join ( ' ' ) , searchServiceEnabled
639+ searchServiceEnabled
640+ ? localize ( 'showAiResultsDescription' , "Search settings with AI" )
641+ : localize ( 'showAiResultsNotReady' , "AI search functionality loading..." ) ,
642+ showAiResultActionClassNames . join ( ' ' ) , searchServiceEnabled
639643 ) ) ;
640644 this . _register ( this . aiSettingsSearchService . onProviderRegistered ( ( ) => {
641- this . showAiResultsAction ! . enabled = true ;
645+ if ( this . showAiResultsAction ) {
646+ this . showAiResultsAction . label = localize ( 'showAiResultsDescription' , "Search settings with AI" ) ;
647+ this . showAiResultsAction . enabled = true ;
648+ }
642649 } ) ) ;
643650 this . _register ( this . showAiResultsAction . onDidChange ( ( ) => {
644651 this . onSearchInputChanged ( true ) ;
@@ -724,7 +731,7 @@ export class SettingsEditor2 extends EditorPane {
724731 return this . instantiationService . createInstance ( SettingsSearchFilterDropdownMenuActionViewItem , action , options , this . actionRunner , this . searchWidget ) ;
725732 }
726733 if ( this . showAiResultsAction && action . id === this . showAiResultsAction . id ) {
727- return new ToggleActionViewItem ( null , action , { ...options , toggleStyles : defaultToggleStyles } ) ;
734+ return new ToggleActionViewItem ( null , action , { ...options , keybinding : 'Ctrl+I' , toggleStyles : defaultToggleStyles } ) ;
728735 }
729736 return undefined ;
730737 }
0 commit comments