import { Emitter, Event, PauseableEmitter } from "../../../../../base/common/event.js"; import { ICodeEditorService } from "../../../../../editor/browser/services/codeEditorService.service.js"; import * as editorCommon from "../../../../../editor/common/editorCommon.js"; import { ITextModelService } from "../../../../../editor/common/services/resolverService.service.js"; import { IConfigurationService } from "../../../../../platform/configuration/common/configuration.service.js"; import { IUndoRedoService } from "../../../../../platform/undoRedo/common/undoRedo.service.js"; import { CellFindMatch, CodeCellLayoutChangeEvent, CodeCellLayoutInfo, ICellOutputViewModel, ICellViewModel } from "../notebookBrowser.js"; import { NotebookOptionsChangeEvent } from "../notebookOptions.js"; import { NotebookLayoutInfo } from "../notebookViewEvents.js"; import { ViewContext } from "./viewContext.js"; import { NotebookCellTextModel } from "../../common/model/notebookCellTextModel.js"; import { CellKind, INotebookFindOptions, NotebookCellOutputsSplice } from "../../common/notebookCommon.js"; import { ICellExecutionError, ICellExecutionStateChangedEvent } from "../../common/notebookExecutionStateService.js"; import { INotebookService } from "../../common/notebookService.service.js"; import { BaseCellViewModel } from "./baseCellViewModel.js"; import { IInlineChatSessionService } from "../../../inlineChat/browser/inlineChatSessionService.service.js"; export declare const outputDisplayLimit = 500; export declare class CodeCellViewModel extends BaseCellViewModel implements ICellViewModel { readonly viewContext: ViewContext; private readonly _notebookService; readonly cellKind = CellKind.Code; protected readonly _onLayoutInfoRead: Emitter; readonly onLayoutInfoRead: Event; protected readonly _onDidStartExecution: Emitter; readonly onDidStartExecution: Event; protected readonly _onDidStopExecution: Emitter; readonly onDidStopExecution: Event; protected readonly _onDidChangeOutputs: Emitter; readonly onDidChangeOutputs: Event; private readonly _onDidRemoveOutputs; readonly onDidRemoveOutputs: Event; private _outputCollection; private _outputsTop; protected _pauseableEmitter: PauseableEmitter; readonly onDidChangeLayout: Event; private _editorHeight; set editorHeight(height: number); get editorHeight(): number; private _chatHeight; set chatHeight(height: number); get chatHeight(): number; private _hoveringOutput; get outputIsHovered(): boolean; set outputIsHovered(v: boolean); private _focusOnOutput; get outputIsFocused(): boolean; set outputIsFocused(v: boolean); private _focusInputInOutput; get inputInOutputIsFocused(): boolean; set inputInOutputIsFocused(v: boolean); private _outputMinHeight; private get outputMinHeight(); /** * The minimum height of the output region. It's only set to non-zero temporarily when replacing an output with a new one. * It's reset to 0 when the new output is rendered, or in one second. */ private set outputMinHeight(value); private _layoutInfo; get layoutInfo(): CodeCellLayoutInfo; private _outputViewModels; get outputsViewModels(): ICellOutputViewModel[]; readonly executionErrorDiagnostic: import("../../../../../base/common/observable.js").ISettableObservable; constructor(viewType: string, model: NotebookCellTextModel, initialNotebookLayoutInfo: NotebookLayoutInfo | null, viewContext: ViewContext, configurationService: IConfigurationService, _notebookService: INotebookService, modelService: ITextModelService, undoRedoService: IUndoRedoService, codeEditorService: ICodeEditorService, inlineChatSessionService: IInlineChatSessionService); updateExecutionState(e: ICellExecutionStateChangedEvent): void; updateOptions(e: NotebookOptionsChangeEvent): void; pauseLayout(): void; resumeLayout(): void; layoutChange(state: CodeCellLayoutChangeEvent, source?: string): void; private _fireOnDidChangeLayout; restoreEditorViewState(editorViewStates: editorCommon.ICodeEditorViewState | null, totalHeight?: number): void; getDynamicHeight(): number; getHeight(lineHeight: number): number; private estimateEditorHeight; private computeTotalHeight; protected onDidChangeTextModelContent(): void; onDeselect(): void; updateOutputShowMoreContainerHeight(height: number): void; updateOutputMinHeight(height: number): void; unlockOutputHeight(): void; updateOutputHeight(index: number, height: number, source?: string): void; getOutputOffsetInContainer(index: number): number; getOutputOffset(index: number): number; spliceOutputHeights(start: number, deleteCnt: number, heights: number[]): void; private _ensureOutputsTop; private readonly _hasFindResult; readonly hasFindResult: Event; startFind(value: string, options: INotebookFindOptions): CellFindMatch | null; dispose(): void; }