@p4code/cli 0.9.14 → 0.9.17
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/AcpMcpStdioBridge-Bv41U5Ym.mjs +3 -0
- package/dist/{AcpMcpStdioBridge-z_p02VlR.mjs → AcpMcpStdioBridge-CvhQaaYj.mjs} +11 -4
- package/dist/{Effect-Bwkv2ifD.mjs → Effect-_Rz7VLdg.mjs} +33 -2
- package/dist/{Schema-CFgoTmE6.mjs → Schema-APnY3Ozr.mjs} +2 -2
- package/dist/{Stream-B4Gds95A.mjs → Stream-CJtpwu3-.mjs} +45 -3
- package/dist/bin.mjs +15 -2
- package/dist/{binCli-BGRfVnO9.mjs → binCli-B298WI-F.mjs} +9560 -5585
- package/dist/claude-history-worker.mjs +1 -1
- package/dist/{claudeHistoryWorker-DVpahhef.mjs → claudeHistoryWorker-Dgk6e0nY.mjs} +4 -4
- package/dist/client/.vite/manifest.json +2332 -2128
- package/dist/client/assets/{2NI2N5EU-Bk2qNhha.js → 2NI2N5EU-D4f5i1y_.js} +2 -2
- package/dist/client/assets/{4UO7MD6I-CPV9277r.js → 4UO7MD6I-RrpAQ0X1.js} +2 -2
- package/dist/client/assets/{5B3SVYGG-LgRjxbnj.js → 5B3SVYGG-ClZSmzf_.js} +2 -2
- package/dist/client/assets/{5GK6JWQ2-9ndiKpIs.js → 5GK6JWQ2-B1md9I9Z.js} +2 -2
- package/dist/client/assets/{5N7A7DKN-DnUhiayz.js → 5N7A7DKN-BQIARO23.js} +2 -2
- package/dist/client/assets/{5OC2THR4-DxmpZihk.js → 5OC2THR4-351ZCzKk.js} +2 -2
- package/dist/client/assets/{5S6HY5KT-C4cUz8RB.js → 5S6HY5KT-DmJkK7tt.js} +2 -2
- package/dist/client/assets/{6IMQ5BUJ-2G8Rrp9t.js → 6IMQ5BUJ-BpvNx_p4.js} +2 -2
- package/dist/client/assets/{6OLKWJ4F-CW3F_AM6.js → 6OLKWJ4F-C2xPWRsp.js} +2 -2
- package/dist/client/assets/{74OO7NKP-z5ujM5KH.js → 74OO7NKP--xC0IYpN.js} +2 -2
- package/dist/client/assets/{75O6YZUN-CSeaYNtt.js → 75O6YZUN-CK0ONIHW.js} +2 -2
- package/dist/client/assets/{77XECAW3-DxL0AHyZ.js → 77XECAW3-BcsWkjLy.js} +2 -2
- package/dist/client/assets/{ABYRPUBD-DvBcJj7G.js → ABYRPUBD-D3uBdyxY.js} +2 -2
- package/dist/client/assets/AlertDialogRoot-CPanDrss.js +2 -0
- package/dist/client/assets/{AnimatedHeight-DChvigzz.js → AnimatedHeight-CVfEvZ5q.js} +2 -2
- package/dist/client/assets/{AuthSurfaceShell-29ykag3m.js → AuthSurfaceShell-Cfzl0v4C.js} +2 -2
- package/dist/client/assets/{BB2UYUI2-Cun87LIm.js → BB2UYUI2-BOnjWgZo.js} +2 -2
- package/dist/client/assets/{BUM34MOA-D6aIFnwf.js → BUM34MOA-B7RHMom2.js} +2 -2
- package/dist/client/assets/{CEQABKGZ-DYzEk-9p.js → CEQABKGZ-Cc9Oxare.js} +2 -2
- package/dist/client/assets/{CXAC5362-CdQgNtpk.js → CXAC5362-BNdOJTpr.js} +2 -2
- package/dist/client/assets/ChatGptUsageButton-xIp-6pmC.js +2 -0
- package/dist/client/assets/ChatMarkdown-Bueup3X5.js +49 -0
- package/dist/client/assets/CheckboxIndicator-Bx7Oi3gX.js +2 -0
- package/dist/client/assets/ClippedText-CIorIVl7.js +2 -0
- package/dist/client/assets/CodexSetupSection.logic-C7e1n48R.js +2 -0
- package/dist/client/assets/ComboboxClear-HZ-hIKnq.js +2 -0
- package/dist/client/assets/ComboboxGroupLabel-DUYNaL5F.js +2 -0
- package/dist/client/assets/{CommandBlock-DBGDwDRu.js → CommandBlock-4iMcWKQI.js} +2 -2
- package/dist/client/assets/CompositeRoot-BBK88_pH.js +2 -0
- package/dist/client/assets/ConnectAgentSurface-BWOV2eWU.js +2 -0
- package/dist/client/assets/{ConnectionStatusDot-C_9jtSee.js → ConnectionStatusDot-ChSEZVFH.js} +2 -2
- package/dist/client/assets/DRACOLoader-DluumOSd.js +3 -0
- package/dist/client/assets/{DRLTVNUE-CftE6Aa3.js → DRLTVNUE-DFsymRUq.js} +2 -2
- package/dist/client/assets/{DYY6UVD2-DezK9sBO.js → DYY6UVD2-CBGlYjYj.js} +2 -2
- package/dist/client/assets/DevicePanel-DbUlYPs5.js +2 -0
- package/dist/client/assets/DeviceSetup-DwoJ9gYG.js +2 -0
- package/dist/client/assets/DialogTitle-CZ-x-t6r.js +2 -0
- package/dist/client/assets/{DiffCommentAnnotation-QtrnUuSs.js → DiffCommentAnnotation-I1NLNQ4a.js} +3 -3
- package/dist/client/assets/{DiffFileTree-B_4bn5J8.js → DiffFileTree-D2Less6B.js} +2 -2
- package/dist/client/assets/DiffPanel-CbeaPGl7.js +2 -0
- package/dist/client/assets/{DiffWorkerPoolProvider-CtpHksSf.js → DiffWorkerPoolProvider-Ed_Eu_5j.js} +3 -3
- package/dist/client/assets/{EmbeddedDesign-B4RMmwTG.css → EmbeddedDesign-2h_Gl1nY.css} +1 -1
- package/dist/client/assets/EmbeddedDesign-cg069GMG.js +22 -0
- package/dist/client/assets/{EnvironmentMachineIcon-DTUBsEaI.js → EnvironmentMachineIcon-DX1kvIxN.js} +2 -2
- package/dist/client/assets/{ExpandableText-Wij8nL6W.js → ExpandableText-DjawxN-Z.js} +2 -2
- package/dist/client/assets/{FNOVOB4O-DHCmE6LN.js → FNOVOB4O-CyUhwNfJ.js} +2 -2
- package/dist/client/assets/FieldControl-HtKPFtzy.js +2 -0
- package/dist/client/assets/{FileDiff-CAtJtUC5.js → FileDiff-B-y5La4j.js} +2 -2
- package/dist/client/assets/{FilePreviewPanel-CjKP3Q7G.js → FilePreviewPanel-c9WvfrZ_.js} +6 -6
- package/dist/client/assets/{FoldedSettingsSection-CAZumPht.js → FoldedSettingsSection-BJZLAjOM.js} +2 -2
- package/dist/client/assets/FormContext-CXpUoAJn.js +2 -0
- package/dist/client/assets/GLTFLoader-DL026JyV.js +3833 -0
- package/dist/client/assets/{HDGCDEEZ-DNHIctoG.js → HDGCDEEZ-Bl6z86eT.js} +2 -2
- package/dist/client/assets/{HSJLKHB7-BfNhUjhw.js → HSJLKHB7-Cfn1dqKq.js} +2 -2
- package/dist/client/assets/{Icons-DYaY7Otq.js → Icons-CnCqDzcX.js} +2 -2
- package/dist/client/assets/Input-DivTTwcy.js +2 -0
- package/dist/client/assets/IntervalSecondsField-BEYqyqtO.js +2 -0
- package/dist/client/assets/JZOYTAAL-5Iy_ls5m.js +1 -0
- package/dist/client/assets/{K3MD6TGW-D-q4Z_68.js → K3MD6TGW-DbKn4Q-g.js} +2 -2
- package/dist/client/assets/{K7RP3OMA-C5AEGeo9.js → K7RP3OMA-C2LcLP3I.js} +2 -2
- package/dist/client/assets/KeybindingsSettings.logic-BBUqSPsh.js +2 -0
- package/dist/client/assets/{LHDIQX7Q-CY4nmSyZ.js → LHDIQX7Q-D15jphae.js} +2 -2
- package/dist/client/assets/{LUXOKEGN-BHmzrQMD.js → LUXOKEGN-a5epevQp.js} +2 -2
- package/dist/client/assets/LinkMachineSelect-BeDb1a2o.js +2 -0
- package/dist/client/assets/{MathTypeset-C1sAcsZE.js → MathTypeset-wh9NB-6n.js} +2 -2
- package/dist/client/assets/ModelLiveLayer-vM3B8fTs.js +3 -0
- package/dist/client/assets/{N3JZAHOW-D1VvHXNc.js → N3JZAHOW-CnXyo2Xv.js} +2 -2
- package/dist/client/assets/{NUIALGQ3-DKQw5Xvm.js → NUIALGQ3-Be5ePBJU.js} +2 -2
- package/dist/client/assets/{NoProjectsHero-DVJOMY01.js → NoProjectsHero-D-hOorzE.js} +2 -2
- package/dist/client/assets/{O65XPQGZ-B7xlpxd0.js → O65XPQGZ-B6ecTWo6.js} +2 -2
- package/dist/client/assets/{O7XIQ6OM-D_yohKEz.js → O7XIQ6OM-DvY9hhop.js} +2 -2
- package/dist/client/assets/{OFQON5FD-Eb1UafMJ.js → OFQON5FD-Csir9i2q.js} +2 -2
- package/dist/client/assets/P4ConnectAccountPages-0UQXNoHX.js +2 -0
- package/dist/client/assets/{P4ConnectSidebarSignIn-BarFXVdD.js → P4ConnectSidebarSignIn-DNS-Ar_U.js} +2 -2
- package/dist/client/assets/{PJQHF43J-xu8MNrTl.js → PJQHF43J-DDRN0fWF.js} +2 -2
- package/dist/client/assets/PanelLayoutControls-1wZHYpgc.js +216 -0
- package/dist/client/assets/PierreEntryIcon-C-UBRZGs.js +2 -0
- package/dist/client/assets/PopoverHandle-AuBayEmY.js +2 -0
- package/dist/client/assets/PreviewPanel-5UQIDtjs.js +2 -0
- package/dist/client/assets/ProjectDefaultsSettings-BuSgjMGJ.js +2 -0
- package/dist/client/assets/ProjectFavicon-Rj7LmbUX.js +3 -0
- package/dist/client/assets/ProjectIconPickerDialog-75VZboJk.js +2 -0
- package/dist/client/assets/{ProjectMonogram-Bui44V7z.js → ProjectMonogram-o7ZBa1RK.js} +2 -2
- package/dist/client/assets/{ProviderAuthTerminal-DjIpg2-V.js → ProviderAuthTerminal-884jYkPg.js} +2 -2
- package/dist/client/assets/ProviderModelPicker-446NiacH.js +2 -0
- package/dist/client/assets/ProviderSettingsForm-CBS1Dlfm.js +2 -0
- package/dist/client/assets/PullRequestCodeTab-DQzL88wU.js +6 -0
- package/dist/client/assets/{RHNBAITX-DWaFNhmX.js → RHNBAITX-DkWE42El.js} +2 -2
- package/dist/client/assets/{ReadOnlySourcePreview-DDDARz8g.js → ReadOnlySourcePreview-DwfiVQrm.js} +2 -2
- package/dist/client/assets/{RedactedSensitiveText-BFwVjGRJ.js → RedactedSensitiveText-DCu9USVF.js} +2 -2
- package/dist/client/assets/RenderErrorBoundary-ZQ6mGx7s.js +23 -0
- package/dist/client/assets/RightPanelResizeHandle-8oJQkwcU.js +2 -0
- package/dist/client/assets/RoomEnvironment-Iz7-KYrN.js +2 -0
- package/dist/client/assets/{SLD4V6NK-kuRIO20K.js → SLD4V6NK-DTdKN7s4.js} +2 -2
- package/dist/client/assets/ScheduledTasksSettings-BFBxrkf4.js +6 -0
- package/dist/client/assets/{ScopedSwitch-B7HEwool.js → ScopedSwitch-BC1gPotW.js} +2 -2
- package/dist/client/assets/ScrollAreaCorner-C2BGnFEt.js +2 -0
- package/dist/client/assets/{SecretInput-CxRazSuj.js → SecretInput-CTGlsesz.js} +2 -2
- package/dist/client/assets/SelectScrollUpArrow-BCdPJCNh.js +2 -0
- package/dist/client/assets/SelfImproveSettingsSection-DrWeWHZ3.js +2 -0
- package/dist/client/assets/SettingsPanels-dLjfE4mE.js +46 -0
- package/dist/client/assets/SettingsPanels.logic-DmWR8tPG.js +2 -0
- package/dist/client/assets/{SettingsScopeNotice-Dt7vuLO5.js → SettingsScopeNotice-C3QzVYEB.js} +2 -2
- package/dist/client/assets/{SidebarStageBackdrop-BzsUCj2G.js → SidebarStageBackdrop-B1pFHa1_.js} +2 -2
- package/dist/client/assets/{T3PCR2KE-C14xVwSj.js → T3PCR2KE-17rNrwIa.js} +2 -2
- package/dist/client/assets/{TKWO2OVW-CC_4uZad.js → TKWO2OVW-duPpJj5d.js} +2 -2
- package/dist/client/assets/{TSHNXIZL-Kizqv5oh.js → TSHNXIZL-DU0_NvP6.js} +2 -2
- package/dist/client/assets/ThemeEditorPanel-75j9OkFZ.js +5 -0
- package/dist/client/assets/ThreadDetailsItemsMenu-D9bVwLRx.js +204 -0
- package/dist/client/assets/ThreadTerminalDrawer-CdfREoC-.js +5 -0
- package/dist/client/assets/TooltipProvider-BUHMH_xT.js +2 -0
- package/dist/client/assets/{UQJE5E4I-KUX5qtvS.js → UQJE5E4I-B6R9z_Jl.js} +2 -2
- package/dist/client/assets/{USNYFO5S-XMF6TRXj.js → USNYFO5S-CoqkxDVj.js} +2 -2
- package/dist/client/assets/{Virtualizer-CqFZ9IgG.js → Virtualizer-CmU5Fo0Z.js} +2 -2
- package/dist/client/assets/{WEVWDWVA-BNUvxLQd.js → WEVWDWVA-C_7PWsV9.js} +2 -2
- package/dist/client/assets/{WorkspaceBreadcrumb-DyZsM9TF.js → WorkspaceBreadcrumb-wSY6JpgP.js} +2 -2
- package/dist/client/assets/{WorkspacePageContainer-DFXSkFyh.js → WorkspacePageContainer-Bv3Si0zJ.js} +2 -2
- package/dist/client/assets/{WorkspacePageHeader-FTc6UfB-.js → WorkspacePageHeader-D35ZiFO-.js} +2 -2
- package/dist/client/assets/{X5RFHQXM-BtifjFQb.js → X5RFHQXM-BUhlFLY4.js} +2 -2
- package/dist/client/assets/{X62E3GBT-DT_qCIPw.js → X62E3GBT-BpMRLXKj.js} +2 -2
- package/dist/client/assets/{XBNEOJTC-7FdMX9IP.js → XBNEOJTC-BRtSarTS.js} +2 -2
- package/dist/client/assets/{YHV2MVVZ-D6KCo9Qp.js → YHV2MVVZ-Csy6jL8n.js} +2 -2
- package/dist/client/assets/{YURCZMG2-D0_CST6F.js → YURCZMG2-BWgVyhae.js} +2 -2
- package/dist/client/assets/{YVG2LODB-CRU4fKD2.js → YVG2LODB-BaRjN-Cm.js} +2 -2
- package/dist/client/assets/_chat-3NFUtZzk.js +47 -0
- package/dist/client/assets/_chat.design-CPUGyCaX.js +2 -0
- package/dist/client/assets/_chat.index-BMWR9-dz.js +2 -0
- package/dist/client/assets/_chat.new-CFxwzp_c.js +4 -0
- package/dist/client/assets/_chat.pull-requests-BeA7vnLo.js +2 -0
- package/dist/client/assets/alert-DNQ3Wqlu.js +2 -0
- package/dist/client/assets/{alert-dialog-DK40IDMO.js → alert-dialog-BRZulAlJ.js} +2 -2
- package/dist/client/assets/assetUrls-C1PZWceM.js +2 -0
- package/dist/client/assets/assets-DPxWpbK1.js +2 -0
- package/dist/client/assets/browserHistoryStore-or0m8nek.js +2 -0
- package/dist/client/assets/{browserLinkTarget-BOF3rlV5.js → browserLinkTarget-DE8VZ118.js} +2 -2
- package/dist/client/assets/{checkbox-bsJs8Zu-.js → checkbox-Cz3A131i.js} +2 -2
- package/dist/client/assets/{color-picker-W4KTEgfL.js → color-picker-BqJjpRIx.js} +2 -2
- package/dist/client/assets/combobox-D28ATySv.js +2 -0
- package/dist/client/assets/{command-C7CgDZ25.js → command-BjQ8TOGE.js} +2 -2
- package/dist/client/assets/{connect-CguaBRtJ.js → connect-CpfP9Azm.js} +2 -2
- package/dist/client/assets/connect-agent-19TQkO9t.js +2 -0
- package/dist/client/assets/design-Bz1IpqHZ.js +2 -0
- package/dist/client/assets/device-DuASmK9r.js +2 -0
- package/dist/client/assets/dialog-BJ3R7bWN.js +2 -0
- package/dist/client/assets/diffPanelStore-Yh6lox6N.js +2 -0
- package/dist/client/assets/{diffRendering-DosiBwUN.js → diffRendering-CeqwU9XS.js} +3 -3
- package/dist/client/assets/{dist-p5OtQFc9.js → dist-C2W3DEZU.js} +3 -3
- package/dist/client/assets/draco_decoder-DZ63_CFx.js +2 -0
- package/dist/client/assets/draco_decoder-Z1_iN-Ht.wasm +0 -0
- package/dist/client/assets/draco_wasm_wrapper-9cRAE0qV.js +2 -0
- package/dist/client/assets/draco_wasm_wrapper-fZCQGLGb.js +116 -0
- package/dist/client/assets/draft-input-D7yqLT1A.js +2 -0
- package/dist/client/assets/duoViewer-DQzDc4Z4.js +2 -0
- package/dist/client/assets/{dynamic-XOmtS0-B.js → dynamic-Dz4eLTaa.js} +3 -3
- package/dist/client/assets/{embeddedScripts-BQl_ld6u.js → embeddedScripts-DZ2Ii9dE.js} +2 -2
- package/dist/client/assets/empty-BwsFVBxJ.js +2 -0
- package/dist/client/assets/entities-CNmVqAZs.js +2 -0
- package/dist/client/assets/{fileLinks-T2ko6Qmp.js → fileLinks-E3IIVHgM.js} +2 -2
- package/dist/client/assets/{fileTreeExpansion-BOutPxUH.js → fileTreeExpansion-gTas243c.js} +2 -2
- package/dist/client/assets/{getDiffFileInput-Do7OSxYn.js → getDiffFileInput-CUXcOkYa.js} +2 -2
- package/dist/client/assets/{htmlRender-DAhG7IlW.js → htmlRender-DSw3CY7L.js} +2 -2
- package/dist/client/assets/hubAccess-CsZ8CNmg.js +2 -0
- package/dist/client/assets/image-up-f7X837EZ.js +2 -0
- package/dist/client/assets/{index-4XHdM2Yx.js → index-Bxj8VaXa.js} +3 -3
- package/dist/client/assets/{input-BGKmQVHf.js → input-BwujRX3Y.js} +2 -2
- package/dist/client/assets/input-group-euoW8Z7h.js +2 -0
- package/dist/client/assets/{kbd-BIypvknl.js → kbd-GiLKf_On.js} +2 -2
- package/dist/client/assets/keybindings-CCmLKtII.js +2 -0
- package/dist/client/assets/{lazy-DudfZwDr.js → lazy-JsFnphfP.js} +4 -4
- package/dist/client/assets/{lazyRouteComponent-VtherrNw.js → lazyRouteComponent-DZOLCSfI.js} +2 -2
- package/dist/client/assets/{link--eZ8ZXuK.js → link-ByE5ZkNW.js} +2 -2
- package/dist/client/assets/{linkedPrompt-DRNVlalr.js → linkedPrompt-Dv_ZP8G8.js} +2 -2
- package/dist/client/assets/main-D8lKEPYS.js +37 -0
- package/dist/client/assets/main-DIHqY9YX.css +2 -0
- package/dist/client/assets/{mediaReference-CMwg4kE3.js → mediaReference-DKsJ-9R8.js} +2 -2
- package/dist/client/assets/mediaSource-CF8tZyds.js +2 -0
- package/dist/client/assets/meshopt_decoder.module-BE7cuDBs.js +2 -0
- package/dist/client/assets/modelScene-DxcxMNRA.js +3 -0
- package/dist/client/assets/number-field-CWsDuEfo.js +2 -0
- package/dist/client/assets/{observeResize-CV41SgJr.js → observeResize-BxfFu2qN.js} +2 -2
- package/dist/client/assets/onboarding-DbYQeYSX.js +2 -0
- package/dist/client/assets/openFileInPreview-BiuuqQ-l.js +2 -0
- package/dist/client/assets/orbit-CTbdaXs-.js +2 -0
- package/dist/client/assets/p4ProjectFile-CZQao9GZ.js +2 -0
- package/dist/client/assets/{pair-Wl7C9P9c.js → pair-JgOCPd7m.js} +2 -2
- package/dist/client/assets/pause-5XtmSS7L.js +2 -0
- package/dist/client/assets/{pendingSendStore-CFKdq-QP.js → pendingSendStore-Bf499-Oy.js} +2 -2
- package/dist/client/assets/phoneViewer-Bqeu_y-d.js +2 -0
- package/dist/client/assets/{pierre-icons-2mAt8csu.js → pierre-icons-tmWDDsbZ.js} +3 -3
- package/dist/client/assets/popover-D2KZg7__.js +2 -0
- package/dist/client/assets/preview-eatXH_DC.js +2 -0
- package/dist/client/assets/preview-rGycedjV.js +2 -0
- package/dist/client/assets/previewMiniPlayerStore-7pQoYbpL.js +2 -0
- package/dist/client/assets/primary-C0adlG4a.js +2 -0
- package/dist/client/assets/primaryCloudLinkState-DStOgXZ7.js +2 -0
- package/dist/client/assets/projectFilesQueryState-CXzO_JXd.js +2 -0
- package/dist/client/assets/projectScriptEditor-B9Q_BBbL.js +2 -0
- package/dist/client/assets/providerSkills-BYU6vU9U.js +2 -0
- package/dist/client/assets/pullRequestDetail.logic-CAA5BrcO.js +10 -0
- package/dist/client/assets/{pullRequestIcons-ZE5MB0dW.js → pullRequestIcons-D0TNfVUp.js} +2 -2
- package/dist/client/assets/{pullRequestReviewStore-CF0UmQoG.js → pullRequestReviewStore-szmuenZj.js} +2 -2
- package/dist/client/assets/pullRequests-tu-Mn-gv.js +2 -0
- package/dist/client/assets/queries-BhrI_odm.js +2 -0
- package/dist/client/assets/query-DmYgeaGK.js +2 -0
- package/dist/client/assets/radio-group-YcYZQjQu.js +2 -0
- package/dist/client/assets/relay-DcCuBtiq.js +2 -0
- package/dist/client/assets/renderScheduler-BgdSr0UC.js +2 -0
- package/dist/client/assets/rightPanelStore-BpUwMEU6.js +2 -0
- package/dist/client/assets/runtime-DciS6GP9.js +7 -0
- package/dist/client/assets/{runtimeModeConfig-DTaQ5JjA.js → runtimeModeConfig-B8OcO6E5.js} +2 -2
- package/dist/client/assets/scheduledTasksSettings.logic-Cnm8G_wO.js +3 -0
- package/dist/client/assets/{scroll-area-BN4-XX3T.js → scroll-area-D7wKdOM7.js} +2 -2
- package/dist/client/assets/select--26O8gr7.js +2 -0
- package/dist/client/assets/selfImproveFindings-CQHbA_SP.js +2 -0
- package/dist/client/assets/semver-BoU8Be_3.js +2 -0
- package/dist/client/assets/server-DKB_3xTN.js +2 -0
- package/dist/client/assets/session-D_OiLzln.js +2 -0
- package/dist/client/assets/session-logic-lUPcTQRy.js +26 -0
- package/dist/client/assets/{settings-fuKhbSed.js → settings-BDigjNQr.js} +2 -2
- package/dist/client/assets/{settings.appearance-K-0McYk9.js → settings.appearance-pv_RhojI.js} +2 -2
- package/dist/client/assets/settings.archived-UHO0BqSp.js +2 -0
- package/dist/client/assets/settings.computer-use-C7FCVkB8.js +2 -0
- package/dist/client/assets/settings.connections-MCKul-Qb.js +2 -0
- package/dist/client/assets/settings.data-controls-DHSiH1XK.js +2 -0
- package/dist/client/assets/settings.decisions-DVAZFuiP.js +2 -0
- package/dist/client/assets/settings.designs-Cq_57Bul.js +2 -0
- package/dist/client/assets/settings.diagnostics-D3vvP_U2.js +2 -0
- package/dist/client/assets/{settings.general-BeLPMggF.js → settings.general-BVlKme_0.js} +2 -2
- package/dist/client/assets/settings.integrations-CfX639cu.js +2 -0
- package/dist/client/assets/settings.keybindings-C4ufqFiE.js +2 -0
- package/dist/client/assets/{settings.open-source-licenses-DWVgu9MJ.js → settings.open-source-licenses-C7SQX7_o.js} +2 -2
- package/dist/client/assets/settings.plugins-JB-_3lB3.js +5 -0
- package/dist/client/assets/settings.projects-HbUqS8EQ.js +4 -0
- package/dist/client/assets/settings.providers-DDaicTRG.js +3 -0
- package/dist/client/assets/{settings.scheduled-tasks-BJMUub-y.js → settings.scheduled-tasks-CsfZkMNc.js} +2 -2
- package/dist/client/assets/settings.secrets-DmkUTUBC.js +2 -0
- package/dist/client/assets/settings.snap-shot-CxBBb3GG.js +2 -0
- package/dist/client/assets/settings.source-control-Buh1svx1.js +2 -0
- package/dist/client/assets/settings.storage-BoCdHcfz.js +2 -0
- package/dist/client/assets/settingsLayout-EWRSNE9F.js +3 -0
- package/dist/client/assets/sidebar-B2McbSnM.js +2 -0
- package/dist/client/assets/{sidebarProjectGrouping-lpBYOlht.js → sidebarProjectGrouping-ManvShfB.js} +2 -2
- package/dist/client/assets/skeleton-CfxEpnM8.js +2 -0
- package/dist/client/assets/sourceControl-2E-torWB.js +2 -0
- package/dist/client/assets/sourceControlClients-DTwwk4H6.js +2 -0
- package/dist/client/assets/spinner-DiQtYQvU.js +2 -0
- package/dist/client/assets/src-aYUfWMsw.js +15 -0
- package/dist/client/assets/terminal-links-DalIS_T6.js +2 -0
- package/dist/client/assets/terminalSessions-BXRGhdwO.js +2 -0
- package/dist/client/assets/textarea-CgJxMEC6.js +2 -0
- package/dist/client/assets/themePalette-BAJL8JDR.js +5 -0
- package/dist/client/assets/threadCheckpoints-A01VyLzN.js +2 -0
- package/dist/client/assets/toggle-fVPE0kyD.js +2 -0
- package/dist/client/assets/toggle-group-BQBgK4Fh.js +2 -0
- package/dist/client/assets/tooltip-DDv-MvO4.js +2 -0
- package/dist/client/assets/{uiStateStore-yyuUmO2M.js → uiStateStore-Cyle2Grh.js} +2 -2
- package/dist/client/assets/usage-DfkVwFPy.js +2 -0
- package/dist/client/assets/usageAccess-DGGNF6kP.js +2 -0
- package/dist/client/assets/usageFormat-DvpnUmwI.js +2 -0
- package/dist/client/assets/{usageShortcuts-C4Dhwzkz.js → usageShortcuts-BefcatkO.js} +2 -2
- package/dist/client/assets/use-atom-command-Bfi4daMj.js +2 -0
- package/dist/client/assets/useAriaLabelledBy-DjrGw7Iw.js +2 -0
- package/dist/client/assets/useHandleNewThread-idXLHXR7.js +2 -0
- package/dist/client/assets/{useLocation-_8If3LN3.js → useLocation-fNQqSFar.js} +2 -2
- package/dist/client/assets/{useNavigate-5WivMyAa.js → useNavigate-DwXZ6yA7.js} +2 -2
- package/dist/client/assets/{useNavigateBack-DXfbYF86.js → useNavigateBack-mLGu4w8K.js} +2 -2
- package/dist/client/assets/{useP4ConnectAuthPrompt-D0Equ6mY.js → useP4ConnectAuthPrompt-BXgvqiOd.js} +2 -2
- package/dist/client/assets/{useParams-DV-Nw6Lj.js → useParams-qFbmBdAa.js} +2 -2
- package/dist/client/assets/{usePermissionStatus-CIobAIHF.js → usePermissionStatus-CTyZ03Js.js} +2 -2
- package/dist/client/assets/usePopupViewport-Dc46kF33.js +2 -0
- package/dist/client/assets/usePreviousValue-Dx4Nv0v8.js +2 -0
- package/dist/client/assets/usePullRequestActions-DJ1WiiLA.js +3 -0
- package/dist/client/assets/{useRegisterFieldControl-Dmsxd6H8.js → useRegisterFieldControl-BL6Ml_ar.js} +2 -2
- package/dist/client/assets/useRender-BP5vR6yH.js +2 -0
- package/dist/client/assets/{useScopedModelAvailability-Cc-bmdqn.js → useScopedModelAvailability-CLTKL2Jf.js} +2 -2
- package/dist/client/assets/useSettings-CnHpxSBo.js +3 -0
- package/dist/client/assets/utils-CtzgibkN.js +24 -0
- package/dist/client/assets/vcsRefInvalidation-BewBnMos.js +2 -0
- package/dist/client/assets/welcome-BkJ7M2_8.js +2 -0
- package/dist/client/index.html +1 -1
- package/dist/{renderer-D_KFqL06.mjs → renderer-7PhJbGDm.mjs} +85 -15
- package/dist/{runtime-Tslhhp69.mjs → runtime-Dbm6Vqjj.mjs} +582 -234
- package/package.json +1 -1
- package/dist/AcpMcpStdioBridge-BinVfs5k.mjs +0 -3
- package/dist/client/assets/AlertDialogRoot-z7O2CaB2.js +0 -2
- package/dist/client/assets/ChatGptUsageButton-DQjnXjt6.js +0 -2
- package/dist/client/assets/ChatMarkdown-C7ocX514.js +0 -48
- package/dist/client/assets/CheckboxIndicator-D2jNOqVc.js +0 -2
- package/dist/client/assets/ClippedText-CDOkzr7r.js +0 -2
- package/dist/client/assets/CodexSetupSection.logic-BIpypa3y.js +0 -2
- package/dist/client/assets/ComboboxClear-CPvB2whi.js +0 -2
- package/dist/client/assets/ComboboxGroupLabel-DN75A_2f.js +0 -2
- package/dist/client/assets/CompositeRoot-Jf3zEGLN.js +0 -2
- package/dist/client/assets/ConnectAgentSurface-Cv2oB5Cw.js +0 -2
- package/dist/client/assets/DevicePanel-CKWUjHEE.js +0 -2
- package/dist/client/assets/DeviceSetup-BrOsu1Y4.js +0 -2
- package/dist/client/assets/DialogTitle-COHuuWBE.js +0 -2
- package/dist/client/assets/DiffPanel-CGIIHSDI.js +0 -2
- package/dist/client/assets/EmbeddedDesign-BU5m6_ou.js +0 -21
- package/dist/client/assets/FieldControl-Yp1Yjlg7.js +0 -2
- package/dist/client/assets/FormContext-BEFZtJu9.js +0 -2
- package/dist/client/assets/Input-CVeLgfX4.js +0 -2
- package/dist/client/assets/JZOYTAAL-Bngs0npp.js +0 -1
- package/dist/client/assets/KeybindingsSettings.logic-A_266dBm.js +0 -2
- package/dist/client/assets/LinkMachineSelect-tm04n5mK.js +0 -2
- package/dist/client/assets/P4ConnectAccountPages-BkOCG7hq.js +0 -2
- package/dist/client/assets/PanelLayoutControls-amKHUz1V.js +0 -216
- package/dist/client/assets/PierreEntryIcon-CbhCWTjd.js +0 -2
- package/dist/client/assets/PopoverHandle-DbGxLy3d.js +0 -2
- package/dist/client/assets/PreviewPanel-B1KmgL5R.js +0 -2
- package/dist/client/assets/ProjectDefaultsSettings-D_2ixmme.js +0 -2
- package/dist/client/assets/ProjectFavicon-BXd2O1Gh.js +0 -3
- package/dist/client/assets/ProjectIconPickerDialog-Ccwf3eo1.js +0 -2
- package/dist/client/assets/ProviderModelPicker-DJl5IM1n.js +0 -2
- package/dist/client/assets/ProviderSettingsForm-sjzQFb8p.js +0 -2
- package/dist/client/assets/PullRequestCodeTab-BcFFbURH.js +0 -6
- package/dist/client/assets/RenderErrorBoundary-DianZAsM.js +0 -23
- package/dist/client/assets/RightPanelResizeHandle-DstJn39I.js +0 -2
- package/dist/client/assets/ScheduledTasksSettings-BHT9WAFD.js +0 -6
- package/dist/client/assets/ScrollAreaCorner-DW6lxPPn.js +0 -2
- package/dist/client/assets/SelectScrollUpArrow-DZfqWvZD.js +0 -2
- package/dist/client/assets/SelfImproveSettingsSection-BxPUr-AT.js +0 -2
- package/dist/client/assets/SettingsPanels-CrMsCqvq.js +0 -46
- package/dist/client/assets/SettingsPanels.logic-B406HX50.js +0 -2
- package/dist/client/assets/ThemeEditorPanel-BuMI6s2A.js +0 -5
- package/dist/client/assets/ThreadDetailsItemsMenu-CSCIFtTP.js +0 -204
- package/dist/client/assets/ThreadTerminalDrawer-FZ0zyNm1.js +0 -5
- package/dist/client/assets/TooltipViewport-DjveMpIl.js +0 -2
- package/dist/client/assets/_chat-P2jEGe91.js +0 -47
- package/dist/client/assets/_chat.design-k56_YrCY.js +0 -2
- package/dist/client/assets/_chat.index-CUR_1FMo.js +0 -2
- package/dist/client/assets/_chat.new-7EgBpaGD.js +0 -4
- package/dist/client/assets/_chat.pull-requests-C97pdH91.js +0 -2
- package/dist/client/assets/alert-D0u2-4Zh.js +0 -2
- package/dist/client/assets/assetUrls-ChygJppW.js +0 -2
- package/dist/client/assets/assets-Cv1qxio9.js +0 -2
- package/dist/client/assets/browserHistoryStore-PB9BBl0N.js +0 -2
- package/dist/client/assets/combobox-UDn50qHb.js +0 -2
- package/dist/client/assets/connect-agent-BitywHYq.js +0 -2
- package/dist/client/assets/design-NrL4Xyzh.js +0 -2
- package/dist/client/assets/device-DsIsK_g9.js +0 -2
- package/dist/client/assets/dialog-BEXthTAp.js +0 -2
- package/dist/client/assets/draft-input-Cp7zSsLs.js +0 -2
- package/dist/client/assets/duoViewer-BcsodgGy.js +0 -2
- package/dist/client/assets/empty-CTv2Unxd.js +0 -2
- package/dist/client/assets/entities-Ci9sZwRJ.js +0 -2
- package/dist/client/assets/guideRunStore-DGAK_XSV.js +0 -2
- package/dist/client/assets/image-up-BN-uYqtM.js +0 -2
- package/dist/client/assets/input-group-BdgWY0OZ.js +0 -2
- package/dist/client/assets/keybindings-C0ntbKmL.js +0 -2
- package/dist/client/assets/main-CKOKCTSr.css +0 -2
- package/dist/client/assets/main-CRJyb41E.js +0 -37
- package/dist/client/assets/mediaSource-BQpgJ9hG.js +0 -2
- package/dist/client/assets/number-field-pjPmm2hH.js +0 -2
- package/dist/client/assets/onboarding-C7BynXti.js +0 -2
- package/dist/client/assets/openFileInPreview-Cs7GoIEO.js +0 -2
- package/dist/client/assets/orbit-aOr6_vTe.js +0 -2
- package/dist/client/assets/p4ProjectFile-DqqWNGdD.js +0 -2
- package/dist/client/assets/pause-C-5l1Ug3.js +0 -2
- package/dist/client/assets/phoneViewer-C1sFfV5x.js +0 -2
- package/dist/client/assets/popover-oNrAhEOs.js +0 -2
- package/dist/client/assets/preview-CAzlFJXG.js +0 -2
- package/dist/client/assets/preview-D8H2Itzr.js +0 -2
- package/dist/client/assets/previewMiniPlayerStore-DwJUVJAq.js +0 -2
- package/dist/client/assets/primary-BdVzsWIK.js +0 -2
- package/dist/client/assets/primaryCloudLinkState-eu2avrjG.js +0 -2
- package/dist/client/assets/projectFilesQueryState-f8odJKc-.js +0 -2
- package/dist/client/assets/projectScriptEditor-D8Os7g21.js +0 -2
- package/dist/client/assets/providerSkills-B9Q5OmXk.js +0 -2
- package/dist/client/assets/pullRequestDetail.logic-CVJbFct1.js +0 -10
- package/dist/client/assets/pullRequests-p7FMtHTx.js +0 -2
- package/dist/client/assets/queries-C1_RUJ-8.js +0 -2
- package/dist/client/assets/query-DszcgUku.js +0 -2
- package/dist/client/assets/radio-group-Cb2KobOI.js +0 -2
- package/dist/client/assets/renderScheduler-BLYWx2Dl.js +0 -3833
- package/dist/client/assets/rightPanelStore-BzpX6F8n.js +0 -2
- package/dist/client/assets/runtime-CcgzOADx.js +0 -6
- package/dist/client/assets/runtime-D2NRh41I.js +0 -3
- package/dist/client/assets/scheduledTasksSettings.logic-FST8Bc6V.js +0 -3
- package/dist/client/assets/select-CHOl11x1.js +0 -2
- package/dist/client/assets/selfImproveFindings-BTdfhZ3z.js +0 -2
- package/dist/client/assets/semver-CFbvOQKc.js +0 -2
- package/dist/client/assets/server-C-cSQN_G.js +0 -2
- package/dist/client/assets/session-D6BRf77P.js +0 -2
- package/dist/client/assets/session-logic-BwAELIPU.js +0 -26
- package/dist/client/assets/settings.archived-CalSrYkZ.js +0 -2
- package/dist/client/assets/settings.computer-use-C8dDJqmo.js +0 -2
- package/dist/client/assets/settings.connections-D_XSkcFH.js +0 -2
- package/dist/client/assets/settings.data-controls-CTlXbRrO.js +0 -2
- package/dist/client/assets/settings.decisions-C1RgAwXn.js +0 -2
- package/dist/client/assets/settings.designs-BgEqEGXM.js +0 -2
- package/dist/client/assets/settings.diagnostics-BxqI_9bx.js +0 -2
- package/dist/client/assets/settings.integrations-4rKfTDFW.js +0 -2
- package/dist/client/assets/settings.keybindings-DSavoJxs.js +0 -2
- package/dist/client/assets/settings.plugins-DsfEfMST.js +0 -5
- package/dist/client/assets/settings.projects-CJzRAMVM.js +0 -4
- package/dist/client/assets/settings.providers-BoTCdGuy.js +0 -3
- package/dist/client/assets/settings.secrets-Ch_XS6ak.js +0 -2
- package/dist/client/assets/settings.snap-shot-6aF3J4Zd.js +0 -2
- package/dist/client/assets/settings.source-control-B7PW3yi5.js +0 -2
- package/dist/client/assets/settings.storage-PmxiGFaE.js +0 -2
- package/dist/client/assets/settingsLayout-fG812pJ2.js +0 -3
- package/dist/client/assets/sidebar-Dt9UYgk1.js +0 -2
- package/dist/client/assets/skeleton-BiqtjWsk.js +0 -2
- package/dist/client/assets/sourceControl-BUEFlHbW.js +0 -2
- package/dist/client/assets/sourceControlClients-Bcd4sqEi.js +0 -2
- package/dist/client/assets/spinner-C64jtA3m.js +0 -2
- package/dist/client/assets/terminal-links-DxE1mEi0.js +0 -2
- package/dist/client/assets/terminalSessions-Ceajv0BZ.js +0 -2
- package/dist/client/assets/textarea-DtceyvOF.js +0 -2
- package/dist/client/assets/themePalette-tZPF0oN0.js +0 -5
- package/dist/client/assets/threadCheckpoints-BXz5LJLz.js +0 -2
- package/dist/client/assets/toast-BYGaCmZu.js +0 -2
- package/dist/client/assets/toggle-Be7gb_vD.js +0 -2
- package/dist/client/assets/toggle-group-Cz65VaLC.js +0 -2
- package/dist/client/assets/tooltip-BYZIg_IY.js +0 -2
- package/dist/client/assets/usage-B6rUsIoY.js +0 -2
- package/dist/client/assets/usageAccess-0MZ9DMCW.js +0 -2
- package/dist/client/assets/usageFormat-4k8-70X2.js +0 -2
- package/dist/client/assets/use-atom-command-DEluSG6k.js +0 -2
- package/dist/client/assets/useAriaLabelledBy-Ca8fkLAD.js +0 -2
- package/dist/client/assets/useHandleNewThread-BOej8pJq.js +0 -2
- package/dist/client/assets/usePullRequestActions-Cf39XlVv.js +0 -3
- package/dist/client/assets/useSettings-jZr_DfW0.js +0 -3
- package/dist/client/assets/utils-OWUgXvpr.js +0 -37
- package/dist/client/assets/vcsRefInvalidation-CRToBQE1.js +0 -2
- package/dist/client/assets/welcome-BcjbPbMq.js +0 -2
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as e,t}from"./react-BUfh6y28.js";import{Ha as n,Ma as r}from"./utils-OWUgXvpr.js";var i=e(t());function a(e,t,a,s=!0,c){let[l,u]=i.useState(),d=r(c?`${c}-label`:void 0),f=e??t??l;return n(()=>{let n=e||t||!s?void 0:o(a.current,d);l!==n&&u(n)}),f}function o(e,t){let n=s(e);if(n)return!n.id&&t&&(n.id=t),n.id||void 0}function s(e){if(!e)return;let t=e.parentElement;if(t&&t.tagName===`LABEL`)return t;let n=e.id;if(n){let t=e.nextElementSibling;if(t&&t.htmlFor===n)return t}let r=e.labels;return r&&r[0]}export{a as t};
|
|
2
|
-
//# sourceMappingURL=useAriaLabelledBy-Ca8fkLAD.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as e,t}from"./react-BUfh6y28.js";import{n}from"./jsx-runtime-DJeoFXNw.js";import{C as r,D as i,Lh as a,Qo as o,c as s,g as c,hl as l,i as u,nc as d,ns as f,rc as p,s as m,tc as h}from"./utils-OWUgXvpr.js";import{L as g,R as _}from"./runtime-CcgzOADx.js";import{C as v,O as ee,d as y,f as te,l as ne,u as re}from"./entities-Ci9sZwRJ.js";import{_n as b,cn as x,et as S,q as C}from"./runtime-D2NRh41I.js";import{a as ie,t as ae}from"./useParams-DV-Nw6Lj.js";import{d as w}from"./toast-BYGaCmZu.js";import{s as T}from"./useSettings-jZr_DfW0.js";import{n as oe}from"./server-C-cSQN_G.js";import{p as E}from"./session-logic-BwAELIPU.js";import{a as D,i as O,n as k,o as A}from"./threadSort-Bd2rijEy.js";import{c as j,r as M}from"./projectFilesQueryState-f8odJKc-.js";import{d as N,f as P,i as F,r as se,s as ce,t as I}from"./p4ProjectFile-DqqWNGdD.js";import{r as L,t as R}from"./uiStateStore-yyuUmO2M.js";var z=e(t(),1),B=n(),V=`[data-thread-item], [data-thread-selection-safe]`,H=3,U=160;function W(e){let t=(0,B.c)(6),[n,r]=z.useState(null),[i,a]=z.useState(e),o,s;t[0]!==e||t[1]!==n?(o=()=>{if(e){a(!0);return}if(n===null)return;if(typeof IntersectionObserver>`u`){a(!0);return}let t=n.closest(`[data-slot="scroll-area-viewport"]`),r=new IntersectionObserver(e=>{let[t]=e;return a(t?.isIntersecting===!0)},{root:t,rootMargin:`${U}px 0px`});return r.observe(n),()=>r.disconnect()},s=[e,n],t[0]=e,t[1]=n,t[2]=o,t[3]=s):(o=t[2],s=t[3]),z.useEffect(o,s);let c=e||i,l;return t[4]===c?l=t[5]:(l={leaseLiveStatus:c,rowRef:r},t[4]=c,t[5]=l),l}function G(e,t){let n=z.useRef(null);return e!==null&&t!==null&&(n.current={key:e,value:t}),t===null?e!==null&&n.current?.key===e?n.current.value:null:t}function K(e,t,n,r){let i=e.indexOf(t),a=e.indexOf(n);return i===-1||a===-1?[]:e.slice(Math.min(i,a),Math.max(i,a)+1).filter(r)}async function q(e){let t=new Set,n=null;for(let r of e.entries){let i=await e.delete(r,t);if(i!==null){if(i._tag===`Failure`){if(_(i))break;n??=i}else t.add(r.threadKey)}}return{deletedThreadKeys:t,firstFailure:n}}async function J(e){let t=[],n=[];for(let r of e.entries){let i=!1,a=await e.archive(r,()=>{i=!0});if((i||a._tag===`Success`)&&t.push(r.threadKey),a._tag===`Success`)continue;let o=a;if(i)n.push(o);else return{archivedThreadKeys:t,mutationFailure:o,followupFailures:n}}return{archivedThreadKeys:t,mutationFailure:null,followupFailures:n}}function Y(e){return[{id:`mark-unread`,label:`Mark unread (${e.count})`},{id:`archive`,label:`Archive (${e.count})`,disabled:e.hasRunningThread},{id:`delete`,label:`Delete (${e.count})`,destructive:!0}]}function X(e,t,n){let r=S(e);return e.filter(e=>e.archivedAt===null&&!C({environmentId:e.environmentId,threadId:e.id},e.lineage,n)&&r(e)&&(t===null||t.has(`${e.environmentId}:${e.projectId}`)))}var le={"Pending Approval":5,"Awaiting Input":4,Working:3,Connecting:3,Waiting:2.5,"Plan Ready":2,Completed:1};function ue(e){let t=e.setTimeoutFn??globalThis.setTimeout,n=e.clearTimeoutFn??globalThis.clearTimeout,r=!1,i=null,a=()=>{i!==null&&(n(i),i=null)};return{sync:n=>{n?r||i!==null||(i=t(()=>{i=null,r=!0,e.onVisibilityChange(!0)},e.delayMs)):(a(),r&&(r=!1,e.onVisibilityChange(!1)))},dispose:()=>{a()}}}function de(){let e=(0,B.c)(5),[t,n]=z.useState(!1),r=z.useRef(null),i,a;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=()=>{let e=ue({delayMs:200,onVisibilityChange:e=>{n(e)},setTimeoutFn:window.setTimeout.bind(window),clearTimeoutFn:window.clearTimeout.bind(window)});return r.current=e,()=>{e.dispose(),r.current=null}},a=[],e[0]=i,e[1]=a):(i=e[0],a=e[1]),z.useEffect(i,a);let o;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(o=e=>{r.current?.sync(e)},e[2]=o):o=e[2];let s=o,c;return e[3]===t?c=e[4]:(c={showThreadJumpHints:t,updateThreadJumpHintsVisibility:s},e[3]=t,e[4]=c),c}function fe(e,t){return e===void 0?t:e??void 0}function pe(e){if(!e.latestRun?.completedAt)return!1;let t=Date.parse(e.latestRun.completedAt);if(Number.isNaN(t)||!e.lastVisitedAt)return!1;let n=Date.parse(e.lastVisitedAt);return Number.isNaN(n)?!0:t>n}function me(e){return e===null||!e.closest(V)}function he(e){return e>1}function ge(e,t){return e===null||!(`closest`in e)||typeof e.closest!=`function`?null:e.closest(t)}function _e(e){return typeof e!=`object`||!e?!1:ge(e,`a[href]`)!==null||ge(`parentElement`in e&&e.parentElement!==null&&typeof e.parentElement==`object`?e.parentElement:null,`a[href]`)!==null}function ve(e){let{getId:t,getPreferenceIds:n,items:r,preferredIds:i}=e;if(i.length===0)return[...r];let a=new Map;for(let[e,i]of r.entries()){let r=n?.(i)??[t(i)];for(let t of new Set(r)){let n=a.get(t);n?n.push(e):a.set(t,[e])}}let o=new Set,s=i.flatMap(e=>{let t=a.get(e)?.find(e=>!o.has(e));return t===void 0?[]:(o.add(t),[r[t]])}),c=r.filter((e,t)=>!o.has(t));return[...s,...c]}function ye(e,t=H){return e.slice(0,Math.max(0,t))}function be(e){let{currentThreadId:t,direction:n,threadIds:r}=e;if(r.length===0)return null;if(t===null)return n===`previous`?r.at(-1)??null:r[0]??null;let i=r.indexOf(t);return i===-1?null:n===`previous`?i>0?r[i-1]??null:null:i<r.length-1?r[i+1]??null:null}function xe(e){return e.button===2||e.isMac&&e.button===0&&e.ctrlKey}function Se(e){return e.hasPendingApprovals||e.pendingSubagentRequest===`approval`?`approval`:e.hasPendingUserInput||e.pendingSubagentRequest===`user_input`?`input`:e.runtime!==null&&[`preparing`,`queued`,`starting`,`running`,`waiting`].includes(e.runtime.status)?`working`:e.runtime?.status===`idle`?`waiting`:e.runtime?.status===`failed`?e.runtime.lastErrorClass===`usage_limit`?`limited`:`failed`:`ready`}function Ce(e,t){let n=D(e,t),r=n.filter(e=>e.pinnedAt!=null);return r.length===0?n:[...O(r),...n.filter(e=>e.pinnedAt==null)]}function we(e,t){let n=s(t);if(n.length===0)return!1;let r=s(b(e).join(` `));return n.split(` `).every(e=>r.includes(e))}function Te(e){let{thread:t}=e;return t.hasPendingApprovals||t.pendingSubagentRequest===`approval`?{label:`Pending Approval`,colorClass:`text-amber-600 dark:text-amber-300/90`,dotClass:`bg-amber-500 dark:bg-amber-300/90`,pulse:!1}:t.hasPendingUserInput||t.pendingSubagentRequest===`user_input`?{label:`Awaiting Input`,colorClass:`text-indigo-600 dark:text-indigo-300/90`,dotClass:`bg-indigo-500 dark:bg-indigo-300/90`,pulse:!1}:t.runtime?.status===`running`||t.runtime?.status===`waiting`?{label:`Working`,colorClass:`text-sky-600 dark:text-sky-300/80`,dotClass:`bg-sky-500 dark:bg-sky-300/80`,pulse:!0}:t.runtime?.status===`preparing`||t.runtime?.status===`starting`||t.runtime?.status===`queued`?{label:`Connecting`,colorClass:`text-sky-600 dark:text-sky-300/80`,dotClass:`bg-sky-500 dark:bg-sky-300/80`,pulse:!0}:x(t.pendingBackgroundTasks??[])?{label:`Waiting`,colorClass:`text-sidebar-muted-foreground`,dotClass:`bg-sidebar-muted-foreground`,pulse:!1}:!t.hasPendingUserInput&&t.interactionMode===`plan`&&E(t.latestRun,t.runtime)&&t.hasActionableProposedPlan?{label:`Plan Ready`,colorClass:`text-violet-600 dark:text-violet-300/90`,dotClass:`bg-violet-500 dark:bg-violet-300/90`,pulse:!1}:pe(t)?{label:`Completed`,colorClass:`text-emerald-600 dark:text-emerald-300/90`,dotClass:`bg-emerald-500 dark:bg-emerald-300/90`,pulse:!1}:null}function Ee(e){let t=null;for(let n of e)n!==null&&(t===null||le[n.label]>le[t.label])&&(t=n);return t}function De(e,t){return t.projectExpanded?t.isThreadListExpanded||e.length<=t.previewCount?e:e.slice(0,t.previewCount):[]}function Oe(e){let{deletedThreadId:t,deletedThreadIds:n,sortOrder:r,threads:i}=e,a=i.find(e=>e.id===t);return a?D(i.filter(e=>e.projectId===a.projectId&&e.id!==t&&!n?.has(e.id)),r)[0]?.id??null:null}function ke(e,t,n){return t.length>0?t.reduce((e,t)=>Math.max(e,k(t,n)),-1/0):n===`created_at`?A(e.createdAt)??-1/0:A(e.updatedAt??e.createdAt)??-1/0}function Z(e,t,n,r){return t===`manual`?[...e]:e.map(e=>({project:e,timestamp:ke(e,n(e),t)})).sort((e,t)=>(t.timestamp===e.timestamp?0:t.timestamp>e.timestamp?1:-1)||r(e.project,t.project)).map(({project:e})=>e)}function Ae(e,t,n){let r=new Map;for(let e of t){let t=r.get(e.projectId)??[];t.push(e),r.set(e.projectId,t)}return Z(e,n,e=>r.get(e.id)??[],(e,t)=>e.title.localeCompare(t.title)||e.id.localeCompare(t.id))}function je(e,t,n){let r=new Map(e.flatMap(e=>e.memberProjectRefs.map(t=>[`${t.environmentId}\0${t.projectId}`,e.projectKey]))),i=new Map;for(let e of t){if(e.archivedAt!==null)continue;let t=r.get(`${e.environmentId}\0${e.projectId}`);if(!t)continue;let n=i.get(t);n?n.push(e):i.set(t,[e])}return Z(e,n,e=>i.get(e.projectKey)??[],(e,t)=>e.title.localeCompare(t.title)||e.projectKey.localeCompare(t.projectKey))}function Me(e,t,n,r){return je(e,X(t,null,r),n)}function Ne(e,t,n){let r=(e,t)=>`${e}\u0000${t}`,i=new Map;for(let e of t){if(e.archivedAt!==null)continue;let t=r(e.environmentId,e.projectId),n=i.get(t)??[];n.push(e),i.set(t,n)}return Z(e,n,e=>i.get(r(e.environmentId,e.id))??[],(e,t)=>e.title.localeCompare(t.title)||e.environmentId.localeCompare(t.environmentId)||e.id.localeCompare(t.id))}function Q(e){return e.envMode!==`local`&&e.newWorktreesStartFromOrigin}function Pe(e){return e.projectDefaultSelection??(e.carrySourceDraftId===e.destinationDraftId?null:e.carrySelection)}function Fe(e){let t=e?.activeProvider;return e?.modelSelectionExplicit===!0&&t!=null&&e.modelSelectionByProvider[t]!==void 0}function Ie(e){return e.activeThread?h(e.activeThread.environmentId,e.activeThread.projectId):e.activeDraftThread?h(e.activeDraftThread.environmentId,e.activeDraftThread.projectId):e.defaultProjectRef}async function Le(e){let t=Ie(e);return t?(await e.handleNewThread(t),!0):!1}async function Re(e,t){let n=await g(o,M(e,t,l),{reportDefect:!1,reportFailure:!1}),r=j(e,t,l,j(e,t,n._tag===`Success`?n.value.relativePath:l,n._tag===`Success`?n.value:null));return r===null||r.truncated?null:I(r.contents)}function $(e){return{...e?.branch===void 0?{}:{branch:e.branch},...e?.worktreePath===void 0?{}:{worktreePath:e.worktreePath},...e?.envMode===void 0?{}:{envMode:e.envMode},...e?.startFromOrigin===void 0?{}:{startFromOrigin:e.startFromOrigin}}}function ze(){let e=(0,B.c)(7),t=f(oe),n=T(P),o=ie(),s;e[0]===o.state.matches?s=e[1]:(s=()=>{let e=o.state.matches[o.state.matches.length-1]?.params??{};return w(e)},e[0]=o.state.matches,e[1]=s);let l=s,h;return e[2]!==t||e[3]!==l||e[4]!==n||e[5]!==o?(h=(e,s)=>{let f=re(),h=t.get(e.environmentId)?.settings??a,{getComposerDraft:g,getDraftSessionByLogicalProjectKey:_,getDraftSession:v,getDraftThread:ee,applyStickyState:b,setDraftThreadContext:x,setLogicalProjectDraftThreadId:S,setModelSelection:C}=i.getState(),ie=o.state.location.href,ae=()=>o.state.location.href!==ie,w=l(),T=w?.kind===`server`?y(w.threadRef):null,oe=w?.kind===`draft`?v(w.draftId):null,E=w?g(w.kind===`server`?w.threadRef:w.draftId):null,D=E?.activeProvider??null,O=(D?E?.modelSelectionByProvider[D]??null:null)??T?.modelSelection??null,k=E?.interactionMode??T?.interactionMode??oe?.interactionMode??null,A=f.find(t=>t.id===e.projectId&&t.environmentId===e.environmentId),j=()=>ae()||A!==void 0&&ne(e)===null,M=F(h,A?.id??null,A),N=M.settings.defaultModelSelection,P=M.settings.defaultRuntimeMode,I=e=>Pe({projectDefaultSelection:N??null,carrySelection:O,carrySourceDraftId:w?.kind===`draft`?w.draftId:null,destinationDraftId:e}),L=async()=>{let n=A!==void 0&&M.settings.defaultThreadEnvMode===null?await Re(A.environmentId,A.workspaceRoot):null;return se({projectSettings:F(h,A?.id??null,A,n),workspaceRoot:A?.workspaceRoot??null,newProjectsRoot:t.get(e.environmentId)?.newProjectsRoot,projectHasThreads:te().some(t=>t.environmentId===e.environmentId&&t.projectId===e.projectId)})},R=A?ce(A,n):p(e),z=s?.branch!==void 0,B=s?.worktreePath!==void 0,V=s?.envMode!==void 0,H=s?.startFromOrigin!==void 0,U=_(R),W=U?d(U.environmentId,U.threadId):null,G=U!==null&&U.promotedTo==null&&W!==null&&y(W)===null?U:null;W&&G===null&&r(W);let K=G&&!c(g(G.draftId))?G:null,q=w?w.kind===`server`?ee(w.threadRef):v(w.draftId):null;if(K)return(async()=>{let t=w?.kind===`draft`&&w.draftId===K.draftId,n=z||B||V||H,r=null;if(n)r=$(s);else if(!t){let e=await L();if(j())return null;let t=l(),n=t?.kind===`draft`&&t.draftId===K.draftId,i=W!==null&&y(W)!==null,a=_(R)?.draftId!==K.draftId,o=c(g(K.draftId));if(n||i||a||o)return null;r={branch:null,worktreePath:null,envMode:e,startFromOrigin:Q({envMode:e,newWorktreesStartFromOrigin:M.settings.newWorktreesStartFromOrigin})}}if(r&&x(K.draftId,{...r,...t?{}:{runtimeMode:P},...k?{interactionMode:k}:{}}),!Fe(g(K.draftId))){b(K.draftId);let e=I(K.draftId);e&&C(K.draftId,e,{replaceOptions:!0})}S(R,e,K.draftId,{threadId:K.threadId,...r,...t?{}:{runtimeMode:P},...k?{interactionMode:k}:{}});let i={draftId:K.draftId,threadId:K.threadId},a=l();return a?.kind===`draft`&&a.draftId===K.draftId||await o.navigate({to:`/draft/$draftId`,params:{draftId:K.draftId},replace:s?.replace??!1}),i})();if(q&&w?.kind===`draft`&&q.logicalProjectKey===R&&q.promotedTo==null&&!c(g(w.draftId)))return(z||B||V||H)&&x(w.draftId,$(s)),S(R,e,w.draftId,{threadId:q.threadId,createdAt:q.createdAt,runtimeMode:q.runtimeMode,interactionMode:q.interactionMode,...$(s)}),Promise.resolve({draftId:w.draftId,threadId:q.threadId});let J=u(),Y=m(),X=new Date().toISOString();return(async()=>{let t=s?.envMode??await L();if(j())return null;let n=_(R);if(n&&n.draftId!==U?.draftId&&y(d(n.environmentId,n.threadId))===null)return S(R,e,n.draftId,{threadId:n.threadId,createdAt:n.createdAt,runtimeMode:n.runtimeMode,interactionMode:n.interactionMode,...$(s)}),await o.navigate({to:`/draft/$draftId`,params:{draftId:n.draftId},replace:s?.replace??!1}),{draftId:n.draftId,threadId:n.threadId};S(R,e,J,{threadId:Y,createdAt:X,branch:s?.branch??null,worktreePath:s?.worktreePath??null,envMode:t,startFromOrigin:s?.startFromOrigin??Q({envMode:t,newWorktreesStartFromOrigin:M.settings.newWorktreesStartFromOrigin}),runtimeMode:P,...k?{interactionMode:k}:{}}),b(J);let r=I(J);return r&&C(J,r,{replaceOptions:!0}),await o.navigate({to:`/draft/$draftId`,params:{draftId:J},replace:s?.replace??!1}),{draftId:J,threadId:Y}})()},e[2]=t,e[3]=l,e[4]=n,e[5]=o,e[6]=h):h=e[6],h}function Be(){let e=(0,B.c)(16),t=L(We),n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(n={strict:!1,select:Ue},e[0]=n):n=e[0];let r=ae(n),a=r?.kind===`server`?r.threadRef:null,o=r?.kind===`draft`?r.draftId:null,s=ee(a),c=i(He),l;e[1]!==c||e[2]!==r?(l=()=>r?r.kind===`server`?c(r.threadRef):i.getState().getDraftSession(r.draftId):null,e[1]=c,e[2]=r,e[3]=l):l=e[3];let u=i(l),d=v(),f;e[4]!==t||e[5]!==d?(f=ve({items:d,preferredIds:t,getId:N,getPreferenceIds:Ve}),e[4]=t,e[5]=d,e[6]=f):f=e[6];let p=f,m=ze(),g;e[7]===p[0]?g=e[8]:(g=p[0]?h(p[0].environmentId,p[0].id):null,e[7]=p[0],e[8]=g);let _;return e[9]!==u||e[10]!==s||e[11]!==m||e[12]!==o||e[13]!==a||e[14]!==g?(_={activeDraftThread:u,activeThread:s,defaultProjectRef:g,handleNewThread:m,routeDraftId:o,routeThreadRef:a},e[9]=u,e[10]=s,e[11]=m,e[12]=o,e[13]=a,e[14]=g,e[15]=_):_=e[15],_}function Ve(e){return[N(e),R(e.workspaceRoot)]}function He(e){return e.getDraftThread}function Ue(e){return w(e)}function We(e){return e.projectOrder}export{G as A,Te as C,Ne as D,Ae as E,de as M,Me as O,fe as S,je as T,be as _,Ie as a,K as b,Y as c,ye as d,xe as f,we as g,ve as h,Q as i,W as j,Ce as k,q as l,he as m,ze as n,Le as o,_e as p,Fe as r,J as s,Be as t,Oe as u,Ee as v,me as w,Se as x,De as y};
|
|
2
|
-
//# sourceMappingURL=useHandleNewThread-BOej8pJq.js.map
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{a as e,t}from"./react-BUfh6y28.js";import{n}from"./jsx-runtime-DJeoFXNw.js";import{D as r,Ms as i,Qo as a,Sv as o,Xc as s,_v as c,ks as l,ns as u,tT as d,tc as f,uv as p,wE as m,ws as h}from"./utils-OWUgXvpr.js";import{M as g,N as _,W as v}from"./runtime-CcgzOADx.js";import{a as y,i as b}from"./vcsRefInvalidation-CRToBQE1.js";import{C as ee}from"./entities-Ci9sZwRJ.js";import{t as te}from"./runtime-D2NRh41I.js";import{i as x}from"./toast-BYGaCmZu.js";import{O as S,d as C,s as w}from"./useSettings-jZr_DfW0.js";import{i as T,n as E}from"./session-D6BRf77P.js";import{n as D}from"./query-DszcgUku.js";import{t as O}from"./use-atom-command-DEluSG6k.js";import{d as k,l as A,u as j}from"./queries-C1_RUJ-8.js";import{t as M}from"./sourceControl-BUEFlHbW.js";import{C as N,r as P}from"./pullRequests-p7FMtHTx.js";import{R as F,b as ne,y as re}from"./pullRequestDetail.logic-CVJbFct1.js";import{n as ie}from"./useHandleNewThread-BOej8pJq.js";import{c as ae,f as I,i as L,s as R}from"./p4ProjectFile-DqqWNGdD.js";import{t as z}from"./sidebarProjectGrouping-lpBYOlht.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,c),n=W[e.kind],r=u(A.stateAtom(e.scope)),i=r.operation===n,s=(0,B.useCallback)(()=>{A.resetError(a,e.scope,n)},[e.scope,n]),f=(0,B.useCallback)(async(...t)=>{if(e.scope.environmentId===null||!E(e.scope.environmentId,`source-control:write`))return h(d(new o({requiredScope:c,message:`This connection cannot change source control.`})));let r=async()=>{let n=await e.action(...t);return l(n)&&e.onSuccess?.(),n};return e.managedExternally===!0?r():A.track(a,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:f}}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=u(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?h(d(new k({operation:`init`,environmentId:e.environmentId,cwd:e.cwd}))):r({environmentId:t.environmentId,input:{cwd:t.cwd}})},t[1]=r,t[2]=e,t[3]=i):i=t[3];let a=i,o;return t[4]!==a||t[5]!==e?(o={kind:`init`,label:`Initializing repository`,scope:e,action:a},t[4]=a,t[5]=e,t[6]=o):o=t[6],G(o)}function oe(e){let t=(0,V.c)(11),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n={reportFailure:!1},t[0]=n):n=t[0];let r=O(j.pull,n),i;t[1]!==e.cwd||t[2]!==e.environmentId?(i=e.environmentId!==null&&e.cwd!==null?j.status({environmentId:e.environmentId,input:{cwd:e.cwd}}):null,t[1]=e.cwd,t[2]=e.environmentId,t[3]=i):i=t[3];let a=D(i),o;t[4]!==r||t[5]!==e?(o=async()=>{let t=K(e);return t===null?h(d(new k({operation:`pull`,environmentId:e.environmentId,cwd:e.cwd}))):r({environmentId:t.environmentId,input:{cwd:t.cwd}})},t[4]=r,t[5]=e,t[6]=o):o=t[6];let s=o,c;return t[7]!==s||t[8]!==e||t[9]!==a.refresh?(c={kind:`pull`,label:`Pulling latest changes...`,scope:e,action:s,onSuccess:a.refresh},t[7]=s,t[8]=e,t[9]=a.refresh,t[10]=c):c=t[10],G(c)}function se(e){let t=(0,V.c)(13),n;t[0]===e?n=t[1]:(n=A.runStackedAction(e),t[0]=e,t[1]=n);let r;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(r={reportFailure:!1},t[2]=r):r=t[2];let i=O(n,r),a;t[3]!==e.cwd||t[4]!==e.environmentId?(a=e.environmentId!==null&&e.cwd!==null?j.status({environmentId:e.environmentId,input:{cwd:e.cwd}}):null,t[3]=e.cwd,t[4]=e.environmentId,t[5]=a):a=t[5];let o=D(a),s;t[6]!==i||t[7]!==e?(s=async t=>K(e)===null?h(d(new k({operation:`run_change_request`,environmentId:e.environmentId,cwd:e.cwd}))):i(t),t[6]=i,t[7]=e,t[8]=s):s=t[8];let c=s,l;return t[9]!==c||t[10]!==e||t[11]!==o.refresh?(l={kind:`runStackedAction`,label:`Running source control action`,scope:e,action:c,onSuccess:o.refresh,managedExternally:!0},t[9]=c,t[10]=e,t[11]=o.refresh,t[12]=l):l=t[12],G(l)}function ce(e){let t=(0,V.c)(11),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n={reportFailure:!1},t[0]=n):n=t[0];let r=O(M.publishRepository,n),i;t[1]!==e.cwd||t[2]!==e.environmentId?(i=e.environmentId!==null&&e.cwd!==null?j.status({environmentId:e.environmentId,input:{cwd:e.cwd}}):null,t[1]=e.cwd,t[2]=e.environmentId,t[3]=i):i=t[3];let a=D(i),o;t[4]!==r||t[5]!==e?(o=async t=>{let n=K(e);return n===null?h(d(new k({operation:`publish_repository`,environmentId:e.environmentId,cwd:e.cwd}))):r({environmentId:n.environmentId,input:{cwd:n.cwd,...t}})},t[4]=r,t[5]=e,t[6]=o):o=t[6];let s=o,c;return t[7]!==s||t[8]!==e||t[9]!==a.refresh?(c={kind:`publishRepository`,label:`Publishing repository`,scope:e,action:s,onSuccess:a.refresh},t[7]=s,t[8]=e,t[9]=a.refresh,t[10]=c):c=t[10],G(c)}function Y(e){let t=(0,V.c)(7),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n={reportFailure:!1},t[0]=n):n=t[0];let r=O(U.preparePullRequestThread,n),i;t[1]!==r||t[2]!==e?(i=async t=>{let n=K(e);return n===null?h(d(new k({operation:`prepare_pull_request_thread`,environmentId:e.environmentId,cwd:e.cwd}))):t.mode===`worktree`&&t.threadId!==void 0&&!E(n.environmentId,`orchestration:operate`)?h(d(new o({requiredScope:p,message:`This connection cannot change threads.`}))):r({environmentId:n.environmentId,input:{cwd:n.cwd,reference:t.reference,mode:t.mode,...t.threadId?{threadId:t.threadId}:{}}})},t[1]=r,t[2]=e,t[3]=i):i=t[3];let a=i,s;return t[4]!==a||t[5]!==e?(s={kind:`preparePullRequestThread`,label:`Preparing pull request thread`,scope:e,action:a},t[4]=a,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:m(i(a.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
|
-
`)}:{}})},[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,u]=(0,B.useState)(null),d;t[3]===a?d=t[4]:(d=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]=d);let p=d,m;t[5]!==i||t[6]!==n||t[7]!==l||t[8]!==p?(m=async(e,t)=>{if(!i||l!==null)return;u(e);let r=f(n,i.projectId),a=await p(r,t);u(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;u(e);let s=x.add({type:`loading`,title:`Preparing the pull request checkout...`}),d=f(n,i.projectId),m=await a(d).then(ye,ve);if(m===null){u(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`){u(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(d,{branch:h.value.branch,worktreePath:h.value.worktreePath,envMode:h.value.worktreePath===null?`local`:`worktree`}).then(_e,ge)){u(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}u(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(d,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-Cf39XlVv.js.map
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{a as e,t}from"./react-BUfh6y28.js";import{n}from"./jsx-runtime-DJeoFXNw.js";import{Ah as r,BT as i,Bb as a,Bc as o,CE as s,E_ as c,Eb as l,Eh as u,Fl as d,Fs as f,Gb as p,HS as ee,Ih as te,Js as ne,Lh as re,Ml as ie,Ms as ae,Nb as oe,Nl as se,Ns as ce,OE as le,O_ as ue,Ph as de,Qb as fe,Qo as pe,RT as m,Rb as me,Sb as he,Sx as ge,Tv as _e,UT as h,Uh as ve,WS as ye,Wb as be,X_ as xe,Y_ as Se,Z_ as Ce,_S as we,_s as g,as as Te,cs as _,cx as Ee,e_ as De,eg as Oe,gv as ke,gx as Ae,ig as je,jb as Me,kh as Ne,ks as Pe,lb as Fe,lx as Ie,mb as Le,ns as v,og as Re,py as ze,qh as Be,rs as Ve,sg as He,vx as Ue,wE as y,xx as We,yx as Ge}from"./utils-OWUgXvpr.js";import{At as Ke,E as qe,I as Je,R as Ye,Sn as Xe,T as Ze,W as Qe,_t as b}from"./runtime-CcgzOADx.js";import{Mt as $e,Ot as et,T as tt,t as nt}from"./runtime-D2NRh41I.js";import{i as x}from"./toast-BYGaCmZu.js";import{f as S,h as C,m as rt,u as it}from"./server-C-cSQN_G.js";import{i as at,n as ot,s as st,t as ct}from"./session-D6BRf77P.js";import{t as lt}from"./use-atom-command-DEluSG6k.js";import{D as ut,M as dt,N as ft,P as pt,S as mt,c as ht,i as w,n as gt,o as _t,r as vt,x as yt,y as bt}from"./themePalette-tZPF0oN0.js";var T=e(t(),1),E=n();function xt(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 St(e){let t=Te(t=>_(n=>{let r=n(e.catalogValueAtom).entries.get(t);if(r===void 0)return null;let i=s(ae(n(e.stateAtom(t))),()=>Xe);return{entry:r,connection:r.unsupportedReason===void 0?i===Xe&&r.enabled?{phase:`connecting`,error:null,traceId:null}:$e(i):{phase:`unsupported`,error:r.unsupportedReason,traceId:null},serverConfig:n(e.serverConfigValueAtom(t))}}).pipe(g(`environment-presentation:${t}`))),n=new Map;return{presentationAtom:t,presentationsAtom:_(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 xt(n,i)||(n=i),n}).pipe(g(`environment-presentations`))}}function Ct(e,t){return{environmentId:e,environmentLabel:t.entry.target.label,displayUrl:et(t.entry)??``,isRelayManaged:Ke(t.entry),isEnabled:t.entry.enabled,connectionState:t.connection.phase,connectionError:t.connection.error,connectionErrorTraceId:t.connection.traceId}}function wt(e){let t=_(t=>{let n=[...t(e.catalogValueAtom).entries.keys()],r=y(t.self());return r!==null&&r.length===n.length&&n.every((e,t)=>e===r[t])?r:n}),n=_(t=>{let n=[...t(e.catalogValueAtom).entries].map(([e,t])=>({environmentId:e,label:t.target.label})),r=y(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=Te(t=>_(n=>{let r=n(e.presentationAtom(t));if(r===null)return null;let i=Ct(t,r),a=y(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=_(t=>{let n=[];for(let i of t(e.catalogValueAtom).entries.keys()){let e=t(r(i));e!==null&&n.push(e)}let i=y(t.self());return i!==null&&i.length===n.length&&n.every((e,t)=>e===i[t])?i:n}).pipe(g(`environment-connection-summaries`));return{environmentIdsAtom:t,connectedEnvironmentIdsAtom:_(e=>{let n=e(t).filter(t=>e(r(t))?.connectionState===`connected`),i=y(e.self());return i!==null&&i.length===n.length&&n.every((e,t)=>e===i[t])?i:n}),identitiesAtom:n,environmentsAtom:i,machineByIdAtom:_(n=>{let r=new Map(n(t).map(t=>[t,d(n(e.presentationAtom(t))?.serverConfig??null)])),i=y(n.self());return i!==null&&xt(i,r)?i:r}),pullRequestsSupportedAtom:_(n=>n(t).some(t=>n(e.presentationAtom(t))?.serverConfig?.environment.capabilities.pullRequests===!0))}}var Tt=St({catalogValueAtom:C.catalogValueAtom,stateAtom:C.stateAtom,serverConfigValueAtom:S.configValueAtom}),D=wt({catalogValueAtom:C.catalogValueAtom,presentationAtom:Tt.presentationAtom}),Et=_(null).pipe(g(`web-environment-presentation:empty`));function Dt(e){let t=(0,E.c)(5),n=v(C.catalogValueAtom),r;t[0]===e?r=t[1]:(r=e===null?Et:Tt.presentationAtom(e),t[0]=e,t[1]=r);let i=v(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 Ot={status:`idle`},O=Ot,k=null,A=[],j=0,kt=new Set;function M(e){O=e;for(let e of kt)e()}function At(e){k?.resolve(e);for(let t of A)t.resolve(e);k=null,A=[]}function jt(){return O}function Mt(e){return kt.add(e),()=>{kt.delete(e)}}function Nt(){j+=1;let e=!0;return()=>{e&&(e=!1,j=Math.max(0,j-1),j===0&&(At(!1),M(Ot)))}}function Pt(e,t){if(j!==0)return new Promise(n=>{let r={message:e,variant:t?.variant??`default`,resolve:n};k||O.status===`closing`?A.push(r):(k=r,M({status:`confirming`,message:e,variant:r.variant}))})}function Ft(){return O.status!==`idle`||k!==null||A.length>0}function It(e){if(O.status!==`confirming`||!k)return;let t=k;k=null,t.resolve(e),M({status:`closing`,message:O.message,variant:O.variant})}function Lt(){if(O.status!==`closing`)return;let e=A.shift();e?(k=e,M({status:`confirming`,message:e.message,variant:e.variant})):M(Ot)}var Rt={Ctrl:`⌃`,Alt:`⌥`,Shift:`⇧`,Super:`⌘`,CmdOrCtrl:`⌘`};function zt(e,t=navigator.platform){let n=e.split(`+`),r=n.pop()??``;return o(t)?`${n.map(e=>Rt[e]??e).join(``)}${r}`:[...n.map(e=>e===`CmdOrCtrl`?`Ctrl`:e===`Super`?`Meta`:e),r].join(`+`)}var Bt=`http://www.w3.org/2000/svg`,Vt={archive:[{tag:`rect`,attrs:{width:`20`,height:`5`,x:`2`,y:`3`,rx:`1`}},{tag:`path`,attrs:{d:`M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8`}},{tag:`path`,attrs:{d:`M10 12h4`}}],check:[{tag:`path`,attrs:{d:`M20 6 9 17l-5-5`}}],timer:[{tag:`line`,attrs:{x1:`10`,x2:`14`,y1:`2`,y2:`2`}},{tag:`line`,attrs:{x1:`12`,x2:`15`,y1:`14`,y2:`11`}},{tag:`circle`,attrs:{cx:`12`,cy:`14`,r:`8`}}],"chevron-right":[{tag:`path`,attrs:{d:`m9 19 7-7-7-7`}}],"circle-check":[{tag:`circle`,attrs:{cx:`12`,cy:`12`,r:`10`}},{tag:`path`,attrs:{d:`m9 12 2 2 4-4`}}],clock:[{tag:`path`,attrs:{d:`M12 6v6l4 2`}},{tag:`circle`,attrs:{cx:`12`,cy:`12`,r:`10`}}],pencil:[{tag:`path`,attrs:{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`}},{tag:`path`,attrs:{d:`m15 5 4 4`}}],copy:[{tag:`rect`,attrs:{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`}},{tag:`path`,attrs:{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`}}],folder:[{tag:`path`,attrs:{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`}}],"git-branch":[{tag:`line`,attrs:{x1:`6`,x2:`6`,y1:`3`,y2:`15`}},{tag:`circle`,attrs:{cx:`18`,cy:`6`,r:`3`}},{tag:`circle`,attrs:{cx:`6`,cy:`18`,r:`3`}},{tag:`path`,attrs:{d:`M18 9a9 9 0 0 1-9 9`}}],eye:[{tag:`path`,attrs:{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`}},{tag:`circle`,attrs:{cx:`12`,cy:`12`,r:`3`}}],"eye-off":[{tag:`path`,attrs:{d:`M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49`}},{tag:`path`,attrs:{d:`M14.084 14.158a3 3 0 0 1-4.242-4.242`}},{tag:`path`,attrs:{d:`M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143`}},{tag:`path`,attrs:{d:`m2 2 20 20`}}],"app-window":[{tag:`rect`,attrs:{x:`2`,y:`4`,width:`20`,height:`16`,rx:`2`}},{tag:`path`,attrs:{d:`M10 4v4`}},{tag:`path`,attrs:{d:`M2 8h20`}},{tag:`path`,attrs:{d:`M6 4v4`}}],"arrow-up-right":[{tag:`path`,attrs:{d:`M7 7h10v10`}},{tag:`path`,attrs:{d:`M7 17 17 7`}}],"external-link":[{tag:`path`,attrs:{d:`M15 3h6v6`}},{tag:`path`,attrs:{d:`M10 14 21 3`}},{tag:`path`,attrs:{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`}}],link:[{tag:`path`,attrs:{d:`M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71`}},{tag:`path`,attrs:{d:`M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71`}}],list:[{tag:`path`,attrs:{d:`M3 5h.01`}},{tag:`path`,attrs:{d:`M3 12h.01`}},{tag:`path`,attrs:{d:`M3 19h.01`}},{tag:`path`,attrs:{d:`M8 5h13`}},{tag:`path`,attrs:{d:`M8 12h13`}},{tag:`path`,attrs:{d:`M8 19h13`}}],share:[{tag:`path`,attrs:{d:`M12 2v13`}},{tag:`path`,attrs:{d:`m16 6-4-4-4 4`}},{tag:`path`,attrs:{d:`M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8`}}],x:[{tag:`path`,attrs:{d:`M18 6 6 18`}},{tag:`path`,attrs:{d:`m6 6 12 12`}}],hash:[{tag:`line`,attrs:{x1:`4`,x2:`20`,y1:`9`,y2:`9`}},{tag:`line`,attrs:{x1:`4`,x2:`20`,y1:`15`,y2:`15`}},{tag:`line`,attrs:{x1:`10`,x2:`8`,y1:`3`,y2:`21`}},{tag:`line`,attrs:{x1:`16`,x2:`14`,y1:`3`,y2:`21`}}],"mail-open":[{tag:`path`,attrs:{d:`M21.2 8.4c.5.38.8.97.8 1.6v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V10a2 2 0 0 1 .8-1.6l8-6a2 2 0 0 1 2.4 0l8 6Z`}},{tag:`path`,attrs:{d:`m22 10-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 10`}}],"message-square":[{tag:`path`,attrs:{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`}}],"message-square-plus":[{tag:`path`,attrs:{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`}},{tag:`path`,attrs:{d:`M12 8v6`}},{tag:`path`,attrs:{d:`M9 11h6`}}],pin:[{tag:`path`,attrs:{d:`M12 17v5`}},{tag:`path`,attrs:{d:`M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z`}}],"pin-off":[{tag:`path`,attrs:{d:`M12 17v5`}},{tag:`path`,attrs:{d:`M15 9.34V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H7.89`}},{tag:`path`,attrs:{d:`m2 2 20 20`}},{tag:`path`,attrs:{d:`M9 9v1.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h11`}}],"refresh-cw":[{tag:`path`,attrs:{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`}},{tag:`path`,attrs:{d:`M21 3v5h-5`}},{tag:`path`,attrs:{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`}},{tag:`path`,attrs:{d:`M8 16H3v5`}}],settings:[{tag:`path`,attrs:{d:`M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.38a2 2 0 0 0-.73-2.73l-.15-.09a2 2 0 0 1-1-1.74v-.51a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z`}},{tag:`circle`,attrs:{cx:`12`,cy:`12`,r:`3`}}],"folder-plus":[{tag:`path`,attrs:{d:`M12 10v6`}},{tag:`path`,attrs:{d:`M9 13h6`}},{tag:`path`,attrs:{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`}}],"folder-tree":[{tag:`path`,attrs:{d:`M20 10a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1h-2.5a1 1 0 0 1-.8-.4l-.9-1.2A1 1 0 0 0 15 3h-2a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z`}},{tag:`path`,attrs:{d:`M20 21a1 1 0 0 0 1-1v-3a1 1 0 0 0-1-1h-2.9a1 1 0 0 1-.88-.55l-.42-.85a1 1 0 0 0-.92-.6H13a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z`}},{tag:`path`,attrs:{d:`M3 5a2 2 0 0 0 2 2h3`}},{tag:`path`,attrs:{d:`M3 3v13a2 2 0 0 0 2 2h3`}}],"text-search":[{tag:`path`,attrs:{d:`M21 5H3`}},{tag:`path`,attrs:{d:`M10 12H3`}},{tag:`path`,attrs:{d:`M10 19H3`}},{tag:`circle`,attrs:{cx:`17`,cy:`15`,r:`3`}},{tag:`path`,attrs:{d:`m21 19-1.9-1.9`}}],trash:[{tag:`path`,attrs:{d:`M3 6h18`}},{tag:`path`,attrs:{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`}},{tag:`path`,attrs:{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`}},{tag:`line`,attrs:{x1:`10`,x2:`10`,y1:`11`,y2:`17`}},{tag:`line`,attrs:{x1:`14`,x2:`14`,y1:`11`,y2:`17`}}]};function Ht(e,t){let n=Vt[e];if(!n||typeof document.createElementNS!=`function`)return null;let r=document.createElementNS(Bt,`svg`);r.setAttribute(`xmlns`,Bt),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(Bt,e.tag);for(let[n,r]of Object.entries(e.attrs))t.setAttribute(n,r);r.appendChild(t)}return r}function Ut(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 Wt(e,t){if(typeof Node<`u`&&e instanceof Node)return t.some(t=>t.contains(e));if(!e||typeof e!=`object`)return!1;let n=e;for(;n&&typeof n==`object`;){if(t.includes(n))return!0;n=n.parent}return!1}var N=null;function Gt(){return N!==null}function Kt(){N?.(),N=null}function qt(e,t){return new Promise(n=>{let r=document.activeElement instanceof HTMLElement?document.activeElement:null,i=[],a=[],s=!1,c=!1,l=()=>u(null),u=e=>{if(s)return;s=!0,N===l&&(N=null),document.removeEventListener(`keydown`,d),document.removeEventListener(`pointerdown`,f,!0),document.removeEventListener(`contextmenu`,p,!0);let t=Wt(document.activeElement,i);for(let e of i)e.remove();t&&r?.isConnected&&r.focus({preventScroll:!0}),n(e)},d=e=>{e.key===`Escape`&&(e.preventDefault(),u(null))},f=e=>{c&&!Wt(e.target,i)&&u(null)},p=e=>{c&&!Wt(e.target,i)&&(e.preventDefault(),u(null))},ee=e=>{for(;i.length>e;)a.pop()?.setAttribute(`aria-expanded`,`false`),i.pop()?.remove()},te=(e,t,n,r,s)=>{ee(r);let l=document.createElement(`div`);l.className=`dropdown-glass fixed z-[10000] min-w-56 max-w-sm overflow-hidden rounded-lg bg-clip-padding text-popover-foreground outline-none`,l.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;`,l.style.left=`${t}px`,l.style.top=`${n}px`,l.dataset.level=String(r);let d=document.createElement(`div`);d.className=`max-h-[calc(100vh-0.5rem)] min-w-0 max-w-sm overflow-y-auto overflow-x-hidden p-1`,d.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&&d.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`),d.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,d.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 s=t.disabled===!0;a.disabled=s;let l=`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=s?`${l} pointer-events-none cursor-not-allowed text-muted-foreground opacity-64`:n?`${l} text-destructive-foreground hover:bg-destructive/10 hover:text-destructive-foreground`:`${l} 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)`),s&&(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?Ht(`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=Ht(t.icon,n?`destructive`:`neutral`);e&&a.appendChild(e)}let f=document.createElement(`span`);if(f.className=`min-w-0 flex-1 truncate`,f.textContent=t.label,a.appendChild(f),typeof t.accelerator==`string`){let e=document.createElement(`span`);e.className=`ms-6 shrink-0 text-muted-foreground text-xs tracking-widest`,e.style.cssText=`margin-inline-start:1.5rem;flex-shrink:0;color:var(--contrast-muted-foreground);font-size:0.75rem;letter-spacing:0.1em;`,e.textContent=zt(t.accelerator),e.setAttribute(`aria-hidden`,`true`),a.setAttribute(`aria-keyshortcuts`,t.accelerator.replace(`CmdOrCtrl`,o(navigator.platform)?`Meta`:`Control`)),a.appendChild(e)}if(e){a.setAttribute(`aria-haspopup`,`menu`),a.setAttribute(`aria-expanded`,`false`);let e=Ht(`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(!s){let o=!1,s=!1,l=()=>{let e=o||s;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,l()}),a.addEventListener(`mouseleave`,()=>{o=!1,l()}),a.addEventListener(`focus`,()=>{s=!0,l()}),a.addEventListener(`blur`,()=>{s=!1,l()}),e){let e=(e=!1)=>{let n=a.getBoundingClientRect(),o=n.right+4,s=n.top;te(t.children,o,s,r+1,a),a.setAttribute(`aria-expanded`,`true`);let c=i[r+1];if(!c)return;let l=c.getBoundingClientRect();l.right>window.innerWidth&&Ut(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`,()=>{ee(r+1)}),a.addEventListener(`click`,()=>{c&&u(t.id)})}d.appendChild(a)}l.appendChild(d),l.addEventListener(`mouseenter`,()=>{ee(r+1)}),document.body.appendChild(l),i[r]=l,a[r]=s,requestAnimationFrame(()=>{Ut(l,t,n)})};document.addEventListener(`keydown`,d),document.addEventListener(`pointerdown`,f,!0),document.addEventListener(`contextmenu`,p,!0),te(e,t?.x??0,t?.y??0,0),N&&N(),N=l,requestAnimationFrame(()=>{c=!0})})}var Jt=`p4code:client-settings:v1`;function Yt(){return typeof window<`u`}function Xt(){return Yt()?ce(Jt,u):null}function Zt(e){Yt()&&f(Jt,e,u)}var Qt;function $t(){return{dialogs:{pickFolder:async e=>window.desktopBridge?window.desktopBridge.pickFolder(e):null,confirm:async(e,t)=>Pt(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):qt(e,t),close:async()=>{window.desktopBridge||Kt()}},persistence:{getClientSettings:async()=>window.desktopBridge?window.desktopBridge.getClientSettings():Xt(),setClientSettings:async e=>{if(window.desktopBridge)return window.desktopBridge.setClientSettings(e);Zt(e)}}}}function en(){return $t()}function tn(){if(typeof window<`u`)return Qt||(Qt=en(),Qt)}function nn(){let e=tn();if(!e)throw Error(`Local API not found`);return e}var P=`p4code:theme`,rn=`(prefers-color-scheme: dark)`,F={theme:`system`,resolvedTheme:`light`,systemDark:!1,followSystem:!0,appearanceMode:`system`,themeHalves:null};function an(){return I()}function on(){return typeof window>`u`?{}:sn()}function I(){if(typeof window>`u`)return null;try{return ut(window.localStorage.getItem(w))}catch{return null}}function sn(){try{let e=JSON.parse(window.localStorage.getItem(`p4code:theme-halves:v1`)??`null`);if(typeof e!=`object`||!e)return{};let t={};for(let n of[`light`,`dark`]){let r=e[n];typeof r==`string`&&(t[n]=r)}return t}catch{return{}}}function L(e){return`${e?.light??``}|${e?.dark??``}`}var cn=`theme-color`,ln=`meta[name="${cn}"][data-dynamic-theme-color="true"]`,R=class extends l()(`ThemeStorageError`,{operation:Le([`read`,`write`]),storageKey:he,theme:fe(_t),cause:Fe()}){get message(){return`Failed to ${this.operation} theme preference for ${this.storageKey}.`}},un=p(R),dn=class extends l()(`DesktopThemeSyncError`,{theme:_t,cause:Fe()}){get message(){return`Failed to sync the ${this.theme} theme to the desktop shell.`}},fn=p(dn),z=[],B=null,pn=!0,V=null,H=null,U=null;function W(){pn=!0;for(let e of z)e()}function mn(){return typeof window<`u`&&typeof window.matchMedia==`function`&&window.matchMedia(rn).matches}function hn(e){if(typeof window>`u`)return e===`system`;try{let e=window.localStorage.getItem(vt);if(e===`true`)return!0;if(e===`false`)return!1}catch{}return e===`system`}function gn(e){return e===`light`||e===`dark`||e===`system`}function G(e){if(typeof window<`u`)try{let e=window.localStorage.getItem(gt);if(gn(e))return e}catch{}return hn(e)?`system`:bt(e)??`light`}function _n(e){if(typeof window<`u`)try{window.localStorage.setItem(gt,e)}catch(e){throw new R({operation:`write`,storageKey:gt,cause:e})}}function vn(){if(typeof window>`u`)return F.theme;let e;try{e=window.localStorage.getItem(P)}catch(e){throw new R({operation:`read`,storageKey:P,cause:e})}return e!==null&&mt(e)?e:F.theme}function yn(e){if(typeof window<`u`)try{window.localStorage.setItem(P,e),U=null}catch(t){throw new R({operation:`write`,storageKey:P,theme:e,cause:t})}}function K(){if(U!==null)return F.theme;try{return vn()}catch(e){let t=un(e)?e:new R({operation:`read`,storageKey:P,cause:e});return U=t,console.error(t.message,{operation:t.operation,storageKey:t.storageKey,...b(t)}),F.theme}}function bn(){let e=document.querySelector(ln);return e||(e=document.createElement(`meta`),e.name=cn,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="${cn}"]`);if(a.length===0)bn().setAttribute(`content`,i);else for(let e of a)e.setAttribute(`content`,i)}function q(e,{suppressTransitions:t=!1,preservePreview:n=!0}={}){if(typeof document>`u`||typeof window>`u`||n&&document.documentElement.dataset?.themeId===`__preview`)return;let r=G(e),i=r===`system`,a=i?mn():!1,o=I();if(H?.theme===e&&H.systemDark===a&&H.followSystem===i&&H.appearanceMode===r&&L(H.themeHalves)===L(o)){Tn(e,i,r);return}t&&document.documentElement.classList.add(`no-transitions`);let s=ft(e,a,i,r,o);ht(pt(e,o,s),s),document.documentElement.classList.toggle(`dark`,s===`dark`),H={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=I()){try{await e.setTheme(dt(t,n,r,i))}catch(e){throw new dn({theme:t,cause:e})}}function Tn(e,t,n){if(typeof window>`u`)return;let r=window.desktopBridge,i=I(),a=dt(e,t,n,i);r&&typeof r.setTheme==`function`&&V!==a&&(V=a,wn(r,e,t,n,i).catch(t=>{let n=fn(t)?t:new dn({theme:e,cause:t});console.error(n.message,{theme:n.theme,...b(n)}),V===a&&(V=null)}))}typeof document<`u`&&typeof window<`u`&&q(K());function En(){if(typeof window>`u`)return F;if(!pn&&B)return B;pn=!1;let e=K(),t=G(e),n=t===`system`,r=n?mn():!1,i=I(),a=ft(e,r,n,t,i);return B&&B.theme===e&&B.resolvedTheme===a&&B.systemDark===r&&B.followSystem===n&&B.appearanceMode===t&&L(B.themeHalves)===L(i)||(B={theme:e,resolvedTheme:a,systemDark:r,followSystem:n,appearanceMode:t,themeHalves:i}),B}function Dn(){return F}function On(){let e=K();G(e)===`system`&&q(e,{suppressTransitions:!0}),W()}function kn(e){e.key===P?(U=null,q(K(),{suppressTransitions:!0}),W()):e.key===`p4code:theme-follow-system`||e.key===`p4code:theme-appearance-mode`||e.key===`p4code:theme-halves:v1`?(q(K(),{suppressTransitions:!0}),W()):(e.key===`p4code:themes:v1`||e.key===null)&&(e.key===null&&(U=null),yt(),H=null,q(K(),{suppressTransitions:!0}),W())}var An=null;function jn(e){if(typeof window>`u`)return()=>{};if(z.push(e),!An){let e=typeof window.matchMedia==`function`?window.matchMedia(rn):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,T.useSyncExternalStore)(jn,En,Dn),{theme:t,resolvedTheme:n}=e,r=(0,T.useCallback)(e=>{if(typeof window>`u`)return!1;try{_n(G(K()));let t=window.localStorage.getItem(w);window.localStorage.removeItem(w);try{yn(e)}catch(e){if(t!==null)try{window.localStorage.setItem(w,t)}catch{}throw e}}catch(t){let n=un(t)?t:new R({operation:`write`,storageKey:P,theme:e,cause:t});return console.error(n.message,{operation:n.operation,storageKey:n.storageKey,theme:e,...b(n)}),!1}return q(e,{suppressTransitions:!0}),W(),!0},[]),i=(0,T.useCallback)(e=>{if(typeof window>`u`)return!1;try{_n(e)}catch(e){let t=un(e)?e:new R({operation:`write`,storageKey:gt,cause:e});return console.error(t.message,{operation:t.operation,storageKey:t.storageKey,...b(t)}),!1}return U=null,q(K(),{suppressTransitions:!0}),W(),!0},[]),a=(0,T.useCallback)(e=>{let n=G(t),r=e?`system`:n===`system`?bt(t)??`light`:n;return i(r)},[i,t]),o=(0,T.useCallback)((e,t)=>{if(typeof window>`u`)return!1;try{let n={...sn()};t===null?delete n[e]:n[e]=t,n.light===void 0&&n.dark===void 0?window.localStorage.removeItem(w):window.localStorage.setItem(w,JSON.stringify(n))}catch(e){let t=new R({operation:`write`,storageKey:w,cause:e});return console.error(t.message,{operation:t.operation,storageKey:t.storageKey,...b(t)}),!1}return q(K(),{suppressTransitions:!0}),W(),!0},[]),s=(0,T.useCallback)(()=>{if(typeof window>`u`)return!1;try{window.localStorage.removeItem(w)}catch(e){let t=new R({operation:`write`,storageKey:w,cause:e});return console.error(t.message,{operation:t.operation,storageKey:t.storageKey,...b(t)}),!1}return q(K(),{suppressTransitions:!0}),W(),!0},[]),c=(0,T.useCallback)(({preservePreview:e=!1}={})=>{typeof window<`u`&&(H=null,q(K(),{suppressTransitions:!0,preservePreview:e}),W())},[]);return(0,T.useEffect)(()=>{q(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=oe(be(Me)),Pn=ge(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(ye(e=>e.issue))}),Fn=new Ae(Pn,We());Ge().pipe(Ue(We({space:2})));var In=e=>he.pipe(me(e,Fn)),Ln={performance:{profile:`performance`,automaticGitFetchInterval:i(15),providerHealthRefreshInterval:m(1),hostPowerMonitorActiveInterval:i(30),hostPowerMonitorIdleInterval:m(2),idleClientTtl:i(45),pauseWhenHostLocked:!0,pauseWhenHostLowPower:!1,pauseWhenClientLowPower:!1,pauseWhenOnBattery:!1},balanced:{profile:`balanced`,automaticGitFetchInterval:Ne,providerHealthRefreshInterval:te,hostPowerMonitorActiveInterval:i(30),hostPowerMonitorIdleInterval:m(5),idleClientTtl:i(45),pauseWhenHostLocked:!0,pauseWhenHostLowPower:!0,pauseWhenClientLowPower:!0,pauseWhenOnBattery:!1},"battery-saver":{profile:`battery-saver`,automaticGitFetchInterval:i(0),providerHealthRefreshInterval:m(15),hostPowerMonitorActiveInterval:m(1),hostPowerMonitorIdleInterval:m(10),idleClientTtl:i(45),pauseWhenHostLocked:!0,pauseWhenHostLowPower:!0,pauseWhenClientLowPower:!0,pauseWhenOnBattery:!0}};function J(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 Y(e,t){return h(e)===h(t)}function Bn(e,t){return Y(e.automaticGitFetchInterval,t.automaticGitFetchInterval)&&Y(e.providerHealthRefreshInterval,t.providerHealthRefreshInterval)&&Y(e.hostPowerMonitorActiveInterval,t.hostPowerMonitorActiveInterval)&&Y(e.hostPowerMonitorIdleInterval,t.hostPowerMonitorIdleInterval)&&Y(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:{...Y(t.automaticGitFetchInterval,i.automaticGitFetchInterval)?{}:{automaticGitFetchInterval:t.automaticGitFetchInterval},...Y(t.providerHealthRefreshInterval,i.providerHealthRefreshInterval)?{}:{providerHealthRefreshInterval:t.providerHealthRefreshInterval},...Y(t.hostPowerMonitorActiveInterval,i.hostPowerMonitorActiveInterval)?{}:{hostPowerMonitorActiveInterval:t.hostPowerMonitorActiveInterval},...Y(t.hostPowerMonitorIdleInterval,i.hostPowerMonitorIdleInterval)?{}:{hostPowerMonitorIdleInterval:t.hostPowerMonitorIdleInterval},...Y(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:r,overrides:{}},n=e.backgroundActivity.profile===t.profile&&e.backgroundActivity.baseProfile===void 0&&Object.keys(e.backgroundActivity.overrides).length===0,i=e.backgroundActivityProfile,a=i!==`balanced`||h(e.automaticGitFetchInterval)!==h(Ne)||h(e.providerHealthRefreshInterval)!==h(te);return zn(n&&a?{schemaVersion:1,profile:h(e.automaticGitFetchInterval)===h(J(i).automaticGitFetchInterval)&&h(e.providerHealthRefreshInterval)===h(J(i).providerHealthRefreshInterval)?i:`custom`,baseProfile:i,overrides:{...h(e.automaticGitFetchInterval)===h(J(i).automaticGitFetchInterval)?{}:{automaticGitFetchInterval:e.automaticGitFetchInterval},...h(e.providerHealthRefreshInterval)===h(J(i).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(Be);a(Wn);function Gn(e,t){let n=e.providerInstances[t.instanceId];return n===void 0?Oe(t.instanceId):He(n)}var Kn=[`codex`,`claudeAgent`,`cursor`,`grok`,`muse`,`pi`,`opencode`,`antigravity`].map(e=>Se.make(e));function qn(e,t,n){let r=[...Kn.map(e=>[Ce(e),e]),...n?.includeConfiguredInstances===!0?Object.entries(e).flatMap(([e,t])=>Kn.includes(t.driver)?[[xe.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&&ne(s?.customModels).some(e=>e.slug===o.model)?o:{instanceId:i,model:ue[a]??c[a]??`gpt-6-luna`}}function Jn(e,t,n){let r=e.sourceControlWriterModelSelection;if(!r||!Re(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&&ie(i)&&se(i)?r:e.textGenerationModelSelection}function Yn(e,t,n){let r=e.reviewGuideModelSelection;if(r&&Re(e,n,r.instanceId)){let e=t?.find(e=>e.instanceId===r.instanceId);if(t===void 0||e?.enabled===!0&&ie(e)&&se(e))return r}return Jn(e,t,n)}new Set(Object.keys(ve.fields));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=Ie(e,[`textGenerationModelSelection`])),t?.threadRestartContinuation===!0?e:Ie(e,[`continueThreadsAfterServerUpdate`])}function tr(e){return e.connection.phase===`connected`&&e.serverConfig!==null}function nr(e){let t=e.atom(ze(qe.pipe(ee(e=>De(e.state)))),{initialValue:Ze});return{stateAtom:t,stateValueAtom:_(e=>s(ae(e(t)),()=>Ze)).pipe(g(`relay-environment-discovery-value`)),refresh:Je(e,{label:`relay-environment-discovery:refresh`,concurrency:{mode:`singleFlight`,key:()=>`refresh`},execute:e=>qe.pipe(we(e=>e.refresh))})}}var rr=nr(nt);function ir(e,t){return{...t,environmentId:e,label:t.entry.target.label,displayUrl:et(t.entry),relayManaged:Ke(t.entry)}}function ar(){let e=(0,E.c)(7),t=v(C.catalogValueAtom),n=v(C.networkStatusValueAtom),r=v(Tt.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 v(rt)}function cr(e){let t=(0,E.c)(3),{presentation:n}=Dt(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,E.c)(2),n=st(e),r;return t[0]===n?r=t[1]:(r=le(n)?n.value.httpBaseUrl:null,t[0]=n,t[1]=r),r}function dr(){return v(rr.stateValueAtom)}function fr(){return v(D.environmentIdsAtom)}function pr(){return v(D.identitiesAtom)}function mr(){return v(D.pullRequestsSupportedAtom)}function hr(){return v(D.machineByIdAtom)}var gr=`[CLIENT_SETTINGS]`,_r=new Set,vr=new Set,yr=de,X=`pending`,Z=null,br=0,xr=Promise.resolve(),Sr=0;function Cr(){for(let e of _r)e()}function wr(){for(let e of vr)e()}function Q(){return yr}function Tr(e){yr=e,Cr()}function Er(e){X!==e&&(X=e,wr())}function Dr(e){return _r.add(e),$().catch(()=>void 0),()=>{_r.delete(e)}}function Or(){return X===`ready`}function kr(){return X}function Ar(e){return vr.add(e),$().catch(()=>void 0),()=>{vr.delete(e)}}async function $(){if(X===`ready`)return;if(Z)return Z;let e=br;Er(X===`failed`||X===`retrying`?`retrying`:`pending`);let t=(async()=>{try{let t=await nn().persistence.getClientSettings();if(e!==br)return;t&&Tr({...de,...t}),Er(`ready`)}catch(t){throw e===br&&Er(`failed`),console.error(`${gr} hydrate failed`,{operation:`hydrate`,...b(t)}),t}})().finally(()=>{Z===t&&(Z=null)});return Z=t,Z}var jr=e=>nn().persistence.setClientSettings(e);function Mr(e){let t=xr.then(e);return xr=t.then(()=>void 0,()=>void 0),t}function Nr(e,t=jr){let n=X!==`ready`||Sr>0;return n?Sr+=1:Tr({...Q(),...e}),Mr(async()=>{if(n)try{X!==`ready`&&await $(),Tr({...Q(),...e})}finally{--Sr}await t(Q())}).catch(e=>{console.error(`${gr} persist failed`,{operation:`persist`,...b(e)})})}async function Pr(e,t=jr){return Mr(async()=>{for(X!==`ready`&&await $();;){let n=Q(),r=e(n);if(await t(r),Q()===n)return Tr(r),r}})}var Fr=new Set(Ee(Be.fields));function Ir(e){let t={},n={};for(let[r,i]of Object.entries(e))Fr.has(r)?t[r]=i:n[r]=i;return{serverPatch:t,clientPatch:n}}function Lr(){return Q()}function Rr(){return $()}function zr(){return(0,T.useSyncExternalStore)(Ar,Or,Br)}function Br(){return!1}function Vr(){return(0,T.useSyncExternalStore)(Ar,kr,Hr)}function Hr(){return`pending`}function Ur(){return(0,T.useSyncExternalStore)(Dr,Q,Wr)}function Wr(){return de}function Gr(e,t){return{...t,...e,...Xn(e,t)}}var Kr=new Set;function qr(e,t){let n=(0,E.c)(8),r=Ur(),i=zr(),a;n[0]===Symbol.for(`react.memo_cache_sentinel`)?(a={reportFailure:!1},n[0]=a):a=n[0];let o=lt(S.updateSettings,a),s,c;n[1]!==r||n[2]!==e||n[3]!==i||n[4]!==o||n[5]!==t?(s=()=>{if(!e||!t||!i||Kr.has(e))return;let n=Zn(t,r);n&&(Kr.add(e),o({environmentId:e,input:{patch:n}}).finally(()=>Kr.delete(e)))},c=[r,e,i,o,t],n[1]=r,n[2]=e,n[3]=i,n[4]=o,n[5]=t,n[6]=s,n[7]=c):(s=n[6],c=n[7]),(0,T.useEffect)(s,c)}function Jr(e,t){let n=(0,E.c)(6),r=Ur(),i;n[0]!==r||n[1]!==e?(i=Gr(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 Yr(e){let t=(0,E.c)(3),n=Ur(),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 Xr(e,t){return(e.favorites===null||e.providerModelPreferences===null)&&await Rr(),{...Zn(e,Lr()),...t}}function Zr(e){let t=(0,E.c)(6),n;t[0]===e?n=t[1]:(n=e?S.settingsValueAtom(e):$r,t[0]=e,t[1]=n);let r=v(n),i=lt(S.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 Xr(r,t)}catch{x.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 Qr(e){let t=(0,T.use)(Ve),n=(0,T.useRef)(new Map),r=Zr(e);return(0,T.useCallback)(async(i,a)=>{if(!e)return;let o=S.settingsValueAtom(e),s=t.get(o);if(!s)return;if(s.favorites===null)try{await Rr()}catch{x.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,Lr()).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 $r=_(null);function ei(e){let t=(0,E.c)(5),n;t[0]===e?n=t[1]:(n=e?S.settingsValueAtom(e):$r,t[0]=e,t[1]=n);let r=v(n),i=Ur();qr(e,r);let a=r??re,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 ti(e,t){let n=(0,E.c)(2),r;n[0]===e?r=n[1]:(r=S.settingsValueAtom(e),n[0]=e,n[1]=r);let i=v(r);return qr(e,i),Jr(i??re,t)}function ni(e){let t=(0,E.c)(4),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n={reportFailure:!1},t[0]=n):n=t[0];let r=lt(S.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 ri(e){let t=lr(),n=v(it);return qr(t?.environmentId??null,t?.serverConfig?.settings??null),Jr(n,e)}var ii=`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 ai(){let e=(0,E.c)(2),t=lr(),n;return e[0]===t?n=e[1]:(n=t!==null||!tt(),e[0]=t,e[1]=n),n}function oi(e){let t=(0,E.c)(3),n=e!==void 0&&e,{environments:r}=ar(),i;return t[0]!==r||t[1]!==n?(i=_(e=>r.filter(tr).flatMap(t=>{let r=e(ct.sessionStateAtom(t.environmentId));if(n&&r._tag===`Initial`)return[t.environmentId];let i=r._tag===`Failure`?null:y(ae(r));return i!==null&&_e(i,`settings:write`)?[t.environmentId]:[]})),t[0]=r,t[1]=n,t[2]=i):i=t[2],v(i)}function si(e){let t=(0,E.c)(10);at(e,ke);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=lt(S.updateSettings,n),{environments:i}=ar(),a;t[1]!==i||t[2]!==r?(a=async e=>{let t=await r(e);if(t._tag===`Failure`&&!Ye(t)){let n=i.find(t=>t.environmentId===e.environmentId)?.label??e.environmentId,r=Qe(t);x.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=oi(!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}=Ir(t),c=e===null||je(n).every(t=>ot(e,t));if(Object.keys(n).length>0&&!c&&x.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=fi;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&&(pe.get(ct.sessionStateAtom(r))._tag!==`Initial`&&!je(t).every(e=>ot(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(ci)}}Object.keys(a).length>0&&Nr(a)},t[4]=e,t[5]=i,t[6]=r,t[7]=o,t[8]=s,t[9]=c):c=t[9],c}function ci(e){let t=e.flatMap(di);if(t.length===0)return;let n=e.filter(ui).map(li);x.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 li(e){let{label:t}=e;return t}function ui(e){let{result:t}=e;return t._tag===`Success`}function di(e){let{label:t,result:n}=e;if(n._tag!==`Failure`||Ye(n))return[];let r=Qe(n);return[`Could not save on ${t}: ${r instanceof Error?r.message:`The save failed. Try reconnecting and saving again.`}`]}function fi(e){let t=e===void 0?ii:e;return x.add({type:`warning`,title:`Setting not saved`,description:t})}function pi(e){return si(e)}function mi(){return si(lr()?.environmentId??null)}function hi(){return gi}function gi(e){return Nr(e)}export{Nt as $,dr as A,In as B,pr as C,lr as D,ar as E,Rn as F,Cn as G,an as H,J as I,tn as J,Mn as K,Vn as L,qn as M,Yn as N,sr as O,Jn as P,jt as Q,Un as R,ur as S,hr as T,on as U,G as V,vn as W,Lt as X,Gt as Y,Ft as Z,hi as _,Nr as a,Dt as at,mi as b,zr as c,ti as d,Pt as et,qr as f,Qr as g,ai as h,Gr as i,D as it,rr as j,mr as k,Vr as l,ri as m,Rr as n,Mt as nt,Pr as o,ni as p,nn as q,Lr as r,Tt as rt,Yr as s,ii as t,It as tt,ei as u,Zr as v,fr as w,cr as x,pi as y,Hn as z};
|
|
3
|
-
//# sourceMappingURL=useSettings-jZr_DfW0.js.map
|