@@ -96,7 +96,7 @@ declare module 'vscode' {
9696
9797 export interface NotebookCellMetadata {
9898 /**
99- * Controls if the content of a cell is editable or not .
99+ * Controls whether a cell's editor is editable/readonly .
100100 */
101101 editable ?: boolean ;
102102
@@ -245,10 +245,16 @@ declare module 'vscode' {
245245 contains ( uri : Uri ) : boolean
246246 }
247247
248+ export interface WorkspaceEdit {
249+ replaceCells ( uri : Uri , start : number , end : number , cells : NotebookCellData [ ] , metadata ?: WorkspaceEditEntryMetadata ) : void ;
250+ replaceCellOutput ( uri : Uri , index : number , outputs : CellOutput [ ] , metadata ?: WorkspaceEditEntryMetadata ) : void ;
251+ replaceCellMetadata ( uri : Uri , index : number , cellMetadata : NotebookCellMetadata , metadata ?: WorkspaceEditEntryMetadata ) : void ;
252+ }
253+
248254 export interface NotebookEditorCellEdit {
249255
250- replaceCells ( from : number , to : number , cells : NotebookCellData [ ] ) : void ;
251- replaceOutputs ( index : number , outputs : CellOutput [ ] ) : void ;
256+ replaceCells ( start : number , end : number , cells : NotebookCellData [ ] ) : void ;
257+ replaceOutput ( index : number , outputs : CellOutput [ ] ) : void ;
252258 replaceMetadata ( index : number , metadata : NotebookCellMetadata ) : void ;
253259
254260 /** @deprecated */
@@ -523,6 +529,35 @@ declare module 'vscode' {
523529 resolveKernel ?( kernel : T , document : NotebookDocument , webview : NotebookCommunication , token : CancellationToken ) : ProviderResult < void > ;
524530 }
525531
532+ /**
533+ * Represents the alignment of status bar items.
534+ */
535+ export enum NotebookCellStatusBarAlignment {
536+
537+ /**
538+ * Aligned to the left side.
539+ */
540+ Left = 1 ,
541+
542+ /**
543+ * Aligned to the right side.
544+ */
545+ Right = 2
546+ }
547+
548+ export interface NotebookCellStatusBarItem {
549+ readonly cell : NotebookCell ;
550+ readonly alignment : NotebookCellStatusBarAlignment ;
551+ readonly priority ?: number ;
552+ text : string ;
553+ tooltip : string | undefined ;
554+ command : string | Command | undefined ;
555+ accessibilityInformation ?: AccessibilityInformation ;
556+ show ( ) : void ;
557+ hide ( ) : void ;
558+ dispose ( ) : void ;
559+ }
560+
526561 export namespace notebook {
527562 export function registerNotebookContentProvider (
528563 notebookType : string ,
@@ -580,6 +615,17 @@ declare module 'vscode' {
580615 export function createConcatTextDocument ( notebook : NotebookDocument , selector ?: DocumentSelector ) : NotebookConcatTextDocument ;
581616
582617 export const onDidChangeActiveNotebookKernel : Event < { document : NotebookDocument , kernel : NotebookKernel | undefined } > ;
618+
619+ /**
620+ * Creates a notebook cell status bar [item](#NotebookCellStatusBarItem).
621+ * It will be disposed automatically when the notebook document is closed or the cell is deleted.
622+ *
623+ * @param cell The cell on which this item should be shown.
624+ * @param alignment The alignment of the item.
625+ * @param priority The priority of the item. Higher values mean the item should be shown more to the left.
626+ * @return A new status bar item.
627+ */
628+ export function createCellStatusBarItem ( cell : NotebookCell , alignment ?: NotebookCellStatusBarAlignment , priority ?: number ) : NotebookCellStatusBarItem ;
583629 }
584630
585631 //#endregion
0 commit comments