Global State
One of the most powerful ways we can enable an extension to pass information between the client and the webview is using VS Code's globalState
and message passing capabilities.
However, to enable extensions to interact with other extensions, we will build a global state extension (abstracted from our current codex-editor extension), which we will likely call crossExtensionState
that can be a dependency of any of our codex extensions:
An extension can directly invoke the commands of another extension (see discussion here), so we could call
crossExtensionState.getState
or.setState
from another extension.If this fails to work as expected for some reason, we can fall back to updating a json file with project state.
Last updated