Skip to content

Commit

Permalink
more
Browse files Browse the repository at this point in the history
  • Loading branch information
fortenforge committed Mar 30, 2024
1 parent 7dbcd6e commit 44a1021
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 9 deletions.
17 changes: 12 additions & 5 deletions CodeiumVS/LanguageServer/LanguageServer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -732,15 +732,22 @@ private async Task InitializeTrackedWorkspaceAsync()
DTE dte = (DTE)ServiceProvider.GlobalProvider.GetService(typeof(DTE));
foreach (EnvDTE.Project project in dte.Solution.Projects)
{
string projectDir = Path.GetDirectoryName(project.FullName);
if (!string.IsNullOrEmpty(projectDir))
try
{
AddTrackedWorkspaceResponse response = await AddTrackedWorkspaceAsync(projectDir);
if (response != null)
string projectDir = Path.GetDirectoryName(project.FullName);
if (!string.IsNullOrEmpty(projectDir))
{
_initializedWorkspace = true;
AddTrackedWorkspaceResponse response = await AddTrackedWorkspaceAsync(projectDir);
if (response != null)
{
_initializedWorkspace = true;
}
}
}
catch (Exception)
{
continue;
}
}
}

Expand Down
24 changes: 22 additions & 2 deletions CodeiumVS/SuggestionUI/TextViewListener.cs
Original file line number Diff line number Diff line change
Expand Up @@ -395,15 +395,35 @@ public int Exec(ref Guid pguidCmdGroup, uint nCmdID, uint nCmdexecopt, IntPtr pv
// gets lsp completions on added character or deletions
if (!typedChar.Equals(char.MinValue) || commandID == (uint)VSConstants.VSStd2KCmdID.RETURN || regenerateSuggestion)
{
_ = Task.Run(() => GetCompletion());
_ = Task.Run(() =>
{
try
{
GetCompletion();
}
catch (Exception e)
{
Debug.Write(e);
}
});
handled = true;
}
else if (commandID == (uint)VSConstants.VSStd2KCmdID.BACKSPACE ||
commandID == (uint)VSConstants.VSStd2KCmdID.DELETE)
{
ClearSuggestion();

_ = Task.Run(() => GetCompletion());
_ = Task.Run(() =>
{
try
{
GetCompletion();
}
catch (Exception e)
{
Debug.Write(e);
}
});
handled = true;
}

Expand Down
2 changes: 1 addition & 1 deletion CodeiumVS/source.extension.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ internal sealed partial class Vsix
public const string Name = "Codeium";
public const string Description = @"The modern coding superpower: free AI code acceleration plugin for your favorite languages. Type less. Code more. Ship faster.";
public const string Language = "en-US";
public const string Version = "1.8.16";
public const string Version = "1.8.17";
public const string Author = "Codeium";
public const string Tags = "";
}
Expand Down
2 changes: 1 addition & 1 deletion CodeiumVS/source.extension.vsixmanifest
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<PackageManifest Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2011" xmlns:d="http://schemas.microsoft.com/developer/vsx-schema-design/2011">
<Metadata>
<Identity Id="Codeium.VisualStudio" Version="1.8.16" Language="en-US" Publisher="Codeium" />
<Identity Id="Codeium.VisualStudio" Version="1.8.17" Language="en-US" Publisher="Codeium" />
<DisplayName>Codeium</DisplayName>
<Description xml:space="preserve">The modern coding superpower: free AI code acceleration plugin for your favorite languages. Type less. Code more. Ship faster.</Description>
<MoreInfo>https://www.codeium.com</MoreInfo>
Expand Down

0 comments on commit 44a1021

Please sign in to comment.