Describes the runtime behavior and design of AWS Toolkit. Corresponds to the "Process view" of the 4+1 architectural views.
TODO: move from CONTRIBUTING.md
VScode extensions can use vscode 'setContext' command to set special context keys which are
available in package.json. Use this only if there is no other alternative (it's shared, global,
mutable state).
If you must define a new key (is it really necessary?), follow these guidelines:
- Choose a prefix as follows (as recommended):
packages/core/should useaws.prefixpackages/toolkit/should useaws.toolkit.prefixpackages/amazonq/should useamazonq.prefix
- Use brevity. Less is more.
- Document it in the list below.
These keys are currently set by the core/ package, but many of them may eventually be migrated to toolkit/ or amazonq/ if appropriate.
aws.codecatalyst.connected: CodeCatalyst connection is active.aws.codewhisperer.connected: CodeWhisperer connection is active.aws.codewhisperer.connectionExpired: CodeWhisperer connection is active, but the connection is expired.aws.isDevMode: AWS Toolkit is running in "developer mode".aws.isWebExtHost: true when the extension host is running in a web browser, as opposed to nodejs (i.e. the environment has no "compute").- Compare to
isWeb, which vscode defines when the UI is web, but says nothing about the extension host.
- Compare to
aws.isSageMaker: AWS Toolkit is running in the SageMaker Code Editor.
- TODO
- TODO
TODO: vscode events; the "globals" module; activate(); EventEmitters; ...?