@p4code/cli 0.9.23 → 0.9.24
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/{TraceDiagnostics-DY_cYrzB.mjs → TraceDiagnostics-Dk5M3WAT.mjs} +2 -2
- package/dist/bin.mjs +1 -1
- package/dist/{binCli-Bou3rWgW.mjs → binCli-CBzw8eZx.mjs} +5 -5
- package/dist/client/.vite/manifest.json +1106 -1106
- package/dist/client/assets/{2NI2N5EU-B3GKfpTJ.js → 2NI2N5EU-Dz1H18lO.js} +2 -2
- package/dist/client/assets/{4UO7MD6I-D1jV-2l8.js → 4UO7MD6I-DxZW-JIQ.js} +2 -2
- package/dist/client/assets/{5B3SVYGG-CiUCamIk.js → 5B3SVYGG-Cl2owg_V.js} +2 -2
- package/dist/client/assets/{5GK6JWQ2-t3RHg90Y.js → 5GK6JWQ2-A0G_mE3E.js} +2 -2
- package/dist/client/assets/{5N7A7DKN-QVdNnUVu.js → 5N7A7DKN-Bd00cghV.js} +2 -2
- package/dist/client/assets/{5OC2THR4-CxE7bwzV.js → 5OC2THR4-ytZLjDMp.js} +2 -2
- package/dist/client/assets/{5S6HY5KT-msIIAX0G.js → 5S6HY5KT-XbqbgHxv.js} +2 -2
- package/dist/client/assets/{6IMQ5BUJ-BzYnQ5qg.js → 6IMQ5BUJ-BtndAY2_.js} +2 -2
- package/dist/client/assets/{6OLKWJ4F-AQyY5TLk.js → 6OLKWJ4F-DNXmh00R.js} +2 -2
- package/dist/client/assets/{74OO7NKP-CCpQBxNH.js → 74OO7NKP-DbprmlDc.js} +2 -2
- package/dist/client/assets/{75O6YZUN-D3WwLu8s.js → 75O6YZUN-DZ_5zRwt.js} +2 -2
- package/dist/client/assets/{77XECAW3-C6PMMrkh.js → 77XECAW3-CgSkQSMJ.js} +2 -2
- package/dist/client/assets/{ABYRPUBD-BmXVPnuD.js → ABYRPUBD-ucE-F8EO.js} +2 -2
- package/dist/client/assets/{AuthSurfaceShell-DDT8iJWE.js → AuthSurfaceShell-DqI-KrrY.js} +2 -2
- package/dist/client/assets/{BB2UYUI2-C_DXRsEF.js → BB2UYUI2-CXw0vAgW.js} +2 -2
- package/dist/client/assets/{BUM34MOA-sLk4tJuF.js → BUM34MOA-DBHGisGU.js} +2 -2
- package/dist/client/assets/{CEQABKGZ-DsLeCUfk.js → CEQABKGZ-MGn88wbo.js} +2 -2
- package/dist/client/assets/{CXAC5362-6czpP5mH.js → CXAC5362-C1Fk1A6g.js} +2 -2
- package/dist/client/assets/{ChatGptUsageButton-BElkMe1K.js → ChatGptUsageButton-_JZfpkEi.js} +2 -2
- package/dist/client/assets/{ChatMarkdown-pRUIhpGi.js → ChatMarkdown-DO_2fTqM.js} +5 -5
- package/dist/client/assets/{CodexSetupSection.logic-3MrEmFzD.js → CodexSetupSection.logic-B8uhmM78.js} +2 -2
- package/dist/client/assets/{CommandBlock-DUs3JB3r.js → CommandBlock-BJ2nHWe_.js} +2 -2
- package/dist/client/assets/{ConnectAgentSurface-BG30oBmC.js → ConnectAgentSurface-kcWh3f_f.js} +2 -2
- package/dist/client/assets/{DRLTVNUE-CAWKPVio.js → DRLTVNUE-CmpBRyx_.js} +2 -2
- package/dist/client/assets/{DYY6UVD2-HB9mYAbb.js → DYY6UVD2-rvY-xhxe.js} +2 -2
- package/dist/client/assets/{DevicePanel-BAT6BS-V.js → DevicePanel-Bkrn90hU.js} +2 -2
- package/dist/client/assets/{DeviceSetup-ClD1wdY1.js → DeviceSetup-BQvNWMm0.js} +2 -2
- package/dist/client/assets/{DiffCommentAnnotation-BjI2rZNS.js → DiffCommentAnnotation-eHSeIufV.js} +2 -2
- package/dist/client/assets/{DiffFileTree-C6VB4VCo.js → DiffFileTree-opfyNeFz.js} +2 -2
- package/dist/client/assets/{DiffPanel-pkAdnqL7.js → DiffPanel-C4ySgbUg.js} +2 -2
- package/dist/client/assets/{DiffWorkerPoolProvider-CPwS1D4h.js → DiffWorkerPoolProvider-BwOTmWKP.js} +2 -2
- package/dist/client/assets/{EmbeddedDesign-DOevokgh.js → EmbeddedDesign-BW5Rcxmc.js} +4 -4
- package/dist/client/assets/{FNOVOB4O-BkKBPKb-.js → FNOVOB4O-B8vuCGFt.js} +2 -2
- package/dist/client/assets/{FileDiff-CdxU7jjH.js → FileDiff-CZk9prBc.js} +2 -2
- package/dist/client/assets/{FilePreviewPanel-Bz8HETIa.js → FilePreviewPanel-BcCGkQ__.js} +2 -2
- package/dist/client/assets/{FoldedSettingsSection-IyrJlpO8.js → FoldedSettingsSection-COBhgfnb.js} +2 -2
- package/dist/client/assets/{HDGCDEEZ-BW-K6GhK.js → HDGCDEEZ-DRcTM9ws.js} +2 -2
- package/dist/client/assets/{HSJLKHB7-B8h6fviS.js → HSJLKHB7-Dh4X6CJ4.js} +2 -2
- package/dist/client/assets/{IntervalSecondsField-BaJ1qNX-.js → IntervalSecondsField-D0j2uU5s.js} +2 -2
- package/dist/client/assets/JZOYTAAL-BCzM9Qh2.js +1 -0
- package/dist/client/assets/{K3MD6TGW-BTpBxr8x.js → K3MD6TGW-uz2CK9vb.js} +2 -2
- package/dist/client/assets/{K7RP3OMA-DcsmGbRM.js → K7RP3OMA-uWbuKqQP.js} +2 -2
- package/dist/client/assets/{LHDIQX7Q-NOcjEUQY.js → LHDIQX7Q-BaUgpa7I.js} +2 -2
- package/dist/client/assets/{LUXOKEGN-BWJqFZst.js → LUXOKEGN-C-Usmwyz.js} +2 -2
- package/dist/client/assets/{LinkMachineSelect-Dp6FC1LE.js → LinkMachineSelect-CB99X8v3.js} +2 -2
- package/dist/client/assets/{MathTypeset-DHPwWtff.js → MathTypeset-Dv2b-uiV.js} +2 -2
- package/dist/client/assets/{ModelLiveLayer-D3x6mJFP.js → ModelLiveLayer-DIrV--mW.js} +3 -3
- package/dist/client/assets/{N3JZAHOW-oDX5VWgR.js → N3JZAHOW-CLD7n6Za.js} +2 -2
- package/dist/client/assets/{NUIALGQ3-DbqxE7KO.js → NUIALGQ3-CVI_F8c-.js} +2 -2
- package/dist/client/assets/{NoProjectsHero-Dk-rv5RI.js → NoProjectsHero-CAoW0Xej.js} +2 -2
- package/dist/client/assets/{O65XPQGZ-Cys4qXjc.js → O65XPQGZ-g6xpsO0r.js} +2 -2
- package/dist/client/assets/{O7XIQ6OM-aLdTRbRJ.js → O7XIQ6OM-CBkPdCIB.js} +2 -2
- package/dist/client/assets/{OFQON5FD-DpC8rm9Y.js → OFQON5FD-DpM-bsDn.js} +2 -2
- package/dist/client/assets/{P4ConnectAccountPages-C-GbG9lk.js → P4ConnectAccountPages-CCjWOetO.js} +2 -2
- package/dist/client/assets/{P4ConnectSidebarSignIn-DepXmk4f.js → P4ConnectSidebarSignIn-CfEPRRB6.js} +2 -2
- package/dist/client/assets/{PJQHF43J-CUbFewuD.js → PJQHF43J-Sp1j42CR.js} +2 -2
- package/dist/client/assets/{PanelLayoutControls-CKWjLO_e.js → PanelLayoutControls-CcdUv-ij.js} +4 -4
- package/dist/client/assets/{PierreEntryIcon-CVKV5qfT.js → PierreEntryIcon-vf9Z0_eJ.js} +2 -2
- package/dist/client/assets/{PreviewPanel-B-ty1_ZL.js → PreviewPanel-DIVx5x1H.js} +2 -2
- package/dist/client/assets/{ProjectDefaultsSettings-vF_5kxVM.js → ProjectDefaultsSettings-TlEARfjk.js} +2 -2
- package/dist/client/assets/{ProjectFavicon-BEsCcLjN.js → ProjectFavicon-Dd4p_a9n.js} +3 -3
- package/dist/client/assets/{ProjectIconPickerDialog-D1_gSlWW.js → ProjectIconPickerDialog-D5UkwTkD.js} +2 -2
- package/dist/client/assets/{ProviderAuthTerminal-cNp7I_XV.js → ProviderAuthTerminal-Cw2WcQr1.js} +2 -2
- package/dist/client/assets/{ProviderModelPicker-CCCH-TiQ.js → ProviderModelPicker-rRVcFLyP.js} +2 -2
- package/dist/client/assets/{ProviderSettingsForm-CV7sAQy3.js → ProviderSettingsForm-DaeugImp.js} +2 -2
- package/dist/client/assets/{PullRequestCodeTab-DjChxC-1.js → PullRequestCodeTab-DdfQeIIl.js} +2 -2
- package/dist/client/assets/{RHNBAITX-CEZ1jYAC.js → RHNBAITX-DQfv99hf.js} +2 -2
- package/dist/client/assets/{ReadOnlySourcePreview-Dw9TzXZ2.js → ReadOnlySourcePreview-Vvv9UVOM.js} +2 -2
- package/dist/client/assets/{RenderErrorBoundary-Dbb6Gs8P.js → RenderErrorBoundary-4-dgp9K8.js} +2 -2
- package/dist/client/assets/{SLD4V6NK-BXmFkBHB.js → SLD4V6NK-BKBt5rH4.js} +2 -2
- package/dist/client/assets/{ScheduledTasksSettings-TjoGUXvC.js → ScheduledTasksSettings-Dbz9TZ6o.js} +2 -2
- package/dist/client/assets/{ScopedSwitch-C8qSHRkU.js → ScopedSwitch-D1e9m-dH.js} +2 -2
- package/dist/client/assets/{SelfImproveSettingsSection-BhUO-XvV.js → SelfImproveSettingsSection-WXBG9l_4.js} +2 -2
- package/dist/client/assets/{SettingsPanels-DFPZUI9O.js → SettingsPanels-BEtJwC6n.js} +2 -2
- package/dist/client/assets/{SettingsPanels.logic-5bLleFhd.js → SettingsPanels.logic-y95n8OOO.js} +2 -2
- package/dist/client/assets/{SettingsScopeNotice-VgBZL2zg.js → SettingsScopeNotice-DE1t1kw-.js} +2 -2
- package/dist/client/assets/{SidebarStageBackdrop-DvPzZM_j.js → SidebarStageBackdrop-CYLpofvt.js} +2 -2
- package/dist/client/assets/{T3PCR2KE-bp9TnTiq.js → T3PCR2KE-BryFgp5Q.js} +2 -2
- package/dist/client/assets/{TKWO2OVW-Cyskzdq0.js → TKWO2OVW-DcRjYaVG.js} +2 -2
- package/dist/client/assets/{TSHNXIZL-Dp3os6bG.js → TSHNXIZL-hAylFob1.js} +2 -2
- package/dist/client/assets/{ThemeEditorPanel-B1RklhEA.js → ThemeEditorPanel-DeGNehj1.js} +2 -2
- package/dist/client/assets/{ThreadDetailsItemsMenu-BOMU-3M3.js → ThreadDetailsItemsMenu-D0mfEKtW.js} +4 -4
- package/dist/client/assets/{ThreadTerminalDrawer-BmwBVDGv.js → ThreadTerminalDrawer-B77-xYz_.js} +2 -2
- package/dist/client/assets/{UQJE5E4I-DDRoojS_.js → UQJE5E4I-BfaZIz58.js} +2 -2
- package/dist/client/assets/{USNYFO5S-BvyU-aXY.js → USNYFO5S-jOq8Kcgw.js} +2 -2
- package/dist/client/assets/{Virtualizer-DFzJCTxQ.js → Virtualizer-B3FSTwJv.js} +2 -2
- package/dist/client/assets/{WEVWDWVA-DTuHUaDF.js → WEVWDWVA-1T3GTRY3.js} +2 -2
- package/dist/client/assets/{X5RFHQXM-D9IKIoIk.js → X5RFHQXM-CaiE8-NB.js} +2 -2
- package/dist/client/assets/{X62E3GBT-BBXkOa6O.js → X62E3GBT-CKnjYZvp.js} +2 -2
- package/dist/client/assets/{XBNEOJTC-D743Jp_H.js → XBNEOJTC-DF-d22o-.js} +2 -2
- package/dist/client/assets/{YHV2MVVZ-DZBsjjLM.js → YHV2MVVZ-VSj4WI2u.js} +2 -2
- package/dist/client/assets/{YURCZMG2-ByezMSr0.js → YURCZMG2-C9wxlavt.js} +2 -2
- package/dist/client/assets/{YVG2LODB-DrsC56GM.js → YVG2LODB-JRtigNQC.js} +2 -2
- package/dist/client/assets/{_chat-BrgTPEvH.js → _chat-BA5cbHxE.js} +5 -5
- package/dist/client/assets/{_chat.design-CgGDbdSU.js → _chat.design-DxTdYmIe.js} +2 -2
- package/dist/client/assets/{_chat.index-BjAR62fj.js → _chat.index-CNIRuBqG.js} +2 -2
- package/dist/client/assets/{_chat.new-SjhrzHWl.js → _chat.new-Bw2VR60x.js} +2 -2
- package/dist/client/assets/{_chat.pull-requests-BixugchU.js → _chat.pull-requests-C6rdgLS9.js} +2 -2
- package/dist/client/assets/{assetUrls-Bn1N9LX7.js → assetUrls-BMizLezw.js} +2 -2
- package/dist/client/assets/{assets-Lf7mgwY7.js → assets-DT0KoRIr.js} +2 -2
- package/dist/client/assets/{browserHistoryStore-Ciy-Cygo.js → browserHistoryStore-xnY5QhfE.js} +2 -2
- package/dist/client/assets/{browserLinkTarget-DKVi8qup.js → browserLinkTarget-CH-4nkAf.js} +2 -2
- package/dist/client/assets/{connect-C605Zs89.js → connect-BflmwHyv.js} +2 -2
- package/dist/client/assets/connect-agent-AVHGyda5.js +2 -0
- package/dist/client/assets/{design-BNHLz8I2.js → design-B_bv-H7n.js} +2 -2
- package/dist/client/assets/{device-CwiofvsD.js → device-i4SkE05R.js} +2 -2
- package/dist/client/assets/{diffRendering-DJnBG6ZN.js → diffRendering-B7lkQ5_O.js} +2 -2
- package/dist/client/assets/{dist-D1XCsn7e.js → dist-BvS7KgJD.js} +2 -2
- package/dist/client/assets/{duoViewer-CQpxZewd.js → duoViewer-DbnFva5H.js} +2 -2
- package/dist/client/assets/{dynamic-DHrzmb9Z.js → dynamic-DmVpEfW3.js} +2 -2
- package/dist/client/assets/{embeddedScripts-D7WC0N_7.js → embeddedScripts-D0-ABFFC.js} +2 -2
- package/dist/client/assets/{entities-CjoTQlW3.js → entities-JWl3bvMT.js} +2 -2
- package/dist/client/assets/{fileLinks-BZkPwsEY.js → fileLinks-Y3tOmcmb.js} +2 -2
- package/dist/client/assets/{fileTreeExpansion-DHPBKDpm.js → fileTreeExpansion-Bp5eLBXI.js} +2 -2
- package/dist/client/assets/{getDiffFileInput-D-dpZLfC.js → getDiffFileInput-CKgGUEGl.js} +2 -2
- package/dist/client/assets/{index-Cq59P2HC.js → index-DQKD4Lk2.js} +3 -3
- package/dist/client/assets/{lazy-BH4rgIwO.js → lazy-C5ansoaW.js} +4 -4
- package/dist/client/assets/{linkedPrompt-BTa8Gs9-.js → linkedPrompt-CwNmoWmu.js} +2 -2
- package/dist/client/assets/{main-xhw8F2iL.js → main-43D2LVmx.js} +7 -7
- package/dist/client/assets/{mediaReference-B7ym_1-U.js → mediaReference-Bh7Pydqp.js} +2 -2
- package/dist/client/assets/{mediaSource-GtWYcfeZ.js → mediaSource-Do7lCSv7.js} +2 -2
- package/dist/client/assets/{modelScene-uWeIf_CC.js → modelScene-D8CdQkcp.js} +2 -2
- package/dist/client/assets/{onboarding-CxDppAGc.js → onboarding-BG6FdUUU.js} +2 -2
- package/dist/client/assets/{openFileInPreview-MLuDI8fu.js → openFileInPreview-BaemzSTr.js} +2 -2
- package/dist/client/assets/{p4ProjectFile-DlnfrOnm.js → p4ProjectFile-O_tvpvNW.js} +2 -2
- package/dist/client/assets/{pair-BJWvIdrD.js → pair-BNIczJXa.js} +2 -2
- package/dist/client/assets/{phoneViewer-OFK_ThS_.js → phoneViewer-CqawjVDW.js} +2 -2
- package/dist/client/assets/{pierre-icons-BYPQj09G.js → pierre-icons-BfZ11Q2h.js} +2 -2
- package/dist/client/assets/{preview-CxFR-vue.js → preview-Dd9kGZBH.js} +2 -2
- package/dist/client/assets/{primary-CCmKskNP.js → primary-CDuW5QwW.js} +2 -2
- package/dist/client/assets/{primaryCloudLinkState-DDs0gJOh.js → primaryCloudLinkState-BONYlcei.js} +2 -2
- package/dist/client/assets/{projectFilesQueryState-DzjMtjuq.js → projectFilesQueryState-Ck4wjfaq.js} +2 -2
- package/dist/client/assets/{projectScriptEditor-C2NTRQLs.js → projectScriptEditor-DgVU8tRa.js} +2 -2
- package/dist/client/assets/{providerSkills-gNPMp_MW.js → providerSkills-Dfc0PY_E.js} +2 -2
- package/dist/client/assets/{pullRequestDetail.logic-BZNLZTdt.js → pullRequestDetail.logic-Dy7e4vh2.js} +2 -2
- package/dist/client/assets/{pullRequests-DAMVEVGR.js → pullRequests-BSjV3BBU.js} +2 -2
- package/dist/client/assets/{queries-ckipBW-f.js → queries-BQAICaPF.js} +2 -2
- package/dist/client/assets/{relay-BLgoNhyd.js → relay-Ceq0htTl.js} +2 -2
- package/dist/client/assets/{relayFailureReason-COnjzJFI.js → relayFailureReason-DfHD60Z_.js} +2 -2
- package/dist/client/assets/{renderScheduler-BCOEl9SF.js → renderScheduler-BGJGU9W9.js} +2 -2
- package/dist/client/assets/{runtime-CbYvES7U.js → runtime-vb0YwEUc.js} +3 -3
- package/dist/client/assets/{scheduledTasksSettings.logic-DBMDVdjk.js → scheduledTasksSettings.logic-h-rZbNI3.js} +2 -2
- package/dist/client/assets/{server-CEMcTnD1.js → server-Bw1ZPPkk.js} +2 -2
- package/dist/client/assets/{session-Ces3Ebxl.js → session-YEQs2e4k.js} +2 -2
- package/dist/client/assets/{session-logic-DoE1Q_f_.js → session-logic-BOQRidTa.js} +2 -2
- package/dist/client/assets/{settings-DfyN3nPg.js → settings-Dj9xov5g.js} +2 -2
- package/dist/client/assets/{settings.appearance-DKdqiS33.js → settings.appearance-BFkpCG_N.js} +2 -2
- package/dist/client/assets/settings.archived-D96oQP2t.js +2 -0
- package/dist/client/assets/{settings.computer-use-B9Lvx9ml.js → settings.computer-use-Bi6Yznts.js} +2 -2
- package/dist/client/assets/{settings.connections-CeVMC9_Q.js → settings.connections-C7OGFqf1.js} +2 -2
- package/dist/client/assets/{settings.data-controls-C50d8Y1p.js → settings.data-controls-CMPajamk.js} +2 -2
- package/dist/client/assets/{settings.decisions-IKWdsPJP.js → settings.decisions-BaYWexvw.js} +2 -2
- package/dist/client/assets/{settings.designs-DYK1fORq.js → settings.designs-t7-jewWy.js} +2 -2
- package/dist/client/assets/{settings.diagnostics-DDQ_8Jca.js → settings.diagnostics-qkp4kADk.js} +2 -2
- package/dist/client/assets/{settings.general-c8Ls4Mz6.js → settings.general-BqeVFfxZ.js} +2 -2
- package/dist/client/assets/{settings.integrations-Bx78DSgB.js → settings.integrations-CYmWtYZT.js} +2 -2
- package/dist/client/assets/{settings.keybindings-CBhgDtMa.js → settings.keybindings-Rdl8b88k.js} +2 -2
- package/dist/client/assets/{settings.open-source-licenses-CgHCMsAt.js → settings.open-source-licenses-C-Brz8iy.js} +2 -2
- package/dist/client/assets/{settings.plugins-1AVunwAZ.js → settings.plugins-DAvzBYum.js} +2 -2
- package/dist/client/assets/{settings.projects-voo-H787.js → settings.projects-BTKNVvto.js} +3 -3
- package/dist/client/assets/{settings.providers-BWjGRXNt.js → settings.providers-r89DCT90.js} +3 -3
- package/dist/client/assets/{settings.scheduled-tasks-czvZRhu8.js → settings.scheduled-tasks-Da_-twWT.js} +2 -2
- package/dist/client/assets/{settings.secrets-B4BGlz80.js → settings.secrets-B_ZY_xsv.js} +2 -2
- package/dist/client/assets/{settings.snap-shot-d8VTC1Lv.js → settings.snap-shot-lnIAMmUa.js} +2 -2
- package/dist/client/assets/{settings.source-control-Df0azAck.js → settings.source-control-BIPVuyIo.js} +2 -2
- package/dist/client/assets/{settings.storage-CAwfhCbA.js → settings.storage-vvoP_prr.js} +2 -2
- package/dist/client/assets/{settingsLayout-D5Mded9h.js → settingsLayout-DaKDuaST.js} +2 -2
- package/dist/client/assets/{sidebarProjectGrouping-Dt_irkWm.js → sidebarProjectGrouping-xYoX3lLq.js} +2 -2
- package/dist/client/assets/{sourceControl-CgxDQG5w.js → sourceControl-gh0Nj17P.js} +2 -2
- package/dist/client/assets/{sourceControlClients-Bg3Of7DX.js → sourceControlClients-C3cHOUoL.js} +2 -2
- package/dist/client/assets/{terminal-links-C2FjxVhS.js → terminal-links-CxLXIwP1.js} +2 -2
- package/dist/client/assets/{terminalSessions-DBYKcIE6.js → terminalSessions-CXGA3pch.js} +2 -2
- package/dist/client/assets/{uiStateStore-B25zCY_s.js → uiStateStore-JOwhQqDV.js} +2 -2
- package/dist/client/assets/{usage-DdBC08dx.js → usage-Blib8u_-.js} +2 -2
- package/dist/client/assets/{use-atom-command-DWabKYXN.js → use-atom-command-DkmE-pw9.js} +2 -2
- package/dist/client/assets/{useHandleNewThread-DTgcUVdd.js → useHandleNewThread-C1YHLGL_.js} +2 -2
- package/dist/client/assets/{useP4ConnectAuthPrompt-DKYJHISj.js → useP4ConnectAuthPrompt-4l_tJOsn.js} +2 -2
- package/dist/client/assets/{usePullRequestActions-BGugTe1S.js → usePullRequestActions-DtDOHLgX.js} +2 -2
- package/dist/client/assets/{useScopedModelAvailability-LgMepA3M.js → useScopedModelAvailability-B-vTMNh_.js} +2 -2
- package/dist/client/assets/{useSettings-hYzrsDTp.js → useSettings-Dp27sUML.js} +2 -2
- package/dist/client/assets/{vcsRefInvalidation-C5gDWck3.js → vcsRefInvalidation-DU1ipBl9.js} +2 -2
- package/dist/client/assets/{welcome-CQrdWD2c.js → welcome-CmsT2lJW.js} +2 -2
- package/dist/client/index.html +1 -1
- package/dist/{preview-C_kKbIjf.mjs → preview-iNdhUsAa.mjs} +2 -2
- package/dist/{runtimeLayer-DQ7pD9BT.mjs → runtimeLayer-CZ8Ru7Ia.mjs} +20 -12
- package/dist/{runtimeLayer-Go0xTEaW.mjs → runtimeLayer-hDhX2kHB.mjs} +1 -1
- package/dist/{server-DQ0wuuLG.mjs → server-qfCj2NpU.mjs} +4 -4
- package/package.json +1 -1
- package/dist/client/assets/JZOYTAAL-DbSUKTwO.js +0 -1
- package/dist/client/assets/connect-agent-Cy1G_UzI.js +0 -2
- package/dist/client/assets/settings.archived-DDSjJTCo.js +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{n as e}from"./jsx-runtime-DJeoFXNw.js";import{Ft as t,Ut as n,Wt as r}from"./utils-BVnIIHXP.js";import{D as i,i as a}from"./useSettings-
|
|
2
|
-
//# sourceMappingURL=useScopedModelAvailability-
|
|
1
|
+
import{n as e}from"./jsx-runtime-DJeoFXNw.js";import{Ft as t,Ut as n,Wt as r}from"./utils-BVnIIHXP.js";import{D as i,i as a}from"./useSettings-Dp27sUML.js";import{V as o}from"./settingsLayout-DaKDuaST.js";var s=e();function c(e,c){let l=(0,s.c)(5),{targets:u}=o(),{environments:d}=i(),f;return l[0]!==c||l[1]!==d||l[2]!==e||l[3]!==u?(f=(i,o)=>{let s=c.find(e=>e.instanceId===i);for(let c of u){let l=d.find(e=>e.environmentId===c.environmentId),u=l?.serverConfig;if(!u)continue;let f=n(r(u.providers),c.settings,c.projectId).find(e=>e.instanceId===i),p=t(a(c.settings,e),u.providers).get(i);if(!f?.enabled||!f.isAvailable||f.driverKind!==s?.driverKind||!p?.some(e=>e.slug===o&&!e.isUnavailable))return`This model is unavailable on ${l?.label??`a selected environment`}. Select that environment to choose its model separately.`}return null},l[0]=c,l[1]=d,l[2]=e,l[3]=u,l[4]=f):f=l[4],f}export{c as t};
|
|
2
|
+
//# sourceMappingURL=useScopedModelAvailability-B-vTMNh_.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{a as e,t}from"./react-BUfh6y28.js";import{n}from"./jsx-runtime-DJeoFXNw.js";import{Bs as r,Ds as i,Jo as a,Pc as o,Ts as s,Wo as c,Yo as l,Zo as u,es as d,ls as f,ws as ee,xs as te}from"./utils-BVnIIHXP.js";import{$l as p,An as ne,B as re,Cg as ie,Ch as m,En as ae,Gc as oe,Hi as se,Hl as ce,Ic as le,In as ue,Ln as de,Oh as h,Pn as fe,Sl as pe,Th as g,U as me,Ui as he,Ul as ge,Un as _e,V as ve,Wi as ye,Xc as be,_g as xe,ar as Se,bl as Ce,cl as we,cr as Te,gi as Ee,hl as De,iu as Oe,jl as ke,kc as Ae,kn as je,la as Me,mi as Ne,nl as Pe,ou as Fe,pl as Ie,qc as Le,qd as Re,qn as ze,ru as Be,sr as Ve,su as He,tr as Ue,va as We,vg as _}from"./src-DHn7yNZx.js";import{$t as Ge,Dr as Ke,Jr as qe,Sr as Je,T as Ye,Ur as v,Yt as Xe,pi as Ze}from"./runtime-CbYvES7U.js";import{a as y,t as Qe}from"./relay-BLgoNhyd.js";import{f as b,h as x,m as $e,u as et}from"./server-CEMcTnD1.js";import{i as tt,n as nt,s as rt,t as it}from"./session-Ces3Ebxl.js";import{t as at}from"./use-atom-command-DWabKYXN.js";import{B as ot,C as st,F as ct,N as lt,O as ut,P as dt,S as ft,V as pt,_ as mt,b as ht,c as gt,i as S,n as C,o as _t,r as vt,y as yt}from"./themePalette-BcMO2M90.js";var w=e(t(),1),T=n();function bt(e,t){if(e.size!==t.size)return!1;for(let[n,r]of e)if(t.get(n)!==r)return!1;return!0}function xt(e){let t=u(t=>d(n=>{let r=n(e.catalogValueAtom).entries.get(t);if(r===void 0)return null;let i=xe(ee(n(e.stateAtom(t))),()=>Ze);return{entry:r,connection:r.unsupportedReason===void 0?i===Ze&&r.enabled?{phase:`connecting`,error:null,traceId:null}:Ge(i):{phase:`unsupported`,error:r.unsupportedReason,traceId:null},serverConfig:n(e.serverConfigValueAtom(t))}}).pipe(f(`environment-presentation:${t}`))),n=new Map;return{presentationAtom:t,presentationsAtom:d(r=>{let i=new Map;for(let n of r(e.catalogValueAtom).entries.keys()){let e=r(t(n));e!==null&&i.set(n,e)}return bt(n,i)||(n=i),n}).pipe(f(`environment-presentations`))}}function St(e,t){return{environmentId:e,environmentLabel:t.entry.target.label,displayUrl:Xe(t.entry)??``,isRelayManaged:qe(t.entry),isEnabled:t.entry.enabled,connectionState:t.connection.phase,connectionError:t.connection.error,connectionErrorTraceId:t.connection.traceId}}function Ct(e){let t=d(t=>{let n=[...t(e.catalogValueAtom).entries.keys()],r=_(t.self());return r!==null&&r.length===n.length&&n.every((e,t)=>e===r[t])?r:n}),n=d(t=>{let n=[...t(e.catalogValueAtom).entries].map(([e,t])=>({environmentId:e,label:t.target.label})),r=_(t.self());return r!==null&&r.length===n.length&&n.every((e,t)=>e.environmentId===r[t]?.environmentId&&e.label===r[t]?.label)?r:n}),r=u(t=>d(n=>{let r=n(e.presentationAtom(t));if(r===null)return null;let i=St(t,r),a=_(n.self());return a!==null&&a.environmentId===i.environmentId&&a.environmentLabel===i.environmentLabel&&a.displayUrl===i.displayUrl&&a.isRelayManaged===i.isRelayManaged&&a.isEnabled===i.isEnabled&&a.connectionState===i.connectionState&&a.connectionError===i.connectionError&&a.connectionErrorTraceId===i.connectionErrorTraceId?a:i})),i=d(t=>{let n=[];for(let i of t(e.catalogValueAtom).entries.keys()){let e=t(r(i));e!==null&&n.push(e)}let i=_(t.self());return i!==null&&i.length===n.length&&n.every((e,t)=>e===i[t])?i:n}).pipe(f(`environment-connection-summaries`));return{environmentIdsAtom:t,connectedEnvironmentIdsAtom:d(e=>{let n=e(t).filter(t=>e(r(t))?.connectionState===`connected`),i=_(e.self());return i!==null&&i.length===n.length&&n.every((e,t)=>e===i[t])?i:n}),identitiesAtom:n,environmentsAtom:i,machineByIdAtom:d(n=>{let r=new Map(n(t).map(t=>[t,me(n(e.presentationAtom(t))?.serverConfig??null)])),i=_(n.self());return i!==null&&bt(i,r)?i:r}),pullRequestsSupportedAtom:d(n=>n(t).some(t=>n(e.presentationAtom(t))?.serverConfig?.environment.capabilities.pullRequests===!0))}}var E=xt({catalogValueAtom:x.catalogValueAtom,stateAtom:x.stateAtom,serverConfigValueAtom:b.configValueAtom}),D=Ct({catalogValueAtom:x.catalogValueAtom,presentationAtom:E.presentationAtom}),wt=d(null).pipe(f(`web-environment-presentation:empty`));function Tt(e){let t=(0,T.c)(5),n=a(x.catalogValueAtom),r;t[0]===e?r=t[1]:(r=e===null?wt:E.presentationAtom(e),t[0]=e,t[1]=r);let i=a(r),o;return t[2]!==n.isReady||t[3]!==i?(o={isReady:n.isReady,presentation:i},t[2]=n.isReady,t[3]=i,t[4]=o):o=t[4],o}var Et={status:`idle`},O=Et,k=null,A=[],j=0,Dt=new Set;function M(e){O=e;for(let e of Dt)e()}function Ot(e){k?.resolve(e);for(let t of A)t.resolve(e);k=null,A=[]}function kt(){return O}function At(e){return Dt.add(e),()=>{Dt.delete(e)}}function jt(){j+=1;let e=!0;return()=>{e&&(e=!1,j=Math.max(0,j-1),j===0&&(Ot(!1),M(Et)))}}function Mt(e,t){if(j!==0)return new Promise(n=>{let r={message:e,variant:t?.variant??`default`,resolve:n};k||O.status===`closing`?A.push(r):(k=r,M({status:`confirming`,message:e,variant:r.variant}))})}function Nt(){return O.status!==`idle`||k!==null||A.length>0}function Pt(e){if(O.status!==`confirming`||!k)return;let t=k;k=null,t.resolve(e),M({status:`closing`,message:O.message,variant:O.variant})}function Ft(){if(O.status!==`closing`)return;let e=A.shift();e?(k=e,M({status:`confirming`,message:e.message,variant:e.variant})):M(Et)}var It={Ctrl:`⌃`,Alt:`⌥`,Shift:`⇧`,Super:`⌘`,CmdOrCtrl:`⌘`};function Lt(e,t=navigator.platform){let n=e.split(`+`),r=n.pop()??``;return o(t)?`${n.map(e=>It[e]??e).join(``)}${r}`:[...n.map(e=>e===`CmdOrCtrl`?`Ctrl`:e===`Super`?`Meta`:e),r].join(`+`)}var Rt=`http://www.w3.org/2000/svg`,zt={archive:[{tag:`rect`,attrs:{width:`20`,height:`5`,x:`2`,y:`3`,rx:`1`}},{tag:`path`,attrs:{d:`M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8`}},{tag:`path`,attrs:{d:`M10 12h4`}}],check:[{tag:`path`,attrs:{d:`M20 6 9 17l-5-5`}}],timer:[{tag:`line`,attrs:{x1:`10`,x2:`14`,y1:`2`,y2:`2`}},{tag:`line`,attrs:{x1:`12`,x2:`15`,y1:`14`,y2:`11`}},{tag:`circle`,attrs:{cx:`12`,cy:`14`,r:`8`}}],"chevron-right":[{tag:`path`,attrs:{d:`m9 19 7-7-7-7`}}],"circle-check":[{tag:`circle`,attrs:{cx:`12`,cy:`12`,r:`10`}},{tag:`path`,attrs:{d:`m9 12 2 2 4-4`}}],clock:[{tag:`path`,attrs:{d:`M12 6v6l4 2`}},{tag:`circle`,attrs:{cx:`12`,cy:`12`,r:`10`}}],pencil:[{tag:`path`,attrs:{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`}},{tag:`path`,attrs:{d:`m15 5 4 4`}}],copy:[{tag:`rect`,attrs:{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`}},{tag:`path`,attrs:{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`}}],folder:[{tag:`path`,attrs:{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`}}],"git-branch":[{tag:`line`,attrs:{x1:`6`,x2:`6`,y1:`3`,y2:`15`}},{tag:`circle`,attrs:{cx:`18`,cy:`6`,r:`3`}},{tag:`circle`,attrs:{cx:`6`,cy:`18`,r:`3`}},{tag:`path`,attrs:{d:`M18 9a9 9 0 0 1-9 9`}}],eye:[{tag:`path`,attrs:{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`}},{tag:`circle`,attrs:{cx:`12`,cy:`12`,r:`3`}}],"eye-off":[{tag:`path`,attrs:{d:`M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49`}},{tag:`path`,attrs:{d:`M14.084 14.158a3 3 0 0 1-4.242-4.242`}},{tag:`path`,attrs:{d:`M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143`}},{tag:`path`,attrs:{d:`m2 2 20 20`}}],"app-window":[{tag:`rect`,attrs:{x:`2`,y:`4`,width:`20`,height:`16`,rx:`2`}},{tag:`path`,attrs:{d:`M10 4v4`}},{tag:`path`,attrs:{d:`M2 8h20`}},{tag:`path`,attrs:{d:`M6 4v4`}}],"arrow-up-right":[{tag:`path`,attrs:{d:`M7 7h10v10`}},{tag:`path`,attrs:{d:`M7 17 17 7`}}],"external-link":[{tag:`path`,attrs:{d:`M15 3h6v6`}},{tag:`path`,attrs:{d:`M10 14 21 3`}},{tag:`path`,attrs:{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`}}],link:[{tag:`path`,attrs:{d:`M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71`}},{tag:`path`,attrs:{d:`M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71`}}],list:[{tag:`path`,attrs:{d:`M3 5h.01`}},{tag:`path`,attrs:{d:`M3 12h.01`}},{tag:`path`,attrs:{d:`M3 19h.01`}},{tag:`path`,attrs:{d:`M8 5h13`}},{tag:`path`,attrs:{d:`M8 12h13`}},{tag:`path`,attrs:{d:`M8 19h13`}}],share:[{tag:`path`,attrs:{d:`M12 2v13`}},{tag:`path`,attrs:{d:`m16 6-4-4-4 4`}},{tag:`path`,attrs:{d:`M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8`}}],x:[{tag:`path`,attrs:{d:`M18 6 6 18`}},{tag:`path`,attrs:{d:`m6 6 12 12`}}],hash:[{tag:`line`,attrs:{x1:`4`,x2:`20`,y1:`9`,y2:`9`}},{tag:`line`,attrs:{x1:`4`,x2:`20`,y1:`15`,y2:`15`}},{tag:`line`,attrs:{x1:`10`,x2:`8`,y1:`3`,y2:`21`}},{tag:`line`,attrs:{x1:`16`,x2:`14`,y1:`3`,y2:`21`}}],"mail-open":[{tag:`path`,attrs:{d:`M21.2 8.4c.5.38.8.97.8 1.6v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V10a2 2 0 0 1 .8-1.6l8-6a2 2 0 0 1 2.4 0l8 6Z`}},{tag:`path`,attrs:{d:`m22 10-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 10`}}],"message-square":[{tag:`path`,attrs:{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`}}],"message-square-plus":[{tag:`path`,attrs:{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`}},{tag:`path`,attrs:{d:`M12 8v6`}},{tag:`path`,attrs:{d:`M9 11h6`}}],pin:[{tag:`path`,attrs:{d:`M12 17v5`}},{tag:`path`,attrs:{d:`M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z`}}],"pin-off":[{tag:`path`,attrs:{d:`M12 17v5`}},{tag:`path`,attrs:{d:`M15 9.34V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H7.89`}},{tag:`path`,attrs:{d:`m2 2 20 20`}},{tag:`path`,attrs:{d:`M9 9v1.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h11`}}],"refresh-cw":[{tag:`path`,attrs:{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`}},{tag:`path`,attrs:{d:`M21 3v5h-5`}},{tag:`path`,attrs:{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`}},{tag:`path`,attrs:{d:`M8 16H3v5`}}],settings:[{tag:`path`,attrs:{d:`M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.38a2 2 0 0 0-.73-2.73l-.15-.09a2 2 0 0 1-1-1.74v-.51a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z`}},{tag:`circle`,attrs:{cx:`12`,cy:`12`,r:`3`}}],"folder-plus":[{tag:`path`,attrs:{d:`M12 10v6`}},{tag:`path`,attrs:{d:`M9 13h6`}},{tag:`path`,attrs:{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`}}],"folder-tree":[{tag:`path`,attrs:{d:`M20 10a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1h-2.5a1 1 0 0 1-.8-.4l-.9-1.2A1 1 0 0 0 15 3h-2a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z`}},{tag:`path`,attrs:{d:`M20 21a1 1 0 0 0 1-1v-3a1 1 0 0 0-1-1h-2.9a1 1 0 0 1-.88-.55l-.42-.85a1 1 0 0 0-.92-.6H13a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z`}},{tag:`path`,attrs:{d:`M3 5a2 2 0 0 0 2 2h3`}},{tag:`path`,attrs:{d:`M3 3v13a2 2 0 0 0 2 2h3`}}],"text-search":[{tag:`path`,attrs:{d:`M21 5H3`}},{tag:`path`,attrs:{d:`M10 12H3`}},{tag:`path`,attrs:{d:`M10 19H3`}},{tag:`circle`,attrs:{cx:`17`,cy:`15`,r:`3`}},{tag:`path`,attrs:{d:`m21 19-1.9-1.9`}}],trash:[{tag:`path`,attrs:{d:`M3 6h18`}},{tag:`path`,attrs:{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`}},{tag:`path`,attrs:{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`}},{tag:`line`,attrs:{x1:`10`,x2:`10`,y1:`11`,y2:`17`}},{tag:`line`,attrs:{x1:`14`,x2:`14`,y1:`11`,y2:`17`}}]};function Bt(e,t){let n=zt[e];if(!n||typeof document.createElementNS!=`function`)return null;let r=document.createElementNS(Rt,`svg`);r.setAttribute(`xmlns`,Rt),r.setAttribute(`viewBox`,`0 0 24 24`),r.setAttribute(`fill`,`none`),r.setAttribute(`stroke`,`currentColor`),r.setAttribute(`stroke-width`,`2`),r.setAttribute(`stroke-linecap`,`round`),r.setAttribute(`stroke-linejoin`,`round`),r.setAttribute(`class`,t===`destructive`?`size-4.5 shrink-0 sm:size-4`:`size-4.5 shrink-0 text-muted-foreground sm:size-4`);for(let e of n){let t=document.createElementNS(Rt,e.tag);for(let[n,r]of Object.entries(e.attrs))t.setAttribute(n,r);r.appendChild(t)}return r}function Vt(e,t,n){let r=e.getBoundingClientRect(),i=Math.min(Math.max(4,t),Math.max(4,window.innerWidth-r.width-4)),a=Math.min(Math.max(4,n),Math.max(4,window.innerHeight-r.height-4));e.style.left=`${i}px`,e.style.top=`${a}px`}function Ht(e,t){if(typeof Node<`u`&&e instanceof Node)return t.some(t=>t.contains(e));if(!e||typeof e!=`object`)return!1;let n=e;for(;n&&typeof n==`object`;){if(t.includes(n))return!0;n=n.parent}return!1}var N=null;function Ut(){return N!==null}function Wt(){N?.(),N=null}function Gt(e,t){return new Promise(n=>{let r=document.activeElement;for(;r?.shadowRoot?.activeElement;)r=r.shadowRoot.activeElement;let i=r instanceof HTMLElement?r:null,a=[],s=[],c=!1,l=!1,u=()=>d(null),d=e=>{if(c)return;c=!0,N===u&&(N=null),document.removeEventListener(`keydown`,f),document.removeEventListener(`pointerdown`,ee,!0),document.removeEventListener(`contextmenu`,te,!0);let t=Ht(document.activeElement,a);for(let e of a)e.remove();t&&i?.isConnected&&i.focus({preventScroll:!0}),n(e)},f=e=>{e.key===`Escape`&&(e.preventDefault(),d(null))},ee=e=>{l&&!Ht(e.target,a)&&d(null)},te=e=>{l&&!Ht(e.target,a)&&(e.preventDefault(),d(null))},p=e=>{for(;a.length>e;)s.pop()?.setAttribute(`aria-expanded`,`false`),a.pop()?.remove()},ne=(e,t,n,r,i)=>{p(r);let c=document.createElement(`div`);c.className=`dropdown-glass fixed z-[10000] min-w-56 max-w-sm overflow-hidden rounded-lg bg-clip-padding text-popover-foreground outline-none`,c.style.cssText=`position:fixed;z-index:10000;min-width:14rem;max-width:24rem;overflow:hidden;border-radius:var(--radius-lg);background-clip:padding-box;color:var(--contrast-popover-foreground);outline:none;pointer-events:auto;`,c.style.left=`${t}px`,c.style.top=`${n}px`,c.dataset.level=String(r);let u=document.createElement(`div`);u.className=`max-h-[calc(100vh-0.5rem)] min-w-0 max-w-sm overflow-y-auto overflow-x-hidden p-1`,u.style.cssText=`max-height:calc(100vh - 0.5rem);min-width:0;max-width:24rem;overflow-x:hidden;overflow-y:auto;padding:0.25rem;`;for(let t of e){if(t.separatorBefore===!0&&u.children.length>0){let e=document.createElement(`div`);e.className=`mx-2 my-1 h-px bg-border`,e.style.cssText=`height:1px;margin:0.25rem 0.5rem;background:var(--contrast-border);`,e.dataset.contextMenuSeparator=`true`,e.setAttribute(`role`,`separator`),u.appendChild(e)}if(t.header===!0){let e=document.createElement(`div`);e.className=`px-2 py-1.5 font-medium text-muted-foreground text-xs`,e.textContent=t.label,u.appendChild(e);continue}let e=Array.isArray(t.children)&&t.children.length>0,n=!e&&(t.destructive===!0||t.id===`delete`),i=document.createElement(`button`);i.type=`button`;let s=t.disabled===!0;i.disabled=s;let c=`flex w-full cursor-default select-none items-center gap-2 rounded-sm px-2 py-1 text-left outline-none transition-colors sm:min-h-7 sm:text-sm min-h-8 text-base`;if(i.className=s?`${c} pointer-events-none cursor-not-allowed text-muted-foreground opacity-64`:n?`${c} text-destructive-foreground hover:bg-destructive/10 hover:text-destructive-foreground`:`${c} text-foreground hover:bg-accent hover:text-accent-foreground`,i.style.cssText=`display:flex;width:100%;min-height:1.75rem;align-items:center;gap:0.5rem;border:0;border-radius:var(--radius-sm);background:transparent;padding:0.25rem 0.5rem;color:var(--contrast-foreground);font-family:var(--font-sans,system-ui,sans-serif);font-size:0.875rem;line-height:1.25rem;text-align:left;cursor:default;`,n&&(i.style.color=`var(--destructive-foreground)`),s&&(i.style.color=`var(--contrast-muted-foreground)`,i.style.opacity=`0.64`,i.style.pointerEvents=`none`),typeof t.checked==`boolean`){i.setAttribute(`role`,`menuitemradio`),i.setAttribute(`aria-checked`,t.checked?`true`:`false`);let e=t.checked?Bt(`check`,`neutral`):null;if(e)i.appendChild(e);else{let e=document.createElement(`span`);e.className=`size-4.5 shrink-0 sm:size-4`,e.style.cssText=`display:inline-block;width:1rem;height:1rem;flex-shrink:0;`,e.setAttribute(`aria-hidden`,`true`),i.appendChild(e)}}else if(typeof t.icon==`string`){let e=Bt(t.icon,n?`destructive`:`neutral`);e&&i.appendChild(e)}let f=document.createElement(`span`);if(f.className=`min-w-0 flex-1 truncate`,f.textContent=t.label,i.appendChild(f),typeof t.accelerator==`string`){let e=document.createElement(`span`);e.className=`ms-6 shrink-0 text-muted-foreground text-xs tracking-widest`,e.style.cssText=`margin-inline-start:1.5rem;flex-shrink:0;color:var(--contrast-muted-foreground);font-size:0.75rem;letter-spacing:0.1em;`,e.textContent=Lt(t.accelerator),e.setAttribute(`aria-hidden`,`true`),i.setAttribute(`aria-keyshortcuts`,t.accelerator.replace(`CmdOrCtrl`,o(navigator.platform)?`Meta`:`Control`)),i.appendChild(e)}if(e){i.setAttribute(`aria-haspopup`,`menu`),i.setAttribute(`aria-expanded`,`false`);let e=Bt(`chevron-right`,`neutral`);e&&(e.setAttribute(`class`,`-me-0.5 ms-auto size-4.5 shrink-0 text-muted-foreground opacity-80 sm:size-4`),e.setAttribute(`aria-hidden`,`true`),e.dataset.contextMenuChevron=`true`,i.appendChild(e))}if(!s){let o=!1,s=!1,c=()=>{let e=o||s;i.style.background=e?n?`color-mix(in srgb, var(--destructive) 10%, transparent)`:`var(--accent)`:`transparent`,i.style.color=e?n?`var(--destructive-foreground)`:`var(--contrast-accent-foreground)`:n?`var(--destructive-foreground)`:`var(--contrast-foreground)`};if(i.addEventListener(`mouseenter`,()=>{i.focus({preventScroll:!0}),o=!0,c()}),i.addEventListener(`mouseleave`,()=>{o=!1,c()}),i.addEventListener(`focus`,()=>{s=!0,c()}),i.addEventListener(`blur`,()=>{s=!1,c()}),e){let e=(e=!1)=>{let n=i.getBoundingClientRect(),o=n.right+4,s=n.top;ne(t.children,o,s,r+1,i),i.setAttribute(`aria-expanded`,`true`);let c=a[r+1];if(!c)return;let l=c.getBoundingClientRect();l.right>window.innerWidth&&Vt(c,n.left-l.width-4,n.top),e&&[...c.querySelectorAll(`button`)].find(e=>!e.disabled)?.focus()};i.addEventListener(`mouseenter`,()=>{e()}),i.addEventListener(`click`,t=>{t.preventDefault(),e(!0)})}else i.addEventListener(`mouseenter`,()=>{p(r+1)}),i.addEventListener(`click`,()=>{l&&d(t.id)})}u.appendChild(i)}c.appendChild(u),c.addEventListener(`mouseenter`,()=>{p(r+1)}),document.body.appendChild(c),a[r]=c,s[r]=i,requestAnimationFrame(()=>{Vt(c,t,n)})};document.addEventListener(`keydown`,f),document.addEventListener(`pointerdown`,ee,!0),document.addEventListener(`contextmenu`,te,!0),ne(e,t?.x??0,t?.y??0,0),N&&N(),N=u,requestAnimationFrame(()=>{l=!0})})}var Kt=`p4code:client-settings:v1`;function qt(){return typeof window<`u`}function Jt(){return qt()?s(Kt,ae):null}function Yt(e){qt()&&i(Kt,e,ae)}var Xt;function Zt(){return{dialogs:{pickFolder:async e=>window.desktopBridge?window.desktopBridge.pickFolder(e):null,confirm:async(e,t)=>Mt(e,t)??!1},shell:{openExternal:async e=>{if(window.desktopBridge){if(!await window.desktopBridge.openExternal(e))throw Error(`Unable to open link.`)}else window.open(e,`_blank`,`noopener,noreferrer`)},openSystemSettings:async e=>{if(!window.desktopBridge?.openSystemSettings||!await window.desktopBridge.openSystemSettings(e))throw Error(`Unable to open System Settings.`)}},contextMenu:{show:async(e,t)=>window.desktopBridge?window.desktopBridge.showContextMenu(e,t):Gt(e,t),close:async()=>{window.desktopBridge||Wt()}},persistence:{getClientSettings:async()=>window.desktopBridge?window.desktopBridge.getClientSettings():Jt(),setClientSettings:async e=>{if(window.desktopBridge)return window.desktopBridge.setClientSettings(e);Yt(e)}}}}function Qt(){return Zt()}function $t(){if(typeof window<`u`)return Xt||(Xt=Qt(),Xt)}function en(){let e=$t();if(!e)throw Error(`Local API not found`);return e}var P=`p4code:theme`,tn=`(prefers-color-scheme: dark)`,F={theme:`system`,resolvedTheme:`light`,systemDark:!1,followSystem:!0,appearanceMode:`system`,themeHalves:null};function nn(){return I()}function rn(){return typeof window>`u`?{}:an()}function I(){if(typeof window>`u`)return null;try{return ut(window.localStorage.getItem(S))}catch{return null}}function an(){try{let e=JSON.parse(window.localStorage.getItem(`p4code:theme-halves:v1`)??`null`);if(typeof e!=`object`||!e)return{};let t={};for(let n of[`light`,`dark`]){let r=e[n];typeof r==`string`&&(t[n]=r)}return t}catch{return{}}}function L(e){return`${e?.light??``}|${e?.dark??``}`}var on=`theme-color`,sn=`meta[name="${on}"][data-dynamic-theme-color="true"]`,R=class extends be()(`ThemeStorageError`,{operation:le([`read`,`write`]),storageKey:oe,theme:ke(_t),cause:Ae()}){get message(){return`Failed to ${this.operation} theme preference for ${this.storageKey}.`}},cn=pe(R),ln=class extends be()(`DesktopThemeSyncError`,{theme:_t,cause:Ae()}){get message(){return`Failed to sync the ${this.theme} theme to the desktop shell.`}},un=pe(ln),z=[],B=null,dn=!0,fn=null,V=null,H=null;function U(){dn=!0;for(let e of z)e()}function pn(){return typeof window<`u`&&typeof window.matchMedia==`function`&&window.matchMedia(tn).matches}function mn(e){if(typeof window>`u`)return e===`system`;try{let e=window.localStorage.getItem(vt);if(e===`true`)return!0;if(e===`false`)return!1}catch{}return e===`system`}function hn(e){return e===`light`||e===`dark`||e===`system`}function W(e){if(typeof window<`u`)try{let e=window.localStorage.getItem(C);if(hn(e))return e}catch{}return mn(e)?`system`:yt(e)??`light`}function gn(e){if(typeof window<`u`)try{window.localStorage.setItem(C,e)}catch(e){throw new R({operation:`write`,storageKey:C,cause:e})}}function _n(){if(typeof window>`u`)return F.theme;let e;try{e=window.localStorage.getItem(P)}catch(e){throw new R({operation:`read`,storageKey:P,cause:e})}return e!==null&&st(e)?e:F.theme}function vn(e){if(typeof window<`u`)try{window.localStorage.setItem(P,e),H=null}catch(t){throw new R({operation:`write`,storageKey:P,theme:e,cause:t})}}function G(){if(H!==null)return F.theme;try{return _n()}catch(e){let t=cn(e)?e:new R({operation:`read`,storageKey:P,cause:e});return H=t,console.error(t.message,{operation:t.operation,storageKey:t.storageKey,...v(t)}),F.theme}}function yn(){let e=document.querySelector(sn);return e||(e=document.createElement(`meta`),e.name=on,e.setAttribute(`data-dynamic-theme-color`,`true`),document.head.append(e),e)}function bn(e){let t=e?.trim().toLowerCase();return!t||t===`transparent`||t===`rgba(0, 0, 0, 0)`||t===`rgba(0 0 0 / 0)`?null:e?.trim()??null}function xn(){return document.querySelector(`main[data-slot='sidebar-inset']`)??document.querySelector(`[data-slot='sidebar-inner']`)??document.body}function Sn(){if(typeof document>`u`||typeof getComputedStyle>`u`)return;let e=getComputedStyle(document.documentElement),t=document.documentElement.dataset.themeId?bn(e.getPropertyValue(`--app-chrome-background`)):null,n=bn(getComputedStyle(xn()).backgroundColor),r=bn(getComputedStyle(document.body).backgroundColor),i=t??n??r;if(!i)return;document.documentElement.style.backgroundColor=i,document.body.style.backgroundColor=i;let a=document.querySelectorAll(`meta[name="${on}"]`);if(a.length===0)yn().setAttribute(`content`,i);else for(let e of a)e.setAttribute(`content`,i)}function K(e,{suppressTransitions:t=!1,preservePreview:n=!0}={}){if(typeof document>`u`||typeof window>`u`||n&&document.documentElement.dataset?.themeId===`__preview`)return;let r=W(e),i=r===`system`,a=i?pn():!1,o=I();if(V?.theme===e&&V.systemDark===a&&V.followSystem===i&&V.appearanceMode===r&&L(V.themeHalves)===L(o)){wn(e,i,r);return}t&&document.documentElement.classList.add(`no-transitions`);let s=dt(e,a,i,r,o);gt(ct(e,o,s),s),document.documentElement.classList.toggle(`dark`,s===`dark`),V={theme:e,systemDark:a,followSystem:i,appearanceMode:r,themeHalves:o},Sn(),wn(e,i,r),t&&(document.documentElement.offsetHeight,requestAnimationFrame(()=>{document.documentElement.classList.remove(`no-transitions`)}))}async function Cn(e,t,n,r,i=I()){try{await e.setTheme(lt(t,n,r,i))}catch(e){throw new ln({theme:t,cause:e})}}function wn(e,t,n){if(typeof window>`u`)return;let r=window.desktopBridge,i=I(),a=lt(e,t,n,i);r&&typeof r.setTheme==`function`&&fn!==a&&(fn=a,Cn(r,e,t,n,i).catch(t=>{let n=un(t)?t:new ln({theme:e,cause:t});console.error(n.message,{theme:n.theme,...v(n)}),fn===a&&(fn=null)}))}typeof document<`u`&&typeof window<`u`&&K(G());function Tn(){if(typeof window>`u`)return F;if(!dn&&B)return B;dn=!1;let e=G(),t=W(e),n=t===`system`,r=n?pn():!1,i=I(),a=dt(e,r,n,t,i);return B&&B.theme===e&&B.resolvedTheme===a&&B.systemDark===r&&B.followSystem===n&&B.appearanceMode===t&&L(B.themeHalves)===L(i)||(B={theme:e,resolvedTheme:a,systemDark:r,followSystem:n,appearanceMode:t,themeHalves:i}),B}function En(){return F}function Dn(){let e=G();W(e)===`system`&&K(e,{suppressTransitions:!0}),U()}function On(e){e.key===P?(H=null,K(G(),{suppressTransitions:!0}),U()):e.key===`p4code:theme-follow-system`||e.key===`p4code:theme-appearance-mode`||e.key===`p4code:theme-halves:v1`?(K(G(),{suppressTransitions:!0}),U()):(e.key===`p4code:themes:v1`||e.key===null)&&(e.key===null&&(H=null),ft(),V=null,K(G(),{suppressTransitions:!0}),U())}var kn=null;function An(e){if(typeof window>`u`)return()=>{};if(z.push(e),!kn){let e=typeof window.matchMedia==`function`?window.matchMedia(tn):null;e?.addEventListener(`change`,Dn),window.addEventListener(`storage`,On),kn=()=>{e?.removeEventListener(`change`,Dn),window.removeEventListener(`storage`,On)}}return()=>{z=z.filter(t=>t!==e),z.length===0&&(kn?.(),kn=null)}}function jn(){let e=(0,w.useSyncExternalStore)(An,Tn,En),{theme:t,resolvedTheme:n}=e,r=(0,w.useCallback)(e=>{if(typeof window>`u`)return!1;try{gn(W(G()));let t=window.localStorage.getItem(S);window.localStorage.removeItem(S);try{vn(e)}catch(e){if(t!==null)try{window.localStorage.setItem(S,t)}catch{}throw e}}catch(t){let n=cn(t)?t:new R({operation:`write`,storageKey:P,theme:e,cause:t});return console.error(n.message,{operation:n.operation,storageKey:n.storageKey,theme:e,...v(n)}),!1}return K(e,{suppressTransitions:!0}),U(),!0},[]),i=(0,w.useCallback)(e=>{if(typeof window>`u`)return!1;try{gn(e)}catch(e){let t=cn(e)?e:new R({operation:`write`,storageKey:C,cause:e});return console.error(t.message,{operation:t.operation,storageKey:t.storageKey,...v(t)}),!1}return H=null,K(G(),{suppressTransitions:!0}),U(),!0},[]),a=(0,w.useCallback)(e=>{let n=W(t),r=e?`system`:n===`system`?yt(t)??`light`:n;return i(r)},[i,t]),o=(0,w.useCallback)((e,t)=>{if(typeof window>`u`)return!1;try{let n={...an()};t===null?delete n[e]:n[e]=t,n.light===void 0&&n.dark===void 0?window.localStorage.removeItem(S):window.localStorage.setItem(S,JSON.stringify(n))}catch(e){let t=new R({operation:`write`,storageKey:S,cause:e});return console.error(t.message,{operation:t.operation,storageKey:t.storageKey,...v(t)}),!1}return K(G(),{suppressTransitions:!0}),U(),!0},[]),s=(0,w.useCallback)(()=>{if(typeof window>`u`)return!1;try{window.localStorage.removeItem(S)}catch(e){let t=new R({operation:`write`,storageKey:S,cause:e});return console.error(t.message,{operation:t.operation,storageKey:t.storageKey,...v(t)}),!1}return K(G(),{suppressTransitions:!0}),U(),!0},[]),c=(0,w.useCallback)(({preservePreview:e=!1}={})=>{typeof window<`u`&&(V=null,K(G(),{suppressTransitions:!0,preservePreview:e}),U())},[]);return(0,w.useEffect)(()=>{K(t)},[e.appearanceMode,t]),{theme:t,setTheme:r,setAppearanceMode:i,setFollowSystem:a,setThemeHalf:o,clearThemeHalves:s,refreshTheme:c,followSystem:e.followSystem,appearanceMode:e.appearanceMode,resolvedTheme:n,themeHalves:e.themeHalves}}var Mn=we(Ce(Pe)),Nn=He(e=>{let t=e.replace(/("(?:[^"\\]|\\.)*")|\/\/[^\r\n]*/g,(e,t)=>t?e:``);return t=t.replace(/("(?:[^"\\]|\\.)*")|\/\*[\s\S]*?\*\//g,(e,t)=>t?e:``),t=t.replace(/("(?:[^"\\]|\\.)*")|,(\s*[}\]])/g,(e,t,n)=>t?e:n??``),Mn(t).pipe(Re(e=>e.issue))}),Pn=new p(Nn,Fe());Oe().pipe(Be(Fe({space:2})));var Fn=e=>oe.pipe(Ie(e,Pn)),In={performance:{profile:`performance`,automaticGitFetchInterval:g(15),providerHealthRefreshInterval:m(1),hostPowerMonitorActiveInterval:g(30),hostPowerMonitorIdleInterval:m(2),idleClientTtl:g(45),pauseWhenHostLocked:!0,pauseWhenHostLowPower:!1,pauseWhenClientLowPower:!1,pauseWhenOnBattery:!1},balanced:{profile:`balanced`,automaticGitFetchInterval:je,providerHealthRefreshInterval:ue,hostPowerMonitorActiveInterval:g(30),hostPowerMonitorIdleInterval:m(5),idleClientTtl:g(45),pauseWhenHostLocked:!0,pauseWhenHostLowPower:!0,pauseWhenClientLowPower:!0,pauseWhenOnBattery:!1},"battery-saver":{profile:`battery-saver`,automaticGitFetchInterval:g(0),providerHealthRefreshInterval:m(15),hostPowerMonitorActiveInterval:m(1),hostPowerMonitorIdleInterval:m(10),idleClientTtl:g(45),pauseWhenHostLocked:!0,pauseWhenHostLowPower:!0,pauseWhenClientLowPower:!0,pauseWhenOnBattery:!0}};function q(e){return In[e]}function Ln(e){return e.profile===`custom`?e.baseProfile??`balanced`:e.profile}function Rn(e){let t=Ln(e),n=In[t],r=e.profile===`custom`?e.overrides:{};return{profile:t,automaticGitFetchInterval:r.automaticGitFetchInterval??n.automaticGitFetchInterval,providerHealthRefreshInterval:r.providerHealthRefreshInterval??n.providerHealthRefreshInterval,hostPowerMonitorActiveInterval:r.hostPowerMonitorActiveInterval??n.hostPowerMonitorActiveInterval,hostPowerMonitorIdleInterval:r.hostPowerMonitorIdleInterval??n.hostPowerMonitorIdleInterval,idleClientTtl:r.idleClientTtl??n.idleClientTtl,pauseWhenHostLocked:r.pauseWhenHostLocked??n.pauseWhenHostLocked,pauseWhenHostLowPower:r.pauseWhenHostLowPower??n.pauseWhenHostLowPower,pauseWhenClientLowPower:r.pauseWhenClientLowPower??n.pauseWhenClientLowPower,pauseWhenOnBattery:r.pauseWhenOnBattery??n.pauseWhenOnBattery}}function J(e,t){return h(e)===h(t)}function zn(e,t){return J(e.automaticGitFetchInterval,t.automaticGitFetchInterval)&&J(e.providerHealthRefreshInterval,t.providerHealthRefreshInterval)&&J(e.hostPowerMonitorActiveInterval,t.hostPowerMonitorActiveInterval)&&J(e.hostPowerMonitorIdleInterval,t.hostPowerMonitorIdleInterval)&&J(e.idleClientTtl,t.idleClientTtl)&&e.pauseWhenHostLocked===t.pauseWhenHostLocked&&e.pauseWhenHostLowPower===t.pauseWhenHostLowPower&&e.pauseWhenClientLowPower===t.pauseWhenClientLowPower&&e.pauseWhenOnBattery===t.pauseWhenOnBattery}function Bn(e){if(e.profile!==`custom`)return{schemaVersion:1,profile:e.profile,overrides:{}};let t=Rn(e),n=[Ln(e),`balanced`,`performance`,`battery-saver`];for(let e of n)if(zn(t,In[e]))return{schemaVersion:1,profile:e,overrides:{}};let r=Ln(e),i=In[r];return{schemaVersion:1,profile:`custom`,baseProfile:r,overrides:{...J(t.automaticGitFetchInterval,i.automaticGitFetchInterval)?{}:{automaticGitFetchInterval:t.automaticGitFetchInterval},...J(t.providerHealthRefreshInterval,i.providerHealthRefreshInterval)?{}:{providerHealthRefreshInterval:t.providerHealthRefreshInterval},...J(t.hostPowerMonitorActiveInterval,i.hostPowerMonitorActiveInterval)?{}:{hostPowerMonitorActiveInterval:t.hostPowerMonitorActiveInterval},...J(t.hostPowerMonitorIdleInterval,i.hostPowerMonitorIdleInterval)?{}:{hostPowerMonitorIdleInterval:t.hostPowerMonitorIdleInterval},...J(t.idleClientTtl,i.idleClientTtl)?{}:{idleClientTtl:t.idleClientTtl},...t.pauseWhenHostLocked===i.pauseWhenHostLocked?{}:{pauseWhenHostLocked:t.pauseWhenHostLocked},...t.pauseWhenHostLowPower===i.pauseWhenHostLowPower?{}:{pauseWhenHostLowPower:t.pauseWhenHostLowPower},...t.pauseWhenClientLowPower===i.pauseWhenClientLowPower?{}:{pauseWhenClientLowPower:t.pauseWhenClientLowPower},...t.pauseWhenOnBattery===i.pauseWhenOnBattery?{}:{pauseWhenOnBattery:t.pauseWhenOnBattery}}}}function Vn(e){let t={schemaVersion:1,profile:ne,overrides:{}},n=e.backgroundActivity.profile===t.profile&&e.backgroundActivity.baseProfile===void 0&&Object.keys(e.backgroundActivity.overrides).length===0,r=e.backgroundActivityProfile,i=r!==`balanced`||h(e.automaticGitFetchInterval)!==h(je)||h(e.providerHealthRefreshInterval)!==h(ue);return Rn(n&&i?{schemaVersion:1,profile:h(e.automaticGitFetchInterval)===h(q(r).automaticGitFetchInterval)&&h(e.providerHealthRefreshInterval)===h(q(r).providerHealthRefreshInterval)?r:`custom`,baseProfile:r,overrides:{...h(e.automaticGitFetchInterval)===h(q(r).automaticGitFetchInterval)?{}:{automaticGitFetchInterval:e.automaticGitFetchInterval},...h(e.providerHealthRefreshInterval)===h(q(r).providerHealthRefreshInterval)?{}:{providerHealthRefreshInterval:e.providerHealthRefreshInterval}}}:e.backgroundActivity)}function Hn(e){let t=Vn(e);return Bn({schemaVersion:1,profile:`custom`,baseProfile:t.profile,overrides:{automaticGitFetchInterval:t.automaticGitFetchInterval,providerHealthRefreshInterval:t.providerHealthRefreshInterval,hostPowerMonitorActiveInterval:t.hostPowerMonitorActiveInterval,hostPowerMonitorIdleInterval:t.hostPowerMonitorIdleInterval,idleClientTtl:t.idleClientTtl,pauseWhenHostLocked:t.pauseWhenHostLocked,pauseWhenHostLowPower:t.pauseWhenHostLowPower,pauseWhenClientLowPower:t.pauseWhenClientLowPower,pauseWhenOnBattery:t.pauseWhenOnBattery}})}var Un=Fn(Le({observability:ze.fields.observability}));De(Un);function Wn(e,t){let n=e.providerInstances[t.instanceId];return n===void 0?Ue(t.instanceId):Te(n)}var Gn=[`codex`,`claudeAgent`,`cursor`,`grok`,`muse`,`pi`,`opencode`,`antigravity`].map(e=>se.make(e));function Kn(e,t,n){let i=[...Gn.map(e=>[ye(e),e]),...n?.includeConfiguredInstances===!0?Object.entries(e).flatMap(([e,t])=>Gn.includes(t.driver)?[[he.make(e),t.driver]]:[]):[]].find(([e,n])=>t(e,n));if(i===void 0)return null;let[a,o]=i,s=n?.defaultModelSelection,c=e[a]?.config;return s?.instanceId===a&&r(c?.customModels).some(e=>e.slug===s.model)?s:{instanceId:a,model:Ee[o]??Ne[o]??`gpt-6-luna`}}function qn(e,t,n){let r=e.sourceControlWriterModelSelection;if(!r||!Ve(e,n,r.instanceId))return e.textGenerationModelSelection;if(t===void 0)return r;let i=t.find(e=>e.instanceId===r.instanceId);return i?.enabled===!0&&re(i)&&ve(i)?r:e.textGenerationModelSelection}function Jn(e,t,n){let r=e.reviewGuideModelSelection;if(r&&Ve(e,n,r.instanceId)){let e=t?.find(e=>e.instanceId===r.instanceId);if(t===void 0||e?.enabled===!0&&re(e)&&ve(e))return r}return qn(e,t,n)}new Set(Object.keys(_e.fields));function Yn(e,t={}){return{favorites:e.favorites??t.favorites??[],providerModelPreferences:e.providerModelPreferences??t.providerModelPreferences??{}}}function Xn(e,t){let n=e.favorites===null&&(t.favorites?.length??0)>0?t.favorites:void 0,r=e.providerModelPreferences===null&&Object.keys(t.providerModelPreferences??{}).length>0?t.providerModelPreferences:void 0;return n===void 0&&r===void 0?null:{migrateModelPreferences:{...n===void 0?{}:{favorites:n},...r===void 0?{}:{providerModelPreferences:r}}}}var Zn=new Set([`continueThreadsAfterServerUpdate`,`autoResumeLimitedThreads`,`snoozeLimitedThreads`,`newWorktreesStartFromOrigin`,`sourceControlWritingStyle`,`textGenerationModelSelection`]);function Qn(e){let t={},n={};for(let[r,i]of Object.entries(e))Zn.has(r)?t[r]=i:n[r]=i;return{sharedPatch:t,localPatch:n}}function $n(e,t,n,r=n,i=!1){let a=e.textGenerationModelSelection?.instanceId??r?.textGenerationModelSelection.instanceId;return!i&&e.textGenerationModelSelection&&(!n||a!==void 0&&(r?.providerInstances[a]?.driver??a)!==(n.providerInstances[a]?.driver??a)||!Wn(n,{...n.textGenerationModelSelection,...e.textGenerationModelSelection}))&&(e=ge(e,[`textGenerationModelSelection`])),t?.threadRestartContinuation===!0?e:ge(e,[`continueThreadsAfterServerUpdate`])}function er(e){return e.connection.phase===`connected`&&e.serverConfig!==null}function tr(e,t){return{...t,environmentId:e,label:t.entry.target.label,displayUrl:Xe(t.entry),relayManaged:qe(t.entry)}}function nr(){let e=(0,T.c)(7),t=a(x.catalogValueAtom),n=a(x.networkStatusValueAtom),r=a(E.presentationsAtom),i;e[0]===r?i=e[1]:(i=[...r.entries()].map(rr),e[0]=r,e[1]=i);let o=i,s;return e[2]!==t.isReady||e[3]!==o||e[4]!==n||e[5]!==r?(s={isReady:t.isReady,networkStatus:n,environments:o,presentationById:r},e[2]=t.isReady,e[3]=o,e[4]=n,e[5]=r,e[6]=s):s=e[6],s}function rr(e){let[t,n]=e;return tr(t,n)}function ir(){return a($e)}function ar(e){let t=(0,T.c)(3),{presentation:n}=Tt(e),r;return t[0]!==e||t[1]!==n?(r=e===null||n===null?null:tr(e,n),t[0]=e,t[1]=n,t[2]=r):r=t[2],r}function or(){return ar(ir())}function sr(e){let t=(0,T.c)(2),n=rt(e),r;return t[0]===n?r=t[1]:(r=ie(n)?n.value.httpBaseUrl:null,t[0]=n,t[1]=r),r}function cr(){return a(Qe.stateValueAtom)}function lr(){return a(D.environmentIdsAtom)}function ur(){return a(D.identitiesAtom)}function dr(){return a(D.pullRequestsSupportedAtom)}function fr(){return a(D.machineByIdAtom)}var pr=`[CLIENT_SETTINGS]`,mr=new Set,hr=new Set,gr=fe,Y=`pending`,X=null,_r=0,vr=Promise.resolve(),yr=0;function br(){for(let e of mr)e()}function xr(){for(let e of hr)e()}function Z(){return gr}function Sr(e){gr=e,br()}function Cr(e){Y!==e&&(Y=e,xr())}function wr(e){return mr.add(e),Q().catch(()=>void 0),()=>{mr.delete(e)}}function Tr(){return Y===`ready`}function Er(){return Y}function Dr(e){return hr.add(e),Q().catch(()=>void 0),()=>{hr.delete(e)}}async function Q(){if(Y===`ready`)return;if(X)return X;let e=_r;Cr(Y===`failed`||Y===`retrying`?`retrying`:`pending`);let t=(async()=>{try{let t=await en().persistence.getClientSettings();if(e!==_r)return;t&&Sr({...fe,...t}),Cr(`ready`)}catch(t){throw e===_r&&Cr(`failed`),console.error(`${pr} hydrate failed`,{operation:`hydrate`,...v(t)}),t}})().finally(()=>{X===t&&(X=null)});return X=t,X}var Or=e=>en().persistence.setClientSettings(e);function kr(e){let t=vr.then(e);return vr=t.then(()=>void 0,()=>void 0),t}function Ar(e,t=Or){let n=Y!==`ready`||yr>0;return n?yr+=1:Sr({...Z(),...e}),kr(async()=>{if(n)try{Y!==`ready`&&await Q(),Sr({...Z(),...e})}finally{--yr}await t(Z())}).catch(e=>{console.error(`${pr} persist failed`,{operation:`persist`,...v(e)})})}async function jr(e,t=Or){return kr(async()=>{for(Y!==`ready`&&await Q();;){let n=Z(),r=e(n);if(await t(r),Z()===n)return Sr(r),r}})}var Mr=new Set(ce(ze.fields));function Nr(e){let t={},n={};for(let[r,i]of Object.entries(e))Mr.has(r)?t[r]=i:n[r]=i;return{serverPatch:t,clientPatch:n}}function Pr(){return Z()}function Fr(){return Q()}function Ir(){return(0,w.useSyncExternalStore)(Dr,Tr,Lr)}function Lr(){return!1}function Rr(){return(0,w.useSyncExternalStore)(Dr,Er,zr)}function zr(){return`pending`}function $(){return(0,w.useSyncExternalStore)(wr,Z,Br)}function Br(){return fe}function Vr(e,t){return{...t,...e,...Yn(e,t)}}var Hr=new Set;function Ur(e,t){let n=(0,T.c)(8),r=$(),i=Ir(),a;n[0]===Symbol.for(`react.memo_cache_sentinel`)?(a={reportFailure:!1},n[0]=a):a=n[0];let o=at(b.updateSettings,a),s,c;n[1]!==r||n[2]!==e||n[3]!==i||n[4]!==o||n[5]!==t?(s=()=>{if(!e||!t||!i||Hr.has(e))return;let n=Xn(t,r);n&&(Hr.add(e),o({environmentId:e,input:{patch:n}}).finally(()=>Hr.delete(e)))},c=[r,e,i,o,t],n[1]=r,n[2]=e,n[3]=i,n[4]=o,n[5]=t,n[6]=s,n[7]=c):(s=n[6],c=n[7]),(0,w.useEffect)(s,c)}function Wr(e,t){let n=(0,T.c)(6),r=$(),i;n[0]!==r||n[1]!==e?(i=Vr(e,r),n[0]=r,n[1]=e,n[2]=i):i=n[2];let a=i,o;return n[3]!==a||n[4]!==t?(o=t?t(a):a,n[3]=a,n[4]=t,n[5]=o):o=n[5],o}function Gr(e){let t=(0,T.c)(3),n=$(),r;return t[0]!==e||t[1]!==n?(r=e?e(n):n,t[0]=e,t[1]=n,t[2]=r):r=t[2],r}function Kr(e){return e.settingsHydrated?e.paletteThemeActive&&!e.paletteThemeAllowsArtwork&&e.mode===`artwork`?`pill`:e.mode:`none`}function qr(){let e=(0,T.c)(7),t=Ir(),n=$().environmentIdentificationMode,{resolvedTheme:r,theme:i,themeHalves:a}=jn(),o=(0,w.useSyncExternalStore)(ot,ht,Jr),s;if(e[0]!==n||e[1]!==o||e[2]!==r||e[3]!==t||e[4]!==i||e[5]!==a){let c=ct(i,a,r),l=mt(c);s=Kr({mode:n,settingsHydrated:t,paletteThemeActive:o!==null||l!==null,paletteThemeAllowsArtwork:o??pt(c)}),e[0]=n,e[1]=o,e[2]=r,e[3]=t,e[4]=i,e[5]=a,e[6]=s}else s=e[6];return s}function Jr(){return null}async function Yr(e,t){return(e.favorites===null||e.providerModelPreferences===null)&&await Fr(),{...Xn(e,Pr()),...t}}function Xr(e){let t=(0,T.c)(6),n;t[0]===e?n=t[1]:(n=e?b.settingsValueAtom(e):Qr,t[0]=e,t[1]=n);let r=a(n),i=at(b.updateSettings,`model preferences update`),o;return t[2]!==e||t[3]!==i||t[4]!==r?(o=async t=>{if(!e||!r)return;let n;try{n=await Yr(r,t)}catch{y.add({type:`error`,title:`Model preferences not saved`,description:`Could not load saved model preferences. Try again.`});return}return i({environmentId:e,input:{patch:n}})},t[2]=e,t[3]=i,t[4]=r,t[5]=o):o=t[5],o}function Zr(e){let t=(0,w.use)(l),n=(0,w.useRef)(new Map),r=Xr(e);return(0,w.useCallback)(async(i,a)=>{if(!e)return;let o=b.settingsValueAtom(e),s=t.get(o);if(!s)return;if(s.favorites===null)try{await Fr()}catch{y.add({type:`error`,title:`Favorites not saved`,description:`Could not load saved model preferences. Try again.`});return}let c=t.get(o)??s,l=Yn(c,Pr()).favorites,u=JSON.stringify([e,i,a]),d=n.current.get(u),f={favorite:!(d&&(d.pending||d.settings.favorites===c.favorites)?d.favorite:l.some(e=>e.provider===i&&e.model===a)),settings:c,pending:!0};n.current.set(u,f);try{let e=await r({setModelFavorites:[{provider:i,model:a,favorite:f.favorite}]});e&&te(e)&&t.get(o)?.favorites===c.favorites&&(f.pending=!1)}finally{f.pending&&n.current.get(u)===f&&(d&&!d.pending&&t.get(o)?.favorites===d.settings.favorites?n.current.set(u,d):n.current.delete(u))}},[e,t,r])}var Qr=d(null);function $r(e){let t=(0,T.c)(5),n;t[0]===e?n=t[1]:(n=e?b.settingsValueAtom(e):Qr,t[0]=e,t[1]=n);let r=a(n),i=$();Ur(e,r);let o=r??de,s;return t[2]!==i||t[3]!==o?(s=Yn(o,i),t[2]=i,t[3]=o,t[4]=s):s=t[4],s}function ei(e,t){let n=(0,T.c)(2),r;n[0]===e?r=n[1]:(r=b.settingsValueAtom(e),n[0]=e,n[1]=r);let i=a(r);return Ur(e,i),Wr(i??de,t)}function ti(e){let t=(0,T.c)(4),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n={reportFailure:!1},t[0]=n):n=t[0];let r=at(b.mutateProviderInstance,n),i;return t[1]!==e||t[2]!==r?(i=(t,n)=>r({environmentId:e,input:{patch:n===void 0?{}:n,providerInstanceMutation:t}}),t[1]=e,t[2]=r,t[3]=i):i=t[3],i}function ni(e){let t=or(),n=a(et);return Ur(t?.environmentId??null,t?.serverConfig?.settings??null),Wr(n,e)}var ri=`This setting is saved on a server, and the hosted app is not anchored to one. Change it from the desktop app or from the server's own address.`;function ii(){let e=(0,T.c)(2),t=or(),n;return e[0]===t?n=e[1]:(n=t!==null||!Ye(),e[0]=t,e[1]=n),n}function ai(e){let t=(0,T.c)(3),n=e!==void 0&&e,{environments:r}=nr(),i;return t[0]!==r||t[1]!==n?(i=d(e=>r.filter(er).flatMap(t=>{let r=e(it.sessionStateAtom(t.environmentId));if(n&&r._tag===`Initial`)return[t.environmentId];let i=r._tag===`Failure`?null:_(ee(r));return i!==null&&We(i,`settings:write`)?[t.environmentId]:[]})),t[0]=r,t[1]=n,t[2]=i):i=t[2],a(i)}function oi(e){let t=(0,T.c)(10);tt(e,Me);let n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n={label:`server settings update`,reportFailure:!1},t[0]=n):n=t[0];let r=at(b.updateSettings,n),{environments:i}=nr(),a;t[1]!==i||t[2]!==r?(a=async(e,t)=>{let n=await r(e);if(n._tag===`Failure`&&t?.(),n._tag===`Failure`&&!Je(n)){let t=i.find(t=>t.environmentId===e.environmentId)?.label??e.environmentId,r=Ke(n);y.add({type:`error`,title:`Setting not saved`,description:`Could not save on ${t}: ${r instanceof Error?r.message:`The save failed. Try reconnecting and saving again.`}`})}return n},t[1]=i,t[2]=r,t[3]=a):a=t[3];let o=a,s=ai(!0),l;return t[4]!==e||t[5]!==i||t[6]!==r||t[7]!==o||t[8]!==s?(l=(t,n)=>{let{serverPatch:a,clientPatch:l}=Nr(t),u=e===null||Se(a).every(t=>nt(e,t));if(Object.keys(a).length>0&&!u&&(n?.onFailed?.(),y.add({type:`warning`,title:`Setting not saved`,description:`This connection lacks permission to change settings on ${i.find(t=>t.environmentId===e)?.label??`the selected environment`}.`})),Object.keys(a).length>0&&u){let{sharedPatch:t,localPatch:l}=Qn(a),u=e=>{let t=e===void 0?ri:e;return n?.onFailed?.(),y.add({type:`warning`,title:`Setting not saved`,description:t})};if(Object.keys(l).length>0&&(e?o({environmentId:e,input:{patch:l}},n?.onFailed):u()),Object.keys(t).length>0){let a=i.find(t=>t.environmentId===e)?.serverConfig?.settings,o=new Set(s);e&&o.add(e);let l=[],d=[];for(let n of o){let r=i.find(e=>e.environmentId===n),o=$n(t,r?.serverConfig?.environment.capabilities,r?.serverConfig?.settings,a,n===e);Object.keys(o).length!==0&&(c.get(it.sessionStateAtom(n))._tag!==`Initial`&&!Se(t).every(e=>nt(n,e))?d.push(r?.label??n):l.push({environmentId:n,input:{patch:o}}))}l.length===0?u(d.length>0?`This connection lacks permission to change settings on ${d.join(`, `)}.`:o.size>0?`Update older servers to save this setting.`:void 0):Promise.all(l.map(async e=>({label:i.find(t=>t.environmentId===e.environmentId)?.label??e.environmentId,result:await r(e)}))).then(e=>{(d.length>0||e.some(ui))&&n?.onFailed?.();let t=e.flatMap(li);if(t.length===0)return;let r=e.filter(ci).map(si);y.add({type:`error`,title:r.length>0?`Setting saved on some environments`:`Setting not saved`,description:[...t,...r.length>0?[`Saved on ${r.join(`, `)}.`]:[]].join(`
|
|
1
|
+
import{a as e,t}from"./react-BUfh6y28.js";import{n}from"./jsx-runtime-DJeoFXNw.js";import{Bs as r,Ds as i,Jo as a,Pc as o,Ts as s,Wo as c,Yo as l,Zo as u,es as d,ls as f,ws as ee,xs as te}from"./utils-BVnIIHXP.js";import{$l as p,An as ne,B as re,Cg as ie,Ch as m,En as ae,Gc as oe,Hi as se,Hl as ce,Ic as le,In as ue,Ln as de,Oh as h,Pn as fe,Sl as pe,Th as g,U as me,Ui as he,Ul as ge,Un as _e,V as ve,Wi as ye,Xc as be,_g as xe,ar as Se,bl as Ce,cl as we,cr as Te,gi as Ee,hl as De,iu as Oe,jl as ke,kc as Ae,kn as je,la as Me,mi as Ne,nl as Pe,ou as Fe,pl as Ie,qc as Le,qd as Re,qn as ze,ru as Be,sr as Ve,su as He,tr as Ue,va as We,vg as _}from"./src-DHn7yNZx.js";import{$t as Ge,Dr as Ke,Jr as qe,Sr as Je,T as Ye,Ur as v,Yt as Xe,pi as Ze}from"./runtime-vb0YwEUc.js";import{a as y,t as Qe}from"./relay-Ceq0htTl.js";import{f as b,h as x,m as $e,u as et}from"./server-Bw1ZPPkk.js";import{i as tt,n as nt,s as rt,t as it}from"./session-YEQs2e4k.js";import{t as at}from"./use-atom-command-DkmE-pw9.js";import{B as ot,C as st,F as ct,N as lt,O as ut,P as dt,S as ft,V as pt,_ as mt,b as ht,c as gt,i as S,n as C,o as _t,r as vt,y as yt}from"./themePalette-BcMO2M90.js";var w=e(t(),1),T=n();function bt(e,t){if(e.size!==t.size)return!1;for(let[n,r]of e)if(t.get(n)!==r)return!1;return!0}function xt(e){let t=u(t=>d(n=>{let r=n(e.catalogValueAtom).entries.get(t);if(r===void 0)return null;let i=xe(ee(n(e.stateAtom(t))),()=>Ze);return{entry:r,connection:r.unsupportedReason===void 0?i===Ze&&r.enabled?{phase:`connecting`,error:null,traceId:null}:Ge(i):{phase:`unsupported`,error:r.unsupportedReason,traceId:null},serverConfig:n(e.serverConfigValueAtom(t))}}).pipe(f(`environment-presentation:${t}`))),n=new Map;return{presentationAtom:t,presentationsAtom:d(r=>{let i=new Map;for(let n of r(e.catalogValueAtom).entries.keys()){let e=r(t(n));e!==null&&i.set(n,e)}return bt(n,i)||(n=i),n}).pipe(f(`environment-presentations`))}}function St(e,t){return{environmentId:e,environmentLabel:t.entry.target.label,displayUrl:Xe(t.entry)??``,isRelayManaged:qe(t.entry),isEnabled:t.entry.enabled,connectionState:t.connection.phase,connectionError:t.connection.error,connectionErrorTraceId:t.connection.traceId}}function Ct(e){let t=d(t=>{let n=[...t(e.catalogValueAtom).entries.keys()],r=_(t.self());return r!==null&&r.length===n.length&&n.every((e,t)=>e===r[t])?r:n}),n=d(t=>{let n=[...t(e.catalogValueAtom).entries].map(([e,t])=>({environmentId:e,label:t.target.label})),r=_(t.self());return r!==null&&r.length===n.length&&n.every((e,t)=>e.environmentId===r[t]?.environmentId&&e.label===r[t]?.label)?r:n}),r=u(t=>d(n=>{let r=n(e.presentationAtom(t));if(r===null)return null;let i=St(t,r),a=_(n.self());return a!==null&&a.environmentId===i.environmentId&&a.environmentLabel===i.environmentLabel&&a.displayUrl===i.displayUrl&&a.isRelayManaged===i.isRelayManaged&&a.isEnabled===i.isEnabled&&a.connectionState===i.connectionState&&a.connectionError===i.connectionError&&a.connectionErrorTraceId===i.connectionErrorTraceId?a:i})),i=d(t=>{let n=[];for(let i of t(e.catalogValueAtom).entries.keys()){let e=t(r(i));e!==null&&n.push(e)}let i=_(t.self());return i!==null&&i.length===n.length&&n.every((e,t)=>e===i[t])?i:n}).pipe(f(`environment-connection-summaries`));return{environmentIdsAtom:t,connectedEnvironmentIdsAtom:d(e=>{let n=e(t).filter(t=>e(r(t))?.connectionState===`connected`),i=_(e.self());return i!==null&&i.length===n.length&&n.every((e,t)=>e===i[t])?i:n}),identitiesAtom:n,environmentsAtom:i,machineByIdAtom:d(n=>{let r=new Map(n(t).map(t=>[t,me(n(e.presentationAtom(t))?.serverConfig??null)])),i=_(n.self());return i!==null&&bt(i,r)?i:r}),pullRequestsSupportedAtom:d(n=>n(t).some(t=>n(e.presentationAtom(t))?.serverConfig?.environment.capabilities.pullRequests===!0))}}var E=xt({catalogValueAtom:x.catalogValueAtom,stateAtom:x.stateAtom,serverConfigValueAtom:b.configValueAtom}),D=Ct({catalogValueAtom:x.catalogValueAtom,presentationAtom:E.presentationAtom}),wt=d(null).pipe(f(`web-environment-presentation:empty`));function Tt(e){let t=(0,T.c)(5),n=a(x.catalogValueAtom),r;t[0]===e?r=t[1]:(r=e===null?wt:E.presentationAtom(e),t[0]=e,t[1]=r);let i=a(r),o;return t[2]!==n.isReady||t[3]!==i?(o={isReady:n.isReady,presentation:i},t[2]=n.isReady,t[3]=i,t[4]=o):o=t[4],o}var Et={status:`idle`},O=Et,k=null,A=[],j=0,Dt=new Set;function M(e){O=e;for(let e of Dt)e()}function Ot(e){k?.resolve(e);for(let t of A)t.resolve(e);k=null,A=[]}function kt(){return O}function At(e){return Dt.add(e),()=>{Dt.delete(e)}}function jt(){j+=1;let e=!0;return()=>{e&&(e=!1,j=Math.max(0,j-1),j===0&&(Ot(!1),M(Et)))}}function Mt(e,t){if(j!==0)return new Promise(n=>{let r={message:e,variant:t?.variant??`default`,resolve:n};k||O.status===`closing`?A.push(r):(k=r,M({status:`confirming`,message:e,variant:r.variant}))})}function Nt(){return O.status!==`idle`||k!==null||A.length>0}function Pt(e){if(O.status!==`confirming`||!k)return;let t=k;k=null,t.resolve(e),M({status:`closing`,message:O.message,variant:O.variant})}function Ft(){if(O.status!==`closing`)return;let e=A.shift();e?(k=e,M({status:`confirming`,message:e.message,variant:e.variant})):M(Et)}var It={Ctrl:`⌃`,Alt:`⌥`,Shift:`⇧`,Super:`⌘`,CmdOrCtrl:`⌘`};function Lt(e,t=navigator.platform){let n=e.split(`+`),r=n.pop()??``;return o(t)?`${n.map(e=>It[e]??e).join(``)}${r}`:[...n.map(e=>e===`CmdOrCtrl`?`Ctrl`:e===`Super`?`Meta`:e),r].join(`+`)}var Rt=`http://www.w3.org/2000/svg`,zt={archive:[{tag:`rect`,attrs:{width:`20`,height:`5`,x:`2`,y:`3`,rx:`1`}},{tag:`path`,attrs:{d:`M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8`}},{tag:`path`,attrs:{d:`M10 12h4`}}],check:[{tag:`path`,attrs:{d:`M20 6 9 17l-5-5`}}],timer:[{tag:`line`,attrs:{x1:`10`,x2:`14`,y1:`2`,y2:`2`}},{tag:`line`,attrs:{x1:`12`,x2:`15`,y1:`14`,y2:`11`}},{tag:`circle`,attrs:{cx:`12`,cy:`14`,r:`8`}}],"chevron-right":[{tag:`path`,attrs:{d:`m9 19 7-7-7-7`}}],"circle-check":[{tag:`circle`,attrs:{cx:`12`,cy:`12`,r:`10`}},{tag:`path`,attrs:{d:`m9 12 2 2 4-4`}}],clock:[{tag:`path`,attrs:{d:`M12 6v6l4 2`}},{tag:`circle`,attrs:{cx:`12`,cy:`12`,r:`10`}}],pencil:[{tag:`path`,attrs:{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`}},{tag:`path`,attrs:{d:`m15 5 4 4`}}],copy:[{tag:`rect`,attrs:{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`}},{tag:`path`,attrs:{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`}}],folder:[{tag:`path`,attrs:{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`}}],"git-branch":[{tag:`line`,attrs:{x1:`6`,x2:`6`,y1:`3`,y2:`15`}},{tag:`circle`,attrs:{cx:`18`,cy:`6`,r:`3`}},{tag:`circle`,attrs:{cx:`6`,cy:`18`,r:`3`}},{tag:`path`,attrs:{d:`M18 9a9 9 0 0 1-9 9`}}],eye:[{tag:`path`,attrs:{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`}},{tag:`circle`,attrs:{cx:`12`,cy:`12`,r:`3`}}],"eye-off":[{tag:`path`,attrs:{d:`M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49`}},{tag:`path`,attrs:{d:`M14.084 14.158a3 3 0 0 1-4.242-4.242`}},{tag:`path`,attrs:{d:`M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143`}},{tag:`path`,attrs:{d:`m2 2 20 20`}}],"app-window":[{tag:`rect`,attrs:{x:`2`,y:`4`,width:`20`,height:`16`,rx:`2`}},{tag:`path`,attrs:{d:`M10 4v4`}},{tag:`path`,attrs:{d:`M2 8h20`}},{tag:`path`,attrs:{d:`M6 4v4`}}],"arrow-up-right":[{tag:`path`,attrs:{d:`M7 7h10v10`}},{tag:`path`,attrs:{d:`M7 17 17 7`}}],"external-link":[{tag:`path`,attrs:{d:`M15 3h6v6`}},{tag:`path`,attrs:{d:`M10 14 21 3`}},{tag:`path`,attrs:{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`}}],link:[{tag:`path`,attrs:{d:`M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71`}},{tag:`path`,attrs:{d:`M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71`}}],list:[{tag:`path`,attrs:{d:`M3 5h.01`}},{tag:`path`,attrs:{d:`M3 12h.01`}},{tag:`path`,attrs:{d:`M3 19h.01`}},{tag:`path`,attrs:{d:`M8 5h13`}},{tag:`path`,attrs:{d:`M8 12h13`}},{tag:`path`,attrs:{d:`M8 19h13`}}],share:[{tag:`path`,attrs:{d:`M12 2v13`}},{tag:`path`,attrs:{d:`m16 6-4-4-4 4`}},{tag:`path`,attrs:{d:`M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8`}}],x:[{tag:`path`,attrs:{d:`M18 6 6 18`}},{tag:`path`,attrs:{d:`m6 6 12 12`}}],hash:[{tag:`line`,attrs:{x1:`4`,x2:`20`,y1:`9`,y2:`9`}},{tag:`line`,attrs:{x1:`4`,x2:`20`,y1:`15`,y2:`15`}},{tag:`line`,attrs:{x1:`10`,x2:`8`,y1:`3`,y2:`21`}},{tag:`line`,attrs:{x1:`16`,x2:`14`,y1:`3`,y2:`21`}}],"mail-open":[{tag:`path`,attrs:{d:`M21.2 8.4c.5.38.8.97.8 1.6v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V10a2 2 0 0 1 .8-1.6l8-6a2 2 0 0 1 2.4 0l8 6Z`}},{tag:`path`,attrs:{d:`m22 10-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 10`}}],"message-square":[{tag:`path`,attrs:{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`}}],"message-square-plus":[{tag:`path`,attrs:{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`}},{tag:`path`,attrs:{d:`M12 8v6`}},{tag:`path`,attrs:{d:`M9 11h6`}}],pin:[{tag:`path`,attrs:{d:`M12 17v5`}},{tag:`path`,attrs:{d:`M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z`}}],"pin-off":[{tag:`path`,attrs:{d:`M12 17v5`}},{tag:`path`,attrs:{d:`M15 9.34V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H7.89`}},{tag:`path`,attrs:{d:`m2 2 20 20`}},{tag:`path`,attrs:{d:`M9 9v1.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h11`}}],"refresh-cw":[{tag:`path`,attrs:{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`}},{tag:`path`,attrs:{d:`M21 3v5h-5`}},{tag:`path`,attrs:{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`}},{tag:`path`,attrs:{d:`M8 16H3v5`}}],settings:[{tag:`path`,attrs:{d:`M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.38a2 2 0 0 0-.73-2.73l-.15-.09a2 2 0 0 1-1-1.74v-.51a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z`}},{tag:`circle`,attrs:{cx:`12`,cy:`12`,r:`3`}}],"folder-plus":[{tag:`path`,attrs:{d:`M12 10v6`}},{tag:`path`,attrs:{d:`M9 13h6`}},{tag:`path`,attrs:{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`}}],"folder-tree":[{tag:`path`,attrs:{d:`M20 10a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1h-2.5a1 1 0 0 1-.8-.4l-.9-1.2A1 1 0 0 0 15 3h-2a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z`}},{tag:`path`,attrs:{d:`M20 21a1 1 0 0 0 1-1v-3a1 1 0 0 0-1-1h-2.9a1 1 0 0 1-.88-.55l-.42-.85a1 1 0 0 0-.92-.6H13a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z`}},{tag:`path`,attrs:{d:`M3 5a2 2 0 0 0 2 2h3`}},{tag:`path`,attrs:{d:`M3 3v13a2 2 0 0 0 2 2h3`}}],"text-search":[{tag:`path`,attrs:{d:`M21 5H3`}},{tag:`path`,attrs:{d:`M10 12H3`}},{tag:`path`,attrs:{d:`M10 19H3`}},{tag:`circle`,attrs:{cx:`17`,cy:`15`,r:`3`}},{tag:`path`,attrs:{d:`m21 19-1.9-1.9`}}],trash:[{tag:`path`,attrs:{d:`M3 6h18`}},{tag:`path`,attrs:{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`}},{tag:`path`,attrs:{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`}},{tag:`line`,attrs:{x1:`10`,x2:`10`,y1:`11`,y2:`17`}},{tag:`line`,attrs:{x1:`14`,x2:`14`,y1:`11`,y2:`17`}}]};function Bt(e,t){let n=zt[e];if(!n||typeof document.createElementNS!=`function`)return null;let r=document.createElementNS(Rt,`svg`);r.setAttribute(`xmlns`,Rt),r.setAttribute(`viewBox`,`0 0 24 24`),r.setAttribute(`fill`,`none`),r.setAttribute(`stroke`,`currentColor`),r.setAttribute(`stroke-width`,`2`),r.setAttribute(`stroke-linecap`,`round`),r.setAttribute(`stroke-linejoin`,`round`),r.setAttribute(`class`,t===`destructive`?`size-4.5 shrink-0 sm:size-4`:`size-4.5 shrink-0 text-muted-foreground sm:size-4`);for(let e of n){let t=document.createElementNS(Rt,e.tag);for(let[n,r]of Object.entries(e.attrs))t.setAttribute(n,r);r.appendChild(t)}return r}function Vt(e,t,n){let r=e.getBoundingClientRect(),i=Math.min(Math.max(4,t),Math.max(4,window.innerWidth-r.width-4)),a=Math.min(Math.max(4,n),Math.max(4,window.innerHeight-r.height-4));e.style.left=`${i}px`,e.style.top=`${a}px`}function Ht(e,t){if(typeof Node<`u`&&e instanceof Node)return t.some(t=>t.contains(e));if(!e||typeof e!=`object`)return!1;let n=e;for(;n&&typeof n==`object`;){if(t.includes(n))return!0;n=n.parent}return!1}var N=null;function Ut(){return N!==null}function Wt(){N?.(),N=null}function Gt(e,t){return new Promise(n=>{let r=document.activeElement;for(;r?.shadowRoot?.activeElement;)r=r.shadowRoot.activeElement;let i=r instanceof HTMLElement?r:null,a=[],s=[],c=!1,l=!1,u=()=>d(null),d=e=>{if(c)return;c=!0,N===u&&(N=null),document.removeEventListener(`keydown`,f),document.removeEventListener(`pointerdown`,ee,!0),document.removeEventListener(`contextmenu`,te,!0);let t=Ht(document.activeElement,a);for(let e of a)e.remove();t&&i?.isConnected&&i.focus({preventScroll:!0}),n(e)},f=e=>{e.key===`Escape`&&(e.preventDefault(),d(null))},ee=e=>{l&&!Ht(e.target,a)&&d(null)},te=e=>{l&&!Ht(e.target,a)&&(e.preventDefault(),d(null))},p=e=>{for(;a.length>e;)s.pop()?.setAttribute(`aria-expanded`,`false`),a.pop()?.remove()},ne=(e,t,n,r,i)=>{p(r);let c=document.createElement(`div`);c.className=`dropdown-glass fixed z-[10000] min-w-56 max-w-sm overflow-hidden rounded-lg bg-clip-padding text-popover-foreground outline-none`,c.style.cssText=`position:fixed;z-index:10000;min-width:14rem;max-width:24rem;overflow:hidden;border-radius:var(--radius-lg);background-clip:padding-box;color:var(--contrast-popover-foreground);outline:none;pointer-events:auto;`,c.style.left=`${t}px`,c.style.top=`${n}px`,c.dataset.level=String(r);let u=document.createElement(`div`);u.className=`max-h-[calc(100vh-0.5rem)] min-w-0 max-w-sm overflow-y-auto overflow-x-hidden p-1`,u.style.cssText=`max-height:calc(100vh - 0.5rem);min-width:0;max-width:24rem;overflow-x:hidden;overflow-y:auto;padding:0.25rem;`;for(let t of e){if(t.separatorBefore===!0&&u.children.length>0){let e=document.createElement(`div`);e.className=`mx-2 my-1 h-px bg-border`,e.style.cssText=`height:1px;margin:0.25rem 0.5rem;background:var(--contrast-border);`,e.dataset.contextMenuSeparator=`true`,e.setAttribute(`role`,`separator`),u.appendChild(e)}if(t.header===!0){let e=document.createElement(`div`);e.className=`px-2 py-1.5 font-medium text-muted-foreground text-xs`,e.textContent=t.label,u.appendChild(e);continue}let e=Array.isArray(t.children)&&t.children.length>0,n=!e&&(t.destructive===!0||t.id===`delete`),i=document.createElement(`button`);i.type=`button`;let s=t.disabled===!0;i.disabled=s;let c=`flex w-full cursor-default select-none items-center gap-2 rounded-sm px-2 py-1 text-left outline-none transition-colors sm:min-h-7 sm:text-sm min-h-8 text-base`;if(i.className=s?`${c} pointer-events-none cursor-not-allowed text-muted-foreground opacity-64`:n?`${c} text-destructive-foreground hover:bg-destructive/10 hover:text-destructive-foreground`:`${c} text-foreground hover:bg-accent hover:text-accent-foreground`,i.style.cssText=`display:flex;width:100%;min-height:1.75rem;align-items:center;gap:0.5rem;border:0;border-radius:var(--radius-sm);background:transparent;padding:0.25rem 0.5rem;color:var(--contrast-foreground);font-family:var(--font-sans,system-ui,sans-serif);font-size:0.875rem;line-height:1.25rem;text-align:left;cursor:default;`,n&&(i.style.color=`var(--destructive-foreground)`),s&&(i.style.color=`var(--contrast-muted-foreground)`,i.style.opacity=`0.64`,i.style.pointerEvents=`none`),typeof t.checked==`boolean`){i.setAttribute(`role`,`menuitemradio`),i.setAttribute(`aria-checked`,t.checked?`true`:`false`);let e=t.checked?Bt(`check`,`neutral`):null;if(e)i.appendChild(e);else{let e=document.createElement(`span`);e.className=`size-4.5 shrink-0 sm:size-4`,e.style.cssText=`display:inline-block;width:1rem;height:1rem;flex-shrink:0;`,e.setAttribute(`aria-hidden`,`true`),i.appendChild(e)}}else if(typeof t.icon==`string`){let e=Bt(t.icon,n?`destructive`:`neutral`);e&&i.appendChild(e)}let f=document.createElement(`span`);if(f.className=`min-w-0 flex-1 truncate`,f.textContent=t.label,i.appendChild(f),typeof t.accelerator==`string`){let e=document.createElement(`span`);e.className=`ms-6 shrink-0 text-muted-foreground text-xs tracking-widest`,e.style.cssText=`margin-inline-start:1.5rem;flex-shrink:0;color:var(--contrast-muted-foreground);font-size:0.75rem;letter-spacing:0.1em;`,e.textContent=Lt(t.accelerator),e.setAttribute(`aria-hidden`,`true`),i.setAttribute(`aria-keyshortcuts`,t.accelerator.replace(`CmdOrCtrl`,o(navigator.platform)?`Meta`:`Control`)),i.appendChild(e)}if(e){i.setAttribute(`aria-haspopup`,`menu`),i.setAttribute(`aria-expanded`,`false`);let e=Bt(`chevron-right`,`neutral`);e&&(e.setAttribute(`class`,`-me-0.5 ms-auto size-4.5 shrink-0 text-muted-foreground opacity-80 sm:size-4`),e.setAttribute(`aria-hidden`,`true`),e.dataset.contextMenuChevron=`true`,i.appendChild(e))}if(!s){let o=!1,s=!1,c=()=>{let e=o||s;i.style.background=e?n?`color-mix(in srgb, var(--destructive) 10%, transparent)`:`var(--accent)`:`transparent`,i.style.color=e?n?`var(--destructive-foreground)`:`var(--contrast-accent-foreground)`:n?`var(--destructive-foreground)`:`var(--contrast-foreground)`};if(i.addEventListener(`mouseenter`,()=>{i.focus({preventScroll:!0}),o=!0,c()}),i.addEventListener(`mouseleave`,()=>{o=!1,c()}),i.addEventListener(`focus`,()=>{s=!0,c()}),i.addEventListener(`blur`,()=>{s=!1,c()}),e){let e=(e=!1)=>{let n=i.getBoundingClientRect(),o=n.right+4,s=n.top;ne(t.children,o,s,r+1,i),i.setAttribute(`aria-expanded`,`true`);let c=a[r+1];if(!c)return;let l=c.getBoundingClientRect();l.right>window.innerWidth&&Vt(c,n.left-l.width-4,n.top),e&&[...c.querySelectorAll(`button`)].find(e=>!e.disabled)?.focus()};i.addEventListener(`mouseenter`,()=>{e()}),i.addEventListener(`click`,t=>{t.preventDefault(),e(!0)})}else i.addEventListener(`mouseenter`,()=>{p(r+1)}),i.addEventListener(`click`,()=>{l&&d(t.id)})}u.appendChild(i)}c.appendChild(u),c.addEventListener(`mouseenter`,()=>{p(r+1)}),document.body.appendChild(c),a[r]=c,s[r]=i,requestAnimationFrame(()=>{Vt(c,t,n)})};document.addEventListener(`keydown`,f),document.addEventListener(`pointerdown`,ee,!0),document.addEventListener(`contextmenu`,te,!0),ne(e,t?.x??0,t?.y??0,0),N&&N(),N=u,requestAnimationFrame(()=>{l=!0})})}var Kt=`p4code:client-settings:v1`;function qt(){return typeof window<`u`}function Jt(){return qt()?s(Kt,ae):null}function Yt(e){qt()&&i(Kt,e,ae)}var Xt;function Zt(){return{dialogs:{pickFolder:async e=>window.desktopBridge?window.desktopBridge.pickFolder(e):null,confirm:async(e,t)=>Mt(e,t)??!1},shell:{openExternal:async e=>{if(window.desktopBridge){if(!await window.desktopBridge.openExternal(e))throw Error(`Unable to open link.`)}else window.open(e,`_blank`,`noopener,noreferrer`)},openSystemSettings:async e=>{if(!window.desktopBridge?.openSystemSettings||!await window.desktopBridge.openSystemSettings(e))throw Error(`Unable to open System Settings.`)}},contextMenu:{show:async(e,t)=>window.desktopBridge?window.desktopBridge.showContextMenu(e,t):Gt(e,t),close:async()=>{window.desktopBridge||Wt()}},persistence:{getClientSettings:async()=>window.desktopBridge?window.desktopBridge.getClientSettings():Jt(),setClientSettings:async e=>{if(window.desktopBridge)return window.desktopBridge.setClientSettings(e);Yt(e)}}}}function Qt(){return Zt()}function $t(){if(typeof window<`u`)return Xt||(Xt=Qt(),Xt)}function en(){let e=$t();if(!e)throw Error(`Local API not found`);return e}var P=`p4code:theme`,tn=`(prefers-color-scheme: dark)`,F={theme:`system`,resolvedTheme:`light`,systemDark:!1,followSystem:!0,appearanceMode:`system`,themeHalves:null};function nn(){return I()}function rn(){return typeof window>`u`?{}:an()}function I(){if(typeof window>`u`)return null;try{return ut(window.localStorage.getItem(S))}catch{return null}}function an(){try{let e=JSON.parse(window.localStorage.getItem(`p4code:theme-halves:v1`)??`null`);if(typeof e!=`object`||!e)return{};let t={};for(let n of[`light`,`dark`]){let r=e[n];typeof r==`string`&&(t[n]=r)}return t}catch{return{}}}function L(e){return`${e?.light??``}|${e?.dark??``}`}var on=`theme-color`,sn=`meta[name="${on}"][data-dynamic-theme-color="true"]`,R=class extends be()(`ThemeStorageError`,{operation:le([`read`,`write`]),storageKey:oe,theme:ke(_t),cause:Ae()}){get message(){return`Failed to ${this.operation} theme preference for ${this.storageKey}.`}},cn=pe(R),ln=class extends be()(`DesktopThemeSyncError`,{theme:_t,cause:Ae()}){get message(){return`Failed to sync the ${this.theme} theme to the desktop shell.`}},un=pe(ln),z=[],B=null,dn=!0,fn=null,V=null,H=null;function U(){dn=!0;for(let e of z)e()}function pn(){return typeof window<`u`&&typeof window.matchMedia==`function`&&window.matchMedia(tn).matches}function mn(e){if(typeof window>`u`)return e===`system`;try{let e=window.localStorage.getItem(vt);if(e===`true`)return!0;if(e===`false`)return!1}catch{}return e===`system`}function hn(e){return e===`light`||e===`dark`||e===`system`}function W(e){if(typeof window<`u`)try{let e=window.localStorage.getItem(C);if(hn(e))return e}catch{}return mn(e)?`system`:yt(e)??`light`}function gn(e){if(typeof window<`u`)try{window.localStorage.setItem(C,e)}catch(e){throw new R({operation:`write`,storageKey:C,cause:e})}}function _n(){if(typeof window>`u`)return F.theme;let e;try{e=window.localStorage.getItem(P)}catch(e){throw new R({operation:`read`,storageKey:P,cause:e})}return e!==null&&st(e)?e:F.theme}function vn(e){if(typeof window<`u`)try{window.localStorage.setItem(P,e),H=null}catch(t){throw new R({operation:`write`,storageKey:P,theme:e,cause:t})}}function G(){if(H!==null)return F.theme;try{return _n()}catch(e){let t=cn(e)?e:new R({operation:`read`,storageKey:P,cause:e});return H=t,console.error(t.message,{operation:t.operation,storageKey:t.storageKey,...v(t)}),F.theme}}function yn(){let e=document.querySelector(sn);return e||(e=document.createElement(`meta`),e.name=on,e.setAttribute(`data-dynamic-theme-color`,`true`),document.head.append(e),e)}function bn(e){let t=e?.trim().toLowerCase();return!t||t===`transparent`||t===`rgba(0, 0, 0, 0)`||t===`rgba(0 0 0 / 0)`?null:e?.trim()??null}function xn(){return document.querySelector(`main[data-slot='sidebar-inset']`)??document.querySelector(`[data-slot='sidebar-inner']`)??document.body}function Sn(){if(typeof document>`u`||typeof getComputedStyle>`u`)return;let e=getComputedStyle(document.documentElement),t=document.documentElement.dataset.themeId?bn(e.getPropertyValue(`--app-chrome-background`)):null,n=bn(getComputedStyle(xn()).backgroundColor),r=bn(getComputedStyle(document.body).backgroundColor),i=t??n??r;if(!i)return;document.documentElement.style.backgroundColor=i,document.body.style.backgroundColor=i;let a=document.querySelectorAll(`meta[name="${on}"]`);if(a.length===0)yn().setAttribute(`content`,i);else for(let e of a)e.setAttribute(`content`,i)}function K(e,{suppressTransitions:t=!1,preservePreview:n=!0}={}){if(typeof document>`u`||typeof window>`u`||n&&document.documentElement.dataset?.themeId===`__preview`)return;let r=W(e),i=r===`system`,a=i?pn():!1,o=I();if(V?.theme===e&&V.systemDark===a&&V.followSystem===i&&V.appearanceMode===r&&L(V.themeHalves)===L(o)){wn(e,i,r);return}t&&document.documentElement.classList.add(`no-transitions`);let s=dt(e,a,i,r,o);gt(ct(e,o,s),s),document.documentElement.classList.toggle(`dark`,s===`dark`),V={theme:e,systemDark:a,followSystem:i,appearanceMode:r,themeHalves:o},Sn(),wn(e,i,r),t&&(document.documentElement.offsetHeight,requestAnimationFrame(()=>{document.documentElement.classList.remove(`no-transitions`)}))}async function Cn(e,t,n,r,i=I()){try{await e.setTheme(lt(t,n,r,i))}catch(e){throw new ln({theme:t,cause:e})}}function wn(e,t,n){if(typeof window>`u`)return;let r=window.desktopBridge,i=I(),a=lt(e,t,n,i);r&&typeof r.setTheme==`function`&&fn!==a&&(fn=a,Cn(r,e,t,n,i).catch(t=>{let n=un(t)?t:new ln({theme:e,cause:t});console.error(n.message,{theme:n.theme,...v(n)}),fn===a&&(fn=null)}))}typeof document<`u`&&typeof window<`u`&&K(G());function Tn(){if(typeof window>`u`)return F;if(!dn&&B)return B;dn=!1;let e=G(),t=W(e),n=t===`system`,r=n?pn():!1,i=I(),a=dt(e,r,n,t,i);return B&&B.theme===e&&B.resolvedTheme===a&&B.systemDark===r&&B.followSystem===n&&B.appearanceMode===t&&L(B.themeHalves)===L(i)||(B={theme:e,resolvedTheme:a,systemDark:r,followSystem:n,appearanceMode:t,themeHalves:i}),B}function En(){return F}function Dn(){let e=G();W(e)===`system`&&K(e,{suppressTransitions:!0}),U()}function On(e){e.key===P?(H=null,K(G(),{suppressTransitions:!0}),U()):e.key===`p4code:theme-follow-system`||e.key===`p4code:theme-appearance-mode`||e.key===`p4code:theme-halves:v1`?(K(G(),{suppressTransitions:!0}),U()):(e.key===`p4code:themes:v1`||e.key===null)&&(e.key===null&&(H=null),ft(),V=null,K(G(),{suppressTransitions:!0}),U())}var kn=null;function An(e){if(typeof window>`u`)return()=>{};if(z.push(e),!kn){let e=typeof window.matchMedia==`function`?window.matchMedia(tn):null;e?.addEventListener(`change`,Dn),window.addEventListener(`storage`,On),kn=()=>{e?.removeEventListener(`change`,Dn),window.removeEventListener(`storage`,On)}}return()=>{z=z.filter(t=>t!==e),z.length===0&&(kn?.(),kn=null)}}function jn(){let e=(0,w.useSyncExternalStore)(An,Tn,En),{theme:t,resolvedTheme:n}=e,r=(0,w.useCallback)(e=>{if(typeof window>`u`)return!1;try{gn(W(G()));let t=window.localStorage.getItem(S);window.localStorage.removeItem(S);try{vn(e)}catch(e){if(t!==null)try{window.localStorage.setItem(S,t)}catch{}throw e}}catch(t){let n=cn(t)?t:new R({operation:`write`,storageKey:P,theme:e,cause:t});return console.error(n.message,{operation:n.operation,storageKey:n.storageKey,theme:e,...v(n)}),!1}return K(e,{suppressTransitions:!0}),U(),!0},[]),i=(0,w.useCallback)(e=>{if(typeof window>`u`)return!1;try{gn(e)}catch(e){let t=cn(e)?e:new R({operation:`write`,storageKey:C,cause:e});return console.error(t.message,{operation:t.operation,storageKey:t.storageKey,...v(t)}),!1}return H=null,K(G(),{suppressTransitions:!0}),U(),!0},[]),a=(0,w.useCallback)(e=>{let n=W(t),r=e?`system`:n===`system`?yt(t)??`light`:n;return i(r)},[i,t]),o=(0,w.useCallback)((e,t)=>{if(typeof window>`u`)return!1;try{let n={...an()};t===null?delete n[e]:n[e]=t,n.light===void 0&&n.dark===void 0?window.localStorage.removeItem(S):window.localStorage.setItem(S,JSON.stringify(n))}catch(e){let t=new R({operation:`write`,storageKey:S,cause:e});return console.error(t.message,{operation:t.operation,storageKey:t.storageKey,...v(t)}),!1}return K(G(),{suppressTransitions:!0}),U(),!0},[]),s=(0,w.useCallback)(()=>{if(typeof window>`u`)return!1;try{window.localStorage.removeItem(S)}catch(e){let t=new R({operation:`write`,storageKey:S,cause:e});return console.error(t.message,{operation:t.operation,storageKey:t.storageKey,...v(t)}),!1}return K(G(),{suppressTransitions:!0}),U(),!0},[]),c=(0,w.useCallback)(({preservePreview:e=!1}={})=>{typeof window<`u`&&(V=null,K(G(),{suppressTransitions:!0,preservePreview:e}),U())},[]);return(0,w.useEffect)(()=>{K(t)},[e.appearanceMode,t]),{theme:t,setTheme:r,setAppearanceMode:i,setFollowSystem:a,setThemeHalf:o,clearThemeHalves:s,refreshTheme:c,followSystem:e.followSystem,appearanceMode:e.appearanceMode,resolvedTheme:n,themeHalves:e.themeHalves}}var Mn=we(Ce(Pe)),Nn=He(e=>{let t=e.replace(/("(?:[^"\\]|\\.)*")|\/\/[^\r\n]*/g,(e,t)=>t?e:``);return t=t.replace(/("(?:[^"\\]|\\.)*")|\/\*[\s\S]*?\*\//g,(e,t)=>t?e:``),t=t.replace(/("(?:[^"\\]|\\.)*")|,(\s*[}\]])/g,(e,t,n)=>t?e:n??``),Mn(t).pipe(Re(e=>e.issue))}),Pn=new p(Nn,Fe());Oe().pipe(Be(Fe({space:2})));var Fn=e=>oe.pipe(Ie(e,Pn)),In={performance:{profile:`performance`,automaticGitFetchInterval:g(15),providerHealthRefreshInterval:m(1),hostPowerMonitorActiveInterval:g(30),hostPowerMonitorIdleInterval:m(2),idleClientTtl:g(45),pauseWhenHostLocked:!0,pauseWhenHostLowPower:!1,pauseWhenClientLowPower:!1,pauseWhenOnBattery:!1},balanced:{profile:`balanced`,automaticGitFetchInterval:je,providerHealthRefreshInterval:ue,hostPowerMonitorActiveInterval:g(30),hostPowerMonitorIdleInterval:m(5),idleClientTtl:g(45),pauseWhenHostLocked:!0,pauseWhenHostLowPower:!0,pauseWhenClientLowPower:!0,pauseWhenOnBattery:!1},"battery-saver":{profile:`battery-saver`,automaticGitFetchInterval:g(0),providerHealthRefreshInterval:m(15),hostPowerMonitorActiveInterval:m(1),hostPowerMonitorIdleInterval:m(10),idleClientTtl:g(45),pauseWhenHostLocked:!0,pauseWhenHostLowPower:!0,pauseWhenClientLowPower:!0,pauseWhenOnBattery:!0}};function q(e){return In[e]}function Ln(e){return e.profile===`custom`?e.baseProfile??`balanced`:e.profile}function Rn(e){let t=Ln(e),n=In[t],r=e.profile===`custom`?e.overrides:{};return{profile:t,automaticGitFetchInterval:r.automaticGitFetchInterval??n.automaticGitFetchInterval,providerHealthRefreshInterval:r.providerHealthRefreshInterval??n.providerHealthRefreshInterval,hostPowerMonitorActiveInterval:r.hostPowerMonitorActiveInterval??n.hostPowerMonitorActiveInterval,hostPowerMonitorIdleInterval:r.hostPowerMonitorIdleInterval??n.hostPowerMonitorIdleInterval,idleClientTtl:r.idleClientTtl??n.idleClientTtl,pauseWhenHostLocked:r.pauseWhenHostLocked??n.pauseWhenHostLocked,pauseWhenHostLowPower:r.pauseWhenHostLowPower??n.pauseWhenHostLowPower,pauseWhenClientLowPower:r.pauseWhenClientLowPower??n.pauseWhenClientLowPower,pauseWhenOnBattery:r.pauseWhenOnBattery??n.pauseWhenOnBattery}}function J(e,t){return h(e)===h(t)}function zn(e,t){return J(e.automaticGitFetchInterval,t.automaticGitFetchInterval)&&J(e.providerHealthRefreshInterval,t.providerHealthRefreshInterval)&&J(e.hostPowerMonitorActiveInterval,t.hostPowerMonitorActiveInterval)&&J(e.hostPowerMonitorIdleInterval,t.hostPowerMonitorIdleInterval)&&J(e.idleClientTtl,t.idleClientTtl)&&e.pauseWhenHostLocked===t.pauseWhenHostLocked&&e.pauseWhenHostLowPower===t.pauseWhenHostLowPower&&e.pauseWhenClientLowPower===t.pauseWhenClientLowPower&&e.pauseWhenOnBattery===t.pauseWhenOnBattery}function Bn(e){if(e.profile!==`custom`)return{schemaVersion:1,profile:e.profile,overrides:{}};let t=Rn(e),n=[Ln(e),`balanced`,`performance`,`battery-saver`];for(let e of n)if(zn(t,In[e]))return{schemaVersion:1,profile:e,overrides:{}};let r=Ln(e),i=In[r];return{schemaVersion:1,profile:`custom`,baseProfile:r,overrides:{...J(t.automaticGitFetchInterval,i.automaticGitFetchInterval)?{}:{automaticGitFetchInterval:t.automaticGitFetchInterval},...J(t.providerHealthRefreshInterval,i.providerHealthRefreshInterval)?{}:{providerHealthRefreshInterval:t.providerHealthRefreshInterval},...J(t.hostPowerMonitorActiveInterval,i.hostPowerMonitorActiveInterval)?{}:{hostPowerMonitorActiveInterval:t.hostPowerMonitorActiveInterval},...J(t.hostPowerMonitorIdleInterval,i.hostPowerMonitorIdleInterval)?{}:{hostPowerMonitorIdleInterval:t.hostPowerMonitorIdleInterval},...J(t.idleClientTtl,i.idleClientTtl)?{}:{idleClientTtl:t.idleClientTtl},...t.pauseWhenHostLocked===i.pauseWhenHostLocked?{}:{pauseWhenHostLocked:t.pauseWhenHostLocked},...t.pauseWhenHostLowPower===i.pauseWhenHostLowPower?{}:{pauseWhenHostLowPower:t.pauseWhenHostLowPower},...t.pauseWhenClientLowPower===i.pauseWhenClientLowPower?{}:{pauseWhenClientLowPower:t.pauseWhenClientLowPower},...t.pauseWhenOnBattery===i.pauseWhenOnBattery?{}:{pauseWhenOnBattery:t.pauseWhenOnBattery}}}}function Vn(e){let t={schemaVersion:1,profile:ne,overrides:{}},n=e.backgroundActivity.profile===t.profile&&e.backgroundActivity.baseProfile===void 0&&Object.keys(e.backgroundActivity.overrides).length===0,r=e.backgroundActivityProfile,i=r!==`balanced`||h(e.automaticGitFetchInterval)!==h(je)||h(e.providerHealthRefreshInterval)!==h(ue);return Rn(n&&i?{schemaVersion:1,profile:h(e.automaticGitFetchInterval)===h(q(r).automaticGitFetchInterval)&&h(e.providerHealthRefreshInterval)===h(q(r).providerHealthRefreshInterval)?r:`custom`,baseProfile:r,overrides:{...h(e.automaticGitFetchInterval)===h(q(r).automaticGitFetchInterval)?{}:{automaticGitFetchInterval:e.automaticGitFetchInterval},...h(e.providerHealthRefreshInterval)===h(q(r).providerHealthRefreshInterval)?{}:{providerHealthRefreshInterval:e.providerHealthRefreshInterval}}}:e.backgroundActivity)}function Hn(e){let t=Vn(e);return Bn({schemaVersion:1,profile:`custom`,baseProfile:t.profile,overrides:{automaticGitFetchInterval:t.automaticGitFetchInterval,providerHealthRefreshInterval:t.providerHealthRefreshInterval,hostPowerMonitorActiveInterval:t.hostPowerMonitorActiveInterval,hostPowerMonitorIdleInterval:t.hostPowerMonitorIdleInterval,idleClientTtl:t.idleClientTtl,pauseWhenHostLocked:t.pauseWhenHostLocked,pauseWhenHostLowPower:t.pauseWhenHostLowPower,pauseWhenClientLowPower:t.pauseWhenClientLowPower,pauseWhenOnBattery:t.pauseWhenOnBattery}})}var Un=Fn(Le({observability:ze.fields.observability}));De(Un);function Wn(e,t){let n=e.providerInstances[t.instanceId];return n===void 0?Ue(t.instanceId):Te(n)}var Gn=[`codex`,`claudeAgent`,`cursor`,`grok`,`muse`,`pi`,`opencode`,`antigravity`].map(e=>se.make(e));function Kn(e,t,n){let i=[...Gn.map(e=>[ye(e),e]),...n?.includeConfiguredInstances===!0?Object.entries(e).flatMap(([e,t])=>Gn.includes(t.driver)?[[he.make(e),t.driver]]:[]):[]].find(([e,n])=>t(e,n));if(i===void 0)return null;let[a,o]=i,s=n?.defaultModelSelection,c=e[a]?.config;return s?.instanceId===a&&r(c?.customModels).some(e=>e.slug===s.model)?s:{instanceId:a,model:Ee[o]??Ne[o]??`gpt-6-luna`}}function qn(e,t,n){let r=e.sourceControlWriterModelSelection;if(!r||!Ve(e,n,r.instanceId))return e.textGenerationModelSelection;if(t===void 0)return r;let i=t.find(e=>e.instanceId===r.instanceId);return i?.enabled===!0&&re(i)&&ve(i)?r:e.textGenerationModelSelection}function Jn(e,t,n){let r=e.reviewGuideModelSelection;if(r&&Ve(e,n,r.instanceId)){let e=t?.find(e=>e.instanceId===r.instanceId);if(t===void 0||e?.enabled===!0&&re(e)&&ve(e))return r}return qn(e,t,n)}new Set(Object.keys(_e.fields));function Yn(e,t={}){return{favorites:e.favorites??t.favorites??[],providerModelPreferences:e.providerModelPreferences??t.providerModelPreferences??{}}}function Xn(e,t){let n=e.favorites===null&&(t.favorites?.length??0)>0?t.favorites:void 0,r=e.providerModelPreferences===null&&Object.keys(t.providerModelPreferences??{}).length>0?t.providerModelPreferences:void 0;return n===void 0&&r===void 0?null:{migrateModelPreferences:{...n===void 0?{}:{favorites:n},...r===void 0?{}:{providerModelPreferences:r}}}}var Zn=new Set([`continueThreadsAfterServerUpdate`,`autoResumeLimitedThreads`,`snoozeLimitedThreads`,`newWorktreesStartFromOrigin`,`sourceControlWritingStyle`,`textGenerationModelSelection`]);function Qn(e){let t={},n={};for(let[r,i]of Object.entries(e))Zn.has(r)?t[r]=i:n[r]=i;return{sharedPatch:t,localPatch:n}}function $n(e,t,n,r=n,i=!1){let a=e.textGenerationModelSelection?.instanceId??r?.textGenerationModelSelection.instanceId;return!i&&e.textGenerationModelSelection&&(!n||a!==void 0&&(r?.providerInstances[a]?.driver??a)!==(n.providerInstances[a]?.driver??a)||!Wn(n,{...n.textGenerationModelSelection,...e.textGenerationModelSelection}))&&(e=ge(e,[`textGenerationModelSelection`])),t?.threadRestartContinuation===!0?e:ge(e,[`continueThreadsAfterServerUpdate`])}function er(e){return e.connection.phase===`connected`&&e.serverConfig!==null}function tr(e,t){return{...t,environmentId:e,label:t.entry.target.label,displayUrl:Xe(t.entry),relayManaged:qe(t.entry)}}function nr(){let e=(0,T.c)(7),t=a(x.catalogValueAtom),n=a(x.networkStatusValueAtom),r=a(E.presentationsAtom),i;e[0]===r?i=e[1]:(i=[...r.entries()].map(rr),e[0]=r,e[1]=i);let o=i,s;return e[2]!==t.isReady||e[3]!==o||e[4]!==n||e[5]!==r?(s={isReady:t.isReady,networkStatus:n,environments:o,presentationById:r},e[2]=t.isReady,e[3]=o,e[4]=n,e[5]=r,e[6]=s):s=e[6],s}function rr(e){let[t,n]=e;return tr(t,n)}function ir(){return a($e)}function ar(e){let t=(0,T.c)(3),{presentation:n}=Tt(e),r;return t[0]!==e||t[1]!==n?(r=e===null||n===null?null:tr(e,n),t[0]=e,t[1]=n,t[2]=r):r=t[2],r}function or(){return ar(ir())}function sr(e){let t=(0,T.c)(2),n=rt(e),r;return t[0]===n?r=t[1]:(r=ie(n)?n.value.httpBaseUrl:null,t[0]=n,t[1]=r),r}function cr(){return a(Qe.stateValueAtom)}function lr(){return a(D.environmentIdsAtom)}function ur(){return a(D.identitiesAtom)}function dr(){return a(D.pullRequestsSupportedAtom)}function fr(){return a(D.machineByIdAtom)}var pr=`[CLIENT_SETTINGS]`,mr=new Set,hr=new Set,gr=fe,Y=`pending`,X=null,_r=0,vr=Promise.resolve(),yr=0;function br(){for(let e of mr)e()}function xr(){for(let e of hr)e()}function Z(){return gr}function Sr(e){gr=e,br()}function Cr(e){Y!==e&&(Y=e,xr())}function wr(e){return mr.add(e),Q().catch(()=>void 0),()=>{mr.delete(e)}}function Tr(){return Y===`ready`}function Er(){return Y}function Dr(e){return hr.add(e),Q().catch(()=>void 0),()=>{hr.delete(e)}}async function Q(){if(Y===`ready`)return;if(X)return X;let e=_r;Cr(Y===`failed`||Y===`retrying`?`retrying`:`pending`);let t=(async()=>{try{let t=await en().persistence.getClientSettings();if(e!==_r)return;t&&Sr({...fe,...t}),Cr(`ready`)}catch(t){throw e===_r&&Cr(`failed`),console.error(`${pr} hydrate failed`,{operation:`hydrate`,...v(t)}),t}})().finally(()=>{X===t&&(X=null)});return X=t,X}var Or=e=>en().persistence.setClientSettings(e);function kr(e){let t=vr.then(e);return vr=t.then(()=>void 0,()=>void 0),t}function Ar(e,t=Or){let n=Y!==`ready`||yr>0;return n?yr+=1:Sr({...Z(),...e}),kr(async()=>{if(n)try{Y!==`ready`&&await Q(),Sr({...Z(),...e})}finally{--yr}await t(Z())}).catch(e=>{console.error(`${pr} persist failed`,{operation:`persist`,...v(e)})})}async function jr(e,t=Or){return kr(async()=>{for(Y!==`ready`&&await Q();;){let n=Z(),r=e(n);if(await t(r),Z()===n)return Sr(r),r}})}var Mr=new Set(ce(ze.fields));function Nr(e){let t={},n={};for(let[r,i]of Object.entries(e))Mr.has(r)?t[r]=i:n[r]=i;return{serverPatch:t,clientPatch:n}}function Pr(){return Z()}function Fr(){return Q()}function Ir(){return(0,w.useSyncExternalStore)(Dr,Tr,Lr)}function Lr(){return!1}function Rr(){return(0,w.useSyncExternalStore)(Dr,Er,zr)}function zr(){return`pending`}function $(){return(0,w.useSyncExternalStore)(wr,Z,Br)}function Br(){return fe}function Vr(e,t){return{...t,...e,...Yn(e,t)}}var Hr=new Set;function Ur(e,t){let n=(0,T.c)(8),r=$(),i=Ir(),a;n[0]===Symbol.for(`react.memo_cache_sentinel`)?(a={reportFailure:!1},n[0]=a):a=n[0];let o=at(b.updateSettings,a),s,c;n[1]!==r||n[2]!==e||n[3]!==i||n[4]!==o||n[5]!==t?(s=()=>{if(!e||!t||!i||Hr.has(e))return;let n=Xn(t,r);n&&(Hr.add(e),o({environmentId:e,input:{patch:n}}).finally(()=>Hr.delete(e)))},c=[r,e,i,o,t],n[1]=r,n[2]=e,n[3]=i,n[4]=o,n[5]=t,n[6]=s,n[7]=c):(s=n[6],c=n[7]),(0,w.useEffect)(s,c)}function Wr(e,t){let n=(0,T.c)(6),r=$(),i;n[0]!==r||n[1]!==e?(i=Vr(e,r),n[0]=r,n[1]=e,n[2]=i):i=n[2];let a=i,o;return n[3]!==a||n[4]!==t?(o=t?t(a):a,n[3]=a,n[4]=t,n[5]=o):o=n[5],o}function Gr(e){let t=(0,T.c)(3),n=$(),r;return t[0]!==e||t[1]!==n?(r=e?e(n):n,t[0]=e,t[1]=n,t[2]=r):r=t[2],r}function Kr(e){return e.settingsHydrated?e.paletteThemeActive&&!e.paletteThemeAllowsArtwork&&e.mode===`artwork`?`pill`:e.mode:`none`}function qr(){let e=(0,T.c)(7),t=Ir(),n=$().environmentIdentificationMode,{resolvedTheme:r,theme:i,themeHalves:a}=jn(),o=(0,w.useSyncExternalStore)(ot,ht,Jr),s;if(e[0]!==n||e[1]!==o||e[2]!==r||e[3]!==t||e[4]!==i||e[5]!==a){let c=ct(i,a,r),l=mt(c);s=Kr({mode:n,settingsHydrated:t,paletteThemeActive:o!==null||l!==null,paletteThemeAllowsArtwork:o??pt(c)}),e[0]=n,e[1]=o,e[2]=r,e[3]=t,e[4]=i,e[5]=a,e[6]=s}else s=e[6];return s}function Jr(){return null}async function Yr(e,t){return(e.favorites===null||e.providerModelPreferences===null)&&await Fr(),{...Xn(e,Pr()),...t}}function Xr(e){let t=(0,T.c)(6),n;t[0]===e?n=t[1]:(n=e?b.settingsValueAtom(e):Qr,t[0]=e,t[1]=n);let r=a(n),i=at(b.updateSettings,`model preferences update`),o;return t[2]!==e||t[3]!==i||t[4]!==r?(o=async t=>{if(!e||!r)return;let n;try{n=await Yr(r,t)}catch{y.add({type:`error`,title:`Model preferences not saved`,description:`Could not load saved model preferences. Try again.`});return}return i({environmentId:e,input:{patch:n}})},t[2]=e,t[3]=i,t[4]=r,t[5]=o):o=t[5],o}function Zr(e){let t=(0,w.use)(l),n=(0,w.useRef)(new Map),r=Xr(e);return(0,w.useCallback)(async(i,a)=>{if(!e)return;let o=b.settingsValueAtom(e),s=t.get(o);if(!s)return;if(s.favorites===null)try{await Fr()}catch{y.add({type:`error`,title:`Favorites not saved`,description:`Could not load saved model preferences. Try again.`});return}let c=t.get(o)??s,l=Yn(c,Pr()).favorites,u=JSON.stringify([e,i,a]),d=n.current.get(u),f={favorite:!(d&&(d.pending||d.settings.favorites===c.favorites)?d.favorite:l.some(e=>e.provider===i&&e.model===a)),settings:c,pending:!0};n.current.set(u,f);try{let e=await r({setModelFavorites:[{provider:i,model:a,favorite:f.favorite}]});e&&te(e)&&t.get(o)?.favorites===c.favorites&&(f.pending=!1)}finally{f.pending&&n.current.get(u)===f&&(d&&!d.pending&&t.get(o)?.favorites===d.settings.favorites?n.current.set(u,d):n.current.delete(u))}},[e,t,r])}var Qr=d(null);function $r(e){let t=(0,T.c)(5),n;t[0]===e?n=t[1]:(n=e?b.settingsValueAtom(e):Qr,t[0]=e,t[1]=n);let r=a(n),i=$();Ur(e,r);let o=r??de,s;return t[2]!==i||t[3]!==o?(s=Yn(o,i),t[2]=i,t[3]=o,t[4]=s):s=t[4],s}function ei(e,t){let n=(0,T.c)(2),r;n[0]===e?r=n[1]:(r=b.settingsValueAtom(e),n[0]=e,n[1]=r);let i=a(r);return Ur(e,i),Wr(i??de,t)}function ti(e){let t=(0,T.c)(4),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n={reportFailure:!1},t[0]=n):n=t[0];let r=at(b.mutateProviderInstance,n),i;return t[1]!==e||t[2]!==r?(i=(t,n)=>r({environmentId:e,input:{patch:n===void 0?{}:n,providerInstanceMutation:t}}),t[1]=e,t[2]=r,t[3]=i):i=t[3],i}function ni(e){let t=or(),n=a(et);return Ur(t?.environmentId??null,t?.serverConfig?.settings??null),Wr(n,e)}var ri=`This setting is saved on a server, and the hosted app is not anchored to one. Change it from the desktop app or from the server's own address.`;function ii(){let e=(0,T.c)(2),t=or(),n;return e[0]===t?n=e[1]:(n=t!==null||!Ye(),e[0]=t,e[1]=n),n}function ai(e){let t=(0,T.c)(3),n=e!==void 0&&e,{environments:r}=nr(),i;return t[0]!==r||t[1]!==n?(i=d(e=>r.filter(er).flatMap(t=>{let r=e(it.sessionStateAtom(t.environmentId));if(n&&r._tag===`Initial`)return[t.environmentId];let i=r._tag===`Failure`?null:_(ee(r));return i!==null&&We(i,`settings:write`)?[t.environmentId]:[]})),t[0]=r,t[1]=n,t[2]=i):i=t[2],a(i)}function oi(e){let t=(0,T.c)(10);tt(e,Me);let n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n={label:`server settings update`,reportFailure:!1},t[0]=n):n=t[0];let r=at(b.updateSettings,n),{environments:i}=nr(),a;t[1]!==i||t[2]!==r?(a=async(e,t)=>{let n=await r(e);if(n._tag===`Failure`&&t?.(),n._tag===`Failure`&&!Je(n)){let t=i.find(t=>t.environmentId===e.environmentId)?.label??e.environmentId,r=Ke(n);y.add({type:`error`,title:`Setting not saved`,description:`Could not save on ${t}: ${r instanceof Error?r.message:`The save failed. Try reconnecting and saving again.`}`})}return n},t[1]=i,t[2]=r,t[3]=a):a=t[3];let o=a,s=ai(!0),l;return t[4]!==e||t[5]!==i||t[6]!==r||t[7]!==o||t[8]!==s?(l=(t,n)=>{let{serverPatch:a,clientPatch:l}=Nr(t),u=e===null||Se(a).every(t=>nt(e,t));if(Object.keys(a).length>0&&!u&&(n?.onFailed?.(),y.add({type:`warning`,title:`Setting not saved`,description:`This connection lacks permission to change settings on ${i.find(t=>t.environmentId===e)?.label??`the selected environment`}.`})),Object.keys(a).length>0&&u){let{sharedPatch:t,localPatch:l}=Qn(a),u=e=>{let t=e===void 0?ri:e;return n?.onFailed?.(),y.add({type:`warning`,title:`Setting not saved`,description:t})};if(Object.keys(l).length>0&&(e?o({environmentId:e,input:{patch:l}},n?.onFailed):u()),Object.keys(t).length>0){let a=i.find(t=>t.environmentId===e)?.serverConfig?.settings,o=new Set(s);e&&o.add(e);let l=[],d=[];for(let n of o){let r=i.find(e=>e.environmentId===n),o=$n(t,r?.serverConfig?.environment.capabilities,r?.serverConfig?.settings,a,n===e);Object.keys(o).length!==0&&(c.get(it.sessionStateAtom(n))._tag!==`Initial`&&!Se(t).every(e=>nt(n,e))?d.push(r?.label??n):l.push({environmentId:n,input:{patch:o}}))}l.length===0?u(d.length>0?`This connection lacks permission to change settings on ${d.join(`, `)}.`:o.size>0?`Update older servers to save this setting.`:void 0):Promise.all(l.map(async e=>({label:i.find(t=>t.environmentId===e.environmentId)?.label??e.environmentId,result:await r(e)}))).then(e=>{(d.length>0||e.some(ui))&&n?.onFailed?.();let t=e.flatMap(li);if(t.length===0)return;let r=e.filter(ci).map(si);y.add({type:`error`,title:r.length>0?`Setting saved on some environments`:`Setting not saved`,description:[...t,...r.length>0?[`Saved on ${r.join(`, `)}.`]:[]].join(`
|
|
2
2
|
`)})})}}Object.keys(l).length>0&&Ar(l)},t[4]=e,t[5]=i,t[6]=r,t[7]=o,t[8]=s,t[9]=l):l=t[9],l}function si(e){let{label:t}=e;return t}function ci(e){let{result:t}=e;return t._tag===`Success`}function li(e){let{label:t,result:n}=e;if(n._tag!==`Failure`||Je(n))return[];let r=Ke(n);return[`Could not save on ${t}: ${r instanceof Error?r.message:`The save failed. Try reconnecting and saving again.`}`]}function ui(e){let{result:t}=e;return t._tag===`Failure`}function di(e){return oi(e)}function fi(){return oi(or()?.environmentId??null)}function pi(){return mi}function mi(e){return Ar(e)}export{jt as $,dr as A,Fn as B,sr as C,nr as D,fr as E,Ln as F,Sn as G,nn as H,q as I,$t as J,jn as K,Bn as L,Kn as M,Jn as N,or as O,qn as P,kt as Q,Hn as R,ar as S,lr as T,rn as U,W as V,_n as W,Ft as X,Ut as Y,Nt as Z,Zr as _,Ar as a,Tt as at,di as b,Ir as c,$r as d,Mt as et,ei as f,ii as g,ni as h,Vr as i,D as it,cr as j,ir as k,Rr as l,ti as m,Fr as n,At as nt,jr as o,Ur as p,en as q,Pr as r,E as rt,Gr as s,ri as t,Pt as tt,qr as u,pi as v,ur as w,fi as x,Xr as y,Vn as z};
|
|
3
|
-
//# sourceMappingURL=useSettings-
|
|
3
|
+
//# sourceMappingURL=useSettings-Dp27sUML.js.map
|
package/dist/client/assets/{vcsRefInvalidation-C5gDWck3.js → vcsRefInvalidation-DU1ipBl9.js}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{n as e}from"./jsx-runtime-DJeoFXNw.js";import{$o as t,Zo as n,es as r,ls as i}from"./utils-BVnIIHXP.js";import{$f as a,$i as o,Eg as s,Hd as c,Jf as l,Ju as u,Lf as d,Md as f,Pf as p,Qu as m,Sd as h,Ym as g,Yu as _,Zd as ee,Zf as v,_g as y,ap as b,cp as te,fd as ne,id as x,lp as S,n as C,op as w,pm as T,qu as E,va as D,yd as O}from"./src-DHn7yNZx.js";import{Ur as k,_r as A,ai as j,pr as M,t as N}from"./runtime-
|
|
2
|
-
//# sourceMappingURL=vcsRefInvalidation-
|
|
1
|
+
import{n as e}from"./jsx-runtime-DJeoFXNw.js";import{$o as t,Zo as n,es as r,ls as i}from"./utils-BVnIIHXP.js";import{$f as a,$i as o,Eg as s,Hd as c,Jf as l,Ju as u,Lf as d,Md as f,Pf as p,Qu as m,Sd as h,Ym as g,Yu as _,Zd as ee,Zf as v,_g as y,ap as b,cp as te,fd as ne,id as x,lp as S,n as C,op as w,pm as T,qu as E,va as D,yd as O}from"./src-DHn7yNZx.js";import{Ur as k,_r as A,ai as j,pr as M,t as N}from"./runtime-vb0YwEUc.js";import{Z as P,at as F,et as I,nt as L,rt as R,tt as z}from"./entities-JWl3bvMT.js";import{at as B}from"./useSettings-Dp27sUML.js";import{t as V}from"./session-YEQs2e4k.js";import{n as re}from"./query-DFSffMGJ.js";var H=e(),U=`~effect/PartitionedSemaphore`,W=e=>{let t=Math.max(0,e.permits);if(!Number.isFinite(t))return{[U]:U,capacity:t,available:p(t),take:()=>v,release:()=>p(t),withPermits:()=>e=>e,withPermit:()=>e=>e,withPermitsIfAvailable:()=>e=>_(e)};let n=t,r=0,i=b(),o=i[Symbol.iterator](),c=!1,u=0,f,h=e=>{if(e>0&&(u+=e),!c){c=!0;try{for(;u>0&&r>0;){let e=f;if(e===void 0){let t=o.next();if(t.done&&(o=i[Symbol.iterator](),t=o.next(),t.done))break;if(e=t.value[1].values().next().value,e===void 0)continue}let t=Math.min(e.permits,u);e.permits-=t,r-=t,u-=t,e.permits===0?e.resume():f=e}}finally{c=!1}}return r===0&&(n=Math.min(t,n+u),u=0),n},x=(e,o)=>o<=0?v:t<o?ee:a(t=>n>=o?(n-=o,g(t,e=>{T(e)&&h(o)}),v):m(t=>{if(n>=o){t(x(e,o));return}let a=o-n;n>0&&(n=0),r+=a;let s=y(w(i,e),()=>{let t=new Set;return S(i,e,t),t}),c={permits:a,resume:()=>{l(),t(v)}},l=()=>{f===c&&(f=void 0),s.delete(c)&&s.size===0&&te(i,e)};return s.add(c),d(()=>{l(),r-=c.permits,h(o-c.permits)})})),C=(e,t)=>n=>{if(t<=0)return n;let r=x(e,t);return l(e=>O(e(r),()=>ne(e(n),d(()=>{h(t)}))))},E=e=>e<=0?!0:t<e||n<e?!1:(n-=e,!0);return{[U]:U,capacity:t,available:d(()=>n),take:x,release:e=>d(()=>h(e)),withPermits:C,withPermit:e=>C(e,1),withPermitsIfAvailable:e=>t=>e<=0?_(t):a(n=>E(e)?(g(n,()=>{h(e)}),_(t)):p(s()))}},G=5e3;function K(e){if(e.sessionError!==null)return{canReadFiles:!1,isPending:!1,error:e.sessionError};if(e.session===null){let t=!e.isCatalogReady||e.connection?.phase===`connected`||e.connection?.phase===`connecting`||e.connection?.phase===`reconnecting`;return{canReadFiles:!1,isPending:t,error:t?null:e.connection?.error??`This environment is not connected.`}}return{canReadFiles:D(e.session,o),isPending:!1,error:null}}function q(e,t=``,n=!0){let r=n&&F(e,t),i=r?I(e):``;return{isBrowsing:r,directoryPath:i,filterQuery:r&&!R(e)?z(e):``,parentPath:r?L(i):null,canBrowseUp:r&&P(i)}}function J(e,t){let n=t.toLowerCase(),r=t.startsWith(`.`),i=e.filter(e=>e.name.toLowerCase().startsWith(n)&&(r||!e.name.startsWith(`.`)));return{visibleEntries:i,exactEntry:t.length>0?i.find(e=>e.name===t)??null:null}}function Y(e,t){let[n,...r]=e;if(n===void 0)return null;if(r.length===0)return{name:n.name,isComplete:!0};let i=Array.from(n.name);for(let e of r){let t=Array.from(e.name),n=0;for(;n<i.length&&i[n]?.toLowerCase()===t[n]?.toLowerCase();)n+=1;i=i.slice(0,n)}let a=i.join(``),o=a.toLowerCase();return o.length>t.toLowerCase().length&&e.every(e=>e.name.toLowerCase().startsWith(o))?{name:a,isComplete:!1}:null}function X(){let e=0;return{invalidate:()=>{e+=1},run:async(t,n)=>{let r=++e;return await t(),r===e&&(n(),!0)}}}function ie(e){return e===`connected`}function ae(e){return{browse:A(e,{label:`environment-data:filesystem:browse`,tag:C.filesystemBrowse,idleTtlMs:G})}}var oe=ae(N);function se(e){let t=(0,H.c)(7),n;t[0]===e?n=t[1]:(n=e===null?null:V.sessionStateAtom(e),t[0]=e,t[1]=n);let r=re(n),i=B(e),a=i.presentation?.connection??null,o;return t[2]!==i.isReady||t[3]!==r.data||t[4]!==r.error||t[5]!==a?(o=K({isCatalogReady:i.isReady,connection:a,session:r.data,sessionError:r.error}),t[2]=i.isReady,t[3]=r.data,t[4]=r.error,t[5]=a,t[6]=o):o=t[6],o}var ce=M(),Z={mode:`serial`,key:({environmentId:e,input:t})=>JSON.stringify([e,t.cwd])},le=n(e=>r({revision:0,persistedCacheReadable:!0}).pipe(t,i(`environment-data:vcs:list-refs-state:${e}`))),ue=W({permits:1});function Q(e){return le(e.environmentId)}function de(e,t,n){e.update(Q(t),e=>({revision:e.revision+1,persistedCacheReadable:n??e.persistedCacheReadable}))}function $(e,t){return ue.withPermit(e)(t)}var fe=h(`VcsRefsState.invalidateCached`)(function*(e,t){let n=yield*j;yield*$(t.environmentId,f(function*(){de(e,t,yield*n.clearVcsRefs(t.environmentId).pipe(u(!0),x(e=>c(`Could not remove invalidated cached Git refs.`).pipe(E({environmentId:t.environmentId,cwd:t.cwd,...k(e)}),u(!1)))))}))});export{ce as a,ie as c,q as d,Y as f,Z as i,X as l,Q as n,oe as o,$ as r,se as s,fe as t,J as u};
|
|
2
|
+
//# sourceMappingURL=vcsRefInvalidation-DU1ipBl9.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e,t}from"./react-BUfh6y28.js";import{n,t as r}from"./jsx-runtime-DJeoFXNw.js";import{Jl as i,Jo as a,Js as o,Nf as s,Ol as c,Os as l,Td as u,Yo as d,Ys as f,es as p,jl as m,l as h,mr as g,o as _,sl as v,t as y,td as b,ws as x}from"./utils-BVnIIHXP.js";import{Ec as S,Hi as C,Sc as w,Wi as T,fa as E,hc as D,mc as O,n as k,ra as A,ul as j,vg as M,xg as N}from"./src-DHn7yNZx.js";import{Dr as P,Jr as F,Sr as I,W as L,_r as R,gr as z,t as B}from"./runtime-CbYvES7U.js";import{$ as V,G as H,N as U,u as W}from"./entities-CjoTQlW3.js";import{t as G}from"./spinner-m1uNq_wW.js";import{t as K}from"./useNavigate-P1p3Es15.js";import{t as q}from"./useLocation-BXwb7I1F.js";import{a as J}from"./relay-BLgoNhyd.js";import{D as ee,O as te}from"./useSettings-hYzrsDTp.js";import{f as Y}from"./server-CEMcTnD1.js";import{i as ne,n as X,o as re}from"./session-Ces3Ebxl.js";import{t as ie}from"./query-DFSffMGJ.js";import{t as ae}from"./use-atom-command-DWabKYXN.js";import{a as oe}from"./timestampFormat-Dq7sHZpd.js";import{a as se,n as ce,t as le}from"./tooltip-BhCWnsdW.js";import{t as ue}from"./input-yaZxaTds.js";import{t as de}from"./scroll-area-DhDCLqyU.js";import{r as fe}from"./dist-D1XCsn7e.js";import{t as pe}from"./dialog-DFlZvvht.js";import{t as me}from"./useP4ConnectAuthPrompt-DKYJHISj.js";import{t as he}from"./CommandBlock-DUs3JB3r.js";import{t as ge}from"./checkbox-iFzfBLKr.js";import{t as _e}from"./ThreadTerminalDrawer-BmwBVDGv.js";import{i as ve}from"./terminalSessions-DBYKcIE6.js";import{n as ye}from"./useHandleNewThread-DTgcUVdd.js";import{r as be,t as xe}from"./alert-CfhQnxcL.js";import{i as Se,n as Ce}from"./ChatGptUsageButton-BElkMe1K.js";import{t as we}from"./onboarding-CxDppAGc.js";import{Ao as Te,Do as Ee,Eo as De,Mo as Oe,Oo as ke,_ as Ae,_o as je,f as Me,jo as Ne,ko as Pe,ln as Fe,mn as Ie,pi as Le,un as Re}from"./main-xhw8F2iL.js";import{t as ze}from"./NoProjectsHero-Dk-rv5RI.js";import{t as Be}from"./legalLinks-C4VP5hPh.js";import{r as Ve}from"./SettingsPanels.logic-5bLleFhd.js";import{d as He,f as Ue,i as We,l as Ge,n as Ke,o as qe,t as Je,u as Ye}from"./CodexSetupSection.logic-3MrEmFzD.js";var Z=e(t(),1),Q=n(),Xe=2592e6,Ze=3;function Qe(e,t=Date.now()){let n=t-Xe;return{available:e,recent:e.filter(e=>{if(e.git===null||e.threadCount<Ze||e.lastActiveAt===null)return!1;let r=Date.parse(e.lastActiveAt);return r>=n&&r<=t})}}function $e(e,t){return e===null?t:t===null||e>t?e:t}function et(e){let t=new Map,n=[];for(let r of e){if(r.git===null){n.push(r);continue}let e=r.git??{remoteKey:null,repository:null},i=e.remoteKey===null?`path:${r.path}`:`remote:${e.remoteKey}`,a=t.get(i);a===void 0?t.set(i,{key:i,label:e.repository??r.title,repository:e.repository,candidates:[r],threadCount:r.threadCount,lastActiveAt:r.lastActiveAt}):(a.candidates.push(r),t.set(i,{...a,threadCount:a.threadCount+r.threadCount,lastActiveAt:$e(a.lastActiveAt,r.lastActiveAt)}))}return{repositories:[...t.values()].sort((e,t)=>e.lastActiveAt===t.lastActiveAt?e.label.localeCompare(t.label):e.lastActiveAt===null?1:t.lastActiveAt===null?-1:t.lastActiveAt.localeCompare(e.lastActiveAt)),other:n}}function tt(e,t,n){if(n.projectId!==void 0)return n.projectId;let r=e.filter(e=>e.environmentId===t),i=V(r,n.path);return i===void 0?null:i.id}function nt(e,t,n){for(let n of e){let e=t.get(n);if(e!==void 0)return e}for(let t of e){let e=n.get(t);if(e!==void 0)return e}}function rt(e){if(/^[A-Za-z]:[\\/]+$/.test(e)||/^[\\/]{2}[^\\/]+[\\/][^\\/]+[\\/]*$/.test(e))return{name:e,parent:``};let t=e.replace(/[\\/]+$/,``),n=Math.max(t.lastIndexOf(`/`),t.lastIndexOf(`\\`));return t.length===0?{name:e,parent:``}:n<0?{name:t,parent:``}:{name:t.slice(n+1),parent:t.slice(0,n+1)}}function it(e,t){return JSON.stringify([e,t])}var at=R(B,{label:`environment-data:agent-sessions:scan`,tag:k.agentSessionsScan,staleTimeMs:3e4,idleTtlMs:3e5}),ot=z(B,{label:`environment-data:agent-sessions:import`,tag:k.agentSessionsImport});function st(e){return F(e.entry)}function ct(e,t){let n=e.filter(e=>t.has(e.environmentId)),r=e=>n.filter(t=>e(t.connection.phase)).map(e=>e.environmentId),i=r(e=>e===`connected`),a=n.some(e=>e.connection.phase===`connecting`);return{ready:i.length>0&&!a,environmentIds:i,skippedIds:r(e=>e!==`connected`&&e!==`connecting`)}}function lt(e){let t=(0,Q.c)(3),n=(0,Z.useContext)(d),r;return t[0]!==e||t[1]!==n?(r=p(t=>e.map(e=>{let r=at({environmentId:e,input:{}}),i=t(r);return{environmentId:e,data:M(x(i)),error:i._tag===`Failure`?ie(i.cause):null,isPending:i.waiting||i._tag===`Initial`,refresh:()=>n.refresh(r)}})),t[0]=e,t[1]=n,t[2]=r):r=t[2],a(r)}var $=e(r(),1),ut=[],dt=w.make(`onboarding-agent-setup`),ft=[`Connect`,`Agents`,`Projects`],pt=`Scan limit reached. Some projects or conversations may be missing.`;function mt({localAvailable:e,onDone:t,resumeEnvironmentId:n}){let r=Ie(),[i,a]=(0,Z.useState)(n?`agents`:`connection`),{environments:o}=ee(),[s,c]=(0,Z.useState)(null),l=(0,Z.useRef)(new Set),[u,d]=(0,Z.useState)(n?[n]:[]),[f,p]=(0,Z.useState)(null),[m,h]=(0,Z.useState)(!1),g=(0,Z.useRef)(null),_=(0,Z.useRef)(null),v=te();(0,Z.useEffect)(()=>{let e=o.filter(e=>!l.current.has(e.environmentId));if(e.length===0)return;for(let t of e)l.current.add(t.environmentId);let t=e.filter(e=>e.entry.enabled);t.length!==0&&c(e=>new Set([...e??[],...t.map(e=>e.environmentId)]))},[o]);let y=s??new Set(v?[v.environmentId]:[]),b=lt(i===`import`?u:ut),x=i===`import`&&b.every(e=>e.data===null)&&b.some(e=>e.isPending),S=e=>{e.length!==0&&(d(e),a(`agents`))},C=i===`agents`?1:i===`import`?2:0,w=(0,Z.useCallback)((e,n,i=0)=>{if(g.current!==null)return g.current;_.current!==null&&(J.close(_.current),_.current=null);let a=r().then(async()=>(_.current!==null&&(J.close(_.current),_.current=null),await t(e),n?J.add({type:`warning`,title:`Some history was not imported`,description:n,timeout:0}):i>0&&J.add({type:`success`,title:`Imported ${i} ${i===1?`thread`:`threads`}`}),!0)).catch(()=>{let e={type:`error`,title:`Could not finish setup`,description:`Your settings could not be saved. Try again.`};return _.current===null?_.current=J.add(e):J.update(_.current,e),!1}).finally(()=>{g.current===a&&(g.current=null)});return g.current=a,a},[r,t]);return(0,$.jsxs)(pe,{open:!0,disablePointerDismissal:!0,onOpenChange:(e,t)=>t.cancel(),children:[(0,$.jsxs)(ke,{size:`wide`,bottomStickOnMobile:!1,showCloseButton:!1,initialFocus:()=>document.getElementById(`onboarding-pairing-url`)??!0,children:[(0,$.jsx)(De,{title:`Set up P4 Code`,identity:(0,$.jsxs)(`div`,{className:`flex items-baseline gap-1.5`,role:`img`,"aria-label":`P4 Code`,children:[(0,$.jsx)(Le,{className:`h-4 w-auto shrink-0`,"aria-hidden":!0}),(0,$.jsx)(`span`,{className:`text-2xl font-medium tracking-tight text-muted-foreground`,children:`Code`})]}),children:(0,$.jsx)(Pe,{steps:ft,currentStep:C,isStepDisabled:e=>m||e>=C,onStepChange:e=>{m||e>C||a(e===0?`connection`:`agents`)}})}),(0,$.jsx)(Ee,{holdHeight:x,children:i===`connection`?(0,$.jsx)(ht,{expandPairingInitially:!e&&!L(),selectedIds:y,autoSelectedComputers:l.current,onSelectionChange:c,onToggleEnvironment:(e,t)=>c(n=>{let r=new Set(n??y);return t?r.add(e):r.delete(e),r}),onContinue:()=>S(ct(o,y).environmentIds),onPaired:e=>{c(new Set([...y,e]))}}):i===`agents`?(0,$.jsx)(xt,{environmentIds:u,onContinue:()=>a(`import`)}):(0,$.jsx)(At,{scans:b,importSelection:f,onImportSelectionChange:p,isImporting:m,setIsImporting:h,onDone:w})})]}),(0,$.jsx)(Ae,{})]})}function ht(e){let t=(0,Q.c)(44),{autoSelectedComputers:n,expandPairingInitially:r,selectedIds:i,onSelectionChange:a,onToggleEnvironment:o,onContinue:s,onPaired:c}=e,{environments:l}=ee(),d;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(d=L(),t[0]=d):d=t[0];let f=d,p;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(p=e=>!f||!st(e),t[1]=p):p=t[1];let h=l.filter(p),[_,x]=(0,Z.useState)(r),[S,C]=(0,Z.useState)(!1),{ready:w,skippedIds:T}=ct(l,i),E=l.filter(e=>T.includes(e.environmentId)).map(gt),D=(0,Z.useRef)(null);(0,Z.useEffect)(()=>{w&&(document.activeElement===document.body||document.activeElement?.getAttribute(`role`)===`dialog`)&&D.current?.focus()},[w]);let O,k;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(O=(0,$.jsx)(`h1`,{className:`text-2xl font-semibold tracking-tight text-foreground`,children:`Connect your computers`}),k=(0,$.jsx)(`p`,{className:`mt-2.5 text-sm leading-relaxed text-muted-foreground`,children:`Choose one or more computers. We’ll set up agents and projects on each.`}),t[2]=O,t[3]=k):(O=t[2],k=t[3]);let A=h.length>0?(0,$.jsxs)(`fieldset`,{className:`mt-5 space-y-2`,children:[(0,$.jsx)(`legend`,{className:`sr-only`,children:`Computers to set up`}),h.map(e=>(0,$.jsxs)(`label`,{className:`flex cursor-pointer items-center gap-3 rounded-lg border border-border bg-background px-3 py-3`,children:[(0,$.jsx)(ge,{checked:i.has(e.environmentId),onCheckedChange:t=>{let n=new Set(i);t?n.add(e.environmentId):n.delete(e.environmentId),a(n)}}),(0,$.jsx)(u,{className:`size-4 shrink-0 text-muted-foreground`}),(0,$.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,$.jsxs)(`span`,{className:`flex items-baseline justify-between gap-3`,children:[(0,$.jsx)(`span`,{className:`min-w-0 text-sm font-medium break-words`,children:e.label}),(0,$.jsx)(`span`,{className:`shrink-0 text-xs text-muted-foreground`,children:!e.entry.enabled&&e.connection.phase!==`unsupported`?`Off`:Re(e.connection).buttonLabel})]}),e.displayUrl?(0,$.jsx)(`span`,{className:`mt-0.5 block text-xs break-all text-muted-foreground`,children:e.displayUrl}):null]})]},e.environmentId))]}):null,j;t[4]!==n||t[5]!==S||t[6]!==o||t[7]!==i?(j=f?(0,$.jsx)(_t,{autoSelectedComputers:n,disabled:S,selectedIds:i,onToggleEnvironment:o}):null,t[4]=n,t[5]=S,t[6]=o,t[7]=i,t[8]=j):j=t[8];let M,N,P;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(M=(0,$.jsx)(g,{variant:`ghost`,size:`sm-multiline`,className:`min-h-14 w-full justify-start`}),N=(0,$.jsx)(b,{className:`size-4 text-muted-foreground`}),P=(0,$.jsx)(`span`,{className:`flex-1 text-left`,children:`Add a computer`}),t[9]=M,t[10]=N,t[11]=P):(M=t[9],N=t[10],P=t[11]);let F=_&&`rotate-90`,I;t[12]===F?I=t[13]:(I=y(`size-4 text-muted-foreground`,F),t[12]=F,t[13]=I);let R;t[14]===I?R=t[15]:(R=(0,$.jsx)(m,{className:I}),t[14]=I,t[15]=R);let z;t[16]!==S||t[17]!==R?(z=(0,$.jsxs)(Oe,{disabled:S,render:M,children:[N,P,R]}),t[16]=S,t[17]=R,t[18]=z):z=t[18];let B;t[19]===c?B=t[20]:(B=e=>{x(!1),c(e),requestAnimationFrame(()=>D.current?.focus())},t[19]=c,t[20]=B);let V;t[21]!==S||t[22]!==B?(V=(0,$.jsx)(Ne,{children:(0,$.jsx)(`div`,{className:`px-3 pb-3`,children:(0,$.jsx)(vt,{isPairing:S,setIsPairing:C,onPaired:B})})}),t[21]=S,t[22]=B,t[23]=V):V=t[23];let H;t[24]!==_||t[25]!==z||t[26]!==V?(H=(0,$.jsx)(`div`,{className:`rounded-lg border border-border bg-background`,children:(0,$.jsxs)(Te,{open:_,onOpenChange:x,children:[z,V]})}),t[24]=_,t[25]=z,t[26]=V,t[27]=H):H=t[27];let U;t[28]!==H||t[29]!==j?(U=(0,$.jsxs)(`div`,{className:`mt-4 space-y-2`,children:[j,H]}),t[28]=H,t[29]=j,t[30]=U):U=t[30];let W=E.length>0?(0,$.jsxs)(`p`,{className:`mt-4 text-xs text-muted-foreground`,children:[`Not connected, so setup skips `,E.join(`, `),`. You can set`,` `,E.length===1?`it`:`them`,` up later from Settings.`]}):null,G;t[31]===Symbol.for(`react.memo_cache_sentinel`)?(G=(0,$.jsxs)(`p`,{className:`min-w-0 text-xs leading-relaxed text-muted-foreground`,children:[`P4 Code collects anonymous usage data to help us improve it. To read more about how your data is used and how to opt out, see our`,` `,(0,$.jsx)(`a`,{className:`underline underline-offset-2 hover:text-foreground`,href:Be,target:`_blank`,rel:`noreferrer noopener`,children:`privacy policy`}),`.`]}),t[31]=G):G=t[31];let K=!r,q=!w||S,J;t[32]===Symbol.for(`react.memo_cache_sentinel`)?(J=(0,$.jsx)(v,{className:`size-3.5`}),t[32]=J):J=t[32];let te;t[33]!==s||t[34]!==K||t[35]!==q?(te=(0,$.jsxs)(`div`,{className:`mt-6 flex flex-col-reverse gap-4 sm:flex-row sm:items-center sm:justify-between sm:gap-6`,children:[G,(0,$.jsxs)(g,{className:`shrink-0 self-end`,ref:D,autoFocus:K,disabled:q,onClick:s,children:[`Continue`,J]})]}),t[33]=s,t[34]=K,t[35]=q,t[36]=te):te=t[36];let Y;return t[37]!==U||t[38]!==W||t[39]!==te||t[40]!==O||t[41]!==k||t[42]!==A?(Y=(0,$.jsxs)($.Fragment,{children:[O,k,A,U,W,te]}),t[37]=U,t[38]=W,t[39]=te,t[40]=O,t[41]=k,t[42]=A,t[43]=Y):Y=t[43],Y}function gt(e){return e.label}function _t(e){let t=(0,Q.c)(36),{autoSelectedComputers:n,disabled:r,selectedIds:a,onToggleEnvironment:o}=e,{environments:s}=ee(),c;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(c={treatPendingAsSignedOut:!1},t[0]=c):c=t[0];let{isLoaded:l,isSignedIn:u}=fe(c),{openAuthPrompt:d}=me(),[f,p]=(0,Z.useState)(!0),[h,_]=(0,Z.useState)(!1),v;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(v=()=>_(!0),t[1]=v):v=t[1];let b=v,x=f&&!!u&&h,S=r||!l,C;t[2]!==u||t[3]!==d?(C=e=>{u||(e.preventDefault(),p(!0),d())},t[2]=u,t[3]=d,t[4]=C):C=t[4];let w,T,E;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(w=(0,$.jsx)(g,{variant:`ghost`,size:`sm-multiline`,className:`min-h-14 w-full justify-start`}),T=(0,$.jsx)(i,{className:`size-4 text-muted-foreground`}),E=(0,$.jsx)(`span`,{className:`flex-1 text-left`,children:`P4 Connect`}),t[5]=w,t[6]=T,t[7]=E):(w=t[5],T=t[6],E=t[7]);let D=l?u?h?null:`Loading computers…`:`Sign in`:`Loading sign-in…`,O;t[8]===D?O=t[9]:(O=(0,$.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:D}),t[8]=D,t[9]=O);let k=f&&u&&`rotate-90`,A;t[10]===k?A=t[11]:(A=y(`size-4 text-muted-foreground`,k),t[10]=k,t[11]=A);let j;t[12]===A?j=t[13]:(j=(0,$.jsx)(m,{className:A}),t[12]=A,t[13]=j);let M;t[14]!==O||t[15]!==j||t[16]!==S||t[17]!==C?(M=(0,$.jsxs)(Oe,{disabled:S,onClick:C,render:w,children:[T,E,O,j]}),t[14]=O,t[15]=j,t[16]=S,t[17]=C,t[18]=M):M=t[18];let N;t[19]!==n||t[20]!==s||t[21]!==u||t[22]!==o||t[23]!==a?(N=u?(0,$.jsx)(Fe,{primaryEnvironmentId:null,savedEnvironments:s,showSavedEnvironments:!0,onDiscoveryReady:b,selection:{selectedIds:a,onChange:o,autoSelectedComputers:n},refreshWhileEmpty:!0,empty:(0,$.jsx)(`p`,{className:`py-3 text-sm text-muted-foreground`,children:`No computers linked yet.`})}):null,t[19]=n,t[20]=s,t[21]=u,t[22]=o,t[23]=a,t[24]=N):N=t[24];let P;t[25]===N?P=t[26]:(P=(0,$.jsx)(`div`,{className:`mb-3 space-y-1.5`,children:N}),t[25]=N,t[26]=P);let F,I,L;t[27]===Symbol.for(`react.memo_cache_sentinel`)?(F=(0,$.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Run this on each computer you want to connect.`}),I=(0,$.jsx)(he,{command:`npx @p4code/cli connect`,className:`mt-3`}),L=(0,$.jsx)(`p`,{className:`mt-3 text-xs text-muted-foreground`,children:`Keep P4 Code running. Select the computers you want to set up above.`}),t[27]=F,t[28]=I,t[29]=L):(F=t[27],I=t[28],L=t[29]);let R;t[30]===P?R=t[31]:(R=(0,$.jsx)(Ne,{keepMounted:!0,children:(0,$.jsxs)(`div`,{className:`px-3 pb-3`,children:[P,F,I,L]})}),t[30]=P,t[31]=R);let z;return t[32]!==M||t[33]!==R||t[34]!==x?(z=(0,$.jsx)(`div`,{className:`rounded-lg border border-border bg-background`,children:(0,$.jsxs)(Te,{open:x,onOpenChange:p,children:[M,R]})}),t[32]=M,t[33]=R,t[34]=x,t[35]=z):z=t[35],z}function vt(e){let t=(0,Q.c)(37),{isPairing:n,setIsPairing:r,onPaired:i}=e,a;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(a={reportFailure:!1},t[0]=a):a=t[0];let o=ae(we,a),[s,c]=(0,Z.useState)(``),[l,u]=(0,Z.useState)(``),d=(0,Z.useRef)(!0),f,p;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(f=()=>(d.current=!0,()=>{d.current=!1}),p=[],t[1]=f,t[2]=p):(f=t[1],p=t[2]),(0,Z.useEffect)(f,p);let h;t[3]!==o||t[4]!==n||t[5]!==i||t[6]!==s||t[7]!==r?(h=async()=>{if(n||s.trim().length===0)return;r(!0),u(``);let e=await o({pairingUrl:s.trim()});if(!d.current)return;if(r(!1),e._tag===`Success`){i(e.value);return}if(I(e))return;let t=P(e);u(t instanceof Error?t.message:`Pairing failed.`)},t[3]=o,t[4]=n,t[5]=i,t[6]=s,t[7]=r,t[8]=h):h=t[8];let _=h,v;t[9]===_?v=t[10]:(v=e=>{e.preventDefault(),_()},t[9]=_,t[10]=v);let y;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,$.jsx)(`label`,{className:`block text-sm text-muted-foreground`,htmlFor:`onboarding-pairing-url`,children:`Pairing link`}),t[11]=y):y=t[11];let b=l.length>0,x=l?`onboarding-pairing-error`:void 0,S;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(S=e=>c(e.currentTarget.value),t[12]=S):S=t[12];let C;t[13]!==n||t[14]!==s||t[15]!==b||t[16]!==x?(C=(0,$.jsxs)(`div`,{children:[y,(0,$.jsx)(ue,{id:`onboarding-pairing-url`,autoFocus:!0,"aria-invalid":b,"aria-describedby":x,className:`mt-2`,size:`lg`,autoCapitalize:`none`,autoComplete:`off`,autoCorrect:`off`,spellCheck:!1,nativeInput:!0,readOnly:n,placeholder:`https://your-server:5230/pair#token=…`,value:s,onChange:S,onKeyDown:yt})]}),t[13]=n,t[14]=s,t[15]=b,t[16]=x,t[17]=C):C=t[17];let w;t[18]===l?w=t[19]:(w=l?(0,$.jsx)(xe,{id:`onboarding-pairing-error`,variant:`error`,children:(0,$.jsx)(be,{children:l})}):null,t[18]=l,t[19]=w);let T;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(T=(0,$.jsxs)(Oe,{type:`button`,className:`group flex items-center gap-1 text-sm text-muted-foreground hover:text-foreground`,children:[(0,$.jsx)(m,{className:`size-3.5 group-data-panel-open:rotate-90`}),`Need a pairing link?`]}),t[20]=T):T=t[20];let E;t[21]!==n||t[22]!==s?(E=n||s.trim().length===0,t[21]=n,t[22]=s,t[23]=E):E=t[23];let D=n?`Pairing...`:`Pair`,O;t[24]!==E||t[25]!==D?(O=(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[T,(0,$.jsx)(g,{type:`submit`,disabled:E,children:D})]}),t[24]=E,t[25]=D,t[26]=O):O=t[26];let k,A;t[27]===Symbol.for(`react.memo_cache_sentinel`)?(k=(0,$.jsxs)(`p`,{className:`pt-3 text-sm text-muted-foreground`,children:[`On the computer with your code, start P4 Code or run`,` `,(0,$.jsx)(`code`,{className:`font-mono`,children:`npx @p4code/cli serve`}),`, then run:`]}),A=(0,$.jsx)(he,{command:`npx @p4code/cli pair`,className:`mt-2`}),t[27]=k,t[28]=A):(k=t[27],A=t[28]);let j;t[29]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,$.jsxs)(Ne,{children:[k,A,(0,$.jsxs)(`p`,{className:`mt-2 text-xs leading-relaxed text-muted-foreground`,children:[`On a tailnet, run `,(0,$.jsx)(`code`,{className:`font-mono`,children:`npx @p4code/cli pair --tailscale`}),` `,`instead.`]})]}),t[29]=j):j=t[29];let M;t[30]===O?M=t[31]:(M=(0,$.jsxs)(Te,{children:[O,j]}),t[30]=O,t[31]=M);let N;return t[32]!==C||t[33]!==w||t[34]!==M||t[35]!==v?(N=(0,$.jsx)($.Fragment,{children:(0,$.jsxs)(`form`,{className:`space-y-3`,onSubmit:v,children:[C,w,M]})}),t[32]=C,t[33]=w,t[34]=M,t[35]=v,t[36]=N):N=t[36],N}function yt(e){e.key===`Enter`&&(e.nativeEvent.isComposing||e.keyCode===229)&&e.preventDefault()}var bt=[`codex`,`claudeAgent`];function xt(e){let t=(0,Q.c)(13),{environmentIds:n,onContinue:r}=e,{environments:i}=ee(),a;if(t[0]!==n||t[1]!==i){let e;t[3]===i?e=t[4]:(e=e=>(0,$.jsx)(St,{environmentId:e,machineLabel:i.find(t=>t.environmentId===e)?.label??`Computer`},e),t[3]=i,t[4]=e),a=n.map(e),t[0]=n,t[1]=i,t[2]=a}else a=t[2];let o;t[5]===a?o=t[6]:(o=(0,$.jsx)(de,{scrollFade:!0,className:`mt-5 h-auto max-h-[min(32rem,55dvh)]`,children:(0,$.jsx)(`div`,{className:`space-y-5 pr-3`,children:a})}),t[5]=a,t[6]=o);let s;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,$.jsx)(v,{className:`size-3.5`}),t[7]=s):s=t[7];let c;t[8]===r?c=t[9]:(c=(0,$.jsx)(`div`,{className:`mt-6 flex justify-end`,children:(0,$.jsxs)(g,{autoFocus:!0,onClick:r,children:[`Continue`,s]})}),t[8]=r,t[9]=c);let l;return t[10]!==o||t[11]!==c?(l=(0,$.jsxs)(Yt,{title:`Connect your agents`,description:`Choose an agent to start coding. You can add more later.`,children:[o,c]}),t[10]=o,t[11]=c,t[12]=l):l=t[12],l}function St(e){let t=(0,Q.c)(57),{environmentId:n,machineLabel:r}=e,i;t[0]===n?i=t[1]:(i=Y.providersValueAtom(n),t[0]=n,t[1]=i);let o=a(i),s;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(s={reportFailure:!1},t[2]=s):s=t[2];let c=ae(Y.refreshProviders,s),l;t[3]===n?l=t[4]:(l=Y.configValueAtom(n),t[3]=n,t[4]=l);let u=a(l),[d,f]=(0,Z.useState)(null),[p,m]=(0,Z.useState)(!1),[h,_]=(0,Z.useState)(null),v=ne(n,E),y,b;t[5]!==n||t[6]!==c?(y=()=>{c({environmentId:n,input:{}})},b=[n,c],t[5]=n,t[6]=c,t[7]=y,t[8]=b):(y=t[7],b=t[8]),(0,Z.useEffect)(y,b);let x;t[9]===o?x=t[10]:(x=Ue(o),t[9]=o,t[10]=x);let S=x,C,w,T,D;if(t[11]!==S||t[12]!==v||t[13]!==h||t[14]!==n||t[15]!==r||t[16]!==o||t[17]!==u||t[18]!==d?.driver){let e;t[23]!==S||t[24]!==o?(e=e=>{let t=e===`codex`?o?.filter(t=>t.driver===e):void 0;return t?.length?t.map(t=>({driver:e,provider:t,instanceId:t.instanceId})):[{driver:e,provider:S.get(e),instanceId:S.get(e)?.instanceId}]},t[23]=S,t[24]=o,t[25]=e):e=t[25];let i=bt.flatMap(e);if(h){let e;t[26]===h?e=t[27]:(e=e=>e.instanceId===h.instanceId,t[26]=h,t[27]=e);let n=i.findIndex(e),[r]=n>=0?i.splice(n,1):[];i.unshift(r??{driver:`codex`,provider:void 0,instanceId:h.instanceId})}t[28]===r?D=t[29]:(D=(0,$.jsx)(`h2`,{className:`mb-2 text-sm font-medium`,children:r}),t[28]=r,t[29]=D),t[30]===v?C=t[31]:(C=v?null:(0,$.jsx)(`p`,{className:`mb-2 text-sm text-muted-foreground`,children:`This connection cannot control terminals.`}),t[30]=v,t[31]=C),w=`space-y-1.5`;let a;t[32]!==v||t[33]!==h||t[34]!==n||t[35]!==u||t[36]!==d?.driver?(a=e=>{let{driver:t,provider:r,instanceId:i}=e;return t===`codex`&&u!==null?(0,$.jsx)(Tt,{environmentId:n,provider:r,serverConfig:u,createdAccount:i===h?.instanceId?h:null,onAutoStartConsumed:()=>_(wt),terminalOpen:d?.driver===t,onOpenTerminal:()=>{r!==void 0&&X(n,`terminal:operate`)&&f({environmentId:n,driver:t,providerInstanceId:r.instanceId,cwd:u.cwd,command:r.installed?He(r,u.settings,u.environment.platform.os):Ye(t,u.environment.platform.os),keybindings:u.keybindings})}},i??t):(0,$.jsx)(Et,{driver:t,provider:r,terminalOpen:d?.driver===t,terminalAvailable:u!==null&&v,onOpenTerminal:()=>{r!==void 0&&u!==null&&X(n,`terminal:operate`)&&f({environmentId:n,driver:t,providerInstanceId:r.instanceId,cwd:u.cwd,command:r.installed?He(r,u.settings,u.environment.platform.os):Ye(t,u.environment.platform.os),keybindings:u.keybindings})}},t)},t[32]=v,t[33]=h,t[34]=n,t[35]=u,t[36]=d?.driver,t[37]=a):a=t[37],T=i.map(a),t[11]=S,t[12]=v,t[13]=h,t[14]=n,t[15]=r,t[16]=o,t[17]=u,t[18]=d?.driver,t[19]=C,t[20]=w,t[21]=T,t[22]=D}else C=t[19],w=t[20],T=t[21],D=t[22];let O;t[38]!==w||t[39]!==T?(O=(0,$.jsx)(`div`,{className:w,children:T}),t[38]=w,t[39]=T,t[40]=O):O=t[40];let k;t[41]===o?k=t[42]:(k=o?.some(Ct)?(0,$.jsx)(`div`,{className:`mt-3`,children:(0,$.jsx)(g,{size:`xs`,variant:`ghost-muted`,onClick:()=>m(!0),children:`Connect another ChatGPT account`})}):null,t[41]=o,t[42]=k);let A;t[43]!==p||t[44]!==n?(A=p?(0,$.jsx)(Ke,{environmentId:n,onClose:()=>m(!1),onAccountCreated:(e,t)=>_({instanceId:e,displayName:t,autoStart:!0})}):null,t[43]=p,t[44]=n,t[45]=A):A=t[45];let j;t[46]!==n||t[47]!==c||t[48]!==d?(j=d===null?null:(0,$.jsx)(Dt,{session:d,onClose:()=>{f(null),c({environmentId:n,input:{}})}},`${d.environmentId}:${d.providerInstanceId}:${d.driver}`),t[46]=n,t[47]=c,t[48]=d,t[49]=j):j=t[49];let M;return t[50]!==C||t[51]!==O||t[52]!==k||t[53]!==A||t[54]!==j||t[55]!==D?(M=(0,$.jsxs)(`section`,{children:[D,C,O,k,A,j]}),t[50]=C,t[51]=O,t[52]=k,t[53]=A,t[54]=j,t[55]=D,t[56]=M):M=t[56],M}function Ct(e){return e.driver===`codex`&&Ge(e)===`ready`}function wt(e){return e?{...e,autoStart:!1}:null}function Tt(e){let t=(0,Q.c)(28),{createdAccount:n,onAutoStartConsumed:r,environmentId:i,provider:a,serverConfig:o,terminalOpen:s,onOpenTerminal:c}=e,l=ne(i,E),u=ae(Y.updateSettings,`Codex setup settings`),d;t[0]!==n?.instanceId||t[1]!==a?.instanceId?(d=n?.instanceId??a?.instanceId??T(C.make(`codex`)),t[0]=n?.instanceId,t[1]=a?.instanceId,t[2]=d):d=t[2];let f=d,p=o.settings,m;t[3]!==n||t[4]!==f||t[5]!==p.providerInstances?(m=p.providerInstances[f]??{driver:C.make(`codex`),config:n?{enabled:!0,setupMode:`managed`}:{}},t[3]=n,t[4]=f,t[5]=p.providerInstances,t[6]=m):m=t[6];let h=m,g;t[7]===h.config?g=t[8]:(g=Je(h.config),t[7]=h.config,t[8]=g);let _=g,v=_===`existing`&&h.config!==null&&typeof h.config==`object`&&`setupMode`in h.config&&h.config.setupMode===`existing`,y;t[9]!==i||t[10]!==h||t[11]!==f||t[12]!==p||t[13]!==u?(y=e=>{u({environmentId:i,input:{patch:Ve({settings:p,instanceId:f,instance:{...h,enabled:!0,config:{...h.config!==null&&typeof h.config==`object`?h.config:{},enabled:!0,setupMode:e}}})}})},t[9]=i,t[10]=h,t[11]=f,t[12]=p,t[13]=u,t[14]=y):y=t[14];let b=y,x;return t[15]!==l||t[16]!==b||t[17]!==n?.autoStart||t[18]!==n?.displayName||t[19]!==i||t[20]!==v||t[21]!==f||t[22]!==_||t[23]!==r||t[24]!==c||t[25]!==a||t[26]!==s?(x=v?(0,$.jsx)(Et,{driver:`codex`,provider:a,terminalOpen:s,terminalAvailable:l,onOpenTerminal:c}):(0,$.jsx)(We,{presentation:`onboarding`,autoStart:n?.autoStart===!0,displayName:n?.displayName,onAutoStartConsumed:r,environmentId:i,instanceId:f,provider:a,mode:_,enabled:a?.enabled??!0,onModeChange:b}),t[15]=l,t[16]=b,t[17]=n?.autoStart,t[18]=n?.displayName,t[19]=i,t[20]=v,t[21]=f,t[22]=_,t[23]=r,t[24]=c,t[25]=a,t[26]=s,t[27]=x):x=t[27],x}function Et(e){let t=(0,Q.c)(29),{driver:n,provider:r,terminalOpen:i,terminalAvailable:a,onOpenTerminal:o}=e,l;t[0]===n?l=t[1]:(l=Se.get(C.make(n)),t[0]=n,t[1]=l);let u=l,d=r?.displayName||(n===`claudeAgent`?`Claude Code`:u?.label??n),f;t[2]===r?f=t[3]:(f=qe(r),t[2]=r,t[3]=f);let p=f,m;t[4]===r?m=t[5]:(m=Ge(r),t[4]=r,t[5]=m);let h=m,_;t[6]===n?_=t[7]:(_=C.make(n),t[6]=n,t[7]=_);let v;t[8]!==d||t[9]!==_?(v=(0,$.jsx)(Ce,{driverKind:_,displayName:d,iconClassName:`size-5`}),t[8]=d,t[9]=_,t[10]=v):v=t[10];let y;t[11]===d?y=t[12]:(y=(0,$.jsx)(`span`,{className:`block text-sm font-medium text-foreground`,children:d}),t[11]=d,t[12]=y);let b=h===`ready`?`Ready to code.`:p.headline,x=h!==`ready`&&p.detail?` · ${p.detail}`:``,S;t[13]!==b||t[14]!==x?(S=(0,$.jsxs)(`p`,{className:`mt-0.5 text-xs leading-relaxed break-words whitespace-pre-wrap text-muted-foreground`,children:[b,x]}),t[13]=b,t[14]=x,t[15]=S):S=t[15];let w;t[16]!==y||t[17]!==S?(w=(0,$.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[y,S]}),t[16]=y,t[17]=S,t[18]=w):w=t[18];let T;t[19]!==o||t[20]!==h||t[21]!==p||t[22]!==a||t[23]!==i?(T=(0,$.jsx)(`div`,{className:`shrink-0`,children:h===`ready`?(0,$.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 text-xs font-medium text-success-foreground`,children:[(0,$.jsx)(c,{className:`size-3.5`}),`Ready`]}):h===`checking`?(0,$.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`Checking...`}):h===`disabled`?(0,$.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`Disabled`}):h===`attention`?(0,$.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:p.headline}):(0,$.jsxs)(g,{size:`xs`,variant:`ghost`,onClick:o,disabled:i||!a,children:[(0,$.jsx)(s,{className:`size-3.5`}),h===`signIn`?`Sign in`:`Install`]})}),t[19]=o,t[20]=h,t[21]=p,t[22]=a,t[23]=i,t[24]=T):T=t[24];let E;return t[25]!==w||t[26]!==T||t[27]!==v?(E=(0,$.jsxs)(`div`,{className:`flex items-center gap-3 rounded-lg border border-border bg-background px-4 py-4`,children:[v,w,T]}),t[25]=w,t[26]=T,t[27]=v,t[28]=E):E=t[28],E}function Dt(e){let t=(0,Q.c)(60),{session:n,onClose:r}=e,{command:i,cwd:a,driver:o,environmentId:s,keybindings:c,providerInstanceId:u}=n,d=ne(s,E),[p]=l(je,!1,S),m;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(m={reportFailure:!1},t[0]=m):m=t[0];let _=ae(ve.open,m),v;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(v={reportFailure:!1},t[1]=v):v=t[1];let y=ae(ve.write,v),b;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(b={reportFailure:!1},t[2]=b):b=t[2];let x=ae(ve.close,b),C;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(C=Promise.resolve(),t[3]=C):C=t[3];let w=(0,Z.useRef)(C),T=(0,Z.useRef)(0),D=(0,Z.useRef)(null),O;t[4]===o?O=t[5]:(O=()=>`onboarding-${o}-${h()}`,t[4]=o,t[5]=O);let[k]=(0,Z.useState)(O),A;t[6]===s?A=t[7]:(A=f(s,dt),t[6]=s,t[7]=A);let j=A,[M,N]=(0,Z.useState)(0),[P,F]=(0,Z.useState)(`preparing`),I=P===`ready`||P===`writeFailed`,L;t[8]!==x||t[9]!==i||t[10]!==a||t[11]!==s||t[12]!==_||t[13]!==u||t[14]!==k||t[15]!==y?(L=()=>{let e=T.current+1;return T.current=e,D.current=e,F(`preparing`),w.current=w.current.then(async()=>{if(D.current!==e)return;if(!X(s,`terminal:operate`)){F(`openFailed`);return}if((await _({environmentId:s,input:{threadId:dt,terminalId:k,cwd:a,providerInstanceId:u}}))._tag!==`Success`){D.current===e&&F(`openFailed`);return}if(D.current!==e)return;if(!X(s,`terminal:operate`)){F(`writeFailed`);return}let t=await y({environmentId:s,input:{threadId:dt,terminalId:k,data:i}});D.current===e&&F(t._tag===`Success`?`ready`:`writeFailed`)}),()=>{D.current===e&&(D.current=null),w.current=w.current.then(async()=>{X(s,`terminal:operate`)&&await x({environmentId:s,input:{threadId:dt,terminalId:k,deleteHistory:!0}})})}},t[8]=x,t[9]=i,t[10]=a,t[11]=s,t[12]=_,t[13]=u,t[14]=k,t[15]=y,t[16]=L):L=t[16];let R;t[17]!==x||t[18]!==i||t[19]!==a||t[20]!==s||t[21]!==_||t[22]!==u||t[23]!==M||t[24]!==k||t[25]!==y?(R=[x,i,a,s,_,u,M,k,y],t[17]=x,t[18]=i,t[19]=a,t[20]=s,t[21]=_,t[22]=u,t[23]=M,t[24]=k,t[25]=y,t[26]=R):R=t[26],(0,Z.useEffect)(L,R);let z;t[27]!==d||t[28]!==i||t[29]!==P?(z=d?P===`writeFailed`?(0,$.jsxs)($.Fragment,{children:[`Run `,(0,$.jsx)(`code`,{className:`rounded bg-muted px-1 font-mono`,children:i}),` in this terminal.`]}):P===`ready`?`Review the command, then press Enter to run it.`:P===`openFailed`?`Could not open the setup terminal.`:`Preparing command...`:`This connection cannot control terminals.`,t[27]=d,t[28]=i,t[29]=P,t[30]=z):z=t[30];let B;t[31]===z?B=t[32]:(B=(0,$.jsx)(`span`,{className:`text-2xs font-medium text-muted-foreground`,children:z}),t[31]=z,t[32]=B);let V;t[33]!==d||t[34]!==s||t[35]!==P?(V=P===`openFailed`?(0,$.jsx)(g,{size:`xs`,variant:`ghost`,disabled:!d,onClick:()=>{X(s,`terminal:operate`)&&N(Ot)},children:`Retry`}):null,t[33]=d,t[34]=s,t[35]=P,t[36]=V):V=t[36];let H;t[37]===r?H=t[38]:(H=(0,$.jsx)(g,{size:`xs`,variant:`ghost-muted`,onClick:r,children:`Close`}),t[37]=r,t[38]=H);let U;t[39]!==V||t[40]!==H?(U=(0,$.jsxs)(`div`,{className:`flex items-center gap-1`,children:[V,H]}),t[39]=V,t[40]=H,t[41]=U):U=t[41];let W;t[42]!==B||t[43]!==U?(W=(0,$.jsxs)(`div`,{className:`flex items-center justify-between border-b border-border/60 bg-background/60 px-3 py-1.5`,children:[B,U]}),t[42]=B,t[43]=U,t[44]=W):W=t[44];let G;t[45]!==p||t[46]!==a||t[47]!==o||t[48]!==c||t[49]!==r||t[50]!==u||t[51]!==k||t[52]!==I||t[53]!==j?(G=I?(0,$.jsx)(_e,{threadRef:j,threadId:dt,terminalId:k,terminalLabel:`Install ${o}`,cwd:a,providerInstanceId:u,advancedTypography:p,onSessionExited:r,focusRequestId:1,autoFocus:!0,visible:!0,resizeEpoch:0,drawerHeight:256,keybindings:c}):null,t[45]=p,t[46]=a,t[47]=o,t[48]=c,t[49]=r,t[50]=u,t[51]=k,t[52]=I,t[53]=j,t[54]=G):G=t[54];let K;t[55]===G?K=t[56]:(K=(0,$.jsx)(`div`,{className:`h-64`,children:G}),t[55]=G,t[56]=K);let q;return t[57]!==W||t[58]!==K?(q=(0,$.jsxs)(`div`,{"data-thread-terminal-drawer":!0,className:`mt-4 overflow-hidden rounded-lg border border-border/70 bg-background text-foreground`,children:[W,K]}),t[57]=W,t[58]=K,t[59]=q):q=t[59],q}function Ot(e){return e+1}var kt=`This connection cannot import projects or thread history.`;function At(e){let t=(0,Q.c)(85),{scans:n,importSelection:r,onImportSelectionChange:i,isImporting:a,setIsImporting:s,onDone:c}=e,{environments:l}=ee(),u=re(n,A),d;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(d={reportFailure:!1},t[0]=d):d=t[0];let f=ae(H.create,d),p;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(p={reportFailure:!1},t[1]=p):p=t[1];let m=ae(ot,p),h=(0,Z.useRef)(``),v=(0,Z.useRef)(0),y;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(y=new Map,t[2]=y):y=t[2];let b=(0,Z.useRef)(y),x;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(x=new Map,t[3]=x):x=t[3];let S=(0,Z.useRef)(x),C;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(C=[],t[4]=C):C=t[4];let w=(0,Z.useRef)(C),T;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(T=new Map,t[5]=T):T=t[5];let E=(0,Z.useRef)(T),D=(0,Z.useRef)(0),k,j;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(k=()=>(D.current+=1,()=>{D.current+=1}),j=[],t[6]=k,t[7]=j):(k=t[6],j=t[7]),(0,Z.useEffect)(k,j);let M;t[8]===n?M=t[9]:(M=Qe(n.flatMap(Bt)),t[8]=n,t[9]=M);let{available:N,recent:P}=M,F;t[10]===P?F=t[11]:(F=new Set(P.map(zt)),t[10]=P,t[11]=F);let L=F,R;if(t[12]!==N||t[13]!==r||t[14]!==L){let e;t[16]!==r||t[17]!==L?(e=e=>r?.environmentIds.has(e.environmentId)?r.keys.has(e.key):L.has(e.key),t[16]=r,t[17]=L,t[18]=e):e=t[18],R=N.filter(e),t[12]=N,t[13]=r,t[14]=L,t[15]=R}else R=t[15];let z=R,B;t[19]===z?B=t[20]:(B=new Set(z.map(Rt)),t[19]=z,t[20]=B);let V=B,K;t[21]!==i||t[22]!==n?(K=e=>i({environmentIds:new Set(n.flatMap(Lt)),keys:e}),t[21]=i,t[22]=n,t[23]=K):K=t[23];let q=K,J;if(t[24]!==z||t[25]!==u){let e;t[27]===u?e=t[28]:(e=e=>u.has(e.environmentId),t[27]=u,t[28]=e),J=z.every(e),t[24]=z,t[25]=u,t[26]=J}else J=t[26];let te=J,[Y,ne]=(0,Z.useState)(``),X=te?Y===kt?``:Y:kt,ie;t[29]!==c||t[30]!==s?(ie=()=>{let e=nt(w.current,S.current,b.current);if(e===void 0){c(void 0,h.current,v.current);return}s(!0);let t=D.current;U(e).then(()=>e,It).then(async e=>{t===D.current&&(await c(e,h.current,v.current)||s(!1))})},t[29]=c,t[30]=s,t[31]=ie):ie=t[31];let oe=ie,se;t[32]!==f||t[33]!==oe||t[34]!==m||t[35]!==a||t[36]!==c||t[37]!==n||t[38]!==s?(se=async e=>{if(a)return;let t=()=>e.every(Ft),r=()=>{s(!1),ne(kt)};if(!t()){r();return}if(e.length===0){c();return}s(!0),h.current=``,v.current=0,w.current=e.map(Pt);let i=D.current,l=b.current,u=E.current,d=l.size>0?e.filter(e=>l.has(e.key)).length:0,p=0,g=0,y=new Set;for(let n of e){let{environmentId:e}=n;if(i!==D.current||l!==b.current)return;if(!t()){r();return}if(l.has(n.key))continue;let a=tt(W(),e,n);if(a===null){let t=u.get(n.key);if(t===void 0){let e=_();t={projectId:e,commandId:O.make(`onboarding:project:create:${e}`)},u.set(n.key,t)}a=t.projectId;let r=await f({environmentId:e,input:{projectId:a,commandId:t.commandId,title:n.title,workspaceRoot:n.path,createWorkspaceRootIfMissing:!1,defaultModelSelection:null}});if(i!==D.current||l!==b.current)return;if(r._tag!==`Success`){I(r)||(u.delete(n.key),y.add(e));continue}}if(!t()){r();return}let s=await m({environmentId:e,input:{projectId:a,expectedWorkspaceRoot:n.path}});if(i!==D.current||l!==b.current)return;s._tag===`Success`?(p+=s.value.importedCount,g+=s.value.skippedCount,s.value.importedCount>0&&S.current.set(n.key,o(e,a)),s.value.skippedCount===0&&(d+=1,l.set(n.key,o(e,a)))):I(s)||(u.delete(n.key),y.add(e))}for(let e of n)y.has(e.environmentId)&&e.refresh();s(!1),v.current=p,d<e.length&&(p>0&&g>0?h.current=`Imported ${p} ${p===1?`thread`:`threads`}. ${g} ${g===1?`thread`:`threads`} could not be imported.`:g>0?h.current=`${g} ${g===1?`thread could`:`threads could`} not be imported.`:p>0?h.current=`Imported ${p} ${p===1?`thread`:`threads`}. Some thread history could not be imported.`:h.current=`Could not import thread history.`),oe()},t[32]=f,t[33]=oe,t[34]=m,t[35]=a,t[36]=c,t[37]=n,t[38]=s,t[39]=se):se=t[39];let ce=se;if(n.every(Nt)&&n.some(Mt)){let e;t[40]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(`h1`,{className:`text-2xl font-semibold tracking-tight text-foreground`,children:`Your projects`}),t[40]=e):e=t[40];let n;t[41]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,$.jsxs)(`div`,{className:`flex flex-1 flex-col items-center justify-center gap-3 py-6`,children:[(0,$.jsx)(G,{size:`lg`,tone:`muted`}),(0,$.jsx)(`p`,{className:`text-center text-sm text-muted-foreground`,children:`Looking for projects from Claude Code and Codex…`})]}),t[41]=n):n=t[41];let r;return t[42]===c?r=t[43]:(r=(0,$.jsxs)(`div`,{className:`flex h-full min-h-40 flex-col`,children:[e,n,(0,$.jsx)(`div`,{className:`flex justify-end`,children:(0,$.jsx)(g,{variant:`ghost-muted`,onClick:()=>void c(),children:`Do not import projects`})})]}),t[42]=c,t[43]=r),r}let le;t[44]!==N||t[45]!==a||t[46]!==z.length||t[47]!==q?(le=N.length>0?(0,$.jsxs)(`div`,{className:`mt-5 flex items-center justify-between gap-3 text-xs text-muted-foreground`,children:[(0,$.jsxs)(`span`,{role:`status`,children:[z.length,` of `,N.length,` selected`]}),(0,$.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,$.jsx)(g,{variant:`ghost`,size:`xs`,disabled:a||z.length===N.length,onClick:()=>q(new Set(N.map(jt))),children:`Select all`}),(0,$.jsx)(g,{variant:`ghost`,size:`xs`,disabled:a||z.length===0,onClick:()=>q(new Set),children:`Select none`})]})]}):null,t[44]=N,t[45]=a,t[46]=z.length,t[47]=q,t[48]=le):le=t[48];let ue;if(t[49]!==N||t[50]!==l||t[51]!==a||t[52]!==n||t[53]!==V||t[54]!==q){let e;t[56]!==N||t[57]!==l||t[58]!==a||t[59]!==n.length||t[60]!==V||t[61]!==q?(e=e=>{let t=N.filter(t=>t.environmentId===e.environmentId),r=l.find(t=>t.environmentId===e.environmentId)?.label??`Computer`;return(0,$.jsxs)(`fieldset`,{className:`min-w-0 space-y-0.5`,disabled:a,children:[n.length>1?(0,$.jsx)(`legend`,{className:`mb-2 text-sm font-medium`,children:r}):null,e.isPending&&e.data===null?(0,$.jsxs)(`div`,{className:`flex items-center gap-2 py-3 text-sm text-muted-foreground`,children:[(0,$.jsx)(G,{size:`md`}),`Looking for projects…`]}):e.error===null?t.length===0?(0,$.jsx)(`p`,{className:`py-2 text-sm text-muted-foreground`,children:`No existing Claude Code or Codex projects found.`}):null:(0,$.jsxs)(`div`,{role:`alert`,className:`flex items-center justify-between gap-3 text-sm text-muted-foreground`,children:[(0,$.jsxs)(`span`,{children:[`Could not check projects. `,e.error]}),(0,$.jsx)(g,{variant:`ghost`,size:`sm`,onClick:e.refresh,children:`Retry`})]}),e.data?.truncated?(0,$.jsx)(`p`,{className:`text-xs text-muted-foreground`,role:`status`,children:pt}):null,(0,$.jsx)(Vt,{candidates:t,selectedKeys:V,onSelectionChange:q})]},e.environmentId)},t[56]=N,t[57]=l,t[58]=a,t[59]=n.length,t[60]=V,t[61]=q,t[62]=e):e=t[62],ue=n.map(e),t[49]=N,t[50]=l,t[51]=a,t[52]=n,t[53]=V,t[54]=q,t[55]=ue}else ue=t[55];let fe;t[63]===ue?fe=t[64]:(fe=(0,$.jsx)(de,{scrollFade:!0,className:`mt-2 h-auto max-h-80`,children:(0,$.jsx)(`div`,{className:`space-y-5 pr-3`,children:ue})}),t[63]=ue,t[64]=fe);let pe;t[65]===X?pe=t[66]:(pe=X?(0,$.jsx)(`p`,{className:`mt-3 text-sm text-destructive`,children:X}):null,t[65]=X,t[66]=pe);let me;t[67]!==oe||t[68]!==a?(me=(0,$.jsx)(g,{variant:`ghost-muted`,disabled:a,onClick:oe,children:`Do not import projects`}),t[67]=oe,t[68]=a,t[69]=me):me=t[69];let he=!te||a||z.length===0,ge;t[70]!==ce||t[71]!==z?(ge=()=>void ce(z),t[70]=ce,t[71]=z,t[72]=ge):ge=t[72];let _e=a?`Importing…`:`Import ${z.length} ${z.length===1?`project`:`projects`}`,ve;t[73]!==he||t[74]!==ge||t[75]!==_e?(ve=(0,$.jsx)(g,{autoFocus:!0,disabled:he,onClick:ge,children:_e}),t[73]=he,t[74]=ge,t[75]=_e,t[76]=ve):ve=t[76];let ye;t[77]!==me||t[78]!==ve?(ye=(0,$.jsxs)(`div`,{className:`mt-6 flex flex-wrap items-center justify-end gap-3`,children:[me,ve]}),t[77]=me,t[78]=ve,t[79]=ye):ye=t[79];let be;return t[80]!==le||t[81]!==fe||t[82]!==pe||t[83]!==ye?(be=(0,$.jsxs)(Yt,{title:`Import your projects`,description:`Import projects and conversations from Claude Code and Codex on your selected computers.`,children:[le,fe,pe,ye]}),t[80]=le,t[81]=fe,t[82]=pe,t[83]=ye,t[84]=be):be=t[84],be}function jt(e){return e.key}function Mt(e){return e.isPending}function Nt(e){return e.data===null}function Pt(e){return e.key}function Ft(e){return X(e.environmentId,A)}function It(){}function Lt(e){return e.data===null?[]:[e.environmentId]}function Rt(e){return e.key}function zt(e){return e.key}function Bt(e){return(e.data?.candidates??[]).map(t=>({...t,environmentId:e.environmentId,key:it(e.environmentId,t.path)}))}function Vt(e){let t=(0,Q.c)(25),{candidates:n,selectedKeys:r,onSelectionChange:i}=e,a;t[0]===n?a=t[1]:(a=et(n),t[0]=n,t[1]=a);let{repositories:o,other:s}=a,c;t[2]!==i||t[3]!==r?(c=(e,t)=>{let n=new Set(r);for(let r of e)t?n.add(r):n.delete(r);i(n)},t[2]=i,t[3]=r,t[4]=c):c=t[4];let l=c,u;if(t[5]!==s||t[6]!==r){let e;t[8]===r?e=t[9]:(e=e=>r.has(e.key),t[8]=r,t[9]=e),u=s.filter(e),t[5]=s,t[6]=r,t[7]=u}else u=t[7];let d=u.length,f;if(t[10]!==o||t[11]!==r||t[12]!==l){let e;t[14]!==r||t[15]!==l?(e=e=>(0,$.jsx)(Ut,{group:e,selectedKeys:r,onToggle:l},e.key),t[14]=r,t[15]=l,t[16]=e):e=t[16],f=o.map(e),t[10]=o,t[11]=r,t[12]=l,t[13]=f}else f=t[13];let p;t[17]!==s||t[18]!==d||t[19]!==r||t[20]!==l?(p=s.length>0?(0,$.jsxs)(Te,{children:[(0,$.jsxs)(`div`,{className:`flex items-center gap-2.5 rounded-md px-2 py-1.5 hover:bg-muted/40`,children:[(0,$.jsx)(ge,{checked:d===s.length,indeterminate:d>0&&d<s.length,onCheckedChange:e=>l(s.map(Ht),e===!0)}),(0,$.jsxs)(Oe,{className:`group flex min-w-0 flex-1 items-center gap-1.5 text-left`,children:[(0,$.jsx)(m,{className:`size-3.5 shrink-0 text-muted-foreground transition-transform group-data-panel-open:rotate-90`}),(0,$.jsx)(`span`,{className:`truncate text-sm text-muted-foreground`,children:`Other folders`}),(0,$.jsxs)(`span`,{className:`ml-auto shrink-0 text-xs text-muted-foreground tabular-nums`,children:[s.length,` `,s.length===1?`folder`:`folders`]})]})]}),(0,$.jsx)(Ne,{children:s.map(e=>(0,$.jsx)(qt,{candidate:e,path:e.path,nested:!0,checked:r.has(e.key),onCheckedChange:t=>l([e.key],t)},e.key))})]}):null,t[17]=s,t[18]=d,t[19]=r,t[20]=l,t[21]=p):p=t[21];let h;return t[22]!==f||t[23]!==p?(h=(0,$.jsxs)($.Fragment,{children:[f,p]}),t[22]=f,t[23]=p,t[24]=h):h=t[24],h}function Ht(e){return e.key}function Ut(e){let t=(0,Q.c)(53),{group:n,selectedKeys:r,onToggle:i}=e,a,o;if(t[0]!==n.candidates||t[1]!==r){a=n.candidates.map(Gt);let e;t[4]===r?e=t[5]:(e=e=>r.has(e),t[4]=r,t[5]=e),o=a.filter(e),t[0]=n.candidates,t[1]=r,t[2]=a,t[3]=o}else a=t[2],o=t[3];let s=o.length,c=n.candidates.length===1,l=n.candidates[0];if(c&&l!==void 0){let e=n.label,a=l.path,o;t[6]!==l.key||t[7]!==r?(o=r.has(l.key),t[6]=l.key,t[7]=r,t[8]=o):o=t[8];let s;t[9]!==i||t[10]!==l.key?(s=e=>i([l.key],e),t[9]=i,t[10]=l.key,t[11]=s):s=t[11];let c;return t[12]!==n.label||t[13]!==l||t[14]!==o||t[15]!==s?(c=(0,$.jsx)(qt,{candidate:l,label:e,path:a,checked:o,onCheckedChange:s}),t[12]=n.label,t[13]=l,t[14]=o,t[15]=s,t[16]=c):c=t[16],c}let u=s===a.length,d=s>0&&s<a.length,f;t[17]!==a||t[18]!==i?(f=e=>i(a,e===!0),t[17]=a,t[18]=i,t[19]=f):f=t[19];let p;t[20]!==u||t[21]!==d||t[22]!==f?(p=(0,$.jsx)(ge,{checked:u,indeterminate:d,onCheckedChange:f}),t[20]=u,t[21]=d,t[22]=f,t[23]=p):p=t[23];let h;t[24]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,$.jsx)(m,{className:`size-3.5 shrink-0 text-muted-foreground transition-transform group-data-panel-open:rotate-90`}),t[24]=h):h=t[24];let g;t[25]===n.label?g=t[26]:(g=(0,$.jsx)(`span`,{className:`truncate text-sm font-medium`,children:n.label}),t[25]=n.label,t[26]=g);let _;t[27]===n.candidates?_=t[28]:(_=new Set(n.candidates.flatMap(Wt)),t[27]=n.candidates,t[28]=_);let v;t[29]===_?v=t[30]:(v=[..._],t[29]=_,t[30]=v);let y;t[31]!==n.lastActiveAt||t[32]!==n.threadCount||t[33]!==v?(y=(0,$.jsx)(Jt,{sources:v,threadCount:n.threadCount,lastActiveAt:n.lastActiveAt}),t[31]=n.lastActiveAt,t[32]=n.threadCount,t[33]=v,t[34]=y):y=t[34];let b;t[35]!==y||t[36]!==g?(b=(0,$.jsxs)(Oe,{className:`group flex min-w-0 flex-1 items-center gap-1.5 text-left`,children:[h,g,y]}),t[35]=y,t[36]=g,t[37]=b):b=t[37];let x;t[38]!==b||t[39]!==p?(x=(0,$.jsxs)(`div`,{className:`flex items-center gap-2.5 rounded-md px-2 py-1.5 hover:bg-muted/40`,children:[p,b]}),t[38]=b,t[39]=p,t[40]=x):x=t[40];let S;if(t[41]!==n.candidates||t[42]!==i||t[43]!==r){let e;t[45]!==i||t[46]!==r?(e=e=>(0,$.jsx)(qt,{candidate:e,path:e.path,nested:!0,checked:r.has(e.key),onCheckedChange:t=>i([e.key],t)},e.key),t[45]=i,t[46]=r,t[47]=e):e=t[47],S=n.candidates.map(e),t[41]=n.candidates,t[42]=i,t[43]=r,t[44]=S}else S=t[44];let C;t[48]===S?C=t[49]:(C=(0,$.jsx)(Ne,{children:S}),t[48]=S,t[49]=C);let w;return t[50]!==x||t[51]!==C?(w=(0,$.jsxs)(Te,{defaultOpen:!0,children:[x,C]}),t[50]=x,t[51]=C,t[52]=w):w=t[52],w}function Wt(e){return e.sources}function Gt(e){return e.key}function Kt(e){let t=(0,Q.c)(12),{path:n,className:r}=e,i;t[0]===n?i=t[1]:(i=rt(n),t[0]=n,t[1]=i);let{name:a,parent:o}=i,s;t[2]===r?s=t[3]:(s=y(`flex min-w-0 items-baseline font-mono`,r),t[2]=r,t[3]=s);let c;t[4]===o?c=t[5]:(c=o.length>0?(0,$.jsx)(`span`,{className:`truncate`,children:o}):null,t[4]=o,t[5]=c);let l;t[6]===a?l=t[7]:(l=(0,$.jsx)(`span`,{className:`max-w-full shrink-0 truncate`,children:a}),t[6]=a,t[7]=l);let u;return t[8]!==s||t[9]!==c||t[10]!==l?(u=(0,$.jsxs)(`span`,{className:s,children:[c,l]}),t[8]=s,t[9]=c,t[10]=l,t[11]=u):u=t[11],u}function qt(e){let t=(0,Q.c)(30),{candidate:n,label:r,path:i,nested:a,checked:o,onCheckedChange:s}=e,c=a!==void 0&&a,l=c&&`pl-8`,u;t[0]===l?u=t[1]:(u=y(`flex cursor-pointer items-center gap-2.5 rounded-md px-2 py-1.5 hover:bg-muted/40 has-disabled:cursor-default`,l),t[0]=l,t[1]=u);let d;t[2]===s?d=t[3]:(d=e=>s(e===!0),t[2]=s,t[3]=d);let f;t[4]!==o||t[5]!==d?(f=(0,$.jsx)(ge,{checked:o,onCheckedChange:d}),t[4]=o,t[5]=d,t[6]=f):f=t[6];let p;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,$.jsx)(`span`,{className:`flex min-w-0 flex-1 items-baseline gap-2 truncate`}),t[7]=p):p=t[7];let m;t[8]===r?m=t[9]:(m=r===void 0?null:(0,$.jsx)(`span`,{className:`truncate text-sm font-medium`,children:r}),t[8]=r,t[9]=m);let h;t[10]!==r||t[11]!==i?(h=i===void 0?null:(0,$.jsx)(Kt,{path:i,className:r===void 0?`text-xs`:`text-2xs text-muted-foreground`}),t[10]=r,t[11]=i,t[12]=h):h=t[12];let g;t[13]!==m||t[14]!==h?(g=(0,$.jsxs)(se,{render:p,children:[m,h]}),t[13]=m,t[14]=h,t[15]=g):g=t[15];let _;t[16]===n.path?_=t[17]:(_=(0,$.jsx)(ce,{variant:`code`,children:n.path}),t[16]=n.path,t[17]=_);let v;t[18]!==_||t[19]!==g?(v=(0,$.jsxs)(le,{children:[g,_]}),t[18]=_,t[19]=g,t[20]=v):v=t[20];let b=c?null:n.sources,x;t[21]!==n.lastActiveAt||t[22]!==n.threadCount||t[23]!==b?(x=(0,$.jsx)(Jt,{sources:b,threadCount:n.threadCount,lastActiveAt:n.lastActiveAt}),t[21]=n.lastActiveAt,t[22]=n.threadCount,t[23]=b,t[24]=x):x=t[24];let S;return t[25]!==v||t[26]!==x||t[27]!==u||t[28]!==f?(S=(0,$.jsxs)(`label`,{className:u,children:[f,v,x]}),t[25]=v,t[26]=x,t[27]=u,t[28]=f,t[29]=S):S=t[29],S}function Jt(e){let t=(0,Q.c)(19),{sources:n,threadCount:r,lastActiveAt:i}=e,a;t[0]===i?a=t[1]:(a=i===null?null:oe(i),t[0]=i,t[1]=a);let o=a,s=o===null?``:o.suffix===null?`now`:o.value,c;t[2]===n?c=t[3]:(c=n?.includes(`claudeAgent`)?(0,$.jsx)(`span`,{role:`img`,"aria-label":`Claude Code`,children:(0,$.jsx)(Ce,{driverKind:C.make(`claudeAgent`),displayName:`Claude Code`,iconClassName:`size-3`})}):null,t[2]=n,t[3]=c);let l;t[4]===c?l=t[5]:(l=(0,$.jsx)(`span`,{className:`flex size-4 items-center justify-center`,children:c}),t[4]=c,t[5]=l);let u;t[6]===n?u=t[7]:(u=n?.includes(`codex`)?(0,$.jsx)(`span`,{role:`img`,"aria-label":`Codex`,children:(0,$.jsx)(Ce,{driverKind:C.make(`codex`),displayName:`Codex`,iconClassName:`size-3`})}):null,t[6]=n,t[7]=u);let d;t[8]===u?d=t[9]:(d=(0,$.jsx)(`span`,{className:`flex size-4 items-center justify-center`,children:u}),t[8]=u,t[9]=d);let f;t[10]===r?f=t[11]:(f=(0,$.jsx)(`span`,{className:`text-right`,children:r}),t[10]=r,t[11]=f);let p;t[12]===s?p=t[13]:(p=(0,$.jsx)(`span`,{className:`text-right whitespace-nowrap`,children:s}),t[12]=s,t[13]=p);let m;return t[14]!==l||t[15]!==d||t[16]!==f||t[17]!==p?(m=(0,$.jsxs)(`span`,{className:`ml-auto grid shrink-0 grid-cols-[1rem_1rem_2.5rem_2.25rem] items-center gap-x-1 text-xs text-muted-foreground tabular-nums`,children:[l,d,f,p]}),t[14]=l,t[15]=d,t[16]=f,t[17]=p,t[18]=m):m=t[18],m}function Yt(e){let t=(0,Q.c)(8),{title:n,description:r,children:i}=e,a;t[0]===n?a=t[1]:(a=(0,$.jsx)(`h1`,{className:`text-2xl font-semibold tracking-tight text-foreground`,children:n}),t[0]=n,t[1]=a);let o;t[2]===r?o=t[3]:(o=r?(0,$.jsx)(`p`,{className:`mt-2.5 text-sm leading-relaxed text-muted-foreground`,children:r}):null,t[2]=r,t[3]=o);let s;return t[4]!==i||t[5]!==a||t[6]!==o?(s=(0,$.jsxs)($.Fragment,{children:[a,o,i]}),t[4]=i,t[5]=a,t[6]=o,t[7]=s):s=t[7],s}var Xt=j(D);function Zt(){let e=(0,Q.c)(14),{authGateState:t}=Me.useRouteContext(),n=K(),r;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r={select:$t},e[0]=r):r=e[0];let i=q(r),a;e[1]===i?a=e[2]:(a=i.startsWith(`agents:`)?N(Xt(i.slice(7))):void 0,e[1]=i,e[2]=a);let o=a,s;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(s={select:Qt},e[3]=s):s=e[3];let c=q(s),[l,u]=(0,Z.useState)(!1),d=ye(),f=t.status===`authenticated`,p;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,$.jsx)(ze,{}),e[4]=p):p=e[4];let m;e[5]!==l||e[6]!==c||e[7]!==f||e[8]!==n||e[9]!==d||e[10]!==o?(m=c&&!l?(0,$.jsx)(mt,{localAvailable:f,resumeEnvironmentId:o,onDone:async e=>{u(!0),e===void 0?await n({to:`/`,replace:!0}):await d(e,{replace:!0}).catch(()=>n({to:`/`,replace:!0}))}}):null,e[5]=l,e[6]=c,e[7]=f,e[8]=n,e[9]=d,e[10]=o,e[11]=m):m=e[11];let h;return e[12]===m?h=e[13]:(h=(0,$.jsxs)($.Fragment,{children:[p,m]}),e[12]=m,e[13]=h),h}function Qt(e){return e.pathname===`/welcome`}function $t(e){return e.hash}export{Zt as component};
|
|
2
|
-
//# sourceMappingURL=welcome-
|
|
1
|
+
import{a as e,t}from"./react-BUfh6y28.js";import{n,t as r}from"./jsx-runtime-DJeoFXNw.js";import{Jl as i,Jo as a,Js as o,Nf as s,Ol as c,Os as l,Td as u,Yo as d,Ys as f,es as p,jl as m,l as h,mr as g,o as _,sl as v,t as y,td as b,ws as x}from"./utils-BVnIIHXP.js";import{Ec as S,Hi as C,Sc as w,Wi as T,fa as E,hc as D,mc as O,n as k,ra as A,ul as j,vg as M,xg as N}from"./src-DHn7yNZx.js";import{Dr as P,Jr as F,Sr as I,W as L,_r as R,gr as z,t as B}from"./runtime-vb0YwEUc.js";import{$ as V,G as H,N as U,u as W}from"./entities-JWl3bvMT.js";import{t as G}from"./spinner-m1uNq_wW.js";import{t as K}from"./useNavigate-P1p3Es15.js";import{t as q}from"./useLocation-BXwb7I1F.js";import{a as J}from"./relay-Ceq0htTl.js";import{D as ee,O as te}from"./useSettings-Dp27sUML.js";import{f as Y}from"./server-Bw1ZPPkk.js";import{i as ne,n as X,o as re}from"./session-YEQs2e4k.js";import{t as ie}from"./query-DFSffMGJ.js";import{t as ae}from"./use-atom-command-DkmE-pw9.js";import{a as oe}from"./timestampFormat-Dq7sHZpd.js";import{a as se,n as ce,t as le}from"./tooltip-BhCWnsdW.js";import{t as ue}from"./input-yaZxaTds.js";import{t as de}from"./scroll-area-DhDCLqyU.js";import{r as fe}from"./dist-BvS7KgJD.js";import{t as pe}from"./dialog-DFlZvvht.js";import{t as me}from"./useP4ConnectAuthPrompt-4l_tJOsn.js";import{t as he}from"./CommandBlock-BJ2nHWe_.js";import{t as ge}from"./checkbox-iFzfBLKr.js";import{t as _e}from"./ThreadTerminalDrawer-B77-xYz_.js";import{i as ve}from"./terminalSessions-CXGA3pch.js";import{n as ye}from"./useHandleNewThread-C1YHLGL_.js";import{r as be,t as xe}from"./alert-CfhQnxcL.js";import{i as Se,n as Ce}from"./ChatGptUsageButton-_JZfpkEi.js";import{t as we}from"./onboarding-BG6FdUUU.js";import{Ao as Te,Do as Ee,Eo as De,Mo as Oe,Oo as ke,_ as Ae,_o as je,f as Me,jo as Ne,ko as Pe,ln as Fe,mn as Ie,pi as Le,un as Re}from"./main-43D2LVmx.js";import{t as ze}from"./NoProjectsHero-CAoW0Xej.js";import{t as Be}from"./legalLinks-C4VP5hPh.js";import{r as Ve}from"./SettingsPanels.logic-y95n8OOO.js";import{d as He,f as Ue,i as We,l as Ge,n as Ke,o as qe,t as Je,u as Ye}from"./CodexSetupSection.logic-B8uhmM78.js";var Z=e(t(),1),Q=n(),Xe=2592e6,Ze=3;function Qe(e,t=Date.now()){let n=t-Xe;return{available:e,recent:e.filter(e=>{if(e.git===null||e.threadCount<Ze||e.lastActiveAt===null)return!1;let r=Date.parse(e.lastActiveAt);return r>=n&&r<=t})}}function $e(e,t){return e===null?t:t===null||e>t?e:t}function et(e){let t=new Map,n=[];for(let r of e){if(r.git===null){n.push(r);continue}let e=r.git??{remoteKey:null,repository:null},i=e.remoteKey===null?`path:${r.path}`:`remote:${e.remoteKey}`,a=t.get(i);a===void 0?t.set(i,{key:i,label:e.repository??r.title,repository:e.repository,candidates:[r],threadCount:r.threadCount,lastActiveAt:r.lastActiveAt}):(a.candidates.push(r),t.set(i,{...a,threadCount:a.threadCount+r.threadCount,lastActiveAt:$e(a.lastActiveAt,r.lastActiveAt)}))}return{repositories:[...t.values()].sort((e,t)=>e.lastActiveAt===t.lastActiveAt?e.label.localeCompare(t.label):e.lastActiveAt===null?1:t.lastActiveAt===null?-1:t.lastActiveAt.localeCompare(e.lastActiveAt)),other:n}}function tt(e,t,n){if(n.projectId!==void 0)return n.projectId;let r=e.filter(e=>e.environmentId===t),i=V(r,n.path);return i===void 0?null:i.id}function nt(e,t,n){for(let n of e){let e=t.get(n);if(e!==void 0)return e}for(let t of e){let e=n.get(t);if(e!==void 0)return e}}function rt(e){if(/^[A-Za-z]:[\\/]+$/.test(e)||/^[\\/]{2}[^\\/]+[\\/][^\\/]+[\\/]*$/.test(e))return{name:e,parent:``};let t=e.replace(/[\\/]+$/,``),n=Math.max(t.lastIndexOf(`/`),t.lastIndexOf(`\\`));return t.length===0?{name:e,parent:``}:n<0?{name:t,parent:``}:{name:t.slice(n+1),parent:t.slice(0,n+1)}}function it(e,t){return JSON.stringify([e,t])}var at=R(B,{label:`environment-data:agent-sessions:scan`,tag:k.agentSessionsScan,staleTimeMs:3e4,idleTtlMs:3e5}),ot=z(B,{label:`environment-data:agent-sessions:import`,tag:k.agentSessionsImport});function st(e){return F(e.entry)}function ct(e,t){let n=e.filter(e=>t.has(e.environmentId)),r=e=>n.filter(t=>e(t.connection.phase)).map(e=>e.environmentId),i=r(e=>e===`connected`),a=n.some(e=>e.connection.phase===`connecting`);return{ready:i.length>0&&!a,environmentIds:i,skippedIds:r(e=>e!==`connected`&&e!==`connecting`)}}function lt(e){let t=(0,Q.c)(3),n=(0,Z.useContext)(d),r;return t[0]!==e||t[1]!==n?(r=p(t=>e.map(e=>{let r=at({environmentId:e,input:{}}),i=t(r);return{environmentId:e,data:M(x(i)),error:i._tag===`Failure`?ie(i.cause):null,isPending:i.waiting||i._tag===`Initial`,refresh:()=>n.refresh(r)}})),t[0]=e,t[1]=n,t[2]=r):r=t[2],a(r)}var $=e(r(),1),ut=[],dt=w.make(`onboarding-agent-setup`),ft=[`Connect`,`Agents`,`Projects`],pt=`Scan limit reached. Some projects or conversations may be missing.`;function mt({localAvailable:e,onDone:t,resumeEnvironmentId:n}){let r=Ie(),[i,a]=(0,Z.useState)(n?`agents`:`connection`),{environments:o}=ee(),[s,c]=(0,Z.useState)(null),l=(0,Z.useRef)(new Set),[u,d]=(0,Z.useState)(n?[n]:[]),[f,p]=(0,Z.useState)(null),[m,h]=(0,Z.useState)(!1),g=(0,Z.useRef)(null),_=(0,Z.useRef)(null),v=te();(0,Z.useEffect)(()=>{let e=o.filter(e=>!l.current.has(e.environmentId));if(e.length===0)return;for(let t of e)l.current.add(t.environmentId);let t=e.filter(e=>e.entry.enabled);t.length!==0&&c(e=>new Set([...e??[],...t.map(e=>e.environmentId)]))},[o]);let y=s??new Set(v?[v.environmentId]:[]),b=lt(i===`import`?u:ut),x=i===`import`&&b.every(e=>e.data===null)&&b.some(e=>e.isPending),S=e=>{e.length!==0&&(d(e),a(`agents`))},C=i===`agents`?1:i===`import`?2:0,w=(0,Z.useCallback)((e,n,i=0)=>{if(g.current!==null)return g.current;_.current!==null&&(J.close(_.current),_.current=null);let a=r().then(async()=>(_.current!==null&&(J.close(_.current),_.current=null),await t(e),n?J.add({type:`warning`,title:`Some history was not imported`,description:n,timeout:0}):i>0&&J.add({type:`success`,title:`Imported ${i} ${i===1?`thread`:`threads`}`}),!0)).catch(()=>{let e={type:`error`,title:`Could not finish setup`,description:`Your settings could not be saved. Try again.`};return _.current===null?_.current=J.add(e):J.update(_.current,e),!1}).finally(()=>{g.current===a&&(g.current=null)});return g.current=a,a},[r,t]);return(0,$.jsxs)(pe,{open:!0,disablePointerDismissal:!0,onOpenChange:(e,t)=>t.cancel(),children:[(0,$.jsxs)(ke,{size:`wide`,bottomStickOnMobile:!1,showCloseButton:!1,initialFocus:()=>document.getElementById(`onboarding-pairing-url`)??!0,children:[(0,$.jsx)(De,{title:`Set up P4 Code`,identity:(0,$.jsxs)(`div`,{className:`flex items-baseline gap-1.5`,role:`img`,"aria-label":`P4 Code`,children:[(0,$.jsx)(Le,{className:`h-4 w-auto shrink-0`,"aria-hidden":!0}),(0,$.jsx)(`span`,{className:`text-2xl font-medium tracking-tight text-muted-foreground`,children:`Code`})]}),children:(0,$.jsx)(Pe,{steps:ft,currentStep:C,isStepDisabled:e=>m||e>=C,onStepChange:e=>{m||e>C||a(e===0?`connection`:`agents`)}})}),(0,$.jsx)(Ee,{holdHeight:x,children:i===`connection`?(0,$.jsx)(ht,{expandPairingInitially:!e&&!L(),selectedIds:y,autoSelectedComputers:l.current,onSelectionChange:c,onToggleEnvironment:(e,t)=>c(n=>{let r=new Set(n??y);return t?r.add(e):r.delete(e),r}),onContinue:()=>S(ct(o,y).environmentIds),onPaired:e=>{c(new Set([...y,e]))}}):i===`agents`?(0,$.jsx)(xt,{environmentIds:u,onContinue:()=>a(`import`)}):(0,$.jsx)(At,{scans:b,importSelection:f,onImportSelectionChange:p,isImporting:m,setIsImporting:h,onDone:w})})]}),(0,$.jsx)(Ae,{})]})}function ht(e){let t=(0,Q.c)(44),{autoSelectedComputers:n,expandPairingInitially:r,selectedIds:i,onSelectionChange:a,onToggleEnvironment:o,onContinue:s,onPaired:c}=e,{environments:l}=ee(),d;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(d=L(),t[0]=d):d=t[0];let f=d,p;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(p=e=>!f||!st(e),t[1]=p):p=t[1];let h=l.filter(p),[_,x]=(0,Z.useState)(r),[S,C]=(0,Z.useState)(!1),{ready:w,skippedIds:T}=ct(l,i),E=l.filter(e=>T.includes(e.environmentId)).map(gt),D=(0,Z.useRef)(null);(0,Z.useEffect)(()=>{w&&(document.activeElement===document.body||document.activeElement?.getAttribute(`role`)===`dialog`)&&D.current?.focus()},[w]);let O,k;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(O=(0,$.jsx)(`h1`,{className:`text-2xl font-semibold tracking-tight text-foreground`,children:`Connect your computers`}),k=(0,$.jsx)(`p`,{className:`mt-2.5 text-sm leading-relaxed text-muted-foreground`,children:`Choose one or more computers. We’ll set up agents and projects on each.`}),t[2]=O,t[3]=k):(O=t[2],k=t[3]);let A=h.length>0?(0,$.jsxs)(`fieldset`,{className:`mt-5 space-y-2`,children:[(0,$.jsx)(`legend`,{className:`sr-only`,children:`Computers to set up`}),h.map(e=>(0,$.jsxs)(`label`,{className:`flex cursor-pointer items-center gap-3 rounded-lg border border-border bg-background px-3 py-3`,children:[(0,$.jsx)(ge,{checked:i.has(e.environmentId),onCheckedChange:t=>{let n=new Set(i);t?n.add(e.environmentId):n.delete(e.environmentId),a(n)}}),(0,$.jsx)(u,{className:`size-4 shrink-0 text-muted-foreground`}),(0,$.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,$.jsxs)(`span`,{className:`flex items-baseline justify-between gap-3`,children:[(0,$.jsx)(`span`,{className:`min-w-0 text-sm font-medium break-words`,children:e.label}),(0,$.jsx)(`span`,{className:`shrink-0 text-xs text-muted-foreground`,children:!e.entry.enabled&&e.connection.phase!==`unsupported`?`Off`:Re(e.connection).buttonLabel})]}),e.displayUrl?(0,$.jsx)(`span`,{className:`mt-0.5 block text-xs break-all text-muted-foreground`,children:e.displayUrl}):null]})]},e.environmentId))]}):null,j;t[4]!==n||t[5]!==S||t[6]!==o||t[7]!==i?(j=f?(0,$.jsx)(_t,{autoSelectedComputers:n,disabled:S,selectedIds:i,onToggleEnvironment:o}):null,t[4]=n,t[5]=S,t[6]=o,t[7]=i,t[8]=j):j=t[8];let M,N,P;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(M=(0,$.jsx)(g,{variant:`ghost`,size:`sm-multiline`,className:`min-h-14 w-full justify-start`}),N=(0,$.jsx)(b,{className:`size-4 text-muted-foreground`}),P=(0,$.jsx)(`span`,{className:`flex-1 text-left`,children:`Add a computer`}),t[9]=M,t[10]=N,t[11]=P):(M=t[9],N=t[10],P=t[11]);let F=_&&`rotate-90`,I;t[12]===F?I=t[13]:(I=y(`size-4 text-muted-foreground`,F),t[12]=F,t[13]=I);let R;t[14]===I?R=t[15]:(R=(0,$.jsx)(m,{className:I}),t[14]=I,t[15]=R);let z;t[16]!==S||t[17]!==R?(z=(0,$.jsxs)(Oe,{disabled:S,render:M,children:[N,P,R]}),t[16]=S,t[17]=R,t[18]=z):z=t[18];let B;t[19]===c?B=t[20]:(B=e=>{x(!1),c(e),requestAnimationFrame(()=>D.current?.focus())},t[19]=c,t[20]=B);let V;t[21]!==S||t[22]!==B?(V=(0,$.jsx)(Ne,{children:(0,$.jsx)(`div`,{className:`px-3 pb-3`,children:(0,$.jsx)(vt,{isPairing:S,setIsPairing:C,onPaired:B})})}),t[21]=S,t[22]=B,t[23]=V):V=t[23];let H;t[24]!==_||t[25]!==z||t[26]!==V?(H=(0,$.jsx)(`div`,{className:`rounded-lg border border-border bg-background`,children:(0,$.jsxs)(Te,{open:_,onOpenChange:x,children:[z,V]})}),t[24]=_,t[25]=z,t[26]=V,t[27]=H):H=t[27];let U;t[28]!==H||t[29]!==j?(U=(0,$.jsxs)(`div`,{className:`mt-4 space-y-2`,children:[j,H]}),t[28]=H,t[29]=j,t[30]=U):U=t[30];let W=E.length>0?(0,$.jsxs)(`p`,{className:`mt-4 text-xs text-muted-foreground`,children:[`Not connected, so setup skips `,E.join(`, `),`. You can set`,` `,E.length===1?`it`:`them`,` up later from Settings.`]}):null,G;t[31]===Symbol.for(`react.memo_cache_sentinel`)?(G=(0,$.jsxs)(`p`,{className:`min-w-0 text-xs leading-relaxed text-muted-foreground`,children:[`P4 Code collects anonymous usage data to help us improve it. To read more about how your data is used and how to opt out, see our`,` `,(0,$.jsx)(`a`,{className:`underline underline-offset-2 hover:text-foreground`,href:Be,target:`_blank`,rel:`noreferrer noopener`,children:`privacy policy`}),`.`]}),t[31]=G):G=t[31];let K=!r,q=!w||S,J;t[32]===Symbol.for(`react.memo_cache_sentinel`)?(J=(0,$.jsx)(v,{className:`size-3.5`}),t[32]=J):J=t[32];let te;t[33]!==s||t[34]!==K||t[35]!==q?(te=(0,$.jsxs)(`div`,{className:`mt-6 flex flex-col-reverse gap-4 sm:flex-row sm:items-center sm:justify-between sm:gap-6`,children:[G,(0,$.jsxs)(g,{className:`shrink-0 self-end`,ref:D,autoFocus:K,disabled:q,onClick:s,children:[`Continue`,J]})]}),t[33]=s,t[34]=K,t[35]=q,t[36]=te):te=t[36];let Y;return t[37]!==U||t[38]!==W||t[39]!==te||t[40]!==O||t[41]!==k||t[42]!==A?(Y=(0,$.jsxs)($.Fragment,{children:[O,k,A,U,W,te]}),t[37]=U,t[38]=W,t[39]=te,t[40]=O,t[41]=k,t[42]=A,t[43]=Y):Y=t[43],Y}function gt(e){return e.label}function _t(e){let t=(0,Q.c)(36),{autoSelectedComputers:n,disabled:r,selectedIds:a,onToggleEnvironment:o}=e,{environments:s}=ee(),c;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(c={treatPendingAsSignedOut:!1},t[0]=c):c=t[0];let{isLoaded:l,isSignedIn:u}=fe(c),{openAuthPrompt:d}=me(),[f,p]=(0,Z.useState)(!0),[h,_]=(0,Z.useState)(!1),v;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(v=()=>_(!0),t[1]=v):v=t[1];let b=v,x=f&&!!u&&h,S=r||!l,C;t[2]!==u||t[3]!==d?(C=e=>{u||(e.preventDefault(),p(!0),d())},t[2]=u,t[3]=d,t[4]=C):C=t[4];let w,T,E;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(w=(0,$.jsx)(g,{variant:`ghost`,size:`sm-multiline`,className:`min-h-14 w-full justify-start`}),T=(0,$.jsx)(i,{className:`size-4 text-muted-foreground`}),E=(0,$.jsx)(`span`,{className:`flex-1 text-left`,children:`P4 Connect`}),t[5]=w,t[6]=T,t[7]=E):(w=t[5],T=t[6],E=t[7]);let D=l?u?h?null:`Loading computers…`:`Sign in`:`Loading sign-in…`,O;t[8]===D?O=t[9]:(O=(0,$.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:D}),t[8]=D,t[9]=O);let k=f&&u&&`rotate-90`,A;t[10]===k?A=t[11]:(A=y(`size-4 text-muted-foreground`,k),t[10]=k,t[11]=A);let j;t[12]===A?j=t[13]:(j=(0,$.jsx)(m,{className:A}),t[12]=A,t[13]=j);let M;t[14]!==O||t[15]!==j||t[16]!==S||t[17]!==C?(M=(0,$.jsxs)(Oe,{disabled:S,onClick:C,render:w,children:[T,E,O,j]}),t[14]=O,t[15]=j,t[16]=S,t[17]=C,t[18]=M):M=t[18];let N;t[19]!==n||t[20]!==s||t[21]!==u||t[22]!==o||t[23]!==a?(N=u?(0,$.jsx)(Fe,{primaryEnvironmentId:null,savedEnvironments:s,showSavedEnvironments:!0,onDiscoveryReady:b,selection:{selectedIds:a,onChange:o,autoSelectedComputers:n},refreshWhileEmpty:!0,empty:(0,$.jsx)(`p`,{className:`py-3 text-sm text-muted-foreground`,children:`No computers linked yet.`})}):null,t[19]=n,t[20]=s,t[21]=u,t[22]=o,t[23]=a,t[24]=N):N=t[24];let P;t[25]===N?P=t[26]:(P=(0,$.jsx)(`div`,{className:`mb-3 space-y-1.5`,children:N}),t[25]=N,t[26]=P);let F,I,L;t[27]===Symbol.for(`react.memo_cache_sentinel`)?(F=(0,$.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Run this on each computer you want to connect.`}),I=(0,$.jsx)(he,{command:`npx @p4code/cli connect`,className:`mt-3`}),L=(0,$.jsx)(`p`,{className:`mt-3 text-xs text-muted-foreground`,children:`Keep P4 Code running. Select the computers you want to set up above.`}),t[27]=F,t[28]=I,t[29]=L):(F=t[27],I=t[28],L=t[29]);let R;t[30]===P?R=t[31]:(R=(0,$.jsx)(Ne,{keepMounted:!0,children:(0,$.jsxs)(`div`,{className:`px-3 pb-3`,children:[P,F,I,L]})}),t[30]=P,t[31]=R);let z;return t[32]!==M||t[33]!==R||t[34]!==x?(z=(0,$.jsx)(`div`,{className:`rounded-lg border border-border bg-background`,children:(0,$.jsxs)(Te,{open:x,onOpenChange:p,children:[M,R]})}),t[32]=M,t[33]=R,t[34]=x,t[35]=z):z=t[35],z}function vt(e){let t=(0,Q.c)(37),{isPairing:n,setIsPairing:r,onPaired:i}=e,a;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(a={reportFailure:!1},t[0]=a):a=t[0];let o=ae(we,a),[s,c]=(0,Z.useState)(``),[l,u]=(0,Z.useState)(``),d=(0,Z.useRef)(!0),f,p;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(f=()=>(d.current=!0,()=>{d.current=!1}),p=[],t[1]=f,t[2]=p):(f=t[1],p=t[2]),(0,Z.useEffect)(f,p);let h;t[3]!==o||t[4]!==n||t[5]!==i||t[6]!==s||t[7]!==r?(h=async()=>{if(n||s.trim().length===0)return;r(!0),u(``);let e=await o({pairingUrl:s.trim()});if(!d.current)return;if(r(!1),e._tag===`Success`){i(e.value);return}if(I(e))return;let t=P(e);u(t instanceof Error?t.message:`Pairing failed.`)},t[3]=o,t[4]=n,t[5]=i,t[6]=s,t[7]=r,t[8]=h):h=t[8];let _=h,v;t[9]===_?v=t[10]:(v=e=>{e.preventDefault(),_()},t[9]=_,t[10]=v);let y;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,$.jsx)(`label`,{className:`block text-sm text-muted-foreground`,htmlFor:`onboarding-pairing-url`,children:`Pairing link`}),t[11]=y):y=t[11];let b=l.length>0,x=l?`onboarding-pairing-error`:void 0,S;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(S=e=>c(e.currentTarget.value),t[12]=S):S=t[12];let C;t[13]!==n||t[14]!==s||t[15]!==b||t[16]!==x?(C=(0,$.jsxs)(`div`,{children:[y,(0,$.jsx)(ue,{id:`onboarding-pairing-url`,autoFocus:!0,"aria-invalid":b,"aria-describedby":x,className:`mt-2`,size:`lg`,autoCapitalize:`none`,autoComplete:`off`,autoCorrect:`off`,spellCheck:!1,nativeInput:!0,readOnly:n,placeholder:`https://your-server:5230/pair#token=…`,value:s,onChange:S,onKeyDown:yt})]}),t[13]=n,t[14]=s,t[15]=b,t[16]=x,t[17]=C):C=t[17];let w;t[18]===l?w=t[19]:(w=l?(0,$.jsx)(xe,{id:`onboarding-pairing-error`,variant:`error`,children:(0,$.jsx)(be,{children:l})}):null,t[18]=l,t[19]=w);let T;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(T=(0,$.jsxs)(Oe,{type:`button`,className:`group flex items-center gap-1 text-sm text-muted-foreground hover:text-foreground`,children:[(0,$.jsx)(m,{className:`size-3.5 group-data-panel-open:rotate-90`}),`Need a pairing link?`]}),t[20]=T):T=t[20];let E;t[21]!==n||t[22]!==s?(E=n||s.trim().length===0,t[21]=n,t[22]=s,t[23]=E):E=t[23];let D=n?`Pairing...`:`Pair`,O;t[24]!==E||t[25]!==D?(O=(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[T,(0,$.jsx)(g,{type:`submit`,disabled:E,children:D})]}),t[24]=E,t[25]=D,t[26]=O):O=t[26];let k,A;t[27]===Symbol.for(`react.memo_cache_sentinel`)?(k=(0,$.jsxs)(`p`,{className:`pt-3 text-sm text-muted-foreground`,children:[`On the computer with your code, start P4 Code or run`,` `,(0,$.jsx)(`code`,{className:`font-mono`,children:`npx @p4code/cli serve`}),`, then run:`]}),A=(0,$.jsx)(he,{command:`npx @p4code/cli pair`,className:`mt-2`}),t[27]=k,t[28]=A):(k=t[27],A=t[28]);let j;t[29]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,$.jsxs)(Ne,{children:[k,A,(0,$.jsxs)(`p`,{className:`mt-2 text-xs leading-relaxed text-muted-foreground`,children:[`On a tailnet, run `,(0,$.jsx)(`code`,{className:`font-mono`,children:`npx @p4code/cli pair --tailscale`}),` `,`instead.`]})]}),t[29]=j):j=t[29];let M;t[30]===O?M=t[31]:(M=(0,$.jsxs)(Te,{children:[O,j]}),t[30]=O,t[31]=M);let N;return t[32]!==C||t[33]!==w||t[34]!==M||t[35]!==v?(N=(0,$.jsx)($.Fragment,{children:(0,$.jsxs)(`form`,{className:`space-y-3`,onSubmit:v,children:[C,w,M]})}),t[32]=C,t[33]=w,t[34]=M,t[35]=v,t[36]=N):N=t[36],N}function yt(e){e.key===`Enter`&&(e.nativeEvent.isComposing||e.keyCode===229)&&e.preventDefault()}var bt=[`codex`,`claudeAgent`];function xt(e){let t=(0,Q.c)(13),{environmentIds:n,onContinue:r}=e,{environments:i}=ee(),a;if(t[0]!==n||t[1]!==i){let e;t[3]===i?e=t[4]:(e=e=>(0,$.jsx)(St,{environmentId:e,machineLabel:i.find(t=>t.environmentId===e)?.label??`Computer`},e),t[3]=i,t[4]=e),a=n.map(e),t[0]=n,t[1]=i,t[2]=a}else a=t[2];let o;t[5]===a?o=t[6]:(o=(0,$.jsx)(de,{scrollFade:!0,className:`mt-5 h-auto max-h-[min(32rem,55dvh)]`,children:(0,$.jsx)(`div`,{className:`space-y-5 pr-3`,children:a})}),t[5]=a,t[6]=o);let s;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,$.jsx)(v,{className:`size-3.5`}),t[7]=s):s=t[7];let c;t[8]===r?c=t[9]:(c=(0,$.jsx)(`div`,{className:`mt-6 flex justify-end`,children:(0,$.jsxs)(g,{autoFocus:!0,onClick:r,children:[`Continue`,s]})}),t[8]=r,t[9]=c);let l;return t[10]!==o||t[11]!==c?(l=(0,$.jsxs)(Yt,{title:`Connect your agents`,description:`Choose an agent to start coding. You can add more later.`,children:[o,c]}),t[10]=o,t[11]=c,t[12]=l):l=t[12],l}function St(e){let t=(0,Q.c)(57),{environmentId:n,machineLabel:r}=e,i;t[0]===n?i=t[1]:(i=Y.providersValueAtom(n),t[0]=n,t[1]=i);let o=a(i),s;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(s={reportFailure:!1},t[2]=s):s=t[2];let c=ae(Y.refreshProviders,s),l;t[3]===n?l=t[4]:(l=Y.configValueAtom(n),t[3]=n,t[4]=l);let u=a(l),[d,f]=(0,Z.useState)(null),[p,m]=(0,Z.useState)(!1),[h,_]=(0,Z.useState)(null),v=ne(n,E),y,b;t[5]!==n||t[6]!==c?(y=()=>{c({environmentId:n,input:{}})},b=[n,c],t[5]=n,t[6]=c,t[7]=y,t[8]=b):(y=t[7],b=t[8]),(0,Z.useEffect)(y,b);let x;t[9]===o?x=t[10]:(x=Ue(o),t[9]=o,t[10]=x);let S=x,C,w,T,D;if(t[11]!==S||t[12]!==v||t[13]!==h||t[14]!==n||t[15]!==r||t[16]!==o||t[17]!==u||t[18]!==d?.driver){let e;t[23]!==S||t[24]!==o?(e=e=>{let t=e===`codex`?o?.filter(t=>t.driver===e):void 0;return t?.length?t.map(t=>({driver:e,provider:t,instanceId:t.instanceId})):[{driver:e,provider:S.get(e),instanceId:S.get(e)?.instanceId}]},t[23]=S,t[24]=o,t[25]=e):e=t[25];let i=bt.flatMap(e);if(h){let e;t[26]===h?e=t[27]:(e=e=>e.instanceId===h.instanceId,t[26]=h,t[27]=e);let n=i.findIndex(e),[r]=n>=0?i.splice(n,1):[];i.unshift(r??{driver:`codex`,provider:void 0,instanceId:h.instanceId})}t[28]===r?D=t[29]:(D=(0,$.jsx)(`h2`,{className:`mb-2 text-sm font-medium`,children:r}),t[28]=r,t[29]=D),t[30]===v?C=t[31]:(C=v?null:(0,$.jsx)(`p`,{className:`mb-2 text-sm text-muted-foreground`,children:`This connection cannot control terminals.`}),t[30]=v,t[31]=C),w=`space-y-1.5`;let a;t[32]!==v||t[33]!==h||t[34]!==n||t[35]!==u||t[36]!==d?.driver?(a=e=>{let{driver:t,provider:r,instanceId:i}=e;return t===`codex`&&u!==null?(0,$.jsx)(Tt,{environmentId:n,provider:r,serverConfig:u,createdAccount:i===h?.instanceId?h:null,onAutoStartConsumed:()=>_(wt),terminalOpen:d?.driver===t,onOpenTerminal:()=>{r!==void 0&&X(n,`terminal:operate`)&&f({environmentId:n,driver:t,providerInstanceId:r.instanceId,cwd:u.cwd,command:r.installed?He(r,u.settings,u.environment.platform.os):Ye(t,u.environment.platform.os),keybindings:u.keybindings})}},i??t):(0,$.jsx)(Et,{driver:t,provider:r,terminalOpen:d?.driver===t,terminalAvailable:u!==null&&v,onOpenTerminal:()=>{r!==void 0&&u!==null&&X(n,`terminal:operate`)&&f({environmentId:n,driver:t,providerInstanceId:r.instanceId,cwd:u.cwd,command:r.installed?He(r,u.settings,u.environment.platform.os):Ye(t,u.environment.platform.os),keybindings:u.keybindings})}},t)},t[32]=v,t[33]=h,t[34]=n,t[35]=u,t[36]=d?.driver,t[37]=a):a=t[37],T=i.map(a),t[11]=S,t[12]=v,t[13]=h,t[14]=n,t[15]=r,t[16]=o,t[17]=u,t[18]=d?.driver,t[19]=C,t[20]=w,t[21]=T,t[22]=D}else C=t[19],w=t[20],T=t[21],D=t[22];let O;t[38]!==w||t[39]!==T?(O=(0,$.jsx)(`div`,{className:w,children:T}),t[38]=w,t[39]=T,t[40]=O):O=t[40];let k;t[41]===o?k=t[42]:(k=o?.some(Ct)?(0,$.jsx)(`div`,{className:`mt-3`,children:(0,$.jsx)(g,{size:`xs`,variant:`ghost-muted`,onClick:()=>m(!0),children:`Connect another ChatGPT account`})}):null,t[41]=o,t[42]=k);let A;t[43]!==p||t[44]!==n?(A=p?(0,$.jsx)(Ke,{environmentId:n,onClose:()=>m(!1),onAccountCreated:(e,t)=>_({instanceId:e,displayName:t,autoStart:!0})}):null,t[43]=p,t[44]=n,t[45]=A):A=t[45];let j;t[46]!==n||t[47]!==c||t[48]!==d?(j=d===null?null:(0,$.jsx)(Dt,{session:d,onClose:()=>{f(null),c({environmentId:n,input:{}})}},`${d.environmentId}:${d.providerInstanceId}:${d.driver}`),t[46]=n,t[47]=c,t[48]=d,t[49]=j):j=t[49];let M;return t[50]!==C||t[51]!==O||t[52]!==k||t[53]!==A||t[54]!==j||t[55]!==D?(M=(0,$.jsxs)(`section`,{children:[D,C,O,k,A,j]}),t[50]=C,t[51]=O,t[52]=k,t[53]=A,t[54]=j,t[55]=D,t[56]=M):M=t[56],M}function Ct(e){return e.driver===`codex`&&Ge(e)===`ready`}function wt(e){return e?{...e,autoStart:!1}:null}function Tt(e){let t=(0,Q.c)(28),{createdAccount:n,onAutoStartConsumed:r,environmentId:i,provider:a,serverConfig:o,terminalOpen:s,onOpenTerminal:c}=e,l=ne(i,E),u=ae(Y.updateSettings,`Codex setup settings`),d;t[0]!==n?.instanceId||t[1]!==a?.instanceId?(d=n?.instanceId??a?.instanceId??T(C.make(`codex`)),t[0]=n?.instanceId,t[1]=a?.instanceId,t[2]=d):d=t[2];let f=d,p=o.settings,m;t[3]!==n||t[4]!==f||t[5]!==p.providerInstances?(m=p.providerInstances[f]??{driver:C.make(`codex`),config:n?{enabled:!0,setupMode:`managed`}:{}},t[3]=n,t[4]=f,t[5]=p.providerInstances,t[6]=m):m=t[6];let h=m,g;t[7]===h.config?g=t[8]:(g=Je(h.config),t[7]=h.config,t[8]=g);let _=g,v=_===`existing`&&h.config!==null&&typeof h.config==`object`&&`setupMode`in h.config&&h.config.setupMode===`existing`,y;t[9]!==i||t[10]!==h||t[11]!==f||t[12]!==p||t[13]!==u?(y=e=>{u({environmentId:i,input:{patch:Ve({settings:p,instanceId:f,instance:{...h,enabled:!0,config:{...h.config!==null&&typeof h.config==`object`?h.config:{},enabled:!0,setupMode:e}}})}})},t[9]=i,t[10]=h,t[11]=f,t[12]=p,t[13]=u,t[14]=y):y=t[14];let b=y,x;return t[15]!==l||t[16]!==b||t[17]!==n?.autoStart||t[18]!==n?.displayName||t[19]!==i||t[20]!==v||t[21]!==f||t[22]!==_||t[23]!==r||t[24]!==c||t[25]!==a||t[26]!==s?(x=v?(0,$.jsx)(Et,{driver:`codex`,provider:a,terminalOpen:s,terminalAvailable:l,onOpenTerminal:c}):(0,$.jsx)(We,{presentation:`onboarding`,autoStart:n?.autoStart===!0,displayName:n?.displayName,onAutoStartConsumed:r,environmentId:i,instanceId:f,provider:a,mode:_,enabled:a?.enabled??!0,onModeChange:b}),t[15]=l,t[16]=b,t[17]=n?.autoStart,t[18]=n?.displayName,t[19]=i,t[20]=v,t[21]=f,t[22]=_,t[23]=r,t[24]=c,t[25]=a,t[26]=s,t[27]=x):x=t[27],x}function Et(e){let t=(0,Q.c)(29),{driver:n,provider:r,terminalOpen:i,terminalAvailable:a,onOpenTerminal:o}=e,l;t[0]===n?l=t[1]:(l=Se.get(C.make(n)),t[0]=n,t[1]=l);let u=l,d=r?.displayName||(n===`claudeAgent`?`Claude Code`:u?.label??n),f;t[2]===r?f=t[3]:(f=qe(r),t[2]=r,t[3]=f);let p=f,m;t[4]===r?m=t[5]:(m=Ge(r),t[4]=r,t[5]=m);let h=m,_;t[6]===n?_=t[7]:(_=C.make(n),t[6]=n,t[7]=_);let v;t[8]!==d||t[9]!==_?(v=(0,$.jsx)(Ce,{driverKind:_,displayName:d,iconClassName:`size-5`}),t[8]=d,t[9]=_,t[10]=v):v=t[10];let y;t[11]===d?y=t[12]:(y=(0,$.jsx)(`span`,{className:`block text-sm font-medium text-foreground`,children:d}),t[11]=d,t[12]=y);let b=h===`ready`?`Ready to code.`:p.headline,x=h!==`ready`&&p.detail?` · ${p.detail}`:``,S;t[13]!==b||t[14]!==x?(S=(0,$.jsxs)(`p`,{className:`mt-0.5 text-xs leading-relaxed break-words whitespace-pre-wrap text-muted-foreground`,children:[b,x]}),t[13]=b,t[14]=x,t[15]=S):S=t[15];let w;t[16]!==y||t[17]!==S?(w=(0,$.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[y,S]}),t[16]=y,t[17]=S,t[18]=w):w=t[18];let T;t[19]!==o||t[20]!==h||t[21]!==p||t[22]!==a||t[23]!==i?(T=(0,$.jsx)(`div`,{className:`shrink-0`,children:h===`ready`?(0,$.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 text-xs font-medium text-success-foreground`,children:[(0,$.jsx)(c,{className:`size-3.5`}),`Ready`]}):h===`checking`?(0,$.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`Checking...`}):h===`disabled`?(0,$.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`Disabled`}):h===`attention`?(0,$.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:p.headline}):(0,$.jsxs)(g,{size:`xs`,variant:`ghost`,onClick:o,disabled:i||!a,children:[(0,$.jsx)(s,{className:`size-3.5`}),h===`signIn`?`Sign in`:`Install`]})}),t[19]=o,t[20]=h,t[21]=p,t[22]=a,t[23]=i,t[24]=T):T=t[24];let E;return t[25]!==w||t[26]!==T||t[27]!==v?(E=(0,$.jsxs)(`div`,{className:`flex items-center gap-3 rounded-lg border border-border bg-background px-4 py-4`,children:[v,w,T]}),t[25]=w,t[26]=T,t[27]=v,t[28]=E):E=t[28],E}function Dt(e){let t=(0,Q.c)(60),{session:n,onClose:r}=e,{command:i,cwd:a,driver:o,environmentId:s,keybindings:c,providerInstanceId:u}=n,d=ne(s,E),[p]=l(je,!1,S),m;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(m={reportFailure:!1},t[0]=m):m=t[0];let _=ae(ve.open,m),v;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(v={reportFailure:!1},t[1]=v):v=t[1];let y=ae(ve.write,v),b;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(b={reportFailure:!1},t[2]=b):b=t[2];let x=ae(ve.close,b),C;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(C=Promise.resolve(),t[3]=C):C=t[3];let w=(0,Z.useRef)(C),T=(0,Z.useRef)(0),D=(0,Z.useRef)(null),O;t[4]===o?O=t[5]:(O=()=>`onboarding-${o}-${h()}`,t[4]=o,t[5]=O);let[k]=(0,Z.useState)(O),A;t[6]===s?A=t[7]:(A=f(s,dt),t[6]=s,t[7]=A);let j=A,[M,N]=(0,Z.useState)(0),[P,F]=(0,Z.useState)(`preparing`),I=P===`ready`||P===`writeFailed`,L;t[8]!==x||t[9]!==i||t[10]!==a||t[11]!==s||t[12]!==_||t[13]!==u||t[14]!==k||t[15]!==y?(L=()=>{let e=T.current+1;return T.current=e,D.current=e,F(`preparing`),w.current=w.current.then(async()=>{if(D.current!==e)return;if(!X(s,`terminal:operate`)){F(`openFailed`);return}if((await _({environmentId:s,input:{threadId:dt,terminalId:k,cwd:a,providerInstanceId:u}}))._tag!==`Success`){D.current===e&&F(`openFailed`);return}if(D.current!==e)return;if(!X(s,`terminal:operate`)){F(`writeFailed`);return}let t=await y({environmentId:s,input:{threadId:dt,terminalId:k,data:i}});D.current===e&&F(t._tag===`Success`?`ready`:`writeFailed`)}),()=>{D.current===e&&(D.current=null),w.current=w.current.then(async()=>{X(s,`terminal:operate`)&&await x({environmentId:s,input:{threadId:dt,terminalId:k,deleteHistory:!0}})})}},t[8]=x,t[9]=i,t[10]=a,t[11]=s,t[12]=_,t[13]=u,t[14]=k,t[15]=y,t[16]=L):L=t[16];let R;t[17]!==x||t[18]!==i||t[19]!==a||t[20]!==s||t[21]!==_||t[22]!==u||t[23]!==M||t[24]!==k||t[25]!==y?(R=[x,i,a,s,_,u,M,k,y],t[17]=x,t[18]=i,t[19]=a,t[20]=s,t[21]=_,t[22]=u,t[23]=M,t[24]=k,t[25]=y,t[26]=R):R=t[26],(0,Z.useEffect)(L,R);let z;t[27]!==d||t[28]!==i||t[29]!==P?(z=d?P===`writeFailed`?(0,$.jsxs)($.Fragment,{children:[`Run `,(0,$.jsx)(`code`,{className:`rounded bg-muted px-1 font-mono`,children:i}),` in this terminal.`]}):P===`ready`?`Review the command, then press Enter to run it.`:P===`openFailed`?`Could not open the setup terminal.`:`Preparing command...`:`This connection cannot control terminals.`,t[27]=d,t[28]=i,t[29]=P,t[30]=z):z=t[30];let B;t[31]===z?B=t[32]:(B=(0,$.jsx)(`span`,{className:`text-2xs font-medium text-muted-foreground`,children:z}),t[31]=z,t[32]=B);let V;t[33]!==d||t[34]!==s||t[35]!==P?(V=P===`openFailed`?(0,$.jsx)(g,{size:`xs`,variant:`ghost`,disabled:!d,onClick:()=>{X(s,`terminal:operate`)&&N(Ot)},children:`Retry`}):null,t[33]=d,t[34]=s,t[35]=P,t[36]=V):V=t[36];let H;t[37]===r?H=t[38]:(H=(0,$.jsx)(g,{size:`xs`,variant:`ghost-muted`,onClick:r,children:`Close`}),t[37]=r,t[38]=H);let U;t[39]!==V||t[40]!==H?(U=(0,$.jsxs)(`div`,{className:`flex items-center gap-1`,children:[V,H]}),t[39]=V,t[40]=H,t[41]=U):U=t[41];let W;t[42]!==B||t[43]!==U?(W=(0,$.jsxs)(`div`,{className:`flex items-center justify-between border-b border-border/60 bg-background/60 px-3 py-1.5`,children:[B,U]}),t[42]=B,t[43]=U,t[44]=W):W=t[44];let G;t[45]!==p||t[46]!==a||t[47]!==o||t[48]!==c||t[49]!==r||t[50]!==u||t[51]!==k||t[52]!==I||t[53]!==j?(G=I?(0,$.jsx)(_e,{threadRef:j,threadId:dt,terminalId:k,terminalLabel:`Install ${o}`,cwd:a,providerInstanceId:u,advancedTypography:p,onSessionExited:r,focusRequestId:1,autoFocus:!0,visible:!0,resizeEpoch:0,drawerHeight:256,keybindings:c}):null,t[45]=p,t[46]=a,t[47]=o,t[48]=c,t[49]=r,t[50]=u,t[51]=k,t[52]=I,t[53]=j,t[54]=G):G=t[54];let K;t[55]===G?K=t[56]:(K=(0,$.jsx)(`div`,{className:`h-64`,children:G}),t[55]=G,t[56]=K);let q;return t[57]!==W||t[58]!==K?(q=(0,$.jsxs)(`div`,{"data-thread-terminal-drawer":!0,className:`mt-4 overflow-hidden rounded-lg border border-border/70 bg-background text-foreground`,children:[W,K]}),t[57]=W,t[58]=K,t[59]=q):q=t[59],q}function Ot(e){return e+1}var kt=`This connection cannot import projects or thread history.`;function At(e){let t=(0,Q.c)(85),{scans:n,importSelection:r,onImportSelectionChange:i,isImporting:a,setIsImporting:s,onDone:c}=e,{environments:l}=ee(),u=re(n,A),d;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(d={reportFailure:!1},t[0]=d):d=t[0];let f=ae(H.create,d),p;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(p={reportFailure:!1},t[1]=p):p=t[1];let m=ae(ot,p),h=(0,Z.useRef)(``),v=(0,Z.useRef)(0),y;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(y=new Map,t[2]=y):y=t[2];let b=(0,Z.useRef)(y),x;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(x=new Map,t[3]=x):x=t[3];let S=(0,Z.useRef)(x),C;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(C=[],t[4]=C):C=t[4];let w=(0,Z.useRef)(C),T;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(T=new Map,t[5]=T):T=t[5];let E=(0,Z.useRef)(T),D=(0,Z.useRef)(0),k,j;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(k=()=>(D.current+=1,()=>{D.current+=1}),j=[],t[6]=k,t[7]=j):(k=t[6],j=t[7]),(0,Z.useEffect)(k,j);let M;t[8]===n?M=t[9]:(M=Qe(n.flatMap(Bt)),t[8]=n,t[9]=M);let{available:N,recent:P}=M,F;t[10]===P?F=t[11]:(F=new Set(P.map(zt)),t[10]=P,t[11]=F);let L=F,R;if(t[12]!==N||t[13]!==r||t[14]!==L){let e;t[16]!==r||t[17]!==L?(e=e=>r?.environmentIds.has(e.environmentId)?r.keys.has(e.key):L.has(e.key),t[16]=r,t[17]=L,t[18]=e):e=t[18],R=N.filter(e),t[12]=N,t[13]=r,t[14]=L,t[15]=R}else R=t[15];let z=R,B;t[19]===z?B=t[20]:(B=new Set(z.map(Rt)),t[19]=z,t[20]=B);let V=B,K;t[21]!==i||t[22]!==n?(K=e=>i({environmentIds:new Set(n.flatMap(Lt)),keys:e}),t[21]=i,t[22]=n,t[23]=K):K=t[23];let q=K,J;if(t[24]!==z||t[25]!==u){let e;t[27]===u?e=t[28]:(e=e=>u.has(e.environmentId),t[27]=u,t[28]=e),J=z.every(e),t[24]=z,t[25]=u,t[26]=J}else J=t[26];let te=J,[Y,ne]=(0,Z.useState)(``),X=te?Y===kt?``:Y:kt,ie;t[29]!==c||t[30]!==s?(ie=()=>{let e=nt(w.current,S.current,b.current);if(e===void 0){c(void 0,h.current,v.current);return}s(!0);let t=D.current;U(e).then(()=>e,It).then(async e=>{t===D.current&&(await c(e,h.current,v.current)||s(!1))})},t[29]=c,t[30]=s,t[31]=ie):ie=t[31];let oe=ie,se;t[32]!==f||t[33]!==oe||t[34]!==m||t[35]!==a||t[36]!==c||t[37]!==n||t[38]!==s?(se=async e=>{if(a)return;let t=()=>e.every(Ft),r=()=>{s(!1),ne(kt)};if(!t()){r();return}if(e.length===0){c();return}s(!0),h.current=``,v.current=0,w.current=e.map(Pt);let i=D.current,l=b.current,u=E.current,d=l.size>0?e.filter(e=>l.has(e.key)).length:0,p=0,g=0,y=new Set;for(let n of e){let{environmentId:e}=n;if(i!==D.current||l!==b.current)return;if(!t()){r();return}if(l.has(n.key))continue;let a=tt(W(),e,n);if(a===null){let t=u.get(n.key);if(t===void 0){let e=_();t={projectId:e,commandId:O.make(`onboarding:project:create:${e}`)},u.set(n.key,t)}a=t.projectId;let r=await f({environmentId:e,input:{projectId:a,commandId:t.commandId,title:n.title,workspaceRoot:n.path,createWorkspaceRootIfMissing:!1,defaultModelSelection:null}});if(i!==D.current||l!==b.current)return;if(r._tag!==`Success`){I(r)||(u.delete(n.key),y.add(e));continue}}if(!t()){r();return}let s=await m({environmentId:e,input:{projectId:a,expectedWorkspaceRoot:n.path}});if(i!==D.current||l!==b.current)return;s._tag===`Success`?(p+=s.value.importedCount,g+=s.value.skippedCount,s.value.importedCount>0&&S.current.set(n.key,o(e,a)),s.value.skippedCount===0&&(d+=1,l.set(n.key,o(e,a)))):I(s)||(u.delete(n.key),y.add(e))}for(let e of n)y.has(e.environmentId)&&e.refresh();s(!1),v.current=p,d<e.length&&(p>0&&g>0?h.current=`Imported ${p} ${p===1?`thread`:`threads`}. ${g} ${g===1?`thread`:`threads`} could not be imported.`:g>0?h.current=`${g} ${g===1?`thread could`:`threads could`} not be imported.`:p>0?h.current=`Imported ${p} ${p===1?`thread`:`threads`}. Some thread history could not be imported.`:h.current=`Could not import thread history.`),oe()},t[32]=f,t[33]=oe,t[34]=m,t[35]=a,t[36]=c,t[37]=n,t[38]=s,t[39]=se):se=t[39];let ce=se;if(n.every(Nt)&&n.some(Mt)){let e;t[40]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(`h1`,{className:`text-2xl font-semibold tracking-tight text-foreground`,children:`Your projects`}),t[40]=e):e=t[40];let n;t[41]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,$.jsxs)(`div`,{className:`flex flex-1 flex-col items-center justify-center gap-3 py-6`,children:[(0,$.jsx)(G,{size:`lg`,tone:`muted`}),(0,$.jsx)(`p`,{className:`text-center text-sm text-muted-foreground`,children:`Looking for projects from Claude Code and Codex…`})]}),t[41]=n):n=t[41];let r;return t[42]===c?r=t[43]:(r=(0,$.jsxs)(`div`,{className:`flex h-full min-h-40 flex-col`,children:[e,n,(0,$.jsx)(`div`,{className:`flex justify-end`,children:(0,$.jsx)(g,{variant:`ghost-muted`,onClick:()=>void c(),children:`Do not import projects`})})]}),t[42]=c,t[43]=r),r}let le;t[44]!==N||t[45]!==a||t[46]!==z.length||t[47]!==q?(le=N.length>0?(0,$.jsxs)(`div`,{className:`mt-5 flex items-center justify-between gap-3 text-xs text-muted-foreground`,children:[(0,$.jsxs)(`span`,{role:`status`,children:[z.length,` of `,N.length,` selected`]}),(0,$.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,$.jsx)(g,{variant:`ghost`,size:`xs`,disabled:a||z.length===N.length,onClick:()=>q(new Set(N.map(jt))),children:`Select all`}),(0,$.jsx)(g,{variant:`ghost`,size:`xs`,disabled:a||z.length===0,onClick:()=>q(new Set),children:`Select none`})]})]}):null,t[44]=N,t[45]=a,t[46]=z.length,t[47]=q,t[48]=le):le=t[48];let ue;if(t[49]!==N||t[50]!==l||t[51]!==a||t[52]!==n||t[53]!==V||t[54]!==q){let e;t[56]!==N||t[57]!==l||t[58]!==a||t[59]!==n.length||t[60]!==V||t[61]!==q?(e=e=>{let t=N.filter(t=>t.environmentId===e.environmentId),r=l.find(t=>t.environmentId===e.environmentId)?.label??`Computer`;return(0,$.jsxs)(`fieldset`,{className:`min-w-0 space-y-0.5`,disabled:a,children:[n.length>1?(0,$.jsx)(`legend`,{className:`mb-2 text-sm font-medium`,children:r}):null,e.isPending&&e.data===null?(0,$.jsxs)(`div`,{className:`flex items-center gap-2 py-3 text-sm text-muted-foreground`,children:[(0,$.jsx)(G,{size:`md`}),`Looking for projects…`]}):e.error===null?t.length===0?(0,$.jsx)(`p`,{className:`py-2 text-sm text-muted-foreground`,children:`No existing Claude Code or Codex projects found.`}):null:(0,$.jsxs)(`div`,{role:`alert`,className:`flex items-center justify-between gap-3 text-sm text-muted-foreground`,children:[(0,$.jsxs)(`span`,{children:[`Could not check projects. `,e.error]}),(0,$.jsx)(g,{variant:`ghost`,size:`sm`,onClick:e.refresh,children:`Retry`})]}),e.data?.truncated?(0,$.jsx)(`p`,{className:`text-xs text-muted-foreground`,role:`status`,children:pt}):null,(0,$.jsx)(Vt,{candidates:t,selectedKeys:V,onSelectionChange:q})]},e.environmentId)},t[56]=N,t[57]=l,t[58]=a,t[59]=n.length,t[60]=V,t[61]=q,t[62]=e):e=t[62],ue=n.map(e),t[49]=N,t[50]=l,t[51]=a,t[52]=n,t[53]=V,t[54]=q,t[55]=ue}else ue=t[55];let fe;t[63]===ue?fe=t[64]:(fe=(0,$.jsx)(de,{scrollFade:!0,className:`mt-2 h-auto max-h-80`,children:(0,$.jsx)(`div`,{className:`space-y-5 pr-3`,children:ue})}),t[63]=ue,t[64]=fe);let pe;t[65]===X?pe=t[66]:(pe=X?(0,$.jsx)(`p`,{className:`mt-3 text-sm text-destructive`,children:X}):null,t[65]=X,t[66]=pe);let me;t[67]!==oe||t[68]!==a?(me=(0,$.jsx)(g,{variant:`ghost-muted`,disabled:a,onClick:oe,children:`Do not import projects`}),t[67]=oe,t[68]=a,t[69]=me):me=t[69];let he=!te||a||z.length===0,ge;t[70]!==ce||t[71]!==z?(ge=()=>void ce(z),t[70]=ce,t[71]=z,t[72]=ge):ge=t[72];let _e=a?`Importing…`:`Import ${z.length} ${z.length===1?`project`:`projects`}`,ve;t[73]!==he||t[74]!==ge||t[75]!==_e?(ve=(0,$.jsx)(g,{autoFocus:!0,disabled:he,onClick:ge,children:_e}),t[73]=he,t[74]=ge,t[75]=_e,t[76]=ve):ve=t[76];let ye;t[77]!==me||t[78]!==ve?(ye=(0,$.jsxs)(`div`,{className:`mt-6 flex flex-wrap items-center justify-end gap-3`,children:[me,ve]}),t[77]=me,t[78]=ve,t[79]=ye):ye=t[79];let be;return t[80]!==le||t[81]!==fe||t[82]!==pe||t[83]!==ye?(be=(0,$.jsxs)(Yt,{title:`Import your projects`,description:`Import projects and conversations from Claude Code and Codex on your selected computers.`,children:[le,fe,pe,ye]}),t[80]=le,t[81]=fe,t[82]=pe,t[83]=ye,t[84]=be):be=t[84],be}function jt(e){return e.key}function Mt(e){return e.isPending}function Nt(e){return e.data===null}function Pt(e){return e.key}function Ft(e){return X(e.environmentId,A)}function It(){}function Lt(e){return e.data===null?[]:[e.environmentId]}function Rt(e){return e.key}function zt(e){return e.key}function Bt(e){return(e.data?.candidates??[]).map(t=>({...t,environmentId:e.environmentId,key:it(e.environmentId,t.path)}))}function Vt(e){let t=(0,Q.c)(25),{candidates:n,selectedKeys:r,onSelectionChange:i}=e,a;t[0]===n?a=t[1]:(a=et(n),t[0]=n,t[1]=a);let{repositories:o,other:s}=a,c;t[2]!==i||t[3]!==r?(c=(e,t)=>{let n=new Set(r);for(let r of e)t?n.add(r):n.delete(r);i(n)},t[2]=i,t[3]=r,t[4]=c):c=t[4];let l=c,u;if(t[5]!==s||t[6]!==r){let e;t[8]===r?e=t[9]:(e=e=>r.has(e.key),t[8]=r,t[9]=e),u=s.filter(e),t[5]=s,t[6]=r,t[7]=u}else u=t[7];let d=u.length,f;if(t[10]!==o||t[11]!==r||t[12]!==l){let e;t[14]!==r||t[15]!==l?(e=e=>(0,$.jsx)(Ut,{group:e,selectedKeys:r,onToggle:l},e.key),t[14]=r,t[15]=l,t[16]=e):e=t[16],f=o.map(e),t[10]=o,t[11]=r,t[12]=l,t[13]=f}else f=t[13];let p;t[17]!==s||t[18]!==d||t[19]!==r||t[20]!==l?(p=s.length>0?(0,$.jsxs)(Te,{children:[(0,$.jsxs)(`div`,{className:`flex items-center gap-2.5 rounded-md px-2 py-1.5 hover:bg-muted/40`,children:[(0,$.jsx)(ge,{checked:d===s.length,indeterminate:d>0&&d<s.length,onCheckedChange:e=>l(s.map(Ht),e===!0)}),(0,$.jsxs)(Oe,{className:`group flex min-w-0 flex-1 items-center gap-1.5 text-left`,children:[(0,$.jsx)(m,{className:`size-3.5 shrink-0 text-muted-foreground transition-transform group-data-panel-open:rotate-90`}),(0,$.jsx)(`span`,{className:`truncate text-sm text-muted-foreground`,children:`Other folders`}),(0,$.jsxs)(`span`,{className:`ml-auto shrink-0 text-xs text-muted-foreground tabular-nums`,children:[s.length,` `,s.length===1?`folder`:`folders`]})]})]}),(0,$.jsx)(Ne,{children:s.map(e=>(0,$.jsx)(qt,{candidate:e,path:e.path,nested:!0,checked:r.has(e.key),onCheckedChange:t=>l([e.key],t)},e.key))})]}):null,t[17]=s,t[18]=d,t[19]=r,t[20]=l,t[21]=p):p=t[21];let h;return t[22]!==f||t[23]!==p?(h=(0,$.jsxs)($.Fragment,{children:[f,p]}),t[22]=f,t[23]=p,t[24]=h):h=t[24],h}function Ht(e){return e.key}function Ut(e){let t=(0,Q.c)(53),{group:n,selectedKeys:r,onToggle:i}=e,a,o;if(t[0]!==n.candidates||t[1]!==r){a=n.candidates.map(Gt);let e;t[4]===r?e=t[5]:(e=e=>r.has(e),t[4]=r,t[5]=e),o=a.filter(e),t[0]=n.candidates,t[1]=r,t[2]=a,t[3]=o}else a=t[2],o=t[3];let s=o.length,c=n.candidates.length===1,l=n.candidates[0];if(c&&l!==void 0){let e=n.label,a=l.path,o;t[6]!==l.key||t[7]!==r?(o=r.has(l.key),t[6]=l.key,t[7]=r,t[8]=o):o=t[8];let s;t[9]!==i||t[10]!==l.key?(s=e=>i([l.key],e),t[9]=i,t[10]=l.key,t[11]=s):s=t[11];let c;return t[12]!==n.label||t[13]!==l||t[14]!==o||t[15]!==s?(c=(0,$.jsx)(qt,{candidate:l,label:e,path:a,checked:o,onCheckedChange:s}),t[12]=n.label,t[13]=l,t[14]=o,t[15]=s,t[16]=c):c=t[16],c}let u=s===a.length,d=s>0&&s<a.length,f;t[17]!==a||t[18]!==i?(f=e=>i(a,e===!0),t[17]=a,t[18]=i,t[19]=f):f=t[19];let p;t[20]!==u||t[21]!==d||t[22]!==f?(p=(0,$.jsx)(ge,{checked:u,indeterminate:d,onCheckedChange:f}),t[20]=u,t[21]=d,t[22]=f,t[23]=p):p=t[23];let h;t[24]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,$.jsx)(m,{className:`size-3.5 shrink-0 text-muted-foreground transition-transform group-data-panel-open:rotate-90`}),t[24]=h):h=t[24];let g;t[25]===n.label?g=t[26]:(g=(0,$.jsx)(`span`,{className:`truncate text-sm font-medium`,children:n.label}),t[25]=n.label,t[26]=g);let _;t[27]===n.candidates?_=t[28]:(_=new Set(n.candidates.flatMap(Wt)),t[27]=n.candidates,t[28]=_);let v;t[29]===_?v=t[30]:(v=[..._],t[29]=_,t[30]=v);let y;t[31]!==n.lastActiveAt||t[32]!==n.threadCount||t[33]!==v?(y=(0,$.jsx)(Jt,{sources:v,threadCount:n.threadCount,lastActiveAt:n.lastActiveAt}),t[31]=n.lastActiveAt,t[32]=n.threadCount,t[33]=v,t[34]=y):y=t[34];let b;t[35]!==y||t[36]!==g?(b=(0,$.jsxs)(Oe,{className:`group flex min-w-0 flex-1 items-center gap-1.5 text-left`,children:[h,g,y]}),t[35]=y,t[36]=g,t[37]=b):b=t[37];let x;t[38]!==b||t[39]!==p?(x=(0,$.jsxs)(`div`,{className:`flex items-center gap-2.5 rounded-md px-2 py-1.5 hover:bg-muted/40`,children:[p,b]}),t[38]=b,t[39]=p,t[40]=x):x=t[40];let S;if(t[41]!==n.candidates||t[42]!==i||t[43]!==r){let e;t[45]!==i||t[46]!==r?(e=e=>(0,$.jsx)(qt,{candidate:e,path:e.path,nested:!0,checked:r.has(e.key),onCheckedChange:t=>i([e.key],t)},e.key),t[45]=i,t[46]=r,t[47]=e):e=t[47],S=n.candidates.map(e),t[41]=n.candidates,t[42]=i,t[43]=r,t[44]=S}else S=t[44];let C;t[48]===S?C=t[49]:(C=(0,$.jsx)(Ne,{children:S}),t[48]=S,t[49]=C);let w;return t[50]!==x||t[51]!==C?(w=(0,$.jsxs)(Te,{defaultOpen:!0,children:[x,C]}),t[50]=x,t[51]=C,t[52]=w):w=t[52],w}function Wt(e){return e.sources}function Gt(e){return e.key}function Kt(e){let t=(0,Q.c)(12),{path:n,className:r}=e,i;t[0]===n?i=t[1]:(i=rt(n),t[0]=n,t[1]=i);let{name:a,parent:o}=i,s;t[2]===r?s=t[3]:(s=y(`flex min-w-0 items-baseline font-mono`,r),t[2]=r,t[3]=s);let c;t[4]===o?c=t[5]:(c=o.length>0?(0,$.jsx)(`span`,{className:`truncate`,children:o}):null,t[4]=o,t[5]=c);let l;t[6]===a?l=t[7]:(l=(0,$.jsx)(`span`,{className:`max-w-full shrink-0 truncate`,children:a}),t[6]=a,t[7]=l);let u;return t[8]!==s||t[9]!==c||t[10]!==l?(u=(0,$.jsxs)(`span`,{className:s,children:[c,l]}),t[8]=s,t[9]=c,t[10]=l,t[11]=u):u=t[11],u}function qt(e){let t=(0,Q.c)(30),{candidate:n,label:r,path:i,nested:a,checked:o,onCheckedChange:s}=e,c=a!==void 0&&a,l=c&&`pl-8`,u;t[0]===l?u=t[1]:(u=y(`flex cursor-pointer items-center gap-2.5 rounded-md px-2 py-1.5 hover:bg-muted/40 has-disabled:cursor-default`,l),t[0]=l,t[1]=u);let d;t[2]===s?d=t[3]:(d=e=>s(e===!0),t[2]=s,t[3]=d);let f;t[4]!==o||t[5]!==d?(f=(0,$.jsx)(ge,{checked:o,onCheckedChange:d}),t[4]=o,t[5]=d,t[6]=f):f=t[6];let p;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,$.jsx)(`span`,{className:`flex min-w-0 flex-1 items-baseline gap-2 truncate`}),t[7]=p):p=t[7];let m;t[8]===r?m=t[9]:(m=r===void 0?null:(0,$.jsx)(`span`,{className:`truncate text-sm font-medium`,children:r}),t[8]=r,t[9]=m);let h;t[10]!==r||t[11]!==i?(h=i===void 0?null:(0,$.jsx)(Kt,{path:i,className:r===void 0?`text-xs`:`text-2xs text-muted-foreground`}),t[10]=r,t[11]=i,t[12]=h):h=t[12];let g;t[13]!==m||t[14]!==h?(g=(0,$.jsxs)(se,{render:p,children:[m,h]}),t[13]=m,t[14]=h,t[15]=g):g=t[15];let _;t[16]===n.path?_=t[17]:(_=(0,$.jsx)(ce,{variant:`code`,children:n.path}),t[16]=n.path,t[17]=_);let v;t[18]!==_||t[19]!==g?(v=(0,$.jsxs)(le,{children:[g,_]}),t[18]=_,t[19]=g,t[20]=v):v=t[20];let b=c?null:n.sources,x;t[21]!==n.lastActiveAt||t[22]!==n.threadCount||t[23]!==b?(x=(0,$.jsx)(Jt,{sources:b,threadCount:n.threadCount,lastActiveAt:n.lastActiveAt}),t[21]=n.lastActiveAt,t[22]=n.threadCount,t[23]=b,t[24]=x):x=t[24];let S;return t[25]!==v||t[26]!==x||t[27]!==u||t[28]!==f?(S=(0,$.jsxs)(`label`,{className:u,children:[f,v,x]}),t[25]=v,t[26]=x,t[27]=u,t[28]=f,t[29]=S):S=t[29],S}function Jt(e){let t=(0,Q.c)(19),{sources:n,threadCount:r,lastActiveAt:i}=e,a;t[0]===i?a=t[1]:(a=i===null?null:oe(i),t[0]=i,t[1]=a);let o=a,s=o===null?``:o.suffix===null?`now`:o.value,c;t[2]===n?c=t[3]:(c=n?.includes(`claudeAgent`)?(0,$.jsx)(`span`,{role:`img`,"aria-label":`Claude Code`,children:(0,$.jsx)(Ce,{driverKind:C.make(`claudeAgent`),displayName:`Claude Code`,iconClassName:`size-3`})}):null,t[2]=n,t[3]=c);let l;t[4]===c?l=t[5]:(l=(0,$.jsx)(`span`,{className:`flex size-4 items-center justify-center`,children:c}),t[4]=c,t[5]=l);let u;t[6]===n?u=t[7]:(u=n?.includes(`codex`)?(0,$.jsx)(`span`,{role:`img`,"aria-label":`Codex`,children:(0,$.jsx)(Ce,{driverKind:C.make(`codex`),displayName:`Codex`,iconClassName:`size-3`})}):null,t[6]=n,t[7]=u);let d;t[8]===u?d=t[9]:(d=(0,$.jsx)(`span`,{className:`flex size-4 items-center justify-center`,children:u}),t[8]=u,t[9]=d);let f;t[10]===r?f=t[11]:(f=(0,$.jsx)(`span`,{className:`text-right`,children:r}),t[10]=r,t[11]=f);let p;t[12]===s?p=t[13]:(p=(0,$.jsx)(`span`,{className:`text-right whitespace-nowrap`,children:s}),t[12]=s,t[13]=p);let m;return t[14]!==l||t[15]!==d||t[16]!==f||t[17]!==p?(m=(0,$.jsxs)(`span`,{className:`ml-auto grid shrink-0 grid-cols-[1rem_1rem_2.5rem_2.25rem] items-center gap-x-1 text-xs text-muted-foreground tabular-nums`,children:[l,d,f,p]}),t[14]=l,t[15]=d,t[16]=f,t[17]=p,t[18]=m):m=t[18],m}function Yt(e){let t=(0,Q.c)(8),{title:n,description:r,children:i}=e,a;t[0]===n?a=t[1]:(a=(0,$.jsx)(`h1`,{className:`text-2xl font-semibold tracking-tight text-foreground`,children:n}),t[0]=n,t[1]=a);let o;t[2]===r?o=t[3]:(o=r?(0,$.jsx)(`p`,{className:`mt-2.5 text-sm leading-relaxed text-muted-foreground`,children:r}):null,t[2]=r,t[3]=o);let s;return t[4]!==i||t[5]!==a||t[6]!==o?(s=(0,$.jsxs)($.Fragment,{children:[a,o,i]}),t[4]=i,t[5]=a,t[6]=o,t[7]=s):s=t[7],s}var Xt=j(D);function Zt(){let e=(0,Q.c)(14),{authGateState:t}=Me.useRouteContext(),n=K(),r;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r={select:$t},e[0]=r):r=e[0];let i=q(r),a;e[1]===i?a=e[2]:(a=i.startsWith(`agents:`)?N(Xt(i.slice(7))):void 0,e[1]=i,e[2]=a);let o=a,s;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(s={select:Qt},e[3]=s):s=e[3];let c=q(s),[l,u]=(0,Z.useState)(!1),d=ye(),f=t.status===`authenticated`,p;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,$.jsx)(ze,{}),e[4]=p):p=e[4];let m;e[5]!==l||e[6]!==c||e[7]!==f||e[8]!==n||e[9]!==d||e[10]!==o?(m=c&&!l?(0,$.jsx)(mt,{localAvailable:f,resumeEnvironmentId:o,onDone:async e=>{u(!0),e===void 0?await n({to:`/`,replace:!0}):await d(e,{replace:!0}).catch(()=>n({to:`/`,replace:!0}))}}):null,e[5]=l,e[6]=c,e[7]=f,e[8]=n,e[9]=d,e[10]=o,e[11]=m):m=e[11];let h;return e[12]===m?h=e[13]:(h=(0,$.jsxs)($.Fragment,{children:[p,m]}),e[12]=m,e[13]=h),h}function Qt(e){return e.pathname===`/welcome`}function $t(e){return e.hash}export{Zt as component};
|
|
2
|
+
//# sourceMappingURL=welcome-CmsT2lJW.js.map
|
package/dist/client/index.html
CHANGED
|
@@ -384,7 +384,7 @@
|
|
|
384
384
|
</script>
|
|
385
385
|
<style>html,body,#root{width:100%;height:100%;margin:0}body{color:#262626;background:#fff;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,system-ui,sans-serif}html.dark body{color:#f5f5f5;background:#0a0a0a}#boot-shell{background:inherit;min-height:100%;color:inherit;justify-content:center;align-items:center;display:flex;position:relative;overflow:hidden}html[data-theme-selected=true] #boot-shell{background:var(--boot-background);color:var(--boot-foreground)}#boot-shell-card{z-index:1;justify-content:center;align-items:center;width:96px;height:96px;display:flex;position:relative}#boot-shell-logo{object-fit:contain;width:64px;height:64px}#boot-error{text-align:center;justify-items:center;gap:16px;max-width:600px;padding:24px;display:grid}#boot-error p{overflow-wrap:anywhere;margin:0}#boot-error button{color:inherit;font:inherit;cursor:pointer;background:0 0;border:1px solid;border-radius:4px;padding:8px 16px}</style>
|
|
386
386
|
<title>P4 Code</title>
|
|
387
|
-
<script type="module" crossorigin src="/assets/index-
|
|
387
|
+
<script type="module" crossorigin src="/assets/index-DQKD4Lk2.js"></script>
|
|
388
388
|
</head>
|
|
389
389
|
<body>
|
|
390
390
|
<div id="root">
|
|
@@ -62128,7 +62128,7 @@ const writeFileStringAtomically = (input) => scoped(gen(function* () {
|
|
|
62128
62128
|
yield* fs.rename(tempPath, targetPath);
|
|
62129
62129
|
}));
|
|
62130
62130
|
// package.json
|
|
62131
|
-
var version = "0.9.
|
|
62131
|
+
var version = "0.9.24";
|
|
62132
62132
|
// src/auth/ServerSecretStore.ts
|
|
62133
62133
|
const secretStoreErrorContext = {
|
|
62134
62134
|
resource: String$2,
|
|
@@ -101581,4 +101581,4 @@ function normalizePreviewUrl(rawUrl) {
|
|
|
101581
101581
|
}
|
|
101582
101582
|
export { deriveThreadFromProviderThread as $, BUILT_IN_THEME_IDS as $a, run as $c, isNetworkPath as $i, Mac as $l, fromReadable as $n, buildSelectOptionDescriptor as $o, resolveSignalEndpoint as $r, SpawnExecutableResolution as $s, resolveAutoFeatureBranchName as $t, BackgroundGitWork as A, injectMcpAppCookieBootstrap as Aa, Terminal as Ac, parseBase64DataUrl as Ai, nextIntBetween as Al, ServiceLauncherClient as An, readOnly as Ao, version as Ar, RotatingFileSink as As, terminalSessionsTotal as At, fail$2 as Au, removeLinkedWorktree as B, HTML_RENDER_THEME_GUIDE as Ba, map$2 as Bc, chatMarkdownImageSources as Bi, isGreaterThanOrEqualTo as Bl, layer$53 as Bn, serviceStateHasPendingUpdate as Bo, resolveStaticDir as Br, formatCodexModelName as Bs, layer$33 as Bt, snapshotUnsafe as Bu, formatPatch as C, P4_MCP_TOOL_NAMES as Ca, InvokedAs as Cc, parseThreadSegmentFromAttachmentId as Ci, invalidateAll as Cl, layer$45 as Cn, PersistenceSqlError as Co, SecretStoreConcurrentReadError as Cr, causeErrorTag as Cs, providerTurnDuration as Ct, layerWebCrypto$6 as Cu, SourceControlRateLimit as D, MCP_APP_MIME_TYPE as Da, WorkingDirectory as Dc, sweepStalePendingAttachments as Di, refresh as Dl, layerIdentity as Dn, findOneOption as Do, isSecretAlreadyExistsError as Dr, makeLocalFileTracer as Ds, secretRefsConsumedTotal as Dt, importedAlgorithm as Du, Interactive as E, MCP_APP_MAX_HTML_BYTES as Ea, UserId as Ec, resolveAttachmentPathById as Ei, makeWith$2 as El, layer$48 as En, findAll as Eo, ServerSecretStore as Er, layerOtlpSerialization as Es, rpcRequestsTotal as Et, copyBytes as Eu, PATCH_RENDER_PREFIX_ARGS as F, readMcpAppPermissions as Fa, make$61 as Fc, turnItemUpdateCanEndBackgroundWork as Fi, modify$1 as Fl, layer$52 as Fn, compareExactServiceVersions as Fo, deriveServerPaths as Fr, parseSemver as Fs, withCommandMetrics as Ft, runWithReference as Fu, layer$23 as G, htmlRenderThemeFragment as Ga, is as Gc, codes as Gi, ed25519 as Gl, GrokSettings as Gn, pinnedRuntimePaths as Go, resolveServerBackgroundActivitySettings as Gr, modelSelectionCommandType as Gs, detectSourceControlProviderFromGitRemoteUrl as Gt, resolveProjectSettings as H, blankNonMarkup as Ha, SpanPropagationEnabled as Hc, remarkGfm as Hi, ecdsaP256 as Hl, PiSettings as Hn, ensurePinnedRuntimeInstalled as Ho, resolveReviewGuideModelSelection as Hr, getModelSelectionStringOptionValue as Hs, layer$34 as Ht, withAttributes as Hu, makeIsServerInternalPath as I, HTML_RENDER_LAYOUT_GUIDE as Ia, modify as Ic, latestExecutedRun as Ii, set$2 as Il, writeAllToFileDescriptor as In, decodeServiceLauncherChildMessage as Io, ensureServerDirectories as Ir, satisfiesSemverRange as Is, withMetrics as It, WebCrypto as Iu, layer$24 as J, compileResolvedKeybindingRule as Ja, value as Jc, isAttachmentOnlyBootstrapPrompt as Ji, rsaPkcs1v15 as Jl, AcpRegistrySettings as Jn, layer$62 as Jo, fromJsonStringPretty as Jr, readCustomModelEntries as Js, isTemporaryWorktreeBranch as Jt, planThreadDeletion as K, injectHtmlRenderBootstrap as Ka, tag as Kc, longestStreak as Ki, family as Kl, FxSettings as Kn, pinnedRuntimeVersionsDir as Ko, decodeJsonResult as Kr, modelSelectionsEqual as Ks, flattenTemporaryWorktreeBranchName as Kt, extractBranchNameFromRemoteRef as L, HTML_RENDER_MAX_HEIGHT as La, modifyEffect as Lc, latestRootProviderFailure as Li, update$1 as Ll, subscribeBeforeSnapshot as Ln, isExactServiceVersion as Lo, layer$55 as Lr, applyClaudePromptEffortPrefix as Ls, normalizeModelMetricLabel as Lt, CryptoError as Lu, layer$21 as M, injectMcpAppThemeBootstrap as Ma, Stdio as Mc, backgroundWorkHoldsCompletion as Mi, getAndSet as Ml, runServicePreflight as Mn, SERVICE_RESTART_PENDING_FILE as Mo, DEFAULT_PORT as Mr, OtlpSerialization as Ms, webhookDeliveryDuration as Mt, notExtractable as Mu, VcsProcess as N, mcpAppToolCallableByApp as Na, make$60 as Nc, derivePendingBackgroundWork as Ni, getAndUpdate as Nl, layer$51 as Nn, SERVICE_STATE_FILE as No, RuntimeMode as Nr, layerJson as Ns, webhookHeldDelay as Nt, rehome as Nu, layer$20 as O, MCP_APP_OUTPUT_KEY as Oa, isWindows as Oc, toSafeThreadAttachmentSegment as Oi, set$1 as Ol, ServerSelfUpdate as On, void_ as Oo, isSecretStoreError as Or, makeTraceSink as Os, secretRequestsTotal as Ot, makeBytes as Ou, layer$22 as P, readMcpAppCsp as Pa, get as Pc, pendingBackgroundTurnItems as Pi, make$69 as Pl, DesktopTelemetryReceiver as Pn, SERVICE_STOP_MARKER_FILE as Po, ServerConfig as Pr, compareSemverVersions as Ps, webhookRunsTotal as Pt, run$1 as Pu, derive as Q, parseKeybindingWhenExpression as Qa, make$65 as Qc, isExplicitRelativePath as Qi, secretFamily as Ql, MaxBytesError as Qn, buildBooleanOptionDescriptor as Qo, none as Qr, CommandResolutionCache as Qs, parseOriginUrlFromGitConfig as Qt, isFilesystemRoot as R, HTML_RENDER_MEASURE_FONTS as Ra, set as Rc, runRanAfter as Ri, updateAndGet as Rl, subscribeBeforeSnapshotWithoutMutex as Rn, parseServiceState as Ro, make$52 as Rr, codexModelFamily as Rs, make$36 as Rt, InvalidArgument as Ru, FILE_HEADERS_ONLY as S, toolOutputImages as Sa, Hostname as Sc, parseAttachmentUuid as Si, invalidate as Sl, layer$38 as Sn, PersistenceDecodeError as So, resolveRootCliCommand as Sr, OtlpProtocol as Ss, providerSessionsTotal as St, SecureRandom as Su, unquoteGitPatchPath as T, MCP_APP_EXTENSION_ID as Ta, Platform as Tc, resolveAttachmentPath as Ti, make$68 as Tl, ServerEnvironmentIdentity as Tn, makeLiveStreamBudget as To, SecretStoreEncodeError as Tr, errorTag as Ts, rpcRequestDuration as Tt, uuidV4Unsafe as Tu, resolveWorktreeCleanup as U, clampHtmlRenderHeight as Ua, isSqlError as Uc, types as Ui, ecdsaP384 as Ul, OpenCodeSettings as Un, launcherOwnsVersionsDir as Uo, resolveSourceControlWriterModelSelection as Ur, getProviderOptionCurrentValue as Us, make$38 as Ut, hasProjectSettingsOverrides as V, HTML_RENDER_TOOL_NAME as Va, SqlClient as Vc, formatThreadLink as Vi, Signature as Vl, redactServerSettingsForClient as Vn, PinnedRuntimeInstallError as Vo, parsePersistedServerObservabilitySettings as Vr, getModelSelectionBooleanOptionValue as Vs, RepositoryIdentityResolver as Vt, update$2 as Vu, ProjectService as W, htmlRenderTheme as Wa, exhaustive as Wc, constants as Wi, ecdsaP521 as Wl, MuseSettings as Wn, pinnedRuntimeCommand as Wo, getBackgroundActivityPresetSettings as Wr, getProviderOptionDescriptors as Ws, buildTemporaryWorktreeBranchName as Wt, layer$25 as X, mergeWithDefaultKeybindings as Xa, awaitEmpty as Xc, remapComposerContextAttachments as Xi, family$1 as Xl, encode$1 as Xn, COMPACT_SLASH_COMMAND as Xo, layerResourceAttributes as Xr, withLegacyUltracodeEffort as Xs, normalizeGitRemoteUrl as Xt, LegacyV1ThreadImporter as Y, compileResolvedKeybindingsConfig as Ya, when as Yc, projectComposerContextForProvider as Yi, rsaPss as Yl, decode as Yn, AUTH_PROBE_TIMEOUT_MS as Yo, fromLenientJson as Yr, resolvePromptInjectedEffort as Ys, mergeGitStatusParts as Yt, IdAllocatorV2 as Z, parseKeybindingShortcut as Za, clear as Zc, markdownDestinationHostPath as Zi, layerWebCrypto$1 as Zl, isNdjsonError as Zn, DEFAULT_TIMEOUT_MS$4 as Zo, load as Zr, collectUint8StreamText as Zs, parseGitHubRepositoryNameWithOwnerFromRemoteUrl as Zt, layer$6 as _, MAX_TOOL_OUTPUT_IMAGE_BASE64_LENGTH as _a, Architecture as _c, chatAttachmentStableKey as _i, withDefault as _l, expandHomePath as _n, sourceControlRepositorySelector as _o, isAgentActivityPublishingEnabledValue as _r, resolveProviderMaintenanceCapabilitiesEffect as _s, layer$32 as _t, exportKey as _u, normalizePreviewUrl as a, unified as aa, resolveCommandPath as ac, applyToProjection as ai, NonEmptyString as al, WorkspacePathOutsideRootError as an, resolveThreadPullRequestChains as ao, CLOUD_LINKED_USER_ID as ar, parseGenericCliVersion as as, ProjectStoreV2 as at, timingSafeEqual as au, firstNonEmptyLine as b, readToolOutputImage as ba, ExecutablePath as bc, createPendingAttachmentId as bi, getOption as bl, tokenizeCliArgs as bn, OrchestrationEventStore as bo, resolveCliCommand as br, DEFAULT_SIGNAL_EXPORT as bs, orchestrationEffectClaimsTotal as bt, layerWebCrypto$4 as bu, rejectCommandsDuringClone as c, markdownLineEnding as ca, withPathDirectoryListings as cc, threadShellFromProjection as ci, Record as cl, WorkspaceRootNotDirectoryError as cn, threadPullRequestsOf as co, HOLD_WEBHOOKS_WHILE_OFFLINE_SECRET as cr, enrichProviderSnapshotWithVersionAdvisory as cs, PROCESS_BOUND_EFFECT_TYPES as ct, sha1 as cu, SourceControlProviderRegistry as d, boundFileChangeForStorage as da, CLI_RELEASE_BASE_URL_ENV as dc, THREAD_HISTORY_SNAPSHOT_ROW_LIMIT as di, URL$1 as dl, isWithinRoot as dn, parseChangeRequestUrl as do, RELAY_ISSUER_SECRET as dr, makePackageManagedProviderMaintenanceResolver as ds, layerPruneWorker as dt, sha512 as du, isUncPath as ea, isCommandAvailable as ec, NetService as ei, runtime as el, sanitizeBranchFragment as en, P4_CODE_DARK_THEME_COLORS as eo, pipeThroughDuplex as er, buildServerProvider as es, layer$26 as et, hmacSha256 as eu, layer$2 as f, capProjectionCheckpointFilesForWire as fa, CLI_RELEASE_CHANNELS as fc, buildBoundedThreadProjection as fi, all$4 as fl, layer$37 as fn, siblingPullRequestUrl as fo, RELAY_URL_SECRET as fr, makeProviderMaintenanceCapabilities as fs, ServerActivation as ft, decode$2 as fu, layer$5 as g, threadStreamEventItem as ga, layer$64 as gc, attachmentRelativePath as gi, schema as gl, resolveClaudeConfigDirPath as gn, isSshRemoteUrl as go, encodeEndpointRuntimeConfigJson as gr, resolveMiseProviderMaintenance as gs, layerFromApplicationReceipts as gt, layerWebCrypto$3 as gu, VcsDriverRegistry as h, projectTurnItemForDetail as ha, RequestInit as hc, attachmentFileExtension as hi, option as hl, readClaudeSettingsEnv as hn, getChangeRequestTerminologyForKind as ho, encodeConfirmedOriginJson as hr, resolveLatestProviderVersion as hs, CommandReceiptStoreV2 as ht, family$2 as hu, newPreviewTabId as i, normalizeProjectPathForComparison as ia, readPathFromLaunchctl as ic, ProjectionStoreV2 as ii, LogLevel as il, layer$36 as in, normalizeThreadPullRequestKey as io, CLOUD_ENDPOINT_RUNTIME_CONFIG as ir, nonEmptyTrimmed as is, layer$28 as it, layerWebCryptoWith as iu, GitVcsDriver as j, injectMcpAppCsp as ja, isQuitError as jc, resolveAttachmentRelativePath as ji, get$2 as jl, layer$50 as jn, SERVICE_LAUNCHER_CONTEXT_ENV as jo, writeFileStringAtomically as jr, makeAsyncRotatingFileSink as js, webhookDeliveriesTotal as jt, invalidKey as ju, repositoryPathFromRemoteUrl as k, MCP_APP_RESOURCE_SCHEME as ka, QuitError as kc, inferImageExtension as ki, next$1 as kl, layer$49 as kn, layer$61 as ko, layer$54 as kr, redactCauseCredentials as ks, terminalRestartsTotal as kt, material as ku, SourceControlRepositoryService as l, markdownLineEndingOrSpace as la, make$57 as lc, InvalidThreadHistoryCursorError as li, Redacted as ll, WorkspaceRootNotExistsError as ln, visibleThreadPullRequests as lo, PUBLISH_AGENT_ACTIVITY_SECRET as lr, makeCachedProviderMaintenanceResolution as ls, REPLAY_SAFE_EFFECT_TYPES_AFTER_PROCESS_LOSS as lt, sha256 as lu, layer$3 as m, projectThreadProjectionForWire as ma, cliReleaseChannelOf as mc, PENDING_ATTACHMENT_THREAD_SEGMENT as mi, mapEffect as ml, discoverClaudeSkills as mn, detectSourceControlProviderFromRemoteUrl as mo, decodeRuntimeConfig as mr, normalizeCommandPath as ms, forkParkedFiber as mt, encode$2 as mu, isLoopbackHost as n, isWindowsDrivePath as na, mergePathEntries as nc, ProjectionMaintenanceV2 as ni, ConfigError as nl, ProjectFaviconResolver as nn, UNPUBLISHABLE_THEME_IDS as no, toUint8Array as nr, isCommandMissingCause as ns, EventSinkV2 as nt, hmacSha512 as nu, ProjectCloneTracker as o, remarkParse as oa, resolveSpawnCommand as oc, emptyProjection as oi, Number$1 as ol, WorkspacePaths as on, threadPullRequestKeyOf as oo, CLOUD_LINK_REVOKED as or, providerModelsFromSettings as os, layer$29 as ot, Digest as ou, BUILT_IN_SOURCE_CONTROL_DRIVERS as p, projectDomainEventForWire as pa, cliReleaseChannelIndexUrl as pc, decodeThreadHistoryCursor as pi, map$3 as pl, claudeLaunchArgDirectories as pn, canonicalRepositoryKey as po, decodeConfirmedOrigin as pr, makeTargetedProviderUpdateAction as ps, forkParked as pt, decodeString$1 as pu, ThreadCommandExecutor as q, DEFAULT_KEYBINDINGS as qa, tags as qc, assistantCitationsToPlainText as qi, layerWebCrypto as ql, CursorSettings as qn, ProcessRunner as qo, extractJsonObject as qr, normalizeModelSlug as qs, formatGeneratedBranchName as qt, isPreviewUrlNormalizationError as r, newProjectFolderName as ra, readEnvironmentFromLoginShell as rc, layer$57 as ri, Int as rl, layer$35 as rn, legacyThreadPullRequestKey as ro, CLOUD_ENDPOINT_CONFIRMED_ORIGIN as rr, isWindowsCommandNotFound as rs, layerFromStores as rt, key$1 as ru, layer as s, factorySpace as sa, resolveWindowsEnvironment as sc, layer$58 as si, Port as sl, WorkspaceRootCreateFailedError as sn, threadPullRequestKeysEqual as so, CLOUD_MINT_PUBLIC_KEY as sr, spawnAndCollect as ss, EffectOutboxV2 as st, nameSuffix as su, LSOF_LOCAL_HOST_TOKENS as t, isWindowsAbsolutePath as ta, listLoginShellCandidates as tc, layer$56 as ti, Boolean$1 as tl, sanitizeFeatureBranchName as tn, P4_CODE_LIGHT_THEME_COLORS as to, toArrayBuffer as tr, collectStreamAsString as ts, randomUuidV4 as tt, hmacSha384 as tu, layer$1 as u, ok$1 as ua, ChildProcessSpawner as uc, THREAD_HISTORY_PAGE_POLICY as ui, String$1 as ul, WorkspaceRootStatFailedError as un, changeRequestUrlFor as uo, RELAY_ENVIRONMENT_CREDENTIAL_SECRET as ur, makeManualOnlyProviderMaintenanceCapabilities as us, layer$30 as ut, sha384 as uu, GitHubCredentials as v, mcpAppFromToolItem as va, Arguments as vc, createAttachmentId as vi, SourceError as vl, require_dist as vn, layer$59 as vo, readHoldWebhooksWhileOffline as vr, ProviderLatestVersions as vs, increment as vt, importPrivate as vu, structuredPatch as w, resolveP4McpToolDefinition as wa, IsExecutable as wc, planAttachmentClaim as wi, keys$1 as wl, ServerEnvironment as wn, bufferLiveStream as wo, SecretStoreDecodeError as wr, decodeOtlpTraceRecords as ws, providerTurnsTotal as wt, make$72 as wu, PullRequestProviderError as x, toolOutputImageBlocks as xa, HomeDirectory as xc, parseAttachmentFileExtension as xi, getSuccess as xl, make$42 as xn, layer$60 as xo, resolveHostCliCommand as xr, OtlpHeadersFromString as xs, orchestrationEffectQueueWait as xt, layerWebCryptoWith$1 as xu, detailFromCause as y, mcpToolResultOutput as ya, Environment as yc, createDeterministicAttachmentId as yi, get$1 as yl, parseCliArgs as yn, layerFromOrchestrationEventStore as yo, readRelayConnection as yr, layer$63 as ys, metricAttributes as yt, importPublic as yu, managedWorktreesDirectories as z, HTML_RENDER_MEASURE_WIDTHS as za, update as zc, usageLimitBlockedRun as zi, getType as zl, ServerSettingsService as zn, serviceStateActiveVersion as zo, otlpResource as zr, createModelCapabilities as zs, ProjectEnrichmentService as zt, Unsupported as zu };
|
|
101583
101583
|
|
|
101584
|
-
//# sourceMappingURL=preview-
|
|
101584
|
+
//# sourceMappingURL=preview-iNdhUsAa.mjs.map
|