@opengeni/react 6.5.2-canary.41607687019001 → 6.7.0
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/dist/app/app-state.d.ts +4 -0
- package/dist/app/app-state.js +19 -14
- package/dist/app/components/Composer.js +25 -23
- package/dist/app/components/agent/agent-capability-picker.js +10 -8
- package/dist/app/components/artifacts/artifact-browse-controls.js +4 -4
- package/dist/app/components/artifacts/artifact-library.js +21 -19
- package/dist/app/components/artifacts/artifact-page-chrome.js +3 -3
- package/dist/app/components/artifacts/artifact-viewer.js +23 -22
- package/dist/app/components/artifacts/artifact-viewer.js.map +1 -1
- package/dist/app/components/artifacts/chat-interactive-block.js +12 -12
- package/dist/app/components/artifacts/copy-artifact-link.js +7 -5
- package/dist/app/components/artifacts/file-reach-dialog.js +11 -9
- package/dist/app/components/artifacts/inline-chat-image.js +18 -18
- package/dist/app/components/artifacts/retained-file-preview.js +24 -23
- package/dist/app/components/artifacts/retained-text-preview.js +3 -3
- package/dist/app/components/artifacts/site-audience.js +6 -5
- package/dist/app/components/artifacts/site-conversations.js +16 -14
- package/dist/app/components/artifacts/site-data.js +18 -16
- package/dist/app/components/artifacts/site-public-link.js +3 -2
- package/dist/app/components/artifacts/site-publishing-page.js +39 -37
- package/dist/app/components/artifacts/site-publishing.js +34 -32
- package/dist/app/components/artifacts/site-settings.js +38 -36
- package/dist/app/components/artifacts/site-version-menu.js +8 -7
- package/dist/app/components/billing-class-mark.js +3 -3
- package/dist/app/components/bots/bot-launch-strip.js +17 -17
- package/dist/app/components/bots/bot-template-dialog.js +30 -28
- package/dist/app/components/bots/bot-template-shortcuts.js +19 -19
- package/dist/app/components/bots/bot-templates-page.js +38 -36
- package/dist/app/components/bots/bot-templates-page.js.map +1 -1
- package/dist/app/components/capabilities/capability-detail-sheet.js +13 -11
- package/dist/app/components/capabilities/capability-logo-source.js +13 -13
- package/dist/app/components/capabilities/capability-logo.js +4 -3
- package/dist/app/components/capabilities/connector-tool-permissions.js +8 -6
- package/dist/app/components/capabilities/native-connect-setup.js +14 -14
- package/dist/app/components/capabilities/own-logins-shared-heads-up.js +7 -6
- package/dist/app/components/capabilities/perform-capability-action.js +7 -6
- package/dist/app/components/capabilities/prepared-mcp-setup-card.js +17 -17
- package/dist/app/components/capabilities/session-capability-card.js +72 -70
- package/dist/app/components/capabilities/session-capability-card.js.map +1 -1
- package/dist/app/components/capabilities/session-chrome-card.js +28 -26
- package/dist/app/components/capabilities/session-connection-accounts.js +4 -3
- package/dist/app/components/capabilities/session-custom-mcp-card.js +20 -19
- package/dist/app/components/capabilities/session-github-card.js +22 -20
- package/dist/app/components/capabilities/session-machine-card.js +27 -25
- package/dist/app/components/capabilities/session-personal-github-card.js +16 -16
- package/dist/app/components/capabilities/session-plugin-card.js +10 -9
- package/dist/app/components/capabilities/use-capabilities-catalog.js +4 -3
- package/dist/app/components/capabilities/use-connection-accounts.js +5 -4
- package/dist/app/components/command-menu/chat-status.js +15 -13
- package/dist/app/components/command-menu/chat-switcher.js +35 -33
- package/dist/app/components/command-menu/chat-switcher.js.map +1 -1
- package/dist/app/components/command-menu/command-menu.js +53 -50
- package/dist/app/components/command-menu/command-menu.js.map +1 -1
- package/dist/app/components/command-menu/shortcut-sheet.js +18 -16
- package/dist/app/components/command-menu/shortcut-sheet.js.map +1 -1
- package/dist/app/components/common.js +4 -3
- package/dist/app/components/composer-capabilities-menu-body.js +4 -4
- package/dist/app/components/composer-mobile-plus-panel.js +8 -8
- package/dist/app/components/composer-mobile-plus.js +1 -1
- package/dist/app/components/credit-required-gate.js +3 -3
- package/dist/app/components/credit-required-prompt.js +10 -8
- package/dist/app/components/credit-required-prompt.js.map +1 -1
- package/dist/app/components/credits/checkout-credits-celebration.js +3 -2
- package/dist/app/components/credits/checkout-return.js +3 -2
- package/dist/app/components/credits/checkout-return.js.map +1 -1
- package/dist/app/components/credits/coupon-redeem.js +5 -4
- package/dist/app/components/credits/credit-refusal-notice.js +7 -5
- package/dist/app/components/cross-slot-deep-link-recovery.js +5 -4
- package/dist/app/components/desktop/app-shots.js +13 -11
- package/dist/app/components/desktop/computer-use.js +6 -4
- package/dist/app/components/desktop/this-computer.js +9 -7
- package/dist/app/components/feedback.js +5 -4
- package/dist/app/components/follow-up-repository-menu-body.js +8 -6
- package/dist/app/components/follow-up-repository-menu-body.js.map +1 -1
- package/dist/app/components/follow-up-repository-picker.js +1 -1
- package/dist/app/components/github-app-connect-launcher.js +5 -4
- package/dist/app/components/in-app-help-link.js +3 -3
- package/dist/app/components/knowledge/agent-learning-settings.js +3 -2
- package/dist/app/components/knowledge/agent-learning-settings.js.map +1 -1
- package/dist/app/components/machines/connect-machine-dialog.js +18 -16
- package/dist/app/components/manual-repository-editor.js +3 -2
- package/dist/app/components/markdown.js +6 -6
- package/dist/app/components/models/models-ui.js +12 -10
- package/dist/app/components/my-things.js +12 -10
- package/dist/app/components/my-things.js.map +1 -1
- package/dist/app/components/new-session-starters.js +3 -3
- package/dist/app/components/own-where-it-works.js +9 -7
- package/dist/app/components/personal-resource-attachment-surface.js +4 -4
- package/dist/app/components/pickers.js +5 -5
- package/dist/app/components/rail/channel-create-dialog.js +7 -5
- package/dist/app/components/rail/project-glyph.js +17 -17
- package/dist/app/components/rail/project-profile.js +31 -29
- package/dist/app/components/rail/rail-context.js +3 -3
- package/dist/app/components/rail/rail-sections.js +68 -66
- package/dist/app/components/rail/session-header.js +59 -57
- package/dist/app/components/rail/session-list.js +66 -64
- package/dist/app/components/rail/session-row-content.js +4 -4
- package/dist/app/components/rail/session-row-hover-details.js +14 -12
- package/dist/app/components/rail/session-shell.js +90 -88
- package/dist/app/components/rail/site-session-group-heading.js +8 -8
- package/dist/app/components/repository-picker.js +8 -6
- package/dist/app/components/secrets/session-secrets-panel.js +4 -3
- package/dist/app/components/secrets/vault-model.js +3 -2
- package/dist/app/components/session/agent-configuration-panel.js +25 -23
- package/dist/app/components/session/agent-configuration-panel.js.map +1 -1
- package/dist/app/components/session/artifact-link-boundary.js +3 -3
- package/dist/app/components/session/artifact-session-page.js +11 -9
- package/dist/app/components/session/banners.js +8 -8
- package/dist/app/components/session/codex-usage-notice.js +5 -3
- package/dist/app/components/session/console-new-conversation.js +42 -40
- package/dist/app/components/session/context-text-reader.js +3 -2
- package/dist/app/components/session/descendant-requests.js +39 -37
- package/dist/app/components/session/descendant-requests.js.map +1 -1
- package/dist/app/components/session/editable-artifacts-workspace.js +36 -34
- package/dist/app/components/session/editable-artifacts-workspace.js.map +1 -1
- package/dist/app/components/session/failed-session-banner.js +13 -11
- package/dist/app/components/session/failed-session-banner.js.map +1 -1
- package/dist/app/components/session/failure-recovery-boundary.js +3 -3
- package/dist/app/components/session/human-input-delegation-record.js +2 -2
- package/dist/app/components/session/human-input.js +33 -31
- package/dist/app/components/session/inspector.js +57 -55
- package/dist/app/components/session/inspector.js.map +1 -1
- package/dist/app/components/session/message-actions.js +5 -4
- package/dist/app/components/session/message-actions.js.map +1 -1
- package/dist/app/components/session/message-resource-attachments.js +12 -11
- package/dist/app/components/session/message-resource-attachments.js.map +1 -1
- package/dist/app/components/session/model-context-inspector.js +6 -4
- package/dist/app/components/session/model-recovery-notice.js +3 -3
- package/dist/app/components/session/new-session-settings-menu.js +11 -9
- package/dist/app/components/session/new-session-setup-strip.js +18 -18
- package/dist/app/components/session/sandbox-recovery-actions.js +3 -3
- package/dist/app/components/session/sandbox-switcher.js +10 -9
- package/dist/app/components/session/sandbox-workspace.js +47 -46
- package/dist/app/components/session/search-markdown-highlight.js +7 -7
- package/dist/app/components/session/search-results-view.js +8 -8
- package/dist/app/components/session/session-admin-access.js +13 -11
- package/dist/app/components/session/session-admission-notice.js +7 -5
- package/dist/app/components/session/session-avatar-picker.js +22 -20
- package/dist/app/components/session/session-avatar.js +16 -16
- package/dist/app/components/session/session-machine-access-notice.js +7 -5
- package/dist/app/components/session/session-profile-dialog.js +29 -27
- package/dist/app/components/session/session-profile-editor.js +30 -28
- package/dist/app/components/session/session-retention.js +10 -8
- package/dist/app/components/session/session-search-dialog.js +10 -10
- package/dist/app/components/session/session-skill-reviews.js +2 -1
- package/dist/app/components/session/session-skill-reviews.js.map +1 -1
- package/dist/app/components/session/session-tenancy-control.js +13 -11
- package/dist/app/components/session/session-tenancy-control.js.map +1 -1
- package/dist/app/components/session/session-unattended-setting.js +7 -5
- package/dist/app/components/session/session-usage-limit-section.js +11 -9
- package/dist/app/components/session/share-chat-dialog.js +9 -7
- package/dist/app/components/session/site-origin-link.js +3 -3
- package/dist/app/components/session/subagents.js +8 -8
- package/dist/app/components/session/subscription-account-indicator.js +6 -6
- package/dist/app/components/session-connectors-menu-body.js +4 -3
- package/dist/app/components/session-connectors-menu-body.js.map +1 -1
- package/dist/app/components/settings/row-select.js +7 -5
- package/dist/app/components/toaster.js +3 -2
- package/dist/app/components/transcription-settings.js +11 -9
- package/dist/app/components/ui/destructive-confirm.js +11 -9
- package/dist/app/components/usage/usage-entry.js +5 -5
- package/dist/app/components/window-bar.js +16 -14
- package/dist/app/components/workspace-composer-plus.js +22 -21
- package/dist/app/components/workspace-reach.js +6 -4
- package/dist/app/components/workspace-tenant-boundary.js +5 -4
- package/dist/app/embed/memory-navigation.js +3 -3
- package/dist/app/embed/session-app.js +211 -209
- package/dist/app/lib/actions/actions-provider.js +15 -13
- package/dist/app/lib/agent-capabilities.js +3 -3
- package/dist/app/lib/app-surfaces.js +7 -6
- package/dist/app/lib/archive-session.d.ts +9 -4
- package/dist/app/lib/archive-session.js +4 -2
- package/dist/app/lib/bot-templates.js +3 -2
- package/dist/app/lib/capabilities.js +3 -2
- package/dist/app/lib/codex-usage-query.js +2 -2
- package/dist/app/lib/composer-connectors.js +17 -16
- package/dist/app/lib/console-site.js +2 -2
- package/dist/app/lib/console-text.js +2 -2
- package/dist/app/lib/events.js +9 -9
- package/dist/app/lib/failed-session-copy.js +3 -3
- package/dist/app/lib/inbox.js +4 -2
- package/dist/app/lib/model-access-onboarding.js +3 -3
- package/dist/app/lib/move-chat-to-machine.js +3 -3
- package/dist/app/lib/navigation.js +2 -2
- package/dist/app/lib/session-branch-cache.js +6 -6
- package/dist/app/lib/session-create.js +4 -4
- package/dist/app/lib/session-group-pagination.js +6 -6
- package/dist/app/lib/session-hover-facts.js +13 -11
- package/dist/app/lib/session-model.js +2 -2
- package/dist/app/lib/session-rail.js +3 -3
- package/dist/app/lib/session-rename.js +3 -3
- package/dist/app/lib/session-restart-operation-controller.js +4 -3
- package/dist/app/lib/session-tenancy.js +3 -2
- package/dist/app/lib/session-usage-limit.js +3 -2
- package/dist/app/lib/sessions-group.js +5 -5
- package/dist/app/lib/site-publishing.js +3 -2
- package/dist/app/lib/site-tool-consent-dialog.js +9 -7
- package/dist/app/lib/site-tool-consent-dialog.js.map +1 -1
- package/dist/app/lib/site-tool-consent.js +1 -1
- package/dist/app/lib/subscription-plans.js +3 -2
- package/dist/app/lib/toast.js +2 -1
- package/dist/app/lib/turn-failure-analytics.js +4 -4
- package/dist/app/lib/use-duplicate-site.js +6 -5
- package/dist/app/lib/use-follow-up-repositories.js +6 -5
- package/dist/app/lib/use-workspace-integrations.js +4 -3
- package/dist/app/lib/use-workspace-machines.js +4 -4
- package/dist/app/lib/use-workspace-model-catalog.js +5 -4
- package/dist/app/lib/use-workspace-rigs.js +2 -2
- package/dist/app/lib/workspace-navigation-preference.js +4 -4
- package/dist/app/lib/workspace-scope-context.js +3 -3
- package/dist/app/routes/artifacts.js +67 -66
- package/dist/app/routes/artifacts.js.map +1 -1
- package/dist/app/routes/retained-artifact.js +42 -40
- package/dist/app/routes/retained-artifact.js.map +1 -1
- package/dist/app/routes/session-unavailable.js +8 -7
- package/dist/app/routes/session.js +119 -117
- package/dist/app/routes/sessions-index-hydration.js +5 -5
- package/dist/app/routes/sessions-index.js +104 -102
- package/dist/app/routes/site-view.js +67 -65
- package/dist/app/routes/site-view.js.map +1 -1
- package/dist/artifacts-document.js +4 -4
- package/dist/artifacts-presentation.js +4 -4
- package/dist/artifacts-spreadsheet.js +4 -4
- package/dist/artifacts.js +10 -10
- package/dist/automations.js +17 -15
- package/dist/automations.js.map +1 -1
- package/dist/browser-viewer-TC27OCIP.js +23 -0
- package/dist/chat-interactive-block-RWPQBHVS.js +18 -0
- package/dist/chunk-2BDT3UZQ.js +229 -0
- package/dist/chunk-2CLNIEK4.js +373 -0
- package/dist/chunk-2FSBSCZJ.js +451 -0
- package/dist/chunk-2I7HDP53.js +199 -0
- package/dist/chunk-2INLDVK3.js +15 -0
- package/dist/chunk-2KALVELR.js +126 -0
- package/dist/chunk-2M3J7ZWQ.js +418 -0
- package/dist/chunk-2OP6WLGV.js +708 -0
- package/dist/chunk-2RG7NIAS.js +2936 -0
- package/dist/chunk-2STUPWEL.js +135 -0
- package/dist/chunk-2YUOVM3G.js +271 -0
- package/dist/chunk-2Z3NQNTM.js +3670 -0
- package/dist/chunk-3CPWWGNK.js +920 -0
- package/dist/chunk-3ED2U6XE.js +37 -0
- package/dist/chunk-3GZA4BUW.js +216 -0
- package/dist/chunk-3IK6UYO6.js +1022 -0
- package/dist/chunk-3PZ7JZI2.js +431 -0
- package/dist/chunk-4DVJ6ONS.js +50 -0
- package/dist/chunk-4DVNUCRR.js +2386 -0
- package/dist/chunk-4DVNUCRR.js.map +1 -0
- package/dist/chunk-4E3ZJRTZ.js +41 -0
- package/dist/chunk-4SAWSRAA.js +141 -0
- package/dist/chunk-53AGXXZM.js +307 -0
- package/dist/chunk-54YW6SZZ.js +818 -0
- package/dist/chunk-57AZS3IE.js +2317 -0
- package/dist/chunk-5CPEEAFD.js +143 -0
- package/dist/chunk-5EWSRZ2Y.js +340 -0
- package/dist/chunk-5IE76VCY.js +387 -0
- package/dist/chunk-5NWEKLDZ.js +170 -0
- package/dist/chunk-5O2FCCHZ.js +198 -0
- package/dist/chunk-5QAY6K77.js +399 -0
- package/dist/chunk-5YKW2K6I.js +625 -0
- package/dist/chunk-5YKW2K6I.js.map +1 -0
- package/dist/chunk-6BCXNDEI.js +4116 -0
- package/dist/chunk-6BCXNDEI.js.map +1 -0
- package/dist/chunk-6DK6Z4UN.js +2599 -0
- package/dist/chunk-6DVCC7QS.js +702 -0
- package/dist/chunk-6JHU2UBS.js +2058 -0
- package/dist/chunk-6PZ7OBYU.js +490 -0
- package/dist/chunk-6WD2INST.js +539 -0
- package/dist/chunk-6WD2INST.js.map +1 -0
- package/dist/chunk-6WGRDRMA.js +163 -0
- package/dist/chunk-77WAKEAH.js +186 -0
- package/dist/chunk-7T2ZE3VT.js +5558 -0
- package/dist/chunk-7T2ZE3VT.js.map +1 -0
- package/dist/chunk-7TDO3CUM.js +393 -0
- package/dist/chunk-7TIX2UAR.js +247 -0
- package/dist/chunk-7V5REBCP.js +148 -0
- package/dist/chunk-7VMZGLYI.js +339 -0
- package/dist/chunk-7W37NS3I.js +236 -0
- package/dist/chunk-7X6SDK2C.js +111 -0
- package/dist/chunk-7ZNUHRP5.js +95 -0
- package/dist/chunk-A36PZALD.js +84 -0
- package/dist/chunk-AUI6VA63.js +107 -0
- package/dist/chunk-AW2MQB37.js +24 -0
- package/dist/chunk-AWKES45Y.js +198 -0
- package/dist/chunk-AXHZYXUV.js +132 -0
- package/dist/chunk-BHNSJVBC.js +129 -0
- package/dist/chunk-BJEJFISW.js +50 -0
- package/dist/chunk-BJFH6JI5.js +422 -0
- package/dist/chunk-BMICEQZQ.js +960 -0
- package/dist/chunk-BTLBYBLU.js +29 -0
- package/dist/chunk-BXBDYNRP.js +89 -0
- package/dist/chunk-C372BFOV.js +357 -0
- package/dist/chunk-C43KRXGA.js +234 -0
- package/dist/chunk-C43KRXGA.js.map +1 -0
- package/dist/chunk-CMKGILJK.js +4824 -0
- package/dist/chunk-CRAOSVHC.js +50 -0
- package/dist/chunk-CRU35QQH.js +281 -0
- package/dist/chunk-CUIWCGMA.js +172 -0
- package/dist/chunk-D5TWNFFE.js +38 -0
- package/dist/chunk-DF5EAHDN.js +4461 -0
- package/dist/chunk-DJAXC5OK.js +56 -0
- package/dist/chunk-DXBYWSL5.js +3550 -0
- package/dist/chunk-DXR5PDFP.js +84 -0
- package/dist/chunk-DZWARC4M.js +267 -0
- package/dist/chunk-DZXEDSQI.js +106 -0
- package/dist/chunk-E7XERZWC.js +48 -0
- package/dist/chunk-ECJBYNLJ.js +79 -0
- package/dist/chunk-EDI6SJ2N.js +43 -0
- package/dist/chunk-EWSOC6WF.js +114 -0
- package/dist/chunk-F2OPHAUN.js +103 -0
- package/dist/chunk-F4ISQGGM.js +81 -0
- package/dist/chunk-FO4LYKJL.js +197 -0
- package/dist/chunk-FPXASDG5.js +73 -0
- package/dist/chunk-FSOQDUCG.js +117 -0
- package/dist/chunk-FSOQDUCG.js.map +1 -0
- package/dist/chunk-FVXBNBHO.js +157 -0
- package/dist/chunk-FYWT2O76.js +34 -0
- package/dist/chunk-FYWT2O76.js.map +1 -0
- package/dist/chunk-FZC5N55X.js +981 -0
- package/dist/chunk-GAVYGBFI.js +99 -0
- package/dist/chunk-GFIMOUDT.js +846 -0
- package/dist/chunk-GFIMOUDT.js.map +1 -0
- package/dist/chunk-GKVJIDHF.js +33 -0
- package/dist/chunk-GVN5SZLX.js +212 -0
- package/dist/chunk-H3T7IWNA.js +134 -0
- package/dist/chunk-HAX4LCR5.js +261 -0
- package/dist/chunk-HC4JFZVU.js +121 -0
- package/dist/chunk-HEFPPMBQ.js +581 -0
- package/dist/chunk-HGKTHF2U.js +1356 -0
- package/dist/chunk-HGKTHF2U.js.map +1 -0
- package/dist/chunk-HNLR7Q4Z.js +83 -0
- package/dist/chunk-HSOXMJOT.js +12 -0
- package/dist/chunk-I4MRDSUF.js +281 -0
- package/dist/chunk-I4QEJ62Y.js +202 -0
- package/dist/chunk-I5B5L6Q4.js +56 -0
- package/dist/chunk-I5QZJODL.js +264 -0
- package/dist/chunk-I7ITSXSJ.js +603 -0
- package/dist/chunk-I7XIZRFD.js +390 -0
- package/dist/chunk-IDANQPRH.js +82 -0
- package/dist/chunk-IFB3WJ36.js +212 -0
- package/dist/chunk-IHTAKKTK.js +264 -0
- package/dist/chunk-IKXNLWAL.js +205 -0
- package/dist/chunk-IKXNLWAL.js.map +1 -0
- package/dist/chunk-ILDXWY37.js +173 -0
- package/dist/chunk-IMDQUHBJ.js +570 -0
- package/dist/chunk-IMZCQBOT.js +119 -0
- package/dist/chunk-IXPTECSC.js +403 -0
- package/dist/chunk-J255A3N5.js +71 -0
- package/dist/chunk-J5F5HPPW.js +141 -0
- package/dist/chunk-JDTGRRNU.js +5045 -0
- package/dist/chunk-JDTGRRNU.js.map +1 -0
- package/dist/chunk-JEA3QDX7.js +2469 -0
- package/dist/chunk-JEUPAVYY.js +156 -0
- package/dist/chunk-JKHKLL5W.js +194 -0
- package/dist/chunk-JQL7ZH6C.js +650 -0
- package/dist/chunk-JWB44UGJ.js +57 -0
- package/dist/chunk-JZ4NLCAP.js +333 -0
- package/dist/chunk-K2A5PXQ5.js +412 -0
- package/dist/chunk-K56XV3C3.js +623 -0
- package/dist/chunk-K6GAXXVA.js +23 -0
- package/dist/chunk-KCBMFSMS.js +199 -0
- package/dist/chunk-KF2FV3ZJ.js +268 -0
- package/dist/chunk-KJD65EJP.js +278 -0
- package/dist/chunk-KLEUWIMZ.js +386 -0
- package/dist/chunk-KODELWYT.js +309 -0
- package/dist/chunk-KRDR5RJD.js +83 -0
- package/dist/chunk-KUDGXAF7.js +914 -0
- package/dist/chunk-KY2R73CG.js +171 -0
- package/dist/chunk-KY2R73CG.js.map +1 -0
- package/dist/chunk-KYS77RPN.js +85 -0
- package/dist/chunk-L7YTNTIK.js +368 -0
- package/dist/chunk-LHPNABDH.js +686 -0
- package/dist/chunk-MFROMEKA.js +401 -0
- package/dist/chunk-MIHN76LX.js +2656 -0
- package/dist/chunk-MIYFS2XN.js +42 -0
- package/dist/chunk-MJUCFQMS.js +65 -0
- package/dist/chunk-MM4FNWI4.js +3064 -0
- package/dist/chunk-MNZG4OHU.js +790 -0
- package/dist/chunk-MVW6HNPI.js +250 -0
- package/dist/chunk-MVW6HNPI.js.map +1 -0
- package/dist/chunk-N6AACDUW.js +200 -0
- package/dist/chunk-NC55IFN3.js +781 -0
- package/dist/chunk-NC7PVOEK.js +98 -0
- package/dist/chunk-NCYMNCJO.js +70 -0
- package/dist/chunk-ND2BXV3P.js +259 -0
- package/dist/chunk-NDBTFUO6.js +272 -0
- package/dist/chunk-NDQJZ7HF.js +206 -0
- package/dist/chunk-NGJJJPZZ.js +162 -0
- package/dist/chunk-NJTSNNE7.js +251 -0
- package/dist/chunk-NPGISCU6.js +4159 -0
- package/dist/chunk-NPGISCU6.js.map +1 -0
- package/dist/chunk-NRTE7DNV.js +1270 -0
- package/dist/chunk-NULUNM7H.js +290 -0
- package/dist/chunk-NUNZS36W.js +227 -0
- package/dist/chunk-NW53H5RW.js +2424 -0
- package/dist/chunk-NXCMHIKI.js +263 -0
- package/dist/chunk-O3LKCBP5.js +159 -0
- package/dist/chunk-O4EA4F3W.js +103 -0
- package/dist/chunk-O4EA4F3W.js.map +1 -0
- package/dist/chunk-O4OOG3D6.js +116 -0
- package/dist/chunk-O4OOG3D6.js.map +1 -0
- package/dist/chunk-O6N4ABCA.js +376 -0
- package/dist/chunk-O732GAFC.js +112 -0
- package/dist/chunk-OF4TIKYC.js +690 -0
- package/dist/chunk-OMPVOMPP.js +70 -0
- package/dist/chunk-OPJJSKUK.js +118 -0
- package/dist/chunk-OPWCMA4D.js +196 -0
- package/dist/chunk-ORJPS5VN.js +1193 -0
- package/dist/chunk-OSY5K7L7.js +187 -0
- package/dist/chunk-OV6QJRT4.js +45 -0
- package/dist/chunk-OVKYVZMW.js +108 -0
- package/dist/chunk-OZCBM3UC.js +171 -0
- package/dist/chunk-P3A2EINJ.js +61 -0
- package/dist/chunk-PTAG4PDC.js +27 -0
- package/dist/chunk-PTF5B7TJ.js +298 -0
- package/dist/chunk-Q3DPEYX4.js +848 -0
- package/dist/chunk-Q6CGOPJD.js +215 -0
- package/dist/chunk-Q6CGOPJD.js.map +1 -0
- package/dist/chunk-QB2KMIDP.js +100 -0
- package/dist/chunk-QCSJ4CWE.js +1067 -0
- package/dist/chunk-QIOQ2NPQ.js +414 -0
- package/dist/chunk-QK5EFEUT.js +353 -0
- package/dist/chunk-QPQBLYQJ.js +41 -0
- package/dist/chunk-QPSGCC5D.js +184 -0
- package/dist/chunk-QZAAUQRN.js +474 -0
- package/dist/chunk-QZM6YDJW.js +489 -0
- package/dist/chunk-QZM6YDJW.js.map +1 -0
- package/dist/chunk-RGBI63KJ.js +188 -0
- package/dist/chunk-RLBKLAEY.js +138 -0
- package/dist/chunk-RMFKVOM7.js +304 -0
- package/dist/chunk-ROKQU7WG.js +258 -0
- package/dist/chunk-RPVREAU7.js +251 -0
- package/dist/chunk-RQKLF42C.js +723 -0
- package/dist/chunk-SC6RRD2D.js +38 -0
- package/dist/chunk-SC6RRD2D.js.map +1 -0
- package/dist/chunk-SEO7TICN.js +94 -0
- package/dist/chunk-SHHJCL7X.js +432 -0
- package/dist/chunk-SIRLACNZ.js +114 -0
- package/dist/chunk-SKPHMYAA.js +237 -0
- package/dist/chunk-SODC7T6L.js +1583 -0
- package/dist/chunk-SQJIKMN3.js +366 -0
- package/dist/chunk-SVINDKVW.js +26 -0
- package/dist/chunk-SYCDHPZF.js +335 -0
- package/dist/chunk-T2QX3FDP.js +133 -0
- package/dist/chunk-T3OWFVMS.js +1187 -0
- package/dist/chunk-T6XI5FLY.js +61 -0
- package/dist/chunk-T7OXJZCX.js +62 -0
- package/dist/chunk-TAT5USZN.js +353 -0
- package/dist/chunk-TPQTRNER.js +172 -0
- package/dist/chunk-TUIN4MB7.js +266 -0
- package/dist/chunk-TX3VECZU.js +71 -0
- package/dist/chunk-TXLIEOJX.js +9624 -0
- package/dist/chunk-U3DN4HEY.js +27 -0
- package/dist/chunk-U7XM7CB4.js +191 -0
- package/dist/chunk-UJK53QFL.js +140 -0
- package/dist/chunk-UMTXA2TH.js +319 -0
- package/dist/chunk-UPDSXFK5.js +199 -0
- package/dist/chunk-UTIAXH52.js +269 -0
- package/dist/chunk-UVN5TMHU.js +1184 -0
- package/dist/chunk-V4Z4B2E3.js +52 -0
- package/dist/chunk-V4Z4B2E3.js.map +1 -0
- package/dist/chunk-VGYXW3VG.js +246 -0
- package/dist/chunk-VS7AHPCZ.js +255 -0
- package/dist/chunk-VTTAJOQ7.js +121 -0
- package/dist/chunk-VWPOLUAO.js +99 -0
- package/dist/chunk-X3MWB2QU.js +3851 -0
- package/dist/chunk-X6KAJI3V.js +211 -0
- package/dist/chunk-XBLRHV5R.js +50 -0
- package/dist/chunk-XDFP2LMW.js +605 -0
- package/dist/chunk-XEQMZB3C.js +525 -0
- package/dist/chunk-XEYLT5VA.js +223 -0
- package/dist/chunk-XHIQ5I6N.js +918 -0
- package/dist/chunk-XLH7QY2R.js +378 -0
- package/dist/chunk-XWFAMUZQ.js +113 -0
- package/dist/chunk-Y4BB2KS2.js +294 -0
- package/dist/chunk-Y4BB2KS2.js.map +1 -0
- package/dist/chunk-Y4OBB2VN.js +84 -0
- package/dist/chunk-YCVD6CI3.js +234 -0
- package/dist/chunk-YENLNISG.js +270 -0
- package/dist/chunk-YIRVLKAX.js +351 -0
- package/dist/chunk-YL73CVNK.js +390 -0
- package/dist/chunk-YLS6QE5G.js +288 -0
- package/dist/chunk-YNF2OC54.js +366 -0
- package/dist/chunk-YNF2OC54.js.map +1 -0
- package/dist/chunk-YPWU5KPE.js +147 -0
- package/dist/chunk-YQXTDZSU.js +2984 -0
- package/dist/chunk-YSJEAAOL.js +178 -0
- package/dist/chunk-YWIFM7D7.js +499 -0
- package/dist/chunk-YWVI6ZMK.js +103 -0
- package/dist/chunk-Z4FMAFNH.js +847 -0
- package/dist/chunk-Z654FWNU.js +136 -0
- package/dist/chunk-Z7Y523PS.js +130 -0
- package/dist/chunk-ZD67RM6G.js +60 -0
- package/dist/chunk-ZEG4VPBL.js +187 -0
- package/dist/chunk-ZHDFQITM.js +283 -0
- package/dist/chunk-ZHDFQITM.js.map +1 -0
- package/dist/chunk-ZLYCOBHW.js +75 -0
- package/dist/chunk-ZNJ5MTXV.js +89 -0
- package/dist/chunk-ZSGY3H53.js +155 -0
- package/dist/chunk-ZTPXACWB.js +1788 -0
- package/dist/chunk-ZUA3JMI6.js +107 -0
- package/dist/chunk-ZYAZUPPV.js +559 -0
- package/dist/composer.js +8 -8
- package/dist/computer-viewer-TDDO25AV.js +21 -0
- package/dist/connect.js +12 -12
- package/dist/desktop-dictation.js +12 -10
- package/dist/desktop-dictation.js.map +1 -1
- package/dist/desktop.js +2 -2
- package/dist/editor.js +2 -2
- package/dist/embedded-new-voice-2G3VLPVQ.js +24 -0
- package/dist/embedded-voice-T5IWOWGD.js +24 -0
- package/dist/fleet-decision-row-WM64KXP3.js +361 -0
- package/dist/in-chat-connect-model.js +5 -5
- package/dist/index.js +51 -51
- package/dist/interaction.js +5 -5
- package/dist/machines.js +3 -3
- package/dist/meetings-recorder.js +1 -1
- package/dist/meetings.js +40 -32
- package/dist/meetings.js.map +1 -1
- package/dist/messages/en.d.ts +3 -0
- package/dist/messages.js +1 -1
- package/dist/model-policy-picker-menu-SMC6J6QN.js +22 -0
- package/dist/payment-page-card-G4U63KUV.js +223 -0
- package/dist/platform-activity-row-BUZGZAKZ.js +128 -0
- package/dist/queue-surface-implementation-4KUZ4PJV.js +908 -0
- package/dist/realtime.js +4 -4
- package/dist/recorder-host-WF2RRR56.js +69 -0
- package/dist/recorder-host-WF2RRR56.js.map +1 -0
- package/dist/recordings.js +3 -3
- package/dist/sandbox-files-ESDMOFSD.js +27 -0
- package/dist/session-app.js +211 -209
- package/dist/session-connect-cards-Q53KMMYY.js +25 -0
- package/dist/session-list-model.js +2 -2
- package/dist/session-realtime-CF3I35WJ.js +30 -0
- package/dist/session-realtime.js +2 -2
- package/dist/session-ui.js +33 -31
- package/dist/session.js +5 -5
- package/dist/sites.js +2 -2
- package/dist/terminal.js +2 -2
- package/dist/this-computer.js +3 -3
- package/dist/timeline-annotation-markers-CJK4RYZ4.js +157 -0
- package/dist/timeline-annotation-selection-67GF5H26.js +208 -0
- package/dist/timeline-annotations-dialog-ONJPQDJQ.js +283 -0
- package/dist/ui/access-list.js +11 -9
- package/dist/ui/access-list.js.map +1 -1
- package/dist/ui/api-error.d.ts +6 -3
- package/dist/ui/api-error.js +2 -1
- package/dist/ui/cadence-picker.js +6 -4
- package/dist/ui/choice-cards.js +5 -3
- package/dist/ui/confirm-dialog.js +2 -2
- package/dist/ui/copy-field.js +5 -3
- package/dist/ui/detail-page.js +2 -2
- package/dist/ui/detail-sheet.js +2 -2
- package/dist/ui/diff-view.js +4 -3
- package/dist/ui/disclosure.js +3 -3
- package/dist/ui/email-chips-input.js +5 -3
- package/dist/ui/error-message.js +2 -1
- package/dist/ui/error-reference.d.ts +15 -0
- package/dist/ui/error-text.d.ts +10 -0
- package/dist/ui/error-text.js +9 -0
- package/dist/ui/error-text.js.map +1 -0
- package/dist/ui/field.js +4 -2
- package/dist/ui/flush-form-page.js +8 -6
- package/dist/ui/form-dialog.js +7 -5
- package/dist/ui/list-row.js +3 -3
- package/dist/ui/load-failure.js +3 -2
- package/dist/ui/load-failure.js.map +1 -1
- package/dist/ui/notice.js +3 -1
- package/dist/ui/relative-time.js +2 -2
- package/dist/ui/revision-history.js +9 -7
- package/dist/ui/revision-history.js.map +1 -1
- package/dist/ui/role-select.js +10 -8
- package/dist/ui/segmented-control.js +4 -2
- package/dist/ui/select-menu.js +5 -3
- package/dist/ui/setting-row.js +3 -1
- package/dist/ui/switch.js +4 -2
- package/dist/ui/usage-meter.js +3 -3
- package/dist/ui/word-list-row.js +4 -2
- package/dist/usage.js +2 -2
- package/dist/workbench.js +4 -4
- package/package.json +5 -6
- package/src/app/app-state.tsx +126 -14
- package/src/app/components/artifacts/site-data.tsx +2 -2
- package/src/app/components/artifacts/site-settings.tsx +2 -2
- package/src/app/components/rail/session-list.tsx +7 -8
- package/src/app/components/rail/session-shell.tsx +3 -3
- package/src/app/components/repository-picker.tsx +8 -1
- package/src/app/components/session/model-context-inspector.tsx +2 -1
- package/src/app/components/session/session-admin-access.tsx +2 -2
- package/src/app/lib/actions/chat-operations.ts +4 -4
- package/src/app/lib/archive-session.test.tsx +265 -2
- package/src/app/lib/archive-session.tsx +175 -9
- package/src/app/lib/copy-link.ts +2 -2
- package/src/app/lib/inbox.tsx +2 -2
- package/src/app/lib/session-failure-toasts.ts +3 -2
- package/src/app/lib/toast.test.tsx +215 -0
- package/src/app/lib/toast.tsx +67 -2
- package/src/app/personal-github-reconnect.test.tsx +356 -0
- package/src/app/routes/artifacts.tsx +1 -2
- package/src/components/tool-action-review.tsx +14 -1
- package/src/meetings/delete-meeting-dialog.tsx +2 -1
- package/src/meetings/meeting-ask.tsx +2 -1
- package/src/meetings/meeting-detail-page.tsx +2 -1
- package/src/meetings/meeting-notes.tsx +2 -1
- package/src/meetings/meeting-settings.tsx +4 -1
- package/src/meetings/meeting-transcript.tsx +4 -1
- package/src/meetings/recorder-context.tsx +10 -0
- package/src/meetings/recorder-host.test.tsx +60 -2
- package/src/meetings/recorder-host.tsx +16 -3
- package/src/meetings/recorder-panel.tsx +2 -1
- package/src/meetings/recorder-workspace.test.tsx +26 -1
- package/src/messages/en.ts +6 -0
- package/src/ui/api-error.test.ts +29 -5
- package/src/ui/api-error.tsx +10 -4
- package/src/ui/error-message.tsx +8 -0
- package/src/ui/error-reference.test.ts +54 -0
- package/src/ui/error-reference.ts +51 -0
- package/src/ui/error-text.test.tsx +66 -0
- package/src/ui/error-text.tsx +49 -0
- package/src/ui/field.tsx +4 -1
- package/src/ui/notice.tsx +7 -2
- package/src/ui/setting-row.tsx +4 -1
- package/styles/app.css +12 -0
- package/styles/compiled.css +9 -0
- package/dist/browser-viewer-NOP5EAUO.js +0 -23
- package/dist/chat-interactive-block-G7O44JHR.js +0 -18
- package/dist/chunk-26RWVLRD.js +0 -135
- package/dist/chunk-2AHTY7OT.js +0 -247
- package/dist/chunk-2GDNWKSC.js +0 -3670
- package/dist/chunk-2JENKGCE.js +0 -339
- package/dist/chunk-2KYQC4T5.js +0 -155
- package/dist/chunk-2RREGDQH.js +0 -708
- package/dist/chunk-2T7DX6KR.js +0 -353
- package/dist/chunk-2VB2O4FQ.js +0 -920
- package/dist/chunk-2VTTKH23.js +0 -94
- package/dist/chunk-2XNG2KNT.js +0 -172
- package/dist/chunk-2YC6JQRO.js +0 -399
- package/dist/chunk-2ZVRJRXC.js +0 -27
- package/dist/chunk-35737UT4.js +0 -162
- package/dist/chunk-366XZ4PM.js +0 -41
- package/dist/chunk-36MIDGAH.js +0 -199
- package/dist/chunk-3FD76LXM.js +0 -212
- package/dist/chunk-3OVIXY4O.js +0 -213
- package/dist/chunk-3OVIXY4O.js.map +0 -1
- package/dist/chunk-3QNRBEYH.js +0 -432
- package/dist/chunk-3QX55WLC.js +0 -15
- package/dist/chunk-3USJPT2S.js +0 -1022
- package/dist/chunk-42CMQ5VR.js +0 -251
- package/dist/chunk-4LPOWQJY.js +0 -42
- package/dist/chunk-4NBTZRKT.js +0 -79
- package/dist/chunk-4OXI6HCV.js +0 -118
- package/dist/chunk-4SZZAFYQ.js +0 -2317
- package/dist/chunk-4TQL3WP2.js +0 -140
- package/dist/chunk-4Y6BK7IU.js +0 -196
- package/dist/chunk-4YD7YZC5.js +0 -373
- package/dist/chunk-5DTST3TP.js +0 -81
- package/dist/chunk-5FH5LQVS.js +0 -130
- package/dist/chunk-5KWMYPJV.js +0 -847
- package/dist/chunk-5MUJDC6C.js +0 -84
- package/dist/chunk-5QM2WPKV.js +0 -41
- package/dist/chunk-5WUN7XPD.js +0 -1184
- package/dist/chunk-64PO2WXU.js +0 -1067
- package/dist/chunk-6AHATAAY.js +0 -431
- package/dist/chunk-6ED2YWBT.js +0 -56
- package/dist/chunk-6GXVYAGR.js +0 -170
- package/dist/chunk-6H4SJBPE.js +0 -85
- package/dist/chunk-6MT3HHUB.js +0 -84
- package/dist/chunk-6UHCBH4G.js +0 -198
- package/dist/chunk-6WLX3NR3.js +0 -198
- package/dist/chunk-73NXYYWE.js +0 -112
- package/dist/chunk-76ERNKIZ.js +0 -603
- package/dist/chunk-776QZ573.js +0 -57
- package/dist/chunk-7BYWOFVH.js +0 -171
- package/dist/chunk-7O5CGGIQ.js +0 -108
- package/dist/chunk-7QOHRZ67.js +0 -251
- package/dist/chunk-7WIDB4PL.js +0 -2058
- package/dist/chunk-7WKP3DYJ.js +0 -37
- package/dist/chunk-7XOVTPDI.js +0 -227
- package/dist/chunk-AB5MBIXY.js +0 -281
- package/dist/chunk-ADNMXBCX.js +0 -1193
- package/dist/chunk-AFBJTUFK.js +0 -202
- package/dist/chunk-ALVRWCXE.js +0 -61
- package/dist/chunk-AOHU6O3M.js +0 -247
- package/dist/chunk-AOHU6O3M.js.map +0 -1
- package/dist/chunk-APW4T4SW.js +0 -270
- package/dist/chunk-AXBSYWKX.js +0 -2656
- package/dist/chunk-B2I5ZW35.js +0 -422
- package/dist/chunk-B3LMRTRF.js +0 -223
- package/dist/chunk-BE2XENG2.js +0 -292
- package/dist/chunk-BE2XENG2.js.map +0 -1
- package/dist/chunk-BF4SADKX.js +0 -29
- package/dist/chunk-BKP43KK4.js +0 -1788
- package/dist/chunk-BM3NEZ6X.js +0 -781
- package/dist/chunk-BT3BAGB5.js +0 -216
- package/dist/chunk-BTSYDIVJ.js +0 -357
- package/dist/chunk-BUBNGKWG.js +0 -70
- package/dist/chunk-BVUJV5WR.js +0 -126
- package/dist/chunk-BZO5ZMUP.js +0 -27
- package/dist/chunk-C3HUF3M2.js +0 -157
- package/dist/chunk-C5QCAOES.js +0 -264
- package/dist/chunk-CGK6ALQU.js +0 -159
- package/dist/chunk-CPYGO76Q.js +0 -335
- package/dist/chunk-CQH4FWYA.js +0 -490
- package/dist/chunk-CZP5QXNB.js +0 -234
- package/dist/chunk-D2TOWEYH.js +0 -266
- package/dist/chunk-D6L4GHRH.js +0 -340
- package/dist/chunk-DKT3N37I.js +0 -50
- package/dist/chunk-DMMJIFKA.js +0 -84
- package/dist/chunk-DO74DQC7.js +0 -26
- package/dist/chunk-DOFJZ2JU.js +0 -83
- package/dist/chunk-DSXVY5WZ.js +0 -119
- package/dist/chunk-E337C2VK.js +0 -82
- package/dist/chunk-E6NRSRBE.js +0 -114
- package/dist/chunk-E6SQKHAU.js +0 -114
- package/dist/chunk-E7UIVD7F.js +0 -236
- package/dist/chunk-EGBII4CP.js +0 -229
- package/dist/chunk-EILSAQVJ.js +0 -200
- package/dist/chunk-ELL6HSYR.js +0 -307
- package/dist/chunk-EUBGLFFR.js +0 -73
- package/dist/chunk-EW6RNWSH.js +0 -212
- package/dist/chunk-EYUT5Y6V.js +0 -2599
- package/dist/chunk-F7U3QPZ3.js +0 -304
- package/dist/chunk-FBTJKSTM.js +0 -1270
- package/dist/chunk-FC2FTSK3.js +0 -2424
- package/dist/chunk-FOGNA3BU.js +0 -148
- package/dist/chunk-FQFKHNC7.js +0 -650
- package/dist/chunk-FTCHM755.js +0 -50
- package/dist/chunk-FXSHP4JZ.js +0 -3550
- package/dist/chunk-G6ZZC543.js +0 -818
- package/dist/chunk-G7FU6PUA.js +0 -100
- package/dist/chunk-GA4YEAMX.js +0 -3851
- package/dist/chunk-GE33BGB7.js +0 -12
- package/dist/chunk-GQ67HSJY.js +0 -570
- package/dist/chunk-GXXZ3WAK.js +0 -106
- package/dist/chunk-H2TCRX3H.js +0 -237
- package/dist/chunk-HLL4PBO7.js +0 -60
- package/dist/chunk-HLOEPV5C.js +0 -259
- package/dist/chunk-HUAGBS4O.js +0 -56
- package/dist/chunk-I36GSRUJ.js +0 -211
- package/dist/chunk-I6VBHT7S.js +0 -261
- package/dist/chunk-ICNNNOXE.js +0 -333
- package/dist/chunk-ICX64J4U.js +0 -172
- package/dist/chunk-ID36Y46W.js +0 -5046
- package/dist/chunk-ID36Y46W.js.map +0 -1
- package/dist/chunk-IGVVXLKJ.js +0 -559
- package/dist/chunk-IKJLSBUI.js +0 -2984
- package/dist/chunk-IKMUFDVS.js +0 -50
- package/dist/chunk-IKUNOX7F.js +0 -255
- package/dist/chunk-ILKDYBON.js +0 -288
- package/dist/chunk-IVYJX3OY.js +0 -187
- package/dist/chunk-JCY4CMDH.js +0 -107
- package/dist/chunk-JJZPLGIP.js +0 -474
- package/dist/chunk-JW33RV4V.js +0 -143
- package/dist/chunk-JWPA6ZPZ.js +0 -351
- package/dist/chunk-JZ4QXS6D.js +0 -50
- package/dist/chunk-K42OUZQ3.js +0 -386
- package/dist/chunk-K5TOVX5A.js +0 -206
- package/dist/chunk-K63HGHZX.js +0 -99
- package/dist/chunk-K6R5T44I.js +0 -75
- package/dist/chunk-KHJ5PXFM.js +0 -914
- package/dist/chunk-KJZRQ55O.js +0 -2319
- package/dist/chunk-KJZRQ55O.js.map +0 -1
- package/dist/chunk-KKI55ZMW.js +0 -65
- package/dist/chunk-KRPLAAFP.js +0 -199
- package/dist/chunk-KVFEZDBO.js +0 -134
- package/dist/chunk-L4I665WK.js +0 -45
- package/dist/chunk-L4OF77LE.js +0 -110
- package/dist/chunk-L4OF77LE.js.map +0 -1
- package/dist/chunk-LA5T52RM.js +0 -70
- package/dist/chunk-LM2W5YAT.js +0 -401
- package/dist/chunk-LQ62ECE6.js +0 -390
- package/dist/chunk-LQDUHU3Y.js +0 -71
- package/dist/chunk-LRJIYTZW.js +0 -4157
- package/dist/chunk-LRJIYTZW.js.map +0 -1
- package/dist/chunk-LRN6GYAZ.js +0 -138
- package/dist/chunk-M4SDVTKJ.js +0 -790
- package/dist/chunk-MA6O7CM6.js +0 -99
- package/dist/chunk-MBIBB6GI.js +0 -197
- package/dist/chunk-MF3ZFB4H.js +0 -199
- package/dist/chunk-MJJGJMYJ.js +0 -98
- package/dist/chunk-MLJADQFI.js +0 -4824
- package/dist/chunk-MQG7RV3B.js +0 -62
- package/dist/chunk-MTTGSQA5.js +0 -186
- package/dist/chunk-MW7Y3T55.js +0 -525
- package/dist/chunk-MYUFMVCH.js +0 -121
- package/dist/chunk-N3OARGH2.js +0 -61
- package/dist/chunk-NB2HMRT2.js +0 -353
- package/dist/chunk-NFDFYWMV.js +0 -141
- package/dist/chunk-NWGNFN3N.js +0 -1187
- package/dist/chunk-NWJRPDIO.js +0 -840
- package/dist/chunk-NWJRPDIO.js.map +0 -1
- package/dist/chunk-NXWBBZJV.js +0 -267
- package/dist/chunk-NY2QWROL.js +0 -71
- package/dist/chunk-O2IOPP3R.js +0 -848
- package/dist/chunk-O2UWH5RG.js +0 -141
- package/dist/chunk-O5YWDLYF.js +0 -393
- package/dist/chunk-OBMCZO7E.js +0 -121
- package/dist/chunk-OD3DCCCB.js +0 -132
- package/dist/chunk-OMH7R6I3.js +0 -390
- package/dist/chunk-OSA5EQG5.js +0 -113
- package/dist/chunk-OSJ3MUTZ.js +0 -2936
- package/dist/chunk-OWAYJ2OV.js +0 -368
- package/dist/chunk-OYXBFSGK.js +0 -269
- package/dist/chunk-PC2EBA5G.js +0 -4116
- package/dist/chunk-PC2EBA5G.js.map +0 -1
- package/dist/chunk-PC2MVXIP.js +0 -363
- package/dist/chunk-PC2MVXIP.js.map +0 -1
- package/dist/chunk-PENGLDR5.js +0 -309
- package/dist/chunk-PSMAWRPL.js +0 -191
- package/dist/chunk-PW4IMTYR.js +0 -702
- package/dist/chunk-PW54V7T5.js +0 -387
- package/dist/chunk-Q2EXYSMO.js +0 -24
- package/dist/chunk-Q2XJK5I4.js +0 -51
- package/dist/chunk-Q2XJK5I4.js.map +0 -1
- package/dist/chunk-Q4EFRI6X.js +0 -258
- package/dist/chunk-Q52CXW6C.js +0 -48
- package/dist/chunk-Q6XQ2R37.js +0 -184
- package/dist/chunk-QAJ53XBW.js +0 -23
- package/dist/chunk-QDTKECT4.js +0 -129
- package/dist/chunk-QE3ZFGI3.js +0 -43
- package/dist/chunk-QHHSUR2Y.js +0 -298
- package/dist/chunk-QHNVNR7B.js +0 -173
- package/dist/chunk-QIK2Q6N5.js +0 -376
- package/dist/chunk-QWL4L366.js +0 -38
- package/dist/chunk-R3J2PTVQ.js +0 -690
- package/dist/chunk-RBRX5ZS3.js +0 -319
- package/dist/chunk-REX6JIC7.js +0 -33
- package/dist/chunk-RGZ7EEC3.js +0 -537
- package/dist/chunk-RGZ7EEC3.js.map +0 -1
- package/dist/chunk-RIPS7GFR.js +0 -960
- package/dist/chunk-RTBZNFNV.js +0 -1354
- package/dist/chunk-RTBZNFNV.js.map +0 -1
- package/dist/chunk-SKMNW4SW.js +0 -187
- package/dist/chunk-SRFARKXC.js +0 -623
- package/dist/chunk-SWIHWCTW.js +0 -4461
- package/dist/chunk-TA5CFTO4.js +0 -103
- package/dist/chunk-TF4ZVJLI.js +0 -156
- package/dist/chunk-TG7DADJR.js +0 -9624
- package/dist/chunk-TI4R2ZD5.js +0 -623
- package/dist/chunk-TI4R2ZD5.js.map +0 -1
- package/dist/chunk-TNKWOUWP.js +0 -412
- package/dist/chunk-TNUSPXPW.js +0 -5555
- package/dist/chunk-TNUSPXPW.js.map +0 -1
- package/dist/chunk-TNYFHKVV.js +0 -366
- package/dist/chunk-TPMZBOFH.js +0 -178
- package/dist/chunk-TW3LKRJF.js +0 -263
- package/dist/chunk-TZAO65I4.js +0 -83
- package/dist/chunk-U5EFEMYU.js +0 -89
- package/dist/chunk-U6M4LS3M.js +0 -378
- package/dist/chunk-UI4HI5QK.js +0 -918
- package/dist/chunk-UJDOWCQ3.js +0 -272
- package/dist/chunk-UJUQ2QOX.js +0 -581
- package/dist/chunk-UQ3IM6FY.js +0 -133
- package/dist/chunk-UYE47LO6.js +0 -246
- package/dist/chunk-VADHIT26.js +0 -89
- package/dist/chunk-VFQ3H6CO.js +0 -163
- package/dist/chunk-VGUN6VB2.js +0 -188
- package/dist/chunk-VGWWEVSD.js +0 -723
- package/dist/chunk-VIEFJ2DM.js +0 -2469
- package/dist/chunk-VLXM36VS.js +0 -268
- package/dist/chunk-W3BFRR2G.js +0 -499
- package/dist/chunk-W5MPXR3A.js +0 -981
- package/dist/chunk-W5OWKVZG.js +0 -136
- package/dist/chunk-W6FRORMX.js +0 -486
- package/dist/chunk-W6FRORMX.js.map +0 -1
- package/dist/chunk-W7XROSZO.js +0 -232
- package/dist/chunk-W7XROSZO.js.map +0 -1
- package/dist/chunk-WEZ5PXZP.js +0 -403
- package/dist/chunk-WHWUWN2X.js +0 -197
- package/dist/chunk-WHWUWN2X.js.map +0 -1
- package/dist/chunk-WLEDGIVS.js +0 -114
- package/dist/chunk-WLEDGIVS.js.map +0 -1
- package/dist/chunk-WNDAKLHG.js +0 -281
- package/dist/chunk-WTJ4PLMU.js +0 -103
- package/dist/chunk-WV2KPJUW.js +0 -107
- package/dist/chunk-X3VY5EGY.js +0 -277
- package/dist/chunk-X3VY5EGY.js.map +0 -1
- package/dist/chunk-XDBYWVCW.js +0 -418
- package/dist/chunk-XF7MA4U5.js +0 -36
- package/dist/chunk-XF7MA4U5.js.map +0 -1
- package/dist/chunk-XOSQP3YA.js +0 -605
- package/dist/chunk-XYBV4ZJQ.js +0 -271
- package/dist/chunk-YBKVGLQR.js +0 -147
- package/dist/chunk-YDCUBUWH.js +0 -1583
- package/dist/chunk-YG6NARQY.js +0 -51
- package/dist/chunk-YG6NARQY.js.map +0 -1
- package/dist/chunk-YSVD5HI4.js +0 -278
- package/dist/chunk-YT3WGNG6.js +0 -290
- package/dist/chunk-YYICQDK4.js +0 -414
- package/dist/chunk-YYLMZLI6.js +0 -686
- package/dist/chunk-ZAMTKG5U.js +0 -95
- package/dist/chunk-ZDLYSXKN.js +0 -111
- package/dist/chunk-ZG447FSS.js +0 -194
- package/dist/chunk-ZIT5KD4Q.js +0 -264
- package/dist/chunk-ZUDOVDKR.js +0 -3064
- package/dist/chunk-ZW2ECJ3A.js +0 -451
- package/dist/computer-viewer-LPZ763KF.js +0 -21
- package/dist/embedded-new-voice-YVMKSLKJ.js +0 -24
- package/dist/embedded-voice-BJPQFXSU.js +0 -24
- package/dist/fleet-decision-row-AA4H5CDT.js +0 -361
- package/dist/model-policy-picker-menu-HSMWVO4P.js +0 -22
- package/dist/payment-page-card-3LTSFJGN.js +0 -223
- package/dist/platform-activity-row-5VYV6TX4.js +0 -128
- package/dist/queue-surface-implementation-NXHZUKD2.js +0 -908
- package/dist/recorder-host-ZKRWTDBM.js +0 -57
- package/dist/recorder-host-ZKRWTDBM.js.map +0 -1
- package/dist/sandbox-files-YCMLQUFU.js +0 -27
- package/dist/session-connect-cards-KSQLMRM5.js +0 -25
- package/dist/session-realtime-ZR6JLG3Y.js +0 -30
- package/dist/timeline-annotation-markers-YAHDPWVG.js +0 -157
- package/dist/timeline-annotation-selection-KHXNCEJP.js +0 -208
- package/dist/timeline-annotations-dialog-Y4XD3N7B.js +0 -283
- /package/dist/{browser-viewer-NOP5EAUO.js.map → browser-viewer-TC27OCIP.js.map} +0 -0
- /package/dist/{chat-interactive-block-G7O44JHR.js.map → chat-interactive-block-RWPQBHVS.js.map} +0 -0
- /package/dist/{chunk-EGBII4CP.js.map → chunk-2BDT3UZQ.js.map} +0 -0
- /package/dist/{chunk-4YD7YZC5.js.map → chunk-2CLNIEK4.js.map} +0 -0
- /package/dist/{chunk-ZW2ECJ3A.js.map → chunk-2FSBSCZJ.js.map} +0 -0
- /package/dist/{chunk-KRPLAAFP.js.map → chunk-2I7HDP53.js.map} +0 -0
- /package/dist/{chunk-3QX55WLC.js.map → chunk-2INLDVK3.js.map} +0 -0
- /package/dist/{chunk-BVUJV5WR.js.map → chunk-2KALVELR.js.map} +0 -0
- /package/dist/{chunk-XDBYWVCW.js.map → chunk-2M3J7ZWQ.js.map} +0 -0
- /package/dist/{chunk-2RREGDQH.js.map → chunk-2OP6WLGV.js.map} +0 -0
- /package/dist/{chunk-OSJ3MUTZ.js.map → chunk-2RG7NIAS.js.map} +0 -0
- /package/dist/{chunk-26RWVLRD.js.map → chunk-2STUPWEL.js.map} +0 -0
- /package/dist/{chunk-XYBV4ZJQ.js.map → chunk-2YUOVM3G.js.map} +0 -0
- /package/dist/{chunk-2GDNWKSC.js.map → chunk-2Z3NQNTM.js.map} +0 -0
- /package/dist/{chunk-2VB2O4FQ.js.map → chunk-3CPWWGNK.js.map} +0 -0
- /package/dist/{chunk-7WKP3DYJ.js.map → chunk-3ED2U6XE.js.map} +0 -0
- /package/dist/{chunk-BT3BAGB5.js.map → chunk-3GZA4BUW.js.map} +0 -0
- /package/dist/{chunk-3USJPT2S.js.map → chunk-3IK6UYO6.js.map} +0 -0
- /package/dist/{chunk-6AHATAAY.js.map → chunk-3PZ7JZI2.js.map} +0 -0
- /package/dist/{chunk-JZ4QXS6D.js.map → chunk-4DVJ6ONS.js.map} +0 -0
- /package/dist/{chunk-5QM2WPKV.js.map → chunk-4E3ZJRTZ.js.map} +0 -0
- /package/dist/{chunk-NFDFYWMV.js.map → chunk-4SAWSRAA.js.map} +0 -0
- /package/dist/{chunk-ELL6HSYR.js.map → chunk-53AGXXZM.js.map} +0 -0
- /package/dist/{chunk-G6ZZC543.js.map → chunk-54YW6SZZ.js.map} +0 -0
- /package/dist/{chunk-4SZZAFYQ.js.map → chunk-57AZS3IE.js.map} +0 -0
- /package/dist/{chunk-JW33RV4V.js.map → chunk-5CPEEAFD.js.map} +0 -0
- /package/dist/{chunk-D6L4GHRH.js.map → chunk-5EWSRZ2Y.js.map} +0 -0
- /package/dist/{chunk-PW54V7T5.js.map → chunk-5IE76VCY.js.map} +0 -0
- /package/dist/{chunk-6GXVYAGR.js.map → chunk-5NWEKLDZ.js.map} +0 -0
- /package/dist/{chunk-6UHCBH4G.js.map → chunk-5O2FCCHZ.js.map} +0 -0
- /package/dist/{chunk-2YC6JQRO.js.map → chunk-5QAY6K77.js.map} +0 -0
- /package/dist/{chunk-EYUT5Y6V.js.map → chunk-6DK6Z4UN.js.map} +0 -0
- /package/dist/{chunk-PW4IMTYR.js.map → chunk-6DVCC7QS.js.map} +0 -0
- /package/dist/{chunk-7WIDB4PL.js.map → chunk-6JHU2UBS.js.map} +0 -0
- /package/dist/{chunk-CQH4FWYA.js.map → chunk-6PZ7OBYU.js.map} +0 -0
- /package/dist/{chunk-VFQ3H6CO.js.map → chunk-6WGRDRMA.js.map} +0 -0
- /package/dist/{chunk-MTTGSQA5.js.map → chunk-77WAKEAH.js.map} +0 -0
- /package/dist/{chunk-O5YWDLYF.js.map → chunk-7TDO3CUM.js.map} +0 -0
- /package/dist/{chunk-2AHTY7OT.js.map → chunk-7TIX2UAR.js.map} +0 -0
- /package/dist/{chunk-FOGNA3BU.js.map → chunk-7V5REBCP.js.map} +0 -0
- /package/dist/{chunk-2JENKGCE.js.map → chunk-7VMZGLYI.js.map} +0 -0
- /package/dist/{chunk-E7UIVD7F.js.map → chunk-7W37NS3I.js.map} +0 -0
- /package/dist/{chunk-ZDLYSXKN.js.map → chunk-7X6SDK2C.js.map} +0 -0
- /package/dist/{chunk-ZAMTKG5U.js.map → chunk-7ZNUHRP5.js.map} +0 -0
- /package/dist/{chunk-DMMJIFKA.js.map → chunk-A36PZALD.js.map} +0 -0
- /package/dist/{chunk-WV2KPJUW.js.map → chunk-AUI6VA63.js.map} +0 -0
- /package/dist/{chunk-Q2EXYSMO.js.map → chunk-AW2MQB37.js.map} +0 -0
- /package/dist/{chunk-6WLX3NR3.js.map → chunk-AWKES45Y.js.map} +0 -0
- /package/dist/{chunk-OD3DCCCB.js.map → chunk-AXHZYXUV.js.map} +0 -0
- /package/dist/{chunk-QDTKECT4.js.map → chunk-BHNSJVBC.js.map} +0 -0
- /package/dist/{chunk-FTCHM755.js.map → chunk-BJEJFISW.js.map} +0 -0
- /package/dist/{chunk-B2I5ZW35.js.map → chunk-BJFH6JI5.js.map} +0 -0
- /package/dist/{chunk-RIPS7GFR.js.map → chunk-BMICEQZQ.js.map} +0 -0
- /package/dist/{chunk-BF4SADKX.js.map → chunk-BTLBYBLU.js.map} +0 -0
- /package/dist/{chunk-U5EFEMYU.js.map → chunk-BXBDYNRP.js.map} +0 -0
- /package/dist/{chunk-BTSYDIVJ.js.map → chunk-C372BFOV.js.map} +0 -0
- /package/dist/{chunk-MLJADQFI.js.map → chunk-CMKGILJK.js.map} +0 -0
- /package/dist/{chunk-DKT3N37I.js.map → chunk-CRAOSVHC.js.map} +0 -0
- /package/dist/{chunk-WNDAKLHG.js.map → chunk-CRU35QQH.js.map} +0 -0
- /package/dist/{chunk-2XNG2KNT.js.map → chunk-CUIWCGMA.js.map} +0 -0
- /package/dist/{chunk-QWL4L366.js.map → chunk-D5TWNFFE.js.map} +0 -0
- /package/dist/{chunk-SWIHWCTW.js.map → chunk-DF5EAHDN.js.map} +0 -0
- /package/dist/{chunk-HUAGBS4O.js.map → chunk-DJAXC5OK.js.map} +0 -0
- /package/dist/{chunk-FXSHP4JZ.js.map → chunk-DXBYWSL5.js.map} +0 -0
- /package/dist/{chunk-5MUJDC6C.js.map → chunk-DXR5PDFP.js.map} +0 -0
- /package/dist/{chunk-NXWBBZJV.js.map → chunk-DZWARC4M.js.map} +0 -0
- /package/dist/{chunk-GXXZ3WAK.js.map → chunk-DZXEDSQI.js.map} +0 -0
- /package/dist/{chunk-Q52CXW6C.js.map → chunk-E7XERZWC.js.map} +0 -0
- /package/dist/{chunk-4NBTZRKT.js.map → chunk-ECJBYNLJ.js.map} +0 -0
- /package/dist/{chunk-QE3ZFGI3.js.map → chunk-EDI6SJ2N.js.map} +0 -0
- /package/dist/{chunk-E6NRSRBE.js.map → chunk-EWSOC6WF.js.map} +0 -0
- /package/dist/{chunk-TA5CFTO4.js.map → chunk-F2OPHAUN.js.map} +0 -0
- /package/dist/{chunk-5DTST3TP.js.map → chunk-F4ISQGGM.js.map} +0 -0
- /package/dist/{chunk-MBIBB6GI.js.map → chunk-FO4LYKJL.js.map} +0 -0
- /package/dist/{chunk-EUBGLFFR.js.map → chunk-FPXASDG5.js.map} +0 -0
- /package/dist/{chunk-C3HUF3M2.js.map → chunk-FVXBNBHO.js.map} +0 -0
- /package/dist/{chunk-W5MPXR3A.js.map → chunk-FZC5N55X.js.map} +0 -0
- /package/dist/{chunk-MA6O7CM6.js.map → chunk-GAVYGBFI.js.map} +0 -0
- /package/dist/{chunk-REX6JIC7.js.map → chunk-GKVJIDHF.js.map} +0 -0
- /package/dist/{chunk-EW6RNWSH.js.map → chunk-GVN5SZLX.js.map} +0 -0
- /package/dist/{chunk-KVFEZDBO.js.map → chunk-H3T7IWNA.js.map} +0 -0
- /package/dist/{chunk-I6VBHT7S.js.map → chunk-HAX4LCR5.js.map} +0 -0
- /package/dist/{chunk-OBMCZO7E.js.map → chunk-HC4JFZVU.js.map} +0 -0
- /package/dist/{chunk-UJUQ2QOX.js.map → chunk-HEFPPMBQ.js.map} +0 -0
- /package/dist/{chunk-DOFJZ2JU.js.map → chunk-HNLR7Q4Z.js.map} +0 -0
- /package/dist/{chunk-GE33BGB7.js.map → chunk-HSOXMJOT.js.map} +0 -0
- /package/dist/{chunk-AB5MBIXY.js.map → chunk-I4MRDSUF.js.map} +0 -0
- /package/dist/{chunk-AFBJTUFK.js.map → chunk-I4QEJ62Y.js.map} +0 -0
- /package/dist/{chunk-6ED2YWBT.js.map → chunk-I5B5L6Q4.js.map} +0 -0
- /package/dist/{chunk-C5QCAOES.js.map → chunk-I5QZJODL.js.map} +0 -0
- /package/dist/{chunk-76ERNKIZ.js.map → chunk-I7ITSXSJ.js.map} +0 -0
- /package/dist/{chunk-OMH7R6I3.js.map → chunk-I7XIZRFD.js.map} +0 -0
- /package/dist/{chunk-E337C2VK.js.map → chunk-IDANQPRH.js.map} +0 -0
- /package/dist/{chunk-3FD76LXM.js.map → chunk-IFB3WJ36.js.map} +0 -0
- /package/dist/{chunk-ZIT5KD4Q.js.map → chunk-IHTAKKTK.js.map} +0 -0
- /package/dist/{chunk-QHNVNR7B.js.map → chunk-ILDXWY37.js.map} +0 -0
- /package/dist/{chunk-GQ67HSJY.js.map → chunk-IMDQUHBJ.js.map} +0 -0
- /package/dist/{chunk-DSXVY5WZ.js.map → chunk-IMZCQBOT.js.map} +0 -0
- /package/dist/{chunk-WEZ5PXZP.js.map → chunk-IXPTECSC.js.map} +0 -0
- /package/dist/{chunk-NY2QWROL.js.map → chunk-J255A3N5.js.map} +0 -0
- /package/dist/{chunk-O2UWH5RG.js.map → chunk-J5F5HPPW.js.map} +0 -0
- /package/dist/{chunk-VIEFJ2DM.js.map → chunk-JEA3QDX7.js.map} +0 -0
- /package/dist/{chunk-TF4ZVJLI.js.map → chunk-JEUPAVYY.js.map} +0 -0
- /package/dist/{chunk-ZG447FSS.js.map → chunk-JKHKLL5W.js.map} +0 -0
- /package/dist/{chunk-FQFKHNC7.js.map → chunk-JQL7ZH6C.js.map} +0 -0
- /package/dist/{chunk-776QZ573.js.map → chunk-JWB44UGJ.js.map} +0 -0
- /package/dist/{chunk-ICNNNOXE.js.map → chunk-JZ4NLCAP.js.map} +0 -0
- /package/dist/{chunk-TNKWOUWP.js.map → chunk-K2A5PXQ5.js.map} +0 -0
- /package/dist/{chunk-SRFARKXC.js.map → chunk-K56XV3C3.js.map} +0 -0
- /package/dist/{chunk-QAJ53XBW.js.map → chunk-K6GAXXVA.js.map} +0 -0
- /package/dist/{chunk-MF3ZFB4H.js.map → chunk-KCBMFSMS.js.map} +0 -0
- /package/dist/{chunk-VLXM36VS.js.map → chunk-KF2FV3ZJ.js.map} +0 -0
- /package/dist/{chunk-YSVD5HI4.js.map → chunk-KJD65EJP.js.map} +0 -0
- /package/dist/{chunk-K42OUZQ3.js.map → chunk-KLEUWIMZ.js.map} +0 -0
- /package/dist/{chunk-PENGLDR5.js.map → chunk-KODELWYT.js.map} +0 -0
- /package/dist/{chunk-TZAO65I4.js.map → chunk-KRDR5RJD.js.map} +0 -0
- /package/dist/{chunk-KHJ5PXFM.js.map → chunk-KUDGXAF7.js.map} +0 -0
- /package/dist/{chunk-6H4SJBPE.js.map → chunk-KYS77RPN.js.map} +0 -0
- /package/dist/{chunk-OWAYJ2OV.js.map → chunk-L7YTNTIK.js.map} +0 -0
- /package/dist/{chunk-YYLMZLI6.js.map → chunk-LHPNABDH.js.map} +0 -0
- /package/dist/{chunk-LM2W5YAT.js.map → chunk-MFROMEKA.js.map} +0 -0
- /package/dist/{chunk-AXBSYWKX.js.map → chunk-MIHN76LX.js.map} +0 -0
- /package/dist/{chunk-4LPOWQJY.js.map → chunk-MIYFS2XN.js.map} +0 -0
- /package/dist/{chunk-KKI55ZMW.js.map → chunk-MJUCFQMS.js.map} +0 -0
- /package/dist/{chunk-ZUDOVDKR.js.map → chunk-MM4FNWI4.js.map} +0 -0
- /package/dist/{chunk-M4SDVTKJ.js.map → chunk-MNZG4OHU.js.map} +0 -0
- /package/dist/{chunk-EILSAQVJ.js.map → chunk-N6AACDUW.js.map} +0 -0
- /package/dist/{chunk-BM3NEZ6X.js.map → chunk-NC55IFN3.js.map} +0 -0
- /package/dist/{chunk-MJJGJMYJ.js.map → chunk-NC7PVOEK.js.map} +0 -0
- /package/dist/{chunk-LA5T52RM.js.map → chunk-NCYMNCJO.js.map} +0 -0
- /package/dist/{chunk-HLOEPV5C.js.map → chunk-ND2BXV3P.js.map} +0 -0
- /package/dist/{chunk-UJDOWCQ3.js.map → chunk-NDBTFUO6.js.map} +0 -0
- /package/dist/{chunk-K5TOVX5A.js.map → chunk-NDQJZ7HF.js.map} +0 -0
- /package/dist/{chunk-35737UT4.js.map → chunk-NGJJJPZZ.js.map} +0 -0
- /package/dist/{chunk-42CMQ5VR.js.map → chunk-NJTSNNE7.js.map} +0 -0
- /package/dist/{chunk-FBTJKSTM.js.map → chunk-NRTE7DNV.js.map} +0 -0
- /package/dist/{chunk-YT3WGNG6.js.map → chunk-NULUNM7H.js.map} +0 -0
- /package/dist/{chunk-7XOVTPDI.js.map → chunk-NUNZS36W.js.map} +0 -0
- /package/dist/{chunk-FC2FTSK3.js.map → chunk-NW53H5RW.js.map} +0 -0
- /package/dist/{chunk-TW3LKRJF.js.map → chunk-NXCMHIKI.js.map} +0 -0
- /package/dist/{chunk-CGK6ALQU.js.map → chunk-O3LKCBP5.js.map} +0 -0
- /package/dist/{chunk-QIK2Q6N5.js.map → chunk-O6N4ABCA.js.map} +0 -0
- /package/dist/{chunk-73NXYYWE.js.map → chunk-O732GAFC.js.map} +0 -0
- /package/dist/{chunk-R3J2PTVQ.js.map → chunk-OF4TIKYC.js.map} +0 -0
- /package/dist/{chunk-BUBNGKWG.js.map → chunk-OMPVOMPP.js.map} +0 -0
- /package/dist/{chunk-4OXI6HCV.js.map → chunk-OPJJSKUK.js.map} +0 -0
- /package/dist/{chunk-4Y6BK7IU.js.map → chunk-OPWCMA4D.js.map} +0 -0
- /package/dist/{chunk-ADNMXBCX.js.map → chunk-ORJPS5VN.js.map} +0 -0
- /package/dist/{chunk-SKMNW4SW.js.map → chunk-OSY5K7L7.js.map} +0 -0
- /package/dist/{chunk-L4I665WK.js.map → chunk-OV6QJRT4.js.map} +0 -0
- /package/dist/{chunk-7O5CGGIQ.js.map → chunk-OVKYVZMW.js.map} +0 -0
- /package/dist/{chunk-7BYWOFVH.js.map → chunk-OZCBM3UC.js.map} +0 -0
- /package/dist/{chunk-ALVRWCXE.js.map → chunk-P3A2EINJ.js.map} +0 -0
- /package/dist/{chunk-BZO5ZMUP.js.map → chunk-PTAG4PDC.js.map} +0 -0
- /package/dist/{chunk-QHHSUR2Y.js.map → chunk-PTF5B7TJ.js.map} +0 -0
- /package/dist/{chunk-O2IOPP3R.js.map → chunk-Q3DPEYX4.js.map} +0 -0
- /package/dist/{chunk-G7FU6PUA.js.map → chunk-QB2KMIDP.js.map} +0 -0
- /package/dist/{chunk-64PO2WXU.js.map → chunk-QCSJ4CWE.js.map} +0 -0
- /package/dist/{chunk-YYICQDK4.js.map → chunk-QIOQ2NPQ.js.map} +0 -0
- /package/dist/{chunk-NB2HMRT2.js.map → chunk-QK5EFEUT.js.map} +0 -0
- /package/dist/{chunk-366XZ4PM.js.map → chunk-QPQBLYQJ.js.map} +0 -0
- /package/dist/{chunk-Q6XQ2R37.js.map → chunk-QPSGCC5D.js.map} +0 -0
- /package/dist/{chunk-JJZPLGIP.js.map → chunk-QZAAUQRN.js.map} +0 -0
- /package/dist/{chunk-VGUN6VB2.js.map → chunk-RGBI63KJ.js.map} +0 -0
- /package/dist/{chunk-LRN6GYAZ.js.map → chunk-RLBKLAEY.js.map} +0 -0
- /package/dist/{chunk-F7U3QPZ3.js.map → chunk-RMFKVOM7.js.map} +0 -0
- /package/dist/{chunk-Q4EFRI6X.js.map → chunk-ROKQU7WG.js.map} +0 -0
- /package/dist/{chunk-7QOHRZ67.js.map → chunk-RPVREAU7.js.map} +0 -0
- /package/dist/{chunk-VGWWEVSD.js.map → chunk-RQKLF42C.js.map} +0 -0
- /package/dist/{chunk-2VTTKH23.js.map → chunk-SEO7TICN.js.map} +0 -0
- /package/dist/{chunk-3QNRBEYH.js.map → chunk-SHHJCL7X.js.map} +0 -0
- /package/dist/{chunk-E6SQKHAU.js.map → chunk-SIRLACNZ.js.map} +0 -0
- /package/dist/{chunk-H2TCRX3H.js.map → chunk-SKPHMYAA.js.map} +0 -0
- /package/dist/{chunk-YDCUBUWH.js.map → chunk-SODC7T6L.js.map} +0 -0
- /package/dist/{chunk-TNYFHKVV.js.map → chunk-SQJIKMN3.js.map} +0 -0
- /package/dist/{chunk-DO74DQC7.js.map → chunk-SVINDKVW.js.map} +0 -0
- /package/dist/{chunk-CPYGO76Q.js.map → chunk-SYCDHPZF.js.map} +0 -0
- /package/dist/{chunk-UQ3IM6FY.js.map → chunk-T2QX3FDP.js.map} +0 -0
- /package/dist/{chunk-NWGNFN3N.js.map → chunk-T3OWFVMS.js.map} +0 -0
- /package/dist/{chunk-N3OARGH2.js.map → chunk-T6XI5FLY.js.map} +0 -0
- /package/dist/{chunk-MQG7RV3B.js.map → chunk-T7OXJZCX.js.map} +0 -0
- /package/dist/{chunk-2T7DX6KR.js.map → chunk-TAT5USZN.js.map} +0 -0
- /package/dist/{chunk-ICX64J4U.js.map → chunk-TPQTRNER.js.map} +0 -0
- /package/dist/{chunk-D2TOWEYH.js.map → chunk-TUIN4MB7.js.map} +0 -0
- /package/dist/{chunk-LQDUHU3Y.js.map → chunk-TX3VECZU.js.map} +0 -0
- /package/dist/{chunk-TG7DADJR.js.map → chunk-TXLIEOJX.js.map} +0 -0
- /package/dist/{chunk-2ZVRJRXC.js.map → chunk-U3DN4HEY.js.map} +0 -0
- /package/dist/{chunk-PSMAWRPL.js.map → chunk-U7XM7CB4.js.map} +0 -0
- /package/dist/{chunk-4TQL3WP2.js.map → chunk-UJK53QFL.js.map} +0 -0
- /package/dist/{chunk-RBRX5ZS3.js.map → chunk-UMTXA2TH.js.map} +0 -0
- /package/dist/{chunk-36MIDGAH.js.map → chunk-UPDSXFK5.js.map} +0 -0
- /package/dist/{chunk-OYXBFSGK.js.map → chunk-UTIAXH52.js.map} +0 -0
- /package/dist/{chunk-5WUN7XPD.js.map → chunk-UVN5TMHU.js.map} +0 -0
- /package/dist/{chunk-UYE47LO6.js.map → chunk-VGYXW3VG.js.map} +0 -0
- /package/dist/{chunk-IKUNOX7F.js.map → chunk-VS7AHPCZ.js.map} +0 -0
- /package/dist/{chunk-MYUFMVCH.js.map → chunk-VTTAJOQ7.js.map} +0 -0
- /package/dist/{chunk-K63HGHZX.js.map → chunk-VWPOLUAO.js.map} +0 -0
- /package/dist/{chunk-GA4YEAMX.js.map → chunk-X3MWB2QU.js.map} +0 -0
- /package/dist/{chunk-I36GSRUJ.js.map → chunk-X6KAJI3V.js.map} +0 -0
- /package/dist/{chunk-IKMUFDVS.js.map → chunk-XBLRHV5R.js.map} +0 -0
- /package/dist/{chunk-XOSQP3YA.js.map → chunk-XDFP2LMW.js.map} +0 -0
- /package/dist/{chunk-MW7Y3T55.js.map → chunk-XEQMZB3C.js.map} +0 -0
- /package/dist/{chunk-B3LMRTRF.js.map → chunk-XEYLT5VA.js.map} +0 -0
- /package/dist/{chunk-UI4HI5QK.js.map → chunk-XHIQ5I6N.js.map} +0 -0
- /package/dist/{chunk-U6M4LS3M.js.map → chunk-XLH7QY2R.js.map} +0 -0
- /package/dist/{chunk-OSA5EQG5.js.map → chunk-XWFAMUZQ.js.map} +0 -0
- /package/dist/{chunk-6MT3HHUB.js.map → chunk-Y4OBB2VN.js.map} +0 -0
- /package/dist/{chunk-CZP5QXNB.js.map → chunk-YCVD6CI3.js.map} +0 -0
- /package/dist/{chunk-APW4T4SW.js.map → chunk-YENLNISG.js.map} +0 -0
- /package/dist/{chunk-JWPA6ZPZ.js.map → chunk-YIRVLKAX.js.map} +0 -0
- /package/dist/{chunk-LQ62ECE6.js.map → chunk-YL73CVNK.js.map} +0 -0
- /package/dist/{chunk-ILKDYBON.js.map → chunk-YLS6QE5G.js.map} +0 -0
- /package/dist/{chunk-YBKVGLQR.js.map → chunk-YPWU5KPE.js.map} +0 -0
- /package/dist/{chunk-IKJLSBUI.js.map → chunk-YQXTDZSU.js.map} +0 -0
- /package/dist/{chunk-TPMZBOFH.js.map → chunk-YSJEAAOL.js.map} +0 -0
- /package/dist/{chunk-W3BFRR2G.js.map → chunk-YWIFM7D7.js.map} +0 -0
- /package/dist/{chunk-WTJ4PLMU.js.map → chunk-YWVI6ZMK.js.map} +0 -0
- /package/dist/{chunk-5KWMYPJV.js.map → chunk-Z4FMAFNH.js.map} +0 -0
- /package/dist/{chunk-W5OWKVZG.js.map → chunk-Z654FWNU.js.map} +0 -0
- /package/dist/{chunk-5FH5LQVS.js.map → chunk-Z7Y523PS.js.map} +0 -0
- /package/dist/{chunk-HLL4PBO7.js.map → chunk-ZD67RM6G.js.map} +0 -0
- /package/dist/{chunk-IVYJX3OY.js.map → chunk-ZEG4VPBL.js.map} +0 -0
- /package/dist/{chunk-K6R5T44I.js.map → chunk-ZLYCOBHW.js.map} +0 -0
- /package/dist/{chunk-VADHIT26.js.map → chunk-ZNJ5MTXV.js.map} +0 -0
- /package/dist/{chunk-2KYQC4T5.js.map → chunk-ZSGY3H53.js.map} +0 -0
- /package/dist/{chunk-BKP43KK4.js.map → chunk-ZTPXACWB.js.map} +0 -0
- /package/dist/{chunk-JCY4CMDH.js.map → chunk-ZUA3JMI6.js.map} +0 -0
- /package/dist/{chunk-IGVVXLKJ.js.map → chunk-ZYAZUPPV.js.map} +0 -0
- /package/dist/{computer-viewer-LPZ763KF.js.map → computer-viewer-TDDO25AV.js.map} +0 -0
- /package/dist/{embedded-new-voice-YVMKSLKJ.js.map → embedded-new-voice-2G3VLPVQ.js.map} +0 -0
- /package/dist/{embedded-voice-BJPQFXSU.js.map → embedded-voice-T5IWOWGD.js.map} +0 -0
- /package/dist/{fleet-decision-row-AA4H5CDT.js.map → fleet-decision-row-WM64KXP3.js.map} +0 -0
- /package/dist/{model-policy-picker-menu-HSMWVO4P.js.map → model-policy-picker-menu-SMC6J6QN.js.map} +0 -0
- /package/dist/{payment-page-card-3LTSFJGN.js.map → payment-page-card-G4U63KUV.js.map} +0 -0
- /package/dist/{platform-activity-row-5VYV6TX4.js.map → platform-activity-row-BUZGZAKZ.js.map} +0 -0
- /package/dist/{queue-surface-implementation-NXHZUKD2.js.map → queue-surface-implementation-4KUZ4PJV.js.map} +0 -0
- /package/dist/{sandbox-files-YCMLQUFU.js.map → sandbox-files-ESDMOFSD.js.map} +0 -0
- /package/dist/{session-connect-cards-KSQLMRM5.js.map → session-connect-cards-Q53KMMYY.js.map} +0 -0
- /package/dist/{session-realtime-ZR6JLG3Y.js.map → session-realtime-CF3I35WJ.js.map} +0 -0
- /package/dist/{timeline-annotation-markers-YAHDPWVG.js.map → timeline-annotation-markers-CJK4RYZ4.js.map} +0 -0
- /package/dist/{timeline-annotation-selection-KHXNCEJP.js.map → timeline-annotation-selection-67GF5H26.js.map} +0 -0
- /package/dist/{timeline-annotations-dialog-Y4XD3N7B.js.map → timeline-annotations-dialog-ONJPQDJQ.js.map} +0 -0
|
@@ -0,0 +1,2386 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
useCapabilityToolDefaults
|
|
4
|
+
} from "./chunk-UDMFRWVB.js";
|
|
5
|
+
import {
|
|
6
|
+
sameSessionForContext
|
|
7
|
+
} from "./chunk-CTBP2E2T.js";
|
|
8
|
+
import {
|
|
9
|
+
startWorkspaceClientConfigRefresh,
|
|
10
|
+
withWorkspaceClientConfig
|
|
11
|
+
} from "./chunk-DC6CN2XS.js";
|
|
12
|
+
import {
|
|
13
|
+
ManagedAuthSessionUnavailableError,
|
|
14
|
+
signOutWithAuthoritativeReconciliation
|
|
15
|
+
} from "./chunk-MXDZE5ML.js";
|
|
16
|
+
import {
|
|
17
|
+
beginSocialLoginAnalytics,
|
|
18
|
+
noteSuccessfulLogin,
|
|
19
|
+
observeSocialLoginResult
|
|
20
|
+
} from "./chunk-2GTZXN6F.js";
|
|
21
|
+
import {
|
|
22
|
+
startDeploymentRefresh
|
|
23
|
+
} from "./chunk-ARIV4S6T.js";
|
|
24
|
+
import {
|
|
25
|
+
deleteWorkspaceWithReconciliation
|
|
26
|
+
} from "./chunk-BZ74K6IE.js";
|
|
27
|
+
import {
|
|
28
|
+
unlinkGitHubInstallationWithReconciliation
|
|
29
|
+
} from "./chunk-3BCPHI4Q.js";
|
|
30
|
+
import {
|
|
31
|
+
isAuthorizedWorkspaceId,
|
|
32
|
+
organizationWorkspacePreferenceStorageId,
|
|
33
|
+
workspaceNavigationPreferenceStorageId,
|
|
34
|
+
writeLastWorkspaceId,
|
|
35
|
+
writeLastWorkspaceIdForOrganization
|
|
36
|
+
} from "./chunk-HC4JFZVU.js";
|
|
37
|
+
import {
|
|
38
|
+
beginWorkspaceOperation,
|
|
39
|
+
beginWorkspaceTransition,
|
|
40
|
+
invalidatePrincipalTransition,
|
|
41
|
+
invalidateWorkspaceTransition,
|
|
42
|
+
ownsPrincipalTransition,
|
|
43
|
+
ownsTransitionInvocation,
|
|
44
|
+
ownsWorkspaceOperation,
|
|
45
|
+
ownsWorkspaceTransition,
|
|
46
|
+
runCurrentTransitionInvocation,
|
|
47
|
+
runCurrentWorkspaceOperation,
|
|
48
|
+
runCurrentWorkspaceRequest,
|
|
49
|
+
settleWorkspaceOperation
|
|
50
|
+
} from "./chunk-ANALJOJL.js";
|
|
51
|
+
import {
|
|
52
|
+
useManualRepositoryCatalogReconciliation
|
|
53
|
+
} from "./chunk-WGBIFKTP.js";
|
|
54
|
+
import {
|
|
55
|
+
readBootstrap
|
|
56
|
+
} from "./chunk-CBMZS6DL.js";
|
|
57
|
+
import {
|
|
58
|
+
runSingleFlight
|
|
59
|
+
} from "./chunk-34XTCKDJ.js";
|
|
60
|
+
import {
|
|
61
|
+
bootstrapErrorPresentation,
|
|
62
|
+
bootstrapWaitingPresentation
|
|
63
|
+
} from "./chunk-B7QZASPX.js";
|
|
64
|
+
import {
|
|
65
|
+
createWithOpeningContext
|
|
66
|
+
} from "./chunk-KMDWWTDF.js";
|
|
67
|
+
import {
|
|
68
|
+
createQuietRetry
|
|
69
|
+
} from "./chunk-MME2XIN6.js";
|
|
70
|
+
import {
|
|
71
|
+
creationHandoffReconciled
|
|
72
|
+
} from "./chunk-UKZ3SGNF.js";
|
|
73
|
+
import {
|
|
74
|
+
markIntegrationConnectRedirect
|
|
75
|
+
} from "./chunk-OXD6ET34.js";
|
|
76
|
+
import {
|
|
77
|
+
SessionChannelProjectionAuthority,
|
|
78
|
+
applySessionPinProjection,
|
|
79
|
+
notifySessionPinChanged,
|
|
80
|
+
reconcileFailedSessionPin
|
|
81
|
+
} from "./chunk-JHZRAYI4.js";
|
|
82
|
+
import {
|
|
83
|
+
isPaymentRequiredError,
|
|
84
|
+
paymentRefusalCode
|
|
85
|
+
} from "./chunk-INXGSG3J.js";
|
|
86
|
+
import {
|
|
87
|
+
upsertWorkspace
|
|
88
|
+
} from "./chunk-NI7NYZ2O.js";
|
|
89
|
+
import {
|
|
90
|
+
useConsoleSharedQueries
|
|
91
|
+
} from "./chunk-Z2ZZZ6UF.js";
|
|
92
|
+
import {
|
|
93
|
+
reusablePersonalGitHubAuthority
|
|
94
|
+
} from "./chunk-MFGKX4C3.js";
|
|
95
|
+
import {
|
|
96
|
+
buildCreateSessionRequest,
|
|
97
|
+
classifyCreateSessionFailure,
|
|
98
|
+
prepareCreateSessionAttempt,
|
|
99
|
+
retainCreateSessionAttemptAfterFailure
|
|
100
|
+
} from "./chunk-IXPTECSC.js";
|
|
101
|
+
import {
|
|
102
|
+
t
|
|
103
|
+
} from "./chunk-HSOXMJOT.js";
|
|
104
|
+
import {
|
|
105
|
+
buildOpenGeniUiTools,
|
|
106
|
+
buildResources,
|
|
107
|
+
enabledWorkspaceCapabilityMcpServers,
|
|
108
|
+
groupRepositories,
|
|
109
|
+
initialReasoningEffort,
|
|
110
|
+
installedApiIntegrationMcpServers,
|
|
111
|
+
isAbortError,
|
|
112
|
+
mergeMcpServerOptions,
|
|
113
|
+
selectableMcpServers
|
|
114
|
+
} from "./chunk-ZPW5NFYD.js";
|
|
115
|
+
import {
|
|
116
|
+
hasWorkspacePermission,
|
|
117
|
+
isWorkspacePermissionDenied,
|
|
118
|
+
lacksWorkspacePermission
|
|
119
|
+
} from "./chunk-H2ALCTWC.js";
|
|
120
|
+
import {
|
|
121
|
+
loadCurrentManagedSelfContext,
|
|
122
|
+
managedSelfContextIdentity
|
|
123
|
+
} from "./chunk-LBSXJVHD.js";
|
|
124
|
+
import {
|
|
125
|
+
useNavigate,
|
|
126
|
+
usePage,
|
|
127
|
+
useRouterState
|
|
128
|
+
} from "./chunk-BXBDYNRP.js";
|
|
129
|
+
import {
|
|
130
|
+
useEmbedded,
|
|
131
|
+
useHostMessageContext,
|
|
132
|
+
useHostMessageContextTools
|
|
133
|
+
} from "./chunk-ENFLCAR3.js";
|
|
134
|
+
import {
|
|
135
|
+
toast
|
|
136
|
+
} from "./chunk-O4EA4F3W.js";
|
|
137
|
+
import {
|
|
138
|
+
createSessionEventFeedStore,
|
|
139
|
+
useLatestCallback
|
|
140
|
+
} from "./chunk-JDFDPMKX.js";
|
|
141
|
+
import {
|
|
142
|
+
userErrorText
|
|
143
|
+
} from "./chunk-O4OOG3D6.js";
|
|
144
|
+
import {
|
|
145
|
+
claimHumanInputDraftOwner,
|
|
146
|
+
forgetAllHumanInputDrafts
|
|
147
|
+
} from "./chunk-X62OJCQW.js";
|
|
148
|
+
import {
|
|
149
|
+
composerSubmissionErrorMessage
|
|
150
|
+
} from "./chunk-5MOJZORA.js";
|
|
151
|
+
import {
|
|
152
|
+
isTransientServiceFailure
|
|
153
|
+
} from "./chunk-5AIMVW6Y.js";
|
|
154
|
+
|
|
155
|
+
// src/app/app-state.tsx
|
|
156
|
+
import {
|
|
157
|
+
resolveWorkspaceSessionDefaults,
|
|
158
|
+
resolveWorkspaceSessionToolDefaults
|
|
159
|
+
} from "@opengeni/contracts";
|
|
160
|
+
import { OpenGeniApiError } from "@opengeni/sdk/browser";
|
|
161
|
+
import {
|
|
162
|
+
useCallback,
|
|
163
|
+
useEffect,
|
|
164
|
+
useInsertionEffect,
|
|
165
|
+
useMemo,
|
|
166
|
+
useRef,
|
|
167
|
+
useState
|
|
168
|
+
} from "react";
|
|
169
|
+
import { flushSync } from "react-dom";
|
|
170
|
+
import { errorMessage } from "@opengeni/contracts/values";
|
|
171
|
+
var GITHUB_STATUS_TOAST_ID = "opengeni-github-status";
|
|
172
|
+
var PERSONAL_GITHUB_STATUS_TOAST_ID = "opengeni-personal-github-status";
|
|
173
|
+
var PERSONAL_GITHUB_RECONNECT_TOAST_ID = "opengeni-personal-github-reconnect";
|
|
174
|
+
function personalGitHubNeedsReconnect(connection) {
|
|
175
|
+
return Boolean(connection && connection.status !== "active" && connection.status !== "revoked");
|
|
176
|
+
}
|
|
177
|
+
function announcePersonalGitHubReconnect(state, connection, onReconnect) {
|
|
178
|
+
const key = `${connection.id}:${connection.version}`;
|
|
179
|
+
if (state.shownFor === key) return;
|
|
180
|
+
state.shownFor = key;
|
|
181
|
+
const login = typeof connection.metadata.githubLogin === "string" && connection.metadata.githubLogin ? connection.metadata.githubLogin : null;
|
|
182
|
+
showPersonalGitHubReconnectToast(login, onReconnect);
|
|
183
|
+
}
|
|
184
|
+
function showPersonalGitHubReconnectToast(githubLogin, onReconnect) {
|
|
185
|
+
toast.warning("Reconnect your GitHub", {
|
|
186
|
+
id: PERSONAL_GITHUB_RECONNECT_TOAST_ID,
|
|
187
|
+
description: `Opengeni can't work as ${githubLogin ? `@${githubLogin}` : "you"} until you reconnect.`,
|
|
188
|
+
duration: Infinity,
|
|
189
|
+
closeButton: true,
|
|
190
|
+
action: { label: "Reconnect", onClick: onReconnect }
|
|
191
|
+
});
|
|
192
|
+
}
|
|
193
|
+
function clearPersonalGitHubReconnectToast(state) {
|
|
194
|
+
if (state.shownFor === null) return;
|
|
195
|
+
state.shownFor = null;
|
|
196
|
+
toast.dismiss(PERSONAL_GITHUB_RECONNECT_TOAST_ID);
|
|
197
|
+
}
|
|
198
|
+
function preserveSlackLinkForManagedAuth(mode, phase) {
|
|
199
|
+
return mode === "signin" && phase === "raw";
|
|
200
|
+
}
|
|
201
|
+
function createSlackLinkPrepareController(value) {
|
|
202
|
+
let workspaceId = value?.workspaceId ?? null;
|
|
203
|
+
let bearer = value?.token ?? null;
|
|
204
|
+
let inFlight = null;
|
|
205
|
+
let prepared = null;
|
|
206
|
+
let failure;
|
|
207
|
+
let hasFailure = false;
|
|
208
|
+
let generation = 0;
|
|
209
|
+
return {
|
|
210
|
+
workspaceId: () => workspaceId,
|
|
211
|
+
phase: () => {
|
|
212
|
+
if (!workspaceId) return "none";
|
|
213
|
+
if (bearer !== null) return "raw";
|
|
214
|
+
if (inFlight) return "in_flight";
|
|
215
|
+
if (prepared !== null) return "prepared";
|
|
216
|
+
return hasFailure ? "failed" : "none";
|
|
217
|
+
},
|
|
218
|
+
prepare: (requestedWorkspaceId, exchange) => {
|
|
219
|
+
if (!workspaceId || requestedWorkspaceId !== workspaceId) return Promise.resolve(null);
|
|
220
|
+
if (prepared !== null) return Promise.resolve(prepared);
|
|
221
|
+
if (hasFailure) return Promise.reject(failure);
|
|
222
|
+
if (inFlight) return inFlight;
|
|
223
|
+
if (bearer === null) return Promise.resolve(null);
|
|
224
|
+
const token = bearer;
|
|
225
|
+
const claimedGeneration = generation;
|
|
226
|
+
let exchangePromise;
|
|
227
|
+
try {
|
|
228
|
+
exchangePromise = exchange(token);
|
|
229
|
+
} catch (error) {
|
|
230
|
+
exchangePromise = Promise.reject(error);
|
|
231
|
+
}
|
|
232
|
+
bearer = null;
|
|
233
|
+
let flight;
|
|
234
|
+
flight = exchangePromise.then(
|
|
235
|
+
(request) => {
|
|
236
|
+
if (generation === claimedGeneration) prepared = request;
|
|
237
|
+
return request;
|
|
238
|
+
},
|
|
239
|
+
(error) => {
|
|
240
|
+
if (generation === claimedGeneration) {
|
|
241
|
+
failure = error;
|
|
242
|
+
hasFailure = true;
|
|
243
|
+
}
|
|
244
|
+
throw error;
|
|
245
|
+
}
|
|
246
|
+
).finally(() => {
|
|
247
|
+
if (generation === claimedGeneration && inFlight === flight) inFlight = null;
|
|
248
|
+
});
|
|
249
|
+
inFlight = flight;
|
|
250
|
+
return flight;
|
|
251
|
+
},
|
|
252
|
+
clear: () => {
|
|
253
|
+
generation += 1;
|
|
254
|
+
workspaceId = null;
|
|
255
|
+
bearer = null;
|
|
256
|
+
inFlight = null;
|
|
257
|
+
prepared = null;
|
|
258
|
+
failure = void 0;
|
|
259
|
+
hasFailure = false;
|
|
260
|
+
}
|
|
261
|
+
};
|
|
262
|
+
}
|
|
263
|
+
function useAppState(host, appStateOptions) {
|
|
264
|
+
const messageContext = useHostMessageContext();
|
|
265
|
+
const embedded = useEmbedded();
|
|
266
|
+
const hostMessageContext = useRef(messageContext);
|
|
267
|
+
hostMessageContext.current = messageContext;
|
|
268
|
+
const messageContextTools = useHostMessageContextTools();
|
|
269
|
+
const hostMessageContextTools = useRef(messageContextTools);
|
|
270
|
+
hostMessageContextTools.current = messageContextTools;
|
|
271
|
+
const {
|
|
272
|
+
captureProductEvent,
|
|
273
|
+
checkDeploymentRevision,
|
|
274
|
+
clearStoredAccessKey,
|
|
275
|
+
configureManagedActorEpoch,
|
|
276
|
+
createOpenGeniClient,
|
|
277
|
+
fetchAuthSession,
|
|
278
|
+
fetchClientConfig,
|
|
279
|
+
getStoredAccessKey,
|
|
280
|
+
setStoredAccessKey,
|
|
281
|
+
signInEmail,
|
|
282
|
+
signOutManaged,
|
|
283
|
+
signUpEmail,
|
|
284
|
+
startManagedSocialSignIn,
|
|
285
|
+
signInPasskey,
|
|
286
|
+
signUpPasskey,
|
|
287
|
+
slackLink
|
|
288
|
+
} = host;
|
|
289
|
+
const [session, setSessionState] = useState(null);
|
|
290
|
+
const [sessionChannelProjectionAuthority] = useState(
|
|
291
|
+
() => new SessionChannelProjectionAuthority()
|
|
292
|
+
);
|
|
293
|
+
const [sessionCreationHandoff, setSessionCreationHandoff] = useState(null);
|
|
294
|
+
const [clientConfig, setClientConfig] = useState(null);
|
|
295
|
+
const [workspaceConfig, setWorkspaceConfig] = useState(
|
|
296
|
+
void 0
|
|
297
|
+
);
|
|
298
|
+
const [workspaceConfigVersion, setWorkspaceConfigVersion] = useState(0);
|
|
299
|
+
const [configError, setConfigError] = useState(null);
|
|
300
|
+
const [configRequestVersion, setConfigRequestVersion] = useState(0);
|
|
301
|
+
const [authSession, setAuthSession] = useState(void 0);
|
|
302
|
+
const [managedAuthBootstrapComplete, setManagedAuthBootstrapComplete] = useState(false);
|
|
303
|
+
const [accessContext, setAccessContext] = useState(null);
|
|
304
|
+
const accessContextRef = useRef(accessContext);
|
|
305
|
+
useInsertionEffect(() => {
|
|
306
|
+
accessContextRef.current = accessContext;
|
|
307
|
+
}, [accessContext]);
|
|
308
|
+
const [workspaces, setWorkspaces] = useState([]);
|
|
309
|
+
const [managedSelfContext, setManagedSelfContext] = useState(null);
|
|
310
|
+
const [slackLinkContinuationWorkspaceId, setSlackLinkContinuationWorkspaceId] = useState(slackLink.workspaceId);
|
|
311
|
+
const [invalidSlackLinkQueryWorkspaceId, setInvalidSlackLinkQueryWorkspaceId] = useState(host.initialInvalidSlackLinkQueryWorkspaceId);
|
|
312
|
+
const [accessLoading, setAccessLoading] = useState(false);
|
|
313
|
+
const [accessError, setAccessError] = useState(null);
|
|
314
|
+
const [creditRequired, setCreditRequired] = useState(null);
|
|
315
|
+
const [model, setModel] = useState("gpt-6-astra");
|
|
316
|
+
const [reasoningEffort, setReasoningEffort] = useState("low");
|
|
317
|
+
const [latencyMode, setLatencyMode] = useState("standard");
|
|
318
|
+
const [inspectorOpen, setInspectorOpen] = useState(false);
|
|
319
|
+
const [connectionState, setConnectionState] = useState("idle");
|
|
320
|
+
const [sessionEventFeedStore] = useState(createSessionEventFeedStore);
|
|
321
|
+
useEffect(() => {
|
|
322
|
+
const retireReconciledCreation = () => {
|
|
323
|
+
const feed = sessionEventFeedStore.getSnapshot();
|
|
324
|
+
if (!feed) return;
|
|
325
|
+
setSessionCreationHandoff(
|
|
326
|
+
(current) => creationHandoffReconciled(current, feed.events) ? null : current
|
|
327
|
+
);
|
|
328
|
+
};
|
|
329
|
+
retireReconciledCreation();
|
|
330
|
+
return sessionEventFeedStore.subscribe(retireReconciledCreation);
|
|
331
|
+
}, [sessionEventFeedStore]);
|
|
332
|
+
const [manualRepos, setManualRepos] = useState([]);
|
|
333
|
+
const [manualReposOpen, setManualReposOpen] = useState(false);
|
|
334
|
+
const [nextRepoId, setNextRepoId] = useState(1);
|
|
335
|
+
const [selectedRepoIds, setSelectedRepoIds] = useState(() => /* @__PURE__ */ new Set());
|
|
336
|
+
const [selectedRepoRefs, setSelectedRepoRefs] = useState({});
|
|
337
|
+
const [githubRepos, setGithubRepos] = useState([]);
|
|
338
|
+
const [githubStatus, setGithubStatus] = useState(null);
|
|
339
|
+
const [githubStatusFailed, setGithubStatusFailed] = useState(false);
|
|
340
|
+
const [githubCatalogReady, setGithubCatalogReady] = useState(false);
|
|
341
|
+
const [personalGitHubStatus, setPersonalGitHubStatus] = useState(null);
|
|
342
|
+
const [personalGitHubRepositories, setPersonalGitHubRepositories] = useState([]);
|
|
343
|
+
const [personalGitHubSelection, setPersonalGitHubSelection] = useState(null);
|
|
344
|
+
const [personalGitHubCatalogReady, setPersonalGitHubCatalogReady] = useState(false);
|
|
345
|
+
const [personalGitHubBusy, setPersonalGitHubBusy] = useState(false);
|
|
346
|
+
const [selectedPersonalGitHubRepoIds, setSelectedPersonalGitHubRepoIds] = useState(
|
|
347
|
+
() => /* @__PURE__ */ new Set()
|
|
348
|
+
);
|
|
349
|
+
const [selectedPersonalGitHubRepoRefs, setSelectedPersonalGitHubRepoRefs] = useState({});
|
|
350
|
+
const [personalGitHubAuthorityCache, setPersonalGitHubAuthorityCache] = useState(null);
|
|
351
|
+
const personalGitHubAuthority = personalGitHubAuthorityCache?.authority ?? null;
|
|
352
|
+
const [githubOrg, setGithubOrg] = useState("");
|
|
353
|
+
const [workspaceMcpServers, setWorkspaceMcpServers] = useState([]);
|
|
354
|
+
const [workspaceCapabilityCatalog, setWorkspaceCapabilityCatalog] = useState([]);
|
|
355
|
+
const [workspaceMemberIntegrationSetup, setWorkspaceMemberIntegrationSetup] = useState(void 0);
|
|
356
|
+
const [workspaceMcpCatalogReady, setWorkspaceMcpCatalogReady] = useState(false);
|
|
357
|
+
const [workspaceMcpCatalogLoadedSuccessfully, setWorkspaceMcpCatalogLoadedSuccessfully] = useState(false);
|
|
358
|
+
const [selectedCapabilityToolIds, setSelectedCapabilityToolIds] = useState(
|
|
359
|
+
() => /* @__PURE__ */ new Set()
|
|
360
|
+
);
|
|
361
|
+
const [workspaceStateOwnerId, setWorkspaceStateOwnerId] = useState(null);
|
|
362
|
+
const workspaceTransitionIdentity = useRef({
|
|
363
|
+
workspaceId: null,
|
|
364
|
+
revision: 0
|
|
365
|
+
});
|
|
366
|
+
const principalTransitionIdentity = useRef({
|
|
367
|
+
revision: 0
|
|
368
|
+
});
|
|
369
|
+
const workspaceOperationSequence = useRef(0);
|
|
370
|
+
const activeCreateOperation = useRef(null);
|
|
371
|
+
const githubManifestOperationSequence = useRef(0);
|
|
372
|
+
const activeGitHubManifestOperation = useRef(null);
|
|
373
|
+
const githubDisconnectOperationSequence = useRef(0);
|
|
374
|
+
const activeGitHubDisconnectOperation = useRef(null);
|
|
375
|
+
const authPrincipalIdRef = useRef(null);
|
|
376
|
+
const accessPrincipalIdRef = useRef(null);
|
|
377
|
+
const managedSelfContextIdentityRef = useRef(null);
|
|
378
|
+
const seenCapabilityToolIds = useRef(/* @__PURE__ */ new Set());
|
|
379
|
+
const githubRefreshId = useRef(0);
|
|
380
|
+
const personalGitHubRefreshId = useRef(0);
|
|
381
|
+
const githubQuietRetry = useRef(createQuietRetry());
|
|
382
|
+
const personalGitHubQuietRetry = useRef(createQuietRetry());
|
|
383
|
+
const refreshGitHubRef = useRef(async () => {
|
|
384
|
+
});
|
|
385
|
+
const refreshPersonalGitHubRef = useRef(async () => {
|
|
386
|
+
});
|
|
387
|
+
const personalGitHubReconnectToast = useRef({ shownFor: null });
|
|
388
|
+
const reconnectPersonalGitHubFromToast = useLatestCallback(
|
|
389
|
+
(workspaceId, connectionId) => void beginPersonalGitHubOAuth(workspaceId, true, connectionId)
|
|
390
|
+
);
|
|
391
|
+
useEffect(
|
|
392
|
+
() => () => {
|
|
393
|
+
githubQuietRetry.current.reset();
|
|
394
|
+
personalGitHubQuietRetry.current.reset();
|
|
395
|
+
},
|
|
396
|
+
[]
|
|
397
|
+
);
|
|
398
|
+
const mcpRefreshId = useRef(0);
|
|
399
|
+
const mcpCatalogRequests = useRef(/* @__PURE__ */ new Map());
|
|
400
|
+
const pendingCreateAttempt = useRef(null);
|
|
401
|
+
const appliedWorkspaceSessionDefaultsKey = useRef(null);
|
|
402
|
+
const appliedWorkspaceToolDefaultsKey = useRef(null);
|
|
403
|
+
const [busy, setBusy] = useState(false);
|
|
404
|
+
const [repoBusy, setRepoBusy] = useState(false);
|
|
405
|
+
const [githubAppBusy, setGithubAppBusy] = useState(false);
|
|
406
|
+
const [hasAccessKey, setHasAccessKey] = useState(() => getStoredAccessKey() !== null);
|
|
407
|
+
const [accessKeyDraft, setAccessKeyDraft] = useState("");
|
|
408
|
+
const [accessKeyVersion, setAccessKeyVersion] = useState(0);
|
|
409
|
+
const keyAuthRequired = host.authority === "app" && (clientConfig?.auth.mode === "deploymentKey" || clientConfig?.auth.mode === "configuredToken");
|
|
410
|
+
const managedAuthRequired = host.authority === "app" && clientConfig?.auth.mode === "managedSession";
|
|
411
|
+
const browserAccountsConfigured = managedAuthRequired && clientConfig?.managedAuthSessionSetMode !== "legacy";
|
|
412
|
+
const browserAccountsEnabled = browserAccountsConfigured && managedAuthBootstrapComplete;
|
|
413
|
+
const managedEmailVerificationRequired = clientConfig?.auth.mode === "managedSession" ? clientConfig.auth.emailVerificationRequired ?? true : true;
|
|
414
|
+
const managedSocialProviders = clientConfig?.auth.mode === "managedSession" ? clientConfig.auth.socialProviders ?? [] : [];
|
|
415
|
+
const managedPasskeySignIn = clientConfig?.auth.mode === "managedSession" && clientConfig.auth.passkeySignIn === true && signInPasskey !== void 0;
|
|
416
|
+
const managedPasskeySignUp = managedPasskeySignIn && clientConfig?.auth.mode === "managedSession" && clientConfig.auth.passkeySignUp === true && signUpPasskey !== void 0;
|
|
417
|
+
const managedNewSignupsEnabled = clientConfig?.auth.mode === "managedSession" ? clientConfig.auth.newSignupsEnabled !== false : true;
|
|
418
|
+
const keyAuthReady = !keyAuthRequired || hasAccessKey;
|
|
419
|
+
const managedAuthReady = !managedAuthRequired || Boolean(authSession);
|
|
420
|
+
const authReady = keyAuthReady && managedAuthReady;
|
|
421
|
+
const defaultWorkspaceId = accessContext?.defaultWorkspaceId ?? workspaces[0]?.id ?? accessContext?.workspaceGrants[0]?.workspaceId ?? null;
|
|
422
|
+
const navigate = useNavigate();
|
|
423
|
+
const hostPage = usePage();
|
|
424
|
+
const pathname = useRouterState({
|
|
425
|
+
select: (state) => state.location.pathname
|
|
426
|
+
});
|
|
427
|
+
useEffect(() => {
|
|
428
|
+
if (!browserAccountsConfigured) configureManagedActorEpoch(null);
|
|
429
|
+
return () => configureManagedActorEpoch(null);
|
|
430
|
+
}, [browserAccountsConfigured, configureManagedActorEpoch]);
|
|
431
|
+
useEffect(() => {
|
|
432
|
+
if (invalidSlackLinkQueryWorkspaceId && pathname !== `/workspaces/${encodeURIComponent(invalidSlackLinkQueryWorkspaceId)}/capabilities`) {
|
|
433
|
+
setInvalidSlackLinkQueryWorkspaceId(null);
|
|
434
|
+
}
|
|
435
|
+
}, [invalidSlackLinkQueryWorkspaceId, pathname]);
|
|
436
|
+
const client = useMemo(() => {
|
|
437
|
+
void accessKeyVersion;
|
|
438
|
+
return createOpenGeniClient(sessionChannelProjectionAuthority.beginRead);
|
|
439
|
+
}, [accessKeyVersion, createOpenGeniClient, sessionChannelProjectionAuthority]);
|
|
440
|
+
useConsoleSharedQueries(client);
|
|
441
|
+
const setSession = useCallback((value) => {
|
|
442
|
+
setSessionState((current) => {
|
|
443
|
+
const next = typeof value === "function" ? value(current) : value;
|
|
444
|
+
return sameSessionForContext(current, next) ? current : next;
|
|
445
|
+
});
|
|
446
|
+
}, []);
|
|
447
|
+
const resetSessionView = useCallback(() => {
|
|
448
|
+
setSession(null);
|
|
449
|
+
setSessionCreationHandoff(null);
|
|
450
|
+
setConnectionState("idle");
|
|
451
|
+
sessionEventFeedStore.set(null);
|
|
452
|
+
}, [sessionEventFeedStore, setSession]);
|
|
453
|
+
const resetWorkspaceIntegrations = useCallback(() => {
|
|
454
|
+
setGithubStatus(null);
|
|
455
|
+
setGithubStatusFailed(false);
|
|
456
|
+
setGithubRepos([]);
|
|
457
|
+
setGithubCatalogReady(false);
|
|
458
|
+
setPersonalGitHubStatus(null);
|
|
459
|
+
setPersonalGitHubRepositories([]);
|
|
460
|
+
setPersonalGitHubSelection(null);
|
|
461
|
+
setPersonalGitHubCatalogReady(false);
|
|
462
|
+
setPersonalGitHubAuthorityCache(null);
|
|
463
|
+
setWorkspaceMcpServers([]);
|
|
464
|
+
setWorkspaceCapabilityCatalog([]);
|
|
465
|
+
setWorkspaceMemberIntegrationSetup(void 0);
|
|
466
|
+
setWorkspaceMcpCatalogReady(false);
|
|
467
|
+
setWorkspaceMcpCatalogLoadedSuccessfully(false);
|
|
468
|
+
}, []);
|
|
469
|
+
const resetWorkspaceState = useCallback(
|
|
470
|
+
(workspaceId, force) => {
|
|
471
|
+
const previousWorkspaceId = workspaceTransitionIdentity.current.workspaceId;
|
|
472
|
+
const transition = workspaceId === null ? {
|
|
473
|
+
identity: invalidateWorkspaceTransition(workspaceTransitionIdentity.current),
|
|
474
|
+
changed: true
|
|
475
|
+
} : beginWorkspaceTransition(workspaceTransitionIdentity.current, workspaceId);
|
|
476
|
+
if (!force && !transition.changed) {
|
|
477
|
+
return;
|
|
478
|
+
}
|
|
479
|
+
workspaceTransitionIdentity.current = transition.identity;
|
|
480
|
+
if (previousWorkspaceId && (force || previousWorkspaceId !== workspaceId)) {
|
|
481
|
+
sessionChannelProjectionAuthority.clearWorkspace(previousWorkspaceId);
|
|
482
|
+
}
|
|
483
|
+
activeCreateOperation.current = null;
|
|
484
|
+
activeGitHubManifestOperation.current = null;
|
|
485
|
+
activeGitHubDisconnectOperation.current = null;
|
|
486
|
+
githubRefreshId.current += 1;
|
|
487
|
+
personalGitHubRefreshId.current += 1;
|
|
488
|
+
mcpRefreshId.current += 1;
|
|
489
|
+
pendingCreateAttempt.current = null;
|
|
490
|
+
resetSessionView();
|
|
491
|
+
setInspectorOpen(false);
|
|
492
|
+
setManualRepos([]);
|
|
493
|
+
setManualReposOpen(false);
|
|
494
|
+
setNextRepoId(1);
|
|
495
|
+
setSelectedRepoIds(/* @__PURE__ */ new Set());
|
|
496
|
+
setSelectedRepoRefs({});
|
|
497
|
+
setSelectedPersonalGitHubRepoIds(/* @__PURE__ */ new Set());
|
|
498
|
+
setSelectedPersonalGitHubRepoRefs({});
|
|
499
|
+
setSelectedCapabilityToolIds(/* @__PURE__ */ new Set());
|
|
500
|
+
seenCapabilityToolIds.current = /* @__PURE__ */ new Set();
|
|
501
|
+
appliedWorkspaceToolDefaultsKey.current = null;
|
|
502
|
+
setGithubOrg("");
|
|
503
|
+
setBusy(false);
|
|
504
|
+
setRepoBusy(false);
|
|
505
|
+
setGithubAppBusy(false);
|
|
506
|
+
setPersonalGitHubBusy(false);
|
|
507
|
+
resetWorkspaceIntegrations();
|
|
508
|
+
setWorkspaceConfig(void 0);
|
|
509
|
+
setWorkspaceStateOwnerId(workspaceId);
|
|
510
|
+
},
|
|
511
|
+
[resetSessionView, resetWorkspaceIntegrations, sessionChannelProjectionAuthority]
|
|
512
|
+
);
|
|
513
|
+
const prepareWorkspaceTransition = useCallback(
|
|
514
|
+
(workspaceId) => resetWorkspaceState(workspaceId, false),
|
|
515
|
+
[resetWorkspaceState]
|
|
516
|
+
);
|
|
517
|
+
const captureWorkspaceInvocation = useCallback(
|
|
518
|
+
(workspaceId) => {
|
|
519
|
+
const accepted = workspaceTransitionIdentity.current;
|
|
520
|
+
return ownsWorkspaceTransition(accepted, accepted, workspaceId) ? accepted : null;
|
|
521
|
+
},
|
|
522
|
+
[]
|
|
523
|
+
);
|
|
524
|
+
const ownsWorkspaceInvocation = useCallback(
|
|
525
|
+
(workspaceId, accepted) => ownsWorkspaceTransition(workspaceTransitionIdentity.current, accepted, workspaceId),
|
|
526
|
+
[]
|
|
527
|
+
);
|
|
528
|
+
const clientConfigurationReady = clientConfig !== null;
|
|
529
|
+
useEffect(() => {
|
|
530
|
+
if (!clientConfigurationReady || !authReady || !workspaceStateOwnerId) return;
|
|
531
|
+
const workspaceId = workspaceStateOwnerId;
|
|
532
|
+
const accepted = captureWorkspaceInvocation(workspaceId);
|
|
533
|
+
if (!accepted) return;
|
|
534
|
+
return startWorkspaceClientConfigRefresh({
|
|
535
|
+
read: (signal) => fetchClientConfig(signal, workspaceId),
|
|
536
|
+
ownsWorkspace: () => ownsWorkspaceInvocation(workspaceId, accepted),
|
|
537
|
+
apply: setWorkspaceConfig,
|
|
538
|
+
subscribeFocus: (refresh) => {
|
|
539
|
+
window.addEventListener("focus", refresh);
|
|
540
|
+
return () => window.removeEventListener("focus", refresh);
|
|
541
|
+
}
|
|
542
|
+
});
|
|
543
|
+
}, [
|
|
544
|
+
fetchClientConfig,
|
|
545
|
+
clientConfigurationReady,
|
|
546
|
+
authReady,
|
|
547
|
+
workspaceStateOwnerId,
|
|
548
|
+
workspaceConfigVersion,
|
|
549
|
+
accessContext?.subjectId,
|
|
550
|
+
accessKeyVersion,
|
|
551
|
+
captureWorkspaceInvocation,
|
|
552
|
+
ownsWorkspaceInvocation
|
|
553
|
+
]);
|
|
554
|
+
const refreshWorkspaceConfig = useCallback(
|
|
555
|
+
() => setWorkspaceConfigVersion((version) => version + 1),
|
|
556
|
+
[]
|
|
557
|
+
);
|
|
558
|
+
const invalidatePrincipalWorkspaceState = useCallback(
|
|
559
|
+
(options) => {
|
|
560
|
+
principalTransitionIdentity.current = invalidatePrincipalTransition(
|
|
561
|
+
principalTransitionIdentity.current
|
|
562
|
+
);
|
|
563
|
+
authPrincipalIdRef.current = null;
|
|
564
|
+
accessPrincipalIdRef.current = null;
|
|
565
|
+
managedSelfContextIdentityRef.current = null;
|
|
566
|
+
setManagedSelfContext(null);
|
|
567
|
+
if (options?.preservePendingSlackLink !== true) {
|
|
568
|
+
slackLink.clear();
|
|
569
|
+
setSlackLinkContinuationWorkspaceId(null);
|
|
570
|
+
}
|
|
571
|
+
resetWorkspaceState(null, true);
|
|
572
|
+
},
|
|
573
|
+
[resetWorkspaceState, slackLink]
|
|
574
|
+
);
|
|
575
|
+
useEffect(() => {
|
|
576
|
+
if (appStateOptions.bootstrapSuspended) return;
|
|
577
|
+
let cancelled = false;
|
|
578
|
+
let stopDeploymentRefresh = () => {
|
|
579
|
+
};
|
|
580
|
+
const controller = new AbortController();
|
|
581
|
+
void Promise.resolve().then(
|
|
582
|
+
() => readBootstrap({
|
|
583
|
+
context: "client_configuration",
|
|
584
|
+
request: () => fetchClientConfig(controller.signal),
|
|
585
|
+
signal: controller.signal,
|
|
586
|
+
// An update parks the API for a while: say so calmly and continue
|
|
587
|
+
// on our own as soon as it answers.
|
|
588
|
+
waiting: {
|
|
589
|
+
onWaiting: (error, elapsedMs) => {
|
|
590
|
+
if (!cancelled) {
|
|
591
|
+
setConfigError(
|
|
592
|
+
bootstrapWaitingPresentation(error, "client_configuration", elapsedMs)
|
|
593
|
+
);
|
|
594
|
+
}
|
|
595
|
+
}
|
|
596
|
+
}
|
|
597
|
+
})
|
|
598
|
+
).then((config) => {
|
|
599
|
+
if (cancelled) {
|
|
600
|
+
return;
|
|
601
|
+
}
|
|
602
|
+
setClientConfig(config);
|
|
603
|
+
setConfigError(null);
|
|
604
|
+
setModel(config.defaultModel);
|
|
605
|
+
setReasoningEffort(initialReasoningEffort(config));
|
|
606
|
+
setLatencyMode("standard");
|
|
607
|
+
if (checkDeploymentRevision) {
|
|
608
|
+
stopDeploymentRefresh = startDeploymentRefresh(checkDeploymentRevision);
|
|
609
|
+
}
|
|
610
|
+
}).catch((error) => {
|
|
611
|
+
if (cancelled) {
|
|
612
|
+
return;
|
|
613
|
+
}
|
|
614
|
+
const presentation = bootstrapErrorPresentation(error, "client_configuration");
|
|
615
|
+
setConfigError(presentation);
|
|
616
|
+
});
|
|
617
|
+
return () => {
|
|
618
|
+
cancelled = true;
|
|
619
|
+
controller.abort();
|
|
620
|
+
stopDeploymentRefresh();
|
|
621
|
+
};
|
|
622
|
+
}, [
|
|
623
|
+
checkDeploymentRevision,
|
|
624
|
+
configRequestVersion,
|
|
625
|
+
fetchClientConfig,
|
|
626
|
+
appStateOptions.bootstrapSuspended
|
|
627
|
+
]);
|
|
628
|
+
useEffect(() => {
|
|
629
|
+
if (!clientConfig) {
|
|
630
|
+
setManagedAuthBootstrapComplete(false);
|
|
631
|
+
return;
|
|
632
|
+
}
|
|
633
|
+
if (!managedAuthRequired) {
|
|
634
|
+
if (authPrincipalIdRef.current !== null) {
|
|
635
|
+
invalidatePrincipalWorkspaceState();
|
|
636
|
+
}
|
|
637
|
+
setAuthSession(null);
|
|
638
|
+
setManagedAuthBootstrapComplete(true);
|
|
639
|
+
return;
|
|
640
|
+
}
|
|
641
|
+
let cancelled = false;
|
|
642
|
+
const acceptedPrincipal = principalTransitionIdentity.current;
|
|
643
|
+
const controller = new AbortController();
|
|
644
|
+
setManagedAuthBootstrapComplete(false);
|
|
645
|
+
setAuthSession(void 0);
|
|
646
|
+
void readBootstrap({
|
|
647
|
+
context: "client_configuration",
|
|
648
|
+
request: fetchAuthSession,
|
|
649
|
+
signal: controller.signal,
|
|
650
|
+
waiting: {
|
|
651
|
+
onWaiting: (error, elapsedMs) => {
|
|
652
|
+
if (!cancelled) {
|
|
653
|
+
setConfigError(bootstrapWaitingPresentation(error, "client_configuration", elapsedMs));
|
|
654
|
+
}
|
|
655
|
+
}
|
|
656
|
+
}
|
|
657
|
+
}).then((nextSession) => {
|
|
658
|
+
if (cancelled || !ownsPrincipalTransition(principalTransitionIdentity.current, acceptedPrincipal)) {
|
|
659
|
+
return;
|
|
660
|
+
}
|
|
661
|
+
setConfigError((current) => current?.recovering ? null : current);
|
|
662
|
+
const nextPrincipalId = nextSession?.user.id ?? null;
|
|
663
|
+
if (authPrincipalIdRef.current !== null && authPrincipalIdRef.current !== nextPrincipalId) {
|
|
664
|
+
invalidatePrincipalWorkspaceState();
|
|
665
|
+
}
|
|
666
|
+
authPrincipalIdRef.current = nextPrincipalId;
|
|
667
|
+
observeSocialLoginResult(nextSession);
|
|
668
|
+
setAuthSession(nextSession);
|
|
669
|
+
setManagedAuthBootstrapComplete(true);
|
|
670
|
+
}).catch(() => {
|
|
671
|
+
if (cancelled || !ownsPrincipalTransition(principalTransitionIdentity.current, acceptedPrincipal)) {
|
|
672
|
+
return;
|
|
673
|
+
}
|
|
674
|
+
setConfigError((current) => current?.recovering ? null : current);
|
|
675
|
+
setAuthSession(null);
|
|
676
|
+
setManagedAuthBootstrapComplete(true);
|
|
677
|
+
});
|
|
678
|
+
return () => {
|
|
679
|
+
cancelled = true;
|
|
680
|
+
controller.abort();
|
|
681
|
+
};
|
|
682
|
+
}, [clientConfig, fetchAuthSession, managedAuthRequired, invalidatePrincipalWorkspaceState]);
|
|
683
|
+
useEffect(() => {
|
|
684
|
+
if (!clientConfig || !authReady) {
|
|
685
|
+
setAccessContext(null);
|
|
686
|
+
setWorkspaces([]);
|
|
687
|
+
managedSelfContextIdentityRef.current = null;
|
|
688
|
+
setManagedSelfContext(null);
|
|
689
|
+
setAccessLoading(false);
|
|
690
|
+
setAccessError(null);
|
|
691
|
+
return;
|
|
692
|
+
}
|
|
693
|
+
let cancelled = false;
|
|
694
|
+
let acceptedPrincipal = principalTransitionIdentity.current;
|
|
695
|
+
const acceptedManagedIdentity = managedAuthRequired && authSession ? managedSelfContextIdentity({
|
|
696
|
+
credentialGeneration: accessKeyVersion,
|
|
697
|
+
managedUserId: authSession.user.id
|
|
698
|
+
}) : null;
|
|
699
|
+
managedSelfContextIdentityRef.current = acceptedManagedIdentity;
|
|
700
|
+
setManagedSelfContext(null);
|
|
701
|
+
setAccessLoading(true);
|
|
702
|
+
setAccessError((current) => current?.recovering ? current : null);
|
|
703
|
+
const controller = new AbortController();
|
|
704
|
+
const readAccess = (request) => readBootstrap({
|
|
705
|
+
context: "workspace_access",
|
|
706
|
+
request,
|
|
707
|
+
signal: controller.signal,
|
|
708
|
+
isCurrent: () => ownsPrincipalTransition(principalTransitionIdentity.current, acceptedPrincipal),
|
|
709
|
+
waiting: {
|
|
710
|
+
onWaiting: (error, elapsedMs) => {
|
|
711
|
+
if (!cancelled && ownsPrincipalTransition(principalTransitionIdentity.current, acceptedPrincipal)) {
|
|
712
|
+
setAccessError(bootstrapWaitingPresentation(error, "workspace_access", elapsedMs));
|
|
713
|
+
}
|
|
714
|
+
}
|
|
715
|
+
}
|
|
716
|
+
});
|
|
717
|
+
const selfContextPromise = acceptedManagedIdentity ? loadCurrentManagedSelfContext({
|
|
718
|
+
identity: acceptedManagedIdentity,
|
|
719
|
+
currentIdentity: () => managedSelfContextIdentityRef.current,
|
|
720
|
+
request: () => readAccess(() => client.listOrganizationMemberships())
|
|
721
|
+
}) : Promise.resolve(null);
|
|
722
|
+
void Promise.all([
|
|
723
|
+
readAccess(() => client.getAccessContext()),
|
|
724
|
+
readAccess(() => client.listWorkspaces()),
|
|
725
|
+
selfContextPromise
|
|
726
|
+
]).then(([context, nextWorkspaces, nextManagedSelfContext]) => {
|
|
727
|
+
if (cancelled || !ownsPrincipalTransition(principalTransitionIdentity.current, acceptedPrincipal)) {
|
|
728
|
+
return;
|
|
729
|
+
}
|
|
730
|
+
setAccessError((current) => current?.recovering ? null : current);
|
|
731
|
+
if (acceptedManagedIdentity && nextManagedSelfContext === null) {
|
|
732
|
+
return;
|
|
733
|
+
}
|
|
734
|
+
if (nextManagedSelfContext && context.subjectId !== nextManagedSelfContext.identity.subjectId) {
|
|
735
|
+
throw new Error("managed self context did not match the authenticated subject");
|
|
736
|
+
}
|
|
737
|
+
if (accessPrincipalIdRef.current !== null && accessPrincipalIdRef.current !== context.subjectId) {
|
|
738
|
+
invalidatePrincipalWorkspaceState();
|
|
739
|
+
acceptedPrincipal = principalTransitionIdentity.current;
|
|
740
|
+
managedSelfContextIdentityRef.current = acceptedManagedIdentity;
|
|
741
|
+
}
|
|
742
|
+
accessPrincipalIdRef.current = context.subjectId;
|
|
743
|
+
claimHumanInputDraftOwner(context.subjectId);
|
|
744
|
+
setAccessContext(context);
|
|
745
|
+
setWorkspaces(nextWorkspaces);
|
|
746
|
+
setManagedSelfContext(nextManagedSelfContext);
|
|
747
|
+
}).catch((error) => {
|
|
748
|
+
if (cancelled || !ownsPrincipalTransition(principalTransitionIdentity.current, acceptedPrincipal)) {
|
|
749
|
+
return;
|
|
750
|
+
}
|
|
751
|
+
const presentation = bootstrapErrorPresentation(error, "workspace_access");
|
|
752
|
+
controller.abort();
|
|
753
|
+
setAccessContext(null);
|
|
754
|
+
setWorkspaces([]);
|
|
755
|
+
setAccessError(presentation);
|
|
756
|
+
}).finally(() => {
|
|
757
|
+
if (!cancelled && ownsPrincipalTransition(principalTransitionIdentity.current, acceptedPrincipal)) {
|
|
758
|
+
setAccessLoading(false);
|
|
759
|
+
}
|
|
760
|
+
});
|
|
761
|
+
return () => {
|
|
762
|
+
cancelled = true;
|
|
763
|
+
if (managedSelfContextIdentityRef.current === acceptedManagedIdentity) {
|
|
764
|
+
managedSelfContextIdentityRef.current = null;
|
|
765
|
+
}
|
|
766
|
+
controller.abort();
|
|
767
|
+
};
|
|
768
|
+
}, [
|
|
769
|
+
accessKeyVersion,
|
|
770
|
+
authSession,
|
|
771
|
+
clientConfig,
|
|
772
|
+
authReady,
|
|
773
|
+
client,
|
|
774
|
+
managedAuthRequired,
|
|
775
|
+
invalidatePrincipalWorkspaceState
|
|
776
|
+
]);
|
|
777
|
+
useEffect(() => {
|
|
778
|
+
if (!accessContext) return;
|
|
779
|
+
const workspaceId = /^\/workspaces\/([^/]+)/.exec(pathname)?.[1] ?? null;
|
|
780
|
+
if (!isAuthorizedWorkspaceId(workspaceId, workspaces, accessContext)) return;
|
|
781
|
+
writeLastWorkspaceId(
|
|
782
|
+
workspaceNavigationPreferenceStorageId(accessContext.subjectId),
|
|
783
|
+
workspaceId
|
|
784
|
+
);
|
|
785
|
+
const accountId = workspaces.find((workspace) => workspace.id === workspaceId)?.accountId;
|
|
786
|
+
if (accountId) {
|
|
787
|
+
writeLastWorkspaceIdForOrganization(
|
|
788
|
+
organizationWorkspacePreferenceStorageId(accessContext.subjectId),
|
|
789
|
+
accountId,
|
|
790
|
+
workspaceId
|
|
791
|
+
);
|
|
792
|
+
}
|
|
793
|
+
}, [accessContext, pathname, workspaces]);
|
|
794
|
+
useEffect(() => {
|
|
795
|
+
if (!clientConfig) return;
|
|
796
|
+
const workspaceId = /^\/workspaces\/([^/]+)/.exec(pathname)?.[1] ?? null;
|
|
797
|
+
if (!workspaceId) return;
|
|
798
|
+
const workspace = workspaces.find((candidate) => candidate.id === workspaceId);
|
|
799
|
+
if (!workspace) return;
|
|
800
|
+
const configured = resolveWorkspaceSessionDefaults(workspace.settings);
|
|
801
|
+
const nextModel = configured?.model ?? clientConfig.defaultModel;
|
|
802
|
+
const nextEffort = configured?.reasoningEffort ?? initialReasoningEffort(clientConfig);
|
|
803
|
+
const key = `${workspaceId}\0${nextModel}\0${nextEffort}`;
|
|
804
|
+
if (appliedWorkspaceSessionDefaultsKey.current === key) return;
|
|
805
|
+
appliedWorkspaceSessionDefaultsKey.current = key;
|
|
806
|
+
setModel(nextModel);
|
|
807
|
+
setReasoningEffort(nextEffort);
|
|
808
|
+
setLatencyMode("standard");
|
|
809
|
+
}, [clientConfig, pathname, workspaces]);
|
|
810
|
+
const repositoryGroups = useMemo(() => groupRepositories(githubRepos), [githubRepos]);
|
|
811
|
+
const toolMcpServers = useMemo(
|
|
812
|
+
() => mergeMcpServerOptions(selectableMcpServers(clientConfig), workspaceMcpServers),
|
|
813
|
+
[clientConfig, workspaceMcpServers]
|
|
814
|
+
);
|
|
815
|
+
const routedWorkspaceId = /^\/workspaces\/([^/]+)/.exec(pathname)?.[1] ?? null;
|
|
816
|
+
const routedWorkspace = workspaces.find((workspace) => workspace.id === routedWorkspaceId) ?? null;
|
|
817
|
+
const configuredWorkspaceToolDefaults = useMemo(
|
|
818
|
+
() => resolveWorkspaceSessionToolDefaults(routedWorkspace?.settings),
|
|
819
|
+
[routedWorkspace?.settings]
|
|
820
|
+
);
|
|
821
|
+
const workspaceDefaultToolIds = useMemo(() => {
|
|
822
|
+
const available = new Set(toolMcpServers.map((server) => server.id));
|
|
823
|
+
const configured = configuredWorkspaceToolDefaults?.mcpServerIds;
|
|
824
|
+
return configured ? [
|
|
825
|
+
.../* @__PURE__ */ new Set([
|
|
826
|
+
...configured.filter((id) => available.has(id)),
|
|
827
|
+
...configuredWorkspaceToolDefaults?.inheritConnectedMcpServers ? toolMcpServers.filter((server) => !["opengeni", "files", "docs"].includes(server.id)).map((server) => server.id) : []
|
|
828
|
+
])
|
|
829
|
+
] : toolMcpServers.map((server) => server.id);
|
|
830
|
+
}, [configuredWorkspaceToolDefaults, toolMcpServers]);
|
|
831
|
+
const lastValidResources = useRef([]);
|
|
832
|
+
const repositoryBuild = useMemo(() => {
|
|
833
|
+
try {
|
|
834
|
+
return {
|
|
835
|
+
resources: buildResources(
|
|
836
|
+
manualRepos,
|
|
837
|
+
githubRepos,
|
|
838
|
+
selectedRepoIds,
|
|
839
|
+
selectedRepoRefs,
|
|
840
|
+
personalGitHubRepositories,
|
|
841
|
+
selectedPersonalGitHubRepoIds,
|
|
842
|
+
selectedPersonalGitHubRepoRefs,
|
|
843
|
+
personalGitHubSelection?.credentialBindingId ?? null
|
|
844
|
+
),
|
|
845
|
+
error: null
|
|
846
|
+
};
|
|
847
|
+
} catch (error) {
|
|
848
|
+
return {
|
|
849
|
+
resources: lastValidResources.current,
|
|
850
|
+
error: errorMessage(error)
|
|
851
|
+
};
|
|
852
|
+
}
|
|
853
|
+
}, [
|
|
854
|
+
manualRepos,
|
|
855
|
+
githubRepos,
|
|
856
|
+
selectedRepoIds,
|
|
857
|
+
selectedRepoRefs,
|
|
858
|
+
personalGitHubRepositories,
|
|
859
|
+
selectedPersonalGitHubRepoIds,
|
|
860
|
+
selectedPersonalGitHubRepoRefs,
|
|
861
|
+
personalGitHubSelection?.credentialBindingId
|
|
862
|
+
]);
|
|
863
|
+
useEffect(() => {
|
|
864
|
+
if (!repositoryBuild.error) lastValidResources.current = repositoryBuild.resources;
|
|
865
|
+
}, [repositoryBuild]);
|
|
866
|
+
useManualRepositoryCatalogReconciliation({
|
|
867
|
+
manualRepos,
|
|
868
|
+
selectedRepoIds,
|
|
869
|
+
selectedRepoRefs,
|
|
870
|
+
repositories: githubRepos,
|
|
871
|
+
catalogReady: githubCatalogReady,
|
|
872
|
+
personalRepositories: personalGitHubRepositories,
|
|
873
|
+
selectedPersonalRepoIds: selectedPersonalGitHubRepoIds,
|
|
874
|
+
selectedPersonalRepoRefs: selectedPersonalGitHubRepoRefs,
|
|
875
|
+
setManualRepos,
|
|
876
|
+
setSelectedRepoIds,
|
|
877
|
+
setSelectedRepoRefs
|
|
878
|
+
});
|
|
879
|
+
const currentResources = repositoryBuild.resources;
|
|
880
|
+
const repositoryValidationError = repositoryBuild.error;
|
|
881
|
+
useCapabilityToolDefaults({
|
|
882
|
+
principalKey: JSON.stringify(principalTransitionIdentity.current),
|
|
883
|
+
ready: clientConfig !== null && !/^\/workspaces\/[^/]+\/sessions\/?$/.test(pathname),
|
|
884
|
+
workspaceId: routedWorkspaceId,
|
|
885
|
+
configuredIds: configuredWorkspaceToolDefaults?.mcpServerIds,
|
|
886
|
+
availableIds: toolMcpServers.map((server) => server.id),
|
|
887
|
+
defaultIds: workspaceDefaultToolIds,
|
|
888
|
+
appliedKey: appliedWorkspaceToolDefaultsKey,
|
|
889
|
+
seenIds: seenCapabilityToolIds,
|
|
890
|
+
setSelected: setSelectedCapabilityToolIds
|
|
891
|
+
});
|
|
892
|
+
async function createWorkspace(request) {
|
|
893
|
+
const acceptedTransition = workspaceTransitionIdentity.current;
|
|
894
|
+
const ownsInvocation = () => ownsTransitionInvocation(workspaceTransitionIdentity.current, acceptedTransition);
|
|
895
|
+
let created;
|
|
896
|
+
try {
|
|
897
|
+
const creation = await runCurrentTransitionInvocation({
|
|
898
|
+
isCurrent: ownsInvocation,
|
|
899
|
+
request: async () => await client.createWorkspace(request)
|
|
900
|
+
});
|
|
901
|
+
if (creation.status === "stale") return null;
|
|
902
|
+
created = creation.value;
|
|
903
|
+
} catch (error) {
|
|
904
|
+
toast.error("Failed to create workspace", {
|
|
905
|
+
description: userErrorText(error)
|
|
906
|
+
});
|
|
907
|
+
return null;
|
|
908
|
+
}
|
|
909
|
+
setWorkspaces((current) => upsertWorkspace(current, created));
|
|
910
|
+
captureProductEvent("workspace_created", {
|
|
911
|
+
$insert_id: `workspace_created:${created.id}`,
|
|
912
|
+
account_id: created.accountId,
|
|
913
|
+
workspace_id: created.id
|
|
914
|
+
});
|
|
915
|
+
try {
|
|
916
|
+
const accessRefresh = await runCurrentTransitionInvocation({
|
|
917
|
+
isCurrent: ownsInvocation,
|
|
918
|
+
request: async () => await client.getAccessContext()
|
|
919
|
+
});
|
|
920
|
+
if (accessRefresh.status === "stale") return null;
|
|
921
|
+
claimHumanInputDraftOwner(accessRefresh.value.subjectId);
|
|
922
|
+
setAccessContext(accessRefresh.value);
|
|
923
|
+
} catch {
|
|
924
|
+
toast.warning("Permissions may be out of date", {
|
|
925
|
+
description: "Reload if something looks off."
|
|
926
|
+
});
|
|
927
|
+
}
|
|
928
|
+
return created;
|
|
929
|
+
}
|
|
930
|
+
async function renameWorkspace(workspaceId, name) {
|
|
931
|
+
const acceptedTransition = captureWorkspaceInvocation(workspaceId);
|
|
932
|
+
if (!acceptedTransition) return null;
|
|
933
|
+
try {
|
|
934
|
+
const update = await runCurrentTransitionInvocation({
|
|
935
|
+
isCurrent: () => ownsWorkspaceInvocation(workspaceId, acceptedTransition),
|
|
936
|
+
request: async () => await client.updateWorkspace(workspaceId, { name })
|
|
937
|
+
});
|
|
938
|
+
if (update.status === "stale") return null;
|
|
939
|
+
setWorkspaces((current) => upsertWorkspace(current, update.value));
|
|
940
|
+
return update.value;
|
|
941
|
+
} catch (error) {
|
|
942
|
+
toast.error("Failed to rename workspace", {
|
|
943
|
+
description: userErrorText(error)
|
|
944
|
+
});
|
|
945
|
+
return null;
|
|
946
|
+
}
|
|
947
|
+
}
|
|
948
|
+
async function setWorkspaceInferenceControl(workspaceId, action) {
|
|
949
|
+
const acceptedTransition = captureWorkspaceInvocation(workspaceId);
|
|
950
|
+
if (!acceptedTransition) return false;
|
|
951
|
+
const current = workspaces.find((workspace) => workspace.id === workspaceId);
|
|
952
|
+
const update = await runCurrentTransitionInvocation({
|
|
953
|
+
isCurrent: () => ownsWorkspaceInvocation(workspaceId, acceptedTransition),
|
|
954
|
+
request: async () => await client.setWorkspaceInferenceState(workspaceId, {
|
|
955
|
+
action,
|
|
956
|
+
clientEventId: crypto.randomUUID(),
|
|
957
|
+
...current ? { expectedRevision: current.inferenceControl.revision } : {}
|
|
958
|
+
})
|
|
959
|
+
});
|
|
960
|
+
if (update.status === "stale") return false;
|
|
961
|
+
const response = update.value;
|
|
962
|
+
setWorkspaces(
|
|
963
|
+
(all) => all.map(
|
|
964
|
+
(workspace) => workspace.id === workspaceId ? {
|
|
965
|
+
...workspace,
|
|
966
|
+
inferenceControl: {
|
|
967
|
+
state: response.state,
|
|
968
|
+
revision: response.revision,
|
|
969
|
+
reason: null,
|
|
970
|
+
changedBy: null,
|
|
971
|
+
changedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
972
|
+
}
|
|
973
|
+
} : workspace
|
|
974
|
+
)
|
|
975
|
+
);
|
|
976
|
+
return true;
|
|
977
|
+
}
|
|
978
|
+
const refreshWorkspace = useCallback(
|
|
979
|
+
async (workspaceId) => {
|
|
980
|
+
const acceptedTransition = captureWorkspaceInvocation(workspaceId);
|
|
981
|
+
if (!acceptedTransition) return;
|
|
982
|
+
const refresh = await runCurrentTransitionInvocation({
|
|
983
|
+
isCurrent: () => ownsWorkspaceInvocation(workspaceId, acceptedTransition),
|
|
984
|
+
request: async () => await client.getWorkspace(workspaceId)
|
|
985
|
+
});
|
|
986
|
+
if (refresh.status === "stale") return;
|
|
987
|
+
setWorkspaces((current) => upsertWorkspace(current, refresh.value));
|
|
988
|
+
},
|
|
989
|
+
[captureWorkspaceInvocation, client, ownsWorkspaceInvocation]
|
|
990
|
+
);
|
|
991
|
+
async function updateWorkspaceSettings(workspaceId, settings) {
|
|
992
|
+
const acceptedTransition = captureWorkspaceInvocation(workspaceId);
|
|
993
|
+
if (!acceptedTransition) return null;
|
|
994
|
+
try {
|
|
995
|
+
const update = await runCurrentTransitionInvocation({
|
|
996
|
+
isCurrent: () => ownsWorkspaceInvocation(workspaceId, acceptedTransition),
|
|
997
|
+
request: async () => await client.updateWorkspaceSettings(workspaceId, settings)
|
|
998
|
+
});
|
|
999
|
+
if (update.status === "stale") return null;
|
|
1000
|
+
setWorkspaces((current) => upsertWorkspace(current, update.value));
|
|
1001
|
+
return update.value;
|
|
1002
|
+
} catch (error) {
|
|
1003
|
+
toast.error("Failed to update workspace settings", {
|
|
1004
|
+
description: userErrorText(error)
|
|
1005
|
+
});
|
|
1006
|
+
return null;
|
|
1007
|
+
}
|
|
1008
|
+
}
|
|
1009
|
+
async function setWorkspaceDefaultRig(workspaceId, rigId) {
|
|
1010
|
+
const acceptedTransition = captureWorkspaceInvocation(workspaceId);
|
|
1011
|
+
if (!acceptedTransition) return null;
|
|
1012
|
+
try {
|
|
1013
|
+
const update = await runCurrentTransitionInvocation({
|
|
1014
|
+
isCurrent: () => ownsWorkspaceInvocation(workspaceId, acceptedTransition),
|
|
1015
|
+
request: async () => await client.setWorkspaceDefaultRig(workspaceId, {
|
|
1016
|
+
rigId
|
|
1017
|
+
})
|
|
1018
|
+
});
|
|
1019
|
+
if (update.status === "stale") return null;
|
|
1020
|
+
setWorkspaces((current) => upsertWorkspace(current, update.value));
|
|
1021
|
+
return update.value;
|
|
1022
|
+
} catch (error) {
|
|
1023
|
+
toast.error("Failed to update the workspace default sandbox environment", {
|
|
1024
|
+
description: userErrorText(error)
|
|
1025
|
+
});
|
|
1026
|
+
return null;
|
|
1027
|
+
}
|
|
1028
|
+
}
|
|
1029
|
+
async function updateSessionTitle(workspaceId, sessionId, title) {
|
|
1030
|
+
const acceptedTransition = captureWorkspaceInvocation(workspaceId);
|
|
1031
|
+
if (!acceptedTransition) return null;
|
|
1032
|
+
try {
|
|
1033
|
+
const update = await runCurrentTransitionInvocation({
|
|
1034
|
+
isCurrent: () => ownsWorkspaceInvocation(workspaceId, acceptedTransition),
|
|
1035
|
+
request: async () => await client.updateSession(workspaceId, sessionId, {
|
|
1036
|
+
title
|
|
1037
|
+
})
|
|
1038
|
+
});
|
|
1039
|
+
if (update.status === "stale") return null;
|
|
1040
|
+
const updated = update.value;
|
|
1041
|
+
setSession(
|
|
1042
|
+
(current) => current && current.id === updated.id ? {
|
|
1043
|
+
...current,
|
|
1044
|
+
title: updated.title,
|
|
1045
|
+
titleSource: updated.titleSource
|
|
1046
|
+
} : current
|
|
1047
|
+
);
|
|
1048
|
+
return updated;
|
|
1049
|
+
} catch (error) {
|
|
1050
|
+
toast.error("Failed to rename session", {
|
|
1051
|
+
description: userErrorText(error)
|
|
1052
|
+
});
|
|
1053
|
+
return null;
|
|
1054
|
+
}
|
|
1055
|
+
}
|
|
1056
|
+
async function updateSessionProfile(workspaceId, sessionId, change) {
|
|
1057
|
+
const acceptedTransition = captureWorkspaceInvocation(workspaceId);
|
|
1058
|
+
if (!acceptedTransition) return null;
|
|
1059
|
+
const update = await runCurrentTransitionInvocation({
|
|
1060
|
+
isCurrent: () => ownsWorkspaceInvocation(workspaceId, acceptedTransition),
|
|
1061
|
+
request: async () => await client.updateSession(workspaceId, sessionId, change)
|
|
1062
|
+
});
|
|
1063
|
+
if (update.status === "stale") return null;
|
|
1064
|
+
const updated = update.value;
|
|
1065
|
+
setSession(
|
|
1066
|
+
(current) => current && current.id === updated.id ? {
|
|
1067
|
+
...current,
|
|
1068
|
+
title: updated.title,
|
|
1069
|
+
titleSource: updated.titleSource,
|
|
1070
|
+
description: updated.description ?? null,
|
|
1071
|
+
avatar: updated.avatar ?? null
|
|
1072
|
+
} : current
|
|
1073
|
+
);
|
|
1074
|
+
return updated;
|
|
1075
|
+
}
|
|
1076
|
+
async function updateSessionPin(workspaceId, sessionId, pinned, expectedVersion) {
|
|
1077
|
+
const acceptedTransition = captureWorkspaceInvocation(workspaceId);
|
|
1078
|
+
if (!acceptedTransition) return null;
|
|
1079
|
+
const ownsInvocation = () => ownsWorkspaceInvocation(workspaceId, acceptedTransition);
|
|
1080
|
+
const before = session;
|
|
1081
|
+
const optimisticVersion = (expectedVersion ?? before?.pinVersion ?? 0) + 1;
|
|
1082
|
+
const optimistic = before && before.id === sessionId ? {
|
|
1083
|
+
...before,
|
|
1084
|
+
pinned,
|
|
1085
|
+
pinnedAt: pinned ? (/* @__PURE__ */ new Date()).toISOString() : null,
|
|
1086
|
+
pinVersion: optimisticVersion
|
|
1087
|
+
} : null;
|
|
1088
|
+
if (optimistic) {
|
|
1089
|
+
setSession(optimistic);
|
|
1090
|
+
}
|
|
1091
|
+
try {
|
|
1092
|
+
const update = await runCurrentTransitionInvocation({
|
|
1093
|
+
isCurrent: ownsInvocation,
|
|
1094
|
+
request: async () => await client.updateSessionPin(workspaceId, sessionId, {
|
|
1095
|
+
pinned,
|
|
1096
|
+
...expectedVersion !== void 0 ? { expectedVersion } : {}
|
|
1097
|
+
})
|
|
1098
|
+
});
|
|
1099
|
+
if (update.status === "stale") return null;
|
|
1100
|
+
const updated = update.value;
|
|
1101
|
+
setSession((current) => applySessionPinProjection(current, updated));
|
|
1102
|
+
notifySessionPinChanged(workspaceId, sessionId);
|
|
1103
|
+
return updated;
|
|
1104
|
+
} catch (error) {
|
|
1105
|
+
const reconciliation = await runCurrentTransitionInvocation({
|
|
1106
|
+
isCurrent: ownsInvocation,
|
|
1107
|
+
request: async () => await client.getSession(workspaceId, sessionId, { fresh: true }).catch(() => null)
|
|
1108
|
+
});
|
|
1109
|
+
if (reconciliation.status === "stale") return null;
|
|
1110
|
+
const authoritative = reconciliation.value;
|
|
1111
|
+
if (authoritative) {
|
|
1112
|
+
setSession((current) => reconcileFailedSessionPin(current, optimistic, authoritative));
|
|
1113
|
+
notifySessionPinChanged(workspaceId, sessionId);
|
|
1114
|
+
if (Boolean(authoritative.pinned) === pinned) {
|
|
1115
|
+
return authoritative;
|
|
1116
|
+
}
|
|
1117
|
+
} else if (optimistic) {
|
|
1118
|
+
setSession(
|
|
1119
|
+
(current) => current?.id === sessionId && Boolean(current.pinned) === Boolean(optimistic.pinned) && (current.pinnedAt ?? null) === (optimistic.pinnedAt ?? null) && (current.pinVersion ?? 0) === (optimistic.pinVersion ?? 0) ? before : current
|
|
1120
|
+
);
|
|
1121
|
+
}
|
|
1122
|
+
toast.error(
|
|
1123
|
+
error instanceof OpenGeniApiError && error.status === 409 ? "Session pin changed elsewhere" : `Couldn't ${pinned ? "pin" : "unpin"} session`,
|
|
1124
|
+
{
|
|
1125
|
+
description: userErrorText(error)
|
|
1126
|
+
}
|
|
1127
|
+
);
|
|
1128
|
+
return null;
|
|
1129
|
+
}
|
|
1130
|
+
}
|
|
1131
|
+
async function deleteWorkspace(workspaceId) {
|
|
1132
|
+
const acceptedTransition = captureWorkspaceInvocation(workspaceId);
|
|
1133
|
+
if (!acceptedTransition) return false;
|
|
1134
|
+
const ownsInvocation = () => ownsWorkspaceInvocation(workspaceId, acceptedTransition);
|
|
1135
|
+
try {
|
|
1136
|
+
const deletion = await runCurrentTransitionInvocation({
|
|
1137
|
+
isCurrent: ownsInvocation,
|
|
1138
|
+
request: async () => await deleteWorkspaceWithReconciliation({
|
|
1139
|
+
deleteWorkspace: async () => await client.deleteWorkspace(workspaceId),
|
|
1140
|
+
readWorkspace: async () => await client.getWorkspace(workspaceId)
|
|
1141
|
+
})
|
|
1142
|
+
});
|
|
1143
|
+
if (deletion.status === "stale") return false;
|
|
1144
|
+
} catch (error) {
|
|
1145
|
+
toast.error("Failed to delete workspace", {
|
|
1146
|
+
description: userErrorText(error)
|
|
1147
|
+
});
|
|
1148
|
+
return false;
|
|
1149
|
+
}
|
|
1150
|
+
setWorkspaces((current) => current.filter((workspace) => workspace.id !== workspaceId));
|
|
1151
|
+
try {
|
|
1152
|
+
const accessRefresh = await runCurrentTransitionInvocation({
|
|
1153
|
+
isCurrent: ownsInvocation,
|
|
1154
|
+
request: async () => await client.getAccessContext()
|
|
1155
|
+
});
|
|
1156
|
+
if (accessRefresh.status === "stale") return false;
|
|
1157
|
+
claimHumanInputDraftOwner(accessRefresh.value.subjectId);
|
|
1158
|
+
setAccessContext(accessRefresh.value);
|
|
1159
|
+
} catch {
|
|
1160
|
+
toast.warning("Permissions may be out of date", {
|
|
1161
|
+
description: "Reload if something looks off."
|
|
1162
|
+
});
|
|
1163
|
+
}
|
|
1164
|
+
return true;
|
|
1165
|
+
}
|
|
1166
|
+
const refreshGitHub = useCallback(
|
|
1167
|
+
async (workspaceId, signal, options) => {
|
|
1168
|
+
const acceptedTransition = workspaceTransitionIdentity.current;
|
|
1169
|
+
if (!ownsWorkspaceTransition(acceptedTransition, acceptedTransition, workspaceId)) {
|
|
1170
|
+
return;
|
|
1171
|
+
}
|
|
1172
|
+
const ownsRefresh = () => ownsWorkspaceTransition(
|
|
1173
|
+
workspaceTransitionIdentity.current,
|
|
1174
|
+
acceptedTransition,
|
|
1175
|
+
workspaceId
|
|
1176
|
+
);
|
|
1177
|
+
const refreshId = githubRefreshId.current + 1;
|
|
1178
|
+
githubRefreshId.current = refreshId;
|
|
1179
|
+
githubQuietRetry.current.cancel();
|
|
1180
|
+
if (lacksWorkspacePermission(accessContextRef.current, workspaceId, "github:use")) {
|
|
1181
|
+
githubQuietRetry.current.reset();
|
|
1182
|
+
setGithubStatus(null);
|
|
1183
|
+
setGithubStatusFailed(false);
|
|
1184
|
+
setGithubRepos([]);
|
|
1185
|
+
setGithubCatalogReady(true);
|
|
1186
|
+
setRepoBusy(false);
|
|
1187
|
+
return;
|
|
1188
|
+
}
|
|
1189
|
+
setRepoBusy(true);
|
|
1190
|
+
try {
|
|
1191
|
+
const status = await client.getGitHubApp(workspaceId);
|
|
1192
|
+
if (signal?.aborted || githubRefreshId.current !== refreshId || !ownsRefresh()) {
|
|
1193
|
+
return;
|
|
1194
|
+
}
|
|
1195
|
+
setGithubStatus(status);
|
|
1196
|
+
setGithubStatusFailed(false);
|
|
1197
|
+
if (status.status === "bound") {
|
|
1198
|
+
const { repositories } = options?.sync ? await client.syncGitHubRepositories(workspaceId) : await client.listGitHubRepositories(workspaceId);
|
|
1199
|
+
if (signal?.aborted || githubRefreshId.current !== refreshId || !ownsRefresh()) {
|
|
1200
|
+
return;
|
|
1201
|
+
}
|
|
1202
|
+
setGithubRepos(repositories);
|
|
1203
|
+
setGithubCatalogReady(true);
|
|
1204
|
+
} else {
|
|
1205
|
+
setGithubRepos([]);
|
|
1206
|
+
setGithubCatalogReady(true);
|
|
1207
|
+
}
|
|
1208
|
+
githubQuietRetry.current.reset();
|
|
1209
|
+
} catch (error) {
|
|
1210
|
+
if (isAbortError(error) || signal?.aborted || githubRefreshId.current !== refreshId || !ownsRefresh()) {
|
|
1211
|
+
return;
|
|
1212
|
+
}
|
|
1213
|
+
setGithubStatusFailed(true);
|
|
1214
|
+
if (isTransientServiceFailure(error)) {
|
|
1215
|
+
githubQuietRetry.current.schedule(() => {
|
|
1216
|
+
if (!ownsRefresh() || githubRefreshId.current !== refreshId) return;
|
|
1217
|
+
void refreshGitHubRef.current(workspaceId);
|
|
1218
|
+
}, workspaceId);
|
|
1219
|
+
}
|
|
1220
|
+
if (!options?.userInitiated || isWorkspacePermissionDenied(error)) return;
|
|
1221
|
+
toast.error("GitHub status unavailable", {
|
|
1222
|
+
id: GITHUB_STATUS_TOAST_ID,
|
|
1223
|
+
description: userErrorText(error)
|
|
1224
|
+
});
|
|
1225
|
+
} finally {
|
|
1226
|
+
if (githubRefreshId.current === refreshId && ownsRefresh()) {
|
|
1227
|
+
setRepoBusy(false);
|
|
1228
|
+
}
|
|
1229
|
+
}
|
|
1230
|
+
},
|
|
1231
|
+
[client]
|
|
1232
|
+
);
|
|
1233
|
+
useInsertionEffect(() => {
|
|
1234
|
+
refreshGitHubRef.current = refreshGitHub;
|
|
1235
|
+
}, [refreshGitHub]);
|
|
1236
|
+
const refreshPersonalGitHub = useCallback(
|
|
1237
|
+
async (workspaceId, signal, options) => {
|
|
1238
|
+
const acceptedTransition = workspaceTransitionIdentity.current;
|
|
1239
|
+
if (!ownsWorkspaceTransition(acceptedTransition, acceptedTransition, workspaceId)) return;
|
|
1240
|
+
const refreshId = personalGitHubRefreshId.current + 1;
|
|
1241
|
+
personalGitHubRefreshId.current = refreshId;
|
|
1242
|
+
personalGitHubQuietRetry.current.cancel();
|
|
1243
|
+
const ownsRefresh = () => ownsWorkspaceTransition(
|
|
1244
|
+
workspaceTransitionIdentity.current,
|
|
1245
|
+
acceptedTransition,
|
|
1246
|
+
workspaceId
|
|
1247
|
+
) && personalGitHubRefreshId.current === refreshId;
|
|
1248
|
+
if (!hasWorkspacePermission(accessContextRef.current, workspaceId, "connections:read")) {
|
|
1249
|
+
setPersonalGitHubStatus(null);
|
|
1250
|
+
setPersonalGitHubRepositories([]);
|
|
1251
|
+
setPersonalGitHubSelection(null);
|
|
1252
|
+
setPersonalGitHubAuthorityCache(null);
|
|
1253
|
+
setSelectedPersonalGitHubRepoIds(/* @__PURE__ */ new Set());
|
|
1254
|
+
setSelectedPersonalGitHubRepoRefs({});
|
|
1255
|
+
setPersonalGitHubCatalogReady(true);
|
|
1256
|
+
setPersonalGitHubBusy(false);
|
|
1257
|
+
personalGitHubQuietRetry.current.reset();
|
|
1258
|
+
clearPersonalGitHubReconnectToast(personalGitHubReconnectToast.current);
|
|
1259
|
+
return;
|
|
1260
|
+
}
|
|
1261
|
+
setPersonalGitHubBusy(true);
|
|
1262
|
+
const clearPersonalCatalog = () => {
|
|
1263
|
+
setPersonalGitHubRepositories([]);
|
|
1264
|
+
setPersonalGitHubSelection(null);
|
|
1265
|
+
setSelectedPersonalGitHubRepoIds(/* @__PURE__ */ new Set());
|
|
1266
|
+
setSelectedPersonalGitHubRepoRefs({});
|
|
1267
|
+
setPersonalGitHubCatalogReady(true);
|
|
1268
|
+
personalGitHubQuietRetry.current.reset();
|
|
1269
|
+
};
|
|
1270
|
+
const showReconnectState = (status) => {
|
|
1271
|
+
const connection = status.connection;
|
|
1272
|
+
if (!status.enabled || !personalGitHubNeedsReconnect(connection)) {
|
|
1273
|
+
clearPersonalGitHubReconnectToast(personalGitHubReconnectToast.current);
|
|
1274
|
+
return false;
|
|
1275
|
+
}
|
|
1276
|
+
announcePersonalGitHubReconnect(
|
|
1277
|
+
personalGitHubReconnectToast.current,
|
|
1278
|
+
connection,
|
|
1279
|
+
() => reconnectPersonalGitHubFromToast(workspaceId, connection.id)
|
|
1280
|
+
);
|
|
1281
|
+
return true;
|
|
1282
|
+
};
|
|
1283
|
+
try {
|
|
1284
|
+
const status = await client.personalGitHubStatus(workspaceId);
|
|
1285
|
+
if (signal?.aborted || !ownsRefresh()) return;
|
|
1286
|
+
const connection = status.connection;
|
|
1287
|
+
setPersonalGitHubStatus(status);
|
|
1288
|
+
setPersonalGitHubAuthorityCache(
|
|
1289
|
+
(current) => connection && reusablePersonalGitHubAuthority(current, {
|
|
1290
|
+
connectionId: connection.id,
|
|
1291
|
+
connectionVersion: connection.version
|
|
1292
|
+
}) ? current : null
|
|
1293
|
+
);
|
|
1294
|
+
showReconnectState(status);
|
|
1295
|
+
if (!status.enabled || connection?.status !== "active") {
|
|
1296
|
+
clearPersonalCatalog();
|
|
1297
|
+
return;
|
|
1298
|
+
}
|
|
1299
|
+
const repositories = [];
|
|
1300
|
+
let cursor;
|
|
1301
|
+
let selection = null;
|
|
1302
|
+
do {
|
|
1303
|
+
const page = await client.listPersonalGitHubRepositories(workspaceId, connection.id, {
|
|
1304
|
+
...cursor ? { cursor } : {},
|
|
1305
|
+
limit: 100
|
|
1306
|
+
});
|
|
1307
|
+
repositories.push(...page.repositories);
|
|
1308
|
+
selection = page.selection;
|
|
1309
|
+
cursor = page.nextCursor ?? void 0;
|
|
1310
|
+
} while (cursor !== void 0 && repositories.length < 1e3);
|
|
1311
|
+
if (signal?.aborted || !ownsRefresh()) return;
|
|
1312
|
+
setPersonalGitHubRepositories(repositories);
|
|
1313
|
+
setPersonalGitHubSelection(selection);
|
|
1314
|
+
setPersonalGitHubAuthorityCache(
|
|
1315
|
+
(current) => selection && reusablePersonalGitHubAuthority(current, {
|
|
1316
|
+
connectionId: connection.id,
|
|
1317
|
+
connectionVersion: connection.version
|
|
1318
|
+
}) ? current : null
|
|
1319
|
+
);
|
|
1320
|
+
setSelectedPersonalGitHubRepoIds(
|
|
1321
|
+
(current) => new Set(
|
|
1322
|
+
[...current].filter(
|
|
1323
|
+
(id) => repositories.some((repo) => repo.repositoryId === id && repo.selectedAccess)
|
|
1324
|
+
)
|
|
1325
|
+
)
|
|
1326
|
+
);
|
|
1327
|
+
setPersonalGitHubCatalogReady(true);
|
|
1328
|
+
personalGitHubQuietRetry.current.reset();
|
|
1329
|
+
} catch (error) {
|
|
1330
|
+
if (signal?.aborted || !ownsRefresh() || isAbortError(error)) return;
|
|
1331
|
+
setPersonalGitHubCatalogReady(true);
|
|
1332
|
+
if (isTransientServiceFailure(error)) {
|
|
1333
|
+
personalGitHubQuietRetry.current.schedule(() => {
|
|
1334
|
+
if (!ownsRefresh()) return;
|
|
1335
|
+
void refreshPersonalGitHubRef.current(workspaceId);
|
|
1336
|
+
}, workspaceId);
|
|
1337
|
+
if (!options?.userInitiated) return;
|
|
1338
|
+
} else {
|
|
1339
|
+
const current = await client.personalGitHubStatus(workspaceId).catch(() => null);
|
|
1340
|
+
if (signal?.aborted || !ownsRefresh()) return;
|
|
1341
|
+
if (current) {
|
|
1342
|
+
setPersonalGitHubStatus(current);
|
|
1343
|
+
if (showReconnectState(current)) {
|
|
1344
|
+
clearPersonalCatalog();
|
|
1345
|
+
return;
|
|
1346
|
+
}
|
|
1347
|
+
}
|
|
1348
|
+
if (!options?.userInitiated) return;
|
|
1349
|
+
}
|
|
1350
|
+
toast.error("Your GitHub account is unavailable", {
|
|
1351
|
+
id: PERSONAL_GITHUB_STATUS_TOAST_ID,
|
|
1352
|
+
description: userErrorText(error)
|
|
1353
|
+
});
|
|
1354
|
+
} finally {
|
|
1355
|
+
if (ownsRefresh()) setPersonalGitHubBusy(false);
|
|
1356
|
+
}
|
|
1357
|
+
},
|
|
1358
|
+
[client, reconnectPersonalGitHubFromToast]
|
|
1359
|
+
);
|
|
1360
|
+
useInsertionEffect(() => {
|
|
1361
|
+
refreshPersonalGitHubRef.current = refreshPersonalGitHub;
|
|
1362
|
+
}, [refreshPersonalGitHub]);
|
|
1363
|
+
async function beginPersonalGitHubOAuth(workspaceId, reconnect, connectionId) {
|
|
1364
|
+
const reconnectAccountId = connectionId ?? personalGitHubStatus?.connection?.id;
|
|
1365
|
+
try {
|
|
1366
|
+
const attempt = await client.beginConnect(workspaceId, {
|
|
1367
|
+
providerId: "github-personal",
|
|
1368
|
+
ownership: "personal",
|
|
1369
|
+
returnUrl: hostPage.href(),
|
|
1370
|
+
idempotencyKey: crypto.randomUUID(),
|
|
1371
|
+
...reconnect && reconnectAccountId ? { reconnectAccountId } : {}
|
|
1372
|
+
});
|
|
1373
|
+
if (attempt.nextAction.type !== "authorize")
|
|
1374
|
+
throw new Error("GitHub did not return an authorization link");
|
|
1375
|
+
await markIntegrationConnectRedirect("github", "oauth", { returnsWithOutcome: false });
|
|
1376
|
+
hostPage.assign(attempt.nextAction.url);
|
|
1377
|
+
} catch (error) {
|
|
1378
|
+
toast.error("Couldn't open GitHub sign-in", {
|
|
1379
|
+
description: userErrorText(error)
|
|
1380
|
+
});
|
|
1381
|
+
}
|
|
1382
|
+
}
|
|
1383
|
+
async function disconnectPersonalGitHub(workspaceId) {
|
|
1384
|
+
const connection = personalGitHubStatus?.connection;
|
|
1385
|
+
if (!connection) return true;
|
|
1386
|
+
setPersonalGitHubBusy(true);
|
|
1387
|
+
try {
|
|
1388
|
+
const disconnect = (target) => client.disconnectPersonalGitHub(workspaceId, target.id, {
|
|
1389
|
+
expectedVersion: target.version,
|
|
1390
|
+
idempotencyKey: crypto.randomUUID()
|
|
1391
|
+
});
|
|
1392
|
+
try {
|
|
1393
|
+
await disconnect(connection);
|
|
1394
|
+
} catch (error) {
|
|
1395
|
+
if (!(error instanceof OpenGeniApiError && error.status === 409)) throw error;
|
|
1396
|
+
const current = (await client.personalGitHubStatus(workspaceId)).connection;
|
|
1397
|
+
if (current && current.status !== "revoked") await disconnect(current);
|
|
1398
|
+
}
|
|
1399
|
+
await refreshPersonalGitHub(workspaceId, void 0, { userInitiated: true });
|
|
1400
|
+
toast.success("Your GitHub account was disconnected");
|
|
1401
|
+
return true;
|
|
1402
|
+
} catch (error) {
|
|
1403
|
+
toast.error("Couldn't disconnect your GitHub account", {
|
|
1404
|
+
description: userErrorText(error)
|
|
1405
|
+
});
|
|
1406
|
+
return false;
|
|
1407
|
+
} finally {
|
|
1408
|
+
setPersonalGitHubBusy(false);
|
|
1409
|
+
}
|
|
1410
|
+
}
|
|
1411
|
+
async function savePersonalGitHubRepositories(workspaceId, repositories) {
|
|
1412
|
+
const connection = personalGitHubStatus?.connection;
|
|
1413
|
+
const selection = personalGitHubSelection;
|
|
1414
|
+
if (!connection || !selection) return false;
|
|
1415
|
+
setPersonalGitHubBusy(true);
|
|
1416
|
+
try {
|
|
1417
|
+
await client.replacePersonalGitHubRepositorySelections(workspaceId, connection.id, {
|
|
1418
|
+
expectedConnectionAuthorityGeneration: selection.connectionAuthorityGeneration,
|
|
1419
|
+
expectedSelectionGeneration: selection.selectionGeneration,
|
|
1420
|
+
idempotencyKey: crypto.randomUUID(),
|
|
1421
|
+
repositories
|
|
1422
|
+
});
|
|
1423
|
+
await refreshPersonalGitHub(workspaceId, void 0, { userInitiated: true });
|
|
1424
|
+
toast.success("GitHub repository access updated");
|
|
1425
|
+
return true;
|
|
1426
|
+
} catch (error) {
|
|
1427
|
+
toast.error("Couldn't update GitHub repository access", {
|
|
1428
|
+
description: userErrorText(error)
|
|
1429
|
+
});
|
|
1430
|
+
return false;
|
|
1431
|
+
} finally {
|
|
1432
|
+
setPersonalGitHubBusy(false);
|
|
1433
|
+
}
|
|
1434
|
+
}
|
|
1435
|
+
async function ensurePersonalGitHubAuthority(_workspaceId) {
|
|
1436
|
+
const connection = personalGitHubStatus?.connection;
|
|
1437
|
+
if (!connection?.authorityId || connection.status !== "active") {
|
|
1438
|
+
toast.error("Connect your GitHub account before selecting its repositories");
|
|
1439
|
+
return null;
|
|
1440
|
+
}
|
|
1441
|
+
const authority = { serverId: "github:personal", connectionId: connection.id };
|
|
1442
|
+
setPersonalGitHubAuthorityCache({ authority, connectionVersion: connection.version });
|
|
1443
|
+
return authority;
|
|
1444
|
+
}
|
|
1445
|
+
async function togglePersonalGitHubRepository(workspaceId, repository) {
|
|
1446
|
+
if (selectedPersonalGitHubRepoIds.has(repository.repositoryId)) {
|
|
1447
|
+
setSelectedPersonalGitHubRepoIds((current) => {
|
|
1448
|
+
const next = new Set(current);
|
|
1449
|
+
next.delete(repository.repositoryId);
|
|
1450
|
+
return next;
|
|
1451
|
+
});
|
|
1452
|
+
return;
|
|
1453
|
+
}
|
|
1454
|
+
if (!repository.selectedAccess) return;
|
|
1455
|
+
if (!await ensurePersonalGitHubAuthority(workspaceId)) return;
|
|
1456
|
+
setSelectedRepoIds(
|
|
1457
|
+
(current) => new Set(
|
|
1458
|
+
[...current].filter(
|
|
1459
|
+
(id) => githubRepos.find((candidate) => candidate.id === id)?.fullName.toLowerCase() !== repository.fullName.toLowerCase()
|
|
1460
|
+
)
|
|
1461
|
+
)
|
|
1462
|
+
);
|
|
1463
|
+
setSelectedPersonalGitHubRepoIds((current) => new Set(current).add(repository.repositoryId));
|
|
1464
|
+
setSelectedPersonalGitHubRepoRefs((current) => ({
|
|
1465
|
+
...current,
|
|
1466
|
+
[repository.repositoryId]: current[repository.repositoryId] ?? repository.defaultBranch
|
|
1467
|
+
}));
|
|
1468
|
+
}
|
|
1469
|
+
const refreshWorkspaceMcpServers = useCallback(
|
|
1470
|
+
async (workspaceId, signal) => {
|
|
1471
|
+
const refreshId = mcpRefreshId.current + 1;
|
|
1472
|
+
mcpRefreshId.current = refreshId;
|
|
1473
|
+
setWorkspaceMcpCatalogLoadedSuccessfully(false);
|
|
1474
|
+
const requestKey = `${accessKeyVersion}:${workspaceId}`;
|
|
1475
|
+
try {
|
|
1476
|
+
const result = await runCurrentWorkspaceRequest({
|
|
1477
|
+
signal,
|
|
1478
|
+
requestId: refreshId,
|
|
1479
|
+
currentRequestId: () => mcpRefreshId.current,
|
|
1480
|
+
request: async () => await Promise.all([
|
|
1481
|
+
runSingleFlight(
|
|
1482
|
+
mcpCatalogRequests.current,
|
|
1483
|
+
requestKey,
|
|
1484
|
+
async () => await client.listCapabilities(workspaceId)
|
|
1485
|
+
),
|
|
1486
|
+
client.listApiIntegrations(workspaceId)
|
|
1487
|
+
])
|
|
1488
|
+
});
|
|
1489
|
+
if (!result) {
|
|
1490
|
+
return;
|
|
1491
|
+
}
|
|
1492
|
+
const [catalog, apiIntegrations] = result;
|
|
1493
|
+
setWorkspaceMcpServers(
|
|
1494
|
+
mergeMcpServerOptions(
|
|
1495
|
+
enabledWorkspaceCapabilityMcpServers(catalog.items),
|
|
1496
|
+
installedApiIntegrationMcpServers(apiIntegrations.integrations)
|
|
1497
|
+
)
|
|
1498
|
+
);
|
|
1499
|
+
setWorkspaceCapabilityCatalog(catalog.items);
|
|
1500
|
+
setWorkspaceMemberIntegrationSetup(catalog.memberIntegrationSetup);
|
|
1501
|
+
setWorkspaceMcpCatalogLoadedSuccessfully(true);
|
|
1502
|
+
setWorkspaceMcpCatalogReady(true);
|
|
1503
|
+
} catch (error) {
|
|
1504
|
+
if (signal?.aborted || mcpRefreshId.current !== refreshId) throw error;
|
|
1505
|
+
setWorkspaceMcpCatalogLoadedSuccessfully(false);
|
|
1506
|
+
setWorkspaceMcpCatalogReady(true);
|
|
1507
|
+
throw error;
|
|
1508
|
+
}
|
|
1509
|
+
},
|
|
1510
|
+
[accessKeyVersion, client]
|
|
1511
|
+
);
|
|
1512
|
+
async function startSession(workspaceId, submission, options) {
|
|
1513
|
+
const startedOperation = beginWorkspaceOperation(
|
|
1514
|
+
workspaceOperationSequence.current,
|
|
1515
|
+
workspaceTransitionIdentity.current
|
|
1516
|
+
);
|
|
1517
|
+
workspaceOperationSequence.current = startedOperation.sequence;
|
|
1518
|
+
const operation = startedOperation.operation;
|
|
1519
|
+
activeCreateOperation.current = operation;
|
|
1520
|
+
let attempted = null;
|
|
1521
|
+
setBusy(true);
|
|
1522
|
+
try {
|
|
1523
|
+
if (repositoryValidationError) {
|
|
1524
|
+
toast.error("Fix repository details", { description: repositoryValidationError });
|
|
1525
|
+
return null;
|
|
1526
|
+
}
|
|
1527
|
+
const sessionTools = options?.sessionTools;
|
|
1528
|
+
if (!workspaceMcpCatalogReady && !sessionTools) {
|
|
1529
|
+
toast.error("Tools are still loading", {
|
|
1530
|
+
description: "Wait for the workspace tool catalog to finish loading, then try again."
|
|
1531
|
+
});
|
|
1532
|
+
return null;
|
|
1533
|
+
}
|
|
1534
|
+
const selectedTools = sessionTools ? [...sessionTools] : buildOpenGeniUiTools(submission.tools, selectedCapabilityToolIds);
|
|
1535
|
+
const includesPersonalGitHub = currentResources.some(
|
|
1536
|
+
(resource) => resource.kind === "repository" && resource.connectionType === "github_personal"
|
|
1537
|
+
);
|
|
1538
|
+
if (includesPersonalGitHub && !personalGitHubAuthority) {
|
|
1539
|
+
toast.error("Your GitHub identity is still being prepared", {
|
|
1540
|
+
description: "Select the repository again, then send when it is ready."
|
|
1541
|
+
});
|
|
1542
|
+
return null;
|
|
1543
|
+
}
|
|
1544
|
+
const effectiveSubmission = includesPersonalGitHub ? {
|
|
1545
|
+
...submission,
|
|
1546
|
+
connectionAccounts: [
|
|
1547
|
+
...(submission.connectionAccounts ?? []).filter(
|
|
1548
|
+
(authority) => authority.serverId !== "github:personal"
|
|
1549
|
+
),
|
|
1550
|
+
personalGitHubAuthority
|
|
1551
|
+
]
|
|
1552
|
+
} : submission;
|
|
1553
|
+
const freshIdempotencyKey = crypto.randomUUID();
|
|
1554
|
+
const attempt = prepareCreateSessionAttempt({
|
|
1555
|
+
pending: pendingCreateAttempt.current,
|
|
1556
|
+
client,
|
|
1557
|
+
workspaceId,
|
|
1558
|
+
freshIdempotencyKey,
|
|
1559
|
+
request: buildCreateSessionRequest({
|
|
1560
|
+
currentResources,
|
|
1561
|
+
submission: effectiveSubmission,
|
|
1562
|
+
instructions: options?.instructions,
|
|
1563
|
+
installedSkillIds: options?.installedSkillIds,
|
|
1564
|
+
bot: options?.bot,
|
|
1565
|
+
omitWorkspaceResources: options?.omitWorkspaceResources,
|
|
1566
|
+
selectedTools,
|
|
1567
|
+
newSessionDraftToolPolicy: options?.newSessionDraftToolPolicy,
|
|
1568
|
+
defaultModel: model,
|
|
1569
|
+
defaultReasoningEffort: reasoningEffort,
|
|
1570
|
+
defaultLatencyMode: latencyMode,
|
|
1571
|
+
clientEventId: crypto.randomUUID(),
|
|
1572
|
+
idempotencyKey: freshIdempotencyKey,
|
|
1573
|
+
workspaceDefaultMcpServerIds: workspaceDefaultToolIds,
|
|
1574
|
+
workspaceMcpCatalogReady,
|
|
1575
|
+
targetSandboxId: options?.targetSandboxId,
|
|
1576
|
+
workingDir: options?.workingDir,
|
|
1577
|
+
channelId: options?.channelId,
|
|
1578
|
+
expectedNewSessionDraftRevision: options?.expectedNewSessionDraftRevision,
|
|
1579
|
+
agentLearning: options?.agentLearning,
|
|
1580
|
+
startMode: options?.startMode,
|
|
1581
|
+
visibility: options?.visibility,
|
|
1582
|
+
usageLimitMicros: options?.usageLimitMicros
|
|
1583
|
+
})
|
|
1584
|
+
});
|
|
1585
|
+
attempted = attempt;
|
|
1586
|
+
pendingCreateAttempt.current = attempt.pending;
|
|
1587
|
+
const hostContext = attempt.request.startMode === "realtime" ? void 0 : hostMessageContext.current?.();
|
|
1588
|
+
const created = await createWithOpeningContext(
|
|
1589
|
+
(request) => client.createSession(workspaceId, request),
|
|
1590
|
+
attempt.request,
|
|
1591
|
+
hostContext,
|
|
1592
|
+
hostContext ? hostMessageContextTools.current?.() : void 0
|
|
1593
|
+
);
|
|
1594
|
+
if (pendingCreateAttempt.current?.idempotencyKey === attempt.pending.idempotencyKey) {
|
|
1595
|
+
pendingCreateAttempt.current = null;
|
|
1596
|
+
}
|
|
1597
|
+
if (!ownsWorkspaceOperation(
|
|
1598
|
+
activeCreateOperation.current,
|
|
1599
|
+
workspaceTransitionIdentity.current,
|
|
1600
|
+
operation,
|
|
1601
|
+
workspaceId
|
|
1602
|
+
)) {
|
|
1603
|
+
return null;
|
|
1604
|
+
}
|
|
1605
|
+
setSession(created);
|
|
1606
|
+
if (attempt.request.clientEventId && attempt.request.startMode !== "realtime") {
|
|
1607
|
+
setSessionCreationHandoff({
|
|
1608
|
+
session: created,
|
|
1609
|
+
clientEventId: attempt.request.clientEventId
|
|
1610
|
+
});
|
|
1611
|
+
} else {
|
|
1612
|
+
setSessionCreationHandoff(null);
|
|
1613
|
+
}
|
|
1614
|
+
setConnectionState("idle");
|
|
1615
|
+
captureProductEvent("session_started", {
|
|
1616
|
+
$insert_id: `session_started:${created.id}`,
|
|
1617
|
+
account_id: created.accountId,
|
|
1618
|
+
workspace_id: created.workspaceId,
|
|
1619
|
+
session_id: created.id,
|
|
1620
|
+
...attempt.request.model ? { model: attempt.request.model } : {},
|
|
1621
|
+
start_mode: options?.startMode ?? "standard"
|
|
1622
|
+
});
|
|
1623
|
+
return created;
|
|
1624
|
+
} catch (error) {
|
|
1625
|
+
const { error: problem, outcomeUnknown } = classifyCreateSessionFailure(error);
|
|
1626
|
+
if (attempted) {
|
|
1627
|
+
pendingCreateAttempt.current = retainCreateSessionAttemptAfterFailure({
|
|
1628
|
+
current: pendingCreateAttempt.current,
|
|
1629
|
+
attempted: attempted.pending,
|
|
1630
|
+
outcomeUnknown
|
|
1631
|
+
});
|
|
1632
|
+
}
|
|
1633
|
+
if (ownsWorkspaceOperation(
|
|
1634
|
+
activeCreateOperation.current,
|
|
1635
|
+
workspaceTransitionIdentity.current,
|
|
1636
|
+
operation,
|
|
1637
|
+
workspaceId
|
|
1638
|
+
)) {
|
|
1639
|
+
const handled = attempted ? options?.onFailure?.({
|
|
1640
|
+
error: problem,
|
|
1641
|
+
request: attempted.request,
|
|
1642
|
+
outcomeUnknown
|
|
1643
|
+
}) : false;
|
|
1644
|
+
if (isPaymentRequiredError(problem) && handled !== true) {
|
|
1645
|
+
const workspace = workspaces.find((candidate) => candidate.id === workspaceId);
|
|
1646
|
+
setCreditRequired({
|
|
1647
|
+
workspaceId,
|
|
1648
|
+
accountId: workspace?.accountId ?? null,
|
|
1649
|
+
code: paymentRefusalCode(problem)
|
|
1650
|
+
});
|
|
1651
|
+
} else if (handled !== true) {
|
|
1652
|
+
toast.error("Failed to start session", {
|
|
1653
|
+
description: composerSubmissionErrorMessage(t, problem)
|
|
1654
|
+
});
|
|
1655
|
+
}
|
|
1656
|
+
}
|
|
1657
|
+
return null;
|
|
1658
|
+
} finally {
|
|
1659
|
+
const settlement = settleWorkspaceOperation(activeCreateOperation.current, operation);
|
|
1660
|
+
activeCreateOperation.current = settlement.active;
|
|
1661
|
+
if (settlement.settledCurrent) {
|
|
1662
|
+
setBusy(false);
|
|
1663
|
+
}
|
|
1664
|
+
}
|
|
1665
|
+
}
|
|
1666
|
+
async function startGitHubAppManifestFlow(workspaceId) {
|
|
1667
|
+
const acceptedTransition = captureWorkspaceInvocation(workspaceId);
|
|
1668
|
+
if (!acceptedTransition) return;
|
|
1669
|
+
const started = beginWorkspaceOperation(
|
|
1670
|
+
githubManifestOperationSequence.current,
|
|
1671
|
+
acceptedTransition
|
|
1672
|
+
);
|
|
1673
|
+
githubManifestOperationSequence.current = started.sequence;
|
|
1674
|
+
const operation = started.operation;
|
|
1675
|
+
activeGitHubManifestOperation.current = operation;
|
|
1676
|
+
setGithubAppBusy(true);
|
|
1677
|
+
try {
|
|
1678
|
+
const result = await runCurrentWorkspaceOperation({
|
|
1679
|
+
activeOperation: () => activeGitHubManifestOperation.current,
|
|
1680
|
+
currentTransition: () => workspaceTransitionIdentity.current,
|
|
1681
|
+
operation,
|
|
1682
|
+
workspaceId,
|
|
1683
|
+
request: async () => await client.createGitHubAppManifest(workspaceId, {
|
|
1684
|
+
...githubOrg.trim() ? { organization: githubOrg.trim() } : {},
|
|
1685
|
+
public: false,
|
|
1686
|
+
includeCiPermissions: true
|
|
1687
|
+
})
|
|
1688
|
+
});
|
|
1689
|
+
if (result.status === "stale" || !ownsWorkspaceOperation(
|
|
1690
|
+
activeGitHubManifestOperation.current,
|
|
1691
|
+
workspaceTransitionIdentity.current,
|
|
1692
|
+
operation,
|
|
1693
|
+
workspaceId
|
|
1694
|
+
)) {
|
|
1695
|
+
return;
|
|
1696
|
+
}
|
|
1697
|
+
submitGitHubManifest(result.value.actionUrl, result.value.manifest, embedded);
|
|
1698
|
+
} catch (error) {
|
|
1699
|
+
if (ownsWorkspaceOperation(
|
|
1700
|
+
activeGitHubManifestOperation.current,
|
|
1701
|
+
workspaceTransitionIdentity.current,
|
|
1702
|
+
operation,
|
|
1703
|
+
workspaceId
|
|
1704
|
+
)) {
|
|
1705
|
+
toast.error("GitHub App setup failed", {
|
|
1706
|
+
description: userErrorText(error)
|
|
1707
|
+
});
|
|
1708
|
+
}
|
|
1709
|
+
} finally {
|
|
1710
|
+
const settlement = settleWorkspaceOperation(activeGitHubManifestOperation.current, operation);
|
|
1711
|
+
activeGitHubManifestOperation.current = settlement.active;
|
|
1712
|
+
if (settlement.settledCurrent) {
|
|
1713
|
+
setGithubAppBusy(false);
|
|
1714
|
+
}
|
|
1715
|
+
}
|
|
1716
|
+
}
|
|
1717
|
+
async function disconnectGitHubInstallation(workspaceId, installationId) {
|
|
1718
|
+
const acceptedTransition = captureWorkspaceInvocation(workspaceId);
|
|
1719
|
+
if (!acceptedTransition) return false;
|
|
1720
|
+
const started = beginWorkspaceOperation(
|
|
1721
|
+
githubDisconnectOperationSequence.current,
|
|
1722
|
+
acceptedTransition
|
|
1723
|
+
);
|
|
1724
|
+
githubDisconnectOperationSequence.current = started.sequence;
|
|
1725
|
+
const operation = started.operation;
|
|
1726
|
+
activeGitHubDisconnectOperation.current = operation;
|
|
1727
|
+
const previousStatus = githubStatus;
|
|
1728
|
+
const previousRepositories = githubRepos;
|
|
1729
|
+
const previousSelectedIds = selectedRepoIds;
|
|
1730
|
+
const previousSelectedRefs = selectedRepoRefs;
|
|
1731
|
+
const removedRepositoryIds = new Set(
|
|
1732
|
+
githubRepos.filter((repository) => repository.installationId === installationId).map((repository) => repository.id)
|
|
1733
|
+
);
|
|
1734
|
+
setGithubRepos(
|
|
1735
|
+
(current) => current.filter((repository) => repository.installationId !== installationId)
|
|
1736
|
+
);
|
|
1737
|
+
setGithubStatus(
|
|
1738
|
+
(current) => current ? {
|
|
1739
|
+
...current,
|
|
1740
|
+
installations: current.installations.filter(
|
|
1741
|
+
(installation) => installation.installationId !== installationId
|
|
1742
|
+
)
|
|
1743
|
+
} : current
|
|
1744
|
+
);
|
|
1745
|
+
setSelectedRepoIds(
|
|
1746
|
+
(current) => new Set([...current].filter((repositoryId) => !removedRepositoryIds.has(repositoryId)))
|
|
1747
|
+
);
|
|
1748
|
+
setSelectedRepoRefs(
|
|
1749
|
+
(current) => Object.fromEntries(
|
|
1750
|
+
Object.entries(current).filter(
|
|
1751
|
+
([repositoryId]) => !removedRepositoryIds.has(Number(repositoryId))
|
|
1752
|
+
)
|
|
1753
|
+
)
|
|
1754
|
+
);
|
|
1755
|
+
try {
|
|
1756
|
+
const unlink = await runCurrentWorkspaceOperation({
|
|
1757
|
+
activeOperation: () => activeGitHubDisconnectOperation.current,
|
|
1758
|
+
currentTransition: () => workspaceTransitionIdentity.current,
|
|
1759
|
+
operation,
|
|
1760
|
+
workspaceId,
|
|
1761
|
+
request: async () => await unlinkGitHubInstallationWithReconciliation({
|
|
1762
|
+
installationId,
|
|
1763
|
+
unlink: async () => await client.unlinkGitHubInstallation(workspaceId, installationId),
|
|
1764
|
+
readStatus: async () => await client.getGitHubApp(workspaceId)
|
|
1765
|
+
})
|
|
1766
|
+
});
|
|
1767
|
+
if (unlink.status === "stale" || !ownsWorkspaceOperation(
|
|
1768
|
+
activeGitHubDisconnectOperation.current,
|
|
1769
|
+
workspaceTransitionIdentity.current,
|
|
1770
|
+
operation,
|
|
1771
|
+
workspaceId
|
|
1772
|
+
)) {
|
|
1773
|
+
return false;
|
|
1774
|
+
}
|
|
1775
|
+
await refreshGitHub(workspaceId, void 0, { sync: true, userInitiated: true });
|
|
1776
|
+
if (!ownsWorkspaceOperation(
|
|
1777
|
+
activeGitHubDisconnectOperation.current,
|
|
1778
|
+
workspaceTransitionIdentity.current,
|
|
1779
|
+
operation,
|
|
1780
|
+
workspaceId
|
|
1781
|
+
)) {
|
|
1782
|
+
return false;
|
|
1783
|
+
}
|
|
1784
|
+
toast.success("GitHub installation unlinked from this workspace");
|
|
1785
|
+
return true;
|
|
1786
|
+
} catch (error) {
|
|
1787
|
+
if (ownsWorkspaceOperation(
|
|
1788
|
+
activeGitHubDisconnectOperation.current,
|
|
1789
|
+
workspaceTransitionIdentity.current,
|
|
1790
|
+
operation,
|
|
1791
|
+
workspaceId
|
|
1792
|
+
)) {
|
|
1793
|
+
setGithubStatus(previousStatus);
|
|
1794
|
+
setGithubRepos(previousRepositories);
|
|
1795
|
+
setSelectedRepoIds(previousSelectedIds);
|
|
1796
|
+
setSelectedRepoRefs(previousSelectedRefs);
|
|
1797
|
+
toast.error("Failed to unlink GitHub installation", {
|
|
1798
|
+
description: userErrorText(error)
|
|
1799
|
+
});
|
|
1800
|
+
}
|
|
1801
|
+
return false;
|
|
1802
|
+
} finally {
|
|
1803
|
+
const settlement = settleWorkspaceOperation(
|
|
1804
|
+
activeGitHubDisconnectOperation.current,
|
|
1805
|
+
operation
|
|
1806
|
+
);
|
|
1807
|
+
activeGitHubDisconnectOperation.current = settlement.active;
|
|
1808
|
+
}
|
|
1809
|
+
}
|
|
1810
|
+
function toggleGitHubRepository(repo) {
|
|
1811
|
+
setSelectedRepoIds((current) => {
|
|
1812
|
+
const next = new Set(current);
|
|
1813
|
+
if (next.has(repo.id)) {
|
|
1814
|
+
next.delete(repo.id);
|
|
1815
|
+
} else {
|
|
1816
|
+
next.add(repo.id);
|
|
1817
|
+
}
|
|
1818
|
+
return next;
|
|
1819
|
+
});
|
|
1820
|
+
if (!selectedRepoIds.has(repo.id)) {
|
|
1821
|
+
const personal = personalGitHubRepositories.find(
|
|
1822
|
+
(candidate) => candidate.fullName.toLowerCase() === repo.fullName.toLowerCase()
|
|
1823
|
+
);
|
|
1824
|
+
if (personal) {
|
|
1825
|
+
setSelectedPersonalGitHubRepoIds((current) => {
|
|
1826
|
+
const next = new Set(current);
|
|
1827
|
+
next.delete(personal.repositoryId);
|
|
1828
|
+
return next;
|
|
1829
|
+
});
|
|
1830
|
+
}
|
|
1831
|
+
}
|
|
1832
|
+
setSelectedRepoRefs((current) => ({
|
|
1833
|
+
...current,
|
|
1834
|
+
[repo.id]: current[repo.id] ?? repo.defaultBranch
|
|
1835
|
+
}));
|
|
1836
|
+
}
|
|
1837
|
+
function addManualRepository() {
|
|
1838
|
+
setManualRepos((current) => [
|
|
1839
|
+
...current,
|
|
1840
|
+
{ id: nextRepoId, url: "", ref: "main", attached: false }
|
|
1841
|
+
]);
|
|
1842
|
+
setNextRepoId((value) => value + 1);
|
|
1843
|
+
setManualReposOpen(true);
|
|
1844
|
+
}
|
|
1845
|
+
function saveAccessKey() {
|
|
1846
|
+
const key = accessKeyDraft.trim();
|
|
1847
|
+
if (!key) {
|
|
1848
|
+
toast.error("Enter an access key");
|
|
1849
|
+
return;
|
|
1850
|
+
}
|
|
1851
|
+
invalidatePrincipalWorkspaceState();
|
|
1852
|
+
setStoredAccessKey(key);
|
|
1853
|
+
setHasAccessKey(true);
|
|
1854
|
+
setAccessKeyDraft("");
|
|
1855
|
+
setAccessError(null);
|
|
1856
|
+
setAccessKeyVersion((version) => version + 1);
|
|
1857
|
+
}
|
|
1858
|
+
function forgetAccessKey() {
|
|
1859
|
+
invalidatePrincipalWorkspaceState();
|
|
1860
|
+
clearStoredAccessKey();
|
|
1861
|
+
setHasAccessKey(false);
|
|
1862
|
+
setSession(null);
|
|
1863
|
+
setAccessContext(null);
|
|
1864
|
+
setWorkspaces([]);
|
|
1865
|
+
setAccessError(null);
|
|
1866
|
+
setAccessKeyVersion((version) => version + 1);
|
|
1867
|
+
}
|
|
1868
|
+
async function handleManagedAuth(mode, input) {
|
|
1869
|
+
invalidatePrincipalWorkspaceState({
|
|
1870
|
+
preservePendingSlackLink: preserveSlackLinkForManagedAuth(mode, slackLink.phase())
|
|
1871
|
+
});
|
|
1872
|
+
const acceptedPrincipal = principalTransitionIdentity.current;
|
|
1873
|
+
const ownsInvocation = () => ownsPrincipalTransition(principalTransitionIdentity.current, acceptedPrincipal);
|
|
1874
|
+
if (mode === "signup") {
|
|
1875
|
+
const signup = await runCurrentTransitionInvocation({
|
|
1876
|
+
isCurrent: ownsInvocation,
|
|
1877
|
+
request: async () => await signUpEmail(input)
|
|
1878
|
+
});
|
|
1879
|
+
if (signup.status === "stale") return;
|
|
1880
|
+
captureProductEvent("signup_submitted", {
|
|
1881
|
+
method: "email",
|
|
1882
|
+
verification_required: managedEmailVerificationRequired
|
|
1883
|
+
});
|
|
1884
|
+
} else {
|
|
1885
|
+
const signin = await runCurrentTransitionInvocation({
|
|
1886
|
+
isCurrent: ownsInvocation,
|
|
1887
|
+
request: async () => await signInEmail({
|
|
1888
|
+
email: input.email,
|
|
1889
|
+
password: input.password,
|
|
1890
|
+
rememberMe: true
|
|
1891
|
+
})
|
|
1892
|
+
});
|
|
1893
|
+
if (signin.status === "stale") return;
|
|
1894
|
+
}
|
|
1895
|
+
const sessionRead = await runCurrentTransitionInvocation({
|
|
1896
|
+
isCurrent: ownsInvocation,
|
|
1897
|
+
request: fetchAuthSession
|
|
1898
|
+
});
|
|
1899
|
+
if (sessionRead.status === "stale") return;
|
|
1900
|
+
const nextSession = sessionRead.value;
|
|
1901
|
+
if (!nextSession && !(mode === "signup" && managedEmailVerificationRequired)) {
|
|
1902
|
+
throw new ManagedAuthSessionUnavailableError(mode);
|
|
1903
|
+
}
|
|
1904
|
+
authPrincipalIdRef.current = nextSession?.user.id ?? null;
|
|
1905
|
+
if (mode === "signin" && nextSession) noteSuccessfulLogin(nextSession.user.id, "email");
|
|
1906
|
+
setAuthSession(nextSession);
|
|
1907
|
+
setAccessKeyVersion((version) => version + 1);
|
|
1908
|
+
}
|
|
1909
|
+
async function handleManagedSessionSetSignup(input) {
|
|
1910
|
+
invalidatePrincipalWorkspaceState();
|
|
1911
|
+
const acceptedPrincipal = principalTransitionIdentity.current;
|
|
1912
|
+
const signup = await runCurrentTransitionInvocation({
|
|
1913
|
+
isCurrent: () => ownsPrincipalTransition(principalTransitionIdentity.current, acceptedPrincipal),
|
|
1914
|
+
request: async () => await signUpEmail(input)
|
|
1915
|
+
});
|
|
1916
|
+
if (signup.status === "stale") return;
|
|
1917
|
+
captureProductEvent("signup_submitted", {
|
|
1918
|
+
method: "email",
|
|
1919
|
+
verification_required: managedEmailVerificationRequired
|
|
1920
|
+
});
|
|
1921
|
+
}
|
|
1922
|
+
async function handleManagedSocialAuth(provider, signupChallengeToken) {
|
|
1923
|
+
invalidatePrincipalWorkspaceState({
|
|
1924
|
+
preservePendingSlackLink: preserveSlackLinkForManagedAuth("signin", slackLink.phase())
|
|
1925
|
+
});
|
|
1926
|
+
beginSocialLoginAnalytics(provider);
|
|
1927
|
+
await startManagedSocialSignIn(provider, signupChallengeToken);
|
|
1928
|
+
}
|
|
1929
|
+
async function handleManagedPasskeyAuth(mode, input) {
|
|
1930
|
+
if (!signInPasskey || mode === "signup" && (!signUpPasskey || !input)) {
|
|
1931
|
+
throw new Error("Passkeys aren't available here");
|
|
1932
|
+
}
|
|
1933
|
+
invalidatePrincipalWorkspaceState({
|
|
1934
|
+
preservePendingSlackLink: preserveSlackLinkForManagedAuth(mode, slackLink.phase())
|
|
1935
|
+
});
|
|
1936
|
+
const acceptedPrincipal = principalTransitionIdentity.current;
|
|
1937
|
+
const ownsInvocation = () => ownsPrincipalTransition(principalTransitionIdentity.current, acceptedPrincipal);
|
|
1938
|
+
const ceremony = await runCurrentTransitionInvocation({
|
|
1939
|
+
isCurrent: ownsInvocation,
|
|
1940
|
+
request: async () => mode === "signup" ? await signUpPasskey(input) : await signInPasskey()
|
|
1941
|
+
});
|
|
1942
|
+
if (ceremony.status === "stale") return;
|
|
1943
|
+
if (mode === "signup") {
|
|
1944
|
+
captureProductEvent("signup_submitted", { method: "passkey", verification_required: false });
|
|
1945
|
+
}
|
|
1946
|
+
const sessionRead = await runCurrentTransitionInvocation({
|
|
1947
|
+
isCurrent: ownsInvocation,
|
|
1948
|
+
request: fetchAuthSession
|
|
1949
|
+
});
|
|
1950
|
+
if (sessionRead.status === "stale") return;
|
|
1951
|
+
const nextSession = sessionRead.value;
|
|
1952
|
+
if (!nextSession) throw new ManagedAuthSessionUnavailableError(mode);
|
|
1953
|
+
authPrincipalIdRef.current = nextSession.user.id;
|
|
1954
|
+
if (mode === "signin") noteSuccessfulLogin(nextSession.user.id, "passkey");
|
|
1955
|
+
else captureProductEvent("signup_completed", { method: "passkey", is_new_user: true });
|
|
1956
|
+
setAuthSession(nextSession);
|
|
1957
|
+
setAccessKeyVersion((version) => version + 1);
|
|
1958
|
+
}
|
|
1959
|
+
async function handleManagedSignOut() {
|
|
1960
|
+
flushSync(() => {
|
|
1961
|
+
invalidatePrincipalWorkspaceState();
|
|
1962
|
+
setAuthSession(void 0);
|
|
1963
|
+
setAccessContext(null);
|
|
1964
|
+
setWorkspaces([]);
|
|
1965
|
+
setAccessError(null);
|
|
1966
|
+
});
|
|
1967
|
+
forgetAllHumanInputDrafts();
|
|
1968
|
+
const acceptedPrincipal = principalTransitionIdentity.current;
|
|
1969
|
+
const ownsInvocation = () => ownsPrincipalTransition(principalTransitionIdentity.current, acceptedPrincipal);
|
|
1970
|
+
const reconciliation = await runCurrentTransitionInvocation({
|
|
1971
|
+
isCurrent: ownsInvocation,
|
|
1972
|
+
request: async () => await signOutWithAuthoritativeReconciliation({
|
|
1973
|
+
signOut: signOutManaged,
|
|
1974
|
+
readSession: fetchAuthSession
|
|
1975
|
+
})
|
|
1976
|
+
});
|
|
1977
|
+
if (reconciliation.status === "stale") return;
|
|
1978
|
+
const result = reconciliation.value;
|
|
1979
|
+
authPrincipalIdRef.current = result.session?.user.id ?? null;
|
|
1980
|
+
setAuthSession(result.session);
|
|
1981
|
+
setAccessKeyVersion((version) => version + 1);
|
|
1982
|
+
if (result.status === "reconciled_failure") {
|
|
1983
|
+
throw result.error;
|
|
1984
|
+
}
|
|
1985
|
+
setSession(null);
|
|
1986
|
+
await navigate({ to: "/", replace: true });
|
|
1987
|
+
}
|
|
1988
|
+
async function handleBrowserActorTransition(transition) {
|
|
1989
|
+
flushSync(() => {
|
|
1990
|
+
invalidatePrincipalWorkspaceState();
|
|
1991
|
+
setAuthSession(void 0);
|
|
1992
|
+
setAccessContext(null);
|
|
1993
|
+
setWorkspaces([]);
|
|
1994
|
+
setAccessError(null);
|
|
1995
|
+
});
|
|
1996
|
+
configureManagedActorEpoch(transition.to?.actorEpoch ?? null);
|
|
1997
|
+
flushSync(() => {
|
|
1998
|
+
setAccessKeyVersion((version) => version + 1);
|
|
1999
|
+
});
|
|
2000
|
+
if (transition.to === null) return;
|
|
2001
|
+
if (transition.to.selectedSlotId === null || transition.to.state !== "ready") {
|
|
2002
|
+
authPrincipalIdRef.current = null;
|
|
2003
|
+
setAuthSession(null);
|
|
2004
|
+
setSession(null);
|
|
2005
|
+
await navigate({ to: "/", replace: true });
|
|
2006
|
+
return;
|
|
2007
|
+
}
|
|
2008
|
+
const acceptedPrincipal = principalTransitionIdentity.current;
|
|
2009
|
+
const ownsInvocation = () => !transition.signal.aborted && ownsPrincipalTransition(principalTransitionIdentity.current, acceptedPrincipal);
|
|
2010
|
+
try {
|
|
2011
|
+
const sessionRead = await runCurrentTransitionInvocation({
|
|
2012
|
+
isCurrent: ownsInvocation,
|
|
2013
|
+
request: fetchAuthSession
|
|
2014
|
+
});
|
|
2015
|
+
if (sessionRead.status === "stale") return;
|
|
2016
|
+
const nextSession = sessionRead.value;
|
|
2017
|
+
authPrincipalIdRef.current = nextSession?.user.id ?? null;
|
|
2018
|
+
setAuthSession(nextSession);
|
|
2019
|
+
} catch (error) {
|
|
2020
|
+
if (ownsInvocation()) setAuthSession(null);
|
|
2021
|
+
throw error;
|
|
2022
|
+
}
|
|
2023
|
+
}
|
|
2024
|
+
const contextAddManualRepository = useLatestCallback(addManualRepository);
|
|
2025
|
+
const contextForgetAccessKey = useLatestCallback(forgetAccessKey);
|
|
2026
|
+
const contextHandleManagedSignOut = useLatestCallback(handleManagedSignOut);
|
|
2027
|
+
const contextHandleBrowserActorTransition = useLatestCallback(handleBrowserActorTransition);
|
|
2028
|
+
const revalidatePrincipalAccess = useCallback(
|
|
2029
|
+
() => setAccessKeyVersion((version) => version + 1),
|
|
2030
|
+
[]
|
|
2031
|
+
);
|
|
2032
|
+
const completeOrganizationOnboarding = useCallback(
|
|
2033
|
+
async (destination) => {
|
|
2034
|
+
const arrived = destination?.sessionId ? navigate({
|
|
2035
|
+
to: "/workspaces/$workspaceId/sessions/$sessionId",
|
|
2036
|
+
params: { workspaceId: destination.workspaceId, sessionId: destination.sessionId }
|
|
2037
|
+
}) : destination ? navigate({
|
|
2038
|
+
to: "/workspaces/$workspaceId/sessions",
|
|
2039
|
+
params: { workspaceId: destination.workspaceId }
|
|
2040
|
+
}) : null;
|
|
2041
|
+
revalidatePrincipalAccess();
|
|
2042
|
+
await arrived;
|
|
2043
|
+
},
|
|
2044
|
+
[navigate, revalidatePrincipalAccess]
|
|
2045
|
+
);
|
|
2046
|
+
async function refreshPrincipalAccess() {
|
|
2047
|
+
if (!clientConfig || !authReady) return false;
|
|
2048
|
+
let acceptedPrincipal = principalTransitionIdentity.current;
|
|
2049
|
+
const acceptedManagedIdentity = clientConfig.auth.mode === "managedSession" && authSession ? managedSelfContextIdentity({
|
|
2050
|
+
credentialGeneration: accessKeyVersion,
|
|
2051
|
+
managedUserId: authSession.user.id
|
|
2052
|
+
}) : null;
|
|
2053
|
+
managedSelfContextIdentityRef.current = acceptedManagedIdentity;
|
|
2054
|
+
const selfContextPromise = acceptedManagedIdentity ? loadCurrentManagedSelfContext({
|
|
2055
|
+
identity: acceptedManagedIdentity,
|
|
2056
|
+
currentIdentity: () => managedSelfContextIdentityRef.current,
|
|
2057
|
+
request: () => client.listOrganizationMemberships()
|
|
2058
|
+
}) : Promise.resolve(null);
|
|
2059
|
+
const [nextAccessContext, nextWorkspaces, nextManagedSelfContext] = await Promise.all([
|
|
2060
|
+
client.getAccessContext(),
|
|
2061
|
+
client.listWorkspaces(),
|
|
2062
|
+
selfContextPromise
|
|
2063
|
+
]);
|
|
2064
|
+
if (!ownsPrincipalTransition(principalTransitionIdentity.current, acceptedPrincipal)) {
|
|
2065
|
+
return false;
|
|
2066
|
+
}
|
|
2067
|
+
if (acceptedManagedIdentity && nextManagedSelfContext === null) return false;
|
|
2068
|
+
if (nextManagedSelfContext && nextAccessContext.subjectId !== nextManagedSelfContext.identity.subjectId) {
|
|
2069
|
+
throw new Error("managed self context did not match the authenticated subject");
|
|
2070
|
+
}
|
|
2071
|
+
if (accessPrincipalIdRef.current !== null && accessPrincipalIdRef.current !== nextAccessContext.subjectId) {
|
|
2072
|
+
invalidatePrincipalWorkspaceState();
|
|
2073
|
+
acceptedPrincipal = principalTransitionIdentity.current;
|
|
2074
|
+
managedSelfContextIdentityRef.current = acceptedManagedIdentity;
|
|
2075
|
+
}
|
|
2076
|
+
if (!ownsPrincipalTransition(principalTransitionIdentity.current, acceptedPrincipal)) {
|
|
2077
|
+
return false;
|
|
2078
|
+
}
|
|
2079
|
+
accessPrincipalIdRef.current = nextAccessContext.subjectId;
|
|
2080
|
+
claimHumanInputDraftOwner(nextAccessContext.subjectId);
|
|
2081
|
+
setAccessContext(nextAccessContext);
|
|
2082
|
+
setWorkspaces(nextWorkspaces);
|
|
2083
|
+
setManagedSelfContext(nextManagedSelfContext);
|
|
2084
|
+
return true;
|
|
2085
|
+
}
|
|
2086
|
+
const contextRefreshPrincipalAccess = useLatestCallback(refreshPrincipalAccess);
|
|
2087
|
+
const contextCreateWorkspace = useLatestCallback(createWorkspace);
|
|
2088
|
+
const contextRenameWorkspace = useLatestCallback(renameWorkspace);
|
|
2089
|
+
const contextSetWorkspaceInferenceControl = useLatestCallback(setWorkspaceInferenceControl);
|
|
2090
|
+
const contextUpdateWorkspaceSettings = useLatestCallback(updateWorkspaceSettings);
|
|
2091
|
+
const contextSetWorkspaceDefaultRig = useLatestCallback(setWorkspaceDefaultRig);
|
|
2092
|
+
const contextUpdateSessionTitle = useLatestCallback(updateSessionTitle);
|
|
2093
|
+
const contextUpdateSessionProfile = useLatestCallback(updateSessionProfile);
|
|
2094
|
+
const contextUpdateSessionPin = useLatestCallback(updateSessionPin);
|
|
2095
|
+
const contextDeleteWorkspace = useLatestCallback(deleteWorkspace);
|
|
2096
|
+
const contextStartGitHubAppManifestFlow = useLatestCallback(startGitHubAppManifestFlow);
|
|
2097
|
+
const contextDisconnectGitHubInstallation = useLatestCallback(disconnectGitHubInstallation);
|
|
2098
|
+
const contextToggleGitHubRepository = useLatestCallback(toggleGitHubRepository);
|
|
2099
|
+
const contextConnectPersonalGitHub = useLatestCallback(
|
|
2100
|
+
(workspaceId) => beginPersonalGitHubOAuth(workspaceId, false)
|
|
2101
|
+
);
|
|
2102
|
+
const contextReconnectPersonalGitHub = useLatestCallback(
|
|
2103
|
+
(workspaceId) => beginPersonalGitHubOAuth(workspaceId, true)
|
|
2104
|
+
);
|
|
2105
|
+
const contextDisconnectPersonalGitHub = useLatestCallback(disconnectPersonalGitHub);
|
|
2106
|
+
const contextSavePersonalGitHubRepositories = useLatestCallback(savePersonalGitHubRepositories);
|
|
2107
|
+
const contextEnsurePersonalGitHubAuthority = useLatestCallback(ensurePersonalGitHubAuthority);
|
|
2108
|
+
const contextTogglePersonalGitHubRepository = useLatestCallback(togglePersonalGitHubRepository);
|
|
2109
|
+
const contextStartSession = useLatestCallback(startSession);
|
|
2110
|
+
const preparePendingSlackLink = useCallback(
|
|
2111
|
+
async (workspaceId) => await slackLink.prepare(
|
|
2112
|
+
workspaceId,
|
|
2113
|
+
async (token) => await client.prepareSlackUserLinkAccess(workspaceId, {
|
|
2114
|
+
linkToken: token
|
|
2115
|
+
})
|
|
2116
|
+
),
|
|
2117
|
+
[client, slackLink]
|
|
2118
|
+
);
|
|
2119
|
+
const clearSlackLinkContinuation = useCallback(() => {
|
|
2120
|
+
slackLink.clear();
|
|
2121
|
+
setSlackLinkContinuationWorkspaceId(null);
|
|
2122
|
+
}, [slackLink]);
|
|
2123
|
+
const appContext = useMemo(() => {
|
|
2124
|
+
return clientConfig && accessContext ? {
|
|
2125
|
+
client,
|
|
2126
|
+
clientConfig: withWorkspaceClientConfig(clientConfig, workspaceConfig),
|
|
2127
|
+
refreshWorkspaceConfig,
|
|
2128
|
+
authSession: authSession ?? null,
|
|
2129
|
+
accessContext,
|
|
2130
|
+
workspaces,
|
|
2131
|
+
managedSelfContext,
|
|
2132
|
+
slackLinkContinuationWorkspaceId,
|
|
2133
|
+
invalidSlackLinkQueryWorkspaceId,
|
|
2134
|
+
preparePendingSlackLink,
|
|
2135
|
+
clearSlackLinkContinuation,
|
|
2136
|
+
accessKeyVersion,
|
|
2137
|
+
keyAuthRequired: keyAuthRequired === true,
|
|
2138
|
+
model,
|
|
2139
|
+
setModel,
|
|
2140
|
+
reasoningEffort,
|
|
2141
|
+
setReasoningEffort,
|
|
2142
|
+
latencyMode,
|
|
2143
|
+
setLatencyMode,
|
|
2144
|
+
inspectorOpen,
|
|
2145
|
+
setInspectorOpen,
|
|
2146
|
+
session,
|
|
2147
|
+
setSession,
|
|
2148
|
+
sessionChannelProjectionAuthority,
|
|
2149
|
+
sessionCreationHandoff,
|
|
2150
|
+
connectionState,
|
|
2151
|
+
setConnectionState,
|
|
2152
|
+
sessionEventFeedStore,
|
|
2153
|
+
manualRepos,
|
|
2154
|
+
setManualRepos,
|
|
2155
|
+
manualReposOpen,
|
|
2156
|
+
setManualReposOpen,
|
|
2157
|
+
selectedRepoIds,
|
|
2158
|
+
setSelectedRepoIds,
|
|
2159
|
+
selectedRepoRefs,
|
|
2160
|
+
setSelectedRepoRefs,
|
|
2161
|
+
githubRepos,
|
|
2162
|
+
githubStatus,
|
|
2163
|
+
githubStatusFailed,
|
|
2164
|
+
githubCatalogReady,
|
|
2165
|
+
personalGitHubStatus,
|
|
2166
|
+
personalGitHubRepositories,
|
|
2167
|
+
personalGitHubSelection,
|
|
2168
|
+
personalGitHubCatalogReady,
|
|
2169
|
+
personalGitHubBusy,
|
|
2170
|
+
selectedPersonalGitHubRepoIds,
|
|
2171
|
+
setSelectedPersonalGitHubRepoIds,
|
|
2172
|
+
selectedPersonalGitHubRepoRefs,
|
|
2173
|
+
setSelectedPersonalGitHubRepoRefs,
|
|
2174
|
+
personalGitHubAuthority,
|
|
2175
|
+
githubOrg,
|
|
2176
|
+
setGithubOrg,
|
|
2177
|
+
selectedCapabilityToolIds,
|
|
2178
|
+
setSelectedCapabilityToolIds,
|
|
2179
|
+
busy,
|
|
2180
|
+
repoBusy,
|
|
2181
|
+
githubAppBusy,
|
|
2182
|
+
repositoryGroups,
|
|
2183
|
+
toolMcpServers,
|
|
2184
|
+
workspaceDefaultToolIds,
|
|
2185
|
+
workspaceMcpCatalogReady,
|
|
2186
|
+
workspaceMcpCatalogLoadedSuccessfully,
|
|
2187
|
+
workspaceCapabilityCatalog,
|
|
2188
|
+
workspaceMemberIntegrationSetup,
|
|
2189
|
+
currentResources,
|
|
2190
|
+
repositoryValidationError,
|
|
2191
|
+
workspaceStateOwnerId,
|
|
2192
|
+
prepareWorkspaceTransition,
|
|
2193
|
+
captureWorkspaceInvocation,
|
|
2194
|
+
ownsWorkspaceInvocation,
|
|
2195
|
+
addManualRepository: contextAddManualRepository,
|
|
2196
|
+
forgetAccessKey: contextForgetAccessKey,
|
|
2197
|
+
handleManagedSignOut: contextHandleManagedSignOut,
|
|
2198
|
+
revalidatePrincipalAccess,
|
|
2199
|
+
refreshPrincipalAccess: contextRefreshPrincipalAccess,
|
|
2200
|
+
createWorkspace: contextCreateWorkspace,
|
|
2201
|
+
renameWorkspace: contextRenameWorkspace,
|
|
2202
|
+
setWorkspaceInferenceControl: contextSetWorkspaceInferenceControl,
|
|
2203
|
+
refreshWorkspace,
|
|
2204
|
+
updateWorkspaceSettings: contextUpdateWorkspaceSettings,
|
|
2205
|
+
setWorkspaceDefaultRig: contextSetWorkspaceDefaultRig,
|
|
2206
|
+
updateSessionTitle: contextUpdateSessionTitle,
|
|
2207
|
+
updateSessionProfile: contextUpdateSessionProfile,
|
|
2208
|
+
updateSessionPin: contextUpdateSessionPin,
|
|
2209
|
+
deleteWorkspace: contextDeleteWorkspace,
|
|
2210
|
+
refreshGitHub,
|
|
2211
|
+
refreshPersonalGitHub,
|
|
2212
|
+
connectPersonalGitHub: contextConnectPersonalGitHub,
|
|
2213
|
+
reconnectPersonalGitHub: contextReconnectPersonalGitHub,
|
|
2214
|
+
disconnectPersonalGitHub: contextDisconnectPersonalGitHub,
|
|
2215
|
+
savePersonalGitHubRepositories: contextSavePersonalGitHubRepositories,
|
|
2216
|
+
ensurePersonalGitHubAuthority: contextEnsurePersonalGitHubAuthority,
|
|
2217
|
+
togglePersonalGitHubRepository: contextTogglePersonalGitHubRepository,
|
|
2218
|
+
refreshWorkspaceMcpServers,
|
|
2219
|
+
startGitHubAppManifestFlow: contextStartGitHubAppManifestFlow,
|
|
2220
|
+
disconnectGitHubInstallation: contextDisconnectGitHubInstallation,
|
|
2221
|
+
toggleGitHubRepository: contextToggleGitHubRepository,
|
|
2222
|
+
startSession: contextStartSession,
|
|
2223
|
+
resetSessionView,
|
|
2224
|
+
resetWorkspaceIntegrations
|
|
2225
|
+
} : null;
|
|
2226
|
+
}, [
|
|
2227
|
+
accessContext,
|
|
2228
|
+
accessKeyVersion,
|
|
2229
|
+
authSession,
|
|
2230
|
+
busy,
|
|
2231
|
+
captureWorkspaceInvocation,
|
|
2232
|
+
clearSlackLinkContinuation,
|
|
2233
|
+
client,
|
|
2234
|
+
clientConfig,
|
|
2235
|
+
workspaceConfig,
|
|
2236
|
+
refreshWorkspaceConfig,
|
|
2237
|
+
connectionState,
|
|
2238
|
+
contextAddManualRepository,
|
|
2239
|
+
contextCreateWorkspace,
|
|
2240
|
+
contextDeleteWorkspace,
|
|
2241
|
+
contextConnectPersonalGitHub,
|
|
2242
|
+
contextDisconnectPersonalGitHub,
|
|
2243
|
+
contextEnsurePersonalGitHubAuthority,
|
|
2244
|
+
contextForgetAccessKey,
|
|
2245
|
+
contextHandleManagedSignOut,
|
|
2246
|
+
contextRenameWorkspace,
|
|
2247
|
+
contextReconnectPersonalGitHub,
|
|
2248
|
+
contextSavePersonalGitHubRepositories,
|
|
2249
|
+
contextSetWorkspaceInferenceControl,
|
|
2250
|
+
contextUpdateSessionProfile,
|
|
2251
|
+
contextSetWorkspaceDefaultRig,
|
|
2252
|
+
contextDisconnectGitHubInstallation,
|
|
2253
|
+
contextStartGitHubAppManifestFlow,
|
|
2254
|
+
contextStartSession,
|
|
2255
|
+
contextToggleGitHubRepository,
|
|
2256
|
+
contextTogglePersonalGitHubRepository,
|
|
2257
|
+
contextUpdateSessionPin,
|
|
2258
|
+
contextUpdateSessionTitle,
|
|
2259
|
+
contextUpdateWorkspaceSettings,
|
|
2260
|
+
currentResources,
|
|
2261
|
+
repositoryValidationError,
|
|
2262
|
+
githubAppBusy,
|
|
2263
|
+
githubOrg,
|
|
2264
|
+
githubRepos,
|
|
2265
|
+
githubStatus,
|
|
2266
|
+
githubStatusFailed,
|
|
2267
|
+
personalGitHubStatus,
|
|
2268
|
+
personalGitHubRepositories,
|
|
2269
|
+
personalGitHubSelection,
|
|
2270
|
+
personalGitHubCatalogReady,
|
|
2271
|
+
personalGitHubBusy,
|
|
2272
|
+
selectedPersonalGitHubRepoIds,
|
|
2273
|
+
selectedPersonalGitHubRepoRefs,
|
|
2274
|
+
personalGitHubAuthority,
|
|
2275
|
+
githubCatalogReady,
|
|
2276
|
+
inspectorOpen,
|
|
2277
|
+
invalidSlackLinkQueryWorkspaceId,
|
|
2278
|
+
keyAuthRequired,
|
|
2279
|
+
manualRepos,
|
|
2280
|
+
manualReposOpen,
|
|
2281
|
+
managedSelfContext,
|
|
2282
|
+
model,
|
|
2283
|
+
ownsWorkspaceInvocation,
|
|
2284
|
+
preparePendingSlackLink,
|
|
2285
|
+
prepareWorkspaceTransition,
|
|
2286
|
+
slackLinkContinuationWorkspaceId,
|
|
2287
|
+
latencyMode,
|
|
2288
|
+
reasoningEffort,
|
|
2289
|
+
revalidatePrincipalAccess,
|
|
2290
|
+
contextRefreshPrincipalAccess,
|
|
2291
|
+
refreshGitHub,
|
|
2292
|
+
refreshPersonalGitHub,
|
|
2293
|
+
refreshWorkspace,
|
|
2294
|
+
refreshWorkspaceMcpServers,
|
|
2295
|
+
repoBusy,
|
|
2296
|
+
repositoryGroups,
|
|
2297
|
+
resetSessionView,
|
|
2298
|
+
resetWorkspaceIntegrations,
|
|
2299
|
+
selectedCapabilityToolIds,
|
|
2300
|
+
selectedRepoIds,
|
|
2301
|
+
selectedRepoRefs,
|
|
2302
|
+
session,
|
|
2303
|
+
sessionChannelProjectionAuthority,
|
|
2304
|
+
sessionCreationHandoff,
|
|
2305
|
+
sessionEventFeedStore,
|
|
2306
|
+
setSession,
|
|
2307
|
+
toolMcpServers,
|
|
2308
|
+
workspaceDefaultToolIds,
|
|
2309
|
+
workspaceMcpCatalogReady,
|
|
2310
|
+
workspaceMcpCatalogLoadedSuccessfully,
|
|
2311
|
+
workspaceCapabilityCatalog,
|
|
2312
|
+
workspaceMemberIntegrationSetup,
|
|
2313
|
+
workspaceStateOwnerId,
|
|
2314
|
+
workspaces
|
|
2315
|
+
]);
|
|
2316
|
+
return {
|
|
2317
|
+
appContext,
|
|
2318
|
+
client,
|
|
2319
|
+
clientConfig,
|
|
2320
|
+
configError,
|
|
2321
|
+
retryClientConfig: () => {
|
|
2322
|
+
setConfigError((current) => current?.recovering ? current : null);
|
|
2323
|
+
setConfigRequestVersion((version) => version + 1);
|
|
2324
|
+
},
|
|
2325
|
+
authSession,
|
|
2326
|
+
accessContext,
|
|
2327
|
+
accessError,
|
|
2328
|
+
accessLoading,
|
|
2329
|
+
accessKeyVersion,
|
|
2330
|
+
retryAccess: () => setAccessKeyVersion((version) => version + 1),
|
|
2331
|
+
keyAuthRequired,
|
|
2332
|
+
hasAccessKey,
|
|
2333
|
+
accessKeyDraft,
|
|
2334
|
+
setAccessKeyDraft,
|
|
2335
|
+
saveAccessKey,
|
|
2336
|
+
managedAuthRequired,
|
|
2337
|
+
managedEmailVerificationRequired,
|
|
2338
|
+
managedNewSignupsEnabled,
|
|
2339
|
+
managedSocialProviders,
|
|
2340
|
+
managedPasskeySignIn,
|
|
2341
|
+
managedPasskeySignUp,
|
|
2342
|
+
browserAccountsConfigured,
|
|
2343
|
+
browserAccountsEnabled,
|
|
2344
|
+
handleManagedAuth,
|
|
2345
|
+
handleManagedSessionSetSignup,
|
|
2346
|
+
handleManagedSocialAuth,
|
|
2347
|
+
handleManagedPasskeyAuth,
|
|
2348
|
+
handleManagedSignOut: contextHandleManagedSignOut,
|
|
2349
|
+
handleBrowserActorTransition: contextHandleBrowserActorTransition,
|
|
2350
|
+
completeOrganizationOnboarding,
|
|
2351
|
+
revalidatePrincipalAccess,
|
|
2352
|
+
defaultWorkspaceId,
|
|
2353
|
+
slackLinkContinuationWorkspaceId,
|
|
2354
|
+
routedWorkspace,
|
|
2355
|
+
creditRequired,
|
|
2356
|
+
setCreditRequired,
|
|
2357
|
+
mutationBusy: busy || repoBusy || githubAppBusy || pendingCreateAttempt.current !== null
|
|
2358
|
+
};
|
|
2359
|
+
}
|
|
2360
|
+
function submitGitHubManifest(actionUrl, manifest, newTab) {
|
|
2361
|
+
const form = document.createElement("form");
|
|
2362
|
+
form.method = "POST";
|
|
2363
|
+
form.action = actionUrl;
|
|
2364
|
+
if (newTab) form.target = "_blank";
|
|
2365
|
+
form.style.display = "none";
|
|
2366
|
+
form.acceptCharset = "utf-8";
|
|
2367
|
+
const input = document.createElement("input");
|
|
2368
|
+
input.type = "hidden";
|
|
2369
|
+
input.name = "manifest";
|
|
2370
|
+
input.value = JSON.stringify(manifest);
|
|
2371
|
+
form.append(input);
|
|
2372
|
+
document.body.append(form);
|
|
2373
|
+
form.submit();
|
|
2374
|
+
if (newTab) form.remove();
|
|
2375
|
+
}
|
|
2376
|
+
|
|
2377
|
+
export {
|
|
2378
|
+
GITHUB_STATUS_TOAST_ID,
|
|
2379
|
+
PERSONAL_GITHUB_STATUS_TOAST_ID,
|
|
2380
|
+
PERSONAL_GITHUB_RECONNECT_TOAST_ID,
|
|
2381
|
+
showPersonalGitHubReconnectToast,
|
|
2382
|
+
preserveSlackLinkForManagedAuth,
|
|
2383
|
+
createSlackLinkPrepareController,
|
|
2384
|
+
useAppState
|
|
2385
|
+
};
|
|
2386
|
+
//# sourceMappingURL=chunk-4DVNUCRR.js.map
|