@opensumi/sumi 2.12.1-next-079c1930
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/README.md +1 -0
- package/build.ts +18 -0
- package/index.d.ts +5 -0
- package/manifest.json +414 -0
- package/package.json +18 -0
- package/sumi-browser.d.ts +273 -0
- package/sumi-worker/sumi-worker.d.ts +2788 -0
- package/sumi-worker/worker.command.d.ts +86 -0
- package/sumi-worker/worker.comments.d.ts +273 -0
- package/sumi-worker/worker.doc.d.ts +356 -0
- package/sumi-worker/worker.editor.d.ts +725 -0
- package/sumi-worker/worker.extensions.d.ts +63 -0
- package/sumi-worker/worker.language.d.ts +2220 -0
- package/sumi-worker/worker.window.d.ts +318 -0
- package/sumi-worker.d.ts +7 -0
- package/sumi.d.ts +822 -0
- package/vscode/typings/vscode.authentication.d.ts +231 -0
- package/vscode/typings/vscode.command.d.ts +86 -0
- package/vscode/typings/vscode.comments.d.ts +292 -0
- package/vscode/typings/vscode.d.ts +3789 -0
- package/vscode/typings/vscode.debug.d.ts +684 -0
- package/vscode/typings/vscode.doc.d.ts +272 -0
- package/vscode/typings/vscode.editor.d.ts +1017 -0
- package/vscode/typings/vscode.env.d.ts +153 -0
- package/vscode/typings/vscode.extension.d.ts +67 -0
- package/vscode/typings/vscode.language.d.ts +2630 -0
- package/vscode/typings/vscode.message.d.ts +195 -0
- package/vscode/typings/vscode.proposed.d.ts +662 -0
- package/vscode/typings/vscode.quickpick.d.ts +491 -0
- package/vscode/typings/vscode.scm.d.ts +254 -0
- package/vscode/typings/vscode.tasks.d.ts +676 -0
- package/vscode/typings/vscode.theme.d.ts +370 -0
- package/vscode/typings/vscode.window.d.ts +870 -0
- package/vscode/typings/vscode.workspace.d.ts +664 -0
- package/vscode/typings-pending/vscode.d.ts +27 -0
- package/vscode/typings-pending/vscode.proposed.d.ts +3 -0
- package/vscode.d.ts +23 -0
|
@@ -0,0 +1,662 @@
|
|
|
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
|
+
Other = 0,
|
|
607
|
+
Type = 1,
|
|
608
|
+
Parameter = 2,
|
|
609
|
+
}
|
|
610
|
+
|
|
611
|
+
/**
|
|
612
|
+
* Inlay hint information.
|
|
613
|
+
*/
|
|
614
|
+
export class InlayHint {
|
|
615
|
+
/**
|
|
616
|
+
* The text of the hint.
|
|
617
|
+
*/
|
|
618
|
+
text: string;
|
|
619
|
+
/**
|
|
620
|
+
* The position of this hint.
|
|
621
|
+
*/
|
|
622
|
+
position: Position;
|
|
623
|
+
/**
|
|
624
|
+
* The kind of this hint.
|
|
625
|
+
*/
|
|
626
|
+
kind?: InlayHintKind;
|
|
627
|
+
/**
|
|
628
|
+
* Whitespace before the hint.
|
|
629
|
+
*/
|
|
630
|
+
whitespaceBefore?: boolean;
|
|
631
|
+
/**
|
|
632
|
+
* Whitespace after the hint.
|
|
633
|
+
*/
|
|
634
|
+
whitespaceAfter?: boolean;
|
|
635
|
+
|
|
636
|
+
// todo@API make range first argument
|
|
637
|
+
constructor(text: string, position: Position, kind?: InlayHintKind);
|
|
638
|
+
}
|
|
639
|
+
|
|
640
|
+
/**
|
|
641
|
+
* The inlay hints provider interface defines the contract between extensions and
|
|
642
|
+
* the inlay hints feature.
|
|
643
|
+
*/
|
|
644
|
+
export interface InlayHintsProvider {
|
|
645
|
+
|
|
646
|
+
/**
|
|
647
|
+
* An optional event to signal that inlay hints have changed.
|
|
648
|
+
* @see {@link EventEmitter}
|
|
649
|
+
*/
|
|
650
|
+
onDidChangeInlayHints?: Event<void>;
|
|
651
|
+
|
|
652
|
+
/**
|
|
653
|
+
*
|
|
654
|
+
* @param model The document in which the command was invoked.
|
|
655
|
+
* @param range The range for which inlay hints should be computed.
|
|
656
|
+
* @param token A cancellation token.
|
|
657
|
+
* @return A list of inlay hints or a thenable that resolves to such.
|
|
658
|
+
*/
|
|
659
|
+
provideInlayHints(model: TextDocument, range: Range, token: CancellationToken): ProviderResult<InlayHint[]>;
|
|
660
|
+
}
|
|
661
|
+
//#endregion
|
|
662
|
+
}
|