Skip to content

Commit 9d5a300

Browse files
authored
Merge pull request #192 from Exafunction/fixes
Re-auth on failure, pin language server for specific portals
2 parents f61b319 + fc046bb commit 9d5a300

File tree

2 files changed

+22
-7
lines changed

2 files changed

+22
-7
lines changed

.github/workflows/build-extension.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
- name: Set Release Condition
3737
id: check_release
3838
run: |
39-
$isRelease = "${{ github.event_name == 'push' && github.ref_type == 'tag' && startsWith(github.ref, 'refs/tags/enterprise-release-v') && (github.actor == 'saranshsaini' || github.actor == 'fortenforge') }}"
39+
$isRelease = "${{ github.event_name == 'push' && github.ref_type == 'tag' && startsWith(github.ref, 'refs/tags/enterprise-release-v') && (github.actor == 'edwardpark97' || github.actor == 'saranshsaini' || github.actor == 'fortenforge') }}"
4040
echo "IS_RELEASE=$isRelease" | Out-File -FilePath $env:GITHUB_ENV -Append
4141
if ($isRelease -eq 'true') {
4242
$tag = "${{ github.ref_name }}"

CodeiumVS/LanguageServer/LanguageServer.cs

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)