@@ -169,27 +169,31 @@ function getCommands(
169169 }
170170 } ;
171171
172+ const restartQueryServer = async ( ) =>
173+ withProgress (
174+ async ( progress : ProgressCallback , token : CancellationToken ) => {
175+ // Restart all of the spawned servers: cli, query, and language.
176+ cliServer . restartCliServer ( ) ;
177+ await Promise . all ( [
178+ queryRunner . restartQueryServer ( progress , token ) ,
179+ ideServer . restart ( ) ,
180+ ] ) ;
181+ void showAndLogInformationMessage ( "CodeQL Query Server restarted." , {
182+ outputLogger : queryServerLogger ,
183+ } ) ;
184+ } ,
185+ {
186+ title : "Restarting Query Server" ,
187+ } ,
188+ ) ;
189+
172190 return {
173191 "codeQL.openDocumentation" : async ( ) => {
174192 await env . openExternal ( Uri . parse ( "https://codeql.github.com/docs/" ) ) ;
175193 } ,
176- "codeQL.restartQueryServer" : async ( ) =>
177- withProgress (
178- async ( progress : ProgressCallback , token : CancellationToken ) => {
179- // Restart all of the spawned servers: cli, query, and language.
180- cliServer . restartCliServer ( ) ;
181- await Promise . all ( [
182- queryRunner . restartQueryServer ( progress , token ) ,
183- ideServer . restart ( ) ,
184- ] ) ;
185- void showAndLogInformationMessage ( "CodeQL Query Server restarted." , {
186- outputLogger : queryServerLogger ,
187- } ) ;
188- } ,
189- {
190- title : "Restarting Query Server" ,
191- } ,
192- ) ,
194+ "codeQL.restartQueryServer" : restartQueryServer ,
195+ "codeQL.restartQueryServerOnConfigChange" : restartQueryServer ,
196+ "codeQL.restartLegacyQueryServerOnConfigChange" : restartQueryServer ,
193197 "codeQL.copyVersion" : async ( ) => {
194198 const text = `CodeQL extension version: ${
195199 extension ?. packageJSON . version
0 commit comments