import type { ChatRequest, NotebookCell, NotebookDocument, Uri } from 'vscode'; import { NotebookCellData, NotebookCellKind } from '../../../util/common/test/shims/vscodeTypesShim'; import { INotebookService } from './notebookService'; export declare class LineOfText { readonly __lineOfTextBrand: void; readonly value: string; constructor(value: string); } /** End of Line for alternative Notebook contnt is always \n */ export declare const EOL = "\n"; export type LineOfCellText = { type: 'start'; /** * The cell index of the cell that this line belongs to. */ index: number; id?: string; /** * The Uri of the cell that this line belongs to. * Undefined if this is a cell that doesn't belong in the actual notebook. */ uri?: Uri; /** * Language of the cell. */ language?: string; /** * The type of cell. */ kind: NotebookCellKind; } | { type: 'line'; /** * A line of text from a cell. Does not include the newline character. */ line: string; /** * The cell index of the cell that this line belongs to. */ index: number; } | { type: 'end'; /** * * The cell index of the cell that this line belongs to. */ index: number; }; export type SummaryCell = { cell_type: 'code' | 'markdown'; language: string; id: string; source: string[]; index: number; }; export declare function summarize(cell: NotebookCell): SummaryCell; export declare function notebookCellToCellData(cell: NotebookCell): NotebookCellData; export declare function getCellIdMap(notebook: NotebookDocument): Map; /** RegExp to match all Cell Ids */ export declare const CellIdPatternRe: RegExp; /** * Sometimes the model may return a cellId that is not in the expected format. * This function attempts to convert such cellIds to the expected format. */ export declare function normalizeCellId(cellId: string): string; export declare function getNotebookId(notebook: NotebookDocument): string; /** * Given a Notebook cell returns a unique identifier for the cell. * The identifier is based on the cell's URI and is cached for performance. * This is useful for tracking cells across sessions or for referencing cells in a consistent manner. * The cell Id will have a specicial prefix as well do as to easily identify it as a cell Id. */ export declare function getCellId(cell: NotebookCell): string; export declare function getDefaultLanguage(notebook: NotebookDocument): string | undefined; export declare function requestHasNotebookRefs(request: ChatRequest, notebookService: INotebookService, options?: { checkPromptAsWell: boolean; }): boolean; export declare function parseAndCleanStack(jsonString: string): string; //# sourceMappingURL=helpers.d.ts.map