import type * as vscode from 'vscode'; import { Uri } from '../../util/common/test/shims/vscodeTypesShim'; import { URI } from '../vs/base/common/uri'; export interface INotebookSection { title: string; content: string; } export interface INotebookOutline { description: string; sections: INotebookSection[]; } export interface INotebookExclusiveDocumentFilter { include?: string | vscode.RelativePattern; exclude?: string | vscode.RelativePattern; } export interface INotebookFilenamePattern { filenamePattern: string; excludeFileNamePattern?: string; } export type NotebookSelector = vscode.GlobPattern | INotebookExclusiveDocumentFilter | INotebookFilenamePattern; export declare enum RegisteredEditorPriority { builtin = "builtin", option = "option", exclusive = "exclusive", default = "default" } export interface INotebookEditorContribution { readonly type: string; readonly displayName: string; readonly priority?: RegisteredEditorPriority; selector: NotebookSelector[]; } export interface EditorAssociation { viewType: string; filenamePattern?: string; } /** * Find a notebook document by uri or cell uri. */ export declare function findNotebook(uri: vscode.Uri, notebookDocuments: readonly vscode.NotebookDocument[]): vscode.NotebookDocument | undefined; export declare function findCell(cellUri: vscode.Uri, notebook: vscode.NotebookDocument): vscode.NotebookCell | undefined; export declare function getNotebookCellOutput(outputUri: Uri, notebookDocuments: readonly vscode.NotebookDocument[]): [vscode.NotebookDocument, vscode.NotebookCell, vscode.NotebookCellOutput] | undefined; export declare function getNotebookAndCellFromUri(uri: Uri, notebookDocuments: readonly vscode.NotebookDocument[]): [undefined, undefined] | [vscode.NotebookDocument, vscode.NotebookCell | undefined]; export declare function isNotebookCellOrNotebookChatInput(uri: vscode.Uri): boolean; export declare function isNotebookCell(uri: vscode.Uri): boolean; export declare function isJupyterNotebookUri(uri: vscode.Uri): boolean; export declare function isJupyterNotebook(notebook: vscode.NotebookDocument): boolean; export declare function serializeNotebookDocument(document: vscode.NotebookDocument, features?: { cell_uri_fragment?: boolean; }): string; export declare function extractNotebookOutline(response: string): INotebookOutline | undefined; /** * Checks if the provided pattern is a document exclude pattern */ export declare function isDocumentExcludePattern(pattern: string | vscode.RelativePattern | INotebookExclusiveDocumentFilter | INotebookFilenamePattern): pattern is INotebookExclusiveDocumentFilter; /** * Checks if the provided pattern is a filename pattern */ export declare function isFilenamePattern(pattern: string | vscode.RelativePattern | INotebookExclusiveDocumentFilter | INotebookFilenamePattern): pattern is INotebookFilenamePattern; /**a * Checks if the provided object is a RelativePattern */ export declare function isRelativePattern(obj: unknown): obj is vscode.RelativePattern; /** * Checks if the provided object is a valid INotebookEditorContribution */ export declare function isNotebookEditorContribution(contrib: unknown): contrib is INotebookEditorContribution; /** * Extracts editor associations from the raw editor association config object * * @param raw The raw editor association config object * @returns An array of EditorAssociation objects */ export declare function extractEditorAssociation(raw: { [fileNamePattern: string]: string; }): EditorAssociation[]; /** * Checks if a resource matches a selector */ export declare function notebookSelectorMatches(resource: URI, selector: NotebookSelector): boolean; /** * Returns all associations that match the glob of the provided resource */ export declare function getNotebookEditorAssociations(resource: Uri, editorAssociations: EditorAssociation[]): EditorAssociation[]; /** * Checks if the provided resource has a supported notebook provider */ export declare function _hasSupportedNotebooks(uri: Uri, workspaceNotebookDocuments: readonly vscode.NotebookDocument[], notebookEditorContributions: INotebookEditorContribution[], editorAssociations: EditorAssociation[]): boolean; //# sourceMappingURL=notebooks.d.ts.map