Path: blob/main/extensions/copilot/src/util/common/vscodeVersion.ts
13397 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*--------------------------------------------------------------------------------------------*/45/**6* Sanitizes the version of VS Code to remove the minor version bump and -insider suffix7* @param vsCodeVersion The version of VS Code to sanitize i.e. 1.77.0-insider8* @returns The sanitized version of VS Code i.e. 1.779*/10export function sanitizeVSCodeVersion(vsCodeVersion: string): string {11const splitVersion = vsCodeVersion.split('.');12return `${splitVersion[0]}.${splitVersion[1]}`;13}1415