Skip to content

Commit 1e336c3

Browse files
authored
Fix build from change in VS Code API (#6010)
1 parent b0e6775 commit 1e336c3

3 files changed

Lines changed: 18 additions & 6 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2892,7 +2892,7 @@
28922892
"@types/react-dom": "^16.8.2",
28932893
"@types/sinon": "7.0.11",
28942894
"@types/temp": "0.8.34",
2895-
"@types/vscode": "1.79.0",
2895+
"@types/vscode": "1.89.0",
28962896
"@types/webpack-env": "^1.16.0",
28972897
"@typescript-eslint/eslint-plugin": "6.10.0",
28982898
"@typescript-eslint/parser": "6.10.0",

src/test/mocks/mockExtensionContext.ts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
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+
16
import * as path from 'path';
27
import * as temp from 'temp';
3-
import { ExtensionContext, Uri, SecretStorage, Event, SecretStorageChangeEvent } from 'vscode';
8+
import { ExtensionContext, Uri, SecretStorage, Event, SecretStorageChangeEvent, EventEmitter } from 'vscode';
49

510
import { InMemoryMemento } from './inMemoryMemento';
611

@@ -39,6 +44,13 @@ export class MockExtensionContext implements ExtensionContext {
3944
extensionRuntime: any;
4045
extension: any;
4146
isNewInstall: any;
47+
languageModelAccessInformation = {
48+
onDidChange: new EventEmitter<void>().event,
49+
50+
canSendRequest: (_chat: any) => {
51+
return undefined;
52+
}
53+
};
4254

4355
constructor() {
4456
this.extensionPath = path.resolve(__dirname, '..');

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -640,10 +640,10 @@
640640
dependencies:
641641
"@types/node" "*"
642642

643-
"@types/vscode@1.79.0":
644-
version "1.79.0"
645-
resolved "https://registry.yarnpkg.com/@types/vscode/-/vscode-1.79.0.tgz#e2aed1bb3946ae2bebbc3b88020d0efe18f941a9"
646-
integrity sha512-Tfowu2rSW8hVGbqzQLSPlOEiIOYYryTkgJ+chMecpYiJcnw9n0essvSiclnK+Qh/TcSVJHgaK4EMrQDZjZJ/Sw==
643+
"@types/vscode@1.89.0":
644+
version "1.89.0"
645+
resolved "https://registry.yarnpkg.com/@types/vscode/-/vscode-1.89.0.tgz#df0beb3f4ab9133ee8c5fcac8fc578e4623d8749"
646+
integrity sha512-TMfGKLSVxfGfoO8JfIE/neZqv7QLwS4nwPwL/NwMvxtAY2230H2I4Z5xx6836pmJvMAzqooRQ4pmLm7RUicP3A==
647647

648648
"@types/webpack-env@^1.16.0":
649649
version "1.16.2"

0 commit comments

Comments
 (0)