import { type MarkdownRenderOptions } from "@codingame/monaco-vscode-api/vscode/vs/base/browser/markdownRenderer"; import { Disposable, IDisposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle"; import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri"; import { IMarkdownRenderer } from "@codingame/monaco-vscode-api/vscode/vs/platform/markdown/browser/markdownRenderer"; import { ILanguageService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/languages/language.service"; import { IModelService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/services/model.service"; import { ITextModelService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/services/resolverService.service"; import { IMenuService } from "@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions.service"; import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service"; import { IContextKeyService } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service"; import { IContextMenuService } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextview/browser/contextView.service"; import { IHoverService } from "@codingame/monaco-vscode-api/vscode/vs/platform/hover/browser/hover.service"; import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation"; import { ILabelService } from "@codingame/monaco-vscode-api/vscode/vs/platform/label/common/label.service"; import { IEditorService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service"; import { IAiEditTelemetryService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/editTelemetry/browser/telemetry/aiEditTelemetry/aiEditTelemetryService.service"; import { IChatProgressRenderableResponseContent } from "@codingame/monaco-vscode-2339d6ac-d6bb-53cd-95ee-81911735d1c7-common/vscode/vs/workbench/contrib/chat/common/chatModel"; import { IChatMarkdownContent } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService"; import { IChatService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService.service"; import { CodeBlockModelCollection } from "../../common/codeBlockModelCollection.js"; import { IChatCodeBlockInfo } from "@codingame/monaco-vscode-2339d6ac-d6bb-53cd-95ee-81911735d1c7-common/vscode/vs/workbench/contrib/chat/browser/chat"; import { IChatRendererDelegate } from "../chatListRenderer.js"; import { ChatEditorOptions } from "../chatOptions.js"; import { CodeBlockPart, ICodeBlockRenderOptions } from "../codeBlockPart.js"; import { IDisposableReference } from "./chatCollections.js"; import { IChatContentPart, IChatContentPartRenderContext } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chatContentParts/chatContentParts"; export interface IChatMarkdownContentPartOptions { readonly codeBlockRenderOptions?: ICodeBlockRenderOptions; readonly accessibilityOptions?: { /** * Message to announce to screen readers as a status update if VerboseChatProgressUpdates is enabled. * Will also be used as the aria-label for the container. * */ statusMessage?: string; }; } export declare class ChatMarkdownContentPart extends Disposable implements IChatContentPart { private readonly markdown; private readonly editorPool; private readonly codeBlockModelCollection; private readonly rendererOptions; private readonly textModelService; private readonly instantiationService; private readonly aiEditTelemetryService; private static ID_POOL; readonly codeblocksPartId: string; readonly domNode: HTMLElement; private readonly allRefs; private readonly _onDidChangeHeight; readonly onDidChangeHeight: import("@codingame/monaco-vscode-api/vscode/vs/base/common/event").Event; readonly codeblocks: IChatCodeBlockInfo[]; private readonly mathLayoutParticipants; constructor(markdown: IChatMarkdownContent, context: IChatContentPartRenderContext, editorPool: EditorPool, fillInIncompleteTokens: boolean | undefined, codeBlockStartIndex: number | undefined, renderer: IMarkdownRenderer, markdownRenderOptions: MarkdownRenderOptions | undefined, currentWidth: number, codeBlockModelCollection: CodeBlockModelCollection, rendererOptions: IChatMarkdownContentPartOptions, contextKeyService: IContextKeyService, configurationService: IConfigurationService, textModelService: ITextModelService, instantiationService: IInstantiationService, aiEditTelemetryService: IAiEditTelemetryService); private renderCodeBlockPill; private renderCodeBlock; hasSameContent(other: IChatProgressRenderableResponseContent): boolean; layout(width: number): void; addDisposable(disposable: IDisposable): void; } export declare class EditorPool extends Disposable { private readonly isSimpleWidget; private readonly _pool; inUse(): Iterable; constructor(options: ChatEditorOptions, delegate: IChatRendererDelegate, overflowWidgetsDomNode: HTMLElement | undefined, isSimpleWidget: boolean | undefined, instantiationService: IInstantiationService); get(): IDisposableReference; } export declare function codeblockHasClosingBackticks(str: string): boolean; export declare class CollapsedCodeBlock extends Disposable { private readonly sessionResource; private readonly requestId; private readonly inUndoStop; private readonly labelService; private readonly editorService; private readonly modelService; private readonly languageService; private readonly contextMenuService; private readonly contextKeyService; private readonly menuService; private readonly hoverService; private readonly chatService; readonly element: HTMLElement; private _uri; get uri(): URI | undefined; private readonly hover; private tooltip; private currentDiff; private readonly progressStore; constructor(sessionResource: URI, requestId: string, inUndoStop: string | undefined, labelService: ILabelService, editorService: IEditorService, modelService: IModelService, languageService: ILanguageService, contextMenuService: IContextMenuService, contextKeyService: IContextKeyService, menuService: IMenuService, hoverService: IHoverService, chatService: IChatService); private registerListeners; private showDiff; /** * @param uri URI of the file on-disk being changed * @param isStreaming Whether the edit has completed (at the time of this being rendered) */ render(uri: URI, fromSubagent?: boolean): void; private updateTooltip; }