Skip to content

Commit

Permalink
Merge pull request #36 from thedemons/option-enable-proxy
Browse files Browse the repository at this point in the history
Add option to enable language server proxy (#32)
  • Loading branch information
fortenforge committed Dec 21, 2023
2 parents c86b277 + 817cefb commit 44f312d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CodeiumVS/LanguageServer/LanguageServer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@ private async Task StartAsync(bool ignoreDigitalSignature = false)

_process.StartInfo.Arguments =
$"--api_server_url {apiUrl} --manager_dir \"{managerDir}\" --database_dir \"{databaseDir}\"" +
" --enable_chat_web_server --enable_chat_client --detect_proxy=false";
$" --enable_chat_web_server --enable_chat_client --detect_proxy={_package.SettingsPage.EnableLanguageServerProxy}";

if (_package.SettingsPage.EnterpriseMode)
_process.StartInfo.Arguments +=
Expand Down
15 changes: 15 additions & 0 deletions CodeiumVS/SettingsPage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ public class SettingsPage : DialogPage
private string portalUrl = "";
private string apiUrl = "";
private bool enableCommentCompletion = true;
private bool enableLanguageServerProxy = false;

[Category("Codeium")]
[DisplayName("Enterprise Mode")]
Expand Down Expand Up @@ -63,4 +64,18 @@ public bool EnableCommentCompletion
enableCommentCompletion = value;
}
}

[Category("Codeium")]
[DisplayName("Enable language server proxy")]
[Description(
"If you're experiencing network issues with the language server, we recommend enabling this option and using a VPN to resolve the issue. Requires restart.")]
public bool EnableLanguageServerProxy
{
get {
return enableLanguageServerProxy;
}
set {
enableLanguageServerProxy = value;
}
}
}

0 comments on commit 44f312d

Please sign in to comment.