@@ -1613,10 +1613,51 @@ declare module 'vscode' {
1613
1613
resolveKernel ?( kernel : T , document : NotebookDocument , webview : NotebookCommunication , token : CancellationToken ) : ProviderResult < void > ;
1614
1614
}
1615
1615
1616
+ /**
1617
+ * Represents the alignment of status bar items.
1618
+ */
1619
+ export enum NotebookCellStatusBarAlignment {
1620
+
1621
+ /**
1622
+ * Aligned to the left side.
1623
+ */
1624
+ Left = 1 ,
1625
+
1626
+ /**
1627
+ * Aligned to the right side.
1628
+ */
1629
+ Right = 2
1630
+ }
1631
+
1632
+ export interface NotebookCellStatusBarItem {
1633
+ readonly cell : NotebookCell ;
1634
+ readonly alignment : NotebookCellStatusBarAlignment ;
1635
+ readonly priority ?: number ;
1636
+ text : string ;
1637
+ tooltip : string | undefined ;
1638
+ command : string | Command | undefined ;
1639
+ accessibilityInformation ?: AccessibilityInformation ;
1640
+ show ( ) : void ;
1641
+ hide ( ) : void ;
1642
+ dispose ( ) : void ;
1643
+ }
1644
+
1616
1645
export namespace notebook {
1617
1646
export function registerNotebookContentProvider (
1618
1647
notebookType : string ,
1619
- provider : NotebookContentProvider
1648
+ provider : NotebookContentProvider ,
1649
+ options ?: {
1650
+ /**
1651
+ * Controls if outputs change will trigger notebook document content change and if it will be used in the diff editor
1652
+ * Default to false. If the content provider doesn't persisit the outputs in the file document, this should be set to true.
1653
+ */
1654
+ transientOutputs : boolean ;
1655
+ /**
1656
+ * Controls if a meetadata property change will trigger notebook document content change and if it will be used in the diff editor
1657
+ * Default to false. If the content provider doesn't persisit a metadata property in the file document, it should be set to true.
1658
+ */
1659
+ transientMetadata : { [ K in keyof NotebookCellMetadata ] ?: boolean }
1660
+ }
1620
1661
) : Disposable ;
1621
1662
1622
1663
export function registerNotebookKernelProvider (
@@ -1658,6 +1699,17 @@ declare module 'vscode' {
1658
1699
export function createConcatTextDocument ( notebook : NotebookDocument , selector ?: DocumentSelector ) : NotebookConcatTextDocument ;
1659
1700
1660
1701
export const onDidChangeActiveNotebookKernel : Event < { document : NotebookDocument , kernel : NotebookKernel | undefined } > ;
1702
+
1703
+ /**
1704
+ * Creates a notebook cell status bar [item](#NotebookCellStatusBarItem).
1705
+ * It will be disposed automatically when the notebook document is closed or the cell is deleted.
1706
+ *
1707
+ * @param cell The cell on which this item should be shown.
1708
+ * @param alignment The alignment of the item.
1709
+ * @param priority The priority of the item. Higher values mean the item should be shown more to the left.
1710
+ * @return A new status bar item.
1711
+ */
1712
+ export function createCellStatusBarItem ( cell : NotebookCell , alignment ?: NotebookCellStatusBarAlignment , priority ?: number ) : NotebookCellStatusBarItem ;
1661
1713
}
1662
1714
1663
1715
//#endregion
0 commit comments