@@ -796,17 +796,17 @@ describe('extensionsCommand', () => {
796796 } ) ;
797797 } ) ;
798798
799- describe ( 'restart ' , ( ) => {
800- let restartAction : SlashCommand [ 'action' ] ;
799+ describe ( 'reload ' , ( ) => {
800+ let reloadAction : SlashCommand [ 'action' ] ;
801801 let mockRestartExtension : MockedFunction <
802802 typeof ExtensionLoader . prototype . restartExtension
803803 > ;
804804
805805 beforeEach ( ( ) => {
806- restartAction = extensionsCommand ( ) . subCommands ?. find (
807- ( c ) => c . name === 'restart ' ,
806+ reloadAction = extensionsCommand ( ) . subCommands ?. find (
807+ ( c ) => c . name === 'reload ' ,
808808 ) ?. action ;
809- expect ( restartAction ) . not . toBeNull ( ) ;
809+ expect ( reloadAction ) . not . toBeNull ( ) ;
810810
811811 mockRestartExtension = vi . fn ( ) ;
812812 mockContext . services . config ! . getExtensionLoader = vi
@@ -815,7 +815,7 @@ describe('extensionsCommand', () => {
815815 getExtensions : mockGetExtensions ,
816816 restartExtension : mockRestartExtension ,
817817 } ) ) ;
818- mockContext . invocation ! . name = 'restart ' ;
818+ mockContext . invocation ! . name = 'reload ' ;
819819 } ) ;
820820
821821 it ( 'should show a message if no extensions are installed' , async ( ) => {
@@ -826,37 +826,37 @@ describe('extensionsCommand', () => {
826826 restartExtension : mockRestartExtension ,
827827 } ) ) ;
828828
829- await restartAction ! ( mockContext , '--all' ) ;
829+ await reloadAction ! ( mockContext , '--all' ) ;
830830
831831 expect ( mockContext . ui . addItem ) . toHaveBeenCalledWith ( {
832832 type : MessageType . INFO ,
833833 text : 'No extensions installed. Run `/extensions explore` to check out the gallery.' ,
834834 } ) ;
835835 } ) ;
836836
837- it ( 'restarts all active extensions when --all is provided' , async ( ) => {
837+ it ( 'reloads all active extensions when --all is provided' , async ( ) => {
838838 const mockExtensions = [
839839 { name : 'ext1' , isActive : true } ,
840840 { name : 'ext2' , isActive : true } ,
841841 { name : 'ext3' , isActive : false } ,
842842 ] as GeminiCLIExtension [ ] ;
843843 mockGetExtensions . mockReturnValue ( mockExtensions ) ;
844844
845- await restartAction ! ( mockContext , '--all' ) ;
845+ await reloadAction ! ( mockContext , '--all' ) ;
846846
847847 expect ( mockRestartExtension ) . toHaveBeenCalledTimes ( 2 ) ;
848848 expect ( mockRestartExtension ) . toHaveBeenCalledWith ( mockExtensions [ 0 ] ) ;
849849 expect ( mockRestartExtension ) . toHaveBeenCalledWith ( mockExtensions [ 1 ] ) ;
850850 expect ( mockContext . ui . addItem ) . toHaveBeenCalledWith (
851851 expect . objectContaining ( {
852852 type : MessageType . INFO ,
853- text : 'Restarting 2 extensions...' ,
853+ text : 'Reloading 2 extensions...' ,
854854 } ) ,
855855 ) ;
856856 expect ( mockContext . ui . addItem ) . toHaveBeenCalledWith (
857857 expect . objectContaining ( {
858858 type : MessageType . INFO ,
859- text : '2 extensions restarted successfully.' ,
859+ text : '2 extensions reloaded successfully.' ,
860860 } ) ,
861861 ) ;
862862 expect ( mockContext . ui . dispatchExtensionStateUpdate ) . toHaveBeenCalledWith ( {
@@ -869,15 +869,15 @@ describe('extensionsCommand', () => {
869869 } ) ;
870870 } ) ;
871871
872- it ( 'restarts only specified active extensions' , async ( ) => {
872+ it ( 'reloads only specified active extensions' , async ( ) => {
873873 const mockExtensions = [
874874 { name : 'ext1' , isActive : false } ,
875875 { name : 'ext2' , isActive : true } ,
876876 { name : 'ext3' , isActive : true } ,
877877 ] as GeminiCLIExtension [ ] ;
878878 mockGetExtensions . mockReturnValue ( mockExtensions ) ;
879879
880- await restartAction ! ( mockContext , 'ext1 ext3' ) ;
880+ await reloadAction ! ( mockContext , 'ext1 ext3' ) ;
881881
882882 expect ( mockRestartExtension ) . toHaveBeenCalledTimes ( 1 ) ;
883883 expect ( mockRestartExtension ) . toHaveBeenCalledWith ( mockExtensions [ 2 ] ) ;
@@ -890,7 +890,7 @@ describe('extensionsCommand', () => {
890890 it ( 'shows an error if no extension loader is available' , async ( ) => {
891891 mockContext . services . config ! . getExtensionLoader = vi . fn ( ) ;
892892
893- await restartAction ! ( mockContext , '--all' ) ;
893+ await reloadAction ! ( mockContext , '--all' ) ;
894894
895895 expect ( mockContext . ui . addItem ) . toHaveBeenCalledWith (
896896 expect . objectContaining ( {
@@ -902,31 +902,31 @@ describe('extensionsCommand', () => {
902902 } ) ;
903903
904904 it ( 'shows usage error for no arguments' , async ( ) => {
905- await restartAction ! ( mockContext , '' ) ;
905+ await reloadAction ! ( mockContext , '' ) ;
906906
907907 expect ( mockContext . ui . addItem ) . toHaveBeenCalledWith (
908908 expect . objectContaining ( {
909909 type : MessageType . ERROR ,
910- text : 'Usage: /extensions restart <extension-names>|--all' ,
910+ text : 'Usage: /extensions reload <extension-names>|--all' ,
911911 } ) ,
912912 ) ;
913913 expect ( mockRestartExtension ) . not . toHaveBeenCalled ( ) ;
914914 } ) ;
915915
916- it ( 'handles errors during extension restart ' , async ( ) => {
916+ it ( 'handles errors during extension reload ' , async ( ) => {
917917 const mockExtensions = [
918918 { name : 'ext1' , isActive : true } ,
919919 ] as GeminiCLIExtension [ ] ;
920920 mockGetExtensions . mockReturnValue ( mockExtensions ) ;
921921 mockRestartExtension . mockRejectedValue ( new Error ( 'Failed to restart' ) ) ;
922922
923- await restartAction ! ( mockContext , '--all' ) ;
923+ await reloadAction ! ( mockContext , '--all' ) ;
924924
925925 expect ( mockRestartExtension ) . toHaveBeenCalledWith ( mockExtensions [ 0 ] ) ;
926926 expect ( mockContext . ui . addItem ) . toHaveBeenCalledWith (
927927 expect . objectContaining ( {
928928 type : MessageType . ERROR ,
929- text : 'Failed to restart some extensions:\n ext1: Failed to restart' ,
929+ text : 'Failed to reload some extensions:\n ext1: Failed to restart' ,
930930 } ) ,
931931 ) ;
932932 } ) ;
@@ -937,7 +937,7 @@ describe('extensionsCommand', () => {
937937 ] as GeminiCLIExtension [ ] ;
938938 mockGetExtensions . mockReturnValue ( mockExtensions ) ;
939939
940- await restartAction ! ( mockContext , 'ext1 ext2' ) ;
940+ await reloadAction ! ( mockContext , 'ext1 ext2' ) ;
941941
942942 expect ( mockRestartExtension ) . toHaveBeenCalledTimes ( 1 ) ;
943943 expect ( mockRestartExtension ) . toHaveBeenCalledWith ( mockExtensions [ 0 ] ) ;
@@ -949,13 +949,13 @@ describe('extensionsCommand', () => {
949949 ) ;
950950 } ) ;
951951
952- it ( 'does not restart any extensions if none are found' , async ( ) => {
952+ it ( 'does not reload any extensions if none are found' , async ( ) => {
953953 const mockExtensions = [
954954 { name : 'ext1' , isActive : true } ,
955955 ] as GeminiCLIExtension [ ] ;
956956 mockGetExtensions . mockReturnValue ( mockExtensions ) ;
957957
958- await restartAction ! ( mockContext , 'ext2 ext3' ) ;
958+ await reloadAction ! ( mockContext , 'ext2 ext3' ) ;
959959
960960 expect ( mockRestartExtension ) . not . toHaveBeenCalled ( ) ;
961961 expect ( mockContext . ui . addItem ) . toHaveBeenCalledWith (
@@ -966,8 +966,8 @@ describe('extensionsCommand', () => {
966966 ) ;
967967 } ) ;
968968
969- it ( 'should suggest only enabled extension names for the restart command' , async ( ) => {
970- mockContext . invocation ! . name = 'restart ' ;
969+ it ( 'should suggest only enabled extension names for the reload command' , async ( ) => {
970+ mockContext . invocation ! . name = 'reload ' ;
971971 const mockExtensions = [
972972 { name : 'ext1' , isActive : true } ,
973973 { name : 'ext2' , isActive : false } ,
0 commit comments