Merge from vscode 0a7364f00514c46c9caceece15e1f82f82e3712f

This commit is contained in:
ADS Merger
2020-07-22 03:06:57 +00:00
parent 53ec7585a9
commit 1b7b54ce14
229 changed files with 5099 additions and 3188 deletions

View File

@@ -18,7 +18,7 @@ declare module 'vscode' {
// #region auth provider: https://github.com/microsoft/vscode/issues/88309
export class AuthenticationSession {
export interface AuthenticationSession {
/**
* The identifier of the authentication session.
*/
@@ -39,8 +39,6 @@ declare module 'vscode' {
* are defined by the authentication provider.
*/
readonly scopes: ReadonlyArray<string>;
constructor(id: string, accessToken: string, account: AuthenticationSessionAccountInformation, scopes: string[]);
}
/**
@@ -104,7 +102,7 @@ declare module 'vscode' {
clearSessionPreference?: boolean;
}
export interface AuthenticationProviderAuthenticationSessionsChangeEvent extends AuthenticationSessionsChangeEvent {
export interface AuthenticationProviderAuthenticationSessionsChangeEvent {
/**
* The [authenticationProvider](#AuthenticationProvider) that has had its sessions change.
*/
@@ -212,17 +210,6 @@ declare module 'vscode' {
*/
export const providers: ReadonlyArray<AuthenticationProviderInformation>;
/**
* Returns whether a provider has any sessions matching the requested scopes. This request
* is transparent to the user, no UI is shown. Rejects if a provider with providerId is not
* registered.
* @param providerId The id of the provider
* @param scopes A list of scopes representing the permissions requested. These are dependent on the authentication
* provider
* @returns A thenable that resolve to whether the provider has sessions with the requested scopes.
*/
export function hasSessions(providerId: string, scopes: string[]): Thenable<boolean>;
/**
* Get an authentication session matching the desired scopes. Rejects if a provider with providerId is not
* registered, or if the user does not consent to sharing authentication information with
@@ -1436,6 +1423,11 @@ declare module 'vscode' {
Error = 4
}
export enum NotebookRunState {
Running = 1,
Idle = 2
}
export interface NotebookCellMetadata {
/**
* Controls if the content of a cell is editable or not.
@@ -1538,6 +1530,11 @@ declare module 'vscode' {
* Additional attributes of the document metadata.
*/
custom?: { [key: string]: any };
/**
* The document's current run state
*/
runState?: NotebookRunState;
}
export interface NotebookDocument {
@@ -1552,6 +1549,7 @@ declare module 'vscode' {
}
export interface NotebookConcatTextDocument {
uri: Uri;
isClosed: boolean;
dispose(): void;
onDidChange: Event<void>;
@@ -1605,6 +1603,11 @@ declare module 'vscode' {
*/
readonly onDidDispose: Event<void>;
/**
* Active kernel used in the editor
*/
readonly kernel?: NotebookKernel;
/**
* Fired when the output hosting webview posts a message.
*/
@@ -1834,10 +1837,27 @@ declare module 'vscode' {
}
export interface NotebookKernel {
readonly id?: string;
label: string;
description?: string;
isPreferred?: boolean;
preloads?: Uri[];
executeCell(document: NotebookDocument, cell: NotebookCell, token: CancellationToken): Promise<void>;
executeAllCells(document: NotebookDocument, token: CancellationToken): Promise<void>;
executeCell(document: NotebookDocument, cell: NotebookCell): void;
cancelCellExecution(document: NotebookDocument, cell: NotebookCell): void;
executeAllCells(document: NotebookDocument): void;
cancelAllCellsExecution(document: NotebookDocument): void;
}
export interface NotebookDocumentFilter {
viewType?: string;
filenamePattern?: GlobPattern;
excludeFileNamePattern?: GlobPattern;
}
export interface NotebookKernelProvider<T extends NotebookKernel = NotebookKernel> {
onDidChangeKernels?: Event<void>;
provideKernels(document: NotebookDocument, token: CancellationToken): ProviderResult<T[]>;
resolveKernel?(kernel: T, document: NotebookDocument, webview: NotebookCommunication, token: CancellationToken): ProviderResult<void>;
}
export namespace notebook {
@@ -1846,6 +1866,11 @@ declare module 'vscode' {
provider: NotebookContentProvider
): Disposable;
export function registerNotebookKernelProvider(
selector: NotebookDocumentFilter,
provider: NotebookKernelProvider
): Disposable;
export function registerNotebookKernel(
id: string,
selectors: GlobPattern[],
@@ -1882,6 +1907,8 @@ declare module 'vscode' {
* @param selector
*/
export function createConcatTextDocument(notebook: NotebookDocument, selector?: DocumentSelector): NotebookConcatTextDocument;
export const onDidChangeActiveNotebookKernel: Event<{ document: NotebookDocument, kernel: NotebookKernel | undefined }>;
}
//#endregion