/** * Reads the target a rendered chat anchor points at. Clicks route through `data-href`, so that * attribute carries the semantic target while `href` may be empty or a copy-safe duplicate. */ export declare function getLinkTarget(element: Element): string; /** * Clones a selected range of rendered chat content along with the elements it sits inside, up to * `root`. `cloneContents` returns only what lies between the range boundaries, which drops both * the heading or list item giving the text its shape and, for a partly selected link, the rest of * its label. Elements the reader cannot see, such as a hidden file changes summary or the * stylesheet a list embeds, are left out, just as they are from the selected text, and so are * toolbars. */ export declare function cloneVisibleSelection(range: Range, root: Node): DocumentFragment; /** * Rewrites a copied chat selection so it stays useful outside this window, replacing links and * images that only resolve here with the text the reader saw. Returns whether anything changed. */ export declare function sanitizeChatClipboardFragment(fragment: DocumentFragment): boolean; /** * Rewrites markdown so it can be shared outside this window. Chat responses address workspace * resources with targets that only mean something here — agent host sessions are even * instructed to emit absolute filesystem paths — so links and images that don't resolve * elsewhere are reduced to the text the reader saw. * * Raw HTML is left verbatim. Chat markdown is rendered without `supportHtml`, so a tag the model * wrote was never a live link, and rewriting its attributes would corrupt text the reader saw. */ export declare function toPortableMarkdown(markdown: string): string;