@opensumi/sumi 2.20.10 → 2.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/manifest.json +123 -114
- package/package.json +3 -3
- package/sumi-worker/sumi-worker.d.ts +166 -0
- package/sumi-worker/worker.language.d.ts +166 -0
- package/vscode/typings/vscode.command.d.ts +77 -77
- package/vscode/typings/vscode.comments.d.ts +6 -0
- package/vscode/typings/vscode.d.ts +267 -3
- package/vscode/typings/vscode.debug.d.ts +1 -1
- package/vscode/typings/vscode.doc.d.ts +0 -4
- package/vscode/typings/vscode.env.d.ts +20 -20
- package/vscode/typings/vscode.language.d.ts +170 -0
- package/vscode/typings/vscode.proposed.authSession.d.ts +47 -0
- package/vscode/typings/vscode.proposed.diffCommand.d.ts +38 -0
- package/vscode/typings/vscode.proposed.openEditors.d.ts +35 -0
- package/vscode/typings/vscode.proposed.scm.d.ts +69 -0
- package/vscode/typings/vscode.proposed.scmActionButton.d.ts +19 -0
- package/vscode/typings/vscode.proposed.scmSelectedProvider.d.ts +22 -0
- package/vscode/typings/vscode.proposed.scmValidation.d.ts +54 -0
- package/vscode/typings/vscode.proposed.task.d.ts +20 -0
- package/vscode/typings/vscode.proposed.terminalDimensions.d.ts +23 -0
- package/vscode/typings/vscode.proposed.timeline.d.ts +163 -0
- package/vscode/typings/vscode.quickpick.d.ts +49 -2
- package/vscode/typings/vscode.scm.d.ts +10 -10
- package/vscode/typings/vscode.window.d.ts +17 -8
- package/vscode/typings/vscode.workspace.d.ts +18 -18
- package/vscode.d.ts +11 -1
- package/vscode/typings/vscode.proposed.d.ts +0 -789
|
@@ -1,789 +0,0 @@
|
|
|
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
|
-
/**
|
|
7
|
-
* This is the place for API experiments and proposals.
|
|
8
|
-
* These API are NOT stable and subject to change. They are only available in the Insiders
|
|
9
|
-
* distribution and CANNOT be used in published extensions.
|
|
10
|
-
*
|
|
11
|
-
* To test these API in local environment:
|
|
12
|
-
* - Use Insiders release of VS Code.
|
|
13
|
-
* - Add `"enableProposedApi": true` to your package.json.
|
|
14
|
-
* - Copy this file to your project.
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
declare module 'vscode' {
|
|
18
|
-
|
|
19
|
-
//#region Joao: diff command
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* The contiguous set of modified lines in a diff.
|
|
23
|
-
*/
|
|
24
|
-
export interface LineChange {
|
|
25
|
-
readonly originalStartLineNumber: number;
|
|
26
|
-
readonly originalEndLineNumber: number;
|
|
27
|
-
readonly modifiedStartLineNumber: number;
|
|
28
|
-
readonly modifiedEndLineNumber: number;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
export namespace commands {
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* Registers a diff information command that can be invoked via a keyboard shortcut,
|
|
36
|
-
* a menu item, an action, or directly.
|
|
37
|
-
*
|
|
38
|
-
* Diff information commands are different from ordinary [commands](#commands.registerCommand) as
|
|
39
|
-
* they only execute when there is an active diff editor when the command is called, and the diff
|
|
40
|
-
* information has been computed. Also, the command handler of an editor command has access to
|
|
41
|
-
* the diff information.
|
|
42
|
-
*
|
|
43
|
-
* @param command A unique identifier for the command.
|
|
44
|
-
* @param callback A command handler function with access to the [diff information](#LineChange).
|
|
45
|
-
* @param thisArg The `this` context used when invoking the handler function.
|
|
46
|
-
* @return Disposable which unregisters this command on disposal.
|
|
47
|
-
*/
|
|
48
|
-
export function registerDiffInformationCommand(command: string, callback: (diff: LineChange[], ...args: any[]) => any, thisArg?: any): Disposable;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
//#region Joao: SCM validation
|
|
52
|
-
|
|
53
|
-
//#region Rob, Matt: logging
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* The severity level of a log message
|
|
57
|
-
*/
|
|
58
|
-
export enum LogLevel {
|
|
59
|
-
Trace = 1,
|
|
60
|
-
Debug = 2,
|
|
61
|
-
Info = 3,
|
|
62
|
-
Warning = 4,
|
|
63
|
-
Error = 5,
|
|
64
|
-
Critical = 6,
|
|
65
|
-
Off = 7
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
export namespace env {
|
|
69
|
-
/**
|
|
70
|
-
* Current logging level.
|
|
71
|
-
*/
|
|
72
|
-
export const logLevel: LogLevel;
|
|
73
|
-
|
|
74
|
-
/**
|
|
75
|
-
* An [event](#Event) that fires when the log level has changed.
|
|
76
|
-
*/
|
|
77
|
-
export const onDidChangeLogLevel: Event<LogLevel>;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
//#endregion
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
* Represents the validation type of the Source Control input.
|
|
84
|
-
*/
|
|
85
|
-
export enum SourceControlInputBoxValidationType {
|
|
86
|
-
|
|
87
|
-
/**
|
|
88
|
-
* Something not allowed by the rules of a language or other means.
|
|
89
|
-
*/
|
|
90
|
-
Error = 0,
|
|
91
|
-
|
|
92
|
-
/**
|
|
93
|
-
* Something suspicious but allowed.
|
|
94
|
-
*/
|
|
95
|
-
Warning = 1,
|
|
96
|
-
|
|
97
|
-
/**
|
|
98
|
-
* Something to inform about but not a problem.
|
|
99
|
-
*/
|
|
100
|
-
Information = 2
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
export interface SourceControlInputBoxValidation {
|
|
104
|
-
|
|
105
|
-
/**
|
|
106
|
-
* The validation message to display.
|
|
107
|
-
*/
|
|
108
|
-
readonly message: string;
|
|
109
|
-
|
|
110
|
-
/**
|
|
111
|
-
* The validation type.
|
|
112
|
-
*/
|
|
113
|
-
readonly type: SourceControlInputBoxValidationType;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
/**
|
|
117
|
-
* Represents the input box in the Source Control viewlet.
|
|
118
|
-
*/
|
|
119
|
-
export interface SourceControlInputBox {
|
|
120
|
-
|
|
121
|
-
/**
|
|
122
|
-
* A validation function for the input box. It's possible to change
|
|
123
|
-
* the validation provider simply by setting this property to a different function.
|
|
124
|
-
*/
|
|
125
|
-
validateInput?(value: string, cursorPosition: number): ProviderResult<SourceControlInputBoxValidation | undefined | null>;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
//#endregion
|
|
129
|
-
|
|
130
|
-
//#region Joao: SCM selected provider
|
|
131
|
-
|
|
132
|
-
export interface SourceControl {
|
|
133
|
-
|
|
134
|
-
/**
|
|
135
|
-
* Whether the source control is selected.
|
|
136
|
-
*/
|
|
137
|
-
readonly selected: boolean;
|
|
138
|
-
|
|
139
|
-
/**
|
|
140
|
-
* An event signaling when the selection state changes.
|
|
141
|
-
*/
|
|
142
|
-
readonly onDidChangeSelection: Event<boolean>;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
//#endregion
|
|
146
|
-
|
|
147
|
-
//#region Joao: SCM Input Box
|
|
148
|
-
|
|
149
|
-
/**
|
|
150
|
-
* Represents the input box in the Source Control viewlet.
|
|
151
|
-
*/
|
|
152
|
-
export interface SourceControlInputBox {
|
|
153
|
-
|
|
154
|
-
/**
|
|
155
|
-
* Controls whether the input box is visible (default is `true`).
|
|
156
|
-
*/
|
|
157
|
-
visible: boolean;
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
//#endregion
|
|
161
|
-
|
|
162
|
-
//#region Joh: decorations
|
|
163
|
-
|
|
164
|
-
//#region old file-decorations
|
|
165
|
-
export interface SourceControlResourceDecorations {
|
|
166
|
-
source?: string;
|
|
167
|
-
letter?: string;
|
|
168
|
-
color?: ThemeColor;
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
/**
|
|
173
|
-
* @deprecated
|
|
174
|
-
* please use `FileDecoration`
|
|
175
|
-
*/
|
|
176
|
-
export class Decoration {
|
|
177
|
-
letter?: string;
|
|
178
|
-
title?: string;
|
|
179
|
-
color?: ThemeColor;
|
|
180
|
-
priority?: number;
|
|
181
|
-
bubble?: boolean;
|
|
182
|
-
source?: string; // hacky... we should remove it and use equality under the hood
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
/**
|
|
186
|
-
* @deprecated
|
|
187
|
-
* please use `FileDecorationProvider`
|
|
188
|
-
*/
|
|
189
|
-
|
|
190
|
-
export interface DecorationProvider {
|
|
191
|
-
onDidChangeDecorations: Event<undefined | Uri | Uri[]>;
|
|
192
|
-
provideDecoration(uri: Uri, token: CancellationToken): ProviderResult<Decoration>;
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
export namespace window {
|
|
196
|
-
/**
|
|
197
|
-
* @deprecated
|
|
198
|
-
* please use `registerDecorationProvider`
|
|
199
|
-
*/
|
|
200
|
-
export function registerDecorationProvider(provider: DecorationProvider): Disposable;
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
//#endregion
|
|
204
|
-
|
|
205
|
-
//#region file-decorations: https://github.com/microsoft/vscode/issues/54938
|
|
206
|
-
/**
|
|
207
|
-
* A file decoration represents metadata that can be rendered with a file.
|
|
208
|
-
*/
|
|
209
|
-
export class FileDecoration {
|
|
210
|
-
|
|
211
|
-
/**
|
|
212
|
-
* A very short string that represents this decoration.
|
|
213
|
-
*/
|
|
214
|
-
badge?: string;
|
|
215
|
-
|
|
216
|
-
/**
|
|
217
|
-
* A human-readable tooltip for this decoration.
|
|
218
|
-
*/
|
|
219
|
-
tooltip?: string;
|
|
220
|
-
|
|
221
|
-
/**
|
|
222
|
-
* The color of this decoration.
|
|
223
|
-
*/
|
|
224
|
-
color?: ThemeColor;
|
|
225
|
-
|
|
226
|
-
/**
|
|
227
|
-
* A flag expressing that this decoration should be
|
|
228
|
-
* propagated to its parents.
|
|
229
|
-
*/
|
|
230
|
-
propagate?: boolean;
|
|
231
|
-
|
|
232
|
-
/**
|
|
233
|
-
* Creates a new decoration.
|
|
234
|
-
*
|
|
235
|
-
* @param badge A letter that represents the decoration.
|
|
236
|
-
* @param tooltip The tooltip of the decoration.
|
|
237
|
-
* @param color The color of the decoration.
|
|
238
|
-
*/
|
|
239
|
-
constructor(badge?: string, tooltip?: string, color?: ThemeColor);
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
/**
|
|
243
|
-
* The decoration provider interfaces defines the contract between extensions and
|
|
244
|
-
* file decorations.
|
|
245
|
-
*/
|
|
246
|
-
export interface FileDecorationProvider {
|
|
247
|
-
|
|
248
|
-
/**
|
|
249
|
-
* An optional event to signal that decorations for one or many files have changed.
|
|
250
|
-
*
|
|
251
|
-
* *Note* that this event should be used to propagate information about children.
|
|
252
|
-
*
|
|
253
|
-
* @see {@link EventEmitter}
|
|
254
|
-
*/
|
|
255
|
-
onDidChange: Event<undefined | Uri | Uri[]>;
|
|
256
|
-
|
|
257
|
-
/**
|
|
258
|
-
* An optional event to signal that decorations for one or many files have changed.
|
|
259
|
-
*
|
|
260
|
-
* *Note* that this event should be used to propagate information about children.
|
|
261
|
-
*
|
|
262
|
-
* @see [EventEmitter](#EventEmitter)
|
|
263
|
-
*/
|
|
264
|
-
onDidChangeFileDecorations?: Event<undefined | Uri | Uri[]>;
|
|
265
|
-
|
|
266
|
-
/**
|
|
267
|
-
* Provide decorations for a given uri.
|
|
268
|
-
*
|
|
269
|
-
* *Note* that this function is only called when a file gets rendered in the UI.
|
|
270
|
-
* This means a decoration from a descendent that propagates upwards must be signaled
|
|
271
|
-
* to the editor via the {@link FileDecorationProvider.onDidChangeFileDecorations onDidChangeFileDecorations}-event.
|
|
272
|
-
*
|
|
273
|
-
* @param uri The uri of the file to provide a decoration for.
|
|
274
|
-
* @param token A cancellation token.
|
|
275
|
-
* @returns A decoration or a thenable that resolves to such.
|
|
276
|
-
*/
|
|
277
|
-
provideFileDecoration(uri: Uri, token: CancellationToken): ProviderResult<FileDecoration>;
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
export namespace window {
|
|
281
|
-
/**
|
|
282
|
-
* Register a file decoration provider.
|
|
283
|
-
*
|
|
284
|
-
* @param provider A {@link FileDecorationProvider}.
|
|
285
|
-
* @return A {@link Disposable} that unregisters the provider.
|
|
286
|
-
*/
|
|
287
|
-
export function registerFileDecorationProvider(provider: FileDecorationProvider): Disposable;
|
|
288
|
-
}
|
|
289
|
-
|
|
290
|
-
//#endregion
|
|
291
|
-
|
|
292
|
-
/**
|
|
293
|
-
* An [event](#Event) which fires when a [Terminal](#Terminal)'s dimensions change.
|
|
294
|
-
*/
|
|
295
|
-
export interface TerminalDimensionsChangeEvent {
|
|
296
|
-
/**
|
|
297
|
-
* The [terminal](#Terminal) for which the dimensions have changed.
|
|
298
|
-
*/
|
|
299
|
-
readonly terminal: Terminal;
|
|
300
|
-
/**
|
|
301
|
-
* The new value for the [terminal's dimensions](#Terminal.dimensions).
|
|
302
|
-
*/
|
|
303
|
-
readonly dimensions: TerminalDimensions;
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
//#endregion
|
|
307
|
-
|
|
308
|
-
/**
|
|
309
|
-
* Label describing the [Tree item](#TreeItem)
|
|
310
|
-
*/
|
|
311
|
-
export interface TreeItemLabel {
|
|
312
|
-
|
|
313
|
-
/**
|
|
314
|
-
* A human-readable string describing the [Tree item](#TreeItem).
|
|
315
|
-
*/
|
|
316
|
-
label: string;
|
|
317
|
-
|
|
318
|
-
/**
|
|
319
|
-
* Ranges in the label to highlight. A range is defined as a tuple of two number where the
|
|
320
|
-
* first is the inclusive start index and the second the exclusive end index
|
|
321
|
-
*/
|
|
322
|
-
highlights?: [number, number][];
|
|
323
|
-
|
|
324
|
-
}
|
|
325
|
-
//#endregion
|
|
326
|
-
|
|
327
|
-
/**
|
|
328
|
-
* A task to execute
|
|
329
|
-
*/
|
|
330
|
-
export class Task2 extends Task {
|
|
331
|
-
detail?: string;
|
|
332
|
-
}
|
|
333
|
-
//#endregion
|
|
334
|
-
|
|
335
|
-
//#region Tasks
|
|
336
|
-
export interface TaskPresentationOptions {
|
|
337
|
-
/**
|
|
338
|
-
* Controls whether the task is executed in a specific terminal group using split panes.
|
|
339
|
-
*/
|
|
340
|
-
group?: string;
|
|
341
|
-
}
|
|
342
|
-
//#endregion
|
|
343
|
-
|
|
344
|
-
// #region Ben - status bar item with ID and Name
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
/**
|
|
348
|
-
* Represents the dimensions of a terminal.
|
|
349
|
-
*/
|
|
350
|
-
export interface TerminalDimensions {
|
|
351
|
-
/**
|
|
352
|
-
* The number of columns in the terminal.
|
|
353
|
-
*/
|
|
354
|
-
readonly columns: number;
|
|
355
|
-
|
|
356
|
-
/**
|
|
357
|
-
* The number of rows in the terminal.
|
|
358
|
-
*/
|
|
359
|
-
readonly rows: number;
|
|
360
|
-
}
|
|
361
|
-
|
|
362
|
-
/**
|
|
363
|
-
/**
|
|
364
|
-
* Represents a terminal without a process where all interaction and output in the terminal is
|
|
365
|
-
* controlled by an extension. This is similar to an output window but has the same VT sequence
|
|
366
|
-
* compatibility as the regular terminal.
|
|
367
|
-
*
|
|
368
|
-
* Note that an instance of [Terminal](#Terminal) will be created when a TerminalRenderer is
|
|
369
|
-
* created with all its APIs available for use by extensions. When using the Terminal object
|
|
370
|
-
* of a TerminalRenderer it acts just like normal only the extension that created the
|
|
371
|
-
* TerminalRenderer essentially acts as a process. For example when an
|
|
372
|
-
* [Terminal.onDidWriteData](#Terminal.onDidWriteData) listener is registered, that will fire
|
|
373
|
-
* when [TerminalRenderer.write](#TerminalRenderer.write) is called. Similarly when
|
|
374
|
-
* [Terminal.sendText](#Terminal.sendText) is triggered that will fire the
|
|
375
|
-
* [TerminalRenderer.onDidAcceptInput](#TerminalRenderer.onDidAcceptInput) event.
|
|
376
|
-
*
|
|
377
|
-
* @deprecated Use [ExtensionTerminalOptions](#ExtensionTerminalOptions) instead.
|
|
378
|
-
*
|
|
379
|
-
* **Example:** Create a terminal renderer, show it and write hello world in red
|
|
380
|
-
* ```typescript
|
|
381
|
-
* const renderer = window.createTerminalRenderer('foo');
|
|
382
|
-
* renderer.terminal.then(t => t.show());
|
|
383
|
-
* renderer.write('\x1b[31mHello world\x1b[0m');
|
|
384
|
-
* ```
|
|
385
|
-
*/
|
|
386
|
-
export interface TerminalRenderer {
|
|
387
|
-
/**
|
|
388
|
-
* The name of the terminal, this will appear in the terminal selector.
|
|
389
|
-
* @deprecated Use [ExtensionTerminalOptions](#ExtensionTerminalOptions) instead.
|
|
390
|
-
*/
|
|
391
|
-
name: string;
|
|
392
|
-
|
|
393
|
-
/**
|
|
394
|
-
* The dimensions of the terminal, the rows and columns of the terminal can only be set to
|
|
395
|
-
* a value smaller than the maximum value, if this is undefined the terminal will auto fit
|
|
396
|
-
* to the maximum value [maximumDimensions](TerminalRenderer.maximumDimensions).
|
|
397
|
-
*
|
|
398
|
-
* @deprecated Use [ExtensionTerminalOptions](#ExtensionTerminalOptions) instead.
|
|
399
|
-
*
|
|
400
|
-
* **Example:** Override the dimensions of a TerminalRenderer to 20 columns and 10 rows
|
|
401
|
-
* ```typescript
|
|
402
|
-
* terminalRenderer.dimensions = {
|
|
403
|
-
* cols: 20,
|
|
404
|
-
* rows: 10
|
|
405
|
-
* };
|
|
406
|
-
* ```
|
|
407
|
-
*/
|
|
408
|
-
dimensions: TerminalDimensions | undefined;
|
|
409
|
-
|
|
410
|
-
/**
|
|
411
|
-
* The maximum dimensions of the terminal, this will be undefined immediately after a
|
|
412
|
-
* terminal renderer is created and also until the terminal becomes visible in the UI.
|
|
413
|
-
* Listen to [onDidChangeMaximumDimensions](TerminalRenderer.onDidChangeMaximumDimensions)
|
|
414
|
-
* to get notified when this value changes.
|
|
415
|
-
*
|
|
416
|
-
* @deprecated Use [ExtensionTerminalOptions](#ExtensionTerminalOptions) instead.
|
|
417
|
-
*/
|
|
418
|
-
readonly maximumDimensions: TerminalDimensions | undefined;
|
|
419
|
-
|
|
420
|
-
/**
|
|
421
|
-
* The corresponding [Terminal](#Terminal) for this TerminalRenderer.
|
|
422
|
-
*
|
|
423
|
-
* @deprecated Use [ExtensionTerminalOptions](#ExtensionTerminalOptions) instead.
|
|
424
|
-
*/
|
|
425
|
-
readonly terminal: Terminal;
|
|
426
|
-
|
|
427
|
-
/**
|
|
428
|
-
* Write text to the terminal. Unlike [Terminal.sendText](#Terminal.sendText) which sends
|
|
429
|
-
* text to the underlying _process_, this will write the text to the terminal itself.
|
|
430
|
-
*
|
|
431
|
-
* @param text The text to write.
|
|
432
|
-
* @deprecated Use [ExtensionTerminalOptions](#ExtensionTerminalOptions) instead.
|
|
433
|
-
*
|
|
434
|
-
* **Example:** Write red text to the terminal
|
|
435
|
-
* ```typescript
|
|
436
|
-
* terminalRenderer.write('\x1b[31mHello world\x1b[0m');
|
|
437
|
-
* ```
|
|
438
|
-
*
|
|
439
|
-
* **Example:** Move the cursor to the 10th row and 20th column and write an asterisk
|
|
440
|
-
* ```typescript
|
|
441
|
-
* terminalRenderer.write('\x1b[10;20H*');
|
|
442
|
-
* ```
|
|
443
|
-
*/
|
|
444
|
-
write(text: string): void;
|
|
445
|
-
|
|
446
|
-
/**
|
|
447
|
-
* An event which fires on keystrokes in the terminal or when an extension calls
|
|
448
|
-
* [Terminal.sendText](#Terminal.sendText). Keystrokes are converted into their
|
|
449
|
-
* corresponding VT sequence representation.
|
|
450
|
-
*
|
|
451
|
-
* @deprecated Use [ExtensionTerminalOptions](#ExtensionTerminalOptions) instead.
|
|
452
|
-
*
|
|
453
|
-
* **Example:** Simulate interaction with the terminal from an outside extension or a
|
|
454
|
-
* workbench command such as `workbench.action.terminal.runSelectedText`
|
|
455
|
-
* ```typescript
|
|
456
|
-
* const terminalRenderer = window.createTerminalRenderer('test');
|
|
457
|
-
* terminalRenderer.onDidAcceptInput(data => {
|
|
458
|
-
* console.log(data); // 'Hello world'
|
|
459
|
-
* });
|
|
460
|
-
* terminalRenderer.terminal.sendText('Hello world');
|
|
461
|
-
* ```
|
|
462
|
-
*/
|
|
463
|
-
readonly onDidAcceptInput: Event<string>;
|
|
464
|
-
|
|
465
|
-
/**
|
|
466
|
-
* An event which fires when the [maximum dimensions](#TerminalRenderer.maximumDimensions) of
|
|
467
|
-
* the terminal renderer change.
|
|
468
|
-
*
|
|
469
|
-
* @deprecated Use [ExtensionTerminalOptions](#ExtensionTerminalOptions) instead.
|
|
470
|
-
*/
|
|
471
|
-
readonly onDidChangeMaximumDimensions: Event<TerminalDimensions>;
|
|
472
|
-
}
|
|
473
|
-
|
|
474
|
-
//#region eamodio - timeline: https://github.com/microsoft/vscode/issues/84297
|
|
475
|
-
export class TimelineItem {
|
|
476
|
-
/**
|
|
477
|
-
* A timestamp (in milliseconds since 1 January 1970 00:00:00) for when the timeline item occurred.
|
|
478
|
-
*/
|
|
479
|
-
timestamp: number;
|
|
480
|
-
|
|
481
|
-
/**
|
|
482
|
-
* A human-readable string describing the timeline item.
|
|
483
|
-
*/
|
|
484
|
-
label: string;
|
|
485
|
-
|
|
486
|
-
/**
|
|
487
|
-
* Optional id for the timeline item. It must be unique across all the timeline items provided by this source.
|
|
488
|
-
*
|
|
489
|
-
* If not provided, an id is generated using the timeline item's timestamp.
|
|
490
|
-
*/
|
|
491
|
-
id?: string;
|
|
492
|
-
|
|
493
|
-
/**
|
|
494
|
-
* The icon path or [ThemeIcon](#ThemeIcon) for the timeline item.
|
|
495
|
-
*/
|
|
496
|
-
iconPath?: Uri | { light: Uri; dark: Uri } | ThemeIcon;
|
|
497
|
-
|
|
498
|
-
/**
|
|
499
|
-
* A human readable string describing less prominent details of the timeline item.
|
|
500
|
-
*/
|
|
501
|
-
description?: string;
|
|
502
|
-
|
|
503
|
-
/**
|
|
504
|
-
* The tooltip text when you hover over the timeline item.
|
|
505
|
-
*/
|
|
506
|
-
detail?: string;
|
|
507
|
-
|
|
508
|
-
/**
|
|
509
|
-
* The [command](#Command) that should be executed when the timeline item is selected.
|
|
510
|
-
*/
|
|
511
|
-
command?: Command;
|
|
512
|
-
|
|
513
|
-
/**
|
|
514
|
-
* Context value of the timeline item. This can be used to contribute specific actions to the item.
|
|
515
|
-
* For example, a timeline item is given a context value as `commit`. When contributing actions to `timeline/item/context`
|
|
516
|
-
* using `menus` extension point, you can specify context value for key `timelineItem` in `when` expression like `timelineItem == commit`.
|
|
517
|
-
* ```
|
|
518
|
-
* "contributes": {
|
|
519
|
-
* "menus": {
|
|
520
|
-
* "timeline/item/context": [
|
|
521
|
-
* {
|
|
522
|
-
* "command": "extension.copyCommitId",
|
|
523
|
-
* "when": "timelineItem == commit"
|
|
524
|
-
* }
|
|
525
|
-
* ]
|
|
526
|
-
* }
|
|
527
|
-
* }
|
|
528
|
-
* ```
|
|
529
|
-
* This will show the `extension.copyCommitId` action only for items where `contextValue` is `commit`.
|
|
530
|
-
*/
|
|
531
|
-
contextValue?: string;
|
|
532
|
-
|
|
533
|
-
/**
|
|
534
|
-
* @param label A human-readable string describing the timeline item
|
|
535
|
-
* @param timestamp A timestamp (in milliseconds since 1 January 1970 00:00:00) for when the timeline item occurred
|
|
536
|
-
*/
|
|
537
|
-
constructor(label: string, timestamp: number);
|
|
538
|
-
}
|
|
539
|
-
//#endregion
|
|
540
|
-
//#region auth provider: https://github.com/microsoft/vscode/issues/88309
|
|
541
|
-
|
|
542
|
-
/**
|
|
543
|
-
* An {@link Event} which fires when an {@link AuthenticationProvider} is added or removed.
|
|
544
|
-
*/
|
|
545
|
-
export interface AuthenticationProvidersChangeEvent {
|
|
546
|
-
/**
|
|
547
|
-
* The ids of the {@link AuthenticationProvider}s that have been added.
|
|
548
|
-
*/
|
|
549
|
-
readonly added: ReadonlyArray<AuthenticationProviderInformation>;
|
|
550
|
-
|
|
551
|
-
/**
|
|
552
|
-
* The ids of the {@link AuthenticationProvider}s that have been removed.
|
|
553
|
-
*/
|
|
554
|
-
readonly removed: ReadonlyArray<AuthenticationProviderInformation>;
|
|
555
|
-
}
|
|
556
|
-
|
|
557
|
-
export namespace authentication {
|
|
558
|
-
/**
|
|
559
|
-
* @deprecated - getSession should now trigger extension activation.
|
|
560
|
-
* Fires with the provider id that was registered or unregistered.
|
|
561
|
-
*/
|
|
562
|
-
export const onDidChangeAuthenticationProviders: Event<AuthenticationProvidersChangeEvent>;
|
|
563
|
-
|
|
564
|
-
/**
|
|
565
|
-
* @deprecated
|
|
566
|
-
* An array of the information of authentication providers that are currently registered.
|
|
567
|
-
*/
|
|
568
|
-
export const providers: ReadonlyArray<AuthenticationProviderInformation>;
|
|
569
|
-
|
|
570
|
-
/**
|
|
571
|
-
* @deprecated
|
|
572
|
-
* Logout of a specific session.
|
|
573
|
-
* @param providerId The id of the provider to use
|
|
574
|
-
* @param sessionId The session id to remove
|
|
575
|
-
* provider
|
|
576
|
-
*/
|
|
577
|
-
export function logout(providerId: string, sessionId: string): Thenable<void>;
|
|
578
|
-
}
|
|
579
|
-
|
|
580
|
-
//#endregion
|
|
581
|
-
|
|
582
|
-
//#region https://github.com/microsoft/vscode/issues/16221
|
|
583
|
-
|
|
584
|
-
// todo@API Split between Inlay- and OverlayHints (InlayHint are for a position, OverlayHints for a non-empty range)
|
|
585
|
-
// todo@API add "mini-markdown" for links and styles
|
|
586
|
-
// (done) remove description
|
|
587
|
-
// (done) rename to InlayHint
|
|
588
|
-
// (done) add InlayHintKind with type, argument, etc
|
|
589
|
-
|
|
590
|
-
export namespace languages {
|
|
591
|
-
/**
|
|
592
|
-
* Register a inlay hints provider.
|
|
593
|
-
*
|
|
594
|
-
* Multiple providers can be registered for a language. In that case providers are asked in
|
|
595
|
-
* parallel and the results are merged. A failing provider (rejected promise or exception) will
|
|
596
|
-
* not cause a failure of the whole operation.
|
|
597
|
-
*
|
|
598
|
-
* @param selector A selector that defines the documents this provider is applicable to.
|
|
599
|
-
* @param provider An inlay hints provider.
|
|
600
|
-
* @return A {@link Disposable} that unregisters this provider when being disposed.
|
|
601
|
-
*/
|
|
602
|
-
export function registerInlayHintsProvider(selector: DocumentSelector, provider: InlayHintsProvider): Disposable;
|
|
603
|
-
}
|
|
604
|
-
|
|
605
|
-
export enum InlayHintKind {
|
|
606
|
-
Type = 1,
|
|
607
|
-
Parameter = 2,
|
|
608
|
-
}
|
|
609
|
-
|
|
610
|
-
/**
|
|
611
|
-
* An inlay hint label part allows for interactive and composite labels of inlay hints.
|
|
612
|
-
*/
|
|
613
|
-
export class InlayHintLabelPart {
|
|
614
|
-
|
|
615
|
-
/**
|
|
616
|
-
* The value of this label part.
|
|
617
|
-
*/
|
|
618
|
-
value: string;
|
|
619
|
-
|
|
620
|
-
/**
|
|
621
|
-
* The tooltip text when you hover over this label part.
|
|
622
|
-
*
|
|
623
|
-
* *Note* that this property can be set late during
|
|
624
|
-
* {@link InlayHintsProvider.resolveInlayHint resolving} of inlay hints.
|
|
625
|
-
*/
|
|
626
|
-
tooltip?: string | MarkdownString | undefined;
|
|
627
|
-
|
|
628
|
-
/**
|
|
629
|
-
* An optional {@link Location source code location} that represents this label
|
|
630
|
-
* part.
|
|
631
|
-
*
|
|
632
|
-
* The editor will use this location for the hover and for code navigation features: This
|
|
633
|
-
* part will become a clickable link that resolves to the definition of the symbol at the
|
|
634
|
-
* given location (not necessarily the location itself), it shows the hover that shows at
|
|
635
|
-
* the given location, and it shows a context menu with further code navigation commands.
|
|
636
|
-
*
|
|
637
|
-
* *Note* that this property can be set late during
|
|
638
|
-
* {@link InlayHintsProvider.resolveInlayHint resolving} of inlay hints.
|
|
639
|
-
*/
|
|
640
|
-
location?: Location | undefined;
|
|
641
|
-
|
|
642
|
-
/**
|
|
643
|
-
* An optional command for this label part.
|
|
644
|
-
*
|
|
645
|
-
* The editor renders parts with commands as clickable links. The command is added to the context menu
|
|
646
|
-
* when a label part defines {@link InlayHintLabelPart.location location} and {@link InlayHintLabelPart.command command} .
|
|
647
|
-
*
|
|
648
|
-
* *Note* that this property can be set late during
|
|
649
|
-
* {@link InlayHintsProvider.resolveInlayHint resolving} of inlay hints.
|
|
650
|
-
*/
|
|
651
|
-
command?: Command | undefined;
|
|
652
|
-
|
|
653
|
-
/**
|
|
654
|
-
* Creates a new inlay hint label part.
|
|
655
|
-
*
|
|
656
|
-
* @param value The value of the part.
|
|
657
|
-
*/
|
|
658
|
-
constructor(value: string);
|
|
659
|
-
}
|
|
660
|
-
|
|
661
|
-
/**
|
|
662
|
-
* Inlay hint information.
|
|
663
|
-
*/
|
|
664
|
-
export class InlayHint {
|
|
665
|
-
|
|
666
|
-
/**
|
|
667
|
-
* The position of this hint.
|
|
668
|
-
*/
|
|
669
|
-
position: Position;
|
|
670
|
-
|
|
671
|
-
/**
|
|
672
|
-
* The label of this hint. A human readable string or an array of {@link InlayHintLabelPart label parts}.
|
|
673
|
-
*
|
|
674
|
-
* *Note* that neither the string nor the label part can be empty.
|
|
675
|
-
*/
|
|
676
|
-
label: string | InlayHintLabelPart[];
|
|
677
|
-
|
|
678
|
-
/**
|
|
679
|
-
* The tooltip text when you hover over this item.
|
|
680
|
-
*
|
|
681
|
-
* *Note* that this property can be set late during
|
|
682
|
-
* {@link InlayHintsProvider.resolveInlayHint resolving} of inlay hints.
|
|
683
|
-
*/
|
|
684
|
-
tooltip?: string | MarkdownString | undefined;
|
|
685
|
-
|
|
686
|
-
/**
|
|
687
|
-
* The kind of this hint. The inlay hint kind defines the appearance of this inlay hint.
|
|
688
|
-
*/
|
|
689
|
-
kind?: InlayHintKind;
|
|
690
|
-
|
|
691
|
-
/**
|
|
692
|
-
* Optional {@link TextEdit text edits} that are performed when accepting this inlay hint. The default
|
|
693
|
-
* gesture for accepting an inlay hint is the double click.
|
|
694
|
-
*
|
|
695
|
-
* *Note* that edits are expected to change the document so that the inlay hint (or its nearest variant) is
|
|
696
|
-
* now part of the document and the inlay hint itself is now obsolete.
|
|
697
|
-
*
|
|
698
|
-
* *Note* that this property can be set late during
|
|
699
|
-
* {@link InlayHintsProvider.resolveInlayHint resolving} of inlay hints.
|
|
700
|
-
*/
|
|
701
|
-
textEdits?: TextEdit[];
|
|
702
|
-
|
|
703
|
-
/**
|
|
704
|
-
* Render padding before the hint. Padding will use the editor's background color,
|
|
705
|
-
* not the background color of the hint itself. That means padding can be used to visually
|
|
706
|
-
* align/separate an inlay hint.
|
|
707
|
-
*/
|
|
708
|
-
paddingLeft?: boolean;
|
|
709
|
-
|
|
710
|
-
/**
|
|
711
|
-
* Render padding after the hint. Padding will use the editor's background color,
|
|
712
|
-
* not the background color of the hint itself. That means padding can be used to visually
|
|
713
|
-
* align/separate an inlay hint.
|
|
714
|
-
*/
|
|
715
|
-
paddingRight?: boolean;
|
|
716
|
-
|
|
717
|
-
/**
|
|
718
|
-
* Creates a new inlay hint.
|
|
719
|
-
*
|
|
720
|
-
* @param position The position of the hint.
|
|
721
|
-
* @param label The label of the hint.
|
|
722
|
-
* @param kind The {@link InlayHintKind kind} of the hint.
|
|
723
|
-
*/
|
|
724
|
-
constructor(position: Position, label: string | InlayHintLabelPart[], kind?: InlayHintKind);
|
|
725
|
-
}
|
|
726
|
-
|
|
727
|
-
/**
|
|
728
|
-
* The inlay hints provider interface defines the contract between extensions and
|
|
729
|
-
* the inlay hints feature.
|
|
730
|
-
*/
|
|
731
|
-
export interface InlayHintsProvider<T extends InlayHint = InlayHint> {
|
|
732
|
-
|
|
733
|
-
/**
|
|
734
|
-
* An optional event to signal that inlay hints have changed.
|
|
735
|
-
* @see {@link EventEmitter}
|
|
736
|
-
*/
|
|
737
|
-
onDidChangeInlayHints?: Event<void>;
|
|
738
|
-
|
|
739
|
-
/**
|
|
740
|
-
*
|
|
741
|
-
* @param model The document in which the command was invoked.
|
|
742
|
-
* @param range The range for which inlay hints should be computed.
|
|
743
|
-
* @param token A cancellation token.
|
|
744
|
-
* @return A list of inlay hints or a thenable that resolves to such.
|
|
745
|
-
*/
|
|
746
|
-
provideInlayHints(model: TextDocument, range: Range, token: CancellationToken): ProviderResult<T[]>;
|
|
747
|
-
|
|
748
|
-
/**
|
|
749
|
-
* Given an inlay hint fill in {@link InlayHint.tooltip tooltip}, {@link InlayHint.textEdits text edits},
|
|
750
|
-
* or complete label {@link InlayHintLabelPart parts}.
|
|
751
|
-
*
|
|
752
|
-
* *Note* that the editor will resolve an inlay hint at most once.
|
|
753
|
-
*
|
|
754
|
-
* @param hint An inlay hint.
|
|
755
|
-
* @param token A cancellation token.
|
|
756
|
-
* @return The resolved inlay hint or a thenable that resolves to such. It is OK to return the given `item`. When no result is returned, the given `item` will be used.
|
|
757
|
-
*/
|
|
758
|
-
resolveInlayHint?(hint: T, token: CancellationToken): ProviderResult<T>;
|
|
759
|
-
}
|
|
760
|
-
//#endregion
|
|
761
|
-
|
|
762
|
-
//#region https://github.com/Microsoft/vscode/issues/15178
|
|
763
|
-
|
|
764
|
-
// TODO@API must be a class
|
|
765
|
-
export interface OpenEditorInfo {
|
|
766
|
-
name: string;
|
|
767
|
-
resource: Uri;
|
|
768
|
-
isActive: boolean;
|
|
769
|
-
}
|
|
770
|
-
|
|
771
|
-
export namespace window {
|
|
772
|
-
export const openEditors: ReadonlyArray<OpenEditorInfo>;
|
|
773
|
-
|
|
774
|
-
// todo@API proper event type
|
|
775
|
-
export const onDidChangeOpenEditors: Event<void>;
|
|
776
|
-
}
|
|
777
|
-
|
|
778
|
-
//#endregion
|
|
779
|
-
|
|
780
|
-
export namespace extensions {
|
|
781
|
-
/**
|
|
782
|
-
* All extensions across all extension hosts.
|
|
783
|
-
*
|
|
784
|
-
* @see {@link Extension.isFromDifferentExtensionHost}
|
|
785
|
-
*/
|
|
786
|
-
export const allAcrossExtensionHosts: readonly Extension<void>[];
|
|
787
|
-
|
|
788
|
-
}
|
|
789
|
-
}
|