@opensumi/sumi 2.20.10 → 2.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -411,6 +411,72 @@ declare module 'vscode' {
411
411
  constructor(options: TerminalOptions | ExtensionTerminalOptions);
412
412
  }
413
413
 
414
+
415
+ /**
416
+ * A file decoration represents metadata that can be rendered with a file.
417
+ */
418
+ export class FileDecoration {
419
+
420
+ /**
421
+ * A very short string that represents this decoration.
422
+ */
423
+ badge?: string;
424
+
425
+ /**
426
+ * A human-readable tooltip for this decoration.
427
+ */
428
+ tooltip?: string;
429
+
430
+ /**
431
+ * The color of this decoration.
432
+ */
433
+ color?: ThemeColor;
434
+
435
+ /**
436
+ * A flag expressing that this decoration should be
437
+ * propagated to its parents.
438
+ */
439
+ propagate?: boolean;
440
+
441
+ /**
442
+ * Creates a new decoration.
443
+ *
444
+ * @param badge A letter that represents the decoration.
445
+ * @param tooltip The tooltip of the decoration.
446
+ * @param color The color of the decoration.
447
+ */
448
+ constructor(badge?: string, tooltip?: string, color?: ThemeColor);
449
+ }
450
+
451
+ /**
452
+ * The decoration provider interfaces defines the contract between extensions and
453
+ * file decorations.
454
+ */
455
+ export interface FileDecorationProvider {
456
+
457
+ /**
458
+ * An optional event to signal that decorations for one or many files have changed.
459
+ *
460
+ * *Note* that this event should be used to propagate information about children.
461
+ *
462
+ * @see {@link EventEmitter}
463
+ */
464
+ onDidChangeFileDecorations?: Event<undefined | Uri | Uri[]>;
465
+
466
+ /**
467
+ * Provide decorations for a given uri.
468
+ *
469
+ * *Note* that this function is only called when a file gets rendered in the UI.
470
+ * This means a decoration from a descendent that propagates upwards must be signaled
471
+ * to the editor via the {@link FileDecorationProvider.onDidChangeFileDecorations onDidChangeFileDecorations}-event.
472
+ *
473
+ * @param uri The uri of the file to provide a decoration for.
474
+ * @param token A cancellation token.
475
+ * @returns A decoration or a thenable that resolves to such.
476
+ */
477
+ provideFileDecoration(uri: Uri, token: CancellationToken): ProviderResult<FileDecoration>;
478
+ }
479
+
414
480
  /**
415
481
  * Class used to execute an extension callback as a task.
416
482
  */
@@ -1462,6 +1528,11 @@ declare module 'vscode' {
1462
1528
  * array containing all selected tree items.
1463
1529
  */
1464
1530
  canSelectMany?: boolean;
1531
+
1532
+ /**
1533
+ * An optional interface to implement drag and drop in the tree view.
1534
+ */
1535
+ dragAndDropController?: TreeDragAndDropController<T>;
1465
1536
  }
1466
1537
 
1467
1538
  /**
@@ -1500,6 +1571,166 @@ declare module 'vscode' {
1500
1571
 
1501
1572
  }
1502
1573
 
1574
+
1575
+ /**
1576
+ * A file associated with a {@linkcode DataTransferItem}.
1577
+ */
1578
+ export interface DataTransferFile {
1579
+ /**
1580
+ * The name of the file.
1581
+ */
1582
+ readonly name: string;
1583
+
1584
+ /**
1585
+ * The full file path of the file.
1586
+ *
1587
+ * May be `undefined` on web.
1588
+ */
1589
+ readonly uri?: Uri;
1590
+
1591
+ /**
1592
+ * The full file contents of the file.
1593
+ */
1594
+ data(): Thenable<Uint8Array>;
1595
+ }
1596
+
1597
+ /**
1598
+ * Encapsulates data transferred during drag and drop operations.
1599
+ */
1600
+ export class DataTransferItem {
1601
+ /**
1602
+ * Get a string representation of this item.
1603
+ *
1604
+ * If {@linkcode DataTransferItem.value} is an object, this returns the result of json stringifying {@linkcode DataTransferItem.value} value.
1605
+ */
1606
+ asString(): Thenable<string>;
1607
+
1608
+ /**
1609
+ * Try getting the {@link DataTransferFile file} associated with this data transfer item.
1610
+ *
1611
+ * Note that the file object is only valid for the scope of the drag and drop operation.
1612
+ *
1613
+ * @returns The file for the data transfer or `undefined` if the item is either not a file or the
1614
+ * file data cannot be accessed.
1615
+ */
1616
+ asFile(): DataTransferFile | undefined;
1617
+
1618
+ /**
1619
+ * Custom data stored on this item.
1620
+ *
1621
+ * You can use `value` to share data across operations. The original object can be retrieved so long as the extension that
1622
+ * created the `DataTransferItem` runs in the same extension host.
1623
+ */
1624
+ readonly value: any;
1625
+
1626
+ /**
1627
+ * @param value Custom data stored on this item. Can be retrieved using {@linkcode DataTransferItem.value}.
1628
+ */
1629
+ constructor(value: any);
1630
+ }
1631
+
1632
+ /**
1633
+ * A map containing a mapping of the mime type of the corresponding transferred data.
1634
+ *
1635
+ * Drag and drop controllers that implement {@link TreeDragAndDropController.handleDrag `handleDrag`} can add additional mime types to the
1636
+ * data transfer. These additional mime types will only be included in the `handleDrop` when the the drag was initiated from
1637
+ * an element in the same drag and drop controller.
1638
+ */
1639
+ export class DataTransfer implements Iterable<[mimeType: string, item: DataTransferItem]> {
1640
+ /**
1641
+ * Retrieves the data transfer item for a given mime type.
1642
+ *
1643
+ * @param mimeType The mime type to get the data transfer item for, such as `text/plain` or `image/png`.
1644
+ *
1645
+ * Special mime types:
1646
+ * - `text/uri-list` — A string with `toString()`ed Uris separated by `\r\n`. To specify a cursor position in the file,
1647
+ * set the Uri's fragment to `L3,5`, where 3 is the line number and 5 is the column number.
1648
+ */
1649
+ get(mimeType: string): DataTransferItem | undefined;
1650
+
1651
+ /**
1652
+ * Sets a mime type to data transfer item mapping.
1653
+ * @param mimeType The mime type to set the data for.
1654
+ * @param value The data transfer item for the given mime type.
1655
+ */
1656
+ set(mimeType: string, value: DataTransferItem): void;
1657
+
1658
+ /**
1659
+ * Allows iteration through the data transfer items.
1660
+ *
1661
+ * @param callbackfn Callback for iteration through the data transfer items.
1662
+ * @param thisArg The `this` context used when invoking the handler function.
1663
+ */
1664
+ forEach(callbackfn: (item: DataTransferItem, mimeType: string, dataTransfer: DataTransfer) => void, thisArg?: any): void;
1665
+
1666
+ /**
1667
+ * Get a new iterator with the `[mime, item]` pairs for each element in this data transfer.
1668
+ */
1669
+ [Symbol.iterator](): IterableIterator<[mimeType: string, item: DataTransferItem]>;
1670
+ }
1671
+
1672
+ /**
1673
+ * Provides support for drag and drop in `TreeView`.
1674
+ */
1675
+ export interface TreeDragAndDropController<T> {
1676
+
1677
+ /**
1678
+ * The mime types that the {@link TreeDragAndDropController.handleDrop `handleDrop`} method of this `DragAndDropController` supports.
1679
+ * This could be well-defined, existing, mime types, and also mime types defined by the extension.
1680
+ *
1681
+ * To support drops from trees, you will need to add the mime type of that tree.
1682
+ * This includes drops from within the same tree.
1683
+ * The mime type of a tree is recommended to be of the format `application/vnd.code.tree.<treeidlowercase>`.
1684
+ *
1685
+ * Use the special `files` mime type to support all types of dropped files {@link DataTransferFile files}, regardless of the file's actual mime type.
1686
+ *
1687
+ * To learn the mime type of a dragged item:
1688
+ * 1. Set up your `DragAndDropController`
1689
+ * 2. Use the Developer: Set Log Level... command to set the level to "Debug"
1690
+ * 3. Open the developer tools and drag the item with unknown mime type over your tree. The mime types will be logged to the developer console
1691
+ *
1692
+ * Note that mime types that cannot be sent to the extension will be omitted.
1693
+ */
1694
+ readonly dropMimeTypes: readonly string[];
1695
+
1696
+ /**
1697
+ * The mime types that the {@link TreeDragAndDropController.handleDrag `handleDrag`} method of this `TreeDragAndDropController` may add to the tree data transfer.
1698
+ * This could be well-defined, existing, mime types, and also mime types defined by the extension.
1699
+ *
1700
+ * The recommended mime type of the tree (`application/vnd.code.tree.<treeidlowercase>`) will be automatically added.
1701
+ */
1702
+ readonly dragMimeTypes: readonly string[];
1703
+
1704
+ /**
1705
+ * When the user starts dragging items from this `DragAndDropController`, `handleDrag` will be called.
1706
+ * Extensions can use `handleDrag` to add their {@link DataTransferItem `DataTransferItem`} items to the drag and drop.
1707
+ *
1708
+ * When the items are dropped on **another tree item** in **the same tree**, your `DataTransferItem` objects
1709
+ * will be preserved. Use the recommended mime type for the tree (`application/vnd.code.tree.<treeidlowercase>`) to add
1710
+ * tree objects in a data transfer. See the documentation for `DataTransferItem` for how best to take advantage of this.
1711
+ *
1712
+ * To add a data transfer item that can be dragged into the editor, use the application specific mime type "text/uri-list".
1713
+ * The data for "text/uri-list" should be a string with `toString()`ed Uris separated by newlines. To specify a cursor position in the file,
1714
+ * set the Uri's fragment to `L3,5`, where 3 is the line number and 5 is the column number.
1715
+ *
1716
+ * @param source The source items for the drag and drop operation.
1717
+ * @param dataTransfer The data transfer associated with this drag.
1718
+ * @param token A cancellation token indicating that drag has been cancelled.
1719
+ */
1720
+ handleDrag?(source: readonly T[], dataTransfer: DataTransfer, token: CancellationToken): Thenable<void> | void;
1721
+
1722
+ /**
1723
+ * Called when a drag and drop action results in a drop on the tree that this `DragAndDropController` belongs to.
1724
+ *
1725
+ * Extensions should fire {@link TreeDataProvider.onDidChangeTreeData onDidChangeTreeData} for any elements that need to be refreshed.
1726
+ *
1727
+ * @param dataTransfer The data transfer items of the source of the drag.
1728
+ * @param target The target tree element that the drop is occurring on. When undefined, the target is the root.
1729
+ * @param token A cancellation token indicating that the drop has been cancelled.
1730
+ */
1731
+ handleDrop?(target: T | undefined, dataTransfer: DataTransfer, token: CancellationToken): Thenable<void> | void;
1732
+ }
1733
+
1503
1734
  /**
1504
1735
  * Represents a Tree view
1505
1736
  */
@@ -1568,6 +1799,24 @@ declare module 'vscode' {
1568
1799
  reveal(element: T, options?: { select?: boolean, focus?: boolean, expand?: boolean | number }): Thenable<void>;
1569
1800
  }
1570
1801
 
1802
+ /**
1803
+ * Label describing the [Tree item](#TreeItem)
1804
+ */
1805
+ export interface TreeItemLabel {
1806
+
1807
+ /**
1808
+ * A human-readable string describing the [Tree item](#TreeItem).
1809
+ */
1810
+ label: string;
1811
+
1812
+ /**
1813
+ * Ranges in the label to highlight. A range is defined as a tuple of two number where the
1814
+ * first is the inclusive start index and the second the exclusive end index
1815
+ */
1816
+ highlights?: [number, number][];
1817
+
1818
+ }
1819
+
1571
1820
  /**
1572
1821
  * Collapsible state of the tree item
1573
1822
  */
@@ -2580,6 +2829,21 @@ declare module 'vscode' {
2580
2829
  onDidChange: Event<SecretStorageChangeEvent>;
2581
2830
  }
2582
2831
 
2832
+ /**
2833
+ * Represents the dimensions of a terminal.
2834
+ */
2835
+ export interface TerminalDimensions {
2836
+ /**
2837
+ * The number of columns in the terminal.
2838
+ */
2839
+ readonly columns: number;
2840
+
2841
+ /**
2842
+ * The number of rows in the terminal.
2843
+ */
2844
+ readonly rows: number;
2845
+ }
2846
+
2583
2847
  /**
2584
2848
  * Represents how a terminal exited.
2585
2849
  */
@@ -2607,9 +2871,9 @@ declare module 'vscode' {
2607
2871
  readonly processId: Thenable<number>;
2608
2872
 
2609
2873
  /**
2610
- * The current state of the {@link Terminal}.
2611
- */
2612
- readonly state: TerminalState;
2874
+ * The current state of the {@link Terminal}.
2875
+ */
2876
+ readonly state: TerminalState;
2613
2877
 
2614
2878
  /**
2615
2879
  * The object used to initialize the terminal, this is useful for example to detecting the
@@ -528,7 +528,7 @@ declare module 'vscode' {
528
528
  */
529
529
  export enum DebugConfigurationProviderTriggerKind {
530
530
  /**
531
- * `DebugConfigurationProvider.provideDebugConfigurations` is called to provide the initial debug configurations for a newly created launch.json.
531
+ * `DebugConfigurationProvider.provideDebugConfigurations` is called to provide the initial debug configurations for a newly created launch.json.
532
532
  */
533
533
  Initial = 1,
534
534
  /**
@@ -1,7 +1,3 @@
1
- /**
2
- * API OWENR: 木农
3
- */
4
-
5
1
  declare module 'vscode' {
6
2
  /**
7
3
  * Represents a text document, such as a source file. Text documents have
@@ -10,20 +10,20 @@ declare module 'vscode' {
10
10
  export const appName: string;
11
11
 
12
12
  /**
13
- * The application root folder from which the editor is running.
14
- *
15
- * *Note* that the value is the empty string when running in an
16
- * environment that has no representation of an application root folder.
17
- */
13
+ * The application root folder from which the editor is running.
14
+ *
15
+ * *Note* that the value is the empty string when running in an
16
+ * environment that has no representation of an application root folder.
17
+ */
18
18
  export const appRoot: string;
19
19
 
20
20
  /**
21
- * The hosted location of the application
22
- * On desktop this is 'desktop'
23
- * In the web this is the specified embedder i.e. 'github.dev', 'codespaces', or 'web' if the embedder
24
- * does not provide that information
25
- */
26
- export const appHost: string;
21
+ * The hosted location of the application
22
+ * On desktop this is 'desktop'
23
+ * In the web this is the specified embedder i.e. 'github.dev', 'codespaces', or 'web' if the embedder
24
+ * does not provide that information
25
+ */
26
+ export const appHost: string;
27
27
 
28
28
  /**
29
29
  * The custom uri scheme the editor registers to in the operating system.
@@ -52,21 +52,21 @@ declare module 'vscode' {
52
52
  export const sessionId: string;
53
53
 
54
54
  /**
55
- * Indicates that this is a fresh install of the application.
56
- * `true` if within the first day of installation otherwise `false`.
57
- */
55
+ * Indicates that this is a fresh install of the application.
56
+ * `true` if within the first day of installation otherwise `false`.
57
+ */
58
58
  export const isNewAppInstall: boolean;
59
59
 
60
60
  /**
61
- * Indicates whether the users has telemetry enabled.
62
- * Can be observed to determine if the extension should send telemetry.
63
- */
61
+ * Indicates whether the users has telemetry enabled.
62
+ * Can be observed to determine if the extension should send telemetry.
63
+ */
64
64
  export const isTelemetryEnabled: boolean;
65
65
 
66
66
  /**
67
- * An [event](#Event) which fires when the user enabled or disables telemetry.
68
- * `true` if the user has enabled telemetry or `false` if the user has disabled telemetry.
69
- */
67
+ * An [event](#Event) which fires when the user enabled or disables telemetry.
68
+ * `true` if the user has enabled telemetry or `false` if the user has disabled telemetry.
69
+ */
70
70
  export const onDidChangeTelemetryEnabled: Event<boolean>;
71
71
 
72
72
  /**
@@ -222,6 +222,19 @@ declare module 'vscode' {
222
222
  */
223
223
  export function registerColorProvider(selector: DocumentSelector, provider: DocumentColorProvider): Disposable;
224
224
 
225
+ /**
226
+ * Register a inlay hints provider.
227
+ *
228
+ * Multiple providers can be registered for a language. In that case providers are asked in
229
+ * parallel and the results are merged. A failing provider (rejected promise or exception) will
230
+ * not cause a failure of the whole operation.
231
+ *
232
+ * @param selector A selector that defines the documents this provider is applicable to.
233
+ * @param provider An inlay hints provider.
234
+ * @return A {@link Disposable} that unregisters this provider when being disposed.
235
+ */
236
+ export function registerInlayHintsProvider(selector: DocumentSelector, provider: InlayHintsProvider): Disposable;
237
+
225
238
  /**
226
239
  * Register a folding range provider.
227
240
  *
@@ -483,6 +496,163 @@ declare module 'vscode' {
483
496
  export function registerEvaluatableExpressionProvider(selector: DocumentSelector, provider: EvaluatableExpressionProvider): Disposable;
484
497
  }
485
498
 
499
+
500
+ export enum InlayHintKind {
501
+ Type = 1,
502
+ Parameter = 2,
503
+ }
504
+
505
+ /**
506
+ * An inlay hint label part allows for interactive and composite labels of inlay hints.
507
+ */
508
+ export class InlayHintLabelPart {
509
+
510
+ /**
511
+ * The value of this label part.
512
+ */
513
+ value: string;
514
+
515
+ /**
516
+ * The tooltip text when you hover over this label part.
517
+ *
518
+ * *Note* that this property can be set late during
519
+ * {@link InlayHintsProvider.resolveInlayHint resolving} of inlay hints.
520
+ */
521
+ tooltip?: string | MarkdownString | undefined;
522
+
523
+ /**
524
+ * An optional {@link Location source code location} that represents this label
525
+ * part.
526
+ *
527
+ * The editor will use this location for the hover and for code navigation features: This
528
+ * part will become a clickable link that resolves to the definition of the symbol at the
529
+ * given location (not necessarily the location itself), it shows the hover that shows at
530
+ * the given location, and it shows a context menu with further code navigation commands.
531
+ *
532
+ * *Note* that this property can be set late during
533
+ * {@link InlayHintsProvider.resolveInlayHint resolving} of inlay hints.
534
+ */
535
+ location?: Location | undefined;
536
+
537
+ /**
538
+ * An optional command for this label part.
539
+ *
540
+ * The editor renders parts with commands as clickable links. The command is added to the context menu
541
+ * when a label part defines {@link InlayHintLabelPart.location location} and {@link InlayHintLabelPart.command command} .
542
+ *
543
+ * *Note* that this property can be set late during
544
+ * {@link InlayHintsProvider.resolveInlayHint resolving} of inlay hints.
545
+ */
546
+ command?: Command | undefined;
547
+
548
+ /**
549
+ * Creates a new inlay hint label part.
550
+ *
551
+ * @param value The value of the part.
552
+ */
553
+ constructor(value: string);
554
+ }
555
+
556
+ /**
557
+ * Inlay hint information.
558
+ */
559
+ export class InlayHint {
560
+
561
+ /**
562
+ * The position of this hint.
563
+ */
564
+ position: Position;
565
+
566
+ /**
567
+ * The label of this hint. A human readable string or an array of {@link InlayHintLabelPart label parts}.
568
+ *
569
+ * *Note* that neither the string nor the label part can be empty.
570
+ */
571
+ label: string | InlayHintLabelPart[];
572
+
573
+ /**
574
+ * The tooltip text when you hover over this item.
575
+ *
576
+ * *Note* that this property can be set late during
577
+ * {@link InlayHintsProvider.resolveInlayHint resolving} of inlay hints.
578
+ */
579
+ tooltip?: string | MarkdownString | undefined;
580
+
581
+ /**
582
+ * The kind of this hint. The inlay hint kind defines the appearance of this inlay hint.
583
+ */
584
+ kind?: InlayHintKind;
585
+
586
+ /**
587
+ * Optional {@link TextEdit text edits} that are performed when accepting this inlay hint. The default
588
+ * gesture for accepting an inlay hint is the double click.
589
+ *
590
+ * *Note* that edits are expected to change the document so that the inlay hint (or its nearest variant) is
591
+ * now part of the document and the inlay hint itself is now obsolete.
592
+ *
593
+ * *Note* that this property can be set late during
594
+ * {@link InlayHintsProvider.resolveInlayHint resolving} of inlay hints.
595
+ */
596
+ textEdits?: TextEdit[];
597
+
598
+ /**
599
+ * Render padding before the hint. Padding will use the editor's background color,
600
+ * not the background color of the hint itself. That means padding can be used to visually
601
+ * align/separate an inlay hint.
602
+ */
603
+ paddingLeft?: boolean;
604
+
605
+ /**
606
+ * Render padding after the hint. Padding will use the editor's background color,
607
+ * not the background color of the hint itself. That means padding can be used to visually
608
+ * align/separate an inlay hint.
609
+ */
610
+ paddingRight?: boolean;
611
+
612
+ /**
613
+ * Creates a new inlay hint.
614
+ *
615
+ * @param position The position of the hint.
616
+ * @param label The label of the hint.
617
+ * @param kind The {@link InlayHintKind kind} of the hint.
618
+ */
619
+ constructor(position: Position, label: string | InlayHintLabelPart[], kind?: InlayHintKind);
620
+ }
621
+
622
+ /**
623
+ * The inlay hints provider interface defines the contract between extensions and
624
+ * the inlay hints feature.
625
+ */
626
+ export interface InlayHintsProvider<T extends InlayHint = InlayHint> {
627
+
628
+ /**
629
+ * An optional event to signal that inlay hints have changed.
630
+ * @see {@link EventEmitter}
631
+ */
632
+ onDidChangeInlayHints?: Event<void>;
633
+
634
+ /**
635
+ *
636
+ * @param model The document in which the command was invoked.
637
+ * @param range The range for which inlay hints should be computed.
638
+ * @param token A cancellation token.
639
+ * @return A list of inlay hints or a thenable that resolves to such.
640
+ */
641
+ provideInlayHints(model: TextDocument, range: Range, token: CancellationToken): ProviderResult<T[]>;
642
+
643
+ /**
644
+ * Given an inlay hint fill in {@link InlayHint.tooltip tooltip}, {@link InlayHint.textEdits text edits},
645
+ * or complete label {@link InlayHintLabelPart parts}.
646
+ *
647
+ * *Note* that the editor will resolve an inlay hint at most once.
648
+ *
649
+ * @param hint An inlay hint.
650
+ * @param token A cancellation token.
651
+ * @return The resolved inlay hint or a thenable that resolves to such. It is OK to return the given `item`. When no result is returned, the given `item` will be used.
652
+ */
653
+ resolveInlayHint?(hint: T, token: CancellationToken): ProviderResult<T>;
654
+ }
655
+
486
656
  /**
487
657
  * Represents a list of ranges that can be edited together along with a word pattern to describe valid range contents.
488
658
  */
@@ -0,0 +1,47 @@
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ * Licensed under the MIT License. See License.txt in the project root for license information.
4
+ *--------------------------------------------------------------------------------------------*/
5
+
6
+ declare module 'vscode' {
7
+
8
+ // https://github.com/microsoft/vscode/issues/88309
9
+
10
+ /**
11
+ * An {@link Event} which fires when an {@link AuthenticationProvider} is added or removed.
12
+ */
13
+ export interface AuthenticationProvidersChangeEvent {
14
+ /**
15
+ * The ids of the {@link AuthenticationProvider}s that have been added.
16
+ */
17
+ readonly added: ReadonlyArray<AuthenticationProviderInformation>;
18
+
19
+ /**
20
+ * The ids of the {@link AuthenticationProvider}s that have been removed.
21
+ */
22
+ readonly removed: ReadonlyArray<AuthenticationProviderInformation>;
23
+ }
24
+
25
+ export namespace authentication {
26
+ /**
27
+ * @deprecated - getSession should now trigger extension activation.
28
+ * Fires with the provider id that was registered or unregistered.
29
+ */
30
+ export const onDidChangeAuthenticationProviders: Event<AuthenticationProvidersChangeEvent>;
31
+
32
+ /**
33
+ * @deprecated
34
+ * An array of the information of authentication providers that are currently registered.
35
+ */
36
+ export const providers: ReadonlyArray<AuthenticationProviderInformation>;
37
+
38
+ /**
39
+ * @deprecated
40
+ * Logout of a specific session.
41
+ * @param providerId The id of the provider to use
42
+ * @param sessionId The session id to remove
43
+ * provider
44
+ */
45
+ export function logout(providerId: string, sessionId: string): Thenable<void>;
46
+ }
47
+ }
@@ -0,0 +1,38 @@
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ * Licensed under the MIT License. See License.txt in the project root for license information.
4
+ *--------------------------------------------------------------------------------------------*/
5
+
6
+ declare module 'vscode' {
7
+
8
+ // https://github.com/microsoft/vscode/issues/84899
9
+
10
+ /**
11
+ * The contiguous set of modified lines in a diff.
12
+ */
13
+ export interface LineChange {
14
+ readonly originalStartLineNumber: number;
15
+ readonly originalEndLineNumber: number;
16
+ readonly modifiedStartLineNumber: number;
17
+ readonly modifiedEndLineNumber: number;
18
+ }
19
+
20
+ export namespace commands {
21
+
22
+ /**
23
+ * Registers a diff information command that can be invoked via a keyboard shortcut,
24
+ * a menu item, an action, or directly.
25
+ *
26
+ * Diff information commands are different from ordinary {@link commands.registerCommand commands} as
27
+ * they only execute when there is an active diff editor when the command is called, and the diff
28
+ * information has been computed. Also, the command handler of an editor command has access to
29
+ * the diff information.
30
+ *
31
+ * @param command A unique identifier for the command.
32
+ * @param callback A command handler function with access to the {@link LineChange diff information}.
33
+ * @param thisArg The `this` context used when invoking the handler function.
34
+ * @return Disposable which unregisters this command on disposal.
35
+ */
36
+ export function registerDiffInformationCommand(command: string, callback: (diff: LineChange[], ...args: any[]) => any, thisArg?: any): Disposable;
37
+ }
38
+ }