@p4code/cli 0.8.15 → 0.8.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/bin.mjs +1 -1
- package/dist/{binCli-IAUzRF0Y.mjs → binCli-C2OtBl3_.mjs} +2 -2
- package/dist/client/.vite/manifest.json +2144 -2144
- package/dist/client/assets/AlertDialogRoot-C4_VBb4J.js +2 -0
- package/dist/client/assets/{AnimatedHeight-CzFc8xri.js → AnimatedHeight-CROd_m0y.js} +2 -2
- package/dist/client/assets/{AuthSurfaceShell-ByOYQAV0.js → AuthSurfaceShell-BFqgU6Cf.js} +2 -2
- package/dist/client/assets/{CSPContext-DcW0os5z.js → CSPContext-BUFNSYww.js} +2 -2
- package/dist/client/assets/{ChatGptUsageButton-KFBZLDN7.js → ChatGptUsageButton-CAkbdzVa.js} +2 -2
- package/dist/client/assets/{ChatMarkdown-BoxySKsC.js → ChatMarkdown-DRdUETgB.js} +4 -4
- package/dist/client/assets/{CheckboxIndicator-DRAilQdq.js → CheckboxIndicator-DS1cy5Y6.js} +2 -2
- package/dist/client/assets/{CodexSetupSection.logic-d-rT4H0o.js → CodexSetupSection.logic-B-Gs8BS6.js} +2 -2
- package/dist/client/assets/{CollapsiblePanel-DMH4QH0_.js → CollapsiblePanel-DzlAN8vm.js} +2 -2
- package/dist/client/assets/{ComboboxClear-DV4ygCOL.js → ComboboxClear-D3w2fM_m.js} +2 -2
- package/dist/client/assets/{CommandBlock-_boutMAe.js → CommandBlock-BaaPOUD7.js} +2 -2
- package/dist/client/assets/{ComposerPromptEditor-BTCrYVhm.js → ComposerPromptEditor-jeEkR9fy.js} +4 -4
- package/dist/client/assets/{CompositeRoot-CsrLt1o5.js → CompositeRoot-r9p4LoiQ.js} +2 -2
- package/dist/client/assets/{ConnectionStatusDot-uWbIqk3l.js → ConnectionStatusDot-C8T3Smus.js} +2 -2
- package/dist/client/assets/{DevicePanel-DwMrOlt0.js → DevicePanel-BG2hk0i3.js} +2 -2
- package/dist/client/assets/{DeviceSetup-CbOHLIaV.js → DeviceSetup-CKZmblju.js} +2 -2
- package/dist/client/assets/{DialogTitle-BgclXafx.js → DialogTitle-Bs5Povma.js} +2 -2
- package/dist/client/assets/{DiffCommentAnnotation-Aq3V-yP1.js → DiffCommentAnnotation-CX8scC3B.js} +2 -2
- package/dist/client/assets/{DiffFileTree-CKQPTUag.js → DiffFileTree-BnizHv7v.js} +2 -2
- package/dist/client/assets/{DiffPanel-BXML30Ty.js → DiffPanel-DxnHaLb1.js} +2 -2
- package/dist/client/assets/{DiffWorkerPoolProvider-CibTihO7.js → DiffWorkerPoolProvider-Bn4H-Zao.js} +2 -2
- package/dist/client/assets/{EmbeddedDesign-722JShay.js → EmbeddedDesign-BiW8ewmO.js} +2 -2
- package/dist/client/assets/{EnvironmentMachineIcon-Czk_PJpp.js → EnvironmentMachineIcon-DKzRVCQ4.js} +2 -2
- package/dist/client/assets/{ExpandableText-Ggw0uVXl.js → ExpandableText-BanCMyot.js} +2 -2
- package/dist/client/assets/{FieldControl-Bw2_eFMa.js → FieldControl-s_wzlnCP.js} +2 -2
- package/dist/client/assets/{FileDiff-Cen-Dayi.js → FileDiff-BTx35t8y.js} +2 -2
- package/dist/client/assets/{FilePreviewPanel-BMK5AG_P.js → FilePreviewPanel-Cii41zwQ.js} +2 -2
- package/dist/client/assets/{FoldedSettingsSection-G9y7luve.js → FoldedSettingsSection-BW3s8OMk.js} +2 -2
- package/dist/client/assets/{FormContext-7fCTOXXA.js → FormContext-CUlgAi-q.js} +2 -2
- package/dist/client/assets/{Icons-CSAp87pJ.js → Icons-3I0QXv0W.js} +2 -2
- package/dist/client/assets/Input-D-VEMFtp.js +2 -0
- package/dist/client/assets/{KeybindingsSettings.logic-CsSjvH9c.js → KeybindingsSettings.logic-CSyJIpFu.js} +2 -2
- package/dist/client/assets/{NoProjectsHero-iGEFavkK.js → NoProjectsHero-Cbnk6tn0.js} +2 -2
- package/dist/client/assets/{PanelLayoutControls-C4Gm81F_.js → PanelLayoutControls-Cyag4Tur.js} +4 -4
- package/dist/client/assets/{PierreEntryIcon-CnGUKKOC.js → PierreEntryIcon-C5vp6j29.js} +2 -2
- package/dist/client/assets/{PopoverHandle-BkhR-kKK.js → PopoverHandle-CgOyoBVs.js} +2 -2
- package/dist/client/assets/{PreviewPanel-BZNqorNM.js → PreviewPanel-CZ_Qxxvo.js} +2 -2
- package/dist/client/assets/{ProjectDefaultsSettings-DzMIpb2U.js → ProjectDefaultsSettings-BIEY8BOO.js} +2 -2
- package/dist/client/assets/{ProjectFavicon-Dk18tk1C.js → ProjectFavicon-DU8VbXX4.js} +3 -3
- package/dist/client/assets/{ProjectIconPickerDialog-DnmG78V1.js → ProjectIconPickerDialog-CK8qpgyz.js} +2 -2
- package/dist/client/assets/{ProjectMonogram-CWdfC9NP.js → ProjectMonogram-BaA9dKQy.js} +2 -2
- package/dist/client/assets/{ProviderAuthTerminal-nDUEuuwR.js → ProviderAuthTerminal-AH-Cy_pb.js} +2 -2
- package/dist/client/assets/{ProviderModelPicker-DhOV_BIX.js → ProviderModelPicker-wOdtIBVW.js} +2 -2
- package/dist/client/assets/{ProviderSettingsForm-Cyw48DUr.js → ProviderSettingsForm-DXzJoQR9.js} +2 -2
- package/dist/client/assets/{PullRequestCodeTab-BpjwcQvb.js → PullRequestCodeTab-CkE2ul9K.js} +2 -2
- package/dist/client/assets/{ReadOnlySourcePreview-DMF3eLls.js → ReadOnlySourcePreview-CBGeBLfB.js} +2 -2
- package/dist/client/assets/{RenderErrorBoundary-DQC7sq87.js → RenderErrorBoundary-CgWfZhV9.js} +2 -2
- package/dist/client/assets/{ScheduledTasksSettings-CZK46eKO.js → ScheduledTasksSettings-CykPbEbT.js} +2 -2
- package/dist/client/assets/{ScopedSwitch-BECzQob0.js → ScopedSwitch-Bk5kVayQ.js} +2 -2
- package/dist/client/assets/{ScrollAreaCorner-DXYr9Xbu.js → ScrollAreaCorner-CxSOla7S.js} +2 -2
- package/dist/client/assets/{SecretInput-WUih9JDs.js → SecretInput-6K6o0z_j.js} +2 -2
- package/dist/client/assets/{SelectScrollUpArrow-BIdW5z3c.js → SelectScrollUpArrow-DKwyzFlM.js} +2 -2
- package/dist/client/assets/{SettingsPanels-B3TcgEEZ.js → SettingsPanels-CzHOdmoE.js} +2 -2
- package/dist/client/assets/{SettingsPanels.logic-DpJJdWIn.js → SettingsPanels.logic-B9MzQwrf.js} +2 -2
- package/dist/client/assets/{SettingsScopeNotice-CcgRSc9E.js → SettingsScopeNotice-ml10Xbs_.js} +2 -2
- package/dist/client/assets/{T3ConnectAccountPages-8GTdhVAB.js → T3ConnectAccountPages-DORAp_V3.js} +2 -2
- package/dist/client/assets/{T3ConnectSidebarSignIn-CY6WtOps.js → T3ConnectSidebarSignIn-D4iDcrjK.js} +2 -2
- package/dist/client/assets/{ThemeEditorPanel-i2RAKM6Z.js → ThemeEditorPanel-BiB-1tTU.js} +2 -2
- package/dist/client/assets/{ThreadTerminalDrawer-D7lW_0Ez.js → ThreadTerminalDrawer-E3tgtH2-.js} +2 -2
- package/dist/client/assets/{TooltipViewport-Daddx30c.js → TooltipViewport-A4hJLsA1.js} +2 -2
- package/dist/client/assets/{Virtualizer-CTxMd1UV.js → Virtualizer-YZrA28xX.js} +2 -2
- package/dist/client/assets/{WorkspaceBreadcrumb-B3WecLwo.js → WorkspaceBreadcrumb-DRyODQoe.js} +2 -2
- package/dist/client/assets/{WorkspacePageContainer-rn16R8Ps.js → WorkspacePageContainer-C9d1CC0F.js} +2 -2
- package/dist/client/assets/{WorkspacePageHeader-B2wsiKGJ.js → WorkspacePageHeader-cjFWAiFR.js} +2 -2
- package/dist/client/assets/{_chat-DCAacYa_.js → _chat-DcFCVkrG.js} +5 -5
- package/dist/client/assets/{_chat.index-CqT22uaz.js → _chat.index-D1edR5Y7.js} +2 -2
- package/dist/client/assets/{_chat.new-CTRPd-7l.js → _chat.new-CNtY6xfX.js} +2 -2
- package/dist/client/assets/{_chat.pull-requests-DZwiHPhH.js → _chat.pull-requests-B9gYbv3C.js} +2 -2
- package/dist/client/assets/{abnfDiagram-VCTEODGH-0sYdmV4a.js → abnfDiagram-VCTEODGH-Bg9Y0ptm.js} +2 -2
- package/dist/client/assets/{alert-CvIEaZOb.js → alert-C9G2MwuB.js} +2 -2
- package/dist/client/assets/architecture-7GRP2DOG-B_DOBvMT.js +1 -0
- package/dist/client/assets/{architectureDiagram-5GKGNRK7-CyILOixS.js → architectureDiagram-5GKGNRK7-DaFWEoVm.js} +2 -2
- package/dist/client/assets/{assets-CqHuBXjp.js → assets-BngUvpba.js} +2 -2
- package/dist/client/assets/{blockDiagram-I7D4REHJ-x-VvNLUl.js → blockDiagram-I7D4REHJ-BLFoCG7i.js} +2 -2
- package/dist/client/assets/{browserHistoryStore-BpqZwrsk.js → browserHistoryStore-D3jg6lW0.js} +2 -2
- package/dist/client/assets/{browserLinkTarget-EXHYn6yB.js → browserLinkTarget-BTsZgYV0.js} +2 -2
- package/dist/client/assets/{c4Diagram-7LVT6UL2-B0k0wHF6.js → c4Diagram-7LVT6UL2-DI-I8wOH.js} +2 -2
- package/dist/client/assets/channel-D77117oc.js +2 -0
- package/dist/client/assets/{checkbox-EHQPSidC.js → checkbox-BMrBwYAj.js} +2 -2
- package/dist/client/assets/{chunk-4HAMMTFA-Uul0p-TJ.js → chunk-4HAMMTFA-DJYGf4Ym.js} +2 -2
- package/dist/client/assets/{chunk-75Z2AOVW-SUa_8bmt.js → chunk-75Z2AOVW-BHc4yRCt.js} +2 -2
- package/dist/client/assets/{chunk-DU6HZSFF-DZ_qPx6g.js → chunk-DU6HZSFF-CxeiyFio.js} +2 -2
- package/dist/client/assets/{chunk-F27PBJKO-DNArajpV.js → chunk-F27PBJKO-CoBuXptu.js} +2 -2
- package/dist/client/assets/{chunk-GMAD6QVW-DCcQWsDo.js → chunk-GMAD6QVW-Djtqr7wA.js} +2 -2
- package/dist/client/assets/{chunk-GVQU2GXP-CUeM0ruH.js → chunk-GVQU2GXP-B_dZvf-D.js} +2 -2
- package/dist/client/assets/{chunk-IMKFNOWR-Dz48fQ1q.js → chunk-IMKFNOWR-CIZUn2vm.js} +2 -2
- package/dist/client/assets/{chunk-L3NEJ4N5-Css7u6Lh.js → chunk-L3NEJ4N5-DMIPUTzl.js} +2 -2
- package/dist/client/assets/{chunk-OSK3NFVY-CDaAT2I-.js → chunk-OSK3NFVY-8kOFeAYp.js} +2 -2
- package/dist/client/assets/{chunk-P2QGCYS3-CrKr6f8Y.js → chunk-P2QGCYS3-CRs2CVdk.js} +2 -2
- package/dist/client/assets/{chunk-POPQ4Y6H-BqMK6oaX.js → chunk-POPQ4Y6H-BF0zVulS.js} +2 -2
- package/dist/client/assets/{chunk-PWAF6VOD-CyuqbEJS.js → chunk-PWAF6VOD-pAkrbks5.js} +2 -2
- package/dist/client/assets/{chunk-SHT3W25Y-BrH-w9EI.js → chunk-SHT3W25Y-XA9rgPJk.js} +2 -2
- package/dist/client/assets/{chunk-SVP7TREG-DC8LP4Dl.js → chunk-SVP7TREG-BLPEkz6O.js} +2 -2
- package/dist/client/assets/{chunk-TICWLB2K-D9Rk3v5O.js → chunk-TICWLB2K-BDX6zFln.js} +2 -2
- package/dist/client/assets/classDiagram-ZZMXUADV-BOfzjSR1.js +2 -0
- package/dist/client/assets/classDiagram-v2-VYDZK3BY-BOfzjSR1.js +2 -0
- package/dist/client/assets/{color-picker-Dd1K-QRk.js → color-picker-CHpDpF1q.js} +2 -2
- package/dist/client/assets/{combobox-BqpUmoio.js → combobox-DsEnX06q.js} +2 -2
- package/dist/client/assets/{command-D1peviZr.js → command-7JZ4jreB.js} +2 -2
- package/dist/client/assets/{connect-_R8iiudK.js → connect-CrLJN7lo.js} +2 -2
- package/dist/client/assets/{connect-agent-hovmaVDF.js → connect-agent-iD4mBU_q.js} +2 -2
- package/dist/client/assets/{cynefin-OW5HDTMX-EgbU-rQt.js → cynefin-OW5HDTMX-BPbkuuD0.js} +1 -1
- package/dist/client/assets/{cynefinDiagram-5FMLGOSQ-D1_um-xk.js → cynefinDiagram-5FMLGOSQ-Tg7_4aNX.js} +2 -2
- package/dist/client/assets/{dagre-GXQ25YYZ-BUeriIID.js → dagre-GXQ25YYZ-BO8vBn--.js} +2 -2
- package/dist/client/assets/{device-DIh4Fmq_.js → device-D7crohVQ.js} +2 -2
- package/dist/client/assets/{diagram-S7CK7UJ4-Du3htb_X.js → diagram-S7CK7UJ4-Cw7tf93w.js} +2 -2
- package/dist/client/assets/{diagram-UQ7AKVKN-B02FTV2h.js → diagram-UQ7AKVKN-CWCxivXY.js} +2 -2
- package/dist/client/assets/{diagram-VSXAHHWV-C-GXxjgO.js → diagram-VSXAHHWV-obA2VrFx.js} +2 -2
- package/dist/client/assets/{diagram-VX7I27RA-C9x6jBO2.js → diagram-VX7I27RA-BZZX0tDC.js} +2 -2
- package/dist/client/assets/{diagram-Z3DM3KII-BOzwpZ6f.js → diagram-Z3DM3KII-BXgCa2au.js} +2 -2
- package/dist/client/assets/{dialog-BfenC7sz.js → dialog-DWCEeJ2c.js} +2 -2
- package/dist/client/assets/{diffRendering-EPxtkQvT.js → diffRendering-BAlsKvkZ.js} +2 -2
- package/dist/client/assets/{discovery-list-NHMaJPrr.js → discovery-list-BaMSF62J.js} +2 -2
- package/dist/client/assets/{dist-BgOJfdC2.js → dist-CtlrzKKg.js} +3 -3
- package/dist/client/assets/{draft-input-rVkOduh_.js → draft-input-DZZB4KBb.js} +2 -2
- package/dist/client/assets/{duoViewer-CbfTiSKj.js → duoViewer-BDT5Pw1R.js} +2 -2
- package/dist/client/assets/{dynamic-7n-O1eEM.js → dynamic-B_1SDXVm.js} +2 -2
- package/dist/client/assets/{ebnfDiagram-PWID7BFC-B-aK7ztf.js → ebnfDiagram-PWID7BFC-C79a3o-h.js} +2 -2
- package/dist/client/assets/{embeddedScripts-D-v7UxHT.js → embeddedScripts-DWtZjYSD.js} +2 -2
- package/dist/client/assets/{empty-xf3NEL4p.js → empty-CdigxFIr.js} +2 -2
- package/dist/client/assets/{entities-CyQRuOur.js → entities-Cri9JXzU.js} +2 -2
- package/dist/client/assets/{environments-CjU9SGCA.js → environments-CXLCfPlP.js} +2 -2
- package/dist/client/assets/{erDiagram-RLTQ6QDP-BUkP1ax_.js → erDiagram-RLTQ6QDP-C_C_xUYl.js} +2 -2
- package/dist/client/assets/eventmodeling-NTZA5JFV-BBNrMOto.js +1 -0
- package/dist/client/assets/{fileLinks-sFAkJkUp.js → fileLinks-gi8wmjAc.js} +2 -2
- package/dist/client/assets/{fileTreeExpansion-BoG00fm4.js → fileTreeExpansion-By588Tlp.js} +2 -2
- package/dist/client/assets/flowDiagram-HODETNUW-DE4e8-KT.js +1 -0
- package/dist/client/assets/{ganttDiagram-EL5Y4UJY-C9-_e4R8.js → ganttDiagram-EL5Y4UJY-vDMTogcH.js} +2 -2
- package/dist/client/assets/{getDiffFileInput-Eacwf1x6.js → getDiffFileInput-B20LTLvK.js} +2 -2
- package/dist/client/assets/{gitGraph-4MIJSDKK-DpJxnpww.js → gitGraph-4MIJSDKK-CP2HybJj.js} +1 -1
- package/dist/client/assets/{gitGraphDiagram-WWUBYQGX-D1kbQfjj.js → gitGraphDiagram-WWUBYQGX-okkWrJG2.js} +2 -2
- package/dist/client/assets/{guideRunStore-pssxpidL.js → guideRunStore-BuNfL9zT.js} +2 -2
- package/dist/client/assets/{htmlRender-CDbYs9Mi.js → htmlRender-B0nsPoF5.js} +2 -2
- package/dist/client/assets/{index-BcfzEf8A.js → index-C4eY-csp.js} +3 -3
- package/dist/client/assets/{info-A6RAGUB7-NwzA9LEB.js → info-A6RAGUB7-RHhd5N_M.js} +1 -1
- package/dist/client/assets/{infoDiagram-27XIBGKW--zzuhsyp.js → infoDiagram-27XIBGKW-YzE38gXg.js} +2 -2
- package/dist/client/assets/{input-CF-egQtG.js → input-RCV7-UKX.js} +2 -2
- package/dist/client/assets/{input-group-CifPZlNg.js → input-group-Bcuxz_AQ.js} +2 -2
- package/dist/client/assets/{ishikawaDiagram-5VMMS53U-BtNAzuJP.js → ishikawaDiagram-5VMMS53U-Sz6NR02e.js} +2 -2
- package/dist/client/assets/{journeyDiagram-3NMN7TZE-CkOdxsrK.js → journeyDiagram-3NMN7TZE-BQjnHIg3.js} +2 -2
- package/dist/client/assets/{kanban-definition-UXKFOSKX-L-Zve5xm.js → kanban-definition-UXKFOSKX-DZUIDXIB.js} +2 -2
- package/dist/client/assets/{kbd-DN9MXWor.js → kbd-CIJ2_Q5W.js} +2 -2
- package/dist/client/assets/{keybindings-BlEA4Dlt.js → keybindings-BpKkzV__.js} +2 -2
- package/dist/client/assets/{lazyRouteComponent-b9hpLjZB.js → lazyRouteComponent-BRNgDsba.js} +2 -2
- package/dist/client/assets/{line-CUIFqVat.js → line-D2YW2WaY.js} +2 -2
- package/dist/client/assets/{link-BIudTto8.js → link-D4TtDnqi.js} +2 -2
- package/dist/client/assets/{linkedPrompt-DQkjE7kc.js → linkedPrompt-1QsAG0gO.js} +2 -2
- package/dist/client/assets/{main-CoSpTpWL.css → main-ChIB1-3M.css} +1 -1
- package/dist/client/assets/{main-C58_iQqs.js → main-Co3JeKTg.js} +7 -7
- package/dist/client/assets/{mediaReference-D5Qxnp2d.js → mediaReference-BUHO9ICD.js} +2 -2
- package/dist/client/assets/{mediaSource-DRXKCFCg.js → mediaSource-CHFugA8_.js} +2 -2
- package/dist/client/assets/{mermaid-parser.core-Dy9NqIcU.js → mermaid-parser.core-Ch6yrkIv.js} +4 -4
- package/dist/client/assets/{mermaid.core-C1Tbkxei.js → mermaid.core-CDUpMNay.js} +5 -5
- package/dist/client/assets/{mindmap-definition-YA3MSWOX-CNHVmlJ4.js → mindmap-definition-YA3MSWOX-J5u85Ham.js} +2 -2
- package/dist/client/assets/{number-field-CydqGM9B.js → number-field-Osl5PZkX.js} +2 -2
- package/dist/client/assets/{observeResize-BxVCxCXG.js → observeResize-BeeOdDdQ.js} +2 -2
- package/dist/client/assets/{onboarding-DQxSrthd.js → onboarding-BF9yT3Xi.js} +2 -2
- package/dist/client/assets/{openFileInPreview-tPdJXpV4.js → openFileInPreview-C15eoyYZ.js} +2 -2
- package/dist/client/assets/{p4ProjectFile-Dqppy-Sd.js → p4ProjectFile-CAKJOMUN.js} +2 -2
- package/dist/client/assets/{packet-AYTQ26CC-D66WQAPv.js → packet-AYTQ26CC-Cs25hnS9.js} +1 -1
- package/dist/client/assets/{pair-BgezPXaC.js → pair-BA6LcmsK.js} +2 -2
- package/dist/client/assets/{pegDiagram-XKGWAZYB-D4RZHNwH.js → pegDiagram-XKGWAZYB-BMn57iOd.js} +2 -2
- package/dist/client/assets/{phoneViewer-DKIr7vIR.js → phoneViewer-C-9G9sMe.js} +2 -2
- package/dist/client/assets/{pie-WAS4IAKB-ChXk3493.js → pie-WAS4IAKB-DSKy_d1u.js} +1 -1
- package/dist/client/assets/{pieDiagram-E7YTZNPT-BYlPIaAz.js → pieDiagram-E7YTZNPT-DJxOVDr9.js} +2 -2
- package/dist/client/assets/{pierre-icons-ByQ4P7uM.js → pierre-icons-Cp8tJJSF.js} +2 -2
- package/dist/client/assets/{popover-BunL7s_L.js → popover-B70_-gBS.js} +2 -2
- package/dist/client/assets/{preview-DDUAtKQn.js → preview-BHYM-_BL.js} +2 -2
- package/dist/client/assets/{preview-B_wcdd8X.js → preview-Dj_ac_jZ.js} +2 -2
- package/dist/client/assets/{previewMiniPlayerStore-gZV-IkW-.js → previewMiniPlayerStore-DX9IKNL3.js} +2 -2
- package/dist/client/assets/{primary-BI3yNRjI.js → primary-DHlSwiw_.js} +2 -2
- package/dist/client/assets/{primaryCloudLinkState-Dn_lMN_C.js → primaryCloudLinkState-LOtU3kc-.js} +2 -2
- package/dist/client/assets/{projectFilesQueryState-DfToGDLi.js → projectFilesQueryState-DPo8i5yD.js} +2 -2
- package/dist/client/assets/{projectScriptEditor-De4HeOtY.js → projectScriptEditor-By8EdSYw.js} +2 -2
- package/dist/client/assets/{providerSkills-DrIXn_7R.js → providerSkills-mKD6o1i5.js} +2 -2
- package/dist/client/assets/{pullRequestDetail.logic-CGUKFcHo.js → pullRequestDetail.logic-B2AL8Xka.js} +2 -2
- package/dist/client/assets/{pullRequestIcons-BZCS4C5B.js → pullRequestIcons-B2-CZ5Ci.js} +2 -2
- package/dist/client/assets/{pullRequestReviewStore-BqvYYzmT.js → pullRequestReviewStore-CxOHaJ2U.js} +2 -2
- package/dist/client/assets/{pullRequests-tIwkUcK2.js → pullRequests-DDmSd4bP.js} +2 -2
- package/dist/client/assets/{quadrantDiagram-AXDQQJYC-kMIaUDbV.js → quadrantDiagram-AXDQQJYC-DE0d6o0C.js} +2 -2
- package/dist/client/assets/{queries-DMjiMwzO.js → queries-DqFudp6N.js} +2 -2
- package/dist/client/assets/{query-CRswjQ7f.js → query-1tRB9OB0.js} +2 -2
- package/dist/client/assets/{radar-RG4KPBEZ-_vEYfKqV.js → radar-RG4KPBEZ-DveMwSB8.js} +1 -1
- package/dist/client/assets/{radio-group-DzD2uI5x.js → radio-group-BDPDnH4m.js} +2 -2
- package/dist/client/assets/{railroad-74A4TZTK-BiD9GwPs.js → railroad-74A4TZTK-7mru9krG.js} +1 -1
- package/dist/client/assets/railroad-abnf-HS5TGJTU-Ch23A2t1.js +1 -0
- package/dist/client/assets/railroad-ebnf-LZEXJU2U-D0diYlkX.js +1 -0
- package/dist/client/assets/railroad-peg-WCYAUIDC-CnUWPGXT.js +1 -0
- package/dist/client/assets/{railroadDiagram-O6MQD6OU-VThEbY2-.js → railroadDiagram-O6MQD6OU-bAzEpkUJ.js} +2 -2
- package/dist/client/assets/{renderScheduler-ZbiToRGe.js → renderScheduler-DM1wgh78.js} +2 -2
- package/dist/client/assets/{requirementDiagram-BXWQKSXE-CYlc8xoq.js → requirementDiagram-BXWQKSXE-ClHxFUNg.js} +2 -2
- package/dist/client/assets/{rightPanelStore-CcmIdfDA.js → rightPanelStore-DNohe5X6.js} +2 -2
- package/dist/client/assets/{runtime-BjJBBHTp.js → runtime-B75ae48c.js} +2 -2
- package/dist/client/assets/{runtime-D102A-Bu.js → runtime-B7jXrsPs.js} +3 -3
- package/dist/client/assets/{runtimeModeConfig-CGosfJJ5.js → runtimeModeConfig-D044rsFH.js} +2 -2
- package/dist/client/assets/{sankeyDiagram-P5KCCOFB-CHYSv9pX.js → sankeyDiagram-P5KCCOFB-BwX1Wn_u.js} +2 -2
- package/dist/client/assets/{scheduledTasksSettings.logic-DhrwaClP.js → scheduledTasksSettings.logic-Bw_obRa9.js} +2 -2
- package/dist/client/assets/{scroll-area-OkcD8f0Y.js → scroll-area-Ckz2bO0L.js} +2 -2
- package/dist/client/assets/{select-BUFUt6O3.js → select-DWT2vKJH.js} +2 -2
- package/dist/client/assets/{sequenceDiagram-WJ2MYXX4-D1y7ChUn.js → sequenceDiagram-WJ2MYXX4-BSpw0E5m.js} +2 -2
- package/dist/client/assets/{server-DTGT8WWf.js → server-B0y-CZn0.js} +2 -2
- package/dist/client/assets/{session-Dh8maTO3.js → session-eKfJi_Kx.js} +2 -2
- package/dist/client/assets/{session-logic-CJeISKsG.js → session-logic-BAndUZwA.js} +2 -2
- package/dist/client/assets/{settings-CrZbdtKO.js → settings-D_eUqlLu.js} +2 -2
- package/dist/client/assets/{settings.appearance-BNB57wVJ.js → settings.appearance-kTWXGfao.js} +2 -2
- package/dist/client/assets/settings.archived-By7wX_fc.js +2 -0
- package/dist/client/assets/{settings.computer-use-CNLnfXe7.js → settings.computer-use-BuDMoYe7.js} +2 -2
- package/dist/client/assets/{settings.connections-CKn7dmOC.js → settings.connections-DwruajVk.js} +2 -2
- package/dist/client/assets/{settings.data-controls-B8uFJ36x.js → settings.data-controls-Ew7ogbgL.js} +2 -2
- package/dist/client/assets/{settings.decisions-Cy46-IzS.js → settings.decisions-rppoMBkE.js} +2 -2
- package/dist/client/assets/{settings.diagnostics-BeATxGLt.js → settings.diagnostics-BcNTndhm.js} +2 -2
- package/dist/client/assets/{settings.general-BAL2BKm_.js → settings.general-D1vnEzQa.js} +2 -2
- package/dist/client/assets/{settings.integrations-Bg8Ve2zj.js → settings.integrations-DKEJMS6o.js} +2 -2
- package/dist/client/assets/{settings.keybindings-B3Yph4YE.js → settings.keybindings-BstDnaeV.js} +2 -2
- package/dist/client/assets/{settings.open-source-licenses-Dx_Hoxhs.js → settings.open-source-licenses-s96NzjdF.js} +2 -2
- package/dist/client/assets/{settings.plugins-TfmhiHSr.js → settings.plugins--hNL0lcF.js} +2 -2
- package/dist/client/assets/{settings.projects-DyqRcoD5.js → settings.projects-BQBJ0eQ0.js} +3 -3
- package/dist/client/assets/settings.providers-C-R4_ra0.js +3 -0
- package/dist/client/assets/{settings.scheduled-tasks-gzepleP4.js → settings.scheduled-tasks-WuxBbfP4.js} +2 -2
- package/dist/client/assets/{settings.snap-shot-DPIz29B9.js → settings.snap-shot-D-GpjQxg.js} +2 -2
- package/dist/client/assets/{settings.source-control-BMPVT8GA.js → settings.source-control-D_Ipwyto.js} +2 -2
- package/dist/client/assets/{settings.storage-Cd4Vn9s1.js → settings.storage-DHtjVWHK.js} +2 -2
- package/dist/client/assets/{settingsLayout-BRcW18Dy.js → settingsLayout-B_Bq9Cq9.js} +2 -2
- package/dist/client/assets/{sidebar-CNP67lTi.js → sidebar-m0COIl9s.js} +2 -2
- package/dist/client/assets/{sidebarProjectGrouping-BRC9yCnW.js → sidebarProjectGrouping-BpwyF0h8.js} +2 -2
- package/dist/client/assets/{skeleton-DDh76jpd.js → skeleton-DxoA_uLH.js} +2 -2
- package/dist/client/assets/{sortable.esm-KZlxUbRj.js → sortable.esm-DAcHa5SQ.js} +2 -2
- package/dist/client/assets/{sourceControl-DXwrIEUZ.js → sourceControl-C-R8wmTp.js} +2 -2
- package/dist/client/assets/{spinner-DYnZ-Bpa.js → spinner-B1oJASgu.js} +2 -2
- package/dist/client/assets/{standalone-page-DUgQaNPq.js → standalone-page-OuNLgPqS.js} +2 -2
- package/dist/client/assets/{stateDiagram-D77RDMKH-DhHX_ym0.js → stateDiagram-D77RDMKH-DjLNu-aO.js} +2 -2
- package/dist/client/assets/stateDiagram-v2-MP3YSRHH-Cx2Qu8wY.js +2 -0
- package/dist/client/assets/{swimlanes-42K2YHIH-gr_Fo6MW.js → swimlanes-42K2YHIH-BAlKsUJH.js} +2 -2
- package/dist/client/assets/swimlanesDiagram-VR7AAH4N-euVkUgFA.js +9 -0
- package/dist/client/assets/{terminal-links-CV_3r1U3.js → terminal-links-B7jzSUaR.js} +2 -2
- package/dist/client/assets/{terminalSessions-aS2PVMmc.js → terminalSessions-CHAAF5wF.js} +2 -2
- package/dist/client/assets/{textarea-Dt0w6mtc.js → textarea-B86ZyXzK.js} +2 -2
- package/dist/client/assets/{themePalette-9CODTNe7.js → themePalette-BAR7Sc97.js} +2 -2
- package/dist/client/assets/{threadSort-BGtAZpdL.js → threadSort-Dnq059Z5.js} +2 -2
- package/dist/client/assets/{timeline-definition-24CTP7MA-DOSB4Ras.js → timeline-definition-24CTP7MA-YXaIoqb6.js} +2 -2
- package/dist/client/assets/{toast-SPJYfh08.js → toast-e2DHftFl.js} +2 -2
- package/dist/client/assets/{toggle-C3pF5hng.js → toggle-D4IMx5jG.js} +2 -2
- package/dist/client/assets/{toggle-group-C4V_4iet.js → toggle-group-BWnqiNcg.js} +2 -2
- package/dist/client/assets/{tooltip-Cco13jKX.js → tooltip-DRGG_vM1.js} +2 -2
- package/dist/client/assets/{treeView-Q6P3EWNA-DTI4SxFY.js → treeView-Q6P3EWNA-BKHL242s.js} +1 -1
- package/dist/client/assets/{treemap-WGGIJYW6-CVnkW1D0.js → treemap-WGGIJYW6-DKZHfhNz.js} +1 -1
- package/dist/client/assets/{usage-539lpsjW.js → usage-DZw1xQLa.js} +2 -2
- package/dist/client/assets/{usageAccess-CeCsk7TS.js → usageAccess-DLbz2bdv.js} +2 -2
- package/dist/client/assets/{usageFormat-CQXspPhL.js → usageFormat-CzWB9UsH.js} +2 -2
- package/dist/client/assets/{usageShortcuts-DaMuOxo1.js → usageShortcuts-DAEm4s6Q.js} +2 -2
- package/dist/client/assets/{use-atom-command-BHmF32aL.js → use-atom-command-BEpD82FZ.js} +2 -2
- package/dist/client/assets/{useAriaLabelledBy-BinWYOc0.js → useAriaLabelledBy-D6y1qpkp.js} +2 -2
- package/dist/client/assets/{useHandleNewThread-Tv2D0mTw.js → useHandleNewThread-6AAzzJsA.js} +2 -2
- package/dist/client/assets/{useLocation-BQwksr61.js → useLocation-X2uUveT9.js} +2 -2
- package/dist/client/assets/useNavigate-B7cVsvjL.js +2 -0
- package/dist/client/assets/{useNavigateBack-D2S1CDHR.js → useNavigateBack-DoGrCk85.js} +2 -2
- package/dist/client/assets/{useParams-D_8gJiai.js → useParams-Bschqkhl.js} +2 -2
- package/dist/client/assets/{usePermissionStatus-Bl_cAihc.js → usePermissionStatus-DFa5P3Vr.js} +2 -2
- package/dist/client/assets/{usePullRequestActions-DscMhi-m.js → usePullRequestActions-FCnq9KIj.js} +2 -2
- package/dist/client/assets/{useRegisterFieldControl-Bp078Il-.js → useRegisterFieldControl-BgyE4_OV.js} +2 -2
- package/dist/client/assets/{useScopedModelAvailability-BP4GoHk-.js → useScopedModelAvailability-B8VSCR9i.js} +2 -2
- package/dist/client/assets/{useSettings-DUgjfqYw.js → useSettings-CUN8qNLl.js} +2 -2
- package/dist/client/assets/{useT3ConnectAuthPrompt-D0cW1Kb6.js → useT3ConnectAuthPrompt-BgqISbBe.js} +2 -2
- package/dist/client/assets/{utils-Dx_TSvdC.js → utils-BgVDKR83.js} +2 -2
- package/dist/client/assets/{vcsRefInvalidation-CRBfa6Wz.js → vcsRefInvalidation-BWvsbPLB.js} +2 -2
- package/dist/client/assets/{vennDiagram-4TSXK5OY-BVgFdMgp.js → vennDiagram-4TSXK5OY-BN0NlVtY.js} +2 -2
- package/dist/client/assets/{wardley-WFR3VGLG-Dmh19KFW.js → wardley-WFR3VGLG-DWpJUQkf.js} +1 -1
- package/dist/client/assets/{wardleyDiagram-VM6X3IG4-CLjnvp-z.js → wardleyDiagram-VM6X3IG4-C_2_0OtT.js} +2 -2
- package/dist/client/assets/{welcome-BcEvYhrg.js → welcome-CT583VDG.js} +2 -2
- package/dist/client/assets/{xychartDiagram-S5SC5T6Z-CmyAZ93b.js → xychartDiagram-S5SC5T6Z-gSixBfkr.js} +2 -2
- package/dist/client/index.html +1 -1
- package/package.json +1 -1
- package/dist/client/assets/AlertDialogRoot-DYtW2IF3.js +0 -2
- package/dist/client/assets/Input-Cr3X6dPy.js +0 -2
- package/dist/client/assets/architecture-7GRP2DOG-Cre3v_DI.js +0 -1
- package/dist/client/assets/channel-DQC0VAAf.js +0 -2
- package/dist/client/assets/classDiagram-ZZMXUADV-BnsjDrR7.js +0 -2
- package/dist/client/assets/classDiagram-v2-VYDZK3BY-BnsjDrR7.js +0 -2
- package/dist/client/assets/eventmodeling-NTZA5JFV-an9DCCTW.js +0 -1
- package/dist/client/assets/flowDiagram-HODETNUW-pchK5tHw.js +0 -1
- package/dist/client/assets/railroad-abnf-HS5TGJTU-Dx3SBIg8.js +0 -1
- package/dist/client/assets/railroad-ebnf-LZEXJU2U-DqrIX1EX.js +0 -1
- package/dist/client/assets/railroad-peg-WCYAUIDC-zKUem5fh.js +0 -1
- package/dist/client/assets/settings.archived-C3Vs8tIa.js +0 -2
- package/dist/client/assets/settings.providers-CqMvOZmv.js +0 -3
- package/dist/client/assets/stateDiagram-v2-MP3YSRHH-Dy0yVJgc.js +0 -2
- package/dist/client/assets/swimlanesDiagram-VR7AAH4N-CPHF5kgn.js +0 -9
- package/dist/client/assets/useNavigate-LjcLtV_e.js +0 -2
package/dist/client/assets/{usePermissionStatus-Bl_cAihc.js → usePermissionStatus-DFa5P3Vr.js}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{r as t}from"./Icon-l19w4AjM.js";import{NE as n,Td as r,lE as i,sr as a}from"./utils-
|
|
2
|
-
//# sourceMappingURL=usePermissionStatus-
|
|
1
|
+
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{r as t}from"./Icon-l19w4AjM.js";import{NE as n,Td as r,lE as i,sr as a}from"./utils-BgVDKR83.js";var o=n(),s=e(i(),1);function c(e){let t=(0,o.c)(7),{permissions:n,busy:i}=e,c=i!==void 0&&i,l;if(t[0]!==c||t[1]!==n){let e;t[3]===c?e=t[4]:(e=e=>(0,s.jsxs)(`div`,{className:`flex items-center gap-3 rounded-lg border px-3 py-2`,children:[e.icon,(0,s.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,s.jsx)(`p`,{className:`font-medium`,children:e.title}),(0,s.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e.description})]}),e.granted?(0,s.jsxs)(`span`,{role:`status`,className:`flex items-center gap-1 text-xs text-success`,children:[(0,s.jsx)(r,{className:`size-4`,"aria-hidden":`true`}),`Allowed`]}):(0,s.jsx)(a,{size:`xs`,variant:`outline`,disabled:c,onClick:e.onAllow,children:`Allow`})]},e.id),t[3]=c,t[4]=e),l=n.map(e),t[0]=c,t[1]=n,t[2]=l}else l=t[2];let u;return t[5]===l?u=t[6]:(u=(0,s.jsx)(`div`,{className:`space-y-2`,children:l}),t[5]=l,t[6]=u),u}function l(e){let t=(0,o.c)(9),n,r,i,c;t[0]===e?(n=t[1],r=t[2],i=t[3],c=t[4]):({ready:r,busy:i,children:c,...n}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=c);let l=i!==void 0&&i,u=c===void 0?`Continue`:c,d=!r||l,f;return t[5]!==u||t[6]!==n||t[7]!==d?(f=(0,s.jsx)(a,{...n,disabled:d,children:u}),t[5]=u,t[6]=n,t[7]=d,t[8]=f):f=t[8],f}var u=e(t(),1);function d(e,t,n){let r=(0,o.c)(12),i=n===void 0||n,[a,s]=(0,u.useState)(t),[c,l]=(0,u.useState)(null),d=(0,u.useEffectEvent)(e),f;r[0]!==d||r[1]!==i?(f=()=>{if(!i)return;let e=!1,t=!1,n=async()=>{if(!(e||t||document.visibilityState===`hidden`)){t=!0;try{let t=await d();e||(s(t),l(null))}catch{e||l(`Could not check permissions. We'll try again automatically.`)}t=!1}};n();let r=window.setInterval(()=>void n(),1500);return window.addEventListener(`focus`,n),document.addEventListener(`visibilitychange`,n),()=>{e=!0,window.clearInterval(r),window.removeEventListener(`focus`,n),document.removeEventListener(`visibilitychange`,n)}},r[0]=d,r[1]=i,r[2]=f):f=r[2];let p;r[3]===i?p=r[4]:(p=[i],r[3]=i,r[4]=p),(0,u.useEffect)(f,p);let m;r[5]!==c||r[6]!==a?(m=e=>c===null&&e.every(e=>a[e]),r[5]=c,r[6]=a,r[7]=m):m=r[7];let h;return r[8]!==c||r[9]!==a||r[10]!==m?(h={status:a,error:c,isReady:m},r[8]=c,r[9]=a,r[10]=m,r[11]=h):h=r[11],h}export{c as n,l as r,d as t};
|
|
2
|
+
//# sourceMappingURL=usePermissionStatus-DFa5P3Vr.js.map
|
package/dist/client/assets/{usePullRequestActions-DscMhi-m.js → usePullRequestActions-FCnq9KIj.js}
RENAMED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{r as t}from"./Icon-l19w4AjM.js";import{D as n,Go as r,Gs as i,Lc as a,NE as o,NT as s,Ss as c,Yo as l,__ as u,fw as d,k_ as f,ms as p,w_ as m,ys as h}from"./utils-Dx_TSvdC.js";import{M as g,N as _,W as v}from"./runtime-D102A-Bu.js";import{a as y,i as b}from"./vcsRefInvalidation-CRBfa6Wz.js";import{C as x}from"./entities-CyQRuOur.js";import{t as ee}from"./runtime-BjJBBHTp.js";import{i as S}from"./toast-SPJYfh08.js";import{s as C}from"./environments-CjU9SGCA.js";import{i as w,n as T}from"./session-Dh8maTO3.js";import{n as E}from"./query-CRswjQ7f.js";import{t as D}from"./use-atom-command-BHmF32aL.js";import{f as te,s as O}from"./useSettings-DUgjfqYw.js";import{d as k,l as A,u as j}from"./queries-DMjiMwzO.js";import{t as M}from"./sourceControl-DXwrIEUZ.js";import{C as N,r as P}from"./pullRequests-tIwkUcK2.js";import{R as F,b as ne,y as re}from"./pullRequestDetail.logic-CGUKFcHo.js";import{c as ie,f as ae,i as I,s as L}from"./p4ProjectFile-Dqppy-Sd.js";import{t as R}from"./sidebarProjectGrouping-BRC9yCnW.js";import{n as z}from"./useHandleNewThread-Tv2D0mTw.js";var B=e(t(),1),V=o();function H(e){return{pullRequestResolution:_(e,{label:`environment-data:git:resolve-pull-request`,tag:a.gitResolvePullRequest}),preparePullRequestThread:g(e,{label:`environment-data:git:prepare-pull-request-thread`,tag:a.gitPreparePullRequestThread,scheduler:y,concurrency:b})}}var U=H(ee),W={init:`init`,pull:`pull`,publishRepository:`publish_repository`,runStackedAction:`run_change_request`,preparePullRequestThread:`prepare_pull_request_thread`};function G(e){let t=w(e.scope.environmentId,m),n=W[e.kind],i=l(A.stateAtom(e.scope)),a=i.operation===n,o=(0,B.useCallback)(()=>{A.resetError(r,e.scope,n)},[e.scope,n]),s=(0,B.useCallback)(async(...t)=>{if(e.scope.environmentId===null||!T(e.scope.environmentId,`source-control:write`))return p(d(new f({requiredScope:m,message:`This connection cannot change source control.`})));let i=async()=>{let n=await e.action(...t);return h(n)&&e.onSuccess?.(),n};return e.managedExternally===!0?i():A.track(r,e.scope,{operation:n,label:e.label},i)},[e.action,e.label,e.managedExternally,e.onSuccess,e.scope,n]);return{isAllowed:t,error:a?i.error:null,isPending:a&&i.isRunning,resetError:o,run:s}}function K(e){return e.environmentId===null||e.cwd===null?null:{environmentId:e.environmentId,cwd:e.cwd}}function q(e,t){let n=(0,V.c)(6),r;n[0]===e?r=n[1]:(r=A.stateAtom(e),n[0]=e,n[1]=r);let i=l(r),a;return n[2]!==t||n[3]!==i.isRunning||n[4]!==i.operation?(a=i.isRunning&&i.operation!==null&&t.some(e=>W[e]===i.operation),n[2]=t,n[3]=i.isRunning,n[4]=i.operation,n[5]=a):a=n[5],a}function J(e){let t=(0,V.c)(7),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n={reportFailure:!1},t[0]=n):n=t[0];let r=D(j.init,n),i;t[1]!==r||t[2]!==e?(i=async()=>{let t=K(e);return t===null?p(d(new k({operation:`init`,environmentId:e.environmentId,cwd:e.cwd}))):r({environmentId:t.environmentId,input:{cwd:t.cwd}})},t[1]=r,t[2]=e,t[3]=i):i=t[3];let a=i,o;return t[4]!==a||t[5]!==e?(o={kind:`init`,label:`Initializing repository`,scope:e,action:a},t[4]=a,t[5]=e,t[6]=o):o=t[6],G(o)}function oe(e){let t=(0,V.c)(11),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n={reportFailure:!1},t[0]=n):n=t[0];let r=D(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=E(i),o;t[4]!==r||t[5]!==e?(o=async()=>{let t=K(e);return t===null?p(d(new k({operation:`pull`,environmentId:e.environmentId,cwd:e.cwd}))):r({environmentId:t.environmentId,input:{cwd:t.cwd}})},t[4]=r,t[5]=e,t[6]=o):o=t[6];let s=o,c;return t[7]!==s||t[8]!==e||t[9]!==a.refresh?(c={kind:`pull`,label:`Pulling latest changes...`,scope:e,action:s,onSuccess:a.refresh},t[7]=s,t[8]=e,t[9]=a.refresh,t[10]=c):c=t[10],G(c)}function se(e){let t=(0,V.c)(13),n;t[0]===e?n=t[1]:(n=A.runStackedAction(e),t[0]=e,t[1]=n);let r;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(r={reportFailure:!1},t[2]=r):r=t[2];let i=D(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=E(a),s;t[6]!==i||t[7]!==e?(s=async t=>K(e)===null?p(d(new k({operation:`run_change_request`,environmentId:e.environmentId,cwd:e.cwd}))):i(t),t[6]=i,t[7]=e,t[8]=s):s=t[8];let c=s,l;return t[9]!==c||t[10]!==e||t[11]!==o.refresh?(l={kind:`runStackedAction`,label:`Running source control action`,scope:e,action:c,onSuccess:o.refresh,managedExternally:!0},t[9]=c,t[10]=e,t[11]=o.refresh,t[12]=l):l=t[12],G(l)}function ce(e){let t=(0,V.c)(11),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n={reportFailure:!1},t[0]=n):n=t[0];let r=D(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=E(i),o;t[4]!==r||t[5]!==e?(o=async t=>{let n=K(e);return n===null?p(d(new k({operation:`publish_repository`,environmentId:e.environmentId,cwd:e.cwd}))):r({environmentId:n.environmentId,input:{cwd:n.cwd,...t}})},t[4]=r,t[5]=e,t[6]=o):o=t[6];let s=o,c;return t[7]!==s||t[8]!==e||t[9]!==a.refresh?(c={kind:`publishRepository`,label:`Publishing repository`,scope:e,action:s,onSuccess:a.refresh},t[7]=s,t[8]=e,t[9]=a.refresh,t[10]=c):c=t[10],G(c)}function Y(e){let t=(0,V.c)(7),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n={reportFailure:!1},t[0]=n):n=t[0];let r=D(U.preparePullRequestThread,n),i;t[1]!==r||t[2]!==e?(i=async t=>{let n=K(e);return n===null?p(d(new k({operation:`prepare_pull_request_thread`,environmentId:e.environmentId,cwd:e.cwd}))):t.mode===`worktree`&&t.threadId!==void 0&&!T(n.environmentId,`orchestration:operate`)?p(d(new f({requiredScope:u,message:`This connection cannot change threads.`}))):r({environmentId:n.environmentId,input:{cwd:n.cwd,reference:t.reference,mode:t.mode,...t.threadId?{threadId:t.threadId}:{}}})},t[1]=r,t[2]=e,t[3]=i):i=t[3];let a=i,o;return t[4]!==a||t[5]!==e?(o={kind:`preparePullRequestThread`,label:`Preparing pull request thread`,scope:e,action:a},t[4]=a,t[5]=e,t[6]=o):o=t[6],G(o)}function X(e){return e.environmentId===null||e.cwd===null||e.reference===null?null:s(c(r.get(U.pullRequestResolution({environmentId:e.environmentId,input:{cwd:e.cwd,reference:e.reference}}))))}function le(e){let t=(0,V.c)(12),n;t[0]!==e.cwd||t[1]!==e.environmentId||t[2]!==e.reference?(n=e.environmentId!==null&&e.cwd!==null&&e.reference!==null?U.pullRequestResolution({environmentId:e.environmentId,input:{cwd:e.cwd,reference:e.reference}}):null,t[0]=e.cwd,t[1]=e.environmentId,t[2]=e.reference,t[3]=n):n=t[3];let r=E(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=>I(e,t).settings.pullRequestMergeMethod,n[0]=t,n[1]=r);let i=te(e,r),a=O(de),o=O(ae),s=x(),c=C(),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=R({projects:s,settings:o,primaryEnvironmentId:c}).get(ie(n))??L(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=D(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);S.add({type:`success`,title:fe[a]}),n?.(a)}catch(e){S.add({type:`error`,title:pe[a],description:F(e,Z[a])})}finally{s.current=!1,o(!1)}}}}}function Q(e){let t=D(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))}})),S.add({type:s.length>0?`error`:`success`,title:s.length>0?`Closed ${o} of ${a.length} pull requests`:`Closed ${o} pull request${o===1?``:`s`}`,...s.length>0?{description:s.slice(0,3).join(`
|
|
1
|
+
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{r as t}from"./Icon-l19w4AjM.js";import{D as n,Go as r,Gs as i,Lc as a,NE as o,NT as s,Ss as c,Yo as l,__ as u,fw as d,k_ as f,ms as p,w_ as m,ys as h}from"./utils-BgVDKR83.js";import{M as g,N as _,W as v}from"./runtime-B7jXrsPs.js";import{a as y,i as b}from"./vcsRefInvalidation-BWvsbPLB.js";import{C as x}from"./entities-Cri9JXzU.js";import{t as ee}from"./runtime-B75ae48c.js";import{i as S}from"./toast-e2DHftFl.js";import{s as C}from"./environments-CXLCfPlP.js";import{i as w,n as T}from"./session-eKfJi_Kx.js";import{n as E}from"./query-1tRB9OB0.js";import{t as D}from"./use-atom-command-BEpD82FZ.js";import{f as te,s as O}from"./useSettings-CUN8qNLl.js";import{d as k,l as A,u as j}from"./queries-DqFudp6N.js";import{t as M}from"./sourceControl-C-R8wmTp.js";import{C as N,r as P}from"./pullRequests-DDmSd4bP.js";import{R as F,b as ne,y as re}from"./pullRequestDetail.logic-B2AL8Xka.js";import{c as ie,f as ae,i as I,s as L}from"./p4ProjectFile-CAKJOMUN.js";import{t as R}from"./sidebarProjectGrouping-BpwyF0h8.js";import{n as z}from"./useHandleNewThread-6AAzzJsA.js";var B=e(t(),1),V=o();function H(e){return{pullRequestResolution:_(e,{label:`environment-data:git:resolve-pull-request`,tag:a.gitResolvePullRequest}),preparePullRequestThread:g(e,{label:`environment-data:git:prepare-pull-request-thread`,tag:a.gitPreparePullRequestThread,scheduler:y,concurrency:b})}}var U=H(ee),W={init:`init`,pull:`pull`,publishRepository:`publish_repository`,runStackedAction:`run_change_request`,preparePullRequestThread:`prepare_pull_request_thread`};function G(e){let t=w(e.scope.environmentId,m),n=W[e.kind],i=l(A.stateAtom(e.scope)),a=i.operation===n,o=(0,B.useCallback)(()=>{A.resetError(r,e.scope,n)},[e.scope,n]),s=(0,B.useCallback)(async(...t)=>{if(e.scope.environmentId===null||!T(e.scope.environmentId,`source-control:write`))return p(d(new f({requiredScope:m,message:`This connection cannot change source control.`})));let i=async()=>{let n=await e.action(...t);return h(n)&&e.onSuccess?.(),n};return e.managedExternally===!0?i():A.track(r,e.scope,{operation:n,label:e.label},i)},[e.action,e.label,e.managedExternally,e.onSuccess,e.scope,n]);return{isAllowed:t,error:a?i.error:null,isPending:a&&i.isRunning,resetError:o,run:s}}function K(e){return e.environmentId===null||e.cwd===null?null:{environmentId:e.environmentId,cwd:e.cwd}}function q(e,t){let n=(0,V.c)(6),r;n[0]===e?r=n[1]:(r=A.stateAtom(e),n[0]=e,n[1]=r);let i=l(r),a;return n[2]!==t||n[3]!==i.isRunning||n[4]!==i.operation?(a=i.isRunning&&i.operation!==null&&t.some(e=>W[e]===i.operation),n[2]=t,n[3]=i.isRunning,n[4]=i.operation,n[5]=a):a=n[5],a}function J(e){let t=(0,V.c)(7),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n={reportFailure:!1},t[0]=n):n=t[0];let r=D(j.init,n),i;t[1]!==r||t[2]!==e?(i=async()=>{let t=K(e);return t===null?p(d(new k({operation:`init`,environmentId:e.environmentId,cwd:e.cwd}))):r({environmentId:t.environmentId,input:{cwd:t.cwd}})},t[1]=r,t[2]=e,t[3]=i):i=t[3];let a=i,o;return t[4]!==a||t[5]!==e?(o={kind:`init`,label:`Initializing repository`,scope:e,action:a},t[4]=a,t[5]=e,t[6]=o):o=t[6],G(o)}function oe(e){let t=(0,V.c)(11),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n={reportFailure:!1},t[0]=n):n=t[0];let r=D(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=E(i),o;t[4]!==r||t[5]!==e?(o=async()=>{let t=K(e);return t===null?p(d(new k({operation:`pull`,environmentId:e.environmentId,cwd:e.cwd}))):r({environmentId:t.environmentId,input:{cwd:t.cwd}})},t[4]=r,t[5]=e,t[6]=o):o=t[6];let s=o,c;return t[7]!==s||t[8]!==e||t[9]!==a.refresh?(c={kind:`pull`,label:`Pulling latest changes...`,scope:e,action:s,onSuccess:a.refresh},t[7]=s,t[8]=e,t[9]=a.refresh,t[10]=c):c=t[10],G(c)}function se(e){let t=(0,V.c)(13),n;t[0]===e?n=t[1]:(n=A.runStackedAction(e),t[0]=e,t[1]=n);let r;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(r={reportFailure:!1},t[2]=r):r=t[2];let i=D(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=E(a),s;t[6]!==i||t[7]!==e?(s=async t=>K(e)===null?p(d(new k({operation:`run_change_request`,environmentId:e.environmentId,cwd:e.cwd}))):i(t),t[6]=i,t[7]=e,t[8]=s):s=t[8];let c=s,l;return t[9]!==c||t[10]!==e||t[11]!==o.refresh?(l={kind:`runStackedAction`,label:`Running source control action`,scope:e,action:c,onSuccess:o.refresh,managedExternally:!0},t[9]=c,t[10]=e,t[11]=o.refresh,t[12]=l):l=t[12],G(l)}function ce(e){let t=(0,V.c)(11),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n={reportFailure:!1},t[0]=n):n=t[0];let r=D(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=E(i),o;t[4]!==r||t[5]!==e?(o=async t=>{let n=K(e);return n===null?p(d(new k({operation:`publish_repository`,environmentId:e.environmentId,cwd:e.cwd}))):r({environmentId:n.environmentId,input:{cwd:n.cwd,...t}})},t[4]=r,t[5]=e,t[6]=o):o=t[6];let s=o,c;return t[7]!==s||t[8]!==e||t[9]!==a.refresh?(c={kind:`publishRepository`,label:`Publishing repository`,scope:e,action:s,onSuccess:a.refresh},t[7]=s,t[8]=e,t[9]=a.refresh,t[10]=c):c=t[10],G(c)}function Y(e){let t=(0,V.c)(7),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n={reportFailure:!1},t[0]=n):n=t[0];let r=D(U.preparePullRequestThread,n),i;t[1]!==r||t[2]!==e?(i=async t=>{let n=K(e);return n===null?p(d(new k({operation:`prepare_pull_request_thread`,environmentId:e.environmentId,cwd:e.cwd}))):t.mode===`worktree`&&t.threadId!==void 0&&!T(n.environmentId,`orchestration:operate`)?p(d(new f({requiredScope:u,message:`This connection cannot change threads.`}))):r({environmentId:n.environmentId,input:{cwd:n.cwd,reference:t.reference,mode:t.mode,...t.threadId?{threadId:t.threadId}:{}}})},t[1]=r,t[2]=e,t[3]=i):i=t[3];let a=i,o;return t[4]!==a||t[5]!==e?(o={kind:`preparePullRequestThread`,label:`Preparing pull request thread`,scope:e,action:a},t[4]=a,t[5]=e,t[6]=o):o=t[6],G(o)}function X(e){return e.environmentId===null||e.cwd===null||e.reference===null?null:s(c(r.get(U.pullRequestResolution({environmentId:e.environmentId,input:{cwd:e.cwd,reference:e.reference}}))))}function le(e){let t=(0,V.c)(12),n;t[0]!==e.cwd||t[1]!==e.environmentId||t[2]!==e.reference?(n=e.environmentId!==null&&e.cwd!==null&&e.reference!==null?U.pullRequestResolution({environmentId:e.environmentId,input:{cwd:e.cwd,reference:e.reference}}):null,t[0]=e.cwd,t[1]=e.environmentId,t[2]=e.reference,t[3]=n):n=t[3];let r=E(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=>I(e,t).settings.pullRequestMergeMethod,n[0]=t,n[1]=r);let i=te(e,r),a=O(de),o=O(ae),s=x(),c=C(),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=R({projects:s,settings:o,primaryEnvironmentId:c}).get(ie(n))??L(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=D(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);S.add({type:`success`,title:fe[a]}),n?.(a)}catch(e){S.add({type:`error`,title:pe[a],description:F(e,Z[a])})}finally{s.current=!1,o(!1)}}}}}function Q(e){let t=D(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))}})),S.add({type:s.length>0?`error`:`success`,title:s.length>0?`Closed ${o} of ${a.length} pull requests`:`Closed ${o} pull request${o===1?``:`s`}`,...s.length>0?{description:s.slice(0,3).join(`
|
|
2
2
|
`)}:{}})},[e,t]),closingKeys:r}}var $=new Map;function he(e){let t=(0,V.c)(21),{environmentId:r,detail:a}=e,o=z(),s=a?.workspaceRoot??null,c;t[0]!==r||t[1]!==s?(c={environmentId:r,cwd:s},t[0]=r,t[1]=s,t[2]=c):c=t[2];let l=Y(c),[u,d]=(0,B.useState)(null),f;t[3]===o?f=t[4]:(f=async(e,t,r)=>{let i=r??await o(e).then(xe,be);if(i===null)return null;let a=n.getState();if(t===null)return i;let s=a.getComposerDraft(i.draftId),c=s?.reviewComments??[],l=re({prompt:s?.prompt??``,lastHandoffPrompt:$.get(i.draftId)},t.prompt);return $.set(i.draftId,t.prompt),a.setPrompt(i.draftId,l),a.setReviewComments(i.draftId,ne(c,t.reviewComments??[])),i},t[3]=o,t[4]=f);let p=f,m;t[5]!==a||t[6]!==r||t[7]!==u||t[8]!==p?(m=async(e,t)=>{if(!a||u!==null)return;d(e);let n=i(r,a.projectId),o=await p(n,t);if(d(null),o===null){S.add({type:`error`,title:`Could not open a thread`,description:`Try again from the project, or open a thread first.`});return}S.add({type:`success`,title:`Asked in a thread`,description:t.prompt.length>0?`The question is in the composer — read it over, then send.`:`The pull request is in the composer — type your question, then send.`})},t[5]=a,t[6]=r,t[7]=u,t[8]=p,t[9]=m):m=t[9];let h=m,g;t[10]!==a||t[11]!==r||t[12]!==u||t[13]!==o||t[14]!==p||t[15]!==l?(g=async(e,t,n)=>{let s=n===void 0?`worktree`:n;if(!a||u!==null)return;d(e);let c=S.add({type:`loading`,title:`Preparing the pull request checkout...`}),f=i(r,a.projectId),m=await o(f).then(ye,ve);if(m===null){d(null),S.update(c,{type:`error`,title:`Could not open a thread for the checkout`,description:`Try again from the project, or open a thread first.`});return}let h=await l.run({reference:a.url,mode:s,threadId:m.threadId});if(h._tag===`Failure`){d(null);let e=l.error instanceof Error?l.error.message:null;S.update(c,{type:`error`,title:`Could not prepare the pull request checkout`,...e?{description:e}:{}});return}if(!await o(f,{branch:h.value.branch,worktreePath:h.value.worktreePath,envMode:h.value.worktreePath===null?`local`:`worktree`}).then(_e,ge)){d(null),S.update(c,{type:`error`,title:`Checked out, but the thread stayed where it was`,description:`The checkout is ready on \`${h.value.branch}\`. Point a thread at it from the branch picker, then ask again.`});return}d(null);let g={type:`warning`,title:`Checked out, but not on the latest commits`,description:`The checkout could not be moved onto the pull request's latest commits, so the code there is older than the pull request. Uncommitted work or local commits keep it where it is.`};if(t===null){S.update(c,h.value.isOnPullRequestHead?{type:`success`,title:s===`local`?`Checked out here`:`Checked out`,description:s===`local`?`This repository is on the pull request's branch, with a thread open on it.`:`The pull request is in its own worktree, with a thread open on it.`}:g);return}await p(f,t,m),S.update(c,h.value.isOnPullRequestHead?{type:`success`,title:`Checkout ready`,description:`The task is in the composer — read it over, then send.`}:g)},t[10]=a,t[11]=r,t[12]=u,t[13]=o,t[14]=p,t[15]=l,t[16]=g):g=t[16];let _=g,v;return t[17]!==u||t[18]!==h||t[19]!==_?(v={handoff:u,startAsk:h,startHandoff:_},t[17]=u,t[18]=h,t[19]=_,t[20]=v):v=t[20],v}function ge(){return!1}function _e(e){return e!==null}function ve(){return null}function ye(e){return e}function be(){return null}function xe(e){return e}export{X as a,le as c,J as d,oe as f,he as i,q as l,Q as n,se as o,ue as r,Y as s,me as t,ce as u};
|
|
3
|
-
//# sourceMappingURL=usePullRequestActions-
|
|
3
|
+
//# sourceMappingURL=usePullRequestActions-FCnq9KIj.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{r as t}from"./Icon-l19w4AjM.js";import{Fa as n,Ln as r}from"./utils-
|
|
2
|
-
//# sourceMappingURL=useRegisterFieldControl-
|
|
1
|
+
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{r as t}from"./Icon-l19w4AjM.js";import{Fa as n,Ln as r}from"./utils-BgVDKR83.js";var i=e(t());function a(e,t,a,o,s=!0){let{registerFieldControl:c}=r(),l=i.useRef(null);l.current||=Symbol(),n(()=>{let n=l.current;if(n&&s)return c(n,{controlRef:e,getValue:o,id:t,value:a}),()=>{c(n,void 0)}},[e,s,o,t,c,a])}export{a as t};
|
|
2
|
+
//# sourceMappingURL=useRegisterFieldControl-BgyE4_OV.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Ht as e,NE as t,Nt as n,Vt as r}from"./utils-
|
|
2
|
-
//# sourceMappingURL=useScopedModelAvailability-
|
|
1
|
+
import{Ht as e,NE as t,Nt as n,Vt as r}from"./utils-BgVDKR83.js";import{a as i}from"./environments-CXLCfPlP.js";import{i as a}from"./useSettings-CUN8qNLl.js";import{B as o}from"./settingsLayout-B_Bq9Cq9.js";var s=t();function c(t,c){let l=(0,s.c)(5),{targets:u}=o(),{environments:d}=i(),f;return l[0]!==c||l[1]!==d||l[2]!==t||l[3]!==u?(f=(i,o)=>{let s=c.find(e=>e.instanceId===i);for(let c of u){let l=d.find(e=>e.environmentId===c.environmentId),u=l?.serverConfig;if(!u)continue;let f=r(e(u.providers),c.settings,c.projectId).find(e=>e.instanceId===i),p=n(a(c.settings,t),u.providers).get(i);if(!f?.enabled||!f.isAvailable||f.driverKind!==s?.driverKind||!p?.some(e=>e.slug===o&&!e.isUnavailable))return`This model is unavailable on ${l?.label??`a selected environment`}. Select that environment to choose its model separately.`}return null},l[0]=c,l[1]=d,l[2]=t,l[3]=u,l[4]=f):f=l[4],f}export{c as t};
|
|
2
|
+
//# sourceMappingURL=useScopedModelAvailability-B8VSCR9i.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{r as t}from"./Icon-l19w4AjM.js";import{$o as n,$w as r,$y as i,By as a,C_ as o,Ch as s,Cs as c,Cy as l,Dc as u,Fb as d,Fg as f,Go as ee,Gy as p,Iy as m,Mb as te,NE as ne,NT as re,Ng as ie,Oy as ae,Pb as oe,Rs as se,Sb as ce,Ss as le,Th as ue,Ts as de,Xo as fe,Yo as h,Yw as g,Zw as _,Zy as pe,_l as me,ah as he,bh as ge,ch as _e,db as ve,dh as ye,gl as be,hh as xe,i_ as Se,ib as Ce,ih as we,j_ as Te,jb as Ee,kb as De,n_ as Oe,qy as ke,r_ as Ae,rb as je,tS as Me,th as Ne,uh as Pe,wh as Fe,xb as Ie,ys as Le}from"./utils-Dx_TSvdC.js";import{R as Re,W as ze,_t as v}from"./runtime-D102A-Bu.js";import{T as Be}from"./runtime-BjJBBHTp.js";import{i as y}from"./toast-SPJYfh08.js";import{a as Ve,o as He}from"./environments-CjU9SGCA.js";import{f as b,u as Ue}from"./server-DTGT8WWf.js";import{i as We,n as Ge,t as Ke}from"./session-Dh8maTO3.js";import{t as qe}from"./use-atom-command-BHmF32aL.js";import{B as Je,C as Ye,F as Xe,N as Ze,P as Qe,V as $e,b as et,c as tt,i as x,k as nt,l as rt,n as it,o as at,r as ot,v as st,w as ct,x as lt}from"./themePalette-9CODTNe7.js";var S=e(t(),1),C=ne(),ut={status:`idle`},w=ut,T=null,E=[],D=0,dt=new Set;function O(e){w=e;for(let e of dt)e()}function ft(e){T?.resolve(e);for(let t of E)t.resolve(e);T=null,E=[]}function pt(){return w}function mt(e){return dt.add(e),()=>{dt.delete(e)}}function ht(){D+=1;let e=!0;return()=>{e&&(e=!1,D=Math.max(0,D-1),D===0&&(ft(!1),O(ut)))}}function gt(e,t){if(D!==0)return new Promise(n=>{let r={message:e,variant:t?.variant??`default`,resolve:n};if(T||w.status===`closing`){E.push(r);return}T=r,O({status:`confirming`,message:e,variant:r.variant})})}function _t(){return w.status!==`idle`||T!==null||E.length>0}function vt(e){if(w.status!==`confirming`||!T)return;let t=T;T=null,t.resolve(e),O({status:`closing`,message:w.message,variant:w.variant})}function yt(){if(w.status!==`closing`)return;let e=E.shift();if(!e){O(ut);return}T=e,O({status:`confirming`,message:e.message,variant:e.variant})}var bt={Ctrl:`⌃`,Alt:`⌥`,Shift:`⇧`,Super:`⌘`,CmdOrCtrl:`⌘`};function xt(e,t=navigator.platform){let n=e.split(`+`),r=n.pop()??``;return u(t)?`${n.map(e=>bt[e]??e).join(``)}${r}`:[...n.map(e=>e===`CmdOrCtrl`?`Ctrl`:e===`Super`?`Meta`:e),r].join(`+`)}var St=`http://www.w3.org/2000/svg`,Ct={archive:[{tag:`rect`,attrs:{width:`20`,height:`5`,x:`2`,y:`3`,rx:`1`}},{tag:`path`,attrs:{d:`M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8`}},{tag:`path`,attrs:{d:`M10 12h4`}}],check:[{tag:`path`,attrs:{d:`M20 6 9 17l-5-5`}}],timer:[{tag:`line`,attrs:{x1:`10`,x2:`14`,y1:`2`,y2:`2`}},{tag:`line`,attrs:{x1:`12`,x2:`15`,y1:`14`,y2:`11`}},{tag:`circle`,attrs:{cx:`12`,cy:`14`,r:`8`}}],"chevron-right":[{tag:`path`,attrs:{d:`m9 19 7-7-7-7`}}],"circle-check":[{tag:`circle`,attrs:{cx:`12`,cy:`12`,r:`10`}},{tag:`path`,attrs:{d:`m9 12 2 2 4-4`}}],clock:[{tag:`path`,attrs:{d:`M12 6v6l4 2`}},{tag:`circle`,attrs:{cx:`12`,cy:`12`,r:`10`}}],pencil:[{tag:`path`,attrs:{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`}},{tag:`path`,attrs:{d:`m15 5 4 4`}}],copy:[{tag:`rect`,attrs:{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`}},{tag:`path`,attrs:{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`}}],folder:[{tag:`path`,attrs:{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`}}],"git-branch":[{tag:`line`,attrs:{x1:`6`,x2:`6`,y1:`3`,y2:`15`}},{tag:`circle`,attrs:{cx:`18`,cy:`6`,r:`3`}},{tag:`circle`,attrs:{cx:`6`,cy:`18`,r:`3`}},{tag:`path`,attrs:{d:`M18 9a9 9 0 0 1-9 9`}}],eye:[{tag:`path`,attrs:{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`}},{tag:`circle`,attrs:{cx:`12`,cy:`12`,r:`3`}}],"app-window":[{tag:`rect`,attrs:{x:`2`,y:`4`,width:`20`,height:`16`,rx:`2`}},{tag:`path`,attrs:{d:`M10 4v4`}},{tag:`path`,attrs:{d:`M2 8h20`}},{tag:`path`,attrs:{d:`M6 4v4`}}],"arrow-up-right":[{tag:`path`,attrs:{d:`M7 7h10v10`}},{tag:`path`,attrs:{d:`M7 17 17 7`}}],"external-link":[{tag:`path`,attrs:{d:`M15 3h6v6`}},{tag:`path`,attrs:{d:`M10 14 21 3`}},{tag:`path`,attrs:{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`}}],link:[{tag:`path`,attrs:{d:`M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71`}},{tag:`path`,attrs:{d:`M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71`}}],list:[{tag:`path`,attrs:{d:`M3 5h.01`}},{tag:`path`,attrs:{d:`M3 12h.01`}},{tag:`path`,attrs:{d:`M3 19h.01`}},{tag:`path`,attrs:{d:`M8 5h13`}},{tag:`path`,attrs:{d:`M8 12h13`}},{tag:`path`,attrs:{d:`M8 19h13`}}],share:[{tag:`path`,attrs:{d:`M12 2v13`}},{tag:`path`,attrs:{d:`m16 6-4-4-4 4`}},{tag:`path`,attrs:{d:`M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8`}}],x:[{tag:`path`,attrs:{d:`M18 6 6 18`}},{tag:`path`,attrs:{d:`m6 6 12 12`}}],hash:[{tag:`line`,attrs:{x1:`4`,x2:`20`,y1:`9`,y2:`9`}},{tag:`line`,attrs:{x1:`4`,x2:`20`,y1:`15`,y2:`15`}},{tag:`line`,attrs:{x1:`10`,x2:`8`,y1:`3`,y2:`21`}},{tag:`line`,attrs:{x1:`16`,x2:`14`,y1:`3`,y2:`21`}}],"mail-open":[{tag:`path`,attrs:{d:`M21.2 8.4c.5.38.8.97.8 1.6v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V10a2 2 0 0 1 .8-1.6l8-6a2 2 0 0 1 2.4 0l8 6Z`}},{tag:`path`,attrs:{d:`m22 10-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 10`}}],"message-square-plus":[{tag:`path`,attrs:{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`}},{tag:`path`,attrs:{d:`M12 8v6`}},{tag:`path`,attrs:{d:`M9 11h6`}}],pin:[{tag:`path`,attrs:{d:`M12 17v5`}},{tag:`path`,attrs:{d:`M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z`}}],"pin-off":[{tag:`path`,attrs:{d:`M12 17v5`}},{tag:`path`,attrs:{d:`M15 9.34V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H7.89`}},{tag:`path`,attrs:{d:`m2 2 20 20`}},{tag:`path`,attrs:{d:`M9 9v1.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h11`}}],"refresh-cw":[{tag:`path`,attrs:{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`}},{tag:`path`,attrs:{d:`M21 3v5h-5`}},{tag:`path`,attrs:{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`}},{tag:`path`,attrs:{d:`M8 16H3v5`}}],settings:[{tag:`path`,attrs:{d:`M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.38a2 2 0 0 0-.73-2.73l-.15-.09a2 2 0 0 1-1-1.74v-.51a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z`}},{tag:`circle`,attrs:{cx:`12`,cy:`12`,r:`3`}}],"folder-tree":[{tag:`path`,attrs:{d:`M20 10a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1h-2.5a1 1 0 0 1-.8-.4l-.9-1.2A1 1 0 0 0 15 3h-2a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z`}},{tag:`path`,attrs:{d:`M20 21a1 1 0 0 0 1-1v-3a1 1 0 0 0-1-1h-2.9a1 1 0 0 1-.88-.55l-.42-.85a1 1 0 0 0-.92-.6H13a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z`}},{tag:`path`,attrs:{d:`M3 5a2 2 0 0 0 2 2h3`}},{tag:`path`,attrs:{d:`M3 3v13a2 2 0 0 0 2 2h3`}}],trash:[{tag:`path`,attrs:{d:`M3 6h18`}},{tag:`path`,attrs:{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`}},{tag:`path`,attrs:{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`}},{tag:`line`,attrs:{x1:`10`,x2:`10`,y1:`11`,y2:`17`}},{tag:`line`,attrs:{x1:`14`,x2:`14`,y1:`11`,y2:`17`}}]};function wt(e,t){let n=Ct[e];if(!n||typeof document.createElementNS!=`function`)return null;let r=document.createElementNS(St,`svg`);r.setAttribute(`xmlns`,St),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(St,e.tag);for(let[n,r]of Object.entries(e.attrs))t.setAttribute(n,r);r.appendChild(t)}return r}function Tt(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 Et(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 k=null;function Dt(){return k!==null}function Ot(){k?.(),k=null}function kt(e,t){return new Promise(n=>{let r=document.activeElement instanceof HTMLElement?document.activeElement:null,i=[],a=[],o=!1,s=!1,c=()=>l(null),l=e=>{if(o)return;o=!0,k===c&&(k=null),document.removeEventListener(`keydown`,d),document.removeEventListener(`pointerdown`,f,!0),document.removeEventListener(`contextmenu`,ee,!0);let t=Et(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(),l(null))},f=e=>{s&&!Et(e.target,i)&&l(null)},ee=e=>{s&&!Et(e.target,i)&&(e.preventDefault(),l(null))},p=e=>{for(;i.length>e;)a.pop()?.setAttribute(`aria-expanded`,`false`),i.pop()?.remove()},m=(e,t,n,r,o)=>{p(r);let c=document.createElement(`div`);c.className=`dropdown-glass fixed z-[10000] min-w-56 max-w-sm overflow-hidden rounded-lg bg-clip-padding text-popover-foreground outline-none`,c.style.cssText=`position:fixed;z-index:10000;min-width:14rem;max-width:24rem;overflow:hidden;border-radius:var(--radius-lg);background-clip:padding-box;color:var(--contrast-popover-foreground);outline:none;pointer-events:auto;`,c.style.left=`${t}px`,c.style.top=`${n}px`,c.dataset.level=String(r);let 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 o=t.disabled===!0;a.disabled=o;let c=`flex w-full cursor-default select-none items-center gap-2 rounded-sm px-2 py-1 text-left outline-none transition-colors sm:min-h-7 sm:text-sm min-h-8 text-base`;if(a.className=o?`${c} pointer-events-none cursor-not-allowed text-muted-foreground opacity-64`:n?`${c} text-destructive-foreground hover:bg-destructive/10 hover:text-destructive-foreground`:`${c} text-foreground hover:bg-accent hover:text-accent-foreground`,a.style.cssText=`display:flex;width:100%;min-height:1.75rem;align-items:center;gap:0.5rem;border:0;border-radius:var(--radius-sm);background:transparent;padding:0.25rem 0.5rem;color:var(--contrast-foreground);font-family:var(--font-sans,system-ui,sans-serif);font-size:0.875rem;line-height:1.25rem;text-align:left;cursor:default;`,n&&(a.style.color=`var(--destructive-foreground)`),o&&(a.style.color=`var(--contrast-muted-foreground)`,a.style.opacity=`0.64`,a.style.pointerEvents=`none`),typeof t.checked==`boolean`){a.setAttribute(`role`,`menuitemradio`),a.setAttribute(`aria-checked`,t.checked?`true`:`false`);let e=t.checked?wt(`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=wt(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=xt(t.accelerator),e.setAttribute(`aria-hidden`,`true`),a.setAttribute(`aria-keyshortcuts`,t.accelerator.replace(`CmdOrCtrl`,u(navigator.platform)?`Meta`:`Control`)),a.appendChild(e)}if(e){a.setAttribute(`aria-haspopup`,`menu`),a.setAttribute(`aria-expanded`,`false`);let e=wt(`chevron-right`,`neutral`);e&&(e.setAttribute(`class`,`-me-0.5 ms-auto size-4.5 shrink-0 text-muted-foreground opacity-80 sm:size-4`),e.setAttribute(`aria-hidden`,`true`),e.dataset.contextMenuChevron=`true`,a.appendChild(e))}if(!o){let o=!1,c=!1,u=()=>{let e=o||c;a.style.background=e?n?`color-mix(in srgb, var(--destructive) 10%, transparent)`:`var(--accent)`:`transparent`,a.style.color=e?n?`var(--destructive-foreground)`:`var(--contrast-accent-foreground)`:n?`var(--destructive-foreground)`:`var(--contrast-foreground)`};if(a.addEventListener(`mouseenter`,()=>{a.focus({preventScroll:!0}),o=!0,u()}),a.addEventListener(`mouseleave`,()=>{o=!1,u()}),a.addEventListener(`focus`,()=>{c=!0,u()}),a.addEventListener(`blur`,()=>{c=!1,u()}),e){let e=(e=!1)=>{let n=a.getBoundingClientRect(),o=n.right+4,s=n.top;m(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&&Tt(c,n.left-l.width-4,n.top),e&&[...c.querySelectorAll(`button`)].find(e=>!e.disabled)?.focus()};a.addEventListener(`mouseenter`,()=>{e()}),a.addEventListener(`click`,t=>{t.preventDefault(),e(!0)})}else a.addEventListener(`mouseenter`,()=>{p(r+1)}),a.addEventListener(`click`,()=>{s&&l(t.id)})}d.appendChild(a)}c.appendChild(d),c.addEventListener(`mouseenter`,()=>{p(r+1)}),document.body.appendChild(c),i[r]=c,a[r]=o,requestAnimationFrame(()=>{Tt(c,t,n)})};document.addEventListener(`keydown`,d),document.addEventListener(`pointerdown`,f,!0),document.addEventListener(`contextmenu`,ee,!0),m(e,t?.x??0,t?.y??0,0),k&&k(),k=c,requestAnimationFrame(()=>{s=!0})})}var At=`t3code:client-settings:v1`;function jt(){return typeof window<`u`}function Mt(){return jt()?c(At,Ne):null}function Nt(e){jt()&&de(At,e,Ne)}var Pt;function Ft(){return{dialogs:{pickFolder:async e=>window.desktopBridge?window.desktopBridge.pickFolder(e):null,confirm:async(e,t)=>gt(e,t)??!1},shell:{openExternal:async e=>{if(window.desktopBridge){if(!await window.desktopBridge.openExternal(e))throw Error(`Unable to open link.`);return}window.open(e,`_blank`,`noopener,noreferrer`)},openSystemSettings:async e=>{if(!window.desktopBridge?.openSystemSettings||!await window.desktopBridge.openSystemSettings(e))throw Error(`Unable to open System Settings.`)}},contextMenu:{show:async(e,t)=>window.desktopBridge?window.desktopBridge.showContextMenu(e,t):kt(e,t),close:async()=>{window.desktopBridge||Ot()}},persistence:{getClientSettings:async()=>window.desktopBridge?window.desktopBridge.getClientSettings():Mt(),setClientSettings:async e=>{if(window.desktopBridge)return window.desktopBridge.setClientSettings(e);Nt(e)}}}}function It(){return Ft()}function Lt(){if(typeof window<`u`)return Pt||(Pt=It(),Pt)}function Rt(){let e=Lt();if(!e)throw Error(`Local API not found`);return e}var A=`t3code:theme`,zt=`(prefers-color-scheme: dark)`,j={theme:`system`,resolvedTheme:`light`,systemDark:!1,followSystem:!0,appearanceMode:`system`,themeHalves:null};function Bt(){return M()}function Vt(){return typeof window>`u`?{}:Ht()}function M(){if(typeof window>`u`)return null;try{return nt(window.localStorage.getItem(x))}catch{return null}}function Ht(){try{let e=JSON.parse(window.localStorage.getItem(`t3code: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 N(e){return`${e?.light??``}|${e?.dark??``}`}var Ut=`theme-color`,Wt=`meta[name="${Ut}"][data-dynamic-theme-color="true"]`,P=class extends a()(`ThemeStorageError`,{operation:ae([`read`,`write`]),storageKey:m,theme:ve(at),cause:l()}){get message(){return`Failed to ${this.operation} theme preference for ${this.storageKey}.`}},Gt=Ce(P),Kt=class extends a()(`DesktopThemeSyncError`,{theme:at,cause:l()}){get message(){return`Failed to sync the ${this.theme} theme to the desktop shell.`}},qt=Ce(Kt),F=[],I=null,Jt=!0,L=null,R=null,z=null;function B(){Jt=!0;for(let e of F)e()}function Yt(){return typeof window<`u`&&typeof window.matchMedia==`function`&&window.matchMedia(zt).matches}function Xt(e){if(typeof window>`u`)return e===`system`;try{let e=window.localStorage.getItem(ot);if(e===`true`)return!0;if(e===`false`)return!1}catch{}return e===`system`}function Zt(e){return e===`light`||e===`dark`||e===`system`}function V(e){if(typeof window<`u`)try{let e=window.localStorage.getItem(it);if(Zt(e))return e}catch{}return Xt(e)?`system`:et(e)??`light`}function Qt(e){if(typeof window<`u`)try{window.localStorage.setItem(it,e)}catch(e){throw new P({operation:`write`,storageKey:it,cause:e})}}function $t(){if(typeof window>`u`)return j.theme;let e;try{e=window.localStorage.getItem(A)}catch(e){throw new P({operation:`read`,storageKey:A,cause:e})}return e!==null&&ct(e)?rt(e):j.theme}function en(e){if(typeof window<`u`)try{window.localStorage.setItem(A,e),z=null}catch(t){throw new P({operation:`write`,storageKey:A,theme:e,cause:t})}}function H(){if(z!==null)return j.theme;try{return $t()}catch(e){let t=Gt(e)?e:new P({operation:`read`,storageKey:A,cause:e});return z=t,console.error(t.message,{operation:t.operation,storageKey:t.storageKey,...v(t)}),j.theme}}function tn(){let e=document.querySelector(Wt);return e||(e=document.createElement(`meta`),e.name=Ut,e.setAttribute(`data-dynamic-theme-color`,`true`),document.head.append(e),e)}function nn(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 rn(){return document.querySelector(`main[data-slot='sidebar-inset']`)??document.querySelector(`[data-slot='sidebar-inner']`)??document.body}function an(){if(typeof document>`u`||typeof getComputedStyle>`u`)return;let e=getComputedStyle(document.documentElement),t=document.documentElement.dataset.themeId?nn(e.getPropertyValue(`--app-chrome-background`)):null,n=nn(getComputedStyle(rn()).backgroundColor),r=nn(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="${Ut}"]`);if(a.length===0){tn().setAttribute(`content`,i);return}for(let e of a)e.setAttribute(`content`,i)}function U(e,{suppressTransitions:t=!1,preservePreview:n=!0}={}){if(typeof document>`u`||typeof window>`u`||n&&document.documentElement.dataset?.themeId===`__preview`)return;let r=V(e),i=r===`system`,a=i?Yt():!1,o=M();if(R?.theme===e&&R.systemDark===a&&R.followSystem===i&&R.appearanceMode===r&&N(R.themeHalves)===N(o)){sn(e,i,r);return}t&&document.documentElement.classList.add(`no-transitions`);let s=Qe(e,a,i,r,o);tt(Xe(e,o,s),s),document.documentElement.classList.toggle(`dark`,s===`dark`),R={theme:e,systemDark:a,followSystem:i,appearanceMode:r,themeHalves:o},an(),sn(e,i,r),t&&(document.documentElement.offsetHeight,requestAnimationFrame(()=>{document.documentElement.classList.remove(`no-transitions`)}))}async function on(e,t,n,r,i=M()){try{await e.setTheme(Ze(t,n,r,i))}catch(e){throw new Kt({theme:t,cause:e})}}function sn(e,t,n){if(typeof window>`u`)return;let r=window.desktopBridge,i=M(),a=Ze(e,t,n,i);r&&typeof r.setTheme==`function`&&L!==a&&(L=a,on(r,e,t,n,i).catch(t=>{let n=qt(t)?t:new Kt({theme:e,cause:t});console.error(n.message,{theme:n.theme,...v(n)}),L===a&&(L=null)}))}typeof document<`u`&&typeof window<`u`&&U(H());function cn(){if(typeof window>`u`)return j;if(!Jt&&I)return I;Jt=!1;let e=H(),t=V(e),n=t===`system`,r=n?Yt():!1,i=M(),a=Qe(e,r,n,t,i);return I&&I.theme===e&&I.resolvedTheme===a&&I.systemDark===r&&I.followSystem===n&&I.appearanceMode===t&&N(I.themeHalves)===N(i)||(I={theme:e,resolvedTheme:a,systemDark:r,followSystem:n,appearanceMode:t,themeHalves:i}),I}function ln(){return j}function un(){let e=H();V(e)===`system`&&U(e,{suppressTransitions:!0}),B()}function dn(e){e.key===A?(z=null,U(H(),{suppressTransitions:!0}),B()):e.key===`t3code:theme-follow-system`||e.key===`t3code:theme-appearance-mode`||e.key===`t3code:theme-halves:v1`?(U(H(),{suppressTransitions:!0}),B()):(e.key===`t3code:themes:v1`||e.key===null)&&(e.key===null&&(z=null),Ye(),R=null,U(H(),{suppressTransitions:!0}),B())}var W=null;function fn(e){if(typeof window>`u`)return()=>{};if(F.push(e),!W){let e=typeof window.matchMedia==`function`?window.matchMedia(zt):null;e?.addEventListener(`change`,un),window.addEventListener(`storage`,dn),W=()=>{e?.removeEventListener(`change`,un),window.removeEventListener(`storage`,dn)}}return()=>{F=F.filter(t=>t!==e),F.length===0&&(W?.(),W=null)}}function pn(){let e=(0,S.useSyncExternalStore)(fn,cn,ln),{theme:t,resolvedTheme:n}=e,r=(0,S.useCallback)(e=>{if(typeof window>`u`)return!1;try{Qt(V(H()));let t=window.localStorage.getItem(x);window.localStorage.removeItem(x);try{en(e)}catch(e){if(t!==null)try{window.localStorage.setItem(x,t)}catch{}throw e}}catch(t){let n=Gt(t)?t:new P({operation:`write`,storageKey:A,theme:e,cause:t});return console.error(n.message,{operation:n.operation,storageKey:n.storageKey,theme:e,...v(n)}),!1}return U(e,{suppressTransitions:!0}),B(),!0},[]),i=(0,S.useCallback)(e=>{if(typeof window>`u`)return!1;try{Qt(e)}catch(e){let t=Gt(e)?e:new P({operation:`write`,storageKey:it,cause:e});return console.error(t.message,{operation:t.operation,storageKey:t.storageKey,...v(t)}),!1}return z=null,U(H(),{suppressTransitions:!0}),B(),!0},[]),a=(0,S.useCallback)(e=>{let n=V(t),r=e?`system`:n===`system`?et(t)??`light`:n;return i(r)},[i,t]),o=(0,S.useCallback)((e,t)=>{if(typeof window>`u`)return!1;try{let n={...Ht()};t===null?delete n[e]:n[e]=t,n.light===void 0&&n.dark===void 0?window.localStorage.removeItem(x):window.localStorage.setItem(x,JSON.stringify(n))}catch(e){let t=new P({operation:`write`,storageKey:x,cause:e});return console.error(t.message,{operation:t.operation,storageKey:t.storageKey,...v(t)}),!1}return U(H(),{suppressTransitions:!0}),B(),!0},[]),s=(0,S.useCallback)(()=>{if(typeof window>`u`)return!1;try{window.localStorage.removeItem(x)}catch(e){let t=new P({operation:`write`,storageKey:x,cause:e});return console.error(t.message,{operation:t.operation,storageKey:t.storageKey,...v(t)}),!1}return U(H(),{suppressTransitions:!0}),B(),!0},[]),c=(0,S.useCallback)(({preservePreview:e=!1}={})=>{typeof window<`u`&&(R=null,U(H(),{suppressTransitions:!0,preservePreview:e}),B())},[]);return(0,S.useEffect)(()=>{U(t)},[e.appearanceMode,t]),{theme:t,setTheme:r,setAppearanceMode:i,setFollowSystem:a,setThemeHalf:o,clearThemeHalves:s,refreshTheme:c,followSystem:e.followSystem,appearanceMode:e.appearanceMode,resolvedTheme:n,themeHalves:e.themeHalves}}var mn=ke(je(p)),hn=d(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??``),mn(t).pipe(Me(e=>e.issue))}),gn=new De(hn,oe());te().pipe(Ee(oe({space:2})));var _n=e=>m.pipe(pe(e,gn)),vn={performance:{profile:`performance`,automaticGitFetchInterval:_(15),providerHealthRefreshInterval:g(1),hostPowerMonitorActiveInterval:_(30),hostPowerMonitorIdleInterval:g(2),idleClientTtl:_(45),pauseWhenHostLocked:!0,pauseWhenHostLowPower:!1,pauseWhenClientLowPower:!1,pauseWhenOnBattery:!1},balanced:{profile:`balanced`,automaticGitFetchInterval:we,providerHealthRefreshInterval:Pe,hostPowerMonitorActiveInterval:_(30),hostPowerMonitorIdleInterval:g(5),idleClientTtl:_(45),pauseWhenHostLocked:!0,pauseWhenHostLowPower:!0,pauseWhenClientLowPower:!0,pauseWhenOnBattery:!1},"battery-saver":{profile:`battery-saver`,automaticGitFetchInterval:_(0),providerHealthRefreshInterval:g(15),hostPowerMonitorActiveInterval:g(1),hostPowerMonitorIdleInterval:g(10),idleClientTtl:_(45),pauseWhenHostLocked:!0,pauseWhenHostLowPower:!0,pauseWhenClientLowPower:!0,pauseWhenOnBattery:!0}};function G(e){return vn[e]}function K(e){return e.profile===`custom`?e.baseProfile??`balanced`:e.profile}function yn(e){let t=K(e),n=vn[t],r=e.profile===`custom`?e.overrides:{};return{profile:t,automaticGitFetchInterval:r.automaticGitFetchInterval??n.automaticGitFetchInterval,providerHealthRefreshInterval:r.providerHealthRefreshInterval??n.providerHealthRefreshInterval,hostPowerMonitorActiveInterval:r.hostPowerMonitorActiveInterval??n.hostPowerMonitorActiveInterval,hostPowerMonitorIdleInterval:r.hostPowerMonitorIdleInterval??n.hostPowerMonitorIdleInterval,idleClientTtl:r.idleClientTtl??n.idleClientTtl,pauseWhenHostLocked:r.pauseWhenHostLocked??n.pauseWhenHostLocked,pauseWhenHostLowPower:r.pauseWhenHostLowPower??n.pauseWhenHostLowPower,pauseWhenClientLowPower:r.pauseWhenClientLowPower??n.pauseWhenClientLowPower,pauseWhenOnBattery:r.pauseWhenOnBattery??n.pauseWhenOnBattery}}function q(e,t){return r(e)===r(t)}function bn(e,t){return q(e.automaticGitFetchInterval,t.automaticGitFetchInterval)&&q(e.providerHealthRefreshInterval,t.providerHealthRefreshInterval)&&q(e.hostPowerMonitorActiveInterval,t.hostPowerMonitorActiveInterval)&&q(e.hostPowerMonitorIdleInterval,t.hostPowerMonitorIdleInterval)&&q(e.idleClientTtl,t.idleClientTtl)&&e.pauseWhenHostLocked===t.pauseWhenHostLocked&&e.pauseWhenHostLowPower===t.pauseWhenHostLowPower&&e.pauseWhenClientLowPower===t.pauseWhenClientLowPower&&e.pauseWhenOnBattery===t.pauseWhenOnBattery}function xn(e){if(e.profile!==`custom`)return{schemaVersion:1,profile:e.profile,overrides:{}};let t=yn(e),n=[K(e),`balanced`,`performance`,`battery-saver`];for(let e of n)if(bn(t,vn[e]))return{schemaVersion:1,profile:e,overrides:{}};let r=K(e),i=vn[r];return{schemaVersion:1,profile:`custom`,baseProfile:r,overrides:{...q(t.automaticGitFetchInterval,i.automaticGitFetchInterval)?{}:{automaticGitFetchInterval:t.automaticGitFetchInterval},...q(t.providerHealthRefreshInterval,i.providerHealthRefreshInterval)?{}:{providerHealthRefreshInterval:t.providerHealthRefreshInterval},...q(t.hostPowerMonitorActiveInterval,i.hostPowerMonitorActiveInterval)?{}:{hostPowerMonitorActiveInterval:t.hostPowerMonitorActiveInterval},...q(t.hostPowerMonitorIdleInterval,i.hostPowerMonitorIdleInterval)?{}:{hostPowerMonitorIdleInterval:t.hostPowerMonitorIdleInterval},...q(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 Sn(e){let t={schemaVersion:1,profile:he,overrides:{}},n=e.backgroundActivity.profile===t.profile&&e.backgroundActivity.baseProfile===void 0&&Object.keys(e.backgroundActivity.overrides).length===0,i=e.backgroundActivityProfile,a=i!==`balanced`||r(e.automaticGitFetchInterval)!==r(we)||r(e.providerHealthRefreshInterval)!==r(Pe);return yn(n&&a?{schemaVersion:1,profile:r(e.automaticGitFetchInterval)===r(G(i).automaticGitFetchInterval)&&r(e.providerHealthRefreshInterval)===r(G(i).providerHealthRefreshInterval)?i:`custom`,baseProfile:i,overrides:{...r(e.automaticGitFetchInterval)===r(G(i).automaticGitFetchInterval)?{}:{automaticGitFetchInterval:e.automaticGitFetchInterval},...r(e.providerHealthRefreshInterval)===r(G(i).providerHealthRefreshInterval)?{}:{providerHealthRefreshInterval:e.providerHealthRefreshInterval}}}:e.backgroundActivity)}function Cn(e){let t=Sn(e);return xn({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=_n(xe);i(wn);function Tn(e,t){let n=e.providerInstances[t.instanceId];return n===void 0?ge(t.instanceId):ue(n)}var En=[`codex`,`claudeAgent`,`cursor`,`grok`,`muse`,`pi`,`opencode`,`antigravity`].map(e=>Oe.make(e));function Dn(e,t,n){let r=[...En.map(e=>[Se(e),e]),...n?.includeConfiguredInstances===!0?Object.entries(e).flatMap(([e,t])=>En.includes(t.driver)?[[Ae.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&&se(s?.customModels).some(e=>e.slug===o.model)?o:{instanceId:i,model:f[a]??ie[a]??`gpt-6-luna`}}function On(e,t,n){let r=e.sourceControlWriterModelSelection;if(!r||!Fe(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&&be(i)&&me(i)?r:e.textGenerationModelSelection}function kn(e,t,n){let r=e.reviewGuideModelSelection;if(r&&Fe(e,n,r.instanceId)){let e=t?.find(e=>e.instanceId===r.instanceId);if(t===void 0||e?.enabled===!0&&be(e)&&me(e))return r}return On(e,t,n)}function An(e,t={}){return{favorites:e.favorites??t.favorites??[],providerModelPreferences:e.providerModelPreferences??t.providerModelPreferences??{}}}function jn(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 Mn=new Set([`continueThreadsAfterServerUpdate`,`sidebarAutoSettleAfterDays`,`sidebarAutoSettleOnMerge`,`autoResumeLimitedThreads`,`snoozeLimitedThreads`,`newWorktreesStartFromOrigin`,`sourceControlWritingStyle`,`textGenerationModelSelection`]);function Nn(e){let t={},n={};for(let[r,i]of Object.entries(e))Mn.has(r)?t[r]=i:n[r]=i;return{sharedPatch:t,localPatch:n}}function Pn(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)||!Tn(n,{...n.textGenerationModelSelection,...e.textGenerationModelSelection}))&&(e=ce(e,[`textGenerationModelSelection`])),t?.threadRestartContinuation===!0?e:ce(e,[`continueThreadsAfterServerUpdate`])}function Fn(e){return e.connection.phase===`connected`&&e.serverConfig?.environment.capabilities.threadAutoSettlement===!0}var In=`[CLIENT_SETTINGS]`,Ln=new Set,Rn=new Set,zn=_e,J=`pending`,Y=null,Bn=0,Vn=Promise.resolve(),Hn=0;function Un(){for(let e of Ln)e()}function Wn(){for(let e of Rn)e()}function X(){return zn}function Z(e){zn=e,Un()}function Gn(e){J!==e&&(J=e,Wn())}function Kn(e){return Ln.add(e),Q().catch(()=>void 0),()=>{Ln.delete(e)}}function qn(){return J===`ready`}function Jn(){return J}function Yn(e){return Rn.add(e),Q().catch(()=>void 0),()=>{Rn.delete(e)}}async function Q(){if(J===`ready`)return;if(Y)return Y;let e=Bn;Gn(J===`failed`||J===`retrying`?`retrying`:`pending`);let t=(async()=>{try{let t=await Rt().persistence.getClientSettings();if(e!==Bn)return;t&&Z({..._e,...t}),Gn(`ready`)}catch(t){throw e===Bn&&Gn(`failed`),console.error(`${In} hydrate failed`,{operation:`hydrate`,...v(t)}),t}})().finally(()=>{Y===t&&(Y=null)});return Y=t,Y}var Xn=e=>Rt().persistence.setClientSettings(e);function Zn(e){let t=Vn.then(e);return Vn=t.then(()=>void 0,()=>void 0),t}function Qn(e,t=Xn){let n=J!==`ready`||Hn>0;return n?Hn+=1:Z({...X(),...e}),Zn(async()=>{if(n)try{J!==`ready`&&await Q(),Z({...X(),...e})}finally{--Hn}await t(X())}).catch(e=>{console.error(`${In} persist failed`,{operation:`persist`,...v(e)})})}async function $n(e,t=Xn){return Zn(async()=>{for(J!==`ready`&&await Q();;){let n=X(),r=e(n);if(await t(r),X()===n)return Z(r),r}})}var er=new Set(Ie(xe.fields));function tr(e){let t={},n={};for(let[r,i]of Object.entries(e))er.has(r)?t[r]=i:n[r]=i;return{serverPatch:t,clientPatch:n}}function nr(){return X()}function rr(){return Q()}function ir(){return(0,S.useSyncExternalStore)(Yn,qn,ar)}function ar(){return!1}function or(){return(0,S.useSyncExternalStore)(Yn,Jn,sr)}function sr(){return`pending`}function $(){return(0,S.useSyncExternalStore)(Kn,X,cr)}function cr(){return _e}function lr(e,t){return{...t,...e,...An(e,t)}}var ur=new Set;function dr(e,t){let n=(0,C.c)(8),r=$(),i=ir(),a;n[0]===Symbol.for(`react.memo_cache_sentinel`)?(a={reportFailure:!1},n[0]=a):a=n[0];let o=qe(b.updateSettings,a),s,c;n[1]!==r||n[2]!==e||n[3]!==i||n[4]!==o||n[5]!==t?(s=()=>{if(!e||!t||!i||ur.has(e))return;let n=jn(t,r);n&&(ur.add(e),o({environmentId:e,input:{patch:n}}).finally(()=>ur.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,S.useEffect)(s,c)}function fr(e,t){let n=(0,C.c)(6),r=$(),i;n[0]!==r||n[1]!==e?(i=lr(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 pr(e){let t=(0,C.c)(3),n=$(),r;return t[0]!==e||t[1]!==n?(r=e?e(n):n,t[0]=e,t[1]=n,t[2]=r):r=t[2],r}function mr(e){return e.settingsHydrated?e.paletteThemeActive&&!e.paletteThemeAllowsArtwork&&e.mode===`artwork`?`pill`:e.mode:`none`}function hr(){let e=(0,C.c)(7),t=ir(),n=$().environmentIdentificationMode,{resolvedTheme:r,theme:i,themeHalves:a}=pn(),o=(0,S.useSyncExternalStore)(Je,lt,gr),s;if(e[0]!==n||e[1]!==o||e[2]!==r||e[3]!==t||e[4]!==i||e[5]!==a){let c=Xe(i,a,r),l=st(c);s=mr({mode:n,settingsHydrated:t,paletteThemeActive:o!==null||l!==null,paletteThemeAllowsArtwork:o??$e(c)}),e[0]=n,e[1]=o,e[2]=r,e[3]=t,e[4]=i,e[5]=a,e[6]=s}else s=e[6];return s}function gr(){return null}async function _r(e,t){return(e.favorites===null||e.providerModelPreferences===null)&&await rr(),{...jn(e,nr()),...t}}function vr(e){let t=(0,C.c)(6),n;t[0]===e?n=t[1]:(n=e?b.settingsValueAtom(e):br,t[0]=e,t[1]=n);let r=h(n),i=qe(b.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 _r(r,t)}catch{y.add({type:`error`,title:`Model preferences not saved`,description:`Could not load saved model preferences. Try again.`});return}return i({environmentId:e,input:{patch:n}})},t[2]=e,t[3]=i,t[4]=r,t[5]=a):a=t[5],a}function yr(e){let t=(0,S.use)(fe),n=(0,S.useRef)(new Map),r=vr(e);return(0,S.useCallback)(async(i,a)=>{if(!e)return;let o=b.settingsValueAtom(e),s=t.get(o);if(!s)return;if(s.favorites===null)try{await rr()}catch{y.add({type:`error`,title:`Favorites not saved`,description:`Could not load saved model preferences. Try again.`});return}let c=t.get(o)??s,l=An(c,nr()).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&&Le(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 br=n(null);function xr(e){let t=(0,C.c)(5),n;t[0]===e?n=t[1]:(n=e?b.settingsValueAtom(e):br,t[0]=e,t[1]=n);let r=h(n),i=$();dr(e,r);let a=r??ye,o;return t[2]!==i||t[3]!==a?(o=An(a,i),t[2]=i,t[3]=a,t[4]=o):o=t[4],o}function Sr(e,t){let n=(0,C.c)(2),r;n[0]===e?r=n[1]:(r=b.settingsValueAtom(e),n[0]=e,n[1]=r);let i=h(r);return dr(e,i),fr(i??ye,t)}function Cr(e){let t=(0,C.c)(4),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n={reportFailure:!1},t[0]=n):n=t[0];let r=qe(b.mutateProviderInstance,n),i;return t[1]!==e||t[2]!==r?(i=(t,n)=>r({environmentId:e,input:{patch:n===void 0?{}:n,providerInstanceMutation:t}}),t[1]=e,t[2]=r,t[3]=i):i=t[3],i}function wr(e){let t=He(),n=h(Ue);return dr(t?.environmentId??null,t?.serverConfig?.settings??null),fr(n,e)}var Tr=`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 Er(){let e=(0,C.c)(2),t=He(),n;return e[0]===t?n=e[1]:(n=t!==null||!Be(),e[0]=t,e[1]=n),n}function Dr(e){let t=(0,C.c)(3),r=e!==void 0&&e,{environments:i}=Ve(),a;return t[0]!==i||t[1]!==r?(a=n(e=>i.filter(Fn).flatMap(t=>{let n=e(Ke.sessionStateAtom(t.environmentId));if(r&&n._tag===`Initial`)return[t.environmentId];let i=n._tag===`Failure`?null:re(le(n));return i!==null&&Te(i,`settings:write`)?[t.environmentId]:[]})),t[0]=i,t[1]=r,t[2]=a):a=t[2],h(a)}function Or(e){let t=(0,C.c)(10);We(e,o);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=qe(b.updateSettings,n),{environments:i}=Ve(),a;t[1]!==i||t[2]!==r?(a=async e=>{let t=await r(e);if(t._tag===`Failure`&&!Re(t)){let n=i.find(t=>t.environmentId===e.environmentId)?.label??e.environmentId,r=ze(t);y.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 c=a,l=Dr(!0),u;return t[4]!==e||t[5]!==i||t[6]!==r||t[7]!==c||t[8]!==l?(u=t=>{let{serverPatch:n,clientPatch:a}=tr(t),o=e===null||s(n).every(t=>Ge(e,t));if(Object.keys(n).length>0&&!o&&y.add({type:`warning`,title:`Setting not saved`,description:`This connection lacks permission to change settings on ${i.find(t=>t.environmentId===e)?.label??`the selected environment`}.`}),Object.keys(n).length>0&&o){let{sharedPatch:t,localPatch:a}=Nn(n),o=Nr;if(Object.keys(a).length>0&&(e?c({environmentId:e,input:{patch:a}}):o()),Object.keys(t).length>0){let n=i.find(t=>t.environmentId===e)?.serverConfig?.settings,a=new Set(l);e&&a.add(e);let c=[],u=[];for(let r of a){let a=i.find(e=>e.environmentId===r),o=Pn(t,a?.serverConfig?.environment.capabilities,a?.serverConfig?.settings,n,r===e);if(Object.keys(o).length!==0){if(ee.get(Ke.sessionStateAtom(r))._tag!==`Initial`&&!s(t).every(e=>Ge(r,e))){u.push(a?.label??r);continue}c.push({environmentId:r,input:{patch:o}})}}c.length===0?o(u.length>0?`This connection lacks permission to change settings on ${u.join(`, `)}.`:a.size>0?`Update older servers to save this setting.`:void 0):Promise.all(c.map(async e=>({label:i.find(t=>t.environmentId===e.environmentId)?.label??e.environmentId,result:await r(e)}))).then(kr)}}Object.keys(a).length>0&&Qn(a)},t[4]=e,t[5]=i,t[6]=r,t[7]=c,t[8]=l,t[9]=u):u=t[9],u}function kr(e){let t=e.flatMap(Mr);if(t.length===0)return;let n=e.filter(jr).map(Ar);y.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(`
|
|
1
|
+
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{r as t}from"./Icon-l19w4AjM.js";import{$o as n,$w as r,$y as i,By as a,C_ as o,Ch as s,Cs as c,Cy as l,Dc as u,Fb as d,Fg as f,Go as ee,Gy as p,Iy as m,Mb as te,NE as ne,NT as re,Ng as ie,Oy as ae,Pb as oe,Rs as se,Sb as ce,Ss as le,Th as ue,Ts as de,Xo as fe,Yo as h,Yw as g,Zw as _,Zy as pe,_l as me,ah as he,bh as ge,ch as _e,db as ve,dh as ye,gl as be,hh as xe,i_ as Se,ib as Ce,ih as we,j_ as Te,jb as Ee,kb as De,n_ as Oe,qy as ke,r_ as Ae,rb as je,tS as Me,th as Ne,uh as Pe,wh as Fe,xb as Ie,ys as Le}from"./utils-BgVDKR83.js";import{R as Re,W as ze,_t as v}from"./runtime-B7jXrsPs.js";import{T as Be}from"./runtime-B75ae48c.js";import{i as y}from"./toast-e2DHftFl.js";import{a as Ve,o as He}from"./environments-CXLCfPlP.js";import{f as b,u as Ue}from"./server-B0y-CZn0.js";import{i as We,n as Ge,t as Ke}from"./session-eKfJi_Kx.js";import{t as qe}from"./use-atom-command-BEpD82FZ.js";import{B as Je,C as Ye,F as Xe,N as Ze,P as Qe,V as $e,b as et,c as tt,i as x,k as nt,l as rt,n as it,o as at,r as ot,v as st,w as ct,x as lt}from"./themePalette-BAR7Sc97.js";var S=e(t(),1),C=ne(),ut={status:`idle`},w=ut,T=null,E=[],D=0,dt=new Set;function O(e){w=e;for(let e of dt)e()}function ft(e){T?.resolve(e);for(let t of E)t.resolve(e);T=null,E=[]}function pt(){return w}function mt(e){return dt.add(e),()=>{dt.delete(e)}}function ht(){D+=1;let e=!0;return()=>{e&&(e=!1,D=Math.max(0,D-1),D===0&&(ft(!1),O(ut)))}}function gt(e,t){if(D!==0)return new Promise(n=>{let r={message:e,variant:t?.variant??`default`,resolve:n};if(T||w.status===`closing`){E.push(r);return}T=r,O({status:`confirming`,message:e,variant:r.variant})})}function _t(){return w.status!==`idle`||T!==null||E.length>0}function vt(e){if(w.status!==`confirming`||!T)return;let t=T;T=null,t.resolve(e),O({status:`closing`,message:w.message,variant:w.variant})}function yt(){if(w.status!==`closing`)return;let e=E.shift();if(!e){O(ut);return}T=e,O({status:`confirming`,message:e.message,variant:e.variant})}var bt={Ctrl:`⌃`,Alt:`⌥`,Shift:`⇧`,Super:`⌘`,CmdOrCtrl:`⌘`};function xt(e,t=navigator.platform){let n=e.split(`+`),r=n.pop()??``;return u(t)?`${n.map(e=>bt[e]??e).join(``)}${r}`:[...n.map(e=>e===`CmdOrCtrl`?`Ctrl`:e===`Super`?`Meta`:e),r].join(`+`)}var St=`http://www.w3.org/2000/svg`,Ct={archive:[{tag:`rect`,attrs:{width:`20`,height:`5`,x:`2`,y:`3`,rx:`1`}},{tag:`path`,attrs:{d:`M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8`}},{tag:`path`,attrs:{d:`M10 12h4`}}],check:[{tag:`path`,attrs:{d:`M20 6 9 17l-5-5`}}],timer:[{tag:`line`,attrs:{x1:`10`,x2:`14`,y1:`2`,y2:`2`}},{tag:`line`,attrs:{x1:`12`,x2:`15`,y1:`14`,y2:`11`}},{tag:`circle`,attrs:{cx:`12`,cy:`14`,r:`8`}}],"chevron-right":[{tag:`path`,attrs:{d:`m9 19 7-7-7-7`}}],"circle-check":[{tag:`circle`,attrs:{cx:`12`,cy:`12`,r:`10`}},{tag:`path`,attrs:{d:`m9 12 2 2 4-4`}}],clock:[{tag:`path`,attrs:{d:`M12 6v6l4 2`}},{tag:`circle`,attrs:{cx:`12`,cy:`12`,r:`10`}}],pencil:[{tag:`path`,attrs:{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`}},{tag:`path`,attrs:{d:`m15 5 4 4`}}],copy:[{tag:`rect`,attrs:{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`}},{tag:`path`,attrs:{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`}}],folder:[{tag:`path`,attrs:{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`}}],"git-branch":[{tag:`line`,attrs:{x1:`6`,x2:`6`,y1:`3`,y2:`15`}},{tag:`circle`,attrs:{cx:`18`,cy:`6`,r:`3`}},{tag:`circle`,attrs:{cx:`6`,cy:`18`,r:`3`}},{tag:`path`,attrs:{d:`M18 9a9 9 0 0 1-9 9`}}],eye:[{tag:`path`,attrs:{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`}},{tag:`circle`,attrs:{cx:`12`,cy:`12`,r:`3`}}],"app-window":[{tag:`rect`,attrs:{x:`2`,y:`4`,width:`20`,height:`16`,rx:`2`}},{tag:`path`,attrs:{d:`M10 4v4`}},{tag:`path`,attrs:{d:`M2 8h20`}},{tag:`path`,attrs:{d:`M6 4v4`}}],"arrow-up-right":[{tag:`path`,attrs:{d:`M7 7h10v10`}},{tag:`path`,attrs:{d:`M7 17 17 7`}}],"external-link":[{tag:`path`,attrs:{d:`M15 3h6v6`}},{tag:`path`,attrs:{d:`M10 14 21 3`}},{tag:`path`,attrs:{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`}}],link:[{tag:`path`,attrs:{d:`M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71`}},{tag:`path`,attrs:{d:`M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71`}}],list:[{tag:`path`,attrs:{d:`M3 5h.01`}},{tag:`path`,attrs:{d:`M3 12h.01`}},{tag:`path`,attrs:{d:`M3 19h.01`}},{tag:`path`,attrs:{d:`M8 5h13`}},{tag:`path`,attrs:{d:`M8 12h13`}},{tag:`path`,attrs:{d:`M8 19h13`}}],share:[{tag:`path`,attrs:{d:`M12 2v13`}},{tag:`path`,attrs:{d:`m16 6-4-4-4 4`}},{tag:`path`,attrs:{d:`M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8`}}],x:[{tag:`path`,attrs:{d:`M18 6 6 18`}},{tag:`path`,attrs:{d:`m6 6 12 12`}}],hash:[{tag:`line`,attrs:{x1:`4`,x2:`20`,y1:`9`,y2:`9`}},{tag:`line`,attrs:{x1:`4`,x2:`20`,y1:`15`,y2:`15`}},{tag:`line`,attrs:{x1:`10`,x2:`8`,y1:`3`,y2:`21`}},{tag:`line`,attrs:{x1:`16`,x2:`14`,y1:`3`,y2:`21`}}],"mail-open":[{tag:`path`,attrs:{d:`M21.2 8.4c.5.38.8.97.8 1.6v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V10a2 2 0 0 1 .8-1.6l8-6a2 2 0 0 1 2.4 0l8 6Z`}},{tag:`path`,attrs:{d:`m22 10-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 10`}}],"message-square-plus":[{tag:`path`,attrs:{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`}},{tag:`path`,attrs:{d:`M12 8v6`}},{tag:`path`,attrs:{d:`M9 11h6`}}],pin:[{tag:`path`,attrs:{d:`M12 17v5`}},{tag:`path`,attrs:{d:`M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z`}}],"pin-off":[{tag:`path`,attrs:{d:`M12 17v5`}},{tag:`path`,attrs:{d:`M15 9.34V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H7.89`}},{tag:`path`,attrs:{d:`m2 2 20 20`}},{tag:`path`,attrs:{d:`M9 9v1.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h11`}}],"refresh-cw":[{tag:`path`,attrs:{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`}},{tag:`path`,attrs:{d:`M21 3v5h-5`}},{tag:`path`,attrs:{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`}},{tag:`path`,attrs:{d:`M8 16H3v5`}}],settings:[{tag:`path`,attrs:{d:`M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.38a2 2 0 0 0-.73-2.73l-.15-.09a2 2 0 0 1-1-1.74v-.51a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z`}},{tag:`circle`,attrs:{cx:`12`,cy:`12`,r:`3`}}],"folder-tree":[{tag:`path`,attrs:{d:`M20 10a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1h-2.5a1 1 0 0 1-.8-.4l-.9-1.2A1 1 0 0 0 15 3h-2a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z`}},{tag:`path`,attrs:{d:`M20 21a1 1 0 0 0 1-1v-3a1 1 0 0 0-1-1h-2.9a1 1 0 0 1-.88-.55l-.42-.85a1 1 0 0 0-.92-.6H13a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z`}},{tag:`path`,attrs:{d:`M3 5a2 2 0 0 0 2 2h3`}},{tag:`path`,attrs:{d:`M3 3v13a2 2 0 0 0 2 2h3`}}],trash:[{tag:`path`,attrs:{d:`M3 6h18`}},{tag:`path`,attrs:{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`}},{tag:`path`,attrs:{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`}},{tag:`line`,attrs:{x1:`10`,x2:`10`,y1:`11`,y2:`17`}},{tag:`line`,attrs:{x1:`14`,x2:`14`,y1:`11`,y2:`17`}}]};function wt(e,t){let n=Ct[e];if(!n||typeof document.createElementNS!=`function`)return null;let r=document.createElementNS(St,`svg`);r.setAttribute(`xmlns`,St),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(St,e.tag);for(let[n,r]of Object.entries(e.attrs))t.setAttribute(n,r);r.appendChild(t)}return r}function Tt(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 Et(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 k=null;function Dt(){return k!==null}function Ot(){k?.(),k=null}function kt(e,t){return new Promise(n=>{let r=document.activeElement instanceof HTMLElement?document.activeElement:null,i=[],a=[],o=!1,s=!1,c=()=>l(null),l=e=>{if(o)return;o=!0,k===c&&(k=null),document.removeEventListener(`keydown`,d),document.removeEventListener(`pointerdown`,f,!0),document.removeEventListener(`contextmenu`,ee,!0);let t=Et(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(),l(null))},f=e=>{s&&!Et(e.target,i)&&l(null)},ee=e=>{s&&!Et(e.target,i)&&(e.preventDefault(),l(null))},p=e=>{for(;i.length>e;)a.pop()?.setAttribute(`aria-expanded`,`false`),i.pop()?.remove()},m=(e,t,n,r,o)=>{p(r);let c=document.createElement(`div`);c.className=`dropdown-glass fixed z-[10000] min-w-56 max-w-sm overflow-hidden rounded-lg bg-clip-padding text-popover-foreground outline-none`,c.style.cssText=`position:fixed;z-index:10000;min-width:14rem;max-width:24rem;overflow:hidden;border-radius:var(--radius-lg);background-clip:padding-box;color:var(--contrast-popover-foreground);outline:none;pointer-events:auto;`,c.style.left=`${t}px`,c.style.top=`${n}px`,c.dataset.level=String(r);let 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 o=t.disabled===!0;a.disabled=o;let c=`flex w-full cursor-default select-none items-center gap-2 rounded-sm px-2 py-1 text-left outline-none transition-colors sm:min-h-7 sm:text-sm min-h-8 text-base`;if(a.className=o?`${c} pointer-events-none cursor-not-allowed text-muted-foreground opacity-64`:n?`${c} text-destructive-foreground hover:bg-destructive/10 hover:text-destructive-foreground`:`${c} text-foreground hover:bg-accent hover:text-accent-foreground`,a.style.cssText=`display:flex;width:100%;min-height:1.75rem;align-items:center;gap:0.5rem;border:0;border-radius:var(--radius-sm);background:transparent;padding:0.25rem 0.5rem;color:var(--contrast-foreground);font-family:var(--font-sans,system-ui,sans-serif);font-size:0.875rem;line-height:1.25rem;text-align:left;cursor:default;`,n&&(a.style.color=`var(--destructive-foreground)`),o&&(a.style.color=`var(--contrast-muted-foreground)`,a.style.opacity=`0.64`,a.style.pointerEvents=`none`),typeof t.checked==`boolean`){a.setAttribute(`role`,`menuitemradio`),a.setAttribute(`aria-checked`,t.checked?`true`:`false`);let e=t.checked?wt(`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=wt(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=xt(t.accelerator),e.setAttribute(`aria-hidden`,`true`),a.setAttribute(`aria-keyshortcuts`,t.accelerator.replace(`CmdOrCtrl`,u(navigator.platform)?`Meta`:`Control`)),a.appendChild(e)}if(e){a.setAttribute(`aria-haspopup`,`menu`),a.setAttribute(`aria-expanded`,`false`);let e=wt(`chevron-right`,`neutral`);e&&(e.setAttribute(`class`,`-me-0.5 ms-auto size-4.5 shrink-0 text-muted-foreground opacity-80 sm:size-4`),e.setAttribute(`aria-hidden`,`true`),e.dataset.contextMenuChevron=`true`,a.appendChild(e))}if(!o){let o=!1,c=!1,u=()=>{let e=o||c;a.style.background=e?n?`color-mix(in srgb, var(--destructive) 10%, transparent)`:`var(--accent)`:`transparent`,a.style.color=e?n?`var(--destructive-foreground)`:`var(--contrast-accent-foreground)`:n?`var(--destructive-foreground)`:`var(--contrast-foreground)`};if(a.addEventListener(`mouseenter`,()=>{a.focus({preventScroll:!0}),o=!0,u()}),a.addEventListener(`mouseleave`,()=>{o=!1,u()}),a.addEventListener(`focus`,()=>{c=!0,u()}),a.addEventListener(`blur`,()=>{c=!1,u()}),e){let e=(e=!1)=>{let n=a.getBoundingClientRect(),o=n.right+4,s=n.top;m(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&&Tt(c,n.left-l.width-4,n.top),e&&[...c.querySelectorAll(`button`)].find(e=>!e.disabled)?.focus()};a.addEventListener(`mouseenter`,()=>{e()}),a.addEventListener(`click`,t=>{t.preventDefault(),e(!0)})}else a.addEventListener(`mouseenter`,()=>{p(r+1)}),a.addEventListener(`click`,()=>{s&&l(t.id)})}d.appendChild(a)}c.appendChild(d),c.addEventListener(`mouseenter`,()=>{p(r+1)}),document.body.appendChild(c),i[r]=c,a[r]=o,requestAnimationFrame(()=>{Tt(c,t,n)})};document.addEventListener(`keydown`,d),document.addEventListener(`pointerdown`,f,!0),document.addEventListener(`contextmenu`,ee,!0),m(e,t?.x??0,t?.y??0,0),k&&k(),k=c,requestAnimationFrame(()=>{s=!0})})}var At=`t3code:client-settings:v1`;function jt(){return typeof window<`u`}function Mt(){return jt()?c(At,Ne):null}function Nt(e){jt()&&de(At,e,Ne)}var Pt;function Ft(){return{dialogs:{pickFolder:async e=>window.desktopBridge?window.desktopBridge.pickFolder(e):null,confirm:async(e,t)=>gt(e,t)??!1},shell:{openExternal:async e=>{if(window.desktopBridge){if(!await window.desktopBridge.openExternal(e))throw Error(`Unable to open link.`);return}window.open(e,`_blank`,`noopener,noreferrer`)},openSystemSettings:async e=>{if(!window.desktopBridge?.openSystemSettings||!await window.desktopBridge.openSystemSettings(e))throw Error(`Unable to open System Settings.`)}},contextMenu:{show:async(e,t)=>window.desktopBridge?window.desktopBridge.showContextMenu(e,t):kt(e,t),close:async()=>{window.desktopBridge||Ot()}},persistence:{getClientSettings:async()=>window.desktopBridge?window.desktopBridge.getClientSettings():Mt(),setClientSettings:async e=>{if(window.desktopBridge)return window.desktopBridge.setClientSettings(e);Nt(e)}}}}function It(){return Ft()}function Lt(){if(typeof window<`u`)return Pt||(Pt=It(),Pt)}function Rt(){let e=Lt();if(!e)throw Error(`Local API not found`);return e}var A=`t3code:theme`,zt=`(prefers-color-scheme: dark)`,j={theme:`system`,resolvedTheme:`light`,systemDark:!1,followSystem:!0,appearanceMode:`system`,themeHalves:null};function Bt(){return M()}function Vt(){return typeof window>`u`?{}:Ht()}function M(){if(typeof window>`u`)return null;try{return nt(window.localStorage.getItem(x))}catch{return null}}function Ht(){try{let e=JSON.parse(window.localStorage.getItem(`t3code: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 N(e){return`${e?.light??``}|${e?.dark??``}`}var Ut=`theme-color`,Wt=`meta[name="${Ut}"][data-dynamic-theme-color="true"]`,P=class extends a()(`ThemeStorageError`,{operation:ae([`read`,`write`]),storageKey:m,theme:ve(at),cause:l()}){get message(){return`Failed to ${this.operation} theme preference for ${this.storageKey}.`}},Gt=Ce(P),Kt=class extends a()(`DesktopThemeSyncError`,{theme:at,cause:l()}){get message(){return`Failed to sync the ${this.theme} theme to the desktop shell.`}},qt=Ce(Kt),F=[],I=null,Jt=!0,L=null,R=null,z=null;function B(){Jt=!0;for(let e of F)e()}function Yt(){return typeof window<`u`&&typeof window.matchMedia==`function`&&window.matchMedia(zt).matches}function Xt(e){if(typeof window>`u`)return e===`system`;try{let e=window.localStorage.getItem(ot);if(e===`true`)return!0;if(e===`false`)return!1}catch{}return e===`system`}function Zt(e){return e===`light`||e===`dark`||e===`system`}function V(e){if(typeof window<`u`)try{let e=window.localStorage.getItem(it);if(Zt(e))return e}catch{}return Xt(e)?`system`:et(e)??`light`}function Qt(e){if(typeof window<`u`)try{window.localStorage.setItem(it,e)}catch(e){throw new P({operation:`write`,storageKey:it,cause:e})}}function $t(){if(typeof window>`u`)return j.theme;let e;try{e=window.localStorage.getItem(A)}catch(e){throw new P({operation:`read`,storageKey:A,cause:e})}return e!==null&&ct(e)?rt(e):j.theme}function en(e){if(typeof window<`u`)try{window.localStorage.setItem(A,e),z=null}catch(t){throw new P({operation:`write`,storageKey:A,theme:e,cause:t})}}function H(){if(z!==null)return j.theme;try{return $t()}catch(e){let t=Gt(e)?e:new P({operation:`read`,storageKey:A,cause:e});return z=t,console.error(t.message,{operation:t.operation,storageKey:t.storageKey,...v(t)}),j.theme}}function tn(){let e=document.querySelector(Wt);return e||(e=document.createElement(`meta`),e.name=Ut,e.setAttribute(`data-dynamic-theme-color`,`true`),document.head.append(e),e)}function nn(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 rn(){return document.querySelector(`main[data-slot='sidebar-inset']`)??document.querySelector(`[data-slot='sidebar-inner']`)??document.body}function an(){if(typeof document>`u`||typeof getComputedStyle>`u`)return;let e=getComputedStyle(document.documentElement),t=document.documentElement.dataset.themeId?nn(e.getPropertyValue(`--app-chrome-background`)):null,n=nn(getComputedStyle(rn()).backgroundColor),r=nn(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="${Ut}"]`);if(a.length===0){tn().setAttribute(`content`,i);return}for(let e of a)e.setAttribute(`content`,i)}function U(e,{suppressTransitions:t=!1,preservePreview:n=!0}={}){if(typeof document>`u`||typeof window>`u`||n&&document.documentElement.dataset?.themeId===`__preview`)return;let r=V(e),i=r===`system`,a=i?Yt():!1,o=M();if(R?.theme===e&&R.systemDark===a&&R.followSystem===i&&R.appearanceMode===r&&N(R.themeHalves)===N(o)){sn(e,i,r);return}t&&document.documentElement.classList.add(`no-transitions`);let s=Qe(e,a,i,r,o);tt(Xe(e,o,s),s),document.documentElement.classList.toggle(`dark`,s===`dark`),R={theme:e,systemDark:a,followSystem:i,appearanceMode:r,themeHalves:o},an(),sn(e,i,r),t&&(document.documentElement.offsetHeight,requestAnimationFrame(()=>{document.documentElement.classList.remove(`no-transitions`)}))}async function on(e,t,n,r,i=M()){try{await e.setTheme(Ze(t,n,r,i))}catch(e){throw new Kt({theme:t,cause:e})}}function sn(e,t,n){if(typeof window>`u`)return;let r=window.desktopBridge,i=M(),a=Ze(e,t,n,i);r&&typeof r.setTheme==`function`&&L!==a&&(L=a,on(r,e,t,n,i).catch(t=>{let n=qt(t)?t:new Kt({theme:e,cause:t});console.error(n.message,{theme:n.theme,...v(n)}),L===a&&(L=null)}))}typeof document<`u`&&typeof window<`u`&&U(H());function cn(){if(typeof window>`u`)return j;if(!Jt&&I)return I;Jt=!1;let e=H(),t=V(e),n=t===`system`,r=n?Yt():!1,i=M(),a=Qe(e,r,n,t,i);return I&&I.theme===e&&I.resolvedTheme===a&&I.systemDark===r&&I.followSystem===n&&I.appearanceMode===t&&N(I.themeHalves)===N(i)||(I={theme:e,resolvedTheme:a,systemDark:r,followSystem:n,appearanceMode:t,themeHalves:i}),I}function ln(){return j}function un(){let e=H();V(e)===`system`&&U(e,{suppressTransitions:!0}),B()}function dn(e){e.key===A?(z=null,U(H(),{suppressTransitions:!0}),B()):e.key===`t3code:theme-follow-system`||e.key===`t3code:theme-appearance-mode`||e.key===`t3code:theme-halves:v1`?(U(H(),{suppressTransitions:!0}),B()):(e.key===`t3code:themes:v1`||e.key===null)&&(e.key===null&&(z=null),Ye(),R=null,U(H(),{suppressTransitions:!0}),B())}var W=null;function fn(e){if(typeof window>`u`)return()=>{};if(F.push(e),!W){let e=typeof window.matchMedia==`function`?window.matchMedia(zt):null;e?.addEventListener(`change`,un),window.addEventListener(`storage`,dn),W=()=>{e?.removeEventListener(`change`,un),window.removeEventListener(`storage`,dn)}}return()=>{F=F.filter(t=>t!==e),F.length===0&&(W?.(),W=null)}}function pn(){let e=(0,S.useSyncExternalStore)(fn,cn,ln),{theme:t,resolvedTheme:n}=e,r=(0,S.useCallback)(e=>{if(typeof window>`u`)return!1;try{Qt(V(H()));let t=window.localStorage.getItem(x);window.localStorage.removeItem(x);try{en(e)}catch(e){if(t!==null)try{window.localStorage.setItem(x,t)}catch{}throw e}}catch(t){let n=Gt(t)?t:new P({operation:`write`,storageKey:A,theme:e,cause:t});return console.error(n.message,{operation:n.operation,storageKey:n.storageKey,theme:e,...v(n)}),!1}return U(e,{suppressTransitions:!0}),B(),!0},[]),i=(0,S.useCallback)(e=>{if(typeof window>`u`)return!1;try{Qt(e)}catch(e){let t=Gt(e)?e:new P({operation:`write`,storageKey:it,cause:e});return console.error(t.message,{operation:t.operation,storageKey:t.storageKey,...v(t)}),!1}return z=null,U(H(),{suppressTransitions:!0}),B(),!0},[]),a=(0,S.useCallback)(e=>{let n=V(t),r=e?`system`:n===`system`?et(t)??`light`:n;return i(r)},[i,t]),o=(0,S.useCallback)((e,t)=>{if(typeof window>`u`)return!1;try{let n={...Ht()};t===null?delete n[e]:n[e]=t,n.light===void 0&&n.dark===void 0?window.localStorage.removeItem(x):window.localStorage.setItem(x,JSON.stringify(n))}catch(e){let t=new P({operation:`write`,storageKey:x,cause:e});return console.error(t.message,{operation:t.operation,storageKey:t.storageKey,...v(t)}),!1}return U(H(),{suppressTransitions:!0}),B(),!0},[]),s=(0,S.useCallback)(()=>{if(typeof window>`u`)return!1;try{window.localStorage.removeItem(x)}catch(e){let t=new P({operation:`write`,storageKey:x,cause:e});return console.error(t.message,{operation:t.operation,storageKey:t.storageKey,...v(t)}),!1}return U(H(),{suppressTransitions:!0}),B(),!0},[]),c=(0,S.useCallback)(({preservePreview:e=!1}={})=>{typeof window<`u`&&(R=null,U(H(),{suppressTransitions:!0,preservePreview:e}),B())},[]);return(0,S.useEffect)(()=>{U(t)},[e.appearanceMode,t]),{theme:t,setTheme:r,setAppearanceMode:i,setFollowSystem:a,setThemeHalf:o,clearThemeHalves:s,refreshTheme:c,followSystem:e.followSystem,appearanceMode:e.appearanceMode,resolvedTheme:n,themeHalves:e.themeHalves}}var mn=ke(je(p)),hn=d(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??``),mn(t).pipe(Me(e=>e.issue))}),gn=new De(hn,oe());te().pipe(Ee(oe({space:2})));var _n=e=>m.pipe(pe(e,gn)),vn={performance:{profile:`performance`,automaticGitFetchInterval:_(15),providerHealthRefreshInterval:g(1),hostPowerMonitorActiveInterval:_(30),hostPowerMonitorIdleInterval:g(2),idleClientTtl:_(45),pauseWhenHostLocked:!0,pauseWhenHostLowPower:!1,pauseWhenClientLowPower:!1,pauseWhenOnBattery:!1},balanced:{profile:`balanced`,automaticGitFetchInterval:we,providerHealthRefreshInterval:Pe,hostPowerMonitorActiveInterval:_(30),hostPowerMonitorIdleInterval:g(5),idleClientTtl:_(45),pauseWhenHostLocked:!0,pauseWhenHostLowPower:!0,pauseWhenClientLowPower:!0,pauseWhenOnBattery:!1},"battery-saver":{profile:`battery-saver`,automaticGitFetchInterval:_(0),providerHealthRefreshInterval:g(15),hostPowerMonitorActiveInterval:g(1),hostPowerMonitorIdleInterval:g(10),idleClientTtl:_(45),pauseWhenHostLocked:!0,pauseWhenHostLowPower:!0,pauseWhenClientLowPower:!0,pauseWhenOnBattery:!0}};function G(e){return vn[e]}function K(e){return e.profile===`custom`?e.baseProfile??`balanced`:e.profile}function yn(e){let t=K(e),n=vn[t],r=e.profile===`custom`?e.overrides:{};return{profile:t,automaticGitFetchInterval:r.automaticGitFetchInterval??n.automaticGitFetchInterval,providerHealthRefreshInterval:r.providerHealthRefreshInterval??n.providerHealthRefreshInterval,hostPowerMonitorActiveInterval:r.hostPowerMonitorActiveInterval??n.hostPowerMonitorActiveInterval,hostPowerMonitorIdleInterval:r.hostPowerMonitorIdleInterval??n.hostPowerMonitorIdleInterval,idleClientTtl:r.idleClientTtl??n.idleClientTtl,pauseWhenHostLocked:r.pauseWhenHostLocked??n.pauseWhenHostLocked,pauseWhenHostLowPower:r.pauseWhenHostLowPower??n.pauseWhenHostLowPower,pauseWhenClientLowPower:r.pauseWhenClientLowPower??n.pauseWhenClientLowPower,pauseWhenOnBattery:r.pauseWhenOnBattery??n.pauseWhenOnBattery}}function q(e,t){return r(e)===r(t)}function bn(e,t){return q(e.automaticGitFetchInterval,t.automaticGitFetchInterval)&&q(e.providerHealthRefreshInterval,t.providerHealthRefreshInterval)&&q(e.hostPowerMonitorActiveInterval,t.hostPowerMonitorActiveInterval)&&q(e.hostPowerMonitorIdleInterval,t.hostPowerMonitorIdleInterval)&&q(e.idleClientTtl,t.idleClientTtl)&&e.pauseWhenHostLocked===t.pauseWhenHostLocked&&e.pauseWhenHostLowPower===t.pauseWhenHostLowPower&&e.pauseWhenClientLowPower===t.pauseWhenClientLowPower&&e.pauseWhenOnBattery===t.pauseWhenOnBattery}function xn(e){if(e.profile!==`custom`)return{schemaVersion:1,profile:e.profile,overrides:{}};let t=yn(e),n=[K(e),`balanced`,`performance`,`battery-saver`];for(let e of n)if(bn(t,vn[e]))return{schemaVersion:1,profile:e,overrides:{}};let r=K(e),i=vn[r];return{schemaVersion:1,profile:`custom`,baseProfile:r,overrides:{...q(t.automaticGitFetchInterval,i.automaticGitFetchInterval)?{}:{automaticGitFetchInterval:t.automaticGitFetchInterval},...q(t.providerHealthRefreshInterval,i.providerHealthRefreshInterval)?{}:{providerHealthRefreshInterval:t.providerHealthRefreshInterval},...q(t.hostPowerMonitorActiveInterval,i.hostPowerMonitorActiveInterval)?{}:{hostPowerMonitorActiveInterval:t.hostPowerMonitorActiveInterval},...q(t.hostPowerMonitorIdleInterval,i.hostPowerMonitorIdleInterval)?{}:{hostPowerMonitorIdleInterval:t.hostPowerMonitorIdleInterval},...q(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 Sn(e){let t={schemaVersion:1,profile:he,overrides:{}},n=e.backgroundActivity.profile===t.profile&&e.backgroundActivity.baseProfile===void 0&&Object.keys(e.backgroundActivity.overrides).length===0,i=e.backgroundActivityProfile,a=i!==`balanced`||r(e.automaticGitFetchInterval)!==r(we)||r(e.providerHealthRefreshInterval)!==r(Pe);return yn(n&&a?{schemaVersion:1,profile:r(e.automaticGitFetchInterval)===r(G(i).automaticGitFetchInterval)&&r(e.providerHealthRefreshInterval)===r(G(i).providerHealthRefreshInterval)?i:`custom`,baseProfile:i,overrides:{...r(e.automaticGitFetchInterval)===r(G(i).automaticGitFetchInterval)?{}:{automaticGitFetchInterval:e.automaticGitFetchInterval},...r(e.providerHealthRefreshInterval)===r(G(i).providerHealthRefreshInterval)?{}:{providerHealthRefreshInterval:e.providerHealthRefreshInterval}}}:e.backgroundActivity)}function Cn(e){let t=Sn(e);return xn({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=_n(xe);i(wn);function Tn(e,t){let n=e.providerInstances[t.instanceId];return n===void 0?ge(t.instanceId):ue(n)}var En=[`codex`,`claudeAgent`,`cursor`,`grok`,`muse`,`pi`,`opencode`,`antigravity`].map(e=>Oe.make(e));function Dn(e,t,n){let r=[...En.map(e=>[Se(e),e]),...n?.includeConfiguredInstances===!0?Object.entries(e).flatMap(([e,t])=>En.includes(t.driver)?[[Ae.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&&se(s?.customModels).some(e=>e.slug===o.model)?o:{instanceId:i,model:f[a]??ie[a]??`gpt-6-luna`}}function On(e,t,n){let r=e.sourceControlWriterModelSelection;if(!r||!Fe(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&&be(i)&&me(i)?r:e.textGenerationModelSelection}function kn(e,t,n){let r=e.reviewGuideModelSelection;if(r&&Fe(e,n,r.instanceId)){let e=t?.find(e=>e.instanceId===r.instanceId);if(t===void 0||e?.enabled===!0&&be(e)&&me(e))return r}return On(e,t,n)}function An(e,t={}){return{favorites:e.favorites??t.favorites??[],providerModelPreferences:e.providerModelPreferences??t.providerModelPreferences??{}}}function jn(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 Mn=new Set([`continueThreadsAfterServerUpdate`,`sidebarAutoSettleAfterDays`,`sidebarAutoSettleOnMerge`,`autoResumeLimitedThreads`,`snoozeLimitedThreads`,`newWorktreesStartFromOrigin`,`sourceControlWritingStyle`,`textGenerationModelSelection`]);function Nn(e){let t={},n={};for(let[r,i]of Object.entries(e))Mn.has(r)?t[r]=i:n[r]=i;return{sharedPatch:t,localPatch:n}}function Pn(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)||!Tn(n,{...n.textGenerationModelSelection,...e.textGenerationModelSelection}))&&(e=ce(e,[`textGenerationModelSelection`])),t?.threadRestartContinuation===!0?e:ce(e,[`continueThreadsAfterServerUpdate`])}function Fn(e){return e.connection.phase===`connected`&&e.serverConfig?.environment.capabilities.threadAutoSettlement===!0}var In=`[CLIENT_SETTINGS]`,Ln=new Set,Rn=new Set,zn=_e,J=`pending`,Y=null,Bn=0,Vn=Promise.resolve(),Hn=0;function Un(){for(let e of Ln)e()}function Wn(){for(let e of Rn)e()}function X(){return zn}function Z(e){zn=e,Un()}function Gn(e){J!==e&&(J=e,Wn())}function Kn(e){return Ln.add(e),Q().catch(()=>void 0),()=>{Ln.delete(e)}}function qn(){return J===`ready`}function Jn(){return J}function Yn(e){return Rn.add(e),Q().catch(()=>void 0),()=>{Rn.delete(e)}}async function Q(){if(J===`ready`)return;if(Y)return Y;let e=Bn;Gn(J===`failed`||J===`retrying`?`retrying`:`pending`);let t=(async()=>{try{let t=await Rt().persistence.getClientSettings();if(e!==Bn)return;t&&Z({..._e,...t}),Gn(`ready`)}catch(t){throw e===Bn&&Gn(`failed`),console.error(`${In} hydrate failed`,{operation:`hydrate`,...v(t)}),t}})().finally(()=>{Y===t&&(Y=null)});return Y=t,Y}var Xn=e=>Rt().persistence.setClientSettings(e);function Zn(e){let t=Vn.then(e);return Vn=t.then(()=>void 0,()=>void 0),t}function Qn(e,t=Xn){let n=J!==`ready`||Hn>0;return n?Hn+=1:Z({...X(),...e}),Zn(async()=>{if(n)try{J!==`ready`&&await Q(),Z({...X(),...e})}finally{--Hn}await t(X())}).catch(e=>{console.error(`${In} persist failed`,{operation:`persist`,...v(e)})})}async function $n(e,t=Xn){return Zn(async()=>{for(J!==`ready`&&await Q();;){let n=X(),r=e(n);if(await t(r),X()===n)return Z(r),r}})}var er=new Set(Ie(xe.fields));function tr(e){let t={},n={};for(let[r,i]of Object.entries(e))er.has(r)?t[r]=i:n[r]=i;return{serverPatch:t,clientPatch:n}}function nr(){return X()}function rr(){return Q()}function ir(){return(0,S.useSyncExternalStore)(Yn,qn,ar)}function ar(){return!1}function or(){return(0,S.useSyncExternalStore)(Yn,Jn,sr)}function sr(){return`pending`}function $(){return(0,S.useSyncExternalStore)(Kn,X,cr)}function cr(){return _e}function lr(e,t){return{...t,...e,...An(e,t)}}var ur=new Set;function dr(e,t){let n=(0,C.c)(8),r=$(),i=ir(),a;n[0]===Symbol.for(`react.memo_cache_sentinel`)?(a={reportFailure:!1},n[0]=a):a=n[0];let o=qe(b.updateSettings,a),s,c;n[1]!==r||n[2]!==e||n[3]!==i||n[4]!==o||n[5]!==t?(s=()=>{if(!e||!t||!i||ur.has(e))return;let n=jn(t,r);n&&(ur.add(e),o({environmentId:e,input:{patch:n}}).finally(()=>ur.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,S.useEffect)(s,c)}function fr(e,t){let n=(0,C.c)(6),r=$(),i;n[0]!==r||n[1]!==e?(i=lr(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 pr(e){let t=(0,C.c)(3),n=$(),r;return t[0]!==e||t[1]!==n?(r=e?e(n):n,t[0]=e,t[1]=n,t[2]=r):r=t[2],r}function mr(e){return e.settingsHydrated?e.paletteThemeActive&&!e.paletteThemeAllowsArtwork&&e.mode===`artwork`?`pill`:e.mode:`none`}function hr(){let e=(0,C.c)(7),t=ir(),n=$().environmentIdentificationMode,{resolvedTheme:r,theme:i,themeHalves:a}=pn(),o=(0,S.useSyncExternalStore)(Je,lt,gr),s;if(e[0]!==n||e[1]!==o||e[2]!==r||e[3]!==t||e[4]!==i||e[5]!==a){let c=Xe(i,a,r),l=st(c);s=mr({mode:n,settingsHydrated:t,paletteThemeActive:o!==null||l!==null,paletteThemeAllowsArtwork:o??$e(c)}),e[0]=n,e[1]=o,e[2]=r,e[3]=t,e[4]=i,e[5]=a,e[6]=s}else s=e[6];return s}function gr(){return null}async function _r(e,t){return(e.favorites===null||e.providerModelPreferences===null)&&await rr(),{...jn(e,nr()),...t}}function vr(e){let t=(0,C.c)(6),n;t[0]===e?n=t[1]:(n=e?b.settingsValueAtom(e):br,t[0]=e,t[1]=n);let r=h(n),i=qe(b.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 _r(r,t)}catch{y.add({type:`error`,title:`Model preferences not saved`,description:`Could not load saved model preferences. Try again.`});return}return i({environmentId:e,input:{patch:n}})},t[2]=e,t[3]=i,t[4]=r,t[5]=a):a=t[5],a}function yr(e){let t=(0,S.use)(fe),n=(0,S.useRef)(new Map),r=vr(e);return(0,S.useCallback)(async(i,a)=>{if(!e)return;let o=b.settingsValueAtom(e),s=t.get(o);if(!s)return;if(s.favorites===null)try{await rr()}catch{y.add({type:`error`,title:`Favorites not saved`,description:`Could not load saved model preferences. Try again.`});return}let c=t.get(o)??s,l=An(c,nr()).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&&Le(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 br=n(null);function xr(e){let t=(0,C.c)(5),n;t[0]===e?n=t[1]:(n=e?b.settingsValueAtom(e):br,t[0]=e,t[1]=n);let r=h(n),i=$();dr(e,r);let a=r??ye,o;return t[2]!==i||t[3]!==a?(o=An(a,i),t[2]=i,t[3]=a,t[4]=o):o=t[4],o}function Sr(e,t){let n=(0,C.c)(2),r;n[0]===e?r=n[1]:(r=b.settingsValueAtom(e),n[0]=e,n[1]=r);let i=h(r);return dr(e,i),fr(i??ye,t)}function Cr(e){let t=(0,C.c)(4),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n={reportFailure:!1},t[0]=n):n=t[0];let r=qe(b.mutateProviderInstance,n),i;return t[1]!==e||t[2]!==r?(i=(t,n)=>r({environmentId:e,input:{patch:n===void 0?{}:n,providerInstanceMutation:t}}),t[1]=e,t[2]=r,t[3]=i):i=t[3],i}function wr(e){let t=He(),n=h(Ue);return dr(t?.environmentId??null,t?.serverConfig?.settings??null),fr(n,e)}var Tr=`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 Er(){let e=(0,C.c)(2),t=He(),n;return e[0]===t?n=e[1]:(n=t!==null||!Be(),e[0]=t,e[1]=n),n}function Dr(e){let t=(0,C.c)(3),r=e!==void 0&&e,{environments:i}=Ve(),a;return t[0]!==i||t[1]!==r?(a=n(e=>i.filter(Fn).flatMap(t=>{let n=e(Ke.sessionStateAtom(t.environmentId));if(r&&n._tag===`Initial`)return[t.environmentId];let i=n._tag===`Failure`?null:re(le(n));return i!==null&&Te(i,`settings:write`)?[t.environmentId]:[]})),t[0]=i,t[1]=r,t[2]=a):a=t[2],h(a)}function Or(e){let t=(0,C.c)(10);We(e,o);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=qe(b.updateSettings,n),{environments:i}=Ve(),a;t[1]!==i||t[2]!==r?(a=async e=>{let t=await r(e);if(t._tag===`Failure`&&!Re(t)){let n=i.find(t=>t.environmentId===e.environmentId)?.label??e.environmentId,r=ze(t);y.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 c=a,l=Dr(!0),u;return t[4]!==e||t[5]!==i||t[6]!==r||t[7]!==c||t[8]!==l?(u=t=>{let{serverPatch:n,clientPatch:a}=tr(t),o=e===null||s(n).every(t=>Ge(e,t));if(Object.keys(n).length>0&&!o&&y.add({type:`warning`,title:`Setting not saved`,description:`This connection lacks permission to change settings on ${i.find(t=>t.environmentId===e)?.label??`the selected environment`}.`}),Object.keys(n).length>0&&o){let{sharedPatch:t,localPatch:a}=Nn(n),o=Nr;if(Object.keys(a).length>0&&(e?c({environmentId:e,input:{patch:a}}):o()),Object.keys(t).length>0){let n=i.find(t=>t.environmentId===e)?.serverConfig?.settings,a=new Set(l);e&&a.add(e);let c=[],u=[];for(let r of a){let a=i.find(e=>e.environmentId===r),o=Pn(t,a?.serverConfig?.environment.capabilities,a?.serverConfig?.settings,n,r===e);if(Object.keys(o).length!==0){if(ee.get(Ke.sessionStateAtom(r))._tag!==`Initial`&&!s(t).every(e=>Ge(r,e))){u.push(a?.label??r);continue}c.push({environmentId:r,input:{patch:o}})}}c.length===0?o(u.length>0?`This connection lacks permission to change settings on ${u.join(`, `)}.`:a.size>0?`Update older servers to save this setting.`:void 0):Promise.all(c.map(async e=>({label:i.find(t=>t.environmentId===e.environmentId)?.label??e.environmentId,result:await r(e)}))).then(kr)}}Object.keys(a).length>0&&Qn(a)},t[4]=e,t[5]=i,t[6]=r,t[7]=c,t[8]=l,t[9]=u):u=t[9],u}function kr(e){let t=e.flatMap(Mr);if(t.length===0)return;let n=e.filter(jr).map(Ar);y.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
2
|
`)})}function Ar(e){let{label:t}=e;return t}function jr(e){let{result:t}=e;return t._tag===`Success`}function Mr(e){let{label:t,result:n}=e;if(n._tag!==`Failure`||Re(n))return[];let r=ze(n);return[`Could not save on ${t}: ${r instanceof Error?r.message:`The save failed. Try reconnecting and saving again.`}`]}function Nr(e){let t=e===void 0?Tr:e;return y.add({type:`warning`,title:`Setting not saved`,description:t})}function Pr(e){return Or(e)}function Fr(){return Or(He()?.environmentId??null)}function Ir(){return Lr}function Lr(e){return Qn(e)}export{_n as A,yt as B,kn as C,xn as D,G as E,an as F,vt as G,pt as H,pn as I,mt as K,Rt as L,Bt as M,Vt as N,Cn as O,$t as P,Lt as R,Dn as S,K as T,ht as U,_t as V,gt as W,yr as _,Qn as a,Pr as b,ir as c,xr as d,Sr as f,Er as g,wr as h,lr as i,V as j,Sn as k,or as l,Cr as m,rr as n,$n as o,dr as p,nr as r,pr as s,Tr as t,hr as u,Ir as v,On as w,Fr as x,vr as y,Dt as z};
|
|
3
|
-
//# sourceMappingURL=useSettings-
|
|
3
|
+
//# sourceMappingURL=useSettings-CUN8qNLl.js.map
|
package/dist/client/assets/{useT3ConnectAuthPrompt-D0cW1Kb6.js → useT3ConnectAuthPrompt-BgqISbBe.js}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{NE as e}from"./utils-
|
|
2
|
-
//# sourceMappingURL=useT3ConnectAuthPrompt-
|
|
1
|
+
import{NE as e}from"./utils-BgVDKR83.js";import{t}from"./env-wK1YYxA8.js";import{i as n}from"./dist-CtlrzKKg.js";import{t as r}from"./authRedirect-DWE5a_T9.js";var i=e();function a(){let e=(0,i.c)(2),a=n(),o;return e[0]===a?o=e[1]:(o={authPrompt:null,openAuthPrompt:()=>{a.openSignIn(r(window.location.href,t))}},e[0]=a,e[1]=o),o}export{a as t};
|
|
2
|
+
//# sourceMappingURL=useT3ConnectAuthPrompt-BgqISbBe.js.map
|