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

Formalize communication between the Cursorless extension and the sidecar #8

Open
phillco opened this issue Sep 30, 2022 · 1 comment

Comments

@phillco
Copy link
Member

phillco commented Sep 30, 2022

Right now there isn't an API contract between the two extensions, so it's difficult to share code.

We want to do this in a way that minimizes long term changes to Cursorless extension (since we want to eliminate the fork over time), or add stuff to its public API (i.e., the extension points).

After talking with pokey, we decided on:

  1. Having the Cursorless extension build a secret dependency on the sidecar (e.g. it would look for the phillco.cursorless-sidecar extension if it existed), but only within the ide abstraction, and only if a secret setting is turned on, so it wouldn't be exposed to regular users.
  2. Most likely, we would have the sidecar extension give the Cursorless extension its own IDE object, which Cursorless would swap in for the regular VscodeIDE; that way we have maximum flexibility to inject code as needed, without having to first ship a bunch of abstractions in the Cursorless extension. It also encourages migrating stuff to the IDE abstraction.

The advantages of this approach are that we don't have to add anything into the Cursorless public API (its extension points), and we can minimize the changes in the Cursorless fork, since it will be mostly scoped to what's in the IDE abstraction.

@pokey
Copy link
Collaborator

pokey commented Sep 30, 2022

See also cursorless-dev/cursorless#946 (esp The approach section)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants