import * as react_jsx_runtime from 'react/jsx-runtime'; import { WorkspaceFileReferenceCopy, WorkspaceFileReferenceAdapter, WorkspaceFileReference, ReferenceHandle, NodeRef, ReferenceLocateTarget, ReferenceNode, ReferenceProvenanceOption, ReferenceProvenanceDimension, ReferenceProvenanceFilter } from '../contracts/index.js'; import { JSX, ReactNode } from 'react'; import { WorkspaceFileManagerI18nRuntime, WorkspaceFileEntry, WorkspaceFileOpenWithApplication } from '@tutti-os/workspace-file-manager'; import { a as ReferenceSourceAggregator } from '../referenceSourceAggregator-CC-K1EfG.js'; import '@tutti-os/workspace-file-manager/services'; import '@tutti-os/workspace-file-preview'; interface WorkspaceFileReferencePickerProps { copy: WorkspaceFileReferenceCopy; fileAdapter?: WorkspaceFileReferenceAdapter; initialPath?: string | null; onClose: () => void; onConfirm: (refs: WorkspaceFileReference[]) => void; open: boolean; /** * When true, the dialog is rendered inline (non-portaled, absolutely * positioned) so it stays clipped within the nearest positioned ancestor — * e.g. an agent GUI node window — instead of covering the whole viewport. * Defaults to false (portal to body + cover the viewport). */ scoped?: boolean; workspaceId: string; } declare function WorkspaceFileReferencePicker({ copy, fileAdapter, initialPath, onClose, onConfirm, open, scoped, workspaceId }: WorkspaceFileReferencePickerProps): react_jsx_runtime.JSX.Element; /** 一个 navigable 源文件夹的折叠选区(文件已映射为 WorkspaceFileReference)。 */ interface ReferenceBundleSelection { sourceId: string; nodeId: string; displayName: string; iconUrl?: string | null; /** * 可被 agent 解析的领域句柄(见 ReferenceHandle)。发给 agent 的 * `mention://workspace-reference/...` 由它构造;源未解码出句柄时为 null。 */ handle: ReferenceHandle | null; /** 该 bundle 下文件数(展示用,取节点 childCount;不再展开文件)。 */ fileCount: number; } interface ReferenceGroupedSelection { files: WorkspaceFileReference[]; bundles: ReferenceBundleSelection[]; } interface ReferenceSourcePickerProps { aggregator: ReferenceSourceAggregator; copy: WorkspaceFileReferenceCopy; renderHeaderActions?: (context: { refresh: () => void; selectTarget: (target: ReferenceLocateTarget) => Promise; selectTargets: (targets: readonly ReferenceLocateTarget[]) => Promise; }) => ReactNode; /** Optional host actions pinned above the source list. Omission preserves the existing sidebar DOM. */ renderSidebarActions?: (context: { refresh: () => void; selectTarget: (target: ReferenceLocateTarget) => Promise; selectTargets: (targets: readonly ReferenceLocateTarget[]) => Promise; }) => ReactNode; resolveContentErrorAction?: (error: Error) => ReferenceSourceContentErrorAction | null; /** 可选:打开时直达某事项/应用分组(展开并聚焦)。 */ initialTarget?: ReferenceLocateTarget | null; isNodeSelectable?: (node: ReferenceNode) => boolean; fileManagerCopy?: WorkspaceFileManagerI18nRuntime; hostOs?: NodeJS.Platform; resolveOpenWithApplicationIcon?: (application: WorkspaceFileOpenWithApplication) => JSX.Element | null; resolveEntryIconUrl?: (entry: WorkspaceFileEntry) => Promise; onClose: () => void; onConfirm: (refs: WorkspaceFileReference[]) => void; /** * 可选:启用「文件夹=一个 bundle 节点」确认形态。提供时确认走 confirmGrouped, * navigable 源的选中文件夹折叠成 bundle 回调,其余仍为单条文件。 */ onConfirmBundles?: (result: ReferenceGroupedSelection) => void; open: boolean; purpose?: "directory" | "reference"; /** * Directory purpose only. When the user is at the source root with nothing * selected, confirm uses this path ("save/export here" = current location). * Nested folders still confirm via the entered/selected folder. */ confirmRootDirectoryPath?: string; workspaceId: string; } interface ReferenceSourceContentErrorAction { label: string; } declare function ReferenceSourcePicker({ aggregator, copy, fileManagerCopy, hostOs, initialTarget, isNodeSelectable, onClose, onConfirm, onConfirmBundles, open, purpose, confirmRootDirectoryPath, renderHeaderActions, renderSidebarActions, resolveContentErrorAction, resolveEntryIconUrl, resolveOpenWithApplicationIcon, workspaceId }: ReferenceSourcePickerProps): JSX.Element | null; interface ReferenceSourceContentPaneProps { aggregator: ReferenceSourceAggregator; className?: string; copy: WorkspaceFileReferenceCopy; fileManagerCopy?: WorkspaceFileManagerI18nRuntime; hostOs?: NodeJS.Platform; initialNodeRef?: NodeRef | null; initialTarget?: ReferenceLocateTarget | null; resolveEntryIconUrl?: (entry: WorkspaceFileEntry) => Promise; resolveOpenWithApplicationIcon?: (application: WorkspaceFileOpenWithApplication) => JSX.Element | null; workspaceId: string; } declare function ReferenceSourceContentPane({ aggregator, className, copy, fileManagerCopy, hostOs, initialNodeRef, initialTarget, resolveEntryIconUrl, resolveOpenWithApplicationIcon, workspaceId }: ReferenceSourceContentPaneProps): JSX.Element; interface ReferenceProvenanceFilterLabels { allAgents: string; allMembers: string; allSources: string; agents: string; filteredSources: string; members: string; } interface ReferenceProvenanceFilterControlProps { agentOptions: readonly ReferenceProvenanceOption[]; enabledDimensions: readonly ReferenceProvenanceDimension[]; labels: ReferenceProvenanceFilterLabels; memberOptions: readonly ReferenceProvenanceOption[]; popoverElevation?: "default" | "panel"; /** Disabled options stay in the injected catalog but are hidden by default. */ showDisabledOptions?: boolean; value: ReferenceProvenanceFilter; onToggle: (dimension: ReferenceProvenanceDimension, id: string) => void; onToggleAll: (dimension: ReferenceProvenanceDimension) => void; } declare function ReferenceProvenanceFilterControl({ agentOptions, enabledDimensions, labels, memberOptions, popoverElevation, showDisabledOptions, value, onToggle, onToggleAll }: ReferenceProvenanceFilterControlProps): react_jsx_runtime.JSX.Element | null; interface WorkspaceReferenceAddControlLabels { addContent: string; browseReferences: string; uploadFile?: string; } interface WorkspaceReferenceAddControlProps { className?: string; disabled?: boolean; labels: WorkspaceReferenceAddControlLabels; onBrowseReferences: () => void; onUploadFile?: () => void; } /** * Standard workspace-app composer entry for adding referenced content. * Upload-capable apps get a two-action menu; other apps open the reference * picker directly. */ declare function WorkspaceReferenceAddControl({ className, disabled, labels, onBrowseReferences, onUploadFile }: WorkspaceReferenceAddControlProps): react_jsx_runtime.JSX.Element; export { type ReferenceBundleSelection, type ReferenceGroupedSelection, ReferenceProvenanceFilterControl, type ReferenceProvenanceFilterControlProps, type ReferenceProvenanceFilterLabels, type ReferenceSourceContentErrorAction, ReferenceSourceContentPane, type ReferenceSourceContentPaneProps, ReferenceSourcePicker, type ReferenceSourcePickerProps, WorkspaceFileReferencePicker, type WorkspaceFileReferencePickerProps, WorkspaceReferenceAddControl, type WorkspaceReferenceAddControlLabels, type WorkspaceReferenceAddControlProps };