Path: blob/main/extensions/copilot/src/platform/env/common/packagejson.ts
13401 views
/*---------------------------------------------------------------------------------------------1* Copyright (c) Microsoft Corporation. All rights reserved.2* Licensed under the MIT License. See License.txt in the project root for license information.3*--------------------------------------------------------------------------------------------*/45export interface PackageJSONShape {6isPreRelease?: boolean;7buildType: 'prod' | 'dev';8version: string;9completionsCoreVersion: string;10build: string;11publisher: string;12name: string;13engines: {14vscode: string;15};16contributes: {17configuration: {18title: string;19id: string;20properties: {21[key: string]: {22default?: any;23tags?: string[];24};25};26}[];27languageModelTools: {28name: string;29toolReferenceName: string;30displayName: string;31modelDescription: string;32inputSchema: any;33canBeReferencedInPrompt: boolean;34tags?: string[];35}[];36languageModelToolSets: {37name: string;38tools: string[];39}[];40};41}4243declare const require: any; // TODO@bpasero we need package.json support in web via bundling4445export const packageJson: PackageJSONShape = require('../../../../package.json');46export const isProduction = (packageJson.buildType !== 'dev');47export const isPreRelease = (packageJson.isPreRelease || !isProduction);48export const vscodeEngineVersion = packageJson.engines.vscode;495051