@opengeni/react 6.37.3 → 6.37.4-canary.45279257475001
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.js +32 -32
- package/dist/app/components/Composer.css +1 -1
- package/dist/app/components/Composer.css.map +1 -1
- package/dist/app/components/Composer.js +44 -43
- package/dist/app/components/add-card-dialog.js +3 -2
- package/dist/app/components/add-card-dialog.js.map +1 -1
- package/dist/app/components/add-card.js +3 -3
- package/dist/app/components/agent/agent-capability-picker.js +9 -9
- package/dist/app/components/agents/agent-can-use.js +48 -47
- package/dist/app/components/agents/agent-form-page.js +143 -142
- package/dist/app/components/agents/agent-form-page.js.map +1 -1
- package/dist/app/components/agents/agent-page.js +124 -123
- package/dist/app/components/agents/agent-setup-sections.js +78 -77
- package/dist/app/components/agents/agent-skills.js +14 -13
- package/dist/app/components/agents/agent-trigger-chat-field.js +6 -6
- package/dist/app/components/agents/agent-trigger-dialog.js +34 -33
- package/dist/app/components/agents/agent-trigger-picker.js +8 -8
- package/dist/app/components/agents/agent-trigger-repositories.js +16 -16
- package/dist/app/components/agents/agents-page.js +96 -95
- package/dist/app/components/agents/agents-page.js.map +1 -1
- package/dist/app/components/agents/composer-agent-chip.js +60 -59
- package/dist/app/components/agents/session-agent-chip.js +55 -54
- package/dist/app/components/artifacts/app-package.js +13 -12
- package/dist/app/components/artifacts/artifact-browse-controls.js +3 -3
- package/dist/app/components/artifacts/artifact-library.js +29 -28
- package/dist/app/components/artifacts/artifact-page-chrome.js +1 -1
- package/dist/app/components/artifacts/artifact-viewer.js +67 -66
- package/dist/app/components/artifacts/artifact-viewer.js.map +1 -1
- package/dist/app/components/artifacts/chat-interactive-block.js +30 -29
- package/dist/app/components/artifacts/chat-interactive-block.js.map +1 -1
- package/dist/app/components/artifacts/copy-artifact-link.js +2 -2
- package/dist/app/components/artifacts/file-reach-dialog.js +13 -12
- package/dist/app/components/artifacts/inline-chat-image.js +52 -51
- package/dist/app/components/artifacts/ready-made-apps.js +13 -12
- package/dist/app/components/artifacts/retained-file-preview.js +58 -57
- package/dist/app/components/artifacts/retained-text-preview.js +8 -8
- package/dist/app/components/artifacts/site-actions.js +12 -12
- package/dist/app/components/artifacts/site-audience.js +9 -8
- package/dist/app/components/artifacts/site-conversations.js +35 -35
- package/dist/app/components/artifacts/site-data.js +27 -26
- package/dist/app/components/artifacts/site-public-link.js +3 -3
- package/dist/app/components/artifacts/site-publishing-page.js +69 -68
- package/dist/app/components/artifacts/site-publishing.js +54 -53
- package/dist/app/components/artifacts/site-settings.js +68 -67
- package/dist/app/components/artifacts/site-version-menu.js +10 -10
- package/dist/app/components/billing-class-mark.js +7 -7
- package/dist/app/components/capabilities/capability-detail-sheet.js +18 -17
- package/dist/app/components/capabilities/capability-logo-source.js +29 -28
- package/dist/app/components/capabilities/capability-logo.js +1 -1
- package/dist/app/components/capabilities/connection-account-picker.js +2 -2
- package/dist/app/components/capabilities/connection-ownership-selector.js +4 -3
- package/dist/app/components/capabilities/connector-tool-permissions.js +8 -8
- package/dist/app/components/capabilities/detail-dialog.js +3 -2
- package/dist/app/components/capabilities/native-connect-setup.js +32 -31
- package/dist/app/components/capabilities/own-logins-shared-heads-up.js +6 -6
- package/dist/app/components/capabilities/perform-capability-action.js +2 -2
- package/dist/app/components/capabilities/prepared-mcp-setup-card.js +32 -31
- package/dist/app/components/capabilities/session-capability-card.css +1 -1
- package/dist/app/components/capabilities/session-capability-card.css.map +1 -1
- package/dist/app/components/capabilities/session-capability-card.js +136 -135
- package/dist/app/components/capabilities/session-capability-card.js.map +1 -1
- package/dist/app/components/capabilities/session-chrome-card.css +1 -1
- package/dist/app/components/capabilities/session-chrome-card.css.map +1 -1
- package/dist/app/components/capabilities/session-chrome-card.js +49 -48
- package/dist/app/components/capabilities/session-connect-inputs-card.js +34 -33
- package/dist/app/components/capabilities/session-custom-mcp-card.js +39 -38
- package/dist/app/components/capabilities/session-github-card.js +45 -44
- package/dist/app/components/capabilities/session-machine-card.css +1 -1
- package/dist/app/components/capabilities/session-machine-card.css.map +1 -1
- package/dist/app/components/capabilities/session-machine-card.js +50 -49
- package/dist/app/components/capabilities/session-personal-github-card.js +33 -32
- package/dist/app/components/capabilities/session-plugin-card.js +21 -20
- package/dist/app/components/capabilities/use-capabilities-catalog.js +1 -1
- package/dist/app/components/capabilities/use-connection-accounts.js +2 -2
- package/dist/app/components/chat-payment-pages.js +2 -2
- package/dist/app/components/command-menu/chat-status.js +26 -26
- package/dist/app/components/command-menu/chat-switcher.js +87 -86
- package/dist/app/components/command-menu/chat-switcher.js.map +1 -1
- package/dist/app/components/command-menu/command-menu.js +332 -330
- package/dist/app/components/command-menu/command-menu.js.map +1 -1
- package/dist/app/components/command-menu/shortcut-sheet.js +27 -26
- package/dist/app/components/command-menu/shortcut-sheet.js.map +1 -1
- package/dist/app/components/composer-capabilities-menu-body.js +7 -7
- package/dist/app/components/composer-mobile-plus-panel.js +29 -28
- package/dist/app/components/composer-mobile-plus-panel.js.map +1 -1
- package/dist/app/components/composer-mobile-plus.js +5 -4
- package/dist/app/components/credit-required-gate.js +7 -7
- package/dist/app/components/credit-required-prompt.js +25 -24
- package/dist/app/components/credit-required-prompt.js.map +1 -1
- package/dist/app/components/credits/checkout-credits-celebration.js +4 -3
- package/dist/app/components/credits/checkout-return.js +4 -3
- package/dist/app/components/credits/checkout-return.js.map +1 -1
- package/dist/app/components/credits/coupon-redeem.js +1 -1
- package/dist/app/components/credits/credit-refusal-notice.js +7 -7
- package/dist/app/components/credits/own-subscription-plan-notice.js +3 -3
- package/dist/app/components/desktop/app-shots.css +1 -1
- package/dist/app/components/desktop/app-shots.css.map +1 -1
- package/dist/app/components/desktop/app-shots.js +10 -9
- package/dist/app/components/desktop/app-update.js +3 -3
- package/dist/app/components/desktop/computer-use.js +3 -3
- package/dist/app/components/desktop/this-computer.css +1 -1
- package/dist/app/components/desktop/this-computer.css.map +1 -1
- package/dist/app/components/desktop/this-computer.js +7 -6
- package/dist/app/components/feedback.js +11 -10
- package/dist/app/components/follow-up-repository-menu-body.js +13 -13
- package/dist/app/components/follow-up-repository-picker.js +1 -1
- package/dist/app/components/github-app-connect-launcher.js +3 -3
- package/dist/app/components/in-app-help-link.js +3 -3
- package/dist/app/components/knowledge/agent-learning-settings.js +3 -3
- package/dist/app/components/machines/connect-machine-dialog.css +1 -1
- package/dist/app/components/machines/connect-machine-dialog.css.map +1 -1
- package/dist/app/components/machines/connect-machine-dialog.js +25 -24
- package/dist/app/components/manual-repository-editor.js +3 -3
- package/dist/app/components/markdown.js +16 -15
- package/dist/app/components/model-identity.js +3 -3
- package/dist/app/components/models/models-ui.js +17 -16
- package/dist/app/components/models/provider-mark.js +3 -3
- package/dist/app/components/models/subscription-usage.js +5 -5
- package/dist/app/components/my-things.js +16 -15
- package/dist/app/components/my-things.js.map +1 -1
- package/dist/app/components/own-where-it-works.js +11 -10
- package/dist/app/components/personal-resource-attachment-surface.js +4 -4
- package/dist/app/components/pickers.js +11 -11
- package/dist/app/components/rail/channel-create-dialog.js +7 -6
- package/dist/app/components/rail/project-glyph.js +53 -52
- package/dist/app/components/rail/project-profile.js +74 -73
- package/dist/app/components/rail/rail-context.js +2 -2
- package/dist/app/components/rail/rail-sections.js +155 -154
- package/dist/app/components/rail/session-header.js +125 -124
- package/dist/app/components/rail/session-list.js +152 -151
- package/dist/app/components/rail/session-row-content.js +6 -6
- package/dist/app/components/rail/session-row-hover-details.js +36 -36
- package/dist/app/components/rail/session-shell.js +192 -191
- package/dist/app/components/rail/site-session-group-heading.js +36 -36
- package/dist/app/components/repository-picker.js +13 -13
- package/dist/app/components/secrets/session-secrets-panel.js +4 -4
- package/dist/app/components/session/agent-configuration-panel.js +45 -44
- package/dist/app/components/session/agent-configuration-panel.js.map +1 -1
- package/dist/app/components/session/artifact-session-page.js +7 -7
- package/dist/app/components/session/banners.js +20 -19
- package/dist/app/components/session/chat-avatar.js +53 -52
- package/dist/app/components/session/console-new-conversation.css +1 -1
- package/dist/app/components/session/console-new-conversation.css.map +1 -1
- package/dist/app/components/session/console-new-conversation.js +110 -109
- package/dist/app/components/session/descendant-requests.js +110 -109
- package/dist/app/components/session/descendant-requests.js.map +1 -1
- package/dist/app/components/session/editable-artifacts-workspace.js +60 -59
- package/dist/app/components/session/editable-artifacts-workspace.js.map +1 -1
- package/dist/app/components/session/failed-session-banner.js +29 -28
- 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 +3 -3
- package/dist/app/components/session/human-input.js +88 -87
- package/dist/app/components/session/inspector.js +146 -145
- package/dist/app/components/session/inspector.js.map +1 -1
- package/dist/app/components/session/linked-panel.js +3 -3
- package/dist/app/components/session/message-actions.js +11 -10
- package/dist/app/components/session/message-actions.js.map +1 -1
- package/dist/app/components/session/model-recovery-notice.js +4 -4
- package/dist/app/components/session/new-session-settings-menu.css +1 -1
- package/dist/app/components/session/new-session-settings-menu.css.map +1 -1
- package/dist/app/components/session/new-session-settings-menu.js +30 -29
- package/dist/app/components/session/new-session-setup-strip.js +56 -55
- package/dist/app/components/session/pull-request-panel.js +25 -24
- package/dist/app/components/session/sandbox-recovery-actions.js +5 -4
- package/dist/app/components/session/sandbox-switcher.js +22 -22
- package/dist/app/components/session/sandbox-workspace.js +120 -119
- package/dist/app/components/session/search-markdown-highlight.js +17 -16
- package/dist/app/components/session/search-results-view.js +18 -17
- package/dist/app/components/session/session-admin-access.js +14 -13
- package/dist/app/components/session/session-admission-notice.js +11 -11
- package/dist/app/components/session/session-avatar-picker.js +60 -59
- package/dist/app/components/session/session-avatar.js +55 -54
- package/dist/app/components/session/session-machine-access-notice.js +11 -11
- package/dist/app/components/session/session-profile-dialog.js +71 -70
- package/dist/app/components/session/session-profile-editor.js +72 -71
- package/dist/app/components/session/session-retention.js +6 -6
- package/dist/app/components/session/session-search-dialog.js +21 -20
- package/dist/app/components/session/session-search-dialog.js.map +1 -1
- package/dist/app/components/session/session-skill-reviews.js +5 -5
- package/dist/app/components/session/session-tenancy-control.js +32 -31
- package/dist/app/components/session/session-tenancy-control.js.map +1 -1
- package/dist/app/components/session/session-unattended-setting.js +1 -1
- package/dist/app/components/session/session-usage-limit-section.js +11 -11
- package/dist/app/components/session/share-chat-dialog.js +11 -10
- package/dist/app/components/session/subagents.js +23 -23
- package/dist/app/components/session/subscription-account-indicator.js +25 -25
- package/dist/app/components/session/subscription-account-menu.js +7 -7
- package/dist/app/components/session-connectors-menu-body.js +10 -10
- package/dist/app/components/settings/row-select.js +6 -6
- package/dist/app/components/toaster.js +2 -2
- package/dist/app/components/transcription-settings.js +10 -10
- package/dist/app/components/ui/destructive-confirm.js +11 -10
- package/dist/app/components/usage/usage-entry.js +8 -8
- package/dist/app/components/window-bar.js +26 -26
- package/dist/app/components/workspace-composer-plus.js +44 -43
- package/dist/app/components/workspace-reach.js +6 -6
- package/dist/app/embed/session-app.css +1 -1
- package/dist/app/embed/session-app.css.map +1 -1
- package/dist/app/embed/session-app.js +388 -387
- package/dist/app/lib/actions/actions-provider.js +19 -19
- package/dist/app/lib/agent-capabilities.js +4 -4
- package/dist/app/lib/app-connect-card.js +15 -14
- package/dist/app/lib/app-shared-key-dialog.js +9 -8
- package/dist/app/lib/app-surfaces.js +2 -2
- package/dist/app/lib/app-sync-opt-in.js +6 -5
- package/dist/app/lib/codex-usage-query.js +3 -3
- package/dist/app/lib/composer-agent.js +2 -2
- package/dist/app/lib/composer-connectors.js +33 -32
- package/dist/app/lib/composer-send-blocking.js +2 -2
- package/dist/app/lib/console-site.js +8 -7
- package/dist/app/lib/console-text.js +2 -2
- package/dist/app/lib/events.js +30 -29
- package/dist/app/lib/failed-session-copy.js +5 -5
- package/dist/app/lib/feedback-capture.js +2 -2
- package/dist/app/lib/model-access-onboarding.js +4 -4
- package/dist/app/lib/move-chat-to-machine.js +5 -5
- package/dist/app/lib/personal-resource-attachments.js +1 -1
- package/dist/app/lib/session-branch-cache.js +19 -19
- package/dist/app/lib/session-create.js +5 -5
- package/dist/app/lib/session-group-pagination.js +19 -19
- package/dist/app/lib/session-hover-facts.js +26 -26
- package/dist/app/lib/session-list-dirty-scopes.js +20 -20
- package/dist/app/lib/session-model.js +2 -2
- package/dist/app/lib/session-rail.js +16 -16
- package/dist/app/lib/session-rename.js +3 -3
- package/dist/app/lib/sessions-group.js +23 -23
- package/dist/app/lib/site-tool-consent-dialog.js +25 -24
- 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/turn-failure-analytics.js +6 -6
- package/dist/app/lib/use-artifact-catalog.js +2 -2
- package/dist/app/lib/use-duplicate-site.js +5 -5
- package/dist/app/lib/use-follow-up-repositories.js +7 -6
- package/dist/app/lib/use-personal-resource-attachment.js +2 -2
- package/dist/app/lib/use-workspace-machines.js +9 -9
- package/dist/app/lib/use-workspace-model-catalog.js +5 -5
- package/dist/app/lib/use-workspace-rigs.js +6 -6
- package/dist/app/lib/workspace-navigation-preference.js +5 -5
- package/dist/app/lib/workspace-scope-context.js +4 -4
- package/dist/app/routes/app-page-view.js +22 -21
- package/dist/app/routes/app-page-view.js.map +1 -1
- package/dist/app/routes/app-page.js +2 -2
- package/dist/app/routes/artifacts.js +153 -152
- package/dist/app/routes/artifacts.js.map +1 -1
- package/dist/app/routes/retained-artifact.js +106 -105
- package/dist/app/routes/retained-artifact.js.map +1 -1
- package/dist/app/routes/session-unavailable.js +6 -6
- package/dist/app/routes/session.css +1 -1
- package/dist/app/routes/session.css.map +1 -1
- package/dist/app/routes/session.js +246 -245
- package/dist/app/routes/sessions-index-hydration.js +6 -6
- package/dist/app/routes/sessions-index.css +1 -1
- package/dist/app/routes/sessions-index.css.map +1 -1
- package/dist/app/routes/sessions-index.js +202 -201
- package/dist/app/routes/site-view.css +1 -1
- package/dist/app/routes/site-view.css.map +1 -1
- package/dist/app/routes/site-view.js +195 -194
- package/dist/app/routes/site-view.js.map +1 -1
- package/dist/artifacts-document.js +4 -4
- package/dist/artifacts-presentation.js +9 -8
- package/dist/artifacts-spreadsheet.js +4 -4
- package/dist/artifacts.js +51 -50
- package/dist/automation-model.js +6 -6
- package/dist/automations.js +71 -70
- package/dist/automations.js.map +1 -1
- package/dist/browser-viewer-O5FJOWWI.js +23 -0
- package/dist/chat-interactive-block-TQTOUHRC.js +22 -0
- package/dist/chunk-23TTCFRP.js +3690 -0
- package/dist/chunk-2BOFLWNJ.js +129 -0
- package/dist/chunk-2NO5QJCL.js +438 -0
- package/dist/chunk-2NO5QJCL.js.map +1 -0
- package/dist/chunk-3DMD2KHT.js +851 -0
- package/dist/chunk-3DOISS3I.js +132 -0
- package/dist/chunk-3KWTXE4O.js +199 -0
- package/dist/chunk-3TRERIPD.js +93 -0
- package/dist/chunk-3UXBTL7Z.js +92 -0
- package/dist/chunk-3XEKXNB4.js +283 -0
- package/dist/chunk-3ZJUQG4K.js +428 -0
- package/dist/chunk-42WTAUUW.js +335 -0
- package/dist/chunk-46ZC5VNC.js +38 -0
- package/dist/chunk-4BVEFGX7.js +166 -0
- package/dist/chunk-4IOFV4S4.js +401 -0
- package/dist/chunk-4ISXBLJV.js +137 -0
- package/dist/chunk-4L2MBYLH.js +283 -0
- package/dist/chunk-4N3B25HA.js +850 -0
- package/dist/chunk-4N3B25HA.js.map +1 -0
- package/dist/chunk-4NWUZ6SL.js +176 -0
- package/dist/chunk-4QVX6CTT.js +318 -0
- package/dist/chunk-4YARO4Y5.js +2984 -0
- package/dist/chunk-4Z7BPBS7.js +34 -0
- package/dist/chunk-55ILMX6B.js +794 -0
- package/dist/chunk-57OAQTWD.js +103 -0
- package/dist/chunk-5BRPLALX.js +380 -0
- package/dist/chunk-5BRPLALX.js.map +1 -0
- package/dist/chunk-5EF4JI6Q.js +214 -0
- package/dist/chunk-5EF4JI6Q.js.map +1 -0
- package/dist/chunk-5GXX3NI7.js +46 -0
- package/dist/chunk-5VE3PPSK.js +353 -0
- package/dist/chunk-62T2ZPD5.js +266 -0
- package/dist/chunk-655JT4VH.js +251 -0
- package/dist/chunk-65OPNLE4.js +505 -0
- package/dist/chunk-67PIP46J.js +229 -0
- package/dist/chunk-6CAK65QV.js +211 -0
- package/dist/chunk-6CDBX3XG.js +33 -0
- package/dist/chunk-6D3D2JWY.js +278 -0
- package/dist/chunk-6DGQB6GT.js +107 -0
- package/dist/chunk-6NFK3J2O.js +188 -0
- package/dist/chunk-6R3QX3AC.js +538 -0
- package/dist/chunk-6S5OMLAL.js +400 -0
- package/dist/chunk-6SG2VVVB.js +249 -0
- package/dist/chunk-6U57GGJI.js +110 -0
- package/dist/chunk-6V2PEFPS.js +98 -0
- package/dist/chunk-6VASZZVV.js +3321 -0
- package/dist/chunk-7BBYH5R5.js +168 -0
- package/dist/chunk-7EO3T3IX.js +209 -0
- package/dist/chunk-7EZQ6EKM.js +158 -0
- package/dist/chunk-7HI53NPP.js +15 -0
- package/dist/chunk-7J4BFENI.js +37 -0
- package/dist/chunk-7LSGNY2L.js +114 -0
- package/dist/chunk-7MMONDFK.js +1236 -0
- package/dist/chunk-7MWPBGDX.js +175 -0
- package/dist/chunk-7NSDIQMY.js +371 -0
- package/dist/chunk-7XPDLT5G.js +231 -0
- package/dist/chunk-A3BCF4MV.js +378 -0
- package/dist/chunk-A5GX3CAE.js +849 -0
- package/dist/chunk-AAHQJWEP.js +515 -0
- package/dist/chunk-AAWEPZOG.js +144 -0
- package/dist/chunk-ABRT345L.js +598 -0
- package/dist/chunk-AJ7KJ7XZ.js +4519 -0
- package/dist/chunk-AJ7KJ7XZ.js.map +1 -0
- package/dist/chunk-ANXFE2EP.js +91 -0
- package/dist/chunk-AQNE4XWU.js +271 -0
- package/dist/chunk-AV2OMWDS.js +4979 -0
- package/dist/chunk-AYHMHAU5.js +1019 -0
- package/dist/chunk-AZ637XK3.js +50 -0
- package/dist/chunk-B6AH43UQ.js +2434 -0
- package/dist/chunk-BBECLK22.js +383 -0
- package/dist/chunk-BWYPJG3P.js +158 -0
- package/dist/chunk-CI7F4Y26.js +396 -0
- package/dist/chunk-CNLSXEQC.js +931 -0
- package/dist/chunk-COCB4HE3.js +65 -0
- package/dist/chunk-CPEVLG3B.js +357 -0
- package/dist/chunk-CRHH5C6Z.js +5920 -0
- package/dist/chunk-CRHH5C6Z.js.map +1 -0
- package/dist/chunk-CVC4RO7D.js +155 -0
- package/dist/chunk-CY6RLRHJ.js +3110 -0
- package/dist/chunk-D3WLSMCL.js +117 -0
- package/dist/chunk-D7SSOJEU.js +178 -0
- package/dist/chunk-DBOD5WXT.js +818 -0
- package/dist/chunk-DFWSRIFL.js +162 -0
- package/dist/chunk-DITZUBOK.js +126 -0
- package/dist/chunk-DKD2ZZSJ.js +287 -0
- package/dist/chunk-DOJWHSRD.js +246 -0
- package/dist/chunk-DR6LZXJI.js +187 -0
- package/dist/chunk-DV73XOVB.js +650 -0
- package/dist/chunk-DYO7DNDD.js +316 -0
- package/dist/chunk-DYZASWWT.js +234 -0
- package/dist/chunk-EAJHD44A.js +573 -0
- package/dist/chunk-EAJHD44A.js.map +1 -0
- package/dist/chunk-EC5HUNXI.js +1263 -0
- package/dist/chunk-ECQ7FV3E.js +247 -0
- package/dist/chunk-ECVCSZWY.js +406 -0
- package/dist/chunk-EMXO5HCY.js +333 -0
- package/dist/chunk-ENJX5TAA.js +265 -0
- package/dist/chunk-EQSYPIAI.js +66 -0
- package/dist/chunk-EV73XMK3.js +1152 -0
- package/dist/chunk-F2SGC74A.js +2553 -0
- package/dist/chunk-F3LIUDXN.js +738 -0
- package/dist/chunk-F3LIUDXN.js.map +1 -0
- package/dist/chunk-F5ABIEWA.js +1029 -0
- package/dist/chunk-F5ABIEWA.js.map +1 -0
- package/dist/chunk-F5DEBD4D.js +230 -0
- package/dist/chunk-F6JJBUQ2.js +566 -0
- package/dist/chunk-FEVZDJOZ.js +1024 -0
- package/dist/chunk-FF22IUY3.js +121 -0
- package/dist/chunk-FILRDNUQ.js +256 -0
- package/dist/chunk-FLB3BP2E.js +227 -0
- package/dist/chunk-FZVMMHPC.js +639 -0
- package/dist/chunk-G6D5NVWM.js +112 -0
- package/dist/chunk-GGH5STTP.js +192 -0
- package/dist/chunk-GGHX6GS7.js +187 -0
- package/dist/chunk-GIHE7U3Y.js +174 -0
- package/dist/chunk-GO5VIAA7.js +264 -0
- package/dist/chunk-GSK637QS.js +27 -0
- package/dist/chunk-HBYO34CP.js +56 -0
- package/dist/chunk-HFROJDFQ.js +118 -0
- package/dist/chunk-HGEDFQ7G.js +251 -0
- package/dist/chunk-HH3QTFGV.js +1356 -0
- package/dist/chunk-HHFFPE67.js +220 -0
- package/dist/chunk-HHYTB5OL.js +246 -0
- package/dist/chunk-HPKWAHHI.js +48 -0
- package/dist/chunk-HSPOCEGP.js +373 -0
- package/dist/chunk-IC74VN2I.js +608 -0
- package/dist/chunk-ICSQO2CV.js +1021 -0
- package/dist/chunk-IEZE7SL6.js +3070 -0
- package/dist/chunk-IGHNTARW.js +170 -0
- package/dist/chunk-IKYS56PQ.js +138 -0
- package/dist/chunk-IO474NRY.js +56 -0
- package/dist/chunk-IP2CCFAV.js +723 -0
- package/dist/chunk-IT5GF54F.js +3851 -0
- package/dist/chunk-IX67G5FD.js +270 -0
- package/dist/chunk-IXNJK7KJ.js +292 -0
- package/dist/chunk-IZWTARYT.js +276 -0
- package/dist/chunk-JBV2HY43.js +108 -0
- package/dist/chunk-JE62XK5K.js +33 -0
- package/dist/chunk-JFAWCALM.js +85 -0
- package/dist/chunk-JQGPATQZ.js +83 -0
- package/dist/chunk-JYZGX5UZ.js +274 -0
- package/dist/chunk-K227GMSM.js +72 -0
- package/dist/chunk-KB2O7JIJ.js +449 -0
- package/dist/chunk-KT6GC67G.js +12 -0
- package/dist/chunk-KTGKGHEA.js +75 -0
- package/dist/chunk-KU77XHWB.js +285 -0
- package/dist/chunk-KZIRVLCM.js +175 -0
- package/dist/chunk-L3DUSTRN.js +259 -0
- package/dist/chunk-L6WVCO6D.js +61 -0
- package/dist/chunk-L7PCZEEG.js +79 -0
- package/dist/chunk-LEN2DVU6.js +311 -0
- package/dist/chunk-LGOQW2CE.js +191 -0
- package/dist/chunk-LK2JO72Y.js +389 -0
- package/dist/chunk-LSJPFW34.js +3996 -0
- package/dist/chunk-LSJPFW34.js.map +1 -0
- package/dist/chunk-LXLHIOJM.js +584 -0
- package/dist/chunk-LYQQ4VBE.js +1333 -0
- package/dist/chunk-M22ZHQ7S.js +1628 -0
- package/dist/chunk-M5RKFV6K.js +20 -0
- package/dist/chunk-MCPKUVMQ.js +99 -0
- package/dist/chunk-MDGNCUAC.js +145 -0
- package/dist/chunk-MFLU3466.js +99 -0
- package/dist/chunk-MIUJ3EH5.js +60 -0
- package/dist/chunk-MO3XJQN2.js +629 -0
- package/dist/chunk-MTHAYXDH.js +107 -0
- package/dist/chunk-MVYQDBE6.js +79 -0
- package/dist/chunk-NA7VZQPL.js +307 -0
- package/dist/chunk-ND6FWOSO.js +2431 -0
- package/dist/chunk-NGTCSS53.js +24 -0
- package/dist/chunk-NGTCSS53.js.map +1 -0
- package/dist/chunk-NIFPH34L.js +351 -0
- package/dist/chunk-NKYC6WHQ.js +103 -0
- package/dist/chunk-NML7VKLU.js +391 -0
- package/dist/chunk-NPAWLKJB.js +41 -0
- package/dist/chunk-NQSKI2YD.js +1185 -0
- package/dist/chunk-NXQFBC22.js +114 -0
- package/dist/chunk-NXRZMHVM.js +43 -0
- package/dist/chunk-NYU5DE4K.js +1309 -0
- package/dist/chunk-O2EEYPIZ.js +48 -0
- package/dist/chunk-O4TOEISQ.js +67 -0
- package/dist/chunk-O533L2TG.js +129 -0
- package/dist/chunk-O664PL2U.js +47 -0
- package/dist/chunk-O664PL2U.js.map +1 -0
- package/dist/chunk-ON6ZGJDW.js +532 -0
- package/dist/chunk-OPELE3Z4.js +311 -0
- package/dist/chunk-OTSUC6PP.js +234 -0
- package/dist/chunk-OXM267RC.js +128 -0
- package/dist/chunk-OXM267RC.js.map +1 -0
- package/dist/chunk-OZNL5OKT.js +1184 -0
- package/dist/chunk-P3PDKPLK.js +432 -0
- package/dist/chunk-PCZBYN2H.js +372 -0
- package/dist/chunk-PIPXXQFV.js +57 -0
- package/dist/chunk-PMUZUPPE.js +131 -0
- package/dist/chunk-PN52EIFV.js +113 -0
- package/dist/chunk-PPQJIVGM.js +175 -0
- package/dist/chunk-PQYFOTNI.js +469 -0
- package/dist/chunk-PUX4YJAW.js +1095 -0
- package/dist/chunk-PYMQM65Y.js +125 -0
- package/dist/chunk-Q5UO7GT5.js +404 -0
- package/dist/chunk-QA5UNVHD.js +85 -0
- package/dist/chunk-QDZR7FXG.js +215 -0
- package/dist/chunk-QNOWKKZ4.js +40 -0
- package/dist/chunk-QUXQYYZO.js +73 -0
- package/dist/chunk-QVOTPOXK.js +29 -0
- package/dist/chunk-R2DSOIME.js +772 -0
- package/dist/chunk-RFQQXXJ6.js +366 -0
- package/dist/chunk-RLWI34XM.js +27 -0
- package/dist/chunk-RMWCGSEP.js +124 -0
- package/dist/chunk-ROTEQD2Z.js +441 -0
- package/dist/chunk-RPCWZFP7.js +296 -0
- package/dist/chunk-RW5QRWVI.js +141 -0
- package/dist/chunk-RZZHOHL6.js +5089 -0
- package/dist/chunk-S5STZCBZ.js +133 -0
- package/dist/chunk-SD4A5P24.js +1803 -0
- package/dist/chunk-SJM4TCWJ.js +197 -0
- package/dist/chunk-SJXK56WZ.js +905 -0
- package/dist/chunk-SJXK56WZ.js.map +1 -0
- package/dist/chunk-SQYTYXR4.js +100 -0
- package/dist/chunk-SRDHDIRQ.js +177 -0
- package/dist/chunk-SVC674IM.js +263 -0
- package/dist/chunk-SYYFA7W7.js +23 -0
- package/dist/chunk-T2UUHB7V.js +1187 -0
- package/dist/chunk-TBOH54QP.js +298 -0
- package/dist/chunk-TG2GO424.js +196 -0
- package/dist/chunk-TOJNLC42.js +107 -0
- package/dist/chunk-TW75KM7T.js +412 -0
- package/dist/chunk-TWWAPJYE.js +26 -0
- package/dist/chunk-UARZCGWU.js +202 -0
- package/dist/chunk-UCNTAS2U.js +2580 -0
- package/dist/chunk-UD7IARSL.js +162 -0
- package/dist/chunk-UDKZKGUQ.js +379 -0
- package/dist/chunk-UEUYUUZA.js +3183 -0
- package/dist/chunk-UEUYUUZA.js.map +1 -0
- package/dist/chunk-UJRSZ6ZB.js +391 -0
- package/dist/chunk-UTM23O3G.js +50 -0
- package/dist/chunk-UUJSS56V.js +4570 -0
- package/dist/chunk-UWSF733U.js +42 -0
- package/dist/chunk-V4ZYJWU3.js +386 -0
- package/dist/chunk-VEIT2EGK.js +207 -0
- package/dist/chunk-VGG6DOTN.js +172 -0
- package/dist/chunk-VGSGAQJX.js +82 -0
- package/dist/chunk-VHK5CBIG.js +2317 -0
- package/dist/chunk-VLA2DTYG.js +154 -0
- package/dist/chunk-VSN6XKZ5.js +278 -0
- package/dist/chunk-VW6TOTDQ.js +111 -0
- package/dist/chunk-W3HKBWPM.js +406 -0
- package/dist/chunk-WDYM5SFM.js +73 -0
- package/dist/chunk-WJ4AZ2AR.js +2551 -0
- package/dist/chunk-WMQHP4E3.js +214 -0
- package/dist/chunk-WP5A6F6P.js +269 -0
- package/dist/chunk-WUR2DYJX.js +527 -0
- package/dist/chunk-WUR2DYJX.js.map +1 -0
- package/dist/chunk-WWQH3L6M.js +407 -0
- package/dist/chunk-WYIC3CXE.js +157 -0
- package/dist/chunk-WYIC3CXE.js.map +1 -0
- package/dist/chunk-X3T6ULUZ.js +297 -0
- package/dist/chunk-XA32OUL4.js +52 -0
- package/dist/chunk-XCICIQIE.js +113 -0
- package/dist/chunk-XHRIUCBD.js +138 -0
- package/dist/chunk-XJBWVT5X.js +1177 -0
- package/dist/chunk-XKQRWJFE.js +270 -0
- package/dist/chunk-XN3EVUB5.js +134 -0
- package/dist/chunk-XT6GBN2G.js +828 -0
- package/dist/chunk-XYVDTM4D.js +184 -0
- package/dist/chunk-XZO5X3KH.js +84 -0
- package/dist/chunk-Y34DIEOG.js +201 -0
- package/dist/chunk-YAIYUFCX.js +114 -0
- package/dist/chunk-YFLRBEDS.js +200 -0
- package/dist/chunk-YIKMBS4B.js +10053 -0
- package/dist/chunk-YIKMBS4B.js.map +1 -0
- package/dist/chunk-YQX227EF.js +403 -0
- package/dist/chunk-YVAB57JZ.js +340 -0
- package/dist/chunk-YWHSODBB.js +250 -0
- package/dist/chunk-YWJHCJQW.js +218 -0
- package/dist/chunk-Z37DSW2K.js +570 -0
- package/dist/chunk-ZELN2B72.js +399 -0
- package/dist/chunk-ZFGGR2JW.js +236 -0
- package/dist/chunk-ZL7SEED7.js +773 -0
- package/dist/composer.js +37 -36
- package/dist/computer-viewer-CNYFTUGF.js +21 -0
- package/dist/connect.js +31 -30
- package/dist/connection-step-up-EZRZW2LY.js +147 -0
- package/dist/connection-step-up-EZRZW2LY.js.map +1 -0
- package/dist/desktop-dictation.js +24 -24
- package/dist/desktop.js +2 -2
- package/dist/editor.js +2 -2
- package/dist/embedded-new-voice-A56WDECM.js +25 -0
- package/dist/embedded-voice-CBTSMIWW.js +25 -0
- package/dist/fleet-decision-row-6PQTGI2U.js +361 -0
- package/dist/in-chat-connect-model.js +5 -5
- package/dist/index.js +299 -298
- package/dist/interaction.js +9 -9
- package/dist/latest-question-F3VPDR7U.js +1 -1
- package/dist/lib/modal-layer.d.ts +11 -0
- package/dist/machine-request-model.js +1 -1
- package/dist/machines.js +8 -8
- package/dist/meetings-recorder.js +1 -1
- package/dist/meetings.js +117 -116
- package/dist/meetings.js.map +1 -1
- package/dist/messages/en.d.ts +1 -0
- package/dist/messages.js +1 -1
- package/dist/model-policy-picker-menu-ZU72JATS.js +23 -0
- package/dist/payment-page-card-5VEUANFD.js +227 -0
- package/dist/payment-page-card-5VEUANFD.js.map +1 -0
- package/dist/platform-activity-row-5IQT6R5Z.js +156 -0
- package/dist/queue-surface-implementation-TPCJ4R6N.js +933 -0
- package/dist/queue-surface-implementation-TPCJ4R6N.js.map +1 -0
- package/dist/realtime.js +17 -17
- package/dist/recorder-host-G5M676VM.js +80 -0
- package/dist/recordings.js +3 -3
- package/dist/sandbox-files-HCXOP6ZO.js +29 -0
- package/dist/session-app.css +1 -1
- package/dist/session-app.css.map +1 -1
- package/dist/session-app.js +388 -387
- package/dist/session-connect-cards-MYJRQWSA.js +28 -0
- package/dist/session-list-model.js +2 -2
- package/dist/session-realtime-YFVGQFJK.js +30 -0
- package/dist/session-realtime.js +2 -2
- package/dist/session-ui.js +96 -95
- package/dist/session.js +42 -42
- package/dist/sites.js +3 -3
- package/dist/terminal.js +2 -2
- package/dist/this-computer.js +4 -3
- package/dist/timeline-annotation-markers-5ELTFV5B.js +157 -0
- package/dist/timeline-annotation-selection-XHUOFRIY.js +208 -0
- package/dist/timeline-annotations-dialog-X2VNDYZ4.js +283 -0
- package/dist/timeline-model.js +58 -58
- package/dist/ui/access-list.js +24 -23
- package/dist/ui/access-list.js.map +1 -1
- package/dist/ui/cadence-picker.js +7 -7
- package/dist/ui/choice-cards.js +3 -3
- package/dist/ui/confirm-dialog.js +4 -3
- package/dist/ui/copy-field.js +3 -3
- package/dist/ui/detail-page.js +6 -5
- package/dist/ui/detail-sheet.js +6 -5
- package/dist/ui/dialog.js +2 -1
- package/dist/ui/diff-view.js +3 -3
- package/dist/ui/disclosure.js +7 -6
- package/dist/ui/email-chips-input.js +3 -3
- package/dist/ui/field.js +2 -2
- package/dist/ui/flush-form-page.js +8 -7
- package/dist/ui/form-dialog.js +7 -6
- package/dist/ui/list-row.js +6 -6
- package/dist/ui/load-failure.js +3 -3
- package/dist/ui/relative-time.js +3 -3
- package/dist/ui/revision-history.js +13 -13
- package/dist/ui/role-select.js +12 -11
- package/dist/ui/select-menu.js +5 -5
- package/dist/ui/settings-nav.js +6 -6
- package/dist/ui/sheet.js +3 -2
- package/dist/ui/usage-meter.js +4 -4
- package/dist/usage.js +3 -3
- package/dist/workbench.js +11 -11
- package/package.json +6 -5
- package/src/app/components/command-menu/command-menu.tsx +232 -228
- package/src/components/automations/automation-model.ts +1 -0
- package/src/components/file-browser.tsx +69 -64
- package/src/components/session-capability-frame.tsx +36 -34
- package/src/components/this-computer/this-computer-setup.tsx +36 -29
- package/src/lib/modal-layer.tsx +33 -0
- package/src/messages/en.ts +1 -0
- package/src/timeline/screenshot-lightbox.tsx +137 -128
- package/src/ui/detail-sheet.tsx +44 -40
- package/src/ui/dialog.tsx +39 -35
- package/src/ui/form-dialog-layer.test.tsx +4 -3
- package/src/ui/form-dialog.tsx +28 -26
- package/src/ui/sheet.tsx +36 -46
- package/styles/compiled.css +57 -12
- package/styles/index.css +19 -0
- package/styles/this-computer.css +1 -1
- package/dist/browser-viewer-J6O65JXH.js +0 -23
- package/dist/chat-interactive-block-R5JEJYMR.js +0 -22
- package/dist/chunk-236GMLCR.js +0 -50
- package/dist/chunk-24S44WBL.js +0 -200
- package/dist/chunk-27HN57HE.js +0 -274
- package/dist/chunk-2FLGURHP.js +0 -297
- package/dist/chunk-2SH6CLOR.js +0 -378
- package/dist/chunk-2XZ3EUSP.js +0 -505
- package/dist/chunk-2ZC62PY4.js +0 -113
- package/dist/chunk-36YTBVYF.js +0 -197
- package/dist/chunk-3775TQE5.js +0 -10053
- package/dist/chunk-3775TQE5.js.map +0 -1
- package/dist/chunk-3CF2B2LD.js +0 -110
- package/dist/chunk-3GENISSH.js +0 -129
- package/dist/chunk-3IEVQMGO.js +0 -2431
- package/dist/chunk-3N3EN7FA.js +0 -34
- package/dist/chunk-3NMKLLEB.js +0 -218
- package/dist/chunk-3VSKLEUE.js +0 -4570
- package/dist/chunk-3X4HTUUR.js +0 -538
- package/dist/chunk-3XHPCZ6N.js +0 -380
- package/dist/chunk-3XHPCZ6N.js.map +0 -1
- package/dist/chunk-4GFLP4OY.js +0 -131
- package/dist/chunk-4GUPD7CJ.js +0 -234
- package/dist/chunk-4OGDD2EM.js +0 -2434
- package/dist/chunk-4T2RJ2HY.js +0 -93
- package/dist/chunk-4XEPZARK.js +0 -391
- package/dist/chunk-4YJGB22T.js +0 -570
- package/dist/chunk-4YNWA5YG.js +0 -236
- package/dist/chunk-4ZRGFCSP.js +0 -5919
- package/dist/chunk-4ZRGFCSP.js.map +0 -1
- package/dist/chunk-54NTSBQO.js +0 -33
- package/dist/chunk-5BRK72J5.js +0 -214
- package/dist/chunk-5BRK72J5.js.map +0 -1
- package/dist/chunk-5CGZOJN7.js +0 -111
- package/dist/chunk-5ERDSF2C.js +0 -79
- package/dist/chunk-5I6CWDA6.js +0 -3176
- package/dist/chunk-5I6CWDA6.js.map +0 -1
- package/dist/chunk-5JG277OH.js +0 -92
- package/dist/chunk-5JOTMM3F.js +0 -3996
- package/dist/chunk-5JOTMM3F.js.map +0 -1
- package/dist/chunk-5ORXRVXV.js +0 -469
- package/dist/chunk-5XVOL3KH.js +0 -931
- package/dist/chunk-67BMBRTK.js +0 -406
- package/dist/chunk-67JCL67N.js +0 -84
- package/dist/chunk-6F34IWSA.js +0 -47
- package/dist/chunk-6F34IWSA.js.map +0 -1
- package/dist/chunk-6GCMLYER.js +0 -432
- package/dist/chunk-6GODDS6F.js +0 -103
- package/dist/chunk-6GYRHQVL.js +0 -5089
- package/dist/chunk-6LF2ZE52.js +0 -851
- package/dist/chunk-6MSTIFAL.js +0 -406
- package/dist/chunk-6OMREP52.js +0 -187
- package/dist/chunk-6P3QOMPV.js +0 -57
- package/dist/chunk-6SPEMI7K.js +0 -850
- package/dist/chunk-6SPEMI7K.js.map +0 -1
- package/dist/chunk-6WGJB6GO.js +0 -65
- package/dist/chunk-72PGXQDN.js +0 -399
- package/dist/chunk-75LF7LSI.js +0 -307
- package/dist/chunk-7CIMPDGL.js +0 -26
- package/dist/chunk-7EJWP62C.js +0 -271
- package/dist/chunk-7FY47EN2.js +0 -138
- package/dist/chunk-7I4KWTJS.js +0 -112
- package/dist/chunk-7J3TLTPI.js +0 -50
- package/dist/chunk-7M5DPUGZ.js +0 -215
- package/dist/chunk-7ZQVRVNI.js +0 -1263
- package/dist/chunk-A2QOUEU3.js +0 -256
- package/dist/chunk-A36WG3BT.js +0 -175
- package/dist/chunk-ADFUTR45.js +0 -138
- package/dist/chunk-ADNH5GSP.js +0 -1236
- package/dist/chunk-AGW5H6QV.js +0 -1356
- package/dist/chunk-AHBEBGLO.js +0 -27
- package/dist/chunk-AJIGRQIO.js +0 -311
- package/dist/chunk-AP63EUPJ.js +0 -145
- package/dist/chunk-ATWXYAWP.js +0 -227
- package/dist/chunk-AU2DT7O2.js +0 -29
- package/dist/chunk-AX65L6QV.js +0 -316
- package/dist/chunk-AZHZ2EU4.js +0 -333
- package/dist/chunk-B57G2C45.js +0 -357
- package/dist/chunk-BIQMUTVW.js +0 -1333
- package/dist/chunk-BOZN54YB.js +0 -149
- package/dist/chunk-BOZN54YB.js.map +0 -1
- package/dist/chunk-BPCI4ZGR.js +0 -4979
- package/dist/chunk-BRJLN3ZL.js +0 -67
- package/dist/chunk-BY7AWWDB.js +0 -177
- package/dist/chunk-CBSBNUGV.js +0 -523
- package/dist/chunk-CBSBNUGV.js.map +0 -1
- package/dist/chunk-CGS44LYC.js +0 -1022
- package/dist/chunk-CGS44LYC.js.map +0 -1
- package/dist/chunk-CHKHQHOO.js +0 -3070
- package/dist/chunk-CSGKUDNB.js +0 -1024
- package/dist/chunk-CZPN2HP3.js +0 -441
- package/dist/chunk-D2VP4C5B.js +0 -515
- package/dist/chunk-D32VVOBJ.js +0 -738
- package/dist/chunk-D32VVOBJ.js.map +0 -1
- package/dist/chunk-D4AF4SOJ.js +0 -246
- package/dist/chunk-DCML4SXQ.js +0 -201
- package/dist/chunk-DECSYLBP.js +0 -572
- package/dist/chunk-DECSYLBP.js.map +0 -1
- package/dist/chunk-DEKCTHXM.js +0 -639
- package/dist/chunk-DGS62JWP.js +0 -828
- package/dist/chunk-DHXRMZPQ.js +0 -276
- package/dist/chunk-DJ4X4U4A.js +0 -1021
- package/dist/chunk-DLMMQMKZ.js +0 -2551
- package/dist/chunk-DWPE3Y7M.js +0 -144
- package/dist/chunk-EFD4DD3E.js +0 -113
- package/dist/chunk-EGSRY63C.js +0 -251
- package/dist/chunk-EIVA3MAH.js +0 -85
- package/dist/chunk-EJYHPNXD.js +0 -103
- package/dist/chunk-EQ263DHZ.js +0 -27
- package/dist/chunk-EVJ42E62.js +0 -137
- package/dist/chunk-EW3N5SCT.js +0 -1628
- package/dist/chunk-F47X7XPQ.js +0 -124
- package/dist/chunk-F4ESDJTE.js +0 -400
- package/dist/chunk-F7NV3EL5.js +0 -2580
- package/dist/chunk-FFWVFU6S.js +0 -48
- package/dist/chunk-FPPPLIGK.js +0 -1184
- package/dist/chunk-FUJ6DWRZ.js +0 -207
- package/dist/chunk-FWEMP52Y.js +0 -199
- package/dist/chunk-FX4HG4FR.js +0 -37
- package/dist/chunk-FZOK37SC.js +0 -155
- package/dist/chunk-GBGJIR6F.js +0 -404
- package/dist/chunk-GCURVP5U.js +0 -211
- package/dist/chunk-GFMRMSFN.js +0 -196
- package/dist/chunk-GH4VY3H5.js +0 -178
- package/dist/chunk-GJFTPSGN.js +0 -278
- package/dist/chunk-GKOIWZ4C.js +0 -794
- package/dist/chunk-GNTEF5TL.js +0 -158
- package/dist/chunk-GQF2HWQE.js +0 -407
- package/dist/chunk-GXYS6BI3.js +0 -311
- package/dist/chunk-H27MS36Q.js +0 -318
- package/dist/chunk-H4NDK35I.js +0 -85
- package/dist/chunk-H6DJIEO6.js +0 -269
- package/dist/chunk-HC7C4ZN2.js +0 -608
- package/dist/chunk-HUKGLWAY.js +0 -174
- package/dist/chunk-HUS2QEPV.js +0 -428
- package/dist/chunk-HUTQJY3F.js +0 -23
- package/dist/chunk-HWOYJOKK.js +0 -266
- package/dist/chunk-I46F7LUI.js +0 -15
- package/dist/chunk-I57PYKVN.js +0 -386
- package/dist/chunk-IBI3N3P7.js +0 -56
- package/dist/chunk-IEUZ4ASX.js +0 -3110
- package/dist/chunk-IHLF7R6Q.js +0 -1309
- package/dist/chunk-J3XWJ2A6.js +0 -209
- package/dist/chunk-J45WTHTL.js +0 -229
- package/dist/chunk-J4OOKDRV.js +0 -40
- package/dist/chunk-J6YVN3W7.js +0 -162
- package/dist/chunk-JOZFVEBN.js +0 -2984
- package/dist/chunk-K7GGLL2U.js +0 -231
- package/dist/chunk-KDHWX7XH.js +0 -292
- package/dist/chunk-KMLELG4O.js +0 -46
- package/dist/chunk-KQY4P4EO.js +0 -373
- package/dist/chunk-KSDCQPJY.js +0 -12
- package/dist/chunk-KW4OJ3RS.js +0 -175
- package/dist/chunk-KWOYMJKM.js +0 -1803
- package/dist/chunk-KYDLVMKA.js +0 -99
- package/dist/chunk-KZYQNVXE.js +0 -449
- package/dist/chunk-L3GNEC6B.js +0 -1019
- package/dist/chunk-L5JV7MAF.js +0 -372
- package/dist/chunk-LC5E7CVA.js +0 -191
- package/dist/chunk-LEYZQZFS.js +0 -121
- package/dist/chunk-LFMTPBET.js +0 -265
- package/dist/chunk-LFQI2C46.js +0 -175
- package/dist/chunk-LH3SDMDC.js +0 -172
- package/dist/chunk-LJKZGQTI.js +0 -192
- package/dist/chunk-LQDSZPB5.js +0 -73
- package/dist/chunk-LTYUE572.js +0 -117
- package/dist/chunk-M3WCB73E.js +0 -379
- package/dist/chunk-M47MKLW2.js +0 -283
- package/dist/chunk-M5FX5KH5.js +0 -629
- package/dist/chunk-MHL727ZE.js +0 -129
- package/dist/chunk-N3AAMSBH.js +0 -170
- package/dist/chunk-N4TJ7A7I.js +0 -41
- package/dist/chunk-NFZAMHSR.js +0 -401
- package/dist/chunk-NRAVQJE2.js +0 -61
- package/dist/chunk-NU4HYZ3C.js +0 -48
- package/dist/chunk-NUZNJSL5.js +0 -285
- package/dist/chunk-NY5DX43C.js +0 -133
- package/dist/chunk-O3C4BASC.js +0 -773
- package/dist/chunk-O5JDQZGV.js +0 -176
- package/dist/chunk-OMYT3X2Y.js +0 -107
- package/dist/chunk-OSQ6YGZW.js +0 -412
- package/dist/chunk-OWXSWGP3.js +0 -263
- package/dist/chunk-PBCSPCF6.js +0 -43
- package/dist/chunk-PBKG2OPJ.js +0 -849
- package/dist/chunk-PCP5GF77.js +0 -366
- package/dist/chunk-PCSRHFRF.js +0 -75
- package/dist/chunk-PHNHJKEL.js +0 -287
- package/dist/chunk-PIPD74PT.js +0 -650
- package/dist/chunk-PMBZMVKE.js +0 -33
- package/dist/chunk-PMVZYQ5W.js +0 -107
- package/dist/chunk-POUIWV6K.js +0 -2553
- package/dist/chunk-PTSRBKQC.js +0 -118
- package/dist/chunk-Q5AQJQXU.js +0 -114
- package/dist/chunk-QAS2OFG5.js +0 -371
- package/dist/chunk-QCJ6SNCP.js +0 -532
- package/dist/chunk-QFMPAR74.js +0 -73
- package/dist/chunk-QHF4B7R4.js +0 -166
- package/dist/chunk-QHGWFKTK.js +0 -52
- package/dist/chunk-QJ4YC4PM.js +0 -353
- package/dist/chunk-QMFX5BDA.js +0 -3851
- package/dist/chunk-QSG6FWOK.js +0 -126
- package/dist/chunk-QTT5574G.js +0 -154
- package/dist/chunk-R6CFPY3F.js +0 -278
- package/dist/chunk-R6OBJ7LF.js +0 -131
- package/dist/chunk-R6OBJ7LF.js.map +0 -1
- package/dist/chunk-RAUWORZV.js +0 -1187
- package/dist/chunk-RG7PMYWW.js +0 -82
- package/dist/chunk-RLS563ST.js +0 -403
- package/dist/chunk-RQAE6DI7.js +0 -259
- package/dist/chunk-RWWQLVGV.js +0 -184
- package/dist/chunk-S6GFECVG.js +0 -56
- package/dist/chunk-SBWVYYRA.js +0 -283
- package/dist/chunk-SHW2QUOE.js +0 -158
- package/dist/chunk-SQJQVTHA.js +0 -3690
- package/dist/chunk-STTCF3OR.js +0 -202
- package/dist/chunk-SVG5U7UN.js +0 -270
- package/dist/chunk-SY6V3Z2U.js +0 -270
- package/dist/chunk-T3WYQHAO.js +0 -42
- package/dist/chunk-TCDDOFRG.js +0 -79
- package/dist/chunk-TGG3ODCS.js +0 -99
- package/dist/chunk-TL6UOSMX.js +0 -4519
- package/dist/chunk-TL6UOSMX.js.map +0 -1
- package/dist/chunk-TU6FW6IJ.js +0 -566
- package/dist/chunk-TXSZR2SB.js +0 -188
- package/dist/chunk-TYZ3WUKG.js +0 -1095
- package/dist/chunk-U3GQZEAO.js +0 -584
- package/dist/chunk-U4EMW7RP.js +0 -249
- package/dist/chunk-UBSHJB6M.js +0 -83
- package/dist/chunk-UFRXYZCJ.js +0 -125
- package/dist/chunk-UHBIXNRW.js +0 -100
- package/dist/chunk-UJB54P4M.js +0 -335
- package/dist/chunk-UJKVMFFF.js +0 -114
- package/dist/chunk-UJSXNGKJ.js +0 -141
- package/dist/chunk-UNOJ5PNN.js +0 -3321
- package/dist/chunk-UOBJFO25.js +0 -351
- package/dist/chunk-UPRN4FBY.js +0 -38
- package/dist/chunk-UQQUMT5P.js +0 -91
- package/dist/chunk-UTFX46TK.js +0 -1177
- package/dist/chunk-V5HRUE42.js +0 -396
- package/dist/chunk-VCWRMKTQ.js +0 -296
- package/dist/chunk-VJAP57SP.js +0 -114
- package/dist/chunk-VMJN6YQL.js +0 -391
- package/dist/chunk-VUNGU657.js +0 -20
- package/dist/chunk-VWEGG7JQ.js +0 -134
- package/dist/chunk-VWT7ORWC.js +0 -437
- package/dist/chunk-VWT7ORWC.js.map +0 -1
- package/dist/chunk-VXGQVX53.js +0 -1152
- package/dist/chunk-W7UFWXZ6.js +0 -72
- package/dist/chunk-WKBJNGYV.js +0 -230
- package/dist/chunk-WZZV7DUU.js +0 -723
- package/dist/chunk-XDWW2DLJ.js +0 -247
- package/dist/chunk-XF55A7CC.js +0 -162
- package/dist/chunk-XGUBIE35.js +0 -187
- package/dist/chunk-XIUJL352.js +0 -66
- package/dist/chunk-XKPVWLMM.js +0 -383
- package/dist/chunk-XSR6J5LY.js +0 -234
- package/dist/chunk-Y2LD4FTV.js +0 -132
- package/dist/chunk-Y3TQ2M2O.js +0 -214
- package/dist/chunk-Y5HXP2NR.js +0 -251
- package/dist/chunk-Y6CNWBV3.js +0 -264
- package/dist/chunk-YGPMLIFT.js +0 -2317
- package/dist/chunk-YIR4KVJO.js +0 -389
- package/dist/chunk-YN6UVG4Z.js +0 -250
- package/dist/chunk-YNIDJOGT.js +0 -340
- package/dist/chunk-YP4SNX4P.js +0 -220
- package/dist/chunk-YPIOAMHD.js +0 -246
- package/dist/chunk-YPM3T3UM.js +0 -598
- package/dist/chunk-YRJZYQ5A.js +0 -898
- package/dist/chunk-YRJZYQ5A.js.map +0 -1
- package/dist/chunk-YVODOJZG.js +0 -298
- package/dist/chunk-ZAGLLXX5.js +0 -107
- package/dist/chunk-ZD67RM6G.js +0 -60
- package/dist/chunk-ZLY7M463.js +0 -1185
- package/dist/chunk-ZNIG3CPB.js +0 -98
- package/dist/chunk-ZOQKWIFS.js +0 -108
- package/dist/chunk-ZU5WVSHV.js +0 -168
- package/dist/chunk-ZWEVJPXC.js +0 -818
- package/dist/chunk-ZWFLYN7T.js +0 -772
- package/dist/computer-viewer-ZISZUM4L.js +0 -21
- package/dist/connection-step-up-UQHDCXFE.js +0 -146
- package/dist/connection-step-up-UQHDCXFE.js.map +0 -1
- package/dist/embedded-new-voice-UWSSA7AB.js +0 -25
- package/dist/embedded-voice-T34K465A.js +0 -25
- package/dist/fleet-decision-row-REAWMEHI.js +0 -361
- package/dist/model-policy-picker-menu-2CTRKSDJ.js +0 -23
- package/dist/payment-page-card-OOOFGIMH.js +0 -226
- package/dist/payment-page-card-OOOFGIMH.js.map +0 -1
- package/dist/platform-activity-row-EZYTZPYR.js +0 -156
- package/dist/queue-surface-implementation-HDZ42LN7.js +0 -932
- package/dist/queue-surface-implementation-HDZ42LN7.js.map +0 -1
- package/dist/recorder-host-6HFQQTNI.js +0 -80
- package/dist/sandbox-files-6JY7WVMO.js +0 -28
- package/dist/session-connect-cards-VTSJODCX.js +0 -27
- package/dist/session-realtime-G3ZGG3KR.js +0 -30
- package/dist/timeline-annotation-markers-S6DMHCI6.js +0 -157
- package/dist/timeline-annotation-selection-UFZOKL5E.js +0 -208
- package/dist/timeline-annotations-dialog-FPJ4MPHD.js +0 -283
- /package/dist/{browser-viewer-J6O65JXH.js.map → browser-viewer-O5FJOWWI.js.map} +0 -0
- /package/dist/{chat-interactive-block-R5JEJYMR.js.map → chat-interactive-block-TQTOUHRC.js.map} +0 -0
- /package/dist/{chunk-SQJQVTHA.js.map → chunk-23TTCFRP.js.map} +0 -0
- /package/dist/{chunk-3GENISSH.js.map → chunk-2BOFLWNJ.js.map} +0 -0
- /package/dist/{chunk-6LF2ZE52.js.map → chunk-3DMD2KHT.js.map} +0 -0
- /package/dist/{chunk-Y2LD4FTV.js.map → chunk-3DOISS3I.js.map} +0 -0
- /package/dist/{chunk-FWEMP52Y.js.map → chunk-3KWTXE4O.js.map} +0 -0
- /package/dist/{chunk-4T2RJ2HY.js.map → chunk-3TRERIPD.js.map} +0 -0
- /package/dist/{chunk-5JG277OH.js.map → chunk-3UXBTL7Z.js.map} +0 -0
- /package/dist/{chunk-M47MKLW2.js.map → chunk-3XEKXNB4.js.map} +0 -0
- /package/dist/{chunk-HUS2QEPV.js.map → chunk-3ZJUQG4K.js.map} +0 -0
- /package/dist/{chunk-UJB54P4M.js.map → chunk-42WTAUUW.js.map} +0 -0
- /package/dist/{chunk-UPRN4FBY.js.map → chunk-46ZC5VNC.js.map} +0 -0
- /package/dist/{chunk-QHF4B7R4.js.map → chunk-4BVEFGX7.js.map} +0 -0
- /package/dist/{chunk-NFZAMHSR.js.map → chunk-4IOFV4S4.js.map} +0 -0
- /package/dist/{chunk-EVJ42E62.js.map → chunk-4ISXBLJV.js.map} +0 -0
- /package/dist/{chunk-SBWVYYRA.js.map → chunk-4L2MBYLH.js.map} +0 -0
- /package/dist/{chunk-O5JDQZGV.js.map → chunk-4NWUZ6SL.js.map} +0 -0
- /package/dist/{chunk-H27MS36Q.js.map → chunk-4QVX6CTT.js.map} +0 -0
- /package/dist/{chunk-JOZFVEBN.js.map → chunk-4YARO4Y5.js.map} +0 -0
- /package/dist/{chunk-3N3EN7FA.js.map → chunk-4Z7BPBS7.js.map} +0 -0
- /package/dist/{chunk-GKOIWZ4C.js.map → chunk-55ILMX6B.js.map} +0 -0
- /package/dist/{chunk-6GODDS6F.js.map → chunk-57OAQTWD.js.map} +0 -0
- /package/dist/{chunk-KMLELG4O.js.map → chunk-5GXX3NI7.js.map} +0 -0
- /package/dist/{chunk-QJ4YC4PM.js.map → chunk-5VE3PPSK.js.map} +0 -0
- /package/dist/{chunk-HWOYJOKK.js.map → chunk-62T2ZPD5.js.map} +0 -0
- /package/dist/{chunk-EGSRY63C.js.map → chunk-655JT4VH.js.map} +0 -0
- /package/dist/{chunk-2XZ3EUSP.js.map → chunk-65OPNLE4.js.map} +0 -0
- /package/dist/{chunk-J45WTHTL.js.map → chunk-67PIP46J.js.map} +0 -0
- /package/dist/{chunk-GCURVP5U.js.map → chunk-6CAK65QV.js.map} +0 -0
- /package/dist/{chunk-PMBZMVKE.js.map → chunk-6CDBX3XG.js.map} +0 -0
- /package/dist/{chunk-R6CFPY3F.js.map → chunk-6D3D2JWY.js.map} +0 -0
- /package/dist/{chunk-PMVZYQ5W.js.map → chunk-6DGQB6GT.js.map} +0 -0
- /package/dist/{chunk-TXSZR2SB.js.map → chunk-6NFK3J2O.js.map} +0 -0
- /package/dist/{chunk-3X4HTUUR.js.map → chunk-6R3QX3AC.js.map} +0 -0
- /package/dist/{chunk-F4ESDJTE.js.map → chunk-6S5OMLAL.js.map} +0 -0
- /package/dist/{chunk-U4EMW7RP.js.map → chunk-6SG2VVVB.js.map} +0 -0
- /package/dist/{chunk-3CF2B2LD.js.map → chunk-6U57GGJI.js.map} +0 -0
- /package/dist/{chunk-ZNIG3CPB.js.map → chunk-6V2PEFPS.js.map} +0 -0
- /package/dist/{chunk-UNOJ5PNN.js.map → chunk-6VASZZVV.js.map} +0 -0
- /package/dist/{chunk-ZU5WVSHV.js.map → chunk-7BBYH5R5.js.map} +0 -0
- /package/dist/{chunk-J3XWJ2A6.js.map → chunk-7EO3T3IX.js.map} +0 -0
- /package/dist/{chunk-SHW2QUOE.js.map → chunk-7EZQ6EKM.js.map} +0 -0
- /package/dist/{chunk-I46F7LUI.js.map → chunk-7HI53NPP.js.map} +0 -0
- /package/dist/{chunk-FX4HG4FR.js.map → chunk-7J4BFENI.js.map} +0 -0
- /package/dist/{chunk-Q5AQJQXU.js.map → chunk-7LSGNY2L.js.map} +0 -0
- /package/dist/{chunk-ADNH5GSP.js.map → chunk-7MMONDFK.js.map} +0 -0
- /package/dist/{chunk-KW4OJ3RS.js.map → chunk-7MWPBGDX.js.map} +0 -0
- /package/dist/{chunk-QAS2OFG5.js.map → chunk-7NSDIQMY.js.map} +0 -0
- /package/dist/{chunk-K7GGLL2U.js.map → chunk-7XPDLT5G.js.map} +0 -0
- /package/dist/{chunk-2SH6CLOR.js.map → chunk-A3BCF4MV.js.map} +0 -0
- /package/dist/{chunk-PBKG2OPJ.js.map → chunk-A5GX3CAE.js.map} +0 -0
- /package/dist/{chunk-D2VP4C5B.js.map → chunk-AAHQJWEP.js.map} +0 -0
- /package/dist/{chunk-DWPE3Y7M.js.map → chunk-AAWEPZOG.js.map} +0 -0
- /package/dist/{chunk-YPM3T3UM.js.map → chunk-ABRT345L.js.map} +0 -0
- /package/dist/{chunk-UQQUMT5P.js.map → chunk-ANXFE2EP.js.map} +0 -0
- /package/dist/{chunk-7EJWP62C.js.map → chunk-AQNE4XWU.js.map} +0 -0
- /package/dist/{chunk-BPCI4ZGR.js.map → chunk-AV2OMWDS.js.map} +0 -0
- /package/dist/{chunk-L3GNEC6B.js.map → chunk-AYHMHAU5.js.map} +0 -0
- /package/dist/{chunk-7J3TLTPI.js.map → chunk-AZ637XK3.js.map} +0 -0
- /package/dist/{chunk-4OGDD2EM.js.map → chunk-B6AH43UQ.js.map} +0 -0
- /package/dist/{chunk-XKPVWLMM.js.map → chunk-BBECLK22.js.map} +0 -0
- /package/dist/{chunk-GNTEF5TL.js.map → chunk-BWYPJG3P.js.map} +0 -0
- /package/dist/{chunk-V5HRUE42.js.map → chunk-CI7F4Y26.js.map} +0 -0
- /package/dist/{chunk-5XVOL3KH.js.map → chunk-CNLSXEQC.js.map} +0 -0
- /package/dist/{chunk-6WGJB6GO.js.map → chunk-COCB4HE3.js.map} +0 -0
- /package/dist/{chunk-B57G2C45.js.map → chunk-CPEVLG3B.js.map} +0 -0
- /package/dist/{chunk-FZOK37SC.js.map → chunk-CVC4RO7D.js.map} +0 -0
- /package/dist/{chunk-IEUZ4ASX.js.map → chunk-CY6RLRHJ.js.map} +0 -0
- /package/dist/{chunk-LTYUE572.js.map → chunk-D3WLSMCL.js.map} +0 -0
- /package/dist/{chunk-GH4VY3H5.js.map → chunk-D7SSOJEU.js.map} +0 -0
- /package/dist/{chunk-ZWEVJPXC.js.map → chunk-DBOD5WXT.js.map} +0 -0
- /package/dist/{chunk-J6YVN3W7.js.map → chunk-DFWSRIFL.js.map} +0 -0
- /package/dist/{chunk-QSG6FWOK.js.map → chunk-DITZUBOK.js.map} +0 -0
- /package/dist/{chunk-PHNHJKEL.js.map → chunk-DKD2ZZSJ.js.map} +0 -0
- /package/dist/{chunk-YPIOAMHD.js.map → chunk-DOJWHSRD.js.map} +0 -0
- /package/dist/{chunk-XGUBIE35.js.map → chunk-DR6LZXJI.js.map} +0 -0
- /package/dist/{chunk-PIPD74PT.js.map → chunk-DV73XOVB.js.map} +0 -0
- /package/dist/{chunk-AX65L6QV.js.map → chunk-DYO7DNDD.js.map} +0 -0
- /package/dist/{chunk-4GUPD7CJ.js.map → chunk-DYZASWWT.js.map} +0 -0
- /package/dist/{chunk-7ZQVRVNI.js.map → chunk-EC5HUNXI.js.map} +0 -0
- /package/dist/{chunk-XDWW2DLJ.js.map → chunk-ECQ7FV3E.js.map} +0 -0
- /package/dist/{chunk-67BMBRTK.js.map → chunk-ECVCSZWY.js.map} +0 -0
- /package/dist/{chunk-AZHZ2EU4.js.map → chunk-EMXO5HCY.js.map} +0 -0
- /package/dist/{chunk-LFMTPBET.js.map → chunk-ENJX5TAA.js.map} +0 -0
- /package/dist/{chunk-XIUJL352.js.map → chunk-EQSYPIAI.js.map} +0 -0
- /package/dist/{chunk-VXGQVX53.js.map → chunk-EV73XMK3.js.map} +0 -0
- /package/dist/{chunk-POUIWV6K.js.map → chunk-F2SGC74A.js.map} +0 -0
- /package/dist/{chunk-WKBJNGYV.js.map → chunk-F5DEBD4D.js.map} +0 -0
- /package/dist/{chunk-TU6FW6IJ.js.map → chunk-F6JJBUQ2.js.map} +0 -0
- /package/dist/{chunk-CSGKUDNB.js.map → chunk-FEVZDJOZ.js.map} +0 -0
- /package/dist/{chunk-LEYZQZFS.js.map → chunk-FF22IUY3.js.map} +0 -0
- /package/dist/{chunk-A2QOUEU3.js.map → chunk-FILRDNUQ.js.map} +0 -0
- /package/dist/{chunk-ATWXYAWP.js.map → chunk-FLB3BP2E.js.map} +0 -0
- /package/dist/{chunk-DEKCTHXM.js.map → chunk-FZVMMHPC.js.map} +0 -0
- /package/dist/{chunk-7I4KWTJS.js.map → chunk-G6D5NVWM.js.map} +0 -0
- /package/dist/{chunk-LJKZGQTI.js.map → chunk-GGH5STTP.js.map} +0 -0
- /package/dist/{chunk-6OMREP52.js.map → chunk-GGHX6GS7.js.map} +0 -0
- /package/dist/{chunk-HUKGLWAY.js.map → chunk-GIHE7U3Y.js.map} +0 -0
- /package/dist/{chunk-Y6CNWBV3.js.map → chunk-GO5VIAA7.js.map} +0 -0
- /package/dist/{chunk-AHBEBGLO.js.map → chunk-GSK637QS.js.map} +0 -0
- /package/dist/{chunk-S6GFECVG.js.map → chunk-HBYO34CP.js.map} +0 -0
- /package/dist/{chunk-PTSRBKQC.js.map → chunk-HFROJDFQ.js.map} +0 -0
- /package/dist/{chunk-Y5HXP2NR.js.map → chunk-HGEDFQ7G.js.map} +0 -0
- /package/dist/{chunk-AGW5H6QV.js.map → chunk-HH3QTFGV.js.map} +0 -0
- /package/dist/{chunk-YP4SNX4P.js.map → chunk-HHFFPE67.js.map} +0 -0
- /package/dist/{chunk-D4AF4SOJ.js.map → chunk-HHYTB5OL.js.map} +0 -0
- /package/dist/{chunk-FFWVFU6S.js.map → chunk-HPKWAHHI.js.map} +0 -0
- /package/dist/{chunk-KQY4P4EO.js.map → chunk-HSPOCEGP.js.map} +0 -0
- /package/dist/{chunk-HC7C4ZN2.js.map → chunk-IC74VN2I.js.map} +0 -0
- /package/dist/{chunk-DJ4X4U4A.js.map → chunk-ICSQO2CV.js.map} +0 -0
- /package/dist/{chunk-CHKHQHOO.js.map → chunk-IEZE7SL6.js.map} +0 -0
- /package/dist/{chunk-N3AAMSBH.js.map → chunk-IGHNTARW.js.map} +0 -0
- /package/dist/{chunk-7FY47EN2.js.map → chunk-IKYS56PQ.js.map} +0 -0
- /package/dist/{chunk-IBI3N3P7.js.map → chunk-IO474NRY.js.map} +0 -0
- /package/dist/{chunk-WZZV7DUU.js.map → chunk-IP2CCFAV.js.map} +0 -0
- /package/dist/{chunk-QMFX5BDA.js.map → chunk-IT5GF54F.js.map} +0 -0
- /package/dist/{chunk-SVG5U7UN.js.map → chunk-IX67G5FD.js.map} +0 -0
- /package/dist/{chunk-KDHWX7XH.js.map → chunk-IXNJK7KJ.js.map} +0 -0
- /package/dist/{chunk-DHXRMZPQ.js.map → chunk-IZWTARYT.js.map} +0 -0
- /package/dist/{chunk-ZOQKWIFS.js.map → chunk-JBV2HY43.js.map} +0 -0
- /package/dist/{chunk-54NTSBQO.js.map → chunk-JE62XK5K.js.map} +0 -0
- /package/dist/{chunk-EIVA3MAH.js.map → chunk-JFAWCALM.js.map} +0 -0
- /package/dist/{chunk-UBSHJB6M.js.map → chunk-JQGPATQZ.js.map} +0 -0
- /package/dist/{chunk-27HN57HE.js.map → chunk-JYZGX5UZ.js.map} +0 -0
- /package/dist/{chunk-W7UFWXZ6.js.map → chunk-K227GMSM.js.map} +0 -0
- /package/dist/{chunk-KZYQNVXE.js.map → chunk-KB2O7JIJ.js.map} +0 -0
- /package/dist/{chunk-KSDCQPJY.js.map → chunk-KT6GC67G.js.map} +0 -0
- /package/dist/{chunk-PCSRHFRF.js.map → chunk-KTGKGHEA.js.map} +0 -0
- /package/dist/{chunk-NUZNJSL5.js.map → chunk-KU77XHWB.js.map} +0 -0
- /package/dist/{chunk-A36WG3BT.js.map → chunk-KZIRVLCM.js.map} +0 -0
- /package/dist/{chunk-RQAE6DI7.js.map → chunk-L3DUSTRN.js.map} +0 -0
- /package/dist/{chunk-NRAVQJE2.js.map → chunk-L6WVCO6D.js.map} +0 -0
- /package/dist/{chunk-TCDDOFRG.js.map → chunk-L7PCZEEG.js.map} +0 -0
- /package/dist/{chunk-GXYS6BI3.js.map → chunk-LEN2DVU6.js.map} +0 -0
- /package/dist/{chunk-LC5E7CVA.js.map → chunk-LGOQW2CE.js.map} +0 -0
- /package/dist/{chunk-YIR4KVJO.js.map → chunk-LK2JO72Y.js.map} +0 -0
- /package/dist/{chunk-U3GQZEAO.js.map → chunk-LXLHIOJM.js.map} +0 -0
- /package/dist/{chunk-BIQMUTVW.js.map → chunk-LYQQ4VBE.js.map} +0 -0
- /package/dist/{chunk-EW3N5SCT.js.map → chunk-M22ZHQ7S.js.map} +0 -0
- /package/dist/{chunk-VUNGU657.js.map → chunk-M5RKFV6K.js.map} +0 -0
- /package/dist/{chunk-TGG3ODCS.js.map → chunk-MCPKUVMQ.js.map} +0 -0
- /package/dist/{chunk-AP63EUPJ.js.map → chunk-MDGNCUAC.js.map} +0 -0
- /package/dist/{chunk-KYDLVMKA.js.map → chunk-MFLU3466.js.map} +0 -0
- /package/dist/{chunk-ZD67RM6G.js.map → chunk-MIUJ3EH5.js.map} +0 -0
- /package/dist/{chunk-M5FX5KH5.js.map → chunk-MO3XJQN2.js.map} +0 -0
- /package/dist/{chunk-OMYT3X2Y.js.map → chunk-MTHAYXDH.js.map} +0 -0
- /package/dist/{chunk-5ERDSF2C.js.map → chunk-MVYQDBE6.js.map} +0 -0
- /package/dist/{chunk-75LF7LSI.js.map → chunk-NA7VZQPL.js.map} +0 -0
- /package/dist/{chunk-3IEVQMGO.js.map → chunk-ND6FWOSO.js.map} +0 -0
- /package/dist/{chunk-UOBJFO25.js.map → chunk-NIFPH34L.js.map} +0 -0
- /package/dist/{chunk-EJYHPNXD.js.map → chunk-NKYC6WHQ.js.map} +0 -0
- /package/dist/{chunk-4XEPZARK.js.map → chunk-NML7VKLU.js.map} +0 -0
- /package/dist/{chunk-N4TJ7A7I.js.map → chunk-NPAWLKJB.js.map} +0 -0
- /package/dist/{chunk-ZLY7M463.js.map → chunk-NQSKI2YD.js.map} +0 -0
- /package/dist/{chunk-VJAP57SP.js.map → chunk-NXQFBC22.js.map} +0 -0
- /package/dist/{chunk-PBCSPCF6.js.map → chunk-NXRZMHVM.js.map} +0 -0
- /package/dist/{chunk-IHLF7R6Q.js.map → chunk-NYU5DE4K.js.map} +0 -0
- /package/dist/{chunk-NU4HYZ3C.js.map → chunk-O2EEYPIZ.js.map} +0 -0
- /package/dist/{chunk-BRJLN3ZL.js.map → chunk-O4TOEISQ.js.map} +0 -0
- /package/dist/{chunk-MHL727ZE.js.map → chunk-O533L2TG.js.map} +0 -0
- /package/dist/{chunk-QCJ6SNCP.js.map → chunk-ON6ZGJDW.js.map} +0 -0
- /package/dist/{chunk-AJIGRQIO.js.map → chunk-OPELE3Z4.js.map} +0 -0
- /package/dist/{chunk-XSR6J5LY.js.map → chunk-OTSUC6PP.js.map} +0 -0
- /package/dist/{chunk-FPPPLIGK.js.map → chunk-OZNL5OKT.js.map} +0 -0
- /package/dist/{chunk-6GCMLYER.js.map → chunk-P3PDKPLK.js.map} +0 -0
- /package/dist/{chunk-L5JV7MAF.js.map → chunk-PCZBYN2H.js.map} +0 -0
- /package/dist/{chunk-6P3QOMPV.js.map → chunk-PIPXXQFV.js.map} +0 -0
- /package/dist/{chunk-4GFLP4OY.js.map → chunk-PMUZUPPE.js.map} +0 -0
- /package/dist/{chunk-EFD4DD3E.js.map → chunk-PN52EIFV.js.map} +0 -0
- /package/dist/{chunk-LFQI2C46.js.map → chunk-PPQJIVGM.js.map} +0 -0
- /package/dist/{chunk-5ORXRVXV.js.map → chunk-PQYFOTNI.js.map} +0 -0
- /package/dist/{chunk-TYZ3WUKG.js.map → chunk-PUX4YJAW.js.map} +0 -0
- /package/dist/{chunk-UFRXYZCJ.js.map → chunk-PYMQM65Y.js.map} +0 -0
- /package/dist/{chunk-GBGJIR6F.js.map → chunk-Q5UO7GT5.js.map} +0 -0
- /package/dist/{chunk-H4NDK35I.js.map → chunk-QA5UNVHD.js.map} +0 -0
- /package/dist/{chunk-7M5DPUGZ.js.map → chunk-QDZR7FXG.js.map} +0 -0
- /package/dist/{chunk-J4OOKDRV.js.map → chunk-QNOWKKZ4.js.map} +0 -0
- /package/dist/{chunk-QFMPAR74.js.map → chunk-QUXQYYZO.js.map} +0 -0
- /package/dist/{chunk-AU2DT7O2.js.map → chunk-QVOTPOXK.js.map} +0 -0
- /package/dist/{chunk-ZWFLYN7T.js.map → chunk-R2DSOIME.js.map} +0 -0
- /package/dist/{chunk-PCP5GF77.js.map → chunk-RFQQXXJ6.js.map} +0 -0
- /package/dist/{chunk-EQ263DHZ.js.map → chunk-RLWI34XM.js.map} +0 -0
- /package/dist/{chunk-F47X7XPQ.js.map → chunk-RMWCGSEP.js.map} +0 -0
- /package/dist/{chunk-CZPN2HP3.js.map → chunk-ROTEQD2Z.js.map} +0 -0
- /package/dist/{chunk-VCWRMKTQ.js.map → chunk-RPCWZFP7.js.map} +0 -0
- /package/dist/{chunk-UJSXNGKJ.js.map → chunk-RW5QRWVI.js.map} +0 -0
- /package/dist/{chunk-6GYRHQVL.js.map → chunk-RZZHOHL6.js.map} +0 -0
- /package/dist/{chunk-NY5DX43C.js.map → chunk-S5STZCBZ.js.map} +0 -0
- /package/dist/{chunk-KWOYMJKM.js.map → chunk-SD4A5P24.js.map} +0 -0
- /package/dist/{chunk-36YTBVYF.js.map → chunk-SJM4TCWJ.js.map} +0 -0
- /package/dist/{chunk-UHBIXNRW.js.map → chunk-SQYTYXR4.js.map} +0 -0
- /package/dist/{chunk-BY7AWWDB.js.map → chunk-SRDHDIRQ.js.map} +0 -0
- /package/dist/{chunk-OWXSWGP3.js.map → chunk-SVC674IM.js.map} +0 -0
- /package/dist/{chunk-HUTQJY3F.js.map → chunk-SYYFA7W7.js.map} +0 -0
- /package/dist/{chunk-RAUWORZV.js.map → chunk-T2UUHB7V.js.map} +0 -0
- /package/dist/{chunk-YVODOJZG.js.map → chunk-TBOH54QP.js.map} +0 -0
- /package/dist/{chunk-GFMRMSFN.js.map → chunk-TG2GO424.js.map} +0 -0
- /package/dist/{chunk-ZAGLLXX5.js.map → chunk-TOJNLC42.js.map} +0 -0
- /package/dist/{chunk-OSQ6YGZW.js.map → chunk-TW75KM7T.js.map} +0 -0
- /package/dist/{chunk-7CIMPDGL.js.map → chunk-TWWAPJYE.js.map} +0 -0
- /package/dist/{chunk-STTCF3OR.js.map → chunk-UARZCGWU.js.map} +0 -0
- /package/dist/{chunk-F7NV3EL5.js.map → chunk-UCNTAS2U.js.map} +0 -0
- /package/dist/{chunk-XF55A7CC.js.map → chunk-UD7IARSL.js.map} +0 -0
- /package/dist/{chunk-M3WCB73E.js.map → chunk-UDKZKGUQ.js.map} +0 -0
- /package/dist/{chunk-VMJN6YQL.js.map → chunk-UJRSZ6ZB.js.map} +0 -0
- /package/dist/{chunk-236GMLCR.js.map → chunk-UTM23O3G.js.map} +0 -0
- /package/dist/{chunk-3VSKLEUE.js.map → chunk-UUJSS56V.js.map} +0 -0
- /package/dist/{chunk-T3WYQHAO.js.map → chunk-UWSF733U.js.map} +0 -0
- /package/dist/{chunk-I57PYKVN.js.map → chunk-V4ZYJWU3.js.map} +0 -0
- /package/dist/{chunk-FUJ6DWRZ.js.map → chunk-VEIT2EGK.js.map} +0 -0
- /package/dist/{chunk-LH3SDMDC.js.map → chunk-VGG6DOTN.js.map} +0 -0
- /package/dist/{chunk-RG7PMYWW.js.map → chunk-VGSGAQJX.js.map} +0 -0
- /package/dist/{chunk-YGPMLIFT.js.map → chunk-VHK5CBIG.js.map} +0 -0
- /package/dist/{chunk-QTT5574G.js.map → chunk-VLA2DTYG.js.map} +0 -0
- /package/dist/{chunk-GJFTPSGN.js.map → chunk-VSN6XKZ5.js.map} +0 -0
- /package/dist/{chunk-5CGZOJN7.js.map → chunk-VW6TOTDQ.js.map} +0 -0
- /package/dist/{chunk-6MSTIFAL.js.map → chunk-W3HKBWPM.js.map} +0 -0
- /package/dist/{chunk-LQDSZPB5.js.map → chunk-WDYM5SFM.js.map} +0 -0
- /package/dist/{chunk-DLMMQMKZ.js.map → chunk-WJ4AZ2AR.js.map} +0 -0
- /package/dist/{chunk-Y3TQ2M2O.js.map → chunk-WMQHP4E3.js.map} +0 -0
- /package/dist/{chunk-H6DJIEO6.js.map → chunk-WP5A6F6P.js.map} +0 -0
- /package/dist/{chunk-GQF2HWQE.js.map → chunk-WWQH3L6M.js.map} +0 -0
- /package/dist/{chunk-2FLGURHP.js.map → chunk-X3T6ULUZ.js.map} +0 -0
- /package/dist/{chunk-QHGWFKTK.js.map → chunk-XA32OUL4.js.map} +0 -0
- /package/dist/{chunk-2ZC62PY4.js.map → chunk-XCICIQIE.js.map} +0 -0
- /package/dist/{chunk-ADFUTR45.js.map → chunk-XHRIUCBD.js.map} +0 -0
- /package/dist/{chunk-UTFX46TK.js.map → chunk-XJBWVT5X.js.map} +0 -0
- /package/dist/{chunk-SY6V3Z2U.js.map → chunk-XKQRWJFE.js.map} +0 -0
- /package/dist/{chunk-VWEGG7JQ.js.map → chunk-XN3EVUB5.js.map} +0 -0
- /package/dist/{chunk-DGS62JWP.js.map → chunk-XT6GBN2G.js.map} +0 -0
- /package/dist/{chunk-RWWQLVGV.js.map → chunk-XYVDTM4D.js.map} +0 -0
- /package/dist/{chunk-67JCL67N.js.map → chunk-XZO5X3KH.js.map} +0 -0
- /package/dist/{chunk-DCML4SXQ.js.map → chunk-Y34DIEOG.js.map} +0 -0
- /package/dist/{chunk-UJKVMFFF.js.map → chunk-YAIYUFCX.js.map} +0 -0
- /package/dist/{chunk-24S44WBL.js.map → chunk-YFLRBEDS.js.map} +0 -0
- /package/dist/{chunk-RLS563ST.js.map → chunk-YQX227EF.js.map} +0 -0
- /package/dist/{chunk-YNIDJOGT.js.map → chunk-YVAB57JZ.js.map} +0 -0
- /package/dist/{chunk-YN6UVG4Z.js.map → chunk-YWHSODBB.js.map} +0 -0
- /package/dist/{chunk-3NMKLLEB.js.map → chunk-YWJHCJQW.js.map} +0 -0
- /package/dist/{chunk-4YJGB22T.js.map → chunk-Z37DSW2K.js.map} +0 -0
- /package/dist/{chunk-72PGXQDN.js.map → chunk-ZELN2B72.js.map} +0 -0
- /package/dist/{chunk-4YNWA5YG.js.map → chunk-ZFGGR2JW.js.map} +0 -0
- /package/dist/{chunk-O3C4BASC.js.map → chunk-ZL7SEED7.js.map} +0 -0
- /package/dist/{computer-viewer-ZISZUM4L.js.map → computer-viewer-CNYFTUGF.js.map} +0 -0
- /package/dist/{embedded-new-voice-UWSSA7AB.js.map → embedded-new-voice-A56WDECM.js.map} +0 -0
- /package/dist/{embedded-voice-T34K465A.js.map → embedded-voice-CBTSMIWW.js.map} +0 -0
- /package/dist/{fleet-decision-row-REAWMEHI.js.map → fleet-decision-row-6PQTGI2U.js.map} +0 -0
- /package/dist/{model-policy-picker-menu-2CTRKSDJ.js.map → model-policy-picker-menu-ZU72JATS.js.map} +0 -0
- /package/dist/{platform-activity-row-EZYTZPYR.js.map → platform-activity-row-5IQT6R5Z.js.map} +0 -0
- /package/dist/{recorder-host-6HFQQTNI.js.map → recorder-host-G5M676VM.js.map} +0 -0
- /package/dist/{sandbox-files-6JY7WVMO.js.map → sandbox-files-HCXOP6ZO.js.map} +0 -0
- /package/dist/{session-connect-cards-VTSJODCX.js.map → session-connect-cards-MYJRQWSA.js.map} +0 -0
- /package/dist/{session-realtime-G3ZGG3KR.js.map → session-realtime-YFVGQFJK.js.map} +0 -0
- /package/dist/{timeline-annotation-markers-S6DMHCI6.js.map → timeline-annotation-markers-5ELTFV5B.js.map} +0 -0
- /package/dist/{timeline-annotation-selection-UFZOKL5E.js.map → timeline-annotation-selection-XHUOFRIY.js.map} +0 -0
- /package/dist/{timeline-annotations-dialog-FPJ4MPHD.js.map → timeline-annotations-dialog-X2VNDYZ4.js.map} +0 -0
package/dist/chunk-3VSKLEUE.js
DELETED
|
@@ -1,4570 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import {
|
|
3
|
-
OwnLoginsSharedHeadsUp,
|
|
4
|
-
ownLoginsInUse
|
|
5
|
-
} from "./chunk-LFMTPBET.js";
|
|
6
|
-
import {
|
|
7
|
-
OPEN_PULL_REQUEST_MESSAGE,
|
|
8
|
-
SessionLinkedPanel,
|
|
9
|
-
openPullRequestFromLinks,
|
|
10
|
-
useSessionLinks
|
|
11
|
-
} from "./chunk-Y5HXP2NR.js";
|
|
12
|
-
import {
|
|
13
|
-
ModelRecoveryNotice
|
|
14
|
-
} from "./chunk-I46F7LUI.js";
|
|
15
|
-
import {
|
|
16
|
-
HumanInputDelegationRecord
|
|
17
|
-
} from "./chunk-Q5AQJQXU.js";
|
|
18
|
-
import {
|
|
19
|
-
ReadOnlySessionNotice,
|
|
20
|
-
sessionReadOnlyArchive
|
|
21
|
-
} from "./chunk-KW4OJ3RS.js";
|
|
22
|
-
import {
|
|
23
|
-
useMessageSenderRenderer
|
|
24
|
-
} from "./chunk-RDEPVRWS.js";
|
|
25
|
-
import {
|
|
26
|
-
SessionWorkspace
|
|
27
|
-
} from "./chunk-3GENISSH.js";
|
|
28
|
-
import {
|
|
29
|
-
ArtifactLinkBoundary
|
|
30
|
-
} from "./chunk-EAMY5HXA.js";
|
|
31
|
-
import {
|
|
32
|
-
TerminalSessionArchive,
|
|
33
|
-
TerminalSessionBanner,
|
|
34
|
-
UserMessageBody
|
|
35
|
-
} from "./chunk-4T2RJ2HY.js";
|
|
36
|
-
import {
|
|
37
|
-
descendantsRunning,
|
|
38
|
-
hintTouchesTree,
|
|
39
|
-
isSubSessionResponseOutput,
|
|
40
|
-
lineageSessionIds,
|
|
41
|
-
subSessionResponseCallIds,
|
|
42
|
-
waitingDescendants
|
|
43
|
-
} from "./chunk-36IKHM4Q.js";
|
|
44
|
-
import {
|
|
45
|
-
UnavailableModelNotice
|
|
46
|
-
} from "./chunk-RDBSUNNS.js";
|
|
47
|
-
import {
|
|
48
|
-
CodexUsageNotice,
|
|
49
|
-
ModelSwitchHeadsUp
|
|
50
|
-
} from "./chunk-OMPVOMPP.js";
|
|
51
|
-
import {
|
|
52
|
-
SessionPullRequestPanel,
|
|
53
|
-
mergePullRequestMessage,
|
|
54
|
-
pullRequestLinkFromLinks,
|
|
55
|
-
pullRequestNumber
|
|
56
|
-
} from "./chunk-2XZ3EUSP.js";
|
|
57
|
-
import {
|
|
58
|
-
SessionMachinePickerAction,
|
|
59
|
-
SessionRunsOnMenuBody,
|
|
60
|
-
useSessionRunsOn
|
|
61
|
-
} from "./chunk-RQAE6DI7.js";
|
|
62
|
-
import {
|
|
63
|
-
secretSaveTargets
|
|
64
|
-
} from "./chunk-P46SRX7L.js";
|
|
65
|
-
import {
|
|
66
|
-
chatLearningScope
|
|
67
|
-
} from "./chunk-SCN7CKBA.js";
|
|
68
|
-
import {
|
|
69
|
-
useFixedRigScope,
|
|
70
|
-
usePersonalResourceAttachment
|
|
71
|
-
} from "./chunk-JQD7MFME.js";
|
|
72
|
-
import {
|
|
73
|
-
clearGitHubInstallRequest,
|
|
74
|
-
recordGitHubInstallRequest
|
|
75
|
-
} from "./chunk-PVNI2KHS.js";
|
|
76
|
-
import {
|
|
77
|
-
connectableSubscriptions,
|
|
78
|
-
isDeploymentFreeModel
|
|
79
|
-
} from "./chunk-ZP3QCPYG.js";
|
|
80
|
-
import {
|
|
81
|
-
useSessionOpening
|
|
82
|
-
} from "./chunk-QZKM4S2G.js";
|
|
83
|
-
import {
|
|
84
|
-
useStreamHealthTelemetry
|
|
85
|
-
} from "./chunk-PRUVBCX6.js";
|
|
86
|
-
import {
|
|
87
|
-
applySessionAttentionProjection,
|
|
88
|
-
notifySessionAttentionChanged,
|
|
89
|
-
sessionReadProjectionKey,
|
|
90
|
-
shouldAcknowledgeActiveSession,
|
|
91
|
-
shouldProjectActiveSessionRead,
|
|
92
|
-
updateLocalSessionDeliveryAttention
|
|
93
|
-
} from "./chunk-CCY2NBAC.js";
|
|
94
|
-
import {
|
|
95
|
-
isCodexUsageLimitFailure,
|
|
96
|
-
latestTurnFailedOnUsageLimit,
|
|
97
|
-
sessionModelMissingFromCatalog,
|
|
98
|
-
unavailableModelName,
|
|
99
|
-
unavailableModelReplacement
|
|
100
|
-
} from "./chunk-BPHPAGYF.js";
|
|
101
|
-
import {
|
|
102
|
-
isTerminalSessionStatus,
|
|
103
|
-
projectSessionTimeline,
|
|
104
|
-
summarizeSessionFailure
|
|
105
|
-
} from "./chunk-75LF7LSI.js";
|
|
106
|
-
import {
|
|
107
|
-
needsSandboxRecoveryCheck
|
|
108
|
-
} from "./chunk-IIFO2H3P.js";
|
|
109
|
-
import {
|
|
110
|
-
useBackgroundAttentionTitle
|
|
111
|
-
} from "./chunk-H2YTTK7Z.js";
|
|
112
|
-
import {
|
|
113
|
-
readSessionDockNavigation,
|
|
114
|
-
sessionDockLayoutStorageId,
|
|
115
|
-
updateSessionDockNavigation
|
|
116
|
-
} from "./chunk-ESYN5AUB.js";
|
|
117
|
-
import {
|
|
118
|
-
createFailedSessionRetry
|
|
119
|
-
} from "./chunk-DW3URGMX.js";
|
|
120
|
-
import {
|
|
121
|
-
MACHINE_ACCESS_REQUIRED_CODE,
|
|
122
|
-
chatComposerPlaceholder,
|
|
123
|
-
detailBeyondHeadline,
|
|
124
|
-
failedSessionCopy,
|
|
125
|
-
failureFallbackReason
|
|
126
|
-
} from "./chunk-SY6V3Z2U.js";
|
|
127
|
-
import {
|
|
128
|
-
noteTurnFailureAction
|
|
129
|
-
} from "./chunk-EJBK7SWK.js";
|
|
130
|
-
import {
|
|
131
|
-
moveChatToMachine
|
|
132
|
-
} from "./chunk-VUNGU657.js";
|
|
133
|
-
import {
|
|
134
|
-
sessionTimelineEmptyStateCopy
|
|
135
|
-
} from "./chunk-FBQXXJV3.js";
|
|
136
|
-
import {
|
|
137
|
-
useCodexUsageModelSwitch
|
|
138
|
-
} from "./chunk-Z2C2LA2F.js";
|
|
139
|
-
import {
|
|
140
|
-
bannerFailureEventIds,
|
|
141
|
-
timelineShowsFailure
|
|
142
|
-
} from "./chunk-QPUNVMF6.js";
|
|
143
|
-
import {
|
|
144
|
-
currentModelRecovery
|
|
145
|
-
} from "./chunk-GMYWC2UP.js";
|
|
146
|
-
import {
|
|
147
|
-
useReadSessionInbox
|
|
148
|
-
} from "./chunk-ROC2ZGXP.js";
|
|
149
|
-
import {
|
|
150
|
-
PersonalResourceAttachmentSurface
|
|
151
|
-
} from "./chunk-PBCSPCF6.js";
|
|
152
|
-
import {
|
|
153
|
-
FailureRecoveryBoundary
|
|
154
|
-
} from "./chunk-EQ263DHZ.js";
|
|
155
|
-
import {
|
|
156
|
-
FollowUpRepositoryMenuBody
|
|
157
|
-
} from "./chunk-AU2DT7O2.js";
|
|
158
|
-
import {
|
|
159
|
-
ChatPaymentPages
|
|
160
|
-
} from "./chunk-UPRN4FBY.js";
|
|
161
|
-
import {
|
|
162
|
-
MarkdownText
|
|
163
|
-
} from "./chunk-NU4HYZ3C.js";
|
|
164
|
-
import {
|
|
165
|
-
useWorkspaceAppLinkResolver
|
|
166
|
-
} from "./chunk-YTPE3KKV.js";
|
|
167
|
-
import {
|
|
168
|
-
useArtifactCatalogMutationInvalidation
|
|
169
|
-
} from "./chunk-JUJ6QCI2.js";
|
|
170
|
-
import {
|
|
171
|
-
ChatViewportFileDropTarget
|
|
172
|
-
} from "./chunk-CMH22OQY.js";
|
|
173
|
-
import {
|
|
174
|
-
FORK_CURRENT_CHAT_EVENT,
|
|
175
|
-
useRail
|
|
176
|
-
} from "./chunk-YNIDJOGT.js";
|
|
177
|
-
import {
|
|
178
|
-
canArchiveChat,
|
|
179
|
-
requestSessionArchive
|
|
180
|
-
} from "./chunk-OH6KP4JB.js";
|
|
181
|
-
import {
|
|
182
|
-
FOCUS_SESSION_COMPOSER_EVENT,
|
|
183
|
-
consumeSessionComposerFocusIntent,
|
|
184
|
-
focusSessionComposerWhenReady,
|
|
185
|
-
sessionComposerFocusIntentIsEligible
|
|
186
|
-
} from "./chunk-MMY23KS7.js";
|
|
187
|
-
import {
|
|
188
|
-
OPEN_CONVERSATION_FIND_EVENT
|
|
189
|
-
} from "./chunk-7ZEGSUR7.js";
|
|
190
|
-
import {
|
|
191
|
-
notifySessionListChanged
|
|
192
|
-
} from "./chunk-O5S57N6H.js";
|
|
193
|
-
import {
|
|
194
|
-
isEditableArtifactKind
|
|
195
|
-
} from "./chunk-V3VEPKOK.js";
|
|
196
|
-
import {
|
|
197
|
-
expireArtifactCatalog
|
|
198
|
-
} from "./chunk-7NLCCKNJ.js";
|
|
199
|
-
import {
|
|
200
|
-
useConnectionAccounts
|
|
201
|
-
} from "./chunk-XDHSB2EY.js";
|
|
202
|
-
import {
|
|
203
|
-
SessionSecretsMenuBody,
|
|
204
|
-
sessionSecretsSummary
|
|
205
|
-
} from "./chunk-R6CFPY3F.js";
|
|
206
|
-
import {
|
|
207
|
-
useWorkspaceMachines
|
|
208
|
-
} from "./chunk-UBSHJB6M.js";
|
|
209
|
-
import {
|
|
210
|
-
OPEN_SESSION_USAGE_LIMIT_EVENT,
|
|
211
|
-
goalPausedAtUsageLimit,
|
|
212
|
-
lineageHasRunningSession,
|
|
213
|
-
sessionUsageLimitCapability,
|
|
214
|
-
usageLimitRefusalFromState,
|
|
215
|
-
useSessionUsageLimit
|
|
216
|
-
} from "./chunk-FREJ2WS3.js";
|
|
217
|
-
import {
|
|
218
|
-
ComposerSendBlockerNotice,
|
|
219
|
-
composerSendBlockerNotice,
|
|
220
|
-
getComposerSendBlocker,
|
|
221
|
-
pickerPolicyRunnable
|
|
222
|
-
} from "./chunk-LFQI2C46.js";
|
|
223
|
-
import {
|
|
224
|
-
coveredModelChoice,
|
|
225
|
-
creditRefusalGap,
|
|
226
|
-
freeCreditGap
|
|
227
|
-
} from "./chunk-U5D3K53R.js";
|
|
228
|
-
import {
|
|
229
|
-
EMPTY_COMPOSER_LAUNCH,
|
|
230
|
-
composerLaunchSearchAfterPolicyApply,
|
|
231
|
-
composerLaunchSearchKey
|
|
232
|
-
} from "./chunk-Y3YJJL7X.js";
|
|
233
|
-
import {
|
|
234
|
-
useFollowUpRepositories
|
|
235
|
-
} from "./chunk-GKOIWZ4C.js";
|
|
236
|
-
import {
|
|
237
|
-
WorkspaceComposerPlus
|
|
238
|
-
} from "./chunk-DHXRMZPQ.js";
|
|
239
|
-
import {
|
|
240
|
-
connectorSelectionUpdate,
|
|
241
|
-
followWorkspaceConnectorPolicy,
|
|
242
|
-
sessionConnectorPolicyIsCustomized
|
|
243
|
-
} from "./chunk-Y2LD4FTV.js";
|
|
244
|
-
import {
|
|
245
|
-
startMcpOAuthWithTimeout
|
|
246
|
-
} from "./chunk-HUKUDAIP.js";
|
|
247
|
-
import {
|
|
248
|
-
catalogConnectionAccountSelection,
|
|
249
|
-
oauthConnectionOwnership,
|
|
250
|
-
oauthConnectionRef,
|
|
251
|
-
oauthResumeAction
|
|
252
|
-
} from "./chunk-3IZD3YKQ.js";
|
|
253
|
-
import {
|
|
254
|
-
observeSessionTurnEvents
|
|
255
|
-
} from "./chunk-55S3W7RZ.js";
|
|
256
|
-
import {
|
|
257
|
-
githubAppConnectRequest
|
|
258
|
-
} from "./chunk-LCTGE6YK.js";
|
|
259
|
-
import {
|
|
260
|
-
useWorkspaceModelCatalog
|
|
261
|
-
} from "./chunk-W7UFWXZ6.js";
|
|
262
|
-
import {
|
|
263
|
-
ConsoleComposer
|
|
264
|
-
} from "./chunk-EJYHPNXD.js";
|
|
265
|
-
import {
|
|
266
|
-
useSessionRouteMemory
|
|
267
|
-
} from "./chunk-BIFVQ3GP.js";
|
|
268
|
-
import {
|
|
269
|
-
CONSOLE_TIMELINE_ALLOWANCE_LABELS
|
|
270
|
-
} from "./chunk-OF22GYK5.js";
|
|
271
|
-
import {
|
|
272
|
-
useSessionUiFeature
|
|
273
|
-
} from "./chunk-FWXMQTVG.js";
|
|
274
|
-
import {
|
|
275
|
-
ModelPicker
|
|
276
|
-
} from "./chunk-GH4VY3H5.js";
|
|
277
|
-
import {
|
|
278
|
-
isApiErrorStatus,
|
|
279
|
-
useAppApi
|
|
280
|
-
} from "./chunk-7CBEL7FY.js";
|
|
281
|
-
import {
|
|
282
|
-
LoadingPanel,
|
|
283
|
-
ProblemPanel
|
|
284
|
-
} from "./chunk-57SYHNG5.js";
|
|
285
|
-
import {
|
|
286
|
-
useBrowserAccountBridgeBlocker
|
|
287
|
-
} from "./chunk-7LP3W5H5.js";
|
|
288
|
-
import {
|
|
289
|
-
WORKBENCH_TAB_CHANGES,
|
|
290
|
-
initialWorkspaceTab,
|
|
291
|
-
sessionAuthRecommendation
|
|
292
|
-
} from "./chunk-CHKHQHOO.js";
|
|
293
|
-
import {
|
|
294
|
-
useSessionSecrets
|
|
295
|
-
} from "./chunk-E66NENKJ.js";
|
|
296
|
-
import {
|
|
297
|
-
SessionAdmissionNotice,
|
|
298
|
-
SessionMachineAccessNotice
|
|
299
|
-
} from "./chunk-5ORXRVXV.js";
|
|
300
|
-
import {
|
|
301
|
-
ApprovalSurface,
|
|
302
|
-
MessageTimeline,
|
|
303
|
-
SessionChrome,
|
|
304
|
-
useLiveSessionEvents
|
|
305
|
-
} from "./chunk-3775TQE5.js";
|
|
306
|
-
import {
|
|
307
|
-
AuthNeededRow
|
|
308
|
-
} from "./chunk-U4EMW7RP.js";
|
|
309
|
-
import {
|
|
310
|
-
KnowledgeActivityProvider,
|
|
311
|
-
LearningRefusalActionsProvider,
|
|
312
|
-
ToolActionReviewDetails,
|
|
313
|
-
ToolReviewHistoryProvider,
|
|
314
|
-
createSessionRetainedScreenshotLoader,
|
|
315
|
-
createWorkspaceRetainedArtifactLoader,
|
|
316
|
-
createWorkspaceRetainedVideoLoader
|
|
317
|
-
} from "./chunk-5JOTMM3F.js";
|
|
318
|
-
import {
|
|
319
|
-
creationHandoffReconciled
|
|
320
|
-
} from "./chunk-UKZ3SGNF.js";
|
|
321
|
-
import {
|
|
322
|
-
markIntegrationConnectRedirect
|
|
323
|
-
} from "./chunk-ZEOWTFDQ.js";
|
|
324
|
-
import {
|
|
325
|
-
mergeSessionContextProjection,
|
|
326
|
-
mergeSessionDetailReadProjection
|
|
327
|
-
} from "./chunk-PL325D3F.js";
|
|
328
|
-
import {
|
|
329
|
-
creditRefusalRecord
|
|
330
|
-
} from "./chunk-OZNF2JEJ.js";
|
|
331
|
-
import {
|
|
332
|
-
useSimplifiedInterface
|
|
333
|
-
} from "./chunk-UJAWA3N2.js";
|
|
334
|
-
import {
|
|
335
|
-
useNavigate,
|
|
336
|
-
usePage,
|
|
337
|
-
useRouterState
|
|
338
|
-
} from "./chunk-C52N45PY.js";
|
|
339
|
-
import {
|
|
340
|
-
toast
|
|
341
|
-
} from "./chunk-O4EA4F3W.js";
|
|
342
|
-
import {
|
|
343
|
-
clientFirstPartyMcpToolPolicy,
|
|
344
|
-
firstPartySessionToolOptionsFor,
|
|
345
|
-
sessionPolicyPickerIds
|
|
346
|
-
} from "./chunk-AK2634UU.js";
|
|
347
|
-
import {
|
|
348
|
-
canConnectWorkspaceMcpFromChat,
|
|
349
|
-
hasAccountPermission,
|
|
350
|
-
hasWorkspacePermission
|
|
351
|
-
} from "./chunk-EQSXKGTW.js";
|
|
352
|
-
import {
|
|
353
|
-
isPersonalWorkspace
|
|
354
|
-
} from "./chunk-LBSXJVHD.js";
|
|
355
|
-
import {
|
|
356
|
-
t
|
|
357
|
-
} from "./chunk-KSDCQPJY.js";
|
|
358
|
-
import {
|
|
359
|
-
createSessionEventFeedStore,
|
|
360
|
-
useAppContext
|
|
361
|
-
} from "./chunk-7GGVDTCZ.js";
|
|
362
|
-
import {
|
|
363
|
-
isPersonalMachine,
|
|
364
|
-
machineUseMessage,
|
|
365
|
-
personalMachineUseIntent
|
|
366
|
-
} from "./chunk-CNQMJH2Q.js";
|
|
367
|
-
import {
|
|
368
|
-
useHostMessageContext,
|
|
369
|
-
useReportSessionState
|
|
370
|
-
} from "./chunk-BFBHLYNE.js";
|
|
371
|
-
import {
|
|
372
|
-
SessionUsageLimitNotice
|
|
373
|
-
} from "./chunk-RAUWORZV.js";
|
|
374
|
-
import {
|
|
375
|
-
sessionAgentsSignal
|
|
376
|
-
} from "./chunk-5TJ5LLWK.js";
|
|
377
|
-
import {
|
|
378
|
-
loadSessionFeedback,
|
|
379
|
-
turnRatingsFromFeedback
|
|
380
|
-
} from "./chunk-EKBP5ERC.js";
|
|
381
|
-
import {
|
|
382
|
-
useSessionLineage
|
|
383
|
-
} from "./chunk-MYIBFGSQ.js";
|
|
384
|
-
import {
|
|
385
|
-
conversationTimeline,
|
|
386
|
-
useGoal,
|
|
387
|
-
useHumanInputRequests,
|
|
388
|
-
useSession,
|
|
389
|
-
useSessionEvents,
|
|
390
|
-
useSessionStartupTimeline,
|
|
391
|
-
useTurnQueue
|
|
392
|
-
} from "./chunk-TL6UOSMX.js";
|
|
393
|
-
import {
|
|
394
|
-
SessionStartupProvider
|
|
395
|
-
} from "./chunk-D6LH6JPE.js";
|
|
396
|
-
import {
|
|
397
|
-
uploadScopeForSession,
|
|
398
|
-
useFileAttachments
|
|
399
|
-
} from "./chunk-IE5MZEOM.js";
|
|
400
|
-
import {
|
|
401
|
-
approvalsDecidable,
|
|
402
|
-
projectPendingApprovals
|
|
403
|
-
} from "./chunk-GFUDB3SA.js";
|
|
404
|
-
import {
|
|
405
|
-
creditExhaustedFromEvents,
|
|
406
|
-
creditRefusalFromEvents,
|
|
407
|
-
timelineLivePause
|
|
408
|
-
} from "./chunk-IYKO6BBK.js";
|
|
409
|
-
import {
|
|
410
|
-
admissionControlNeedsRefresh,
|
|
411
|
-
admissionRecheckControl,
|
|
412
|
-
allowMachineForChat,
|
|
413
|
-
currentSessionMachineAccess,
|
|
414
|
-
recheckSessionAdmission,
|
|
415
|
-
sessionAdmissionNeedsDifferentMachine,
|
|
416
|
-
sessionAdmissionReason,
|
|
417
|
-
sessionAdmissionShowsMachineAccess
|
|
418
|
-
} from "./chunk-MRNAHGBL.js";
|
|
419
|
-
import {
|
|
420
|
-
sessionAttentionReadThroughSequence
|
|
421
|
-
} from "./chunk-IOBL5KYR.js";
|
|
422
|
-
import {
|
|
423
|
-
connectorLogo,
|
|
424
|
-
connectorLogoIndex
|
|
425
|
-
} from "./chunk-I5UOUBST.js";
|
|
426
|
-
import {
|
|
427
|
-
useUiEventTarget
|
|
428
|
-
} from "./chunk-WGPLDFEC.js";
|
|
429
|
-
import {
|
|
430
|
-
cn
|
|
431
|
-
} from "./chunk-A3MTTRCX.js";
|
|
432
|
-
import {
|
|
433
|
-
LazyPart,
|
|
434
|
-
retainedImageId
|
|
435
|
-
} from "./chunk-3IEVQMGO.js";
|
|
436
|
-
import {
|
|
437
|
-
EmptyState
|
|
438
|
-
} from "./chunk-2SXBLCWQ.js";
|
|
439
|
-
import {
|
|
440
|
-
apiErrorFacts,
|
|
441
|
-
userErrorText
|
|
442
|
-
} from "./chunk-UJQMDNZ5.js";
|
|
443
|
-
import {
|
|
444
|
-
OpenGeniLinkProvider
|
|
445
|
-
} from "./chunk-W4QUDV6Y.js";
|
|
446
|
-
import {
|
|
447
|
-
isCodexProductModel,
|
|
448
|
-
sessionDisplayTitle,
|
|
449
|
-
sessionHasPendingWake,
|
|
450
|
-
sessionInputWait,
|
|
451
|
-
withLineageAutomationFacts
|
|
452
|
-
} from "./chunk-6GCMLYER.js";
|
|
453
|
-
import {
|
|
454
|
-
promptSendDestination,
|
|
455
|
-
sessionAdmissionBlocked,
|
|
456
|
-
sessionDisplayStatus,
|
|
457
|
-
sessionTurnKeepsRunControl
|
|
458
|
-
} from "./chunk-DG5DQFS4.js";
|
|
459
|
-
import {
|
|
460
|
-
InteractiveAnswerProvider,
|
|
461
|
-
browserInteractiveAnswerStore
|
|
462
|
-
} from "./chunk-OONTDHBV.js";
|
|
463
|
-
import {
|
|
464
|
-
authNeededPresentation
|
|
465
|
-
} from "./chunk-5R3Z7JFD.js";
|
|
466
|
-
import {
|
|
467
|
-
stopOwnLoginsHere,
|
|
468
|
-
turnOnOwnLoginsHere
|
|
469
|
-
} from "./chunk-SDFG5Q4G.js";
|
|
470
|
-
import {
|
|
471
|
-
attachSessionCapability,
|
|
472
|
-
completeSessionCapabilityOAuth,
|
|
473
|
-
continueAfterCapabilitySetup
|
|
474
|
-
} from "./chunk-ALLBOTP7.js";
|
|
475
|
-
import {
|
|
476
|
-
inertProps
|
|
477
|
-
} from "./chunk-USG4XNMA.js";
|
|
478
|
-
import {
|
|
479
|
-
MACHINES_SESSION_POLL_MS
|
|
480
|
-
} from "./chunk-4XEPZARK.js";
|
|
481
|
-
import {
|
|
482
|
-
machineDisplayName,
|
|
483
|
-
sessionComputeLabel
|
|
484
|
-
} from "./chunk-2TBRW7I6.js";
|
|
485
|
-
import {
|
|
486
|
-
useCalmServiceFailure,
|
|
487
|
-
useComposerWithStreamState
|
|
488
|
-
} from "./chunk-SVKPSCTH.js";
|
|
489
|
-
import {
|
|
490
|
-
useQueuedPromptRecall
|
|
491
|
-
} from "./chunk-2NPJEEJ5.js";
|
|
492
|
-
import {
|
|
493
|
-
useComposer
|
|
494
|
-
} from "./chunk-IEUZ4ASX.js";
|
|
495
|
-
import {
|
|
496
|
-
LightboxProvider
|
|
497
|
-
} from "./chunk-YRJZYQ5A.js";
|
|
498
|
-
import {
|
|
499
|
-
Button
|
|
500
|
-
} from "./chunk-7QQN3KNP.js";
|
|
501
|
-
import {
|
|
502
|
-
usePortalContainer
|
|
503
|
-
} from "./chunk-UD6AAZSC.js";
|
|
504
|
-
import {
|
|
505
|
-
isModelUnavailableSubmissionError,
|
|
506
|
-
isSessionUsageLimitSubmissionError
|
|
507
|
-
} from "./chunk-UIK52VL4.js";
|
|
508
|
-
import {
|
|
509
|
-
useDebouncedCallback,
|
|
510
|
-
useSessionEventTrigger
|
|
511
|
-
} from "./chunk-SW4S6I5E.js";
|
|
512
|
-
import {
|
|
513
|
-
useOpenGeni
|
|
514
|
-
} from "./chunk-BVUAHAQX.js";
|
|
515
|
-
import {
|
|
516
|
-
findPickerRow
|
|
517
|
-
} from "./chunk-4VEIBNC2.js";
|
|
518
|
-
|
|
519
|
-
// src/app/routes/session.tsx
|
|
520
|
-
import { Fragment } from "react";
|
|
521
|
-
|
|
522
|
-
// src/app/routes/session-capability-oauth-return.ts
|
|
523
|
-
async function finishMcpCapabilityOAuthReturn(input) {
|
|
524
|
-
const { client, workspaceId, sessionId, params } = input;
|
|
525
|
-
const item = input.catalog.find((candidate) => candidate.id === input.capabilityId);
|
|
526
|
-
const connectionId = params.get("connectionId");
|
|
527
|
-
const providerDomain = params.get("providerDomain");
|
|
528
|
-
const ownership = oauthConnectionOwnership(params.get("ownership"));
|
|
529
|
-
if (!item || item.kind !== "mcp" || !connectionId || !providerDomain || !ownership) {
|
|
530
|
-
throw new Error("The authorized capability could not be resolved from the live catalog.");
|
|
531
|
-
}
|
|
532
|
-
const current = params.get("capability") ? (await client.listCapabilities(workspaceId)).items.find(
|
|
533
|
-
(candidate) => candidate.id === item.id
|
|
534
|
-
) ?? item : item;
|
|
535
|
-
if (oauthResumeAction(current, connectionId) !== "reconnect") {
|
|
536
|
-
await client.enableCapability(workspaceId, item.id, {
|
|
537
|
-
connectionRef: oauthConnectionRef(
|
|
538
|
-
ownership,
|
|
539
|
-
connectionId,
|
|
540
|
-
providerDomain,
|
|
541
|
-
catalogConnectionAccountSelection(current)
|
|
542
|
-
)
|
|
543
|
-
});
|
|
544
|
-
}
|
|
545
|
-
await input.refreshCatalog(workspaceId);
|
|
546
|
-
const connected = (await client.listCapabilities(workspaceId)).items.find(
|
|
547
|
-
(candidate) => candidate.id === item.id
|
|
548
|
-
);
|
|
549
|
-
if (!connected?.enabled)
|
|
550
|
-
throw new Error("The connection was authorized, but enabling its tools could not be verified.");
|
|
551
|
-
if (connected.connectionRef?.subjectScope === "subject")
|
|
552
|
-
return { name: item.name, needsPersonalReview: true };
|
|
553
|
-
await attachSessionCapability(t, client, workspaceId, sessionId, connected);
|
|
554
|
-
continueAfterCapabilitySetup(client, workspaceId, sessionId, connected.id);
|
|
555
|
-
return { name: item.name, needsPersonalReview: false };
|
|
556
|
-
}
|
|
557
|
-
|
|
558
|
-
// src/app/lib/session-composer-readiness.ts
|
|
559
|
-
import { useCallback, useLayoutEffect, useMemo, useState } from "react";
|
|
560
|
-
function useSessionSendGate() {
|
|
561
|
-
const [committedPolicyValid, commitPolicyValid] = useState(false);
|
|
562
|
-
const blocker = useCallback(
|
|
563
|
-
(state) => getComposerSendBlocker({
|
|
564
|
-
uploadPending: state.uploadPending,
|
|
565
|
-
repositoryError: state.repositoryError,
|
|
566
|
-
policyValid: committedPolicyValid,
|
|
567
|
-
personalDecision: state.personalDecision,
|
|
568
|
-
machineAccessDenied: state.machineAccessDenied,
|
|
569
|
-
personalLoading: state.loading,
|
|
570
|
-
loadFailed: state.loadFailed
|
|
571
|
-
}),
|
|
572
|
-
[committedPolicyValid]
|
|
573
|
-
);
|
|
574
|
-
return { committedPolicyValid, commitPolicyValid, blocker };
|
|
575
|
-
}
|
|
576
|
-
function useSessionComposerDelivery(composer, gate, {
|
|
577
|
-
policyValid,
|
|
578
|
-
catalogLoading,
|
|
579
|
-
replacingModel,
|
|
580
|
-
send
|
|
581
|
-
}) {
|
|
582
|
-
const { commitPolicyValid, committedPolicyValid } = gate;
|
|
583
|
-
useLayoutEffect(() => {
|
|
584
|
-
commitPolicyValid(policyValid);
|
|
585
|
-
}, [commitPolicyValid, policyValid]);
|
|
586
|
-
const preparing = composer.preparing === true || policyValid !== committedPolicyValid || catalogLoading && !policyValid || replacingModel || send.loading;
|
|
587
|
-
return useMemo(
|
|
588
|
-
() => composer.preparing === true === preparing ? composer : { ...composer, preparing },
|
|
589
|
-
[composer, preparing]
|
|
590
|
-
);
|
|
591
|
-
}
|
|
592
|
-
|
|
593
|
-
// src/app/routes/session.tsx
|
|
594
|
-
import { reserveBrowserConnectNavigation } from "@opengeni/connect/browser-navigation";
|
|
595
|
-
|
|
596
|
-
// src/app/lib/use-descendant-requests-refresh.ts
|
|
597
|
-
import { useCallback as useCallback2, useEffect, useMemo as useMemo2, useRef, useState as useState2 } from "react";
|
|
598
|
-
var LINEAGE_POLL_MS = 3e4;
|
|
599
|
-
var LINEAGE_POLL_ACTIVE_WITHOUT_HINTS_MS = 15e3;
|
|
600
|
-
function treeNeedsWatching(nodes) {
|
|
601
|
-
return descendantsRunning(nodes) || waitingDescendants(nodes).length > 0;
|
|
602
|
-
}
|
|
603
|
-
function useLineagePollInterval(workspaceId) {
|
|
604
|
-
const { workspaceSessionListEvent } = useOpenGeni();
|
|
605
|
-
const [active, setActive] = useState2(false);
|
|
606
|
-
const observeTree = useCallback2(
|
|
607
|
-
(nodes) => setActive(treeNeedsWatching(nodes)),
|
|
608
|
-
[]
|
|
609
|
-
);
|
|
610
|
-
const live = workspaceSessionListEvent?.workspaceId === workspaceId && workspaceSessionListEvent.available === true;
|
|
611
|
-
return {
|
|
612
|
-
pollIntervalMs: !live && active ? LINEAGE_POLL_ACTIVE_WITHOUT_HINTS_MS : LINEAGE_POLL_MS,
|
|
613
|
-
observeTree
|
|
614
|
-
};
|
|
615
|
-
}
|
|
616
|
-
function useDescendantRequestsRefresh(options) {
|
|
617
|
-
const { client, workspaceId, sessionId, events, nodes, refreshLineage } = options;
|
|
618
|
-
const { workspaceSessionListEvent } = useOpenGeni();
|
|
619
|
-
const [signal, setSignal] = useState2(0);
|
|
620
|
-
const refreshLineageRef = useRef(refreshLineage);
|
|
621
|
-
useEffect(() => {
|
|
622
|
-
refreshLineageRef.current = refreshLineage;
|
|
623
|
-
}, [refreshLineage]);
|
|
624
|
-
const refreshTreeSoon = useDebouncedCallback(() => {
|
|
625
|
-
void refreshLineageRef.current();
|
|
626
|
-
}, 150);
|
|
627
|
-
const refreshAllSoon = useDebouncedCallback(() => {
|
|
628
|
-
void refreshLineageRef.current();
|
|
629
|
-
setSignal((value) => value + 1);
|
|
630
|
-
}, 150);
|
|
631
|
-
const tree = useMemo2(
|
|
632
|
-
() => ({ ids: lineageSessionIds(nodes), running: descendantsRunning(nodes) }),
|
|
633
|
-
[nodes]
|
|
634
|
-
);
|
|
635
|
-
const treeRef = useRef(tree);
|
|
636
|
-
useEffect(() => {
|
|
637
|
-
treeRef.current = tree;
|
|
638
|
-
}, [tree]);
|
|
639
|
-
useEffect(() => {
|
|
640
|
-
const hint = workspaceSessionListEvent;
|
|
641
|
-
if (!hint || hint.workspaceId !== workspaceId || !hint.available) return;
|
|
642
|
-
if (document.visibilityState === "hidden") return;
|
|
643
|
-
const current = treeRef.current;
|
|
644
|
-
const unseen = current.running && (hint.sessionIds ?? []).some((id) => id !== sessionId && !current.ids.has(id));
|
|
645
|
-
if (hintTouchesTree(hint, current.ids) || unseen) refreshTreeSoon();
|
|
646
|
-
}, [refreshTreeSoon, sessionId, workspaceId, workspaceSessionListEvent]);
|
|
647
|
-
const responseCallIds = useMemo2(() => subSessionResponseCallIds(events), [events]);
|
|
648
|
-
const matchResponse = useCallback2(
|
|
649
|
-
(event) => isSubSessionResponseOutput(event, responseCallIds),
|
|
650
|
-
[responseCallIds]
|
|
651
|
-
);
|
|
652
|
-
const [history, setHistory] = useState2(null);
|
|
653
|
-
const newest = events.at(-1);
|
|
654
|
-
if (newest && newest.sessionId === sessionId && history?.sessionId !== sessionId) {
|
|
655
|
-
setHistory({ sessionId, through: newest.sequence });
|
|
656
|
-
}
|
|
657
|
-
const readThrough = history?.sessionId === sessionId ? history.through : "reading";
|
|
658
|
-
const onResponse = useCallback2(() => refreshAllSoon(), [refreshAllSoon]);
|
|
659
|
-
useSessionEventTrigger(client, workspaceId, sessionId, matchResponse, onResponse, {
|
|
660
|
-
events,
|
|
661
|
-
readThrough
|
|
662
|
-
});
|
|
663
|
-
return signal;
|
|
664
|
-
}
|
|
665
|
-
|
|
666
|
-
// src/app/routes/session.tsx
|
|
667
|
-
import { OpenGeniApiError, OpenGeniSessionUsageLimitReachedError } from "@opengeni/sdk/browser";
|
|
668
|
-
import { SESSION_USAGE_LIMIT_GOAL_PAUSED_REASON } from "@opengeni/sdk/session-usage-limits";
|
|
669
|
-
import {
|
|
670
|
-
BugIcon,
|
|
671
|
-
GitPullRequestIcon,
|
|
672
|
-
LinkIcon,
|
|
673
|
-
Loader2Icon,
|
|
674
|
-
MenuIcon,
|
|
675
|
-
MessagesSquareIcon,
|
|
676
|
-
PanelsTopLeftIcon,
|
|
677
|
-
SettingsIcon
|
|
678
|
-
} from "lucide-react";
|
|
679
|
-
import {
|
|
680
|
-
createElement,
|
|
681
|
-
lazy,
|
|
682
|
-
Suspense,
|
|
683
|
-
useCallback as useCallback3,
|
|
684
|
-
useEffect as useEffect4,
|
|
685
|
-
useLayoutEffect as useLayoutEffect2,
|
|
686
|
-
useMemo as useMemo3,
|
|
687
|
-
useRef as useRef2,
|
|
688
|
-
useState as useState3
|
|
689
|
-
} from "react";
|
|
690
|
-
|
|
691
|
-
// src/app/lib/session-failure-toasts.ts
|
|
692
|
-
import { useEffect as useEffect2 } from "react";
|
|
693
|
-
function useSessionFailureToasts(loadError, streamError) {
|
|
694
|
-
const streamCalm = useCalmServiceFailure(streamError);
|
|
695
|
-
const loadCalm = useCalmServiceFailure(loadError);
|
|
696
|
-
useEffect2(() => {
|
|
697
|
-
if (streamError && !streamCalm && !isApiErrorStatus(streamError, 404)) {
|
|
698
|
-
toast.error("Event stream disconnected", {
|
|
699
|
-
description: userErrorText(streamError)
|
|
700
|
-
});
|
|
701
|
-
}
|
|
702
|
-
}, [streamCalm, streamError]);
|
|
703
|
-
useEffect2(() => {
|
|
704
|
-
if (loadError && !loadCalm && !isApiErrorStatus(loadError, 404)) {
|
|
705
|
-
toast.error("Failed to load session", { description: userErrorText(loadError) });
|
|
706
|
-
}
|
|
707
|
-
}, [loadCalm, loadError]);
|
|
708
|
-
}
|
|
709
|
-
|
|
710
|
-
// src/app/lib/session-route-placement.ts
|
|
711
|
-
function ignoreRoutedUpdate() {
|
|
712
|
-
}
|
|
713
|
-
function sessionRouteAppState(placement, context, panelEventFeed) {
|
|
714
|
-
if (placement === "page") {
|
|
715
|
-
return {
|
|
716
|
-
routed: true,
|
|
717
|
-
setSession: context.setSession,
|
|
718
|
-
setConnectionState: context.setConnectionState,
|
|
719
|
-
sessionEventFeedStore: context.sessionEventFeedStore
|
|
720
|
-
};
|
|
721
|
-
}
|
|
722
|
-
return {
|
|
723
|
-
routed: false,
|
|
724
|
-
setSession: ignoreRoutedUpdate,
|
|
725
|
-
setConnectionState: ignoreRoutedUpdate,
|
|
726
|
-
sessionEventFeedStore: panelEventFeed
|
|
727
|
-
};
|
|
728
|
-
}
|
|
729
|
-
function sessionRouteCreationHandoff(input) {
|
|
730
|
-
const { sessionId, given, app, appSession, routed } = input;
|
|
731
|
-
if (given?.session.id === sessionId) return given;
|
|
732
|
-
if (routed && app?.session.id === sessionId && appSession?.id === sessionId) return app;
|
|
733
|
-
return null;
|
|
734
|
-
}
|
|
735
|
-
|
|
736
|
-
// src/app/lib/find-shortcut.ts
|
|
737
|
-
import { useEffect as useEffect3 } from "react";
|
|
738
|
-
function useFindShortcut(input, open) {
|
|
739
|
-
const { scope } = input;
|
|
740
|
-
useEffect3(() => {
|
|
741
|
-
if (!scope) return;
|
|
742
|
-
const onKeyDown = (event) => {
|
|
743
|
-
if (!(event.ctrlKey || event.metaKey) || event.altKey || event.shiftKey || event.key.toLowerCase() !== "f")
|
|
744
|
-
return;
|
|
745
|
-
const target2 = event.target;
|
|
746
|
-
if (target2 instanceof Element && target2.closest('[role="dialog"], .cm-editor, .xterm, [data-native-find]'))
|
|
747
|
-
return;
|
|
748
|
-
event.preventDefault();
|
|
749
|
-
open();
|
|
750
|
-
};
|
|
751
|
-
scope.addEventListener("keydown", onKeyDown);
|
|
752
|
-
return () => scope.removeEventListener("keydown", onKeyDown);
|
|
753
|
-
}, [open, scope]);
|
|
754
|
-
}
|
|
755
|
-
|
|
756
|
-
// src/app/lib/codex-model-switch.ts
|
|
757
|
-
var CONTEXT_CHECKPOINT_EVENT_TYPES = [
|
|
758
|
-
"session.context.compacted",
|
|
759
|
-
"session.context.cleared"
|
|
760
|
-
];
|
|
761
|
-
function latestCheckpointIsCompaction(events) {
|
|
762
|
-
let latest = null;
|
|
763
|
-
for (const event of events) {
|
|
764
|
-
if (event.type !== "session.context.compacted" && event.type !== "session.context.cleared")
|
|
765
|
-
continue;
|
|
766
|
-
if (!latest || event.sequence > latest.sequence) latest = event;
|
|
767
|
-
}
|
|
768
|
-
return latest ? latest.type === "session.context.compacted" : null;
|
|
769
|
-
}
|
|
770
|
-
function needsModelSwitchHeadsUp(input) {
|
|
771
|
-
return input.codexCompactionMode === "remote_v2" && input.codexCompacted && typeof input.model === "string" && input.model.length > 0 && !isCodexProductModel(input.model);
|
|
772
|
-
}
|
|
773
|
-
function modelSwitchHeadsUpText(modelLabel) {
|
|
774
|
-
return `Earlier messages will be re-summarized for ${modelLabel}, so it may remember less detail.`;
|
|
775
|
-
}
|
|
776
|
-
function codexUsageResetsAt(events) {
|
|
777
|
-
let latest = null;
|
|
778
|
-
for (const event of events) {
|
|
779
|
-
const usageEvent = event.type === "codex.capacity.waiting" || event.type === "turn.capacity_waiting" || event.type === "turn.failed" && payloadField(event, "code") === "codex_usage_limit_reached";
|
|
780
|
-
if (usageEvent && (!latest || event.sequence > latest.sequence)) latest = event;
|
|
781
|
-
}
|
|
782
|
-
const resetsAt = latest ? payloadField(latest, "resetsAt") ?? payloadField(latest, "earliestResetAt") : null;
|
|
783
|
-
return typeof resetsAt === "string" && !Number.isNaN(Date.parse(resetsAt)) ? resetsAt : null;
|
|
784
|
-
}
|
|
785
|
-
var USAGE_WAIT_REASONS = /* @__PURE__ */ new Set([
|
|
786
|
-
"no_eligible_capacity",
|
|
787
|
-
"codex_rate_limited",
|
|
788
|
-
"compaction_provider_locked",
|
|
789
|
-
// The chat's pinned account is out of usage until its reset.
|
|
790
|
-
"pinned_account_unavailable"
|
|
791
|
-
]);
|
|
792
|
-
function codexWaitIsUsageLimit(events) {
|
|
793
|
-
let latest = null;
|
|
794
|
-
for (const event of events) {
|
|
795
|
-
const wait = event.type === "codex.capacity.waiting" || event.type === "turn.capacity_waiting";
|
|
796
|
-
if (wait && (!latest || event.sequence > latest.sequence)) latest = event;
|
|
797
|
-
}
|
|
798
|
-
if (!latest || payloadField(latest, "actionRequired") === true) return false;
|
|
799
|
-
const reason = payloadField(latest, "waitReason");
|
|
800
|
-
return reason === void 0 || reason === null || USAGE_WAIT_REASONS.has(String(reason));
|
|
801
|
-
}
|
|
802
|
-
function payloadField(event, key) {
|
|
803
|
-
const payload = event.payload;
|
|
804
|
-
return payload && typeof payload === "object" ? payload[key] : void 0;
|
|
805
|
-
}
|
|
806
|
-
function codexUsageContinuesAtReset(input) {
|
|
807
|
-
return input.status === "waiting_capacity" && !input.paused;
|
|
808
|
-
}
|
|
809
|
-
function codexUsageNoticeApplies(input) {
|
|
810
|
-
return input.status !== "waiting_capacity" || input.usageWait && input.resetsAt !== null;
|
|
811
|
-
}
|
|
812
|
-
function codexUsageContinueAtResetAction(input) {
|
|
813
|
-
if (input.next === codexUsageContinuesAtReset(input)) return null;
|
|
814
|
-
if (input.status === "waiting_capacity") return input.next ? "resume" : "pause";
|
|
815
|
-
if (!input.next) return null;
|
|
816
|
-
return input.paused ? "resume_and_run_on_codex" : "run_on_codex";
|
|
817
|
-
}
|
|
818
|
-
function codexUsageResetText(resetsAt, options = {}) {
|
|
819
|
-
const reset = resetsAt === null ? Number.NaN : Date.parse(resetsAt);
|
|
820
|
-
if (Number.isNaN(reset)) return "Reset time unknown.";
|
|
821
|
-
const now = options.now ?? /* @__PURE__ */ new Date();
|
|
822
|
-
if (reset <= now.getTime()) return "Resets soon.";
|
|
823
|
-
const zone = options.timeZone ? { timeZone: options.timeZone } : {};
|
|
824
|
-
const day = (date2) => new Intl.DateTimeFormat("en-CA", { dateStyle: "short", ...zone }).format(date2);
|
|
825
|
-
const at = new Date(reset);
|
|
826
|
-
const time = new Intl.DateTimeFormat(options.locale, { timeStyle: "short", ...zone }).format(at);
|
|
827
|
-
if (day(at) === day(now)) return `Resets at ${time}.`;
|
|
828
|
-
const withinWeek = reset - now.getTime() < 6 * 24 * 60 * 60 * 1e3;
|
|
829
|
-
const date = new Intl.DateTimeFormat(
|
|
830
|
-
options.locale,
|
|
831
|
-
withinWeek ? { weekday: "short", ...zone } : { month: "short", day: "numeric", ...zone }
|
|
832
|
-
).format(at);
|
|
833
|
-
return `Resets ${date} ${time}.`;
|
|
834
|
-
}
|
|
835
|
-
|
|
836
|
-
// src/app/routes/session.tsx
|
|
837
|
-
import { resolveWorkspaceBusySend, stableJson } from "@opengeni/contracts";
|
|
838
|
-
import { connectProviderAcceptsRequestedScopes } from "@opengeni/contracts/connect";
|
|
839
|
-
|
|
840
|
-
// src/app/lib/connect-recovery-account.ts
|
|
841
|
-
async function findConnectRecoveryTarget(input) {
|
|
842
|
-
const here = input.find(await input.accounts(input.workspaceId), input.connectionId);
|
|
843
|
-
if (here) return target(here, input.workspaceId);
|
|
844
|
-
const own = (await input.ownAccounts().catch(() => [])).find(
|
|
845
|
-
(connection) => connection.id === input.connectionId && connection.subjectId !== null && connection.workspaceId !== input.workspaceId
|
|
846
|
-
);
|
|
847
|
-
if (!own) return null;
|
|
848
|
-
const elsewhere = input.find(
|
|
849
|
-
await input.accounts(own.workspaceId).catch(() => []),
|
|
850
|
-
input.connectionId
|
|
851
|
-
);
|
|
852
|
-
return elsewhere ? target(elsewhere, own.workspaceId) : null;
|
|
853
|
-
}
|
|
854
|
-
function target(account, workspaceId) {
|
|
855
|
-
return { account, workspaceId, via: account.backend ? "connector" : "native" };
|
|
856
|
-
}
|
|
857
|
-
|
|
858
|
-
// src/timeline/pending-connection-card.ts
|
|
859
|
-
function pendingConnectionCard(items, actionable) {
|
|
860
|
-
for (let index = items.length - 1; index >= 0; index -= 1) {
|
|
861
|
-
const item = items[index];
|
|
862
|
-
if (item.kind === "user-message") return null;
|
|
863
|
-
if (item.kind !== "auth-needed") continue;
|
|
864
|
-
if (item.setupFinished || item.askedAgainLater || !actionable(item)) return null;
|
|
865
|
-
return waitedOn(item) ? item : null;
|
|
866
|
-
}
|
|
867
|
-
return null;
|
|
868
|
-
}
|
|
869
|
-
function waitedOn(item) {
|
|
870
|
-
if (item.capability || item.setupRequest) return true;
|
|
871
|
-
return Boolean(item.toolName?.trim()) && item.providerDomain.trim().toLowerCase() !== "opengeni";
|
|
872
|
-
}
|
|
873
|
-
|
|
874
|
-
// src/app/routes/session.tsx
|
|
875
|
-
import { Fragment as Fragment2, jsx, jsxs } from "react/jsx-runtime";
|
|
876
|
-
var PULL_REQUEST_TAB = "pull-request";
|
|
877
|
-
var InlineChatArtifact = lazy(
|
|
878
|
-
() => import("./app/components/artifacts/retained-file-preview.js").then((module) => ({
|
|
879
|
-
default: module.InlineChatArtifact
|
|
880
|
-
}))
|
|
881
|
-
);
|
|
882
|
-
var ChatInteractiveBlock = lazy(
|
|
883
|
-
() => import("./app/components/artifacts/chat-interactive-block.js").then((module) => ({
|
|
884
|
-
default: module.ChatInteractiveBlock
|
|
885
|
-
}))
|
|
886
|
-
);
|
|
887
|
-
var HumanInputSurface = lazy(() => import("./app/components/session/human-input.js"));
|
|
888
|
-
var DescendantRequests = lazy(() => import("./app/components/session/descendant-requests.js"));
|
|
889
|
-
var SessionSkillReviews = lazy(
|
|
890
|
-
() => import("./app/components/session/session-skill-reviews.js").then((module) => ({
|
|
891
|
-
default: module.SessionSkillReviews
|
|
892
|
-
}))
|
|
893
|
-
);
|
|
894
|
-
var SessionCommands = lazy(
|
|
895
|
-
() => import("./session-ui.js").then((module) => ({ default: module.SessionCommands }))
|
|
896
|
-
);
|
|
897
|
-
var SessionCapabilityCard = lazy(async () => ({
|
|
898
|
-
default: (await import("./app/components/capabilities/session-capability-card.js")).SessionCapabilityCard
|
|
899
|
-
}));
|
|
900
|
-
var NativeConnectSetup = lazy(
|
|
901
|
-
() => import("./app/components/capabilities/native-connect-setup.js").then((module) => ({
|
|
902
|
-
default: module.NativeConnectSetup
|
|
903
|
-
}))
|
|
904
|
-
);
|
|
905
|
-
var MessageForkDialog = lazy(
|
|
906
|
-
() => import("./app/components/session/session-tenancy-control.js").then((module) => ({
|
|
907
|
-
default: module.SessionTenancyRouteControl
|
|
908
|
-
}))
|
|
909
|
-
);
|
|
910
|
-
var MessageActions = lazy(() => import("./app/components/session/message-actions.js"));
|
|
911
|
-
var ConversationFind = lazy(() => import("./app/components/session/conversation-find.js"));
|
|
912
|
-
var EMPTY_SEARCH_TARGET = {};
|
|
913
|
-
var SubagentTree = lazy(
|
|
914
|
-
() => import("./app/components/session/subagents.js").then((module) => ({ default: module.SubagentTree }))
|
|
915
|
-
);
|
|
916
|
-
var LazyFailedSessionBanner = lazy(
|
|
917
|
-
() => import("./app/components/session/failed-session-banner.js").then((module) => ({
|
|
918
|
-
default: module.FailedSessionBanner
|
|
919
|
-
}))
|
|
920
|
-
);
|
|
921
|
-
var LazyCreditRefusalNotice = lazy(
|
|
922
|
-
() => import("./app/components/credits/credit-refusal-notice.js").then((module) => ({
|
|
923
|
-
default: module.CreditRefusalNotice
|
|
924
|
-
}))
|
|
925
|
-
);
|
|
926
|
-
var LazyCreditTopupPrompt = lazy(
|
|
927
|
-
() => import("./app/components/credit-required-prompt.js").then((module) => ({
|
|
928
|
-
default: module.CreditRequiredPrompt
|
|
929
|
-
}))
|
|
930
|
-
);
|
|
931
|
-
var LazyAgentConfigurationPanel = lazy(
|
|
932
|
-
() => import("./app/components/session/agent-configuration-panel.js").then(({ AgentConfigurationPanel }) => ({
|
|
933
|
-
default: AgentConfigurationPanel
|
|
934
|
-
}))
|
|
935
|
-
);
|
|
936
|
-
var LazySessionInspector = lazy(
|
|
937
|
-
() => import("./app/components/session/inspector.js").then(({ SessionInspector }) => ({
|
|
938
|
-
default: SessionInspector
|
|
939
|
-
}))
|
|
940
|
-
);
|
|
941
|
-
var LazySessionEditableArtifactsWorkspace = lazy(
|
|
942
|
-
() => import("./app/components/session/editable-artifacts-workspace.js").then(
|
|
943
|
-
({ SessionEditableArtifactsWorkspace }) => ({
|
|
944
|
-
default: SessionEditableArtifactsWorkspace
|
|
945
|
-
})
|
|
946
|
-
)
|
|
947
|
-
);
|
|
948
|
-
var LazyCodexRealtimeControl = lazy(
|
|
949
|
-
() => import("./realtime.js").then(({ SessionRealtimeControl }) => ({
|
|
950
|
-
default: SessionRealtimeControl
|
|
951
|
-
}))
|
|
952
|
-
);
|
|
953
|
-
var LazySessionRouteAuxiliary = lazy(
|
|
954
|
-
() => import("./app/components/session/session-tenancy-control.js")
|
|
955
|
-
);
|
|
956
|
-
function SessionRoute({
|
|
957
|
-
workspaceId,
|
|
958
|
-
sessionId,
|
|
959
|
-
launch = EMPTY_COMPOSER_LAUNCH,
|
|
960
|
-
realtimeAutostartModel,
|
|
961
|
-
searchTarget = EMPTY_SEARCH_TARGET,
|
|
962
|
-
placement = "page",
|
|
963
|
-
onEvent,
|
|
964
|
-
messageContext,
|
|
965
|
-
creationHandoff: givenCreationHandoff,
|
|
966
|
-
initialDraft,
|
|
967
|
-
onNewSession,
|
|
968
|
-
onRealtimeAutostartConsumed
|
|
969
|
-
}) {
|
|
970
|
-
const uiEvents = useUiEventTarget("document");
|
|
971
|
-
const dockEnabled = useSessionUiFeature("dock");
|
|
972
|
-
useReadSessionInbox(sessionId);
|
|
973
|
-
const context = useAppContext();
|
|
974
|
-
const routed = placement === "page";
|
|
975
|
-
const rail = useRail();
|
|
976
|
-
const navigate = useNavigate();
|
|
977
|
-
const page = usePage();
|
|
978
|
-
const consumeRealtimeAutostart = useCallback3(() => {
|
|
979
|
-
if (onRealtimeAutostartConsumed) {
|
|
980
|
-
onRealtimeAutostartConsumed();
|
|
981
|
-
return;
|
|
982
|
-
}
|
|
983
|
-
void navigate({
|
|
984
|
-
to: "/workspaces/$workspaceId/sessions/$sessionId",
|
|
985
|
-
params: { workspaceId, sessionId },
|
|
986
|
-
search: {},
|
|
987
|
-
replace: true
|
|
988
|
-
});
|
|
989
|
-
}, [navigate, onRealtimeAutostartConsumed, sessionId, workspaceId]);
|
|
990
|
-
const hasSearchOrigin = searchTarget.searchOrigin === "session-search";
|
|
991
|
-
const consumeSearchOrigin = useCallback3(() => {
|
|
992
|
-
if (!hasSearchOrigin) return;
|
|
993
|
-
void navigate({
|
|
994
|
-
to: "/workspaces/$workspaceId/sessions/$sessionId",
|
|
995
|
-
params: { workspaceId, sessionId },
|
|
996
|
-
search: ({ searchOrigin: _searchOrigin, ...rest }) => rest,
|
|
997
|
-
replace: true
|
|
998
|
-
});
|
|
999
|
-
}, [hasSearchOrigin, navigate, sessionId, workspaceId]);
|
|
1000
|
-
const {
|
|
1001
|
-
events,
|
|
1002
|
-
timeline: eventTimeline,
|
|
1003
|
-
sessionStatus,
|
|
1004
|
-
sessionStatusSequence,
|
|
1005
|
-
connectionState,
|
|
1006
|
-
initialLoading,
|
|
1007
|
-
initialHistoryReady,
|
|
1008
|
-
hasOlder,
|
|
1009
|
-
loadingOlder,
|
|
1010
|
-
loadOlder,
|
|
1011
|
-
hasNewer,
|
|
1012
|
-
loadingNewer,
|
|
1013
|
-
loadNewer,
|
|
1014
|
-
loadingOldest,
|
|
1015
|
-
loadOldest,
|
|
1016
|
-
jumpToLatest,
|
|
1017
|
-
jumpToSequence,
|
|
1018
|
-
error: streamError
|
|
1019
|
-
} = useSessionEvents(sessionId);
|
|
1020
|
-
useEffect4(() => observeSessionTurnEvents(sessionId, events), [events, sessionId]);
|
|
1021
|
-
useLiveSessionEvents(sessionId, events, initialHistoryReady, onEvent);
|
|
1022
|
-
useReportSessionState({ sessionId, status: sessionStatus, events, initialLoading }, routed);
|
|
1023
|
-
const sessionDetailReadOwner = useRef2({});
|
|
1024
|
-
const beginSessionDetailRead = useCallback3(
|
|
1025
|
-
() => context.sessionChannelProjectionAuthority.beginDetailRead(sessionDetailReadOwner.current, {
|
|
1026
|
-
id: sessionId,
|
|
1027
|
-
workspaceId
|
|
1028
|
-
}),
|
|
1029
|
-
[context.sessionChannelProjectionAuthority, sessionId, workspaceId]
|
|
1030
|
-
);
|
|
1031
|
-
const {
|
|
1032
|
-
session: fetchedSession,
|
|
1033
|
-
error: loadError,
|
|
1034
|
-
readRevision: sessionReadRevision,
|
|
1035
|
-
readGeneration: sessionReadGeneration,
|
|
1036
|
-
refresh: refreshSession
|
|
1037
|
-
} = useSession(sessionId, {
|
|
1038
|
-
events,
|
|
1039
|
-
beginRead: beginSessionDetailRead
|
|
1040
|
-
});
|
|
1041
|
-
const restoredSessionId = useRouterState({
|
|
1042
|
-
select: (state) => state.location.state.restoredSessionId
|
|
1043
|
-
});
|
|
1044
|
-
const leaveRestoredSession = useCallback3(() => {
|
|
1045
|
-
void navigate({
|
|
1046
|
-
to: "/workspaces/$workspaceId/sessions",
|
|
1047
|
-
params: { workspaceId },
|
|
1048
|
-
replace: true
|
|
1049
|
-
});
|
|
1050
|
-
}, [navigate, workspaceId]);
|
|
1051
|
-
const leavingRestoredSession = useSessionRouteMemory({
|
|
1052
|
-
subjectId: context.accessContext.subjectId,
|
|
1053
|
-
workspaceId,
|
|
1054
|
-
sessionId,
|
|
1055
|
-
openedSessionId: fetchedSession?.id ?? null,
|
|
1056
|
-
loadError,
|
|
1057
|
-
restoredSessionId,
|
|
1058
|
-
leave: leaveRestoredSession,
|
|
1059
|
-
enabled: routed
|
|
1060
|
-
});
|
|
1061
|
-
useEffect4(
|
|
1062
|
-
() => () => context.sessionChannelProjectionAuthority.finishDetailReads(sessionDetailReadOwner.current),
|
|
1063
|
-
[context.sessionChannelProjectionAuthority, sessionId, workspaceId]
|
|
1064
|
-
);
|
|
1065
|
-
useEffect4(() => {
|
|
1066
|
-
if (loadError) {
|
|
1067
|
-
context.sessionChannelProjectionAuthority.finishDetailReads(sessionDetailReadOwner.current);
|
|
1068
|
-
}
|
|
1069
|
-
}, [context.sessionChannelProjectionAuthority, loadError]);
|
|
1070
|
-
const creationHandoff = sessionRouteCreationHandoff({
|
|
1071
|
-
sessionId,
|
|
1072
|
-
given: givenCreationHandoff,
|
|
1073
|
-
app: context.sessionCreationHandoff,
|
|
1074
|
-
appSession: context.session,
|
|
1075
|
-
routed
|
|
1076
|
-
});
|
|
1077
|
-
const pendingCreationHandoff = creationHandoffReconciled(creationHandoff, events) ? null : creationHandoff;
|
|
1078
|
-
const queue = useTurnQueue(sessionId, { events });
|
|
1079
|
-
const goal = useGoal(sessionId, { events });
|
|
1080
|
-
const humanInput = useHumanInputRequests(sessionId, { events });
|
|
1081
|
-
const sessionSeed = fetchedSession ?? creationHandoff?.session ?? null;
|
|
1082
|
-
const session = useMemo3(
|
|
1083
|
-
() => sessionSeed ? {
|
|
1084
|
-
...sessionSeed,
|
|
1085
|
-
// Old idle events must not overwrite a fresh queued/claimed detail read.
|
|
1086
|
-
status: (sessionStatusSequence ?? 0) > sessionSeed.lastSequence ? sessionStatus ?? sessionSeed.status : sessionSeed.status,
|
|
1087
|
-
effectiveControl: queue.effectiveControl ?? sessionSeed.effectiveControl
|
|
1088
|
-
} : null,
|
|
1089
|
-
[queue.effectiveControl, sessionSeed, sessionStatus, sessionStatusSequence]
|
|
1090
|
-
);
|
|
1091
|
-
useBackgroundAttentionTitle(sessionId, session?.status ?? null);
|
|
1092
|
-
const waitingForDispatch = session?.status === "queued" && session.activeTurnId === null && session.effectiveControl.state === "active";
|
|
1093
|
-
useEffect4(() => {
|
|
1094
|
-
if (!waitingForDispatch) return;
|
|
1095
|
-
let stopped = false;
|
|
1096
|
-
let timer;
|
|
1097
|
-
const refresh = async () => {
|
|
1098
|
-
try {
|
|
1099
|
-
if (document.visibilityState === "visible") await refreshSession();
|
|
1100
|
-
} finally {
|
|
1101
|
-
if (!stopped) timer = setTimeout(() => void refresh(), 15e3);
|
|
1102
|
-
}
|
|
1103
|
-
};
|
|
1104
|
-
timer = setTimeout(() => void refresh(), 15e3);
|
|
1105
|
-
return () => {
|
|
1106
|
-
stopped = true;
|
|
1107
|
-
clearTimeout(timer);
|
|
1108
|
-
};
|
|
1109
|
-
}, [waitingForDispatch, sessionId, refreshSession]);
|
|
1110
|
-
const restoringArchive = session?.retention?.archive?.restoring === true;
|
|
1111
|
-
useEffect4(() => {
|
|
1112
|
-
if (!restoringArchive) return;
|
|
1113
|
-
const timer = setInterval(() => {
|
|
1114
|
-
if (document.visibilityState === "visible") void refreshSession();
|
|
1115
|
-
}, 3e3);
|
|
1116
|
-
return () => clearInterval(timer);
|
|
1117
|
-
}, [restoringArchive, sessionId, refreshSession]);
|
|
1118
|
-
const restoreArchived = useCallback3(async () => {
|
|
1119
|
-
if (!session) return false;
|
|
1120
|
-
try {
|
|
1121
|
-
const updated = await requestSessionArchive(
|
|
1122
|
-
context,
|
|
1123
|
-
session,
|
|
1124
|
-
false,
|
|
1125
|
-
sessionDisplayTitle(session)
|
|
1126
|
-
);
|
|
1127
|
-
if (!updated) return false;
|
|
1128
|
-
notifySessionListChanged({ workspaceId, sessionId: session.id, archived: updated.archived });
|
|
1129
|
-
await refreshSession();
|
|
1130
|
-
return true;
|
|
1131
|
-
} catch (error) {
|
|
1132
|
-
toast.error("Couldn't restore the chat.", { description: userErrorText(error) });
|
|
1133
|
-
return false;
|
|
1134
|
-
}
|
|
1135
|
-
}, [context, refreshSession, session, workspaceId]);
|
|
1136
|
-
const [viewClearedAfter, setViewClearedAfter] = useState3(null);
|
|
1137
|
-
useEffect4(() => {
|
|
1138
|
-
setViewClearedAfter(null);
|
|
1139
|
-
}, [sessionId]);
|
|
1140
|
-
const clearView = useCallback3(() => {
|
|
1141
|
-
const latestSequence = events.reduce((max, event) => Math.max(max, event.sequence), 0);
|
|
1142
|
-
setViewClearedAfter(latestSequence);
|
|
1143
|
-
}, [events]);
|
|
1144
|
-
const visibleEvents = useMemo3(
|
|
1145
|
-
() => viewClearedAfter !== null ? events.filter((event) => event.sequence > viewClearedAfter) : events,
|
|
1146
|
-
[events, viewClearedAfter]
|
|
1147
|
-
);
|
|
1148
|
-
const { opened, hasObservedHistory } = useSessionOpening(
|
|
1149
|
-
`${workspaceId}:${sessionId}`,
|
|
1150
|
-
Boolean(session && (initialHistoryReady || pendingCreationHandoff)),
|
|
1151
|
-
events.length > 0
|
|
1152
|
-
);
|
|
1153
|
-
const timeline = useMemo3(() => {
|
|
1154
|
-
if (!session) {
|
|
1155
|
-
return [];
|
|
1156
|
-
}
|
|
1157
|
-
if ((!opened || initialLoading || hasObservedHistory) && visibleEvents.length === 0 && !pendingCreationHandoff) {
|
|
1158
|
-
return [];
|
|
1159
|
-
}
|
|
1160
|
-
const projected = projectSessionTimeline(
|
|
1161
|
-
session,
|
|
1162
|
-
visibleEvents,
|
|
1163
|
-
pendingCreationHandoff?.clientEventId,
|
|
1164
|
-
viewClearedAfter === null ? eventTimeline : void 0
|
|
1165
|
-
);
|
|
1166
|
-
return viewClearedAfter !== null && visibleEvents.length === 0 ? [] : projected;
|
|
1167
|
-
}, [
|
|
1168
|
-
pendingCreationHandoff,
|
|
1169
|
-
session,
|
|
1170
|
-
visibleEvents,
|
|
1171
|
-
viewClearedAfter,
|
|
1172
|
-
opened,
|
|
1173
|
-
initialLoading,
|
|
1174
|
-
hasObservedHistory,
|
|
1175
|
-
eventTimeline
|
|
1176
|
-
]);
|
|
1177
|
-
const approvals = useMemo3(() => projectPendingApprovals(events), [events]);
|
|
1178
|
-
const creditExhausted = useMemo3(() => creditExhaustedFromEvents(events), [events]);
|
|
1179
|
-
const creditRefusal = useMemo3(() => creditRefusalFromEvents(events), [events]);
|
|
1180
|
-
const failure = useMemo3(
|
|
1181
|
-
() => session && (session.status === "failed" || creditExhausted) ? summarizeSessionFailure(
|
|
1182
|
-
events,
|
|
1183
|
-
session.status,
|
|
1184
|
-
session.failureDiagnostics,
|
|
1185
|
-
session.lastSequence
|
|
1186
|
-
) : null,
|
|
1187
|
-
[events, session, creditExhausted]
|
|
1188
|
-
);
|
|
1189
|
-
const [panelEventFeed] = useState3(createSessionEventFeedStore);
|
|
1190
|
-
const { client, captureWorkspaceInvocation, ownsWorkspaceInvocation } = context;
|
|
1191
|
-
const {
|
|
1192
|
-
setSession: setContextSession,
|
|
1193
|
-
setConnectionState: setContextConnectionState,
|
|
1194
|
-
sessionEventFeedStore
|
|
1195
|
-
} = sessionRouteAppState(placement, context, panelEventFeed);
|
|
1196
|
-
const acknowledgedProjectionRef = useRef2(null);
|
|
1197
|
-
const confirmedProjectionRef = useRef2(null);
|
|
1198
|
-
const retriedProjectionRef = useRef2(null);
|
|
1199
|
-
const [foreground, setForeground] = useState3(() => ({
|
|
1200
|
-
documentVisible: document.visibilityState === "visible",
|
|
1201
|
-
windowFocused: document.hasFocus()
|
|
1202
|
-
}));
|
|
1203
|
-
const [attentionRetryRevision, setAttentionRetryRevision] = useState3(0);
|
|
1204
|
-
const reconciledSessionRead = useRef2(null);
|
|
1205
|
-
useEffect4(() => {
|
|
1206
|
-
if (!fetchedSession || sessionReadRevision === 0) return;
|
|
1207
|
-
if (reconciledSessionRead.current?.sessionId === sessionId && reconciledSessionRead.current.revision === sessionReadRevision) {
|
|
1208
|
-
return;
|
|
1209
|
-
}
|
|
1210
|
-
reconciledSessionRead.current = {
|
|
1211
|
-
sessionId,
|
|
1212
|
-
revision: sessionReadRevision
|
|
1213
|
-
};
|
|
1214
|
-
const accepted = context.sessionChannelProjectionAuthority.recordRead(
|
|
1215
|
-
fetchedSession,
|
|
1216
|
-
sessionReadGeneration
|
|
1217
|
-
);
|
|
1218
|
-
setContextSession(
|
|
1219
|
-
(current) => mergeSessionDetailReadProjection(
|
|
1220
|
-
current,
|
|
1221
|
-
fetchedSession,
|
|
1222
|
-
context.sessionChannelProjectionAuthority,
|
|
1223
|
-
sessionReadGeneration,
|
|
1224
|
-
accepted
|
|
1225
|
-
)
|
|
1226
|
-
);
|
|
1227
|
-
}, [
|
|
1228
|
-
context.sessionChannelProjectionAuthority,
|
|
1229
|
-
fetchedSession,
|
|
1230
|
-
sessionId,
|
|
1231
|
-
sessionReadGeneration,
|
|
1232
|
-
sessionReadRevision,
|
|
1233
|
-
setContextSession
|
|
1234
|
-
]);
|
|
1235
|
-
useEffect4(() => {
|
|
1236
|
-
setContextSession(
|
|
1237
|
-
(current) => mergeSessionContextProjection(
|
|
1238
|
-
current,
|
|
1239
|
-
session,
|
|
1240
|
-
context.sessionChannelProjectionAuthority,
|
|
1241
|
-
"live"
|
|
1242
|
-
)
|
|
1243
|
-
);
|
|
1244
|
-
}, [context.sessionChannelProjectionAuthority, session, setContextSession]);
|
|
1245
|
-
useEffect4(() => {
|
|
1246
|
-
const reconcileForeground = () => {
|
|
1247
|
-
setForeground({
|
|
1248
|
-
documentVisible: document.visibilityState === "visible",
|
|
1249
|
-
windowFocused: document.hasFocus()
|
|
1250
|
-
});
|
|
1251
|
-
};
|
|
1252
|
-
window.addEventListener("focus", reconcileForeground);
|
|
1253
|
-
window.addEventListener("blur", reconcileForeground);
|
|
1254
|
-
document.addEventListener("visibilitychange", reconcileForeground);
|
|
1255
|
-
return () => {
|
|
1256
|
-
window.removeEventListener("focus", reconcileForeground);
|
|
1257
|
-
window.removeEventListener("blur", reconcileForeground);
|
|
1258
|
-
document.removeEventListener("visibilitychange", reconcileForeground);
|
|
1259
|
-
};
|
|
1260
|
-
}, []);
|
|
1261
|
-
const projectSessionAttention = useCallback3(
|
|
1262
|
-
(projection) => {
|
|
1263
|
-
notifySessionAttentionChanged(projection);
|
|
1264
|
-
setContextSession(
|
|
1265
|
-
(current) => current?.id === projection.id ? applySessionAttentionProjection(current, projection) : current
|
|
1266
|
-
);
|
|
1267
|
-
},
|
|
1268
|
-
[setContextSession]
|
|
1269
|
-
);
|
|
1270
|
-
const attentionThroughSequence = useMemo3(
|
|
1271
|
-
() => sessionAttentionReadThroughSequence(events),
|
|
1272
|
-
[events]
|
|
1273
|
-
);
|
|
1274
|
-
const readThroughSequence = Math.max(session?.lastSequence ?? 0, attentionThroughSequence);
|
|
1275
|
-
const activeReadProjectionKey = session ? sessionReadProjectionKey(session.id, readThroughSequence) : null;
|
|
1276
|
-
const routeUnreadProjection = useMemo3(
|
|
1277
|
-
() => session ? {
|
|
1278
|
-
...session,
|
|
1279
|
-
unread: session.unread || readThroughSequence > session.lastSequence
|
|
1280
|
-
} : null,
|
|
1281
|
-
[readThroughSequence, session]
|
|
1282
|
-
);
|
|
1283
|
-
useLayoutEffect2(() => {
|
|
1284
|
-
if (!session || !activeReadProjectionKey) return;
|
|
1285
|
-
if (confirmedProjectionRef.current === activeReadProjectionKey || !shouldProjectActiveSessionRead({
|
|
1286
|
-
activeSessionId: sessionId,
|
|
1287
|
-
workspaceId,
|
|
1288
|
-
session: routeUnreadProjection,
|
|
1289
|
-
...foreground
|
|
1290
|
-
})) {
|
|
1291
|
-
return;
|
|
1292
|
-
}
|
|
1293
|
-
const optimisticProjection = {
|
|
1294
|
-
id: session.id,
|
|
1295
|
-
workspaceId: session.workspaceId,
|
|
1296
|
-
unread: false,
|
|
1297
|
-
...session.attentionVersion !== void 0 ? { attentionVersion: session.attentionVersion } : {},
|
|
1298
|
-
lastSequence: readThroughSequence
|
|
1299
|
-
};
|
|
1300
|
-
projectSessionAttention(optimisticProjection);
|
|
1301
|
-
}, [
|
|
1302
|
-
activeReadProjectionKey,
|
|
1303
|
-
foreground,
|
|
1304
|
-
projectSessionAttention,
|
|
1305
|
-
readThroughSequence,
|
|
1306
|
-
routeUnreadProjection,
|
|
1307
|
-
session,
|
|
1308
|
-
sessionId,
|
|
1309
|
-
workspaceId
|
|
1310
|
-
]);
|
|
1311
|
-
const acknowledgementSessionId = session?.id ?? null;
|
|
1312
|
-
const acknowledgementEligible = shouldAcknowledgeActiveSession({
|
|
1313
|
-
activeSessionId: sessionId,
|
|
1314
|
-
workspaceId,
|
|
1315
|
-
session: routeUnreadProjection,
|
|
1316
|
-
...foreground
|
|
1317
|
-
});
|
|
1318
|
-
useEffect4(() => {
|
|
1319
|
-
const projectionKey = activeReadProjectionKey;
|
|
1320
|
-
if (!acknowledgementSessionId || !projectionKey || acknowledgedProjectionRef.current === projectionKey || !acknowledgementEligible) {
|
|
1321
|
-
return;
|
|
1322
|
-
}
|
|
1323
|
-
let active = true;
|
|
1324
|
-
const acceptedTransition = captureWorkspaceInvocation(workspaceId);
|
|
1325
|
-
if (!acceptedTransition) return;
|
|
1326
|
-
acknowledgedProjectionRef.current = projectionKey;
|
|
1327
|
-
void client.updateSessionAttention(workspaceId, acknowledgementSessionId, {
|
|
1328
|
-
unread: false,
|
|
1329
|
-
acknowledgedThroughSequence: readThroughSequence
|
|
1330
|
-
}).then((updated) => {
|
|
1331
|
-
if (!ownsWorkspaceInvocation(workspaceId, acceptedTransition)) return;
|
|
1332
|
-
confirmedProjectionRef.current = projectionKey;
|
|
1333
|
-
projectSessionAttention(updated);
|
|
1334
|
-
}).catch(() => {
|
|
1335
|
-
if (active && ownsWorkspaceInvocation(workspaceId, acceptedTransition) && acknowledgedProjectionRef.current === projectionKey && retriedProjectionRef.current !== projectionKey) {
|
|
1336
|
-
retriedProjectionRef.current = projectionKey;
|
|
1337
|
-
acknowledgedProjectionRef.current = null;
|
|
1338
|
-
setAttentionRetryRevision((revision) => revision + 1);
|
|
1339
|
-
return;
|
|
1340
|
-
}
|
|
1341
|
-
if (acknowledgedProjectionRef.current === projectionKey) {
|
|
1342
|
-
acknowledgedProjectionRef.current = null;
|
|
1343
|
-
}
|
|
1344
|
-
});
|
|
1345
|
-
return () => {
|
|
1346
|
-
active = false;
|
|
1347
|
-
};
|
|
1348
|
-
}, [
|
|
1349
|
-
acknowledgementEligible,
|
|
1350
|
-
acknowledgementSessionId,
|
|
1351
|
-
attentionRetryRevision,
|
|
1352
|
-
activeReadProjectionKey,
|
|
1353
|
-
captureWorkspaceInvocation,
|
|
1354
|
-
client,
|
|
1355
|
-
ownsWorkspaceInvocation,
|
|
1356
|
-
projectSessionAttention,
|
|
1357
|
-
readThroughSequence,
|
|
1358
|
-
workspaceId
|
|
1359
|
-
]);
|
|
1360
|
-
useEffect4(() => {
|
|
1361
|
-
setContextConnectionState(connectionState);
|
|
1362
|
-
}, [connectionState, setContextConnectionState]);
|
|
1363
|
-
useStreamHealthTelemetry("session", connectionState);
|
|
1364
|
-
useEffect4(() => {
|
|
1365
|
-
sessionEventFeedStore.set({ sessionId, events });
|
|
1366
|
-
}, [events, sessionId, sessionEventFeedStore]);
|
|
1367
|
-
useEffect4(
|
|
1368
|
-
() => () => {
|
|
1369
|
-
setContextSession(null);
|
|
1370
|
-
setContextConnectionState("idle");
|
|
1371
|
-
if (sessionEventFeedStore.getSnapshot()?.sessionId === sessionId) {
|
|
1372
|
-
sessionEventFeedStore.set(null);
|
|
1373
|
-
}
|
|
1374
|
-
},
|
|
1375
|
-
[sessionId, sessionEventFeedStore, setContextConnectionState, setContextSession]
|
|
1376
|
-
);
|
|
1377
|
-
useSessionFailureToasts(loadError, streamError);
|
|
1378
|
-
const oauthReturnHandled = useRef2(false);
|
|
1379
|
-
const capabilityClient = context.client;
|
|
1380
|
-
const capabilityCatalog = context.workspaceCapabilityCatalog;
|
|
1381
|
-
const capabilityCatalogReady = context.workspaceMcpCatalogReady;
|
|
1382
|
-
const refreshCapabilityCatalog = context.refreshWorkspaceMcpServers;
|
|
1383
|
-
useEffect4(() => {
|
|
1384
|
-
if (oauthReturnHandled.current || !capabilityCatalogReady) {
|
|
1385
|
-
return;
|
|
1386
|
-
}
|
|
1387
|
-
const params = page.readQuery();
|
|
1388
|
-
const outcome = params.get("integration_oauth");
|
|
1389
|
-
if (!outcome) {
|
|
1390
|
-
return;
|
|
1391
|
-
}
|
|
1392
|
-
oauthReturnHandled.current = true;
|
|
1393
|
-
page.replaceQuery(new URLSearchParams());
|
|
1394
|
-
const capabilityId = params.get("capability_auth");
|
|
1395
|
-
if (outcome !== "success") {
|
|
1396
|
-
void import("./app/lib/oauth-callback-messages.js").then(
|
|
1397
|
-
({ mcpOAuthCallbackFailureMessage }) => toast.error("Reconnect failed", {
|
|
1398
|
-
description: mcpOAuthCallbackFailureMessage(params.get("stage"), params.get("reason"))
|
|
1399
|
-
})
|
|
1400
|
-
);
|
|
1401
|
-
return;
|
|
1402
|
-
}
|
|
1403
|
-
if (!capabilityId) {
|
|
1404
|
-
toast.success("Connection restored", {
|
|
1405
|
-
description: "The earlier tool call wasn't replayed. Send a new message to try again."
|
|
1406
|
-
});
|
|
1407
|
-
return;
|
|
1408
|
-
}
|
|
1409
|
-
void (async () => {
|
|
1410
|
-
const finished = await finishMcpCapabilityOAuthReturn({
|
|
1411
|
-
client: capabilityClient,
|
|
1412
|
-
workspaceId,
|
|
1413
|
-
sessionId,
|
|
1414
|
-
capabilityId,
|
|
1415
|
-
params,
|
|
1416
|
-
catalog: capabilityCatalog,
|
|
1417
|
-
refreshCatalog: refreshCapabilityCatalog
|
|
1418
|
-
});
|
|
1419
|
-
toast.success(`${finished.name} connected`, {
|
|
1420
|
-
description: finished.needsPersonalReview ? "Review its connection card to allow your personal account in this conversation." : "It is available to new tool calls in this session."
|
|
1421
|
-
});
|
|
1422
|
-
})().catch((error) => {
|
|
1423
|
-
toast.error("Connection succeeded, but setup needs attention", {
|
|
1424
|
-
description: userErrorText(error)
|
|
1425
|
-
});
|
|
1426
|
-
});
|
|
1427
|
-
}, [
|
|
1428
|
-
page,
|
|
1429
|
-
capabilityCatalog,
|
|
1430
|
-
capabilityCatalogReady,
|
|
1431
|
-
capabilityClient,
|
|
1432
|
-
refreshCapabilityCatalog,
|
|
1433
|
-
workspaceId,
|
|
1434
|
-
sessionId
|
|
1435
|
-
]);
|
|
1436
|
-
const nativeReturnHandled = useRef2(false);
|
|
1437
|
-
useEffect4(() => {
|
|
1438
|
-
if (nativeReturnHandled.current || !capabilityCatalogReady) return;
|
|
1439
|
-
const params = page.readQuery();
|
|
1440
|
-
const social = params.get("social_oauth");
|
|
1441
|
-
const fiken = params.get("fiken");
|
|
1442
|
-
if (!social && !fiken) return;
|
|
1443
|
-
nativeReturnHandled.current = true;
|
|
1444
|
-
page.replaceQuery(new URLSearchParams());
|
|
1445
|
-
if (social === "success" || fiken === "connected") {
|
|
1446
|
-
const capabilityId = params.get("capability_auth");
|
|
1447
|
-
void (async () => {
|
|
1448
|
-
await refreshCapabilityCatalog(workspaceId);
|
|
1449
|
-
await completeSessionCapabilityOAuth(
|
|
1450
|
-
t,
|
|
1451
|
-
capabilityClient,
|
|
1452
|
-
workspaceId,
|
|
1453
|
-
sessionId,
|
|
1454
|
-
capabilityId
|
|
1455
|
-
);
|
|
1456
|
-
toast.success("Connection setup completed", {
|
|
1457
|
-
description: "It is available to new tool calls in this session."
|
|
1458
|
-
});
|
|
1459
|
-
})().catch(
|
|
1460
|
-
(error) => toast.error("Connection authorized, but setup needs attention", {
|
|
1461
|
-
description: userErrorText(error)
|
|
1462
|
-
})
|
|
1463
|
-
);
|
|
1464
|
-
} else {
|
|
1465
|
-
toast.error("Connection wasn't completed", {
|
|
1466
|
-
description: "You can retry from the connection card."
|
|
1467
|
-
});
|
|
1468
|
-
}
|
|
1469
|
-
}, [
|
|
1470
|
-
page,
|
|
1471
|
-
capabilityCatalogReady,
|
|
1472
|
-
capabilityClient,
|
|
1473
|
-
refreshCapabilityCatalog,
|
|
1474
|
-
workspaceId,
|
|
1475
|
-
sessionId
|
|
1476
|
-
]);
|
|
1477
|
-
const githubReturnHandled = useRef2(false);
|
|
1478
|
-
useEffect4(() => {
|
|
1479
|
-
if (githubReturnHandled.current) return;
|
|
1480
|
-
const params = page.readQuery();
|
|
1481
|
-
const outcome = params.get("github");
|
|
1482
|
-
if (outcome !== "connected" && outcome !== "requested") return;
|
|
1483
|
-
githubReturnHandled.current = true;
|
|
1484
|
-
page.replaceQuery(new URLSearchParams());
|
|
1485
|
-
if (outcome === "requested") {
|
|
1486
|
-
recordGitHubInstallRequest(workspaceId);
|
|
1487
|
-
toast.success("Request sent to your GitHub organization owners", {
|
|
1488
|
-
description: "After an owner approves, an owner of the organization connects it here. Your GitHub card updates on its own."
|
|
1489
|
-
});
|
|
1490
|
-
return;
|
|
1491
|
-
}
|
|
1492
|
-
clearGitHubInstallRequest(workspaceId);
|
|
1493
|
-
toast.success("GitHub connected", {
|
|
1494
|
-
description: "Repository access is now available to new tool calls in this session."
|
|
1495
|
-
});
|
|
1496
|
-
}, [page, workspaceId]);
|
|
1497
|
-
const reconnectTransport = useMemo3(() => context.client.connectTransport(), [context.client]);
|
|
1498
|
-
const [reconnectRequest, setReconnectRequest] = useState3(null);
|
|
1499
|
-
const reconnectCardConnections = useRef2(/* @__PURE__ */ new WeakMap());
|
|
1500
|
-
const connectGitHubApp = useCallback3(() => {
|
|
1501
|
-
setReconnectRequest(githubAppConnectRequest(workspaceId, reconnectTransport, page.href()));
|
|
1502
|
-
}, [page, reconnectTransport, workspaceId]);
|
|
1503
|
-
const connectPersonalGitHub = context.connectPersonalGitHub;
|
|
1504
|
-
const reconnectPersonalGitHub = context.reconnectPersonalGitHub;
|
|
1505
|
-
const personalGitHubConnection = context.personalGitHubStatus?.connection ?? null;
|
|
1506
|
-
const personalGitHubNeedsReconnect = personalGitHubConnection !== null && personalGitHubConnection.status !== "active" && personalGitHubConnection.status !== "revoked";
|
|
1507
|
-
const reconnectViaSetup = useCallback3(
|
|
1508
|
-
async (item) => {
|
|
1509
|
-
if (item.authoritySource === "host") {
|
|
1510
|
-
if (!item.authorizationUrl) {
|
|
1511
|
-
throw new Error(
|
|
1512
|
-
"This connection is managed by the embedding host and has no recovery link."
|
|
1513
|
-
);
|
|
1514
|
-
}
|
|
1515
|
-
page.assign(item.authorizationUrl);
|
|
1516
|
-
return;
|
|
1517
|
-
}
|
|
1518
|
-
if (item.connectionId) {
|
|
1519
|
-
const { findConnectRecoveryAccount } = await import("@opengeni/connect");
|
|
1520
|
-
const target2 = await findConnectRecoveryTarget({
|
|
1521
|
-
workspaceId,
|
|
1522
|
-
connectionId: item.connectionId,
|
|
1523
|
-
accounts: (id) => reconnectTransport.accounts(id),
|
|
1524
|
-
ownAccounts: () => context.client.listOwnConnectionAccounts(workspaceId, { includeInactive: true }),
|
|
1525
|
-
find: findConnectRecoveryAccount
|
|
1526
|
-
});
|
|
1527
|
-
if (target2?.via === "connector") {
|
|
1528
|
-
page.assign(
|
|
1529
|
-
`/workspaces/${encodeURIComponent(target2.workspaceId)}/capabilities?reconnect_domain=${encodeURIComponent(item.providerDomain)}`
|
|
1530
|
-
);
|
|
1531
|
-
return;
|
|
1532
|
-
}
|
|
1533
|
-
if (target2) {
|
|
1534
|
-
const { account } = target2;
|
|
1535
|
-
const request = {
|
|
1536
|
-
scope: { workspaceId: target2.workspaceId, transport: reconnectTransport },
|
|
1537
|
-
providerId: account.providerId,
|
|
1538
|
-
ownership: account.ownership,
|
|
1539
|
-
reconnectAccountId: account.id,
|
|
1540
|
-
// A tool needed more access than the account was connected with:
|
|
1541
|
-
// the reconnect asks the provider for exactly that (incremental consent).
|
|
1542
|
-
// Other providers keep their fixed permission set.
|
|
1543
|
-
...item.reason === "insufficient_scope" && item.scopes.length > 0 && connectProviderAcceptsRequestedScopes(account.providerId) ? { requestedScopes: [...item.scopes] } : {},
|
|
1544
|
-
displayName: account.label,
|
|
1545
|
-
returnUrl: page.href(),
|
|
1546
|
-
// Sign-in runs in a popup: it ends on a page that closes it,
|
|
1547
|
-
// never on a second copy of this chat.
|
|
1548
|
-
finishInPopup: true,
|
|
1549
|
-
idempotencyKey: crypto.randomUUID()
|
|
1550
|
-
};
|
|
1551
|
-
reconnectCardConnections.current.set(request, item.connectionId);
|
|
1552
|
-
setReconnectRequest(request);
|
|
1553
|
-
return;
|
|
1554
|
-
}
|
|
1555
|
-
}
|
|
1556
|
-
if (item.capability) {
|
|
1557
|
-
const returnPath2 = `${new URL(page.href()).pathname}?capability_auth=${encodeURIComponent(item.capability.id)}`;
|
|
1558
|
-
if (item.capability.id === "api:github-app") {
|
|
1559
|
-
const status = await context.client.getGitHubApp(workspaceId, {
|
|
1560
|
-
returnPath: returnPath2
|
|
1561
|
-
});
|
|
1562
|
-
if (status.status === "bound") {
|
|
1563
|
-
toast.success("GitHub is already connected");
|
|
1564
|
-
return;
|
|
1565
|
-
}
|
|
1566
|
-
if (!status.linkUrl) {
|
|
1567
|
-
throw new Error(
|
|
1568
|
-
status.configured ? "Your account cannot manage this workspace's GitHub connection." : "GitHub is not configured on this deployment."
|
|
1569
|
-
);
|
|
1570
|
-
}
|
|
1571
|
-
await markIntegrationConnectRedirect("github", "app_install");
|
|
1572
|
-
page.assign(status.linkUrl);
|
|
1573
|
-
return;
|
|
1574
|
-
}
|
|
1575
|
-
if (item.capability.id === "api:github-personal") {
|
|
1576
|
-
await (personalGitHubNeedsReconnect ? reconnectPersonalGitHub : connectPersonalGitHub)(
|
|
1577
|
-
workspaceId
|
|
1578
|
-
);
|
|
1579
|
-
return;
|
|
1580
|
-
}
|
|
1581
|
-
if (item.capability.id === "mcp:codex_apps") {
|
|
1582
|
-
page.assign(`/workspaces/${encodeURIComponent(workspaceId)}/settings`);
|
|
1583
|
-
return;
|
|
1584
|
-
}
|
|
1585
|
-
const catalogItem = context.workspaceCapabilityCatalog.find(
|
|
1586
|
-
(candidate) => candidate.id === item.capability?.id
|
|
1587
|
-
);
|
|
1588
|
-
const canInstall = canConnectWorkspaceMcpFromChat(
|
|
1589
|
-
context.accessContext,
|
|
1590
|
-
workspaceId,
|
|
1591
|
-
catalogItem,
|
|
1592
|
-
context.workspaceMemberIntegrationSetup
|
|
1593
|
-
);
|
|
1594
|
-
const mcpUrl = catalogItem?.mcpUrl ?? catalogItem?.endpointUrl ?? null;
|
|
1595
|
-
if (canInstall && catalogItem?.kind === "mcp" && catalogItem.authKind === "oauth2" && mcpUrl) {
|
|
1596
|
-
const response2 = await startMcpOAuthWithTimeout(context.client, workspaceId, {
|
|
1597
|
-
mcpUrl,
|
|
1598
|
-
...catalogItem.providerDomain ? { providerDomain: catalogItem.providerDomain } : {},
|
|
1599
|
-
ownership: "workspace",
|
|
1600
|
-
returnPath: returnPath2
|
|
1601
|
-
});
|
|
1602
|
-
if (!response2.authorizationUrl) {
|
|
1603
|
-
throw new Error("The provider did not return an authorization link.");
|
|
1604
|
-
}
|
|
1605
|
-
await markIntegrationConnectRedirect({ domain: mcpUrl }, "oauth");
|
|
1606
|
-
page.assign(response2.authorizationUrl);
|
|
1607
|
-
return;
|
|
1608
|
-
}
|
|
1609
|
-
page.assign(
|
|
1610
|
-
`/workspaces/${encodeURIComponent(workspaceId)}/capabilities?suggested_capability=${encodeURIComponent(item.capability.id)}`
|
|
1611
|
-
);
|
|
1612
|
-
return;
|
|
1613
|
-
}
|
|
1614
|
-
if (item.serverId === "codex_apps") {
|
|
1615
|
-
page.assign(`/workspaces/${encodeURIComponent(workspaceId)}/settings`);
|
|
1616
|
-
return;
|
|
1617
|
-
}
|
|
1618
|
-
const connections = await context.client.listConnections(workspaceId).catch(() => []);
|
|
1619
|
-
const connection = item.connectionId ? connections.find((candidate) => candidate.id === item.connectionId) ?? null : null;
|
|
1620
|
-
if (connection?.kind === "api_key") {
|
|
1621
|
-
page.assign(
|
|
1622
|
-
`/workspaces/${encodeURIComponent(workspaceId)}/capabilities?reconnect_domain=${encodeURIComponent(item.providerDomain)}`
|
|
1623
|
-
);
|
|
1624
|
-
return;
|
|
1625
|
-
}
|
|
1626
|
-
const pageUrl = new URL(page.href());
|
|
1627
|
-
const returnPath = `${pageUrl.pathname}${pageUrl.search}`;
|
|
1628
|
-
const response = await context.client.startConnectionOAuth(workspaceId, {
|
|
1629
|
-
providerDomain: item.providerDomain,
|
|
1630
|
-
...item.connectionId ? { connectionId: item.connectionId } : {},
|
|
1631
|
-
...item.resource ? { resource: item.resource } : {},
|
|
1632
|
-
returnPath
|
|
1633
|
-
});
|
|
1634
|
-
if (!response.authorizationUrl) {
|
|
1635
|
-
throw new Error("The provider did not return an authorization link.");
|
|
1636
|
-
}
|
|
1637
|
-
await markIntegrationConnectRedirect({ domain: item.providerDomain }, "oauth");
|
|
1638
|
-
page.assign(response.authorizationUrl);
|
|
1639
|
-
},
|
|
1640
|
-
[
|
|
1641
|
-
page,
|
|
1642
|
-
context.accessContext,
|
|
1643
|
-
context.client,
|
|
1644
|
-
connectPersonalGitHub,
|
|
1645
|
-
reconnectPersonalGitHub,
|
|
1646
|
-
personalGitHubNeedsReconnect,
|
|
1647
|
-
context.workspaceCapabilityCatalog,
|
|
1648
|
-
context.workspaceMemberIntegrationSetup,
|
|
1649
|
-
workspaceId,
|
|
1650
|
-
reconnectTransport
|
|
1651
|
-
]
|
|
1652
|
-
);
|
|
1653
|
-
const stepUpConnection = useCallback3(
|
|
1654
|
-
(connectionId, scopes, options) => {
|
|
1655
|
-
let reserved;
|
|
1656
|
-
try {
|
|
1657
|
-
if (typeof window === "undefined") return null;
|
|
1658
|
-
reserved = reserveBrowserConnectNavigation(window);
|
|
1659
|
-
} catch {
|
|
1660
|
-
return null;
|
|
1661
|
-
}
|
|
1662
|
-
let closed = false;
|
|
1663
|
-
const close = () => {
|
|
1664
|
-
if (closed) return;
|
|
1665
|
-
closed = true;
|
|
1666
|
-
reserved.close();
|
|
1667
|
-
};
|
|
1668
|
-
return (async () => {
|
|
1669
|
-
try {
|
|
1670
|
-
const [{ findConnectRecoveryAccount }, { stepUpFromCard }] = await Promise.all([
|
|
1671
|
-
import("@opengeni/connect"),
|
|
1672
|
-
import("./connection-step-up-UQHDCXFE.js")
|
|
1673
|
-
]);
|
|
1674
|
-
return await stepUpFromCard({
|
|
1675
|
-
connectionId,
|
|
1676
|
-
scopes,
|
|
1677
|
-
window: { navigation: reserved.navigation, close },
|
|
1678
|
-
transport: reconnectTransport,
|
|
1679
|
-
findTarget: () => findConnectRecoveryTarget({
|
|
1680
|
-
workspaceId,
|
|
1681
|
-
connectionId,
|
|
1682
|
-
accounts: (id) => reconnectTransport.accounts(id),
|
|
1683
|
-
ownAccounts: () => context.client.listOwnConnectionAccounts(workspaceId, { includeInactive: true }),
|
|
1684
|
-
find: findConnectRecoveryAccount
|
|
1685
|
-
}),
|
|
1686
|
-
returnUrl: page.href(),
|
|
1687
|
-
...options.continueAfterSetup ? { continueAfterSetup: options.continueAfterSetup } : {},
|
|
1688
|
-
signal: options.signal
|
|
1689
|
-
});
|
|
1690
|
-
} finally {
|
|
1691
|
-
close();
|
|
1692
|
-
}
|
|
1693
|
-
})();
|
|
1694
|
-
},
|
|
1695
|
-
[context.client, page, reconnectTransport, workspaceId]
|
|
1696
|
-
);
|
|
1697
|
-
const onReconnect = useCallback3(
|
|
1698
|
-
async (item, options) => {
|
|
1699
|
-
const connectionId = item.connectionId;
|
|
1700
|
-
const running = item.authoritySource !== "host" && item.reason === "insufficient_scope" && connectionId && item.scopes.length > 0 && !item.capability && !item.setupRequest ? stepUpConnection(connectionId, item.scopes, {
|
|
1701
|
-
signal: options?.signal,
|
|
1702
|
-
continueAfterSetup: () => context.client.continueAfterCapabilitySetup(workspaceId, sessionId, {
|
|
1703
|
-
connectionId
|
|
1704
|
-
})
|
|
1705
|
-
}) : null;
|
|
1706
|
-
const outcome = running ? await running : null;
|
|
1707
|
-
if (outcome?.status === "allowed") return { outcome: "done" };
|
|
1708
|
-
if (outcome?.status === "resume_in_dialog" && connectionId) {
|
|
1709
|
-
reconnectCardConnections.current.set(outcome.request, connectionId);
|
|
1710
|
-
setReconnectRequest(outcome.request);
|
|
1711
|
-
return void 0;
|
|
1712
|
-
}
|
|
1713
|
-
await reconnectViaSetup(item);
|
|
1714
|
-
return void 0;
|
|
1715
|
-
},
|
|
1716
|
-
[context.client, reconnectViaSetup, sessionId, stepUpConnection, workspaceId]
|
|
1717
|
-
);
|
|
1718
|
-
const allowAccessForApproval = useCallback3(
|
|
1719
|
-
async (access, _approval, signal) => {
|
|
1720
|
-
const running = stepUpConnection(access.connectionId, access.scopes, { signal });
|
|
1721
|
-
if (!running) {
|
|
1722
|
-
toast.error(t("connectWindowHost.allowPopups"));
|
|
1723
|
-
return false;
|
|
1724
|
-
}
|
|
1725
|
-
const outcome = await running;
|
|
1726
|
-
if (outcome.status === "resume_in_dialog") {
|
|
1727
|
-
setReconnectRequest(outcome.request);
|
|
1728
|
-
return false;
|
|
1729
|
-
}
|
|
1730
|
-
if (outcome.status === "not_handled") {
|
|
1731
|
-
toast.error(t("connectSetup.setupCouldNotContinueTryAgain"));
|
|
1732
|
-
return false;
|
|
1733
|
-
}
|
|
1734
|
-
return true;
|
|
1735
|
-
},
|
|
1736
|
-
[stepUpConnection]
|
|
1737
|
-
);
|
|
1738
|
-
const providerLogos = useMemo3(
|
|
1739
|
-
() => connectorLogoIndex(
|
|
1740
|
-
context.workspaceCapabilityCatalog,
|
|
1741
|
-
(path) => context.client.catalogAssetUrl(path ?? null)
|
|
1742
|
-
),
|
|
1743
|
-
[context.client, context.workspaceCapabilityCatalog]
|
|
1744
|
-
);
|
|
1745
|
-
const resolveProviderLogo = useCallback3(
|
|
1746
|
-
(domain) => connectorLogo(providerLogos, domain),
|
|
1747
|
-
[providerLogos]
|
|
1748
|
-
);
|
|
1749
|
-
const lineagePoll = useLineagePollInterval(workspaceId);
|
|
1750
|
-
const lineage = useSessionLineage(sessionId, {
|
|
1751
|
-
events,
|
|
1752
|
-
pollIntervalMs: lineagePoll.pollIntervalMs
|
|
1753
|
-
});
|
|
1754
|
-
const agentNodes = useMemo3(() => lineage.lineage?.children ?? [], [lineage.lineage]);
|
|
1755
|
-
const observeLineageTree = lineagePoll.observeTree;
|
|
1756
|
-
useEffect4(() => observeLineageTree(agentNodes), [agentNodes, observeLineageTree]);
|
|
1757
|
-
const descendantRefreshSignal = useDescendantRequestsRefresh({
|
|
1758
|
-
client: context.client,
|
|
1759
|
-
workspaceId,
|
|
1760
|
-
sessionId,
|
|
1761
|
-
events,
|
|
1762
|
-
nodes: agentNodes,
|
|
1763
|
-
refreshLineage: lineage.refresh
|
|
1764
|
-
});
|
|
1765
|
-
const lineageTitles = useMemo3(() => {
|
|
1766
|
-
const titles = /* @__PURE__ */ new Map();
|
|
1767
|
-
for (const ancestor of lineage.lineage?.ancestors ?? []) {
|
|
1768
|
-
titles.set(ancestor.id, sessionDisplayTitle(ancestor));
|
|
1769
|
-
}
|
|
1770
|
-
const visit = (nodes) => {
|
|
1771
|
-
for (const node of nodes) {
|
|
1772
|
-
titles.set(node.session.id, sessionDisplayTitle(node.session));
|
|
1773
|
-
visit(node.children);
|
|
1774
|
-
}
|
|
1775
|
-
};
|
|
1776
|
-
visit(lineage.lineage?.children ?? []);
|
|
1777
|
-
return titles;
|
|
1778
|
-
}, [lineage.lineage]);
|
|
1779
|
-
const resolveSessionTitle = useCallback3(
|
|
1780
|
-
(agentSessionId) => lineageTitles.get(agentSessionId) ?? null,
|
|
1781
|
-
[lineageTitles]
|
|
1782
|
-
);
|
|
1783
|
-
const sandboxFileRequestSeq = useRef2(0);
|
|
1784
|
-
const [sandboxFileRequest, setSandboxFileRequest] = useState3(null);
|
|
1785
|
-
useEffect4(() => {
|
|
1786
|
-
setSandboxFileRequest(null);
|
|
1787
|
-
}, [sessionId]);
|
|
1788
|
-
const setInspectorOpen = context.setInspectorOpen;
|
|
1789
|
-
const agentSettingsRequestSeq = useRef2(0);
|
|
1790
|
-
const [agentSettingsRequest, setAgentSettingsRequest] = useState3(null);
|
|
1791
|
-
const openAgentSettings = useCallback3(() => {
|
|
1792
|
-
setAgentSettingsRequest({
|
|
1793
|
-
sessionId,
|
|
1794
|
-
requestId: ++agentSettingsRequestSeq.current,
|
|
1795
|
-
target: "learning"
|
|
1796
|
-
});
|
|
1797
|
-
setInspectorOpen(true);
|
|
1798
|
-
}, [sessionId, setInspectorOpen]);
|
|
1799
|
-
const openUsageLimit = useCallback3(() => {
|
|
1800
|
-
setAgentSettingsRequest({
|
|
1801
|
-
sessionId,
|
|
1802
|
-
requestId: ++agentSettingsRequestSeq.current,
|
|
1803
|
-
target: "usage-limit"
|
|
1804
|
-
});
|
|
1805
|
-
setInspectorOpen(true);
|
|
1806
|
-
}, [sessionId, setInspectorOpen]);
|
|
1807
|
-
useEffect4(() => {
|
|
1808
|
-
uiEvents.addEventListener(OPEN_SESSION_USAGE_LIMIT_EVENT, openUsageLimit);
|
|
1809
|
-
return () => uiEvents.removeEventListener(OPEN_SESSION_USAGE_LIMIT_EVENT, openUsageLimit);
|
|
1810
|
-
}, [openUsageLimit, uiEvents]);
|
|
1811
|
-
const openSandboxFile = useCallback3(
|
|
1812
|
-
(path, line) => {
|
|
1813
|
-
setSandboxFileRequest({
|
|
1814
|
-
path,
|
|
1815
|
-
line,
|
|
1816
|
-
requestId: ++sandboxFileRequestSeq.current
|
|
1817
|
-
});
|
|
1818
|
-
setInspectorOpen(true);
|
|
1819
|
-
},
|
|
1820
|
-
[setInspectorOpen]
|
|
1821
|
-
);
|
|
1822
|
-
if (!session || !opened) {
|
|
1823
|
-
if (leavingRestoredSession) return /* @__PURE__ */ jsx(LoadingPanel, {});
|
|
1824
|
-
if (!session && loadError) {
|
|
1825
|
-
return /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(LoadingPanel, {}), children: /* @__PURE__ */ jsx(
|
|
1826
|
-
LazySessionRouteAuxiliary,
|
|
1827
|
-
{
|
|
1828
|
-
workspaceId,
|
|
1829
|
-
sessionId,
|
|
1830
|
-
loadError,
|
|
1831
|
-
onRetry: () => void refreshSession()
|
|
1832
|
-
}
|
|
1833
|
-
) });
|
|
1834
|
-
}
|
|
1835
|
-
return /* @__PURE__ */ jsx("div", { className: "flex min-h-0 w-full min-w-0 flex-1 overflow-hidden", children: /* @__PURE__ */ jsx(
|
|
1836
|
-
SessionDock,
|
|
1837
|
-
{
|
|
1838
|
-
workspaceId,
|
|
1839
|
-
sessionId,
|
|
1840
|
-
session: null,
|
|
1841
|
-
events,
|
|
1842
|
-
connectionState,
|
|
1843
|
-
primary: session && streamError && !initialLoading ? /* @__PURE__ */ jsx(
|
|
1844
|
-
ProblemPanel,
|
|
1845
|
-
{
|
|
1846
|
-
title: "Conversation couldn't be loaded",
|
|
1847
|
-
description: "Your saved messages are unchanged. Try loading them again.",
|
|
1848
|
-
action: /* @__PURE__ */ jsx(Button, { variant: "outline", onClick: () => void jumpToLatest(), children: "Retry conversation" })
|
|
1849
|
-
}
|
|
1850
|
-
) : /* @__PURE__ */ jsx(LoadingPanel, {}),
|
|
1851
|
-
onReloadSession: refreshSession,
|
|
1852
|
-
dockCollapsed: !context.inspectorOpen,
|
|
1853
|
-
onDockCollapsedChange: (collapsed) => context.setInspectorOpen(!collapsed),
|
|
1854
|
-
openFileRequest: sandboxFileRequest,
|
|
1855
|
-
onOpenNavigation: () => {
|
|
1856
|
-
context.setInspectorOpen(false);
|
|
1857
|
-
rail.setDrawerOpen(true);
|
|
1858
|
-
}
|
|
1859
|
-
}
|
|
1860
|
-
) });
|
|
1861
|
-
}
|
|
1862
|
-
const chatPane = /* @__PURE__ */ jsx(
|
|
1863
|
-
SessionChatPane,
|
|
1864
|
-
{
|
|
1865
|
-
session,
|
|
1866
|
-
admissionSessionControl: sessionSeed?.effectiveControl ?? session.effectiveControl,
|
|
1867
|
-
events,
|
|
1868
|
-
timeline,
|
|
1869
|
-
searchTarget,
|
|
1870
|
-
onJumpToSequence: jumpToSequence,
|
|
1871
|
-
initialLoading,
|
|
1872
|
-
historyReloadFailed: hasObservedHistory && events.length === 0 && !!streamError,
|
|
1873
|
-
launch,
|
|
1874
|
-
realtimeAutostartModel,
|
|
1875
|
-
onRealtimeAutostartConsumed: consumeRealtimeAutostart,
|
|
1876
|
-
onSearchOriginConsumed: consumeSearchOrigin,
|
|
1877
|
-
placement,
|
|
1878
|
-
messageContext,
|
|
1879
|
-
initialDraft,
|
|
1880
|
-
approvals,
|
|
1881
|
-
humanInput,
|
|
1882
|
-
failure,
|
|
1883
|
-
creditExhausted,
|
|
1884
|
-
creditRefusal,
|
|
1885
|
-
goal,
|
|
1886
|
-
queue,
|
|
1887
|
-
agentNodes,
|
|
1888
|
-
pendingWake: sessionHasPendingWake(withLineageAutomationFacts(session, lineage.lineage)),
|
|
1889
|
-
descendantRefreshSignal,
|
|
1890
|
-
onDescendantResolved: () => void lineage.refresh(),
|
|
1891
|
-
hasOlder,
|
|
1892
|
-
loadingOlder,
|
|
1893
|
-
onLoadOlder: loadOlder,
|
|
1894
|
-
hasNewer,
|
|
1895
|
-
loadingNewer,
|
|
1896
|
-
onLoadNewer: loadNewer,
|
|
1897
|
-
loadingOldest,
|
|
1898
|
-
onJumpToStart: loadOldest,
|
|
1899
|
-
onJumpToLatest: jumpToLatest,
|
|
1900
|
-
onClearView: clearView,
|
|
1901
|
-
resolveSessionTitle,
|
|
1902
|
-
onOpenSession: (nextSessionId) => void navigate({
|
|
1903
|
-
to: "/workspaces/$workspaceId/sessions/$sessionId",
|
|
1904
|
-
params: { workspaceId, sessionId: nextSessionId }
|
|
1905
|
-
}),
|
|
1906
|
-
onMemoryClick: (memoryId) => void navigate({
|
|
1907
|
-
to: "/workspaces/$workspaceId/memory",
|
|
1908
|
-
params: { workspaceId },
|
|
1909
|
-
search: { memory: memoryId }
|
|
1910
|
-
}),
|
|
1911
|
-
onLearningRefusalOpen: (place) => {
|
|
1912
|
-
switch (place.kind) {
|
|
1913
|
-
case "skill":
|
|
1914
|
-
void navigate({
|
|
1915
|
-
href: `/workspaces/${encodeURIComponent(workspaceId)}/plugins?section=skills&open=${encodeURIComponent(`skill:${place.skillId}`)}`
|
|
1916
|
-
});
|
|
1917
|
-
return;
|
|
1918
|
-
case "skills":
|
|
1919
|
-
void navigate({
|
|
1920
|
-
to: "/workspaces/$workspaceId/plugins",
|
|
1921
|
-
params: { workspaceId },
|
|
1922
|
-
search: { section: "skills" }
|
|
1923
|
-
});
|
|
1924
|
-
return;
|
|
1925
|
-
case "instructions":
|
|
1926
|
-
void navigate({
|
|
1927
|
-
to: "/workspaces/$workspaceId/state",
|
|
1928
|
-
params: { workspaceId },
|
|
1929
|
-
search: { view: "instructions" }
|
|
1930
|
-
});
|
|
1931
|
-
return;
|
|
1932
|
-
case "knowledge":
|
|
1933
|
-
void navigate({ to: "/workspaces/$workspaceId/state", params: { workspaceId } });
|
|
1934
|
-
return;
|
|
1935
|
-
case "learning-settings":
|
|
1936
|
-
void navigate({
|
|
1937
|
-
to: "/workspaces/$workspaceId/settings",
|
|
1938
|
-
params: { workspaceId },
|
|
1939
|
-
search: { section: "learning" }
|
|
1940
|
-
});
|
|
1941
|
-
}
|
|
1942
|
-
},
|
|
1943
|
-
onNewSession: onNewSession ?? (() => void navigate({
|
|
1944
|
-
to: "/workspaces/$workspaceId/sessions",
|
|
1945
|
-
params: { workspaceId }
|
|
1946
|
-
})),
|
|
1947
|
-
onContinueInNewSession: () => void navigate({
|
|
1948
|
-
to: "/workspaces/$workspaceId/sessions",
|
|
1949
|
-
params: { workspaceId },
|
|
1950
|
-
search: { continueSessionId: sessionId }
|
|
1951
|
-
}),
|
|
1952
|
-
onRestoreArchived: session && session.parentSessionId === null && canArchiveChat(context, workspaceId) ? restoreArchived : void 0,
|
|
1953
|
-
onApprove: (approvalId, answer) => approve(approvalId, "approve", answer),
|
|
1954
|
-
onReject: (approvalId) => approve(approvalId, "reject"),
|
|
1955
|
-
onReconnect,
|
|
1956
|
-
onAllowAccess: allowAccessForApproval,
|
|
1957
|
-
onConnectGitHubApp: connectGitHubApp,
|
|
1958
|
-
resolveProviderLogo,
|
|
1959
|
-
onReloadSession: refreshSession,
|
|
1960
|
-
onOpenSandboxFile: dockEnabled ? openSandboxFile : void 0,
|
|
1961
|
-
onOpenAgentSettings: dockEnabled ? openAgentSettings : void 0,
|
|
1962
|
-
onOpenUsageLimit: dockEnabled ? openUsageLimit : void 0,
|
|
1963
|
-
connectionState
|
|
1964
|
-
},
|
|
1965
|
-
session.id
|
|
1966
|
-
);
|
|
1967
|
-
const routeView = /* @__PURE__ */ jsxs("div", { className: "flex min-h-0 w-full min-w-0 flex-1 overflow-hidden", children: [
|
|
1968
|
-
reconnectRequest && /* @__PURE__ */ jsx(LazyPart, { fallback: /* @__PURE__ */ jsx(LoadingPanel, { label: "Opening connection setup" }), children: /* @__PURE__ */ jsx(
|
|
1969
|
-
NativeConnectSetup,
|
|
1970
|
-
{
|
|
1971
|
-
transport: reconnectTransport,
|
|
1972
|
-
workspaceId,
|
|
1973
|
-
request: reconnectRequest,
|
|
1974
|
-
onClose: () => setReconnectRequest(null),
|
|
1975
|
-
onComplete: () => {
|
|
1976
|
-
setReconnectRequest((current) => current === reconnectRequest ? null : current);
|
|
1977
|
-
if (reconnectRequest.providerId === "github-app") {
|
|
1978
|
-
toast.success("GitHub connected");
|
|
1979
|
-
void context.refreshGitHub(workspaceId, void 0, {
|
|
1980
|
-
sync: true,
|
|
1981
|
-
userInitiated: true
|
|
1982
|
-
});
|
|
1983
|
-
return;
|
|
1984
|
-
}
|
|
1985
|
-
const connectionId = reconnectCardConnections.current.get(reconnectRequest);
|
|
1986
|
-
if (connectionId)
|
|
1987
|
-
void Promise.resolve().then(
|
|
1988
|
-
() => context.client.continueAfterCapabilitySetup(workspaceId, sessionId, {
|
|
1989
|
-
connectionId
|
|
1990
|
-
})
|
|
1991
|
-
).catch(() => void 0);
|
|
1992
|
-
toast.success("Connection updated", {
|
|
1993
|
-
description: "New tool calls can use the updated connection."
|
|
1994
|
-
});
|
|
1995
|
-
}
|
|
1996
|
-
}
|
|
1997
|
-
) }),
|
|
1998
|
-
/* @__PURE__ */ jsx(
|
|
1999
|
-
SessionDock,
|
|
2000
|
-
{
|
|
2001
|
-
workspaceId,
|
|
2002
|
-
sessionId,
|
|
2003
|
-
session,
|
|
2004
|
-
events,
|
|
2005
|
-
connectionState,
|
|
2006
|
-
primary: /* @__PURE__ */ jsx(
|
|
2007
|
-
ChatPaymentPages,
|
|
2008
|
-
{
|
|
2009
|
-
accountId: session?.accountId ?? context.workspaces.find((candidate) => candidate.id === workspaceId)?.accountId,
|
|
2010
|
-
children: chatPane
|
|
2011
|
-
}
|
|
2012
|
-
),
|
|
2013
|
-
onReloadSession: refreshSession,
|
|
2014
|
-
dockCollapsed: !context.inspectorOpen,
|
|
2015
|
-
onDockCollapsedChange: (collapsed) => context.setInspectorOpen(!collapsed),
|
|
2016
|
-
openFileRequest: sandboxFileRequest,
|
|
2017
|
-
openAgentSettingsRequest: agentSettingsRequest?.sessionId === sessionId ? agentSettingsRequest : null,
|
|
2018
|
-
onOpenNavigation: () => {
|
|
2019
|
-
context.setInspectorOpen(false);
|
|
2020
|
-
rail.setDrawerOpen(true);
|
|
2021
|
-
}
|
|
2022
|
-
}
|
|
2023
|
-
)
|
|
2024
|
-
] });
|
|
2025
|
-
return routed ? routeView : /* @__PURE__ */ jsx(SessionStartupProvider, { session, children: routeView });
|
|
2026
|
-
async function approve(approvalId, decision, answer) {
|
|
2027
|
-
try {
|
|
2028
|
-
await context.client.sendApprovalDecision(workspaceId, sessionId, {
|
|
2029
|
-
approvalId,
|
|
2030
|
-
decision,
|
|
2031
|
-
...answer
|
|
2032
|
-
});
|
|
2033
|
-
} catch (error) {
|
|
2034
|
-
if (!(error instanceof OpenGeniApiError && error.status === 409))
|
|
2035
|
-
toast.error("Couldn't submit the decision", {
|
|
2036
|
-
description: userErrorText(error)
|
|
2037
|
-
});
|
|
2038
|
-
throw error instanceof Error ? error : new Error(String(error));
|
|
2039
|
-
}
|
|
2040
|
-
}
|
|
2041
|
-
}
|
|
2042
|
-
function withHostMessageContext(...sources) {
|
|
2043
|
-
const value = sources.map((source) => source?.()).filter((part) => Boolean(part)).join("\n\n");
|
|
2044
|
-
return value ? { modelContext: value } : {};
|
|
2045
|
-
}
|
|
2046
|
-
function lastAgentChange(events) {
|
|
2047
|
-
for (let index = events.length - 1; index >= 0; index -= 1) {
|
|
2048
|
-
const event = events[index];
|
|
2049
|
-
if (event.type !== "session.agent.updated") continue;
|
|
2050
|
-
const pending = !events.slice(index + 1).some((later) => later.type === "turn.started");
|
|
2051
|
-
return { at: event.occurredAt, pending };
|
|
2052
|
-
}
|
|
2053
|
-
return null;
|
|
2054
|
-
}
|
|
2055
|
-
function SessionDock(props) {
|
|
2056
|
-
if (!useSessionUiFeature("dock")) {
|
|
2057
|
-
return /* @__PURE__ */ jsx("div", { className: "flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden", children: props.primary });
|
|
2058
|
-
}
|
|
2059
|
-
return /* @__PURE__ */ jsx(SessionDockPanel, { ...props });
|
|
2060
|
-
}
|
|
2061
|
-
function SessionDockPanel(props) {
|
|
2062
|
-
const context = useAppContext();
|
|
2063
|
-
const tabRequestSeq = useRef2(0);
|
|
2064
|
-
const [tabRequest, setTabRequest] = useState3(null);
|
|
2065
|
-
const agentSettingsRequestId = props.openAgentSettingsRequest?.requestId ?? null;
|
|
2066
|
-
const agentSettingsTarget = props.openAgentSettingsRequest?.target ?? "learning";
|
|
2067
|
-
const [agentLearningFocus, setAgentLearningFocus] = useState3(0);
|
|
2068
|
-
const [usageLimitFocus, setUsageLimitFocus] = useState3(0);
|
|
2069
|
-
useEffect4(() => {
|
|
2070
|
-
if (agentSettingsRequestId === null) return;
|
|
2071
|
-
setTabRequest({
|
|
2072
|
-
sessionId: props.sessionId,
|
|
2073
|
-
tab: "agent",
|
|
2074
|
-
requestId: ++tabRequestSeq.current
|
|
2075
|
-
});
|
|
2076
|
-
if (agentSettingsTarget === "usage-limit") setUsageLimitFocus((value) => value + 1);
|
|
2077
|
-
else setAgentLearningFocus((value) => value + 1);
|
|
2078
|
-
}, [agentSettingsRequestId, props.sessionId]);
|
|
2079
|
-
const goalPausedAtLimit = useMemo3(() => goalPausedAtUsageLimit(props.events), [props.events]);
|
|
2080
|
-
const currentTabRequest = tabRequest?.sessionId === props.sessionId ? tabRequest : null;
|
|
2081
|
-
const dockLayoutStorageId = sessionDockLayoutStorageId(
|
|
2082
|
-
context.accessContext.subjectId,
|
|
2083
|
-
props.sessionId
|
|
2084
|
-
);
|
|
2085
|
-
const dockNavigation = useMemo3(
|
|
2086
|
-
() => readSessionDockNavigation(dockLayoutStorageId),
|
|
2087
|
-
[dockLayoutStorageId]
|
|
2088
|
-
);
|
|
2089
|
-
const rememberArtifact = useCallback3(
|
|
2090
|
-
(artifactId) => updateSessionDockNavigation(dockLayoutStorageId, { artifactId }),
|
|
2091
|
-
[dockLayoutStorageId]
|
|
2092
|
-
);
|
|
2093
|
-
const artifactRefreshSequence = useMemo3(() => {
|
|
2094
|
-
for (let index = props.events.length - 1; index >= 0; index -= 1) {
|
|
2095
|
-
const event = props.events[index];
|
|
2096
|
-
if (event && (event.type === "agent.toolCall.output" || event.type === "turn.completed" || event.type === "turn.failed" || event.type === "turn.cancelled")) {
|
|
2097
|
-
return event.sequence;
|
|
2098
|
-
}
|
|
2099
|
-
}
|
|
2100
|
-
return 0;
|
|
2101
|
-
}, [props.events]);
|
|
2102
|
-
useEffect4(() => {
|
|
2103
|
-
if (artifactRefreshSequence) expireArtifactCatalog(context.client, props.workspaceId);
|
|
2104
|
-
}, [artifactRefreshSequence, context.client, props.workspaceId]);
|
|
2105
|
-
const artifactState = useSessionEditableArtifactSummaries({
|
|
2106
|
-
workspaceId: props.workspaceId,
|
|
2107
|
-
sessionId: props.sessionId,
|
|
2108
|
-
refreshSequence: artifactRefreshSequence
|
|
2109
|
-
});
|
|
2110
|
-
const expireAfterArtifactMutation = useArtifactCatalogMutationInvalidation(
|
|
2111
|
-
context.client,
|
|
2112
|
-
props.workspaceId,
|
|
2113
|
-
expireArtifactCatalog
|
|
2114
|
-
);
|
|
2115
|
-
const [artifactRequest, setArtifactRequest] = useState3(null);
|
|
2116
|
-
const currentArtifactRequest = artifactRequest?.sessionId === props.sessionId ? artifactRequest : null;
|
|
2117
|
-
const artifactTabRequestId = currentArtifactRequest?.requestId ?? null;
|
|
2118
|
-
useEffect4(() => {
|
|
2119
|
-
if (artifactTabRequestId === null) return;
|
|
2120
|
-
setTabRequest({
|
|
2121
|
-
sessionId: props.sessionId,
|
|
2122
|
-
tab: "artifacts",
|
|
2123
|
-
requestId: ++tabRequestSeq.current
|
|
2124
|
-
});
|
|
2125
|
-
}, [artifactTabRequestId, props.sessionId]);
|
|
2126
|
-
const artifactSummaries = [...artifactState.artifacts];
|
|
2127
|
-
if (currentArtifactRequest && !artifactSummaries.some(
|
|
2128
|
-
(item) => item.id === currentArtifactRequest.artifactId && (!currentArtifactRequest.artifactKind || item.modality === currentArtifactRequest.artifactKind || currentArtifactRequest.artifactKind === "file" && item.modality === "image")
|
|
2129
|
-
)) {
|
|
2130
|
-
artifactSummaries.push({
|
|
2131
|
-
id: currentArtifactRequest.artifactId,
|
|
2132
|
-
modality: currentArtifactRequest.artifactKind ?? "site",
|
|
2133
|
-
title: currentArtifactRequest.artifactKind === "image" ? "Image" : currentArtifactRequest.artifactKind === "file" ? "File" : "App"
|
|
2134
|
-
});
|
|
2135
|
-
}
|
|
2136
|
-
const linkState = useSessionLinks({
|
|
2137
|
-
workspaceId: props.workspaceId,
|
|
2138
|
-
sessionId: props.sessionId,
|
|
2139
|
-
events: props.events
|
|
2140
|
-
});
|
|
2141
|
-
const canControlSession = hasWorkspacePermission(
|
|
2142
|
-
context.accessContext,
|
|
2143
|
-
props.workspaceId,
|
|
2144
|
-
"sessions:control"
|
|
2145
|
-
);
|
|
2146
|
-
const linkedPullRequest = useMemo3(
|
|
2147
|
-
() => openPullRequestFromLinks(linkState.links),
|
|
2148
|
-
[linkState.links]
|
|
2149
|
-
);
|
|
2150
|
-
const openPullRequestPending = useRef2(false);
|
|
2151
|
-
const openPullRequest = useCallback3(() => {
|
|
2152
|
-
if (openPullRequestPending.current) return;
|
|
2153
|
-
openPullRequestPending.current = true;
|
|
2154
|
-
void context.client.sendMessage(props.workspaceId, props.sessionId, {
|
|
2155
|
-
text: OPEN_PULL_REQUEST_MESSAGE,
|
|
2156
|
-
clientEventId: crypto.randomUUID()
|
|
2157
|
-
}).catch((failure) => toast.error(userErrorText(failure, "Try again."))).finally(() => {
|
|
2158
|
-
openPullRequestPending.current = false;
|
|
2159
|
-
});
|
|
2160
|
-
}, [context.client, props.workspaceId, props.sessionId]);
|
|
2161
|
-
const sessionArchived = props.session ? sessionReadOnlyArchive(props.session) !== null : false;
|
|
2162
|
-
const canAskAgent = canControlSession && Boolean(props.session) && !sessionArchived;
|
|
2163
|
-
const pullRequestLink = useMemo3(
|
|
2164
|
-
() => pullRequestLinkFromLinks(linkState.links),
|
|
2165
|
-
[linkState.links]
|
|
2166
|
-
);
|
|
2167
|
-
const otherLinks = useMemo3(
|
|
2168
|
-
() => ({
|
|
2169
|
-
...linkState,
|
|
2170
|
-
links: linkState.links.filter((link) => link.id !== pullRequestLink?.id)
|
|
2171
|
-
}),
|
|
2172
|
-
[linkState, pullRequestLink]
|
|
2173
|
-
);
|
|
2174
|
-
const mergePullRequest = useCallback3(
|
|
2175
|
-
async (url) => {
|
|
2176
|
-
try {
|
|
2177
|
-
await context.client.sendMessage(props.workspaceId, props.sessionId, {
|
|
2178
|
-
text: mergePullRequestMessage(url),
|
|
2179
|
-
clientEventId: crypto.randomUUID()
|
|
2180
|
-
});
|
|
2181
|
-
} catch (failure) {
|
|
2182
|
-
toast.error(userErrorText(failure, "Try again."));
|
|
2183
|
-
throw failure;
|
|
2184
|
-
}
|
|
2185
|
-
},
|
|
2186
|
-
[context.client, props.workspaceId, props.sessionId]
|
|
2187
|
-
);
|
|
2188
|
-
const pullRequestTabOpened = useRef2(null);
|
|
2189
|
-
useEffect4(() => {
|
|
2190
|
-
if (!pullRequestLink || pullRequestTabOpened.current === props.sessionId) return;
|
|
2191
|
-
pullRequestTabOpened.current = props.sessionId;
|
|
2192
|
-
if (readSessionDockNavigation(dockLayoutStorageId).activeTab) return;
|
|
2193
|
-
setTabRequest({
|
|
2194
|
-
sessionId: props.sessionId,
|
|
2195
|
-
tab: PULL_REQUEST_TAB,
|
|
2196
|
-
requestId: ++tabRequestSeq.current,
|
|
2197
|
-
// Select it, but don't open a closed panel in the middle of reading.
|
|
2198
|
-
expand: false
|
|
2199
|
-
});
|
|
2200
|
-
}, [pullRequestLink, props.sessionId, dockLayoutStorageId]);
|
|
2201
|
-
const hasChanges = useMemo3(
|
|
2202
|
-
() => initialWorkspaceTab(props.events) === WORKBENCH_TAB_CHANGES,
|
|
2203
|
-
[props.events]
|
|
2204
|
-
);
|
|
2205
|
-
const contentBits = (hasChanges ? 1 : 0) | (pullRequestLink ? 2 : 0) | (artifactSummaries.length > 0 ? 4 : 0);
|
|
2206
|
-
const contentLoaded = linkState.status !== "loading" && artifactState.status !== "loading";
|
|
2207
|
-
const seenContent = useRef2(null);
|
|
2208
|
-
const setInspectorHint = context.setInspectorHint;
|
|
2209
|
-
useEffect4(() => {
|
|
2210
|
-
if (!setInspectorHint) return;
|
|
2211
|
-
const seen = seenContent.current;
|
|
2212
|
-
if (!seen || seen.sessionId !== props.sessionId || !props.dockCollapsed || !contentLoaded) {
|
|
2213
|
-
seenContent.current = { sessionId: props.sessionId, bits: contentBits };
|
|
2214
|
-
setInspectorHint(false);
|
|
2215
|
-
return;
|
|
2216
|
-
}
|
|
2217
|
-
if ((contentBits & ~seen.bits) !== 0) setInspectorHint(true);
|
|
2218
|
-
}, [contentBits, contentLoaded, props.dockCollapsed, props.sessionId, setInspectorHint]);
|
|
2219
|
-
useEffect4(() => () => setInspectorHint?.(false), [setInspectorHint]);
|
|
2220
|
-
const pullRequestNumberLabel = pullRequestLink ? pullRequestNumber(pullRequestLink) : null;
|
|
2221
|
-
const leadingTabs = pullRequestLink ? [
|
|
2222
|
-
{
|
|
2223
|
-
id: PULL_REQUEST_TAB,
|
|
2224
|
-
label: pullRequestNumberLabel ? `PR #${pullRequestNumberLabel}` : "PR",
|
|
2225
|
-
icon: /* @__PURE__ */ jsx(GitPullRequestIcon, {}),
|
|
2226
|
-
content: /* @__PURE__ */ jsx(
|
|
2227
|
-
SessionPullRequestPanel,
|
|
2228
|
-
{
|
|
2229
|
-
workspaceId: props.workspaceId,
|
|
2230
|
-
sessionId: props.sessionId,
|
|
2231
|
-
link: pullRequestLink,
|
|
2232
|
-
...canAskAgent ? { onMerge: () => mergePullRequest(pullRequestLink.url) } : {},
|
|
2233
|
-
...canControlSession && !sessionArchived ? { onRemove: () => void linkState.remove(pullRequestLink.id) } : {}
|
|
2234
|
-
},
|
|
2235
|
-
`${props.sessionId}:${pullRequestLink.id}`
|
|
2236
|
-
)
|
|
2237
|
-
}
|
|
2238
|
-
] : [];
|
|
2239
|
-
const trailingTabs = [];
|
|
2240
|
-
if (otherLinks.links.length > 0) {
|
|
2241
|
-
trailingTabs.push({
|
|
2242
|
-
id: "linked",
|
|
2243
|
-
label: "Linked",
|
|
2244
|
-
icon: /* @__PURE__ */ jsx(LinkIcon, {}),
|
|
2245
|
-
optional: true,
|
|
2246
|
-
content: /* @__PURE__ */ jsx(
|
|
2247
|
-
SessionLinkedPanel,
|
|
2248
|
-
{
|
|
2249
|
-
state: otherLinks,
|
|
2250
|
-
canEdit: canControlSession && !sessionArchived,
|
|
2251
|
-
connectHref: (connect) => connect.capabilityId ? `/workspaces/${encodeURIComponent(props.workspaceId)}/plugins?suggested_capability=${encodeURIComponent(connect.capabilityId)}` : `/workspaces/${encodeURIComponent(props.workspaceId)}/plugins`
|
|
2252
|
-
}
|
|
2253
|
-
)
|
|
2254
|
-
});
|
|
2255
|
-
}
|
|
2256
|
-
trailingTabs.push({
|
|
2257
|
-
id: "artifacts",
|
|
2258
|
-
label: "Artifacts",
|
|
2259
|
-
icon: /* @__PURE__ */ jsx(PanelsTopLeftIcon, {}),
|
|
2260
|
-
// On the strip once the chat has artifacts; until then, in the "+" menu.
|
|
2261
|
-
...artifactSummaries.length === 0 ? { optional: true, inMenu: true } : {},
|
|
2262
|
-
content: /* @__PURE__ */ jsx(LazyPart, { fallback: /* @__PURE__ */ jsx(LoadingPanel, { label: "Opening artifact" }), children: /* @__PURE__ */ jsx(
|
|
2263
|
-
LazySessionEditableArtifactsWorkspace,
|
|
2264
|
-
{
|
|
2265
|
-
workspaceId: props.workspaceId,
|
|
2266
|
-
sessionId: props.sessionId,
|
|
2267
|
-
artifacts: artifactSummaries,
|
|
2268
|
-
status: artifactState.status,
|
|
2269
|
-
onRetry: artifactState.retry,
|
|
2270
|
-
initialSelectedArtifactId: dockNavigation.artifactId,
|
|
2271
|
-
openArtifactRequest: currentArtifactRequest,
|
|
2272
|
-
onSelectedArtifactIdChange: rememberArtifact,
|
|
2273
|
-
onPin: hasWorkspacePermission(context.accessContext, props.workspaceId, "artifacts:publish") ? async (item, pinned) => {
|
|
2274
|
-
await context.client.updateArtifactPin(
|
|
2275
|
-
props.workspaceId,
|
|
2276
|
-
item.kind,
|
|
2277
|
-
item.id,
|
|
2278
|
-
pinned
|
|
2279
|
-
);
|
|
2280
|
-
artifactState.applyPin(item.kind, item.id, pinned);
|
|
2281
|
-
expireAfterArtifactMutation();
|
|
2282
|
-
artifactState.retry();
|
|
2283
|
-
} : void 0
|
|
2284
|
-
},
|
|
2285
|
-
props.sessionId
|
|
2286
|
-
) })
|
|
2287
|
-
});
|
|
2288
|
-
if (props.session) {
|
|
2289
|
-
trailingTabs.push({
|
|
2290
|
-
id: "agent",
|
|
2291
|
-
label: "Settings",
|
|
2292
|
-
icon: /* @__PURE__ */ jsx(SettingsIcon, {}),
|
|
2293
|
-
optional: true,
|
|
2294
|
-
// Rarely needed: kept in "+" even when the strip has room.
|
|
2295
|
-
inMenu: true,
|
|
2296
|
-
content: /* @__PURE__ */ jsx(LazyPart, { fallback: /* @__PURE__ */ jsx(LoadingPanel, { label: "Opening settings" }), children: /* @__PURE__ */ jsx(
|
|
2297
|
-
LazyAgentConfigurationPanel,
|
|
2298
|
-
{
|
|
2299
|
-
session: props.session,
|
|
2300
|
-
lastChange: lastAgentChange(props.events),
|
|
2301
|
-
onReloadSession: props.onReloadSession,
|
|
2302
|
-
learningFocusRequest: agentLearningFocus,
|
|
2303
|
-
usageLimitFocusRequest: usageLimitFocus,
|
|
2304
|
-
goalPausedAtUsageLimit: goalPausedAtLimit
|
|
2305
|
-
},
|
|
2306
|
-
props.session.id
|
|
2307
|
-
) })
|
|
2308
|
-
});
|
|
2309
|
-
}
|
|
2310
|
-
if (props.session) {
|
|
2311
|
-
trailingTabs.push({
|
|
2312
|
-
id: "debug",
|
|
2313
|
-
label: "Debug",
|
|
2314
|
-
icon: /* @__PURE__ */ jsx(BugIcon, {}),
|
|
2315
|
-
optional: true,
|
|
2316
|
-
inMenu: true,
|
|
2317
|
-
content: /* @__PURE__ */ jsx(LazyPart, { fallback: /* @__PURE__ */ jsx(LoadingPanel, { label: "Opening debug inspector" }), children: /* @__PURE__ */ jsx(
|
|
2318
|
-
LazySessionInspector,
|
|
2319
|
-
{
|
|
2320
|
-
session: props.session,
|
|
2321
|
-
events: props.events,
|
|
2322
|
-
connectionState: props.connectionState,
|
|
2323
|
-
onReloadSession: props.onReloadSession
|
|
2324
|
-
}
|
|
2325
|
-
) })
|
|
2326
|
-
});
|
|
2327
|
-
}
|
|
2328
|
-
return /* @__PURE__ */ jsx(
|
|
2329
|
-
SessionWorkspace,
|
|
2330
|
-
{
|
|
2331
|
-
workspaceId: props.workspaceId,
|
|
2332
|
-
sessionId: props.sessionId,
|
|
2333
|
-
preferenceOwnerId: context.accessContext.subjectId,
|
|
2334
|
-
events: props.events,
|
|
2335
|
-
primary: /* @__PURE__ */ jsx(
|
|
2336
|
-
ArtifactLinkBoundary,
|
|
2337
|
-
{
|
|
2338
|
-
workspaceId: props.workspaceId,
|
|
2339
|
-
onOpen: (target2) => {
|
|
2340
|
-
if (target2.editable && !artifactSummaries.some(
|
|
2341
|
-
(item) => item.id === target2.id && isEditableArtifactKind(item.modality)
|
|
2342
|
-
))
|
|
2343
|
-
return false;
|
|
2344
|
-
setArtifactRequest((previous) => ({
|
|
2345
|
-
sessionId: props.sessionId,
|
|
2346
|
-
artifactId: target2.id,
|
|
2347
|
-
artifactKind: target2.kind === "file" ? artifactSummaries.find(
|
|
2348
|
-
(item) => item.id === target2.id && (item.modality === "file" || item.modality === "image")
|
|
2349
|
-
)?.modality ?? "file" : target2.editable ? artifactSummaries.find(
|
|
2350
|
-
(item) => item.id === target2.id && isEditableArtifactKind(item.modality)
|
|
2351
|
-
)?.modality : "site",
|
|
2352
|
-
requestId: (previous?.requestId ?? 0) + 1,
|
|
2353
|
-
tab: "artifacts"
|
|
2354
|
-
}));
|
|
2355
|
-
return true;
|
|
2356
|
-
},
|
|
2357
|
-
children: props.primary
|
|
2358
|
-
}
|
|
2359
|
-
),
|
|
2360
|
-
openTabRequest: currentTabRequest,
|
|
2361
|
-
leadingTabs,
|
|
2362
|
-
trailingTabs,
|
|
2363
|
-
pullRequest: linkedPullRequest,
|
|
2364
|
-
...canAskAgent ? { onOpenPullRequest: openPullRequest } : {},
|
|
2365
|
-
collapsed: props.dockCollapsed,
|
|
2366
|
-
onCollapsedChange: props.onDockCollapsedChange,
|
|
2367
|
-
...props.openFileRequest ? { openFileRequest: props.openFileRequest } : {},
|
|
2368
|
-
mobileLeadingControl: /* @__PURE__ */ jsx(
|
|
2369
|
-
Button,
|
|
2370
|
-
{
|
|
2371
|
-
type: "button",
|
|
2372
|
-
variant: "ghost",
|
|
2373
|
-
size: "icon-sm",
|
|
2374
|
-
"aria-label": "Open navigation",
|
|
2375
|
-
onClick: props.onOpenNavigation,
|
|
2376
|
-
className: "size-11",
|
|
2377
|
-
children: /* @__PURE__ */ jsx(MenuIcon, { className: "size-4" })
|
|
2378
|
-
}
|
|
2379
|
-
)
|
|
2380
|
-
}
|
|
2381
|
-
);
|
|
2382
|
-
}
|
|
2383
|
-
function useSessionEditableArtifactSummaries(input) {
|
|
2384
|
-
const context = useAppContext();
|
|
2385
|
-
const authorityKey = `${input.workspaceId}:${input.sessionId}:${context.accessKeyVersion}`;
|
|
2386
|
-
const [retrySequence, setRetrySequence] = useState3(0);
|
|
2387
|
-
const discovery = useRef2(null);
|
|
2388
|
-
const [loaded, setLoaded] = useState3(null);
|
|
2389
|
-
useEffect4(
|
|
2390
|
-
() => () => {
|
|
2391
|
-
discovery.current = null;
|
|
2392
|
-
},
|
|
2393
|
-
[]
|
|
2394
|
-
);
|
|
2395
|
-
useEffect4(() => {
|
|
2396
|
-
if (discovery.current?.key !== authorityKey || discovery.current.client !== context.client || discovery.current.retrySequence !== retrySequence)
|
|
2397
|
-
discovery.current = {
|
|
2398
|
-
key: authorityKey,
|
|
2399
|
-
client: context.client,
|
|
2400
|
-
retrySequence,
|
|
2401
|
-
running: false,
|
|
2402
|
-
again: false
|
|
2403
|
-
};
|
|
2404
|
-
const run = discovery.current;
|
|
2405
|
-
setLoaded(
|
|
2406
|
-
(previous) => previous?.key === authorityKey && previous.client === context.client && previous.status === "ready" ? previous : {
|
|
2407
|
-
key: authorityKey,
|
|
2408
|
-
client: context.client,
|
|
2409
|
-
status: "loading",
|
|
2410
|
-
artifacts: previous?.key === authorityKey && previous.client === context.client ? previous.artifacts : []
|
|
2411
|
-
}
|
|
2412
|
-
);
|
|
2413
|
-
if (run.running) {
|
|
2414
|
-
run.again = true;
|
|
2415
|
-
return;
|
|
2416
|
-
}
|
|
2417
|
-
const workspaceId = input.workspaceId;
|
|
2418
|
-
const sessionId = input.sessionId;
|
|
2419
|
-
const client = context.client;
|
|
2420
|
-
const live = () => discovery.current === run;
|
|
2421
|
-
const previousArtifacts = (previous) => previous?.key === authorityKey && previous.client === client ? previous.artifacts : [];
|
|
2422
|
-
const start = () => {
|
|
2423
|
-
run.running = true;
|
|
2424
|
-
run.again = false;
|
|
2425
|
-
void import("./app/lib/session-artifact-discovery.js").then(async ({ discoverSessionArtifacts }) => {
|
|
2426
|
-
const reconcile = await discoverSessionArtifacts(workspaceId, sessionId, live, client);
|
|
2427
|
-
if (live())
|
|
2428
|
-
setLoaded((previous) => ({
|
|
2429
|
-
key: authorityKey,
|
|
2430
|
-
client,
|
|
2431
|
-
...reconcile(previousArtifacts(previous))
|
|
2432
|
-
}));
|
|
2433
|
-
}).catch(() => {
|
|
2434
|
-
if (!live()) return;
|
|
2435
|
-
setLoaded((previous) => ({
|
|
2436
|
-
key: authorityKey,
|
|
2437
|
-
client,
|
|
2438
|
-
status: "error",
|
|
2439
|
-
artifacts: previousArtifacts(previous)
|
|
2440
|
-
}));
|
|
2441
|
-
}).finally(() => {
|
|
2442
|
-
run.running = false;
|
|
2443
|
-
if (run.again && live()) start();
|
|
2444
|
-
});
|
|
2445
|
-
};
|
|
2446
|
-
start();
|
|
2447
|
-
}, [
|
|
2448
|
-
authorityKey,
|
|
2449
|
-
context.client,
|
|
2450
|
-
input.refreshSequence,
|
|
2451
|
-
input.sessionId,
|
|
2452
|
-
input.workspaceId,
|
|
2453
|
-
retrySequence
|
|
2454
|
-
]);
|
|
2455
|
-
const retry = useCallback3(() => setRetrySequence((value) => value + 1), []);
|
|
2456
|
-
const applyPin = useCallback3(
|
|
2457
|
-
(kind, id, pinned) => {
|
|
2458
|
-
setLoaded((previous) => {
|
|
2459
|
-
if (previous?.key !== authorityKey || previous.client !== context.client) return previous;
|
|
2460
|
-
return {
|
|
2461
|
-
...previous,
|
|
2462
|
-
artifacts: previous.artifacts.map(
|
|
2463
|
-
(artifact) => artifact.modality === kind && artifact.id === id && artifact.catalogItem ? { ...artifact, catalogItem: { ...artifact.catalogItem, pinned } } : artifact
|
|
2464
|
-
)
|
|
2465
|
-
};
|
|
2466
|
-
});
|
|
2467
|
-
},
|
|
2468
|
-
[authorityKey, context.client]
|
|
2469
|
-
);
|
|
2470
|
-
return loaded?.key === authorityKey && loaded.client === context.client ? { artifacts: loaded.artifacts, status: loaded.status, retry, applyPin } : { artifacts: [], status: "loading", retry, applyPin };
|
|
2471
|
-
}
|
|
2472
|
-
function approvalDecisionKey(approval) {
|
|
2473
|
-
return `${approval.id}\0${approval.elicitation?.round ?? ""}`;
|
|
2474
|
-
}
|
|
2475
|
-
function SessionChatPane(props) {
|
|
2476
|
-
const findEvents = useUiEventTarget("document");
|
|
2477
|
-
const portalContainer = usePortalContainer();
|
|
2478
|
-
const [panelRoot, setPanelRoot] = useState3(null);
|
|
2479
|
-
const context = useAppContext();
|
|
2480
|
-
const api = useAppApi();
|
|
2481
|
-
const page = usePage();
|
|
2482
|
-
const navigate = useNavigate();
|
|
2483
|
-
const openSession = useCallback3(
|
|
2484
|
-
(workspaceId, sessionId) => void navigate({
|
|
2485
|
-
to: "/workspaces/$workspaceId/sessions/$sessionId",
|
|
2486
|
-
params: { workspaceId, sessionId }
|
|
2487
|
-
}),
|
|
2488
|
-
[navigate]
|
|
2489
|
-
);
|
|
2490
|
-
const resolveLink = useWorkspaceAppLinkResolver(props.session.workspaceId, openSession);
|
|
2491
|
-
const hostMessageContext = useHostMessageContext();
|
|
2492
|
-
const gutter = props.placement === "panel" ? "px-3" : "px-4 sm:px-6";
|
|
2493
|
-
const realtimeClient = useMemo3(
|
|
2494
|
-
() => api.voiceRealtimeClient(context.client, () => page.href()),
|
|
2495
|
-
[api, context.client, page]
|
|
2496
|
-
);
|
|
2497
|
-
const momentSequence = props.searchTarget.find ? void 0 : props.searchTarget.at;
|
|
2498
|
-
const loadedMoment = useRef2(null);
|
|
2499
|
-
const { onJumpToSequence, initialLoading: historyLoading } = props;
|
|
2500
|
-
const firstLoadedSequence = props.events[0]?.sequence;
|
|
2501
|
-
useEffect4(() => {
|
|
2502
|
-
if (!momentSequence || historyLoading || loadedMoment.current === momentSequence) return;
|
|
2503
|
-
loadedMoment.current = momentSequence;
|
|
2504
|
-
if (firstLoadedSequence !== void 0 && firstLoadedSequence > momentSequence) {
|
|
2505
|
-
void onJumpToSequence(momentSequence);
|
|
2506
|
-
}
|
|
2507
|
-
}, [momentSequence, historyLoading, firstLoadedSequence, onJumpToSequence]);
|
|
2508
|
-
const [findOpen, setFindOpen] = useState3(!!props.searchTarget.find);
|
|
2509
|
-
const [findMounted, setFindMounted] = useState3(!!props.searchTarget.find);
|
|
2510
|
-
const [findFocusRevision, setFindFocusRevision] = useState3(0);
|
|
2511
|
-
const [activeSearchTarget, setActiveSearchTarget] = useState3(null);
|
|
2512
|
-
const findReturnFocus = useRef2(null);
|
|
2513
|
-
const openFind = useCallback3(() => {
|
|
2514
|
-
const active = document.activeElement;
|
|
2515
|
-
if (active instanceof HTMLElement && active !== document.body) findReturnFocus.current = active;
|
|
2516
|
-
setFindMounted(true);
|
|
2517
|
-
setFindOpen(true);
|
|
2518
|
-
setFindFocusRevision((value) => value + 1);
|
|
2519
|
-
}, []);
|
|
2520
|
-
const { onSearchOriginConsumed } = props;
|
|
2521
|
-
const closeFind = useCallback3(() => {
|
|
2522
|
-
setFindOpen(false);
|
|
2523
|
-
setActiveSearchTarget(null);
|
|
2524
|
-
onSearchOriginConsumed();
|
|
2525
|
-
requestAnimationFrame(() => {
|
|
2526
|
-
const opener = findReturnFocus.current;
|
|
2527
|
-
findReturnFocus.current = null;
|
|
2528
|
-
const trigger = document.querySelector("[data-conversation-find-trigger]");
|
|
2529
|
-
const target2 = opener?.isConnected ? opener : trigger && trigger.getClientRects().length > 0 ? trigger : null;
|
|
2530
|
-
target2?.focus({ preventScroll: true });
|
|
2531
|
-
});
|
|
2532
|
-
}, [onSearchOriginConsumed]);
|
|
2533
|
-
useEffect4(() => {
|
|
2534
|
-
findEvents.addEventListener(OPEN_CONVERSATION_FIND_EVENT, openFind);
|
|
2535
|
-
return () => findEvents.removeEventListener(OPEN_CONVERSATION_FIND_EVENT, openFind);
|
|
2536
|
-
}, [findEvents, openFind]);
|
|
2537
|
-
useEffect4(() => {
|
|
2538
|
-
if (props.searchTarget.find) openFind();
|
|
2539
|
-
}, [
|
|
2540
|
-
props.searchTarget.find,
|
|
2541
|
-
props.searchTarget.matchSequence,
|
|
2542
|
-
props.searchTarget.matchOffset,
|
|
2543
|
-
openFind
|
|
2544
|
-
]);
|
|
2545
|
-
useFindShortcut(
|
|
2546
|
-
props.placement === "panel" ? { scope: panelRoot } : { scope: portalContainer ?? window },
|
|
2547
|
-
openFind
|
|
2548
|
-
);
|
|
2549
|
-
const fundingRevision = useMemo3(() => {
|
|
2550
|
-
for (let index = props.events.length - 1; index >= 0; index -= 1) {
|
|
2551
|
-
const event = props.events[index];
|
|
2552
|
-
if (event.type === "agent.model.usage") return event.sequence;
|
|
2553
|
-
}
|
|
2554
|
-
return 0;
|
|
2555
|
-
}, [props.events]);
|
|
2556
|
-
const modelCatalog = useWorkspaceModelCatalog(
|
|
2557
|
-
props.session.workspaceId,
|
|
2558
|
-
`${props.session.id}:${props.session.status}:${fundingRevision}`
|
|
2559
|
-
);
|
|
2560
|
-
const fleet = useWorkspaceMachines({
|
|
2561
|
-
sessionId: props.session.id,
|
|
2562
|
-
pollIntervalMs: MACHINES_SESSION_POLL_MS
|
|
2563
|
-
});
|
|
2564
|
-
const computeLabel = sessionComputeLabel(t, fleet.machines);
|
|
2565
|
-
const loadRetainedScreenshot = useMemo3(
|
|
2566
|
-
() => createSessionRetainedScreenshotLoader(
|
|
2567
|
-
context.client,
|
|
2568
|
-
props.session.workspaceId,
|
|
2569
|
-
props.session.id
|
|
2570
|
-
),
|
|
2571
|
-
[context.client, props.session.id, props.session.workspaceId]
|
|
2572
|
-
);
|
|
2573
|
-
const loadRetainedArtifact = useMemo3(
|
|
2574
|
-
() => createWorkspaceRetainedArtifactLoader(context.client, props.session.workspaceId),
|
|
2575
|
-
[context.client, props.session.workspaceId]
|
|
2576
|
-
);
|
|
2577
|
-
const loadVideoArtifactPlayback = useMemo3(
|
|
2578
|
-
() => createWorkspaceRetainedVideoLoader(context.client, props.session.workspaceId),
|
|
2579
|
-
[context.client, props.session.workspaceId]
|
|
2580
|
-
);
|
|
2581
|
-
const readOnlyArchive = sessionReadOnlyArchive(props.session);
|
|
2582
|
-
const cancelled = readOnlyArchive === null && isTerminalSessionStatus(props.session.status);
|
|
2583
|
-
const terminal = cancelled || readOnlyArchive !== null;
|
|
2584
|
-
const answerStore = useMemo3(() => browserInteractiveAnswerStore(), []);
|
|
2585
|
-
const composerRegionRef = useRef2(null);
|
|
2586
|
-
const [composerFocusSignal, setComposerFocusSignal] = useState3(0);
|
|
2587
|
-
const focusEvents = useUiEventTarget("window");
|
|
2588
|
-
const [modelPickerSession, setModelPickerSession] = useState3(null);
|
|
2589
|
-
const { simplified: simplifiedInterface } = useSimplifiedInterface();
|
|
2590
|
-
const [refusedModel, setRefusedModel] = useState3(
|
|
2591
|
-
null
|
|
2592
|
-
);
|
|
2593
|
-
const [creditRefusal, setCreditRefusal] = useState3(null);
|
|
2594
|
-
useEffect4(() => {
|
|
2595
|
-
const onFocusRequest = (event) => {
|
|
2596
|
-
const detail = event.detail;
|
|
2597
|
-
if (detail?.workspaceId === props.session.workspaceId && detail.sessionId === props.session.id) {
|
|
2598
|
-
setComposerFocusSignal(detail.nonce);
|
|
2599
|
-
}
|
|
2600
|
-
};
|
|
2601
|
-
focusEvents.addEventListener(FOCUS_SESSION_COMPOSER_EVENT, onFocusRequest);
|
|
2602
|
-
return () => focusEvents.removeEventListener(FOCUS_SESSION_COMPOSER_EVENT, onFocusRequest);
|
|
2603
|
-
}, [focusEvents, props.session.id, props.session.workspaceId]);
|
|
2604
|
-
const loadFocusSessionRef = useRef2(null);
|
|
2605
|
-
const composerFocusWaitRef = useRef2(null);
|
|
2606
|
-
useEffect4(
|
|
2607
|
-
() => () => {
|
|
2608
|
-
composerFocusWaitRef.current?.cancel();
|
|
2609
|
-
composerFocusWaitRef.current = null;
|
|
2610
|
-
},
|
|
2611
|
-
[]
|
|
2612
|
-
);
|
|
2613
|
-
useEffect4(() => {
|
|
2614
|
-
if (composerFocusWaitRef.current && composerFocusWaitRef.current.sessionId !== props.session.id) {
|
|
2615
|
-
composerFocusWaitRef.current.cancel();
|
|
2616
|
-
composerFocusWaitRef.current = null;
|
|
2617
|
-
}
|
|
2618
|
-
const intent = consumeSessionComposerFocusIntent(
|
|
2619
|
-
focusEvents,
|
|
2620
|
-
props.session.workspaceId,
|
|
2621
|
-
props.session.id
|
|
2622
|
-
);
|
|
2623
|
-
const firstRunForChat = loadFocusSessionRef.current !== props.session.id;
|
|
2624
|
-
loadFocusSessionRef.current = props.session.id;
|
|
2625
|
-
const source = intent?.source ?? (firstRunForChat ? "load" : null);
|
|
2626
|
-
if (!source) return;
|
|
2627
|
-
if (!sessionComposerFocusIntentIsEligible({
|
|
2628
|
-
viewportWidth: globalThis.innerWidth,
|
|
2629
|
-
coarsePointer: globalThis.matchMedia?.("(pointer: coarse)").matches ?? false,
|
|
2630
|
-
terminal,
|
|
2631
|
-
requiresAction: props.session.status === "requires_action",
|
|
2632
|
-
pendingHumanInput: props.humanInput.requests.length > 0,
|
|
2633
|
-
pendingApproval: props.approvals.length > 0
|
|
2634
|
-
})) {
|
|
2635
|
-
return;
|
|
2636
|
-
}
|
|
2637
|
-
composerFocusWaitRef.current?.cancel();
|
|
2638
|
-
composerFocusWaitRef.current = {
|
|
2639
|
-
sessionId: props.session.id,
|
|
2640
|
-
cancel: focusSessionComposerWhenReady({
|
|
2641
|
-
textarea: () => composerRegionRef.current?.querySelector("textarea"),
|
|
2642
|
-
sessionId: props.session.id,
|
|
2643
|
-
source
|
|
2644
|
-
})
|
|
2645
|
-
};
|
|
2646
|
-
}, [
|
|
2647
|
-
composerFocusSignal,
|
|
2648
|
-
focusEvents,
|
|
2649
|
-
props.approvals.length,
|
|
2650
|
-
props.humanInput.requests.length,
|
|
2651
|
-
props.session.id,
|
|
2652
|
-
props.session.status,
|
|
2653
|
-
props.session.workspaceId,
|
|
2654
|
-
terminal
|
|
2655
|
-
]);
|
|
2656
|
-
const agentsSignal = useMemo3(() => sessionAgentsSignal(t, props.agentNodes), [props.agentNodes]);
|
|
2657
|
-
const [resumingSubSessions, setResumingSubSessions] = useState3(
|
|
2658
|
-
() => /* @__PURE__ */ new Set()
|
|
2659
|
-
);
|
|
2660
|
-
const onSubSessionResumingChange = useCallback3((sessionId, resuming) => {
|
|
2661
|
-
setResumingSubSessions((current) => {
|
|
2662
|
-
if (current.has(sessionId) === resuming) return current;
|
|
2663
|
-
const next = new Set(current);
|
|
2664
|
-
if (resuming) next.add(sessionId);
|
|
2665
|
-
else next.delete(sessionId);
|
|
2666
|
-
return next;
|
|
2667
|
-
});
|
|
2668
|
-
}, []);
|
|
2669
|
-
const waitingSubSessions = useMemo3(
|
|
2670
|
-
() => waitingDescendants(props.agentNodes, resumingSubSessions),
|
|
2671
|
-
[props.agentNodes, resumingSubSessions]
|
|
2672
|
-
);
|
|
2673
|
-
useEffect4(() => {
|
|
2674
|
-
if (resumingSubSessions.size === 0) return;
|
|
2675
|
-
const live = new Set(waitingSubSessions.map((session) => session.id));
|
|
2676
|
-
for (const id of resumingSubSessions) {
|
|
2677
|
-
if (!live.has(id)) onSubSessionResumingChange(id, false);
|
|
2678
|
-
}
|
|
2679
|
-
}, [onSubSessionResumingChange, resumingSubSessions, waitingSubSessions]);
|
|
2680
|
-
const codexConnected = modelCatalog.models.some(
|
|
2681
|
-
(candidate) => candidate.provider === "codex-subscription" && candidate.credentialReadiness.status === "ready"
|
|
2682
|
-
);
|
|
2683
|
-
const [voiceActive, setVoiceActive] = useState3(false);
|
|
2684
|
-
const onVoiceActiveChange = useCallback3((active) => {
|
|
2685
|
-
setVoiceActive(active);
|
|
2686
|
-
}, []);
|
|
2687
|
-
const [selectedApprovalId, setSelectedApprovalId] = useState3(null);
|
|
2688
|
-
const [reviewDetails, setReviewDetails] = useState3(null);
|
|
2689
|
-
const loadToolReview = useCallback3(
|
|
2690
|
-
(approval) => context.client.getToolActionReview(props.session.workspaceId, props.session.id, approval.id),
|
|
2691
|
-
[context.client, props.session.workspaceId, props.session.id]
|
|
2692
|
-
);
|
|
2693
|
-
const loadRecordedToolReview = useCallback3(
|
|
2694
|
-
(id) => context.client.getToolActionReview(props.session.workspaceId, props.session.id, id),
|
|
2695
|
-
[context.client, props.session.workspaceId, props.session.id]
|
|
2696
|
-
);
|
|
2697
|
-
const viewToolReviewDetails = useCallback3(
|
|
2698
|
-
(review, path) => setReviewDetails({
|
|
2699
|
-
review,
|
|
2700
|
-
path,
|
|
2701
|
-
origin: document.activeElement?.closest("[data-review-origin]")?.getAttribute("data-review-origin") ?? void 0
|
|
2702
|
-
}),
|
|
2703
|
-
[]
|
|
2704
|
-
);
|
|
2705
|
-
const loadToolReviewDetails = useCallback3(
|
|
2706
|
-
(review, path, offset) => context.client.getToolReviewDetails(props.session.workspaceId, props.session.id, review.id, {
|
|
2707
|
-
actionDigest: review.actionDigest,
|
|
2708
|
-
path,
|
|
2709
|
-
offset
|
|
2710
|
-
}),
|
|
2711
|
-
[context.client, props.session.workspaceId, props.session.id]
|
|
2712
|
-
);
|
|
2713
|
-
const [approvalPending, setApprovalPending] = useState3({});
|
|
2714
|
-
const [approvalSettled, setApprovalSettled] = useState3({});
|
|
2715
|
-
useEffect4(() => {
|
|
2716
|
-
if (!approvalsDecidable(props.session.status)) {
|
|
2717
|
-
setApprovalPending((current) => Object.keys(current).length ? {} : current);
|
|
2718
|
-
setApprovalSettled((current) => Object.keys(current).length ? {} : current);
|
|
2719
|
-
}
|
|
2720
|
-
}, [props.session.status]);
|
|
2721
|
-
useEffect4(() => {
|
|
2722
|
-
const waiting = new Set(props.approvals.map(approvalDecisionKey));
|
|
2723
|
-
setApprovalSettled((current) => {
|
|
2724
|
-
const kept = Object.entries(current).filter(([key]) => waiting.has(key));
|
|
2725
|
-
return kept.length === Object.keys(current).length ? current : Object.fromEntries(kept);
|
|
2726
|
-
});
|
|
2727
|
-
}, [props.approvals]);
|
|
2728
|
-
const approvalInFlightRef = useRef2(/* @__PURE__ */ new Set());
|
|
2729
|
-
const decideApproval = useCallback3(
|
|
2730
|
-
async (approvalId, decision, answer) => {
|
|
2731
|
-
const approval = props.approvals.find((candidate) => candidate.id === approvalId);
|
|
2732
|
-
const key = approval ? approvalDecisionKey(approval) : approvalId;
|
|
2733
|
-
if (approvalInFlightRef.current.has(key) || approvalPending[key] || approvalSettled[key]) {
|
|
2734
|
-
return;
|
|
2735
|
-
}
|
|
2736
|
-
approvalInFlightRef.current.add(key);
|
|
2737
|
-
setApprovalPending((current) => ({ ...current, [key]: decision }));
|
|
2738
|
-
try {
|
|
2739
|
-
await (decision === "approve" ? props.onApprove(approvalId, answer) : props.onReject(approvalId));
|
|
2740
|
-
setApprovalSettled((current) => ({
|
|
2741
|
-
...current,
|
|
2742
|
-
[key]: decision
|
|
2743
|
-
}));
|
|
2744
|
-
} finally {
|
|
2745
|
-
approvalInFlightRef.current.delete(key);
|
|
2746
|
-
setApprovalPending((current) => {
|
|
2747
|
-
const next = { ...current };
|
|
2748
|
-
delete next[key];
|
|
2749
|
-
return next;
|
|
2750
|
-
});
|
|
2751
|
-
}
|
|
2752
|
-
},
|
|
2753
|
-
[approvalPending, approvalSettled, props]
|
|
2754
|
-
);
|
|
2755
|
-
const attachments = useFileAttachments({ scope: uploadScopeForSession(props.session) });
|
|
2756
|
-
const repositories = useFollowUpRepositories(props.session, props.onConnectGitHubApp);
|
|
2757
|
-
const firstPartyToolOptions = firstPartySessionToolOptionsFor(
|
|
2758
|
-
clientFirstPartyMcpToolPolicy(context.clientConfig).allowed
|
|
2759
|
-
);
|
|
2760
|
-
const selectableSessionMcpServers = context.toolMcpServers;
|
|
2761
|
-
const selectableToolIds = useMemo3(
|
|
2762
|
-
() => selectableSessionMcpServers.map((server) => server.id),
|
|
2763
|
-
[selectableSessionMcpServers]
|
|
2764
|
-
);
|
|
2765
|
-
const policyToolIds = useMemo3(
|
|
2766
|
-
() => sessionPolicyPickerIds(props.session, selectableToolIds, context.workspaceDefaultToolIds),
|
|
2767
|
-
[context.workspaceDefaultToolIds, props.session, selectableToolIds]
|
|
2768
|
-
);
|
|
2769
|
-
const [durableToolSelection, setDurableToolSelection] = useState3(() => ({
|
|
2770
|
-
mcpServerIds: new Set(policyToolIds),
|
|
2771
|
-
firstPartyToolIds: new Set(props.session.firstPartyMcpTools)
|
|
2772
|
-
}));
|
|
2773
|
-
const [durableToolsSnapshot, setDurableToolsSnapshot] = useState3(props.session);
|
|
2774
|
-
const durableToolsSaveInFlight = useRef2(false);
|
|
2775
|
-
const [durableToolsHydrated, setDurableToolsHydrated] = useState3(false);
|
|
2776
|
-
const durableToolsSessionId = useRef2(props.session.id);
|
|
2777
|
-
const [durableToolsSaving, setDurableToolsSaving] = useState3(false);
|
|
2778
|
-
const [durableToolsError, setDurableToolsError] = useState3(null);
|
|
2779
|
-
const [connectorCustomizingOverride, setConnectorCustomizingOverride] = useState3(
|
|
2780
|
-
null
|
|
2781
|
-
);
|
|
2782
|
-
const runsOn = useSessionRunsOn(props.session.id, props.session.sandboxBackend);
|
|
2783
|
-
const machineAccess = currentSessionMachineAccess(
|
|
2784
|
-
runsOn.fleet.sessionMachineAccess,
|
|
2785
|
-
props.session.activeSandboxId
|
|
2786
|
-
);
|
|
2787
|
-
const sharedChat = props.session.tenancy?.visibility === "workspace" && !isPersonalWorkspace(
|
|
2788
|
-
context.workspaces.find((candidate) => candidate.id === props.session.workspaceId) ?? null,
|
|
2789
|
-
context.managedSelfContext
|
|
2790
|
-
);
|
|
2791
|
-
const ownerAskedToAllow = machineAccess?.isOwner === true && sessionAdmissionShowsMachineAccess(sessionAdmissionReason(props.session), machineAccess);
|
|
2792
|
-
const showMachineAccess = machineAccess !== null && (!machineAccess.isOwner || sharedChat && !ownerAskedToAllow);
|
|
2793
|
-
const connectionAccounts = useConnectionAccounts(
|
|
2794
|
-
context.client,
|
|
2795
|
-
{
|
|
2796
|
-
id: props.session.id,
|
|
2797
|
-
workspaceId: props.session.workspaceId,
|
|
2798
|
-
selectedIds: [...durableToolSelection.mcpServerIds]
|
|
2799
|
-
},
|
|
2800
|
-
context.workspaceCapabilityCatalog,
|
|
2801
|
-
context.accessContext === null ? null : hasWorkspacePermission(
|
|
2802
|
-
context.accessContext,
|
|
2803
|
-
props.session.workspaceId,
|
|
2804
|
-
"connections:read"
|
|
2805
|
-
)
|
|
2806
|
-
);
|
|
2807
|
-
const chatSendContext = useRef2({
|
|
2808
|
-
blocked: null,
|
|
2809
|
-
awaitingHuman: false,
|
|
2810
|
-
extras: {}
|
|
2811
|
-
});
|
|
2812
|
-
const readChatSendContext = useCallback3(() => chatSendContext.current, []);
|
|
2813
|
-
const runsOnAttach = runsOn.fleet.attach;
|
|
2814
|
-
const runsOnPreviousSandboxId = runsOn.fleet.activeSandboxId;
|
|
2815
|
-
const runsOnActiveMachineConsent = runsOn.activeMachine && isPersonalMachine(runsOn.activeMachine) && runsOn.activeMachine.sandboxId === props.session.activeSandboxId ? personalMachineUseIntent(props.session.tenancy) : void 0;
|
|
2816
|
-
const runsOnCanMessage = context.accessContext === null || context.accessContext === void 0 || hasWorkspacePermission(context.accessContext, props.session.workspaceId, "sessions:control");
|
|
2817
|
-
const reloadSessionAfterMachineChange = props.onReloadSession;
|
|
2818
|
-
const moveSavedMessage = runsOnAttach;
|
|
2819
|
-
const moveRunsOn = useCallback3(
|
|
2820
|
-
async (machine) => {
|
|
2821
|
-
if (!isPersonalMachine(machine)) {
|
|
2822
|
-
if (!await runsOnAttach(machine.sandboxId))
|
|
2823
|
-
return "The machine change could not be confirmed. Try refreshing the machine list.";
|
|
2824
|
-
await reloadSessionAfterMachineChange();
|
|
2825
|
-
return null;
|
|
2826
|
-
}
|
|
2827
|
-
const result = await moveChatToMachine({
|
|
2828
|
-
machine,
|
|
2829
|
-
chat: readChatSendContext(),
|
|
2830
|
-
canMessage: runsOnCanMessage,
|
|
2831
|
-
previousSandboxId: runsOnPreviousSandboxId,
|
|
2832
|
-
attach: runsOnAttach,
|
|
2833
|
-
sendMessage: (message) => context.client.sendMessage(props.session.workspaceId, props.session.id, message)
|
|
2834
|
-
});
|
|
2835
|
-
if (result.moved) await reloadSessionAfterMachineChange();
|
|
2836
|
-
return result.moved ? null : result.reason ?? "The machine change could not be confirmed. Refresh the machine list and try again.";
|
|
2837
|
-
},
|
|
2838
|
-
[
|
|
2839
|
-
context.client,
|
|
2840
|
-
props.session.id,
|
|
2841
|
-
props.session.workspaceId,
|
|
2842
|
-
reloadSessionAfterMachineChange,
|
|
2843
|
-
readChatSendContext,
|
|
2844
|
-
runsOnAttach,
|
|
2845
|
-
runsOnCanMessage,
|
|
2846
|
-
runsOnPreviousSandboxId
|
|
2847
|
-
]
|
|
2848
|
-
);
|
|
2849
|
-
const sessionResourcesKey = stableJson(props.session.resources);
|
|
2850
|
-
const stableSessionResources = useMemo3(() => props.session.resources, [sessionResourcesKey]);
|
|
2851
|
-
const reloadSessionAfterSetup = props.onReloadSession;
|
|
2852
|
-
const refreshConnectionAccounts = connectionAccounts.refresh;
|
|
2853
|
-
const afterConnectionSetup = useCallback3(async () => {
|
|
2854
|
-
await reloadSessionAfterSetup();
|
|
2855
|
-
await refreshConnectionAccounts();
|
|
2856
|
-
}, [reloadSessionAfterSetup, refreshConnectionAccounts]);
|
|
2857
|
-
const renderAuthNeeded = useCallback3(
|
|
2858
|
-
(item) => {
|
|
2859
|
-
const recommendation = item.setupRequest ? item : sessionAuthRecommendation(t, item, context.workspaceCapabilityCatalog);
|
|
2860
|
-
return recommendation ? /* @__PURE__ */ jsx(
|
|
2861
|
-
Suspense,
|
|
2862
|
-
{
|
|
2863
|
-
fallback: /* @__PURE__ */ jsx("p", { role: "status", className: "text-sm text-fg-muted", children: "Loading connection card\u2026" }),
|
|
2864
|
-
children: /* @__PURE__ */ jsx(
|
|
2865
|
-
SessionCapabilityCard,
|
|
2866
|
-
{
|
|
2867
|
-
item: recommendation,
|
|
2868
|
-
workspaceId: props.session.workspaceId,
|
|
2869
|
-
sessionId: props.session.id,
|
|
2870
|
-
visibility: props.session.tenancy?.visibility ?? "workspace",
|
|
2871
|
-
resources: stableSessionResources,
|
|
2872
|
-
sendContext: readChatSendContext,
|
|
2873
|
-
onConfigured: afterConnectionSetup
|
|
2874
|
-
},
|
|
2875
|
-
`${props.session.id}:${props.session.tenancy?.authorityEpoch}:${item.id}`
|
|
2876
|
-
)
|
|
2877
|
-
}
|
|
2878
|
-
) : void 0;
|
|
2879
|
-
},
|
|
2880
|
-
[
|
|
2881
|
-
context.workspaceCapabilityCatalog,
|
|
2882
|
-
props.session.id,
|
|
2883
|
-
props.session.workspaceId,
|
|
2884
|
-
props.session.tenancy?.visibility,
|
|
2885
|
-
props.session.tenancy?.authorityEpoch,
|
|
2886
|
-
stableSessionResources,
|
|
2887
|
-
readChatSendContext,
|
|
2888
|
-
afterConnectionSetup
|
|
2889
|
-
]
|
|
2890
|
-
);
|
|
2891
|
-
const launch = props.launch ?? EMPTY_COMPOSER_LAUNCH;
|
|
2892
|
-
const launchModel = launch.model;
|
|
2893
|
-
const launchEffort = launch.effort;
|
|
2894
|
-
const launchLatency = launch.latency;
|
|
2895
|
-
const launchRealtime = launch.realtime;
|
|
2896
|
-
const launchKey = composerLaunchSearchKey(launch);
|
|
2897
|
-
const appliedLaunchKeyRef = useRef2(null);
|
|
2898
|
-
useEffect4(() => {
|
|
2899
|
-
if (durableToolsSessionId.current !== props.session.id) {
|
|
2900
|
-
durableToolsSessionId.current = props.session.id;
|
|
2901
|
-
setDurableToolsSnapshot(props.session);
|
|
2902
|
-
setDurableToolsHydrated(false);
|
|
2903
|
-
setConnectorCustomizingOverride(null);
|
|
2904
|
-
return;
|
|
2905
|
-
}
|
|
2906
|
-
if (!context.workspaceMcpCatalogReady) {
|
|
2907
|
-
setDurableToolsHydrated(false);
|
|
2908
|
-
return;
|
|
2909
|
-
}
|
|
2910
|
-
if (durableToolsSaving) return;
|
|
2911
|
-
const snapshot = props.session.toolPolicyVersion > durableToolsSnapshot.toolPolicyVersion ? props.session : durableToolsSnapshot;
|
|
2912
|
-
if (snapshot !== durableToolsSnapshot) setDurableToolsSnapshot(snapshot);
|
|
2913
|
-
const nextMcpIds = sessionPolicyPickerIds(
|
|
2914
|
-
snapshot,
|
|
2915
|
-
selectableToolIds,
|
|
2916
|
-
context.workspaceDefaultToolIds
|
|
2917
|
-
);
|
|
2918
|
-
const nextFirstPartyIds = new Set(snapshot.firstPartyMcpTools);
|
|
2919
|
-
setDurableToolSelection(
|
|
2920
|
-
(current) => current.mcpServerIds.size === nextMcpIds.size && [...nextMcpIds].every((id) => current.mcpServerIds.has(id)) && current.firstPartyToolIds.size === nextFirstPartyIds.size && [...nextFirstPartyIds].every((id) => current.firstPartyToolIds.has(id)) ? current : { mcpServerIds: nextMcpIds, firstPartyToolIds: nextFirstPartyIds }
|
|
2921
|
-
);
|
|
2922
|
-
setDurableToolsHydrated(true);
|
|
2923
|
-
}, [
|
|
2924
|
-
context.workspaceMcpCatalogReady,
|
|
2925
|
-
context.workspaceDefaultToolIds,
|
|
2926
|
-
selectableToolIds,
|
|
2927
|
-
durableToolsSaving,
|
|
2928
|
-
durableToolsSnapshot,
|
|
2929
|
-
props.session
|
|
2930
|
-
]);
|
|
2931
|
-
const connectorCustomizing = connectorCustomizingOverride ?? sessionConnectorPolicyIsCustomized(durableToolsSnapshot);
|
|
2932
|
-
const applyDurableToolPolicy = useCallback3(
|
|
2933
|
-
async (request, optimistic) => {
|
|
2934
|
-
if (durableToolsSaveInFlight.current) return;
|
|
2935
|
-
durableToolsSaveInFlight.current = true;
|
|
2936
|
-
const targetSessionId = props.session.id;
|
|
2937
|
-
if (optimistic) setDurableToolSelection(optimistic);
|
|
2938
|
-
setDurableToolsSaving(true);
|
|
2939
|
-
setDurableToolsError(null);
|
|
2940
|
-
try {
|
|
2941
|
-
const updated = await context.client.updateSessionToolPolicy(
|
|
2942
|
-
props.session.workspaceId,
|
|
2943
|
-
targetSessionId,
|
|
2944
|
-
request
|
|
2945
|
-
);
|
|
2946
|
-
if (durableToolsSessionId.current !== targetSessionId) return;
|
|
2947
|
-
setDurableToolSelection({
|
|
2948
|
-
mcpServerIds: sessionPolicyPickerIds(
|
|
2949
|
-
updated,
|
|
2950
|
-
selectableToolIds,
|
|
2951
|
-
context.workspaceDefaultToolIds
|
|
2952
|
-
),
|
|
2953
|
-
firstPartyToolIds: new Set(updated.firstPartyMcpTools)
|
|
2954
|
-
});
|
|
2955
|
-
setDurableToolsSnapshot(updated);
|
|
2956
|
-
setConnectorCustomizingOverride((current) => current === true ? true : null);
|
|
2957
|
-
} catch (error) {
|
|
2958
|
-
const message = userErrorText(error);
|
|
2959
|
-
setDurableToolsError(message);
|
|
2960
|
-
toast.error("Couldn't save session tools", { description: message });
|
|
2961
|
-
try {
|
|
2962
|
-
const refreshed = await context.client.getSession(
|
|
2963
|
-
props.session.workspaceId,
|
|
2964
|
-
props.session.id
|
|
2965
|
-
);
|
|
2966
|
-
if (durableToolsSessionId.current !== targetSessionId) return;
|
|
2967
|
-
setDurableToolSelection({
|
|
2968
|
-
mcpServerIds: sessionPolicyPickerIds(
|
|
2969
|
-
refreshed,
|
|
2970
|
-
selectableToolIds,
|
|
2971
|
-
context.workspaceDefaultToolIds
|
|
2972
|
-
),
|
|
2973
|
-
firstPartyToolIds: new Set(refreshed.firstPartyMcpTools)
|
|
2974
|
-
});
|
|
2975
|
-
setDurableToolsSnapshot(refreshed);
|
|
2976
|
-
setConnectorCustomizingOverride((current) => current === true ? true : null);
|
|
2977
|
-
} catch {
|
|
2978
|
-
if (durableToolsSessionId.current === targetSessionId) {
|
|
2979
|
-
setDurableToolSelection({
|
|
2980
|
-
mcpServerIds: sessionPolicyPickerIds(
|
|
2981
|
-
durableToolsSnapshot,
|
|
2982
|
-
selectableToolIds,
|
|
2983
|
-
context.workspaceDefaultToolIds
|
|
2984
|
-
),
|
|
2985
|
-
firstPartyToolIds: new Set(durableToolsSnapshot.firstPartyMcpTools)
|
|
2986
|
-
});
|
|
2987
|
-
}
|
|
2988
|
-
}
|
|
2989
|
-
} finally {
|
|
2990
|
-
durableToolsSaveInFlight.current = false;
|
|
2991
|
-
setDurableToolsSaving(false);
|
|
2992
|
-
}
|
|
2993
|
-
},
|
|
2994
|
-
[
|
|
2995
|
-
context.client,
|
|
2996
|
-
context.workspaceDefaultToolIds,
|
|
2997
|
-
durableToolsSnapshot,
|
|
2998
|
-
props.session.id,
|
|
2999
|
-
props.session.workspaceId,
|
|
3000
|
-
selectableToolIds
|
|
3001
|
-
]
|
|
3002
|
-
);
|
|
3003
|
-
const saveDurableToolPolicy = useCallback3(
|
|
3004
|
-
async (next) => {
|
|
3005
|
-
await applyDurableToolPolicy(
|
|
3006
|
-
connectorSelectionUpdate(
|
|
3007
|
-
durableToolsSnapshot,
|
|
3008
|
-
durableToolSelection.mcpServerIds,
|
|
3009
|
-
next.mcpServerIds,
|
|
3010
|
-
context.workspaceDefaultToolIds
|
|
3011
|
-
),
|
|
3012
|
-
{
|
|
3013
|
-
mcpServerIds: new Set(next.mcpServerIds),
|
|
3014
|
-
firstPartyToolIds: new Set(next.firstPartyToolIds)
|
|
3015
|
-
}
|
|
3016
|
-
);
|
|
3017
|
-
},
|
|
3018
|
-
[
|
|
3019
|
-
applyDurableToolPolicy,
|
|
3020
|
-
context.workspaceDefaultToolIds,
|
|
3021
|
-
durableToolsSnapshot,
|
|
3022
|
-
durableToolSelection
|
|
3023
|
-
]
|
|
3024
|
-
);
|
|
3025
|
-
const sendGate = useSessionSendGate();
|
|
3026
|
-
const workspace = context.workspaces.find((candidate) => candidate.id === props.session.workspaceId) ?? null;
|
|
3027
|
-
const loadSkillReview = useCallback3(
|
|
3028
|
-
(reference) => context.client.readWorkspaceSkill(
|
|
3029
|
-
props.session.workspaceId,
|
|
3030
|
-
reference.skillId,
|
|
3031
|
-
reference.revisionId
|
|
3032
|
-
),
|
|
3033
|
-
// A browser-account switch must discard the previous actor's loaded preview
|
|
3034
|
-
// even when the SDK client instance and workspace remain unchanged.
|
|
3035
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
3036
|
-
[context.client, props.session.workspaceId, context.accessContext.subjectId]
|
|
3037
|
-
);
|
|
3038
|
-
const fixedResourceCatalogEnabled = props.session.sandboxBackend !== "selfhosted";
|
|
3039
|
-
const fixedRigScope = useFixedRigScope(
|
|
3040
|
-
context.client,
|
|
3041
|
-
workspace?.id ?? null,
|
|
3042
|
-
props.session.rigId,
|
|
3043
|
-
fixedResourceCatalogEnabled && hasWorkspacePermission(context.accessContext, props.session.workspaceId, "rigs:use")
|
|
3044
|
-
);
|
|
3045
|
-
const personalAttachment = usePersonalResourceAttachment({
|
|
3046
|
-
client: context.client,
|
|
3047
|
-
authMode: context.clientConfig.auth.mode,
|
|
3048
|
-
authSession: context.authSession,
|
|
3049
|
-
accessSubjectId: context.accessContext.subjectId,
|
|
3050
|
-
accessContext: context.accessContext,
|
|
3051
|
-
managedSelfContext: context.managedSelfContext,
|
|
3052
|
-
workspace,
|
|
3053
|
-
session: props.session,
|
|
3054
|
-
enabled: props.session.sandboxBackend !== "selfhosted",
|
|
3055
|
-
fixed: {
|
|
3056
|
-
rigId: props.session.rigId,
|
|
3057
|
-
rigScope: fixedRigScope,
|
|
3058
|
-
connectedMachine: null
|
|
3059
|
-
},
|
|
3060
|
-
personalWorkspaceTarget: isPersonalWorkspace(workspace, context.managedSelfContext),
|
|
3061
|
-
onReloadSession: props.onReloadSession
|
|
3062
|
-
});
|
|
3063
|
-
const sendState = {
|
|
3064
|
-
uploadPending: attachments.hasUnresolved,
|
|
3065
|
-
repositoryError: repositories.error,
|
|
3066
|
-
personalDecision: personalAttachment.requiresDecision || connectionAccounts.requiresAccountChoice,
|
|
3067
|
-
machineAccessDenied: machineAccess !== null && !machineAccess.isOwner,
|
|
3068
|
-
loading: durableToolsSaving || durableToolsSaveInFlight.current || !durableToolsHydrated || personalAttachment.loading || personalAttachment.refreshing || connectionAccounts.loading,
|
|
3069
|
-
loadFailed: connectionAccounts.error === null ? false : connectionAccounts.accessDenied ? "denied" : connectionAccounts.unavailable ? "updating" : "failed"
|
|
3070
|
-
};
|
|
3071
|
-
const composerSendBlocker = () => sendGate.blocker(sendState);
|
|
3072
|
-
const workspaceAccountId = context.workspaces.find(
|
|
3073
|
-
(candidate) => candidate.id === props.session.workspaceId
|
|
3074
|
-
)?.accountId;
|
|
3075
|
-
const canBuyCredits = context.clientConfig.billingMode === "stripe" && Boolean(workspaceAccountId) && hasAccountPermission(context.accessContext, workspaceAccountId ?? "", "billing:manage");
|
|
3076
|
-
const composer = useComposer(props.session.id, {
|
|
3077
|
-
canBuyCredits,
|
|
3078
|
-
events: props.events,
|
|
3079
|
-
sendExtras: () => ({
|
|
3080
|
-
...withHostMessageContext(hostMessageContext, props.messageContext),
|
|
3081
|
-
resources: [...attachments.readyResources, ...repositories.pendingResources],
|
|
3082
|
-
connectionAccounts: [
|
|
3083
|
-
...connectionAccounts.selections,
|
|
3084
|
-
...repositories.pendingResources.some(
|
|
3085
|
-
(resource) => resource.kind === "repository" && resource.connectionType === "github_personal"
|
|
3086
|
-
) && context.personalGitHubAuthority ? [context.personalGitHubAuthority] : []
|
|
3087
|
-
],
|
|
3088
|
-
...personalAttachment.intent ? { personalResourceAttachment: personalAttachment.intent } : runsOnActiveMachineConsent ? { personalResourceAttachment: runsOnActiveMachineConsent } : {}
|
|
3089
|
-
}),
|
|
3090
|
-
sendBlocked: () => composerSendBlocker() !== null,
|
|
3091
|
-
effectiveControl: props.queue.effectiveControl ?? props.session.effectiveControl,
|
|
3092
|
-
sendDestination: () => promptSendDestination({
|
|
3093
|
-
status: props.session.status,
|
|
3094
|
-
activeTurnId: props.session.activeTurnId,
|
|
3095
|
-
queuedPrompts: props.queue.queue.length,
|
|
3096
|
-
admissionBlock: props.session.admissionBlock
|
|
3097
|
-
}),
|
|
3098
|
-
busySend: resolveWorkspaceBusySend(workspace?.settings),
|
|
3099
|
-
...props.initialDraft ? { initialDraft: props.initialDraft } : {},
|
|
3100
|
-
// The console always offers the other choice beside Send.
|
|
3101
|
-
offerQueue: true,
|
|
3102
|
-
// Send and Steer are acknowledged locally: the message leaves the box
|
|
3103
|
-
// when it is shown. Clear only resources captured in that immutable
|
|
3104
|
-
// operation; later additions belong to the next draft, while retry keeps
|
|
3105
|
-
// the original resource refs in the failed bubble.
|
|
3106
|
-
onSubmitted: (_text, input) => {
|
|
3107
|
-
noteTurnFailureAction("send_message");
|
|
3108
|
-
attachments.removeReadyFiles(
|
|
3109
|
-
(input.resources ?? []).flatMap(
|
|
3110
|
-
(resource) => resource.kind === "file" ? [resource.fileId] : []
|
|
3111
|
-
)
|
|
3112
|
-
);
|
|
3113
|
-
repositories.commitSent(input.resources ?? []);
|
|
3114
|
-
},
|
|
3115
|
-
// Recovered sends do not pass through onSubmitted. Keep the host-owned
|
|
3116
|
-
// upload/repository queue in sync once those inputs are accepted too;
|
|
3117
|
-
// the immutable input snapshot preserves later additions.
|
|
3118
|
-
onSent: (_text, input) => {
|
|
3119
|
-
setCreditRefusal(null);
|
|
3120
|
-
attachments.removeReadyFiles(
|
|
3121
|
-
(input.resources ?? []).flatMap(
|
|
3122
|
-
(resource) => resource.kind === "file" ? [resource.fileId] : []
|
|
3123
|
-
)
|
|
3124
|
-
);
|
|
3125
|
-
repositories.commitSent(input.resources ?? []);
|
|
3126
|
-
personalAttachment.onAccepted(input);
|
|
3127
|
-
},
|
|
3128
|
-
onDeliveryError: (error, input, delivery) => {
|
|
3129
|
-
personalAttachment.onDeliveryError(error, input, delivery);
|
|
3130
|
-
connectionAccounts.onSelectionError(error);
|
|
3131
|
-
if (isModelUnavailableSubmissionError(error)) {
|
|
3132
|
-
const refused = refusedModelId(error, input);
|
|
3133
|
-
if (refused) setRefusedModel({ sessionId: props.session.id, model: refused });
|
|
3134
|
-
void modelCatalog.refresh();
|
|
3135
|
-
setModelPickerSession(props.session.id);
|
|
3136
|
-
}
|
|
3137
|
-
const refusal = creditRefusalRecord(
|
|
3138
|
-
error,
|
|
3139
|
-
{ sessionId: props.session.id },
|
|
3140
|
-
refusedModelId(error, input) ?? props.session.model
|
|
3141
|
-
);
|
|
3142
|
-
if (refusal) {
|
|
3143
|
-
setCreditRefusal(refusal);
|
|
3144
|
-
void modelCatalog.refresh();
|
|
3145
|
-
}
|
|
3146
|
-
}
|
|
3147
|
-
});
|
|
3148
|
-
const composerView = useComposerWithStreamState(
|
|
3149
|
-
composer,
|
|
3150
|
-
props.connectionState,
|
|
3151
|
-
props.initialLoading
|
|
3152
|
-
);
|
|
3153
|
-
const queuedRecall = useQueuedPromptRecall({
|
|
3154
|
-
queue: props.queue,
|
|
3155
|
-
composer,
|
|
3156
|
-
subjectId: context.accessContext.subjectId,
|
|
3157
|
-
enabled: !terminal
|
|
3158
|
-
});
|
|
3159
|
-
useBrowserAccountBridgeBlocker(`session-composer:${props.session.id}`, () => {
|
|
3160
|
-
if (attachments.hasUnresolved) {
|
|
3161
|
-
return {
|
|
3162
|
-
id: "ignored",
|
|
3163
|
-
label: "A file upload is not settled",
|
|
3164
|
-
detail: "Wait for the upload or remove it before changing accounts."
|
|
3165
|
-
};
|
|
3166
|
-
}
|
|
3167
|
-
if (composer.sending || composer.draftSaving || durableToolsSaving) {
|
|
3168
|
-
return {
|
|
3169
|
-
id: "ignored",
|
|
3170
|
-
label: "A session mutation is still running",
|
|
3171
|
-
detail: "Wait for the current save or send to finish."
|
|
3172
|
-
};
|
|
3173
|
-
}
|
|
3174
|
-
return composer.hasDraftContent() ? {
|
|
3175
|
-
id: "ignored",
|
|
3176
|
-
label: "This session has an unsent draft",
|
|
3177
|
-
detail: "Continuing clears the account-bound composer state."
|
|
3178
|
-
} : null;
|
|
3179
|
-
});
|
|
3180
|
-
chatSendContext.current = {
|
|
3181
|
-
blocked: sessionReadOnlyArchive(props.session) ? "This chat is archived. Continue in a new chat to use a repository." : isTerminalSessionStatus(props.session.status) ? "This chat has ended. Start a new chat to use a repository." : connectionAccounts.requiresAccountChoice ? "Choose an account for this chat's connected tools in the composer first." : personalAttachment.requiresDecision ? "Finish the personal access choice in the composer first." : null,
|
|
3182
|
-
awaitingHuman: props.session.status === "requires_action" && !sessionAdmissionBlocked(props.session),
|
|
3183
|
-
// Moving the chat onto the person's own machine turns it on in this workspace.
|
|
3184
|
-
personalMachineIntent: personalMachineUseIntent(props.session.tenancy, "always"),
|
|
3185
|
-
extras: {
|
|
3186
|
-
...composer.sendPolicy ?? {},
|
|
3187
|
-
...(props.queue.effectiveControl ?? props.session.effectiveControl)?.controlEtag ? {
|
|
3188
|
-
controlEtag: (props.queue.effectiveControl ?? props.session.effectiveControl).controlEtag
|
|
3189
|
-
} : {},
|
|
3190
|
-
...connectionAccounts.selections.length > 0 ? { connectionAccounts: connectionAccounts.selections } : {}
|
|
3191
|
-
}
|
|
3192
|
-
};
|
|
3193
|
-
const composerPolicy = composer.policy;
|
|
3194
|
-
const [retryOperation, setRetryOperation] = useState3(null);
|
|
3195
|
-
const pendingRetryInput = retryOperation?.failureEventId === props.failure?.failureEventId ? retryOperation : null;
|
|
3196
|
-
const failureTurnId = props.session.failureDiagnostics?.eventId === props.failure?.failureEventId ? props.session.failureDiagnostics?.turnId : props.events.find((event) => event.id === props.failure?.failureEventId)?.turnId;
|
|
3197
|
-
const retryHasRetainedTurn = Boolean(failureTurnId);
|
|
3198
|
-
const retryFailedSession = useMemo3(
|
|
3199
|
-
() => createFailedSessionRetry(
|
|
3200
|
-
(input) => context.client.retrySession(props.session.workspaceId, props.session.id, input),
|
|
3201
|
-
setRetryOperation
|
|
3202
|
-
),
|
|
3203
|
-
[context.client, props.session.workspaceId, props.session.id]
|
|
3204
|
-
);
|
|
3205
|
-
const composerDraftLoading = composer.draftLoading;
|
|
3206
|
-
const setComposerModel = composer.setModel;
|
|
3207
|
-
const setComposerReasoningEffort = composer.setReasoningEffort;
|
|
3208
|
-
const setComposerLatencyMode = composer.setLatencyMode;
|
|
3209
|
-
const hasComposerPolicy = composerPolicy !== null;
|
|
3210
|
-
const modelPickerDisabled = composer.sending || composer.draftLoading || !hasComposerPolicy || Boolean(pendingRetryInput);
|
|
3211
|
-
const canChooseRecoveryModel = !modelPickerDisabled;
|
|
3212
|
-
const stopRefusal = props.creditExhausted ? props.creditRefusal : null;
|
|
3213
|
-
const bannerFailureIds = useMemo3(
|
|
3214
|
-
() => props.failure ? bannerFailureEventIds(
|
|
3215
|
-
props.events,
|
|
3216
|
-
props.failure,
|
|
3217
|
-
// As the banner: a structural sandbox failure outranks a credit stop.
|
|
3218
|
-
props.creditExhausted && !props.failure.structuralSandboxFailure
|
|
3219
|
-
) : void 0,
|
|
3220
|
-
[props.events, props.failure, props.creditExhausted]
|
|
3221
|
-
);
|
|
3222
|
-
const creditGap = props.creditExhausted && !stopRefusal ? freeCreditGap(modelCatalog.rows, props.session.model, {
|
|
3223
|
-
selectedModel: composerPolicy?.model,
|
|
3224
|
-
preferredModel: modelCatalog.defaultSelection?.model
|
|
3225
|
-
}) : null;
|
|
3226
|
-
const fallbackCopy = props.failure ? failedSessionCopy(
|
|
3227
|
-
props.failure,
|
|
3228
|
-
props.creditExhausted && !props.failure.structuralSandboxFailure,
|
|
3229
|
-
Boolean(composerPolicy && composerPolicy.model !== props.session.model),
|
|
3230
|
-
canChooseRecoveryModel && !props.failure.structuralSandboxFailure,
|
|
3231
|
-
creditGap,
|
|
3232
|
-
stopRefusal
|
|
3233
|
-
) : null;
|
|
3234
|
-
const fallbackReason = fallbackCopy ? failureFallbackReason(fallbackCopy, canBuyCredits) : "";
|
|
3235
|
-
const fallbackDetail = detailBeyondHeadline(fallbackReason, fallbackCopy?.detail);
|
|
3236
|
-
const failureFallback = fallbackCopy ? /* @__PURE__ */ jsxs("div", { role: "alert", className: cn("mx-auto my-2 w-full max-w-3xl text-sm text-fg-muted", gutter), children: [
|
|
3237
|
-
fallbackReason,
|
|
3238
|
-
fallbackDetail ? /* @__PURE__ */ jsxs("details", { className: "mt-1 text-xs", children: [
|
|
3239
|
-
/* @__PURE__ */ jsx("summary", { className: "cursor-pointer select-none text-fg-subtle hover:text-fg-muted", children: "Details" }),
|
|
3240
|
-
/* @__PURE__ */ jsx("p", { className: "mt-1 max-h-40 overflow-auto whitespace-pre-wrap break-words font-mono text-2xs", children: fallbackDetail })
|
|
3241
|
-
] }) : null
|
|
3242
|
-
] }) : null;
|
|
3243
|
-
const model = composerPolicy?.model ?? props.session.model;
|
|
3244
|
-
const reasoningEffort = composerPolicy?.reasoningEffort ?? props.session.reasoningEffort;
|
|
3245
|
-
const latencyMode = composerPolicy?.latencyMode ?? props.session.latencyMode;
|
|
3246
|
-
const selectedPolicyRow = findPickerRow(modelCatalog.rows, model);
|
|
3247
|
-
const chooseCoveredModel = (id) => {
|
|
3248
|
-
const row = findPickerRow(modelCatalog.rows, id);
|
|
3249
|
-
const choice = row && !modelPickerDisabled ? coveredModelChoice(row, reasoningEffort, latencyMode) : null;
|
|
3250
|
-
if (!choice) return;
|
|
3251
|
-
setComposerModel(choice.model);
|
|
3252
|
-
setComposerReasoningEffort(choice.effort);
|
|
3253
|
-
if (choice.latencyMode !== null) setComposerLatencyMode(choice.latencyMode);
|
|
3254
|
-
};
|
|
3255
|
-
const matchesFrozenSessionPolicy = Boolean(
|
|
3256
|
-
composerPolicy && composerPolicy.model === props.session.model && composerPolicy.reasoningEffort === props.session.reasoningEffort && composerPolicy.latencyMode === props.session.latencyMode
|
|
3257
|
-
);
|
|
3258
|
-
const catalogComboValid = pickerPolicyRunnable(selectedPolicyRow, reasoningEffort, latencyMode);
|
|
3259
|
-
const refusedSessionModel = refusedModel?.sessionId === props.session.id ? refusedModel.model : null;
|
|
3260
|
-
const composerModelUnavailable = model === refusedSessionModel || sessionModelMissingFromCatalog({
|
|
3261
|
-
model,
|
|
3262
|
-
models: modelCatalog.models,
|
|
3263
|
-
error: modelCatalog.error
|
|
3264
|
-
});
|
|
3265
|
-
const sessionModelUnavailable = props.session.model === refusedSessionModel || sessionModelMissingFromCatalog({
|
|
3266
|
-
model: props.session.model,
|
|
3267
|
-
models: modelCatalog.models,
|
|
3268
|
-
error: modelCatalog.error
|
|
3269
|
-
});
|
|
3270
|
-
const canControlSession = Boolean(
|
|
3271
|
-
context.accessContext.workspaceGrants.find((grant) => grant.workspaceId === props.session.workspaceId)?.permissions.includes("sessions:control")
|
|
3272
|
-
);
|
|
3273
|
-
const composerPolicyValid = Boolean(
|
|
3274
|
-
composerPolicy && (catalogComboValid || matchesFrozenSessionPolicy && !composerModelUnavailable)
|
|
3275
|
-
);
|
|
3276
|
-
const noRunnableModel = !modelCatalog.loading && modelCatalog.rows.length > 0 && !modelCatalog.rows.some((row) => row.selectable);
|
|
3277
|
-
const composerPolicyError = composerPolicy && !modelCatalog.loading && !composerPolicyValid && !noRunnableModel ? composerModelUnavailable ? "This model is no longer available. Select a different model to continue." : "Choose a model, reasoning level, and speed supported by this session." : null;
|
|
3278
|
-
const unavailableReplacement = useMemo3(
|
|
3279
|
-
() => composerModelUnavailable || sessionModelUnavailable ? unavailableModelReplacement({
|
|
3280
|
-
rows: modelCatalog.rows,
|
|
3281
|
-
defaultSelection: modelCatalog.defaultSelection,
|
|
3282
|
-
latencyMode
|
|
3283
|
-
}) : null,
|
|
3284
|
-
[
|
|
3285
|
-
composerModelUnavailable,
|
|
3286
|
-
sessionModelUnavailable,
|
|
3287
|
-
modelCatalog.rows,
|
|
3288
|
-
modelCatalog.defaultSelection,
|
|
3289
|
-
latencyMode
|
|
3290
|
-
]
|
|
3291
|
-
);
|
|
3292
|
-
const replacesUnavailableModel = Boolean(
|
|
3293
|
-
composerModelUnavailable && unavailableReplacement && !composerDraftLoading && hasComposerPolicy && !modelPickerDisabled && !terminal && // A failed session keeps its model until the person chooses: the
|
|
3294
|
-
// failure banner's Retry re-runs that turn with the composer's model.
|
|
3295
|
-
canControlSession && !props.failure
|
|
3296
|
-
);
|
|
3297
|
-
useEffect4(() => {
|
|
3298
|
-
if (!replacesUnavailableModel || !unavailableReplacement) return;
|
|
3299
|
-
setComposerModel(unavailableReplacement.model);
|
|
3300
|
-
setComposerReasoningEffort(unavailableReplacement.reasoningEffort);
|
|
3301
|
-
if (unavailableReplacement.latencyMode) {
|
|
3302
|
-
setComposerLatencyMode(unavailableReplacement.latencyMode);
|
|
3303
|
-
}
|
|
3304
|
-
}, [
|
|
3305
|
-
replacesUnavailableModel,
|
|
3306
|
-
setComposerLatencyMode,
|
|
3307
|
-
setComposerModel,
|
|
3308
|
-
setComposerReasoningEffort,
|
|
3309
|
-
unavailableReplacement
|
|
3310
|
-
]);
|
|
3311
|
-
const composerDelivery = useSessionComposerDelivery(composerView, sendGate, {
|
|
3312
|
-
policyValid: composerPolicyValid,
|
|
3313
|
-
catalogLoading: modelCatalog.loading,
|
|
3314
|
-
replacingModel: replacesUnavailableModel,
|
|
3315
|
-
send: sendState
|
|
3316
|
-
});
|
|
3317
|
-
const unavailableModelNotice = (sessionModelUnavailable || composerModelUnavailable) && !terminal ? /* @__PURE__ */ jsx(
|
|
3318
|
-
UnavailableModelNotice,
|
|
3319
|
-
{
|
|
3320
|
-
modelName: unavailableModelName(sessionModelUnavailable ? props.session.model : model),
|
|
3321
|
-
replacementLabel: composerModelUnavailable ? null : selectedPolicyRow?.label ?? null
|
|
3322
|
-
}
|
|
3323
|
-
) : null;
|
|
3324
|
-
const sendBlocker = composerSendBlocker();
|
|
3325
|
-
const visibleSendBlocker = terminal || composerDelivery.preparing ? null : sendBlocker === "policy" && (unavailableModelNotice || noRunnableModel || !composerPolicy) ? null : sendBlocker === "policy" && selectedPolicyRow?.selectable !== true ? "model_unavailable" : sendBlocker;
|
|
3326
|
-
const sendBlockerNotice = composerSendBlockerNotice(visibleSendBlocker) ? /* @__PURE__ */ jsx(
|
|
3327
|
-
ComposerSendBlockerNotice,
|
|
3328
|
-
{
|
|
3329
|
-
blocker: visibleSendBlocker,
|
|
3330
|
-
className: "px-2 pt-2",
|
|
3331
|
-
onAction: modelPickerDisabled && visibleSendBlocker === "policy" ? void 0 : (action) => {
|
|
3332
|
-
if (action === "fix_model_settings") chooseCoveredModel(model);
|
|
3333
|
-
else if (visibleSendBlocker === "accounts") void connectionAccounts.refresh();
|
|
3334
|
-
}
|
|
3335
|
-
}
|
|
3336
|
-
) : null;
|
|
3337
|
-
useEffect4(() => {
|
|
3338
|
-
if (!launchKey || appliedLaunchKeyRef.current === launchKey || composerDraftLoading || !hasComposerPolicy) {
|
|
3339
|
-
return;
|
|
3340
|
-
}
|
|
3341
|
-
const hasPolicy = Boolean(launchModel || launchEffort || launchLatency);
|
|
3342
|
-
appliedLaunchKeyRef.current = launchKey;
|
|
3343
|
-
if (!hasPolicy) return;
|
|
3344
|
-
if (launchModel) setComposerModel(launchModel);
|
|
3345
|
-
if (launchEffort) setComposerReasoningEffort(launchEffort);
|
|
3346
|
-
if (launchLatency) setComposerLatencyMode(launchLatency);
|
|
3347
|
-
void navigate({
|
|
3348
|
-
to: "/workspaces/$workspaceId/sessions/$sessionId",
|
|
3349
|
-
params: {
|
|
3350
|
-
workspaceId: props.session.workspaceId,
|
|
3351
|
-
sessionId: props.session.id
|
|
3352
|
-
},
|
|
3353
|
-
search: composerLaunchSearchAfterPolicyApply({
|
|
3354
|
-
model: launchModel,
|
|
3355
|
-
effort: launchEffort,
|
|
3356
|
-
latency: launchLatency,
|
|
3357
|
-
realtime: launchRealtime
|
|
3358
|
-
}),
|
|
3359
|
-
replace: true
|
|
3360
|
-
});
|
|
3361
|
-
}, [
|
|
3362
|
-
composerDraftLoading,
|
|
3363
|
-
hasComposerPolicy,
|
|
3364
|
-
launchEffort,
|
|
3365
|
-
launchKey,
|
|
3366
|
-
launchLatency,
|
|
3367
|
-
launchModel,
|
|
3368
|
-
launchRealtime,
|
|
3369
|
-
navigate,
|
|
3370
|
-
props.session.id,
|
|
3371
|
-
props.session.workspaceId,
|
|
3372
|
-
setComposerLatencyMode,
|
|
3373
|
-
setComposerModel,
|
|
3374
|
-
setComposerReasoningEffort
|
|
3375
|
-
]);
|
|
3376
|
-
const acceptedClientEventIds = useMemo3(
|
|
3377
|
-
() => new Set(
|
|
3378
|
-
props.events.filter((event) => event.type === "user.message" && event.clientEventId).map((event) => event.clientEventId)
|
|
3379
|
-
),
|
|
3380
|
-
[props.events]
|
|
3381
|
-
);
|
|
3382
|
-
const {
|
|
3383
|
-
optimisticMessages,
|
|
3384
|
-
retryOptimisticMessage,
|
|
3385
|
-
restoreOptimisticMessage,
|
|
3386
|
-
removeOptimisticMessage
|
|
3387
|
-
} = composer;
|
|
3388
|
-
const failedOptimisticMessageCount = (optimisticMessages ?? []).filter(
|
|
3389
|
-
(message) => message.state === "failed" && !acceptedClientEventIds.has(message.clientEventId)
|
|
3390
|
-
).length;
|
|
3391
|
-
useEffect4(() => {
|
|
3392
|
-
updateLocalSessionDeliveryAttention({
|
|
3393
|
-
workspaceId: props.session.workspaceId,
|
|
3394
|
-
sessionId: props.session.id,
|
|
3395
|
-
failedMessageCount: failedOptimisticMessageCount
|
|
3396
|
-
});
|
|
3397
|
-
}, [failedOptimisticMessageCount, props.session.id, props.session.workspaceId]);
|
|
3398
|
-
const usageLimitCapability = sessionUsageLimitCapability(context.clientConfig);
|
|
3399
|
-
const usageLimitTreeActive = props.session.status === "running" || lineageHasRunningSession(props.agentNodes);
|
|
3400
|
-
const usageLimit = useSessionUsageLimit({
|
|
3401
|
-
client: context.client,
|
|
3402
|
-
workspaceId: props.session.workspaceId,
|
|
3403
|
-
sessionId: props.session.id,
|
|
3404
|
-
initial: props.session.usageLimit,
|
|
3405
|
-
enabled: usageLimitCapability !== "absent",
|
|
3406
|
-
live: {
|
|
3407
|
-
events: props.events,
|
|
3408
|
-
active: usageLimitTreeActive,
|
|
3409
|
-
watch: props.agentNodes.length > 0,
|
|
3410
|
-
connectionState: props.connectionState
|
|
3411
|
-
}
|
|
3412
|
-
});
|
|
3413
|
-
const refusedUsageLimitSendIds = (optimisticMessages ?? []).filter(
|
|
3414
|
-
(message) => message.state === "failed" && message.error !== void 0 && !acceptedClientEventIds.has(message.clientEventId) && isSessionUsageLimitSubmissionError(new Error(message.error))
|
|
3415
|
-
).map((message) => message.clientEventId).join(",");
|
|
3416
|
-
const composerUsageLimitError = composer.error instanceof OpenGeniSessionUsageLimitReachedError ? composer.error : null;
|
|
3417
|
-
const [usageLimitRefusalPending, setUsageLimitRefusalPending] = useState3(false);
|
|
3418
|
-
const refreshUsageLimit = usageLimit.refresh;
|
|
3419
|
-
useEffect4(() => {
|
|
3420
|
-
if (!refusedUsageLimitSendIds && !composerUsageLimitError) return;
|
|
3421
|
-
setUsageLimitRefusalPending(true);
|
|
3422
|
-
void refreshUsageLimit().finally(() => setUsageLimitRefusalPending(false));
|
|
3423
|
-
}, [composerUsageLimitError, refreshUsageLimit, refusedUsageLimitSendIds]);
|
|
3424
|
-
const usageLimitRefusal = usageLimitRefusalFromState({
|
|
3425
|
-
pending: usageLimitRefusalPending,
|
|
3426
|
-
error: composerUsageLimitError,
|
|
3427
|
-
usage: usageLimit.usage
|
|
3428
|
-
});
|
|
3429
|
-
const usageLimitChild = Boolean(props.session.parentSessionId) || usageLimit.usage?.inherited === true;
|
|
3430
|
-
const usageLimitRootId = usageLimit.usage?.rootSessionId ?? null;
|
|
3431
|
-
const usageLimitNotice = usageLimitCapability !== "absent" && !terminal ? /* @__PURE__ */ jsx(
|
|
3432
|
-
SessionUsageLimitNotice,
|
|
3433
|
-
{
|
|
3434
|
-
usage: usageLimit.usage,
|
|
3435
|
-
stale: usageLimit.error !== null && usageLimit.usage !== null,
|
|
3436
|
-
refusal: usageLimitRefusal,
|
|
3437
|
-
onChangeLimit: !usageLimitChild && canControlSession ? props.onOpenUsageLimit : void 0,
|
|
3438
|
-
mainTaskHref: usageLimitChild && usageLimitRootId ? `/workspaces/${props.session.workspaceId}/sessions/${usageLimitRootId}` : void 0,
|
|
3439
|
-
goalPaused: props.goal.goal?.pausedReason === SESSION_USAGE_LIMIT_GOAL_PAUSED_REASON,
|
|
3440
|
-
dismissStorageKey: `opengeni:${props.session.workspaceId}`
|
|
3441
|
-
}
|
|
3442
|
-
) : null;
|
|
3443
|
-
const timelineWithOptimisticSends = useMemo3(() => {
|
|
3444
|
-
return conversationTimeline(
|
|
3445
|
-
props.timeline,
|
|
3446
|
-
{
|
|
3447
|
-
queue: props.queue.queue,
|
|
3448
|
-
snapshot: props.queue.snapshot,
|
|
3449
|
-
acceptedSteers: props.queue.acceptedSteers
|
|
3450
|
-
},
|
|
3451
|
-
{
|
|
3452
|
-
optimisticMessages,
|
|
3453
|
-
retryOptimisticMessage,
|
|
3454
|
-
restoreOptimisticMessage,
|
|
3455
|
-
removeOptimisticMessage
|
|
3456
|
-
}
|
|
3457
|
-
);
|
|
3458
|
-
}, [
|
|
3459
|
-
optimisticMessages,
|
|
3460
|
-
removeOptimisticMessage,
|
|
3461
|
-
props.queue.acceptedSteers,
|
|
3462
|
-
props.queue.queue,
|
|
3463
|
-
props.queue.snapshot,
|
|
3464
|
-
props.timeline,
|
|
3465
|
-
retryOptimisticMessage,
|
|
3466
|
-
restoreOptimisticMessage
|
|
3467
|
-
]);
|
|
3468
|
-
const repositoryPickerProps = repositories.pickerProps(terminal || composer.sending);
|
|
3469
|
-
const admissionControl = admissionRecheckControl(
|
|
3470
|
-
props.admissionSessionControl,
|
|
3471
|
-
props.queue.effectiveControl,
|
|
3472
|
-
composer.effectiveControl
|
|
3473
|
-
);
|
|
3474
|
-
const admissionRefreshRequired = admissionControlNeedsRefresh(
|
|
3475
|
-
admissionControl,
|
|
3476
|
-
props.admissionSessionControl,
|
|
3477
|
-
props.queue.effectiveControl,
|
|
3478
|
-
composer.effectiveControl
|
|
3479
|
-
);
|
|
3480
|
-
const timelineWithStartup = useSessionStartupTimeline(timelineWithOptimisticSends, {
|
|
3481
|
-
session: { ...props.session, effectiveControl: admissionControl },
|
|
3482
|
-
events: props.events,
|
|
3483
|
-
optimisticMessages,
|
|
3484
|
-
hasNewer: props.hasNewer,
|
|
3485
|
-
queue: props.queue.snapshot
|
|
3486
|
-
});
|
|
3487
|
-
const pinnedConnectionCard = useMemo3(
|
|
3488
|
-
() => props.session.status === "idle" && !props.hasNewer ? pendingConnectionCard(
|
|
3489
|
-
timelineWithStartup,
|
|
3490
|
-
(item) => !authNeededPresentation(t, item).unavailable && (item.authoritySource !== "host" || Boolean(item.authorizationUrl))
|
|
3491
|
-
) : null,
|
|
3492
|
-
[props.hasNewer, props.session.status, timelineWithStartup]
|
|
3493
|
-
);
|
|
3494
|
-
const timelineItems = useMemo3(
|
|
3495
|
-
() => pinnedConnectionCard ? timelineWithStartup.filter((item) => item !== pinnedConnectionCard) : timelineWithStartup,
|
|
3496
|
-
[pinnedConnectionCard, timelineWithStartup]
|
|
3497
|
-
);
|
|
3498
|
-
const timelineEmptyStateCopy = sessionTimelineEmptyStateCopy(
|
|
3499
|
-
sessionDisplayStatus(props.session),
|
|
3500
|
-
readOnlyArchive === null && (props.queue.effectiveControl ?? props.session.effectiveControl).state === "paused"
|
|
3501
|
-
);
|
|
3502
|
-
const workspacePermissions = useMemo3(
|
|
3503
|
-
() => context.accessContext.workspaceGrants.find(
|
|
3504
|
-
(grant) => grant.workspaceId === props.session.workspaceId
|
|
3505
|
-
)?.permissions ?? [],
|
|
3506
|
-
[context.accessContext.workspaceGrants, props.session.workspaceId]
|
|
3507
|
-
);
|
|
3508
|
-
const codexUsageBlocked = isCodexProductModel(props.session.model) && (props.session.status === "waiting_capacity" || (props.session.status === "failed" ? isCodexUsageLimitFailure(props.failure?.failureCode) : props.session.status === "idle" && latestTurnFailedOnUsageLimit(props.events)));
|
|
3509
|
-
const codexUsageChoices = codexUsageBlocked && workspacePermissions.includes("sessions:control");
|
|
3510
|
-
const codexUsageResetsAtValue = useMemo3(
|
|
3511
|
-
() => codexUsageChoices ? codexUsageResetsAt(props.events) : null,
|
|
3512
|
-
[codexUsageChoices, props.events]
|
|
3513
|
-
);
|
|
3514
|
-
const [usageContinuationState, setUsageContinuation] = useState3(null);
|
|
3515
|
-
const usageContinuationInFlight = useRef2(false);
|
|
3516
|
-
const usageContinuation = usageContinuationState?.sessionId === props.session.id ? usageContinuationState : null;
|
|
3517
|
-
const remoteV2Chat = props.session.codexCompactionMode === "remote_v2";
|
|
3518
|
-
const loadedCheckpointIsCompaction = useMemo3(
|
|
3519
|
-
() => remoteV2Chat ? latestCheckpointIsCompaction(props.events) : null,
|
|
3520
|
-
[remoteV2Chat, props.events]
|
|
3521
|
-
);
|
|
3522
|
-
const [fetchedCodexCompaction, setFetchedCodexCompaction] = useState3(null);
|
|
3523
|
-
useEffect4(() => {
|
|
3524
|
-
if (!remoteV2Chat || loadedCheckpointIsCompaction !== null) return;
|
|
3525
|
-
let stale = false;
|
|
3526
|
-
const sessionId = props.session.id;
|
|
3527
|
-
context.client.listEvents(props.session.workspaceId, sessionId, {
|
|
3528
|
-
includeTypes: CONTEXT_CHECKPOINT_EVENT_TYPES,
|
|
3529
|
-
// Newest first: only the latest checkpoint matters.
|
|
3530
|
-
direction: "before",
|
|
3531
|
-
limit: 20,
|
|
3532
|
-
payloadMode: "none"
|
|
3533
|
-
}).then((events) => {
|
|
3534
|
-
if (!stale)
|
|
3535
|
-
setFetchedCodexCompaction({
|
|
3536
|
-
sessionId,
|
|
3537
|
-
compacted: latestCheckpointIsCompaction(events) === true
|
|
3538
|
-
});
|
|
3539
|
-
}).catch(() => void 0);
|
|
3540
|
-
return () => {
|
|
3541
|
-
stale = true;
|
|
3542
|
-
};
|
|
3543
|
-
}, [
|
|
3544
|
-
context.client,
|
|
3545
|
-
loadedCheckpointIsCompaction,
|
|
3546
|
-
props.session.id,
|
|
3547
|
-
props.session.workspaceId,
|
|
3548
|
-
remoteV2Chat
|
|
3549
|
-
]);
|
|
3550
|
-
const codexCompacted = loadedCheckpointIsCompaction ?? (fetchedCodexCompaction?.sessionId === props.session.id && fetchedCodexCompaction.compacted);
|
|
3551
|
-
const switchHeadsUp = (target2, label) => needsModelSwitchHeadsUp({
|
|
3552
|
-
codexCompactionMode: props.session.codexCompactionMode,
|
|
3553
|
-
codexCompacted,
|
|
3554
|
-
model: target2
|
|
3555
|
-
}) ? modelSwitchHeadsUpText(label) : null;
|
|
3556
|
-
const continueAfterUsageLimit = async (policy, options = {}) => {
|
|
3557
|
-
if (usageContinuationInFlight.current) return;
|
|
3558
|
-
usageContinuationInFlight.current = true;
|
|
3559
|
-
const sessionId = props.session.id;
|
|
3560
|
-
setUsageContinuation({ sessionId, pending: true, error: null });
|
|
3561
|
-
let error = null;
|
|
3562
|
-
try {
|
|
3563
|
-
if (options.resumeFirst)
|
|
3564
|
-
await context.client.resumeSession(props.session.workspaceId, sessionId, {
|
|
3565
|
-
clientEventId: crypto.randomUUID(),
|
|
3566
|
-
// Never undo a pause made after this page last read the control.
|
|
3567
|
-
expectedControlEtag: admissionControl.controlEtag
|
|
3568
|
-
});
|
|
3569
|
-
if (props.session.status === "failed" && props.failure?.failureEventId && retryHasRetainedTurn) {
|
|
3570
|
-
await retryFailedSession(props.failure.failureEventId, policy);
|
|
3571
|
-
} else {
|
|
3572
|
-
const chat = readChatSendContext();
|
|
3573
|
-
if (chat.blocked) error = chat.blocked;
|
|
3574
|
-
else {
|
|
3575
|
-
const message = {
|
|
3576
|
-
text: "Continue",
|
|
3577
|
-
...chat.extras,
|
|
3578
|
-
...policy,
|
|
3579
|
-
clientEventId: crypto.randomUUID()
|
|
3580
|
-
};
|
|
3581
|
-
if (props.session.status === "waiting_capacity")
|
|
3582
|
-
await context.client.steerMessage(props.session.workspaceId, sessionId, message);
|
|
3583
|
-
else await context.client.sendMessage(props.session.workspaceId, sessionId, message);
|
|
3584
|
-
}
|
|
3585
|
-
}
|
|
3586
|
-
} catch (failure) {
|
|
3587
|
-
error = userErrorText(failure, "Try again.");
|
|
3588
|
-
} finally {
|
|
3589
|
-
usageContinuationInFlight.current = false;
|
|
3590
|
-
setUsageContinuation({ sessionId, pending: false, error });
|
|
3591
|
-
await Promise.allSettled([props.onReloadSession(), props.queue.refresh()]);
|
|
3592
|
-
}
|
|
3593
|
-
};
|
|
3594
|
-
const usagePaused = admissionControl.state === "paused";
|
|
3595
|
-
const continueAtReset = codexUsageContinuesAtReset({
|
|
3596
|
-
status: props.session.status,
|
|
3597
|
-
paused: usagePaused
|
|
3598
|
-
});
|
|
3599
|
-
const setContinueAtReset = (next) => {
|
|
3600
|
-
const action = codexUsageContinueAtResetAction({
|
|
3601
|
-
status: props.session.status,
|
|
3602
|
-
paused: usagePaused,
|
|
3603
|
-
next
|
|
3604
|
-
});
|
|
3605
|
-
if (action === "pause") void composer.pause();
|
|
3606
|
-
else if (action === "resume") void composer.resume();
|
|
3607
|
-
else if (action === "run_on_codex" || action === "resume_and_run_on_codex")
|
|
3608
|
-
void continueAfterUsageLimit(
|
|
3609
|
-
{
|
|
3610
|
-
model: props.session.model,
|
|
3611
|
-
reasoningEffort: props.session.reasoningEffort,
|
|
3612
|
-
latencyMode: props.session.latencyMode
|
|
3613
|
-
},
|
|
3614
|
-
{ resumeFirst: action === "resume_and_run_on_codex" }
|
|
3615
|
-
);
|
|
3616
|
-
};
|
|
3617
|
-
const usageModelSwitch = useCodexUsageModelSwitch({
|
|
3618
|
-
sessionId: props.session.id,
|
|
3619
|
-
sessionModel: props.session.model,
|
|
3620
|
-
composerModel: model,
|
|
3621
|
-
enabled: codexUsageChoices,
|
|
3622
|
-
closePicker: () => setModelPickerSession(null),
|
|
3623
|
-
onContinue: (picked) => void continueAfterUsageLimit(
|
|
3624
|
-
{ model: picked, reasoningEffort, latencyMode },
|
|
3625
|
-
// A Steer resumes a paused waiting chat itself; resuming first would
|
|
3626
|
-
// wake its Codex wait for nothing.
|
|
3627
|
-
{ resumeFirst: usagePaused && props.session.status !== "waiting_capacity" }
|
|
3628
|
-
)
|
|
3629
|
-
});
|
|
3630
|
-
const codexUsageChoice = codexUsageChoices && codexUsageNoticeApplies({
|
|
3631
|
-
status: props.session.status,
|
|
3632
|
-
resetsAt: codexUsageResetsAtValue,
|
|
3633
|
-
usageWait: codexWaitIsUsageLimit(props.events)
|
|
3634
|
-
}) ? {
|
|
3635
|
-
resetText: codexUsageResetText(codexUsageResetsAtValue),
|
|
3636
|
-
continueAtReset,
|
|
3637
|
-
pending: usageContinuation?.pending || composer.pausing || composer.resuming,
|
|
3638
|
-
error: usageContinuation?.error,
|
|
3639
|
-
onContinueAtResetChange: setContinueAtReset
|
|
3640
|
-
} : void 0;
|
|
3641
|
-
const codexUsageNotice = codexUsageChoice && props.session.status !== "failed" && !terminal ? /* @__PURE__ */ jsx(CodexUsageNotice, { choice: codexUsageChoice }) : null;
|
|
3642
|
-
const chosenModelHeadsUp = !terminal ? switchHeadsUp(model, selectedPolicyRow?.label ?? unavailableModelName(model)) : null;
|
|
3643
|
-
const modelSwitchHeadsUp = chosenModelHeadsUp ? /* @__PURE__ */ jsx(ModelSwitchHeadsUp, { text: chosenModelHeadsUp, className: "px-3.5 pt-2.5 md:px-4" }) : null;
|
|
3644
|
-
const ownLoginsApply = !terminal && props.session.tenancy?.visibility === "workspace" && !isPersonalWorkspace(workspace, context.managedSelfContext);
|
|
3645
|
-
const ownLoginsHeadsUp = ownLoginsApply ? /* @__PURE__ */ jsx(
|
|
3646
|
-
OwnLoginsSharedHeadsUp,
|
|
3647
|
-
{
|
|
3648
|
-
logins: connectionAccounts.loading || connectionAccounts.error ? null : ownLoginsInUse(
|
|
3649
|
-
// Only the connectors this chat uses.
|
|
3650
|
-
connectionAccounts.accountGroups,
|
|
3651
|
-
connectionAccounts.accountChoices,
|
|
3652
|
-
context.accessContext.subjectId
|
|
3653
|
-
),
|
|
3654
|
-
className: "px-3.5 pt-2.5 md:px-4",
|
|
3655
|
-
logoFor: (login) => props.resolveProviderLogo(login.accounts[0].providerDomain),
|
|
3656
|
-
onChange: async (login, on) => {
|
|
3657
|
-
try {
|
|
3658
|
-
if (on)
|
|
3659
|
-
await turnOnOwnLoginsHere(context.client, props.session.workspaceId, login.accounts);
|
|
3660
|
-
else await stopOwnLoginsHere(context.client, props.session.workspaceId, login.accounts);
|
|
3661
|
-
} finally {
|
|
3662
|
-
await connectionAccounts.refresh();
|
|
3663
|
-
}
|
|
3664
|
-
}
|
|
3665
|
-
},
|
|
3666
|
-
props.session.id
|
|
3667
|
-
) : null;
|
|
3668
|
-
const sessionSecrets = useSessionSecrets(props.session.id, {
|
|
3669
|
-
enabled: workspacePermissions.includes("secrets:list")
|
|
3670
|
-
});
|
|
3671
|
-
const secretsView = sessionSecrets.secrets;
|
|
3672
|
-
const renderMessageSender = useMessageSenderRenderer(
|
|
3673
|
-
context.client,
|
|
3674
|
-
props.session.workspaceId,
|
|
3675
|
-
context.accessContext.subjectId
|
|
3676
|
-
);
|
|
3677
|
-
const commandContext = useMemo3(
|
|
3678
|
-
() => ({
|
|
3679
|
-
client: context.client,
|
|
3680
|
-
workspaceId: props.session.workspaceId,
|
|
3681
|
-
sessionId: props.session.id,
|
|
3682
|
-
status: props.session.status,
|
|
3683
|
-
permissions: workspacePermissions
|
|
3684
|
-
}),
|
|
3685
|
-
[
|
|
3686
|
-
context.client,
|
|
3687
|
-
props.session.workspaceId,
|
|
3688
|
-
props.session.id,
|
|
3689
|
-
props.session.status,
|
|
3690
|
-
workspacePermissions
|
|
3691
|
-
]
|
|
3692
|
-
);
|
|
3693
|
-
const [forkEventId, setForkEventId] = useState3(null);
|
|
3694
|
-
const [turnRatings, setTurnRatings] = useState3({});
|
|
3695
|
-
const mayRate = hasWorkspacePermission(
|
|
3696
|
-
context.accessContext,
|
|
3697
|
-
props.session.workspaceId,
|
|
3698
|
-
"sessions:create"
|
|
3699
|
-
);
|
|
3700
|
-
useEffect4(() => {
|
|
3701
|
-
setTurnRatings({});
|
|
3702
|
-
setForkEventId(null);
|
|
3703
|
-
if (!mayRate) return;
|
|
3704
|
-
return loadSessionFeedback(
|
|
3705
|
-
context.client,
|
|
3706
|
-
props.session.workspaceId,
|
|
3707
|
-
props.session.id,
|
|
3708
|
-
({ feedback }) => {
|
|
3709
|
-
const ratings = turnRatingsFromFeedback(feedback);
|
|
3710
|
-
setTurnRatings((saved) => ({ ...ratings, ...saved }));
|
|
3711
|
-
}
|
|
3712
|
-
);
|
|
3713
|
-
}, [
|
|
3714
|
-
context.client,
|
|
3715
|
-
props.session.workspaceId,
|
|
3716
|
-
props.session.id,
|
|
3717
|
-
mayRate,
|
|
3718
|
-
context.accessContext.subjectId
|
|
3719
|
-
]);
|
|
3720
|
-
const mayForkMessage = context.clientConfig.auth.mode === "managedSession" && context.authSession !== null && Boolean(props.session.tenancy) && mayRate;
|
|
3721
|
-
const forkRequests = useUiEventTarget("document");
|
|
3722
|
-
const eventsRef = useRef2(props.events);
|
|
3723
|
-
eventsRef.current = props.events;
|
|
3724
|
-
useEffect4(() => {
|
|
3725
|
-
if (!mayForkMessage) return;
|
|
3726
|
-
const fork = () => {
|
|
3727
|
-
const events = eventsRef.current;
|
|
3728
|
-
for (let index = events.length - 1; index >= 0; index -= 1) {
|
|
3729
|
-
const event = events[index];
|
|
3730
|
-
if (event.type === "agent.message.completed" || event.type === "user.message") {
|
|
3731
|
-
setForkEventId(event.id);
|
|
3732
|
-
return;
|
|
3733
|
-
}
|
|
3734
|
-
}
|
|
3735
|
-
};
|
|
3736
|
-
forkRequests.addEventListener(FORK_CURRENT_CHAT_EVENT, fork);
|
|
3737
|
-
return () => forkRequests.removeEventListener(FORK_CURRENT_CHAT_EVENT, fork);
|
|
3738
|
-
}, [forkRequests, mayForkMessage]);
|
|
3739
|
-
const onMessageRated = useCallback3((turnId, sentiment) => {
|
|
3740
|
-
setTurnRatings((saved) => ({ ...saved, [turnId]: sentiment }));
|
|
3741
|
-
}, []);
|
|
3742
|
-
const renderMessageActions = useCallback3(
|
|
3743
|
-
(item) => /* @__PURE__ */ jsx(Suspense, { fallback: null, children: /* @__PURE__ */ jsx(
|
|
3744
|
-
MessageActions,
|
|
3745
|
-
{
|
|
3746
|
-
item,
|
|
3747
|
-
client: context.client,
|
|
3748
|
-
workspaceId: props.session.workspaceId,
|
|
3749
|
-
sessionId: props.session.id,
|
|
3750
|
-
mayRate,
|
|
3751
|
-
mayFork: mayForkMessage,
|
|
3752
|
-
savedSentiment: item.kind === "agent-message" && item.turnId ? turnRatings[item.turnId] ?? null : null,
|
|
3753
|
-
onRated: onMessageRated,
|
|
3754
|
-
onFork: setForkEventId
|
|
3755
|
-
}
|
|
3756
|
-
) }),
|
|
3757
|
-
[
|
|
3758
|
-
context.client,
|
|
3759
|
-
props.session.workspaceId,
|
|
3760
|
-
props.session.id,
|
|
3761
|
-
mayRate,
|
|
3762
|
-
mayForkMessage,
|
|
3763
|
-
turnRatings,
|
|
3764
|
-
onMessageRated
|
|
3765
|
-
]
|
|
3766
|
-
);
|
|
3767
|
-
const renderImage = useCallback3(
|
|
3768
|
-
(image) => {
|
|
3769
|
-
const artifactId = retainedImageId(image.src);
|
|
3770
|
-
return artifactId ? /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx("span", { role: "status", children: "Loading image\u2026" }), children: /* @__PURE__ */ jsx(
|
|
3771
|
-
InlineChatArtifact,
|
|
3772
|
-
{
|
|
3773
|
-
workspaceId: props.session.workspaceId,
|
|
3774
|
-
artifactId,
|
|
3775
|
-
alt: image.alt
|
|
3776
|
-
},
|
|
3777
|
-
props.session.workspaceId + ":" + artifactId
|
|
3778
|
-
) }) : null;
|
|
3779
|
-
},
|
|
3780
|
-
[props.session.workspaceId]
|
|
3781
|
-
);
|
|
3782
|
-
const renderInteractiveBlock = useCallback3(
|
|
3783
|
-
(block) => /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx("span", { role: "status", children: "Loading preview\u2026" }), children: /* @__PURE__ */ jsx(ChatInteractiveBlock, { workspaceId: props.session.workspaceId, ...block }) }),
|
|
3784
|
-
[props.session.workspaceId]
|
|
3785
|
-
);
|
|
3786
|
-
const artifactHref = useCallback3(
|
|
3787
|
-
(id) => `/workspaces/${props.session.workspaceId}/artifacts/files/${id}`,
|
|
3788
|
-
[props.session.workspaceId]
|
|
3789
|
-
);
|
|
3790
|
-
const renderMessageText = useCallback3(
|
|
3791
|
-
(text, item, renderContext) => {
|
|
3792
|
-
if (item.kind === "user-message") {
|
|
3793
|
-
if (item.humanInputDelegation) {
|
|
3794
|
-
return /* @__PURE__ */ jsx(
|
|
3795
|
-
HumanInputDelegationRecord,
|
|
3796
|
-
{
|
|
3797
|
-
client: context.client,
|
|
3798
|
-
workspaceId: props.session.workspaceId,
|
|
3799
|
-
item: { ...item, humanInputDelegation: item.humanInputDelegation },
|
|
3800
|
-
viewerSubjectId: context.accessContext.subjectId
|
|
3801
|
-
}
|
|
3802
|
-
);
|
|
3803
|
-
}
|
|
3804
|
-
return /* @__PURE__ */ jsx(UserMessageBody, { item, searchTarget: renderContext.searchTarget });
|
|
3805
|
-
}
|
|
3806
|
-
return /* @__PURE__ */ jsx("div", { "data-testid": "assistant-markdown", children: /* @__PURE__ */ jsx(
|
|
3807
|
-
MarkdownText,
|
|
3808
|
-
{
|
|
3809
|
-
artifactHref,
|
|
3810
|
-
text,
|
|
3811
|
-
searchTarget: renderContext.searchTarget,
|
|
3812
|
-
softLineBreaks: true,
|
|
3813
|
-
streaming: item.kind === "agent-message" && item.streaming,
|
|
3814
|
-
onSandboxFile: props.onOpenSandboxFile,
|
|
3815
|
-
renderInteractiveBlock,
|
|
3816
|
-
renderImage
|
|
3817
|
-
}
|
|
3818
|
-
) });
|
|
3819
|
-
},
|
|
3820
|
-
[
|
|
3821
|
-
artifactHref,
|
|
3822
|
-
context.accessContext.subjectId,
|
|
3823
|
-
context.client,
|
|
3824
|
-
props.onOpenSandboxFile,
|
|
3825
|
-
props.session.workspaceId,
|
|
3826
|
-
renderInteractiveBlock,
|
|
3827
|
-
renderImage
|
|
3828
|
-
]
|
|
3829
|
-
);
|
|
3830
|
-
const [creditTopupOpen, setCreditTopupOpen] = useState3(false);
|
|
3831
|
-
const openCreditTopup = canBuyCredits ? () => setCreditTopupOpen(true) : void 0;
|
|
3832
|
-
const topupRefusal = ((creditRefusal?.sessionId === props.session.id ? creditRefusal.code : null) ?? stopRefusal) === "byok_paid_credit_required" ? "byok_paid_credit_required" : null;
|
|
3833
|
-
const creditTopupPrompt = canBuyCredits && workspaceAccountId ? /* @__PURE__ */ jsx(Suspense, { fallback: null, children: creditTopupOpen ? /* @__PURE__ */ jsx(
|
|
3834
|
-
LazyCreditTopupPrompt,
|
|
3835
|
-
{
|
|
3836
|
-
purpose: "topup",
|
|
3837
|
-
refusalCode: topupRefusal,
|
|
3838
|
-
open: true,
|
|
3839
|
-
workspaceId: props.session.workspaceId,
|
|
3840
|
-
accountId: workspaceAccountId,
|
|
3841
|
-
canBuyCredits: true,
|
|
3842
|
-
onOpenChange: setCreditTopupOpen,
|
|
3843
|
-
beforeLeave: composer.flushDraft
|
|
3844
|
-
}
|
|
3845
|
-
) : null }) : null;
|
|
3846
|
-
const canConnectModel = hasWorkspacePermission(
|
|
3847
|
-
context.accessContext,
|
|
3848
|
-
props.session.workspaceId,
|
|
3849
|
-
"connections:write"
|
|
3850
|
-
);
|
|
3851
|
-
const allowFailedMachine = props.failure?.failureCode === MACHINE_ACCESS_REQUIRED_CODE && runsOnCanMessage && runsOnActiveMachineConsent && runsOn.activeMachine ? {
|
|
3852
|
-
consent: runsOnActiveMachineConsent,
|
|
3853
|
-
machineName: machineDisplayName(t, runsOn.activeMachine)
|
|
3854
|
-
} : null;
|
|
3855
|
-
const allowMachine = allowFailedMachine ? {
|
|
3856
|
-
machineName: allowFailedMachine.machineName,
|
|
3857
|
-
onAllow: async () => {
|
|
3858
|
-
const chat = readChatSendContext();
|
|
3859
|
-
if (chat.blocked) return chat.blocked;
|
|
3860
|
-
if (chat.awaitingHuman) return "Answer the question above first.";
|
|
3861
|
-
try {
|
|
3862
|
-
await context.client.sendMessage(props.session.workspaceId, props.session.id, {
|
|
3863
|
-
text: `${machineUseMessage(allowFailedMachine.machineName)} Continue where you left off.`,
|
|
3864
|
-
...chat.extras,
|
|
3865
|
-
personalResourceAttachment: allowFailedMachine.consent,
|
|
3866
|
-
clientEventId: crypto.randomUUID()
|
|
3867
|
-
});
|
|
3868
|
-
return null;
|
|
3869
|
-
} catch (failure) {
|
|
3870
|
-
return userErrorText(failure, "Try again.");
|
|
3871
|
-
} finally {
|
|
3872
|
-
await Promise.allSettled([props.onReloadSession(), props.queue.refresh()]);
|
|
3873
|
-
}
|
|
3874
|
-
}
|
|
3875
|
-
} : void 0;
|
|
3876
|
-
const failureRecovery = !props.hasNewer && !readOnlyArchive && props.failure && (props.session.status === "failed" || props.creditExhausted && props.session.status === "idle") ? /* @__PURE__ */ jsx(FailureRecoveryBoundary, { fallback: failureFallback, children: /* @__PURE__ */ jsx(Suspense, { fallback: failureFallback, children: /* @__PURE__ */ jsx(
|
|
3877
|
-
LazyFailedSessionBanner,
|
|
3878
|
-
{
|
|
3879
|
-
failure: props.failure,
|
|
3880
|
-
shownInTimeline: timelineShowsFailure(timelineWithStartup, {
|
|
3881
|
-
failureEventId: props.failure.failureEventId,
|
|
3882
|
-
turnId: failureTurnId
|
|
3883
|
-
}),
|
|
3884
|
-
analyticsKey: props.failure.failureEventId ?? `${props.session.id}:${props.failure.failedAt ?? "unknown"}`,
|
|
3885
|
-
canChooseModel: canChooseRecoveryModel,
|
|
3886
|
-
codexUsage: codexUsageChoice,
|
|
3887
|
-
allowMachine,
|
|
3888
|
-
hasModelPicker: hasComposerPolicy,
|
|
3889
|
-
freeModel: isDeploymentFreeModel(modelCatalog.rows, props.session.model),
|
|
3890
|
-
subscriptions: connectableSubscriptions(context.clientConfig.models),
|
|
3891
|
-
modelChanged: Boolean(composerPolicy && composerPolicy.model !== props.session.model),
|
|
3892
|
-
creditExhausted: props.creditExhausted,
|
|
3893
|
-
creditRefusal: stopRefusal,
|
|
3894
|
-
freeCreditGap: creditGap,
|
|
3895
|
-
onChooseModel: chooseCoveredModel,
|
|
3896
|
-
workspaceId: props.session.workspaceId,
|
|
3897
|
-
canBuyCredits,
|
|
3898
|
-
onAddCredits: openCreditTopup,
|
|
3899
|
-
canConnectModel,
|
|
3900
|
-
sandboxRecovery: needsSandboxRecoveryCheck(props.session, props.failure.structuralSandboxFailure) ? {
|
|
3901
|
-
client: context.client,
|
|
3902
|
-
workspaceId: props.session.workspaceId,
|
|
3903
|
-
sessionId: props.session.id,
|
|
3904
|
-
canControl: workspacePermissions.includes("sessions:control")
|
|
3905
|
-
} : void 0,
|
|
3906
|
-
actions: {
|
|
3907
|
-
failureId: props.failure.failureEventId,
|
|
3908
|
-
retryInput: pendingRetryInput,
|
|
3909
|
-
composerBlocker: composerSendBlocker(),
|
|
3910
|
-
onRetry: async () => {
|
|
3911
|
-
if (composer.hasDraftContent() || composerSendBlocker() || !props.failure?.failureEventId || !retryHasRetainedTurn || !composerPolicy || !workspacePermissions.includes("sessions:control") || admissionControl.state === "paused")
|
|
3912
|
-
return false;
|
|
3913
|
-
try {
|
|
3914
|
-
return await retryFailedSession(props.failure.failureEventId, composerPolicy);
|
|
3915
|
-
} finally {
|
|
3916
|
-
await Promise.allSettled([props.onReloadSession(), props.queue.refresh()]);
|
|
3917
|
-
}
|
|
3918
|
-
},
|
|
3919
|
-
retryBlocker: !workspacePermissions.includes("sessions:control") ? "permission" : admissionControl.state === "paused" ? "paused" : composer.hasDraftContent() ? "draft" : failedOptimisticMessageCount > 0 ? "unsent" : (optimisticMessages ?? []).some(
|
|
3920
|
-
(message) => !acceptedClientEventIds.has(message.clientEventId)
|
|
3921
|
-
) ? "delivery" : props.session.activeTurnId !== null || props.queue.queue.length > 0 ? "queued" : composer.sending || composer.draftLoading || !hasComposerPolicy || !retryHasRetainedTurn || !props.failure.failureEventId ? "loading" : null
|
|
3922
|
-
}
|
|
3923
|
-
},
|
|
3924
|
-
props.session.id
|
|
3925
|
-
) }) }, props.session.id) : null;
|
|
3926
|
-
const sessionCreditRefusal = creditRefusal?.sessionId === props.session.id && !terminal && !(failureRecovery && props.creditExhausted) ? creditRefusal : null;
|
|
3927
|
-
const creditRefusalFallback = sessionCreditRefusal ? /* @__PURE__ */ jsx("p", { role: "alert", className: "px-1.5 text-sm text-fg-muted", children: apiErrorFacts(sessionCreditRefusal.message).serverMessage ?? sessionCreditRefusal.message }) : null;
|
|
3928
|
-
const creditRefusalNotice = sessionCreditRefusal ? /* @__PURE__ */ jsx(FailureRecoveryBoundary, { fallback: creditRefusalFallback, children: /* @__PURE__ */ jsx(Suspense, { fallback: creditRefusalFallback, children: /* @__PURE__ */ jsx(
|
|
3929
|
-
LazyCreditRefusalNotice,
|
|
3930
|
-
{
|
|
3931
|
-
gap: creditRefusalGap(modelCatalog.rows, sessionCreditRefusal.model, {
|
|
3932
|
-
selectedModel: composerPolicy?.model,
|
|
3933
|
-
preferredModel: modelCatalog.defaultSelection?.model
|
|
3934
|
-
}),
|
|
3935
|
-
message: sessionCreditRefusal.message,
|
|
3936
|
-
refusalCode: sessionCreditRefusal.code,
|
|
3937
|
-
workspaceId: props.session.workspaceId,
|
|
3938
|
-
accountId: workspaceAccountId,
|
|
3939
|
-
canReadBilling: Boolean(workspaceAccountId) && hasAccountPermission(context.accessContext, workspaceAccountId ?? "", "billing:read"),
|
|
3940
|
-
canBuyCredits,
|
|
3941
|
-
canConnectModel,
|
|
3942
|
-
continuing: true,
|
|
3943
|
-
onChooseModel: modelPickerDisabled ? void 0 : chooseCoveredModel,
|
|
3944
|
-
onAddCredits: openCreditTopup,
|
|
3945
|
-
onDismiss: () => setCreditRefusal(null)
|
|
3946
|
-
}
|
|
3947
|
-
) }) }, props.session.id) : null;
|
|
3948
|
-
const modelRecovery = props.hasNewer ? null : currentModelRecovery({ ...props.session, effectiveControl: admissionControl }, props.events);
|
|
3949
|
-
const reviewDetailPane = reviewDetails ? /* @__PURE__ */ jsx("div", { className: "min-h-0 flex-1 overflow-y-auto", "data-workspace-scroll-owner": "self-managed", children: /* @__PURE__ */ jsx(
|
|
3950
|
-
ToolActionReviewDetails,
|
|
3951
|
-
{
|
|
3952
|
-
review: reviewDetails.review,
|
|
3953
|
-
path: reviewDetails.path,
|
|
3954
|
-
load: loadToolReviewDetails,
|
|
3955
|
-
onBack: () => {
|
|
3956
|
-
const { review, path, origin } = reviewDetails;
|
|
3957
|
-
setReviewDetails(null);
|
|
3958
|
-
requestAnimationFrame(() => {
|
|
3959
|
-
const selector = `[data-approval-id="${CSS.escape(review.id)}"]${origin ? `[data-review-origin="${CSS.escape(origin)}"]` : ""} button[data-review-path="${CSS.escape(path)}"]`;
|
|
3960
|
-
document.querySelector(selector)?.focus();
|
|
3961
|
-
});
|
|
3962
|
-
}
|
|
3963
|
-
},
|
|
3964
|
-
reviewDetails.review.id + reviewDetails.path
|
|
3965
|
-
) }) : null;
|
|
3966
|
-
return createElement(
|
|
3967
|
-
Fragment,
|
|
3968
|
-
null,
|
|
3969
|
-
reviewDetailPane,
|
|
3970
|
-
creditTopupPrompt,
|
|
3971
|
-
createElement(
|
|
3972
|
-
"div",
|
|
3973
|
-
{
|
|
3974
|
-
className: reviewDetails ? "hidden" : "contents",
|
|
3975
|
-
...inertProps(Boolean(reviewDetails)),
|
|
3976
|
-
...props.placement === "panel" ? { ref: setPanelRoot } : {}
|
|
3977
|
-
},
|
|
3978
|
-
createElement(
|
|
3979
|
-
LightboxProvider,
|
|
3980
|
-
null,
|
|
3981
|
-
/* @__PURE__ */ jsxs(
|
|
3982
|
-
ChatViewportFileDropTarget,
|
|
3983
|
-
{
|
|
3984
|
-
"data-workspace-scroll-owner": "self-managed",
|
|
3985
|
-
enabled: !terminal && context.clientConfig.fileUploads.enabled === true,
|
|
3986
|
-
onFiles: attachments.addFiles,
|
|
3987
|
-
children: [
|
|
3988
|
-
findMounted ? /* @__PURE__ */ jsx(LazyPart, { fallback: null, children: /* @__PURE__ */ jsx(
|
|
3989
|
-
ConversationFind,
|
|
3990
|
-
{
|
|
3991
|
-
workspaceId: props.session.workspaceId,
|
|
3992
|
-
sessionId: props.session.id,
|
|
3993
|
-
open: findOpen,
|
|
3994
|
-
focusRevision: findFocusRevision,
|
|
3995
|
-
initial: props.searchTarget,
|
|
3996
|
-
showBackToSessionSearch: props.searchTarget.searchOrigin === "session-search",
|
|
3997
|
-
onClose: closeFind,
|
|
3998
|
-
onTarget: setActiveSearchTarget,
|
|
3999
|
-
onJump: props.onJumpToSequence
|
|
4000
|
-
}
|
|
4001
|
-
) }) : null,
|
|
4002
|
-
cancelled ? /* @__PURE__ */ jsxs("div", { className: cn("mx-auto w-full max-w-3xl pt-6", gutter), children: [
|
|
4003
|
-
/* @__PURE__ */ jsx(TerminalSessionBanner, { session: props.session, onNewSession: props.onNewSession }),
|
|
4004
|
-
/* @__PURE__ */ jsx(TerminalSessionArchive, { session: props.session, eventCount: props.timeline.length })
|
|
4005
|
-
] }) : readOnlyArchive ? /* @__PURE__ */ jsx("div", { className: cn("mx-auto w-full max-w-3xl pt-6", gutter), children: /* @__PURE__ */ jsx(
|
|
4006
|
-
ReadOnlySessionNotice,
|
|
4007
|
-
{
|
|
4008
|
-
session: props.session,
|
|
4009
|
-
onContinue: props.onContinueInNewSession,
|
|
4010
|
-
onRestore: props.onRestoreArchived
|
|
4011
|
-
}
|
|
4012
|
-
) }) : null,
|
|
4013
|
-
/* @__PURE__ */ jsx(Fragment2, { children: /* @__PURE__ */ jsx("div", { "data-testid": "session-timeline", className: "min-h-0 min-w-0 flex-1", children: /* @__PURE__ */ jsx(LearningRefusalActionsProvider, { onOpen: props.onLearningRefusalOpen, children: /* @__PURE__ */ jsx(
|
|
4014
|
-
KnowledgeActivityProvider,
|
|
4015
|
-
{
|
|
4016
|
-
onInspect: props.onMemoryClick,
|
|
4017
|
-
onRetryFile: (fileId) => composer.send(
|
|
4018
|
-
`Retry searchable source preparation for attached file ${fileId}. Use knowledge_retain_file and report its result.`
|
|
4019
|
-
),
|
|
4020
|
-
retryDisabled: composer.hasDraftContent() || composer.sending || composer.draftLoading || !hasComposerPolicy,
|
|
4021
|
-
children: /* @__PURE__ */ jsx(
|
|
4022
|
-
ToolReviewHistoryProvider,
|
|
4023
|
-
{
|
|
4024
|
-
events: props.events,
|
|
4025
|
-
load: loadRecordedToolReview,
|
|
4026
|
-
onViewDetails: viewToolReviewDetails,
|
|
4027
|
-
children: /* @__PURE__ */ jsx(
|
|
4028
|
-
InteractiveAnswerProvider,
|
|
4029
|
-
{
|
|
4030
|
-
send: composer.send,
|
|
4031
|
-
scope: props.session.id,
|
|
4032
|
-
store: answerStore,
|
|
4033
|
-
readOnly: terminal,
|
|
4034
|
-
children: /* @__PURE__ */ jsx(
|
|
4035
|
-
MessageTimeline,
|
|
4036
|
-
{
|
|
4037
|
-
resolveLink,
|
|
4038
|
-
artifactScope: {
|
|
4039
|
-
client: context.client,
|
|
4040
|
-
workspaceId: props.session.workspaceId,
|
|
4041
|
-
sessionId: props.session.id
|
|
4042
|
-
},
|
|
4043
|
-
renderMessageSender,
|
|
4044
|
-
allowanceExhaustedLabels: CONSOLE_TIMELINE_ALLOWANCE_LABELS,
|
|
4045
|
-
presentedFailureEventIds: failureRecovery ? bannerFailureIds : void 0,
|
|
4046
|
-
trailingState: /* @__PURE__ */ jsxs(Fragment2, { children: [
|
|
4047
|
-
failureRecovery,
|
|
4048
|
-
pinnedConnectionCard ? /* @__PURE__ */ jsx("div", { className: "pb-1", "data-pinned-connection-card": "", children: renderAuthNeeded(pinnedConnectionCard) ?? /* @__PURE__ */ jsx(
|
|
4049
|
-
AuthNeededRow,
|
|
4050
|
-
{
|
|
4051
|
-
item: pinnedConnectionCard,
|
|
4052
|
-
onReconnect: props.onReconnect,
|
|
4053
|
-
resolveProviderLogo: props.resolveProviderLogo
|
|
4054
|
-
}
|
|
4055
|
-
) }) : null,
|
|
4056
|
-
props.approvals.length > 0 && approvalsDecidable(props.session.status) && /* @__PURE__ */ jsx(
|
|
4057
|
-
ApprovalSurface,
|
|
4058
|
-
{
|
|
4059
|
-
approvals: props.approvals,
|
|
4060
|
-
selectedApprovalId,
|
|
4061
|
-
onSelectedApprovalChange: setSelectedApprovalId,
|
|
4062
|
-
loadReview: loadToolReview,
|
|
4063
|
-
onViewDetails: viewToolReviewDetails,
|
|
4064
|
-
onAllowAccess: props.onAllowAccess,
|
|
4065
|
-
onApprove: (approval, answer) => decideApproval(approval.id, "approve", answer),
|
|
4066
|
-
onReject: (approval) => decideApproval(approval.id, "reject")
|
|
4067
|
-
}
|
|
4068
|
-
),
|
|
4069
|
-
/* @__PURE__ */ jsx(LazyPart, { fallback: null, children: /* @__PURE__ */ jsx(
|
|
4070
|
-
SessionSkillReviews,
|
|
4071
|
-
{
|
|
4072
|
-
context,
|
|
4073
|
-
workspaceId: props.session.workspaceId,
|
|
4074
|
-
sessionId: props.session.id,
|
|
4075
|
-
events: props.events
|
|
4076
|
-
},
|
|
4077
|
-
`${context.accessContext.subjectId}:${props.session.workspaceId}:${props.session.id}`
|
|
4078
|
-
) }),
|
|
4079
|
-
props.humanInput.requests.length > 0 && props.session.status === "requires_action" ? /* @__PURE__ */ jsx("div", { className: "pb-1", "data-human-input-timeline-surface": "", children: /* @__PURE__ */ jsx(LazyPart, { fallback: /* @__PURE__ */ jsx(LoadingPanel, { label: "Loading questions\u2026" }), children: /* @__PURE__ */ jsx(
|
|
4080
|
-
HumanInputSurface,
|
|
4081
|
-
{
|
|
4082
|
-
loadSkillReview,
|
|
4083
|
-
allowedSaveTo: secretSaveTargets(
|
|
4084
|
-
context.accessContext,
|
|
4085
|
-
props.session.workspaceId
|
|
4086
|
-
),
|
|
4087
|
-
requests: props.humanInput.requests,
|
|
4088
|
-
respondingRequestId: props.humanInput.respondingRequestId,
|
|
4089
|
-
error: props.humanInput.mutationError?.message,
|
|
4090
|
-
onSubmit: async (requestId, response) => {
|
|
4091
|
-
if (!await props.humanInput.respond(requestId, response)) {
|
|
4092
|
-
throw new Error("Your answer wasn't sent. Try again.");
|
|
4093
|
-
}
|
|
4094
|
-
}
|
|
4095
|
-
}
|
|
4096
|
-
) }) }) : null
|
|
4097
|
-
] }),
|
|
4098
|
-
turnSummary: { rolling: true },
|
|
4099
|
-
className: "h-full",
|
|
4100
|
-
items: timelineItems,
|
|
4101
|
-
searchTarget: activeSearchTarget,
|
|
4102
|
-
focusSequence: momentSequence,
|
|
4103
|
-
events: props.events,
|
|
4104
|
-
status: props.session.status,
|
|
4105
|
-
pause: timelineLivePause(admissionControl),
|
|
4106
|
-
computeLabel,
|
|
4107
|
-
renderMessageText,
|
|
4108
|
-
renderMessageActions,
|
|
4109
|
-
onAnnotate: composer.addAnnotation,
|
|
4110
|
-
draftAnnotations: composer.annotations,
|
|
4111
|
-
onDraftAnnotationSelect: composer.requestAnnotationReview,
|
|
4112
|
-
onOpenSession: props.onOpenSession,
|
|
4113
|
-
resolveSessionTitle: props.resolveSessionTitle,
|
|
4114
|
-
onMemoryClick: props.onMemoryClick,
|
|
4115
|
-
onReconnect: props.onReconnect,
|
|
4116
|
-
renderAuthNeeded,
|
|
4117
|
-
resolveProviderLogo: props.resolveProviderLogo,
|
|
4118
|
-
loadRetainedScreenshot,
|
|
4119
|
-
loadRetainedArtifact,
|
|
4120
|
-
loadVideoArtifactPlayback,
|
|
4121
|
-
hasOlder: props.hasOlder,
|
|
4122
|
-
loadingOlder: props.loadingOlder,
|
|
4123
|
-
onLoadOlder: props.onLoadOlder,
|
|
4124
|
-
hasNewer: props.hasNewer,
|
|
4125
|
-
loadingNewer: props.loadingNewer,
|
|
4126
|
-
onLoadNewer: props.onLoadNewer,
|
|
4127
|
-
loadingOldest: props.loadingOldest,
|
|
4128
|
-
onJumpToStart: async () => {
|
|
4129
|
-
await props.onJumpToStart();
|
|
4130
|
-
},
|
|
4131
|
-
onJumpToLatest: props.onJumpToLatest,
|
|
4132
|
-
emptyState: (
|
|
4133
|
-
// Clear view hides history, not the retained failure or retry operation.
|
|
4134
|
-
failureRecovery ?? (props.queue.stoppingPreviousAttempt ? /* @__PURE__ */ jsx(
|
|
4135
|
-
EmptyState,
|
|
4136
|
-
{
|
|
4137
|
-
className: "min-h-[24rem]",
|
|
4138
|
-
icon: /* @__PURE__ */ jsx(Loader2Icon, { className: "size-4 animate-spin motion-reduce:animate-none" }),
|
|
4139
|
-
title: props.queue.effectiveControl?.state === "paused" ? "Stopping current work" : "Stopping previous work",
|
|
4140
|
-
description: props.queue.effectiveControl?.state === "paused" ? "Waiting for the current command to stop safely. Queued work stays saved." : "Your direction is saved. It starts after the previous command stops safely."
|
|
4141
|
-
}
|
|
4142
|
-
) : props.initialLoading ? /* @__PURE__ */ jsx("div", { className: "flex min-h-[24rem]", children: /* @__PURE__ */ jsx(LoadingPanel, {}) }) : props.historyReloadFailed ? /* @__PURE__ */ jsx(
|
|
4143
|
-
ProblemPanel,
|
|
4144
|
-
{
|
|
4145
|
-
title: "Conversation couldn't be loaded",
|
|
4146
|
-
description: "Your saved messages are unchanged. Try loading them again.",
|
|
4147
|
-
action: /* @__PURE__ */ jsx(
|
|
4148
|
-
Button,
|
|
4149
|
-
{
|
|
4150
|
-
variant: "outline",
|
|
4151
|
-
onClick: () => void props.onJumpToLatest(),
|
|
4152
|
-
children: "Retry conversation"
|
|
4153
|
-
}
|
|
4154
|
-
)
|
|
4155
|
-
}
|
|
4156
|
-
) : /* @__PURE__ */ jsx(
|
|
4157
|
-
EmptyState,
|
|
4158
|
-
{
|
|
4159
|
-
className: "min-h-[24rem]",
|
|
4160
|
-
icon: props.session.status === "running" || props.session.status === "recovering" ? /* @__PURE__ */ jsx(Loader2Icon, { className: "size-4 animate-spin motion-reduce:animate-none" }) : /* @__PURE__ */ jsx(MessagesSquareIcon, { className: "size-4" }),
|
|
4161
|
-
title: timelineEmptyStateCopy.title,
|
|
4162
|
-
description: timelineEmptyStateCopy.description
|
|
4163
|
-
}
|
|
4164
|
-
))
|
|
4165
|
-
)
|
|
4166
|
-
},
|
|
4167
|
-
props.session.id
|
|
4168
|
-
)
|
|
4169
|
-
}
|
|
4170
|
-
)
|
|
4171
|
-
}
|
|
4172
|
-
)
|
|
4173
|
-
}
|
|
4174
|
-
) }) }) }),
|
|
4175
|
-
forkEventId ? /* @__PURE__ */ jsx(LazyPart, { fallback: null, children: /* @__PURE__ */ jsx(
|
|
4176
|
-
MessageForkDialog,
|
|
4177
|
-
{
|
|
4178
|
-
session: props.session,
|
|
4179
|
-
events: props.events,
|
|
4180
|
-
sourceEventId: forkEventId,
|
|
4181
|
-
onForkClose: () => setForkEventId(null)
|
|
4182
|
-
},
|
|
4183
|
-
forkEventId
|
|
4184
|
-
) }) : null,
|
|
4185
|
-
repositories.removalDialog,
|
|
4186
|
-
modelRecovery ? /* @__PURE__ */ jsx(ModelRecoveryNotice, { recovery: modelRecovery }) : null,
|
|
4187
|
-
/* @__PURE__ */ jsx("div", { className: cn("mb-1 w-full shrink-0 has-[>div:empty]:hidden", gutter), children: /* @__PURE__ */ jsxs("div", { className: "mx-auto w-full max-w-3xl", children: [
|
|
4188
|
-
/* @__PURE__ */ jsx(
|
|
4189
|
-
SessionAdmissionNotice,
|
|
4190
|
-
{
|
|
4191
|
-
session: props.session,
|
|
4192
|
-
machineAccess,
|
|
4193
|
-
sharedChat,
|
|
4194
|
-
machineAction: /* @__PURE__ */ jsx(
|
|
4195
|
-
SessionMachinePickerAction,
|
|
4196
|
-
{
|
|
4197
|
-
queuedWork: true,
|
|
4198
|
-
runsOn,
|
|
4199
|
-
workspaceId: props.session.workspaceId,
|
|
4200
|
-
rigId: props.session.rigId,
|
|
4201
|
-
move: moveRunsOn
|
|
4202
|
-
}
|
|
4203
|
-
),
|
|
4204
|
-
machines: runsOn.fleet.machines,
|
|
4205
|
-
onMoveToMachine: runsOn.fleet.canAttach ? moveSavedMessage : void 0,
|
|
4206
|
-
canControl: workspacePermissions.includes("sessions:control"),
|
|
4207
|
-
paused: admissionControl.state === "paused",
|
|
4208
|
-
refreshRequired: admissionRefreshRequired,
|
|
4209
|
-
busy: composer.resuming || composer.pausing || composer.sending || props.queue.mutating,
|
|
4210
|
-
onRecheck: () => recheckSessionAdmission({
|
|
4211
|
-
control: admissionControl,
|
|
4212
|
-
refreshOnly: admissionRefreshRequired,
|
|
4213
|
-
resume: (control) => context.client.resumeSession(props.session.workspaceId, props.session.id, {
|
|
4214
|
-
clientEventId: crypto.randomUUID(),
|
|
4215
|
-
expectedControlEtag: control.controlEtag
|
|
4216
|
-
}),
|
|
4217
|
-
refresh: [props.onReloadSession, props.queue.refresh]
|
|
4218
|
-
}),
|
|
4219
|
-
onRefresh: async () => {
|
|
4220
|
-
await Promise.all([props.onReloadSession(), props.queue.refresh()]);
|
|
4221
|
-
},
|
|
4222
|
-
onAllowMachine: machineAccess?.isOwner && runsOn.activeMachine?.enrollmentId && runsOn.activeMachine.sandboxId === props.session.activeSandboxId ? async () => {
|
|
4223
|
-
const enrollmentId = runsOn.activeMachine?.enrollmentId;
|
|
4224
|
-
const allowed = enrollmentId ? await allowMachineForChat({
|
|
4225
|
-
client: context.client,
|
|
4226
|
-
workspaceId: props.session.workspaceId,
|
|
4227
|
-
session: props.session,
|
|
4228
|
-
enrollmentId
|
|
4229
|
-
}) : false;
|
|
4230
|
-
await Promise.allSettled([
|
|
4231
|
-
props.onReloadSession(),
|
|
4232
|
-
props.queue.refresh(),
|
|
4233
|
-
runsOn.fleet.refresh()
|
|
4234
|
-
]);
|
|
4235
|
-
if (!allowed) throw new Error("machine could not be allowed");
|
|
4236
|
-
} : void 0,
|
|
4237
|
-
onContinueWaitingWork: async () => {
|
|
4238
|
-
await context.client.continueSessionWaitingWork(
|
|
4239
|
-
props.session.workspaceId,
|
|
4240
|
-
props.session.id
|
|
4241
|
-
);
|
|
4242
|
-
if (sessionAdmissionReason(props.session) !== null && admissionControl.state !== "paused")
|
|
4243
|
-
await recheckSessionAdmission({
|
|
4244
|
-
control: admissionControl,
|
|
4245
|
-
refreshOnly: admissionRefreshRequired,
|
|
4246
|
-
resume: (control) => context.client.resumeSession(props.session.workspaceId, props.session.id, {
|
|
4247
|
-
clientEventId: crypto.randomUUID(),
|
|
4248
|
-
expectedControlEtag: control.controlEtag
|
|
4249
|
-
}),
|
|
4250
|
-
refresh: [props.onReloadSession, props.queue.refresh]
|
|
4251
|
-
});
|
|
4252
|
-
else await props.onReloadSession();
|
|
4253
|
-
await runsOn.fleet.refresh();
|
|
4254
|
-
}
|
|
4255
|
-
},
|
|
4256
|
-
`${props.session.workspaceId}:${props.session.id}`
|
|
4257
|
-
),
|
|
4258
|
-
waitingSubSessions.length > 0 ? /* @__PURE__ */ jsx(LazyPart, { fallback: null, children: /* @__PURE__ */ jsx(
|
|
4259
|
-
OpenGeniLinkProvider,
|
|
4260
|
-
{
|
|
4261
|
-
resolveLink,
|
|
4262
|
-
artifactScope: {
|
|
4263
|
-
client: context.client,
|
|
4264
|
-
workspaceId: props.session.workspaceId,
|
|
4265
|
-
sessionId: props.session.id
|
|
4266
|
-
},
|
|
4267
|
-
children: /* @__PURE__ */ jsx(
|
|
4268
|
-
DescendantRequests,
|
|
4269
|
-
{
|
|
4270
|
-
client: context.client,
|
|
4271
|
-
workspaceId: props.session.workspaceId,
|
|
4272
|
-
parentSessionId: props.session.id,
|
|
4273
|
-
events: props.events,
|
|
4274
|
-
waiting: waitingSubSessions,
|
|
4275
|
-
onResolved: props.onDescendantResolved,
|
|
4276
|
-
onResumingChange: onSubSessionResumingChange,
|
|
4277
|
-
refreshSignal: props.descendantRefreshSignal,
|
|
4278
|
-
onAllowAccess: props.onAllowAccess,
|
|
4279
|
-
loadSkillReview,
|
|
4280
|
-
allowedSaveTo: secretSaveTargets(
|
|
4281
|
-
context.accessContext,
|
|
4282
|
-
props.session.workspaceId
|
|
4283
|
-
)
|
|
4284
|
-
}
|
|
4285
|
-
)
|
|
4286
|
-
}
|
|
4287
|
-
) }) : null,
|
|
4288
|
-
/* @__PURE__ */ jsx(
|
|
4289
|
-
SessionChrome,
|
|
4290
|
-
{
|
|
4291
|
-
sessionStatus: props.session.status,
|
|
4292
|
-
wait: admissionControl.state === "active" ? sessionInputWait(props.session) : null,
|
|
4293
|
-
onOpenSession: props.onOpenSession,
|
|
4294
|
-
queue: props.queue,
|
|
4295
|
-
composer: terminal ? void 0 : composer,
|
|
4296
|
-
queuedRecall,
|
|
4297
|
-
goal: props.goal,
|
|
4298
|
-
readOnly: terminal,
|
|
4299
|
-
commandsCount: props.session.backgroundCommandActivity?.count ?? 0,
|
|
4300
|
-
commandsPanel: /* @__PURE__ */ jsx(LazyPart, { fallback: /* @__PURE__ */ jsx(LoadingPanel, { label: "Loading commands\u2026" }), children: /* @__PURE__ */ jsx(
|
|
4301
|
-
SessionCommands,
|
|
4302
|
-
{
|
|
4303
|
-
sessionId: props.session.id,
|
|
4304
|
-
readOnly: terminal
|
|
4305
|
-
},
|
|
4306
|
-
props.session.id
|
|
4307
|
-
) }),
|
|
4308
|
-
agentsSignal,
|
|
4309
|
-
agentsPanel: props.agentNodes.length > 0 ? /* @__PURE__ */ jsx(LazyPart, { fallback: /* @__PURE__ */ jsx(LoadingPanel, { label: "Loading agents\u2026" }), children: /* @__PURE__ */ jsx(
|
|
4310
|
-
SubagentTree,
|
|
4311
|
-
{
|
|
4312
|
-
workspaceId: props.session.workspaceId,
|
|
4313
|
-
nodes: props.agentNodes
|
|
4314
|
-
}
|
|
4315
|
-
) }) : null
|
|
4316
|
-
}
|
|
4317
|
-
)
|
|
4318
|
-
] }) }),
|
|
4319
|
-
/* @__PURE__ */ jsx(
|
|
4320
|
-
"div",
|
|
4321
|
-
{
|
|
4322
|
-
ref: composerRegionRef,
|
|
4323
|
-
"data-read-only-composer": readOnlyArchive ? "hidden" : void 0,
|
|
4324
|
-
className: cn(
|
|
4325
|
-
"shrink-0",
|
|
4326
|
-
props.placement === "panel" ? "pb-3" : "pb-4",
|
|
4327
|
-
gutter,
|
|
4328
|
-
readOnlyArchive && "hidden"
|
|
4329
|
-
),
|
|
4330
|
-
children: /* @__PURE__ */ jsxs("div", { className: "mx-auto w-full max-w-3xl", children: [
|
|
4331
|
-
/* @__PURE__ */ jsx(
|
|
4332
|
-
PersonalResourceAttachmentSurface,
|
|
4333
|
-
{
|
|
4334
|
-
controller: personalAttachment,
|
|
4335
|
-
disabled: terminal || composer.sending,
|
|
4336
|
-
compact: true
|
|
4337
|
-
}
|
|
4338
|
-
),
|
|
4339
|
-
/* @__PURE__ */ jsx(
|
|
4340
|
-
ConsoleComposer,
|
|
4341
|
-
{
|
|
4342
|
-
workspaceId: props.session.workspaceId,
|
|
4343
|
-
usageRefreshKey: props.session.status,
|
|
4344
|
-
composer: composerDelivery,
|
|
4345
|
-
attachments,
|
|
4346
|
-
effectiveControl: composer.effectiveControl,
|
|
4347
|
-
queuedAheadCount: props.queue.queue.length,
|
|
4348
|
-
queuedRecall,
|
|
4349
|
-
running: usageLimitTreeActive || sessionTurnKeepsRunControl(props.session.status) || props.pendingWake,
|
|
4350
|
-
canControlWorkspace: workspacePermissions.includes("workspace:admin"),
|
|
4351
|
-
controlLinks: {
|
|
4352
|
-
workspaceHref: `/workspaces/${props.session.workspaceId}`,
|
|
4353
|
-
sessionHref: (sessionId) => `/workspaces/${props.session.workspaceId}/sessions/${sessionId}`
|
|
4354
|
-
},
|
|
4355
|
-
disabled: terminal,
|
|
4356
|
-
header: ownLoginsHeadsUp || unavailableModelNotice || codexUsageNotice || modelSwitchHeadsUp || usageLimitNotice || creditRefusalNotice || sendBlockerNotice || showMachineAccess ? /* @__PURE__ */ jsxs(Fragment2, { children: [
|
|
4357
|
-
!sessionAdmissionNeedsDifferentMachine(
|
|
4358
|
-
sessionAdmissionReason(props.session),
|
|
4359
|
-
machineAccess
|
|
4360
|
-
) ? /* @__PURE__ */ jsx(
|
|
4361
|
-
SessionMachineAccessNotice,
|
|
4362
|
-
{
|
|
4363
|
-
access: machineAccess,
|
|
4364
|
-
shared: sharedChat,
|
|
4365
|
-
className: "px-3.5 pt-2.5 md:px-4",
|
|
4366
|
-
action: /* @__PURE__ */ jsx(
|
|
4367
|
-
SessionMachinePickerAction,
|
|
4368
|
-
{
|
|
4369
|
-
runsOn,
|
|
4370
|
-
workspaceId: props.session.workspaceId,
|
|
4371
|
-
rigId: props.session.rigId,
|
|
4372
|
-
move: moveRunsOn,
|
|
4373
|
-
compact: machineAccess?.isOwner === true
|
|
4374
|
-
}
|
|
4375
|
-
)
|
|
4376
|
-
}
|
|
4377
|
-
) : null,
|
|
4378
|
-
unavailableModelNotice,
|
|
4379
|
-
codexUsageNotice,
|
|
4380
|
-
modelSwitchHeadsUp,
|
|
4381
|
-
usageLimitNotice,
|
|
4382
|
-
creditRefusalNotice ? /* @__PURE__ */ jsx("div", { className: "px-2 pt-2", children: creditRefusalNotice }) : null,
|
|
4383
|
-
ownLoginsHeadsUp,
|
|
4384
|
-
sendBlockerNotice
|
|
4385
|
-
] }) : null,
|
|
4386
|
-
commandContext,
|
|
4387
|
-
onClearView: props.onClearView,
|
|
4388
|
-
fileUploadsEnabled: context.clientConfig.fileUploads.enabled === true,
|
|
4389
|
-
transcriptionSuppressed: voiceActive,
|
|
4390
|
-
controlsLeading: /* @__PURE__ */ jsx(Fragment2, { children: /* @__PURE__ */ jsx(
|
|
4391
|
-
WorkspaceComposerPlus,
|
|
4392
|
-
{
|
|
4393
|
-
connectorActions: {
|
|
4394
|
-
accountControls: {
|
|
4395
|
-
groups: connectionAccounts.availableAccountGroups,
|
|
4396
|
-
choices: connectionAccounts.accountChoices,
|
|
4397
|
-
onChoose: connectionAccounts.selectAccount,
|
|
4398
|
-
loading: connectionAccounts.loading,
|
|
4399
|
-
error: connectionAccounts.error,
|
|
4400
|
-
accessDenied: connectionAccounts.accessDenied,
|
|
4401
|
-
onRefresh: () => void connectionAccounts.refresh(),
|
|
4402
|
-
disabled: terminal || composer.sending || durableToolsSaving || !durableToolsHydrated
|
|
4403
|
-
}
|
|
4404
|
-
},
|
|
4405
|
-
chatSettings: props.onOpenAgentSettings ? {
|
|
4406
|
-
workspaceId: props.session.workspaceId,
|
|
4407
|
-
sessionId: props.session.id,
|
|
4408
|
-
scope: chatLearningScope(props.session),
|
|
4409
|
-
canEdit: workspacePermissions.includes("sessions:control"),
|
|
4410
|
-
onOpen: props.onOpenAgentSettings
|
|
4411
|
-
} : void 0,
|
|
4412
|
-
workspaceId: props.session.workspaceId,
|
|
4413
|
-
disabled: terminal || composer.sending,
|
|
4414
|
-
fileUploadsEnabled: context.clientConfig.fileUploads.enabled === true,
|
|
4415
|
-
servers: selectableSessionMcpServers,
|
|
4416
|
-
firstPartyTools: firstPartyToolOptions,
|
|
4417
|
-
selection: durableToolSelection,
|
|
4418
|
-
toolsSaving: durableToolsSaving,
|
|
4419
|
-
toolsDisabled: composer.sending || terminal || durableToolsSaving || !durableToolsHydrated,
|
|
4420
|
-
connectorCustomizing,
|
|
4421
|
-
onConnectorCustomizingChange: (next) => {
|
|
4422
|
-
setConnectorCustomizingOverride(next);
|
|
4423
|
-
if (next) return;
|
|
4424
|
-
connectionAccounts.resetEmptyChoices();
|
|
4425
|
-
void applyDurableToolPolicy(
|
|
4426
|
-
followWorkspaceConnectorPolicy(durableToolsSnapshot)
|
|
4427
|
-
);
|
|
4428
|
-
},
|
|
4429
|
-
onToolSelectionChange: (next) => void saveDurableToolPolicy(next),
|
|
4430
|
-
...secretsView?.capabilityEnabled ? {
|
|
4431
|
-
secrets: {
|
|
4432
|
-
summary: sessionSecretsSummary(
|
|
4433
|
-
secretsView.policy,
|
|
4434
|
-
secretsView.reachableVaults
|
|
4435
|
-
),
|
|
4436
|
-
panel: /* @__PURE__ */ jsx(
|
|
4437
|
-
SessionSecretsMenuBody,
|
|
4438
|
-
{
|
|
4439
|
-
vaults: secretsView.reachableVaults,
|
|
4440
|
-
policy: secretsView.policy,
|
|
4441
|
-
narrowedByParent: secretsView.narrowedBySessionId !== null,
|
|
4442
|
-
taskItems: secretsView.taskItems,
|
|
4443
|
-
canEdit: workspacePermissions.includes("sessions:control"),
|
|
4444
|
-
disabled: terminal,
|
|
4445
|
-
loading: sessionSecrets.loading,
|
|
4446
|
-
error: sessionSecrets.error,
|
|
4447
|
-
onRetry: () => void sessionSecrets.refresh(),
|
|
4448
|
-
onPolicyChange: async (policy) => {
|
|
4449
|
-
await sessionSecrets.api.setSessionVaultPolicy(
|
|
4450
|
-
props.session.id,
|
|
4451
|
-
policy
|
|
4452
|
-
);
|
|
4453
|
-
await sessionSecrets.refresh();
|
|
4454
|
-
},
|
|
4455
|
-
onSaveTo: async (item, target2) => {
|
|
4456
|
-
await sessionSecrets.api.moveItem(item.vaultId, item.id, {
|
|
4457
|
-
targetVaultId: target2.id,
|
|
4458
|
-
mode: "copy"
|
|
4459
|
-
});
|
|
4460
|
-
toast.success(`Saved ${item.name} to ${target2.name}`);
|
|
4461
|
-
},
|
|
4462
|
-
onManage: () => void navigate({
|
|
4463
|
-
to: "/workspaces/$workspaceId/secrets",
|
|
4464
|
-
params: { workspaceId: props.session.workspaceId }
|
|
4465
|
-
})
|
|
4466
|
-
}
|
|
4467
|
-
)
|
|
4468
|
-
}
|
|
4469
|
-
} : {},
|
|
4470
|
-
repositories: {
|
|
4471
|
-
selectedCount: repositories.selectionCount,
|
|
4472
|
-
disabled: terminal || composer.sending,
|
|
4473
|
-
panel: /* @__PURE__ */ jsx(FollowUpRepositoryMenuBody, { ...repositoryPickerProps })
|
|
4474
|
-
},
|
|
4475
|
-
...runsOn.hasChoices || props.session.rigId || runsOn.activeMachine && !runsOn.activeMachine.isSessionGroup ? {
|
|
4476
|
-
runsOn: {
|
|
4477
|
-
summary: runsOn.activeName,
|
|
4478
|
-
panel: /* @__PURE__ */ jsx(
|
|
4479
|
-
SessionRunsOnMenuBody,
|
|
4480
|
-
{
|
|
4481
|
-
runsOn,
|
|
4482
|
-
workspaceId: props.session.workspaceId,
|
|
4483
|
-
rigId: props.session.rigId ?? null,
|
|
4484
|
-
move: moveRunsOn
|
|
4485
|
-
}
|
|
4486
|
-
)
|
|
4487
|
-
}
|
|
4488
|
-
} : {}
|
|
4489
|
-
}
|
|
4490
|
-
) }),
|
|
4491
|
-
actions: !terminal ? /* @__PURE__ */ jsx(LazyPart, { onLoadFailure: "hide", fallback: null, children: /* @__PURE__ */ jsx(
|
|
4492
|
-
LazyCodexRealtimeControl,
|
|
4493
|
-
{
|
|
4494
|
-
client: realtimeClient,
|
|
4495
|
-
workspaceId: props.session.workspaceId,
|
|
4496
|
-
sessionId: props.session.id,
|
|
4497
|
-
sessionStatus: props.session.status,
|
|
4498
|
-
effectiveControl: props.queue.effectiveControl ?? props.session.effectiveControl,
|
|
4499
|
-
events: props.events,
|
|
4500
|
-
eventsReady: !props.initialLoading,
|
|
4501
|
-
codexConnected,
|
|
4502
|
-
realtimeAutostartModel: props.realtimeAutostartModel,
|
|
4503
|
-
onRealtimeAutostartConsumed: props.onRealtimeAutostartConsumed,
|
|
4504
|
-
onVoiceActiveChange
|
|
4505
|
-
}
|
|
4506
|
-
) }) : null,
|
|
4507
|
-
placeholder: chatComposerPlaceholder({
|
|
4508
|
-
archived: readOnlyArchive !== null,
|
|
4509
|
-
cancelled,
|
|
4510
|
-
creditStopped: Boolean(props.creditExhausted) && (props.session.status === "failed" || props.session.status === "idle"),
|
|
4511
|
-
stopRefusal,
|
|
4512
|
-
creditGap,
|
|
4513
|
-
canBuyCredits
|
|
4514
|
-
}),
|
|
4515
|
-
controls: /* @__PURE__ */ jsxs("div", { className: "@container/model-controls flex min-w-0 flex-1 items-center gap-1.5", children: [
|
|
4516
|
-
simplifiedInterface ? null : /* @__PURE__ */ jsx(
|
|
4517
|
-
ModelPicker,
|
|
4518
|
-
{
|
|
4519
|
-
hasImageAttachments: attachments.attachments.some(
|
|
4520
|
-
(file) => file.status !== "failed" && file.contentType.startsWith("image/")
|
|
4521
|
-
),
|
|
4522
|
-
open: modelPickerSession === props.session.id && !pendingRetryInput,
|
|
4523
|
-
onOpenChange: (open) => {
|
|
4524
|
-
setModelPickerSession(open ? props.session.id : null);
|
|
4525
|
-
if (open) void modelCatalog.refresh();
|
|
4526
|
-
},
|
|
4527
|
-
rows: modelCatalog.rows,
|
|
4528
|
-
model,
|
|
4529
|
-
effort: reasoningEffort,
|
|
4530
|
-
latencyMode,
|
|
4531
|
-
disabled: modelPickerDisabled,
|
|
4532
|
-
loading: modelCatalog.loading || composer.draftLoading,
|
|
4533
|
-
error: modelCatalog.error ?? composerPolicyError,
|
|
4534
|
-
sessionKey: props.session.id,
|
|
4535
|
-
menuSide: "top",
|
|
4536
|
-
connectModelsHref: `/workspaces/${encodeURIComponent(props.session.workspaceId)}/settings?section=models`,
|
|
4537
|
-
claudeSubscriptionAvailable: context.clientConfig.claudeSubscriptionEnabled === true,
|
|
4538
|
-
onModelChange: (modelId) => {
|
|
4539
|
-
composer.setModel(modelId);
|
|
4540
|
-
usageModelSwitch.modelPicked(modelId);
|
|
4541
|
-
},
|
|
4542
|
-
onEffortChange: composer.setReasoningEffort,
|
|
4543
|
-
onLatencyModeChange: composer.setLatencyMode
|
|
4544
|
-
}
|
|
4545
|
-
),
|
|
4546
|
-
durableToolsError ? /* @__PURE__ */ jsx("span", { className: "sr-only", role: "alert", children: durableToolsError }) : null
|
|
4547
|
-
] })
|
|
4548
|
-
}
|
|
4549
|
-
)
|
|
4550
|
-
] })
|
|
4551
|
-
}
|
|
4552
|
-
)
|
|
4553
|
-
]
|
|
4554
|
-
}
|
|
4555
|
-
)
|
|
4556
|
-
)
|
|
4557
|
-
)
|
|
4558
|
-
);
|
|
4559
|
-
}
|
|
4560
|
-
function refusedModelId(error, input) {
|
|
4561
|
-
const details = error.details;
|
|
4562
|
-
if (typeof details?.modelId === "string" && details.modelId) return details.modelId;
|
|
4563
|
-
const attempted = input?.model;
|
|
4564
|
-
return typeof attempted === "string" && attempted ? attempted : null;
|
|
4565
|
-
}
|
|
4566
|
-
|
|
4567
|
-
export {
|
|
4568
|
-
SessionRoute
|
|
4569
|
-
};
|
|
4570
|
-
//# sourceMappingURL=chunk-3VSKLEUE.js.map
|