16
16
17
17
declare module 'vscode' {
18
18
19
- //#region https://github.com/microsoft/vscode/issues/106410
20
-
21
- export interface CodeActionProvider < T extends CodeAction = CodeAction > {
22
-
23
- /**
24
- * Given a code action fill in its [`edit`](#CodeAction.edit)-property, changes to
25
- * all other properties, like title, are ignored. A code action that has an edit
26
- * will not be resolved.
27
- *
28
- * *Note* that a code action provider that returns commands, not code actions, cannot successfully
29
- * implement this function. Returning commands is deprecated and instead code actions should be
30
- * returned.
31
- *
32
- * @param codeAction A code action.
33
- * @param token A cancellation token.
34
- * @return The resolved code action or a thenable that resolve to such. It is OK to return the given
35
- * `item`. When no result is returned, the given `item` will be used.
36
- */
37
- resolveCodeAction ?( codeAction : T , token : CancellationToken ) : ProviderResult < T > ;
38
- }
39
-
40
- //#endregion
41
-
42
-
43
19
// #region auth provider: https://github.com/microsoft/vscode/issues/88309
44
20
45
21
/**
@@ -167,6 +143,31 @@ declare module 'vscode' {
167
143
* provider
168
144
*/
169
145
export function logout ( providerId : string , sessionId : string ) : Thenable < void > ;
146
+
147
+ /**
148
+ * Retrieve a password that was stored with key. Returns undefined if there
149
+ * is no password matching that key.
150
+ * @param key The key the password was stored under.
151
+ */
152
+ export function getPassword ( key : string ) : Thenable < string | undefined > ;
153
+
154
+ /**
155
+ * Store a password under a given key.
156
+ * @param key The key to store the password under
157
+ * @param value The password
158
+ */
159
+ export function setPassword ( key : string , value : string ) : Thenable < void > ;
160
+
161
+ /**
162
+ * Remove a password from storage.
163
+ * @param key The key the password was stored under.
164
+ */
165
+ export function deletePassword ( key : string ) : Thenable < void > ;
166
+
167
+ /**
168
+ * Fires when a password is set or deleted.
169
+ */
170
+ export const onDidChangePassword : Event < void > ;
170
171
}
171
172
172
173
//#endregion
@@ -741,74 +742,65 @@ declare module 'vscode' {
741
742
742
743
//#region file-decorations: https://github.com/microsoft/vscode/issues/54938
743
744
744
- // TODO@jrieken FileDecoration, FileDecorationProvider etc.
745
- // TODO@jrieken Add selector notion to limit decorations to a view.
746
- // TODO@jrieken Rename `Decoration.letter` to `short` so that it could be used for coverage et al.
747
745
748
- export class Decoration {
746
+ export class FileDecoration {
749
747
750
748
/**
751
- * A letter that represents this decoration.
749
+ * A very short string that represents this decoration.
752
750
*/
753
- letter ?: string ;
751
+ badge ?: string ;
754
752
755
753
/**
756
- * The human-readable title for this decoration.
754
+ * A human-readable tooltip for this decoration.
757
755
*/
758
- title ?: string ;
756
+ tooltip ?: string ;
759
757
760
758
/**
761
759
* The color of this decoration.
762
760
*/
763
761
color ?: ThemeColor ;
764
762
765
- /**
766
- * The priority of this decoration.
767
- */
768
- priority ?: number ;
769
-
770
763
/**
771
764
* A flag expressing that this decoration should be
772
- * propagted to its parents.
765
+ * propagated to its parents.
773
766
*/
774
- bubble ?: boolean ;
767
+ propagate ?: boolean ;
775
768
776
769
/**
777
770
* Creates a new decoration.
778
771
*
779
- * @param letter A letter that represents the decoration.
780
- * @param title The title of the decoration.
772
+ * @param badge A letter that represents the decoration.
773
+ * @param tooltip The tooltip of the decoration.
781
774
* @param color The color of the decoration.
782
775
*/
783
- constructor ( letter ?: string , title ?: string , color ?: ThemeColor ) ;
776
+ constructor ( badge ?: string , tooltip ?: string , color ?: ThemeColor ) ;
784
777
}
785
778
786
779
/**
787
780
* The decoration provider interfaces defines the contract between extensions and
788
781
* file decorations.
789
782
*/
790
- export interface DecorationProvider {
783
+ export interface FileDecorationProvider {
791
784
792
785
/**
793
786
* An event to signal decorations for one or many files have changed.
794
787
*
795
788
* @see [EventEmitter](#EventEmitter
796
789
*/
797
- onDidChangeDecorations : Event < undefined | Uri | Uri [ ] > ;
790
+ onDidChange : Event < undefined | Uri | Uri [ ] > ;
798
791
799
792
/**
800
793
* Provide decorations for a given uri.
801
794
*
802
- *
803
795
* @param uri The uri of the file to provide a decoration for.
804
796
* @param token A cancellation token.
805
797
* @returns A decoration or a thenable that resolves to such.
806
798
*/
807
- provideDecoration ( uri : Uri , token : CancellationToken ) : ProviderResult < Decoration > ;
799
+ provideFileDecoration ( uri : Uri , token : CancellationToken ) : ProviderResult < FileDecoration > ;
808
800
}
809
801
810
802
export namespace window {
811
- export function registerDecorationProvider ( provider : DecorationProvider ) : Disposable ;
803
+ export function registerDecorationProvider ( provider : FileDecorationProvider ) : Disposable ;
812
804
}
813
805
814
806
//#endregion
@@ -1259,6 +1251,27 @@ declare module 'vscode' {
1259
1251
1260
1252
export type CellOutput = CellStreamOutput | CellErrorOutput | CellDisplayOutput ;
1261
1253
1254
+ export class NotebookCellOutputItem {
1255
+
1256
+ readonly mime : string ;
1257
+ readonly value : unknown ;
1258
+ readonly metadata ?: Record < string , string | number | boolean > ;
1259
+
1260
+ constructor ( mime : string , value : unknown , metadata ?: Record < string , string | number | boolean > ) ;
1261
+ }
1262
+
1263
+ //TODO@jrieken add id?
1264
+ export class NotebookCellOutput {
1265
+
1266
+ readonly outputs : NotebookCellOutputItem [ ] ;
1267
+ readonly metadata ?: Record < string , string | number | boolean > ;
1268
+
1269
+ constructor ( outputs : NotebookCellOutputItem [ ] , metadata ?: Record < string , string | number | boolean > ) ;
1270
+
1271
+ //TODO@jrieken HACK to workaround dependency issues...
1272
+ toJSON ( ) : any ;
1273
+ }
1274
+
1262
1275
export enum NotebookCellRunState {
1263
1276
Running = 1 ,
1264
1277
Idle = 2 ,
@@ -1440,14 +1453,14 @@ declare module 'vscode' {
1440
1453
export interface WorkspaceEdit {
1441
1454
replaceNotebookMetadata ( uri : Uri , value : NotebookDocumentMetadata ) : void ;
1442
1455
replaceNotebookCells ( uri : Uri , start : number , end : number , cells : NotebookCellData [ ] , metadata ?: WorkspaceEditEntryMetadata ) : void ;
1443
- replaceNotebookCellOutput ( uri : Uri , index : number , outputs : CellOutput [ ] , metadata ?: WorkspaceEditEntryMetadata ) : void ;
1456
+ replaceNotebookCellOutput ( uri : Uri , index : number , outputs : ( NotebookCellOutput | CellOutput ) [ ] , metadata ?: WorkspaceEditEntryMetadata ) : void ;
1444
1457
replaceNotebookCellMetadata ( uri : Uri , index : number , cellMetadata : NotebookCellMetadata , metadata ?: WorkspaceEditEntryMetadata ) : void ;
1445
1458
}
1446
1459
1447
1460
export interface NotebookEditorEdit {
1448
1461
replaceMetadata ( value : NotebookDocumentMetadata ) : void ;
1449
1462
replaceCells ( start : number , end : number , cells : NotebookCellData [ ] ) : void ;
1450
- replaceCellOutput ( index : number , outputs : CellOutput [ ] ) : void ;
1463
+ replaceCellOutput ( index : number , outputs : ( NotebookCellOutput | CellOutput ) [ ] ) : void ;
1451
1464
replaceCellMetadata ( index : number , metadata : NotebookCellMetadata ) : void ;
1452
1465
}
1453
1466
@@ -1497,16 +1510,6 @@ declare module 'vscode' {
1497
1510
*/
1498
1511
readonly viewColumn ?: ViewColumn ;
1499
1512
1500
- /**
1501
- * Whether the panel is active (focused by the user).
1502
- */
1503
- readonly active : boolean ;
1504
-
1505
- /**
1506
- * Whether the panel is visible.
1507
- */
1508
- readonly visible : boolean ;
1509
-
1510
1513
/**
1511
1514
* Fired when the panel is disposed.
1512
1515
*/
@@ -1685,7 +1688,7 @@ declare module 'vscode' {
1685
1688
/**
1686
1689
* Unique identifier for the backup.
1687
1690
*
1688
- * This id is passed back to your extension in `openCustomDocument ` when opening a notebook editor from a backup.
1691
+ * This id is passed back to your extension in `openNotebook ` when opening a notebook editor from a backup.
1689
1692
*/
1690
1693
readonly id : string ;
1691
1694
@@ -1739,6 +1742,10 @@ declare module 'vscode' {
1739
1742
}
1740
1743
1741
1744
export interface NotebookContentProvider {
1745
+ readonly options ?: NotebookDocumentContentOptions ;
1746
+ readonly onDidChangeNotebookContentOptions ?: Event < NotebookDocumentContentOptions > ;
1747
+ readonly onDidChangeNotebook : Event < NotebookDocumentContentChangeEvent | NotebookDocumentEditEvent > ;
1748
+
1742
1749
/**
1743
1750
* Content providers should always use [file system providers](#FileSystemProvider) to
1744
1751
* resolve the raw content for `uri` as the resouce is not necessarily a file on disk.
@@ -1747,7 +1754,6 @@ declare module 'vscode' {
1747
1754
resolveNotebook ( document : NotebookDocument , webview : NotebookCommunication ) : Promise < void > ;
1748
1755
saveNotebook ( document : NotebookDocument , cancellation : CancellationToken ) : Promise < void > ;
1749
1756
saveNotebookAs ( targetResource : Uri , document : NotebookDocument , cancellation : CancellationToken ) : Promise < void > ;
1750
- readonly onDidChangeNotebook : Event < NotebookDocumentContentChangeEvent | NotebookDocumentEditEvent > ;
1751
1757
backupNotebook ( document : NotebookDocument , context : NotebookDocumentBackupContext , cancellation : CancellationToken ) : Promise < NotebookDocumentBackup > ;
1752
1758
}
1753
1759
@@ -1840,6 +1846,7 @@ declare module 'vscode' {
1840
1846
) : Disposable ;
1841
1847
1842
1848
export function createNotebookEditorDecorationType ( options : NotebookDecorationRenderOptions ) : NotebookEditorDecorationType ;
1849
+ export function openNotebookDocument ( uri : Uri , viewType ?: string ) : Promise < NotebookDocument > ;
1843
1850
export const onDidOpenNotebookDocument : Event < NotebookDocument > ;
1844
1851
export const onDidCloseNotebookDocument : Event < NotebookDocument > ;
1845
1852
export const onDidSaveNotebookDocument : Event < NotebookDocument > ;
@@ -1848,14 +1855,6 @@ declare module 'vscode' {
1848
1855
* All currently known notebook documents.
1849
1856
*/
1850
1857
export const notebookDocuments : ReadonlyArray < NotebookDocument > ;
1851
-
1852
- export const visibleNotebookEditors : NotebookEditor [ ] ;
1853
- export const onDidChangeVisibleNotebookEditors : Event < NotebookEditor [ ] > ;
1854
-
1855
- export const activeNotebookEditor : NotebookEditor | undefined ;
1856
- export const onDidChangeActiveNotebookEditor : Event < NotebookEditor | undefined > ;
1857
- export const onDidChangeNotebookEditorSelection : Event < NotebookEditorSelectionChangeEvent > ;
1858
- export const onDidChangeNotebookEditorVisibleRanges : Event < NotebookEditorVisibleRangesChangeEvent > ;
1859
1858
export const onDidChangeNotebookDocumentMetadata : Event < NotebookDocumentMetadataChangeEvent > ;
1860
1859
export const onDidChangeNotebookCells : Event < NotebookCellsChangeEvent > ;
1861
1860
export const onDidChangeCellOutputs : Event < NotebookCellOutputsChangeEvent > ;
@@ -1884,6 +1883,15 @@ declare module 'vscode' {
1884
1883
export function createCellStatusBarItem ( cell : NotebookCell , alignment ?: NotebookCellStatusBarAlignment , priority ?: number ) : NotebookCellStatusBarItem ;
1885
1884
}
1886
1885
1886
+ export namespace window {
1887
+ export const visibleNotebookEditors : NotebookEditor [ ] ;
1888
+ export const onDidChangeVisibleNotebookEditors : Event < NotebookEditor [ ] > ;
1889
+ export const activeNotebookEditor : NotebookEditor | undefined ;
1890
+ export const onDidChangeActiveNotebookEditor : Event < NotebookEditor | undefined > ;
1891
+ export const onDidChangeNotebookEditorSelection : Event < NotebookEditorSelectionChangeEvent > ;
1892
+ export const onDidChangeNotebookEditorVisibleRanges : Event < NotebookEditorVisibleRangesChangeEvent > ;
1893
+ }
1894
+
1887
1895
//#endregion
1888
1896
1889
1897
//#region https://github.com/microsoft/vscode/issues/39441
@@ -2129,7 +2137,7 @@ declare module 'vscode' {
2129
2137
}
2130
2138
//#endregion
2131
2139
2132
- //#region
2140
+ //#region https://github.com/microsoft/vscode/issues/91697
2133
2141
2134
2142
export interface FileSystem {
2135
2143
/**
@@ -2151,24 +2159,30 @@ declare module 'vscode' {
2151
2159
2152
2160
//#endregion
2153
2161
2154
- //#region https://github.com/microsoft/vscode/issues/105667
2162
+ //#region https://github.com/microsoft/vscode/issues/103120 @alexr00
2163
+ export class ThemeIcon2 extends ThemeIcon {
2164
+
2165
+ /**
2166
+ * The id of the icon. The available icons are listed in https://microsoft.github.io/vscode-codicons/dist/codicon.html.
2167
+ */
2168
+ public readonly id : string ;
2155
2169
2156
- export interface TreeView < T > {
2157
2170
/**
2158
- * An optional human-readable description that will be rendered in the title of the view.
2159
- * Setting the title description to null, undefined, or empty string will remove the title description from the view.
2171
+ * Creates a reference to a theme icon.
2172
+ * @param id id of the icon. The available icons are listed in https://microsoft.github.io/vscode-codicons/dist/codicon.html.
2173
+ * @param color optional `ThemeColor` for the icon.
2160
2174
*/
2161
- description ? : string | undefined ;
2175
+ constructor ( id : string , color ?: ThemeColor ) ;
2162
2176
}
2163
2177
//#endregion
2164
2178
2165
- //#region https://github.com/microsoft/vscode/issues/103120 @alexr00
2166
- export class ThemeIcon2 extends ThemeIcon {
2179
+ //#region https://github.com/microsoft/vscode/issues/102665 Comment API @rebornix
2180
+ export interface CommentThread {
2167
2181
/**
2168
- * Returns a new `ThemeIcon` that will use the specified `ThemeColor`
2169
- * @param color The `ThemeColor` to use for the icon .
2182
+ * Whether the thread supports reply.
2183
+ * Defaults to true .
2170
2184
*/
2171
- with ( color : ThemeColor ) : ThemeIcon2 ;
2185
+ canReply : boolean ;
2172
2186
}
2173
2187
//#endregion
2174
2188
}
0 commit comments