import { ChatResponseContent, CodeChatResponseContent } from '@theia/ai-chat/lib/common'; import { UntitledResourceResolver } from '@theia/core'; import { ClipboardService } from '@theia/core/lib/browser/clipboard-service'; import { ThemeService } from '@theia/core/lib/browser/theming'; import { ReactNode } from '@theia/core/shared/react'; import { MonacoEditorProvider } from '@theia/monaco/lib/browser/monaco-editor-provider'; import { ChatResponsePartRenderer } from '../chat-response-part-renderer.js'; import { ResponseNode } from '../chat-tree-view/chat-view-tree-widget.js'; /** * Renders a `mermaid` code block (```` ```mermaid ````) as a diagram instead of plain code. * * The default {@link CodePartRenderer} already turns the fenced block into a {@link CodeChatResponseContent} * with `language === 'mermaid'`. This renderer simply claims those parts with a higher priority and renders * the diagram via {@link MermaidViewer}. Anything that cannot be rendered (incomplete stream, invalid * definition) transparently falls back to the regular code view. */ export declare class MermaidPartRenderer implements ChatResponsePartRenderer { protected readonly editorProvider: MonacoEditorProvider; protected readonly untitledResourceResolver: UntitledResourceResolver; protected readonly themeService: ThemeService; protected readonly clipboardService: ClipboardService; canHandle(response: ChatResponseContent): number; render(response: CodeChatResponseContent, parentNode: ResponseNode): ReactNode; } //# sourceMappingURL=mermaid-part-renderer.d.ts.map