Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix @openctx/vscode-lib initialization for Cody Web #4796

Merged
merged 1 commit into from
Jul 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions lib/shared/src/sourcegraph-api/completions/browserClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,4 +124,8 @@ if (isRunningInWebWorker) {

document: self.document,
}
// HACK: @openctx/vscode-lib uses global object to share vscode API, it breaks cody web since
// global doesn't exist in web worker context, for more details see openctx issue here
// https://github.com/sourcegraph/openctx/issues/169
;(self as any).global = {}
}
1 change: 0 additions & 1 deletion web/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ export default defineProjectWithDefaults(__dirname, {
build: {
// Turn off minification since it breaks json-rpc in inline web-worker in Safari
minify: false,
emptyOutDir: false,
outDir: 'dist',
assetsDir: '.',
reportCompressedSize: false,
Expand Down
Loading