@banzhe/dsh-workbench 0.2.0 → 0.3.1

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.
package/lib/client.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"client.js","names":["useMemo","createSnapshotStore","assertNever","assertNever","defineStore","Service","createSnapshotStore","useRef","useState","Modal","Button","css","useRef","useMemo","relativeTime","css","useRowDragPreview","IconFolderOpenRegular","IconFolderCloseRegular","StateDot","IconTriangleRightFillRegular","Tooltip","IconNewChatOutlineRegular","HoverCard","IconPinFillRegular","IconArchiveOutlineRegular","IconUnarchiveOutlineRegular","useRef","useState","IconPlusOutlineRegular","useMemo","css","IconFolderCloseRegular","useCallback","Menu","Modal","Button","css","IconPinOutlineRegular","StateDot","useState","IconChevronDownOutlineRegular","IconChevronRightOutlineRegular","useMemo","useState","Menu","IconFolderCloseRegular","IconWorkspaceTreeOutlineRegular","IconFlatListOutlineRegular","IconChevronsUpDownOutlineRegular","IconClockOutlineRegular","IconArchiveOffOutlineRegular","IconQueueOutlineRegular","IconArchiveCheckOutlineRegular","css","Tooltip","IconSlidersTwoOutlineRegular","IconArchiveOutlineRegular","useRef","useMemo","HoverCardGroup","AnimatedRows","useCallback","IconSearchOutlineRegular","IconCloseFillRegular","IconProjectAddOutlineRegular","Tooltip","css","IconUnarchiveOutlineRegular","IconArchiveOutlineRegular","useState","Modal","Button","browserCss","Tooltip","css","IconPinFillRegular","IconPinOutlineRegular","useState","useRef","Modal","Button","css","Toast","IconWarningOutlineRegular","createSnapshotStore","writeClipboard","IconEditOutlineRegular","IconTrashOutlineRegular","IconPinOutlineRegular","IconPinFillRegular","IconArchiveOutlineRegular","IconUnarchiveOutlineRegular","IconBranchOutlineRegular","IconCopyOutlineRegular"],"sources":["../src/client/session-actions/SessionMenu.tsx","../src/client/contract/slots.ts","../src/client/shortcuts.ts","../../../node_modules/.pnpm/@deepseek-ai+dsh-util-values@0.2.2-rc.2_@deepseek-ai+cordis@4.1.0/node_modules/@deepseek-ai/dsh-util-values/lib/index.js","../../../node_modules/.pnpm/@deepseek-ai+dsh-util-workspace-path@0.2.2-rc.2_@deepseek-ai+cordis@4.1.0/node_modules/@deepseek-ai/dsh-util-workspace-path/lib/index.js","../src/client/tree.ts","../src/client/stores.ts","../src/client/pin-order.ts","../src/client/navigation.ts","../src/client/attention/model.ts","../../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs","../src/client/rows/WorkspaceDialogs.tsx","../../../node_modules/.pnpm/@deepseek-ai+dsh-api-workspace-controller@0.2.2-rc.2_8738a0633759ef930cc9ff50823c3c50/node_modules/@deepseek-ai/dsh-api-workspace-controller/lib/types/default-workspace.js","../src/client/rows/Rows.tsx","../src/client/path-suffix.ts","../src/client/WorkspacePicker.tsx","../src/client/attention/AttentionSection.tsx","../src/client/rows/WorkspaceBrowser.tsx","../src/client/session-actions/ArchiveSession.tsx","../src/client/session-actions/derived.ts","../src/client/session-actions/context-menus.tsx","../src/client/session-actions/PinSession.tsx","../src/client/session-actions/RenameSession.tsx","../src/client/session-actions/RowActionToast.tsx","../src/client/toast/Toast.tsx","../src/client/toast/register.ts","../src/client/locales.ts","../src/client/index.ts"],"sourcesContent":["/** Legacy external Session contributions shared by the row, header, and More trigger. */\nimport { useMemo } from 'react'\nimport type { PropsRenderSlots, PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots'\n\ntype Props = Pick<PropsRuntime<'contextMenu.content'>, 'target' | 'dismiss'> & PropsRenderSlots<'sidebar.workspaces.session.menu.item'>\n/** @param props - captured Session and the existing extension position. @returns legacy component contributions. */\nexport function SessionMenu({ target, dismiss, renderSlot }: Props) {\n const hookContext = useMemo<readonly [boolean, (open: boolean) => void]>(() => [true, (open) => { if (!open) dismiss() }], [dismiss])\n if (target.kind !== 'session') return null\n return renderSlot('sidebar.workspaces.session.menu.item', target.value, {\n hookContext,\n })\n}\n","/**\n * ui-workspace contracts. Two registrations share this package:\n *\n * - WorkspaceBrowser fills the sidebar shell's `sidebar.workspaces` hole —\n * the whole browsing region (section header, search, grouped/flat session\n * list, workspace dialogs). It registers this package's viewing store and\n * consumes the shell's two-fact owner share (wide / expandSidebar).\n * - WorkspacePicker fills the conversation empty-state hole (menu + error\n * dialog shared with the browser).\n *\n * Both registrations declare a **directory-flow hole** (`single` kind): the\n * slot a composed picker package's client half fills with its\n * picking interaction — a renderless native-chooser driver or an in-app\n * browsing dialog. ui-workspace owns the trigger (the \"Add workspace…\"\n * entry, present only while the hole is occupied) and the adoption\n * semantics (`createWorkspace({ path })`, the retryable error dialog,\n * Choose again); the occupant owns everything between `open` and the picked path,\n * including creating a new directory to hand back. That occupant-owned\n * creation is why adding a workspace has a single route: an unoccupied hole\n * leaves the surface with no add affordance at all.\n * Two holes exist because the two menu surfaces are independent slot entries\n * and a hole has exactly one declaring entry — they carry the same owner\n * contract and the same occupant.\n *\n * WorkspaceBrowser declares the Session hover-button list. Its built-in\n * pin and archive entries share callbacks with the structured ctx.contextMenus\n * contributions. The Session menu adapter owns the legacy\n * `sidebar.workspaces.session.menu.item` Slot for external React entries;\n * they receive the captured row identity and render together before Archive.\n *\n * The browser entry additionally declares `list` seats per Session row\n * (`sidebar.session.row.leading`, `sidebar.session.row.trailing`, and\n * `sidebar.session.row.hover`) for ambient row decorations. They receive only\n * the row's Session identity; a Session binding would activate and retain\n * every listed Session.\n */\nimport type { ContextMenuTarget } from '@deepseek-ai/dsh-client-ui-context-menu/client'\nimport type {\n HostObservable, InjectFace, PropsHooks, PropsLocale, PropsRenderFactories, PropsRenderSlots, PropsRuntime, PropsStore, SlotHookFactory,\n} from '@deepseek-ai/dsh-client-ui-slots'\n// Type-only: pull the owner SlotMap merges into programs that resolve the\n// runtime shares below.\nimport type {} from '@deepseek-ai/dsh-client-ui-sidebar/client'\nimport type {} from '@deepseek-ai/dsh-client-ui-conversation/client'\nimport type {} from '@deepseek-ai/dsh-client-ui-layout/client'\nimport type { SessionSearchResultItem } from '@deepseek-ai/dsh-api-session-controller/client'\nimport type { RemoteHostFacts } from '@deepseek-ai/dsh-api-remotes/client'\nimport type { SessionActivity, WorkspaceId, WorkspaceView } from '@deepseek-ai/dsh-api-workspace-controller/client'\nimport type { SessionId } from '@deepseek-ai/dsh-session/types'\nimport type { ShortcutCatalogEntry } from '@deepseek-ai/dsh-client-shortcuts/client'\nimport type { WorkspaceShortcutState } from '../shortcuts.ts'\nimport type { StartSessionOptions } from '../navigation.ts'\nimport type { AttentionModel } from '../attention/model.ts'\nimport type {} from './toast.ts'\nimport type { createWorkspaceViewStore } from '../stores.ts'\n\ndeclare module '@deepseek-ai/dsh-client-ui-context-menu/client' {\n interface ContextMenuTargetMap {\n /** Registered Workspace header; path and title belong to the clicked row. */\n workspace: { readonly workspaceId: WorkspaceId; readonly path: string; readonly displayTitle: string }\n }\n}\n\n/** One request for the existing Workspace rename or delete dialog. */\nexport type WorkspaceActionRequest = {\n readonly action: 'rename' | 'delete'\n readonly workspaceId: WorkspaceId\n readonly displayTitle: string\n readonly storedTitle: string\n}\n\n/**\n * Owner share of the directory-flow holes: the complete conversation between\n * the trigger surface and the picking interaction. The occupant reads `open`\n * to run/render its interaction and reports exactly one outcome per open.\n */\nexport interface DirectoryFlowOwnerProps {\n /** True while a picking interaction is requested; flipping back to false withdraws the request. */\n open: boolean\n /** True while the owner adopts a picked path (`createWorkspace` in flight); occupants disable their commit affordances. */\n busy: boolean\n /** The operator picked a directory (absolute host path); the owner adopts it. */\n onPicked: (path: string) => void\n /** The operator dismissed the interaction; the owner just closes the flow. */\n onCancel: () => void\n /** The interaction itself failed (chooser missing, listing denied); the owner shows its error surface. */\n onError: (message: string) => void\n}\n\n/** Owner share of one Session row action occurrence: the row the action belongs to. */\nexport interface SessionRowOwnerProps {\n /** Session the row shows. */\n sessionId: SessionId\n /** Row display title: persisted title, or empty when the Session has none. */\n displayTitle: string\n}\n\n/** The row menu's open state as its owner holds it: the `useState` pair. */\nexport type MenuOpenState = readonly [open: boolean, setOpen: (open: boolean) => void]\n\n/**\n * Hook every row-menu entry receives. Rows only render while the menu is\n * open, so an entry reads it for the setter: `setOpen(false)` dismisses the\n * menu the entry sits in — the same state the owner's `onClose` sets.\n */\nexport type UseMenuOpenState = () => MenuOpenState\n\n/**\n * Bind the row's render occurrence into the entries' `useMenuOpenState` hook:\n * the owner supplies its open-state pair as the occurrence's `hookContext`,\n * and the hook hands that pair back.\n * @param _standard - framework standard props (unused).\n * @param state - the menu's open-state pair from the render occurrence.\n * @returns the hook the entry calls.\n */\nexport const menuOpenStateFactory: SlotHookFactory<'sidebar.workspaces.session.menu.item', UseMenuOpenState> =\n (_standard, state) => () => state\n\n/**\n * Owner share of the two Session-row schedule seats. Both receive only the\n * row's Session identity: the occupant reads that Session's own scheduled\n * tasks, and reading them activates nothing.\n */\nexport interface SessionRowScheduleOwnerProps {\n /** Session this row shows; the occupant addresses its own data by this id. */\n readonly sessionId: SessionId\n}\n\n/** Owner share of the trailing icon list; rendering does not bind the Session. */\nexport interface SessionRowTrailingOwnerProps {\n /** Session this row shows. */\n readonly sessionId: SessionId\n}\n\ndeclare module '@deepseek-ai/dsh-client-ui-slots' {\n interface SlotMap {\n /** Directory-flow hole under the conversation empty-state picker (declared by the WorkspacePicker entry). */\n 'conversation.hero.workspace.directoryFlow': { kind: 'single'; scope: 'root'; owner: DirectoryFlowOwnerProps }\n /** Directory-flow hole under the sidebar browsing region (declared by the WorkspaceBrowser entry). */\n 'sidebar.workspaces.directoryFlow': { kind: 'single'; scope: 'root'; owner: DirectoryFlowOwnerProps }\n /**\n * Leading decoration of one Session row, in the 16px cell before the title\n * that the row's own state dot otherwise occupies. A higher-priority state\n * (a pending interaction, a new message, live activity) replaces the seat\n * with that dot for the same row, so an occupant here never renders beside\n * a status dot and is mounted only by a row whose primary state is idle.\n * An archived row keeps that cell blank — neither its status dot nor this\n * seat renders there, and its live status appears on the hover card only.\n */\n 'sidebar.session.row.leading': { kind: 'list'; scope: 'root'; inline: true; owner: SessionRowScheduleOwnerProps }\n /**\n * Non-interactive icons after the row's time label, before its pin marker,\n * in ascending `order`. On hover-capable devices, hidden while the row is\n * hovered, has keyboard focus on itself or its actions, or has an open menu.\n * Hoverless devices keep the icons beside the menu trigger. Blank Sessions\n * omit the slot. Occupants address their own data by Session id; they must not\n * bind or retain the Session.\n */\n 'sidebar.session.row.trailing': { kind: 'list'; scope: 'root'; inline: true; owner: SessionRowTrailingOwnerProps }\n /**\n * Section of the Session row's hover card between its relative time and\n * its trailing status line. Mounted only while that card is open.\n */\n 'sidebar.session.row.hover': { kind: 'list'; scope: 'root'; owner: SessionRowScheduleOwnerProps }\n /**\n * Legacy external Session menu rows, in ascending `order`, rendered\n * together before the built-in Archive action. Built-in actions use\n * ctx.contextMenus; Slot priority cannot replace them. Each entry renders a\n * `role=\"menuitem\"` button, owns its visibility and localized label,\n * and dismisses through `useMenuOpenState`. The shared menu supplies\n * keyboard navigation and focus return.\n * @example\n * return {\n * inject: ['slots'],\n * apply(ctx) {\n * const copyLabel = 'Copy session title' // Localize in the contributing package.\n * ctx.slots.inject('sidebar.workspaces.session.menu.item', () => ctx.slots.register(\n * { name: 'sidebar.workspaces.session.menu.item', id: 'copy-session-title', order: 500 },\n * ({ displayTitle, useMenuOpenState }) => {\n * const [, setMenuOpen] = useMenuOpenState()\n * return React.createElement(\n * 'button',\n * {\n * type: 'button', role: 'menuitem',\n * onClick: () => { setMenuOpen(false); void navigator.clipboard.writeText(displayTitle) },\n * },\n * copyLabel,\n * )\n * },\n * ))\n * },\n * }\n */\n 'sidebar.workspaces.session.menu.item': {\n kind: 'list'\n scope: 'root'\n owner: SessionRowOwnerProps\n hookContext: MenuOpenState\n inject: { hooks: {\n menuOpenState: SlotHookFactory<'sidebar.workspaces.session.menu.item', UseMenuOpenState>\n shortcuts: HostObservable<readonly ShortcutCatalogEntry[]>\n } }\n }\n /**\n * The hover buttons at the end of one Session row, in ascending `order`,\n * after the \"...\" menu trigger. ui-workspace registers `archive` (100) and\n * `pin` (200) here. An entry renders one icon button (or nothing, when its\n * action does not apply to the row) and owns the action it performs. Clicks\n * inside the strip stay in the strip, so the button needs no propagation\n * handling to keep the row from opening. Hoverless devices hide this slot;\n * contribute the action to the menu list as well for touch access.\n */\n 'sidebar.workspaces.session.row.action': { kind: 'list'; scope: 'root'; owner: SessionRowOwnerProps }\n }\n}\n\n/** The two directory-flow holes; a flow package's client half registers its one component into both. */\nexport type DirectoryFlowSlotName =\n | 'conversation.hero.workspace.directoryFlow'\n | 'sidebar.workspaces.directoryFlow'\n\n/**\n * Directory-picking share both trigger surfaces consume. Occupancy rides the\n * inject face's reserved `hooks` compartment: the renderer binds the source\n * into the `useDirectoryFlow` selector hook, so an empty hole hides the\n * \"Add workspace…\" entry reactively and the surface withdraws an open\n * flow whose occupant unloaded mid-interaction (nobody is left to cancel).\n */\nexport type DirectoryPickingInjected = {\n hooks: {\n /** True while this surface's directory-flow hole is occupied. */\n directoryFlow: HostObservable<boolean>\n }\n}\n\n/** Component-side view of the picking share: the bound occupancy selector hook. */\nexport type DirectoryPickingHooks = PropsHooks<DirectoryPickingInjected['hooks']>\n\n/**\n * Browser-private injected share (arrives via the register inject factory).\n * Data reads use the global framework hooks; these are the Host actions the\n * browsing region drives.\n */\nexport type WorkspaceBrowserInjected = {\n /** Dismiss the settled Workspace dialog. */\n settleWorkspaceAction: () => void\n hooks: DirectoryPickingInjected['hooks'] & {\n workspaceActionRequest: HostObservable<WorkspaceActionRequest | null>\n contextMenuTarget: HostObservable<ContextMenuTarget | null>\n /**\n * Fixed Host facts, reached through a hook rather than injected as values:\n * the renderer memoizes an entry's inject result for the registration's\n * lifetime, so facts read there would freeze at whatever the first render\n * saw. Select the field the surface needs (`info => info.home`).\n */\n hostInfo: HostObservable<RemoteHostFacts>\n workspaceShortcuts: HostObservable<WorkspaceShortcutState>\n shortcuts: HostObservable<readonly ShortcutCatalogEntry[]>\n /**\n * The attention region's content, folded from the Session list, the Session\n * status map and the Workspace archive/pin sets. Owned by this plugin's store\n * so the region carries no state of its own and no second refresh path.\n */\n attention: HostObservable<AttentionModel>\n }\n /** Open the browser search and focus its input. */\n requestSearch: () => void\n /** Request the existing directory picker. */\n requestAddWorkspace: () => void\n /** Consume the directory-picker opening request. */\n closeAddWorkspace: () => void\n /** Publish directory interaction occupancy for command availability. */\n setDirectoryBusy: (busy: boolean) => void\n /**\n * Create a fresh Session, or preserve a reusable blank with explicit draft options.\n * Without an explicit Workspace, inherit the current Session Workspace,\n * then the recent Workspace, or clear into the New Session view.\n */\n startSession: (workspaceId?: WorkspaceId, options?: StartSessionOptions) => void\n /** Open a real Session. */\n open: (sessionId: SessionId) => void\n /** Release one Session's pin; the attention region's only Host write. */\n unpinSession: (sessionId: SessionId) => void\n /**\n * Search current visible conversation messages. The Host fixes the result\n * bound; `hasMore` means the query needs narrowing.\n */\n searchSessions: (\n query: string,\n signal: AbortSignal,\n ) => Promise<{ items: readonly SessionSearchResultItem[]; hasMore: boolean }>\n /** Maximum number of merged rows rendered for one search. */\n searchResultLimit: number\n /** Open the Session rename dialog (a row title double-click); the rename action entry raises the same request. */\n requestSessionRename: (sessionId: SessionId, currentTitle: string) => void\n /** Tell the user an archived row cannot be opened (a click on it). */\n notifyArchivedNotOpenable: () => void\n /** Rename a Host Workspace (rejects on name conflict; resolves on durability). */\n renameWorkspace: (workspaceId: WorkspaceId, title: string) => Promise<void>\n /** Delete only a Host Workspace registration; directory and Session logs remain. */\n deleteWorkspace: (workspaceId: WorkspaceId) => Promise<void>\n /**\n * Reorder a Workspace in the durable registry display order.\n * Omitted anchor appends to the end.\n */\n insertWorkspaceBefore: (workspaceId: WorkspaceId, beforeWorkspaceId?: WorkspaceId) => Promise<void>\n /** Remove a Session from the registry-global archived set (the search results' restore button). */\n unarchiveSession: (sessionId: SessionId) => Promise<void>\n /** Adopt a picked host directory as a real Workspace before targeting a Session. */\n createWorkspace: (input: { path: string }) => Promise<WorkspaceView>\n}\n\n/** The browser's declared viewing store handle, shared with the row actions that write view state. */\nexport type WorkspaceViewStoreHandle = ReturnType<typeof createWorkspaceViewStore>\n\n/** Props of one legacy row-menu entry: owner share + locale seat + the entry's own injected share. */\nexport type SessionMenuItemProps<Injected extends object = object> =\n PropsRuntime<'sidebar.workspaces.session.menu.item'>\n & PropsLocale<'workspace'>\n & InjectFace<Injected>\n\n/** Props of one shipped row hover button: owner share + locale seat + the entry's own injected share. */\nexport type SessionRowActionProps<Injected extends object = object> =\n PropsRuntime<'sidebar.workspaces.session.row.action'>\n & PropsLocale<'workspace'>\n & InjectFace<Injected>\n\n/** One transient Workspace notice rendered by the overlay toast entry. */\nexport type RowToast =\n | { kind: 'archived'; sessionId: SessionId; message?: string; tone?: 'success' | 'warning' }\n | { kind: 'stoppedAndArchived'; sessionId: SessionId; message?: string; tone?: 'success' | 'warning' }\n | { kind: 'sessionIdCopied' }\n | { kind: 'sessionIdCopyFailed' }\n | { kind: 'pinFailed' }\n | { kind: 'unpinFailed' }\n | { kind: 'archivedNotOpenable' }\n | { kind: 'defaultWorkspaceFailed' }\n | { kind: 'forkRequiresOpen'; sessionId: SessionId }\n | { kind: 'shortcutForkFailed'; reason: 'unavailable' | 'failed' }\n /**\n * An explicit New Session request that failed. `message` is untranslated:\n * a Host refusal as `code: message` — the stable code stays in the copy so\n * a report can be searched by it — and any other failure's own message.\n */\n | { kind: 'createFailed'; message: string }\n\n/** The notice on display; `seq` keys remounts so a repeated notice restarts its hold. */\nexport type RowToastState = RowToast & { seq: number }\n\n/**\n * Pin action share (menu row and hover button). The callbacks carry the whole\n * behavior: the Host call, fronting the Session in its saved orders after a\n * pin, and the failure notice. The hooks are the registry-global sets as\n * Sets, so a row reads its own membership with one lookup.\n */\nexport interface PinSessionInjected {\n hooks: {\n /** Pinned Session ids. */\n pinned: HostObservable<ReadonlySet<SessionId>>\n /** Archived Session ids (pin does not apply to an archived row). */\n archived: HostObservable<ReadonlySet<SessionId>>\n }\n /** Pin a Session; on success it leads its accounts' saved orders, on failure the notice says so. */\n pinSession: (sessionId: SessionId) => void\n /** Unpin a Session; saved positions stay as they are. */\n unpinSession: (sessionId: SessionId) => void\n}\n\n/**\n * Archive action share (menu row and hover button). The callbacks carry the\n * whole behavior: the Host call, the notice a success raises, the\n * stop-and-archive confirmation a Host refusal for running work raises, and\n * the diagnostics for any other rejection.\n */\nexport interface ArchiveSessionInjected {\n hooks: {\n /** Archived Session ids. */\n archived: HostObservable<ReadonlySet<SessionId>>\n }\n /**\n * Archive a Session into the registry-global set: the row keeps its\n * account position and shows per the archived filter; archiving the\n * current session clears the selection into the New Session view state.\n * A Session with running work is not archived by this call: the Host's\n * refusal opens the stop-and-archive confirmation instead.\n */\n archiveSession: (sessionId: SessionId) => void\n /** Remove a Session from the registry-global archived set. */\n unarchiveSession: (sessionId: SessionId) => void\n}\n\n/**\n * A stop-and-archive confirmation the archive action asked for: the Host\n * refused the plain archive because this work still runs.\n */\nexport interface SessionArchiveConfirmRequest {\n /** Session to stop and archive. */\n sessionId: SessionId\n /** The row's display title, named in the dialog. */\n displayTitle: string\n /** What the Host reported running, in family order. */\n activity: readonly SessionActivity[]\n}\n\n/**\n * Stop-and-archive dialog share: the pending confirmation, its settlement,\n * and the archive hop that asks the Host to stop the work first.\n */\nexport interface SessionArchiveConfirmInjected {\n hooks: {\n /** The confirmation asked for, until the dialog consumes or cancels it. */\n archiveRequest: HostObservable<SessionArchiveConfirmRequest | null>\n }\n /** Consume or cancel the pending confirmation. */\n settleSessionArchive: () => void\n /**\n * Archive a Session after the Host stops its running work; resolves once\n * the archive set is durable (the stops settle in the background) and\n * raises the stopped-and-archived notice.\n */\n stopAndArchiveSession: (sessionId: SessionId) => Promise<void>\n}\n\n/** Fork action share. */\nexport interface ForkSessionInjected {\n /** Fork a Session at its last completed turn; the child arrives through the Host list. */\n forkSession: (sessionId: SessionId) => void\n}\n\n/** Rename action share: the row only raises the request; the dialog entry answers it. */\nexport interface RenameSessionInjected {\n /** Ask for the rename dialog, seeded with the row's current title. */\n requestSessionRename: (sessionId: SessionId, currentTitle: string) => void\n}\n\n/** Session ID action share; copying does not open the Session. */\nexport interface SessionIdInjected {\n /** Copy the complete id and report acceptance or failure through the global toast. */\n copySessionId: (sessionId: SessionId) => Promise<void>\n}\n\n/** A Session rename the rename action asked for; the dialog entry opens on it. */\nexport interface SessionRenameTarget {\n /** Session to rename. */\n sessionId: SessionId\n /** Title the dialog seeds its draft from. */\n currentTitle: string\n}\n\n/** Rename dialog share: the pending request, its settlement, and the rename hop the dialog confirms with. */\nexport interface SessionRenameDialogInjected {\n hooks: {\n /** The rename asked for, until the dialog consumes or cancels it. */\n renameRequest: HostObservable<SessionRenameTarget | null>\n }\n /** Consume or cancel the pending request. */\n settleSessionRename: () => void\n /** Rename a Session (explicit user title; resolves on host acceptance). */\n renameSession: (sessionId: SessionId, title: string) => Promise<void>\n}\n\n/** Existing overlay share: the current notice and its dismissal. */\nexport interface RowToastInjected {\n hooks: {\n /** The notice on display, or none. */\n toast: HostObservable<RowToastState | null>\n }\n /** Take the notice down. */\n dismissToast: () => void\n}\n\n/** Business callbacks injected into their keyed Toast presentations. */\nexport interface RowToastActions {\n /** Undo an archive from its notice. */\n undoArchive: (sessionId: SessionId) => void\n /** Switch the archived filter to \"show\" so the archived row is back in view. */\n showArchived: () => void\n /** Open the fork source without retrying the fork. */\n openForkSource: (sessionId: SessionId) => void\n}\n\n/** Props of the rename dialog entry in `shell.overlay`. */\nexport type SessionRenameDialogProps =\n PropsRuntime<'shell.overlay'>\n & PropsLocale<'workspace'>\n & Omit<SessionRenameDialogInjected, 'hooks'>\n & PropsHooks<SessionRenameDialogInjected['hooks']>\n\n/** Props of the stop-and-archive dialog entry in `shell.overlay`. */\nexport type SessionArchiveConfirmProps =\n PropsRuntime<'shell.overlay'>\n & PropsLocale<'workspace'>\n & Omit<SessionArchiveConfirmInjected, 'hooks'>\n & PropsHooks<SessionArchiveConfirmInjected['hooks']>\n\n/** Props of the existing overlay's keyed notice dispatcher. */\nexport type RowToastProps =\n PropsRuntime<'shell.overlay'>\n & PropsRenderSlots<'workspace.toast'>\n & Pick<RowToastInjected, 'dismissToast'>\n & PropsHooks<RowToastInjected['hooks']>\n\n/** Full browser props: shell owner share + viewing store + injected actions + the locale seat. */\nexport type WorkspaceBrowserProps =\n PropsRuntime<'sidebar.workspaces'>\n & PropsRenderFactories\n & PropsRenderSlots<\n | 'sidebar.workspaces.directoryFlow'\n | 'sidebar.workspaces.session.row.action'\n | 'sidebar.session.row.trailing'\n | 'sidebar.session.row.leading'\n | 'sidebar.session.row.hover'\n >\n & PropsStore<WorkspaceViewStoreHandle>\n & Omit<WorkspaceBrowserInjected, 'hooks'>\n & PropsHooks<WorkspaceBrowserInjected['hooks']>\n & PropsLocale<'workspace'>\n\n/**\n * Picker-private injected share. Pick semantics remain in the owner's onPick\n * callback; this callback creates only the real Host Workspace. A type alias\n * supplies the implicit index signature required by the registry.\n */\nexport type WorkspacePickerInjected = DirectoryPickingInjected & {\n /** Adopt a picked host directory as a real Workspace before targeting a Session. */\n createWorkspace: (input: { path: string }) => Promise<WorkspaceView>\n}\n\n/**\n * Full picker props: the owner share plus the creation callback and the\n * locale seat. The two picker holes (blank-session hero / New-Session view)\n * share one owner currency, so one composed type serves both registrations.\n */\nexport type WorkspacePickerProps =\n PropsRuntime<'conversation.hero.workspace'>\n & PropsRenderSlots<'conversation.hero.workspace.directoryFlow'>\n & Omit<WorkspacePickerInjected, 'hooks'>\n & PropsHooks<WorkspacePickerInjected['hooks']>\n & PropsLocale<'workspace'>\n","/** Workspace command registration and browser-owned opening requests. */\nimport type { Context } from '@deepseek-ai/cordis'\nimport type { SessionForkError } from '@deepseek-ai/dsh-api-session-controller/client'\nimport { createSnapshotStore } from '@deepseek-ai/dsh-client-store'\nimport type { ShortcutCommand, ShortcutCommandId } from '@deepseek-ai/dsh-client-shortcuts/client'\nimport type { SnapshotStore } from '@deepseek-ai/dsh-client-store'\nimport type { SessionId } from '@deepseek-ai/dsh-session/types'\nimport type { UiWorkspace } from './navigation.ts'\n\n/** Transient requests consumed by the existing workspace browser. */\nexport interface WorkspaceShortcutState {\n readonly searchRequest: number\n readonly addRequested: boolean\n readonly directoryBusy: boolean\n readonly renameTarget: { readonly sessionId: SessionId; readonly currentTitle: string } | null\n}\n\ninterface WorkspaceShortcutControls {\n state: SnapshotStore<WorkspaceShortcutState>\n search: () => void\n add: () => void\n closeAdd: () => void\n directoryBusy: (busy: boolean) => void\n rename: (sessionId: SessionId, currentTitle: string) => void\n closeRename: () => void\n}\n\n/**\n * Create the private browser request source shared by commands and controls.\n * @returns observable state and its complete mutation callbacks.\n */\nexport function createWorkspaceShortcutControls(): WorkspaceShortcutControls {\n const state = createSnapshotStore<WorkspaceShortcutState>({\n searchRequest: 0, addRequested: false, directoryBusy: false, renameTarget: null,\n })\n return {\n state,\n search: () => { state.set({ ...state.getSnapshot(), searchRequest: state.getSnapshot().searchRequest + 1 }) },\n add: () => { state.set(state.getSnapshot().directoryBusy ? state.getSnapshot() : { ...state.getSnapshot(), addRequested: true }) },\n closeAdd: () => { state.set({ ...state.getSnapshot(), addRequested: false }) },\n directoryBusy: (busy: boolean) => { state.set({ ...state.getSnapshot(), directoryBusy: busy }) },\n rename: (sessionId: SessionId, currentTitle: string) => {\n state.set({ ...state.getSnapshot(), renameTarget: { sessionId, currentTitle } })\n },\n closeRename: () => { state.set({ ...state.getSnapshot(), renameTarget: null }) },\n }\n}\n\n/**\n * Register navigation commands against the existing workspace owner.\n * Rename requires a nonblank main Conversation with no modal other than the navigation drawer obscuring it.\n * @param ctx - plugin context with the shortcut, locale, and model services.\n * @param navigation - session creation and forking from the pointer controls' navigation service.\n * @param controls - browser-owned opening requests.\n * @param archiveSession - shared archive action, including running-work confirmation and notices.\n * @param reportForkFailure - publish a classified failure through the frame-wide notice channel.\n */\nexport function installWorkspaceShortcuts(\n ctx: Context,\n navigation: Pick<UiWorkspace, 'startSession' | 'forkSession'>,\n controls: ReturnType<typeof createWorkspaceShortcutControls>,\n archiveSession: (sessionId: SessionId) => void,\n reportForkFailure: (reason: 'unavailable' | 'failed') => void,\n): void {\n const t = ctx.locale.bind('workspace')\n const current = () => Object.values(ctx.sessions.list.getSnapshot().byId)\n .find(row => (row.retainedBy.mainView ?? 0) > 0)\n const addReason = () => ctx.slots.entries('sidebar.workspaces.directoryFlow').length === 0\n ? t('shortcut.noPicker')\n : controls.state.getSnapshot().directoryBusy ? t('shortcut.directoryBusy') : null\n const register = (id: string, label: () => string, aliases: string[], code: string,\n modifiers: ('primary' | 'alt' | 'shift')[], webModifiers: ('primary' | 'alt' | 'shift')[], resolve: ShortcutCommand['resolve']): void => {\n ctx.effect(() => ctx.shortcuts.register({\n id: id as ShortcutCommandId, label, aliases, defaults: {\n 'desktop:macos': { code, modifiers }, 'desktop:windows': { code, modifiers }, 'desktop:linux': { code, modifiers },\n 'web:macos': { code, modifiers: webModifiers }, 'web:windows': { code, modifiers: webModifiers },\n },\n regions: ['page', 'editable'], modals: ['sidebar'], resolve,\n }), `ui-workspace: ${id}`)\n }\n register('session.new', () => t('session.new'), ['new session', 'new chat'], 'KeyN', ['primary'], ['primary', 'alt'],\n () => ({ status: 'handled', run: () => { navigation.startSession() } }))\n register('session.search', () => t('search.sessions.aria'), ['search sessions'], 'KeyK', ['primary'], ['primary', 'alt'],\n () => ({ status: 'handled', run: controls.search }))\n register('workspace.add', () => t('workspace.add'), ['add workspace', 'open folder'], 'KeyO', ['primary'], ['primary', 'alt'],\n () => {\n const reason = addReason()\n return reason === null ? { status: 'handled', run: controls.add } : { status: 'blocked', reason }\n })\n register('session.rename', () => t('rename.session.title'), ['rename session'], 'KeyG', ['primary', 'alt'], ['primary', 'alt'], (context) => {\n const target = current()\n return target === undefined || target.blank || (context.modal !== null && context.modal !== 'sidebar') || ctx.layout.panelInfo.getSnapshot().activePanelId !== null\n ? { status: 'blocked', reason: t('shortcut.noSession') }\n : { status: 'handled', run: () => { controls.rename(target.id, target.title?.trim() ?? '') } }\n })\n register('session.fork', () => t('menu.fork'), ['fork session'], 'KeyF', ['primary', 'alt'], ['primary', 'shift'], () => {\n const target = current()\n if (target === undefined) return { status: 'blocked', reason: t('shortcut.noSession') }\n if (target.blank) return { status: 'blocked', reason: t('shortcut.noCompletedTurn') }\n return { status: 'handled', run: () => {\n // The main view owns history opening for this target.\n void navigation.forkSession(target.id).catch((error: unknown) => {\n // Client plugin bundles do not share error-class identity.\n const unavailable = error instanceof Error && error.name === 'SessionForkError'\n && (error as SessionForkError).rpcError.code === 'session/fork-unavailable'\n reportForkFailure(unavailable ? 'unavailable' : 'failed')\n if (!unavailable) console.warn('session fork rejected:', error)\n })\n } }\n })\n register('session.archive', () => t('menu.archiveSession'), ['archive session'], 'KeyA', ['primary', 'shift'], ['primary', 'alt'], () => {\n const target = current()\n return target === undefined ? { status: 'blocked', reason: t('shortcut.noSession') }\n : { status: 'handled', run: () => {\n archiveSession(target.id)\n } }\n })\n}\n","//#region lib/types/partial-json.js\n/**\n* Lazily scanned view of one JSON object's top-level fields, built from text\n* that may still be streaming or from an already parsed object. Nothing is\n* scanned until a reader asks; the view remembers every question it answered\n* and reports changed answers when the owner refreshes for publication.\n* Used for model tool-call arguments: a row reads the fields it\n* cares about at whatever granularity it displays, at every stage of the call.\n* @module @deepseek-ai/dsh-util-values/src/partial-json\n*/\nconst SIMPLE_ESCAPES = {\n\t\"\\\"\": \"\\\"\",\n\t\"\\\\\": \"\\\\\",\n\t\"/\": \"/\",\n\tb: \"\\b\",\n\tf: \"\\f\",\n\tn: \"\\n\",\n\tr: \"\\r\",\n\tt: \"\t\"\n};\nconst CONTENT_ESCAPE = /[\\\\\\u0000-\\u001f]/u;\nfunction isWhitespace(c) {\n\treturn c === \" \" || c === \"\\n\" || c === \"\\r\" || c === \"\t\";\n}\nfunction isHex(c) {\n\treturn c >= \"0\" && c <= \"9\" || c >= \"a\" && c <= \"f\" || c >= \"A\" && c <= \"F\";\n}\n/**\n* The view. A streaming instance grows through {@link PartialArguments.append};\n* {@link PartialArguments.fromText} and {@link PartialArguments.fromObject} build\n* sealed instances over a finished call. Every reader is total: an absent or\n* differently typed field answers `undefined` (or `false`), never throws.\n*/\nvar PartialArguments = class PartialArguments {\n\t/** The view of a call with no arguments available. */\n\tstatic EMPTY = PartialArguments.fromObject({});\n\t/**\n\t* View finished argument text without scanning it until a reader asks.\n\t* @param text - the complete argument JSON text.\n\t* @returns a sealed view.\n\t*/\n\tstatic fromText(text) {\n\t\tconst view = new PartialArguments();\n\t\tview.append(text);\n\t\tview.sealed = true;\n\t\treturn view;\n\t}\n\t/**\n\t* View an already parsed argument payload, such as a PTC dispatch object.\n\t* @param value - the parsed argument value.\n\t* @returns a sealed view; a non-object payload has no fields.\n\t*/\n\tstatic fromObject(value) {\n\t\tconst view = new PartialArguments();\n\t\tview.object = typeof value === \"object\" && value !== null && !Array.isArray(value) ? value : {};\n\t\tview.sealed = true;\n\t\treturn view;\n\t}\n\t/**\n\t* The source: text so far or a parsed object, plus whether it can still grow.\n\t* These are the only enumerable fields, so two views over the same source\n\t* compare equal structurally however far each has been read.\n\t*/\n\tchunks = [];\n\tobject;\n\tsealed = false;\n\t#ends = [];\n\t#size = 0;\n\t#consumed = 0;\n\t#mode = \"root\";\n\t#escape = false;\n\t#keyStart = 0;\n\t#keyEscaped = false;\n\t#key = \"\";\n\t#current = null;\n\t#nestedEnds = [];\n\t#nestedInString = false;\n\t#invalidAt;\n\t#invalidValue = false;\n\t#entries = /* @__PURE__ */ new Map();\n\t#order = [];\n\t#reads = /* @__PURE__ */ new Map();\n\t/** Whether this view rejects further appends; does not scan text or register reads. */\n\tget isSealed() {\n\t\treturn this.sealed;\n\t}\n\t/** Whether indexing or a content read found invalid JSON; unread value contents are not validated. */\n\tget invalid() {\n\t\tthis.scan();\n\t\treturn this.#mode === \"invalid\" || this.#invalidValue;\n\t}\n\t/**\n\t* Retain streamed argument text without scanning or comparing observed answers.\n\t* @param fragment - the text following every fragment appended before.\n\t*/\n\tappend(fragment) {\n\t\tif (this.sealed) throw new Error(\"PartialArguments: cannot append to a sealed view\");\n\t\tif (fragment.length === 0) return;\n\t\tthis.chunks.push(fragment);\n\t\tthis.#size += fragment.length;\n\t\tthis.#ends.push(this.#size);\n\t}\n\t/**\n\t* Reconcile a streamed prefix with authoritative complete text without joining the fragments.\n\t* @param text - the final argument text, which replaces missing or conflicting deltas.\n\t* @returns this view sealed with its caches retained when every character matches; otherwise a new sealed view.\n\t*/\n\tsettle(text) {\n\t\tif (this.object !== void 0 || text.length !== this.#size) return PartialArguments.fromText(text);\n\t\tlet offset = 0;\n\t\tfor (const chunk of this.chunks) {\n\t\t\tif (!text.startsWith(chunk, offset)) return PartialArguments.fromText(text);\n\t\t\toffset += chunk.length;\n\t\t}\n\t\tthis.chunks = text.length === 0 ? [] : [text];\n\t\tthis.#ends = text.length === 0 ? [] : [text.length];\n\t\tthis.sealed = true;\n\t\treturn this;\n\t}\n\t/**\n\t* Compare observed answers and advance their publication baseline. Unread views remain unscanned.\n\t* @returns whether any observed answer changed since its first read or the preceding refresh.\n\t*/\n\trefresh() {\n\t\tif (this.#reads.size === 0) return false;\n\t\tthis.scan();\n\t\tlet changed = false;\n\t\tlet completions = false;\n\t\tfor (const read of this.#reads.values()) {\n\t\t\tif (read.completion) {\n\t\t\t\tcompletions = true;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tchanged = this.refreshRead(read) || changed;\n\t\t}\n\t\tif (completions) {\n\t\t\tfor (const read of this.#reads.values()) if (read.completion) changed = this.refreshRead(read) || changed;\n\t\t}\n\t\tif (this.sealed) this.#reads.clear();\n\t\treturn changed;\n\t}\n\trefreshRead(read) {\n\t\tconst now = read.answer();\n\t\tif (Object.is(now, read.last)) return false;\n\t\tread.last = now;\n\t\treturn true;\n\t}\n\t/**\n\t* Check whether no further fields can arrive.\n\t* @returns whether the outer object closed, indexing failed, or the view is sealed; unread values are not validated.\n\t*/\n\tclosed() {\n\t\treturn this.remember(\"closed\", \"\", () => this.closedNow());\n\t}\n\t/**\n\t* List discovered fields in first-appearance order.\n\t* @returns top-level keys seen so far, in first-appearance order.\n\t*/\n\tkeys() {\n\t\treturn this.remember(\"keys\", \"\", () => this.keysNow(), (keys) => keys.length);\n\t}\n\t/**\n\t* Check whether a top-level field has appeared.\n\t* @param key - argument name.\n\t* @returns whether the field has appeared (a string opened or another value began).\n\t*/\n\thas(key) {\n\t\treturn this.remember(\"has\", key, () => this.hasNow(key));\n\t}\n\t/**\n\t* Check whether a field's closing delimiter has arrived, without validating its contents.\n\t* @param key - argument name.\n\t* @returns whether its delimiter arrived and no content reader has reported an error for this value.\n\t*/\n\tcomplete(key) {\n\t\treturn this.remember(\"complete\", key, () => this.completeNow(key));\n\t}\n\t/**\n\t* Read string length without materializing its text.\n\t* @param key - argument name.\n\t* @param options - change granularity for a streaming string.\n\t* @returns decoded UTF-16 length of the string field so far; undefined when absent or not a string.\n\t*/\n\tstringLength(key, options) {\n\t\tconst step = Math.max(1, Math.floor(options?.step ?? 1));\n\t\tconst offset = options?.offset ?? 0;\n\t\treturn this.remember(`length:${step}:${offset}`, key, () => this.lengthNow(key), (length) => length === void 0 ? void 0 : Math.ceil((length + offset) / step));\n\t}\n\t/**\n\t* Check a string against a decoded UTF-16 length limit without materializing it.\n\t* @param key - argument name.\n\t* @param maxLength - decoded UTF-16 limit, floored to at least zero.\n\t* @returns whether the string is longer than the limit; false when absent or not a string.\n\t*/\n\tstringExceeds(key, maxLength) {\n\t\tconst limit = Math.max(0, Math.floor(maxLength));\n\t\treturn this.remember(`exceeds:${limit}`, key, () => (this.lengthNow(key, limit + 1) ?? 0) > limit);\n\t}\n\t/**\n\t* Read a decoded string, including a streaming prefix.\n\t* @param key - argument name.\n\t* @returns the string field's decoded text so far; undefined when absent or not a string.\n\t*/\n\ttext(key) {\n\t\treturn this.remember(\"text\", key, () => this.textNow(key));\n\t}\n\t/**\n\t* Read at most the first decoded UTF-16 units of a string.\n\t* @param key - argument name.\n\t* @param maxLength - maximum decoded UTF-16 length, floored to at least one.\n\t* @returns the bounded string prefix; undefined when absent or not a string.\n\t*/\n\ttextPrefix(key, maxLength) {\n\t\tconst limit = Math.max(1, Math.floor(maxLength));\n\t\treturn this.remember(`prefix:${limit}`, key, () => this.textPrefixNow(key, limit));\n\t}\n\t/**\n\t* Read a completed non-string argument.\n\t* @param key - argument name.\n\t* @returns the parsed non-string value once it closed; undefined while open, absent, or a string.\n\t*/\n\tvalue(key) {\n\t\treturn this.remember(\"value\", key, () => this.valueNow(key));\n\t}\n\t/** Answer a question and, on a streaming view, remember it for change detection. */\n\tremember(kind, key, read, comparison) {\n\t\tthis.scan();\n\t\tconst result = read();\n\t\tif (!this.sealed) {\n\t\t\tconst id = `${kind}/${key}`;\n\t\t\tif (!this.#reads.has(id)) this.#reads.set(id, {\n\t\t\t\tcompletion: kind === \"complete\",\n\t\t\t\tanswer: comparison === void 0 ? read : () => comparison(read()),\n\t\t\t\tlast: comparison === void 0 ? result : comparison(result)\n\t\t\t});\n\t\t}\n\t\treturn result;\n\t}\n\tclosedNow() {\n\t\treturn this.sealed || this.#mode === \"closed\" || this.#mode === \"invalid\";\n\t}\n\tkeysNow() {\n\t\treturn this.object === void 0 ? this.#order : Object.keys(this.object);\n\t}\n\thasNow(key) {\n\t\treturn this.object === void 0 ? this.#entries.has(key) : Object.hasOwn(this.object, key);\n\t}\n\tcompleteNow(key) {\n\t\tif (this.object !== void 0) return Object.hasOwn(this.object, key);\n\t\tconst entry = this.#entries.get(key);\n\t\treturn entry !== void 0 && entry.end >= 0 && (entry.kind === \"string\" ? entry.invalidAt === void 0 : !entry.invalid);\n\t}\n\tlengthNow(key, limit = Number.POSITIVE_INFINITY) {\n\t\tif (this.object !== void 0) {\n\t\t\tconst field = Object.hasOwn(this.object, key) ? this.object[key] : void 0;\n\t\t\treturn typeof field === \"string\" ? field.length : void 0;\n\t\t}\n\t\tconst entry = this.#entries.get(key);\n\t\tif (entry?.kind !== \"string\") return void 0;\n\t\tif (entry.text !== void 0 && entry.text.at === entry.end) return entry.text.length;\n\t\tconst read = entry.length ??= {\n\t\t\tat: entry.start,\n\t\t\tlength: 0,\n\t\t\ttext: \"\"\n\t\t};\n\t\tthis.readString(entry, read, limit, false);\n\t\treturn read.length;\n\t}\n\ttextNow(key) {\n\t\tif (this.object !== void 0) {\n\t\t\tconst field = Object.hasOwn(this.object, key) ? this.object[key] : void 0;\n\t\t\treturn typeof field === \"string\" ? field : void 0;\n\t\t}\n\t\tconst entry = this.#entries.get(key);\n\t\tif (entry?.kind !== \"string\") return void 0;\n\t\tif (entry.text === void 0 && entry.end >= 0 && entry.needsDecoding && entry.invalidAt === void 0) {\n\t\t\tlet text;\n\t\t\ttry {\n\t\t\t\ttext = JSON.parse(`\"${this.slice(entry.start, entry.end)}\"`);\n\t\t\t} catch (_error) {}\n\t\t\tif (text !== void 0) entry.text = {\n\t\t\t\tat: entry.end,\n\t\t\t\tlength: text.length,\n\t\t\t\ttext\n\t\t\t};\n\t\t}\n\t\tconst read = entry.text ??= {\n\t\t\tat: entry.start,\n\t\t\tlength: 0,\n\t\t\ttext: \"\"\n\t\t};\n\t\tthis.readString(entry, read, Number.POSITIVE_INFINITY, true);\n\t\treturn read.text;\n\t}\n\ttextPrefixNow(key, maxLength) {\n\t\tif (this.object !== void 0) {\n\t\t\tconst field = Object.hasOwn(this.object, key) ? this.object[key] : void 0;\n\t\t\treturn typeof field === \"string\" ? field.slice(0, maxLength) : void 0;\n\t\t}\n\t\tconst entry = this.#entries.get(key);\n\t\tif (entry?.kind !== \"string\") return void 0;\n\t\tconst prefixes = entry.prefixes ??= /* @__PURE__ */ new Map();\n\t\tlet read = prefixes.get(maxLength);\n\t\tif (read === void 0) {\n\t\t\tread = {\n\t\t\t\tat: entry.start,\n\t\t\t\tlength: 0,\n\t\t\t\ttext: \"\"\n\t\t\t};\n\t\t\tprefixes.set(maxLength, read);\n\t\t}\n\t\tthis.readString(entry, read, maxLength, true);\n\t\treturn read.text;\n\t}\n\tvalueNow(key) {\n\t\tif (this.object !== void 0) {\n\t\t\tif (!Object.hasOwn(this.object, key)) return void 0;\n\t\t\tconst field = this.object[key];\n\t\t\treturn typeof field === \"string\" ? void 0 : field;\n\t\t}\n\t\tconst entry = this.#entries.get(key);\n\t\tif (entry?.kind !== \"value\" || entry.end < 0 || entry.invalid) return void 0;\n\t\tif (entry.parsed === void 0) try {\n\t\t\tentry.parsed = JSON.parse(this.slice(entry.start, entry.end));\n\t\t} catch (_error) {\n\t\t\tentry.invalid = true;\n\t\t\tthis.#invalidValue = true;\n\t\t}\n\t\treturn entry.parsed;\n\t}\n\tchunkAt(at) {\n\t\tlet low = 0;\n\t\tlet high = this.#ends.length;\n\t\twhile (low < high) {\n\t\t\tconst mid = low + high >>> 1;\n\t\t\tif (this.#ends[mid] <= at) low = mid + 1;\n\t\t\telse high = mid;\n\t\t}\n\t\treturn low;\n\t}\n\t/** Materialize only a requested range, never the cumulative source. */\n\tslice(start, end) {\n\t\tif (start >= end) return \"\";\n\t\tconst first = this.chunkAt(start);\n\t\tconst last = this.chunkAt(end - 1);\n\t\tconst base = first === 0 ? 0 : this.#ends[first - 1];\n\t\tif (first === last) return this.chunks[first].slice(start - base, end - base);\n\t\tconst parts = [this.chunks[first].slice(start - base)];\n\t\tfor (let i = first + 1; i < last; i++) parts.push(this.chunks[i]);\n\t\tparts.push(this.chunks[last].slice(0, end - this.#ends[last - 1]));\n\t\treturn parts.join(\"\");\n\t}\n\treadString(entry, read, limit, materialize) {\n\t\tconst end = Math.min(entry.end < 0 ? this.#consumed : entry.end, entry.invalidAt ?? Number.POSITIVE_INFINITY, this.#invalidAt ?? Number.POSITIVE_INFINITY);\n\t\tif (!entry.needsDecoding) {\n\t\t\tconst length = Math.min(end - read.at, limit - read.length);\n\t\t\tif (length <= 0) return;\n\t\t\tif (materialize) read.text += this.slice(read.at, read.at + length);\n\t\t\tread.at += length;\n\t\t\tread.length += length;\n\t\t\treturn;\n\t\t}\n\t\tlet chunkIndex = this.chunkAt(read.at);\n\t\twhile (read.at < end && read.length < limit) {\n\t\t\tconst base = chunkIndex === 0 ? 0 : this.#ends[chunkIndex - 1];\n\t\t\tconst chunk = this.chunks[chunkIndex];\n\t\t\tconst remaining = chunk.slice(read.at - base, Math.min(chunk.length, end - base));\n\t\t\tconst boundary = remaining.search(CONTENT_ESCAPE);\n\t\t\tconst length = Math.min(boundary < 0 ? remaining.length : boundary, limit - read.length);\n\t\t\tif (length > 0) {\n\t\t\t\tif (materialize) read.text += remaining.slice(0, length);\n\t\t\t\tread.at += length;\n\t\t\t\tread.length += length;\n\t\t\t\tif (read.at === base + chunk.length) chunkIndex++;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst type = remaining.length > 1 ? remaining[1] : read.at + 1 < end ? this.chunks[chunkIndex + 1][0] : void 0;\n\t\t\tlet decoded;\n\t\t\tlet width = 2;\n\t\t\tif (remaining[0] === \"\\\\\" && type === void 0 && entry.end < 0) return;\n\t\t\tif (remaining[0] === \"\\\\\" && type === \"u\") {\n\t\t\t\tconst hex = this.slice(read.at + 2, Math.min(end, read.at + 6));\n\t\t\t\tlet valid = true;\n\t\t\t\tfor (let i = 0; i < hex.length; i++) if (!isHex(hex[i])) valid = false;\n\t\t\t\tif (valid) {\n\t\t\t\t\tif (hex.length < 4 && entry.end < 0) return;\n\t\t\t\t\tif (hex.length === 4) decoded = String.fromCharCode(Number.parseInt(hex, 16));\n\t\t\t\t}\n\t\t\t\twidth = 6;\n\t\t\t} else if (remaining[0] === \"\\\\\" && type !== void 0) decoded = SIMPLE_ESCAPES[type];\n\t\t\tif (decoded === void 0) {\n\t\t\t\tentry.invalidAt = read.at;\n\t\t\t\tthis.#invalidValue = true;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (materialize) read.text += decoded;\n\t\t\tread.length++;\n\t\t\tread.at += width;\n\t\t\twhile (chunkIndex < this.chunks.length && read.at >= this.#ends[chunkIndex]) chunkIndex++;\n\t\t}\n\t}\n\t/** Locate new field ranges without decoding or parsing their contents. */\n\tscan() {\n\t\tif (this.object !== void 0 || this.#consumed === this.#size) return;\n\t\tfor (let i = this.chunkAt(this.#consumed); i < this.chunks.length && this.#invalidAt === void 0; i++) {\n\t\t\tconst pending = this.chunks[i];\n\t\t\tconst base = i === 0 ? 0 : this.#ends[i - 1];\n\t\t\tfor (let index = this.#consumed - base; index < pending.length && this.#mode !== \"invalid\"; index++) {\n\t\t\t\tif (this.#mode === \"string\" || this.#mode === \"nested\" && this.#nestedInString) {\n\t\t\t\t\tconst end = this.stringBoundary(pending, index);\n\t\t\t\t\tthis.#consumed += end - index;\n\t\t\t\t\tindex = end;\n\t\t\t\t\tif (index === pending.length) break;\n\t\t\t\t}\n\t\t\t\tthis.step(pending[index], this.#consumed);\n\t\t\t\tthis.#consumed++;\n\t\t\t}\n\t\t}\n\t}\n\t/** Only raw quotes and their preceding backslash runs can terminate a string. */\n\tstringBoundary(fragment, start) {\n\t\tlet at = start;\n\t\twhile (true) {\n\t\t\tconst quote = fragment.indexOf(\"\\\"\", at);\n\t\t\tconst end = quote < 0 ? fragment.length : quote;\n\t\t\tif (this.#mode === \"string\") {\n\t\t\t\tconst entry = this.#current;\n\t\t\t\tif (!entry.needsDecoding && CONTENT_ESCAPE.test(fragment.slice(at, end))) entry.needsDecoding = true;\n\t\t\t}\n\t\t\tlet slashStart = end;\n\t\t\twhile (slashStart > at && fragment[slashStart - 1] === \"\\\\\") slashStart--;\n\t\t\tconst escaped = (end - slashStart) % 2 === 1 !== (slashStart === at && this.#escape);\n\t\t\tthis.#escape = quote < 0 && escaped;\n\t\t\tif (quote < 0 || !escaped) return end;\n\t\t\tat = quote + 1;\n\t\t}\n\t}\n\tstep(c, at) {\n\t\tswitch (this.#mode) {\n\t\t\tcase \"root\":\n\t\t\t\tif (isWhitespace(c)) return;\n\t\t\t\tif (c === \"{\") {\n\t\t\t\t\tthis.#mode = \"key-or-end\";\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tthis.fail();\n\t\t\t\treturn;\n\t\t\tcase \"key-or-end\":\n\t\t\t\tif (isWhitespace(c)) return;\n\t\t\t\tif (c === \"}\") {\n\t\t\t\t\tthis.#mode = \"closed\";\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (c === \"\\\"\") {\n\t\t\t\t\tthis.beginKey(at);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tthis.fail();\n\t\t\t\treturn;\n\t\t\tcase \"key-only\":\n\t\t\t\tif (isWhitespace(c)) return;\n\t\t\t\tif (c === \"\\\"\") {\n\t\t\t\t\tthis.beginKey(at);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tthis.fail();\n\t\t\t\treturn;\n\t\t\tcase \"key\":\n\t\t\t\tthis.stepKey(c, at);\n\t\t\t\treturn;\n\t\t\tcase \"colon\":\n\t\t\t\tif (isWhitespace(c)) return;\n\t\t\t\tif (c === \":\") {\n\t\t\t\t\tthis.#mode = \"value\";\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tthis.fail();\n\t\t\t\treturn;\n\t\t\tcase \"value\":\n\t\t\t\tthis.beginValue(c, at);\n\t\t\t\treturn;\n\t\t\tcase \"string\": {\n\t\t\t\tconst entry = this.#current;\n\t\t\t\tentry.end = at;\n\t\t\t\tthis.#current = null;\n\t\t\t\tthis.#mode = \"comma-or-end\";\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tcase \"scalar\":\n\t\t\t\tthis.stepScalar(c, at);\n\t\t\t\treturn;\n\t\t\tcase \"nested\":\n\t\t\t\tthis.stepNested(c, at);\n\t\t\t\treturn;\n\t\t\tcase \"comma-or-end\":\n\t\t\t\tif (isWhitespace(c)) return;\n\t\t\t\tif (c === \",\") {\n\t\t\t\t\tthis.#mode = \"key-only\";\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (c === \"}\") {\n\t\t\t\t\tthis.#mode = \"closed\";\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tthis.fail();\n\t\t\t\treturn;\n\t\t\tcase \"closed\":\n\t\t\t\tif (isWhitespace(c)) return;\n\t\t\t\tthis.fail();\n\t\t\t\treturn;\n\t\t\t/* v8 ignore next 2 -- scan() stops stepping once the view is invalid. */\n\t\t\tcase \"invalid\": return;\n\t\t\t/* v8 ignore next 2 -- Every scanner mode has a handler above. */\n\t\t\tdefault: assertNever(this.#mode);\n\t\t}\n\t}\n\tfail() {\n\t\tthis.#invalidAt = this.#consumed;\n\t\tthis.#mode = \"invalid\";\n\t\tthis.#current = null;\n\t}\n\tbeginKey(at) {\n\t\tthis.#mode = \"key\";\n\t\tthis.#keyStart = at + 1;\n\t\tthis.#keyEscaped = false;\n\t\tthis.#escape = false;\n\t}\n\tstepKey(c, at) {\n\t\tif (c < \" \") {\n\t\t\tthis.fail();\n\t\t\treturn;\n\t\t}\n\t\tif (this.#escape) {\n\t\t\tthis.#escape = false;\n\t\t\treturn;\n\t\t}\n\t\tif (c === \"\\\\\") {\n\t\t\tthis.#escape = true;\n\t\t\tthis.#keyEscaped = true;\n\t\t\treturn;\n\t\t}\n\t\tif (c !== \"\\\"\") return;\n\t\tconst raw = this.slice(this.#keyStart, at);\n\t\tif (this.#keyEscaped) try {\n\t\t\tthis.#key = JSON.parse(`\"${raw}\"`);\n\t\t} catch (_error) {\n\t\t\tthis.fail();\n\t\t\treturn;\n\t\t}\n\t\telse this.#key = raw;\n\t\tthis.#mode = \"colon\";\n\t}\n\topen(entry) {\n\t\tif (!this.#entries.has(this.#key)) this.#order.push(this.#key);\n\t\tthis.#entries.set(this.#key, entry);\n\t\tthis.#current = entry;\n\t}\n\tbeginValue(c, at) {\n\t\tif (isWhitespace(c)) return;\n\t\tif (c === \"\\\"\") {\n\t\t\tthis.open({\n\t\t\t\tkind: \"string\",\n\t\t\t\tstart: at + 1,\n\t\t\t\tend: -1,\n\t\t\t\tneedsDecoding: false,\n\t\t\t\tinvalidAt: void 0,\n\t\t\t\tlength: void 0,\n\t\t\t\ttext: void 0,\n\t\t\t\tprefixes: void 0\n\t\t\t});\n\t\t\tthis.#escape = false;\n\t\t\tthis.#mode = \"string\";\n\t\t\treturn;\n\t\t}\n\t\tif (c === \"}\" || c === \",\" || c === \":\" || c === \"]\") {\n\t\t\tthis.fail();\n\t\t\treturn;\n\t\t}\n\t\tthis.open({\n\t\t\tkind: \"value\",\n\t\t\tstart: at,\n\t\t\tend: -1,\n\t\t\tparsed: void 0,\n\t\t\tinvalid: false\n\t\t});\n\t\tif (c === \"{\" || c === \"[\") {\n\t\t\tthis.#mode = \"nested\";\n\t\t\tthis.#nestedEnds = [c === \"{\" ? \"}\" : \"]\"];\n\t\t\tthis.#nestedInString = false;\n\t\t\tthis.#escape = false;\n\t\t\treturn;\n\t\t}\n\t\tthis.#mode = \"scalar\";\n\t}\n\tstepScalar(c, at) {\n\t\tif (c !== \",\" && c !== \"}\" && !isWhitespace(c)) return;\n\t\tthis.closeValue(at);\n\t\tthis.#mode = c === \",\" ? \"key-only\" : c === \"}\" ? \"closed\" : \"comma-or-end\";\n\t}\n\tstepNested(c, at) {\n\t\tif (this.#nestedInString) {\n\t\t\tthis.#nestedInString = false;\n\t\t\treturn;\n\t\t}\n\t\tif (c === \"\\\"\") {\n\t\t\tthis.#nestedInString = true;\n\t\t\treturn;\n\t\t}\n\t\tif (c === \"{\" || c === \"[\") {\n\t\t\tthis.#nestedEnds.push(c === \"{\" ? \"}\" : \"]\");\n\t\t\treturn;\n\t\t}\n\t\tif (c === \"}\" || c === \"]\") {\n\t\t\tif (this.#nestedEnds.pop() !== c) {\n\t\t\t\tthis.fail();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (this.#nestedEnds.length === 0) {\n\t\t\t\tthis.closeValue(at + 1);\n\t\t\t\tthis.#mode = \"comma-or-end\";\n\t\t\t}\n\t\t}\n\t}\n\tcloseValue(end) {\n\t\tconst entry = this.#current;\n\t\tentry.end = end;\n\t\tthis.#current = null;\n\t}\n};\n//#endregion\n//#region lib/types/index.js\n/** Duplicate-install-safe JSON and immutable-value helpers. @module @deepseek-ai/dsh-util-values */\n/**\n* Mark an unreachable closed-union branch.\n* @param value - impossible value; an unhandled typed variant fails at the call site.\n* @param context - optional switch-site label included in the failure message.\n* @returns never; a runtime value that escaped its type always throws.\n*/\nfunction assertNever(value, context) {\n\tconst rendered = JSON.stringify(value) ?? String(value);\n\tthrow new Error(`unreachable variant${context ? ` in ${context}` : \"\"}: ${rendered}`);\n}\n/** Whether a realm-owned intrinsic prototype has a native constructor matching this engine's representation. */\nfunction hasIntrinsicConstructor(prototype, name) {\n\tconst constructor = Object.getOwnPropertyDescriptor(prototype, \"constructor\")?.value;\n\tif (typeof constructor !== \"function\") return false;\n\ttry {\n\t\treturn constructor.name === name && constructor.prototype === prototype && Function.prototype.toString.call(constructor) === Function.prototype.toString.call(name === \"Array\" ? Array : Object);\n\t} catch {\n\t\treturn false;\n\t}\n}\n/** Whether a candidate is one realm's intrinsic `Object.prototype`. */\nfunction isIntrinsicObjectPrototype(value) {\n\treturn Object.getPrototypeOf(value) === null && hasIntrinsicConstructor(value, \"Object\");\n}\n/** Whether an array uses one realm's intrinsic `Array.prototype`, not a subclass or forged prototype. */\nfunction hasPlainArrayPrototype(value) {\n\tconst prototype = Object.getPrototypeOf(value);\n\tif (!Array.isArray(prototype) || !hasIntrinsicConstructor(prototype, \"Array\")) return false;\n\tconst objectPrototype = Object.getPrototypeOf(prototype);\n\treturn typeof objectPrototype === \"object\" && objectPrototype !== null && isIntrinsicObjectPrototype(objectPrototype);\n}\n/** Whether an object is a plain or null-prototype record from any JavaScript realm. */\nfunction hasPlainObjectPrototype(value) {\n\tconst prototype = Object.getPrototypeOf(value);\n\treturn prototype === null || typeof prototype === \"object\" && isIntrinsicObjectPrototype(prototype);\n}\n/** Return every JSON-visible object key, or reject own data JSON would discard. */\nfunction enumerableStringKeys(value) {\n\tconst keys = Reflect.ownKeys(value);\n\tif (keys.some((key) => typeof key !== \"string\" || !Object.prototype.propertyIsEnumerable.call(value, key))) return void 0;\n\treturn keys;\n}\n/** Validate lossless JSON iteratively, optionally materializing a detached snapshot. */\nfunction walkJsonValue(value, detach) {\n\tconst ancestors = /* @__PURE__ */ new Set();\n\tlet root;\n\tlet parent;\n\tconst assign = (item) => {\n\t\tif (parent === void 0) {\n\t\t\tif (detach) root = item;\n\t\t} else if (parent.kind === \"array\") {\n\t\t\tif (parent.target !== void 0) parent.target[parent.key] = item;\n\t\t} else if (parent.target !== void 0) Object.defineProperty(parent.target, parent.key, {\n\t\t\tvalue: item,\n\t\t\tenumerable: true,\n\t\t\tconfigurable: true,\n\t\t\twritable: true\n\t\t});\n\t};\n\tconst frames = [];\n\tlet current = value;\n\tfor (;;) {\n\t\tif (current === null) assign(null);\n\t\telse if (typeof current === \"boolean\" || typeof current === \"string\") assign(current);\n\t\telse if (typeof current === \"number\") {\n\t\t\tif (!Number.isFinite(current) || Object.is(current, -0)) return void 0;\n\t\t\tassign(current);\n\t\t} else {\n\t\t\tif (typeof current !== \"object\") return void 0;\n\t\t\tif (ancestors.has(current)) return void 0;\n\t\t\tif (Array.isArray(current)) {\n\t\t\t\tif (!hasPlainArrayPrototype(current)) return void 0;\n\t\t\t\tconst length = current.length;\n\t\t\t\tif (Reflect.ownKeys(current).length !== length + 1) return void 0;\n\t\t\t\tconst target = detach ? [] : void 0;\n\t\t\t\tif (target !== void 0) assign(target);\n\t\t\t\tlet indices;\n\t\t\t\tif (!Number.isInteger(length)) {\n\t\t\t\t\tindices = [];\n\t\t\t\t\tfor (let index = length - 1; index >= 0; index--) indices.push(index);\n\t\t\t\t}\n\t\t\t\tframes.push({\n\t\t\t\t\tkind: \"array\",\n\t\t\t\t\tsource: current,\n\t\t\t\t\tlength: indices?.length ?? length,\n\t\t\t\t\tindex: 0,\n\t\t\t\t\tkey: 0,\n\t\t\t\t\tindices,\n\t\t\t\t\ttarget\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tif (!hasPlainObjectPrototype(current)) return void 0;\n\t\t\t\tconst keys = enumerableStringKeys(current);\n\t\t\t\tif (keys === void 0) return void 0;\n\t\t\t\tconst target = detach ? {} : void 0;\n\t\t\t\tif (target !== void 0) assign(target);\n\t\t\t\tframes.push({\n\t\t\t\t\tkind: \"object\",\n\t\t\t\t\tsource: current,\n\t\t\t\t\tkeys,\n\t\t\t\t\tindex: 0,\n\t\t\t\t\tkey: \"\",\n\t\t\t\t\ttarget\n\t\t\t\t});\n\t\t\t}\n\t\t\tancestors.add(current);\n\t\t}\n\t\tfor (;;) {\n\t\t\tconst frame = frames.at(-1);\n\t\t\tif (frame === void 0) return detach ? root : true;\n\t\t\tconst length = frame.kind === \"array\" ? frame.length : frame.keys.length;\n\t\t\tif (frame.index >= length) {\n\t\t\t\tancestors.delete(frame.source);\n\t\t\t\tframes.pop();\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst index = frame.index++;\n\t\t\tparent = frame;\n\t\t\tif (frame.kind === \"array\") {\n\t\t\t\tconst key = frame.indices === void 0 ? index : frame.indices[frame.indices.length - index - 1];\n\t\t\t\t/* v8 ignore next -- the loop is bounded by the captured index count. */\n\t\t\t\tif (key === void 0) return void 0;\n\t\t\t\tif (!Object.prototype.hasOwnProperty.call(frame.source, key)) return void 0;\n\t\t\t\tframe.key = key;\n\t\t\t\tcurrent = frame.source[key];\n\t\t\t} else {\n\t\t\t\tconst key = frame.keys[index];\n\t\t\t\t/* v8 ignore next -- the loop is bounded by the captured key count. */\n\t\t\t\tif (key === void 0) return void 0;\n\t\t\t\tframe.key = key;\n\t\t\t\tcurrent = frame.source[key];\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t}\n}\n/**\n* Validate and detach lossless JSON in one read per property.\n* @param value - candidate value to validate and detach.\n* @returns the detached snapshot, or `undefined` when the value is not losslessly JSON-serializable.\n*/\nfunction snapshotJsonValue(value) {\n\treturn walkJsonValue(value, true);\n}\n/**\n* Test the same lossless JSON rules as {@link snapshotJsonValue} without detaching the value.\n* @param value - candidate value to test.\n* @returns whether the value survives a JSON round trip without loss.\n*/\nfunction isJsonValue(value) {\n\treturn walkJsonValue(value, false) === true;\n}\n/**\n* Compare JSON-compatible values structurally.\n* @param a - one JSON-compatible value.\n* @param b - the other JSON-compatible value.\n* @returns whether both values contain the same JSON data.\n*/\nfunction deepEqualJson(a, b) {\n\tif (a === b) return true;\n\tif (typeof a !== \"object\" || typeof b !== \"object\" || a === null || b === null) return false;\n\tif (Array.isArray(a) || Array.isArray(b)) {\n\t\tif (!Array.isArray(a) || !Array.isArray(b) || a.length !== b.length) return false;\n\t\treturn a.every((entry, index) => deepEqualJson(entry, b[index]));\n\t}\n\tconst left = a;\n\tconst right = b;\n\tconst keys = Object.keys(left);\n\tif (keys.length !== Object.keys(right).length) return false;\n\treturn keys.every((key) => key in right && deepEqualJson(left[key], right[key]));\n}\n/**\n* Deep-freeze an object graph in place while leaving live AbortSignal objects mutable.\n* @param value - value to freeze.\n* @returns the same value after every reachable enumerable child is frozen.\n*/\nfunction deepFreeze(value) {\n\tconst seen = /* @__PURE__ */ new WeakSet();\n\tconst pending = [{\n\t\tkind: \"visit\",\n\t\tnode: value\n\t}];\n\twhile (pending.length > 0) {\n\t\tconst task = pending.pop();\n\t\t/* v8 ignore next -- the loop condition guarantees one pending task. */\n\t\tif (task === void 0) continue;\n\t\tif (task.kind === \"property\") {\n\t\t\tpending.push({\n\t\t\t\tkind: \"visit\",\n\t\t\t\tnode: task.source[task.key]\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tconst node = task.node;\n\t\tif (node === null || typeof node !== \"object\") continue;\n\t\tif (node instanceof AbortSignal) continue;\n\t\tif (seen.has(node)) continue;\n\t\tseen.add(node);\n\t\tObject.freeze(node);\n\t\tconst keys = Object.keys(node);\n\t\tfor (let index = keys.length - 1; index >= 0; index--) {\n\t\t\tconst key = keys[index];\n\t\t\t/* v8 ignore next -- the loop is bounded by the captured key count. */\n\t\t\tif (key === void 0) continue;\n\t\t\tpending.push({\n\t\t\t\tkind: \"property\",\n\t\t\t\tsource: node,\n\t\t\t\tkey\n\t\t\t});\n\t\t}\n\t}\n\treturn value;\n}\n/**\n* Weak-key lookup with a strongly retained iterable set of associated values.\n*\n* Each value must belong to only one key. The container performs no automatic\n* cleanup; owners delete associations or clear the container at lifecycle end.\n*/\nvar WeakMapWithValues = class {\n\tkeys = /* @__PURE__ */ new WeakMap();\n\tvalueSet = /* @__PURE__ */ new Set();\n\t/** Live strongly retained values in insertion order. */\n\tvalues = this.valueSet;\n\t/**\n\t* Read the value associated with a key.\n\t* @param key - weakly held lookup key.\n\t* @returns the associated value, or absence.\n\t*/\n\tget(key) {\n\t\treturn this.keys.get(key);\n\t}\n\t/**\n\t* Test whether a key has an association.\n\t* @param key - weakly held lookup key.\n\t* @returns whether the key is present.\n\t*/\n\thas(key) {\n\t\treturn this.keys.has(key);\n\t}\n\t/**\n\t* Associate one key with one caller-unique value.\n\t* @param key - weakly held lookup key.\n\t* @param value - strongly retained value that belongs to no other key.\n\t* @returns this container.\n\t*/\n\tset(key, value) {\n\t\tif (this.keys.has(key)) {\n\t\t\tconst previous = this.keys.get(key);\n\t\t\tif (previous === value) return this;\n\t\t\tthis.valueSet.delete(previous);\n\t\t}\n\t\tthis.keys.set(key, value);\n\t\tthis.valueSet.add(value);\n\t\treturn this;\n\t}\n\t/**\n\t* Remove one association and its strongly retained value.\n\t* @param key - weakly held lookup key.\n\t* @returns whether an association was removed.\n\t*/\n\tdelete(key) {\n\t\tif (!this.keys.has(key)) return false;\n\t\tconst value = this.keys.get(key);\n\t\tconst deleted = this.keys.delete(key);\n\t\tthis.valueSet.delete(value);\n\t\treturn deleted;\n\t}\n\t/** Remove every association and strongly retained value. */\n\tclear() {\n\t\tthis.keys = /* @__PURE__ */ new WeakMap();\n\t\tthis.valueSet.clear();\n\t}\n};\n//#endregion\nexport { PartialArguments, WeakMapWithValues, assertNever, deepEqualJson, deepFreeze, isJsonValue, snapshotJsonValue };\n","//#region lib/types/file-address.js\n/**\n* The `dsh-resource://file/…` address grammar: how a file is named across the\n* Sidebar and the resource model, built and parsed without touching a\n* filesystem.\n* @module\n*/\n/** The scheme and type every file address opens with. */\nconst FILE_ADDRESS_PREFIX = \"dsh-resource://file/\";\n/** Component-encode one id or path segment, keeping `:` literal for drive letters. */\nfunction encodeSegment(segment) {\n\treturn encodeURIComponent(segment).replace(/%3A/gi, \":\");\n}\n/** Encode a `/`-separated path segment by segment. */\nfunction encodePath(path) {\n\treturn path.split(\"/\").map(encodeSegment).join(\"/\");\n}\n/** Whether a decoded first path segment is a Windows drive (`C:`). */\nfunction isDriveSegment(segment) {\n\treturn segment !== void 0 && /^[A-Za-z]:$/.test(segment);\n}\n/**\n* Build the address of a file read through one Session.\n* @param sessionId - the Session whose Host workspace resolves the path.\n* @param path - absolute or workspace-relative path; backslashes are normalized to `/`, and leading `./` prefixes are dropped.\n* @returns the `dsh-resource://file/session/<sessionId>/<path>` address.\n*/\nfunction sessionFileAddress(sessionId, path) {\n\tconst normalized = path.replace(/\\\\/g, \"/\").replace(/^(?:\\.\\/)+/, \"\");\n\treturn `${FILE_ADDRESS_PREFIX}session/${encodeSegment(sessionId)}/${encodePath(normalized)}`;\n}\n/**\n* Build the address of a file by its absolute path.\n* @param path - absolute path; backslashes are normalized to `/` and the leading `/` is dropped,\n* except that a UNC path (`\\\\server\\share`) keeps one empty first segment.\n* @returns the `dsh-resource://file/absolute/<path>` address.\n*/\nfunction absoluteFileAddress(path) {\n\tconst normalized = path.replace(/\\\\/g, \"/\");\n\tconst unc = normalized.startsWith(\"//\");\n\tconst absolute = normalized.replace(/^\\/+/, \"\");\n\treturn `${FILE_ADDRESS_PREFIX}absolute/${unc ? \"/\" : \"\"}${encodePath(absolute)}`;\n}\n/**\n* Read a file address back into its parts without resolving `.` or `..`.\n* Query and fragment suffixes are ignored; encoded path segments are decoded.\n* @param address - a candidate address.\n* @returns the parts, or `undefined` when the string is not a `dsh-resource://file/` URI in a known scope with a path, or a segment is not validly encoded.\n*/\nfunction parseFileAddress(address) {\n\ttry {\n\t\tif (!address.startsWith(FILE_ADDRESS_PREFIX)) return void 0;\n\t\tconst end = address.search(/[?#]/);\n\t\tconst [scope, ...rest] = address.slice(20, end === -1 ? void 0 : end).split(\"/\");\n\t\tif (scope === \"session\") {\n\t\t\tconst [id, ...segments] = rest;\n\t\t\tif (id === void 0 || id === \"\" || segments.length === 0) return void 0;\n\t\t\treturn {\n\t\t\t\tscope,\n\t\t\t\tsessionId: decodeURIComponent(id),\n\t\t\t\tpath: segments.map(decodeURIComponent).join(\"/\")\n\t\t\t};\n\t\t}\n\t\tif (scope === \"absolute\") {\n\t\t\tconst unc = rest[0] === \"\" && rest.length > 1;\n\t\t\tconst segments = (unc ? rest.slice(1) : rest).map(decodeURIComponent);\n\t\t\tif (segments.length === 0 || segments[0] === \"\") return void 0;\n\t\t\tif (unc) return {\n\t\t\t\tscope,\n\t\t\t\tpath: `//${segments.join(\"/\")}`\n\t\t\t};\n\t\t\treturn {\n\t\t\t\tscope,\n\t\t\t\tpath: isDriveSegment(segments[0]) ? segments.join(\"/\") : `/${segments.join(\"/\")}`\n\t\t\t};\n\t\t}\n\t\treturn;\n\t} catch {\n\t\treturn;\n\t}\n}\n//#endregion\n//#region lib/types/index.js\n/**\n* Browser-safe Workspace path and display helpers.\n* @module @deepseek-ai/dsh-util-workspace-path\n*/\n/** Whether a path uses a Windows drive or UNC prefix. */\nfunction isWindowsStylePath(value) {\n\treturn /^[A-Za-z]:[/\\\\]/.test(value) || value.startsWith(\"\\\\\\\\\");\n}\n/**\n* Whether a path is absolute in either spelling the Host accepts: POSIX (`/a/b`) or Windows drive or UNC.\n* @param path - the path to classify.\n* @returns `true` for an absolute path; `false` for a Workspace-relative one.\n*/\nfunction isAbsoluteWorkspacePath(path) {\n\treturn path.startsWith(\"/\") || isWindowsStylePath(path);\n}\n/**\n* Resolve a Workspace-relative path into the Host-facing spelling used by path operations.\n* @param cwd - Session Workspace root, when known.\n* @param path - Absolute or Workspace-relative path; leading `./` segments are dropped when joining.\n* @returns an absolute path when a Workspace root is available, otherwise the original path.\n*/\nfunction resolveWorkspacePath(cwd, path) {\n\tif (isAbsoluteWorkspacePath(path)) return path;\n\tif (cwd === void 0 || cwd === \"\") return path;\n\tconst separator = isWindowsStylePath(cwd) && cwd.includes(\"\\\\\") ? \"\\\\\" : \"/\";\n\treturn `${cwd.replace(/[/\\\\]+$/, \"\")}${separator}${path.replace(/^(?:\\.?[/\\\\])+/, \"\")}`;\n}\n/**\n* Abbreviate a POSIX home directory for display.\n* @param path - Absolute or already-short display path.\n* @param home - Host account home; absent skips abbreviation.\n* @returns `~` or `~/…` for the POSIX home and its descendants, otherwise `path`.\n*/\nfunction abbreviateHomePath(path, home) {\n\tif (home === void 0 || home === \"\") return path;\n\tif (isWindowsStylePath(path) || isWindowsStylePath(home)) return path;\n\tconst root = home.replace(/\\/+$/, \"\");\n\tif (root === \"\" || root === \"/\") return path;\n\tif (path.replace(/\\/+$/, \"\") === root) return \"~\";\n\tif (path.startsWith(`${root}/`)) return `~${path.slice(root.length)}`;\n\treturn path;\n}\n/**\n* Read the final non-empty segment of a Workspace path for display.\n* Workspace-label surfaces use this helper instead of deriving another basename.\n* @param path - Workspace directory path using POSIX or Windows separators.\n* @returns the final segment, or an empty string for a separator-only path.\n*/\nfunction workspaceTitleOf(path) {\n\tconst trimmed = path.replace(/[/\\\\]+$/, \"\");\n\tconst separator = Math.max(trimmed.lastIndexOf(\"/\"), trimmed.lastIndexOf(\"\\\\\"));\n\treturn trimmed.slice(separator + 1);\n}\n/**\n* Split a path for display: the directories through their last separator, and\n* the final segment after it. Both `/` and `\\` separate, so a Windows path\n* splits where its own segments end; trailing separators are dropped first, so\n* a directory path names its own last segment. A path with no separator, or a\n* separator-only path, is all name.\n* @param path - file or directory path using POSIX or Windows separators.\n* @returns the directory prefix (possibly empty) and the final segment.\n*/\nfunction pathPartsOf(path) {\n\tconst trimmed = path.replace(/[/\\\\]+$/, \"\");\n\tif (trimmed === \"\") return {\n\t\tdirectory: \"\",\n\t\tname: path\n\t};\n\tconst cut = Math.max(trimmed.lastIndexOf(\"/\"), trimmed.lastIndexOf(\"\\\\\")) + 1;\n\treturn {\n\t\tdirectory: trimmed.slice(0, cut),\n\t\tname: trimmed.slice(cut)\n\t};\n}\n/**\n* The address for a path as a caller holds it: a relative path, or an absolute\n* path inside the Session's workspace, becomes a `session`-scoped address; an\n* absolute path outside it, or one whose workspace root is unknown, keeps its\n* absolute path in that Session's address.\n* @param sessionId - the Session the path is read in.\n* @param cwd - that Session's workspace root, when known.\n* @param path - absolute or workspace-relative path, in either separator spelling.\n* @returns the `dsh-resource://file/…` address.\n*/\nfunction fileAddressFor(sessionId, cwd, path) {\n\tconst normalized = path.replace(/\\\\/g, \"/\");\n\tif (!isAbsoluteWorkspacePath(normalized)) return sessionFileAddress(sessionId, normalized);\n\tconst root = cwd === void 0 ? \"\" : cwd.replace(/\\\\/g, \"/\").replace(/\\/+$/, \"\");\n\tif (root !== \"\" && normalized === root) return sessionFileAddress(sessionId, \"\");\n\tif (root !== \"\" && normalized.startsWith(`${root}/`)) return sessionFileAddress(sessionId, normalized.slice(root.length + 1));\n\treturn sessionFileAddress(sessionId, normalized);\n}\n/**\n* Strip the workspace root from a workspace-rooted absolute path (display only).\n* @param text - the path to shorten.\n* @param cwd - session workspace root; absent or empty leaves the path unchanged.\n* @returns the path relative to the workspace root, or unchanged when it is not rooted there.\n*/\nfunction relativizeToCwd(text, cwd) {\n\tif (cwd === void 0 || cwd === \"\") return text;\n\tconst root = cwd.replace(/[/\\\\]+$/, \"\");\n\tif (text.startsWith(`${root}/`) || text.startsWith(`${root}\\\\`)) return text.slice(root.length + 1);\n\treturn text;\n}\n/**\n* Address a decoded absolute file path through the authenticated file route.\n* @param base - HTTP(S) application base, including its deployment prefix, or `dsh-app://app/`.\n* @param path - Native file path; URL escapes in authored Markdown must already be decoded.\n* @returns File URL, or undefined for unsupported transports and non-absolute paths.\n*/\nfunction fileMediaUrl(base, path) {\n\tif (!/^https?:/u.test(base) && !base.startsWith(\"dsh-app://app/\") || !isAbsoluteWorkspacePath(path) || /^[/\\\\]{2}/u.test(path) || /[\\u0000-\\u001f\\u007f]/u.test(path)) return void 0;\n\treturn new URL(`api/file?path=${encodeURIComponent(path)}`, base).href;\n}\n//#endregion\nexport { abbreviateHomePath, absoluteFileAddress, fileAddressFor, fileMediaUrl, isAbsoluteWorkspacePath, parseFileAddress, pathPartsOf, relativizeToCwd, resolveWorkspacePath, sessionFileAddress, workspaceTitleOf };\n","/**\n * Derives the workspace browser tree from caller-projected Workspace and\n * Session order. Unassigned Sessions trail under Ungrouped; only the selected\n * blank Session remains visible.\n */\nimport type {\n SessionListState, SessionSearchResultItem, SessionSummary,\n} from '@deepseek-ai/dsh-api-session-controller/client'\nimport type { WorkspaceId, WorkspaceView } from '@deepseek-ai/dsh-api-workspace-controller/client'\nimport type {\n SessionStatusSnapshot,\n} from '@deepseek-ai/dsh-client-ui-session/client'\nimport type { SessionId } from '@deepseek-ai/dsh-session/types'\nimport { assertNever } from '@deepseek-ai/dsh-util-values'\nimport { workspaceTitleOf } from '@deepseek-ai/dsh-util-workspace-path'\n\n/** Group key for Sessions outside every Workspace. */\nexport const UNGROUPED_KEY = ''\n\n/**\n * Resolve the Workspace browser group that owns one Session.\n * @param workspaces - authoritative Workspace membership.\n * @param sessionId - Session whose browser group is required.\n * @returns owning Workspace id, or {@link UNGROUPED_KEY} when no Workspace accounts for it.\n */\nexport function owningGroupKey(\n workspaces: readonly WorkspaceView[],\n sessionId: SessionId,\n): string {\n return (workspaces.find(workspace => workspace.sessionIds.includes(sessionId))\n ?.workspaceId as string | undefined) ?? UNGROUPED_KEY\n}\n\n/** Pending interaction kinds with dedicated Workspace-row presentation. */\nexport type SessionPendingInteractionStatus = 'approval' | 'plan-review' | 'question'\ntype SessionStatuses = SessionStatusSnapshot\n\nfunction mainSessionId(list: SessionListState): SessionId | undefined {\n return Object.values(list.byId)\n .find(session => (session.retainedBy.mainView ?? 0) > 0)?.id\n}\n\n/** One top-level session row in a group or the flat list. */\nexport interface SessionNode {\n id: SessionId\n /** Stored title, or empty; the renderer localizes blank and unnamed row labels. */\n title: string\n /** The provisional blank session (renderer shows the localized New Session title). */\n blank: boolean\n /** A Session-scoped UI consumer is awaiting this user. */\n pendingInteraction?: SessionPendingInteractionStatus\n running: boolean\n /** Running subagent descendants at any depth. */\n runningSubagentCount: number\n /** Finished running while not selected and not yet opened (the green \"done\" reminder dot). */\n completed: boolean\n /** In the registry-global pin set: leads its section, reorderable only among pinned rows. */\n pinned: boolean\n /** In the registry-global archive set: shown grayed in place and not openable. */\n archived: boolean\n updatedAt: number\n /** Session working directory; absent when the Host reports none or an empty path. */\n cwd?: string\n}\n\n/** Session order selected by the Workspace browser. */\nexport type SessionOrderBy = 'manual' | 'updated'\n\n/** One workspace group section: header row facts + visible top-level session rows. */\nexport interface GroupNode {\n /** Group key: the workspace id or {@link UNGROUPED_KEY}. */\n key: string\n /** Backing Workspace id; absent only for the ungrouped bucket. */\n workspaceId: WorkspaceId | undefined\n cwd: string | undefined\n /** Workspace creation time (epoch ms); absent only for the ungrouped bucket. */\n createdAt: number | undefined\n label: string\n /** Total visible sessions in the group. */\n sessionCount: number\n expanded: boolean\n /** The group contains the selected session (active folder tint; supplied here so the renderer never scans). */\n containsCurrent: boolean\n /**\n * A folded group holds executing work — its own running Session or a running\n * descendant — so the header's closed-folder icon carries the activity the\n * hidden rows would otherwise show. Always false while the group is expanded.\n */\n running: boolean\n /**\n * A folded group holds a visible finished-but-unviewed Session, so the\n * header's closed-folder icon carries the completion reminder the hidden row\n * would otherwise show. Always false while the group is expanded.\n */\n completedUnread: boolean\n /** Visible session rows (empty while the group is folded). */\n sessions: readonly SessionNode[]\n}\n\n/** One flat search row combining list metadata with an optional content match. */\nexport interface SearchResultNode {\n id: SessionId\n title: string\n workspace: string\n /** A Session-scoped UI consumer is awaiting this user. */\n pendingInteraction?: SessionPendingInteractionStatus\n running: boolean\n /** Running subagent descendants at any depth. */\n runningSubagentCount: number\n /** Finished running while not selected and not yet opened (the green \"done\" reminder dot). */\n completed: boolean\n /** In the registry-global archive set: shown grayed and not openable. */\n archived: boolean\n snippet?: string\n}\n\n/** Bounded merged search projection plus the refine-query hint bit. */\nexport interface SearchResultSet {\n items: readonly SearchResultNode[]\n hasMore: boolean\n}\n\n/** Viewing state consumed by the derivation. */\nexport interface TreeView {\n expandedGroups: readonly string[]\n /** Browser-local order for Sessions without a backing Workspace account. */\n ungroupedOrder?: readonly string[]\n}\n\ninterface Group {\n key: string\n workspaceId: WorkspaceId | undefined\n cwd: string | undefined\n createdAt: number | undefined\n label: string\n sessions: SessionSummary[]\n}\n\n/**\n * Directory display label: basename of the path (both separators accepted).\n * Ungrouped-bucket fallback for surfaces without a workspace title.\n * @param cwd - directory path, or undefined for the ungrouped bucket.\n * @returns basename, the raw cwd when it has no basename, or an empty ungrouped marker.\n */\nexport function workspaceLabel(cwd: string | undefined): string {\n if (cwd === undefined || cwd === '') return ''\n const base = workspaceTitleOf(cwd)\n return base !== '' ? base : cwd\n}\n\n/**\n * Project known account members by current Session recency.\n * @param sessionIds - authoritative account membership.\n * @param summaries - current Session summaries; members without a summary are omitted until it arrives.\n * @returns known members newest first, with Session identity as the deterministic tie-break.\n */\nexport function orderByRecency(\n sessionIds: readonly SessionId[],\n summaries: SessionListState['byId'],\n): SessionId[] {\n return sessionIds.flatMap((id) => {\n const summary = summaries[id]\n if (summary === undefined) return []\n return [{ id, rank: summary.updatedAt }]\n })\n .sort((a, b) => {\n if (a.rank !== b.rank) return b.rank - a.rank\n return a.id < b.id ? -1 : 1\n })\n .map(member => member.id)\n}\n\n/**\n * Reconcile a browser-local manual order with current account membership.\n * Saved entries retain their relative order; new ordinary members follow them by recency.\n * @param memberIds - authoritative account membership.\n * @param savedOrder - previously saved browser-local order.\n * @param summaries - current Session metadata; unknown new members wait for their summaries.\n * @param rowState - global pin and archive membership; only account members can supplement the order.\n * @returns saved relative positions plus missing members ordered by pin, recency, and archive status.\n */\nexport function reconcileManualOrder(\n memberIds: readonly SessionId[],\n savedOrder: readonly string[] | undefined,\n summaries: SessionListState['byId'],\n rowState?: Pick<SessionRowState, 'pinnedSessionIds' | 'archivedSessionIds'>,\n): SessionId[] {\n const members = new Map(memberIds.map(id => [id as string, id]))\n const included = new Set<string>()\n const ordered: SessionId[] = []\n for (const key of savedOrder ?? []) {\n const id = members.get(key)\n if (id === undefined || included.has(key)) continue\n ordered.push(id)\n included.add(key)\n }\n const archived = new Set(rowState?.archivedSessionIds)\n const pins: SessionId[] = []\n for (const sessionId of rowState?.pinnedSessionIds ?? []) {\n const id = members.get(sessionId)\n if (id === undefined || included.has(id) || archived.has(id) || summaries[id] === undefined) continue\n pins.push(id)\n included.add(id)\n }\n const ordinary: SessionId[] = []\n const archives: SessionId[] = []\n for (const id of orderByRecency([...members.values()].filter(id => !included.has(id)), summaries)) {\n if (archived.has(id)) archives.push(id)\n else ordinary.push(id)\n }\n return [...pins, ...ordered, ...ordinary, ...archives]\n}\n\n/**\n * Keep the selected provisional New Session ahead of either base order.\n * @param order - recency or reconciled manual order.\n * @param currentBlank - selected blank Session in this account, when present.\n * @returns a copy with the selected blank first and no duplicate slot.\n */\nexport function pinCurrentBlank(\n order: readonly SessionId[],\n currentBlank: SessionId | undefined,\n): SessionId[] {\n if (currentBlank === undefined) return [...order]\n return [currentBlank, ...order.filter(id => id !== currentBlank)]\n}\n\n/**\n * Archived-row visibility choice: the default hides archived rows, `show`\n * mixes them into their kept slots, and `only` restricts the view (and\n * search) to archived rows.\n */\nexport type ArchivedFilter = 'default' | 'show' | 'only'\n\n/**\n * Ordinary sessions are visible; among blank sessions, only the current one\n * is visible. Subagent children use their parent header catalog; archived\n * sessions follow the archived filter, while their accounting slots remain\n * either way so unarchiving restores position.\n */\nfunction sessionVisible(\n session: SessionSummary,\n current: SessionId | undefined,\n archived: ReadonlySet<SessionId>,\n archivedFilter: ArchivedFilter,\n): boolean {\n if (session.origin === 'subagent') return false\n if (session.blank && session.id !== current) return false\n switch (archivedFilter) {\n case 'default':\n return !archived.has(session.id)\n case 'show':\n return true\n case 'only':\n return archived.has(session.id)\n /* v8 ignore next 2 -- closed-union backstop; only reached if the filter is forged */\n default:\n return assertNever(archivedFilter)\n }\n}\n\n/** Registry-global row state consumed by every tree derivation. */\nexport interface SessionRowState {\n /** Registry-global pin ids; pinned rows lead their section in the local order. */\n pinnedSessionIds: readonly SessionId[]\n /** Archive set; members keep their slots and show grayed while visible. */\n archivedSessionIds: readonly SessionId[]\n /** Archived-row visibility choice applied to lists and search alike. */\n archivedFilter: ArchivedFilter\n}\n\n/**\n * Keep the visible New Session placeholder first, then partition pinned and\n * ordinary rows without changing either partition's caller order.\n */\nfunction sectionMembers(\n members: readonly SessionSummary[],\n pinned: ReadonlySet<SessionId>,\n archived: ReadonlySet<SessionId>,\n): SessionSummary[] {\n const placeholders: SessionSummary[] = []\n const leading: SessionSummary[] = []\n const rest: SessionSummary[] = []\n for (const member of members) {\n if (member.blank) placeholders.push(member)\n else if (!archived.has(member.id) && pinned.has(member.id)) leading.push(member)\n else rest.push(member)\n }\n return [...placeholders, ...leading, ...rest]\n}\n\n/**\n * A blank session is the selected Workspace's provisional New Session row;\n * its canonical title never enters search (blank rows are query-excluded)\n * and the renderer localizes its display label. Unnamed history also yields an\n * empty title for localization and does not match a directory-name title search.\n */\nfunction sessionTitle(session: SessionSummary): string {\n return session.blank ? '' : (session.title?.trim() ?? '')\n}\n\n/**\n * Folded-group activity: an expanded group shows every row's own status dot, so\n * the header icon reports activity only while those rows are off screen.\n * @param sessions - the group's visible member summaries.\n * @param descendants - running subagent descendant counts by ancestor.\n * @param expanded - whether the group's rows are on screen.\n * @returns whether the folded group holds a Session that runs or has a running descendant.\n */\nfunction groupRunning(\n sessions: readonly SessionSummary[],\n descendants: RunningDescendants,\n expanded: boolean,\n): boolean {\n if (expanded) return false\n return sessions.some(s => s.running || (descendants.get(s.id) ?? 0) > 0)\n}\n\n/**\n * Folded-group completion reminder: an expanded group shows every row's own\n * done dot, so the header icon reports the reminder only while those rows are\n * off screen. Subagent children never count — they are absent from the group's\n * visible members, and the hidden row's reminder is the only fact to carry.\n * @param sessions - the group's visible member summaries.\n * @param statuses - unified UI status by Session.\n * @param expanded - whether the group's rows are on screen.\n * @returns whether the folded group holds a finished-but-unviewed Session.\n */\nfunction groupCompletedUnread(\n sessions: readonly SessionSummary[],\n statuses: SessionStatuses,\n expanded: boolean,\n): boolean {\n if (expanded) return false\n return sessions.some(s => statuses.get(s.id)?.completionUnread === true)\n}\n\n/** Build one group without projecting session lineage into presentation. */\nfunction buildGroup(\n key: string,\n workspaceId: WorkspaceId | undefined,\n cwd: string | undefined,\n createdAt: number | undefined,\n label: string,\n members: readonly SessionSummary[],\n): Group {\n return { key, workspaceId, cwd, createdAt, label, sessions: [...members] }\n}\n\n/** Apply a stored Ungrouped order and append newly loose Sessions by recency. */\nfunction orderedUngrouped(\n members: readonly SessionSummary[],\n stored: readonly string[] | undefined,\n summaries: SessionListState['byId'],\n): SessionSummary[] {\n const byId = new Map(members.map(session => [session.id as string, session]))\n const ids = stored === undefined\n ? orderByRecency(members.map(session => session.id), summaries)\n : reconcileManualOrder(members.map(session => session.id), stored, summaries)\n return ids.flatMap((id) => {\n const session = byId.get(id)\n /* v8 ignore next -- ids are projected exclusively from the members used to build byId. */\n return session === undefined ? [] : [session]\n })\n}\n\n/**\n * Group Sessions by Workspace: one group per caller-ordered entity, with\n * members resolved from caller-ordered sessionIds. Sessions outside every\n * Workspace trail in the browser-local Ungrouped order, which falls back to\n * recency before that order is initialized.\n */\nfunction groupByWorkspace(\n list: SessionListState,\n workspaces: readonly WorkspaceView[],\n archived: ReadonlySet<SessionId>,\n archivedFilter: ArchivedFilter,\n ungroupedOrder: readonly string[] | undefined,\n): Group[] {\n const current = mainSessionId(list)\n const groups: Group[] = []\n const accounted = new Set<SessionId>()\n for (const workspace of workspaces) {\n const members: SessionSummary[] = []\n for (const id of workspace.sessionIds) {\n const summary = list.byId[id]\n if (summary === undefined) continue // account may lead the list pull; the row appears when the summary lands\n accounted.add(id)\n if (!sessionVisible(summary, current, archived, archivedFilter)) continue\n members.push(summary)\n }\n // The archived-only view lists archives, not the Workspace inventory, so\n // a Workspace without archived Sessions contributes no group.\n if (archivedFilter === 'only' && members.length === 0) continue\n groups.push(buildGroup(\n workspace.workspaceId, workspace.workspaceId, workspace.path,\n Date.parse(workspace.createdAt), workspace.title, members,\n ))\n }\n const stray = list.ids\n .map(id => list.byId[id])\n .filter((s): s is SessionSummary =>\n s !== undefined && !accounted.has(s.id) && sessionVisible(s, current, archived, archivedFilter))\n if (stray.length > 0) {\n groups.push(buildGroup(\n UNGROUPED_KEY,\n undefined,\n undefined,\n undefined,\n '',\n orderedUngrouped(stray, ungroupedOrder, list.byId),\n ))\n }\n return groups\n}\n\n/** Keep navigation presentation independent from domain-owned interaction objects. */\nfunction visiblePendingKind(kind: string | undefined): SessionPendingInteractionStatus | undefined {\n switch (kind) {\n case 'approval':\n case 'plan-review':\n case 'question':\n return kind\n default:\n return undefined\n }\n}\n\n/** Running subagent descendants of one Session, keyed for every Session that has at least one. */\ntype RunningDescendants = ReadonlyMap<SessionId, number>\n\n/** One iteration state of the explicit-lineage walk: the Session being descended and its cursor. */\ninterface LineageFrame {\n readonly id: SessionId\n readonly rows: readonly SessionId[]\n next: number\n}\n\n/** Whether one Session runs, per the unified status map with the summary bit as fallback. */\nexport function sessionIsRunning(list: SessionListState, statuses: SessionStatuses, id: SessionId): boolean {\n return (statuses.get(id)?.running ?? list.byId[id]?.running) === true\n}\n\n/**\n * Count running subagent descendants of every Session, at any depth, in one\n * post-order pass over durable lineage: a child row whose `origin` is\n * `subagent` holds its parent whether or not that parent's catalog is loaded,\n * while a fork shares `parentId` without the origin and never counts. Lineage\n * is read as data, so a cycle visits each Session once instead of looping.\n * @param list - sessions list snapshot carrying lineage and rows.\n * @param statuses - unified UI status by Session; absent entries fall back to the summary bit.\n * @returns each ancestor's running descendant count, omitting Sessions with none.\n */\nfunction runningDescendantCounts(list: SessionListState, statuses: SessionStatuses): RunningDescendants {\n const children = new Map<SessionId, SessionId[]>()\n for (const id of Object.keys(list.byId) as SessionId[]) {\n const row = list.byId[id]\n const parentId = row?.parentId\n if (row?.origin !== 'subagent' || parentId === undefined || parentId === id) continue\n const siblings = children.get(parentId)\n if (siblings === undefined) children.set(parentId, [id])\n else siblings.push(id)\n }\n const counts = new Map<SessionId, number>()\n if (children.size === 0) return counts\n // Only a Session with child edges holds a running descendant, so every\n // ancestor is reachable from one of these roots. An explicit stack keeps a\n // delegation chain of any configured depth off the call stack.\n const visited = new Set<SessionId>()\n const frames: LineageFrame[] = []\n for (const [rootId, rootRows] of children) {\n if (visited.has(rootId)) continue\n visited.add(rootId)\n frames.push({ id: rootId, rows: rootRows, next: 0 })\n while (frames.length > 0) {\n // Every pushed frame is removed exactly once, and the loop condition\n // guarantees a top frame; the cast states that rather than re-testing it.\n const frame = frames[frames.length - 1] as LineageFrame\n if (frame.next < frame.rows.length) {\n const childId = frame.rows[frame.next] as SessionId\n frame.next += 1\n // A child already on this stack closes a lineage loop; it is visited\n // once and contributes no separate row, so skip the descent.\n if (!visited.has(childId)) {\n visited.add(childId)\n frames.push({ id: childId, rows: children.get(childId) ?? [], next: 0 })\n }\n continue\n }\n frames.pop()\n let total = 0\n for (const childId of frame.rows) {\n total += (counts.get(childId) ?? 0) + (sessionIsRunning(list, statuses, childId) ? 1 : 0)\n }\n if (total > 0) counts.set(frame.id, total)\n }\n }\n return counts\n}\n\nfunction sessionNode(\n s: SessionSummary,\n statuses: SessionStatuses,\n descendants: RunningDescendants,\n pinned: ReadonlySet<SessionId>,\n archived: ReadonlySet<SessionId>,\n): SessionNode {\n const status = statuses.get(s.id)\n const pendingInteraction = visiblePendingKind(status?.pendingInteraction?.kind)\n return {\n id: s.id,\n title: sessionTitle(s),\n blank: s.blank,\n running: status?.running ?? s.running,\n runningSubagentCount: descendants.get(s.id) ?? 0,\n completed: status?.completionUnread === true,\n pinned: !archived.has(s.id) && pinned.has(s.id),\n archived: archived.has(s.id),\n updatedAt: s.updatedAt,\n ...(s.cwd === undefined || s.cwd === '' ? {} : { cwd: s.cwd }),\n ...(pendingInteraction === undefined ? {} : { pendingInteraction }),\n }\n}\n\n/**\n * Derive the workspace browser groups with every session as a top-level row.\n *\n * Every group shows, except that the archived-only filter drops groups\n * without visible members; sessions populate under expanded groups with\n * pinned rows leading in the selected local order. Blank sessions are\n * excluded except for the selected provisional New Session row; archived\n * sessions keep their slots and appear per the archived filter. Content\n * search lives outside this derivation (see {@link deriveSearchResults}).\n * @param list - sessions list snapshot (`mainView` retention feeds containsCurrent).\n * @param workspaces - real Workspaces in Host group order with caller-projected Session order.\n * @param rowState - registry-global pin and archive sets plus the archived filter.\n * @param statuses - unified UI status by Session.\n * @param view - local expansion arrays.\n * @returns group sections in render order.\n */\nexport function deriveGroups(\n list: SessionListState,\n workspaces: readonly WorkspaceView[],\n rowState: SessionRowState,\n statuses: SessionStatuses,\n view: TreeView,\n): GroupNode[] {\n const archived = new Set(rowState.archivedSessionIds)\n const pinned = new Set(rowState.pinnedSessionIds)\n const expandedGroups = new Set(view.expandedGroups)\n const current = mainSessionId(list)\n const descendants = runningDescendantCounts(list, statuses)\n const currentGroup = current === undefined\n ? undefined\n : owningGroupKey(workspaces, current)\n const groups: GroupNode[] = []\n for (const g of groupByWorkspace(list, workspaces, archived, rowState.archivedFilter, view.ungroupedOrder)) {\n const expanded = expandedGroups.has(g.key)\n groups.push({\n key: g.key,\n workspaceId: g.workspaceId,\n cwd: g.cwd,\n createdAt: g.createdAt,\n label: g.label,\n sessionCount: g.sessions.length,\n expanded,\n containsCurrent: g.key === currentGroup,\n running: groupRunning(g.sessions, descendants, expanded),\n completedUnread: groupCompletedUnread(g.sessions, statuses, expanded),\n sessions: expanded\n ? sectionMembers(g.sessions, pinned, archived)\n .map(session => sessionNode(session, statuses, descendants, pinned, archived))\n : [],\n })\n }\n return groups\n}\n\n/**\n * Select complete flat-list membership, independently of archive visibility.\n * @param list - sessions list snapshot.\n * @returns known ordinary Session ids, including archives and only the current blank.\n */\nexport function sessionMemberIds(list: SessionListState): SessionId[] {\n return visibleSessionIds(list, [], 'show')\n}\n\n/**\n * Select visible flat-list members without deriving row presentation or ordering.\n * @param list - sessions list snapshot.\n * @param archivedSessionIds - registry-global archive set.\n * @param archivedFilter - archived-row visibility choice.\n * @returns known visible Session ids in list order, including ordinary forks and only the current blank.\n */\nexport function visibleSessionIds(\n list: SessionListState,\n archivedSessionIds: readonly SessionId[],\n archivedFilter: ArchivedFilter,\n): SessionId[] {\n const archived = new Set(archivedSessionIds)\n const current = mainSessionId(list)\n return list.ids.filter((id) => {\n const s = list.byId[id]\n return s !== undefined && sessionVisible(s, current, archived, archivedFilter)\n })\n}\n\n/**\n * Derive flat rows from the browser's complete ordered Session ids, with\n * pinned rows fronted ahead of the supplied order.\n * @param list - sessions list snapshot used to select the ids.\n * @param sessionIds - complete account members in the selected order, including hidden archives.\n * @param rowState - registry-global pin and archive sets plus the archived filter.\n * @param statuses - unified UI status by Session.\n * @returns flat rows in sectioned order with current status indicators.\n */\nexport function deriveFlat(\n list: SessionListState,\n sessionIds: readonly SessionId[],\n rowState: SessionRowState,\n statuses: SessionStatuses,\n): SessionNode[] {\n const archived = new Set(rowState.archivedSessionIds)\n const pinned = new Set(rowState.pinnedSessionIds)\n const current = mainSessionId(list)\n const descendants = runningDescendantCounts(list, statuses)\n const members = sessionIds.flatMap((id) => {\n const session = list.byId[id]\n return session !== undefined && sessionVisible(session, current, archived, rowState.archivedFilter)\n ? [session]\n : []\n })\n return sectionMembers(members, pinned, archived)\n .map(session => sessionNode(session, statuses, descendants, pinned, archived))\n}\n\n/**\n * Merge immediate title/Workspace/Session id substring matches with ranked Host content\n * matches. Local rows lead newest-first, content-only rows retain backend\n * order, and duplicate sessions receive the backend snippet in place.\n * @param list - session metadata authority.\n * @param workspaces - Workspace membership and display labels.\n * @param query - caller text; surrounding whitespace is ignored.\n * @param archivedSessionIds - registry-global archive set (members match per the archived filter).\n * @param archivedFilter - archived-row visibility choice; search follows it.\n * @param statuses - unified UI status by Session.\n * @param content - ranked Host content-search page.\n * @param limit - protocol-owned maximum merged row count.\n * @returns bounded deduplicated flat rows and a refine-query hint bit.\n */\nexport function deriveSearchResults(\n list: SessionListState,\n workspaces: readonly WorkspaceView[],\n query: string,\n archivedSessionIds: readonly SessionId[],\n archivedFilter: ArchivedFilter,\n statuses: SessionStatuses,\n content: { items: readonly SessionSearchResultItem[]; hasMore: boolean },\n limit: number,\n): SearchResultSet {\n const q = query.trim().toLowerCase()\n if (q === '') return { items: [], hasMore: false }\n const archived = new Set(archivedSessionIds)\n const current = mainSessionId(list)\n const descendants = runningDescendantCounts(list, statuses)\n\n const workspaceBySession = new Map<SessionId, string>()\n for (const workspace of workspaces) {\n for (const sessionId of workspace.sessionIds) {\n if (!workspaceBySession.has(sessionId)) workspaceBySession.set(sessionId, workspace.title)\n }\n }\n const labelOf = (summary: SessionSummary): string =>\n workspaceBySession.get(summary.id) ?? workspaceLabel(summary.cwd)\n const contentBySession = new Map<SessionId, SessionSearchResultItem>()\n for (const item of content.items) {\n if (!contentBySession.has(item.sessionId)) contentBySession.set(item.sessionId, item)\n }\n\n const local: SessionSummary[] = []\n for (const id of list.ids) {\n const summary = list.byId[id]\n // Blank placeholders never match a query (their canonical title displays\n // localized, so matching it would tie search to one language).\n if (summary === undefined || summary.blank || !sessionVisible(summary, current, archived, archivedFilter)) continue\n if (\n sessionTitle(summary).toLowerCase().includes(q)\n || labelOf(summary).toLowerCase().includes(q)\n || summary.id.toLowerCase().includes(q)\n ) {\n local.push(summary)\n }\n }\n const localById = new Map(local.map(summary => [summary.id, summary]))\n const orderedLocal = orderByRecency(local.map(summary => summary.id), list.byId)\n .map(id => localById.get(id) as SessionSummary)\n\n const ordered: SessionSummary[] = []\n const included = new Set<SessionId>()\n const include = (summary: SessionSummary): void => {\n if (included.has(summary.id)) return\n included.add(summary.id)\n ordered.push(summary)\n }\n for (const summary of orderedLocal) include(summary)\n for (const item of content.items) {\n const summary = list.byId[item.sessionId]\n if (summary !== undefined && !summary.blank && sessionVisible(summary, current, archived, archivedFilter)) include(summary)\n }\n\n return {\n items: ordered.slice(0, limit).map((summary) => {\n const match = contentBySession.get(summary.id)\n const status = statuses.get(summary.id)\n const pendingInteraction = visiblePendingKind(status?.pendingInteraction?.kind)\n return {\n id: summary.id,\n title: sessionTitle(summary),\n workspace: labelOf(summary),\n running: status?.running ?? summary.running,\n runningSubagentCount: descendants.get(summary.id) ?? 0,\n ...(pendingInteraction === undefined\n ? {}\n : { pendingInteraction }),\n completed: status?.completionUnread === true,\n archived: archived.has(summary.id),\n ...match === undefined ? {} : { snippet: match.snippet },\n }\n }),\n hasMore: content.hasMore || ordered.length > limit,\n }\n}\n\n/** Normalize separators for comparison without interpreting POSIX backslashes as separators. */\nfunction folderPath(path: string): string {\n const windows = /^[A-Za-z]:[/\\\\]/.test(path) || path.startsWith('\\\\\\\\')\n return (windows ? path.replaceAll('\\\\', '/') : path).replace(/\\/+$/, '')\n}\n\n/**\n * Find the nearest registered ancestor, excluding the Workspace directory itself.\n * Paths use Host spelling; matching is case-sensitive, like Workspace identity.\n * @param path - Workspace directory.\n * @param parents - registered Workspace directory paths.\n * @returns the owning parent path, or undefined when no parent contains the Workspace.\n */\nexport function owningParentFolder(path: string, parents: readonly string[]): string | undefined {\n const child = folderPath(path)\n let owner: string | undefined\n let length = -1\n for (const parent of parents) {\n const root = folderPath(parent)\n if (root.length > length && child !== root && child.startsWith(`${root}/`)) {\n owner = parent\n length = root.length\n }\n }\n return owner\n}\n","/**\n * The workspace browser's viewing store: the session-list grouping mode,\n * persisted across reloads. Module level exports the factory only (a\n * module-level handle would pin the store identity across plugin reloads);\n * register() receives the factory and the browser derives its PropsStore\n * share from the return type.\n */\nimport { defineStore, type EngineStoreHandle } from '@deepseek-ai/dsh-client-store'\nimport type { SessionListState } from '@deepseek-ai/dsh-api-session-controller/client'\nimport type { SessionId } from '@deepseek-ai/dsh-session/types'\nimport { reconcileManualOrder, type ArchivedFilter, type SessionRowState } from './tree.ts'\n\n/** Browser-local order account for the hierarchy-free flat Session list. */\nexport const FLAT_SESSION_ORDER_KEY = '__flat_session_order__'\n\n/** Session-list grouping mode: sibling Workspace sections, a Workspace tree, or one flat list. */\nexport type SessionGroupBy = 'workspace' | 'workspace-tree' | 'flat'\n/** Session order: saved manual positions or current recency. */\nexport type SessionOrderBy = 'manual' | 'updated'\n\n/** Workspace browser viewing state persisted across surface remounts and reloads. */\ntype WorkspaceViewState = {\n groupBy: SessionGroupBy\n orderBy: SessionOrderBy\n /** Explicit group expansion keyed by Workspace identity, including descendants in tree mode. */\n groupExpansion: Record<string, boolean>\n /** Saved manual order per Workspace group plus the browser-local flat-list account. */\n sessionOrderByAccount: Record<string, string[]>\n /** Archived-row visibility; omitted in pre-filter v5 snapshots and read as 'default'. */\n archivedFilter?: ArchivedFilter\n}\n\ntype SessionOrderSource = {\n members: Readonly<Record<string, readonly SessionId[]>>\n summaries: SessionListState['byId']\n rowState: Pick<SessionRowState, 'pinnedSessionIds' | 'archivedSessionIds'>\n}\n\n/**\n * Annotation twin of the actions literal below (the export needs a declared\n * return type); drift fails assignability at the defineStore call.\n */\ntype WorkspaceViewActions = {\n setGroupBy: (draft: WorkspaceViewState, mode: SessionGroupBy) => void\n setOrderBy: (\n draft: WorkspaceViewState,\n mode: SessionOrderBy,\n initialOrders: Readonly<Record<string, readonly string[]>>,\n ) => void\n setGroupExpanded: (draft: WorkspaceViewState, key: string, expanded: boolean) => void\n retainAccountKeys: (draft: WorkspaceViewState, workspaceKeys: readonly string[]) => void\n syncSessionOrders: (\n draft: WorkspaceViewState,\n orders: Readonly<Record<string, readonly string[]>>,\n ) => void\n setSessionOrder: (\n draft: WorkspaceViewState,\n accountKey: string,\n order: readonly string[],\n initialOrders: Readonly<Record<string, readonly string[]>>,\n ) => void\n pinSessionOrder: (\n draft: WorkspaceViewState,\n sessionId: string,\n accountKeys: readonly string[],\n source: SessionOrderSource,\n ) => void\n setArchivedFilter: (draft: WorkspaceViewState, filter: ArchivedFilter) => void\n}\n\n/** Copy read-only projections into the persisted mutable store representation. */\nfunction copySessionOrders(\n orders: Readonly<Record<string, readonly string[]>>,\n): Record<string, string[]> {\n return Object.fromEntries(Object.entries(orders).map(([key, order]) => [key, [...order]]))\n}\n\n/**\n * Create the workspace browser viewing store handle.\n * @returns the store handle (spec + type + identity + factory in one).\n */\nexport function createWorkspaceViewStore(): EngineStoreHandle<WorkspaceViewState, WorkspaceViewActions> {\n return defineStore({\n init: (): WorkspaceViewState => ({\n groupBy: 'workspace',\n orderBy: 'updated',\n groupExpansion: {},\n sessionOrderByAccount: {},\n archivedFilter: 'default',\n }),\n persist: 'dsh.workspace.view.v5',\n actions: {\n setGroupBy: (d, mode: SessionGroupBy) => { d.groupBy = mode },\n setOrderBy: (d, mode: SessionOrderBy, initialOrders) => {\n if (mode === d.orderBy) return\n d.sessionOrderByAccount = mode === 'manual' ? copySessionOrders(initialOrders) : {}\n d.orderBy = mode\n },\n setGroupExpanded: (d, key: string, expanded: boolean) => { d.groupExpansion[key] = expanded },\n retainAccountKeys: (d, workspaceKeys: readonly string[]) => {\n const retained = new Set(workspaceKeys)\n d.groupExpansion = Object.fromEntries(\n Object.entries(d.groupExpansion).filter(([key]) => retained.has(key)),\n )\n d.sessionOrderByAccount = Object.fromEntries(\n Object.entries(d.sessionOrderByAccount).filter(([key]) => retained.has(key)),\n )\n delete (d as WorkspaceViewState & { sessionUpdatedAtByAccount?: unknown }).sessionUpdatedAtByAccount\n },\n syncSessionOrders: (d, orders) => {\n if (d.orderBy !== 'manual') return\n Object.assign(d.sessionOrderByAccount, copySessionOrders(orders))\n },\n setSessionOrder: (d, accountKey, order, initialOrders) => {\n if (d.orderBy === 'updated') d.sessionOrderByAccount = copySessionOrders(initialOrders)\n else Object.assign(d.sessionOrderByAccount, copySessionOrders(initialOrders))\n d.orderBy = 'manual'\n d.sessionOrderByAccount[accountKey] = [...order]\n },\n pinSessionOrder: (d, sessionId, accountKeys, source) => {\n const selected = new Set(accountKeys)\n d.sessionOrderByAccount = Object.fromEntries(Object.entries(source.members).map(([key, members]) => {\n const order = reconcileManualOrder(members, d.sessionOrderByAccount[key], source.summaries, source.rowState)\n return [key, selected.has(key) ? [sessionId, ...order.filter(id => id !== sessionId)] : order]\n }))\n },\n setArchivedFilter: (d, filter: ArchivedFilter) => { d.archivedFilter = filter },\n },\n })\n}\n\n/** The bound write set of one viewing-store instance (what the UiWorkspace service drives). */\nexport type WorkspaceViewStoreActions = ReturnType<ReturnType<typeof createWorkspaceViewStore>['create']>['actions']\n","/**\n * The complete account memberships a Pin order write reconciles against,\n * derived from the same Host snapshots the browser orders by, so the\n * UiWorkspace service can complete the write without the browser in the loop.\n */\nimport type { SessionListState } from '@deepseek-ai/dsh-api-session-controller/client'\nimport type { WorkspaceView } from '@deepseek-ai/dsh-api-workspace-controller/client'\nimport type { SessionId } from '@deepseek-ai/dsh-session/types'\nimport { FLAT_SESSION_ORDER_KEY } from './stores.ts'\nimport { owningGroupKey, sessionMemberIds, type SessionRowState, UNGROUPED_KEY } from './tree.ts'\n\n/** What `pinSessionOrder` reconciles a pinned Session's accounts against. */\nexport interface PinOrderSource {\n members: Readonly<Record<string, readonly SessionId[]>>\n summaries: SessionListState['byId']\n rowState: Pick<SessionRowState, 'pinnedSessionIds' | 'archivedSessionIds'>\n}\n\n/**\n * Every account's complete membership: each Workspace, Ungrouped, and the flat list.\n * @param workspaces - current Host Workspaces.\n * @param list - current Session list snapshot.\n * @param rowState - registry-global pin and archive sets.\n * @returns the order source for one pin write.\n */\nexport function pinOrderSource(\n workspaces: readonly WorkspaceView[],\n list: SessionListState,\n rowState: PinOrderSource['rowState'],\n): PinOrderSource {\n const accounted = new Set(workspaces.flatMap(workspace => workspace.sessionIds))\n return {\n members: Object.fromEntries([\n ...workspaces.map(workspace => [workspace.workspaceId, workspace.sessionIds] as const),\n [UNGROUPED_KEY, list.ids.filter(id => list.byId[id] !== undefined && !accounted.has(id))],\n [FLAT_SESSION_ORDER_KEY, sessionMemberIds(list)],\n ]),\n summaries: list.byId,\n rowState,\n }\n}\n\n/**\n * The accounts a pinned Session leads: its group (or Ungrouped) and the flat list.\n * @param workspaces - current Host Workspaces.\n * @param sessionId - the Session being pinned.\n * @returns the account keys `pinSessionOrder` fronts.\n */\nexport function pinOrderAccounts(workspaces: readonly WorkspaceView[], sessionId: SessionId): readonly string[] {\n return [owningGroupKey(workspaces, sessionId), FLAT_SESSION_ORDER_KEY]\n}\n","/** Workspace archive and directory UI capability. */\n\nimport { Service, type Context } from '@deepseek-ai/cordis'\nimport type { AccessEffect, RemoteEndpoint } from '@deepseek-ai/dsh-api-remote-access/client'\nimport type { ClientRemote, DirectoryListing, RemoteFailure } from '@deepseek-ai/dsh-api-remotes/client'\nimport type {\n ISessions,\n SessionCreateError,\n SessionBinding,\n SessionReference,\n SessionTarget,\n SessionListState,\n} from '@deepseek-ai/dsh-api-session-controller/client'\n// Type-only: pulls the `agentPreset` Session projection value into this program.\nimport type {} from '@deepseek-ai/dsh-agent-preset-registry/types'\nimport { createSnapshotStore } from '@deepseek-ai/dsh-client-store'\nimport type { SubagentAddress } from '@deepseek-ai/dsh-subagent/client'\nimport type {\n IWorkspaces, WorkspaceId, WorkspaceSnapshot, WorkspaceView,\n} from '@deepseek-ai/dsh-api-workspace-controller/client'\nimport type { SessionId } from '@deepseek-ai/dsh-session/types'\nimport type {} from '@deepseek-ai/dsh-client-ui-layout/client'\nimport type { DraftInitializationOptions } from '@deepseek-ai/dsh-client-ui-conversation/client'\nimport type { RowToast } from './contract/slots.ts'\nimport { pinOrderAccounts, pinOrderSource } from './pin-order.ts'\nimport type { WorkspaceViewStoreActions } from './stores.ts'\n\ninterface MainSelection {\n readonly sessionId?: SessionId\n readonly subagentAddress?: SubagentAddress\n}\n\n/** Content preparation and Agent preset for the Session a Workspace flow opens. */\nexport interface StartSessionOptions extends DraftInitializationOptions {\n /** Agent preset the Session runs; the Host default when omitted. */\n readonly agentPreset?: string\n}\n\n/** Workspace archive and directory operations consumed by Client UI domains. */\nexport interface UiWorkspace {\n /**\n * Select a Session and show its Conversation as one UI navigation action.\n * @param target - known Session identity or durable direct-parent subagent address to display.\n */\n openSession(target: SessionTarget): void\n /**\n * Connect a Workspace and open its Session unless a later navigation supersedes it.\n * @param workspaceId - target Workspace.\n * @param beforeOpen - optional synchronous preparation for the selected Session,\n * skipped after supersession; a throw aborts the open and releases the retained reference.\n * @param options - choices for the Session the connection creates or reuses.\n * @returns completion; a superseded request may create a Session but does not open it.\n * @throws on failure; a refused creation is also shown through the Workspace\n * notice unless a later navigation or disposal superseded the request.\n */\n openWorkspace(\n workspaceId: WorkspaceId,\n beforeOpen?: (sessionId: SessionId) => void,\n options?: Pick<StartSessionOptions, 'agentPreset'>,\n ): Promise<void>\n /**\n * Fork a Session without changing the current selection.\n * @param sessionId - source Session.\n * @param onCreated - observer before the optional child-title update.\n * @param options - optional permission to start source migration; omission preserves the Host default.\n * @returns the child SessionId after creation and inherited-title increment.\n */\n forkSession(\n sessionId: SessionId,\n onCreated?: (childId: SessionId) => void,\n options?: Pick<Parameters<ISessions['fork']>[0], 'allowMigration'>,\n ): Promise<SessionId>\n /**\n * Resolve the Session for a new conversation in a Workspace: navigation names the first reusable\n * blank member — listed in the Workspace, not archived, and listing no preset or the requested one —\n * and the Host reuses it under the requested preset or its default, creating another Session when it\n * reuses none. Concurrent calls for the same Workspace and preset share one attempt.\n * @param workspaceId - target Workspace.\n * @param options - choices for the created or reused Session.\n * @returns a Session already addressable through the Session Controller.\n */\n connectWorkspace(workspaceId: WorkspaceId, options?: Pick<StartSessionOptions, 'agentPreset'>): Promise<SessionId>\n /**\n * Open the Workspace blank `connectWorkspace` resolves, so New Session returns to that blank's\n * unsent draft. A creation the Host refuses is shown through the Workspace notice and leaves the\n * selection as it was.\n * @param workspaceId - explicit target; absent inherits the current or most recent Workspace.\n * @param options - initial content, the blank's preset, and `whenDraftExists`, which decides\n * whether existing text or attachments are kept, replaced, or followed by the prompt.\n */\n startSession(workspaceId?: WorkspaceId, options?: StartSessionOptions): void\n /**\n * Archive a Session and clear it when it is the current selection.\n * @param sessionId - Session to archive.\n * @param options - `stopActivity` asks the Host to stop the Session's running work instead of refusing.\n */\n archiveSession(sessionId: SessionId, options?: { readonly stopActivity?: boolean }): Promise<void>\n /**\n * Unarchive a Session, restoring it to its recorded Workspace position.\n * @param sessionId - Session to unarchive.\n */\n unarchiveSession(sessionId: SessionId): Promise<void>\n /**\n * Pin a Session on the Host, then lead it in its accounts' saved orders\n * (its Workspace group or Ungrouped, and the flat list). The order write\n * reads the memberships current at completion, so reorders that landed\n * while the Host call was pending keep their positions.\n * @param sessionId - Session to pin.\n */\n pinSession(sessionId: SessionId): Promise<void>\n /**\n * Unpin a Session on the Host; saved positions stay as they are.\n * @param sessionId - Session to unpin.\n */\n unpinSession(sessionId: SessionId): Promise<void>\n /**\n * Open the Host-native directory picker.\n * @returns the selected directory, or null when cancelled.\n */\n pickDirectory(): Promise<string | null>\n /**\n * List one Host directory level.\n * @param path - directory path; absent selects the Host home.\n * @param signal - cancellation for a superseded scan.\n * @returns directory entries and breadcrumb ancestry.\n */\n listDirectory(path?: string, signal?: AbortSignal): Promise<DirectoryListing>\n /**\n * Create a child directory.\n * @param path - existing parent directory.\n * @param name - child directory name.\n * @returns created absolute path.\n */\n createDirectory(path: string, name: string): Promise<string>\n /**\n * Keep `callback`'s effects installed while the current Peer may call\n * `action` on one Workspace resource, with the semantics of\n * `ctx.remoteAccess.whenAccess`: `useWorkspaceAccess` answers the same\n * question during render.\n * @param workspaceId - the Workspace resource the guarded effects depend on.\n * @param action - endpoint action the guarded effects depend on.\n * @param callback - creates one disposer or an iterable of disposers.\n * @returns idempotent disposer owned by the caller's Cordis fiber.\n */\n whenAccess(workspaceId: WorkspaceId, action: RemoteEndpoint, callback: () => AccessEffect): () => void\n}\n\ndeclare module '@deepseek-ai/cordis' {\n interface Context {\n /** Cross-Controller Workspace navigation and directory UI capability. */\n uiWorkspace: UiWorkspace\n }\n}\n\n/** Structured directory failure exposed to directory UI consumers. */\nexport class DirectoryBrowseError extends Error {\n override readonly name = 'DirectoryBrowseError'\n\n /** @param rpcError - Host directory business failure. */\n constructor(readonly rpcError: RemoteFailure) {\n super(`directory browse failed: ${rpcError.code}: ${rpcError.message}`)\n }\n}\n\n/** Implements Workspace archive and directory UI operations. */\nclass UiWorkspaceService extends Service implements UiWorkspace {\n /** The latest in-flight connection per Workspace; a request joins it only when both name the same preset. */\n private readonly connecting = new Map<WorkspaceId, {\n readonly agentPreset: string | undefined\n readonly attempt: Promise<SessionId>\n }>()\n private readonly lifetime = new AbortController()\n private readonly selection = createSnapshotStore<MainSelection>(\n {}, { persist: { name: 'dsh.sessions.current' } },\n )\n private mainReference: SessionReference | undefined\n private restorationNavigation: AbortSignal | undefined\n\n /**\n * @param ctx - Client root Context.\n * @param directoryPicker - the directory-picking Remote namespace.\n * @param workspaces - pure Workspace Controller.\n * @param sessions - pure Session Controller.\n * @param view - the browser's viewing-store write set (one instance shared with its registration).\n * @param notify - show one notice through the Workspace notice channel.\n */\n constructor(\n ctx: Context,\n private readonly directoryPicker: ClientRemote['directoryPicker'],\n private readonly workspaces: IWorkspaces,\n private readonly sessions: ISessions,\n private readonly view: Pick<WorkspaceViewStoreActions, 'pinSessionOrder'>,\n private readonly notify: (toast: RowToast) => void,\n ) {\n super(ctx, 'uiWorkspace')\n ctx.effect(() => {\n const stop = this.watchNavigation()\n return () => {\n stop()\n this.lifetime.abort()\n const reference = this.mainReference\n this.mainReference = undefined\n reference?.release()\n }\n }, 'ui-workspace: Workspace navigation policy')\n }\n\n connectWorkspace(workspaceId: WorkspaceId, options: Pick<StartSessionOptions, 'agentPreset'> = {}): Promise<SessionId> {\n return this.connectBlank(workspaceId, options)\n }\n\n /**\n * @param reuse - preset for the reused or created blank.\n */\n private async connectBlank(\n workspaceId: WorkspaceId,\n reuse: Pick<StartSessionOptions, 'agentPreset'>,\n ): Promise<SessionId> {\n const workspace = this.workspaces.list.getSnapshot().items\n .find(item => item.workspaceId === workspaceId)\n if (workspace === undefined) {\n throw new Error(`uiWorkspace.connectWorkspace: unknown workspace ${workspaceId}`)\n }\n const inflight = this.connecting.get(workspaceId)\n if (inflight !== undefined && inflight.agentPreset === reuse.agentPreset) return inflight.attempt\n\n const attempt = this.createInWorkspace(workspace, reuse).finally(() => {\n if (this.connecting.get(workspaceId)?.attempt === attempt) this.connecting.delete(workspaceId)\n })\n this.connecting.set(workspaceId, { agentPreset: reuse.agentPreset, attempt })\n return attempt\n }\n\n /** Name the first reusable member blank; a requested preset also skips blanks listing another preset. */\n private createInWorkspace(workspace: WorkspaceView, options: Pick<StartSessionOptions, 'agentPreset'>): Promise<SessionId> {\n const archived = this.workspaces.list.getSnapshot().archivedSessionIds\n const sessions = this.sessions.list.getSnapshot()\n const blank = sessions.ids.find((id) => {\n const summary = sessions.byId[id]\n const listed = summary?.projectionValues?.agentPreset\n return summary !== undefined && summary.blank && summary.cwd === workspace.path\n && workspace.sessionIds.includes(id) && !archived.includes(id)\n && (options.agentPreset === undefined || typeof listed !== 'string' || listed === options.agentPreset)\n })\n return this.createNamed({\n workspaceId: workspace.workspaceId,\n ...(blank === undefined ? {} : { sessionId: blank }),\n ...(options.agentPreset === undefined ? {} : { agentPreset: options.agentPreset }),\n })\n }\n\n /**\n * Create through the Host. A named blank the Host declined may still read as\n * blank from stale cached list metadata, which hides it from the Session tree;\n * its projections are reloaded so the row reflects its log.\n */\n private async createNamed(request: {\n readonly workspaceId: WorkspaceId\n readonly sessionId?: SessionId\n readonly agentPreset?: string\n }): Promise<SessionId> {\n const sessionId = await this.sessions.create(request)\n const named = request.sessionId\n if (named !== undefined && named !== sessionId) {\n void this.sessions.refreshProjections(named).catch((reason: unknown) => {\n console.warn('declined blank Session projection reload failed:', reason)\n })\n }\n return sessionId\n }\n\n /**\n * Reopen a saved blank Session under the preset its log recorded, or under\n * the Host default once that preset no longer activates. Listed values are\n * cached hints that can lag the log after an unclean Host exit, so the\n * Session's projections are reloaded before the preset is read; a Session\n * that still awaits a format migration reloads only those cached hints.\n */\n private async restoreBlank(workspaceId: WorkspaceId, sessionId: SessionId): Promise<SessionId> {\n await this.sessions.refreshProjections(sessionId)\n const recorded = this.sessions.list.getSnapshot().byId[sessionId]?.projectionValues?.agentPreset\n const request = { workspaceId, sessionId }\n if (typeof recorded !== 'string') return this.createNamed(request)\n try {\n return await this.createNamed({ ...request, agentPreset: recorded })\n } catch (error: unknown) {\n const code = sessionCreateErrorOf(error)?.rpcError.code\n if (code !== 'agent-preset/not-found' && code !== 'agent-preset/invalid') throw error\n return this.createNamed(request)\n }\n }\n\n openSession(target: SessionTarget): void {\n this.replaceMain(target, this.lifetime.signal, 'reveal')\n }\n\n openWorkspace(\n workspaceId: WorkspaceId,\n beforeOpen?: (sessionId: SessionId) => void,\n options: Pick<StartSessionOptions, 'agentPreset'> = {},\n ): Promise<void> {\n return this.openWorkspaceSession(workspaceId, beforeOpen, options)\n }\n\n private async openWorkspaceSession(\n workspaceId: WorkspaceId,\n beforeOpen: ((sessionId: SessionId) => void) | undefined,\n reuse: Pick<StartSessionOptions, 'agentPreset'>,\n ): Promise<void> {\n const navigation = AbortSignal.any([this.ctx.layout.beginNavigation(), this.lifetime.signal])\n let sessionId: SessionId\n try {\n sessionId = await this.connectBlank(workspaceId, reuse)\n } catch (error: unknown) {\n // Reported here, not in connectWorkspace: startup restoration calls that\n // directly and stays console-only.\n if (!navigation.aborted) this.notify({ kind: 'createFailed', message: creationFailureMessage(error) })\n throw error\n }\n if (navigation.aborted) return\n this.replaceMain(sessionId, navigation, 'reveal', beforeOpen)\n }\n\n async forkSession(\n sessionId: SessionId,\n onCreated?: (childId: SessionId) => void,\n options?: Pick<Parameters<ISessions['fork']>[0], 'allowMigration'>,\n ): Promise<SessionId> {\n return this.sessions.fork({\n sessionId,\n increaseTitle: true,\n ...onCreated === undefined ? {} : { onCreated },\n ...options?.allowMigration === undefined ? {} : { allowMigration: options.allowMigration },\n })\n }\n\n startSession(workspaceId?: WorkspaceId, options?: StartSessionOptions): void {\n const { agentPreset, ...draft } = options ?? {}\n const draftOptions = options === undefined ? undefined : draft\n const initializeDraft = draftOptions !== undefined && (draftOptions.prompt !== undefined\n || (draftOptions.whenDraftExists ?? (draftOptions.clearPreviousDraft === true ? 'replace' : 'keep')) === 'replace')\n const workspace = this.workspaces.list.getSnapshot()\n const sessions = this.sessions.list.getSnapshot()\n const current = this.mainReference?.sessionId\n const currentWorkspaceId = current === undefined\n ? undefined\n : workspace.items.find(item => item.sessionIds.includes(current))?.workspaceId\n const recent = workspace.phase === 'ready' && sessions.phase === 'ready'\n ? recentWorkspace(workspace.items, sessions.byId)\n : undefined\n const target = workspaceId ?? currentWorkspaceId ?? recent\n if (target === undefined) {\n if (initializeDraft) {\n this.notify({ kind: 'createFailed', message: this.ctx.locale.bind('workspace')('draft.workspaceRequired') })\n return\n }\n this.clearMain()\n return\n }\n const opening = this.openWorkspace(target, initializeDraft ? (id) => {\n const binding = this.sessions.binding(id)\n if (binding === undefined) this.draftPreparationFailed()\n this.prepareDraft(binding, draftOptions)\n } : undefined, agentPreset === undefined ? {} : { agentPreset })\n void opening.catch(\n (reason: unknown) => { console.warn('new session failed:', reason) },\n )\n }\n\n private prepareDraft(binding: SessionBinding, options: DraftInitializationOptions): void {\n const conversation = this.ctx.get('conversation')\n if (conversation === undefined) this.draftPreparationFailed()\n if (conversation.input.requestDraftInitialization(binding, options) === 'blocked') this.draftPreparationFailed()\n }\n\n private draftPreparationFailed(): never {\n const message = this.ctx.locale.bind('workspace')('draft.initializationFailed')\n this.notify({ kind: 'createFailed', message })\n throw new Error(message)\n }\n\n async archiveSession(sessionId: SessionId, options: { readonly stopActivity?: boolean } = {}): Promise<void> {\n await this.workspaces.archiveSession(sessionId, options)\n if (this.mainReference?.sessionId === sessionId) this.clearMain()\n }\n\n async unarchiveSession(sessionId: SessionId): Promise<void> {\n await this.workspaces.unarchiveSession(sessionId)\n }\n\n async pinSession(sessionId: SessionId): Promise<void> {\n await this.workspaces.pinSession(sessionId)\n const { items, pinnedSessionIds, archivedSessionIds } = this.workspaces.list.getSnapshot()\n this.view.pinSessionOrder(\n sessionId,\n pinOrderAccounts(items, sessionId),\n pinOrderSource(items, this.sessions.list.getSnapshot(), { pinnedSessionIds, archivedSessionIds }),\n )\n }\n\n async unpinSession(sessionId: SessionId): Promise<void> {\n await this.workspaces.unpinSession(sessionId)\n }\n\n async pickDirectory(): Promise<string | null> {\n const result = await this.directoryPicker.pick()\n if (!result.ok) throw new Error(`directory picker failed: ${result.error.message}`)\n return result.value\n }\n\n async listDirectory(path?: string, signal?: AbortSignal): Promise<DirectoryListing> {\n const result = await this.directoryPicker.list(path, signal)\n if (!result.ok) throw new DirectoryBrowseError(result.error)\n return result.value\n }\n\n async createDirectory(path: string, name: string): Promise<string> {\n const result = await this.directoryPicker.createDirectory(path, name)\n if (!result.ok) throw new DirectoryBrowseError(result.error)\n return result.value\n }\n\n whenAccess(workspaceId: WorkspaceId, action: RemoteEndpoint, callback: () => AccessEffect): () => void {\n // `ctx.get` traces the service to the caller's Context, which then owns the controller.\n const access = this.ctx.get('remoteAccess')\n /* v8 ignore next -- this plugin injects remoteAccess, so the service is active while uiWorkspace is reachable. */\n if (access === undefined) throw new Error('ui-workspace: whenAccess requires the remoteAccess service')\n return access.whenResourceAccess('workspace', workspaceId, action, callback)\n }\n\n private watchNavigation(): () => void {\n let initial: 'waiting' | 'connecting' | 'done' = 'waiting'\n const reconcile = (): void => {\n if (this.lifetime.signal.aborted) return\n if (this.clearArchivedCurrent()) return\n if (initial !== 'waiting' || this.restorationNavigation?.aborted === true) return\n const workspace = this.workspaces.list.getSnapshot()\n const sessions = this.sessions.list.getSnapshot()\n if (workspace.phase !== 'ready' || sessions.phase !== 'ready') return\n if (this.mainReference !== undefined) {\n initial = 'done'\n return\n }\n initial = 'connecting'\n void this.restoreSelection(workspace, sessions).then(\n () => { initial = 'done' },\n (reason: unknown) => {\n if (this.lifetime.signal.aborted) return\n initial = 'waiting'\n console.warn('initial Session restoration failed:', reason)\n },\n )\n }\n\n const disposeWorkspaces = this.workspaces.list.subscribe(reconcile)\n const disposeSessions = this.sessions.list.subscribe(reconcile)\n reconcile()\n return () => {\n this.lifetime.abort()\n disposeSessions()\n disposeWorkspaces()\n }\n }\n\n private async restoreSelection(workspaces: WorkspaceSnapshot, sessions: SessionListState): Promise<void> {\n const saved = this.selection.getSnapshot()\n if (saved.subagentAddress !== undefined) {\n this.replaceMain(saved.subagentAddress, this.lifetime.signal, 'preserve')\n return\n }\n const summary = saved.sessionId === undefined ? undefined : sessions.byId[saved.sessionId]\n const workspace = summary === undefined ? undefined\n : workspaces.items.find(item => item.sessionIds.includes(summary.id))\n if (summary !== undefined && (!summary.blank || workspace === undefined)) {\n this.replaceMain(summary.id, this.lifetime.signal, 'preserve')\n return\n }\n const navigation = AbortSignal.any([this.ctx.layout.beginNavigation(), this.lifetime.signal])\n this.restorationNavigation = navigation\n let sessionId: SessionId | undefined\n if (summary !== undefined && workspace !== undefined && summary.cwd === workspace.path\n && !workspaces.archivedSessionIds.includes(summary.id)) {\n sessionId = await this.restoreBlank(workspace.workspaceId, summary.id)\n }\n let target = workspace?.workspaceId ?? recentWorkspace(workspaces.items, sessions.byId)\n if (target === undefined && workspaces.items.length === 0 && sessions.ids.length === 0) {\n const prepared = await this.initializeDefaultWorkspace(navigation)\n if (navigation.aborted) return\n target = prepared?.workspaceId\n }\n if (sessionId === undefined && target !== undefined) sessionId = await this.connectWorkspace(target)\n if (sessionId !== undefined && !navigation.aborted) {\n this.replaceMain(sessionId, navigation, 'preserve')\n }\n }\n\n private async initializeDefaultWorkspace(signal: AbortSignal): Promise<WorkspaceView | undefined> {\n try {\n return await this.workspaces.initializeDefault(signal)\n } catch (_error: unknown) {\n if (!signal.aborted) this.notify({ kind: 'defaultWorkspaceFailed' })\n return undefined\n }\n }\n\n /** @returns true when an archived current selection was cleared. */\n private clearArchivedCurrent(): boolean {\n const current = this.mainReference?.sessionId\n if (current === undefined\n || !this.workspaces.list.getSnapshot().archivedSessionIds.includes(current)) return false\n this.clearMain()\n return true\n }\n\n private clearMain(): void {\n const previous = this.mainReference\n this.mainReference = undefined\n this.selection.set({})\n previous?.release()\n this.ctx.layout.selectPanel(null)\n }\n\n private replaceMain(\n target: SessionTarget,\n signal: AbortSignal,\n panel: 'reveal' | 'preserve',\n beforeOpen?: (sessionId: SessionId) => void,\n ): void {\n signal.throwIfAborted()\n const reference = this.sessions.retain(target, { source: 'mainView' })\n try {\n signal.throwIfAborted()\n beforeOpen?.(reference.sessionId)\n if (signal.aborted) {\n reference.release()\n return\n }\n const subagentAddress = typeof target === 'string'\n ? this.sessions.subagentAddress(reference.sessionId)\n : target\n this.selection.set({\n sessionId: reference.sessionId,\n ...(subagentAddress === undefined ? {} : { subagentAddress }),\n })\n } catch (error: unknown) {\n reference.release()\n throw error\n }\n const previous = this.mainReference\n this.mainReference = reference\n previous?.release()\n if (panel === 'reveal') this.ctx.layout.selectPanel(null)\n }\n\n}\n\n/**\n * `error` as the Session Controller's creation failure, or undefined when it\n * is not one. Client plugin bundles do not share error-class identity, so the\n * name decides.\n */\nfunction sessionCreateErrorOf(error: unknown): SessionCreateError | undefined {\n return error instanceof Error && error.name === 'SessionCreateError' ? error as SessionCreateError : undefined\n}\n\n/**\n * The words a failed Session creation is reported in: a Host refusal keeps its\n * stable code and message; any other failure keeps its own message.\n */\nfunction creationFailureMessage(error: unknown): string {\n const refused = sessionCreateErrorOf(error)\n if (refused !== undefined) return `${refused.rpcError.code}: ${refused.rpcError.message}`\n return error instanceof Error ? error.message : String(error)\n}\n\n/** Stable tie-breaking follows Host Workspace order. */\nfunction recentWorkspace(\n workspaces: readonly WorkspaceView[],\n sessions: SessionListState['byId'],\n): WorkspaceId | undefined {\n let selected: WorkspaceId | undefined\n let selectedTime = Number.NEGATIVE_INFINITY\n for (const workspace of workspaces) {\n let latest = Number.NEGATIVE_INFINITY\n for (const sessionId of workspace.sessionIds) {\n const session = sessions[sessionId]\n if (session !== undefined) latest = Math.max(latest, session.updatedAt)\n }\n if (latest === Number.NEGATIVE_INFINITY) latest = Date.parse(workspace.createdAt)\n if (selected === undefined || latest > selectedTime) {\n selected = workspace.workspaceId\n selectedTime = latest\n }\n }\n return selected\n}\n\nexport { UiWorkspaceService }\n","/**\n * The In work model: Sessions that are running or need a look after finishing,\n * folded from state other plugins own. No state is persisted and nothing is\n * refreshed here — the Session-list snapshot, the Session-status snapshot, and the\n * Workspace owner's pin and archive sets are the whole input.\n *\n * Two groups, one row per Session:\n * - `running` holds every Session with live work, pinned or not, stable newest\n * first.\n * - `unread` holds non-running Sessions with a completion flag plus pinned\n * Sessions with no running work, even without that flag; pinned rows lead, then\n * newest first.\n *\n * A pinned running Session lists only under `running`; a pinned unread Session\n * lists only under `unread`; no Session lists in both.\n *\n * Rows that never list: subagent children (they mount under their parent, one\n * level per delegation hop), the blank New-Session placeholder, and archived\n * Sessions. Archiving does not clear the completion flag, so the archive set is a\n * third input; it gates descendants too, or a running child under an archived\n * Session would re-mount the row the user just filed away.\n */\nimport type { SessionListState, SessionSummary } from '@deepseek-ai/dsh-api-session-controller/client'\nimport type { ObservableSnapshot } from '@deepseek-ai/dsh-client-store'\nimport type { SessionStatusSnapshot } from '@deepseek-ai/dsh-client-ui-session/client'\nimport type { SessionId } from '@deepseek-ai/dsh-session/types'\nimport { sessionIsRunning } from '../tree.ts'\n\n/** One listed Session: enough to label a row, jump to it, and nest its work. */\nexport interface AttentionRow {\n readonly id: SessionId\n /** Human-facing label, straight from the list row (`displayTitle`). */\n readonly title: string\n /** Listed subagent descendants, one nesting level per delegation hop. */\n readonly children?: readonly AttentionRow[]\n /** Listed without a live run of its own: an idle parent over running work, or a pinned Session at rest. */\n readonly container?: boolean\n /** Marks a row whose Session is pinned, whatever else lists it. */\n readonly pinned?: boolean\n}\n\n/** Everything the region renders: two independent groups. */\nexport interface AttentionModel {\n /** Sessions with running work, pinned ones included; stable newest first. */\n readonly running: readonly AttentionRow[]\n /** Finished-unread Sessions plus pinned idle Sessions; pinned rows lead, then newest. */\n readonly unread: readonly AttentionRow[]\n /** Listed Sessions whose work is blocked on the user; a subset of the two groups. */\n readonly waiting: readonly AttentionRow[]\n}\n\n/** Session list source (`ctx.sessions.list`). */\nexport type AttentionListSource = ObservableSnapshot<SessionListState>\n/** Session status source (`ctx.uiSession.sessionStatus`). */\nexport type AttentionStatusSource = ObservableSnapshot<SessionStatusSnapshot>\n/** One of the Workspace owner's derived registry sets (pinned or archived). */\nexport type AttentionSetSource = ObservableSnapshot<ReadonlySet<SessionId>>\n\ninterface Candidate {\n readonly updatedAt: number\n readonly row: AttentionRow\n}\n\n/** The running sort is stable, so equal timestamps keep Host list order. */\nfunction byRecency(left: Candidate, right: Candidate): number {\n return right.updatedAt - left.updatedAt\n}\n\n/** Pinned rows lead the unread group; each side keeps the stable newest-first order. */\nfunction byUnreadPriority(left: Candidate, right: Candidate): number {\n const leftPinned = left.row.pinned === true ? 0 : 1\n const rightPinned = right.row.pinned === true ? 0 : 1\n if (leftPinned !== rightPinned) return leftPinned - rightPinned\n return right.updatedAt - left.updatedAt\n}\n\n/** One fold's child lookups, grouped by parent once so the fold stays linear. */\ninterface ChildIndex {\n readonly byId: SessionListState['byId']\n readonly byParent: ReadonlyMap<SessionId, readonly SessionSummary[]>\n}\n\nfunction childIndexOf(byId: SessionListState['byId']): ChildIndex {\n const byParent = new Map<SessionId, SessionSummary[]>()\n for (const id of idsOf(byId)) {\n const row = byId[id]\n if (row?.parentId === undefined) continue\n const siblings = byParent.get(row.parentId)\n if (siblings === undefined) byParent.set(row.parentId, [row])\n else siblings.push(row)\n }\n return { byId, byParent }\n}\n\n/** One fold's inputs to a subtree expansion, fixed for the whole fold. */\ninterface SubtreeContext {\n readonly list: SessionListState\n readonly index: ChildIndex\n readonly status: SessionStatusSnapshot\n}\n\n/**\n * The direct subagent children of one node: the node's own `subagentCatalog`\n * projection order first, then indexed `byId` rows the catalog has not caught up\n * with. A catalog entry with no row here, another `parentId`, or a non-subagent\n * origin is ignored, exactly like a foreign row in the index.\n */\nfunction directChildrenOf(parent: SessionId, ctx: SubtreeContext): readonly SessionSummary[] {\n const seen = new Set<SessionId>()\n const ordered: SessionSummary[] = []\n for (const entry of ctx.list.projectionsBySession[parent]?.values.subagentCatalog ?? []) {\n const row = ctx.index.byId[entry.id]\n if (row === undefined || row.parentId !== parent || seen.has(entry.id)) continue\n seen.add(entry.id)\n ordered.push(row)\n }\n for (const row of ctx.index.byParent.get(parent) ?? []) {\n if (seen.has(row.id)) continue\n seen.add(row.id)\n ordered.push(row)\n }\n return ordered.filter(row => row.origin === 'subagent')\n}\n\n/** One frame of the subtree walk: a row to expand, its children, and the next child to descend into. */\ninterface SubtreeFrame {\n readonly row: SessionSummary\n readonly kids: readonly SessionSummary[]\n next: number\n}\n\n/**\n * The node one row contributes, from its own run and its already-assembled\n * children: a running row keeps its title and children, an idle row over running\n * work becomes a container, and a row with neither is not part of the subtree.\n */\nfunction subtreeNode(row: SessionSummary, running: boolean, children: readonly AttentionRow[]): AttentionRow | undefined {\n if (!running) {\n return children.length === 0 ? undefined : { id: row.id, title: row.displayTitle, container: true, children }\n }\n return { id: row.id, title: row.displayTitle, ...(children.length === 0 ? {} : { children }) }\n}\n\n/**\n * The mounted subtree of one listed Session: every descendant running, or\n * carrying running work below it, nested one level per delegation hop.\n *\n * Two lineage facts make this walk terminate without a visited set. A row carries\n * at most one `parentId`, so the child edges — built once in `byParent` for the\n * whole fold — form a functional graph; and only a row whose `origin` is\n * `subagent` is ever a child. Every node of a cycle would therefore have to be\n * `subagent` (each one is somebody's child) while taking its parent from inside\n * the cycle, so no listed root — which is non-subagent by construction — can be\n * an ancestor of one. An endless dataset would have to break the unique-parent\n * rule to reach this fold.\n *\n * The walk is an explicit stack rather than recursion for the reason\n * `runningDescendantCounts` in tree.ts is: a delegation chain of a few thousand\n * hops is legal input, and the JavaScript call stack is not that deep. Frames are\n * assembled post-order, so a parent is built only after every child below it,\n * and children keep `directChildrenOf` order.\n * @param root - the listed Session whose subtree to expand.\n * @param ctx - this fold's list, child index and status map.\n * @returns the nested node, or `undefined` when neither `root` nor anything below it runs.\n */\nfunction runningSubtreeOf(root: SessionSummary, ctx: SubtreeContext): AttentionRow | undefined {\n const built = new Map<SessionId, AttentionRow | undefined>()\n const frames: SubtreeFrame[] = [{ row: root, kids: directChildrenOf(root.id, ctx), next: 0 }]\n while (frames.length > 0) {\n // Every pushed frame is removed exactly once, and the loop condition\n // guarantees a top frame; the cast states that rather than re-testing it.\n const frame = frames[frames.length - 1] as SubtreeFrame\n if (frame.next < frame.kids.length) {\n const kid = frame.kids[frame.next] as SessionSummary\n frame.next += 1\n frames.push({ row: kid, kids: directChildrenOf(kid.id, ctx), next: 0 })\n continue\n }\n frames.pop()\n const children: AttentionRow[] = []\n for (const kid of frame.kids) {\n const node = built.get(kid.id)\n if (node !== undefined) children.push(node)\n }\n built.set(frame.row.id, subtreeNode(frame.row, sessionIsRunning(ctx.list, ctx.status, frame.row.id), children))\n }\n return built.get(root.id)\n}\n\nfunction idsOf(byId: SessionListState['byId']): readonly SessionId[] {\n return Object.keys(byId) as SessionId[]\n}\n\n/**\n * Fold one list snapshot, one status snapshot, and the archive and pin sets into\n * the region's content.\n * @param list - Session list snapshot, in Host list order.\n * @param status - per-Session status map.\n * @param archived - archived Session ids, which never list.\n * @param pinned - pinned Session ids, which lead the unread group at rest.\n * @returns the model the region renders.\n */\nexport function deriveAttention(\n list: SessionListState,\n status: SessionStatusSnapshot,\n archived: ReadonlySet<SessionId>,\n pinned: ReadonlySet<SessionId>,\n): AttentionModel {\n const running: Candidate[] = []\n const unread: Candidate[] = []\n const blocked = new Set<SessionId>()\n const ctx: SubtreeContext = { list, index: childIndexOf(list.byId), status }\n list.ids.forEach((id) => {\n const row = list.byId[id]\n // An id may be listed before the Host projects its row (nothing to label).\n if (row === undefined) return\n if (row.origin === 'subagent' || row.blank || archived.has(id)) return\n const entry = status.get(id)\n const isPinned = pinned.has(id)\n const node = runningSubtreeOf(row, ctx)\n if (node !== undefined) {\n // The pin marks the listed row itself, never a descendant. A pinned running\n // Session belongs here only, even when a completion flag is also set.\n running.push({\n updatedAt: row.updatedAt,\n row: isPinned ? { ...node, pinned: true } : node,\n })\n if (entry?.pendingInteraction !== undefined) blocked.add(id)\n return\n }\n if (entry?.completionUnread === true) {\n unread.push({\n updatedAt: row.updatedAt,\n row: { id, title: row.displayTitle, ...(isPinned ? { pinned: true } : {}) },\n })\n if (entry.pendingInteraction !== undefined) blocked.add(id)\n return\n }\n // A pinned Session at rest belongs to the unread group even without a\n // completion flag: the user asked to keep it in view, and it has no run.\n if (isPinned) {\n unread.push({\n updatedAt: row.updatedAt,\n row: { id, title: row.displayTitle, container: true, pinned: true },\n })\n if (entry?.pendingInteraction !== undefined) blocked.add(id)\n }\n })\n const runningRows = running.sort(byRecency).map(candidate => candidate.row)\n const unreadRows = unread.sort(byUnreadPriority).map(candidate => candidate.row)\n return {\n running: runningRows,\n unread: unreadRows,\n waiting: [...runningRows, ...unreadRows].filter(row => blocked.has(row.id)),\n }\n}\n\n/**\n * One row's comparable identity: everything the row renders plus its subtree, in\n * order. Two models with equal keys draw the same pixels, which is what lets the\n * store publish a fold only when something visible changed.\n */\nfunction rowKey(row: AttentionRow): string {\n return [\n row.id,\n row.title,\n row.container ? 'c' : '',\n row.pinned ? 'p' : '',\n row.children === undefined ? '' : row.children.map(rowKey).join('\\u0003'),\n ].join('\\u0002')\n}\n\nfunction rowsKey(rows: readonly AttentionRow[]): string {\n return rows.map(rowKey).join('\\u0001')\n}\n\n/** Whether two models would render identically. */\nfunction sameModel(left: AttentionModel, right: AttentionModel): boolean {\n return rowsKey(left.running) === rowsKey(right.running)\n && rowsKey(left.unread) === rowsKey(right.unread)\n // The blocked marker rides this one, so a pending interaction that appears or\n // clears while the groups stand still is a change, not a no-op.\n && rowsKey(left.waiting) === rowsKey(right.waiting)\n}\n\n/** Read-only view of the current model, plus the plugin's disposer. */\nexport interface AttentionStore extends ObservableSnapshot<AttentionModel> {\n /** Detach from all four sources and drop every listener. */\n dispose(): void\n}\n\n/**\n * Keep the model in step with the four sources it folds: the Session list, the\n * Session status map, and the Workspace owner's pinned and archived sets. The\n * sets are sources in their own right because neither pinning nor archiving moves\n * the list or the status, so a row the user just filed away or just pinned would\n * otherwise stay as it was.\n *\n * Two folds that would render identically are not published, so a status tick\n * that only touches an unrelated Session costs no render. The caller owns the\n * lifetime through {@link AttentionStore.dispose}.\n * @param list -\n * @param status -\n * @param pinned -\n * @param archived -\n * @returns the model source and its disposer.\n */\nexport function createAttentionStore(\n list: AttentionListSource,\n status: AttentionStatusSource,\n pinned: AttentionSetSource,\n archived: AttentionSetSource,\n): AttentionStore {\n const listeners = new Set<() => void>()\n let model = deriveAttention(list.getSnapshot(), status.getSnapshot(), archived.getSnapshot(), pinned.getSnapshot())\n const recompute = (): void => {\n const next = deriveAttention(list.getSnapshot(), status.getSnapshot(), archived.getSnapshot(), pinned.getSnapshot())\n if (sameModel(next, model)) return\n model = next\n // forEach skips a listener removed earlier in the same pass and does not\n // visit one added during it, which is exactly the containment a plain\n // for..of over a live Set would not give.\n listeners.forEach(listener => { listener() })\n }\n const unsubscribes = [\n list.subscribe(recompute),\n status.subscribe(recompute),\n pinned.subscribe(recompute),\n archived.subscribe(recompute),\n ]\n return {\n getSnapshot: () => model,\n subscribe: (listener) => {\n listeners.add(listener)\n return () => { listeners.delete(listener) }\n },\n dispose: () => {\n for (const unsubscribe of unsubscribes) unsubscribe()\n listeners.clear()\n },\n }\n}\n","function r(e){var t,f,n=\"\";if(\"string\"==typeof e||\"number\"==typeof e)n+=e;else if(\"object\"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=\" \"),n+=f)}else for(f in e)e[f]&&(n&&(n+=\" \"),n+=f);return n}export function clsx(){for(var e,t,f=0,n=\"\",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=\" \"),n+=t);return n}export default clsx;","/** Workspace rename and removal dialogs, keyed by their captured request. */\nimport { useEffect, useRef, useState } from 'react'\nimport { Button, Modal } from '@deepseek-ai/dsh-client-ui-primitives'\nimport type { WorkspaceId, WorkspaceView } from '@deepseek-ai/dsh-api-workspace-controller/client'\nimport type { WorkspaceActionRequest, WorkspaceBrowserProps } from '../contract/slots.ts'\nimport css from './WorkspaceBrowser.module.css'\n\ntype Props = Pick<WorkspaceBrowserProps, 'renameWorkspace' | 'deleteWorkspace' | 'settleWorkspaceAction' | 't'> & {\n request: WorkspaceActionRequest\n workspaces: readonly WorkspaceView[]\n}\n\n/** @param props - captured request, current Workspace list, and existing mutations. @returns the active dialog. */\nexport function WorkspaceDialogs({ request, workspaces, renameWorkspace, deleteWorkspace, settleWorkspaceAction, t }: Props) {\n const composingRef = useRef(false)\n const renameTarget = request.action === 'rename' ? request : null\n const [renameDraft, setRenameDraft] = useState(request.displayTitle)\n const [renaming, setRenaming] = useState(false)\n const [renameError, setRenameError] = useState<string | null>(null)\n const renameTrimmed = renameDraft.trim()\n // Self is excluded by identity, not by title: the draft is seeded with the\n // localized label, which for an automatically titled Workspace equals its\n // own displayed title without being a conflict with itself.\n const renameDuplicate = renameTarget !== null && renameTrimmed !== ''\n && workspaces.some(w => w.workspaceId !== renameTarget.workspaceId && w.title === renameTrimmed)\n const renameBlocked = renaming || renameTrimmed === ''\n || renameTarget === null || renameTrimmed === renameTarget.storedTitle || renameDuplicate\n const closeRename = () => {\n if (renaming) return\n settleWorkspaceAction()\n setRenameError(null)\n }\n const confirmRename = () => {\n if (renameBlocked) return\n setRenaming(true)\n setRenameError(null)\n renameWorkspace(renameTarget.workspaceId, renameTrimmed).then(() => {\n setRenaming(false)\n settleWorkspaceAction()\n }).catch((reason: unknown) => {\n setRenaming(false)\n setRenameError(reason instanceof Error ? reason.message : String(reason))\n })\n }\n\n const deleteTarget = request.action === 'delete' ? request : null\n const [deleting, setDeleting] = useState(false)\n const [deleteCommittedId, setDeleteCommittedId] = useState<WorkspaceId | null>(null)\n const [deleteError, setDeleteError] = useState<string | null>(null)\n useEffect(() => {\n if (deleteCommittedId === null\n || workspaces.some(workspace => workspace.workspaceId === deleteCommittedId)) return\n setDeleting(false)\n setDeleteCommittedId(null)\n settleWorkspaceAction()\n }, [deleteCommittedId, workspaces, settleWorkspaceAction])\n const closeDelete = () => {\n if (deleting) return\n settleWorkspaceAction()\n setDeleteError(null)\n }\n const confirmDelete = () => {\n /* v8 ignore next -- the Modal is absent without a target and its button is disabled while deleting. */\n if (deleting || deleteTarget === null) return\n setDeleting(true)\n setDeleteCommittedId(null)\n setDeleteError(null)\n deleteWorkspace(deleteTarget.workspaceId).then(() => {\n // Keep the confirmation pending until this component has rendered the\n // committed list projection without the deleted id. Closing earlier\n // exposes one stale React frame to the next Create Workspace gesture.\n setDeleteCommittedId(deleteTarget.workspaceId)\n }).catch((reason: unknown) => {\n setDeleting(false)\n setDeleteError(reason instanceof Error ? reason.message : String(reason))\n })\n }\n\n return <>\n <Modal\n open={renameTarget !== null}\n onClose={closeRename}\n closeLabel={t('close')}\n title={t('rename.workspace.title')}\n footer={(\n <>\n <Button variant=\"outline\" disabled={renaming} onClick={closeRename}>{t('cancel')}</Button>\n <Button variant=\"primary\" disabled={renameBlocked} onClick={confirmRename}>{t('rename')}</Button>\n </>\n )}\n >\n <input\n className={css.renameInput}\n value={renameDraft}\n aria-label={t('field.workspaceName')}\n data-modal-autofocus\n disabled={renaming}\n onFocus={(e) => { e.target.select() }}\n onChange={(e) => { setRenameDraft(e.target.value); setRenameError(null) }}\n onCompositionStart={() => { composingRef.current = true }}\n onCompositionEnd={() => { composingRef.current = false }}\n onKeyDown={(e) => {\n if (e.key === 'Enter' && !composingRef.current) {\n e.preventDefault()\n confirmRename()\n }\n }}\n />\n {renameDuplicate && (\n <div className={css.renameError} role=\"alert\">{t('conflict.named', { name: renameTrimmed })}</div>\n )}\n {renameError !== null && <div className={css.renameError} role=\"alert\">{renameError}</div>}\n </Modal>\n\n <Modal\n open={deleteTarget !== null}\n onClose={closeDelete}\n closeLabel={t('close')}\n title={t('delete.workspace')}\n {...deleteTarget === null\n ? {}\n : { description: t('delete.desc', { name: deleteTarget.displayTitle }) }}\n footer={(\n <>\n <Button variant=\"outline\" disabled={deleting} onClick={closeDelete}>{t('cancel')}</Button>\n <Button\n variant=\"outline\"\n className={css.deleteAction}\n disabled={deleting}\n onClick={confirmDelete}\n >\n {t('delete.workspace')}\n </Button>\n </>\n )}\n >\n {deleting && <div className={css.deleteStatus} role=\"status\">{t('delete.pending')}</div>}\n {deleteError !== null && <div className={css.renameError} role=\"alert\">{deleteError}</div>}\n </Modal>\n </>\n}\n","/**\n * Fixed first-use Workspace naming, shared by the Host that creates the\n * directory and by browser consumers that label the resulting row. A pure fold\n * with no imports, so client bundles inline it instead of requesting a\n * module-table row this package does not publish.\n * @module @deepseek-ai/dsh-api-workspace-controller/default-workspace\n */\n/**\n * Leaf directory name of the first-use Workspace under\n * `<Documents>/deepseek-harness`. Language-neutral, so one installation keeps\n * one on-disk path across language switches. The registry derives the initial\n * title from this same segment, which is the title\n * {@link workspaceDisplayTitle} recognizes as automatic.\n */\nexport const DEFAULT_WORKSPACE_DIRECTORY = 'default-workspace';\n/**\n * The text one Workspace is labeled with. A Workspace still carrying the\n * automatic first-use title reads as the caller's localized default name; every\n * other title reads verbatim in every language. A title the user typed as\n * exactly {@link DEFAULT_WORKSPACE_DIRECTORY} is labeled as the default too;\n * nothing else depends on the distinction.\n * @param title - stored Workspace title.\n * @param localizedDefault - the default Workspace name in the active language.\n * @returns the title to display.\n */\nexport function workspaceDisplayTitle(title, localizedDefault) {\n return title === DEFAULT_WORKSPACE_DIRECTORY ? localizedDefault : title;\n}\n//# sourceMappingURL=default-workspace.js.map","/**\n * Workspace browser tree row components (figma Cell set 14:3080): pure presentational —\n * all data and callbacks arrive via props. Hover swaps (folder->chevron,\n * time->ellipsis, action buttons) are CSS-only, and a session row's clipped\n * title marquees programmatically while the row is hovered. Workspace row\n * menus share captured Workspace actions with right-click. Both row types\n * render the shared `contextMenu.button` factory for their menu trigger.\n * Session hover buttons use the browser's `renderSlot` for the\n * `sidebar.workspaces.session.row.action` list. Session and Workspace\n * hover cards are suppressed while their menu is open.\n */\nimport { useEffect, useMemo, useRef } from 'react'\nimport type { PointerEvent, RefObject } from 'react'\nimport clsx from 'clsx'\nimport type { PropsRenderSlots } from '@deepseek-ai/dsh-client-ui-slots'\nimport {\n HoverCard, IconArchiveOutlineRegular,\n IconFolderCloseRegular, IconFolderOpenRegular,\n IconNewChatOutlineRegular, IconPinFillRegular,\n IconTriangleRightFillRegular, IconUnarchiveOutlineRegular, relativeTime, StateDot, Tooltip, useRowDragPreview,\n} from '@deepseek-ai/dsh-client-ui-primitives'\nimport type { ShortcutCatalogEntry } from '@deepseek-ai/dsh-client-shortcuts/client'\nimport type { StateDotState } from '@deepseek-ai/dsh-client-ui-primitives'\nimport { abbreviateHomePath } from '@deepseek-ai/dsh-util-workspace-path'\nimport type { WorkspaceId } from '@deepseek-ai/dsh-api-workspace-controller/client'\nimport type { WorkspaceBrowserProps } from '../contract/slots.ts'\nimport type { GroupNode, SearchResultNode, SessionNode } from '../tree.ts'\nimport css from './Rows.module.css'\n\n/** Sidebar-owned layout values needed by row copies mounted outside the sidebar. */\nconst DRAG_PREVIEW_PROPERTIES = [\n '--dsh-sidebar-row-padding',\n '--dsh-sidebar-label-gap',\n '--dsh-sidebar-paint-inset',\n] as const\n\n/** The standard locale seat, prop-passed from the browser root. */\ntype RowTranslate = WorkspaceBrowserProps['t']\n\n/**\n * Child-seat renderer threaded from the browser root: the row's action lists,\n * its leading and trailing decorations, and its hover-card section. The leading\n * seat is rendered only while the row's primary state is idle, so a status dot and a\n * leading occupant never share the row; the hover seat only while the row's\n * card is open.\n */\ntype RowRenderSlots = PropsRenderSlots<\n | 'sidebar.workspaces.session.row.action'\n | 'sidebar.session.row.trailing'\n | 'sidebar.session.row.leading'\n | 'sidebar.session.row.hover'\n>['renderSlot']\n\n/** Row display title: blank rows show the localized New Session label. */\nfunction displayTitle(node: SessionNode, t: RowTranslate): string {\n return node.blank ? t('session.new') : (node.title || t('session.untitled'))\n}\n\n/* Overflow this small hides no meaningful tail; scrolling for it reads as an\n accidental jitter, so the title stays put. */\nconst MIN_TITLE_REVEAL_PX = 8\n\n/* Marquee travel speed: slow enough to read the text as it passes. */\nconst TITLE_MARQUEE_PX_PER_MS = 0.03\n\n/**\n * Place the title's scroll position and publish the stylesheet's fade-mask\n * hooks: `data-scrolled` while the title has left its start (left fade) and\n * `data-clipped` while text remains beyond the right edge (right fade).\n * @param title - the row's clipping title element.\n * @param left - scroll offset in CSS pixels.\n * @param range - the title's maximum scroll offset in CSS pixels.\n */\nfunction placeTitle(title: HTMLSpanElement, left: number, range: number): void {\n // jsdom implements no scrollTo; the lane's direct assignment is instant there\n // anyway, so both paths land on the same position.\n if (typeof title.scrollTo === 'function') title.scrollTo({ left, behavior: 'instant' })\n else title.scrollLeft = left\n if (left > 0) title.dataset.scrolled = ''\n else delete title.dataset.scrolled\n if (left < range) title.dataset.clipped = ''\n else delete title.dataset.clipped\n}\n\n/**\n * Return the title to its resting state: scrolled to the start with both fade\n * masks off, so the resting ellipsis renders at full strength.\n * @param title - the row's clipping title element.\n */\nfunction restTitle(title: HTMLSpanElement): void {\n if (typeof title.scrollTo === 'function') title.scrollTo({ left: 0, behavior: 'instant' })\n else title.scrollLeft = 0\n delete title.dataset.scrolled\n delete title.dataset.clipped\n}\n\n/**\n * Marquee a title wider than its one-line cell while its row is hovered: the\n * title clips its own text, so entering crawls it at a constant speed until the\n * far edge (a fork's incremented title, for example) is in view, then rests\n * there under the pointer. Overflow of at most {@link MIN_TITLE_REVEAL_PX}\n * stays put — a barely-clipped title moving a few pixels reads as jitter, not a\n * reveal. Leaving returns the title to the start in one step, because the\n * resting ellipsis and the narrowed cell would otherwise meet the text while it\n * travelled back. Reduced motion jumps to the far edge instead of crawling.\n * @param title - ref to the row's clipping title element.\n * @returns stable pointer enter/leave handlers for the row.\n */\nfunction useTitleMarquee(title: RefObject<HTMLSpanElement | null>): {\n enter: (event?: PointerEvent) => void\n leave: () => void\n} {\n const frame = useRef(0)\n const revealing = useRef(false)\n useEffect(() => () => { cancelAnimationFrame(frame.current) }, [])\n return useMemo(() => ({\n enter: (event?: PointerEvent): void => {\n if (event?.pointerType === 'touch') return\n /* v8 ignore next -- defensive: the title span renders unconditionally. */\n if (title.current === null) return\n if (revealing.current) return\n revealing.current = true\n const element = title.current\n const range = element.scrollWidth - element.clientWidth\n if (range <= MIN_TITLE_REVEAL_PX) return\n if (window.matchMedia('(prefers-reduced-motion: reduce)').matches) {\n placeTitle(element, range, range)\n return\n }\n cancelAnimationFrame(frame.current)\n let previous: number | undefined\n let position = 0\n const step = (now: DOMHighResTimeStamp): void => {\n position += previous === undefined ? 0 : (now - previous) * TITLE_MARQUEE_PX_PER_MS\n previous = now\n placeTitle(element, Math.min(position, range), range)\n if (position < range) frame.current = requestAnimationFrame(step)\n }\n frame.current = requestAnimationFrame(step)\n },\n leave: (): void => {\n revealing.current = false\n cancelAnimationFrame(frame.current)\n /* v8 ignore next -- defensive: the title span renders unconditionally. */\n if (title.current === null) return\n restTitle(title.current)\n },\n }), [title])\n}\n\n/** Localized compact relative time (\"刚刚\"/\"5分钟\" in zh, \"now\"/\"5min\" in en). */\nfunction timeLabel(updatedAt: number, now: number, t: RowTranslate): string {\n const { unit, n } = relativeTime(updatedAt, now)\n return unit === 'now' ? t('time.now') : t(`time.${unit}`, { n })\n}\n\n/** Hover-card variant: distances wrap in the ago template; the now bucket stays bare (no \"now ago\"). */\nfunction hoverTimeLabel(updatedAt: number, now: number, t: RowTranslate): string {\n const { unit, n } = relativeTime(updatedAt, now)\n return unit === 'now' ? t('time.now') : t('time.ago', { t: t(`time.${unit}`, { n }) })\n}\n\n/**\n * Absolute creation time through the dictionary's date template (the message\n * clock pattern): `toLocaleString` would follow the browser language, not the\n * app locale, and produce mixed-language text after a switch.\n */\nfunction createdLabel(createdAt: number, t: RowTranslate): string {\n const d = new Date(createdAt)\n const pad2 = (v: number): string => String(v).padStart(2, '0')\n const date = t('date.ymd', { y: d.getFullYear(), m: d.getMonth() + 1, d: d.getDate() })\n return t('hover.created', { time: `${date} ${pad2(d.getHours())}:${pad2(d.getMinutes())}` })\n}\n\n/** Hover-card body: workspace title, display directory path, absolute creation time. */\nfunction WorkspaceHoverContent({ label, cwd, createdAt, t }: {\n label: string\n cwd: string | undefined\n createdAt: number\n t: RowTranslate\n}) {\n return (\n <div className={css.hoverContent}>\n <div className={css.hoverTitle}>{label}</div>\n <div className={css.hoverPath}>{cwd}</div>\n <div className={css.hoverTime}>{createdLabel(createdAt, t)}</div>\n </div>\n )\n}\n\n/**\n * Row drag wiring supplied by the tree owner. `drop` reports the half of the\n * row where the pointer released so the owner can resolve an insert anchor.\n */\nexport interface RowDragProps {\n /** Start dragging this row. */\n start: () => void\n /** A compatible row drag is in flight. */\n active: boolean\n /** Current marker on this row: insert line above, below, or none. */\n marker: 'before' | 'after' | null\n /** Report the hovered half while a compatible drag passes over this row. */\n hover: (half: 'before' | 'after') => void\n drop: (half: 'before' | 'after') => void\n end: () => void\n}\n\n/** Drag lifecycle owned by a workspace row; its enclosing group owns hit testing. */\ninterface WorkspaceRowDragProps {\n start: () => void\n end: () => void\n}\n\n/** Pointer-position half of a row (insert line above or below). */\nfunction rowHalf(e: { clientY: number; currentTarget: HTMLElement }): 'before' | 'after' {\n const rect = e.currentTarget.getBoundingClientRect()\n return e.clientY < rect.top + rect.height / 2 ? 'before' : 'after'\n}\n\n/** Owner props of one Workspace header row; the access Hooks are the browser root's own standard seats. */\ntype ProjectRowItemProps = {\n group: GroupNode\n newShortcut?: ShortcutCatalogEntry | undefined\n containsCurrentDescendant?: boolean\n onToggle: () => void\n onCreate: (workspaceId: WorkspaceId) => void\n /** Present only for real Workspace rows in the grouped view. */\n drag?: WorkspaceRowDragProps | undefined\n /** Host account home; POSIX home-rooted hover paths display as `~`. */\n home?: string | undefined\n t: RowTranslate\n} & Pick<WorkspaceBrowserProps, 'useWorkspaceAccess' | 'renderFactorySlot' | 'useContextMenuTarget' | 'useContextMenu'>\n\n/** The header actions one row offers; an absent create offers no New Session button. */\ninterface ProjectRowActions {\n readonly create?: (() => void) | undefined\n readonly reorder: boolean\n}\n\n/**\n * Project (workspace) header row: folder + title;\n * hover reveals the chevron and, on a real Workspace, the create button;\n * dwelling on a real Workspace shows its hover card. The ungrouped bucket\n * has neither, because it has no backing Workspace to start a Session in.\n * `containsCurrent` arrives on the node (derivation fact, no renderer scan).\n * Create and drag follow the Workspace access snapshot. Menu providers own\n * their access checks; the ungrouped bucket has no Workspace menu.\n * @param props.group - derived group node.\n * @param props.containsCurrentDescendant - highlight an ancestor even when its subtree is collapsed.\n * @param props.onToggle - expand/collapse the group.\n * @param props.onCreate - start a frontend Session inside the given Workspace.\n * @param props.drag - optional workspace-row drag wiring.\n * @param props.home - host account home for POSIX hover-path abbreviation.\n * @param props.t - the browser root's locale seat.\n * @returns the row element.\n */\nexport function ProjectRowItem(props: ProjectRowItemProps) {\n const workspaceId = props.group.workspaceId\n return workspaceId === undefined\n ? <UngroupedProjectRow {...props} />\n : <WorkspaceProjectRow {...props} workspaceId={workspaceId} />\n}\n\n/** The ungrouped bucket's header: no backing Workspace to start a Session in or reorder. */\nfunction UngroupedProjectRow(props: ProjectRowItemProps) {\n return <ProjectRow {...props} actions={{ reorder: false }} />\n}\n\n/** A real Workspace's header: every action asks that Workspace's resource. */\nfunction WorkspaceProjectRow({ workspaceId, ...props }: ProjectRowItemProps & { workspaceId: WorkspaceId }) {\n const { useWorkspaceAccess } = props\n const create = useWorkspaceAccess(workspaceId, 'session/create')\n const actions: ProjectRowActions = {\n create: create ? () => { props.onCreate(workspaceId) } : undefined,\n reorder: useWorkspaceAccess(workspaceId, 'workspace/insertBefore'),\n }\n return <ProjectRow {...props} actions={actions} />\n}\n\nfunction ProjectRow({\n group, containsCurrentDescendant = false, onToggle, drag: offeredDrag, home, newShortcut, t, actions,\n renderFactorySlot, useContextMenuTarget, useContextMenu,\n}: Omit<ProjectRowItemProps, 'onCreate'> & { actions: ProjectRowActions }) {\n const { getTriggerProps } = useContextMenu()\n const drag = actions.reorder ? offeredDrag : undefined\n const create = actions.create\n const row = group\n // The ungrouped bucket has no workspace title: its label is dictionary copy.\n const label = row.workspaceId === undefined ? t('group.ungrouped') : row.label\n const active = containsCurrentDescendant || (group.expanded && group.containsCurrent)\n const menuOpen = useContextMenuTarget(target => target?.kind === 'workspace' && target.value.workspaceId === row.workspaceId)\n const dragPreview = useRowDragPreview(css.dragPreview as string, DRAG_PREVIEW_PROPERTIES)\n const workspaceMenuTarget = row.workspaceId !== undefined && row.cwd !== undefined\n ? { workspaceId: row.workspaceId, path: row.cwd } : undefined\n const ownRow = (\n <div\n className={clsx(css.projectRow, menuOpen && css.menuOpen)}\n data-row-key={`workspace:${group.key}`}\n role=\"treeitem\"\n aria-expanded={row.expanded}\n onClick={onToggle}\n {...getTriggerProps(workspaceMenuTarget === undefined ? undefined : { kind: 'workspace', value: { ...workspaceMenuTarget, displayTitle: label } })}\n draggable={drag !== undefined}\n onDragStart={drag === undefined\n ? undefined\n : (e) => {\n e.dataTransfer.effectAllowed = 'move'\n e.dataTransfer.setData('text/plain', row.key)\n drag.start()\n dragPreview.start(e)\n }}\n onDragEnd={() => { if (dragPreview.clear()) drag?.end() }}\n >\n <span className={clsx(css.slot, css.folder, active && css.folderActive)}>\n {row.expanded ? <IconFolderOpenRegular /> : <IconFolderCloseRegular />}\n {/* Folded group holding executing work: the rows that would carry the\n running dot are off screen, so the folder glyph carries it. The\n badge rides the folder span, so row hover swaps it out with the\n chevron exactly like the glyph it annotates. */}\n {row.running && (\n <span className={css.folderActivity} role=\"img\" aria-label={t('group.running')}>\n <StateDot state=\"ongoing\" size={7} />\n </span>\n )}\n {/* Same seat for the folded group's completion reminder: the hidden\n row's done dot reports on the closed folder instead. */}\n {row.completedUnread && !row.running && (\n <span className={css.folderActivity} role=\"img\" aria-label={t('group.completed')}>\n <StateDot state=\"done\" size={7} />\n </span>\n )}\n </span>\n <span className={clsx(css.slot, css.chevron)}>\n <IconTriangleRightFillRegular className={clsx(css.arrow, row.expanded && css.arrowOpen)} />\n </span>\n <span className={css.projectText}>\n <span className={css.title}>{label}</span>\n </span>\n <span className={css.rowActions}>\n {workspaceMenuTarget !== undefined && (\n renderFactorySlot('contextMenu.button', {\n target: { kind: 'workspace', value: { ...workspaceMenuTarget, displayTitle: label } },\n label: t('actions.workspace.aria', { name: label }),\n className: css.iconButton,\n })\n )}\n {create !== undefined && (\n <Tooltip label={t('actions.newSession')} shortcutKeys={newShortcut?.keys} side=\"bottom\" align=\"end\" delayMs={500} portal>\n <button\n type=\"button\"\n className={css.iconButton}\n aria-keyshortcuts={newShortcut?.aria}\n aria-label={t('actions.newSession.aria', { name: label })}\n onClick={(e) => { e.stopPropagation(); create() }}\n >\n <IconNewChatOutlineRegular size={14} />\n </button>\n </Tooltip>\n )}\n </span>\n </div>\n )\n // The ungrouped bucket has no backing Workspace: no card to show.\n if (row.createdAt === undefined) return ownRow\n return (\n <HoverCard\n anchor={ownRow}\n content={<WorkspaceHoverContent\n label={row.label}\n cwd={row.cwd === undefined ? undefined : abbreviateHomePath(row.cwd, home)}\n createdAt={row.createdAt}\n t={t}\n />}\n openDelayMs={800}\n grouped\n disabled={menuOpen}\n copyText={row.cwd}\n copyLabel={t('copy')}\n copiedLabel={t('hover.copied')}\n />\n )\n}\n\n/* v8 ignore next 3 -- closed-union backstop; only reached if the status is forged */\nfunction assertNever(value: never): never {\n throw new Error(`unknown pending interaction: ${String(value)}`)\n}\n\ninterface SessionStatus {\n state: StateDotState\n label: string\n /** Compact text that replaces the Session row's update time. */\n trailingLabel?: string\n}\n\n/**\n * Session status presentation; pending interaction is primary and live activity\n * outranks completion reminders.\n */\nfunction sessionStatuses(\n node: Pick<SessionNode, 'pendingInteraction' | 'running' | 'runningSubagentCount' | 'completed'>,\n t: RowTranslate,\n): readonly [SessionStatus, ...SessionStatus[]] {\n const subagents: SessionStatus | undefined = node.runningSubagentCount === 0\n ? undefined\n : {\n state: 'ongoing',\n label: t(\n node.runningSubagentCount === 1\n ? 'status.subagentsRunning.one'\n : 'status.subagentsRunning.other',\n { n: node.runningSubagentCount },\n ),\n }\n let pending: SessionStatus | undefined\n switch (node.pendingInteraction) {\n case 'approval':\n pending = {\n state: 'warning',\n label: t('status.waitingApproval'),\n trailingLabel: t('status.compact.approval'),\n }\n break\n case 'plan-review':\n pending = {\n state: 'warning',\n label: t('status.planReview'),\n trailingLabel: t('status.compact.planReview'),\n }\n break\n case 'question':\n pending = {\n state: 'warning',\n label: t('status.waitingAnswer'),\n trailingLabel: t('status.compact.answer'),\n }\n break\n case undefined: break\n /* v8 ignore next -- closed PendingInteractionStatus union */\n default: return assertNever(node.pendingInteraction)\n }\n if (pending !== undefined) return subagents === undefined ? [pending] : [pending, subagents]\n if (node.running) {\n const primary: SessionStatus = { state: 'ongoing', label: t('status.running') }\n return subagents === undefined ? [primary] : [primary, subagents]\n }\n if (subagents !== undefined) return [subagents]\n if (node.completed) return [{ state: 'done', label: t('status.completed') }]\n return [{ state: 'idle', label: t('status.idle') }]\n}\n\n/** Primary status dot plus every status's screen-reader label, shared by the search and session rows. */\nfunction SessionStatusDots({ statuses }: { statuses: readonly [SessionStatus, ...SessionStatus[]] }) {\n return (\n <>\n <StateDot state={statuses[0].state} />\n {statuses.map(status => (\n <span className={css.visuallyHidden} key={status.label}>{status.label}</span>\n ))}\n </>\n )\n}\n\n/** Non-interactive pinned-row marker; the enclosing row remains the only action. */\nfunction PinnedIndicator({ t }: { t: RowTranslate }) {\n const label = t('row.pinned')\n return (\n <span className={css.pinIndicator} role=\"img\" aria-label={label} title={label}>\n <IconPinFillRegular size={14} />\n </span>\n )\n}\n\n/**\n * Hover-card body: full title, display working directory, relative time, the Session's own scheduled-task\n * section, and every relevant live status. The task section sits above the\n * status lines so they stay the card's trailing status line.\n */\nfunction SessionHoverContent({ node, cwd, now, renderSlot, t }: {\n node: SessionNode\n /** Display working directory; absent omits the line. */\n cwd: string | undefined\n now: number\n renderSlot: RowRenderSlots\n t: RowTranslate\n}) {\n // On archived rows the archived line already says the session is inactive,\n // so resting statuses (idle/completed) drop; live activity still shows.\n const statuses = sessionStatuses(node, t)\n .filter(status => !(node.archived && (status.state === 'done' || status.state === 'idle')))\n return (\n <div className={css.hoverContent}>\n <div className={css.hoverTitle}>{displayTitle(node, t)}</div>\n {cwd !== undefined && <div className={css.hoverPath}>{cwd}</div>}\n {/* Same placeholder rule as the row's trailing cell: no timestamp\n before the first prompt. */}\n {!node.blank && <div className={css.hoverTime}>{hoverTimeLabel(node.updatedAt, now, t)}</div>}\n {renderSlot('sidebar.session.row.hover', { sessionId: node.id })}\n {statuses.map(status => (\n <div className={css.hoverStatus} key={status.label}>\n <StateDot state={status.state} />\n <span>{status.label}</span>\n </div>\n ))}\n {node.archived && (\n <div className={clsx(css.hoverStatus, css.hoverArchived)}>\n <IconArchiveOutlineRegular size={14} />\n <span>{t('row.archived')}</span>\n </div>\n )}\n </div>\n )\n}\n\n/**\n * One flat search result: title, Workspace context, and optional content\n * excerpt. Search navigation opens the session only; it does not address an\n * event inside the conversation. Archived rows carry a hover unarchive\n * button, because search is where the filter surfaces them for recovery.\n * @param props.result - merged local/content search row.\n * @param props.currentId - selected session id.\n * @param props.onOpen - open the selected session.\n * @param props.onUnarchive - unarchive an archived result row.\n * @param props.useSessionAccess - the browser root's Session access Hook; the restore control\n * appears only while the snapshot allows `workspace/unarchiveSession` for that Session.\n * @param props.t - Workspace-browser translation seat.\n * @returns the result row.\n */\nexport function SearchResultItem({\n result, currentId, onOpen, onUnarchive, useSessionAccess, t,\n}: {\n result: SearchResultNode\n currentId: string | undefined\n onOpen: (id: SearchResultNode['id']) => void\n onUnarchive: (id: SearchResultNode['id']) => void\n t: RowTranslate\n} & Pick<WorkspaceBrowserProps, 'useSessionAccess'>) {\n const selected = result.id === currentId\n const canUnarchive = useSessionAccess(result.id, 'workspace/unarchiveSession')\n const statuses = sessionStatuses(result, t)\n const primaryStatus = statuses[0]\n return (\n <div\n className={clsx(css.searchResultRow, selected && css.selected, result.archived && css.archived)}\n role=\"treeitem\"\n aria-selected={selected}\n aria-description={result.archived ? t('toast.archivedNotOpenable') : undefined}\n onClick={() => { onOpen(result.id) }}\n >\n <span className={css.searchResultHeading}>\n {/* Like session rows, the leading slot owns every row marker; on\n archived rows it stays blank — the grayed row carries the\n archived look. */}\n <span className={css.slot}>\n {!result.archived && primaryStatus.state !== 'idle' && (\n <SessionStatusDots statuses={statuses} />\n )}\n </span>\n <span className={css.searchResultTitle}>{result.title || t('session.untitled')}</span>\n {result.archived && canUnarchive && (\n <span className={css.rowActions}>\n <Tooltip label={t('actions.unarchive')} side=\"bottom\" align=\"end\" delayMs={500} portal>\n <button\n type=\"button\"\n className={css.iconButton}\n aria-label={t('menu.unarchiveSession')}\n onClick={(e) => { e.stopPropagation(); onUnarchive(result.id) }}\n >\n <IconUnarchiveOutlineRegular size={14} />\n </button>\n </Tooltip>\n </span>\n )}\n </span>\n <span className={css.searchResultMeta}>\n <span className={css.searchResultWorkspace}>{result.workspace || t('group.ungrouped')}</span>\n {result.snippet !== undefined && (\n <span className={css.searchResultSnippet}>{result.snippet}</span>\n )}\n </span>\n </div>\n )\n}\n\n/**\n * One top-level 32px session row: leading 16px cell (status dot, or the\n * leading seat while the row's primary state is idle), title, relative time or\n * compact pending label, and the row actions menu. A row that owns a state dot\n * keeps that cell and renders no seat, so an ambient automation mark never\n * appears beside the row's own state dot. An archived row keeps the cell blank:\n * neither marker renders there, and its live status stays on the hover card.\n * The row accepts Tab focus and opens with unmodified Enter or Space; descendant controls\n * handle their own activation without opening the row.\n * @param props.node - derived session node.\n * @param props.currentId - selected session id (row highlight).\n * @param props.now - epoch ms for relative-time formatting.\n * @param props.onOpen - open a session by id.\n * @param props.onRenameRequest - open the rename dialog from a title double-click (id + current title);\n * called only after a single press on the title since the window last lost focus.\n * @param props.renderSlot - child-seat renderer for the row's action lists\n * (`sidebar.workspaces.session.menu.item` / `sidebar.workspaces.session.row.action`),\n * its leading and trailing decorations, and its hover-card section.\n * @param props.onReveal - scroll this row into view after search navigation, then acknowledge it.\n * @param props.drag - optional row-drag target wiring; blank rows, and rows whose access excludes\n * `workspace/insertSessionBefore`, cannot start a drag.\n * @param props.home - host account home for POSIX hover-path abbreviation.\n * @param props.useSessionAccess - the browser root's Session access Hook; the title double-click\n * renames only while it allows `session/rename`.\n * @param props.t - the browser root's locale seat.\n * @returns the session row.\n */\nexport function SessionNodeItem({\n node, currentId, now, onOpen, onRenameRequest, renderSlot, renderFactorySlot, useContextMenuTarget,\n useContextMenu, onReveal, drag, home, useSessionAccess, t,\n}: {\n useContextMenu: WorkspaceBrowserProps['useContextMenu']\n renderFactorySlot: WorkspaceBrowserProps['renderFactorySlot']\n useContextMenuTarget: WorkspaceBrowserProps['useContextMenuTarget']\n node: SessionNode\n currentId: string | undefined\n now: number\n onOpen: (id: SessionNode['id']) => void\n /** Open the rename dialog from a title double-click (id + current title); see the function JSDoc for the press precondition. */\n onRenameRequest: (id: SessionNode['id'], currentTitle: string) => void\n /** Scroll this row into view after search navigation, then acknowledge it. */\n onReveal?: (() => void) | undefined\n /** Present on reorderable-list rows so every row can remain a drop target. */\n drag?: RowDragProps | undefined\n /** Host account home; POSIX home-rooted hover paths display as `~`. */\n home?: string | undefined\n t: RowTranslate\n} & Pick<WorkspaceBrowserProps, 'useSessionAccess'> & PropsRenderSlots<\n | 'sidebar.workspaces.session.row.action'\n | 'sidebar.session.row.trailing'\n | 'sidebar.session.row.leading'\n | 'sidebar.session.row.hover'\n>) {\n const { getTriggerProps } = useContextMenu()\n const row = node\n const title = displayTitle(node, t)\n const selected = node.id === currentId\n const statuses = sessionStatuses(node, t)\n const primaryStatus = statuses[0]\n const showStatus = primaryStatus.state !== 'idle'\n // Archived rows hold their in-place grayed slot, so manual reorder cannot\n // move them. Pinned rows drag within the pinned block: the browser gates\n // their drop targets to fellow pinned rows.\n const renamable = useSessionAccess(node.id, 'session/rename')\n const reorderable = useSessionAccess(node.id, 'workspace/insertSessionBefore')\n const draggable = drag !== undefined && reorderable && !row.blank && !row.archived\n const menuOpen = useContextMenuTarget(target => target?.kind === 'session' && target.value.sessionId === node.id)\n const dragPreview = useRowDragPreview(css.dragPreview as string, DRAG_PREVIEW_PROPERTIES)\n const rowRef = useRef<HTMLDivElement>(null)\n const titleRef = useRef<HTMLSpanElement>(null)\n // On macOS the click that activates the window is not delivered, but the\n // next click arrives with detail 2 and fires dblclick, so rename requires a\n // detail-1 press on this title since the window last lost focus.\n const renameArmed = useRef(false)\n const disarmRename = useRef(() => { renameArmed.current = false }).current\n const marquee = useTitleMarquee(titleRef)\n useEffect(() => {\n if (menuOpen || rowRef.current?.matches(':hover')) marquee.enter()\n else marquee.leave()\n }, [menuOpen, marquee])\n useEffect(() => {\n if (onReveal === undefined) return\n rowRef.current?.scrollIntoView({ block: 'nearest' })\n onReveal()\n }, [onReveal])\n const ownRow = (\n <div\n ref={rowRef}\n data-row-key={`session:${node.id}`}\n className={clsx(\n css.sessionRow, selected && css.selected, menuOpen && css.menuOpen,\n row.archived && css.archived,\n drag?.marker === 'before' && css.dropBefore, drag?.marker === 'after' && css.dropAfter,\n )}\n role=\"treeitem\"\n aria-selected={selected}\n aria-description={row.archived ? t('toast.archivedNotOpenable') : undefined}\n tabIndex={0}\n\n onClick={() => { onOpen(node.id) }}\n {...getTriggerProps(row.blank ? undefined : { kind: 'session', value: { sessionId: node.id, displayTitle: row.title } }, { onKeyDown: (event) => {\n if (event.target !== event.currentTarget || (event.key !== 'Enter' && event.key !== ' ')) return\n if (event.altKey || event.ctrlKey || event.metaKey || event.shiftKey) return\n event.preventDefault()\n onOpen(node.id)\n } })}\n onPointerEnter={marquee.enter}\n onPointerLeave={() => { if (!menuOpen) marquee.leave() }}\n draggable={draggable}\n onDragStart={!draggable\n ? undefined\n : (e) => {\n e.dataTransfer.effectAllowed = 'move'\n e.dataTransfer.setData('text/plain', node.id)\n drag.start()\n dragPreview.start(e)\n }}\n onDragEnd={() => { if (dragPreview.clear()) drag?.end() }}\n onDragOver={drag === undefined\n ? undefined\n : (e) => {\n if (!drag.active) return\n e.preventDefault()\n e.dataTransfer.dropEffect = 'move'\n drag.hover(rowHalf(e))\n }}\n onDrop={drag === undefined\n ? undefined\n : (e) => {\n if (!drag.active) return\n e.preventDefault()\n drag.drop(rowHalf(e))\n }}\n >\n {/* Pending interaction and own or descendant activity outrank the\n finished-but-unviewed reminder, which returns after activity stops\n and is cleared by opening the session. Archived rows keep the slot\n blank — the grayed row carries the archived look — and their live\n status stays on the hover card only. */}\n <span className={css.slot}>\n {!row.archived && !row.blank && (showStatus\n ? <SessionStatusDots statuses={statuses} />\n : renderSlot('sidebar.session.row.leading', { sessionId: node.id }))}\n </span>\n <span\n ref={titleRef}\n className={css.title}\n onMouseDown={(e) => {\n if (e.detail !== 1) return\n renameArmed.current = true\n // One shared function and options: repeated presses add one listener.\n window.addEventListener('blur', disarmRename, { once: true })\n }}\n onDoubleClick={row.blank || !renamable\n ? undefined\n : (e) => {\n e.stopPropagation()\n if (!renameArmed.current) return\n renameArmed.current = false\n onRenameRequest(node.id, row.title)\n }}\n >\n {title}\n </span>\n {/* Blank rows have no first prompt, so neither trailing details nor\n actions for existing content are available. */}\n {!row.blank && (\n <span className={css.rowResting}>\n <span\n className={clsx(css.time, primaryStatus.trailingLabel === undefined && css.timestamp)}\n aria-hidden={primaryStatus.trailingLabel === undefined ? undefined : true}\n >\n {primaryStatus.trailingLabel ?? timeLabel(row.updatedAt, now, t)}\n </span>\n {renderSlot('sidebar.session.row.trailing', { sessionId: node.id })}\n {row.pinned && !row.archived && <PinnedIndicator t={t} />}\n </span>\n )}\n {/* The strip's clicks stay in the strip: the trigger and every\n row.action entry act without also opening the row, so an entry's\n button needs no propagation handling of its own. */}\n {!row.blank && (\n <span className={css.rowActions} onClick={(e) => { e.stopPropagation() }}>\n {renderFactorySlot('contextMenu.button', {\n target: { kind: 'session', value: { sessionId: node.id, displayTitle: row.title } },\n label: t('actions.session.aria', { name: title }),\n className: css.iconButton,\n })}\n <span className={css.rowQuickActions}>\n {renderSlot('sidebar.workspaces.session.row.action', { sessionId: node.id, displayTitle: row.title })}\n </span>\n </span>\n )}\n </div>\n )\n return (\n <HoverCard\n anchor={ownRow}\n content={<SessionHoverContent\n node={node}\n cwd={row.cwd === undefined ? undefined : abbreviateHomePath(row.cwd, home)}\n now={now}\n renderSlot={renderSlot}\n t={t}\n />}\n openDelayMs={800}\n grouped\n disabled={menuOpen || drag?.active === true}\n copyText={row.blank || row.title === '' ? undefined : row.title}\n copyLabel={t('copy')}\n copiedLabel={t('hover.copied')}\n />\n )\n}\n","/** Path suffixes that tell same-titled Workspaces apart. */\n\n/**\n * Map each Workspace whose display title another listed Workspace shares to\n * the shortest run of trailing path segments that no other same-titled\n * Workspace's path ends with, keeping the path's own separators. Workspaces\n * with a unique title get no entry.\n * @param workspaces - id, display title, and canonical path of each listed Workspace.\n * @returns distinguishing suffix by Workspace id.\n */\nexport function distinguishingPathSuffixes<Id>(\n workspaces: readonly { readonly id: Id; readonly title: string; readonly path: string }[],\n): ReadonlyMap<Id, string> {\n // Segments and the separators between them alternate: `/a/b` → ['', '/', 'a', '/', 'b'].\n const rows = workspaces.map(workspace => ({ ...workspace, parts: workspace.path.split(/([\\\\/])/) }))\n const suffix = (parts: readonly string[], count: number): string => parts.slice(-(2 * count - 1)).join('')\n const suffixes = new Map<Id, string>()\n for (const row of rows) {\n const peers = rows.filter(other => other !== row && other.title === row.title)\n if (peers.length === 0) continue\n let count = 1\n // A root path (`/`, `C:\\`) ends in an empty segment; grow past it.\n while (2 * count - 1 < row.parts.length && (suffix(row.parts, count) === '' || peers.some(peer => suffix(peer.parts, count) === suffix(row.parts, count)))) count++\n suffixes.set(row.id, suffix(row.parts, count))\n }\n return suffixes\n}\n","/**\n * Workspace pick/add flow. WorkspacePickFlow is the reusable core (menu +\n * path error dialog) consumed directly by WorkspaceBrowser (same package) and\n * wrapped by WorkspacePicker for the conversation empty-state slot\n * registration. Directory picking itself lives in the composed flow package's\n * slot occupant (see the contract module doc): this core only opens the flow,\n * adopts the picked path, and owns the error surface. Adding a workspace has\n * exactly one route — pick a host directory, new or existing — because the\n * occupant's own create-folder affordance already covers creating one.\n */\nimport type { ReactNode, RefObject } from 'react'\nimport { useCallback, useEffect, useMemo, useRef, useState } from 'react'\nimport {\n Button, IconFolderCloseRegular, IconPlusOutlineRegular, Menu, Modal, type MenuEntry,\n} from '@deepseek-ai/dsh-client-ui-primitives'\nimport type {\n WorkspaceId, WorkspaceSnapshot, WorkspaceView,\n} from '@deepseek-ai/dsh-api-workspace-controller/client'\nimport { workspaceDisplayTitle } from '@deepseek-ai/dsh-api-workspace-controller/default-workspace'\nimport type { SnapshotSelectorHook } from '@deepseek-ai/dsh-client-ui-slots'\nimport type { DirectoryFlowOwnerProps, WorkspacePickerProps } from './contract/slots.ts'\nimport { distinguishingPathSuffixes } from './path-suffix.ts'\nimport css from './WorkspacePicker.module.css'\n\nconst ADD_WORKSPACE = '::add-workspace'\n\n/** Core flow props: the owner supplies popover control and pick semantics. */\nexport interface WorkspacePickFlowProps {\n /** The standard locale seat, forwarded by whichever slot entry hosts the flow. */\n t: WorkspacePickerProps['t']\n /** Popover visibility (anchor button toggle state, owner-local). */\n open: boolean\n /** The anchor button element — the popover's placement anchor. */\n anchorRef?: RefObject<HTMLElement | null> | undefined\n /** Selector hook over the workspace list (framework standard hook). */\n useWorkspaces: <S>(selector: (state: WorkspaceSnapshot) => S) => S\n /** Adopt a picked host directory as a real Workspace. */\n createWorkspace: (input: { path: string }) => Promise<WorkspaceView>\n /** Bound occupancy selector hook for this surface's directory-flow hole (empty leaves the surface with no add action). */\n useDirectoryFlow: SnapshotSelectorHook<boolean>\n /** Render this surface's directory-flow hole with the owner conversation (the entry's narrowed renderSlot). */\n renderDirectoryFlow: (owner: DirectoryFlowOwnerProps) => ReactNode\n /** A real Workspace was picked or created. */\n onPick: (workspaceId: WorkspaceId) => void\n /** Close the popover (outside click / Escape / post-pick). */\n onClose: () => void\n /** Report the picking interaction and adoption occupancy. */\n onBusyChange?: (busy: boolean) => void\n /** Only offer the add action, hide existing workspaces. */\n addOnly?: boolean\n /** Menu opening direction relative to the anchor. */\n side?: 'bottom' | 'top' | 'right'\n /** Currently active workspace (trailing check in the picker list). */\n selectedId?: WorkspaceId | undefined\n}\n\n/**\n * Render the pick menu plus the adoption error dialog.\n * @param props - owner-controlled flow props.\n * @returns menu + dialog elements.\n */\nexport function WorkspacePickFlow({\n t,\n open,\n anchorRef,\n useWorkspaces,\n createWorkspace,\n useDirectoryFlow,\n renderDirectoryFlow,\n onPick,\n onClose,\n addOnly = false,\n onBusyChange,\n side = 'bottom',\n selectedId,\n}: WorkspacePickFlowProps) {\n // Without an owner-provided anchor, the menu remains hidden.\n const absentAnchor = useRef<HTMLElement>(null)\n const workspaceSnapshot = useWorkspaces(state => state)\n const workspaces = workspaceSnapshot.items\n const [errorOpen, setErrorOpen] = useState(false)\n const [modalError, setModalError] = useState<string | null>(null)\n const [flowOpen, setFlowOpen] = useState(false)\n const [pickingFolder, setPickingFolder] = useState(false)\n // One picking interaction at a time: while the flow is open (native chooser\n // pending, browse dialog up) or its pick is being adopted, every other\n // menu action stays disabled — a late outcome must not race a concurrent\n // selection or adoption.\n const flowBusy = flowOpen || pickingFolder\n useEffect(() => { onBusyChange?.(flowBusy) }, [flowBusy, onBusyChange])\n\n // The occupied hole gates the picking affordance: with no composed flow the\n // entry simply is not there (the seam's documented no-flow default). The\n // framework-bound hook keeps occupancy live: flow plugins activate (and\n // HMR-reload) independently of this menu's renders.\n const flowAvailable = useDirectoryFlow(occupied => occupied)\n // An occupant that unloads mid-interaction leaves nobody to cancel: an\n // open flow over an empty hole withdraws so the menu actions come back.\n // flowOpen is a dependency because the flow can also OPEN over an already\n // empty hole (Choose again after the occupant unloaded with the error\n // dialog up) — that transition must snap back too, not just occupancy loss.\n useEffect(() => {\n if (flowOpen && !flowAvailable) setFlowOpen(false)\n }, [flowOpen, flowAvailable])\n const addEntries: MenuEntry[] = flowAvailable\n ? [{ id: ADD_WORKSPACE, label: t('menu.addWorkspace'), icon: <IconPlusOutlineRegular size={16} />, disabled: flowBusy }]\n : []\n // With workspaces listed, the add action pins below the scroll region\n // (divider + always visible); otherwise it IS the menu.\n const pinAdd = !addOnly && workspaces.length > 0\n // The resolved name, not `t`, is the memo dependency: the bound seat keeps\n // its identity across a language switch.\n const defaultWorkspaceName = t('workspace.defaultName')\n const listed = useMemo(() => {\n if (!pinAdd) return []\n const rows = workspaces.map(workspace => ({\n id: workspace.workspaceId,\n title: workspaceDisplayTitle(workspace.title, defaultWorkspaceName),\n path: workspace.path,\n }))\n const suffixes = distinguishingPathSuffixes(rows)\n return rows.map(row => ({ ...row, suffix: suffixes.get(row.id) }))\n }, [pinAdd, workspaces, defaultWorkspaceName])\n const items: MenuEntry[] = pinAdd\n ? listed.map(({ id, title, path, suffix }) => ({\n id,\n // The title gives way first, so the suffix that tells the rows apart\n // stays visible; the native tooltip carries the full path.\n label: suffix === undefined\n ? title\n : (\n <span className={css.disambiguated} title={path}>\n <span className={css.title}>{title}</span>\n {' '}\n <span className={css.pathSuffix}>{suffix}</span>\n </span>\n ),\n icon: <IconFolderCloseRegular size={16} />,\n disabled: flowBusy,\n }))\n : addEntries\n // Nothing listed and nothing to add with (a composition that mounts this\n // package without any directory-picker): an empty popover would claim a\n // choice that does not exist, so the anchor gesture shows nothing at all.\n const menuIsEmpty = items.length === 0\n\n const closeModal = (): void => {\n setErrorOpen(false)\n setModalError(null)\n }\n\n /** Adopt a picked directory; failures land in the folder-error dialog (Choose again reopens the flow). */\n const adoptDirectory = (path: string): Promise<void> =>\n createWorkspace({ path }).then((workspace) => {\n setFlowOpen(false)\n onPick(workspace.workspaceId)\n }).catch((reason: unknown) => {\n setModalError(reason instanceof Error ? reason.message : String(reason))\n setFlowOpen(false)\n setErrorOpen(true)\n })\n\n const openDirectoryFlow = useCallback((): void => {\n onClose()\n setErrorOpen(false)\n setModalError(null)\n setFlowOpen(true)\n }, [onClose])\n\n // A menu exists to disambiguate between targets. With no workspaces listed\n // and the add action the only entry left, the anchor gesture IS that action:\n // a one-row popover would cost a click and offer nothing to choose between.\n // The owner's open request is consumed the same way selecting the entry\n // would consume it (close the popover, raise the flow). An empty list is\n // only final once the baseline lands — until then the menu stays up with its\n // loading status instead of jumping into a flow the arriving list would have\n // made unnecessary; the add-only surface lists nothing and never waits.\n const listSettled = addOnly || workspaceSnapshot.phase === 'ready'\n const addIsTheOnlyEntry = !pinAdd && listSettled && addEntries.length === 1\n // `flowBusy` gates this exactly as it disables the equivalent menu entry: a\n // pick still being adopted owns the surface until it settles.\n useEffect(() => {\n if (open && addIsTheOnlyEntry && !flowBusy) openDirectoryFlow()\n }, [open, addIsTheOnlyEntry, flowBusy, openDirectoryFlow])\n\n /** Owner side of the flow conversation: adopt keeps the flow open (busy) until the Host answers. */\n const flowOwner: DirectoryFlowOwnerProps = {\n open: flowOpen,\n busy: pickingFolder,\n onPicked: (path) => {\n setPickingFolder(true)\n void adoptDirectory(path).finally(() => { setPickingFolder(false) })\n },\n onCancel: () => { setFlowOpen(false) },\n onError: (message) => {\n setFlowOpen(false)\n setModalError(message)\n setErrorOpen(true)\n },\n }\n\n const handleSelect = (id: string): void => {\n if (id === ADD_WORKSPACE) {\n openDirectoryFlow()\n return\n }\n onPick(id as WorkspaceId)\n }\n\n return (\n <>\n <Menu\n open={open && !addIsTheOnlyEntry && !menuIsEmpty}\n anchor={null}\n items={items}\n {...pinAdd ? { footer: addEntries } : {}}\n selectedId={selectedId}\n onSelect={handleSelect}\n onClose={onClose}\n side={side}\n portal\n anchorRef={anchorRef ?? absentAnchor}\n />\n {open && !addIsTheOnlyEntry && !menuIsEmpty && workspaceSnapshot.phase === 'pending' && <div className={css.menuStatus} role=\"status\">{t('picker.loading')}</div>}\n {renderDirectoryFlow(flowOwner)}\n <Modal\n open={errorOpen}\n onClose={closeModal}\n closeLabel={t('close')}\n title={t('folderError.title')}\n footer={(\n <>\n <Button variant=\"outline\" className={css.modalAction} onClick={closeModal}>{t('cancel')}</Button>\n {/* Retrying needs an occupant to serve the flow; without one the\n * button would open a flow nobody can answer or cancel. */}\n <Button variant=\"primary\" className={css.modalAction} disabled={!flowAvailable} onClick={openDirectoryFlow}>{t('folderError.retry')}</Button>\n </>\n )}\n >\n <div className={css.modalError} role=\"alert\">{modalError}</div>\n </Modal>\n </>\n )\n}\n\n/**\n * The conversation empty-state registration: adapts the owner share to the\n * core flow (all state and semantics live in the flow / the owner).\n * @param props - empty-state slot props (owner share + injected creation callback).\n * @returns the flow element.\n */\nexport function WorkspacePicker({\n open,\n anchorRef,\n useWorkspaces,\n selectedId,\n onPick,\n onClose,\n createWorkspace,\n useDirectoryFlow,\n renderSlot,\n t,\n}: WorkspacePickerProps) {\n return (\n <WorkspacePickFlow\n t={t}\n open={open}\n anchorRef={anchorRef}\n useWorkspaces={useWorkspaces}\n createWorkspace={createWorkspace}\n useDirectoryFlow={useDirectoryFlow}\n renderDirectoryFlow={owner => renderSlot('conversation.hero.workspace.directoryFlow', owner)}\n selectedId={selectedId}\n onPick={onPick}\n onClose={onClose}\n />\n )\n}\n","/**\n * The In work region at the top of the browsing list: two independent, collapsible\n * groups — running Sessions and unread or pinned-idle Sessions — folded from state\n * other plugins already own. Each group header carries its own count; the region\n * draws no header of its own and renders nothing while both groups are empty.\n *\n * The region renders no state of its own beyond the two fold choices: opening a row\n * goes through the Workspace owner's guarded open (the same call the tree rows\n * make), which selects the Session as the main view and lets ui-session clear its\n * unread flag; releasing a pin is the same Host call the sidebar's row action\n * issues, behind the same access gate.\n */\nimport { type ReactNode, useMemo, useState } from 'react'\nimport {\n IconChevronDownOutlineRegular, IconChevronRightOutlineRegular, IconPinOutlineRegular, StateDot,\n} from '@deepseek-ai/dsh-client-ui-primitives'\nimport type { StateDotState } from '@deepseek-ai/dsh-client-ui-primitives'\nimport type { PropsLocale, SnapshotSelectorHook } from '@deepseek-ai/dsh-client-ui-slots'\nimport type { SessionId } from '@deepseek-ai/dsh-session/types'\nimport type { WorkspaceBrowserProps } from '../contract/slots.ts'\nimport type { AttentionModel, AttentionRow } from './model.ts'\nimport css from './AttentionSection.module.css'\n\n/** Props the browsing region hands down; every member is already bound to its source. */\nexport interface AttentionSectionProps {\n /** The current model, bound to the plugin's store during render. */\n readonly useAttention: SnapshotSelectorHook<AttentionModel>\n /** The row actions' access hook: the pin toggle is offered only where it is allowed. */\n readonly useSessionAccess: WorkspaceBrowserProps['useSessionAccess']\n /** Show one Session as the main view (also clears its unread flag in ui-session). */\n readonly open: (id: SessionId) => void\n /** Release one Session's pin, which is the only reason its row is listed. */\n readonly unpin: (id: SessionId) => void\n readonly t: PropsLocale<'workspace'>['t']\n}\n\ntype Group = 'running' | 'unread'\n\n/**\n * The dot one row draws, or none. A container row stands for work below it, so it\n * carries no state of its own; a turn blocked on the user outranks the group's own\n * state; a running row spins and an unread row is done.\n */\nfunction dotStateOf(group: Group, row: AttentionRow, waiting: ReadonlySet<SessionId>): StateDotState | undefined {\n if (row.container === true) return undefined\n if (waiting.has(row.id)) return 'warning'\n return group === 'running' ? 'ongoing' : 'done'\n}\n\n/**\n * The release control for one pinned row, rendered only where the Session's\n * access snapshot allows the toggle — the same gate the row's pin button uses, so\n * a refused Session never shows a button that can only fail.\n * @param props - the Session, the Host action, the label, and the access Hook.\n * @returns the button, or null when the toggle is not allowed here.\n */\nfunction UnpinControl({ sessionId, unpin, label, useSessionAccess }: {\n readonly sessionId: SessionId\n readonly unpin: (id: SessionId) => void\n readonly label: string\n readonly useSessionAccess: WorkspaceBrowserProps['useSessionAccess']\n}): ReactNode {\n const allowed = useSessionAccess(sessionId, 'workspace/unpinSession')\n if (!allowed) return null\n return (\n <button\n type=\"button\"\n className={css.unpin}\n title={label}\n aria-label={label}\n onClick={() => { unpin(sessionId) }}\n >\n <IconPinOutlineRegular size={12} />\n </button>\n )\n}\n\n/**\n * Rows of one group, nested one level per delegation hop.\n * @param props - the rows, the group they belong to, and the callbacks they need.\n * @returns the group's list.\n */\nfunction Rows({ rows, group, waiting, open, unpin, label, unpinLabel, useSessionAccess }: {\n readonly rows: readonly AttentionRow[]\n readonly group: Group\n readonly waiting: ReadonlySet<SessionId>\n readonly open: (id: SessionId) => void\n readonly unpin: (id: SessionId) => void\n readonly label: (title: string, pinned: boolean) => string\n readonly unpinLabel: string\n readonly useSessionAccess: WorkspaceBrowserProps['useSessionAccess']\n}): ReactNode {\n return (\n <ul className={css.list}>\n {rows.map(row => {\n const dot = dotStateOf(group, row, waiting)\n return (\n <li key={row.id} className={css.item}>\n <div className={css.rowWrap}>\n <button\n type=\"button\"\n className={css.row}\n aria-label={label(row.title, row.pinned === true)}\n onClick={() => { open(row.id) }}\n >\n {dot !== undefined && (\n <span className={css.dot}>\n <StateDot state={dot} size={10} />\n </span>\n )}\n <span className={css.title}>{row.title}</span>\n </button>\n {row.pinned === true && (\n <UnpinControl\n sessionId={row.id}\n unpin={unpin}\n label={unpinLabel}\n useSessionAccess={useSessionAccess}\n />\n )}\n </div>\n {row.children !== undefined && (\n <div className={css.children}>\n <Rows\n rows={row.children}\n group={group}\n waiting={waiting}\n open={open}\n unpin={unpin}\n label={label}\n unpinLabel={unpinLabel}\n useSessionAccess={useSessionAccess}\n />\n </div>\n )}\n </li>\n )\n })}\n </ul>\n )\n}\n\n/**\n * One independent fold: a group header with its visible count, and its rows when\n * expanded. The count is part of the button's visible text, so it also names the\n * count to a screen reader.\n */\nfunction GroupCollapse({ title, count, children }: {\n readonly title: string\n readonly count: number\n readonly children: ReactNode\n}): ReactNode {\n const [expanded, setExpanded] = useState(true)\n return (\n <section className={css.group}>\n <button\n type=\"button\"\n className={css.groupHeader}\n aria-expanded={expanded}\n onClick={() => { setExpanded(current => !current) }}\n >\n <span className={css.chevron} aria-hidden=\"true\">\n {expanded ? <IconChevronDownOutlineRegular size={12} /> : <IconChevronRightOutlineRegular size={12} />}\n </span>\n <span className={css.groupLabel}>{title}</span>\n {' '}\n <span className={css.groupCount}>{count}</span>\n </button>\n {expanded && <div className={css.groupBody}>{children}</div>}\n </section>\n )\n}\n\n/**\n * The In work region: the two group folds that have entries, and nothing at all\n * while both are empty.\n * @param props - the model hook, the access hook, the two Host actions, and the locale seat.\n * @returns the region's folds, or null when neither group lists a Session.\n */\nexport function AttentionSection({ useAttention, useSessionAccess, open, unpin, t }: AttentionSectionProps): ReactNode {\n const model = useAttention(current => current)\n const waiting = useMemo(() => new Set<SessionId>(model.waiting.map(row => row.id)), [model])\n // The label names the row's own action only; the release control beside it\n // carries the pin's own name.\n const label = (title: string, pinned: boolean): string =>\n pinned ? t('attention.row.openPinned', { title }) : t('attention.row.open', { title })\n if (model.running.length === 0 && model.unread.length === 0) return null\n return (\n <section className={css.section} data-attention-section=\"\">\n {model.running.length > 0 && (\n <GroupCollapse title={t('attention.section.running')} count={model.running.length}>\n <Rows\n rows={model.running}\n group=\"running\"\n waiting={waiting}\n open={open}\n unpin={unpin}\n label={label}\n unpinLabel={t('attention.row.unpin')}\n useSessionAccess={useSessionAccess}\n />\n </GroupCollapse>\n )}\n {model.unread.length > 0 && (\n <GroupCollapse title={t('attention.section.unread')} count={model.unread.length}>\n <Rows\n rows={model.unread}\n group=\"unread\"\n waiting={waiting}\n open={open}\n unpin={unpin}\n label={label}\n unpinLabel={t('attention.row.unpin')}\n useSessionAccess={useSessionAccess}\n />\n </GroupCollapse>\n )}\n </section>\n )\n}\n","/**\n * The workspace/session browsing region filling the sidebar shell's\n * `sidebar.workspaces` hole: section header (title + view options + add\n * workspace), search, the grouped tree or flat list, and the workspace\n * dialogs. Wide state renders the full browser; rail state renders the two\n * region icons (search / add workspace) as 36px controls on the shell's shared\n * rail entry path, each requesting expansion through the owner share. Adding\n * is the header button's one action, so it raises the directory flow with no\n * menu in between; the flow and its error dialog live in WorkspacePicker\n * (same package — direct composition, no slot between them). A Session row's\n * \"...\" menu and hover buttons are the `sidebar.workspaces.session.menu.item`\n * and `sidebar.workspaces.session.row.action` lists rendered through this\n * entry's `renderSlot`; the actions in them, this package's own included,\n * are slot entries with their own behavior, so this component threads no\n * action callbacks and hosts no action surface.\n */\nimport { type CSSProperties, type ReactNode, useCallback, useEffect, useMemo, useRef, useState } from 'react'\nimport clsx from 'clsx'\nimport { WorkspaceDialogs } from './WorkspaceDialogs.tsx'\nimport {\n AnimatedRows, HoverCardGroup, IconArchiveCheckOutlineRegular, IconArchiveOffOutlineRegular, IconArchiveOutlineRegular,\n IconChevronsUpDownOutlineRegular, IconClockOutlineRegular, IconCloseFillRegular,\n IconFlatListOutlineRegular, IconFolderCloseRegular, IconProjectAddOutlineRegular,\n IconQueueOutlineRegular, IconSearchOutlineRegular, IconSlidersTwoOutlineRegular,\n IconWorkspaceTreeOutlineRegular, Menu, Tooltip,\n} from '@deepseek-ai/dsh-client-ui-primitives'\nimport type {\n SessionListState, SessionSearchResultItem,\n} from '@deepseek-ai/dsh-api-session-controller/client'\nimport type { WorkspaceId, WorkspaceView } from '@deepseek-ai/dsh-api-workspace-controller/client'\nimport { workspaceDisplayTitle } from '@deepseek-ai/dsh-api-workspace-controller/default-workspace'\nimport type { SessionId } from '@deepseek-ai/dsh-session/types'\nimport type { PropsRenderSlots } from '@deepseek-ai/dsh-client-ui-slots'\nimport type { WorkspaceBrowserProps } from '../contract/slots.ts'\nimport type { ArchivedFilter, GroupNode, SessionNode, SessionOrderBy, SessionRowState } from '../tree.ts'\nimport {\n deriveFlat, deriveGroups, deriveSearchResults, orderByRecency, owningGroupKey, owningParentFolder,\n pinCurrentBlank, reconcileManualOrder, sessionMemberIds, UNGROUPED_KEY,\n} from '../tree.ts'\nimport { ProjectRowItem, SearchResultItem, SessionNodeItem } from './Rows.tsx'\nimport { FLAT_SESSION_ORDER_KEY, type SessionGroupBy } from '../stores.ts'\nimport { WorkspacePickFlow } from '../WorkspacePicker.tsx'\nimport { AttentionSection } from '../attention/AttentionSection.tsx'\nimport css from './WorkspaceBrowser.module.css'\n\n/**\n * Column slide length (--ds-transition-duration-slow): rail-search focus waits it out —\n * focus() forces a synchronous layout and would jank the slide.\n */\nconst EXPAND_SLIDE_MS = 300\n/** Pause between the latest keystroke and a Host content-search request. */\nconst SEARCH_DEBOUNCE_MS = 250\n/** `session.search` wire bound, measured in JavaScript UTF-16 code units. */\nconst SEARCH_QUERY_MAX_CODE_UNITS = 500\n/** Non-blank Session rows visible per Workspace while no Session raises its watermark. */\nconst SESSION_WATERMARK_BASE = 5\n/** Highest watermark that attention-bearing Sessions raise automatically; Show more and search reveals may exceed it. */\nconst SESSION_WATERMARK_AUTO_MAX = 50\n\n/** Show the blank row plus the first `watermark` non-blank rows, in list order. */\nfunction watermarkRows(sessions: readonly SessionNode[], watermark: number): {\n rows: readonly SessionNode[]\n hiddenCount: number\n} {\n let count = 0\n const rows = sessions.filter((session) => {\n if (session.blank) return true\n count += 1\n return count <= watermark\n })\n return { rows, hiddenCount: sessions.length - rows.length }\n}\n\n/**\n * Smallest watermark that covers every non-blank row within the automatic maximum that is running, has a running\n * child, awaits the user, carries an unread completion, or is current, and the reveal target at any position.\n */\nfunction requiredWatermark(\n sessions: readonly SessionNode[],\n current: SessionId | undefined,\n revealSessionId: SessionId | undefined,\n): number {\n let index = 0\n let required = 0\n for (const session of sessions) {\n if (session.blank) continue\n index += 1\n const attention = index <= SESSION_WATERMARK_AUTO_MAX && (\n session.running || session.runningSubagentCount > 0 || session.pendingInteraction !== undefined\n || session.completed || session.id === current\n )\n if (attention || session.id === revealSessionId) required = index\n }\n return required\n}\n\n/** Raise each listed group's watermark to its requirement; returns `marks` itself when nothing rises. */\nfunction raiseWatermarks(\n marks: Readonly<Record<string, number>>,\n required: ReadonlyMap<string, number>,\n): Readonly<Record<string, number>> {\n let raised = marks\n for (const [key, watermark] of required) {\n if (watermark > (raised[key] ?? SESSION_WATERMARK_BASE)) raised = { ...raised, [key]: watermark }\n }\n return raised\n}\n\n/** Keep controlled input and RPC payload inside the session.search wire contract. */\nfunction sanitizeSearchQuery(value: string): string {\n const withoutNul = value.replaceAll('\\0', '')\n if (withoutNul.length <= SEARCH_QUERY_MAX_CODE_UNITS) return withoutNul\n let end = SEARCH_QUERY_MAX_CODE_UNITS\n const last = withoutNul.charCodeAt(end - 1)\n const next = withoutNul.charCodeAt(end)\n if (last >= 0xD800 && last <= 0xDBFF && next >= 0xDC00 && next <= 0xDFFF) end--\n return withoutNul.slice(0, end)\n}\n\n/**\n * Accept the native drag at document level while a row drag is active: row\n * hover still owns the insertion marker, and releasing outside the list must\n * not be rendered as a rejected drop before dragend commits that last marker.\n */\nfunction useNativeDragAcceptance(active: boolean): void {\n useEffect(() => {\n if (!active) return\n const acceptDrag = (event: DragEvent): void => {\n event.preventDefault()\n if (event.dataTransfer !== null) event.dataTransfer.dropEffect = 'move'\n }\n const acceptDrop = (event: DragEvent): void => { event.preventDefault() }\n document.addEventListener('dragover', acceptDrag)\n document.addEventListener('drop', acceptDrop)\n return () => {\n document.removeEventListener('dragover', acceptDrag)\n document.removeEventListener('drop', acceptDrop)\n }\n }, [active])\n}\n\n/** Grouping, ordering, and archived-filter menu; own open state so it resets with the wide chrome. */\nfunction ViewOptionsMenu({ groupBy, orderBy, archivedFilter, onGroupPick, onOrderPick, onArchivedFilterPick, t }: {\n groupBy: SessionGroupBy\n orderBy: SessionOrderBy\n archivedFilter: ArchivedFilter\n onGroupPick: (mode: SessionGroupBy) => void\n onOrderPick: (mode: SessionOrderBy) => void\n onArchivedFilterPick: (filter: ArchivedFilter) => void\n t: WorkspaceBrowserProps['t']\n}) {\n const [open, setOpen] = useState(false)\n return (\n <Menu\n open={open}\n onClose={() => { setOpen(false) }}\n items={[\n { type: 'label' as const, id: 'group-by', text: t('groupBy.label') },\n { id: 'workspace', label: t('groupBy.workspace'), icon: <IconFolderCloseRegular /> },\n { id: 'workspace-tree', label: t('groupBy.workspaceTree'), icon: <IconWorkspaceTreeOutlineRegular /> },\n { id: 'flat', label: t('groupBy.flat'), icon: <IconFlatListOutlineRegular /> },\n { type: 'separator' as const, id: 'order-by-separator' },\n { type: 'label' as const, id: 'order-by', text: t('orderBy.label') },\n { id: 'manual', label: t('orderBy.manual'), icon: <IconChevronsUpDownOutlineRegular /> },\n { id: 'updated', label: t('orderBy.updated'), icon: <IconClockOutlineRegular /> },\n { type: 'separator' as const, id: 'archived-filter-separator' },\n { type: 'label' as const, id: 'filter-by', text: t('filterBy.label') },\n { id: 'hide-archived', label: t('viewOptions.hideArchived'), icon: <IconArchiveOffOutlineRegular /> },\n { id: 'show-archived', label: t('viewOptions.showArchived'), icon: <IconQueueOutlineRegular /> },\n { id: 'only-archived', label: t('viewOptions.onlyArchived'), icon: <IconArchiveCheckOutlineRegular /> },\n ]}\n selectedIds={[\n groupBy,\n orderBy,\n { default: 'hide-archived', show: 'show-archived', only: 'only-archived' }[archivedFilter],\n ]}\n onSelect={(id) => {\n if (id === 'workspace' || id === 'workspace-tree' || id === 'flat') onGroupPick(id)\n else if (id === 'manual' || id === 'updated') onOrderPick(id)\n else if (id === 'hide-archived') onArchivedFilterPick('default')\n else if (id === 'show-archived') onArchivedFilterPick('show')\n else if (id === 'only-archived') onArchivedFilterPick('only')\n setOpen(false)\n }}\n align=\"end\"\n dense\n listClassName={css.viewOptionsMenu}\n // Portal: the section header clips overflow, so an in-place list would\n // be cut off at the header's bounds.\n portal\n anchor={(\n <Tooltip label={t('viewOptions.label')} side=\"bottom\" delayMs={500} portal>\n <button\n type=\"button\"\n className={clsx(css.iconButton, css.wide)}\n aria-label={t('viewOptions.label')}\n onClick={() => { setOpen(v => !v) }}\n >\n <IconSlidersTwoOutlineRegular />\n </button>\n </Tooltip>\n )}\n />\n )\n}\n\n/** In-flight root-row drag: source identity plus the current insert marker. */\ninterface DragState {\n /** Workspace id, or {@link UNGROUPED_KEY} for the browser-local loose-session account. */\n accountKey: string\n sessionId: SessionNode['id']\n /** Source row was pinned at drag start; drop targets share the pinned block. */\n pinned: boolean\n /** Row the marker sits on and which half (insert above/below it). */\n over: { id: SessionNode['id']; half: 'before' | 'after' } | null\n}\n\n/** Apply a visible drop to the complete account without removing hidden members. */\nfunction sessionDragOrder(\n order: readonly SessionId[],\n rows: readonly SessionNode[],\n drag: DragState,\n over: NonNullable<DragState['over']>,\n): SessionId[] | undefined {\n const source = rows.find(row => row.id === drag.sessionId)\n const target = rows.find(row => row.id === over.id)\n if (source === undefined || target === undefined || source.blank\n || source.pinned !== drag.pinned || target.pinned !== drag.pinned\n || source.id === target.id || !order.includes(source.id)) return\n const section = rows.filter(row => row.pinned === drag.pinned)\n const sourceIndex = section.findIndex(row => row.id === source.id)\n const withoutSource = section.filter(row => row.id !== source.id)\n const insertAt = withoutSource.findIndex(row => row.id === target.id) + (over.half === 'after' ? 1 : 0)\n if (insertAt === sourceIndex) return\n const next = order.filter(id => id !== source.id)\n const targetIndex = next.indexOf(target.id)\n if (targetIndex === -1) return\n next.splice(targetIndex + (over.half === 'after' ? 1 : 0), 0, source.id)\n return pinCurrentBlank(next, rows.find(row => row.blank)?.id)\n}\n\n/** In-flight Workspace-row drag: source identity plus the current marker. */\ninterface WorkspaceDragState {\n workspaceId: WorkspaceId\n over: { id: WorkspaceId; half: 'before' | 'after' } | null\n}\n\n/** Resolve an insertion side across the Workspace header, descendants, and Sessions. */\nfunction workspaceGroupHalf(e: { clientY: number; currentTarget: HTMLElement }): 'before' | 'after' {\n const rect = e.currentTarget.getBoundingClientRect()\n return e.clientY < rect.top + rect.height / 2 ? 'before' : 'after'\n}\n\ntype SessionTreeProps = Pick<\n WorkspaceBrowserProps,\n 'useSessionStatus' | 'startSession' | 'open' | 'renderFactorySlot' | 'useContextMenuTarget' | 'useContextMenu'\n | 'insertWorkspaceBefore' | 't' | 'usePanelInfo'\n | 'useSessionAccess' | 'useWorkspaceAccess'\n> & PropsRenderSlots<\n | 'sidebar.workspaces.session.row.action'\n | 'sidebar.session.row.trailing'\n | 'sidebar.session.row.leading'\n | 'sidebar.session.row.hover'\n> & {\n shortcuts: readonly import('@deepseek-ai/dsh-client-shortcuts/client').ShortcutCatalogEntry[]\n /** Always-mounted Session list snapshot. */\n list: SessionListState\n /** Host account home for POSIX hover-path abbreviation. */\n home?: string | undefined\n /** Workspaces in Host group order with browser-projected Session order. */\n workspaces: readonly WorkspaceView[]\n /** Browser-projected order for Sessions outside every Workspace. */\n ungroupedSessionIds: readonly SessionId[]\n /** Whether the current Workspace stream has a complete Host baseline. */\n workspaceReady: boolean\n /** Grouping, ordering, and filter changes replace the view without row motion. */\n animationResetKey: string\n /** Nest Workspaces under their nearest registered ancestors. */\n nestWorkspaces: boolean\n /** Explicit persisted group expansion, including descendants in tree mode. */\n groupExpansion: Readonly<Record<string, boolean>>\n /** Persist one Workspace group's expansion. */\n setGroupExpanded: (key: string, expanded: boolean) => void\n /** Save a drag order and select Manual. */\n setSessionOrder: (accountKey: string, order: readonly string[]) => void\n /** Registry-global pin and archive sets plus the archived-visibility choice. */\n rowState: SessionRowState\n /** Switch the archived filter back to the default hide-archived view. */\n onLeaveArchivedOnly: () => void\n /** Open the rename dialog from a row title double-click. */\n onSessionRenameRequest: (sessionId: SessionNode['id'], currentTitle: string) => void\n /** One Session chosen from search that must be exposed and scrolled into view. */\n revealSessionId?: SessionId | undefined\n /** Acknowledge that the chosen Session row has been revealed. */\n onSessionRevealed: (sessionId: SessionId) => void\n}\n\n/** The list-empty placeholder — a glyph over the text; the archived-only view names its filter and offers the way back. */\nfunction EmptySessions({ rowState, onLeaveArchivedOnly, t }: Pick<SessionTreeProps, 'rowState' | 'onLeaveArchivedOnly' | 't'>) {\n const archivedOnly = rowState.archivedFilter === 'only'\n return (\n <div className={css.emptyState} data-row-key=\"empty\">\n {archivedOnly ? <IconArchiveOutlineRegular size={24} /> : <IconQueueOutlineRegular size={24} />}\n <div>{archivedOnly ? t('empty.noneArchived') : t('empty.none')}</div>\n {archivedOnly && (\n <button type=\"button\" className={css.emptyAction} onClick={onLeaveArchivedOnly}>\n {t('empty.viewOthers')}\n </button>\n )}\n </div>\n )\n}\n\n/** The scrolling session tree; unmounting drops the sessions subscription and the session watermarks. */\nfunction SessionTree({\n list, useSessionStatus, startSession, open, workspaces, ungroupedSessionIds,\n rowState, onLeaveArchivedOnly,\n workspaceReady, animationResetKey, usePanelInfo, useSessionAccess, useWorkspaceAccess,\n onSessionRenameRequest,\n renderSlot, renderFactorySlot, useContextMenuTarget, useContextMenu,\n insertWorkspaceBefore,\n nestWorkspaces, groupExpansion, setGroupExpanded,\n setSessionOrder, home, t,\n revealSessionId, onSessionRevealed, shortcuts,\n}: SessionTreeProps) {\n const panelActive = usePanelInfo(info => info.activePanelId !== null)\n const statuses = useSessionStatus(s => s)\n const current = panelActive\n ? undefined\n : Object.values(list.byId).find(session => (session.retainedBy.mainView ?? 0) > 0)?.id\n const revealGroup = revealSessionId === undefined || !workspaceReady\n ? undefined\n : owningGroupKey(workspaces, revealSessionId)\n // Per-group raised watermarks; an absent key means the base watermark.\n const [storedWatermarks, setStoredWatermarks] = useState<Readonly<Record<string, number>>>({})\n // Advances on user-driven watermark changes so AnimatedRows settles them; automatic raises animate.\n const [watermarkMotionKey, setWatermarkMotionKey] = useState(0)\n // Transient drag marker state; the selected mode owns the resulting order.\n const [drag, setDrag] = useState<DragState | null>(null)\n const sessionDropCommitted = useRef(false)\n const [workspaceDrag, setWorkspaceDrag] = useState<WorkspaceDragState | null>(null)\n const workspaceDropCommitted = useRef(false)\n const nativeDragActive = drag !== null || workspaceDrag !== null\n useNativeDragAcceptance(nativeDragActive)\n const currentGroup = current === undefined || !workspaceReady\n ? undefined\n : owningGroupKey(workspaces, current)\n useEffect(() => {\n if (current === undefined || currentGroup === undefined || Object.hasOwn(groupExpansion, currentGroup)) return\n setGroupExpanded(currentGroup, true)\n }, [current, currentGroup, setGroupExpanded, groupExpansion])\n const parents = useMemo(() => {\n if (!nestWorkspaces) return new Map<string, WorkspaceId | undefined>()\n const keysByPath = new Map(workspaces.map(workspace => [workspace.path, workspace.workspaceId]))\n const paths = [...keysByPath.keys()]\n return new Map<string, WorkspaceId | undefined>(workspaces.map((workspace) => {\n const path = owningParentFolder(workspace.path, paths)\n return [workspace.workspaceId, path === undefined ? undefined : keysByPath.get(path)]\n }))\n }, [nestWorkspaces, workspaces])\n const currentAncestors = useMemo(() => {\n const keys = new Set<string>()\n for (let key = currentGroup === undefined ? undefined : parents.get(currentGroup); key !== undefined; key = parents.get(key)) {\n keys.add(key)\n }\n return keys\n }, [currentGroup, parents])\n const expandedGroups = useMemo(() => {\n const ancestorKeys = new Set<string | undefined>(parents.values())\n return [...workspaces.map(workspace => workspace.workspaceId), UNGROUPED_KEY]\n .filter(key => groupExpansion[key] ?? ancestorKeys.has(key))\n }, [groupExpansion, parents, workspaces])\n const groups = useMemo(\n () => deriveGroups(list, workspaces, rowState, statuses, {\n expandedGroups,\n ungroupedOrder: ungroupedSessionIds,\n }),\n [list, workspaces, rowState, statuses, expandedGroups, ungroupedSessionIds],\n )\n useEffect(() => {\n for (let key = revealGroup; key !== undefined; key = parents.get(key)) {\n if (groupExpansion[key] === false || (key === revealGroup && groupExpansion[key] !== true)) {\n setGroupExpanded(key, true)\n }\n }\n }, [groupExpansion, parents, revealGroup, setGroupExpanded])\n const baselines = new Map(groups.map(group => [group.key, Math.max(SESSION_WATERMARK_BASE, requiredWatermark(\n group.sessions,\n current,\n group.key === revealGroup ? revealSessionId : undefined,\n ))]))\n const foldedKeys = new Set(groups.filter(group => !group.expanded).map(group => group.key))\n const underFoldedAncestor = (key: string): boolean => {\n for (let owner = parents.get(key); owner !== undefined; owner = parents.get(owner)) {\n if (foldedKeys.has(owner)) return true\n }\n return false\n }\n // A group hidden by a folded ancestor keeps its own expansion and rows but must not raise its watermark.\n const requiredWatermarks = new Map([...baselines].filter(([key]) => !underFoldedAncestor(key)))\n const sessionWatermarks = raiseWatermarks(storedWatermarks, requiredWatermarks)\n // Raising during render keeps the watermark monotonic without committing a lower frame first.\n if (sessionWatermarks !== storedWatermarks) setStoredWatermarks(marks => raiseWatermarks(marks, requiredWatermarks))\n const dropWatermarks = (drop: (key: string) => boolean): void => {\n if (!Object.keys(storedWatermarks).some(drop)) return\n setStoredWatermarks(marks => Object.fromEntries(Object.entries(marks).filter(([key]) => !drop(key))))\n setWatermarkMotionKey(key => key + 1)\n }\n const withinGroup = (key: string, root: string): boolean => {\n for (let owner: string | undefined = key; owner !== undefined; owner = parents.get(owner)) {\n if (owner === root) return true\n }\n return false\n }\n const now = Date.now()\n const commitSessionDrag = (activeDrag: DragState, over: NonNullable<DragState['over']>): void => {\n if (sessionDropCommitted.current) return\n sessionDropCommitted.current = true\n setDrag(null)\n const group = groups.find(candidate => candidate.key === activeDrag.accountKey)\n if (group === undefined) return\n if (over.id === activeDrag.sessionId) return\n const accountSessionIds = activeDrag.accountKey === UNGROUPED_KEY\n ? ungroupedSessionIds\n : workspaces.find(workspace => workspace.workspaceId === activeDrag.accountKey)?.sessionIds\n if (accountSessionIds === undefined) return\n const renderedSessions = watermarkRows(group.sessions, sessionWatermarks[group.key] ?? SESSION_WATERMARK_BASE).rows\n const nextOrder = sessionDragOrder(accountSessionIds, renderedSessions, activeDrag, over)\n if (nextOrder !== undefined) setSessionOrder(activeDrag.accountKey, nextOrder)\n }\n const commitWorkspaceDrag = (\n activeDrag: WorkspaceDragState,\n over: NonNullable<WorkspaceDragState['over']>,\n ): void => {\n if (workspaceDropCommitted.current) return\n workspaceDropCommitted.current = true\n setWorkspaceDrag(null)\n const owner = parents.get(activeDrag.workspaceId)\n const siblings = workspaces.filter(workspace => parents.get(workspace.workspaceId) === owner)\n const rowIndex = siblings.findIndex(workspace => workspace.workspaceId === over.id)\n if (rowIndex === -1) return\n const anchor = over.half === 'before' ? over.id : siblings[rowIndex + 1]?.workspaceId\n if (anchor === activeDrag.workspaceId) return\n const sourceIndex = siblings.findIndex(workspace => workspace.workspaceId === activeDrag.workspaceId)\n const anchorIndex = anchor === undefined\n ? siblings.length\n : siblings.findIndex(workspace => workspace.workspaceId === anchor)\n if (sourceIndex !== -1 && (anchorIndex === sourceIndex || anchorIndex === sourceIndex + 1)) return\n insertWorkspaceBefore(activeDrag.workspaceId, anchor).catch((reason: unknown) => {\n console.warn('workspace reorder rejected:', reason)\n })\n }\n const childrenByParent = useMemo(() => {\n const rendered = new Set(groups.map(group => group.key))\n const children = new Map<string | undefined, GroupNode[]>()\n for (const group of groups) {\n // The archived-only view drops empty groups, so an ancestor may be\n // absent; nest under the nearest rendered one.\n let parent = parents.get(group.key)\n while (parent !== undefined && !rendered.has(parent)) parent = parents.get(parent)\n const siblings = children.get(parent)\n if (siblings === undefined) children.set(parent, [group])\n else siblings.push(group)\n }\n return children\n }, [groups, parents])\n const rootGroups = childrenByParent.get(undefined) ?? []\n const workspaceDropAtListStart = rootGroups[0]?.workspaceId !== undefined\n && workspaceDrag?.over?.id === rootGroups[0].workspaceId\n && workspaceDrag.over.half === 'before'\n\n const rowKeys: string[] = groups.length === 0 ? ['empty'] : []\n const renderGroup = (group: GroupNode, depth: number): ReactNode => {\n const workspaceId = group.workspaceId\n const children = childrenByParent.get(group.key) ?? []\n const compatibleDrag = workspaceDrag !== null && parents.get(workspaceDrag.workspaceId) === parents.get(group.key)\n const watermark = sessionWatermarks[group.key] ?? SESSION_WATERMARK_BASE\n const collapsed = watermarkRows(group.sessions, baselines.get(group.key) ?? SESSION_WATERMARK_BASE)\n const visible = watermarkRows(group.sessions, watermark)\n const sessionsExpanded = visible.hiddenCount === 0\n rowKeys.push(`workspace:${group.key}`)\n const childRows = group.expanded ? children.map(child => renderGroup(child, depth + 1)) : []\n const sessions = visible.rows\n for (const node of sessions) rowKeys.push(`session:${node.id}`)\n if (collapsed.hiddenCount > 0) rowKeys.push(`overflow:${group.key}`)\n const workspaceMarker = workspaceId !== undefined && workspaceDrag?.over?.id === workspaceId\n ? workspaceDrag.over.half\n : null\n const workspaceDragProps = workspaceId === undefined ? undefined : {\n start: () => {\n workspaceDropCommitted.current = false\n setWorkspaceDrag({ workspaceId, over: null })\n },\n end: () => {\n if (workspaceDrag?.over !== null && workspaceDrag?.over !== undefined) {\n commitWorkspaceDrag(workspaceDrag, workspaceDrag.over)\n } else {\n setWorkspaceDrag(null)\n }\n workspaceDropCommitted.current = false\n },\n }\n const hoverWorkspace = workspaceId === undefined || !compatibleDrag\n ? undefined\n : (half: 'before' | 'after') => {\n setWorkspaceDrag(active => active === null\n ? active\n : { ...active, over: { id: workspaceId, half } })\n }\n const dropWorkspace = workspaceId === undefined || !compatibleDrag\n ? undefined\n : (half: 'before' | 'after') => {\n commitWorkspaceDrag(workspaceDrag, { id: workspaceId, half })\n }\n return (\n // Group section: header, descendant Workspaces, and own Session rows. The\n // inter-group breathing room is the section's own margin\n // (WorkspaceBrowser.module.css).\n <div\n key={group.key}\n style={{ '--dsh-workspace-indent': `${depth * 12}px` } as CSSProperties}\n className={clsx(\n css.groupSection,\n workspaceMarker === 'before' && css.workspaceDropBefore,\n workspaceMarker === 'after' && css.workspaceDropAfter,\n )}\n onDragOver={workspaceDrag === null\n ? undefined\n : (e) => {\n e.preventDefault()\n if (hoverWorkspace === undefined && parents.get(group.key) !== undefined) return\n e.stopPropagation()\n if (hoverWorkspace === undefined) {\n e.dataTransfer.dropEffect = 'none'\n if (workspaceDrag.over !== null) setWorkspaceDrag({ ...workspaceDrag, over: null })\n } else {\n e.dataTransfer.dropEffect = 'move'\n hoverWorkspace(workspaceGroupHalf(e))\n }\n }}\n onDrop={workspaceDrag === null\n ? undefined\n : (e) => {\n e.preventDefault()\n if (dropWorkspace === undefined && parents.get(group.key) !== undefined) return\n e.stopPropagation()\n if (dropWorkspace === undefined) {\n workspaceDropCommitted.current = true\n setWorkspaceDrag(null)\n } else {\n dropWorkspace(workspaceGroupHalf(e))\n }\n }}\n >\n <ProjectRowItem\n newShortcut={shortcuts.find(row => row.id === 'session.new')}\n group={group}\n renderFactorySlot={renderFactorySlot} useContextMenu={useContextMenu} useContextMenuTarget={useContextMenuTarget}\n useWorkspaceAccess={useWorkspaceAccess}\n containsCurrentDescendant={currentAncestors.has(group.key)}\n home={home}\n t={t}\n onToggle={() => {\n if (group.expanded) dropWatermarks(key => withinGroup(key, group.key))\n setGroupExpanded(group.key, !group.expanded)\n }}\n onCreate={(workspaceId) => {\n setGroupExpanded(group.key, true)\n startSession(workspaceId)\n }}\n drag={workspaceDragProps}\n />\n {childRows.length > 0 && (\n <div role=\"group\">\n {childRows}\n </div>\n )}\n {sessions.map((node) => {\n // Session drag never leaves its browser-local account, and pinned\n // rows reorder only within their leading pinned block.\n const sameGroupDrag = drag !== null && drag.accountKey === group.key\n const compatibleTarget = sameGroupDrag && drag.pinned === node.pinned\n const normalizeHalf = (half: 'before' | 'after'): 'before' | 'after' =>\n node.blank ? 'after' : half\n const dragProps = {\n start: () => {\n sessionDropCommitted.current = false\n setDrag({ accountKey: group.key, sessionId: node.id, pinned: node.pinned, over: null })\n },\n active: compatibleTarget,\n marker: sameGroupDrag && drag.over?.id === node.id ? drag.over.half : null,\n hover: (half: 'before' | 'after') => {\n /* v8 ignore next -- narrowing guard: Rows gates hover on `active`, which is false while the drag state is null. */\n setDrag(d => (d === null ? d : {\n ...d, over: { id: node.id, half: normalizeHalf(half) },\n }))\n },\n drop: (half: 'before' | 'after') => {\n /* v8 ignore next -- narrowing guard: Rows gates drop on `active`, which is false while the drag state is null. */\n if (drag === null) return\n commitSessionDrag(drag, { id: node.id, half: normalizeHalf(half) })\n },\n end: () => {\n if (drag?.over !== null && drag?.over !== undefined) commitSessionDrag(drag, drag.over)\n else setDrag(null)\n sessionDropCommitted.current = false\n },\n }\n return (\n <SessionNodeItem\n key={node.id}\n node={node}\n currentId={current}\n now={now}\n onOpen={open}\n onRenameRequest={onSessionRenameRequest}\n renderSlot={renderSlot}\n renderFactorySlot={renderFactorySlot} useContextMenu={useContextMenu}\n useContextMenuTarget={useContextMenuTarget}\n onReveal={node.id === revealSessionId && group.key === revealGroup\n ? () => { onSessionRevealed(node.id) }\n : undefined}\n drag={dragProps}\n home={home}\n useSessionAccess={useSessionAccess}\n t={t}\n />\n )\n })}\n {collapsed.hiddenCount > 0 && (\n <button\n type=\"button\"\n className={css.sessionOverflowButton}\n data-row-key={`overflow:${group.key}`}\n aria-expanded={sessionsExpanded}\n onClick={() => {\n if (sessionsExpanded) {\n dropWatermarks(key => key === group.key)\n return\n }\n setStoredWatermarks(marks => ({\n ...marks,\n [group.key]: visible.hiddenCount <= SESSION_WATERMARK_BASE ? Infinity : watermark + SESSION_WATERMARK_BASE,\n }))\n setWatermarkMotionKey(key => key + 1)\n }}\n >\n {sessionsExpanded\n ? t('sessions.collapse')\n : t('sessions.expand', { n: visible.hiddenCount })}\n </button>\n )}\n </div>\n )\n }\n\n const groupRows = rootGroups.map(group => renderGroup(group, 0))\n return (\n <HoverCardGroup className={clsx(css.treeBody, css.wide)}>\n {workspaceDropAtListStart && <span className={css.listTopDropIndicator} aria-hidden=\"true\" />}\n <AnimatedRows\n className={clsx(css.list, workspaceDropAtListStart && css.listTopDropActive)}\n role=\"tree\"\n label={t('section.sessions')}\n rowKeys={rowKeys}\n ready={list.phase === 'ready' && workspaceReady && !nativeDragActive}\n resetKey={JSON.stringify([animationResetKey, watermarkMotionKey])}\n >\n {groups.length === 0 && (\n <EmptySessions rowState={rowState} onLeaveArchivedOnly={onLeaveArchivedOnly} t={t} />\n )}\n {groupRows}\n </AnimatedRows>\n </HoverCardGroup>\n )\n}\n\n/** The flat \"In one list\" body: every session is one draggable top-level row. */\nfunction FlatList({\n list, sessionIds, rowState, onLeaveArchivedOnly, useSessionStatus, useSessionAccess, open, onSessionRenameRequest,\n usePanelInfo, setSessionOrder, workspaceReady, animationResetKey,\n revealSessionId, onSessionRevealed, renderSlot, renderFactorySlot, useContextMenuTarget, useContextMenu, home, t,\n}: Pick<\n SessionTreeProps,\n | 'useSessionStatus'\n | 'useSessionAccess'\n | 'open'\n | 'onSessionRenameRequest'\n | 'renderSlot'\n | 'renderFactorySlot' | 'useContextMenuTarget' | 'useContextMenu'\n | 'usePanelInfo'\n | 'setSessionOrder'\n | 'workspaceReady'\n | 'animationResetKey'\n | 'revealSessionId'\n | 'onSessionRevealed'\n | 'rowState'\n | 'onLeaveArchivedOnly'\n | 'home'\n | 't'\n> & {\n list: SessionListState\n sessionIds: readonly SessionId[]\n}) {\n const panelActive = usePanelInfo(info => info.activePanelId !== null)\n const statuses = useSessionStatus(s => s)\n const rows = useMemo(\n () => deriveFlat(list, sessionIds, rowState, statuses),\n [list, sessionIds, rowState, statuses],\n )\n const [drag, setDrag] = useState<DragState | null>(null)\n const dropCommitted = useRef(false)\n useNativeDragAcceptance(drag !== null)\n const currentId = panelActive\n ? undefined\n : Object.values(list.byId).find(session => (session.retainedBy.mainView ?? 0) > 0)?.id\n const commitDrag = (activeDrag: DragState, over: NonNullable<DragState['over']>): void => {\n if (dropCommitted.current) return\n dropCommitted.current = true\n setDrag(null)\n const nextOrder = sessionDragOrder(sessionIds, rows, activeDrag, over)\n if (nextOrder !== undefined) setSessionOrder(FLAT_SESSION_ORDER_KEY, nextOrder)\n }\n const now = Date.now()\n return (\n <HoverCardGroup className={clsx(css.treeBody, css.wide)}>\n <AnimatedRows\n className={clsx(css.list, css.flatList)}\n role=\"tree\"\n label={t('section.sessions')}\n rowKeys={rows.length === 0 ? ['empty'] : rows.map(row => `session:${row.id}`)}\n ready={list.phase === 'ready' && workspaceReady && drag === null}\n resetKey={animationResetKey}\n >\n {rows.length === 0 && (\n <EmptySessions rowState={rowState} onLeaveArchivedOnly={onLeaveArchivedOnly} t={t} />\n )}\n {rows.map((node) => {\n const active = drag !== null && drag.pinned === node.pinned\n const normalizeHalf = (half: 'before' | 'after'): 'before' | 'after' =>\n node.blank ? 'after' : half\n return (\n <SessionNodeItem\n key={node.id}\n node={node}\n currentId={currentId}\n now={now}\n onOpen={open}\n onRenameRequest={onSessionRenameRequest}\n renderSlot={renderSlot}\n renderFactorySlot={renderFactorySlot} useContextMenu={useContextMenu}\n useContextMenuTarget={useContextMenuTarget}\n onReveal={node.id === revealSessionId\n ? () => { onSessionRevealed(node.id) }\n : undefined}\n useSessionAccess={useSessionAccess}\n drag={{\n start: () => {\n dropCommitted.current = false\n setDrag({ accountKey: FLAT_SESSION_ORDER_KEY, sessionId: node.id, pinned: node.pinned, over: null })\n },\n active,\n marker: active && drag.over?.id === node.id ? drag.over.half : null,\n hover: (half) => {\n setDrag(current => current === null ? current : {\n ...current, over: { id: node.id, half: normalizeHalf(half) },\n })\n },\n drop: (half) => {\n if (drag !== null) commitDrag(drag, { id: node.id, half: normalizeHalf(half) })\n },\n end: () => {\n if (drag?.over !== null && drag?.over !== undefined) commitDrag(drag, drag.over)\n else setDrag(null)\n dropCommitted.current = false\n },\n }}\n home={home}\n t={t}\n />\n )\n })}\n </AnimatedRows>\n </HoverCardGroup>\n )\n}\n\ninterface RemoteSearchState {\n query: string\n status: 'idle' | 'loading' | 'ready' | 'error'\n items: readonly SessionSearchResultItem[]\n hasMore: boolean\n}\n\n/** Flat search body: local metadata matches plus the current Host result page. */\nfunction SearchResults({\n useSessions,\n useSessionStatus,\n open,\n onUnarchive,\n workspaces,\n archivedSessionIds,\n archivedFilter,\n query,\n remote,\n resultLimit,\n usePanelInfo,\n useSessionAccess,\n t,\n}: Pick<WorkspaceBrowserProps, 'useSessions' | 'useSessionStatus' | 'open' | 't' | 'usePanelInfo' | 'useSessionAccess'> & {\n workspaces: readonly WorkspaceView[]\n archivedSessionIds: readonly SessionNode['id'][]\n /** Search matches follow the archived filter selected for the list. */\n archivedFilter: ArchivedFilter\n /** Unarchive an archived result row in place. */\n onUnarchive: (id: SessionNode['id']) => void\n query: string\n remote: RemoteSearchState\n resultLimit: number\n}) {\n const panelActive = usePanelInfo(info => info.activePanelId !== null)\n const list = useSessions(s => s)\n const statuses = useSessionStatus(s => s)\n const currentRemote = remote.query === query\n ? remote\n : { query, status: 'loading' as const, items: [], hasMore: false }\n const results = useMemo(\n () => deriveSearchResults(\n list,\n workspaces,\n query,\n archivedSessionIds,\n archivedFilter,\n statuses,\n currentRemote,\n resultLimit,\n ),\n [list, workspaces, query, archivedSessionIds, archivedFilter, statuses, currentRemote, resultLimit],\n )\n const pending = currentRemote.status === 'loading'\n const currentId = panelActive\n ? undefined\n : Object.values(list.byId).find(session => (session.retainedBy.mainView ?? 0) > 0)?.id\n\n return (\n <div className={clsx(css.treeBody, css.wide)}>\n <div className={css.list}>\n <div className={css.searchTree} role=\"tree\" aria-label={t('search.results.aria')}>\n {results.items.map(result => (\n <SearchResultItem\n key={result.id}\n result={result}\n currentId={currentId}\n onOpen={open}\n onUnarchive={onUnarchive}\n useSessionAccess={useSessionAccess}\n t={t}\n />\n ))}\n </div>\n {pending && (\n /* Two skeleton rows on an empty list, one when local matches already\n show and only the content hits are outstanding. */\n <div role=\"status\" aria-label={t('search.pending')}>\n {(results.items.length === 0 ? [0, 1] : [0]).map(i => (\n <div key={i} className={css.skeletonRow} aria-hidden=\"true\">\n <span className={css.skeletonDot} />\n <span className={css.skeletonBars}>\n <span className={css.skeletonBar} />\n <span className={clsx(css.skeletonBar, css.skeletonBarWide)} />\n </span>\n </div>\n ))}\n </div>\n )}\n {!pending && results.items.length === 0 && (\n <div className={css.empty}>{t('search.noMatches')}</div>\n )}\n {results.hasMore && (\n <div className={css.searchStatus}>\n {t('search.hasMore', { n: resultLimit })}\n </div>\n )}\n </div>\n </div>\n )\n}\n\n/**\n * Render the browsing region.\n * @param props - composed slot props (shell owner share + store + injected actions).\n * @returns the region element tree.\n */\nexport function WorkspaceBrowser({\n wide,\n usePanelInfo,\n expandSidebar,\n useSectionScroller,\n useSessions,\n useSessionStatus,\n useSessionAccess,\n useWorkspaceAccess,\n useWorkspaces,\n useStore,\n actions,\n startSession,\n open,\n requestSessionRename,\n notifyArchivedNotOpenable,\n renameWorkspace, useWorkspaceActionRequest, settleWorkspaceAction,\n deleteWorkspace,\n insertWorkspaceBefore,\n unarchiveSession,\n unpinSession,\n createWorkspace,\n searchSessions,\n searchResultLimit,\n useDirectoryFlow,\n useHostInfo,\n useAttention,\n useShortcuts,\n useWorkspaceShortcuts,\n requestSearch,\n requestAddWorkspace,\n closeAddWorkspace,\n setDirectoryBusy,\n renderSlot, renderFactorySlot, useContextMenuTarget, useContextMenu,\n t,\n}: WorkspaceBrowserProps) {\n const home = useHostInfo(info => info.home)\n const shortcuts = useShortcuts(rows => rows)\n const searchShortcut = shortcuts.find(row => row.id === 'session.search')\n const addShortcut = shortcuts.find(row => row.id === 'workspace.add')\n const shortcutState = useWorkspaceShortcuts(state => state)\n // Ordering remains live while the rail or search replaces the list body.\n const list = useSessions(state => state)\n const storedWorkspaces = useWorkspaces(state => state.items)\n // The resolved name, not `t`, is the memo dependency: the bound seat keeps\n // its identity across a language switch.\n const defaultWorkspaceName = t('workspace.defaultName')\n const workspaces = useMemo(\n () => storedWorkspaces.map(workspace => ({\n ...workspace,\n title: workspaceDisplayTitle(workspace.title, defaultWorkspaceName),\n })),\n [storedWorkspaces, defaultWorkspaceName],\n )\n const workspacePhase = useWorkspaces(state => state.phase)\n const workspaceStreamState = useWorkspaces(state => state.state)\n const archivedSessionIds = useWorkspaces(state => state.archivedSessionIds)\n const pinnedSessionIds = useWorkspaces(state => state.pinnedSessionIds)\n // Live occupancy of this surface's directory-flow hole (the same source the\n // flow reads): a composition without a picking affordance can add nothing.\n const directoryFlowAvailable = useDirectoryFlow(occupied => occupied)\n const groupBy = useStore(s => s.groupBy)\n const orderBy = useStore(s => s.orderBy)\n // Persisted view blobs written before the archived filter existed rehydrate\n // without the field; they read as the default hide-archived view.\n const archivedFilter = useStore(s => s.archivedFilter ?? 'default')\n const groupExpansion = useStore(s => s.groupExpansion)\n const sessionOrderByAccount = useStore(s => s.sessionOrderByAccount)\n // Archived sessions are not openable: the row stays visible under the\n // filter but a click explains instead of navigating.\n const guardedOpen = (sessionId: SessionId): void => {\n if (archivedSessionIds.includes(sessionId)) {\n notifyArchivedNotOpenable()\n return\n }\n open(sessionId)\n }\n const leaveArchivedOnly = (): void => { actions.setArchivedFilter('default') }\n const workspaceReady = workspacePhase === 'ready' && workspaceStreamState !== 'loading'\n const mainSessionId = Object.values(list.byId)\n .find(session => (session.retainedBy.mainView ?? 0) > 0)?.id\n const currentBlank = mainSessionId !== undefined && list.byId[mainSessionId]?.blank === true\n ? mainSessionId\n : undefined\n const ungroupedMemberIds = useMemo(() => {\n const accounted = new Set(workspaces.flatMap(workspace => workspace.sessionIds))\n return list.ids.filter(id => list.byId[id] !== undefined && !accounted.has(id))\n }, [list, workspaces])\n const orderState = useMemo(\n () => ({ pinnedSessionIds, archivedSessionIds }),\n [archivedSessionIds, pinnedSessionIds],\n )\n const rowState = useMemo<SessionRowState>(\n () => ({ ...orderState, archivedFilter }),\n [orderState, archivedFilter],\n )\n const flatMemberIds = useMemo(() => sessionMemberIds(list), [list])\n const orderedWorkspaces = useMemo(() => workspaces.map((workspace) => {\n const memberIds = workspace.sessionIds\n const baseOrder = orderBy === 'updated'\n ? orderByRecency(memberIds, list.byId)\n : reconcileManualOrder(memberIds, sessionOrderByAccount[workspace.workspaceId], list.byId, orderState)\n return {\n ...workspace,\n sessionIds: pinCurrentBlank(\n baseOrder,\n currentBlank !== undefined && memberIds.includes(currentBlank) ? currentBlank : undefined,\n ),\n }\n }), [currentBlank, list.byId, orderBy, orderState, sessionOrderByAccount, workspaces])\n const orderedUngroupedSessionIds = useMemo(() => {\n const baseOrder = orderBy === 'updated'\n ? orderByRecency(ungroupedMemberIds, list.byId)\n : reconcileManualOrder(ungroupedMemberIds, sessionOrderByAccount[UNGROUPED_KEY], list.byId, orderState)\n return pinCurrentBlank(\n baseOrder,\n currentBlank !== undefined && ungroupedMemberIds.includes(currentBlank) ? currentBlank : undefined,\n )\n }, [currentBlank, list.byId, orderBy, orderState, sessionOrderByAccount, ungroupedMemberIds])\n const orderedFlatSessionIds = useMemo(() => {\n const baseOrder = orderBy === 'updated'\n ? orderByRecency(flatMemberIds, list.byId)\n : reconcileManualOrder(flatMemberIds, sessionOrderByAccount[FLAT_SESSION_ORDER_KEY], list.byId, orderState)\n return pinCurrentBlank(\n baseOrder,\n currentBlank !== undefined && flatMemberIds.includes(currentBlank) ? currentBlank : undefined,\n )\n }, [currentBlank, flatMemberIds, list.byId, orderBy, orderState, sessionOrderByAccount])\n const activeSessionOrders = useMemo<Readonly<Record<string, readonly SessionId[]>>>(() => Object.fromEntries([\n ...orderedWorkspaces.map(workspace => [workspace.workspaceId, workspace.sessionIds] as const),\n [UNGROUPED_KEY, orderedUngroupedSessionIds] as const,\n [FLAT_SESSION_ORDER_KEY, orderedFlatSessionIds] as const,\n ]), [orderedFlatSessionIds, orderedUngroupedSessionIds, orderedWorkspaces])\n useEffect(() => {\n if (workspacePhase !== 'ready') return\n actions.retainAccountKeys([\n UNGROUPED_KEY,\n FLAT_SESSION_ORDER_KEY,\n ...workspaces.map(workspace => workspace.workspaceId),\n ])\n }, [actions.retainAccountKeys, workspacePhase, workspaces])\n useEffect(() => {\n if (list.phase !== 'ready' || workspaceReady || orderBy !== 'manual' || currentBlank === undefined) return\n // A first prompt can end blank pinning before the Workspace baseline arrives.\n // Preserve saved members until that baseline can establish departures.\n const changed: Record<string, readonly string[]> = {}\n for (const [key, ids] of Object.entries(activeSessionOrders)) {\n if (key !== FLAT_SESSION_ORDER_KEY && workspacePhase !== 'ready') continue\n const saved = sessionOrderByAccount[key] ?? []\n if (ids[0] !== currentBlank || saved[0] === currentBlank) continue\n changed[key] = [currentBlank, ...saved.filter(id => id !== currentBlank)]\n }\n if (Object.keys(changed).length > 0) actions.syncSessionOrders(changed)\n }, [\n actions.syncSessionOrders,\n activeSessionOrders,\n currentBlank,\n list.phase,\n orderBy,\n sessionOrderByAccount,\n workspacePhase,\n workspaceReady,\n ])\n useEffect(() => {\n if (list.phase !== 'ready' || !workspaceReady || orderBy !== 'manual' || currentBlank === undefined) return\n const moved = Object.entries(activeSessionOrders).some(([key, ids]) =>\n ids[0] === currentBlank && sessionOrderByAccount[key]?.[0] !== currentBlank)\n if (moved) actions.syncSessionOrders(activeSessionOrders)\n }, [\n actions.syncSessionOrders,\n activeSessionOrders,\n currentBlank,\n list.phase,\n orderBy,\n sessionOrderByAccount,\n workspaceReady,\n ])\n const saveSessionOrder = (accountKey: string, order: readonly string[]): void => {\n actions.setSessionOrder(accountKey, order, activeSessionOrders)\n }\n // The query outlives the tree and the input (both wide-only) so collapsing\n // does not silently drop an in-progress filter.\n const [query, setQuery] = useState('')\n const [searchExpanded, setSearchExpanded] = useState(false)\n const [searchSpacingMotionEnabled, setSearchSpacingMotionEnabled] = useState(false)\n const [searchOnExpand, setSearchOnExpand] = useState(false)\n const [lastSearchRequest, setLastSearchRequest] = useState(0)\n // Search state must commit before the effect expands the shell's external store.\n if (lastSearchRequest !== shortcutState.searchRequest) {\n setLastSearchRequest(shortcutState.searchRequest)\n if (shortcutState.searchRequest !== 0) {\n setSearchExpanded(true)\n setSearchSpacingMotionEnabled(wide)\n if (!wide) setSearchOnExpand(true)\n }\n }\n // Search gestures animate spacing; entering wide layout from the rail lands at its final geometry.\n if (!wide && searchSpacingMotionEnabled) setSearchSpacingMotionEnabled(false)\n const changeSearchExpanded = (expanded: boolean): void => {\n setSearchSpacingMotionEnabled(wide)\n setSearchExpanded(expanded)\n }\n const [revealSessionId, setRevealSessionId] = useState<SessionId | undefined>(undefined)\n const normalizedQuery = sanitizeSearchQuery(query).trim()\n const [remoteSearch, setRemoteSearch] = useState<RemoteSearchState>({\n query: '',\n status: 'idle',\n items: [],\n hasMore: false,\n })\n const searchRoot = useRef<HTMLDivElement | null>(null)\n const searchInput = useRef<HTMLInputElement | null>(null)\n // The list area is this section's own vertical scroller; the sidebar hands wheel\n // scrolling over its viewport to it once the navigation has moved away.\n const { bindScrollerRef } = useSectionScroller()\n const focusSearch = useCallback(() => {\n searchInput.current?.focus({ preventScroll: true })\n }, [])\n // Section-header + opens the picker menu (same popover in wide and rail\n // states; the menu anchors on this button).\n const wsPickerOpen = shortcutState.addRequested\n const wsPlusRef = useRef<HTMLButtonElement>(null)\n const workspaceActionRequest = useWorkspaceActionRequest(value => value)\n\n const openSearchResult = (sessionId: SessionId): void => {\n if (archivedSessionIds.includes(sessionId)) {\n notifyArchivedNotOpenable()\n return\n }\n setRevealSessionId(sessionId)\n setQuery('')\n changeSearchExpanded(false)\n open(sessionId)\n }\n const acknowledgeSessionReveal = (sessionId: SessionId): void => {\n setRevealSessionId(current => current === sessionId ? undefined : current)\n }\n useEffect(() => {\n if (normalizedQuery !== '') setRevealSessionId(undefined)\n }, [normalizedQuery])\n\n // Rail search = expand + land in the search box: the flag arms before the\n // expand request; once the shell flips wide the input mounts and takes focus.\n useEffect(() => {\n if (wide && searchOnExpand) {\n const timer = window.setTimeout(() => {\n focusSearch()\n setSearchOnExpand(false)\n }, EXPAND_SLIDE_MS)\n return () => { window.clearTimeout(timer) }\n }\n }, [wide, searchOnExpand, focusSearch])\n useEffect(() => {\n if (shortcutState.searchRequest === 0) return\n closeAddWorkspace()\n if (!wide || searchInput.current?.closest('[inert]')) {\n setSearchOnExpand(true)\n expandSidebar()\n } else focusSearch()\n }, [shortcutState.searchRequest, focusSearch])\n\n useEffect(() => {\n if (!wide || !searchExpanded || searchOnExpand) return\n focusSearch()\n }, [wide, searchExpanded, searchOnExpand, focusSearch])\n\n // Outside-click dismissal stays off while the rail gesture is in flight\n // (searchOnExpand): the rail click flips the shell wide and mounts this\n // listener during its own dispatch, then keeps bubbling to document with\n // the now-unmounted rail button as its target — outside searchRoot, so the\n // listener would dismiss the search that click just opened.\n useEffect(() => {\n if (!wide || !searchExpanded || searchOnExpand) return\n const onClick = (event: MouseEvent): void => {\n if (!(event.target instanceof Node) || searchRoot.current?.contains(event.target) === true) return\n searchInput.current?.blur()\n if (normalizedQuery !== '') return\n changeSearchExpanded(false)\n }\n document.addEventListener('click', onClick)\n return () => { document.removeEventListener('click', onClick) }\n }, [normalizedQuery, wide, searchExpanded, searchOnExpand])\n\n useEffect(() => {\n if (normalizedQuery === '') {\n setRemoteSearch({ query: '', status: 'idle', items: [], hasMore: false })\n return\n }\n const controller = new AbortController()\n setRemoteSearch({\n query: normalizedQuery,\n status: 'loading',\n items: [],\n hasMore: false,\n })\n const timer = window.setTimeout(() => {\n searchSessions(normalizedQuery, controller.signal).then((result) => {\n if (controller.signal.aborted) return\n setRemoteSearch({\n query: normalizedQuery,\n status: 'ready',\n items: result.items,\n hasMore: result.hasMore,\n })\n }).catch(() => {\n if (controller.signal.aborted) return\n setRemoteSearch({\n query: normalizedQuery,\n status: 'error',\n items: [],\n hasMore: false,\n })\n })\n }, SEARCH_DEBOUNCE_MS)\n return () => {\n window.clearTimeout(timer)\n controller.abort()\n }\n }, [normalizedQuery, searchSessions])\n\n // The search results' restore button; the row actions own the rest of the\n // Session verbs as slot entries.\n const onSessionUnarchive = (sessionId: SessionNode['id']) => {\n unarchiveSession(sessionId).catch((reason: unknown) => {\n console.warn('session unarchive rejected:', reason)\n })\n }\n return (\n <div className={clsx(css.root, !wide && css.rail)}>\n <div className={clsx(css.sectionHeader, wide && searchSpacingMotionEnabled && css.searchSpacingMotion)} data-sidebar-workspace-header=\"\">\n {wide && (\n <span className={clsx(css.sectionLabel, css.wide, searchExpanded && css.sectionLabelHidden)}>\n {groupBy === 'flat' ? t('section.sessions') : t('section.workspaces')}\n </span>\n )}\n {wide && (\n <div className={clsx(css.searchSlot, searchExpanded && css.searchSlotExpanded)}>\n <div\n ref={searchRoot}\n className={clsx(css.search, searchExpanded && css.searchExpanded)}\n onClick={() => {\n closeAddWorkspace()\n changeSearchExpanded(true)\n focusSearch()\n }}\n >\n <Tooltip label={t('search')} shortcutKeys={searchShortcut?.keys} side=\"bottom\" delayMs={500} disabled={searchExpanded} portal>\n <button\n type=\"button\"\n className={css.searchButton}\n aria-label={t('search.sessions.aria')}\n aria-keyshortcuts={searchShortcut?.aria}\n aria-expanded={searchExpanded}\n onClick={() => {\n requestSearch()\n }}\n >\n <IconSearchOutlineRegular size={searchExpanded ? 11 : 14} />\n </button>\n </Tooltip>\n <input\n ref={searchInput}\n className={css.searchInput}\n type=\"text\"\n placeholder={t('search.placeholder')}\n maxLength={SEARCH_QUERY_MAX_CODE_UNITS}\n value={query}\n tabIndex={searchExpanded ? 0 : -1}\n onChange={(e) => { setQuery(sanitizeSearchQuery(e.target.value)) }}\n onKeyDown={(e) => {\n if (e.key !== 'Escape') return\n setQuery('')\n changeSearchExpanded(false)\n }}\n />\n {searchExpanded && (\n <button\n type=\"button\"\n className={css.clearButton}\n aria-label={t('search.clear')}\n onClick={(e) => {\n e.stopPropagation()\n setQuery('')\n changeSearchExpanded(false)\n }}\n >\n <IconCloseFillRegular />\n </button>\n )}\n </div>\n </div>\n )}\n <div className={clsx(css.headerActions, wide && searchExpanded && css.headerActionsHidden)}>\n {wide && (\n <ViewOptionsMenu\n groupBy={groupBy}\n orderBy={orderBy}\n archivedFilter={archivedFilter}\n onGroupPick={actions.setGroupBy}\n onOrderPick={(mode) => { actions.setOrderBy(mode, activeSessionOrders) }}\n onArchivedFilterPick={actions.setArchivedFilter}\n t={t}\n />\n )}\n {/* Adding is the button's one action, so a composition with no\n picking affordance has nothing to offer here: the region hides the\n button rather than leaving a dead one in the header. */}\n {directoryFlowAvailable && (\n <Tooltip label={t('workspace.add')} shortcutKeys={addShortcut?.keys} side=\"bottom\" delayMs={500} portal>\n <button\n ref={wsPlusRef}\n type=\"button\"\n className={css.iconButton}\n aria-label={t('workspace.add')}\n aria-keyshortcuts={addShortcut?.aria}\n onClick={() => {\n requestAddWorkspace()\n }}\n >\n <IconProjectAddOutlineRegular size={wide ? 16 : 18} />\n </button>\n </Tooltip>\n )}\n </div>\n {/* Add flow + its error dialog (same package — direct composition). */}\n <WorkspacePickFlow\n t={t}\n open={wsPickerOpen}\n anchorRef={wsPlusRef}\n useWorkspaces={useWorkspaces}\n createWorkspace={createWorkspace}\n useDirectoryFlow={useDirectoryFlow}\n renderDirectoryFlow={owner => renderSlot('sidebar.workspaces.directoryFlow', owner)}\n addOnly\n onBusyChange={setDirectoryBusy}\n side=\"right\"\n onPick={(workspaceId) => {\n closeAddWorkspace()\n startSession(workspaceId, { clearPreviousDraft: false })\n }}\n onClose={() => { closeAddWorkspace() }}\n />\n </div>\n\n {/* The collapsed rail keeps search as its own 36px control. */}\n {!wide && <div className={css.search}>\n <Tooltip label={t('search')} shortcutKeys={searchShortcut?.keys} portal>\n <button\n type=\"button\"\n className={css.searchButton}\n aria-label={t('search.sessions.aria')}\n aria-keyshortcuts={searchShortcut?.aria}\n onClick={() => {\n requestSearch()\n }}\n >\n <IconSearchOutlineRegular size={18} />\n </button>\n </Tooltip>\n </div>}\n\n {/* Always-mounted seat keeps the region's flex slot while the list\n itself is wide-only. */}\n <div ref={wide ? bindScrollerRef : undefined} className={css.listArea} data-sidebar-list-area=\"\">\n {/* The attention region leads the browsing list and scrolls with it; a\n search replaces both, so the region steps aside with the tree. */}\n {wide && normalizedQuery === '' && (\n <AttentionSection\n useAttention={useAttention}\n useSessionAccess={useSessionAccess}\n open={guardedOpen}\n unpin={unpinSession}\n t={t}\n />\n )}\n {wide && (normalizedQuery !== ''\n ? (\n <SearchResults\n usePanelInfo={usePanelInfo}\n useSessionAccess={useSessionAccess}\n useSessions={useSessions}\n useSessionStatus={useSessionStatus}\n open={openSearchResult}\n onUnarchive={onSessionUnarchive}\n workspaces={workspaces}\n archivedSessionIds={archivedSessionIds}\n archivedFilter={archivedFilter}\n query={normalizedQuery}\n remote={remoteSearch}\n resultLimit={searchResultLimit}\n t={t}\n />\n )\n : groupBy === 'flat'\n ? (\n <FlatList\n useSessionAccess={useSessionAccess}\n usePanelInfo={usePanelInfo}\n list={list}\n sessionIds={orderedFlatSessionIds}\n rowState={rowState}\n onLeaveArchivedOnly={leaveArchivedOnly}\n workspaceReady={workspaceReady}\n animationResetKey={`${groupBy}/${orderBy}/${archivedFilter}`}\n useSessionStatus={useSessionStatus}\n open={guardedOpen}\n onSessionRenameRequest={requestSessionRename}\n renderSlot={renderSlot}\n renderFactorySlot={renderFactorySlot} useContextMenu={useContextMenu}\n useContextMenuTarget={useContextMenuTarget}\n setSessionOrder={saveSessionOrder}\n revealSessionId={revealSessionId}\n onSessionRevealed={acknowledgeSessionReveal}\n home={home}\n t={t}\n />\n )\n : (\n <SessionTree\n useSessionAccess={useSessionAccess}\n useWorkspaceAccess={useWorkspaceAccess}\n usePanelInfo={usePanelInfo}\n list={list}\n shortcuts={shortcuts}\n useSessionStatus={useSessionStatus}\n onSessionRenameRequest={requestSessionRename}\n renderSlot={renderSlot}\n renderFactorySlot={renderFactorySlot} useContextMenu={useContextMenu}\n useContextMenuTarget={useContextMenuTarget}\n workspaces={orderedWorkspaces}\n ungroupedSessionIds={orderedUngroupedSessionIds}\n workspaceReady={workspaceReady}\n nestWorkspaces={groupBy === 'workspace-tree'}\n animationResetKey={`${groupBy}/${orderBy}/${archivedFilter}`}\n groupExpansion={groupExpansion}\n setGroupExpanded={actions.setGroupExpanded}\n setSessionOrder={saveSessionOrder}\n rowState={rowState}\n onLeaveArchivedOnly={leaveArchivedOnly}\n startSession={startSession}\n open={guardedOpen}\n insertWorkspaceBefore={insertWorkspaceBefore}\n revealSessionId={revealSessionId}\n onSessionRevealed={acknowledgeSessionReveal}\n home={home}\n t={t}\n />\n ))}\n </div>\n\n {workspaceActionRequest !== null && <WorkspaceDialogs key={`${workspaceActionRequest.action}/${workspaceActionRequest.workspaceId}`}\n request={workspaceActionRequest} workspaces={workspaces} renameWorkspace={renameWorkspace} deleteWorkspace={deleteWorkspace}\n settleWorkspaceAction={settleWorkspaceAction} t={t} />}\n </div>\n )\n}\n","/** Archive hover button and confirmation for stopping the Session’s running work. */\nimport { useState } from 'react'\nimport type { SessionActivity } from '@deepseek-ai/dsh-api-workspace-controller/client'\n// Type-only: the family keys each provider merges; a key this program did not compile takes the generic line.\nimport type {} from '@deepseek-ai/dsh-agent/types'\nimport type {} from '@deepseek-ai/dsh-jobs/view'\nimport type {} from '@deepseek-ai/dsh-schedule/client'\nimport type {} from '@deepseek-ai/dsh-subagent/client'\nimport {\n Button, IconArchiveOutlineRegular, IconUnarchiveOutlineRegular, Modal, Tooltip,\n} from '@deepseek-ai/dsh-client-ui-primitives'\nimport type {\n ArchiveSessionInjected, SessionArchiveConfirmInjected, SessionArchiveConfirmProps, SessionArchiveConfirmRequest,\n SessionRowActionProps,\n} from '../contract/slots.ts'\nimport css from '../rows/Rows.module.css'\nimport browserCss from '../rows/WorkspaceBrowser.module.css'\n\n/**\n * Hover button (order 100): archive, or restore an archived row. Absent while the Session's access\n * snapshot excludes that toggle.\n * @param props - owner share, the access Hook, and the archive share.\n * @returns the button, or nothing when the caller may not toggle this Session's archival.\n */\nexport function ArchiveSessionRowButton({\n sessionId, useArchived, useSessionAccess, archiveSession, unarchiveSession, t,\n}: SessionRowActionProps<ArchiveSessionInjected>) {\n const archived = useArchived(set => set.has(sessionId))\n const allowed = useSessionAccess(sessionId, archived ? 'workspace/unarchiveSession' : 'workspace/archiveSession')\n if (!allowed) return null\n return (\n <Tooltip label={t(archived ? 'actions.unarchive' : 'actions.archive')} side=\"bottom\" align=\"end\" delayMs={500} portal>\n <button\n type=\"button\"\n className={css.iconButton}\n aria-label={t(archived ? 'menu.unarchiveSession' : 'menu.archiveSession')}\n onClick={() => { (archived ? unarchiveSession : archiveSession)(sessionId) }}\n >\n {archived ? <IconUnarchiveOutlineRegular size={14} /> : <IconArchiveOutlineRegular size={14} />}\n </button>\n </Tooltip>\n )\n}\n\n/**\n * The `shell.overlay` entry: nothing while no confirmation is pending,\n * otherwise one dialog per request (keyed by the Session). Confirming asks\n * the Host to stop the listed work and archive; cancelling leaves the\n * Session running and visible.\n * @param props - the request hook, its settlement, the stop-and-archive hop, and the locale seat.\n * @returns the open dialog, or null.\n */\nexport function SessionArchiveConfirmDialog({\n useArchiveRequest, settleSessionArchive, stopAndArchiveSession, t,\n}: SessionArchiveConfirmProps) {\n const request = useArchiveRequest(pending => pending)\n if (request === null) return null\n return (\n <ArchiveConfirmForm\n key={request.sessionId}\n request={request}\n stopAndArchiveSession={stopAndArchiveSession}\n onSettle={settleSessionArchive}\n t={t}\n />\n )\n}\n\n/** One request's dialog: in-flight and error state die with it. */\nfunction ArchiveConfirmForm({ request, stopAndArchiveSession, onSettle, t }: {\n request: SessionArchiveConfirmRequest\n stopAndArchiveSession: SessionArchiveConfirmInjected['stopAndArchiveSession']\n onSettle: () => void\n t: SessionArchiveConfirmProps['t']\n}) {\n const [archiving, setArchiving] = useState(false)\n const [error, setError] = useState<string | null>(null)\n const close = () => {\n if (archiving) return\n onSettle()\n }\n const confirm = () => {\n setArchiving(true)\n setError(null)\n stopAndArchiveSession(request.sessionId).then(() => {\n setArchiving(false)\n onSettle()\n }).catch((reason: unknown) => {\n setArchiving(false)\n setError(reason instanceof Error ? reason.message : String(reason))\n })\n }\n return (\n <Modal\n open\n onClose={close}\n closeLabel={t('close')}\n title={t('archive.confirm.title')}\n description={t('archive.confirm.desc', { title: request.displayTitle })}\n footer={(\n <>\n <Button variant=\"outline\" disabled={archiving} onClick={close}>{t('cancel')}</Button>\n <Button\n variant=\"outline\"\n className={browserCss.deleteAction}\n disabled={archiving}\n onClick={confirm}\n >\n {t('archive.confirm.action')}\n </Button>\n </>\n )}\n >\n <ul className={browserCss.archiveActivity} aria-label={t('archive.confirm.activity')}>\n {request.activity.map((entry, index) => (\n <li key={`${entry.kind}-${String(index)}`}>{activityLine(entry, t)}</li>\n ))}\n </ul>\n {archiving && <div className={browserCss.deleteStatus} role=\"status\">{t('archive.confirm.pending')}</div>}\n {error !== null && <div className={browserCss.renameError} role=\"alert\">{error}</div>}\n </Modal>\n )\n}\n\n/**\n * One family's line: its count and the items' labels (ids when a family\n * carries no label). A family this dictionary does not know — a provider\n * merged into the kind map — falls through to the generic line.\n */\nfunction activityLine(entry: SessionActivity, t: SessionArchiveConfirmProps['t']): string {\n const items = entry.items ?? []\n const n = items.length\n const names = items.map(item => item.label ?? item.id).join(t('archive.confirm.listSeparator'))\n const plural = n === 1 ? 'one' : 'other'\n switch (entry.kind) {\n case 'turn': return t('archive.confirm.turn')\n case 'subagent': return t(`archive.confirm.subagents.${plural}`, { n, names })\n case 'job': return t(`archive.confirm.jobs.${plural}`, { n, names })\n case 'schedule': return t(`archive.confirm.schedules.${plural}`, { n, names })\n default: return t(`archive.confirm.other.${plural}`, { kind: entry.kind, n })\n }\n}\n","/** Derived observable sources for the row actions' injected hooks. */\nimport type { HostObservable } from '@deepseek-ai/dsh-client-ui-slots'\n\n/**\n * Project one observable into another, recomputing only when the source\n * snapshot changes identity, so consumers that select from the projection\n * (a Set lookup per row) never rebuild it per read.\n * @param source - the observable to project.\n * @param project - pure projection of one source snapshot.\n * @returns the projected observable, subscribing through the source.\n */\nexport function derive<S, T>(source: HostObservable<S>, project: (snapshot: S) => T): HostObservable<T> {\n let seen: S | undefined\n let value: T | undefined\n return {\n getSnapshot: () => {\n const snapshot = source.getSnapshot()\n if (value === undefined || snapshot !== seen) {\n seen = snapshot\n value = project(snapshot)\n }\n return value\n },\n subscribe: listener => source.subscribe(listener),\n }\n}\n","/** Structured Session actions over the workspace owner's existing callbacks. */\nimport type { Context } from '@deepseek-ai/cordis'\nimport type { RemoteEndpoint } from '@deepseek-ai/dsh-api-remote-access/client'\nimport type { ShortcutCommandId } from '@deepseek-ai/dsh-client-shortcuts/client'\nimport type { MenuContribution, ContextMenuTargetMap } from '@deepseek-ai/dsh-client-ui-context-menu/client'\nimport type {\n ArchiveSessionInjected, ForkSessionInjected, PinSessionInjected, RenameSessionInjected, SessionIdInjected,\n} from '../contract/slots.ts'\n\ntype Actions = Omit<PinSessionInjected & ArchiveSessionInjected, 'hooks'>\n & ForkSessionInjected & RenameSessionInjected & SessionIdInjected\n\n/**\n * Register built-in actions while retaining the legacy Slot for external components.\n * @param ctx - workspace plugin context owning menus, access, membership, and locale.\n * @param actions - shared row and dialog callbacks; execution always uses the captured Session.\n */\nexport function registerSessionMenus(ctx: Context, actions: Actions): void {\n const t = ctx.locale.bind('workspace')\n const register = (\n id: string,\n order: number,\n endpoints: readonly RemoteEndpoint[],\n resolve: MenuContribution<'session'>['resolve'],\n ): void => {\n ctx.effect(() => ctx.contextMenus.register({\n id: `session.${id}`, target: 'session', order,\n observe: ({ sessionId }) => [\n ctx.workspaces.list, ctx.locale,\n ...endpoints.map(action => ctx.remoteAccess.source('session', sessionId, action)),\n ],\n resolve,\n }), `ui-workspace: ${id} menu`)\n }\n const allowed = (target: ContextMenuTargetMap['session'], action: RemoteEndpoint): boolean =>\n ctx.remoteAccess.source('session', target.sessionId, action).getSnapshot()\n const archived = (target: ContextMenuTargetMap['session']): boolean =>\n ctx.workspaces.list.getSnapshot().archivedSessionIds.includes(target.sessionId)\n register('pin', 100, ['workspace/pinSession', 'workspace/unpinSession'], (target) => {\n const pinned = ctx.workspaces.list.getSnapshot().pinnedSessionIds.includes(target.sessionId)\n if (archived(target) || !allowed(target, pinned ? 'workspace/unpinSession' : 'workspace/pinSession')) return []\n return [{\n id: 'pin', label: t(pinned ? 'menu.unpinSession' : 'menu.pinSession'), icon: { key: pinned ? 'workspace.unpin' : 'workspace.pin' },\n run: () => { (pinned ? actions.unpinSession : actions.pinSession)(target.sessionId) },\n }]\n })\n register('rename', 200, ['session/rename'], target => allowed(target, 'session/rename') ? [{\n id: 'rename', label: t('rename'), icon: { key: 'workspace.rename' }, commandId: 'session.rename' as ShortcutCommandId,\n run: () => { actions.requestSessionRename(target.sessionId, target.displayTitle) },\n }] : [])\n register('fork', 300, ['session/fork'], target => allowed(target, 'session/fork') ? [{\n id: 'fork', label: t('menu.fork'), icon: { key: 'workspace.fork' }, commandId: 'session.fork' as ShortcutCommandId,\n run: () => { actions.forkSession(target.sessionId) },\n }] : [])\n register('id', 450, [], target => [{\n id: 'copy', label: t('menu.sessionId'), icon: { key: 'workspace.copy' }, separatorBefore: true,\n run: () => actions.copySessionId(target.sessionId),\n }])\n register('archive', 600, ['workspace/archiveSession', 'workspace/unarchiveSession'], (target) => {\n const restoring = archived(target)\n if (!allowed(target, restoring ? 'workspace/unarchiveSession' : 'workspace/archiveSession')) return []\n return [{\n id: 'archive', label: t(restoring ? 'menu.unarchiveSession' : 'menu.archiveSession'),\n icon: { key: restoring ? 'workspace.unarchive' : 'workspace.archive' }, separatorBefore: true, afterContent: true,\n ...restoring ? {} : { commandId: 'session.archive' as ShortcutCommandId },\n run: () => { (restoring ? actions.unarchiveSession : actions.archiveSession)(target.sessionId) },\n }]\n })\n}\n","/** Session pin hover button over the workspace owner’s shared callbacks. */\nimport {\n IconPinFillRegular, IconPinOutlineRegular, Tooltip,\n} from '@deepseek-ai/dsh-client-ui-primitives'\nimport clsx from 'clsx'\nimport type { PinSessionInjected, SessionRowActionProps } from '../contract/slots.ts'\nimport css from '../rows/Rows.module.css'\n\ntype PinState = Pick<SessionRowActionProps<PinSessionInjected>, 'sessionId' | 'usePinned' | 'useArchived' | 'useSessionAccess'>\n\n/** The row's pin and archive membership, one Set lookup each, and whether its access allows the toggle. */\nfunction usePinState({ sessionId, usePinned, useArchived, useSessionAccess }: PinState) {\n const pinned = usePinned(set => set.has(sessionId))\n return {\n pinned,\n archived: useArchived(archived => archived.has(sessionId)),\n allowed: useSessionAccess(sessionId, pinned ? 'workspace/unpinSession' : 'workspace/pinSession'),\n }\n}\n\n/**\n * Hover button (order 200), also visible without hover when pinned; absent on\n * archived rows and while the Session's access snapshot excludes that toggle.\n * Tooltip forwards the class to the button. Keep that button directly inside\n * the display-contents slot anchor so hoverless rows can retain the Unpin action.\n * @param props - owner share, the access Hook, and the pin share.\n * @returns the button, or null for an archived or refused Session.\n */\nexport function PinSessionRowButton(props: SessionRowActionProps<PinSessionInjected>) {\n const { sessionId, pinSession, unpinSession, t } = props\n const { pinned, archived, allowed } = usePinState(props)\n if (archived || !allowed) return null\n return (\n <Tooltip label={t(pinned ? 'actions.unpin' : 'actions.pin')} side=\"bottom\" align=\"end\" delayMs={500} portal>\n <button\n type=\"button\"\n className={clsx(css.iconButton, pinned && css.pinnedAction)}\n aria-label={t(pinned ? 'menu.unpinSession' : 'menu.pinSession')}\n onClick={() => { (pinned ? unpinSession : pinSession)(sessionId) }}\n >\n {pinned ? <IconPinFillRegular size={14} /> : <IconPinOutlineRegular size={14} />}\n </button>\n </Tooltip>\n )\n}\n","/** Rename dialog shared by Session menus, shortcuts, and title double-clicks. */\nimport { useRef, useState } from 'react'\nimport { Button, Modal } from '@deepseek-ai/dsh-client-ui-primitives'\nimport type {\n SessionRenameDialogInjected, SessionRenameDialogProps, SessionRenameTarget,\n} from '../contract/slots.ts'\nimport css from '../rows/WorkspaceBrowser.module.css'\n\n/**\n * The `shell.overlay` entry: nothing while no rename is requested, otherwise\n * one dialog per request (keyed by the Session, so a new request starts a\n * fresh draft). Sessions have no client-side name-conflict rule (the host\n * normalizes), and unlike Workspace rename an unchanged title is NOT\n * blocked. An unnamed Session starts with an empty draft and requires a name.\n * @param props - the request hook, its settlement, the rename hop, and the locale seat.\n * @returns the open dialog, or null.\n */\nexport function SessionRenameDialog({ useRenameRequest, settleSessionRename, renameSession, t }: SessionRenameDialogProps) {\n const request = useRenameRequest(pending => pending)\n if (request === null) return null\n return (\n <RenameForm\n key={request.sessionId}\n request={request}\n renameSession={renameSession}\n onSettle={settleSessionRename}\n t={t}\n />\n )\n}\n\n/** One request's dialog: the draft seeds from the request on mount; in-flight and error state die with it. */\nfunction RenameForm({ request, renameSession, onSettle, t }: {\n request: SessionRenameTarget\n renameSession: SessionRenameDialogInjected['renameSession']\n onSettle: () => void\n t: SessionRenameDialogProps['t']\n}) {\n const [draft, setDraft] = useState(request.currentTitle)\n const [renaming, setRenaming] = useState(false)\n const [error, setError] = useState<string | null>(null)\n // IME composition: Enter that commits a composition must not submit.\n const composingRef = useRef(false)\n const trimmed = draft.trim()\n const blocked = renaming || trimmed === ''\n const close = () => {\n if (renaming) return\n onSettle()\n }\n const confirm = () => {\n if (blocked) return\n setRenaming(true)\n setError(null)\n renameSession(request.sessionId, trimmed).then(() => {\n setRenaming(false)\n onSettle()\n }).catch((reason: unknown) => {\n setRenaming(false)\n setError(reason instanceof Error ? reason.message : String(reason))\n })\n }\n return (\n <Modal\n open\n onClose={close}\n closeLabel={t('close')}\n title={t('rename.session.title')}\n footer={(\n <>\n <Button variant=\"outline\" disabled={renaming} onClick={close}>{t('cancel')}</Button>\n <Button variant=\"primary\" disabled={blocked} onClick={confirm}>{t('rename')}</Button>\n </>\n )}\n >\n <input\n className={css.renameInput}\n value={draft}\n aria-label={t('field.sessionName')}\n data-modal-autofocus\n disabled={renaming}\n onFocus={(e) => { e.target.select() }}\n onChange={(e) => { setDraft(e.target.value); setError(null) }}\n onCompositionStart={() => { composingRef.current = true }}\n onCompositionEnd={() => { composingRef.current = false }}\n onKeyDown={(e) => {\n if (e.key === 'Enter' && !composingRef.current) {\n e.preventDefault()\n confirm()\n }\n }}\n />\n {error !== null && <div className={css.renameError} role=\"alert\">{error}</div>}\n </Modal>\n )\n}\n","/** The existing overlay dispatches the latest Workspace notice to its keyed presentation. */\nimport type { RowToastProps } from '../contract/slots.ts'\nimport type {} from '../contract/toast.ts'\n\n/**\n * Dispatch the current notice without interpreting its business payload.\n * @param props - Current notice, dismissal, and the declared keyed renderer.\n * @returns The selected notice presentation, or nothing.\n */\nexport function RowActionToast({ useToast, dismissToast, renderSlot }: RowToastProps) {\n const notice = useToast(current => current)\n if (notice === null) return null\n return renderSlot('workspace.toast', { ...notice, dismissToast }, { entryKey: notice.kind })\n}\n","/** One presentation Factory and the adapters for keyed Workspace notices. */\nimport { IconWarningOutlineRegular, Toast } from '@deepseek-ai/dsh-client-ui-primitives'\nimport type { PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots'\nimport type { ArchiveToastEntryProps, ToastEntryProps, WorkspaceToastProps } from '../contract/toast.ts'\n\n/**\n * Render one notice using the shared Factory.\n * @param props - Keyed payload, injected display mapping, locale, and Factory renderer.\n * @returns The shared Toast occurrence.\n */\nexport function ToastEntry<P extends PropsRuntime<'workspace.toast'>>(props: ToastEntryProps<P>) {\n const { dismissToast, display, t, renderFactorySlot, seq } = props\n return renderFactorySlot('workspace.toast.content', { ...display(props, t, dismissToast), seq, onDone: dismissToast })\n}\n\n/**\n * Keep the archive filter action reactive without subscribing unrelated notices.\n * @param props - Archive notice, display mapping, and the existing viewing store.\n * @returns The shared Toast occurrence with its current actions.\n */\nexport function ArchiveToastEntry(props: ArchiveToastEntryProps) {\n const { dismissToast, display, filterAction, useStore, t, renderFactorySlot, seq } = props\n const archivedVisible = useStore(state => (state.archivedFilter ?? 'default') !== 'default')\n const fields = display(props, t, dismissToast)\n return renderFactorySlot('workspace.toast.content', {\n ...fields,\n actions: [...fields.actions ?? [], ...archivedVisible ? [] : [filterAction(t, dismissToast)]],\n seq,\n onDone: dismissToast,\n })\n}\n\n/**\n * Present plain display data with the shared primitive's timing and portal.\n * @param props - Localized display fields, display identity, and dismissal.\n * @returns One Toast, remounted only for a new display identity.\n */\nexport function WorkspaceToast({ seq, text, tone, holdMs, actions, onDone }: WorkspaceToastProps) {\n return <Toast key={seq} text={text} onDone={onDone}\n {...tone === 'success' ? { tone: 'success' as const } : {}}\n {...tone === 'warning' ? { icon: <IconWarningOutlineRegular /> } : {}}\n {...holdMs === undefined ? {} : { holdMs }}\n {...actions === undefined ? {} : { actions }} />\n}\n","/** Business-owned mappings into the keyed Workspace Toast slot. */\nimport type { Context } from '@deepseek-ai/cordis'\nimport type { PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots'\nimport type { RowToastActions, WorkspaceViewStoreHandle } from '../contract/slots.ts'\nimport type { ArchiveToastInjected, ToastDisplayInjected } from '../contract/toast.ts'\nimport { ArchiveToastEntry, ToastEntry, WorkspaceToast } from './Toast.tsx'\n\n/** Register notice presentations with their business-owned display fields and actions.\n * @param ctx - Workspace plugin context.\n * @param viewStore - Viewing store, read only by archive notices.\n * @param actions - Archive and source-opening callbacks.\n */\nexport function registerToasts(\n ctx: Context,\n viewStore: WorkspaceViewStoreHandle,\n actions: Pick<RowToastActions, 'undoArchive' | 'showArchived' | 'openForkSource'>,\n): void {\n const archiveFilterAction: ArchiveToastInjected['filterAction'] = (t, dismiss) => ({\n prefix: t('toast.archivedOr'), label: t('toast.archivedFilter'),\n onClick: () => { dismiss(); actions.showArchived() },\n })\n ctx.slots.registerFactory({ name: 'workspace.toast.content', scope: 'root' }, WorkspaceToast)\n ctx.slots.inject('workspace.toast', function* () {\n yield ctx.slots.register({\n name: 'workspace.toast', key: 'sessionIdCopied', locale: 'workspace',\n inject: (): ToastDisplayInjected<'sessionIdCopied'> => ({\n display: (_notice, t) => ({ text: t('toast.sessionIdCopied'), tone: 'success' }),\n }),\n }, ToastEntry<PropsRuntime<'workspace.toast', 'sessionIdCopied'>>)\n yield ctx.slots.register({\n name: 'workspace.toast', key: 'sessionIdCopyFailed', locale: 'workspace',\n inject: (): ToastDisplayInjected<'sessionIdCopyFailed'> => ({\n display: (_notice, t) => ({ text: t('toast.sessionIdCopyFailed'), tone: 'warning' }),\n }),\n }, ToastEntry<PropsRuntime<'workspace.toast', 'sessionIdCopyFailed'>>)\n yield ctx.slots.register({\n name: 'workspace.toast', key: 'pinFailed', locale: 'workspace',\n inject: (): ToastDisplayInjected<'pinFailed'> => ({\n display: (_notice, t) => ({ text: t('toast.pinFailed'), tone: 'warning' }),\n }),\n }, ToastEntry<PropsRuntime<'workspace.toast', 'pinFailed'>>)\n yield ctx.slots.register({\n name: 'workspace.toast', key: 'unpinFailed', locale: 'workspace',\n inject: (): ToastDisplayInjected<'unpinFailed'> => ({\n display: (_notice, t) => ({ text: t('toast.unpinFailed'), tone: 'warning' }),\n }),\n }, ToastEntry<PropsRuntime<'workspace.toast', 'unpinFailed'>>)\n yield ctx.slots.register({\n name: 'workspace.toast', key: 'archivedNotOpenable', locale: 'workspace',\n inject: (): ToastDisplayInjected<'archivedNotOpenable'> => ({\n display: (_notice, t) => ({ text: t('toast.archivedNotOpenable'), tone: 'warning' }),\n }),\n }, ToastEntry<PropsRuntime<'workspace.toast', 'archivedNotOpenable'>>)\n yield ctx.slots.register({\n name: 'workspace.toast', key: 'defaultWorkspaceFailed', locale: 'workspace',\n inject: (): ToastDisplayInjected<'defaultWorkspaceFailed'> => ({\n display: (_notice, t) => ({ text: t('defaultWorkspace.failed'), tone: 'warning' }),\n }),\n }, ToastEntry<PropsRuntime<'workspace.toast', 'defaultWorkspaceFailed'>>)\n yield ctx.slots.register({\n name: 'workspace.toast', key: 'shortcutForkFailed', locale: 'workspace',\n inject: (): ToastDisplayInjected<'shortcutForkFailed'> => ({\n display: (notice, t) => ({\n text: t(notice.reason === 'unavailable' ? 'shortcut.noCompletedTurn' : 'shortcut.forkFailed'), tone: 'plain',\n }),\n }),\n }, ToastEntry<PropsRuntime<'workspace.toast', 'shortcutForkFailed'>>)\n yield ctx.slots.register({\n name: 'workspace.toast', key: 'createFailed', locale: 'workspace',\n inject: (): ToastDisplayInjected<'createFailed'> => ({\n display: (notice, t) => ({ text: t('toast.createFailed', { message: notice.message }), tone: 'warning', holdMs: 6000 }),\n }),\n }, ToastEntry<PropsRuntime<'workspace.toast', 'createFailed'>>)\n yield ctx.slots.register({\n name: 'workspace.toast', key: 'forkRequiresOpen', locale: 'workspace',\n inject: (): ToastDisplayInjected<'forkRequiresOpen'> => ({\n display: (notice, t, dismiss) => ({\n text: t('toast.forkRequiresOpen'), tone: 'warning', holdMs: 6000,\n actions: [{ label: t('toast.openForkSource'), onClick: () => { dismiss(); actions.openForkSource(notice.sessionId) } }],\n }),\n }),\n }, ToastEntry<PropsRuntime<'workspace.toast', 'forkRequiresOpen'>>)\n for (const key of ['archived', 'stoppedAndArchived'] as const) {\n yield ctx.slots.register({\n name: 'workspace.toast', key, locale: 'workspace', store: viewStore,\n inject: (): ArchiveToastInjected => ({\n display: (notice, t, dismiss) => ({\n text: notice.message ?? t(`toast.${notice.kind}`), tone: notice.tone ?? 'success', holdMs: 6000,\n actions: [{ label: t('toast.archivedUndo'), onClick: () => { dismiss(); actions.undoArchive(notice.sessionId) } }],\n }),\n filterAction: archiveFilterAction,\n }),\n }, ArchiveToastEntry)\n }\n })\n}\n","/**\n * `workspace` namespace dictionaries: the browsing region (section header,\n * search, tree rows, dialogs) and the pick/add flow. Runtime failure\n * messages (wire error strings) pass through untranslated by policy.\n */\n\n/** Simplified Chinese dictionary (the key-set source of truth). */\nexport const zh = {\n 'defaultWorkspace.failed': '无法创建默认工作区,请通过“选择工作区”选择文件夹',\n 'draft.workspaceRequired': '请先选择工作区',\n 'draft.initializationFailed': '暂时无法填入草稿,请稍后重试',\n 'group.ungrouped': '未分组',\n 'group.running': '有会话正在运行',\n 'group.completed': '有会话已完成,未读',\n 'session.new': '新会话',\n 'session.untitled': '未命名',\n 'shortcut.noSession': '请先选择一个会话',\n 'shortcut.noPicker': '目录选择器不可用',\n 'shortcut.directoryBusy': '正在选择或添加工作区',\n 'shortcut.noCompletedTurn': '当前会话没有已结束的轮次',\n 'shortcut.forkFailed': '无法分叉会话,请重试',\n 'section.workspaces': '工作区',\n 'section.sessions': '会话',\n 'viewOptions.label': '视图选项',\n 'groupBy.label': '分组方式',\n 'groupBy.workspace': '按工作区',\n 'groupBy.workspaceTree': '按工作区树',\n 'groupBy.flat': '单列表',\n 'orderBy.label': '排序方式',\n 'orderBy.manual': '手动排序',\n 'orderBy.updated': '最近更新',\n 'filterBy.label': '筛选会话',\n 'viewOptions.hideArchived': '隐藏已归档',\n 'viewOptions.showArchived': '全部对话(显示已归档)',\n 'viewOptions.onlyArchived': '仅显示已归档',\n 'sessions.expand': '展开其余 {n} 个会话',\n 'sessions.collapse': '收起',\n 'empty.none': '暂无会话',\n 'empty.noneArchived': '暂无已归档会话',\n 'empty.viewOthers': '查看其他会话',\n 'empty.noMatches': '无匹配结果',\n 'workspace.add': '添加工作区',\n 'search.sessions.aria': '搜索会话',\n 'search.placeholder': '搜索会话名称',\n 'search.clear': '清除搜索',\n 'search.results.aria': '搜索结果',\n 'search.pending': '正在搜索会话历史…',\n 'search.noMatches': '无匹配会话',\n 'search.hasMore': '仅显示前 {n} 条结果,请缩小搜索范围。',\n 'menu.addWorkspace': '添加工作区…',\n 'picker.loading': '正在加载工作区…',\n 'conflict.named': '已存在名为“{name}”的工作区。',\n 'folderError.title': '无法打开文件夹',\n 'folderError.retry': '重新选择',\n 'rename': '重命名',\n 'rename.workspace.title': '重命名工作区',\n 'rename.session.title': '重命名会话',\n 'field.workspaceName': '工作区名称',\n 'field.sessionName': '会话名称',\n 'delete.workspace': '删除工作区',\n 'delete.desc': '将把“{name}”从工作区列表中移除。文件夹与会话记录会保留,其会话将显示在“未分组”下。',\n 'delete.pending': '正在删除工作区…',\n 'menu.fork': '分叉会话',\n 'menu.archiveSession': '归档会话',\n 'menu.unarchiveSession': '取消归档',\n 'menu.pinSession': '置顶会话',\n 'menu.unpinSession': '取消置顶',\n 'menu.sessionId': '复制 Session ID',\n 'toast.sessionIdCopied': 'Session ID 已复制',\n 'toast.sessionIdCopyFailed': '复制失败,请重试',\n 'row.archived': '已归档',\n 'row.pinned': '已置顶',\n 'toast.archivedNotOpenable': '已归档对话暂时无法查看,请取消归档后查看',\n 'toast.archived': '会话已归档,可',\n 'toast.stoppedAndArchived': '已停止并归档,可',\n 'archive.confirm.title': '停止并归档此会话?',\n 'archive.confirm.desc': '“{title}”仍有正在进行的工作。归档会先停止这些工作;之后可在侧栏筛选“全部对话(显示已归档)”中恢复会话,被停止的工作不会自动继续。',\n 'archive.confirm.activity': '将被停止的工作',\n 'archive.confirm.turn': '进行中的回合',\n 'archive.confirm.subagents.one': '{n} 个运行中的子智能体:{names}',\n 'archive.confirm.subagents.other': '{n} 个运行中的子智能体:{names}',\n 'archive.confirm.jobs.one': '{n} 个后台任务:{names}',\n 'archive.confirm.jobs.other': '{n} 个后台任务:{names}',\n 'archive.confirm.schedules.one': '{n} 条定时提醒:{names}',\n 'archive.confirm.schedules.other': '{n} 条定时提醒:{names}',\n 'archive.confirm.other.one': '{n} 项其他工作({kind})',\n 'archive.confirm.other.other': '{n} 项其他工作({kind})',\n 'archive.confirm.listSeparator': '、',\n 'archive.confirm.action': '停止并归档',\n 'archive.confirm.pending': '正在停止并归档…',\n 'toast.archivedUndo': '撤销',\n 'toast.archivedOr': '或',\n 'toast.archivedFilter': '筛选已归档会话',\n 'toast.pinFailed': '置顶失败,请稍后重试',\n 'toast.unpinFailed': '取消置顶失败,请稍后重试',\n 'toast.createFailed': '新建会话失败:{message}',\n 'toast.forkRequiresOpen': '请先打开原会话完成迁移,再创建分支',\n 'toast.openForkSource': '打开原会话',\n 'sessions.count.one': '{n} 个会话',\n 'sessions.count.other': '{n} 个会话',\n 'actions.workspace.aria': '工作区“{name}”的操作',\n 'actions.session.aria': '会话“{name}”的操作',\n 'actions.archive': '归档会话',\n 'actions.unarchive': '取消归档',\n 'actions.pin': '置顶会话',\n 'actions.unpin': '取消置顶',\n 'actions.newSession': '新会话',\n 'actions.newSession.aria': '在“{name}”中新建会话',\n 'status.running': '进行中',\n 'status.subagentsRunning.one': '{n} 个子智能体运行中',\n 'status.subagentsRunning.other': '{n} 个子智能体运行中',\n 'status.idle': '空闲',\n 'status.waitingApproval': '等待审批',\n 'status.planReview': '计划待审',\n 'status.waitingAnswer': '等待回答',\n 'status.compact.approval': '待审批',\n 'status.compact.planReview': '计划待审',\n 'status.compact.answer': '待回答',\n 'status.completed': '已完成',\n 'hover.created': '创建于 {time}',\n 'hover.copied': '已复制',\n 'date.ymd': '{y}年{m}月{d}日',\n 'time.now': '刚刚',\n 'time.minutes': '{n}分钟',\n 'time.hours': '{n}小时',\n 'time.days': '{n}天',\n 'time.months': '{n}个月',\n 'time.years': '{n}年',\n 'time.ago': '{t}前',\n 'attention.section.running': '运行中',\n 'attention.section.unread': '未读',\n 'attention.row.open': '打开会话 {title}',\n 'attention.row.openPinned': '打开置顶会话 {title}',\n 'attention.row.unpin': '取消置顶',\n} satisfies Record<string, string>\n\n/** The workspace namespace key union. */\nexport type WorkspaceKey = keyof typeof zh\n\n/** English dictionary, checked complete against the zh key set. */\nexport const en = {\n 'defaultWorkspace.failed': 'Unable to create default workspace. Use Choose workspace to select a folder.',\n 'draft.workspaceRequired': 'Choose a workspace first.',\n 'draft.initializationFailed': 'Could not fill the draft. Please try again shortly.',\n 'group.ungrouped': 'Ungrouped',\n 'group.running': 'A session is running',\n 'group.completed': 'A session finished and is unread',\n 'session.new': 'New Session',\n 'session.untitled': 'Untitled',\n 'shortcut.noSession': 'Select a session first',\n 'shortcut.noPicker': 'Directory picker unavailable',\n 'shortcut.directoryBusy': 'Selecting or adding a workspace',\n 'shortcut.noCompletedTurn': 'This session has no completed turn',\n 'shortcut.forkFailed': 'Could not fork the session. Try again.',\n 'section.workspaces': 'Workspaces',\n 'section.sessions': 'Sessions',\n 'viewOptions.label': 'View options',\n 'groupBy.label': 'Group by',\n 'groupBy.workspace': 'WorkSpace',\n 'groupBy.workspaceTree': 'Workspace Tree',\n 'groupBy.flat': 'In one list',\n 'orderBy.label': 'Order by',\n 'orderBy.manual': 'Manual',\n 'orderBy.updated': 'Last updated',\n 'filterBy.label': 'Filter sessions',\n 'viewOptions.hideArchived': 'Hide archived',\n 'viewOptions.showArchived': 'All conversations (show archived)',\n 'viewOptions.onlyArchived': 'Archived only',\n 'sessions.expand': 'Show {n} more sessions',\n 'sessions.collapse': 'Show less',\n 'empty.none': 'No sessions yet',\n 'empty.noneArchived': 'No archived sessions yet',\n 'empty.viewOthers': 'View other sessions',\n 'empty.noMatches': 'No matches',\n 'workspace.add': 'Add workspace',\n 'search.sessions.aria': 'Search sessions',\n 'search.placeholder': 'Search session names',\n 'search.clear': 'Clear search',\n 'search.results.aria': 'Search results',\n 'search.pending': 'Searching session history…',\n 'search.noMatches': 'No matching sessions',\n 'search.hasMore': 'Showing the first {n} results. Narrow your search.',\n 'menu.addWorkspace': 'Add workspace…',\n 'picker.loading': 'Loading workspaces…',\n 'conflict.named': 'A workspace named “{name}” already exists.',\n 'folderError.title': 'Couldn’t open folder',\n 'folderError.retry': 'Choose again',\n 'rename': 'Rename',\n 'rename.workspace.title': 'Rename workspace',\n 'rename.session.title': 'Rename session',\n 'field.workspaceName': 'Workspace name',\n 'field.sessionName': 'Session name',\n 'delete.workspace': 'Delete workspace',\n 'delete.desc': 'This removes “{name}” from the workspace list. The folder and session logs will be kept. Its sessions will appear under Ungrouped.',\n 'delete.pending': 'Deleting workspace…',\n 'menu.fork': 'Fork session',\n 'menu.archiveSession': 'Archive session',\n 'menu.unarchiveSession': 'Unarchive session',\n 'menu.pinSession': 'Pin session',\n 'menu.unpinSession': 'Unpin session',\n 'menu.sessionId': 'Copy Session ID',\n 'toast.sessionIdCopied': 'Session ID copied',\n 'toast.sessionIdCopyFailed': 'Copy failed. Try again.',\n 'row.archived': 'Archived',\n 'row.pinned': 'Pinned',\n 'toast.archivedNotOpenable': 'Archived sessions cannot be opened. Unarchive it to view.',\n 'toast.archived': 'Session archived. You can ',\n 'toast.stoppedAndArchived': 'Session stopped and archived. You can ',\n 'archive.confirm.title': 'Stop and archive this session?',\n 'archive.confirm.desc': '“{title}” still has work in progress. Archiving stops it first; you can restore the session later from the “All conversations (show archived)” filter in the sidebar, and the stopped work will not resume on its own.',\n 'archive.confirm.activity': 'Work that will be stopped',\n 'archive.confirm.turn': 'The turn in progress',\n 'archive.confirm.subagents.one': '{n} running subagent: {names}',\n 'archive.confirm.subagents.other': '{n} running subagents: {names}',\n 'archive.confirm.jobs.one': '{n} background job: {names}',\n 'archive.confirm.jobs.other': '{n} background jobs: {names}',\n 'archive.confirm.schedules.one': '{n} scheduled reminder: {names}',\n 'archive.confirm.schedules.other': '{n} scheduled reminders: {names}',\n 'archive.confirm.other.one': '{n} other item of work ({kind})',\n 'archive.confirm.other.other': '{n} other items of work ({kind})',\n 'archive.confirm.listSeparator': ', ',\n 'archive.confirm.action': 'Stop and archive',\n 'archive.confirm.pending': 'Stopping and archiving…',\n 'toast.archivedUndo': 'undo',\n 'toast.archivedOr': ' or ',\n 'toast.archivedFilter': 'filter archived sessions',\n 'toast.pinFailed': 'Pin failed. Try again later.',\n 'toast.unpinFailed': 'Unpin failed. Try again later.',\n 'toast.createFailed': 'New session failed: {message}',\n 'toast.forkRequiresOpen': 'Open the original session to complete migration before creating a branch.',\n 'toast.openForkSource': 'Open original session',\n 'sessions.count.one': '{n} session',\n 'sessions.count.other': '{n} sessions',\n 'actions.workspace.aria': 'Workspace actions for {name}',\n 'actions.session.aria': 'Session actions for {name}',\n 'actions.archive': 'Archive',\n 'actions.unarchive': 'Unarchive',\n 'actions.pin': 'Pin',\n 'actions.unpin': 'Unpin',\n 'actions.newSession': 'New session',\n 'actions.newSession.aria': 'New session in {name}',\n 'status.running': 'Running',\n 'status.subagentsRunning.one': '{n} subagent running',\n 'status.subagentsRunning.other': '{n} subagents running',\n 'status.idle': 'Idle',\n 'status.waitingApproval': 'Waiting for approval',\n 'status.planReview': 'Plan awaiting review',\n 'status.waitingAnswer': 'Waiting for answer',\n 'status.compact.approval': 'Approval',\n 'status.compact.planReview': 'Plan review',\n 'status.compact.answer': 'Answer',\n 'status.completed': 'Completed',\n 'hover.created': 'Created {time}',\n 'hover.copied': 'Copied',\n 'date.ymd': '{y}-{m}-{d}',\n 'time.now': 'now',\n 'time.minutes': '{n}min',\n 'time.hours': '{n}h',\n 'time.days': '{n}d',\n 'time.months': '{n}mo',\n 'time.years': '{n}y',\n 'time.ago': '{t} ago',\n 'attention.section.running': 'Running',\n 'attention.section.unread': 'Unread',\n 'attention.row.open': 'Open session {title}',\n 'attention.row.openPinned': 'Open pinned session {title}',\n 'attention.row.unpin': 'Unpin session',\n} satisfies Record<WorkspaceKey, string>\n\n/** Japanese copy, checked against the English keys. */\nexport const ja = {\n 'defaultWorkspace.failed': 'デフォルトのワークスペースを作成できません。ワークスペースを選択してフォルダーを選んでください。',\n 'draft.workspaceRequired': '先にワークスペースを選択してください。',\n 'draft.initializationFailed': '下書きを埋め込めませんでした。しばらくしてからもう一度お試しください。',\n 'group.ungrouped': 'グループなし',\n 'group.running': 'セッションが実行中です',\n 'group.completed': '終了して未読のセッションがあります',\n 'session.new': '新しいセッション',\n 'session.untitled': '無題',\n 'shortcut.noSession': '先にセッションを選択してください',\n 'shortcut.noPicker': 'ディレクトリピッカーを利用できません',\n 'shortcut.directoryBusy': 'ワークスペースを選択または追加しています',\n 'shortcut.noCompletedTurn': 'このセッションには完了したターンがありません',\n 'shortcut.forkFailed': 'セッションをフォークできませんでした。もう一度お試しください。',\n 'section.workspaces': 'ワークスペース',\n 'section.sessions': 'セッション',\n 'viewOptions.label': '表示オプション',\n 'groupBy.label': 'グループ化',\n 'groupBy.workspace': 'ワークスペース',\n 'groupBy.workspaceTree': 'ワークスペースツリー',\n 'groupBy.flat': '1つのリスト',\n 'orderBy.label': '並び順',\n 'orderBy.manual': '手動',\n 'orderBy.updated': '最終更新',\n 'filterBy.label': 'セッションを絞り込む',\n 'viewOptions.hideArchived': 'アーカイブを非表示',\n 'viewOptions.showArchived': 'すべての会話(アーカイブを表示)',\n 'viewOptions.onlyArchived': 'アーカイブのみ',\n 'sessions.expand': 'さらに{n}件のセッションを表示',\n 'sessions.collapse': '折りたたむ',\n 'empty.none': 'セッションはまだありません',\n 'empty.noneArchived': 'アーカイブされたセッションはまだありません',\n 'empty.viewOthers': '他のセッションを表示',\n 'empty.noMatches': '一致なし',\n 'workspace.add': 'ワークスペースを追加',\n 'search.sessions.aria': 'セッションを検索',\n 'search.placeholder': 'セッション名を検索',\n 'search.clear': '検索をクリア',\n 'search.results.aria': '検索結果',\n 'search.pending': 'セッション履歴を検索中…',\n 'search.noMatches': '一致するセッションはありません',\n 'search.hasMore': '最初の{n}件の結果を表示しています。検索を絞り込んでください。',\n 'menu.addWorkspace': 'ワークスペースを追加…',\n 'picker.loading': 'ワークスペースを読み込み中…',\n 'conflict.named': '「{name}」という名前のワークスペースは既に存在します。',\n 'folderError.title': 'フォルダーを開けませんでした',\n 'folderError.retry': '選び直す',\n 'rename': '名前を変更',\n 'rename.workspace.title': 'ワークスペース名を変更',\n 'rename.session.title': 'セッション名を変更',\n 'field.workspaceName': 'ワークスペース名',\n 'field.sessionName': 'セッション名',\n 'delete.workspace': 'ワークスペースを削除',\n 'delete.desc': '「{name}」をワークスペース一覧から削除します。フォルダとセッションログは保持されます。このワークスペースのセッションは「未分類」に表示されます。',\n 'delete.pending': 'ワークスペースを削除中…',\n 'menu.fork': 'セッションをフォーク',\n 'menu.archiveSession': 'セッションをアーカイブ',\n 'menu.unarchiveSession': 'セッションのアーカイブを解除',\n 'menu.pinSession': 'セッションをピン留め',\n 'menu.unpinSession': 'セッションのピン留めを解除',\n 'menu.sessionId': 'セッションIDをコピー',\n 'toast.sessionIdCopied': 'セッションIDをコピーしました',\n 'toast.sessionIdCopyFailed': 'コピーに失敗しました。もう一度お試しください。',\n 'row.archived': 'アーカイブ済み',\n 'row.pinned': 'ピン留め済み',\n 'toast.archivedNotOpenable': 'アーカイブ済みセッションは開けません。アーカイブを解除して表示してください。',\n 'toast.archived': 'セッションをアーカイブしました。',\n 'toast.stoppedAndArchived': 'セッションを停止してアーカイブしました。',\n 'archive.confirm.title': 'このセッションを停止してアーカイブしますか?',\n 'archive.confirm.desc': '「{title}」には進行中の作業があります。アーカイブするとまず停止されます。セッションは後からサイドバーの「すべての会話(アーカイブを表示)」フィルターで復元できますが、停止された作業は自動的に再開されません。',\n 'archive.confirm.activity': '停止される作業',\n 'archive.confirm.turn': '進行中のターン',\n 'archive.confirm.subagents.one': '実行中のサブエージェント {n} 件: {names}',\n 'archive.confirm.subagents.other': '実行中のサブエージェント {n} 件: {names}',\n 'archive.confirm.jobs.one': 'バックグラウンドジョブ {n} 件: {names}',\n 'archive.confirm.jobs.other': 'バックグラウンドジョブ {n} 件: {names}',\n 'archive.confirm.schedules.one': 'スケジュールされたリマインダー {n} 件: {names}',\n 'archive.confirm.schedules.other': 'スケジュールされたリマインダー {n} 件: {names}',\n 'archive.confirm.other.one': 'その他の作業 {n} 件({kind})',\n 'archive.confirm.other.other': 'その他の作業 {n} 件({kind})',\n 'archive.confirm.listSeparator': '、',\n 'archive.confirm.action': '停止してアーカイブ',\n 'archive.confirm.pending': '停止してアーカイブ中…',\n 'toast.archivedUndo': '元に戻す',\n 'toast.archivedOr': ' または ',\n 'toast.archivedFilter': 'アーカイブ済みセッションを絞り込む',\n 'toast.pinFailed': 'ピン留めに失敗しました。後でもう一度お試しください。',\n 'toast.unpinFailed': 'ピン留めの解除に失敗しました。後でもう一度お試しください。',\n 'toast.createFailed': '新しいセッションの作成に失敗しました: {message}',\n 'toast.forkRequiresOpen': 'ブランチを作成する前に、移行を完了するため元のセッションを開いてください。',\n 'toast.openForkSource': '元のセッションを開く',\n 'sessions.count.one': 'セッション {n} 件',\n 'sessions.count.other': 'セッション {n} 件',\n 'actions.workspace.aria': '{name} のワークスペース操作',\n 'actions.session.aria': '{name} のセッション操作',\n 'actions.archive': 'アーカイブ',\n 'actions.unarchive': 'アーカイブを解除',\n 'actions.pin': 'ピン留め',\n 'actions.unpin': 'ピン留めを解除',\n 'actions.newSession': '新しいセッション',\n 'actions.newSession.aria': '{name} で新しいセッション',\n 'status.running': '実行中',\n 'status.subagentsRunning.one': 'サブエージェント {n} 件が実行中',\n 'status.subagentsRunning.other': 'サブエージェント {n} 件が実行中',\n 'status.idle': '待機中',\n 'status.waitingApproval': '承認待ち',\n 'status.planReview': '計画のレビュー待ち',\n 'status.waitingAnswer': '回答待ち',\n 'status.compact.approval': '承認',\n 'status.compact.planReview': '計画レビュー',\n 'status.compact.answer': '回答',\n 'status.completed': '完了',\n 'hover.created': '作成日時 {time}',\n 'hover.copied': 'コピーしました',\n 'date.ymd': '{y}-{m}-{d}',\n 'time.now': '今',\n 'time.minutes': '{n}分',\n 'time.hours': '{n}時間',\n 'time.days': '{n}日',\n 'time.months': '{n}か月',\n 'time.years': '{n}年',\n 'time.ago': '{t}前',\n 'attention.section.running': '実行中',\n 'attention.section.unread': '未読',\n 'attention.row.open': 'セッション {title} を開く',\n 'attention.row.openPinned': 'ピン留めしたセッション {title} を開く',\n 'attention.row.unpin': 'ピン留めを解除',\n} satisfies Record<keyof typeof en, string>\n\n/** Spanish dictionary, checked against the English keys. */\nexport const es = {\n 'defaultWorkspace.failed': 'No se puede crear el espacio de trabajo predeterminado. Utilice Elegir espacio de trabajo para seleccionar una carpeta.',\n 'draft.workspaceRequired': 'Elija un espacio de trabajo primero.',\n 'draft.initializationFailed': 'No se pudo completar el borrador. Inténtelo de nuevo en breve.',\n 'group.ungrouped': 'Desagrupados',\n 'group.running': 'Hay una sesión en ejecución',\n 'group.completed': 'Una sesión terminó y no se ha leído',\n 'session.new': 'Nueva sesión',\n 'session.untitled': 'Sin título',\n 'shortcut.noSession': 'Seleccione una sesión primero',\n 'shortcut.noPicker': 'Selector de directorio no disponible',\n 'shortcut.directoryBusy': 'Seleccionar o agregar un espacio de trabajo',\n 'shortcut.noCompletedTurn': 'Esta sesión no tiene turno completo',\n 'shortcut.forkFailed': 'No se pudo bifurcar la sesión. Intentar otra vez.',\n 'section.workspaces': 'Espacios de trabajo',\n 'section.sessions': 'Sesiones',\n 'viewOptions.label': 'Ver opciones',\n 'groupBy.label': 'Agrupar por',\n 'groupBy.workspace': 'Espacio de trabajo',\n 'groupBy.workspaceTree': 'Árbol del espacio de trabajo',\n 'groupBy.flat': 'en una lista',\n 'orderBy.label': 'Ordenar por',\n 'orderBy.manual': 'manuales',\n 'orderBy.updated': 'Última actualización',\n 'filterBy.label': 'Filtrar sesiones',\n 'viewOptions.hideArchived': 'Ocultar archivado',\n 'viewOptions.showArchived': 'Todas las conversaciones (mostrar archivadas)',\n 'viewOptions.onlyArchived': 'Sólo archivado',\n 'sessions.expand': 'Mostrar {n} más sesiones',\n 'sessions.collapse': 'Mostrar menos',\n 'empty.none': 'Aún no hay sesiones',\n 'empty.noneArchived': 'Aún no hay sesiones archivadas',\n 'empty.viewOthers': 'Ver otras sesiones',\n 'empty.noMatches': 'No hay coincidencias',\n 'workspace.add': 'Agregar espacio de trabajo',\n 'search.sessions.aria': 'Buscar sesiones',\n 'search.placeholder': 'Buscar nombres de sesiones',\n 'search.clear': 'Borrar búsqueda',\n 'search.results.aria': 'Resultados de la búsqueda',\n 'search.pending': 'Buscando el historial de sesiones…',\n 'search.noMatches': 'No hay sesiones coincidentes',\n 'search.hasMore': 'Mostrando los primeros resultados de {n}. Limita tu búsqueda.',\n 'menu.addWorkspace': 'Agregar espacio de trabajo…',\n 'picker.loading': 'Cargando espacios de trabajo…',\n 'conflict.named': 'Ya existe un espacio de trabajo denominado \"{name}\".',\n 'folderError.title': 'No se pudo abrir la carpeta',\n 'folderError.retry': 'Elige de nuevo',\n 'rename': 'Cambiar nombre',\n 'rename.workspace.title': 'Cambiar nombre del espacio de trabajo',\n 'rename.session.title': 'Cambiar nombre de sesión',\n 'field.workspaceName': 'Nombre del espacio de trabajo',\n 'field.sessionName': 'Nombre de la sesión',\n 'delete.workspace': 'Eliminar espacio de trabajo',\n 'delete.desc': 'Esto elimina \"{name}\" de la lista de espacios de trabajo. Se conservarán los registros de carpetas y sesiones. Sus sesiones aparecerán en Desagrupadas.',\n 'delete.pending': 'Eliminando espacio de trabajo…',\n 'menu.fork': 'Crear una bifurcación de la sesión',\n 'menu.archiveSession': 'Sesión de archivo',\n 'menu.unarchiveSession': 'Desarchivar sesión',\n 'menu.pinSession': 'Fijar sesión',\n 'menu.unpinSession': 'Desfijar sesión',\n 'menu.sessionId': 'Copiar ID de sesión',\n 'toast.sessionIdCopied': 'ID de sesión copiada',\n 'toast.sessionIdCopyFailed': 'La copia falló. Intentar otra vez.',\n 'row.archived': 'Archivado',\n 'row.pinned': 'Fijado',\n 'toast.archivedNotOpenable': 'Las sesiones archivadas no se pueden abrir. Desarchivarlo para verlo.',\n 'toast.archived': 'Sesión archivada. tu puedes ',\n 'toast.stoppedAndArchived': 'Sesión detenida y archivada. tu puedes ',\n 'archive.confirm.title': '¿Detener y archivar esta sesión?',\n 'archive.confirm.desc': '“{title}” todavía tiene trabajo en progreso. Archivarlo lo detiene primero; puedes restaurar la sesión más tarde desde el filtro “Todas las conversaciones (mostrar archivadas)” en la barra lateral, y el trabajo detenido no se reanudará por sí solo.',\n 'archive.confirm.activity': 'Trabajo que será detenido',\n 'archive.confirm.turn': 'El turno en curso',\n 'archive.confirm.subagents.one': '{n} ejecutando subagente: {names}',\n 'archive.confirm.subagents.other': '{n} ejecutando subagentes: {names}',\n 'archive.confirm.jobs.one': 'Trabajo en segundo plano {n}: {names}',\n 'archive.confirm.jobs.other': 'Trabajos en segundo plano {n}: {names}',\n 'archive.confirm.schedules.one': 'Recordatorio programado {n}: {names}',\n 'archive.confirm.schedules.other': '{n} recordatorios programados: {names}',\n 'archive.confirm.other.one': '{n} otro elemento de trabajo ({kind})',\n 'archive.confirm.other.other': '{n} otros elementos de trabajo ({kind})',\n 'archive.confirm.listSeparator': ', ',\n 'archive.confirm.action': 'Detener y archivar',\n 'archive.confirm.pending': 'Deteniendo y archivando…',\n 'toast.archivedUndo': 'deshacer',\n 'toast.archivedOr': ' o ',\n 'toast.archivedFilter': 'filtrar sesiones archivadas',\n 'toast.pinFailed': 'No se pudo fijar. Inténtalo de nuevo más tarde.',\n 'toast.unpinFailed': 'No se pudo desfijar. Inténtalo de nuevo más tarde.',\n 'toast.createFailed': 'Nueva sesión falló: {message}',\n 'toast.forkRequiresOpen': 'Abra la sesión original para completar la migración antes de crear una rama.',\n 'toast.openForkSource': 'Abrir sesión original',\n 'sessions.count.one': 'Sesión {n}',\n 'sessions.count.other': 'Sesiones {n}',\n 'actions.workspace.aria': 'Acciones del espacio de trabajo para {name}',\n 'actions.session.aria': 'Acciones de sesión para {name}',\n 'actions.archive': 'Archivo',\n 'actions.unarchive': 'Desarchivar',\n 'actions.pin': 'Fijar',\n 'actions.unpin': 'Desfijar',\n 'actions.newSession': 'Nueva sesión',\n 'actions.newSession.aria': 'Nueva sesión en {name}',\n 'status.running': 'corriendo',\n 'status.subagentsRunning.one': 'Subagente {n} ejecutándose',\n 'status.subagentsRunning.other': 'Subagentes {n} ejecutándose',\n 'status.idle': 'inactivo',\n 'status.waitingApproval': 'Esperando aprobación',\n 'status.planReview': 'Plan pendiente de revisión',\n 'status.waitingAnswer': 'esperando respuesta',\n 'status.compact.approval': 'Aprobación',\n 'status.compact.planReview': 'Revisión del plan',\n 'status.compact.answer': 'respuesta',\n 'status.completed': 'Completado',\n 'hover.created': 'Creado {time}',\n 'hover.copied': 'Copiado',\n 'date.ymd': '{y}-{m}-{d}',\n 'time.now': 'ahora',\n 'time.minutes': '{n}min',\n 'time.hours': '{n}h',\n 'time.days': '{n}d',\n 'time.months': '{n}mo',\n 'time.years': '{n}y',\n 'time.ago': 'Hace {t}',\n 'attention.section.running': 'En ejecución',\n 'attention.section.unread': 'Sin leer',\n 'attention.row.open': 'Abrir la sesión {title}',\n 'attention.row.openPinned': 'Abrir la sesión fijada {title}',\n 'attention.row.unpin': 'Desfijar la sesión',\n} satisfies Record<keyof typeof en, string>\n\n/** French dictionary, checked against the English keys. */\nexport const fr = {\n 'defaultWorkspace.failed': 'Impossible de créer un espace de travail par défaut. Utilisez Choisir un espace de travail pour sélectionner un dossier.',\n 'draft.workspaceRequired': \"Choisissez d'abord un espace de travail.\",\n 'draft.initializationFailed': 'Impossible de remplir le projet. Veuillez réessayer sous peu.',\n 'group.ungrouped': 'Non groupé',\n 'group.running': 'Une session est en cours',\n 'group.completed': 'Une session est terminée et non lue',\n 'session.new': 'Nouvelle séance',\n 'session.untitled': 'Sans titre',\n 'shortcut.noSession': \"Sélectionnez d'abord une session\",\n 'shortcut.noPicker': 'Sélecteur de répertoire indisponible',\n 'shortcut.directoryBusy': \"Sélection ou ajout d'un espace de travail\",\n 'shortcut.noCompletedTurn': \"Cette session n'a pas de tour terminé\",\n 'shortcut.forkFailed': 'Impossible de bifurquer la session. Essayer à nouveau.',\n 'section.workspaces': 'Espaces de travail',\n 'section.sessions': 'Séances',\n 'viewOptions.label': 'Afficher les options',\n 'groupBy.label': 'Regrouper par',\n 'groupBy.workspace': 'Espace de travail',\n 'groupBy.workspaceTree': \"Arborescence de l'espace de travail\",\n 'groupBy.flat': 'Dans une liste',\n 'orderBy.label': 'Commander par',\n 'orderBy.manual': 'Manuel',\n 'orderBy.updated': 'Dernière mise à jour',\n 'filterBy.label': 'Filtrer les sessions',\n 'viewOptions.hideArchived': 'Masquer les archives',\n 'viewOptions.showArchived': 'Toutes les conversations (afficher les archives)',\n 'viewOptions.onlyArchived': 'Archivé uniquement',\n 'sessions.expand': 'Afficher {n} plus de sessions',\n 'sessions.collapse': 'Afficher moins',\n 'empty.none': \"Aucune séance pour l'instant\",\n 'empty.noneArchived': \"Aucune session archivée pour l'instant\",\n 'empty.viewOthers': 'Voir les autres séances',\n 'empty.noMatches': 'Aucune correspondance',\n 'workspace.add': 'Ajouter un espace de travail',\n 'search.sessions.aria': 'Rechercher des sessions',\n 'search.placeholder': 'Rechercher des noms de sessions',\n 'search.clear': 'Effacer la recherche',\n 'search.results.aria': 'Résultats de la recherche',\n 'search.pending': \"Recherche dans l'historique des sessions…\",\n 'search.noMatches': 'Aucune session correspondante',\n 'search.hasMore': 'Affichage des premiers résultats {n}. Affinez votre recherche.',\n 'menu.addWorkspace': 'Ajouter un espace de travail…',\n 'picker.loading': 'Chargement des espaces de travail…',\n 'conflict.named': 'Un espace de travail nommé « {name} » existe déjà.',\n 'folderError.title': \"Impossible d'ouvrir le dossier\",\n 'folderError.retry': 'Choisir à nouveau',\n 'rename': 'Renommer',\n 'rename.workspace.title': \"Renommer l'espace de travail\",\n 'rename.session.title': 'Renommer la session',\n 'field.workspaceName': \"Nom de l'espace de travail\",\n 'field.sessionName': 'Nom de la séance',\n 'delete.workspace': \"Supprimer l'espace de travail\",\n 'delete.desc': 'Cela supprime « {name} » de la liste des espaces de travail. Les journaux de dossiers et de sessions seront conservés. Ses sessions apparaîtront sous Non groupées.',\n 'delete.pending': \"Suppression de l'espace de travail…\",\n 'menu.fork': 'Créer une branche de la session',\n 'menu.archiveSession': \"Séance d'archivage\",\n 'menu.unarchiveSession': 'Session de désarchivage',\n 'menu.pinSession': 'Épingler la session',\n 'menu.unpinSession': 'Désépingler la session',\n 'menu.sessionId': \"Copier l'ID de session\",\n 'toast.sessionIdCopied': 'ID de session copié',\n 'toast.sessionIdCopyFailed': 'La copie a échoué. Essayer à nouveau.',\n 'row.archived': 'Archivé',\n 'row.pinned': 'Épinglé',\n 'toast.archivedNotOpenable': 'Les sessions archivées ne peuvent pas être ouvertes. Désarchivez-le pour le visualiser.',\n 'toast.archived': 'Séance archivée. Vous pouvez ',\n 'toast.stoppedAndArchived': 'Session arrêtée et archivée. Vous pouvez ',\n 'archive.confirm.title': 'Arrêter et archiver cette session ?',\n 'archive.confirm.desc': \"« {title} » a encore des travaux en cours. L'archivage l'arrête en premier ; vous pouvez restaurer la session plus tard à partir du filtre « Toutes les conversations (afficher les archives) » dans la barre latérale, et le travail arrêté ne reprendra pas de lui-même.\",\n 'archive.confirm.activity': 'Travaux qui seront arrêtés',\n 'archive.confirm.turn': 'Le tour en cours',\n 'archive.confirm.subagents.one': \"Sous-agent en cours d'exécution {n} : {names}\",\n 'archive.confirm.subagents.other': '{n} exécutant des sous-agents : {names}',\n 'archive.confirm.jobs.one': 'Travail en arrière-plan {n} : {names}',\n 'archive.confirm.jobs.other': 'Travaux en arrière-plan {n} : {names}',\n 'archive.confirm.schedules.one': 'Rappel programmé {n} : {names}',\n 'archive.confirm.schedules.other': 'Rappels programmés {n} : {names}',\n 'archive.confirm.other.one': '{n} autre élément de travail ({kind})',\n 'archive.confirm.other.other': '{n} autres éléments de travail ({kind})',\n 'archive.confirm.listSeparator': ', ',\n 'archive.confirm.action': 'Arrêter et archiver',\n 'archive.confirm.pending': 'Arrêt et archivage…',\n 'toast.archivedUndo': 'annuler',\n 'toast.archivedOr': ' ou ',\n 'toast.archivedFilter': 'filtrer les sessions archivées',\n 'toast.pinFailed': 'L’épinglage a échoué. Réessayez plus tard.',\n 'toast.unpinFailed': 'Impossible de désépingler. Réessayez plus tard.',\n 'toast.createFailed': 'Échec de la nouvelle session : {message}',\n 'toast.forkRequiresOpen': \"Ouvrez la session d'origine pour terminer la migration avant de créer une branche.\",\n 'toast.openForkSource': 'Ouvrir la session originale',\n 'sessions.count.one': 'Séance {n}',\n 'sessions.count.other': 'Séances {n}',\n 'actions.workspace.aria': \"Actions de l'espace de travail pour {name}\",\n 'actions.session.aria': 'Actions de session pour {name}',\n 'actions.archive': 'Archiver',\n 'actions.unarchive': 'Désarchiver',\n 'actions.pin': 'Épingler',\n 'actions.unpin': 'Désépingler',\n 'actions.newSession': 'Nouvelle séance',\n 'actions.newSession.aria': 'Nouvelle séance dans {name}',\n 'status.running': 'Courir',\n 'status.subagentsRunning.one': \"Sous-agent {n} en cours d'exécution\",\n 'status.subagentsRunning.other': \"Sous-agents {n} en cours d'exécution\",\n 'status.idle': 'Inactif',\n 'status.waitingApproval': \"En attente d'approbation\",\n 'status.planReview': \"Plan en attente d'examen\",\n 'status.waitingAnswer': 'En attente de réponse',\n 'status.compact.approval': 'Approbation',\n 'status.compact.planReview': 'Révision des plans',\n 'status.compact.answer': 'Réponse',\n 'status.completed': 'Terminé',\n 'hover.created': 'Créé {time}',\n 'hover.copied': 'Copié',\n 'date.ymd': '{y}-{m}-{d}',\n 'time.now': 'maintenant',\n 'time.minutes': '{n}min',\n 'time.hours': '{n}h',\n 'time.days': '{n}d',\n 'time.months': '{n}mo',\n 'time.years': '{n}y',\n 'time.ago': 'Il y a {t}',\n 'attention.section.running': 'En cours',\n 'attention.section.unread': 'Non lues',\n 'attention.row.open': 'Ouvrir la session {title}',\n 'attention.row.openPinned': 'Ouvrir la session épinglée {title}',\n 'attention.row.unpin': 'Désépingler la session',\n} satisfies Record<keyof typeof en, string>\n\n/** German dictionary, checked against the English keys. */\nexport const de = {\n 'defaultWorkspace.failed': 'Der Standardarbeitsbereich kann nicht erstellt werden. Verwenden Sie „Arbeitsbereich auswählen“, um einen Ordner auszuwählen.',\n 'draft.workspaceRequired': 'Wählen Sie zunächst einen Arbeitsbereich.',\n 'draft.initializationFailed': 'Der Entwurf konnte nicht ausgefüllt werden. Bitte versuchen Sie es in Kürze noch einmal.',\n 'group.ungrouped': 'Nicht gruppiert',\n 'group.running': 'Eine Sitzung läuft',\n 'group.completed': 'Eine Sitzung ist beendet und ungelesen',\n 'session.new': 'Neue Sitzung',\n 'session.untitled': 'Ohne Titel',\n 'shortcut.noSession': 'Wählen Sie zunächst eine Sitzung aus',\n 'shortcut.noPicker': 'Verzeichnisauswahl nicht verfügbar',\n 'shortcut.directoryBusy': 'Auswählen oder Hinzufügen eines Arbeitsbereichs',\n 'shortcut.noCompletedTurn': 'Diese Sitzung hat keine abgeschlossene Runde',\n 'shortcut.forkFailed': 'Die Sitzung konnte nicht aufgeteilt werden. Versuchen Sie es erneut.',\n 'section.workspaces': 'Arbeitsbereiche',\n 'section.sessions': 'Sitzungen',\n 'viewOptions.label': 'Optionen anzeigen',\n 'groupBy.label': 'Gruppieren nach',\n 'groupBy.workspace': 'WorkSpace',\n 'groupBy.workspaceTree': 'Arbeitsbereichsbaum',\n 'groupBy.flat': 'In einer Liste',\n 'orderBy.label': 'Bestellen nach',\n 'orderBy.manual': 'Handbuch',\n 'orderBy.updated': 'Zuletzt aktualisiert',\n 'filterBy.label': 'Sitzungen filtern',\n 'viewOptions.hideArchived': 'Archiviert ausblenden',\n 'viewOptions.showArchived': 'Alle Gespräche (archiviert anzeigen)',\n 'viewOptions.onlyArchived': 'Nur archiviert',\n 'sessions.expand': 'Weitere Sitzungen anzeigen {n}',\n 'sessions.collapse': 'Weniger anzeigen',\n 'empty.none': 'Noch keine Sitzungen',\n 'empty.noneArchived': 'Noch keine archivierten Sitzungen',\n 'empty.viewOthers': 'Andere Sitzungen anzeigen',\n 'empty.noMatches': 'Keine Übereinstimmungen',\n 'workspace.add': 'Arbeitsbereich hinzufügen',\n 'search.sessions.aria': 'Sitzungen suchen',\n 'search.placeholder': 'Suchen Sie nach Sitzungsnamen',\n 'search.clear': 'Suche löschen',\n 'search.results.aria': 'Suchergebnisse',\n 'search.pending': 'Sitzungsverlauf wird durchsucht…',\n 'search.noMatches': 'Keine passenden Sitzungen',\n 'search.hasMore': 'Zeigt die ersten {n}-Ergebnisse. Grenzen Sie Ihre Suche ein.',\n 'menu.addWorkspace': 'Arbeitsbereich hinzufügen…',\n 'picker.loading': 'Arbeitsbereiche werden geladen…',\n 'conflict.named': 'Ein Arbeitsbereich mit dem Namen „{name}“ ist bereits vorhanden.',\n 'folderError.title': 'Der Ordner konnte nicht geöffnet werden',\n 'folderError.retry': 'Wählen Sie erneut',\n 'rename': 'Umbenennen',\n 'rename.workspace.title': 'Arbeitsbereich umbenennen',\n 'rename.session.title': 'Sitzung umbenennen',\n 'field.workspaceName': 'Name des Arbeitsbereichs',\n 'field.sessionName': 'Sitzungsname',\n 'delete.workspace': 'Arbeitsbereich löschen',\n 'delete.desc': 'Dadurch wird „{name}“ aus der Arbeitsbereichsliste entfernt. Die Ordner- und Sitzungsprotokolle werden aufbewahrt. Seine Sitzungen werden unter „Nicht gruppiert“ angezeigt.',\n 'delete.pending': 'Arbeitsbereich wird gelöscht…',\n 'menu.fork': 'Sitzung abzweigen',\n 'menu.archiveSession': 'Archivsitzung',\n 'menu.unarchiveSession': 'Sitzung dearchivieren',\n 'menu.pinSession': 'Sitzung anheften',\n 'menu.unpinSession': 'Sitzung lösen',\n 'menu.sessionId': 'Sitzungs-ID kopieren',\n 'toast.sessionIdCopied': 'Sitzungs-ID kopiert',\n 'toast.sessionIdCopyFailed': 'Der Kopiervorgang ist fehlgeschlagen. Versuchen Sie es erneut.',\n 'row.archived': 'Archiviert',\n 'row.pinned': 'Angepinnt',\n 'toast.archivedNotOpenable': 'Archivierte Sitzungen können nicht geöffnet werden. Entpacken Sie es zur Ansicht.',\n 'toast.archived': 'Sitzung archiviert. Du kannst ',\n 'toast.stoppedAndArchived': 'Sitzung gestoppt und archiviert. Du kannst ',\n 'archive.confirm.title': 'Diese Sitzung stoppen und archivieren?',\n 'archive.confirm.desc': '„{title}“ ist noch in Arbeit. Die Archivierung stoppt es zunächst; Sie können die Sitzung später über den Filter „Alle Konversationen (archivierte anzeigen)“ in der Seitenleiste wiederherstellen, und die angehaltene Arbeit wird nicht von alleine fortgesetzt.',\n 'archive.confirm.activity': 'Arbeiten, die gestoppt werden',\n 'archive.confirm.turn': 'Die laufende Runde',\n 'archive.confirm.subagents.one': '{n}, laufender Subagent: {names}',\n 'archive.confirm.subagents.other': '{n}, auf dem Subagenten ausgeführt werden: {names}',\n 'archive.confirm.jobs.one': '{n} Hintergrundjob: {names}',\n 'archive.confirm.jobs.other': '{n} Hintergrundjobs: {names}',\n 'archive.confirm.schedules.one': '{n} geplante Erinnerung: {names}',\n 'archive.confirm.schedules.other': '{n} geplante Erinnerungen: {names}',\n 'archive.confirm.other.one': '{n} sonstiger Arbeitsgegenstand ({kind})',\n 'archive.confirm.other.other': '{n} sonstige Arbeiten ({kind})',\n 'archive.confirm.listSeparator': ', ',\n 'archive.confirm.action': 'Stoppen und archivieren',\n 'archive.confirm.pending': 'Stoppen und archivieren…',\n 'toast.archivedUndo': 'rückgängig machen',\n 'toast.archivedOr': ' oder ',\n 'toast.archivedFilter': 'Archivierte Sitzungen filtern',\n 'toast.pinFailed': 'Anheften fehlgeschlagen. Versuchen Sie es später erneut.',\n 'toast.unpinFailed': 'Lösen fehlgeschlagen. Versuchen Sie es später erneut.',\n 'toast.createFailed': 'Neue Sitzung fehlgeschlagen: {message}',\n 'toast.forkRequiresOpen': 'Öffnen Sie die ursprüngliche Sitzung, um die Migration abzuschließen, bevor Sie einen Zweig erstellen.',\n 'toast.openForkSource': 'Öffnen Sie die ursprüngliche Sitzung',\n 'sessions.count.one': '{n}-Sitzung',\n 'sessions.count.other': '{n}-Sitzungen',\n 'actions.workspace.aria': 'Arbeitsbereichsaktionen für {name}',\n 'actions.session.aria': 'Sitzungsaktionen für {name}',\n 'actions.archive': 'Archiv',\n 'actions.unarchive': 'Dearchivieren',\n 'actions.pin': 'Anheften',\n 'actions.unpin': 'Lösen',\n 'actions.newSession': 'Neue Sitzung',\n 'actions.newSession.aria': 'Neue Sitzung in {name}',\n 'status.running': 'Laufen',\n 'status.subagentsRunning.one': '{n}-Subagent läuft',\n 'status.subagentsRunning.other': '{n} Subagenten laufen',\n 'status.idle': 'Leerlauf',\n 'status.waitingApproval': 'Warten auf Genehmigung',\n 'status.planReview': 'Plan wartet auf Überprüfung',\n 'status.waitingAnswer': 'Warte auf Antwort',\n 'status.compact.approval': 'Zustimmung',\n 'status.compact.planReview': 'Planüberprüfung',\n 'status.compact.answer': 'Antwort',\n 'status.completed': 'Abgeschlossen',\n 'hover.created': 'Erstellt {time}',\n 'hover.copied': 'Kopiert',\n 'date.ymd': '{y}-{m}-{d}',\n 'time.now': 'jetzt',\n 'time.minutes': '{n}min',\n 'time.hours': '{n}h',\n 'time.days': '{n}d',\n 'time.months': '{n}mo',\n 'time.years': '{n}y',\n 'time.ago': 'Vor {t}',\n 'attention.section.running': 'Läuft',\n 'attention.section.unread': 'Ungelesen',\n 'attention.row.open': 'Sitzung {title} öffnen',\n 'attention.row.openPinned': 'Angeheftete Sitzung {title} öffnen',\n 'attention.row.unpin': 'Anheftung der Sitzung lösen',\n} satisfies Record<keyof typeof en, string>\n\n/** Russian dictionary, checked against the English keys. */\nexport const ru = {\n 'defaultWorkspace.failed': 'Невозможно создать рабочую область по умолчанию. Используйте «Выбрать рабочее пространство», чтобы выбрать папку.',\n 'draft.workspaceRequired': 'Сначала выберите рабочее место.',\n 'draft.initializationFailed': 'Не удалось заполнить черновик. Пожалуйста, повторите попытку в ближайшее время.',\n 'group.ungrouped': 'Разгруппировано',\n 'group.running': 'Есть выполняющаяся сессия',\n 'group.completed': 'Сессия завершилась, но не прочитана',\n 'session.new': 'Новая сессия',\n 'session.untitled': 'Без названия',\n 'shortcut.noSession': 'Сначала выберите сеанс',\n 'shortcut.noPicker': 'Выбор каталога недоступен.',\n 'shortcut.directoryBusy': 'Выбор или добавление рабочего пространства',\n 'shortcut.noCompletedTurn': 'В этой сессии нет завершенных ходов',\n 'shortcut.forkFailed': 'Не удалось разветвить сеанс. Попробуйте еще раз.',\n 'section.workspaces': 'Рабочие пространства',\n 'section.sessions': 'Сессии',\n 'viewOptions.label': 'Посмотреть варианты',\n 'groupBy.label': 'Группировать по',\n 'groupBy.workspace': 'Рабочее пространство',\n 'groupBy.workspaceTree': 'Дерево рабочей области',\n 'groupBy.flat': 'В одном списке',\n 'orderBy.label': 'Заказать по',\n 'orderBy.manual': 'Руководство',\n 'orderBy.updated': 'Последнее обновление',\n 'filterBy.label': 'Фильтровать сеансы',\n 'viewOptions.hideArchived': 'Скрыть в архиве',\n 'viewOptions.showArchived': 'Все разговоры (показать в архиве)',\n 'viewOptions.onlyArchived': 'Только в архиве',\n 'sessions.expand': 'Показать больше сеансов {n}',\n 'sessions.collapse': 'Показать меньше',\n 'empty.none': 'Сеансов пока нет',\n 'empty.noneArchived': 'Архивированных сессий пока нет',\n 'empty.viewOthers': 'Посмотреть другие сессии',\n 'empty.noMatches': 'Нет совпадений',\n 'workspace.add': 'Добавить рабочую область',\n 'search.sessions.aria': 'Поиск сеансов',\n 'search.placeholder': 'Поиск названий сеансов',\n 'search.clear': 'Очистить поиск',\n 'search.results.aria': 'Результаты поиска',\n 'search.pending': 'Поиск истории сеансов…',\n 'search.noMatches': 'Нет подходящих сеансов',\n 'search.hasMore': 'Показаны первые результаты {n}. Сузьте область поиска.',\n 'menu.addWorkspace': 'Добавить рабочее пространство…',\n 'picker.loading': 'Загрузка рабочих областей…',\n 'conflict.named': 'Рабочая область с именем «{name}» уже существует.',\n 'folderError.title': 'Не удалось открыть папку',\n 'folderError.retry': 'Выбрать еще раз',\n 'rename': 'Переименовать',\n 'rename.workspace.title': 'Переименовать рабочую область',\n 'rename.session.title': 'Переименовать сеанс',\n 'field.workspaceName': 'Имя рабочей области',\n 'field.sessionName': 'Имя сеанса',\n 'delete.workspace': 'Удалить рабочую область',\n 'delete.desc': 'Это удалит «{name}» из списка рабочей области. Журналы папок и сеансов будут сохранены. Его сеансы появятся в разделе «Разгруппировано».',\n 'delete.pending': 'Удаление рабочей области…',\n 'menu.fork': 'Создать ответвление сеанса',\n 'menu.archiveSession': 'Архив сеанса',\n 'menu.unarchiveSession': 'Разархивировать сеанс',\n 'menu.pinSession': 'Закрепить сеанс',\n 'menu.unpinSession': 'Открепить сеанс',\n 'menu.sessionId': 'Копировать идентификатор сеанса',\n 'toast.sessionIdCopied': 'Идентификатор сеанса скопирован.',\n 'toast.sessionIdCopyFailed': 'Копировать не удалось. Попробуйте еще раз.',\n 'row.archived': 'В архиве',\n 'row.pinned': 'Закреплено',\n 'toast.archivedNotOpenable': 'Архивированные сеансы невозможно открыть. Разархивируйте его для просмотра.',\n 'toast.archived': 'Сессия заархивирована. Вы можете ',\n 'toast.stoppedAndArchived': 'Сеанс остановлен и заархивирован. Вы можете ',\n 'archive.confirm.title': 'Остановить и заархивировать этот сеанс?',\n 'archive.confirm.desc': 'Над «{title}» все еще ведется работа. Архивирование останавливает его первым; восстановить сессию можно позже из фильтра «Все разговоры (показать в архиве)» в боковой панели, при этом остановленная работа не возобновится сама по себе.',\n 'archive.confirm.activity': 'Работа, которая будет остановлена',\n 'archive.confirm.turn': 'Текущий ход',\n 'archive.confirm.subagents.one': '{n} работающий субагент: {names}',\n 'archive.confirm.subagents.other': '{n} работающие субагенты: {names}',\n 'archive.confirm.jobs.one': '{n} фоновое задание: {names}',\n 'archive.confirm.jobs.other': '{n} фоновые задания: {names}',\n 'archive.confirm.schedules.one': 'Запланированное напоминание {n}: {names}',\n 'archive.confirm.schedules.other': 'Запланированные напоминания {n}: {names}',\n 'archive.confirm.other.one': '{n} другой элемент работы ({kind})',\n 'archive.confirm.other.other': '{n} прочие работы ({kind})',\n 'archive.confirm.listSeparator': ', ',\n 'archive.confirm.action': 'Остановить и заархивировать',\n 'archive.confirm.pending': 'Остановка и архивирование…',\n 'toast.archivedUndo': 'отменить',\n 'toast.archivedOr': ' или ',\n 'toast.archivedFilter': 'фильтровать архивированные сеансы',\n 'toast.pinFailed': 'Не удалось закрепить. Повторите попытку позже.',\n 'toast.unpinFailed': 'Не удалось открепить. Повторите попытку позже.',\n 'toast.createFailed': 'Не удалось создать новый сеанс: {message}.',\n 'toast.forkRequiresOpen': 'Откройте исходный сеанс, чтобы завершить миграцию, прежде чем создавать ветку.',\n 'toast.openForkSource': 'Открыть исходный сеанс',\n 'sessions.count.one': 'Сеанс {n}',\n 'sessions.count.other': 'Сессии {n}',\n 'actions.workspace.aria': 'Действия рабочей области для {name}',\n 'actions.session.aria': 'Действия сеанса для {name}',\n 'actions.archive': 'Архив',\n 'actions.unarchive': 'Разархивировать',\n 'actions.pin': 'Закрепить',\n 'actions.unpin': 'Открепить',\n 'actions.newSession': 'Новая сессия',\n 'actions.newSession.aria': 'Новая сессия в {name}',\n 'status.running': 'Бег',\n 'status.subagentsRunning.one': 'Субагент {n} работает',\n 'status.subagentsRunning.other': 'Субагенты {n} работают',\n 'status.idle': 'Простой',\n 'status.waitingApproval': 'Ожидание одобрения',\n 'status.planReview': 'План ожидает рассмотрения',\n 'status.waitingAnswer': 'Ожидание ответа',\n 'status.compact.approval': 'Одобрение',\n 'status.compact.planReview': 'Обзор плана',\n 'status.compact.answer': 'Ответ',\n 'status.completed': 'Завершено',\n 'hover.created': 'Создано {time}',\n 'hover.copied': 'Скопировано',\n 'date.ymd': '{y}-{m}-{d}',\n 'time.now': 'сейчас',\n 'time.minutes': '{n}мин',\n 'time.hours': '{n}h',\n 'time.days': '{n}d',\n 'time.months': '{n}mo',\n 'time.years': '{n}y',\n 'time.ago': '{t} назад',\n 'attention.section.running': 'Выполняется',\n 'attention.section.unread': 'Непрочитанные',\n 'attention.row.open': 'Открыть сеанс {title}',\n 'attention.row.openPinned': 'Открыть закреплённый сеанс {title}',\n 'attention.row.unpin': 'Открепить сеанс',\n} satisfies Record<keyof typeof en, string>\n\n/** Portuguese dictionary, checked against the English keys. */\nexport const pt = {\n 'defaultWorkspace.failed': 'Não foi possível criar o espaço de trabalho padrão. Use Escolher espaço de trabalho para selecionar uma pasta.',\n 'draft.workspaceRequired': 'Escolha um espaço de trabalho primeiro.',\n 'draft.initializationFailed': 'Não foi possível preencher o rascunho. Por favor, tente novamente em breve.',\n 'group.ungrouped': 'Desagrupado',\n 'group.running': 'Há uma sessão em execução',\n 'group.completed': 'Uma sessão terminou e não foi lida',\n 'session.new': 'Nova sessão',\n 'session.untitled': 'Sem título',\n 'shortcut.noSession': 'Selecione uma sessão primeiro',\n 'shortcut.noPicker': 'Seletor de diretório indisponível',\n 'shortcut.directoryBusy': 'Selecionando ou adicionando um espaço de trabalho',\n 'shortcut.noCompletedTurn': 'Esta sessão não tem turno concluído',\n 'shortcut.forkFailed': 'Não foi possível bifurcar a sessão. Tente novamente.',\n 'section.workspaces': 'Espaços de trabalho',\n 'section.sessions': 'Sessões',\n 'viewOptions.label': 'Ver opções',\n 'groupBy.label': 'Agrupar por',\n 'groupBy.workspace': 'Espaço de trabalho',\n 'groupBy.workspaceTree': 'Árvore do espaço de trabalho',\n 'groupBy.flat': 'Em uma lista',\n 'orderBy.label': 'Encomendar por',\n 'orderBy.manual': 'Manuais',\n 'orderBy.updated': 'Última atualização',\n 'filterBy.label': 'Filtrar sessões',\n 'viewOptions.hideArchived': 'Ocultar arquivado',\n 'viewOptions.showArchived': 'Todas as conversas (mostrar arquivadas)',\n 'viewOptions.onlyArchived': 'Somente arquivado',\n 'sessions.expand': 'Mostrar mais {n} sessões',\n 'sessions.collapse': 'Mostrar menos',\n 'empty.none': 'Ainda não há sessões',\n 'empty.noneArchived': 'Ainda não há sessões arquivadas',\n 'empty.viewOthers': 'Ver outras sessões',\n 'empty.noMatches': 'Nenhuma correspondência',\n 'workspace.add': 'Adicionar espaço de trabalho',\n 'search.sessions.aria': 'Buscar sessões',\n 'search.placeholder': 'Pesquisar nomes de sessões',\n 'search.clear': 'Limpar pesquisa',\n 'search.results.aria': 'Resultados da pesquisa',\n 'search.pending': 'Pesquisando histórico da sessão…',\n 'search.noMatches': 'Nenhuma sessão correspondente',\n 'search.hasMore': 'Mostrando os primeiros {n} resultados. Restrinja sua pesquisa.',\n 'menu.addWorkspace': 'Adicionar espaço de trabalho…',\n 'picker.loading': 'Carregando áreas de trabalho…',\n 'conflict.named': 'Já existe um espaço de trabalho chamado “{name}”.',\n 'folderError.title': 'Não foi possível abrir a pasta',\n 'folderError.retry': 'Escolha novamente',\n 'rename': 'Renomear',\n 'rename.workspace.title': 'Renomear espaço de trabalho',\n 'rename.session.title': 'Renomear sessão',\n 'field.workspaceName': 'Nome do espaço de trabalho',\n 'field.sessionName': 'Nome da sessão',\n 'delete.workspace': 'Excluir espaço de trabalho',\n 'delete.desc': 'Isso remove “{name}” da lista de espaços de trabalho. A pasta e os logs de sessão serão mantidos. Suas sessões aparecerão em Desagrupado.',\n 'delete.pending': 'Excluindo espaço de trabalho…',\n 'menu.fork': 'Bifurcar sessão',\n 'menu.archiveSession': 'Sessão de arquivamento',\n 'menu.unarchiveSession': 'Desarquivar sessão',\n 'menu.pinSession': 'Fixar sessão',\n 'menu.unpinSession': 'Desafixar sessão',\n 'menu.sessionId': 'Copiar ID da sessão',\n 'toast.sessionIdCopied': 'ID da sessão copiado',\n 'toast.sessionIdCopyFailed': 'Falha na cópia. Tente novamente.',\n 'row.archived': 'Arquivado',\n 'row.pinned': 'Fixado',\n 'toast.archivedNotOpenable': 'As sessões arquivadas não podem ser abertas. Desarquive-o para visualizar.',\n 'toast.archived': 'Sessão arquivada. Você pode ',\n 'toast.stoppedAndArchived': 'Sessão interrompida e arquivada. Você pode ',\n 'archive.confirm.title': 'Parar e arquivar esta sessão?',\n 'archive.confirm.desc': '“{title}” ainda tem trabalho em andamento. O arquivamento interrompe primeiro; você pode restaurar a sessão posteriormente a partir do filtro “Todas as conversas (mostrar arquivadas)” na barra lateral, e o trabalho interrompido não será retomado por conta própria.',\n 'archive.confirm.activity': 'Obra que será interrompida',\n 'archive.confirm.turn': 'O turno em andamento',\n 'archive.confirm.subagents.one': '{n} subagente em execução: {names}',\n 'archive.confirm.subagents.other': '{n} executando subagentes: {names}',\n 'archive.confirm.jobs.one': '{n} trabalho em segundo plano: {names}',\n 'archive.confirm.jobs.other': '{n} trabalhos em segundo plano: {names}',\n 'archive.confirm.schedules.one': '{n} lembrete programado: {names}',\n 'archive.confirm.schedules.other': '{n} lembretes programados: {names}',\n 'archive.confirm.other.one': '{n} outro item de trabalho ({kind})',\n 'archive.confirm.other.other': '{n} outros itens de trabalho ({kind})',\n 'archive.confirm.listSeparator': ', ',\n 'archive.confirm.action': 'Pare e arquive',\n 'archive.confirm.pending': 'Parando e arquivando…',\n 'toast.archivedUndo': 'desfazer',\n 'toast.archivedOr': ' ou ',\n 'toast.archivedFilter': 'filtrar sessões arquivadas',\n 'toast.pinFailed': 'Não foi possível fixar. Tente novamente mais tarde.',\n 'toast.unpinFailed': 'Não foi possível desafixar. Tente novamente mais tarde.',\n 'toast.createFailed': 'Falha na nova sessão: {message}',\n 'toast.forkRequiresOpen': 'Abra a sessão original para concluir a migração antes de criar uma ramificação.',\n 'toast.openForkSource': 'Abrir sessão original',\n 'sessions.count.one': '{n} sessão',\n 'sessions.count.other': '{n} sessões',\n 'actions.workspace.aria': 'Ações do espaço de trabalho para {name}',\n 'actions.session.aria': 'Ações de sessão para {name}',\n 'actions.archive': 'Arquivo',\n 'actions.unarchive': 'Desarquivar',\n 'actions.pin': 'Fixar',\n 'actions.unpin': 'Desafixar',\n 'actions.newSession': 'Nova sessão',\n 'actions.newSession.aria': 'Nova sessão em {name}',\n 'status.running': 'Correndo',\n 'status.subagentsRunning.one': '{n} subagente em execução',\n 'status.subagentsRunning.other': '{n} subagentes em execução',\n 'status.idle': 'Inativo',\n 'status.waitingApproval': 'Aguardando aprovação',\n 'status.planReview': 'Plano aguardando revisão',\n 'status.waitingAnswer': 'Esperando por resposta',\n 'status.compact.approval': 'Aprovação',\n 'status.compact.planReview': 'Revisão do plano',\n 'status.compact.answer': 'Resposta',\n 'status.completed': 'Concluído',\n 'hover.created': 'Criado {time}',\n 'hover.copied': 'Copiado',\n 'date.ymd': '{y}-{m}-{d}',\n 'time.now': 'agora',\n 'time.minutes': '{n}min',\n 'time.hours': '{n}h',\n 'time.days': '{n}d',\n 'time.months': '{n} mês',\n 'time.years': '{n}s',\n 'time.ago': '{t} atrás',\n 'attention.section.running': 'Em execução',\n 'attention.section.unread': 'Não lidas',\n 'attention.row.open': 'Abrir a sessão {title}',\n 'attention.row.openPinned': 'Abrir a sessão fixada {title}',\n 'attention.row.unpin': 'Desafixar a sessão',\n} satisfies Record<keyof typeof en, string>\n","import { IconEditOutlineRegular, IconTrashOutlineRegular, IconPinFillRegular, IconPinOutlineRegular, IconUnarchiveOutlineRegular, IconArchiveOutlineRegular, IconBranchOutlineRegular, IconCopyOutlineRegular } from '@deepseek-ai/dsh-client-ui-primitives'\nimport { SessionMenu } from './session-actions/SessionMenu.tsx'\nimport type {} from '@deepseek-ai/dsh-client-ui-context-menu/client'\n/**\n * Workspace plugin, browser half. Two registrations: WorkspaceBrowser fills\n * the sidebar shell's `sidebar.workspaces` hole (the whole browsing region),\n * and WorkspacePicker fills the conversation hero's picker hole\n * (`conversation.hero.workspace` — both hero forms). Both read real Host\n * Workspaces through the global useWorkspaces hook, and each declares its\n * own `single` directory-flow child hole for the composed picker package's\n * client half. WorkspaceBrowser additionally declares the two Session row\n * action lists. Built-in Session menu actions contribute structured data to\n * ctx.contextMenus, while external React entries retain the legacy Slot. Dialogs and\n * the row-action notice register in `shell.overlay` (see the contract module doc). It also declares two\n * Session-row seats: the leading decoration a row renders only while its own\n * primary state is idle, and the section the row's hover card renders between\n * its relative time and its trailing status line. Export discipline:\n * packages/client/AGENTS.md.\n */\nimport type {} from '@deepseek-ai/dsh-client-product-analytics/client'\nimport type { Context } from '@deepseek-ai/cordis'\nimport type { RemoteHostFacts } from '@deepseek-ai/dsh-api-remotes/client'\nimport type { ISessions, SessionForkError } from '@deepseek-ai/dsh-api-session-controller/client'\nimport type {\n IWorkspaces, SessionActivity, WorkspaceArchiveError, WorkspaceId, WorkspaceSnapshot,\n} from '@deepseek-ai/dsh-api-workspace-controller/client'\nimport type { RemoteEndpoint } from '@deepseek-ai/dsh-api-remote-access/client'\nimport { createSnapshotStore } from '@deepseek-ai/dsh-client-store'\nimport { writeClipboard } from '@deepseek-ai/dsh-client-ui-primitives'\nimport type { HostObservable, SnapshotSelectorHook } from '@deepseek-ai/dsh-client-ui-slots'\nimport type { SessionId } from '@deepseek-ai/dsh-session/types'\n// Type-only: pulls the Controller service merges.\nimport type {} from '@deepseek-ai/dsh-api-session-controller/client'\nimport type {} from '@deepseek-ai/dsh-api-workspace-controller/client'\n// Type-only: pulls the locale plugin's Context merge (ctx.locale).\nimport type {} from '@deepseek-ai/dsh-client-locale/client'\n// Type-only: pulls the SlotRegistry service merge (ctx.slots).\nimport type {} from '@deepseek-ai/dsh-client-ui-renderer/client'\nimport type {} from '@deepseek-ai/dsh-client-ui-layout/client'\n// Type-only: pulls the Session root standard-hook merge.\nimport type {} from '@deepseek-ai/dsh-client-ui-session/client'\nimport {\n type ArchiveSessionInjected, type ForkSessionInjected, menuOpenStateFactory, type PinSessionInjected,\n type SessionArchiveConfirmInjected, type SessionArchiveConfirmRequest,\n type RenameSessionInjected, type RowToast, type RowToastInjected, type RowToastState, type SessionRenameDialogInjected,\n type WorkspaceActionRequest, type SessionIdInjected, type WorkspaceBrowserInjected, type WorkspacePickerInjected,\n} from './contract/slots.ts'\nimport { createWorkspaceShortcutControls, installWorkspaceShortcuts } from './shortcuts.ts'\nimport { UiWorkspaceService } from './navigation.ts'\nimport { createWorkspaceViewStore } from './stores.ts'\nimport { createAttentionStore } from './attention/model.ts'\nimport { WorkspaceBrowser } from './rows/WorkspaceBrowser.tsx'\nimport { ArchiveSessionRowButton, SessionArchiveConfirmDialog } from './session-actions/ArchiveSession.tsx'\nimport { derive } from './session-actions/derived.ts'\nimport { registerSessionMenus } from './session-actions/context-menus.tsx'\nimport { PinSessionRowButton } from './session-actions/PinSession.tsx'\nimport { SessionRenameDialog } from './session-actions/RenameSession.tsx'\nimport { RowActionToast } from './session-actions/RowActionToast.tsx'\nimport { registerToasts } from './toast/register.ts'\nimport { WorkspacePicker } from './WorkspacePicker.tsx'\nimport { en, ja, es, fr, de, ru, pt, zh, type WorkspaceKey } from './locales.ts'\n\nexport type { StartSessionOptions, UiWorkspace } from './navigation.ts'\nexport type {\n DirectoryFlowOwnerProps, DirectoryFlowSlotName, DirectoryPickingHooks, DirectoryPickingInjected,\n MenuOpenState, RowToast, SessionRenameTarget, SessionRowOwnerProps, UseMenuOpenState, WorkspaceBrowserInjected,\n SessionRowScheduleOwnerProps,\n WorkspaceBrowserProps,\n WorkspacePickerInjected, WorkspacePickerProps,\n} from './contract/slots.ts'\nexport type { WorkspaceKey } from './locales.ts'\n\n/** Localized follow-up text for the existing archive notice. */\nexport interface ArchiveNotice {\n readonly text: string\n readonly tone: 'success' | 'warning'\n}\n\ndeclare module '@deepseek-ai/cordis' {\n interface Events {\n /**\n * Replace the archive notice with a localized follow-up description.\n * @param sessionId - Session whose archive has succeeded.\n * @param next - fallback to the remaining notice providers.\n * @mode waterfall\n */\n 'workspace/archive-notice'(sessionId: SessionId, next: () => Promise<ArchiveNotice | undefined>): Promise<ArchiveNotice | undefined>\n /**\n * Replace the archive notice when an admitted background operation fails.\n * @param sessionId - Session whose successful archive remains in effect.\n * @param text - localized failure and recovery guidance.\n * @mode emit\n */\n 'workspace/archive-followup-failed'(sessionId: SessionId, text: string): void\n /**\n * Restore the plain archive notice when an announced follow-up ended without acting.\n * @param sessionId - Session whose successful archive remains in effect.\n * @mode emit\n */\n 'workspace/archive-followup-settled'(sessionId: SessionId): void\n }\n}\n\ndeclare module '@deepseek-ai/dsh-client-ui-slots' {\n interface GlobalStandardProps {\n /** Selector hook over the pure Workspace Controller snapshot. */\n useWorkspaces: SnapshotSelectorHook<WorkspaceSnapshot>\n /** Whether the current Peer may call `action` on one Workspace resource. */\n useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean\n }\n\n interface LocaleNamespaceMap {\n /** The workspace browsing region and pick/create flow copy. */\n workspace: WorkspaceKey\n }\n}\n\ndeclare module '@deepseek-ai/dsh-api-session-controller/client' {\n interface SessionReferenceSourceMap {\n workspaceOperation: unknown\n }\n}\n\n/** Dictionary namespace owned by this plugin. */\nconst NS = 'workspace'\n\n/**\n * Required services (cordis fiber inject). The target slots are declared by\n * the ui-sidebar / ui-conversation applies, whose activation order relative\n * to this one is NOT constrained: dsh.client.inject edges are informational\n * (loading/prefetch metadata, never apply sequencing) and neither owner\n * provides a waitable service. apply therefore depends on each slot\n * declaration through `slots.inject()` instead of assuming order.\n */\nexport const inject = ['contextMenus',\n 'slots', 'sessions', 'uiSession', 'workspaces', 'locale', 'remote', 'remote.directoryPicker', 'layout', 'shortcuts',\n 'remoteAccess',\n]\n\n/**\n * Register the browser and picker once their slot declarations are on the\n * ledger. Inject factories return plain callbacks; data reads use the\n * framework's global hooks.\n * @param ctx - client root context.\n */\nexport function apply(ctx: Context): void {\n const sessions = ctx.get('sessions') as ISessions\n const workspaces = ctx.get('workspaces') as IWorkspaces\n // One viewing-store instance, created here as ui-layout does for its layout\n // store: the browser declares the handle, and the UiWorkspace service writes\n // view order through the same instance the renderer hands the browser.\n const viewHandle = createWorkspaceViewStore()\n const viewInstance = viewHandle.create()\n const viewStore: typeof viewHandle = { ...viewHandle, create: () => viewInstance }\n const rowToast = createSnapshotStore<RowToastState | null>(null)\n let toastSeq = 0\n const notify = (toast: RowToast): void => { rowToast.set({ ...toast, seq: ++toastSeq }) }\n const uiWorkspace = new UiWorkspaceService(\n ctx, ctx.remote.directoryPicker, workspaces, sessions, viewInstance.actions, notify,\n )\n ctx.slots.provideRoot({\n hooks: { workspaces: workspaces.list },\n keyedHooks: {\n workspaceAccess: (workspaceId, action) => action === undefined\n ? undefined\n : ctx.remoteAccess.source('workspace', workspaceId, action),\n },\n })\n ctx.effect(() => ctx.locale.register(NS, { zh, en, ja, es, fr, de, ru, pt }), 'ui-workspace: dictionaries')\n const shortcutControls = createWorkspaceShortcutControls()\n\n const searchSessions: WorkspaceBrowserInjected['searchSessions'] = async (query, signal) => {\n const result = await sessions.search(query, signal)\n if (!result.ok) throw new Error(result.error.message)\n return result.value\n }\n\n // Stable per-surface occupancy sources (the renderer's hook cache keys by\n // source identity): true while the surface's directory-flow hole is filled.\n const flowSource = (hole: 'sidebar.workspaces.directoryFlow' | 'conversation.hero.workspace.directoryFlow'): HostObservable<boolean> => ({\n getSnapshot: () => ctx.slots.entries(hole).length > 0,\n subscribe: listener => ctx.slots.subscribe(hole, listener),\n })\n const browserFlowSource = flowSource('sidebar.workspaces.directoryFlow')\n const hostInfo: HostObservable<RemoteHostFacts> = {\n getSnapshot: () => ctx.remote.$host,\n subscribe: listener => ctx.on('connection/reset', listener),\n }\n const pickerFlowSource = flowSource('conversation.hero.workspace.directoryFlow')\n const openSession: WorkspaceBrowserInjected['open'] = (sessionId) => {\n uiWorkspace.openSession(sessionId)\n }\n // Registry-global sets as Sets, rebuilt only when the Workspace snapshot changes.\n const pinnedSet = derive(workspaces.list, snapshot => new Set<SessionId>(snapshot.pinnedSessionIds))\n const archivedSet = derive(workspaces.list, snapshot => new Set<SessionId>(snapshot.archivedSessionIds))\n // The attention region folds four sources other plugins own — the Session list,\n // the Session status map, and the two registry sets derived just above — and\n // writes nothing: no unread bookkeeping, no projection refresh. It is created\n // here, after its inputs, so it subscribes to the same Set instances the row\n // actions read.\n const attention = createAttentionStore(sessions.list, ctx.uiSession.sessionStatus, pinnedSet, archivedSet)\n ctx.effect(() => () => { attention.dispose() }, 'ui-workspace: attention model')\n // Plugin-private facts the row actions and their overlay surfaces share:\n // the pending rename request and the notice on display. Each business\n // writes through its own injected callback and the surface reads through\n // its bound hook.\n const renameRequest = derive(shortcutControls.state, state => state.renameTarget)\n const archiveRequest = createSnapshotStore<SessionArchiveConfirmRequest | null>(null)\n const requestSessionRename = shortcutControls.rename\n const unarchiveSession = (sessionId: SessionId): void => {\n uiWorkspace.unarchiveSession(sessionId).catch((reason: unknown) => {\n console.warn('session unarchive rejected:', reason)\n })\n }\n const renameSession: SessionRenameDialogInjected['renameSession'] = async (sessionId, title) => {\n const result = await sessions.using(\n sessionId,\n { source: 'workspaceOperation' },\n reference => reference.binding.session.rename(title),\n )\n if (!result.ok) throw new Error(result.error.message)\n }\n // The row action and the attention region issue the same Host call, so a\n // refusal raises the same notice for both.\n const unpinSession = (sessionId: SessionId): void => {\n uiWorkspace.unpinSession(sessionId).catch(() => { notify({ kind: 'unpinFailed' }) })\n }\n const pinInjected = (): PinSessionInjected => ({\n hooks: { pinned: pinnedSet, archived: archivedSet },\n // Pin failures surface as a notice: nothing else on the surface moves, so\n // a silent failure would read as a dead action.\n pinSession: (sessionId) => {\n uiWorkspace.pinSession(sessionId).catch(() => { notify({ kind: 'pinFailed' }) })\n },\n unpinSession: unpinSession,\n })\n ctx.on('workspace/archive-followup-failed', (sessionId, text) => {\n if (archivedSet.getSnapshot().has(sessionId)) notify({ kind: 'archived', sessionId, message: text, tone: 'warning' })\n })\n ctx.on('workspace/archive-followup-settled', (sessionId) => {\n if (archivedSet.getSnapshot().has(sessionId)) notify({ kind: 'archived', sessionId })\n })\n const archiveNotice = async (sessionId: SessionId, kind: 'archived' | 'stoppedAndArchived'): Promise<void> => {\n let message: ArchiveNotice | undefined\n try {\n message = await ctx.waterfall('workspace/archive-notice', sessionId, () => Promise.resolve(undefined))\n } catch (error) {\n console.warn('session archive notice unavailable:', error)\n }\n notify({ kind, sessionId, ...message === undefined ? {} : { message: message.text, tone: message.tone } })\n }\n const archiveInjected = (): ArchiveSessionInjected => ({\n hooks: { archived: archivedSet },\n // Archive preserves the log and the account position, so a quiet Session\n // needs no confirmation; the notice offers undo and the archived filter.\n // The Host's refusal for running work is the one case that asks first:\n // the confirmation names that work and offers to stop it.\n archiveSession: (sessionId) => {\n uiWorkspace.archiveSession(sessionId).then(() => archiveNotice(sessionId, 'archived')).catch((reason: unknown) => {\n const activity = activeSessionRefusal(reason)\n if (activity === undefined) {\n console.warn('session archive rejected:', reason)\n return\n }\n const displayTitle = sessions.list.getSnapshot().byId[sessionId]?.displayTitle ?? sessionId\n archiveRequest.set({ sessionId, displayTitle, activity })\n })\n },\n unarchiveSession,\n })\n installWorkspaceShortcuts(ctx, uiWorkspace, shortcutControls, archiveInjected().archiveSession,\n (reason) => { notify({ kind: 'shortcutForkFailed', reason }) })\n const archiveConfirmInjected = (): SessionArchiveConfirmInjected => ({\n hooks: { archiveRequest },\n settleSessionArchive: () => { archiveRequest.set(null) },\n stopAndArchiveSession: async (sessionId) => {\n await uiWorkspace.archiveSession(sessionId, { stopActivity: true })\n await archiveNotice(sessionId, 'stoppedAndArchived')\n },\n })\n const forkInjected = (): ForkSessionInjected => ({\n forkSession: (sessionId) => {\n uiWorkspace.forkSession(sessionId, (childId) => {\n ctx.get('productAnalytics')?.track('branch_session_click', { session_id: childId, parent_session_id: sessionId, click_position: 'sidebar' })\n }, { allowMigration: false }).catch((error: unknown) => {\n if (error instanceof Error && error.name === 'SessionForkError'\n && (error as SessionForkError).rpcError.code === 'session/migration-required') {\n notify({ kind: 'forkRequiresOpen', sessionId })\n }\n })\n },\n })\n const sessionIdInjected = (): SessionIdInjected => ({\n copySessionId: async (sessionId) => {\n const copied = await writeClipboard(sessionId)\n notify({ kind: copied ? 'sessionIdCopied' : 'sessionIdCopyFailed' })\n },\n })\n const renameInjected = (): RenameSessionInjected => ({ requestSessionRename })\n const renameDialogInjected = (): SessionRenameDialogInjected => ({\n hooks: { renameRequest },\n settleSessionRename: shortcutControls.closeRename,\n renameSession,\n })\n const toastActions = {\n undoArchive: unarchiveSession,\n showArchived: () => { viewInstance.actions.setArchivedFilter('show') },\n openForkSource: (sessionId: SessionId) => {\n if (workspaces.list.getSnapshot().archivedSessionIds.includes(sessionId)) {\n notify({ kind: 'archivedNotOpenable' })\n return\n }\n openSession(sessionId)\n },\n }\n registerToasts(ctx, viewStore, toastActions)\n const rowToastInjected = (): Pick<RowToastInjected, 'hooks' | 'dismissToast'> => ({\n hooks: { toast: rowToast },\n dismissToast: () => { rowToast.set(null) },\n })\n const workspaceActionRequest = createSnapshotStore<WorkspaceActionRequest | null>(null)\n const requestWorkspaceAction = (workspaceId: WorkspaceId, displayTitle: string, action: 'rename' | 'delete'): void => {\n const workspace = workspaces.list.getSnapshot().items.find(row => row.workspaceId === workspaceId)\n if (workspace === undefined || !ctx.remoteAccess.source('workspace', workspaceId, `workspace/${action}`).getSnapshot()) return\n workspaceActionRequest.set({ action, workspaceId, displayTitle, storedTitle: workspace.title })\n }\n ctx.slots.inject('contextMenu.icon', function* () {\n for (const [key, Icon] of Object.entries({\n 'workspace.rename': IconEditOutlineRegular, 'workspace.delete': IconTrashOutlineRegular,\n 'workspace.pin': IconPinOutlineRegular, 'workspace.unpin': IconPinFillRegular,\n 'workspace.archive': IconArchiveOutlineRegular, 'workspace.unarchive': IconUnarchiveOutlineRegular,\n 'workspace.fork': IconBranchOutlineRegular, 'workspace.copy': IconCopyOutlineRegular,\n })) yield ctx.slots.register({ name: 'contextMenu.icon', key }, Icon)\n })\n ctx.effect(() => ctx.contextMenus.register({\n id: 'workspace.rename', target: 'workspace', order: 100,\n resolve: ({ workspaceId, displayTitle }) => ctx.remoteAccess.source('workspace', workspaceId, 'workspace/rename').getSnapshot()\n ? [{ id: 'rename', label: ctx.locale.bind(NS)('rename'), icon: { key: 'workspace.rename' }, run: () => { requestWorkspaceAction(workspaceId, displayTitle, 'rename') } }] : [],\n }), 'workspace: rename menu action')\n ctx.effect(() => ctx.contextMenus.register({\n id: 'workspace.delete', target: 'workspace', order: 300,\n resolve: ({ workspaceId, displayTitle }) => ctx.remoteAccess.source('workspace', workspaceId, 'workspace/delete').getSnapshot()\n ? [{ id: 'delete', label: ctx.locale.bind(NS)('delete.workspace'), icon: { key: 'workspace.delete' }, danger: true, separatorBefore: true,\n run: () => { requestWorkspaceAction(workspaceId, displayTitle, 'delete') } }] : [],\n }), 'workspace: delete menu action')\n const browserInjected = (): WorkspaceBrowserInjected => ({\n settleWorkspaceAction: () => { workspaceActionRequest.set(null) },\n // Explicit group actions keep their target; unscoped New Session inherits\n // the current Session Workspace before the recent-Workspace fallback.\n startSession: (workspaceId, options) => { uiWorkspace.startSession(workspaceId, options) },\n open: openSession,\n searchSessions,\n searchResultLimit: sessions.searchResultLimit,\n requestSessionRename,\n notifyArchivedNotOpenable: () => { notify({ kind: 'archivedNotOpenable' }) },\n renameWorkspace: async (workspaceId, title) => { await workspaces.rename(workspaceId, title) },\n deleteWorkspace: async (workspaceId) => { await workspaces.delete(workspaceId) },\n insertWorkspaceBefore: async (workspaceId, beforeWorkspaceId) => {\n await workspaces.insertBefore(workspaceId, beforeWorkspaceId)\n },\n unarchiveSession: async (sessionId) => { await uiWorkspace.unarchiveSession(sessionId) },\n unpinSession,\n createWorkspace: input => workspaces.create(input),\n requestSearch: shortcutControls.search,\n requestAddWorkspace: shortcutControls.add,\n closeAddWorkspace: shortcutControls.closeAdd,\n setDirectoryBusy: shortcutControls.directoryBusy,\n hooks: { workspaceActionRequest, contextMenuTarget: ctx.contextMenus.active, directoryFlow: browserFlowSource, hostInfo,\n workspaceShortcuts: shortcutControls.state, shortcuts: ctx.shortcuts.catalog, attention },\n })\n const pickerInjected = (): WorkspacePickerInjected => ({\n createWorkspace: input => workspaces.create(input),\n hooks: { directoryFlow: pickerFlowSource },\n })\n // Each registration declares its owned children in the same call; slot\n // injection follows both the owner and declaration HMR lifetimes.\n ctx.slots.inject('sidebar.workspaces', () => ctx.slots.register(\n {\n name: 'sidebar.workspaces',\n children: {\n 'sidebar.workspaces.directoryFlow': { kind: 'single', scope: 'root' },\n 'sidebar.workspaces.session.row.action': { kind: 'list', scope: 'root' },\n 'sidebar.session.row.leading': { kind: 'list', scope: 'root', inline: true },\n 'sidebar.session.row.trailing': { kind: 'list', scope: 'root', inline: true },\n 'sidebar.session.row.hover': { kind: 'list', scope: 'root' },\n },\n store: viewStore,\n inject: browserInjected,\n locale: NS,\n },\n WorkspaceBrowser,\n ))\n ctx.slots.inject('contextMenu.content', () => ctx.slots.register({\n name: 'contextMenu.content', key: 'session',\n children: { 'sidebar.workspaces.session.menu.item': {\n kind: 'list', scope: 'root', inject: { hooks: { menuOpenState: menuOpenStateFactory, shortcuts: ctx.shortcuts.catalog } },\n } },\n }, SessionMenu))\n registerSessionMenus(ctx, {\n ...pinInjected(), ...archiveInjected(), ...renameInjected(), ...forkInjected(), ...sessionIdInjected(),\n })\n ctx.slots.inject('sidebar.workspaces.session.row.action', function* () {\n yield ctx.slots.register({ name: 'sidebar.workspaces.session.row.action', id: 'archive', order: 100, locale: NS, inject: archiveInjected }, ArchiveSessionRowButton)\n yield ctx.slots.register({ name: 'sidebar.workspaces.session.row.action', id: 'pin', order: 200, locale: NS, inject: pinInjected }, PinSessionRowButton)\n })\n // The surfaces the actions raise live in the frame-wide layer: they must\n // outlive the row menu the action sat in.\n ctx.slots.inject('shell.overlay', function* () {\n yield ctx.slots.register({\n name: 'shell.overlay', id: 'workspace.session-rename', locale: NS, inject: renameDialogInjected,\n }, SessionRenameDialog)\n yield ctx.slots.register({\n name: 'shell.overlay', id: 'workspace.session-archive', locale: NS, inject: archiveConfirmInjected,\n }, SessionArchiveConfirmDialog)\n yield ctx.slots.register({\n name: 'shell.overlay', id: 'workspace.row-toast', inject: rowToastInjected,\n children: { 'workspace.toast': { kind: 'keyed', scope: 'root' } },\n }, RowActionToast)\n })\n ctx.slots.inject('conversation.hero.workspace', () => ctx.slots.register(\n {\n name: 'conversation.hero.workspace',\n children: { 'conversation.hero.workspace.directoryFlow': { kind: 'single', scope: 'root' } },\n inject: pickerInjected,\n locale: NS,\n },\n WorkspacePicker,\n ))\n}\n\n/**\n * The activity a Host `workspace/session-active` refusal reported, or nothing\n * for any other failure. The class identity check goes by name: client plugin\n * bundles do not share error-class identity.\n */\nfunction activeSessionRefusal(reason: unknown): readonly SessionActivity[] | undefined {\n if (!(reason instanceof Error) || reason.name !== 'WorkspaceArchiveError') return undefined\n const { rpcError } = reason as WorkspaceArchiveError\n return rpcError.code === 'workspace/session-active' ? rpcError.details.activity : undefined\n}\n"],"x_google_ignoreList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QAAQ;KAAI,QAAQ;IAC7E,GAAG,mBAAmB;IACtB,MAAM,IAAI,MAAM,SAAS;KACvB,MAAM;KAAiB,IAAI;KAA6B,QAAQ;KAAI,QAAQ;IAC9E,GAAG,2BAA2B;IAC9B,MAAM,IAAI,MAAM,SAAS;KACvB,MAAM;KAAiB,IAAI;KAAuB,QAAQ;KAC1D,UAAU,EAAE,mBAAmB;MAAE,MAAM;MAAS,OAAO;KAAO,EAAE;IAClE,GAAG,cAAc;GACnB,CAAC;GACD,IAAI,MAAM,OAAO,qCAAqC,IAAI,MAAM,SAC9D;IACE,MAAM;IACN,UAAU,EAAE,6CAA6C;KAAE,MAAM;KAAU,OAAO;IAAO,EAAE;IAC3F,QAAQ;IACR,QAAQ;GACV,GACA,eACF,CAAC;EACH;;;;;;EAOA,SAAS,qBAAqB,QAAyD;GACrF,IAAI,EAAE,kBAAkB,UAAU,OAAO,SAAS,yBAAyB,OAAO,KAAA;GAClF,MAAM,EAAE,aAAa;GACrB,OAAO,SAAS,SAAS,6BAA6B,SAAS,QAAQ,WAAW,KAAA;EACpF"}
1
+ {"version":3,"file":"client.js","names":["useMemo","createSnapshotStore","assertNever","assertNever","defineStore","Service","createSnapshotStore","useRef","useState","Modal","Button","css","useRef","useMemo","relativeTime","css","useRowDragPreview","IconFolderOpenRegular","IconFolderCloseRegular","StateDot","IconTriangleRightFillRegular","Tooltip","IconNewChatOutlineRegular","HoverCard","IconPinFillRegular","IconArchiveOutlineRegular","IconUnarchiveOutlineRegular","useRef","useState","IconPlusOutlineRegular","useMemo","css","IconFolderCloseRegular","useCallback","Menu","Modal","Button","useState","css","rowStyles","IconTriangleRightFillRegular","HoverCardGroup","useState","Menu","IconFolderCloseRegular","IconWorkspaceTreeOutlineRegular","IconFlatListOutlineRegular","IconChevronsUpDownOutlineRegular","IconClockOutlineRegular","IconArchiveOffOutlineRegular","IconQueueOutlineRegular","IconArchiveCheckOutlineRegular","css","Tooltip","IconSlidersTwoOutlineRegular","IconArchiveOutlineRegular","useRef","useMemo","HoverCardGroup","AnimatedRows","useCallback","IconSearchOutlineRegular","IconCloseFillRegular","IconProjectAddOutlineRegular","Tooltip","css","IconUnarchiveOutlineRegular","IconArchiveOutlineRegular","useState","Modal","Button","browserCss","Tooltip","css","IconPinFillRegular","IconPinOutlineRegular","useState","useRef","Modal","Button","css","Toast","IconWarningOutlineRegular","createSnapshotStore","writeClipboard","IconEditOutlineRegular","IconTrashOutlineRegular","IconPinOutlineRegular","IconPinFillRegular","IconArchiveOutlineRegular","IconUnarchiveOutlineRegular","IconBranchOutlineRegular","IconCopyOutlineRegular"],"sources":["../src/client/session-actions/SessionMenu.tsx","../src/client/contract/slots.ts","../src/client/shortcuts.ts","../../../node_modules/.pnpm/@deepseek-ai+dsh-util-values@0.2.2-rc.2_@deepseek-ai+cordis@4.1.0/node_modules/@deepseek-ai/dsh-util-values/lib/index.js","../../../node_modules/.pnpm/@deepseek-ai+dsh-util-workspace-path@0.2.2-rc.2_@deepseek-ai+cordis@4.1.0/node_modules/@deepseek-ai/dsh-util-workspace-path/lib/index.js","../src/client/tree.ts","../src/client/stores.ts","../src/client/pin-order.ts","../src/client/navigation.ts","../src/client/attention/model.ts","../src/client/attention/taskbar.ts","../../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs","../src/client/rows/WorkspaceDialogs.tsx","../../../node_modules/.pnpm/@deepseek-ai+dsh-api-workspace-controller@0.2.2-rc.2_8738a0633759ef930cc9ff50823c3c50/node_modules/@deepseek-ai/dsh-api-workspace-controller/lib/types/default-workspace.js","../src/client/rows/Rows.tsx","../src/client/path-suffix.ts","../src/client/WorkspacePicker.tsx","../src/client/attention/AttentionSection.tsx","../src/client/rows/WorkspaceBrowser.tsx","../src/client/session-actions/ArchiveSession.tsx","../src/client/session-actions/derived.ts","../src/client/session-actions/context-menus.tsx","../src/client/session-actions/PinSession.tsx","../src/client/session-actions/RenameSession.tsx","../src/client/session-actions/RowActionToast.tsx","../src/client/toast/Toast.tsx","../src/client/toast/register.ts","../src/client/locales.ts","../src/client/index.ts"],"sourcesContent":["/** Legacy external Session contributions shared by the row, header, and More trigger. */\nimport { useMemo } from 'react'\nimport type { PropsRenderSlots, PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots'\n\ntype Props = Pick<PropsRuntime<'contextMenu.content'>, 'target' | 'dismiss'> & PropsRenderSlots<'sidebar.workspaces.session.menu.item'>\n/** @param props - captured Session and the existing extension position. @returns legacy component contributions. */\nexport function SessionMenu({ target, dismiss, renderSlot }: Props) {\n const hookContext = useMemo<readonly [boolean, (open: boolean) => void]>(() => [true, (open) => { if (!open) dismiss() }], [dismiss])\n if (target.kind !== 'session') return null\n return renderSlot('sidebar.workspaces.session.menu.item', target.value, {\n hookContext,\n })\n}\n","/**\n * ui-workspace contracts. Two registrations share this package:\n *\n * - WorkspaceBrowser fills the sidebar shell's `sidebar.workspaces` hole —\n * the whole browsing region (section header, search, grouped/flat session\n * list, workspace dialogs). It registers this package's viewing store and\n * consumes the shell's two-fact owner share (wide / expandSidebar).\n * - WorkspacePicker fills the conversation empty-state hole (menu + error\n * dialog shared with the browser).\n *\n * Both registrations declare a **directory-flow hole** (`single` kind): the\n * slot a composed picker package's client half fills with its\n * picking interaction — a renderless native-chooser driver or an in-app\n * browsing dialog. ui-workspace owns the trigger (the \"Add workspace…\"\n * entry, present only while the hole is occupied) and the adoption\n * semantics (`createWorkspace({ path })`, the retryable error dialog,\n * Choose again); the occupant owns everything between `open` and the picked path,\n * including creating a new directory to hand back. That occupant-owned\n * creation is why adding a workspace has a single route: an unoccupied hole\n * leaves the surface with no add affordance at all.\n * Two holes exist because the two menu surfaces are independent slot entries\n * and a hole has exactly one declaring entry — they carry the same owner\n * contract and the same occupant.\n *\n * WorkspaceBrowser declares the Session hover-button list. Its built-in\n * pin and archive entries share callbacks with the structured ctx.contextMenus\n * contributions. The Session menu adapter owns the legacy\n * `sidebar.workspaces.session.menu.item` Slot for external React entries;\n * they receive the captured row identity and render together before Archive.\n *\n * The browser entry additionally declares `list` seats per Session row\n * (`sidebar.session.row.leading`, `sidebar.session.row.trailing`, and\n * `sidebar.session.row.hover`) for ambient row decorations. They receive only\n * the row's Session identity; a Session binding would activate and retain\n * every listed Session.\n */\nimport type { ContextMenuTarget } from '@deepseek-ai/dsh-client-ui-context-menu/client'\nimport type {\n HostObservable, InjectFace, PropsHooks, PropsLocale, PropsRenderFactories, PropsRenderSlots, PropsRuntime, PropsStore, SlotHookFactory,\n} from '@deepseek-ai/dsh-client-ui-slots'\n// Type-only: pull the owner SlotMap merges into programs that resolve the\n// runtime shares below.\nimport type {} from '@deepseek-ai/dsh-client-ui-sidebar/client'\nimport type {} from '@deepseek-ai/dsh-client-ui-conversation/client'\nimport type {} from '@deepseek-ai/dsh-client-ui-layout/client'\nimport type { SessionSearchResultItem } from '@deepseek-ai/dsh-api-session-controller/client'\nimport type { RemoteHostFacts } from '@deepseek-ai/dsh-api-remotes/client'\nimport type { SessionActivity, WorkspaceId, WorkspaceView } from '@deepseek-ai/dsh-api-workspace-controller/client'\nimport type { SessionId } from '@deepseek-ai/dsh-session/types'\nimport type { ShortcutCatalogEntry } from '@deepseek-ai/dsh-client-shortcuts/client'\nimport type { WorkspaceShortcutState } from '../shortcuts.ts'\nimport type { StartSessionOptions } from '../navigation.ts'\nimport type { AttentionModel } from '../attention/model.ts'\nimport type {} from './toast.ts'\nimport type { createWorkspaceViewStore } from '../stores.ts'\n\ndeclare module '@deepseek-ai/dsh-client-ui-context-menu/client' {\n interface ContextMenuTargetMap {\n /** Registered Workspace header; path and title belong to the clicked row. */\n workspace: { readonly workspaceId: WorkspaceId; readonly path: string; readonly displayTitle: string }\n }\n}\n\n/** One request for the existing Workspace rename or delete dialog. */\nexport type WorkspaceActionRequest = {\n readonly action: 'rename' | 'delete'\n readonly workspaceId: WorkspaceId\n readonly displayTitle: string\n readonly storedTitle: string\n}\n\n/**\n * Owner share of the directory-flow holes: the complete conversation between\n * the trigger surface and the picking interaction. The occupant reads `open`\n * to run/render its interaction and reports exactly one outcome per open.\n */\nexport interface DirectoryFlowOwnerProps {\n /** True while a picking interaction is requested; flipping back to false withdraws the request. */\n open: boolean\n /** True while the owner adopts a picked path (`createWorkspace` in flight); occupants disable their commit affordances. */\n busy: boolean\n /** The operator picked a directory (absolute host path); the owner adopts it. */\n onPicked: (path: string) => void\n /** The operator dismissed the interaction; the owner just closes the flow. */\n onCancel: () => void\n /** The interaction itself failed (chooser missing, listing denied); the owner shows its error surface. */\n onError: (message: string) => void\n}\n\n/** Owner share of one Session row action occurrence: the row the action belongs to. */\nexport interface SessionRowOwnerProps {\n /** Session the row shows. */\n sessionId: SessionId\n /** Row display title: persisted title, or empty when the Session has none. */\n displayTitle: string\n}\n\n/** The row menu's open state as its owner holds it: the `useState` pair. */\nexport type MenuOpenState = readonly [open: boolean, setOpen: (open: boolean) => void]\n\n/**\n * Hook every row-menu entry receives. Rows only render while the menu is\n * open, so an entry reads it for the setter: `setOpen(false)` dismisses the\n * menu the entry sits in — the same state the owner's `onClose` sets.\n */\nexport type UseMenuOpenState = () => MenuOpenState\n\n/**\n * Bind the row's render occurrence into the entries' `useMenuOpenState` hook:\n * the owner supplies its open-state pair as the occurrence's `hookContext`,\n * and the hook hands that pair back.\n * @param _standard - framework standard props (unused).\n * @param state - the menu's open-state pair from the render occurrence.\n * @returns the hook the entry calls.\n */\nexport const menuOpenStateFactory: SlotHookFactory<'sidebar.workspaces.session.menu.item', UseMenuOpenState> =\n (_standard, state) => () => state\n\n/**\n * Owner share of the two Session-row schedule seats. Both receive only the\n * row's Session identity: the occupant reads that Session's own scheduled\n * tasks, and reading them activates nothing.\n */\nexport interface SessionRowScheduleOwnerProps {\n /** Session this row shows; the occupant addresses its own data by this id. */\n readonly sessionId: SessionId\n}\n\n/** Owner share of the trailing icon list; rendering does not bind the Session. */\nexport interface SessionRowTrailingOwnerProps {\n /** Session this row shows. */\n readonly sessionId: SessionId\n}\n\ndeclare module '@deepseek-ai/dsh-client-ui-slots' {\n interface SlotMap {\n /** Directory-flow hole under the conversation empty-state picker (declared by the WorkspacePicker entry). */\n 'conversation.hero.workspace.directoryFlow': { kind: 'single'; scope: 'root'; owner: DirectoryFlowOwnerProps }\n /** Directory-flow hole under the sidebar browsing region (declared by the WorkspaceBrowser entry). */\n 'sidebar.workspaces.directoryFlow': { kind: 'single'; scope: 'root'; owner: DirectoryFlowOwnerProps }\n /**\n * Leading decoration of one Session row, in the 16px cell before the title\n * that the row's own state dot otherwise occupies. A higher-priority state\n * (a pending interaction, a new message, live activity) replaces the seat\n * with that dot for the same row, so an occupant here never renders beside\n * a status dot and is mounted only by a row whose primary state is idle.\n * An archived row keeps that cell blank — neither its status dot nor this\n * seat renders there, and its live status appears on the hover card only.\n */\n 'sidebar.session.row.leading': { kind: 'list'; scope: 'root'; inline: true; owner: SessionRowScheduleOwnerProps }\n /**\n * Non-interactive icons after the row's time label, before its pin marker,\n * in ascending `order`. On hover-capable devices, hidden while the row is\n * hovered, has keyboard focus on itself or its actions, or has an open menu.\n * Hoverless devices keep the icons beside the menu trigger. Blank Sessions\n * omit the slot. Occupants address their own data by Session id; they must not\n * bind or retain the Session.\n */\n 'sidebar.session.row.trailing': { kind: 'list'; scope: 'root'; inline: true; owner: SessionRowTrailingOwnerProps }\n /**\n * Section of the Session row's hover card between its relative time and\n * its trailing status line. Mounted only while that card is open.\n */\n 'sidebar.session.row.hover': { kind: 'list'; scope: 'root'; owner: SessionRowScheduleOwnerProps }\n /**\n * Legacy external Session menu rows, in ascending `order`, rendered\n * together before the built-in Archive action. Built-in actions use\n * ctx.contextMenus; Slot priority cannot replace them. Each entry renders a\n * `role=\"menuitem\"` button, owns its visibility and localized label,\n * and dismisses through `useMenuOpenState`. The shared menu supplies\n * keyboard navigation and focus return.\n * @example\n * return {\n * inject: ['slots'],\n * apply(ctx) {\n * const copyLabel = 'Copy session title' // Localize in the contributing package.\n * ctx.slots.inject('sidebar.workspaces.session.menu.item', () => ctx.slots.register(\n * { name: 'sidebar.workspaces.session.menu.item', id: 'copy-session-title', order: 500 },\n * ({ displayTitle, useMenuOpenState }) => {\n * const [, setMenuOpen] = useMenuOpenState()\n * return React.createElement(\n * 'button',\n * {\n * type: 'button', role: 'menuitem',\n * onClick: () => { setMenuOpen(false); void navigator.clipboard.writeText(displayTitle) },\n * },\n * copyLabel,\n * )\n * },\n * ))\n * },\n * }\n */\n 'sidebar.workspaces.session.menu.item': {\n kind: 'list'\n scope: 'root'\n owner: SessionRowOwnerProps\n hookContext: MenuOpenState\n inject: { hooks: {\n menuOpenState: SlotHookFactory<'sidebar.workspaces.session.menu.item', UseMenuOpenState>\n shortcuts: HostObservable<readonly ShortcutCatalogEntry[]>\n } }\n }\n /**\n * The hover buttons at the end of one Session row, in ascending `order`,\n * after the \"...\" menu trigger. ui-workspace registers `archive` (100) and\n * `pin` (200) here. An entry renders one icon button (or nothing, when its\n * action does not apply to the row) and owns the action it performs. Clicks\n * inside the strip stay in the strip, so the button needs no propagation\n * handling to keep the row from opening. Hoverless devices hide this slot;\n * contribute the action to the menu list as well for touch access.\n */\n 'sidebar.workspaces.session.row.action': { kind: 'list'; scope: 'root'; owner: SessionRowOwnerProps }\n }\n}\n\n/** The two directory-flow holes; a flow package's client half registers its one component into both. */\nexport type DirectoryFlowSlotName =\n | 'conversation.hero.workspace.directoryFlow'\n | 'sidebar.workspaces.directoryFlow'\n\n/**\n * Directory-picking share both trigger surfaces consume. Occupancy rides the\n * inject face's reserved `hooks` compartment: the renderer binds the source\n * into the `useDirectoryFlow` selector hook, so an empty hole hides the\n * \"Add workspace…\" entry reactively and the surface withdraws an open\n * flow whose occupant unloaded mid-interaction (nobody is left to cancel).\n */\nexport type DirectoryPickingInjected = {\n hooks: {\n /** True while this surface's directory-flow hole is occupied. */\n directoryFlow: HostObservable<boolean>\n }\n}\n\n/** Component-side view of the picking share: the bound occupancy selector hook. */\nexport type DirectoryPickingHooks = PropsHooks<DirectoryPickingInjected['hooks']>\n\n/**\n * Browser-private injected share (arrives via the register inject factory).\n * Data reads use the global framework hooks; these are the Host actions the\n * browsing region drives.\n */\nexport type WorkspaceBrowserInjected = {\n /** Dismiss the settled Workspace dialog. */\n settleWorkspaceAction: () => void\n hooks: DirectoryPickingInjected['hooks'] & {\n workspaceActionRequest: HostObservable<WorkspaceActionRequest | null>\n contextMenuTarget: HostObservable<ContextMenuTarget | null>\n /**\n * Fixed Host facts, reached through a hook rather than injected as values:\n * the renderer memoizes an entry's inject result for the registration's\n * lifetime, so facts read there would freeze at whatever the first render\n * saw. Select the field the surface needs (`info => info.home`).\n */\n hostInfo: HostObservable<RemoteHostFacts>\n workspaceShortcuts: HostObservable<WorkspaceShortcutState>\n shortcuts: HostObservable<readonly ShortcutCatalogEntry[]>\n /**\n * The attention region's content, folded from the Session list, the Session\n * status map and the Workspace archive/pin sets. Owned by this plugin's store\n * so the region carries no state of its own and no second refresh path.\n */\n attention: HostObservable<AttentionModel>\n }\n /** Open the browser search and focus its input. */\n requestSearch: () => void\n /** Request the existing directory picker. */\n requestAddWorkspace: () => void\n /** Consume the directory-picker opening request. */\n closeAddWorkspace: () => void\n /** Publish directory interaction occupancy for command availability. */\n setDirectoryBusy: (busy: boolean) => void\n /**\n * Create a fresh Session, or preserve a reusable blank with explicit draft options.\n * Without an explicit Workspace, inherit the current Session Workspace,\n * then the recent Workspace, or clear into the New Session view.\n */\n startSession: (workspaceId?: WorkspaceId, options?: StartSessionOptions) => void\n /** Open a real Session. */\n open: (sessionId: SessionId) => void\n /**\n * Search current visible conversation messages. The Host fixes the result\n * bound; `hasMore` means the query needs narrowing.\n */\n searchSessions: (\n query: string,\n signal: AbortSignal,\n ) => Promise<{ items: readonly SessionSearchResultItem[]; hasMore: boolean }>\n /** Maximum number of merged rows rendered for one search. */\n searchResultLimit: number\n /** Open the Session rename dialog (a row title double-click); the rename action entry raises the same request. */\n requestSessionRename: (sessionId: SessionId, currentTitle: string) => void\n /** Tell the user an archived row cannot be opened (a click on it). */\n notifyArchivedNotOpenable: () => void\n /** Rename a Host Workspace (rejects on name conflict; resolves on durability). */\n renameWorkspace: (workspaceId: WorkspaceId, title: string) => Promise<void>\n /** Delete only a Host Workspace registration; directory and Session logs remain. */\n deleteWorkspace: (workspaceId: WorkspaceId) => Promise<void>\n /**\n * Reorder a Workspace in the durable registry display order.\n * Omitted anchor appends to the end.\n */\n insertWorkspaceBefore: (workspaceId: WorkspaceId, beforeWorkspaceId?: WorkspaceId) => Promise<void>\n /** Remove a Session from the registry-global archived set (the search results' restore button). */\n unarchiveSession: (sessionId: SessionId) => Promise<void>\n /** Adopt a picked host directory as a real Workspace before targeting a Session. */\n createWorkspace: (input: { path: string }) => Promise<WorkspaceView>\n}\n\n/** The browser's declared viewing store handle, shared with the row actions that write view state. */\nexport type WorkspaceViewStoreHandle = ReturnType<typeof createWorkspaceViewStore>\n\n/** Props of one legacy row-menu entry: owner share + locale seat + the entry's own injected share. */\nexport type SessionMenuItemProps<Injected extends object = object> =\n PropsRuntime<'sidebar.workspaces.session.menu.item'>\n & PropsLocale<'workspace'>\n & InjectFace<Injected>\n\n/** Props of one shipped row hover button: owner share + locale seat + the entry's own injected share. */\nexport type SessionRowActionProps<Injected extends object = object> =\n PropsRuntime<'sidebar.workspaces.session.row.action'>\n & PropsLocale<'workspace'>\n & InjectFace<Injected>\n\n/** One transient Workspace notice rendered by the overlay toast entry. */\nexport type RowToast =\n | { kind: 'archived'; sessionId: SessionId; message?: string; tone?: 'success' | 'warning' }\n | { kind: 'stoppedAndArchived'; sessionId: SessionId; message?: string; tone?: 'success' | 'warning' }\n | { kind: 'sessionIdCopied' }\n | { kind: 'sessionIdCopyFailed' }\n | { kind: 'pinFailed' }\n | { kind: 'unpinFailed' }\n | { kind: 'archivedNotOpenable' }\n | { kind: 'defaultWorkspaceFailed' }\n | { kind: 'forkRequiresOpen'; sessionId: SessionId }\n | { kind: 'shortcutForkFailed'; reason: 'unavailable' | 'failed' }\n /**\n * An explicit New Session request that failed. `message` is untranslated:\n * a Host refusal as `code: message` — the stable code stays in the copy so\n * a report can be searched by it — and any other failure's own message.\n */\n | { kind: 'createFailed'; message: string }\n\n/** The notice on display; `seq` keys remounts so a repeated notice restarts its hold. */\nexport type RowToastState = RowToast & { seq: number }\n\n/**\n * Pin action share (menu row and hover button). The callbacks carry the whole\n * behavior: the Host call, fronting the Session in its saved orders after a\n * pin, and the failure notice. The hooks are the registry-global sets as\n * Sets, so a row reads its own membership with one lookup.\n */\nexport interface PinSessionInjected {\n hooks: {\n /** Pinned Session ids. */\n pinned: HostObservable<ReadonlySet<SessionId>>\n /** Archived Session ids (pin does not apply to an archived row). */\n archived: HostObservable<ReadonlySet<SessionId>>\n }\n /** Pin a Session; on success it leads its accounts' saved orders, on failure the notice says so. */\n pinSession: (sessionId: SessionId) => void\n /** Unpin a Session; saved positions stay as they are. */\n unpinSession: (sessionId: SessionId) => void\n}\n\n/**\n * Archive action share (menu row and hover button). The callbacks carry the\n * whole behavior: the Host call, the notice a success raises, the\n * stop-and-archive confirmation a Host refusal for running work raises, and\n * the diagnostics for any other rejection.\n */\nexport interface ArchiveSessionInjected {\n hooks: {\n /** Archived Session ids. */\n archived: HostObservable<ReadonlySet<SessionId>>\n }\n /**\n * Archive a Session into the registry-global set: the row keeps its\n * account position and shows per the archived filter; archiving the\n * current session clears the selection into the New Session view state.\n * A Session with running work is not archived by this call: the Host's\n * refusal opens the stop-and-archive confirmation instead.\n */\n archiveSession: (sessionId: SessionId) => void\n /** Remove a Session from the registry-global archived set. */\n unarchiveSession: (sessionId: SessionId) => void\n}\n\n/**\n * A stop-and-archive confirmation the archive action asked for: the Host\n * refused the plain archive because this work still runs.\n */\nexport interface SessionArchiveConfirmRequest {\n /** Session to stop and archive. */\n sessionId: SessionId\n /** The row's display title, named in the dialog. */\n displayTitle: string\n /** What the Host reported running, in family order. */\n activity: readonly SessionActivity[]\n}\n\n/**\n * Stop-and-archive dialog share: the pending confirmation, its settlement,\n * and the archive hop that asks the Host to stop the work first.\n */\nexport interface SessionArchiveConfirmInjected {\n hooks: {\n /** The confirmation asked for, until the dialog consumes or cancels it. */\n archiveRequest: HostObservable<SessionArchiveConfirmRequest | null>\n }\n /** Consume or cancel the pending confirmation. */\n settleSessionArchive: () => void\n /**\n * Archive a Session after the Host stops its running work; resolves once\n * the archive set is durable (the stops settle in the background) and\n * raises the stopped-and-archived notice.\n */\n stopAndArchiveSession: (sessionId: SessionId) => Promise<void>\n}\n\n/** Fork action share. */\nexport interface ForkSessionInjected {\n /** Fork a Session at its last completed turn; the child arrives through the Host list. */\n forkSession: (sessionId: SessionId) => void\n}\n\n/** Rename action share: the row only raises the request; the dialog entry answers it. */\nexport interface RenameSessionInjected {\n /** Ask for the rename dialog, seeded with the row's current title. */\n requestSessionRename: (sessionId: SessionId, currentTitle: string) => void\n}\n\n/** Session ID action share; copying does not open the Session. */\nexport interface SessionIdInjected {\n /** Copy the complete id and report acceptance or failure through the global toast. */\n copySessionId: (sessionId: SessionId) => Promise<void>\n}\n\n/** A Session rename the rename action asked for; the dialog entry opens on it. */\nexport interface SessionRenameTarget {\n /** Session to rename. */\n sessionId: SessionId\n /** Title the dialog seeds its draft from. */\n currentTitle: string\n}\n\n/** Rename dialog share: the pending request, its settlement, and the rename hop the dialog confirms with. */\nexport interface SessionRenameDialogInjected {\n hooks: {\n /** The rename asked for, until the dialog consumes or cancels it. */\n renameRequest: HostObservable<SessionRenameTarget | null>\n }\n /** Consume or cancel the pending request. */\n settleSessionRename: () => void\n /** Rename a Session (explicit user title; resolves on host acceptance). */\n renameSession: (sessionId: SessionId, title: string) => Promise<void>\n}\n\n/** Existing overlay share: the current notice and its dismissal. */\nexport interface RowToastInjected {\n hooks: {\n /** The notice on display, or none. */\n toast: HostObservable<RowToastState | null>\n }\n /** Take the notice down. */\n dismissToast: () => void\n}\n\n/** Business callbacks injected into their keyed Toast presentations. */\nexport interface RowToastActions {\n /** Undo an archive from its notice. */\n undoArchive: (sessionId: SessionId) => void\n /** Switch the archived filter to \"show\" so the archived row is back in view. */\n showArchived: () => void\n /** Open the fork source without retrying the fork. */\n openForkSource: (sessionId: SessionId) => void\n}\n\n/** Props of the rename dialog entry in `shell.overlay`. */\nexport type SessionRenameDialogProps =\n PropsRuntime<'shell.overlay'>\n & PropsLocale<'workspace'>\n & Omit<SessionRenameDialogInjected, 'hooks'>\n & PropsHooks<SessionRenameDialogInjected['hooks']>\n\n/** Props of the stop-and-archive dialog entry in `shell.overlay`. */\nexport type SessionArchiveConfirmProps =\n PropsRuntime<'shell.overlay'>\n & PropsLocale<'workspace'>\n & Omit<SessionArchiveConfirmInjected, 'hooks'>\n & PropsHooks<SessionArchiveConfirmInjected['hooks']>\n\n/** Props of the existing overlay's keyed notice dispatcher. */\nexport type RowToastProps =\n PropsRuntime<'shell.overlay'>\n & PropsRenderSlots<'workspace.toast'>\n & Pick<RowToastInjected, 'dismissToast'>\n & PropsHooks<RowToastInjected['hooks']>\n\n/** Full browser props: shell owner share + viewing store + injected actions + the locale seat. */\nexport type WorkspaceBrowserProps =\n PropsRuntime<'sidebar.workspaces'>\n & PropsRenderFactories\n & PropsRenderSlots<\n | 'sidebar.workspaces.directoryFlow'\n | 'sidebar.workspaces.session.row.action'\n | 'sidebar.session.row.trailing'\n | 'sidebar.session.row.leading'\n | 'sidebar.session.row.hover'\n >\n & PropsStore<WorkspaceViewStoreHandle>\n & Omit<WorkspaceBrowserInjected, 'hooks'>\n & PropsHooks<WorkspaceBrowserInjected['hooks']>\n & PropsLocale<'workspace'>\n\n/**\n * Picker-private injected share. Pick semantics remain in the owner's onPick\n * callback; this callback creates only the real Host Workspace. A type alias\n * supplies the implicit index signature required by the registry.\n */\nexport type WorkspacePickerInjected = DirectoryPickingInjected & {\n /** Adopt a picked host directory as a real Workspace before targeting a Session. */\n createWorkspace: (input: { path: string }) => Promise<WorkspaceView>\n}\n\n/**\n * Full picker props: the owner share plus the creation callback and the\n * locale seat. The two picker holes (blank-session hero / New-Session view)\n * share one owner currency, so one composed type serves both registrations.\n */\nexport type WorkspacePickerProps =\n PropsRuntime<'conversation.hero.workspace'>\n & PropsRenderSlots<'conversation.hero.workspace.directoryFlow'>\n & Omit<WorkspacePickerInjected, 'hooks'>\n & PropsHooks<WorkspacePickerInjected['hooks']>\n & PropsLocale<'workspace'>\n","/** Workspace command registration and browser-owned opening requests. */\nimport type { Context } from '@deepseek-ai/cordis'\nimport type { SessionForkError } from '@deepseek-ai/dsh-api-session-controller/client'\nimport { createSnapshotStore } from '@deepseek-ai/dsh-client-store'\nimport type { ShortcutCommand, ShortcutCommandId } from '@deepseek-ai/dsh-client-shortcuts/client'\nimport type { SnapshotStore } from '@deepseek-ai/dsh-client-store'\nimport type { SessionId } from '@deepseek-ai/dsh-session/types'\nimport type { UiWorkspace } from './navigation.ts'\n\n/** Transient requests consumed by the existing workspace browser. */\nexport interface WorkspaceShortcutState {\n readonly searchRequest: number\n readonly addRequested: boolean\n readonly directoryBusy: boolean\n readonly renameTarget: { readonly sessionId: SessionId; readonly currentTitle: string } | null\n}\n\ninterface WorkspaceShortcutControls {\n state: SnapshotStore<WorkspaceShortcutState>\n search: () => void\n add: () => void\n closeAdd: () => void\n directoryBusy: (busy: boolean) => void\n rename: (sessionId: SessionId, currentTitle: string) => void\n closeRename: () => void\n}\n\n/**\n * Create the private browser request source shared by commands and controls.\n * @returns observable state and its complete mutation callbacks.\n */\nexport function createWorkspaceShortcutControls(): WorkspaceShortcutControls {\n const state = createSnapshotStore<WorkspaceShortcutState>({\n searchRequest: 0, addRequested: false, directoryBusy: false, renameTarget: null,\n })\n return {\n state,\n search: () => { state.set({ ...state.getSnapshot(), searchRequest: state.getSnapshot().searchRequest + 1 }) },\n add: () => { state.set(state.getSnapshot().directoryBusy ? state.getSnapshot() : { ...state.getSnapshot(), addRequested: true }) },\n closeAdd: () => { state.set({ ...state.getSnapshot(), addRequested: false }) },\n directoryBusy: (busy: boolean) => { state.set({ ...state.getSnapshot(), directoryBusy: busy }) },\n rename: (sessionId: SessionId, currentTitle: string) => {\n state.set({ ...state.getSnapshot(), renameTarget: { sessionId, currentTitle } })\n },\n closeRename: () => { state.set({ ...state.getSnapshot(), renameTarget: null }) },\n }\n}\n\n/**\n * Register navigation commands against the existing workspace owner.\n * Rename requires a nonblank main Conversation with no modal other than the navigation drawer obscuring it.\n * @param ctx - plugin context with the shortcut, locale, and model services.\n * @param navigation - session creation and forking from the pointer controls' navigation service.\n * @param controls - browser-owned opening requests.\n * @param archiveSession - shared archive action, including running-work confirmation and notices.\n * @param reportForkFailure - publish a classified failure through the frame-wide notice channel.\n */\nexport function installWorkspaceShortcuts(\n ctx: Context,\n navigation: Pick<UiWorkspace, 'startSession' | 'forkSession'>,\n controls: ReturnType<typeof createWorkspaceShortcutControls>,\n archiveSession: (sessionId: SessionId) => void,\n reportForkFailure: (reason: 'unavailable' | 'failed') => void,\n): void {\n const t = ctx.locale.bind('workspace')\n const current = () => Object.values(ctx.sessions.list.getSnapshot().byId)\n .find(row => (row.retainedBy.mainView ?? 0) > 0)\n const addReason = () => ctx.slots.entries('sidebar.workspaces.directoryFlow').length === 0\n ? t('shortcut.noPicker')\n : controls.state.getSnapshot().directoryBusy ? t('shortcut.directoryBusy') : null\n const register = (id: string, label: () => string, aliases: string[], code: string,\n modifiers: ('primary' | 'alt' | 'shift')[], webModifiers: ('primary' | 'alt' | 'shift')[], resolve: ShortcutCommand['resolve']): void => {\n ctx.effect(() => ctx.shortcuts.register({\n id: id as ShortcutCommandId, label, aliases, defaults: {\n 'desktop:macos': { code, modifiers }, 'desktop:windows': { code, modifiers }, 'desktop:linux': { code, modifiers },\n 'web:macos': { code, modifiers: webModifiers }, 'web:windows': { code, modifiers: webModifiers },\n },\n regions: ['page', 'editable'], modals: ['sidebar'], resolve,\n }), `ui-workspace: ${id}`)\n }\n register('session.new', () => t('session.new'), ['new session', 'new chat'], 'KeyN', ['primary'], ['primary', 'alt'],\n () => ({ status: 'handled', run: () => { navigation.startSession() } }))\n register('session.search', () => t('search.sessions.aria'), ['search sessions'], 'KeyK', ['primary'], ['primary', 'alt'],\n () => ({ status: 'handled', run: controls.search }))\n register('workspace.add', () => t('workspace.add'), ['add workspace', 'open folder'], 'KeyO', ['primary'], ['primary', 'alt'],\n () => {\n const reason = addReason()\n return reason === null ? { status: 'handled', run: controls.add } : { status: 'blocked', reason }\n })\n register('session.rename', () => t('rename.session.title'), ['rename session'], 'KeyG', ['primary', 'alt'], ['primary', 'alt'], (context) => {\n const target = current()\n return target === undefined || target.blank || (context.modal !== null && context.modal !== 'sidebar') || ctx.layout.panelInfo.getSnapshot().activePanelId !== null\n ? { status: 'blocked', reason: t('shortcut.noSession') }\n : { status: 'handled', run: () => { controls.rename(target.id, target.title?.trim() ?? '') } }\n })\n register('session.fork', () => t('menu.fork'), ['fork session'], 'KeyF', ['primary', 'alt'], ['primary', 'shift'], () => {\n const target = current()\n if (target === undefined) return { status: 'blocked', reason: t('shortcut.noSession') }\n if (target.blank) return { status: 'blocked', reason: t('shortcut.noCompletedTurn') }\n return { status: 'handled', run: () => {\n // The main view owns history opening for this target.\n void navigation.forkSession(target.id).catch((error: unknown) => {\n // Client plugin bundles do not share error-class identity.\n const unavailable = error instanceof Error && error.name === 'SessionForkError'\n && (error as SessionForkError).rpcError.code === 'session/fork-unavailable'\n reportForkFailure(unavailable ? 'unavailable' : 'failed')\n if (!unavailable) console.warn('session fork rejected:', error)\n })\n } }\n })\n register('session.archive', () => t('menu.archiveSession'), ['archive session'], 'KeyA', ['primary', 'shift'], ['primary', 'alt'], () => {\n const target = current()\n return target === undefined ? { status: 'blocked', reason: t('shortcut.noSession') }\n : { status: 'handled', run: () => {\n archiveSession(target.id)\n } }\n })\n}\n","//#region lib/types/partial-json.js\n/**\n* Lazily scanned view of one JSON object's top-level fields, built from text\n* that may still be streaming or from an already parsed object. Nothing is\n* scanned until a reader asks; the view remembers every question it answered\n* and reports changed answers when the owner refreshes for publication.\n* Used for model tool-call arguments: a row reads the fields it\n* cares about at whatever granularity it displays, at every stage of the call.\n* @module @deepseek-ai/dsh-util-values/src/partial-json\n*/\nconst SIMPLE_ESCAPES = {\n\t\"\\\"\": \"\\\"\",\n\t\"\\\\\": \"\\\\\",\n\t\"/\": \"/\",\n\tb: \"\\b\",\n\tf: \"\\f\",\n\tn: \"\\n\",\n\tr: \"\\r\",\n\tt: \"\t\"\n};\nconst CONTENT_ESCAPE = /[\\\\\\u0000-\\u001f]/u;\nfunction isWhitespace(c) {\n\treturn c === \" \" || c === \"\\n\" || c === \"\\r\" || c === \"\t\";\n}\nfunction isHex(c) {\n\treturn c >= \"0\" && c <= \"9\" || c >= \"a\" && c <= \"f\" || c >= \"A\" && c <= \"F\";\n}\n/**\n* The view. A streaming instance grows through {@link PartialArguments.append};\n* {@link PartialArguments.fromText} and {@link PartialArguments.fromObject} build\n* sealed instances over a finished call. Every reader is total: an absent or\n* differently typed field answers `undefined` (or `false`), never throws.\n*/\nvar PartialArguments = class PartialArguments {\n\t/** The view of a call with no arguments available. */\n\tstatic EMPTY = PartialArguments.fromObject({});\n\t/**\n\t* View finished argument text without scanning it until a reader asks.\n\t* @param text - the complete argument JSON text.\n\t* @returns a sealed view.\n\t*/\n\tstatic fromText(text) {\n\t\tconst view = new PartialArguments();\n\t\tview.append(text);\n\t\tview.sealed = true;\n\t\treturn view;\n\t}\n\t/**\n\t* View an already parsed argument payload, such as a PTC dispatch object.\n\t* @param value - the parsed argument value.\n\t* @returns a sealed view; a non-object payload has no fields.\n\t*/\n\tstatic fromObject(value) {\n\t\tconst view = new PartialArguments();\n\t\tview.object = typeof value === \"object\" && value !== null && !Array.isArray(value) ? value : {};\n\t\tview.sealed = true;\n\t\treturn view;\n\t}\n\t/**\n\t* The source: text so far or a parsed object, plus whether it can still grow.\n\t* These are the only enumerable fields, so two views over the same source\n\t* compare equal structurally however far each has been read.\n\t*/\n\tchunks = [];\n\tobject;\n\tsealed = false;\n\t#ends = [];\n\t#size = 0;\n\t#consumed = 0;\n\t#mode = \"root\";\n\t#escape = false;\n\t#keyStart = 0;\n\t#keyEscaped = false;\n\t#key = \"\";\n\t#current = null;\n\t#nestedEnds = [];\n\t#nestedInString = false;\n\t#invalidAt;\n\t#invalidValue = false;\n\t#entries = /* @__PURE__ */ new Map();\n\t#order = [];\n\t#reads = /* @__PURE__ */ new Map();\n\t/** Whether this view rejects further appends; does not scan text or register reads. */\n\tget isSealed() {\n\t\treturn this.sealed;\n\t}\n\t/** Whether indexing or a content read found invalid JSON; unread value contents are not validated. */\n\tget invalid() {\n\t\tthis.scan();\n\t\treturn this.#mode === \"invalid\" || this.#invalidValue;\n\t}\n\t/**\n\t* Retain streamed argument text without scanning or comparing observed answers.\n\t* @param fragment - the text following every fragment appended before.\n\t*/\n\tappend(fragment) {\n\t\tif (this.sealed) throw new Error(\"PartialArguments: cannot append to a sealed view\");\n\t\tif (fragment.length === 0) return;\n\t\tthis.chunks.push(fragment);\n\t\tthis.#size += fragment.length;\n\t\tthis.#ends.push(this.#size);\n\t}\n\t/**\n\t* Reconcile a streamed prefix with authoritative complete text without joining the fragments.\n\t* @param text - the final argument text, which replaces missing or conflicting deltas.\n\t* @returns this view sealed with its caches retained when every character matches; otherwise a new sealed view.\n\t*/\n\tsettle(text) {\n\t\tif (this.object !== void 0 || text.length !== this.#size) return PartialArguments.fromText(text);\n\t\tlet offset = 0;\n\t\tfor (const chunk of this.chunks) {\n\t\t\tif (!text.startsWith(chunk, offset)) return PartialArguments.fromText(text);\n\t\t\toffset += chunk.length;\n\t\t}\n\t\tthis.chunks = text.length === 0 ? [] : [text];\n\t\tthis.#ends = text.length === 0 ? [] : [text.length];\n\t\tthis.sealed = true;\n\t\treturn this;\n\t}\n\t/**\n\t* Compare observed answers and advance their publication baseline. Unread views remain unscanned.\n\t* @returns whether any observed answer changed since its first read or the preceding refresh.\n\t*/\n\trefresh() {\n\t\tif (this.#reads.size === 0) return false;\n\t\tthis.scan();\n\t\tlet changed = false;\n\t\tlet completions = false;\n\t\tfor (const read of this.#reads.values()) {\n\t\t\tif (read.completion) {\n\t\t\t\tcompletions = true;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tchanged = this.refreshRead(read) || changed;\n\t\t}\n\t\tif (completions) {\n\t\t\tfor (const read of this.#reads.values()) if (read.completion) changed = this.refreshRead(read) || changed;\n\t\t}\n\t\tif (this.sealed) this.#reads.clear();\n\t\treturn changed;\n\t}\n\trefreshRead(read) {\n\t\tconst now = read.answer();\n\t\tif (Object.is(now, read.last)) return false;\n\t\tread.last = now;\n\t\treturn true;\n\t}\n\t/**\n\t* Check whether no further fields can arrive.\n\t* @returns whether the outer object closed, indexing failed, or the view is sealed; unread values are not validated.\n\t*/\n\tclosed() {\n\t\treturn this.remember(\"closed\", \"\", () => this.closedNow());\n\t}\n\t/**\n\t* List discovered fields in first-appearance order.\n\t* @returns top-level keys seen so far, in first-appearance order.\n\t*/\n\tkeys() {\n\t\treturn this.remember(\"keys\", \"\", () => this.keysNow(), (keys) => keys.length);\n\t}\n\t/**\n\t* Check whether a top-level field has appeared.\n\t* @param key - argument name.\n\t* @returns whether the field has appeared (a string opened or another value began).\n\t*/\n\thas(key) {\n\t\treturn this.remember(\"has\", key, () => this.hasNow(key));\n\t}\n\t/**\n\t* Check whether a field's closing delimiter has arrived, without validating its contents.\n\t* @param key - argument name.\n\t* @returns whether its delimiter arrived and no content reader has reported an error for this value.\n\t*/\n\tcomplete(key) {\n\t\treturn this.remember(\"complete\", key, () => this.completeNow(key));\n\t}\n\t/**\n\t* Read string length without materializing its text.\n\t* @param key - argument name.\n\t* @param options - change granularity for a streaming string.\n\t* @returns decoded UTF-16 length of the string field so far; undefined when absent or not a string.\n\t*/\n\tstringLength(key, options) {\n\t\tconst step = Math.max(1, Math.floor(options?.step ?? 1));\n\t\tconst offset = options?.offset ?? 0;\n\t\treturn this.remember(`length:${step}:${offset}`, key, () => this.lengthNow(key), (length) => length === void 0 ? void 0 : Math.ceil((length + offset) / step));\n\t}\n\t/**\n\t* Check a string against a decoded UTF-16 length limit without materializing it.\n\t* @param key - argument name.\n\t* @param maxLength - decoded UTF-16 limit, floored to at least zero.\n\t* @returns whether the string is longer than the limit; false when absent or not a string.\n\t*/\n\tstringExceeds(key, maxLength) {\n\t\tconst limit = Math.max(0, Math.floor(maxLength));\n\t\treturn this.remember(`exceeds:${limit}`, key, () => (this.lengthNow(key, limit + 1) ?? 0) > limit);\n\t}\n\t/**\n\t* Read a decoded string, including a streaming prefix.\n\t* @param key - argument name.\n\t* @returns the string field's decoded text so far; undefined when absent or not a string.\n\t*/\n\ttext(key) {\n\t\treturn this.remember(\"text\", key, () => this.textNow(key));\n\t}\n\t/**\n\t* Read at most the first decoded UTF-16 units of a string.\n\t* @param key - argument name.\n\t* @param maxLength - maximum decoded UTF-16 length, floored to at least one.\n\t* @returns the bounded string prefix; undefined when absent or not a string.\n\t*/\n\ttextPrefix(key, maxLength) {\n\t\tconst limit = Math.max(1, Math.floor(maxLength));\n\t\treturn this.remember(`prefix:${limit}`, key, () => this.textPrefixNow(key, limit));\n\t}\n\t/**\n\t* Read a completed non-string argument.\n\t* @param key - argument name.\n\t* @returns the parsed non-string value once it closed; undefined while open, absent, or a string.\n\t*/\n\tvalue(key) {\n\t\treturn this.remember(\"value\", key, () => this.valueNow(key));\n\t}\n\t/** Answer a question and, on a streaming view, remember it for change detection. */\n\tremember(kind, key, read, comparison) {\n\t\tthis.scan();\n\t\tconst result = read();\n\t\tif (!this.sealed) {\n\t\t\tconst id = `${kind}/${key}`;\n\t\t\tif (!this.#reads.has(id)) this.#reads.set(id, {\n\t\t\t\tcompletion: kind === \"complete\",\n\t\t\t\tanswer: comparison === void 0 ? read : () => comparison(read()),\n\t\t\t\tlast: comparison === void 0 ? result : comparison(result)\n\t\t\t});\n\t\t}\n\t\treturn result;\n\t}\n\tclosedNow() {\n\t\treturn this.sealed || this.#mode === \"closed\" || this.#mode === \"invalid\";\n\t}\n\tkeysNow() {\n\t\treturn this.object === void 0 ? this.#order : Object.keys(this.object);\n\t}\n\thasNow(key) {\n\t\treturn this.object === void 0 ? this.#entries.has(key) : Object.hasOwn(this.object, key);\n\t}\n\tcompleteNow(key) {\n\t\tif (this.object !== void 0) return Object.hasOwn(this.object, key);\n\t\tconst entry = this.#entries.get(key);\n\t\treturn entry !== void 0 && entry.end >= 0 && (entry.kind === \"string\" ? entry.invalidAt === void 0 : !entry.invalid);\n\t}\n\tlengthNow(key, limit = Number.POSITIVE_INFINITY) {\n\t\tif (this.object !== void 0) {\n\t\t\tconst field = Object.hasOwn(this.object, key) ? this.object[key] : void 0;\n\t\t\treturn typeof field === \"string\" ? field.length : void 0;\n\t\t}\n\t\tconst entry = this.#entries.get(key);\n\t\tif (entry?.kind !== \"string\") return void 0;\n\t\tif (entry.text !== void 0 && entry.text.at === entry.end) return entry.text.length;\n\t\tconst read = entry.length ??= {\n\t\t\tat: entry.start,\n\t\t\tlength: 0,\n\t\t\ttext: \"\"\n\t\t};\n\t\tthis.readString(entry, read, limit, false);\n\t\treturn read.length;\n\t}\n\ttextNow(key) {\n\t\tif (this.object !== void 0) {\n\t\t\tconst field = Object.hasOwn(this.object, key) ? this.object[key] : void 0;\n\t\t\treturn typeof field === \"string\" ? field : void 0;\n\t\t}\n\t\tconst entry = this.#entries.get(key);\n\t\tif (entry?.kind !== \"string\") return void 0;\n\t\tif (entry.text === void 0 && entry.end >= 0 && entry.needsDecoding && entry.invalidAt === void 0) {\n\t\t\tlet text;\n\t\t\ttry {\n\t\t\t\ttext = JSON.parse(`\"${this.slice(entry.start, entry.end)}\"`);\n\t\t\t} catch (_error) {}\n\t\t\tif (text !== void 0) entry.text = {\n\t\t\t\tat: entry.end,\n\t\t\t\tlength: text.length,\n\t\t\t\ttext\n\t\t\t};\n\t\t}\n\t\tconst read = entry.text ??= {\n\t\t\tat: entry.start,\n\t\t\tlength: 0,\n\t\t\ttext: \"\"\n\t\t};\n\t\tthis.readString(entry, read, Number.POSITIVE_INFINITY, true);\n\t\treturn read.text;\n\t}\n\ttextPrefixNow(key, maxLength) {\n\t\tif (this.object !== void 0) {\n\t\t\tconst field = Object.hasOwn(this.object, key) ? this.object[key] : void 0;\n\t\t\treturn typeof field === \"string\" ? field.slice(0, maxLength) : void 0;\n\t\t}\n\t\tconst entry = this.#entries.get(key);\n\t\tif (entry?.kind !== \"string\") return void 0;\n\t\tconst prefixes = entry.prefixes ??= /* @__PURE__ */ new Map();\n\t\tlet read = prefixes.get(maxLength);\n\t\tif (read === void 0) {\n\t\t\tread = {\n\t\t\t\tat: entry.start,\n\t\t\t\tlength: 0,\n\t\t\t\ttext: \"\"\n\t\t\t};\n\t\t\tprefixes.set(maxLength, read);\n\t\t}\n\t\tthis.readString(entry, read, maxLength, true);\n\t\treturn read.text;\n\t}\n\tvalueNow(key) {\n\t\tif (this.object !== void 0) {\n\t\t\tif (!Object.hasOwn(this.object, key)) return void 0;\n\t\t\tconst field = this.object[key];\n\t\t\treturn typeof field === \"string\" ? void 0 : field;\n\t\t}\n\t\tconst entry = this.#entries.get(key);\n\t\tif (entry?.kind !== \"value\" || entry.end < 0 || entry.invalid) return void 0;\n\t\tif (entry.parsed === void 0) try {\n\t\t\tentry.parsed = JSON.parse(this.slice(entry.start, entry.end));\n\t\t} catch (_error) {\n\t\t\tentry.invalid = true;\n\t\t\tthis.#invalidValue = true;\n\t\t}\n\t\treturn entry.parsed;\n\t}\n\tchunkAt(at) {\n\t\tlet low = 0;\n\t\tlet high = this.#ends.length;\n\t\twhile (low < high) {\n\t\t\tconst mid = low + high >>> 1;\n\t\t\tif (this.#ends[mid] <= at) low = mid + 1;\n\t\t\telse high = mid;\n\t\t}\n\t\treturn low;\n\t}\n\t/** Materialize only a requested range, never the cumulative source. */\n\tslice(start, end) {\n\t\tif (start >= end) return \"\";\n\t\tconst first = this.chunkAt(start);\n\t\tconst last = this.chunkAt(end - 1);\n\t\tconst base = first === 0 ? 0 : this.#ends[first - 1];\n\t\tif (first === last) return this.chunks[first].slice(start - base, end - base);\n\t\tconst parts = [this.chunks[first].slice(start - base)];\n\t\tfor (let i = first + 1; i < last; i++) parts.push(this.chunks[i]);\n\t\tparts.push(this.chunks[last].slice(0, end - this.#ends[last - 1]));\n\t\treturn parts.join(\"\");\n\t}\n\treadString(entry, read, limit, materialize) {\n\t\tconst end = Math.min(entry.end < 0 ? this.#consumed : entry.end, entry.invalidAt ?? Number.POSITIVE_INFINITY, this.#invalidAt ?? Number.POSITIVE_INFINITY);\n\t\tif (!entry.needsDecoding) {\n\t\t\tconst length = Math.min(end - read.at, limit - read.length);\n\t\t\tif (length <= 0) return;\n\t\t\tif (materialize) read.text += this.slice(read.at, read.at + length);\n\t\t\tread.at += length;\n\t\t\tread.length += length;\n\t\t\treturn;\n\t\t}\n\t\tlet chunkIndex = this.chunkAt(read.at);\n\t\twhile (read.at < end && read.length < limit) {\n\t\t\tconst base = chunkIndex === 0 ? 0 : this.#ends[chunkIndex - 1];\n\t\t\tconst chunk = this.chunks[chunkIndex];\n\t\t\tconst remaining = chunk.slice(read.at - base, Math.min(chunk.length, end - base));\n\t\t\tconst boundary = remaining.search(CONTENT_ESCAPE);\n\t\t\tconst length = Math.min(boundary < 0 ? remaining.length : boundary, limit - read.length);\n\t\t\tif (length > 0) {\n\t\t\t\tif (materialize) read.text += remaining.slice(0, length);\n\t\t\t\tread.at += length;\n\t\t\t\tread.length += length;\n\t\t\t\tif (read.at === base + chunk.length) chunkIndex++;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst type = remaining.length > 1 ? remaining[1] : read.at + 1 < end ? this.chunks[chunkIndex + 1][0] : void 0;\n\t\t\tlet decoded;\n\t\t\tlet width = 2;\n\t\t\tif (remaining[0] === \"\\\\\" && type === void 0 && entry.end < 0) return;\n\t\t\tif (remaining[0] === \"\\\\\" && type === \"u\") {\n\t\t\t\tconst hex = this.slice(read.at + 2, Math.min(end, read.at + 6));\n\t\t\t\tlet valid = true;\n\t\t\t\tfor (let i = 0; i < hex.length; i++) if (!isHex(hex[i])) valid = false;\n\t\t\t\tif (valid) {\n\t\t\t\t\tif (hex.length < 4 && entry.end < 0) return;\n\t\t\t\t\tif (hex.length === 4) decoded = String.fromCharCode(Number.parseInt(hex, 16));\n\t\t\t\t}\n\t\t\t\twidth = 6;\n\t\t\t} else if (remaining[0] === \"\\\\\" && type !== void 0) decoded = SIMPLE_ESCAPES[type];\n\t\t\tif (decoded === void 0) {\n\t\t\t\tentry.invalidAt = read.at;\n\t\t\t\tthis.#invalidValue = true;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (materialize) read.text += decoded;\n\t\t\tread.length++;\n\t\t\tread.at += width;\n\t\t\twhile (chunkIndex < this.chunks.length && read.at >= this.#ends[chunkIndex]) chunkIndex++;\n\t\t}\n\t}\n\t/** Locate new field ranges without decoding or parsing their contents. */\n\tscan() {\n\t\tif (this.object !== void 0 || this.#consumed === this.#size) return;\n\t\tfor (let i = this.chunkAt(this.#consumed); i < this.chunks.length && this.#invalidAt === void 0; i++) {\n\t\t\tconst pending = this.chunks[i];\n\t\t\tconst base = i === 0 ? 0 : this.#ends[i - 1];\n\t\t\tfor (let index = this.#consumed - base; index < pending.length && this.#mode !== \"invalid\"; index++) {\n\t\t\t\tif (this.#mode === \"string\" || this.#mode === \"nested\" && this.#nestedInString) {\n\t\t\t\t\tconst end = this.stringBoundary(pending, index);\n\t\t\t\t\tthis.#consumed += end - index;\n\t\t\t\t\tindex = end;\n\t\t\t\t\tif (index === pending.length) break;\n\t\t\t\t}\n\t\t\t\tthis.step(pending[index], this.#consumed);\n\t\t\t\tthis.#consumed++;\n\t\t\t}\n\t\t}\n\t}\n\t/** Only raw quotes and their preceding backslash runs can terminate a string. */\n\tstringBoundary(fragment, start) {\n\t\tlet at = start;\n\t\twhile (true) {\n\t\t\tconst quote = fragment.indexOf(\"\\\"\", at);\n\t\t\tconst end = quote < 0 ? fragment.length : quote;\n\t\t\tif (this.#mode === \"string\") {\n\t\t\t\tconst entry = this.#current;\n\t\t\t\tif (!entry.needsDecoding && CONTENT_ESCAPE.test(fragment.slice(at, end))) entry.needsDecoding = true;\n\t\t\t}\n\t\t\tlet slashStart = end;\n\t\t\twhile (slashStart > at && fragment[slashStart - 1] === \"\\\\\") slashStart--;\n\t\t\tconst escaped = (end - slashStart) % 2 === 1 !== (slashStart === at && this.#escape);\n\t\t\tthis.#escape = quote < 0 && escaped;\n\t\t\tif (quote < 0 || !escaped) return end;\n\t\t\tat = quote + 1;\n\t\t}\n\t}\n\tstep(c, at) {\n\t\tswitch (this.#mode) {\n\t\t\tcase \"root\":\n\t\t\t\tif (isWhitespace(c)) return;\n\t\t\t\tif (c === \"{\") {\n\t\t\t\t\tthis.#mode = \"key-or-end\";\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tthis.fail();\n\t\t\t\treturn;\n\t\t\tcase \"key-or-end\":\n\t\t\t\tif (isWhitespace(c)) return;\n\t\t\t\tif (c === \"}\") {\n\t\t\t\t\tthis.#mode = \"closed\";\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (c === \"\\\"\") {\n\t\t\t\t\tthis.beginKey(at);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tthis.fail();\n\t\t\t\treturn;\n\t\t\tcase \"key-only\":\n\t\t\t\tif (isWhitespace(c)) return;\n\t\t\t\tif (c === \"\\\"\") {\n\t\t\t\t\tthis.beginKey(at);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tthis.fail();\n\t\t\t\treturn;\n\t\t\tcase \"key\":\n\t\t\t\tthis.stepKey(c, at);\n\t\t\t\treturn;\n\t\t\tcase \"colon\":\n\t\t\t\tif (isWhitespace(c)) return;\n\t\t\t\tif (c === \":\") {\n\t\t\t\t\tthis.#mode = \"value\";\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tthis.fail();\n\t\t\t\treturn;\n\t\t\tcase \"value\":\n\t\t\t\tthis.beginValue(c, at);\n\t\t\t\treturn;\n\t\t\tcase \"string\": {\n\t\t\t\tconst entry = this.#current;\n\t\t\t\tentry.end = at;\n\t\t\t\tthis.#current = null;\n\t\t\t\tthis.#mode = \"comma-or-end\";\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tcase \"scalar\":\n\t\t\t\tthis.stepScalar(c, at);\n\t\t\t\treturn;\n\t\t\tcase \"nested\":\n\t\t\t\tthis.stepNested(c, at);\n\t\t\t\treturn;\n\t\t\tcase \"comma-or-end\":\n\t\t\t\tif (isWhitespace(c)) return;\n\t\t\t\tif (c === \",\") {\n\t\t\t\t\tthis.#mode = \"key-only\";\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (c === \"}\") {\n\t\t\t\t\tthis.#mode = \"closed\";\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tthis.fail();\n\t\t\t\treturn;\n\t\t\tcase \"closed\":\n\t\t\t\tif (isWhitespace(c)) return;\n\t\t\t\tthis.fail();\n\t\t\t\treturn;\n\t\t\t/* v8 ignore next 2 -- scan() stops stepping once the view is invalid. */\n\t\t\tcase \"invalid\": return;\n\t\t\t/* v8 ignore next 2 -- Every scanner mode has a handler above. */\n\t\t\tdefault: assertNever(this.#mode);\n\t\t}\n\t}\n\tfail() {\n\t\tthis.#invalidAt = this.#consumed;\n\t\tthis.#mode = \"invalid\";\n\t\tthis.#current = null;\n\t}\n\tbeginKey(at) {\n\t\tthis.#mode = \"key\";\n\t\tthis.#keyStart = at + 1;\n\t\tthis.#keyEscaped = false;\n\t\tthis.#escape = false;\n\t}\n\tstepKey(c, at) {\n\t\tif (c < \" \") {\n\t\t\tthis.fail();\n\t\t\treturn;\n\t\t}\n\t\tif (this.#escape) {\n\t\t\tthis.#escape = false;\n\t\t\treturn;\n\t\t}\n\t\tif (c === \"\\\\\") {\n\t\t\tthis.#escape = true;\n\t\t\tthis.#keyEscaped = true;\n\t\t\treturn;\n\t\t}\n\t\tif (c !== \"\\\"\") return;\n\t\tconst raw = this.slice(this.#keyStart, at);\n\t\tif (this.#keyEscaped) try {\n\t\t\tthis.#key = JSON.parse(`\"${raw}\"`);\n\t\t} catch (_error) {\n\t\t\tthis.fail();\n\t\t\treturn;\n\t\t}\n\t\telse this.#key = raw;\n\t\tthis.#mode = \"colon\";\n\t}\n\topen(entry) {\n\t\tif (!this.#entries.has(this.#key)) this.#order.push(this.#key);\n\t\tthis.#entries.set(this.#key, entry);\n\t\tthis.#current = entry;\n\t}\n\tbeginValue(c, at) {\n\t\tif (isWhitespace(c)) return;\n\t\tif (c === \"\\\"\") {\n\t\t\tthis.open({\n\t\t\t\tkind: \"string\",\n\t\t\t\tstart: at + 1,\n\t\t\t\tend: -1,\n\t\t\t\tneedsDecoding: false,\n\t\t\t\tinvalidAt: void 0,\n\t\t\t\tlength: void 0,\n\t\t\t\ttext: void 0,\n\t\t\t\tprefixes: void 0\n\t\t\t});\n\t\t\tthis.#escape = false;\n\t\t\tthis.#mode = \"string\";\n\t\t\treturn;\n\t\t}\n\t\tif (c === \"}\" || c === \",\" || c === \":\" || c === \"]\") {\n\t\t\tthis.fail();\n\t\t\treturn;\n\t\t}\n\t\tthis.open({\n\t\t\tkind: \"value\",\n\t\t\tstart: at,\n\t\t\tend: -1,\n\t\t\tparsed: void 0,\n\t\t\tinvalid: false\n\t\t});\n\t\tif (c === \"{\" || c === \"[\") {\n\t\t\tthis.#mode = \"nested\";\n\t\t\tthis.#nestedEnds = [c === \"{\" ? \"}\" : \"]\"];\n\t\t\tthis.#nestedInString = false;\n\t\t\tthis.#escape = false;\n\t\t\treturn;\n\t\t}\n\t\tthis.#mode = \"scalar\";\n\t}\n\tstepScalar(c, at) {\n\t\tif (c !== \",\" && c !== \"}\" && !isWhitespace(c)) return;\n\t\tthis.closeValue(at);\n\t\tthis.#mode = c === \",\" ? \"key-only\" : c === \"}\" ? \"closed\" : \"comma-or-end\";\n\t}\n\tstepNested(c, at) {\n\t\tif (this.#nestedInString) {\n\t\t\tthis.#nestedInString = false;\n\t\t\treturn;\n\t\t}\n\t\tif (c === \"\\\"\") {\n\t\t\tthis.#nestedInString = true;\n\t\t\treturn;\n\t\t}\n\t\tif (c === \"{\" || c === \"[\") {\n\t\t\tthis.#nestedEnds.push(c === \"{\" ? \"}\" : \"]\");\n\t\t\treturn;\n\t\t}\n\t\tif (c === \"}\" || c === \"]\") {\n\t\t\tif (this.#nestedEnds.pop() !== c) {\n\t\t\t\tthis.fail();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (this.#nestedEnds.length === 0) {\n\t\t\t\tthis.closeValue(at + 1);\n\t\t\t\tthis.#mode = \"comma-or-end\";\n\t\t\t}\n\t\t}\n\t}\n\tcloseValue(end) {\n\t\tconst entry = this.#current;\n\t\tentry.end = end;\n\t\tthis.#current = null;\n\t}\n};\n//#endregion\n//#region lib/types/index.js\n/** Duplicate-install-safe JSON and immutable-value helpers. @module @deepseek-ai/dsh-util-values */\n/**\n* Mark an unreachable closed-union branch.\n* @param value - impossible value; an unhandled typed variant fails at the call site.\n* @param context - optional switch-site label included in the failure message.\n* @returns never; a runtime value that escaped its type always throws.\n*/\nfunction assertNever(value, context) {\n\tconst rendered = JSON.stringify(value) ?? String(value);\n\tthrow new Error(`unreachable variant${context ? ` in ${context}` : \"\"}: ${rendered}`);\n}\n/** Whether a realm-owned intrinsic prototype has a native constructor matching this engine's representation. */\nfunction hasIntrinsicConstructor(prototype, name) {\n\tconst constructor = Object.getOwnPropertyDescriptor(prototype, \"constructor\")?.value;\n\tif (typeof constructor !== \"function\") return false;\n\ttry {\n\t\treturn constructor.name === name && constructor.prototype === prototype && Function.prototype.toString.call(constructor) === Function.prototype.toString.call(name === \"Array\" ? Array : Object);\n\t} catch {\n\t\treturn false;\n\t}\n}\n/** Whether a candidate is one realm's intrinsic `Object.prototype`. */\nfunction isIntrinsicObjectPrototype(value) {\n\treturn Object.getPrototypeOf(value) === null && hasIntrinsicConstructor(value, \"Object\");\n}\n/** Whether an array uses one realm's intrinsic `Array.prototype`, not a subclass or forged prototype. */\nfunction hasPlainArrayPrototype(value) {\n\tconst prototype = Object.getPrototypeOf(value);\n\tif (!Array.isArray(prototype) || !hasIntrinsicConstructor(prototype, \"Array\")) return false;\n\tconst objectPrototype = Object.getPrototypeOf(prototype);\n\treturn typeof objectPrototype === \"object\" && objectPrototype !== null && isIntrinsicObjectPrototype(objectPrototype);\n}\n/** Whether an object is a plain or null-prototype record from any JavaScript realm. */\nfunction hasPlainObjectPrototype(value) {\n\tconst prototype = Object.getPrototypeOf(value);\n\treturn prototype === null || typeof prototype === \"object\" && isIntrinsicObjectPrototype(prototype);\n}\n/** Return every JSON-visible object key, or reject own data JSON would discard. */\nfunction enumerableStringKeys(value) {\n\tconst keys = Reflect.ownKeys(value);\n\tif (keys.some((key) => typeof key !== \"string\" || !Object.prototype.propertyIsEnumerable.call(value, key))) return void 0;\n\treturn keys;\n}\n/** Validate lossless JSON iteratively, optionally materializing a detached snapshot. */\nfunction walkJsonValue(value, detach) {\n\tconst ancestors = /* @__PURE__ */ new Set();\n\tlet root;\n\tlet parent;\n\tconst assign = (item) => {\n\t\tif (parent === void 0) {\n\t\t\tif (detach) root = item;\n\t\t} else if (parent.kind === \"array\") {\n\t\t\tif (parent.target !== void 0) parent.target[parent.key] = item;\n\t\t} else if (parent.target !== void 0) Object.defineProperty(parent.target, parent.key, {\n\t\t\tvalue: item,\n\t\t\tenumerable: true,\n\t\t\tconfigurable: true,\n\t\t\twritable: true\n\t\t});\n\t};\n\tconst frames = [];\n\tlet current = value;\n\tfor (;;) {\n\t\tif (current === null) assign(null);\n\t\telse if (typeof current === \"boolean\" || typeof current === \"string\") assign(current);\n\t\telse if (typeof current === \"number\") {\n\t\t\tif (!Number.isFinite(current) || Object.is(current, -0)) return void 0;\n\t\t\tassign(current);\n\t\t} else {\n\t\t\tif (typeof current !== \"object\") return void 0;\n\t\t\tif (ancestors.has(current)) return void 0;\n\t\t\tif (Array.isArray(current)) {\n\t\t\t\tif (!hasPlainArrayPrototype(current)) return void 0;\n\t\t\t\tconst length = current.length;\n\t\t\t\tif (Reflect.ownKeys(current).length !== length + 1) return void 0;\n\t\t\t\tconst target = detach ? [] : void 0;\n\t\t\t\tif (target !== void 0) assign(target);\n\t\t\t\tlet indices;\n\t\t\t\tif (!Number.isInteger(length)) {\n\t\t\t\t\tindices = [];\n\t\t\t\t\tfor (let index = length - 1; index >= 0; index--) indices.push(index);\n\t\t\t\t}\n\t\t\t\tframes.push({\n\t\t\t\t\tkind: \"array\",\n\t\t\t\t\tsource: current,\n\t\t\t\t\tlength: indices?.length ?? length,\n\t\t\t\t\tindex: 0,\n\t\t\t\t\tkey: 0,\n\t\t\t\t\tindices,\n\t\t\t\t\ttarget\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tif (!hasPlainObjectPrototype(current)) return void 0;\n\t\t\t\tconst keys = enumerableStringKeys(current);\n\t\t\t\tif (keys === void 0) return void 0;\n\t\t\t\tconst target = detach ? {} : void 0;\n\t\t\t\tif (target !== void 0) assign(target);\n\t\t\t\tframes.push({\n\t\t\t\t\tkind: \"object\",\n\t\t\t\t\tsource: current,\n\t\t\t\t\tkeys,\n\t\t\t\t\tindex: 0,\n\t\t\t\t\tkey: \"\",\n\t\t\t\t\ttarget\n\t\t\t\t});\n\t\t\t}\n\t\t\tancestors.add(current);\n\t\t}\n\t\tfor (;;) {\n\t\t\tconst frame = frames.at(-1);\n\t\t\tif (frame === void 0) return detach ? root : true;\n\t\t\tconst length = frame.kind === \"array\" ? frame.length : frame.keys.length;\n\t\t\tif (frame.index >= length) {\n\t\t\t\tancestors.delete(frame.source);\n\t\t\t\tframes.pop();\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst index = frame.index++;\n\t\t\tparent = frame;\n\t\t\tif (frame.kind === \"array\") {\n\t\t\t\tconst key = frame.indices === void 0 ? index : frame.indices[frame.indices.length - index - 1];\n\t\t\t\t/* v8 ignore next -- the loop is bounded by the captured index count. */\n\t\t\t\tif (key === void 0) return void 0;\n\t\t\t\tif (!Object.prototype.hasOwnProperty.call(frame.source, key)) return void 0;\n\t\t\t\tframe.key = key;\n\t\t\t\tcurrent = frame.source[key];\n\t\t\t} else {\n\t\t\t\tconst key = frame.keys[index];\n\t\t\t\t/* v8 ignore next -- the loop is bounded by the captured key count. */\n\t\t\t\tif (key === void 0) return void 0;\n\t\t\t\tframe.key = key;\n\t\t\t\tcurrent = frame.source[key];\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t}\n}\n/**\n* Validate and detach lossless JSON in one read per property.\n* @param value - candidate value to validate and detach.\n* @returns the detached snapshot, or `undefined` when the value is not losslessly JSON-serializable.\n*/\nfunction snapshotJsonValue(value) {\n\treturn walkJsonValue(value, true);\n}\n/**\n* Test the same lossless JSON rules as {@link snapshotJsonValue} without detaching the value.\n* @param value - candidate value to test.\n* @returns whether the value survives a JSON round trip without loss.\n*/\nfunction isJsonValue(value) {\n\treturn walkJsonValue(value, false) === true;\n}\n/**\n* Compare JSON-compatible values structurally.\n* @param a - one JSON-compatible value.\n* @param b - the other JSON-compatible value.\n* @returns whether both values contain the same JSON data.\n*/\nfunction deepEqualJson(a, b) {\n\tif (a === b) return true;\n\tif (typeof a !== \"object\" || typeof b !== \"object\" || a === null || b === null) return false;\n\tif (Array.isArray(a) || Array.isArray(b)) {\n\t\tif (!Array.isArray(a) || !Array.isArray(b) || a.length !== b.length) return false;\n\t\treturn a.every((entry, index) => deepEqualJson(entry, b[index]));\n\t}\n\tconst left = a;\n\tconst right = b;\n\tconst keys = Object.keys(left);\n\tif (keys.length !== Object.keys(right).length) return false;\n\treturn keys.every((key) => key in right && deepEqualJson(left[key], right[key]));\n}\n/**\n* Deep-freeze an object graph in place while leaving live AbortSignal objects mutable.\n* @param value - value to freeze.\n* @returns the same value after every reachable enumerable child is frozen.\n*/\nfunction deepFreeze(value) {\n\tconst seen = /* @__PURE__ */ new WeakSet();\n\tconst pending = [{\n\t\tkind: \"visit\",\n\t\tnode: value\n\t}];\n\twhile (pending.length > 0) {\n\t\tconst task = pending.pop();\n\t\t/* v8 ignore next -- the loop condition guarantees one pending task. */\n\t\tif (task === void 0) continue;\n\t\tif (task.kind === \"property\") {\n\t\t\tpending.push({\n\t\t\t\tkind: \"visit\",\n\t\t\t\tnode: task.source[task.key]\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tconst node = task.node;\n\t\tif (node === null || typeof node !== \"object\") continue;\n\t\tif (node instanceof AbortSignal) continue;\n\t\tif (seen.has(node)) continue;\n\t\tseen.add(node);\n\t\tObject.freeze(node);\n\t\tconst keys = Object.keys(node);\n\t\tfor (let index = keys.length - 1; index >= 0; index--) {\n\t\t\tconst key = keys[index];\n\t\t\t/* v8 ignore next -- the loop is bounded by the captured key count. */\n\t\t\tif (key === void 0) continue;\n\t\t\tpending.push({\n\t\t\t\tkind: \"property\",\n\t\t\t\tsource: node,\n\t\t\t\tkey\n\t\t\t});\n\t\t}\n\t}\n\treturn value;\n}\n/**\n* Weak-key lookup with a strongly retained iterable set of associated values.\n*\n* Each value must belong to only one key. The container performs no automatic\n* cleanup; owners delete associations or clear the container at lifecycle end.\n*/\nvar WeakMapWithValues = class {\n\tkeys = /* @__PURE__ */ new WeakMap();\n\tvalueSet = /* @__PURE__ */ new Set();\n\t/** Live strongly retained values in insertion order. */\n\tvalues = this.valueSet;\n\t/**\n\t* Read the value associated with a key.\n\t* @param key - weakly held lookup key.\n\t* @returns the associated value, or absence.\n\t*/\n\tget(key) {\n\t\treturn this.keys.get(key);\n\t}\n\t/**\n\t* Test whether a key has an association.\n\t* @param key - weakly held lookup key.\n\t* @returns whether the key is present.\n\t*/\n\thas(key) {\n\t\treturn this.keys.has(key);\n\t}\n\t/**\n\t* Associate one key with one caller-unique value.\n\t* @param key - weakly held lookup key.\n\t* @param value - strongly retained value that belongs to no other key.\n\t* @returns this container.\n\t*/\n\tset(key, value) {\n\t\tif (this.keys.has(key)) {\n\t\t\tconst previous = this.keys.get(key);\n\t\t\tif (previous === value) return this;\n\t\t\tthis.valueSet.delete(previous);\n\t\t}\n\t\tthis.keys.set(key, value);\n\t\tthis.valueSet.add(value);\n\t\treturn this;\n\t}\n\t/**\n\t* Remove one association and its strongly retained value.\n\t* @param key - weakly held lookup key.\n\t* @returns whether an association was removed.\n\t*/\n\tdelete(key) {\n\t\tif (!this.keys.has(key)) return false;\n\t\tconst value = this.keys.get(key);\n\t\tconst deleted = this.keys.delete(key);\n\t\tthis.valueSet.delete(value);\n\t\treturn deleted;\n\t}\n\t/** Remove every association and strongly retained value. */\n\tclear() {\n\t\tthis.keys = /* @__PURE__ */ new WeakMap();\n\t\tthis.valueSet.clear();\n\t}\n};\n//#endregion\nexport { PartialArguments, WeakMapWithValues, assertNever, deepEqualJson, deepFreeze, isJsonValue, snapshotJsonValue };\n","//#region lib/types/file-address.js\n/**\n* The `dsh-resource://file/…` address grammar: how a file is named across the\n* Sidebar and the resource model, built and parsed without touching a\n* filesystem.\n* @module\n*/\n/** The scheme and type every file address opens with. */\nconst FILE_ADDRESS_PREFIX = \"dsh-resource://file/\";\n/** Component-encode one id or path segment, keeping `:` literal for drive letters. */\nfunction encodeSegment(segment) {\n\treturn encodeURIComponent(segment).replace(/%3A/gi, \":\");\n}\n/** Encode a `/`-separated path segment by segment. */\nfunction encodePath(path) {\n\treturn path.split(\"/\").map(encodeSegment).join(\"/\");\n}\n/** Whether a decoded first path segment is a Windows drive (`C:`). */\nfunction isDriveSegment(segment) {\n\treturn segment !== void 0 && /^[A-Za-z]:$/.test(segment);\n}\n/**\n* Build the address of a file read through one Session.\n* @param sessionId - the Session whose Host workspace resolves the path.\n* @param path - absolute or workspace-relative path; backslashes are normalized to `/`, and leading `./` prefixes are dropped.\n* @returns the `dsh-resource://file/session/<sessionId>/<path>` address.\n*/\nfunction sessionFileAddress(sessionId, path) {\n\tconst normalized = path.replace(/\\\\/g, \"/\").replace(/^(?:\\.\\/)+/, \"\");\n\treturn `${FILE_ADDRESS_PREFIX}session/${encodeSegment(sessionId)}/${encodePath(normalized)}`;\n}\n/**\n* Build the address of a file by its absolute path.\n* @param path - absolute path; backslashes are normalized to `/` and the leading `/` is dropped,\n* except that a UNC path (`\\\\server\\share`) keeps one empty first segment.\n* @returns the `dsh-resource://file/absolute/<path>` address.\n*/\nfunction absoluteFileAddress(path) {\n\tconst normalized = path.replace(/\\\\/g, \"/\");\n\tconst unc = normalized.startsWith(\"//\");\n\tconst absolute = normalized.replace(/^\\/+/, \"\");\n\treturn `${FILE_ADDRESS_PREFIX}absolute/${unc ? \"/\" : \"\"}${encodePath(absolute)}`;\n}\n/**\n* Read a file address back into its parts without resolving `.` or `..`.\n* Query and fragment suffixes are ignored; encoded path segments are decoded.\n* @param address - a candidate address.\n* @returns the parts, or `undefined` when the string is not a `dsh-resource://file/` URI in a known scope with a path, or a segment is not validly encoded.\n*/\nfunction parseFileAddress(address) {\n\ttry {\n\t\tif (!address.startsWith(FILE_ADDRESS_PREFIX)) return void 0;\n\t\tconst end = address.search(/[?#]/);\n\t\tconst [scope, ...rest] = address.slice(20, end === -1 ? void 0 : end).split(\"/\");\n\t\tif (scope === \"session\") {\n\t\t\tconst [id, ...segments] = rest;\n\t\t\tif (id === void 0 || id === \"\" || segments.length === 0) return void 0;\n\t\t\treturn {\n\t\t\t\tscope,\n\t\t\t\tsessionId: decodeURIComponent(id),\n\t\t\t\tpath: segments.map(decodeURIComponent).join(\"/\")\n\t\t\t};\n\t\t}\n\t\tif (scope === \"absolute\") {\n\t\t\tconst unc = rest[0] === \"\" && rest.length > 1;\n\t\t\tconst segments = (unc ? rest.slice(1) : rest).map(decodeURIComponent);\n\t\t\tif (segments.length === 0 || segments[0] === \"\") return void 0;\n\t\t\tif (unc) return {\n\t\t\t\tscope,\n\t\t\t\tpath: `//${segments.join(\"/\")}`\n\t\t\t};\n\t\t\treturn {\n\t\t\t\tscope,\n\t\t\t\tpath: isDriveSegment(segments[0]) ? segments.join(\"/\") : `/${segments.join(\"/\")}`\n\t\t\t};\n\t\t}\n\t\treturn;\n\t} catch {\n\t\treturn;\n\t}\n}\n//#endregion\n//#region lib/types/index.js\n/**\n* Browser-safe Workspace path and display helpers.\n* @module @deepseek-ai/dsh-util-workspace-path\n*/\n/** Whether a path uses a Windows drive or UNC prefix. */\nfunction isWindowsStylePath(value) {\n\treturn /^[A-Za-z]:[/\\\\]/.test(value) || value.startsWith(\"\\\\\\\\\");\n}\n/**\n* Whether a path is absolute in either spelling the Host accepts: POSIX (`/a/b`) or Windows drive or UNC.\n* @param path - the path to classify.\n* @returns `true` for an absolute path; `false` for a Workspace-relative one.\n*/\nfunction isAbsoluteWorkspacePath(path) {\n\treturn path.startsWith(\"/\") || isWindowsStylePath(path);\n}\n/**\n* Resolve a Workspace-relative path into the Host-facing spelling used by path operations.\n* @param cwd - Session Workspace root, when known.\n* @param path - Absolute or Workspace-relative path; leading `./` segments are dropped when joining.\n* @returns an absolute path when a Workspace root is available, otherwise the original path.\n*/\nfunction resolveWorkspacePath(cwd, path) {\n\tif (isAbsoluteWorkspacePath(path)) return path;\n\tif (cwd === void 0 || cwd === \"\") return path;\n\tconst separator = isWindowsStylePath(cwd) && cwd.includes(\"\\\\\") ? \"\\\\\" : \"/\";\n\treturn `${cwd.replace(/[/\\\\]+$/, \"\")}${separator}${path.replace(/^(?:\\.?[/\\\\])+/, \"\")}`;\n}\n/**\n* Abbreviate a POSIX home directory for display.\n* @param path - Absolute or already-short display path.\n* @param home - Host account home; absent skips abbreviation.\n* @returns `~` or `~/…` for the POSIX home and its descendants, otherwise `path`.\n*/\nfunction abbreviateHomePath(path, home) {\n\tif (home === void 0 || home === \"\") return path;\n\tif (isWindowsStylePath(path) || isWindowsStylePath(home)) return path;\n\tconst root = home.replace(/\\/+$/, \"\");\n\tif (root === \"\" || root === \"/\") return path;\n\tif (path.replace(/\\/+$/, \"\") === root) return \"~\";\n\tif (path.startsWith(`${root}/`)) return `~${path.slice(root.length)}`;\n\treturn path;\n}\n/**\n* Read the final non-empty segment of a Workspace path for display.\n* Workspace-label surfaces use this helper instead of deriving another basename.\n* @param path - Workspace directory path using POSIX or Windows separators.\n* @returns the final segment, or an empty string for a separator-only path.\n*/\nfunction workspaceTitleOf(path) {\n\tconst trimmed = path.replace(/[/\\\\]+$/, \"\");\n\tconst separator = Math.max(trimmed.lastIndexOf(\"/\"), trimmed.lastIndexOf(\"\\\\\"));\n\treturn trimmed.slice(separator + 1);\n}\n/**\n* Split a path for display: the directories through their last separator, and\n* the final segment after it. Both `/` and `\\` separate, so a Windows path\n* splits where its own segments end; trailing separators are dropped first, so\n* a directory path names its own last segment. A path with no separator, or a\n* separator-only path, is all name.\n* @param path - file or directory path using POSIX or Windows separators.\n* @returns the directory prefix (possibly empty) and the final segment.\n*/\nfunction pathPartsOf(path) {\n\tconst trimmed = path.replace(/[/\\\\]+$/, \"\");\n\tif (trimmed === \"\") return {\n\t\tdirectory: \"\",\n\t\tname: path\n\t};\n\tconst cut = Math.max(trimmed.lastIndexOf(\"/\"), trimmed.lastIndexOf(\"\\\\\")) + 1;\n\treturn {\n\t\tdirectory: trimmed.slice(0, cut),\n\t\tname: trimmed.slice(cut)\n\t};\n}\n/**\n* The address for a path as a caller holds it: a relative path, or an absolute\n* path inside the Session's workspace, becomes a `session`-scoped address; an\n* absolute path outside it, or one whose workspace root is unknown, keeps its\n* absolute path in that Session's address.\n* @param sessionId - the Session the path is read in.\n* @param cwd - that Session's workspace root, when known.\n* @param path - absolute or workspace-relative path, in either separator spelling.\n* @returns the `dsh-resource://file/…` address.\n*/\nfunction fileAddressFor(sessionId, cwd, path) {\n\tconst normalized = path.replace(/\\\\/g, \"/\");\n\tif (!isAbsoluteWorkspacePath(normalized)) return sessionFileAddress(sessionId, normalized);\n\tconst root = cwd === void 0 ? \"\" : cwd.replace(/\\\\/g, \"/\").replace(/\\/+$/, \"\");\n\tif (root !== \"\" && normalized === root) return sessionFileAddress(sessionId, \"\");\n\tif (root !== \"\" && normalized.startsWith(`${root}/`)) return sessionFileAddress(sessionId, normalized.slice(root.length + 1));\n\treturn sessionFileAddress(sessionId, normalized);\n}\n/**\n* Strip the workspace root from a workspace-rooted absolute path (display only).\n* @param text - the path to shorten.\n* @param cwd - session workspace root; absent or empty leaves the path unchanged.\n* @returns the path relative to the workspace root, or unchanged when it is not rooted there.\n*/\nfunction relativizeToCwd(text, cwd) {\n\tif (cwd === void 0 || cwd === \"\") return text;\n\tconst root = cwd.replace(/[/\\\\]+$/, \"\");\n\tif (text.startsWith(`${root}/`) || text.startsWith(`${root}\\\\`)) return text.slice(root.length + 1);\n\treturn text;\n}\n/**\n* Address a decoded absolute file path through the authenticated file route.\n* @param base - HTTP(S) application base, including its deployment prefix, or `dsh-app://app/`.\n* @param path - Native file path; URL escapes in authored Markdown must already be decoded.\n* @returns File URL, or undefined for unsupported transports and non-absolute paths.\n*/\nfunction fileMediaUrl(base, path) {\n\tif (!/^https?:/u.test(base) && !base.startsWith(\"dsh-app://app/\") || !isAbsoluteWorkspacePath(path) || /^[/\\\\]{2}/u.test(path) || /[\\u0000-\\u001f\\u007f]/u.test(path)) return void 0;\n\treturn new URL(`api/file?path=${encodeURIComponent(path)}`, base).href;\n}\n//#endregion\nexport { abbreviateHomePath, absoluteFileAddress, fileAddressFor, fileMediaUrl, isAbsoluteWorkspacePath, parseFileAddress, pathPartsOf, relativizeToCwd, resolveWorkspacePath, sessionFileAddress, workspaceTitleOf };\n","/**\n * Derives the workspace browser tree from caller-projected Workspace and\n * Session order. Unassigned Sessions trail under Ungrouped; only the selected\n * blank Session remains visible.\n */\nimport type {\n SessionListState, SessionSearchResultItem, SessionSummary,\n} from '@deepseek-ai/dsh-api-session-controller/client'\nimport type { WorkspaceId, WorkspaceView } from '@deepseek-ai/dsh-api-workspace-controller/client'\nimport type {\n SessionStatusSnapshot,\n} from '@deepseek-ai/dsh-client-ui-session/client'\nimport type { SessionId } from '@deepseek-ai/dsh-session/types'\nimport { assertNever } from '@deepseek-ai/dsh-util-values'\nimport { workspaceTitleOf } from '@deepseek-ai/dsh-util-workspace-path'\n\n/** Group key for Sessions outside every Workspace. */\nexport const UNGROUPED_KEY = ''\n\n/**\n * Resolve the Workspace browser group that owns one Session.\n * @param workspaces - authoritative Workspace membership.\n * @param sessionId - Session whose browser group is required.\n * @returns owning Workspace id, or {@link UNGROUPED_KEY} when no Workspace accounts for it.\n */\nexport function owningGroupKey(\n workspaces: readonly WorkspaceView[],\n sessionId: SessionId,\n): string {\n return (workspaces.find(workspace => workspace.sessionIds.includes(sessionId))\n ?.workspaceId as string | undefined) ?? UNGROUPED_KEY\n}\n\n/** Pending interaction kinds with dedicated Workspace-row presentation. */\nexport type SessionPendingInteractionStatus = 'approval' | 'plan-review' | 'question'\ntype SessionStatuses = SessionStatusSnapshot\n\nfunction mainSessionId(list: SessionListState): SessionId | undefined {\n return Object.values(list.byId)\n .find(session => (session.retainedBy.mainView ?? 0) > 0)?.id\n}\n\n/** One top-level session row in a group or the flat list. */\nexport interface SessionNode {\n id: SessionId\n /** Stored title, or empty; the renderer localizes blank and unnamed row labels. */\n title: string\n /** The provisional blank session (renderer shows the localized New Session title). */\n blank: boolean\n /** A Session-scoped UI consumer is awaiting this user. */\n pendingInteraction?: SessionPendingInteractionStatus\n running: boolean\n /** Running subagent descendants at any depth. */\n runningSubagentCount: number\n /** Finished running while not selected and not yet opened (the green \"done\" reminder dot). */\n completed: boolean\n /** In the registry-global pin set: leads its section, reorderable only among pinned rows. */\n pinned: boolean\n /** In the registry-global archive set: shown grayed in place and not openable. */\n archived: boolean\n updatedAt: number\n /** Session working directory; absent when the Host reports none or an empty path. */\n cwd?: string\n}\n\n/** Session order selected by the Workspace browser. */\nexport type SessionOrderBy = 'manual' | 'updated'\n\n/** One workspace group section: header row facts + visible top-level session rows. */\nexport interface GroupNode {\n /** Group key: the workspace id or {@link UNGROUPED_KEY}. */\n key: string\n /** Backing Workspace id; absent only for the ungrouped bucket. */\n workspaceId: WorkspaceId | undefined\n cwd: string | undefined\n /** Workspace creation time (epoch ms); absent only for the ungrouped bucket. */\n createdAt: number | undefined\n label: string\n /** Total visible sessions in the group. */\n sessionCount: number\n expanded: boolean\n /** The group contains the selected session (active folder tint; supplied here so the renderer never scans). */\n containsCurrent: boolean\n /**\n * A folded group holds executing work — its own running Session or a running\n * descendant — so the header's closed-folder icon carries the activity the\n * hidden rows would otherwise show. Always false while the group is expanded.\n */\n running: boolean\n /**\n * A folded group holds a visible finished-but-unviewed Session, so the\n * header's closed-folder icon carries the completion reminder the hidden row\n * would otherwise show. Always false while the group is expanded.\n */\n completedUnread: boolean\n /** Visible session rows (empty while the group is folded). */\n sessions: readonly SessionNode[]\n}\n\n/** One flat search row combining list metadata with an optional content match. */\nexport interface SearchResultNode {\n id: SessionId\n title: string\n workspace: string\n /** A Session-scoped UI consumer is awaiting this user. */\n pendingInteraction?: SessionPendingInteractionStatus\n running: boolean\n /** Running subagent descendants at any depth. */\n runningSubagentCount: number\n /** Finished running while not selected and not yet opened (the green \"done\" reminder dot). */\n completed: boolean\n /** In the registry-global archive set: shown grayed and not openable. */\n archived: boolean\n snippet?: string\n}\n\n/** Bounded merged search projection plus the refine-query hint bit. */\nexport interface SearchResultSet {\n items: readonly SearchResultNode[]\n hasMore: boolean\n}\n\n/** Viewing state consumed by the derivation. */\nexport interface TreeView {\n expandedGroups: readonly string[]\n /** Browser-local order for Sessions without a backing Workspace account. */\n ungroupedOrder?: readonly string[]\n}\n\ninterface Group {\n key: string\n workspaceId: WorkspaceId | undefined\n cwd: string | undefined\n createdAt: number | undefined\n label: string\n sessions: SessionSummary[]\n}\n\n/**\n * Directory display label: basename of the path (both separators accepted).\n * Ungrouped-bucket fallback for surfaces without a workspace title.\n * @param cwd - directory path, or undefined for the ungrouped bucket.\n * @returns basename, the raw cwd when it has no basename, or an empty ungrouped marker.\n */\nexport function workspaceLabel(cwd: string | undefined): string {\n if (cwd === undefined || cwd === '') return ''\n const base = workspaceTitleOf(cwd)\n return base !== '' ? base : cwd\n}\n\n/**\n * Project known account members by current Session recency.\n * @param sessionIds - authoritative account membership.\n * @param summaries - current Session summaries; members without a summary are omitted until it arrives.\n * @returns known members newest first, with Session identity as the deterministic tie-break.\n */\nexport function orderByRecency(\n sessionIds: readonly SessionId[],\n summaries: SessionListState['byId'],\n): SessionId[] {\n return sessionIds.flatMap((id) => {\n const summary = summaries[id]\n if (summary === undefined) return []\n return [{ id, rank: summary.updatedAt }]\n })\n .sort((a, b) => {\n if (a.rank !== b.rank) return b.rank - a.rank\n return a.id < b.id ? -1 : 1\n })\n .map(member => member.id)\n}\n\n/**\n * Reconcile a browser-local manual order with current account membership.\n * Saved entries retain their relative order; new ordinary members follow them by recency.\n * @param memberIds - authoritative account membership.\n * @param savedOrder - previously saved browser-local order.\n * @param summaries - current Session metadata; unknown new members wait for their summaries.\n * @param rowState - global pin and archive membership; only account members can supplement the order.\n * @returns saved relative positions plus missing members ordered by pin, recency, and archive status.\n */\nexport function reconcileManualOrder(\n memberIds: readonly SessionId[],\n savedOrder: readonly string[] | undefined,\n summaries: SessionListState['byId'],\n rowState?: Pick<SessionRowState, 'pinnedSessionIds' | 'archivedSessionIds'>,\n): SessionId[] {\n const members = new Map(memberIds.map(id => [id as string, id]))\n const included = new Set<string>()\n const ordered: SessionId[] = []\n for (const key of savedOrder ?? []) {\n const id = members.get(key)\n if (id === undefined || included.has(key)) continue\n ordered.push(id)\n included.add(key)\n }\n const archived = new Set(rowState?.archivedSessionIds)\n const pins: SessionId[] = []\n for (const sessionId of rowState?.pinnedSessionIds ?? []) {\n const id = members.get(sessionId)\n if (id === undefined || included.has(id) || archived.has(id) || summaries[id] === undefined) continue\n pins.push(id)\n included.add(id)\n }\n const ordinary: SessionId[] = []\n const archives: SessionId[] = []\n for (const id of orderByRecency([...members.values()].filter(id => !included.has(id)), summaries)) {\n if (archived.has(id)) archives.push(id)\n else ordinary.push(id)\n }\n return [...pins, ...ordered, ...ordinary, ...archives]\n}\n\n/**\n * Keep the selected provisional New Session ahead of either base order.\n * @param order - recency or reconciled manual order.\n * @param currentBlank - selected blank Session in this account, when present.\n * @returns a copy with the selected blank first and no duplicate slot.\n */\nexport function pinCurrentBlank(\n order: readonly SessionId[],\n currentBlank: SessionId | undefined,\n): SessionId[] {\n if (currentBlank === undefined) return [...order]\n return [currentBlank, ...order.filter(id => id !== currentBlank)]\n}\n\n/**\n * Archived-row visibility choice: the default hides archived rows, `show`\n * mixes them into their kept slots, and `only` restricts the view (and\n * search) to archived rows.\n */\nexport type ArchivedFilter = 'default' | 'show' | 'only'\n\n/**\n * Ordinary sessions are visible; among blank sessions, only the current one\n * is visible. Subagent children use their parent header catalog; archived\n * sessions follow the archived filter, while their accounting slots remain\n * either way so unarchiving restores position.\n */\nfunction sessionVisible(\n session: SessionSummary,\n current: SessionId | undefined,\n archived: ReadonlySet<SessionId>,\n archivedFilter: ArchivedFilter,\n): boolean {\n if (session.origin === 'subagent') return false\n if (session.blank && session.id !== current) return false\n switch (archivedFilter) {\n case 'default':\n return !archived.has(session.id)\n case 'show':\n return true\n case 'only':\n return archived.has(session.id)\n /* v8 ignore next 2 -- closed-union backstop; only reached if the filter is forged */\n default:\n return assertNever(archivedFilter)\n }\n}\n\n/** Registry-global row state consumed by every tree derivation. */\nexport interface SessionRowState {\n /** Registry-global pin ids; pinned rows lead their section in the local order. */\n pinnedSessionIds: readonly SessionId[]\n /** Archive set; members keep their slots and show grayed while visible. */\n archivedSessionIds: readonly SessionId[]\n /** Archived-row visibility choice applied to lists and search alike. */\n archivedFilter: ArchivedFilter\n}\n\n/**\n * Keep the visible New Session placeholder first, then partition pinned and\n * ordinary rows without changing either partition's caller order.\n */\nfunction sectionMembers(\n members: readonly SessionSummary[],\n pinned: ReadonlySet<SessionId>,\n archived: ReadonlySet<SessionId>,\n): SessionSummary[] {\n const placeholders: SessionSummary[] = []\n const leading: SessionSummary[] = []\n const rest: SessionSummary[] = []\n for (const member of members) {\n if (member.blank) placeholders.push(member)\n else if (!archived.has(member.id) && pinned.has(member.id)) leading.push(member)\n else rest.push(member)\n }\n return [...placeholders, ...leading, ...rest]\n}\n\n/**\n * A blank session is the selected Workspace's provisional New Session row;\n * its canonical title never enters search (blank rows are query-excluded)\n * and the renderer localizes its display label. Unnamed history also yields an\n * empty title for localization and does not match a directory-name title search.\n */\nfunction sessionTitle(session: SessionSummary): string {\n return session.blank ? '' : (session.title?.trim() ?? '')\n}\n\n/**\n * Folded-group activity: an expanded group shows every row's own status dot, so\n * the header icon reports activity only while those rows are off screen.\n * @param sessions - the group's visible member summaries.\n * @param descendants - running subagent descendant counts by ancestor.\n * @param expanded - whether the group's rows are on screen.\n * @returns whether the folded group holds a Session that runs or has a running descendant.\n */\nfunction groupRunning(\n sessions: readonly SessionSummary[],\n descendants: RunningDescendants,\n expanded: boolean,\n): boolean {\n if (expanded) return false\n return sessions.some(s => s.running || (descendants.get(s.id) ?? 0) > 0)\n}\n\n/**\n * Folded-group completion reminder: an expanded group shows every row's own\n * done dot, so the header icon reports the reminder only while those rows are\n * off screen. Subagent children never count — they are absent from the group's\n * visible members, and the hidden row's reminder is the only fact to carry.\n * @param sessions - the group's visible member summaries.\n * @param statuses - unified UI status by Session.\n * @param expanded - whether the group's rows are on screen.\n * @returns whether the folded group holds a finished-but-unviewed Session.\n */\nfunction groupCompletedUnread(\n sessions: readonly SessionSummary[],\n statuses: SessionStatuses,\n expanded: boolean,\n): boolean {\n if (expanded) return false\n return sessions.some(s => statuses.get(s.id)?.completionUnread === true)\n}\n\n/** Build one group without projecting session lineage into presentation. */\nfunction buildGroup(\n key: string,\n workspaceId: WorkspaceId | undefined,\n cwd: string | undefined,\n createdAt: number | undefined,\n label: string,\n members: readonly SessionSummary[],\n): Group {\n return { key, workspaceId, cwd, createdAt, label, sessions: [...members] }\n}\n\n/** Apply a stored Ungrouped order and append newly loose Sessions by recency. */\nfunction orderedUngrouped(\n members: readonly SessionSummary[],\n stored: readonly string[] | undefined,\n summaries: SessionListState['byId'],\n): SessionSummary[] {\n const byId = new Map(members.map(session => [session.id as string, session]))\n const ids = stored === undefined\n ? orderByRecency(members.map(session => session.id), summaries)\n : reconcileManualOrder(members.map(session => session.id), stored, summaries)\n return ids.flatMap((id) => {\n const session = byId.get(id)\n /* v8 ignore next -- ids are projected exclusively from the members used to build byId. */\n return session === undefined ? [] : [session]\n })\n}\n\n/**\n * Group Sessions by Workspace: one group per caller-ordered entity, with\n * members resolved from caller-ordered sessionIds. Sessions outside every\n * Workspace trail in the browser-local Ungrouped order, which falls back to\n * recency before that order is initialized.\n */\nfunction groupByWorkspace(\n list: SessionListState,\n workspaces: readonly WorkspaceView[],\n archived: ReadonlySet<SessionId>,\n archivedFilter: ArchivedFilter,\n ungroupedOrder: readonly string[] | undefined,\n): Group[] {\n const current = mainSessionId(list)\n const groups: Group[] = []\n const accounted = new Set<SessionId>()\n for (const workspace of workspaces) {\n const members: SessionSummary[] = []\n for (const id of workspace.sessionIds) {\n const summary = list.byId[id]\n if (summary === undefined) continue // account may lead the list pull; the row appears when the summary lands\n accounted.add(id)\n if (!sessionVisible(summary, current, archived, archivedFilter)) continue\n members.push(summary)\n }\n // The archived-only view lists archives, not the Workspace inventory, so\n // a Workspace without archived Sessions contributes no group.\n if (archivedFilter === 'only' && members.length === 0) continue\n groups.push(buildGroup(\n workspace.workspaceId, workspace.workspaceId, workspace.path,\n Date.parse(workspace.createdAt), workspace.title, members,\n ))\n }\n const stray = list.ids\n .map(id => list.byId[id])\n .filter((s): s is SessionSummary =>\n s !== undefined && !accounted.has(s.id) && sessionVisible(s, current, archived, archivedFilter))\n if (stray.length > 0) {\n groups.push(buildGroup(\n UNGROUPED_KEY,\n undefined,\n undefined,\n undefined,\n '',\n orderedUngrouped(stray, ungroupedOrder, list.byId),\n ))\n }\n return groups\n}\n\n/** Keep navigation presentation independent from domain-owned interaction objects. */\nfunction visiblePendingKind(kind: string | undefined): SessionPendingInteractionStatus | undefined {\n switch (kind) {\n case 'approval':\n case 'plan-review':\n case 'question':\n return kind\n default:\n return undefined\n }\n}\n\n/** Running subagent descendants of one Session, keyed for every Session that has at least one. */\nexport type RunningDescendants = ReadonlyMap<SessionId, number>\n\n/** One iteration state of the explicit-lineage walk: the Session being descended and its cursor. */\ninterface LineageFrame {\n readonly id: SessionId\n readonly rows: readonly SessionId[]\n next: number\n}\n\n/** Whether one Session runs, per the unified status map with the summary bit as fallback. */\nexport function sessionIsRunning(list: SessionListState, statuses: SessionStatuses, id: SessionId): boolean {\n return (statuses.get(id)?.running ?? list.byId[id]?.running) === true\n}\n\n/**\n * Count running subagent descendants of every Session, at any depth, in one\n * post-order pass over durable lineage: a child row whose `origin` is\n * `subagent` holds its parent whether or not that parent's catalog is loaded,\n * while a fork shares `parentId` without the origin and never counts. Lineage\n * is read as data, so a cycle visits each Session once instead of looping.\n * @param list - sessions list snapshot carrying lineage and rows.\n * @param statuses - unified UI status by Session; absent entries fall back to the summary bit.\n * @returns each ancestor's running descendant count, omitting Sessions with none.\n */\nexport function runningDescendantCounts(list: SessionListState, statuses: SessionStatuses): RunningDescendants {\n const children = new Map<SessionId, SessionId[]>()\n for (const id of Object.keys(list.byId) as SessionId[]) {\n const row = list.byId[id]\n const parentId = row?.parentId\n if (row?.origin !== 'subagent' || parentId === undefined || parentId === id) continue\n const siblings = children.get(parentId)\n if (siblings === undefined) children.set(parentId, [id])\n else siblings.push(id)\n }\n const counts = new Map<SessionId, number>()\n if (children.size === 0) return counts\n // Only a Session with child edges holds a running descendant, so every\n // ancestor is reachable from one of these roots. An explicit stack keeps a\n // delegation chain of any configured depth off the call stack.\n const visited = new Set<SessionId>()\n const frames: LineageFrame[] = []\n for (const [rootId, rootRows] of children) {\n if (visited.has(rootId)) continue\n visited.add(rootId)\n frames.push({ id: rootId, rows: rootRows, next: 0 })\n while (frames.length > 0) {\n // Every pushed frame is removed exactly once, and the loop condition\n // guarantees a top frame; the cast states that rather than re-testing it.\n const frame = frames[frames.length - 1] as LineageFrame\n if (frame.next < frame.rows.length) {\n const childId = frame.rows[frame.next] as SessionId\n frame.next += 1\n // A child already on this stack closes a lineage loop; it is visited\n // once and contributes no separate row, so skip the descent.\n if (!visited.has(childId)) {\n visited.add(childId)\n frames.push({ id: childId, rows: children.get(childId) ?? [], next: 0 })\n }\n continue\n }\n frames.pop()\n let total = 0\n for (const childId of frame.rows) {\n total += (counts.get(childId) ?? 0) + (sessionIsRunning(list, statuses, childId) ? 1 : 0)\n }\n if (total > 0) counts.set(frame.id, total)\n }\n }\n return counts\n}\n\n/**\n * Project one Session's row from the current snapshots: the list's own label,\n * recency and directory, plus the pin, archive, live and completion bits every\n * browsing surface shows. The tree and the In work folds both read rows through\n * this one projection, so a Session carries identical state wherever it lists.\n * @param s - the Session's list row.\n * @param statuses - unified UI status by Session.\n * @param descendants - running subagent descendant counts by ancestor.\n * @param pinned - registry-global pin set.\n * @param archived - registry-global archive set.\n * @returns the row facts the browsing surfaces render.\n */\nexport function sessionNode(\n s: SessionSummary,\n statuses: SessionStatuses,\n descendants: RunningDescendants,\n pinned: ReadonlySet<SessionId>,\n archived: ReadonlySet<SessionId>,\n): SessionNode {\n const status = statuses.get(s.id)\n const pendingInteraction = visiblePendingKind(status?.pendingInteraction?.kind)\n return {\n id: s.id,\n title: sessionTitle(s),\n blank: s.blank,\n running: status?.running ?? s.running,\n runningSubagentCount: descendants.get(s.id) ?? 0,\n completed: status?.completionUnread === true,\n pinned: !archived.has(s.id) && pinned.has(s.id),\n archived: archived.has(s.id),\n updatedAt: s.updatedAt,\n ...(s.cwd === undefined || s.cwd === '' ? {} : { cwd: s.cwd }),\n ...(pendingInteraction === undefined ? {} : { pendingInteraction }),\n }\n}\n\n/**\n * Derive the workspace browser groups with every session as a top-level row.\n *\n * Every group shows, except that the archived-only filter drops groups\n * without visible members; sessions populate under expanded groups with\n * pinned rows leading in the selected local order. Blank sessions are\n * excluded except for the selected provisional New Session row; archived\n * sessions keep their slots and appear per the archived filter. Content\n * search lives outside this derivation (see {@link deriveSearchResults}).\n * @param list - sessions list snapshot (`mainView` retention feeds containsCurrent).\n * @param workspaces - real Workspaces in Host group order with caller-projected Session order.\n * @param rowState - registry-global pin and archive sets plus the archived filter.\n * @param statuses - unified UI status by Session.\n * @param view - local expansion arrays.\n * @returns group sections in render order.\n */\nexport function deriveGroups(\n list: SessionListState,\n workspaces: readonly WorkspaceView[],\n rowState: SessionRowState,\n statuses: SessionStatuses,\n view: TreeView,\n): GroupNode[] {\n const archived = new Set(rowState.archivedSessionIds)\n const pinned = new Set(rowState.pinnedSessionIds)\n const expandedGroups = new Set(view.expandedGroups)\n const current = mainSessionId(list)\n const descendants = runningDescendantCounts(list, statuses)\n const currentGroup = current === undefined\n ? undefined\n : owningGroupKey(workspaces, current)\n const groups: GroupNode[] = []\n for (const g of groupByWorkspace(list, workspaces, archived, rowState.archivedFilter, view.ungroupedOrder)) {\n const expanded = expandedGroups.has(g.key)\n groups.push({\n key: g.key,\n workspaceId: g.workspaceId,\n cwd: g.cwd,\n createdAt: g.createdAt,\n label: g.label,\n sessionCount: g.sessions.length,\n expanded,\n containsCurrent: g.key === currentGroup,\n running: groupRunning(g.sessions, descendants, expanded),\n completedUnread: groupCompletedUnread(g.sessions, statuses, expanded),\n sessions: expanded\n ? sectionMembers(g.sessions, pinned, archived)\n .map(session => sessionNode(session, statuses, descendants, pinned, archived))\n : [],\n })\n }\n return groups\n}\n\n/**\n * Select complete flat-list membership, independently of archive visibility.\n * @param list - sessions list snapshot.\n * @returns known ordinary Session ids, including archives and only the current blank.\n */\nexport function sessionMemberIds(list: SessionListState): SessionId[] {\n return visibleSessionIds(list, [], 'show')\n}\n\n/**\n * Select visible flat-list members without deriving row presentation or ordering.\n * @param list - sessions list snapshot.\n * @param archivedSessionIds - registry-global archive set.\n * @param archivedFilter - archived-row visibility choice.\n * @returns known visible Session ids in list order, including ordinary forks and only the current blank.\n */\nexport function visibleSessionIds(\n list: SessionListState,\n archivedSessionIds: readonly SessionId[],\n archivedFilter: ArchivedFilter,\n): SessionId[] {\n const archived = new Set(archivedSessionIds)\n const current = mainSessionId(list)\n return list.ids.filter((id) => {\n const s = list.byId[id]\n return s !== undefined && sessionVisible(s, current, archived, archivedFilter)\n })\n}\n\n/**\n * Derive flat rows from the browser's complete ordered Session ids, with\n * pinned rows fronted ahead of the supplied order.\n * @param list - sessions list snapshot used to select the ids.\n * @param sessionIds - complete account members in the selected order, including hidden archives.\n * @param rowState - registry-global pin and archive sets plus the archived filter.\n * @param statuses - unified UI status by Session.\n * @returns flat rows in sectioned order with current status indicators.\n */\nexport function deriveFlat(\n list: SessionListState,\n sessionIds: readonly SessionId[],\n rowState: SessionRowState,\n statuses: SessionStatuses,\n): SessionNode[] {\n const archived = new Set(rowState.archivedSessionIds)\n const pinned = new Set(rowState.pinnedSessionIds)\n const current = mainSessionId(list)\n const descendants = runningDescendantCounts(list, statuses)\n const members = sessionIds.flatMap((id) => {\n const session = list.byId[id]\n return session !== undefined && sessionVisible(session, current, archived, rowState.archivedFilter)\n ? [session]\n : []\n })\n return sectionMembers(members, pinned, archived)\n .map(session => sessionNode(session, statuses, descendants, pinned, archived))\n}\n\n/**\n * Merge immediate title/Workspace/Session id substring matches with ranked Host content\n * matches. Local rows lead newest-first, content-only rows retain backend\n * order, and duplicate sessions receive the backend snippet in place.\n * @param list - session metadata authority.\n * @param workspaces - Workspace membership and display labels.\n * @param query - caller text; surrounding whitespace is ignored.\n * @param archivedSessionIds - registry-global archive set (members match per the archived filter).\n * @param archivedFilter - archived-row visibility choice; search follows it.\n * @param statuses - unified UI status by Session.\n * @param content - ranked Host content-search page.\n * @param limit - protocol-owned maximum merged row count.\n * @returns bounded deduplicated flat rows and a refine-query hint bit.\n */\nexport function deriveSearchResults(\n list: SessionListState,\n workspaces: readonly WorkspaceView[],\n query: string,\n archivedSessionIds: readonly SessionId[],\n archivedFilter: ArchivedFilter,\n statuses: SessionStatuses,\n content: { items: readonly SessionSearchResultItem[]; hasMore: boolean },\n limit: number,\n): SearchResultSet {\n const q = query.trim().toLowerCase()\n if (q === '') return { items: [], hasMore: false }\n const archived = new Set(archivedSessionIds)\n const current = mainSessionId(list)\n const descendants = runningDescendantCounts(list, statuses)\n\n const workspaceBySession = new Map<SessionId, string>()\n for (const workspace of workspaces) {\n for (const sessionId of workspace.sessionIds) {\n if (!workspaceBySession.has(sessionId)) workspaceBySession.set(sessionId, workspace.title)\n }\n }\n const labelOf = (summary: SessionSummary): string =>\n workspaceBySession.get(summary.id) ?? workspaceLabel(summary.cwd)\n const contentBySession = new Map<SessionId, SessionSearchResultItem>()\n for (const item of content.items) {\n if (!contentBySession.has(item.sessionId)) contentBySession.set(item.sessionId, item)\n }\n\n const local: SessionSummary[] = []\n for (const id of list.ids) {\n const summary = list.byId[id]\n // Blank placeholders never match a query (their canonical title displays\n // localized, so matching it would tie search to one language).\n if (summary === undefined || summary.blank || !sessionVisible(summary, current, archived, archivedFilter)) continue\n if (\n sessionTitle(summary).toLowerCase().includes(q)\n || labelOf(summary).toLowerCase().includes(q)\n || summary.id.toLowerCase().includes(q)\n ) {\n local.push(summary)\n }\n }\n const localById = new Map(local.map(summary => [summary.id, summary]))\n const orderedLocal = orderByRecency(local.map(summary => summary.id), list.byId)\n .map(id => localById.get(id) as SessionSummary)\n\n const ordered: SessionSummary[] = []\n const included = new Set<SessionId>()\n const include = (summary: SessionSummary): void => {\n if (included.has(summary.id)) return\n included.add(summary.id)\n ordered.push(summary)\n }\n for (const summary of orderedLocal) include(summary)\n for (const item of content.items) {\n const summary = list.byId[item.sessionId]\n if (summary !== undefined && !summary.blank && sessionVisible(summary, current, archived, archivedFilter)) include(summary)\n }\n\n return {\n items: ordered.slice(0, limit).map((summary) => {\n const match = contentBySession.get(summary.id)\n const status = statuses.get(summary.id)\n const pendingInteraction = visiblePendingKind(status?.pendingInteraction?.kind)\n return {\n id: summary.id,\n title: sessionTitle(summary),\n workspace: labelOf(summary),\n running: status?.running ?? summary.running,\n runningSubagentCount: descendants.get(summary.id) ?? 0,\n ...(pendingInteraction === undefined\n ? {}\n : { pendingInteraction }),\n completed: status?.completionUnread === true,\n archived: archived.has(summary.id),\n ...match === undefined ? {} : { snippet: match.snippet },\n }\n }),\n hasMore: content.hasMore || ordered.length > limit,\n }\n}\n\n/** Normalize separators for comparison without interpreting POSIX backslashes as separators. */\nfunction folderPath(path: string): string {\n const windows = /^[A-Za-z]:[/\\\\]/.test(path) || path.startsWith('\\\\\\\\')\n return (windows ? path.replaceAll('\\\\', '/') : path).replace(/\\/+$/, '')\n}\n\n/**\n * Find the nearest registered ancestor, excluding the Workspace directory itself.\n * Paths use Host spelling; matching is case-sensitive, like Workspace identity.\n * @param path - Workspace directory.\n * @param parents - registered Workspace directory paths.\n * @returns the owning parent path, or undefined when no parent contains the Workspace.\n */\nexport function owningParentFolder(path: string, parents: readonly string[]): string | undefined {\n const child = folderPath(path)\n let owner: string | undefined\n let length = -1\n for (const parent of parents) {\n const root = folderPath(parent)\n if (root.length > length && child !== root && child.startsWith(`${root}/`)) {\n owner = parent\n length = root.length\n }\n }\n return owner\n}\n","/**\n * The workspace browser's viewing store: the session-list grouping mode,\n * persisted across reloads. Module level exports the factory only (a\n * module-level handle would pin the store identity across plugin reloads);\n * register() receives the factory and the browser derives its PropsStore\n * share from the return type.\n */\nimport { defineStore, type EngineStoreHandle } from '@deepseek-ai/dsh-client-store'\nimport type { SessionListState } from '@deepseek-ai/dsh-api-session-controller/client'\nimport type { SessionId } from '@deepseek-ai/dsh-session/types'\nimport { reconcileManualOrder, type ArchivedFilter, type SessionRowState } from './tree.ts'\n\n/** Browser-local order account for the hierarchy-free flat Session list. */\nexport const FLAT_SESSION_ORDER_KEY = '__flat_session_order__'\n\n/** Session-list grouping mode: sibling Workspace sections, a Workspace tree, or one flat list. */\nexport type SessionGroupBy = 'workspace' | 'workspace-tree' | 'flat'\n/** Session order: saved manual positions or current recency. */\nexport type SessionOrderBy = 'manual' | 'updated'\n\n/** Workspace browser viewing state persisted across surface remounts and reloads. */\ntype WorkspaceViewState = {\n groupBy: SessionGroupBy\n orderBy: SessionOrderBy\n /** Explicit group expansion keyed by Workspace identity, including descendants in tree mode. */\n groupExpansion: Record<string, boolean>\n /** Saved manual order per Workspace group plus the browser-local flat-list account. */\n sessionOrderByAccount: Record<string, string[]>\n /** Archived-row visibility; omitted in pre-filter v5 snapshots and read as 'default'. */\n archivedFilter?: ArchivedFilter\n}\n\ntype SessionOrderSource = {\n members: Readonly<Record<string, readonly SessionId[]>>\n summaries: SessionListState['byId']\n rowState: Pick<SessionRowState, 'pinnedSessionIds' | 'archivedSessionIds'>\n}\n\n/**\n * Annotation twin of the actions literal below (the export needs a declared\n * return type); drift fails assignability at the defineStore call.\n */\ntype WorkspaceViewActions = {\n setGroupBy: (draft: WorkspaceViewState, mode: SessionGroupBy) => void\n setOrderBy: (\n draft: WorkspaceViewState,\n mode: SessionOrderBy,\n initialOrders: Readonly<Record<string, readonly string[]>>,\n ) => void\n setGroupExpanded: (draft: WorkspaceViewState, key: string, expanded: boolean) => void\n retainAccountKeys: (draft: WorkspaceViewState, workspaceKeys: readonly string[]) => void\n syncSessionOrders: (\n draft: WorkspaceViewState,\n orders: Readonly<Record<string, readonly string[]>>,\n ) => void\n setSessionOrder: (\n draft: WorkspaceViewState,\n accountKey: string,\n order: readonly string[],\n initialOrders: Readonly<Record<string, readonly string[]>>,\n ) => void\n pinSessionOrder: (\n draft: WorkspaceViewState,\n sessionId: string,\n accountKeys: readonly string[],\n source: SessionOrderSource,\n ) => void\n setArchivedFilter: (draft: WorkspaceViewState, filter: ArchivedFilter) => void\n}\n\n/** Copy read-only projections into the persisted mutable store representation. */\nfunction copySessionOrders(\n orders: Readonly<Record<string, readonly string[]>>,\n): Record<string, string[]> {\n return Object.fromEntries(Object.entries(orders).map(([key, order]) => [key, [...order]]))\n}\n\n/**\n * Create the workspace browser viewing store handle.\n * @returns the store handle (spec + type + identity + factory in one).\n */\nexport function createWorkspaceViewStore(): EngineStoreHandle<WorkspaceViewState, WorkspaceViewActions> {\n return defineStore({\n init: (): WorkspaceViewState => ({\n groupBy: 'workspace',\n orderBy: 'updated',\n groupExpansion: {},\n sessionOrderByAccount: {},\n archivedFilter: 'default',\n }),\n persist: 'dsh.workspace.view.v5',\n actions: {\n setGroupBy: (d, mode: SessionGroupBy) => { d.groupBy = mode },\n setOrderBy: (d, mode: SessionOrderBy, initialOrders) => {\n if (mode === d.orderBy) return\n d.sessionOrderByAccount = mode === 'manual' ? copySessionOrders(initialOrders) : {}\n d.orderBy = mode\n },\n setGroupExpanded: (d, key: string, expanded: boolean) => { d.groupExpansion[key] = expanded },\n retainAccountKeys: (d, workspaceKeys: readonly string[]) => {\n const retained = new Set(workspaceKeys)\n d.groupExpansion = Object.fromEntries(\n Object.entries(d.groupExpansion).filter(([key]) => retained.has(key)),\n )\n d.sessionOrderByAccount = Object.fromEntries(\n Object.entries(d.sessionOrderByAccount).filter(([key]) => retained.has(key)),\n )\n delete (d as WorkspaceViewState & { sessionUpdatedAtByAccount?: unknown }).sessionUpdatedAtByAccount\n },\n syncSessionOrders: (d, orders) => {\n if (d.orderBy !== 'manual') return\n Object.assign(d.sessionOrderByAccount, copySessionOrders(orders))\n },\n setSessionOrder: (d, accountKey, order, initialOrders) => {\n if (d.orderBy === 'updated') d.sessionOrderByAccount = copySessionOrders(initialOrders)\n else Object.assign(d.sessionOrderByAccount, copySessionOrders(initialOrders))\n d.orderBy = 'manual'\n d.sessionOrderByAccount[accountKey] = [...order]\n },\n pinSessionOrder: (d, sessionId, accountKeys, source) => {\n const selected = new Set(accountKeys)\n d.sessionOrderByAccount = Object.fromEntries(Object.entries(source.members).map(([key, members]) => {\n const order = reconcileManualOrder(members, d.sessionOrderByAccount[key], source.summaries, source.rowState)\n return [key, selected.has(key) ? [sessionId, ...order.filter(id => id !== sessionId)] : order]\n }))\n },\n setArchivedFilter: (d, filter: ArchivedFilter) => { d.archivedFilter = filter },\n },\n })\n}\n\n/** The bound write set of one viewing-store instance (what the UiWorkspace service drives). */\nexport type WorkspaceViewStoreActions = ReturnType<ReturnType<typeof createWorkspaceViewStore>['create']>['actions']\n","/**\n * The complete account memberships a Pin order write reconciles against,\n * derived from the same Host snapshots the browser orders by, so the\n * UiWorkspace service can complete the write without the browser in the loop.\n */\nimport type { SessionListState } from '@deepseek-ai/dsh-api-session-controller/client'\nimport type { WorkspaceView } from '@deepseek-ai/dsh-api-workspace-controller/client'\nimport type { SessionId } from '@deepseek-ai/dsh-session/types'\nimport { FLAT_SESSION_ORDER_KEY } from './stores.ts'\nimport { owningGroupKey, sessionMemberIds, type SessionRowState, UNGROUPED_KEY } from './tree.ts'\n\n/** What `pinSessionOrder` reconciles a pinned Session's accounts against. */\nexport interface PinOrderSource {\n members: Readonly<Record<string, readonly SessionId[]>>\n summaries: SessionListState['byId']\n rowState: Pick<SessionRowState, 'pinnedSessionIds' | 'archivedSessionIds'>\n}\n\n/**\n * Every account's complete membership: each Workspace, Ungrouped, and the flat list.\n * @param workspaces - current Host Workspaces.\n * @param list - current Session list snapshot.\n * @param rowState - registry-global pin and archive sets.\n * @returns the order source for one pin write.\n */\nexport function pinOrderSource(\n workspaces: readonly WorkspaceView[],\n list: SessionListState,\n rowState: PinOrderSource['rowState'],\n): PinOrderSource {\n const accounted = new Set(workspaces.flatMap(workspace => workspace.sessionIds))\n return {\n members: Object.fromEntries([\n ...workspaces.map(workspace => [workspace.workspaceId, workspace.sessionIds] as const),\n [UNGROUPED_KEY, list.ids.filter(id => list.byId[id] !== undefined && !accounted.has(id))],\n [FLAT_SESSION_ORDER_KEY, sessionMemberIds(list)],\n ]),\n summaries: list.byId,\n rowState,\n }\n}\n\n/**\n * The accounts a pinned Session leads: its group (or Ungrouped) and the flat list.\n * @param workspaces - current Host Workspaces.\n * @param sessionId - the Session being pinned.\n * @returns the account keys `pinSessionOrder` fronts.\n */\nexport function pinOrderAccounts(workspaces: readonly WorkspaceView[], sessionId: SessionId): readonly string[] {\n return [owningGroupKey(workspaces, sessionId), FLAT_SESSION_ORDER_KEY]\n}\n","/** Workspace archive and directory UI capability. */\n\nimport { Service, type Context } from '@deepseek-ai/cordis'\nimport type { AccessEffect, RemoteEndpoint } from '@deepseek-ai/dsh-api-remote-access/client'\nimport type { ClientRemote, DirectoryListing, RemoteFailure } from '@deepseek-ai/dsh-api-remotes/client'\nimport type {\n ISessions,\n SessionCreateError,\n SessionBinding,\n SessionReference,\n SessionTarget,\n SessionListState,\n} from '@deepseek-ai/dsh-api-session-controller/client'\n// Type-only: pulls the `agentPreset` Session projection value into this program.\nimport type {} from '@deepseek-ai/dsh-agent-preset-registry/types'\nimport { createSnapshotStore } from '@deepseek-ai/dsh-client-store'\nimport type { SubagentAddress } from '@deepseek-ai/dsh-subagent/client'\nimport type {\n IWorkspaces, WorkspaceId, WorkspaceSnapshot, WorkspaceView,\n} from '@deepseek-ai/dsh-api-workspace-controller/client'\nimport type { SessionId } from '@deepseek-ai/dsh-session/types'\nimport type {} from '@deepseek-ai/dsh-client-ui-layout/client'\nimport type { DraftInitializationOptions } from '@deepseek-ai/dsh-client-ui-conversation/client'\nimport type { RowToast } from './contract/slots.ts'\nimport { pinOrderAccounts, pinOrderSource } from './pin-order.ts'\nimport type { WorkspaceViewStoreActions } from './stores.ts'\n\ninterface MainSelection {\n readonly sessionId?: SessionId\n readonly subagentAddress?: SubagentAddress\n}\n\n/** Content preparation and Agent preset for the Session a Workspace flow opens. */\nexport interface StartSessionOptions extends DraftInitializationOptions {\n /** Agent preset the Session runs; the Host default when omitted. */\n readonly agentPreset?: string\n}\n\n/** Workspace archive and directory operations consumed by Client UI domains. */\nexport interface UiWorkspace {\n /**\n * Select a Session and show its Conversation as one UI navigation action.\n * @param target - known Session identity or durable direct-parent subagent address to display.\n */\n openSession(target: SessionTarget): void\n /**\n * Connect a Workspace and open its Session unless a later navigation supersedes it.\n * @param workspaceId - target Workspace.\n * @param beforeOpen - optional synchronous preparation for the selected Session,\n * skipped after supersession; a throw aborts the open and releases the retained reference.\n * @param options - choices for the Session the connection creates or reuses.\n * @returns completion; a superseded request may create a Session but does not open it.\n * @throws on failure; a refused creation is also shown through the Workspace\n * notice unless a later navigation or disposal superseded the request.\n */\n openWorkspace(\n workspaceId: WorkspaceId,\n beforeOpen?: (sessionId: SessionId) => void,\n options?: Pick<StartSessionOptions, 'agentPreset'>,\n ): Promise<void>\n /**\n * Fork a Session without changing the current selection.\n * @param sessionId - source Session.\n * @param onCreated - observer before the optional child-title update.\n * @param options - optional permission to start source migration; omission preserves the Host default.\n * @returns the child SessionId after creation and inherited-title increment.\n */\n forkSession(\n sessionId: SessionId,\n onCreated?: (childId: SessionId) => void,\n options?: Pick<Parameters<ISessions['fork']>[0], 'allowMigration'>,\n ): Promise<SessionId>\n /**\n * Resolve the Session for a new conversation in a Workspace: navigation names the first reusable\n * blank member — listed in the Workspace, not archived, and listing no preset or the requested one —\n * and the Host reuses it under the requested preset or its default, creating another Session when it\n * reuses none. Concurrent calls for the same Workspace and preset share one attempt.\n * @param workspaceId - target Workspace.\n * @param options - choices for the created or reused Session.\n * @returns a Session already addressable through the Session Controller.\n */\n connectWorkspace(workspaceId: WorkspaceId, options?: Pick<StartSessionOptions, 'agentPreset'>): Promise<SessionId>\n /**\n * Open the Workspace blank `connectWorkspace` resolves, so New Session returns to that blank's\n * unsent draft. A creation the Host refuses is shown through the Workspace notice and leaves the\n * selection as it was.\n * @param workspaceId - explicit target; absent inherits the current or most recent Workspace.\n * @param options - initial content, the blank's preset, and `whenDraftExists`, which decides\n * whether existing text or attachments are kept, replaced, or followed by the prompt.\n */\n startSession(workspaceId?: WorkspaceId, options?: StartSessionOptions): void\n /**\n * Archive a Session and clear it when it is the current selection.\n * @param sessionId - Session to archive.\n * @param options - `stopActivity` asks the Host to stop the Session's running work instead of refusing.\n */\n archiveSession(sessionId: SessionId, options?: { readonly stopActivity?: boolean }): Promise<void>\n /**\n * Unarchive a Session, restoring it to its recorded Workspace position.\n * @param sessionId - Session to unarchive.\n */\n unarchiveSession(sessionId: SessionId): Promise<void>\n /**\n * Pin a Session on the Host, then lead it in its accounts' saved orders\n * (its Workspace group or Ungrouped, and the flat list). The order write\n * reads the memberships current at completion, so reorders that landed\n * while the Host call was pending keep their positions.\n * @param sessionId - Session to pin.\n */\n pinSession(sessionId: SessionId): Promise<void>\n /**\n * Unpin a Session on the Host; saved positions stay as they are.\n * @param sessionId - Session to unpin.\n */\n unpinSession(sessionId: SessionId): Promise<void>\n /**\n * Open the Host-native directory picker.\n * @returns the selected directory, or null when cancelled.\n */\n pickDirectory(): Promise<string | null>\n /**\n * List one Host directory level.\n * @param path - directory path; absent selects the Host home.\n * @param signal - cancellation for a superseded scan.\n * @returns directory entries and breadcrumb ancestry.\n */\n listDirectory(path?: string, signal?: AbortSignal): Promise<DirectoryListing>\n /**\n * Create a child directory.\n * @param path - existing parent directory.\n * @param name - child directory name.\n * @returns created absolute path.\n */\n createDirectory(path: string, name: string): Promise<string>\n /**\n * Keep `callback`'s effects installed while the current Peer may call\n * `action` on one Workspace resource, with the semantics of\n * `ctx.remoteAccess.whenAccess`: `useWorkspaceAccess` answers the same\n * question during render.\n * @param workspaceId - the Workspace resource the guarded effects depend on.\n * @param action - endpoint action the guarded effects depend on.\n * @param callback - creates one disposer or an iterable of disposers.\n * @returns idempotent disposer owned by the caller's Cordis fiber.\n */\n whenAccess(workspaceId: WorkspaceId, action: RemoteEndpoint, callback: () => AccessEffect): () => void\n}\n\ndeclare module '@deepseek-ai/cordis' {\n interface Context {\n /** Cross-Controller Workspace navigation and directory UI capability. */\n uiWorkspace: UiWorkspace\n }\n}\n\n/** Structured directory failure exposed to directory UI consumers. */\nexport class DirectoryBrowseError extends Error {\n override readonly name = 'DirectoryBrowseError'\n\n /** @param rpcError - Host directory business failure. */\n constructor(readonly rpcError: RemoteFailure) {\n super(`directory browse failed: ${rpcError.code}: ${rpcError.message}`)\n }\n}\n\n/** Implements Workspace archive and directory UI operations. */\nclass UiWorkspaceService extends Service implements UiWorkspace {\n /** The latest in-flight connection per Workspace; a request joins it only when both name the same preset. */\n private readonly connecting = new Map<WorkspaceId, {\n readonly agentPreset: string | undefined\n readonly attempt: Promise<SessionId>\n }>()\n private readonly lifetime = new AbortController()\n private readonly selection = createSnapshotStore<MainSelection>(\n {}, { persist: { name: 'dsh.sessions.current' } },\n )\n private mainReference: SessionReference | undefined\n private restorationNavigation: AbortSignal | undefined\n\n /**\n * @param ctx - Client root Context.\n * @param directoryPicker - the directory-picking Remote namespace.\n * @param workspaces - pure Workspace Controller.\n * @param sessions - pure Session Controller.\n * @param view - the browser's viewing-store write set (one instance shared with its registration).\n * @param notify - show one notice through the Workspace notice channel.\n */\n constructor(\n ctx: Context,\n private readonly directoryPicker: ClientRemote['directoryPicker'],\n private readonly workspaces: IWorkspaces,\n private readonly sessions: ISessions,\n private readonly view: Pick<WorkspaceViewStoreActions, 'pinSessionOrder'>,\n private readonly notify: (toast: RowToast) => void,\n ) {\n super(ctx, 'uiWorkspace')\n ctx.effect(() => {\n const stop = this.watchNavigation()\n return () => {\n stop()\n this.lifetime.abort()\n const reference = this.mainReference\n this.mainReference = undefined\n reference?.release()\n }\n }, 'ui-workspace: Workspace navigation policy')\n }\n\n connectWorkspace(workspaceId: WorkspaceId, options: Pick<StartSessionOptions, 'agentPreset'> = {}): Promise<SessionId> {\n return this.connectBlank(workspaceId, options)\n }\n\n /**\n * @param reuse - preset for the reused or created blank.\n */\n private async connectBlank(\n workspaceId: WorkspaceId,\n reuse: Pick<StartSessionOptions, 'agentPreset'>,\n ): Promise<SessionId> {\n const workspace = this.workspaces.list.getSnapshot().items\n .find(item => item.workspaceId === workspaceId)\n if (workspace === undefined) {\n throw new Error(`uiWorkspace.connectWorkspace: unknown workspace ${workspaceId}`)\n }\n const inflight = this.connecting.get(workspaceId)\n if (inflight !== undefined && inflight.agentPreset === reuse.agentPreset) return inflight.attempt\n\n const attempt = this.createInWorkspace(workspace, reuse).finally(() => {\n if (this.connecting.get(workspaceId)?.attempt === attempt) this.connecting.delete(workspaceId)\n })\n this.connecting.set(workspaceId, { agentPreset: reuse.agentPreset, attempt })\n return attempt\n }\n\n /** Name the first reusable member blank; a requested preset also skips blanks listing another preset. */\n private createInWorkspace(workspace: WorkspaceView, options: Pick<StartSessionOptions, 'agentPreset'>): Promise<SessionId> {\n const archived = this.workspaces.list.getSnapshot().archivedSessionIds\n const sessions = this.sessions.list.getSnapshot()\n const blank = sessions.ids.find((id) => {\n const summary = sessions.byId[id]\n const listed = summary?.projectionValues?.agentPreset\n return summary !== undefined && summary.blank && summary.cwd === workspace.path\n && workspace.sessionIds.includes(id) && !archived.includes(id)\n && (options.agentPreset === undefined || typeof listed !== 'string' || listed === options.agentPreset)\n })\n return this.createNamed({\n workspaceId: workspace.workspaceId,\n ...(blank === undefined ? {} : { sessionId: blank }),\n ...(options.agentPreset === undefined ? {} : { agentPreset: options.agentPreset }),\n })\n }\n\n /**\n * Create through the Host. A named blank the Host declined may still read as\n * blank from stale cached list metadata, which hides it from the Session tree;\n * its projections are reloaded so the row reflects its log.\n */\n private async createNamed(request: {\n readonly workspaceId: WorkspaceId\n readonly sessionId?: SessionId\n readonly agentPreset?: string\n }): Promise<SessionId> {\n const sessionId = await this.sessions.create(request)\n const named = request.sessionId\n if (named !== undefined && named !== sessionId) {\n void this.sessions.refreshProjections(named).catch((reason: unknown) => {\n console.warn('declined blank Session projection reload failed:', reason)\n })\n }\n return sessionId\n }\n\n /**\n * Reopen a saved blank Session under the preset its log recorded, or under\n * the Host default once that preset no longer activates. Listed values are\n * cached hints that can lag the log after an unclean Host exit, so the\n * Session's projections are reloaded before the preset is read; a Session\n * that still awaits a format migration reloads only those cached hints.\n */\n private async restoreBlank(workspaceId: WorkspaceId, sessionId: SessionId): Promise<SessionId> {\n await this.sessions.refreshProjections(sessionId)\n const recorded = this.sessions.list.getSnapshot().byId[sessionId]?.projectionValues?.agentPreset\n const request = { workspaceId, sessionId }\n if (typeof recorded !== 'string') return this.createNamed(request)\n try {\n return await this.createNamed({ ...request, agentPreset: recorded })\n } catch (error: unknown) {\n const code = sessionCreateErrorOf(error)?.rpcError.code\n if (code !== 'agent-preset/not-found' && code !== 'agent-preset/invalid') throw error\n return this.createNamed(request)\n }\n }\n\n openSession(target: SessionTarget): void {\n this.replaceMain(target, this.lifetime.signal, 'reveal')\n }\n\n openWorkspace(\n workspaceId: WorkspaceId,\n beforeOpen?: (sessionId: SessionId) => void,\n options: Pick<StartSessionOptions, 'agentPreset'> = {},\n ): Promise<void> {\n return this.openWorkspaceSession(workspaceId, beforeOpen, options)\n }\n\n private async openWorkspaceSession(\n workspaceId: WorkspaceId,\n beforeOpen: ((sessionId: SessionId) => void) | undefined,\n reuse: Pick<StartSessionOptions, 'agentPreset'>,\n ): Promise<void> {\n const navigation = AbortSignal.any([this.ctx.layout.beginNavigation(), this.lifetime.signal])\n let sessionId: SessionId\n try {\n sessionId = await this.connectBlank(workspaceId, reuse)\n } catch (error: unknown) {\n // Reported here, not in connectWorkspace: startup restoration calls that\n // directly and stays console-only.\n if (!navigation.aborted) this.notify({ kind: 'createFailed', message: creationFailureMessage(error) })\n throw error\n }\n if (navigation.aborted) return\n this.replaceMain(sessionId, navigation, 'reveal', beforeOpen)\n }\n\n async forkSession(\n sessionId: SessionId,\n onCreated?: (childId: SessionId) => void,\n options?: Pick<Parameters<ISessions['fork']>[0], 'allowMigration'>,\n ): Promise<SessionId> {\n return this.sessions.fork({\n sessionId,\n increaseTitle: true,\n ...onCreated === undefined ? {} : { onCreated },\n ...options?.allowMigration === undefined ? {} : { allowMigration: options.allowMigration },\n })\n }\n\n startSession(workspaceId?: WorkspaceId, options?: StartSessionOptions): void {\n const { agentPreset, ...draft } = options ?? {}\n const draftOptions = options === undefined ? undefined : draft\n const initializeDraft = draftOptions !== undefined && (draftOptions.prompt !== undefined\n || (draftOptions.whenDraftExists ?? (draftOptions.clearPreviousDraft === true ? 'replace' : 'keep')) === 'replace')\n const workspace = this.workspaces.list.getSnapshot()\n const sessions = this.sessions.list.getSnapshot()\n const current = this.mainReference?.sessionId\n const currentWorkspaceId = current === undefined\n ? undefined\n : workspace.items.find(item => item.sessionIds.includes(current))?.workspaceId\n const recent = workspace.phase === 'ready' && sessions.phase === 'ready'\n ? recentWorkspace(workspace.items, sessions.byId)\n : undefined\n const target = workspaceId ?? currentWorkspaceId ?? recent\n if (target === undefined) {\n if (initializeDraft) {\n this.notify({ kind: 'createFailed', message: this.ctx.locale.bind('workspace')('draft.workspaceRequired') })\n return\n }\n this.clearMain()\n return\n }\n const opening = this.openWorkspace(target, initializeDraft ? (id) => {\n const binding = this.sessions.binding(id)\n if (binding === undefined) this.draftPreparationFailed()\n this.prepareDraft(binding, draftOptions)\n } : undefined, agentPreset === undefined ? {} : { agentPreset })\n void opening.catch(\n (reason: unknown) => { console.warn('new session failed:', reason) },\n )\n }\n\n private prepareDraft(binding: SessionBinding, options: DraftInitializationOptions): void {\n const conversation = this.ctx.get('conversation')\n if (conversation === undefined) this.draftPreparationFailed()\n if (conversation.input.requestDraftInitialization(binding, options) === 'blocked') this.draftPreparationFailed()\n }\n\n private draftPreparationFailed(): never {\n const message = this.ctx.locale.bind('workspace')('draft.initializationFailed')\n this.notify({ kind: 'createFailed', message })\n throw new Error(message)\n }\n\n async archiveSession(sessionId: SessionId, options: { readonly stopActivity?: boolean } = {}): Promise<void> {\n await this.workspaces.archiveSession(sessionId, options)\n if (this.mainReference?.sessionId === sessionId) this.clearMain()\n }\n\n async unarchiveSession(sessionId: SessionId): Promise<void> {\n await this.workspaces.unarchiveSession(sessionId)\n }\n\n async pinSession(sessionId: SessionId): Promise<void> {\n await this.workspaces.pinSession(sessionId)\n const { items, pinnedSessionIds, archivedSessionIds } = this.workspaces.list.getSnapshot()\n this.view.pinSessionOrder(\n sessionId,\n pinOrderAccounts(items, sessionId),\n pinOrderSource(items, this.sessions.list.getSnapshot(), { pinnedSessionIds, archivedSessionIds }),\n )\n }\n\n async unpinSession(sessionId: SessionId): Promise<void> {\n await this.workspaces.unpinSession(sessionId)\n }\n\n async pickDirectory(): Promise<string | null> {\n const result = await this.directoryPicker.pick()\n if (!result.ok) throw new Error(`directory picker failed: ${result.error.message}`)\n return result.value\n }\n\n async listDirectory(path?: string, signal?: AbortSignal): Promise<DirectoryListing> {\n const result = await this.directoryPicker.list(path, signal)\n if (!result.ok) throw new DirectoryBrowseError(result.error)\n return result.value\n }\n\n async createDirectory(path: string, name: string): Promise<string> {\n const result = await this.directoryPicker.createDirectory(path, name)\n if (!result.ok) throw new DirectoryBrowseError(result.error)\n return result.value\n }\n\n whenAccess(workspaceId: WorkspaceId, action: RemoteEndpoint, callback: () => AccessEffect): () => void {\n // `ctx.get` traces the service to the caller's Context, which then owns the controller.\n const access = this.ctx.get('remoteAccess')\n /* v8 ignore next -- this plugin injects remoteAccess, so the service is active while uiWorkspace is reachable. */\n if (access === undefined) throw new Error('ui-workspace: whenAccess requires the remoteAccess service')\n return access.whenResourceAccess('workspace', workspaceId, action, callback)\n }\n\n private watchNavigation(): () => void {\n let initial: 'waiting' | 'connecting' | 'done' = 'waiting'\n const reconcile = (): void => {\n if (this.lifetime.signal.aborted) return\n if (this.clearArchivedCurrent()) return\n if (initial !== 'waiting' || this.restorationNavigation?.aborted === true) return\n const workspace = this.workspaces.list.getSnapshot()\n const sessions = this.sessions.list.getSnapshot()\n if (workspace.phase !== 'ready' || sessions.phase !== 'ready') return\n if (this.mainReference !== undefined) {\n initial = 'done'\n return\n }\n initial = 'connecting'\n void this.restoreSelection(workspace, sessions).then(\n () => { initial = 'done' },\n (reason: unknown) => {\n if (this.lifetime.signal.aborted) return\n initial = 'waiting'\n console.warn('initial Session restoration failed:', reason)\n },\n )\n }\n\n const disposeWorkspaces = this.workspaces.list.subscribe(reconcile)\n const disposeSessions = this.sessions.list.subscribe(reconcile)\n reconcile()\n return () => {\n this.lifetime.abort()\n disposeSessions()\n disposeWorkspaces()\n }\n }\n\n private async restoreSelection(workspaces: WorkspaceSnapshot, sessions: SessionListState): Promise<void> {\n const saved = this.selection.getSnapshot()\n if (saved.subagentAddress !== undefined) {\n this.replaceMain(saved.subagentAddress, this.lifetime.signal, 'preserve')\n return\n }\n const summary = saved.sessionId === undefined ? undefined : sessions.byId[saved.sessionId]\n const workspace = summary === undefined ? undefined\n : workspaces.items.find(item => item.sessionIds.includes(summary.id))\n if (summary !== undefined && (!summary.blank || workspace === undefined)) {\n this.replaceMain(summary.id, this.lifetime.signal, 'preserve')\n return\n }\n const navigation = AbortSignal.any([this.ctx.layout.beginNavigation(), this.lifetime.signal])\n this.restorationNavigation = navigation\n let sessionId: SessionId | undefined\n if (summary !== undefined && workspace !== undefined && summary.cwd === workspace.path\n && !workspaces.archivedSessionIds.includes(summary.id)) {\n sessionId = await this.restoreBlank(workspace.workspaceId, summary.id)\n }\n let target = workspace?.workspaceId ?? recentWorkspace(workspaces.items, sessions.byId)\n if (target === undefined && workspaces.items.length === 0 && sessions.ids.length === 0) {\n const prepared = await this.initializeDefaultWorkspace(navigation)\n if (navigation.aborted) return\n target = prepared?.workspaceId\n }\n if (sessionId === undefined && target !== undefined) sessionId = await this.connectWorkspace(target)\n if (sessionId !== undefined && !navigation.aborted) {\n this.replaceMain(sessionId, navigation, 'preserve')\n }\n }\n\n private async initializeDefaultWorkspace(signal: AbortSignal): Promise<WorkspaceView | undefined> {\n try {\n return await this.workspaces.initializeDefault(signal)\n } catch (_error: unknown) {\n if (!signal.aborted) this.notify({ kind: 'defaultWorkspaceFailed' })\n return undefined\n }\n }\n\n /** @returns true when an archived current selection was cleared. */\n private clearArchivedCurrent(): boolean {\n const current = this.mainReference?.sessionId\n if (current === undefined\n || !this.workspaces.list.getSnapshot().archivedSessionIds.includes(current)) return false\n this.clearMain()\n return true\n }\n\n private clearMain(): void {\n const previous = this.mainReference\n this.mainReference = undefined\n this.selection.set({})\n previous?.release()\n this.ctx.layout.selectPanel(null)\n }\n\n private replaceMain(\n target: SessionTarget,\n signal: AbortSignal,\n panel: 'reveal' | 'preserve',\n beforeOpen?: (sessionId: SessionId) => void,\n ): void {\n signal.throwIfAborted()\n const reference = this.sessions.retain(target, { source: 'mainView' })\n try {\n signal.throwIfAborted()\n beforeOpen?.(reference.sessionId)\n if (signal.aborted) {\n reference.release()\n return\n }\n const subagentAddress = typeof target === 'string'\n ? this.sessions.subagentAddress(reference.sessionId)\n : target\n this.selection.set({\n sessionId: reference.sessionId,\n ...(subagentAddress === undefined ? {} : { subagentAddress }),\n })\n } catch (error: unknown) {\n reference.release()\n throw error\n }\n const previous = this.mainReference\n this.mainReference = reference\n previous?.release()\n if (panel === 'reveal') this.ctx.layout.selectPanel(null)\n }\n\n}\n\n/**\n * `error` as the Session Controller's creation failure, or undefined when it\n * is not one. Client plugin bundles do not share error-class identity, so the\n * name decides.\n */\nfunction sessionCreateErrorOf(error: unknown): SessionCreateError | undefined {\n return error instanceof Error && error.name === 'SessionCreateError' ? error as SessionCreateError : undefined\n}\n\n/**\n * The words a failed Session creation is reported in: a Host refusal keeps its\n * stable code and message; any other failure keeps its own message.\n */\nfunction creationFailureMessage(error: unknown): string {\n const refused = sessionCreateErrorOf(error)\n if (refused !== undefined) return `${refused.rpcError.code}: ${refused.rpcError.message}`\n return error instanceof Error ? error.message : String(error)\n}\n\n/** Stable tie-breaking follows Host Workspace order. */\nfunction recentWorkspace(\n workspaces: readonly WorkspaceView[],\n sessions: SessionListState['byId'],\n): WorkspaceId | undefined {\n let selected: WorkspaceId | undefined\n let selectedTime = Number.NEGATIVE_INFINITY\n for (const workspace of workspaces) {\n let latest = Number.NEGATIVE_INFINITY\n for (const sessionId of workspace.sessionIds) {\n const session = sessions[sessionId]\n if (session !== undefined) latest = Math.max(latest, session.updatedAt)\n }\n if (latest === Number.NEGATIVE_INFINITY) latest = Date.parse(workspace.createdAt)\n if (selected === undefined || latest > selectedTime) {\n selected = workspace.workspaceId\n selectedTime = latest\n }\n }\n return selected\n}\n\nexport { UiWorkspaceService }\n","/**\n * The In work model: Sessions that need a look — running work, finished-unread\n * work, and everything the user pinned — folded from state other plugins own. No\n * state is persisted and nothing is refreshed here — the Session-list snapshot,\n * the Session-status snapshot, and the Workspace owner's pin and archive sets are\n * the whole input.\n *\n * Three quick groups, one row per Session, each row carrying the browsing list's\n * own row facts so a Session draws the same dot here as it does in the tree:\n * - `unread` holds non-pinned Sessions finished while unread.\n * - `pinned` holds every pinned Session, whatever its work state. The pin chooses\n * the row's group, never its dot: a pinned row reports its own running,\n * completion and pending-interaction state.\n * - `running` holds non-pinned Sessions that run themselves or have running\n * subagent work below them.\n *\n * Every listed Session appears in exactly one of the three: the pin leads, so a\n * pinned running Session lists only under `pinned`. `waiting` names the listed\n * Sessions blocked on the user, in the groups' display order.\n *\n * A subagent Session gets no row here, at any depth: the Session that delegated\n * the work carries it as its own run, so one delegation adds no row and no\n * nesting. Rows that never list at all: subagent Sessions (their durable\n * `origin`), the blank New-Session placeholder, and archived Sessions.\n */\nimport type { SessionListState } from '@deepseek-ai/dsh-api-session-controller/client'\nimport type { ObservableSnapshot } from '@deepseek-ai/dsh-client-store'\nimport type { SessionStatusSnapshot } from '@deepseek-ai/dsh-client-ui-session/client'\nimport type { SessionId } from '@deepseek-ai/dsh-session/types'\nimport { runningDescendantCounts, sessionNode, type SessionNode } from '../tree.ts'\n\n/**\n * One listed Session: the browsing list's own row facts, unchanged. Nothing in\n * the row says which group lists it — a group is a view, not a state.\n */\nexport type AttentionRow = SessionNode\n\n/** Everything the region renders: three independent groups plus the blocked set. */\nexport interface AttentionModel {\n /** Finished-unread Sessions with no pin; newest first. */\n readonly unread: readonly AttentionRow[]\n /** Every pinned Session, at rest or in flight; newest first. */\n readonly pinned: readonly AttentionRow[]\n /** Sessions running themselves or over running subagent work, unpinned; newest first. */\n readonly running: readonly AttentionRow[]\n /** Listed Sessions whose work is blocked on the user, in display order. */\n readonly waiting: readonly AttentionRow[]\n}\n\n/** Session list source (`ctx.sessions.list`). */\nexport type AttentionListSource = ObservableSnapshot<SessionListState>\n/** Session status source (`ctx.uiSession.sessionStatus`). */\nexport type AttentionStatusSource = ObservableSnapshot<SessionStatusSnapshot>\n/** One of the Workspace owner's derived registry sets (pinned or archived). */\nexport type AttentionSetSource = ObservableSnapshot<ReadonlySet<SessionId>>\n\ninterface Candidate {\n readonly updatedAt: number\n readonly row: AttentionRow\n}\n\n/** Every group lists newest first; the sort is stable, so equal timestamps keep Host list order. */\nfunction byRecency(left: Candidate, right: Candidate): number {\n return right.updatedAt - left.updatedAt\n}\n\n/**\n * Fold one list snapshot, one status snapshot, and the archive and pin sets into\n * the region's content.\n * @param list - Session list snapshot, in Host list order.\n * @param status - per-Session status map.\n * @param archived - archived Session ids, which never list.\n * @param pinned - pinned Session ids, which list only under `pinned`.\n * @returns the model the region renders.\n */\nexport function deriveAttention(\n list: SessionListState,\n status: SessionStatusSnapshot,\n archived: ReadonlySet<SessionId>,\n pinned: ReadonlySet<SessionId>,\n): AttentionModel {\n const unread: Candidate[] = []\n const pinnedRows: Candidate[] = []\n const running: Candidate[] = []\n const blocked = new Set<SessionId>()\n const descendants = runningDescendantCounts(list, status)\n list.ids.forEach((id) => {\n const row = list.byId[id]\n // An id may be listed before the Host projects its row (nothing to label).\n if (row === undefined) return\n if (row.origin === 'subagent' || row.blank || archived.has(id)) return\n // The status map is read once, here: the row's own state (not its group)\n // decides the dot, and pending interaction rides the same entry.\n const entry = status.get(id)\n if (entry?.pendingInteraction !== undefined) blocked.add(id)\n const node = sessionNode(row, status, descendants, pinned, archived)\n const candidate: Candidate = { updatedAt: row.updatedAt, row: node }\n // The pin outranks the work state for placement only; the row keeps its\n // running, completion and blocked facts for the dot it draws.\n if (node.pinned) {\n pinnedRows.push(candidate)\n return\n }\n // Subagent work belongs to the Session that delegated it: that row spins, and\n // the children never contribute rows of their own.\n if (node.running || node.runningSubagentCount > 0) {\n running.push(candidate)\n return\n }\n // A Session listed with no completion flag has nothing to report: it stays\n // in the tree below and takes no quick-group row.\n if (node.completed) unread.push(candidate)\n })\n const unreadRows = unread.sort(byRecency).map(candidate => candidate.row)\n const pinnedRowsSorted = pinnedRows.sort(byRecency).map(candidate => candidate.row)\n const runningRows = running.sort(byRecency).map(candidate => candidate.row)\n return {\n unread: unreadRows,\n pinned: pinnedRowsSorted,\n running: runningRows,\n waiting: [...unreadRows, ...pinnedRowsSorted, ...runningRows].filter(row => blocked.has(row.id)),\n }\n}\n\n/**\n * One row's comparable identity: everything the row renders. Two models with equal\n * keys draw the same pixels, which is what lets the store publish a fold only when\n * something visible changed.\n */\nfunction rowKey(row: AttentionRow): string {\n return [\n row.id,\n row.title,\n row.blank ? 'b' : '',\n row.running ? 'r' : '',\n String(row.runningSubagentCount),\n row.completed ? 'c' : '',\n row.pinned ? 'p' : '',\n row.archived ? 'a' : '',\n row.pendingInteraction ?? '',\n String(row.updatedAt),\n row.cwd ?? '',\n ].join('\\u0002')\n}\n\nfunction rowsKey(rows: readonly AttentionRow[]): string {\n return rows.map(rowKey).join('\\u0001')\n}\n\n/** Whether two models would render identically. */\nfunction sameModel(left: AttentionModel, right: AttentionModel): boolean {\n return rowsKey(left.unread) === rowsKey(right.unread)\n && rowsKey(left.pinned) === rowsKey(right.pinned)\n && rowsKey(left.running) === rowsKey(right.running)\n // The blocked marker rides this one, so a pending interaction that appears or\n // clears while the groups stand still is a change, not a no-op.\n && rowsKey(left.waiting) === rowsKey(right.waiting)\n}\n\n/** Read-only view of the current model, plus the plugin's disposer. */\nexport interface AttentionStore extends ObservableSnapshot<AttentionModel> {\n /** Detach from all four sources and drop every listener. */\n dispose(): void\n}\n\n/**\n * Keep the model in step with the four sources it folds: the Session list, the\n * Session status map, and the Workspace owner's pinned and archived sets. The\n * sets are sources in their own right because neither pinning nor archiving moves\n * the list or the status, so a row the user just filed away or just pinned would\n * otherwise stay as it was.\n *\n * Two folds that would render identically are not published, so a status tick\n * that only touches an unrelated Session costs no render. The caller owns the\n * lifetime through {@link AttentionStore.dispose}.\n * @param list -\n * @param status -\n * @param pinned -\n * @param archived -\n * @returns the model source and its disposer.\n */\nexport function createAttentionStore(\n list: AttentionListSource,\n status: AttentionStatusSource,\n pinned: AttentionSetSource,\n archived: AttentionSetSource,\n): AttentionStore {\n const listeners = new Set<() => void>()\n let model = deriveAttention(list.getSnapshot(), status.getSnapshot(), archived.getSnapshot(), pinned.getSnapshot())\n const recompute = (): void => {\n const next = deriveAttention(list.getSnapshot(), status.getSnapshot(), archived.getSnapshot(), pinned.getSnapshot())\n if (sameModel(next, model)) return\n model = next\n // forEach skips a listener removed earlier in the same pass and does not\n // visit one added during it, which is exactly the containment a plain\n // for..of over a live Set would not give.\n listeners.forEach(listener => { listener() })\n }\n const unsubscribes = [\n list.subscribe(recompute),\n status.subscribe(recompute),\n pinned.subscribe(recompute),\n archived.subscribe(recompute),\n ]\n return {\n getSnapshot: () => model,\n subscribe: (listener) => {\n listeners.add(listener)\n return () => { listeners.delete(listener) }\n },\n dispose: () => {\n for (const unsubscribe of unsubscribes) unsubscribe()\n listeners.clear()\n },\n }\n}\n","/**\n * Windows taskbar pulse for unattended running work: the shell's indeterminate\n * progress bar, only while listed Sessions are running and nothing is waiting or\n * finished-unread.\n *\n * The channel is optional. A browser, or a shell whose whitelist predates\n * `window.setProgressBar`, has no write at all; the presenter never throws.\n */\nimport type { AttentionModel, AttentionRow } from './model.ts'\n\n/**\n * The Desktop shell's window bridge, as the Web UI sees it. `dshDesktop` is the\n * shell's fixed preload whitelist: a page loaded in a browser has none, and a\n * shell predating the progress channel has `window` without `setProgressBar`.\n */\ninterface DesktopWindowBridge {\n readonly dshDesktop?: {\n readonly window?: {\n readonly setProgressBar?: (progress: number) => Promise<void>\n }\n }\n}\n\n/** Progress value Electron treats as the Windows indeterminate pulse. */\nconst PULSE = 2\n/** Progress value that removes the taskbar indicator. */\nconst CLEAR = -1\n\n/**\n * Read the shell's taskbar-progress write, or undefined when this page cannot use\n * it. Absence is the version probe, so the plugin never compares protocol\n * versions; the caller swallows the rejection a refused IPC produces.\n * @returns the bridge's write, or undefined when this page has none.\n */\nfunction desktopWindowProgress(): ((progress: number) => Promise<void>) | undefined {\n const setProgressBar = (globalThis as DesktopWindowBridge).dshDesktop?.window?.setProgressBar\n return typeof setProgressBar === 'function' ? setProgressBar : undefined\n}\n\n/**\n * Whether one listed Session finished while nobody looked: the reminder the pulse\n * must not talk over. A run in flight is not one, even with the flag still set on\n * it — the flag is cleared by opening the Session, not by a new turn.\n * @param row - one listed Session.\n * @returns true when the row reports finished and nothing about it is live.\n */\nfunction finishedUnreadAtRest(row: AttentionRow): boolean {\n return row.completed && !isLive(row)\n}\n\n/**\n * Whether a listed Session has work in flight: its own run, or the subagent work\n * delegated below it.\n * @param row - one listed Session.\n * @returns true while the Session carries running work.\n */\nfunction isLive(row: AttentionRow): boolean {\n return row.running || row.runningSubagentCount > 0\n}\n\n/**\n * Whether the current content earns the taskbar pulse: work is in flight, and\n * nothing is blocked on the user or finished-unread. Placement never decides this:\n * a pinned Session at rest is in view because the user asked, so it is not a new\n * notification and never pulses on its own, while a pinned Session that runs or\n * finished unread counts exactly like an unpinned one.\n * @param model - the current In work content.\n * @returns true when the Windows progress bar should run indeterminate.\n */\nexport function shouldPulseTaskbar(model: AttentionModel): boolean {\n const listed = [...model.unread, ...model.pinned, ...model.running]\n if (!listed.some(isLive)) return false\n if (model.waiting.length > 0) return false\n return !listed.some(finishedUnreadAtRest)\n}\n\n/**\n * One write per pulse/clear transition. A repeated state is a no-op, so an\n * unrelated list update does not re-issue the same platform call.\n */\nexport class TaskbarProgressPresenter {\n private readonly write: ((progress: number) => Promise<void>) | undefined\n private pulsing: boolean | undefined\n\n constructor() {\n this.write = desktopWindowProgress()\n }\n\n /** The page can reach the shell's taskbar-progress write. */\n get viable(): boolean {\n return this.write !== undefined\n }\n\n /**\n * Project one model onto the taskbar, writing only when the state changes.\n * @param model - the current In work content.\n */\n project(model: AttentionModel): void {\n const next = shouldPulseTaskbar(model)\n if (this.pulsing === next) return\n this.pulsing = next\n this.apply(next ? PULSE : CLEAR)\n }\n\n /** Retract the pulse so a disposed plugin leaves no stale indicator. */\n clear(): void {\n const wasPulsing = this.pulsing === true\n this.pulsing = undefined\n if (wasPulsing) this.apply(CLEAR)\n }\n\n private apply(progress: number): void {\n const write = this.write\n if (write === undefined) return\n void write(progress).catch((error: unknown) => {\n console.warn('ui-workspace: the shell refused the taskbar progress', error)\n })\n }\n}\n","function r(e){var t,f,n=\"\";if(\"string\"==typeof e||\"number\"==typeof e)n+=e;else if(\"object\"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=\" \"),n+=f)}else for(f in e)e[f]&&(n&&(n+=\" \"),n+=f);return n}export function clsx(){for(var e,t,f=0,n=\"\",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=\" \"),n+=t);return n}export default clsx;","/** Workspace rename and removal dialogs, keyed by their captured request. */\nimport { useEffect, useRef, useState } from 'react'\nimport { Button, Modal } from '@deepseek-ai/dsh-client-ui-primitives'\nimport type { WorkspaceId, WorkspaceView } from '@deepseek-ai/dsh-api-workspace-controller/client'\nimport type { WorkspaceActionRequest, WorkspaceBrowserProps } from '../contract/slots.ts'\nimport css from './WorkspaceBrowser.module.css'\n\ntype Props = Pick<WorkspaceBrowserProps, 'renameWorkspace' | 'deleteWorkspace' | 'settleWorkspaceAction' | 't'> & {\n request: WorkspaceActionRequest\n workspaces: readonly WorkspaceView[]\n}\n\n/** @param props - captured request, current Workspace list, and existing mutations. @returns the active dialog. */\nexport function WorkspaceDialogs({ request, workspaces, renameWorkspace, deleteWorkspace, settleWorkspaceAction, t }: Props) {\n const composingRef = useRef(false)\n const renameTarget = request.action === 'rename' ? request : null\n const [renameDraft, setRenameDraft] = useState(request.displayTitle)\n const [renaming, setRenaming] = useState(false)\n const [renameError, setRenameError] = useState<string | null>(null)\n const renameTrimmed = renameDraft.trim()\n // Self is excluded by identity, not by title: the draft is seeded with the\n // localized label, which for an automatically titled Workspace equals its\n // own displayed title without being a conflict with itself.\n const renameDuplicate = renameTarget !== null && renameTrimmed !== ''\n && workspaces.some(w => w.workspaceId !== renameTarget.workspaceId && w.title === renameTrimmed)\n const renameBlocked = renaming || renameTrimmed === ''\n || renameTarget === null || renameTrimmed === renameTarget.storedTitle || renameDuplicate\n const closeRename = () => {\n if (renaming) return\n settleWorkspaceAction()\n setRenameError(null)\n }\n const confirmRename = () => {\n if (renameBlocked) return\n setRenaming(true)\n setRenameError(null)\n renameWorkspace(renameTarget.workspaceId, renameTrimmed).then(() => {\n setRenaming(false)\n settleWorkspaceAction()\n }).catch((reason: unknown) => {\n setRenaming(false)\n setRenameError(reason instanceof Error ? reason.message : String(reason))\n })\n }\n\n const deleteTarget = request.action === 'delete' ? request : null\n const [deleting, setDeleting] = useState(false)\n const [deleteCommittedId, setDeleteCommittedId] = useState<WorkspaceId | null>(null)\n const [deleteError, setDeleteError] = useState<string | null>(null)\n useEffect(() => {\n if (deleteCommittedId === null\n || workspaces.some(workspace => workspace.workspaceId === deleteCommittedId)) return\n setDeleting(false)\n setDeleteCommittedId(null)\n settleWorkspaceAction()\n }, [deleteCommittedId, workspaces, settleWorkspaceAction])\n const closeDelete = () => {\n if (deleting) return\n settleWorkspaceAction()\n setDeleteError(null)\n }\n const confirmDelete = () => {\n /* v8 ignore next -- the Modal is absent without a target and its button is disabled while deleting. */\n if (deleting || deleteTarget === null) return\n setDeleting(true)\n setDeleteCommittedId(null)\n setDeleteError(null)\n deleteWorkspace(deleteTarget.workspaceId).then(() => {\n // Keep the confirmation pending until this component has rendered the\n // committed list projection without the deleted id. Closing earlier\n // exposes one stale React frame to the next Create Workspace gesture.\n setDeleteCommittedId(deleteTarget.workspaceId)\n }).catch((reason: unknown) => {\n setDeleting(false)\n setDeleteError(reason instanceof Error ? reason.message : String(reason))\n })\n }\n\n return <>\n <Modal\n open={renameTarget !== null}\n onClose={closeRename}\n closeLabel={t('close')}\n title={t('rename.workspace.title')}\n footer={(\n <>\n <Button variant=\"outline\" disabled={renaming} onClick={closeRename}>{t('cancel')}</Button>\n <Button variant=\"primary\" disabled={renameBlocked} onClick={confirmRename}>{t('rename')}</Button>\n </>\n )}\n >\n <input\n className={css.renameInput}\n value={renameDraft}\n aria-label={t('field.workspaceName')}\n data-modal-autofocus\n disabled={renaming}\n onFocus={(e) => { e.target.select() }}\n onChange={(e) => { setRenameDraft(e.target.value); setRenameError(null) }}\n onCompositionStart={() => { composingRef.current = true }}\n onCompositionEnd={() => { composingRef.current = false }}\n onKeyDown={(e) => {\n if (e.key === 'Enter' && !composingRef.current) {\n e.preventDefault()\n confirmRename()\n }\n }}\n />\n {renameDuplicate && (\n <div className={css.renameError} role=\"alert\">{t('conflict.named', { name: renameTrimmed })}</div>\n )}\n {renameError !== null && <div className={css.renameError} role=\"alert\">{renameError}</div>}\n </Modal>\n\n <Modal\n open={deleteTarget !== null}\n onClose={closeDelete}\n closeLabel={t('close')}\n title={t('delete.workspace')}\n {...deleteTarget === null\n ? {}\n : { description: t('delete.desc', { name: deleteTarget.displayTitle }) }}\n footer={(\n <>\n <Button variant=\"outline\" disabled={deleting} onClick={closeDelete}>{t('cancel')}</Button>\n <Button\n variant=\"outline\"\n className={css.deleteAction}\n disabled={deleting}\n onClick={confirmDelete}\n >\n {t('delete.workspace')}\n </Button>\n </>\n )}\n >\n {deleting && <div className={css.deleteStatus} role=\"status\">{t('delete.pending')}</div>}\n {deleteError !== null && <div className={css.renameError} role=\"alert\">{deleteError}</div>}\n </Modal>\n </>\n}\n","/**\n * Fixed first-use Workspace naming, shared by the Host that creates the\n * directory and by browser consumers that label the resulting row. A pure fold\n * with no imports, so client bundles inline it instead of requesting a\n * module-table row this package does not publish.\n * @module @deepseek-ai/dsh-api-workspace-controller/default-workspace\n */\n/**\n * Leaf directory name of the first-use Workspace under\n * `<Documents>/deepseek-harness`. Language-neutral, so one installation keeps\n * one on-disk path across language switches. The registry derives the initial\n * title from this same segment, which is the title\n * {@link workspaceDisplayTitle} recognizes as automatic.\n */\nexport const DEFAULT_WORKSPACE_DIRECTORY = 'default-workspace';\n/**\n * The text one Workspace is labeled with. A Workspace still carrying the\n * automatic first-use title reads as the caller's localized default name; every\n * other title reads verbatim in every language. A title the user typed as\n * exactly {@link DEFAULT_WORKSPACE_DIRECTORY} is labeled as the default too;\n * nothing else depends on the distinction.\n * @param title - stored Workspace title.\n * @param localizedDefault - the default Workspace name in the active language.\n * @returns the title to display.\n */\nexport function workspaceDisplayTitle(title, localizedDefault) {\n return title === DEFAULT_WORKSPACE_DIRECTORY ? localizedDefault : title;\n}\n//# sourceMappingURL=default-workspace.js.map","/**\n * Workspace browser tree row components (figma Cell set 14:3080): pure presentational —\n * all data and callbacks arrive via props. Hover swaps (folder->chevron,\n * time->ellipsis, action buttons) are CSS-only, and a session row's clipped\n * title marquees programmatically while the row is hovered. Workspace row\n * menus share captured Workspace actions with right-click. Both row types\n * render the shared `contextMenu.button` factory for their menu trigger.\n * Session hover buttons use the browser's `renderSlot` for the\n * `sidebar.workspaces.session.row.action` list. Session and Workspace\n * hover cards are suppressed while their menu is open.\n */\nimport { useEffect, useMemo, useRef } from 'react'\nimport type { PointerEvent, RefObject } from 'react'\nimport clsx from 'clsx'\nimport type { PropsRenderSlots } from '@deepseek-ai/dsh-client-ui-slots'\nimport {\n HoverCard, IconArchiveOutlineRegular,\n IconFolderCloseRegular, IconFolderOpenRegular,\n IconNewChatOutlineRegular, IconPinFillRegular,\n IconTriangleRightFillRegular, IconUnarchiveOutlineRegular, relativeTime, StateDot, Tooltip, useRowDragPreview,\n} from '@deepseek-ai/dsh-client-ui-primitives'\nimport type { ShortcutCatalogEntry } from '@deepseek-ai/dsh-client-shortcuts/client'\nimport type { StateDotState } from '@deepseek-ai/dsh-client-ui-primitives'\nimport { abbreviateHomePath } from '@deepseek-ai/dsh-util-workspace-path'\nimport type { WorkspaceId } from '@deepseek-ai/dsh-api-workspace-controller/client'\nimport type { WorkspaceBrowserProps } from '../contract/slots.ts'\nimport type { GroupNode, SearchResultNode, SessionNode } from '../tree.ts'\nimport css from './Rows.module.css'\n\n/** Sidebar-owned layout values needed by row copies mounted outside the sidebar. */\nconst DRAG_PREVIEW_PROPERTIES = [\n '--dsh-sidebar-row-padding',\n '--dsh-sidebar-label-gap',\n '--dsh-sidebar-paint-inset',\n] as const\n\n/** The standard locale seat, prop-passed from the browser root. */\ntype RowTranslate = WorkspaceBrowserProps['t']\n\n/**\n * Child-seat renderer threaded from the browser root: the row's action lists,\n * its leading and trailing decorations, and its hover-card section. The leading\n * seat is rendered only while the row's primary state is idle, so a status dot and a\n * leading occupant never share the row; the hover seat only while the row's\n * card is open.\n */\ntype RowRenderSlots = PropsRenderSlots<\n | 'sidebar.workspaces.session.row.action'\n | 'sidebar.session.row.trailing'\n | 'sidebar.session.row.leading'\n | 'sidebar.session.row.hover'\n>['renderSlot']\n\n/** Row display title: blank rows show the localized New Session label. */\nfunction displayTitle(node: SessionNode, t: RowTranslate): string {\n return node.blank ? t('session.new') : (node.title || t('session.untitled'))\n}\n\n/* Overflow this small hides no meaningful tail; scrolling for it reads as an\n accidental jitter, so the title stays put. */\nconst MIN_TITLE_REVEAL_PX = 8\n\n/* Marquee travel speed: slow enough to read the text as it passes. */\nconst TITLE_MARQUEE_PX_PER_MS = 0.03\n\n/**\n * Place the title's scroll position and publish the stylesheet's fade-mask\n * hooks: `data-scrolled` while the title has left its start (left fade) and\n * `data-clipped` while text remains beyond the right edge (right fade).\n * @param title - the row's clipping title element.\n * @param left - scroll offset in CSS pixels.\n * @param range - the title's maximum scroll offset in CSS pixels.\n */\nfunction placeTitle(title: HTMLSpanElement, left: number, range: number): void {\n // jsdom implements no scrollTo; the lane's direct assignment is instant there\n // anyway, so both paths land on the same position.\n if (typeof title.scrollTo === 'function') title.scrollTo({ left, behavior: 'instant' })\n else title.scrollLeft = left\n if (left > 0) title.dataset.scrolled = ''\n else delete title.dataset.scrolled\n if (left < range) title.dataset.clipped = ''\n else delete title.dataset.clipped\n}\n\n/**\n * Return the title to its resting state: scrolled to the start with both fade\n * masks off, so the resting ellipsis renders at full strength.\n * @param title - the row's clipping title element.\n */\nfunction restTitle(title: HTMLSpanElement): void {\n if (typeof title.scrollTo === 'function') title.scrollTo({ left: 0, behavior: 'instant' })\n else title.scrollLeft = 0\n delete title.dataset.scrolled\n delete title.dataset.clipped\n}\n\n/**\n * Marquee a title wider than its one-line cell while its row is hovered: the\n * title clips its own text, so entering crawls it at a constant speed until the\n * far edge (a fork's incremented title, for example) is in view, then rests\n * there under the pointer. Overflow of at most {@link MIN_TITLE_REVEAL_PX}\n * stays put — a barely-clipped title moving a few pixels reads as jitter, not a\n * reveal. Leaving returns the title to the start in one step, because the\n * resting ellipsis and the narrowed cell would otherwise meet the text while it\n * travelled back. Reduced motion jumps to the far edge instead of crawling.\n * @param title - ref to the row's clipping title element.\n * @returns stable pointer enter/leave handlers for the row.\n */\nfunction useTitleMarquee(title: RefObject<HTMLSpanElement | null>): {\n enter: (event?: PointerEvent) => void\n leave: () => void\n} {\n const frame = useRef(0)\n const revealing = useRef(false)\n useEffect(() => () => { cancelAnimationFrame(frame.current) }, [])\n return useMemo(() => ({\n enter: (event?: PointerEvent): void => {\n if (event?.pointerType === 'touch') return\n /* v8 ignore next -- defensive: the title span renders unconditionally. */\n if (title.current === null) return\n if (revealing.current) return\n revealing.current = true\n const element = title.current\n const range = element.scrollWidth - element.clientWidth\n if (range <= MIN_TITLE_REVEAL_PX) return\n if (window.matchMedia('(prefers-reduced-motion: reduce)').matches) {\n placeTitle(element, range, range)\n return\n }\n cancelAnimationFrame(frame.current)\n let previous: number | undefined\n let position = 0\n const step = (now: DOMHighResTimeStamp): void => {\n position += previous === undefined ? 0 : (now - previous) * TITLE_MARQUEE_PX_PER_MS\n previous = now\n placeTitle(element, Math.min(position, range), range)\n if (position < range) frame.current = requestAnimationFrame(step)\n }\n frame.current = requestAnimationFrame(step)\n },\n leave: (): void => {\n revealing.current = false\n cancelAnimationFrame(frame.current)\n /* v8 ignore next -- defensive: the title span renders unconditionally. */\n if (title.current === null) return\n restTitle(title.current)\n },\n }), [title])\n}\n\n/** Localized compact relative time (\"刚刚\"/\"5分钟\" in zh, \"now\"/\"5min\" in en). */\nfunction timeLabel(updatedAt: number, now: number, t: RowTranslate): string {\n const { unit, n } = relativeTime(updatedAt, now)\n return unit === 'now' ? t('time.now') : t(`time.${unit}`, { n })\n}\n\n/** Hover-card variant: distances wrap in the ago template; the now bucket stays bare (no \"now ago\"). */\nfunction hoverTimeLabel(updatedAt: number, now: number, t: RowTranslate): string {\n const { unit, n } = relativeTime(updatedAt, now)\n return unit === 'now' ? t('time.now') : t('time.ago', { t: t(`time.${unit}`, { n }) })\n}\n\n/**\n * Absolute creation time through the dictionary's date template (the message\n * clock pattern): `toLocaleString` would follow the browser language, not the\n * app locale, and produce mixed-language text after a switch.\n */\nfunction createdLabel(createdAt: number, t: RowTranslate): string {\n const d = new Date(createdAt)\n const pad2 = (v: number): string => String(v).padStart(2, '0')\n const date = t('date.ymd', { y: d.getFullYear(), m: d.getMonth() + 1, d: d.getDate() })\n return t('hover.created', { time: `${date} ${pad2(d.getHours())}:${pad2(d.getMinutes())}` })\n}\n\n/** Hover-card body: workspace title, display directory path, absolute creation time. */\nfunction WorkspaceHoverContent({ label, cwd, createdAt, t }: {\n label: string\n cwd: string | undefined\n createdAt: number\n t: RowTranslate\n}) {\n return (\n <div className={css.hoverContent}>\n <div className={css.hoverTitle}>{label}</div>\n <div className={css.hoverPath}>{cwd}</div>\n <div className={css.hoverTime}>{createdLabel(createdAt, t)}</div>\n </div>\n )\n}\n\n/**\n * Row drag wiring supplied by the tree owner. `drop` reports the half of the\n * row where the pointer released so the owner can resolve an insert anchor.\n */\nexport interface RowDragProps {\n /** Start dragging this row. */\n start: () => void\n /** A compatible row drag is in flight. */\n active: boolean\n /** Current marker on this row: insert line above, below, or none. */\n marker: 'before' | 'after' | null\n /** Report the hovered half while a compatible drag passes over this row. */\n hover: (half: 'before' | 'after') => void\n drop: (half: 'before' | 'after') => void\n end: () => void\n}\n\n/** Drag lifecycle owned by a workspace row; its enclosing group owns hit testing. */\ninterface WorkspaceRowDragProps {\n start: () => void\n end: () => void\n}\n\n/** Pointer-position half of a row (insert line above or below). */\nfunction rowHalf(e: { clientY: number; currentTarget: HTMLElement }): 'before' | 'after' {\n const rect = e.currentTarget.getBoundingClientRect()\n return e.clientY < rect.top + rect.height / 2 ? 'before' : 'after'\n}\n\n/** Owner props of one Workspace header row; the access Hooks are the browser root's own standard seats. */\ntype ProjectRowItemProps = {\n group: GroupNode\n newShortcut?: ShortcutCatalogEntry | undefined\n containsCurrentDescendant?: boolean\n onToggle: () => void\n onCreate: (workspaceId: WorkspaceId) => void\n /** Present only for real Workspace rows in the grouped view. */\n drag?: WorkspaceRowDragProps | undefined\n /** Host account home; POSIX home-rooted hover paths display as `~`. */\n home?: string | undefined\n t: RowTranslate\n} & Pick<WorkspaceBrowserProps, 'useWorkspaceAccess' | 'renderFactorySlot' | 'useContextMenuTarget' | 'useContextMenu'>\n\n/** The header actions one row offers; an absent create offers no New Session button. */\ninterface ProjectRowActions {\n readonly create?: (() => void) | undefined\n readonly reorder: boolean\n}\n\n/**\n * Project (workspace) header row: folder + title;\n * hover reveals the chevron and, on a real Workspace, the create button;\n * dwelling on a real Workspace shows its hover card. The ungrouped bucket\n * has neither, because it has no backing Workspace to start a Session in.\n * `containsCurrent` arrives on the node (derivation fact, no renderer scan).\n * Create and drag follow the Workspace access snapshot. Menu providers own\n * their access checks; the ungrouped bucket has no Workspace menu.\n * @param props.group - derived group node.\n * @param props.containsCurrentDescendant - highlight an ancestor even when its subtree is collapsed.\n * @param props.onToggle - expand/collapse the group.\n * @param props.onCreate - start a frontend Session inside the given Workspace.\n * @param props.drag - optional workspace-row drag wiring.\n * @param props.home - host account home for POSIX hover-path abbreviation.\n * @param props.t - the browser root's locale seat.\n * @returns the row element.\n */\nexport function ProjectRowItem(props: ProjectRowItemProps) {\n const workspaceId = props.group.workspaceId\n return workspaceId === undefined\n ? <UngroupedProjectRow {...props} />\n : <WorkspaceProjectRow {...props} workspaceId={workspaceId} />\n}\n\n/** The ungrouped bucket's header: no backing Workspace to start a Session in or reorder. */\nfunction UngroupedProjectRow(props: ProjectRowItemProps) {\n return <ProjectRow {...props} actions={{ reorder: false }} />\n}\n\n/** A real Workspace's header: every action asks that Workspace's resource. */\nfunction WorkspaceProjectRow({ workspaceId, ...props }: ProjectRowItemProps & { workspaceId: WorkspaceId }) {\n const { useWorkspaceAccess } = props\n const create = useWorkspaceAccess(workspaceId, 'session/create')\n const actions: ProjectRowActions = {\n create: create ? () => { props.onCreate(workspaceId) } : undefined,\n reorder: useWorkspaceAccess(workspaceId, 'workspace/insertBefore'),\n }\n return <ProjectRow {...props} actions={actions} />\n}\n\nfunction ProjectRow({\n group, containsCurrentDescendant = false, onToggle, drag: offeredDrag, home, newShortcut, t, actions,\n renderFactorySlot, useContextMenuTarget, useContextMenu,\n}: Omit<ProjectRowItemProps, 'onCreate'> & { actions: ProjectRowActions }) {\n const { getTriggerProps } = useContextMenu()\n const drag = actions.reorder ? offeredDrag : undefined\n const create = actions.create\n const row = group\n // The ungrouped bucket has no workspace title: its label is dictionary copy.\n const label = row.workspaceId === undefined ? t('group.ungrouped') : row.label\n const active = containsCurrentDescendant || (group.expanded && group.containsCurrent)\n const menuOpen = useContextMenuTarget(target => target?.kind === 'workspace' && target.value.workspaceId === row.workspaceId)\n const dragPreview = useRowDragPreview(css.dragPreview as string, DRAG_PREVIEW_PROPERTIES)\n const workspaceMenuTarget = row.workspaceId !== undefined && row.cwd !== undefined\n ? { workspaceId: row.workspaceId, path: row.cwd } : undefined\n const ownRow = (\n <div\n className={clsx(css.projectRow, menuOpen && css.menuOpen)}\n data-row-key={`workspace:${group.key}`}\n role=\"treeitem\"\n aria-expanded={row.expanded}\n onClick={onToggle}\n {...getTriggerProps(workspaceMenuTarget === undefined ? undefined : { kind: 'workspace', value: { ...workspaceMenuTarget, displayTitle: label } })}\n draggable={drag !== undefined}\n onDragStart={drag === undefined\n ? undefined\n : (e) => {\n e.dataTransfer.effectAllowed = 'move'\n e.dataTransfer.setData('text/plain', row.key)\n drag.start()\n dragPreview.start(e)\n }}\n onDragEnd={() => { if (dragPreview.clear()) drag?.end() }}\n >\n <span className={clsx(css.slot, css.folder, active && css.folderActive)}>\n {row.expanded ? <IconFolderOpenRegular /> : <IconFolderCloseRegular />}\n {/* Folded group holding executing work: the rows that would carry the\n running dot are off screen, so the folder glyph carries it. The\n badge rides the folder span, so row hover swaps it out with the\n chevron exactly like the glyph it annotates. */}\n {row.running && (\n <span className={css.folderActivity} role=\"img\" aria-label={t('group.running')}>\n <StateDot state=\"ongoing\" size={7} />\n </span>\n )}\n {/* Same seat for the folded group's completion reminder: the hidden\n row's done dot reports on the closed folder instead. */}\n {row.completedUnread && !row.running && (\n <span className={css.folderActivity} role=\"img\" aria-label={t('group.completed')}>\n <StateDot state=\"done\" size={7} />\n </span>\n )}\n </span>\n <span className={clsx(css.slot, css.chevron)}>\n <IconTriangleRightFillRegular className={clsx(css.arrow, row.expanded && css.arrowOpen)} />\n </span>\n <span className={css.projectText}>\n <span className={css.title}>{label}</span>\n </span>\n <span className={css.rowActions}>\n {workspaceMenuTarget !== undefined && (\n renderFactorySlot('contextMenu.button', {\n target: { kind: 'workspace', value: { ...workspaceMenuTarget, displayTitle: label } },\n label: t('actions.workspace.aria', { name: label }),\n className: css.iconButton,\n })\n )}\n {create !== undefined && (\n <Tooltip label={t('actions.newSession')} shortcutKeys={newShortcut?.keys} side=\"bottom\" align=\"end\" delayMs={500} portal>\n <button\n type=\"button\"\n className={css.iconButton}\n aria-keyshortcuts={newShortcut?.aria}\n aria-label={t('actions.newSession.aria', { name: label })}\n onClick={(e) => { e.stopPropagation(); create() }}\n >\n <IconNewChatOutlineRegular size={14} />\n </button>\n </Tooltip>\n )}\n </span>\n </div>\n )\n // The ungrouped bucket has no backing Workspace: no card to show.\n if (row.createdAt === undefined) return ownRow\n return (\n <HoverCard\n anchor={ownRow}\n content={<WorkspaceHoverContent\n label={row.label}\n cwd={row.cwd === undefined ? undefined : abbreviateHomePath(row.cwd, home)}\n createdAt={row.createdAt}\n t={t}\n />}\n openDelayMs={800}\n grouped\n disabled={menuOpen}\n copyText={row.cwd}\n copyLabel={t('copy')}\n copiedLabel={t('hover.copied')}\n />\n )\n}\n\n/* v8 ignore next 3 -- closed-union backstop; only reached if the status is forged */\nfunction assertNever(value: never): never {\n throw new Error(`unknown pending interaction: ${String(value)}`)\n}\n\ninterface SessionStatus {\n state: StateDotState\n label: string\n /** Compact text that replaces the Session row's update time. */\n trailingLabel?: string\n}\n\n/**\n * Session status presentation; pending interaction is primary and live activity\n * outranks completion reminders.\n */\nfunction sessionStatuses(\n node: Pick<SessionNode, 'pendingInteraction' | 'running' | 'runningSubagentCount' | 'completed'>,\n t: RowTranslate,\n): readonly [SessionStatus, ...SessionStatus[]] {\n const subagents: SessionStatus | undefined = node.runningSubagentCount === 0\n ? undefined\n : {\n state: 'ongoing',\n label: t(\n node.runningSubagentCount === 1\n ? 'status.subagentsRunning.one'\n : 'status.subagentsRunning.other',\n { n: node.runningSubagentCount },\n ),\n }\n let pending: SessionStatus | undefined\n switch (node.pendingInteraction) {\n case 'approval':\n pending = {\n state: 'warning',\n label: t('status.waitingApproval'),\n trailingLabel: t('status.compact.approval'),\n }\n break\n case 'plan-review':\n pending = {\n state: 'warning',\n label: t('status.planReview'),\n trailingLabel: t('status.compact.planReview'),\n }\n break\n case 'question':\n pending = {\n state: 'warning',\n label: t('status.waitingAnswer'),\n trailingLabel: t('status.compact.answer'),\n }\n break\n case undefined: break\n /* v8 ignore next -- closed PendingInteractionStatus union */\n default: return assertNever(node.pendingInteraction)\n }\n if (pending !== undefined) return subagents === undefined ? [pending] : [pending, subagents]\n if (node.running) {\n const primary: SessionStatus = { state: 'ongoing', label: t('status.running') }\n return subagents === undefined ? [primary] : [primary, subagents]\n }\n if (subagents !== undefined) return [subagents]\n if (node.completed) return [{ state: 'done', label: t('status.completed') }]\n return [{ state: 'idle', label: t('status.idle') }]\n}\n\n/** Primary status dot plus every status's screen-reader label, shared by the search and session rows. */\nfunction SessionStatusDots({ statuses }: { statuses: readonly [SessionStatus, ...SessionStatus[]] }) {\n return (\n <>\n <StateDot state={statuses[0].state} />\n {statuses.map(status => (\n <span className={css.visuallyHidden} key={status.label}>{status.label}</span>\n ))}\n </>\n )\n}\n\n/** Non-interactive pinned-row marker; the enclosing row remains the only action. */\nfunction PinnedIndicator({ t }: { t: RowTranslate }) {\n const label = t('row.pinned')\n return (\n <span className={css.pinIndicator} role=\"img\" aria-label={label} title={label}>\n <IconPinFillRegular size={14} />\n </span>\n )\n}\n\n/**\n * Hover-card body: full title, display working directory, relative time, the Session's own scheduled-task\n * section, and every relevant live status. The task section sits above the\n * status lines so they stay the card's trailing status line.\n */\nfunction SessionHoverContent({ node, cwd, now, renderSlot, t }: {\n node: SessionNode\n /** Display working directory; absent omits the line. */\n cwd: string | undefined\n now: number\n renderSlot: RowRenderSlots\n t: RowTranslate\n}) {\n // On archived rows the archived line already says the session is inactive,\n // so resting statuses (idle/completed) drop; live activity still shows.\n const statuses = sessionStatuses(node, t)\n .filter(status => !(node.archived && (status.state === 'done' || status.state === 'idle')))\n return (\n <div className={css.hoverContent}>\n <div className={css.hoverTitle}>{displayTitle(node, t)}</div>\n {cwd !== undefined && <div className={css.hoverPath}>{cwd}</div>}\n {/* Same placeholder rule as the row's trailing cell: no timestamp\n before the first prompt. */}\n {!node.blank && <div className={css.hoverTime}>{hoverTimeLabel(node.updatedAt, now, t)}</div>}\n {renderSlot('sidebar.session.row.hover', { sessionId: node.id })}\n {statuses.map(status => (\n <div className={css.hoverStatus} key={status.label}>\n <StateDot state={status.state} />\n <span>{status.label}</span>\n </div>\n ))}\n {node.archived && (\n <div className={clsx(css.hoverStatus, css.hoverArchived)}>\n <IconArchiveOutlineRegular size={14} />\n <span>{t('row.archived')}</span>\n </div>\n )}\n </div>\n )\n}\n\n/**\n * One flat search result: title, Workspace context, and optional content\n * excerpt. Search navigation opens the session only; it does not address an\n * event inside the conversation. Archived rows carry a hover unarchive\n * button, because search is where the filter surfaces them for recovery.\n * @param props.result - merged local/content search row.\n * @param props.currentId - selected session id.\n * @param props.onOpen - open the selected session.\n * @param props.onUnarchive - unarchive an archived result row.\n * @param props.useSessionAccess - the browser root's Session access Hook; the restore control\n * appears only while the snapshot allows `workspace/unarchiveSession` for that Session.\n * @param props.t - Workspace-browser translation seat.\n * @returns the result row.\n */\nexport function SearchResultItem({\n result, currentId, onOpen, onUnarchive, useSessionAccess, t,\n}: {\n result: SearchResultNode\n currentId: string | undefined\n onOpen: (id: SearchResultNode['id']) => void\n onUnarchive: (id: SearchResultNode['id']) => void\n t: RowTranslate\n} & Pick<WorkspaceBrowserProps, 'useSessionAccess'>) {\n const selected = result.id === currentId\n const canUnarchive = useSessionAccess(result.id, 'workspace/unarchiveSession')\n const statuses = sessionStatuses(result, t)\n const primaryStatus = statuses[0]\n return (\n <div\n className={clsx(css.searchResultRow, selected && css.selected, result.archived && css.archived)}\n role=\"treeitem\"\n aria-selected={selected}\n aria-description={result.archived ? t('toast.archivedNotOpenable') : undefined}\n onClick={() => { onOpen(result.id) }}\n >\n <span className={css.searchResultHeading}>\n {/* Like session rows, the leading slot owns every row marker; on\n archived rows it stays blank — the grayed row carries the\n archived look. */}\n <span className={css.slot}>\n {!result.archived && primaryStatus.state !== 'idle' && (\n <SessionStatusDots statuses={statuses} />\n )}\n </span>\n <span className={css.searchResultTitle}>{result.title || t('session.untitled')}</span>\n {result.archived && canUnarchive && (\n <span className={css.rowActions}>\n <Tooltip label={t('actions.unarchive')} side=\"bottom\" align=\"end\" delayMs={500} portal>\n <button\n type=\"button\"\n className={css.iconButton}\n aria-label={t('menu.unarchiveSession')}\n onClick={(e) => { e.stopPropagation(); onUnarchive(result.id) }}\n >\n <IconUnarchiveOutlineRegular size={14} />\n </button>\n </Tooltip>\n </span>\n )}\n </span>\n <span className={css.searchResultMeta}>\n <span className={css.searchResultWorkspace}>{result.workspace || t('group.ungrouped')}</span>\n {result.snippet !== undefined && (\n <span className={css.searchResultSnippet}>{result.snippet}</span>\n )}\n </span>\n </div>\n )\n}\n\n/**\n * One top-level 32px session row: leading 16px cell (status dot, or the\n * leading seat while the row's primary state is idle), title, relative time or\n * compact pending label, and the row actions menu. A row that owns a state dot\n * keeps that cell and renders no seat, so an ambient automation mark never\n * appears beside the row's own state dot. An archived row keeps the cell blank:\n * neither marker renders there, and its live status stays on the hover card.\n * The row accepts Tab focus and opens with unmodified Enter or Space; descendant controls\n * handle their own activation without opening the row.\n * @param props.node - derived session node.\n * @param props.currentId - selected session id (row highlight).\n * @param props.now - epoch ms for relative-time formatting.\n * @param props.onOpen - open a session by id.\n * @param props.onRenameRequest - open the rename dialog from a title double-click (id + current title);\n * called only after a single press on the title since the window last lost focus.\n * @param props.renderSlot - child-seat renderer for the row's action lists\n * (`sidebar.workspaces.session.menu.item` / `sidebar.workspaces.session.row.action`),\n * its leading and trailing decorations, and its hover-card section.\n * @param props.onReveal - scroll this row into view after search navigation, then acknowledge it.\n * @param props.drag - optional row-drag target wiring; blank rows, and rows whose access excludes\n * `workspace/insertSessionBefore`, cannot start a drag.\n * @param props.home - host account home for POSIX hover-path abbreviation.\n * @param props.useSessionAccess - the browser root's Session access Hook; the title double-click\n * renames only while it allows `session/rename`.\n * @param props.t - the browser root's locale seat.\n * @returns the session row.\n */\nexport function SessionNodeItem({\n node, currentId, now, onOpen, onRenameRequest, renderSlot, renderFactorySlot, useContextMenuTarget,\n useContextMenu, onReveal, rowKey, drag, home, useSessionAccess, t,\n}: {\n useContextMenu: WorkspaceBrowserProps['useContextMenu']\n renderFactorySlot: WorkspaceBrowserProps['renderFactorySlot']\n useContextMenuTarget: WorkspaceBrowserProps['useContextMenuTarget']\n node: SessionNode\n currentId: string | undefined\n now: number\n onOpen: (id: SessionNode['id']) => void\n /** Open the rename dialog from a title double-click (id + current title); see the function JSDoc for the press precondition. */\n onRenameRequest: (id: SessionNode['id'], currentTitle: string) => void\n /** Scroll this row into view after search navigation, then acknowledge it. */\n onReveal?: (() => void) | undefined\n /**\n * DOM identity of this row occurrence. The browsing tree omits it — it lists a\n * Session once, so the Session id is the row's identity. A surface that lists\n * the same Session again passes its own key, keeping the two occurrences\n * distinguishable to row-position code and to tests.\n */\n rowKey?: string | undefined\n /** Present on reorderable-list rows so every row can remain a drop target. */\n drag?: RowDragProps | undefined\n /** Host account home; POSIX home-rooted hover paths display as `~`. */\n home?: string | undefined\n t: RowTranslate\n} & Pick<WorkspaceBrowserProps, 'useSessionAccess'> & PropsRenderSlots<\n | 'sidebar.workspaces.session.row.action'\n | 'sidebar.session.row.trailing'\n | 'sidebar.session.row.leading'\n | 'sidebar.session.row.hover'\n>) {\n const { getTriggerProps } = useContextMenu()\n const row = node\n const title = displayTitle(node, t)\n const selected = node.id === currentId\n const statuses = sessionStatuses(node, t)\n const primaryStatus = statuses[0]\n const showStatus = primaryStatus.state !== 'idle'\n // Archived rows hold their in-place grayed slot, so manual reorder cannot\n // move them. Pinned rows drag within the pinned block: the browser gates\n // their drop targets to fellow pinned rows.\n const renamable = useSessionAccess(node.id, 'session/rename')\n const reorderable = useSessionAccess(node.id, 'workspace/insertSessionBefore')\n const draggable = drag !== undefined && reorderable && !row.blank && !row.archived\n const menuOpen = useContextMenuTarget(target => target?.kind === 'session' && target.value.sessionId === node.id)\n const dragPreview = useRowDragPreview(css.dragPreview as string, DRAG_PREVIEW_PROPERTIES)\n const rowRef = useRef<HTMLDivElement>(null)\n const titleRef = useRef<HTMLSpanElement>(null)\n // On macOS the click that activates the window is not delivered, but the\n // next click arrives with detail 2 and fires dblclick, so rename requires a\n // detail-1 press on this title since the window last lost focus.\n const renameArmed = useRef(false)\n const disarmRename = useRef(() => { renameArmed.current = false }).current\n const marquee = useTitleMarquee(titleRef)\n useEffect(() => {\n if (menuOpen || rowRef.current?.matches(':hover')) marquee.enter()\n else marquee.leave()\n }, [menuOpen, marquee])\n useEffect(() => {\n if (onReveal === undefined) return\n rowRef.current?.scrollIntoView({ block: 'nearest' })\n onReveal()\n }, [onReveal])\n const ownRow = (\n <div\n ref={rowRef}\n data-row-key={rowKey ?? `session:${node.id}`}\n className={clsx(\n css.sessionRow, selected && css.selected, menuOpen && css.menuOpen,\n row.archived && css.archived,\n drag?.marker === 'before' && css.dropBefore, drag?.marker === 'after' && css.dropAfter,\n )}\n role=\"treeitem\"\n aria-selected={selected}\n aria-description={row.archived ? t('toast.archivedNotOpenable') : undefined}\n tabIndex={0}\n\n onClick={() => { onOpen(node.id) }}\n {...getTriggerProps(row.blank ? undefined : { kind: 'session', value: { sessionId: node.id, displayTitle: row.title } }, { onKeyDown: (event) => {\n if (event.target !== event.currentTarget || (event.key !== 'Enter' && event.key !== ' ')) return\n if (event.altKey || event.ctrlKey || event.metaKey || event.shiftKey) return\n event.preventDefault()\n onOpen(node.id)\n } })}\n onPointerEnter={marquee.enter}\n onPointerLeave={() => { if (!menuOpen) marquee.leave() }}\n draggable={draggable}\n onDragStart={!draggable\n ? undefined\n : (e) => {\n e.dataTransfer.effectAllowed = 'move'\n e.dataTransfer.setData('text/plain', node.id)\n drag.start()\n dragPreview.start(e)\n }}\n onDragEnd={() => { if (dragPreview.clear()) drag?.end() }}\n onDragOver={drag === undefined\n ? undefined\n : (e) => {\n if (!drag.active) return\n e.preventDefault()\n e.dataTransfer.dropEffect = 'move'\n drag.hover(rowHalf(e))\n }}\n onDrop={drag === undefined\n ? undefined\n : (e) => {\n if (!drag.active) return\n e.preventDefault()\n drag.drop(rowHalf(e))\n }}\n >\n {/* Pending interaction and own or descendant activity outrank the\n finished-but-unviewed reminder, which returns after activity stops\n and is cleared by opening the session. Archived rows keep the slot\n blank — the grayed row carries the archived look — and their live\n status stays on the hover card only. */}\n <span className={css.slot}>\n {!row.archived && !row.blank && (showStatus\n ? <SessionStatusDots statuses={statuses} />\n : renderSlot('sidebar.session.row.leading', { sessionId: node.id }))}\n </span>\n <span\n ref={titleRef}\n className={css.title}\n onMouseDown={(e) => {\n if (e.detail !== 1) return\n renameArmed.current = true\n // One shared function and options: repeated presses add one listener.\n window.addEventListener('blur', disarmRename, { once: true })\n }}\n onDoubleClick={row.blank || !renamable\n ? undefined\n : (e) => {\n e.stopPropagation()\n if (!renameArmed.current) return\n renameArmed.current = false\n onRenameRequest(node.id, row.title)\n }}\n >\n {title}\n </span>\n {/* Blank rows have no first prompt, so neither trailing details nor\n actions for existing content are available. */}\n {!row.blank && (\n <span className={css.rowResting}>\n <span\n className={clsx(css.time, primaryStatus.trailingLabel === undefined && css.timestamp)}\n aria-hidden={primaryStatus.trailingLabel === undefined ? undefined : true}\n >\n {primaryStatus.trailingLabel ?? timeLabel(row.updatedAt, now, t)}\n </span>\n {renderSlot('sidebar.session.row.trailing', { sessionId: node.id })}\n {row.pinned && !row.archived && <PinnedIndicator t={t} />}\n </span>\n )}\n {/* The strip's clicks stay in the strip: the trigger and every\n row.action entry act without also opening the row, so an entry's\n button needs no propagation handling of its own. */}\n {!row.blank && (\n <span className={css.rowActions} onClick={(e) => { e.stopPropagation() }}>\n {renderFactorySlot('contextMenu.button', {\n target: { kind: 'session', value: { sessionId: node.id, displayTitle: row.title } },\n label: t('actions.session.aria', { name: title }),\n className: css.iconButton,\n })}\n <span className={css.rowQuickActions}>\n {renderSlot('sidebar.workspaces.session.row.action', { sessionId: node.id, displayTitle: row.title })}\n </span>\n </span>\n )}\n </div>\n )\n return (\n <HoverCard\n anchor={ownRow}\n content={<SessionHoverContent\n node={node}\n cwd={row.cwd === undefined ? undefined : abbreviateHomePath(row.cwd, home)}\n now={now}\n renderSlot={renderSlot}\n t={t}\n />}\n openDelayMs={800}\n grouped\n disabled={menuOpen || drag?.active === true}\n copyText={row.blank || row.title === '' ? undefined : row.title}\n copyLabel={t('copy')}\n copiedLabel={t('hover.copied')}\n />\n )\n}\n","/** Path suffixes that tell same-titled Workspaces apart. */\n\n/**\n * Map each Workspace whose display title another listed Workspace shares to\n * the shortest run of trailing path segments that no other same-titled\n * Workspace's path ends with, keeping the path's own separators. Workspaces\n * with a unique title get no entry.\n * @param workspaces - id, display title, and canonical path of each listed Workspace.\n * @returns distinguishing suffix by Workspace id.\n */\nexport function distinguishingPathSuffixes<Id>(\n workspaces: readonly { readonly id: Id; readonly title: string; readonly path: string }[],\n): ReadonlyMap<Id, string> {\n // Segments and the separators between them alternate: `/a/b` → ['', '/', 'a', '/', 'b'].\n const rows = workspaces.map(workspace => ({ ...workspace, parts: workspace.path.split(/([\\\\/])/) }))\n const suffix = (parts: readonly string[], count: number): string => parts.slice(-(2 * count - 1)).join('')\n const suffixes = new Map<Id, string>()\n for (const row of rows) {\n const peers = rows.filter(other => other !== row && other.title === row.title)\n if (peers.length === 0) continue\n let count = 1\n // A root path (`/`, `C:\\`) ends in an empty segment; grow past it.\n while (2 * count - 1 < row.parts.length && (suffix(row.parts, count) === '' || peers.some(peer => suffix(peer.parts, count) === suffix(row.parts, count)))) count++\n suffixes.set(row.id, suffix(row.parts, count))\n }\n return suffixes\n}\n","/**\n * Workspace pick/add flow. WorkspacePickFlow is the reusable core (menu +\n * path error dialog) consumed directly by WorkspaceBrowser (same package) and\n * wrapped by WorkspacePicker for the conversation empty-state slot\n * registration. Directory picking itself lives in the composed flow package's\n * slot occupant (see the contract module doc): this core only opens the flow,\n * adopts the picked path, and owns the error surface. Adding a workspace has\n * exactly one route — pick a host directory, new or existing — because the\n * occupant's own create-folder affordance already covers creating one.\n */\nimport type { ReactNode, RefObject } from 'react'\nimport { useCallback, useEffect, useMemo, useRef, useState } from 'react'\nimport {\n Button, IconFolderCloseRegular, IconPlusOutlineRegular, Menu, Modal, type MenuEntry,\n} from '@deepseek-ai/dsh-client-ui-primitives'\nimport type {\n WorkspaceId, WorkspaceSnapshot, WorkspaceView,\n} from '@deepseek-ai/dsh-api-workspace-controller/client'\nimport { workspaceDisplayTitle } from '@deepseek-ai/dsh-api-workspace-controller/default-workspace'\nimport type { SnapshotSelectorHook } from '@deepseek-ai/dsh-client-ui-slots'\nimport type { DirectoryFlowOwnerProps, WorkspacePickerProps } from './contract/slots.ts'\nimport { distinguishingPathSuffixes } from './path-suffix.ts'\nimport css from './WorkspacePicker.module.css'\n\nconst ADD_WORKSPACE = '::add-workspace'\n\n/** Core flow props: the owner supplies popover control and pick semantics. */\nexport interface WorkspacePickFlowProps {\n /** The standard locale seat, forwarded by whichever slot entry hosts the flow. */\n t: WorkspacePickerProps['t']\n /** Popover visibility (anchor button toggle state, owner-local). */\n open: boolean\n /** The anchor button element — the popover's placement anchor. */\n anchorRef?: RefObject<HTMLElement | null> | undefined\n /** Selector hook over the workspace list (framework standard hook). */\n useWorkspaces: <S>(selector: (state: WorkspaceSnapshot) => S) => S\n /** Adopt a picked host directory as a real Workspace. */\n createWorkspace: (input: { path: string }) => Promise<WorkspaceView>\n /** Bound occupancy selector hook for this surface's directory-flow hole (empty leaves the surface with no add action). */\n useDirectoryFlow: SnapshotSelectorHook<boolean>\n /** Render this surface's directory-flow hole with the owner conversation (the entry's narrowed renderSlot). */\n renderDirectoryFlow: (owner: DirectoryFlowOwnerProps) => ReactNode\n /** A real Workspace was picked or created. */\n onPick: (workspaceId: WorkspaceId) => void\n /** Close the popover (outside click / Escape / post-pick). */\n onClose: () => void\n /** Report the picking interaction and adoption occupancy. */\n onBusyChange?: (busy: boolean) => void\n /** Only offer the add action, hide existing workspaces. */\n addOnly?: boolean\n /** Menu opening direction relative to the anchor. */\n side?: 'bottom' | 'top' | 'right'\n /** Currently active workspace (trailing check in the picker list). */\n selectedId?: WorkspaceId | undefined\n}\n\n/**\n * Render the pick menu plus the adoption error dialog.\n * @param props - owner-controlled flow props.\n * @returns menu + dialog elements.\n */\nexport function WorkspacePickFlow({\n t,\n open,\n anchorRef,\n useWorkspaces,\n createWorkspace,\n useDirectoryFlow,\n renderDirectoryFlow,\n onPick,\n onClose,\n addOnly = false,\n onBusyChange,\n side = 'bottom',\n selectedId,\n}: WorkspacePickFlowProps) {\n // Without an owner-provided anchor, the menu remains hidden.\n const absentAnchor = useRef<HTMLElement>(null)\n const workspaceSnapshot = useWorkspaces(state => state)\n const workspaces = workspaceSnapshot.items\n const [errorOpen, setErrorOpen] = useState(false)\n const [modalError, setModalError] = useState<string | null>(null)\n const [flowOpen, setFlowOpen] = useState(false)\n const [pickingFolder, setPickingFolder] = useState(false)\n // One picking interaction at a time: while the flow is open (native chooser\n // pending, browse dialog up) or its pick is being adopted, every other\n // menu action stays disabled — a late outcome must not race a concurrent\n // selection or adoption.\n const flowBusy = flowOpen || pickingFolder\n useEffect(() => { onBusyChange?.(flowBusy) }, [flowBusy, onBusyChange])\n\n // The occupied hole gates the picking affordance: with no composed flow the\n // entry simply is not there (the seam's documented no-flow default). The\n // framework-bound hook keeps occupancy live: flow plugins activate (and\n // HMR-reload) independently of this menu's renders.\n const flowAvailable = useDirectoryFlow(occupied => occupied)\n // An occupant that unloads mid-interaction leaves nobody to cancel: an\n // open flow over an empty hole withdraws so the menu actions come back.\n // flowOpen is a dependency because the flow can also OPEN over an already\n // empty hole (Choose again after the occupant unloaded with the error\n // dialog up) — that transition must snap back too, not just occupancy loss.\n useEffect(() => {\n if (flowOpen && !flowAvailable) setFlowOpen(false)\n }, [flowOpen, flowAvailable])\n const addEntries: MenuEntry[] = flowAvailable\n ? [{ id: ADD_WORKSPACE, label: t('menu.addWorkspace'), icon: <IconPlusOutlineRegular size={16} />, disabled: flowBusy }]\n : []\n // With workspaces listed, the add action pins below the scroll region\n // (divider + always visible); otherwise it IS the menu.\n const pinAdd = !addOnly && workspaces.length > 0\n // The resolved name, not `t`, is the memo dependency: the bound seat keeps\n // its identity across a language switch.\n const defaultWorkspaceName = t('workspace.defaultName')\n const listed = useMemo(() => {\n if (!pinAdd) return []\n const rows = workspaces.map(workspace => ({\n id: workspace.workspaceId,\n title: workspaceDisplayTitle(workspace.title, defaultWorkspaceName),\n path: workspace.path,\n }))\n const suffixes = distinguishingPathSuffixes(rows)\n return rows.map(row => ({ ...row, suffix: suffixes.get(row.id) }))\n }, [pinAdd, workspaces, defaultWorkspaceName])\n const items: MenuEntry[] = pinAdd\n ? listed.map(({ id, title, path, suffix }) => ({\n id,\n // The title gives way first, so the suffix that tells the rows apart\n // stays visible; the native tooltip carries the full path.\n label: suffix === undefined\n ? title\n : (\n <span className={css.disambiguated} title={path}>\n <span className={css.title}>{title}</span>\n {' '}\n <span className={css.pathSuffix}>{suffix}</span>\n </span>\n ),\n icon: <IconFolderCloseRegular size={16} />,\n disabled: flowBusy,\n }))\n : addEntries\n // Nothing listed and nothing to add with (a composition that mounts this\n // package without any directory-picker): an empty popover would claim a\n // choice that does not exist, so the anchor gesture shows nothing at all.\n const menuIsEmpty = items.length === 0\n\n const closeModal = (): void => {\n setErrorOpen(false)\n setModalError(null)\n }\n\n /** Adopt a picked directory; failures land in the folder-error dialog (Choose again reopens the flow). */\n const adoptDirectory = (path: string): Promise<void> =>\n createWorkspace({ path }).then((workspace) => {\n setFlowOpen(false)\n onPick(workspace.workspaceId)\n }).catch((reason: unknown) => {\n setModalError(reason instanceof Error ? reason.message : String(reason))\n setFlowOpen(false)\n setErrorOpen(true)\n })\n\n const openDirectoryFlow = useCallback((): void => {\n onClose()\n setErrorOpen(false)\n setModalError(null)\n setFlowOpen(true)\n }, [onClose])\n\n // A menu exists to disambiguate between targets. With no workspaces listed\n // and the add action the only entry left, the anchor gesture IS that action:\n // a one-row popover would cost a click and offer nothing to choose between.\n // The owner's open request is consumed the same way selecting the entry\n // would consume it (close the popover, raise the flow). An empty list is\n // only final once the baseline lands — until then the menu stays up with its\n // loading status instead of jumping into a flow the arriving list would have\n // made unnecessary; the add-only surface lists nothing and never waits.\n const listSettled = addOnly || workspaceSnapshot.phase === 'ready'\n const addIsTheOnlyEntry = !pinAdd && listSettled && addEntries.length === 1\n // `flowBusy` gates this exactly as it disables the equivalent menu entry: a\n // pick still being adopted owns the surface until it settles.\n useEffect(() => {\n if (open && addIsTheOnlyEntry && !flowBusy) openDirectoryFlow()\n }, [open, addIsTheOnlyEntry, flowBusy, openDirectoryFlow])\n\n /** Owner side of the flow conversation: adopt keeps the flow open (busy) until the Host answers. */\n const flowOwner: DirectoryFlowOwnerProps = {\n open: flowOpen,\n busy: pickingFolder,\n onPicked: (path) => {\n setPickingFolder(true)\n void adoptDirectory(path).finally(() => { setPickingFolder(false) })\n },\n onCancel: () => { setFlowOpen(false) },\n onError: (message) => {\n setFlowOpen(false)\n setModalError(message)\n setErrorOpen(true)\n },\n }\n\n const handleSelect = (id: string): void => {\n if (id === ADD_WORKSPACE) {\n openDirectoryFlow()\n return\n }\n onPick(id as WorkspaceId)\n }\n\n return (\n <>\n <Menu\n open={open && !addIsTheOnlyEntry && !menuIsEmpty}\n anchor={null}\n items={items}\n {...pinAdd ? { footer: addEntries } : {}}\n selectedId={selectedId}\n onSelect={handleSelect}\n onClose={onClose}\n side={side}\n portal\n anchorRef={anchorRef ?? absentAnchor}\n />\n {open && !addIsTheOnlyEntry && !menuIsEmpty && workspaceSnapshot.phase === 'pending' && <div className={css.menuStatus} role=\"status\">{t('picker.loading')}</div>}\n {renderDirectoryFlow(flowOwner)}\n <Modal\n open={errorOpen}\n onClose={closeModal}\n closeLabel={t('close')}\n title={t('folderError.title')}\n footer={(\n <>\n <Button variant=\"outline\" className={css.modalAction} onClick={closeModal}>{t('cancel')}</Button>\n {/* Retrying needs an occupant to serve the flow; without one the\n * button would open a flow nobody can answer or cancel. */}\n <Button variant=\"primary\" className={css.modalAction} disabled={!flowAvailable} onClick={openDirectoryFlow}>{t('folderError.retry')}</Button>\n </>\n )}\n >\n <div className={css.modalError} role=\"alert\">{modalError}</div>\n </Modal>\n </>\n )\n}\n\n/**\n * The conversation empty-state registration: adapts the owner share to the\n * core flow (all state and semantics live in the flow / the owner).\n * @param props - empty-state slot props (owner share + injected creation callback).\n * @returns the flow element.\n */\nexport function WorkspacePicker({\n open,\n anchorRef,\n useWorkspaces,\n selectedId,\n onPick,\n onClose,\n createWorkspace,\n useDirectoryFlow,\n renderSlot,\n t,\n}: WorkspacePickerProps) {\n return (\n <WorkspacePickFlow\n t={t}\n open={open}\n anchorRef={anchorRef}\n useWorkspaces={useWorkspaces}\n createWorkspace={createWorkspace}\n useDirectoryFlow={useDirectoryFlow}\n renderDirectoryFlow={owner => renderSlot('conversation.hero.workspace.directoryFlow', owner)}\n selectedId={selectedId}\n onPick={onPick}\n onClose={onClose}\n />\n )\n}\n","/**\n * The browsing region's four folds: the three quick groups the In work model lists\n * — unread, pinned, running — and the workspace tree itself. Each fold is an\n * independent, labelled section with its own header button and fold state; the\n * region draws no title or total above them.\n *\n * The three quick groups render the browsing list's own Session rows\n * (rows/Rows.tsx), not a private row shape: focus, hover, the row menu trigger,\n * the hover card, the pin mark, the relative time and the row's action strip are\n * the same code the tree below runs. The menu and the hover actions are the shared\n * `contextMenu.button` factory and the `sidebar.workspaces.session.row.action`\n * list, so pin/unpin, archive, rename and fork behave here exactly as they do in\n * the tree — this region copies no menu, no Host write, no access gate and no copy.\n *\n * A Session can list here and in the tree at once, so each quick-group row takes\n * its own row key (`quick:<group>:<id>`) and the two occurrences stay distinct in\n * the DOM. Everything else follows the Session, not the occurrence: opening,\n * renaming and every row action are addressed by Session id, so either occurrence\n * raises the same navigation, the same dialog and the same Host call, and the\n * shared context-menu target reports the menu open on both — the same fact either\n * way. Row dragging is the one behaviour the quick groups leave out: reordering\n * belongs to the tree, which owns the account order.\n *\n * Opening a row goes through the Workspace owner's guarded open (the same call the\n * tree rows make), which selects the Session as the main view and lets ui-session\n * clear its unread flag. The region persists nothing and writes nothing.\n */\nimport clsx from 'clsx'\nimport { type ReactNode, useState } from 'react'\nimport { HoverCardGroup, IconTriangleRightFillRegular } from '@deepseek-ai/dsh-client-ui-primitives'\nimport type { PropsLocale, SnapshotSelectorHook } from '@deepseek-ai/dsh-client-ui-slots'\nimport type { SessionId } from '@deepseek-ai/dsh-session/types'\nimport type { WorkspaceBrowserProps } from '../contract/slots.ts'\nimport type { WorkspaceKey } from '../locales.ts'\nimport type { AttentionModel, AttentionRow } from './model.ts'\nimport { SessionNodeItem } from '../rows/Rows.tsx'\nimport rowStyles from '../rows/Rows.module.css'\nimport css from './AttentionSection.module.css'\n\n/** Props the browsing region hands down; every member is already bound to its source. */\nexport interface AttentionSectionProps {\n /** The current model, bound to the plugin's store during render. */\n readonly useAttention: SnapshotSelectorHook<AttentionModel>\n /** The row actions' access hook: every row gate is asked where the tree asks it. */\n readonly useSessionAccess: WorkspaceBrowserProps['useSessionAccess']\n /** Show one Session as the main view (also clears its unread flag in ui-session). */\n readonly open: (id: SessionId) => void\n /** Open the rename dialog from a row title double-click, as in the tree. */\n readonly onSessionRenameRequest: (sessionId: SessionId, currentTitle: string) => void\n /** The Session the main view shows, so a listed row highlights like its tree row. */\n readonly currentId?: SessionId | undefined\n /** Host account home for POSIX hover-path abbreviation. */\n readonly home?: string | undefined\n /**\n * Localized title of the fourth fold, which holds the browsing list itself:\n * \"All workspaces\", or \"All sessions\" in the one-list view. It names that fold,\n * not the region, so it never repeats the toolbar's own section label above.\n */\n readonly workspacesTitle: string\n readonly renderSlot: WorkspaceBrowserProps['renderSlot']\n readonly renderFactorySlot: WorkspaceBrowserProps['renderFactorySlot']\n readonly useContextMenuTarget: WorkspaceBrowserProps['useContextMenuTarget']\n readonly useContextMenu: WorkspaceBrowserProps['useContextMenu']\n readonly t: PropsLocale<'workspace'>['t']\n /** The browsing body under the list's fold: the grouped tree or the flat list. */\n readonly children?: ReactNode\n}\n\ntype QuickGroup = 'unread' | 'pinned' | 'running'\ntype FoldKey = QuickGroup | 'workspaces'\n\n/** The three quick groups, in display order, each with the dictionary key naming it. */\nconst QUICK_GROUPS: readonly { readonly fold: QuickGroup; readonly labelKey: WorkspaceKey }[] = [\n { fold: 'unread', labelKey: 'attention.section.unread' },\n { fold: 'pinned', labelKey: 'attention.section.pinned' },\n { fold: 'running', labelKey: 'attention.section.running' },\n]\n\n/**\n * One fold: a header button that owns the fold state, and its body. The header is\n * the session rows' own 32px box with the tree's filled triangle in the leading\n * cell, so a fold label starts on the same edge as the titles under it. The\n * header's text names the fold and, for a quick group, its count; the button's\n * `aria-expanded`/`aria-controls` pair is what makes the fold reachable and\n * operable from the keyboard and from a screen reader.\n *\n * A quick group's rows are cheap and stateless, so its body leaves the tree on\n * collapse. The browsing list's fold is the opposite: the list holds its own\n * view state — the \"Show more\" watermarks, group expansion, and the scroll\n * position of a revealed Session — so its body stays mounted and is hidden\n * instead, keeping that state and keeping `aria-controls` pointing at a real\n * element whether the fold is open or closed.\n * @param props.fold - the fold's stable key, also its id stem.\n * @param props.title - localized fold name.\n * @param props.count - entries in the fold, for a quick group; the list reports its own.\n * @param props.keepMounted - keep the body mounted while folded, hiding it instead.\n * @param props.children - the fold's body content.\n * @returns the fold section.\n */\nfunction Fold({ fold, title, count, keepMounted = false, children }: {\n readonly fold: FoldKey\n readonly title: string\n readonly count?: number | undefined\n readonly keepMounted?: boolean | undefined\n readonly children: ReactNode\n}): ReactNode {\n const [expanded, setExpanded] = useState(true)\n const headerId = `workspace-fold-${fold}-header`\n const bodyId = `workspace-fold-${fold}-body`\n // A folded body that leaves the tree cannot be named as the header's control;\n // a folded body that stays mounted is merely hidden, and stays nameable.\n const mounted = keepMounted || expanded\n const controls = mounted ? bodyId : undefined\n return (\n <section className={css.group} data-browser-fold={fold} aria-labelledby={headerId}>\n <button\n id={headerId}\n type=\"button\"\n className={clsx(rowStyles.sessionRow, css.groupHeader)}\n aria-expanded={expanded}\n aria-controls={controls}\n onClick={() => { setExpanded(current => !current) }}\n >\n <span className={clsx(rowStyles.slot, rowStyles.chevron)} aria-hidden=\"true\">\n <IconTriangleRightFillRegular size={14} className={clsx(rowStyles.arrow, expanded && rowStyles.arrowOpen)} />\n </span>\n <span className={rowStyles.title}>{title}</span>\n {count !== undefined && <>{' '}<span className={rowStyles.time}>{count}</span></>}\n </button>\n {mounted && (\n <div id={bodyId} className={css.groupBody} data-browser-fold-body=\"\" hidden={!expanded}>\n {children}\n </div>\n )}\n </section>\n )\n}\n\n/** The row seats every quick-group row shares with the tree. */\ntype RowSeats = Pick<\n AttentionSectionProps,\n | 'currentId' | 'home' | 'open' | 'onSessionRenameRequest' | 'useSessionAccess'\n | 'renderSlot' | 'renderFactorySlot' | 'useContextMenuTarget' | 'useContextMenu' | 't'\n> & { readonly now: number }\n\n/**\n * One quick group's rows: the browsing list's own session rows, each carrying the\n * group's row key so it never collides with the same Session's tree row. The rows\n * sit in the shell's own hover-card group, so the group shares the tree's dwell\n * and one-card-at-a-time coordination instead of reimplementing it; the list\n * itself keeps the tree's role and label and the rows' 32px box.\n * @param props.rows - the group's Sessions, in the model's order.\n * @param props.fold - the group, which scopes the row keys.\n * @param props.label - the group's localized name, used as the tree label.\n * @param props.seats - the row seats plus the render clock.\n * @returns the group's rows, in a hover-card group of their own.\n */\nfunction GroupRows({ rows, fold, label, seats }: {\n readonly rows: readonly AttentionRow[]\n readonly fold: QuickGroup\n readonly label: string\n readonly seats: RowSeats\n}): ReactNode {\n return (\n <HoverCardGroup>\n <div className={css.list} role=\"tree\" aria-label={label}>\n {rows.map(row => (\n <SessionNodeItem\n key={row.id}\n rowKey={`quick:${fold}:${row.id}`}\n node={row}\n currentId={seats.currentId}\n now={seats.now}\n onOpen={seats.open}\n onRenameRequest={seats.onSessionRenameRequest}\n renderSlot={seats.renderSlot}\n renderFactorySlot={seats.renderFactorySlot}\n useContextMenu={seats.useContextMenu}\n useContextMenuTarget={seats.useContextMenuTarget}\n home={seats.home}\n useSessionAccess={seats.useSessionAccess}\n t={seats.t}\n />\n ))}\n </div>\n </HoverCardGroup>\n )\n}\n\n/**\n * The four folds: the quick groups that have entries, then the browsing list's own\n * fold, which always renders, always starts open, and keeps its content mounted\n * while folded.\n * @param props - the model hook, the row seats, the fourth fold's title, and the browsing body.\n * @returns the region's folds.\n */\nexport function AttentionSection({\n useAttention, useSessionAccess, open, onSessionRenameRequest, currentId, home, workspacesTitle,\n renderSlot, renderFactorySlot, useContextMenuTarget, useContextMenu, t, children,\n}: AttentionSectionProps): ReactNode {\n const model = useAttention(current => current)\n // One clock per render, as the tree does: every row in the region reads the\n // same \"now\" so two occurrences of a Session label the same time.\n const now = Date.now()\n const seats: RowSeats = {\n currentId,\n home,\n open,\n onSessionRenameRequest,\n useSessionAccess,\n renderSlot,\n renderFactorySlot,\n useContextMenuTarget,\n useContextMenu,\n t,\n now,\n }\n return (\n <div className={css.section} data-browser-folds=\"\">\n {QUICK_GROUPS.map(({ fold, labelKey }) => {\n const rows = model[fold]\n if (rows.length === 0) return null\n const label = t(labelKey)\n return (\n <Fold key={fold} fold={fold} title={label} count={rows.length}>\n <GroupRows rows={rows} fold={fold} label={label} seats={seats} />\n </Fold>\n )\n })}\n <Fold fold=\"workspaces\" title={workspacesTitle} keepMounted>\n {children}\n </Fold>\n </div>\n )\n}\n","/**\n * The workspace/session browsing region filling the sidebar shell's\n * `sidebar.workspaces` hole: section header (title + view options + add\n * workspace), search, the four folds (unread, pinned, running, and the grouped\n * tree or flat list), and the workspace dialogs. Wide state renders the full\n * browser; rail state renders the two region icons (search / add workspace) as\n * 36px controls on the shell's shared rail entry path, each requesting\n * expansion through the owner share. Adding is the header button's one action,\n * so it raises the directory flow with no menu in between; the flow and its\n * error dialog live in WorkspacePicker (same package — direct composition, no\n * slot between them). A Session row's\n * \"...\" menu and hover buttons are the `sidebar.workspaces.session.menu.item`\n * and `sidebar.workspaces.session.row.action` lists rendered through this\n * entry's `renderSlot`; the actions in them, this package's own included,\n * are slot entries with their own behavior, so this component threads no\n * action callbacks and hosts no action surface.\n */\nimport { type CSSProperties, type ReactNode, useCallback, useEffect, useMemo, useRef, useState } from 'react'\nimport clsx from 'clsx'\nimport { WorkspaceDialogs } from './WorkspaceDialogs.tsx'\nimport {\n AnimatedRows, HoverCardGroup, IconArchiveCheckOutlineRegular, IconArchiveOffOutlineRegular, IconArchiveOutlineRegular,\n IconChevronsUpDownOutlineRegular, IconClockOutlineRegular, IconCloseFillRegular,\n IconFlatListOutlineRegular, IconFolderCloseRegular, IconProjectAddOutlineRegular,\n IconQueueOutlineRegular, IconSearchOutlineRegular, IconSlidersTwoOutlineRegular,\n IconWorkspaceTreeOutlineRegular, Menu, Tooltip,\n} from '@deepseek-ai/dsh-client-ui-primitives'\nimport type {\n SessionListState, SessionSearchResultItem,\n} from '@deepseek-ai/dsh-api-session-controller/client'\nimport type { WorkspaceId, WorkspaceView } from '@deepseek-ai/dsh-api-workspace-controller/client'\nimport { workspaceDisplayTitle } from '@deepseek-ai/dsh-api-workspace-controller/default-workspace'\nimport type { SessionId } from '@deepseek-ai/dsh-session/types'\nimport type { PropsRenderSlots } from '@deepseek-ai/dsh-client-ui-slots'\nimport type { WorkspaceBrowserProps } from '../contract/slots.ts'\nimport type { ArchivedFilter, GroupNode, SessionNode, SessionOrderBy, SessionRowState } from '../tree.ts'\nimport {\n deriveFlat, deriveGroups, deriveSearchResults, orderByRecency, owningGroupKey, owningParentFolder,\n pinCurrentBlank, reconcileManualOrder, sessionMemberIds, UNGROUPED_KEY,\n} from '../tree.ts'\nimport { ProjectRowItem, SearchResultItem, SessionNodeItem } from './Rows.tsx'\nimport { FLAT_SESSION_ORDER_KEY, type SessionGroupBy } from '../stores.ts'\nimport { WorkspacePickFlow } from '../WorkspacePicker.tsx'\nimport { AttentionSection } from '../attention/AttentionSection.tsx'\nimport css from './WorkspaceBrowser.module.css'\n\n/**\n * Column slide length (--ds-transition-duration-slow): rail-search focus waits it out —\n * focus() forces a synchronous layout and would jank the slide.\n */\nconst EXPAND_SLIDE_MS = 300\n/** Pause between the latest keystroke and a Host content-search request. */\nconst SEARCH_DEBOUNCE_MS = 250\n/** `session.search` wire bound, measured in JavaScript UTF-16 code units. */\nconst SEARCH_QUERY_MAX_CODE_UNITS = 500\n/** Non-blank Session rows visible per Workspace while no Session raises its watermark. */\nconst SESSION_WATERMARK_BASE = 5\n/** Highest watermark that attention-bearing Sessions raise automatically; Show more and search reveals may exceed it. */\nconst SESSION_WATERMARK_AUTO_MAX = 50\n\n/** Show the blank row plus the first `watermark` non-blank rows, in list order. */\nfunction watermarkRows(sessions: readonly SessionNode[], watermark: number): {\n rows: readonly SessionNode[]\n hiddenCount: number\n} {\n let count = 0\n const rows = sessions.filter((session) => {\n if (session.blank) return true\n count += 1\n return count <= watermark\n })\n return { rows, hiddenCount: sessions.length - rows.length }\n}\n\n/**\n * Smallest watermark that covers every non-blank row within the automatic maximum that is running, has a running\n * child, awaits the user, carries an unread completion, or is current, and the reveal target at any position.\n */\nfunction requiredWatermark(\n sessions: readonly SessionNode[],\n current: SessionId | undefined,\n revealSessionId: SessionId | undefined,\n): number {\n let index = 0\n let required = 0\n for (const session of sessions) {\n if (session.blank) continue\n index += 1\n const attention = index <= SESSION_WATERMARK_AUTO_MAX && (\n session.running || session.runningSubagentCount > 0 || session.pendingInteraction !== undefined\n || session.completed || session.id === current\n )\n if (attention || session.id === revealSessionId) required = index\n }\n return required\n}\n\n/** Raise each listed group's watermark to its requirement; returns `marks` itself when nothing rises. */\nfunction raiseWatermarks(\n marks: Readonly<Record<string, number>>,\n required: ReadonlyMap<string, number>,\n): Readonly<Record<string, number>> {\n let raised = marks\n for (const [key, watermark] of required) {\n if (watermark > (raised[key] ?? SESSION_WATERMARK_BASE)) raised = { ...raised, [key]: watermark }\n }\n return raised\n}\n\n/** Keep controlled input and RPC payload inside the session.search wire contract. */\nfunction sanitizeSearchQuery(value: string): string {\n const withoutNul = value.replaceAll('\\0', '')\n if (withoutNul.length <= SEARCH_QUERY_MAX_CODE_UNITS) return withoutNul\n let end = SEARCH_QUERY_MAX_CODE_UNITS\n const last = withoutNul.charCodeAt(end - 1)\n const next = withoutNul.charCodeAt(end)\n if (last >= 0xD800 && last <= 0xDBFF && next >= 0xDC00 && next <= 0xDFFF) end--\n return withoutNul.slice(0, end)\n}\n\n/**\n * Accept the native drag at document level while a row drag is active: row\n * hover still owns the insertion marker, and releasing outside the list must\n * not be rendered as a rejected drop before dragend commits that last marker.\n */\nfunction useNativeDragAcceptance(active: boolean): void {\n useEffect(() => {\n if (!active) return\n const acceptDrag = (event: DragEvent): void => {\n event.preventDefault()\n if (event.dataTransfer !== null) event.dataTransfer.dropEffect = 'move'\n }\n const acceptDrop = (event: DragEvent): void => { event.preventDefault() }\n document.addEventListener('dragover', acceptDrag)\n document.addEventListener('drop', acceptDrop)\n return () => {\n document.removeEventListener('dragover', acceptDrag)\n document.removeEventListener('drop', acceptDrop)\n }\n }, [active])\n}\n\n/** Grouping, ordering, and archived-filter menu; own open state so it resets with the wide chrome. */\nfunction ViewOptionsMenu({ groupBy, orderBy, archivedFilter, onGroupPick, onOrderPick, onArchivedFilterPick, t }: {\n groupBy: SessionGroupBy\n orderBy: SessionOrderBy\n archivedFilter: ArchivedFilter\n onGroupPick: (mode: SessionGroupBy) => void\n onOrderPick: (mode: SessionOrderBy) => void\n onArchivedFilterPick: (filter: ArchivedFilter) => void\n t: WorkspaceBrowserProps['t']\n}) {\n const [open, setOpen] = useState(false)\n return (\n <Menu\n open={open}\n onClose={() => { setOpen(false) }}\n items={[\n { type: 'label' as const, id: 'group-by', text: t('groupBy.label') },\n { id: 'workspace', label: t('groupBy.workspace'), icon: <IconFolderCloseRegular /> },\n { id: 'workspace-tree', label: t('groupBy.workspaceTree'), icon: <IconWorkspaceTreeOutlineRegular /> },\n { id: 'flat', label: t('groupBy.flat'), icon: <IconFlatListOutlineRegular /> },\n { type: 'separator' as const, id: 'order-by-separator' },\n { type: 'label' as const, id: 'order-by', text: t('orderBy.label') },\n { id: 'manual', label: t('orderBy.manual'), icon: <IconChevronsUpDownOutlineRegular /> },\n { id: 'updated', label: t('orderBy.updated'), icon: <IconClockOutlineRegular /> },\n { type: 'separator' as const, id: 'archived-filter-separator' },\n { type: 'label' as const, id: 'filter-by', text: t('filterBy.label') },\n { id: 'hide-archived', label: t('viewOptions.hideArchived'), icon: <IconArchiveOffOutlineRegular /> },\n { id: 'show-archived', label: t('viewOptions.showArchived'), icon: <IconQueueOutlineRegular /> },\n { id: 'only-archived', label: t('viewOptions.onlyArchived'), icon: <IconArchiveCheckOutlineRegular /> },\n ]}\n selectedIds={[\n groupBy,\n orderBy,\n { default: 'hide-archived', show: 'show-archived', only: 'only-archived' }[archivedFilter],\n ]}\n onSelect={(id) => {\n if (id === 'workspace' || id === 'workspace-tree' || id === 'flat') onGroupPick(id)\n else if (id === 'manual' || id === 'updated') onOrderPick(id)\n else if (id === 'hide-archived') onArchivedFilterPick('default')\n else if (id === 'show-archived') onArchivedFilterPick('show')\n else if (id === 'only-archived') onArchivedFilterPick('only')\n setOpen(false)\n }}\n align=\"end\"\n dense\n listClassName={css.viewOptionsMenu}\n // Portal: the section header clips overflow, so an in-place list would\n // be cut off at the header's bounds.\n portal\n anchor={(\n <Tooltip label={t('viewOptions.label')} side=\"bottom\" delayMs={500} portal>\n <button\n type=\"button\"\n className={clsx(css.iconButton, css.wide)}\n aria-label={t('viewOptions.label')}\n onClick={() => { setOpen(v => !v) }}\n >\n <IconSlidersTwoOutlineRegular />\n </button>\n </Tooltip>\n )}\n />\n )\n}\n\n/** In-flight root-row drag: source identity plus the current insert marker. */\ninterface DragState {\n /** Workspace id, or {@link UNGROUPED_KEY} for the browser-local loose-session account. */\n accountKey: string\n sessionId: SessionNode['id']\n /** Source row was pinned at drag start; drop targets share the pinned block. */\n pinned: boolean\n /** Row the marker sits on and which half (insert above/below it). */\n over: { id: SessionNode['id']; half: 'before' | 'after' } | null\n}\n\n/** Apply a visible drop to the complete account without removing hidden members. */\nfunction sessionDragOrder(\n order: readonly SessionId[],\n rows: readonly SessionNode[],\n drag: DragState,\n over: NonNullable<DragState['over']>,\n): SessionId[] | undefined {\n const source = rows.find(row => row.id === drag.sessionId)\n const target = rows.find(row => row.id === over.id)\n if (source === undefined || target === undefined || source.blank\n || source.pinned !== drag.pinned || target.pinned !== drag.pinned\n || source.id === target.id || !order.includes(source.id)) return\n const section = rows.filter(row => row.pinned === drag.pinned)\n const sourceIndex = section.findIndex(row => row.id === source.id)\n const withoutSource = section.filter(row => row.id !== source.id)\n const insertAt = withoutSource.findIndex(row => row.id === target.id) + (over.half === 'after' ? 1 : 0)\n if (insertAt === sourceIndex) return\n const next = order.filter(id => id !== source.id)\n const targetIndex = next.indexOf(target.id)\n if (targetIndex === -1) return\n next.splice(targetIndex + (over.half === 'after' ? 1 : 0), 0, source.id)\n return pinCurrentBlank(next, rows.find(row => row.blank)?.id)\n}\n\n/** In-flight Workspace-row drag: source identity plus the current marker. */\ninterface WorkspaceDragState {\n workspaceId: WorkspaceId\n over: { id: WorkspaceId; half: 'before' | 'after' } | null\n}\n\n/** Resolve an insertion side across the Workspace header, descendants, and Sessions. */\nfunction workspaceGroupHalf(e: { clientY: number; currentTarget: HTMLElement }): 'before' | 'after' {\n const rect = e.currentTarget.getBoundingClientRect()\n return e.clientY < rect.top + rect.height / 2 ? 'before' : 'after'\n}\n\ntype SessionTreeProps = Pick<\n WorkspaceBrowserProps,\n 'useSessionStatus' | 'startSession' | 'open' | 'renderFactorySlot' | 'useContextMenuTarget' | 'useContextMenu'\n | 'insertWorkspaceBefore' | 't' | 'usePanelInfo'\n | 'useSessionAccess' | 'useWorkspaceAccess'\n> & PropsRenderSlots<\n | 'sidebar.workspaces.session.row.action'\n | 'sidebar.session.row.trailing'\n | 'sidebar.session.row.leading'\n | 'sidebar.session.row.hover'\n> & {\n shortcuts: readonly import('@deepseek-ai/dsh-client-shortcuts/client').ShortcutCatalogEntry[]\n /** Always-mounted Session list snapshot. */\n list: SessionListState\n /** Host account home for POSIX hover-path abbreviation. */\n home?: string | undefined\n /** Workspaces in Host group order with browser-projected Session order. */\n workspaces: readonly WorkspaceView[]\n /** Browser-projected order for Sessions outside every Workspace. */\n ungroupedSessionIds: readonly SessionId[]\n /** Whether the current Workspace stream has a complete Host baseline. */\n workspaceReady: boolean\n /** Grouping, ordering, and filter changes replace the view without row motion. */\n animationResetKey: string\n /** Nest Workspaces under their nearest registered ancestors. */\n nestWorkspaces: boolean\n /** Explicit persisted group expansion, including descendants in tree mode. */\n groupExpansion: Readonly<Record<string, boolean>>\n /** Persist one Workspace group's expansion. */\n setGroupExpanded: (key: string, expanded: boolean) => void\n /** Save a drag order and select Manual. */\n setSessionOrder: (accountKey: string, order: readonly string[]) => void\n /** Registry-global pin and archive sets plus the archived-visibility choice. */\n rowState: SessionRowState\n /** Switch the archived filter back to the default hide-archived view. */\n onLeaveArchivedOnly: () => void\n /** Open the rename dialog from a row title double-click. */\n onSessionRenameRequest: (sessionId: SessionNode['id'], currentTitle: string) => void\n /** One Session chosen from search that must be exposed and scrolled into view. */\n revealSessionId?: SessionId | undefined\n /** Acknowledge that the chosen Session row has been revealed. */\n onSessionRevealed: (sessionId: SessionId) => void\n}\n\n/** The list-empty placeholder — a glyph over the text; the archived-only view names its filter and offers the way back. */\nfunction EmptySessions({ rowState, onLeaveArchivedOnly, t }: Pick<SessionTreeProps, 'rowState' | 'onLeaveArchivedOnly' | 't'>) {\n const archivedOnly = rowState.archivedFilter === 'only'\n return (\n <div className={css.emptyState} data-row-key=\"empty\">\n {archivedOnly ? <IconArchiveOutlineRegular size={24} /> : <IconQueueOutlineRegular size={24} />}\n <div>{archivedOnly ? t('empty.noneArchived') : t('empty.none')}</div>\n {archivedOnly && (\n <button type=\"button\" className={css.emptyAction} onClick={onLeaveArchivedOnly}>\n {t('empty.viewOthers')}\n </button>\n )}\n </div>\n )\n}\n\n/** The scrolling session tree; unmounting drops the sessions subscription and the session watermarks. */\nfunction SessionTree({\n list, useSessionStatus, startSession, open, workspaces, ungroupedSessionIds,\n rowState, onLeaveArchivedOnly,\n workspaceReady, animationResetKey, usePanelInfo, useSessionAccess, useWorkspaceAccess,\n onSessionRenameRequest,\n renderSlot, renderFactorySlot, useContextMenuTarget, useContextMenu,\n insertWorkspaceBefore,\n nestWorkspaces, groupExpansion, setGroupExpanded,\n setSessionOrder, home, t,\n revealSessionId, onSessionRevealed, shortcuts,\n}: SessionTreeProps) {\n const panelActive = usePanelInfo(info => info.activePanelId !== null)\n const statuses = useSessionStatus(s => s)\n const current = panelActive\n ? undefined\n : Object.values(list.byId).find(session => (session.retainedBy.mainView ?? 0) > 0)?.id\n const revealGroup = revealSessionId === undefined || !workspaceReady\n ? undefined\n : owningGroupKey(workspaces, revealSessionId)\n // Per-group raised watermarks; an absent key means the base watermark.\n const [storedWatermarks, setStoredWatermarks] = useState<Readonly<Record<string, number>>>({})\n // Advances on user-driven watermark changes so AnimatedRows settles them; automatic raises animate.\n const [watermarkMotionKey, setWatermarkMotionKey] = useState(0)\n // Transient drag marker state; the selected mode owns the resulting order.\n const [drag, setDrag] = useState<DragState | null>(null)\n const sessionDropCommitted = useRef(false)\n const [workspaceDrag, setWorkspaceDrag] = useState<WorkspaceDragState | null>(null)\n const workspaceDropCommitted = useRef(false)\n const nativeDragActive = drag !== null || workspaceDrag !== null\n useNativeDragAcceptance(nativeDragActive)\n const currentGroup = current === undefined || !workspaceReady\n ? undefined\n : owningGroupKey(workspaces, current)\n useEffect(() => {\n if (current === undefined || currentGroup === undefined || Object.hasOwn(groupExpansion, currentGroup)) return\n setGroupExpanded(currentGroup, true)\n }, [current, currentGroup, setGroupExpanded, groupExpansion])\n const parents = useMemo(() => {\n if (!nestWorkspaces) return new Map<string, WorkspaceId | undefined>()\n const keysByPath = new Map(workspaces.map(workspace => [workspace.path, workspace.workspaceId]))\n const paths = [...keysByPath.keys()]\n return new Map<string, WorkspaceId | undefined>(workspaces.map((workspace) => {\n const path = owningParentFolder(workspace.path, paths)\n return [workspace.workspaceId, path === undefined ? undefined : keysByPath.get(path)]\n }))\n }, [nestWorkspaces, workspaces])\n const currentAncestors = useMemo(() => {\n const keys = new Set<string>()\n for (let key = currentGroup === undefined ? undefined : parents.get(currentGroup); key !== undefined; key = parents.get(key)) {\n keys.add(key)\n }\n return keys\n }, [currentGroup, parents])\n const expandedGroups = useMemo(() => {\n const ancestorKeys = new Set<string | undefined>(parents.values())\n return [...workspaces.map(workspace => workspace.workspaceId), UNGROUPED_KEY]\n .filter(key => groupExpansion[key] ?? ancestorKeys.has(key))\n }, [groupExpansion, parents, workspaces])\n const groups = useMemo(\n () => deriveGroups(list, workspaces, rowState, statuses, {\n expandedGroups,\n ungroupedOrder: ungroupedSessionIds,\n }),\n [list, workspaces, rowState, statuses, expandedGroups, ungroupedSessionIds],\n )\n useEffect(() => {\n for (let key = revealGroup; key !== undefined; key = parents.get(key)) {\n if (groupExpansion[key] === false || (key === revealGroup && groupExpansion[key] !== true)) {\n setGroupExpanded(key, true)\n }\n }\n }, [groupExpansion, parents, revealGroup, setGroupExpanded])\n const baselines = new Map(groups.map(group => [group.key, Math.max(SESSION_WATERMARK_BASE, requiredWatermark(\n group.sessions,\n current,\n group.key === revealGroup ? revealSessionId : undefined,\n ))]))\n const foldedKeys = new Set(groups.filter(group => !group.expanded).map(group => group.key))\n const underFoldedAncestor = (key: string): boolean => {\n for (let owner = parents.get(key); owner !== undefined; owner = parents.get(owner)) {\n if (foldedKeys.has(owner)) return true\n }\n return false\n }\n // A group hidden by a folded ancestor keeps its own expansion and rows but must not raise its watermark.\n const requiredWatermarks = new Map([...baselines].filter(([key]) => !underFoldedAncestor(key)))\n const sessionWatermarks = raiseWatermarks(storedWatermarks, requiredWatermarks)\n // Raising during render keeps the watermark monotonic without committing a lower frame first.\n if (sessionWatermarks !== storedWatermarks) setStoredWatermarks(marks => raiseWatermarks(marks, requiredWatermarks))\n const dropWatermarks = (drop: (key: string) => boolean): void => {\n if (!Object.keys(storedWatermarks).some(drop)) return\n setStoredWatermarks(marks => Object.fromEntries(Object.entries(marks).filter(([key]) => !drop(key))))\n setWatermarkMotionKey(key => key + 1)\n }\n const withinGroup = (key: string, root: string): boolean => {\n for (let owner: string | undefined = key; owner !== undefined; owner = parents.get(owner)) {\n if (owner === root) return true\n }\n return false\n }\n const now = Date.now()\n const commitSessionDrag = (activeDrag: DragState, over: NonNullable<DragState['over']>): void => {\n if (sessionDropCommitted.current) return\n sessionDropCommitted.current = true\n setDrag(null)\n const group = groups.find(candidate => candidate.key === activeDrag.accountKey)\n if (group === undefined) return\n if (over.id === activeDrag.sessionId) return\n const accountSessionIds = activeDrag.accountKey === UNGROUPED_KEY\n ? ungroupedSessionIds\n : workspaces.find(workspace => workspace.workspaceId === activeDrag.accountKey)?.sessionIds\n if (accountSessionIds === undefined) return\n const renderedSessions = watermarkRows(group.sessions, sessionWatermarks[group.key] ?? SESSION_WATERMARK_BASE).rows\n const nextOrder = sessionDragOrder(accountSessionIds, renderedSessions, activeDrag, over)\n if (nextOrder !== undefined) setSessionOrder(activeDrag.accountKey, nextOrder)\n }\n const commitWorkspaceDrag = (\n activeDrag: WorkspaceDragState,\n over: NonNullable<WorkspaceDragState['over']>,\n ): void => {\n if (workspaceDropCommitted.current) return\n workspaceDropCommitted.current = true\n setWorkspaceDrag(null)\n const owner = parents.get(activeDrag.workspaceId)\n const siblings = workspaces.filter(workspace => parents.get(workspace.workspaceId) === owner)\n const rowIndex = siblings.findIndex(workspace => workspace.workspaceId === over.id)\n if (rowIndex === -1) return\n const anchor = over.half === 'before' ? over.id : siblings[rowIndex + 1]?.workspaceId\n if (anchor === activeDrag.workspaceId) return\n const sourceIndex = siblings.findIndex(workspace => workspace.workspaceId === activeDrag.workspaceId)\n const anchorIndex = anchor === undefined\n ? siblings.length\n : siblings.findIndex(workspace => workspace.workspaceId === anchor)\n if (sourceIndex !== -1 && (anchorIndex === sourceIndex || anchorIndex === sourceIndex + 1)) return\n insertWorkspaceBefore(activeDrag.workspaceId, anchor).catch((reason: unknown) => {\n console.warn('workspace reorder rejected:', reason)\n })\n }\n const childrenByParent = useMemo(() => {\n const rendered = new Set(groups.map(group => group.key))\n const children = new Map<string | undefined, GroupNode[]>()\n for (const group of groups) {\n // The archived-only view drops empty groups, so an ancestor may be\n // absent; nest under the nearest rendered one.\n let parent = parents.get(group.key)\n while (parent !== undefined && !rendered.has(parent)) parent = parents.get(parent)\n const siblings = children.get(parent)\n if (siblings === undefined) children.set(parent, [group])\n else siblings.push(group)\n }\n return children\n }, [groups, parents])\n const rootGroups = childrenByParent.get(undefined) ?? []\n const workspaceDropAtListStart = rootGroups[0]?.workspaceId !== undefined\n && workspaceDrag?.over?.id === rootGroups[0].workspaceId\n && workspaceDrag.over.half === 'before'\n\n const rowKeys: string[] = groups.length === 0 ? ['empty'] : []\n const renderGroup = (group: GroupNode, depth: number): ReactNode => {\n const workspaceId = group.workspaceId\n const children = childrenByParent.get(group.key) ?? []\n const compatibleDrag = workspaceDrag !== null && parents.get(workspaceDrag.workspaceId) === parents.get(group.key)\n const watermark = sessionWatermarks[group.key] ?? SESSION_WATERMARK_BASE\n const collapsed = watermarkRows(group.sessions, baselines.get(group.key) ?? SESSION_WATERMARK_BASE)\n const visible = watermarkRows(group.sessions, watermark)\n const sessionsExpanded = visible.hiddenCount === 0\n rowKeys.push(`workspace:${group.key}`)\n const childRows = group.expanded ? children.map(child => renderGroup(child, depth + 1)) : []\n const sessions = visible.rows\n for (const node of sessions) rowKeys.push(`session:${node.id}`)\n if (collapsed.hiddenCount > 0) rowKeys.push(`overflow:${group.key}`)\n const workspaceMarker = workspaceId !== undefined && workspaceDrag?.over?.id === workspaceId\n ? workspaceDrag.over.half\n : null\n const workspaceDragProps = workspaceId === undefined ? undefined : {\n start: () => {\n workspaceDropCommitted.current = false\n setWorkspaceDrag({ workspaceId, over: null })\n },\n end: () => {\n if (workspaceDrag?.over !== null && workspaceDrag?.over !== undefined) {\n commitWorkspaceDrag(workspaceDrag, workspaceDrag.over)\n } else {\n setWorkspaceDrag(null)\n }\n workspaceDropCommitted.current = false\n },\n }\n const hoverWorkspace = workspaceId === undefined || !compatibleDrag\n ? undefined\n : (half: 'before' | 'after') => {\n setWorkspaceDrag(active => active === null\n ? active\n : { ...active, over: { id: workspaceId, half } })\n }\n const dropWorkspace = workspaceId === undefined || !compatibleDrag\n ? undefined\n : (half: 'before' | 'after') => {\n commitWorkspaceDrag(workspaceDrag, { id: workspaceId, half })\n }\n return (\n // Group section: header, descendant Workspaces, and own Session rows. The\n // inter-group breathing room is the section's own margin\n // (WorkspaceBrowser.module.css).\n <div\n key={group.key}\n style={{ '--dsh-workspace-indent': `${depth * 12}px` } as CSSProperties}\n className={clsx(\n css.groupSection,\n workspaceMarker === 'before' && css.workspaceDropBefore,\n workspaceMarker === 'after' && css.workspaceDropAfter,\n )}\n onDragOver={workspaceDrag === null\n ? undefined\n : (e) => {\n e.preventDefault()\n if (hoverWorkspace === undefined && parents.get(group.key) !== undefined) return\n e.stopPropagation()\n if (hoverWorkspace === undefined) {\n e.dataTransfer.dropEffect = 'none'\n if (workspaceDrag.over !== null) setWorkspaceDrag({ ...workspaceDrag, over: null })\n } else {\n e.dataTransfer.dropEffect = 'move'\n hoverWorkspace(workspaceGroupHalf(e))\n }\n }}\n onDrop={workspaceDrag === null\n ? undefined\n : (e) => {\n e.preventDefault()\n if (dropWorkspace === undefined && parents.get(group.key) !== undefined) return\n e.stopPropagation()\n if (dropWorkspace === undefined) {\n workspaceDropCommitted.current = true\n setWorkspaceDrag(null)\n } else {\n dropWorkspace(workspaceGroupHalf(e))\n }\n }}\n >\n <ProjectRowItem\n newShortcut={shortcuts.find(row => row.id === 'session.new')}\n group={group}\n renderFactorySlot={renderFactorySlot} useContextMenu={useContextMenu} useContextMenuTarget={useContextMenuTarget}\n useWorkspaceAccess={useWorkspaceAccess}\n containsCurrentDescendant={currentAncestors.has(group.key)}\n home={home}\n t={t}\n onToggle={() => {\n if (group.expanded) dropWatermarks(key => withinGroup(key, group.key))\n setGroupExpanded(group.key, !group.expanded)\n }}\n onCreate={(workspaceId) => {\n setGroupExpanded(group.key, true)\n startSession(workspaceId)\n }}\n drag={workspaceDragProps}\n />\n {childRows.length > 0 && (\n <div role=\"group\">\n {childRows}\n </div>\n )}\n {sessions.map((node) => {\n // Session drag never leaves its browser-local account, and pinned\n // rows reorder only within their leading pinned block.\n const sameGroupDrag = drag !== null && drag.accountKey === group.key\n const compatibleTarget = sameGroupDrag && drag.pinned === node.pinned\n const normalizeHalf = (half: 'before' | 'after'): 'before' | 'after' =>\n node.blank ? 'after' : half\n const dragProps = {\n start: () => {\n sessionDropCommitted.current = false\n setDrag({ accountKey: group.key, sessionId: node.id, pinned: node.pinned, over: null })\n },\n active: compatibleTarget,\n marker: sameGroupDrag && drag.over?.id === node.id ? drag.over.half : null,\n hover: (half: 'before' | 'after') => {\n /* v8 ignore next -- narrowing guard: Rows gates hover on `active`, which is false while the drag state is null. */\n setDrag(d => (d === null ? d : {\n ...d, over: { id: node.id, half: normalizeHalf(half) },\n }))\n },\n drop: (half: 'before' | 'after') => {\n /* v8 ignore next -- narrowing guard: Rows gates drop on `active`, which is false while the drag state is null. */\n if (drag === null) return\n commitSessionDrag(drag, { id: node.id, half: normalizeHalf(half) })\n },\n end: () => {\n if (drag?.over !== null && drag?.over !== undefined) commitSessionDrag(drag, drag.over)\n else setDrag(null)\n sessionDropCommitted.current = false\n },\n }\n return (\n <SessionNodeItem\n key={node.id}\n node={node}\n currentId={current}\n now={now}\n onOpen={open}\n onRenameRequest={onSessionRenameRequest}\n renderSlot={renderSlot}\n renderFactorySlot={renderFactorySlot} useContextMenu={useContextMenu}\n useContextMenuTarget={useContextMenuTarget}\n onReveal={node.id === revealSessionId && group.key === revealGroup\n ? () => { onSessionRevealed(node.id) }\n : undefined}\n drag={dragProps}\n home={home}\n useSessionAccess={useSessionAccess}\n t={t}\n />\n )\n })}\n {collapsed.hiddenCount > 0 && (\n <button\n type=\"button\"\n className={css.sessionOverflowButton}\n data-row-key={`overflow:${group.key}`}\n aria-expanded={sessionsExpanded}\n onClick={() => {\n if (sessionsExpanded) {\n dropWatermarks(key => key === group.key)\n return\n }\n setStoredWatermarks(marks => ({\n ...marks,\n [group.key]: visible.hiddenCount <= SESSION_WATERMARK_BASE ? Infinity : watermark + SESSION_WATERMARK_BASE,\n }))\n setWatermarkMotionKey(key => key + 1)\n }}\n >\n {sessionsExpanded\n ? t('sessions.collapse')\n : t('sessions.expand', { n: visible.hiddenCount })}\n </button>\n )}\n </div>\n )\n }\n\n const groupRows = rootGroups.map(group => renderGroup(group, 0))\n return (\n <HoverCardGroup className={clsx(css.treeBody, css.wide)}>\n {workspaceDropAtListStart && <span className={css.listTopDropIndicator} aria-hidden=\"true\" />}\n <AnimatedRows\n className={clsx(css.list, workspaceDropAtListStart && css.listTopDropActive)}\n role=\"tree\"\n label={t('section.sessions')}\n rowKeys={rowKeys}\n ready={list.phase === 'ready' && workspaceReady && !nativeDragActive}\n resetKey={JSON.stringify([animationResetKey, watermarkMotionKey])}\n >\n {groups.length === 0 && (\n <EmptySessions rowState={rowState} onLeaveArchivedOnly={onLeaveArchivedOnly} t={t} />\n )}\n {groupRows}\n </AnimatedRows>\n </HoverCardGroup>\n )\n}\n\n/** The flat \"In one list\" body: every session is one draggable top-level row. */\nfunction FlatList({\n list, sessionIds, rowState, onLeaveArchivedOnly, useSessionStatus, useSessionAccess, open, onSessionRenameRequest,\n usePanelInfo, setSessionOrder, workspaceReady, animationResetKey,\n revealSessionId, onSessionRevealed, renderSlot, renderFactorySlot, useContextMenuTarget, useContextMenu, home, t,\n}: Pick<\n SessionTreeProps,\n | 'useSessionStatus'\n | 'useSessionAccess'\n | 'open'\n | 'onSessionRenameRequest'\n | 'renderSlot'\n | 'renderFactorySlot' | 'useContextMenuTarget' | 'useContextMenu'\n | 'usePanelInfo'\n | 'setSessionOrder'\n | 'workspaceReady'\n | 'animationResetKey'\n | 'revealSessionId'\n | 'onSessionRevealed'\n | 'rowState'\n | 'onLeaveArchivedOnly'\n | 'home'\n | 't'\n> & {\n list: SessionListState\n sessionIds: readonly SessionId[]\n}) {\n const panelActive = usePanelInfo(info => info.activePanelId !== null)\n const statuses = useSessionStatus(s => s)\n const rows = useMemo(\n () => deriveFlat(list, sessionIds, rowState, statuses),\n [list, sessionIds, rowState, statuses],\n )\n const [drag, setDrag] = useState<DragState | null>(null)\n const dropCommitted = useRef(false)\n useNativeDragAcceptance(drag !== null)\n const currentId = panelActive\n ? undefined\n : Object.values(list.byId).find(session => (session.retainedBy.mainView ?? 0) > 0)?.id\n const commitDrag = (activeDrag: DragState, over: NonNullable<DragState['over']>): void => {\n if (dropCommitted.current) return\n dropCommitted.current = true\n setDrag(null)\n const nextOrder = sessionDragOrder(sessionIds, rows, activeDrag, over)\n if (nextOrder !== undefined) setSessionOrder(FLAT_SESSION_ORDER_KEY, nextOrder)\n }\n const now = Date.now()\n return (\n <HoverCardGroup className={clsx(css.treeBody, css.wide)}>\n <AnimatedRows\n className={clsx(css.list, css.flatList)}\n role=\"tree\"\n label={t('section.sessions')}\n rowKeys={rows.length === 0 ? ['empty'] : rows.map(row => `session:${row.id}`)}\n ready={list.phase === 'ready' && workspaceReady && drag === null}\n resetKey={animationResetKey}\n >\n {rows.length === 0 && (\n <EmptySessions rowState={rowState} onLeaveArchivedOnly={onLeaveArchivedOnly} t={t} />\n )}\n {rows.map((node) => {\n const active = drag !== null && drag.pinned === node.pinned\n const normalizeHalf = (half: 'before' | 'after'): 'before' | 'after' =>\n node.blank ? 'after' : half\n return (\n <SessionNodeItem\n key={node.id}\n node={node}\n currentId={currentId}\n now={now}\n onOpen={open}\n onRenameRequest={onSessionRenameRequest}\n renderSlot={renderSlot}\n renderFactorySlot={renderFactorySlot} useContextMenu={useContextMenu}\n useContextMenuTarget={useContextMenuTarget}\n onReveal={node.id === revealSessionId\n ? () => { onSessionRevealed(node.id) }\n : undefined}\n useSessionAccess={useSessionAccess}\n drag={{\n start: () => {\n dropCommitted.current = false\n setDrag({ accountKey: FLAT_SESSION_ORDER_KEY, sessionId: node.id, pinned: node.pinned, over: null })\n },\n active,\n marker: active && drag.over?.id === node.id ? drag.over.half : null,\n hover: (half) => {\n setDrag(current => current === null ? current : {\n ...current, over: { id: node.id, half: normalizeHalf(half) },\n })\n },\n drop: (half) => {\n if (drag !== null) commitDrag(drag, { id: node.id, half: normalizeHalf(half) })\n },\n end: () => {\n if (drag?.over !== null && drag?.over !== undefined) commitDrag(drag, drag.over)\n else setDrag(null)\n dropCommitted.current = false\n },\n }}\n home={home}\n t={t}\n />\n )\n })}\n </AnimatedRows>\n </HoverCardGroup>\n )\n}\n\ninterface RemoteSearchState {\n query: string\n status: 'idle' | 'loading' | 'ready' | 'error'\n items: readonly SessionSearchResultItem[]\n hasMore: boolean\n}\n\n/** Flat search body: local metadata matches plus the current Host result page. */\nfunction SearchResults({\n useSessions,\n useSessionStatus,\n open,\n onUnarchive,\n workspaces,\n archivedSessionIds,\n archivedFilter,\n query,\n remote,\n resultLimit,\n usePanelInfo,\n useSessionAccess,\n t,\n}: Pick<WorkspaceBrowserProps, 'useSessions' | 'useSessionStatus' | 'open' | 't' | 'usePanelInfo' | 'useSessionAccess'> & {\n workspaces: readonly WorkspaceView[]\n archivedSessionIds: readonly SessionNode['id'][]\n /** Search matches follow the archived filter selected for the list. */\n archivedFilter: ArchivedFilter\n /** Unarchive an archived result row in place. */\n onUnarchive: (id: SessionNode['id']) => void\n query: string\n remote: RemoteSearchState\n resultLimit: number\n}) {\n const panelActive = usePanelInfo(info => info.activePanelId !== null)\n const list = useSessions(s => s)\n const statuses = useSessionStatus(s => s)\n const currentRemote = remote.query === query\n ? remote\n : { query, status: 'loading' as const, items: [], hasMore: false }\n const results = useMemo(\n () => deriveSearchResults(\n list,\n workspaces,\n query,\n archivedSessionIds,\n archivedFilter,\n statuses,\n currentRemote,\n resultLimit,\n ),\n [list, workspaces, query, archivedSessionIds, archivedFilter, statuses, currentRemote, resultLimit],\n )\n const pending = currentRemote.status === 'loading'\n const currentId = panelActive\n ? undefined\n : Object.values(list.byId).find(session => (session.retainedBy.mainView ?? 0) > 0)?.id\n\n return (\n <div className={clsx(css.treeBody, css.wide)}>\n <div className={css.list}>\n <div className={css.searchTree} role=\"tree\" aria-label={t('search.results.aria')}>\n {results.items.map(result => (\n <SearchResultItem\n key={result.id}\n result={result}\n currentId={currentId}\n onOpen={open}\n onUnarchive={onUnarchive}\n useSessionAccess={useSessionAccess}\n t={t}\n />\n ))}\n </div>\n {pending && (\n /* Two skeleton rows on an empty list, one when local matches already\n show and only the content hits are outstanding. */\n <div role=\"status\" aria-label={t('search.pending')}>\n {(results.items.length === 0 ? [0, 1] : [0]).map(i => (\n <div key={i} className={css.skeletonRow} aria-hidden=\"true\">\n <span className={css.skeletonDot} />\n <span className={css.skeletonBars}>\n <span className={css.skeletonBar} />\n <span className={clsx(css.skeletonBar, css.skeletonBarWide)} />\n </span>\n </div>\n ))}\n </div>\n )}\n {!pending && results.items.length === 0 && (\n <div className={css.empty}>{t('search.noMatches')}</div>\n )}\n {results.hasMore && (\n <div className={css.searchStatus}>\n {t('search.hasMore', { n: resultLimit })}\n </div>\n )}\n </div>\n </div>\n )\n}\n\n/**\n * Render the browsing region.\n * @param props - composed slot props (shell owner share + store + injected actions).\n * @returns the region element tree.\n */\nexport function WorkspaceBrowser({\n wide,\n usePanelInfo,\n expandSidebar,\n useSectionScroller,\n useSessions,\n useSessionStatus,\n useSessionAccess,\n useWorkspaceAccess,\n useWorkspaces,\n useStore,\n actions,\n startSession,\n open,\n requestSessionRename,\n notifyArchivedNotOpenable,\n renameWorkspace, useWorkspaceActionRequest, settleWorkspaceAction,\n deleteWorkspace,\n insertWorkspaceBefore,\n unarchiveSession,\n createWorkspace,\n searchSessions,\n searchResultLimit,\n useDirectoryFlow,\n useHostInfo,\n useAttention,\n useShortcuts,\n useWorkspaceShortcuts,\n requestSearch,\n requestAddWorkspace,\n closeAddWorkspace,\n setDirectoryBusy,\n renderSlot, renderFactorySlot, useContextMenuTarget, useContextMenu,\n t,\n}: WorkspaceBrowserProps) {\n const home = useHostInfo(info => info.home)\n const shortcuts = useShortcuts(rows => rows)\n const searchShortcut = shortcuts.find(row => row.id === 'session.search')\n const addShortcut = shortcuts.find(row => row.id === 'workspace.add')\n const shortcutState = useWorkspaceShortcuts(state => state)\n // Ordering remains live while the rail or search replaces the list body.\n const list = useSessions(state => state)\n const storedWorkspaces = useWorkspaces(state => state.items)\n // The resolved name, not `t`, is the memo dependency: the bound seat keeps\n // its identity across a language switch.\n const defaultWorkspaceName = t('workspace.defaultName')\n const workspaces = useMemo(\n () => storedWorkspaces.map(workspace => ({\n ...workspace,\n title: workspaceDisplayTitle(workspace.title, defaultWorkspaceName),\n })),\n [storedWorkspaces, defaultWorkspaceName],\n )\n const workspacePhase = useWorkspaces(state => state.phase)\n const workspaceStreamState = useWorkspaces(state => state.state)\n const archivedSessionIds = useWorkspaces(state => state.archivedSessionIds)\n const pinnedSessionIds = useWorkspaces(state => state.pinnedSessionIds)\n // Live occupancy of this surface's directory-flow hole (the same source the\n // flow reads): a composition without a picking affordance can add nothing.\n const directoryFlowAvailable = useDirectoryFlow(occupied => occupied)\n const groupBy = useStore(s => s.groupBy)\n const orderBy = useStore(s => s.orderBy)\n // Persisted view blobs written before the archived filter existed rehydrate\n // without the field; they read as the default hide-archived view.\n const archivedFilter = useStore(s => s.archivedFilter ?? 'default')\n const groupExpansion = useStore(s => s.groupExpansion)\n const sessionOrderByAccount = useStore(s => s.sessionOrderByAccount)\n // Archived sessions are not openable: the row stays visible under the\n // filter but a click explains instead of navigating.\n const guardedOpen = (sessionId: SessionId): void => {\n if (archivedSessionIds.includes(sessionId)) {\n notifyArchivedNotOpenable()\n return\n }\n open(sessionId)\n }\n const leaveArchivedOnly = (): void => { actions.setArchivedFilter('default') }\n const workspaceReady = workspacePhase === 'ready' && workspaceStreamState !== 'loading'\n const mainSessionId = Object.values(list.byId)\n .find(session => (session.retainedBy.mainView ?? 0) > 0)?.id\n // The region's row highlight reads the same current Session the tree does: a\n // panel covering the conversation leaves no row current.\n const highlightedSessionId = usePanelInfo(info => info.activePanelId !== null) ? undefined : mainSessionId\n const currentBlank = mainSessionId !== undefined && list.byId[mainSessionId]?.blank === true\n ? mainSessionId\n : undefined\n const ungroupedMemberIds = useMemo(() => {\n const accounted = new Set(workspaces.flatMap(workspace => workspace.sessionIds))\n return list.ids.filter(id => list.byId[id] !== undefined && !accounted.has(id))\n }, [list, workspaces])\n const orderState = useMemo(\n () => ({ pinnedSessionIds, archivedSessionIds }),\n [archivedSessionIds, pinnedSessionIds],\n )\n const rowState = useMemo<SessionRowState>(\n () => ({ ...orderState, archivedFilter }),\n [orderState, archivedFilter],\n )\n const flatMemberIds = useMemo(() => sessionMemberIds(list), [list])\n const orderedWorkspaces = useMemo(() => workspaces.map((workspace) => {\n const memberIds = workspace.sessionIds\n const baseOrder = orderBy === 'updated'\n ? orderByRecency(memberIds, list.byId)\n : reconcileManualOrder(memberIds, sessionOrderByAccount[workspace.workspaceId], list.byId, orderState)\n return {\n ...workspace,\n sessionIds: pinCurrentBlank(\n baseOrder,\n currentBlank !== undefined && memberIds.includes(currentBlank) ? currentBlank : undefined,\n ),\n }\n }), [currentBlank, list.byId, orderBy, orderState, sessionOrderByAccount, workspaces])\n const orderedUngroupedSessionIds = useMemo(() => {\n const baseOrder = orderBy === 'updated'\n ? orderByRecency(ungroupedMemberIds, list.byId)\n : reconcileManualOrder(ungroupedMemberIds, sessionOrderByAccount[UNGROUPED_KEY], list.byId, orderState)\n return pinCurrentBlank(\n baseOrder,\n currentBlank !== undefined && ungroupedMemberIds.includes(currentBlank) ? currentBlank : undefined,\n )\n }, [currentBlank, list.byId, orderBy, orderState, sessionOrderByAccount, ungroupedMemberIds])\n const orderedFlatSessionIds = useMemo(() => {\n const baseOrder = orderBy === 'updated'\n ? orderByRecency(flatMemberIds, list.byId)\n : reconcileManualOrder(flatMemberIds, sessionOrderByAccount[FLAT_SESSION_ORDER_KEY], list.byId, orderState)\n return pinCurrentBlank(\n baseOrder,\n currentBlank !== undefined && flatMemberIds.includes(currentBlank) ? currentBlank : undefined,\n )\n }, [currentBlank, flatMemberIds, list.byId, orderBy, orderState, sessionOrderByAccount])\n const activeSessionOrders = useMemo<Readonly<Record<string, readonly SessionId[]>>>(() => Object.fromEntries([\n ...orderedWorkspaces.map(workspace => [workspace.workspaceId, workspace.sessionIds] as const),\n [UNGROUPED_KEY, orderedUngroupedSessionIds] as const,\n [FLAT_SESSION_ORDER_KEY, orderedFlatSessionIds] as const,\n ]), [orderedFlatSessionIds, orderedUngroupedSessionIds, orderedWorkspaces])\n useEffect(() => {\n if (workspacePhase !== 'ready') return\n actions.retainAccountKeys([\n UNGROUPED_KEY,\n FLAT_SESSION_ORDER_KEY,\n ...workspaces.map(workspace => workspace.workspaceId),\n ])\n }, [actions.retainAccountKeys, workspacePhase, workspaces])\n useEffect(() => {\n if (list.phase !== 'ready' || workspaceReady || orderBy !== 'manual' || currentBlank === undefined) return\n // A first prompt can end blank pinning before the Workspace baseline arrives.\n // Preserve saved members until that baseline can establish departures.\n const changed: Record<string, readonly string[]> = {}\n for (const [key, ids] of Object.entries(activeSessionOrders)) {\n if (key !== FLAT_SESSION_ORDER_KEY && workspacePhase !== 'ready') continue\n const saved = sessionOrderByAccount[key] ?? []\n if (ids[0] !== currentBlank || saved[0] === currentBlank) continue\n changed[key] = [currentBlank, ...saved.filter(id => id !== currentBlank)]\n }\n if (Object.keys(changed).length > 0) actions.syncSessionOrders(changed)\n }, [\n actions.syncSessionOrders,\n activeSessionOrders,\n currentBlank,\n list.phase,\n orderBy,\n sessionOrderByAccount,\n workspacePhase,\n workspaceReady,\n ])\n useEffect(() => {\n if (list.phase !== 'ready' || !workspaceReady || orderBy !== 'manual' || currentBlank === undefined) return\n const moved = Object.entries(activeSessionOrders).some(([key, ids]) =>\n ids[0] === currentBlank && sessionOrderByAccount[key]?.[0] !== currentBlank)\n if (moved) actions.syncSessionOrders(activeSessionOrders)\n }, [\n actions.syncSessionOrders,\n activeSessionOrders,\n currentBlank,\n list.phase,\n orderBy,\n sessionOrderByAccount,\n workspaceReady,\n ])\n const saveSessionOrder = (accountKey: string, order: readonly string[]): void => {\n actions.setSessionOrder(accountKey, order, activeSessionOrders)\n }\n // The query outlives the tree and the input (both wide-only) so collapsing\n // does not silently drop an in-progress filter.\n const [query, setQuery] = useState('')\n const [searchExpanded, setSearchExpanded] = useState(false)\n const [searchSpacingMotionEnabled, setSearchSpacingMotionEnabled] = useState(false)\n const [searchOnExpand, setSearchOnExpand] = useState(false)\n const [lastSearchRequest, setLastSearchRequest] = useState(0)\n // Search state must commit before the effect expands the shell's external store.\n if (lastSearchRequest !== shortcutState.searchRequest) {\n setLastSearchRequest(shortcutState.searchRequest)\n if (shortcutState.searchRequest !== 0) {\n setSearchExpanded(true)\n setSearchSpacingMotionEnabled(wide)\n if (!wide) setSearchOnExpand(true)\n }\n }\n // Search gestures animate spacing; entering wide layout from the rail lands at its final geometry.\n if (!wide && searchSpacingMotionEnabled) setSearchSpacingMotionEnabled(false)\n const changeSearchExpanded = (expanded: boolean): void => {\n setSearchSpacingMotionEnabled(wide)\n setSearchExpanded(expanded)\n }\n const [revealSessionId, setRevealSessionId] = useState<SessionId | undefined>(undefined)\n const normalizedQuery = sanitizeSearchQuery(query).trim()\n const [remoteSearch, setRemoteSearch] = useState<RemoteSearchState>({\n query: '',\n status: 'idle',\n items: [],\n hasMore: false,\n })\n const searchRoot = useRef<HTMLDivElement | null>(null)\n const searchInput = useRef<HTMLInputElement | null>(null)\n // The list area is this section's own vertical scroller; the sidebar hands wheel\n // scrolling over its viewport to it once the navigation has moved away.\n const { bindScrollerRef } = useSectionScroller()\n const focusSearch = useCallback(() => {\n searchInput.current?.focus({ preventScroll: true })\n }, [])\n // Section-header + opens the picker menu (same popover in wide and rail\n // states; the menu anchors on this button).\n const wsPickerOpen = shortcutState.addRequested\n const wsPlusRef = useRef<HTMLButtonElement>(null)\n const workspaceActionRequest = useWorkspaceActionRequest(value => value)\n\n const openSearchResult = (sessionId: SessionId): void => {\n if (archivedSessionIds.includes(sessionId)) {\n notifyArchivedNotOpenable()\n return\n }\n setRevealSessionId(sessionId)\n setQuery('')\n changeSearchExpanded(false)\n open(sessionId)\n }\n const acknowledgeSessionReveal = (sessionId: SessionId): void => {\n setRevealSessionId(current => current === sessionId ? undefined : current)\n }\n useEffect(() => {\n if (normalizedQuery !== '') setRevealSessionId(undefined)\n }, [normalizedQuery])\n\n // Rail search = expand + land in the search box: the flag arms before the\n // expand request; once the shell flips wide the input mounts and takes focus.\n useEffect(() => {\n if (wide && searchOnExpand) {\n const timer = window.setTimeout(() => {\n focusSearch()\n setSearchOnExpand(false)\n }, EXPAND_SLIDE_MS)\n return () => { window.clearTimeout(timer) }\n }\n }, [wide, searchOnExpand, focusSearch])\n useEffect(() => {\n if (shortcutState.searchRequest === 0) return\n closeAddWorkspace()\n if (!wide || searchInput.current?.closest('[inert]')) {\n setSearchOnExpand(true)\n expandSidebar()\n } else focusSearch()\n }, [shortcutState.searchRequest, focusSearch])\n\n useEffect(() => {\n if (!wide || !searchExpanded || searchOnExpand) return\n focusSearch()\n }, [wide, searchExpanded, searchOnExpand, focusSearch])\n\n // Outside-click dismissal stays off while the rail gesture is in flight\n // (searchOnExpand): the rail click flips the shell wide and mounts this\n // listener during its own dispatch, then keeps bubbling to document with\n // the now-unmounted rail button as its target — outside searchRoot, so the\n // listener would dismiss the search that click just opened.\n useEffect(() => {\n if (!wide || !searchExpanded || searchOnExpand) return\n const onClick = (event: MouseEvent): void => {\n if (!(event.target instanceof Node) || searchRoot.current?.contains(event.target) === true) return\n searchInput.current?.blur()\n if (normalizedQuery !== '') return\n changeSearchExpanded(false)\n }\n document.addEventListener('click', onClick)\n return () => { document.removeEventListener('click', onClick) }\n }, [normalizedQuery, wide, searchExpanded, searchOnExpand])\n\n useEffect(() => {\n if (normalizedQuery === '') {\n setRemoteSearch({ query: '', status: 'idle', items: [], hasMore: false })\n return\n }\n const controller = new AbortController()\n setRemoteSearch({\n query: normalizedQuery,\n status: 'loading',\n items: [],\n hasMore: false,\n })\n const timer = window.setTimeout(() => {\n searchSessions(normalizedQuery, controller.signal).then((result) => {\n if (controller.signal.aborted) return\n setRemoteSearch({\n query: normalizedQuery,\n status: 'ready',\n items: result.items,\n hasMore: result.hasMore,\n })\n }).catch(() => {\n if (controller.signal.aborted) return\n setRemoteSearch({\n query: normalizedQuery,\n status: 'error',\n items: [],\n hasMore: false,\n })\n })\n }, SEARCH_DEBOUNCE_MS)\n return () => {\n window.clearTimeout(timer)\n controller.abort()\n }\n }, [normalizedQuery, searchSessions])\n\n // The search results' restore button; the row actions own the rest of the\n // Session verbs as slot entries.\n const onSessionUnarchive = (sessionId: SessionNode['id']) => {\n unarchiveSession(sessionId).catch((reason: unknown) => {\n console.warn('session unarchive rejected:', reason)\n })\n }\n return (\n <div className={clsx(css.root, !wide && css.rail)}>\n <div className={clsx(css.sectionHeader, wide && searchSpacingMotionEnabled && css.searchSpacingMotion)} data-sidebar-workspace-header=\"\">\n {wide && (\n <span className={clsx(css.sectionLabel, css.wide, searchExpanded && css.sectionLabelHidden)}>\n {groupBy === 'flat' ? t('section.sessions') : t('section.workspaces')}\n </span>\n )}\n {wide && (\n <div className={clsx(css.searchSlot, searchExpanded && css.searchSlotExpanded)}>\n <div\n ref={searchRoot}\n className={clsx(css.search, searchExpanded && css.searchExpanded)}\n onClick={() => {\n closeAddWorkspace()\n changeSearchExpanded(true)\n focusSearch()\n }}\n >\n <Tooltip label={t('search')} shortcutKeys={searchShortcut?.keys} side=\"bottom\" delayMs={500} disabled={searchExpanded} portal>\n <button\n type=\"button\"\n className={css.searchButton}\n aria-label={t('search.sessions.aria')}\n aria-keyshortcuts={searchShortcut?.aria}\n aria-expanded={searchExpanded}\n onClick={() => {\n requestSearch()\n }}\n >\n <IconSearchOutlineRegular size={searchExpanded ? 11 : 14} />\n </button>\n </Tooltip>\n <input\n ref={searchInput}\n className={css.searchInput}\n type=\"text\"\n placeholder={t('search.placeholder')}\n maxLength={SEARCH_QUERY_MAX_CODE_UNITS}\n value={query}\n tabIndex={searchExpanded ? 0 : -1}\n onChange={(e) => { setQuery(sanitizeSearchQuery(e.target.value)) }}\n onKeyDown={(e) => {\n if (e.key !== 'Escape') return\n setQuery('')\n changeSearchExpanded(false)\n }}\n />\n {searchExpanded && (\n <button\n type=\"button\"\n className={css.clearButton}\n aria-label={t('search.clear')}\n onClick={(e) => {\n e.stopPropagation()\n setQuery('')\n changeSearchExpanded(false)\n }}\n >\n <IconCloseFillRegular />\n </button>\n )}\n </div>\n </div>\n )}\n <div className={clsx(css.headerActions, wide && searchExpanded && css.headerActionsHidden)}>\n {wide && (\n <ViewOptionsMenu\n groupBy={groupBy}\n orderBy={orderBy}\n archivedFilter={archivedFilter}\n onGroupPick={actions.setGroupBy}\n onOrderPick={(mode) => { actions.setOrderBy(mode, activeSessionOrders) }}\n onArchivedFilterPick={actions.setArchivedFilter}\n t={t}\n />\n )}\n {/* Adding is the button's one action, so a composition with no\n picking affordance has nothing to offer here: the region hides the\n button rather than leaving a dead one in the header. */}\n {directoryFlowAvailable && (\n <Tooltip label={t('workspace.add')} shortcutKeys={addShortcut?.keys} side=\"bottom\" delayMs={500} portal>\n <button\n ref={wsPlusRef}\n type=\"button\"\n className={css.iconButton}\n aria-label={t('workspace.add')}\n aria-keyshortcuts={addShortcut?.aria}\n onClick={() => {\n requestAddWorkspace()\n }}\n >\n <IconProjectAddOutlineRegular size={wide ? 16 : 18} />\n </button>\n </Tooltip>\n )}\n </div>\n {/* Add flow + its error dialog (same package — direct composition). */}\n <WorkspacePickFlow\n t={t}\n open={wsPickerOpen}\n anchorRef={wsPlusRef}\n useWorkspaces={useWorkspaces}\n createWorkspace={createWorkspace}\n useDirectoryFlow={useDirectoryFlow}\n renderDirectoryFlow={owner => renderSlot('sidebar.workspaces.directoryFlow', owner)}\n addOnly\n onBusyChange={setDirectoryBusy}\n side=\"right\"\n onPick={(workspaceId) => {\n closeAddWorkspace()\n startSession(workspaceId, { clearPreviousDraft: false })\n }}\n onClose={() => { closeAddWorkspace() }}\n />\n </div>\n\n {/* The collapsed rail keeps search as its own 36px control. */}\n {!wide && <div className={css.search}>\n <Tooltip label={t('search')} shortcutKeys={searchShortcut?.keys} portal>\n <button\n type=\"button\"\n className={css.searchButton}\n aria-label={t('search.sessions.aria')}\n aria-keyshortcuts={searchShortcut?.aria}\n onClick={() => {\n requestSearch()\n }}\n >\n <IconSearchOutlineRegular size={18} />\n </button>\n </Tooltip>\n </div>}\n\n {/* Always-mounted seat keeps the region's flex slot while the list\n itself is wide-only. */}\n <div ref={wide ? bindScrollerRef : undefined} className={css.listArea} data-sidebar-list-area=\"\">\n {/* The folds lead the seat and scroll with it: the three quick groups,\n then the workspace tree as the fourth, independently collapsible\n group. A search replaces the whole region. */}\n {wide && (normalizedQuery !== ''\n ? (\n <SearchResults\n usePanelInfo={usePanelInfo}\n useSessionAccess={useSessionAccess}\n useSessions={useSessions}\n useSessionStatus={useSessionStatus}\n open={openSearchResult}\n onUnarchive={onSessionUnarchive}\n workspaces={workspaces}\n archivedSessionIds={archivedSessionIds}\n archivedFilter={archivedFilter}\n query={normalizedQuery}\n remote={remoteSearch}\n resultLimit={searchResultLimit}\n t={t}\n />\n )\n : (\n <AttentionSection\n useAttention={useAttention}\n useSessionAccess={useSessionAccess}\n open={guardedOpen}\n onSessionRenameRequest={requestSessionRename}\n currentId={highlightedSessionId}\n home={home}\n workspacesTitle={groupBy === 'flat' ? t('attention.section.allSessions') : t('attention.section.allWorkspaces')}\n renderSlot={renderSlot}\n renderFactorySlot={renderFactorySlot}\n useContextMenu={useContextMenu}\n useContextMenuTarget={useContextMenuTarget}\n t={t}\n >\n {groupBy === 'flat'\n ? (\n <FlatList\n useSessionAccess={useSessionAccess}\n usePanelInfo={usePanelInfo}\n list={list}\n sessionIds={orderedFlatSessionIds}\n rowState={rowState}\n onLeaveArchivedOnly={leaveArchivedOnly}\n workspaceReady={workspaceReady}\n animationResetKey={`${groupBy}/${orderBy}/${archivedFilter}`}\n useSessionStatus={useSessionStatus}\n open={guardedOpen}\n onSessionRenameRequest={requestSessionRename}\n renderSlot={renderSlot}\n renderFactorySlot={renderFactorySlot} useContextMenu={useContextMenu}\n useContextMenuTarget={useContextMenuTarget}\n setSessionOrder={saveSessionOrder}\n revealSessionId={revealSessionId}\n onSessionRevealed={acknowledgeSessionReveal}\n home={home}\n t={t}\n />\n )\n : (\n <SessionTree\n useSessionAccess={useSessionAccess}\n useWorkspaceAccess={useWorkspaceAccess}\n usePanelInfo={usePanelInfo}\n list={list}\n shortcuts={shortcuts}\n useSessionStatus={useSessionStatus}\n onSessionRenameRequest={requestSessionRename}\n renderSlot={renderSlot}\n renderFactorySlot={renderFactorySlot} useContextMenu={useContextMenu}\n useContextMenuTarget={useContextMenuTarget}\n workspaces={orderedWorkspaces}\n ungroupedSessionIds={orderedUngroupedSessionIds}\n workspaceReady={workspaceReady}\n nestWorkspaces={groupBy === 'workspace-tree'}\n animationResetKey={`${groupBy}/${orderBy}/${archivedFilter}`}\n groupExpansion={groupExpansion}\n setGroupExpanded={actions.setGroupExpanded}\n setSessionOrder={saveSessionOrder}\n rowState={rowState}\n onLeaveArchivedOnly={leaveArchivedOnly}\n startSession={startSession}\n open={guardedOpen}\n insertWorkspaceBefore={insertWorkspaceBefore}\n revealSessionId={revealSessionId}\n onSessionRevealed={acknowledgeSessionReveal}\n home={home}\n t={t}\n />\n )}\n </AttentionSection>\n ))}\n </div>\n\n {workspaceActionRequest !== null && <WorkspaceDialogs key={`${workspaceActionRequest.action}/${workspaceActionRequest.workspaceId}`}\n request={workspaceActionRequest} workspaces={workspaces} renameWorkspace={renameWorkspace} deleteWorkspace={deleteWorkspace}\n settleWorkspaceAction={settleWorkspaceAction} t={t} />}\n </div>\n )\n}\n","/** Archive hover button and confirmation for stopping the Session’s running work. */\nimport { useState } from 'react'\nimport type { SessionActivity } from '@deepseek-ai/dsh-api-workspace-controller/client'\n// Type-only: the family keys each provider merges; a key this program did not compile takes the generic line.\nimport type {} from '@deepseek-ai/dsh-agent/types'\nimport type {} from '@deepseek-ai/dsh-jobs/view'\nimport type {} from '@deepseek-ai/dsh-schedule/client'\nimport type {} from '@deepseek-ai/dsh-subagent/client'\nimport {\n Button, IconArchiveOutlineRegular, IconUnarchiveOutlineRegular, Modal, Tooltip,\n} from '@deepseek-ai/dsh-client-ui-primitives'\nimport type {\n ArchiveSessionInjected, SessionArchiveConfirmInjected, SessionArchiveConfirmProps, SessionArchiveConfirmRequest,\n SessionRowActionProps,\n} from '../contract/slots.ts'\nimport css from '../rows/Rows.module.css'\nimport browserCss from '../rows/WorkspaceBrowser.module.css'\n\n/**\n * Hover button (order 100): archive, or restore an archived row. Absent while the Session's access\n * snapshot excludes that toggle.\n * @param props - owner share, the access Hook, and the archive share.\n * @returns the button, or nothing when the caller may not toggle this Session's archival.\n */\nexport function ArchiveSessionRowButton({\n sessionId, useArchived, useSessionAccess, archiveSession, unarchiveSession, t,\n}: SessionRowActionProps<ArchiveSessionInjected>) {\n const archived = useArchived(set => set.has(sessionId))\n const allowed = useSessionAccess(sessionId, archived ? 'workspace/unarchiveSession' : 'workspace/archiveSession')\n if (!allowed) return null\n return (\n <Tooltip label={t(archived ? 'actions.unarchive' : 'actions.archive')} side=\"bottom\" align=\"end\" delayMs={500} portal>\n <button\n type=\"button\"\n className={css.iconButton}\n aria-label={t(archived ? 'menu.unarchiveSession' : 'menu.archiveSession')}\n onClick={() => { (archived ? unarchiveSession : archiveSession)(sessionId) }}\n >\n {archived ? <IconUnarchiveOutlineRegular size={14} /> : <IconArchiveOutlineRegular size={14} />}\n </button>\n </Tooltip>\n )\n}\n\n/**\n * The `shell.overlay` entry: nothing while no confirmation is pending,\n * otherwise one dialog per request (keyed by the Session). Confirming asks\n * the Host to stop the listed work and archive; cancelling leaves the\n * Session running and visible.\n * @param props - the request hook, its settlement, the stop-and-archive hop, and the locale seat.\n * @returns the open dialog, or null.\n */\nexport function SessionArchiveConfirmDialog({\n useArchiveRequest, settleSessionArchive, stopAndArchiveSession, t,\n}: SessionArchiveConfirmProps) {\n const request = useArchiveRequest(pending => pending)\n if (request === null) return null\n return (\n <ArchiveConfirmForm\n key={request.sessionId}\n request={request}\n stopAndArchiveSession={stopAndArchiveSession}\n onSettle={settleSessionArchive}\n t={t}\n />\n )\n}\n\n/** One request's dialog: in-flight and error state die with it. */\nfunction ArchiveConfirmForm({ request, stopAndArchiveSession, onSettle, t }: {\n request: SessionArchiveConfirmRequest\n stopAndArchiveSession: SessionArchiveConfirmInjected['stopAndArchiveSession']\n onSettle: () => void\n t: SessionArchiveConfirmProps['t']\n}) {\n const [archiving, setArchiving] = useState(false)\n const [error, setError] = useState<string | null>(null)\n const close = () => {\n if (archiving) return\n onSettle()\n }\n const confirm = () => {\n setArchiving(true)\n setError(null)\n stopAndArchiveSession(request.sessionId).then(() => {\n setArchiving(false)\n onSettle()\n }).catch((reason: unknown) => {\n setArchiving(false)\n setError(reason instanceof Error ? reason.message : String(reason))\n })\n }\n return (\n <Modal\n open\n onClose={close}\n closeLabel={t('close')}\n title={t('archive.confirm.title')}\n description={t('archive.confirm.desc', { title: request.displayTitle })}\n footer={(\n <>\n <Button variant=\"outline\" disabled={archiving} onClick={close}>{t('cancel')}</Button>\n <Button\n variant=\"outline\"\n className={browserCss.deleteAction}\n disabled={archiving}\n onClick={confirm}\n >\n {t('archive.confirm.action')}\n </Button>\n </>\n )}\n >\n <ul className={browserCss.archiveActivity} aria-label={t('archive.confirm.activity')}>\n {request.activity.map((entry, index) => (\n <li key={`${entry.kind}-${String(index)}`}>{activityLine(entry, t)}</li>\n ))}\n </ul>\n {archiving && <div className={browserCss.deleteStatus} role=\"status\">{t('archive.confirm.pending')}</div>}\n {error !== null && <div className={browserCss.renameError} role=\"alert\">{error}</div>}\n </Modal>\n )\n}\n\n/**\n * One family's line: its count and the items' labels (ids when a family\n * carries no label). A family this dictionary does not know — a provider\n * merged into the kind map — falls through to the generic line.\n */\nfunction activityLine(entry: SessionActivity, t: SessionArchiveConfirmProps['t']): string {\n const items = entry.items ?? []\n const n = items.length\n const names = items.map(item => item.label ?? item.id).join(t('archive.confirm.listSeparator'))\n const plural = n === 1 ? 'one' : 'other'\n switch (entry.kind) {\n case 'turn': return t('archive.confirm.turn')\n case 'subagent': return t(`archive.confirm.subagents.${plural}`, { n, names })\n case 'job': return t(`archive.confirm.jobs.${plural}`, { n, names })\n case 'schedule': return t(`archive.confirm.schedules.${plural}`, { n, names })\n default: return t(`archive.confirm.other.${plural}`, { kind: entry.kind, n })\n }\n}\n","/** Derived observable sources for the row actions' injected hooks. */\nimport type { HostObservable } from '@deepseek-ai/dsh-client-ui-slots'\n\n/**\n * Project one observable into another, recomputing only when the source\n * snapshot changes identity, so consumers that select from the projection\n * (a Set lookup per row) never rebuild it per read.\n * @param source - the observable to project.\n * @param project - pure projection of one source snapshot.\n * @returns the projected observable, subscribing through the source.\n */\nexport function derive<S, T>(source: HostObservable<S>, project: (snapshot: S) => T): HostObservable<T> {\n let seen: S | undefined\n let value: T | undefined\n return {\n getSnapshot: () => {\n const snapshot = source.getSnapshot()\n if (value === undefined || snapshot !== seen) {\n seen = snapshot\n value = project(snapshot)\n }\n return value\n },\n subscribe: listener => source.subscribe(listener),\n }\n}\n","/** Structured Session actions over the workspace owner's existing callbacks. */\nimport type { Context } from '@deepseek-ai/cordis'\nimport type { RemoteEndpoint } from '@deepseek-ai/dsh-api-remote-access/client'\nimport type { ShortcutCommandId } from '@deepseek-ai/dsh-client-shortcuts/client'\nimport type { MenuContribution, ContextMenuTargetMap } from '@deepseek-ai/dsh-client-ui-context-menu/client'\nimport type {\n ArchiveSessionInjected, ForkSessionInjected, PinSessionInjected, RenameSessionInjected, SessionIdInjected,\n} from '../contract/slots.ts'\n\ntype Actions = Omit<PinSessionInjected & ArchiveSessionInjected, 'hooks'>\n & ForkSessionInjected & RenameSessionInjected & SessionIdInjected\n\n/**\n * Register built-in actions while retaining the legacy Slot for external components.\n * @param ctx - workspace plugin context owning menus, access, membership, and locale.\n * @param actions - shared row and dialog callbacks; execution always uses the captured Session.\n */\nexport function registerSessionMenus(ctx: Context, actions: Actions): void {\n const t = ctx.locale.bind('workspace')\n const register = (\n id: string,\n order: number,\n endpoints: readonly RemoteEndpoint[],\n resolve: MenuContribution<'session'>['resolve'],\n ): void => {\n ctx.effect(() => ctx.contextMenus.register({\n id: `session.${id}`, target: 'session', order,\n observe: ({ sessionId }) => [\n ctx.workspaces.list, ctx.locale,\n ...endpoints.map(action => ctx.remoteAccess.source('session', sessionId, action)),\n ],\n resolve,\n }), `ui-workspace: ${id} menu`)\n }\n const allowed = (target: ContextMenuTargetMap['session'], action: RemoteEndpoint): boolean =>\n ctx.remoteAccess.source('session', target.sessionId, action).getSnapshot()\n const archived = (target: ContextMenuTargetMap['session']): boolean =>\n ctx.workspaces.list.getSnapshot().archivedSessionIds.includes(target.sessionId)\n register('pin', 100, ['workspace/pinSession', 'workspace/unpinSession'], (target) => {\n const pinned = ctx.workspaces.list.getSnapshot().pinnedSessionIds.includes(target.sessionId)\n if (archived(target) || !allowed(target, pinned ? 'workspace/unpinSession' : 'workspace/pinSession')) return []\n return [{\n id: 'pin', label: t(pinned ? 'menu.unpinSession' : 'menu.pinSession'), icon: { key: pinned ? 'workspace.unpin' : 'workspace.pin' },\n run: () => { (pinned ? actions.unpinSession : actions.pinSession)(target.sessionId) },\n }]\n })\n register('rename', 200, ['session/rename'], target => allowed(target, 'session/rename') ? [{\n id: 'rename', label: t('rename'), icon: { key: 'workspace.rename' }, commandId: 'session.rename' as ShortcutCommandId,\n run: () => { actions.requestSessionRename(target.sessionId, target.displayTitle) },\n }] : [])\n register('fork', 300, ['session/fork'], target => allowed(target, 'session/fork') ? [{\n id: 'fork', label: t('menu.fork'), icon: { key: 'workspace.fork' }, commandId: 'session.fork' as ShortcutCommandId,\n run: () => { actions.forkSession(target.sessionId) },\n }] : [])\n register('id', 450, [], target => [{\n id: 'copy', label: t('menu.sessionId'), icon: { key: 'workspace.copy' }, separatorBefore: true,\n run: () => actions.copySessionId(target.sessionId),\n }])\n register('archive', 600, ['workspace/archiveSession', 'workspace/unarchiveSession'], (target) => {\n const restoring = archived(target)\n if (!allowed(target, restoring ? 'workspace/unarchiveSession' : 'workspace/archiveSession')) return []\n return [{\n id: 'archive', label: t(restoring ? 'menu.unarchiveSession' : 'menu.archiveSession'),\n icon: { key: restoring ? 'workspace.unarchive' : 'workspace.archive' }, separatorBefore: true, afterContent: true,\n ...restoring ? {} : { commandId: 'session.archive' as ShortcutCommandId },\n run: () => { (restoring ? actions.unarchiveSession : actions.archiveSession)(target.sessionId) },\n }]\n })\n}\n","/** Session pin hover button over the workspace owner’s shared callbacks. */\nimport {\n IconPinFillRegular, IconPinOutlineRegular, Tooltip,\n} from '@deepseek-ai/dsh-client-ui-primitives'\nimport clsx from 'clsx'\nimport type { PinSessionInjected, SessionRowActionProps } from '../contract/slots.ts'\nimport css from '../rows/Rows.module.css'\n\ntype PinState = Pick<SessionRowActionProps<PinSessionInjected>, 'sessionId' | 'usePinned' | 'useArchived' | 'useSessionAccess'>\n\n/** The row's pin and archive membership, one Set lookup each, and whether its access allows the toggle. */\nfunction usePinState({ sessionId, usePinned, useArchived, useSessionAccess }: PinState) {\n const pinned = usePinned(set => set.has(sessionId))\n return {\n pinned,\n archived: useArchived(archived => archived.has(sessionId)),\n allowed: useSessionAccess(sessionId, pinned ? 'workspace/unpinSession' : 'workspace/pinSession'),\n }\n}\n\n/**\n * Hover button (order 200), also visible without hover when pinned; absent on\n * archived rows and while the Session's access snapshot excludes that toggle.\n * Tooltip forwards the class to the button. Keep that button directly inside\n * the display-contents slot anchor so hoverless rows can retain the Unpin action.\n * @param props - owner share, the access Hook, and the pin share.\n * @returns the button, or null for an archived or refused Session.\n */\nexport function PinSessionRowButton(props: SessionRowActionProps<PinSessionInjected>) {\n const { sessionId, pinSession, unpinSession, t } = props\n const { pinned, archived, allowed } = usePinState(props)\n if (archived || !allowed) return null\n return (\n <Tooltip label={t(pinned ? 'actions.unpin' : 'actions.pin')} side=\"bottom\" align=\"end\" delayMs={500} portal>\n <button\n type=\"button\"\n className={clsx(css.iconButton, pinned && css.pinnedAction)}\n aria-label={t(pinned ? 'menu.unpinSession' : 'menu.pinSession')}\n onClick={() => { (pinned ? unpinSession : pinSession)(sessionId) }}\n >\n {pinned ? <IconPinFillRegular size={14} /> : <IconPinOutlineRegular size={14} />}\n </button>\n </Tooltip>\n )\n}\n","/** Rename dialog shared by Session menus, shortcuts, and title double-clicks. */\nimport { useRef, useState } from 'react'\nimport { Button, Modal } from '@deepseek-ai/dsh-client-ui-primitives'\nimport type {\n SessionRenameDialogInjected, SessionRenameDialogProps, SessionRenameTarget,\n} from '../contract/slots.ts'\nimport css from '../rows/WorkspaceBrowser.module.css'\n\n/**\n * The `shell.overlay` entry: nothing while no rename is requested, otherwise\n * one dialog per request (keyed by the Session, so a new request starts a\n * fresh draft). Sessions have no client-side name-conflict rule (the host\n * normalizes), and unlike Workspace rename an unchanged title is NOT\n * blocked. An unnamed Session starts with an empty draft and requires a name.\n * @param props - the request hook, its settlement, the rename hop, and the locale seat.\n * @returns the open dialog, or null.\n */\nexport function SessionRenameDialog({ useRenameRequest, settleSessionRename, renameSession, t }: SessionRenameDialogProps) {\n const request = useRenameRequest(pending => pending)\n if (request === null) return null\n return (\n <RenameForm\n key={request.sessionId}\n request={request}\n renameSession={renameSession}\n onSettle={settleSessionRename}\n t={t}\n />\n )\n}\n\n/** One request's dialog: the draft seeds from the request on mount; in-flight and error state die with it. */\nfunction RenameForm({ request, renameSession, onSettle, t }: {\n request: SessionRenameTarget\n renameSession: SessionRenameDialogInjected['renameSession']\n onSettle: () => void\n t: SessionRenameDialogProps['t']\n}) {\n const [draft, setDraft] = useState(request.currentTitle)\n const [renaming, setRenaming] = useState(false)\n const [error, setError] = useState<string | null>(null)\n // IME composition: Enter that commits a composition must not submit.\n const composingRef = useRef(false)\n const trimmed = draft.trim()\n const blocked = renaming || trimmed === ''\n const close = () => {\n if (renaming) return\n onSettle()\n }\n const confirm = () => {\n if (blocked) return\n setRenaming(true)\n setError(null)\n renameSession(request.sessionId, trimmed).then(() => {\n setRenaming(false)\n onSettle()\n }).catch((reason: unknown) => {\n setRenaming(false)\n setError(reason instanceof Error ? reason.message : String(reason))\n })\n }\n return (\n <Modal\n open\n onClose={close}\n closeLabel={t('close')}\n title={t('rename.session.title')}\n footer={(\n <>\n <Button variant=\"outline\" disabled={renaming} onClick={close}>{t('cancel')}</Button>\n <Button variant=\"primary\" disabled={blocked} onClick={confirm}>{t('rename')}</Button>\n </>\n )}\n >\n <input\n className={css.renameInput}\n value={draft}\n aria-label={t('field.sessionName')}\n data-modal-autofocus\n disabled={renaming}\n onFocus={(e) => { e.target.select() }}\n onChange={(e) => { setDraft(e.target.value); setError(null) }}\n onCompositionStart={() => { composingRef.current = true }}\n onCompositionEnd={() => { composingRef.current = false }}\n onKeyDown={(e) => {\n if (e.key === 'Enter' && !composingRef.current) {\n e.preventDefault()\n confirm()\n }\n }}\n />\n {error !== null && <div className={css.renameError} role=\"alert\">{error}</div>}\n </Modal>\n )\n}\n","/** The existing overlay dispatches the latest Workspace notice to its keyed presentation. */\nimport type { RowToastProps } from '../contract/slots.ts'\nimport type {} from '../contract/toast.ts'\n\n/**\n * Dispatch the current notice without interpreting its business payload.\n * @param props - Current notice, dismissal, and the declared keyed renderer.\n * @returns The selected notice presentation, or nothing.\n */\nexport function RowActionToast({ useToast, dismissToast, renderSlot }: RowToastProps) {\n const notice = useToast(current => current)\n if (notice === null) return null\n return renderSlot('workspace.toast', { ...notice, dismissToast }, { entryKey: notice.kind })\n}\n","/** One presentation Factory and the adapters for keyed Workspace notices. */\nimport { IconWarningOutlineRegular, Toast } from '@deepseek-ai/dsh-client-ui-primitives'\nimport type { PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots'\nimport type { ArchiveToastEntryProps, ToastEntryProps, WorkspaceToastProps } from '../contract/toast.ts'\n\n/**\n * Render one notice using the shared Factory.\n * @param props - Keyed payload, injected display mapping, locale, and Factory renderer.\n * @returns The shared Toast occurrence.\n */\nexport function ToastEntry<P extends PropsRuntime<'workspace.toast'>>(props: ToastEntryProps<P>) {\n const { dismissToast, display, t, renderFactorySlot, seq } = props\n return renderFactorySlot('workspace.toast.content', { ...display(props, t, dismissToast), seq, onDone: dismissToast })\n}\n\n/**\n * Keep the archive filter action reactive without subscribing unrelated notices.\n * @param props - Archive notice, display mapping, and the existing viewing store.\n * @returns The shared Toast occurrence with its current actions.\n */\nexport function ArchiveToastEntry(props: ArchiveToastEntryProps) {\n const { dismissToast, display, filterAction, useStore, t, renderFactorySlot, seq } = props\n const archivedVisible = useStore(state => (state.archivedFilter ?? 'default') !== 'default')\n const fields = display(props, t, dismissToast)\n return renderFactorySlot('workspace.toast.content', {\n ...fields,\n actions: [...fields.actions ?? [], ...archivedVisible ? [] : [filterAction(t, dismissToast)]],\n seq,\n onDone: dismissToast,\n })\n}\n\n/**\n * Present plain display data with the shared primitive's timing and portal.\n * @param props - Localized display fields, display identity, and dismissal.\n * @returns One Toast, remounted only for a new display identity.\n */\nexport function WorkspaceToast({ seq, text, tone, holdMs, actions, onDone }: WorkspaceToastProps) {\n return <Toast key={seq} text={text} onDone={onDone}\n {...tone === 'success' ? { tone: 'success' as const } : {}}\n {...tone === 'warning' ? { icon: <IconWarningOutlineRegular /> } : {}}\n {...holdMs === undefined ? {} : { holdMs }}\n {...actions === undefined ? {} : { actions }} />\n}\n","/** Business-owned mappings into the keyed Workspace Toast slot. */\nimport type { Context } from '@deepseek-ai/cordis'\nimport type { PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots'\nimport type { RowToastActions, WorkspaceViewStoreHandle } from '../contract/slots.ts'\nimport type { ArchiveToastInjected, ToastDisplayInjected } from '../contract/toast.ts'\nimport { ArchiveToastEntry, ToastEntry, WorkspaceToast } from './Toast.tsx'\n\n/** Register notice presentations with their business-owned display fields and actions.\n * @param ctx - Workspace plugin context.\n * @param viewStore - Viewing store, read only by archive notices.\n * @param actions - Archive and source-opening callbacks.\n */\nexport function registerToasts(\n ctx: Context,\n viewStore: WorkspaceViewStoreHandle,\n actions: Pick<RowToastActions, 'undoArchive' | 'showArchived' | 'openForkSource'>,\n): void {\n const archiveFilterAction: ArchiveToastInjected['filterAction'] = (t, dismiss) => ({\n prefix: t('toast.archivedOr'), label: t('toast.archivedFilter'),\n onClick: () => { dismiss(); actions.showArchived() },\n })\n ctx.slots.registerFactory({ name: 'workspace.toast.content', scope: 'root' }, WorkspaceToast)\n ctx.slots.inject('workspace.toast', function* () {\n yield ctx.slots.register({\n name: 'workspace.toast', key: 'sessionIdCopied', locale: 'workspace',\n inject: (): ToastDisplayInjected<'sessionIdCopied'> => ({\n display: (_notice, t) => ({ text: t('toast.sessionIdCopied'), tone: 'success' }),\n }),\n }, ToastEntry<PropsRuntime<'workspace.toast', 'sessionIdCopied'>>)\n yield ctx.slots.register({\n name: 'workspace.toast', key: 'sessionIdCopyFailed', locale: 'workspace',\n inject: (): ToastDisplayInjected<'sessionIdCopyFailed'> => ({\n display: (_notice, t) => ({ text: t('toast.sessionIdCopyFailed'), tone: 'warning' }),\n }),\n }, ToastEntry<PropsRuntime<'workspace.toast', 'sessionIdCopyFailed'>>)\n yield ctx.slots.register({\n name: 'workspace.toast', key: 'pinFailed', locale: 'workspace',\n inject: (): ToastDisplayInjected<'pinFailed'> => ({\n display: (_notice, t) => ({ text: t('toast.pinFailed'), tone: 'warning' }),\n }),\n }, ToastEntry<PropsRuntime<'workspace.toast', 'pinFailed'>>)\n yield ctx.slots.register({\n name: 'workspace.toast', key: 'unpinFailed', locale: 'workspace',\n inject: (): ToastDisplayInjected<'unpinFailed'> => ({\n display: (_notice, t) => ({ text: t('toast.unpinFailed'), tone: 'warning' }),\n }),\n }, ToastEntry<PropsRuntime<'workspace.toast', 'unpinFailed'>>)\n yield ctx.slots.register({\n name: 'workspace.toast', key: 'archivedNotOpenable', locale: 'workspace',\n inject: (): ToastDisplayInjected<'archivedNotOpenable'> => ({\n display: (_notice, t) => ({ text: t('toast.archivedNotOpenable'), tone: 'warning' }),\n }),\n }, ToastEntry<PropsRuntime<'workspace.toast', 'archivedNotOpenable'>>)\n yield ctx.slots.register({\n name: 'workspace.toast', key: 'defaultWorkspaceFailed', locale: 'workspace',\n inject: (): ToastDisplayInjected<'defaultWorkspaceFailed'> => ({\n display: (_notice, t) => ({ text: t('defaultWorkspace.failed'), tone: 'warning' }),\n }),\n }, ToastEntry<PropsRuntime<'workspace.toast', 'defaultWorkspaceFailed'>>)\n yield ctx.slots.register({\n name: 'workspace.toast', key: 'shortcutForkFailed', locale: 'workspace',\n inject: (): ToastDisplayInjected<'shortcutForkFailed'> => ({\n display: (notice, t) => ({\n text: t(notice.reason === 'unavailable' ? 'shortcut.noCompletedTurn' : 'shortcut.forkFailed'), tone: 'plain',\n }),\n }),\n }, ToastEntry<PropsRuntime<'workspace.toast', 'shortcutForkFailed'>>)\n yield ctx.slots.register({\n name: 'workspace.toast', key: 'createFailed', locale: 'workspace',\n inject: (): ToastDisplayInjected<'createFailed'> => ({\n display: (notice, t) => ({ text: t('toast.createFailed', { message: notice.message }), tone: 'warning', holdMs: 6000 }),\n }),\n }, ToastEntry<PropsRuntime<'workspace.toast', 'createFailed'>>)\n yield ctx.slots.register({\n name: 'workspace.toast', key: 'forkRequiresOpen', locale: 'workspace',\n inject: (): ToastDisplayInjected<'forkRequiresOpen'> => ({\n display: (notice, t, dismiss) => ({\n text: t('toast.forkRequiresOpen'), tone: 'warning', holdMs: 6000,\n actions: [{ label: t('toast.openForkSource'), onClick: () => { dismiss(); actions.openForkSource(notice.sessionId) } }],\n }),\n }),\n }, ToastEntry<PropsRuntime<'workspace.toast', 'forkRequiresOpen'>>)\n for (const key of ['archived', 'stoppedAndArchived'] as const) {\n yield ctx.slots.register({\n name: 'workspace.toast', key, locale: 'workspace', store: viewStore,\n inject: (): ArchiveToastInjected => ({\n display: (notice, t, dismiss) => ({\n text: notice.message ?? t(`toast.${notice.kind}`), tone: notice.tone ?? 'success', holdMs: 6000,\n actions: [{ label: t('toast.archivedUndo'), onClick: () => { dismiss(); actions.undoArchive(notice.sessionId) } }],\n }),\n filterAction: archiveFilterAction,\n }),\n }, ArchiveToastEntry)\n }\n })\n}\n","/**\n * `workspace` namespace dictionaries: the browsing region (section header,\n * search, tree rows, dialogs) and the pick/add flow. Runtime failure\n * messages (wire error strings) pass through untranslated by policy.\n */\n\n/** Simplified Chinese dictionary (the key-set source of truth). */\nexport const zh = {\n 'defaultWorkspace.failed': '无法创建默认工作区,请通过“选择工作区”选择文件夹',\n 'draft.workspaceRequired': '请先选择工作区',\n 'draft.initializationFailed': '暂时无法填入草稿,请稍后重试',\n 'group.ungrouped': '未分组',\n 'group.running': '有会话正在运行',\n 'group.completed': '有会话已完成,未读',\n 'session.new': '新会话',\n 'session.untitled': '未命名',\n 'shortcut.noSession': '请先选择一个会话',\n 'shortcut.noPicker': '目录选择器不可用',\n 'shortcut.directoryBusy': '正在选择或添加工作区',\n 'shortcut.noCompletedTurn': '当前会话没有已结束的轮次',\n 'shortcut.forkFailed': '无法分叉会话,请重试',\n 'section.workspaces': '工作区',\n 'section.sessions': '会话',\n 'viewOptions.label': '视图选项',\n 'groupBy.label': '分组方式',\n 'groupBy.workspace': '按工作区',\n 'groupBy.workspaceTree': '按工作区树',\n 'groupBy.flat': '单列表',\n 'orderBy.label': '排序方式',\n 'orderBy.manual': '手动排序',\n 'orderBy.updated': '最近更新',\n 'filterBy.label': '筛选会话',\n 'viewOptions.hideArchived': '隐藏已归档',\n 'viewOptions.showArchived': '全部对话(显示已归档)',\n 'viewOptions.onlyArchived': '仅显示已归档',\n 'sessions.expand': '展开其余 {n} 个会话',\n 'sessions.collapse': '收起',\n 'empty.none': '暂无会话',\n 'empty.noneArchived': '暂无已归档会话',\n 'empty.viewOthers': '查看其他会话',\n 'empty.noMatches': '无匹配结果',\n 'workspace.add': '添加工作区',\n 'search.sessions.aria': '搜索会话',\n 'search.placeholder': '搜索会话名称',\n 'search.clear': '清除搜索',\n 'search.results.aria': '搜索结果',\n 'search.pending': '正在搜索会话历史…',\n 'search.noMatches': '无匹配会话',\n 'search.hasMore': '仅显示前 {n} 条结果,请缩小搜索范围。',\n 'menu.addWorkspace': '添加工作区…',\n 'picker.loading': '正在加载工作区…',\n 'conflict.named': '已存在名为“{name}”的工作区。',\n 'folderError.title': '无法打开文件夹',\n 'folderError.retry': '重新选择',\n 'rename': '重命名',\n 'rename.workspace.title': '重命名工作区',\n 'rename.session.title': '重命名会话',\n 'field.workspaceName': '工作区名称',\n 'field.sessionName': '会话名称',\n 'delete.workspace': '删除工作区',\n 'delete.desc': '将把“{name}”从工作区列表中移除。文件夹与会话记录会保留,其会话将显示在“未分组”下。',\n 'delete.pending': '正在删除工作区…',\n 'menu.fork': '分叉会话',\n 'menu.archiveSession': '归档会话',\n 'menu.unarchiveSession': '取消归档',\n 'menu.pinSession': '置顶会话',\n 'menu.unpinSession': '取消置顶',\n 'menu.sessionId': '复制 Session ID',\n 'toast.sessionIdCopied': 'Session ID 已复制',\n 'toast.sessionIdCopyFailed': '复制失败,请重试',\n 'row.archived': '已归档',\n 'row.pinned': '已置顶',\n 'toast.archivedNotOpenable': '已归档对话暂时无法查看,请取消归档后查看',\n 'toast.archived': '会话已归档,可',\n 'toast.stoppedAndArchived': '已停止并归档,可',\n 'archive.confirm.title': '停止并归档此会话?',\n 'archive.confirm.desc': '“{title}”仍有正在进行的工作。归档会先停止这些工作;之后可在侧栏筛选“全部对话(显示已归档)”中恢复会话,被停止的工作不会自动继续。',\n 'archive.confirm.activity': '将被停止的工作',\n 'archive.confirm.turn': '进行中的回合',\n 'archive.confirm.subagents.one': '{n} 个运行中的子智能体:{names}',\n 'archive.confirm.subagents.other': '{n} 个运行中的子智能体:{names}',\n 'archive.confirm.jobs.one': '{n} 个后台任务:{names}',\n 'archive.confirm.jobs.other': '{n} 个后台任务:{names}',\n 'archive.confirm.schedules.one': '{n} 条定时提醒:{names}',\n 'archive.confirm.schedules.other': '{n} 条定时提醒:{names}',\n 'archive.confirm.other.one': '{n} 项其他工作({kind})',\n 'archive.confirm.other.other': '{n} 项其他工作({kind})',\n 'archive.confirm.listSeparator': '、',\n 'archive.confirm.action': '停止并归档',\n 'archive.confirm.pending': '正在停止并归档…',\n 'toast.archivedUndo': '撤销',\n 'toast.archivedOr': '或',\n 'toast.archivedFilter': '筛选已归档会话',\n 'toast.pinFailed': '置顶失败,请稍后重试',\n 'toast.unpinFailed': '取消置顶失败,请稍后重试',\n 'toast.createFailed': '新建会话失败:{message}',\n 'toast.forkRequiresOpen': '请先打开原会话完成迁移,再创建分支',\n 'toast.openForkSource': '打开原会话',\n 'sessions.count.one': '{n} 个会话',\n 'sessions.count.other': '{n} 个会话',\n 'actions.workspace.aria': '工作区“{name}”的操作',\n 'actions.session.aria': '会话“{name}”的操作',\n 'actions.archive': '归档会话',\n 'actions.unarchive': '取消归档',\n 'actions.pin': '置顶会话',\n 'actions.unpin': '取消置顶',\n 'actions.newSession': '新会话',\n 'actions.newSession.aria': '在“{name}”中新建会话',\n 'status.running': '进行中',\n 'status.subagentsRunning.one': '{n} 个子智能体运行中',\n 'status.subagentsRunning.other': '{n} 个子智能体运行中',\n 'status.idle': '空闲',\n 'status.waitingApproval': '等待审批',\n 'status.planReview': '计划待审',\n 'status.waitingAnswer': '等待回答',\n 'status.compact.approval': '待审批',\n 'status.compact.planReview': '计划待审',\n 'status.compact.answer': '待回答',\n 'status.completed': '已完成',\n 'hover.created': '创建于 {time}',\n 'hover.copied': '已复制',\n 'date.ymd': '{y}年{m}月{d}日',\n 'time.now': '刚刚',\n 'time.minutes': '{n}分钟',\n 'time.hours': '{n}小时',\n 'time.days': '{n}天',\n 'time.months': '{n}个月',\n 'time.years': '{n}年',\n 'time.ago': '{t}前',\n 'attention.section.allSessions': '全部会话',\n 'attention.section.allWorkspaces': '全部工作区',\n 'attention.section.pinned': '置顶',\n 'attention.section.running': '运行中',\n 'attention.section.unread': '未读',\n} satisfies Record<string, string>\n\n/** The workspace namespace key union. */\nexport type WorkspaceKey = keyof typeof zh\n\n/** English dictionary, checked complete against the zh key set. */\nexport const en = {\n 'defaultWorkspace.failed': 'Unable to create default workspace. Use Choose workspace to select a folder.',\n 'draft.workspaceRequired': 'Choose a workspace first.',\n 'draft.initializationFailed': 'Could not fill the draft. Please try again shortly.',\n 'group.ungrouped': 'Ungrouped',\n 'group.running': 'A session is running',\n 'group.completed': 'A session finished and is unread',\n 'session.new': 'New Session',\n 'session.untitled': 'Untitled',\n 'shortcut.noSession': 'Select a session first',\n 'shortcut.noPicker': 'Directory picker unavailable',\n 'shortcut.directoryBusy': 'Selecting or adding a workspace',\n 'shortcut.noCompletedTurn': 'This session has no completed turn',\n 'shortcut.forkFailed': 'Could not fork the session. Try again.',\n 'section.workspaces': 'Workspaces',\n 'section.sessions': 'Sessions',\n 'viewOptions.label': 'View options',\n 'groupBy.label': 'Group by',\n 'groupBy.workspace': 'WorkSpace',\n 'groupBy.workspaceTree': 'Workspace Tree',\n 'groupBy.flat': 'In one list',\n 'orderBy.label': 'Order by',\n 'orderBy.manual': 'Manual',\n 'orderBy.updated': 'Last updated',\n 'filterBy.label': 'Filter sessions',\n 'viewOptions.hideArchived': 'Hide archived',\n 'viewOptions.showArchived': 'All conversations (show archived)',\n 'viewOptions.onlyArchived': 'Archived only',\n 'sessions.expand': 'Show {n} more sessions',\n 'sessions.collapse': 'Show less',\n 'empty.none': 'No sessions yet',\n 'empty.noneArchived': 'No archived sessions yet',\n 'empty.viewOthers': 'View other sessions',\n 'empty.noMatches': 'No matches',\n 'workspace.add': 'Add workspace',\n 'search.sessions.aria': 'Search sessions',\n 'search.placeholder': 'Search session names',\n 'search.clear': 'Clear search',\n 'search.results.aria': 'Search results',\n 'search.pending': 'Searching session history…',\n 'search.noMatches': 'No matching sessions',\n 'search.hasMore': 'Showing the first {n} results. Narrow your search.',\n 'menu.addWorkspace': 'Add workspace…',\n 'picker.loading': 'Loading workspaces…',\n 'conflict.named': 'A workspace named “{name}” already exists.',\n 'folderError.title': 'Couldn’t open folder',\n 'folderError.retry': 'Choose again',\n 'rename': 'Rename',\n 'rename.workspace.title': 'Rename workspace',\n 'rename.session.title': 'Rename session',\n 'field.workspaceName': 'Workspace name',\n 'field.sessionName': 'Session name',\n 'delete.workspace': 'Delete workspace',\n 'delete.desc': 'This removes “{name}” from the workspace list. The folder and session logs will be kept. Its sessions will appear under Ungrouped.',\n 'delete.pending': 'Deleting workspace…',\n 'menu.fork': 'Fork session',\n 'menu.archiveSession': 'Archive session',\n 'menu.unarchiveSession': 'Unarchive session',\n 'menu.pinSession': 'Pin session',\n 'menu.unpinSession': 'Unpin session',\n 'menu.sessionId': 'Copy Session ID',\n 'toast.sessionIdCopied': 'Session ID copied',\n 'toast.sessionIdCopyFailed': 'Copy failed. Try again.',\n 'row.archived': 'Archived',\n 'row.pinned': 'Pinned',\n 'toast.archivedNotOpenable': 'Archived sessions cannot be opened. Unarchive it to view.',\n 'toast.archived': 'Session archived. You can ',\n 'toast.stoppedAndArchived': 'Session stopped and archived. You can ',\n 'archive.confirm.title': 'Stop and archive this session?',\n 'archive.confirm.desc': '“{title}” still has work in progress. Archiving stops it first; you can restore the session later from the “All conversations (show archived)” filter in the sidebar, and the stopped work will not resume on its own.',\n 'archive.confirm.activity': 'Work that will be stopped',\n 'archive.confirm.turn': 'The turn in progress',\n 'archive.confirm.subagents.one': '{n} running subagent: {names}',\n 'archive.confirm.subagents.other': '{n} running subagents: {names}',\n 'archive.confirm.jobs.one': '{n} background job: {names}',\n 'archive.confirm.jobs.other': '{n} background jobs: {names}',\n 'archive.confirm.schedules.one': '{n} scheduled reminder: {names}',\n 'archive.confirm.schedules.other': '{n} scheduled reminders: {names}',\n 'archive.confirm.other.one': '{n} other item of work ({kind})',\n 'archive.confirm.other.other': '{n} other items of work ({kind})',\n 'archive.confirm.listSeparator': ', ',\n 'archive.confirm.action': 'Stop and archive',\n 'archive.confirm.pending': 'Stopping and archiving…',\n 'toast.archivedUndo': 'undo',\n 'toast.archivedOr': ' or ',\n 'toast.archivedFilter': 'filter archived sessions',\n 'toast.pinFailed': 'Pin failed. Try again later.',\n 'toast.unpinFailed': 'Unpin failed. Try again later.',\n 'toast.createFailed': 'New session failed: {message}',\n 'toast.forkRequiresOpen': 'Open the original session to complete migration before creating a branch.',\n 'toast.openForkSource': 'Open original session',\n 'sessions.count.one': '{n} session',\n 'sessions.count.other': '{n} sessions',\n 'actions.workspace.aria': 'Workspace actions for {name}',\n 'actions.session.aria': 'Session actions for {name}',\n 'actions.archive': 'Archive',\n 'actions.unarchive': 'Unarchive',\n 'actions.pin': 'Pin',\n 'actions.unpin': 'Unpin',\n 'actions.newSession': 'New session',\n 'actions.newSession.aria': 'New session in {name}',\n 'status.running': 'Running',\n 'status.subagentsRunning.one': '{n} subagent running',\n 'status.subagentsRunning.other': '{n} subagents running',\n 'status.idle': 'Idle',\n 'status.waitingApproval': 'Waiting for approval',\n 'status.planReview': 'Plan awaiting review',\n 'status.waitingAnswer': 'Waiting for answer',\n 'status.compact.approval': 'Approval',\n 'status.compact.planReview': 'Plan review',\n 'status.compact.answer': 'Answer',\n 'status.completed': 'Completed',\n 'hover.created': 'Created {time}',\n 'hover.copied': 'Copied',\n 'date.ymd': '{y}-{m}-{d}',\n 'time.now': 'now',\n 'time.minutes': '{n}min',\n 'time.hours': '{n}h',\n 'time.days': '{n}d',\n 'time.months': '{n}mo',\n 'time.years': '{n}y',\n 'time.ago': '{t} ago',\n 'attention.section.allSessions': 'All sessions',\n 'attention.section.allWorkspaces': 'All workspaces',\n 'attention.section.pinned': 'Pinned',\n 'attention.section.running': 'Running',\n 'attention.section.unread': 'Unread',\n} satisfies Record<WorkspaceKey, string>\n\n/** Japanese copy, checked against the English keys. */\nexport const ja = {\n 'defaultWorkspace.failed': 'デフォルトのワークスペースを作成できません。ワークスペースを選択してフォルダーを選んでください。',\n 'draft.workspaceRequired': '先にワークスペースを選択してください。',\n 'draft.initializationFailed': '下書きを埋め込めませんでした。しばらくしてからもう一度お試しください。',\n 'group.ungrouped': 'グループなし',\n 'group.running': 'セッションが実行中です',\n 'group.completed': '終了して未読のセッションがあります',\n 'session.new': '新しいセッション',\n 'session.untitled': '無題',\n 'shortcut.noSession': '先にセッションを選択してください',\n 'shortcut.noPicker': 'ディレクトリピッカーを利用できません',\n 'shortcut.directoryBusy': 'ワークスペースを選択または追加しています',\n 'shortcut.noCompletedTurn': 'このセッションには完了したターンがありません',\n 'shortcut.forkFailed': 'セッションをフォークできませんでした。もう一度お試しください。',\n 'section.workspaces': 'ワークスペース',\n 'section.sessions': 'セッション',\n 'viewOptions.label': '表示オプション',\n 'groupBy.label': 'グループ化',\n 'groupBy.workspace': 'ワークスペース',\n 'groupBy.workspaceTree': 'ワークスペースツリー',\n 'groupBy.flat': '1つのリスト',\n 'orderBy.label': '並び順',\n 'orderBy.manual': '手動',\n 'orderBy.updated': '最終更新',\n 'filterBy.label': 'セッションを絞り込む',\n 'viewOptions.hideArchived': 'アーカイブを非表示',\n 'viewOptions.showArchived': 'すべての会話(アーカイブを表示)',\n 'viewOptions.onlyArchived': 'アーカイブのみ',\n 'sessions.expand': 'さらに{n}件のセッションを表示',\n 'sessions.collapse': '折りたたむ',\n 'empty.none': 'セッションはまだありません',\n 'empty.noneArchived': 'アーカイブされたセッションはまだありません',\n 'empty.viewOthers': '他のセッションを表示',\n 'empty.noMatches': '一致なし',\n 'workspace.add': 'ワークスペースを追加',\n 'search.sessions.aria': 'セッションを検索',\n 'search.placeholder': 'セッション名を検索',\n 'search.clear': '検索をクリア',\n 'search.results.aria': '検索結果',\n 'search.pending': 'セッション履歴を検索中…',\n 'search.noMatches': '一致するセッションはありません',\n 'search.hasMore': '最初の{n}件の結果を表示しています。検索を絞り込んでください。',\n 'menu.addWorkspace': 'ワークスペースを追加…',\n 'picker.loading': 'ワークスペースを読み込み中…',\n 'conflict.named': '「{name}」という名前のワークスペースは既に存在します。',\n 'folderError.title': 'フォルダーを開けませんでした',\n 'folderError.retry': '選び直す',\n 'rename': '名前を変更',\n 'rename.workspace.title': 'ワークスペース名を変更',\n 'rename.session.title': 'セッション名を変更',\n 'field.workspaceName': 'ワークスペース名',\n 'field.sessionName': 'セッション名',\n 'delete.workspace': 'ワークスペースを削除',\n 'delete.desc': '「{name}」をワークスペース一覧から削除します。フォルダとセッションログは保持されます。このワークスペースのセッションは「未分類」に表示されます。',\n 'delete.pending': 'ワークスペースを削除中…',\n 'menu.fork': 'セッションをフォーク',\n 'menu.archiveSession': 'セッションをアーカイブ',\n 'menu.unarchiveSession': 'セッションのアーカイブを解除',\n 'menu.pinSession': 'セッションをピン留め',\n 'menu.unpinSession': 'セッションのピン留めを解除',\n 'menu.sessionId': 'セッションIDをコピー',\n 'toast.sessionIdCopied': 'セッションIDをコピーしました',\n 'toast.sessionIdCopyFailed': 'コピーに失敗しました。もう一度お試しください。',\n 'row.archived': 'アーカイブ済み',\n 'row.pinned': 'ピン留め済み',\n 'toast.archivedNotOpenable': 'アーカイブ済みセッションは開けません。アーカイブを解除して表示してください。',\n 'toast.archived': 'セッションをアーカイブしました。',\n 'toast.stoppedAndArchived': 'セッションを停止してアーカイブしました。',\n 'archive.confirm.title': 'このセッションを停止してアーカイブしますか?',\n 'archive.confirm.desc': '「{title}」には進行中の作業があります。アーカイブするとまず停止されます。セッションは後からサイドバーの「すべての会話(アーカイブを表示)」フィルターで復元できますが、停止された作業は自動的に再開されません。',\n 'archive.confirm.activity': '停止される作業',\n 'archive.confirm.turn': '進行中のターン',\n 'archive.confirm.subagents.one': '実行中のサブエージェント {n} 件: {names}',\n 'archive.confirm.subagents.other': '実行中のサブエージェント {n} 件: {names}',\n 'archive.confirm.jobs.one': 'バックグラウンドジョブ {n} 件: {names}',\n 'archive.confirm.jobs.other': 'バックグラウンドジョブ {n} 件: {names}',\n 'archive.confirm.schedules.one': 'スケジュールされたリマインダー {n} 件: {names}',\n 'archive.confirm.schedules.other': 'スケジュールされたリマインダー {n} 件: {names}',\n 'archive.confirm.other.one': 'その他の作業 {n} 件({kind})',\n 'archive.confirm.other.other': 'その他の作業 {n} 件({kind})',\n 'archive.confirm.listSeparator': '、',\n 'archive.confirm.action': '停止してアーカイブ',\n 'archive.confirm.pending': '停止してアーカイブ中…',\n 'toast.archivedUndo': '元に戻す',\n 'toast.archivedOr': ' または ',\n 'toast.archivedFilter': 'アーカイブ済みセッションを絞り込む',\n 'toast.pinFailed': 'ピン留めに失敗しました。後でもう一度お試しください。',\n 'toast.unpinFailed': 'ピン留めの解除に失敗しました。後でもう一度お試しください。',\n 'toast.createFailed': '新しいセッションの作成に失敗しました: {message}',\n 'toast.forkRequiresOpen': 'ブランチを作成する前に、移行を完了するため元のセッションを開いてください。',\n 'toast.openForkSource': '元のセッションを開く',\n 'sessions.count.one': 'セッション {n} 件',\n 'sessions.count.other': 'セッション {n} 件',\n 'actions.workspace.aria': '{name} のワークスペース操作',\n 'actions.session.aria': '{name} のセッション操作',\n 'actions.archive': 'アーカイブ',\n 'actions.unarchive': 'アーカイブを解除',\n 'actions.pin': 'ピン留め',\n 'actions.unpin': 'ピン留めを解除',\n 'actions.newSession': '新しいセッション',\n 'actions.newSession.aria': '{name} で新しいセッション',\n 'status.running': '実行中',\n 'status.subagentsRunning.one': 'サブエージェント {n} 件が実行中',\n 'status.subagentsRunning.other': 'サブエージェント {n} 件が実行中',\n 'status.idle': '待機中',\n 'status.waitingApproval': '承認待ち',\n 'status.planReview': '計画のレビュー待ち',\n 'status.waitingAnswer': '回答待ち',\n 'status.compact.approval': '承認',\n 'status.compact.planReview': '計画レビュー',\n 'status.compact.answer': '回答',\n 'status.completed': '完了',\n 'hover.created': '作成日時 {time}',\n 'hover.copied': 'コピーしました',\n 'date.ymd': '{y}-{m}-{d}',\n 'time.now': '今',\n 'time.minutes': '{n}分',\n 'time.hours': '{n}時間',\n 'time.days': '{n}日',\n 'time.months': '{n}か月',\n 'time.years': '{n}年',\n 'time.ago': '{t}前',\n 'attention.section.allSessions': 'すべてのセッション',\n 'attention.section.allWorkspaces': 'すべてのワークスペース',\n 'attention.section.pinned': 'ピン留め',\n 'attention.section.running': '実行中',\n 'attention.section.unread': '未読',\n} satisfies Record<keyof typeof en, string>\n\n/** Spanish dictionary, checked against the English keys. */\nexport const es = {\n 'defaultWorkspace.failed': 'No se puede crear el espacio de trabajo predeterminado. Utilice Elegir espacio de trabajo para seleccionar una carpeta.',\n 'draft.workspaceRequired': 'Elija un espacio de trabajo primero.',\n 'draft.initializationFailed': 'No se pudo completar el borrador. Inténtelo de nuevo en breve.',\n 'group.ungrouped': 'Desagrupados',\n 'group.running': 'Hay una sesión en ejecución',\n 'group.completed': 'Una sesión terminó y no se ha leído',\n 'session.new': 'Nueva sesión',\n 'session.untitled': 'Sin título',\n 'shortcut.noSession': 'Seleccione una sesión primero',\n 'shortcut.noPicker': 'Selector de directorio no disponible',\n 'shortcut.directoryBusy': 'Seleccionar o agregar un espacio de trabajo',\n 'shortcut.noCompletedTurn': 'Esta sesión no tiene turno completo',\n 'shortcut.forkFailed': 'No se pudo bifurcar la sesión. Intentar otra vez.',\n 'section.workspaces': 'Espacios de trabajo',\n 'section.sessions': 'Sesiones',\n 'viewOptions.label': 'Ver opciones',\n 'groupBy.label': 'Agrupar por',\n 'groupBy.workspace': 'Espacio de trabajo',\n 'groupBy.workspaceTree': 'Árbol del espacio de trabajo',\n 'groupBy.flat': 'en una lista',\n 'orderBy.label': 'Ordenar por',\n 'orderBy.manual': 'manuales',\n 'orderBy.updated': 'Última actualización',\n 'filterBy.label': 'Filtrar sesiones',\n 'viewOptions.hideArchived': 'Ocultar archivado',\n 'viewOptions.showArchived': 'Todas las conversaciones (mostrar archivadas)',\n 'viewOptions.onlyArchived': 'Sólo archivado',\n 'sessions.expand': 'Mostrar {n} más sesiones',\n 'sessions.collapse': 'Mostrar menos',\n 'empty.none': 'Aún no hay sesiones',\n 'empty.noneArchived': 'Aún no hay sesiones archivadas',\n 'empty.viewOthers': 'Ver otras sesiones',\n 'empty.noMatches': 'No hay coincidencias',\n 'workspace.add': 'Agregar espacio de trabajo',\n 'search.sessions.aria': 'Buscar sesiones',\n 'search.placeholder': 'Buscar nombres de sesiones',\n 'search.clear': 'Borrar búsqueda',\n 'search.results.aria': 'Resultados de la búsqueda',\n 'search.pending': 'Buscando el historial de sesiones…',\n 'search.noMatches': 'No hay sesiones coincidentes',\n 'search.hasMore': 'Mostrando los primeros resultados de {n}. Limita tu búsqueda.',\n 'menu.addWorkspace': 'Agregar espacio de trabajo…',\n 'picker.loading': 'Cargando espacios de trabajo…',\n 'conflict.named': 'Ya existe un espacio de trabajo denominado \"{name}\".',\n 'folderError.title': 'No se pudo abrir la carpeta',\n 'folderError.retry': 'Elige de nuevo',\n 'rename': 'Cambiar nombre',\n 'rename.workspace.title': 'Cambiar nombre del espacio de trabajo',\n 'rename.session.title': 'Cambiar nombre de sesión',\n 'field.workspaceName': 'Nombre del espacio de trabajo',\n 'field.sessionName': 'Nombre de la sesión',\n 'delete.workspace': 'Eliminar espacio de trabajo',\n 'delete.desc': 'Esto elimina \"{name}\" de la lista de espacios de trabajo. Se conservarán los registros de carpetas y sesiones. Sus sesiones aparecerán en Desagrupadas.',\n 'delete.pending': 'Eliminando espacio de trabajo…',\n 'menu.fork': 'Crear una bifurcación de la sesión',\n 'menu.archiveSession': 'Sesión de archivo',\n 'menu.unarchiveSession': 'Desarchivar sesión',\n 'menu.pinSession': 'Fijar sesión',\n 'menu.unpinSession': 'Desfijar sesión',\n 'menu.sessionId': 'Copiar ID de sesión',\n 'toast.sessionIdCopied': 'ID de sesión copiada',\n 'toast.sessionIdCopyFailed': 'La copia falló. Intentar otra vez.',\n 'row.archived': 'Archivado',\n 'row.pinned': 'Fijado',\n 'toast.archivedNotOpenable': 'Las sesiones archivadas no se pueden abrir. Desarchivarlo para verlo.',\n 'toast.archived': 'Sesión archivada. tu puedes ',\n 'toast.stoppedAndArchived': 'Sesión detenida y archivada. tu puedes ',\n 'archive.confirm.title': '¿Detener y archivar esta sesión?',\n 'archive.confirm.desc': '“{title}” todavía tiene trabajo en progreso. Archivarlo lo detiene primero; puedes restaurar la sesión más tarde desde el filtro “Todas las conversaciones (mostrar archivadas)” en la barra lateral, y el trabajo detenido no se reanudará por sí solo.',\n 'archive.confirm.activity': 'Trabajo que será detenido',\n 'archive.confirm.turn': 'El turno en curso',\n 'archive.confirm.subagents.one': '{n} ejecutando subagente: {names}',\n 'archive.confirm.subagents.other': '{n} ejecutando subagentes: {names}',\n 'archive.confirm.jobs.one': 'Trabajo en segundo plano {n}: {names}',\n 'archive.confirm.jobs.other': 'Trabajos en segundo plano {n}: {names}',\n 'archive.confirm.schedules.one': 'Recordatorio programado {n}: {names}',\n 'archive.confirm.schedules.other': '{n} recordatorios programados: {names}',\n 'archive.confirm.other.one': '{n} otro elemento de trabajo ({kind})',\n 'archive.confirm.other.other': '{n} otros elementos de trabajo ({kind})',\n 'archive.confirm.listSeparator': ', ',\n 'archive.confirm.action': 'Detener y archivar',\n 'archive.confirm.pending': 'Deteniendo y archivando…',\n 'toast.archivedUndo': 'deshacer',\n 'toast.archivedOr': ' o ',\n 'toast.archivedFilter': 'filtrar sesiones archivadas',\n 'toast.pinFailed': 'No se pudo fijar. Inténtalo de nuevo más tarde.',\n 'toast.unpinFailed': 'No se pudo desfijar. Inténtalo de nuevo más tarde.',\n 'toast.createFailed': 'Nueva sesión falló: {message}',\n 'toast.forkRequiresOpen': 'Abra la sesión original para completar la migración antes de crear una rama.',\n 'toast.openForkSource': 'Abrir sesión original',\n 'sessions.count.one': 'Sesión {n}',\n 'sessions.count.other': 'Sesiones {n}',\n 'actions.workspace.aria': 'Acciones del espacio de trabajo para {name}',\n 'actions.session.aria': 'Acciones de sesión para {name}',\n 'actions.archive': 'Archivo',\n 'actions.unarchive': 'Desarchivar',\n 'actions.pin': 'Fijar',\n 'actions.unpin': 'Desfijar',\n 'actions.newSession': 'Nueva sesión',\n 'actions.newSession.aria': 'Nueva sesión en {name}',\n 'status.running': 'corriendo',\n 'status.subagentsRunning.one': 'Subagente {n} ejecutándose',\n 'status.subagentsRunning.other': 'Subagentes {n} ejecutándose',\n 'status.idle': 'inactivo',\n 'status.waitingApproval': 'Esperando aprobación',\n 'status.planReview': 'Plan pendiente de revisión',\n 'status.waitingAnswer': 'esperando respuesta',\n 'status.compact.approval': 'Aprobación',\n 'status.compact.planReview': 'Revisión del plan',\n 'status.compact.answer': 'respuesta',\n 'status.completed': 'Completado',\n 'hover.created': 'Creado {time}',\n 'hover.copied': 'Copiado',\n 'date.ymd': '{y}-{m}-{d}',\n 'time.now': 'ahora',\n 'time.minutes': '{n}min',\n 'time.hours': '{n}h',\n 'time.days': '{n}d',\n 'time.months': '{n}mo',\n 'time.years': '{n}y',\n 'time.ago': 'Hace {t}',\n 'attention.section.allSessions': 'Todas las sesiones',\n 'attention.section.allWorkspaces': 'Todos los espacios de trabajo',\n 'attention.section.pinned': 'Fijados',\n 'attention.section.running': 'En ejecución',\n 'attention.section.unread': 'Sin leer',\n} satisfies Record<keyof typeof en, string>\n\n/** French dictionary, checked against the English keys. */\nexport const fr = {\n 'defaultWorkspace.failed': 'Impossible de créer un espace de travail par défaut. Utilisez Choisir un espace de travail pour sélectionner un dossier.',\n 'draft.workspaceRequired': \"Choisissez d'abord un espace de travail.\",\n 'draft.initializationFailed': 'Impossible de remplir le projet. Veuillez réessayer sous peu.',\n 'group.ungrouped': 'Non groupé',\n 'group.running': 'Une session est en cours',\n 'group.completed': 'Une session est terminée et non lue',\n 'session.new': 'Nouvelle séance',\n 'session.untitled': 'Sans titre',\n 'shortcut.noSession': \"Sélectionnez d'abord une session\",\n 'shortcut.noPicker': 'Sélecteur de répertoire indisponible',\n 'shortcut.directoryBusy': \"Sélection ou ajout d'un espace de travail\",\n 'shortcut.noCompletedTurn': \"Cette session n'a pas de tour terminé\",\n 'shortcut.forkFailed': 'Impossible de bifurquer la session. Essayer à nouveau.',\n 'section.workspaces': 'Espaces de travail',\n 'section.sessions': 'Séances',\n 'viewOptions.label': 'Afficher les options',\n 'groupBy.label': 'Regrouper par',\n 'groupBy.workspace': 'Espace de travail',\n 'groupBy.workspaceTree': \"Arborescence de l'espace de travail\",\n 'groupBy.flat': 'Dans une liste',\n 'orderBy.label': 'Commander par',\n 'orderBy.manual': 'Manuel',\n 'orderBy.updated': 'Dernière mise à jour',\n 'filterBy.label': 'Filtrer les sessions',\n 'viewOptions.hideArchived': 'Masquer les archives',\n 'viewOptions.showArchived': 'Toutes les conversations (afficher les archives)',\n 'viewOptions.onlyArchived': 'Archivé uniquement',\n 'sessions.expand': 'Afficher {n} plus de sessions',\n 'sessions.collapse': 'Afficher moins',\n 'empty.none': \"Aucune séance pour l'instant\",\n 'empty.noneArchived': \"Aucune session archivée pour l'instant\",\n 'empty.viewOthers': 'Voir les autres séances',\n 'empty.noMatches': 'Aucune correspondance',\n 'workspace.add': 'Ajouter un espace de travail',\n 'search.sessions.aria': 'Rechercher des sessions',\n 'search.placeholder': 'Rechercher des noms de sessions',\n 'search.clear': 'Effacer la recherche',\n 'search.results.aria': 'Résultats de la recherche',\n 'search.pending': \"Recherche dans l'historique des sessions…\",\n 'search.noMatches': 'Aucune session correspondante',\n 'search.hasMore': 'Affichage des premiers résultats {n}. Affinez votre recherche.',\n 'menu.addWorkspace': 'Ajouter un espace de travail…',\n 'picker.loading': 'Chargement des espaces de travail…',\n 'conflict.named': 'Un espace de travail nommé « {name} » existe déjà.',\n 'folderError.title': \"Impossible d'ouvrir le dossier\",\n 'folderError.retry': 'Choisir à nouveau',\n 'rename': 'Renommer',\n 'rename.workspace.title': \"Renommer l'espace de travail\",\n 'rename.session.title': 'Renommer la session',\n 'field.workspaceName': \"Nom de l'espace de travail\",\n 'field.sessionName': 'Nom de la séance',\n 'delete.workspace': \"Supprimer l'espace de travail\",\n 'delete.desc': 'Cela supprime « {name} » de la liste des espaces de travail. Les journaux de dossiers et de sessions seront conservés. Ses sessions apparaîtront sous Non groupées.',\n 'delete.pending': \"Suppression de l'espace de travail…\",\n 'menu.fork': 'Créer une branche de la session',\n 'menu.archiveSession': \"Séance d'archivage\",\n 'menu.unarchiveSession': 'Session de désarchivage',\n 'menu.pinSession': 'Épingler la session',\n 'menu.unpinSession': 'Désépingler la session',\n 'menu.sessionId': \"Copier l'ID de session\",\n 'toast.sessionIdCopied': 'ID de session copié',\n 'toast.sessionIdCopyFailed': 'La copie a échoué. Essayer à nouveau.',\n 'row.archived': 'Archivé',\n 'row.pinned': 'Épinglé',\n 'toast.archivedNotOpenable': 'Les sessions archivées ne peuvent pas être ouvertes. Désarchivez-le pour le visualiser.',\n 'toast.archived': 'Séance archivée. Vous pouvez ',\n 'toast.stoppedAndArchived': 'Session arrêtée et archivée. Vous pouvez ',\n 'archive.confirm.title': 'Arrêter et archiver cette session ?',\n 'archive.confirm.desc': \"« {title} » a encore des travaux en cours. L'archivage l'arrête en premier ; vous pouvez restaurer la session plus tard à partir du filtre « Toutes les conversations (afficher les archives) » dans la barre latérale, et le travail arrêté ne reprendra pas de lui-même.\",\n 'archive.confirm.activity': 'Travaux qui seront arrêtés',\n 'archive.confirm.turn': 'Le tour en cours',\n 'archive.confirm.subagents.one': \"Sous-agent en cours d'exécution {n} : {names}\",\n 'archive.confirm.subagents.other': '{n} exécutant des sous-agents : {names}',\n 'archive.confirm.jobs.one': 'Travail en arrière-plan {n} : {names}',\n 'archive.confirm.jobs.other': 'Travaux en arrière-plan {n} : {names}',\n 'archive.confirm.schedules.one': 'Rappel programmé {n} : {names}',\n 'archive.confirm.schedules.other': 'Rappels programmés {n} : {names}',\n 'archive.confirm.other.one': '{n} autre élément de travail ({kind})',\n 'archive.confirm.other.other': '{n} autres éléments de travail ({kind})',\n 'archive.confirm.listSeparator': ', ',\n 'archive.confirm.action': 'Arrêter et archiver',\n 'archive.confirm.pending': 'Arrêt et archivage…',\n 'toast.archivedUndo': 'annuler',\n 'toast.archivedOr': ' ou ',\n 'toast.archivedFilter': 'filtrer les sessions archivées',\n 'toast.pinFailed': 'L’épinglage a échoué. Réessayez plus tard.',\n 'toast.unpinFailed': 'Impossible de désépingler. Réessayez plus tard.',\n 'toast.createFailed': 'Échec de la nouvelle session : {message}',\n 'toast.forkRequiresOpen': \"Ouvrez la session d'origine pour terminer la migration avant de créer une branche.\",\n 'toast.openForkSource': 'Ouvrir la session originale',\n 'sessions.count.one': 'Séance {n}',\n 'sessions.count.other': 'Séances {n}',\n 'actions.workspace.aria': \"Actions de l'espace de travail pour {name}\",\n 'actions.session.aria': 'Actions de session pour {name}',\n 'actions.archive': 'Archiver',\n 'actions.unarchive': 'Désarchiver',\n 'actions.pin': 'Épingler',\n 'actions.unpin': 'Désépingler',\n 'actions.newSession': 'Nouvelle séance',\n 'actions.newSession.aria': 'Nouvelle séance dans {name}',\n 'status.running': 'Courir',\n 'status.subagentsRunning.one': \"Sous-agent {n} en cours d'exécution\",\n 'status.subagentsRunning.other': \"Sous-agents {n} en cours d'exécution\",\n 'status.idle': 'Inactif',\n 'status.waitingApproval': \"En attente d'approbation\",\n 'status.planReview': \"Plan en attente d'examen\",\n 'status.waitingAnswer': 'En attente de réponse',\n 'status.compact.approval': 'Approbation',\n 'status.compact.planReview': 'Révision des plans',\n 'status.compact.answer': 'Réponse',\n 'status.completed': 'Terminé',\n 'hover.created': 'Créé {time}',\n 'hover.copied': 'Copié',\n 'date.ymd': '{y}-{m}-{d}',\n 'time.now': 'maintenant',\n 'time.minutes': '{n}min',\n 'time.hours': '{n}h',\n 'time.days': '{n}d',\n 'time.months': '{n}mo',\n 'time.years': '{n}y',\n 'time.ago': 'Il y a {t}',\n 'attention.section.allSessions': 'Toutes les sessions',\n 'attention.section.allWorkspaces': 'Tous les espaces de travail',\n 'attention.section.pinned': 'Épinglés',\n 'attention.section.running': 'En cours',\n 'attention.section.unread': 'Non lues',\n} satisfies Record<keyof typeof en, string>\n\n/** German dictionary, checked against the English keys. */\nexport const de = {\n 'defaultWorkspace.failed': 'Der Standardarbeitsbereich kann nicht erstellt werden. Verwenden Sie „Arbeitsbereich auswählen“, um einen Ordner auszuwählen.',\n 'draft.workspaceRequired': 'Wählen Sie zunächst einen Arbeitsbereich.',\n 'draft.initializationFailed': 'Der Entwurf konnte nicht ausgefüllt werden. Bitte versuchen Sie es in Kürze noch einmal.',\n 'group.ungrouped': 'Nicht gruppiert',\n 'group.running': 'Eine Sitzung läuft',\n 'group.completed': 'Eine Sitzung ist beendet und ungelesen',\n 'session.new': 'Neue Sitzung',\n 'session.untitled': 'Ohne Titel',\n 'shortcut.noSession': 'Wählen Sie zunächst eine Sitzung aus',\n 'shortcut.noPicker': 'Verzeichnisauswahl nicht verfügbar',\n 'shortcut.directoryBusy': 'Auswählen oder Hinzufügen eines Arbeitsbereichs',\n 'shortcut.noCompletedTurn': 'Diese Sitzung hat keine abgeschlossene Runde',\n 'shortcut.forkFailed': 'Die Sitzung konnte nicht aufgeteilt werden. Versuchen Sie es erneut.',\n 'section.workspaces': 'Arbeitsbereiche',\n 'section.sessions': 'Sitzungen',\n 'viewOptions.label': 'Optionen anzeigen',\n 'groupBy.label': 'Gruppieren nach',\n 'groupBy.workspace': 'WorkSpace',\n 'groupBy.workspaceTree': 'Arbeitsbereichsbaum',\n 'groupBy.flat': 'In einer Liste',\n 'orderBy.label': 'Bestellen nach',\n 'orderBy.manual': 'Handbuch',\n 'orderBy.updated': 'Zuletzt aktualisiert',\n 'filterBy.label': 'Sitzungen filtern',\n 'viewOptions.hideArchived': 'Archiviert ausblenden',\n 'viewOptions.showArchived': 'Alle Gespräche (archiviert anzeigen)',\n 'viewOptions.onlyArchived': 'Nur archiviert',\n 'sessions.expand': 'Weitere Sitzungen anzeigen {n}',\n 'sessions.collapse': 'Weniger anzeigen',\n 'empty.none': 'Noch keine Sitzungen',\n 'empty.noneArchived': 'Noch keine archivierten Sitzungen',\n 'empty.viewOthers': 'Andere Sitzungen anzeigen',\n 'empty.noMatches': 'Keine Übereinstimmungen',\n 'workspace.add': 'Arbeitsbereich hinzufügen',\n 'search.sessions.aria': 'Sitzungen suchen',\n 'search.placeholder': 'Suchen Sie nach Sitzungsnamen',\n 'search.clear': 'Suche löschen',\n 'search.results.aria': 'Suchergebnisse',\n 'search.pending': 'Sitzungsverlauf wird durchsucht…',\n 'search.noMatches': 'Keine passenden Sitzungen',\n 'search.hasMore': 'Zeigt die ersten {n}-Ergebnisse. Grenzen Sie Ihre Suche ein.',\n 'menu.addWorkspace': 'Arbeitsbereich hinzufügen…',\n 'picker.loading': 'Arbeitsbereiche werden geladen…',\n 'conflict.named': 'Ein Arbeitsbereich mit dem Namen „{name}“ ist bereits vorhanden.',\n 'folderError.title': 'Der Ordner konnte nicht geöffnet werden',\n 'folderError.retry': 'Wählen Sie erneut',\n 'rename': 'Umbenennen',\n 'rename.workspace.title': 'Arbeitsbereich umbenennen',\n 'rename.session.title': 'Sitzung umbenennen',\n 'field.workspaceName': 'Name des Arbeitsbereichs',\n 'field.sessionName': 'Sitzungsname',\n 'delete.workspace': 'Arbeitsbereich löschen',\n 'delete.desc': 'Dadurch wird „{name}“ aus der Arbeitsbereichsliste entfernt. Die Ordner- und Sitzungsprotokolle werden aufbewahrt. Seine Sitzungen werden unter „Nicht gruppiert“ angezeigt.',\n 'delete.pending': 'Arbeitsbereich wird gelöscht…',\n 'menu.fork': 'Sitzung abzweigen',\n 'menu.archiveSession': 'Archivsitzung',\n 'menu.unarchiveSession': 'Sitzung dearchivieren',\n 'menu.pinSession': 'Sitzung anheften',\n 'menu.unpinSession': 'Sitzung lösen',\n 'menu.sessionId': 'Sitzungs-ID kopieren',\n 'toast.sessionIdCopied': 'Sitzungs-ID kopiert',\n 'toast.sessionIdCopyFailed': 'Der Kopiervorgang ist fehlgeschlagen. Versuchen Sie es erneut.',\n 'row.archived': 'Archiviert',\n 'row.pinned': 'Angepinnt',\n 'toast.archivedNotOpenable': 'Archivierte Sitzungen können nicht geöffnet werden. Entpacken Sie es zur Ansicht.',\n 'toast.archived': 'Sitzung archiviert. Du kannst ',\n 'toast.stoppedAndArchived': 'Sitzung gestoppt und archiviert. Du kannst ',\n 'archive.confirm.title': 'Diese Sitzung stoppen und archivieren?',\n 'archive.confirm.desc': '„{title}“ ist noch in Arbeit. Die Archivierung stoppt es zunächst; Sie können die Sitzung später über den Filter „Alle Konversationen (archivierte anzeigen)“ in der Seitenleiste wiederherstellen, und die angehaltene Arbeit wird nicht von alleine fortgesetzt.',\n 'archive.confirm.activity': 'Arbeiten, die gestoppt werden',\n 'archive.confirm.turn': 'Die laufende Runde',\n 'archive.confirm.subagents.one': '{n}, laufender Subagent: {names}',\n 'archive.confirm.subagents.other': '{n}, auf dem Subagenten ausgeführt werden: {names}',\n 'archive.confirm.jobs.one': '{n} Hintergrundjob: {names}',\n 'archive.confirm.jobs.other': '{n} Hintergrundjobs: {names}',\n 'archive.confirm.schedules.one': '{n} geplante Erinnerung: {names}',\n 'archive.confirm.schedules.other': '{n} geplante Erinnerungen: {names}',\n 'archive.confirm.other.one': '{n} sonstiger Arbeitsgegenstand ({kind})',\n 'archive.confirm.other.other': '{n} sonstige Arbeiten ({kind})',\n 'archive.confirm.listSeparator': ', ',\n 'archive.confirm.action': 'Stoppen und archivieren',\n 'archive.confirm.pending': 'Stoppen und archivieren…',\n 'toast.archivedUndo': 'rückgängig machen',\n 'toast.archivedOr': ' oder ',\n 'toast.archivedFilter': 'Archivierte Sitzungen filtern',\n 'toast.pinFailed': 'Anheften fehlgeschlagen. Versuchen Sie es später erneut.',\n 'toast.unpinFailed': 'Lösen fehlgeschlagen. Versuchen Sie es später erneut.',\n 'toast.createFailed': 'Neue Sitzung fehlgeschlagen: {message}',\n 'toast.forkRequiresOpen': 'Öffnen Sie die ursprüngliche Sitzung, um die Migration abzuschließen, bevor Sie einen Zweig erstellen.',\n 'toast.openForkSource': 'Öffnen Sie die ursprüngliche Sitzung',\n 'sessions.count.one': '{n}-Sitzung',\n 'sessions.count.other': '{n}-Sitzungen',\n 'actions.workspace.aria': 'Arbeitsbereichsaktionen für {name}',\n 'actions.session.aria': 'Sitzungsaktionen für {name}',\n 'actions.archive': 'Archiv',\n 'actions.unarchive': 'Dearchivieren',\n 'actions.pin': 'Anheften',\n 'actions.unpin': 'Lösen',\n 'actions.newSession': 'Neue Sitzung',\n 'actions.newSession.aria': 'Neue Sitzung in {name}',\n 'status.running': 'Laufen',\n 'status.subagentsRunning.one': '{n}-Subagent läuft',\n 'status.subagentsRunning.other': '{n} Subagenten laufen',\n 'status.idle': 'Leerlauf',\n 'status.waitingApproval': 'Warten auf Genehmigung',\n 'status.planReview': 'Plan wartet auf Überprüfung',\n 'status.waitingAnswer': 'Warte auf Antwort',\n 'status.compact.approval': 'Zustimmung',\n 'status.compact.planReview': 'Planüberprüfung',\n 'status.compact.answer': 'Antwort',\n 'status.completed': 'Abgeschlossen',\n 'hover.created': 'Erstellt {time}',\n 'hover.copied': 'Kopiert',\n 'date.ymd': '{y}-{m}-{d}',\n 'time.now': 'jetzt',\n 'time.minutes': '{n}min',\n 'time.hours': '{n}h',\n 'time.days': '{n}d',\n 'time.months': '{n}mo',\n 'time.years': '{n}y',\n 'time.ago': 'Vor {t}',\n 'attention.section.allSessions': 'Alle Sitzungen',\n 'attention.section.allWorkspaces': 'Alle Arbeitsbereiche',\n 'attention.section.pinned': 'Angeheftet',\n 'attention.section.running': 'Läuft',\n 'attention.section.unread': 'Ungelesen',\n} satisfies Record<keyof typeof en, string>\n\n/** Russian dictionary, checked against the English keys. */\nexport const ru = {\n 'defaultWorkspace.failed': 'Невозможно создать рабочую область по умолчанию. Используйте «Выбрать рабочее пространство», чтобы выбрать папку.',\n 'draft.workspaceRequired': 'Сначала выберите рабочее место.',\n 'draft.initializationFailed': 'Не удалось заполнить черновик. Пожалуйста, повторите попытку в ближайшее время.',\n 'group.ungrouped': 'Разгруппировано',\n 'group.running': 'Есть выполняющаяся сессия',\n 'group.completed': 'Сессия завершилась, но не прочитана',\n 'session.new': 'Новая сессия',\n 'session.untitled': 'Без названия',\n 'shortcut.noSession': 'Сначала выберите сеанс',\n 'shortcut.noPicker': 'Выбор каталога недоступен.',\n 'shortcut.directoryBusy': 'Выбор или добавление рабочего пространства',\n 'shortcut.noCompletedTurn': 'В этой сессии нет завершенных ходов',\n 'shortcut.forkFailed': 'Не удалось разветвить сеанс. Попробуйте еще раз.',\n 'section.workspaces': 'Рабочие пространства',\n 'section.sessions': 'Сессии',\n 'viewOptions.label': 'Посмотреть варианты',\n 'groupBy.label': 'Группировать по',\n 'groupBy.workspace': 'Рабочее пространство',\n 'groupBy.workspaceTree': 'Дерево рабочей области',\n 'groupBy.flat': 'В одном списке',\n 'orderBy.label': 'Заказать по',\n 'orderBy.manual': 'Руководство',\n 'orderBy.updated': 'Последнее обновление',\n 'filterBy.label': 'Фильтровать сеансы',\n 'viewOptions.hideArchived': 'Скрыть в архиве',\n 'viewOptions.showArchived': 'Все разговоры (показать в архиве)',\n 'viewOptions.onlyArchived': 'Только в архиве',\n 'sessions.expand': 'Показать больше сеансов {n}',\n 'sessions.collapse': 'Показать меньше',\n 'empty.none': 'Сеансов пока нет',\n 'empty.noneArchived': 'Архивированных сессий пока нет',\n 'empty.viewOthers': 'Посмотреть другие сессии',\n 'empty.noMatches': 'Нет совпадений',\n 'workspace.add': 'Добавить рабочую область',\n 'search.sessions.aria': 'Поиск сеансов',\n 'search.placeholder': 'Поиск названий сеансов',\n 'search.clear': 'Очистить поиск',\n 'search.results.aria': 'Результаты поиска',\n 'search.pending': 'Поиск истории сеансов…',\n 'search.noMatches': 'Нет подходящих сеансов',\n 'search.hasMore': 'Показаны первые результаты {n}. Сузьте область поиска.',\n 'menu.addWorkspace': 'Добавить рабочее пространство…',\n 'picker.loading': 'Загрузка рабочих областей…',\n 'conflict.named': 'Рабочая область с именем «{name}» уже существует.',\n 'folderError.title': 'Не удалось открыть папку',\n 'folderError.retry': 'Выбрать еще раз',\n 'rename': 'Переименовать',\n 'rename.workspace.title': 'Переименовать рабочую область',\n 'rename.session.title': 'Переименовать сеанс',\n 'field.workspaceName': 'Имя рабочей области',\n 'field.sessionName': 'Имя сеанса',\n 'delete.workspace': 'Удалить рабочую область',\n 'delete.desc': 'Это удалит «{name}» из списка рабочей области. Журналы папок и сеансов будут сохранены. Его сеансы появятся в разделе «Разгруппировано».',\n 'delete.pending': 'Удаление рабочей области…',\n 'menu.fork': 'Создать ответвление сеанса',\n 'menu.archiveSession': 'Архив сеанса',\n 'menu.unarchiveSession': 'Разархивировать сеанс',\n 'menu.pinSession': 'Закрепить сеанс',\n 'menu.unpinSession': 'Открепить сеанс',\n 'menu.sessionId': 'Копировать идентификатор сеанса',\n 'toast.sessionIdCopied': 'Идентификатор сеанса скопирован.',\n 'toast.sessionIdCopyFailed': 'Копировать не удалось. Попробуйте еще раз.',\n 'row.archived': 'В архиве',\n 'row.pinned': 'Закреплено',\n 'toast.archivedNotOpenable': 'Архивированные сеансы невозможно открыть. Разархивируйте его для просмотра.',\n 'toast.archived': 'Сессия заархивирована. Вы можете ',\n 'toast.stoppedAndArchived': 'Сеанс остановлен и заархивирован. Вы можете ',\n 'archive.confirm.title': 'Остановить и заархивировать этот сеанс?',\n 'archive.confirm.desc': 'Над «{title}» все еще ведется работа. Архивирование останавливает его первым; восстановить сессию можно позже из фильтра «Все разговоры (показать в архиве)» в боковой панели, при этом остановленная работа не возобновится сама по себе.',\n 'archive.confirm.activity': 'Работа, которая будет остановлена',\n 'archive.confirm.turn': 'Текущий ход',\n 'archive.confirm.subagents.one': '{n} работающий субагент: {names}',\n 'archive.confirm.subagents.other': '{n} работающие субагенты: {names}',\n 'archive.confirm.jobs.one': '{n} фоновое задание: {names}',\n 'archive.confirm.jobs.other': '{n} фоновые задания: {names}',\n 'archive.confirm.schedules.one': 'Запланированное напоминание {n}: {names}',\n 'archive.confirm.schedules.other': 'Запланированные напоминания {n}: {names}',\n 'archive.confirm.other.one': '{n} другой элемент работы ({kind})',\n 'archive.confirm.other.other': '{n} прочие работы ({kind})',\n 'archive.confirm.listSeparator': ', ',\n 'archive.confirm.action': 'Остановить и заархивировать',\n 'archive.confirm.pending': 'Остановка и архивирование…',\n 'toast.archivedUndo': 'отменить',\n 'toast.archivedOr': ' или ',\n 'toast.archivedFilter': 'фильтровать архивированные сеансы',\n 'toast.pinFailed': 'Не удалось закрепить. Повторите попытку позже.',\n 'toast.unpinFailed': 'Не удалось открепить. Повторите попытку позже.',\n 'toast.createFailed': 'Не удалось создать новый сеанс: {message}.',\n 'toast.forkRequiresOpen': 'Откройте исходный сеанс, чтобы завершить миграцию, прежде чем создавать ветку.',\n 'toast.openForkSource': 'Открыть исходный сеанс',\n 'sessions.count.one': 'Сеанс {n}',\n 'sessions.count.other': 'Сессии {n}',\n 'actions.workspace.aria': 'Действия рабочей области для {name}',\n 'actions.session.aria': 'Действия сеанса для {name}',\n 'actions.archive': 'Архив',\n 'actions.unarchive': 'Разархивировать',\n 'actions.pin': 'Закрепить',\n 'actions.unpin': 'Открепить',\n 'actions.newSession': 'Новая сессия',\n 'actions.newSession.aria': 'Новая сессия в {name}',\n 'status.running': 'Бег',\n 'status.subagentsRunning.one': 'Субагент {n} работает',\n 'status.subagentsRunning.other': 'Субагенты {n} работают',\n 'status.idle': 'Простой',\n 'status.waitingApproval': 'Ожидание одобрения',\n 'status.planReview': 'План ожидает рассмотрения',\n 'status.waitingAnswer': 'Ожидание ответа',\n 'status.compact.approval': 'Одобрение',\n 'status.compact.planReview': 'Обзор плана',\n 'status.compact.answer': 'Ответ',\n 'status.completed': 'Завершено',\n 'hover.created': 'Создано {time}',\n 'hover.copied': 'Скопировано',\n 'date.ymd': '{y}-{m}-{d}',\n 'time.now': 'сейчас',\n 'time.minutes': '{n}мин',\n 'time.hours': '{n}h',\n 'time.days': '{n}d',\n 'time.months': '{n}mo',\n 'time.years': '{n}y',\n 'time.ago': '{t} назад',\n 'attention.section.allSessions': 'Все сеансы',\n 'attention.section.allWorkspaces': 'Все рабочие области',\n 'attention.section.pinned': 'Закреплённые',\n 'attention.section.running': 'Выполняется',\n 'attention.section.unread': 'Непрочитанные',\n} satisfies Record<keyof typeof en, string>\n\n/** Portuguese dictionary, checked against the English keys. */\nexport const pt = {\n 'defaultWorkspace.failed': 'Não foi possível criar o espaço de trabalho padrão. Use Escolher espaço de trabalho para selecionar uma pasta.',\n 'draft.workspaceRequired': 'Escolha um espaço de trabalho primeiro.',\n 'draft.initializationFailed': 'Não foi possível preencher o rascunho. Por favor, tente novamente em breve.',\n 'group.ungrouped': 'Desagrupado',\n 'group.running': 'Há uma sessão em execução',\n 'group.completed': 'Uma sessão terminou e não foi lida',\n 'session.new': 'Nova sessão',\n 'session.untitled': 'Sem título',\n 'shortcut.noSession': 'Selecione uma sessão primeiro',\n 'shortcut.noPicker': 'Seletor de diretório indisponível',\n 'shortcut.directoryBusy': 'Selecionando ou adicionando um espaço de trabalho',\n 'shortcut.noCompletedTurn': 'Esta sessão não tem turno concluído',\n 'shortcut.forkFailed': 'Não foi possível bifurcar a sessão. Tente novamente.',\n 'section.workspaces': 'Espaços de trabalho',\n 'section.sessions': 'Sessões',\n 'viewOptions.label': 'Ver opções',\n 'groupBy.label': 'Agrupar por',\n 'groupBy.workspace': 'Espaço de trabalho',\n 'groupBy.workspaceTree': 'Árvore do espaço de trabalho',\n 'groupBy.flat': 'Em uma lista',\n 'orderBy.label': 'Encomendar por',\n 'orderBy.manual': 'Manuais',\n 'orderBy.updated': 'Última atualização',\n 'filterBy.label': 'Filtrar sessões',\n 'viewOptions.hideArchived': 'Ocultar arquivado',\n 'viewOptions.showArchived': 'Todas as conversas (mostrar arquivadas)',\n 'viewOptions.onlyArchived': 'Somente arquivado',\n 'sessions.expand': 'Mostrar mais {n} sessões',\n 'sessions.collapse': 'Mostrar menos',\n 'empty.none': 'Ainda não há sessões',\n 'empty.noneArchived': 'Ainda não há sessões arquivadas',\n 'empty.viewOthers': 'Ver outras sessões',\n 'empty.noMatches': 'Nenhuma correspondência',\n 'workspace.add': 'Adicionar espaço de trabalho',\n 'search.sessions.aria': 'Buscar sessões',\n 'search.placeholder': 'Pesquisar nomes de sessões',\n 'search.clear': 'Limpar pesquisa',\n 'search.results.aria': 'Resultados da pesquisa',\n 'search.pending': 'Pesquisando histórico da sessão…',\n 'search.noMatches': 'Nenhuma sessão correspondente',\n 'search.hasMore': 'Mostrando os primeiros {n} resultados. Restrinja sua pesquisa.',\n 'menu.addWorkspace': 'Adicionar espaço de trabalho…',\n 'picker.loading': 'Carregando áreas de trabalho…',\n 'conflict.named': 'Já existe um espaço de trabalho chamado “{name}”.',\n 'folderError.title': 'Não foi possível abrir a pasta',\n 'folderError.retry': 'Escolha novamente',\n 'rename': 'Renomear',\n 'rename.workspace.title': 'Renomear espaço de trabalho',\n 'rename.session.title': 'Renomear sessão',\n 'field.workspaceName': 'Nome do espaço de trabalho',\n 'field.sessionName': 'Nome da sessão',\n 'delete.workspace': 'Excluir espaço de trabalho',\n 'delete.desc': 'Isso remove “{name}” da lista de espaços de trabalho. A pasta e os logs de sessão serão mantidos. Suas sessões aparecerão em Desagrupado.',\n 'delete.pending': 'Excluindo espaço de trabalho…',\n 'menu.fork': 'Bifurcar sessão',\n 'menu.archiveSession': 'Sessão de arquivamento',\n 'menu.unarchiveSession': 'Desarquivar sessão',\n 'menu.pinSession': 'Fixar sessão',\n 'menu.unpinSession': 'Desafixar sessão',\n 'menu.sessionId': 'Copiar ID da sessão',\n 'toast.sessionIdCopied': 'ID da sessão copiado',\n 'toast.sessionIdCopyFailed': 'Falha na cópia. Tente novamente.',\n 'row.archived': 'Arquivado',\n 'row.pinned': 'Fixado',\n 'toast.archivedNotOpenable': 'As sessões arquivadas não podem ser abertas. Desarquive-o para visualizar.',\n 'toast.archived': 'Sessão arquivada. Você pode ',\n 'toast.stoppedAndArchived': 'Sessão interrompida e arquivada. Você pode ',\n 'archive.confirm.title': 'Parar e arquivar esta sessão?',\n 'archive.confirm.desc': '“{title}” ainda tem trabalho em andamento. O arquivamento interrompe primeiro; você pode restaurar a sessão posteriormente a partir do filtro “Todas as conversas (mostrar arquivadas)” na barra lateral, e o trabalho interrompido não será retomado por conta própria.',\n 'archive.confirm.activity': 'Obra que será interrompida',\n 'archive.confirm.turn': 'O turno em andamento',\n 'archive.confirm.subagents.one': '{n} subagente em execução: {names}',\n 'archive.confirm.subagents.other': '{n} executando subagentes: {names}',\n 'archive.confirm.jobs.one': '{n} trabalho em segundo plano: {names}',\n 'archive.confirm.jobs.other': '{n} trabalhos em segundo plano: {names}',\n 'archive.confirm.schedules.one': '{n} lembrete programado: {names}',\n 'archive.confirm.schedules.other': '{n} lembretes programados: {names}',\n 'archive.confirm.other.one': '{n} outro item de trabalho ({kind})',\n 'archive.confirm.other.other': '{n} outros itens de trabalho ({kind})',\n 'archive.confirm.listSeparator': ', ',\n 'archive.confirm.action': 'Pare e arquive',\n 'archive.confirm.pending': 'Parando e arquivando…',\n 'toast.archivedUndo': 'desfazer',\n 'toast.archivedOr': ' ou ',\n 'toast.archivedFilter': 'filtrar sessões arquivadas',\n 'toast.pinFailed': 'Não foi possível fixar. Tente novamente mais tarde.',\n 'toast.unpinFailed': 'Não foi possível desafixar. Tente novamente mais tarde.',\n 'toast.createFailed': 'Falha na nova sessão: {message}',\n 'toast.forkRequiresOpen': 'Abra a sessão original para concluir a migração antes de criar uma ramificação.',\n 'toast.openForkSource': 'Abrir sessão original',\n 'sessions.count.one': '{n} sessão',\n 'sessions.count.other': '{n} sessões',\n 'actions.workspace.aria': 'Ações do espaço de trabalho para {name}',\n 'actions.session.aria': 'Ações de sessão para {name}',\n 'actions.archive': 'Arquivo',\n 'actions.unarchive': 'Desarquivar',\n 'actions.pin': 'Fixar',\n 'actions.unpin': 'Desafixar',\n 'actions.newSession': 'Nova sessão',\n 'actions.newSession.aria': 'Nova sessão em {name}',\n 'status.running': 'Correndo',\n 'status.subagentsRunning.one': '{n} subagente em execução',\n 'status.subagentsRunning.other': '{n} subagentes em execução',\n 'status.idle': 'Inativo',\n 'status.waitingApproval': 'Aguardando aprovação',\n 'status.planReview': 'Plano aguardando revisão',\n 'status.waitingAnswer': 'Esperando por resposta',\n 'status.compact.approval': 'Aprovação',\n 'status.compact.planReview': 'Revisão do plano',\n 'status.compact.answer': 'Resposta',\n 'status.completed': 'Concluído',\n 'hover.created': 'Criado {time}',\n 'hover.copied': 'Copiado',\n 'date.ymd': '{y}-{m}-{d}',\n 'time.now': 'agora',\n 'time.minutes': '{n}min',\n 'time.hours': '{n}h',\n 'time.days': '{n}d',\n 'time.months': '{n} mês',\n 'time.years': '{n}s',\n 'time.ago': '{t} atrás',\n 'attention.section.allSessions': 'Todas as sessões',\n 'attention.section.allWorkspaces': 'Todos os espaços de trabalho',\n 'attention.section.pinned': 'Fixados',\n 'attention.section.running': 'Em execução',\n 'attention.section.unread': 'Não lidas',\n} satisfies Record<keyof typeof en, string>\n","import { IconEditOutlineRegular, IconTrashOutlineRegular, IconPinFillRegular, IconPinOutlineRegular, IconUnarchiveOutlineRegular, IconArchiveOutlineRegular, IconBranchOutlineRegular, IconCopyOutlineRegular } from '@deepseek-ai/dsh-client-ui-primitives'\nimport { SessionMenu } from './session-actions/SessionMenu.tsx'\nimport type {} from '@deepseek-ai/dsh-client-ui-context-menu/client'\n/**\n * Workspace plugin, browser half. Two registrations: WorkspaceBrowser fills\n * the sidebar shell's `sidebar.workspaces` hole (the whole browsing region),\n * and WorkspacePicker fills the conversation hero's picker hole\n * (`conversation.hero.workspace` — both hero forms). Both read real Host\n * Workspaces through the global useWorkspaces hook, and each declares its\n * own `single` directory-flow child hole for the composed picker package's\n * client half. WorkspaceBrowser additionally declares the two Session row\n * action lists. Built-in Session menu actions contribute structured data to\n * ctx.contextMenus, while external React entries retain the legacy Slot. Dialogs and\n * the row-action notice register in `shell.overlay` (see the contract module doc). It also declares two\n * Session-row seats: the leading decoration a row renders only while its own\n * primary state is idle, and the section the row's hover card renders between\n * its relative time and its trailing status line. Export discipline:\n * packages/client/AGENTS.md.\n */\nimport type {} from '@deepseek-ai/dsh-client-product-analytics/client'\nimport type { Context } from '@deepseek-ai/cordis'\nimport type { RemoteHostFacts } from '@deepseek-ai/dsh-api-remotes/client'\nimport type { ISessions, SessionForkError } from '@deepseek-ai/dsh-api-session-controller/client'\nimport type {\n IWorkspaces, SessionActivity, WorkspaceArchiveError, WorkspaceId, WorkspaceSnapshot,\n} from '@deepseek-ai/dsh-api-workspace-controller/client'\nimport type { RemoteEndpoint } from '@deepseek-ai/dsh-api-remote-access/client'\nimport { createSnapshotStore } from '@deepseek-ai/dsh-client-store'\nimport { writeClipboard } from '@deepseek-ai/dsh-client-ui-primitives'\nimport type { HostObservable, SnapshotSelectorHook } from '@deepseek-ai/dsh-client-ui-slots'\nimport type { SessionId } from '@deepseek-ai/dsh-session/types'\n// Type-only: pulls the Controller service merges.\nimport type {} from '@deepseek-ai/dsh-api-session-controller/client'\nimport type {} from '@deepseek-ai/dsh-api-workspace-controller/client'\n// Type-only: pulls the locale plugin's Context merge (ctx.locale).\nimport type {} from '@deepseek-ai/dsh-client-locale/client'\n// Type-only: pulls the SlotRegistry service merge (ctx.slots).\nimport type {} from '@deepseek-ai/dsh-client-ui-renderer/client'\nimport type {} from '@deepseek-ai/dsh-client-ui-layout/client'\n// Type-only: pulls the Session root standard-hook merge.\nimport type {} from '@deepseek-ai/dsh-client-ui-session/client'\nimport {\n type ArchiveSessionInjected, type ForkSessionInjected, menuOpenStateFactory, type PinSessionInjected,\n type SessionArchiveConfirmInjected, type SessionArchiveConfirmRequest,\n type RenameSessionInjected, type RowToast, type RowToastInjected, type RowToastState, type SessionRenameDialogInjected,\n type WorkspaceActionRequest, type SessionIdInjected, type WorkspaceBrowserInjected, type WorkspacePickerInjected,\n} from './contract/slots.ts'\nimport { createWorkspaceShortcutControls, installWorkspaceShortcuts } from './shortcuts.ts'\nimport { UiWorkspaceService } from './navigation.ts'\nimport { createWorkspaceViewStore } from './stores.ts'\nimport { createAttentionStore } from './attention/model.ts'\nimport { TaskbarProgressPresenter } from './attention/taskbar.ts'\nimport { WorkspaceBrowser } from './rows/WorkspaceBrowser.tsx'\nimport { ArchiveSessionRowButton, SessionArchiveConfirmDialog } from './session-actions/ArchiveSession.tsx'\nimport { derive } from './session-actions/derived.ts'\nimport { registerSessionMenus } from './session-actions/context-menus.tsx'\nimport { PinSessionRowButton } from './session-actions/PinSession.tsx'\nimport { SessionRenameDialog } from './session-actions/RenameSession.tsx'\nimport { RowActionToast } from './session-actions/RowActionToast.tsx'\nimport { registerToasts } from './toast/register.ts'\nimport { WorkspacePicker } from './WorkspacePicker.tsx'\nimport { en, ja, es, fr, de, ru, pt, zh, type WorkspaceKey } from './locales.ts'\n\nexport type { StartSessionOptions, UiWorkspace } from './navigation.ts'\nexport type {\n DirectoryFlowOwnerProps, DirectoryFlowSlotName, DirectoryPickingHooks, DirectoryPickingInjected,\n MenuOpenState, RowToast, SessionRenameTarget, SessionRowOwnerProps, UseMenuOpenState, WorkspaceBrowserInjected,\n SessionRowScheduleOwnerProps,\n WorkspaceBrowserProps,\n WorkspacePickerInjected, WorkspacePickerProps,\n} from './contract/slots.ts'\nexport type { WorkspaceKey } from './locales.ts'\n\n/** Localized follow-up text for the existing archive notice. */\nexport interface ArchiveNotice {\n readonly text: string\n readonly tone: 'success' | 'warning'\n}\n\ndeclare module '@deepseek-ai/cordis' {\n interface Events {\n /**\n * Replace the archive notice with a localized follow-up description.\n * @param sessionId - Session whose archive has succeeded.\n * @param next - fallback to the remaining notice providers.\n * @mode waterfall\n */\n 'workspace/archive-notice'(sessionId: SessionId, next: () => Promise<ArchiveNotice | undefined>): Promise<ArchiveNotice | undefined>\n /**\n * Replace the archive notice when an admitted background operation fails.\n * @param sessionId - Session whose successful archive remains in effect.\n * @param text - localized failure and recovery guidance.\n * @mode emit\n */\n 'workspace/archive-followup-failed'(sessionId: SessionId, text: string): void\n /**\n * Restore the plain archive notice when an announced follow-up ended without acting.\n * @param sessionId - Session whose successful archive remains in effect.\n * @mode emit\n */\n 'workspace/archive-followup-settled'(sessionId: SessionId): void\n }\n}\n\ndeclare module '@deepseek-ai/dsh-client-ui-slots' {\n interface GlobalStandardProps {\n /** Selector hook over the pure Workspace Controller snapshot. */\n useWorkspaces: SnapshotSelectorHook<WorkspaceSnapshot>\n /** Whether the current Peer may call `action` on one Workspace resource. */\n useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean\n }\n\n interface LocaleNamespaceMap {\n /** The workspace browsing region and pick/create flow copy. */\n workspace: WorkspaceKey\n }\n}\n\ndeclare module '@deepseek-ai/dsh-api-session-controller/client' {\n interface SessionReferenceSourceMap {\n workspaceOperation: unknown\n }\n}\n\n/** Dictionary namespace owned by this plugin. */\nconst NS = 'workspace'\n\n/**\n * Required services (cordis fiber inject). The target slots are declared by\n * the ui-sidebar / ui-conversation applies, whose activation order relative\n * to this one is NOT constrained: dsh.client.inject edges are informational\n * (loading/prefetch metadata, never apply sequencing) and neither owner\n * provides a waitable service. apply therefore depends on each slot\n * declaration through `slots.inject()` instead of assuming order.\n */\nexport const inject = ['contextMenus',\n 'slots', 'sessions', 'uiSession', 'workspaces', 'locale', 'remote', 'remote.directoryPicker', 'layout', 'shortcuts',\n 'remoteAccess',\n]\n\n/**\n * Register the browser and picker once their slot declarations are on the\n * ledger. Inject factories return plain callbacks; data reads use the\n * framework's global hooks.\n * @param ctx - client root context.\n */\nexport function apply(ctx: Context): void {\n const sessions = ctx.get('sessions') as ISessions\n const workspaces = ctx.get('workspaces') as IWorkspaces\n // One viewing-store instance, created here as ui-layout does for its layout\n // store: the browser declares the handle, and the UiWorkspace service writes\n // view order through the same instance the renderer hands the browser.\n const viewHandle = createWorkspaceViewStore()\n const viewInstance = viewHandle.create()\n const viewStore: typeof viewHandle = { ...viewHandle, create: () => viewInstance }\n const rowToast = createSnapshotStore<RowToastState | null>(null)\n let toastSeq = 0\n const notify = (toast: RowToast): void => { rowToast.set({ ...toast, seq: ++toastSeq }) }\n const uiWorkspace = new UiWorkspaceService(\n ctx, ctx.remote.directoryPicker, workspaces, sessions, viewInstance.actions, notify,\n )\n ctx.slots.provideRoot({\n hooks: { workspaces: workspaces.list },\n keyedHooks: {\n workspaceAccess: (workspaceId, action) => action === undefined\n ? undefined\n : ctx.remoteAccess.source('workspace', workspaceId, action),\n },\n })\n ctx.effect(() => ctx.locale.register(NS, { zh, en, ja, es, fr, de, ru, pt }), 'ui-workspace: dictionaries')\n const shortcutControls = createWorkspaceShortcutControls()\n\n const searchSessions: WorkspaceBrowserInjected['searchSessions'] = async (query, signal) => {\n const result = await sessions.search(query, signal)\n if (!result.ok) throw new Error(result.error.message)\n return result.value\n }\n\n // Stable per-surface occupancy sources (the renderer's hook cache keys by\n // source identity): true while the surface's directory-flow hole is filled.\n const flowSource = (hole: 'sidebar.workspaces.directoryFlow' | 'conversation.hero.workspace.directoryFlow'): HostObservable<boolean> => ({\n getSnapshot: () => ctx.slots.entries(hole).length > 0,\n subscribe: listener => ctx.slots.subscribe(hole, listener),\n })\n const browserFlowSource = flowSource('sidebar.workspaces.directoryFlow')\n const hostInfo: HostObservable<RemoteHostFacts> = {\n getSnapshot: () => ctx.remote.$host,\n subscribe: listener => ctx.on('connection/reset', listener),\n }\n const pickerFlowSource = flowSource('conversation.hero.workspace.directoryFlow')\n const openSession: WorkspaceBrowserInjected['open'] = (sessionId) => {\n uiWorkspace.openSession(sessionId)\n }\n // Registry-global sets as Sets, rebuilt only when the Workspace snapshot changes.\n const pinnedSet = derive(workspaces.list, snapshot => new Set<SessionId>(snapshot.pinnedSessionIds))\n const archivedSet = derive(workspaces.list, snapshot => new Set<SessionId>(snapshot.archivedSessionIds))\n // The attention region folds four sources other plugins own — the Session list,\n // the Session status map, and the two registry sets derived just above — and\n // writes nothing: no unread bookkeeping, no projection refresh. It is created\n // here, after its inputs, so it subscribes to the same Set instances the row\n // actions read.\n const attention = createAttentionStore(sessions.list, ctx.uiSession.sessionStatus, pinnedSet, archivedSet)\n ctx.effect(() => () => { attention.dispose() }, 'ui-workspace: attention model')\n // The Windows taskbar pulse is a projection of the same model the region reads.\n ctx.effect(() => {\n const presenter = new TaskbarProgressPresenter()\n if (!presenter.viable) return () => {}\n const sync = (): void => { presenter.project(attention.getSnapshot()) }\n sync()\n const unsubscribe = attention.subscribe(sync)\n return () => {\n unsubscribe()\n presenter.clear()\n }\n }, 'ui-workspace: windows taskbar progress')\n // Plugin-private facts the row actions and their overlay surfaces share:\n // the pending rename request and the notice on display. Each business\n // writes through its own injected callback and the surface reads through\n // its bound hook.\n const renameRequest = derive(shortcutControls.state, state => state.renameTarget)\n const archiveRequest = createSnapshotStore<SessionArchiveConfirmRequest | null>(null)\n const requestSessionRename = shortcutControls.rename\n const unarchiveSession = (sessionId: SessionId): void => {\n uiWorkspace.unarchiveSession(sessionId).catch((reason: unknown) => {\n console.warn('session unarchive rejected:', reason)\n })\n }\n const renameSession: SessionRenameDialogInjected['renameSession'] = async (sessionId, title) => {\n const result = await sessions.using(\n sessionId,\n { source: 'workspaceOperation' },\n reference => reference.binding.session.rename(title),\n )\n if (!result.ok) throw new Error(result.error.message)\n }\n // The menu row and the hover button issue the same Host call, so a refusal\n // raises the same notice for both.\n const unpinSession = (sessionId: SessionId): void => {\n uiWorkspace.unpinSession(sessionId).catch(() => { notify({ kind: 'unpinFailed' }) })\n }\n const pinInjected = (): PinSessionInjected => ({\n hooks: { pinned: pinnedSet, archived: archivedSet },\n // Pin failures surface as a notice: nothing else on the surface moves, so\n // a silent failure would read as a dead action.\n pinSession: (sessionId) => {\n uiWorkspace.pinSession(sessionId).catch(() => { notify({ kind: 'pinFailed' }) })\n },\n unpinSession: unpinSession,\n })\n ctx.on('workspace/archive-followup-failed', (sessionId, text) => {\n if (archivedSet.getSnapshot().has(sessionId)) notify({ kind: 'archived', sessionId, message: text, tone: 'warning' })\n })\n ctx.on('workspace/archive-followup-settled', (sessionId) => {\n if (archivedSet.getSnapshot().has(sessionId)) notify({ kind: 'archived', sessionId })\n })\n const archiveNotice = async (sessionId: SessionId, kind: 'archived' | 'stoppedAndArchived'): Promise<void> => {\n let message: ArchiveNotice | undefined\n try {\n message = await ctx.waterfall('workspace/archive-notice', sessionId, () => Promise.resolve(undefined))\n } catch (error) {\n console.warn('session archive notice unavailable:', error)\n }\n notify({ kind, sessionId, ...message === undefined ? {} : { message: message.text, tone: message.tone } })\n }\n const archiveInjected = (): ArchiveSessionInjected => ({\n hooks: { archived: archivedSet },\n // Archive preserves the log and the account position, so a quiet Session\n // needs no confirmation; the notice offers undo and the archived filter.\n // The Host's refusal for running work is the one case that asks first:\n // the confirmation names that work and offers to stop it.\n archiveSession: (sessionId) => {\n uiWorkspace.archiveSession(sessionId).then(() => archiveNotice(sessionId, 'archived')).catch((reason: unknown) => {\n const activity = activeSessionRefusal(reason)\n if (activity === undefined) {\n console.warn('session archive rejected:', reason)\n return\n }\n const displayTitle = sessions.list.getSnapshot().byId[sessionId]?.displayTitle ?? sessionId\n archiveRequest.set({ sessionId, displayTitle, activity })\n })\n },\n unarchiveSession,\n })\n installWorkspaceShortcuts(ctx, uiWorkspace, shortcutControls, archiveInjected().archiveSession,\n (reason) => { notify({ kind: 'shortcutForkFailed', reason }) })\n const archiveConfirmInjected = (): SessionArchiveConfirmInjected => ({\n hooks: { archiveRequest },\n settleSessionArchive: () => { archiveRequest.set(null) },\n stopAndArchiveSession: async (sessionId) => {\n await uiWorkspace.archiveSession(sessionId, { stopActivity: true })\n await archiveNotice(sessionId, 'stoppedAndArchived')\n },\n })\n const forkInjected = (): ForkSessionInjected => ({\n forkSession: (sessionId) => {\n uiWorkspace.forkSession(sessionId, (childId) => {\n ctx.get('productAnalytics')?.track('branch_session_click', { session_id: childId, parent_session_id: sessionId, click_position: 'sidebar' })\n }, { allowMigration: false }).catch((error: unknown) => {\n if (error instanceof Error && error.name === 'SessionForkError'\n && (error as SessionForkError).rpcError.code === 'session/migration-required') {\n notify({ kind: 'forkRequiresOpen', sessionId })\n }\n })\n },\n })\n const sessionIdInjected = (): SessionIdInjected => ({\n copySessionId: async (sessionId) => {\n const copied = await writeClipboard(sessionId)\n notify({ kind: copied ? 'sessionIdCopied' : 'sessionIdCopyFailed' })\n },\n })\n const renameInjected = (): RenameSessionInjected => ({ requestSessionRename })\n const renameDialogInjected = (): SessionRenameDialogInjected => ({\n hooks: { renameRequest },\n settleSessionRename: shortcutControls.closeRename,\n renameSession,\n })\n const toastActions = {\n undoArchive: unarchiveSession,\n showArchived: () => { viewInstance.actions.setArchivedFilter('show') },\n openForkSource: (sessionId: SessionId) => {\n if (workspaces.list.getSnapshot().archivedSessionIds.includes(sessionId)) {\n notify({ kind: 'archivedNotOpenable' })\n return\n }\n openSession(sessionId)\n },\n }\n registerToasts(ctx, viewStore, toastActions)\n const rowToastInjected = (): Pick<RowToastInjected, 'hooks' | 'dismissToast'> => ({\n hooks: { toast: rowToast },\n dismissToast: () => { rowToast.set(null) },\n })\n const workspaceActionRequest = createSnapshotStore<WorkspaceActionRequest | null>(null)\n const requestWorkspaceAction = (workspaceId: WorkspaceId, displayTitle: string, action: 'rename' | 'delete'): void => {\n const workspace = workspaces.list.getSnapshot().items.find(row => row.workspaceId === workspaceId)\n if (workspace === undefined || !ctx.remoteAccess.source('workspace', workspaceId, `workspace/${action}`).getSnapshot()) return\n workspaceActionRequest.set({ action, workspaceId, displayTitle, storedTitle: workspace.title })\n }\n ctx.slots.inject('contextMenu.icon', function* () {\n for (const [key, Icon] of Object.entries({\n 'workspace.rename': IconEditOutlineRegular, 'workspace.delete': IconTrashOutlineRegular,\n 'workspace.pin': IconPinOutlineRegular, 'workspace.unpin': IconPinFillRegular,\n 'workspace.archive': IconArchiveOutlineRegular, 'workspace.unarchive': IconUnarchiveOutlineRegular,\n 'workspace.fork': IconBranchOutlineRegular, 'workspace.copy': IconCopyOutlineRegular,\n })) yield ctx.slots.register({ name: 'contextMenu.icon', key }, Icon)\n })\n ctx.effect(() => ctx.contextMenus.register({\n id: 'workspace.rename', target: 'workspace', order: 100,\n resolve: ({ workspaceId, displayTitle }) => ctx.remoteAccess.source('workspace', workspaceId, 'workspace/rename').getSnapshot()\n ? [{ id: 'rename', label: ctx.locale.bind(NS)('rename'), icon: { key: 'workspace.rename' }, run: () => { requestWorkspaceAction(workspaceId, displayTitle, 'rename') } }] : [],\n }), 'workspace: rename menu action')\n ctx.effect(() => ctx.contextMenus.register({\n id: 'workspace.delete', target: 'workspace', order: 300,\n resolve: ({ workspaceId, displayTitle }) => ctx.remoteAccess.source('workspace', workspaceId, 'workspace/delete').getSnapshot()\n ? [{ id: 'delete', label: ctx.locale.bind(NS)('delete.workspace'), icon: { key: 'workspace.delete' }, danger: true, separatorBefore: true,\n run: () => { requestWorkspaceAction(workspaceId, displayTitle, 'delete') } }] : [],\n }), 'workspace: delete menu action')\n const browserInjected = (): WorkspaceBrowserInjected => ({\n settleWorkspaceAction: () => { workspaceActionRequest.set(null) },\n // Explicit group actions keep their target; unscoped New Session inherits\n // the current Session Workspace before the recent-Workspace fallback.\n startSession: (workspaceId, options) => { uiWorkspace.startSession(workspaceId, options) },\n open: openSession,\n searchSessions,\n searchResultLimit: sessions.searchResultLimit,\n requestSessionRename,\n notifyArchivedNotOpenable: () => { notify({ kind: 'archivedNotOpenable' }) },\n renameWorkspace: async (workspaceId, title) => { await workspaces.rename(workspaceId, title) },\n deleteWorkspace: async (workspaceId) => { await workspaces.delete(workspaceId) },\n insertWorkspaceBefore: async (workspaceId, beforeWorkspaceId) => {\n await workspaces.insertBefore(workspaceId, beforeWorkspaceId)\n },\n unarchiveSession: async (sessionId) => { await uiWorkspace.unarchiveSession(sessionId) },\n createWorkspace: input => workspaces.create(input),\n requestSearch: shortcutControls.search,\n requestAddWorkspace: shortcutControls.add,\n closeAddWorkspace: shortcutControls.closeAdd,\n setDirectoryBusy: shortcutControls.directoryBusy,\n hooks: { workspaceActionRequest, contextMenuTarget: ctx.contextMenus.active, directoryFlow: browserFlowSource, hostInfo,\n workspaceShortcuts: shortcutControls.state, shortcuts: ctx.shortcuts.catalog, attention },\n })\n const pickerInjected = (): WorkspacePickerInjected => ({\n createWorkspace: input => workspaces.create(input),\n hooks: { directoryFlow: pickerFlowSource },\n })\n // Each registration declares its owned children in the same call; slot\n // injection follows both the owner and declaration HMR lifetimes.\n ctx.slots.inject('sidebar.workspaces', () => ctx.slots.register(\n {\n name: 'sidebar.workspaces',\n children: {\n 'sidebar.workspaces.directoryFlow': { kind: 'single', scope: 'root' },\n 'sidebar.workspaces.session.row.action': { kind: 'list', scope: 'root' },\n 'sidebar.session.row.leading': { kind: 'list', scope: 'root', inline: true },\n 'sidebar.session.row.trailing': { kind: 'list', scope: 'root', inline: true },\n 'sidebar.session.row.hover': { kind: 'list', scope: 'root' },\n },\n store: viewStore,\n inject: browserInjected,\n locale: NS,\n },\n WorkspaceBrowser,\n ))\n ctx.slots.inject('contextMenu.content', () => ctx.slots.register({\n name: 'contextMenu.content', key: 'session',\n children: { 'sidebar.workspaces.session.menu.item': {\n kind: 'list', scope: 'root', inject: { hooks: { menuOpenState: menuOpenStateFactory, shortcuts: ctx.shortcuts.catalog } },\n } },\n }, SessionMenu))\n registerSessionMenus(ctx, {\n ...pinInjected(), ...archiveInjected(), ...renameInjected(), ...forkInjected(), ...sessionIdInjected(),\n })\n ctx.slots.inject('sidebar.workspaces.session.row.action', function* () {\n yield ctx.slots.register({ name: 'sidebar.workspaces.session.row.action', id: 'archive', order: 100, locale: NS, inject: archiveInjected }, ArchiveSessionRowButton)\n yield ctx.slots.register({ name: 'sidebar.workspaces.session.row.action', id: 'pin', order: 200, locale: NS, inject: pinInjected }, PinSessionRowButton)\n })\n // The surfaces the actions raise live in the frame-wide layer: they must\n // outlive the row menu the action sat in.\n ctx.slots.inject('shell.overlay', function* () {\n yield ctx.slots.register({\n name: 'shell.overlay', id: 'workspace.session-rename', locale: NS, inject: renameDialogInjected,\n }, SessionRenameDialog)\n yield ctx.slots.register({\n name: 'shell.overlay', id: 'workspace.session-archive', locale: NS, inject: archiveConfirmInjected,\n }, SessionArchiveConfirmDialog)\n yield ctx.slots.register({\n name: 'shell.overlay', id: 'workspace.row-toast', inject: rowToastInjected,\n children: { 'workspace.toast': { kind: 'keyed', scope: 'root' } },\n }, RowActionToast)\n })\n ctx.slots.inject('conversation.hero.workspace', () => ctx.slots.register(\n {\n name: 'conversation.hero.workspace',\n children: { 'conversation.hero.workspace.directoryFlow': { kind: 'single', scope: 'root' } },\n inject: pickerInjected,\n locale: NS,\n },\n WorkspacePicker,\n ))\n}\n\n/**\n * The activity a Host `workspace/session-active` refusal reported, or nothing\n * for any other failure. The class identity check goes by name: client plugin\n * bundles do not share error-class identity.\n */\nfunction activeSessionRefusal(reason: unknown): readonly SessionActivity[] | undefined {\n if (!(reason instanceof Error) || reason.name !== 'WorkspaceArchiveError') return undefined\n const { rpcError } = reason as WorkspaceArchiveError\n return rpcError.code === 'workspace/session-active' ? rpcError.details.activity : undefined\n}\n"],"x_google_ignoreList":[3,4,11,13],"mappings":";;;;;;;;;;;;;;EAMA,SAAgB,YAAY,EAAE,QAAQ,SAAS,cAAqB;GAClE,MAAM,eAAA,GAAcA,MAAAA,QAAAA,OAA2D,CAAC,OAAO,SAAS;IAAE,IAAI,CAAC,MAAM,QAAQ;GAAE,CAAC,GAAG,CAAC,OAAO,CAAC;GACpI,IAAI,OAAO,SAAS,WAAW,OAAO;GACtC,OAAO,WAAW,wCAAwC,O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