import type { InjectFace, PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots'; import { type ReferenceLink } from './reference-links.ts'; /** The attribute this bridge sets on a chip it can open (hover affordance hook). */ export declare const LINK_ATTRIBUTE = "data-dsh-atlas-link"; /** The attribute this bridge sets on a chip whose target is gone (stale styling hook). */ export declare const MISSING_ATTRIBUTE = "data-dsh-atlas-missing"; /** What a click on one reference did, as far as the chip is concerned. */ export type ReferenceOutcome = 'opened' | 'gone'; /** What the session's overlay shares with the bridge. */ export interface ReferenceLinksInjected { /** * The action a click on this mention performs, or undefined when this build * has none (an unknown provider, a provider that declared no `open`, a * session with no client scope). The same answer drives the hover affordance, * so a chip is never drawn as clickable unless clicking really does something. * * The outcome is what the chip has to show: a reference whose target no longer * exists is a normal state — the user deleted or renamed the file long after * the mention was sent — so the bridge marks that chip stale instead of * pretending the click opened something. */ readonly actionFor: (link: ReferenceLink, again?: boolean) => (() => ReferenceOutcome | Promise) | undefined; /** * Whether this click is the SECOND one on the same reference (A.16). * * The plugin answers this from its own ledger rather than from the event's * `detail`, because `detail` is synthesized by the operating system's * double-click interval: the user's ruling (`m02489`) is that the second * meaning must not depend on clicking quickly, and a ledger is the only thing * that can tell "the same object again" from "another click nearby" at any * speed. See {@link noteClick} for when the ledger moves on. */ readonly repeatClick: (link: ReferenceLink) => boolean; /** * Record that this reference has been clicked, and only after the action was * actually resolved — an inert reference must not consume the sequence. * * Writing FLIPS the ledger rather than appending: a third click therefore means * "open it" again, exactly like the first. Otherwise a user who clicked twice * would be stuck in the second meaning with no way back to the first. */ readonly noteClick: (link: ReferenceLink) => void; /** * Map one composer chip's label to a workspace-relative path. * * A source that inserts chips may label them with a bare file name (the * sidebar plugin does: the chip shows `@index.ts` while it serializes to * `@src/client/index.ts`), so a bare name is resolved through the plugin's own * index before the click. `undefined` means the label alone cannot name one * file (two indexed paths answer to it), and the bridge then falls back to the * draft — never to a guess. */ readonly resolveLabel: (label: string) => string | undefined; } /** Overlay entry props: the chat overlay's runtime face plus the opener. */ export type ReferenceLinksProps = PropsRuntime<'conversation.input.overlay'> & InjectFace; /** * The openable mention of one chip element, or undefined. * * A `