@@ -232,6 +232,11 @@ private async Task GetLanguageServerInfoAsync()
232232 {
233233 _languageServerVersion = version ;
234234 }
235+ // Only pin to 1.50.100 for specific portal URLs
236+ if ( portalUrl . Contains ( ".windsurf.com" ) || portalUrl . Contains ( "dstart.com" ) )
237+ {
238+ _languageServerVersion = "1.50.100" ;
239+ }
235240 }
236241 catch ( Exception )
237242 {
@@ -725,8 +730,18 @@ private void LSP_OnPipeDataReceived(object sender, DataReceivedEventArgs e)
725730 return JsonConvert . DeserializeObject < T > ( await rq . Content . ReadAsStringAsync ( ) ) ;
726731 }
727732
728- await _package . LogAsync (
729- $ "Error: Failed to send request to { url } , status code: { rq . StatusCode } ") ;
733+ // If auth failed, sign out and show login prompt
734+ if ( rq . StatusCode == HttpStatusCode . Forbidden ||
735+ rq . StatusCode == HttpStatusCode . Unauthorized )
736+ {
737+ await _package . LogAsync ( "Session expired - please sign in again" ) ;
738+ await SignOutAsync ( ) ;
739+ }
740+ else
741+ {
742+ await _package . LogAsync (
743+ $ "Error: Failed to send request to { url } , status code: { rq . StatusCode } ") ;
744+ }
730745 }
731746 catch ( OperationCanceledException )
732747 {
@@ -881,7 +896,7 @@ async Task AddFilesToIndexLists(EnvDTE.Project project)
881896 remainingToFind -= 1 ;
882897 remainingProjectsToIndexPath . Add ( dir ) ;
883898 }
884-
899+
885900 processedProjects . Add ( project . Name ) ;
886901 }
887902
@@ -908,7 +923,7 @@ async Task AddFilesToIndexLists(EnvDTE.Project project)
908923 {
909924 await AddFilesToIndexLists ( project ) ;
910925 }
911- catch ( Exception ex )
926+ catch ( Exception ex )
912927 {
913928 await _package . LogAsync ( $ "Failed to process open project: { ex . Message } ") ;
914929 continue ;
@@ -924,12 +939,12 @@ async Task AddFilesToIndexLists(EnvDTE.Project project)
924939 {
925940 await AddFilesToIndexLists ( project ) ;
926941 }
927- catch ( Exception ex )
942+ catch ( Exception ex )
928943 {
929944 await _package . LogAsync ( $ "Failed to process remaining project: { ex . Message } ") ;
930945 continue ;
931946 }
932- if ( remainingToFind <= 0 )
947+ if ( remainingToFind <= 0 )
933948 {
934949 break ;
935950 }
0 commit comments