@@ -301,78 +301,6 @@ export class UiProvider implements vscode.WebviewViewProvider {
301301 }
302302 }
303303
304- private async autoLoadLanguagesIfNeeded ( ) {
305- this . logger . logServiceCall (
306- "UiProvider" ,
307- "autoLoadLanguagesIfNeeded" ,
308- "started"
309- ) ;
310-
311- try {
312- // Check if languages are already configured
313- const config = vscode . workspace . getConfiguration ( "codeql-scanner" ) ;
314- const configuredLanguages = config . get < string [ ] > ( "languages" , [ ] ) ;
315-
316- if ( configuredLanguages . length > 0 ) {
317- this . logger . debug (
318- "UiProvider" ,
319- `Languages already configured: ${ configuredLanguages . join ( ", " ) } `
320- ) ;
321- return ;
322- }
323-
324- // If no CodeQL service is available, can't auto-load
325- if ( ! this . _codeqlService ) {
326- this . logger . debug (
327- "UiProvider" ,
328- "CodeQL service not available for auto-loading languages"
329- ) ;
330- return ;
331- }
332-
333- this . logger . info (
334- "UiProvider" ,
335- "No languages configured, attempting to auto-load supported languages"
336- ) ;
337-
338- // Try to get supported languages from CodeQL CLI
339- await this . _codeqlService . getSupportedLanguages ( ) ;
340- const supportedLanguages = this . _codeqlService . getLanguages ( ) ;
341-
342- if ( supportedLanguages . length > 0 ) {
343- this . logger . info (
344- "UiProvider" ,
345- `Auto-loaded ${
346- supportedLanguages . length
347- } supported languages: ${ supportedLanguages . join ( ", " ) } `
348- ) ;
349-
350- // Send the languages to the webview for display
351- this . _view ?. webview . postMessage ( {
352- command : "supportedLanguagesLoaded" ,
353- success : true ,
354- languages : supportedLanguages ,
355- message : `Auto-loaded ${ supportedLanguages . length } supported languages` ,
356- } ) ;
357-
358- this . logger . logServiceCall (
359- "UiProvider" ,
360- "autoLoadLanguagesIfNeeded" ,
361- "completed" ,
362- { languageCount : supportedLanguages . length }
363- ) ;
364- } else {
365- this . logger . warn (
366- "UiProvider" ,
367- "No supported languages found during auto-load"
368- ) ;
369- }
370- } catch ( error ) {
371- this . logger . warn ( "UiProvider" , "Failed to auto-load languages" , error ) ;
372- // Don't show error to user for auto-loading, just log it
373- }
374- }
375-
376304 private async autoSelectGitHubLanguages ( ) : Promise < string [ ] > {
377305 this . logger . logServiceCall (
378306 "UiProvider" ,
@@ -570,7 +498,9 @@ export class UiProvider implements vscode.WebviewViewProvider {
570498 message :
571499 alert . message ?. text || alert . rule ?. description || "No description" ,
572500 location : {
573- file : alert . most_recent_instance ?. location ?. path || "unknown" ,
501+ file : alert . most_recent_instance ?. location ?. path
502+ ? path . join ( vscode . workspace . workspaceFolders ?. [ 0 ] ?. uri . fsPath || "" , alert . most_recent_instance . location . path )
503+ : "unknown" ,
574504 startLine : alert . most_recent_instance ?. location ?. start_line || 1 ,
575505 startColumn : alert . most_recent_instance ?. location ?. start_column || 1 ,
576506 endLine : alert . most_recent_instance ?. location ?. end_line || 1 ,
0 commit comments