import { IRenderMimeRegistry } from '@jupyterlab/rendermime'; import type { TranslationBundle } from '@jupyterlab/translation'; import type { CommandRegistry } from '@lumino/commands'; import type { ReadonlyPartialJSONValue } from '@lumino/coreutils'; import type { Message } from '@lumino/messaging'; import { Panel } from '@lumino/widgets'; /** * A rich visual embedded in a step (rendered through the rendermime registry). */ export interface IWalkthroughMedia { mimeType: string; data: ReadonlyPartialJSONValue; } /** * One step of a walkthrough. Every field is optional, but a step needs at least one. */ export interface IWalkthroughStep { title?: string; body?: string; media?: IWalkthroughMedia; path?: string; line?: number; endLine?: number; } export declare namespace WalkthroughPanel { interface IOptions { rendermime: IRenderMimeRegistry; commands: CommandRegistry; trans: TranslationBundle; } } /** * A read-only, scrollable column of walkthrough steps for the side area. * * The agent appends steps as it narrates, so the explanation lives beside the * code the user is looking at and persists for them to read at their own pace, * rather than scrolling away in the chat. Each step renders Markdown (with code * snippets, Mermaid, math), can embed a rich visual, and can offer a button * that opens the referenced file and highlights its lines. */ export declare class WalkthroughPanel extends Panel { constructor(options: WalkthroughPanel.IOptions); /** * Remove every step, leaving an empty panel. */ clear(): void; /** * Dispose on close (e.g. the close button when the panel has been dragged to * the main area) rather than leaving a detached, reusable widget behind. The * next `xtralab:walkthrough` call recreates the panel in the side area. */ protected onCloseRequest(msg: Message): void; /** * Append a step and scroll it into view. */ addStep(step: IWalkthroughStep): Promise; private _render; private _jumpButton; private _rendermime; private _commands; private _trans; }