@p4code/cli 0.8.18 → 0.8.19
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/bin.mjs +1 -1
- package/dist/{binCli-usgrWcNe.mjs → binCli-BfqWHczJ.mjs} +573 -448
- package/dist/client/.vite/manifest.json +2221 -2169
- package/dist/client/assets/AlertDialogRoot-D5I6scXr.js +2 -0
- package/dist/client/assets/{AnimatedHeight-CO3_zEQw.js → AnimatedHeight-Bt23tBJu.js} +2 -2
- package/dist/client/assets/{AuthSurfaceShell-BBPbK1uA.js → AuthSurfaceShell-CScpeyCZ.js} +2 -2
- package/dist/client/assets/{CSPContext-D8znCJtI.js → CSPContext-CCVdxObl.js} +2 -2
- package/dist/client/assets/{ChatGptUsageButton-Bda8Ir5S.js → ChatGptUsageButton-yYHsmy4T.js} +2 -2
- package/dist/client/assets/{ChatMarkdown-BS1t8pnS.js → ChatMarkdown-B0DVA2sH.js} +13 -13
- package/dist/client/assets/{CheckboxIndicator-D-KUEtIm.js → CheckboxIndicator-wz_7NgXC.js} +2 -2
- package/dist/client/assets/CodexSetupSection.logic-BtAckihn.js +2 -0
- package/dist/client/assets/{CollapsiblePanel-84e9KCIs.js → CollapsiblePanel-lE29H_pe.js} +2 -2
- package/dist/client/assets/{ComboboxClear-FsZ2LcVw.js → ComboboxClear-DNFG72Hd.js} +2 -2
- package/dist/client/assets/ComboboxGroupLabel-B_bH_C6n.js +2 -0
- package/dist/client/assets/CommandBlock-VGf7qjr7.js +2 -0
- package/dist/client/assets/{ComposerPromptEditor-BGcYrFoa.js → ComposerPromptEditor-CVko-EBm.js} +13 -13
- package/dist/client/assets/{CompositeRoot-fbPbFqqK.js → CompositeRoot-BaL7J4TF.js} +2 -2
- package/dist/client/assets/{ConnectionStatusDot-t_vHmaco.js → ConnectionStatusDot-IvAZUpIh.js} +2 -2
- package/dist/client/assets/DevicePanel-fh1omTPb.js +2 -0
- package/dist/client/assets/DeviceSetup-wfV02sXR.js +2 -0
- package/dist/client/assets/{DialogTitle-DnR18OB7.js → DialogTitle-CJosg0_K.js} +2 -2
- package/dist/client/assets/{DiffCommentAnnotation-Br9sOo_6.js → DiffCommentAnnotation-C4ODeTG1.js} +2 -2
- package/dist/client/assets/DiffFileTree-Cm5AwI-L.js +2 -0
- package/dist/client/assets/DiffPanel-DW_sAhx0.js +2 -0
- package/dist/client/assets/{DiffWorkerPoolProvider-DydpPFgM.js → DiffWorkerPoolProvider-CXn9pnyS.js} +3 -3
- package/dist/client/assets/EmbeddedDesign-QMT8odFI.js +19 -0
- package/dist/client/assets/{EmbeddedDesign-BsHZJ1Ch.css → EmbeddedDesign-nRjXWU5Y.css} +1 -1
- package/dist/client/assets/{EnvironmentMachineIcon-BMWCDR69.js → EnvironmentMachineIcon-Cs4BoaOB.js} +2 -2
- package/dist/client/assets/{ExpandableText-B6Dvgn62.js → ExpandableText-DUYIICsi.js} +2 -2
- package/dist/client/assets/{FieldControl-CVOjReHh.js → FieldControl-CSR5qaN6.js} +2 -2
- package/dist/client/assets/{FileDiff-Dhyt7ZAJ.js → FileDiff-DfokdNMp.js} +2 -2
- package/dist/client/assets/FilePreviewPanel-BiO1c4ia.js +34 -0
- package/dist/client/assets/{FoldedSettingsSection-Clo0JgyS.js → FoldedSettingsSection-CqteSm77.js} +2 -2
- package/dist/client/assets/{FormContext--axmNCbu.js → FormContext-D3Ve_Lza.js} +2 -2
- package/dist/client/assets/{Icons-BYSK3arN.js → Icons-Bfx5fXpN.js} +2 -2
- package/dist/client/assets/Input-DyKzFpW0.js +2 -0
- package/dist/client/assets/{KeybindingsSettings.logic-30fwcukL.js → KeybindingsSettings.logic-0P2hWpBG.js} +2 -2
- package/dist/client/assets/NoProjectsHero-GWvfTakA.js +2 -0
- package/dist/client/assets/{PanelLayoutControls-DL7sleZ-.js → PanelLayoutControls-yA-MhIU3.js} +10 -10
- package/dist/client/assets/{PierreEntryIcon-DKHnMJOl.js → PierreEntryIcon-x_cG473l.js} +2 -2
- package/dist/client/assets/{PopoverHandle-C-e81PS3.js → PopoverHandle-CY2mrZwB.js} +2 -2
- package/dist/client/assets/PreviewPanel-Dh9n6Ys-.js +2 -0
- package/dist/client/assets/ProjectDefaultsSettings-DS-3kgM0.js +2 -0
- package/dist/client/assets/ProjectFavicon-Bdl7Tzds.js +3 -0
- package/dist/client/assets/{ProjectIconPickerDialog-Bxa9i4w_.js → ProjectIconPickerDialog-BaajvQh5.js} +2 -2
- package/dist/client/assets/{ProjectMonogram-CYD6eMbI.js → ProjectMonogram-TlvVxVmS.js} +2 -2
- package/dist/client/assets/{ProviderAuthTerminal-Cm88QElc.js → ProviderAuthTerminal-UECuLZ2G.js} +2 -2
- package/dist/client/assets/ProviderModelPicker-De9mZUTr.js +2 -0
- package/dist/client/assets/{ProviderSettingsForm-CLYzJJII.js → ProviderSettingsForm-Ck0g4BIu.js} +2 -2
- package/dist/client/assets/PullRequestCodeTab-Ba54Mifj.js +6 -0
- package/dist/client/assets/{ReadOnlySourcePreview-D2Vkrzyc.js → ReadOnlySourcePreview-CVocraam.js} +2 -2
- package/dist/client/assets/RenderErrorBoundary-DKs56Rs9.js +2 -0
- package/dist/client/assets/ScheduledTasksSettings-d4dmI9oH.js +4 -0
- package/dist/client/assets/{ScopedSwitch-BrJEJr8I.js → ScopedSwitch-Z6zp5sHo.js} +2 -2
- package/dist/client/assets/{ScrollAreaCorner-BYUnXNwJ.js → ScrollAreaCorner-B-Z3OJHa.js} +2 -2
- package/dist/client/assets/{SecretInput-CIbdWrQZ.js → SecretInput-DeAPhcuN.js} +2 -2
- package/dist/client/assets/{SelectScrollUpArrow-Cr4PrE_F.js → SelectScrollUpArrow-DfDNBpqc.js} +2 -2
- package/dist/client/assets/{SettingsPanels-B8q4OSW7.js → SettingsPanels-CWgjxAiG.js} +8 -8
- package/dist/client/assets/{SettingsPanels.logic-C5FkY28P.js → SettingsPanels.logic-D3iQ5aZy.js} +2 -2
- package/dist/client/assets/SettingsScopeNotice-BfjZTvSz.js +2 -0
- package/dist/client/assets/{T3ConnectAccountPages-DDSM7QWS.js → T3ConnectAccountPages-CsFviIjD.js} +2 -2
- package/dist/client/assets/{T3ConnectSidebarSignIn-GnkVas23.js → T3ConnectSidebarSignIn-3MsegucL.js} +2 -2
- package/dist/client/assets/ThemeEditorPanel-Bj9nHohX.js +5 -0
- package/dist/client/assets/{ThreadTerminalDrawer-4huAp-uS.js → ThreadTerminalDrawer-Cks3C8wv.js} +4 -4
- package/dist/client/assets/TooltipViewport-WRCNCy-2.js +2 -0
- package/dist/client/assets/{Virtualizer-DjBOkz4F.js → Virtualizer-D6VpBTPc.js} +2 -2
- package/dist/client/assets/{WorkspaceBreadcrumb-ClxInGsT.js → WorkspaceBreadcrumb-CR_Yk7Ph.js} +2 -2
- package/dist/client/assets/{WorkspacePageContainer-DwN_ETF0.js → WorkspacePageContainer-D3M3Ncv4.js} +2 -2
- package/dist/client/assets/{WorkspacePageHeader-BvKCy7v2.js → WorkspacePageHeader-xuSJTTO0.js} +2 -2
- package/dist/client/assets/_chat-DkCa6MKZ.js +45 -0
- package/dist/client/assets/_chat.index-B5-xqP_5.js +2 -0
- package/dist/client/assets/_chat.new-DxPEFJcT.js +4 -0
- package/dist/client/assets/_chat.pull-requests-BBVWbXyN.js +2 -0
- package/dist/client/assets/{abnfDiagram-VCTEODGH-Cv0dw1u8.js → abnfDiagram-VCTEODGH-CxxMo560.js} +2 -2
- package/dist/client/assets/{alert-DYmkyE3l.js → alert-BXnCHOJp.js} +2 -2
- package/dist/client/assets/architecture-7GRP2DOG-CrDVVAg3.js +1 -0
- package/dist/client/assets/{architectureDiagram-5GKGNRK7-BvQMjhmC.js → architectureDiagram-5GKGNRK7-DJiRjS82.js} +2 -2
- package/dist/client/assets/{assets-COg7jyyX.js → assets-B5H7ruRK.js} +2 -2
- package/dist/client/assets/{blockDiagram-I7D4REHJ-DR7f58YJ.js → blockDiagram-I7D4REHJ-kDnwtgKo.js} +2 -2
- package/dist/client/assets/browserHistoryStore-o7hGV5zZ.js +2 -0
- package/dist/client/assets/{browserLinkTarget-Bp-zUm0R.js → browserLinkTarget-hn6UyJXl.js} +2 -2
- package/dist/client/assets/{c4Diagram-7LVT6UL2-zgFjNACn.js → c4Diagram-7LVT6UL2-D1fm-1EX.js} +2 -2
- package/dist/client/assets/channel-CzmVRCkd.js +2 -0
- package/dist/client/assets/{checkbox-brLYzznm.js → checkbox-tOWU_Z9Y.js} +2 -2
- package/dist/client/assets/{chunk-4HAMMTFA-Q6ZY3Aj6.js → chunk-4HAMMTFA-BLYTHhED.js} +2 -2
- package/dist/client/assets/{chunk-75Z2AOVW-Dv4NtCmQ.js → chunk-75Z2AOVW-DT7Umtgk.js} +2 -2
- package/dist/client/assets/{chunk-DU6HZSFF-D-pyRDMG.js → chunk-DU6HZSFF-D0K-8X_H.js} +2 -2
- package/dist/client/assets/{chunk-F27PBJKO-BOXrNdwG.js → chunk-F27PBJKO-5P4LORWK.js} +2 -2
- package/dist/client/assets/{chunk-GMAD6QVW-uYd_Q5lX.js → chunk-GMAD6QVW-DO-mb18X.js} +2 -2
- package/dist/client/assets/{chunk-GVQU2GXP-C3aAR6o_.js → chunk-GVQU2GXP-CxauyvGQ.js} +2 -2
- package/dist/client/assets/{chunk-IMKFNOWR-CbCHd80E.js → chunk-IMKFNOWR-QGonsH_m.js} +2 -2
- package/dist/client/assets/{chunk-L3NEJ4N5-B5jDlsms.js → chunk-L3NEJ4N5-DxKhJ2tE.js} +2 -2
- package/dist/client/assets/{chunk-OSK3NFVY-DgNZQb8q.js → chunk-OSK3NFVY-BlR0vtv9.js} +2 -2
- package/dist/client/assets/{chunk-P2QGCYS3-ptp4LKHi.js → chunk-P2QGCYS3-BIit_gMZ.js} +2 -2
- package/dist/client/assets/{chunk-POPQ4Y6H-CRBmOW8B.js → chunk-POPQ4Y6H-Ojuitc4K.js} +2 -2
- package/dist/client/assets/{chunk-PWAF6VOD-DHkc8IcS.js → chunk-PWAF6VOD-B6Uc75KF.js} +2 -2
- package/dist/client/assets/{chunk-SHT3W25Y-B5XMb9ST.js → chunk-SHT3W25Y-DSzF0_aF.js} +2 -2
- package/dist/client/assets/{chunk-SVP7TREG-Lt0ZENIq.js → chunk-SVP7TREG-BbxrRzvm.js} +2 -2
- package/dist/client/assets/{chunk-TICWLB2K-BhZt3DVX.js → chunk-TICWLB2K-qxbKtZBK.js} +2 -2
- package/dist/client/assets/classDiagram-ZZMXUADV-Ce7tu2gJ.js +2 -0
- package/dist/client/assets/classDiagram-v2-VYDZK3BY-Ce7tu2gJ.js +2 -0
- package/dist/client/assets/{color-picker-D7d1go0g.js → color-picker-C_20-4RB.js} +2 -2
- package/dist/client/assets/{combobox-DSVavlIH.js → combobox-NsYaIiJL.js} +2 -2
- package/dist/client/assets/command-DJR9ebnx.js +2 -0
- package/dist/client/assets/composer-logic-CkuMSzLW.js +6 -0
- package/dist/client/assets/composerDraftUploads-D0K1HfK_.js +2 -0
- package/dist/client/assets/{connect-C39BhZ-c.js → connect-BSmdC-l-.js} +2 -2
- package/dist/client/assets/{connect-agent-Dj_Cfdx6.js → connect-agent-BNeGfFIv.js} +2 -2
- package/dist/client/assets/{cynefin-OW5HDTMX-CNKdS-0M.js → cynefin-OW5HDTMX-BRoWQ1nZ.js} +1 -1
- package/dist/client/assets/{cynefinDiagram-5FMLGOSQ-CoFxzJSW.js → cynefinDiagram-5FMLGOSQ-BPoK_fdY.js} +2 -2
- package/dist/client/assets/{dagre-GXQ25YYZ-q0omC4bc.js → dagre-GXQ25YYZ-B6n9u2fx.js} +2 -2
- package/dist/client/assets/{device-CWgOLpbF.js → device-V5bbUMMx.js} +2 -2
- package/dist/client/assets/{diagram-S7CK7UJ4-CdFkGs_B.js → diagram-S7CK7UJ4-B4H5MfDU.js} +2 -2
- package/dist/client/assets/{diagram-UQ7AKVKN-B0KtokqT.js → diagram-UQ7AKVKN-BN9pt82T.js} +2 -2
- package/dist/client/assets/{diagram-VSXAHHWV-DjtTeImL.js → diagram-VSXAHHWV-C69gO9TK.js} +2 -2
- package/dist/client/assets/{diagram-VX7I27RA-DRYLlkkf.js → diagram-VX7I27RA-qliQCn2I.js} +2 -2
- package/dist/client/assets/{diagram-Z3DM3KII-C-x2EfL6.js → diagram-Z3DM3KII-JnCXFjMD.js} +2 -2
- package/dist/client/assets/{dialog-DYFQxVoN.js → dialog-C4UzQSL1.js} +2 -2
- package/dist/client/assets/{diffRendering-6DuM2rGF.js → diffRendering-Cuv7q0nc.js} +2 -2
- package/dist/client/assets/{discovery-list-BvblDG7m.js → discovery-list-ppl7-G1K.js} +2 -2
- package/dist/client/assets/{dist-CkgAUeqn.js → dist-CnDtgaa3.js} +3 -3
- package/dist/client/assets/{draft-input-27erQjx_.js → draft-input-DUB7VaUv.js} +2 -2
- package/dist/client/assets/{duoViewer-CBnLVCTt.js → duoViewer-Bi-KrG5F.js} +2 -2
- package/dist/client/assets/{dynamic-Cjr9H8t4.js → dynamic-mqe80fw7.js} +3 -3
- package/dist/client/assets/{ebnfDiagram-PWID7BFC-UISo4OT-.js → ebnfDiagram-PWID7BFC-jdXVhqCj.js} +2 -2
- package/dist/client/assets/{embeddedScripts-Dr-tOtuJ.js → embeddedScripts-Qhl8LxE1.js} +2 -2
- package/dist/client/assets/{empty-2jxBvPLn.js → empty-GrsNgo1m.js} +2 -2
- package/dist/client/assets/{entities-DCbEYTvn.js → entities-D6pHmUcl.js} +2 -2
- package/dist/client/assets/{erDiagram-RLTQ6QDP-CeWlUdOf.js → erDiagram-RLTQ6QDP-DdgQriY9.js} +2 -2
- package/dist/client/assets/eventmodeling-NTZA5JFV-C45g87dF.js +1 -0
- package/dist/client/assets/{fileLinks-5NSgRKPU.js → fileLinks-DKkO_IJu.js} +2 -2
- package/dist/client/assets/{fileTreeExpansion-CA6c4E3-.js → fileTreeExpansion-C1UNNqSC.js} +2 -2
- package/dist/client/assets/flowDiagram-HODETNUW-CxTQXeBP.js +1 -0
- package/dist/client/assets/{ganttDiagram-EL5Y4UJY-KPPMvqNL.js → ganttDiagram-EL5Y4UJY-DFCwukfW.js} +2 -2
- package/dist/client/assets/{getDiffFileInput-CuM1lgsL.js → getDiffFileInput-phPjSTY8.js} +2 -2
- package/dist/client/assets/git-compare-DW_c6fci.js +2 -0
- package/dist/client/assets/{gitGraph-4MIJSDKK-BGSFaZro.js → gitGraph-4MIJSDKK-B-iBBweB.js} +1 -1
- package/dist/client/assets/{gitGraphDiagram-WWUBYQGX-CwYf9r63.js → gitGraphDiagram-WWUBYQGX-w7enwZUZ.js} +2 -2
- package/dist/client/assets/{guideRunStore-B3Y6e_nf.js → guideRunStore-C-LauQUS.js} +2 -2
- package/dist/client/assets/{htmlRender-BaqdfJ6m.js → htmlRender-DVq1i7PZ.js} +2 -2
- package/dist/client/assets/{index-DmPPPGJb.js → index-CW8ApI1G.js} +3 -3
- package/dist/client/assets/{info-A6RAGUB7-C831OtOR.js → info-A6RAGUB7-zYd5-_tB.js} +1 -1
- package/dist/client/assets/{infoDiagram-27XIBGKW-DVstIW76.js → infoDiagram-27XIBGKW-BlWLgzyt.js} +2 -2
- package/dist/client/assets/{input-83N8btBC.js → input-DpZhQSV2.js} +2 -2
- package/dist/client/assets/{input-group-Q757vhrD.js → input-group-BjfPTIWt.js} +2 -2
- package/dist/client/assets/{ishikawaDiagram-5VMMS53U-CJq0N-AL.js → ishikawaDiagram-5VMMS53U-oNq825oe.js} +2 -2
- package/dist/client/assets/{journeyDiagram-3NMN7TZE-D76KCD6f.js → journeyDiagram-3NMN7TZE-BQqGB1_d.js} +2 -2
- package/dist/client/assets/{kanban-definition-UXKFOSKX-D1kzRMIP.js → kanban-definition-UXKFOSKX-CDCYjq7t.js} +2 -2
- package/dist/client/assets/{kbd-D8UfTN0o.js → kbd-BfsP5lvQ.js} +2 -2
- package/dist/client/assets/{keybindings-DLDyoB30.js → keybindings-BD3cM3Jm.js} +2 -2
- package/dist/client/assets/{lazyRouteComponent-BCGAjyjO.js → lazyRouteComponent-DebYKx4q.js} +2 -2
- package/dist/client/assets/{line-QHGhF6Vm.js → line-Dr_Yg9S8.js} +2 -2
- package/dist/client/assets/{link-Bgj44djS.js → link-wJO6kwX4.js} +2 -2
- package/dist/client/assets/{linkedPrompt-D1aW6nV5.js → linkedPrompt-Dx_WF0Gk.js} +2 -2
- package/dist/client/assets/main-DklPMTd5.css +2 -0
- package/dist/client/assets/main-DqlnVz2C.js +26 -0
- package/dist/client/assets/{mediaReference-CQtke4j3.js → mediaReference-DEdeypAC.js} +2 -2
- package/dist/client/assets/{mediaSource-CI2bKK3n.js → mediaSource-DTry5UU8.js} +2 -2
- package/dist/client/assets/{mermaid-parser.core-Brqe55KM.js → mermaid-parser.core-EKu4BBvw.js} +4 -4
- package/dist/client/assets/{mermaid.core-Cdl6aiT5.js → mermaid.core-C-FRLnEk.js} +5 -5
- package/dist/client/assets/{mindmap-definition-YA3MSWOX-CcdCCRbd.js → mindmap-definition-YA3MSWOX-Bo-8FCl-.js} +2 -2
- package/dist/client/assets/{number-field-DQIrEOoj.js → number-field-B0OyTTUs.js} +2 -2
- package/dist/client/assets/{observeResize-BaPAtI3Q.js → observeResize-CBAzjAMz.js} +2 -2
- package/dist/client/assets/{onboarding-ObMsA9VF.js → onboarding-EecLmYJ0.js} +2 -2
- package/dist/client/assets/{openFileInPreview-CdBR5kuZ.js → openFileInPreview-MgwNsNCM.js} +2 -2
- package/dist/client/assets/{p4ProjectFile--u7SOSK5.js → p4ProjectFile-DZ6HGjaI.js} +2 -2
- package/dist/client/assets/{packet-AYTQ26CC-BSuHbq7S.js → packet-AYTQ26CC-DD_SFe63.js} +1 -1
- package/dist/client/assets/{pair-C11lrlzi.js → pair-BzsQ1gz0.js} +2 -2
- package/dist/client/assets/{pegDiagram-XKGWAZYB-Iy9neoGN.js → pegDiagram-XKGWAZYB-Bbw22YYs.js} +2 -2
- package/dist/client/assets/{phoneViewer-iqsNqM8D.js → phoneViewer-DZyuQ-is.js} +2 -2
- package/dist/client/assets/{pie-WAS4IAKB-BlC5Ctcv.js → pie-WAS4IAKB-CNHjs-Ma.js} +1 -1
- package/dist/client/assets/{pieDiagram-E7YTZNPT-CtVgATJF.js → pieDiagram-E7YTZNPT-_ZbKy7eA.js} +2 -2
- package/dist/client/assets/{pierre-icons-fSsw9aa-.js → pierre-icons-BubjdUjD.js} +2 -2
- package/dist/client/assets/{popover-B1MF5i1c.js → popover-BuuvISBT.js} +2 -2
- package/dist/client/assets/{preview-DwLWkMZG.js → preview-BlW45a9H.js} +2 -2
- package/dist/client/assets/{preview-ITad1JAy.js → preview-CwzKOKVG.js} +2 -2
- package/dist/client/assets/{previewMiniPlayerStore-DN-AYBed.js → previewMiniPlayerStore-CGiA2h59.js} +2 -2
- package/dist/client/assets/{primary-8A8hvHFL.js → primary-3GB-obcz.js} +2 -2
- package/dist/client/assets/primaryCloudLinkState-DYmepSfi.js +2 -0
- package/dist/client/assets/{projectFilesQueryState-CGllQp_V.js → projectFilesQueryState-D2rMhOEA.js} +2 -2
- package/dist/client/assets/{projectScriptEditor-DwqFzld2.js → projectScriptEditor-BxnriUVv.js} +2 -2
- package/dist/client/assets/providerSkills-C_OG7yP0.js +2 -0
- package/dist/client/assets/{pullRequestDetail.logic-CkxKh0fV.js → pullRequestDetail.logic-BhGUhCGd.js} +2 -2
- package/dist/client/assets/{pullRequestIcons-CSZus-cz.js → pullRequestIcons-DsTinQ4q.js} +2 -2
- package/dist/client/assets/{pullRequestReviewStore-78f71w6J.js → pullRequestReviewStore-BKYNixhZ.js} +2 -2
- package/dist/client/assets/pullRequests-CQ2Zte1o.js +2 -0
- package/dist/client/assets/{quadrantDiagram-AXDQQJYC-kq18RP_F.js → quadrantDiagram-AXDQQJYC-Bnl3w7OY.js} +2 -2
- package/dist/client/assets/{queries-DCKH7ltg.js → queries-_Qf89qTX.js} +2 -2
- package/dist/client/assets/{query-B1uAr_ii.js → query-CRlRG7rf.js} +2 -2
- package/dist/client/assets/{radar-RG4KPBEZ-Cbkq33o2.js → radar-RG4KPBEZ-DweWJU_g.js} +1 -1
- package/dist/client/assets/{radio-group-CFJMQH66.js → radio-group-iJUHzvZC.js} +2 -2
- package/dist/client/assets/{railroad-74A4TZTK-Ba3TZ4Wg.js → railroad-74A4TZTK-DmxX8fKE.js} +1 -1
- package/dist/client/assets/railroad-abnf-HS5TGJTU-CSGCBDLE.js +1 -0
- package/dist/client/assets/railroad-ebnf-LZEXJU2U-qkcBzemM.js +1 -0
- package/dist/client/assets/railroad-peg-WCYAUIDC-B-rmMXQT.js +1 -0
- package/dist/client/assets/{railroadDiagram-O6MQD6OU-BfOnyiaT.js → railroadDiagram-O6MQD6OU-D94VfvdV.js} +2 -2
- package/dist/client/assets/{renderScheduler-CcWhS7Yq.js → renderScheduler-DIWSOdLy.js} +2 -2
- package/dist/client/assets/{requirementDiagram-BXWQKSXE-DFzAGiJp.js → requirementDiagram-BXWQKSXE-4Sss1rRH.js} +2 -2
- package/dist/client/assets/{rightPanelStore-DfMWWfvR.js → rightPanelStore-C3FvIXSq.js} +2 -2
- package/dist/client/assets/{runtime-B9IDNXDU.js → runtime-CJNEsw6U.js} +3 -3
- package/dist/client/assets/runtime-ets76j-h.js +2 -0
- package/dist/client/assets/{runtimeModeConfig-C3TbI2qR.js → runtimeModeConfig-DNgZlBoC.js} +2 -2
- package/dist/client/assets/{sankeyDiagram-P5KCCOFB-D9gFGibV.js → sankeyDiagram-P5KCCOFB-CFV5CXMi.js} +2 -2
- package/dist/client/assets/{scheduledTasksSettings.logic-DVbZRIYJ.js → scheduledTasksSettings.logic-CGYf8FQi.js} +2 -2
- package/dist/client/assets/{scroll-area-DGS0jgnh.js → scroll-area-By1ARHPp.js} +2 -2
- package/dist/client/assets/{select-Dsx46akG.js → select-DqGlaY40.js} +2 -2
- package/dist/client/assets/{sequenceDiagram-WJ2MYXX4-C9pRaNT5.js → sequenceDiagram-WJ2MYXX4-Cln2JnVw.js} +2 -2
- package/dist/client/assets/{server-CoH7V4JL.js → server-DpLkyQ0R.js} +2 -2
- package/dist/client/assets/{session-Bo2ZSprC.js → session-Cau_XThy.js} +2 -2
- package/dist/client/assets/{session-logic-C4wGF3_E.js → session-logic-CRwcdrNw.js} +2 -2
- package/dist/client/assets/settings-B4aWX2xy.js +2 -0
- package/dist/client/assets/{settings.appearance-6ktu9wdJ.js → settings.appearance-C__igzME.js} +2 -2
- package/dist/client/assets/settings.archived-Bs-jKZBo.js +2 -0
- package/dist/client/assets/{settings.computer-use-C24sO93u.js → settings.computer-use-SngXUHmk.js} +2 -2
- package/dist/client/assets/settings.connections-Bw61DbEx.js +2 -0
- package/dist/client/assets/settings.data-controls-DbqXwsIJ.js +2 -0
- package/dist/client/assets/{settings.decisions-kar2kv7T.js → settings.decisions-Bw-dFoGZ.js} +2 -2
- package/dist/client/assets/settings.diagnostics-D5dG-CTq.js +2 -0
- package/dist/client/assets/{settings.general-C1zsJgwK.js → settings.general-DVafi8E5.js} +2 -2
- package/dist/client/assets/settings.integrations-C4t8diIu.js +2 -0
- package/dist/client/assets/{settings.keybindings-CYcsJ6DQ.js → settings.keybindings-B1dMCy_G.js} +2 -2
- package/dist/client/assets/{settings.open-source-licenses-DnBHlZE2.js → settings.open-source-licenses-kgRl8SYE.js} +2 -2
- package/dist/client/assets/settings.plugins-HtKh3bu8.js +5 -0
- package/dist/client/assets/settings.projects-CtKhtmR8.js +4 -0
- package/dist/client/assets/settings.providers-Bd0702hD.js +3 -0
- package/dist/client/assets/{settings.scheduled-tasks-Bf37L1OK.js → settings.scheduled-tasks-Tpcp-BCI.js} +2 -2
- package/dist/client/assets/settings.snap-shot-BngynTBI.js +2 -0
- package/dist/client/assets/settings.source-control-DmQkMruN.js +2 -0
- package/dist/client/assets/{settings.storage-DmbTXujz.js → settings.storage-CUeYkScx.js} +2 -2
- package/dist/client/assets/settingsLayout-Du5mjDQU.js +3 -0
- package/dist/client/assets/sidebar-Dxq8kloB.js +2 -0
- package/dist/client/assets/{sidebarProjectGrouping-DrnsFA8t.js → sidebarProjectGrouping-BfZ705hQ.js} +2 -2
- package/dist/client/assets/{skeleton-0mC3wMw1.js → skeleton--M5AJWoC.js} +2 -2
- package/dist/client/assets/{sourceControl-D6TEHNpa.js → sourceControl-Cmvk57z0.js} +2 -2
- package/dist/client/assets/sourceControlClients-C0IkCWsN.js +2 -0
- package/dist/client/assets/{spinner-DHOdl-gn.js → spinner-cHzhZrgb.js} +2 -2
- package/dist/client/assets/{standalone-page-Dx8vGwaJ.js → standalone-page-BaVFigS5.js} +2 -2
- package/dist/client/assets/{stateDiagram-D77RDMKH-D8n56CID.js → stateDiagram-D77RDMKH-CZ_bsdqp.js} +2 -2
- package/dist/client/assets/stateDiagram-v2-MP3YSRHH-93FSJgV8.js +2 -0
- package/dist/client/assets/{swimlanes-42K2YHIH-DZZct2ih.js → swimlanes-42K2YHIH-My4j-GD7.js} +2 -2
- package/dist/client/assets/swimlanesDiagram-VR7AAH4N-1FS1ow3r.js +9 -0
- package/dist/client/assets/{terminal-links-Di9Ijg8X.js → terminal-links-BSEOjQCo.js} +2 -2
- package/dist/client/assets/{terminalSessions-B8EDcX8b.js → terminalSessions-BpuHxk1q.js} +2 -2
- package/dist/client/assets/{textarea-BvPoR1cI.js → textarea-XR9lgl40.js} +2 -2
- package/dist/client/assets/{themePalette-zFOiBKDi.js → themePalette-CONAHv4I.js} +2 -2
- package/dist/client/assets/threadSort-Bd2rijEy.js +2 -0
- package/dist/client/assets/{timeline-definition-24CTP7MA-BGfuRztb.js → timeline-definition-24CTP7MA-Q9JBFJBF.js} +2 -2
- package/dist/client/assets/toast-CwJ-bjHi.js +2 -0
- package/dist/client/assets/{toggle-DeCGfzT2.js → toggle-FqX4CVcC.js} +2 -2
- package/dist/client/assets/{toggle-group-DekLc0Ax.js → toggle-group-JCVlIQ5i.js} +2 -2
- package/dist/client/assets/tooltip-CtZ6PJJw.js +2 -0
- package/dist/client/assets/{treeView-Q6P3EWNA-BPM2x-ME.js → treeView-Q6P3EWNA-3qBVWI88.js} +1 -1
- package/dist/client/assets/{treemap-WGGIJYW6-sku0fChI.js → treemap-WGGIJYW6-O3_0iynh.js} +1 -1
- package/dist/client/assets/uiStateStore-CcTtH1Jz.js +6 -0
- package/dist/client/assets/usage-DWATWAhJ.js +2 -0
- package/dist/client/assets/{usageAccess-BGb3m0YV.js → usageAccess-Cpk_Aec9.js} +2 -2
- package/dist/client/assets/{usageFormat-H-RgZ0fy.js → usageFormat-B23xwSbG.js} +2 -2
- package/dist/client/assets/{usageShortcuts-C320W17X.js → usageShortcuts-BMHWlKT1.js} +2 -2
- package/dist/client/assets/{use-atom-command-GpCw1tWF.js → use-atom-command-3Z4EZbCj.js} +2 -2
- package/dist/client/assets/{useAriaLabelledBy-C8nSWyQ9.js → useAriaLabelledBy-CMSGO3cd.js} +2 -2
- package/dist/client/assets/{useHandleNewThread-FJLPEfoH.js → useHandleNewThread-B9RCcbnw.js} +2 -2
- package/dist/client/assets/{useLocation-Ccsih1eo.js → useLocation-BTH6wjAt.js} +2 -2
- package/dist/client/assets/useNavigate-BS8hIoQr.js +2 -0
- package/dist/client/assets/{useNavigateBack-PnWVFtkU.js → useNavigateBack-DskLvJ9n.js} +2 -2
- package/dist/client/assets/{useParams-CoeDewwU.js → useParams-DhNu716j.js} +2 -2
- package/dist/client/assets/{usePermissionStatus-mBtsOu9K.js → usePermissionStatus-DaOsrYgE.js} +2 -2
- package/dist/client/assets/usePullRequestActions-3vXHUgiG.js +3 -0
- package/dist/client/assets/{useRegisterFieldControl-9rSmWR2W.js → useRegisterFieldControl-BX1EsUxP.js} +2 -2
- package/dist/client/assets/useScopedModelAvailability-BcYNdaQr.js +2 -0
- package/dist/client/assets/useSettings-D_OJJgNE.js +3 -0
- package/dist/client/assets/{useT3ConnectAuthPrompt-ZyPZIXm7.js → useT3ConnectAuthPrompt-BcMgBGvL.js} +2 -2
- package/dist/client/assets/utils-DqIvhFCT.js +37 -0
- package/dist/client/assets/{vcsRefInvalidation-DfCz0cGO.js → vcsRefInvalidation-Dj5BpmJA.js} +2 -2
- package/dist/client/assets/{vennDiagram-4TSXK5OY-CjhblZp4.js → vennDiagram-4TSXK5OY-CGJ_vzL4.js} +2 -2
- package/dist/client/assets/{wardley-WFR3VGLG-Cuf_pn9-.js → wardley-WFR3VGLG-dLKWDrdG.js} +1 -1
- package/dist/client/assets/{wardleyDiagram-VM6X3IG4-CMQ-_cYv.js → wardleyDiagram-VM6X3IG4-CZY3cfuL.js} +2 -2
- package/dist/client/assets/welcome-BSKechyt.js +2 -0
- package/dist/client/assets/{xychartDiagram-S5SC5T6Z-BlCqmJgA.js → xychartDiagram-S5SC5T6Z-H2sll7xl.js} +2 -2
- package/dist/client/index.html +1 -1
- package/dist/{renderer-7OJ6c0Me.mjs → renderer-CCVomMFP.mjs} +2 -2
- package/dist/{runtime-BHqdsO3Y.mjs → runtime-DKclsP_7.mjs} +51 -3
- package/package.json +1 -1
- package/dist/client/assets/AlertDialogRoot-D6ed6zQR.js +0 -2
- package/dist/client/assets/CodexSetupSection.logic-Ed9SDkqP.js +0 -2
- package/dist/client/assets/CommandBlock-C7ASE_F_.js +0 -2
- package/dist/client/assets/DevicePanel-CS1FTu-C.js +0 -2
- package/dist/client/assets/DeviceSetup-DZAK0_tm.js +0 -2
- package/dist/client/assets/DiffFileTree-DkLJXYZf.js +0 -2
- package/dist/client/assets/DiffPanel-CGV12wM6.js +0 -2
- package/dist/client/assets/EmbeddedDesign--Xz14U92.js +0 -19
- package/dist/client/assets/FilePreviewPanel-8tUtMikb.js +0 -34
- package/dist/client/assets/Input-CVwvVqbx.js +0 -2
- package/dist/client/assets/NoProjectsHero-Lsb9cuvO.js +0 -2
- package/dist/client/assets/PreviewPanel-DmaoFTEA.js +0 -2
- package/dist/client/assets/ProjectDefaultsSettings-CrKY01_P.js +0 -2
- package/dist/client/assets/ProjectFavicon-B5C6TpKj.js +0 -3
- package/dist/client/assets/ProviderModelPicker-CeB11O3P.js +0 -2
- package/dist/client/assets/PullRequestCodeTab-BqH4glgo.js +0 -6
- package/dist/client/assets/RenderErrorBoundary-BgOA8qma.js +0 -2
- package/dist/client/assets/ScheduledTasksSettings-BMQ-_Rms.js +0 -4
- package/dist/client/assets/SettingsScopeNotice-_WSLtOW4.js +0 -2
- package/dist/client/assets/ThemeEditorPanel-DB8D5_6u.js +0 -5
- package/dist/client/assets/TooltipViewport-kqulS2nz.js +0 -2
- package/dist/client/assets/_chat-C2VZmKVT.js +0 -45
- package/dist/client/assets/_chat.index-CQSbFMBa.js +0 -2
- package/dist/client/assets/_chat.new-BxObe9FX.js +0 -4
- package/dist/client/assets/_chat.pull-requests-JS9EZDI7.js +0 -2
- package/dist/client/assets/architecture-7GRP2DOG-Dd1d-ckm.js +0 -1
- package/dist/client/assets/browserHistoryStore-_SurQa0e.js +0 -2
- package/dist/client/assets/channel-Dsne2IjR.js +0 -2
- package/dist/client/assets/classDiagram-ZZMXUADV-Dazl0CLN.js +0 -2
- package/dist/client/assets/classDiagram-v2-VYDZK3BY-Dazl0CLN.js +0 -2
- package/dist/client/assets/command-DsE3Ju6m.js +0 -2
- package/dist/client/assets/environments-iW64jjyO.js +0 -2
- package/dist/client/assets/eventmodeling-NTZA5JFV-B5z8GPGl.js +0 -1
- package/dist/client/assets/flowDiagram-HODETNUW-CEpweBDE.js +0 -1
- package/dist/client/assets/git-compare-CCnx9obs.js +0 -2
- package/dist/client/assets/main-ChIB1-3M.css +0 -2
- package/dist/client/assets/main-lV-t-UZx.js +0 -30
- package/dist/client/assets/primaryCloudLinkState-BP-HZzf2.js +0 -2
- package/dist/client/assets/providerSkills-O72EMm0V.js +0 -2
- package/dist/client/assets/pullRequests-7IQc0VIk.js +0 -2
- package/dist/client/assets/railroad-abnf-HS5TGJTU-l3gFfdc2.js +0 -1
- package/dist/client/assets/railroad-ebnf-LZEXJU2U-eiWL8AW4.js +0 -1
- package/dist/client/assets/railroad-peg-WCYAUIDC-UK0E-Txe.js +0 -1
- package/dist/client/assets/runtime-B5cKWtKn.js +0 -2
- package/dist/client/assets/settings-mrxLMm57.js +0 -2
- package/dist/client/assets/settings.archived-Hl4HyrFx.js +0 -2
- package/dist/client/assets/settings.connections-CgaYGg_W.js +0 -2
- package/dist/client/assets/settings.data-controls-DNY0fL9E.js +0 -2
- package/dist/client/assets/settings.diagnostics-BHSEPjF8.js +0 -2
- package/dist/client/assets/settings.integrations-DykwmCf7.js +0 -2
- package/dist/client/assets/settings.plugins-B7Nlb85S.js +0 -5
- package/dist/client/assets/settings.projects-Ob8jKbIh.js +0 -4
- package/dist/client/assets/settings.providers-BIm-8j9C.js +0 -3
- package/dist/client/assets/settings.snap-shot-D37zM8an.js +0 -2
- package/dist/client/assets/settings.source-control-DmRUgcsk.js +0 -2
- package/dist/client/assets/settingsLayout-CqGfrbmD.js +0 -3
- package/dist/client/assets/sidebar-C_I_pq_E.js +0 -2
- package/dist/client/assets/sortable.esm-DuAaqmgD.js +0 -6
- package/dist/client/assets/stateDiagram-v2-MP3YSRHH-DqXgq-FS.js +0 -2
- package/dist/client/assets/swimlanesDiagram-VR7AAH4N-DAX63YhZ.js +0 -9
- package/dist/client/assets/threadSort-Cn23YHH2.js +0 -2
- package/dist/client/assets/toast-CN7Jd-pG.js +0 -2
- package/dist/client/assets/tooltip-DaSC-3cL.js +0 -2
- package/dist/client/assets/usage-CKRSqJso.js +0 -2
- package/dist/client/assets/useNavigate-Dhy_1-Mg.js +0 -2
- package/dist/client/assets/usePullRequestActions-_K7fD4Ny.js +0 -3
- package/dist/client/assets/useScopedModelAvailability-DE1E_lbg.js +0 -2
- package/dist/client/assets/useSettings-CKA-LDDj.js +0 -3
- package/dist/client/assets/utils-BAPnqm16.js +0 -37
- package/dist/client/assets/welcome-nE6tva7L.js +0 -2
|
@@ -11234,6 +11234,16 @@ const ThreadPullRequestLink = Struct({
|
|
|
11234
11234
|
watch: optional(ThreadPullRequestWatch)
|
|
11235
11235
|
});
|
|
11236
11236
|
//#endregion
|
|
11237
|
+
//#region ../../packages/contracts/src/threadDesign.ts
|
|
11238
|
+
/** Agent links come from design_apply in the thread; manual links come from the user. */
|
|
11239
|
+
const ThreadDesignLinkSource = Literals(["agent", "manual"]);
|
|
11240
|
+
/** A `.p4design` document, relative to the thread's workspace, that belongs to the thread. */
|
|
11241
|
+
const ThreadDesignLink = Struct({
|
|
11242
|
+
path: TrimmedNonEmptyString,
|
|
11243
|
+
source: ThreadDesignLinkSource,
|
|
11244
|
+
linkedAt: IsoDateTime
|
|
11245
|
+
});
|
|
11246
|
+
//#endregion
|
|
11237
11247
|
//#region ../../packages/contracts/src/providerPolicy.ts
|
|
11238
11248
|
const ProviderApprovalPolicy = Literals([
|
|
11239
11249
|
"untrusted",
|
|
@@ -12940,6 +12950,8 @@ const OrchestrationV2AppThread = Struct({
|
|
|
12940
12950
|
pre-linking servers still decode. */
|
|
12941
12951
|
linkedPullRequest: optional(NullOr(ThreadLinkedPullRequest)),
|
|
12942
12952
|
pullRequests: optional(ArraySchema(ThreadPullRequestLink)),
|
|
12953
|
+
/** Design documents the thread created or the user attached. */
|
|
12954
|
+
designs: optional(ArraySchema(ThreadDesignLink)),
|
|
12943
12955
|
/** Pull request discovered from the thread's current branch. */
|
|
12944
12956
|
branchPullRequest: optional(NullOr(ThreadLinkedPullRequest)),
|
|
12945
12957
|
activeProviderThreadId: NullOr(ProviderThreadId),
|
|
@@ -14377,6 +14389,8 @@ const OrchestrationV2ThreadShell = Struct({
|
|
|
14377
14389
|
/** Pull request the user linked to this thread (#8160). */
|
|
14378
14390
|
linkedPullRequest: optional(NullOr(ThreadLinkedPullRequest)),
|
|
14379
14391
|
pullRequests: optional(ArraySchema(ThreadPullRequestLink)),
|
|
14392
|
+
/** Design documents the thread created or the user attached. */
|
|
14393
|
+
designs: optional(ArraySchema(ThreadDesignLink)),
|
|
14380
14394
|
/** Pull request discovered from the thread's current branch. */
|
|
14381
14395
|
branchPullRequest: optional(NullOr(ThreadLinkedPullRequest)),
|
|
14382
14396
|
lineage: OrchestrationV2AppThreadLineage,
|
|
@@ -15174,6 +15188,19 @@ const OrchestrationV2Command = Union([
|
|
|
15174
15188
|
threadId: ThreadId,
|
|
15175
15189
|
...ThreadPullRequestKey.fields
|
|
15176
15190
|
}),
|
|
15191
|
+
Struct({
|
|
15192
|
+
type: Literal("thread.design.link"),
|
|
15193
|
+
commandId: CommandId,
|
|
15194
|
+
threadId: ThreadId,
|
|
15195
|
+
path: TrimmedNonEmptyString,
|
|
15196
|
+
source: ThreadDesignLinkSource
|
|
15197
|
+
}),
|
|
15198
|
+
Struct({
|
|
15199
|
+
type: Literal("thread.design.unlink"),
|
|
15200
|
+
commandId: CommandId,
|
|
15201
|
+
threadId: ThreadId,
|
|
15202
|
+
path: TrimmedNonEmptyString
|
|
15203
|
+
}),
|
|
15177
15204
|
Struct({
|
|
15178
15205
|
type: Literal("thread.pull-request-link.sync"),
|
|
15179
15206
|
commandId: CommandId,
|
|
@@ -27212,7 +27239,28 @@ const DesignAssetRequest = Struct({
|
|
|
27212
27239
|
sourceDocumentId: optional(DesignId),
|
|
27213
27240
|
expectedContentHash: optional(DesignHash)
|
|
27214
27241
|
});
|
|
27215
|
-
|
|
27242
|
+
/** `secondary` marks copies in nested worktrees, fixtures, and dot folders, which pickers fold away. */
|
|
27243
|
+
const DesignCatalogEntry = Struct({
|
|
27244
|
+
path: String$1,
|
|
27245
|
+
modifiedAt: optional(String$1),
|
|
27246
|
+
/** Top-level frames; absent for copies and documents too large to read for a picker. */
|
|
27247
|
+
pageCount: optional(Int),
|
|
27248
|
+
secondary: Boolean,
|
|
27249
|
+
/** Linked to the thread the listing was made for. */
|
|
27250
|
+
linked: optional(Boolean)
|
|
27251
|
+
});
|
|
27252
|
+
/** `design_list`: documents an agent can work on, its own thread's first. */
|
|
27253
|
+
const DesignListRequest = Struct({ includeCopies: optional(Boolean.annotate({ description: "Also list copies in nested worktrees, fixtures, and dot folders. Omit for the project's own designs." })) });
|
|
27254
|
+
const DesignListReceipt = Struct({
|
|
27255
|
+
documents: ArraySchema(DesignCatalogEntry),
|
|
27256
|
+
/** Documents left out by the result limit. */
|
|
27257
|
+
omitted: Int
|
|
27258
|
+
});
|
|
27259
|
+
/** `entries` is absent on hosts that only list paths. */
|
|
27260
|
+
const DesignCatalogResult = Struct({
|
|
27261
|
+
paths: ArraySchema(String$1),
|
|
27262
|
+
entries: optional(ArraySchema(DesignCatalogEntry))
|
|
27263
|
+
});
|
|
27216
27264
|
const DesignTransferRequest = Union([Struct({
|
|
27217
27265
|
kind: Literal("import"),
|
|
27218
27266
|
target: DesignTarget,
|
|
@@ -31027,6 +31075,6 @@ function semanticDiff(before, after) {
|
|
|
31027
31075
|
return changes;
|
|
31028
31076
|
}
|
|
31029
31077
|
//#endregion
|
|
31030
|
-
export { WsMcpRegistryProviderSignOutRpc as $, DeviceToolError as $a, VcsProcessMissingExitCodeError as $c, ExecutionEnvironmentDescriptor as $d, decodeSchema as $f, PROJECT_SCOPED_SERVER_SETTING_KEYS as $i, requestPreResponseHandlers as $l, AssetWorkspaceResolutionError as $n, RelayManagedEndpointRecoveryRegistrationResponse as $o, ProviderSessionId as $p, ApplicationEventMetadata as $r, OrchestrationV2ThreadLaunchError as $s, PreviewAutomationDragInput as $t, schemaBodyJson as $u, SelfImproveLabel as A, KeybindingsConfigError as Aa, ProviderInteractionMode as Ac, ignore as Ad, EnvironmentAuthorizationError as Af, DEFAULT_TERMINAL_ID as Ai, getPayloadSchemas as Al, PreviewAutomationTargetNotEditableError as An, EnvironmentAuthInvalidError as Ao, AuthSessionId as Ap, OrchestratorMcpListScheduledTasksResult as Ar, OrchestrationV2PlanArtifact as As, isWrapper as At, file as Au, ComputerUseHostResponse as B, PluginId as Ba, PullRequestState as Bc, text$1 as Bd, getStatusErrorSchema as Bf, TerminalWriteError as Bi, middleware as Bl, AssetAttachmentNotFoundError as Bn, EnvironmentHttpUnauthorizedError as Bo, ContextHandoffId as Bp, OrchestratorMcpThreadListInput as Br, OrchestrationV2RunAttemptJson as Bs, DesktopHostTelemetryMessage as Bt, setHeaders as Bu, clean as C, PreviewListResult as Ca, ProjectSearchEntriesError as Cc, HttpClientErrorSchema as Cd, AuthRelayReadScope as Cf, ExternalLauncherCommandNotFoundError as Ci, make$2 as Cl, PreviewAutomationSelectResult as Cn, DesktopAppActivationErrorCode as Co, isProviderDriverKind as Cp, OrchestratorMcpCreateThreadsResult as Cr, OrchestrationV2DispatchCommandResult as Cs, DesignStylesReceipt as Ct, ServeError as Cu, SelfImproveDecision as D, PreviewViewportSetting as Da, DEFAULT_PROVIDER_INTERACTION_MODE as Dc, isHttpClientError as Dd, AuthStandardClientScopes as Df, ExternalLauncherUnsupportedTargetError as Di, del as Dl, PreviewAutomationStatus as Dn, DESKTOP_UPDATE_RESTART_MARKER_FILE as Do, ASSISTANT_CITATION_MAX_COMMENT_LENGTH as Dp, OrchestratorMcpDeleteScheduledTaskResult as Dr, OrchestrationV2ExecutionNodeJson as Ds, make as Dt, HttpPlatform as Du, toBytes as E, PreviewTabId as Ea, StoredProjectIcon as Ec, TransportError as Ed, AuthSourceControlWriteScope as Ef, ExternalLauncherUnsupportedEditorError as Ei, reflect as El, PreviewAutomationSnapshot as En, DesktopBrowserEvent as Eo, ReviewCommentContextRecord as Ep, OrchestratorMcpDeleteScheduledTaskInput as Er, OrchestrationV2ExecutionNode as Es, DesignValidateRequest as Et, toResponse as Eu, COMPUTER_USE_MAX_OUTPUT_CHARS as F, McpRegistryRpcError as Fa, ThreadPullRequestLink as Fc, layerWeak as Fd, StreamSse as Ff, TerminalNotRunningError as Fi, normalize as Fl, PreviewAutomationUploadInput as Fn, EnvironmentHttpBadRequestError as Fo, ClientDeviceType as Fp, OrchestratorMcpTaskCancelInput as Fr, OrchestrationV2ProviderSessionJson as Fs, WorktreeMcpFailure as Ft, raw as Fu, clientRpcRequiredScopes as G, DeviceActionUnavailableError as Ga, resolvePullRequestAuthorFilter as Gc, WatchBackend as Gd, isStreamUint8Array as Gf, CodexSettings as Gi, make$6 as Gl, AssetProjectFaviconNotFoundError as Gn, EnvironmentScopeRequiredError as Go, IsoDateTime as Gp, OrchestratorMcpThreadSendResult as Gr, OrchestrationV2SearchThreadError as Gs, PREVIEW_AUTOMATION_SERVER_OPERATIONS as Gt, urlParams as Gu, ComputerUseOutput as H, mcpProviderSupport as Ha, PullRequestUnavailableError as Hc, urlParams$1 as Hd, getWithHeadersAnnotation as Hf, BackgroundActivityProfile as Hi, serve as Hl, AssetGitHubMediaUrlValidationError as Hn, EnvironmentOperationForbiddenError as Ho, DpopFailureReason as Hp, OrchestratorMcpThreadReadInput as Hr, OrchestrationV2RunStatus as Hs, ResourceMonitorCommand as Ht, stream as Hu, ComputerUseError as I, McpServerId as Ia, ThreadPullRequestLinkSource as Ic, isHttpBody as Id, asUint8Array as If, TerminalProviderEnvironmentError as Ii, HttpRouter as Il, PreviewAutomationWaitForInput as In, EnvironmentHttpCommonError as Io, ClientOs as Ip, OrchestratorMcpTaskCancelResult as Ir, OrchestrationV2ProviderThread as Is, WorktreeMcpHandoffInput as It, redirect as Iu, WsMcpRegistryProviderSignInCancelRpc as J, DeviceNotFoundError as Ja, SourceControlProviderError as Jc, PlatformError as Jd, withHeaders as Jf, DEFAULT_AUTOMATIC_GIT_FETCH_INTERVAL as Ji, isTracerDisabledUnsafe as Jl, AssetWorkspaceAssetInspectionError as Jn, RelayCloudMintCredentialProofPayload as Jo, NonNegativeInt as Jp, OrchestratorMcpUpdateScheduledTaskInput as Jr, OrchestrationV2StopWorkflowInput as Js, PreviewAutomationClickInput as Jt, fromWeb as Ju, RpcScopeAuthorization as K, DeviceBootError as Ka, SourceControlCloneRepositoryInput as Kc, make$16 as Kd, isWithHeaders as Kf, CompressMode as Ki, TracerDisabledWhen as Kl, AssetProjectFaviconResolutionError as Kn, RelayApi as Ko, MessageId as Kp, OrchestratorMcpThreadWaitInput as Kr, OrchestrationV2SearchThreadInput as Ks, PREVIEW_AUTOMATION_V1_OPERATIONS as Kt, TypeId$13 as Ku, ComputerUseHost as L, McpServerName as La, PullRequestLinkedThreadsResult as Lc, jsonUnsafe$1 as Ld, getPayloadEncoding as Lf, TerminalProviderInstanceNotFoundError as Li, RouteContext as Ll, SERVER_BROWSER_AUTOMATION_CLIENT_ID as Ln, EnvironmentHttpConflictError as Lo, ClientSurface as Lp, OrchestratorMcpTaskStatusInput as Lr, OrchestrationV2ProviderThreadJson as Ls, WorktreeMcpHandoffResult as Lt, removeHeader as Lu, SelfImproveResult as M, ResolvedKeybindingRule as Ma, RuntimeMode as Mc, layer$1 as Md, authScopeRequiredResponse as Mf, TerminalCwdNotFoundError as Mi, patch as Ml, PreviewAutomationTypeInput as Mn, EnvironmentAuthenticatedPrincipal as Mo, CheckpointRef as Mp, OrchestratorMcpRequestSecretResult as Mr, OrchestrationV2ProviderGoal as Ms, ClientAbort as Mt, isHttpServerResponse as Mu, COMPUTER_USE_DEFAULT_TIMEOUT_MS as N, SCRIPT_RUN_COMMAND_PATTERN as Na, ThreadLinkedPullRequest as Nc, report as Nd, authScopeResponse as Nf, TerminalCwdStatError as Ni, post as Nl, PreviewAutomationUnavailableError as Nn, EnvironmentCloudEndpointUnavailableError as No, CheckpointScopeId as Np, OrchestratorMcpScheduleTaskInput as Nr, OrchestrationV2ProviderRetry as Ns, getStreamSchemas as Nt, jsonUnsafe as Nu, SelfImproveError as O, KeybindingRule as Oa, DEFAULT_RUNTIME_MODE as Oc, CurrentErrorReporters as Od, AuthTerminalOperateScope as Of, ProviderSetupError as Oi, get as Ol, PreviewAutomationTabNotFoundError as On, DesktopBackendBootstrap as Oo, ASSISTANT_CITATION_MAX_TEXT_LENGTH as Op, OrchestratorMcpFailure as Or, OrchestrationV2GetShellSnapshotError as Os, ServerClient as Ot, make$12 as Ou, COMPUTER_USE_JEV_TAKE_CODE as P, THREAD_JUMP_KEYBINDING_COMMANDS as Pa, ThreadPullRequestKey as Pc, layer$2 as Pd, NoContent as Pf, TerminalHistoryError as Pi, put as Pl, PreviewAutomationUnsupportedClientError as Pn, EnvironmentHttpApi as Po, ClientConnectionMethod as Pp, OrchestratorMcpScheduleTaskResult as Pr, OrchestrationV2ProviderSession as Ps, isStreamSchema as Pt, mergeCookies as Pu, WsMcpRegistryProviderSignInWaitRpc as Q, DeviceToolCloseInput as Qa, VcsProcessExitError as Qc, make$17 as Qd, decode as Qf, GitHubHost as Qi, appendPreResponseHandlerUnsafe as Ql, AssetWorkspacePathValidationError as Qn, RelayManagedEndpointOrigin as Qo, ProjectId as Qp, ScheduledTaskWebhookDeliveryId as Qr, OrchestrationV2ThreadForkSourcePoint as Qs, PreviewAutomationDialogInput as Qt, inspect as Qu, ComputerUseHostRegistration as R, McpServerRuntimeState as Ra, PullRequestOperationError as Rc, raw$1 as Rd, getResponseEncoding as Rf, TerminalResizeError as Ri, add$1 as Rl, McpAppRequestError as Rn, EnvironmentHttpForbiddenError as Ro, ClientWebDeployment as Rp, OrchestratorMcpThreadInterruptInput as Rr, OrchestrationV2ProviderTurn as Rs, WorktreeMcpStatusResult as Rt, setBody as Ru, anumber as S, PreviewInvalidUrlError as Sa, ProjectSearchContentsError as Sc, HttpClientError as Sd, AuthProvidersManageScope as Sf, ExternalLauncherBrowserSpawnError as Si, isSecurity as Sl, PreviewAutomationSelectInput as Sn, resolveBrowserProfiles as So, defaultInstanceIdForDriver as Sp, OrchestratorMcpCreateThreadsInput as Sr, OrchestrationV2DispatchCommandError as Ss, DesignStatusRequest as St, ResponseError as Su, randomBytes as T, PreviewStreamHostSetup as Ta, ProjectWriteFileError as Tc, StatusCodeError as Td, AuthSettingsWriteScope as Tf, ExternalLauncherUnknownEditorError as Ti, make$3 as Tl, PreviewAutomationSetColorSchemeResult as Tn, DesktopBrowserCommand as To, OrchestrationMessageContext as Tp, OrchestratorMcpDelegateTaskResult as Tr, OrchestrationV2DomainEventJson as Ts, DesignValidateReceipt as Tt, symbol$1 as Tu, computerUseJevStepCode as U, resolveRegistryEntryEnabled as Ua, pullRequestHostOf as Uc, FileSystem as Ud, isNoContent as Uf, BackgroundActivityProfileSelection as Ui, use as Ul, AssetPreviewTypeValidationError as Un, EnvironmentRequestInvalidError as Uo, EnvironmentId as Up, OrchestratorMcpThreadReadResult as Ur, OrchestrationV2RuntimeRequest as Us, ResourceMonitorEvent as Ut, text as Uu, ComputerUseJsInput as V, RESERVED_MCP_SERVER_NAME as Va, PullRequestSummary as Vc, uint8Array$1 as Vd, getStatusSuccessSchema as Vf, AntigravitySettings as Vi, route as Vl, AssetCreateUrlInput as Vn, EnvironmentInternalError as Vo, ContextTransferId as Vp, OrchestratorMcpThreadListResult as Vr, OrchestrationV2RunJson as Vs, DesktopTelemetryControlMessage as Vt, setStatus as Vu, CLIENT_GUARDED_RPC_SCOPES as W, supportsProviderMcpSignIn as Wa, pullRequestProviderRequirement as Wc, FileTypeId as Wd, isStreamSchema$1 as Wf, ClaudeSettings as Wi, HttpServer as Wl, AssetProjectFaviconInspectionError as Wn, EnvironmentResourceNotFoundError as Wo, EventId as Wp, OrchestratorMcpThreadSendInput as Wr, OrchestrationV2RuntimeRequestJson as Ws, McpCapabilityUnavailableError as Wt, uint8Array as Wu, WsMcpRegistryProviderSignInStartRpc as X, DevicePlatformAvailability as Xa, SourceControlRepositoryError as Xc, isPlatformError as Xd, hasBody as Xf, DEFAULT_PROVIDER_HEALTH_REFRESH_INTERVAL as Xi, addHeaderAttributes as Xl, AssetWorkspaceContextNotFoundError as Xn, RelayEnvironmentLinkResponse as Xo, PortSchema as Xp, ScheduledTask as Xr, OrchestrationV2Subagent as Xs, PreviewAutomationControlInterruptedError as Xt, MaxBodySize as Xu, WsMcpRegistryProviderSignInCompleteRpc as Y, DeviceOperationError as Ya, SourceControlProviderKind as Yc, badArgument as Yd, allShort as Yf, DEFAULT_BACKGROUND_ACTIVITY_PROFILE as Yi, tracer as Yl, AssetWorkspaceAssetNotFoundError as Yn, RelayEnvironmentLinkChallengeResponse as Yo, PlanId as Yp, MIN_SCHEDULED_TASK_INTERVAL_MS as Yr, OrchestrationV2StoredEvent as Ys, PreviewAutomationClientDisconnectedError as Yt, matchStatus as Yu, WsMcpRegistryProviderSignInStateRpc as Z, DevicePlatformUnavailableError as Za, VcsDriverKind as Zc, systemError as Zd, Retry as Zf, DEFAULT_SERVER_SETTINGS as Zi, addUrlAttributes as Zl, AssetWorkspaceContextResolutionError as Zn, RelayHookDeliveryProofPayload as Zo, PositiveInt as Zp, ScheduledTaskError as Zr, OrchestrationV2SubagentJson as Zs, PreviewAutomationControlReason as Zt, TypeId$14 as Zu, sha512 as _, PREVIEW_STREAM_HOST_SETUP_CLOSE_CODE as _a, ProjectListEntriesError as _c, setHeader$1 as _d, AuthMcpRegistrationError as _f, environmentThemeFileHasColors as _i, PROVIDER_SEND_TURN_MAX_INPUT_CHARS as _l, merge as _m, PreviewAutomationRequestQueueClosedError as _n, resolveDecisionBackend as _o, PREFERRED_DEFAULT_CODEX_MODELS as _p, OrchestrationSearchThreadsResult as _r, OrchestrationV2ContextHandoffJson as _s, DesignLibraryManifest as _t, Path as _u, documentContentDigest as a, UsageLimitSourceConfig as aa, autoWorkspaceNoticeMessage as ac, bodyJson as ad, AuthAccessTokenType as af, GitCommandError as ai, VcsRepositoryDetectionError as al, RunId as am, PreviewAutomationMalformedResponseError as an, DeviceToolUnavailableError as ao, AcpRegistryProbeResult as ap, AgentSessionImportProjectChangedError as ar, fromApi as as, Service as at, schemaCookies as au, aexists as b, PreviewClearProfileError as ba, ProjectReadFileError as bc, make$15 as bd, AuthOrchestrationReadScope as bf, isProviderWorkspaceSnapshotCurrent as bi, isProviderSendTurnSupportedImageMimeType as bl, bytes as bm, PreviewAutomationResultTooLargeError as bn, INCOGNITO_BROWSER_PROFILE_ID as bo, ProviderInstanceId as bp, ThreadMetadataMcpUpdateResult as br, OrchestrationV2ConversationMessage as bs, DesignSelection as bt, HttpServerError as bu, parseDesign as c, makeProviderSettingsSchema as ca, isProviderNativeSubagentThread as cc, bodyText as cd, AuthClientMetadataDeviceType as cf, TextGenerationError as ci, OrchestrationGetFullThreadDiffError as cl, SecretRef as cm, PreviewAutomationOpenInput as cn, deviceToolInstallMessage as co, ANTIGRAVITY_DEFAULT_MODEL as cp, AgentSessionScanError as cr, AUTO_WORKSPACE_NOTICE_TITLE as cs, DesignRpcGroup as ct, toURL as cu, reviewState as d, requiredScopesForServerSettingsPatch as da, ToolActivityIcon as dc, get$1 as dd, AuthEnvironmentScopes as df, EnvironmentThemeFile as di, ChatAttachment as dl, TrimmedString as dm, PreviewAutomationRecordingDeadlineExpiredError as dn, DECISION_MODELS as do, DEFAULT_MODEL_BY_PROVIDER as dp, LEGACY_PROJECT_FILE_NAME as dr, ORCHESTRATION_V2_WS_METHODS as ds, DesignApplyReceipt as dt, isPersistedFile as du, ProjectSettingsOverrides as ea, OrchestrationV2ThreadLaunchRequestWorkspaceStrategy as ec, acceptJson as ed, ORCHESTRATION_PROTOCOL_HEADER as ef, ApplicationProjectEvent as ei, VcsProcessOutputLimitError as el, ProviderThreadId as em, PreviewAutomationError as en, DeviceToolListResult as eo, encoder$1 as ep, AssetWorkspaceRootNormalizationError as er, RelayManagedEndpointRecoveryResponse as es, WsRpcGroup as et, fromHeaders as eu, selectLayoutItems as f, resolveProjectProviderInstanceEnabled as fa, ToolActivityNativeAppReference as fc, make$14 as fd, AuthFilesystemReadScope as ff, EnvironmentThemeId as fi, ChatAttachmentId as fl, TurnItemId as fm, PreviewAutomationRecordingDesktopUpdateRequiredError as fn, DecisionError as fo, DEFAULT_TEXT_GENERATION_MODEL as fp, P4ProjectFile as fr, OrchestrationGetWorkflowScriptError as fs, DesignApplyRequest as ft, limitsServices as fu, sha384 as g, FILL_PREVIEW_VIEWPORT as ga, ProjectCreatePayload as gc, setBody$1 as gd, AuthMcpClientAccess as gf, ServerSelfUpdateError as gi, PROVIDER_SEND_TURN_MAX_IMAGE_BYTES as gl, fromRecordUnsafe as gm, PreviewAutomationRemoteUnavailableError as gn, ThreadDecisionsReadError as go, ModelCapabilities as gp, OrchestrationSearchThreadsInput as gr, OrchestrationV2CheckpointScopeJson as gs, DesignInspectRequest as gt, make$8 as gu, sha256$1 as h, secretSettingsFields as ha, Project as hc, put$1 as hd, AuthMcpApprovalError as hf, ServerProviderUpdateError as hi, PROVIDER_SEND_TURN_MAX_FILE_BYTES as hl, fromInput as hm, PreviewAutomationRecordingTransferError as hn, ThreadDecision as ho, MUSE_DEFAULT_MODEL as hp, OrchestrationSearchThreadsError as hr, OrchestrationV2CheckpointJson as hs, DesignInspectReceipt as ht, decodeField as hu, diagnostic as i, ServerSettingsPatch as ia, OrchestrationWorkflowFileError as ic, bodyFormData as id, AuthAccessStreamError as if, PROJECT_CLONE_ERROR_MAX_LENGTH as ii, VcsProcessTimeoutError as il, RunAttemptId as im, PreviewAutomationInvalidSelectorError as in, DeviceToolTargetInput as io, AcpRegistryOperationErrorReason as ip, AttachmentUploadSigningKeyError as ir, annotations as is, WORKTREE_SETUP_STAGE_ORDER as it, TypeId$8 as iu, SelfImproveRequest as j, MODEL_PICKER_JUMP_KEYBINDING_COMMANDS as ja, ProviderUserInputAnswers as jc, isIgnored as jd, ServerAuthSessionMethod as jf, TerminalCwdNotDirectoryError as ji, getSuccessSchemas as jl, PreviewAutomationTimeoutError as jn, EnvironmentAuthenticatedAuth as jo, CheckpointId as jp, OrchestratorMcpRequestSecretInput as jr, OrchestrationV2ProviderFailure as js, make$1 as jt, html as ju, SelfImproveEvidence as k, KeybindingsConfig as ka, ProviderApprovalDecision as kc, TypeId$17 as kd, AuthTerminalReadScope as kf, ProviderUploadFeedbackError as ki, getErrorSchemas as kl, PreviewAutomationTabTargetInput as kn, RelayClientInstallFailedError as ko, AssistantCitation as kp, OrchestratorMcpListScheduledTasksInput as kr, OrchestrationV2GetThreadProjectionError as ks, exitSchema as kt, empty as ku, patchNode as l, providerInstanceConfigEnabledFlag as la, latestProviderTurnForAttempt as lc, bodyUrlParams as ld, AuthDiagnosticsReadScope as lf, VcsListRefsInput as li, OrchestrationGetTurnDiffError as ll, ThreadId as lm, PreviewAutomationPressInput as ln, symbol as lo, CustomModelSetting as lp, AgentSessionSource as lr, AUTO_WORKSPACE_UNDECIDED_REASON as ls, DesignServiceError as lt, MultipartError as lu, validateDesign as m, secretSetting as ma, OrchestrationProjectShell as mc, prependUrl as md, AuthGrantScope as mf, ServerProviderCompatibilityStatus as mi, ChatImageAttachment as ml, empty$3 as mm, PreviewAutomationRecordingTooLargeError as mn, DecisionResult as mo, MODEL_SLUG_ALIASES_BY_PROVIDER as mp, PROJECT_FILE_BACKED_SETTINGS as mr, OrchestrationV2AppThreadJson as ms, DesignGuideRequest as mt, toPersisted as mu, canonicalSerialize as n, ServerSettings as na, OrchestrationV2TurnItem as nc, basicAuth as nd, ThreadEnvMode as nf, PullRequestReviewGuide as ni, VcsProcessSpawnError as nl, RawEventId as nm, PreviewAutomationExecutionError as nn, DeviceToolOpenResult as no, AcpRegistryListSessionsResult as np, AttachmentCreateUploadUrlResult as nr, RelayOkResponse as ns, SecretRequestError as nt, HttpServerRequest as nu, fileHash as o, isUnconfiguredDefaultInstanceEnabled as oa, isKnownOrchestrationV2EventType as oc, bodyJsonUnsafe as od, AuthAccessWriteScope as of, GitManagerError as oi, VcsUnsupportedOperationError as ol, RuntimeRequestId as om, PreviewAutomationNavigateInput as on, DeviceToolVersions as oo, officialAcpRegistryIconUrlForAgentId as op, AgentSessionImportProjectNotFoundError as or, getParamNames as os, UserInputRankError as ot, schemaHeaders as ou, semanticDiff as p, resolveProviderInstanceEnabled as pa, UsageLimitSourceError as pc, post$1 as pd, AuthFilesystemWriteScope as pf, ServerProvider as pi, ChatFileAttachment as pl, CurrentRedactedNames as pm, PreviewAutomationRecordingStatus as pn, DecisionInput as po, DEFAULT_TEXT_GENERATION_MODEL_BY_PROVIDER as pp, P4_PROJECT_FILE_NAME as pr, OrchestrationV2AppThread as ps, DesignGuideReceipt as pt, makeConfig as pu, WS_METHODS as q, DeviceHostUnavailableError as qa, SourceControlCloneRepositoryResult as qc, BadArgument as qd, isWithHeadersValue as qf, DATABASE_COMPACTION_RECOMMENDED_BYTES as qi, compression as ql, AssetSigningKeyLoadError as qn, RelayCloudEnvironmentHealthProofPayload as qo, NodeId as qp, OrchestratorMcpThreadWaitResult as qr, OrchestrationV2StopWorkflowError as qs, PREVIEW_RECORDING_STOP_TIMEOUT_MS as qt, filterStatusOk as qu, computeLayout as r, ServerSettingsError as ra, OrchestrationV2TurnItemJson as rc, bearerToken as rd, AuthAccessReadScope as rf, PullRequestReviewGuideRun as ri, VcsProcessStdinWriteError as rl, RpcClientId as rm, PreviewAutomationHoverInput as rn, DeviceToolScreenshotResult as ro, AcpRegistryOperationError as rp, AttachmentDeleteInput as rr, RelayProtectedError as rs, WORKTREE_SETUP_ERROR_MAX_LENGTH as rt, ParsedSearchParams as ru, isConfinedRelativePath as s, makeBinaryPathSetting as sa, isOrchestrationV2WorkActive as sc, bodyStream as sd, AuthAdministrativeScopes as sf, GitPullRequestMaterializationError as si, ModelSelection as sl, ScheduledTaskId as sm, PreviewAutomationNoAvailableHostError as sn, LOCAL_DEVICE_HOST_ID as so, resolveOfficialAcpRegistryIconUrl as sp, AgentSessionImportSource as sr, toRouterPath as ss, DesignHumanApplyRequest as st, schemaSearchParams as su, buildIndexes as t, ResponseStreamingMode as ta, OrchestrationV2ThreadShell as tc, appendUrlParams as td, ORCHESTRATION_PROTOCOL_QUERY_PARAM as tf, OrchestrationDispatchCommandError as ti, VcsProcessOutputReadError as tl, ProviderTurnId as tm, PreviewAutomationEvaluateInput as tn, DeviceToolOpenInput as to, AcpRegistryListProvidersResult as tp, AttachmentCreateUploadUrlInput as tr, RelayManagedEndpointRuntimeConfig as ts, WsSubscribeThreadDecisionsRpc as tt, toHeaders as tu, resolveValue as u, requiredScopesForProjectMutation as ua, orchestrationV2RunWorkStartedAt as uc, del$1 as ud, AuthEnvironmentMaintainScope as uf, VcsListRefsResult as ui, OrchestrationGetTurnDiffResult as ul, TrimmedNonEmptyString as um, PreviewAutomationRecordingArtifact as un, value as uo, DEFAULT_MODEL as up, FilesystemBrowseError as ur, ORCHESTRATION_V2_WORKSPACE_PREPARATION_FAILURE_CODE as us, DesignSubscribeRequest as ut, TypeId$9 as uu, Hash as v, PREVIEW_URL_MAX_LENGTH as va, ProjectMutation as vc, setHeaders$1 as vd, AuthMcpTokenError as vf, isProviderAvailable as vi, PersistChatAttachmentsError as vl, remove as vm, PreviewAutomationResizeInput as vn, BUILT_IN_BROWSER_PROFILES as vo, PROVIDER_DISPLAY_NAMES as vp, OrchestrationThreadSearchSource as vr, OrchestrationV2ContextTransfer as vs, DesignRenderReceipt as vt, TypeId$10 as vu, concatBytes as w, PreviewSessionLookupError as wa, ProjectUpdatePayload as wc, InvalidUrlError as wd, AuthRelayWriteScope as wf, ExternalLauncherEditorSpawnError as wi, getSlotParseOptions as wl, PreviewAutomationSetColorSchemeInput as wn, DesktopAppActivationResponse as wo, ComposerContextRecord as wp, OrchestratorMcpDelegateTaskInput as wr, OrchestrationV2DomainEvent as ws, DesignStylesRequest as wt, causeResponse as wu, ahash as x, PreviewControlRequiredError as xa, ProjectScript as xc, DecodeError as xd, AuthPreviewOperateScope as xf, EDITORS as xi, Service$1 as xl, fromInputUnsafe as xm, PreviewAutomationScrollInput as xn, findBrowserProfile as xo, ProviderInstanceMutation as xp, OrchestratorMcpCapabilitiesResult as xr, OrchestrationV2ConversationMessageJson as xs, DesignStatusReceipt as xt, RequestParseError as xu, abytes as y, PREVIEW_VIEWPORT_PRESET_IDS as ya, ProjectMutationError as yc, setUrl as yd, AuthOrchestrationOperateScope as yf, isProviderTextGenerationCapable as yi, getProviderAttachmentLimitError as yl, set as ym, PreviewAutomationResizeResult as yn, DEFAULT_BROWSER_PROFILE_ID as yo, ProviderDriverKind as yp, ThreadMetadataMcpUpdateInput as yr, OrchestrationV2ContextTransferJson as ys, DesignRenderRequest as yt, ClientAbort$1 as yu, ComputerUseHostReport as z, McpServerTransport as za, PullRequestStack as zc, stream$1 as zd, getResponseEncodingSchema as zf, TerminalSessionLookupError as zi, cors as zl, ATTACHMENT_UPLOAD_URL_TTL_MS as zn, EnvironmentHttpInternalServerError as zo, CommandId as zp, OrchestratorMcpThreadInterruptResult as zr, OrchestrationV2ProviderTurnJson as zs, UsageReadError as zt, setHeader as zu };
|
|
31078
|
+
export { WsMcpRegistryProviderSignOutRpc as $, DevicePlatformUnavailableError as $a, VcsDriverKind as $c, systemError as $d, Retry as $f, DEFAULT_SERVER_SETTINGS as $i, addUrlAttributes as $l, AssetWorkspaceContextResolutionError as $n, RelayHookDeliveryProofPayload as $o, PositiveInt as $p, ScheduledTaskError as $r, OrchestrationV2SubagentJson as $s, PreviewAutomationControlReason as $t, TypeId$14 as $u, SelfImproveLabel as A, KeybindingRule as Aa, DEFAULT_RUNTIME_MODE as Ac, CurrentErrorReporters as Ad, AuthTerminalOperateScope as Af, ProviderSetupError as Ai, get as Al, PreviewAutomationTabNotFoundError as An, DesktopBackendBootstrap as Ao, ASSISTANT_CITATION_MAX_TEXT_LENGTH as Ap, OrchestratorMcpFailure as Ar, OrchestrationV2GetShellSnapshotError as As, ServerClient as At, make$12 as Au, ComputerUseHostResponse as B, McpServerRuntimeState as Ba, PullRequestOperationError as Bc, raw$1 as Bd, getResponseEncoding as Bf, TerminalResizeError as Bi, add$1 as Bl, McpAppRequestError as Bn, EnvironmentHttpForbiddenError as Bo, ClientWebDeployment as Bp, OrchestratorMcpThreadInterruptInput as Br, OrchestrationV2ProviderTurn as Bs, WorktreeMcpStatusResult as Bt, setBody as Bu, clean as C, PreviewControlRequiredError as Ca, ProjectScript as Cc, DecodeError as Cd, AuthPreviewOperateScope as Cf, EDITORS as Ci, Service$1 as Cl, fromInputUnsafe as Cm, PreviewAutomationScrollInput as Cn, findBrowserProfile as Co, ProviderInstanceMutation as Cp, OrchestratorMcpCapabilitiesResult as Cr, OrchestrationV2ConversationMessageJson as Cs, DesignStatusReceipt as Ct, RequestParseError as Cu, SelfImproveDecision as D, PreviewStreamHostSetup as Da, ProjectWriteFileError as Dc, StatusCodeError as Dd, AuthSettingsWriteScope as Df, ExternalLauncherUnknownEditorError as Di, make$3 as Dl, PreviewAutomationSetColorSchemeResult as Dn, DesktopBrowserCommand as Do, OrchestrationMessageContext as Dp, OrchestratorMcpDelegateTaskResult as Dr, OrchestrationV2DomainEventJson as Ds, DesignValidateReceipt as Dt, symbol$1 as Du, toBytes as E, PreviewSessionLookupError as Ea, ProjectUpdatePayload as Ec, InvalidUrlError as Ed, AuthRelayWriteScope as Ef, ExternalLauncherEditorSpawnError as Ei, getSlotParseOptions as El, PreviewAutomationSetColorSchemeInput as En, DesktopAppActivationResponse as Eo, ComposerContextRecord as Ep, OrchestratorMcpDelegateTaskInput as Er, OrchestrationV2DomainEvent as Es, DesignStylesRequest as Et, causeResponse as Eu, COMPUTER_USE_MAX_OUTPUT_CHARS as F, SCRIPT_RUN_COMMAND_PATTERN as Fa, ThreadLinkedPullRequest as Fc, report as Fd, authScopeResponse as Ff, TerminalCwdStatError as Fi, post as Fl, PreviewAutomationUnavailableError as Fn, EnvironmentCloudEndpointUnavailableError as Fo, CheckpointScopeId as Fp, OrchestratorMcpScheduleTaskInput as Fr, OrchestrationV2ProviderRetry as Fs, getStreamSchemas as Ft, jsonUnsafe as Fu, clientRpcRequiredScopes as G, resolveRegistryEntryEnabled as Ga, pullRequestHostOf as Gc, FileSystem as Gd, isNoContent as Gf, BackgroundActivityProfileSelection as Gi, use as Gl, AssetPreviewTypeValidationError as Gn, EnvironmentRequestInvalidError as Go, EnvironmentId as Gp, OrchestratorMcpThreadReadResult as Gr, OrchestrationV2RuntimeRequest as Gs, ResourceMonitorEvent as Gt, text as Gu, ComputerUseOutput as H, PluginId as Ha, PullRequestState as Hc, text$1 as Hd, getStatusErrorSchema as Hf, TerminalWriteError as Hi, middleware as Hl, AssetAttachmentNotFoundError as Hn, EnvironmentHttpUnauthorizedError as Ho, ContextHandoffId as Hp, OrchestratorMcpThreadListInput as Hr, OrchestrationV2RunAttemptJson as Hs, DesktopHostTelemetryMessage as Ht, setHeaders as Hu, ComputerUseError as I, THREAD_JUMP_KEYBINDING_COMMANDS as Ia, ThreadPullRequestKey as Ic, layer$2 as Id, NoContent as If, TerminalHistoryError as Ii, put as Il, PreviewAutomationUnsupportedClientError as In, EnvironmentHttpApi as Io, ClientConnectionMethod as Ip, OrchestratorMcpScheduleTaskResult as Ir, OrchestrationV2ProviderSession as Is, isStreamSchema as It, mergeCookies as Iu, WsMcpRegistryProviderSignInCancelRpc as J, DeviceBootError as Ja, SourceControlCloneRepositoryInput as Jc, make$16 as Jd, isWithHeaders as Jf, CompressMode as Ji, TracerDisabledWhen as Jl, AssetProjectFaviconResolutionError as Jn, RelayApi as Jo, MessageId as Jp, OrchestratorMcpThreadWaitInput as Jr, OrchestrationV2SearchThreadInput as Js, PREVIEW_AUTOMATION_V1_OPERATIONS as Jt, TypeId$13 as Ju, RpcScopeAuthorization as K, supportsProviderMcpSignIn as Ka, pullRequestProviderRequirement as Kc, FileTypeId as Kd, isStreamSchema$1 as Kf, ClaudeSettings as Ki, HttpServer as Kl, AssetProjectFaviconInspectionError as Kn, EnvironmentResourceNotFoundError as Ko, EventId as Kp, OrchestratorMcpThreadSendInput as Kr, OrchestrationV2RuntimeRequestJson as Ks, McpCapabilityUnavailableError as Kt, uint8Array as Ku, ComputerUseHost as L, McpRegistryRpcError as La, ThreadPullRequestLink as Lc, layerWeak as Ld, StreamSse as Lf, TerminalNotRunningError as Li, normalize as Ll, PreviewAutomationUploadInput as Ln, EnvironmentHttpBadRequestError as Lo, ClientDeviceType as Lp, OrchestratorMcpTaskCancelInput as Lr, OrchestrationV2ProviderSessionJson as Ls, WorktreeMcpFailure as Lt, raw as Lu, SelfImproveResult as M, KeybindingsConfigError as Ma, ProviderInteractionMode as Mc, ignore as Md, EnvironmentAuthorizationError as Mf, DEFAULT_TERMINAL_ID as Mi, getPayloadSchemas as Ml, PreviewAutomationTargetNotEditableError as Mn, EnvironmentAuthInvalidError as Mo, AuthSessionId as Mp, OrchestratorMcpListScheduledTasksResult as Mr, OrchestrationV2PlanArtifact as Ms, isWrapper as Mt, file as Mu, COMPUTER_USE_DEFAULT_TIMEOUT_MS as N, MODEL_PICKER_JUMP_KEYBINDING_COMMANDS as Na, ProviderUserInputAnswers as Nc, isIgnored as Nd, ServerAuthSessionMethod as Nf, TerminalCwdNotDirectoryError as Ni, getSuccessSchemas as Nl, PreviewAutomationTimeoutError as Nn, EnvironmentAuthenticatedAuth as No, CheckpointId as Np, OrchestratorMcpRequestSecretInput as Nr, OrchestrationV2ProviderFailure as Ns, make$1 as Nt, html as Nu, SelfImproveError as O, PreviewTabId as Oa, StoredProjectIcon as Oc, TransportError as Od, AuthSourceControlWriteScope as Of, ExternalLauncherUnsupportedEditorError as Oi, reflect as Ol, PreviewAutomationSnapshot as On, DesktopBrowserEvent as Oo, ReviewCommentContextRecord as Op, OrchestratorMcpDeleteScheduledTaskInput as Or, OrchestrationV2ExecutionNode as Os, DesignValidateRequest as Ot, toResponse as Ou, COMPUTER_USE_JEV_TAKE_CODE as P, ResolvedKeybindingRule as Pa, RuntimeMode as Pc, layer$1 as Pd, authScopeRequiredResponse as Pf, TerminalCwdNotFoundError as Pi, patch as Pl, PreviewAutomationTypeInput as Pn, EnvironmentAuthenticatedPrincipal as Po, CheckpointRef as Pp, OrchestratorMcpRequestSecretResult as Pr, OrchestrationV2ProviderGoal as Ps, ClientAbort as Pt, isHttpServerResponse as Pu, WsMcpRegistryProviderSignInWaitRpc as Q, DevicePlatformAvailability as Qa, SourceControlRepositoryError as Qc, isPlatformError as Qd, hasBody as Qf, DEFAULT_PROVIDER_HEALTH_REFRESH_INTERVAL as Qi, addHeaderAttributes as Ql, AssetWorkspaceContextNotFoundError as Qn, RelayEnvironmentLinkResponse as Qo, PortSchema as Qp, ScheduledTask as Qr, OrchestrationV2Subagent as Qs, PreviewAutomationControlInterruptedError as Qt, MaxBodySize as Qu, ComputerUseHostRegistration as R, McpServerId as Ra, ThreadPullRequestLinkSource as Rc, isHttpBody as Rd, asUint8Array as Rf, TerminalProviderEnvironmentError as Ri, HttpRouter as Rl, PreviewAutomationWaitForInput as Rn, EnvironmentHttpCommonError as Ro, ClientOs as Rp, OrchestratorMcpTaskCancelResult as Rr, OrchestrationV2ProviderThread as Rs, WorktreeMcpHandoffInput as Rt, redirect as Ru, anumber as S, PreviewClearProfileError as Sa, ProjectReadFileError as Sc, make$15 as Sd, AuthOrchestrationReadScope as Sf, isProviderWorkspaceSnapshotCurrent as Si, isProviderSendTurnSupportedImageMimeType as Sl, bytes as Sm, PreviewAutomationResultTooLargeError as Sn, INCOGNITO_BROWSER_PROFILE_ID as So, ProviderInstanceId as Sp, ThreadMetadataMcpUpdateResult as Sr, OrchestrationV2ConversationMessage as Ss, DesignSelection as St, HttpServerError as Su, randomBytes as T, PreviewListResult as Ta, ProjectSearchEntriesError as Tc, HttpClientErrorSchema as Td, AuthRelayReadScope as Tf, ExternalLauncherCommandNotFoundError as Ti, make$2 as Tl, PreviewAutomationSelectResult as Tn, DesktopAppActivationErrorCode as To, isProviderDriverKind as Tp, OrchestratorMcpCreateThreadsResult as Tr, OrchestrationV2DispatchCommandResult as Ts, DesignStylesReceipt as Tt, ServeError as Tu, computerUseJevStepCode as U, RESERVED_MCP_SERVER_NAME as Ua, PullRequestSummary as Uc, uint8Array$1 as Ud, getStatusSuccessSchema as Uf, AntigravitySettings as Ui, route as Ul, AssetCreateUrlInput as Un, EnvironmentInternalError as Uo, ContextTransferId as Up, OrchestratorMcpThreadListResult as Ur, OrchestrationV2RunJson as Us, DesktopTelemetryControlMessage as Ut, setStatus as Uu, ComputerUseJsInput as V, McpServerTransport as Va, PullRequestStack as Vc, stream$1 as Vd, getResponseEncodingSchema as Vf, TerminalSessionLookupError as Vi, cors as Vl, ATTACHMENT_UPLOAD_URL_TTL_MS as Vn, EnvironmentHttpInternalServerError as Vo, CommandId as Vp, OrchestratorMcpThreadInterruptResult as Vr, OrchestrationV2ProviderTurnJson as Vs, UsageReadError as Vt, setHeader as Vu, CLIENT_GUARDED_RPC_SCOPES as W, mcpProviderSupport as Wa, PullRequestUnavailableError as Wc, urlParams$1 as Wd, getWithHeadersAnnotation as Wf, BackgroundActivityProfile as Wi, serve as Wl, AssetGitHubMediaUrlValidationError as Wn, EnvironmentOperationForbiddenError as Wo, DpopFailureReason as Wp, OrchestratorMcpThreadReadInput as Wr, OrchestrationV2RunStatus as Ws, ResourceMonitorCommand as Wt, stream as Wu, WsMcpRegistryProviderSignInStartRpc as X, DeviceNotFoundError as Xa, SourceControlProviderError as Xc, PlatformError as Xd, withHeaders as Xf, DEFAULT_AUTOMATIC_GIT_FETCH_INTERVAL as Xi, isTracerDisabledUnsafe as Xl, AssetWorkspaceAssetInspectionError as Xn, RelayCloudMintCredentialProofPayload as Xo, NonNegativeInt as Xp, OrchestratorMcpUpdateScheduledTaskInput as Xr, OrchestrationV2StopWorkflowInput as Xs, PreviewAutomationClickInput as Xt, fromWeb as Xu, WsMcpRegistryProviderSignInCompleteRpc as Y, DeviceHostUnavailableError as Ya, SourceControlCloneRepositoryResult as Yc, BadArgument as Yd, isWithHeadersValue as Yf, DATABASE_COMPACTION_RECOMMENDED_BYTES as Yi, compression as Yl, AssetSigningKeyLoadError as Yn, RelayCloudEnvironmentHealthProofPayload as Yo, NodeId as Yp, OrchestratorMcpThreadWaitResult as Yr, OrchestrationV2StopWorkflowError as Ys, PREVIEW_RECORDING_STOP_TIMEOUT_MS as Yt, filterStatusOk as Yu, WsMcpRegistryProviderSignInStateRpc as Z, DeviceOperationError as Za, SourceControlProviderKind as Zc, badArgument as Zd, allShort as Zf, DEFAULT_BACKGROUND_ACTIVITY_PROFILE as Zi, tracer as Zl, AssetWorkspaceAssetNotFoundError as Zn, RelayEnvironmentLinkChallengeResponse as Zo, PlanId as Zp, MIN_SCHEDULED_TASK_INTERVAL_MS as Zr, OrchestrationV2StoredEvent as Zs, PreviewAutomationClientDisconnectedError as Zt, matchStatus as Zu, sha512 as _, secretSettingsFields as _a, Project as _c, put$1 as _d, AuthMcpApprovalError as _f, ServerProviderUpdateError as _i, PROVIDER_SEND_TURN_MAX_FILE_BYTES as _l, fromInput as _m, PreviewAutomationRecordingTransferError as _n, ThreadDecision as _o, MUSE_DEFAULT_MODEL as _p, OrchestrationSearchThreadsError as _r, OrchestrationV2CheckpointJson as _s, DesignInspectReceipt as _t, decodeField as _u, documentContentDigest as a, ServerSettingsError as aa, OrchestrationV2TurnItemJson as ac, bearerToken as ad, AuthAccessReadScope as af, PullRequestReviewGuideRun as ai, VcsProcessStdinWriteError as al, RpcClientId as am, PreviewAutomationHoverInput as an, DeviceToolScreenshotResult as ao, AcpRegistryOperationError as ap, AttachmentDeleteInput as ar, RelayProtectedError as as, Service as at, ParsedSearchParams as au, aexists as b, PREVIEW_URL_MAX_LENGTH as ba, ProjectMutation as bc, setHeaders$1 as bd, AuthMcpTokenError as bf, isProviderAvailable as bi, PersistChatAttachmentsError as bl, remove as bm, PreviewAutomationResizeInput as bn, BUILT_IN_BROWSER_PROFILES as bo, PROVIDER_DISPLAY_NAMES as bp, OrchestrationThreadSearchSource as br, OrchestrationV2ContextTransfer as bs, DesignRenderReceipt as bt, TypeId$10 as bu, parseDesign as c, isUnconfiguredDefaultInstanceEnabled as ca, isKnownOrchestrationV2EventType as cc, bodyJsonUnsafe as cd, AuthAccessWriteScope as cf, GitManagerError as ci, VcsUnsupportedOperationError as cl, RuntimeRequestId as cm, PreviewAutomationNavigateInput as cn, DeviceToolVersions as co, officialAcpRegistryIconUrlForAgentId as cp, AgentSessionImportProjectNotFoundError as cr, getParamNames as cs, DesignListReceipt as ct, schemaHeaders as cu, reviewState as d, providerInstanceConfigEnabledFlag as da, latestProviderTurnForAttempt as dc, bodyUrlParams as dd, AuthDiagnosticsReadScope as df, VcsListRefsInput as di, OrchestrationGetTurnDiffError as dl, ThreadId as dm, PreviewAutomationPressInput as dn, symbol as do, CustomModelSetting as dp, AgentSessionSource as dr, AUTO_WORKSPACE_UNDECIDED_REASON as ds, DesignServiceError as dt, MultipartError as du, GitHubHost as ea, OrchestrationV2ThreadForkSourcePoint as ec, inspect as ed, make$17 as ef, ScheduledTaskWebhookDeliveryId as ei, VcsProcessExitError as el, ProjectId as em, PreviewAutomationDialogInput as en, DeviceToolCloseInput as eo, decode as ep, AssetWorkspacePathValidationError as er, RelayManagedEndpointOrigin as es, WsRpcGroup as et, appendPreResponseHandlerUnsafe as eu, selectLayoutItems as f, requiredScopesForProjectMutation as fa, orchestrationV2RunWorkStartedAt as fc, del$1 as fd, AuthEnvironmentMaintainScope as ff, VcsListRefsResult as fi, OrchestrationGetTurnDiffResult as fl, TrimmedNonEmptyString as fm, PreviewAutomationRecordingArtifact as fn, value as fo, DEFAULT_MODEL as fp, FilesystemBrowseError as fr, ORCHESTRATION_V2_WORKSPACE_PREPARATION_FAILURE_CODE as fs, DesignSubscribeRequest as ft, TypeId$9 as fu, sha384 as g, secretSetting as ga, OrchestrationProjectShell as gc, prependUrl as gd, AuthGrantScope as gf, ServerProviderCompatibilityStatus as gi, ChatImageAttachment as gl, empty$3 as gm, PreviewAutomationRecordingTooLargeError as gn, DecisionResult as go, MODEL_SLUG_ALIASES_BY_PROVIDER as gp, PROJECT_FILE_BACKED_SETTINGS as gr, OrchestrationV2AppThreadJson as gs, DesignGuideRequest as gt, toPersisted as gu, sha256$1 as h, resolveProviderInstanceEnabled as ha, UsageLimitSourceError as hc, post$1 as hd, AuthFilesystemWriteScope as hf, ServerProvider as hi, ChatFileAttachment as hl, CurrentRedactedNames as hm, PreviewAutomationRecordingStatus as hn, DecisionInput as ho, DEFAULT_TEXT_GENERATION_MODEL_BY_PROVIDER as hp, P4_PROJECT_FILE_NAME as hr, OrchestrationV2AppThread as hs, DesignGuideReceipt as ht, makeConfig as hu, diagnostic as i, ServerSettings as ia, OrchestrationV2TurnItem as ic, basicAuth as id, ThreadEnvMode as if, PullRequestReviewGuide as ii, VcsProcessSpawnError as il, RawEventId as im, PreviewAutomationExecutionError as in, DeviceToolOpenResult as io, AcpRegistryListSessionsResult as ip, AttachmentCreateUploadUrlResult as ir, RelayOkResponse as is, WORKTREE_SETUP_STAGE_ORDER as it, HttpServerRequest as iu, SelfImproveRequest as j, KeybindingsConfig as ja, ProviderApprovalDecision as jc, TypeId$17 as jd, AuthTerminalReadScope as jf, ProviderUploadFeedbackError as ji, getErrorSchemas as jl, PreviewAutomationTabTargetInput as jn, RelayClientInstallFailedError as jo, AssistantCitation as jp, OrchestratorMcpListScheduledTasksInput as jr, OrchestrationV2GetThreadProjectionError as js, exitSchema as jt, empty as ju, SelfImproveEvidence as k, PreviewViewportSetting as ka, DEFAULT_PROVIDER_INTERACTION_MODE as kc, isHttpClientError as kd, AuthStandardClientScopes as kf, ExternalLauncherUnsupportedTargetError as ki, del as kl, PreviewAutomationStatus as kn, DESKTOP_UPDATE_RESTART_MARKER_FILE as ko, ASSISTANT_CITATION_MAX_COMMENT_LENGTH as kp, OrchestratorMcpDeleteScheduledTaskResult as kr, OrchestrationV2ExecutionNodeJson as ks, make as kt, HttpPlatform as ku, patchNode as l, makeBinaryPathSetting as la, isOrchestrationV2WorkActive as lc, bodyStream as ld, AuthAdministrativeScopes as lf, GitPullRequestMaterializationError as li, ModelSelection as ll, ScheduledTaskId as lm, PreviewAutomationNoAvailableHostError as ln, LOCAL_DEVICE_HOST_ID as lo, resolveOfficialAcpRegistryIconUrl as lp, AgentSessionImportSource as lr, toRouterPath as ls, DesignListRequest as lt, schemaSearchParams as lu, validateDesign as m, resolveProjectProviderInstanceEnabled as ma, ToolActivityNativeAppReference as mc, make$14 as md, AuthFilesystemReadScope as mf, EnvironmentThemeId as mi, ChatAttachmentId as ml, TurnItemId as mm, PreviewAutomationRecordingDesktopUpdateRequiredError as mn, DecisionError as mo, DEFAULT_TEXT_GENERATION_MODEL as mp, P4ProjectFile as mr, OrchestrationGetWorkflowScriptError as ms, DesignApplyRequest as mt, limitsServices as mu, canonicalSerialize as n, ProjectSettingsOverrides as na, OrchestrationV2ThreadLaunchRequestWorkspaceStrategy as nc, acceptJson as nd, ORCHESTRATION_PROTOCOL_HEADER as nf, ApplicationProjectEvent as ni, VcsProcessOutputLimitError as nl, ProviderThreadId as nm, PreviewAutomationError as nn, DeviceToolListResult as no, encoder$1 as np, AssetWorkspaceRootNormalizationError as nr, RelayManagedEndpointRecoveryResponse as ns, SecretRequestError as nt, fromHeaders as nu, fileHash as o, ServerSettingsPatch as oa, OrchestrationWorkflowFileError as oc, bodyFormData as od, AuthAccessStreamError as of, PROJECT_CLONE_ERROR_MAX_LENGTH as oi, VcsProcessTimeoutError as ol, RunAttemptId as om, PreviewAutomationInvalidSelectorError as on, DeviceToolTargetInput as oo, AcpRegistryOperationErrorReason as op, AttachmentUploadSigningKeyError as or, annotations as os, UserInputRankError as ot, TypeId$8 as ou, semanticDiff as p, requiredScopesForServerSettingsPatch as pa, ToolActivityIcon as pc, get$1 as pd, AuthEnvironmentScopes as pf, EnvironmentThemeFile as pi, ChatAttachment as pl, TrimmedString as pm, PreviewAutomationRecordingDeadlineExpiredError as pn, DECISION_MODELS as po, DEFAULT_MODEL_BY_PROVIDER as pp, LEGACY_PROJECT_FILE_NAME as pr, ORCHESTRATION_V2_WS_METHODS as ps, DesignApplyReceipt as pt, isPersistedFile as pu, WS_METHODS as q, DeviceActionUnavailableError as qa, resolvePullRequestAuthorFilter as qc, WatchBackend as qd, isStreamUint8Array as qf, CodexSettings as qi, make$6 as ql, AssetProjectFaviconNotFoundError as qn, EnvironmentScopeRequiredError as qo, IsoDateTime as qp, OrchestratorMcpThreadSendResult as qr, OrchestrationV2SearchThreadError as qs, PREVIEW_AUTOMATION_SERVER_OPERATIONS as qt, urlParams as qu, computeLayout as r, ResponseStreamingMode as ra, OrchestrationV2ThreadShell as rc, appendUrlParams as rd, ORCHESTRATION_PROTOCOL_QUERY_PARAM as rf, OrchestrationDispatchCommandError as ri, VcsProcessOutputReadError as rl, ProviderTurnId as rm, PreviewAutomationEvaluateInput as rn, DeviceToolOpenInput as ro, AcpRegistryListProvidersResult as rp, AttachmentCreateUploadUrlInput as rr, RelayManagedEndpointRuntimeConfig as rs, WORKTREE_SETUP_ERROR_MAX_LENGTH as rt, toHeaders as ru, isConfinedRelativePath as s, UsageLimitSourceConfig as sa, autoWorkspaceNoticeMessage as sc, bodyJson as sd, AuthAccessTokenType as sf, GitCommandError as si, VcsRepositoryDetectionError as sl, RunId as sm, PreviewAutomationMalformedResponseError as sn, DeviceToolUnavailableError as so, AcpRegistryProbeResult as sp, AgentSessionImportProjectChangedError as sr, fromApi as ss, DesignHumanApplyRequest as st, schemaCookies as su, buildIndexes as t, PROJECT_SCOPED_SERVER_SETTING_KEYS as ta, OrchestrationV2ThreadLaunchError as tc, schemaBodyJson as td, ExecutionEnvironmentDescriptor as tf, ApplicationEventMetadata as ti, VcsProcessMissingExitCodeError as tl, ProviderSessionId as tm, PreviewAutomationDragInput as tn, DeviceToolError as to, decodeSchema as tp, AssetWorkspaceResolutionError as tr, RelayManagedEndpointRecoveryRegistrationResponse as ts, WsSubscribeThreadDecisionsRpc as tt, requestPreResponseHandlers as tu, resolveValue as u, makeProviderSettingsSchema as ua, isProviderNativeSubagentThread as uc, bodyText as ud, AuthClientMetadataDeviceType as uf, TextGenerationError as ui, OrchestrationGetFullThreadDiffError as ul, SecretRef as um, PreviewAutomationOpenInput as un, deviceToolInstallMessage as uo, ANTIGRAVITY_DEFAULT_MODEL as up, AgentSessionScanError as ur, AUTO_WORKSPACE_NOTICE_TITLE as us, DesignRpcGroup as ut, toURL as uu, Hash as v, FILL_PREVIEW_VIEWPORT as va, ProjectCreatePayload as vc, setBody$1 as vd, AuthMcpClientAccess as vf, ServerSelfUpdateError as vi, PROVIDER_SEND_TURN_MAX_IMAGE_BYTES as vl, fromRecordUnsafe as vm, PreviewAutomationRemoteUnavailableError as vn, ThreadDecisionsReadError as vo, ModelCapabilities as vp, OrchestrationSearchThreadsInput as vr, OrchestrationV2CheckpointScopeJson as vs, DesignInspectRequest as vt, make$8 as vu, concatBytes as w, PreviewInvalidUrlError as wa, ProjectSearchContentsError as wc, HttpClientError as wd, AuthProvidersManageScope as wf, ExternalLauncherBrowserSpawnError as wi, isSecurity as wl, PreviewAutomationSelectInput as wn, resolveBrowserProfiles as wo, defaultInstanceIdForDriver as wp, OrchestratorMcpCreateThreadsInput as wr, OrchestrationV2DispatchCommandError as ws, DesignStatusRequest as wt, ResponseError as wu, ahash as x, PREVIEW_VIEWPORT_PRESET_IDS as xa, ProjectMutationError as xc, setUrl as xd, AuthOrchestrationOperateScope as xf, isProviderTextGenerationCapable as xi, getProviderAttachmentLimitError as xl, set as xm, PreviewAutomationResizeResult as xn, DEFAULT_BROWSER_PROFILE_ID as xo, ProviderDriverKind as xp, ThreadMetadataMcpUpdateInput as xr, OrchestrationV2ContextTransferJson as xs, DesignRenderRequest as xt, ClientAbort$1 as xu, abytes as y, PREVIEW_STREAM_HOST_SETUP_CLOSE_CODE as ya, ProjectListEntriesError as yc, setHeader$1 as yd, AuthMcpRegistrationError as yf, environmentThemeFileHasColors as yi, PROVIDER_SEND_TURN_MAX_INPUT_CHARS as yl, merge as ym, PreviewAutomationRequestQueueClosedError as yn, resolveDecisionBackend as yo, PREFERRED_DEFAULT_CODEX_MODELS as yp, OrchestrationSearchThreadsResult as yr, OrchestrationV2ContextHandoffJson as ys, DesignLibraryManifest as yt, Path as yu, ComputerUseHostReport as z, McpServerName as za, PullRequestLinkedThreadsResult as zc, jsonUnsafe$1 as zd, getPayloadEncoding as zf, TerminalProviderInstanceNotFoundError as zi, RouteContext as zl, SERVER_BROWSER_AUTOMATION_CLIENT_ID as zn, EnvironmentHttpConflictError as zo, ClientSurface as zp, OrchestratorMcpTaskStatusInput as zr, OrchestrationV2ProviderThreadJson as zs, WorktreeMcpHandoffResult as zt, removeHeader as zu };
|
|
31031
31079
|
|
|
31032
|
-
//# sourceMappingURL=runtime-
|
|
31080
|
+
//# sourceMappingURL=runtime-DKclsP_7.mjs.map
|
package/package.json
CHANGED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{r as t}from"./Icon-l19w4AjM.js";import{$y as n,Kd as r,LT as i,NE as a,Yo as o,b_ as s,eh as c,hd as l,l as u,lE as d,n_ as f,nh as p,r_ as m,sr as h,t as g,vd as _}from"./utils-BAPnqm16.js";import{R as v,W as y}from"./runtime-B9IDNXDU.js";import{n as b,s as x,t as ee}from"./environments-iW64jjyO.js";import{f as S}from"./server-CoH7V4JL.js";import{i as te,n as C}from"./session-Bo2ZSprC.js";import{n as w}from"./query-B1uAr_ii.js";import{t as T}from"./use-atom-command-GpCw1tWF.js";import{L as ne,f as re}from"./useSettings-CKA-LDDj.js";import{n as E,t as D}from"./radio-group-CFJMQH66.js";import{t as ie}from"./input-83N8btBC.js";import{a as ae,c as O,i as oe,r as se,s as ce,t as le}from"./dialog-DYFQxVoN.js";import{x as k}from"./Icons-BYSK3arN.js";import{t as ue}from"./preview-ITad1JAy.js";import{S as A,t as de}from"./ChatGptUsageButton-Bda8Ir5S.js";import{a as j}from"./settingsLayout-CqGfrbmD.js";import{Aa as M,Fa as N,Ki as fe,Ma as pe,Pa as me,fr as P,ja as he,ka as F,qi as ge}from"./main-lV-t-UZx.js";var I=e(t(),1),L=a(),R=e(d(),1);function z(e){let t=(0,L.c)(7),n,r;t[0]===e?(n=t[1],r=t[2]):({children:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,R.jsx)(k,{className:`size-4 shrink-0`,"aria-hidden":`true`}),t[3]=i):i=t[3];let a=n??`Continue with ChatGPT`,o;return t[4]!==r||t[5]!==a?(o=(0,R.jsxs)(h,{...r,children:[i,a]}),t[4]=r,t[5]=a,t[6]=o):o=t[6],o}function _e(e){let t=(0,L.c)(23),{open:n,methods:r,onClose:i,onSelect:a}=e,o=r.filter(ye),[s,c]=(0,I.useState)(null),l=s===`chatgpt-change-account`?s:o.find(e=>e.id===s)?.id??o[0]?.id??`chatgpt-change-account`,u=le,d;t[0]===i?d=t[1]:(d=e=>{e||i()},t[0]=i,t[1]=d);let f=ce,p;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,R.jsxs)(ae,{children:[(0,R.jsx)(O,{children:`Reconnect ChatGPT`}),(0,R.jsx)(se,{children:`On OpenAI, sign in with the account you choose here.`})]}),t[2]=p):p=t[2];let m=E,h;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(h=e=>c(e),t[3]=h):h=t[3];let g=o.map(ve),_;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,R.jsxs)(`label`,{className:`flex cursor-pointer items-center gap-3 rounded-lg border px-3 py-3 text-sm`,children:[(0,R.jsx)(D,{value:`chatgpt-change-account`}),(0,R.jsx)(`span`,{className:`font-medium`,children:`Use a different account`})]}),t[4]=_):_=t[4];let v;t[5]!==m||t[6]!==l||t[7]!==h||t[8]!==g?(v=(0,R.jsx)(`div`,{className:`px-6 pb-6`,children:(0,R.jsxs)(m,{"aria-label":`ChatGPT account to connect`,value:l,onValueChange:h,children:[g,_]})}),t[5]=m,t[6]=l,t[7]=h,t[8]=g,t[9]=v):v=t[9];let y;t[10]!==a||t[11]!==l?(y=(0,R.jsx)(oe,{children:(0,R.jsx)(z,{onClick:()=>a(l)})}),t[10]=a,t[11]=l,t[12]=y):y=t[12];let b;t[13]!==f||t[14]!==p||t[15]!==v||t[16]!==y?(b=(0,R.jsxs)(f,{children:[p,v,y]}),t[13]=f,t[14]=p,t[15]=v,t[16]=y,t[17]=b):b=t[17];let x;return t[18]!==u||t[19]!==n||t[20]!==d||t[21]!==b?(x=(0,R.jsx)(u,{open:n,onOpenChange:d,children:b}),t[18]=u,t[19]=n,t[20]=d,t[21]=b,t[22]=x):x=t[22],x}function ve(e){return(0,R.jsxs)(`label`,{className:`flex cursor-pointer items-center gap-3 rounded-lg border px-3 py-3 text-sm`,children:[(0,R.jsx)(D,{value:e.id}),(0,R.jsx)(`span`,{className:`min-w-0 break-all font-medium`,children:e.name})]},e.id)}function ye(e){return e.id.startsWith(`chatgpt-profile:`)}function be(e){let t=(0,L.c)(36),{environmentId:n,onClose:r,renderSetup:i,onAccountCreated:a}=e,c=te(n,s),l=re(n),d;t[0]===n?d=t[1]:(d=S.providersValueAtom(n),t[0]=n,t[1]=d);let p=o(d),g=T(S.updateSettings,`Add ChatGPT account`),[_,v]=(0,I.useState)(`Personal`),y;t[2]===_?y=t[3]:(y=_.trim(),t[2]=_,t[3]=y);let b=`ChatGPT - ${y}`,[x,ee]=(0,I.useState)(null),[w,ne]=(0,I.useState)(!1),E=p?.find(e=>e.instanceId===x),D=A(E),ae=(0,I.useEffectEvent)(r);(0,I.useEffect)(()=>{D&&ae()},[D]);let O;t[4]!==b||t[5]!==n||t[6]!==_||t[7]!==a||t[8]!==r||t[9]!==w||t[10]!==l||t[11]!==g?(O=async()=>{if(w||!_.trim()||!C(n,`providers:manage`))return;ne(!0);let e=m.make(`codex_${u()}`);(await g({environmentId:n,input:{patch:{providerInstances:{...l.providerInstances,[e]:{driver:f.make(`codex`),displayName:b,enabled:!0,config:{enabled:!0,setupMode:`managed`}}}}}}))._tag===`Success`&&(a?(a(e,b),r()):ee(e)),ne(!1)},t[4]=b,t[5]=n,t[6]=_,t[7]=a,t[8]=r,t[9]=w,t[10]=l,t[11]=g,t[12]=O):O=t[12];let oe=O,se=le,ce=!D,k;t[13]===r?k=t[14]:(k=e=>{e||r()},t[13]=r,t[14]=k);let ue=pe,de=x?b:`Add ChatGPT account`,N;t[15]===de?N=t[16]:(N=(0,R.jsx)(M,{title:de,description:`Each account has its own Codex instance and sign-in. Choose the other account on the sign-in page.`}),t[15]=de,t[16]=N);let fe=he,me=x?E?.setup?i(x,E):(0,R.jsx)(j,{title:`Codex runtime`,description:`Preparing managed setup.`}):(0,R.jsx)(`form`,{id:`add-codex-account`,onSubmit:e=>{e.preventDefault(),oe()},children:(0,R.jsx)(j,{title:`Account name`,description:`Shown in the provider list and model picker.`,control:(0,R.jsx)(ie,{"aria-label":`Account name`,value:_,disabled:w,onChange:e=>v(e.target.value),placeholder:`e.g. Personal or Work`})})}),P;t[17]!==fe||t[18]!==me?(P=(0,R.jsx)(fe,{children:me}),t[17]=fe,t[18]=me,t[19]=P):P=t[19];let ge;t[20]!==c||t[21]!==x||t[22]!==_||t[23]!==r||t[24]!==w?(ge=(0,R.jsx)(F,{children:x?(0,R.jsx)(h,{variant:`outline`,onClick:r,children:`Finish later`}):(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(h,{variant:`outline`,disabled:w,onClick:r,children:`Cancel`}),(0,R.jsx)(h,{type:`submit`,form:`add-codex-account`,disabled:w||!_.trim()||!c,children:w?`Adding account…`:`Continue`})]})}),t[20]=c,t[21]=x,t[22]=_,t[23]=r,t[24]=w,t[25]=ge):ge=t[25];let z;t[26]!==ue||t[27]!==P||t[28]!==ge||t[29]!==N?(z=(0,R.jsxs)(ue,{size:`wide`,children:[N,P,ge]}),t[26]=ue,t[27]=P,t[28]=ge,t[29]=N,t[30]=z):z=t[30];let _e;return t[31]!==se||t[32]!==z||t[33]!==ce||t[34]!==k?(_e=(0,R.jsx)(se,{open:ce,onOpenChange:k,children:z}),t[31]=se,t[32]=z,t[33]=ce,t[34]=k,t[35]=_e):_e=t[35],_e}var xe=n(c),Se=n(p),Ce=/^[A-Za-z0-9_./:\\-]+$/;function we(e,t,n){return Ce.test(e)&&(n===`windows`||!e.includes(`\\`))?e:n===`windows`?`& '${e.replaceAll(`'`,`''`)}'`:n===`darwin`||n===`linux`?e.startsWith(`~/`)||e.startsWith(`~\\`)?`~/'${e.slice(2).replaceAll(`'`,`'"'"'`)}'`:`'${e.replaceAll(`'`,`'"'"'`)}'`:t}function Te(e){return e===void 0?`checking`:!e.enabled||e.status===`disabled`?`disabled`:!e.installed&&e.status===`warning`&&e.auth.status===`unknown`?`checking`:e.installed?e.auth.status===`unauthenticated`?`signIn`:e.status===`ready`?`ready`:`attention`:`install`}var B={checking:0,disabled:1,install:2,attention:3,signIn:4,ready:5};function V(e){let t=new Map;for(let n of e??[]){let e=t.get(n.driver);(e===void 0||B[Te(n)]>B[Te(e)])&&t.set(n.driver,n)}return t}var Ee={claudeAgent:{windows:`irm https://claude.ai/install.ps1 | iex`,posix:`curl -fsSL https://claude.ai/install.sh | bash`},codex:{windows:`irm https://chatgpt.com/codex/install.ps1 | iex`,posix:`curl -fsSL https://chatgpt.com/codex/install.sh | sh`}};function De(e,t){let n=Ee[e];return t===`windows`?n.windows:n.posix}function Oe(e,t,n){let r=t.providerInstances[e.instanceId];if(e.driver===`claudeAgent`){let e=xe(r?.config??{});return`${we(i(e)?e.value.binaryPath:`claude`,`claude`,n)} auth login`}if(e.driver===`codex`){let e=Se(r?.config??{});return`${we(i(e)?e.value.binaryPath:`codex`,`codex`,n)} login`}return e.driver}var ke={disabled:{dot:`bg-muted-foreground/50`},error:{dot:`bg-destructive`},ready:{dot:`bg-success`},warning:{dot:`bg-warning`}};function H(e){if(!e)return{headline:`Checking provider status`,detail:`Waiting for the server to report installation and authentication details.`};if(!e.enabled||e.status===`disabled`)return{headline:`Disabled`,detail:e.message??`This provider is installed but disabled for new sessions in P4 Code.`};if(!e.installed)return{headline:`Not found`,detail:e.message??`CLI not detected on PATH.`};if(e.auth.status===`unauthenticated`){let t=e.auth.label??e.auth.type;return{headline:t?`Not authenticated · ${t}`:`Not authenticated`,detail:e.message??null}}if(e.status===`warning`)return{headline:`Needs attention`,detail:e.message??`The provider is installed, but the server could not fully verify it.`};if(e.status===`error`)return{headline:`Unavailable`,detail:e.message??`The provider failed its startup checks.`};if(e.auth.status===`authenticated`){let t=e.auth.label??e.auth.type;return{headline:t?`Authenticated · ${t}`:`Authenticated`,detail:e.message??null}}return{headline:`Available`,detail:e.message??null}}function U(e){if(!e)return null;let t=/^agy_acp_server_(\d{4})(\d{2})(\d{2})_\d+(?:_(\w+))?$/.exec(e);if(t){let[,e,n,r,i]=t;return`${e}-${n}-${r}${i?` ${i}`:``}`}return/^\d/.test(e)?`v${e}`:e}var Ae={graceful:`Limited support`,unsupported:`Unsupported version`,broken:`Known broken version`};function je(e,t,n=!0){let r=t?.latestVersionStatus===`broken`||t?.latestVersionStatus===`unsupported`;if(n&&t&&(t.status===`graceful`||t.status===`unsupported`||t.status===`broken`)){let n=t.recommendedVersion,i=U(n)??t.recommendedRange;return{title:Ae[t.status],detail:t.message??(i?`Use ${i} for full support.`:`Update for full support.`),updateCommand:n||r?null:e?.updateCommand??null,emphasis:t.status===`graceful`?`normal`:`strong`,targetVersion:n}}if(!e||e.status===`current`||e.status===`unknown`||r)return null;let i=`Update available`,a=e.latestVersion,o=U(a);return{title:i,detail:e.message??(o?`${i}: install ${o}.`:`${i}: install the latest provider version.`),updateCommand:e.updateCommand,emphasis:`normal`,targetVersion:null}}var Me=()=>void 0;function Ne(e){let t=(0,L.c)(11),[n,r]=(0,I.useState)(!1),i;t[0]===e.provider?i=t[1]:(i=Te(e.provider),t[0]=e.provider,t[1]=i);let a=i,o=e.enabled&&a===`ready`,s=e.provider?.auth.status===`authenticated`,c=a===`checking`,u;t[2]===e.provider?u=t[3]:(u=H(e.provider),t[2]=e.provider,t[3]=u);let d=u,f;return t[4]!==s||t[5]!==c||t[6]!==o||t[7]!==d||t[8]!==e||t[9]!==n?(f=e.mode===`existing`&&e.presentation===`onboarding`?(0,R.jsx)(Le,{title:e.displayName||e.provider?.displayName||`Codex`,description:o?e.provider?.auth.email?.trim()?(0,R.jsxs)(R.Fragment,{children:[`Signed in as`,` `,(0,R.jsx)(P,{value:e.provider.auth.email.trim(),ariaLabel:`Toggle account email visibility`,revealTooltip:`Click to reveal email`,hideTooltip:`Click to hide email`,className:`break-all`}),`.`]}):`Connected with your Codex CLI.`:c?`Checking your Codex CLI...`:e.provider?.installed?d.headline:`Code with your ChatGPT subscription.`,control:o?(0,R.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 text-xs font-medium text-success-foreground`,children:[(0,R.jsx)(l,{className:`size-3.5`}),`Ready`]}):c?(0,R.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`Checking...`}):s?(0,R.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:d.headline}):(0,R.jsx)(z,{size:`sm`,disabled:e.readOnly,onClick:()=>{r(!0),e.onModeChange(`managed`)},children:`Continue with ChatGPT`}),secondaryControl:!s&&!o&&!c?(0,R.jsx)(h,{size:`sm`,variant:`ghost-muted`,onClick:()=>e.onModeChange(`existing`),children:`Use existing CLI`}):null}):e.mode===`existing`?null:e.provider?.setup===void 0?e.presentation===`onboarding`?(0,R.jsx)(Le,{title:e.displayName||e.provider?.displayName||`Codex`,description:(0,R.jsx)(Ie,{}),control:(0,R.jsx)(h,{size:`sm`,variant:`outline`,className:`min-w-44`,disabled:!0,children:`Open sign-in page`}),secondaryControl:(0,R.jsx)(h,{size:`sm`,variant:`ghost-muted`,disabled:!0,children:`Cancel`})}):(0,R.jsx)(j,{title:`ChatGPT account`,description:`Preparing sign-in.`}):(0,R.jsx)(Fe,{...e,autoStart:n||e.autoStart===!0,onAutoStartConsumed:()=>{r(!1),e.onAutoStartConsumed?.()}},`${e.environmentId}:${e.instanceId}`),t[4]=s,t[5]=c,t[6]=o,t[7]=d,t[8]=e,t[9]=n,t[10]=f):f=t[10],f}function Pe(e){let t=(0,L.c)(9),{environmentId:n,onClose:r,onAccountCreated:i}=e,a=te(n,s),o;t[0]!==a||t[1]!==n||t[2]!==r?(o=(e,t)=>(0,R.jsx)(Fe,{environmentId:n,instanceId:e,provider:t,mode:`managed`,enabled:!0,readOnly:!a,autoStart:!0,onAutoStartConsumed:Me,onModeChange:Me,onSignInCancelled:r,allowExistingCli:!1},e),t[0]=a,t[1]=n,t[2]=r,t[3]=o):o=t[3];let c;return t[4]!==n||t[5]!==i||t[6]!==r||t[7]!==o?(c=(0,R.jsx)(be,{environmentId:n,onClose:r,onAccountCreated:i,renderSetup:o}),t[4]=n,t[5]=i,t[6]=r,t[7]=o,t[8]=c):c=t[8],c}function Fe({environmentId:e,instanceId:t,provider:n,enabled:i,readOnly:a,onModeChange:o,autoStart:s,onAutoStartConsumed:c,allowExistingCli:u=!0,presentation:d,displayName:f,onSignInCancelled:p}){let m={environmentId:e,input:{instanceId:t}},_=w(S.providerAuthState(m)),te=w(S.providerInstallState(m)),[C,re]=(0,I.useState)(null),E=w(C?S.chatGptHandoffState(C):null),D=E.data?.phase===`auth`?E.data.state:_.data,[ae,O]=(0,I.useState)(!1),[oe,se]=(0,I.useState)(`chatgpt`),ce=D?.methods?.find(e=>e.id===`chatgpt`)?.accountEmail,le=D?.methods?.find(e=>e.id===oe)?.accountEmail,k=D?.methods?.some(e=>e.id.startsWith(`chatgpt-profile:`)),A=D?.interaction?.type===`browser`?D.interaction.url:D?.authorizationUrl,M=te.data,pe=b(e),he=pe!==null&&ue(new URL(pe).hostname),F={reportFailure:!1,reportDefect:!1},L=T(S.startProviderAuth,F),ve=T(S.refreshProviders,F),ye=T(S.completeProviderAuth,F),be=T(S.cancelProviderAuth,F),xe=T(S.logoutProviderAuth,F),Se=T(S.startProviderInstall,F),Ce=T(S.cancelProviderInstall,F),we=T(S.chatGptReconnectProfile,F),Te=T(S.chatGptImportProfile,F),B=!C&&(!he||window.desktopBridge?.receiveProviderAuthCallback!==void 0),V=B&&!window.desktopBridge?.receiveProviderAuthCallback,Ee=x(),De=ee(Ee),Oe=b(Ee),ke=!he&&Ee&&De?.connection.phase===`connected`&&Oe&&ue(new URL(Oe).hostname)&&(window.desktopBridge!==void 0||ue(window.location.hostname))?Ee:null,H=new URL(window.location.href);H.pathname===`/welcome`&&(H.hash=`agents:${e}`),H.pathname===`/settings/providers`&&H.searchParams.set(`instanceId`,t);let U=V,Ae=(0,I.useId)(),[je,Me]=(0,I.useState)(!1),[Ne,Pe]=(0,I.useState)({flowId:``,value:``}),Fe=Ne.flowId===D?.flowId?Ne.value:``,[W,Re]=(0,I.useState)(!1),[ze,Be]=(0,I.useState)(null),Ve=(0,I.useRef)(!1),[He,Ue]=(0,I.useState)(null),G=(0,I.useRef)(null),K=(0,I.useRef)(!1),We=(0,I.useRef)(null),[Ge,Ke]=(0,I.useState)(!1),q=M?.installedVersion!=null,J=n?.auth.status===`authenticated`,qe=q&&M?.source!==`local`&&M?.version!=null&&M.version!==M.installedVersion,Je=ze!==null&&!J&&(D?.phase===`succeeded`||ze===`handoff`);(0,I.useEffect)(()=>{(J||D?.phase===`failed`||D?.phase===`cancelled`)&&Be(null)},[J,D?.phase]),(0,I.useEffect)(()=>{ze&&D?.phase===`succeeded`&&ve({environmentId:e,input:{instanceId:t}})},[ze,D?.phase,ve,e,t]);let Ye=s&&!Ge,Xe=ze===`sign-in`&&!J&&(D===null||D.phase===`idle`),Ze=Je||Xe||C!==null||D?.phase===`starting`||D?.phase===`waiting`||D?.phase===`verifying`,Y=M?.phase===`downloading`||M?.phase===`extracting`||M?.phase===`verifying`,X=Ye||Ze||W&&!Y,Z=a||!i||W||_.error!==null||te.error!==null,Q=W||Ze||Y,$=(0,I.useCallback)(async(e,t)=>{if(Ve.current)return!1;Ve.current=!0,Re(!0),Ue(null);let n=!1;try{let r=await e();if(r._tag===`Failure`){if(!v(r)){let e=y(r);Ue(e instanceof Error?e.message:`Codex setup failed. Try again.`)}}else n=!0,t?.(r.value)}catch{Ue(`Codex setup failed. Try again.`)}return Ve.current=!1,Re(!1),n},[]),Qe=(0,I.useId)(),$e=(0,I.useRef)(0),et=(0,I.useRef)(null),[tt,nt]=(0,I.useState)(!1),rt=(0,I.useCallback)(async n=>{let r=await $(()=>Te({environmentId:e,input:{instanceId:t,profile:n}}));r&&(Be(`handoff`),re(null)),nt(!r)},[$,Te,e,t]);(0,I.useEffect)(()=>{if(!C||E.data?.phase!==`finished`)return;let e=C.input.attemptId;et.current!==e&&(et.current=e,rt(E.data.profile))},[C,E.data,rt]),(0,I.useEffect)(()=>{C&&(E.error||E.data?.phase===`auth`&&[`failed`,`cancelled`].includes(E.data.state.phase))&&(Ue(E.data?.phase===`auth`?E.data.state.message??`ChatGPT sign-in could not finish. Try again.`:`ChatGPT sign-in on the primary environment was interrupted. Try again.`),re(null))},[C,E.data,E.error]);let it=(0,I.useCallback)(()=>(Be(null),C?(re(null),Promise.resolve()):$(()=>be({environmentId:e,input:{instanceId:t,flowId:D.flowId}}))),[C,$,be,e,t,D]),at=(0,I.useCallback)(async(n=`chatgpt`)=>{if(Ve.current)return;K.current=!0,nt(!1),se(n);let r=new URL(window.location.href);if(r.pathname===`/welcome`&&(r.hash=`agents:${e}`),r.pathname===`/settings/providers`&&r.searchParams.set(`instanceId`,t),ke){let i=`${Qe}:${++$e.current}`;await $(()=>we({environmentId:e,input:{instanceId:t,methodId:n}}),n=>re({environmentId:ke,input:{instanceId:t,environmentId:e,attemptId:i,returnUrl:r.toString(),profile:n}}))||(K.current=!1);return}await $(()=>L({environmentId:e,input:{instanceId:t,methodId:n,returnUrl:r.toString(),callbackMode:B?`client`:`server`}}),()=>Be(`sign-in`))||(K.current=!1)},[e,t,$,L,B,ke,we,Qe]),ot=(0,I.useCallback)(async(n=`chatgpt`)=>{Z||Q||(q&&!qe?await at(n):(G.current=n,await $(()=>Se({environmentId:e,input:{instanceId:t}}))||(G.current=null)))},[Z,Q,q,qe,at,$,Se,e,t]);(0,I.useEffect)(()=>{!s||Ge||Z||Q||M===null||!n?.setup?.canInstall||(Ke(!0),c(),ot())},[s,Ge,Z,Q,M,n?.setup?.canInstall,c,ot]),(0,I.useEffect)(()=>{if(!(!G.current||W||Y)){if(M?.phase===`failed`||M?.phase===`cancelled`)G.current=null;else if(q){let e=G.current;G.current=null,at(e)}}},[W,Y,M?.phase,q,at]);let st=(0,I.useRef)(null),ct=D?.flowId,lt=(0,I.useCallback)(async n=>{try{let r=window.desktopBridge?.receiveProviderAuthCallback;if(r&&B&&ct){if(st.current===n){await ne().shell.openExternal(n);return}st.current=n;let i=await r(n);if(st.current!==n)return;st.current=null,await $(()=>ye({environmentId:e,input:{instanceId:t,flowId:ct,callbackUrl:i}}))}else await ne().shell.openExternal(n)}catch{Ue(`Could not finish sign-in on this computer. Try again or paste the redirect URL below.`)}},[B,ct,$,ye,e,t]);(0,I.useEffect)(()=>{if(B&&A&&window.desktopBridge?.cancelProviderAuthCallback)return()=>{st.current===A&&(st.current=null),window.desktopBridge?.cancelProviderAuthCallback?.(A).catch(()=>void 0)}},[B,A]),(0,I.useEffect)(()=>{K.current&&D?.phase===`waiting`&&D.flowId&&A&&We.current!==D.flowId&&(We.current=D.flowId,K.current=!1,V||lt(A))},[D?.phase,D?.flowId,A,lt,V]);let ut=M?.phase===`downloading`?`Downloading ${(M.downloadedBytes/1e6).toFixed(1)}${M.totalBytes===null?``:` of ${(M.totalBytes/1e6).toFixed(1)}`} MB.`:M?.phase===`extracting`?`Installing Codex.`:M?.phase===`verifying`?`Checking Codex.`:q?`${M?.source===`local`?`Using your installed Codex`:`Managed by P4 Code`}${M?.installedVersion?` · v${M.installedVersion}`:``}.`:M?.message??`P4 Code downloads and manages Codex for you.`,dt=Je?`Finishing sign-in...`:Y?ut:X||D?.phase===`failed`||D?.phase===`cancelled`?D?.phase===`waiting`&&le?`Continue as ${le} on OpenAI.`:D?.message??`Finish signing in in your browser.`:J?n?.auth.email?.trim()?(0,R.jsxs)(R.Fragment,{children:[`Signed in as`,` `,(0,R.jsx)(P,{value:n.auth.email.trim(),ariaLabel:`Toggle account email visibility`,revealTooltip:`Click to reveal email`,hideTooltip:`Click to hide email`}),`.`]}):`Signed in with ChatGPT.`:ce??`Use your ChatGPT subscription.`,ft=U&&A&&D?.flowId&&ge(H.toString())?fe({authorizationUrl:A,returnUrl:H.toString(),environmentId:e,instanceId:t,flowId:D.flowId},!1):null,pt=(0,R.jsx)(h,{size:`sm`,variant:V?`default`:`outline`,className:d===`onboarding`?`min-w-44`:void 0,disabled:E.data?.phase===`finished`?W||!tt:!A||D?.phase!==`waiting`,onClick:()=>{E.data?.phase===`finished`?rt(E.data.profile):A&<(A)},children:Je?`Finishing sign-in...`:E.data?.phase===`finished`?tt?`Retry connection`:`Finishing sign-in...`:D?.phase===`waiting`?V?`Open ChatGPT sign-in`:`Open sign-in page`:d===`onboarding`?`Open sign-in page`:`Signing in...`}),mt=!C&&D?.phase===`waiting`&&A?(0,R.jsxs)(`div`,{className:`flex w-full flex-col gap-3 text-xs leading-relaxed text-muted-foreground`,children:[(0,R.jsx)(`p`,{children:`If sign-in doesn't return to P4 Code, paste the URL from the final localhost page.`}),(0,R.jsxs)(`form`,{className:`flex flex-col gap-2 sm:flex-row sm:items-center`,onSubmit:n=>{if(n.preventDefault(),!D.flowId||!Fe.trim())return;let r=Fe.trim(),i=D.flowId;$(()=>ye({environmentId:e,input:{instanceId:t,flowId:i,callbackUrl:r}})).then(e=>{e&&Pe({flowId:i,value:``})})},children:[(0,R.jsx)(`div`,{className:`min-w-0 flex-1`,children:(0,R.jsx)(ie,{"aria-label":`ChatGPT sign-in redirect URL`,type:`password`,autoComplete:`off`,placeholder:`Paste the URL from the sign-in tab`,value:Fe,maxLength:16384,disabled:W||a,onChange:e=>Pe({flowId:D.flowId??``,value:e.target.value})})}),(0,R.jsx)(h,{variant:`outline`,type:`submit`,disabled:W||a||!Fe.trim(),children:`Connect`})]}),V?null:(0,R.jsx)(`div`,{children:(0,R.jsxs)(h,{size:`xs`,variant:`ghost-muted`,onClick:()=>void ne().shell.openExternal(A),children:[`Try sign-in in your browser`,(0,R.jsx)(r,{className:`size-3.5`})]})}),ft?(0,R.jsxs)(`details`,{children:[(0,R.jsx)(`summary`,{className:`cursor-pointer`,children:`Other ways to connect`}),(0,R.jsx)(h,{className:`mt-2`,size:`sm`,variant:`outline`,render:(0,R.jsx)(`a`,{href:ft}),children:`Use P4 Code desktop for automatic return`})]}):null]}):null,ht=e=>mt?(0,R.jsx)(me,{open:je,children:(0,R.jsx)(N,{children:(0,R.jsx)(`div`,{id:Ae,className:g(`w-full border-t border-border/50 pt-3`,e),children:mt})})}):null,gt=U?mt:mt?(0,R.jsxs)(`div`,{className:`text-xs leading-relaxed text-muted-foreground`,children:[(0,R.jsx)(Ie,{label:`Having trouble signing in?`,expanded:je,controls:Ae,onToggle:()=>Me(e=>!e)}),ht(`mt-3`)]}):null,_t=(0,R.jsx)(_e,{open:ae,methods:D?.methods??[],onClose:()=>O(!1),onSelect:e=>{O(!1),ot(D?.methods?.some(t=>t.id===e)?e:`chatgpt-change-account`)}}),vt=D?.phase===`idle`&&D.message?.startsWith(`Signed out locally.`)?D.message:null;if(d===`onboarding`){let r=vt??He??(_.error||te.error?`Could not read setup status. Reconnect and try again.`:M?.phase===`failed`?M.message:null);return(0,R.jsxs)(R.Fragment,{children:[_t,(0,R.jsxs)(Le,{title:f||n?.displayName||`Codex`,description:Y?ut:J?n?.auth.email?.trim()?(0,R.jsxs)(R.Fragment,{children:[`Signed in as`,` `,(0,R.jsx)(P,{value:n.auth.email.trim(),ariaLabel:`Toggle account email visibility`,revealTooltip:`Click to reveal email`,hideTooltip:`Click to hide email`,className:`break-all`}),`.`]}):`Connected to ChatGPT.`:mt&&!U?(0,R.jsx)(Ie,{expanded:je,controls:Ae,onToggle:()=>Me(e=>!e)}):Ye||Xe||D?.phase===`starting`||D?.phase===`waiting`||W&&!Y?(0,R.jsx)(Ie,{}):X||D?.phase===`failed`||D?.phase===`cancelled`?dt:`Code with your ChatGPT subscription.`,control:J&&!Q?(0,R.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 text-xs font-medium text-success-foreground`,children:[(0,R.jsx)(l,{className:`size-3.5`}),`Ready`]}):X?pt:(0,R.jsx)(z,{size:`sm`,disabled:Z||Q||(q?!n?.setup?.canAuthenticate:!n?.setup?.canInstall),onClick:()=>{k?O(!0):ot()},children:Y||W?`Setting up...`:k?`Reconnect account`:`Continue with ChatGPT`}),secondaryControl:X&&!Je||Y?(0,R.jsx)(h,{size:`sm`,variant:`ghost-muted`,disabled:W||a,onClick:()=>{K.current=!1,G.current=null,C||X&&D?.flowId?it():M?.operationId&&$(()=>Ce({environmentId:e,input:{instanceId:t,operationId:M.operationId}}))},children:`Cancel`}):!X&&!J&&k?(0,R.jsx)(h,{size:`sm`,variant:`ghost-muted`,disabled:Z||Q,onClick:()=>void ot(`chatgpt-change-account`),children:`Use a different account`}):!X&&!J&&u?(0,R.jsx)(h,{size:`sm`,variant:`ghost-muted`,disabled:a||Q,onClick:()=>o(`existing`),children:`Use existing CLI`}):null,children:[U?gt:ht(),r?(0,R.jsx)(`p`,{role:`alert`,className:`text-xs text-destructive`,children:r}):null]})]})}return(0,R.jsxs)(`section`,{"aria-label":`Codex setup`,className:`divide-y divide-border/50`,children:[_t,(0,R.jsx)(j,{title:`ChatGPT account`,description:dt,control:(0,R.jsx)(`div`,{className:`flex flex-wrap items-center justify-end gap-2`,children:X?(0,R.jsxs)(R.Fragment,{children:[pt,!Je&&(0,R.jsx)(h,{size:`sm`,variant:`ghost`,disabled:W||a,onClick:()=>{(C||D?.flowId)&&(K.current=!1,it(),p?.())},children:`Cancel`})]}):Y?(0,R.jsx)(h,{size:`sm`,variant:`ghost`,disabled:W||a,onClick:()=>{M?.operationId&&(G.current=null,$(()=>Ce({environmentId:e,input:{instanceId:t,operationId:M.operationId}})))},children:`Cancel`}):J?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(h,{size:`sm`,variant:`outline`,disabled:Z||Q,onClick:()=>O(!0),children:`Change account`}),(0,R.jsx)(h,{size:`sm`,variant:`ghost`,disabled:Z||Q,onClick:()=>void $(()=>xe(m)),children:`Disconnect`})]}):(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(z,{size:`sm`,disabled:Z||Q||(q?!n?.setup?.canAuthenticate:!n?.setup?.canInstall),onClick:()=>{k?O(!0):ot()},children:W?`Setting up...`:k?`Reconnect account`:`Continue with ChatGPT`}),k?(0,R.jsx)(h,{size:`sm`,variant:`ghost`,disabled:Z||Q,onClick:()=>void ot(`chatgpt-change-account`),children:`Use a different account`}):null]})})}),J?(0,R.jsx)(`div`,{className:`flex justify-end px-3 py-1 sm:px-4`,children:(0,R.jsx)(de,{})}):null,vt?(0,R.jsx)(`p`,{role:`alert`,className:`px-3 py-2 text-xs text-muted-foreground sm:px-4`,children:vt}):null,gt?(0,R.jsx)(`div`,{className:`px-3 py-3 sm:px-4`,children:gt}):null,He||_.error||te.error||M?.phase===`failed`?(0,R.jsx)(`p`,{role:`alert`,className:`px-3 py-2 text-xs text-destructive sm:px-4`,children:He??(M?.phase===`failed`?M.message:`Could not read Codex setup status. Reconnect and try again.`)}):null]})}function W(e){let t=(0,L.c)(20),{environmentId:n,instanceId:r,provider:i}=e,a;t[0]!==n||t[1]!==r?(a=S.providerInstallState({environmentId:n,input:{instanceId:r}}),t[0]=n,t[1]=r,t[2]=a):a=t[2];let o=w(a),s=o.data?.executablePath??``,c=o.error?`Could not read runtime path`:`Not installed`,l;t[3]!==s||t[4]!==c?(l=(0,R.jsx)(j,{title:`Binary path`,description:`Selected by P4 Code.`,control:(0,R.jsx)(`div`,{className:`w-full sm:w-80`,children:(0,R.jsx)(ie,{"aria-label":`Codex binary path`,value:s,title:s,placeholder:c,disabled:!0})})}),t[3]=s,t[4]=c,t[5]=l):l=t[5];let u=i?.runtimePaths?.homePath??``,d=i?.runtimePaths?.homePath,f;t[6]!==u||t[7]!==d?(f=(0,R.jsx)(j,{title:`CODEX_HOME path`,description:`Shared Codex config, sessions, and state.`,control:(0,R.jsx)(`div`,{className:`w-full sm:w-80`,children:(0,R.jsx)(ie,{"aria-label":`Codex home path`,value:u,title:d,placeholder:`Unavailable`,disabled:!0})})}),t[6]=u,t[7]=d,t[8]=f):f=t[8];let p=i?.runtimePaths?.shadowHomePath?`Account-specific home sharing the Codex state above.`:`This instance uses the shared Codex home directly.`,m=i?.runtimePaths?.shadowHomePath??``,h=i?.runtimePaths?.shadowHomePath??void 0,g=i?.runtimePaths?`Not used`:`Unavailable`,_;t[9]!==g||t[10]!==m||t[11]!==h?(_=(0,R.jsx)(`div`,{className:`w-full sm:w-80`,children:(0,R.jsx)(ie,{"aria-label":`Codex shadow home path`,value:m,title:h,placeholder:g,disabled:!0})}),t[9]=g,t[10]=m,t[11]=h,t[12]=_):_=t[12];let v;t[13]!==_||t[14]!==p?(v=(0,R.jsx)(j,{title:`Shadow home path`,description:p,control:_}),t[13]=_,t[14]=p,t[15]=v):v=t[15];let y;return t[16]!==v||t[17]!==l||t[18]!==f?(y=(0,R.jsxs)(R.Fragment,{children:[l,f,v]}),t[16]=v,t[17]=l,t[18]=f,t[19]=y):y=t[19],y}function Ie(e){let t=(0,L.c)(10),{label:n,expanded:r,controls:i,onToggle:a}=e,o=n===void 0?`Complete sign-in in your browser.`:n,s=r!==void 0&&r;if(!a){let e;return t[0]===o?e=t[1]:(e=(0,R.jsx)(`div`,{className:`leading-relaxed`,children:o}),t[0]=o,t[1]=e),e}let c=`size-3 shrink-0 ${s?`rotate-90`:``}`,l;t[2]===c?l=t[3]:(l=(0,R.jsx)(_,{"aria-hidden":!0,className:c}),t[2]=c,t[3]=l);let u;return t[4]!==i||t[5]!==s||t[6]!==o||t[7]!==a||t[8]!==l?(u=(0,R.jsxs)(`button`,{type:`button`,className:`inline-flex items-center gap-1.5 rounded-sm text-left leading-relaxed outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring`,"aria-label":`Having trouble signing in?`,"aria-expanded":s,"aria-controls":i,onClick:a,children:[o,l]}),t[4]=i,t[5]=s,t[6]=o,t[7]=a,t[8]=l,t[9]=u):u=t[9],u}function Le(e){let t=(0,L.c)(21),{title:n,description:r,control:i,secondaryControl:a,children:o}=e,s;t[0]===o?s=t[1]:(s=I.Children.toArray(o),t[0]=o,t[1]=s);let c=s,l;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,R.jsx)(k,{className:`size-5 shrink-0 fill-foreground`}),t[2]=l):l=t[2];let u;t[3]===n?u=t[4]:(u=(0,R.jsx)(`h3`,{className:`text-sm font-medium`,children:n}),t[3]=n,t[4]=u);let d;t[5]===r?d=t[6]:(d=(0,R.jsx)(`div`,{className:`mt-0.5 text-xs leading-relaxed text-muted-foreground`,children:r}),t[5]=r,t[6]=d);let f;t[7]!==u||t[8]!==d?(f=(0,R.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[u,d]}),t[7]=u,t[8]=d,t[9]=f):f=t[9];let p;t[10]!==i||t[11]!==a?(p=i||a?(0,R.jsxs)(`div`,{className:`flex shrink-0 flex-wrap items-center justify-end gap-2 has-[button]:w-full has-[button]:flex-col-reverse has-[button]:items-end sm:has-[button]:w-auto sm:has-[button]:flex-row sm:has-[button]:items-center`,children:[a,i]}):null,t[10]=i,t[11]=a,t[12]=p):p=t[12];let m;t[13]!==f||t[14]!==p?(m=(0,R.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3`,children:[l,f,p]}),t[13]=f,t[14]=p,t[15]=m):m=t[15];let h;t[16]===c?h=t[17]:(h=c.length>0?(0,R.jsx)(`div`,{className:`ml-8 mt-2 flex flex-wrap items-center gap-2`,children:c}):null,t[16]=c,t[17]=h);let g;return t[18]!==m||t[19]!==h?(g=(0,R.jsxs)(`div`,{className:`rounded-lg border border-border bg-background px-4 py-4`,children:[m,h]}),t[18]=m,t[19]=h,t[20]=g):g=t[20],g}function Re(e){return typeof e==`object`&&e&&`setupMode`in e&&e.setupMode===`managed`?`managed`:`existing`}export{ke as a,U as c,Oe as d,V as f,Ne as i,Te as l,Pe as n,H as o,z as p,W as r,je as s,Re as t,De as u};
|
|
2
|
-
//# sourceMappingURL=CodexSetupSection.logic-Ed9SDkqP.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{NE as t,lE as n,sr as r,t as i}from"./utils-BAPnqm16.js";import{p as a}from"./toast-CN7Jd-pG.js";import{c as o,l as s,y as c}from"./tooltip-DaSC-3cL.js";var l=t(),u=e(n(),1);function d(e){let t=(0,l.c)(19),{command:n,className:d,prominent:f}=e,p=f!==void 0&&f,m;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(m={timeout:1500,target:`command`},t[0]=m):m=t[0];let{copyToClipboard:h,isCopied:g}=a(m),_=p?`px-4 py-3.5 text-base`:`px-3 py-2.5 text-sm`,v;t[1]!==d||t[2]!==_?(v=i(`flex items-center justify-between gap-3 rounded-lg border border-border bg-muted/50 font-mono`,_,d),t[1]=d,t[2]=_,t[3]=v):v=t[3];let y;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,u.jsx)(`span`,{className:`mr-2 text-muted-foreground`,children:`$`}),t[4]=y):y=t[4];let b;t[5]===n?b=t[6]:(b=(0,u.jsxs)(`span`,{className:`min-w-0 truncate`,children:[y,n]}),t[5]=n,t[6]=b);let x;t[7]!==n||t[8]!==h?(x=()=>h(n,void 0),t[7]=n,t[8]=h,t[9]=x):x=t[9];let S=g?s:c,C;t[10]===S?C=t[11]:(C=(0,u.jsx)(o,{className:`size-3.5`,icon:S}),t[10]=S,t[11]=C);let w;t[12]!==x||t[13]!==C?(w=(0,u.jsx)(r,{size:`icon-xs`,variant:`ghost`,"aria-label":`Copy command`,onClick:x,children:C}),t[12]=x,t[13]=C,t[14]=w):w=t[14];let T;return t[15]!==w||t[16]!==v||t[17]!==b?(T=(0,u.jsxs)(`div`,{className:v,children:[b,w]}),t[15]=w,t[16]=v,t[17]=b,t[18]=T):T=t[18],T}export{d as t};
|
|
2
|
-
//# sourceMappingURL=CommandBlock-C7ASE_F_.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{r as t}from"./Icon-l19w4AjM.js";import{$n as n,Dm as r,Fp as i,Gn as a,NE as o,Nf as s,Op as c,Qn as l,Um as u,Up as d,Xf as f,Yn as p,Zn as m,_d as h,er as g,fd as _,gd as v,kf as y,lE as b,nm as x,od as S,or as C,rm as w,sm as T,sr as E,t as D,tr as O,up as ee}from"./utils-BAPnqm16.js";import{a as k,c as A,o as j,s as M,t as N}from"./select-Dsx46akG.js";import{t as te}from"./spinner-DHOdl-gn.js";import{P as ne,R as re,a as ie,c as ae,n as oe,t as se}from"./tooltip-DaSC-3cL.js";import{t as P}from"./query-B1uAr_ii.js";import{t as F}from"./use-atom-command-GpCw1tWF.js";import{l as ce}from"./rightPanelStore-DfMWWfvR.js";import{A as I}from"./PanelLayoutControls-DL7sleZ-.js";import{n as le,t as ue}from"./toggle-group-DekLc0Ax.js";import{t as L}from"./input-83N8btBC.js";import{t as R}from"./dialog-DYFQxVoN.js";import{i as z,n as de,r as B,t as V}from"./device-CWgOLpbF.js";import{a as H,i as U}from"./previewMiniPlayerStore-DN-AYBed.js";import{c as fe,r as pe}from"./DeviceSetup-DZAK0_tm.js";import{n as me,t as W}from"./discovery-list-BvblDG7m.js";import{Fa as G,Ia as K,La as q,Ma as J,Pa as he}from"./main-lV-t-UZx.js";import{C as ge,_ as _e,v as ve,y as ye}from"./_chat-C2VZmKVT.js";var Y=e(t(),1),X=o(),be=class extends Error{status;constructor(e){super(`Screenshot capture failed (${e}). Try again.`),this.status=e}};async function xe(e,t){let n=e.platform===`ios`?`serve-sim`:`serve-emu`,r=H(`${e.access.httpBase}/vendor/${n}/api/screenshot?device=${encodeURIComponent(e.deviceId)}`,e.access),i=await fetch(r,{method:`POST`,credentials:e.access.credentials?`include`:`omit`,signal:AbortSignal.any([t,AbortSignal.timeout(2e4)])});if(!i.ok)throw new be(i.status);let a=await i.blob();if(!a.size)throw Error(`The device returned an empty screenshot. Try again.`);return a}var Z=e(b(),1);function Se(e){let t=(0,X.c)(94),{view:n,handle:o,controls:g}=e,v=g.detail?.settings,b=!o?.inputConnected,D=v?.appearance===`dark`?`light`:`dark`,k;t[0]===o?k=t[1]:(k=()=>o?.pressButton(`home`),t[0]=o,t[1]=k);let A;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(A=(0,Z.jsx)(y,{}),t[2]=A):A=t[2];let j;t[3]!==b||t[4]!==k?(j=(0,Z.jsx)(Te,{tooltipSide:`left`,label:`Home`,disabled:b,onClick:k,children:A}),t[3]=b,t[4]=k,t[5]=j):j=t[5];let M;t[6]!==g||t[7]!==o||t[8]!==b||t[9]!==e.platform||t[10]!==n.keyboard?.attached?(M=e.platform===`android`?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(Te,{tooltipSide:`left`,label:`Back`,disabled:b,onClick:()=>o?.pressButton(`back`),children:(0,Z.jsx)(h,{})}),(0,Z.jsx)(Te,{tooltipSide:`left`,label:`Recents`,disabled:b,onClick:()=>o?.pressButton(`recents`),children:(0,Z.jsx)(T,{})}),(0,Z.jsxs)(a,{children:[(0,Z.jsx)(C,{render:(0,Z.jsx)(E,{size:`icon-sm`,variant:`ghost`,"aria-label":`Rotate device`,disabled:g.disabled}),children:(0,Z.jsx)(d,{})}),(0,Z.jsxs)(m,{side:`left`,children:[(0,Z.jsx)(p,{onClick:()=>void g.act({type:`setOrientation`,value:`portrait`}),children:`Portrait`}),(0,Z.jsx)(p,{onClick:()=>void g.act({type:`setOrientation`,value:`landscape_left`}),children:`Landscape`})]})]})]}):(0,Z.jsx)(Te,{tooltipSide:`left`,label:`Rotate device`,disabled:b||!!n.keyboard?.attached,onClick:()=>o?.rotate(),children:(0,Z.jsx)(d,{})}),t[6]=g,t[7]=o,t[8]=b,t[9]=e.platform,t[10]=n.keyboard?.attached,t[11]=M):M=t[11];let N;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,Z.jsx)(we,{}),t[12]=N):N=t[12];let te=`Switch device to ${D} mode`,ie=g.disabled||!v?.appearance,oe;t[13]!==g||t[14]!==D?(oe=()=>void g.act({type:`setAppearance`,value:D}),t[13]=g,t[14]=D,t[15]=oe):oe=t[15];let se=v?.appearance===`dark`?re:ne,P;t[16]===se?P=t[17]:(P=(0,Z.jsx)(ae,{icon:se}),t[16]=se,t[17]=P);let F;t[18]!==te||t[19]!==ie||t[20]!==oe||t[21]!==P?(F=(0,Z.jsx)(Te,{tooltipSide:`left`,label:te,disabled:ie,onClick:oe,children:P}),t[18]=te,t[19]=ie,t[20]=oe,t[21]=P,t[22]=F):F=t[22];let ce=g.disabled||!v?.textSize,I;t[23]===ce?I=t[24]:(I=(0,Z.jsx)(E,{size:`icon-sm`,variant:`ghost`,"aria-label":`Device text size`,title:`Device text size`,disabled:ce}),t[23]=ce,t[24]=I);let le;t[25]===Symbol.for(`react.memo_cache_sentinel`)?(le=(0,Z.jsx)(r,{}),t[25]=le):le=t[25];let ue;t[26]===I?ue=t[27]:(ue=(0,Z.jsx)(C,{render:I,children:le}),t[26]=I,t[27]=ue);let L=v?.textSize??``,R;t[28]===g?R=t[29]:(R=e=>{(e===`small`||e==="default"||e===`large`||e===`extra-large`)&&g.act({type:`setTextSize`,value:e})},t[28]=g,t[29]=R);let z;t[30]===Symbol.for(`react.memo_cache_sentinel`)?(z=[[`small`,`Small`],[`default`,`Default`],[`large`,`Large`],[`extra-large`,`Extra large`]],t[30]=z):z=t[30];let de;t[31]===Symbol.for(`react.memo_cache_sentinel`)?(de=z.map(Ce),t[31]=de):de=t[31];let B;t[32]!==L||t[33]!==R?(B=(0,Z.jsx)(m,{side:`left`,className:`min-w-40`,children:(0,Z.jsx)(l,{value:L,onValueChange:R,children:de})}),t[32]=L,t[33]=R,t[34]=B):B=t[34];let V;t[35]!==ue||t[36]!==B?(V=(0,Z.jsxs)(a,{children:[ue,B]}),t[35]=ue,t[36]=B,t[37]=V):V=t[37];let H;t[38]===Symbol.for(`react.memo_cache_sentinel`)?(H=(0,Z.jsx)(x,{}),t[38]=H):H=t[38];let U;t[39]!==e.onTools||t[40]!==e.toolsOpen?(U=(0,Z.jsx)(Te,{tooltipSide:`left`,label:`Device tools`,pressed:e.toolsOpen,onClick:e.onTools,children:H}),t[39]=e.onTools,t[40]=e.toolsOpen,t[41]=U):U=t[41];let fe=e.screenshotPending?`Capturing screenshot`:`Save screenshot`,pe=!n.streaming||e.screenshotPending,me;t[42]===Symbol.for(`react.memo_cache_sentinel`)?(me=(0,Z.jsx)(_,{}),t[42]=me):me=t[42];let W;t[43]!==e.onScreenshot||t[44]!==fe||t[45]!==pe?(W=(0,Z.jsx)(Te,{tooltipSide:`left`,label:fe,disabled:pe,onClick:e.onScreenshot,children:me}),t[43]=e.onScreenshot,t[44]=fe,t[45]=pe,t[46]=W):W=t[46];let G;t[47]===Symbol.for(`react.memo_cache_sentinel`)?(G=(0,Z.jsx)(C,{render:(0,Z.jsx)(E,{size:`icon-sm`,variant:`ghost`,"aria-label":`More device actions`,title:`More device actions`}),children:(0,Z.jsx)(ee,{})}),t[47]=G):G=t[47];let K;t[48]===Symbol.for(`react.memo_cache_sentinel`)?(K=(0,Z.jsx)(c,{}),t[48]=K):K=t[48];let q;t[49]===e.onFloat?q=t[50]:(q=(0,Z.jsxs)(p,{onClick:e.onFloat,children:[K,`Float device over chat`]}),t[49]=e.onFloat,t[50]=q);let J;t[51]===Symbol.for(`react.memo_cache_sentinel`)?(J=(0,Z.jsx)(u,{}),t[51]=J):J=t[51];let he;t[52]===e.onClose?he=t[53]:(he=(0,Z.jsxs)(p,{onClick:e.onClose,children:[J,`Close device panel`]}),t[52]=e.onClose,t[53]=he);let ge;t[54]===Symbol.for(`react.memo_cache_sentinel`)?(ge=(0,Z.jsx)(O,{}),t[54]=ge):ge=t[54];let _e;t[55]===Symbol.for(`react.memo_cache_sentinel`)?(_e=(0,Z.jsx)(i,{}),t[55]=_e):_e=t[55];let ve;t[56]===e.onPowerOff?ve=t[57]:(ve=(0,Z.jsxs)(p,{variant:`destructive`,onClick:e.onPowerOff,children:[_e,`Power off device`]}),t[56]=e.onPowerOff,t[57]=ve);let ye;t[58]!==q||t[59]!==he||t[60]!==ve?(ye=(0,Z.jsxs)(a,{children:[G,(0,Z.jsxs)(m,{side:`left`,align:`end`,children:[q,he,ge,ve]})]}),t[58]=q,t[59]=he,t[60]=ve,t[61]=ye):ye=t[61];let Y;t[62]===Symbol.for(`react.memo_cache_sentinel`)?(Y=(0,Z.jsx)(we,{}),t[62]=Y):Y=t[62];let be=!n.streaming||!!n.phoneUnavailableReason,xe=n.phoneUnavailableReason??void 0,Se;t[63]===Symbol.for(`react.memo_cache_sentinel`)?(Se=(0,Z.jsx)(S,{}),t[63]=Se):Se=t[63];let Ee;t[64]!==be||t[65]!==xe||t[66]!==n.phone||t[67]!==n.showPhone?(Ee=(0,Z.jsx)(Te,{tooltipSide:`left`,label:`3D view`,pressed:n.phone,disabled:be,description:xe,onClick:n.showPhone,children:Se}),t[64]=be,t[65]=xe,t[66]=n.phone,t[67]=n.showPhone,t[68]=Ee):Ee=t[68];let De=!n.phone,Oe=!n.streaming,ke;t[69]===Symbol.for(`react.memo_cache_sentinel`)?(ke=(0,Z.jsx)(w,{}),t[69]=ke):ke=t[69];let Ae;t[70]!==De||t[71]!==Oe||t[72]!==n.showFlat?(Ae=(0,Z.jsx)(Te,{tooltipSide:`left`,label:`Flat view`,pressed:De,disabled:Oe,onClick:n.showFlat,children:ke}),t[70]=De,t[71]=Oe,t[72]=n.showFlat,t[73]=Ae):Ae=t[73];let je;t[74]===n.keyboard?je=t[75]:(je=n.keyboard?(0,Z.jsx)(Te,{tooltipSide:`left`,label:n.keyboard.attached?`Detach Magic Keyboard`:`Attach Magic Keyboard`,pressed:n.keyboard.attached,onClick:n.keyboard.toggle,children:(0,Z.jsx)(s,{})}):null,t[74]=n.keyboard,t[75]=je);let Me;t[76]!==n.phone||t[77]!==n.resetView?(Me=n.phone?(0,Z.jsx)(Te,{tooltipSide:`left`,label:`Restore 3D view`,onClick:n.resetView,children:(0,Z.jsx)(f,{})}):null,t[76]=n.phone,t[77]=n.resetView,t[78]=Me):Me=t[78];let Q;t[79]!==F||t[80]!==j||t[81]!==V||t[82]!==U||t[83]!==W||t[84]!==M||t[85]!==ye||t[86]!==Ee||t[87]!==Ae||t[88]!==je||t[89]!==Me?(Q=(0,Z.jsxs)(`div`,{className:`pointer-events-auto flex shrink-0 flex-col items-center gap-1 overflow-y-auto rounded-full border border-border/50 bg-background/80 p-2 shadow-sm [scrollbar-width:none]`,children:[j,M,N,F,V,U,W,ye,Y,Ee,Ae,je,Me]}),t[79]=F,t[80]=j,t[81]=V,t[82]=U,t[83]=W,t[84]=M,t[85]=ye,t[86]=Ee,t[87]=Ae,t[88]=je,t[89]=Me,t[90]=Q):Q=t[90];let $;return t[91]!==Q||t[92]!==n.foldingControls?($=(0,Z.jsxs)(`aside`,{"aria-label":`Device controls`,"data-layout":`rail`,className:`pointer-events-none absolute inset-y-0 right-0 z-10 flex w-14 flex-col items-center gap-2 overflow-y-auto [justify-content:safe_center] py-3 pr-2 [scrollbar-width:none]`,children:[Q,n.foldingControls]}),t[91]=Q,t[92]=n.foldingControls,t[93]=$):$=t[93],$}function Ce(e){let[t,r]=e;return(0,Z.jsx)(n,{value:t,children:(0,Z.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,Z.jsx)(`span`,{className:`flex-1`,children:r}),(0,Z.jsx)(g,{})]})},t)}function we(){let e=(0,X.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,Z.jsx)(`div`,{"aria-hidden":!0,className:`my-1 h-px w-5 shrink-0 bg-border/70`}),e[0]=t):t=e[0],t}function Te(e){let t=(0,X.c)(18),n=e.pressed?`secondary`:`ghost`,r;t[0]!==e.children||t[1]!==e.disabled||t[2]!==e.label||t[3]!==e.onClick||t[4]!==e.pressed||t[5]!==n?(r=(0,Z.jsx)(E,{size:`icon-sm`,variant:n,"aria-label":e.label,"aria-pressed":e.pressed,disabled:e.disabled,onClick:e.onClick,children:e.children}),t[0]=e.children,t[1]=e.disabled,t[2]=e.label,t[3]=e.onClick,t[4]=e.pressed,t[5]=n,t[6]=r):r=t[6];let i=r,a;t[7]!==i||t[8]!==e.description||t[9]!==e.disabled||t[10]!==e.label?(a=e.disabled&&e.description?(0,Z.jsx)(ie,{render:(0,Z.jsx)(`span`,{className:`inline-flex`,tabIndex:0,role:`group`,"aria-label":e.label}),children:i}):(0,Z.jsx)(ie,{render:i}),t[7]=i,t[8]=e.description,t[9]=e.disabled,t[10]=e.label,t[11]=a):a=t[11];let o=e.description??e.label,s;t[12]!==e.tooltipSide||t[13]!==o?(s=(0,Z.jsx)(oe,{side:e.tooltipSide,children:o}),t[12]=e.tooltipSide,t[13]=o,t[14]=s):s=t[14];let c;return t[15]!==a||t[16]!==s?(c=(0,Z.jsxs)(se,{children:[a,s]}),t[15]=a,t[16]=s,t[17]=c):c=t[17],c}var Ee=[{value:`small`,label:`Small`},{value:`default`,label:`Default`},{value:`large`,label:`Large`},{value:`extra-large`,label:`Extra large`}],De=[{value:`none`,label:`None`},{value:`grayscale`,label:`Grayscale`},{value:`red-green`,label:`Red / green (protanopia)`},{value:`green-red`,label:`Green / red (deuteranopia)`},{value:`blue-yellow`,label:`Blue / yellow (tritanopia)`}],Oe=[{value:`portrait`,label:`Portrait`},{value:`landscape_left`,label:`Landscape left`},{value:`portrait_upside_down`,label:`Upside down`},{value:`landscape_right`,label:`Landscape right`}],ke=[{value:`camera`,label:`Camera`},{value:`microphone`,label:`Microphone`},{value:`photos`,label:`Photos`},{value:`contacts`,label:`Contacts`},{value:`calendar`,label:`Calendar`},{value:`reminders`,label:`Reminders`},{value:`location`,label:`Location`},{value:`notifications`,label:`Notifications`},{value:`motion`,label:`Motion`},{value:`media-library`,label:`Media library`},{value:`faceid`,label:`Face ID`}],Ae=[{value:`camera`,label:`Camera`},{value:`microphone`,label:`Microphone`},{value:`photos`,label:`Photos`},{value:`contacts`,label:`Contacts`},{value:`calendar`,label:`Calendar`},{value:`location`,label:`Location`},{value:`notifications`,label:`Notifications`},{value:`motion`,label:`Physical activity`}],je=[{label:`San Francisco`,latitude:37.7749,longitude:-122.4194},{label:`New York`,latitude:40.7128,longitude:-74.006},{label:`London`,latitude:51.5074,longitude:-.1278},{label:`Stockholm`,latitude:59.3293,longitude:18.0686},{label:`Tokyo`,latitude:35.6762,longitude:139.6503}];function Me(e){let t=(0,X.c)(129),{device:n,controls:r}=e,{detail:i,pending:a,error:o,foregroundApp:s,disabled:c,act:l}=r,d=i?.settings,f=n.platform===`ios`,p;t[0]===e.className?p=t[1]:(p=D(`flex min-h-0 flex-col border-border bg-background text-sm`,e.className),t[0]=e.className,t[1]=p);let m;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,Z.jsx)(`span`,{className:`font-medium`,children:`Tools`}),t[2]=m):m=t[2];let h;t[3]===a?h=t[4]:(h=a?(0,Z.jsx)(te,{size:`sm`}):null,t[3]=a,t[4]=h);let g;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,Z.jsx)(u,{}),t[5]=g):g=t[5];let _;t[6]===e.onClose?_=t[7]:(_=(0,Z.jsx)(E,{size:`icon-xs`,variant:`ghost-muted`,"aria-label":`Close tools`,className:`ml-auto`,onClick:e.onClose,children:g}),t[6]=e.onClose,t[7]=_);let v;t[8]!==h||t[9]!==_?(v=(0,Z.jsxs)(`div`,{className:`flex h-9 shrink-0 items-center gap-2 border-b px-3`,children:[m,h,_]}),t[8]=h,t[9]=_,t[10]=v):v=t[10];let y;t[11]===o?y=t[12]:(y=o?(0,Z.jsx)(`p`,{className:`border-b bg-destructive/10 px-3 py-2 text-xs text-destructive`,children:o}):null,t[11]=o,t[12]=y);let b;t[13]!==i||t[14]!==o?(b=i===null&&!o?(0,Z.jsxs)(`div`,{className:`flex items-center gap-2 px-3 py-3 text-xs text-muted-foreground`,children:[(0,Z.jsx)(te,{size:`sm`}),` Reading device settings…`]}):null,t[13]=i,t[14]=o,t[15]=b):b=t[15];let x;t[16]===e.hostDiagnostics?x=t[17]:(x=e.hostDiagnostics?(0,Z.jsx)(Q,{title:`Host diagnostics`,children:(0,Z.jsx)(`p`,{className:`whitespace-pre-line text-xs text-muted-foreground`,children:e.hostDiagnostics})}):null,t[16]=e.hostDiagnostics,t[17]=x);let S=s?.id??`—`,C;t[18]===S?C=t[19]:(C=(0,Z.jsx)($,{label:`Foreground`,children:(0,Z.jsx)(`span`,{className:`truncate font-mono text-xs`,children:S})}),t[18]=S,t[19]=C);let w;t[20]!==l||t[21]!==c||t[22]!==s?(w=s?(0,Z.jsxs)(`div`,{className:`flex gap-1.5`,children:[(0,Z.jsx)(E,{size:`xs`,variant:`outline`,disabled:c,onClick:()=>void l({type:`terminateApp`,appId:s.id}),children:`Terminate`}),(0,Z.jsx)(E,{size:`xs`,variant:`outline`,disabled:c,onClick:()=>void l({type:`launchApp`,appId:s.id}),children:`Relaunch`})]}):null,t[20]=l,t[21]=c,t[22]=s,t[23]=w):w=t[23];let T;t[24]===l?T=t[25]:(T=e=>l({type:`openUrl`,url:e}),t[24]=l,t[25]=T);let O;t[26]!==c||t[27]!==T?(O=(0,Z.jsx)(Ie,{placeholder:`https://… or myapp://`,action:`Open`,disabled:c,onSubmit:T}),t[26]=c,t[27]=T,t[28]=O):O=t[28];let ee=f?`Bundle ID to launch`:`Package name to launch`,k;t[29]===l?k=t[30]:(k=e=>l({type:`launchApp`,appId:e}),t[29]=l,t[30]=k);let A;t[31]!==c||t[32]!==ee||t[33]!==k?(A=(0,Z.jsx)(Ie,{placeholder:ee,action:`Launch`,disabled:c,onSubmit:k}),t[31]=c,t[32]=ee,t[33]=k,t[34]=A):A=t[34];let j;t[35]!==C||t[36]!==w||t[37]!==O||t[38]!==A?(j=(0,Z.jsxs)(Q,{title:`App`,children:[C,w,O,A]}),t[35]=C,t[36]=w,t[37]=O,t[38]=A,t[39]=j):j=t[39];let M=f?`Simulator`:`Emulator`,N;t[40]===d?N=t[41]:(N=d?.appearance?[d.appearance]:[],t[40]=d,t[41]=N);let ne;t[42]===l?ne=t[43]:(ne=e=>{let t=e[0];(t===`light`||t===`dark`)&&l({type:`setAppearance`,value:t})},t[42]=l,t[43]=ne);let re,ie;t[44]===Symbol.for(`react.memo_cache_sentinel`)?(re=(0,Z.jsx)(ue,{value:`light`,children:`Light`}),ie=(0,Z.jsx)(ue,{value:`dark`,children:`Dark`}),t[44]=re,t[45]=ie):(re=t[44],ie=t[45]);let ae;t[46]!==c||t[47]!==N||t[48]!==ne?(ae=(0,Z.jsx)($,{label:`Appearance`,children:(0,Z.jsxs)(le,{"aria-label":`Appearance`,value:N,disabled:c,onValueChange:ne,children:[re,ie]})}),t[46]=c,t[47]=N,t[48]=ne,t[49]=ae):ae=t[49];let oe=d?.textSize??null,se;t[50]===l?se=t[51]:(se=e=>l({type:`setTextSize`,value:e}),t[50]=l,t[51]=se);let P;t[52]!==c||t[53]!==oe||t[54]!==se?(P=(0,Z.jsx)($,{label:`Text size`,children:(0,Z.jsx)(Pe,{ariaLabel:`Text size`,value:oe,options:Ee,disabled:c,onChange:se})}),t[52]=c,t[53]=oe,t[54]=se,t[55]=P):P=t[55];let F;t[56]!==l||t[57]!==c||t[58]!==f||t[59]!==d?(F=f?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)($,{label:`Liquid Glass`,children:(0,Z.jsxs)(le,{"aria-label":`Liquid Glass`,value:d?.liquidGlass?[d.liquidGlass]:[],disabled:c||d?.liquidGlass===void 0,onValueChange:e=>{let t=e[0];(t===`clear`||t===`tinted`)&&l({type:`setLiquidGlass`,value:t})},children:[(0,Z.jsx)(ue,{value:`clear`,children:`Clear`}),(0,Z.jsx)(ue,{value:`tinted`,children:`Tinted`})]})}),(0,Z.jsx)($,{label:`Color filter`,children:(0,Z.jsx)(Pe,{ariaLabel:`Color filter`,value:d?.colorFilter??null,options:De,disabled:c,onChange:e=>l({type:`setColorFilter`,value:e})})})]}):(0,Z.jsx)($,{label:`Orientation`,children:(0,Z.jsx)(Pe,{ariaLabel:`Orientation`,value:null,placeholder:`Rotate to…`,options:Oe,disabled:c,onChange:e=>l({type:`setOrientation`,value:e})})}),t[56]=l,t[57]=c,t[58]=f,t[59]=d,t[60]=F):F=t[60];let ce=d?.reduceMotion,I;t[61]===l?I=t[62]:(I=e=>l({type:`setToggle`,setting:`reduceMotion`,value:e}),t[61]=l,t[62]=I);let L;t[63]!==c||t[64]!==ce||t[65]!==I?(L=(0,Z.jsx)(Ne,{label:`Reduce Motion`,checked:ce,disabled:c,onChange:I}),t[63]=c,t[64]=ce,t[65]=I,t[66]=L):L=t[66];let R;t[67]!==l||t[68]!==c||t[69]!==f||t[70]!==d?.increaseContrast||t[71]!==d?.networkEnabled||t[72]!==d?.reduceTransparency||t[73]!==d?.showBorders||t[74]!==d?.voiceOver?(R=f?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(Ne,{label:`Increase Contrast`,checked:d?.increaseContrast,disabled:c,onChange:e=>l({type:`setToggle`,setting:`increaseContrast`,value:e})}),(0,Z.jsx)(Ne,{label:`Reduce Transparency`,checked:d?.reduceTransparency,disabled:c,onChange:e=>l({type:`setToggle`,setting:`reduceTransparency`,value:e})}),(0,Z.jsx)(Ne,{label:`Show Borders`,checked:d?.showBorders,disabled:c,onChange:e=>l({type:`setToggle`,setting:`showBorders`,value:e})}),(0,Z.jsx)(Ne,{label:`VoiceOver`,checked:d?.voiceOver,disabled:c,onChange:e=>l({type:`setToggle`,setting:`voiceOver`,value:e})})]}):(0,Z.jsx)(Ne,{label:`Network`,checked:d?.networkEnabled,disabled:c,onChange:e=>l({type:`setToggle`,setting:`networkEnabled`,value:e})}),t[67]=l,t[68]=c,t[69]=f,t[70]=d?.increaseContrast,t[71]=d?.networkEnabled,t[72]=d?.reduceTransparency,t[73]=d?.showBorders,t[74]=d?.voiceOver,t[75]=R):R=t[75];let z;t[76]!==M||t[77]!==ae||t[78]!==P||t[79]!==F||t[80]!==L||t[81]!==R?(z=(0,Z.jsxs)(Q,{title:M,children:[ae,P,F,L,R]}),t[76]=M,t[77]=ae,t[78]=P,t[79]=F,t[80]=L,t[81]=R,t[82]=z):z=t[82];let de=e.access===null,B;t[83]===e?B=t[84]:(B=t=>(e.onAxOverlayChange(t),Promise.resolve()),t[83]=e,t[84]=B);let V;t[85]!==e.axOverlay||t[86]!==de||t[87]!==B?(V=(0,Z.jsx)(Q,{title:`Accessibility`,children:(0,Z.jsx)(Ne,{label:`Overlay element frames`,checked:e.axOverlay,disabled:de,onChange:B})}),t[85]=e.axOverlay,t[86]=de,t[87]=B,t[88]=V):V=t[88];let H,U;t[89]===l?(H=t[90],U=t[91]):(H=(e,t)=>l({type:`setLocation`,latitude:e,longitude:t}),U=()=>l({type:`clearLocation`}),t[89]=l,t[90]=H,t[91]=U);let fe;t[92]!==c||t[93]!==f||t[94]!==H||t[95]!==U?(fe=(0,Z.jsx)(Le,{disabled:c,canClear:f,onSet:H,onClear:U}),t[92]=c,t[93]=f,t[94]=H,t[95]=U,t[96]=fe):fe=t[96];let pe=f?ke:Ae,me=s?.id??``,W;t[97]===l?W=t[98]:(W=(e,t,n)=>l({type:`setPermission`,appId:e,permission:t,decision:n}),t[97]=l,t[98]=W);let G;t[99]!==c||t[100]!==f||t[101]!==pe||t[102]!==me||t[103]!==W?(G=(0,Z.jsx)(ze,{permissions:pe,canReset:f,defaultAppId:me,disabled:c,onDecide:W}),t[99]=c,t[100]=f,t[101]=pe,t[102]=me,t[103]=W,t[104]=G):G=t[104];let K;t[105]!==l||t[106]!==c||t[107]!==s||t[108]!==f?(K=f?(0,Z.jsxs)(Q,{title:`Push notification`,children:[(0,Z.jsx)(Ie,{placeholder:`Alert text`,action:`Send`,disabled:c||!s,onSubmit:e=>s?l({type:`sendPush`,appId:s.id,payload:e}):Promise.resolve()}),s?null:(0,Z.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Open an app first.`})]}):null,t[105]=l,t[106]=c,t[107]=s,t[108]=f,t[109]=K):K=t[109];let q;t[110]!==n||t[111]!==f||t[112]!==e.access?(q=f&&e.access?(0,Z.jsx)(Ve,{access:e.access,device:n}):null,t[110]=n,t[111]=f,t[112]=e.access,t[113]=q):q=t[113];let J;t[114]!==j||t[115]!==z||t[116]!==V||t[117]!==fe||t[118]!==G||t[119]!==K||t[120]!==q||t[121]!==y||t[122]!==b||t[123]!==x?(J=(0,Z.jsxs)(`div`,{className:`min-h-0 flex-1 overflow-y-auto`,children:[y,b,x,j,z,V,fe,G,K,q]}),t[114]=j,t[115]=z,t[116]=V,t[117]=fe,t[118]=G,t[119]=K,t[120]=q,t[121]=y,t[122]=b,t[123]=x,t[124]=J):J=t[124];let he;return t[125]!==p||t[126]!==J||t[127]!==v?(he=(0,Z.jsxs)(`div`,{className:p,children:[v,J]}),t[125]=p,t[126]=J,t[127]=v,t[128]=he):he=t[128],he}function Q(e){let t=(0,X.c)(5),n;t[0]===e.title?n=t[1]:(n=(0,Z.jsx)(`h3`,{className:`text-xs font-medium text-muted-foreground`,children:e.title}),t[0]=e.title,t[1]=n);let r;return t[2]!==e.children||t[3]!==n?(r=(0,Z.jsxs)(`section`,{className:`flex flex-col gap-2 border-b px-3 py-2.5 last:border-b-0`,children:[n,e.children]}),t[2]=e.children,t[3]=n,t[4]=r):r=t[4],r}function $(e){let t=(0,X.c)(7),n;t[0]===e.label?n=t[1]:(n=(0,Z.jsx)(`span`,{className:`shrink-0 text-xs text-muted-foreground`,children:e.label}),t[0]=e.label,t[1]=n);let r;t[2]===e.children?r=t[3]:(r=(0,Z.jsx)(`div`,{className:`flex min-w-0 items-center justify-end`,children:e.children}),t[2]=e.children,t[3]=r);let i;return t[4]!==n||t[5]!==r?(i=(0,Z.jsxs)(`div`,{className:`flex min-h-7 items-center justify-between gap-3`,children:[n,r]}),t[4]=n,t[5]=r,t[6]=i):i=t[6],i}function Ne(e){let t=(0,X.c)(10),n=e.checked??!1,r=e.disabled||e.checked===void 0,i;t[0]===e?i=t[1]:(i=t=>void e.onChange(t),t[0]=e,t[1]=i);let a;t[2]!==e.label||t[3]!==n||t[4]!==r||t[5]!==i?(a=(0,Z.jsx)(q,{size:`sm`,"aria-label":e.label,checked:n,disabled:r,onCheckedChange:i}),t[2]=e.label,t[3]=n,t[4]=r,t[5]=i,t[6]=a):a=t[6];let o;return t[7]!==e.label||t[8]!==a?(o=(0,Z.jsx)($,{label:e.label,children:a}),t[7]=e.label,t[8]=a,t[9]=o):o=t[9],o}function Pe(e){let t=(0,X.c)(25),n;if(t[0]!==e.options||t[1]!==e.value){let r;t[3]===e.value?r=t[4]:(r=t=>t.value===e.value,t[3]=e.value,t[4]=r),n=e.options.find(r),t[0]=e.options,t[1]=e.value,t[2]=n}else n=t[2];let r=n,i=e.value,a=e.disabled,o;t[5]===e?o=t[6]:(o=t=>{t!==null&&t!==e.value&&e.onChange(t)},t[5]=e,t[6]=o);let s;t[7]!==r||t[8]!==e.placeholder?(s=r?r.label:(0,Z.jsx)(`span`,{className:`text-muted-foreground`,children:e.placeholder??`Unknown`}),t[7]=r,t[8]=e.placeholder,t[9]=s):s=t[9];let c;t[10]===s?c=t[11]:(c=(0,Z.jsx)(A,{children:s}),t[10]=s,t[11]=c);let l;t[12]!==e.ariaLabel||t[13]!==c?(l=(0,Z.jsx)(M,{size:`xs`,className:`w-40`,"aria-label":e.ariaLabel,children:c}),t[12]=e.ariaLabel,t[13]=c,t[14]=l):l=t[14];let u;t[15]===e.options?u=t[16]:(u=e.options.map(Fe),t[15]=e.options,t[16]=u);let d;t[17]===u?d=t[18]:(d=(0,Z.jsx)(j,{align:`end`,alignItemWithTrigger:!1,children:u}),t[17]=u,t[18]=d);let f;return t[19]!==e.disabled||t[20]!==e.value||t[21]!==o||t[22]!==l||t[23]!==d?(f=(0,Z.jsxs)(N,{value:i,disabled:a,onValueChange:o,children:[l,d]}),t[19]=e.disabled,t[20]=e.value,t[21]=o,t[22]=l,t[23]=d,t[24]=f):f=t[24],f}function Fe(e){return(0,Z.jsx)(k,{value:e.value,children:e.label},e.value)}function Ie(e){let t=(0,X.c)(20),[n,r]=(0,Y.useState)(``),i;t[0]!==e||t[1]!==n?(i=()=>{let t=n.trim();t&&e.onSubmit(t).then(()=>r(``))},t[0]=e,t[1]=n,t[2]=i):i=t[2];let a=i,o;t[3]===a?o=t[4]:(o=e=>{e.preventDefault(),a()},t[3]=a,t[4]=o);let s;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(s=e=>r(e.target.value),t[5]=s):s=t[5];let c;t[6]!==e.disabled||t[7]!==e.placeholder||t[8]!==n?(c=(0,Z.jsx)(L,{size:`compact`,font:`mono`,className:`min-w-0 flex-1`,placeholder:e.placeholder,value:n,disabled:e.disabled,onChange:s}),t[6]=e.disabled,t[7]=e.placeholder,t[8]=n,t[9]=c):c=t[9];let l;t[10]!==e.disabled||t[11]!==n?(l=e.disabled||n.trim().length===0,t[10]=e.disabled,t[11]=n,t[12]=l):l=t[12];let u;t[13]!==e.action||t[14]!==l?(u=(0,Z.jsx)(E,{type:`submit`,size:`xs`,variant:`outline`,disabled:l,children:e.action}),t[13]=e.action,t[14]=l,t[15]=u):u=t[15];let d;return t[16]!==o||t[17]!==c||t[18]!==u?(d=(0,Z.jsxs)(`form`,{className:`flex gap-1.5`,onSubmit:o,children:[c,u]}),t[16]=o,t[17]=c,t[18]=u,t[19]=d):d=t[19],d}function Le(e){let t=(0,X.c)(40),[n,r]=(0,Y.useState)(``),[i,a]=(0,Y.useState)(``),o=Number(n),s=Number(i),c,l;t[0]!==n||t[1]!==i||t[2]!==o||t[3]!==s?(c={latitude:o,longitude:s},l=n.trim()!==``&&i.trim()!==``&&Math.abs(c.latitude)<=90&&Math.abs(c.longitude)<=180,t[0]=n,t[1]=i,t[2]=o,t[3]=s,t[4]=c,t[5]=l):(c=t[4],l=t[5]);let u=l,d;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(d=e=>r(e.target.value),t[6]=d):d=t[6];let f;t[7]!==n||t[8]!==e.disabled?(f=(0,Z.jsx)(L,{size:`compact`,font:`mono`,className:`min-w-0 flex-1`,placeholder:`Latitude`,inputMode:`decimal`,value:n,disabled:e.disabled,onChange:d}),t[7]=n,t[8]=e.disabled,t[9]=f):f=t[9];let p;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(p=e=>a(e.target.value),t[10]=p):p=t[10];let m;t[11]!==i||t[12]!==e.disabled?(m=(0,Z.jsx)(L,{size:`compact`,font:`mono`,className:`min-w-0 flex-1`,placeholder:`Longitude`,inputMode:`decimal`,value:i,disabled:e.disabled,onChange:p}),t[11]=i,t[12]=e.disabled,t[13]=m):m=t[13];let h;t[14]!==f||t[15]!==m?(h=(0,Z.jsxs)(`div`,{className:`flex gap-1.5`,children:[f,m]}),t[14]=f,t[15]=m,t[16]=h):h=t[16];let g;t[17]===e?g=t[18]:(g=t=>{let n=je.find(e=>e.label===t);n&&(r(String(n.latitude)),a(String(n.longitude)),e.onSet(n.latitude,n.longitude))},t[17]=e,t[18]=g);let _;t[19]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,Z.jsx)(M,{size:`xs`,className:`w-32`,"aria-label":`Location preset`,children:(0,Z.jsx)(A,{children:(0,Z.jsx)(`span`,{className:`text-muted-foreground`,children:`Preset…`})})}),t[19]=_):_=t[19];let v;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,Z.jsx)(j,{align:`start`,alignItemWithTrigger:!1,children:je.map(Re)}),t[20]=v):v=t[20];let y;t[21]!==e.disabled||t[22]!==g?(y=(0,Z.jsxs)(N,{value:null,disabled:e.disabled,onValueChange:g,children:[_,v]}),t[21]=e.disabled,t[22]=g,t[23]=y):y=t[23];let b=e.disabled||!u,x;t[24]!==c.latitude||t[25]!==c.longitude||t[26]!==e?(x=()=>void e.onSet(c.latitude,c.longitude),t[24]=c.latitude,t[25]=c.longitude,t[26]=e,t[27]=x):x=t[27];let S;t[28]!==b||t[29]!==x?(S=(0,Z.jsx)(E,{size:`xs`,variant:`outline`,disabled:b,onClick:x,children:`Set`}),t[28]=b,t[29]=x,t[30]=S):S=t[30];let C;t[31]===e?C=t[32]:(C=e.canClear?(0,Z.jsx)(E,{size:`xs`,variant:`ghost`,disabled:e.disabled,onClick:()=>{r(``),a(``),e.onClear()},children:`Clear`}):null,t[31]=e,t[32]=C);let w;t[33]!==y||t[34]!==S||t[35]!==C?(w=(0,Z.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1.5`,children:[y,S,C]}),t[33]=y,t[34]=S,t[35]=C,t[36]=w):w=t[36];let T;return t[37]!==w||t[38]!==h?(T=(0,Z.jsxs)(Q,{title:`Location`,children:[h,w]}),t[37]=w,t[38]=h,t[39]=T):T=t[39],T}function Re(e){return(0,Z.jsx)(k,{value:e.label,children:e.label},e.label)}function ze(e){let t=(0,X.c)(40),[n,r]=(0,Y.useState)(``),[i,a]=(0,Y.useState)(`camera`),o;t[0]!==n||t[1]!==e.defaultAppId?(o=n.trim()||e.defaultAppId,t[0]=n,t[1]=e.defaultAppId,t[2]=o):o=t[2];let s=o,c;t[3]!==i||t[4]!==e||t[5]!==s?(c=t=>void e.onDecide(s,i,t),t[3]=i,t[4]=e,t[5]=s,t[6]=c):c=t[6];let l=c,u=e.defaultAppId||`App ID`,d;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(d=e=>r(e.target.value),t[7]=d):d=t[7];let f;t[8]!==n||t[9]!==e.disabled||t[10]!==u?(f=(0,Z.jsx)(L,{size:`compact`,font:`mono`,placeholder:u,value:n,disabled:e.disabled,onChange:d}),t[8]=n,t[9]=e.disabled,t[10]=u,t[11]=f):f=t[11];let p;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(p=e=>(a(e),Promise.resolve()),t[12]=p):p=t[12];let m;t[13]!==i||t[14]!==e.disabled||t[15]!==e.permissions?(m=(0,Z.jsx)(Pe,{ariaLabel:`Permission`,value:i,options:e.permissions,disabled:e.disabled,onChange:p}),t[13]=i,t[14]=e.disabled,t[15]=e.permissions,t[16]=m):m=t[16];let h=e.disabled||!s,g;t[17]===l?g=t[18]:(g=()=>l(`grant`),t[17]=l,t[18]=g);let _;t[19]!==h||t[20]!==g?(_=(0,Z.jsx)(E,{size:`xs`,variant:`outline`,disabled:h,onClick:g,children:`Grant`}),t[19]=h,t[20]=g,t[21]=_):_=t[21];let v=e.disabled||!s,y;t[22]===l?y=t[23]:(y=()=>l(`revoke`),t[22]=l,t[23]=y);let b;t[24]!==v||t[25]!==y?(b=(0,Z.jsx)(E,{size:`xs`,variant:`outline`,disabled:v,onClick:y,children:`Revoke`}),t[24]=v,t[25]=y,t[26]=b):b=t[26];let x;t[27]!==l||t[28]!==e.canReset||t[29]!==e.disabled||t[30]!==s?(x=e.canReset?(0,Z.jsx)(E,{size:`xs`,variant:`ghost`,disabled:e.disabled||!s,onClick:()=>l(`reset`),children:`Reset`}):null,t[27]=l,t[28]=e.canReset,t[29]=e.disabled,t[30]=s,t[31]=x):x=t[31];let S;t[32]!==b||t[33]!==x||t[34]!==m||t[35]!==_?(S=(0,Z.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1.5`,children:[m,_,b,x]}),t[32]=b,t[33]=x,t[34]=m,t[35]=_,t[36]=S):S=t[36];let C;return t[37]!==S||t[38]!==f?(C=(0,Z.jsxs)(Q,{title:`Permissions`,children:[f,S]}),t[37]=S,t[38]=f,t[39]=C):C=t[39],C}var Be=100;function Ve(e){let t=(0,X.c)(19),[n,r]=(0,Y.useState)(!1),i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=[],t[0]=i):i=t[0];let[a,o]=(0,Y.useState)(i),s,c;t[1]!==n||t[2]!==e.access||t[3]!==e.device.id||t[4]!==e.device.platform?(s=()=>{if(!n)return;let t=ve({access:e.access,platform:e.device.platform,deviceId:e.device.id},(e,t)=>{o(n=>{let r=t?[...e]:[...n,...e];return r.length>Be?r.slice(-100):r})});return()=>{t(),o([])}},c=[n,e.access,e.device.id,e.device.platform],t[1]=n,t[2]=e.access,t[3]=e.device.id,t[4]=e.device.platform,t[5]=s,t[6]=c):(s=t[5],c=t[6]),(0,Y.useEffect)(s,c);let l=n&&`rotate-180`,u;t[7]===l?u=t[8]:(u=D(`ml-auto size-3.5 transition-transform`,l),t[7]=l,t[8]=u);let d;t[9]===u?d=t[10]:(d=(0,Z.jsxs)(K,{className:`flex w-full items-center gap-1.5 border-b px-3 py-2.5 text-left text-xs font-medium text-muted-foreground`,children:[`Event log`,(0,Z.jsx)(v,{className:u})]}),t[9]=u,t[10]=d);let f;t[11]===a?f=t[12]:(f=a.length===0?(0,Z.jsx)(`li`,{className:`text-muted-foreground`,children:`No events yet.`}):a.map(He),t[11]=a,t[12]=f);let p;t[13]===f?p=t[14]:(p=(0,Z.jsx)(G,{children:(0,Z.jsx)(`ol`,{className:`max-h-64 overflow-y-auto px-3 py-2 font-mono text-2xs leading-relaxed`,children:f})}),t[13]=f,t[14]=p);let m;return t[15]!==n||t[16]!==d||t[17]!==p?(m=(0,Z.jsxs)(he,{open:n,onOpenChange:r,children:[d,p]}),t[15]=n,t[16]=d,t[17]=p,t[18]=m):m=t[18],m}function He(e){return(0,Z.jsxs)(`li`,{className:`flex gap-2`,children:[(0,Z.jsx)(`span`,{className:`shrink-0 text-muted-foreground`,children:e.timestamp.slice(11,19)}),(0,Z.jsx)(`span`,{className:`truncate`,children:e.summary})]},e.id)}function Ue(e){let t=(0,X.c)(30),{environmentId:n,device:r,access:i,visible:a}=e,o;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(o={reportFailure:!1},t[0]=o):o=t[0];let s=F(V.detail,o),c;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(c={reportFailure:!1},t[1]=c):c=t[1];let l=F(V.action,c),[u,d]=(0,Y.useState)(null),[f,p]=(0,Y.useState)(!1),[m,h]=(0,Y.useState)(null),[g,_]=(0,Y.useState)(),v=(0,Y.useRef)(!1),y=(0,Y.useRef)(0),b=(0,Y.useRef)(null),x;t[2]!==r.hostId||t[3]!==r.id?(x={hostId:r.hostId,deviceId:r.id},t[2]=r.hostId,t[3]=r.id,t[4]=x):x=t[4];let S=x,C,w;t[5]!==n||t[6]!==s||t[7]!==S||t[8]!==a?(C=()=>{let e=y.current+=1;if(!a)return;let t={environmentId:n,input:S};return b.current=t,s(t).then(t=>{y.current===e&&(t._tag===`Success`?(d(t.value),h(null)):(d(null),h(P(t.cause))))}),()=>{b.current=null,y.current+=1}},w=[n,s,S,a],t[5]=n,t[6]=s,t[7]=S,t[8]=a,t[9]=C,t[10]=w):(C=t[9],w=t[10]),(0,Y.useEffect)(C,w);let T,E;t[11]!==i||t[12]!==r.id||t[13]!==r.platform||t[14]!==a?(T=()=>{if(!i||!a)return;let e=!0,t=ye({access:i,platform:r.platform,deviceId:r.id},t=>{e&&_(t)});return()=>{e=!1,t(),_(void 0)}},E=[i,r.id,r.platform,a],t[11]=i,t[12]=r.id,t[13]=r.platform,t[14]=a,t[15]=T,t[16]=E):(T=t[15],E=t[16]),(0,Y.useEffect)(T,E);let D=u!==null&&a,O;t[17]!==D||t[18]!==n||t[19]!==s||t[20]!==l||t[21]!==S?(O=async e=>{if(v.current||!D)return;v.current=!0;let t=y.current+=1;return p(!0),h(null),l({environmentId:n,input:{...S,...e}}).then(e=>{if(y.current!==t){let e=b.current;if(!e)return;let t=y.current+=1;return s(e).then(e=>{y.current===t&&(e._tag===`Success`?(d(e.value),h(null)):(d(null),h(P(e.cause))))})}e._tag===`Success`?d(e.value):h(P(e.cause))}).finally(()=>{v.current=!1,p(!1)})},t[17]=D,t[18]=n,t[19]=s,t[20]=l,t[21]=S,t[22]=O):O=t[22];let ee=O,k=f||!u||!a,A=g===void 0?u?.foregroundApp??null:g,j;return t[23]!==ee||t[24]!==u||t[25]!==m||t[26]!==f||t[27]!==k||t[28]!==A?(j={detail:u,pending:f,error:m,act:ee,disabled:k,foregroundApp:A},t[23]=ee,t[24]=u,t[25]=m,t[26]=f,t[27]=k,t[28]=A,t[29]=j):j=t[29],j}function We(e){let t=(0,X.c)(51),[n,r]=(0,Y.useState)(null),[i,a]=(0,Y.useState)(!1),[o,s]=(0,Y.useState)(!1),[c,l]=(0,Y.useState)(!1),[u,d]=(0,Y.useState)(null),f=(0,Y.useRef)(null),p=(0,Y.useRef)(null),m=B(e.environmentId,e.device.hostId),h;t[0]!==m||t[1]!==e?(h={...e,access:m},t[0]=m,t[1]=e,t[2]=h):h=t[2];let g=Ue(h),_,v;t[3]!==m||t[4]!==e.visible?(_=()=>((!m||!e.visible)&&f.current?.abort(),()=>{f.current?.abort(),p.current&&URL.revokeObjectURL(p.current),p.current=null}),v=[m,e.visible],t[3]=m,t[4]=e.visible,t[5]=_,t[6]=v):(_=t[5],v=t[6]),(0,Y.useEffect)(_,v);let y;t[7]!==m||t[8]!==e.device.id||t[9]!==e.device.name||t[10]!==e.device.platform||t[11]!==e.environmentId||t[12]!==e.visible?(y=()=>{if(!m||f.current||!e.visible)return;let t=new AbortController;return f.current=t,l(!0),d(null),xe({access:m,platform:e.device.platform,deviceId:e.device.id},t.signal).then(n=>{if(t.signal.aborted)return;p.current&&URL.revokeObjectURL(p.current);let r=URL.createObjectURL(n);p.current=r;let i=document.createElement(`a`);i.href=r,i.download=`${e.device.name.replace(/[^a-z0-9-]/gi,`-`)}-${Date.now()}.png`,document.body.append(i),i.click(),i.remove()}).catch(n=>{t.signal.aborted||(n instanceof be&&n.status===401&&de(e.environmentId),d(n instanceof Error?n.message:`Screenshot capture failed. Try again.`))}).finally(()=>{f.current===t&&(f.current=null,l(!1))})},t[7]=m,t[8]=e.device.id,t[9]=e.device.name,t[10]=e.device.platform,t[11]=e.environmentId,t[12]=e.visible,t[13]=y):y=t[13];let b=y,x;t[14]!==g||t[15]!==u||t[16]!==i?(x=u||g.error&&!i?(0,Z.jsx)(`p`,{role:`alert`,className:`px-3 py-2 text-xs text-destructive`,children:u??g.error}):null,t[14]=g,t[15]=u,t[16]=i,t[17]=x):x=t[17];let S=`${e.hostLabel} · ${e.device.version}`,C;t[18]!==g||t[19]!==n||t[20]!==e.device.platform||t[21]!==e.onClose||t[22]!==e.onFloat||t[23]!==e.onPowerOff||t[24]!==b||t[25]!==c||t[26]!==i?(C=t=>(0,Z.jsx)(Se,{platform:e.device.platform,handle:n,view:t,controls:g,screenshotPending:c,onScreenshot:()=>void b(),toolsOpen:i,onTools:()=>a(!i),onFloat:e.onFloat,onClose:e.onClose,onPowerOff:e.onPowerOff}),t[18]=g,t[19]=n,t[20]=e.device.platform,t[21]=e.onClose,t[22]=e.onFloat,t[23]=e.onPowerOff,t[24]=b,t[25]=c,t[26]=i,t[27]=C):C=t[27];let w;t[28]!==o||t[29]!==e.device.hostId||t[30]!==e.device.id||t[31]!==e.device.name||t[32]!==e.device.platform||t[33]!==e.environmentId||t[34]!==e.visible||t[35]!==S||t[36]!==C?(w=(0,Z.jsx)(`div`,{className:`min-h-0 flex-1`,children:(0,Z.jsx)(_e,{environmentId:e.environmentId,platform:e.device.platform,deviceName:e.device.name,deviceDescription:S,deviceId:e.device.id,hostId:e.device.hostId,visible:e.visible,axOverlay:o,allowPhoneView:!0,onHandle:r,renderControls:C})}),t[28]=o,t[29]=e.device.hostId,t[30]=e.device.id,t[31]=e.device.name,t[32]=e.device.platform,t[33]=e.environmentId,t[34]=e.visible,t[35]=S,t[36]=C,t[37]=w):w=t[37];let T;t[38]!==x||t[39]!==w?(T=(0,Z.jsxs)(`div`,{className:`relative flex min-h-0 min-w-0 flex-1 flex-col`,children:[x,w]}),t[38]=x,t[39]=w,t[40]=T):T=t[40];let E;t[41]!==m||t[42]!==o||t[43]!==g||t[44]!==e.device||t[45]!==e.hostDiagnostics||t[46]!==i?(E=i?(0,Z.jsx)(Me,{device:e.device,controls:g,hostDiagnostics:e.hostDiagnostics,access:m,axOverlay:o,onAxOverlayChange:s,onClose:()=>a(!1),className:`absolute inset-y-0 right-0 z-10 w-full max-w-72 border-l shadow-lg @[700px]:static @[700px]:w-72 @[700px]:shrink-0 @[700px]:shadow-none`}):null,t[41]=m,t[42]=o,t[43]=g,t[44]=e.device,t[45]=e.hostDiagnostics,t[46]=i,t[47]=E):E=t[47];let D;return t[48]!==T||t[49]!==E?(D=(0,Z.jsxs)(Z.Fragment,{children:[T,E]}),t[48]=T,t[49]=E,t[50]=D):D=t[50],D}var Ge=e=>e===`ios`?`iOS Simulators`:`Android Emulators`,Ke=e=>`${e.hostId}\u0000${e.id}`;function qe(e){let{environmentId:t,threadId:n}=e.threadRef,{state:r,loaded:i}=z(t),a=F(V.list,{reportFailure:!1}),o=F(V.open),s=F(V.close),[c,l]=(0,Y.useState)(null),[d,f]=(0,Y.useState)(null),p=d?Ke(d):null,m=r.hostStatus===`disabled`;(0,Y.useEffect)(()=>{e.visible&&i&&!m&&a({environmentId:t,input:{}})},[t,a,i,e.visible,m]);let h=(0,Y.useMemo)(()=>r.sessions.filter(e=>e.threadId===n),[r.sessions,n]),g=e.surface.target?h.find(t=>t.deviceId===e.surface.target?.deviceId&&t.hostId===e.surface.target.hostId):void 0,_=g?r.devices.find(e=>e.hostId===g.hostId&&e.id===g.deviceId):void 0,v=(0,Y.useMemo)(()=>Je(r),[r]),y=async i=>{let a=r.devices.find(e=>Ke(e)===i);if(a){l(null),f(a);try{let r=await o({environmentId:t,input:{threadId:n,hostId:a.hostId,deviceId:a.id,platform:a.platform}});r._tag===`Failure`?l(P(r.cause)):ce.getState().openDevice(e.threadRef,{hostId:r.value.hostId,deviceId:r.value.deviceId,platform:a.platform,name:a.name})}finally{f(null)}}},b=()=>{_&&(U.getState().open(e.threadRef,{kind:`device`,hostId:_.hostId,deviceId:_.id,platform:_.platform,name:_.name}),ce.getState().close(e.threadRef))},x=r=>{if(!r){ce.getState().closeSurface(e.threadRef,e.surface.id);return}g&&(l(null),s({environmentId:t,input:{threadId:n,hostId:g.hostId,deviceId:g.deviceId,shutdown:r}}).then(t=>{t._tag===`Failure`?l(P(t.cause)):ce.getState().closeSurface(e.threadRef,e.surface.id)}))},S=r.bootingDevices?.filter(e=>e.threadId===n)??[],C=Object.values(r.hostStatuses).some(e=>e.status===`ready`),T=!C&&Object.values(r.hostStatuses).some(e=>e.status===`installing`||e.status===`starting`),O=r.hosts.flatMap(e=>e.platforms.filter(e=>!e.available).map(t=>({...t,hostId:e.id,hostLabel:e.label})));return i&&(!r.onboardingCompleted||m)?(0,Z.jsx)(R,{open:e.visible,onOpenChange:t=>{t||e.onDismissSetup()},children:(0,Z.jsx)(J,{children:(0,Z.jsx)(pe,{environmentId:t,state:r})})}):(0,Z.jsxs)(I,{mode:e.mode,children:[C&&!_&&r.hostStatusDetail?(0,Z.jsx)(`div`,{role:`status`,className:`whitespace-pre-line border-b px-3 py-2 text-xs text-muted-foreground`,children:r.hostStatusDetail}):null,(0,Z.jsx)(fe,{state:r,environmentId:t}),S.length>0?(0,Z.jsxs)(`div`,{role:`status`,className:`border-b px-3 py-2 text-xs text-muted-foreground`,children:[`Starting `,S.map(e=>e.name).join(`, `),`… This can take a minute.`]}):null,c?(0,Z.jsxs)(`div`,{role:`alert`,className:`flex items-start gap-2 border-b bg-destructive/5 px-3 py-2 text-xs text-destructive`,children:[(0,Z.jsx)(`p`,{className:`min-w-0 flex-1 whitespace-pre-wrap break-words`,children:c}),(0,Z.jsx)(E,{size:`icon-xs`,variant:`ghost`,"aria-label":`Dismiss device error`,onClick:()=>l(null),children:(0,Z.jsx)(u,{className:`size-3`})})]}):null,(0,Z.jsx)(`div`,{className:`@container relative flex min-h-0 flex-1`,children:_&&g?(0,Z.jsx)(We,{environmentId:t,device:_,hostLabel:r.hosts.find(e=>e.id===_.hostId)?.label??`Device host`,hostDiagnostics:r.hostStatusDetail,visible:e.visible,onFloat:b,onClose:()=>x(!1),onPowerOff:()=>x(!0)},`${t}\u0000${Ke(_)}`):d||T||!i?(0,Z.jsx)(ge,{name:d?.name??`Devices`,description:d?`${r.hosts.find(e=>e.id===d.hostId)?.label??`Device host`} · ${d.version}`:``,stage:`opening`,message:d?d.booted?`Opening device…`:`Starting device…`:r.hostStatus===`installing`?r.hostStatusDetail??`Installing device support…`:`Finding devices…`}):(0,Z.jsx)(`div`,{className:`scrollbar-gutter-both flex size-full flex-col overflow-y-auto px-5 py-8 text-sm text-muted-foreground`,children:(0,Z.jsxs)(`div`,{className:D(`mx-auto flex w-full max-w-xl flex-col gap-6`,v.length===0&&`my-auto items-center text-center`),children:[v.length===0?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(w,{className:`size-6 opacity-60`}),(0,Z.jsx)(`p`,{className:`max-w-sm`,children:r.hostStatus===`failed`?r.hostStatusDetail??`The device hub failed to start.`:`No simulators or emulators were found on this environment.`})]}):null,C&&v.length>0?(0,Z.jsx)(`div`,{className:`w-full space-y-6 text-left`,children:v.map(e=>(0,Z.jsxs)(`section`,{className:`space-y-3`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-2 text-sm text-muted-foreground`,children:[(0,Z.jsx)(w,{className:`size-4 shrink-0`}),(0,Z.jsx)(`h3`,{className:`font-medium`,children:Ge(e.platform)})]}),(0,Z.jsx)(W,{children:e.devices.map(e=>(0,Z.jsx)(me,{icon:(0,Z.jsx)(`span`,{className:`grid size-8 shrink-0 place-items-center rounded-md border border-border/60`,children:(0,Z.jsx)(w,{className:`size-4`})}),title:e.name,description:`${r.hosts.find(t=>t.id===e.hostId)?.label} · ${e.version} · ${e.booted?`Running`:`Stopped`}`,disabled:p!==null,"aria-label":`${e.booted?`Open`:`Start`} ${e.name}`,onClick:()=>void y(Ke(e)),action:p===Ke(e)?(0,Z.jsx)(te,{size:`xs`}):(0,Z.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:e.booted?`Open`:`Start`})},Ke(e)))})]},e.platform))}):null,C&&!r.devices.some(e=>e.platform===`android`)&&!O.some(e=>e.platform===`android`)?(0,Z.jsx)(`p`,{className:`max-w-sm text-xs`,children:`No Android virtual devices found. Create one in Android Studio's Device Manager, then refresh.`}):null,i&&!T?(0,Z.jsx)(E,{className:v.length>0?`self-start`:`self-center`,variant:v.length>0?`ghost`:`outline`,size:`sm`,onClick:()=>void a({environmentId:t,input:{}}),children:`Refresh devices`}):null]})})})]})}function Je(e){let t=[];for(let n of[`ios`,`android`]){let r=e.devices.filter(e=>e.platform===n).toSorted((e,t)=>Number(t.booted)-Number(e.booted)||e.name.localeCompare(t.name));r.length>0&&t.push({platform:n,devices:r})}return t}export{qe as DevicePanel};
|
|
2
|
-
//# sourceMappingURL=DevicePanel-CS1FTu-C.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{r as t}from"./Icon-l19w4AjM.js";import{C_ as n,NE as r,hd as i,lE as a,sr as o,t as s}from"./utils-BAPnqm16.js";import{t as c}from"./spinner-DHOdl-gn.js";import{c as l,g as u,l as d}from"./tooltip-DaSC-3cL.js";import{i as f,n as p}from"./session-Bo2ZSprC.js";import{t as m}from"./use-atom-command-GpCw1tWF.js";import{n as h}from"./dialog-DYFQxVoN.js";import{t as g}from"./device-CWgOLpbF.js";import{Aa as _,La as v,Na as y,ja as b,ka as x}from"./main-lV-t-UZx.js";var S=r(),C=e(t(),1),w=e(a(),1);function T(e){let t=(0,S.c)(15),{state:n,environmentId:r}=e,i=m(g.list),[a,s]=(0,C.useState)(null);if(n.hostStatus===`disabled`)return null;let c;if(t[0]!==r||t[1]!==a||t[2]!==i||t[3]!==n.hostStatuses||t[4]!==n.hosts||t[5]!==n.supportsHostRetry){let e;t[7]!==r||t[8]!==a||t[9]!==i||t[10]!==n.hostStatuses||t[11]!==n.supportsHostRetry?(e=e=>{let t=n.hostStatuses[e.id];if(!t||![`installing`,`starting`,`failed`].includes(t.status))return null;let c=t.status===`failed`;return(0,w.jsxs)(`div`,{role:c?`alert`:`status`,className:`flex items-start gap-3 rounded-md border border-border/60 px-3 py-2 text-xs`,children:[(0,w.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,w.jsx)(`p`,{className:`font-medium`,children:e.label}),(0,w.jsx)(`p`,{className:`whitespace-pre-wrap break-words text-muted-foreground`,children:t.detail??(c?`Device support could not start.`:t.status===`installing`?`Installing device tools…`:`Starting device tools…`)}),c?(0,w.jsx)(`p`,{className:`mt-1 text-muted-foreground`,children:`Check the host connection and network access, then retry. Your device settings are saved.`}):null]}),c&&n.supportsHostRetry?(0,w.jsx)(o,{size:`compact`,variant:`outline`,disabled:a!==null,onClick:()=>{s(e.id),i({environmentId:r,input:{retryHostId:e.id}}).finally(()=>s(null))},children:a===e.id?`Retrying…`:`Retry`}):null]},e.id)},t[7]=r,t[8]=a,t[9]=i,t[10]=n.hostStatuses,t[11]=n.supportsHostRetry,t[12]=e):e=t[12],c=n.hosts.map(e),t[0]=r,t[1]=a,t[2]=i,t[3]=n.hostStatuses,t[4]=n.hosts,t[5]=n.supportsHostRetry,t[6]=c}else c=t[6];let l;return t[13]===c?l=t[14]:(l=(0,w.jsx)(`div`,{className:`space-y-2`,children:c}),t[13]=c,t[14]=l),l}var E=e=>e===`ios`?`iOS`:`Android`,D=`Enable this environment to open simulators and emulators, whether they run here or on a remote device host.`,O=`Allow new agent sessions in this environment to start and control local and remote devices, with required tools set up automatically.`;function k(e,t){let n=e.hosts.flatMap(e=>e.platforms).find(e=>e.platform===t);return n?.available?e.hostStatus===`ready`&&!e.devices.some(e=>e.platform===t)?{ready:!1,message:t===`ios`?`Xcode is installed, but no iOS Simulator is available. Install a runtime in Xcode Settings → Components.`:`The Android SDK is installed, but no virtual device exists. Create one in Android Studio → Device Manager.`}:{ready:!0,message:t===`ios`?`Xcode and iOS Simulator are available.`:`The Android SDK and Emulator are available.`}:{ready:!1,message:n?.reason??`${E(t)} support was not detected.`}}function A(e){let t=f(e.environmentId,n),r=m(g.configure),i=m(g.list,{reportFailure:!1}),[a,c]=(0,C.useState)(null),[l,u]=(0,C.useState)(0),d=e.state.hostStatus!==`disabled`,S=e.state.hostStatus===`installing`||e.state.hostStatus===`starting`,E=e.state.hosts.some(e=>e.kind===`local`&&!e.platforms.some(e=>e.available)),k=async(t,n)=>{if(p(e.environmentId,`settings:write`)){c(t);try{let i=await r({environmentId:e.environmentId,input:n});t===`complete`&&i._tag===`Success`&&e.onComplete?.()}finally{c(null)}}};return(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(_,{title:`Set up devices`,description:`Review what runs on this environment before using simulators and emulators.`,children:(0,w.jsx)(y,{steps:[`Device hub`,`Simulators`,`Agent access`],currentStep:l,onStepChange:u,isStepDisabled:e=>S||a!==null||e>l})}),(0,w.jsxs)(b,{children:[(0,w.jsx)(T,{state:e.state,environmentId:e.environmentId}),l===0?(0,w.jsxs)(`section`,{className:`space-y-3 text-sm`,children:[(0,w.jsx)(`h3`,{className:`font-medium`,children:`Enable the device hub`}),(0,w.jsxs)(`div`,{className:`flex items-start justify-between gap-4`,children:[(0,w.jsx)(`p`,{className:`text-muted-foreground`,children:D}),(0,w.jsx)(v,{checked:d,disabled:!t||S||a!==null,"aria-label":`Enable device hub`,onCheckedChange:e=>void k(`hub`,{enabled:!!e,...e?{}:{agentAccessEnabled:!1}})})]}),(0,w.jsx)(j,{state:e.state,pending:a===`hub`||S&&a!==`agent`})]}):null,l===1||l===0&&d&&E?(0,w.jsxs)(`section`,{className:s(`space-y-3 text-sm`,l===0&&`mt-4`),children:[(0,w.jsx)(`h3`,{className:`font-medium`,children:`Check simulator support`}),(0,w.jsx)(M,{state:e.state,checking:a===`check`,disabled:!d||S||a!==null,onCheck:()=>{c(`check`),i({environmentId:e.environmentId,input:{}}).finally(()=>c(null))}})]}):null,l===2?(0,w.jsxs)(`section`,{className:`space-y-3 text-sm`,children:[(0,w.jsx)(`h3`,{className:`font-medium`,children:`Allow agent control`}),(0,w.jsxs)(`div`,{className:`flex items-start justify-between gap-4`,children:[(0,w.jsx)(`p`,{className:`text-muted-foreground`,children:O}),(0,w.jsx)(v,{checked:e.state.agentAccessEnabled,disabled:!t||!d||S||a!==null,"aria-label":`Allow agents to control devices`,onCheckedChange:e=>void k(`agent`,{agentAccessEnabled:!!e})})]}),(0,w.jsx)(N,{state:e.state,pending:a===`agent`}),(0,w.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Leave this off to keep manual device controls without giving agents access.`})]}):null,e.state.hostStatus===`failed`&&e.state.hostStatusDetail?(0,w.jsx)(`p`,{role:`alert`,className:`mt-3 text-xs text-destructive`,children:e.state.hostStatusDetail}):null]}),(0,w.jsxs)(x,{children:[l===0?(0,w.jsx)(h,{render:(0,w.jsx)(o,{variant:`outline`}),children:`Cancel`}):(0,w.jsx)(o,{variant:`outline`,disabled:S||a!==null,onClick:()=>u(l-1),children:`Back`}),l<2?(0,w.jsx)(o,{disabled:e.state.hostStatus!==`ready`||a!==null,onClick:()=>u(l+1),children:`Continue`}):(0,w.jsx)(o,{disabled:!t||e.state.hostStatus!==`ready`||a!==null,onClick:()=>void k(`complete`,{onboardingCompleted:!0}),children:a===`complete`?`Saving…`:`Done`})]})]})}function j(e){let t=(0,S.c)(5),{state:n,pending:r,compact:a}=e,o=a!==void 0&&a;if(!r&&n.hostStatus!==`ready`)return null;let s;t[0]===r?s=t[1]:(s=r?(0,w.jsx)(c,{size:`xs`}):(0,w.jsx)(i,{className:`size-3 text-success`}),t[0]=r,t[1]=s);let l=r?n.hostStatus===`installing`?o?`Installing…`:`Installing device hub…`:n.hostStatus===`starting`?o?`Starting…`:`Starting device hub…`:o?`Updating…`:`Updating device hub…`:`Device hub is ready.`,u;return t[2]!==s||t[3]!==l?(u=(0,w.jsxs)(`p`,{role:`status`,className:`flex items-center gap-2 text-xs text-muted-foreground`,children:[s,l]}),t[2]=s,t[3]=l,t[4]=u):u=t[4],u}function M(e){let t=(0,S.c)(20),n;t[0]===e.state?n=t[1]:(n=k(e.state,`ios`),t[0]=e.state,t[1]=n);let r;t[2]===n?r=t[3]:(r=(0,w.jsx)(F,{platform:`iOS`,status:n}),t[2]=n,t[3]=r);let i;t[4]===e.state?i=t[5]:(i=k(e.state,`android`),t[4]=e.state,t[5]=i);let a;t[6]===i?a=t[7]:(a=(0,w.jsx)(F,{platform:`Android`,status:i}),t[6]=i,t[7]=a);let s;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,w.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`You can use either platform. Fixing a missing platform does not block the other one.`}),t[8]=s):s=t[8];let l;t[9]===e.checking?l=t[10]:(l=e.checking?(0,w.jsx)(c,{size:`xs`}):null,t[9]=e.checking,t[10]=l);let u=e.checking?`Checking…`:`Check again`,d;t[11]!==e.disabled||t[12]!==e.onCheck||t[13]!==l||t[14]!==u?(d=(0,w.jsxs)(o,{size:`compact`,variant:`outline`,disabled:e.disabled,onClick:e.onCheck,children:[l,u]}),t[11]=e.disabled,t[12]=e.onCheck,t[13]=l,t[14]=u,t[15]=d):d=t[15];let f;return t[16]!==r||t[17]!==a||t[18]!==d?(f=(0,w.jsxs)(`div`,{className:`space-y-3`,children:[r,a,s,d]}),t[16]=r,t[17]=a,t[18]=d,t[19]=f):f=t[19],f}function N(e){let t=(0,S.c)(4);if(e.pending){let n=e.state.hostStatus===`installing`?e.compact?`Installing…`:`Installing agent tools…`:e.state.hostStatus===`starting`?e.compact?`Starting…`:`Starting agent tools…`:e.compact?`Updating…`:`Updating agent access…`,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,w.jsx)(c,{size:`xs`}),t[0]=r):r=t[0];let i;return t[1]===n?i=t[2]:(i=(0,w.jsxs)(`p`,{role:`status`,className:`flex items-center gap-2 text-xs text-muted-foreground`,children:[r,n]}),t[1]=n,t[2]=i),i}if(e.state.agentAccessEnabled&&e.state.hostStatus===`ready`&&e.state.hosts.some(P)){let e;return t[3]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,w.jsxs)(`p`,{role:`status`,className:`flex items-center gap-2 text-xs text-muted-foreground`,children:[(0,w.jsx)(i,{className:`size-3 text-success`}),`Agent tools are ready.`]}),t[3]=e):e=t[3],e}return null}function P(e){return e.agentDeviceInstalled}function F(e){let t=(0,S.c)(21),n=!e.compact&&`rounded-md border border-border/60 px-3 py-2`,r;t[0]===n?r=t[1]:(r=s(`flex gap-2`,n),t[0]=n,t[1]=r);let i=e.status.ready?`text-success`:`text-muted-foreground`,a;t[2]===i?a=t[3]:(a=s(`mt-0.5 size-4 shrink-0`,i),t[2]=i,t[3]=a);let o=e.status.ready?d:u,c;t[4]!==a||t[5]!==o?(c=(0,w.jsx)(l,{className:a,icon:o}),t[4]=a,t[5]=o,t[6]=c):c=t[6];let f=e.compact&&e.status.ready&&`flex items-center gap-2`,p;t[7]===f?p=t[8]:(p=s(f),t[7]=f,t[8]=p);let m;t[9]===e.platform?m=t[10]:(m=(0,w.jsx)(`p`,{className:`font-medium`,children:e.platform}),t[9]=e.platform,t[10]=m);let h=e.compact&&e.status.ready?`Ready`:e.status.message,g;t[11]===h?g=t[12]:(g=(0,w.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:h}),t[11]=h,t[12]=g);let _;t[13]!==g||t[14]!==p||t[15]!==m?(_=(0,w.jsxs)(`div`,{className:p,children:[m,g]}),t[13]=g,t[14]=p,t[15]=m,t[16]=_):_=t[16];let v;return t[17]!==r||t[18]!==_||t[19]!==c?(v=(0,w.jsxs)(`div`,{className:r,children:[c,_]}),t[17]=r,t[18]=_,t[19]=c,t[20]=v):v=t[20],v}export{O as a,T as c,F as i,j as n,D as o,A as r,k as s,N as t};
|
|
2
|
-
//# sourceMappingURL=DeviceSetup-DZAK0_tm.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{r as t}from"./Icon-l19w4AjM.js";import{NE as n,lE as r,sr as i,t as a}from"./utils-BAPnqm16.js";import{c as o,m as s,p as c}from"./tooltip-DaSC-3cL.js";import{I as l}from"./useSettings-CKA-LDDj.js";import{u as ee}from"./diffRendering-6DuM2rGF.js";import{c as te,i as ne,n as re,o as ie,r as ae,s as oe,t as se}from"./fileTreeExpansion-CA6c4E3-.js";import{t as ce}from"./pierre-icons-fSsw9aa-.js";var le=n(),u=e(t(),1);function d(e,t,n){let r=(0,le.c)(8),[i,a]=(0,u.useState)(null),o=(0,u.useRef)(null),s,c;r[0]!==n||r[1]!==i||r[2]!==t||r[3]!==e?(s=()=>{if(i!==null&&o.current!==i){if(i.scope!==t){o.current=i;return}!e?.getInstance()||n&&!n.includes(i.fileKey)||(e.scrollTo({type:`item`,id:i.fileKey,align:`start`}),o.current=i)}},c=[i,t,e,n],r[0]=n,r[1]=i,r[2]=t,r[3]=e,r[4]=s,r[5]=c):(s=r[4],c=r[5]),(0,u.useEffect)(s,c);let l;return r[6]===t?l=r[7]:(l=e=>a({fileKey:e,scope:t}),r[6]=t,r[7]=l),l}function f(e,t){return e.length>0&&e.every(e=>t.has(e))}function p(e,t){return f(e,t)?new Set:new Set(e)}function m(e){switch(e.type){case`new`:return`added`;case`deleted`:return`deleted`;case`rename-pure`:case`rename-changed`:return`renamed`;case`change`:return`modified`}}function h(e){let t=new Map;for(let n of e){let e=ee(n),r=m(n),i=t.get(e);t.set(e,i===void 0||i===r?r:`modified`)}return[...t].map(([e,t])=>({path:e,status:t}))}function ue(e){let t=new Set;for(let n of e){let e=n.split(`/`),r=``;for(let n of e.slice(0,-1))r+=`${n}/`,t.add(r)}return[...t]}function de(e){let t=new Map;return e.forEach((e,n)=>{t.set(e,n);let r=``;for(let i of e.split(`/`).slice(0,-1))r+=`${i}/`,t.has(r)||t.set(r,n)}),t}function g(e){return(t,n)=>{let r=e();return(r.get(t.path)??2**53-1)-(r.get(n.path)??2**53-1)||t.depth-n.depth||t.path.localeCompare(n.path)}}function _(e){return e.split(`/`).filter(Boolean).length}function fe(e,t){let n=new Set(ue(e)),r=new Set(ue(t)),i=new Set(e),a=new Set(t),o=[];for(let t of e)a.has(t)||o.push({type:`remove`,path:t});let s=[...n].filter(e=>!r.has(e)).toSorted((e,t)=>_(t)-_(e));for(let e of s)o.push({type:`remove`,path:e,recursive:!0});let c=[...r].filter(e=>!n.has(e)).toSorted((e,t)=>_(e)-_(t));for(let e of c)o.push({type:`add`,path:e});for(let e of t)i.has(e)||o.push({type:`add`,path:e});return o}var v=e(r(),1);function y(e){let t=(0,le.c)(64),{entries:n,onSelectFile:r,selectedPath:ee,revealRequestId:d,ariaLabel:f,headerAccessory:p,footer:m,className:h}=e,g=ee===void 0?null:ee,_=d===void 0?0:d,{resolvedTheme:y}=l(),b;t[0]===n?b=t[1]:(b=n.map(he),t[0]=n,t[1]=b);let x=b,S;t[2]===x?S=t[3]:(S=ue(x),t[2]=x,t[3]=S);let C=S,w;t[4]===x?w=t[5]:(w=de(x),t[4]=x,t[5]=w);let T=w,[E]=(0,u.useState)(me),D;t[6]===n?D=t[7]:(D=n.map(pe),t[6]=n,t[7]=D);let O=D,k;t[8]===x?k=t[9]:(k=new Set(x),t[8]=x,t[9]=k);let A=(0,u.useRef)(k),j=(0,u.useRef)(r),ge=(0,u.useRef)(!1),M=(0,u.useRef)(null),_e=(0,u.useRef)(null),N,P;t[10]!==r||t[11]!==x?(N=()=>{A.current=new Set(x),j.current=r},P=[r,x],t[10]=r,t[11]=x,t[12]=N,t[13]=P):(N=t[12],P=t[13]),(0,u.useEffect)(N,P);let F,I;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(F=e=>{if(ge.current)return;let t=e.at(-1)?.replace(/\/$/,``);t&&A.current.has(t)&&j.current(t)},I=[],t[14]=F,t[15]=I):(F=t[14],I=t[15]);let L;t[16]===E.sort?L=t[17]:(L={density:`compact`,flattenEmptyDirectories:!0,initialExpansion:`open`,icons:ce,onSelectionChange:F,paths:I,search:!1,sort:E.sort,unsafeCSS:ae},t[16]=E.sort,t[17]=L);let{model:R}=oe(L),z;t[18]===C?z=t[19]:(z=e=>se(e,C),t[18]=C,t[19]=z);let B=ie(R,z),V,H;t[20]!==C||t[21]!==O||t[22]!==R||t[23]!==E||t[24]!==x||t[25]!==T?(V=()=>{E.update(T);let e=_e.current;if(e!==x){if(_e.current=x,e===null)R.resetPaths(x);else if(e.every((e,t)=>x[t]===e)){let t=fe(e,x);t.length>0&&R.batch(t)}else{let e=C.filter(e=>{let t=R.getItem(e);return t!==null&&`isExpanded`in t&&!t.isExpanded()});R.resetPaths(x);for(let t of e){let e=R.getItem(t);e!==null&&`collapse`in e&&e.collapse()}}R.setGitStatus(O)}},H=[C,O,R,E,x,T],t[20]=C,t[21]=O,t[22]=R,t[23]=E,t[24]=x,t[25]=T,t[26]=V,t[27]=H):(V=t[26],H=t[27]),(0,u.useEffect)(V,H);let U;t[28]!==R||t[29]!==_||t[30]!==g?(U=()=>{if(g===null){M.current=null;return}let e=R.getItem(g);if(e===null||e.isDirectory()){M.current=null;return}let t=M.current;if(t?.path===g&&t.revealRequestId===_)return;M.current={path:g,revealRequestId:_},ge.current=!0;for(let e of R.getSelectedPaths())e!==g&&R.getItem(e)?.deselect();let n=``;for(let e of g.split(`/`).slice(0,-1)){n+=`${e}/`;let t=R.getItem(n);t!==null&&`expand`in t&&t.expand()}e.select(),R.scrollToPath(g,{offset:`nearest`}),queueMicrotask(()=>{ge.current=!1})},t[28]=R,t[29]=_,t[30]=g,t[31]=U):U=t[31];let W;t[32]!==R||t[33]!==x||t[34]!==_||t[35]!==g?(W=[R,x,_,g],t[32]=R,t[33]=x,t[34]=_,t[35]=g,t[36]=W):W=t[36],(0,u.useEffect)(U,W);let G;t[37]===h?G=t[38]:(G=a(`flex min-h-0 flex-1 flex-col bg-background`,h),t[37]=h,t[38]=G);let K;t[39]===Symbol.for(`react.memo_cache_sentinel`)?(K=(0,v.jsx)(`span`,{className:`px-1 font-medium text-foreground`,children:`Files`}),t[39]=K):K=t[39];let q;t[40]===n.length?q=t[41]:(q=(0,v.jsx)(`span`,{className:`ml-auto tabular-nums`,children:n.length}),t[40]=n.length,t[41]=q);let J;t[42]!==B||t[43]!==C||t[44]!==R?(J=C.length>0?(0,v.jsx)(i,{type:`button`,size:`icon-xs`,variant:`ghost`,"aria-label":B?`Collapse all folders`:`Expand all folders`,onClick:()=>re(R,C,!B),children:(0,v.jsx)(o,{className:`size-3.5`,icon:B?c:s})}):null,t[42]=B,t[43]=C,t[44]=R,t[45]=J):J=t[45];let Y;t[46]!==p||t[47]!==q||t[48]!==J?(Y=(0,v.jsxs)(`div`,{className:`flex h-10 min-h-10 shrink-0 items-center gap-1 border-b border-border/60 bg-background px-2 text-xs text-muted-foreground in-data-[preview-panel-mode=inline]:mb-3 in-data-[preview-panel-mode=inline]:h-7 in-data-[preview-panel-mode=inline]:min-h-7 in-data-[preview-panel-mode=inline]:border-b-transparent`,"data-surface-subheader":!0,children:[K,q,p,J]}),t[46]=p,t[47]=q,t[48]=J,t[49]=Y):Y=t[49];let X;t[50]===R?X=t[51]:(X=e=>{if(e.defaultPrevented||e.button!==0||e.ctrlKey||e.metaKey||e.shiftKey||e.altKey)return;let t=R.getSelectedPaths(),n=t.length===1?t[0]:void 0;n&&A.current.has(n)&&e.nativeEvent.composedPath().some(e=>e instanceof HTMLElement&&e.getAttribute(`data-item-path`)===n)&&j.current(n)},t[50]=R,t[51]=X);let Z;t[52]===y?Z=t[53]:(Z=ne(y),t[52]=y,t[53]=Z);let Q;t[54]!==f||t[55]!==R||t[56]!==X||t[57]!==Z?(Q=(0,v.jsx)(te,{model:R,"aria-label":f,onClickCapture:X,className:`min-h-0 flex-1 overflow-hidden`,style:Z}),t[54]=f,t[55]=R,t[56]=X,t[57]=Z,t[58]=Q):Q=t[58];let $;return t[59]!==m||t[60]!==G||t[61]!==Y||t[62]!==Q?($=(0,v.jsxs)(`div`,{className:G,children:[Y,Q,m]}),t[59]=m,t[60]=G,t[61]=Y,t[62]=Q,t[63]=$):$=t[63],$}function pe(e){return{path:e.path,status:e.status}}function me(){let e=new Map;return{sort:g(()=>e),update:t=>{e=t}}}function he(e){return e.path}export{d as a,p as i,h as n,f as r,y as t};
|
|
2
|
-
//# sourceMappingURL=DiffFileTree-DkLJXYZf.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{r as t}from"./Icon-l19w4AjM.js";import{$n as n,$o as r,A as i,Cx as a,D as o,Es as s,Gn as c,I as l,Kp as u,Lc as d,Mf as f,NE as p,Nv as m,Ox as h,Qn as g,Rd as _,Ub as v,Wp as ee,Xo as y,Yo as te,Zh as b,Zn as ne,Zo as re,ar as x,bs as ie,ff as ae,gd as S,hd as C,ir as oe,kp as se,lE as ce,or as le,qu as ue,rr as de,sr as w,t as T,ts as fe,xm as pe,xy as E,zS as D}from"./utils-BAPnqm16.js";import{M as O,N as k,R as A,W as j,Z as M,_t as me,j as N,k as P}from"./runtime-B9IDNXDU.js";import{s as F}from"./vcsRefInvalidation-DfCz0cGO.js";import{E as I,O as L,S as he}from"./entities-DCbEYTvn.js";import{t as ge}from"./runtime-B5cKWtKn.js";import{t as _e}from"./useParams-CoeDewwU.js";import{l as ve,p as ye}from"./toast-CN7Jd-pG.js";import{a as R,c as be,d as xe,l as Se,m as Ce,n as z,p as we,t as B,u as V,y as Te}from"./tooltip-DaSC-3cL.js";import{a as Ee,i as De,n as Oe,r as ke,t as Ae}from"./DiffFileTree-DkLJXYZf.js";import{f as je}from"./server-CoH7V4JL.js";import{n as Me}from"./query-B1uAr_ii.js";import{t as Ne}from"./use-atom-command-GpCw1tWF.js";import{d as Pe,f as Fe}from"./providerSkills-O72EMm0V.js";import{I as Ie,s as Le,v as Re}from"./useSettings-CKA-LDDj.js";import{t as ze,u as Be}from"./queries-DCKH7ltg.js";import{a as Ve,c as He,l as Ue,n as We,o as Ge,r as Ke,s as qe,u as H}from"./diffRendering-6DuM2rGF.js";import{F as Je,I as Ye,L as Xe,M as Ze,P as U}from"./PanelLayoutControls-DL7sleZ-.js";import{t as Qe}from"./DiffCommentAnnotation-Br9sOo_6.js";import{c as $e}from"./timestampFormat-wac2e_Jz.js";import{n as et}from"./fileCommentAnnotations-BgdL_7u9.js";import{n as tt,t as nt}from"./toggle-group-DekLc0Ax.js";import{i as rt,l as it,n as at,o as ot,r as st,s as ct,t as lt}from"./combobox-DSVavlIH.js";import{La as ut,Ra as dt,Wa as ft,qa as pt}from"./main-lV-t-UZx.js";import{A as mt,D as ht,E as W,O as gt,T as G,j as _t,k as vt,w as yt}from"./_chat-C2VZmKVT.js";var K=e(t(),1),q=p();function bt(e,t){let n=(0,q.c)(4),r=ze(e,t),i;return n[0]!==r.data||n[1]!==r.error||n[2]!==r.isPending?(i={data:r.data,error:r.error,isPending:r.isPending},n[0]=r.data,n[1]=r.error,n[2]=r.isPending,n[3]=i):i=n[3],i}var J=e(ce(),1);function xt(e){let t=(0,q.c)(17),{filePath:n}=e,r=(0,K.useRef)(null),i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i={onCopy:()=>ht(r),onError:e=>W(r,e),timeout:G},t[0]=i):i=t[0];let{copyToClipboard:a,isCopied:o}=ye(i),s;t[1]!==a||t[2]!==n?(s=(0,J.jsx)(w,{ref:r,size:`icon-micro`,variant:`ghost-muted`,"aria-label":`Copy file path`,onClick:()=>a(n,void 0)}),t[1]=a,t[2]=n,t[3]=s):s=t[3];let c=o&&`text-success`,l;t[4]===c?l=t[5]:(l=T(`size-3`,c),t[4]=c,t[5]=l);let u=o?Se:Te,d;t[6]!==l||t[7]!==u?(d=(0,J.jsx)(be,{className:l,icon:u}),t[6]=l,t[7]=u,t[8]=d):d=t[8];let f;t[9]!==s||t[10]!==d?(f=(0,J.jsx)(R,{render:s,children:d}),t[9]=s,t[10]=d,t[11]=f):f=t[11];let p=o?`Copied`:`Copy path`,m;t[12]===p?m=t[13]:(m=(0,J.jsx)(z,{children:(0,J.jsx)(`p`,{children:p})}),t[12]=p,t[13]=m);let h;return t[14]!==f||t[15]!==m?(h=(0,J.jsxs)(B,{children:[f,m]}),t[14]=f,t[15]=m,t[16]=h):h=t[16],h}var St=[];function Ct(e){return(e.endSide??e.side)===`deletions`?`deletions`:`additions`}function Y(e,t,n){let r=Ct(t),i=e.findIndex(e=>e.side===r&&e.lineNumber===t.end);return i<0?[...e,{side:r,lineNumber:t.end,metadata:{entries:[n]}}]:e.map((e,t)=>t===i?{...e,metadata:{entries:[...e.metadata.entries,n]}}:e)}function wt(e){let t=(0,q.c)(66),{codeViewKey:n,files:r,sectionId:a,sectionTitle:s,composerDraftTarget:c,options:u,viewerRef:d,className:f,renderCodeViewFooter:p,unsafeCSSExtra:m,renderHeaderMetadata:h,renderHeaderFilenameSuffix:g,renderHeaderPrefix:_,onRevealSearchMatch:v}=e,ee=o(kt),y=o(X),te;t[0]===c?te=t[1]:(te=e=>e.getComposerDraft(c)?.reviewComments??St,t[0]=c,t[1]=te);let b=o(te),[ne,re]=(0,K.useState)(null),[x,ie]=(0,K.useState)(null),[ae,S]=(0,K.useState)(``),C;t[2]===r?C=t[3]:(C=new Map(r.map(Ot)),t[2]=r,t[3]=C);let oe=C,se;if(t[4]!==x||t[5]!==r||t[6]!==b||t[7]!==a){let e;t[9]!==x||t[10]!==b||t[11]!==a?(e=e=>{let{fileDiff:t,filePath:n,fileKey:r,fileVersion:i,collapsed:o}=e,s=b.filter(e=>e.sectionId===a&&e.filePath===n&&(e.fenceLanguage??`diff`)===`diff`).reduce((e,n)=>{let r=l(t,n);return r?Y(e,r,{id:n.id,kind:`comment`,range:r,rangeLabel:n.rangeLabel,text:n.text}):e},[]),c=x?.fileKey===r?[...s,x.annotation]:s;return{id:r,type:`diff`,fileDiff:t,annotations:c,collapsed:o,version:Ve(`${i}:${o?`1`:`0`}:${c.flatMap(Et).join(`:`)}`)}},t[9]=x,t[10]=b,t[11]=a,t[12]=e):e=t[12],se=r.map(e),t[4]=x,t[5]=r,t[6]=b,t[7]=a,t[8]=se}else se=t[8];let ce=se,le;t[13]!==c||t[14]!==x?.annotation||t[15]!==y?(le=e=>{re(null),x?.annotation.metadata.entries.some(t=>t.id===e)?(ie(null),S(``)):y(c,e)},t[13]=c,t[14]=x?.annotation,t[15]=y,t[16]=le):le=t[16];let ue=le,de;t[17]!==ee||t[18]!==c||t[19]!==x||t[20]!==oe||t[21]!==a||t[22]!==s?(de=(e,t)=>{let n=x?.annotation.metadata.entries.find(t=>t.id===e),r=x?oe.get(x.fileKey):void 0;if(!n||!r)return;let o=i({id:n.id,sectionId:a,sectionTitle:s,filePath:r.filePath,fileDiff:r.fileDiff,range:n.range,text:t});o&&ee(c,o),re(null),ie(null),S(``)},t[17]=ee,t[18]=c,t[19]=x,t[20]=oe,t[21]=a,t[22]=s,t[23]=de):de=t[23];let w=de,T;t[24]!==a||t[25]!==s?(T=(e,t)=>{if(!e)return;let n=t.item;if(n.type!==`diff`)return;let r=et(),o=i({id:r,sectionId:a,sectionTitle:s,filePath:H(n.fileDiff),fileDiff:n.fileDiff,range:e,text:``});o&&(S(``),ie({fileKey:n.id,annotation:{side:Ct(e),lineNumber:e.end,metadata:{entries:[{id:r,kind:`draft`,range:e,rangeLabel:o.rangeLabel,text:``}]}}}))},t[24]=a,t[25]=s,t[26]=T):T=t[26];let fe=T,pe=x!==null,E;t[27]===d?E=t[28]:(E=d?{viewerRef:d}:{},t[27]=d,t[28]=E);let D;t[29]===f?D=t[30]:(D=f?{className:f}:{},t[29]=f,t[30]=D);let O;t[31]===m?O=t[32]:(O=m?{unsafeCSSExtra:m}:{},t[31]=m,t[32]=O);let k;t[33]===h?k=t[34]:(k=h?{renderHeaderMetadata:e=>e.type===`diff`?h(e.fileDiff):null}:{},t[33]=h,t[34]=k);let A;t[35]===p?A=t[36]:(A=p?{renderCodeViewFooter:p}:{},t[35]=p,t[36]=A);let j;t[37]===v?j=t[38]:(j=e=>v(e.id),t[37]=v,t[38]=j);let M=!pe,me=!pe,N;t[39]!==fe||t[40]!==u||t[41]!==M||t[42]!==me?(N={...u,enableGutterUtility:M,enableLineSelection:me,onGutterUtilityClick:fe},t[39]=fe,t[40]=u,t[41]=M,t[42]=me,t[43]=N):N=t[43];let P;t[44]===g?P=t[45]:(P=e=>e.type===`diff`?g(e.fileDiff):null,t[44]=g,t[45]=P);let F;t[46]===_?F=t[47]:(F=e=>e.type===`diff`?_(e.fileDiff,e.id,e.collapsed===!0):null,t[46]=_,t[47]=F);let I;t[48]!==ae||t[49]!==ue||t[50]!==w?(I=e=>{let t=e.metadata.entries.some(Tt);return(0,J.jsx)(`div`,{className:t?`py-1`:`divide-y divide-border/30 border-y border-border/30`,children:e.metadata.entries.map(e=>(0,J.jsx)(Qe,{kind:e.kind,rangeLabel:e.rangeLabel,text:e.kind===`draft`?ae:e.text,onTextChange:S,onCancel:()=>ue(e.id),onComment:t=>w(e.id,t),onDelete:()=>ue(e.id)},e.id))})},t[48]=ae,t[49]=ue,t[50]=w,t[51]=I):I=t[51];let L;return t[52]!==n||t[53]!==ce||t[54]!==ne||t[55]!==k||t[56]!==A||t[57]!==j||t[58]!==N||t[59]!==P||t[60]!==F||t[61]!==I||t[62]!==E||t[63]!==D||t[64]!==O?(L=(0,J.jsx)(U,{...E,...D,...O,...k,...A,items:ce,selectedLines:ne,onSelectedLinesChange:re,onRevealSearchMatch:j,options:N,renderHeaderFilenameSuffix:P,renderHeaderPrefix:F,renderAnnotation:I},n),t[52]=n,t[53]=ce,t[54]=ne,t[55]=k,t[56]=A,t[57]=j,t[58]=N,t[59]=P,t[60]=F,t[61]=I,t[62]=E,t[63]=D,t[64]=O,t[65]=L):L=t[65],L}function Tt(e){return e.kind===`draft`}function Et(e){return e.metadata.entries.map(Dt)}function Dt(e){return`${e.id}:${e.rangeLabel}:${e.text}`}function Ot(e){return[e.fileKey,e]}function X(e){return e.removeReviewComment}function kt(e){return e.addReviewComment}function At(e){let t=m(4),n=P();return{diffPreview:k(e,{label:`environment-data:review:diff-preview`,tag:d.reviewGetDiffPreview,staleTimeMs:5e3}),diffFilePatch:N(e,{label:`environment-data:review:diff-file-patch`,staleTimeMs:3e5,execute:e=>M(d.reviewGetDiffPreview,e.request).pipe(t.withPermit,h(t=>{let n=t.sources.find(t=>t.kind===e.request.file.sourceKind);return n?D(n):a(new b({operation:`review.diffFilePatch`,kind:`git`,detail:`Diff no longer available. Refresh the comparison.`}))}))}),diffFileContents:O(e,{label:`environment-data:review:diff-file-contents`,tag:d.reviewGetDiffFileContents,scheduler:n,concurrency:{mode:`singleFlight`,key:({environmentId:e,input:t})=>JSON.stringify([e,t.cwd,t.sourceKind,t.baseRef,t.headRef,t.oldPath,t.newPath,t.changeType])}})}}var jt=At(ge);function Mt(e){return e.remoteName&&e.name.startsWith(`${e.remoteName}/`)?e.name.slice(e.remoteName.length+1):e.name}function Nt(e,t){let n=new Set(t),r=e.map(e=>{let r=t.filter(t=>n.has(t)&&Mt(t)===e.name),i=r.find(e=>e.remoteName===`origin`)??r[0]??null;return i&&n.delete(i),{id:`local:${e.name}`,label:e.name,local:e,remote:i}}),i=t.filter(e=>n.has(e)).map(e=>({id:`remote:${e.name}`,label:e.name,local:null,remote:e}));return[...r,...i]}function Pt(e,t){let n=t.trim().toLocaleLowerCase();return n.length===0?e:e.filter(e=>e.label.toLocaleLowerCase().includes(n)||e.local?.name.toLocaleLowerCase().includes(n)===!0||e.remote?.name.toLocaleLowerCase().includes(n)===!0)}var Ft=new Intl.Collator(void 0,{numeric:!0,sensitivity:`base`});function It(e){let t=(0,q.c)(86),{environmentId:n,cwd:i,source:a,baseRef:o,ignoreWhitespace:s,theme:c,revision:l,preview:u}=e,d=(0,K.useContext)(y),f;t[0]!==o||t[1]!==i||t[2]!==n||t[3]!==s||t[4]!==a?.diffHash||t[5]!==a?.kind?(f=JSON.stringify([n,i,a?.kind,a?.diffHash,o,s]),t[0]=o,t[1]=i,t[2]=n,t[3]=s,t[4]=a?.diffHash,t[5]=a?.kind,t[6]=f):f=t[6];let p=f,m;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(m=[0,1,2,3],t[7]=m):m=t[7];let h;t[8]===p?h=t[9]:(h={scope:p,indices:m},t[8]=p,t[9]=h);let[g,_]=(0,K.useState)(h),v;t[10]!==g.indices||t[11]!==g.scope||t[12]!==p?(v=g.scope===p?g.indices:[0,1,2,3],t[10]=g.indices,t[11]=g.scope,t[12]=p,t[13]=v):v=t[13];let ee=v,b;t[14]===a?.files?b=t[15]:(b=()=>a?.files?.toSorted(Q)??[],t[14]=a?.files,t[15]=b),a?.files;let ne;t[16]===b?ne=t[17]:(ne=b(),t[16]=b,t[17]=ne);let x=ne,ae;t[18]!==o||t[19]!==i||t[20]!==n||t[21]!==x||t[22]!==s||t[23]!==ee||t[24]!==p||t[25]!==a?(ae=!n||!i||!a?[]:ee.filter(e=>e<x.length).map(e=>{let t=x[e];return{index:e,query:jt.diffFilePatch({environmentId:n,input:{cacheKey:p,request:{cwd:i,...o?{baseRef:o}:{},ignoreWhitespace:s,file:{path:t.path,previousPath:t.previousPath,sourceKind:a.kind}}}})}}),t[18]=o,t[19]=i,t[20]=n,t[21]=x,t[22]=s,t[23]=ee,t[24]=p,t[25]=a,t[26]=ae):ae=t[26];let S=ae,C;t[27]===Symbol.for(`react.memo_cache_sentinel`)?(C=[],t[27]=C):C=t[27];let oe;t[28]!==l||t[29]!==p?(oe={scope:p,revision:l,queries:C},t[28]=l,t[29]=p,t[30]=oe):oe=t[30];let se=(0,K.useRef)(oe),ce,le;t[31]!==S||t[32]!==d||t[33]!==l||t[34]!==p?(ce=()=>{let e=se.current;se.current={scope:p,revision:l,queries:S};for(let{query:t}of S){let n=e.scope===p&&e.revision!==l,r=!e.queries.some(e=>e.query===t)&&d.get(t)._tag!==`Initial`&&!d.get(t).waiting;(n||r)&&d.refresh(t)}},le=[p,l,S,d],t[31]=S,t[32]=d,t[33]=l,t[34]=p,t[35]=ce,t[36]=le):(ce=t[35],le=t[36]),(0,K.useEffect)(ce,le);let ue;t[37]===c?ue=t[38]:(ue=re(e=>fe(e,e=>ie(e,e=>{let t=He(e.diff,`diff-panel:${c}`,{compactPartialHunkOffsets:!0});if(t?.kind===`files`&&t.files.length===1&&e.files?.length===1){let n=e.files[0],r={...t.files[0],name:n.path};n.previousPath===null?delete r.prevName:r.prevName=n.previousPath,t={...t,files:[r]}}return{source:e,patch:t}}))),t[37]=c,t[38]=ue);let de=ue,w;t[39]!==de||t[40]!==S?(w=r(e=>new Map(S.map(t=>{let{index:n,query:r}=t;return[n,e(de(r))]}))),t[39]=de,t[40]=S,t[41]=w):w=t[41];let T=te(w),pe;t[42]===T?pe=t[43]:(pe=(e,t)=>{let n=T.get(t);return!n||n._tag===`Initial`},t[42]=T,t[43]=pe);let E=x.findIndex(pe),D=a?E<0?x.length:E:u?.kind===`files`?u.files.length:0,O;t[44]===p?O=t[45]:(O=e=>_(t=>{let n=t.scope===p?t.indices:[0,1,2,3],r=e.filter(e=>!n.includes(e));return r.length===0?t:{scope:p,indices:[...n,...r]}}),t[44]=p,t[45]=O);let k=O,A;t[46]!==k||t[47]!==D?(A=()=>k(Array.from({length:4},(e,t)=>D+t)),t[46]=k,t[47]=D,t[48]=A):A=t[48];let j=A,M;t[49]===k?M=t[50]:(M=e=>k([e]),t[49]=k,t[50]=M);let me=M,N;t[51]!==x||t[52]!==S?(N={queries:S,files:x},t[51]=x,t[52]=S,t[53]=N):N=t[53];let P=(0,K.useRef)(N),F,I;t[54]!==x||t[55]!==S?(F=()=>{P.current={queries:S,files:x}},I=[S,x],t[54]=x,t[55]=S,t[56]=F,t[57]=I):(F=t[56],I=t[57]),(0,K.useLayoutEffect)(F,I);let L;t[58]===d?L=t[59]:(L=e=>{let{queries:t,files:n}=P.current,r=t.find(t=>{let{index:r}=t;return n[r]?.path===e})?.query;r&&d.refresh(r)},t[58]=d,t[59]=L);let he=L,ge;t[60]!==x||t[61]!==T||t[62]!==u||t[63]!==p||t[64]!==a?(ge=a?x.map((e,t)=>{let n=T.get(t);if(n?._tag===`Success`&&n.value.patch?.kind===`files`){let t=n.value.patch.files.find(t=>H(t)===e.path);if(t)return t}return{name:e.path,...e.previousPath?{prevName:e.previousPath}:{},type:e.previousPath?`rename-changed`:`change`,hunks:[],additionLines:[],deletionLines:[],splitLineCount:0,unifiedLineCount:0,isPartial:!0,cacheKey:`${p}:${e.path}:pending`}}):(u?.kind===`files`?u.files:[]).toSorted(Rt),t[60]=x,t[61]=T,t[62]=u,t[63]=p,t[64]=a,t[65]=ge):ge=t[65];let _e=ge,ve;if(t[66]!==x||t[67]!==T){let e;t[69]===T?e=t[70]:(e=(e,t)=>{let n=T.get(t);return[e.path,{error:n?._tag===`Failure`||n?._tag===`Success`&&(n.value.patch?.kind!==`files`||!n.value.patch.files.some(t=>H(t)===e.path)),truncated:n?._tag===`Success`&&n.value.source.truncated}]},t[69]=T,t[70]=e),ve=new Map(x.map(e)),t[66]=x,t[67]=T,t[68]=ve}else ve=t[68];let ye=ve,R;if(t[71]!==x||t[72]!==T){let e;t[74]===T?e=t[75]:(e=(e,t)=>{let n=T.get(t);return n&&n._tag!==`Initial`},t[74]=T,t[75]=e),R=new Set(x.filter(e).map(Lt)),t[71]=x,t[72]=T,t[73]=R}else R=t[73];let be=R,xe=[...T.values()].some(Z),Se;return t[76]!==ye||t[77]!==j||t[78]!==be||t[79]!==_e||t[80]!==me||t[81]!==he||t[82]!==p||t[83]!==D||t[84]!==xe?(Se={scope:p,fileStates:ye,isPending:xe,retry:he,requestFile:me,readyFilePaths:be,renderableFiles:_e,settledFileCount:D,loadNextFiles:j},t[76]=ye,t[77]=j,t[78]=be,t[79]=_e,t[80]=me,t[81]=he,t[82]=p,t[83]=D,t[84]=xe,t[85]=Se):Se=t[85],Se}function Z(e){return e._tag===`Initial`||e.waiting}function Lt(e){return e.path}function Rt(e,t){return Ft.compare(H(e),H(t))}function Q(e,t){return Ft.compare(e.path,t.path)}function zt(e){let t=(0,q.c)(5),{load:n,count:r}=e,i=(0,K.useRef)(null),a,o;t[0]===n?(a=t[1],o=t[2]):(a=()=>{if(!i.current)return;let e=new IntersectionObserver(e=>{e.some(Vt)&&n()},{rootMargin:`600px`});return e.observe(i.current),()=>e.disconnect()},o=[n],t[0]=n,t[1]=a,t[2]=o),(0,K.useEffect)(a,o);let s;return t[3]===r?s=t[4]:(s=(0,J.jsx)(`div`,{ref:i,role:`status`,"aria-label":`Loading diff…`,children:Array.from({length:Math.min(r,4)},Bt)}),t[3]=r,t[4]=s),s}function Bt(e,t){return(0,J.jsx)(`div`,{"aria-hidden":!0,className:`border-b border-border/40`,children:(0,J.jsx)(Je,{titleWidth:`medium`})},t)}function Vt(e){return e.isIntersecting}function Ht(e){let t=(0,q.c)(16),{error:n,truncated:r,retry:i}=e;if(!n&&!r)return null;let a=n?`Retry loading diff`:`Partial diff preview`,o;t[0]!==n||t[1]!==i?(o=e=>{e.stopPropagation(),n&&i()},t[0]=n,t[1]=i,t[2]=o):o=t[2];let s;t[3]!==a||t[4]!==o?(s=(0,J.jsx)(w,{size:`icon-micro`,variant:`ghost-muted`,"aria-label":a,onClick:o}),t[3]=a,t[4]=o,t[5]=s):s=t[5];let c;t[6]===n?c=t[7]:(c=n?(0,J.jsx)(ee,{className:`size-3`}):(0,J.jsx)(f,{className:`size-3`}),t[6]=n,t[7]=c);let l;t[8]!==s||t[9]!==c?(l=(0,J.jsx)(R,{render:s,children:c}),t[8]=s,t[9]=c,t[10]=l):l=t[10];let u=n?`Retry loading diff`:`This file is too large to show in full. Counts include all changes.`,d;t[11]===u?d=t[12]:(d=(0,J.jsx)(z,{children:u}),t[11]=u,t[12]=d);let p;return t[13]!==l||t[14]!==d?(p=(0,J.jsxs)(B,{children:[l,d]}),t[13]=l,t[14]=d,t[15]=p):p=t[15],p}var Ut=`__automatic_base_ref__`,Wt=`t3code.diffFileTreeOpen`,Gt=new WeakMap;function Kt(e){let t=Gt.get(e);if(t)return t;let n={fileDiff:e,fileKey:Ke(e),fileVersion:We(e)};return Gt.set(e,n),n}var qt=new Set;function Jt(e){let t=(0,q.c)(21),{filePath:n,fileKey:r,collapsed:i,unavailable:a,iconClassName:o,onToggle:s}=e,c=i?`Expand ${n}`:`Collapse ${n}`,l=!i,u;t[0]!==r||t[1]!==s?(u=e=>{e.stopPropagation(),s(r)},t[0]=r,t[1]=s,t[2]=u):u=t[2];let d;t[3]!==c||t[4]!==l||t[5]!==u||t[6]!==a?(d=(0,J.jsx)(w,{size:`icon-micro`,variant:`ghost`,className:`-ms-0.5`,"aria-label":c,"aria-expanded":l,disabled:a,onClick:u}),t[3]=c,t[4]=l,t[5]=u,t[6]=a,t[7]=d):d=t[7];let f;t[8]===o?f=t[9]:(f=T(`size-4`,o),t[8]=o,t[9]=f);let p=i?xe:V,m;t[10]!==f||t[11]!==p?(m=(0,J.jsx)(be,{className:f,icon:p}),t[10]=f,t[11]=p,t[12]=m):m=t[12];let h;t[13]!==d||t[14]!==m?(h=(0,J.jsx)(R,{render:d,children:m}),t[13]=d,t[14]=m,t[15]=h):h=t[15];let g=i?`Expand diff`:`Collapse diff`,_;t[16]===g?_=t[17]:(_=(0,J.jsx)(z,{side:`top`,children:g}),t[16]=g,t[17]=_);let v;return t[18]!==_||t[19]!==h?(v=(0,J.jsxs)(B,{children:[h,_]}),t[18]=_,t[19]=h,t[20]=v):v=t[20],v}function Yt(e){let t=(0,q.c)(11),{filePath:n,hasStat:r,error:i,truncated:a,onRetry:o}=e,s;t[0]===n?s=t[1]:(s=(0,J.jsx)(xt,{filePath:n}),t[0]=n,t[1]=s);let c;t[2]!==i||t[3]!==n||t[4]!==r||t[5]!==o||t[6]!==a?(c=r?(0,J.jsx)(Ht,{error:i,truncated:a,retry:()=>o(n)}):null,t[2]=i,t[3]=n,t[4]=r,t[5]=o,t[6]=a,t[7]=c):c=t[7];let l;return t[8]!==s||t[9]!==c?(l=(0,J.jsxs)(J.Fragment,{children:[s,c]}),t[8]=s,t[9]=c,t[10]=l):l=t[10],l}function Xt({mode:e=`inline`,composerDraftTarget:t,workspaceMutationId:r}){let{resolvedTheme:i}=Ie(),a=Le(),o=a.diffLayout,l=Re(),[d,f]=(0,K.useState)(a.wordWrap),[p,m]=(0,K.useState)(a.diffIgnoreWhitespace),[h,ee]=s(Wt,!1,E),[y,b]=(0,K.useState)(``),[re,ie]=(0,K.useState)(()=>({scopeKey:null,fileKeys:qt})),[ce,fe]=(0,K.useState)(0),[D,O]=(0,K.useState)(null),k=_e({strict:!1,select:e=>ve(e)}),M=k?.threadId??null,N=L(k),P=I(k)?.projection??null,ge=F(N?.environmentId??null),{canReadFiles:ye}=ge,xe=N?.projectId??null,Se=he(N&&xe?{environmentId:N.environmentId,projectId:xe}:null),V=N?.worktreePath??Se?.workspaceRoot,Te=N?.worktreePath?void 0:Se?.repositoryIdentity?.rootPath,ze=te(je.configValueAtom(N?.environmentId??null)),Ve=Pe(N?.environmentId??null),We=ft(N?.environmentId??null,ze?.availableEditors??[]),Ke=Ne(jt.diffFileContents),Je=Me(N!=null&&V!=null?Be.status({environmentId:N.environmentId,input:{cwd:V}}):null),U=_t(e=>mt(e.byThreadKey,k)),Qe=Je.data?.isRepo??!0,{turnDiffSummaries:et,inferredCheckpointTurnCountByRunId:ht}=vt(P),W=(0,K.useMemo)(()=>[...et].toSorted((e,t)=>{let n=e.checkpointTurnCount??ht[e.runId]??0,r=t.checkpointTurnCount??ht[t.runId]??0;return n===r?t.completedAt.localeCompare(e.completedAt):r-n}),[ht,et]);(0,K.useEffect)(()=>{k&&U.kind===`turn`&&_t.getState().reconcileTurnSelection(k,W.map(e=>e.runId))},[U,W,k]);let G=U.kind===`turn`?U.turnId:null,q=U.kind===`unstaged`?`unstaged`:`branch`,xt=U.kind===`branch`?U.baseRef:null,St=U.kind===`turn`?U.filePath:null,Ct=U.kind===`turn`?U.revealRequestId:0,Y=G===null?void 0:W.find(e=>e.runId===G)??W[0],Tt=Y&&(Y.checkpointTurnCount??ht[Y.runId]),Et=W[0],Dt=G===null?q===`unstaged`?`Uncommitted`:`Changes`:Y?.runId===Et?.runId?`Latest turn`:`Turn ${Tt??`?`}`,Ot=Y?`turn:${Y.runId}`:q,X=k?`${k.environmentId}:${k.threadId}:${Ot}`:null,kt=`${X??Ot}:${ce}`,At=Y?`Turn ${Tt??`?`}`:q===`unstaged`?`Uncommitted`:`Changes`,Mt=(0,K.useMemo)(()=>typeof Tt==`number`?{fromTurnCount:Math.max(0,Tt-1),toTurnCount:Tt}:null,[Tt]),Ft=bt({environmentId:N?.environmentId??null,threadId:M,fromTurnCount:Mt?.fromTurnCount??null,toTurnCount:Mt?.toTurnCount??null,ignoreWhitespace:p,cacheScope:Y?`turn:${Y.runId}`:null},{enabled:Qe&&Y!==void 0}),Z=Me(ye&&G===null&&N&&V?jt.diffPreview({environmentId:N.environmentId,input:{cwd:V,...xt?{baseRef:xt}:{},ignoreWhitespace:p}}):null),Lt=Qe&&G===null&&N!=null&&V!=null,Rt=k?`${k.environmentId}:${k.threadId}`:null,Q=Z.data?.sources.find(e=>e.kind===(q===`unstaged`?`working-tree`:`branch-range`)),Bt=Z.refresh,Vt=Bt,Ht=(0,K.useMemo)(()=>{let e=Z.data;if(G===null&&N&&e&&Q&&ye)return Ze(Ke,{environmentId:N.environmentId,cwd:e.cwd,sourceKind:Q.kind,baseRef:Q.baseRef,headRef:Q.headRef,cacheKey:Q.diffHash})},[N,Z.data,Ke,ye,Q,G]),Gt=(0,K.useRef)(Ht);Gt.current=Ht;let Xt=(0,K.useCallback)(async e=>{let t=Gt.current;if(!t)throw Error(`Diff file contents are unavailable for this selection.`);return t(e)},[]),Zt=Me(G===null&&q===`branch`&&N&&Z.data?.cwd?Be.listRefs({environmentId:N.environmentId,input:{cwd:Z.data.cwd,includeMatchingRemoteRefs:!0,refKind:`local`,...y.trim().length>0?{query:y.trim()}:{},limit:100}}):null),Qt=Me(G===null&&q===`branch`&&N&&Z.data?.cwd?Be.listRefs({environmentId:N.environmentId,input:{cwd:Z.data.cwd,includeMatchingRemoteRefs:!0,refKind:`remote`,...y.trim().length>0?{query:y.trim()}:{},limit:100}}):null),$t=Nt(Zt.data?.refs.filter(e=>e.name!==Q?.headRef)??[],Qt.data?.refs??[]),en=Pt($t,y),tn=e=>xt&&xt===e.remote?.name?xt:e.local?.name??e.remote?.name??e.id,nn=[Ut,...$t.map(tn)],rn=[...y.trim().length===0?[Ut]:[],...en.map(tn)],an=Q?.diff,on=Y?Ft.data?.diff:an,sn=!Y&&Q?.truncated===!0,cn=Y?Ft.isPending:Z.isPending,ln=Y?Ft.error:Z.error,un=typeof on==`string`&&on.trim().length===0,$=!Y&&Q?.truncated&&Q.files?Q:null,dn=(0,K.useMemo)(()=>$?null:He(on,`diff-panel:${i}`,{compactPartialHunkOffsets:G===null}),[$,i,on,G]),fn=(0,K.useMemo)(()=>new Map($?.files?.map(e=>[e.path,e])),[$?.files]),{scope:pn,isPending:mn,fileStates:hn,retry:gn,requestFile:_n,readyFilePaths:vn,renderableFiles:yn,settledFileCount:bn,loadNextFiles:xn}=It({environmentId:N?.environmentId,cwd:Z.data?.cwd,source:$,baseRef:$?.baseRef??xt,ignoreWhitespace:p,theme:i,revision:Z.data?v(Z.data.generatedAt):void 0,preview:dn}),Sn=Bt;(0,K.useEffect)(()=>{if(!Lt)return;let e=()=>Sn();return window.addEventListener(`focus`,e),()=>window.removeEventListener(`focus`,e)},[Lt,Sn]),gt({enabled:Lt,mutationId:r,refresh:Sn,resourceKey:`diff:${Rt??``}`});let Cn=Z.isPending||mn,wn=(0,K.useMemo)(()=>yn.map(Kt),[yn]),Tn=(0,K.useMemo)(()=>a.diffFilesCollapsed?new Set(wn.map(e=>e.fileKey)):qt,[wn,a.diffFilesCollapsed]),En=re.scopeKey===X?re.fileKeys:Tn,Dn=(0,K.useCallback)(()=>bn<yn.length?(0,J.jsx)(zt,{load:xn,count:yn.length-bn}):null,[bn,yn.length,xn]),On=(0,K.useMemo)(()=>wn.filter(({fileDiff:e})=>!$||vn.has(H(e))).map(({fileDiff:e,fileKey:t,fileVersion:n})=>({fileDiff:e,filePath:H(e),fileKey:t,fileVersion:n,collapsed:En.has(t)||e.cacheKey?.endsWith(`:pending`)===!0})),[En,wn,$,vn]),kn=(0,K.useMemo)(()=>wn.map(e=>e.fileKey),[wn]),An=ke(kn,En),jn=(0,K.useMemo)(()=>!Y&&Q?.files?Q.files.reduce((e,t)=>({additions:e.additions+t.additions,deletions:e.deletions+t.deletions}),{additions:0,deletions:0}):qe(yn),[yn,Q,Y]),Mn=(0,K.useMemo)(()=>Oe(yn),[yn]),Nn=St?On.find(e=>e.filePath===St)?.fileKey??null:null;(0,K.useEffect)(()=>{Nn&&D?.getInstance()&&D.scrollTo({type:`item`,id:Nn,align:`start`})},[D,kt,Nn,Ct]);let Pn=(0,K.useMemo)(()=>({collapseScopeKey:X,diffSelection:U}),[X,U]),Fn=Ee(D,Pn,On.map(e=>e.fileKey)),In=(0,K.useCallback)(e=>{let t=wn.findIndex(t=>H(t.fileDiff)===e),n=wn[t];n&&(ie(e=>{let t=new Set(e.scopeKey===X?e.fileKeys:Tn);return t.delete(n.fileKey),{scopeKey:X,fileKeys:t}}),$&&t>=bn&&_n(t),Fn(n.fileKey))},[wn,X,Tn,Fn,$,bn,_n]),Ln=(0,K.useRef)(null);(0,K.useEffect)(()=>{if(!$||!St)return;let e=`${St}:${Ct}`;(Ln.current?.cache!==pn||Ln.current.key!==e)&&(Ln.current={cache:pn,key:e},In(St))},[$,St,Ct,pn,In]);let Rn=(0,K.useCallback)(e=>{Fe({threadRef:k,filePath:e,activeCwd:V,repositoryRoot:Te,openInEditor:e=>{(async()=>{let t=await We(e);t._tag===`Failure`&&!A(t)&&console.warn(`Failed to open diff file in editor.`,{operation:`open-diff-file`,...k?{environmentId:k.environmentId,threadId:k.threadId}:{},...me(j(t))})})()}})},[V,Te,We,k]),zn=(0,K.useRef)({collapseScopeKey:X,defaultCollapsedDiffFileKeys:Tn});(0,K.useLayoutEffect)(()=>{zn.current={collapseScopeKey:X,defaultCollapsedDiffFileKeys:Tn}},[X,Tn]);let Bn=(0,K.useCallback)(e=>{let{collapseScopeKey:t,defaultCollapsedDiffFileKeys:n}=zn.current;ie(r=>{let i=new Set(r.scopeKey===t?r.fileKeys:n);return i.has(e)?i.delete(e):i.add(e),{scopeKey:t,fileKeys:i}})},[]),Vn=(0,K.useCallback)(e=>{let{collapseScopeKey:t,defaultCollapsedDiffFileKeys:n}=zn.current;ie(r=>{let i=r.scopeKey===t?r.fileKeys:n;if(!i.has(e))return r;let a=new Set(i);return a.delete(e),{scopeKey:t,fileKeys:a}})},[]),Hn=(0,K.useCallback)(()=>{fe(e=>e+1),ie(e=>{let t=e.scopeKey===X?e.fileKeys:Tn;return{scopeKey:X,fileKeys:De(kn,t)}})},[X,Tn,kn]),Un=e=>{k&&_t.getState().selectTurn(k,e)},Wn=e=>{k&&_t.getState().selectGitScope(k,e)},Gn=e=>{k&&_t.getState().selectBranchBaseRef(k,e)},Kn=Y?`turn:${Y.runId}`:``,qn=G===null?q:Y?.runId===Et?.runId?`latest`:Kn,Jn=e=>{if(e===`unstaged`||e===`branch`)Wn(e);else if(e===`latest`)Et&&Un(Et.runId);else{let t=W.find(t=>`turn:${t.runId}`===e);t&&Un(t.runId)}},Yn=(0,J.jsxs)(J.Fragment,{children:[(0,J.jsxs)(`div`,{className:`flex min-w-0 flex-1 items-center gap-3 [-webkit-app-region:no-drag]`,children:[(0,J.jsxs)(c,{children:[(0,J.jsxs)(le,{render:(0,J.jsx)(w,{size:`xs`,variant:`secondary`}),className:`max-w-full`,"aria-label":`Diff scope: ${Dt}`,children:[(0,J.jsx)(`span`,{className:`truncate`,children:Dt}),(0,J.jsx)(S,{className:`size-3.5 shrink-0 opacity-70`})]}),(0,J.jsxs)(ne,{align:`start`,children:[(0,J.jsxs)(g,{value:qn,onValueChange:Jn,children:[(0,J.jsx)(n,{value:`branch`,closeOnClick:!0,children:(0,J.jsx)(`span`,{children:`Changes`})}),(0,J.jsx)(n,{value:`unstaged`,closeOnClick:!0,children:(0,J.jsx)(`span`,{children:`Uncommitted`})}),(0,J.jsx)(n,{value:`latest`,closeOnClick:!0,children:(0,J.jsx)(`span`,{children:`Latest turn`})})]}),(0,J.jsxs)(de,{children:[(0,J.jsx)(x,{children:`Turn`}),(0,J.jsx)(oe,{children:(0,J.jsx)(g,{value:Kn,onValueChange:Jn,children:W.map(e=>{let t=e.checkpointTurnCount??ht[e.runId]??`?`;return(0,J.jsx)(n,{value:`turn:${e.runId}`,closeOnClick:!0,children:(0,J.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,J.jsxs)(`span`,{children:[`Turn `,t]}),(0,J.jsx)(`span`,{className:`ml-auto text-xs tabular-nums text-muted-foreground`,children:$e(e.completedAt,a.timestampFormat)})]})},e.runId)})})})]})]})]}),G===null&&q===`branch`&&Q?.baseRef&&(0,J.jsxs)(`div`,{className:`flex min-w-0 max-w-full items-center gap-2 overflow-hidden text-xs text-muted-foreground`,"aria-label":`Comparing ${Q.headRef??`HEAD`} against ${Q.baseRef}`,children:[(0,J.jsxs)(B,{children:[(0,J.jsxs)(R,{render:(0,J.jsx)(`span`,{className:`flex min-w-0 items-center gap-2`}),children:[(0,J.jsx)(`span`,{className:`min-w-0 max-w-48 truncate`,children:Q.headRef??`HEAD`}),(0,J.jsx)(ue,{className:`size-3.5 shrink-0 opacity-70`})]}),(0,J.jsx)(z,{side:`top`,children:`${Q.headRef??`HEAD`} → ${Q.baseRef}`})]}),(0,J.jsxs)(lt,{items:nn,filteredItems:rn,value:xt??Ut,onOpenChange:e=>{e||b(``)},onValueChange:e=>{e&&Gn(e===Ut?null:e)},children:[(0,J.jsxs)(it,{render:(0,J.jsx)(w,{variant:`ghost-muted`,size:`xs`}),className:`min-w-0 max-w-48`,"aria-label":`Change comparison target. Currently ${Q.baseRef}`,children:[(0,J.jsx)(`span`,{className:`min-w-0 truncate`,children:Q.baseRef}),(0,J.jsx)(S,{className:`size-3.5 shrink-0 opacity-70`})]}),(0,J.jsxs)(ot,{align:`start`,className:`w-72 min-w-0 max-w-[calc(100vw-1rem)] overflow-hidden`,children:[(0,J.jsx)(ct,{placeholder:`Search refs...`,value:y,onChange:e=>b(e.target.value)}),(0,J.jsxs)(`div`,{className:`grid shrink-0 grid-cols-[1rem_minmax(0,1fr)] items-center gap-2 border-b border-border/70 ps-3 pe-6.5 pt-2 pb-1.5 font-medium text-3xs text-muted-foreground uppercase tracking-wide`,children:[(0,J.jsx)(`span`,{"aria-hidden":`true`}),(0,J.jsxs)(`div`,{className:`grid min-w-0 grid-cols-[minmax(0,1fr)_2rem] items-center`,children:[(0,J.jsx)(`span`,{children:`Branch`}),(0,J.jsx)(`span`,{className:`text-right`,children:`Remote`})]})]}),(0,J.jsx)(at,{children:`No matching refs.`}),(0,J.jsxs)(rt,{className:`max-h-64 min-w-0 overflow-x-hidden`,children:[(0,J.jsx)(st,{className:`w-full min-w-0 grid-cols-[1rem_minmax(0,1fr)]`,value:Ut,children:(0,J.jsx)(`span`,{className:`block min-w-0 truncate`,children:`Automatic`})}),$t.map(e=>{let t=tn(e),n=e.local!==null&&e.remote!==null,r=e.remote?.name===t;return(0,J.jsx)(st,{className:`w-full min-w-0 grid-cols-[1rem_minmax(0,1fr)]`,value:t,children:(0,J.jsxs)(`div`,{className:`grid w-full min-w-0 grid-cols-[minmax(0,1fr)_2rem] items-center overflow-hidden`,children:[(0,J.jsx)(`span`,{className:`block min-w-0 truncate pe-2`,children:e.label}),n?(0,J.jsx)(`div`,{className:`flex justify-end`,onClick:e=>e.stopPropagation(),onPointerDown:e=>e.stopPropagation(),children:(0,J.jsx)(ut,{"aria-label":`Use remote version of ${e.label}`,checked:r,className:`[--thumb-size:--spacing(3)]`,onCheckedChange:t=>{let n=t?e.remote?.name:e.local?.name;n&&Gn(n)}})}):e.remote?(0,J.jsxs)(B,{children:[(0,J.jsx)(R,{render:(0,J.jsx)(`span`,{className:`flex justify-end text-muted-foreground`,children:(0,J.jsx)(C,{role:`img`,"aria-label":`Remote only`,className:`size-3`})})}),(0,J.jsx)(z,{side:`top`,children:`Remote only`})]}):null]})},e.id)})]})]})]})]})]}),(0,J.jsxs)(`div`,{className:`flex shrink-0 items-center gap-1 [-webkit-app-region:no-drag]`,children:[On.length>0||!Y&&Q?.files?.length?(0,J.jsx)(yt,{additions:jn.additions,deletions:jn.deletions,className:`mr-1 text-2xs`,layout:`inline`}):null,Lt&&(0,J.jsxs)(B,{children:[(0,J.jsx)(R,{render:(0,J.jsx)(w,{type:`button`,size:`icon-sm`,variant:`ghost`,"aria-label":Cn?`Refreshing diff`:`Refresh diff`,onClick:Vt}),children:(0,J.jsx)(pt,{size:`sm`,refreshing:Cn})}),(0,J.jsx)(z,{side:`top`,children:Cn?`Refreshing diff…`:`Refresh diff`})]}),kn.length>0&&(0,J.jsx)(w,{type:`button`,size:`icon-sm`,variant:`ghost`,"aria-label":An?`Expand all files`:`Collapse all files`,onClick:Hn,children:(0,J.jsx)(be,{className:`size-3.5`,icon:An?Ce:we})}),(0,J.jsxs)(tt,{"aria-label":`Diff layout`,className:`shrink-0`,variant:`segmented`,value:[o],onValueChange:e=>{let t=e[0];(t===`stacked`||t===`split`)&&l({diffLayout:t})},children:[(0,J.jsx)(nt,{"aria-label":`Stacked diff view`,value:`stacked`,children:(0,J.jsx)(u,{className:`size-3.5`})}),(0,J.jsx)(nt,{"aria-label":`Split diff view`,value:`split`,children:(0,J.jsx)(_,{className:`size-3.5`})})]}),(0,J.jsxs)(B,{children:[(0,J.jsx)(R,{render:(0,J.jsx)(nt,{"aria-label":d?`Disable diff line wrapping`:`Enable diff line wrapping`,variant:`ghost`,size:`sm`,pressed:d,onPressedChange:e=>{f(!!e)}}),children:(0,J.jsx)(pe,{className:`size-3.5`})}),(0,J.jsx)(z,{side:`top`,children:d?`Disable line wrapping`:`Enable line wrapping`})]}),(0,J.jsxs)(B,{children:[(0,J.jsx)(R,{render:(0,J.jsx)(nt,{"aria-label":p?`Show whitespace changes`:`Hide whitespace changes`,variant:`ghost`,size:`sm`,pressed:p,onPressedChange:e=>{m(!!e)}}),children:(0,J.jsx)(se,{className:`size-3.5`})}),(0,J.jsx)(z,{side:`top`,children:p?`Show whitespace changes`:`Hide whitespace changes`})]}),kn.length>0&&(0,J.jsxs)(B,{children:[(0,J.jsx)(R,{render:(0,J.jsx)(nt,{"aria-label":h?`Hide file tree`:`Show file tree`,variant:`ghost`,size:`sm`,pressed:h,onPressedChange:e=>ee(!!e)}),children:(0,J.jsx)(ae,{className:`size-3.5`})}),(0,J.jsx)(z,{side:`top`,children:h?`Hide file tree`:`Show file tree`})]})]})]});return(0,J.jsx)(Xe,{mode:e,header:Yn,children:N?Qe?G!==null&&W.length===0?(0,J.jsx)(`div`,{className:`flex flex-1 items-center justify-center px-5 text-center text-xs text-muted-foreground/70`,children:`No completed turns yet.`}):G===null&&!ye?ge.isPending?(0,J.jsx)(Ye,{label:`Checking file access...`}):(0,J.jsx)(`div`,{className:`flex flex-1 items-center justify-center px-5 text-center text-xs text-muted-foreground/70`,children:ge.error??`This connection cannot read local diffs.`}):(0,J.jsx)(J.Fragment,{children:(0,J.jsxs)(`div`,{className:`flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden bg-background`,children:[sn&&!$&&(0,J.jsxs)(`p`,{className:`shrink-0 border-b border-border/70 bg-muted/40 px-3 py-1.5 text-2xs text-muted-foreground`,children:[`This preview exceeds the size limit. Changes shown are incomplete.`,Q?.files?` Totals include all changes.`:``]}),ln&&!dn&&(0,J.jsx)(`div`,{className:`px-3`,children:(0,J.jsx)(`p`,{className:`mb-2 text-2xs text-error/80`,children:ln})}),!dn&&!$?cn?(0,J.jsx)(Ye,{label:Y?`Loading checkpoint diff...`:q===`unstaged`?`Loading uncommitted changes...`:`Loading changes...`}):(0,J.jsx)(`div`,{className:`flex h-full items-center justify-center px-3 py-2 text-xs text-muted-foreground/70`,children:(0,J.jsx)(`p`,{children:un?`No net changes in this selection.`:`No patch available for this selection.`})}):$||dn?.kind===`files`?(0,J.jsxs)(`div`,{className:`flex min-h-0 flex-1 overflow-hidden`,children:[(0,J.jsx)(`div`,{className:`min-h-0 min-w-0 flex-1`,onClickCapture:e=>{let t=e.nativeEvent.composedPath?.()??[];for(let e of t)if(e instanceof HTMLElement&&(e instanceof HTMLButtonElement||e instanceof HTMLAnchorElement))return;let n=t.find(e=>e instanceof HTMLElement&&e.hasAttribute(`data-title`))?.textContent;if(n){Rn(n);return}let r=t.find(e=>e instanceof HTMLElement&&e.hasAttribute(`data-diffs-header`))?.querySelector(`[data-title]`)?.textContent;if(!r)return;let i=On.find(e=>e.filePath===r);i&&Bn(i.fileKey)},onContextMenuCapture:e=>{let t=(e.nativeEvent.composedPath?.()??[]).find(e=>e instanceof HTMLElement&&e.hasAttribute(`data-title`))?.textContent?.trim();t&&(e.preventDefault(),Ve({environmentId:N?.environmentId??null,filePath:t,workspaceRoot:V,repositoryRoot:Te},e))},children:(0,J.jsx)(wt,{viewerRef:O,codeViewKey:`${kt}:${$?pn:`preview`}`,className:`h-full min-h-0 overflow-auto`,files:On,renderCodeViewFooter:Dn,sectionId:Ot,sectionTitle:At,composerDraftTarget:t,renderHeaderFilenameSuffix:e=>{let t=H(e),n=hn.get(t);return(0,J.jsx)(Yt,{filePath:t,hasStat:fn.has(t),error:n?.error??!1,truncated:n?.truncated??!1,onRetry:gn})},...$?{unsafeCSSExtra:`[data-additions-count], [data-deletions-count] { display: none; }`,renderHeaderMetadata:e=>{let t=fn.get(H(e));return t?(0,J.jsx)(yt,{additions:t.additions,deletions:t.deletions}):null}}:{},onRevealSearchMatch:Vn,renderHeaderPrefix:(e,t)=>{let n=e.cacheKey?.endsWith(`:pending`)===!0;return(0,J.jsx)(Jt,{filePath:H(e),fileKey:t,collapsed:n||En.has(t),unavailable:n,iconClassName:Ge(e),onToggle:Bn})},options:{diffStyle:o===`split`?`split`:`unified`,lineDiffType:`none`,overflow:d?`wrap`:`scroll`,theme:Ue(i),preferredHighlighter:dt,themeType:i,stickyHeaders:!0,...Ht?{loadDiffFiles:Xt}:{}}},X??Ot)}),h?(0,J.jsx)(`aside`,{className:`flex w-[min(16rem,40%)] min-w-40 shrink-0 border-l border-border/60`,children:(0,J.jsx)(Ae,{ariaLabel:`${At} files`,entries:Mn,selectedPath:St,revealRequestId:Ct,onSelectFile:In})}):null]}):(0,J.jsx)(`div`,{className:`min-h-0 flex-1 overflow-auto p-2`,children:(0,J.jsxs)(`div`,{className:`space-y-2`,children:[(0,J.jsx)(`p`,{className:`text-2xs text-muted-foreground/75`,children:dn?.kind===`raw`?dn.reason:null}),(0,J.jsx)(`pre`,{className:T(`max-h-[72vh] rounded-md border border-border/70 bg-background/70 p-3 font-mono text-2xs leading-relaxed text-muted-foreground/90`,d?`overflow-auto whitespace-pre-wrap wrap-break-word`:`overflow-auto`),children:dn?.kind===`raw`?dn.text:null})]})})]})}):(0,J.jsx)(`div`,{className:`flex flex-1 items-center justify-center px-5 text-center text-xs text-muted-foreground/70`,children:`Turn diffs are unavailable because this project is not a git repository.`}):(0,J.jsx)(`div`,{className:`flex flex-1 items-center justify-center px-5 text-center text-xs text-muted-foreground/70`,children:`Select a thread to inspect turn diffs.`})})}export{Xt as default};
|
|
2
|
-
//# sourceMappingURL=DiffPanel-CGV12wM6.js.map
|