diff --git a/client/src/services.ts b/client/src/services.ts index b22065d6..82b4146b 100644 --- a/client/src/services.ts +++ b/client/src/services.ts @@ -100,6 +100,12 @@ export enum VsCodeDiagnosticSeverity { Hint = 3 } +export enum ProgressLocation { + SourceControl = 1, + Window = 10, + Notification = 15 +} + export interface SignatureHelpContext { readonly triggerKind: SignatureHelpTriggerKind; readonly triggerCharacter?: string; diff --git a/client/src/vscode-api.ts b/client/src/vscode-api.ts index 9c9863d9..4de49916 100644 --- a/client/src/vscode-api.ts +++ b/client/src/vscode-api.ts @@ -13,7 +13,7 @@ import { MessageActionItem } from "./services"; import * as ServicesModule from "./services"; -import { DiagnosticSeverity } from "vscode-languageserver-protocol"; +import { CancellationTokenSource, DiagnosticSeverity } from "vscode-languageserver-protocol"; export function createVSCodeApi(servicesProvider: Services.Provider): typeof vscode { const unsupported = () => { throw new Error('unsupported') }; @@ -812,7 +812,7 @@ export function createVSCodeApi(servicesProvider: Services.Provider): typeof vsc if (window && window.withProgress) { return window.withProgress(options, task); } - return task({ report: () => { } }, new vscode.CancellationTokenSource().token); + return task({ report: () => { } }, new CancellationTokenSource().token); }, showTextDocument: unsupported, createTextEditorDecorationType: unsupported, @@ -941,7 +941,9 @@ export function createVSCodeApi(servicesProvider: Services.Provider): typeof vsc Disposable: CodeDisposable, SignatureHelpTriggerKind: SignatureHelpTriggerKind, DiagnosticSeverity: ServicesModule.DiagnosticSeverity, - EventEmitter: ServicesModule.Emitter + EventEmitter: ServicesModule.Emitter, + CancellationTokenSource, + ProgressLocation: ServicesModule.ProgressLocation }; return partialApi as any;