@p4code/cli 0.9.6 → 0.9.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.mjs +1 -1
- package/dist/{binCli-0A0KffG3.mjs → binCli-CLYknQ8Q.mjs} +4219 -3478
- package/dist/client/.vite/manifest.json +1998 -1999
- package/dist/client/assets/{2NI2N5EU-BEr-Tfqs.js → 2NI2N5EU-D0DC_qzC.js} +2 -2
- package/dist/client/assets/{4UO7MD6I-z55jzCJI.js → 4UO7MD6I-CUZSFvTG.js} +2 -2
- package/dist/client/assets/{5B3SVYGG-BFexm37i.js → 5B3SVYGG-5ibYwkgG.js} +2 -2
- package/dist/client/assets/{5GK6JWQ2-Bn_JiXgJ.js → 5GK6JWQ2-DEtRbsDS.js} +2 -2
- package/dist/client/assets/{5N7A7DKN-Duo22cWA.js → 5N7A7DKN-CwQP1dKj.js} +2 -2
- package/dist/client/assets/{5OC2THR4-DidiZL1J.js → 5OC2THR4-BriFYPQx.js} +2 -2
- package/dist/client/assets/{5S6HY5KT-DQ4fJlKq.js → 5S6HY5KT-BBNxENgt.js} +2 -2
- package/dist/client/assets/{6IMQ5BUJ-JMPhBK1B.js → 6IMQ5BUJ-xl7U-rLA.js} +2 -2
- package/dist/client/assets/{6OLKWJ4F-CpaocvvP.js → 6OLKWJ4F-BGGDxoUW.js} +2 -2
- package/dist/client/assets/{74OO7NKP-Btg8U3A7.js → 74OO7NKP-9vkDTl8T.js} +2 -2
- package/dist/client/assets/{75O6YZUN-BVcu_3G6.js → 75O6YZUN-B9ocscUs.js} +2 -2
- package/dist/client/assets/{77XECAW3-B2dqs2a0.js → 77XECAW3-DQ3S_7U7.js} +2 -2
- package/dist/client/assets/{ABYRPUBD-csm8mwzG.js → ABYRPUBD-DFu3UszL.js} +2 -2
- package/dist/client/assets/AlertDialogRoot-Dxu9crTa.js +2 -0
- package/dist/client/assets/{AnimatedHeight-CU3C1NcV.js → AnimatedHeight-DEH7bEtg.js} +2 -2
- package/dist/client/assets/{AuthSurfaceShell-DT2jFrxd.js → AuthSurfaceShell-DDlvsg4m.js} +2 -2
- package/dist/client/assets/{BB2UYUI2-CrLDpD9c.js → BB2UYUI2-DzdR7ZyB.js} +2 -2
- package/dist/client/assets/{BUM34MOA-DGaisF3P.js → BUM34MOA-LkeHTV8a.js} +2 -2
- package/dist/client/assets/{CEQABKGZ-BHUFEz8L.js → CEQABKGZ-BX1CWous.js} +2 -2
- package/dist/client/assets/{CXAC5362-CF0Q8UlN.js → CXAC5362-DMlUWuvv.js} +2 -2
- package/dist/client/assets/ChatGptUsageButton-CXEX1qrn.js +2 -0
- package/dist/client/assets/ChatMarkdown-yTbjRmgo.js +48 -0
- package/dist/client/assets/{CheckboxIndicator-CT--c3fO.js → CheckboxIndicator-DSA5Ujdj.js} +2 -2
- package/dist/client/assets/{ClippedText-BWXvwYxu.js → ClippedText-DlUFaCzw.js} +2 -2
- package/dist/client/assets/CodexSetupSection.logic-D3odRubx.js +2 -0
- package/dist/client/assets/{ComboboxClear-CRWQGFjR.js → ComboboxClear-DkaA60b7.js} +2 -2
- package/dist/client/assets/{ComboboxGroupLabel-BMo03qXe.js → ComboboxGroupLabel-AEuoHUH8.js} +2 -2
- package/dist/client/assets/{CommandBlock-D57LdSoM.js → CommandBlock-BUHVWYBr.js} +2 -2
- package/dist/client/assets/{ComposerPromptEditor-DJ9XwB1O.js → ComposerPromptEditor-zRTz5xec.js} +11 -11
- package/dist/client/assets/{CompositeRoot-DSNl3c3G.js → CompositeRoot-38NDvFsA.js} +2 -2
- package/dist/client/assets/{ConnectionDiagnosisDetails-CMRX7VzH.js → ConnectionDiagnosisDetails-WKkRENJB.js} +2 -2
- package/dist/client/assets/{ConnectionStatusDot-CiISG6eT.js → ConnectionStatusDot-B-U5Wv6b.js} +2 -2
- package/dist/client/assets/{DRLTVNUE-BjIXDJQN.js → DRLTVNUE-CNkbJcIE.js} +2 -2
- package/dist/client/assets/{DYY6UVD2-Dpro9qr4.js → DYY6UVD2-Csqmb0Yg.js} +2 -2
- package/dist/client/assets/{DevicePanel-DtM34nRC.js → DevicePanel-B3G_KDJN.js} +2 -2
- package/dist/client/assets/DeviceSetup-DqTJRSli.js +2 -0
- package/dist/client/assets/{DialogTitle-CACErOl5.js → DialogTitle-Bz-7IYD8.js} +2 -2
- package/dist/client/assets/{DiffCommentAnnotation-Bcjn-Btj.js → DiffCommentAnnotation-C3_yEiAB.js} +2 -2
- package/dist/client/assets/{DiffFileTree-1s_6Y4bE.js → DiffFileTree-BJxoYt-I.js} +2 -2
- package/dist/client/assets/DiffPanel-Bfxdj8td.js +2 -0
- package/dist/client/assets/{DiffWorkerPoolProvider-DDVuzh7w.js → DiffWorkerPoolProvider-DPfZNt42.js} +3 -3
- package/dist/client/assets/{EmbeddedDesign-3XobSUFO.js → EmbeddedDesign-CsCt-RW1.js} +5 -5
- package/dist/client/assets/{EnvironmentMachineIcon-B6RgXF8A.js → EnvironmentMachineIcon-CKfntUmE.js} +2 -2
- package/dist/client/assets/{ExpandableText-B3WqZ3eC.js → ExpandableText-DGu2RH_j.js} +2 -2
- package/dist/client/assets/{FNOVOB4O-BxVVUi2o.js → FNOVOB4O-CH8BTfJM.js} +2 -2
- package/dist/client/assets/{FieldControl-BDrBhdoh.js → FieldControl-DAh0lUDV.js} +2 -2
- package/dist/client/assets/{FileDiff-DM8e9Pyt.js → FileDiff-C1enHrMi.js} +2 -2
- package/dist/client/assets/{FilePreviewPanel-CRdP4-01.js → FilePreviewPanel-67DQ3_gp.js} +6 -6
- package/dist/client/assets/{FoldedSettingsSection-CsaWcgI5.js → FoldedSettingsSection-CILGGC6I.js} +2 -2
- package/dist/client/assets/{FormContext-BZ8Nuwwa.js → FormContext-BdrDIRv0.js} +2 -2
- package/dist/client/assets/{HDGCDEEZ-9x1WhMZA.js → HDGCDEEZ-Ox1-cFjL.js} +2 -2
- package/dist/client/assets/{HSJLKHB7-BI4g8Uha.js → HSJLKHB7-BEBG51eo.js} +2 -2
- package/dist/client/assets/{Icons-CPaJO8_C.js → Icons-C-FXpOud.js} +2 -2
- package/dist/client/assets/Input-DWhR3WLZ.js +2 -0
- package/dist/client/assets/JZOYTAAL-K5yyV5fj.js +1 -0
- package/dist/client/assets/{K3MD6TGW-QvtIomBt.js → K3MD6TGW-DhfhwRRq.js} +2 -2
- package/dist/client/assets/{K7RP3OMA-CenKL848.js → K7RP3OMA-DdE8zx2_.js} +2 -2
- package/dist/client/assets/{KeybindingsSettings.logic-Dk-UU5gV.js → KeybindingsSettings.logic-Ddu7cDVA.js} +2 -2
- package/dist/client/assets/{LHDIQX7Q-Du31c03t.js → LHDIQX7Q-_CTEfstz.js} +2 -2
- package/dist/client/assets/{LUXOKEGN-DwVZaHZy.js → LUXOKEGN-BZTFKFlr.js} +2 -2
- package/dist/client/assets/{MathTypeset-DUJJZ0qR.js → MathTypeset-hiZgZUOa.js} +2 -2
- package/dist/client/assets/{N3JZAHOW-f6rXQzfb.js → N3JZAHOW-CC607oJ3.js} +2 -2
- package/dist/client/assets/{NUIALGQ3-B7-2dGpz.js → NUIALGQ3-YZiFnb1D.js} +2 -2
- package/dist/client/assets/{NoProjectsHero-BJZpoal_.js → NoProjectsHero-BaAbresy.js} +2 -2
- package/dist/client/assets/{O65XPQGZ-pxAza1nz.js → O65XPQGZ-CJWG3hrr.js} +2 -2
- package/dist/client/assets/{O7XIQ6OM-nX2_hGto.js → O7XIQ6OM-CO58SxOd.js} +2 -2
- package/dist/client/assets/{OFQON5FD-y110aBJF.js → OFQON5FD-ZVCn5Afz.js} +2 -2
- package/dist/client/assets/{P4ConnectAccountPages-C1rFKA40.js → P4ConnectAccountPages-nuGk_jH6.js} +2 -2
- package/dist/client/assets/{P4ConnectSidebarSignIn-40UlSrjv.js → P4ConnectSidebarSignIn-DMU_ZGur.js} +2 -2
- package/dist/client/assets/{PJQHF43J-CbQqRUq6.js → PJQHF43J-Dyo99try.js} +2 -2
- package/dist/client/assets/PanelLayoutControls-CwJW9Vo-.js +216 -0
- package/dist/client/assets/{PierreEntryIcon-C488PFw3.js → PierreEntryIcon-BGnGqbZS.js} +2 -2
- package/dist/client/assets/{PopoverHandle-ByI17B8T.js → PopoverHandle-BGTDdU32.js} +2 -2
- package/dist/client/assets/PreviewPanel-C914U2vc.js +2 -0
- package/dist/client/assets/{ProjectDefaultsSettings-b9JKMHCZ.js → ProjectDefaultsSettings-B8-DHhbT.js} +2 -2
- package/dist/client/assets/ProjectFavicon-Bnd4lTxL.js +3 -0
- package/dist/client/assets/{ProjectIconPickerDialog-Cug9qYje.js → ProjectIconPickerDialog-D_7XapzM.js} +2 -2
- package/dist/client/assets/{ProjectMonogram-DdSkqGzz.js → ProjectMonogram-BRycZjMZ.js} +2 -2
- package/dist/client/assets/{ProviderAuthTerminal-BiaVsusp.js → ProviderAuthTerminal-ejODeZci.js} +2 -2
- package/dist/client/assets/ProviderModelPicker-BigVoJfZ.js +2 -0
- package/dist/client/assets/{ProviderSettingsForm-DTCgpI31.js → ProviderSettingsForm-TxiFYWfI.js} +2 -2
- package/dist/client/assets/PullRequestCodeTab-D99_acmK.js +6 -0
- package/dist/client/assets/{RHNBAITX-NhKz5kz6.js → RHNBAITX-B2MpzGNB.js} +2 -2
- package/dist/client/assets/{ReadOnlySourcePreview-BVjNlm_O.js → ReadOnlySourcePreview-Clh1I7db.js} +2 -2
- package/dist/client/assets/{RenderErrorBoundary-C2PF8Cmu.js → RenderErrorBoundary-UQ8iqwRx.js} +3 -3
- package/dist/client/assets/{SLD4V6NK-Ca5SsXR4.js → SLD4V6NK-DDlJ2xA8.js} +2 -2
- package/dist/client/assets/{ScheduledTasksSettings-QWakG9R_.js → ScheduledTasksSettings-VxM8-W1a.js} +4 -4
- package/dist/client/assets/{ScopedSwitch-Dpqx-0tY.js → ScopedSwitch-B9HsEBfG.js} +2 -2
- package/dist/client/assets/{ScrollAreaCorner-CGc2ioKQ.js → ScrollAreaCorner-DaAMqe_x.js} +2 -2
- package/dist/client/assets/{SecretInput-D6soOcQS.js → SecretInput-Dfsqp38C.js} +2 -2
- package/dist/client/assets/{SelectScrollUpArrow-CjMNXdhr.js → SelectScrollUpArrow-CBbON2Cr.js} +2 -2
- package/dist/client/assets/SettingsPanels-D16J4fBs.js +46 -0
- package/dist/client/assets/{SettingsPanels.logic-DYKv08oD.js → SettingsPanels.logic-DLPcHVw0.js} +2 -2
- package/dist/client/assets/{SettingsScopeNotice-Bq20tBUp.js → SettingsScopeNotice-CLuK5ZOQ.js} +2 -2
- package/dist/client/assets/{SidebarStageBackdrop-CEjjEyUl.js → SidebarStageBackdrop-Bgae69g1.js} +2 -2
- package/dist/client/assets/{T3PCR2KE-D-xJTbp-.js → T3PCR2KE-DQ6cSkUG.js} +2 -2
- package/dist/client/assets/{TKWO2OVW-JaByeldU.js → TKWO2OVW-DlInq0TH.js} +2 -2
- package/dist/client/assets/{TSHNXIZL-7SUhC5Vk.js → TSHNXIZL-DL8cfasx.js} +2 -2
- package/dist/client/assets/{ThemeEditorPanel-TxkY9El4.js → ThemeEditorPanel-Dhd_0CzC.js} +2 -2
- package/dist/client/assets/ThreadTerminalDrawer-Bga-TMJR.js +5 -0
- package/dist/client/assets/{TooltipViewport-beytMJmq.js → TooltipViewport-UaR0JZsl.js} +2 -2
- package/dist/client/assets/{UQJE5E4I-CHN9jRa_.js → UQJE5E4I-WMwM-nEH.js} +2 -2
- package/dist/client/assets/{USNYFO5S-Bvrc0sLJ.js → USNYFO5S-D-mgcpxb.js} +2 -2
- package/dist/client/assets/{Virtualizer-vgqc_DSl.js → Virtualizer-CUj2Cqvm.js} +2 -2
- package/dist/client/assets/{WEVWDWVA-BaKbLsuO.js → WEVWDWVA-CiAqWYrx.js} +2 -2
- package/dist/client/assets/{WorkspaceBreadcrumb-1f5BN5n1.js → WorkspaceBreadcrumb-D8GTBuA5.js} +2 -2
- package/dist/client/assets/{WorkspacePageContainer-CDQRGmcV.js → WorkspacePageContainer-BKXvWv-9.js} +2 -2
- package/dist/client/assets/{WorkspacePageHeader-Q5YQyOFt.js → WorkspacePageHeader-zMZD9Zz8.js} +2 -2
- package/dist/client/assets/{X5RFHQXM-BfoStT6R.js → X5RFHQXM-YS48_sFp.js} +2 -2
- package/dist/client/assets/{X62E3GBT-DPqQZAUV.js → X62E3GBT-C444MNd3.js} +2 -2
- package/dist/client/assets/{XBNEOJTC-a4pknpW1.js → XBNEOJTC-0O1bjE8y.js} +2 -2
- package/dist/client/assets/{YHV2MVVZ-CLYitNzo.js → YHV2MVVZ-Coy_OiWg.js} +2 -2
- package/dist/client/assets/{YURCZMG2-D5G4Gqxk.js → YURCZMG2-Lc2Tv_HR.js} +2 -2
- package/dist/client/assets/{YVG2LODB-BaOOPjOj.js → YVG2LODB-CWUTdxUc.js} +2 -2
- package/dist/client/assets/_chat-BWNTWBCr.js +45 -0
- package/dist/client/assets/_chat.design-CajRPBez.js +2 -0
- package/dist/client/assets/_chat.index-OsM078CN.js +2 -0
- package/dist/client/assets/_chat.new-BI8wuTGQ.js +4 -0
- package/dist/client/assets/_chat.pull-requests-Alx1g9Xh.js +2 -0
- package/dist/client/assets/{alert-Cq0DAg5J.js → alert-RktpFBv6.js} +2 -2
- package/dist/client/assets/{assetUrls-DpLOinYe.js → assetUrls-COCOS1bm.js} +2 -2
- package/dist/client/assets/assets-B36wSN1M.js +2 -0
- package/dist/client/assets/{browserHistoryStore-CUc0_P_z.js → browserHistoryStore-CBcm7bje.js} +2 -2
- package/dist/client/assets/{browserLinkTarget-BmW74g3V.js → browserLinkTarget-D-M5yQc0.js} +2 -2
- package/dist/client/assets/{checkbox-CoJ-ki0Z.js → checkbox-vIS3kn6A.js} +2 -2
- package/dist/client/assets/{color-picker-ABTfqBnJ.js → color-picker-vozMHo5G.js} +2 -2
- package/dist/client/assets/{combobox-C6NpXSFx.js → combobox-CzEFd5LA.js} +2 -2
- package/dist/client/assets/{command-BOsIZcjU.js → command-CLf9yckl.js} +2 -2
- package/dist/client/assets/{connect-B3OIDtgH.js → connect-BoLhf5rG.js} +2 -2
- package/dist/client/assets/{connect-agent-BcH8kUjm.js → connect-agent-BUjhhqbv.js} +2 -2
- package/dist/client/assets/{design-D0u5lYcP.js → design-LeaOcSZl.js} +2 -2
- package/dist/client/assets/device-D9IuUJmU.js +2 -0
- package/dist/client/assets/{dialog-r1KpDpid.js → dialog-B69qrNtB.js} +2 -2
- package/dist/client/assets/{diffRendering-cPnt2kIt.js → diffRendering-DU37Uneg.js} +2 -2
- package/dist/client/assets/{dist-D4Fzk6mX.js → dist-CtnQm06p.js} +3 -3
- package/dist/client/assets/{draft-input-eAeawUnI.js → draft-input-BUsvwNIU.js} +2 -2
- package/dist/client/assets/{duoViewer-6tHPOGH8.js → duoViewer-CPd6U9x5.js} +2 -2
- package/dist/client/assets/{dynamic-bKXiwQos.js → dynamic-DDiw9bBP.js} +2 -2
- package/dist/client/assets/{embeddedScripts-CALp_TgN.js → embeddedScripts-DjnGPWZd.js} +2 -2
- package/dist/client/assets/{empty-B5VIjZQf.js → empty-B1FuCXoG.js} +2 -2
- package/dist/client/assets/entities-Cd_YDhEa.js +2 -0
- package/dist/client/assets/{fileLinks-B4-TDufo.js → fileLinks-DzCsEQpS.js} +2 -2
- package/dist/client/assets/{fileTreeExpansion-WgU7oBBt.js → fileTreeExpansion-eHhwnC6l.js} +2 -2
- package/dist/client/assets/{getDiffFileInput-CIsReQa3.js → getDiffFileInput-eC26FmPf.js} +2 -2
- package/dist/client/assets/{guideRunStore-D6SjxVHH.js → guideRunStore-CugTzRRn.js} +2 -2
- package/dist/client/assets/{htmlRender-eKT33KVk.js → htmlRender-CcVnPpcS.js} +2 -2
- package/dist/client/assets/{index-Gp6V8OPo.js → index-CZlF3wQ9.js} +3 -3
- package/dist/client/assets/{input-CySdZpuF.js → input-D8R-9BO3.js} +2 -2
- package/dist/client/assets/{input-group-BRBXX90v.js → input-group-CevCumL6.js} +2 -2
- package/dist/client/assets/{kbd-BEi8qVF9.js → kbd-Fy-v90ND.js} +2 -2
- package/dist/client/assets/keybindings-DMghyE3A.js +2 -0
- package/dist/client/assets/{lazy-BKgu9oVK.js → lazy-BA6aXmZc.js} +4 -4
- package/dist/client/assets/{lazyRouteComponent-BUMdW5GA.js → lazyRouteComponent-DVNAnyiv.js} +2 -2
- package/dist/client/assets/{link-BLuLRp-C.js → link-ci_EPfAz.js} +2 -2
- package/dist/client/assets/{linkedPrompt-BCdDQK81.js → linkedPrompt-CPHt2jcO.js} +2 -2
- package/dist/client/assets/main-B-tAk2zT.css +2 -0
- package/dist/client/assets/main-om7hc1qE.js +37 -0
- package/dist/client/assets/{mediaReference-DAak-Bfh.js → mediaReference-CZmbKByR.js} +2 -2
- package/dist/client/assets/mediaSource-DX6oP8x9.js +2 -0
- package/dist/client/assets/{number-field-DqB5oGdp.js → number-field-CmK8oJMM.js} +2 -2
- package/dist/client/assets/{observeResize-CAGp2C1D.js → observeResize-YxzDUnDW.js} +2 -2
- package/dist/client/assets/{onboarding-JbZFsvi9.js → onboarding-eClefFKp.js} +2 -2
- package/dist/client/assets/openFileInPreview-H9M5FxLy.js +2 -0
- package/dist/client/assets/{p4ProjectFile-DuMklfjR.js → p4ProjectFile-BC2tSEs4.js} +2 -2
- package/dist/client/assets/{pair-3U4lhizd.js → pair-BUZJqgA1.js} +2 -2
- package/dist/client/assets/{pendingSendStore-BaAUC-mU.js → pendingSendStore-C5UcT8R0.js} +2 -2
- package/dist/client/assets/{phoneViewer-BhDgaxtz.js → phoneViewer-fmWF20qy.js} +2 -2
- package/dist/client/assets/{pierre-icons-BnU3xLFM.js → pierre-icons-DlYshDSm.js} +2 -2
- package/dist/client/assets/{popover-Cmd3nOX1.js → popover-CtJuJW_f.js} +2 -2
- package/dist/client/assets/{preview-DzgdX_e_.js → preview-D-Cm6hTR.js} +2 -2
- package/dist/client/assets/{preview-BhM7y-5f.js → preview-DtLn0r5X.js} +2 -2
- package/dist/client/assets/{previewMiniPlayerStore-JEelmjkF.js → previewMiniPlayerStore-BQgCK2RM.js} +2 -2
- package/dist/client/assets/primary-CuSE-Dwp.js +2 -0
- package/dist/client/assets/primaryCloudLinkState-BsKyx6nh.js +2 -0
- package/dist/client/assets/projectFilesQueryState-FiXJc2AO.js +2 -0
- package/dist/client/assets/projectScriptEditor-CwMYFrgO.js +2 -0
- package/dist/client/assets/{providerSkills-DY_Eya4r.js → providerSkills-DRtgduYo.js} +2 -2
- package/dist/client/assets/{pullRequestDetail.logic-CLAnM03l.js → pullRequestDetail.logic-CqcRjGbR.js} +4 -4
- package/dist/client/assets/{pullRequestIcons-1vN39RsA.js → pullRequestIcons-Bk_-BZhA.js} +2 -2
- package/dist/client/assets/{pullRequestReviewStore-z8tuJFXD.js → pullRequestReviewStore-Br0qNCn2.js} +2 -2
- package/dist/client/assets/pullRequests-C9YbqDXl.js +2 -0
- package/dist/client/assets/queries-DMkaYL1H.js +2 -0
- package/dist/client/assets/query-B1dBedyO.js +2 -0
- package/dist/client/assets/{radio-group-Dcl3ANRp.js → radio-group-CQTaM9n2.js} +2 -2
- package/dist/client/assets/{renderScheduler-CfBAnW7l.js → renderScheduler-fJB2sQwM.js} +2 -2
- package/dist/client/assets/{rightPanelStore-DKH3Bw74.js → rightPanelStore-C5nnGDev.js} +2 -2
- package/dist/client/assets/runtime-B6yGAVz4.js +6 -0
- package/dist/client/assets/runtime-BhGr1QCf.js +3 -0
- package/dist/client/assets/{runtimeModeConfig-cuNxQIV-.js → runtimeModeConfig-Htoh7tJb.js} +2 -2
- package/dist/client/assets/{scheduledTasksSettings.logic-9aUS0PH9.js → scheduledTasksSettings.logic-DRYrMw8R.js} +3 -3
- package/dist/client/assets/{scroll-area-DMQd4YlU.js → scroll-area-DJaTwtcr.js} +2 -2
- package/dist/client/assets/{select-kRO2vVzo.js → select-BFALokxW.js} +2 -2
- package/dist/client/assets/{selfImproveFindings-uaqHvfDg.js → selfImproveFindings-H2XgphDi.js} +2 -2
- package/dist/client/assets/server-Dc9414wM.js +2 -0
- package/dist/client/assets/session-B6T_Arzf.js +2 -0
- package/dist/client/assets/session-logic-BaSoFnqy.js +26 -0
- package/dist/client/assets/settings-BkLvGwfm.js +2 -0
- package/dist/client/assets/{settings.appearance-Cfti608t.js → settings.appearance-OuApP6hX.js} +2 -2
- package/dist/client/assets/settings.archived-DLycLGH2.js +2 -0
- package/dist/client/assets/{settings.computer-use-BlDOxUzy.js → settings.computer-use-DbtSE70m.js} +2 -2
- package/dist/client/assets/settings.connections-D8EmrGJK.js +2 -0
- package/dist/client/assets/{settings.data-controls-DUdW2NVF.js → settings.data-controls-DqM0dqdr.js} +2 -2
- package/dist/client/assets/settings.decisions-BNBjCRqL.js +2 -0
- package/dist/client/assets/{settings.designs-BtuTLR8n.js → settings.designs-BIB7y5ry.js} +2 -2
- package/dist/client/assets/settings.diagnostics-CZPZhIn-.js +2 -0
- package/dist/client/assets/{settings.general-BmfZwZYV.js → settings.general-D73jxwiz.js} +2 -2
- package/dist/client/assets/settings.integrations-Vq3IT0_R.js +2 -0
- package/dist/client/assets/{settings.keybindings-BTpVSO__.js → settings.keybindings-DMI2SOqT.js} +2 -2
- package/dist/client/assets/{settings.open-source-licenses-XO8zNkrl.js → settings.open-source-licenses-QRv0v3-V.js} +2 -2
- package/dist/client/assets/{settings.plugins-VlmvBnPN.js → settings.plugins-Ddb8m4nE.js} +4 -4
- package/dist/client/assets/settings.projects-r-irj-Zr.js +4 -0
- package/dist/client/assets/settings.providers-Ce4kHZsP.js +3 -0
- package/dist/client/assets/{settings.scheduled-tasks-Dm3QDHlc.js → settings.scheduled-tasks-RWniN8Lw.js} +2 -2
- package/dist/client/assets/settings.snap-shot-D6hiK4XK.js +2 -0
- package/dist/client/assets/settings.source-control-GPOjx565.js +2 -0
- package/dist/client/assets/settings.storage-CZsmFyZ8.js +2 -0
- package/dist/client/assets/settingsLayout-CthOqZyP.js +3 -0
- package/dist/client/assets/{sidebar-C_Z-zEdU.js → sidebar-BDFu5cf2.js} +2 -2
- package/dist/client/assets/{sidebarProjectGrouping-upKKecFM.js → sidebarProjectGrouping-CURnoavN.js} +2 -2
- package/dist/client/assets/{skeleton-CAZWrHi2.js → skeleton-CIpn5ufH.js} +2 -2
- package/dist/client/assets/{sourceControl-Bb4nr0Wx.js → sourceControl-DjMIOzv1.js} +2 -2
- package/dist/client/assets/{sourceControlClients-DExT5Wem.js → sourceControlClients-C2uvUFSM.js} +2 -2
- package/dist/client/assets/{spinner-DN7lJfwl.js → spinner-t32AzjJr.js} +2 -2
- package/dist/client/assets/{terminal-links-Dj73wz5S.js → terminal-links-D6dqW3h9.js} +2 -2
- package/dist/client/assets/{terminalSessions-CyoMi8Lk.js → terminalSessions-DoRkjVz9.js} +2 -2
- package/dist/client/assets/{textarea-U0rH71iw.js → textarea-EVmRNBWL.js} +2 -2
- package/dist/client/assets/{themePalette-B5YWcpxp.js → themePalette-01TQqdkx.js} +3 -3
- package/dist/client/assets/toast-UFTwkJWj.js +2 -0
- package/dist/client/assets/{toggle-CrlljXsx.js → toggle-Dqrwe7LT.js} +2 -2
- package/dist/client/assets/{toggle-group-BIVeiRdg.js → toggle-group-DS75Gx6B.js} +2 -2
- package/dist/client/assets/{tooltip-CMPhQaPE.js → tooltip-B1rLXiVx.js} +2 -2
- package/dist/client/assets/{uiStateStore-C6-jXt5N.js → uiStateStore-_K2mvZYL.js} +2 -2
- package/dist/client/assets/{usage-TbP8vhYG.js → usage-DwGF-B0Q.js} +2 -2
- package/dist/client/assets/{usageAccess-B68ifs1q.js → usageAccess-YanE4PaX.js} +2 -2
- package/dist/client/assets/{usageFormat-5HVN-IRu.js → usageFormat-Bgm6YXnR.js} +2 -2
- package/dist/client/assets/{usageShortcuts-cMgT39NO.js → usageShortcuts-D6H92HUx.js} +2 -2
- package/dist/client/assets/{use-atom-command-sg76DXcz.js → use-atom-command-BT7sz8Lx.js} +2 -2
- package/dist/client/assets/{useAriaLabelledBy-D_ENSt33.js → useAriaLabelledBy-CCDZPAYX.js} +2 -2
- package/dist/client/assets/useHandleNewThread-nNF3Xnbt.js +2 -0
- package/dist/client/assets/{useLocation-t7z8sUje.js → useLocation-CDlqpnf6.js} +2 -2
- package/dist/client/assets/{useNavigate-kfVoxx_T.js → useNavigate-mNhNGdvJ.js} +2 -2
- package/dist/client/assets/{useNavigateBack-B79USD1h.js → useNavigateBack-zj9tpAPV.js} +2 -2
- package/dist/client/assets/{useP4ConnectAuthPrompt-Caj-XRNA.js → useP4ConnectAuthPrompt-CkJyw_jV.js} +2 -2
- package/dist/client/assets/{useParams-DuqJgNNY.js → useParams-CZ_VOC6E.js} +2 -2
- package/dist/client/assets/{usePermissionStatus-hWpY6-jP.js → usePermissionStatus-DFE8UnJC.js} +2 -2
- package/dist/client/assets/{usePullRequestActions-B6Nj3E46.js → usePullRequestActions-CVcuaade.js} +2 -2
- package/dist/client/assets/{useRegisterFieldControl-y1AHmvVZ.js → useRegisterFieldControl-gW7DDA6v.js} +2 -2
- package/dist/client/assets/{useScopedModelAvailability-Cb_UE0gJ.js → useScopedModelAvailability-BCNsRHrC.js} +2 -2
- package/dist/client/assets/useSettings-BAP_yCCK.js +3 -0
- package/dist/client/assets/utils-Dv1DrWoz.js +37 -0
- package/dist/client/assets/vcsRefInvalidation-BI3mMuIW.js +2 -0
- package/dist/client/assets/welcome-CfpSLEhO.js +2 -0
- package/dist/client/index.html +1 -1
- package/dist/{renderer-BaYdZX9b.mjs → renderer-B3Ia4LBS.mjs} +2 -2
- package/dist/{runtime-xvtWpueC.mjs → runtime-DvE0t3kv.mjs} +137 -84
- package/package.json +1 -1
- package/dist/client/assets/AlertDialogRoot-zitC_5YS.js +0 -2
- package/dist/client/assets/ChatGptUsageButton-LTPdlo27.js +0 -2
- package/dist/client/assets/ChatMarkdown-WBYeOz6B.js +0 -48
- package/dist/client/assets/CodexSetupSection.logic-7Ae1lVg1.js +0 -2
- package/dist/client/assets/DeviceSetup-BgzTguQP.js +0 -2
- package/dist/client/assets/DiffPanel-BTNwksR-.js +0 -2
- package/dist/client/assets/Input-CTKz2gGc.js +0 -2
- package/dist/client/assets/JZOYTAAL-BSyl5qdX.js +0 -1
- package/dist/client/assets/PanelLayoutControls-CrSkXhVM.js +0 -216
- package/dist/client/assets/PreviewPanel-CsAlP3Pf.js +0 -2
- package/dist/client/assets/ProjectFavicon-BhuB_Su5.js +0 -3
- package/dist/client/assets/ProviderModelPicker-CHf8PGFh.js +0 -2
- package/dist/client/assets/PullRequestCodeTab-CruWTaey.js +0 -6
- package/dist/client/assets/SettingsPanels-5CR3ByhH.js +0 -46
- package/dist/client/assets/ThreadTerminalDrawer-CW0oM3tO.js +0 -5
- package/dist/client/assets/_chat-DLjkfz3i.js +0 -45
- package/dist/client/assets/_chat.design-C8CbENny.js +0 -2
- package/dist/client/assets/_chat.index-CWE510ct.js +0 -2
- package/dist/client/assets/_chat.new-wb1utvr4.js +0 -4
- package/dist/client/assets/_chat.pull-requests-D0bA9kLT.js +0 -2
- package/dist/client/assets/assets-Dls9s4TR.js +0 -2
- package/dist/client/assets/device-UePDkr_L.js +0 -2
- package/dist/client/assets/entities-DhRbI2L4.js +0 -2
- package/dist/client/assets/keybindings-COfPuZJ9.js +0 -2
- package/dist/client/assets/main-1tW7jidE.js +0 -37
- package/dist/client/assets/main-BE5xGjw3.css +0 -2
- package/dist/client/assets/mediaSource-CI8DI4FI.js +0 -2
- package/dist/client/assets/openFileInPreview-CDCQ6rKJ.js +0 -2
- package/dist/client/assets/primary-C5Pkih-v.js +0 -2
- package/dist/client/assets/primaryCloudLinkState-1Xmc8JzR.js +0 -2
- package/dist/client/assets/projectFilesQueryState-D9gKctiS.js +0 -2
- package/dist/client/assets/projectScriptEditor-D20MTQIS.js +0 -2
- package/dist/client/assets/pullRequests-Dqd6r9gw.js +0 -2
- package/dist/client/assets/queries-B6XxcqnT.js +0 -2
- package/dist/client/assets/query-yuF2-QRx.js +0 -2
- package/dist/client/assets/runtime-Csw1ghUb.js +0 -3
- package/dist/client/assets/runtime-DYpzE3gq.js +0 -6
- package/dist/client/assets/server-DXSwZxzT.js +0 -2
- package/dist/client/assets/session-logic-C42l2TRa.js +0 -26
- package/dist/client/assets/session-meZM9Xpf.js +0 -2
- package/dist/client/assets/settings-DFDwiVWH.js +0 -2
- package/dist/client/assets/settings.archived-Bh4SpQp7.js +0 -2
- package/dist/client/assets/settings.connections-BTrzLXQG.js +0 -2
- package/dist/client/assets/settings.decisions-DrG6xwiq.js +0 -2
- package/dist/client/assets/settings.diagnostics-BK6KmZ6a.js +0 -2
- package/dist/client/assets/settings.integrations-D1gZz8sk.js +0 -2
- package/dist/client/assets/settings.projects-M8mb50zO.js +0 -4
- package/dist/client/assets/settings.providers-CQ0OTnQ1.js +0 -3
- package/dist/client/assets/settings.snap-shot-BxcK0LEY.js +0 -2
- package/dist/client/assets/settings.source-control-DbAJM2fi.js +0 -2
- package/dist/client/assets/settings.storage-BWTGbbAs.js +0 -2
- package/dist/client/assets/settingsLayout-D3zsCQTE.js +0 -3
- package/dist/client/assets/toast-C1lIuL0v.js +0 -2
- package/dist/client/assets/useHandleNewThread-DglymQWA.js +0 -2
- package/dist/client/assets/useSettings-CyF6ezIl.js +0 -3
- package/dist/client/assets/utils-BlwLA0C4.js +0 -37
- package/dist/client/assets/vcsRefInvalidation-Bkr613aV.js +0 -2
- package/dist/client/assets/welcome-Dj-C1U_A.js +0 -2
package/dist/client/assets/{useP4ConnectAuthPrompt-Caj-XRNA.js → useP4ConnectAuthPrompt-CkJyw_jV.js}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{n as e}from"./jsx-runtime-DJeoFXNw.js";import{t}from"./env-wK1YYxA8.js";import{i as n}from"./dist-
|
|
2
|
-
//# sourceMappingURL=useP4ConnectAuthPrompt-
|
|
1
|
+
import{n as e}from"./jsx-runtime-DJeoFXNw.js";import{t}from"./env-wK1YYxA8.js";import{i as n}from"./dist-CtnQm06p.js";import{t as r}from"./authRedirect-DWE5a_T9.js";var i=e();function a(){let e=(0,i.c)(2),a=n(),o;return e[0]===a?o=e[1]:(o={authPrompt:null,openAuthPrompt:()=>{a.openSignIn(r(window.location.href,t))}},e[0]=a,e[1]=o),o}export{a as t};
|
|
2
|
+
//# sourceMappingURL=useP4ConnectAuthPrompt-CkJyw_jV.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e,t}from"./react-BUfh6y28.js";import{ki as n}from"./utils-
|
|
2
|
-
//# sourceMappingURL=useParams-
|
|
1
|
+
import{a as e,t}from"./react-BUfh6y28.js";import{ki as n}from"./utils-Dv1DrWoz.js";function r(e){return e[e.length-1]}function i(e){return typeof e==`function`}function a(e,t){return i(e)?e(t):e}var o=Object.prototype.hasOwnProperty,s=Object.prototype.propertyIsEnumerable;function c(e){for(let t in e)if(o.call(e,t))return!0;return!1}var l=()=>Object.create(null),u=(e,t)=>d(e,t,l);function d(e,t,n=()=>({}),r=0){if(e===t)return e;if(r>500)return t;let i=t,a=h(e)&&h(i);if(!a&&!(p(e)&&p(i)))return i;let s=a?e:f(e);if(!s)return i;let c=a?i:f(i);if(!c)return i;let l=s.length,u=c.length,m=a?Array(u):n(),g=0;for(let t=0;t<u;t++){let s=a?t:c[t],u=e[s],f=i[s];if(u===f){m[s]=u,(a?t<l:o.call(e,s))&&g++;continue}if(u===null||f===null||typeof u!=`object`||typeof f!=`object`){m[s]=f;continue}let p=d(u,f,n,r+1);m[s]=p,p===u&&g++}return l===u&&g===l?e:m}function f(e){let t=Object.getOwnPropertyNames(e);for(let n of t)if(!s.call(e,n))return!1;let n=Object.getOwnPropertySymbols(e);if(n.length===0)return t;let r=t;for(let t of n){if(!s.call(e,t))return!1;r.push(t)}return r}function p(e){if(!m(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!m(n)||!n.hasOwnProperty(`isPrototypeOf`))}function m(e){return Object.prototype.toString.call(e)===`[object Object]`}function h(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function g(e,t,n){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let r=0,i=e.length;r<i;r++)if(!g(e[r],t[r],n))return!1;return!0}if(p(e)&&p(t)){let r=n?.ignoreUndefined??!0;if(n?.partial){for(let i in t)if((!r||t[i]!==void 0)&&!g(e[i],t[i],n))return!1;return!0}let i=0;if(!r)i=Object.keys(e).length;else for(let t in e)e[t]!==void 0&&i++;let a=0;for(let o in t)if((!r||t[o]!==void 0)&&(a++,a>i||!g(e[o],t[o],n)))return!1;return i===a}return!1}function _(e){let t,n,r=new Promise((e,r)=>{t=e,n=r});return r.status=`pending`,r.resolve=n=>{r.status=`resolved`,r.value=n,t(n),e?.(n)},r.reject=e=>{r.status=`rejected`,n(e)},r}function v(e){return typeof e?.message==`string`?e.message.startsWith(`Failed to fetch dynamically imported module`)||e.message.startsWith(`error loading dynamically imported module`)||e.message.startsWith(`Importing a module script failed`):!1}function y(e){return!!(e&&typeof e==`object`&&typeof e.then==`function`)}function b(e){return e.replace(/[\x00-\x1f\x7f]/g,``)}function x(e){let t;try{t=decodeURI(e)}catch{t=e.replaceAll(/%[0-9A-F]{2}/gi,e=>{try{return decodeURI(e)}catch{return e}})}return b(t)}var S=[`http:`,`https:`,`mailto:`,`tel:`];function C(e,t){if(!e)return!1;try{let n=new URL(e);return!t.has(n.protocol)}catch{return!1}}function w(e){if(!e||!/[%\\\x00-\x1f\x7f]/.test(e)&&!e.startsWith(`//`))return{path:e,handledProtocolRelativeURL:!1};let t=/%25|%5C/gi,n=0,r=``,i;for(;(i=t.exec(e))!==null;)r+=x(e.slice(n,i.index))+i[0],n=t.lastIndex;r+=x(n?e.slice(n):e);let a=!1;return r.startsWith(`//`)&&(a=!0,r=`/`+r.replace(/^\/+/,``)),{path:r,handledProtocolRelativeURL:a}}function T(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function E(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function D(){throw Error(`Invariant failed`)}var O=n(),k=e(t(),1),A=k.createContext(null);function j(e){return k.useContext(A)}var M=k.createContext(void 0),N=k.createContext(void 0);function P(e,t){return e===t}function F(e,t,n=P){let r=(0,k.useCallback)(t=>{if(!e)return()=>{};let{unsubscribe:n}=e.subscribe(t);return n},[e]),i=(0,k.useCallback)(()=>e?.get(),[e]);return(0,O.useSyncExternalStoreWithSelector)(r,i,i,t,n)}var I={get:()=>void 0,subscribe:()=>({unsubscribe:()=>{}})};function L(e){let t=j(),n=k.useContext(e.from?N:M),r=e.from??n,i=r?e.from?t.stores.getRouteMatchStore(r):t.stores.matchStores.get(r):void 0,a=k.useRef(void 0);return F(i??I,n=>{if((e.shouldThrow??!0)&&!n&&D(),n===void 0)return;let r=e.select?e.select(n):n;if(e.structuralSharing??t.options.defaultStructuralSharing){let e=d(a.current,r);return a.current=e,e}return r})}function R(e){return L({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{let n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}export{v as _,j as a,u as b,S as c,w as d,g as f,C as g,c as h,M as i,E as l,a as m,L as n,A as o,T as p,F as r,D as s,R as t,_ as u,y as v,d as x,r as y};
|
|
2
|
+
//# sourceMappingURL=useParams-CZ_VOC6E.js.map
|
package/dist/client/assets/{usePermissionStatus-hWpY6-jP.js → usePermissionStatus-DFE8UnJC.js}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e,t}from"./react-BUfh6y28.js";import{n,t as r}from"./jsx-runtime-DJeoFXNw.js";import{
|
|
2
|
-
//# sourceMappingURL=usePermissionStatus-
|
|
1
|
+
import{a as e,t}from"./react-BUfh6y28.js";import{n,t as r}from"./jsx-runtime-DJeoFXNw.js";import{dr as i,zd as a}from"./utils-Dv1DrWoz.js";var o=n(),s=e(r(),1);function c(e){let t=(0,o.c)(7),{permissions:n,busy:r}=e,c=r!==void 0&&r,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)(a,{className:`size-4`,"aria-hidden":`true`}),`Allowed`]}):(0,s.jsx)(i,{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,a,c;t[0]===e?(n=t[1],r=t[2],a=t[3],c=t[4]):({ready:r,busy:a,children:c,...n}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=a,t[4]=c);let l=a!==void 0&&a,u=c===void 0?`Continue`:c,d=!r||l,f;return t[5]!==u||t[6]!==n||t[7]!==d?(f=(0,s.jsx)(i,{...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-DFE8UnJC.js.map
|
package/dist/client/assets/{usePullRequestActions-B6Nj3E46.js → usePullRequestActions-CVcuaade.js}
RENAMED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{a as e,t}from"./react-BUfh6y28.js";import{n}from"./jsx-runtime-DJeoFXNw.js";import{D as r,Os as i,Rw as a,Ts as o,Wc as s,Z_ as c,Zo as l,Zs as u,aE as d,bs as f,iv as p,lv as m,ts as h}from"./utils-BlwLA0C4.js";import{M as g,N as _,W as v}from"./runtime-DYpzE3gq.js";import{a as y,i as b}from"./vcsRefInvalidation-Bkr613aV.js";import{w as ee}from"./entities-DhRbI2L4.js";import{t as te}from"./runtime-Csw1ghUb.js";import{i as x}from"./toast-C1lIuL0v.js";import{D as S,d as C,s as w}from"./useSettings-CyF6ezIl.js";import{i as T,n as E}from"./session-meZM9Xpf.js";import{n as D}from"./query-yuF2-QRx.js";import{t as O}from"./use-atom-command-sg76DXcz.js";import{d as k,l as A,u as j}from"./queries-B6XxcqnT.js";import{t as M}from"./sourceControl-Bb4nr0Wx.js";import{C as N,r as P}from"./pullRequests-Dqd6r9gw.js";import{R as F,b as ne,y as re}from"./pullRequestDetail.logic-CLAnM03l.js";import{n as ie}from"./useHandleNewThread-DglymQWA.js";import{c as ae,f as I,i as L,s as R}from"./p4ProjectFile-DuMklfjR.js";import{t as z}from"./sidebarProjectGrouping-upKKecFM.js";var B=e(t(),1),V=n();function H(e){return{pullRequestResolution:_(e,{label:`environment-data:git:resolve-pull-request`,tag:s.gitResolvePullRequest}),preparePullRequestThread:g(e,{label:`environment-data:git:prepare-pull-request-thread`,tag:s.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,p),n=W[e.kind],r=h(A.stateAtom(e.scope)),i=r.operation===n,s=(0,B.useCallback)(()=>{A.resetError(l,e.scope,n)},[e.scope,n]),c=(0,B.useCallback)(async(...t)=>{if(e.scope.environmentId===null||!E(e.scope.environmentId,`source-control:write`))return f(a(new m({requiredScope:p,message:`This connection cannot change source control.`})));let r=async()=>{let n=await e.action(...t);return o(n)&&e.onSuccess?.(),n};return e.managedExternally===!0?r():A.track(l,e.scope,{operation:n,label:e.label},r)},[e.action,e.label,e.managedExternally,e.onSuccess,e.scope,n]);return{isAllowed:t,error:i?r.error:null,isPending:i&&r.isRunning,resetError:s,run:c}}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=h(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?f(a(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 o=i,s;return t[4]!==o||t[5]!==e?(s={kind:`init`,label:`Initializing repository`,scope:e,action:o},t[4]=o,t[5]=e,t[6]=s):s=t[6],G(s)}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 o=D(i),s;t[4]!==r||t[5]!==e?(s=async()=>{let t=K(e);return t===null?f(a(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]=s):s=t[6];let c=s,l;return t[7]!==c||t[8]!==e||t[9]!==o.refresh?(l={kind:`pull`,label:`Pulling latest changes...`,scope:e,action:c,onSuccess:o.refresh},t[7]=c,t[8]=e,t[9]=o.refresh,t[10]=l):l=t[10],G(l)}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),o;t[3]!==e.cwd||t[4]!==e.environmentId?(o=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]=o):o=t[5];let s=D(o),c;t[6]!==i||t[7]!==e?(c=async t=>K(e)===null?f(a(new k({operation:`run_change_request`,environmentId:e.environmentId,cwd:e.cwd}))):i(t),t[6]=i,t[7]=e,t[8]=c):c=t[8];let l=c,u;return t[9]!==l||t[10]!==e||t[11]!==s.refresh?(u={kind:`runStackedAction`,label:`Running source control action`,scope:e,action:l,onSuccess:s.refresh,managedExternally:!0},t[9]=l,t[10]=e,t[11]=s.refresh,t[12]=u):u=t[12],G(u)}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 o=D(i),s;t[4]!==r||t[5]!==e?(s=async t=>{let n=K(e);return n===null?f(a(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]=s):s=t[6];let c=s,l;return t[7]!==c||t[8]!==e||t[9]!==o.refresh?(l={kind:`publishRepository`,label:`Publishing repository`,scope:e,action:c,onSuccess:o.refresh},t[7]=c,t[8]=e,t[9]=o.refresh,t[10]=l):l=t[10],G(l)}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?f(a(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`)?f(a(new m({requiredScope:c,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 o=i,s;return t[4]!==o||t[5]!==e?(s={kind:`preparePullRequestThread`,label:`Preparing pull request thread`,scope:e,action:o},t[4]=o,t[5]=e,t[6]=s):s=t[6],G(s)}function X(e){return e.environmentId===null||e.cwd===null||e.reference===null?null:d(i(l.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{a as e,t}from"./react-BUfh6y28.js";import{n}from"./jsx-runtime-DJeoFXNw.js";import{D as r,Lw as i,Os as a,Ts as o,Wc as s,X_ as c,Zo as l,Zs as u,bs as d,cv as f,iE as p,rv as m,ts as h}from"./utils-Dv1DrWoz.js";import{M as g,N as _,W as v}from"./runtime-B6yGAVz4.js";import{a as y,i as b}from"./vcsRefInvalidation-BI3mMuIW.js";import{S as ee}from"./entities-Cd_YDhEa.js";import{t as te}from"./runtime-BhGr1QCf.js";import{i as x}from"./toast-UFTwkJWj.js";import{D as S,d as C,s as w}from"./useSettings-BAP_yCCK.js";import{i as T,n as E}from"./session-B6T_Arzf.js";import{n as D}from"./query-B1dBedyO.js";import{t as O}from"./use-atom-command-BT7sz8Lx.js";import{d as k,l as A,u as j}from"./queries-DMkaYL1H.js";import{t as M}from"./sourceControl-DjMIOzv1.js";import{C as N,r as P}from"./pullRequests-C9YbqDXl.js";import{R as F,b as ne,y as re}from"./pullRequestDetail.logic-CqcRjGbR.js";import{n as ie}from"./useHandleNewThread-nNF3Xnbt.js";import{c as ae,f as I,i as L,s as R}from"./p4ProjectFile-BC2tSEs4.js";import{t as z}from"./sidebarProjectGrouping-CURnoavN.js";var B=e(t(),1),V=n();function H(e){return{pullRequestResolution:_(e,{label:`environment-data:git:resolve-pull-request`,tag:s.gitResolvePullRequest}),preparePullRequestThread:g(e,{label:`environment-data:git:prepare-pull-request-thread`,tag:s.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],r=h(A.stateAtom(e.scope)),a=r.operation===n,s=(0,B.useCallback)(()=>{A.resetError(l,e.scope,n)},[e.scope,n]),c=(0,B.useCallback)(async(...t)=>{if(e.scope.environmentId===null||!E(e.scope.environmentId,`source-control:write`))return d(i(new f({requiredScope:m,message:`This connection cannot change source control.`})));let r=async()=>{let n=await e.action(...t);return o(n)&&e.onSuccess?.(),n};return e.managedExternally===!0?r():A.track(l,e.scope,{operation:n,label:e.label},r)},[e.action,e.label,e.managedExternally,e.onSuccess,e.scope,n]);return{isAllowed:t,error:a?r.error:null,isPending:a&&r.isRunning,resetError:s,run:c}}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=h(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),a;t[1]!==r||t[2]!==e?(a=async()=>{let t=K(e);return t===null?d(i(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]=a):a=t[3];let o=a,s;return t[4]!==o||t[5]!==e?(s={kind:`init`,label:`Initializing repository`,scope:e,action:o},t[4]=o,t[5]=e,t[6]=s):s=t[6],G(s)}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),a;t[1]!==e.cwd||t[2]!==e.environmentId?(a=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]=a):a=t[3];let o=D(a),s;t[4]!==r||t[5]!==e?(s=async()=>{let t=K(e);return t===null?d(i(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]=s):s=t[6];let c=s,l;return t[7]!==c||t[8]!==e||t[9]!==o.refresh?(l={kind:`pull`,label:`Pulling latest changes...`,scope:e,action:c,onSuccess:o.refresh},t[7]=c,t[8]=e,t[9]=o.refresh,t[10]=l):l=t[10],G(l)}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 a=O(n,r),o;t[3]!==e.cwd||t[4]!==e.environmentId?(o=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]=o):o=t[5];let s=D(o),c;t[6]!==a||t[7]!==e?(c=async t=>K(e)===null?d(i(new k({operation:`run_change_request`,environmentId:e.environmentId,cwd:e.cwd}))):a(t),t[6]=a,t[7]=e,t[8]=c):c=t[8];let l=c,u;return t[9]!==l||t[10]!==e||t[11]!==s.refresh?(u={kind:`runStackedAction`,label:`Running source control action`,scope:e,action:l,onSuccess:s.refresh,managedExternally:!0},t[9]=l,t[10]=e,t[11]=s.refresh,t[12]=u):u=t[12],G(u)}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),a;t[1]!==e.cwd||t[2]!==e.environmentId?(a=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]=a):a=t[3];let o=D(a),s;t[4]!==r||t[5]!==e?(s=async t=>{let n=K(e);return n===null?d(i(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]=s):s=t[6];let c=s,l;return t[7]!==c||t[8]!==e||t[9]!==o.refresh?(l={kind:`publishRepository`,label:`Publishing repository`,scope:e,action:c,onSuccess:o.refresh},t[7]=c,t[8]=e,t[9]=o.refresh,t[10]=l):l=t[10],G(l)}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),a;t[1]!==r||t[2]!==e?(a=async t=>{let n=K(e);return n===null?d(i(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`)?d(i(new f({requiredScope:c,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]=a):a=t[3];let o=a,s;return t[4]!==o||t[5]!==e?(s={kind:`preparePullRequestThread`,label:`Preparing pull request thread`,scope:e,action:o},t[4]=o,t[5]=e,t[6]=s):s=t[6],G(s)}function X(e){return e.environmentId===null||e.cwd===null||e.reference===null?null:p(a(l.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:n,detail:i}=e,a=ie(),o=i?.workspaceRoot??null,s;t[0]!==n||t[1]!==o?(s={environmentId:n,cwd:o},t[0]=n,t[1]=o,t[2]=s):s=t[2];let c=Y(s),[l,d]=(0,B.useState)(null),f;t[3]===a?f=t[4]:(f=async(e,t,n)=>{let i=n??await a(e).then(xe,be);if(i===null)return null;let o=r.getState();if(t===null)return i;let s=o.getComposerDraft(i.draftId),c=s?.reviewComments??[],l=re({prompt:s?.prompt??``,lastHandoffPrompt:$.get(i.draftId)},t.prompt);return $.set(i.draftId,t.prompt),o.setPrompt(i.draftId,l),o.setReviewComments(i.draftId,ne(c,t.reviewComments??[])),i},t[3]=a,t[4]=f);let p=f,m;t[5]!==i||t[6]!==n||t[7]!==l||t[8]!==p?(m=async(e,t)=>{if(!i||l!==null)return;d(e);let r=u(n,i.projectId),a=await p(r,t);d(null),a===null?x.add({type:`error`,title:`Could not open a thread`,description:`Try again from the project, or open a thread first.`}):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]=i,t[6]=n,t[7]=l,t[8]=p,t[9]=m):m=t[9];let h=m,g;t[10]!==i||t[11]!==n||t[12]!==l||t[13]!==a||t[14]!==p||t[15]!==c?(g=async(e,t,r)=>{let o=r===void 0?`worktree`:r;if(!i||l!==null)return;d(e);let s=x.add({type:`loading`,title:`Preparing the pull request checkout...`}),f=u(n,i.projectId),m=await a(f).then(ye,ve);if(m===null){d(null),x.update(s,{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 c.run({reference:i.url,mode:o,threadId:m.threadId});if(h._tag===`Failure`){d(null);let e=c.error instanceof Error?c.error.message:null;x.update(s,{type:`error`,title:`Could not prepare the pull request checkout`,...e?{description:e}:{}});return}if(!await a(f,{branch:h.value.branch,worktreePath:h.value.worktreePath,envMode:h.value.worktreePath===null?`local`:`worktree`}).then(_e,ge)){d(null),x.update(s,{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.`};t===null?x.update(s,h.value.isOnPullRequestHead?{type:`success`,title:o===`local`?`Checked out here`:`Checked out`,description:o===`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):(await p(f,t,m),x.update(s,h.value.isOnPullRequestHead?{type:`success`,title:`Checkout ready`,description:`The task is in the composer — read it over, then send.`}:g))},t[10]=i,t[11]=n,t[12]=l,t[13]=a,t[14]=p,t[15]=c,t[16]=g):g=t[16];let _=g,v;return t[17]!==l||t[18]!==h||t[19]!==_?(v={handoff:l,startAsk:h,startHandoff:_},t[17]=l,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-CVcuaade.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e,t}from"./react-BUfh6y28.js";import{Va as n,Vn as r}from"./utils-
|
|
2
|
-
//# sourceMappingURL=useRegisterFieldControl-
|
|
1
|
+
import{a as e,t}from"./react-BUfh6y28.js";import{Va as n,Vn as r}from"./utils-Dv1DrWoz.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-gW7DDA6v.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{n as e}from"./jsx-runtime-DJeoFXNw.js";import{Ht as t,Nt as n,Vt as r}from"./utils-
|
|
2
|
-
//# sourceMappingURL=useScopedModelAvailability-
|
|
1
|
+
import{n as e}from"./jsx-runtime-DJeoFXNw.js";import{Ht as t,Nt as n,Vt as r}from"./utils-Dv1DrWoz.js";import{T as i,i as a}from"./useSettings-BAP_yCCK.js";import{V as o}from"./settingsLayout-CthOqZyP.js";var s=e();function c(e,c){let l=(0,s.c)(5),{targets:u}=o(),{environments:d}=i(),f;return l[0]!==c||l[1]!==d||l[2]!==e||l[3]!==u?(f=(i,o)=>{let s=c.find(e=>e.instanceId===i);for(let c of u){let l=d.find(e=>e.environmentId===c.environmentId),u=l?.serverConfig;if(!u)continue;let f=r(t(u.providers),c.settings,c.projectId).find(e=>e.instanceId===i),p=n(a(c.settings,e),u.providers).get(i);if(!f?.enabled||!f.isAvailable||f.driverKind!==s?.driverKind||!p?.some(e=>e.slug===o&&!e.isUnavailable))return`This model is unavailable on ${l?.label??`a selected environment`}. Select that environment to choose its model separately.`}return null},l[0]=c,l[1]=d,l[2]=e,l[3]=u,l[4]=f):f=l[4],f}export{c as t};
|
|
2
|
+
//# sourceMappingURL=useScopedModelAvailability-BCNsRHrC.js.map
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{a as e,t}from"./react-BUfh6y28.js";import{n}from"./jsx-runtime-DJeoFXNw.js";import{$x as r,$y as i,Bg as a,Bh as o,Dh as s,ES as c,El as l,F_ as u,I_ as d,Ib as f,Jy as p,Kb as ee,Kh as te,L_ as ne,Nh as re,Ob as ie,Oh as ae,Ol as oe,Os as se,Pc as ce,Qv as le,ST as m,Sb as ue,Th as de,Tl as fe,Ts as pe,Wh as me,Ws as he,Zo as ge,_h as _e,as as h,ax as ve,bT as g,bh as ye,cE as be,db as xe,ex as Se,f_ as Ce,gb as we,iE as _,js as Te,kb as Ee,ks as De,m_ as Oe,ns as ke,nv as Ae,nx as je,ox as Me,ps as v,qb as Ne,qh as Pe,rE as Fe,rs as Ie,rx as Le,sb as Re,ts as y,uv as ze,vb as Be,wS as Ve,wT as b,wb as He,xh as Ue}from"./utils-Dv1DrWoz.js";import{At as We,E as Ge,I as Ke,R as qe,Sn as Je,T as Ye,W as Xe,_t as x}from"./runtime-B6yGAVz4.js";import{Dt as Ze,T as Qe,jt as $e,t as et}from"./runtime-BhGr1QCf.js";import{i as S}from"./toast-UFTwkJWj.js";import{f as C,h as w,m as tt,u as nt}from"./server-Dc9414wM.js";import{i as rt,n as it,s as at,t as ot}from"./session-B6T_Arzf.js";import{t as st}from"./use-atom-command-BT7sz8Lx.js";import{D as ct,M as lt,N as ut,P as dt,S as ft,c as pt,i as T,n as E,o as mt,r as ht,x as gt,y as _t}from"./themePalette-01TQqdkx.js";var D=e(t(),1),O=n();function vt(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 yt(e){let t=Ie(t=>h(n=>{let r=n(e.catalogValueAtom).entries.get(t);if(r===void 0)return null;let i=Fe(se(n(e.stateAtom(t))),()=>Je);return{entry:r,connection:r.unsupportedReason===void 0?i===Je&&r.enabled?{phase:`connecting`,error:null,traceId:null}:$e(i):{phase:`unsupported`,error:r.unsupportedReason,traceId:null},serverConfig:n(e.serverConfigValueAtom(t))}}).pipe(v(`environment-presentation:${t}`))),n=new Map;return{presentationAtom:t,presentationsAtom:h(r=>{let i=new Map;for(let n of r(e.catalogValueAtom).entries.keys()){let e=r(t(n));e!==null&&i.set(n,e)}return vt(n,i)||(n=i),n}).pipe(v(`environment-presentations`))}}function bt(e,t){return{environmentId:e,environmentLabel:t.entry.target.label,displayUrl:Ze(t.entry)??``,isRelayManaged:We(t.entry),isEnabled:t.entry.enabled,connectionState:t.connection.phase,connectionError:t.connection.error,connectionErrorTraceId:t.connection.traceId}}function xt(e){let t=h(t=>{let n=[...t(e.catalogValueAtom).entries.keys()],r=_(t.self());return r!==null&&r.length===n.length&&n.every((e,t)=>e===r[t])?r:n}),n=h(t=>{let n=[...t(e.catalogValueAtom).entries].map(([e,t])=>({environmentId:e,label:t.target.label})),r=_(t.self());return r!==null&&r.length===n.length&&n.every((e,t)=>e.environmentId===r[t]?.environmentId&&e.label===r[t]?.label)?r:n}),r=Ie(t=>h(n=>{let r=n(e.presentationAtom(t));if(r===null)return null;let i=bt(t,r),a=_(n.self());return a!==null&&a.environmentId===i.environmentId&&a.environmentLabel===i.environmentLabel&&a.displayUrl===i.displayUrl&&a.isRelayManaged===i.isRelayManaged&&a.isEnabled===i.isEnabled&&a.connectionState===i.connectionState&&a.connectionError===i.connectionError&&a.connectionErrorTraceId===i.connectionErrorTraceId?a:i})),i=h(t=>{let n=[];for(let i of t(e.catalogValueAtom).entries.keys()){let e=t(r(i));e!==null&&n.push(e)}let i=_(t.self());return i!==null&&i.length===n.length&&n.every((e,t)=>e===i[t])?i:n}).pipe(v(`environment-connection-summaries`));return{environmentIdsAtom:t,connectedEnvironmentIdsAtom:h(e=>{let n=e(t).filter(t=>e(r(t))?.connectionState===`connected`),i=_(e.self());return i!==null&&i.length===n.length&&n.every((e,t)=>e===i[t])?i:n}),identitiesAtom:n,environmentsAtom:i,machineByIdAtom:h(n=>{let r=new Map(n(t).map(t=>[t,oe(n(e.presentationAtom(t))?.serverConfig??null)])),i=_(n.self());return i!==null&&vt(i,r)?i:r}),pullRequestsSupportedAtom:h(n=>n(t).some(t=>n(e.presentationAtom(t))?.serverConfig?.environment.capabilities.pullRequests===!0))}}var St=yt({catalogValueAtom:w.catalogValueAtom,stateAtom:w.stateAtom,serverConfigValueAtom:C.configValueAtom}),Ct=xt({catalogValueAtom:w.catalogValueAtom,presentationAtom:St.presentationAtom}),wt=h(null).pipe(v(`web-environment-presentation:empty`));function Tt(e){let t=(0,O.c)(5),n=y(w.catalogValueAtom),r;t[0]===e?r=t[1]:(r=e===null?wt:St.presentationAtom(e),t[0]=e,t[1]=r);let i=y(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 Et={status:`idle`},k=Et,A=null,j=[],M=0,Dt=new Set;function N(e){k=e;for(let e of Dt)e()}function Ot(e){A?.resolve(e);for(let t of j)t.resolve(e);A=null,j=[]}function kt(){return k}function At(e){return Dt.add(e),()=>{Dt.delete(e)}}function jt(){M+=1;let e=!0;return()=>{e&&(e=!1,M=Math.max(0,M-1),M===0&&(Ot(!1),N(Et)))}}function Mt(e,t){if(M!==0)return new Promise(n=>{let r={message:e,variant:t?.variant??`default`,resolve:n};A||k.status===`closing`?j.push(r):(A=r,N({status:`confirming`,message:e,variant:r.variant}))})}function Nt(){return k.status!==`idle`||A!==null||j.length>0}function Pt(e){if(k.status!==`confirming`||!A)return;let t=A;A=null,t.resolve(e),N({status:`closing`,message:k.message,variant:k.variant})}function Ft(){if(k.status!==`closing`)return;let e=j.shift();e?(A=e,N({status:`confirming`,message:e.message,variant:e.variant})):N(Et)}var It={Ctrl:`⌃`,Alt:`⌥`,Shift:`⇧`,Super:`⌘`,CmdOrCtrl:`⌘`};function Lt(e,t=navigator.platform){let n=e.split(`+`),r=n.pop()??``;return ce(t)?`${n.map(e=>It[e]??e).join(``)}${r}`:[...n.map(e=>e===`CmdOrCtrl`?`Ctrl`:e===`Super`?`Meta`:e),r].join(`+`)}var Rt=`http://www.w3.org/2000/svg`,zt={archive:[{tag:`rect`,attrs:{width:`20`,height:`5`,x:`2`,y:`3`,rx:`1`}},{tag:`path`,attrs:{d:`M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8`}},{tag:`path`,attrs:{d:`M10 12h4`}}],check:[{tag:`path`,attrs:{d:`M20 6 9 17l-5-5`}}],timer:[{tag:`line`,attrs:{x1:`10`,x2:`14`,y1:`2`,y2:`2`}},{tag:`line`,attrs:{x1:`12`,x2:`15`,y1:`14`,y2:`11`}},{tag:`circle`,attrs:{cx:`12`,cy:`14`,r:`8`}}],"chevron-right":[{tag:`path`,attrs:{d:`m9 19 7-7-7-7`}}],"circle-check":[{tag:`circle`,attrs:{cx:`12`,cy:`12`,r:`10`}},{tag:`path`,attrs:{d:`m9 12 2 2 4-4`}}],clock:[{tag:`path`,attrs:{d:`M12 6v6l4 2`}},{tag:`circle`,attrs:{cx:`12`,cy:`12`,r:`10`}}],pencil:[{tag:`path`,attrs:{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`}},{tag:`path`,attrs:{d:`m15 5 4 4`}}],copy:[{tag:`rect`,attrs:{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`}},{tag:`path`,attrs:{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`}}],folder:[{tag:`path`,attrs:{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`}}],"git-branch":[{tag:`line`,attrs:{x1:`6`,x2:`6`,y1:`3`,y2:`15`}},{tag:`circle`,attrs:{cx:`18`,cy:`6`,r:`3`}},{tag:`circle`,attrs:{cx:`6`,cy:`18`,r:`3`}},{tag:`path`,attrs:{d:`M18 9a9 9 0 0 1-9 9`}}],eye:[{tag:`path`,attrs:{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`}},{tag:`circle`,attrs:{cx:`12`,cy:`12`,r:`3`}}],"eye-off":[{tag:`path`,attrs:{d:`M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49`}},{tag:`path`,attrs:{d:`M14.084 14.158a3 3 0 0 1-4.242-4.242`}},{tag:`path`,attrs:{d:`M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143`}},{tag:`path`,attrs:{d:`m2 2 20 20`}}],"app-window":[{tag:`rect`,attrs:{x:`2`,y:`4`,width:`20`,height:`16`,rx:`2`}},{tag:`path`,attrs:{d:`M10 4v4`}},{tag:`path`,attrs:{d:`M2 8h20`}},{tag:`path`,attrs:{d:`M6 4v4`}}],"arrow-up-right":[{tag:`path`,attrs:{d:`M7 7h10v10`}},{tag:`path`,attrs:{d:`M7 17 17 7`}}],"external-link":[{tag:`path`,attrs:{d:`M15 3h6v6`}},{tag:`path`,attrs:{d:`M10 14 21 3`}},{tag:`path`,attrs:{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`}}],link:[{tag:`path`,attrs:{d:`M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71`}},{tag:`path`,attrs:{d:`M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71`}}],list:[{tag:`path`,attrs:{d:`M3 5h.01`}},{tag:`path`,attrs:{d:`M3 12h.01`}},{tag:`path`,attrs:{d:`M3 19h.01`}},{tag:`path`,attrs:{d:`M8 5h13`}},{tag:`path`,attrs:{d:`M8 12h13`}},{tag:`path`,attrs:{d:`M8 19h13`}}],share:[{tag:`path`,attrs:{d:`M12 2v13`}},{tag:`path`,attrs:{d:`m16 6-4-4-4 4`}},{tag:`path`,attrs:{d:`M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8`}}],x:[{tag:`path`,attrs:{d:`M18 6 6 18`}},{tag:`path`,attrs:{d:`m6 6 12 12`}}],hash:[{tag:`line`,attrs:{x1:`4`,x2:`20`,y1:`9`,y2:`9`}},{tag:`line`,attrs:{x1:`4`,x2:`20`,y1:`15`,y2:`15`}},{tag:`line`,attrs:{x1:`10`,x2:`8`,y1:`3`,y2:`21`}},{tag:`line`,attrs:{x1:`16`,x2:`14`,y1:`3`,y2:`21`}}],"mail-open":[{tag:`path`,attrs:{d:`M21.2 8.4c.5.38.8.97.8 1.6v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V10a2 2 0 0 1 .8-1.6l8-6a2 2 0 0 1 2.4 0l8 6Z`}},{tag:`path`,attrs:{d:`m22 10-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 10`}}],"message-square-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 Bt(e,t){let n=zt[e];if(!n||typeof document.createElementNS!=`function`)return null;let r=document.createElementNS(Rt,`svg`);r.setAttribute(`xmlns`,Rt),r.setAttribute(`viewBox`,`0 0 24 24`),r.setAttribute(`fill`,`none`),r.setAttribute(`stroke`,`currentColor`),r.setAttribute(`stroke-width`,`2`),r.setAttribute(`stroke-linecap`,`round`),r.setAttribute(`stroke-linejoin`,`round`),r.setAttribute(`class`,t===`destructive`?`size-4.5 shrink-0 sm:size-4`:`size-4.5 shrink-0 text-muted-foreground sm:size-4`);for(let e of n){let t=document.createElementNS(Rt,e.tag);for(let[n,r]of Object.entries(e.attrs))t.setAttribute(n,r);r.appendChild(t)}return r}function Vt(e,t,n){let r=e.getBoundingClientRect(),i=Math.min(Math.max(4,t),Math.max(4,window.innerWidth-r.width-4)),a=Math.min(Math.max(4,n),Math.max(4,window.innerHeight-r.height-4));e.style.left=`${i}px`,e.style.top=`${a}px`}function Ht(e,t){if(typeof Node<`u`&&e instanceof Node)return t.some(t=>t.contains(e));if(!e||typeof e!=`object`)return!1;let n=e;for(;n&&typeof n==`object`;){if(t.includes(n))return!0;n=n.parent}return!1}var P=null;function Ut(){return P!==null}function Wt(){P?.(),P=null}function Gt(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,P===c&&(P=null),document.removeEventListener(`keydown`,u),document.removeEventListener(`pointerdown`,d,!0),document.removeEventListener(`contextmenu`,f,!0);let t=Ht(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))},d=e=>{s&&!Ht(e.target,i)&&l(null)},f=e=>{s&&!Ht(e.target,i)&&(e.preventDefault(),l(null))},p=e=>{for(;i.length>e;)a.pop()?.setAttribute(`aria-expanded`,`false`),i.pop()?.remove()},ee=(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?Bt(`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=Bt(t.icon,n?`destructive`:`neutral`);e&&a.appendChild(e)}let d=document.createElement(`span`);if(d.className=`min-w-0 flex-1 truncate`,d.textContent=t.label,a.appendChild(d),typeof t.accelerator==`string`){let e=document.createElement(`span`);e.className=`ms-6 shrink-0 text-muted-foreground text-xs tracking-widest`,e.style.cssText=`margin-inline-start:1.5rem;flex-shrink:0;color:var(--contrast-muted-foreground);font-size:0.75rem;letter-spacing:0.1em;`,e.textContent=Lt(t.accelerator),e.setAttribute(`aria-hidden`,`true`),a.setAttribute(`aria-keyshortcuts`,t.accelerator.replace(`CmdOrCtrl`,ce(navigator.platform)?`Meta`:`Control`)),a.appendChild(e)}if(e){a.setAttribute(`aria-haspopup`,`menu`),a.setAttribute(`aria-expanded`,`false`);let e=Bt(`chevron-right`,`neutral`);e&&(e.setAttribute(`class`,`-me-0.5 ms-auto size-4.5 shrink-0 text-muted-foreground opacity-80 sm:size-4`),e.setAttribute(`aria-hidden`,`true`),e.dataset.contextMenuChevron=`true`,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;ee(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&&Vt(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(()=>{Vt(c,t,n)})};document.addEventListener(`keydown`,u),document.addEventListener(`pointerdown`,d,!0),document.addEventListener(`contextmenu`,f,!0),ee(e,t?.x??0,t?.y??0,0),P&&P(),P=c,requestAnimationFrame(()=>{s=!0})})}var Kt=`p4code:client-settings:v1`;function qt(){return typeof window<`u`}function Jt(){return qt()?De(Kt,_e):null}function Yt(e){qt()&&Te(Kt,e,_e)}var Xt;function Zt(){return{dialogs:{pickFolder:async e=>window.desktopBridge?window.desktopBridge.pickFolder(e):null,confirm:async(e,t)=>Mt(e,t)??!1},shell:{openExternal:async e=>{if(window.desktopBridge){if(!await window.desktopBridge.openExternal(e))throw Error(`Unable to open link.`)}else window.open(e,`_blank`,`noopener,noreferrer`)},openSystemSettings:async e=>{if(!window.desktopBridge?.openSystemSettings||!await window.desktopBridge.openSystemSettings(e))throw Error(`Unable to open System Settings.`)}},contextMenu:{show:async(e,t)=>window.desktopBridge?window.desktopBridge.showContextMenu(e,t):Gt(e,t),close:async()=>{window.desktopBridge||Wt()}},persistence:{getClientSettings:async()=>window.desktopBridge?window.desktopBridge.getClientSettings():Jt(),setClientSettings:async e=>{if(window.desktopBridge)return window.desktopBridge.setClientSettings(e);Yt(e)}}}}function Qt(){return Zt()}function $t(){if(typeof window<`u`)return Xt||(Xt=Qt(),Xt)}function en(){let e=$t();if(!e)throw Error(`Local API not found`);return e}var F=`p4code:theme`,tn=`(prefers-color-scheme: dark)`,I={theme:`system`,resolvedTheme:`light`,systemDark:!1,followSystem:!0,appearanceMode:`system`,themeHalves:null};function nn(){return L()}function rn(){return typeof window>`u`?{}:an()}function L(){if(typeof window>`u`)return null;try{return ct(window.localStorage.getItem(T))}catch{return null}}function an(){try{let e=JSON.parse(window.localStorage.getItem(`p4code:theme-halves:v1`)??`null`);if(typeof e!=`object`||!e)return{};let t={};for(let n of[`light`,`dark`]){let r=e[n];typeof r==`string`&&(t[n]=r)}return t}catch{return{}}}function on(e){return`${e?.light??``}|${e?.dark??``}`}var sn=`theme-color`,cn=`meta[name="${sn}"][data-dynamic-theme-color="true"]`,R=class extends xe()(`ThemeStorageError`,{operation:i([`read`,`write`]),storageKey:Re,theme:f(mt),cause:p()}){get message(){return`Failed to ${this.operation} theme preference for ${this.storageKey}.`}},ln=Ee(R),un=class extends xe()(`DesktopThemeSyncError`,{theme:mt,cause:p()}){get message(){return`Failed to sync the ${this.theme} theme to the desktop shell.`}},dn=Ee(un),z=[],B=null,fn=!0,pn=null,V=null,H=null;function U(){fn=!0;for(let e of z)e()}function mn(){return typeof window<`u`&&typeof window.matchMedia==`function`&&window.matchMedia(tn).matches}function hn(e){if(typeof window>`u`)return e===`system`;try{let e=window.localStorage.getItem(ht);if(e===`true`)return!0;if(e===`false`)return!1}catch{}return e===`system`}function gn(e){return e===`light`||e===`dark`||e===`system`}function W(e){if(typeof window<`u`)try{let e=window.localStorage.getItem(E);if(gn(e))return e}catch{}return hn(e)?`system`:_t(e)??`light`}function _n(e){if(typeof window<`u`)try{window.localStorage.setItem(E,e)}catch(e){throw new R({operation:`write`,storageKey:E,cause:e})}}function vn(){if(typeof window>`u`)return I.theme;let e;try{e=window.localStorage.getItem(F)}catch(e){throw new R({operation:`read`,storageKey:F,cause:e})}return e!==null&&ft(e)?e:I.theme}function yn(e){if(typeof window<`u`)try{window.localStorage.setItem(F,e),H=null}catch(t){throw new R({operation:`write`,storageKey:F,theme:e,cause:t})}}function G(){if(H!==null)return I.theme;try{return vn()}catch(e){let t=ln(e)?e:new R({operation:`read`,storageKey:F,cause:e});return H=t,console.error(t.message,{operation:t.operation,storageKey:t.storageKey,...x(t)}),I.theme}}function bn(){let e=document.querySelector(cn);return e||(e=document.createElement(`meta`),e.name=sn,e.setAttribute(`data-dynamic-theme-color`,`true`),document.head.append(e),e)}function xn(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 Sn(){return document.querySelector(`main[data-slot='sidebar-inset']`)??document.querySelector(`[data-slot='sidebar-inner']`)??document.body}function Cn(){if(typeof document>`u`||typeof getComputedStyle>`u`)return;let e=getComputedStyle(document.documentElement),t=document.documentElement.dataset.themeId?xn(e.getPropertyValue(`--app-chrome-background`)):null,n=xn(getComputedStyle(Sn()).backgroundColor),r=xn(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="${sn}"]`);if(a.length===0)bn().setAttribute(`content`,i);else for(let e of a)e.setAttribute(`content`,i)}function K(e,{suppressTransitions:t=!1,preservePreview:n=!0}={}){if(typeof document>`u`||typeof window>`u`||n&&document.documentElement.dataset?.themeId===`__preview`)return;let r=W(e),i=r===`system`,a=i?mn():!1,o=L();if(V?.theme===e&&V.systemDark===a&&V.followSystem===i&&V.appearanceMode===r&&on(V.themeHalves)===on(o)){Tn(e,i,r);return}t&&document.documentElement.classList.add(`no-transitions`);let s=ut(e,a,i,r,o);pt(dt(e,o,s),s),document.documentElement.classList.toggle(`dark`,s===`dark`),V={theme:e,systemDark:a,followSystem:i,appearanceMode:r,themeHalves:o},Cn(),Tn(e,i,r),t&&(document.documentElement.offsetHeight,requestAnimationFrame(()=>{document.documentElement.classList.remove(`no-transitions`)}))}async function wn(e,t,n,r,i=L()){try{await e.setTheme(lt(t,n,r,i))}catch(e){throw new un({theme:t,cause:e})}}function Tn(e,t,n){if(typeof window>`u`)return;let r=window.desktopBridge,i=L(),a=lt(e,t,n,i);r&&typeof r.setTheme==`function`&&pn!==a&&(pn=a,wn(r,e,t,n,i).catch(t=>{let n=dn(t)?t:new un({theme:e,cause:t});console.error(n.message,{theme:n.theme,...x(n)}),pn===a&&(pn=null)}))}typeof document<`u`&&typeof window<`u`&&K(G());function En(){if(typeof window>`u`)return I;if(!fn&&B)return B;fn=!1;let e=G(),t=W(e),n=t===`system`,r=n?mn():!1,i=L(),a=ut(e,r,n,t,i);return B&&B.theme===e&&B.resolvedTheme===a&&B.systemDark===r&&B.followSystem===n&&B.appearanceMode===t&&on(B.themeHalves)===on(i)||(B={theme:e,resolvedTheme:a,systemDark:r,followSystem:n,appearanceMode:t,themeHalves:i}),B}function Dn(){return I}function On(){let e=G();W(e)===`system`&&K(e,{suppressTransitions:!0}),U()}function kn(e){e.key===F?(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),gt(),V=null,K(G(),{suppressTransitions:!0}),U())}var An=null;function jn(e){if(typeof window>`u`)return()=>{};if(z.push(e),!An){let e=typeof window.matchMedia==`function`?window.matchMedia(tn):null;e?.addEventListener(`change`,On),window.addEventListener(`storage`,kn),An=()=>{e?.removeEventListener(`change`,On),window.removeEventListener(`storage`,kn)}}return()=>{z=z.filter(t=>t!==e),z.length===0&&(An?.(),An=null)}}function Mn(){let e=(0,D.useSyncExternalStore)(jn,En,Dn),{theme:t,resolvedTheme:n}=e,r=(0,D.useCallback)(e=>{if(typeof window>`u`)return!1;try{_n(W(G()));let t=window.localStorage.getItem(T);window.localStorage.removeItem(T);try{yn(e)}catch(e){if(t!==null)try{window.localStorage.setItem(T,t)}catch{}throw e}}catch(t){let n=ln(t)?t:new R({operation:`write`,storageKey:F,theme:e,cause:t});return console.error(n.message,{operation:n.operation,storageKey:n.storageKey,theme:e,...x(n)}),!1}return K(e,{suppressTransitions:!0}),U(),!0},[]),i=(0,D.useCallback)(e=>{if(typeof window>`u`)return!1;try{_n(e)}catch(e){let t=ln(e)?e:new R({operation:`write`,storageKey:E,cause:e});return console.error(t.message,{operation:t.operation,storageKey:t.storageKey,...x(t)}),!1}return H=null,K(G(),{suppressTransitions:!0}),U(),!0},[]),a=(0,D.useCallback)(e=>{let n=W(t),r=e?`system`:n===`system`?_t(t)??`light`:n;return i(r)},[i,t]),o=(0,D.useCallback)((e,t)=>{if(typeof window>`u`)return!1;try{let n={...an()};t===null?delete n[e]:n[e]=t,n.light===void 0&&n.dark===void 0?window.localStorage.removeItem(T):window.localStorage.setItem(T,JSON.stringify(n))}catch(e){let t=new R({operation:`write`,storageKey:T,cause:e});return console.error(t.message,{operation:t.operation,storageKey:t.storageKey,...x(t)}),!1}return K(G(),{suppressTransitions:!0}),U(),!0},[]),s=(0,D.useCallback)(()=>{if(typeof window>`u`)return!1;try{window.localStorage.removeItem(T)}catch(e){let t=new R({operation:`write`,storageKey:T,cause:e});return console.error(t.message,{operation:t.operation,storageKey:t.storageKey,...x(t)}),!1}return K(G(),{suppressTransitions:!0}),U(),!0},[]),c=(0,D.useCallback)(({preservePreview:e=!1}={})=>{typeof window<`u`&&(V=null,K(G(),{suppressTransitions:!0,preservePreview:e}),U())},[]);return(0,D.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 Nn=Be(ie(we)),Pn=Me(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??``),Nn(t).pipe(c(e=>e.issue))}),Fn=new Se(Pn,ve());Le().pipe(je(ve({space:2})));var In=e=>Re.pipe(ue(e,Fn)),Ln={performance:{profile:`performance`,automaticGitFetchInterval:m(15),providerHealthRefreshInterval:g(1),hostPowerMonitorActiveInterval:m(30),hostPowerMonitorIdleInterval:g(2),idleClientTtl:m(45),pauseWhenHostLocked:!0,pauseWhenHostLowPower:!1,pauseWhenClientLowPower:!1,pauseWhenOnBattery:!1},balanced:{profile:`balanced`,automaticGitFetchInterval:ye,providerHealthRefreshInterval:s,hostPowerMonitorActiveInterval:m(30),hostPowerMonitorIdleInterval:g(5),idleClientTtl:m(45),pauseWhenHostLocked:!0,pauseWhenHostLowPower:!0,pauseWhenClientLowPower:!0,pauseWhenOnBattery:!1},"battery-saver":{profile:`battery-saver`,automaticGitFetchInterval:m(0),providerHealthRefreshInterval:g(15),hostPowerMonitorActiveInterval:g(1),hostPowerMonitorIdleInterval:g(10),idleClientTtl:m(45),pauseWhenHostLocked:!0,pauseWhenHostLowPower:!0,pauseWhenClientLowPower:!0,pauseWhenOnBattery:!0}};function q(e){return Ln[e]}function Rn(e){return e.profile===`custom`?e.baseProfile??`balanced`:e.profile}function zn(e){let t=Rn(e),n=Ln[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 b(e)===b(t)}function Bn(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 Vn(e){if(e.profile!==`custom`)return{schemaVersion:1,profile:e.profile,overrides:{}};let t=zn(e),n=[Rn(e),`balanced`,`performance`,`battery-saver`];for(let e of n)if(Bn(t,Ln[e]))return{schemaVersion:1,profile:e,overrides:{}};let r=Rn(e),i=Ln[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 Hn(e){let t={schemaVersion:1,profile:Ue,overrides:{}},n=e.backgroundActivity.profile===t.profile&&e.backgroundActivity.baseProfile===void 0&&Object.keys(e.backgroundActivity.overrides).length===0,r=e.backgroundActivityProfile,i=r!==`balanced`||b(e.automaticGitFetchInterval)!==b(ye)||b(e.providerHealthRefreshInterval)!==b(s);return zn(n&&i?{schemaVersion:1,profile:b(e.automaticGitFetchInterval)===b(q(r).automaticGitFetchInterval)&&b(e.providerHealthRefreshInterval)===b(q(r).providerHealthRefreshInterval)?r:`custom`,baseProfile:r,overrides:{...b(e.automaticGitFetchInterval)===b(q(r).automaticGitFetchInterval)?{}:{automaticGitFetchInterval:e.automaticGitFetchInterval},...b(e.providerHealthRefreshInterval)===b(q(r).providerHealthRefreshInterval)?{}:{providerHealthRefreshInterval:e.providerHealthRefreshInterval}}}:e.backgroundActivity)}function Un(e){let t=Hn(e);return Vn({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 Wn=In(re);He(Wn);function Gn(e,t){let n=e.providerInstances[t.instanceId];return n===void 0?o(t.instanceId):Pe(n)}var Kn=[`codex`,`claudeAgent`,`cursor`,`grok`,`muse`,`pi`,`opencode`,`antigravity`].map(e=>u.make(e));function qn(e,t,n){let r=[...Kn.map(e=>[ne(e),e]),...n?.includeConfiguredInstances===!0?Object.entries(e).flatMap(([e,t])=>Kn.includes(t.driver)?[[d.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&&he(s?.customModels).some(e=>e.slug===o.model)?o:{instanceId:i,model:Oe[a]??Ce[a]??`gpt-6-luna`}}function Jn(e,t,n){let r=e.sourceControlWriterModelSelection;if(!r||!te(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&&fe(i)&&l(i)?r:e.textGenerationModelSelection}function Yn(e,t,n){let r=e.reviewGuideModelSelection;if(r&&te(e,n,r.instanceId)){let e=t?.find(e=>e.instanceId===r.instanceId);if(t===void 0||e?.enabled===!0&&fe(e)&&l(e))return r}return Jn(e,t,n)}function Xn(e,t={}){return{favorites:e.favorites??t.favorites??[],providerModelPreferences:e.providerModelPreferences??t.providerModelPreferences??{}}}function Zn(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 Qn=new Set([`continueThreadsAfterServerUpdate`,`autoResumeLimitedThreads`,`snoozeLimitedThreads`,`newWorktreesStartFromOrigin`,`sourceControlWritingStyle`,`textGenerationModelSelection`]);function $n(e){let t={},n={};for(let[r,i]of Object.entries(e))Qn.has(r)?t[r]=i:n[r]=i;return{sharedPatch:t,localPatch:n}}function er(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)||!Gn(n,{...n.textGenerationModelSelection,...e.textGenerationModelSelection}))&&(e=Ne(e,[`textGenerationModelSelection`])),t?.threadRestartContinuation===!0?e:Ne(e,[`continueThreadsAfterServerUpdate`])}function tr(e){return e.connection.phase===`connected`&&e.serverConfig!==null}function nr(e){let t=e.atom(le(Ge.pipe(Ve(e=>a(e.state)))),{initialValue:Ye});return{stateAtom:t,stateValueAtom:h(e=>Fe(se(e(t)),()=>Ye)).pipe(v(`relay-environment-discovery-value`)),refresh:Ke(e,{label:`relay-environment-discovery:refresh`,concurrency:{mode:`singleFlight`,key:()=>`refresh`},execute:e=>Ge.pipe(r(e=>e.refresh))})}}var rr=nr(et);function ir(e,t){return{...t,environmentId:e,label:t.entry.target.label,displayUrl:Ze(t.entry),relayManaged:We(t.entry)}}function ar(){let e=(0,O.c)(7),t=y(w.catalogValueAtom),n=y(w.networkStatusValueAtom),r=y(St.presentationsAtom),i;e[0]===r?i=e[1]:(i=[...r.entries()].map(or),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 or(e){let[t,n]=e;return ir(t,n)}function sr(){return y(tt)}function cr(e){let t=(0,O.c)(3),{presentation:n}=Tt(e),r;return t[0]!==e||t[1]!==n?(r=e===null||n===null?null:ir(e,n),t[0]=e,t[1]=n,t[2]=r):r=t[2],r}function lr(){return cr(sr())}function ur(e){let t=(0,O.c)(2),n=at(e),r;return t[0]===n?r=t[1]:(r=be(n)?n.value.httpBaseUrl:null,t[0]=n,t[1]=r),r}function dr(){return y(rr.stateValueAtom)}function fr(){return y(Ct.environmentIdsAtom)}function pr(){return y(Ct.identitiesAtom)}function mr(){return y(Ct.pullRequestsSupportedAtom)}var hr=`[CLIENT_SETTINGS]`,gr=new Set,_r=new Set,vr=de,Y=`pending`,X=null,yr=0,br=Promise.resolve(),xr=0;function Sr(){for(let e of gr)e()}function Cr(){for(let e of _r)e()}function Z(){return vr}function wr(e){vr=e,Sr()}function Tr(e){Y!==e&&(Y=e,Cr())}function Er(e){return gr.add(e),Q().catch(()=>void 0),()=>{gr.delete(e)}}function Dr(){return Y===`ready`}function Or(){return Y}function kr(e){return _r.add(e),Q().catch(()=>void 0),()=>{_r.delete(e)}}async function Q(){if(Y===`ready`)return;if(X)return X;let e=yr;Tr(Y===`failed`||Y===`retrying`?`retrying`:`pending`);let t=(async()=>{try{let t=await en().persistence.getClientSettings();if(e!==yr)return;t&&wr({...de,...t}),Tr(`ready`)}catch(t){throw e===yr&&Tr(`failed`),console.error(`${hr} hydrate failed`,{operation:`hydrate`,...x(t)}),t}})().finally(()=>{X===t&&(X=null)});return X=t,X}var Ar=e=>en().persistence.setClientSettings(e);function jr(e){let t=br.then(e);return br=t.then(()=>void 0,()=>void 0),t}function Mr(e,t=Ar){let n=Y!==`ready`||xr>0;return n?xr+=1:wr({...Z(),...e}),jr(async()=>{if(n)try{Y!==`ready`&&await Q(),wr({...Z(),...e})}finally{--xr}await t(Z())}).catch(e=>{console.error(`${hr} persist failed`,{operation:`persist`,...x(e)})})}async function Nr(e,t=Ar){return jr(async()=>{for(Y!==`ready`&&await Q();;){let n=Z(),r=e(n);if(await t(r),Z()===n)return wr(r),r}})}var Pr=new Set(ee(re.fields));function Fr(e){let t={},n={};for(let[r,i]of Object.entries(e))Pr.has(r)?t[r]=i:n[r]=i;return{serverPatch:t,clientPatch:n}}function Ir(){return Z()}function Lr(){return Q()}function Rr(){return(0,D.useSyncExternalStore)(kr,Dr,zr)}function zr(){return!1}function Br(){return(0,D.useSyncExternalStore)(kr,Or,Vr)}function Vr(){return`pending`}function Hr(){return(0,D.useSyncExternalStore)(Er,Z,Ur)}function Ur(){return de}function Wr(e,t){return{...t,...e,...Xn(e,t)}}var Gr=new Set;function $(e,t){let n=(0,O.c)(8),r=Hr(),i=Rr(),a;n[0]===Symbol.for(`react.memo_cache_sentinel`)?(a={reportFailure:!1},n[0]=a):a=n[0];let o=st(C.updateSettings,a),s,c;n[1]!==r||n[2]!==e||n[3]!==i||n[4]!==o||n[5]!==t?(s=()=>{if(!e||!t||!i||Gr.has(e))return;let n=Zn(t,r);n&&(Gr.add(e),o({environmentId:e,input:{patch:n}}).finally(()=>Gr.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,D.useEffect)(s,c)}function Kr(e,t){let n=(0,O.c)(6),r=Hr(),i;n[0]!==r||n[1]!==e?(i=Wr(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 qr(e){let t=(0,O.c)(3),n=Hr(),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}async function Jr(e,t){return(e.favorites===null||e.providerModelPreferences===null)&&await Lr(),{...Zn(e,Ir()),...t}}function Yr(e){let t=(0,O.c)(6),n;t[0]===e?n=t[1]:(n=e?C.settingsValueAtom(e):Zr,t[0]=e,t[1]=n);let r=y(n),i=st(C.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 Jr(r,t)}catch{S.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 Xr(e){let t=(0,D.use)(ke),n=(0,D.useRef)(new Map),r=Yr(e);return(0,D.useCallback)(async(i,a)=>{if(!e)return;let o=C.settingsValueAtom(e),s=t.get(o);if(!s)return;if(s.favorites===null)try{await Lr()}catch{S.add({type:`error`,title:`Favorites not saved`,description:`Could not load saved model preferences. Try again.`});return}let c=t.get(o)??s,l=Xn(c,Ir()).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&&pe(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 Zr=h(null);function Qr(e){let t=(0,O.c)(5),n;t[0]===e?n=t[1]:(n=e?C.settingsValueAtom(e):Zr,t[0]=e,t[1]=n);let r=y(n),i=Hr();$(e,r);let a=r??ae,o;return t[2]!==i||t[3]!==a?(o=Xn(a,i),t[2]=i,t[3]=a,t[4]=o):o=t[4],o}function $r(e,t){let n=(0,O.c)(2),r;n[0]===e?r=n[1]:(r=C.settingsValueAtom(e),n[0]=e,n[1]=r);let i=y(r);return $(e,i),Kr(i??ae,t)}function ei(e){let t=(0,O.c)(4),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n={reportFailure:!1},t[0]=n):n=t[0];let r=st(C.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 ti(e){let t=lr(),n=y(nt);return $(t?.environmentId??null,t?.serverConfig?.settings??null),Kr(n,e)}var ni=`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 ri(){let e=(0,O.c)(2),t=lr(),n;return e[0]===t?n=e[1]:(n=t!==null||!Qe(),e[0]=t,e[1]=n),n}function ii(e){let t=(0,O.c)(3),n=e!==void 0&&e,{environments:r}=ar(),i;return t[0]!==r||t[1]!==n?(i=h(e=>r.filter(tr).flatMap(t=>{let r=e(ot.sessionStateAtom(t.environmentId));if(n&&r._tag===`Initial`)return[t.environmentId];let i=r._tag===`Failure`?null:_(se(r));return i!==null&&ze(i,`settings:write`)?[t.environmentId]:[]})),t[0]=r,t[1]=n,t[2]=i):i=t[2],y(i)}function ai(e){let t=(0,O.c)(10);rt(e,Ae);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=st(C.updateSettings,n),{environments:i}=ar(),a;t[1]!==i||t[2]!==r?(a=async e=>{let t=await r(e);if(t._tag===`Failure`&&!qe(t)){let n=i.find(t=>t.environmentId===e.environmentId)?.label??e.environmentId,r=Xe(t);S.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,s=ii(!0),c;return t[4]!==e||t[5]!==i||t[6]!==r||t[7]!==o||t[8]!==s?(c=t=>{let{serverPatch:n,clientPatch:a}=Fr(t),c=e===null||me(n).every(t=>it(e,t));if(Object.keys(n).length>0&&!c&&S.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&&c){let{sharedPatch:t,localPatch:a}=$n(n),c=ui;if(Object.keys(a).length>0&&(e?o({environmentId:e,input:{patch:a}}):c()),Object.keys(t).length>0){let n=i.find(t=>t.environmentId===e)?.serverConfig?.settings,a=new Set(s);e&&a.add(e);let o=[],l=[];for(let r of a){let a=i.find(e=>e.environmentId===r),s=er(t,a?.serverConfig?.environment.capabilities,a?.serverConfig?.settings,n,r===e);Object.keys(s).length!==0&&(ge.get(ot.sessionStateAtom(r))._tag!==`Initial`&&!me(t).every(e=>it(r,e))?l.push(a?.label??r):o.push({environmentId:r,input:{patch:s}}))}o.length===0?c(l.length>0?`This connection lacks permission to change settings on ${l.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(oi)}}Object.keys(a).length>0&&Mr(a)},t[4]=e,t[5]=i,t[6]=r,t[7]=o,t[8]=s,t[9]=c):c=t[9],c}function oi(e){let t=e.flatMap(li);if(t.length===0)return;let n=e.filter(ci).map(si);S.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 si(e){let{label:t}=e;return t}function ci(e){let{result:t}=e;return t._tag===`Success`}function li(e){let{label:t,result:n}=e;if(n._tag!==`Failure`||qe(n))return[];let r=Xe(n);return[`Could not save on ${t}: ${r instanceof Error?r.message:`The save failed. Try reconnecting and saving again.`}`]}function ui(e){let t=e===void 0?ni:e;return S.add({type:`warning`,title:`Setting not saved`,description:t})}function di(e){return ai(e)}function fi(){return ai(lr()?.environmentId??null)}function pi(){return mi}function mi(e){return Mr(e)}export{Mt as $,rr as A,W as B,pr as C,sr as D,lr as E,q as F,Mn as G,rn as H,Vn as I,Ut as J,en as K,Un as L,Yn as M,Jn as N,mr as O,Rn as P,jt as Q,Hn as R,ur as S,ar as T,vn as U,nn as V,Cn as W,Nt as X,Ft as Y,kt as Z,pi as _,Mr as a,fi as b,Rr as c,$r as d,Pt as et,$ as f,Xr as g,ri as h,Wr as i,Tt as it,qn as j,dr as k,Br as l,ti as m,Lr as n,St as nt,Nr as o,ei as p,$t as q,Ir as r,Ct as rt,qr as s,ni as t,At as tt,Qr as u,Yr as v,fr as w,cr as x,di as y,In as z};
|
|
3
|
+
//# sourceMappingURL=useSettings-BAP_yCCK.js.map
|