@@ -305,7 +305,7 @@ export class LspController {
305305 }
306306
307307 async buildIndex ( ) {
308- getLogger ( ) . info ( `LspController: Starting to build vector index of project` )
308+ getLogger ( ) . info ( `LspController: Starting to build index of project` )
309309 const start = performance . now ( )
310310 const projPaths = getProjectPaths ( )
311311 projPaths . sort ( )
@@ -332,7 +332,7 @@ export class LspController {
332332 false
333333 )
334334 if ( resp ) {
335- getLogger ( ) . debug ( `LspController: Finish building vector index of project` )
335+ getLogger ( ) . debug ( `LspController: Finish building index of project` )
336336 const usage = await LspClient . instance . getLspServerUsage ( )
337337 telemetry . amazonq_indexWorkspace . emit ( {
338338 duration : performance . now ( ) - start ,
@@ -344,7 +344,7 @@ export class LspController {
344344 credentialStartUrl : AuthUtil . instance . startUrl ,
345345 } )
346346 } else {
347- getLogger ( ) . error ( `LspController: Failed to build vector index of project` )
347+ getLogger ( ) . error ( `LspController: Failed to build index of project` )
348348 telemetry . amazonq_indexWorkspace . emit ( {
349349 duration : performance . now ( ) - start ,
350350 result : 'Failed' ,
@@ -353,7 +353,7 @@ export class LspController {
353353 } )
354354 }
355355 } catch ( e ) {
356- getLogger ( ) . error ( `LspController: Failed to build vector index of project` )
356+ getLogger ( ) . error ( `LspController: Failed to build index of project` )
357357 telemetry . amazonq_indexWorkspace . emit ( {
358358 duration : performance . now ( ) - start ,
359359 result : 'Failed' ,
@@ -372,20 +372,16 @@ export class LspController {
372372 return
373373 }
374374 setImmediate ( async ( ) => {
375- if ( ! CodeWhispererSettings . instance . isLocalIndexEnabled ( ) ) {
376- // only download LSP for users who did not turn on this feature
377- // do not start LSP server
378- await LspController . instance . tryInstallLsp ( context )
379- return
380- }
381375 const ok = await LspController . instance . tryInstallLsp ( context )
382376 if ( ! ok ) {
383377 return
384378 }
385379 try {
386380 await activateLsp ( context )
387381 getLogger ( ) . info ( 'LspController: LSP activated' )
388- void LspController . instance . buildIndex ( )
382+ if ( CodeWhispererSettings . instance . isLocalIndexEnabled ( ) ) {
383+ void LspController . instance . buildIndex ( )
384+ }
389385 // log the LSP server CPU and Memory usage per 30 minutes.
390386 globals . clock . setInterval (
391387 async ( ) => {
0 commit comments