import { ILogService } from "../../../../../platform/log/common/log.service.js"; import { Themable } from "../../../../../platform/theme/common/themeService.js"; import { IThemeService } from "../../../../../platform/theme/common/themeService.service.js"; import { ISharedWebContentExtractorService } from "../../../../../platform/webContentExtractor/common/webContentExtractor.service.js"; import { IExtensionService } from "../../../../services/extensions/common/extensions.service.js"; import { IChatAttachmentTarget, IChatWidget } from "../chat.js"; import { IChatAttachmentResolveService } from "../attachments/chatAttachmentResolveService.service.js"; import { IChatInputStyles } from "./input/chatInputPart.js"; export declare class ChatDragAndDrop extends Themable { private readonly widgetRef; private readonly attachmentTarget; private readonly styles; private readonly extensionService; private readonly webContentExtractorService; private readonly logService; private readonly chatAttachmentResolveService; private readonly overlays; private overlayText?; private overlayTextBackground; private disableOverlay; /** * In-process transfer for a dragged chat reference. Readable during * `dragover` (unlike the `dataTransfer` mime payload), so the self-reference * guard can suppress the overlay when a chat is dragged onto its own input. */ private readonly chatReferenceTransfer; constructor(widgetRef: () => IChatWidget | undefined, attachmentTarget: IChatAttachmentTarget, styles: IChatInputStyles, themeService: IThemeService, extensionService: IExtensionService, webContentExtractorService: ISharedWebContentExtractorService, logService: ILogService, chatAttachmentResolveService: IChatAttachmentResolveService); addOverlay(target: HTMLElement, overlayContainer: HTMLElement, inputTarget?: HTMLElement): void; removeOverlay(target: HTMLElement): void; setDisabledOverlay(disable: boolean): void; private currentActiveTarget; private createOverlay; private onDragEnter; private onDragLeave; private onDrop; private drop; private updateDropFeedback; private guessDropType; /** * Resolves the drop type for a dragged chat reference. Only agent-host-backed * chat inputs can reference another chat, and a chat may reference any other * chat of the *same agent host* — including one from a different session shown * side by side in the Agents window. * * Two payload-dependent guards suppress the overlay entirely (rather than * appearing droppable and then doing nothing): * - a self-reference (a chat dropped onto its *own* input), and * - a cross-agent-host reference, which the owning host could never resolve. * * The dragged chat's client resource is read from the in-process * {@link LocalSelectionTransfer} (readable during `dragover`) with the * `dataTransfer` mime payload as a fallback (readable on `drop`), and compared * against this input's own client session resource. Both are opaque client * URIs, so the workbench never touches an AHP chat URI. */ private guessChatReferenceDropType; /** * The client resource of the dragged chat reference (used only for * self-reference identity comparison). Prefers the in-process local transfer * (available during `dragover`), falling back to the `dataTransfer` mime * payload (only readable on `drop`). Returns `undefined` when neither source * carries a chat reference. */ private getDraggedClientResource; private isDragEventSupported; private getDropTypeName; private resolveAttachmentsFromDragEvent; /** * Resolves a dropped chat reference (a chat tab from the Agents window) to a * plain chat-reference attachment (a pill) — the same shape every other drop * type produces, with no inline text, range, or editor manipulation. * * The target must be an agent-host-backed input; the actual resolution and * the self / cross-agent-host guards live in {@link resolveChatReferenceDropEntry}. * Returns `[]` when any guard rejects. */ private resolveChatReferenceAttachContext; private downloadImageAsUint8Array; private resolveHTMLAttachContext; private setOverlay; private getOverlayText; private updateOverlayStyles; updateStyles(): void; }