Path: blob/main/src/vs/workbench/contrib/chat/browser/chatContentParts/chatContentParts.ts
3296 views
/*---------------------------------------------------------------------------------------------1* Copyright (c) Microsoft Corporation. All rights reserved.2* Licensed under the MIT License. See License.txt in the project root for license information.3*--------------------------------------------------------------------------------------------*/45import { IDisposable } from '../../../../../base/common/lifecycle.js';6import { ChatTreeItem, IChatCodeBlockInfo } from '../chat.js';7import { IChatRendererContent } from '../../common/chatViewModel.js';89export interface IChatContentPart extends IDisposable {10domNode: HTMLElement | undefined;1112/**13* Used to indicate a part's ownership of a code block.14*/15codeblocksPartId?: string;1617/**18* Codeblocks that were rendered by this part into CodeBlockModelCollection.19*/20codeblocks?: IChatCodeBlockInfo[];2122/**23* Returns true if the other content is equivalent to what is already rendered in this content part.24* Returns false if a rerender is needed.25* followingContent is all the content that will be rendered after this content part (to support progress messages' behavior).26*/27hasSameContent(other: IChatRendererContent, followingContent: IChatRendererContent[], element: ChatTreeItem): boolean;2829addDisposable?(disposable: IDisposable): void;30}3132export interface IChatContentPartRenderContext {33readonly element: ChatTreeItem;34readonly elementIndex: number;35readonly container: HTMLElement;36readonly content: ReadonlyArray<IChatRendererContent>;37readonly contentIndex: number;38readonly preceedingContentParts: ReadonlyArray<IChatContentPart>;39}404142