import { type MessageChatAttachment } from "../../../../../../platform/agentHost/common/state/protocol/state.js"; import { type IChatRequestChatReferenceVariableEntry } from "../../../common/attachments/chatVariableEntries.js"; /** * Restore a first-class {@link IChatRequestChatReferenceVariableEntry chat-reference entry} * from a stored {@link MessageChatAttachment} when replaying a past request from * agent-host state. * * The stored attachment carries the opaque **backend** chat URI, and entries now * hold that exact URI, so restore is pure identity: {@link MessageChatAttachment.resource} * becomes the entry's `value` verbatim. The client-side chat is resolved lazily * (only when the reference chip is clicked), so a chat that was never opened in * this window still restores to a working reference and re-sends identically. * * @param attachment The stored chat attachment to restore. * @param messageText The `Message.text` the attachment references, used to map the * attachment's stored {@link TextRange} back to the entry's prompt {@link IOffsetRange} * so the inline `#chat:` highlight survives a draft round-trip. When omitted (e.g. a * completed history request that is only displayed) the entry is restored without a range. */ export declare function restoreChatReferenceVariableEntryFromAttachment(attachment: MessageChatAttachment, messageText?: string): IChatRequestChatReferenceVariableEntry;