@codingame/monaco-vscode-extensions-service-override 1.82.5-next.0 → 1.82.5

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.
Files changed (21) hide show
  1. package/{vscode → dist/main/vscode}/src/vs/workbench/api/common/extHost.api.impl.d.ts +2 -2
  2. package/{vscode → dist/main/vscode}/src/vs/workbench/api/common/extHostConfiguration.d.ts +3 -3
  3. package/{vscode → dist/main/vscode}/src/vs/workbench/api/common/extHostExtensionService.d.ts +4 -3
  4. package/{vscode → dist/main/vscode}/src/vs/workbench/api/common/extHostManagedSockets.d.ts +2 -2
  5. package/{vscode → dist/main/vscode}/src/vs/workbench/api/common/extHostTerminalService.d.ts +20 -19
  6. package/{vscode → dist/main/vscode}/src/vs/workbench/api/common/extHostTunnelService.d.ts +8 -7
  7. package/{vscode → dist/main/vscode}/src/vs/workbench/api/common/extHostWorkspace.d.ts +26 -25
  8. package/extensions.d.ts +3 -3
  9. package/package.json +2 -2
  10. package/vscode-proposed.d.ts +3704 -0
  11. /package/{vscode → dist/main/vscode}/src/vs/workbench/api/common/extHost.protocol.d.ts +0 -0
  12. /package/{vscode → dist/main/vscode}/src/vs/workbench/api/common/extHostExtensionActivator.d.ts +0 -0
  13. /package/{vscode → dist/main/vscode}/src/vs/workbench/api/common/extHostFileSystemInfo.d.ts +0 -0
  14. /package/{vscode → dist/main/vscode}/src/vs/workbench/api/common/extHostInitDataService.d.ts +0 -0
  15. /package/{vscode → dist/main/vscode}/src/vs/workbench/api/common/extHostLocalizationService.d.ts +0 -0
  16. /package/{vscode → dist/main/vscode}/src/vs/workbench/api/common/extHostRpcService.d.ts +0 -0
  17. /package/{vscode → dist/main/vscode}/src/vs/workbench/api/common/extHostStoragePaths.d.ts +0 -0
  18. /package/{vscode → dist/main/vscode}/src/vs/workbench/api/common/extHostTypes.d.ts +0 -0
  19. /package/{vscode → dist/main/vscode}/src/vs/workbench/api/common/extHostUriTransformerService.d.ts +0 -0
  20. /package/{vscode → dist/main/vscode}/src/vs/workbench/api/worker/extHostExtensionService.d.ts +0 -0
  21. /package/{vscode → dist/main/vscode}/src/vs/workbench/services/search/common/queryBuilder.d.ts +0 -0
@@ -0,0 +1,3704 @@
1
+ import * as vscode from 'vscode';
2
+ import { CancellationToken, ProviderResult, Disposable, Uri, Progress, MarkdownString, ThemeIcon, ThemeColor, TextDocument, WebviewPanel, DebugSession, Event, Range, DataTransfer, SnippetString, WorkspaceEdit, WorkspaceFolder, TextEditor, Webview, CommentThreadCollapsibleState, CommentThreadState, CommentThread, GlobPattern, Command, Selection, TextEdit, CompletionItemKind, DocumentSelector, CodeActionKind, NotebookDocument, NotebookControllerAffinity, NotebookEditor, QuickInput, TabInputText, TabInputTextDiff, TabInputCustom, TabInputWebview, TabInputNotebook, TabInputNotebookDiff, TabInputTerminal, TerminalDimensions, WebviewOptions, Position, TestMessage, TestRunRequest, TestItem, AccessibilityInformation, DocumentDropEditProvider, TreeViewExpansionEvent, TreeViewSelectionChangeEvent, TreeViewVisibilityChangeEvent, TreeCheckboxChangeEvent, ViewBadge, NotebookSerializer } from 'vscode';
3
+ export * from 'vscode';
4
+
5
+ // https://github.com/microsoft/vscode/issues/190909
6
+
7
+ declare enum RelatedInformationType {
8
+ SymbolInformation = 1,
9
+ CommandInformation = 2,
10
+ SearchInformation = 3,
11
+ SettingInformation = 4
12
+ }
13
+
14
+ interface RelatedInformationBaseResult {
15
+ type: RelatedInformationType;
16
+ weight: number;
17
+ }
18
+
19
+ // TODO: Symbols and Search
20
+
21
+ interface CommandInformationResult extends RelatedInformationBaseResult {
22
+ type: RelatedInformationType.CommandInformation;
23
+ command: string;
24
+ }
25
+
26
+ interface SettingInformationResult extends RelatedInformationBaseResult {
27
+ type: RelatedInformationType.SettingInformation;
28
+ setting: string;
29
+ }
30
+
31
+ type RelatedInformationResult = CommandInformationResult | SettingInformationResult;
32
+
33
+ interface RelatedInformationProvider {
34
+ provideRelatedInformation(query: string, token: CancellationToken): ProviderResult<RelatedInformationResult[]>;
35
+ }
36
+
37
+ interface EmbeddingVectorProvider {
38
+ provideEmbeddingVector(strings: string[], token: CancellationToken): ProviderResult<number[][]>;
39
+ }
40
+
41
+ declare namespace ai {
42
+ export function getRelatedInformation(query: string, types: RelatedInformationType[], token: CancellationToken): Thenable<RelatedInformationResult[]>;
43
+ export function registerRelatedInformationProvider(type: RelatedInformationType, provider: RelatedInformationProvider): Disposable;
44
+ export function registerEmbeddingVectorProvider(model: string, provider: EmbeddingVectorProvider): Disposable;
45
+ }
46
+ // https://github.com/microsoft/vscode/issues/152399
47
+
48
+ interface AuthenticationForceNewSessionOptions {
49
+ /**
50
+ * The session that you are asking to be recreated. The Auth Provider can use this to
51
+ * help guide the user to log in to the correct account.
52
+ */
53
+ sessionToRecreate?: AuthenticationSession;
54
+ }
55
+
56
+ /**
57
+ * The options passed in to the provider when creating a session.
58
+ */
59
+ interface AuthenticationProviderCreateSessionOptions {
60
+ /**
61
+ * The session that is being asked to be recreated. If this is passed in, the provider should
62
+ * attempt to recreate the session based on the information in this session.
63
+ */
64
+ sessionToRecreate?: AuthenticationSession;
65
+ }
66
+
67
+ interface AuthenticationProvider {
68
+ /**
69
+ * Prompts a user to login.
70
+ *
71
+ * If login is successful, the onDidChangeSessions event should be fired.
72
+ *
73
+ * If login fails, a rejected promise should be returned.
74
+ *
75
+ * If the provider has specified that it does not support multiple accounts,
76
+ * then this should never be called if there is already an existing session matching these
77
+ * scopes.
78
+ * @param scopes A list of scopes, permissions, that the new session should be created with.
79
+ * @param options Additional options for creating a session.
80
+ * @returns A promise that resolves to an authentication session.
81
+ */
82
+ createSession(scopes: readonly string[], options: AuthenticationProviderCreateSessionOptions): Thenable<AuthenticationSession>;
83
+ }
84
+
85
+ declare namespace authentication {
86
+ /**
87
+ * Get all authentication sessions matching the desired scopes that this extension has access to. In order to request access,
88
+ * use {@link getSession}. To request an additional account, specify {@link AuthenticationGetSessionOptions.clearSessionPreference}
89
+ * and {@link AuthenticationGetSessionOptions.createIfNone} together.
90
+ *
91
+ * Currently, there are only two authentication providers that are contributed from built in extensions
92
+ * to the editor that implement GitHub and Microsoft authentication: their providerId's are 'github' and 'microsoft'.
93
+ *
94
+ * @param providerId The id of the provider to use
95
+ * @param scopes A list of scopes representing the permissions requested. These are dependent on the authentication provider
96
+ * @returns A thenable that resolves to a readonly array of authentication sessions.
97
+ */
98
+ export function getSessions(providerId: string, scopes: readonly string[]): Thenable<readonly AuthenticationSession[]>;
99
+ }
100
+ declare namespace authentication {
101
+ /**
102
+ * @deprecated Use {@link getSession()} {@link AuthenticationGetSessionOptions.silent} instead.
103
+ */
104
+ export function hasSession(providerId: string, scopes: readonly string[]): Thenable<boolean>;
105
+ }
106
+
107
+ interface CanonicalUriProvider {
108
+ /**
109
+ *
110
+ * @param uri The URI to provide a canonical URI for.
111
+ * @param options Options that the provider should honor in the URI it returns.
112
+ * @param token A cancellation token for the request.
113
+ * @returns The canonical URI for the requested URI or undefined if no canonical URI can be provided.
114
+ */
115
+ provideCanonicalUri(uri: Uri, options: CanonicalUriRequestOptions, token: CancellationToken): ProviderResult<Uri>;
116
+ }
117
+
118
+ interface CanonicalUriRequestOptions {
119
+ /**
120
+ *
121
+ * The desired scheme of the canonical URI.
122
+ */
123
+ targetScheme: string;
124
+ }
125
+ // ChatML
126
+ declare enum ChatMessageRole {
127
+ System = 0,
128
+ User = 1,
129
+ Assistant = 2,
130
+ Function = 3,
131
+ }
132
+
133
+ // ChatML
134
+ declare class ChatMessage {
135
+ role: ChatMessageRole;
136
+ content: string;
137
+ name?: string;
138
+
139
+ constructor(role: ChatMessageRole, content: string);
140
+ }
141
+
142
+ /**
143
+ * Represents a large language model that accepts ChatML messages and produces a streaming response
144
+ */
145
+ interface ChatResponseProvider {
146
+ provideChatResponse(messages: ChatMessage[], options: { [name: string]: any }, progress: Progress<ChatResponseFragment>, token: CancellationToken): Thenable<any>;
147
+ }
148
+
149
+ interface ChatResponseProviderMetadata {
150
+ // TODO: add way to compute token count
151
+ name: string;
152
+ }
153
+ interface ChatResponseFragment {
154
+ index: number;
155
+ part: string;
156
+ }
157
+ interface ChatResponseFragment {
158
+ index: number;
159
+ part: string;
160
+ }
161
+
162
+ /**
163
+ * Represents access to using a chat provider (LLM). Access is granted and temporary, usually only valid
164
+ * for the duration of an user interaction.
165
+ */
166
+ interface ChatAccess {
167
+
168
+ /**
169
+ * Whether the access to chat has been revoked. This happens when the user interaction that allowed for
170
+ * chat access is finished.
171
+ */
172
+ isRevoked: boolean;
173
+
174
+ /**
175
+ * TODO: return an AsyncIterable instead of asking to pass Progress<...>?
176
+ *
177
+ * @param messages
178
+ * @param options
179
+ * @param progress
180
+ * @param token
181
+ */
182
+ makeRequest(messages: ChatMessage[], options: { [name: string]: any }, progress: Progress<ChatResponseFragment>, token: CancellationToken): Thenable<any>;
183
+ }
184
+ interface SlashCommandContext {
185
+
186
+ // messages so far
187
+ history: ChatMessage[];
188
+
189
+ // TODO: access to embeddings
190
+ // embeddings: {};
191
+
192
+ // TODO: access to "InputSourceId"
193
+ // DebugConsoleOutput
194
+ // Terminal
195
+ // CorrespondingTestFile
196
+ // CorrespondingImplementationFile
197
+ // ExtensionApi
198
+ // VSCode
199
+ // Workspace
200
+ }
201
+
202
+ interface SlashResponse {
203
+ message: MarkdownString;
204
+ // edits?: TextEdit[] | WorkspaceEdit;
205
+ }
206
+
207
+ interface SlashResult {
208
+ // followUp?: InteractiveSessionFollowup[];
209
+ }
210
+
211
+ interface SlashCommandMetadata {
212
+ description: string;
213
+ }
214
+
215
+ interface SlashCommand {
216
+
217
+ (prompt: ChatMessage, context: SlashCommandContext, progress: Progress<SlashResponse>, token: CancellationToken): Thenable<SlashResult>;
218
+ }
219
+
220
+ declare enum ChatVariableLevel {
221
+ Short = 1,
222
+ Medium = 2,
223
+ Full = 3
224
+ }
225
+
226
+ interface ChatVariableValue {
227
+ level: ChatVariableLevel;
228
+ value: string;
229
+ description?: string;
230
+ }
231
+
232
+ interface ChatVariableContext {
233
+ message: string;
234
+ }
235
+
236
+ interface ChatVariableResolver {
237
+ resolve(name: string, context: ChatVariableContext, token: CancellationToken): ProviderResult<ChatVariableValue[]>;
238
+ }
239
+ // https://github.com/microsoft/vscode/issues/135591 @alexr00
240
+
241
+ // export interface FileDecorationProvider {
242
+ // provideFileDecoration(uri: Uri, token: CancellationToken): ProviderResult<FileDecoration | FileDecoration1>;
243
+ // }
244
+
245
+ /**
246
+ * A file decoration represents metadata that can be rendered with a file.
247
+ */
248
+ declare class FileDecoration2 {
249
+ /**
250
+ * A very short string that represents this decoration.
251
+ */
252
+ badge?: string | ThemeIcon;
253
+
254
+ /**
255
+ * A human-readable tooltip for this decoration.
256
+ */
257
+ tooltip?: string;
258
+
259
+ /**
260
+ * The color of this decoration.
261
+ */
262
+ color?: ThemeColor;
263
+
264
+ /**
265
+ * A flag expressing that this decoration should be
266
+ * propagated to its parents.
267
+ */
268
+ propagate?: boolean;
269
+
270
+ /**
271
+ * Creates a new decoration.
272
+ *
273
+ * @param badge A letter that represents the decoration.
274
+ * @param tooltip The tooltip of the decoration.
275
+ * @param color The color of the decoration.
276
+ */
277
+ constructor(badge?: string | ThemeIcon, tooltip?: string, color?: ThemeColor);
278
+ }
279
+ // https://github.com/microsoft/vscode/issues/171166
280
+
281
+ declare enum CommentState {
282
+ Published = 0,
283
+ Draft = 1
284
+ }
285
+
286
+ interface Comment {
287
+ state?: CommentState;
288
+ }
289
+
290
+
291
+
292
+
293
+
294
+
295
+
296
+
297
+
298
+
299
+
300
+
301
+
302
+
303
+ // https://github.com/microsoft/vscode/issues/86146
304
+
305
+ // TODO: Also for custom editor
306
+
307
+ interface CustomTextEditorProvider {
308
+
309
+ /**
310
+ * Handle when the underlying resource for a custom editor is renamed.
311
+ *
312
+ * This allows the webview for the editor be preserved throughout the rename. If this method is not implemented,
313
+ * the editor will destroy the previous custom editor and create a replacement one.
314
+ *
315
+ * @param newDocument New text document to use for the custom editor.
316
+ * @param existingWebviewPanel Webview panel for the custom editor.
317
+ * @param token A cancellation token that indicates the result is no longer needed.
318
+ *
319
+ * @return Thenable indicating that the webview editor has been moved.
320
+ */
321
+ // eslint-disable-next-line local/vscode-dts-provider-naming
322
+ moveCustomTextEditor?(newDocument: TextDocument, existingWebviewPanel: WebviewPanel, token: CancellationToken): Thenable<void>;
323
+ }
324
+ // See https://github.com/microsoft/vscode/issues/63943
325
+
326
+ declare class ThreadFocus {
327
+ /**
328
+ * Create a ThreadFocus
329
+ * @param session
330
+ * @param threadId
331
+ * @param frameId
332
+ */
333
+ constructor(
334
+ session: DebugSession,
335
+ threadId?: number);
336
+
337
+
338
+ /**
339
+ * Debug session for thread.
340
+ */
341
+ readonly session: DebugSession;
342
+
343
+ /**
344
+ * Id of the associated thread (DAP id). May be undefined if thread has become unselected.
345
+ */
346
+ readonly threadId: number | undefined;
347
+ }
348
+
349
+ declare class StackFrameFocus {
350
+ /**
351
+ * Create a StackFrameFocus
352
+ * @param session
353
+ * @param threadId
354
+ * @param frameId
355
+ */
356
+ constructor(
357
+ session: DebugSession,
358
+ threadId?: number,
359
+ frameId?: number);
360
+
361
+
362
+ /**
363
+ * Debug session for thread.
364
+ */
365
+ readonly session: DebugSession;
366
+
367
+ /**
368
+ * Id of the associated thread (DAP id). May be undefined if a frame is unselected.
369
+ */
370
+ readonly threadId: number | undefined;
371
+ /**
372
+ * Id of the stack frame (DAP id). May be undefined if a frame is unselected.
373
+ */
374
+ readonly frameId: number | undefined;
375
+ }
376
+
377
+
378
+ declare namespace debug {
379
+ /**
380
+ * The currently focused thread or stack frame id, or `undefined` if this has not been set. (e.g. not in debug mode).
381
+ */
382
+ export let stackFrameFocus: ThreadFocus | StackFrameFocus | undefined;
383
+
384
+ /**
385
+ * An {@link Event} which fires when the {@link debug.stackFrameFocus} changes. Provides a sessionId. threadId is not undefined
386
+ * when a thread of frame has gained focus. frameId is defined when a stackFrame has gained focus.
387
+ */
388
+ export const onDidChangeStackFrameFocus: Event<ThreadFocus | StackFrameFocus | undefined>;
389
+ }
390
+ // https://github.com/microsoft/vscode/issues/84899
391
+
392
+ /**
393
+ * The contiguous set of modified lines in a diff.
394
+ */
395
+ interface LineChange {
396
+ readonly originalStartLineNumber: number;
397
+ readonly originalEndLineNumber: number;
398
+ readonly modifiedStartLineNumber: number;
399
+ readonly modifiedEndLineNumber: number;
400
+ }
401
+
402
+ declare namespace commands {
403
+
404
+ /**
405
+ * Registers a diff information command that can be invoked via a keyboard shortcut,
406
+ * a menu item, an action, or directly.
407
+ *
408
+ * Diff information commands are different from ordinary {@link commands.registerCommand commands} as
409
+ * they only execute when there is an active diff editor when the command is called, and the diff
410
+ * information has been computed. Also, the command handler of an editor command has access to
411
+ * the diff information.
412
+ *
413
+ * @param command A unique identifier for the command.
414
+ * @param callback A command handler function with access to the {@link LineChange diff information}.
415
+ * @param thisArg The `this` context used when invoking the handler function.
416
+ * @return Disposable which unregisters this command on disposal.
417
+ */
418
+ export function registerDiffInformationCommand(command: string, callback: (diff: LineChange[], ...args: any[]) => any, thisArg?: any): Disposable;
419
+ }
420
+ // TODO@rebornix: add github issue link
421
+
422
+ interface NotebookDocumentContentOptions {
423
+ /**
424
+ * Controls if a cell metadata property should be reverted when the cell content
425
+ * is reverted in notebook diff editor.
426
+ */
427
+ cellContentMetadata?: { [key: string]: boolean | undefined };
428
+ }
429
+ // todo@jrieken add issue reference
430
+
431
+ interface DocumentFilter {
432
+ readonly exclusive?: boolean;
433
+ }
434
+ // https://github.com/microsoft/vscode/issues/30066/
435
+
436
+ /**
437
+ * Provider invoked when the user copies and pastes code.
438
+ */
439
+ interface DocumentPasteEditProvider {
440
+
441
+ /**
442
+ * Optional method invoked after the user copies text in a file.
443
+ *
444
+ * During {@link prepareDocumentPaste}, an extension can compute metadata that is attached to
445
+ * a {@link DataTransfer} and is passed back to the provider in {@link provideDocumentPasteEdits}.
446
+ *
447
+ * @param document Document where the copy took place.
448
+ * @param ranges Ranges being copied in the `document`.
449
+ * @param dataTransfer The data transfer associated with the copy. You can store additional values on this for later use in {@link provideDocumentPasteEdits}.
450
+ * @param token A cancellation token.
451
+ */
452
+ prepareDocumentPaste?(document: TextDocument, ranges: readonly Range[], dataTransfer: DataTransfer, token: CancellationToken): void | Thenable<void>;
453
+
454
+ /**
455
+ * Invoked before the user pastes into a document.
456
+ *
457
+ * In this method, extensions can return a workspace edit that replaces the standard pasting behavior.
458
+ *
459
+ * @param document Document being pasted into
460
+ * @param ranges Currently selected ranges in the document.
461
+ * @param dataTransfer The data transfer associated with the paste.
462
+ * @param token A cancellation token.
463
+ *
464
+ * @return Optional workspace edit that applies the paste. Return undefined to use standard pasting.
465
+ */
466
+ provideDocumentPasteEdits?(document: TextDocument, ranges: readonly Range[], dataTransfer: DataTransfer, token: CancellationToken): ProviderResult<DocumentPasteEdit>;
467
+ }
468
+
469
+ /**
470
+ * An operation applied on paste
471
+ */
472
+ declare class DocumentPasteEdit {
473
+
474
+ /**
475
+ * Human readable label that describes the edit.
476
+ */
477
+ label: string;
478
+
479
+ /**
480
+ * Controls the ordering or multiple paste edits. If this provider yield to edits, it will be shown lower in the list.
481
+ */
482
+ yieldTo?: ReadonlyArray<
483
+ | { readonly extensionId: string; readonly providerId: string }
484
+ | { readonly mimeType: string }
485
+ >;
486
+
487
+ /**
488
+ * The text or snippet to insert at the pasted locations.
489
+ */
490
+ insertText: string | SnippetString;
491
+
492
+ /**
493
+ * An optional additional edit to apply on paste.
494
+ */
495
+ additionalEdit?: WorkspaceEdit;
496
+
497
+ /**
498
+ * @param insertText The text or snippet to insert at the pasted locations.
499
+ *
500
+ * TODO: Reverse args, but this will break existing consumers :(
501
+ */
502
+ constructor(insertText: string | SnippetString, label: string);
503
+ }
504
+
505
+ interface DocumentPasteProviderMetadata {
506
+ /**
507
+ * Identifies the provider.
508
+ *
509
+ * This id is used when users configure the default provider for paste.
510
+ *
511
+ * This id should be unique within the extension but does not need to be unique across extensions.
512
+ */
513
+ readonly id: string;
514
+
515
+ /**
516
+ * Mime types that {@link DocumentPasteEditProvider.prepareDocumentPaste provideDocumentPasteEdits} may add on copy.
517
+ */
518
+ readonly copyMimeTypes?: readonly string[];
519
+
520
+ /**
521
+ * Mime types that {@link DocumentPasteEditProvider.provideDocumentPasteEdits provideDocumentPasteEdits} should be invoked for.
522
+ *
523
+ * This can either be an exact mime type such as `image/png`, or a wildcard pattern such as `image/*`.
524
+ *
525
+ * Use `text/uri-list` for resources dropped from the explorer or other tree views in the workbench.
526
+ *
527
+ * Use `files` to indicate that the provider should be invoked if any {@link DataTransferFile files} are present in the {@link DataTransfer}.
528
+ * Note that {@link DataTransferFile} entries are only created when dropping content from outside the editor, such as
529
+ * from the operating system.
530
+ */
531
+ readonly pasteMimeTypes?: readonly string[];
532
+ }
533
+ // https://github.com/microsoft/vscode/issues/179430
534
+
535
+ interface DocumentDropEdit {
536
+ /**
537
+ * Human readable label that describes the edit.
538
+ */
539
+ label?: string;
540
+
541
+ /**
542
+ * The mime type from the {@link DataTransfer} that this edit applies.
543
+ *
544
+ * TODO: Should this be taken from `dropMimeTypes` instead?
545
+ */
546
+ handledMimeType?: string;
547
+
548
+ /**
549
+ * Controls the ordering or multiple paste edits. If this provider yield to edits, it will be shown lower in the list.
550
+ */
551
+ yieldTo?: ReadonlyArray<
552
+ // TODO: what about built-in providers?
553
+ | { readonly extensionId: string; readonly providerId: string }
554
+ | { readonly mimeType: string }
555
+ >;
556
+ }
557
+
558
+ interface DocumentDropEditProviderMetadata {
559
+ /**
560
+ * Identifies the provider.
561
+ *
562
+ * This id is used when users configure the default provider for drop.
563
+ *
564
+ * This id should be unique within the extension but does not need to be unique across extensions.
565
+ */
566
+ readonly id: string;
567
+
568
+ /**
569
+ * List of {@link DataTransfer} mime types that the provider can handle.
570
+ *
571
+ * This can either be an exact mime type such as `image/png`, or a wildcard pattern such as `image/*`.
572
+ *
573
+ * Use `text/uri-list` for resources dropped from the explorer or other tree views in the workbench.
574
+ *
575
+ * Use `files` to indicate that the provider should be invoked if any {@link DataTransferFile files} are present in the {@link DataTransfer}.
576
+ * Note that {@link DataTransferFile} entries are only created when dropping content from outside the editor, such as
577
+ * from the operating system.
578
+ */
579
+ readonly dropMimeTypes: readonly string[];
580
+ }
581
+
582
+ interface EditSessionIdentityProvider {
583
+ /**
584
+ *
585
+ * @param workspaceFolder The workspace folder to provide an edit session identity for.
586
+ * @param token A cancellation token for the request.
587
+ * @returns A string representing the edit session identity for the requested workspace folder.
588
+ */
589
+ provideEditSessionIdentity(workspaceFolder: WorkspaceFolder, token: CancellationToken): ProviderResult<string>;
590
+
591
+ /**
592
+ *
593
+ * @param identity1 An edit session identity.
594
+ * @param identity2 A second edit session identity to compare to @param identity1.
595
+ * @param token A cancellation token for the request.
596
+ * @returns An {@link EditSessionIdentityMatch} representing the edit session identity match confidence for the provided identities.
597
+ */
598
+ provideEditSessionIdentityMatch(identity1: string, identity2: string, token: CancellationToken): ProviderResult<EditSessionIdentityMatch>;
599
+ }
600
+
601
+ declare enum EditSessionIdentityMatch {
602
+ Complete = 100,
603
+ Partial = 50,
604
+ None = 0
605
+ }
606
+
607
+ interface EditSessionIdentityWillCreateEvent {
608
+
609
+ /**
610
+ * A cancellation token.
611
+ */
612
+ readonly token: CancellationToken;
613
+
614
+ /**
615
+ * The workspace folder to create an edit session identity for.
616
+ */
617
+ readonly workspaceFolder: WorkspaceFolder;
618
+
619
+ /**
620
+ * Allows to pause the event until the provided thenable resolves.
621
+ *
622
+ * *Note:* This function can only be called during event dispatch.
623
+ *
624
+ * @param thenable A thenable that delays saving.
625
+ */
626
+ waitUntil(thenable: Thenable<any>): void;
627
+ }
628
+ interface WebviewEditorInset {
629
+ readonly editor: TextEditor;
630
+ readonly line: number;
631
+ readonly height: number;
632
+ readonly webview: Webview;
633
+ readonly onDidDispose: Event<void>;
634
+ dispose(): void;
635
+ }
636
+ // https://github.com/microsoft/vscode/issues/104436
637
+
638
+ declare enum ExtensionRuntime {
639
+ /**
640
+ * The extension is running in a NodeJS extension host. Runtime access to NodeJS APIs is available.
641
+ */
642
+ Node = 1,
643
+ /**
644
+ * The extension is running in a Webworker extension host. Runtime access is limited to Webworker APIs.
645
+ */
646
+ Webworker = 2
647
+ }
648
+ // https://github.com/microsoft/vscode/issues/145307
649
+
650
+ interface Extension<T> {
651
+
652
+ /**
653
+ * `true` when the extension is associated to another extension host.
654
+ *
655
+ * *Note* that an extension from another extension host cannot export
656
+ * API, e.g {@link Extension.exports its exports} are always `undefined`.
657
+ */
658
+ readonly isFromDifferentExtensionHost: boolean;
659
+ }
660
+
661
+ declare namespace extensions {
662
+
663
+ /**
664
+ * Get an extension by its full identifier in the form of: `publisher.name`.
665
+ *
666
+ * @param extensionId An extension identifier.
667
+ * @param includeDifferentExtensionHosts Include extensions from different extension host
668
+ * @return An extension or `undefined`.
669
+ */
670
+ export function getExtension<T = any>(extensionId: string, includeDifferentExtensionHosts: boolean): Extension<T> | undefined;
671
+
672
+ /**
673
+ * All extensions across all extension hosts.
674
+ *
675
+ * @see {@link Extension.isFromDifferentExtensionHost}
676
+ */
677
+ export const allAcrossExtensionHosts: readonly Extension<void>[];
678
+
679
+ }
680
+ // https://github.com/microsoft/vscode/issues/109277
681
+
682
+ /**
683
+ * Details if an `ExternalUriOpener` can open a uri.
684
+ *
685
+ * The priority is also used to rank multiple openers against each other and determine
686
+ * if an opener should be selected automatically or if the user should be prompted to
687
+ * select an opener.
688
+ *
689
+ * The editor will try to use the best available opener, as sorted by `ExternalUriOpenerPriority`.
690
+ * If there are multiple potential "best" openers for a URI, then the user will be prompted
691
+ * to select an opener.
692
+ */
693
+ declare enum ExternalUriOpenerPriority {
694
+ /**
695
+ * The opener is disabled and will never be shown to users.
696
+ *
697
+ * Note that the opener can still be used if the user specifically
698
+ * configures it in their settings.
699
+ */
700
+ None = 0,
701
+
702
+ /**
703
+ * The opener can open the uri but will not cause a prompt on its own
704
+ * since the editor always contributes a built-in `Default` opener.
705
+ */
706
+ Option = 1,
707
+
708
+ /**
709
+ * The opener can open the uri.
710
+ *
711
+ * The editor's built-in opener has `Default` priority. This means that any additional `Default`
712
+ * openers will cause the user to be prompted to select from a list of all potential openers.
713
+ */
714
+ Default = 2,
715
+
716
+ /**
717
+ * The opener can open the uri and should be automatically selected over any
718
+ * default openers, include the built-in one from the editor.
719
+ *
720
+ * A preferred opener will be automatically selected if no other preferred openers
721
+ * are available. If multiple preferred openers are available, then the user
722
+ * is shown a prompt with all potential openers (not just preferred openers).
723
+ */
724
+ Preferred = 3,
725
+ }
726
+
727
+ /**
728
+ * Handles opening uris to external resources, such as http(s) links.
729
+ *
730
+ * Extensions can implement an `ExternalUriOpener` to open `http` links to a webserver
731
+ * inside of the editor instead of having the link be opened by the web browser.
732
+ *
733
+ * Currently openers may only be registered for `http` and `https` uris.
734
+ */
735
+ interface ExternalUriOpener {
736
+
737
+ /**
738
+ * Check if the opener can open a uri.
739
+ *
740
+ * @param uri The uri being opened. This is the uri that the user clicked on. It has
741
+ * not yet gone through port forwarding.
742
+ * @param token Cancellation token indicating that the result is no longer needed.
743
+ *
744
+ * @return Priority indicating if the opener can open the external uri.
745
+ */
746
+ canOpenExternalUri(uri: Uri, token: CancellationToken): ExternalUriOpenerPriority | Thenable<ExternalUriOpenerPriority>;
747
+
748
+ /**
749
+ * Open a uri.
750
+ *
751
+ * This is invoked when:
752
+ *
753
+ * - The user clicks a link which does not have an assigned opener. In this case, first `canOpenExternalUri`
754
+ * is called and if the user selects this opener, then `openExternalUri` is called.
755
+ * - The user sets the default opener for a link in their settings and then visits a link.
756
+ *
757
+ * @param resolvedUri The uri to open. This uri may have been transformed by port forwarding, so it
758
+ * may not match the original uri passed to `canOpenExternalUri`. Use `ctx.originalUri` to check the
759
+ * original uri.
760
+ * @param ctx Additional information about the uri being opened.
761
+ * @param token Cancellation token indicating that opening has been canceled.
762
+ *
763
+ * @return Thenable indicating that the opening has completed.
764
+ */
765
+ openExternalUri(resolvedUri: Uri, ctx: OpenExternalUriContext, token: CancellationToken): Thenable<void> | void;
766
+ }
767
+
768
+ /**
769
+ * Additional information about the uri being opened.
770
+ */
771
+ interface OpenExternalUriContext {
772
+ /**
773
+ * The uri that triggered the open.
774
+ *
775
+ * This is the original uri that the user clicked on or that was passed to `openExternal.`
776
+ * Due to port forwarding, this may not match the `resolvedUri` passed to `openExternalUri`.
777
+ */
778
+ readonly sourceUri: Uri;
779
+ }
780
+
781
+ /**
782
+ * Additional metadata about a registered `ExternalUriOpener`.
783
+ */
784
+ interface ExternalUriOpenerMetadata {
785
+
786
+ /**
787
+ * List of uri schemes the opener is triggered for.
788
+ *
789
+ * Currently only `http` and `https` are supported.
790
+ */
791
+ readonly schemes: readonly string[];
792
+
793
+ /**
794
+ * Text displayed to the user that explains what the opener does.
795
+ *
796
+ * For example, 'Open in browser preview'
797
+ */
798
+ readonly label: string;
799
+ }
800
+
801
+ interface OpenExternalOptions {
802
+ /**
803
+ * Allows using openers contributed by extensions through `registerExternalUriOpener`
804
+ * when opening the resource.
805
+ *
806
+ * If `true`, the editor will check if any contributed openers can handle the
807
+ * uri, and fallback to the default opener behavior.
808
+ *
809
+ * If it is string, this specifies the id of the `ExternalUriOpener`
810
+ * that should be used if it is available. Use `'default'` to force the editor's
811
+ * standard external opener to be used.
812
+ */
813
+ readonly allowContributedOpeners?: boolean | string;
814
+ }
815
+ interface CommentThread2 {
816
+ /**
817
+ * The uri of the document the thread has been created on.
818
+ */
819
+ readonly uri: Uri;
820
+
821
+ /**
822
+ * The range the comment thread is located within the document. The thread icon will be shown
823
+ * at the last line of the range.
824
+ */
825
+ range: Range | undefined;
826
+
827
+ /**
828
+ * The ordered comments of the thread.
829
+ */
830
+ comments: readonly Comment[];
831
+
832
+ /**
833
+ * Whether the thread should be collapsed or expanded when opening the document.
834
+ * Defaults to Collapsed.
835
+ */
836
+ collapsibleState: CommentThreadCollapsibleState;
837
+
838
+ /**
839
+ * Whether the thread supports reply.
840
+ * Defaults to true.
841
+ */
842
+ canReply: boolean;
843
+
844
+ /**
845
+ * Context value of the comment thread. This can be used to contribute thread specific actions.
846
+ * For example, a comment thread is given a context value as `editable`. When contributing actions to `comments/commentThread/title`
847
+ * using `menus` extension point, you can specify context value for key `commentThread` in `when` expression like `commentThread == editable`.
848
+ * ```json
849
+ * "contributes": {
850
+ * "menus": {
851
+ * "comments/commentThread/title": [
852
+ * {
853
+ * "command": "extension.deleteCommentThread",
854
+ * "when": "commentThread == editable"
855
+ * }
856
+ * ]
857
+ * }
858
+ * }
859
+ * ```
860
+ * This will show action `extension.deleteCommentThread` only for comment threads with `contextValue` is `editable`.
861
+ */
862
+ contextValue?: string;
863
+
864
+ /**
865
+ * The optional human-readable label describing the {@link CommentThread Comment Thread}
866
+ */
867
+ label?: string;
868
+
869
+ /**
870
+ * The optional state of a comment thread, which may affect how the comment is displayed.
871
+ */
872
+ state?: CommentThreadState;
873
+
874
+ /**
875
+ * Dispose this comment thread.
876
+ *
877
+ * Once disposed, this comment thread will be removed from visible editors and Comment Panel when appropriate.
878
+ */
879
+ dispose(): void;
880
+ }
881
+
882
+ interface CommentController {
883
+ createCommentThread(uri: Uri, range: Range | undefined, comments: readonly Comment[]): CommentThread | CommentThread2;
884
+ }
885
+
886
+ interface CommentingRangeProvider2 {
887
+ /**
888
+ * Provide a list of ranges which allow new comment threads creation or null for a given document
889
+ */
890
+ provideCommentingRanges(document: TextDocument, token: CancellationToken): ProviderResult<Range[] | { fileComments: boolean; ranges?: Range[] }>;
891
+ }
892
+ // https://github.com/microsoft/vscode/issues/73524
893
+
894
+ /**
895
+ * The parameters of a query for file search.
896
+ */
897
+ interface FileSearchQuery {
898
+ /**
899
+ * The search pattern to match against file paths.
900
+ */
901
+ pattern: string;
902
+ }
903
+
904
+ /**
905
+ * Options that apply to file search.
906
+ */
907
+ interface FileSearchOptions extends SearchOptions {
908
+ /**
909
+ * The maximum number of results to be returned.
910
+ */
911
+ maxResults?: number;
912
+
913
+ /**
914
+ * A CancellationToken that represents the session for this search query. If the provider chooses to, this object can be used as the key for a cache,
915
+ * and searches with the same session object can search the same cache. When the token is cancelled, the session is complete and the cache can be cleared.
916
+ */
917
+ session?: CancellationToken;
918
+ }
919
+
920
+ /**
921
+ * A FileSearchProvider provides search results for files in the given folder that match a query string. It can be invoked by quickopen or other extensions.
922
+ *
923
+ * A FileSearchProvider is the more powerful of two ways to implement file search in the editor. Use a FileSearchProvider if you wish to search within a folder for
924
+ * all files that match the user's query.
925
+ *
926
+ * The FileSearchProvider will be invoked on every keypress in quickopen. When `workspace.findFiles` is called, it will be invoked with an empty query string,
927
+ * and in that case, every file in the folder should be returned.
928
+ */
929
+ interface FileSearchProvider {
930
+ /**
931
+ * Provide the set of files that match a certain file path pattern.
932
+ * @param query The parameters for this query.
933
+ * @param options A set of options to consider while searching files.
934
+ * @param token A cancellation token.
935
+ */
936
+ provideFileSearchResults(query: FileSearchQuery, options: FileSearchOptions, token: CancellationToken): ProviderResult<Uri[]>;
937
+ }
938
+ // https://github.com/microsoft/vscode/issues/59924
939
+
940
+ /**
941
+ * Options that can be set on a findTextInFiles search.
942
+ */
943
+ interface FindTextInFilesOptions {
944
+ /**
945
+ * A {@link GlobPattern glob pattern} that defines the files to search for. The glob pattern
946
+ * will be matched against the file paths of files relative to their workspace. Use a {@link RelativePattern relative pattern}
947
+ * to restrict the search results to a {@link WorkspaceFolder workspace folder}.
948
+ */
949
+ include?: GlobPattern;
950
+
951
+ /**
952
+ * A {@link GlobPattern glob pattern} that defines files and folders to exclude. The glob pattern
953
+ * will be matched against the file paths of resulting matches relative to their workspace. When `undefined`, default excludes will
954
+ * apply.
955
+ */
956
+ exclude?: GlobPattern;
957
+
958
+ /**
959
+ * Whether to use the default and user-configured excludes. Defaults to true.
960
+ */
961
+ useDefaultExcludes?: boolean;
962
+
963
+ /**
964
+ * The maximum number of results to search for
965
+ */
966
+ maxResults?: number;
967
+
968
+ /**
969
+ * Whether external files that exclude files, like .gitignore, should be respected.
970
+ * See the vscode setting `"search.useIgnoreFiles"`.
971
+ */
972
+ useIgnoreFiles?: boolean;
973
+
974
+ /**
975
+ * Whether global files that exclude files, like .gitignore, should be respected.
976
+ * See the vscode setting `"search.useGlobalIgnoreFiles"`.
977
+ */
978
+ useGlobalIgnoreFiles?: boolean;
979
+
980
+ /**
981
+ * Whether files in parent directories that exclude files, like .gitignore, should be respected.
982
+ * See the vscode setting `"search.useParentIgnoreFiles"`.
983
+ */
984
+ useParentIgnoreFiles?: boolean;
985
+
986
+ /**
987
+ * Whether symlinks should be followed while searching.
988
+ * See the vscode setting `"search.followSymlinks"`.
989
+ */
990
+ followSymlinks?: boolean;
991
+
992
+ /**
993
+ * Interpret files using this encoding.
994
+ * See the vscode setting `"files.encoding"`
995
+ */
996
+ encoding?: string;
997
+
998
+ /**
999
+ * Options to specify the size of the result text preview.
1000
+ */
1001
+ previewOptions?: TextSearchPreviewOptions;
1002
+
1003
+ /**
1004
+ * Number of lines of context to include before each match.
1005
+ */
1006
+ beforeContext?: number;
1007
+
1008
+ /**
1009
+ * Number of lines of context to include after each match.
1010
+ */
1011
+ afterContext?: number;
1012
+ }
1013
+ // https://github.com/microsoft/vscode/issues/84515
1014
+
1015
+ interface FileSystemProvider {
1016
+ open?(resource: Uri, options: { create: boolean }): number | Thenable<number>;
1017
+ close?(fd: number): void | Thenable<void>;
1018
+ read?(fd: number, pos: number, data: Uint8Array, offset: number, length: number): number | Thenable<number>;
1019
+ write?(fd: number, pos: number, data: Uint8Array, offset: number, length: number): number | Thenable<number>;
1020
+ }
1021
+ // https://github.com/microsoft/vscode/issues/46726
1022
+
1023
+ interface IssueUriRequestHandler {
1024
+ /**
1025
+ *Handle the request by the issue reporter for the Uri you want to direct the user to.
1026
+ */
1027
+ handleIssueUrlRequest(): ProviderResult<Uri>;
1028
+ }
1029
+ /**
1030
+ * Represents a session of a currently logged in user.
1031
+ */
1032
+ interface AuthenticationSession {
1033
+ /**
1034
+ * An optional ID token that may be included in the session.
1035
+ */
1036
+ readonly idToken?: string;
1037
+ }
1038
+ /**
1039
+ * Represents a {@link TextEditor text editor}'s {@link TextEditor.options options}.
1040
+ */
1041
+ interface TextEditorOptions {
1042
+ /**
1043
+ * The size in spaces a tab takes. This is used for two purposes:
1044
+ * - the rendering width of a tab character;
1045
+ * - the number of spaces to insert when {@link TextEditorOptions.insertSpaces insertSpaces} is true
1046
+ * and `indentSize` is set to `"tabSize"`.
1047
+ *
1048
+ * When getting a text editor's options, this property will always be a number (resolved).
1049
+ * When setting a text editor's options, this property is optional and it can be a number or `"auto"`.
1050
+ */
1051
+ tabSize?: number | string;
1052
+ /**
1053
+ * The number of spaces to insert when [insertSpaces](#TextEditorOptions.insertSpaces) is true.
1054
+ *
1055
+ * When getting a text editor's options, this property will always be a number (resolved).
1056
+ * When setting a text editor's options, this property is optional and it can be a number or `"tabSize"`.
1057
+ */
1058
+ indentSize?: number | 'tabSize';
1059
+ }
1060
+
1061
+ interface InlineCompletionItem {
1062
+ /**
1063
+ * If set to `true`, unopened closing brackets are removed and unclosed opening brackets are closed.
1064
+ * Defaults to `false`.
1065
+ */
1066
+ completeBracketPairs?: boolean;
1067
+ }
1068
+
1069
+ interface InlineCompletionItemProviderMetadata {
1070
+ /**
1071
+ * Specifies a list of extension ids that this provider yields to if they return a result.
1072
+ * If some inline completion provider registered by such an extension returns a result, this provider is not asked.
1073
+ */
1074
+ yieldTo: string[];
1075
+ }
1076
+
1077
+ interface InlineCompletionItemProvider {
1078
+ /**
1079
+ * @param completionItem The completion item that was shown.
1080
+ * @param updatedInsertText The actual insert text (after brackets were fixed).
1081
+ */
1082
+ // eslint-disable-next-line local/vscode-dts-provider-naming
1083
+ handleDidShowCompletionItem?(completionItem: InlineCompletionItem, updatedInsertText: string): void;
1084
+
1085
+ /**
1086
+ * Is called when an inline completion item was accepted partially.
1087
+ * @param acceptedLength The length of the substring of the inline completion that was accepted already.
1088
+ */
1089
+ // eslint-disable-next-line local/vscode-dts-provider-naming
1090
+ handleDidPartiallyAcceptCompletionItem?(completionItem: InlineCompletionItem, acceptedLength: number): void;
1091
+ }
1092
+
1093
+ // When finalizing `commands`, make sure to add a corresponding constructor parameter.
1094
+ interface InlineCompletionList {
1095
+ /**
1096
+ * A list of commands associated with the inline completions of this list.
1097
+ */
1098
+ commands?: Command[];
1099
+
1100
+ /**
1101
+ * When set and the user types a suggestion without derivating from it, the inline suggestion is not updated.
1102
+ * Defaults to false (might change).
1103
+ */
1104
+ enableForwardStability?: boolean;
1105
+ }
1106
+ interface InteractiveEditorSlashCommand {
1107
+ command: string;
1108
+ detail?: string;
1109
+ refer?: boolean;
1110
+ /**
1111
+ * Whether the command should execute as soon
1112
+ * as it is entered. Defaults to `false`.
1113
+ */
1114
+ executeImmediately?: boolean;
1115
+ // kind: CompletionItemKind;
1116
+ }
1117
+
1118
+ // todo@API make classes
1119
+ interface InteractiveEditorSession {
1120
+ placeholder?: string;
1121
+ slashCommands?: InteractiveEditorSlashCommand[];
1122
+ wholeRange?: Range;
1123
+ message?: string;
1124
+ }
1125
+
1126
+ // todo@API make classes
1127
+ interface InteractiveEditorRequest {
1128
+ session: InteractiveEditorSession;
1129
+ prompt: string;
1130
+
1131
+ selection: Selection;
1132
+ wholeRange: Range;
1133
+ attempt: number;
1134
+ live: boolean;
1135
+ }
1136
+
1137
+ // todo@API make classes
1138
+ interface InteractiveEditorResponse {
1139
+ edits: TextEdit[] | WorkspaceEdit;
1140
+ placeholder?: string;
1141
+ wholeRange?: Range;
1142
+ }
1143
+
1144
+ // todo@API make classes
1145
+ interface InteractiveEditorMessageResponse {
1146
+ contents: MarkdownString;
1147
+ placeholder?: string;
1148
+ wholeRange?: Range;
1149
+ }
1150
+
1151
+ declare enum InteractiveEditorResponseFeedbackKind {
1152
+ Unhelpful = 0,
1153
+ Helpful = 1,
1154
+ Undone = 2,
1155
+ Accepted = 3
1156
+ }
1157
+
1158
+ interface TextDocumentContext {
1159
+ document: TextDocument;
1160
+ selection: Selection;
1161
+ action?: string;
1162
+ }
1163
+
1164
+ interface InteractiveEditorSessionProvider<S extends InteractiveEditorSession = InteractiveEditorSession, R extends InteractiveEditorResponse | InteractiveEditorMessageResponse = InteractiveEditorResponse | InteractiveEditorMessageResponse> {
1165
+ label: string;
1166
+
1167
+ // Create a session. The lifetime of this session is the duration of the editing session with the input mode widget.
1168
+ prepareInteractiveEditorSession(context: TextDocumentContext, token: CancellationToken): ProviderResult<S>;
1169
+
1170
+ provideInteractiveEditorResponse(request: InteractiveEditorRequest, token: CancellationToken): ProviderResult<R>;
1171
+ provideInteractiveEditorResponse2?(request: InteractiveEditorRequest, progress: Progress<{ message: string; edits: TextEdit[] }>, token: CancellationToken): ProviderResult<R>;
1172
+
1173
+ // eslint-disable-next-line local/vscode-dts-provider-naming
1174
+ releaseInteractiveEditorSession?(session: S): any;
1175
+
1176
+ // todo@API use enum instead of boolean
1177
+ // eslint-disable-next-line local/vscode-dts-provider-naming
1178
+ handleInteractiveEditorResponseFeedback?(session: S, response: R, kind: InteractiveEditorResponseFeedbackKind): void;
1179
+ }
1180
+
1181
+
1182
+ interface InteractiveSessionState { }
1183
+
1184
+ interface InteractiveSessionParticipantInformation {
1185
+ name: string;
1186
+
1187
+ /**
1188
+ * A full URI for the icon of the participant.
1189
+ */
1190
+ icon?: Uri;
1191
+ }
1192
+
1193
+ interface InteractiveSession {
1194
+ requester: InteractiveSessionParticipantInformation;
1195
+ responder: InteractiveSessionParticipantInformation;
1196
+ inputPlaceholder?: string;
1197
+
1198
+ saveState?(): InteractiveSessionState;
1199
+ }
1200
+
1201
+ interface InteractiveSessionRequestArgs {
1202
+ command: string;
1203
+ args: any;
1204
+ }
1205
+ interface InteractiveRequest {
1206
+ variables: Record<string, ChatVariableValue[]>;
1207
+ }
1208
+
1209
+ interface InteractiveRequest {
1210
+ session: InteractiveSession;
1211
+ message: string | InteractiveSessionReplyFollowup;
1212
+ }
1213
+
1214
+ interface InteractiveResponseErrorDetails {
1215
+ message: string;
1216
+ responseIsIncomplete?: boolean;
1217
+ responseIsFiltered?: boolean;
1218
+ }
1219
+
1220
+ interface InteractiveResponseForProgress {
1221
+ errorDetails?: InteractiveResponseErrorDetails;
1222
+ }
1223
+
1224
+ interface InteractiveProgressContent {
1225
+ content: string | MarkdownString;
1226
+ }
1227
+
1228
+ interface InteractiveProgressId {
1229
+ responseId: string;
1230
+ }
1231
+
1232
+ interface InteractiveProgressTask {
1233
+ placeholder: string;
1234
+ resolvedContent: Thenable<InteractiveProgressContent | InteractiveProgressFileTree>;
1235
+ }
1236
+
1237
+ interface FileTreeData {
1238
+ label: string;
1239
+ uri: Uri;
1240
+ children?: FileTreeData[];
1241
+ }
1242
+
1243
+ interface InteractiveProgressFileTree {
1244
+ treeData: FileTreeData;
1245
+ }
1246
+
1247
+ type InteractiveProgress = InteractiveProgressContent | InteractiveProgressId | InteractiveProgressTask | InteractiveProgressFileTree;
1248
+
1249
+ interface InteractiveResponseCommand {
1250
+ commandId: string;
1251
+ args?: any[];
1252
+ title: string; // supports codicon strings
1253
+ when?: string;
1254
+ }
1255
+
1256
+ interface InteractiveSessionSlashCommand {
1257
+ command: string;
1258
+ kind: CompletionItemKind;
1259
+ detail?: string;
1260
+ shouldRepopulate?: boolean;
1261
+ followupPlaceholder?: string;
1262
+ executeImmediately?: boolean;
1263
+ yieldTo?: ReadonlyArray<{ readonly command: string }>;
1264
+ }
1265
+
1266
+ interface InteractiveSessionReplyFollowup {
1267
+ message: string;
1268
+ tooltip?: string;
1269
+ title?: string;
1270
+
1271
+ // Extensions can put any serializable data here, such as an ID/version
1272
+ metadata?: any;
1273
+ }
1274
+
1275
+ type InteractiveSessionFollowup = InteractiveSessionReplyFollowup | InteractiveResponseCommand;
1276
+
1277
+ type InteractiveWelcomeMessageContent = string | InteractiveSessionReplyFollowup[];
1278
+
1279
+ interface InteractiveSessionProvider<S extends InteractiveSession = InteractiveSession> {
1280
+ provideWelcomeMessage?(token: CancellationToken): ProviderResult<InteractiveWelcomeMessageContent[]>;
1281
+ provideFollowups?(session: S, token: CancellationToken): ProviderResult<(string | InteractiveSessionFollowup)[]>;
1282
+ provideSlashCommands?(session: S, token: CancellationToken): ProviderResult<InteractiveSessionSlashCommand[]>;
1283
+
1284
+ prepareSession(initialState: InteractiveSessionState | undefined, token: CancellationToken): ProviderResult<S>;
1285
+ resolveRequest(session: S, context: InteractiveSessionRequestArgs | string, token: CancellationToken): ProviderResult<InteractiveRequest>;
1286
+ provideResponseWithProgress(request: InteractiveRequest, progress: Progress<InteractiveProgress>, token: CancellationToken): ProviderResult<InteractiveResponseForProgress>;
1287
+
1288
+ // eslint-disable-next-line local/vscode-dts-provider-naming
1289
+ removeRequest(session: S, requestId: string): void;
1290
+ }
1291
+
1292
+ interface InteractiveSessionDynamicRequest {
1293
+ /**
1294
+ * The message that will be displayed in the UI
1295
+ */
1296
+ message: string;
1297
+
1298
+ /**
1299
+ * Any extra metadata/context that will go to the provider.
1300
+ * NOTE not actually used yet.
1301
+ */
1302
+ metadata?: any;
1303
+ }
1304
+ declare enum InteractiveSessionVoteDirection {
1305
+ Up = 1,
1306
+ Down = 2
1307
+ }
1308
+
1309
+ interface InteractiveSessionVoteAction {
1310
+ // eslint-disable-next-line local/vscode-dts-string-type-literals
1311
+ kind: 'vote';
1312
+ responseId: string;
1313
+ direction: InteractiveSessionVoteDirection;
1314
+ }
1315
+
1316
+ declare enum InteractiveSessionCopyKind {
1317
+ // Keyboard shortcut or context menu
1318
+ Action = 1,
1319
+ Toolbar = 2
1320
+ }
1321
+
1322
+ interface InteractiveSessionCopyAction {
1323
+ // eslint-disable-next-line local/vscode-dts-string-type-literals
1324
+ kind: 'copy';
1325
+ responseId: string;
1326
+ codeBlockIndex: number;
1327
+ copyType: InteractiveSessionCopyKind;
1328
+ copiedCharacters: number;
1329
+ totalCharacters: number;
1330
+ copiedText: string;
1331
+ }
1332
+
1333
+ interface InteractiveSessionInsertAction {
1334
+ // eslint-disable-next-line local/vscode-dts-string-type-literals
1335
+ kind: 'insert';
1336
+ responseId: string;
1337
+ codeBlockIndex: number;
1338
+ totalCharacters: number;
1339
+ newFile?: boolean;
1340
+ }
1341
+
1342
+ interface InteractiveSessionTerminalAction {
1343
+ // eslint-disable-next-line local/vscode-dts-string-type-literals
1344
+ kind: 'runInTerminal';
1345
+ responseId: string;
1346
+ codeBlockIndex: number;
1347
+ languageId?: string;
1348
+ }
1349
+
1350
+ interface InteractiveSessionCommandAction {
1351
+ // eslint-disable-next-line local/vscode-dts-string-type-literals
1352
+ kind: 'command';
1353
+ command: InteractiveResponseCommand;
1354
+ }
1355
+
1356
+ type InteractiveSessionUserAction = InteractiveSessionVoteAction | InteractiveSessionCopyAction | InteractiveSessionInsertAction | InteractiveSessionTerminalAction | InteractiveSessionCommandAction;
1357
+
1358
+ interface InteractiveSessionUserActionEvent {
1359
+ action: InteractiveSessionUserAction;
1360
+ providerId: string;
1361
+ }
1362
+
1363
+ declare namespace interactive {
1364
+ // current version of the proposal.
1365
+ export const _version: 1 | number;
1366
+
1367
+ export function registerInteractiveSessionProvider(id: string, provider: InteractiveSessionProvider): Disposable;
1368
+ export function addInteractiveRequest(context: InteractiveSessionRequestArgs): void;
1369
+
1370
+ export function sendInteractiveRequestToProvider(providerId: string, message: InteractiveSessionDynamicRequest): void;
1371
+
1372
+ export function registerInteractiveEditorSessionProvider(provider: InteractiveEditorSessionProvider): Disposable;
1373
+
1374
+ export function transferChatSession(session: InteractiveSession, toWorkspace: Uri): void;
1375
+ }
1376
+
1377
+ declare namespace interactive {
1378
+ export const onDidPerformUserAction: Event<InteractiveSessionUserActionEvent>;
1379
+ }
1380
+ /**
1381
+ * The tab represents an interactive window.
1382
+ */
1383
+ declare class TabInputInteractiveWindow {
1384
+ /**
1385
+ * The uri of the history notebook in the interactive window.
1386
+ */
1387
+ readonly uri: Uri;
1388
+ /**
1389
+ * The uri of the input box in the interactive window.
1390
+ */
1391
+ readonly inputBoxUri: Uri;
1392
+ private constructor(uri: Uri, inputBoxUri: Uri);
1393
+ }
1394
+ /**
1395
+ * A message passing protocol, which enables sending and receiving messages
1396
+ * between two parties.
1397
+ */
1398
+ interface MessagePassingProtocol {
1399
+
1400
+ /**
1401
+ * Fired when a message is received from the other party.
1402
+ */
1403
+ readonly onDidReceiveMessage: Event<any>;
1404
+
1405
+ /**
1406
+ * Post a message to the other party.
1407
+ *
1408
+ * @param message Body of the message. This must be a JSON serializable object.
1409
+ * @param transfer A collection of `ArrayBuffer` instances which can be transferred
1410
+ * to the other party, saving costly memory copy operations.
1411
+ */
1412
+ postMessage(message: any, transfer?: ArrayBuffer[]): void;
1413
+ }
1414
+
1415
+ interface ExtensionContext {
1416
+ readonly extensionRuntime: ExtensionRuntime;
1417
+ }
1418
+
1419
+ interface ExtensionContext {
1420
+
1421
+ /**
1422
+ * When not `undefined`, this is an instance of {@link MessagePassingProtocol} in
1423
+ * which the other party is owned by the web embedder.
1424
+ */
1425
+ readonly messagePassingProtocol: MessagePassingProtocol | undefined;
1426
+ }
1427
+ // https://github.com/microsoft/vscode/issues/173738
1428
+
1429
+ interface LanguageConfiguration {
1430
+ autoClosingPairs?: {
1431
+ open: string;
1432
+ close: string;
1433
+ notIn?: string[];
1434
+ }[];
1435
+ }
1436
+ interface RelatedContextItem {
1437
+ readonly uri: Uri;
1438
+ readonly range: Range;
1439
+ }
1440
+
1441
+ interface MappedEditsContext {
1442
+ selections: Selection[];
1443
+
1444
+ /**
1445
+ * If there's no context, the array should be empty. It's also empty until we figure out how to compute this or retrieve from an extension (eg, copilot chat)
1446
+ *
1447
+ * TODO: it was suggested initially to be sorted from highest priority to lowest. How would it look like?
1448
+ */
1449
+ related: RelatedContextItem[];
1450
+ }
1451
+
1452
+ /**
1453
+ * Interface for providing mapped edits for a given document.
1454
+ */
1455
+ interface MappedEditsProvider {
1456
+ /**
1457
+ * Provide mapped edits for a given document.
1458
+ * @param document The document to provide mapped edits for.
1459
+ * @param codeBlocks Code blocks that come from an LLM's reply.
1460
+ * "Insert at cursor" in the panel chat only sends one edit that the user clicks on, but inline chat can send multiple blocks and let the lang server decide what to do with them.
1461
+ * @param context The context for providing mapped edits.
1462
+ * @param token A cancellation token.
1463
+ * @returns A provider result of text edits.
1464
+ */
1465
+ provideMappedEdits(
1466
+ document: TextDocument,
1467
+ codeBlocks: string[],
1468
+ context: MappedEditsContext,
1469
+ token: CancellationToken
1470
+ ): ProviderResult<WorkspaceEdit | null>;
1471
+ }
1472
+
1473
+ declare namespace chat {
1474
+
1475
+ /**
1476
+ * Register a LLM as chat response provider to the editor.
1477
+ *
1478
+ *
1479
+ * @param id
1480
+ * @param provider
1481
+ * @param metadata
1482
+ */
1483
+ export function registerChatResponseProvider(id: string, provider: ChatResponseProvider, metadata: ChatResponseProviderMetadata): Disposable;
1484
+ }
1485
+
1486
+ declare namespace chat {
1487
+
1488
+ /**
1489
+ * Request access to chat.
1490
+ *
1491
+ * *Note* that this function will throw an error unless an user interaction is currently active.
1492
+ *
1493
+ * @param id The id of the chat provider, e.g `copilot`
1494
+ */
1495
+ export function requestChatAccess(id: string): Thenable<ChatAccess>;
1496
+ }
1497
+
1498
+ declare namespace chat {
1499
+ export function registerSlashCommand(name: string, command: SlashCommand, metadata: SlashCommandMetadata): Disposable;
1500
+ }
1501
+
1502
+ declare namespace chat {
1503
+ export function registerVariable(name: string, description: string, resolver: ChatVariableResolver): Disposable;
1504
+ }
1505
+
1506
+ declare namespace chat {
1507
+ export function registerMappedEditsProvider(documentSelector: DocumentSelector, provider: MappedEditsProvider): Disposable;
1508
+ }
1509
+ // https://github.com/microsoft/vscode/issues/124970
1510
+
1511
+ /**
1512
+ * The execution state of a notebook cell.
1513
+ */
1514
+ declare enum NotebookCellExecutionState {
1515
+ /**
1516
+ * The cell is idle.
1517
+ */
1518
+ Idle = 1,
1519
+ /**
1520
+ * Execution for the cell is pending.
1521
+ */
1522
+ Pending = 2,
1523
+ /**
1524
+ * The cell is currently executing.
1525
+ */
1526
+ Executing = 3,
1527
+ }
1528
+
1529
+ /**
1530
+ * An event describing a cell execution state change.
1531
+ */
1532
+ interface NotebookCellExecutionStateChangeEvent {
1533
+ /**
1534
+ * The {@link NotebookCell cell} for which the execution state has changed.
1535
+ */
1536
+ readonly cell: NotebookCell;
1537
+
1538
+ /**
1539
+ * The new execution state of the cell.
1540
+ */
1541
+ readonly state: NotebookCellExecutionState;
1542
+ }
1543
+ // https://github.com/microsoft/vscode/issues/179213
1544
+
1545
+ declare class NotebookCodeActionKind {
1546
+ // can only return MULTI CELL workspaceEdits
1547
+ // ex: notebook.organizeImprots
1548
+ static readonly Notebook: CodeActionKind;
1549
+
1550
+ constructor(value: string);
1551
+ }
1552
+ // https://github.com/microsoft/vscode/issues/161144
1553
+ declare enum NotebookControllerAffinity2 {
1554
+ Default = 1,
1555
+ Preferred = 2,
1556
+ Hidden = -1
1557
+ }
1558
+ // https://github.com/microsoft/vscode/issues/106744
1559
+
1560
+ interface NotebookCellOutput {
1561
+ /**
1562
+ * @deprecated
1563
+ */
1564
+ id: string;
1565
+ }
1566
+ /**
1567
+ * A NotebookExecution is how {@link NotebookController notebook controller} can indicate whether the notebook controller is busy or not.
1568
+ *
1569
+ * When {@linkcode NotebookExecution.start start()} is called on the execution task, it causes the Notebook to enter a executing state .
1570
+ * When {@linkcode NotebookExecution.end end()} is called, it enters the idle state.
1571
+ */
1572
+ interface NotebookExecution {
1573
+ /**
1574
+ * Signal that the execution has begun.
1575
+ */
1576
+ start(): void;
1577
+
1578
+ /**
1579
+ * Signal that execution has ended.
1580
+ */
1581
+ end(): void;
1582
+ }
1583
+ interface NotebookControllerDetectionTask {
1584
+ /**
1585
+ * Dispose and remove the detection task.
1586
+ */
1587
+ dispose(): void;
1588
+ }
1589
+
1590
+ declare class NotebookKernelSourceAction {
1591
+ readonly label: string;
1592
+ readonly description?: string;
1593
+ readonly detail?: string;
1594
+ readonly command: string | Command;
1595
+ readonly documentation?: Uri;
1596
+
1597
+ constructor(label: string);
1598
+ }
1599
+
1600
+ interface NotebookKernelSourceActionProvider {
1601
+ /**
1602
+ * An optional event to signal that the kernel source actions have changed.
1603
+ */
1604
+ onDidChangeNotebookKernelSourceActions?: Event<void>;
1605
+ /**
1606
+ * Provide kernel source actions
1607
+ */
1608
+ provideNotebookKernelSourceActions(token: CancellationToken): ProviderResult<NotebookKernelSourceAction[]>;
1609
+ }
1610
+ // https://github.com/microsoft/vscode/issues/106744
1611
+
1612
+ interface NotebookRegistrationData {
1613
+ readonly displayName: string;
1614
+ readonly filenamePattern: ReadonlyArray<(GlobPattern | { readonly include: GlobPattern; readonly exclude: GlobPattern })>;
1615
+ readonly exclusive?: boolean;
1616
+ }
1617
+ // https://github.com/microsoft/vscode/issues/123601
1618
+
1619
+ /**
1620
+ * Represents a script that is loaded into the notebook renderer before rendering output. This allows
1621
+ * to provide and share functionality for notebook markup and notebook output renderers.
1622
+ */
1623
+ declare class NotebookRendererScript {
1624
+
1625
+ /**
1626
+ * APIs that the preload provides to the renderer. These are matched
1627
+ * against the `dependencies` and `optionalDependencies` arrays in the
1628
+ * notebook renderer contribution point.
1629
+ */
1630
+ provides: readonly string[];
1631
+
1632
+ /**
1633
+ * URI of the JavaScript module to preload.
1634
+ *
1635
+ * This module must export an `activate` function that takes a context object that contains the notebook API.
1636
+ */
1637
+ uri: Uri;
1638
+
1639
+ /**
1640
+ * @param uri URI of the JavaScript module to preload
1641
+ * @param provides Value for the `provides` property
1642
+ */
1643
+ constructor(uri: Uri, provides?: string | readonly string[]);
1644
+ }
1645
+
1646
+ interface NotebookController {
1647
+ updateNotebookAffinity(notebook: NotebookDocument, affinity: NotebookControllerAffinity | NotebookControllerAffinity2): void;
1648
+ }
1649
+
1650
+ interface NotebookController {
1651
+ /**
1652
+ * Create an execution task.
1653
+ *
1654
+ * _Note_ that there can only be one execution per Notebook, that also includes NotebookCellExecutions and t an error is thrown if
1655
+ * a cell execution or another NotebookExecution is created while another is still active.
1656
+ *
1657
+ * This should be used to indicate the {@link NotebookController notebook controller} is busy even though user may not have executed any cell though the UI.
1658
+ * @param {NotebookDocument} notebook
1659
+ * @returns A notebook execution.
1660
+ */
1661
+ createNotebookExecution(notebook: NotebookDocument): NotebookExecution;
1662
+ }
1663
+
1664
+ interface NotebookController {
1665
+
1666
+ // todo@API allow add, not remove
1667
+ readonly rendererScripts: NotebookRendererScript[];
1668
+
1669
+ /**
1670
+ * An event that fires when a {@link NotebookController.rendererScripts renderer script} has send a message to
1671
+ * the controller.
1672
+ */
1673
+ readonly onDidReceiveMessage: Event<{ readonly editor: NotebookEditor; readonly message: any }>;
1674
+
1675
+ /**
1676
+ * Send a message to the renderer of notebook editors.
1677
+ *
1678
+ * Note that only editors showing documents that are bound to this controller
1679
+ * are receiving the message.
1680
+ *
1681
+ * @param message The message to send.
1682
+ * @param editor A specific editor to send the message to. When `undefined` all applicable editors are receiving the message.
1683
+ * @returns A promise that resolves to a boolean indicating if the message has been send or not.
1684
+ */
1685
+ postMessage(message: any, editor?: NotebookEditor): Thenable<boolean>;
1686
+
1687
+ //todo@API validate this works
1688
+ asWebviewUri(localResource: Uri): Uri;
1689
+ }
1690
+
1691
+ declare namespace notebooks {
1692
+
1693
+ /**
1694
+ * An {@link Event} which fires when the execution state of a cell has changed.
1695
+ */
1696
+ // todo@API this is an event that is fired for a property that cells don't have and that makes me wonder
1697
+ // how a correct consumer works, e.g the consumer could have been late and missed an event?
1698
+ export const onDidChangeNotebookCellExecutionState: Event<NotebookCellExecutionStateChangeEvent>;
1699
+ }
1700
+
1701
+ declare namespace notebooks {
1702
+ /**
1703
+ * Create notebook controller detection task
1704
+ */
1705
+ export function createNotebookControllerDetectionTask(notebookType: string): NotebookControllerDetectionTask;
1706
+
1707
+ /**
1708
+ * Register a notebook kernel source action provider
1709
+ */
1710
+ export function registerKernelSourceActionProvider(notebookType: string, provider: NotebookKernelSourceActionProvider): Disposable;
1711
+ }
1712
+
1713
+ declare namespace notebooks {
1714
+
1715
+ export function createNotebookController(id: string, viewType: string, label: string, handler?: (cells: NotebookCell[], notebook: NotebookDocument, controller: NotebookController) => void | Thenable<void>, rendererScripts?: NotebookRendererScript[]): NotebookController;
1716
+ }
1717
+ // https://github.com/microsoft/vscode/issues/126280 @mjbvz
1718
+
1719
+ interface NotebookCellData {
1720
+ /**
1721
+ * Mime type determines how the cell's `value` is interpreted.
1722
+ *
1723
+ * The mime selects which notebook renders is used to render the cell.
1724
+ *
1725
+ * If not set, internally the cell is treated as having a mime type of `text/plain`.
1726
+ * Cells that set `language` to `markdown` instead are treated as `text/markdown`.
1727
+ */
1728
+ mime?: string;
1729
+ }
1730
+
1731
+ interface NotebookCell {
1732
+ /**
1733
+ * Mime type determines how the markup cell's `value` is interpreted.
1734
+ *
1735
+ * The mime selects which notebook renders is used to render the cell.
1736
+ *
1737
+ * If not set, internally the cell is treated as having a mime type of `text/plain`.
1738
+ * Cells that set `language` to `markdown` instead are treated as `text/markdown`.
1739
+ */
1740
+ mime: string | undefined;
1741
+ }
1742
+ // https://github.com/microsoft/vscode/issues/115616 @alexr00
1743
+
1744
+ /**
1745
+ * The action that should be taken when a port is discovered through automatic port forwarding discovery.
1746
+ */
1747
+ declare enum PortAutoForwardAction {
1748
+ /**
1749
+ * Notify the user that the port is being forwarded. This is the default action.
1750
+ */
1751
+ Notify = 1,
1752
+ /**
1753
+ * Once the port is forwarded, open the user's web browser to the forwarded port.
1754
+ */
1755
+ OpenBrowser = 2,
1756
+ /**
1757
+ * Once the port is forwarded, open the preview browser to the forwarded port.
1758
+ */
1759
+ OpenPreview = 3,
1760
+ /**
1761
+ * Forward the port silently.
1762
+ */
1763
+ Silent = 4,
1764
+ /**
1765
+ * Do not forward the port.
1766
+ */
1767
+ Ignore = 5
1768
+ }
1769
+
1770
+ /**
1771
+ * The attributes that a forwarded port can have.
1772
+ */
1773
+ declare class PortAttributes {
1774
+ /**
1775
+ * The action to be taken when this port is detected for auto forwarding.
1776
+ */
1777
+ autoForwardAction: PortAutoForwardAction;
1778
+
1779
+ /**
1780
+ * Creates a new PortAttributes object
1781
+ * @param port the port number
1782
+ * @param autoForwardAction the action to take when this port is detected
1783
+ */
1784
+ constructor(autoForwardAction: PortAutoForwardAction);
1785
+ }
1786
+
1787
+ /**
1788
+ * A provider of port attributes. Port attributes are used to determine what action should be taken when a port is discovered.
1789
+ */
1790
+ interface PortAttributesProvider {
1791
+ /**
1792
+ * Provides attributes for the given port. For ports that your extension doesn't know about, simply
1793
+ * return undefined. For example, if `providePortAttributes` is called with ports 3000 but your
1794
+ * extension doesn't know anything about 3000 you should return undefined.
1795
+ * @param port The port number of the port that attributes are being requested for.
1796
+ * @param pid The pid of the process that is listening on the port. If the pid is unknown, undefined will be passed.
1797
+ * @param commandLine The command line of the process that is listening on the port. If the command line is unknown, undefined will be passed.
1798
+ * @param token A cancellation token that indicates the result is no longer needed.
1799
+ */
1800
+ providePortAttributes(attributes: { port: number; pid?: number; commandLine?: string }, token: CancellationToken): ProviderResult<PortAttributes>;
1801
+ }
1802
+
1803
+ /**
1804
+ * A selector that will be used to filter which {@link PortAttributesProvider} should be called for each port.
1805
+ */
1806
+ interface PortAttributesSelector {
1807
+ /**
1808
+ * Specifying a port range will cause your provider to only be called for ports within the range.
1809
+ * The start is inclusive and the end is exclusive.
1810
+ */
1811
+ portRange?: [number, number] | number;
1812
+
1813
+ /**
1814
+ * Specifying a command pattern will cause your provider to only be called for processes whose command line matches the pattern.
1815
+ */
1816
+ commandPattern?: RegExp;
1817
+ }
1818
+ interface ProfileContentHandler {
1819
+ readonly name: string;
1820
+ readonly description?: string;
1821
+ saveProfile(name: string, content: string, token: CancellationToken): Thenable<{ readonly id: string; readonly link: Uri } | null>;
1822
+ readProfile(idOrUri: string | Uri, token: CancellationToken): Thenable<string | null>;
1823
+ }
1824
+
1825
+ interface QuickDiffProvider {
1826
+ label?: string;
1827
+ }
1828
+ // https://github.com/microsoft/vscode/issues/175662
1829
+
1830
+ interface QuickPickItem {
1831
+ /**
1832
+ * A tooltip that is rendered when hovering over the item.
1833
+ */
1834
+ tooltip?: string | MarkdownString;
1835
+ }
1836
+ // https://github.com/microsoft/vscode/issues/73904
1837
+
1838
+ interface QuickPick<T extends QuickPickItem> extends QuickInput {
1839
+ /**
1840
+ * An optional flag to sort the final results by index of first query match in label. Defaults to true.
1841
+ */
1842
+ sortByLabel: boolean;
1843
+ }
1844
+ //resolvers: @alexdima
1845
+
1846
+ interface MessageOptions {
1847
+ /**
1848
+ * Do not render a native message box.
1849
+ */
1850
+ useCustom?: boolean;
1851
+ }
1852
+
1853
+ interface RemoteAuthorityResolverContext {
1854
+ resolveAttempt: number;
1855
+ /**
1856
+ * Exec server from a recursively-resolved remote authority. If the
1857
+ * remote authority includes nested authorities delimited by `@`, it is
1858
+ * resolved from outer to inner authorities with ExecServer passed down
1859
+ * to each resolver in the chain.
1860
+ */
1861
+ execServer?: ExecServer;
1862
+ }
1863
+
1864
+ declare class ResolvedAuthority {
1865
+ readonly host: string;
1866
+ readonly port: number;
1867
+ readonly connectionToken: string | undefined;
1868
+
1869
+ constructor(host: string, port: number, connectionToken?: string);
1870
+ }
1871
+
1872
+ interface ManagedMessagePassing {
1873
+ onDidReceiveMessage: Event<Uint8Array>;
1874
+ onDidClose: Event<Error | undefined>;
1875
+ onDidEnd: Event<void>;
1876
+
1877
+ send: (data: Uint8Array) => void;
1878
+ end: () => void;
1879
+ drain?: () => Thenable<void>;
1880
+ }
1881
+
1882
+ declare class ManagedResolvedAuthority {
1883
+ readonly makeConnection: () => Thenable<ManagedMessagePassing>;
1884
+ readonly connectionToken: string | undefined;
1885
+
1886
+ constructor(makeConnection: () => Thenable<ManagedMessagePassing>, connectionToken?: string);
1887
+ }
1888
+
1889
+ interface ResolvedOptions {
1890
+ extensionHostEnv?: { [key: string]: string | null };
1891
+
1892
+ isTrusted?: boolean;
1893
+
1894
+ /**
1895
+ * When provided, remote server will be initialized with the extensions synced using the given user account.
1896
+ */
1897
+ authenticationSessionForInitializingExtensions?: AuthenticationSession & { providerId: string };
1898
+ }
1899
+
1900
+ interface TunnelPrivacy {
1901
+ themeIcon: string;
1902
+ id: string;
1903
+ label: string;
1904
+ }
1905
+
1906
+ interface TunnelCreationOptions {
1907
+ /**
1908
+ * True when the local operating system will require elevation to use the requested local port.
1909
+ */
1910
+ elevationRequired?: boolean;
1911
+ }
1912
+
1913
+ declare enum CandidatePortSource {
1914
+ None = 0,
1915
+ Process = 1,
1916
+ Output = 2
1917
+ }
1918
+
1919
+ type ResolverResult = (ResolvedAuthority | ManagedResolvedAuthority) & ResolvedOptions & TunnelInformation;
1920
+
1921
+ declare class RemoteAuthorityResolverError extends Error {
1922
+ static NotAvailable(message?: string, handled?: boolean): RemoteAuthorityResolverError;
1923
+ static TemporarilyNotAvailable(message?: string): RemoteAuthorityResolverError;
1924
+
1925
+ constructor(message?: string);
1926
+ }
1927
+
1928
+ /**
1929
+ * Exec server used for nested resolvers. The type is currently not maintained
1930
+ * in these types, and is a contract between extensions.
1931
+ */
1932
+ type ExecServer = unknown;
1933
+
1934
+ interface RemoteAuthorityResolver {
1935
+ /**
1936
+ * Resolve the authority part of the current opened `vscode-remote://` URI.
1937
+ *
1938
+ * This method will be invoked once during the startup of the editor and again each time
1939
+ * the editor detects a disconnection.
1940
+ *
1941
+ * @param authority The authority part of the current opened `vscode-remote://` URI.
1942
+ * @param context A context indicating if this is the first call or a subsequent call.
1943
+ */
1944
+ resolve(authority: string, context: RemoteAuthorityResolverContext): ResolverResult | Thenable<ResolverResult>;
1945
+
1946
+ /**
1947
+ * Resolves an exec server interface for the authority. Called if an
1948
+ * authority is a midpoint in a transit to the desired remote.
1949
+ *
1950
+ * @param authority The authority part of the current opened `vscode-remote://` URI.
1951
+ * @returns The exec server interface, as defined in a contract between extensions.
1952
+ */
1953
+ resolveExecServer?(remoteAuthority: string, context: RemoteAuthorityResolverContext): ExecServer | Thenable<ExecServer>;
1954
+
1955
+ /**
1956
+ * Get the canonical URI (if applicable) for a `vscode-remote://` URI.
1957
+ *
1958
+ * @returns The canonical URI or undefined if the uri is already canonical.
1959
+ */
1960
+ getCanonicalURI?(uri: Uri): ProviderResult<Uri>;
1961
+
1962
+ /**
1963
+ * Can be optionally implemented if the extension can forward ports better than the core.
1964
+ * When not implemented, the core will use its default forwarding logic.
1965
+ * When implemented, the core will use this to forward ports.
1966
+ *
1967
+ * To enable the "Change Local Port" action on forwarded ports, make sure to set the `localAddress` of
1968
+ * the returned `Tunnel` to a `{ port: number, host: string; }` and not a string.
1969
+ */
1970
+ tunnelFactory?: (tunnelOptions: TunnelOptions, tunnelCreationOptions: TunnelCreationOptions) => Thenable<Tunnel> | undefined;
1971
+
1972
+ /**p
1973
+ * Provides filtering for candidate ports.
1974
+ */
1975
+ showCandidatePort?: (host: string, port: number, detail: string) => Thenable<boolean>;
1976
+
1977
+ /**
1978
+ * @deprecated Return tunnelFeatures as part of the resolver result in tunnelInformation.
1979
+ */
1980
+ tunnelFeatures?: {
1981
+ elevation: boolean;
1982
+ public: boolean;
1983
+ privacyOptions: TunnelPrivacy[];
1984
+ };
1985
+
1986
+ candidatePortSource?: CandidatePortSource;
1987
+ }
1988
+
1989
+ interface ResourceLabelFormatter {
1990
+ scheme: string;
1991
+ authority?: string;
1992
+ formatting: ResourceLabelFormatting;
1993
+ }
1994
+
1995
+ interface ResourceLabelFormatting {
1996
+ label: string; // myLabel:/${path}
1997
+ // For historic reasons we use an or string here. Once we finalize this API we should start using enums instead and adopt it in extensions.
1998
+ // eslint-disable-next-line local/vscode-dts-literal-or-types, local/vscode-dts-string-type-literals
1999
+ separator: '/' | '\\' | '';
2000
+ tildify?: boolean;
2001
+ normalizeDriveLetter?: boolean;
2002
+ workspaceSuffix?: string;
2003
+ workspaceTooltip?: string;
2004
+ authorityPrefix?: string;
2005
+ stripPathStartingSeparator?: boolean;
2006
+ }
2007
+ // https://github.com/microsoft/vscode/issues/133935
2008
+
2009
+ interface SourceControlActionButton {
2010
+ command: Command;
2011
+ secondaryCommands?: Command[][];
2012
+ description?: string;
2013
+ enabled: boolean;
2014
+ }
2015
+
2016
+ interface SourceControl {
2017
+ actionButton?: SourceControlActionButton;
2018
+ }
2019
+ // todo@joaomoreno add issue reference
2020
+
2021
+ interface SourceControl {
2022
+
2023
+ /**
2024
+ * Whether the source control is selected.
2025
+ */
2026
+ readonly selected: boolean;
2027
+
2028
+ /**
2029
+ * An event signaling when the selection state changes.
2030
+ */
2031
+ readonly onDidChangeSelection: Event<boolean>;
2032
+ }
2033
+ // todo@joaomoreno add issue reference
2034
+
2035
+ /**
2036
+ * Represents the validation type of the Source Control input.
2037
+ */
2038
+ declare enum SourceControlInputBoxValidationType {
2039
+
2040
+ /**
2041
+ * Something not allowed by the rules of a language or other means.
2042
+ */
2043
+ Error = 0,
2044
+
2045
+ /**
2046
+ * Something suspicious but allowed.
2047
+ */
2048
+ Warning = 1,
2049
+
2050
+ /**
2051
+ * Something to inform about but not a problem.
2052
+ */
2053
+ Information = 2
2054
+ }
2055
+
2056
+ interface SourceControlInputBoxValidation {
2057
+
2058
+ /**
2059
+ * The validation message to display.
2060
+ */
2061
+ readonly message: string | MarkdownString;
2062
+
2063
+ /**
2064
+ * The validation type.
2065
+ */
2066
+ readonly type: SourceControlInputBoxValidationType;
2067
+ }
2068
+ // https://github.com/microsoft/vscode/issues/166615
2069
+
2070
+ /**
2071
+ * Represents the input box in the Source Control viewlet.
2072
+ */
2073
+ interface SourceControlInputBox {
2074
+
2075
+ /**
2076
+ * The {@link TextDocument text} of the input box.
2077
+ */
2078
+ readonly document: TextDocument;
2079
+ }
2080
+
2081
+ /**
2082
+ * Represents the input box in the Source Control viewlet.
2083
+ */
2084
+ interface SourceControlInputBox {
2085
+
2086
+ /**
2087
+ * Shows a transient contextual message on the input.
2088
+ */
2089
+ showValidationMessage(message: string | MarkdownString, type: SourceControlInputBoxValidationType): void;
2090
+
2091
+ /**
2092
+ * A validation function for the input box. It's possible to change
2093
+ * the validation provider simply by setting this property to a different function.
2094
+ */
2095
+ validateInput?(value: string, cursorPosition: number): ProviderResult<SourceControlInputBoxValidation>;
2096
+ }
2097
+ /**
2098
+ * Data about an item which can be shared.
2099
+ */
2100
+ interface ShareableItem {
2101
+ /**
2102
+ * A resource in the workspace that can be shared.
2103
+ */
2104
+ resourceUri: Uri;
2105
+
2106
+ /**
2107
+ * If present, a selection within the `resourceUri`.
2108
+ */
2109
+ selection?: Range;
2110
+ }
2111
+
2112
+ /**
2113
+ * A provider which generates share links for resources in the editor.
2114
+ */
2115
+ interface ShareProvider {
2116
+
2117
+ /**
2118
+ * A unique ID for the provider.
2119
+ * This will be used to activate specific extensions contributing share providers if necessary.
2120
+ */
2121
+ readonly id: string;
2122
+
2123
+ /**
2124
+ * A label which will be used to present this provider's options in the UI.
2125
+ */
2126
+ readonly label: string;
2127
+
2128
+ /**
2129
+ * The order in which the provider should be listed in the UI when there are multiple providers.
2130
+ */
2131
+ readonly priority: number;
2132
+
2133
+ /**
2134
+ *
2135
+ * @param item Data about an item which can be shared.
2136
+ * @param token A cancellation token.
2137
+ * @returns A {@link Uri} representing an external link or sharing text. The provider result
2138
+ * will be copied to the user's clipboard and presented in a confirmation dialog.
2139
+ */
2140
+ provideShare(item: ShareableItem, token: CancellationToken): ProviderResult<Uri | string>;
2141
+ }
2142
+
2143
+ interface TreeItem {
2144
+
2145
+ /**
2146
+ * An optional property which, when set, inlines a `Share` option in the context menu for this tree item.
2147
+ */
2148
+ shareableItem?: ShareableItem;
2149
+ }
2150
+ interface OpenDialogOptions {
2151
+ /**
2152
+ * Controls whether the dialog allows users to select local files via the "Show Local" button.
2153
+ * Extensions that set this to `true` should check the scheme of the selected file.
2154
+ * Resources with the `file` scheme come from the same extension host as the extension.
2155
+ * Resources with the `vscode-local` scheme come from an extension host running in the same place as the UI.
2156
+ */
2157
+ allowUIResources?: boolean;
2158
+ }
2159
+ declare class TabInputTextMerge {
2160
+
2161
+ readonly base: Uri;
2162
+ readonly input1: Uri;
2163
+ readonly input2: Uri;
2164
+ readonly result: Uri;
2165
+
2166
+ constructor(base: Uri, input1: Uri, input2: Uri, result: Uri);
2167
+ }
2168
+
2169
+ interface Tab {
2170
+ readonly input: TabInputText | TabInputTextDiff | TabInputCustom | TabInputWebview | TabInputNotebook | TabInputNotebookDiff | TabInputTerminal | TabInputInteractiveWindow | unknown;
2171
+ }
2172
+
2173
+ interface Tab {
2174
+
2175
+ readonly input: TabInputText | TabInputTextDiff | TabInputTextMerge | TabInputCustom | TabInputWebview | TabInputNotebook | TabInputNotebookDiff | TabInputTerminal | unknown;
2176
+
2177
+ }
2178
+ // https://github.com/microsoft/vscode/issues/47265
2179
+
2180
+ interface TaskPresentationOptions {
2181
+ /**
2182
+ * Controls whether the task is executed in a specific terminal group using split panes.
2183
+ */
2184
+ group?: string;
2185
+ }
2186
+ interface TelemetryConfiguration {
2187
+ /**
2188
+ * Whether or not usage telemetry collection is allowed
2189
+ */
2190
+ readonly isUsageEnabled: boolean;
2191
+ /**
2192
+ * Whether or not crash error telemetry collection is allowed
2193
+ */
2194
+ readonly isErrorsEnabled: boolean;
2195
+ /**
2196
+ * Whether or not crash report collection is allowed
2197
+ */
2198
+ readonly isCrashEnabled: boolean;
2199
+ }
2200
+ // See https://github.com/microsoft/vscode/issues/160694
2201
+ declare namespace env {
2202
+
2203
+ /**
2204
+ * An {@link Event} which fires when the default shell changes.
2205
+ */
2206
+ export const onDidChangeShell: Event<string>;
2207
+ }
2208
+
2209
+ declare namespace env {
2210
+ export function openExternal(target: Uri, options?: OpenExternalOptions): Thenable<boolean>;
2211
+ }
2212
+
2213
+ declare namespace env {
2214
+ /**
2215
+ * Register an {@link IssueUriRequestHandler}. By registering an issue uri request handler,
2216
+ * you can direct the built-in issue reporter to your issue reporting web experience of choice.
2217
+ * The Uri that the handler returns will be opened in the user's browser.
2218
+ *
2219
+ * Examples of this include:
2220
+ * - Using GitHub Issue Forms or GitHub Discussions you can pre-fill the issue creation with relevant information from the current workspace using query parameters
2221
+ * - Directing to a different web form that isn't on GitHub for reporting issues
2222
+ *
2223
+ * @param handler the issue uri request handler to register for this extension.
2224
+ */
2225
+ export function registerIssueUriRequestHandler(handler: IssueUriRequestHandler): Disposable;
2226
+ }
2227
+
2228
+ declare namespace env {
2229
+ /** Quality of the application. May be undefined if running from sources. */
2230
+ export const appQuality: string | undefined;
2231
+ /** Commit of the application. May be undefined if running from sources. */
2232
+ export const appCommit: string | undefined;
2233
+ }
2234
+
2235
+ declare namespace env {
2236
+
2237
+ /**
2238
+ * The authority part of the current opened `vscode-remote://` URI.
2239
+ * Defined by extensions, e.g. `ssh-remote+${host}` for remotes using a secure shell.
2240
+ *
2241
+ * *Note* that the value is `undefined` when there is no remote extension host but that the
2242
+ * value is defined in all extension hosts (local and remote) in case a remote extension host
2243
+ * exists. Use {@link Extension.extensionKind} to know if
2244
+ * a specific extension runs remote or not.
2245
+ */
2246
+ export const remoteAuthority: string | undefined;
2247
+
2248
+ }
2249
+
2250
+ declare namespace env {
2251
+ /**
2252
+ * Indicates what telemetry is enabled / disabled
2253
+ * Can be observed to determine what telemetry the extension is allowed to send
2254
+ */
2255
+ export const telemetryConfiguration: TelemetryConfiguration;
2256
+
2257
+ /**
2258
+ * An {@link Event} which fires when the collectable state of telemetry changes
2259
+ * Returns a {@link TelemetryConfiguration} object
2260
+ */
2261
+ export const onDidChangeTelemetryConfiguration: Event<TelemetryConfiguration | undefined>;
2262
+ }
2263
+
2264
+ // https://github.com/microsoft/vscode/issues/78502
2265
+ //
2266
+ // This API is still proposed but we don't intent on promoting it to stable due to problems
2267
+ // around performance. See #145234 for a more likely API to get stabilized.
2268
+
2269
+ interface TerminalDataWriteEvent {
2270
+ /**
2271
+ * The {@link Terminal} for which the data was written.
2272
+ */
2273
+ readonly terminal: Terminal;
2274
+ /**
2275
+ * The data being written.
2276
+ */
2277
+ readonly data: string;
2278
+ }
2279
+ // https://github.com/microsoft/vscode/issues/55718
2280
+
2281
+ /**
2282
+ * An {@link Event} which fires when a {@link Terminal}'s dimensions change.
2283
+ */
2284
+ interface TerminalDimensionsChangeEvent {
2285
+ /**
2286
+ * The {@link Terminal} for which the dimensions have changed.
2287
+ */
2288
+ readonly terminal: Terminal;
2289
+ /**
2290
+ * The new value for the {@link Terminal.dimensions terminal's dimensions}.
2291
+ */
2292
+ readonly dimensions: TerminalDimensions;
2293
+ }
2294
+ // https://github.com/microsoft/vscode/issues/145234
2295
+
2296
+ interface TerminalExecutedCommand {
2297
+ /**
2298
+ * The {@link Terminal} the command was executed in.
2299
+ */
2300
+ terminal: Terminal;
2301
+ /**
2302
+ * The full command line that was executed, including both the command and the arguments.
2303
+ */
2304
+ commandLine: string | undefined;
2305
+ /**
2306
+ * The current working directory that was reported by the shell. This will be a {@link Uri}
2307
+ * if the string reported by the shell can reliably be mapped to the connected machine.
2308
+ */
2309
+ cwd: Uri | string | undefined;
2310
+ /**
2311
+ * The exit code reported by the shell.
2312
+ */
2313
+ exitCode: number | undefined;
2314
+ /**
2315
+ * The output of the command when it has finished executing. This is the plain text shown in
2316
+ * the terminal buffer and does not include raw escape sequences. Depending on the shell
2317
+ * setup, this may include the command line as part of the output.
2318
+ */
2319
+ output: string | undefined;
2320
+ }
2321
+ // https://github.com/microsoft/vscode/issues/162950
2322
+
2323
+ type SingleOrMany<T> = T[] | T;
2324
+
2325
+ interface TerminalQuickFixProvider {
2326
+ /**
2327
+ * Provides terminal quick fixes
2328
+ * @param commandMatchResult The command match result for which to provide quick fixes
2329
+ * @param token A cancellation token indicating the result is no longer needed
2330
+ * @return Terminal quick fix(es) if any
2331
+ */
2332
+ provideTerminalQuickFixes(commandMatchResult: TerminalCommandMatchResult, token: CancellationToken): ProviderResult<SingleOrMany<TerminalQuickFixExecuteTerminalCommand | TerminalQuickFixOpener | Command>>;
2333
+ }
2334
+
2335
+
2336
+ interface TerminalCommandMatchResult {
2337
+ commandLine: string;
2338
+ commandLineMatch: RegExpMatchArray;
2339
+ outputMatch?: {
2340
+ regexMatch: RegExpMatchArray;
2341
+ outputLines: string[];
2342
+ };
2343
+ }
2344
+
2345
+ declare namespace window {
2346
+ export function createWebviewTextEditorInset(editor: TextEditor, line: number, height: number, options?: WebviewOptions): WebviewEditorInset;
2347
+ }
2348
+
2349
+ declare namespace window {
2350
+ /**
2351
+ * Register a new `ExternalUriOpener`.
2352
+ *
2353
+ * When a uri is about to be opened, an `onOpenExternalUri:SCHEME` activation event is fired.
2354
+ *
2355
+ * @param id Unique id of the opener, such as `myExtension.browserPreview`. This is used in settings
2356
+ * and commands to identify the opener.
2357
+ * @param opener Opener to register.
2358
+ * @param metadata Additional information about the opener.
2359
+ *
2360
+ * @returns Disposable that unregisters the opener.
2361
+ */
2362
+ export function registerExternalUriOpener(id: string, opener: ExternalUriOpener, metadata: ExternalUriOpenerMetadata): Disposable;
2363
+ }
2364
+
2365
+ declare namespace window {
2366
+ export function registerProfileContentHandler(id: string, profileContentHandler: ProfileContentHandler): Disposable;
2367
+ }
2368
+ // https://github.com/microsoft/vscode/issues/169012
2369
+
2370
+ declare namespace window {
2371
+ export function registerQuickDiffProvider(selector: DocumentSelector, quickDiffProvider: QuickDiffProvider, label: string, rootUri?: Uri): Disposable;
2372
+ }
2373
+
2374
+ declare namespace window {
2375
+
2376
+ /**
2377
+ * Register a share provider. An extension may register multiple share providers.
2378
+ * There may be multiple share providers for the same {@link ShareableItem}.
2379
+ * @param selector A document selector to filter whether the provider should be shown for a {@link ShareableItem}.
2380
+ * @param provider A share provider.
2381
+ */
2382
+ export function registerShareProvider(selector: DocumentSelector, provider: ShareProvider): Disposable;
2383
+ }
2384
+
2385
+ declare namespace window {
2386
+ /**
2387
+ * An event which fires when the terminal's child pseudo-device is written to (the shell).
2388
+ * In other words, this provides access to the raw data stream from the process running
2389
+ * within the terminal, including VT sequences.
2390
+ */
2391
+ export const onDidWriteTerminalData: Event<TerminalDataWriteEvent>;
2392
+ }
2393
+
2394
+ declare namespace window {
2395
+ /**
2396
+ * An event which fires when the {@link Terminal.dimensions dimensions} of the terminal change.
2397
+ */
2398
+ export const onDidChangeTerminalDimensions: Event<TerminalDimensionsChangeEvent>;
2399
+ }
2400
+
2401
+ declare namespace window {
2402
+ /**
2403
+ * An event that is emitted when a terminal with shell integration activated has completed
2404
+ * executing a command.
2405
+ *
2406
+ * Note that this event will not fire if the executed command exits the shell, listen to
2407
+ * {@link onDidCloseTerminal} to handle that case.
2408
+ */
2409
+ export const onDidExecuteTerminalCommand: Event<TerminalExecutedCommand>;
2410
+ }
2411
+
2412
+ declare namespace window {
2413
+ /**
2414
+ * @param provider A terminal quick fix provider
2415
+ * @return A {@link Disposable} that unregisters the provider when being disposed
2416
+ */
2417
+ export function registerTerminalQuickFixProvider(id: string, provider: TerminalQuickFixProvider): Disposable;
2418
+ }
2419
+
2420
+ declare class TerminalQuickFixExecuteTerminalCommand {
2421
+ /**
2422
+ * The terminal command to run
2423
+ */
2424
+ terminalCommand: string;
2425
+ constructor(terminalCommand: string);
2426
+ }
2427
+ declare class TerminalQuickFixOpener {
2428
+ /**
2429
+ * The uri to open
2430
+ */
2431
+ uri: Uri;
2432
+ constructor(uri: Uri);
2433
+ }
2434
+
2435
+ /**
2436
+ * A matcher that runs on a sub-section of a terminal command's output
2437
+ */
2438
+ interface TerminalOutputMatcher {
2439
+ /**
2440
+ * A string or regex to match against the unwrapped line. If this is a regex with the multiline
2441
+ * flag, it will scan an amount of lines equal to `\n` instances in the regex + 1.
2442
+ */
2443
+ lineMatcher: string | RegExp;
2444
+ /**
2445
+ * Which side of the output to anchor the {@link offset} and {@link length} against.
2446
+ */
2447
+ anchor: TerminalOutputAnchor;
2448
+ /**
2449
+ * The number of rows above or below the {@link anchor} to start matching against.
2450
+ */
2451
+ offset: number;
2452
+ /**
2453
+ * The number of wrapped lines to match against, this should be as small as possible for performance
2454
+ * reasons. This is capped at 40.
2455
+ */
2456
+ length: number;
2457
+ }
2458
+
2459
+ declare enum TerminalOutputAnchor {
2460
+ Top = 0,
2461
+ Bottom = 1
2462
+ }
2463
+
2464
+ interface Terminal {
2465
+ /**
2466
+ * The current dimensions of the terminal. This will be `undefined` immediately after the
2467
+ * terminal is created as the dimensions are not known until shortly after the terminal is
2468
+ * created.
2469
+ */
2470
+ readonly dimensions: TerminalDimensions | undefined;
2471
+ }
2472
+ // https://github.com/microsoft/vscode/issues/188173
2473
+
2474
+ interface Terminal {
2475
+ /**
2476
+ * The selected text of the terminal or undefined if there is no selection.
2477
+ */
2478
+ readonly selection: string | undefined;
2479
+ }
2480
+ // https://github.com/microsoft/vscode/issues/123713
2481
+
2482
+ interface TestRun {
2483
+ /**
2484
+ * Test coverage provider for this result. An extension can defer setting
2485
+ * this until after a run is complete and coverage is available.
2486
+ */
2487
+ coverageProvider?: TestCoverageProvider;
2488
+ // ...
2489
+ }
2490
+
2491
+ /**
2492
+ * Provides information about test coverage for a test result.
2493
+ * Methods on the provider will not be called until the test run is complete
2494
+ */
2495
+ interface TestCoverageProvider<T extends FileCoverage = FileCoverage> {
2496
+ /**
2497
+ * Returns coverage information for all files involved in the test run.
2498
+ * @param token A cancellation token.
2499
+ * @return Coverage metadata for all files involved in the test.
2500
+ */
2501
+ provideFileCoverage(token: CancellationToken): ProviderResult<T[]>;
2502
+
2503
+ /**
2504
+ * Give a FileCoverage to fill in more data, namely {@link FileCoverage.detailedCoverage}.
2505
+ * The editor will only resolve a FileCoverage once, and only if detailedCoverage
2506
+ * is undefined.
2507
+ *
2508
+ * @param coverage A coverage object obtained from {@link provideFileCoverage}
2509
+ * @param token A cancellation token.
2510
+ * @return The resolved file coverage, or a thenable that resolves to one. It
2511
+ * is OK to return the given `coverage`. When no result is returned, the
2512
+ * given `coverage` will be used.
2513
+ */
2514
+ resolveFileCoverage?(coverage: T, token: CancellationToken): ProviderResult<T>;
2515
+ }
2516
+
2517
+ /**
2518
+ * A class that contains information about a covered resource. A count can
2519
+ * be give for lines, branches, and functions in a file.
2520
+ */
2521
+ declare class CoveredCount {
2522
+ /**
2523
+ * Number of items covered in the file.
2524
+ */
2525
+ covered: number;
2526
+ /**
2527
+ * Total number of covered items in the file.
2528
+ */
2529
+ total: number;
2530
+
2531
+ /**
2532
+ * @param covered Value for {@link CovereredCount.covered}
2533
+ * @param total Value for {@link CovereredCount.total}
2534
+ */
2535
+ constructor(covered: number, total: number);
2536
+ }
2537
+
2538
+ /**
2539
+ * Contains coverage metadata for a file.
2540
+ */
2541
+ declare class FileCoverage {
2542
+ /**
2543
+ * File URI.
2544
+ */
2545
+ readonly uri: Uri;
2546
+
2547
+ /**
2548
+ * Statement coverage information. If the reporter does not provide statement
2549
+ * coverage information, this can instead be used to represent line coverage.
2550
+ */
2551
+ statementCoverage: CoveredCount;
2552
+
2553
+ /**
2554
+ * Branch coverage information.
2555
+ */
2556
+ branchCoverage?: CoveredCount;
2557
+
2558
+ /**
2559
+ * Function coverage information.
2560
+ */
2561
+ functionCoverage?: CoveredCount;
2562
+
2563
+ /**
2564
+ * Detailed, per-statement coverage. If this is undefined, the editor will
2565
+ * call {@link TestCoverageProvider.resolveFileCoverage} when necessary.
2566
+ */
2567
+ detailedCoverage?: DetailedCoverage[];
2568
+
2569
+ /**
2570
+ * Creates a {@link FileCoverage} instance with counts filled in from
2571
+ * the coverage details.
2572
+ * @param uri Covered file URI
2573
+ * @param detailed Detailed coverage information
2574
+ */
2575
+ static fromDetails(uri: Uri, details: readonly DetailedCoverage[]): FileCoverage;
2576
+
2577
+ /**
2578
+ * @param uri Covered file URI
2579
+ * @param statementCoverage Statement coverage information. If the reporter
2580
+ * does not provide statement coverage information, this can instead be
2581
+ * used to represent line coverage.
2582
+ * @param branchCoverage Branch coverage information
2583
+ * @param functionCoverage Function coverage information
2584
+ */
2585
+ constructor(
2586
+ uri: Uri,
2587
+ statementCoverage: CoveredCount,
2588
+ branchCoverage?: CoveredCount,
2589
+ functionCoverage?: CoveredCount,
2590
+ );
2591
+ }
2592
+
2593
+ /**
2594
+ * Contains coverage information for a single statement or line.
2595
+ */
2596
+ declare class StatementCoverage {
2597
+ /**
2598
+ * The number of times this statement was executed. If zero, the
2599
+ * statement will be marked as un-covered.
2600
+ */
2601
+ executionCount: number;
2602
+
2603
+ /**
2604
+ * Statement location.
2605
+ */
2606
+ location: Position | Range;
2607
+
2608
+ /**
2609
+ * Coverage from branches of this line or statement. If it's not a
2610
+ * conditional, this will be empty.
2611
+ */
2612
+ branches: BranchCoverage[];
2613
+
2614
+ /**
2615
+ * @param location The statement position.
2616
+ * @param executionCount The number of times this statement was
2617
+ * executed. If zero, the statement will be marked as un-covered.
2618
+ * @param branches Coverage from branches of this line. If it's not a
2619
+ * conditional, this should be omitted.
2620
+ */
2621
+ constructor(executionCount: number, location: Position | Range, branches?: BranchCoverage[]);
2622
+ }
2623
+
2624
+ /**
2625
+ * Contains coverage information for a branch of a {@link StatementCoverage}.
2626
+ */
2627
+ declare class BranchCoverage {
2628
+ /**
2629
+ * The number of times this branch was executed. If zero, the
2630
+ * branch will be marked as un-covered.
2631
+ */
2632
+ executionCount: number;
2633
+
2634
+ /**
2635
+ * Branch location.
2636
+ */
2637
+ location?: Position | Range;
2638
+
2639
+ /**
2640
+ * @param executionCount The number of times this branch was executed.
2641
+ * @param location The branch position.
2642
+ */
2643
+ constructor(executionCount: number, location?: Position | Range);
2644
+ }
2645
+
2646
+ /**
2647
+ * Contains coverage information for a function or method.
2648
+ */
2649
+ declare class FunctionCoverage {
2650
+ /**
2651
+ * The number of times this function was executed. If zero, the
2652
+ * function will be marked as un-covered.
2653
+ */
2654
+ executionCount: number;
2655
+
2656
+ /**
2657
+ * Function location.
2658
+ */
2659
+ location: Position | Range;
2660
+
2661
+ /**
2662
+ * @param executionCount The number of times this function was executed.
2663
+ * @param location The function position.
2664
+ */
2665
+ constructor(executionCount: number, location: Position | Range);
2666
+ }
2667
+
2668
+ type DetailedCoverage = StatementCoverage | FunctionCoverage;
2669
+ // https://github.com/microsoft/vscode/issues/190277
2670
+
2671
+ declare class TestMessage2 extends TestMessage {
2672
+
2673
+ /**
2674
+ * Context value of the test item. This can be used to contribute message-
2675
+ * specific actions to the test peek view. The value set here can be found
2676
+ * in the `testMessage` property of the following `menus` contribution points:
2677
+ *
2678
+ * - `testing/message/context` - context menu for the message in the results tree
2679
+ * - `testing/message/content` - a prominent button overlaying editor content where
2680
+ * the message is displayed.
2681
+ *
2682
+ * For example:
2683
+ *
2684
+ * ```json
2685
+ * "contributes": {
2686
+ * "menus": {
2687
+ * "testing/message/content": [
2688
+ * {
2689
+ * "command": "extension.deleteCommentThread",
2690
+ * "when": "testMessage == canApplyRichDiff"
2691
+ * }
2692
+ * ]
2693
+ * }
2694
+ * }
2695
+ * ```
2696
+ *
2697
+ * The command will be called with an object containing:
2698
+ * - `test`: the {@link TestItem} the message is associated with, *if* it
2699
+ * is still present in the {@link TestController.items} collection.
2700
+ * - `message`: the {@link TestMessage} instance.
2701
+ */
2702
+ contextValue?: string;
2703
+
2704
+ // ...
2705
+ }
2706
+ // https://github.com/microsoft/vscode/issues/107467
2707
+
2708
+ declare namespace tests {
2709
+ /**
2710
+ * Requests that tests be run by their controller.
2711
+ * @param run Run options to use.
2712
+ * @param token Cancellation token for the test run
2713
+ */
2714
+ export function runTests(run: TestRunRequest, token?: CancellationToken): Thenable<void>;
2715
+
2716
+ /**
2717
+ * Returns an observer that watches and can request tests.
2718
+ */
2719
+ export function createTestObserver(): TestObserver;
2720
+ /**
2721
+ * List of test results stored by the editor, sorted in descending
2722
+ * order by their `completedAt` time.
2723
+ */
2724
+ export const testResults: ReadonlyArray<TestRunResult>;
2725
+
2726
+ /**
2727
+ * Event that fires when the {@link testResults} array is updated.
2728
+ */
2729
+ export const onDidChangeTestResults: Event<void>;
2730
+ }
2731
+
2732
+ interface TestObserver {
2733
+ /**
2734
+ * List of tests returned by test provider for files in the workspace.
2735
+ */
2736
+ readonly tests: ReadonlyArray<TestItem>;
2737
+
2738
+ /**
2739
+ * An event that fires when an existing test in the collection changes, or
2740
+ * null if a top-level test was added or removed. When fired, the consumer
2741
+ * should check the test item and all its children for changes.
2742
+ */
2743
+ readonly onDidChangeTest: Event<TestsChangeEvent>;
2744
+
2745
+ /**
2746
+ * Dispose of the observer, allowing the editor to eventually tell test
2747
+ * providers that they no longer need to update tests.
2748
+ */
2749
+ dispose(): void;
2750
+ }
2751
+
2752
+ interface TestsChangeEvent {
2753
+ /**
2754
+ * List of all tests that are newly added.
2755
+ */
2756
+ readonly added: ReadonlyArray<TestItem>;
2757
+
2758
+ /**
2759
+ * List of existing tests that have updated.
2760
+ */
2761
+ readonly updated: ReadonlyArray<TestItem>;
2762
+
2763
+ /**
2764
+ * List of existing tests that have been removed.
2765
+ */
2766
+ readonly removed: ReadonlyArray<TestItem>;
2767
+ }
2768
+
2769
+ /**
2770
+ * TestResults can be provided to the editor in {@link tests.publishTestResult},
2771
+ * or read from it in {@link tests.testResults}.
2772
+ *
2773
+ * The results contain a 'snapshot' of the tests at the point when the test
2774
+ * run is complete. Therefore, information such as its {@link Range} may be
2775
+ * out of date. If the test still exists in the workspace, consumers can use
2776
+ * its `id` to correlate the result instance with the living test.
2777
+ */
2778
+ interface TestRunResult {
2779
+ /**
2780
+ * Unix milliseconds timestamp at which the test run was completed.
2781
+ */
2782
+ readonly completedAt: number;
2783
+
2784
+ /**
2785
+ * Optional raw output from the test run.
2786
+ */
2787
+ readonly output?: string;
2788
+
2789
+ /**
2790
+ * List of test results. The items in this array are the items that
2791
+ * were passed in the {@link tests.runTests} method.
2792
+ */
2793
+ readonly results: ReadonlyArray<Readonly<TestResultSnapshot>>;
2794
+ }
2795
+
2796
+ /**
2797
+ * A {@link TestItem}-like interface with an associated result, which appear
2798
+ * or can be provided in {@link TestResult} interfaces.
2799
+ */
2800
+ interface TestResultSnapshot {
2801
+ /**
2802
+ * Unique identifier that matches that of the associated TestItem.
2803
+ * This is used to correlate test results and tests in the document with
2804
+ * those in the workspace (test explorer).
2805
+ */
2806
+ readonly id: string;
2807
+
2808
+ /**
2809
+ * Parent of this item.
2810
+ */
2811
+ readonly parent?: TestResultSnapshot;
2812
+
2813
+ /**
2814
+ * URI this TestItem is associated with. May be a file or file.
2815
+ */
2816
+ readonly uri?: Uri;
2817
+
2818
+ /**
2819
+ * Display name describing the test case.
2820
+ */
2821
+ readonly label: string;
2822
+
2823
+ /**
2824
+ * Optional description that appears next to the label.
2825
+ */
2826
+ readonly description?: string;
2827
+
2828
+ /**
2829
+ * Location of the test item in its `uri`. This is only meaningful if the
2830
+ * `uri` points to a file.
2831
+ */
2832
+ readonly range?: Range;
2833
+
2834
+ /**
2835
+ * State of the test in each task. In the common case, a test will only
2836
+ * be executed in a single task and the length of this array will be 1.
2837
+ */
2838
+ readonly taskStates: ReadonlyArray<TestSnapshotTaskState>;
2839
+
2840
+ /**
2841
+ * Optional list of nested tests for this item.
2842
+ */
2843
+ readonly children: Readonly<TestResultSnapshot>[];
2844
+ }
2845
+
2846
+ interface TestSnapshotTaskState {
2847
+ /**
2848
+ * Current result of the test.
2849
+ */
2850
+ readonly state: TestResultState;
2851
+
2852
+ /**
2853
+ * The number of milliseconds the test took to run. This is set once the
2854
+ * `state` is `Passed`, `Failed`, or `Errored`.
2855
+ */
2856
+ readonly duration?: number;
2857
+
2858
+ /**
2859
+ * Associated test run message. Can, for example, contain assertion
2860
+ * failure information if the test fails.
2861
+ */
2862
+ readonly messages: ReadonlyArray<TestMessage>;
2863
+ }
2864
+
2865
+ /**
2866
+ * Possible states of tests in a test run.
2867
+ */
2868
+ declare enum TestResultState {
2869
+ // Test will be run, but is not currently running.
2870
+ Queued = 1,
2871
+ // Test is currently running
2872
+ Running = 2,
2873
+ // Test run has passed
2874
+ Passed = 3,
2875
+ // Test run has failed (on an assertion)
2876
+ Failed = 4,
2877
+ // Test run has been skipped
2878
+ Skipped = 5,
2879
+ // Test run failed for some other reason (compilation error, timeout, etc)
2880
+ Errored = 6
2881
+ }
2882
+ // https://github.com/microsoft/vscode/issues/59921
2883
+
2884
+ /**
2885
+ * The parameters of a query for text search.
2886
+ */
2887
+ interface TextSearchQuery {
2888
+ /**
2889
+ * The text pattern to search for.
2890
+ */
2891
+ pattern: string;
2892
+
2893
+ /**
2894
+ * Whether or not `pattern` should match multiple lines of text.
2895
+ */
2896
+ isMultiline?: boolean;
2897
+
2898
+ /**
2899
+ * Whether or not `pattern` should be interpreted as a regular expression.
2900
+ */
2901
+ isRegExp?: boolean;
2902
+
2903
+ /**
2904
+ * Whether or not the search should be case-sensitive.
2905
+ */
2906
+ isCaseSensitive?: boolean;
2907
+
2908
+ /**
2909
+ * Whether or not to search for whole word matches only.
2910
+ */
2911
+ isWordMatch?: boolean;
2912
+ }
2913
+
2914
+ /**
2915
+ * A file glob pattern to match file paths against.
2916
+ * TODO@roblourens merge this with the GlobPattern docs/definition in vscode.d.ts.
2917
+ * @see {@link GlobPattern}
2918
+ */
2919
+ type GlobString = string;
2920
+
2921
+ /**
2922
+ * Options common to file and text search
2923
+ */
2924
+ interface SearchOptions {
2925
+ /**
2926
+ * The root folder to search within.
2927
+ */
2928
+ folder: Uri;
2929
+
2930
+ /**
2931
+ * Files that match an `includes` glob pattern should be included in the search.
2932
+ */
2933
+ includes: GlobString[];
2934
+
2935
+ /**
2936
+ * Files that match an `excludes` glob pattern should be excluded from the search.
2937
+ */
2938
+ excludes: GlobString[];
2939
+
2940
+ /**
2941
+ * Whether external files that exclude files, like .gitignore, should be respected.
2942
+ * See the vscode setting `"search.useIgnoreFiles"`.
2943
+ */
2944
+ useIgnoreFiles: boolean;
2945
+
2946
+ /**
2947
+ * Whether symlinks should be followed while searching.
2948
+ * See the vscode setting `"search.followSymlinks"`.
2949
+ */
2950
+ followSymlinks: boolean;
2951
+
2952
+ /**
2953
+ * Whether global files that exclude files, like .gitignore, should be respected.
2954
+ * See the vscode setting `"search.useGlobalIgnoreFiles"`.
2955
+ */
2956
+ useGlobalIgnoreFiles: boolean;
2957
+
2958
+ /**
2959
+ * Whether files in parent directories that exclude files, like .gitignore, should be respected.
2960
+ * See the vscode setting `"search.useParentIgnoreFiles"`.
2961
+ */
2962
+ useParentIgnoreFiles: boolean;
2963
+ }
2964
+
2965
+ /**
2966
+ * Options to specify the size of the result text preview.
2967
+ * These options don't affect the size of the match itself, just the amount of preview text.
2968
+ */
2969
+ interface TextSearchPreviewOptions {
2970
+ /**
2971
+ * The maximum number of lines in the preview.
2972
+ * Only search providers that support multiline search will ever return more than one line in the match.
2973
+ */
2974
+ matchLines: number;
2975
+
2976
+ /**
2977
+ * The maximum number of characters included per line.
2978
+ */
2979
+ charsPerLine: number;
2980
+ }
2981
+
2982
+ /**
2983
+ * Options that apply to text search.
2984
+ */
2985
+ interface TextSearchOptions extends SearchOptions {
2986
+ /**
2987
+ * The maximum number of results to be returned.
2988
+ */
2989
+ maxResults: number;
2990
+
2991
+ /**
2992
+ * Options to specify the size of the result text preview.
2993
+ */
2994
+ previewOptions?: TextSearchPreviewOptions;
2995
+
2996
+ /**
2997
+ * Exclude files larger than `maxFileSize` in bytes.
2998
+ */
2999
+ maxFileSize?: number;
3000
+
3001
+ /**
3002
+ * Interpret files using this encoding.
3003
+ * See the vscode setting `"files.encoding"`
3004
+ */
3005
+ encoding?: string;
3006
+
3007
+ /**
3008
+ * Number of lines of context to include before each match.
3009
+ */
3010
+ beforeContext?: number;
3011
+
3012
+ /**
3013
+ * Number of lines of context to include after each match.
3014
+ */
3015
+ afterContext?: number;
3016
+ }
3017
+
3018
+ /**
3019
+ * Represents the severity of a TextSearchComplete message.
3020
+ */
3021
+ declare enum TextSearchCompleteMessageType {
3022
+ Information = 1,
3023
+ Warning = 2,
3024
+ }
3025
+
3026
+ /**
3027
+ * A message regarding a completed search.
3028
+ */
3029
+ interface TextSearchCompleteMessage {
3030
+ /**
3031
+ * Markdown text of the message.
3032
+ */
3033
+ text: string;
3034
+ /**
3035
+ * Whether the source of the message is trusted, command links are disabled for untrusted message sources.
3036
+ * Messaged are untrusted by default.
3037
+ */
3038
+ trusted?: boolean;
3039
+ /**
3040
+ * The message type, this affects how the message will be rendered.
3041
+ */
3042
+ type: TextSearchCompleteMessageType;
3043
+ }
3044
+
3045
+ /**
3046
+ * Information collected when text search is complete.
3047
+ */
3048
+ interface TextSearchComplete {
3049
+ /**
3050
+ * Whether the search hit the limit on the maximum number of search results.
3051
+ * `maxResults` on {@linkcode TextSearchOptions} specifies the max number of results.
3052
+ * - If exactly that number of matches exist, this should be false.
3053
+ * - If `maxResults` matches are returned and more exist, this should be true.
3054
+ * - If search hits an internal limit which is less than `maxResults`, this should be true.
3055
+ */
3056
+ limitHit?: boolean;
3057
+
3058
+ /**
3059
+ * Additional information regarding the state of the completed search.
3060
+ *
3061
+ * Messages with "Information" style support links in markdown syntax:
3062
+ * - Click to [run a command](command:workbench.action.OpenQuickPick)
3063
+ * - Click to [open a website](https://aka.ms)
3064
+ *
3065
+ * Commands may optionally return { triggerSearch: true } to signal to the editor that the original search should run be again.
3066
+ */
3067
+ message?: TextSearchCompleteMessage | TextSearchCompleteMessage[];
3068
+ }
3069
+
3070
+ /**
3071
+ * A preview of the text result.
3072
+ */
3073
+ interface TextSearchMatchPreview {
3074
+ /**
3075
+ * The matching lines of text, or a portion of the matching line that contains the match.
3076
+ */
3077
+ text: string;
3078
+
3079
+ /**
3080
+ * The Range within `text` corresponding to the text of the match.
3081
+ * The number of matches must match the TextSearchMatch's range property.
3082
+ */
3083
+ matches: Range | Range[];
3084
+ }
3085
+
3086
+ /**
3087
+ * A match from a text search
3088
+ */
3089
+ interface TextSearchMatch {
3090
+ /**
3091
+ * The uri for the matching document.
3092
+ */
3093
+ uri: Uri;
3094
+
3095
+ /**
3096
+ * The range of the match within the document, or multiple ranges for multiple matches.
3097
+ */
3098
+ ranges: Range | Range[];
3099
+
3100
+ /**
3101
+ * A preview of the text match.
3102
+ */
3103
+ preview: TextSearchMatchPreview;
3104
+ }
3105
+
3106
+ /**
3107
+ * A line of context surrounding a TextSearchMatch.
3108
+ */
3109
+ interface TextSearchContext {
3110
+ /**
3111
+ * The uri for the matching document.
3112
+ */
3113
+ uri: Uri;
3114
+
3115
+ /**
3116
+ * One line of text.
3117
+ * previewOptions.charsPerLine applies to this
3118
+ */
3119
+ text: string;
3120
+
3121
+ /**
3122
+ * The line number of this line of context.
3123
+ */
3124
+ lineNumber: number;
3125
+ }
3126
+
3127
+ type TextSearchResult = TextSearchMatch | TextSearchContext;
3128
+
3129
+ /**
3130
+ * A TextSearchProvider provides search results for text results inside files in the workspace.
3131
+ */
3132
+ interface TextSearchProvider {
3133
+ /**
3134
+ * Provide results that match the given text pattern.
3135
+ * @param query The parameters for this query.
3136
+ * @param options A set of options to consider while searching.
3137
+ * @param progress A progress callback that must be invoked for all results.
3138
+ * @param token A cancellation token.
3139
+ */
3140
+ provideTextSearchResults(query: TextSearchQuery, options: TextSearchOptions, progress: Progress<TextSearchResult>, token: CancellationToken): ProviderResult<TextSearchComplete>;
3141
+ }
3142
+ // https://github.com/microsoft/vscode/issues/84297
3143
+
3144
+ declare class TimelineItem {
3145
+ /**
3146
+ * A timestamp (in milliseconds since 1 January 1970 00:00:00) for when the timeline item occurred.
3147
+ */
3148
+ timestamp: number;
3149
+
3150
+ /**
3151
+ * A human-readable string describing the timeline item.
3152
+ */
3153
+ label: string;
3154
+
3155
+ /**
3156
+ * Optional id for the timeline item. It must be unique across all the timeline items provided by this source.
3157
+ *
3158
+ * If not provided, an id is generated using the timeline item's timestamp.
3159
+ */
3160
+ id?: string;
3161
+
3162
+ /**
3163
+ * The icon path or {@link ThemeIcon} for the timeline item.
3164
+ */
3165
+ iconPath?: Uri | { light: Uri; dark: Uri } | ThemeIcon;
3166
+
3167
+ /**
3168
+ * A human readable string describing less prominent details of the timeline item.
3169
+ */
3170
+ description?: string;
3171
+
3172
+ /**
3173
+ * The tooltip text when you hover over the timeline item.
3174
+ */
3175
+ tooltip?: string | MarkdownString | undefined;
3176
+
3177
+ /**
3178
+ * The {@link Command} that should be executed when the timeline item is selected.
3179
+ */
3180
+ command?: Command;
3181
+
3182
+ /**
3183
+ * Context value of the timeline item. This can be used to contribute specific actions to the item.
3184
+ * For example, a timeline item is given a context value as `commit`. When contributing actions to `timeline/item/context`
3185
+ * using `menus` extension point, you can specify context value for key `timelineItem` in `when` expression like `timelineItem == commit`.
3186
+ * ```
3187
+ * "contributes": {
3188
+ * "menus": {
3189
+ * "timeline/item/context": [
3190
+ * {
3191
+ * "command": "extension.copyCommitId",
3192
+ * "when": "timelineItem == commit"
3193
+ * }
3194
+ * ]
3195
+ * }
3196
+ * }
3197
+ * ```
3198
+ * This will show the `extension.copyCommitId` action only for items where `contextValue` is `commit`.
3199
+ */
3200
+ contextValue?: string;
3201
+
3202
+ /**
3203
+ * Accessibility information used when screen reader interacts with this timeline item.
3204
+ */
3205
+ accessibilityInformation?: AccessibilityInformation;
3206
+
3207
+ /**
3208
+ * @param label A human-readable string describing the timeline item
3209
+ * @param timestamp A timestamp (in milliseconds since 1 January 1970 00:00:00) for when the timeline item occurred
3210
+ */
3211
+ constructor(label: string, timestamp: number);
3212
+ }
3213
+
3214
+ interface TimelineChangeEvent {
3215
+ /**
3216
+ * The {@link Uri} of the resource for which the timeline changed.
3217
+ */
3218
+ uri: Uri;
3219
+
3220
+ /**
3221
+ * A flag which indicates whether the entire timeline should be reset.
3222
+ */
3223
+ reset?: boolean;
3224
+ }
3225
+
3226
+ interface Timeline {
3227
+ readonly paging?: {
3228
+ /**
3229
+ * A provider-defined cursor specifying the starting point of timeline items which are after the ones returned.
3230
+ * Use `undefined` to signal that there are no more items to be returned.
3231
+ */
3232
+ readonly cursor: string | undefined;
3233
+ };
3234
+
3235
+ /**
3236
+ * An array of {@link TimelineItem timeline items}.
3237
+ */
3238
+ readonly items: readonly TimelineItem[];
3239
+ }
3240
+
3241
+ interface TimelineOptions {
3242
+ /**
3243
+ * A provider-defined cursor specifying the starting point of the timeline items that should be returned.
3244
+ */
3245
+ cursor?: string;
3246
+
3247
+ /**
3248
+ * An optional maximum number timeline items or the all timeline items newer (inclusive) than the timestamp or id that should be returned.
3249
+ * If `undefined` all timeline items should be returned.
3250
+ */
3251
+ limit?: number | { timestamp: number; id?: string };
3252
+ }
3253
+
3254
+ interface TimelineProvider {
3255
+ /**
3256
+ * An optional event to signal that the timeline for a source has changed.
3257
+ * To signal that the timeline for all resources (uris) has changed, do not pass any argument or pass `undefined`.
3258
+ */
3259
+ onDidChange?: Event<TimelineChangeEvent | undefined>;
3260
+
3261
+ /**
3262
+ * An identifier of the source of the timeline items. This can be used to filter sources.
3263
+ */
3264
+ readonly id: string;
3265
+
3266
+ /**
3267
+ * A human-readable string describing the source of the timeline items. This can be used as the display label when filtering sources.
3268
+ */
3269
+ readonly label: string;
3270
+
3271
+ /**
3272
+ * Provide {@link TimelineItem timeline items} for a {@link Uri}.
3273
+ *
3274
+ * @param uri The {@link Uri} of the file to provide the timeline for.
3275
+ * @param options A set of options to determine how results should be returned.
3276
+ * @param token A cancellation token.
3277
+ * @return The {@link TimelineResult timeline result} or a thenable that resolves to such. The lack of a result
3278
+ * can be signaled by returning `undefined`, `null`, or an empty array.
3279
+ */
3280
+ provideTimeline(uri: Uri, options: TimelineOptions, token: CancellationToken): ProviderResult<Timeline>;
3281
+ }
3282
+ // https://github.com/microsoft/vscode/issues/91555
3283
+
3284
+ declare enum StandardTokenType {
3285
+ Other = 0,
3286
+ Comment = 1,
3287
+ String = 2,
3288
+ RegEx = 3
3289
+ }
3290
+
3291
+ interface TokenInformation {
3292
+ type: StandardTokenType;
3293
+ range: Range;
3294
+ }
3295
+
3296
+ declare namespace languages {
3297
+ export function registerDocumentPasteEditProvider(selector: DocumentSelector, provider: DocumentPasteEditProvider, metadata: DocumentPasteProviderMetadata): Disposable;
3298
+ }
3299
+
3300
+ declare namespace languages {
3301
+ export function registerDocumentDropEditProvider(selector: DocumentSelector, provider: DocumentDropEditProvider, metadata?: DocumentDropEditProviderMetadata): Disposable;
3302
+ }
3303
+ // https://github.com/microsoft/vscode/issues/124024 @hediet @alexdima
3304
+
3305
+ declare namespace languages {
3306
+ /**
3307
+ * Registers an inline completion provider.
3308
+ *
3309
+ * Multiple providers can be registered for a language. In that case providers are asked in
3310
+ * parallel and the results are merged. A failing provider (rejected promise or exception) will
3311
+ * not cause a failure of the whole operation.
3312
+ *
3313
+ * @param selector A selector that defines the documents this provider is applicable to.
3314
+ * @param provider An inline completion provider.
3315
+ * @param metadata Metadata about the provider.
3316
+ * @return A {@link Disposable} that unregisters this provider when being disposed.
3317
+ */
3318
+ export function registerInlineCompletionItemProvider(selector: DocumentSelector, provider: InlineCompletionItemProvider, metadata: InlineCompletionItemProviderMetadata): Disposable;
3319
+ }
3320
+
3321
+ declare namespace languages {
3322
+ /** @deprecated */
3323
+ export function getTokenInformationAtPosition(document: TextDocument, position: Position): Thenable<TokenInformation>;
3324
+ }
3325
+
3326
+ /**
3327
+ * The event that is fired when there is a change in {@link TreeView.activeItem tree view's active item}
3328
+ */
3329
+ interface TreeViewActiveItemChangeEvent<T> {
3330
+ /**
3331
+ * Active item.
3332
+ */
3333
+ readonly activeItem: T | undefined;
3334
+ }
3335
+ interface TreeView2<T> extends Disposable {
3336
+ readonly onDidExpandElement: Event<TreeViewExpansionEvent<T>>;
3337
+ readonly onDidCollapseElement: Event<TreeViewExpansionEvent<T>>;
3338
+ readonly selection: readonly T[];
3339
+ readonly onDidChangeSelection: Event<TreeViewSelectionChangeEvent<T>>;
3340
+ readonly visible: boolean;
3341
+ readonly onDidChangeVisibility: Event<TreeViewVisibilityChangeEvent>;
3342
+ readonly onDidChangeCheckboxState: Event<TreeCheckboxChangeEvent<T>>;
3343
+ title?: string;
3344
+ description?: string;
3345
+ badge?: ViewBadge | undefined;
3346
+ reveal(element: T, options?: { select?: boolean; focus?: boolean; expand?: boolean | number }): Thenable<void>;
3347
+
3348
+ /**
3349
+ * An optional human-readable message that will be rendered in the view.
3350
+ * Only a subset of markdown is supported.
3351
+ * Setting the message to null, undefined, or empty string will remove the message from the view.
3352
+ */
3353
+ message?: string | MarkdownString;
3354
+ }
3355
+ // https://github.com/microsoft/vscode/issues/170248
3356
+
3357
+ interface TreeView<T> extends Disposable {
3358
+ /**
3359
+ * Currently active item.
3360
+ */
3361
+ readonly activeItem: T | undefined;
3362
+ /**
3363
+ * Event that is fired when the {@link TreeView.activeItem active item} has changed
3364
+ */
3365
+ readonly onDidChangeActiveItem: Event<TreeViewActiveItemChangeEvent<T>>;
3366
+ }
3367
+ // https://github.com/microsoft/vscode/issues/61313 @alexr00
3368
+
3369
+ interface TreeView<T> extends Disposable {
3370
+ reveal(element: T | undefined, options?: { select?: boolean; focus?: boolean; expand?: boolean | number }): Thenable<void>;
3371
+ }
3372
+
3373
+ /**
3374
+ * Used as part of the ResolverResult if the extension has any candidate,
3375
+ * published, or forwarded ports.
3376
+ */
3377
+ interface TunnelInformation {
3378
+ /**
3379
+ * Tunnels that are detected by the extension. The remotePort is used for display purposes.
3380
+ * The localAddress should be the complete local address (ex. localhost:1234) for connecting to the port. Tunnels provided through
3381
+ * detected are read-only from the forwarded ports UI.
3382
+ */
3383
+ environmentTunnels?: TunnelDescription[];
3384
+
3385
+ tunnelFeatures?: {
3386
+ elevation: boolean;
3387
+ /**
3388
+ * One of the the options must have the ID "private".
3389
+ */
3390
+ privacyOptions: TunnelPrivacy[];
3391
+ };
3392
+ }
3393
+ /**
3394
+ * Used as part of the ResolverResult if the extension has any candidate,
3395
+ * published, or forwarded ports.
3396
+ */
3397
+ interface TunnelInformation {
3398
+ /**
3399
+ * Tunnels that are detected by the extension. The remotePort is used for display purposes.
3400
+ * The localAddress should be the complete local address (ex. localhost:1234) for connecting to the port. Tunnels provided through
3401
+ * environmentTunnels are read-only from the forwarded ports UI.
3402
+ */
3403
+ environmentTunnels?: TunnelDescription[];
3404
+
3405
+ tunnelFeatures?: {
3406
+ elevation: boolean;
3407
+ /**
3408
+ * One of the the options must have the ID "private".
3409
+ */
3410
+ privacyOptions: TunnelPrivacy[];
3411
+ };
3412
+ }
3413
+
3414
+ interface TunnelProvider {
3415
+ /**
3416
+ * Provides port forwarding capabilities. If there is a resolver that already provids tunnels, then the resolver's provider will
3417
+ * be used. If multiple providers are registered, then only the first will be used.
3418
+ */
3419
+ provideTunnel(tunnelOptions: TunnelOptions, tunnelCreationOptions: TunnelCreationOptions, token: CancellationToken): ProviderResult<Tunnel>;
3420
+ }
3421
+
3422
+ interface TunnelOptions {
3423
+ remoteAddress: { port: number; host: string };
3424
+ // The desired local port. If this port can't be used, then another will be chosen.
3425
+ localAddressPort?: number;
3426
+ label?: string;
3427
+ /**
3428
+ * @deprecated Use privacy instead
3429
+ */
3430
+ public?: boolean;
3431
+ privacy?: string;
3432
+ protocol?: string;
3433
+ }
3434
+ // tunnels @alexr00
3435
+
3436
+ interface TunnelOptions {
3437
+ remoteAddress: { port: number; host: string };
3438
+ // The desired local port. If this port can't be used, then another will be chosen.
3439
+ localAddressPort?: number;
3440
+ label?: string;
3441
+ /**
3442
+ * @deprecated Use privacy instead
3443
+ */
3444
+ public?: boolean;
3445
+ privacy?: string;
3446
+ protocol?: string;
3447
+ }
3448
+
3449
+ interface TunnelDescription {
3450
+ remoteAddress: { port: number; host: string };
3451
+ //The complete local address(ex. localhost:1234)
3452
+ localAddress: { port: number; host: string } | string;
3453
+ /**
3454
+ * @deprecated Use privacy instead
3455
+ */
3456
+ public?: boolean;
3457
+ privacy?: string;
3458
+ // If protocol is not provided it is assumed to be http, regardless of the localAddress.
3459
+ protocol?: string;
3460
+ }
3461
+
3462
+ interface TunnelDescription {
3463
+ remoteAddress: { port: number; host: string };
3464
+ //The complete local address(ex. localhost:1234)
3465
+ localAddress: { port: number; host: string } | string;
3466
+ /**
3467
+ * @deprecated Use privacy instead
3468
+ */
3469
+ public?: boolean;
3470
+ privacy?: string;
3471
+ // If protocol is not provided it is assumed to be http, regardless of the localAddress.
3472
+ protocol?: string;
3473
+ }
3474
+
3475
+ interface Tunnel extends TunnelDescription {
3476
+ // Implementers of Tunnel should fire onDidDispose when dispose is called.
3477
+ onDidDispose: Event<void>;
3478
+ dispose(): void | Thenable<void>;
3479
+ }
3480
+
3481
+ interface Tunnel extends TunnelDescription {
3482
+ // Implementers of Tunnel should fire onDidDispose when dispose is called.
3483
+ onDidDispose: Event<void>;
3484
+ dispose(): void | Thenable<void>;
3485
+ }
3486
+ // https://github.com/microsoft/vscode/issues/181569 @connor4312
3487
+
3488
+ interface WindowState {
3489
+ /**
3490
+ * Indicates whether the window has been interacted with recently. This will
3491
+ * change immediately on activity, or after a short time of user inactivity.
3492
+ */
3493
+ readonly active: boolean;
3494
+ }
3495
+ // https://github.com/microsoft/vscode/issues/120173
3496
+
3497
+ /**
3498
+ * The object describing the properties of the workspace trust request
3499
+ */
3500
+ interface WorkspaceTrustRequestOptions {
3501
+ /**
3502
+ * Custom message describing the user action that requires workspace
3503
+ * trust. If omitted, a generic message will be displayed in the workspace
3504
+ * trust request dialog.
3505
+ */
3506
+ readonly message?: string;
3507
+ }
3508
+ // https://github.com/microsoft/vscode/issues/180582
3509
+
3510
+ declare namespace workspace {
3511
+ /**
3512
+ *
3513
+ * @param scheme The URI scheme that this provider can provide canonical URIs for.
3514
+ * A canonical URI represents the conversion of a resource's alias into a source of truth URI.
3515
+ * Multiple aliases may convert to the same source of truth URI.
3516
+ * @param provider A provider which can convert URIs of scheme @param scheme to
3517
+ * a canonical URI which is stable across machines.
3518
+ */
3519
+ export function registerCanonicalUriProvider(scheme: string, provider: CanonicalUriProvider): Disposable;
3520
+
3521
+ /**
3522
+ *
3523
+ * @param uri The URI to provide a canonical URI for.
3524
+ * @param token A cancellation token for the request.
3525
+ */
3526
+ export function getCanonicalUri(uri: Uri, options: CanonicalUriRequestOptions, token: CancellationToken): ProviderResult<Uri>;
3527
+ }
3528
+ // https://github.com/microsoft/vscode/issues/157734
3529
+
3530
+ declare namespace workspace {
3531
+ /**
3532
+ * An event that is emitted when an edit session identity is about to be requested.
3533
+ */
3534
+ export const onWillCreateEditSessionIdentity: Event<EditSessionIdentityWillCreateEvent>;
3535
+
3536
+ /**
3537
+ *
3538
+ * @param scheme The URI scheme that this provider can provide edit session identities for.
3539
+ * @param provider A provider which can convert URIs for workspace folders of scheme @param scheme to
3540
+ * an edit session identifier which is stable across machines. This enables edit sessions to be resolved.
3541
+ */
3542
+ export function registerEditSessionIdentityProvider(scheme: string, provider: EditSessionIdentityProvider): Disposable;
3543
+ }
3544
+
3545
+ declare namespace workspace {
3546
+ /**
3547
+ * Register a search provider.
3548
+ *
3549
+ * Only one provider can be registered per scheme.
3550
+ *
3551
+ * @param scheme The provider will be invoked for workspace folders that have this file scheme.
3552
+ * @param provider The provider.
3553
+ * @return A {@link Disposable} that unregisters this provider when being disposed.
3554
+ */
3555
+ export function registerFileSearchProvider(scheme: string, provider: FileSearchProvider): Disposable;
3556
+ }
3557
+
3558
+ declare namespace workspace {
3559
+ /**
3560
+ * Search text in files across all {@link workspace.workspaceFolders workspace folders} in the workspace.
3561
+ * @param query The query parameters for the search - the search string, whether it's case-sensitive, or a regex, or matches whole words.
3562
+ * @param callback A callback, called for each result
3563
+ * @param token A token that can be used to signal cancellation to the underlying search engine.
3564
+ * @return A thenable that resolves when the search is complete.
3565
+ */
3566
+ export function findTextInFiles(query: TextSearchQuery, callback: (result: TextSearchResult) => void, token?: CancellationToken): Thenable<TextSearchComplete>;
3567
+
3568
+ /**
3569
+ * Search text in files across all {@link workspace.workspaceFolders workspace folders} in the workspace.
3570
+ * @param query The query parameters for the search - the search string, whether it's case-sensitive, or a regex, or matches whole words.
3571
+ * @param options An optional set of query options. Include and exclude patterns, maxResults, etc.
3572
+ * @param callback A callback, called for each result
3573
+ * @param token A token that can be used to signal cancellation to the underlying search engine.
3574
+ * @return A thenable that resolves when the search is complete.
3575
+ */
3576
+ export function findTextInFiles(query: TextSearchQuery, options: FindTextInFilesOptions, callback: (result: TextSearchResult) => void, token?: CancellationToken): Thenable<TextSearchComplete>;
3577
+ }
3578
+
3579
+ declare namespace workspace {
3580
+
3581
+ // SPECIAL overload with NotebookRegistrationData
3582
+ export function registerNotebookSerializer(notebookType: string, serializer: NotebookSerializer, options?: NotebookDocumentContentOptions, registration?: NotebookRegistrationData): Disposable;
3583
+ }
3584
+
3585
+ declare namespace workspace {
3586
+ /**
3587
+ * If your extension listens on ports, consider registering a PortAttributesProvider to provide information
3588
+ * about the ports. For example, a debug extension may know about debug ports in it's debuggee. By providing
3589
+ * this information with a PortAttributesProvider the extension can tell the editor that these ports should be
3590
+ * ignored, since they don't need to be user facing.
3591
+ *
3592
+ * The results of the PortAttributesProvider are merged with the user setting `remote.portsAttributes`. If the values conflict, the user setting takes precedence.
3593
+ *
3594
+ * @param portSelector It is best practice to specify a port selector to avoid unnecessary calls to your provider.
3595
+ * If you don't specify a port selector your provider will be called for every port, which will result in slower port forwarding for the user.
3596
+ * @param provider The {@link PortAttributesProvider PortAttributesProvider}.
3597
+ */
3598
+ export function registerPortAttributesProvider(portSelector: PortAttributesSelector, provider: PortAttributesProvider): Disposable;
3599
+ }
3600
+ declare namespace workspace {
3601
+
3602
+ export function registerFileSystemProvider(scheme: string, provider: FileSystemProvider, options?: { readonly isCaseSensitive?: boolean; readonly isReadonly?: boolean | MarkdownString }): Disposable;
3603
+ }
3604
+
3605
+ declare namespace workspace {
3606
+ export function registerRemoteAuthorityResolver(authorityPrefix: string, resolver: RemoteAuthorityResolver): Disposable;
3607
+ export function registerResourceLabelFormatter(formatter: ResourceLabelFormatter): Disposable;
3608
+ export function getRemoteExecServer(authority: string): Thenable<ExecServer | undefined>;
3609
+ }
3610
+ declare namespace workspace {
3611
+
3612
+ /**
3613
+ * Saves the editor identified by the given resource and returns the resulting resource or `undefined`
3614
+ * if save was not successful or no editor with the given resource was found.
3615
+ *
3616
+ * **Note** that an editor with the provided resource must be opened in order to be saved.
3617
+ *
3618
+ * @param uri the associated uri for the opened editor to save.
3619
+ * @return A thenable that resolves when the save operation has finished.
3620
+ */
3621
+ export function save(uri: Uri): Thenable<Uri | undefined>;
3622
+
3623
+ /**
3624
+ * Saves the editor identified by the given resource to a new file name as provided by the user and
3625
+ * returns the resulting resource or `undefined` if save was not successful or cancelled or no editor
3626
+ * with the given resource was found.
3627
+ *
3628
+ * **Note** that an editor with the provided resource must be opened in order to be saved as.
3629
+ *
3630
+ * @param uri the associated uri for the opened editor to save as.
3631
+ * @return A thenable that resolves when the save-as operation has finished.
3632
+ */
3633
+ export function saveAs(uri: Uri): Thenable<Uri | undefined>;
3634
+ }
3635
+
3636
+ declare namespace workspace {
3637
+ /**
3638
+ * Register a text search provider.
3639
+ *
3640
+ * Only one provider can be registered per scheme.
3641
+ *
3642
+ * @param scheme The provider will be invoked for workspace folders that have this file scheme.
3643
+ * @param provider The provider.
3644
+ * @return A {@link Disposable} that unregisters this provider when being disposed.
3645
+ */
3646
+ export function registerTextSearchProvider(scheme: string, provider: TextSearchProvider): Disposable;
3647
+ }
3648
+
3649
+ declare namespace workspace {
3650
+ /**
3651
+ * Register a timeline provider.
3652
+ *
3653
+ * Multiple providers can be registered. In that case, providers are asked in
3654
+ * parallel and the results are merged. A failing provider (rejected promise or exception) will
3655
+ * not cause a failure of the whole operation.
3656
+ *
3657
+ * @param scheme A scheme or schemes that defines which documents this provider is applicable to. Can be `*` to target all documents.
3658
+ * @param provider A timeline provider.
3659
+ * @return A {@link Disposable} that unregisters this provider when being disposed.
3660
+ */
3661
+ export function registerTimelineProvider(scheme: string | string[], provider: TimelineProvider): Disposable;
3662
+ }
3663
+
3664
+ declare namespace workspace {
3665
+ /**
3666
+ * Registering a tunnel provider enables port forwarding. This will cause the Ports view to show.
3667
+ * @param provider
3668
+ */
3669
+ export function registerTunnelProvider(provider: TunnelProvider, information: TunnelInformation): Thenable<Disposable>;
3670
+ }
3671
+
3672
+ declare namespace workspace {
3673
+ /**
3674
+ * Forwards a port. If the current resolver implements RemoteAuthorityResolver:forwardPort then that will be used to make the tunnel.
3675
+ * By default, openTunnel only support localhost; however, RemoteAuthorityResolver:tunnelFactory can be used to support other ips.
3676
+ *
3677
+ * @throws When run in an environment without a remote.
3678
+ *
3679
+ * @param tunnelOptions The `localPort` is a suggestion only. If that port is not available another will be chosen.
3680
+ */
3681
+ export function openTunnel(tunnelOptions: TunnelOptions): Thenable<Tunnel>;
3682
+
3683
+ /**
3684
+ * Gets an array of the currently available tunnels. This does not include environment tunnels, only tunnels that have been created by the user.
3685
+ * Note that these are of type TunnelDescription and cannot be disposed.
3686
+ */
3687
+ export let tunnels: Thenable<TunnelDescription[]>;
3688
+
3689
+ /**
3690
+ * Fired when the list of tunnels has changed.
3691
+ */
3692
+ export const onDidChangeTunnels: Event<void>;
3693
+ }
3694
+
3695
+ declare namespace workspace {
3696
+ /**
3697
+ * Prompt the user to chose whether to trust the current workspace
3698
+ * @param options Optional object describing the properties of the
3699
+ * workspace trust request.
3700
+ */
3701
+ export function requestWorkspaceTrust(options?: WorkspaceTrustRequestOptions): Thenable<boolean | undefined>;
3702
+ }
3703
+
3704
+ export { type AuthenticationForceNewSessionOptions, type AuthenticationProvider, type AuthenticationProviderCreateSessionOptions, type AuthenticationSession, BranchCoverage, CandidatePortSource, type CanonicalUriProvider, type CanonicalUriRequestOptions, type ChatAccess, ChatMessage, ChatMessageRole, type ChatResponseFragment, type ChatResponseProvider, type ChatResponseProviderMetadata, type ChatVariableContext, ChatVariableLevel, type ChatVariableResolver, type ChatVariableValue, type CommandInformationResult, type Comment, type CommentController, CommentState, type CommentThread2, type CommentingRangeProvider2, CoveredCount, type CustomTextEditorProvider, type DetailedCoverage, type DocumentDropEdit, type DocumentDropEditProviderMetadata, type DocumentFilter, DocumentPasteEdit, type DocumentPasteEditProvider, type DocumentPasteProviderMetadata, EditSessionIdentityMatch, type EditSessionIdentityProvider, type EditSessionIdentityWillCreateEvent, type EmbeddingVectorProvider, type ExecServer, type Extension, type ExtensionContext, ExtensionRuntime, type ExternalUriOpener, type ExternalUriOpenerMetadata, ExternalUriOpenerPriority, FileCoverage, FileDecoration2, type FileSearchOptions, type FileSearchProvider, type FileSearchQuery, type FileSystemProvider, type FileTreeData, type FindTextInFilesOptions, FunctionCoverage, type GlobString, type InlineCompletionItem, type InlineCompletionItemProvider, type InlineCompletionItemProviderMetadata, type InlineCompletionList, type InteractiveEditorMessageResponse, type InteractiveEditorRequest, type InteractiveEditorResponse, InteractiveEditorResponseFeedbackKind, type InteractiveEditorSession, type InteractiveEditorSessionProvider, type InteractiveEditorSlashCommand, type InteractiveProgress, type InteractiveProgressContent, type InteractiveProgressFileTree, type InteractiveProgressId, type InteractiveProgressTask, type InteractiveRequest, type InteractiveResponseCommand, type InteractiveResponseErrorDetails, type InteractiveResponseForProgress, type InteractiveSession, type InteractiveSessionCommandAction, type InteractiveSessionCopyAction, InteractiveSessionCopyKind, type InteractiveSessionDynamicRequest, type InteractiveSessionFollowup, type InteractiveSessionInsertAction, type InteractiveSessionParticipantInformation, type InteractiveSessionProvider, type InteractiveSessionReplyFollowup, type InteractiveSessionRequestArgs, type InteractiveSessionSlashCommand, type InteractiveSessionState, type InteractiveSessionTerminalAction, type InteractiveSessionUserAction, type InteractiveSessionUserActionEvent, type InteractiveSessionVoteAction, InteractiveSessionVoteDirection, type InteractiveWelcomeMessageContent, type IssueUriRequestHandler, type LanguageConfiguration, type LineChange, type ManagedMessagePassing, ManagedResolvedAuthority, type MappedEditsContext, type MappedEditsProvider, type MessageOptions, type MessagePassingProtocol, type NotebookCell, type NotebookCellData, NotebookCellExecutionState, type NotebookCellExecutionStateChangeEvent, type NotebookCellOutput, NotebookCodeActionKind, type NotebookController, NotebookControllerAffinity2, type NotebookControllerDetectionTask, type NotebookDocumentContentOptions, type NotebookExecution, NotebookKernelSourceAction, type NotebookKernelSourceActionProvider, type NotebookRegistrationData, NotebookRendererScript, type OpenDialogOptions, type OpenExternalOptions, type OpenExternalUriContext, PortAttributes, type PortAttributesProvider, type PortAttributesSelector, PortAutoForwardAction, type ProfileContentHandler, type QuickDiffProvider, type QuickPick, type QuickPickItem, type RelatedContextItem, type RelatedInformationBaseResult, type RelatedInformationProvider, type RelatedInformationResult, RelatedInformationType, type RemoteAuthorityResolver, type RemoteAuthorityResolverContext, RemoteAuthorityResolverError, ResolvedAuthority, type ResolvedOptions, type ResolverResult, type ResourceLabelFormatter, type ResourceLabelFormatting, type SearchOptions, type SettingInformationResult, type ShareProvider, type ShareableItem, type SingleOrMany, type SlashCommand, type SlashCommandContext, type SlashCommandMetadata, type SlashResponse, type SlashResult, type SourceControl, type SourceControlActionButton, type SourceControlInputBox, type SourceControlInputBoxValidation, SourceControlInputBoxValidationType, StackFrameFocus, StandardTokenType, StatementCoverage, type Tab, TabInputInteractiveWindow, TabInputTextMerge, type TaskPresentationOptions, type TelemetryConfiguration, type Terminal, type TerminalCommandMatchResult, type TerminalDataWriteEvent, type TerminalDimensionsChangeEvent, type TerminalExecutedCommand, TerminalOutputAnchor, type TerminalOutputMatcher, TerminalQuickFixExecuteTerminalCommand, TerminalQuickFixOpener, type TerminalQuickFixProvider, type TestCoverageProvider, TestMessage2, type TestObserver, type TestResultSnapshot, TestResultState, type TestRun, type TestRunResult, type TestSnapshotTaskState, type TestsChangeEvent, type TextDocumentContext, type TextEditorOptions, type TextSearchComplete, type TextSearchCompleteMessage, TextSearchCompleteMessageType, type TextSearchContext, type TextSearchMatch, type TextSearchMatchPreview, type TextSearchOptions, type TextSearchPreviewOptions, type TextSearchProvider, type TextSearchQuery, type TextSearchResult, ThreadFocus, type Timeline, type TimelineChangeEvent, TimelineItem, type TimelineOptions, type TimelineProvider, type TokenInformation, type TreeItem, type TreeView, type TreeView2, type TreeViewActiveItemChangeEvent, type Tunnel, type TunnelCreationOptions, type TunnelDescription, type TunnelInformation, type TunnelOptions, type TunnelPrivacy, type TunnelProvider, type WebviewEditorInset, type WindowState, type WorkspaceTrustRequestOptions, ai, authentication, chat, commands, debug, env, extensions, interactive, languages, notebooks, tests, window, workspace };