Skip to content

@openctx/vscode-lib controller doesn't work in web worker context #169

@vovakulikov

Description

@vovakulikov

In some consumers (like Cody Web) it should be possible to run/create openctx controller within
web worker, at the moment since init logic here https://github.com/sourcegraph/openctx/blob/main/client/vscode-lib/src/global.ts uses global. statement it breaks initialisation for Cody Web.

As a temporal workaround, I added self.global = {} to avoid this problem in Cody Web, but eventually, I think a fix should be done here, maybe instead of global.openctx we could share vscode API through singleton

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions