@opengeni/react 0.46.1 → 0.52.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/README.md +158 -14
- package/dist/artifacts-document.d.ts +3 -0
- package/dist/artifacts-document.js +17 -0
- package/dist/artifacts-document.js.map +1 -0
- package/dist/artifacts-presentation.d.ts +3 -0
- package/dist/artifacts-presentation.js +17 -0
- package/dist/artifacts-presentation.js.map +1 -0
- package/dist/artifacts-spreadsheet.d.ts +3 -0
- package/dist/artifacts-spreadsheet.js +17 -0
- package/dist/artifacts-spreadsheet.js.map +1 -0
- package/dist/artifacts.d.ts +2 -0
- package/dist/artifacts.js +170 -0
- package/dist/artifacts.js.map +1 -0
- package/dist/chunk-6BBWWOOU.js +82 -0
- package/dist/chunk-6BBWWOOU.js.map +1 -0
- package/dist/{chunk-HFO4ERGQ.js → chunk-724BW4TW.js} +586 -35
- package/dist/chunk-724BW4TW.js.map +1 -0
- package/dist/chunk-7I2KB3OK.js +3895 -0
- package/dist/chunk-7I2KB3OK.js.map +1 -0
- package/dist/chunk-7WCLAEFV.js +2828 -0
- package/dist/chunk-7WCLAEFV.js.map +1 -0
- package/dist/{chunk-U3CSCMWA.js → chunk-FK6VG4LL.js} +9 -13
- package/dist/chunk-FK6VG4LL.js.map +1 -0
- package/dist/{chunk-SRFUT2ZU.js → chunk-FWS3KC3Z.js} +120 -64
- package/dist/chunk-FWS3KC3Z.js.map +1 -0
- package/dist/{chunk-EKZH6IDG.js → chunk-HDBG7XGO.js} +62 -1
- package/dist/chunk-HDBG7XGO.js.map +1 -0
- package/dist/chunk-HUIKIDM5.js +2148 -0
- package/dist/chunk-HUIKIDM5.js.map +1 -0
- package/dist/{chunk-LGVMUIRV.js → chunk-JAGDUCZQ.js} +1053 -390
- package/dist/chunk-JAGDUCZQ.js.map +1 -0
- package/dist/{chunk-LWR4MXSS.js → chunk-JR3QFY6B.js} +420 -35
- package/dist/chunk-JR3QFY6B.js.map +1 -0
- package/dist/chunk-JVYQRRC4.js +53 -0
- package/dist/chunk-JVYQRRC4.js.map +1 -0
- package/dist/chunk-KCGXPP5V.js +157 -0
- package/dist/chunk-KCGXPP5V.js.map +1 -0
- package/dist/{chunk-EB67J347.js → chunk-KZ73RL76.js} +111 -31
- package/dist/chunk-KZ73RL76.js.map +1 -0
- package/dist/chunk-PEI6RANI.js +3234 -0
- package/dist/chunk-PEI6RANI.js.map +1 -0
- package/dist/{chunk-3PB7MIT6.js → chunk-ROIRTM37.js} +220 -72
- package/dist/chunk-ROIRTM37.js.map +1 -0
- package/dist/chunk-VZTQ73XT.js +86 -0
- package/dist/chunk-VZTQ73XT.js.map +1 -0
- package/dist/{chunk-VCBFUSUZ.js → chunk-WSK7G5LE.js} +72 -4
- package/dist/chunk-WSK7G5LE.js.map +1 -0
- package/dist/{chunk-FGZUCXZF.js → chunk-WYA65Y3F.js} +16 -16
- package/dist/chunk-WYA65Y3F.js.map +1 -0
- package/dist/{chunk-6EDV6YFE.js → chunk-X4S56Y2H.js} +147 -35
- package/dist/chunk-X4S56Y2H.js.map +1 -0
- package/dist/client.d.ts +7 -1
- package/dist/clipboard.d.ts +1 -0
- package/dist/clipboard.js +7 -0
- package/dist/clipboard.js.map +1 -0
- package/dist/commands/index.d.ts +3 -3
- package/dist/commands/registry.d.ts +1 -1
- package/dist/commands/types.d.ts +1 -1
- package/dist/components/approval-surface.d.ts +2 -2
- package/dist/components/artifacts/artifact-surface.d.ts +18 -0
- package/dist/components/artifacts/document-editor.d.ts +172 -0
- package/dist/components/artifacts/editable-artifact-ui.d.ts +13 -0
- package/dist/components/artifacts/editable-artifact-workbench.d.ts +49 -0
- package/dist/components/artifacts/editable-document.d.ts +24 -0
- package/dist/components/artifacts/editable-presentation.d.ts +24 -0
- package/dist/components/artifacts/editable-spreadsheet.d.ts +32 -0
- package/dist/components/artifacts/index.d.ts +8 -0
- package/dist/components/artifacts/presentation-editor.d.ts +297 -0
- package/dist/components/artifacts/spreadsheet-canvas.d.ts +120 -0
- package/dist/components/artifacts/spreadsheet-grid.d.ts +113 -0
- package/dist/components/browser-viewer.d.ts +29 -0
- package/dist/components/chat-composer.d.ts +13 -8
- package/dist/components/code-editor.d.ts +25 -3
- package/dist/components/command-palette.d.ts +2 -2
- package/dist/components/composer-transcription-control.d.ts +4 -2
- package/dist/components/composer.d.ts +29 -15
- package/dist/components/computer-viewer.d.ts +23 -0
- package/dist/components/copy-button.d.ts +2 -2
- package/dist/components/desktop-viewer.d.ts +25 -21
- package/dist/components/diff-view.d.ts +1 -1
- package/dist/components/enrollment-consent.d.ts +1 -1
- package/dist/components/enrollment-device-flow.d.ts +1 -1
- package/dist/components/file-browser.d.ts +2 -2
- package/dist/components/fleet-tile.d.ts +1 -1
- package/dist/components/generated-video-player.d.ts +10 -0
- package/dist/components/human-input-form.d.ts +1 -1
- package/dist/components/human-input-surface.d.ts +2 -2
- package/dist/components/interactive-workbench-viewers.d.ts +2 -0
- package/dist/components/machine-card.d.ts +2 -2
- package/dist/components/machine-dock-bar.d.ts +3 -3
- package/dist/components/machine-health-pill.d.ts +2 -2
- package/dist/components/machine-input-display.d.ts +1 -1
- package/dist/components/machine-metrics.d.ts +2 -2
- package/dist/components/machine-status-pill.d.ts +4 -4
- package/dist/components/machines/health.d.ts +1 -1
- package/dist/components/machines/machine-detail.d.ts +5 -3
- package/dist/components/machines/metric-history-chart.d.ts +1 -1
- package/dist/components/machines/metric-sparkline.d.ts +2 -2
- package/dist/components/machines/series.d.ts +2 -2
- package/dist/components/machines-dashboard.d.ts +5 -5
- package/dist/components/markdown.d.ts +1 -1
- package/dist/components/message-timeline.d.ts +22 -5
- package/dist/components/model-picker.d.ts +2 -2
- package/dist/components/model-policy-picker.d.ts +7 -7
- package/dist/components/pierre-diff.d.ts +1 -1
- package/dist/components/pierre-file.d.ts +1 -1
- package/dist/components/queue-draft-policy.d.ts +1 -1
- package/dist/components/queue-surface-implementation.d.ts +3 -3
- package/dist/components/queue-surface-state.d.ts +4 -4
- package/dist/components/queue-surface.d.ts +5 -5
- package/dist/components/sandbox-files.d.ts +5 -5
- package/dist/components/sandbox-terminal.d.ts +50 -4
- package/dist/components/sandbox-workspace.d.ts +30 -10
- package/dist/components/session-chrome.d.ts +4 -4
- package/dist/components/session-status.d.ts +2 -2
- package/dist/components/timeline-annotation-selection.d.ts +9 -0
- package/dist/components/timeline-annotations-dialog.d.ts +16 -0
- package/dist/components/timeline-annotations.d.ts +13 -0
- package/dist/components/tooltip.d.ts +4 -4
- package/dist/components/user-message-body.d.ts +2 -2
- package/dist/components/workbench-changes.d.ts +2 -2
- package/dist/components/workspace-dock.d.ts +3 -1
- package/dist/composer.d.ts +11 -11
- package/dist/composer.js +7 -7
- package/dist/hooks/internal.d.ts +7 -1
- package/dist/hooks/use-attached-browsers.d.ts +21 -0
- package/dist/hooks/use-available-models.d.ts +2 -2
- package/dist/hooks/use-billing-usage.d.ts +1 -1
- package/dist/hooks/use-browser-frame-stream.d.ts +28 -0
- package/dist/hooks/use-browser-identities.d.ts +26 -0
- package/dist/hooks/use-browser-session.d.ts +28 -0
- package/dist/hooks/use-browser-sessions.d.ts +32 -0
- package/dist/hooks/use-codex-accounts.d.ts +3 -3
- package/dist/hooks/use-composer.d.ts +36 -9
- package/dist/hooks/use-computer-frame-stream.d.ts +24 -0
- package/dist/hooks/use-computer-session.d.ts +28 -0
- package/dist/hooks/use-computer-sessions.d.ts +28 -0
- package/dist/hooks/use-desktop-stream.d.ts +1 -1
- package/dist/hooks/use-environments.d.ts +11 -5
- package/dist/hooks/use-file-attachments.d.ts +1 -1
- package/dist/hooks/use-goal.d.ts +2 -2
- package/dist/hooks/use-human-input.d.ts +2 -2
- package/dist/hooks/use-last-started-turn-policy.d.ts +2 -2
- package/dist/hooks/use-machine-chip.d.ts +2 -2
- package/dist/hooks/use-machines.d.ts +10 -3
- package/dist/hooks/use-packs.d.ts +7 -2
- package/dist/hooks/use-rigs.d.ts +1 -1
- package/dist/hooks/use-sandbox-files.d.ts +25 -4
- package/dist/hooks/use-sandbox-git.d.ts +13 -5
- package/dist/hooks/use-sandbox-terminal.d.ts +1 -1
- package/dist/hooks/use-scheduled-tasks.d.ts +1 -1
- package/dist/hooks/use-session-capabilities.d.ts +5 -4
- package/dist/hooks/use-session-control.d.ts +1 -1
- package/dist/hooks/use-session-events.d.ts +2 -2
- package/dist/hooks/use-session-lineage.d.ts +1 -1
- package/dist/hooks/use-session-mcp-approval-policy.d.ts +2 -2
- package/dist/hooks/use-session.d.ts +2 -2
- package/dist/hooks/use-slash-commands.d.ts +1 -1
- package/dist/hooks/use-terminal-stream.d.ts +8 -2
- package/dist/hooks/use-transcription.d.ts +2 -2
- package/dist/hooks/use-turn-queue.d.ts +2 -2
- package/dist/hooks/use-video-artifact-playback.d.ts +9 -0
- package/dist/hooks/use-voice-input.d.ts +6 -4
- package/dist/hooks/use-workspace-capture.d.ts +1 -1
- package/dist/hooks/use-workspace-edit.d.ts +1 -1
- package/dist/hooks/use-workspace-sessions.d.ts +1 -1
- package/dist/hooks/use-workspaces.d.ts +1 -1
- package/dist/index.d.ts +158 -154
- package/dist/index.js +1718 -908
- package/dist/index.js.map +1 -1
- package/dist/interaction.d.ts +23 -0
- package/dist/interaction.js +36 -0
- package/dist/interaction.js.map +1 -0
- package/dist/interactive-workbench-viewers-KHNOHWQE.js +13 -0
- package/dist/interactive-workbench-viewers-KHNOHWQE.js.map +1 -0
- package/dist/lib/composer-responsive-context.d.ts +9 -0
- package/dist/lib/relay-wire.d.ts +4 -0
- package/dist/lib/sandbox-liveness.d.ts +9 -0
- package/dist/lib/terminal-capability.d.ts +5 -0
- package/dist/lib/use-portal-token-style.d.ts +14 -3
- package/dist/lib/xterm-theme.d.ts +1 -1
- package/dist/machines.d.ts +30 -30
- package/dist/machines.js +3 -3
- package/dist/provider.d.ts +4 -4
- package/dist/{queue-surface-implementation-J4XJFKRW.js → queue-surface-implementation-2KVJTYXH.js} +117 -64
- package/dist/queue-surface-implementation-2KVJTYXH.js.map +1 -0
- package/dist/realtime/dropdown-menu.d.ts +8 -8
- package/dist/realtime/realtime-control.d.ts +15 -6
- package/dist/realtime.d.ts +4 -4
- package/dist/realtime.js +30 -33
- package/dist/realtime.js.map +1 -1
- package/dist/session-context.d.ts +19 -1
- package/dist/session-ui.d.ts +14 -14
- package/dist/session-ui.js +6 -5
- package/dist/session.d.ts +28 -28
- package/dist/session.js +5 -5
- package/dist/timeline/activity-rail.d.ts +6 -3
- package/dist/timeline/disclosure-context.d.ts +1 -1
- package/dist/timeline/fleet-decision-projection.d.ts +1 -1
- package/dist/timeline/fleet-decision-row.d.ts +3 -3
- package/dist/timeline/index.d.ts +19 -19
- package/dist/timeline/parsers.d.ts +6 -3
- package/dist/timeline/projection.d.ts +3 -3
- package/dist/timeline/registry.d.ts +10 -1
- package/dist/timeline/screenshot-lightbox.d.ts +2 -2
- package/dist/timeline/shared.d.ts +21 -10
- package/dist/timeline/tool-diff.d.ts +2 -2
- package/dist/timeline/tool-renderers.d.ts +1 -1
- package/dist/timeline/turn-summary.d.ts +3 -3
- package/dist/timeline/types.d.ts +42 -2
- package/dist/timeline-annotation-selection-3L7LHGG2.js +187 -0
- package/dist/timeline-annotation-selection-3L7LHGG2.js.map +1 -0
- package/dist/timeline-annotations-dialog-U7EVLR75.js +196 -0
- package/dist/timeline-annotations-dialog-U7EVLR75.js.map +1 -0
- package/dist/voice-recording-store.d.ts +8 -2
- package/package.json +52 -7
- package/src/artifacts-document.ts +31 -0
- package/src/artifacts-presentation.ts +36 -0
- package/src/artifacts-spreadsheet.ts +21 -0
- package/src/artifacts.ts +86 -0
- package/src/client.ts +90 -1
- package/src/clipboard.ts +2 -0
- package/src/components/artifacts/artifact-surface.tsx +93 -0
- package/src/components/artifacts/document-editor.tsx +2255 -0
- package/src/components/artifacts/editable-artifact-ui.tsx +89 -0
- package/src/components/artifacts/editable-artifact-workbench.tsx +203 -0
- package/src/components/artifacts/editable-document.tsx +657 -0
- package/src/components/artifacts/editable-presentation.tsx +1020 -0
- package/src/components/artifacts/editable-spreadsheet.tsx +733 -0
- package/src/components/artifacts/index.ts +99 -0
- package/src/components/artifacts/presentation-editor.tsx +3148 -0
- package/src/components/artifacts/spreadsheet-canvas.ts +799 -0
- package/src/components/artifacts/spreadsheet-grid.tsx +2129 -0
- package/src/components/browser-viewer.tsx +1592 -0
- package/src/components/chat-composer.tsx +25 -2
- package/src/components/code-editor.tsx +90 -31
- package/src/components/command-palette.tsx +1 -1
- package/src/components/composer-transcription-control.tsx +51 -22
- package/src/components/composer.tsx +49 -23
- package/src/components/computer-viewer.tsx +1139 -0
- package/src/components/copy-button.tsx +1 -1
- package/src/components/desktop-viewer.tsx +103 -75
- package/src/components/file-browser.tsx +39 -17
- package/src/components/generated-video-player.tsx +89 -0
- package/src/components/human-input-form.tsx +2 -2
- package/src/components/interactive-workbench-viewers.ts +2 -0
- package/src/components/machine-card.tsx +1 -1
- package/src/components/machine-input-display.ts +3 -0
- package/src/components/machines/machine-detail.tsx +39 -15
- package/src/components/machines-dashboard.tsx +7 -6
- package/src/components/message-timeline.tsx +327 -37
- package/src/components/model-picker.tsx +2 -2
- package/src/components/model-policy-picker.tsx +16 -15
- package/src/components/queue-surface-implementation.tsx +135 -75
- package/src/components/queue-surface-state.tsx +2 -2
- package/src/components/sandbox-files.tsx +142 -62
- package/src/components/sandbox-terminal.tsx +119 -35
- package/src/components/sandbox-workspace.tsx +394 -228
- package/src/components/session-chrome.tsx +67 -27
- package/src/components/timeline-annotation-selection.tsx +221 -0
- package/src/components/timeline-annotations-dialog.tsx +213 -0
- package/src/components/timeline-annotations.tsx +84 -0
- package/src/components/tooltip.tsx +13 -16
- package/src/components/user-message-body.tsx +1 -1
- package/src/components/workbench-changes.tsx +192 -35
- package/src/components/workspace-dock.tsx +13 -5
- package/src/composer.ts +3 -0
- package/src/hooks/internal.ts +132 -38
- package/src/hooks/use-attached-browsers.ts +152 -0
- package/src/hooks/use-browser-frame-stream.ts +316 -0
- package/src/hooks/use-browser-identities.ts +225 -0
- package/src/hooks/use-browser-session.ts +476 -0
- package/src/hooks/use-browser-sessions.ts +281 -0
- package/src/hooks/use-codex-accounts.ts +4 -4
- package/src/hooks/use-composer.ts +769 -24
- package/src/hooks/use-computer-frame-stream.ts +311 -0
- package/src/hooks/use-computer-session.ts +442 -0
- package/src/hooks/use-computer-sessions.ts +245 -0
- package/src/hooks/use-environments.ts +24 -5
- package/src/hooks/use-file-attachments.ts +70 -32
- package/src/hooks/use-goal.ts +17 -5
- package/src/hooks/use-machine-chip.ts +5 -3
- package/src/hooks/use-machines.ts +79 -3
- package/src/hooks/use-packs.ts +51 -0
- package/src/hooks/use-sandbox-files.ts +382 -88
- package/src/hooks/use-sandbox-git.ts +208 -46
- package/src/hooks/use-sandbox-terminal.ts +3 -2
- package/src/hooks/use-session-capabilities.ts +94 -70
- package/src/hooks/use-session-events.ts +18 -4
- package/src/hooks/use-terminal-stream.ts +102 -23
- package/src/hooks/use-transcription.ts +4 -14
- package/src/hooks/use-turn-queue.ts +17 -5
- package/src/hooks/use-video-artifact-playback.ts +28 -0
- package/src/hooks/use-voice-input.ts +163 -19
- package/src/hooks/use-windowed-sections.ts +9 -7
- package/src/hooks/use-workspace-edit.ts +2 -1
- package/src/index.ts +21 -6
- package/src/interaction.ts +71 -0
- package/src/lib/composer-responsive-context.ts +15 -0
- package/src/lib/relay-wire.ts +4 -0
- package/src/lib/sandbox-liveness.ts +11 -0
- package/src/lib/terminal-capability.ts +10 -0
- package/src/lib/use-portal-token-style.ts +60 -15
- package/src/provider.tsx +52 -7
- package/src/realtime/dropdown-menu.tsx +15 -19
- package/src/realtime/realtime-control.tsx +16 -5
- package/src/session-context.ts +90 -0
- package/src/timeline/activity-rail.tsx +31 -6
- package/src/timeline/index.ts +4 -1
- package/src/timeline/parsers.ts +46 -20
- package/src/timeline/projection.ts +233 -13
- package/src/timeline/registry.ts +19 -0
- package/src/timeline/screenshot-lightbox.tsx +30 -9
- package/src/timeline/shared.tsx +59 -11
- package/src/timeline/tool-renderers.tsx +421 -24
- package/src/timeline/turn-summary.tsx +2 -2
- package/src/timeline/types.ts +58 -2
- package/src/voice-recording-store.ts +15 -0
- package/styles/compiled.css +5298 -0
- package/styles/compiled.d.ts +2 -0
- package/styles/effective-tokens.css +27 -0
- package/styles/index.css +18 -0
- package/styles/responsive.css +208 -0
- package/styles/responsive.d.ts +2 -0
- package/styles/tokens.css +50 -17
- package/dist/chunk-3PB7MIT6.js.map +0 -1
- package/dist/chunk-6EDV6YFE.js.map +0 -1
- package/dist/chunk-EB67J347.js.map +0 -1
- package/dist/chunk-EKZH6IDG.js.map +0 -1
- package/dist/chunk-FGZUCXZF.js.map +0 -1
- package/dist/chunk-HFO4ERGQ.js.map +0 -1
- package/dist/chunk-JB5725BI.js +0 -48
- package/dist/chunk-JB5725BI.js.map +0 -1
- package/dist/chunk-LGVMUIRV.js.map +0 -1
- package/dist/chunk-LWR4MXSS.js.map +0 -1
- package/dist/chunk-SRFUT2ZU.js.map +0 -1
- package/dist/chunk-U3CSCMWA.js.map +0 -1
- package/dist/chunk-VCBFUSUZ.js.map +0 -1
- package/dist/fleet-decision-projection-SLNZMS42.js +0 -241
- package/dist/fleet-decision-projection-SLNZMS42.js.map +0 -1
- package/dist/queue-surface-implementation-J4XJFKRW.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/queue-surface-implementation.tsx"],"sourcesContent":["import {\n DndContext,\n DragOverlay,\n PointerSensor,\n closestCenter,\n useSensor,\n useSensors,\n type DragEndEvent,\n type DragStartEvent,\n type Modifier,\n} from \"@dnd-kit/core\";\nimport {\n SortableContext,\n arrayMove,\n useSortable,\n verticalListSortingStrategy,\n} from \"@dnd-kit/sortable\";\nimport { CSS } from \"@dnd-kit/utilities\";\nimport type { SessionPendingInputPreview, SessionTurn, TimelineAnnotation } from \"@opengeni/sdk\";\nimport {\n ArrowDownToLineIcon,\n ArrowUpToLineIcon,\n ChevronDownIcon,\n EllipsisIcon,\n GripVerticalIcon,\n Loader2Icon,\n PencilIcon,\n Trash2Icon,\n ZapIcon,\n} from \"lucide-react\";\nimport {\n useCallback,\n useId,\n useMemo,\n useState,\n type KeyboardEvent as ReactKeyboardEvent,\n} from \"react\";\n\nimport { DropdownMenu } from \"radix-ui\";\nimport type { ComposerState } from \"../hooks/use-composer\";\nimport type { QueueMutationKind, UseTurnQueueResult } from \"../hooks/use-turn-queue\";\nimport {\n type PortalTokenStyle,\n usePortalTokenSource,\n usePortalTokenStyle,\n} from \"../lib/use-portal-token-style\";\nimport { requestQueueDraftEdit } from \"./queue-draft-policy\";\nimport { QueueErrorAlert, QueueStoppingStatus } from \"./queue-surface-state\";\nimport { TimelineAnnotationsChip } from \"./timeline-annotations\";\n\n/** The sole pending-input surface: compact above Goal, Agents, and composer. */\ntype QueueSurfaceCommonProps = {\n /** Focus the composer owned by this queue after checkout/removal. */\n onRequestComposerFocus?: (() => void) | undefined;\n};\n\nexport type QueueSurfaceProps =\n | (QueueSurfaceCommonProps & {\n queue: UseTurnQueueResult;\n composer: ComposerState;\n readOnly?: false | undefined;\n })\n | (QueueSurfaceCommonProps & {\n queue: UseTurnQueueResult;\n composer?: undefined;\n readOnly: true;\n });\n\n/** @internal Pure policy seam for queue/composer embedding tests. */\nexport function queueComposerCheckoutEnabled(\n composer: ComposerState | undefined,\n readOnly: boolean,\n): boolean {\n return !readOnly && composer !== undefined && composer.draftPersistence !== \"disabled\";\n}\n\nexport function QueueSurface({\n queue,\n composer,\n readOnly = false,\n onRequestComposerFocus,\n}: QueueSurfaceProps) {\n const [open, setOpen] = useState(false);\n const [replaceDraftFor, setReplaceDraftFor] = useState<string | null>(null);\n const [announcement, setAnnouncement] = useState(\"\");\n const [draggedTurnId, setDraggedTurnId] = useState<string | null>(null);\n const surface = usePortalTokenSource<HTMLDivElement>();\n const surfaceRef = surface.currentRef;\n const portalTokenStyle = usePortalTokenStyle(surface.source);\n const [keyboardDrag, setKeyboardDrag] = useState<{\n turnId: string;\n projectedIndex: number;\n } | null>(null);\n const count = queue.queue.length;\n const pendingInputCount = queue.pendingInputs.length;\n const totalCount = count + pendingInputCount;\n const attachedInputIds = queue.pendingInputAttachment?.inputIds ?? [];\n const attachedInputs = queue.pendingInputs.filter((input) => attachedInputIds.includes(input.id));\n const standaloneInputs = queue.pendingInputs.filter(\n (input) => !attachedInputIds.includes(input.id),\n );\n const canEditInComposer = queueComposerCheckoutEnabled(composer, readOnly);\n const collapsedPreview = useMemo(() => {\n const firstTurn = queue.queue[0];\n return firstTurn\n ? queueTurnPreview(firstTurn, QUEUE_COLLAPSED_PREVIEW_CHARACTERS)\n : queuePromptPreview(\n queue.pendingInputs[0]?.summary ?? \"\",\n QUEUE_COLLAPSED_PREVIEW_CHARACTERS,\n );\n }, [queue.pendingInputs, queue.queue]);\n const sensors = useSensors(useSensor(PointerSensor, { activationConstraint: { distance: 6 } }));\n\n const displayedQueue = useMemo(() => {\n if (!keyboardDrag) return queue.queue;\n const oldIndex = queue.queue.findIndex((turn) => turn.id === keyboardDrag.turnId);\n if (oldIndex < 0) return queue.queue;\n return arrayMove(queue.queue, oldIndex, keyboardDrag.projectedIndex);\n }, [keyboardDrag, queue.queue]);\n\n const ids = useMemo(() => displayedQueue.map((turn) => turn.id), [displayedQueue]);\n const moveToIndex = useCallback(\n async (turnId: string, nextIndex: number): Promise<void> => {\n const oldIndex = queue.queue.findIndex((turn) => turn.id === turnId);\n if (oldIndex < 0) return;\n const boundedIndex = Math.max(0, Math.min(nextIndex, queue.queue.length - 1));\n if (oldIndex === boundedIndex) return;\n const ordered = arrayMove(queue.queue, oldIndex, boundedIndex);\n const beforeTurnId = ordered[boundedIndex + 1]?.id ?? null;\n const moved = await queue.moveTurn(turnId, beforeTurnId);\n setAnnouncement(\n moved\n ? `Queued prompt moved to position ${boundedIndex + 1}.`\n : \"The queue changed before that prompt could be moved. Refreshed server order.\",\n );\n if (moved) focusQueueTurn(surfaceRef.current, turnId);\n },\n [queue, surfaceRef],\n );\n\n const onDragEnd = useCallback(\n (event: DragEndEvent) => {\n setDraggedTurnId(null);\n const activeId = String(event.active.id);\n const overId = event.over ? String(event.over.id) : null;\n if (!overId || activeId === overId) {\n setAnnouncement(\"Queued prompt returned to its original position.\");\n return;\n }\n const nextIndex = queue.queue.findIndex((turn) => turn.id === overId);\n if (nextIndex >= 0) void moveToIndex(activeId, nextIndex);\n },\n [moveToIndex, queue.queue],\n );\n\n const onDragStart = useCallback(\n (event: DragStartEvent) => {\n setKeyboardDrag(null);\n const turnId = String(event.active.id);\n const position = queue.queue.findIndex((turn) => turn.id === turnId) + 1;\n setDraggedTurnId(turnId);\n setAnnouncement(`Dragging queued prompt ${position} of ${queue.queue.length}.`);\n },\n [queue.queue],\n );\n\n const onHandleKeyDown = useCallback(\n (event: ReactKeyboardEvent<HTMLButtonElement>, turnId: string) => {\n const canonicalIndex = queue.queue.findIndex((turn) => turn.id === turnId);\n if (canonicalIndex < 0) return;\n\n if (!keyboardDrag) {\n if (event.key !== \" \") return;\n event.preventDefault();\n setKeyboardDrag({ turnId, projectedIndex: canonicalIndex });\n setAnnouncement(\n `Lifted queued prompt ${canonicalIndex + 1} of ${count}. Use arrow keys to move it, then press Space to drop.`,\n );\n return;\n }\n if (keyboardDrag.turnId !== turnId) return;\n\n if (event.key === \"Escape\") {\n event.preventDefault();\n setKeyboardDrag(null);\n setAnnouncement(\"Queue reorder cancelled.\");\n return;\n }\n if (event.key === \" \") {\n event.preventDefault();\n const targetIndex = keyboardDrag.projectedIndex;\n setAnnouncement(`Moving queued prompt to position ${targetIndex + 1}.`);\n void moveToIndex(turnId, targetIndex).finally(() => setKeyboardDrag(null));\n return;\n }\n\n const direction = event.key === \"ArrowUp\" ? -1 : event.key === \"ArrowDown\" ? 1 : 0;\n const edge = event.key === \"Home\" ? 0 : event.key === \"End\" ? count - 1 : null;\n if (direction === 0 && edge === null) return;\n event.preventDefault();\n const projectedIndex = Math.max(\n 0,\n Math.min(edge ?? keyboardDrag.projectedIndex + direction, count - 1),\n );\n setKeyboardDrag({ turnId, projectedIndex });\n setAnnouncement(`Queued prompt projected to position ${projectedIndex + 1} of ${count}.`);\n },\n [count, keyboardDrag, moveToIndex, queue.queue],\n );\n\n const edit = useCallback(\n async (turn: SessionTurn, replaceDraft: boolean) => {\n if (!composer || !canEditInComposer) return;\n const restored = await queue.editTurn(turn.id, {\n expectedDraftRevision: composer.draftRevision,\n replaceDraft,\n });\n if (!restored) return;\n composer.applyDraft(restored);\n setReplaceDraftFor(null);\n setAnnouncement(\"Queued prompt moved back to the composer for editing.\");\n window.requestAnimationFrame(() => {\n if (onRequestComposerFocus) {\n onRequestComposerFocus();\n return;\n }\n const input = document.querySelector<HTMLTextAreaElement>(\n 'textarea[aria-label=\"Message the agent\"]',\n );\n input?.scrollIntoView({ block: \"nearest\", behavior: \"smooth\" });\n input?.focus();\n });\n },\n [canEditInComposer, composer, onRequestComposerFocus, queue],\n );\n\n const requestEdit = useCallback(\n (turn: SessionTurn) => {\n if (!composer || !canEditInComposer) return;\n requestQueueDraftEdit(\n composer,\n () => setReplaceDraftFor(turn.id),\n () => void edit(turn, false),\n );\n },\n [canEditInComposer, composer, edit],\n );\n\n if (totalCount === 0 && !queue.stoppingPreviousAttempt && !queue.error && !queue.mutationError)\n return null;\n\n return (\n <div\n ref={surface.ref}\n className=\"og-root mx-auto mb-2 w-full max-w-3xl shrink-0 px-4 sm:px-6\"\n data-testid=\"queue-surface\"\n >\n <div className=\"overflow-hidden rounded-lg border border-border bg-surface/80 shadow-sm\">\n {queue.stoppingPreviousAttempt ? <QueueStoppingStatus queue={queue} dividerAfter /> : null}\n <button\n type=\"button\"\n className=\"flex w-full min-w-0 flex-wrap items-center gap-2 px-3 py-2 text-left outline-hidden transition-colors hover:bg-surface-2/60 focus-visible:bg-surface-2/60 focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring/40 pointer-coarse:min-h-[44px]\"\n onClick={() => setOpen((value) => !value)}\n aria-description={!open && totalCount > 0 ? collapsedPreview.summary : undefined}\n aria-expanded={open}\n aria-label={`${count} queued prompt${count === 1 ? \"\" : \"s\"}${\n pendingInputCount > 0\n ? ` and ${pendingInputCount} pending machine input${pendingInputCount === 1 ? \"\" : \"s\"}`\n : \"\"\n }${readOnly ? \" Read-only\" : \"\"}`}\n >\n <ChevronDownIcon\n aria-hidden=\"true\"\n className={`size-3.5 shrink-0 text-fg-subtle transition-transform ${open ? \"rotate-180\" : \"\"}`}\n />\n <span className=\"text-og-control font-medium text-fg\">\n {count > 0 ? `${count} queued prompt${count === 1 ? \"\" : \"s\"}` : null}\n {count > 0 && pendingInputCount > 0 ? \" · \" : null}\n {pendingInputCount > 0\n ? `${pendingInputCount} incoming update${pendingInputCount === 1 ? \"\" : \"s\"}`\n : null}\n </span>\n {readOnly ? (\n <span className=\"shrink-0 rounded border border-border px-1.5 py-0.5 text-og-xs text-fg-subtle\">\n Read-only\n </span>\n ) : null}\n {!open && totalCount > 0 ? (\n <span\n aria-hidden=\"true\"\n className={`max-w-full truncate text-fg-muted ${\n collapsedPreview.collapsedVisual === collapsedPreview.summary\n ? \"min-w-0 flex-1 text-og-control\"\n : \"shrink-0 text-[10px]\"\n }`}\n data-testid=\"queue-collapsed-preview\"\n dir=\"auto\"\n >\n {collapsedPreview.collapsedVisual}\n </span>\n ) : null}\n {queue.loading ? <Loader2Icon className=\"ml-auto size-3.5 animate-spin\" /> : null}\n </button>\n\n {open && standaloneInputs.length > 0 ? (\n <PendingMachineInputs inputs={standaloneInputs} />\n ) : null}\n\n {open && count > 0 && readOnly ? (\n <ol\n className=\"max-h-[min(30rem,60dvh)] divide-y divide-border overflow-y-auto overscroll-contain border-t border-border\"\n aria-label=\"Queued prompts\"\n data-testid=\"queue-list\"\n >\n {queue.queue.map((turn, index) => (\n <ReadOnlyQueueRow\n key={turn.id}\n turn={turn}\n index={index}\n attachedInputs={\n turn.id === queue.pendingInputAttachment?.turnId ? attachedInputs : []\n }\n onDisclosureChange={(expanded) =>\n setAnnouncement(\n `Full content for queued prompt ${index + 1} ${expanded ? \"shown\" : \"hidden\"}.`,\n )\n }\n />\n ))}\n </ol>\n ) : null}\n\n {open && count > 0 && !readOnly ? (\n <DndContext\n sensors={sensors}\n collisionDetection={closestCenter}\n modifiers={[verticalOnly]}\n onDragStart={onDragStart}\n onDragCancel={() => {\n setDraggedTurnId(null);\n setAnnouncement(\"Queue reorder cancelled.\");\n }}\n onDragEnd={onDragEnd}\n >\n <SortableContext items={ids} strategy={verticalListSortingStrategy}>\n <ol\n className=\"max-h-[min(30rem,60dvh)] divide-y divide-border overflow-y-auto overscroll-contain border-t border-border\"\n aria-label=\"Queued prompts\"\n data-testid=\"queue-list\"\n >\n {displayedQueue.map((turn, index) => (\n <SortableQueueRow\n key={turn.id}\n turn={turn}\n index={index}\n count={count}\n attachedInputs={\n turn.id === queue.pendingInputAttachment?.turnId ? attachedInputs : []\n }\n pending={queue.mutationFor(turn.id)}\n confirmingReplace={replaceDraftFor === turn.id}\n keyboardDragging={keyboardDrag?.turnId === turn.id}\n portalTokenStyle={portalTokenStyle}\n onHandleKeyDown={(event) => onHandleKeyDown(event, turn.id)}\n onMove={(nextIndex) => void moveToIndex(turn.id, nextIndex)}\n onEdit={canEditInComposer ? () => requestEdit(turn) : undefined}\n onConfirmReplace={() => void edit(turn, true)}\n onCancelReplace={() => setReplaceDraftFor(null)}\n onSteer={() => {\n void queue.steerTurn(turn.id).then((steered) => {\n setAnnouncement(\n steered\n ? \"Queued prompt is now the next direction.\"\n : \"That prompt changed before it could be steered.\",\n );\n if (steered) {\n focusAfterQueueRemoval(surfaceRef.current, index, onRequestComposerFocus);\n }\n });\n }}\n onDelete={() => {\n void queue.removeTurn(turn.id).then((removed) => {\n setAnnouncement(\n removed\n ? \"Queued prompt deleted.\"\n : \"That prompt changed before it could be deleted.\",\n );\n if (removed) {\n focusAfterQueueRemoval(surfaceRef.current, index, onRequestComposerFocus);\n }\n });\n }}\n onDisclosureChange={(expanded) =>\n setAnnouncement(\n `Full content for queued prompt ${index + 1} ${expanded ? \"shown\" : \"hidden\"}.`,\n )\n }\n />\n ))}\n </ol>\n </SortableContext>\n <DragOverlay modifiers={[verticalOnly]}>\n {draggedTurnId ? (\n <div\n className=\"max-h-20 w-[min(36rem,calc(100vw-2rem))] max-w-[calc(100vw-2rem)] overflow-hidden rounded-md border border-brand/40 bg-surface px-3 py-2 text-og-control text-fg shadow-lg\"\n data-testid=\"queue-drag-overlay\"\n >\n <p\n aria-hidden=\"true\"\n className=\"line-clamp-3 break-all whitespace-pre-wrap [unicode-bidi:plaintext]\"\n dir=\"auto\"\n >\n {\n queueTurnPreview(\n queue.queue.find((turn) => turn.id === draggedTurnId),\n QUEUE_ROW_PREVIEW_CHARACTERS,\n ).summary\n }\n </p>\n </div>\n ) : null}\n </DragOverlay>\n </DndContext>\n ) : null}\n\n {queue.error || queue.mutationError ? (\n <QueueErrorAlert queue={queue} dividerBefore />\n ) : null}\n </div>\n <p className=\"sr-only\" aria-live=\"polite\" aria-atomic=\"true\">\n {announcement}\n </p>\n </div>\n );\n}\n\nfunction PendingMachineInputs({\n inputs,\n attached = false,\n}: {\n inputs: SessionPendingInputPreview[];\n attached?: boolean;\n}) {\n return (\n <section className=\"border-t border-border px-3 py-2\">\n <p className=\"text-og-xs font-medium text-fg-subtle\">\n {attached\n ? `${inputs.length} update${inputs.length === 1 ? \"\" : \"s\"} will join this prompt`\n : \"Incoming updates waiting to run\"}\n </p>\n <ol className=\"mt-1 space-y-1\">\n {inputs.map((input) => (\n <li\n key={input.id}\n className=\"line-clamp-3 break-words text-og-control text-fg\"\n dir=\"auto\"\n >\n <strong className=\"capitalize text-fg-muted\">\n {input.kind.replace(\"_terminal\", \"\").replaceAll(\"_\", \" \")}\n </strong>{\" \"}\n · {input.sourceId}\n {input.summary ? ` — ${input.summary}` : \"\"}\n </li>\n ))}\n </ol>\n </section>\n );\n}\n\nconst QUEUE_ROW_PREVIEW_CHARACTERS = 360;\nconst QUEUE_COLLAPSED_PREVIEW_CHARACTERS = 180;\nconst QUEUE_PREVIEW_GRAPHEME_CONTEXT_CHARACTERS = 32;\nconst QUEUE_PREVIEW_REFERENCE_SAMPLE_CHARACTERS = 32;\nconst QUEUE_VISIBLE_END_IDENTITY_CHARACTERS = 18;\nconst QUEUE_PREVIEW_SEPARATOR = \" … \";\nconst queuePreviewSegmenter = new Intl.Segmenter(undefined, { granularity: \"grapheme\" });\nconst queuePromptNonRenderingCodePoint =\n /[\\p{White_Space}\\p{Control}\\p{Default_Ignorable_Code_Point}]/u;\n\ntype BoundedPromptSample = {\n value: string;\n characters: number;\n truncated: boolean;\n};\n\ntype QueuePromptPreview = {\n summary: string;\n collapsedVisual: string;\n visibleStart: string;\n visibleIdentity: string | null;\n visibleIdentityLabel: \"End\" | \"Safe boundary\" | null;\n isFallback: boolean;\n};\n\nfunction annotationOnlyQueuePreview(count: number): QueuePromptPreview {\n const summary = `${count} timeline ${count === 1 ? \"annotation\" : \"annotations\"}`;\n return {\n summary,\n collapsedVisual: summary,\n visibleStart: summary,\n visibleIdentity: null,\n visibleIdentityLabel: null,\n isFallback: false,\n };\n}\n\nfunction queueTurnPreview(\n turn: SessionTurn | undefined,\n maxCharacters: number,\n): QueuePromptPreview {\n if (!turn) return queuePromptPreview(\"\", maxCharacters);\n const annotations = turn.annotations ?? [];\n return turn.prompt.length === 0 && annotations.length > 0\n ? annotationOnlyQueuePreview(annotations.length)\n : queuePromptPreview(turn.prompt, maxCharacters);\n}\n\n/**\n * Build a bounded head/tail summary of an arbitrary queued prompt. Sampling\n * both ends distinguishes prompts with equal long prefixes. Each sampled edge\n * has a small amount of grapheme context so ordinary emoji/combining sequences\n * can be retained whole. A cluster that exceeds that context is omitted rather\n * than fragmented, and malformed UTF-16 is replaced only in the summary. The\n * durable prompt remains exact and no operation scans or copies it in full.\n */\nfunction queuePromptPreview(prompt: string, maxCharacters: number): QueuePromptPreview {\n const wholePromptProbe = samplePromptStart(prompt, maxCharacters + 1);\n if (!wholePromptProbe.truncated && wholePromptProbe.characters <= maxCharacters) {\n const summary = replaceLoneSurrogates(wholePromptProbe.value);\n return hasVisiblePromptContent(summary)\n ? {\n summary,\n collapsedVisual: summary,\n visibleStart: summary,\n visibleIdentity: null,\n visibleIdentityLabel: null,\n isFallback: false,\n }\n : fallbackPromptPreview(prompt.length, wholePromptProbe.value, wholePromptProbe.value);\n }\n\n const suffixCharacters = Math.min(Math.floor(maxCharacters / 3), 120);\n const prefixCharacters =\n maxCharacters - codePointLength(QUEUE_PREVIEW_SEPARATOR) - suffixCharacters;\n const prefixSample = samplePromptStart(\n prompt,\n prefixCharacters + QUEUE_PREVIEW_GRAPHEME_CONTEXT_CHARACTERS,\n );\n const suffixSample = samplePromptEnd(\n prompt,\n suffixCharacters + QUEUE_PREVIEW_GRAPHEME_CONTEXT_CHARACTERS,\n );\n const prefixSegments = segmentPromptSample(prefixSample.value);\n const suffixSegments = segmentPromptSample(suffixSample.value);\n\n // A cluster at a truncated sampling edge may continue outside the sample.\n // Prefix sampling starts at the true source start, so only its last segment\n // is ambiguous. Suffix sampling ends at the true source end, so its first is.\n if (prefixSample.truncated) prefixSegments.pop();\n if (suffixSample.truncated) {\n let ambiguousSegment = suffixSegments.shift();\n // A locally segmented leading fragment ending in ZWJ can join the next\n // pictographic segment when omitted left context supplies its base. Keep\n // backing off until that uncertainty no longer propagates to the right.\n while (ambiguousSegment?.endsWith(\"\\u200d\") && suffixSegments.length > 0) {\n ambiguousSegment = suffixSegments.shift();\n }\n // Regional Indicator pairing depends on the parity of the preceding run.\n // If that run reaches the unknown sample boundary, omit all of its visible\n // leading segments rather than potentially recombining halves of flags.\n while (suffixSegments[0] && startsWithRegionalIndicator(suffixSegments[0])) {\n suffixSegments.shift();\n }\n }\n\n const prefix = takeWholeGraphemesFromStart(prefixSegments, prefixCharacters);\n const suffix = takeWholeGraphemesFromEnd(suffixSegments, suffixCharacters);\n const reference = boundedPromptSampleReference(\n prompt.length,\n prefixSample.value,\n suffixSample.value,\n );\n\n if (!hasVisiblePromptContent(prefix) && !hasVisiblePromptContent(suffix)) {\n return fallbackPromptPreview(prompt.length, prefixSample.value, suffixSample.value);\n }\n\n const safeSuffix = hasVisiblePromptContent(suffix)\n ? suffix\n : promptPreviewFallbackLabel(reference);\n const summary = `${prefix}${QUEUE_PREVIEW_SEPARATOR}${safeSuffix}`;\n if (!hasVisiblePromptContent(prefix)) {\n return {\n summary,\n collapsedVisual: summary,\n visibleStart: safeSuffix,\n visibleIdentity: null,\n visibleIdentityLabel: null,\n isFallback: false,\n };\n }\n\n const endIdentity = takeWholeGraphemesFromEnd(\n suffixSegments,\n QUEUE_VISIBLE_END_IDENTITY_CHARACTERS,\n );\n return {\n summary,\n collapsedVisual: summary,\n visibleStart: prefix,\n visibleIdentity: hasVisiblePromptContent(endIdentity) ? endIdentity : `ref ${reference}`,\n visibleIdentityLabel: hasVisiblePromptContent(endIdentity) ? \"End\" : \"Safe boundary\",\n isFallback: false,\n };\n}\n\nfunction fallbackPromptPreview(\n promptLength: number,\n startSample: string,\n endSample: string,\n): QueuePromptPreview {\n const reference = boundedPromptSampleReference(promptLength, startSample, endSample);\n const summary = promptPreviewFallbackLabel(reference);\n return {\n summary,\n collapsedVisual: `Omitted · ${reference}`,\n // The complete fallback remains the canonical accessible summary. Narrow\n // collapsed/row layouts paint the bounded reference in a compact truthful\n // form so ellipsis cannot hide the only identifying portion.\n visibleStart: `Omitted · ${reference}`,\n visibleIdentity: null,\n visibleIdentityLabel: null,\n isFallback: true,\n };\n}\n\nfunction promptPreviewFallbackLabel(reference: string): string {\n return `Content omitted at safe boundary · ref ${reference}`;\n}\n\nfunction boundedPromptSampleReference(\n promptLength: number,\n startSample: string,\n endSample: string,\n): string {\n const head = samplePromptStart(startSample, QUEUE_PREVIEW_REFERENCE_SAMPLE_CHARACTERS).value;\n const tail = samplePromptEnd(endSample, QUEUE_PREVIEW_REFERENCE_SAMPLE_CHARACTERS).value;\n let hash = 0x811c9dc5;\n for (const value of [String(promptLength), head, tail]) {\n for (let index = 0; index < value.length; index += 1) {\n hash ^= value.charCodeAt(index);\n hash = Math.imul(hash, 0x01000193);\n }\n hash ^= 0xffff;\n hash = Math.imul(hash, 0x01000193);\n }\n return (hash >>> 0).toString(16).padStart(8, \"0\").toUpperCase();\n}\n\nfunction hasVisiblePromptContent(value: string): boolean {\n // Callers pass only the already-bounded whole/head/tail preview samples.\n // Default-ignorables and controls can survive trim() while painting no row\n // identity at all (for example ZWJ, VS16, bidi controls, and tag characters).\n for (const character of value) {\n if (!queuePromptNonRenderingCodePoint.test(character)) return true;\n }\n return false;\n}\n\nfunction samplePromptStart(prompt: string, maxCharacters: number): BoundedPromptSample {\n let end = 0;\n let characters = 0;\n while (end < prompt.length && characters < maxCharacters) {\n const first = prompt.charCodeAt(end);\n end +=\n isHighSurrogate(first) &&\n end + 1 < prompt.length &&\n isLowSurrogate(prompt.charCodeAt(end + 1))\n ? 2\n : 1;\n characters += 1;\n }\n return { value: prompt.slice(0, end), characters, truncated: end < prompt.length };\n}\n\nfunction samplePromptEnd(prompt: string, maxCharacters: number): BoundedPromptSample {\n let start = prompt.length;\n let characters = 0;\n while (start > 0 && characters < maxCharacters) {\n start -= 1;\n if (\n isLowSurrogate(prompt.charCodeAt(start)) &&\n start > 0 &&\n isHighSurrogate(prompt.charCodeAt(start - 1))\n ) {\n start -= 1;\n }\n characters += 1;\n }\n return { value: prompt.slice(start), characters, truncated: start > 0 };\n}\n\nfunction segmentPromptSample(sample: string): string[] {\n return Array.from(\n queuePreviewSegmenter.segment(replaceLoneSurrogates(sample)),\n ({ segment }) => segment,\n );\n}\n\nfunction replaceLoneSurrogates(value: string): string {\n let sanitized = \"\";\n for (let index = 0; index < value.length; index += 1) {\n const current = value.charCodeAt(index);\n if (\n isHighSurrogate(current) &&\n index + 1 < value.length &&\n isLowSurrogate(value.charCodeAt(index + 1))\n ) {\n sanitized += value.slice(index, index + 2);\n index += 1;\n } else if (isHighSurrogate(current) || isLowSurrogate(current)) {\n sanitized += \"�\";\n } else {\n sanitized += value[index];\n }\n }\n return sanitized;\n}\n\nfunction takeWholeGraphemesFromStart(segments: string[], maxCharacters: number): string {\n const selected: string[] = [];\n let characters = 0;\n for (const segment of segments) {\n const segmentCharacters = codePointLength(segment);\n if (characters + segmentCharacters > maxCharacters) break;\n selected.push(segment);\n characters += segmentCharacters;\n }\n while (selected.at(-1)?.trim().length === 0) selected.pop();\n return selected.join(\"\");\n}\n\nfunction takeWholeGraphemesFromEnd(segments: string[], maxCharacters: number): string {\n const selected: string[] = [];\n let characters = 0;\n for (let index = segments.length - 1; index >= 0; index -= 1) {\n const segment = segments[index];\n if (!segment) continue;\n const segmentCharacters = codePointLength(segment);\n if (characters + segmentCharacters > maxCharacters) break;\n selected.unshift(segment);\n characters += segmentCharacters;\n }\n while (selected[0]?.trim().length === 0) selected.shift();\n while (selected.at(-1)?.trim().length === 0) selected.pop();\n return selected.join(\"\");\n}\n\nfunction codePointLength(value: string): number {\n let characters = 0;\n for (const _character of value) characters += 1;\n return characters;\n}\n\nfunction startsWithRegionalIndicator(value: string): boolean {\n const codePoint = value.codePointAt(0);\n return codePoint !== undefined && codePoint >= 0x1f1e6 && codePoint <= 0x1f1ff;\n}\n\nfunction isHighSurrogate(codeUnit: number): boolean {\n return codeUnit >= 0xd800 && codeUnit <= 0xdbff;\n}\n\nfunction isLowSurrogate(codeUnit: number): boolean {\n return codeUnit >= 0xdc00 && codeUnit <= 0xdfff;\n}\n\nfunction QueuePrompt({\n prompt,\n annotations,\n index,\n onDisclosureChange,\n}: {\n prompt: string;\n annotations: readonly TimelineAnnotation[];\n index: number;\n onDisclosureChange: (expanded: boolean) => void;\n}) {\n const [expanded, setExpanded] = useState(false);\n const fullContentId = useId();\n const preview = useMemo(\n () =>\n prompt.length === 0 && annotations.length > 0\n ? annotationOnlyQueuePreview(annotations.length)\n : queuePromptPreview(prompt, QUEUE_ROW_PREVIEW_CHARACTERS),\n [annotations.length, prompt],\n );\n\n return (\n <div className=\"w-full min-w-0 max-w-full\">\n {prompt ? (\n <div\n aria-label={`Queued prompt ${index + 1} summary: ${preview.summary}`}\n className=\"max-w-full overflow-hidden text-og-control leading-5 text-fg\"\n data-testid={`queue-prompt-preview-${index + 1}`}\n dir=\"auto\"\n role=\"note\"\n >\n <span\n aria-hidden=\"true\"\n className=\"flex min-w-0 max-w-full items-baseline gap-2 sm:block\"\n >\n <span\n className={`${preview.isFallback ? \"\" : \"line-clamp-1 sm:line-clamp-2\"} min-w-0 flex-1 whitespace-pre-wrap break-all [unicode-bidi:plaintext]`}\n data-testid={`queue-prompt-start-${index + 1}`}\n dir=\"auto\"\n >\n {preview.visibleStart}\n </span>\n {preview.visibleIdentity && preview.visibleIdentityLabel ? (\n <span\n className=\"flex min-w-0 max-w-[70%] shrink-0 items-center gap-1 text-og-xs leading-4 text-fg-muted sm:mt-0.5 sm:max-w-full\"\n data-testid={`queue-prompt-identity-row-${index + 1}`}\n >\n <span className=\"shrink-0 font-medium text-fg-subtle\">\n {preview.visibleIdentityLabel}\n </span>\n <span\n className=\"min-w-0 overflow-hidden text-ellipsis whitespace-nowrap font-mono [unicode-bidi:plaintext]\"\n data-testid={`queue-prompt-identity-${index + 1}`}\n dir=\"auto\"\n >\n {preview.visibleIdentity}\n </span>\n </span>\n ) : null}\n </span>\n </div>\n ) : null}\n {annotations.length > 0 ? (\n <TimelineAnnotationsChip\n annotations={annotations}\n className={prompt ? \"mt-1\" : undefined}\n />\n ) : null}\n {prompt ? (\n <button\n type=\"button\"\n aria-controls={fullContentId}\n aria-expanded={expanded}\n aria-label={`${expanded ? \"Hide\" : \"Show\"} full content for queued prompt ${index + 1}`}\n className=\"mt-1 inline-flex min-h-7 min-w-0 max-w-full items-center gap-1 whitespace-normal rounded-md text-left text-og-xs font-medium text-fg outline-hidden focus-visible:ring-2 focus-visible:ring-ring/40 pointer-coarse:min-h-[44px]\"\n data-testid={`queue-prompt-disclosure-${index + 1}`}\n onClick={() => {\n const next = !expanded;\n setExpanded(next);\n onDisclosureChange(next);\n }}\n >\n <ChevronDownIcon\n aria-hidden=\"true\"\n className={`size-3 shrink-0 transition-transform ${expanded ? \"rotate-180\" : \"\"}`}\n />\n {expanded ? \"Hide full prompt\" : \"View full prompt\"}\n </button>\n ) : null}\n {expanded && prompt ? (\n <pre\n id={fullContentId}\n role=\"region\"\n aria-label={`Full content for queued prompt ${index + 1}`}\n className=\"mt-1.5 max-h-64 w-full min-w-0 max-w-full overflow-auto overscroll-contain rounded-md border border-border bg-surface-2/60 p-2 whitespace-pre-wrap break-all font-mono text-og-control leading-5 text-fg [unicode-bidi:plaintext]\"\n data-testid={`queue-prompt-full-${index + 1}`}\n dir=\"auto\"\n tabIndex={0}\n >\n {prompt}\n </pre>\n ) : null}\n </div>\n );\n}\n\nfunction ReadOnlyQueueRow({\n turn,\n index,\n attachedInputs,\n onDisclosureChange,\n}: {\n turn: SessionTurn;\n index: number;\n attachedInputs: SessionPendingInputPreview[];\n onDisclosureChange: (expanded: boolean) => void;\n}) {\n return (\n <li className=\"flex min-w-0 items-start gap-2 bg-surface px-3 py-2\">\n <span className=\"mt-1 shrink-0 font-mono text-og-xs text-fg-subtle\">{index + 1}</span>\n <div className=\"min-w-0 flex-1\">\n <QueuePrompt\n prompt={turn.prompt}\n annotations={turn.annotations ?? []}\n index={index}\n onDisclosureChange={onDisclosureChange}\n />\n {attachedInputs.length > 0 ? (\n <PendingMachineInputs inputs={attachedInputs} attached />\n ) : null}\n <div className=\"mt-1 flex min-w-0 items-center gap-2 overflow-hidden whitespace-nowrap text-og-xs text-fg-subtle\">\n {turn.resources.length > 0 ? (\n <span className=\"shrink-0\">\n {turn.resources.length} resource{turn.resources.length === 1 ? \"\" : \"s\"}\n </span>\n ) : null}\n {turn.tools.length > 0 ? (\n <span className=\"shrink-0\">\n {turn.tools.length} tool{turn.tools.length === 1 ? \"\" : \"s\"}\n </span>\n ) : null}\n <span className=\"min-w-0 truncate\">{turn.model}</span>\n <span className=\"shrink-0\">{turn.reasoningEffort}</span>\n </div>\n </div>\n </li>\n );\n}\n\nfunction SortableQueueRow({\n turn,\n index,\n count,\n attachedInputs,\n pending,\n confirmingReplace,\n keyboardDragging,\n portalTokenStyle,\n onHandleKeyDown,\n onMove,\n onEdit,\n onConfirmReplace,\n onCancelReplace,\n onSteer,\n onDelete,\n onDisclosureChange,\n}: {\n turn: SessionTurn;\n index: number;\n count: number;\n attachedInputs: SessionPendingInputPreview[];\n pending: QueueMutationKind | null;\n confirmingReplace: boolean;\n keyboardDragging: boolean;\n portalTokenStyle: PortalTokenStyle;\n onHandleKeyDown: (event: ReactKeyboardEvent<HTMLButtonElement>) => void;\n onMove: (index: number) => void;\n onEdit?: (() => void) | undefined;\n onConfirmReplace: () => void;\n onCancelReplace: () => void;\n onSteer: () => void;\n onDelete: () => void;\n onDisclosureChange: (expanded: boolean) => void;\n}) {\n const sortable = useSortable({\n id: turn.id,\n disabled: pending !== null || keyboardDragging,\n });\n return (\n <li\n data-queue-turn-id={turn.id}\n ref={sortable.setNodeRef}\n style={{\n transform: CSS.Transform.toString(sortable.transform),\n transition: sortable.transition,\n }}\n className={`bg-surface ${sortable.isDragging || keyboardDragging ? \"relative z-10 shadow-lg ring-1 ring-brand/40\" : \"\"}`}\n >\n <div className=\"grid min-w-0 grid-cols-[auto_minmax(0,1fr)] items-start gap-x-1.5 px-2 py-1.5 sm:grid-cols-[auto_auto_minmax(0,1fr)_auto] sm:gap-x-2 sm:px-3 sm:py-2\">\n <button\n data-queue-handle\n ref={sortable.setActivatorNodeRef}\n type=\"button\"\n {...sortable.attributes}\n {...sortable.listeners}\n onKeyDown={onHandleKeyDown}\n disabled={pending !== null}\n className=\"col-start-1 row-start-1 mt-0.5 inline-flex size-7 shrink-0 touch-none items-center justify-center rounded-md text-fg-subtle hover:bg-surface-2 hover:text-fg focus-visible:ring-2 focus-visible:ring-ring/40 pointer-coarse:size-[44px]\"\n aria-label={`Reorder queued prompt ${index + 1}`}\n title=\"Drag to reorder. Press Space, arrows, then Space to drop.\"\n >\n <GripVerticalIcon className=\"size-3.5\" />\n </button>\n <span className=\"col-start-2 row-start-1 mt-1 shrink-0 font-mono text-og-xs text-fg-subtle\">\n {index + 1}\n </span>\n <div className=\"col-span-full row-start-2 min-w-0 sm:col-span-1 sm:col-start-3 sm:row-start-1\">\n <QueuePrompt\n prompt={turn.prompt}\n annotations={turn.annotations ?? []}\n index={index}\n onDisclosureChange={onDisclosureChange}\n />\n {attachedInputs.length > 0 ? (\n <PendingMachineInputs inputs={attachedInputs} attached />\n ) : null}\n <div className=\"mt-1 flex min-w-0 items-center gap-2 overflow-hidden whitespace-nowrap text-og-xs text-fg-subtle\">\n {turn.resources.length > 0 ? (\n <span className=\"shrink-0\">\n {turn.resources.length} resource{turn.resources.length === 1 ? \"\" : \"s\"}\n </span>\n ) : null}\n {turn.tools.length > 0 ? (\n <span className=\"shrink-0\">\n {turn.tools.length} tool{turn.tools.length === 1 ? \"\" : \"s\"}\n </span>\n ) : null}\n <span className=\"min-w-0 truncate\">{turn.model}</span>\n <span className=\"shrink-0\">{turn.reasoningEffort}</span>\n </div>\n </div>\n <div className=\"col-span-full row-start-3 flex min-w-0 items-start justify-end gap-1.5 sm:col-span-1 sm:col-start-4 sm:row-start-1 sm:gap-2\">\n <button\n type=\"button\"\n disabled={pending !== null}\n onClick={onSteer}\n aria-label={`Steer queued prompt ${index + 1}`}\n title=\"Steer — interrupt the current turn and send this message now\"\n className=\"inline-flex h-7 shrink-0 items-center justify-center gap-1 rounded-md px-2 text-og-control font-medium text-fg outline-hidden transition-[background-color] hover:bg-surface-2 focus-visible:ring-2 focus-visible:ring-ring/40 disabled:pointer-events-none disabled:opacity-50 pointer-coarse:min-h-[44px] pointer-coarse:min-w-[44px]\"\n >\n {pending === \"steer\" ? (\n <Loader2Icon className=\"size-3.5 animate-spin\" />\n ) : (\n <ZapIcon className=\"size-3.5\" />\n )}\n <span className=\"hidden sm:inline\">Steer</span>\n </button>\n <button\n type=\"button\"\n disabled={pending !== null}\n onClick={onDelete}\n aria-label={`Delete queued prompt ${index + 1}`}\n title=\"Delete this queued prompt\"\n className=\"inline-flex size-7 shrink-0 items-center justify-center rounded-md outline-hidden transition-colors hover:bg-surface-2 hover:text-status-failed focus-visible:ring-2 focus-visible:ring-ring/40 disabled:pointer-events-none disabled:opacity-50 pointer-coarse:size-[44px]\"\n >\n {pending === \"delete\" ? (\n <Loader2Icon className=\"size-3.5 animate-spin\" />\n ) : (\n <Trash2Icon className=\"size-3.5\" />\n )}\n </button>\n <DropdownMenu.Root>\n <DropdownMenu.Trigger asChild>\n <button\n type=\"button\"\n disabled={pending !== null}\n aria-label={`More actions for queued prompt ${index + 1}`}\n className=\"inline-flex size-7 shrink-0 items-center justify-center rounded-md outline-hidden transition-colors hover:bg-surface-2 focus-visible:ring-2 focus-visible:ring-ring/40 disabled:pointer-events-none disabled:opacity-50 pointer-coarse:size-[44px]\"\n >\n {pending && pending !== \"steer\" && pending !== \"delete\" ? (\n <Loader2Icon className=\"size-3.5 animate-spin\" />\n ) : (\n <EllipsisIcon className=\"size-3.5\" />\n )}\n </button>\n </DropdownMenu.Trigger>\n <DropdownMenu.Portal>\n <DropdownMenu.Content\n align=\"end\"\n sideOffset={4}\n className=\"og-root z-50 w-48 max-w-[calc(100vw-16px)] rounded-md border border-border bg-surface p-1 text-og-control text-fg shadow-lg\"\n style={portalTokenStyle}\n data-testid={`queue-actions-menu-${index + 1}`}\n >\n {onEdit ? (\n <>\n <DropdownMenu.Item\n className=\"flex min-w-0 cursor-default items-center gap-2 whitespace-normal break-words rounded-sm px-2 py-1.5 outline-hidden focus:bg-surface-2 pointer-coarse:min-h-[44px]\"\n onSelect={onEdit}\n >\n <PencilIcon className=\"size-3.5\" /> Edit in composer\n </DropdownMenu.Item>\n <DropdownMenu.Separator className=\"my-1 h-px bg-border\" />\n </>\n ) : null}\n <DropdownMenu.Item\n className=\"flex min-w-0 cursor-default items-center gap-2 whitespace-normal break-words rounded-sm px-2 py-1.5 outline-hidden focus:bg-surface-2 data-[disabled]:opacity-50 pointer-coarse:min-h-[44px]\"\n disabled={index === 0}\n onSelect={() => onMove(0)}\n >\n <ArrowUpToLineIcon className=\"size-3.5\" /> Move to top\n </DropdownMenu.Item>\n <DropdownMenu.Item\n className=\"flex min-w-0 cursor-default items-center gap-2 whitespace-normal break-words rounded-sm px-2 py-1.5 outline-hidden focus:bg-surface-2 data-[disabled]:opacity-50 pointer-coarse:min-h-[44px]\"\n disabled={index === 0}\n onSelect={() => onMove(index - 1)}\n >\n Move up\n </DropdownMenu.Item>\n <DropdownMenu.Item\n className=\"flex min-w-0 cursor-default items-center gap-2 whitespace-normal break-words rounded-sm px-2 py-1.5 outline-hidden focus:bg-surface-2 data-[disabled]:opacity-50 pointer-coarse:min-h-[44px]\"\n disabled={index === count - 1}\n onSelect={() => onMove(index + 1)}\n >\n Move down\n </DropdownMenu.Item>\n <DropdownMenu.Item\n className=\"flex min-w-0 cursor-default items-center gap-2 whitespace-normal break-words rounded-sm px-2 py-1.5 outline-hidden focus:bg-surface-2 data-[disabled]:opacity-50 pointer-coarse:min-h-[44px]\"\n disabled={index === count - 1}\n onSelect={() => onMove(count - 1)}\n >\n <ArrowDownToLineIcon className=\"size-3.5\" /> Move to bottom\n </DropdownMenu.Item>\n </DropdownMenu.Content>\n </DropdownMenu.Portal>\n </DropdownMenu.Root>\n </div>\n </div>\n {confirmingReplace ? (\n <div className=\"mx-3 mb-2 rounded-md border border-status-waiting/30 bg-status-waiting/10 p-2 text-og-control text-fg\">\n <p>Your composer already has a draft. Replace it with this queued prompt?</p>\n <p className=\"mt-0.5 text-fg-muted\">\n The current draft will be permanently discarded; this queued prompt is preserved until\n you confirm.\n </p>\n <div className=\"mt-2 flex justify-end gap-1.5\">\n <button\n type=\"button\"\n className=\"rounded-md px-2 py-1 font-medium hover:bg-surface-2 focus-visible:ring-2 focus-visible:ring-ring/40\"\n onClick={onCancelReplace}\n >\n Keep current draft\n </button>\n <button\n type=\"button\"\n className=\"rounded-md bg-brand px-2 py-1 font-medium text-white hover:bg-brand/90 focus-visible:ring-2 focus-visible:ring-ring/40\"\n onClick={onConfirmReplace}\n >\n Replace and edit\n </button>\n </div>\n </div>\n ) : null}\n </li>\n );\n}\n\nconst verticalOnly: Modifier = ({ transform }) => ({ ...transform, x: 0 });\n\nfunction focusQueueTurn(surface: HTMLElement | null, turnId: string): void {\n window.requestAnimationFrame(() => {\n surface\n ?.querySelector<HTMLElement>(`[data-queue-turn-id=\"${turnId}\"] [data-queue-handle]`)\n ?.focus();\n });\n}\n\nfunction focusAfterQueueRemoval(\n surface: HTMLElement | null,\n previousIndex: number,\n onRequestComposerFocus?: (() => void) | undefined,\n): void {\n window.requestAnimationFrame(() => {\n const handles = surface?.querySelectorAll<HTMLElement>(\"[data-queue-handle]\") ?? [];\n const nearest = handles[Math.min(previousIndex, Math.max(0, handles.length - 1))];\n if (nearest) {\n nearest.focus();\n return;\n }\n if (onRequestComposerFocus) {\n onRequestComposerFocus();\n return;\n }\n document\n .querySelector<HTMLTextAreaElement>('textarea[aria-label=\"Message the agent\"]')\n ?.focus();\n });\n}\n"],"mappings":";;;;;;;;;;;;;AAAA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAIK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,WAAW;AAEpB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAEK;AAEP,SAAS,oBAAoB;AA4NY,SA8yBvB,UA9yBuB,KAiB/B,YAjB+B;AA7LlC,SAAS,6BACd,UACA,UACS;AACT,SAAO,CAAC,YAAY,aAAa,UAAa,SAAS,qBAAqB;AAC9E;AAEO,SAAS,aAAa;AAAA,EAC3B;AAAA,EACA;AAAA,EACA,WAAW;AAAA,EACX;AAC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AAA,UACzE,oBAAC,OAAE,WAAU,wBAAuB,iHAGpC;AAAA,UACA,qBAAC,SAAI,WAAU,iCACb;AAAA;AAAA,cAAC;AAAA;AAAA,gBACC,MAAK;AAAA,gBACL,WAAU;AAAA,gBACV,SAAS;AAAA,gBACV;AAAA;AAAA,YAED;AAAA,YACA;AAAA,cAAC;AAAA;AAAA,gBACC,MAAK;AAAA,gBACL,WAAU;AAAA,gBACV,SAAS;AAAA,gBACV;AAAA;AAAA,YAED;AAAA,aACF;AAAA,WACF,IACE;AAAA;AAAA;AAAA,EACN;AAEJ;AAEA,IAAM,eAAyB,CAAC,EAAE,UAAU,OAAO,EAAE,GAAG,WAAW,GAAG,EAAE;AAExE,SAAS,eAAe,SAA6B,QAAsB;AACzE,SAAO,sBAAsB,MAAM;AACjC,aACI,cAA2B,wBAAwB,MAAM,wBAAwB,GACjF,MAAM;AAAA,EACZ,CAAC;AACH;AAEA,SAAS,uBACP,SACA,eACA,wBACM;AACN,SAAO,sBAAsB,MAAM;AACjC,UAAM,UAAU,SAAS,iBAA8B,qBAAqB,KAAK,CAAC;AAClF,UAAM,UAAU,QAAQ,KAAK,IAAI,eAAe,KAAK,IAAI,GAAG,QAAQ,SAAS,CAAC,CAAC,CAAC;AAChF,QAAI,SAAS;AACX,cAAQ,MAAM;AACd;AAAA,IACF;AACA,QAAI,wBAAwB;AAC1B,6BAAuB;AACvB;AAAA,IACF;AACA,aACG,cAAmC,0CAA0C,GAC5E,MAAM;AAAA,EACZ,CAAC;AACH;","names":["summary"]}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { DropdownMenu as DropdownMenuPrimitive } from "radix-ui";
|
|
2
2
|
import { type ComponentProps } from "react";
|
|
3
|
-
declare function DropdownMenu(props: ComponentProps<typeof DropdownMenuPrimitive.Root>): import("react
|
|
4
|
-
declare function DropdownMenuTrigger({ ref, ...props }: ComponentProps<typeof DropdownMenuPrimitive.Trigger>): import("react
|
|
5
|
-
declare function DropdownMenuContent({ className, sideOffset, style, ...props }: ComponentProps<typeof DropdownMenuPrimitive.Content>): import("react
|
|
3
|
+
declare function DropdownMenu(props: ComponentProps<typeof DropdownMenuPrimitive.Root>): import("react").JSX.Element;
|
|
4
|
+
declare function DropdownMenuTrigger({ ref, ...props }: ComponentProps<typeof DropdownMenuPrimitive.Trigger>): import("react").JSX.Element;
|
|
5
|
+
declare function DropdownMenuContent({ className, sideOffset, style, ...props }: ComponentProps<typeof DropdownMenuPrimitive.Content>): import("react").JSX.Element;
|
|
6
6
|
declare function DropdownMenuItem({ className, inset, variant, ...props }: ComponentProps<typeof DropdownMenuPrimitive.Item> & {
|
|
7
7
|
inset?: boolean;
|
|
8
8
|
variant?: "default" | "destructive";
|
|
9
|
-
}): import("react
|
|
10
|
-
declare function DropdownMenuSeparator({ className, ...props }: ComponentProps<typeof DropdownMenuPrimitive.Separator>): import("react
|
|
11
|
-
declare function DropdownMenuSub(props: ComponentProps<typeof DropdownMenuPrimitive.Sub>): import("react
|
|
9
|
+
}): import("react").JSX.Element;
|
|
10
|
+
declare function DropdownMenuSeparator({ className, ...props }: ComponentProps<typeof DropdownMenuPrimitive.Separator>): import("react").JSX.Element;
|
|
11
|
+
declare function DropdownMenuSub(props: ComponentProps<typeof DropdownMenuPrimitive.Sub>): import("react").JSX.Element;
|
|
12
12
|
declare function DropdownMenuSubTrigger({ className, inset, children, ...props }: ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {
|
|
13
13
|
inset?: boolean;
|
|
14
|
-
}): import("react
|
|
15
|
-
declare function DropdownMenuSubContent({ className, style, ...props }: ComponentProps<typeof DropdownMenuPrimitive.SubContent>): import("react
|
|
14
|
+
}): import("react").JSX.Element;
|
|
15
|
+
declare function DropdownMenuSubContent({ className, style, ...props }: ComponentProps<typeof DropdownMenuPrimitive.SubContent>): import("react").JSX.Element;
|
|
16
16
|
export { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuSeparator, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type EffectiveSessionControl, type SessionEvent, type SessionStatus } from "@opengeni/sdk";
|
|
2
2
|
import { type SessionRealtimeClientLike, type SessionRealtimeController, type SessionRealtimeControllerSnapshot, type CreateSessionRealtimeControllerOptions, type SessionRealtimeModel } from "@opengeni/sdk/realtime";
|
|
3
3
|
import { type ReactNode, type RefObject } from "react";
|
|
4
|
-
import type { EmbeddedRealtimeSessionClientLike } from "../client";
|
|
4
|
+
import type { EmbeddedRealtimeSessionClientLike } from "../client.js";
|
|
5
5
|
export type RealtimeModelOption = {
|
|
6
6
|
id: SessionRealtimeModel;
|
|
7
7
|
label: string;
|
|
@@ -67,9 +67,16 @@ export declare function SessionRealtimeControl(props: {
|
|
|
67
67
|
onRealtimeAutostartConsumed?: (() => void) | undefined;
|
|
68
68
|
/** Host hides dictate (and can choreograph layout) while realtime voice is live. */
|
|
69
69
|
onVoiceActiveChange?: ((active: boolean) => void) | undefined;
|
|
70
|
+
/**
|
|
71
|
+
* `split` attaches the model chevron at every breakpoint (public default).
|
|
72
|
+
* `split-desktop` hides it below `sm` when the host owns mobile selection.
|
|
73
|
+
* Inside a container-responsive Composer.Root, `sm` follows that composer.
|
|
74
|
+
* `none` never attaches a model menu to the bar button.
|
|
75
|
+
*/
|
|
76
|
+
modelMenu?: "split" | "split-desktop" | "none" | undefined;
|
|
70
77
|
/** Deterministic browser-test/demo seam. Production hosts should use the SDK default. */
|
|
71
78
|
controllerFactory?: SessionRealtimeControllerFactory | undefined;
|
|
72
|
-
}): import("react
|
|
79
|
+
}): import("react").JSX.Element;
|
|
73
80
|
export declare function useRealtimeModelSelection(options: {
|
|
74
81
|
client?: RealtimeControllerClient | undefined;
|
|
75
82
|
workspaceId?: string | undefined;
|
|
@@ -94,10 +101,11 @@ export declare function NewSessionRealtimeControl(props: {
|
|
|
94
101
|
/**
|
|
95
102
|
* `split` attaches the model chevron at every breakpoint (public default).
|
|
96
103
|
* `split-desktop` hides it below `sm` when the host owns mobile selection (e.g. “+”).
|
|
104
|
+
* Inside a container-responsive Composer.Root, `sm` follows that composer.
|
|
97
105
|
* `none` never attaches a model menu to the bar button.
|
|
98
106
|
*/
|
|
99
107
|
modelMenu?: "split" | "split-desktop" | "none" | undefined;
|
|
100
|
-
}): import("react
|
|
108
|
+
}): import("react").JSX.Element;
|
|
101
109
|
export declare function RealtimeVoiceControl(props: {
|
|
102
110
|
snapshot: SessionRealtimeControllerSnapshot;
|
|
103
111
|
canStart: boolean;
|
|
@@ -109,6 +117,7 @@ export declare function RealtimeVoiceControl(props: {
|
|
|
109
117
|
/**
|
|
110
118
|
* `split` = start + model chevron at every breakpoint (public SDK default).
|
|
111
119
|
* `split-desktop` = chevron from `sm` up; below that the host owns selection.
|
|
120
|
+
* Inside a container-responsive Composer.Root, `sm` follows that composer.
|
|
112
121
|
* `none` = start button only.
|
|
113
122
|
*/
|
|
114
123
|
modelMenu?: "split" | "split-desktop" | "none" | undefined;
|
|
@@ -125,7 +134,7 @@ export declare function RealtimeVoiceControl(props: {
|
|
|
125
134
|
onRetryAudibleOutput: () => Promise<void>;
|
|
126
135
|
onSetInputMuted: (muted: boolean) => void;
|
|
127
136
|
onSetOutputMuted: (muted: boolean) => void;
|
|
128
|
-
}): import("react
|
|
137
|
+
}): import("react").JSX.Element;
|
|
129
138
|
/** Drill-in body for the mobile composer “+” menu — same catalog as the desktop chevron. */
|
|
130
139
|
export declare function RealtimeVoiceModelPanel(props: {
|
|
131
140
|
models: readonly RealtimeModelOption[];
|
|
@@ -133,7 +142,7 @@ export declare function RealtimeVoiceModelPanel(props: {
|
|
|
133
142
|
disabled?: boolean | undefined;
|
|
134
143
|
leading?: ReactNode | undefined;
|
|
135
144
|
onSelect: (modelId: SessionRealtimeModel) => void;
|
|
136
|
-
}): import("react
|
|
145
|
+
}): import("react").JSX.Element;
|
|
137
146
|
export declare function RealtimeModelPickerMenu(props: {
|
|
138
147
|
models: readonly RealtimeModelOption[];
|
|
139
148
|
selectedModel: RealtimeModelOption;
|
|
@@ -142,7 +151,7 @@ export declare function RealtimeModelPickerMenu(props: {
|
|
|
142
151
|
disabled: boolean;
|
|
143
152
|
onProviderChange: (provider: RealtimeModelProvider | null, direction: 1 | -1) => void;
|
|
144
153
|
onSelect: (modelId: SessionRealtimeModel) => void;
|
|
145
|
-
}): import("react
|
|
154
|
+
}): import("react").JSX.Element;
|
|
146
155
|
/** @deprecated Use the provider-neutral realtime names. */
|
|
147
156
|
export declare const useSessionCodexRealtime: typeof useSessionRealtime;
|
|
148
157
|
/** @deprecated Use the provider-neutral realtime names. */
|
package/dist/realtime.d.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* base `@opengeni/react` entry remains SSR/browser safe and does not eagerly
|
|
6
6
|
* load microphone, WebRTC, Gateway, or realtime UI code.
|
|
7
7
|
*/
|
|
8
|
-
export { CodexRealtimeControl, NewSessionRealtimeControl, RealtimeModelPickerMenu, RealtimeVoiceControl, RealtimeVoiceModelPanel, SessionCodexRealtimeControl, SessionRealtimeControl, codexRealtimeAdmissionAllowed, codexRealtimeAdmissionBlocker, useRealtimeModelSelection, useSessionCodexRealtime, useSessionRealtime, useWorkspaceRealtimeModelSelection, } from "./realtime/realtime-control";
|
|
9
|
-
export type { RealtimeModelOption, SessionRealtimeControllerFactory, } from "./realtime/realtime-control";
|
|
10
|
-
export type { EmbeddedRealtimeSessionClientLike } from "./client";
|
|
11
|
-
export type { EmbeddedRealtimeSessionClientOverride } from "./session-context";
|
|
8
|
+
export { CodexRealtimeControl, NewSessionRealtimeControl, RealtimeModelPickerMenu, RealtimeVoiceControl, RealtimeVoiceModelPanel, SessionCodexRealtimeControl, SessionRealtimeControl, codexRealtimeAdmissionAllowed, codexRealtimeAdmissionBlocker, useRealtimeModelSelection, useSessionCodexRealtime, useSessionRealtime, useWorkspaceRealtimeModelSelection, } from "./realtime/realtime-control.js";
|
|
9
|
+
export type { RealtimeModelOption, SessionRealtimeControllerFactory, } from "./realtime/realtime-control.js";
|
|
10
|
+
export type { EmbeddedRealtimeSessionClientLike } from "./client.js";
|
|
11
|
+
export type { EmbeddedRealtimeSessionClientOverride } from "./session-context.js";
|
package/dist/realtime.js
CHANGED
|
@@ -3,14 +3,15 @@ import {
|
|
|
3
3
|
PickerAnimatedPage,
|
|
4
4
|
PickerBackHeader,
|
|
5
5
|
PickerNavRow
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import {
|
|
8
|
-
useEmbeddedRealtimeSession
|
|
9
|
-
} from "./chunk-EKZH6IDG.js";
|
|
6
|
+
} from "./chunk-WYA65Y3F.js";
|
|
10
7
|
import "./chunk-23EJ676W.js";
|
|
11
8
|
import {
|
|
9
|
+
usePortalTokenSource,
|
|
12
10
|
usePortalTokenStyle
|
|
13
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-VZTQ73XT.js";
|
|
12
|
+
import {
|
|
13
|
+
useEmbeddedRealtimeSession
|
|
14
|
+
} from "./chunk-HDBG7XGO.js";
|
|
14
15
|
import {
|
|
15
16
|
cn
|
|
16
17
|
} from "./chunk-22KP6LR5.js";
|
|
@@ -38,18 +39,14 @@ import {
|
|
|
38
39
|
useCallback,
|
|
39
40
|
useEffect,
|
|
40
41
|
useMemo,
|
|
41
|
-
useRef
|
|
42
|
+
useRef,
|
|
42
43
|
useState
|
|
43
44
|
} from "react";
|
|
44
45
|
|
|
45
46
|
// src/realtime/dropdown-menu.tsx
|
|
46
47
|
import { ChevronRightIcon } from "lucide-react";
|
|
47
48
|
import { DropdownMenu as DropdownMenuPrimitive } from "radix-ui";
|
|
48
|
-
import {
|
|
49
|
-
createContext,
|
|
50
|
-
useContext,
|
|
51
|
-
useRef
|
|
52
|
-
} from "react";
|
|
49
|
+
import { createContext, useContext } from "react";
|
|
53
50
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
54
51
|
var DropdownMenuSourceContext = createContext(null);
|
|
55
52
|
function assignRef(ref, value) {
|
|
@@ -57,8 +54,8 @@ function assignRef(ref, value) {
|
|
|
57
54
|
else if (ref) ref.current = value;
|
|
58
55
|
}
|
|
59
56
|
function DropdownMenu(props) {
|
|
60
|
-
const
|
|
61
|
-
return /* @__PURE__ */ jsx(DropdownMenuSourceContext.Provider, { value:
|
|
57
|
+
const source = usePortalTokenSource();
|
|
58
|
+
return /* @__PURE__ */ jsx(DropdownMenuSourceContext.Provider, { value: source, children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.Root, { "data-slot": "dropdown-menu", ...props }) });
|
|
62
59
|
}
|
|
63
60
|
function DropdownMenuTrigger({
|
|
64
61
|
ref,
|
|
@@ -70,7 +67,7 @@ function DropdownMenuTrigger({
|
|
|
70
67
|
{
|
|
71
68
|
"data-slot": "dropdown-menu-trigger",
|
|
72
69
|
ref: (node) => {
|
|
73
|
-
|
|
70
|
+
sourceRef?.ref(node);
|
|
74
71
|
assignRef(ref, node);
|
|
75
72
|
},
|
|
76
73
|
...props
|
|
@@ -83,9 +80,8 @@ function DropdownMenuContent({
|
|
|
83
80
|
style,
|
|
84
81
|
...props
|
|
85
82
|
}) {
|
|
86
|
-
const
|
|
87
|
-
const
|
|
88
|
-
const portalStyle = usePortalTokenStyle(sourceRef ?? fallbackRef);
|
|
83
|
+
const source = useContext(DropdownMenuSourceContext);
|
|
84
|
+
const portalStyle = usePortalTokenStyle(source?.source ?? null);
|
|
89
85
|
return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx(
|
|
90
86
|
DropdownMenuPrimitive.Content,
|
|
91
87
|
{
|
|
@@ -164,9 +160,8 @@ function DropdownMenuSubContent({
|
|
|
164
160
|
style,
|
|
165
161
|
...props
|
|
166
162
|
}) {
|
|
167
|
-
const
|
|
168
|
-
const
|
|
169
|
-
const portalStyle = usePortalTokenStyle(sourceRef ?? fallbackRef);
|
|
163
|
+
const source = useContext(DropdownMenuSourceContext);
|
|
164
|
+
const portalStyle = usePortalTokenStyle(source?.source ?? null);
|
|
170
165
|
return /* @__PURE__ */ jsx(
|
|
171
166
|
DropdownMenuPrimitive.SubContent,
|
|
172
167
|
{
|
|
@@ -219,9 +214,9 @@ function useSessionRealtime(options) {
|
|
|
219
214
|
workspaceId: options.workspaceId
|
|
220
215
|
});
|
|
221
216
|
const model = options.model ?? CODEX_LIVE_MODEL.id;
|
|
222
|
-
const audioRef =
|
|
223
|
-
const controllerRef =
|
|
224
|
-
const controllerModelRef =
|
|
217
|
+
const audioRef = useRef(null);
|
|
218
|
+
const controllerRef = useRef(null);
|
|
219
|
+
const controllerModelRef = useRef(null);
|
|
225
220
|
const [snapshot, setSnapshot] = useState(() => ({
|
|
226
221
|
status: hasStoredSessionRealtimeOwnerProof({ workspaceId, sessionId: options.sessionId, model }) ? "recovering" : "idle",
|
|
227
222
|
realtimeId: null,
|
|
@@ -240,8 +235,8 @@ function useSessionRealtime(options) {
|
|
|
240
235
|
() => projectSessionRealtimeLifecycle(options.events),
|
|
241
236
|
[options.events]
|
|
242
237
|
);
|
|
243
|
-
const lifecycleRef =
|
|
244
|
-
const eventsReadyRef =
|
|
238
|
+
const lifecycleRef = useRef(lifecycle);
|
|
239
|
+
const eventsReadyRef = useRef(options.eventsReady);
|
|
245
240
|
lifecycleRef.current = lifecycle;
|
|
246
241
|
eventsReadyRef.current = options.eventsReady;
|
|
247
242
|
const lifecycleActive = lifecycle?.state === "active";
|
|
@@ -363,8 +358,8 @@ function SessionRealtimeControl(props) {
|
|
|
363
358
|
modelAvailable: selectedModel.available,
|
|
364
359
|
modelUnavailableReason: selectedModel.unavailableReason
|
|
365
360
|
});
|
|
366
|
-
const autostartModelRef =
|
|
367
|
-
const autostartStartedRef =
|
|
361
|
+
const autostartModelRef = useRef(props.realtimeAutostartModel ?? null);
|
|
362
|
+
const autostartStartedRef = useRef(false);
|
|
368
363
|
const { models, selectedModel: selectedRealtimeModel, selectModel } = selection;
|
|
369
364
|
const { canStart, start } = realtime;
|
|
370
365
|
const onRealtimeAutostartConsumed = props.onRealtimeAutostartConsumed;
|
|
@@ -409,6 +404,7 @@ function SessionRealtimeControl(props) {
|
|
|
409
404
|
admissionBlocker: realtime.admissionBlocker,
|
|
410
405
|
modelAvailable: selectedModel.available,
|
|
411
406
|
menuSide: "top",
|
|
407
|
+
modelMenu: props.modelMenu ?? "split",
|
|
412
408
|
audioRef: realtime.audioRef,
|
|
413
409
|
selectedModel,
|
|
414
410
|
models: selection.models,
|
|
@@ -499,7 +495,7 @@ function NewSessionRealtimeControl(props) {
|
|
|
499
495
|
selectedModel: props.selectedModel,
|
|
500
496
|
selectModel: props.onSelectModel
|
|
501
497
|
} : internalSelection;
|
|
502
|
-
const audioRef =
|
|
498
|
+
const audioRef = useRef(null);
|
|
503
499
|
const [starting, setStarting] = useState(false);
|
|
504
500
|
const [error, setError] = useState(null);
|
|
505
501
|
const snapshot = useMemo(
|
|
@@ -585,7 +581,8 @@ function RealtimeVoiceControl(props) {
|
|
|
585
581
|
role: "group",
|
|
586
582
|
"aria-label": "Realtime voice",
|
|
587
583
|
"data-picker-side": props.menuSide ?? "top",
|
|
588
|
-
|
|
584
|
+
"data-model-menu": modelMenu,
|
|
585
|
+
className: "og-realtime-control inline-flex shrink-0 items-center",
|
|
589
586
|
children: [
|
|
590
587
|
/* @__PURE__ */ jsx2("audio", { ref: props.audioRef, autoPlay: true, className: "hidden", "aria-hidden": "true" }),
|
|
591
588
|
/* @__PURE__ */ jsx2(RealtimeComposerGlow, { phase: status.phase, reduceMotion: reduceMotion === true }),
|
|
@@ -672,7 +669,7 @@ function RealtimeVoiceControl(props) {
|
|
|
672
669
|
// Match transcription mic: ghost icon when idle; filled only when live.
|
|
673
670
|
// Public contract: coarse pointers keep a 44px target; split menu uses
|
|
674
671
|
// left-only rounding at `sm+` where the chevron attaches.
|
|
675
|
-
"relative inline-flex size-8 items-center justify-center outline-
|
|
672
|
+
"og-realtime-primary relative inline-flex size-8 items-center justify-center outline-hidden",
|
|
676
673
|
"rounded-og-md transition-[background-color,border-color,color,box-shadow] duration-200 ease-og-out",
|
|
677
674
|
"focus-visible:z-10 focus-visible:ring-2 focus-visible:ring-og-accent/45",
|
|
678
675
|
"disabled:cursor-not-allowed disabled:opacity-45 pointer-coarse:size-11",
|
|
@@ -700,7 +697,7 @@ function RealtimeVoiceControl(props) {
|
|
|
700
697
|
className: cn(
|
|
701
698
|
// Keep the split trigger compact on desktop while preserving a
|
|
702
699
|
// full 44px mobile target independent of pointer-media support.
|
|
703
|
-
"inline-flex h-11 w-11 items-center justify-center rounded-r-og-md outline-
|
|
700
|
+
"og-realtime-model-trigger inline-flex h-11 w-11 items-center justify-center rounded-r-og-md outline-hidden sm:h-8 sm:w-6",
|
|
704
701
|
"transition-[background-color,border-color,color] duration-200 ease-og-out",
|
|
705
702
|
"focus-visible:z-10 focus-visible:ring-2 focus-visible:ring-og-accent/45",
|
|
706
703
|
desktopOnlyModelMenu && "hidden sm:inline-flex",
|
|
@@ -716,7 +713,7 @@ function RealtimeVoiceControl(props) {
|
|
|
716
713
|
align: "end",
|
|
717
714
|
sideOffset: 8,
|
|
718
715
|
collisionPadding: 12,
|
|
719
|
-
className: "flex w-72 max-h-[min(20rem,var(--radix-dropdown-menu-content-available-height))] flex-col overflow-hidden rounded-xl border-border bg-surface p-1.5 shadow-xl",
|
|
716
|
+
className: "og-realtime-menu flex w-72 max-h-[min(20rem,var(--radix-dropdown-menu-content-available-height))] flex-col overflow-hidden rounded-xl border-border bg-surface p-1.5 shadow-xl",
|
|
720
717
|
onCloseAutoFocus: (event) => event.preventDefault(),
|
|
721
718
|
children: [
|
|
722
719
|
/* @__PURE__ */ jsx2("div", { className: "min-h-0 flex-1 overflow-y-auto overscroll-contain", children: /* @__PURE__ */ jsx2(
|
|
@@ -855,7 +852,7 @@ function RealtimeMuteButton(props) {
|
|
|
855
852
|
...props.reduceMotion ? {} : { whileTap: { scale: 0.92 } },
|
|
856
853
|
onClick: props.onToggle,
|
|
857
854
|
className: cn(
|
|
858
|
-
"inline-flex size-8 shrink-0 items-center justify-center rounded-og-md outline-
|
|
855
|
+
"inline-flex size-8 shrink-0 items-center justify-center rounded-og-md outline-hidden",
|
|
859
856
|
"transition-[background-color,border-color,color] duration-150 ease-og-out",
|
|
860
857
|
"focus-visible:ring-2 focus-visible:ring-og-accent/45 pointer-coarse:size-11",
|
|
861
858
|
props.muted ? "border border-og-accent/35 bg-og-accent-soft text-og-accent" : "text-og-fg-muted hover:bg-og-surface-2 hover:text-og-fg"
|