Skip to content

Commit 83f0e44

Browse files
committed
fixup
1 parent 102bd55 commit 83f0e44

File tree

1 file changed

+5
-2
lines changed
  • packages/core/src/shared/vscode

1 file changed

+5
-2
lines changed

packages/core/src/shared/vscode/env.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,13 +145,16 @@ const UIKind = {
145145
export type ExtensionHostUI = (typeof UIKind)[keyof typeof UIKind]
146146
export type ExtensionHostLocation = 'local' | 'remote' | 'webworker'
147147

148-
// where extension is running
148+
/**
149+
* Detects where the ui and the extension host are running
150+
*/
149151
export function getExtRuntimeContext(): {
150152
ui: ExtensionHostUI
151153
extensionHost: ExtensionHostLocation
152154
} {
153155
const extensionHost =
154-
// i found it in vscode
156+
// taken from https://github.com/microsoft/vscode/blob/7c9e4bb23992c63f20cd86bbe7a52a3aa4bed89d/extensions/github-authentication/src/githubServer.ts#L121 to help determine which auth flows
157+
// should be used
155158
typeof navigator === 'undefined'
156159
? globals.context.extension.extensionKind === vscode.ExtensionKind.UI
157160
? 'local'

0 commit comments

Comments
 (0)