@p4code/cli 0.8.21 → 0.8.22
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/LICENSE +1 -1
- package/dist/{AcpMcpStdioBridge-BL9bAh79.mjs → AcpMcpStdioBridge-BuIIHL4p.mjs} +18 -18
- package/dist/{AcpMcpStdioBridge-DxwEM6O4.mjs → AcpMcpStdioBridge-BvUHCq9r.mjs} +1 -1
- package/dist/{Effect-B-zvTJgX.mjs → Effect-Dxd2t1f5.mjs} +34 -2
- package/dist/{Schema-inVr7S-v.mjs → Schema-CoZlakRf.mjs} +2 -2
- package/dist/{Stream-CX7G9D0M.mjs → Stream-CdSxHO_5.mjs} +2 -2
- package/dist/bin.mjs +4 -4
- package/dist/{binCli-7vuQm4vY.mjs → binCli-CfXLOppT.mjs} +3452 -2670
- package/dist/claude-history-worker.mjs +1 -1
- package/dist/{claudeHistoryWorker-BvaF6m2o.mjs → claudeHistoryWorker-js6Jgg9C.mjs} +2 -2
- package/dist/client/.vite/manifest.json +2211 -2211
- package/dist/client/assets/AlertDialogRoot-DCfR_LaK.js +2 -0
- package/dist/client/assets/{AnimatedHeight-B1LdeRxh.js → AnimatedHeight-DcrvwWWb.js} +2 -2
- package/dist/client/assets/{AuthSurfaceShell-BwoVNx9S.js → AuthSurfaceShell-CFBHG1UK.js} +2 -2
- package/dist/client/assets/{CSPContext-Bn8q5RdR.js → CSPContext-BP4s0CJv.js} +2 -2
- package/dist/client/assets/{ChatGptUsageButton-BKwNHMSp.js → ChatGptUsageButton-CoiZRjaS.js} +2 -2
- package/dist/client/assets/ChatMarkdown-C6I8N1IH.js +65 -0
- package/dist/client/assets/{CheckboxIndicator-DUUgNp1r.js → CheckboxIndicator-DcH9EpvK.js} +2 -2
- package/dist/client/assets/{CodexSetupSection.logic-CGR92Snb.js → CodexSetupSection.logic-sXohw-MK.js} +2 -2
- package/dist/client/assets/{CollapsiblePanel-D1aZAbsh.js → CollapsiblePanel-FknKvWoA.js} +2 -2
- package/dist/client/assets/{ComboboxClear-CMNv82AR.js → ComboboxClear-RsGmZUJN.js} +2 -2
- package/dist/client/assets/{ComboboxGroupLabel-BqpdqndG.js → ComboboxGroupLabel-DO1lnPnr.js} +2 -2
- package/dist/client/assets/{CommandBlock-BGFFySU3.js → CommandBlock-B5S9so33.js} +2 -2
- package/dist/client/assets/{ComposerPromptEditor-DlIuiQ2e.js → ComposerPromptEditor-C7ZRV_6P.js} +5 -5
- package/dist/client/assets/{CompositeRoot-BP063J4d.js → CompositeRoot-DDZcK2m0.js} +2 -2
- package/dist/client/assets/{ConnectionStatusDot-DvalNlEr.js → ConnectionStatusDot-Bz5Ps6Bm.js} +2 -2
- package/dist/client/assets/{DevicePanel-FC3DPqLr.js → DevicePanel-DmfTFNuU.js} +2 -2
- package/dist/client/assets/{DeviceSetup-ERWR4ZzH.js → DeviceSetup-Br_kHy6n.js} +2 -2
- package/dist/client/assets/{DialogTitle-OaePW-Ih.js → DialogTitle-Dr-LJLpq.js} +2 -2
- package/dist/client/assets/{DiffCommentAnnotation-YjjFdEbc.js → DiffCommentAnnotation-FcSG-wBG.js} +2 -2
- package/dist/client/assets/{DiffFileTree-DynXKsOn.js → DiffFileTree-IIdU6CqP.js} +2 -2
- package/dist/client/assets/{DiffPanel-BpuFnTQ7.js → DiffPanel-CEx8f_mo.js} +2 -2
- package/dist/client/assets/{DiffWorkerPoolProvider-DDWtmCyP.js → DiffWorkerPoolProvider-C_VbNhAr.js} +2 -2
- package/dist/client/assets/{EmbeddedDesign-B1fJ5Mbz.js → EmbeddedDesign-Hba9k7LF.js} +2 -2
- package/dist/client/assets/{EnvironmentMachineIcon-DszKXxD_.js → EnvironmentMachineIcon-b_kKEeAf.js} +2 -2
- package/dist/client/assets/{ExpandableText-hoL-6ubc.js → ExpandableText-anFaXhXF.js} +2 -2
- package/dist/client/assets/{FieldControl-DDVVfmpB.js → FieldControl-w2_zp1DT.js} +2 -2
- package/dist/client/assets/{FileDiff-BAjD8hTV.js → FileDiff-B-9keGlb.js} +2 -2
- package/dist/client/assets/{FilePreviewPanel-BjYyaBX0.js → FilePreviewPanel-C1f_ibuL.js} +3 -3
- package/dist/client/assets/{FoldedSettingsSection-CoyiJ_Zj.js → FoldedSettingsSection-gN3w1sSZ.js} +2 -2
- package/dist/client/assets/{FormContext-B0PXExmu.js → FormContext-BWWAKTFF.js} +2 -2
- package/dist/client/assets/{Icons-CX6xNdVb.js → Icons-DzTpHpn1.js} +2 -2
- package/dist/client/assets/Input-DCMTYdrA.js +2 -0
- package/dist/client/assets/{KeybindingsSettings.logic-6FRd2ilb.js → KeybindingsSettings.logic-D8LAdmvB.js} +2 -2
- package/dist/client/assets/{NoProjectsHero-A1VZ7ogx.js → NoProjectsHero-CtzChQ7p.js} +2 -2
- package/dist/client/assets/{T3ConnectAccountPages-Cfc33ihi.js → P4ConnectAccountPages-B3SBsg6B.js} +2 -2
- package/dist/client/assets/{T3ConnectSidebarSignIn-HRtCfmCk.js → P4ConnectSidebarSignIn-DKcaDv93.js} +2 -2
- package/dist/client/assets/PanelLayoutControls-CCYVBazN.js +216 -0
- package/dist/client/assets/{PierreEntryIcon-Ds39h2AA.js → PierreEntryIcon-CjZ8gyJq.js} +2 -2
- package/dist/client/assets/{PopoverHandle-DRjGw1Yt.js → PopoverHandle-1bqR8KHF.js} +2 -2
- package/dist/client/assets/{PreviewPanel-ChNkAjUz.js → PreviewPanel-Kq4mVufQ.js} +2 -2
- package/dist/client/assets/{ProjectDefaultsSettings-Df_lGEeD.js → ProjectDefaultsSettings-DUCUj4oc.js} +2 -2
- package/dist/client/assets/{ProjectFavicon-BtNx7IEw.js → ProjectFavicon-va5UQPLo.js} +3 -3
- package/dist/client/assets/{ProjectIconPickerDialog-CODB2BT9.js → ProjectIconPickerDialog-CN2gK_o7.js} +2 -2
- package/dist/client/assets/{ProjectMonogram-IuYJI7zN.js → ProjectMonogram-B3Dkc8yq.js} +2 -2
- package/dist/client/assets/{ProviderAuthTerminal-78p4XZgL.js → ProviderAuthTerminal-BSIgib7h.js} +2 -2
- package/dist/client/assets/{ProviderModelPicker-C3S7ixLD.js → ProviderModelPicker-BrEkNDPF.js} +2 -2
- package/dist/client/assets/{ProviderSettingsForm-j7_6yEo7.js → ProviderSettingsForm-D6zHGIeN.js} +2 -2
- package/dist/client/assets/{PullRequestCodeTab-DkUNpmvf.js → PullRequestCodeTab-DA-5pWeg.js} +2 -2
- package/dist/client/assets/{ReadOnlySourcePreview-kG5bicDV.js → ReadOnlySourcePreview-BSCVTdYH.js} +2 -2
- package/dist/client/assets/{RenderErrorBoundary-BbYl2ykS.js → RenderErrorBoundary-yWjbnzsc.js} +2 -2
- package/dist/client/assets/{ScheduledTasksSettings-YdKTaY5U.js → ScheduledTasksSettings-B1bSNXTP.js} +3 -3
- package/dist/client/assets/{ScopedSwitch-D9a9Wx-e.js → ScopedSwitch-D3fAHI1-.js} +2 -2
- package/dist/client/assets/{ScrollAreaCorner-Ck3L5tlH.js → ScrollAreaCorner-CNzfnpwK.js} +2 -2
- package/dist/client/assets/{SecretInput-UofV3Jxx.js → SecretInput-D7hYUoFA.js} +2 -2
- package/dist/client/assets/{SelectScrollUpArrow-C_YHAw_f.js → SelectScrollUpArrow-kQBsA9rk.js} +2 -2
- package/dist/client/assets/{SettingsPanels-BoUeQYqp.js → SettingsPanels-6SOZMWhg.js} +5 -5
- package/dist/client/assets/{SettingsPanels.logic-BE_JM5Fc.js → SettingsPanels.logic-CMErdEeV.js} +2 -2
- package/dist/client/assets/{SettingsScopeNotice-CHsOo_U6.js → SettingsScopeNotice-CyzbYUPJ.js} +2 -2
- package/dist/client/assets/ThemeEditorPanel-vZ4MSCBx.js +5 -0
- package/dist/client/assets/{ThreadTerminalDrawer-D_GQQ1Ly.js → ThreadTerminalDrawer-BU_DR6wu.js} +2 -2
- package/dist/client/assets/{TooltipViewport-B_Oz-gLq.js → TooltipViewport-CG7gtflQ.js} +2 -2
- package/dist/client/assets/{Virtualizer-DRAoNAc2.js → Virtualizer-CoK0zXAG.js} +2 -2
- package/dist/client/assets/{WorkspaceBreadcrumb-CpHuVRke.js → WorkspaceBreadcrumb-qAYKTgm8.js} +2 -2
- package/dist/client/assets/{WorkspacePageContainer-BQ0Bk5Qy.js → WorkspacePageContainer-D6i--Hwz.js} +2 -2
- package/dist/client/assets/{WorkspacePageHeader-Cx1gpU1l.js → WorkspacePageHeader-covOFYhv.js} +2 -2
- package/dist/client/assets/_chat-DMXSEEst.js +45 -0
- package/dist/client/assets/{_chat.index-T3ADOYa1.js → _chat.index-C3PnT6ae.js} +2 -2
- package/dist/client/assets/{_chat.new-egywwPr3.js → _chat.new-CxErZ7CC.js} +2 -2
- package/dist/client/assets/{_chat.pull-requests-CkgRG9UN.js → _chat.pull-requests-w2FCKIZ8.js} +2 -2
- package/dist/client/assets/{abnfDiagram-VCTEODGH-BctM0h9j.js → abnfDiagram-VCTEODGH-CWxKS58m.js} +2 -2
- package/dist/client/assets/{alert-CNni4aGm.js → alert-DsgAHDNi.js} +2 -2
- package/dist/client/assets/architecture-7GRP2DOG-BVExhwPq.js +1 -0
- package/dist/client/assets/{architectureDiagram-5GKGNRK7-T6dn-Aw8.js → architectureDiagram-5GKGNRK7-kc6KNP-H.js} +2 -2
- package/dist/client/assets/{assets-B_A7RkiF.js → assets-DW8sK93I.js} +2 -2
- package/dist/client/assets/{blockDiagram-I7D4REHJ-2KUW7DJ1.js → blockDiagram-I7D4REHJ-CFJYOAbd.js} +2 -2
- package/dist/client/assets/{browserHistoryStore-hEHIMltt.js → browserHistoryStore-DjDw15jq.js} +2 -2
- package/dist/client/assets/{browserLinkTarget-CdzL1FA-.js → browserLinkTarget-Br8BmA6w.js} +2 -2
- package/dist/client/assets/{c4Diagram-7LVT6UL2-1uZnjRIl.js → c4Diagram-7LVT6UL2-Sxaodxxv.js} +2 -2
- package/dist/client/assets/channel-BLnKdGtk.js +2 -0
- package/dist/client/assets/{checkbox-BpAfakhx.js → checkbox-D33R1soh.js} +2 -2
- package/dist/client/assets/{chunk-4HAMMTFA-DTdSC_bt.js → chunk-4HAMMTFA-CxocYFD0.js} +2 -2
- package/dist/client/assets/{chunk-75Z2AOVW-D8m_ip6d.js → chunk-75Z2AOVW-CBCO5Noa.js} +2 -2
- package/dist/client/assets/{chunk-DU6HZSFF-cx0FIxcU.js → chunk-DU6HZSFF-CEaklbmE.js} +2 -2
- package/dist/client/assets/{chunk-F27PBJKO-CLaT5xm4.js → chunk-F27PBJKO-Iw-0qjF9.js} +2 -2
- package/dist/client/assets/{chunk-GMAD6QVW-Dh_22wYw.js → chunk-GMAD6QVW-CbDVrypn.js} +2 -2
- package/dist/client/assets/{chunk-GVQU2GXP-Cl592Z8q.js → chunk-GVQU2GXP-BEqmpgLD.js} +2 -2
- package/dist/client/assets/{chunk-IMKFNOWR-b4olkqo9.js → chunk-IMKFNOWR-bgZmQWS5.js} +2 -2
- package/dist/client/assets/{chunk-L3NEJ4N5-C3zHyNed.js → chunk-L3NEJ4N5-LW_IXl13.js} +2 -2
- package/dist/client/assets/{chunk-OSK3NFVY-DfOyV50p.js → chunk-OSK3NFVY-DvGdSD7J.js} +2 -2
- package/dist/client/assets/{chunk-P2QGCYS3-CtwwhFBb.js → chunk-P2QGCYS3-BAXEcEik.js} +2 -2
- package/dist/client/assets/{chunk-POPQ4Y6H-Bn_dv1-6.js → chunk-POPQ4Y6H-yM2kH99r.js} +2 -2
- package/dist/client/assets/{chunk-PWAF6VOD-DB5x5BPu.js → chunk-PWAF6VOD-B19ZyrVH.js} +2 -2
- package/dist/client/assets/{chunk-SHT3W25Y-4SWCrL8G.js → chunk-SHT3W25Y-BhcwXJOc.js} +2 -2
- package/dist/client/assets/{chunk-SVP7TREG-B9UQB6rs.js → chunk-SVP7TREG-B9xbRF9R.js} +2 -2
- package/dist/client/assets/{chunk-TICWLB2K-I0Ma7uE4.js → chunk-TICWLB2K-D_VEGQbw.js} +2 -2
- package/dist/client/assets/classDiagram-ZZMXUADV-B839piSM.js +2 -0
- package/dist/client/assets/classDiagram-v2-VYDZK3BY-B839piSM.js +2 -0
- package/dist/client/assets/{color-picker-KVitc2gM.js → color-picker-D3b0sEoy.js} +2 -2
- package/dist/client/assets/{combobox-DiUoVqyf.js → combobox-DzFRsaks.js} +2 -2
- package/dist/client/assets/{command-CMR1n6Uf.js → command-IDMJ6pXc.js} +2 -2
- package/dist/client/assets/{composer-logic-D76QXdUM.js → composer-logic-CEsP6SV6.js} +2 -2
- package/dist/client/assets/{composerDraftUploads-Vg0GXwnb.js → composerDraftUploads-Qq0xOGEc.js} +2 -2
- package/dist/client/assets/{connect-C-gMnpNs.js → connect-BTIPE2au.js} +2 -2
- package/dist/client/assets/{connect-agent-C4zyA6ta.js → connect-agent-hbkOBaFx.js} +2 -2
- package/dist/client/assets/{cynefin-OW5HDTMX-BJCfymNy.js → cynefin-OW5HDTMX-CWOcHmwk.js} +1 -1
- package/dist/client/assets/{cynefinDiagram-5FMLGOSQ-Cxc8iWLh.js → cynefinDiagram-5FMLGOSQ-ksIfZeWS.js} +2 -2
- package/dist/client/assets/{dagre-GXQ25YYZ-DvjGFTC6.js → dagre-GXQ25YYZ-D7qz-Azr.js} +2 -2
- package/dist/client/assets/{design-Cvqy5-YM.js → design-B7V20I1i.js} +2 -2
- package/dist/client/assets/{device-CHTG1mA3.js → device-DX-G6J1j.js} +2 -2
- package/dist/client/assets/{diagram-S7CK7UJ4-DQ3d5nRG.js → diagram-S7CK7UJ4-IBhHReDK.js} +2 -2
- package/dist/client/assets/{diagram-UQ7AKVKN-Hzoc39HG.js → diagram-UQ7AKVKN-EX7tFJEV.js} +2 -2
- package/dist/client/assets/{diagram-VSXAHHWV-BiAz9eK3.js → diagram-VSXAHHWV-BEHOoBER.js} +2 -2
- package/dist/client/assets/{diagram-VX7I27RA-ZvxW6orI.js → diagram-VX7I27RA-Df_ThjhC.js} +2 -2
- package/dist/client/assets/{diagram-Z3DM3KII-DYVNNS6J.js → diagram-Z3DM3KII-DudywHX4.js} +2 -2
- package/dist/client/assets/{dialog-D--IO2tX.js → dialog-YpQOq7Ug.js} +2 -2
- package/dist/client/assets/{diffRendering-CH8Pp2NZ.js → diffRendering-CgLbOp0J.js} +2 -2
- package/dist/client/assets/{discovery-list-E9mW3ie9.js → discovery-list-CnlrZrDo.js} +2 -2
- package/dist/client/assets/{dist-D_us60iU.js → dist-usNgCtd_.js} +3 -3
- package/dist/client/assets/{draft-input-BqhTvFTz.js → draft-input-DW6EgVbF.js} +2 -2
- package/dist/client/assets/{duoViewer-C1ysZzHj.js → duoViewer-CgVOZcYe.js} +2 -2
- package/dist/client/assets/{dynamic-D3BvMY7V.js → dynamic-C1qIL2Wy.js} +2 -2
- package/dist/client/assets/{ebnfDiagram-PWID7BFC-ARv-iUm5.js → ebnfDiagram-PWID7BFC-DPJg2C3n.js} +2 -2
- package/dist/client/assets/{embeddedScripts-iET5Slgf.js → embeddedScripts-CAZM4r8Y.js} +2 -2
- package/dist/client/assets/{empty-IIGW45Hv.js → empty-QSN6WiRO.js} +2 -2
- package/dist/client/assets/entities-Bj5ceyfn.js +2 -0
- package/dist/client/assets/{erDiagram-RLTQ6QDP-BbhShOfn.js → erDiagram-RLTQ6QDP-BySDEjHG.js} +2 -2
- package/dist/client/assets/eventmodeling-NTZA5JFV-CrSSBuUT.js +1 -0
- package/dist/client/assets/{fileLinks-BVZWyXb4.js → fileLinks-ShhGM_AF.js} +2 -2
- package/dist/client/assets/{fileTreeExpansion-CWBDW5x7.js → fileTreeExpansion-DZnEBuaB.js} +5 -5
- package/dist/client/assets/flowDiagram-HODETNUW-GdATwCAd.js +1 -0
- package/dist/client/assets/{ganttDiagram-EL5Y4UJY-YyvVQr9f.js → ganttDiagram-EL5Y4UJY-CJAhE7we.js} +2 -2
- package/dist/client/assets/{getDiffFileInput-CqWRYbh0.js → getDiffFileInput-BxuEGdnM.js} +2 -2
- package/dist/client/assets/{gitGraph-4MIJSDKK-B1sT41xD.js → gitGraph-4MIJSDKK-BqKoI8Rd.js} +1 -1
- package/dist/client/assets/{gitGraphDiagram-WWUBYQGX-2YfTeJPY.js → gitGraphDiagram-WWUBYQGX-BPFwoaRw.js} +2 -2
- package/dist/client/assets/{guideRunStore-C8EitNtt.js → guideRunStore-CYD68wqk.js} +2 -2
- package/dist/client/assets/{htmlRender-n-z4ejOb.js → htmlRender-p6atQGoW.js} +2 -2
- package/dist/client/assets/{index-D5grnFOh.js → index-CnQWjeBY.js} +3 -3
- package/dist/client/assets/{info-A6RAGUB7-Bxvrguok.js → info-A6RAGUB7-R8j64K2s.js} +1 -1
- package/dist/client/assets/{infoDiagram-27XIBGKW-Ci9YhEz1.js → infoDiagram-27XIBGKW-DFqL9n-v.js} +2 -2
- package/dist/client/assets/{input-DX_wpYEr.js → input-Df_UyHLk.js} +2 -2
- package/dist/client/assets/{input-group-B7App4HX.js → input-group-CpRPTpIU.js} +2 -2
- package/dist/client/assets/{ishikawaDiagram-5VMMS53U-DrTMtdZr.js → ishikawaDiagram-5VMMS53U-C-786VMl.js} +2 -2
- package/dist/client/assets/{journeyDiagram-3NMN7TZE-Cad85NEf.js → journeyDiagram-3NMN7TZE-lzAoDD4e.js} +2 -2
- package/dist/client/assets/{kanban-definition-UXKFOSKX-CyPoc7fr.js → kanban-definition-UXKFOSKX-CJDCWAxz.js} +2 -2
- package/dist/client/assets/{kbd-CBsCsK1C.js → kbd-BWmfbdyt.js} +2 -2
- package/dist/client/assets/{keybindings-DQLn36Qh.js → keybindings-Cwx4RZou.js} +2 -2
- package/dist/client/assets/{lazyRouteComponent-F8XJwdjp.js → lazyRouteComponent-AWcDof8d.js} +2 -2
- package/dist/client/assets/{line-D-vamv77.js → line-BV7EkscB.js} +2 -2
- package/dist/client/assets/{link-Dsk-mMeT.js → link-ymnjoepm.js} +2 -2
- package/dist/client/assets/{linkedPrompt-QuSBC7T4.js → linkedPrompt-D1v0zLjD.js} +2 -2
- package/dist/client/assets/{main-B3UqEpE9.css → main-Byysx0nX.css} +1 -1
- package/dist/client/assets/main-D8FWUaO_.js +26 -0
- package/dist/client/assets/{mediaReference-CyhWqXsL.js → mediaReference-DjHCSaNZ.js} +2 -2
- package/dist/client/assets/{mediaSource-DzNyV4QZ.js → mediaSource-DrVcMaQl.js} +2 -2
- package/dist/client/assets/{mermaid-parser.core-DPipy20D.js → mermaid-parser.core-dhHCExtt.js} +4 -4
- package/dist/client/assets/{mermaid.core-BhvlRFAw.js → mermaid.core-DixI3w-9.js} +5 -5
- package/dist/client/assets/{mindmap-definition-YA3MSWOX-BmaL4P3W.js → mindmap-definition-YA3MSWOX-BHehI_9I.js} +2 -2
- package/dist/client/assets/{number-field-CO0djGoZ.js → number-field-BHWzsgFF.js} +2 -2
- package/dist/client/assets/{observeResize-DnTxIA8M.js → observeResize-uogErzin.js} +2 -2
- package/dist/client/assets/{onboarding-Bk1fay_k.js → onboarding-BkSIwdaJ.js} +2 -2
- package/dist/client/assets/{openFileInPreview-BoDixD_F.js → openFileInPreview-3vlmqdKv.js} +2 -2
- package/dist/client/assets/{p4ProjectFile-Cvz5u0b7.js → p4ProjectFile-B9fwmcbM.js} +2 -2
- package/dist/client/assets/{packet-AYTQ26CC-Dv1A4BvT.js → packet-AYTQ26CC-DhFsyjVR.js} +1 -1
- package/dist/client/assets/{pair-Bvx1yb_1.js → pair-DJbA4cVs.js} +2 -2
- package/dist/client/assets/{pegDiagram-XKGWAZYB-BSldN3hU.js → pegDiagram-XKGWAZYB-DBKpIU8U.js} +2 -2
- package/dist/client/assets/{phoneViewer-CEU-YPRt.js → phoneViewer-CywOkDco.js} +2 -2
- package/dist/client/assets/{pie-WAS4IAKB-iLUxjnvf.js → pie-WAS4IAKB-cW3as8Lm.js} +1 -1
- package/dist/client/assets/{pieDiagram-E7YTZNPT-4ZtbrRQa.js → pieDiagram-E7YTZNPT-CuM-4V4_.js} +2 -2
- package/dist/client/assets/{pierre-icons-duX6avqL.js → pierre-icons-Bhwlc2rO.js} +22 -22
- package/dist/client/assets/{popover-BJ6nvlLO.js → popover-2GkuSL2i.js} +2 -2
- package/dist/client/assets/{preview-Cf8NQ1hB.js → preview-BnLuRquy.js} +2 -2
- package/dist/client/assets/{preview-iwQ6KbXA.js → preview-DWVmLubs.js} +2 -2
- package/dist/client/assets/{previewMiniPlayerStore-C-S6Z_7R.js → previewMiniPlayerStore-B2cko9-z.js} +2 -2
- package/dist/client/assets/{primary-BWLl-lP0.js → primary-CKEI970r.js} +2 -2
- package/dist/client/assets/primaryCloudLinkState-CwxbxrZn.js +2 -0
- package/dist/client/assets/projectFilesQueryState-45r9sIZp.js +2 -0
- package/dist/client/assets/{projectScriptEditor-BI4TQzLb.js → projectScriptEditor-CI1LZs9V.js} +2 -2
- package/dist/client/assets/{providerSkills-h-0NbrXw.js → providerSkills-OICI2srI.js} +2 -2
- package/dist/client/assets/{pullRequestDetail.logic-w9YCNM32.js → pullRequestDetail.logic-DT8Qo5OA.js} +3 -3
- package/dist/client/assets/{pullRequestIcons-BjW5TUsG.js → pullRequestIcons-BBzWaymE.js} +2 -2
- package/dist/client/assets/{pullRequestReviewStore-CfDcNEFp.js → pullRequestReviewStore-DKeU327h.js} +2 -2
- package/dist/client/assets/{pullRequests-PrPMEuwL.js → pullRequests-DLPX2CY-.js} +2 -2
- package/dist/client/assets/{quadrantDiagram-AXDQQJYC-BA_0gIwm.js → quadrantDiagram-AXDQQJYC-DSJ5VFnE.js} +2 -2
- package/dist/client/assets/queries-lVyDrFzk.js +2 -0
- package/dist/client/assets/{query-MZn8giyP.js → query-tgXMuDtS.js} +2 -2
- package/dist/client/assets/{radar-RG4KPBEZ-ClHSGc5G.js → radar-RG4KPBEZ-CfIGvIx_.js} +1 -1
- package/dist/client/assets/{radio-group-Ca6IMyWa.js → radio-group-CJu78gKo.js} +2 -2
- package/dist/client/assets/{railroad-74A4TZTK-CLfqlsOS.js → railroad-74A4TZTK-DB4Av5dd.js} +1 -1
- package/dist/client/assets/railroad-abnf-HS5TGJTU-Ce_EhWE2.js +1 -0
- package/dist/client/assets/railroad-ebnf-LZEXJU2U-BWrImE-J.js +1 -0
- package/dist/client/assets/railroad-peg-WCYAUIDC-BydBUlqT.js +1 -0
- package/dist/client/assets/{railroadDiagram-O6MQD6OU-C3O0sd3N.js → railroadDiagram-O6MQD6OU-cpv2Uyk5.js} +2 -2
- package/dist/client/assets/{renderScheduler-C_PxJDPT.js → renderScheduler-h5pQXGNH.js} +2 -2
- package/dist/client/assets/{requirementDiagram-BXWQKSXE-DTD2i006.js → requirementDiagram-BXWQKSXE-DYwMIoLP.js} +2 -2
- package/dist/client/assets/rightPanelStore-Csibei0O.js +2 -0
- package/dist/client/assets/{runtime-CvGlGrbH.js → runtime-DATbE5vH.js} +5 -5
- package/dist/client/assets/runtime-Dks8Wo5P.js +2 -0
- package/dist/client/assets/{runtimeModeConfig-CTQ97M7F.js → runtimeModeConfig-n1vq0Zzd.js} +2 -2
- package/dist/client/assets/{sankeyDiagram-P5KCCOFB-DN-FD0Rw.js → sankeyDiagram-P5KCCOFB-BqmXJBYG.js} +2 -2
- package/dist/client/assets/{scheduledTasksSettings.logic-V_IgyOeJ.js → scheduledTasksSettings.logic-Cg8SF9mr.js} +2 -2
- package/dist/client/assets/{scroll-area-BStafc_O.js → scroll-area-0-l4q4Pk.js} +2 -2
- package/dist/client/assets/{select-BIK-KVyd.js → select-Dhapqr3j.js} +2 -2
- package/dist/client/assets/{sequenceDiagram-WJ2MYXX4-BpTwzO_D.js → sequenceDiagram-WJ2MYXX4-h3AJox3t.js} +2 -2
- package/dist/client/assets/{server-h8-LTzsE.js → server-rxH1493J.js} +2 -2
- package/dist/client/assets/{session-BnZv-sUV.js → session-Bgs0dTwK.js} +2 -2
- package/dist/client/assets/session-logic-BuYRdtPc.js +26 -0
- package/dist/client/assets/{settings-CX5J7KOC.js → settings-CGf9Ad5Y.js} +2 -2
- package/dist/client/assets/{settings.appearance-CX8WldRu.js → settings.appearance-DV608fbL.js} +2 -2
- package/dist/client/assets/settings.archived-Cav4CAd_.js +2 -0
- package/dist/client/assets/{settings.computer-use-CYOpSx3u.js → settings.computer-use-C3SE4DHj.js} +2 -2
- package/dist/client/assets/settings.connections-C9Kh1b2k.js +2 -0
- package/dist/client/assets/{settings.data-controls-Dw1t2NUy.js → settings.data-controls-DjgZVIMy.js} +2 -2
- package/dist/client/assets/{settings.decisions-CjQBlU5H.js → settings.decisions-z3RVOG7-.js} +2 -2
- package/dist/client/assets/{settings.designs-CdUp5EKA.js → settings.designs-DgLVIZOE.js} +2 -2
- package/dist/client/assets/{settings.diagnostics-CChxKGXN.js → settings.diagnostics-CaXx9YEU.js} +2 -2
- package/dist/client/assets/{settings.general-fPNbGy-A.js → settings.general-BOpvFj1F.js} +2 -2
- package/dist/client/assets/{settings.integrations-lsI9Ds_Z.js → settings.integrations-MHjX-SLC.js} +2 -2
- package/dist/client/assets/{settings.keybindings-BYfmXPXW.js → settings.keybindings-D78CWKIy.js} +2 -2
- package/dist/client/assets/{settings.open-source-licenses-Cmww0egR.js → settings.open-source-licenses-BhpBR1nY.js} +2 -2
- package/dist/client/assets/{settings.plugins-DOL0xzP_.js → settings.plugins-d9-jrUr-.js} +3 -3
- package/dist/client/assets/{settings.projects-BmPcRKSU.js → settings.projects-BiDMtruF.js} +3 -3
- package/dist/client/assets/{settings.providers-BmXJRxVY.js → settings.providers-BarMZxaG.js} +3 -3
- package/dist/client/assets/{settings.scheduled-tasks-DIrqKW18.js → settings.scheduled-tasks-BA_O1-Fn.js} +2 -2
- package/dist/client/assets/{settings.snap-shot-cYlYvsZa.js → settings.snap-shot-Crh49RtQ.js} +2 -2
- package/dist/client/assets/{settings.source-control-DiCRUoZ-.js → settings.source-control-DIrrX9Dt.js} +2 -2
- package/dist/client/assets/{settings.storage-_Qk3Am6V.js → settings.storage-D6vDu4vG.js} +2 -2
- package/dist/client/assets/settingsLayout-BQsOdImg.js +3 -0
- package/dist/client/assets/{sidebar-CilourkR.js → sidebar-DTT0HQ9J.js} +2 -2
- package/dist/client/assets/{sidebarProjectGrouping-Bk_4pOCF.js → sidebarProjectGrouping-JqsedUb6.js} +2 -2
- package/dist/client/assets/{skeleton-DoQ8WJ33.js → skeleton-D-FcvmF0.js} +2 -2
- package/dist/client/assets/{sourceControl-CbwbzP2H.js → sourceControl-CrjTZJC-.js} +2 -2
- package/dist/client/assets/{sourceControlClients-Bqx0yIVC.js → sourceControlClients-DYQ3gMZ2.js} +2 -2
- package/dist/client/assets/{spinner-dBHTxMdw.js → spinner-AJeHmaWN.js} +2 -2
- package/dist/client/assets/{standalone-page-7u6OMfTi.js → standalone-page-Df29sgRU.js} +2 -2
- package/dist/client/assets/{stateDiagram-D77RDMKH-B5DXt7YQ.js → stateDiagram-D77RDMKH-C0KiABVq.js} +2 -2
- package/dist/client/assets/stateDiagram-v2-MP3YSRHH-DlcRyn96.js +2 -0
- package/dist/client/assets/{swimlanes-42K2YHIH-BwtHh4XF.js → swimlanes-42K2YHIH-BdAWIkuy.js} +2 -2
- package/dist/client/assets/swimlanesDiagram-VR7AAH4N-lbxQDJ07.js +9 -0
- package/dist/client/assets/{terminal-links-DaTgSxq7.js → terminal-links-BjKL3dH7.js} +2 -2
- package/dist/client/assets/{terminalSessions-BH4SsD0n.js → terminalSessions-dkFe-6qM.js} +2 -2
- package/dist/client/assets/{textarea-DyCJe8OO.js → textarea-CqADnND1.js} +2 -2
- package/dist/client/assets/themePalette-Co4xeJnW.js +5 -0
- package/dist/client/assets/{timeline-definition-24CTP7MA-DcZAbrWX.js → timeline-definition-24CTP7MA-CkYp2QT_.js} +2 -2
- package/dist/client/assets/toast-gFAddE-Q.js +2 -0
- package/dist/client/assets/{toggle-C4iGKTHY.js → toggle-BM8lnQ29.js} +2 -2
- package/dist/client/assets/{toggle-group-CM-lVPv_.js → toggle-group-DaqkIApY.js} +2 -2
- package/dist/client/assets/{tooltip-C85X81rS.js → tooltip-ngKqo-lA.js} +2 -2
- package/dist/client/assets/{treeView-Q6P3EWNA-Bi9LlHgf.js → treeView-Q6P3EWNA-YWYRI1IG.js} +1 -1
- package/dist/client/assets/{treemap-WGGIJYW6-Ddxv0kaw.js → treemap-WGGIJYW6-DOqHNCbg.js} +1 -1
- package/dist/client/assets/{uiStateStore-BQNw2Dqk.js → uiStateStore-Ddhpg65j.js} +3 -3
- package/dist/client/assets/{usage-D_p-kdF1.js → usage-B3PzCXST.js} +2 -2
- package/dist/client/assets/{usageAccess-BS7RH41F.js → usageAccess-AcIxVQqJ.js} +2 -2
- package/dist/client/assets/{usageFormat-neDCKBUu.js → usageFormat-BXW38hCK.js} +2 -2
- package/dist/client/assets/{usageShortcuts-BXE7khxl.js → usageShortcuts-Qkdifm3k.js} +2 -2
- package/dist/client/assets/{use-atom-command-BZ0heqC5.js → use-atom-command-BJxdfyHC.js} +2 -2
- package/dist/client/assets/{useAriaLabelledBy-0jbiz1G5.js → useAriaLabelledBy-C0a8QEEb.js} +2 -2
- package/dist/client/assets/{useHandleNewThread-xDPfeiE8.js → useHandleNewThread-BUYzfgdc.js} +2 -2
- package/dist/client/assets/{useLocation-CEeuom34.js → useLocation-BQDC59xg.js} +2 -2
- package/dist/client/assets/useNavigate-BziZQ-Vx.js +2 -0
- package/dist/client/assets/{useNavigateBack-B1hKrkap.js → useNavigateBack-BH5As9D1.js} +2 -2
- package/dist/client/assets/{useT3ConnectAuthPrompt-xAWzgrFw.js → useP4ConnectAuthPrompt-DHu7R38-.js} +2 -2
- package/dist/client/assets/{useParams-DPNRViD9.js → useParams-BMa26XZG.js} +2 -2
- package/dist/client/assets/{usePermissionStatus-DhHAmOgT.js → usePermissionStatus-CUViQRYY.js} +2 -2
- package/dist/client/assets/{usePullRequestActions-BxkTyNnd.js → usePullRequestActions-DGkavykA.js} +2 -2
- package/dist/client/assets/{useRegisterFieldControl-DHg4qk95.js → useRegisterFieldControl-CosvijuC.js} +2 -2
- package/dist/client/assets/{useScopedModelAvailability-6832Pqao.js → useScopedModelAvailability-DOJzIjns.js} +2 -2
- package/dist/client/assets/useSettings-B_WzhJqU.js +3 -0
- package/dist/client/assets/utils-BctiQ4Ue.js +37 -0
- package/dist/client/assets/{vcsRefInvalidation-C1-o4QR4.js → vcsRefInvalidation-cn2N4Xey.js} +2 -2
- package/dist/client/assets/{vennDiagram-4TSXK5OY-gRgKfcwz.js → vennDiagram-4TSXK5OY-DvpVodA1.js} +2 -2
- package/dist/client/assets/{wardley-WFR3VGLG-DcrHek4R.js → wardley-WFR3VGLG-CW8u1RAF.js} +1 -1
- package/dist/client/assets/{wardleyDiagram-VM6X3IG4-Dy8jwPMm.js → wardleyDiagram-VM6X3IG4-B34GmEPm.js} +2 -2
- package/dist/client/assets/{welcome-Bx0ykTSW.js → welcome-DEFnpzjQ.js} +2 -2
- package/dist/client/assets/{xychartDiagram-S5SC5T6Z-BE_oCBL1.js → xychartDiagram-S5SC5T6Z-Ds5Ioly5.js} +2 -2
- package/dist/client/index.html +9 -31
- package/dist/{renderer-5lNN05tA.mjs → renderer-ClrN4p2R.mjs} +2 -2
- package/dist/resource-monitor/darwin-arm64/{t3-resource-monitor → p4-resource-monitor} +0 -0
- package/dist/{runtime-BuR0otfT.mjs → runtime-BQydA64s.mjs} +117 -41
- package/package.json +1 -1
- package/dist/client/assets/AlertDialogRoot-CI-BT04n.js +0 -2
- package/dist/client/assets/ChatMarkdown-DvwRAy0e.js +0 -65
- package/dist/client/assets/Input-C7aWgRC_.js +0 -2
- package/dist/client/assets/PanelLayoutControls-Bp96ytbx.js +0 -216
- package/dist/client/assets/ThemeEditorPanel-ezln4yFM.js +0 -5
- package/dist/client/assets/_chat-COwukFSB.js +0 -45
- package/dist/client/assets/architecture-7GRP2DOG-5VIB8Eba.js +0 -1
- package/dist/client/assets/channel-B7HSUXfW.js +0 -2
- package/dist/client/assets/classDiagram-ZZMXUADV-9HCpqDrm.js +0 -2
- package/dist/client/assets/classDiagram-v2-VYDZK3BY-9HCpqDrm.js +0 -2
- package/dist/client/assets/entities-BNeCRVLN.js +0 -2
- package/dist/client/assets/eventmodeling-NTZA5JFV-7Qy1WUdw.js +0 -1
- package/dist/client/assets/flowDiagram-HODETNUW-WrRfiKZh.js +0 -1
- package/dist/client/assets/main-D398MK8V.js +0 -26
- package/dist/client/assets/primaryCloudLinkState-_2yJcM8W.js +0 -2
- package/dist/client/assets/projectFilesQueryState-Dnhdh9Fp.js +0 -2
- package/dist/client/assets/queries-WzVTFKPw.js +0 -2
- package/dist/client/assets/railroad-abnf-HS5TGJTU-D6sBNrTv.js +0 -1
- package/dist/client/assets/railroad-ebnf-LZEXJU2U-DQmVNLBf.js +0 -1
- package/dist/client/assets/railroad-peg-WCYAUIDC-BmxuO4Yw.js +0 -1
- package/dist/client/assets/rightPanelStore-UcehuwgS.js +0 -2
- package/dist/client/assets/runtime-DgUiDuq4.js +0 -2
- package/dist/client/assets/session-logic-Chq6Fhx9.js +0 -26
- package/dist/client/assets/settings.archived-BLphtU6e.js +0 -2
- package/dist/client/assets/settings.connections-CPZLelaw.js +0 -2
- package/dist/client/assets/settingsLayout-BxEP0uF3.js +0 -3
- package/dist/client/assets/stateDiagram-v2-MP3YSRHH-DKxchkZ_.js +0 -2
- package/dist/client/assets/swimlanesDiagram-VR7AAH4N-DcmT28cJ.js +0 -9
- package/dist/client/assets/themePalette-mGukKeaJ.js +0 -5
- package/dist/client/assets/toast-CylvOlB4.js +0 -2
- package/dist/client/assets/useNavigate-B5WzUZJ7.js +0 -2
- package/dist/client/assets/useSettings-CHo-Nv-3.js +0 -3
- package/dist/client/assets/utils-ChK8VEFC.js +0 -37
package/dist/client/assets/{usePermissionStatus-DhHAmOgT.js → usePermissionStatus-CUViQRYY.js}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{r as t}from"./Icon-l19w4AjM.js";import{NE as n,Td as r,lE as i,sr as a}from"./utils-
|
|
2
|
-
//# sourceMappingURL=usePermissionStatus-
|
|
1
|
+
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{r as t}from"./Icon-l19w4AjM.js";import{NE as n,Td as r,lE as i,sr as a}from"./utils-BctiQ4Ue.js";var o=n(),s=e(i(),1);function c(e){let t=(0,o.c)(7),{permissions:n,busy:i}=e,c=i!==void 0&&i,l;if(t[0]!==c||t[1]!==n){let e;t[3]===c?e=t[4]:(e=e=>(0,s.jsxs)(`div`,{className:`flex items-center gap-3 rounded-lg border px-3 py-2`,children:[e.icon,(0,s.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,s.jsx)(`p`,{className:`font-medium`,children:e.title}),(0,s.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e.description})]}),e.granted?(0,s.jsxs)(`span`,{role:`status`,className:`flex items-center gap-1 text-xs text-success`,children:[(0,s.jsx)(r,{className:`size-4`,"aria-hidden":`true`}),`Allowed`]}):(0,s.jsx)(a,{size:`xs`,variant:`outline`,disabled:c,onClick:e.onAllow,children:`Allow`})]},e.id),t[3]=c,t[4]=e),l=n.map(e),t[0]=c,t[1]=n,t[2]=l}else l=t[2];let u;return t[5]===l?u=t[6]:(u=(0,s.jsx)(`div`,{className:`space-y-2`,children:l}),t[5]=l,t[6]=u),u}function l(e){let t=(0,o.c)(9),n,r,i,c;t[0]===e?(n=t[1],r=t[2],i=t[3],c=t[4]):({ready:r,busy:i,children:c,...n}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=c);let l=i!==void 0&&i,u=c===void 0?`Continue`:c,d=!r||l,f;return t[5]!==u||t[6]!==n||t[7]!==d?(f=(0,s.jsx)(a,{...n,disabled:d,children:u}),t[5]=u,t[6]=n,t[7]=d,t[8]=f):f=t[8],f}var u=e(t(),1);function d(e,t,n){let r=(0,o.c)(12),i=n===void 0||n,[a,s]=(0,u.useState)(t),[c,l]=(0,u.useState)(null),d=(0,u.useEffectEvent)(e),f;r[0]!==d||r[1]!==i?(f=()=>{if(!i)return;let e=!1,t=!1,n=async()=>{if(!(e||t||document.visibilityState===`hidden`)){t=!0;try{let t=await d();e||(s(t),l(null))}catch{e||l(`Could not check permissions. We'll try again automatically.`)}t=!1}};n();let r=window.setInterval(()=>void n(),1500);return window.addEventListener(`focus`,n),document.addEventListener(`visibilitychange`,n),()=>{e=!0,window.clearInterval(r),window.removeEventListener(`focus`,n),document.removeEventListener(`visibilitychange`,n)}},r[0]=d,r[1]=i,r[2]=f):f=r[2];let p;r[3]===i?p=r[4]:(p=[i],r[3]=i,r[4]=p),(0,u.useEffect)(f,p);let m;r[5]!==c||r[6]!==a?(m=e=>c===null&&e.every(e=>a[e]),r[5]=c,r[6]=a,r[7]=m):m=r[7];let h;return r[8]!==c||r[9]!==a||r[10]!==m?(h={status:a,error:c,isReady:m},r[8]=c,r[9]=a,r[10]=m,r[11]=h):h=r[11],h}export{c as n,l as r,d as t};
|
|
2
|
+
//# sourceMappingURL=usePermissionStatus-CUViQRYY.js.map
|
package/dist/client/assets/{usePullRequestActions-BxkTyNnd.js → usePullRequestActions-DGkavykA.js}
RENAMED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{r as t}from"./Icon-l19w4AjM.js";import{D as n,Go as r,Gs as i,Lc as a,NE as o,NT as s,Ss as c,Yo as l,__ as u,fw as d,k_ as f,ms as p,w_ as m,ys as h}from"./utils-ChK8VEFC.js";import{M as g,N as _,W as v}from"./runtime-CvGlGrbH.js";import{a as y,i as b}from"./vcsRefInvalidation-C1-o4QR4.js";import{C as ee}from"./entities-BNeCRVLN.js";import{t as te}from"./runtime-DgUiDuq4.js";import{i as x}from"./toast-CylvOlB4.js";import{O as S,f as C,s as w}from"./useSettings-CHo-Nv-3.js";import{i as T,n as E}from"./session-BnZv-sUV.js";import{n as D}from"./query-MZn8giyP.js";import{t as O}from"./use-atom-command-BZ0heqC5.js";import{d as k,l as A,u as j}from"./queries-WzVTFKPw.js";import{t as M}from"./sourceControl-CbwbzP2H.js";import{C as N,r as P}from"./pullRequests-PrPMEuwL.js";import{R as F,b as ne,y as re}from"./pullRequestDetail.logic-w9YCNM32.js";import{n as ie}from"./useHandleNewThread-xDPfeiE8.js";import{c as ae,f as I,i as L,s as R}from"./p4ProjectFile-Cvz5u0b7.js";import{t as z}from"./sidebarProjectGrouping-Bk_4pOCF.js";var B=e(t(),1),V=o();function H(e){return{pullRequestResolution:_(e,{label:`environment-data:git:resolve-pull-request`,tag:a.gitResolvePullRequest}),preparePullRequestThread:g(e,{label:`environment-data:git:prepare-pull-request-thread`,tag:a.gitPreparePullRequestThread,scheduler:y,concurrency:b})}}var U=H(te),W={init:`init`,pull:`pull`,publishRepository:`publish_repository`,runStackedAction:`run_change_request`,preparePullRequestThread:`prepare_pull_request_thread`};function G(e){let t=T(e.scope.environmentId,m),n=W[e.kind],i=l(A.stateAtom(e.scope)),a=i.operation===n,o=(0,B.useCallback)(()=>{A.resetError(r,e.scope,n)},[e.scope,n]),s=(0,B.useCallback)(async(...t)=>{if(e.scope.environmentId===null||!E(e.scope.environmentId,`source-control:write`))return p(d(new f({requiredScope:m,message:`This connection cannot change source control.`})));let i=async()=>{let n=await e.action(...t);return h(n)&&e.onSuccess?.(),n};return e.managedExternally===!0?i():A.track(r,e.scope,{operation:n,label:e.label},i)},[e.action,e.label,e.managedExternally,e.onSuccess,e.scope,n]);return{isAllowed:t,error:a?i.error:null,isPending:a&&i.isRunning,resetError:o,run:s}}function K(e){return e.environmentId===null||e.cwd===null?null:{environmentId:e.environmentId,cwd:e.cwd}}function q(e,t){let n=(0,V.c)(6),r;n[0]===e?r=n[1]:(r=A.stateAtom(e),n[0]=e,n[1]=r);let i=l(r),a;return n[2]!==t||n[3]!==i.isRunning||n[4]!==i.operation?(a=i.isRunning&&i.operation!==null&&t.some(e=>W[e]===i.operation),n[2]=t,n[3]=i.isRunning,n[4]=i.operation,n[5]=a):a=n[5],a}function J(e){let t=(0,V.c)(7),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n={reportFailure:!1},t[0]=n):n=t[0];let r=O(j.init,n),i;t[1]!==r||t[2]!==e?(i=async()=>{let t=K(e);return t===null?p(d(new k({operation:`init`,environmentId:e.environmentId,cwd:e.cwd}))):r({environmentId:t.environmentId,input:{cwd:t.cwd}})},t[1]=r,t[2]=e,t[3]=i):i=t[3];let a=i,o;return t[4]!==a||t[5]!==e?(o={kind:`init`,label:`Initializing repository`,scope:e,action:a},t[4]=a,t[5]=e,t[6]=o):o=t[6],G(o)}function oe(e){let t=(0,V.c)(11),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n={reportFailure:!1},t[0]=n):n=t[0];let r=O(j.pull,n),i;t[1]!==e.cwd||t[2]!==e.environmentId?(i=e.environmentId!==null&&e.cwd!==null?j.status({environmentId:e.environmentId,input:{cwd:e.cwd}}):null,t[1]=e.cwd,t[2]=e.environmentId,t[3]=i):i=t[3];let a=D(i),o;t[4]!==r||t[5]!==e?(o=async()=>{let t=K(e);return t===null?p(d(new k({operation:`pull`,environmentId:e.environmentId,cwd:e.cwd}))):r({environmentId:t.environmentId,input:{cwd:t.cwd}})},t[4]=r,t[5]=e,t[6]=o):o=t[6];let s=o,c;return t[7]!==s||t[8]!==e||t[9]!==a.refresh?(c={kind:`pull`,label:`Pulling latest changes...`,scope:e,action:s,onSuccess:a.refresh},t[7]=s,t[8]=e,t[9]=a.refresh,t[10]=c):c=t[10],G(c)}function se(e){let t=(0,V.c)(13),n;t[0]===e?n=t[1]:(n=A.runStackedAction(e),t[0]=e,t[1]=n);let r;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(r={reportFailure:!1},t[2]=r):r=t[2];let i=O(n,r),a;t[3]!==e.cwd||t[4]!==e.environmentId?(a=e.environmentId!==null&&e.cwd!==null?j.status({environmentId:e.environmentId,input:{cwd:e.cwd}}):null,t[3]=e.cwd,t[4]=e.environmentId,t[5]=a):a=t[5];let o=D(a),s;t[6]!==i||t[7]!==e?(s=async t=>K(e)===null?p(d(new k({operation:`run_change_request`,environmentId:e.environmentId,cwd:e.cwd}))):i(t),t[6]=i,t[7]=e,t[8]=s):s=t[8];let c=s,l;return t[9]!==c||t[10]!==e||t[11]!==o.refresh?(l={kind:`runStackedAction`,label:`Running source control action`,scope:e,action:c,onSuccess:o.refresh,managedExternally:!0},t[9]=c,t[10]=e,t[11]=o.refresh,t[12]=l):l=t[12],G(l)}function ce(e){let t=(0,V.c)(11),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n={reportFailure:!1},t[0]=n):n=t[0];let r=O(M.publishRepository,n),i;t[1]!==e.cwd||t[2]!==e.environmentId?(i=e.environmentId!==null&&e.cwd!==null?j.status({environmentId:e.environmentId,input:{cwd:e.cwd}}):null,t[1]=e.cwd,t[2]=e.environmentId,t[3]=i):i=t[3];let a=D(i),o;t[4]!==r||t[5]!==e?(o=async t=>{let n=K(e);return n===null?p(d(new k({operation:`publish_repository`,environmentId:e.environmentId,cwd:e.cwd}))):r({environmentId:n.environmentId,input:{cwd:n.cwd,...t}})},t[4]=r,t[5]=e,t[6]=o):o=t[6];let s=o,c;return t[7]!==s||t[8]!==e||t[9]!==a.refresh?(c={kind:`publishRepository`,label:`Publishing repository`,scope:e,action:s,onSuccess:a.refresh},t[7]=s,t[8]=e,t[9]=a.refresh,t[10]=c):c=t[10],G(c)}function Y(e){let t=(0,V.c)(7),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n={reportFailure:!1},t[0]=n):n=t[0];let r=O(U.preparePullRequestThread,n),i;t[1]!==r||t[2]!==e?(i=async t=>{let n=K(e);return n===null?p(d(new k({operation:`prepare_pull_request_thread`,environmentId:e.environmentId,cwd:e.cwd}))):t.mode===`worktree`&&t.threadId!==void 0&&!E(n.environmentId,`orchestration:operate`)?p(d(new f({requiredScope:u,message:`This connection cannot change threads.`}))):r({environmentId:n.environmentId,input:{cwd:n.cwd,reference:t.reference,mode:t.mode,...t.threadId?{threadId:t.threadId}:{}}})},t[1]=r,t[2]=e,t[3]=i):i=t[3];let a=i,o;return t[4]!==a||t[5]!==e?(o={kind:`preparePullRequestThread`,label:`Preparing pull request thread`,scope:e,action:a},t[4]=a,t[5]=e,t[6]=o):o=t[6],G(o)}function X(e){return e.environmentId===null||e.cwd===null||e.reference===null?null:s(c(r.get(U.pullRequestResolution({environmentId:e.environmentId,input:{cwd:e.cwd,reference:e.reference}}))))}function le(e){let t=(0,V.c)(12),n;t[0]!==e.cwd||t[1]!==e.environmentId||t[2]!==e.reference?(n=e.environmentId!==null&&e.cwd!==null&&e.reference!==null?U.pullRequestResolution({environmentId:e.environmentId,input:{cwd:e.cwd,reference:e.reference}}):null,t[0]=e.cwd,t[1]=e.environmentId,t[2]=e.reference,t[3]=n):n=t[3];let r=D(n),i;t[4]===e?i=t[5]:(i=X(e),t[4]=e,t[5]=i);let a=i,o=r.data??a,s=r.isPending&&a===null,c;return t[6]!==r.error||t[7]!==r.isPending||t[8]!==r.refresh||t[9]!==o||t[10]!==s?(c={data:o,error:r.error,isPending:s,isFetching:r.isPending,refresh:r.refresh},t[6]=r.error,t[7]=r.isPending,t[8]=r.refresh,t[9]=o,t[10]=s,t[11]=c):c=t[11],c}function ue(e,t){let n=(0,V.c)(10),r;n[0]===t?r=n[1]:(r=e=>L(e,t).settings.pullRequestMergeMethod,n[0]=t,n[1]=r);let i=C(e,r),a=w(de),o=w(I),s=ee(),c=S(),l;return n[2]!==e||n[3]!==o||n[4]!==a||n[5]!==c||n[6]!==i||n[7]!==t||n[8]!==s?(l=()=>{if(i!=null)return i;if(Object.keys(a).length===0)return;let n=s.find(n=>n.environmentId===e&&n.id===t);if(!n)return;let r=z({projects:s,settings:o,primaryEnvironmentId:c}).get(ae(n))??R(n,o);return a[r]},n[2]=e,n[3]=o,n[4]=a,n[5]=c,n[6]=i,n[7]=t,n[8]=s,n[9]=l):l=n[9],l}function de(e){return e.pullRequestMergeMethodOverrides}var fe={merge:`Merge requested`,ready:`Marked ready for review`,draft:`Converted to draft`,close:`Pull request closed`,reopen:`Pull request reopened`,"update-branch":`Branch updated with the base branch`,"enable-auto-merge":`Auto-merge enabled`,"disable-auto-merge":`Auto-merge disabled`,revert:`Revert pull request opened`,"delete-branch":`Branch deleted`,"approve-workflows":`Workflows approved`},pe={merge:`Could not merge this pull request`,ready:`Could not mark this ready for review`,draft:`Could not convert this to a draft`,close:`Could not close this pull request`,reopen:`Could not reopen this pull request`,"update-branch":`Could not update this branch`,"enable-auto-merge":`Could not enable auto-merge`,"disable-auto-merge":`Could not disable auto-merge`,revert:`Could not open a revert pull request`,"delete-branch":`Could not delete this branch`,"approve-workflows":`Could not approve workflows`},Z={merge:`The host refused the merge. Check that you have write access, that the checks it requires have passed, and that the branch is not conflicting.`,ready:`The host refused it. Check that you have write access to this repository.`,draft:`The host refused it. Check that you have write access to this repository.`,close:`The host refused it. Check that you have write access, or that you opened it.`,reopen:`The host refused it. Check that you have write access, and that the branch still exists.`,"update-branch":`The host refused it. Check that you have write access, and that the base branch has not diverged in a way the host cannot merge.`,"enable-auto-merge":`The host refused it. Check that auto-merge is enabled for this repository and that you have write access.`,"disable-auto-merge":`The host refused it. Check that you have write access to this repository.`,revert:`The host refused it. Check that you have write access and that this pull request was merged on the host.`,"delete-branch":`The host refused it. Check that you have write access to the source repository and that the branch has not moved since this page loaded.`,"approve-workflows":`The host refused it. Check that you have Actions write access and that these workflow runs are still awaiting approval.`};function me({environmentId:e,reference:t,onSuccess:n,resolveMergeMethod:r}){let i=O(P.runAction,{reportFailure:!1}),[a,o]=(0,B.useState)(!1),s=(0,B.useRef)(!1);return{actionPending:a,perform:async(a,c)=>{if(!(s.current||t===null)){s.current=!0,o(!0);try{let o=await i({environmentId:e,input:{...t,action:a,...c?{mergeMethod:c}:r?{resolveMergeMethod:r}:{}}});if(o._tag===`Failure`)throw v(o);x.add({type:`success`,title:fe[a]}),n?.(a)}catch(e){x.add({type:`error`,title:pe[a],description:F(e,Z[a])})}finally{s.current=!1,o(!1)}}}}}function Q(e){let t=O(P.runAction,{reportFailure:!1}),n=(0,B.useRef)(new Set),[r,i]=(0,B.useState)(()=>new Set);return{close:(0,B.useCallback)(async r=>{let a=r.filter(e=>{let t=N(e);return e.state!==`open`||n.current.has(t)?!1:(n.current.add(t),!0)});if(a.length===0)return;i(new Set(n.current));let o=0,s=[];await Promise.all(a.map(async r=>{try{let n=await t({environmentId:r.environmentId,input:{projectId:r.projectId,host:r.host,repository:r.repository,number:r.number,action:`close`}});if(n._tag===`Failure`)throw v(n);o++,e(r)}catch(e){s.push(`#${r.number}: ${F(e,Z.close)}`)}finally{n.current.delete(N(r)),i(new Set(n.current))}})),x.add({type:s.length>0?`error`:`success`,title:s.length>0?`Closed ${o} of ${a.length} pull requests`:`Closed ${o} pull request${o===1?``:`s`}`,...s.length>0?{description:s.slice(0,3).join(`
|
|
1
|
+
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{r as t}from"./Icon-l19w4AjM.js";import{D as n,Go as r,Gs as i,Lc as a,NE as o,NT as s,Ss as c,Yo as l,__ as u,fw as d,k_ as f,ms as p,w_ as m,ys as h}from"./utils-BctiQ4Ue.js";import{M as g,N as _,W as v}from"./runtime-DATbE5vH.js";import{a as y,i as b}from"./vcsRefInvalidation-cn2N4Xey.js";import{C as ee}from"./entities-Bj5ceyfn.js";import{t as te}from"./runtime-Dks8Wo5P.js";import{i as x}from"./toast-gFAddE-Q.js";import{O as S,f as C,s as w}from"./useSettings-B_WzhJqU.js";import{i as T,n as E}from"./session-Bgs0dTwK.js";import{n as D}from"./query-tgXMuDtS.js";import{t as O}from"./use-atom-command-BJxdfyHC.js";import{d as k,l as A,u as j}from"./queries-lVyDrFzk.js";import{t as M}from"./sourceControl-CrjTZJC-.js";import{C as N,r as P}from"./pullRequests-DLPX2CY-.js";import{R as F,b as ne,y as re}from"./pullRequestDetail.logic-DT8Qo5OA.js";import{n as ie}from"./useHandleNewThread-BUYzfgdc.js";import{c as ae,f as I,i as L,s as R}from"./p4ProjectFile-B9fwmcbM.js";import{t as z}from"./sidebarProjectGrouping-JqsedUb6.js";var B=e(t(),1),V=o();function H(e){return{pullRequestResolution:_(e,{label:`environment-data:git:resolve-pull-request`,tag:a.gitResolvePullRequest}),preparePullRequestThread:g(e,{label:`environment-data:git:prepare-pull-request-thread`,tag:a.gitPreparePullRequestThread,scheduler:y,concurrency:b})}}var U=H(te),W={init:`init`,pull:`pull`,publishRepository:`publish_repository`,runStackedAction:`run_change_request`,preparePullRequestThread:`prepare_pull_request_thread`};function G(e){let t=T(e.scope.environmentId,m),n=W[e.kind],i=l(A.stateAtom(e.scope)),a=i.operation===n,o=(0,B.useCallback)(()=>{A.resetError(r,e.scope,n)},[e.scope,n]),s=(0,B.useCallback)(async(...t)=>{if(e.scope.environmentId===null||!E(e.scope.environmentId,`source-control:write`))return p(d(new f({requiredScope:m,message:`This connection cannot change source control.`})));let i=async()=>{let n=await e.action(...t);return h(n)&&e.onSuccess?.(),n};return e.managedExternally===!0?i():A.track(r,e.scope,{operation:n,label:e.label},i)},[e.action,e.label,e.managedExternally,e.onSuccess,e.scope,n]);return{isAllowed:t,error:a?i.error:null,isPending:a&&i.isRunning,resetError:o,run:s}}function K(e){return e.environmentId===null||e.cwd===null?null:{environmentId:e.environmentId,cwd:e.cwd}}function q(e,t){let n=(0,V.c)(6),r;n[0]===e?r=n[1]:(r=A.stateAtom(e),n[0]=e,n[1]=r);let i=l(r),a;return n[2]!==t||n[3]!==i.isRunning||n[4]!==i.operation?(a=i.isRunning&&i.operation!==null&&t.some(e=>W[e]===i.operation),n[2]=t,n[3]=i.isRunning,n[4]=i.operation,n[5]=a):a=n[5],a}function J(e){let t=(0,V.c)(7),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n={reportFailure:!1},t[0]=n):n=t[0];let r=O(j.init,n),i;t[1]!==r||t[2]!==e?(i=async()=>{let t=K(e);return t===null?p(d(new k({operation:`init`,environmentId:e.environmentId,cwd:e.cwd}))):r({environmentId:t.environmentId,input:{cwd:t.cwd}})},t[1]=r,t[2]=e,t[3]=i):i=t[3];let a=i,o;return t[4]!==a||t[5]!==e?(o={kind:`init`,label:`Initializing repository`,scope:e,action:a},t[4]=a,t[5]=e,t[6]=o):o=t[6],G(o)}function oe(e){let t=(0,V.c)(11),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n={reportFailure:!1},t[0]=n):n=t[0];let r=O(j.pull,n),i;t[1]!==e.cwd||t[2]!==e.environmentId?(i=e.environmentId!==null&&e.cwd!==null?j.status({environmentId:e.environmentId,input:{cwd:e.cwd}}):null,t[1]=e.cwd,t[2]=e.environmentId,t[3]=i):i=t[3];let a=D(i),o;t[4]!==r||t[5]!==e?(o=async()=>{let t=K(e);return t===null?p(d(new k({operation:`pull`,environmentId:e.environmentId,cwd:e.cwd}))):r({environmentId:t.environmentId,input:{cwd:t.cwd}})},t[4]=r,t[5]=e,t[6]=o):o=t[6];let s=o,c;return t[7]!==s||t[8]!==e||t[9]!==a.refresh?(c={kind:`pull`,label:`Pulling latest changes...`,scope:e,action:s,onSuccess:a.refresh},t[7]=s,t[8]=e,t[9]=a.refresh,t[10]=c):c=t[10],G(c)}function se(e){let t=(0,V.c)(13),n;t[0]===e?n=t[1]:(n=A.runStackedAction(e),t[0]=e,t[1]=n);let r;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(r={reportFailure:!1},t[2]=r):r=t[2];let i=O(n,r),a;t[3]!==e.cwd||t[4]!==e.environmentId?(a=e.environmentId!==null&&e.cwd!==null?j.status({environmentId:e.environmentId,input:{cwd:e.cwd}}):null,t[3]=e.cwd,t[4]=e.environmentId,t[5]=a):a=t[5];let o=D(a),s;t[6]!==i||t[7]!==e?(s=async t=>K(e)===null?p(d(new k({operation:`run_change_request`,environmentId:e.environmentId,cwd:e.cwd}))):i(t),t[6]=i,t[7]=e,t[8]=s):s=t[8];let c=s,l;return t[9]!==c||t[10]!==e||t[11]!==o.refresh?(l={kind:`runStackedAction`,label:`Running source control action`,scope:e,action:c,onSuccess:o.refresh,managedExternally:!0},t[9]=c,t[10]=e,t[11]=o.refresh,t[12]=l):l=t[12],G(l)}function ce(e){let t=(0,V.c)(11),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n={reportFailure:!1},t[0]=n):n=t[0];let r=O(M.publishRepository,n),i;t[1]!==e.cwd||t[2]!==e.environmentId?(i=e.environmentId!==null&&e.cwd!==null?j.status({environmentId:e.environmentId,input:{cwd:e.cwd}}):null,t[1]=e.cwd,t[2]=e.environmentId,t[3]=i):i=t[3];let a=D(i),o;t[4]!==r||t[5]!==e?(o=async t=>{let n=K(e);return n===null?p(d(new k({operation:`publish_repository`,environmentId:e.environmentId,cwd:e.cwd}))):r({environmentId:n.environmentId,input:{cwd:n.cwd,...t}})},t[4]=r,t[5]=e,t[6]=o):o=t[6];let s=o,c;return t[7]!==s||t[8]!==e||t[9]!==a.refresh?(c={kind:`publishRepository`,label:`Publishing repository`,scope:e,action:s,onSuccess:a.refresh},t[7]=s,t[8]=e,t[9]=a.refresh,t[10]=c):c=t[10],G(c)}function Y(e){let t=(0,V.c)(7),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n={reportFailure:!1},t[0]=n):n=t[0];let r=O(U.preparePullRequestThread,n),i;t[1]!==r||t[2]!==e?(i=async t=>{let n=K(e);return n===null?p(d(new k({operation:`prepare_pull_request_thread`,environmentId:e.environmentId,cwd:e.cwd}))):t.mode===`worktree`&&t.threadId!==void 0&&!E(n.environmentId,`orchestration:operate`)?p(d(new f({requiredScope:u,message:`This connection cannot change threads.`}))):r({environmentId:n.environmentId,input:{cwd:n.cwd,reference:t.reference,mode:t.mode,...t.threadId?{threadId:t.threadId}:{}}})},t[1]=r,t[2]=e,t[3]=i):i=t[3];let a=i,o;return t[4]!==a||t[5]!==e?(o={kind:`preparePullRequestThread`,label:`Preparing pull request thread`,scope:e,action:a},t[4]=a,t[5]=e,t[6]=o):o=t[6],G(o)}function X(e){return e.environmentId===null||e.cwd===null||e.reference===null?null:s(c(r.get(U.pullRequestResolution({environmentId:e.environmentId,input:{cwd:e.cwd,reference:e.reference}}))))}function le(e){let t=(0,V.c)(12),n;t[0]!==e.cwd||t[1]!==e.environmentId||t[2]!==e.reference?(n=e.environmentId!==null&&e.cwd!==null&&e.reference!==null?U.pullRequestResolution({environmentId:e.environmentId,input:{cwd:e.cwd,reference:e.reference}}):null,t[0]=e.cwd,t[1]=e.environmentId,t[2]=e.reference,t[3]=n):n=t[3];let r=D(n),i;t[4]===e?i=t[5]:(i=X(e),t[4]=e,t[5]=i);let a=i,o=r.data??a,s=r.isPending&&a===null,c;return t[6]!==r.error||t[7]!==r.isPending||t[8]!==r.refresh||t[9]!==o||t[10]!==s?(c={data:o,error:r.error,isPending:s,isFetching:r.isPending,refresh:r.refresh},t[6]=r.error,t[7]=r.isPending,t[8]=r.refresh,t[9]=o,t[10]=s,t[11]=c):c=t[11],c}function ue(e,t){let n=(0,V.c)(10),r;n[0]===t?r=n[1]:(r=e=>L(e,t).settings.pullRequestMergeMethod,n[0]=t,n[1]=r);let i=C(e,r),a=w(de),o=w(I),s=ee(),c=S(),l;return n[2]!==e||n[3]!==o||n[4]!==a||n[5]!==c||n[6]!==i||n[7]!==t||n[8]!==s?(l=()=>{if(i!=null)return i;if(Object.keys(a).length===0)return;let n=s.find(n=>n.environmentId===e&&n.id===t);if(!n)return;let r=z({projects:s,settings:o,primaryEnvironmentId:c}).get(ae(n))??R(n,o);return a[r]},n[2]=e,n[3]=o,n[4]=a,n[5]=c,n[6]=i,n[7]=t,n[8]=s,n[9]=l):l=n[9],l}function de(e){return e.pullRequestMergeMethodOverrides}var fe={merge:`Merge requested`,ready:`Marked ready for review`,draft:`Converted to draft`,close:`Pull request closed`,reopen:`Pull request reopened`,"update-branch":`Branch updated with the base branch`,"enable-auto-merge":`Auto-merge enabled`,"disable-auto-merge":`Auto-merge disabled`,revert:`Revert pull request opened`,"delete-branch":`Branch deleted`,"approve-workflows":`Workflows approved`},pe={merge:`Could not merge this pull request`,ready:`Could not mark this ready for review`,draft:`Could not convert this to a draft`,close:`Could not close this pull request`,reopen:`Could not reopen this pull request`,"update-branch":`Could not update this branch`,"enable-auto-merge":`Could not enable auto-merge`,"disable-auto-merge":`Could not disable auto-merge`,revert:`Could not open a revert pull request`,"delete-branch":`Could not delete this branch`,"approve-workflows":`Could not approve workflows`},Z={merge:`The host refused the merge. Check that you have write access, that the checks it requires have passed, and that the branch is not conflicting.`,ready:`The host refused it. Check that you have write access to this repository.`,draft:`The host refused it. Check that you have write access to this repository.`,close:`The host refused it. Check that you have write access, or that you opened it.`,reopen:`The host refused it. Check that you have write access, and that the branch still exists.`,"update-branch":`The host refused it. Check that you have write access, and that the base branch has not diverged in a way the host cannot merge.`,"enable-auto-merge":`The host refused it. Check that auto-merge is enabled for this repository and that you have write access.`,"disable-auto-merge":`The host refused it. Check that you have write access to this repository.`,revert:`The host refused it. Check that you have write access and that this pull request was merged on the host.`,"delete-branch":`The host refused it. Check that you have write access to the source repository and that the branch has not moved since this page loaded.`,"approve-workflows":`The host refused it. Check that you have Actions write access and that these workflow runs are still awaiting approval.`};function me({environmentId:e,reference:t,onSuccess:n,resolveMergeMethod:r}){let i=O(P.runAction,{reportFailure:!1}),[a,o]=(0,B.useState)(!1),s=(0,B.useRef)(!1);return{actionPending:a,perform:async(a,c)=>{if(!(s.current||t===null)){s.current=!0,o(!0);try{let o=await i({environmentId:e,input:{...t,action:a,...c?{mergeMethod:c}:r?{resolveMergeMethod:r}:{}}});if(o._tag===`Failure`)throw v(o);x.add({type:`success`,title:fe[a]}),n?.(a)}catch(e){x.add({type:`error`,title:pe[a],description:F(e,Z[a])})}finally{s.current=!1,o(!1)}}}}}function Q(e){let t=O(P.runAction,{reportFailure:!1}),n=(0,B.useRef)(new Set),[r,i]=(0,B.useState)(()=>new Set);return{close:(0,B.useCallback)(async r=>{let a=r.filter(e=>{let t=N(e);return e.state!==`open`||n.current.has(t)?!1:(n.current.add(t),!0)});if(a.length===0)return;i(new Set(n.current));let o=0,s=[];await Promise.all(a.map(async r=>{try{let n=await t({environmentId:r.environmentId,input:{projectId:r.projectId,host:r.host,repository:r.repository,number:r.number,action:`close`}});if(n._tag===`Failure`)throw v(n);o++,e(r)}catch(e){s.push(`#${r.number}: ${F(e,Z.close)}`)}finally{n.current.delete(N(r)),i(new Set(n.current))}})),x.add({type:s.length>0?`error`:`success`,title:s.length>0?`Closed ${o} of ${a.length} pull requests`:`Closed ${o} pull request${o===1?``:`s`}`,...s.length>0?{description:s.slice(0,3).join(`
|
|
2
2
|
`)}:{}})},[e,t]),closingKeys:r}}var $=new Map;function he(e){let t=(0,V.c)(21),{environmentId:r,detail:a}=e,o=ie(),s=a?.workspaceRoot??null,c;t[0]!==r||t[1]!==s?(c={environmentId:r,cwd:s},t[0]=r,t[1]=s,t[2]=c):c=t[2];let l=Y(c),[u,d]=(0,B.useState)(null),f;t[3]===o?f=t[4]:(f=async(e,t,r)=>{let i=r??await o(e).then(xe,be);if(i===null)return null;let a=n.getState();if(t===null)return i;let s=a.getComposerDraft(i.draftId),c=s?.reviewComments??[],l=re({prompt:s?.prompt??``,lastHandoffPrompt:$.get(i.draftId)},t.prompt);return $.set(i.draftId,t.prompt),a.setPrompt(i.draftId,l),a.setReviewComments(i.draftId,ne(c,t.reviewComments??[])),i},t[3]=o,t[4]=f);let p=f,m;t[5]!==a||t[6]!==r||t[7]!==u||t[8]!==p?(m=async(e,t)=>{if(!a||u!==null)return;d(e);let n=i(r,a.projectId),o=await p(n,t);if(d(null),o===null){x.add({type:`error`,title:`Could not open a thread`,description:`Try again from the project, or open a thread first.`});return}x.add({type:`success`,title:`Asked in a thread`,description:t.prompt.length>0?`The question is in the composer — read it over, then send.`:`The pull request is in the composer — type your question, then send.`})},t[5]=a,t[6]=r,t[7]=u,t[8]=p,t[9]=m):m=t[9];let h=m,g;t[10]!==a||t[11]!==r||t[12]!==u||t[13]!==o||t[14]!==p||t[15]!==l?(g=async(e,t,n)=>{let s=n===void 0?`worktree`:n;if(!a||u!==null)return;d(e);let c=x.add({type:`loading`,title:`Preparing the pull request checkout...`}),f=i(r,a.projectId),m=await o(f).then(ye,ve);if(m===null){d(null),x.update(c,{type:`error`,title:`Could not open a thread for the checkout`,description:`Try again from the project, or open a thread first.`});return}let h=await l.run({reference:a.url,mode:s,threadId:m.threadId});if(h._tag===`Failure`){d(null);let e=l.error instanceof Error?l.error.message:null;x.update(c,{type:`error`,title:`Could not prepare the pull request checkout`,...e?{description:e}:{}});return}if(!await o(f,{branch:h.value.branch,worktreePath:h.value.worktreePath,envMode:h.value.worktreePath===null?`local`:`worktree`}).then(_e,ge)){d(null),x.update(c,{type:`error`,title:`Checked out, but the thread stayed where it was`,description:`The checkout is ready on \`${h.value.branch}\`. Point a thread at it from the branch picker, then ask again.`});return}d(null);let g={type:`warning`,title:`Checked out, but not on the latest commits`,description:`The checkout could not be moved onto the pull request's latest commits, so the code there is older than the pull request. Uncommitted work or local commits keep it where it is.`};if(t===null){x.update(c,h.value.isOnPullRequestHead?{type:`success`,title:s===`local`?`Checked out here`:`Checked out`,description:s===`local`?`This repository is on the pull request's branch, with a thread open on it.`:`The pull request is in its own worktree, with a thread open on it.`}:g);return}await p(f,t,m),x.update(c,h.value.isOnPullRequestHead?{type:`success`,title:`Checkout ready`,description:`The task is in the composer — read it over, then send.`}:g)},t[10]=a,t[11]=r,t[12]=u,t[13]=o,t[14]=p,t[15]=l,t[16]=g):g=t[16];let _=g,v;return t[17]!==u||t[18]!==h||t[19]!==_?(v={handoff:u,startAsk:h,startHandoff:_},t[17]=u,t[18]=h,t[19]=_,t[20]=v):v=t[20],v}function ge(){return!1}function _e(e){return e!==null}function ve(){return null}function ye(e){return e}function be(){return null}function xe(e){return e}export{X as a,le as c,J as d,oe as f,he as i,q as l,Q as n,se as o,ue as r,Y as s,me as t,ce as u};
|
|
3
|
-
//# sourceMappingURL=usePullRequestActions-
|
|
3
|
+
//# sourceMappingURL=usePullRequestActions-DGkavykA.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{r as t}from"./Icon-l19w4AjM.js";import{Fa as n,Ln as r}from"./utils-
|
|
2
|
-
//# sourceMappingURL=useRegisterFieldControl-
|
|
1
|
+
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{r as t}from"./Icon-l19w4AjM.js";import{Fa as n,Ln as r}from"./utils-BctiQ4Ue.js";var i=e(t());function a(e,t,a,o,s=!0){let{registerFieldControl:c}=r(),l=i.useRef(null);l.current||=Symbol(),n(()=>{let n=l.current;if(n&&s)return c(n,{controlRef:e,getValue:o,id:t,value:a}),()=>{c(n,void 0)}},[e,s,o,t,c,a])}export{a as t};
|
|
2
|
+
//# sourceMappingURL=useRegisterFieldControl-CosvijuC.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Ht as e,NE as t,Nt as n,Vt as r}from"./utils-
|
|
2
|
-
//# sourceMappingURL=useScopedModelAvailability-
|
|
1
|
+
import{Ht as e,NE as t,Nt as n,Vt as r}from"./utils-BctiQ4Ue.js";import{E as i,i as a}from"./useSettings-B_WzhJqU.js";import{B as o}from"./settingsLayout-BQsOdImg.js";var s=t();function c(t,c){let l=(0,s.c)(5),{targets:u}=o(),{environments:d}=i(),f;return l[0]!==c||l[1]!==d||l[2]!==t||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=r(e(u.providers),c.settings,c.projectId).find(e=>e.instanceId===i),p=n(a(c.settings,t),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]=t,l[3]=u,l[4]=f):f=l[4],f}export{c as t};
|
|
2
|
+
//# sourceMappingURL=useScopedModelAvailability-DOJzIjns.js.map
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{r as t}from"./Icon-l19w4AjM.js";import{$o as n,$w as r,$x as i,$y as a,By as o,C_ as s,Ch as c,Cs as l,Cy as u,Dc as d,Fb as f,Fg as ee,Go as p,Gy as te,Iy as ne,LT as re,MT as ie,Mb as ae,NE as oe,NT as m,Ng as se,Ox as ce,Oy as le,P_ as ue,Pb as de,Rs as fe,Sb as pe,Ss as me,Th as he,Ts as ge,Xo as _e,Yo as h,Yw as g,Zo as ve,Zw as _,Zy as ye,ah as be,bh as xe,ch as Se,db as Ce,dh as we,gl as Te,hh as Ee,hl as De,i_ as Oe,ib as ke,ih as Ae,j_ as je,jb as Me,kb as Ne,kv as Pe,n_ as Fe,qy as Ie,r_ as Le,rb as Re,ss as v,tS as ze,th as Be,uh as Ve,vl as He,wh as Ue,xb as We,ys as Ge}from"./utils-BctiQ4Ue.js";import{At as Ke,E as qe,I as Je,R as Ye,Sn as Xe,T as Ze,W as Qe,_t as y}from"./runtime-DATbE5vH.js";import{Ct as $e,T as et,t as tt,yt as nt}from"./runtime-Dks8Wo5P.js";import{i as b}from"./toast-gFAddE-Q.js";import{f as x,h as S,m as rt,u as it}from"./server-rxH1493J.js";import{i as at,n as ot,s as st,t as ct}from"./session-Bgs0dTwK.js";import{t as C}from"./use-atom-command-BJxdfyHC.js";import{B as lt,C as ut,M as dt,N as ft,O as pt,P as mt,S as ht,_ as gt,b as _t,c as vt,i as w,n as yt,o as bt,r as xt,y as St,z as Ct}from"./themePalette-Co4xeJnW.js";var T=e(t(),1),E=oe();function wt(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 Tt(e){let t=ve(t=>n(n=>{let r=n(e.catalogValueAtom).entries.get(t);if(r===void 0)return null;let i=ie(me(n(e.stateAtom(t))),()=>Xe);return{entry:r,connection:r.unsupportedReason===void 0?$e(i):{phase:`unsupported`,error:r.unsupportedReason,traceId:null},serverConfig:n(e.serverConfigValueAtom(t))}}).pipe(v(`environment-presentation:${t}`))),r=new Map;return{presentationAtom:t,presentationsAtom:n(n=>{let i=new Map;for(let r of n(e.catalogValueAtom).entries.keys()){let e=n(t(r));e!==null&&i.set(r,e)}return wt(r,i)||(r=i),r}).pipe(v(`environment-presentations`))}}function Et(e,t){return{environmentId:e,environmentLabel:t.entry.target.label,displayUrl:nt(t.entry)??``,isRelayManaged:Ke(t.entry),isEnabled:t.entry.enabled,connectionState:t.connection.phase,connectionError:t.connection.error,connectionErrorTraceId:t.connection.traceId}}function Dt(e){let t=n(t=>{let n=[...t(e.catalogValueAtom).entries.keys()],r=m(t.self());return r!==null&&r.length===n.length&&n.every((e,t)=>e===r[t])?r:n}),r=n(t=>{let n=[...t(e.catalogValueAtom).entries].map(([e,t])=>({environmentId:e,label:t.target.label})),r=m(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}),i=ve(t=>n(n=>{let r=n(e.presentationAtom(t));if(r===null)return null;let i=Et(t,r),a=m(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})),a=n(t=>{let n=[];for(let r of t(e.catalogValueAtom).entries.keys()){let e=t(i(r));e!==null&&n.push(e)}let r=m(t.self());return r!==null&&r.length===n.length&&n.every((e,t)=>e===r[t])?r:n}).pipe(v(`environment-connection-summaries`));return{environmentIdsAtom:t,connectedEnvironmentIdsAtom:n(e=>{let n=e(t).filter(t=>e(i(t))?.connectionState===`connected`),r=m(e.self());return r!==null&&r.length===n.length&&n.every((e,t)=>e===r[t])?r:n}),identitiesAtom:r,environmentsAtom:a,machineByIdAtom:n(n=>{let r=new Map(n(t).map(t=>[t,He(n(e.presentationAtom(t))?.serverConfig??null)])),i=m(n.self());return i!==null&&wt(i,r)?i:r}),pullRequestsSupportedAtom:n(n=>n(t).some(t=>n(e.presentationAtom(t))?.serverConfig?.environment.capabilities.pullRequests===!0))}}var Ot=Tt({catalogValueAtom:S.catalogValueAtom,stateAtom:S.stateAtom,serverConfigValueAtom:x.configValueAtom}),kt=Dt({catalogValueAtom:S.catalogValueAtom,presentationAtom:Ot.presentationAtom}),At=n(null).pipe(v(`web-environment-presentation:empty`));function jt(e){let t=(0,E.c)(5),n=h(S.catalogValueAtom),r;t[0]===e?r=t[1]:(r=e===null?At:Ot.presentationAtom(e),t[0]=e,t[1]=r);let i=h(r),a;return t[2]!==n.isReady||t[3]!==i?(a={isReady:n.isReady,presentation:i},t[2]=n.isReady,t[3]=i,t[4]=a):a=t[4],a}var Mt={status:`idle`},D=Mt,O=null,k=[],A=0,Nt=new Set;function j(e){D=e;for(let e of Nt)e()}function Pt(e){O?.resolve(e);for(let t of k)t.resolve(e);O=null,k=[]}function Ft(){return D}function It(e){return Nt.add(e),()=>{Nt.delete(e)}}function Lt(){A+=1;let e=!0;return()=>{e&&(e=!1,A=Math.max(0,A-1),A===0&&(Pt(!1),j(Mt)))}}function Rt(e,t){if(A!==0)return new Promise(n=>{let r={message:e,variant:t?.variant??`default`,resolve:n};if(O||D.status===`closing`){k.push(r);return}O=r,j({status:`confirming`,message:e,variant:r.variant})})}function zt(){return D.status!==`idle`||O!==null||k.length>0}function Bt(e){if(D.status!==`confirming`||!O)return;let t=O;O=null,t.resolve(e),j({status:`closing`,message:D.message,variant:D.variant})}function Vt(){if(D.status!==`closing`)return;let e=k.shift();if(!e){j(Mt);return}O=e,j({status:`confirming`,message:e.message,variant:e.variant})}var Ht={Ctrl:`⌃`,Alt:`⌥`,Shift:`⇧`,Super:`⌘`,CmdOrCtrl:`⌘`};function Ut(e,t=navigator.platform){let n=e.split(`+`),r=n.pop()??``;return d(t)?`${n.map(e=>Ht[e]??e).join(``)}${r}`:[...n.map(e=>e===`CmdOrCtrl`?`Ctrl`:e===`Super`?`Meta`:e),r].join(`+`)}var Wt=`http://www.w3.org/2000/svg`,Gt={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`}}],"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-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-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`}}],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 Kt(e,t){let n=Gt[e];if(!n||typeof document.createElementNS!=`function`)return null;let r=document.createElementNS(Wt,`svg`);r.setAttribute(`xmlns`,Wt),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(Wt,e.tag);for(let[n,r]of Object.entries(e.attrs))t.setAttribute(n,r);r.appendChild(t)}return r}function qt(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 Jt(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 M=null;function Yt(){return M!==null}function Xt(){M?.(),M=null}function Zt(e,t){return new Promise(n=>{let r=document.activeElement instanceof HTMLElement?document.activeElement:null,i=[],a=[],o=!1,s=!1,c=()=>l(null),l=e=>{if(o)return;o=!0,M===c&&(M=null),document.removeEventListener(`keydown`,u),document.removeEventListener(`pointerdown`,f,!0),document.removeEventListener(`contextmenu`,ee,!0);let t=Jt(document.activeElement,i);for(let e of i)e.remove();t&&r?.isConnected&&r.focus({preventScroll:!0}),n(e)},u=e=>{e.key===`Escape`&&(e.preventDefault(),l(null))},f=e=>{s&&!Jt(e.target,i)&&l(null)},ee=e=>{s&&!Jt(e.target,i)&&(e.preventDefault(),l(null))},p=e=>{for(;i.length>e;)a.pop()?.setAttribute(`aria-expanded`,`false`),i.pop()?.remove()},te=(e,t,n,r,o)=>{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`),a=document.createElement(`button`);a.type=`button`;let o=t.disabled===!0;a.disabled=o;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(a.className=o?`${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`,a.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&&(a.style.color=`var(--destructive-foreground)`),o&&(a.style.color=`var(--contrast-muted-foreground)`,a.style.opacity=`0.64`,a.style.pointerEvents=`none`),typeof t.checked==`boolean`){a.setAttribute(`role`,`menuitemradio`),a.setAttribute(`aria-checked`,t.checked?`true`:`false`);let e=t.checked?Kt(`check`,`neutral`):null;if(e)a.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`),a.appendChild(e)}}else if(typeof t.icon==`string`){let e=Kt(t.icon,n?`destructive`:`neutral`);e&&a.appendChild(e)}let f=document.createElement(`span`);if(f.className=`min-w-0 flex-1 truncate`,f.textContent=t.label,a.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=Ut(t.accelerator),e.setAttribute(`aria-hidden`,`true`),a.setAttribute(`aria-keyshortcuts`,t.accelerator.replace(`CmdOrCtrl`,d(navigator.platform)?`Meta`:`Control`)),a.appendChild(e)}if(e){a.setAttribute(`aria-haspopup`,`menu`),a.setAttribute(`aria-expanded`,`false`);let e=Kt(`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`,a.appendChild(e))}if(!o){let o=!1,c=!1,u=()=>{let e=o||c;a.style.background=e?n?`color-mix(in srgb, var(--destructive) 10%, transparent)`:`var(--accent)`:`transparent`,a.style.color=e?n?`var(--destructive-foreground)`:`var(--contrast-accent-foreground)`:n?`var(--destructive-foreground)`:`var(--contrast-foreground)`};if(a.addEventListener(`mouseenter`,()=>{a.focus({preventScroll:!0}),o=!0,u()}),a.addEventListener(`mouseleave`,()=>{o=!1,u()}),a.addEventListener(`focus`,()=>{c=!0,u()}),a.addEventListener(`blur`,()=>{c=!1,u()}),e){let e=(e=!1)=>{let n=a.getBoundingClientRect(),o=n.right+4,s=n.top;te(t.children,o,s,r+1,a),a.setAttribute(`aria-expanded`,`true`);let c=i[r+1];if(!c)return;let l=c.getBoundingClientRect();l.right>window.innerWidth&&qt(c,n.left-l.width-4,n.top),e&&[...c.querySelectorAll(`button`)].find(e=>!e.disabled)?.focus()};a.addEventListener(`mouseenter`,()=>{e()}),a.addEventListener(`click`,t=>{t.preventDefault(),e(!0)})}else a.addEventListener(`mouseenter`,()=>{p(r+1)}),a.addEventListener(`click`,()=>{s&&l(t.id)})}u.appendChild(a)}c.appendChild(u),c.addEventListener(`mouseenter`,()=>{p(r+1)}),document.body.appendChild(c),i[r]=c,a[r]=o,requestAnimationFrame(()=>{qt(c,t,n)})};document.addEventListener(`keydown`,u),document.addEventListener(`pointerdown`,f,!0),document.addEventListener(`contextmenu`,ee,!0),te(e,t?.x??0,t?.y??0,0),M&&M(),M=c,requestAnimationFrame(()=>{s=!0})})}var Qt=`p4code:client-settings:v1`;function $t(){return typeof window<`u`}function en(){return $t()?l(Qt,Be):null}function tn(e){$t()&&ge(Qt,e,Be)}var nn;function rn(){return{dialogs:{pickFolder:async e=>window.desktopBridge?window.desktopBridge.pickFolder(e):null,confirm:async(e,t)=>Rt(e,t)??!1},shell:{openExternal:async e=>{if(window.desktopBridge){if(!await window.desktopBridge.openExternal(e))throw Error(`Unable to open link.`);return}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):Zt(e,t),close:async()=>{window.desktopBridge||Xt()}},persistence:{getClientSettings:async()=>window.desktopBridge?window.desktopBridge.getClientSettings():en(),setClientSettings:async e=>{if(window.desktopBridge)return window.desktopBridge.setClientSettings(e);tn(e)}}}}function an(){return rn()}function on(){if(typeof window<`u`)return nn||(nn=an(),nn)}function sn(){let e=on();if(!e)throw Error(`Local API not found`);return e}var N=`p4code:theme`,cn=`(prefers-color-scheme: dark)`,P={theme:`system`,resolvedTheme:`light`,systemDark:!1,followSystem:!0,appearanceMode:`system`,themeHalves:null};function ln(){return F()}function un(){return typeof window>`u`?{}:dn()}function F(){if(typeof window>`u`)return null;try{return pt(window.localStorage.getItem(w))}catch{return null}}function dn(){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 I(e){return`${e?.light??``}|${e?.dark??``}`}var fn=`theme-color`,pn=`meta[name="${fn}"][data-dynamic-theme-color="true"]`,L=class extends o()(`ThemeStorageError`,{operation:le([`read`,`write`]),storageKey:ne,theme:Ce(bt),cause:u()}){get message(){return`Failed to ${this.operation} theme preference for ${this.storageKey}.`}},mn=ke(L),hn=class extends o()(`DesktopThemeSyncError`,{theme:bt,cause:u()}){get message(){return`Failed to sync the ${this.theme} theme to the desktop shell.`}},gn=ke(hn),R=[],z=null,_n=!0,B=null,V=null,H=null;function U(){_n=!0;for(let e of R)e()}function vn(){return typeof window<`u`&&typeof window.matchMedia==`function`&&window.matchMedia(cn).matches}function yn(e){if(typeof window>`u`)return e===`system`;try{let e=window.localStorage.getItem(xt);if(e===`true`)return!0;if(e===`false`)return!1}catch{}return e===`system`}function bn(e){return e===`light`||e===`dark`||e===`system`}function W(e){if(typeof window<`u`)try{let e=window.localStorage.getItem(yt);if(bn(e))return e}catch{}return yn(e)?`system`:St(e)??`light`}function xn(e){if(typeof window<`u`)try{window.localStorage.setItem(yt,e)}catch(e){throw new L({operation:`write`,storageKey:yt,cause:e})}}function Sn(){if(typeof window>`u`)return P.theme;let e;try{e=window.localStorage.getItem(N)}catch(e){throw new L({operation:`read`,storageKey:N,cause:e})}return e!==null&&ut(e)?e:P.theme}function Cn(e){if(typeof window<`u`)try{window.localStorage.setItem(N,e),H=null}catch(t){throw new L({operation:`write`,storageKey:N,theme:e,cause:t})}}function G(){if(H!==null)return P.theme;try{return Sn()}catch(e){let t=mn(e)?e:new L({operation:`read`,storageKey:N,cause:e});return H=t,console.error(t.message,{operation:t.operation,storageKey:t.storageKey,...y(t)}),P.theme}}function wn(){let e=document.querySelector(pn);return e||(e=document.createElement(`meta`),e.name=fn,e.setAttribute(`data-dynamic-theme-color`,`true`),document.head.append(e),e)}function Tn(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 En(){return document.querySelector(`main[data-slot='sidebar-inset']`)??document.querySelector(`[data-slot='sidebar-inner']`)??document.body}function Dn(){if(typeof document>`u`||typeof getComputedStyle>`u`)return;let e=getComputedStyle(document.documentElement),t=document.documentElement.dataset.themeId?Tn(e.getPropertyValue(`--app-chrome-background`)):null,n=Tn(getComputedStyle(En()).backgroundColor),r=Tn(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="${fn}"]`);if(a.length===0){wn().setAttribute(`content`,i);return}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?vn():!1,o=F();if(V?.theme===e&&V.systemDark===a&&V.followSystem===i&&V.appearanceMode===r&&I(V.themeHalves)===I(o)){kn(e,i,r);return}t&&document.documentElement.classList.add(`no-transitions`);let s=ft(e,a,i,r,o);vt(mt(e,o,s),s),document.documentElement.classList.toggle(`dark`,s===`dark`),V={theme:e,systemDark:a,followSystem:i,appearanceMode:r,themeHalves:o},Dn(),kn(e,i,r),t&&(document.documentElement.offsetHeight,requestAnimationFrame(()=>{document.documentElement.classList.remove(`no-transitions`)}))}async function On(e,t,n,r,i=F()){try{await e.setTheme(dt(t,n,r,i))}catch(e){throw new hn({theme:t,cause:e})}}function kn(e,t,n){if(typeof window>`u`)return;let r=window.desktopBridge,i=F(),a=dt(e,t,n,i);r&&typeof r.setTheme==`function`&&B!==a&&(B=a,On(r,e,t,n,i).catch(t=>{let n=gn(t)?t:new hn({theme:e,cause:t});console.error(n.message,{theme:n.theme,...y(n)}),B===a&&(B=null)}))}typeof document<`u`&&typeof window<`u`&&K(G());function An(){if(typeof window>`u`)return P;if(!_n&&z)return z;_n=!1;let e=G(),t=W(e),n=t===`system`,r=n?vn():!1,i=F(),a=ft(e,r,n,t,i);return z&&z.theme===e&&z.resolvedTheme===a&&z.systemDark===r&&z.followSystem===n&&z.appearanceMode===t&&I(z.themeHalves)===I(i)||(z={theme:e,resolvedTheme:a,systemDark:r,followSystem:n,appearanceMode:t,themeHalves:i}),z}function jn(){return P}function Mn(){let e=G();W(e)===`system`&&K(e,{suppressTransitions:!0}),U()}function Nn(e){e.key===N?(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),ht(),V=null,K(G(),{suppressTransitions:!0}),U())}var Pn=null;function Fn(e){if(typeof window>`u`)return()=>{};if(R.push(e),!Pn){let e=typeof window.matchMedia==`function`?window.matchMedia(cn):null;e?.addEventListener(`change`,Mn),window.addEventListener(`storage`,Nn),Pn=()=>{e?.removeEventListener(`change`,Mn),window.removeEventListener(`storage`,Nn)}}return()=>{R=R.filter(t=>t!==e),R.length===0&&(Pn?.(),Pn=null)}}function In(){let e=(0,T.useSyncExternalStore)(Fn,An,jn),{theme:t,resolvedTheme:n}=e,r=(0,T.useCallback)(e=>{if(typeof window>`u`)return!1;try{xn(W(G()));let t=window.localStorage.getItem(w);window.localStorage.removeItem(w);try{Cn(e)}catch(e){if(t!==null)try{window.localStorage.setItem(w,t)}catch{}throw e}}catch(t){let n=mn(t)?t:new L({operation:`write`,storageKey:N,theme:e,cause:t});return console.error(n.message,{operation:n.operation,storageKey:n.storageKey,theme:e,...y(n)}),!1}return K(e,{suppressTransitions:!0}),U(),!0},[]),i=(0,T.useCallback)(e=>{if(typeof window>`u`)return!1;try{xn(e)}catch(e){let t=mn(e)?e:new L({operation:`write`,storageKey:yt,cause:e});return console.error(t.message,{operation:t.operation,storageKey:t.storageKey,...y(t)}),!1}return H=null,K(G(),{suppressTransitions:!0}),U(),!0},[]),a=(0,T.useCallback)(e=>{let n=W(t),r=e?`system`:n===`system`?St(t)??`light`:n;return i(r)},[i,t]),o=(0,T.useCallback)((e,t)=>{if(typeof window>`u`)return!1;try{let n={...dn()};t===null?delete n[e]:n[e]=t,n.light===void 0&&n.dark===void 0?window.localStorage.removeItem(w):window.localStorage.setItem(w,JSON.stringify(n))}catch(e){let t=new L({operation:`write`,storageKey:w,cause:e});return console.error(t.message,{operation:t.operation,storageKey:t.storageKey,...y(t)}),!1}return K(G(),{suppressTransitions:!0}),U(),!0},[]),s=(0,T.useCallback)(()=>{if(typeof window>`u`)return!1;try{window.localStorage.removeItem(w)}catch(e){let t=new L({operation:`write`,storageKey:w,cause:e});return console.error(t.message,{operation:t.operation,storageKey:t.storageKey,...y(t)}),!1}return K(G(),{suppressTransitions:!0}),U(),!0},[]),c=(0,T.useCallback)(({preservePreview:e=!1}={})=>{typeof window<`u`&&(V=null,K(G(),{suppressTransitions:!0,preservePreview:e}),U())},[]);return(0,T.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 Ln=Ie(Re(te)),Rn=f(e=>{let t=e.replace(/("(?:[^"\\]|\\.)*")|\/\/[^\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??``),Ln(t).pipe(ze(e=>e.issue))}),zn=new Ne(Rn,de());ae().pipe(Me(de({space:2})));var Bn=e=>ne.pipe(ye(e,zn)),Vn={performance:{profile:`performance`,automaticGitFetchInterval:_(15),providerHealthRefreshInterval:g(1),hostPowerMonitorActiveInterval:_(30),hostPowerMonitorIdleInterval:g(2),idleClientTtl:_(45),pauseWhenHostLocked:!0,pauseWhenHostLowPower:!1,pauseWhenClientLowPower:!1,pauseWhenOnBattery:!1},balanced:{profile:`balanced`,automaticGitFetchInterval:Ae,providerHealthRefreshInterval:Ve,hostPowerMonitorActiveInterval:_(30),hostPowerMonitorIdleInterval:g(5),idleClientTtl:_(45),pauseWhenHostLocked:!0,pauseWhenHostLowPower:!0,pauseWhenClientLowPower:!0,pauseWhenOnBattery:!1},"battery-saver":{profile:`battery-saver`,automaticGitFetchInterval:_(0),providerHealthRefreshInterval:g(15),hostPowerMonitorActiveInterval:g(1),hostPowerMonitorIdleInterval:g(10),idleClientTtl:_(45),pauseWhenHostLocked:!0,pauseWhenHostLowPower:!0,pauseWhenClientLowPower:!0,pauseWhenOnBattery:!0}};function q(e){return Vn[e]}function Hn(e){return e.profile===`custom`?e.baseProfile??`balanced`:e.profile}function Un(e){let t=Hn(e),n=Vn[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 r(e)===r(t)}function Wn(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 Gn(e){if(e.profile!==`custom`)return{schemaVersion:1,profile:e.profile,overrides:{}};let t=Un(e),n=[Hn(e),`balanced`,`performance`,`battery-saver`];for(let e of n)if(Wn(t,Vn[e]))return{schemaVersion:1,profile:e,overrides:{}};let r=Hn(e),i=Vn[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 Kn(e){let t={schemaVersion:1,profile:be,overrides:{}},n=e.backgroundActivity.profile===t.profile&&e.backgroundActivity.baseProfile===void 0&&Object.keys(e.backgroundActivity.overrides).length===0,i=e.backgroundActivityProfile,a=i!==`balanced`||r(e.automaticGitFetchInterval)!==r(Ae)||r(e.providerHealthRefreshInterval)!==r(Ve);return Un(n&&a?{schemaVersion:1,profile:r(e.automaticGitFetchInterval)===r(q(i).automaticGitFetchInterval)&&r(e.providerHealthRefreshInterval)===r(q(i).providerHealthRefreshInterval)?i:`custom`,baseProfile:i,overrides:{...r(e.automaticGitFetchInterval)===r(q(i).automaticGitFetchInterval)?{}:{automaticGitFetchInterval:e.automaticGitFetchInterval},...r(e.providerHealthRefreshInterval)===r(q(i).providerHealthRefreshInterval)?{}:{providerHealthRefreshInterval:e.providerHealthRefreshInterval}}}:e.backgroundActivity)}function qn(e){let t=Kn(e);return Gn({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 Jn=Bn(Ee);a(Jn);function Yn(e,t){let n=e.providerInstances[t.instanceId];return n===void 0?xe(t.instanceId):he(n)}var Xn=[`codex`,`claudeAgent`,`cursor`,`grok`,`muse`,`pi`,`opencode`,`antigravity`].map(e=>Fe.make(e));function Zn(e,t,n){let r=[...Xn.map(e=>[Oe(e),e]),...n?.includeConfiguredInstances===!0?Object.entries(e).flatMap(([e,t])=>Xn.includes(t.driver)?[[Le.make(e),t.driver]]:[]):[]].find(([e,n])=>t(e,n));if(r===void 0)return null;let[i,a]=r,o=n?.defaultModelSelection,s=e[i]?.config;return o?.instanceId===i&&fe(s?.customModels).some(e=>e.slug===o.model)?o:{instanceId:i,model:ee[a]??se[a]??`gpt-6-luna`}}function Qn(e,t,n){let r=e.sourceControlWriterModelSelection;if(!r||!Ue(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&&De(i)&&Te(i)?r:e.textGenerationModelSelection}function $n(e,t,n){let r=e.reviewGuideModelSelection;if(r&&Ue(e,n,r.instanceId)){let e=t?.find(e=>e.instanceId===r.instanceId);if(t===void 0||e?.enabled===!0&&De(e)&&Te(e))return r}return Qn(e,t,n)}function er(e,t={}){return{favorites:e.favorites??t.favorites??[],providerModelPreferences:e.providerModelPreferences??t.providerModelPreferences??{}}}function tr(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 nr=new Set([`continueThreadsAfterServerUpdate`,`sidebarAutoSettleAfterDays`,`sidebarAutoSettleOnMerge`,`autoResumeLimitedThreads`,`snoozeLimitedThreads`,`newWorktreesStartFromOrigin`,`sourceControlWritingStyle`,`textGenerationModelSelection`]);function rr(e){let t={},n={};for(let[r,i]of Object.entries(e))nr.has(r)?t[r]=i:n[r]=i;return{sharedPatch:t,localPatch:n}}function ir(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)||!Yn(n,{...n.textGenerationModelSelection,...e.textGenerationModelSelection}))&&(e=pe(e,[`textGenerationModelSelection`])),t?.threadRestartContinuation===!0?e:pe(e,[`continueThreadsAfterServerUpdate`])}function ar(e){return e.connection.phase===`connected`&&e.serverConfig?.environment.capabilities.threadAutoSettlement===!0}function or(e){let t=e.atom(Pe(qe.pipe(i(e=>ue(e.state)))),{initialValue:Ze});return{stateAtom:t,stateValueAtom:n(e=>ie(me(e(t)),()=>Ze)).pipe(v(`relay-environment-discovery-value`)),refresh:Je(e,{label:`relay-environment-discovery:refresh`,concurrency:{mode:`singleFlight`,key:()=>`refresh`},execute:e=>qe.pipe(ce(e=>e.refresh))})}}var sr=or(tt);function cr(e,t){return{...t,environmentId:e,label:t.entry.target.label,displayUrl:nt(t.entry),relayManaged:Ke(t.entry)}}function lr(){let e=(0,E.c)(7),t=h(S.catalogValueAtom),n=h(S.networkStatusValueAtom),r=h(Ot.presentationsAtom),i;e[0]===r?i=e[1]:(i=[...r.entries()].map(ur),e[0]=r,e[1]=i);let a=i,o;return e[2]!==t.isReady||e[3]!==a||e[4]!==n||e[5]!==r?(o={isReady:t.isReady,networkStatus:n,environments:a,presentationById:r},e[2]=t.isReady,e[3]=a,e[4]=n,e[5]=r,e[6]=o):o=e[6],o}function ur(e){let[t,n]=e;return cr(t,n)}function dr(){return h(rt)}function fr(e){let t=(0,E.c)(3),{presentation:n}=jt(e),r;return t[0]!==e||t[1]!==n?(r=e===null||n===null?null:cr(e,n),t[0]=e,t[1]=n,t[2]=r):r=t[2],r}function pr(){return fr(dr())}function mr(e){let t=(0,E.c)(2),n=st(e),r;return t[0]===n?r=t[1]:(r=re(n)?n.value.httpBaseUrl:null,t[0]=n,t[1]=r),r}function hr(){return h(sr.stateValueAtom)}function gr(){return h(kt.environmentIdsAtom)}function _r(){return h(kt.identitiesAtom)}function vr(){return h(kt.pullRequestsSupportedAtom)}var yr=`[CLIENT_SETTINGS]`,br=new Set,xr=new Set,Sr=Se,Y=`pending`,X=null,Cr=0,wr=Promise.resolve(),Tr=0;function Er(){for(let e of br)e()}function Dr(){for(let e of xr)e()}function Z(){return Sr}function Or(e){Sr=e,Er()}function kr(e){Y!==e&&(Y=e,Dr())}function Ar(e){return br.add(e),Q().catch(()=>void 0),()=>{br.delete(e)}}function jr(){return Y===`ready`}function Mr(){return Y}function Nr(e){return xr.add(e),Q().catch(()=>void 0),()=>{xr.delete(e)}}async function Q(){if(Y===`ready`)return;if(X)return X;let e=Cr;kr(Y===`failed`||Y===`retrying`?`retrying`:`pending`);let t=(async()=>{try{let t=await sn().persistence.getClientSettings();if(e!==Cr)return;t&&Or({...Se,...t}),kr(`ready`)}catch(t){throw e===Cr&&kr(`failed`),console.error(`${yr} hydrate failed`,{operation:`hydrate`,...y(t)}),t}})().finally(()=>{X===t&&(X=null)});return X=t,X}var Pr=e=>sn().persistence.setClientSettings(e);function Fr(e){let t=wr.then(e);return wr=t.then(()=>void 0,()=>void 0),t}function Ir(e,t=Pr){let n=Y!==`ready`||Tr>0;return n?Tr+=1:Or({...Z(),...e}),Fr(async()=>{if(n)try{Y!==`ready`&&await Q(),Or({...Z(),...e})}finally{--Tr}await t(Z())}).catch(e=>{console.error(`${yr} persist failed`,{operation:`persist`,...y(e)})})}async function Lr(e,t=Pr){return Fr(async()=>{for(Y!==`ready`&&await Q();;){let n=Z(),r=e(n);if(await t(r),Z()===n)return Or(r),r}})}var Rr=new Set(We(Ee.fields));function zr(e){let t={},n={};for(let[r,i]of Object.entries(e))Rr.has(r)?t[r]=i:n[r]=i;return{serverPatch:t,clientPatch:n}}function Br(){return Z()}function Vr(){return Q()}function Hr(){return(0,T.useSyncExternalStore)(Nr,jr,Ur)}function Ur(){return!1}function Wr(){return(0,T.useSyncExternalStore)(Nr,Mr,Gr)}function Gr(){return`pending`}function $(){return(0,T.useSyncExternalStore)(Ar,Z,Kr)}function Kr(){return Se}function qr(e,t){return{...t,...e,...er(e,t)}}var Jr=new Set;function Yr(e,t){let n=(0,E.c)(8),r=$(),i=Hr(),a;n[0]===Symbol.for(`react.memo_cache_sentinel`)?(a={reportFailure:!1},n[0]=a):a=n[0];let o=C(x.updateSettings,a),s,c;n[1]!==r||n[2]!==e||n[3]!==i||n[4]!==o||n[5]!==t?(s=()=>{if(!e||!t||!i||Jr.has(e))return;let n=tr(t,r);n&&(Jr.add(e),o({environmentId:e,input:{patch:n}}).finally(()=>Jr.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,T.useEffect)(s,c)}function Xr(e,t){let n=(0,E.c)(6),r=$(),i;n[0]!==r||n[1]!==e?(i=qr(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 Zr(e){let t=(0,E.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 Qr(e){return e.settingsHydrated?e.paletteThemeActive&&!e.paletteThemeAllowsArtwork&&e.mode===`artwork`?`pill`:e.mode:`none`}function $r(){let e=(0,E.c)(7),t=Hr(),n=$().environmentIdentificationMode,{resolvedTheme:r,theme:i,themeHalves:a}=In(),o=(0,T.useSyncExternalStore)(Ct,_t,ei),s;if(e[0]!==n||e[1]!==o||e[2]!==r||e[3]!==t||e[4]!==i||e[5]!==a){let c=mt(i,a,r),l=gt(c);s=Qr({mode:n,settingsHydrated:t,paletteThemeActive:o!==null||l!==null,paletteThemeAllowsArtwork:o??lt(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 ei(){return null}async function ti(e,t){return(e.favorites===null||e.providerModelPreferences===null)&&await Vr(),{...tr(e,Br()),...t}}function ni(e){let t=(0,E.c)(6),n;t[0]===e?n=t[1]:(n=e?x.settingsValueAtom(e):ii,t[0]=e,t[1]=n);let r=h(n),i=C(x.updateSettings,`model preferences update`),a;return t[2]!==e||t[3]!==i||t[4]!==r?(a=async t=>{if(!e||!r)return;let n;try{n=await ti(r,t)}catch{b.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]=a):a=t[5],a}function ri(e){let t=(0,T.use)(_e),n=(0,T.useRef)(new Map),r=ni(e);return(0,T.useCallback)(async(i,a)=>{if(!e)return;let o=x.settingsValueAtom(e),s=t.get(o);if(!s)return;if(s.favorites===null)try{await Vr()}catch{b.add({type:`error`,title:`Favorites not saved`,description:`Could not load saved model preferences. Try again.`});return}let c=t.get(o)??s,l=er(c,Br()).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&&Ge(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 ii=n(null);function ai(e){let t=(0,E.c)(5),n;t[0]===e?n=t[1]:(n=e?x.settingsValueAtom(e):ii,t[0]=e,t[1]=n);let r=h(n),i=$();Yr(e,r);let a=r??we,o;return t[2]!==i||t[3]!==a?(o=er(a,i),t[2]=i,t[3]=a,t[4]=o):o=t[4],o}function oi(e,t){let n=(0,E.c)(2),r;n[0]===e?r=n[1]:(r=x.settingsValueAtom(e),n[0]=e,n[1]=r);let i=h(r);return Yr(e,i),Xr(i??we,t)}function si(e){let t=(0,E.c)(4),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n={reportFailure:!1},t[0]=n):n=t[0];let r=C(x.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 ci(e){let t=pr(),n=h(it);return Yr(t?.environmentId??null,t?.serverConfig?.settings??null),Xr(n,e)}var li=`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 ui(){let e=(0,E.c)(2),t=pr(),n;return e[0]===t?n=e[1]:(n=t!==null||!et(),e[0]=t,e[1]=n),n}function di(e){let t=(0,E.c)(3),r=e!==void 0&&e,{environments:i}=lr(),a;return t[0]!==i||t[1]!==r?(a=n(e=>i.filter(ar).flatMap(t=>{let n=e(ct.sessionStateAtom(t.environmentId));if(r&&n._tag===`Initial`)return[t.environmentId];let i=n._tag===`Failure`?null:m(me(n));return i!==null&&je(i,`settings:write`)?[t.environmentId]:[]})),t[0]=i,t[1]=r,t[2]=a):a=t[2],h(a)}function fi(e){let t=(0,E.c)(10);at(e,s);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=C(x.updateSettings,n),{environments:i}=lr(),a;t[1]!==i||t[2]!==r?(a=async e=>{let t=await r(e);if(t._tag===`Failure`&&!Ye(t)){let n=i.find(t=>t.environmentId===e.environmentId)?.label??e.environmentId,r=Qe(t);b.add({type:`error`,title:`Setting not saved`,description:`Could not save on ${n}: ${r instanceof Error?r.message:`The save failed. Try reconnecting and saving again.`}`})}return t},t[1]=i,t[2]=r,t[3]=a):a=t[3];let o=a,l=di(!0),u;return t[4]!==e||t[5]!==i||t[6]!==r||t[7]!==o||t[8]!==l?(u=t=>{let{serverPatch:n,clientPatch:a}=zr(t),s=e===null||c(n).every(t=>ot(e,t));if(Object.keys(n).length>0&&!s&&b.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(n).length>0&&s){let{sharedPatch:t,localPatch:a}=rr(n),s=_i;if(Object.keys(a).length>0&&(e?o({environmentId:e,input:{patch:a}}):s()),Object.keys(t).length>0){let n=i.find(t=>t.environmentId===e)?.serverConfig?.settings,a=new Set(l);e&&a.add(e);let o=[],u=[];for(let r of a){let a=i.find(e=>e.environmentId===r),s=ir(t,a?.serverConfig?.environment.capabilities,a?.serverConfig?.settings,n,r===e);if(Object.keys(s).length!==0){if(p.get(ct.sessionStateAtom(r))._tag!==`Initial`&&!c(t).every(e=>ot(r,e))){u.push(a?.label??r);continue}o.push({environmentId:r,input:{patch:s}})}}o.length===0?s(u.length>0?`This connection lacks permission to change settings on ${u.join(`, `)}.`:a.size>0?`Update older servers to save this setting.`:void 0):Promise.all(o.map(async e=>({label:i.find(t=>t.environmentId===e.environmentId)?.label??e.environmentId,result:await r(e)}))).then(pi)}}Object.keys(a).length>0&&Ir(a)},t[4]=e,t[5]=i,t[6]=r,t[7]=o,t[8]=l,t[9]=u):u=t[9],u}function pi(e){let t=e.flatMap(gi);if(t.length===0)return;let n=e.filter(hi).map(mi);b.add({type:`error`,title:n.length>0?`Setting saved on some environments`:`Setting not saved`,description:[...t,...n.length>0?[`Saved on ${n.join(`, `)}.`]:[]].join(`
|
|
2
|
+
`)})}function mi(e){let{label:t}=e;return t}function hi(e){let{result:t}=e;return t._tag===`Success`}function gi(e){let{label:t,result:n}=e;if(n._tag!==`Failure`||Ye(n))return[];let r=Qe(n);return[`Could not save on ${t}: ${r instanceof Error?r.message:`The save failed. Try reconnecting and saving again.`}`]}function _i(e){let t=e===void 0?li:e;return b.add({type:`warning`,title:`Setting not saved`,description:t})}function vi(e){return fi(e)}function yi(){return fi(pr()?.environmentId??null)}function bi(){return xi}function xi(e){return Ir(e)}export{Lt as $,hr as A,Bn as B,mr as C,pr as D,lr as E,Hn as F,Dn as G,ln as H,q as I,on as J,In as K,Gn as L,Zn as M,$n as N,dr as O,Qn as P,Ft as Q,qn as R,fr as S,gr as T,un as U,W as V,Sn as W,Vt as X,Yt as Y,zt as Z,ri as _,Ir as a,vi as b,Hr as c,ai as d,Rt as et,oi as f,ui as g,ci as h,qr as i,jt as it,sr as j,vr as k,Wr as l,si as m,Vr as n,It as nt,Lr as o,Yr as p,sn as q,Br as r,Ot as rt,Zr as s,li as t,Bt as tt,$r as u,bi as v,_r as w,yi as x,ni as y,Kn as z};
|
|
3
|
+
//# sourceMappingURL=useSettings-B_WzhJqU.js.map
|