2026-07-21 21:24:06 +03:00
|
|
|
import type { RuntimeAPIs } from '@/lib/api/types';
|
2026-07-27 10:58:33 +00:00
|
|
|
import {
|
|
|
|
|
getVSCodeBootstrapConfig,
|
|
|
|
|
isVSCodeBootstrapPresent,
|
|
|
|
|
type VSCodeBootstrapConfig,
|
|
|
|
|
} from '@/lib/vscodeBootstrap';
|
2026-07-21 21:24:06 +03:00
|
|
|
|
2026-07-27 10:58:33 +00:00
|
|
|
export type { VSCodeBootstrapConfig };
|
|
|
|
|
export { getVSCodeBootstrapConfig };
|
2026-07-21 21:24:06 +03:00
|
|
|
|
|
|
|
|
export const isVSCodeRuntime = (
|
|
|
|
|
runtimeApis: RuntimeAPIs | null,
|
2026-07-27 10:58:33 +00:00
|
|
|
bootstrapConfig: VSCodeBootstrapConfig | null = getVSCodeBootstrapConfig(),
|
|
|
|
|
): boolean => Boolean(isVSCodeBootstrapPresent(bootstrapConfig) || runtimeApis?.runtime?.isVSCode);
|