import { Event } from "../../../../../../base/common/event.js"; import { ILanguageService } from "../../../../../../editor/common/languages/language.service.js"; import { IModelService } from "../../../../../../editor/common/services/model.service.js"; import { ITextModelService } from "../../../../../../editor/common/services/resolverService.service.js"; import { IHoverService } from "../../../../../../platform/hover/browser/hover.service.js"; import { ILabelService } from "../../../../../../platform/label/common/label.service.js"; import { IEditorService } from "../../../../../services/editor/common/editorService.service.js"; import { IChatExternalEdit } from "../../../common/chatService/chatService.js"; import { IChatRendererContent } from "../../../common/model/chatViewModel.js"; import { ChatTreeItem } from "../../chat.js"; import { ChatEditPillElement } from "./chatEditPillElement.js"; import { IChatContentPart, IChatContentPartDiffData, IChatContentPartRenderContext } from "./chatContentParts.js"; /** * Renders an {@link IChatExternalEdit} progress part as a static "edit pill". * * Unlike {@link CollapsedCodeBlock}, this part receives all of its data * (URI, edit kind, diff stats, before/after content URIs) up-front from the * producer (the agent host) and never reads from an * {@link IChatEditingSession}. It exists because agent hosts already know * the diff metadata for a completed tool call and there's no value in * re-deriving it through the chat editing pipeline. * * Activation (click / Enter) opens the side-by-side diff editor when both * `beforeContentUri` and `afterContentUri` are present, falling back to * opening the resulting file otherwise. A pure addition into an empty (or * non-existent) original is treated as the fallback case, since there is * nothing meaningful to diff against. */ export declare class ChatExternalEditContentPart extends ChatEditPillElement implements IChatContentPart { private readonly edit; private readonly editorService; private readonly textModelService; private readonly _onDidChangeDiff; /** * Fires once with the static diff data from the part data. Wired up by * the list renderer so {@link ChatThinkingContentPart} can aggregate * per-file changes into the thinking title. * * The fire is deferred to the next microtask so that consumers * subscribing immediately after construction (e.g. via * `ChatThinkingContentPart.appendItem`) still receive the initial value. */ readonly onDidChangeDiff: Event; private _diffData; /** The static diff data, readable before the deferred change event fires. */ get diffData(): IChatContentPartDiffData | undefined; get domNode(): HTMLElement; constructor(edit: IChatExternalEdit, _context: IChatContentPartRenderContext, labelService: ILabelService, modelService: IModelService, languageService: ILanguageService, hoverService: IHoverService, editorService: IEditorService, textModelService: ITextModelService); private render; private openEdit; hasSameContent(other: IChatRendererContent, _followingContent: IChatRendererContent[], _element: ChatTreeItem): boolean; }