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