Skip to content

Commit e709012

Browse files
authored
Updates to latest version of VS Code types (#25065)
Required to use `vscode.lm.registerTool()`
1 parent d6b62de commit e709012

File tree

7 files changed

+493
-14
lines changed

7 files changed

+493
-14
lines changed

package-lock.json

Lines changed: 10 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
"theme": "dark"
4848
},
4949
"engines": {
50-
"vscode": "^1.94.0-20240918"
50+
"vscode": "^1.95.0"
5151
},
5252
"enableTelemetry": false,
5353
"keywords": [
@@ -1554,7 +1554,7 @@
15541554
"@types/sinon": "^17.0.3",
15551555
"@types/stack-trace": "0.0.29",
15561556
"@types/tmp": "^0.0.33",
1557-
"@types/vscode": "^1.93.0",
1557+
"@types/vscode": "^1.95.0",
15581558
"@types/which": "^2.0.1",
15591559
"@types/winreg": "^1.2.30",
15601560
"@types/xml2js": "^0.4.2",

src/client/common/cancellation.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Licensed under the MIT License.
33
'use strict';
44

5-
import { CancellationToken, CancellationTokenSource } from 'vscode';
5+
import { CancellationToken, CancellationTokenSource, CancellationError as VSCCancellationError } from 'vscode';
66
import { createDeferred } from './utils/async';
77
import * as localize from './utils/localize';
88

@@ -13,6 +13,10 @@ export class CancellationError extends Error {
1313
constructor() {
1414
super(localize.Common.canceled);
1515
}
16+
17+
static isCancellationError(error: unknown): error is CancellationError {
18+
return error instanceof CancellationError || error instanceof VSCCancellationError;
19+
}
1620
}
1721
/**
1822
* Create a promise that will either resolve with a default value or reject when the token is cancelled.

src/client/common/process/logger.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import { IProcessLogger, SpawnOptions } from './types';
1212
import { escapeRegExp } from 'lodash';
1313
import { replaceAll } from '../stringUtils';
1414
import { identifyShellFromShellPath } from '../terminal/shellDetectors/baseShellDetector';
15+
import '../../common/extensions';
1516

1617
@injectable()
1718
export class ProcessLogger implements IProcessLogger {

0 commit comments

Comments
 (0)