@opengeni/react 1.0.1 → 1.0.2-canary.37202341988001
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 +660 -21
- package/dist/accounts.d.ts +64 -0
- package/dist/accounts.js +822 -0
- package/dist/accounts.js.map +1 -0
- package/dist/approvals.d.ts +2 -1
- package/dist/artifacts-document.js +3 -2
- package/dist/artifacts-presentation.js +3 -2
- package/dist/artifacts-spreadsheet.js +2 -2
- package/dist/artifacts.d.ts +4 -1
- package/dist/artifacts.js +518 -42
- package/dist/artifacts.js.map +1 -1
- package/dist/browser-viewer-SHYKQRNX.js +16 -0
- package/dist/capability-catalog-row.d.ts +20 -0
- package/dist/capability-logo-fallback.d.ts +3 -0
- package/dist/chat-interactive-block-UGBTNB3L.js +11 -0
- package/dist/chat-interactive-block-UGBTNB3L.js.map +1 -0
- package/dist/chunk-26ZNDDLZ.js +453 -0
- package/dist/chunk-26ZNDDLZ.js.map +1 -0
- package/dist/chunk-3CTRFMAK.js +359 -0
- package/dist/chunk-3CTRFMAK.js.map +1 -0
- package/dist/chunk-447JLCBU.js +209 -0
- package/dist/chunk-447JLCBU.js.map +1 -0
- package/dist/chunk-4RVYOY4O.js +379 -0
- package/dist/chunk-4RVYOY4O.js.map +1 -0
- package/dist/chunk-5CVXZA3Y.js +292 -0
- package/dist/chunk-5CVXZA3Y.js.map +1 -0
- package/dist/chunk-5J4FOW6Q.js +108 -0
- package/dist/chunk-5J4FOW6Q.js.map +1 -0
- package/dist/chunk-742CZ3L3.js +481 -0
- package/dist/chunk-742CZ3L3.js.map +1 -0
- package/dist/chunk-A2PI6UMY.js +41 -0
- package/dist/chunk-A2PI6UMY.js.map +1 -0
- package/dist/{chunk-7WCLAEFV.js → chunk-A4UJB2MM.js} +37 -27
- package/dist/chunk-A4UJB2MM.js.map +1 -0
- package/dist/chunk-B3V6TG77.js +41 -0
- package/dist/chunk-B3V6TG77.js.map +1 -0
- package/dist/chunk-BRM6FVZA.js +302 -0
- package/dist/chunk-BRM6FVZA.js.map +1 -0
- package/dist/chunk-C5X5AJXK.js +182 -0
- package/dist/chunk-C5X5AJXK.js.map +1 -0
- package/dist/{chunk-6KLX2RH5.js → chunk-DO544OSV.js} +1075 -79
- package/dist/chunk-DO544OSV.js.map +1 -0
- package/dist/{chunk-R3AZOAB5.js → chunk-DYWBUX5Q.js} +29 -123
- package/dist/chunk-DYWBUX5Q.js.map +1 -0
- package/dist/{chunk-HA46CYQK.js → chunk-EESD3PY3.js} +792 -537
- package/dist/chunk-EESD3PY3.js.map +1 -0
- package/dist/{chunk-5UQPNLIO.js → chunk-EN3YTHKR.js} +4117 -3896
- package/dist/chunk-EN3YTHKR.js.map +1 -0
- package/dist/chunk-ERGYJIBB.js +21 -0
- package/dist/chunk-ERGYJIBB.js.map +1 -0
- package/dist/chunk-FZCP527Y.js +116 -0
- package/dist/chunk-FZCP527Y.js.map +1 -0
- package/dist/chunk-GIMRELBW.js +14 -0
- package/dist/chunk-GIMRELBW.js.map +1 -0
- package/dist/chunk-GYVRFZDY.js +2733 -0
- package/dist/chunk-GYVRFZDY.js.map +1 -0
- package/dist/{chunk-LLOLUHVG.js → chunk-HDJWDK7W.js} +1358 -2746
- package/dist/chunk-HDJWDK7W.js.map +1 -0
- package/dist/chunk-I7IWRQLN.js +1608 -0
- package/dist/chunk-I7IWRQLN.js.map +1 -0
- package/dist/chunk-IT4BJUGF.js +13055 -0
- package/dist/chunk-IT4BJUGF.js.map +1 -0
- package/dist/chunk-IWIDV7SB.js +1 -0
- package/dist/chunk-IWIDV7SB.js.map +1 -0
- package/dist/chunk-J2QWVSQY.js +312 -0
- package/dist/chunk-J2QWVSQY.js.map +1 -0
- package/dist/chunk-J6DBS4T3.js +371 -0
- package/dist/chunk-J6DBS4T3.js.map +1 -0
- package/dist/{chunk-B6WPZSTT.js → chunk-JIQYUGVL.js} +1331 -1163
- package/dist/chunk-JIQYUGVL.js.map +1 -0
- package/dist/chunk-JT4JW7BC.js +54 -0
- package/dist/chunk-JT4JW7BC.js.map +1 -0
- package/dist/chunk-K3HQAKQX.js +24 -0
- package/dist/chunk-K3HQAKQX.js.map +1 -0
- package/dist/{chunk-PEI6RANI.js → chunk-PNY3JKBJ.js} +309 -74
- package/dist/chunk-PNY3JKBJ.js.map +1 -0
- package/dist/chunk-RHREZ7BO.js +11 -0
- package/dist/chunk-RHREZ7BO.js.map +1 -0
- package/dist/chunk-RLUSC2WA.js +299 -0
- package/dist/chunk-RLUSC2WA.js.map +1 -0
- package/dist/{chunk-IGC6A2ZI.js → chunk-RSI7XYXL.js} +777 -246
- package/dist/chunk-RSI7XYXL.js.map +1 -0
- package/dist/chunk-SCOTPE2I.js +589 -0
- package/dist/chunk-SCOTPE2I.js.map +1 -0
- package/dist/{chunk-C5ZPSSS5.js → chunk-TKOTKRWY.js} +5 -4
- package/dist/{chunk-C5ZPSSS5.js.map → chunk-TKOTKRWY.js.map} +1 -1
- package/dist/chunk-TMYGL6X5.js +742 -0
- package/dist/chunk-TMYGL6X5.js.map +1 -0
- package/dist/chunk-UGLEYEMP.js +33 -0
- package/dist/chunk-UGLEYEMP.js.map +1 -0
- package/dist/chunk-UK4TINKT.js +27 -0
- package/dist/chunk-UK4TINKT.js.map +1 -0
- package/dist/chunk-UTRTG6LH.js +220 -0
- package/dist/chunk-UTRTG6LH.js.map +1 -0
- package/dist/chunk-WEHMPOXK.js +39 -0
- package/dist/chunk-WEHMPOXK.js.map +1 -0
- package/dist/chunk-WGXVEJO5.js +319 -0
- package/dist/chunk-WGXVEJO5.js.map +1 -0
- package/dist/chunk-WRHIZYZF.js +988 -0
- package/dist/chunk-WRHIZYZF.js.map +1 -0
- package/dist/{chunk-HUIKIDM5.js → chunk-WUISZ3WU.js} +223 -115
- package/dist/chunk-WUISZ3WU.js.map +1 -0
- package/dist/chunk-XCHWDJ22.js +107 -0
- package/dist/chunk-XCHWDJ22.js.map +1 -0
- package/dist/{chunk-KCGXPP5V.js → chunk-Y2PRMYLC.js} +11 -6
- package/dist/chunk-Y2PRMYLC.js.map +1 -0
- package/dist/chunk-YBXQDQFX.js +1772 -0
- package/dist/chunk-YBXQDQFX.js.map +1 -0
- package/dist/chunk-YM2DE7BQ.js +3124 -0
- package/dist/chunk-YM2DE7BQ.js.map +1 -0
- package/dist/{chunk-KZ73RL76.js → chunk-YQEAA6LT.js} +7 -3
- package/dist/chunk-YQEAA6LT.js.map +1 -0
- package/dist/chunk-YV4L3ILF.js +9 -0
- package/dist/chunk-YV4L3ILF.js.map +1 -0
- package/dist/chunk-ZYRGEKWS.js +216 -0
- package/dist/chunk-ZYRGEKWS.js.map +1 -0
- package/dist/client.d.ts +7 -4
- package/dist/clipboard.js +1 -0
- package/dist/commands/types.d.ts +2 -0
- package/dist/components/anthropic-mark.d.ts +3 -0
- package/dist/components/approval-surface.d.ts +15 -0
- package/dist/components/artifacts/artifact-chrome.d.ts +120 -0
- package/dist/components/artifacts/artifact-sandbox.d.ts +27 -0
- package/dist/components/artifacts/artifact-surface.d.ts +3 -1
- package/dist/components/artifacts/chat-interactive-block.d.ts +29 -0
- package/dist/components/artifacts/deferred-chat-media.d.ts +15 -0
- package/dist/components/artifacts/document-editor.d.ts +4 -2
- package/dist/components/artifacts/editable-artifact-ui.d.ts +2 -1
- package/dist/components/artifacts/editable-artifact-view.d.ts +46 -0
- package/dist/components/artifacts/editable-document.d.ts +1 -1
- package/dist/components/artifacts/editable-presentation.d.ts +2 -2
- package/dist/components/artifacts/editable-spreadsheet.d.ts +2 -1
- package/dist/components/artifacts/index.d.ts +8 -1
- package/dist/components/artifacts/inline-html-document.d.ts +2 -0
- package/dist/components/artifacts/latest-task-runner.d.ts +15 -0
- package/dist/components/artifacts/presentation-editor.d.ts +6 -2
- package/dist/components/artifacts/published-html-artifact-frame.d.ts +48 -3
- package/dist/components/artifacts/session-artifact-viewer.d.ts +39 -0
- package/dist/components/artifacts/site-view.d.ts +23 -0
- package/dist/components/artifacts/spreadsheet-general-display.d.ts +24 -0
- package/dist/components/artifacts/visualization-assets.gen.d.ts +2 -0
- package/dist/components/browser-select-control.d.ts +16 -0
- package/dist/components/browser-viewer.d.ts +10 -1
- package/dist/components/chat-composer.d.ts +21 -3
- package/dist/components/child-session-link.d.ts +5 -0
- package/dist/components/claude-mark.d.ts +3 -0
- package/dist/components/code-editor.d.ts +1 -4
- package/dist/components/composer.d.ts +45 -4
- package/dist/components/computer-viewer.d.ts +4 -1
- package/dist/components/copy-button.d.ts +3 -1
- package/dist/components/desktop-viewer.d.ts +1 -1
- package/dist/components/enrollment-consent.d.ts +6 -3
- package/dist/components/file-browser.d.ts +10 -1
- package/dist/components/fleet-tile.d.ts +2 -2
- package/dist/components/grok-mark.d.ts +26 -0
- package/dist/components/human-input-form.d.ts +21 -2
- package/dist/components/human-input-surface.d.ts +6 -3
- package/dist/components/machine-card.d.ts +4 -1
- package/dist/components/machines/machine-detail.d.ts +4 -1
- package/dist/components/machines/machine-operation-policy.d.ts +11 -0
- package/dist/components/machines-dashboard.d.ts +3 -1
- package/dist/components/markdown-table-layout.d.ts +12 -0
- package/dist/components/markdown.d.ts +47 -3
- package/dist/components/message-timeline.d.ts +72 -9
- package/dist/components/model-mark.d.ts +29 -0
- package/dist/components/model-policy-picker-menu.d.ts +9 -0
- package/dist/components/model-policy-picker.d.ts +62 -13
- package/dist/components/open-geni-chat.d.ts +58 -0
- package/dist/components/open-geni-links.d.ts +68 -0
- package/dist/components/openrouter-mark.d.ts +6 -0
- package/dist/components/pierre-file.d.ts +1 -1
- package/dist/components/preview-loading.d.ts +2 -0
- package/dist/components/queue-item-content.d.ts +9 -0
- package/dist/components/sandbox-files.d.ts +13 -2
- package/dist/components/sandbox-workspace.d.ts +43 -3
- package/dist/components/session-capability-frame.d.ts +35 -0
- package/dist/components/session-chrome.d.ts +66 -8
- package/dist/components/session-commands-panel.d.ts +6 -0
- package/dist/components/session-commands.d.ts +6 -0
- package/dist/components/session-connection-request.d.ts +8 -0
- package/dist/components/session-conversation.d.ts +89 -0
- package/dist/components/session-list.d.ts +36 -0
- package/dist/components/session-mcp-capability-card.d.ts +41 -0
- package/dist/components/session-proxy-scope.d.ts +21 -0
- package/dist/components/timeline-anchor.d.ts +24 -0
- package/dist/components/timeline-annotation-chrome.d.ts +25 -0
- package/dist/components/timeline-annotation-layout.d.ts +42 -0
- package/dist/components/timeline-annotation-markers.d.ts +8 -0
- package/dist/components/timeline-annotation-reveal-context.d.ts +4 -0
- package/dist/components/timeline-annotation-shared.d.ts +31 -0
- package/dist/components/timeline-annotations-dialog.d.ts +3 -2
- package/dist/components/timeline-annotations.d.ts +13 -3
- package/dist/components/timeline-reading-progress.d.ts +11 -0
- package/dist/components/timeline-search.d.ts +34 -0
- package/dist/components/timeline-settlement.d.ts +16 -0
- package/dist/components/tip-follow.d.ts +16 -0
- package/dist/components/usage-limit-notice.d.ts +49 -0
- package/dist/components/usage-member-list.d.ts +91 -0
- package/dist/components/usage-meter.d.ts +73 -0
- package/dist/components/use-viewer-menu-dismiss.d.ts +2 -0
- package/dist/components/user-message-body.d.ts +10 -1
- package/dist/components/workspace-dock.d.ts +6 -2
- package/dist/composer.d.ts +5 -4
- package/dist/composer.js +15 -9
- package/dist/computer-viewer-6SRGWRUX.js +19 -0
- package/dist/computer-viewer-6SRGWRUX.js.map +1 -0
- package/dist/connect-account-identity.d.ts +8 -0
- package/dist/connect-accounts.d.ts +15 -0
- package/dist/connect-chooser.d.ts +18 -0
- package/dist/connect-panel.d.ts +18 -0
- package/dist/connect-setup.d.ts +16 -0
- package/dist/connect.d.ts +21 -0
- package/dist/connect.js +2129 -0
- package/dist/connect.js.map +1 -0
- package/dist/connection-catalog.d.ts +38 -0
- package/dist/connection-discovery.d.ts +12 -0
- package/dist/connection-installed.d.ts +17 -0
- package/dist/connection-logo.d.ts +9 -0
- package/dist/connection-service-logo.d.ts +8 -0
- package/dist/connection-service-presentation.d.ts +13 -0
- package/dist/connection-skeleton.d.ts +5 -0
- package/dist/connection-type-picker.d.ts +6 -0
- package/dist/conversation-timeline.d.ts +5 -0
- package/dist/desktop.d.ts +7 -0
- package/dist/desktop.js +26 -0
- package/dist/desktop.js.map +1 -0
- package/dist/device-authorization.d.ts +23 -0
- package/dist/diffs.d.ts +8 -0
- package/dist/diffs.js +14 -0
- package/dist/diffs.js.map +1 -0
- package/dist/discovery-cache.d.ts +5 -0
- package/dist/editor.d.ts +7 -0
- package/dist/editor.js +21 -0
- package/dist/editor.js.map +1 -0
- package/dist/embedded-session-client.d.ts +23 -0
- package/dist/file-node-visibility.d.ts +15 -0
- package/dist/{fleet-decision-row-GGCAT4E4.js → fleet-decision-row-YZ3ZKWMM.js} +2 -1
- package/dist/fleet-decision-row-YZ3ZKWMM.js.map +1 -0
- package/dist/hooks/channel-cache.d.ts +23 -0
- package/dist/hooks/latest-question.d.ts +25 -0
- package/dist/hooks/shared-machines-list.d.ts +14 -0
- package/dist/hooks/use-attached-browsers.d.ts +2 -1
- package/dist/hooks/use-browser-frame-stream.d.ts +1 -1
- package/dist/hooks/use-browser-session.d.ts +12 -1
- package/dist/hooks/use-channels.d.ts +1 -0
- package/dist/hooks/use-codex-accounts.d.ts +25 -7
- package/dist/hooks/use-composer.d.ts +45 -9
- package/dist/hooks/use-computer-frame-stream.d.ts +1 -1
- package/dist/hooks/use-computer-input-posture.d.ts +13 -0
- package/dist/hooks/use-computer-session.d.ts +2 -0
- package/dist/hooks/use-connect.d.ts +22 -0
- package/dist/hooks/use-desktop-stream.d.ts +1 -1
- package/dist/hooks/use-file-attachments.d.ts +21 -2
- package/dist/hooks/use-machine-chip.d.ts +3 -3
- package/dist/hooks/use-machines.d.ts +19 -1
- package/dist/hooks/use-sandbox-files.d.ts +5 -1
- package/dist/hooks/use-session-background-commands.d.ts +14 -0
- package/dist/hooks/use-session-events.d.ts +30 -8
- package/dist/hooks/use-session-lineage.d.ts +4 -0
- package/dist/hooks/use-session-mcp-approval-policy.d.ts +2 -2
- package/dist/hooks/use-session.d.ts +6 -0
- package/dist/hooks/use-turn-queue.d.ts +12 -0
- package/dist/hooks/use-usage.d.ts +40 -0
- package/dist/hooks/use-workspace-edit.d.ts +4 -0
- package/dist/hooks/use-workspace-sessions.d.ts +27 -5
- package/dist/human-input.d.ts +3 -1
- package/dist/identity-link-accounts.d.ts +11 -0
- package/dist/identity-link-consent.d.ts +18 -0
- package/dist/index.d.ts +60 -17
- package/dist/index.js +2238 -6201
- package/dist/index.js.map +1 -1
- package/dist/interaction.d.ts +1 -1
- package/dist/interaction.js +35 -184
- package/dist/interaction.js.map +1 -1
- package/dist/latest-question-HTRIS4KJ.js +117 -0
- package/dist/latest-question-HTRIS4KJ.js.map +1 -0
- package/dist/lib/error-message.d.ts +7 -0
- package/dist/lib/format.d.ts +36 -2
- package/dist/lib/host-theme.d.ts +70 -0
- package/dist/lib/interaction-errors.d.ts +6 -0
- package/dist/lib/menu-styles.d.ts +22 -0
- package/dist/lib/pierre-diffs-loader.d.ts +20 -0
- package/dist/lib/workbench-peers.d.ts +36 -0
- package/dist/lib/xterm-theme.d.ts +7 -5
- package/dist/machines.d.ts +4 -2
- package/dist/machines.js +14 -4
- package/dist/markdown-table-layout-QXSLK4BY.js +106 -0
- package/dist/markdown-table-layout-QXSLK4BY.js.map +1 -0
- package/dist/mcp-connection-status.d.ts +14 -0
- package/dist/model-policy-picker-menu-M54ISBMN.js +14 -0
- package/dist/model-policy-picker-menu-M54ISBMN.js.map +1 -0
- package/dist/model-policy.d.ts +19 -3
- package/dist/model-policy.js +9 -1
- package/dist/older-history.d.ts +30 -0
- package/dist/platform-activity-row-627BFZ46.js +182 -0
- package/dist/platform-activity-row-627BFZ46.js.map +1 -0
- package/dist/plugin-details.d.ts +14 -0
- package/dist/plugin-discovery.d.ts +25 -0
- package/dist/provider.d.ts +13 -1
- package/dist/{queue-surface-implementation-2KVJTYXH.js → queue-surface-implementation-ZHFI5JBP.js} +131 -44
- package/dist/queue-surface-implementation-ZHFI5JBP.js.map +1 -0
- package/dist/realtime/realtime-control.d.ts +6 -3
- package/dist/realtime.js +133 -74
- package/dist/realtime.js.map +1 -1
- package/dist/sandbox-files-GORZOUUJ.js +20 -0
- package/dist/sandbox-files-GORZOUUJ.js.map +1 -0
- package/dist/session-auth-recommendation.d.ts +5 -0
- package/dist/session-capability-policy.d.ts +12 -0
- package/dist/session-ui.d.ts +30 -2
- package/dist/session-ui.js +85 -7
- package/dist/session-ui.js.map +1 -1
- package/dist/session.d.ts +8 -2
- package/dist/session.js +30 -19
- package/dist/sites-ui.d.ts +34 -0
- package/dist/sites.d.ts +3 -0
- package/dist/sites.js +11 -0
- package/dist/sites.js.map +1 -0
- package/dist/skill-discovery.d.ts +47 -0
- package/dist/terminal.d.ts +8 -0
- package/dist/terminal.js +31 -0
- package/dist/terminal.js.map +1 -0
- package/dist/timeline/activity-rail.d.ts +11 -2
- package/dist/timeline/allowance-exhausted-row.d.ts +24 -0
- package/dist/timeline/compaction-copy.d.ts +10 -0
- package/dist/timeline/entrance.d.ts +13 -1
- package/dist/timeline/genie-loading.d.ts +34 -0
- package/dist/timeline/index.d.ts +6 -2
- package/dist/timeline/knowledge-receipt.d.ts +17 -0
- package/dist/timeline/platform-activity-row.d.ts +14 -0
- package/dist/timeline/presented-image.d.ts +6 -0
- package/dist/timeline/projection.d.ts +31 -2
- package/dist/timeline/registry.d.ts +2 -0
- package/dist/timeline/retained-image.d.ts +18 -0
- package/dist/timeline/rolling-activity.d.ts +11 -0
- package/dist/timeline/screenshot-lightbox.d.ts +16 -1
- package/dist/timeline/shared.d.ts +8 -3
- package/dist/timeline/startup-preference.d.ts +3 -0
- package/dist/timeline/startup-timings.d.ts +4 -0
- package/dist/timeline/tool-display-name.d.ts +2 -1
- package/dist/timeline/turn-summary.d.ts +34 -3
- package/dist/timeline/types.d.ts +147 -7
- package/dist/timeline-annotation-markers-GNDHTGBD.js +165 -0
- package/dist/timeline-annotation-markers-GNDHTGBD.js.map +1 -0
- package/dist/timeline-annotation-selection-DMLMM2TX.js +241 -0
- package/dist/timeline-annotation-selection-DMLMM2TX.js.map +1 -0
- package/dist/timeline-annotations-dialog-ELRDBHTS.js +273 -0
- package/dist/timeline-annotations-dialog-ELRDBHTS.js.map +1 -0
- package/dist/types/machines.d.ts +2 -2
- package/dist/usage/allowance-copy.d.ts +25 -0
- package/dist/usage/summary.d.ts +35 -0
- package/dist/usage.d.ts +13 -0
- package/dist/usage.js +1074 -0
- package/dist/usage.js.map +1 -0
- package/package.json +44 -4
- package/src/accounts.tsx +1072 -0
- package/src/approvals.ts +8 -1
- package/src/artifacts.ts +42 -0
- package/src/assets/README.md +8 -0
- package/src/assets/gmail.ico +0 -0
- package/src/assets/outlook.ico +0 -0
- package/src/capability-catalog-row.tsx +94 -0
- package/src/capability-logo-fallback.ts +22 -0
- package/src/client.ts +22 -13
- package/src/commands/registry.ts +18 -15
- package/src/commands/types.ts +2 -0
- package/src/components/anthropic-mark.tsx +10 -0
- package/src/components/approval-surface.tsx +171 -37
- package/src/components/artifacts/artifact-chrome.tsx +413 -0
- package/src/components/artifacts/artifact-sandbox.tsx +185 -0
- package/src/components/artifacts/artifact-surface.tsx +39 -19
- package/src/components/artifacts/chat-interactive-block.tsx +260 -0
- package/src/components/artifacts/deferred-chat-media.tsx +67 -0
- package/src/components/artifacts/document-editor.tsx +141 -16
- package/src/components/artifacts/editable-artifact-ui.tsx +4 -2
- package/src/components/artifacts/editable-artifact-view.tsx +187 -0
- package/src/components/artifacts/editable-artifact-workbench.tsx +5 -2
- package/src/components/artifacts/editable-document.tsx +37 -36
- package/src/components/artifacts/editable-presentation.tsx +36 -18
- package/src/components/artifacts/editable-spreadsheet.tsx +5 -2
- package/src/components/artifacts/index.ts +44 -0
- package/src/components/artifacts/inline-html-document.ts +24 -0
- package/src/components/artifacts/latest-task-runner.ts +49 -0
- package/src/components/artifacts/presentation-editor.tsx +323 -67
- package/src/components/artifacts/published-html-artifact-frame.tsx +338 -5
- package/src/components/artifacts/session-artifact-viewer.tsx +376 -0
- package/src/components/artifacts/site-view.tsx +116 -0
- package/src/components/artifacts/spreadsheet-canvas.ts +5 -10
- package/src/components/artifacts/spreadsheet-general-display.ts +43 -0
- package/src/components/artifacts/spreadsheet-grid.tsx +12 -13
- package/src/components/artifacts/visualization-assets/base.css +1015 -0
- package/src/components/artifacts/visualization-assets/helpers.html +349 -0
- package/src/components/artifacts/visualization-assets.gen.ts +3 -0
- package/src/components/browser-select-control.tsx +312 -0
- package/src/components/browser-viewer.tsx +1054 -314
- package/src/components/chat-composer.tsx +131 -85
- package/src/components/child-session-link.tsx +27 -0
- package/src/components/claude-mark.tsx +10 -0
- package/src/components/code-editor.tsx +13 -16
- package/src/components/composer-transcription-control.tsx +7 -5
- package/src/components/composer.tsx +376 -49
- package/src/components/computer-viewer.tsx +1041 -329
- package/src/components/copy-button.tsx +13 -5
- package/src/components/desktop-viewer.tsx +1 -1
- package/src/components/enrollment-consent.tsx +65 -7
- package/src/components/enrollment-device-flow.tsx +1 -1
- package/src/components/file-browser.tsx +158 -34
- package/src/components/fleet-tile.tsx +8 -16
- package/src/components/generated-video-player.tsx +4 -2
- package/src/components/grok-mark.tsx +33 -0
- package/src/components/human-input-form.tsx +455 -114
- package/src/components/human-input-surface.tsx +18 -7
- package/src/components/interaction-intervention-banner.tsx +2 -2
- package/src/components/machine-card.tsx +119 -4
- package/src/components/machine-dock-bar.tsx +1 -1
- package/src/components/machine-input-display.ts +23 -2
- package/src/components/machines/machine-detail.tsx +52 -2
- package/src/components/machines/machine-operation-policy.tsx +179 -0
- package/src/components/machines-dashboard.tsx +8 -17
- package/src/components/markdown-table-layout.ts +132 -0
- package/src/components/markdown.tsx +473 -44
- package/src/components/message-timeline.tsx +2754 -665
- package/src/components/model-mark.tsx +90 -0
- package/src/components/model-picker.tsx +15 -4
- package/src/components/model-policy-picker-menu.tsx +424 -0
- package/src/components/model-policy-picker.tsx +337 -381
- package/src/components/open-geni-chat.tsx +338 -0
- package/src/components/open-geni-links.tsx +179 -0
- package/src/components/openrouter-mark.tsx +13 -0
- package/src/components/pierre-diff.tsx +41 -16
- package/src/components/pierre-file.tsx +36 -11
- package/src/components/preview-loading.tsx +154 -0
- package/src/components/queue-item-content.ts +14 -0
- package/src/components/queue-surface-implementation.tsx +132 -42
- package/src/components/queue-surface-state.tsx +3 -1
- package/src/components/sandbox-files.tsx +267 -35
- package/src/components/sandbox-terminal.tsx +48 -11
- package/src/components/sandbox-workspace.tsx +337 -135
- package/src/components/session-capability-frame.tsx +192 -0
- package/src/components/session-chrome.tsx +1027 -328
- package/src/components/session-commands-panel.tsx +126 -0
- package/src/components/session-commands.tsx +18 -0
- package/src/components/session-connection-request.tsx +97 -0
- package/src/components/session-conversation.tsx +526 -0
- package/src/components/session-list.tsx +250 -0
- package/src/components/session-mcp-capability-card.tsx +680 -0
- package/src/components/session-proxy-scope.tsx +92 -0
- package/src/components/session-status.tsx +1 -1
- package/src/components/timeline-anchor.tsx +119 -0
- package/src/components/timeline-annotation-chrome.tsx +196 -0
- package/src/components/timeline-annotation-layout.ts +268 -0
- package/src/components/timeline-annotation-markers.tsx +185 -0
- package/src/components/timeline-annotation-reveal-context.ts +9 -0
- package/src/components/timeline-annotation-selection.tsx +106 -54
- package/src/components/timeline-annotation-shared.ts +245 -0
- package/src/components/timeline-annotations-dialog.tsx +185 -128
- package/src/components/timeline-annotations.tsx +189 -45
- package/src/components/timeline-reading-progress.ts +80 -0
- package/src/components/timeline-search.tsx +168 -0
- package/src/components/timeline-settlement.ts +60 -0
- package/src/components/tip-follow.ts +70 -7
- package/src/components/tooltip.tsx +38 -5
- package/src/components/usage-limit-notice.tsx +179 -0
- package/src/components/usage-member-list.tsx +792 -0
- package/src/components/usage-meter.tsx +382 -0
- package/src/components/use-viewer-menu-dismiss.ts +33 -0
- package/src/components/user-message-body.tsx +194 -49
- package/src/components/workspace-dock.tsx +141 -175
- package/src/composer.ts +6 -1
- package/src/connect-account-identity.tsx +34 -0
- package/src/connect-accounts.tsx +233 -0
- package/src/connect-chooser.tsx +336 -0
- package/src/connect-panel.tsx +99 -0
- package/src/connect-setup.tsx +307 -0
- package/src/connect.ts +60 -0
- package/src/connection-assets.d.ts +4 -0
- package/src/connection-catalog.tsx +162 -0
- package/src/connection-discovery.tsx +235 -0
- package/src/connection-installed.tsx +51 -0
- package/src/connection-logo.tsx +37 -0
- package/src/connection-service-logo.tsx +55 -0
- package/src/connection-service-presentation.ts +46 -0
- package/src/connection-skeleton.tsx +16 -0
- package/src/connection-type-picker.tsx +36 -0
- package/src/conversation-timeline.ts +92 -0
- package/src/desktop.ts +24 -0
- package/src/device-authorization.tsx +98 -0
- package/src/diffs.ts +16 -0
- package/src/discovery-cache.ts +42 -0
- package/src/editor.ts +13 -0
- package/src/embedded-session-client.ts +104 -0
- package/src/file-node-visibility.ts +66 -0
- package/src/hooks/channel-cache.ts +104 -0
- package/src/hooks/internal.ts +3 -2
- package/src/hooks/latest-question.ts +164 -0
- package/src/hooks/shared-machines-list.ts +239 -0
- package/src/hooks/use-attached-browsers.ts +5 -1
- package/src/hooks/use-available-models.ts +20 -14
- package/src/hooks/use-browser-frame-stream.ts +25 -3
- package/src/hooks/use-browser-session.ts +271 -71
- package/src/hooks/use-browser-sessions.ts +7 -1
- package/src/hooks/use-channels.ts +32 -10
- package/src/hooks/use-codex-accounts.ts +78 -21
- package/src/hooks/use-composer.ts +1034 -320
- package/src/hooks/use-computer-frame-stream.ts +39 -16
- package/src/hooks/use-computer-input-posture.ts +94 -0
- package/src/hooks/use-computer-session.ts +110 -32
- package/src/hooks/use-computer-sessions.ts +8 -1
- package/src/hooks/use-connect.ts +23 -0
- package/src/hooks/use-desktop-stream.ts +19 -28
- package/src/hooks/use-file-attachments.ts +118 -10
- package/src/hooks/use-goal.ts +36 -9
- package/src/hooks/use-human-input.ts +31 -4
- package/src/hooks/use-last-started-turn-policy.ts +15 -13
- package/src/hooks/use-machine-chip.ts +23 -6
- package/src/hooks/use-machines.ts +104 -6
- package/src/hooks/use-sandbox-files.ts +253 -150
- package/src/hooks/use-sandbox-git.ts +58 -29
- package/src/hooks/use-session-background-commands.ts +67 -0
- package/src/hooks/use-session-capabilities.ts +21 -2
- package/src/hooks/use-session-events.ts +759 -433
- package/src/hooks/use-session-lineage.ts +28 -6
- package/src/hooks/use-session-mcp-approval-policy.ts +13 -5
- package/src/hooks/use-session.ts +75 -16
- package/src/hooks/use-slash-commands.ts +6 -11
- package/src/hooks/use-turn-queue.ts +113 -13
- package/src/hooks/use-usage.ts +100 -0
- package/src/hooks/use-video-artifact-playback.ts +1 -1
- package/src/hooks/use-voice-input.ts +12 -1
- package/src/hooks/use-workspace-capture.ts +3 -2
- package/src/hooks/use-workspace-edit.ts +23 -5
- package/src/hooks/use-workspace-sessions.ts +99 -11
- package/src/human-input.ts +12 -1
- package/src/identity-link-accounts.tsx +148 -0
- package/src/identity-link-consent.tsx +192 -0
- package/src/index.ts +157 -12
- package/src/interaction.ts +1 -0
- package/src/lib/error-message.ts +37 -0
- package/src/lib/format.ts +150 -14
- package/src/lib/host-theme.ts +511 -0
- package/src/lib/interaction-errors.ts +33 -0
- package/src/lib/menu-styles.ts +44 -0
- package/src/lib/pierre-diffs-loader.ts +53 -0
- package/src/lib/workbench-peers.ts +62 -0
- package/src/lib/xterm-theme.ts +23 -21
- package/src/machines.ts +9 -1
- package/src/mcp-connection-status.ts +35 -0
- package/src/model-policy.ts +223 -69
- package/src/older-history.ts +87 -0
- package/src/plugin-details.tsx +185 -0
- package/src/plugin-discovery.tsx +196 -0
- package/src/provider.tsx +55 -14
- package/src/realtime/dropdown-menu.tsx +19 -12
- package/src/realtime/realtime-control.tsx +133 -46
- package/src/session-auth-recommendation.ts +48 -0
- package/src/session-capability-policy.ts +83 -0
- package/src/session-context.ts +4 -3
- package/src/session-ui.ts +66 -2
- package/src/session.ts +18 -1
- package/src/sites-ui.tsx +402 -0
- package/src/sites.ts +3 -0
- package/src/skill-discovery.tsx +208 -0
- package/src/terminal.ts +26 -0
- package/src/timeline/activity-rail.tsx +171 -80
- package/src/timeline/allowance-exhausted-row.tsx +86 -0
- package/src/timeline/compaction-copy.ts +42 -0
- package/src/timeline/entrance.tsx +28 -3
- package/src/timeline/fleet-decision-projection.ts +2 -1
- package/src/timeline/fleet-decision-row.tsx +1 -0
- package/src/timeline/genie-loading.tsx +136 -0
- package/src/timeline/index.ts +11 -0
- package/src/timeline/knowledge-receipt.tsx +100 -0
- package/src/timeline/parsers.ts +2 -2
- package/src/timeline/platform-activity-row.tsx +216 -0
- package/src/timeline/presented-image.ts +49 -0
- package/src/timeline/projection.ts +1609 -84
- package/src/timeline/registry.ts +15 -3
- package/src/timeline/retained-image.ts +97 -0
- package/src/timeline/rolling-activity.tsx +92 -0
- package/src/timeline/screenshot-lightbox.tsx +115 -17
- package/src/timeline/shared.tsx +47 -15
- package/src/timeline/startup-preference.ts +33 -0
- package/src/timeline/startup-timings.tsx +145 -0
- package/src/timeline/tool-display-name.ts +8 -6
- package/src/timeline/tool-renderers.tsx +497 -128
- package/src/timeline/turn-summary.tsx +218 -44
- package/src/timeline/types.ts +192 -7
- package/src/types/machines.ts +10 -0
- package/src/usage/allowance-copy.ts +64 -0
- package/src/usage/summary.ts +93 -0
- package/src/usage.ts +50 -0
- package/styles/compiled.css +2098 -757
- package/styles/connect.css +284 -0
- package/styles/connect.d.ts +1 -0
- package/styles/effective-tokens.css +1 -0
- package/styles/index.css +201 -9
- package/styles/responsive.css +27 -1
- package/styles/session-capability.css +44 -0
- package/styles/tokens.css +135 -65
- package/dist/chunk-5UQPNLIO.js.map +0 -1
- package/dist/chunk-6KLX2RH5.js.map +0 -1
- package/dist/chunk-7WCLAEFV.js.map +0 -1
- package/dist/chunk-B6WPZSTT.js.map +0 -1
- package/dist/chunk-FK6VG4LL.js +0 -90
- package/dist/chunk-FK6VG4LL.js.map +0 -1
- package/dist/chunk-HA46CYQK.js.map +0 -1
- package/dist/chunk-HUIKIDM5.js.map +0 -1
- package/dist/chunk-IGC6A2ZI.js.map +0 -1
- package/dist/chunk-KCGXPP5V.js.map +0 -1
- package/dist/chunk-KZ73RL76.js.map +0 -1
- package/dist/chunk-LAKLF4PA.js +0 -141
- package/dist/chunk-LAKLF4PA.js.map +0 -1
- package/dist/chunk-LLOLUHVG.js.map +0 -1
- package/dist/chunk-MKPIAGVL.js +0 -465
- package/dist/chunk-MKPIAGVL.js.map +0 -1
- package/dist/chunk-PEI6RANI.js.map +0 -1
- package/dist/chunk-R3AZOAB5.js.map +0 -1
- package/dist/chunk-WSK7G5LE.js +0 -170
- package/dist/chunk-WSK7G5LE.js.map +0 -1
- package/dist/chunk-XBZWOM2K.js +0 -218
- package/dist/chunk-XBZWOM2K.js.map +0 -1
- package/dist/chunk-Y7OEDUJ5.js +0 -8810
- package/dist/chunk-Y7OEDUJ5.js.map +0 -1
- package/dist/fleet-decision-row-GGCAT4E4.js.map +0 -1
- package/dist/hooks/use-packs.d.ts +0 -32
- package/dist/interactive-workbench-viewers-TOHBXJEE.js +0 -15
- package/dist/queue-surface-implementation-2KVJTYXH.js.map +0 -1
- package/dist/timeline-annotation-selection-3L7LHGG2.js +0 -187
- package/dist/timeline-annotation-selection-3L7LHGG2.js.map +0 -1
- package/dist/timeline-annotations-dialog-U7EVLR75.js +0 -196
- package/dist/timeline-annotations-dialog-U7EVLR75.js.map +0 -1
- package/src/hooks/use-packs.ts +0 -157
- /package/dist/{interactive-workbench-viewers-TOHBXJEE.js.map → browser-viewer-SHYKQRNX.js.map} +0 -0
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import {
|
|
2
|
+
modelDisplayName,
|
|
3
|
+
modelVendor,
|
|
4
|
+
type ModelDisplayInput,
|
|
5
|
+
type ModelVendor,
|
|
6
|
+
} from "@opengeni/sdk/model-display";
|
|
7
|
+
import { SparklesIcon } from "lucide-react";
|
|
8
|
+
import type { ReactNode, SVGProps } from "react";
|
|
9
|
+
import { cn } from "../lib/cn";
|
|
10
|
+
import { ClaudeMark } from "./claude-mark";
|
|
11
|
+
import { GrokMark } from "./grok-mark";
|
|
12
|
+
|
|
13
|
+
/** ChatGPT / OpenAI mark (Simple Icons path), currentColor like the other marks. */
|
|
14
|
+
export function ChatGptMark(props: SVGProps<SVGSVGElement>) {
|
|
15
|
+
return (
|
|
16
|
+
<svg viewBox="0 0 24 24" fill="currentColor" aria-hidden="true" {...props}>
|
|
17
|
+
<path d="M22.2819 9.8211a5.9847 5.9847 0 0 0-.5157-4.9108 6.0462 6.0462 0 0 0-6.5098-2.9A6.0651 6.0651 0 0 0 4.9807 4.1818a5.9847 5.9847 0 0 0-3.9977 2.9 6.0462 6.0462 0 0 0 .7427 7.0966 5.98 5.98 0 0 0 .511 4.9107 6.051 6.051 0 0 0 6.5146 2.9001A5.9847 5.9847 0 0 0 13.2599 24a6.0557 6.0557 0 0 0 5.7718-4.2058 5.9894 5.9894 0 0 0 3.9977-2.9001 6.0557 6.0557 0 0 0-.7475-7.0729zm-9.022 12.6081a4.4755 4.4755 0 0 1-2.8764-1.0408l.1419-.0804 4.7783-2.7582a.7948.7948 0 0 0 .3927-.6813v-6.7369l2.02 1.1686a.071.071 0 0 1 .038.052v5.5826a4.504 4.504 0 0 1-4.4945 4.4944zm-9.6607-4.1254a4.4708 4.4708 0 0 1-.5346-3.0137l.142.0852 4.783 2.7582a.7712.7712 0 0 0 .7806 0l5.8428-3.3685v2.3324a.0804.0804 0 0 1-.0332.0615L9.74 19.9502a4.4992 4.4992 0 0 1-6.1408-1.6464zM2.3408 7.8956a4.485 4.485 0 0 1 2.3653-1.9728V11.6a.7664.7664 0 0 0 .3879.6765l5.8414 3.3698-2.02 1.1685a.0757.0757 0 0 1-.071 0l-4.8303-2.7865A4.504 4.504 0 0 1 2.3408 7.872zm16.5963 3.8558L13.1038 8.364 15.1192 7.2a.0757.0757 0 0 1 .071 0l4.8303 2.7913a4.4944 4.4944 0 0 1-.6765 8.1042v-5.6772a.79.79 0 0 0-.407-.667zm2.0107-3.0231l-.142-.0852-4.783-2.7622a.7759.7759 0 0 0-.7854 0L9.409 9.2297V6.8974a.0662.0662 0 0 1 .0284-.0615l4.8303-2.7866a4.4992 4.4992 0 0 1 6.6802 4.66zM8.3065 12.863l-2.02-1.1638a.0804.0804 0 0 1-.038-.0567V6.0742a4.4992 4.4992 0 0 1 7.3757-3.4537l-.142.0805L8.704 5.459a.7948.7948 0 0 0-.3927.6813zm1.0976-2.3654l2.602-1.4998 2.6069 1.4998v2.9994l-2.5974 1.4997-2.6067-1.4997Z" />
|
|
18
|
+
</svg>
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const MARKED_VENDORS: ReadonlySet<ModelVendor> = new Set(["openai", "anthropic", "xai"]);
|
|
23
|
+
|
|
24
|
+
/** True when `ModelMark` has a real maker logo for this model (not the neutral fallback). */
|
|
25
|
+
export function modelHasMark(model: ModelDisplayInput): boolean {
|
|
26
|
+
const vendor = modelVendor(model);
|
|
27
|
+
return vendor !== null && MARKED_VENDORS.has(vendor);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* The model maker's logo (OpenAI, Claude, Grok), never the connection that
|
|
32
|
+
* serves it. Makers without a bundled logo get a neutral mark, so an org- and
|
|
33
|
+
* a workspace-connected copy of one model always look the same.
|
|
34
|
+
*/
|
|
35
|
+
export function ModelMark(props: {
|
|
36
|
+
model: ModelDisplayInput;
|
|
37
|
+
className?: string | undefined;
|
|
38
|
+
/** Shown when the maker has no bundled logo. Defaults to a neutral sparkle. */
|
|
39
|
+
fallback?: ReactNode;
|
|
40
|
+
"aria-label"?: string | undefined;
|
|
41
|
+
}) {
|
|
42
|
+
const vendor = modelVendor(props.model);
|
|
43
|
+
const className = cn("size-3.5 shrink-0", props.className);
|
|
44
|
+
const label = props["aria-label"];
|
|
45
|
+
const a11y = label ? { role: "img" as const, "aria-label": label } : { "aria-hidden": true };
|
|
46
|
+
const mark =
|
|
47
|
+
vendor === "openai" ? (
|
|
48
|
+
<ChatGptMark className="size-full" />
|
|
49
|
+
) : vendor === "anthropic" ? (
|
|
50
|
+
<ClaudeMark className="size-full" />
|
|
51
|
+
) : vendor === "xai" ? (
|
|
52
|
+
<GrokMark className="size-full" />
|
|
53
|
+
) : props.fallback !== undefined ? (
|
|
54
|
+
props.fallback
|
|
55
|
+
) : (
|
|
56
|
+
<SparklesIcon className="size-full" aria-hidden />
|
|
57
|
+
);
|
|
58
|
+
if (mark === null) return null;
|
|
59
|
+
return (
|
|
60
|
+
<span
|
|
61
|
+
className={cn("inline-flex items-center justify-center [&>svg]:size-full", className)}
|
|
62
|
+
data-model-vendor={vendor ?? "unknown"}
|
|
63
|
+
{...a11y}
|
|
64
|
+
>
|
|
65
|
+
{mark}
|
|
66
|
+
</span>
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* A model as people should see it outside model settings: the maker's mark and
|
|
72
|
+
* the clean display name. Never a routing prefix, connection id or scope.
|
|
73
|
+
*/
|
|
74
|
+
export function ModelName(props: {
|
|
75
|
+
model: ModelDisplayInput;
|
|
76
|
+
/** Hide the maker mark for dense text-only contexts. */
|
|
77
|
+
mark?: boolean | undefined;
|
|
78
|
+
className?: string | undefined;
|
|
79
|
+
markClassName?: string | undefined;
|
|
80
|
+
}) {
|
|
81
|
+
const name = modelDisplayName(props.model);
|
|
82
|
+
return (
|
|
83
|
+
<span className={cn("inline-flex min-w-0 items-center gap-1.5", props.className)} title={name}>
|
|
84
|
+
{props.mark === false ? null : (
|
|
85
|
+
<ModelMark model={props.model} className={props.markClassName} />
|
|
86
|
+
)}
|
|
87
|
+
<span className="min-w-0 truncate">{name}</span>
|
|
88
|
+
</span>
|
|
89
|
+
);
|
|
90
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ClientModel } from "@opengeni/sdk";
|
|
2
|
+
import { modelDisplayName } from "@opengeni/sdk/model-display";
|
|
2
3
|
import { ChevronDownIcon } from "lucide-react";
|
|
3
4
|
import { useId, useMemo } from "react";
|
|
4
5
|
import { groupPickerRowsByBillingClass, type PickerModelRow } from "../model-policy";
|
|
@@ -59,7 +60,14 @@ function providerGroups(models: ClientModel[], codexOnly: boolean) {
|
|
|
59
60
|
optionDisabled: codexOnly && !isCodexClientModel(model),
|
|
60
61
|
});
|
|
61
62
|
}
|
|
62
|
-
|
|
63
|
+
const groups = [...byProvider.values()];
|
|
64
|
+
if (codexOnly) {
|
|
65
|
+
const codexIndex = groups.findIndex((group) =>
|
|
66
|
+
group.models.some((model) => !model.optionDisabled && isCodexClientModel(model)),
|
|
67
|
+
);
|
|
68
|
+
if (codexIndex > 0) groups.unshift(...groups.splice(codexIndex, 1));
|
|
69
|
+
}
|
|
70
|
+
return groups;
|
|
63
71
|
}
|
|
64
72
|
|
|
65
73
|
export function ModelPicker({
|
|
@@ -78,8 +86,11 @@ export function ModelPicker({
|
|
|
78
86
|
[rows, codexOnly],
|
|
79
87
|
);
|
|
80
88
|
const billingGroups = useMemo(
|
|
81
|
-
() =>
|
|
82
|
-
|
|
89
|
+
() =>
|
|
90
|
+
effectiveRows.length > 0
|
|
91
|
+
? groupPickerRowsByBillingClass(effectiveRows, { codexOnly, selectedId: value })
|
|
92
|
+
: [],
|
|
93
|
+
[effectiveRows, codexOnly, value],
|
|
83
94
|
);
|
|
84
95
|
const providerGroupList = useMemo(() => providerGroups(models, codexOnly), [models, codexOnly]);
|
|
85
96
|
const useBillingGroups = Boolean(effectiveRows.length);
|
|
@@ -121,7 +132,7 @@ export function ModelPicker({
|
|
|
121
132
|
<optgroup key={group.label} label={group.label}>
|
|
122
133
|
{group.models.map((model) => (
|
|
123
134
|
<option key={model.id} value={model.id} disabled={model.optionDisabled}>
|
|
124
|
-
{model
|
|
135
|
+
{modelDisplayName(model)}
|
|
125
136
|
</option>
|
|
126
137
|
))}
|
|
127
138
|
</optgroup>
|
|
@@ -0,0 +1,424 @@
|
|
|
1
|
+
import type { ClientModel, ReasoningEffort } from "@opengeni/sdk";
|
|
2
|
+
import { ArrowRightIcon, CheckIcon, SearchIcon, ZapIcon } from "lucide-react";
|
|
3
|
+
import { useRef, useState, type RefObject, type CSSProperties } from "react";
|
|
4
|
+
import { Popover, RadioGroup } from "radix-ui";
|
|
5
|
+
import { cn } from "../lib/cn";
|
|
6
|
+
import {
|
|
7
|
+
MENU_CHECK_CLASS,
|
|
8
|
+
MENU_LABEL_CLASS,
|
|
9
|
+
MENU_NOTE_CLASS,
|
|
10
|
+
MENU_SURFACE_CLASS,
|
|
11
|
+
} from "../lib/menu-styles";
|
|
12
|
+
import {
|
|
13
|
+
coerceReasoningEffortForModel,
|
|
14
|
+
effortOptionsForModel,
|
|
15
|
+
findPickerRow,
|
|
16
|
+
groupPickerRowsByBillingClass,
|
|
17
|
+
labelReasoningEffort,
|
|
18
|
+
payerSummaryForModel,
|
|
19
|
+
runnableLatencyModesForModel,
|
|
20
|
+
type PickerModelRow,
|
|
21
|
+
} from "../model-policy";
|
|
22
|
+
import {
|
|
23
|
+
BillingClassMark,
|
|
24
|
+
defaultModelPolicyPickerMessages,
|
|
25
|
+
effectiveRows,
|
|
26
|
+
groupPresentationFor,
|
|
27
|
+
PickerNavRow,
|
|
28
|
+
SCOPED_BILLING_HINTS,
|
|
29
|
+
type ModelPolicyPickerProps,
|
|
30
|
+
} from "./model-policy-picker";
|
|
31
|
+
import { ModelMark } from "./model-mark";
|
|
32
|
+
type ClientPickerModelRow = PickerModelRow<ClientModel>;
|
|
33
|
+
|
|
34
|
+
/** Model selection stays flat; reasoning never becomes a navigation destination. */
|
|
35
|
+
export function ModelPolicyPickerMenu(props: ModelPolicyPickerProps) {
|
|
36
|
+
const messages = { ...defaultModelPolicyPickerMessages, ...props.messages };
|
|
37
|
+
const [query, setQuery] = useState("");
|
|
38
|
+
const rows = effectiveRows(props);
|
|
39
|
+
const selected = findPickerRow(rows, props.model);
|
|
40
|
+
const words = query.toLowerCase().trim().split(/\s+/).filter(Boolean);
|
|
41
|
+
const filtered = rows.filter((row) => {
|
|
42
|
+
const description = groupPresentationFor(props, row.billingClass)?.description;
|
|
43
|
+
const text =
|
|
44
|
+
`${row.label} ${row.id} ${row.providerLabel} ${row.billingClassLabel} ${description === undefined ? payerSummaryForModel(row.catalog) : (description ?? "")}`.toLowerCase();
|
|
45
|
+
return words.every((word) => text.includes(word));
|
|
46
|
+
});
|
|
47
|
+
const matchingIds = new Set(filtered.map((row) => row.id));
|
|
48
|
+
const groups = groupPickerRowsByBillingClass(rows, {
|
|
49
|
+
codexOnly: props.codexOnly === true,
|
|
50
|
+
selectedId: props.model,
|
|
51
|
+
collapseScopes: props.collapseScopes !== false,
|
|
52
|
+
})
|
|
53
|
+
.map((group) => {
|
|
54
|
+
const presentation = groupPresentationFor(props, group.billingClass);
|
|
55
|
+
const override = presentation?.description;
|
|
56
|
+
const defaultHint =
|
|
57
|
+
props.collapseScopes === false &&
|
|
58
|
+
messages.billingHints[group.billingClass] ===
|
|
59
|
+
defaultModelPolicyPickerMessages.billingHints[group.billingClass]
|
|
60
|
+
? (SCOPED_BILLING_HINTS[group.billingClass] ?? messages.billingHints[group.billingClass])
|
|
61
|
+
: messages.billingHints[group.billingClass];
|
|
62
|
+
return {
|
|
63
|
+
...group,
|
|
64
|
+
label: presentation?.label ?? group.label,
|
|
65
|
+
rows: group.rows.filter((row) => matchingIds.has(row.id)),
|
|
66
|
+
description:
|
|
67
|
+
override === undefined
|
|
68
|
+
? group.billingClass === "opengeni_credits"
|
|
69
|
+
? null
|
|
70
|
+
: defaultHint
|
|
71
|
+
: override,
|
|
72
|
+
};
|
|
73
|
+
})
|
|
74
|
+
.filter((group) => group.rows.length > 0);
|
|
75
|
+
const choose = (row: ClientPickerModelRow) => {
|
|
76
|
+
if (!row.selectable || props.disabled) return;
|
|
77
|
+
if (row.id !== props.model) props.onModelChange(row.id);
|
|
78
|
+
const effort = coerceReasoningEffortForModel(row.catalog, props.effort);
|
|
79
|
+
// Hosts may commit the combined model/effort draft through this callback.
|
|
80
|
+
props.onEffortChange(effort);
|
|
81
|
+
if (
|
|
82
|
+
props.latencyMode !== "standard" &&
|
|
83
|
+
!runnableLatencyModesForModel(row.catalog).includes(props.latencyMode)
|
|
84
|
+
) {
|
|
85
|
+
props.onLatencyModeChange("standard");
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
const modelRow = (row: ClientPickerModelRow) => (
|
|
89
|
+
<PickerNavRow
|
|
90
|
+
key={row.id}
|
|
91
|
+
icon={
|
|
92
|
+
props.collapseScopes === false ? undefined : (
|
|
93
|
+
<ModelMark model={row.catalog} className="size-4 text-og-fg-muted" />
|
|
94
|
+
)
|
|
95
|
+
}
|
|
96
|
+
label={row.label}
|
|
97
|
+
hint={row.unavailableReason ?? undefined}
|
|
98
|
+
disabled={props.disabled || !row.selectable}
|
|
99
|
+
title={[row.label, row.unavailableReason].filter(Boolean).join(" · ")}
|
|
100
|
+
active={row.selectable && row.id === props.model}
|
|
101
|
+
showChevron={false}
|
|
102
|
+
trailing={
|
|
103
|
+
row.catalog.cost === "free" || row.id === props.model ? (
|
|
104
|
+
<span className="flex items-center gap-2">
|
|
105
|
+
{row.catalog.cost === "free" ? (
|
|
106
|
+
<span className="rounded-full bg-og-surface-2 px-1.5 py-0.5 text-og-control text-og-fg-muted">
|
|
107
|
+
{messages.free}
|
|
108
|
+
</span>
|
|
109
|
+
) : null}
|
|
110
|
+
{row.id === props.model ? (
|
|
111
|
+
<CheckIcon className={MENU_CHECK_CLASS} aria-label={messages.selected} />
|
|
112
|
+
) : null}
|
|
113
|
+
</span>
|
|
114
|
+
) : null
|
|
115
|
+
}
|
|
116
|
+
testId={`model-picker-choice-${row.id}`}
|
|
117
|
+
onClick={() => choose(row)}
|
|
118
|
+
/>
|
|
119
|
+
);
|
|
120
|
+
return (
|
|
121
|
+
<div
|
|
122
|
+
data-testid="model-picker-menu"
|
|
123
|
+
className="flex min-h-0 flex-col"
|
|
124
|
+
onKeyDown={(event) => {
|
|
125
|
+
if (
|
|
126
|
+
!(event.target instanceof HTMLButtonElement) ||
|
|
127
|
+
!["ArrowDown", "ArrowUp", "Home", "End"].includes(event.key)
|
|
128
|
+
)
|
|
129
|
+
return;
|
|
130
|
+
const buttons = Array.from(
|
|
131
|
+
event.currentTarget.querySelectorAll<HTMLButtonElement>(
|
|
132
|
+
'[data-testid^="model-picker-choice-"]:not(:disabled)',
|
|
133
|
+
),
|
|
134
|
+
);
|
|
135
|
+
const index = buttons.indexOf(event.target);
|
|
136
|
+
if (index < 0) return;
|
|
137
|
+
event.preventDefault();
|
|
138
|
+
const next =
|
|
139
|
+
event.key === "Home"
|
|
140
|
+
? 0
|
|
141
|
+
: event.key === "End"
|
|
142
|
+
? buttons.length - 1
|
|
143
|
+
: (index + (event.key === "ArrowDown" ? 1 : -1) + buttons.length) % buttons.length;
|
|
144
|
+
buttons[next]?.focus();
|
|
145
|
+
}}
|
|
146
|
+
>
|
|
147
|
+
{rows.some((row) => row.selectable) ? (
|
|
148
|
+
<div className="border-b border-og-border py-1">
|
|
149
|
+
<label className="og-model-policy-search flex items-center gap-2 px-2.5 py-0.5">
|
|
150
|
+
<SearchIcon className="size-4 shrink-0 text-og-fg-subtle" aria-hidden />
|
|
151
|
+
<input
|
|
152
|
+
aria-label={messages.searchLabel}
|
|
153
|
+
placeholder={messages.searchPlaceholder}
|
|
154
|
+
value={query}
|
|
155
|
+
onChange={(event) => setQuery(event.target.value)}
|
|
156
|
+
onKeyDown={(event) => {
|
|
157
|
+
if (event.key !== "Escape" && event.key !== "Tab") event.stopPropagation();
|
|
158
|
+
if (event.key === "ArrowDown") {
|
|
159
|
+
event.preventDefault();
|
|
160
|
+
event.currentTarget
|
|
161
|
+
.closest('[data-testid="model-picker-menu"]')
|
|
162
|
+
?.querySelector<HTMLButtonElement>("button:not(:disabled)")
|
|
163
|
+
?.focus();
|
|
164
|
+
}
|
|
165
|
+
}}
|
|
166
|
+
className="og-model-policy-search-input h-8 min-w-0 flex-1 bg-transparent text-og-menu text-og-fg outline-hidden placeholder:text-og-fg-subtle"
|
|
167
|
+
/>
|
|
168
|
+
</label>
|
|
169
|
+
</div>
|
|
170
|
+
) : null}
|
|
171
|
+
{props.error ? (
|
|
172
|
+
<p className={cn(MENU_NOTE_CLASS, "text-og-sm text-og-status-failed")} role="alert">
|
|
173
|
+
{props.error}
|
|
174
|
+
</p>
|
|
175
|
+
) : null}
|
|
176
|
+
<div
|
|
177
|
+
className="min-h-0 flex-1 overflow-y-auto overscroll-contain py-1"
|
|
178
|
+
data-testid="model-picker-models"
|
|
179
|
+
>
|
|
180
|
+
{props.loading ? (
|
|
181
|
+
// Rows at the menu's row height, never a sentence, so nothing jumps.
|
|
182
|
+
<div role="status" aria-label={messages.loading}>
|
|
183
|
+
{[58, 44, 66, 50].map((width) => (
|
|
184
|
+
<div key={width} aria-hidden="true" className="flex h-8 items-center gap-3 px-2.5">
|
|
185
|
+
<span className="size-4 shrink-0 animate-pulse rounded bg-og-surface-2" />
|
|
186
|
+
<span
|
|
187
|
+
className="h-2.5 animate-pulse rounded bg-og-surface-2"
|
|
188
|
+
style={{ width: `${width}%` }}
|
|
189
|
+
/>
|
|
190
|
+
</div>
|
|
191
|
+
))}
|
|
192
|
+
</div>
|
|
193
|
+
) : rows.some((row) => row.selectable) ? (
|
|
194
|
+
<>
|
|
195
|
+
{groups.map((group) => (
|
|
196
|
+
<section
|
|
197
|
+
key={group.billingClass}
|
|
198
|
+
aria-label={group.label}
|
|
199
|
+
className="[&+section]:mt-1.5 [&+section]:border-t [&+section]:border-og-border [&+section]:pt-1.5"
|
|
200
|
+
>
|
|
201
|
+
<div className={cn(MENU_LABEL_CLASS, "flex items-center gap-2")}>
|
|
202
|
+
<BillingClassMark
|
|
203
|
+
billingClass={group.billingClass}
|
|
204
|
+
presentation={groupPresentationFor(props, group.billingClass)}
|
|
205
|
+
aria-label=""
|
|
206
|
+
/>
|
|
207
|
+
<span className="min-w-0 break-words">{group.label}</span>
|
|
208
|
+
</div>
|
|
209
|
+
{group.description ? (
|
|
210
|
+
<p className="break-words px-2.5 pb-1 text-og-sm text-og-fg-muted">
|
|
211
|
+
{group.description}
|
|
212
|
+
</p>
|
|
213
|
+
) : null}
|
|
214
|
+
{group.rows.map(modelRow)}
|
|
215
|
+
</section>
|
|
216
|
+
))}
|
|
217
|
+
{filtered.length === 0 ? (
|
|
218
|
+
<p className={MENU_NOTE_CLASS}>
|
|
219
|
+
{words.length ? messages.noMatches : messages.noModels}
|
|
220
|
+
</p>
|
|
221
|
+
) : null}
|
|
222
|
+
</>
|
|
223
|
+
) : props.connectModelsHref || rows.length > 0 ? (
|
|
224
|
+
<ConnectModelsPanel href={props.connectModelsHref} messages={messages} />
|
|
225
|
+
) : (
|
|
226
|
+
<p className={MENU_NOTE_CLASS}>{messages.noModels}</p>
|
|
227
|
+
)}
|
|
228
|
+
</div>
|
|
229
|
+
{rows.some((row) => row.selectable) &&
|
|
230
|
+
selected &&
|
|
231
|
+
((props.hasImageAttachments &&
|
|
232
|
+
selected.catalog.capabilities?.inputModalities.includes("image") === false) ||
|
|
233
|
+
(effortOptionsForModel(selected.catalog).length > 1 &&
|
|
234
|
+
selected.catalog.capabilities?.reasoning.runnable !== false) ||
|
|
235
|
+
(props.allowLatencyMode !== false &&
|
|
236
|
+
runnableLatencyModesForModel(selected.catalog).includes("fast"))) ? (
|
|
237
|
+
<div className="border-t border-og-border px-2.5 py-2.5">
|
|
238
|
+
{props.hasImageAttachments &&
|
|
239
|
+
selected.catalog.capabilities?.inputModalities.includes("image") === false ? (
|
|
240
|
+
<p className="pb-1.5 text-og-control leading-relaxed text-og-fg-subtle">
|
|
241
|
+
{messages.unsupportedAttachments}
|
|
242
|
+
</p>
|
|
243
|
+
) : null}
|
|
244
|
+
<ModelThinkingControls {...props} />
|
|
245
|
+
</div>
|
|
246
|
+
) : null}
|
|
247
|
+
</div>
|
|
248
|
+
);
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
const CONNECT_MODEL_OPTIONS: Array<{
|
|
252
|
+
billingClass: "codex_subscription" | "supergrok_subscription" | "byok" | "external";
|
|
253
|
+
title: string;
|
|
254
|
+
detail: string;
|
|
255
|
+
}> = [
|
|
256
|
+
{ billingClass: "codex_subscription", title: "Codex", detail: "ChatGPT" },
|
|
257
|
+
{ billingClass: "supergrok_subscription", title: "SuperGrok", detail: "xAI" },
|
|
258
|
+
{ billingClass: "byok", title: "AI Gateway", detail: "Vercel" },
|
|
259
|
+
{ billingClass: "external", title: "OpenRouter", detail: "API key" },
|
|
260
|
+
];
|
|
261
|
+
|
|
262
|
+
function ConnectModelsPanel(props: {
|
|
263
|
+
href: string | undefined;
|
|
264
|
+
messages: typeof defaultModelPolicyPickerMessages;
|
|
265
|
+
}) {
|
|
266
|
+
return (
|
|
267
|
+
<div className="px-1.5 pb-1.5 pt-2" data-testid="model-picker-connect">
|
|
268
|
+
<div className="px-1.5 pb-3">
|
|
269
|
+
<p className="text-og-menu font-medium tracking-tight text-og-fg">
|
|
270
|
+
{props.messages.connectTitle}
|
|
271
|
+
</p>
|
|
272
|
+
<p className="mt-1 text-og-control leading-snug text-og-fg-subtle">
|
|
273
|
+
{props.messages.connectBody}
|
|
274
|
+
</p>
|
|
275
|
+
</div>
|
|
276
|
+
<div className="grid grid-cols-2 gap-1">
|
|
277
|
+
{CONNECT_MODEL_OPTIONS.map((option) => {
|
|
278
|
+
const content = (
|
|
279
|
+
<>
|
|
280
|
+
<span className="flex size-8 shrink-0 items-center justify-center rounded-og-md bg-og-surface-2 text-og-fg">
|
|
281
|
+
<BillingClassMark
|
|
282
|
+
billingClass={option.billingClass}
|
|
283
|
+
aria-label=""
|
|
284
|
+
className="size-4 text-og-fg"
|
|
285
|
+
/>
|
|
286
|
+
</span>
|
|
287
|
+
<span className="min-w-0">
|
|
288
|
+
<span className="block truncate text-og-control font-medium text-og-fg">
|
|
289
|
+
{option.title}
|
|
290
|
+
</span>
|
|
291
|
+
<span className="block truncate text-og-control text-og-fg-subtle">
|
|
292
|
+
{option.detail}
|
|
293
|
+
</span>
|
|
294
|
+
</span>
|
|
295
|
+
</>
|
|
296
|
+
);
|
|
297
|
+
const className =
|
|
298
|
+
"flex min-w-0 items-center gap-2 rounded-og-md px-1.5 py-1.5 outline-hidden transition-colors hover:bg-og-hover focus-visible:ring-2 focus-visible:ring-og-accent/40";
|
|
299
|
+
return props.href ? (
|
|
300
|
+
<a key={option.title} href={props.href} className={className}>
|
|
301
|
+
{content}
|
|
302
|
+
</a>
|
|
303
|
+
) : (
|
|
304
|
+
<div key={option.title} className={className}>
|
|
305
|
+
{content}
|
|
306
|
+
</div>
|
|
307
|
+
);
|
|
308
|
+
})}
|
|
309
|
+
</div>
|
|
310
|
+
{props.href ? (
|
|
311
|
+
<a
|
|
312
|
+
href={props.href}
|
|
313
|
+
className="mt-2 flex h-9 w-full items-center justify-center gap-1.5 rounded-og-md border border-og-primary-border bg-og-primary text-og-primary-fg hover:bg-og-primary-hover text-og-control font-medium outline-hidden transition-colors focus-visible:ring-2 focus-visible:ring-og-accent/40"
|
|
314
|
+
>
|
|
315
|
+
{props.messages.connectAction}
|
|
316
|
+
<ArrowRightIcon className="size-3.5" aria-hidden />
|
|
317
|
+
</a>
|
|
318
|
+
) : (
|
|
319
|
+
<p className="px-1.5 pt-3 text-og-control text-og-fg-subtle">{props.messages.noModels}</p>
|
|
320
|
+
)}
|
|
321
|
+
</div>
|
|
322
|
+
);
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
function ModelThinkingControls(props: ModelPolicyPickerProps) {
|
|
326
|
+
const selected = findPickerRow(effectiveRows(props), props.model);
|
|
327
|
+
if (!selected) return null;
|
|
328
|
+
const efforts = effortOptionsForModel(selected.catalog);
|
|
329
|
+
const messages = { ...defaultModelPolicyPickerMessages, ...props.messages };
|
|
330
|
+
const supportsFast = runnableLatencyModesForModel(selected.catalog).includes("fast");
|
|
331
|
+
const showThinking =
|
|
332
|
+
efforts.length > 1 && selected.catalog.capabilities?.reasoning.runnable !== false;
|
|
333
|
+
const showFast = supportsFast && props.allowLatencyMode !== false;
|
|
334
|
+
if (!showThinking && !showFast) return null;
|
|
335
|
+
return (
|
|
336
|
+
<div className="space-y-2 text-og-control" data-testid="model-picker-reasoning">
|
|
337
|
+
<div className="flex min-h-7 items-center justify-between gap-3">
|
|
338
|
+
{showThinking ? <span className="text-og-fg-subtle">{messages.thinking}</span> : <span />}
|
|
339
|
+
{showFast ? (
|
|
340
|
+
<button
|
|
341
|
+
type="button"
|
|
342
|
+
data-testid="model-picker-fast"
|
|
343
|
+
disabled={props.disabled || !selected.selectable}
|
|
344
|
+
aria-pressed={props.latencyMode === "fast"}
|
|
345
|
+
title={messages.fast + " · " + messages.fastRateHint}
|
|
346
|
+
onClick={() =>
|
|
347
|
+
props.onLatencyModeChange(props.latencyMode === "fast" ? "standard" : "fast")
|
|
348
|
+
}
|
|
349
|
+
className="flex min-h-8 shrink-0 items-center gap-1.5 whitespace-nowrap rounded-og-sm px-2 text-og-fg-muted hover:bg-og-hover focus-visible:ring-2 focus-visible:ring-og-accent/40 disabled:opacity-50"
|
|
350
|
+
>
|
|
351
|
+
<ZapIcon className={cn("size-3.5", props.latencyMode === "fast" && "fill-current")} />
|
|
352
|
+
{messages.fast}
|
|
353
|
+
<span className="text-og-fg-subtle">{messages.fastRateHint}</span>
|
|
354
|
+
</button>
|
|
355
|
+
) : null}
|
|
356
|
+
</div>
|
|
357
|
+
{showThinking ? (
|
|
358
|
+
<RadioGroup.Root
|
|
359
|
+
aria-label={messages.thinkingEffort}
|
|
360
|
+
value={coerceReasoningEffortForModel(selected.catalog, props.effort)}
|
|
361
|
+
disabled={props.disabled || !selected.selectable}
|
|
362
|
+
onValueChange={(value) => props.onEffortChange(value as ReasoningEffort)}
|
|
363
|
+
orientation="horizontal"
|
|
364
|
+
className="flex flex-wrap gap-0.5 rounded-og-md bg-og-surface-2 p-0.5"
|
|
365
|
+
>
|
|
366
|
+
{efforts.map((effort) => (
|
|
367
|
+
<RadioGroup.Item
|
|
368
|
+
key={effort}
|
|
369
|
+
value={effort}
|
|
370
|
+
aria-label={labelReasoningEffort(effort)}
|
|
371
|
+
title={labelReasoningEffort(effort)}
|
|
372
|
+
className="min-h-8 min-w-10 flex-1 cursor-pointer whitespace-nowrap rounded-og-sm px-1.5 text-og-control text-og-fg-muted outline-hidden transition-colors hover:text-og-fg focus-visible:ring-2 focus-visible:ring-og-accent/40 data-[state=checked]:bg-og-surface-1 data-[state=checked]:text-og-fg data-[state=checked]:shadow-sm disabled:cursor-not-allowed disabled:opacity-50"
|
|
373
|
+
>
|
|
374
|
+
{effort === "xhigh" ? "X-high" : labelReasoningEffort(effort)}
|
|
375
|
+
</RadioGroup.Item>
|
|
376
|
+
))}
|
|
377
|
+
</RadioGroup.Root>
|
|
378
|
+
) : null}
|
|
379
|
+
</div>
|
|
380
|
+
);
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
export function ModelPolicyPickerPopover(
|
|
384
|
+
props: ModelPolicyPickerProps & {
|
|
385
|
+
anchor: RefObject<HTMLButtonElement | null>;
|
|
386
|
+
contentId: string;
|
|
387
|
+
portalStyle: CSSProperties;
|
|
388
|
+
},
|
|
389
|
+
) {
|
|
390
|
+
const outside = useRef(false);
|
|
391
|
+
const messages = { ...defaultModelPolicyPickerMessages, ...props.messages };
|
|
392
|
+
return (
|
|
393
|
+
<Popover.Root open onOpenChange={(open) => props.onOpenChange?.(open)}>
|
|
394
|
+
<Popover.Anchor virtualRef={props.anchor} />
|
|
395
|
+
<Popover.Portal>
|
|
396
|
+
<Popover.Content
|
|
397
|
+
id={props.contentId}
|
|
398
|
+
aria-label={messages.label}
|
|
399
|
+
align="start"
|
|
400
|
+
side={props.menuSide ?? "bottom"}
|
|
401
|
+
sideOffset={8}
|
|
402
|
+
collisionPadding={12}
|
|
403
|
+
onInteractOutside={(event) => {
|
|
404
|
+
if (props.anchor.current?.contains(event.target as Node)) event.preventDefault();
|
|
405
|
+
else outside.current = true;
|
|
406
|
+
}}
|
|
407
|
+
onCloseAutoFocus={(event) => {
|
|
408
|
+
event.preventDefault();
|
|
409
|
+
if (!outside.current) props.anchor.current?.focus();
|
|
410
|
+
}}
|
|
411
|
+
className={cn(
|
|
412
|
+
MENU_SURFACE_CLASS,
|
|
413
|
+
"og-root og-model-policy-menu z-50 flex max-h-[min(32rem,var(--radix-popover-content-available-height))] w-[22rem] max-w-[calc(100vw-16px)] flex-col overflow-hidden p-[var(--og-model-picker-menu-padding)]",
|
|
414
|
+
props.contentClassName,
|
|
415
|
+
)}
|
|
416
|
+
style={{ ...props.portalStyle, ...props.contentStyle }}
|
|
417
|
+
data-testid="model-picker-content"
|
|
418
|
+
>
|
|
419
|
+
<ModelPolicyPickerMenu {...props} />
|
|
420
|
+
</Popover.Content>
|
|
421
|
+
</Popover.Portal>
|
|
422
|
+
</Popover.Root>
|
|
423
|
+
);
|
|
424
|
+
}
|