sourcegraph / cody

Type less, code more: Cody is an AI code assistant that uses advanced search and codebase context to help you write and fix code.
https://cody.dev
Apache License 2.0
2.59k stars 275 forks source link

Windows Certificates: bundle roots.exe #4598

Closed olafurpg closed 3 months ago

olafurpg commented 3 months ago

Fixes CODY-2176

Previously, we used the win-ca "fallback" method to install local certificates. We used the fallback because we use esbuild to bundle the Cody VSC extension, which breaks automatic detection of a roots.exe binary that is included with the win-ca npm package. In the latest VS Code Insiders, this no longer works and causes Cody to fail all network requests. This PR is an attempt to fix this problem by removing the "fallback", bundling the roots.exe binary along with the Cody extension and adding logic to compute the file path of the bundled roots.exe at runtime (via vscode.ExtensionContext).

Test plan

olafurpg commented 3 months ago

This PR fixed the network errors I was able to reproduce on a vanilla installation on Windows with VS Code Insiders. If self-signed local certificates are not working then we should open a separate feature request for that. Most importantly, we can't break the experience for all Windows users to support this functionality (which isn't working in the first place)