@arbidocs/react 0.5.17 → 0.5.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/search/session.ts","../src/notifications/Toaster.tsx","../src/notifications/NotificationBell.tsx","../src/host/ArbiHost.tsx","../src/chat/mentions.ts","../src/chat/open-document.ts","../src/chat/thread-document.ts"],"names":["createStore","storage","jsx","Sonner","CheckCircle2","XCircle","AlertTriangle","Info","useState","useNotify","selectUnread","DEFAULT_NOTIFY_TONE","jsxs","DropdownMenu","DropdownMenuTrigger","Bell","DropdownMenuContent","CheckCheck","cn","BellOff","DropdownMenuItem","X","ScrollArea","formatRelativeTime","useContext","ArbiHostContext","useMemo","mergeHostConfig","OWN_SESSION_SLOT","useRef","useEffect","useSyncExternalStore","parseVersionRef"],"mappings":";;;;;;;;;;;;;;;AA8BA,IAAM,KAAA,GAAyD;AAAA,EAC7D,KAAA,EAAO,EAAA;AAAA,EACP,SAAS,EAAC;AAAA,EACV,QAAA,EAAU,KAAA;AAAA,EACV,MAAA,EAAQ,MAAA;AAAA,EACR,KAAA,EAAO,IAAA;AAAA,EACP,OAAA,EAAS;AACX,CAAA;AAEO,SAAS,mBAAA,GAAqC;AACnD,EAAA,OAAOA,mBAAA,CAAgC,OAAO,EAAE,GAAG,OAAO,WAAA,EAAa,IAAA,EAAM,GAAA,EAAK,CAAA,EAAE,CAAE,CAAA;AACxF;AAGO,IAAM,sBAAqC,mBAAA;AAG3C,SAAS,kBAAA,CACd,WAAA,EACA,OAAA,GAAyB,mBAAA,EACnB;AACN,EAAA,OAAA,CAAQ,QAAA,CAAS,CAAC,CAAA,MAAO;AAAA,IACvB,GAAG,KAAA;AAAA,IACH,WAAA,EAAa,WAAA,KAAgB,MAAA,GAAY,CAAA,CAAE,WAAA,GAAc,WAAA;AAAA,IACzD,GAAA,EAAK,EAAE,GAAA,GAAM;AAAA,GACf,CAAE,CAAA;AACJ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AAgB,QAAQ,CAAC,EAAA,KAAO,OAAO,IAAA,CAAK,EAAE,CAAC,CAAA;AAC/C,EAAA,IAAI;AACF,IAAA,IAAI,MAAA,CAAO,KAAK,IAAI,CAAA,CAAE,WAAW,CAAA,EAAG,OAAA,EAAQ,EAAG,UAAA,CAAW,2BAA2B,CAAA;AAAA,kBACxE,EAAG,OAAA,CAAQ,6BAA6B,IAAA,CAAK,SAAA,CAAU,IAAI,CAAC,CAAA;AAAA,EAC3E,CAAA,CAAA,MAAQ;AAAA,EAER;AACF","file":"chunk-YBIW7T66.cjs","sourcesContent":["/**\n * A search's state outside any component: the query last searched, its passages, and whether it\n * is running. A page that shows the shared session (`sharedSearchSession`) keeps its results when\n * it is left and opened again, another surface can hand it a query to run on arrival\n * ({@link requestSearch}), and {@link persistSearchSession} keeps the last query across reloads.\n */\nimport { createStore, type StoreApi } from 'zustand/vanilla'\nimport type { SearchChunk } from '@arbidocs/sdk/browser'\n\nexport type SearchStatus = 'idle' | 'running' | 'done' | 'error'\n\nexport interface SearchSessionState {\n /** The workspace the query and results belong to. */\n workspaceId: string | null\n /** The query last searched, or handed over to run. */\n query: string\n /** The last search's passages, best first. */\n results: SearchChunk[]\n /** A search has finished with results to show (cleared by {@link clearSearchSession}). */\n searched: boolean\n status: SearchStatus\n error: string | null\n /** A query handed over by {@link requestSearch}, run once by the page that shows the session. */\n pending: string | null\n /** Counts searches, so the reply to an older one never overwrites a newer one. */\n run: number\n}\n\nexport type SearchSession = StoreApi<SearchSessionState>\n\nconst EMPTY: Omit<SearchSessionState, 'workspaceId' | 'run'> = {\n query: '',\n results: [],\n searched: false,\n status: 'idle',\n error: null,\n pending: null,\n}\n\nexport function createSearchSession(): SearchSession {\n return createStore<SearchSessionState>(() => ({ ...EMPTY, workspaceId: null, run: 0 }))\n}\n\n/** The session a host's search page shows. */\nexport const sharedSearchSession: SearchSession = createSearchSession()\n\n/** Back to nothing searched (in `workspaceId` when given); a running search's reply is dropped. */\nexport function clearSearchSession(\n workspaceId?: string | null,\n session: SearchSession = sharedSearchSession\n): void {\n session.setState((s) => ({\n ...EMPTY,\n workspaceId: workspaceId === undefined ? s.workspaceId : workspaceId,\n run: s.run + 1,\n }))\n}\n\n/**\n * Hand a query to the search page, which runs it when it shows the session (the user already\n * asked once; the page must not wait for a second Enter).\n */\nexport function requestSearch(\n query: string,\n workspaceId: string | null,\n session: SearchSession = sharedSearchSession\n): void {\n clearSearchSession(workspaceId, session)\n session.setState({ query, pending: query })\n}\n\n/** The handed-over query, once: the next call returns null. */\nexport function takePendingSearch(session: SearchSession = sharedSearchSession): string | null {\n const { pending } = session.getState()\n if (pending !== null) session.setState({ pending: null })\n return pending\n}\n\ninterface SavedSearch {\n query?: string\n workspaceId?: string | null\n}\n\n/**\n * Keep the last query (and its workspace) in `storage` under `key`, so the search box shows it\n * after a reload. Results are not kept. Returns the unsubscribe.\n */\nexport function persistSearchSession(\n key: string,\n storage: Pick<Storage, 'getItem' | 'setItem'> | undefined = globalThis.localStorage,\n session: SearchSession = sharedSearchSession\n): () => void {\n if (!storage) return () => {}\n try {\n const saved = JSON.parse(storage.getItem(key) ?? 'null') as SavedSearch | null\n if (saved && typeof saved.query === 'string' && !session.getState().query)\n session.setState({ query: saved.query, workspaceId: saved.workspaceId ?? null })\n } catch {\n // Unreadable: start empty.\n }\n let last = ''\n return session.subscribe(({ query, workspaceId }) => {\n const next = JSON.stringify({ query, workspaceId })\n if (next === last) return\n last = next\n try {\n storage.setItem(key, next)\n } catch {\n // Storage full or blocked: the query is simply not kept.\n }\n })\n}\n","/**\n * Toaster — the one shared toast surface, built on sonner (the mature engine:\n * stacking, swipe-to-dismiss, a11y, timing). Mount once near the app root; any\n * code then calls `notify.*(...)` (or the re-exported `toast`) from anywhere.\n *\n * Firm-agnostic: every sonner `ToasterProps` passes through, so a consumer sets\n * its own `position` / `theme` / `toastOptions`. The defaults give a neutral\n * shadcn-token card that both apps can override.\n */\nimport { Toaster as Sonner, type ToasterProps } from 'sonner'\n\nexport type { ToasterProps }\n\nconst DEFAULT_TOAST_OPTIONS: ToasterProps['toastOptions'] = {\n classNames: {\n toast:\n 'group toast group-[.toaster]:bg-card group-[.toaster]:text-foreground group-[.toaster]:border group-[.toaster]:border-border group-[.toaster]:shadow-lg group-[.toaster]:rounded-lg',\n description: 'group-[.toast]:text-muted-foreground',\n actionButton: 'group-[.toast]:bg-primary group-[.toast]:text-primary-foreground',\n cancelButton: 'group-[.toast]:bg-muted group-[.toast]:text-muted-foreground',\n },\n}\n\nexport function Toaster({ toastOptions, ...props }: ToasterProps) {\n return (\n <Sonner\n className=\"toaster group\"\n toastOptions={toastOptions ?? DEFAULT_TOAST_OPTIONS}\n {...props}\n />\n )\n}\n","/**\n * NotificationBell — the topbar notification centre: a bell with an unread badge\n * that opens a dropdown of recorded entries (newest first) with an unread dot,\n * relative time and optional deep-link. \"Mark all read\" clears the badge. Backed\n * by the shared {@link useNotify} store (the same one the <Toaster/> renders).\n *\n * Firm-agnostic: navigation is a callback (`onNavigate`), styling tracks semantic\n * tokens, and per-variant glyph colours are overridable via `toneClassNames`.\n */\nimport { useState, type ReactElement } from 'react'\nimport {\n Bell,\n BellOff,\n CheckCheck,\n CheckCircle2,\n AlertTriangle,\n XCircle,\n Info,\n X,\n} from 'lucide-react'\nimport {\n DropdownMenu,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuItem,\n} from '../ui/dropdown-menu'\nimport { ScrollArea } from '../ui/scroll-area'\nimport { cn } from '../lib/utils'\nimport { formatRelativeTime } from '../lib/format-relative-time'\nimport {\n useNotify,\n selectUnread,\n DEFAULT_NOTIFY_TONE,\n type NotifyVariant,\n type AppNotification,\n} from './notify-store'\n\nconst GLYPH: Record<NotifyVariant, typeof Info> = {\n success: CheckCircle2,\n error: XCircle,\n warning: AlertTriangle,\n info: Info,\n}\n\n/** Entries the panel lists, newest first. */\nconst BELL_LIMIT = 100\n\n/** What a custom bell trigger needs to render itself. */\nexport interface NotificationBellTriggerState {\n /** Unread count (0 when none). */\n unread: number\n /** Accessible name, including the count: \"Notifications, 2 unread\". */\n ariaLabel: string\n testId: string\n}\n\nexport interface NotificationBellProps {\n /**\n * Replaces the default icon button with the host's own trigger (for example a labelled sidebar\n * row). It must forward its ref and rest props: it is mounted as the dropdown trigger.\n */\n renderTrigger?: (state: NotificationBellTriggerState) => ReactElement\n /** Called with an entry's `href` when it's clicked (e.g. router navigate). */\n onNavigate?: (href: string) => void\n /** Open this entry in the host notification centre instead of following its link. */\n onSelectNotification?: (notification: AppNotification) => void\n /** Called after an entry is locally marked read — the hook for a backend\n * bridge to propagate read state upstream (filter by the ids it owns). */\n onMarkRead?: (id: string) => void\n /** Called after \"Mark all read\" — same upstream-propagation hook. */\n onMarkAllRead?: () => void\n /** Show the store's toast mute switch in the header — the bell is where notification\n * behaviour is controlled. */\n showMuteToggle?: boolean\n /** Override per-variant glyph colours (e.g. brand emerald for success). */\n toneClassNames?: Partial<Record<NotifyVariant, string>>\n emptyText?: string\n /** Footer link to the app's full notification surface. Omit to hide. */\n onViewAll?: () => void\n viewAllLabel?: string\n testId?: string\n /** Where the panel opens relative to the bell (a sidebar-footer bell opens upward). */\n side?: 'top' | 'right' | 'bottom' | 'left'\n align?: 'start' | 'center' | 'end'\n}\n\nexport function NotificationBell({\n renderTrigger,\n onNavigate,\n onSelectNotification,\n onMarkRead,\n onMarkAllRead,\n showMuteToggle = false,\n toneClassNames,\n emptyText = \"You're all caught up.\",\n onViewAll,\n viewAllLabel = 'View all',\n testId = 'notifications',\n side = 'bottom',\n align = 'end',\n}: NotificationBellProps) {\n const [open, setOpen] = useState(false)\n const notifications = useNotify((s) => s.notifications)\n const unread = useNotify(selectUnread)\n const markAllRead = useNotify((s) => s.markAllRead)\n const markRead = useNotify((s) => s.markRead)\n const muted = useNotify((s) => s.muted)\n const setMuted = useNotify((s) => s.setMuted)\n const tone = (v: NotifyVariant) => toneClassNames?.[v] ?? DEFAULT_NOTIFY_TONE[v]\n\n // Ambient entries (routine session activity — \"Opening workspace…\") are kept\n // for the log but never surfaced in the bell panel: they never badge and are\n // always filtered out here. The panel is the recent history; a host's\n // notification page (`onViewAll`) holds the rest.\n const visible = notifications.filter((n) => !n.ambient).slice(0, BELL_LIMIT)\n\n return (\n <DropdownMenu open={open} onOpenChange={setOpen}>\n <DropdownMenuTrigger asChild>\n {renderTrigger ? (\n renderTrigger({\n unread,\n ariaLabel: `Notifications${unread ? `, ${unread} unread` : ''}`,\n testId,\n })\n ) : (\n <button\n className=\"relative flex size-9 pointer-coarse:size-11 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-accent hover:text-foreground\"\n data-testid={testId}\n aria-label={`Notifications${unread ? `, ${unread} unread` : ''}`}\n title=\"Notifications\"\n >\n <Bell className=\"size-5\" />\n {unread > 0 && (\n <span\n className=\"absolute -right-0.5 -top-0.5 flex min-w-4 items-center justify-center rounded-full bg-primary px-1 text-xs font-semibold leading-4 text-primary-foreground\"\n data-testid={`${testId}-badge`}\n >\n {unread > 9 ? '9+' : unread}\n </span>\n )}\n </button>\n )}\n </DropdownMenuTrigger>\n <DropdownMenuContent\n align={align}\n side={side}\n sideOffset={8}\n collisionPadding={12}\n className=\"w-60 rounded-lg border-border/60 p-0 shadow-lg\"\n data-testid={`${testId}-panel`}\n data-topbar-popover=\"\"\n >\n <div className=\"flex items-center justify-between gap-3 border-b border-border px-3.5 py-2.5 pointer-coarse:py-0\">\n <p className=\"text-sm font-semibold text-foreground\">Notifications</p>\n <div className=\"flex items-center gap-3 pointer-coarse:gap-1\">\n {unread > 0 && (\n <button\n onClick={() => {\n markAllRead()\n onMarkAllRead?.()\n }}\n className=\"flex items-center gap-1 text-xs font-medium text-primary transition-colors hover:opacity-80 pointer-coarse:min-h-11 pointer-coarse:px-2\"\n data-testid={`${testId}-mark-all`}\n >\n <CheckCheck className=\"size-3.5\" /> Mark all read\n </button>\n )}\n {showMuteToggle && (\n <button\n onClick={() => setMuted(!muted)}\n aria-pressed={muted}\n title={muted ? 'Unmute notifications' : 'Mute notifications'}\n aria-label={muted ? 'Unmute notifications' : 'Mute notifications'}\n className={cn(\n 'flex size-6 items-center justify-center rounded-md transition-colors hover:bg-accent pointer-coarse:size-11',\n muted ? 'text-foreground' : 'text-muted-foreground hover:text-foreground'\n )}\n data-testid={`${testId}-mute`}\n >\n <BellOff className=\"size-3.5\" />\n </button>\n )}\n {/* Explicit close — the dropdown otherwise only dismisses via\n tap-outside/Escape, which isn't discoverable on touch and (at\n mobile width, see blocks.css) the panel covers most\n of the screen so there's nothing to tap outside of. Radix\n closes a DropdownMenu on any item select by default, so a\n plain item with no other effect doubles as a close button. */}\n <DropdownMenuItem\n className=\"flex size-6 items-center justify-center rounded-md p-0 text-muted-foreground transition-colors hover:bg-accent hover:text-foreground focus:bg-accent pointer-coarse:size-11\"\n aria-label=\"Close notifications\"\n data-testid={`${testId}-close`}\n >\n <X className=\"size-3.5\" />\n </DropdownMenuItem>\n </div>\n </div>\n {muted && (\n <p\n className=\"border-b border-border/60 bg-amber-500/10 px-3.5 py-1.5 text-xs text-muted-foreground\"\n data-testid={`${testId}-muted-note`}\n >\n Toasts are muted — everything still lands here.\n </p>\n )}\n\n {visible.length === 0 ? (\n <div className=\"px-3.5 py-10 text-center text-sm text-muted-foreground\">{emptyText}</div>\n ) : (\n <ScrollArea className=\"max-h-[380px]\">\n <ul data-testid={`${testId}-list`}>\n {visible.map((n) => {\n const Glyph = GLYPH[n.variant]\n return (\n <li key={n.id}>\n <button\n onClick={() => {\n markRead(n.id)\n if (!n.read) onMarkRead?.(n.id)\n setOpen(false)\n if (onSelectNotification) {\n onSelectNotification(n)\n return\n }\n // The specific action wins over the generic deep link.\n if (n.onSelect) n.onSelect()\n else if (n.href) onNavigate?.(n.href)\n }}\n className={cn(\n 'flex w-full items-start gap-3 border-b border-border/60 px-3.5 py-3 text-left transition-colors hover:bg-accent',\n !n.read && 'bg-accent/40'\n )}\n data-testid={`${testId}-item`}\n data-notification-id={n.id}\n >\n <Glyph className={cn('mt-0.5 size-4 shrink-0', tone(n.variant))} />\n <div className=\"min-w-0 flex-1\">\n <p className=\"text-sm font-medium leading-snug text-foreground\">\n {n.title}\n </p>\n {n.description && (\n <p className=\"mt-0.5 line-clamp-2 text-xs leading-relaxed text-muted-foreground\">\n {n.description}\n </p>\n )}\n <p className=\"mt-1 text-xs text-muted-foreground/80\">\n {formatRelativeTime(new Date(n.ts).toISOString())}\n </p>\n </div>\n {!n.read && (\n <span className=\"mt-1.5 size-2 shrink-0 rounded-full bg-primary\" />\n )}\n </button>\n </li>\n )\n })}\n </ul>\n </ScrollArea>\n )}\n {onViewAll && (\n // A real menu item, not a bare button: selecting it must CLOSE the\n // dropdown on its way to the full surface.\n <DropdownMenuItem\n onClick={onViewAll}\n className=\"justify-center rounded-none border-t border-border px-3.5 py-2.5 text-xs font-medium text-primary focus:text-primary pointer-coarse:min-h-11\"\n data-testid={`${testId}-view-all`}\n >\n {viewAllLabel}\n </DropdownMenuItem>\n )}\n </DropdownMenuContent>\n </DropdownMenu>\n )\n}\n","/**\n * `<ArbiHost config>`: the one place a host app hands its configuration to every hook and kit.\n *\n * <ArbiHost config={{ arbi, session, documents, calendar, mail, account, … }}>\n * <App />\n * </ArbiHost>\n *\n * Every field is optional and has a default (see `ArbiHostConfig`); a kit reads its domain from\n * the config (`useArbiHost().documents`, `useHost().billing` in blocks). A nested `<ArbiHost>`\n * overrides only the fields it gives and inherits the rest (`environment` field by field), for a\n * subtree that opens projects in its own tabs, say. There is no other host provider: a new domain\n * is a new optional field, never a new provider.\n *\n * SDK-free (this module, ./context and ./merge are all it reaches), so a marketing site that only sets the\n * blocks environment does not bundle the SDK.\n */\n\nimport { useContext, useMemo, useState, type ComponentType, type ReactNode } from 'react'\nimport { ArbiHostContext } from './context'\nimport { mergeHostConfig, OWN_SESSION_SLOT } from './merge'\n\n/** A sign-in layer mounted inside the host (`defaultHost` in `@arbidocs/blocks/connect`). */\nexport interface ArbiHostConnection {\n Provider: ComponentType<{ children: ReactNode }>\n}\n\nexport interface ArbiHostProps<Config extends object> {\n config: Config\n children?: ReactNode\n}\n\n/**\n * Provide the host configuration. Typed by the package it is imported from: `@arbidocs/react`'s\n * takes the react domains, `@arbidocs/blocks`' the blocks domains as well.\n */\nexport function ArbiHost<Config extends object>({\n config,\n children,\n}: ArbiHostProps<Config>): React.ReactElement {\n const parent = useContext(ArbiHostContext)\n // A top-level host without a session store gets its own, made on first use (useArbiSessionStore).\n const [ownSession] = useState(() => ({ current: null as unknown }))\n const value = useMemo(() => {\n const merged = mergeHostConfig(parent, config)\n return merged[OWN_SESSION_SLOT] ? merged : { ...merged, [OWN_SESSION_SLOT]: ownSession }\n }, [parent, config, ownSession])\n const Connection = (config as { connection?: ArbiHostConnection }).connection?.Provider\n return (\n <ArbiHostContext.Provider value={value}>\n {Connection ? <Connection>{children}</Connection> : children}\n </ArbiHostContext.Provider>\n )\n}\n","/**\n * @mentions in chat text: pure helpers shared by the composer (autocomplete, extraction) and\n * the message renderer (chips). No React, no SDK.\n *\n * A mention lives in two places: the readable `@Label` text in the message content, and a\n * structured entry on the message (`{ type, user_ext_id, label }`) that the server reads to share\n * the conversation and notify. The composer only ever inserts `@<label>` for a known candidate,\n * so the structured list can be recovered from the text at send time ({@link extractMentions});\n * the renderer turns each stored mention back into a chip ({@link linkMentions}).\n */\n\n/** Who can be mentioned: a workspace member, or the assistant. */\nexport type MentionKind = 'user' | 'assistant'\n\n/** One entry of the mention autocomplete. */\nexport interface MentionCandidate {\n /** User external id (`usr-…`) for a person; any stable key (e.g. `assistant`) for the assistant. */\n id: string\n kind: MentionKind\n /** Inserted as `@<label>`. For people this must be the server's display name (given + family). */\n label: string\n /** Secondary line in the menu (email, role, …). */\n description?: string\n}\n\n/** The structured mention a message carries (the API's `MessageMention`). */\nexport interface MessageMentionRef {\n type: MentionKind\n user_ext_id?: string | null\n label?: string | null\n}\n\n/** Longest text after `@` that still counts as a query in progress. */\nconst MAX_QUERY_LENGTH = 40\n\n/**\n * The `@query` the caret is in, if any: the `@` must start the text or follow whitespace, and the\n * query may contain spaces (names do) but no newline. Returns the index of the `@` and the query.\n */\nexport function findMentionQuery(\n text: string,\n caret: number\n): { start: number; query: string } | null {\n const before = text.slice(0, caret)\n const at = before.lastIndexOf('@')\n if (at < 0) return null\n if (at > 0 && !/\\s/.test(before[at - 1])) return null\n const query = before.slice(at + 1)\n if (query.length > MAX_QUERY_LENGTH || query.includes('\\n') || query.startsWith(' ')) return null\n return { start: at, query }\n}\n\n/** Candidates matching a query: label prefix (or word-prefix) matches, prefix matches first. */\nexport function filterMentionCandidates(\n candidates: ReadonlyArray<MentionCandidate>,\n query: string\n): MentionCandidate[] {\n const q = query.trim().toLowerCase()\n if (!q) return candidates.slice()\n const scored: Array<{ c: MentionCandidate; score: number }> = []\n for (const c of candidates) {\n const label = c.label.toLowerCase()\n if (label.startsWith(q)) scored.push({ c, score: 0 })\n else if (label.split(/\\s+/).some((word) => word.startsWith(q))) scored.push({ c, score: 1 })\n else if (c.description?.toLowerCase().startsWith(q)) scored.push({ c, score: 2 })\n }\n return scored.sort((a, b) => a.score - b.score).map((s) => s.c)\n}\n\n/** Replace the `@query` at `start…caret` with `@<label> `; returns the new text and caret. */\nexport function insertMention(\n text: string,\n start: number,\n caret: number,\n label: string\n): { text: string; caret: number } {\n const inserted = `@${label} `\n return {\n text: text.slice(0, start) + inserted + text.slice(caret),\n caret: start + inserted.length,\n }\n}\n\n/** Every `[from, to)` range where `@<label>` occurs as a whole token. */\nfunction tokenRanges(text: string, label: string): Array<[number, number]> {\n const needle = `@${label}`\n const ranges: Array<[number, number]> = []\n let from = 0\n for (;;) {\n const i = text.indexOf(needle, from)\n if (i < 0) break\n const end = i + needle.length\n const startsToken = i === 0 || /\\s|\\(|\\[/.test(text[i - 1])\n const endsToken = end === text.length || !/[\\p{L}\\p{N}_]/u.test(text[end])\n if (startsToken && endsToken) ranges.push([i, end])\n from = end\n }\n return ranges\n}\n\n/**\n * The candidates mentioned in `text`, in order of first appearance. Longer labels win overlaps,\n * so `@Bob Smith` is Bob Smith, not a separate `@Bob`.\n */\nexport function extractMentions(\n text: string,\n candidates: ReadonlyArray<MentionCandidate>\n): MentionCandidate[] {\n const taken: Array<[number, number]> = []\n const found: Array<{ c: MentionCandidate; at: number }> = []\n const byLength = [...candidates].sort((a, b) => b.label.length - a.label.length)\n for (const c of byLength) {\n if (!c.label) continue\n for (const [from, to] of tokenRanges(text, c.label)) {\n if (taken.some(([a, b]) => from < b && to > a)) continue\n taken.push([from, to])\n if (!found.some((f) => f.c.id === c.id)) found.push({ c, at: from })\n }\n }\n return found.sort((a, b) => a.at - b.at).map((f) => f.c)\n}\n\n/** The API payload for mentioned candidates. */\nexport function toMessageMentions(mentioned: ReadonlyArray<MentionCandidate>): MessageMentionRef[] {\n return mentioned.map((c) =>\n c.kind === 'assistant' ? { type: 'assistant' } : { type: 'user', user_ext_id: c.id }\n )\n}\n\n/** Fragment prefix of the links {@link linkMentions} writes. */\nexport const MENTION_HREF_PREFIX = '#mention-'\n\n/** Escape the characters that would end a markdown link text early. */\nfunction escapeLinkText(label: string): string {\n return label.replace(/[[\\]\\\\]/g, (ch) => `\\\\${ch}`)\n}\n\n/**\n * Turn each stored mention's `@<label>` in `content` into a markdown link\n * `[@<label>](#mention-<id>)`, so a markdown renderer can draw it as a chip (see\n * {@link mentionFromHref}). Text that no longer matches (a renamed user) stays plain text.\n * `assistantLabels` lists other names the assistant may have been mentioned by.\n */\nexport function linkMentions(\n content: string,\n mentions: ReadonlyArray<MessageMentionRef> | null | undefined,\n assistantLabels: ReadonlyArray<string> = []\n): string {\n if (!mentions || mentions.length === 0 || !content) return content\n const targets: Array<{ label: string; id: string }> = []\n for (const m of mentions) {\n const id = m.type === 'assistant' ? 'assistant' : m.user_ext_id\n if (!id) continue\n const labels = m.type === 'assistant' ? [m.label ?? '', ...assistantLabels] : [m.label ?? '']\n for (const label of labels) if (label) targets.push({ label, id })\n }\n targets.sort((a, b) => b.label.length - a.label.length)\n const replacements: Array<{ from: number; to: number; text: string }> = []\n for (const { label, id } of targets) {\n for (const [from, to] of tokenRanges(content, label)) {\n if (replacements.some((r) => from < r.to && to > r.from)) continue\n replacements.push({\n from,\n to,\n text: `[@${escapeLinkText(label)}](${MENTION_HREF_PREFIX}${id})`,\n })\n }\n }\n replacements.sort((a, b) => b.from - a.from)\n let out = content\n for (const r of replacements) out = out.slice(0, r.from) + r.text + out.slice(r.to)\n return out\n}\n\n/** The mention a `#mention-…` href points at, or null for any other href. */\nexport function mentionFromHref(\n href: string | null | undefined\n): { kind: MentionKind; id: string } | null {\n if (!href?.startsWith(MENTION_HREF_PREFIX)) return null\n const id = href.slice(MENTION_HREF_PREFIX.length)\n if (!id) return null\n return { kind: id === 'assistant' ? 'assistant' : 'user', id }\n}\n\n/** A recipient alone is not a message. */\nexport function hasMessageBody(value: string, recipientLabel = 'ARBI'): boolean {\n const text = value.trim()\n return !!text && text.toLowerCase() !== `@${recipientLabel}`.toLowerCase()\n}\n","import { useEffect, useRef, useSyncExternalStore } from 'react'\nimport { parseVersionRef } from '../artifacts/versions'\n\n/**\n * Drafting mode: the documents open beside the chat, and which one a chat turn drafts in.\n *\n * A viewer registers the document it shows (`useRegisterOpenDocument`). Being open binds nothing:\n * a turn names a document (`active_artifact_ext_id`, read with `takeDocumentForTurn` as the\n * question is sent) only when its thread is bound to it (`./thread-document`: started from the\n * document, or attached in that thread), when the document was made in that thread, or when the\n * open document is ambient (an email draft open in the composer). The server then binds the live\n * document to the turn: a Word document is read on demand and edited as tracked changes in the\n * open editor, and what the assistant saves becomes a child version of it. The request carries a\n * reference, never the content.\n *\n * The named document is always the subject, also while one of its earlier versions is on screen\n * read-only: a version still names its document. Sending a turn then returns the viewer to the live\n * document (`showLive`), where the assistant's edits appear as they are made. (Pinning a specific\n * version as a source is a separate feature: it does not go through here.)\n *\n * A module-level registry (not React context), like `useChatSurface`, so a viewer and a chat agree\n * wherever they sit in the tree; the most recently opened document is on top and closing it hands\n * back to the one before. It is not the session state's viewing document (`useArbiSessionState`):\n * it holds what mounted viewers can draft in (saved documents only, with the callback that shows\n * the live one again), and a turn reads it outside React. A viewer on the session's viewing\n * document passes that as `shownId` (it may be a version reference, resolved here the same way as\n * `selectViewingDocumentId` does).\n */\n\n/** What a viewer knows about the document it shows. */\nexport interface SavedDocumentInput {\n /** The document (`doc-…`), never a version reference. */\n documentId: string | null | undefined\n /** An unsaved draft (client-minted id, no backend record). */\n isDraft: boolean\n /** Still streaming: nothing is persisted yet. */\n isStreaming: boolean\n /** An image, audio or video artifact: there is no text to draft in. */\n isBlobArtifact: boolean\n /** The loaded document record. */\n documentData:\n | { external_id?: string | null; wp_type?: string | null; file_name?: string | null }\n | null\n | undefined\n}\n\n/** The fields that decide where a document opens. */\nexport interface WordDocumentKind {\n file_name?: string | null\n wp_type?: string | null\n}\n\n/**\n * A document edited in the Word editor: a `.docx`, or a document the assistant wrote (an\n * artifact). The one rule for where a document opens (`openWordEditor` or `openDocument`) and\n * which documents a chat drafts in.\n */\nexport function opensInWord(doc: WordDocumentKind | null | undefined): boolean {\n return !!doc && (doc.wp_type === 'artifact' || !!doc.file_name?.toLowerCase().endsWith('.docx'))\n}\n\n/**\n * The saved, content-backed document a chat can draft in, or null. Only a saved artifact or Word\n * document counts: drafts, an artifact still streaming and blob artifacts do not.\n */\nexport function savedDocumentIdFor(input: SavedDocumentInput): string | null {\n const { documentId, isDraft, isStreaming, isBlobArtifact, documentData } = input\n if (!documentId || isDraft || isStreaming || isBlobArtifact) return null\n if (!documentData || !opensInWord(documentData)) return null\n // A stale record of the previously viewed document is not this one.\n if (documentData.external_id !== documentId) return null\n return documentId\n}\n\nexport interface OpenDocumentRegistration {\n /** The saved document the viewer shows (`doc-…`); null or empty registers nothing. */\n documentId: string | null | undefined\n /** What is on screen: the document itself, or one of its earlier versions (`doc-…@v2`). */\n shownId?: string | null\n /** Show the live document again. Called when a turn starts while an earlier version is shown. */\n showLive?: () => void\n /** The workspace the document belongs to; a chat in another workspace does not draft in it. */\n workspaceId?: string | null\n /** The thread the document was made in: that thread drafts in it without being bound to it. */\n conversationId?: string | null\n /**\n * Drafted in by whichever chat is beside it, bound or not (an email draft open in the composer:\n * the composer is a drafting surface of its own).\n */\n ambient?: boolean\n}\n\ninterface Entry {\n documentId: string\n current: () => OpenDocumentRegistration\n}\n\nlet entries: Entry[] = []\nconst listeners = new Set<() => void>()\n\nfunction subscribe(listener: () => void): () => void {\n listeners.add(listener)\n return () => listeners.delete(listener)\n}\n\nfunction emit() {\n listeners.forEach((l) => l())\n}\n\nconst top = (): Entry | undefined => entries[entries.length - 1]\n\n/**\n * Registers the document a viewer shows as the open document while the caller is mounted and\n * `documentId` is set. Pass `savedDocumentIdFor(...)`, or the id of a document known to be saved.\n */\nexport function useRegisterOpenDocument(registration: OpenDocumentRegistration): void {\n const latest = useRef(registration)\n const { documentId, workspaceId, conversationId, ambient } = registration\n useEffect(() => {\n latest.current = registration\n })\n // What decides which chat drafts in it changed (its record loaded): readers re-render.\n useEffect(() => {\n if (documentId) emit()\n }, [documentId, workspaceId, conversationId, ambient])\n useEffect(() => {\n if (!documentId) return\n const entry: Entry = { documentId, current: () => latest.current }\n entries = [...entries, entry]\n emit()\n return () => {\n entries = entries.filter((e) => e !== entry)\n emit()\n }\n }, [documentId])\n}\n\n/** The open document's id (the most recently opened), or null. Re-renders when it changes. */\nexport function useOpenDocumentId(options?: { workspaceId?: string | null }): string | null {\n const workspaceId = options?.workspaceId ?? null\n return useSyncExternalStore(\n subscribe,\n () => openDocumentId({ workspaceId }),\n () => null\n )\n}\n\n/** The open document's id (the most recently opened); with `workspaceId`, only one of it. */\nexport function openDocumentId(options?: { workspaceId?: string | null }): string | null {\n const entry = top()\n if (!entry || !inWorkspace(entry, options?.workspaceId)) return null\n return entry.documentId\n}\n\nfunction inWorkspace(entry: Entry, workspaceId: string | null | undefined): boolean {\n const own = entry.current().workspaceId\n return !workspaceId || !own || own === workspaceId\n}\n\n/** What a turn is about to be sent in: its conversation and the document its thread is bound to. */\nexport interface TurnDocumentInput {\n /** The thread's bound document (`threadDocumentId` / the session's `newChatDocumentId`). */\n boundDocumentId: string | null | undefined\n /** The conversation (null: a new chat). */\n conversationId: string | null | undefined\n /** The chat's workspace: an open document of another workspace is never picked up. */\n workspaceId?: string | null\n}\n\n/** The document a turn drafts in, and the open viewer showing it (if one is). */\nfunction pickTurnDocument({\n boundDocumentId,\n conversationId,\n workspaceId,\n}: TurnDocumentInput): { documentId: string; entry: Entry | undefined } | null {\n // A bound thread names its document on every turn, open or not.\n if (boundDocumentId) {\n const entry = [...entries].reverse().find((e) => e.documentId === boundDocumentId)\n return { documentId: boundDocumentId, entry }\n }\n // Unbound: only a document made in this thread, or an ambient one (an email draft).\n for (let i = entries.length - 1; i >= 0; i--) {\n const entry = entries[i]\n if (!inWorkspace(entry, workspaceId)) continue\n const { ambient, conversationId: madeIn } = entry.current()\n if (ambient || (conversationId && madeIn === conversationId))\n return { documentId: entry.documentId, entry }\n }\n return null\n}\n\n/** The document a turn sent now would draft in, or null. Re-renders as documents open and close. */\nexport function useTurnDocumentId(input: TurnDocumentInput): string | null {\n const { boundDocumentId = null, conversationId = null, workspaceId = null } = input\n return useSyncExternalStore(\n subscribe,\n () => pickTurnDocument({ boundDocumentId, conversationId, workspaceId })?.documentId ?? null,\n () => null\n )\n}\n\n/**\n * The document an assistant turn about to be sent drafts in, or null. Call it once per turn as the\n * question is sent: when an earlier version of the document is on screen, the viewer returns to the\n * live document, where the assistant's edits appear.\n */\nexport function takeDocumentForTurn(input: TurnDocumentInput): string | null {\n const picked = pickTurnDocument(input)\n if (!picked) return null\n const { documentId, entry } = picked\n if (entry) {\n const { shownId, showLive } = entry.current()\n if (shownId && shownId !== documentId && parseVersionRef(shownId).docId === documentId)\n showLive?.()\n }\n return documentId\n}\n","/**\n * A thread's document: the one document a conversation drafts in, part of the conversation.\n *\n * A thread is bound to a document only when it was started from it (\"Chat about this document\" in\n * the viewer) or the person attached it in that thread. Only that thread names it on its turns\n * (`active_artifact_ext_id`), on every turn and after a reload. A document merely open or docked\n * beside the chat binds nothing: a new chat (the ask bar, the new-chat button, the thread\n * launcher, home) starts unbound, so a question there never becomes an edit of whatever is open.\n *\n * The binding is the server's: the conversation's `bound_document_ext_id`, set by the first turn\n * (`bound_document_ext_id` on the turn that starts it) or by a PATCH, and read under each reader's\n * access (`bound_document_unavailable`: bound to a document this reader cannot open). It follows\n * the person to every device, and a shared thread's members all see it. The query cache holds it\n * (`./thread-binding`); a new chat's binding is the session's `newChatDocumentId` until its first\n * turn creates the conversation.\n *\n * This module is the light half (no query client, no SDK), so the shell entry can carry it.\n */\n\n/** What a conversation row says about its binding. */\nexport interface ThreadBindingRow {\n external_id: string\n bound_document_ext_id?: string | null\n bound_document_unavailable?: boolean | null\n updated_at?: string | null\n}\n\n/** A conversation's binding as this reader sees it. */\nexport interface ThreadBinding {\n /** The bound document, or null (unbound, or bound to one this reader cannot open). */\n documentId: string | null\n /** Bound to a document this reader cannot open (another member's private document, or deleted). */\n unavailable: boolean\n}\n\nexport const UNBOUND: ThreadBinding = { documentId: null, unavailable: false }\n\n/** A row's binding. */\nexport function bindingOfRow(row: ThreadBindingRow | null | undefined): ThreadBinding {\n if (!row) return UNBOUND\n const documentId = row.bound_document_ext_id ?? null\n return { documentId, unavailable: !documentId && row.bound_document_unavailable === true }\n}\n\n/** The most recently active conversation bound to a document, among `conversations`, or null. */\nexport function latestThreadOfDocument(\n conversations: readonly ThreadBindingRow[] | null | undefined,\n documentId: string\n): string | null {\n let latest: ThreadBindingRow | null = null\n for (const row of conversations ?? []) {\n if (row.bound_document_ext_id !== documentId) continue\n if (!latest || (row.updated_at ?? '') > (latest.updated_at ?? '')) latest = row\n }\n return latest?.external_id ?? null\n}\n\n// --------------------------------------------------------------------------------------------- //\n// Bindings this browser kept before the server held them (`localStorage`), moved to the server\n// once (`migrateLegacyThreadDocuments` in `./thread-binding`) and then forgotten.\n// --------------------------------------------------------------------------------------------- //\n\nexport const LEGACY_THREAD_DOCUMENTS_KEY = 'arbi-thread-documents'\n\nfunction storage(): Storage | undefined {\n try {\n return typeof localStorage === 'undefined' ? undefined : localStorage\n } catch {\n return undefined\n }\n}\n\n/** The bindings this browser kept locally (conversation id → document id); empty when none. */\nexport function readLegacyThreadDocuments(): Record<string, string> {\n const out: Record<string, string> = {}\n try {\n const parsed = JSON.parse(storage()?.getItem(LEGACY_THREAD_DOCUMENTS_KEY) ?? 'null') as unknown\n if (parsed && typeof parsed === 'object')\n for (const [conversationId, documentId] of Object.entries(parsed))\n if (typeof documentId === 'string') out[conversationId] = documentId\n } catch {\n // Damaged or blocked: nothing to move.\n }\n return out\n}\n\n/** Forget locally kept bindings (moved to the server); the key goes with the last of them. */\nexport function forgetLegacyThreadDocuments(conversationIds: readonly string[]): void {\n if (conversationIds.length === 0) return\n const rest = readLegacyThreadDocuments()\n conversationIds.forEach((id) => delete rest[id])\n try {\n if (Object.keys(rest).length === 0) storage()?.removeItem(LEGACY_THREAD_DOCUMENTS_KEY)\n else storage()?.setItem(LEGACY_THREAD_DOCUMENTS_KEY, JSON.stringify(rest))\n } catch {\n // Blocked: nothing more to do.\n }\n}\n"]}
package/dist/index.cjs CHANGED
@@ -5,7 +5,7 @@ var chunkKFFH2JJM_cjs = require('./chunk-KFFH2JJM.cjs');
5
5
  var chunkCNRF5SLZ_cjs = require('./chunk-CNRF5SLZ.cjs');
6
6
  var chunk2M4B4FFA_cjs = require('./chunk-2M4B4FFA.cjs');
7
7
  var chunkH4FGDXYB_cjs = require('./chunk-H4FGDXYB.cjs');
8
- var chunkXTYG5SIL_cjs = require('./chunk-XTYG5SIL.cjs');
8
+ var chunkYBIW7T66_cjs = require('./chunk-YBIW7T66.cjs');
9
9
  var chunkVAMPYLQ4_cjs = require('./chunk-VAMPYLQ4.cjs');
10
10
  var chunkN73IMVFF_cjs = require('./chunk-N73IMVFF.cjs');
11
11
  var chunkZWFMFOGP_cjs = require('./chunk-ZWFMFOGP.cjs');
@@ -14,7 +14,7 @@ var chunk7NHOKV7N_cjs = require('./chunk-7NHOKV7N.cjs');
14
14
  var chunkEEIYXVM4_cjs = require('./chunk-EEIYXVM4.cjs');
15
15
  var chunkOC7F5SNA_cjs = require('./chunk-OC7F5SNA.cjs');
16
16
  var chunkWYZJLZ67_cjs = require('./chunk-WYZJLZ67.cjs');
17
- var chunkHUZB36QU_cjs = require('./chunk-HUZB36QU.cjs');
17
+ var chunk5YWIUUUT_cjs = require('./chunk-5YWIUUUT.cjs');
18
18
  var chunkHJDR5HEO_cjs = require('./chunk-HJDR5HEO.cjs');
19
19
  var chunkZ3LLUO32_cjs = require('./chunk-Z3LLUO32.cjs');
20
20
  var chunkS6A6FSG7_cjs = require('./chunk-S6A6FSG7.cjs');
@@ -41,7 +41,7 @@ var ReactMarkdown__default = /*#__PURE__*/_interopDefault(ReactMarkdown);
41
41
  var Cropper__default = /*#__PURE__*/_interopDefault(Cropper);
42
42
 
43
43
  // src/host/index.ts
44
- var ArbiHost2 = chunkXTYG5SIL_cjs.ArbiHost;
44
+ var ArbiHost2 = chunkYBIW7T66_cjs.ArbiHost;
45
45
  function isActivityKey(queryKey, conversationId) {
46
46
  const [scope, resource, id, leaf] = queryKey;
47
47
  if (scope !== "arbi" || resource !== "conversations" || leaf !== "activity") return false;
@@ -1336,7 +1336,7 @@ function cachedAssistantMode(queryClient, conversationId, newMode) {
1336
1336
  return chunk4VQ3XHAQ_cjs.findConversation(queryClient, conversationId)?.assistant_mode ?? "always";
1337
1337
  }
1338
1338
  function isCommentToPeople(queryClient, conversationId, content, candidates) {
1339
- const mentioned = chunkXTYG5SIL_cjs.extractMentions(content, candidates);
1339
+ const mentioned = chunkYBIW7T66_cjs.extractMentions(content, candidates);
1340
1340
  if (mentioned.some((c) => c.kind === "assistant")) return false;
1341
1341
  if (chunk4VQ3XHAQ_cjs.isConversationShared(queryClient, conversationId)) return true;
1342
1342
  if (mentioned.some((c) => c.kind === "user")) return true;
@@ -1518,11 +1518,11 @@ function useApplyChatModel() {
1518
1518
 
1519
1519
  // src/chat/thread-binding.ts
1520
1520
  function threadBinding(queryClient, conversationId) {
1521
- if (!conversationId) return chunkXTYG5SIL_cjs.UNBOUND;
1521
+ if (!conversationId) return chunkYBIW7T66_cjs.UNBOUND;
1522
1522
  const row = chunk4VQ3XHAQ_cjs.findConversation(queryClient, conversationId);
1523
- if (row) return chunkXTYG5SIL_cjs.bindingOfRow(row);
1523
+ if (row) return chunkYBIW7T66_cjs.bindingOfRow(row);
1524
1524
  const threads = queryClient.getQueryData(getThreadsQueryKey(conversationId));
1525
- return chunkXTYG5SIL_cjs.bindingOfRow(threads ? { external_id: conversationId, ...threads } : null);
1525
+ return chunkYBIW7T66_cjs.bindingOfRow(threads ? { external_id: conversationId, ...threads } : null);
1526
1526
  }
1527
1527
  function boundDocumentOf(queryClient, state) {
1528
1528
  return state.conversationId ? threadBinding(queryClient, state.conversationId).documentId : state.newChatDocumentId;
@@ -1547,7 +1547,7 @@ async function bindThreadDocument(arbi, queryClient, conversationId, documentId)
1547
1547
  bound_document_ext_id: documentId
1548
1548
  });
1549
1549
  chunk4VQ3XHAQ_cjs.patchConversation(queryClient, conversationId, saved);
1550
- cacheThreadBinding(queryClient, conversationId, chunkXTYG5SIL_cjs.bindingOfRow(saved));
1550
+ cacheThreadBinding(queryClient, conversationId, chunkYBIW7T66_cjs.bindingOfRow(saved));
1551
1551
  } catch (error) {
1552
1552
  cacheThreadBinding(queryClient, conversationId, before);
1553
1553
  throw error;
@@ -1559,14 +1559,14 @@ function adoptNewChatDocument(session, queryClient, conversationId, documentId =
1559
1559
  if (session.getState().newChatDocumentId === documentId) session.setNewChatDocumentId(null);
1560
1560
  }
1561
1561
  async function migrateLegacyThreadDocuments(arbi, queryClient, conversations) {
1562
- const legacy = chunkXTYG5SIL_cjs.readLegacyThreadDocuments();
1562
+ const legacy = chunkYBIW7T66_cjs.readLegacyThreadDocuments();
1563
1563
  const listed = conversations.filter(
1564
1564
  (c) => c.external_id in legacy && "bound_document_unavailable" in c
1565
1565
  );
1566
1566
  if (listed.length === 0) return;
1567
1567
  await Promise.all(
1568
1568
  listed.map(async (row) => {
1569
- const server = chunkXTYG5SIL_cjs.bindingOfRow(row);
1569
+ const server = chunkYBIW7T66_cjs.bindingOfRow(row);
1570
1570
  if (server.documentId || server.unavailable) return;
1571
1571
  try {
1572
1572
  await bindThreadDocument(arbi, queryClient, row.external_id, legacy[row.external_id]);
@@ -1574,7 +1574,7 @@ async function migrateLegacyThreadDocuments(arbi, queryClient, conversations) {
1574
1574
  }
1575
1575
  })
1576
1576
  );
1577
- chunkXTYG5SIL_cjs.forgetLegacyThreadDocuments(listed.map((c) => c.external_id));
1577
+ chunkYBIW7T66_cjs.forgetLegacyThreadDocuments(listed.map((c) => c.external_id));
1578
1578
  }
1579
1579
  function resolveReplyTarget(queryClient, conversationId, parentId) {
1580
1580
  if (!parentId) return null;
@@ -3912,10 +3912,10 @@ function useConversationActions({
3912
3912
  (content) => {
3913
3913
  const { conversationId: convId, newConversationAssistantMode } = session.getState();
3914
3914
  const candidates = mentionCandidates();
3915
- const mentioned = chunkXTYG5SIL_cjs.extractMentions(content, candidates);
3915
+ const mentioned = chunkYBIW7T66_cjs.extractMentions(content, candidates);
3916
3916
  const assistantMode = cachedAssistantMode(queryClient, convId, newConversationAssistantMode);
3917
3917
  const isComment = isCommentToPeople(queryClient, convId, content, candidates);
3918
- const mentions = chunkXTYG5SIL_cjs.toMessageMentions(mentioned);
3918
+ const mentions = chunkYBIW7T66_cjs.toMessageMentions(mentioned);
3919
3919
  if (!isComment && assistantMode === "mentioned" && !mentions.some((m) => m.type === "assistant")) {
3920
3920
  mentions.push({ type: "assistant" });
3921
3921
  }
@@ -4017,7 +4017,7 @@ function useConversationActions({
4017
4017
  const resolvedConfigId = newConfigId || (agentExtId ? void 0 : lastConfigId);
4018
4018
  const isPaMode = !agentExtId && state.paMode;
4019
4019
  const threadDocumentId = boundDocumentOf(queryClient, state);
4020
- const activeArtifactExtId = isPaMode ? null : chunkXTYG5SIL_cjs.takeDocumentForTurn({
4020
+ const activeArtifactExtId = isPaMode ? null : chunkYBIW7T66_cjs.takeDocumentForTurn({
4021
4021
  boundDocumentId: threadDocumentId,
4022
4022
  conversationId: convId,
4023
4023
  workspaceId: selectedWorkspaceId
@@ -4251,7 +4251,7 @@ function useConversationActions({
4251
4251
  const handleSendMessage = React.useCallback(
4252
4252
  async (options) => {
4253
4253
  const currentMessage = chunkCNRF5SLZ_cjs.selectDraft(session.getState()).trim();
4254
- if (!selectedWorkspaceId || !chunkXTYG5SIL_cjs.hasMessageBody(currentMessage)) return;
4254
+ if (!selectedWorkspaceId || !chunkYBIW7T66_cjs.hasMessageBody(currentMessage)) return;
4255
4255
  session.setSuggestedQuery(null);
4256
4256
  if (refuseChatWhenOffline()) return;
4257
4257
  if (isGenerating) {
@@ -9832,7 +9832,7 @@ var IDLE = {
9832
9832
  };
9833
9833
  function useSemanticSearch(docIds = [], options = {}) {
9834
9834
  const arbi = chunkQQ7SCJRY_cjs.useArbi();
9835
- const [ownSession] = React.useState(chunkXTYG5SIL_cjs.createSearchSession);
9835
+ const [ownSession] = React.useState(chunkYBIW7T66_cjs.createSearchSession);
9836
9836
  const session = options.session ?? ownSession;
9837
9837
  const { model, workspaceId } = options;
9838
9838
  const state = React.useSyncExternalStore(session.subscribe, session.getState, session.getState);
@@ -9841,7 +9841,7 @@ function useSemanticSearch(docIds = [], options = {}) {
9841
9841
  if (!workspaceId) return;
9842
9842
  const current = session.getState().workspaceId;
9843
9843
  if (current !== workspaceId) {
9844
- if (current) chunkXTYG5SIL_cjs.clearSearchSession(workspaceId, session);
9844
+ if (current) chunkYBIW7T66_cjs.clearSearchSession(workspaceId, session);
9845
9845
  else session.setState({ workspaceId });
9846
9846
  }
9847
9847
  }, [session, workspaceId]);
@@ -9849,7 +9849,7 @@ function useSemanticSearch(docIds = [], options = {}) {
9849
9849
  async (query, mode = "hybrid") => {
9850
9850
  const trimmed = query.trim();
9851
9851
  if (!trimmed) {
9852
- chunkXTYG5SIL_cjs.clearSearchSession(void 0, session);
9852
+ chunkYBIW7T66_cjs.clearSearchSession(void 0, session);
9853
9853
  return;
9854
9854
  }
9855
9855
  const run = session.getState().run + 1;
@@ -9878,7 +9878,7 @@ function useSemanticSearch(docIds = [], options = {}) {
9878
9878
  },
9879
9879
  [arbi, docIds, model, session, workspaceId]
9880
9880
  );
9881
- const clear = React.useCallback(() => chunkXTYG5SIL_cjs.clearSearchSession(void 0, session), [session]);
9881
+ const clear = React.useCallback(() => chunkYBIW7T66_cjs.clearSearchSession(void 0, session), [session]);
9882
9882
  const shown = foreign ? IDLE : state;
9883
9883
  return {
9884
9884
  query: shown.query,
@@ -11367,7 +11367,7 @@ function ConversationList({
11367
11367
  children: c.subtitle ?? preview
11368
11368
  }
11369
11369
  ),
11370
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0 text-xs text-muted-foreground", children: lastMessage ? chunkXTYG5SIL_cjs.formatRelativeTime(lastMessage.createdAt) : "" })
11370
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0 text-xs text-muted-foreground", children: lastMessage ? chunk5YWIUUUT_cjs.formatRelativeTime(lastMessage.createdAt) : "" })
11371
11371
  ] })
11372
11372
  ] })
11373
11373
  ] });
@@ -13415,127 +13415,123 @@ Object.defineProperty(exports, "mailQueryKeys", {
13415
13415
  });
13416
13416
  Object.defineProperty(exports, "LEGACY_THREAD_DOCUMENTS_KEY", {
13417
13417
  enumerable: true,
13418
- get: function () { return chunkXTYG5SIL_cjs.LEGACY_THREAD_DOCUMENTS_KEY; }
13418
+ get: function () { return chunkYBIW7T66_cjs.LEGACY_THREAD_DOCUMENTS_KEY; }
13419
13419
  });
13420
13420
  Object.defineProperty(exports, "MENTION_HREF_PREFIX", {
13421
13421
  enumerable: true,
13422
- get: function () { return chunkXTYG5SIL_cjs.MENTION_HREF_PREFIX; }
13422
+ get: function () { return chunkYBIW7T66_cjs.MENTION_HREF_PREFIX; }
13423
13423
  });
13424
13424
  Object.defineProperty(exports, "NotificationBell", {
13425
13425
  enumerable: true,
13426
- get: function () { return chunkXTYG5SIL_cjs.NotificationBell; }
13426
+ get: function () { return chunkYBIW7T66_cjs.NotificationBell; }
13427
13427
  });
13428
13428
  Object.defineProperty(exports, "Toaster", {
13429
13429
  enumerable: true,
13430
- get: function () { return chunkXTYG5SIL_cjs.Toaster; }
13430
+ get: function () { return chunkYBIW7T66_cjs.Toaster; }
13431
13431
  });
13432
13432
  Object.defineProperty(exports, "UNBOUND", {
13433
13433
  enumerable: true,
13434
- get: function () { return chunkXTYG5SIL_cjs.UNBOUND; }
13434
+ get: function () { return chunkYBIW7T66_cjs.UNBOUND; }
13435
13435
  });
13436
13436
  Object.defineProperty(exports, "bindingOfRow", {
13437
13437
  enumerable: true,
13438
- get: function () { return chunkXTYG5SIL_cjs.bindingOfRow; }
13438
+ get: function () { return chunkYBIW7T66_cjs.bindingOfRow; }
13439
13439
  });
13440
13440
  Object.defineProperty(exports, "clearSearchSession", {
13441
13441
  enumerable: true,
13442
- get: function () { return chunkXTYG5SIL_cjs.clearSearchSession; }
13442
+ get: function () { return chunkYBIW7T66_cjs.clearSearchSession; }
13443
13443
  });
13444
13444
  Object.defineProperty(exports, "createSearchSession", {
13445
13445
  enumerable: true,
13446
- get: function () { return chunkXTYG5SIL_cjs.createSearchSession; }
13446
+ get: function () { return chunkYBIW7T66_cjs.createSearchSession; }
13447
13447
  });
13448
13448
  Object.defineProperty(exports, "extractMentions", {
13449
13449
  enumerable: true,
13450
- get: function () { return chunkXTYG5SIL_cjs.extractMentions; }
13450
+ get: function () { return chunkYBIW7T66_cjs.extractMentions; }
13451
13451
  });
13452
13452
  Object.defineProperty(exports, "filterMentionCandidates", {
13453
13453
  enumerable: true,
13454
- get: function () { return chunkXTYG5SIL_cjs.filterMentionCandidates; }
13454
+ get: function () { return chunkYBIW7T66_cjs.filterMentionCandidates; }
13455
13455
  });
13456
13456
  Object.defineProperty(exports, "findMentionQuery", {
13457
13457
  enumerable: true,
13458
- get: function () { return chunkXTYG5SIL_cjs.findMentionQuery; }
13458
+ get: function () { return chunkYBIW7T66_cjs.findMentionQuery; }
13459
13459
  });
13460
13460
  Object.defineProperty(exports, "forgetLegacyThreadDocuments", {
13461
13461
  enumerable: true,
13462
- get: function () { return chunkXTYG5SIL_cjs.forgetLegacyThreadDocuments; }
13463
- });
13464
- Object.defineProperty(exports, "formatRelativeTime", {
13465
- enumerable: true,
13466
- get: function () { return chunkXTYG5SIL_cjs.formatRelativeTime; }
13462
+ get: function () { return chunkYBIW7T66_cjs.forgetLegacyThreadDocuments; }
13467
13463
  });
13468
13464
  Object.defineProperty(exports, "hasMessageBody", {
13469
13465
  enumerable: true,
13470
- get: function () { return chunkXTYG5SIL_cjs.hasMessageBody; }
13466
+ get: function () { return chunkYBIW7T66_cjs.hasMessageBody; }
13471
13467
  });
13472
13468
  Object.defineProperty(exports, "insertMention", {
13473
13469
  enumerable: true,
13474
- get: function () { return chunkXTYG5SIL_cjs.insertMention; }
13470
+ get: function () { return chunkYBIW7T66_cjs.insertMention; }
13475
13471
  });
13476
13472
  Object.defineProperty(exports, "latestThreadOfDocument", {
13477
13473
  enumerable: true,
13478
- get: function () { return chunkXTYG5SIL_cjs.latestThreadOfDocument; }
13474
+ get: function () { return chunkYBIW7T66_cjs.latestThreadOfDocument; }
13479
13475
  });
13480
13476
  Object.defineProperty(exports, "linkMentions", {
13481
13477
  enumerable: true,
13482
- get: function () { return chunkXTYG5SIL_cjs.linkMentions; }
13478
+ get: function () { return chunkYBIW7T66_cjs.linkMentions; }
13483
13479
  });
13484
13480
  Object.defineProperty(exports, "mentionFromHref", {
13485
13481
  enumerable: true,
13486
- get: function () { return chunkXTYG5SIL_cjs.mentionFromHref; }
13482
+ get: function () { return chunkYBIW7T66_cjs.mentionFromHref; }
13487
13483
  });
13488
13484
  Object.defineProperty(exports, "openDocumentId", {
13489
13485
  enumerable: true,
13490
- get: function () { return chunkXTYG5SIL_cjs.openDocumentId; }
13486
+ get: function () { return chunkYBIW7T66_cjs.openDocumentId; }
13491
13487
  });
13492
13488
  Object.defineProperty(exports, "opensInWord", {
13493
13489
  enumerable: true,
13494
- get: function () { return chunkXTYG5SIL_cjs.opensInWord; }
13490
+ get: function () { return chunkYBIW7T66_cjs.opensInWord; }
13495
13491
  });
13496
13492
  Object.defineProperty(exports, "persistSearchSession", {
13497
13493
  enumerable: true,
13498
- get: function () { return chunkXTYG5SIL_cjs.persistSearchSession; }
13494
+ get: function () { return chunkYBIW7T66_cjs.persistSearchSession; }
13499
13495
  });
13500
13496
  Object.defineProperty(exports, "readLegacyThreadDocuments", {
13501
13497
  enumerable: true,
13502
- get: function () { return chunkXTYG5SIL_cjs.readLegacyThreadDocuments; }
13498
+ get: function () { return chunkYBIW7T66_cjs.readLegacyThreadDocuments; }
13503
13499
  });
13504
13500
  Object.defineProperty(exports, "requestSearch", {
13505
13501
  enumerable: true,
13506
- get: function () { return chunkXTYG5SIL_cjs.requestSearch; }
13502
+ get: function () { return chunkYBIW7T66_cjs.requestSearch; }
13507
13503
  });
13508
13504
  Object.defineProperty(exports, "savedDocumentIdFor", {
13509
13505
  enumerable: true,
13510
- get: function () { return chunkXTYG5SIL_cjs.savedDocumentIdFor; }
13506
+ get: function () { return chunkYBIW7T66_cjs.savedDocumentIdFor; }
13511
13507
  });
13512
13508
  Object.defineProperty(exports, "sharedSearchSession", {
13513
13509
  enumerable: true,
13514
- get: function () { return chunkXTYG5SIL_cjs.sharedSearchSession; }
13510
+ get: function () { return chunkYBIW7T66_cjs.sharedSearchSession; }
13515
13511
  });
13516
13512
  Object.defineProperty(exports, "takeDocumentForTurn", {
13517
13513
  enumerable: true,
13518
- get: function () { return chunkXTYG5SIL_cjs.takeDocumentForTurn; }
13514
+ get: function () { return chunkYBIW7T66_cjs.takeDocumentForTurn; }
13519
13515
  });
13520
13516
  Object.defineProperty(exports, "takePendingSearch", {
13521
13517
  enumerable: true,
13522
- get: function () { return chunkXTYG5SIL_cjs.takePendingSearch; }
13518
+ get: function () { return chunkYBIW7T66_cjs.takePendingSearch; }
13523
13519
  });
13524
13520
  Object.defineProperty(exports, "toMessageMentions", {
13525
13521
  enumerable: true,
13526
- get: function () { return chunkXTYG5SIL_cjs.toMessageMentions; }
13522
+ get: function () { return chunkYBIW7T66_cjs.toMessageMentions; }
13527
13523
  });
13528
13524
  Object.defineProperty(exports, "useOpenDocumentId", {
13529
13525
  enumerable: true,
13530
- get: function () { return chunkXTYG5SIL_cjs.useOpenDocumentId; }
13526
+ get: function () { return chunkYBIW7T66_cjs.useOpenDocumentId; }
13531
13527
  });
13532
13528
  Object.defineProperty(exports, "useRegisterOpenDocument", {
13533
13529
  enumerable: true,
13534
- get: function () { return chunkXTYG5SIL_cjs.useRegisterOpenDocument; }
13530
+ get: function () { return chunkYBIW7T66_cjs.useRegisterOpenDocument; }
13535
13531
  });
13536
13532
  Object.defineProperty(exports, "useTurnDocumentId", {
13537
13533
  enumerable: true,
13538
- get: function () { return chunkXTYG5SIL_cjs.useTurnDocumentId; }
13534
+ get: function () { return chunkYBIW7T66_cjs.useTurnDocumentId; }
13539
13535
  });
13540
13536
  Object.defineProperty(exports, "DEFAULT_NOTIFY_TONE", {
13541
13537
  enumerable: true,
@@ -14423,11 +14419,15 @@ Object.defineProperty(exports, "buttonVariants", {
14423
14419
  });
14424
14420
  Object.defineProperty(exports, "ScrollArea", {
14425
14421
  enumerable: true,
14426
- get: function () { return chunkHUZB36QU_cjs.ScrollArea; }
14422
+ get: function () { return chunk5YWIUUUT_cjs.ScrollArea; }
14427
14423
  });
14428
14424
  Object.defineProperty(exports, "ScrollBar", {
14429
14425
  enumerable: true,
14430
- get: function () { return chunkHUZB36QU_cjs.ScrollBar; }
14426
+ get: function () { return chunk5YWIUUUT_cjs.ScrollBar; }
14427
+ });
14428
+ Object.defineProperty(exports, "formatRelativeTime", {
14429
+ enumerable: true,
14430
+ get: function () { return chunk5YWIUUUT_cjs.formatRelativeTime; }
14431
14431
  });
14432
14432
  Object.defineProperty(exports, "DropdownMenu", {
14433
14433
  enumerable: true,
@@ -1760,6 +1760,20 @@ declare function isDownloadOnlyFile(fileName: string | null | undefined): boolea
1760
1760
  */
1761
1761
  declare function friendlyFileType(fileType?: string | null, fileName?: string | null): string;
1762
1762
 
1763
+ /** The one relative-time formatter: the notification bell, the DM kit, thread lists, webinar
1764
+ * panels, workspace cards, connector syncs and studio widgets all use it (no type imports, so the
1765
+ * SDK-free `/shell` and `/ui` entries can use it). */
1766
+ interface FormatRelativeTimeOptions {
1767
+ /** The reference instant in epoch milliseconds (default: now). */
1768
+ now?: number;
1769
+ /** `long` (default): "2 hours ago"; `short`: "2 hr. ago", for tight rows; `compact`: "2h ago",
1770
+ * for status lines and dense widgets. */
1771
+ style?: Intl.RelativeTimeFormatStyle | 'compact';
1772
+ }
1773
+ /** Relative time of an ISO timestamp, past or future: "2 hours ago", "in 3 days", "just now".
1774
+ * Empty for an unparseable timestamp. */
1775
+ declare function formatRelativeTime(iso: string, options?: FormatRelativeTimeOptions): string;
1776
+
1763
1777
  interface UserMenuItem {
1764
1778
  label: string;
1765
1779
  icon?: ComponentType<{
@@ -2030,4 +2044,4 @@ declare function createUserAvatarIcon(user: {
2030
2044
 
2031
2045
  declare function cn(...inputs: ClassValue[]): string;
2032
2046
 
2033
- export { DropdownMenu as $, ARBI_MARK_SRC as A, BASE_COLORS as B, COLUMN_LABEL_FALLBACKS as C, CommandItem as D, CommandList as E, CommandSeparator as F, CommandShortcut as G, DEFAULT_METADATA_TAGS as H, DebouncedInput as I, type DebouncedInputProps as J, Dialog as K, DialogClose as L, DialogContent as M, DialogDescription as N, DialogFooter as O, DialogHeader as P, DialogOverlay as Q, DialogPortal as R, type DialogPresentation as S, DialogTitle as T, DialogTrigger as U, type DictateContextValue as V, DocumentCard as W, type DocumentCardProps as X, DocumentEntity as Y, type DocumentEntityProps as Z, type DocumentLike as _, AgentBadge as a, RadioGroupItem as a$, DropdownMenuCheckboxItem as a0, DropdownMenuContent as a1, DropdownMenuGroup as a2, DropdownMenuItem as a3, DropdownMenuLabel as a4, DropdownMenuPortal as a5, DropdownMenuRadioGroup as a6, DropdownMenuRadioItem as a7, DropdownMenuSeparator as a8, DropdownMenuShortcut as a9, Label as aA, MarkMenu as aB, type MarkMenuItem as aC, type MarkMenuProps as aD, MarkdownCode as aE, MarkdownLink as aF, MarkdownRenderer as aG, type MarkdownRendererProps as aH, MarkdownStreamingContext as aI, NEUTRAL_GRAY as aJ, PLACEHOLDER_COLOR as aK, PassageCard as aL, type PassageCardProps as aM, Popover as aN, PopoverAnchor as aO, PopoverClose as aP, PopoverContent as aQ, PopoverTrigger as aR, PortalContainerProvider as aS, type PresenceDisplayStatus as aT, PresenceLabel as aU, Progress as aV, ProjectEntity as aW, type ProjectEntityProps as aX, type ProjectRelation as aY, ProviderIcon as aZ, RadioGroup as a_, DropdownMenuSub as aa, DropdownMenuSubContent as ab, DropdownMenuSubTrigger as ac, DropdownMenuTrigger as ad, ENTITY_MAPPINGS as ae, EntityIcon as af, type EntityIconComponent as ag, EntityPill as ah, type EntityRegistryOverride as ai, type EntityType as aj, type FileTypeIcon as ak, type FolderTreeNode as al, HoverCard as am, HoverCardContent as an, HoverCardTrigger as ao, IconToggle as ap, type IconToggleProps as aq, type IdentityBusy as ar, type IdentityProblem as as, type IdentityPurchase as at, type IdentityState as au, type IdentityStatus as av, type IdentityStep as aw, type IdentityVerificationFlow as ax, Input as ay, type InputProps as az, AiMarkdown as b, VisibilityToggle as b$, type Rag as b0, RagDot as b1, RelevanceDot as b2, ScrollArea as b3, ScrollBar as b4, Select as b5, SelectContent as b6, SelectGroup as b7, SelectItem as b8, SelectLabel as b9, TabsContent as bA, TabsList as bB, TabsTrigger as bC, TagEntity as bD, type TagEntityProps as bE, type TagLike as bF, Textarea as bG, type TextareaProps as bH, ThreadVisibilityIcon as bI, Toggle as bJ, ToggleGroup as bK, ToggleGroupItem as bL, Tooltip as bM, TooltipContent as bN, TooltipProvider as bO, TooltipTrigger as bP, UserEntity as bQ, type UserEntityProps as bR, UserMenu as bS, type UserMenuItem as bT, type UserMenuProps as bU, type UserMenuStatus as bV, VISIBILITY_ICONS as bW, VerifiedBadge as bX, type VerifiedBadgeProps as bY, VerifiedToggle as bZ, VisibilityIcon as b_, SelectScrollDownButton as ba, SelectScrollUpButton as bb, SelectSeparator as bc, SelectTrigger as bd, SelectValue as be, Separator as bf, ShieldIcon as bg, type ShieldIconProps as bh, Slider as bi, type StatusBadgeComponent as bj, type StatusBadgeProps as bk, StatusPill as bl, type StatusPillProps as bm, type StatusVariant as bn, Switch as bo, TAG_TYPE_ICONS as bp, TAG_TYPE_LABELS as bq, Table as br, TableBody as bs, TableCaption as bt, TableCell as bu, TableFooter as bv, TableHead as bw, TableHeader as bx, TableRow as by, Tabs as bz, ArbiIcon as c, type VisibilityToggleProps as c0, agentAvatarColors as c1, badgeVariants as c2, buildFolderTree as c3, buttonVariants as c4, canonicalFolderPath as c5, cardVariants as c6, closeOpenEmphasis as c7, cn as c8, configureEntityRegistry as c9, getWorkspaceColor as cA, isAgent as cB, isAudioFile as cC, isDocumentAddableToConversation as cD, isDownloadOnlyFile as cE, isImageDocument as cF, isImageFile as cG, isMediaFile as cH, isVideoFile as cI, markdownBaseComponents as cJ, markdownSanitizeSchema as cK, markdownToPlainText as cL, markdownToPlainTextBlocks as cM, normalizeCitationMarkup as cN, splitMarkdownBlocks as cO, tagKindNouns as cP, tagKindTitle as cQ, toggleVariants as cR, trimOpenCitation as cS, useDictateContext as cT, usePortalContainer as cU, usesOriginalBytesForViewer as cV, configureRagLabels as ca, configureStatusRegistry as cb, createUserAvatarIcon as cc, extensionFromMime as cd, formatDocDate as ce, formatFolderLabel as cf, formatFriendlyDate as cg, friendlyFileType as ch, getDocIcon as ci, getDocumentAuthor as cj, getDocumentDate as ck, getDocumentNature as cl, getDocumentSubject as cm, getDocumentTitle as cn, getEntityColor as co, getEntityColorStyles as cp, getEntityIcon as cq, getEntityLabel as cr, getFileExtension as cs, getFileTypeIcon as ct, getStatusVariant as cu, getTagTypeIcon as cv, getTagTypeLabel as cw, getUserAvatarColor as cx, getUserDisplayName as cy, getUserInitials as cz, Avatar as d, AvatarFallback as e, AvatarImage as f, Badge as g, type BadgeProps as h, Button as i, type ButtonProps as j, Card as k, CardContent as l, CardDescription as m, CardFooter as n, CardHeader as o, type CardProps as p, CardTitle as q, Checkbox as r, Collapsible as s, CollapsibleContent as t, CollapsibleTrigger as u, Command as v, CommandDialog as w, CommandEmpty as x, CommandGroup as y, CommandInput as z };
2047
+ export { DropdownMenu as $, ARBI_MARK_SRC as A, BASE_COLORS as B, COLUMN_LABEL_FALLBACKS as C, CommandItem as D, CommandList as E, CommandSeparator as F, CommandShortcut as G, DEFAULT_METADATA_TAGS as H, DebouncedInput as I, type DebouncedInputProps as J, Dialog as K, DialogClose as L, DialogContent as M, DialogDescription as N, DialogFooter as O, DialogHeader as P, DialogOverlay as Q, DialogPortal as R, type DialogPresentation as S, DialogTitle as T, DialogTrigger as U, type DictateContextValue as V, DocumentCard as W, type DocumentCardProps as X, DocumentEntity as Y, type DocumentEntityProps as Z, type DocumentLike as _, AgentBadge as a, RadioGroup as a$, DropdownMenuCheckboxItem as a0, DropdownMenuContent as a1, DropdownMenuGroup as a2, DropdownMenuItem as a3, DropdownMenuLabel as a4, DropdownMenuPortal as a5, DropdownMenuRadioGroup as a6, DropdownMenuRadioItem as a7, DropdownMenuSeparator as a8, DropdownMenuShortcut as a9, type InputProps as aA, Label as aB, MarkMenu as aC, type MarkMenuItem as aD, type MarkMenuProps as aE, MarkdownCode as aF, MarkdownLink as aG, MarkdownRenderer as aH, type MarkdownRendererProps as aI, MarkdownStreamingContext as aJ, NEUTRAL_GRAY as aK, PLACEHOLDER_COLOR as aL, PassageCard as aM, type PassageCardProps as aN, Popover as aO, PopoverAnchor as aP, PopoverClose as aQ, PopoverContent as aR, PopoverTrigger as aS, PortalContainerProvider as aT, type PresenceDisplayStatus as aU, PresenceLabel as aV, Progress as aW, ProjectEntity as aX, type ProjectEntityProps as aY, type ProjectRelation as aZ, ProviderIcon as a_, DropdownMenuSub as aa, DropdownMenuSubContent as ab, DropdownMenuSubTrigger as ac, DropdownMenuTrigger as ad, ENTITY_MAPPINGS as ae, EntityIcon as af, type EntityIconComponent as ag, EntityPill as ah, type EntityRegistryOverride as ai, type EntityType as aj, type FileTypeIcon as ak, type FolderTreeNode as al, type FormatRelativeTimeOptions as am, HoverCard as an, HoverCardContent as ao, HoverCardTrigger as ap, IconToggle as aq, type IconToggleProps as ar, type IdentityBusy as as, type IdentityProblem as at, type IdentityPurchase as au, type IdentityState as av, type IdentityStatus as aw, type IdentityStep as ax, type IdentityVerificationFlow as ay, Input as az, AiMarkdown as b, VisibilityIcon as b$, RadioGroupItem as b0, type Rag as b1, RagDot as b2, RelevanceDot as b3, ScrollArea as b4, ScrollBar as b5, Select as b6, SelectContent as b7, SelectGroup as b8, SelectItem as b9, Tabs as bA, TabsContent as bB, TabsList as bC, TabsTrigger as bD, TagEntity as bE, type TagEntityProps as bF, type TagLike as bG, Textarea as bH, type TextareaProps as bI, ThreadVisibilityIcon as bJ, Toggle as bK, ToggleGroup as bL, ToggleGroupItem as bM, Tooltip as bN, TooltipContent as bO, TooltipProvider as bP, TooltipTrigger as bQ, UserEntity as bR, type UserEntityProps as bS, UserMenu as bT, type UserMenuItem as bU, type UserMenuProps as bV, type UserMenuStatus as bW, VISIBILITY_ICONS as bX, VerifiedBadge as bY, type VerifiedBadgeProps as bZ, VerifiedToggle as b_, SelectLabel as ba, SelectScrollDownButton as bb, SelectScrollUpButton as bc, SelectSeparator as bd, SelectTrigger as be, SelectValue as bf, Separator as bg, ShieldIcon as bh, type ShieldIconProps as bi, Slider as bj, type StatusBadgeComponent as bk, type StatusBadgeProps as bl, StatusPill as bm, type StatusPillProps as bn, type StatusVariant as bo, Switch as bp, TAG_TYPE_ICONS as bq, TAG_TYPE_LABELS as br, Table as bs, TableBody as bt, TableCaption as bu, TableCell as bv, TableFooter as bw, TableHead as bx, TableHeader as by, TableRow as bz, ArbiIcon as c, VisibilityToggle as c0, type VisibilityToggleProps as c1, agentAvatarColors as c2, badgeVariants as c3, buildFolderTree as c4, buttonVariants as c5, canonicalFolderPath as c6, cardVariants as c7, closeOpenEmphasis as c8, cn as c9, getUserDisplayName as cA, getUserInitials as cB, getWorkspaceColor as cC, isAgent as cD, isAudioFile as cE, isDocumentAddableToConversation as cF, isDownloadOnlyFile as cG, isImageDocument as cH, isImageFile as cI, isMediaFile as cJ, isVideoFile as cK, markdownBaseComponents as cL, markdownSanitizeSchema as cM, markdownToPlainText as cN, markdownToPlainTextBlocks as cO, normalizeCitationMarkup as cP, splitMarkdownBlocks as cQ, tagKindNouns as cR, tagKindTitle as cS, toggleVariants as cT, trimOpenCitation as cU, useDictateContext as cV, usePortalContainer as cW, usesOriginalBytesForViewer as cX, configureEntityRegistry as ca, configureRagLabels as cb, configureStatusRegistry as cc, createUserAvatarIcon as cd, extensionFromMime as ce, formatDocDate as cf, formatFolderLabel as cg, formatFriendlyDate as ch, formatRelativeTime as ci, friendlyFileType as cj, getDocIcon as ck, getDocumentAuthor as cl, getDocumentDate as cm, getDocumentNature as cn, getDocumentSubject as co, getDocumentTitle as cp, getEntityColor as cq, getEntityColorStyles as cr, getEntityIcon as cs, getEntityLabel as ct, getFileExtension as cu, getFileTypeIcon as cv, getStatusVariant as cw, getTagTypeIcon as cx, getTagTypeLabel as cy, getUserAvatarColor as cz, Avatar as d, AvatarFallback as e, AvatarImage as f, Badge as g, type BadgeProps as h, Button as i, type ButtonProps as j, Card as k, CardContent as l, CardDescription as m, CardFooter as n, CardHeader as o, type CardProps as p, CardTitle as q, Checkbox as r, Collapsible as s, CollapsibleContent as t, CollapsibleTrigger as u, Command as v, CommandDialog as w, CommandEmpty as x, CommandGroup as y, CommandInput as z };
@@ -1760,6 +1760,20 @@ declare function isDownloadOnlyFile(fileName: string | null | undefined): boolea
1760
1760
  */
1761
1761
  declare function friendlyFileType(fileType?: string | null, fileName?: string | null): string;
1762
1762
 
1763
+ /** The one relative-time formatter: the notification bell, the DM kit, thread lists, webinar
1764
+ * panels, workspace cards, connector syncs and studio widgets all use it (no type imports, so the
1765
+ * SDK-free `/shell` and `/ui` entries can use it). */
1766
+ interface FormatRelativeTimeOptions {
1767
+ /** The reference instant in epoch milliseconds (default: now). */
1768
+ now?: number;
1769
+ /** `long` (default): "2 hours ago"; `short`: "2 hr. ago", for tight rows; `compact`: "2h ago",
1770
+ * for status lines and dense widgets. */
1771
+ style?: Intl.RelativeTimeFormatStyle | 'compact';
1772
+ }
1773
+ /** Relative time of an ISO timestamp, past or future: "2 hours ago", "in 3 days", "just now".
1774
+ * Empty for an unparseable timestamp. */
1775
+ declare function formatRelativeTime(iso: string, options?: FormatRelativeTimeOptions): string;
1776
+
1763
1777
  interface UserMenuItem {
1764
1778
  label: string;
1765
1779
  icon?: ComponentType<{
@@ -2030,4 +2044,4 @@ declare function createUserAvatarIcon(user: {
2030
2044
 
2031
2045
  declare function cn(...inputs: ClassValue[]): string;
2032
2046
 
2033
- export { DropdownMenu as $, ARBI_MARK_SRC as A, BASE_COLORS as B, COLUMN_LABEL_FALLBACKS as C, CommandItem as D, CommandList as E, CommandSeparator as F, CommandShortcut as G, DEFAULT_METADATA_TAGS as H, DebouncedInput as I, type DebouncedInputProps as J, Dialog as K, DialogClose as L, DialogContent as M, DialogDescription as N, DialogFooter as O, DialogHeader as P, DialogOverlay as Q, DialogPortal as R, type DialogPresentation as S, DialogTitle as T, DialogTrigger as U, type DictateContextValue as V, DocumentCard as W, type DocumentCardProps as X, DocumentEntity as Y, type DocumentEntityProps as Z, type DocumentLike as _, AgentBadge as a, RadioGroupItem as a$, DropdownMenuCheckboxItem as a0, DropdownMenuContent as a1, DropdownMenuGroup as a2, DropdownMenuItem as a3, DropdownMenuLabel as a4, DropdownMenuPortal as a5, DropdownMenuRadioGroup as a6, DropdownMenuRadioItem as a7, DropdownMenuSeparator as a8, DropdownMenuShortcut as a9, Label as aA, MarkMenu as aB, type MarkMenuItem as aC, type MarkMenuProps as aD, MarkdownCode as aE, MarkdownLink as aF, MarkdownRenderer as aG, type MarkdownRendererProps as aH, MarkdownStreamingContext as aI, NEUTRAL_GRAY as aJ, PLACEHOLDER_COLOR as aK, PassageCard as aL, type PassageCardProps as aM, Popover as aN, PopoverAnchor as aO, PopoverClose as aP, PopoverContent as aQ, PopoverTrigger as aR, PortalContainerProvider as aS, type PresenceDisplayStatus as aT, PresenceLabel as aU, Progress as aV, ProjectEntity as aW, type ProjectEntityProps as aX, type ProjectRelation as aY, ProviderIcon as aZ, RadioGroup as a_, DropdownMenuSub as aa, DropdownMenuSubContent as ab, DropdownMenuSubTrigger as ac, DropdownMenuTrigger as ad, ENTITY_MAPPINGS as ae, EntityIcon as af, type EntityIconComponent as ag, EntityPill as ah, type EntityRegistryOverride as ai, type EntityType as aj, type FileTypeIcon as ak, type FolderTreeNode as al, HoverCard as am, HoverCardContent as an, HoverCardTrigger as ao, IconToggle as ap, type IconToggleProps as aq, type IdentityBusy as ar, type IdentityProblem as as, type IdentityPurchase as at, type IdentityState as au, type IdentityStatus as av, type IdentityStep as aw, type IdentityVerificationFlow as ax, Input as ay, type InputProps as az, AiMarkdown as b, VisibilityToggle as b$, type Rag as b0, RagDot as b1, RelevanceDot as b2, ScrollArea as b3, ScrollBar as b4, Select as b5, SelectContent as b6, SelectGroup as b7, SelectItem as b8, SelectLabel as b9, TabsContent as bA, TabsList as bB, TabsTrigger as bC, TagEntity as bD, type TagEntityProps as bE, type TagLike as bF, Textarea as bG, type TextareaProps as bH, ThreadVisibilityIcon as bI, Toggle as bJ, ToggleGroup as bK, ToggleGroupItem as bL, Tooltip as bM, TooltipContent as bN, TooltipProvider as bO, TooltipTrigger as bP, UserEntity as bQ, type UserEntityProps as bR, UserMenu as bS, type UserMenuItem as bT, type UserMenuProps as bU, type UserMenuStatus as bV, VISIBILITY_ICONS as bW, VerifiedBadge as bX, type VerifiedBadgeProps as bY, VerifiedToggle as bZ, VisibilityIcon as b_, SelectScrollDownButton as ba, SelectScrollUpButton as bb, SelectSeparator as bc, SelectTrigger as bd, SelectValue as be, Separator as bf, ShieldIcon as bg, type ShieldIconProps as bh, Slider as bi, type StatusBadgeComponent as bj, type StatusBadgeProps as bk, StatusPill as bl, type StatusPillProps as bm, type StatusVariant as bn, Switch as bo, TAG_TYPE_ICONS as bp, TAG_TYPE_LABELS as bq, Table as br, TableBody as bs, TableCaption as bt, TableCell as bu, TableFooter as bv, TableHead as bw, TableHeader as bx, TableRow as by, Tabs as bz, ArbiIcon as c, type VisibilityToggleProps as c0, agentAvatarColors as c1, badgeVariants as c2, buildFolderTree as c3, buttonVariants as c4, canonicalFolderPath as c5, cardVariants as c6, closeOpenEmphasis as c7, cn as c8, configureEntityRegistry as c9, getWorkspaceColor as cA, isAgent as cB, isAudioFile as cC, isDocumentAddableToConversation as cD, isDownloadOnlyFile as cE, isImageDocument as cF, isImageFile as cG, isMediaFile as cH, isVideoFile as cI, markdownBaseComponents as cJ, markdownSanitizeSchema as cK, markdownToPlainText as cL, markdownToPlainTextBlocks as cM, normalizeCitationMarkup as cN, splitMarkdownBlocks as cO, tagKindNouns as cP, tagKindTitle as cQ, toggleVariants as cR, trimOpenCitation as cS, useDictateContext as cT, usePortalContainer as cU, usesOriginalBytesForViewer as cV, configureRagLabels as ca, configureStatusRegistry as cb, createUserAvatarIcon as cc, extensionFromMime as cd, formatDocDate as ce, formatFolderLabel as cf, formatFriendlyDate as cg, friendlyFileType as ch, getDocIcon as ci, getDocumentAuthor as cj, getDocumentDate as ck, getDocumentNature as cl, getDocumentSubject as cm, getDocumentTitle as cn, getEntityColor as co, getEntityColorStyles as cp, getEntityIcon as cq, getEntityLabel as cr, getFileExtension as cs, getFileTypeIcon as ct, getStatusVariant as cu, getTagTypeIcon as cv, getTagTypeLabel as cw, getUserAvatarColor as cx, getUserDisplayName as cy, getUserInitials as cz, Avatar as d, AvatarFallback as e, AvatarImage as f, Badge as g, type BadgeProps as h, Button as i, type ButtonProps as j, Card as k, CardContent as l, CardDescription as m, CardFooter as n, CardHeader as o, type CardProps as p, CardTitle as q, Checkbox as r, Collapsible as s, CollapsibleContent as t, CollapsibleTrigger as u, Command as v, CommandDialog as w, CommandEmpty as x, CommandGroup as y, CommandInput as z };
2047
+ export { DropdownMenu as $, ARBI_MARK_SRC as A, BASE_COLORS as B, COLUMN_LABEL_FALLBACKS as C, CommandItem as D, CommandList as E, CommandSeparator as F, CommandShortcut as G, DEFAULT_METADATA_TAGS as H, DebouncedInput as I, type DebouncedInputProps as J, Dialog as K, DialogClose as L, DialogContent as M, DialogDescription as N, DialogFooter as O, DialogHeader as P, DialogOverlay as Q, DialogPortal as R, type DialogPresentation as S, DialogTitle as T, DialogTrigger as U, type DictateContextValue as V, DocumentCard as W, type DocumentCardProps as X, DocumentEntity as Y, type DocumentEntityProps as Z, type DocumentLike as _, AgentBadge as a, RadioGroup as a$, DropdownMenuCheckboxItem as a0, DropdownMenuContent as a1, DropdownMenuGroup as a2, DropdownMenuItem as a3, DropdownMenuLabel as a4, DropdownMenuPortal as a5, DropdownMenuRadioGroup as a6, DropdownMenuRadioItem as a7, DropdownMenuSeparator as a8, DropdownMenuShortcut as a9, type InputProps as aA, Label as aB, MarkMenu as aC, type MarkMenuItem as aD, type MarkMenuProps as aE, MarkdownCode as aF, MarkdownLink as aG, MarkdownRenderer as aH, type MarkdownRendererProps as aI, MarkdownStreamingContext as aJ, NEUTRAL_GRAY as aK, PLACEHOLDER_COLOR as aL, PassageCard as aM, type PassageCardProps as aN, Popover as aO, PopoverAnchor as aP, PopoverClose as aQ, PopoverContent as aR, PopoverTrigger as aS, PortalContainerProvider as aT, type PresenceDisplayStatus as aU, PresenceLabel as aV, Progress as aW, ProjectEntity as aX, type ProjectEntityProps as aY, type ProjectRelation as aZ, ProviderIcon as a_, DropdownMenuSub as aa, DropdownMenuSubContent as ab, DropdownMenuSubTrigger as ac, DropdownMenuTrigger as ad, ENTITY_MAPPINGS as ae, EntityIcon as af, type EntityIconComponent as ag, EntityPill as ah, type EntityRegistryOverride as ai, type EntityType as aj, type FileTypeIcon as ak, type FolderTreeNode as al, type FormatRelativeTimeOptions as am, HoverCard as an, HoverCardContent as ao, HoverCardTrigger as ap, IconToggle as aq, type IconToggleProps as ar, type IdentityBusy as as, type IdentityProblem as at, type IdentityPurchase as au, type IdentityState as av, type IdentityStatus as aw, type IdentityStep as ax, type IdentityVerificationFlow as ay, Input as az, AiMarkdown as b, VisibilityIcon as b$, RadioGroupItem as b0, type Rag as b1, RagDot as b2, RelevanceDot as b3, ScrollArea as b4, ScrollBar as b5, Select as b6, SelectContent as b7, SelectGroup as b8, SelectItem as b9, Tabs as bA, TabsContent as bB, TabsList as bC, TabsTrigger as bD, TagEntity as bE, type TagEntityProps as bF, type TagLike as bG, Textarea as bH, type TextareaProps as bI, ThreadVisibilityIcon as bJ, Toggle as bK, ToggleGroup as bL, ToggleGroupItem as bM, Tooltip as bN, TooltipContent as bO, TooltipProvider as bP, TooltipTrigger as bQ, UserEntity as bR, type UserEntityProps as bS, UserMenu as bT, type UserMenuItem as bU, type UserMenuProps as bV, type UserMenuStatus as bW, VISIBILITY_ICONS as bX, VerifiedBadge as bY, type VerifiedBadgeProps as bZ, VerifiedToggle as b_, SelectLabel as ba, SelectScrollDownButton as bb, SelectScrollUpButton as bc, SelectSeparator as bd, SelectTrigger as be, SelectValue as bf, Separator as bg, ShieldIcon as bh, type ShieldIconProps as bi, Slider as bj, type StatusBadgeComponent as bk, type StatusBadgeProps as bl, StatusPill as bm, type StatusPillProps as bn, type StatusVariant as bo, Switch as bp, TAG_TYPE_ICONS as bq, TAG_TYPE_LABELS as br, Table as bs, TableBody as bt, TableCaption as bu, TableCell as bv, TableFooter as bw, TableHead as bx, TableHeader as by, TableRow as bz, ArbiIcon as c, VisibilityToggle as c0, type VisibilityToggleProps as c1, agentAvatarColors as c2, badgeVariants as c3, buildFolderTree as c4, buttonVariants as c5, canonicalFolderPath as c6, cardVariants as c7, closeOpenEmphasis as c8, cn as c9, getUserDisplayName as cA, getUserInitials as cB, getWorkspaceColor as cC, isAgent as cD, isAudioFile as cE, isDocumentAddableToConversation as cF, isDownloadOnlyFile as cG, isImageDocument as cH, isImageFile as cI, isMediaFile as cJ, isVideoFile as cK, markdownBaseComponents as cL, markdownSanitizeSchema as cM, markdownToPlainText as cN, markdownToPlainTextBlocks as cO, normalizeCitationMarkup as cP, splitMarkdownBlocks as cQ, tagKindNouns as cR, tagKindTitle as cS, toggleVariants as cT, trimOpenCitation as cU, useDictateContext as cV, usePortalContainer as cW, usesOriginalBytesForViewer as cX, configureEntityRegistry as ca, configureRagLabels as cb, configureStatusRegistry as cc, createUserAvatarIcon as cd, extensionFromMime as ce, formatDocDate as cf, formatFolderLabel as cg, formatFriendlyDate as ch, formatRelativeTime as ci, friendlyFileType as cj, getDocIcon as ck, getDocumentAuthor as cl, getDocumentDate as cm, getDocumentNature as cn, getDocumentSubject as co, getDocumentTitle as cp, getEntityColor as cq, getEntityColorStyles as cr, getEntityIcon as cs, getEntityLabel as ct, getFileExtension as cu, getFileTypeIcon as cv, getStatusVariant as cw, getTagTypeIcon as cx, getTagTypeLabel as cy, getUserAvatarColor as cz, Avatar as d, AvatarFallback as e, AvatarImage as f, Badge as g, type BadgeProps as h, Button as i, type ButtonProps as j, Card as k, CardContent as l, CardDescription as m, CardFooter as n, CardHeader as o, type CardProps as p, CardTitle as q, Checkbox as r, Collapsible as s, CollapsibleContent as t, CollapsibleTrigger as u, Command as v, CommandDialog as w, CommandEmpty as x, CommandGroup as y, CommandInput as z };