@p4code/cli 0.9.20 → 0.9.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{TraceDiagnostics-BYrlvKdA.mjs → TraceDiagnostics-DEAfnZGb.mjs} +2 -2
- package/dist/bin.mjs +1 -1
- package/dist/{binCli-DReuiGmk.mjs → binCli-IfUU-uWs.mjs} +5 -5
- package/dist/client/.vite/manifest.json +1107 -1107
- package/dist/client/assets/{2NI2N5EU-DjM2qwkD.js → 2NI2N5EU-qP3PpVDC.js} +2 -2
- package/dist/client/assets/{4UO7MD6I-BJdq41GZ.js → 4UO7MD6I-Da5jHHfF.js} +2 -2
- package/dist/client/assets/{5B3SVYGG-D21CBy6j.js → 5B3SVYGG-BGHUtemY.js} +2 -2
- package/dist/client/assets/{5GK6JWQ2-DOIdqlC8.js → 5GK6JWQ2-DwbHk3MV.js} +2 -2
- package/dist/client/assets/{5N7A7DKN-Bckll9rH.js → 5N7A7DKN-B-2quXAp.js} +2 -2
- package/dist/client/assets/{5OC2THR4-skJPz5iO.js → 5OC2THR4-DSQWJ0ZQ.js} +2 -2
- package/dist/client/assets/{5S6HY5KT-CRwXaSb1.js → 5S6HY5KT-CAwEcA6I.js} +2 -2
- package/dist/client/assets/{6IMQ5BUJ-sJYhkmUL.js → 6IMQ5BUJ-BABYtiev.js} +2 -2
- package/dist/client/assets/{6OLKWJ4F-DY2aNKk1.js → 6OLKWJ4F-CwQRt55E.js} +2 -2
- package/dist/client/assets/{74OO7NKP-DpZyVE6P.js → 74OO7NKP-DZoL_aBI.js} +2 -2
- package/dist/client/assets/{75O6YZUN-8DIThGtQ.js → 75O6YZUN-CoqdPLhF.js} +2 -2
- package/dist/client/assets/{77XECAW3-BE-MTjvu.js → 77XECAW3-DM5Itfvk.js} +2 -2
- package/dist/client/assets/{ABYRPUBD-DB_eiHX6.js → ABYRPUBD-C2IaQicJ.js} +2 -2
- package/dist/client/assets/{AuthSurfaceShell-BM3c1qJe.js → AuthSurfaceShell-Dfcdz_aG.js} +2 -2
- package/dist/client/assets/{BB2UYUI2-BhRNS6b8.js → BB2UYUI2-DQkTEBDf.js} +2 -2
- package/dist/client/assets/{BUM34MOA-RvYWUXux.js → BUM34MOA-DuY83HEN.js} +2 -2
- package/dist/client/assets/{CEQABKGZ-byct14yE.js → CEQABKGZ-CNAynrzB.js} +2 -2
- package/dist/client/assets/{CXAC5362-YcQsQFwj.js → CXAC5362-B_mhvA6r.js} +2 -2
- package/dist/client/assets/{ChatGptUsageButton-BQOZ260S.js → ChatGptUsageButton-DT3CRIhB.js} +2 -2
- package/dist/client/assets/{ChatMarkdown-BdoTEVpd.js → ChatMarkdown-_SLyl8Hk.js} +5 -5
- package/dist/client/assets/{CodexSetupSection.logic-CseyxFgK.js → CodexSetupSection.logic-CqdvWoE6.js} +2 -2
- package/dist/client/assets/{CommandBlock-Cg8P2GXg.js → CommandBlock-DnTIHX5l.js} +2 -2
- package/dist/client/assets/{ConnectAgentSurface-D9MYjA6g.js → ConnectAgentSurface-D-Z7Gl3G.js} +2 -2
- package/dist/client/assets/{DRLTVNUE-BZ7eTlHc.js → DRLTVNUE-Bp-Mh_TD.js} +2 -2
- package/dist/client/assets/{DYY6UVD2-DIWnFjlV.js → DYY6UVD2-Dwh9ZkXt.js} +2 -2
- package/dist/client/assets/{DevicePanel-CpWnw2HZ.js → DevicePanel-MMC7u5qJ.js} +2 -2
- package/dist/client/assets/{DeviceSetup-C02U1yvN.js → DeviceSetup-BCrBVLkf.js} +2 -2
- package/dist/client/assets/{DiffCommentAnnotation-CHYeyesq.js → DiffCommentAnnotation-D7iLWjnP.js} +2 -2
- package/dist/client/assets/{DiffFileTree-zq0G5Jq3.js → DiffFileTree-PCGZGqlB.js} +2 -2
- package/dist/client/assets/{DiffPanel-ghqOrQdi.js → DiffPanel-OOedo4tu.js} +2 -2
- package/dist/client/assets/{DiffWorkerPoolProvider-QbRiMHeR.js → DiffWorkerPoolProvider-CmorWW2H.js} +2 -2
- package/dist/client/assets/{EmbeddedDesign-ExUecHKZ.js → EmbeddedDesign-CeUGLwuZ.js} +4 -4
- package/dist/client/assets/{FNOVOB4O-Cch7VyQQ.js → FNOVOB4O-BJscBtWY.js} +2 -2
- package/dist/client/assets/{FileDiff-C1_8HZ7T.js → FileDiff-BMtpmo0v.js} +2 -2
- package/dist/client/assets/{FilePreviewPanel-DERxofVe.js → FilePreviewPanel-DUqI7pF3.js} +2 -2
- package/dist/client/assets/{FoldedSettingsSection-okCu3zVD.js → FoldedSettingsSection-BTMENmDo.js} +2 -2
- package/dist/client/assets/{HDGCDEEZ-CJ_9BjZ0.js → HDGCDEEZ-BA3H_tu4.js} +2 -2
- package/dist/client/assets/{HSJLKHB7-BvfNYUiJ.js → HSJLKHB7-BojHXJG0.js} +2 -2
- package/dist/client/assets/{IntervalSecondsField-S7jLIub2.js → IntervalSecondsField-Cpc7UePr.js} +2 -2
- package/dist/client/assets/JZOYTAAL-Bw2-11fa.js +1 -0
- package/dist/client/assets/{K3MD6TGW-C513S1_s.js → K3MD6TGW-hwfRTJ3N.js} +2 -2
- package/dist/client/assets/{K7RP3OMA-zhgZmSWl.js → K7RP3OMA-4mJh9KrG.js} +2 -2
- package/dist/client/assets/{LHDIQX7Q-BmjYN5gQ.js → LHDIQX7Q-LIdvhN0m.js} +2 -2
- package/dist/client/assets/{LUXOKEGN-B0Kwi43W.js → LUXOKEGN-B1aHy25-.js} +2 -2
- package/dist/client/assets/{LinkMachineSelect-GyKAeGYQ.js → LinkMachineSelect-CM7JZDuM.js} +2 -2
- package/dist/client/assets/{MathTypeset-DfU_zRMI.js → MathTypeset-CA2nw_Ej.js} +2 -2
- package/dist/client/assets/{ModelLiveLayer-DjtYQpVe.js → ModelLiveLayer-CPk6oSLz.js} +3 -3
- package/dist/client/assets/{N3JZAHOW-BXB2c-Us.js → N3JZAHOW-Dz6QAj1L.js} +2 -2
- package/dist/client/assets/{NUIALGQ3-BkehuL9A.js → NUIALGQ3-W9kPoZrb.js} +2 -2
- package/dist/client/assets/{NoProjectsHero-C-VNr8Ui.js → NoProjectsHero-DrTDAhjM.js} +2 -2
- package/dist/client/assets/{O65XPQGZ-CPn-XJue.js → O65XPQGZ-CPx16bPB.js} +2 -2
- package/dist/client/assets/{O7XIQ6OM-DAQPVVnq.js → O7XIQ6OM-CAdGDrqF.js} +2 -2
- package/dist/client/assets/{OFQON5FD-BKoNBxEK.js → OFQON5FD-DOxYOpsO.js} +2 -2
- package/dist/client/assets/{P4ConnectAccountPages-C_7SfUQ2.js → P4ConnectAccountPages-D0qqCxCf.js} +2 -2
- package/dist/client/assets/{P4ConnectSidebarSignIn-B6e-wkqI.js → P4ConnectSidebarSignIn-CtO1hqIS.js} +2 -2
- package/dist/client/assets/{PJQHF43J-Byb4NdRa.js → PJQHF43J-CEic-zJ0.js} +2 -2
- package/dist/client/assets/{PanelLayoutControls-BpjspxNc.js → PanelLayoutControls-CPevLAhG.js} +4 -4
- package/dist/client/assets/{PierreEntryIcon-h4qT502J.js → PierreEntryIcon-oOiSTYpG.js} +2 -2
- package/dist/client/assets/{PreviewPanel-lT6UT8SC.js → PreviewPanel-BSwObBjW.js} +2 -2
- package/dist/client/assets/{ProjectDefaultsSettings-nqWOPUBM.js → ProjectDefaultsSettings-BkxL8Xjx.js} +2 -2
- package/dist/client/assets/{ProjectFavicon-wwkvNTYJ.js → ProjectFavicon-DYcNXMDQ.js} +3 -3
- package/dist/client/assets/{ProjectIconPickerDialog-CAEx0HQF.js → ProjectIconPickerDialog-CnlPMGQj.js} +2 -2
- package/dist/client/assets/{ProviderAuthTerminal-Seln-0IQ.js → ProviderAuthTerminal-B1NeqFZE.js} +2 -2
- package/dist/client/assets/{ProviderModelPicker-p5oWTfTD.js → ProviderModelPicker-CLwSFV6Q.js} +2 -2
- package/dist/client/assets/{ProviderSettingsForm-DP5cO9tc.js → ProviderSettingsForm-D9GJtzdb.js} +2 -2
- package/dist/client/assets/{PullRequestCodeTab-BhWK4Zqq.js → PullRequestCodeTab-CajEWSe5.js} +2 -2
- package/dist/client/assets/{RHNBAITX-ZKmIoa8f.js → RHNBAITX-D5lTu0BB.js} +2 -2
- package/dist/client/assets/{ReadOnlySourcePreview-C8hhN481.js → ReadOnlySourcePreview-LxG8Br9J.js} +2 -2
- package/dist/client/assets/{RenderErrorBoundary-CYWiIuBa.js → RenderErrorBoundary-CcI-4Zo3.js} +2 -2
- package/dist/client/assets/{SLD4V6NK-BW_1--rc.js → SLD4V6NK-CG_xQFi-.js} +2 -2
- package/dist/client/assets/{ScheduledTasksSettings-D6cHBUhW.js → ScheduledTasksSettings-CSygG_5X.js} +2 -2
- package/dist/client/assets/{ScopedSwitch-BzU8Hn6s.js → ScopedSwitch-LzARRHas.js} +2 -2
- package/dist/client/assets/{SelfImproveSettingsSection--Dcxxm73.js → SelfImproveSettingsSection-DjuOvf_q.js} +2 -2
- package/dist/client/assets/{SettingsPanels-C79826rW.js → SettingsPanels-Ci2h30Aw.js} +2 -2
- package/dist/client/assets/{SettingsPanels.logic-DPfiTtgf.js → SettingsPanels.logic-BkjrmwrI.js} +2 -2
- package/dist/client/assets/{SettingsScopeNotice-C9OAfACb.js → SettingsScopeNotice-96p-bg8p.js} +2 -2
- package/dist/client/assets/{SidebarStageBackdrop-syJ1VaYP.js → SidebarStageBackdrop-B8YG-M-e.js} +2 -2
- package/dist/client/assets/{T3PCR2KE-Bc51hYDo.js → T3PCR2KE-DyNYo7Zy.js} +2 -2
- package/dist/client/assets/{TKWO2OVW-mV-gJkJw.js → TKWO2OVW-5eCjJCfz.js} +2 -2
- package/dist/client/assets/{TSHNXIZL-Bs_azRDw.js → TSHNXIZL-CjI9VTqp.js} +2 -2
- package/dist/client/assets/{ThemeEditorPanel-DvlDdC-r.js → ThemeEditorPanel-BdfXdTV6.js} +2 -2
- package/dist/client/assets/{ThreadDetailsItemsMenu-DFAwPwtf.js → ThreadDetailsItemsMenu-Cgj2yuzU.js} +4 -4
- package/dist/client/assets/{ThreadTerminalDrawer-CBRpijGu.js → ThreadTerminalDrawer-DBG1eHBS.js} +2 -2
- package/dist/client/assets/{UQJE5E4I-DL8IPyLr.js → UQJE5E4I-CY9HwTsw.js} +2 -2
- package/dist/client/assets/{USNYFO5S-CxX5m2eb.js → USNYFO5S-BW0HcjRg.js} +2 -2
- package/dist/client/assets/{Virtualizer-hL0IrPqB.js → Virtualizer-NI9bqlwX.js} +2 -2
- package/dist/client/assets/{WEVWDWVA-CCg7BLOe.js → WEVWDWVA-BF8z-yRH.js} +2 -2
- package/dist/client/assets/{X5RFHQXM-CoEhAoaG.js → X5RFHQXM-pdor6bX7.js} +2 -2
- package/dist/client/assets/{X62E3GBT-v3am3MF5.js → X62E3GBT-C6b2WsLT.js} +2 -2
- package/dist/client/assets/{XBNEOJTC-CNH8QiJb.js → XBNEOJTC-BxqaKoJL.js} +2 -2
- package/dist/client/assets/{YHV2MVVZ-BAtBSLld.js → YHV2MVVZ-DO-ICZOV.js} +2 -2
- package/dist/client/assets/{YURCZMG2-B0qIfRPW.js → YURCZMG2-BxKVNupW.js} +2 -2
- package/dist/client/assets/{YVG2LODB-7yKJRNqu.js → YVG2LODB-BwiP1iS0.js} +2 -2
- package/dist/client/assets/{_chat-CPyEKO_k.js → _chat-DDScEBKF.js} +5 -5
- package/dist/client/assets/{_chat.design-BkPz6B_R.js → _chat.design-360SdjDb.js} +2 -2
- package/dist/client/assets/{_chat.index-DGRldHwy.js → _chat.index-DsRV2lh0.js} +2 -2
- package/dist/client/assets/{_chat.new-Be-FWv3w.js → _chat.new-B_AL_NJ2.js} +2 -2
- package/dist/client/assets/{_chat.pull-requests-Csb_f8e_.js → _chat.pull-requests-DlL4gjh7.js} +2 -2
- package/dist/client/assets/{assetUrls-CsEDCYyh.js → assetUrls-gAudvjhV.js} +2 -2
- package/dist/client/assets/{assets-CA-ZYmQr.js → assets-DaZ46ybf.js} +2 -2
- package/dist/client/assets/{browserHistoryStore-BVGoot2u.js → browserHistoryStore-CIeLvEnV.js} +2 -2
- package/dist/client/assets/{browserLinkTarget-zjhG9Lyg.js → browserLinkTarget-MQvtO-01.js} +2 -2
- package/dist/client/assets/{connect-BdyG6QZP.js → connect-DkCGs4oR.js} +2 -2
- package/dist/client/assets/connect-agent-C4n-OyN3.js +2 -0
- package/dist/client/assets/{design-9PZeJvkV.js → design-Djc1_eDF.js} +2 -2
- package/dist/client/assets/{device-B_zaE4OU.js → device-P8L_QiVD.js} +2 -2
- package/dist/client/assets/{diffRendering-aGA2PUMV.js → diffRendering-Cb9qJUqp.js} +2 -2
- package/dist/client/assets/{dist-DQanjDEK.js → dist-BocOAtMa.js} +2 -2
- package/dist/client/assets/{duoViewer-WUHHsw83.js → duoViewer-Domn2baW.js} +2 -2
- package/dist/client/assets/{dynamic-BrZIqKQ1.js → dynamic-CjS-lEY3.js} +2 -2
- package/dist/client/assets/{embeddedScripts-Bjon5VEq.js → embeddedScripts-AO2vzovy.js} +2 -2
- package/dist/client/assets/{entities-iVR9hStG.js → entities-s42SFcbu.js} +2 -2
- package/dist/client/assets/{fileLinks-ZsyrXe-F.js → fileLinks-BY6FjK66.js} +2 -2
- package/dist/client/assets/{fileTreeExpansion-CZA6X0sP.js → fileTreeExpansion-B--IBStv.js} +2 -2
- package/dist/client/assets/{getDiffFileInput-C973oCCO.js → getDiffFileInput-B7pCnCeh.js} +2 -2
- package/dist/client/assets/{index-ColdECgE.js → index-C5VbGbq-.js} +3 -3
- package/dist/client/assets/{lazy-BWBxhQ9c.js → lazy-Bpm7QNt6.js} +4 -4
- package/dist/client/assets/{linkedPrompt-CN5vzMKu.js → linkedPrompt-DqEOywCR.js} +2 -2
- package/dist/client/assets/{main-xeaL6Ue7.js → main-BYwnnJ9E.js} +7 -7
- package/dist/client/assets/{mediaReference-D4xASAKr.js → mediaReference-CW0q8-nM.js} +2 -2
- package/dist/client/assets/{mediaSource-DJf0a3Hm.js → mediaSource-BgP2sq1w.js} +2 -2
- package/dist/client/assets/{modelScene-Dg2T9WKU.js → modelScene-OONljnCt.js} +2 -2
- package/dist/client/assets/{onboarding-7dyWHc7v.js → onboarding-DLaBhCVN.js} +2 -2
- package/dist/client/assets/{openFileInPreview-l71la8rp.js → openFileInPreview-Dpge7x7S.js} +2 -2
- package/dist/client/assets/{p4ProjectFile-CC8L8IBq.js → p4ProjectFile-Fd0NSHmZ.js} +2 -2
- package/dist/client/assets/{pair-CjGF7d0N.js → pair-BUkFlR8l.js} +2 -2
- package/dist/client/assets/{phoneViewer-CpRP0Ylg.js → phoneViewer-BJj_96At.js} +2 -2
- package/dist/client/assets/{pierre-icons-CX8MNnZC.js → pierre-icons-BptmNFMW.js} +2 -2
- package/dist/client/assets/{preview-DX0t2QY_.js → preview-BBssbPEj.js} +2 -2
- package/dist/client/assets/{primary-BvBZk3BL.js → primary-TNEEuOuT.js} +2 -2
- package/dist/client/assets/{primaryCloudLinkState-CHXPTqr2.js → primaryCloudLinkState-DbUZbjy4.js} +2 -2
- package/dist/client/assets/{projectFilesQueryState-D1KYNZXm.js → projectFilesQueryState-CVSEDHhW.js} +2 -2
- package/dist/client/assets/{projectScriptEditor-Dy8U6TBl.js → projectScriptEditor-D2C0qPZA.js} +2 -2
- package/dist/client/assets/{providerSkills-CpjiWlTj.js → providerSkills-5OBbbZq-.js} +2 -2
- package/dist/client/assets/{pullRequestDetail.logic-CHJRE71s.js → pullRequestDetail.logic-D5hhGj8d.js} +2 -2
- package/dist/client/assets/{pullRequests-DjzqqdNY.js → pullRequests-R7416J6H.js} +2 -2
- package/dist/client/assets/{queries-D2fZuj-t.js → queries-Bp7Rbzrz.js} +2 -2
- package/dist/client/assets/{relay-aZlRxOWS.js → relay-V_5ApBIP.js} +2 -2
- package/dist/client/assets/{renderScheduler-BLaTctiX.js → renderScheduler-T1-hnpvd.js} +2 -2
- package/dist/client/assets/{runtime-D5AfNyNA.js → runtime-B92ivG9b.js} +3 -3
- package/dist/client/assets/{scheduledTasksSettings.logic-BjvsiCPJ.js → scheduledTasksSettings.logic-DOegPD4_.js} +2 -2
- package/dist/client/assets/{server-B2y_yoz_.js → server-GB5fRm03.js} +2 -2
- package/dist/client/assets/{session-Dt_Dt-Og.js → session-CFzb2gMH.js} +2 -2
- package/dist/client/assets/{session-logic-CPQJM-gL.js → session-logic-Cx9524Pd.js} +2 -2
- package/dist/client/assets/{settings-BIR_Igib.js → settings-DuV3USCX.js} +2 -2
- package/dist/client/assets/{settings.appearance-D0uNLG6m.js → settings.appearance-DtON2De5.js} +2 -2
- package/dist/client/assets/settings.archived-CxxKM6i3.js +2 -0
- package/dist/client/assets/{settings.computer-use-CNVg4Kl5.js → settings.computer-use-BuiCBgaZ.js} +2 -2
- package/dist/client/assets/{settings.connections-Bt5upKXR.js → settings.connections-CTuywqD3.js} +2 -2
- package/dist/client/assets/{settings.data-controls-Bu-fCPHf.js → settings.data-controls-BTvw7hwA.js} +2 -2
- package/dist/client/assets/{settings.decisions-B9lckxtw.js → settings.decisions-DjyXWkGE.js} +2 -2
- package/dist/client/assets/{settings.designs-CLLnQttY.js → settings.designs-B7y3Iz_g.js} +2 -2
- package/dist/client/assets/{settings.diagnostics-Bl2X85nQ.js → settings.diagnostics-muot_u8V.js} +2 -2
- package/dist/client/assets/{settings.general-CJSdSR2k.js → settings.general-CejKrS3r.js} +2 -2
- package/dist/client/assets/{settings.integrations-DRpNV9D5.js → settings.integrations-3B64nKur.js} +2 -2
- package/dist/client/assets/{settings.keybindings-BPtpYe84.js → settings.keybindings-DhvXS2QI.js} +2 -2
- package/dist/client/assets/{settings.open-source-licenses-DYpshDh1.js → settings.open-source-licenses-nDTYUclU.js} +2 -2
- package/dist/client/assets/{settings.plugins-C9ZOoiar.js → settings.plugins-DJQxiL8Y.js} +2 -2
- package/dist/client/assets/{settings.projects-CMHQJUvG.js → settings.projects-Cf31zLX1.js} +3 -3
- package/dist/client/assets/{settings.providers-Bfr9fIiF.js → settings.providers-BenYwp5l.js} +3 -3
- package/dist/client/assets/{settings.scheduled-tasks-BEYOe2xs.js → settings.scheduled-tasks-B0BJtx2Y.js} +2 -2
- package/dist/client/assets/{settings.secrets-DIyDPOQx.js → settings.secrets-CugtPHky.js} +2 -2
- package/dist/client/assets/{settings.snap-shot-DmjWtA3x.js → settings.snap-shot-9uuaPZ8d.js} +2 -2
- package/dist/client/assets/{settings.source-control-DvaOZ7kM.js → settings.source-control-DECPD9xY.js} +2 -2
- package/dist/client/assets/{settings.storage-B4XbjYVO.js → settings.storage-uPkJDu8D.js} +2 -2
- package/dist/client/assets/{settingsLayout-Ds1fJJk7.js → settingsLayout-BoWaVHvV.js} +2 -2
- package/dist/client/assets/{sidebarProjectGrouping-RQlsFe56.js → sidebarProjectGrouping-MU2UfzY1.js} +2 -2
- package/dist/client/assets/{sourceControl-BhvxhaEx.js → sourceControl-BU6NXFEv.js} +2 -2
- package/dist/client/assets/{sourceControlClients-Bs5R87fg.js → sourceControlClients-DBozOkI3.js} +2 -2
- package/dist/client/assets/{terminal-links-BohHFDfc.js → terminal-links-B5f_yaZ1.js} +2 -2
- package/dist/client/assets/{terminalSessions-Cnj30QDx.js → terminalSessions-Cg0AQjBU.js} +2 -2
- package/dist/client/assets/{uiStateStore-BZ4RuLIL.js → uiStateStore-u_PaGpa6.js} +2 -2
- package/dist/client/assets/{usage-GID8Ml88.js → usage-BzExgBit.js} +2 -2
- package/dist/client/assets/{use-atom-command-QDd_NqJQ.js → use-atom-command-Bd7vZxeH.js} +2 -2
- package/dist/client/assets/{useHandleNewThread-ClgC6Lcw.js → useHandleNewThread-CA9pnWuC.js} +2 -2
- package/dist/client/assets/{useP4ConnectAuthPrompt-DMl-0U53.js → useP4ConnectAuthPrompt-czmNhUqV.js} +2 -2
- package/dist/client/assets/{usePullRequestActions-CJvtylIq.js → usePullRequestActions-BIPl_xE4.js} +2 -2
- package/dist/client/assets/{useScopedModelAvailability-DGPFTMHL.js → useScopedModelAvailability-UuZvj6HE.js} +2 -2
- package/dist/client/assets/{useSettings-BJR7Rf97.js → useSettings-Dp9RSL-0.js} +2 -2
- package/dist/client/assets/{vcsRefInvalidation-Bnup-5J0.js → vcsRefInvalidation-CoBKCEWS.js} +2 -2
- package/dist/client/assets/{welcome-CMuTnFAm.js → welcome-CJjj0VVp.js} +2 -2
- package/dist/client/index.html +1 -1
- package/dist/{preview-DcFC_OYY.mjs → preview-JlPVV2bV.mjs} +2 -2
- package/dist/{runtimeLayer-D4LpzNmS.mjs → runtimeLayer-B9K2BVKV.mjs} +4 -4
- package/dist/{runtimeLayer-B6H9jZgZ.mjs → runtimeLayer-ZFdf4c6R.mjs} +1 -1
- package/dist/{server-4nWc1d6L.mjs → server-BnHhGuOc.mjs} +4 -4
- package/package.json +1 -1
- package/dist/client/assets/JZOYTAAL-RUIcMwMn.js +0 -1
- package/dist/client/assets/connect-agent-BZgF1WVU.js +0 -2
- package/dist/client/assets/settings.archived-DHE_0aGh.js +0 -2
package/dist/client/assets/{ProviderSettingsForm-DP5cO9tc.js → ProviderSettingsForm-D9GJtzdb.js}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e,t}from"./react-BUfh6y28.js";import{n,t as r}from"./jsx-runtime-DJeoFXNw.js";import{Xd as i,ap as a,mr as o,t as s}from"./utils-DkKLB01I.js";import{$c as c,Ic as l,Xn as u,el as d,mh as f}from"./src-R7EkrVcv.js";import{a as p,c as m,o as h,s as g,t as _}from"./select-CE2f-g-3.js";import{t as v}from"./textarea-CWbMGhL9.js";import{t as y}from"./input-CiPGmOLv.js";import{a as b}from"./settingsLayout-Ds1fJJk7.js";import{Mo as x}from"./main-xeaL6Ue7.js";import{t as S}from"./draft-input-DM7mC5ty.js";import{t as C}from"./SecretInput-CRgvNUgU.js";var w=n(),T=e(t(),1),E=e(r(),1);function D(e){return e.replace(/([a-z0-9])([A-Z])/g,`$1 $2`).replace(/[-_]+/g,` `).replace(/^./,e=>e.toUpperCase())}function O(e){return d(e)??c(e)}function k(e,t){let n=O(e)?.[t];return typeof n==`string`?n:void 0}function A(e){return O(e)?.providerSettingsForm??{}}function j(e){return c(e.settingsSchema)?.providerSettingsFormSchema??{}}function M(e){let t=l(e)(void 0);return f(t)&&typeof t.value==`boolean`?t.value:void 0}function N(e,t){let n=e.driverKind===`acpRegistry`&&B(t,`source`)===`local`,r=j(e),i=new Map((r.order??[]).map((e,t)=>[e,t])),a=i.size;return Object.keys(e.settingsSchema.fields).map((e,t)=>({key:e,index:t})).toSorted((e,t)=>(i.get(e.key)??a+e.index)-(i.get(t.key)??a+t.index)).flatMap(({key:t})=>{let r=e.settingsSchema.fields[t],i=A(r);if(i.hidden||n&&t!==`source`&&t!==`commandPath`)return[];let a=k(r,`title`),o=k(r,`description`);return[{key:t,control:i.control??`text`,label:n&&t===`commandPath`?`Executable`:a??D(t),...n&&t===`commandPath`?{description:`Executable name or path on this environment.`}:o===void 0?{}:{description:o},...n&&t===`commandPath`?{placeholder:`e.g. dsh`}:i.placeholder===void 0?{}:{placeholder:i.placeholder},clearWhenEmpty:i.clearWhenEmpty??`omit`,...u(r)?{secret:!0}:{},...i.control===`switch`?{defaultBooleanValue:M(r)}:{},...i.control===`select`&&i.options?{options:i.options}:{}}]})}var P=0,F=e=>({id:`provider-argument-${P++}`,value:e});function I(e,t){return e.length===t.length&&e.every((e,n)=>e===t[n])}function L(e){let t=(0,w.c)(21),{value:n,onChange:r}=e,s=typeof n==`object`&&n?n.commandArgs:void 0,c;t[0]===s?c=t[1]:(c=Array.isArray(s)?s.filter(z):[],t[0]=s,t[1]=c);let l=c,u;t[2]===l?u=t[3]:(u=()=>l.map(F),t[2]=l,t[3]=u);let[d,f]=(0,T.useState)(u),p=(0,T.useRef)(d),m=(0,T.useRef)(l),h=(0,T.useRef)(void 0),g,_;t[4]===l?(g=t[5],_=t[6]):(g=()=>{let e=m.current,t=h.current;if(m.current=l,h.current=void 0,I(e,l)||t!==void 0&&I(t,l))return;let n=l.map(F);p.current=n,f(n)},_=[l],t[4]=l,t[5]=g,t[6]=_),(0,T.useEffect)(g,_);let v;t[7]!==r||t[8]!==n?(v=e=>{p.current=e,f(e);let t=e.map(R);h.current=t;let i=typeof n==`object`&&n?{...n}:{};r({...i,commandArgs:t})},t[7]=r,t[8]=n,t[9]=v):v=t[9];let y=v,x;t[10]===y?x=t[11]:(x=()=>y([...p.current,F(``)]),t[10]=y,t[11]=x);let C;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,E.jsx)(i,{}),t[12]=C):C=t[12];let D;t[13]===x?D=t[14]:(D=(0,E.jsxs)(o,{type:`button`,size:`sm`,variant:`outline`,onClick:x,children:[C,`Add argument`]}),t[13]=x,t[14]=D);let O;t[15]!==d||t[16]!==y?(O=d.length>0?(0,E.jsx)(`div`,{className:`mt-3 min-w-0 space-y-2 pb-2`,children:d.map((e,t)=>(0,E.jsxs)(`div`,{className:`flex min-w-0 items-center gap-1.5`,children:[(0,E.jsx)(S,{size:`sm`,font:`mono`,value:e.value,onCommit:t=>y(p.current.map(n=>n.id===e.id?{...n,value:t}:n)),"aria-label":`Argument ${t+1}`,spellCheck:!1}),(0,E.jsx)(o,{type:`button`,size:`icon-micro`,variant:`ghost-destructive`,onClick:()=>y(p.current.filter(t=>t.id!==e.id)),"aria-label":`Remove argument ${t+1}`,children:(0,E.jsx)(a,{})})]},e.id))}):null,t[15]=d,t[16]=y,t[17]=O):O=t[17];let k;return t[18]!==D||t[19]!==O?(k=(0,E.jsx)(b,{title:`Arguments`,description:`One literal argument per row, in launch order.`,control:D,children:O}),t[18]=D,t[19]=O,t[20]=k):k=t[20],k}function R(e){return e.value}function z(e){return typeof e==`string`}function B(e,t){if(typeof e!=`object`||!e)return``;let n=e[t];return typeof n==`string`?n:``}function V(e,t,n=!1){if(typeof e!=`object`||!e)return n;let r=e[t];return typeof r==`boolean`?r:n}function H(e,t,n){let r=typeof e==`object`&&e?{...e}:{};if(typeof n==`boolean`){let e=t.defaultBooleanValue??!1;return t.clearWhenEmpty===`omit`&&n===e?delete r[t.key]:r[t.key]=n,Object.keys(r).length>0?r:void 0}let i=n.trim();return t.clearWhenEmpty===`omit`&&i.length===0?delete r[t.key]:r[t.key]=n,Object.keys(r).length>0?r:void 0}function U(e){let t=(0,w.c)(31),{field:n,value:r,inputId:i,size:a,className:o,onChange:s}=e,c;t[0]===n.options?c=t[1]:(c=n.options??[],t[0]=n.options,t[1]=c);let l=c,u=l[0]?.value??``,d;t[2]!==u||t[3]!==n.key||t[4]!==r?(d=B(r,n.key)||u,t[2]=u,t[3]=n.key,t[4]=r,t[5]=d):d=t[5];let f=d,p;t[6]!==f||t[7]!==l?(p=l.find(e=>e.value===f)?.label??f,t[6]=f,t[7]=l,t[8]=p):p=t[8];let v=p,y;t[9]!==u||t[10]!==n||t[11]!==s||t[12]!==r?(y=e=>{typeof e==`string`&&s(H(r,n,e===u?``:e))},t[9]=u,t[10]=n,t[11]=s,t[12]=r,t[13]=y):y=t[13];let b;t[14]===v?b=t[15]:(b=(0,E.jsx)(m,{children:v}),t[14]=v,t[15]=b);let x;t[16]!==o||t[17]!==n.label||t[18]!==i||t[19]!==a||t[20]!==b?(x=(0,E.jsx)(g,{id:i,size:a,className:o,"aria-label":n.label,children:b}),t[16]=o,t[17]=n.label,t[18]=i,t[19]=a,t[20]=b,t[21]=x):x=t[21];let S;t[22]===l?S=t[23]:(S=l.map(W),t[22]=l,t[23]=S);let C;t[24]===S?C=t[25]:(C=(0,E.jsx)(h,{align:`start`,alignItemWithTrigger:!1,children:S}),t[24]=S,t[25]=C);let T;return t[26]!==f||t[27]!==y||t[28]!==x||t[29]!==C?(T=(0,E.jsxs)(_,{value:f,onValueChange:y,children:[x,C]}),t[26]=f,t[27]=y,t[28]=x,t[29]=C,t[30]=T):T=t[30],T}function W(e){return(0,E.jsx)(p,{value:e.value,children:e.label},e.value)}function G(e){let t=(0,w.c)(4);if(e.variant===`card`){let n;return t[0]===e.children?n=t[1]:(n=(0,E.jsx)(`div`,{children:e.children}),t[0]=e.children,t[1]=n),n}let n;return t[2]===e.children?n=t[3]:(n=(0,E.jsx)(`div`,{className:`grid gap-1.5`,children:e.children}),t[2]=e.children,t[3]=n),n}function K(e){let t=(0,w.c)(108),{field:n,value:r,idPrefix:i,variant:a,onChange:o}=e,c=`${i}-${n.key}`,l=a===`dialog`?`text-2xs text-muted-foreground`:`mt-1 block text-xs text-muted-foreground`,u;t[0]===n.label?u=t[1]:(u=(0,E.jsx)(`span`,{className:`text-xs font-medium text-foreground`,children:n.label}),t[0]=n.label,t[1]=u);let d=u,f;t[2]!==l||t[3]!==n.description?(f=n.description?(0,E.jsx)(`span`,{className:l,children:n.description}):null,t[2]=l,t[3]=n.description,t[4]=f):f=t[4];let p=f;if(a===`settings`){let e=n.description?`${c}-description`:void 0,i;t[5]!==e||t[6]!==n||t[7]!==c||t[8]!==o||t[9]!==r?(i=n.control===`switch`?(0,E.jsx)(x,{checked:V(r,n.key,n.defaultBooleanValue),onCheckedChange:e=>o(H(r,n,!!e)),"aria-label":n.label,"aria-describedby":e}):n.control===`select`?(0,E.jsx)(U,{field:n,value:r,inputId:c,size:`sm`,className:`w-full max-w-full @min-[32rem]/settings-row:w-56`,onChange:o}):n.control===`textarea`?(0,E.jsx)(v,{id:c,"aria-describedby":e,className:`w-full max-w-full @min-[32rem]/settings-row:w-[min(24rem,50cqw)]`,value:B(r,n.key),onChange:e=>o(H(r,n,e.target.value)),placeholder:n.placeholder,spellCheck:!1}):n.secret?(0,E.jsx)(C,{id:c,"aria-describedby":e,size:`sm`,className:`w-full max-w-full @min-[32rem]/settings-row:w-56`,configured:B(r,n.key).length>0,value:``,onCommit:e=>o(H(r,n,e))}):(0,E.jsx)(S,{id:c,"aria-describedby":e,size:`sm`,className:`w-full max-w-full @min-[32rem]/settings-row:w-56`,type:n.control===`password`?`password`:void 0,autoComplete:n.control===`password`?`off`:void 0,value:B(r,n.key),placeholder:n.placeholder,onCommit:e=>{o(H(r,n,e))},spellCheck:!1}),t[5]=e,t[6]=n,t[7]=c,t[8]=o,t[9]=r,t[10]=i):i=t[10];let a=i,s;t[11]!==n.control||t[12]!==n.label||t[13]!==c?(s=n.control===`switch`?n.label:(0,E.jsx)(`label`,{htmlFor:c,children:n.label}),t[11]=n.control,t[12]=n.label,t[13]=c,t[14]=s):s=t[14];let l;t[15]!==e||t[16]!==n.description?(l=n.description?(0,E.jsx)(`span`,{id:e,children:n.description}):void 0,t[15]=e,t[16]=n.description,t[17]=l):l=t[17];let u;return t[18]!==a||t[19]!==s||t[20]!==l?(u=(0,E.jsx)(b,{title:s,description:l,control:a}),t[18]=a,t[19]=s,t[20]=l,t[21]=u):u=t[21],u}if(n.control===`switch`){let e;t[22]!==p||t[23]!==d?(e=(0,E.jsxs)(`div`,{className:`min-w-0`,children:[d,p]}),t[22]=p,t[23]=d,t[24]=e):e=t[24];let i;t[25]!==n.defaultBooleanValue||t[26]!==n.key||t[27]!==r?(i=V(r,n.key,n.defaultBooleanValue),t[25]=n.defaultBooleanValue,t[26]=n.key,t[27]=r,t[28]=i):i=t[28];let s;t[29]!==n||t[30]!==o||t[31]!==r?(s=e=>o(H(r,n,!!e)),t[29]=n,t[30]=o,t[31]=r,t[32]=s):s=t[32];let c;t[33]!==n.label||t[34]!==i||t[35]!==s?(c=(0,E.jsx)(x,{checked:i,onCheckedChange:s,"aria-label":n.label}),t[33]=n.label,t[34]=i,t[35]=s,t[36]=c):c=t[36];let l;t[37]!==e||t[38]!==c?(l=(0,E.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[e,c]}),t[37]=e,t[38]=c,t[39]=l):l=t[39];let u;return t[40]!==l||t[41]!==a?(u=(0,E.jsx)(G,{variant:a,children:l}),t[40]=l,t[41]=a,t[42]=u):u=t[42],u}if(n.control===`select`){let e=a===`card`&&`block`,i;t[43]===e?i=t[44]:(i=s(e),t[43]=e,t[44]=i);let l=a===`card`&&`mt-1.5`,u;t[45]===l?u=t[46]:(u=s(`w-full`,l),t[45]=l,t[46]=u);let f;t[47]!==n||t[48]!==c||t[49]!==o||t[50]!==u||t[51]!==r?(f=(0,E.jsx)(U,{field:n,value:r,inputId:c,size:`sm`,className:u,onChange:o}),t[47]=n,t[48]=c,t[49]=o,t[50]=u,t[51]=r,t[52]=f):f=t[52];let m;t[53]!==p||t[54]!==c||t[55]!==d||t[56]!==i||t[57]!==f?(m=(0,E.jsxs)(`label`,{htmlFor:c,className:i,children:[d,f,p]}),t[53]=p,t[54]=c,t[55]=d,t[56]=i,t[57]=f,t[58]=m):m=t[58];let h;return t[59]!==m||t[60]!==a?(h=(0,E.jsx)(G,{variant:a,children:m}),t[59]=m,t[60]=a,t[61]=h):h=t[61],h}if(n.control===`textarea`){let e=a===`card`&&`block`,i;t[62]===e?i=t[63]:(i=s(e),t[62]=e,t[63]=i);let l=a===`card`&&`mt-1.5`,u;t[64]===l?u=t[65]:(u=s(l),t[64]=l,t[65]=u);let f;t[66]!==n.key||t[67]!==r?(f=B(r,n.key),t[66]=n.key,t[67]=r,t[68]=f):f=t[68];let m;t[69]!==n||t[70]!==o||t[71]!==r?(m=e=>o(H(r,n,e.target.value)),t[69]=n,t[70]=o,t[71]=r,t[72]=m):m=t[72];let h;t[73]!==n.placeholder||t[74]!==c||t[75]!==u||t[76]!==f||t[77]!==m?(h=(0,E.jsx)(v,{id:c,className:u,value:f,onChange:m,placeholder:n.placeholder,spellCheck:!1}),t[73]=n.placeholder,t[74]=c,t[75]=u,t[76]=f,t[77]=m,t[78]=h):h=t[78];let g;t[79]!==p||t[80]!==c||t[81]!==d||t[82]!==i||t[83]!==h?(g=(0,E.jsxs)(`label`,{htmlFor:c,className:i,children:[d,h,p]}),t[79]=p,t[80]=c,t[81]=d,t[82]=i,t[83]=h,t[84]=g):g=t[84];let _;return t[85]!==g||t[86]!==a?(_=(0,E.jsx)(G,{variant:a,children:g}),t[85]=g,t[86]=a,t[87]=_):_=t[87],_}let m=n.control===`password`?`password`:void 0,h=n.secret?C:S,g=n.secret?C:y,_=a===`card`&&`block`,T;t[88]===_?T=t[89]:(T=s(_),t[88]=_,t[89]=T);let D;t[90]!==h||t[91]!==g||t[92]!==n||t[93]!==c||t[94]!==o||t[95]!==m||t[96]!==r||t[97]!==a?(D=a===`card`?(0,E.jsx)(h,{id:c,size:`sm`,className:`mt-1.5`,type:n.secret?void 0:m,autoComplete:!n.secret&&n.control===`password`?`off`:void 0,value:B(r,n.key),onCommit:e=>o(H(r,n,e)),placeholder:n.placeholder,spellCheck:!1}):(0,E.jsx)(g,{id:c,type:n.secret?void 0:m,autoComplete:!n.secret&&n.control===`password`?`off`:void 0,value:B(r,n.key),onChange:e=>o(H(r,n,e.target.value)),placeholder:n.placeholder,spellCheck:!1}),t[90]=h,t[91]=g,t[92]=n,t[93]=c,t[94]=o,t[95]=m,t[96]=r,t[97]=a,t[98]=D):D=t[98];let O;t[99]!==p||t[100]!==c||t[101]!==d||t[102]!==T||t[103]!==D?(O=(0,E.jsxs)(`label`,{htmlFor:c,className:T,children:[d,D,p]}),t[99]=p,t[100]=c,t[101]=d,t[102]=T,t[103]=D,t[104]=O):O=t[104];let k;return t[105]!==O||t[106]!==a?(k=(0,E.jsx)(G,{variant:a,children:O}),t[105]=O,t[106]=a,t[107]=k):k=t[107],k}function q(e){let t=(0,w.c)(24),{definition:n,value:r,idPrefix:i,variant:a,onChange:o}=e,s;t[0]!==n||t[1]!==r?(s=N(n,r),t[0]=n,t[1]=r,t[2]=s):s=t[2];let c=s,l;t[3]!==n.driverKind||t[4]!==r?(l=n.driverKind===`acpRegistry`&&B(r,`source`)===`local`,t[3]=n.driverKind,t[4]=r,t[5]=l):l=t[5];let u=l;if(c.length===0)return null;let d;if(t[6]!==c||t[7]!==i||t[8]!==o||t[9]!==r||t[10]!==a){let e;t[12]!==i||t[13]!==o||t[14]!==r||t[15]!==a?(e=e=>(0,E.jsx)(K,{field:e,value:r,idPrefix:i,variant:a,onChange:o},e.key),t[12]=i,t[13]=o,t[14]=r,t[15]=a,t[16]=e):e=t[16],d=c.map(e),t[6]=c,t[7]=i,t[8]=o,t[9]=r,t[10]=a,t[11]=d}else d=t[11];let f;t[17]!==u||t[18]!==o||t[19]!==r?(f=u?(0,E.jsx)(L,{value:r,onChange:o}):null,t[17]=u,t[18]=o,t[19]=r,t[20]=f):f=t[20];let p;return t[21]!==d||t[22]!==f?(p=(0,E.jsxs)(E.Fragment,{children:[d,f]}),t[21]=d,t[22]=f,t[23]=p):p=t[23],p}export{N as n,q as t};
|
|
2
|
-
//# sourceMappingURL=ProviderSettingsForm-
|
|
1
|
+
import{a as e,t}from"./react-BUfh6y28.js";import{n,t as r}from"./jsx-runtime-DJeoFXNw.js";import{Xd as i,ap as a,mr as o,t as s}from"./utils-DkKLB01I.js";import{$c as c,Ic as l,Xn as u,el as d,mh as f}from"./src-R7EkrVcv.js";import{a as p,c as m,o as h,s as g,t as _}from"./select-CE2f-g-3.js";import{t as v}from"./textarea-CWbMGhL9.js";import{t as y}from"./input-CiPGmOLv.js";import{a as b}from"./settingsLayout-BoWaVHvV.js";import{Mo as x}from"./main-BYwnnJ9E.js";import{t as S}from"./draft-input-DM7mC5ty.js";import{t as C}from"./SecretInput-CRgvNUgU.js";var w=n(),T=e(t(),1),E=e(r(),1);function D(e){return e.replace(/([a-z0-9])([A-Z])/g,`$1 $2`).replace(/[-_]+/g,` `).replace(/^./,e=>e.toUpperCase())}function O(e){return d(e)??c(e)}function k(e,t){let n=O(e)?.[t];return typeof n==`string`?n:void 0}function A(e){return O(e)?.providerSettingsForm??{}}function j(e){return c(e.settingsSchema)?.providerSettingsFormSchema??{}}function M(e){let t=l(e)(void 0);return f(t)&&typeof t.value==`boolean`?t.value:void 0}function N(e,t){let n=e.driverKind===`acpRegistry`&&B(t,`source`)===`local`,r=j(e),i=new Map((r.order??[]).map((e,t)=>[e,t])),a=i.size;return Object.keys(e.settingsSchema.fields).map((e,t)=>({key:e,index:t})).toSorted((e,t)=>(i.get(e.key)??a+e.index)-(i.get(t.key)??a+t.index)).flatMap(({key:t})=>{let r=e.settingsSchema.fields[t],i=A(r);if(i.hidden||n&&t!==`source`&&t!==`commandPath`)return[];let a=k(r,`title`),o=k(r,`description`);return[{key:t,control:i.control??`text`,label:n&&t===`commandPath`?`Executable`:a??D(t),...n&&t===`commandPath`?{description:`Executable name or path on this environment.`}:o===void 0?{}:{description:o},...n&&t===`commandPath`?{placeholder:`e.g. dsh`}:i.placeholder===void 0?{}:{placeholder:i.placeholder},clearWhenEmpty:i.clearWhenEmpty??`omit`,...u(r)?{secret:!0}:{},...i.control===`switch`?{defaultBooleanValue:M(r)}:{},...i.control===`select`&&i.options?{options:i.options}:{}}]})}var P=0,F=e=>({id:`provider-argument-${P++}`,value:e});function I(e,t){return e.length===t.length&&e.every((e,n)=>e===t[n])}function L(e){let t=(0,w.c)(21),{value:n,onChange:r}=e,s=typeof n==`object`&&n?n.commandArgs:void 0,c;t[0]===s?c=t[1]:(c=Array.isArray(s)?s.filter(z):[],t[0]=s,t[1]=c);let l=c,u;t[2]===l?u=t[3]:(u=()=>l.map(F),t[2]=l,t[3]=u);let[d,f]=(0,T.useState)(u),p=(0,T.useRef)(d),m=(0,T.useRef)(l),h=(0,T.useRef)(void 0),g,_;t[4]===l?(g=t[5],_=t[6]):(g=()=>{let e=m.current,t=h.current;if(m.current=l,h.current=void 0,I(e,l)||t!==void 0&&I(t,l))return;let n=l.map(F);p.current=n,f(n)},_=[l],t[4]=l,t[5]=g,t[6]=_),(0,T.useEffect)(g,_);let v;t[7]!==r||t[8]!==n?(v=e=>{p.current=e,f(e);let t=e.map(R);h.current=t;let i=typeof n==`object`&&n?{...n}:{};r({...i,commandArgs:t})},t[7]=r,t[8]=n,t[9]=v):v=t[9];let y=v,x;t[10]===y?x=t[11]:(x=()=>y([...p.current,F(``)]),t[10]=y,t[11]=x);let C;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,E.jsx)(i,{}),t[12]=C):C=t[12];let D;t[13]===x?D=t[14]:(D=(0,E.jsxs)(o,{type:`button`,size:`sm`,variant:`outline`,onClick:x,children:[C,`Add argument`]}),t[13]=x,t[14]=D);let O;t[15]!==d||t[16]!==y?(O=d.length>0?(0,E.jsx)(`div`,{className:`mt-3 min-w-0 space-y-2 pb-2`,children:d.map((e,t)=>(0,E.jsxs)(`div`,{className:`flex min-w-0 items-center gap-1.5`,children:[(0,E.jsx)(S,{size:`sm`,font:`mono`,value:e.value,onCommit:t=>y(p.current.map(n=>n.id===e.id?{...n,value:t}:n)),"aria-label":`Argument ${t+1}`,spellCheck:!1}),(0,E.jsx)(o,{type:`button`,size:`icon-micro`,variant:`ghost-destructive`,onClick:()=>y(p.current.filter(t=>t.id!==e.id)),"aria-label":`Remove argument ${t+1}`,children:(0,E.jsx)(a,{})})]},e.id))}):null,t[15]=d,t[16]=y,t[17]=O):O=t[17];let k;return t[18]!==D||t[19]!==O?(k=(0,E.jsx)(b,{title:`Arguments`,description:`One literal argument per row, in launch order.`,control:D,children:O}),t[18]=D,t[19]=O,t[20]=k):k=t[20],k}function R(e){return e.value}function z(e){return typeof e==`string`}function B(e,t){if(typeof e!=`object`||!e)return``;let n=e[t];return typeof n==`string`?n:``}function V(e,t,n=!1){if(typeof e!=`object`||!e)return n;let r=e[t];return typeof r==`boolean`?r:n}function H(e,t,n){let r=typeof e==`object`&&e?{...e}:{};if(typeof n==`boolean`){let e=t.defaultBooleanValue??!1;return t.clearWhenEmpty===`omit`&&n===e?delete r[t.key]:r[t.key]=n,Object.keys(r).length>0?r:void 0}let i=n.trim();return t.clearWhenEmpty===`omit`&&i.length===0?delete r[t.key]:r[t.key]=n,Object.keys(r).length>0?r:void 0}function U(e){let t=(0,w.c)(31),{field:n,value:r,inputId:i,size:a,className:o,onChange:s}=e,c;t[0]===n.options?c=t[1]:(c=n.options??[],t[0]=n.options,t[1]=c);let l=c,u=l[0]?.value??``,d;t[2]!==u||t[3]!==n.key||t[4]!==r?(d=B(r,n.key)||u,t[2]=u,t[3]=n.key,t[4]=r,t[5]=d):d=t[5];let f=d,p;t[6]!==f||t[7]!==l?(p=l.find(e=>e.value===f)?.label??f,t[6]=f,t[7]=l,t[8]=p):p=t[8];let v=p,y;t[9]!==u||t[10]!==n||t[11]!==s||t[12]!==r?(y=e=>{typeof e==`string`&&s(H(r,n,e===u?``:e))},t[9]=u,t[10]=n,t[11]=s,t[12]=r,t[13]=y):y=t[13];let b;t[14]===v?b=t[15]:(b=(0,E.jsx)(m,{children:v}),t[14]=v,t[15]=b);let x;t[16]!==o||t[17]!==n.label||t[18]!==i||t[19]!==a||t[20]!==b?(x=(0,E.jsx)(g,{id:i,size:a,className:o,"aria-label":n.label,children:b}),t[16]=o,t[17]=n.label,t[18]=i,t[19]=a,t[20]=b,t[21]=x):x=t[21];let S;t[22]===l?S=t[23]:(S=l.map(W),t[22]=l,t[23]=S);let C;t[24]===S?C=t[25]:(C=(0,E.jsx)(h,{align:`start`,alignItemWithTrigger:!1,children:S}),t[24]=S,t[25]=C);let T;return t[26]!==f||t[27]!==y||t[28]!==x||t[29]!==C?(T=(0,E.jsxs)(_,{value:f,onValueChange:y,children:[x,C]}),t[26]=f,t[27]=y,t[28]=x,t[29]=C,t[30]=T):T=t[30],T}function W(e){return(0,E.jsx)(p,{value:e.value,children:e.label},e.value)}function G(e){let t=(0,w.c)(4);if(e.variant===`card`){let n;return t[0]===e.children?n=t[1]:(n=(0,E.jsx)(`div`,{children:e.children}),t[0]=e.children,t[1]=n),n}let n;return t[2]===e.children?n=t[3]:(n=(0,E.jsx)(`div`,{className:`grid gap-1.5`,children:e.children}),t[2]=e.children,t[3]=n),n}function K(e){let t=(0,w.c)(108),{field:n,value:r,idPrefix:i,variant:a,onChange:o}=e,c=`${i}-${n.key}`,l=a===`dialog`?`text-2xs text-muted-foreground`:`mt-1 block text-xs text-muted-foreground`,u;t[0]===n.label?u=t[1]:(u=(0,E.jsx)(`span`,{className:`text-xs font-medium text-foreground`,children:n.label}),t[0]=n.label,t[1]=u);let d=u,f;t[2]!==l||t[3]!==n.description?(f=n.description?(0,E.jsx)(`span`,{className:l,children:n.description}):null,t[2]=l,t[3]=n.description,t[4]=f):f=t[4];let p=f;if(a===`settings`){let e=n.description?`${c}-description`:void 0,i;t[5]!==e||t[6]!==n||t[7]!==c||t[8]!==o||t[9]!==r?(i=n.control===`switch`?(0,E.jsx)(x,{checked:V(r,n.key,n.defaultBooleanValue),onCheckedChange:e=>o(H(r,n,!!e)),"aria-label":n.label,"aria-describedby":e}):n.control===`select`?(0,E.jsx)(U,{field:n,value:r,inputId:c,size:`sm`,className:`w-full max-w-full @min-[32rem]/settings-row:w-56`,onChange:o}):n.control===`textarea`?(0,E.jsx)(v,{id:c,"aria-describedby":e,className:`w-full max-w-full @min-[32rem]/settings-row:w-[min(24rem,50cqw)]`,value:B(r,n.key),onChange:e=>o(H(r,n,e.target.value)),placeholder:n.placeholder,spellCheck:!1}):n.secret?(0,E.jsx)(C,{id:c,"aria-describedby":e,size:`sm`,className:`w-full max-w-full @min-[32rem]/settings-row:w-56`,configured:B(r,n.key).length>0,value:``,onCommit:e=>o(H(r,n,e))}):(0,E.jsx)(S,{id:c,"aria-describedby":e,size:`sm`,className:`w-full max-w-full @min-[32rem]/settings-row:w-56`,type:n.control===`password`?`password`:void 0,autoComplete:n.control===`password`?`off`:void 0,value:B(r,n.key),placeholder:n.placeholder,onCommit:e=>{o(H(r,n,e))},spellCheck:!1}),t[5]=e,t[6]=n,t[7]=c,t[8]=o,t[9]=r,t[10]=i):i=t[10];let a=i,s;t[11]!==n.control||t[12]!==n.label||t[13]!==c?(s=n.control===`switch`?n.label:(0,E.jsx)(`label`,{htmlFor:c,children:n.label}),t[11]=n.control,t[12]=n.label,t[13]=c,t[14]=s):s=t[14];let l;t[15]!==e||t[16]!==n.description?(l=n.description?(0,E.jsx)(`span`,{id:e,children:n.description}):void 0,t[15]=e,t[16]=n.description,t[17]=l):l=t[17];let u;return t[18]!==a||t[19]!==s||t[20]!==l?(u=(0,E.jsx)(b,{title:s,description:l,control:a}),t[18]=a,t[19]=s,t[20]=l,t[21]=u):u=t[21],u}if(n.control===`switch`){let e;t[22]!==p||t[23]!==d?(e=(0,E.jsxs)(`div`,{className:`min-w-0`,children:[d,p]}),t[22]=p,t[23]=d,t[24]=e):e=t[24];let i;t[25]!==n.defaultBooleanValue||t[26]!==n.key||t[27]!==r?(i=V(r,n.key,n.defaultBooleanValue),t[25]=n.defaultBooleanValue,t[26]=n.key,t[27]=r,t[28]=i):i=t[28];let s;t[29]!==n||t[30]!==o||t[31]!==r?(s=e=>o(H(r,n,!!e)),t[29]=n,t[30]=o,t[31]=r,t[32]=s):s=t[32];let c;t[33]!==n.label||t[34]!==i||t[35]!==s?(c=(0,E.jsx)(x,{checked:i,onCheckedChange:s,"aria-label":n.label}),t[33]=n.label,t[34]=i,t[35]=s,t[36]=c):c=t[36];let l;t[37]!==e||t[38]!==c?(l=(0,E.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[e,c]}),t[37]=e,t[38]=c,t[39]=l):l=t[39];let u;return t[40]!==l||t[41]!==a?(u=(0,E.jsx)(G,{variant:a,children:l}),t[40]=l,t[41]=a,t[42]=u):u=t[42],u}if(n.control===`select`){let e=a===`card`&&`block`,i;t[43]===e?i=t[44]:(i=s(e),t[43]=e,t[44]=i);let l=a===`card`&&`mt-1.5`,u;t[45]===l?u=t[46]:(u=s(`w-full`,l),t[45]=l,t[46]=u);let f;t[47]!==n||t[48]!==c||t[49]!==o||t[50]!==u||t[51]!==r?(f=(0,E.jsx)(U,{field:n,value:r,inputId:c,size:`sm`,className:u,onChange:o}),t[47]=n,t[48]=c,t[49]=o,t[50]=u,t[51]=r,t[52]=f):f=t[52];let m;t[53]!==p||t[54]!==c||t[55]!==d||t[56]!==i||t[57]!==f?(m=(0,E.jsxs)(`label`,{htmlFor:c,className:i,children:[d,f,p]}),t[53]=p,t[54]=c,t[55]=d,t[56]=i,t[57]=f,t[58]=m):m=t[58];let h;return t[59]!==m||t[60]!==a?(h=(0,E.jsx)(G,{variant:a,children:m}),t[59]=m,t[60]=a,t[61]=h):h=t[61],h}if(n.control===`textarea`){let e=a===`card`&&`block`,i;t[62]===e?i=t[63]:(i=s(e),t[62]=e,t[63]=i);let l=a===`card`&&`mt-1.5`,u;t[64]===l?u=t[65]:(u=s(l),t[64]=l,t[65]=u);let f;t[66]!==n.key||t[67]!==r?(f=B(r,n.key),t[66]=n.key,t[67]=r,t[68]=f):f=t[68];let m;t[69]!==n||t[70]!==o||t[71]!==r?(m=e=>o(H(r,n,e.target.value)),t[69]=n,t[70]=o,t[71]=r,t[72]=m):m=t[72];let h;t[73]!==n.placeholder||t[74]!==c||t[75]!==u||t[76]!==f||t[77]!==m?(h=(0,E.jsx)(v,{id:c,className:u,value:f,onChange:m,placeholder:n.placeholder,spellCheck:!1}),t[73]=n.placeholder,t[74]=c,t[75]=u,t[76]=f,t[77]=m,t[78]=h):h=t[78];let g;t[79]!==p||t[80]!==c||t[81]!==d||t[82]!==i||t[83]!==h?(g=(0,E.jsxs)(`label`,{htmlFor:c,className:i,children:[d,h,p]}),t[79]=p,t[80]=c,t[81]=d,t[82]=i,t[83]=h,t[84]=g):g=t[84];let _;return t[85]!==g||t[86]!==a?(_=(0,E.jsx)(G,{variant:a,children:g}),t[85]=g,t[86]=a,t[87]=_):_=t[87],_}let m=n.control===`password`?`password`:void 0,h=n.secret?C:S,g=n.secret?C:y,_=a===`card`&&`block`,T;t[88]===_?T=t[89]:(T=s(_),t[88]=_,t[89]=T);let D;t[90]!==h||t[91]!==g||t[92]!==n||t[93]!==c||t[94]!==o||t[95]!==m||t[96]!==r||t[97]!==a?(D=a===`card`?(0,E.jsx)(h,{id:c,size:`sm`,className:`mt-1.5`,type:n.secret?void 0:m,autoComplete:!n.secret&&n.control===`password`?`off`:void 0,value:B(r,n.key),onCommit:e=>o(H(r,n,e)),placeholder:n.placeholder,spellCheck:!1}):(0,E.jsx)(g,{id:c,type:n.secret?void 0:m,autoComplete:!n.secret&&n.control===`password`?`off`:void 0,value:B(r,n.key),onChange:e=>o(H(r,n,e.target.value)),placeholder:n.placeholder,spellCheck:!1}),t[90]=h,t[91]=g,t[92]=n,t[93]=c,t[94]=o,t[95]=m,t[96]=r,t[97]=a,t[98]=D):D=t[98];let O;t[99]!==p||t[100]!==c||t[101]!==d||t[102]!==T||t[103]!==D?(O=(0,E.jsxs)(`label`,{htmlFor:c,className:T,children:[d,D,p]}),t[99]=p,t[100]=c,t[101]=d,t[102]=T,t[103]=D,t[104]=O):O=t[104];let k;return t[105]!==O||t[106]!==a?(k=(0,E.jsx)(G,{variant:a,children:O}),t[105]=O,t[106]=a,t[107]=k):k=t[107],k}function q(e){let t=(0,w.c)(24),{definition:n,value:r,idPrefix:i,variant:a,onChange:o}=e,s;t[0]!==n||t[1]!==r?(s=N(n,r),t[0]=n,t[1]=r,t[2]=s):s=t[2];let c=s,l;t[3]!==n.driverKind||t[4]!==r?(l=n.driverKind===`acpRegistry`&&B(r,`source`)===`local`,t[3]=n.driverKind,t[4]=r,t[5]=l):l=t[5];let u=l;if(c.length===0)return null;let d;if(t[6]!==c||t[7]!==i||t[8]!==o||t[9]!==r||t[10]!==a){let e;t[12]!==i||t[13]!==o||t[14]!==r||t[15]!==a?(e=e=>(0,E.jsx)(K,{field:e,value:r,idPrefix:i,variant:a,onChange:o},e.key),t[12]=i,t[13]=o,t[14]=r,t[15]=a,t[16]=e):e=t[16],d=c.map(e),t[6]=c,t[7]=i,t[8]=o,t[9]=r,t[10]=a,t[11]=d}else d=t[11];let f;t[17]!==u||t[18]!==o||t[19]!==r?(f=u?(0,E.jsx)(L,{value:r,onChange:o}):null,t[17]=u,t[18]=o,t[19]=r,t[20]=f):f=t[20];let p;return t[21]!==d||t[22]!==f?(p=(0,E.jsxs)(E.Fragment,{children:[d,f]}),t[21]=d,t[22]=f,t[23]=p):p=t[23],p}export{N as n,q as t};
|
|
2
|
+
//# sourceMappingURL=ProviderSettingsForm-D9GJtzdb.js.map
|
package/dist/client/assets/{PullRequestCodeTab-BhWK4Zqq.js → PullRequestCodeTab-CajEWSe5.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{a as e,t}from"./react-BUfh6y28.js";import{t as n}from"./jsx-runtime-DJeoFXNw.js";import{A as r,Al as i,Eu as a,F as o,Gd as s,If as c,Ol as l,Os as u,Qn as d,Vf as f,Zl as p,Zn as m,ar as ee,cf as h,fr as g,ir as _,mr as v,pf as te,qo as ne,qu as re,rr as ie,sr as ae,t as oe,tr as se,vd as ce}from"./utils-DkKLB01I.js";import{Zs as le}from"./src-R7EkrVcv.js";import{M as ue,Sr as y}from"./runtime-
|
|
1
|
+
import{a as e,t}from"./react-BUfh6y28.js";import{t as n}from"./jsx-runtime-DJeoFXNw.js";import{A as r,Al as i,Eu as a,F as o,Gd as s,If as c,Ol as l,Os as u,Qn as d,Vf as f,Zl as p,Zn as m,ar as ee,cf as h,fr as g,ir as _,mr as v,pf as te,qo as ne,qu as re,rr as ie,sr as ae,t as oe,tr as se,vd as ce}from"./utils-DkKLB01I.js";import{Zs as le}from"./src-R7EkrVcv.js";import{M as ue,Sr as y}from"./runtime-B92ivG9b.js";import{_ as de,g as fe,m as pe,p as me,u as he}from"./TooltipProvider-DiV5KdTq.js";import{a as ge}from"./relay-V_5ApBIP.js";import{a as _e,n as ve,r as ye,t as be}from"./DiffFileTree-PCGZGqlB.js";import{K as xe,s as Se,v as Ce}from"./useSettings-Dp9RSL-0.js";import{n as we}from"./query-CeIgbVxh.js";import{t as b}from"./use-atom-command-Bd7vZxeH.js";import{a as Te,c as Ee,d as De,i as Oe,l as ke,s as Ae,u as x}from"./diffRendering-Cb9qJUqp.js";import{A as je,D as Me,E as Ne,I as Pe,L as Fe,O as Ie,j as Le,k as Re,z as ze}from"./PanelLayoutControls-CPevLAhG.js";import{t as Be}from"./DiffCommentAnnotation-D7iLWjnP.js";import{a as S,n as C,t as w}from"./tooltip-CCYU8XGM.js";import{n as Ve,t as He}from"./toggle-group-B1WN0Pgy.js";import{d as Ue,l as We}from"./RenderErrorBoundary-CcI-4Zo3.js";import{r as T}from"./pullRequests-R7416J6H.js";import{N as Ge}from"./pullRequestDetail.logic-D5hhGj8d.js";import{t as Ke}from"./checkbox-Cw33xyU7.js";import{i as qe,n as Je,r as Ye,t as Xe}from"./pullRequestReviewStore-CUZ0N4F2.js";import{Ao as Ze,No as Qe,jo as $e,ko as et}from"./main-BYwnnJ9E.js";var E=e(t(),1),tt=new Set([`pnpm-lock.yaml`,`yarn.lock`,`package-lock.json`,`bun.lockb`,`Cargo.lock`,`go.sum`,`composer.lock`,`Gemfile.lock`]),nt=new Set([`__snapshots__`,`__generated__`,`dist`,`build`,`vendor`]),rt=new Set([`__tests__`,`tests`,`test`]),it=[`.ts`,`.tsx`,`.js`,`.jsx`,`.mjs`,`.cjs`];function at(e){let t=e.split(`/`),n=t.at(-1)??``;return tt.has(n)||n.endsWith(`.snap`)||n.endsWith(`.min.js`)||n.endsWith(`.min.css`)||/\.generated\./.test(n)||t.slice(0,-1).some(e=>nt.has(e))?`generated`:/\.(?:test|spec)\./.test(n)||t.slice(0,-1).some(e=>rt.has(e))?`test`:`source`}function ot(e){let t=e.lastIndexOf(`.`);return t>e.lastIndexOf(`/`)?e.slice(0,t):e}function D(e){return ot(e.split(`/`).at(-1)??``)}function st(e,t){let n=e.split(`/`).slice(0,-1);for(let e of t.split(`/`))e!==`.`&&e!==``&&(e===`..`?n.pop():n.push(e));return n.join(`/`)}var O=/(?:\bfrom|\bimport|\brequire\s*\()\s*\(?\s*["']([^"']+)["']/g;function k(e,t,n,r){let i=new Set;for(let a of t){O.lastIndex=0;let t=O.exec(a);for(;t!==null;){let o=t[1]??``,s=o.startsWith(`.`)?st(e,o):o,c=it.find(e=>s.endsWith(e)),l=c===void 0?s:s.slice(0,-c.length),u=n.get(l)??n.get(`${l}/index`)??r.get(D(l));u!==void 0&&u!==e&&i.add(u),t=O.exec(a)}}return i}function A(e,t){let n=new Set(e),r=[],i=[...e].sort((e,t)=>e.localeCompare(t));for(;n.size>0;){let e=i.filter(e=>n.has(e)),a=e.find(e=>[...t.get(e)??[]].every(e=>!n.has(e)))??e[0];n.delete(a),r.push(a)}return r}function ct(e,t){let n=(e.split(`/`).at(-1)??``).replace(/\.(?:test|spec)\..*$/,``);for(;;){let e=t.get(n);if(e!==void 0)return e;let r=n.lastIndexOf(`.`);if(r<=0)return 2**53-1;n=n.slice(0,r)}}function lt(e){let t=new Map;for(let n of e)t.set(x(n),n);let n=new Map;for(let e of t.keys())n.set(e,at(e));let r=[...t.keys()].filter(e=>n.get(e)===`source`),i=new Map,a=new Set,o=new Map;for(let e of r){i.set(ot(e),e);let t=D(e);o.has(t)&&a.add(t),o.set(t,e)}for(let e of a)o.delete(e);let s=new Map;for(let e of r){let n=t.get(e);s.set(e,k(e,[...n.additionLines,...n.deletionLines],i,o))}let c=A(r,s),l=new Map;c.forEach((e,t)=>{let n=D(e);l.has(n)||l.set(n,t)});let u=[...t.keys()].filter(e=>n.get(e)===`test`).sort((e,t)=>ct(e,l)-ct(t,l)||e.localeCompare(t)),d=[...t.keys()].filter(e=>n.get(e)===`generated`).sort((e,t)=>e.localeCompare(t));return[...c,...u,...d].map(e=>t.get(e))}function ut(e,t,n){return e.hunks.some(e=>t===`left`?n>=e.deletionStart&&n<e.deletionStart+e.deletionCount:n>=e.additionStart&&n<e.additionStart+e.additionCount)}function dt(e,t,n){let r=t===`folded`;return n.has(e)?!r:r}function ft(e,t,n,r){if(dt(e,n,r)===t)return r;let i=new Set(r);return i.has(e)?i.delete(e):i.add(e),i}function pt(e,t,n){let r=e.findIndex(e=>e.fileKey===t);if(r===-1)return[];let i=e.findIndex(e=>e.fileKey===n);return i===-1?e.slice(r,r+1):e.slice(Math.min(r,i),Math.max(r,i)+1)}function j(e){return e===null?null:new Map(e.files.map(e=>[e.path,e.state]))}function mt(e){return e===`viewed`}function ht(e){return e===`dismissed`}function M(e,t,n){return n.get(e)??mt(t?.get(e))}function gt(e,t,n){return e.reduce((e,r)=>M(r,t,n)?e+1:e,0)}function _t(e,t,n,r){if(t===null||e.size===0)return e;let i=new Map(e);for(let[a,o]of e)n.has(a)||(r.has(a)||mt(t.get(a))===o)&&i.delete(a);return i.size===e.size?e:i}function vt(e,t,n){let r=new Map(e);for(let{path:e,viewed:i}of t)n.has(e)&&r.get(e)===i&&r.delete(e);return r.size===e.size?e:r}function N(e){return[...e].map(([e,t])=>({path:e,viewed:t}))}var P=400,yt=new Map;function bt(e){let{environmentId:t,reference:n,enabled:r,paths:i}=e,a=we(r?T.filesViewed({environmentId:t,input:n}):null),o=a.refresh,s=(0,E.useMemo)(()=>j(a.data),[a.data]),c=a.data?.truncated===!0,l=a.error,[u,d]=(0,E.useState)(yt),f=b(T.setFilesViewed,{reportFailure:!1}),p=(0,E.useRef)(new Map),m=(0,E.useRef)(new Map),ee=(0,E.useRef)(0),h=(0,E.useRef)(null),g=`${t} ${n.projectId} ${n.repository} ${n.number}`,_=(0,E.useRef)(g),v=(0,E.useRef)(new Map),te=(0,E.useRef)(s);te.current=s,(0,E.useEffect)(()=>{let e=new Set([...p.current.keys(),...m.current.keys()]),t=new Set;for(let[n,r]of v.current)e.has(n)||r===s||(t.add(n),v.current.delete(n));d(n=>_t(n,s,e,t))},[s]);let ne=(0,E.useCallback)(()=>{h.current=null;let e=N(p.current);if(e.length===0)return;p.current=new Map;let r=_.current,i=++ee.current;for(let t of e)m.current.set(t.path,i);f({environmentId:t,input:{...n,files:e}}).then(t=>{let n=e.map(e=>e.path).filter(e=>m.current.get(e)===i);for(let e of n)m.current.delete(e);if(_.current===r){if(t._tag===`Failure`){let r=new Set(n.filter(e=>!p.current.has(e)));d(t=>vt(t,e,r)),r.size>0&&!y(t)&&ge.add({type:`error`,title:`Could not update viewed files`})}else{for(let e of n)v.current.set(e,te.current);o()}}})},[t,n,o,f]),re=(0,E.useRef)(ne);re.current=ne,(0,E.useEffect)(()=>{let e=re.current;return _.current=g,()=>{h.current!==null&&(clearTimeout(h.current),e()),p.current=new Map,m.current=new Map,v.current=new Map,d(yt)}},[g]);let ie=(0,E.useRef)(o);ie.current=o;let ae=(0,E.useCallback)(()=>ie.current(),[]),oe=(0,E.useCallback)((e,t)=>{d(n=>new Map(n).set(e,t)),p.current.set(e,t),h.current!==null&&clearTimeout(h.current),h.current=setTimeout(()=>re.current(),P)},[]),se=(0,E.useCallback)(e=>M(e,s,u),[u,s]),ce=(0,E.useCallback)(e=>!u.has(e)&&ht(s?.get(e)),[u,s]),le=(0,E.useMemo)(()=>gt(i,s,u),[u,i,s]);return(0,E.useMemo)(()=>({enabled:r,isViewed:se,isStale:ce,setViewed:oe,viewedCount:le,truncated:c,error:l,refresh:ae}),[r,l,ce,se,ae,oe,c,le])}var F=e(n(),1),xt=10,St=`p4code.pullRequestFileTreeOpen`,Ct=`
|
|
2
2
|
[data-diffs-header] [data-additions-count],
|
|
3
3
|
[data-diffs-header] [data-deletions-count] {
|
|
4
4
|
display: none !important;
|
|
5
5
|
}`,I=[];function L({scrollerRef:e,environmentId:t,reference:n,detail:y,selectedCommitOid:tt,onSelectedCommitChange:nt,pendingFinding:rt,fixFindingLabel:it=`Fix in a thread`,onFixFinding:at,onAddToAgentSelection:ot,onRefresh:D,refreshToken:st=0,revealRequest:O=null}){let{resolvedTheme:k}=xe(),A=Se(),[ct,j]=(0,E.useState)(()=>new Set),[mt,ht]=(0,E.useState)(null),[M,gt]=(0,E.useState)(xt),[_t,vt]=(0,E.useState)(null),N=_t??(A.diffFilesCollapsed?`folded`:`expanded`),P=A.diffLayout,yt=Ce(),[L,wt]=(0,E.useState)(A.wordWrap),[R,Tt]=(0,E.useState)(A.diffIgnoreWhitespace),[Et,Dt]=u(St,!1,le),[Ot,z]=(0,E.useState)(null),[B,V]=(0,E.useState)(null),[kt,At]=(0,E.useState)(!1),[jt,Mt]=(0,E.useState)(!1),[Nt,Pt]=(0,E.useState)({key:``,cursor:null,slices:I}),Ft=(0,E.useRef)(new Map),[It,Lt]=(0,E.useState)(null),Rt=Je(n),H=tt,U=H===null?Rt:`${Rt}@${H}`;(0,E.useEffect)(()=>{V(null),z(null),j(new Set),ht(null),vt(null),gt(xt),Mt(!1),Pt({key:U,cursor:null,slices:I}),Ft.current.clear()},[U]);let W=Nt.key===U?Nt.slices:I,G=Nt.key===U?Nt.cursor:null,K=we(T.diff({environmentId:t,input:{...n,...G===null?{}:{cursor:G},...H===null?{}:{commit:H}}})),[zt,Bt]=(0,E.useState)(0);(0,E.useEffect)(()=>{let e=K.data;e!==null&&Pt(t=>{let n=t.key===U?t.slices:I,r={cursor:G,patch:e.patch,truncated:e.truncated,nextCursor:e.nextCursor,omittedFileStats:e.omittedFileStats??[]},i=n.findIndex(e=>e.cursor===G);if(i===-1)return{key:U,cursor:G,slices:[...n,r]};let a=n[i];return a!==void 0&&a.patch===r.patch&&a.truncated===r.truncated&&a.nextCursor===r.nextCursor&&a.omittedFileStats.length===r.omittedFileStats.length&&a.omittedFileStats.every((e,t)=>{let n=r.omittedFileStats[t];return n!==void 0&&n.path===e.path&&n.additions===e.additions&&n.deletions===e.deletions})?t:{key:U,cursor:G,slices:[...n.slice(0,i),r]}})},[G,K.data,zt,U]);let Vt=ne(T.diff({environmentId:t,input:{...n,...H===null?{}:{commit:H}}})),Ht=Rt,Ut=Ye(n),Wt=qe(e=>e.addComment),Gt=qe(e=>e.removeComment),Kt=b(T.replyToThread,{reportFailure:!1}),qt=b(T.setThreadResolution,{reportFailure:!1}),Jt=b(T.updateComment,{reportFailure:!1}),Yt=b(T.threadComments,{reportFailure:!1}),Xt=b(T.diffFileContents),Zt=(0,E.useMemo)(()=>Pe(Xt,{environmentId:t,reference:n,commit:H,cacheKey:`pull-request:${Rt}:${y.updatedAt}:${H??`all`}`}),[H,y.updatedAt,t,Xt,n,Rt]),q=(0,E.useMemo)(()=>{let e=y.capabilities.review,t=y.viewerPermissions;return{inlineComment:e.inlineComment&&t.comment,reply:e.reply&&t.comment,resolve:e.resolve&&t.resolve}},[y.capabilities.review,y.viewerPermissions]),Qt=q.inlineComment&&H===null,J=(0,E.useMemo)(()=>W.map(e=>{let t=`pull-request:${U}:${k}:${R}:${e.cursor??`first`}:${Te(e.patch)}`,n=Ft.current.get(t);if(n)return n;let r=Ee(e.patch,t,{compactPartialHunkOffsets:!0,ignoreWhitespace:R});return r&&Ft.current.set(t,r),r}),[W,k,U,R]),Y=(0,E.useMemo)(()=>J.flatMap(e=>e?.kind===`files`?lt(e.files):[]),[J]),$t=(0,E.useMemo)(()=>Y.map(e=>x(e)),[Y]),en=y.capabilities.viewedFiles,X=bt({environmentId:t,reference:n,enabled:en!==void 0,paths:$t}),{setViewed:tn,refresh:nn,enabled:rn,isViewed:an,isStale:on}=X,sn=(0,E.useRef)(st);(0,E.useEffect)(()=>{sn.current!==st&&(sn.current=st,Pt({key:U,cursor:null,slices:I}),Bt(e=>e+1),Vt(),nn())},[st,U,Vt,nn]);let Z=W.at(-1)?.nextCursor??null,cn=W.some(e=>e.truncated)||J.some(e=>e?.kind===`raw`),ln=(0,E.useMemo)(()=>{let e=new Set;if(H!==null)return e;for(let t of Y){let n=x(t);for(let r of y.reviewThreads)r.path===n&&r.line!==null&&ut(t,r.side,r.line)&&e.add(r.id)}return e},[H,y.reviewThreads,Y]),un=(0,E.useMemo)(()=>Y.map(e=>{let t=Oe(e),n=x(e),r=new Map,i=(e,t)=>{let n=`${e}:${t}`,i=r.get(n);if(i)return i;let a={side:e,line:t,threads:[],pending:[],draft:!1};return r.set(n,a),a};for(let e of y.reviewThreads)e.path===n&&e.line!==null&&ln.has(e.id)&&i(e.side,e.line).threads.push(e);if(H===null)for(let e of Ut){if(e.path!==n)continue;let t=Ie(e.position);i(t.side,t.line).pending.push(e)}if(B?.fileKey===t){let e=Ie(B.position);i(e.side,e.line).draft=!0}let a=[...r.values()].map(e=>({side:Re(e.side),lineNumber:e.line,metadata:{threads:e.threads,pending:e.pending,draft:e.draft}}));return{fileKey:t,path:n,fileDiff:e,annotations:a,annotationsVersion:Te(a.map(({side:e,lineNumber:t,metadata:n})=>`${e}:${t}:${n.draft?`d`:``}:${n.pending.map(e=>`${e.id}:${e.body}`).join(`,`)}:${n.threads.map(e=>`${e.id}:${e.isResolved?`r`:``}:${e.isOutdated?`o`:``}:${e.comments.map(e=>`${e.id}:${e.author?.login??``}:${e.createdAt}:${e.body}:${(e.reactions??[]).map(e=>`${e.content}:${e.count}:${e.viewerHasReacted?`v`:``}`).join(`,`)}`).join(`;`)}`).join(`,`)}`).join(`|`))}}),[H,y.reviewThreads,B,Y,Ut,ln]),Q=(0,E.useMemo)(()=>un.map(({fileKey:e,path:t,fileDiff:n,annotations:r,annotationsVersion:i})=>{let a=dt(e,N,ct),o=rn?`e${an(t)?`v`:``}${on(t)?`s`:``}`:``;return{id:e,type:`diff`,fileDiff:n,annotations:r,collapsed:a,version:Te(`${a?`1`:`0`}:${o}:${i}`)}}),[un,rn,N,an,on,ct]),dn=(0,E.useMemo)(()=>new Map(W.flatMap(e=>e.omittedFileStats.map(e=>[e.path,e]))),[W]),fn=(0,E.useMemo)(()=>new Map(J.flatMap(e=>e?.kind===`files`?e.files.map((t,n)=>[Oe(t),Ae([e.sourceFiles[n]??t])]):[])),[J]),pn=(0,E.useMemo)(()=>Q.map(e=>e.id),[Q]),mn=(0,E.useMemo)(()=>new Set(Q.filter(e=>e.collapsed===!0).map(e=>e.id)),[Q]),hn=ye(pn,mn),gn=(0,E.useMemo)(()=>ve(Y),[Y]),_n=Z!==null&&Z!==G&&!K.isPending&&K.error===null,vn=(0,E.useCallback)(()=>{Z!==null&&Pt(e=>({...e,cursor:Z}))},[Z]),[yn,bn]=(0,E.useState)(null);(0,E.useEffect)(()=>{if(yn===null||!_n)return;let e=new IntersectionObserver(e=>{e.some(e=>e.isIntersecting)&&vn()},{rootMargin:`240px`});return e.observe(yn),()=>e.disconnect()},[_n,vn,yn]);let $=(0,E.useCallback)(e=>j(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n}),[]),xn=(0,E.useCallback)((e,t,n)=>{let r=pt(un,e,n?mt:null);ht(e);for(let e of r)tn(e.path,t);j(e=>r.reduce((e,n)=>ft(n.fileKey,t,N,e),e))},[un,N,mt,tn]),Sn=_e(It,U),Cn=(0,E.useCallback)(e=>{let t=Q.find(t=>x(t.fileDiff)===e);t!==void 0&&(t.collapsed===!0&&$(t.id),Sn(t.id))},[Q,Sn,$]),wn=(0,E.useRef)(null);(0,E.useEffect)(()=>{O!==null&&wn.current!==O.nonce&&(Q.some(e=>x(e.fileDiff)===O.path)?(wn.current=O.nonce,Cn(O.path)):_n&&vn())},[_n,Q,vn,Cn,O]);let Tn=()=>{vt(ye(pn,mn)?`expanded`:`folded`),j(new Set)},En=(0,E.useMemo)(()=>y.commits.toSorted((e,t)=>Date.parse(t.committedDate)-Date.parse(e.committedDate)),[y.commits]),Dn=(0,E.useCallback)((e,t)=>{if(!e||!Qt)return;let n=t.item;if(n.type!==`diff`)return;let r=Y.find(e=>Oe(e)===n.id);if(!r)return;let i=x(r),a=De(r),s=J.flatMap(e=>e?.kind===`files`?e.sourceFiles:[]).find(e=>x(e)===i),c=e.endSide??e.side,l=(s&&o(s,e.end,c))??o(r,e.end,c);l!==null&&V({fileKey:n.id,path:i,oldPath:a===i?null:a,position:l,range:e})},[Qt,Y,J]),On=(0,E.useCallback)((e,t,n)=>{let i=Y.find(t=>Oe(t)===e.fileKey),a=i===void 0?null:r({id:`pull-request-selection:${e.fileKey}:${e.range.start}:${e.range.end}`,sectionId:`pull-request:${y.number}`,sectionTitle:`PR #${y.number} review`,filePath:e.path,fileDiff:i,range:e.range,text:t});V(null),z(null),a!==null&&n(a)},[y.number,Y]),kn=(0,E.useCallback)(()=>Z===null?null:(0,F.jsx)(`div`,{ref:bn,className:`flex items-center justify-center gap-2 py-2 text-xs text-muted-foreground`,children:K.error===null?K.isPending?`Loading more files...`:null:(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`span`,{children:`The rest of this diff could not be loaded.`}),(0,F.jsx)(v,{size:`xs`,variant:`outline`,onClick:()=>K.refresh(),children:`Retry`})]})}),[Z,K.error,K.isPending,K.refresh]),An=(0,E.useCallback)(e=>{let t=e.collapsed===!0;return(0,F.jsx)(v,{size:`icon-micro`,variant:`ghost-muted`,"aria-expanded":!t,"aria-label":t?`Expand diff`:`Collapse diff`,className:`mr-1`,onClick:t=>{t.stopPropagation(),$(e.id)},children:(0,F.jsx)(he,{className:`size-4`,icon:t?pe:me})})},[$]),jn=(0,E.useRef)(X);jn.current=X;let Mn=(0,E.useRef)(xn);Mn.current=xn;let Nn=(0,E.useCallback)(e=>{if(e.type!==`diff`)return null;let{additions:t,deletions:n}=fn.get(e.id)??Ae([e.fileDiff]),r=x(e.fileDiff);if(t===0&&n===0){let e=dn.get(r);e&&({additions:t,deletions:n}=e)}let i=(0,F.jsx)(We,{additions:t,deletions:n,className:`font-mono text-2xs`}),a=jn.current;if(!a.enabled)return i;let o=a.isViewed(r),s=a.isStale(r);return(0,F.jsxs)(`span`,{className:`flex items-center gap-3`,children:[i,(0,F.jsxs)(`label`,{"data-viewed-toggle":``,className:`flex w-18 shrink-0 cursor-pointer select-none items-center gap-1.5 text-2xs text-muted-foreground`,onClick:e=>e.stopPropagation(),children:[(0,F.jsx)(Ke,{"aria-label":s?`Changed`:`Viewed`,checked:o,onCheckedChange:(t,n)=>Mn.current(e.id,t===!0,`shiftKey`in n.event&&n.event.shiftKey===!0)}),s?(0,F.jsxs)(w,{children:[(0,F.jsx)(S,{render:(0,F.jsx)(`span`,{className:`text-warning-foreground`}),children:`Changed`}),(0,F.jsx)(C,{side:`bottom`,children:`This file has been pushed to since you marked it viewed.`})]}):(0,F.jsx)(`span`,{className:`@max-xs:hidden`,children:`Viewed`})]})]})},[dn,fn]),Pn=(0,E.useMemo)(()=>({diffStyle:P===`split`?`split`:`unified`,lineDiffType:`none`,overflow:L?`wrap`:`scroll`,theme:ke(k),preferredHighlighter:Qe,themeType:k,stickyHeaders:!0,loadDiffFiles:Zt,enableGutterUtility:Qt&&B===null,enableLineSelection:Qt&&B===null,onGutterUtilityClick:Dn,onLineSelectionEnd:Dn}),[P,L,k,Zt,Qt,B,Dn]),Fn=(0,E.useCallback)(async(e,t)=>{if(kt)return!1;At(!0);let n=await t();return At(!1),n._tag===`Failure`?(ge.add({type:`error`,title:e}),!1):(D(),!0)},[D,kt]),In=(0,E.useCallback)(e=>(0,F.jsx)(Me,{thread:e,workspaceRoot:y.workspaceRoot,canReply:q.reply,canResolve:q.resolve&&Le(y,e),canReact:y.capabilities.reactions===!0,environmentId:t,reference:n,pending:kt,fixPending:rt===Ge({kind:`thread`,thread:e}),fixLabel:it,...at?{onFix:()=>at({kind:`thread`,thread:e})}:{},onLoadMore:async r=>{let i=await Yt({environmentId:t,input:{...n,threadId:e.id,cursor:r}});return i._tag===`Failure`?(ge.add({type:`error`,title:`More comments could not be loaded`}),null):i.value},onReply:r=>Fn(`Reply could not be posted`,()=>Kt({environmentId:t,input:{...n,threadId:e.id,body:r}})),canEditComment:e=>je(y,{author:e.author,kind:`review-comment`,canEdit:e.canEdit}),onEditComment:(e,r)=>Fn(`The comment could not be saved`,()=>Jt({environmentId:t,input:{...n,commentId:e,kind:`review-comment`,body:r}})),onToggleResolved:()=>void Fn(`The conversation could not be updated`,()=>qt({environmentId:t,input:{...n,threadId:e.id,resolved:!e.isResolved}})),onReacted:D},`${n.projectId}#${n.number}:${e.id}`),[y,t,it,Yt,D,at,rt,n,Kt,q.reply,q.resolve,Fn,qt,kt,Jt]),Ln=(0,E.useCallback)(e=>(0,F.jsxs)(`div`,{className:`py-1 font-sans text-foreground`,children:[e.metadata.threads.map(In),e.metadata.pending.map(e=>(0,F.jsx)(Ne,{comment:e,onRemove:()=>Gt(Ht,e.id)},e.id)),e.metadata.draft&&B?(0,F.jsx)(Be,{kind:`draft`,rangeLabel:`${B.path}:${Ie(B.position).line}`,text:``,submitLabel:`Add to review`,...ot?{secondaryAction:{label:`Add to agent`,onAction:e=>On(B,e,t=>ot({comment:t,request:e}))}}:{},onCancel:()=>{V(null),z(null)},onComment:e=>{Wt(Ht,{id:Xe(),path:B.path,...B.oldPath===null?{}:{oldPath:B.oldPath},position:B.position,body:e}),V(null),z(null)}}):null]}),[Wt,B,On,ot,Gt,In,Ht]),Rn=En.find(e=>e.oid===H);(0,E.useEffect)(()=>{H!==null&&Rn===void 0&&nt(null)},[H,nt,Rn]);let zn=Rn?Rn.messageHeadline:`All commits`,Bn=e=>{Tt(e),V(null),z(null)},Vn=(0,F.jsxs)(`div`,{className:`@container flex h-10 min-h-10 shrink-0 items-center justify-between gap-2 border-b border-border/60 bg-background px-4 text-xs text-muted-foreground`,children:[(0,F.jsxs)(`div`,{className:`flex min-w-0 flex-1 items-center gap-3`,children:[En.length>0?(0,F.jsxs)(m,{children:[(0,F.jsxs)(g,{render:(0,F.jsx)(v,{size:`xs`,variant:`secondary`}),className:`min-w-0 max-w-64`,"aria-label":`Diff scope: ${zn}`,children:[(0,F.jsx)(`span`,{className:`truncate`,children:zn}),(0,F.jsx)(l,{className:`size-3.5 shrink-0 opacity-70`})]}),(0,F.jsxs)(ie,{align:`start`,className:`max-w-[min(28rem,calc(100vw-2rem))]`,children:[(0,F.jsxs)(_,{value:H??`all`,onValueChange:e=>nt(e===`all`?null:e),children:[(0,F.jsx)(ee,{value:`all`,closeOnClick:!0,children:(0,F.jsx)(`span`,{children:`All commits`})}),En.slice(0,M).map(e=>(0,F.jsx)(ee,{value:e.oid,closeOnClick:!0,children:(0,F.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,F.jsxs)(w,{children:[(0,F.jsx)(S,{render:(0,F.jsx)(`span`,{className:`min-w-0 truncate`,children:e.messageHeadline})}),(0,F.jsx)(C,{side:`top`,children:e.messageHeadline})]}),(0,F.jsx)(`span`,{className:`ml-auto shrink-0 font-mono text-xs text-muted-foreground`,children:e.oid.slice(0,7)})]})},e.oid))]}),En.length>M?(0,F.jsx)(se,{closeOnClick:!1,onClick:()=>gt(e=>e+xt),children:(0,F.jsxs)(`span`,{className:`text-muted-foreground`,children:[`Show more (`,En.length-M,` left)`]})}):null]})]}):null,(0,F.jsxs)(Ue,{children:[(0,F.jsxs)(`span`,{className:`shrink-0 tabular-nums`,children:[Y.length,` `,Y.length===1?`file`:`files`,Z===null?``:`+`]}),X.enabled&&Y.length>0?(0,F.jsxs)(`span`,{className:`flex min-w-0 items-center gap-1 tabular-nums`,children:[(0,F.jsxs)(`span`,{className:`shrink-0`,children:[X.viewedCount,` / `,Y.length]}),(0,F.jsx)(`span`,{className:`truncate`,children:en===`environment`?`viewed in ${ue}`:`viewed`}),en===`environment`?(0,F.jsxs)(w,{children:[(0,F.jsx)(S,{render:(0,F.jsx)(`span`,{className:`flex shrink-0 items-center`}),children:(0,F.jsx)(re,{"aria-label":`These ticks are kept here, not on the host`,className:`text-muted-foreground size-3.5`})}),(0,F.jsx)(C,{side:`bottom`,children:`This host keeps no shared record of which files you have read, so these ticks are kept by this environment. They follow you between the apps connected to it, but the host's own web UI will not show them.`})]}):null,X.error===null?null:(0,F.jsxs)(w,{children:[(0,F.jsx)(S,{render:(0,F.jsx)(`span`,{className:`flex shrink-0 items-center`}),children:(0,F.jsx)(f,{"aria-label":`Your ticks could not be read`,className:`size-3.5 text-warning-foreground`})}),(0,F.jsxs)(C,{side:`bottom`,children:[`The boxes below are whatever was last read, and empty if nothing has been read yet. `,X.error]})]}),X.truncated?(0,F.jsxs)(w,{children:[(0,F.jsx)(S,{render:(0,F.jsx)(`span`,{className:`flex shrink-0 items-center`}),children:(0,F.jsx)(f,{"aria-label":`This count covers only part of the change`,className:`size-3.5 text-warning-foreground`})}),(0,F.jsx)(C,{side:`bottom`,children:`This change has more files than the host will report ticks for in one read, so the count is short and some boxes below start empty.`})]}):null]}):null,cn?(0,F.jsxs)(w,{children:[(0,F.jsx)(S,{render:(0,F.jsx)(`span`,{className:`flex shrink-0 items-center`}),children:(0,F.jsx)(f,{"aria-label":`Some of this diff was not shown`,className:`size-3.5 text-warning-foreground`})}),(0,F.jsx)(C,{side:`bottom`,children:`The host withheld part of this diff — a binary file, or a change too large to inline.`})]}):null,H!==null&&q.inlineComment?(0,F.jsxs)(w,{children:[(0,F.jsx)(S,{render:(0,F.jsx)(`span`,{className:`flex shrink-0 items-center`}),children:(0,F.jsx)(ce,{"aria-label":`Line comments are written from the whole change`,className:`size-3.5`})}),(0,F.jsx)(C,{side:`bottom`,children:`A comment is anchored to the whole change, so switch to All commits to write one.`})]}):null]})]}),(0,F.jsxs)(`div`,{className:`flex shrink-0 items-center gap-1`,children:[(0,F.jsxs)(m,{children:[(0,F.jsxs)(w,{children:[(0,F.jsx)(S,{render:(0,F.jsx)(g,{render:(0,F.jsx)(v,{size:`icon-sm`,variant:`ghost`}),className:`@lg:hidden`,"aria-label":`Diff options`}),children:(0,F.jsx)(te,{className:`size-3.5`})}),(0,F.jsx)(C,{side:`top`,children:`Diff options`})]}),(0,F.jsxs)(ie,{align:`end`,children:[(0,F.jsx)(d,{checked:R,onCheckedChange:e=>Bn(e),children:`Hide whitespace changes`}),(0,F.jsx)(d,{checked:L,onCheckedChange:e=>wt(e),children:`Wrap lines`}),(0,F.jsx)(ae,{}),(0,F.jsxs)(_,{value:P,onValueChange:e=>{(e===`stacked`||e===`split`)&&yt({diffLayout:e})},children:[(0,F.jsx)(ee,{value:`stacked`,closeOnClick:!0,children:`Stacked`}),(0,F.jsx)(ee,{value:`split`,closeOnClick:!0,children:`Split`})]})]})]}),(0,F.jsxs)(`div`,{className:`hidden items-center gap-1 @lg:flex`,children:[(0,F.jsxs)(w,{children:[(0,F.jsx)(S,{render:(0,F.jsx)(He,{"aria-label":R?`Show whitespace changes`:`Hide whitespace changes`,variant:`ghost`,size:`sm`,pressed:R,onPressedChange:e=>Bn(!!e)}),children:(0,F.jsx)(s,{className:`size-3.5`})}),(0,F.jsx)(C,{side:`top`,children:R?`Show whitespace changes`:`Hide whitespace changes`})]}),(0,F.jsxs)(Ve,{"aria-label":`Diff layout`,className:`shrink-0`,variant:`segmented`,value:[P],onValueChange:e=>{let t=e[0];(t===`stacked`||t===`split`)&&yt({diffLayout:t})},children:[(0,F.jsx)(He,{"aria-label":`Stacked diff view`,value:`stacked`,children:(0,F.jsx)(h,{className:`size-3.5`})}),(0,F.jsx)(He,{"aria-label":`Split diff view`,value:`split`,children:(0,F.jsx)(p,{className:`size-3.5`})})]}),(0,F.jsxs)(w,{children:[(0,F.jsx)(S,{render:(0,F.jsx)(He,{"aria-label":L?`Disable diff line wrapping`:`Enable diff line wrapping`,variant:`ghost`,size:`sm`,pressed:L,onPressedChange:e=>{wt(!!e)}}),children:(0,F.jsx)(c,{className:`size-3.5`})}),(0,F.jsx)(C,{side:`top`,children:L?`Disable line wrapping`:`Enable line wrapping`})]})]}),pn.length>0?(0,F.jsx)(v,{type:`button`,size:`icon-sm`,variant:`ghost`,"aria-label":hn?`Expand all files`:`Collapse all files`,onClick:Tn,children:(0,F.jsx)(he,{className:`size-3.5`,icon:hn?de:fe})}):null,pn.length>0?(0,F.jsxs)(w,{children:[(0,F.jsx)(S,{render:(0,F.jsx)(He,{"aria-label":Et?`Hide file tree`:`Show file tree`,variant:`ghost`,size:`sm`,pressed:Et,onPressedChange:e=>Dt(!!e)}),children:(0,F.jsx)(a,{className:`size-3.5`})}),(0,F.jsx)(C,{side:`top`,children:Et?`Hide file tree`:`Show file tree`})]}):null]})]}),Hn=t=>(0,F.jsxs)(`div`,{className:`flex h-full min-h-0 flex-col`,children:[Vn,(0,F.jsx)(`div`,{ref:e,className:`min-h-0 flex-1 overflow-auto`,children:t})]});if(K.isPending&&W.length===0)return Hn((0,F.jsx)(ze,{label:`Loading pull request diff...`}));if(K.error&&W.length===0)return Hn((0,F.jsx)(`p`,{className:`px-4 py-5 text-sm text-muted-foreground`,children:K.error}));let Un=Z===null?J.flatMap(e=>e?.kind===`raw`?[e]:[]):[];if(Y.length===0&&Un.length>0)return Hn((0,F.jsx)(`div`,{className:`space-y-4 px-4 py-5`,children:Un.map(e=>(0,F.jsxs)(`div`,{className:`space-y-2`,children:[(0,F.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e.reason}),(0,F.jsx)(`pre`,{className:`whitespace-pre-wrap break-words font-mono text-xs`,children:e.text})]},`${e.reason}:${e.text.slice(0,64)}`))}));if(Q.length===0&&Z===null)return Hn((0,F.jsx)(`p`,{className:`px-4 py-5 text-sm text-muted-foreground`,children:H===null?`This pull request has no file changes.`:`This commit has no file changes.`}));let Wn=y.reviewThreads.filter(e=>!ln.has(e.id)),Gn=new Map;for(let e of Wn){let t=Gn.get(e.path);t?t.push(e):Gn.set(e.path,[e])}let Kn=Un.length===0?null:(0,F.jsx)(`div`,{className:`space-y-4 border-t border-border/60 px-4 py-5`,children:Un.map(e=>(0,F.jsxs)(`div`,{className:`space-y-2`,children:[(0,F.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e.reason}),(0,F.jsx)(`pre`,{className:`whitespace-pre-wrap break-words font-mono text-xs`,children:e.text})]},`${e.reason}:${e.text.slice(0,64)}`))});return(0,F.jsxs)(`div`,{className:`flex h-full min-h-0 flex-col`,children:[Vn,Gn.size>0?(0,F.jsx)(`div`,{className:`shrink-0 border-b border-border/60`,children:(0,F.jsxs)(et,{open:jt,onOpenChange:Mt,children:[(0,F.jsx)(`h2`,{children:(0,F.jsxs)($e,{className:`flex w-full items-center gap-1.5 px-4 py-2 text-left text-xs text-muted-foreground`,children:[(0,F.jsx)(`span`,{children:Z===null?`Conversations not on the current diff`:`Conversations not on the diff loaded so far`}),(0,F.jsx)(i,{"aria-hidden":!0,className:oe(`size-3.5 transition-transform`,jt&&`rotate-90`)}),(0,F.jsx)(`span`,{"aria-hidden":!0,className:`tabular-nums`,children:Wn.length}),(0,F.jsx)(`span`,{className:`sr-only`,children:Wn.length===1?`1 conversation`:`${Wn.length} conversations`})]})}),(0,F.jsx)(Ze,{children:(0,F.jsx)(`div`,{className:`max-h-64 space-y-3 overflow-auto px-4 pb-3`,children:[...Gn].map(([e,t])=>(0,F.jsxs)(`div`,{children:[(0,F.jsxs)(w,{children:[(0,F.jsx)(S,{render:(0,F.jsx)(`p`,{className:`truncate px-3 text-xs text-muted-foreground`,children:e})}),(0,F.jsx)(C,{side:`top`,children:e})]}),(0,F.jsx)(`div`,{className:`mt-1 space-y-2`,children:t.map(e=>(0,F.jsxs)(`div`,{children:[e.line===null?null:(0,F.jsxs)(`p`,{className:`px-3 text-xs text-muted-foreground`,children:[`Line `,e.line]}),In(e)]},e.id))})]},e))})})]})}):null,(0,F.jsxs)(`div`,{className:`flex min-h-0 flex-1 overflow-hidden`,children:[(0,F.jsx)(`div`,{className:`relative min-h-0 min-w-0 flex-1`,onClickCapture:e=>{let t=e.nativeEvent.composedPath?.()??[];for(let e of t)if(e instanceof HTMLElement){if(e instanceof HTMLButtonElement||e instanceof HTMLAnchorElement||e.hasAttribute(`data-viewed-toggle`))return;if(e.hasAttribute(`data-diffs-header`)){let t=e.querySelector(`[data-title]`)?.textContent?.trim();if(t===void 0||t===``)return;let n=Q.find(e=>x(e.fileDiff)===t);n!==void 0&&$(n.id);return}}},children:(0,F.jsx)(Fe,{className:`@container h-full overflow-auto [scrollbar-gutter:stable]`,containerRef:e,viewerRef:Lt,items:Q,selectedLines:Ot,onSelectedLinesChange:z,options:Pn,renderCodeViewFooter:kn,renderHeaderPrefix:An,renderHeaderMetadata:Nn,renderAnnotation:Ln,onRevealSearchMatch:e=>j(t=>ft(e.id,!1,N,t)),unsafeCSSExtra:Ct})}),Et?(0,F.jsx)(`aside`,{className:`flex w-[min(20rem,40%)] min-w-48 shrink-0 border-l border-border/60`,children:(0,F.jsx)(be,{ariaLabel:`Pull request #${y.number} files`,entries:gn,onSelectFile:Cn,footer:Z===null?null:(0,F.jsx)(`div`,{className:`shrink-0 border-t border-border/60 p-2`,children:(0,F.jsx)(v,{type:`button`,size:`xs`,variant:`outline`,className:`w-full`,disabled:K.isPending,onClick:K.error===null?vn:()=>K.refresh(),children:K.error===null?K.isPending?`Loading more files...`:`Load more files`:`Retry`})})})}):null]}),Kn]})}export{L as default};
|
|
6
|
-
//# sourceMappingURL=PullRequestCodeTab-
|
|
6
|
+
//# sourceMappingURL=PullRequestCodeTab-CajEWSe5.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as e,d as t,f as n,g as r,l as i,o as a,r as o,s,t as c,y as l}from"./77XECAW3-
|
|
1
|
+
import{_ as e,d as t,f as n,g as r,l as i,o as a,r as o,s,t as c,y as l}from"./77XECAW3-DM5Itfvk.js";import{a as u,i as d,l as f,s as p,u as m}from"./N3JZAHOW-Dz6QAj1L.js";import{a as h,t as g}from"./DKTLEL5E-DciMwFJ1.js";import{n as _,r as v}from"./74OO7NKP-DZoL_aBI.js";import{i as y,n as b,r as x,t as S}from"./NUIALGQ3-W9kPoZrb.js";import{a as C,i as w,o as T,r as E,t as D}from"./5N7A7DKN-B-2quXAp.js";import{t as ee}from"./7WLXJQOR-D6QVYUu9.js";import{a as te,i as O,t as k}from"./ABYRPUBD-C2IaQicJ.js";import{n as A,t as j}from"./FTXIJQGB-CggtIYAM.js";import{PeleError as M,_ as ne,i as N,m as re,n as P,r as F,u as I}from"./lazy-Bpm7QNt6.js";var L=new Map([[`task`,`roundedRect`],[`tool`,`subroutine`],[`input`,`lean-right`],[`decision`,`diamond`],[`refdoc`,`lin-doc`],[`action`,`hexagon`],[`round`,`rect`]]),R=new Set(`doc.stadium.terminal.circle.trapezoid.inv_trapezoid.inv-trapezoid.doublecircle.double-circle.typeDeclaration.procs.lean_left.lean-left.in-out.cylinder.ellipse.odd.tag-rect.tagged-rectangle.delay.half-rounded-rectangle.lin-rect.lined-rectangle.win-pane.window-pane.curv-trap.curved-trapezoid`.split(`.`)),z=new Set([`roundedRect`,`subroutine`,`subprocess`,`subproc`,`framed-rectangle`,`lean-right`,`diamond`,`lin-doc`,`lined-document`,`hexagon`,`hex`,`connector`,`collapsedGroup`]),B=`roundedRect`;function V(e){return e&&(L.get(e)??e)}function ie(e){return j(e)||e===`constructor`}function ae(e,t){for(let n of e)n.isGroup||(n.shape&&n.shape!==`squareRect`&&n.shape!==`rect`||(n.shape=B),R.has(n.shape)?(t.emitError(`SHAPE_REMOVED`,`shape "${n.shape}" was removed in v0.8.1, using "${B}"`,{nodeId:n.id}),n.shape=B):z.has(n.shape)||(t.emitWarning(`SHAPE_UNSUPPORTED`,`shape "${n.shape}" is not supported, using "${B}"`,{nodeId:n.id}),n.shape=B))}var oe=new Set([`shape`,`view`,`icon`,`img`,`form`,`pos`,`w`,`h`,`class`,`style`,`labelType`]),H=new Set([`subroutine`,`subprocess`,`subproc`,`framed-rectangle`,`tool`]);function se(e){return H.has(e.type)}function U(e){return e===`markdown`||e===`string`||e===`text`?e:`markdown`}function ce(e){return e.startsWith(`"`)&&e.endsWith(`"`)?e.substring(1,e.length-1):e}function W(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function G(e){let t=e=>Array.isArray(e)?[]:W(e)?{}:e,n=t(e),r=[[e,n]];for(;r.length>0;){let[e,n]=r.pop();if(Array.isArray(e))for(let i of e){let e=t(i);n.push(e),typeof i==`object`&&i&&r.push([i,e])}else if(W(e))for(let i of Object.keys(e)){if(i===`__proto__`||i===`constructor`||i===`prototype`)continue;let a=e[i],o=t(a);n[i]=o,typeof a==`object`&&a&&r.push([a,o])}}return n}function K(e,t){return Object.assign(e??{},t)}var q=/:\s*[>|][\d+-]*\s*$/,le=/,([\t ]*)$/;function ue(e){let t=!1,n=!1,r=0,i,a=[];for(let o of e.split(`
|
|
2
2
|
`)){if(i!==void 0){let e=o.length-o.trimStart().length;if(o.trim()===``||e>i){a.push(o);continue}i=void 0}let e=-1;for(let i=0;i<o.length;i++){let a=o[i];if(n)a===`\\`?i++:a===`"`&&(n=!1);else if(t)a===`'`&&(t=!1);else if(a===`"`)n=!0;else if(a===`'`)t=!0;else if(a===`#`&&(i===0||o[i-1]===` `||o[i-1]===` `)){e=i;break}else a===`[`||a===`{`?r++:(a===`]`||a===`}`)&&(r=Math.max(0,r-1))}if(t||n||r>0){a.push(o);continue}let s=e>=0?o.slice(0,e):o,c=e>=0?o.slice(e):``;q.test(s)?(i=o.length-o.trimStart().length,a.push(o)):a.push(s.replace(le,`$1`)+c)}return a.join(`
|
|
3
3
|
`)}function de(e,t){if(e===`arrow_point`&&t===`normal`)return`sequence`;if(e===`arrow_cross`&&t===`normal`)return`failure`;if(e===`arrow_open`&&t===`dotted`)return`reference`}function fe(e){let t=e.trim(),n=t.slice(0,-1),r=`arrow_open`;switch(t.slice(-1)){case`x`:r=`arrow_cross`;break;case`>`:r=`arrow_point`;break;case`-`:case`.`:n=t}let i=`normal`,a=n.length-1,o=0;for(let e=0;e<n.length;e++)n[e]===`.`&&o++;return o>0&&(i=`dotted`,a=o),{type:r,stroke:i,length:a}}function J(e){if(!e)return;let t={},n=!1;for(let r of Object.keys(e))oe.has(r)||(t[r]=e[r],n=!0);return n?t:void 0}var pe=class{type=`agentflow`;direction;nodes=new Map;edges=[];subgraphs=[];connectors=new Map;classes=new Map;tooltips=new Map;defaultEdgeStyle;defaultInterpolate;mappings=[];diagnostics=[];title;accTitle;accDescr;lineOffset;subgraphLookup=new Map;globalNodes=new Set;members=new Set;edgeById=new Map;pairCount=new Map;subCount=0;bareMappings=new Set;firstMapping=new Map;reported=new Map;options;constructor(e={}){this.options=e,this.lineOffset=e.lineOffset??0}metadata(e,t,n){let r=t.includes(`
|
|
4
4
|
`),i;try{i=P(r?t+`
|
|
@@ -10,4 +10,4 @@ import{_ as e,d as t,f as n,g as r,l as i,o as a,r as o,s,t as c,y as l}from"./7
|
|
|
10
10
|
`,n+2);return r===-1?t:r},L=()=>{e.charCodeAt(c+1)===96?(O(2),w(c+2)):(O(1),w(c+1))},R=t=>{let n=e.charCodeAt(c+1);return t===40?(n===45?(O(8),E(47,c+2)):n===91?(O(7),E(49,c+2)):n===40&&e.charCodeAt(c+2)===40?(O(7),E(57,c+3)):(O(7),E(72,c+1)),!0):t===91?(n===91?(O(7),E(51,c+2)):n===40?(O(7),E(55,c+2)):n===47?(O(9),E(60,c+2)):n===92?(O(9),E(61,c+2)):(O(7),E(74,c+1)),!0):t===124?(O(7),E(70,c+1),!0):t===123&&(O(7),E(76,c+1),!0)},z=()=>{let n=c;for(;n<t;){let r=e.charCodeAt(n);if(r<128&&me[r]===1)n++;else if(r===45&&n+1<t){let t=e.charCodeAt(n+1);if(t===62||t===45||t===46)break;n++}else break}return n!==c&&(E(67,n),!0)},B=n=>{let r=n;for(;r<t;){let t=e.charCodeAt(r);if(t!==32&&t!==9)break;r++}return r},V=n=>{let r;switch(n){case 97:if(e.startsWith(`acc`,c)){if((r=A(he,c))>=0)return O(3),T(2,r),!0;if((r=A(ge,c))>=0)return O(4),T(4,r),!0;if((r=A(_e,c))>=0)return O(5),w(r),!0}if(j(`agentflow-beta`))return d&&(d=!1,O(6)),E(20,c+14),!0;break;case 64:if(e.charCodeAt(c+1)===123)return O(14),te(7,``,c+2),!0;break;case 99:if((r=A(ve,c))>=0)return O(12),w(r),!0;if(j(`classDef`))return E(16,c+8),!0;if(j(`class`))return E(17,c+5),!0;if((r=A(ye,c))>=0)return O(11),w(r),!0;if(j(`connector`))return E(22,c+9),!0;break;case 34:return L(),!0;case 115:if(j(`style`))return E(12,c+5),!0;break;case 100:if(j(`default`))return E(13,c+7),!0;break;case 108:if(j(`linkStyle`))return E(14,c+9),!0;break;case 105:if(j(`interpolate`))return E(15,c+11),!0;break;case 104:if(e.startsWith(`href`,c)&&F(e.charCodeAt(c+4)))return T(18,c+5),!0;break;case 102:if(j(`flow`))return E(21,c+4),!0;break;case 103:if(j(`global`))return E(23,B(c+6)),!0;break;case 101:if(j(`end`))return E(24,B(c+3)),!0;break;case 95:if(j(`_self`))return E(25,c+5),!0;if(j(`_blank`))return E(25,c+6),!0;if(j(`_parent`))return E(25,c+7),!0;if(j(`_top`))return E(25,c+4),!0}if(f!==-1&&c>=h&&(f<c&&(f=e.indexOf(`direction`,c)),f!==-1&&(m<c&&(X.lastIndex=c,m=X.test(e)?X.lastIndex-1:t),f<m))){for(let e=0;e<5;e++)if((r=A(we[e],c))>=0)return T(28+e,r),!0;h=m}if(p!==-1&&n!==34&&!F(n)){if(c>=g){p<c&&(p=e.indexOf(`@`,c));let n=c;for(;n<t;){let t=e.charCodeAt(n);if(t===34||F(t))break;n++}if(g=n,_=-1,p!==-1&&p<n)for(let r=Math.min(n,t-1)-1;r>=p;r--){if(e.charCodeAt(r)!==64)continue;let t=e.charCodeAt(r+1);if(t!==123&&t!==34){_=r;break}}}if(_>c)return E(33,_+1),!0}if(n>=48&&n<=57){let n=c+1;for(;n<t;){let t=e.charCodeAt(n);if(t<48||t>57)break;n++}return E(34,n),!0}switch(n){case 35:return E(35,c+1),!0;case 58:return e.charCodeAt(c+1)===58&&e.charCodeAt(c+2)===58?E(36,c+3):E(37,c+1),!0;case 38:return E(38,c+1),!0;case 59:return E(39,c+1),!0;case 44:return E(40,c+1),!0;case 42:return E(41,c+1),!0;case 60:return E(62,c+1),!0;case 45:return P()||z()||E(68,c+1),!0;case 40:return R(n);case 91:return e.charCodeAt(c+1)===124?(E(52,c+2),!0):R(n);case 124:case 123:return R(n);case 62:return O(7),E(53,c+1),!0;case 94:return E(63,c+1),!0;case 92:return e.charCodeAt(c+1)===124?(E(64,c+2),!0):z();case 118:return N(e.charCodeAt(c+1))?z():(E(65,c+1),!0);case 37:return(r=I(c))>=0?(T(66,r),!0):z()}if(F(n)){if(P())return!0;if((n===32||n===9)&&(r=I(ne(c)))>=0)return T(66,r),!0;for(r=c;;){let t=e.charCodeAt(r);if(t===10)r++;else if(t===13&&e.charCodeAt(r+1)===10)r+=2;else break}return r>c?T(77,r):T(78,c+1),!0}return n<128?z():ee(n)?(E(69,c+1),!0):!1};e:for(;;){if(c>=t){let e=-1;switch(s){case 0:e=79;break;case 3:e=3;break;case 4:e=5;break;case 5:e=6;break;case 11:e=19;break;case 12:e=8;break;case 13:e=9}e!==-1&&E(e,t);break}let o=e.charCodeAt(c),d=!0;switch(s){case 0:d=V(o);break;case 1:if(o===34)e.charCodeAt(c+1)===96?(O(2),w(c+2)):(k(),w(c+1));else{let n=e.indexOf(`"`,c);T(11,n===-1?t:n)}break;case 2:if(o===96)e.charCodeAt(c+1)===34?(k(),w(c+2)):d=!1;else if(o===34)L();else{let n=c+1;for(;n<t;){let t=e.charCodeAt(n);if(t===96||t===34)break;n++}T(10,n)}break;case 3:case 4:{let n=e.indexOf(`
|
|
11
11
|
`,c);n===-1&&(n=t);let r=s===3?3:5;k(),T(r,n);break}case 5:if(o===125)k(),w(c+1);else{let n=e.indexOf(`}`,c);n===-1&&(n=t),T(6,n)}break;case 6:{let e;o===34?L():(e=A(be,c))>=0?(k(),T(26,e)):(e=A(xe,c))>=0||(e=A(Se,c))>=0||(e=A(Ce,c))>=0?(k(),T(27,e)):d=R(o);break}case 7:{let n=e.charCodeAt(c+1);switch(o){case 34:L();break;case 40:case 91:case 123:R(o);break;case 93:k(),n===41?E(48,c+2):n===93?E(50,c+2):E(73,c+1);break;case 41:k(),n===93?E(54,c+2):n===41&&e.charCodeAt(c+2)===41?E(56,c+3):E(71,c+1);break;case 124:k(),E(70,c+1);break;case 125:k(),E(75,c+1);break;case 37:{let e=I(c);e>=0?w(e):d=!1;break}default:{let n=c+1;for(;n<t;){let t=e.charCodeAt(n);if(t===91||t===93||t===40||t===41||t===123||t===125||t===124||t===34||t===37)break;n++}T(46,n)}}break}case 8:{let n=e.charCodeAt(c+1),r;if(o===34)L();else if(o===37&&(r=I(c))>=0)w(r);else if((o===45||o===47||o===41)&&n===41)k(),E(45,c+2);else if(o===40||o===91||o===123)R(o);else if(o===41||o===93||o===125)d=!1;else{let n=c+1;for(;n<t;){let t=e.charCodeAt(n);if(t===34||t===40||t===41||t===91||t===93||t===123||t===125||(t===45||t===47)&&e.charCodeAt(n+1)===41||t===37&&e.charCodeAt(n+1)===37&&e.charCodeAt(n+2)!==123)break;n++}D(46,n)}break}case 9:{let n=e.charCodeAt(c+1);if(o===34){L();break}switch(o){case 40:n===45||n===91||n===40&&e.charCodeAt(c+2)===40?R(o):n===93?(k(),E(58,c+2)):R(o);break;case 91:case 123:R(o);break;case 92:n===93?(k(),E(58,c+2)):E(46,c+1);break;case 47:n===93?(k(),E(59,c+2)):E(46,c+1);break;case 93:case 41:n===93?(k(),E(58,c+2)):d=!1;break;case 125:d=!1;break;case 37:{let e=I(c);e>=0?w(e):d=!1;break}default:{if((o===63||o===61)&&n===93){k(),E(58,c+2);break}let r=c+1;for(;r<t;){let t=e.charCodeAt(r);if(t===92||t===91||t===93||t===40||t===41||t===123||t===125||t===47||t===37)break;r++}T(46,r)}}break}case 10:{if(o===34){L();break}let n=re(c);if(n>=0){k(),T(42,n);break}if(o===45&&e.charCodeAt(c+1)===45){d=!1;break}let r=c+1;for(;r<t;){let t=e.charCodeAt(r);if(t===34)break;if(t===45){if(e.charCodeAt(r+1)===45)break}else if(F(t)&&re(r)>=0)break;r++}D(44,r);break}case 11:if(o===34)L();else if(F(o))k(),w(c+1);else{let n=c+1;for(;n<t&&!F(e.charCodeAt(n));)n++;E(19,n)}break;case 12:if(o===40){let e=A(Te,c);k(),e>=0?w(e):(O(13),w(c+1))}else{let n=e.indexOf(`(`,c);n===-1&&(n=t),T(8,n)}break;case 13:if(o===41)k(),w(c+1);else{let n=e.indexOf(`)`,c);n===-1&&(n=t),T(9,n)}break;case 14:if(o===34)O(15),E(7,c+1);else if(o===125)k(),w(c+1);else if(o===94)d=!1;else{let n=c+1;for(;n<t;){let t=e.charCodeAt(n);if(t===125||t===94||t===34)break;n++}T(7,n)}break;case 15:if(o===34)k(),E(7,c+1);else{let n=e.indexOf(`"`,c);n===-1&&(n=t),te(7,e.slice(c,n).replace(Ee,`<br/>`),n)}}if(!d)return n.push(1),r.push(``),i.push(c),a.push(l,u,l,u),{types:n,texts:r,starts:i,locs:a};continue e}return n.push(0),r.push(``),i.push(t),a.push(l,u,l,u),{types:n,texts:r,starts:i,locs:a}}var Oe=new Uint8Array(80);for(let e of[34,67,65,68,13,40,37,38,35,41,69])Oe[e]=1;var ke=new Uint8Array(80);for(let e of[34,69,67,27,65,68,40,37,38,35,41])ke[e]=1;var Ae=new Uint8Array(80);for(let e of[34,67,78,68,38,69,37,41,35,12,14,16,17,19,20,27,21,22,23,24,65,63,43])Ae[e]=1;var je=new Uint8Array(80);for(let e of[34,67,37,78,35,12])je[e]=1;var Me=new Uint8Array(80);for(let e of[77,39,79,66])Me[e]=1;var Ne=`'UNICODE_TEXT', 'TEXT', 'TAGSTART'`,Pe=`'COMMENT', 'SEMI', 'NEWLINE', 'EOF'`,Z=[],Fe=/}[^\S\n]*\n/g;function Ie(e,t,n=!1){let r=!n&&e.includes(`}`)?e.replace(Fe,`}
|
|
12
12
|
`):e,{types:i,texts:a,starts:o,locs:s}=De(r),c=0,l,u=0,d=0,f=e=>{let t=i[c];throw t===1?I(`agentflow`,r,o[c],``,!0):I(`agentflow`,r,o[c],`Expecting ${e}, got '${Y[t]}'`)},p=(e,t)=>({first_line:s[4*e],first_column:s[4*e+1],last_line:s[4*t+2],last_column:s[4*t+3]}),m=(e,t=``)=>(i[c]!==e&&f(`'${Y[e]}'${t?`, `+t:``}`),a[c++]),h=()=>{Me[i[c]]===0&&f(Pe),c++},g=()=>{Oe[i[c]]===0&&f(`'NODE_STRING'`);let e=a[c++];for(;Oe[i[c]]===1;)e+=a[c++];return e},_=()=>{ke[i[c]]===0&&f(`'NODE_STRING'`);let e=a[c++];for(;ke[i[c]]===1;)e+=a[c++];return e},v=()=>{let e=i[c],t;if(e===11)t=`string`;else if(e===10)t=`markdown`;else if(e===46||e===62||e===53||e===69)t=`text`;else return f(`${Ne}, 'TAGEND', 'STR', 'MD_STR'`);let n=a[c++];for(;;){let e=i[c];if(e!==46&&e!==62&&e!==53&&e!==69)break;n+=a[c++]}return{text:n,type:t}},y=e=>{m(e,Ne)},b=()=>{let e=i[c],t;if(e===11)t=`string`;else if(e===10)t=`markdown`;else if(e===44||e===69)t=`text`;else return f(`'EDGE_TEXT', 'STR', 'MD_STR'`);let n=a[c++];for(;i[c]===44||i[c]===69;)n+=a[c++];return{text:n,type:t}},x=()=>{let e=i[c],t;if(e===11)t=`text`;else if(e===10)t=`markdown`;else if(Ae[e]===1)t=`text`;else return f(`'NODE_STRING', 'STR', 'MD_STR'`);let n=a[c++];for(;Ae[i[c]]===1;)n+=a[c++];return{text:n,type:t}},S=()=>{u=c;let e=a[c++];for(;i[c]===7;)e+=a[c++];return d=c-1,e},C=(e,n,r,i)=>{let a=p(r,i);t.addVertex(e,void 0,void 0,void 0,void 0,void 0,void 0,n,a),t.extendVertexMapping(e,a)},w=(e,n)=>{n.data!==void 0&&t.addVertex(e,void 0,void 0,void 0,void 0,void 0,void 0,n.data,p(n.dataFrom,n.dataTo))},T=()=>{let e=c,n=g(),r,a,o;switch(i[c]){case 74:c++,r=v(),y(73),a=`square`;break;case 57:c++,r=v(),y(56),a=`doublecircle`;break;case 72:c++,i[c]===72?(c++,r=v(),y(71),m(71),a=`circle`):(r=v(),y(71),a=`round`);break;case 47:c++,r=v(),y(45),a=`ellipse`;break;case 49:c++,r=v(),y(48),a=`stadium`;break;case 51:c++,r=v(),y(50),a=`subroutine`;break;case 52:{c++;let e=m(67);m(37);let t=m(67);m(70),r=v(),y(73),a=`rect`,o={[e]:t};break}case 55:c++,r=v(),y(54),a=`cylinder`;break;case 76:c++,i[c]===76?(c++,r=v(),y(75),m(75),a=`hexagon`):(r=v(),y(75),a=`diamond`);break;case 53:c++,r=v(),y(73),a=`odd`;break;case 60:c++,r=v(),i[c]===59?(c++,a=`lean_right`):(y(58),a=`trapezoid`);break;case 61:c++,r=v(),i[c]===58?(c++,a=`lean_left`):(y(59),a=`inv_trapezoid`)}return o===void 0?a===void 0?t.addVertex(n):t.addVertex(n,r,a):t.addVertex(n,r,a,void 0,void 0,void 0,o),t.addVertexMapping(n,r,a,p(e,c-1)),n},E=()=>{let e=T();return i[c]===36&&(c++,t.setClass(e,g())),e},D=()=>{let e=[E()];for(l=void 0;;){let t=i[c]===7?S():void 0,n=u,r=d;if(i[c]!==78)return l=t,e;do c++;while(i[c]===78);if(i[c]!==38)return t!==void 0&&f(`'AMP'`),e;c++,i[c]!==78&&f(`'SPACE'`);do c++;while(i[c]===78);let a=E();t!==void 0&&C(e[e.length-1],t,n,r),e.push(a)}},ee=()=>{let e;if(i[c]===33&&(e=a[c++]),i[c]===42){let n=t.destructLink(a[c++]);return e!==void 0&&(n.id=e),i[c]===70&&(c++,n.text=v(),y(70),i[c]===78&&c++),n}if(i[c]===43){let n=a[c++],r=b(),i=m(42,`'EDGE_TEXT'`),o=t.destructLink(i,n);return o.text=r,e!==void 0&&(o.id=e),o}return f(`'LINK', 'START_LINK'`)},te=()=>{let e=c,n=D();l!==void 0&&C(n[n.length-1],l,u,d);let r=n;for(;;){let a=i[c];if(a!==42&&a!==43&&a!==33)return r;let o=ee(),s=D();l!==void 0&&C(s[s.length-1],l,u,d),t.addLink(n,s,o),t.addEdgeMapping(n,s,o,p(e,c-1)),r=s.concat(r),n=s}},O=()=>{je[i[c]]===0&&f(`'NODE_STRING', 'NUM', 'COLON', 'BRKT'`);let e=a[c++];for(;je[i[c]]===1;)e+=a[c++];return e},k=()=>{let e=[O()];for(;i[c]===40;)c++,e.push(O());return e},A=()=>{c++,m(78);let e;if(i[c]===13)e=[a[c++]];else for(e=[m(34,`'DEFAULT'`)];i[c]===40;)c++,e.push(m(34));if(m(78),i[c]!==15){t.updateLink(e,k());return}c++,m(78);let n=_();if(i[c]===78){c++;let r=k();t.updateLinkInterpolate(e,n),t.updateLink(e,r)}else t.updateLinkInterpolate(e,n)},j=(e,n)=>{if(i[c]!==78){t.setLink(e,n);return}if(c++,i[c]===25){t.setLink(e,n,a[c++]);return}let r=m(11,`'LINK_TARGET'`);i[c]===78?(c++,t.setLink(e,n,m(25))):t.setLink(e,n),t.setTooltip(e,r)},M=()=>{let e=a[c++];switch(i[c]){case 8:{let n=a[c++],r=i[c]===9,o=r?a[c++]:void 0,s;i[c]===78&&(c++,s=m(11)),r?t.setClickEvent(e,n,o):t.setClickEvent(e,n),s!==void 0&&t.setTooltip(e,s);return}case 18:c++,j(e,m(11));return;case 11:j(e,a[c++]);return;default:{let n=_();if(i[c]===78){c++;let r=m(11);t.setClickEvent(e,n),t.setTooltip(e,r)}else t.setClickEvent(e,n)}}},ne=e=>{m(78,Pe);let t=x(),n={text:``,type:`text`};i[c]===74&&(c++,n=v(),y(73));let r=i[c]===7?S():void 0;return Me[i[c]]===0&&f(`${Pe}, 'SHAPE_DATA'`),{global:!1,at:e,id:t,title:n,data:r,dataFrom:u,dataTo:d,list:[],collect:!1}},N=()=>{let e=i[c];switch(e){case 12:{c++,m(78);let e=g();return m(78),t.addVertex(e,void 0,void 0,k()),h(),Z}case 14:return A(),h(),Z;case 16:{c++,m(78);let e=g();return m(78),t.addClass(e,k()),h(),Z}case 17:{c++,m(78);let e=g();return m(78),t.setClass(e,g()),h(),Z}case 19:return M(),h(),Z;case 22:{let e=ne(c++),n=c++,r=t.addConnector(e.id,e.title);return w(r,e),t.addConnectorMapping(e.id,e.title,p(e.at,e.at),p(n,n)),r}case 28:case 29:case 30:case 31:case 32:return c++,{stmt:`dir`,value:Le[e-28]};case 2:{c++;let e=m(3).trim();return t.setAccTitle(e),e}case 4:{c++;let e=m(5).trim();return t.setAccDescription(e),e}case 6:{let e=a[c++].trim();return t.setAccDescription(e),e}default:{Oe[e]===0&&f(Re);let t=te();return h(),t}}},re=()=>{let e=[],n=[],r=!1;for(;;){let o=i[c];if(o===0)break;if(o===24){let i=e.pop();if(i===void 0)break;let a=c++;if(i.global){t.addGlobal(n),n=i.list,r=i.collect;continue}let o=t.addSubGraph(i.id,n,i.title,`flow`);w(o,i),t.addSubgraphMapping(i.id,i.title,p(i.at,i.at),p(a,a)),n=i.list,r=i.collect,r&&n.push(o)}else if(o===39||o===77||o===78||o===79)r&&n.push(a[c]),c++;else if(o===66)c++;else if(o===21||o===23){let t=c++,a;o===23||Me[i[c]]===1?(a={global:o===23,at:t,id:void 0,title:void 0,data:void 0,dataFrom:0,dataTo:0,list:n,collect:r},h()):(a=ne(t),a.list=n,a.collect=r,c++),e.push(a),n=[],r=!0}else{let e=N();r&&(!Array.isArray(e)||e.length>0)&&n.push(e)}}e.length>0&&f(`'end'`)};for(;i[c]===78||i[c]===77||i[c]===66;)c++;if(m(20,`'SPACE', 'NEWLINE', 'COMMENT'`),i[c]===26)c++,t.setDirection(`TB`);else{let e=m(27,`'NODIR'`),n=i[c];if(n===78){do c++;while(i[c]===78);n=i[c],n!==77&&f(`'NEWLINE', 'SPACE'`)}else n!==39&&n!==77&&n!==66&&f(`'COMMENT', 'SEMI', 'NEWLINE', 'SPACE'`);c++,t.setDirection(e)}re(),i[c]!==0&&f(Re)}var Le=[`TB`,`BT`,`RL`,`LR`,`TD`],Re=`'COMMENT', 'SEMI', 'NEWLINE', 'SPACE', 'EOF', 'flow', 'global', 'connector', 'acc_title', 'acc_descr', 'acc_descr_multiline_value', 'STYLE', 'LINKSTYLE', 'CLASSDEF', 'CLASS', 'CLICK', 'NODE_STRING'`,Q=new Map([[`tool`,0],[`task`,1],[`decision`,2],[`input`,3],[`refdoc`,4],[`connector`,5],[`action`,6]]),ze=Q.size,Be=e=>Math.max(1,e-ze),Ve=(e,t)=>{let n=ze+e%Be(t);return t>0?n%t:n};function He(e,t,n,r){let i=n.size;for(let a of e){if(a.isGroup||a.shape===`collapsedGroup`){a.colorIndex=Ve(n.get(a.id)??i++,r);continue}let e=t(a.id);e&&Q.has(e)&&(a.kind=e)}}function Ue(e,t,n){let r=[],i=[],a=e.subgraphs,o=t=>{let n=[];for(let r of t){let t=e.classes.get(r);t?.styles&&(n=[...n,...t.styles].map(e=>e.trim())),t?.textStyles&&(n=[...n,...t.textStyles].map(e=>e.trim()))}return n},s=new Set,c=new Map,l=new Set;for(let t of a){if(t.metadata?.view!==`collapsed`||s.has(t.id))continue;let n=[t.id];for(;n.length>0;){let r=e.subgraph(n.pop())?.nodes;if(r!==void 0)for(let e of r)e===t.id||s.has(e)||(s.add(e),c.set(e,t.id),l.has(e)||n.push(e))}l.add(t.id)}let u=new Map;for(let e of s){let t=[e],n=c.get(e);for(;;){let e=u.get(n),r=e??c.get(n);if(r===void 0||(e===void 0&&t.push(n),n=r,e!==void 0))break}for(let e of t)u.set(e,n)}let d=new Map;a.forEach((e,t)=>d.set(e.id,t));let f=new Map,p=(e,t,n)=>{let r=d.get(e);if(r===void 0||r<n)return!1;let i=t;for(let t=0;i!==void 0&&t<=a.length;t++){if(i===e)return!0;i=f.get(i)}return!1};for(let t=a.length-1;t>=0;t--){let n=a[t];if(!s.has(n.id))for(let r of n.nodes)p(r,n.id,t)?e.emitWarning(`CONTAINMENT_VIOLATION`,`Container "${n.id}" cannot contain "${r}" because "${r}" already contains it. The nesting that would close the loop is dropped.`,{nodeId:r}):f.set(r,n.id)}let m=new Map;for(let e=a.length-1;e>=0;e--){let t=a[e];if(s.has(t.id))continue;let n=t.metadata?.view===`collapsed`,i={id:t.id,label:t.title,labelType:t.labelType,parentId:f.get(t.id),cssStyles:[],cssCompiledStyles:o(t.classes),cssClasses:t.classes.join(` `),shape:n?`collapsedGroup`:`flowGroup`,dir:t.dir,isGroup:!n,metadata:n?{...t.metadata,containerType:t.type}:t.metadata};r.push(i),m.set(t.id,i)}for(let t of e.nodes.values()){if(s.has(t.id))continue;let n=m.get(t.id);if(n){n.cssStyles=t.styles,n.cssCompiledStyles=o(t.classes),n.cssClasses=t.classes.join(` `);continue}let i=V(t.type),a={id:t.id,label:t.text,labelType:t.labelType,parentId:f.get(t.id),cssStyles:t.styles,cssCompiledStyles:o([`default`,`node`,...t.classes]),cssClasses:`default `+t.classes.join(` `),dir:t.dir,link:t.link,linkTarget:t.linkTarget,tooltip:e.tooltips.get(t.id),metadata:t.metadata,isGroup:!1,shape:i===`square`||i===void 0?`squareRect`:i};r.push(a),m.set(t.id,a)}e.edges.forEach((t,r)=>{let a=u.get(t.start)??t.start,s=u.get(t.end)??t.end;if(a===s&&t.start!==t.end)return;let c=[...e.defaultEdgeStyle??[]];t.style&&c.push(...t.style);let l=t.type===`arrow_open`?`none`:t.type===`arrow_cross`||t.type===`arrow_point`?t.type:`arrow_point`;i.push({id:t.id||`L_${a}_${s}_${r}`,isUserDefinedId:t.isUserDefinedId,start:a,end:s,type:t.type??`normal`,label:t.text,labelType:t.labelType,thickness:t.stroke,pattern:t.stroke,minlen:t.length,classes:`edge-thickness-normal edge-pattern-solid flowchart-link`,arrowTypeStart:`none`,arrowTypeEnd:l,cssCompiledStyles:o(t.classes),style:c,animate:t.animate,animation:t.animation,curve:t.interpolate||e.defaultInterpolate||n,metadata:t.metadata})}),ae(r,e);let h=new Map;for(let e of a){let t=f.get(e.id);if(t===void 0)continue;let n=h.get(t);n?n.push(e.id):h.set(t,[e.id])}let g=new Map;for(let e of a){if(f.get(e.id)!==void 0)continue;let t=[e.id];for(;t.length>0;){let e=t.pop();if(g.has(e))continue;g.set(e,g.size);let n=h.get(e);if(n)for(let e=n.length-1;e>=0;e--)t.push(n[e])}}return He(r,t=>{if(e.connectors.has(t))return`connector`;let n=e.nodes.get(t);return n?e.vertexKind(n):void 0},g,t),{nodes:r,edges:i}}var We=8,Ge=40,Ke=16,qe=48,$=20,Je=26,Ye=14,Xe=`collapsed`,Ze={TB:2,RL:3,BT:0,LR:1},Qe=new WeakMap;function $e(e,t){let n=Qe.get(e);if(n===void 0){let r=t.flowchart?.curve;n=Ue(e,We,typeof r==`string`?r:void 0),Qe.set(e,n)}return n}function et(e,t,n){let r=e.agentflow?.[t];return typeof r==`number`&&r>0?Math.min(r,2e3):n}var tt=/[";]fill:/;function nt(e,n,r){let i=t(e);return` fill="${i}"${tt.test(r.shape)?``:` fill-opacity="${n}"`} stroke="${i}"`}function rt(e,t,n){return h(e.direction)?g(n,r=>it(e,t,n,r)):it(e,t,n,!1)}function it(h,g,D,ee){let j=$e(h,g),M=D.fontSize??16,N=Math.round(M*.875),P=D.measurer??ne(D.fontFamily),F=et(g,`wrappingWidth`,120),I=et(g,`minNodeWidth`,120),L=D.padding??8,R=D.icons,z=new Map,B=[],V=[];j.nodes.forEach((e,t)=>z.set(e.id,t));for(let e of j.nodes){let t=e.cssStyles.length>0?e.cssCompiledStyles.concat(e.cssStyles):e.cssCompiledStyles,n=i(t),r=+!!n.bold|(n.italic?2:0),a=e.labelType===`markdown`,o=n.fontSize??M,c,l;if(e.isGroup){let t=s(e.label,a,P,o,4e3,r);c={node:e,style:n,label:t,shape:`group`,w:0,h:0,dy:0,loops:0},l=S(0,0),l.isGroup=!0,l.dir=e.dir?x(e.dir):void 0,l.padX=$,l.padTop=t.height>0?t.height+16:$,l.padBottom=$,l.minW=t.width+2*$-12}else if(e.shape===`collapsedGroup`){let t=s(e.label,a,P,o,F,r),i=Math.max(t.width,I)+36,u=t.height+24+Ye;c={node:e,style:n,label:t,shape:Xe,w:i,h:u,dy:-Ye/2,loops:0},l=S(i,u)}else{let t=A(e.shape),i=s(e.label,a,P,o,F,r),u=O(t,t===`diam`?i.width:Math.max(i.width,I),i.height);c={node:e,style:n,label:i,shape:t,w:u.w,h:u.h,dy:u.dy,loops:0},l=S(u.w,u.h)}l.seq=B.length,B.push(c),V.push(l)}j.nodes.forEach((e,t)=>{V[t].parent=e.parentId===void 0?-1:z.get(e.parentId)??-1});let ie=ee?`TB`:x(h.direction),ae=e=>{let t;for(let n=V[e].parent,r=0;n>=0&&t===void 0&&r<1e4;n=V[n].parent,r++)t=V[n].dir;return t??ie},oe=e=>{let t=ae(e);return t===`LR`||t===`RL`},H=new Int32Array(V.length).fill(-1);for(let e=0;e<V.length;e++){let t=[],n=e;for(;n>=0&&H[n]<0&&t.length<=V.length;)t.push(n),n=V[n].parent;let r=n>=0?H[n]+1:0;for(let e=t.length-1;e>=0;e--)H[t[e]]=r++}let se=(e,t)=>{let n=t;for(let r=H[t];r>H[e];r--)n=V[n].parent;return n===e&&t!==e},U=[],ce=[],W=[],G=[];for(let e of j.edges){let t=z.get(e.start),n=z.get(e.end);if(t===void 0||n===void 0)continue;let r=s(e.label,e.labelType===`markdown`,P,N,F);se(t,n)||se(n,t)?G.push({edge:e,label:r,src:t,dst:n}):(t===n&&(B[t].loops++,oe(t)?V[t].h+=2*(Je+(r.height>0?r.height+8:0)):V[t].w+=2*(Je+(r.width>0?r.width+12:0))),W.push(e),ce.push(r),U.push({src:t,dst:n,minlen:e.minlen??1,labelW:r.width>0?r.width+12:0,labelH:r.height>0?r.height+4:0,route:[],labelX:0,labelY:0}))}let K=y(V,U,ie,{nodeSep:et(g,`nodeSpacing`,Ge),edgeSep:Ke,rankSep:et(g,`rankSpacing`,qe),portSep:20}),q=s(h.title,!1,P,M,4e3,1),le=q.height>0?q.height+12:0,ue=Math.max(K.width,q.width),de=L+(ue-K.width)/2,fe=L+le;b(V,U,de,fe);let J=Math.ceil(ue+2*L),pe=Math.ceil(K.height+le+2*L),Y=[],me=[],he=[],ge=[],_e=G.length*V.length<2e6;for(let{edge:e,src:t,dst:n}of G){let r=se(n,t),i=r?n:t,a=r?t:n,o=V[i],s=V[a],c=Ze[o.dir??ae(i)],l=r?c:c+2&3,d=e=>{let t=!(e&1),n=e===0||e===3?-1:1,i=t?s.x:s.x+n*s.w/2,a=t?s.y+n*s.h/2:s.y,c=t?s.x:o.x+n*o.w/2,l=t?o.y+n*o.h/2:s.y,u=+!t;return r?[i,a,u,c,l,u]:[c,l,u,i,a,u]},p=e=>{for(let t=0;t<V.length;t++){let n=V[t];if(t!==a&&!n.isGroup&&n.x+n.w/2>Math.min(e[0],e[3])-1&&n.x-n.w/2<Math.max(e[0],e[3])+1&&n.y+n.h/2>Math.min(e[1],e[4])-1&&n.y-n.h/2<Math.max(e[1],e[4])+1)return!0}return!1},m=d(l);if(_e&&p(m))for(let e of[l+1&3,l+3&3,l+2&3]){let t=d(e);if(!p(t)){m=t;break}}ge.push(m),he.push((m[0]+m[3])/2,(m[1]+m[4])/2);let h=m.slice();k(h,r?0:3,B[a],s),me.push(f(h,`linear`,0,u(e.arrowTypeEnd)))}let ve=new Map,ye=!1;for(let e of V)e.isGroup&&(ye=!0);if(ye){for(let e of U)v(ve,e.route);for(let e of ge)v(ve,e)}let be=``,xe=``;for(let r=0;r<B.length;r++){let i=B[r],s=V[r],u=i.node,d=s.x,f=s.y,p=e(u.cssClasses.replace(/^default\s?/,``)),m=o(u.id);if(s.isGroup){let e=_(s,i.label.width,ve,$);be+=`<g class="pele-cluster pele-flow${p}" data-id="${m}"><rect x="${n(d-s.w/2)}" y="${n(f-s.h/2)}" width="${n(s.w)}" height="${n(s.h)}"${a(nt(u.colorIndex??Q.size,`0.06`,i.style)+i.style.shape)}/>`+c(i.label,e,f-s.h/2+8+i.label.height/2,` class="pele-cluster-label" fill="var(--_m)"${i.style.text}`,R)+`</g>`;continue}let h=i.w,g=i.h,v=``,y;if(i.shape===Xe){let e=t(u.colorIndex??Q.size),r=g/2-Ye-2,o=r+(Ye+2)/2;y=`<rect x="${n(-h/2)}" y="${n(-g/2)}" width="${n(h)}" height="${n(g)}"${a(nt(u.colorIndex??Q.size,`0.06`,i.style)+i.style.shape)}/><path d="M${n(-h/2+10)},${n(r)}H${n(h/2-10)}" fill="none" stroke="${e}" stroke-dasharray="3 3"${i.style.line}/><path class="pele-collapsed-mark" d="${at(-9,o)}${at(0,o)}${at(9,o)}" fill="${e}" stroke="none"/>`}else{let e=Q.get(u.kind??`task`)??1;v=` pele-kind-${u.kind??`task`}`,y=te(i.shape,h,g,nt(e,`0.14`,i.style)+i.style.shape,` stroke="${t(e)}"`+i.style.line)}let b=c(i.label,0,i.dy,` class="pele-label"${i.style.text}`,R);if(/ internal-link(?: |$)/.test(p+` `)&&u.label&&D.links!==!1){let e=re(u.label),t=w(E(e),D)!==void 0,n=l(e);b=`<a class="internal-link"${t?` href="${n}"${T(D)}`:``} data-href="${n}">${b}</a>`,Y.push({id:u.id,href:e,internal:!0})}let x=y+b;u.tooltip&&(x=`<title>${o(u.tooltip)}</title>`+x),u.link&&(x=C(x,u.link,u.id,Y,D,u.linkTarget?` target="${l(u.linkTarget)}"`:``)),xe+=`<g class="pele-node pele-shape-${i.shape}${v}${p}" data-id="${m}" transform="translate(${n(d)},${n(f)})">${x}</g>`}let Se=``,Ce=``,we=(t,n,r,a,s)=>{let c=t.style.length>0||t.cssCompiledStyles.length>0?i(t.cssCompiledStyles.concat(t.style)):void 0,u=t.arrowTypeEnd,f=c?.stroke?l(c.stroke):`var(--_l)`,m=t.thickness===`dotted`?`reference`:u===`arrow_cross`?`failure`:`sequence`,h=e(t.classes.replace(/edge-thickness-normal|edge-pattern-solid|flowchart-link/g,``));Se+=`<g class="pele-edge pele-edge-${m}${h}" data-id="${o(t.id)}"${c?.line??``}><path d="${r.d}"${t.thickness===`dotted`?` stroke-dasharray="3 4"`:``}/>`+p(u,r.ex,r.ey,r.edx,r.edy,f)+`</g>`,n.width>0&&(Ce+=d(t.id,n,a,s,c?.text??``,R))},X=new Map;for(let e=0;e<U.length;e++){let t=U[e],n=W[e],r=ce[e],i=n.arrowTypeEnd,a;if(t.src===t.dst){let e=B[t.src],n=X.get(t.src)??0;X.set(t.src,n+1),a=m(V[t.src],e.w,e.h,n,oe(t.src),Je,u(i),t)}else{let e=t.route.slice();k(e,0,B[t.src],V[t.src]),k(e,e.length-3,B[t.dst],V[t.dst]),a=f(e,n.curve,0,u(i))}we(n,r,a,t.labelX,t.labelY)}return G.forEach((e,t)=>we(e.edge,e.label,me[t],he[2*t],he[2*t+1])),{svg:r(`agentflow`,J,pe,M,D,h,c(q,J/2,L+q.height/2,` class="pele-title" font-weight="var(--_tw)"`)+(be?`<g class="pele-clusters">${be}</g>`:``)+(Se?`<g class="pele-edges" fill="none" stroke="var(--_l)" stroke-linecap="round">${Se}</g>`:``)+(Ce?`<g class="pele-edge-labels" font-size="${N}">${Ce}</g>`:``)+`<g class="pele-nodes">${xe}</g>`),width:J,height:pe,links:Y}}function at(e,t){return`M${n(e-1.75)},${n(t)}a1.75,1.75 0 1 0 3.5,0a1.75,1.75 0 1 0 -3.5,0Z`}var ot={type:`agentflow`,keepComments:!0,parse(e,t,n,r,i){let a=new pe({inheritDir:(t.flowchart??{}).inheritDir===!0,direction:typeof t.direction==`string`?t.direction:void 0,lineOffset:r,maxEdges:i.maxEdges});return n&&(a.title=n),Ie(e,a),$e(a,t),a},render:rt};export{ot as agentflow};
|
|
13
|
-
//# sourceMappingURL=RHNBAITX-
|
|
13
|
+
//# sourceMappingURL=RHNBAITX-D5lTu0BB.js.map
|
package/dist/client/assets/{ReadOnlySourcePreview-C8hhN481.js → ReadOnlySourcePreview-LxG8Br9J.js}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e,r as t,t as n}from"./react-BUfh6y28.js";import{n as r,t as i}from"./jsx-runtime-DJeoFXNw.js";import{K as a,s as o}from"./useSettings-
|
|
2
|
-
//# sourceMappingURL=ReadOnlySourcePreview-
|
|
1
|
+
import{a as e,r as t,t as n}from"./react-BUfh6y28.js";import{n as r,t as i}from"./jsx-runtime-DJeoFXNw.js";import{K as a,s as o}from"./useSettings-Dp9RSL-0.js";import{ft as s,l as c}from"./diffRendering-Cb9qJUqp.js";import{I as l,U as u,c as d,d as f,i as p,n as m,r as h,t as g,u as _}from"./Virtualizer-NI9bqlwX.js";import{Q as v}from"./getDiffFileInput-B7pCnCeh.js";import{a as y,i as b,r as x,t as S}from"./DiffWorkerPoolProvider-CmorWW2H.js";import{O as C}from"./ThreadDetailsItemsMenu-Cgj2yuzU.js";import{No as w}from"./main-BYwnnJ9E.js";var T=e(n(),1),E=typeof window>`u`?T.useEffect:T.useLayoutEffect;function D({file:e,options:t,editorOptions:n,editStateKey:r,lineAnnotations:i,selectedLines:a,prerenderedHTML:o,metrics:s,hasGutterRenderUtility:c,hasCustomHeader:l,disableWorkerPool:d,edit:h,onEditChange:g,onEditComplete:x}){let S=m(),C=a!==void 0,w=(0,T.useContext)(p),D=_(),j=f(e=>g?.(e)),M=g==null?void 0:j,N=(0,T.useRef)(null),P=f(e=>{let t=x?.(e)??`reject`;return t===`accept`&&(N.current={file:{installed:e.file,stale:e.originalFile},annotations:{installed:e.lineAnnotations,stale:e.originalLineAnnotations}}),t}),F=x==null?void 0:P,I=(0,T.useRef)(null),L=(0,T.useRef)(null),R=f(()=>{if(D==null)throw Error(`File: EditContext is not attached`);return D(`file`,n??{},r)}),z=f(n=>{if(n!=null){if(I.current!=null)throw Error(`File: An instance should not already exist when a node is created`);S==null?I.current=new y(k({controlledSelection:C,hasCustomHeader:l,hasGutterRenderUtility:c,onEditChange:M,onEditComplete:F,options:t}),d?void 0:w,!0):I.current=new b(k({controlledSelection:C,hasCustomHeader:l,hasGutterRenderUtility:c,onEditChange:M,onEditComplete:F,options:t}),S,s,d?void 0:w,!0),h&&L.current==null&&(L.current=A(I.current,R)),I.current.hydrate({file:e,fileContainer:n,lineAnnotations:i,prerenderedHTML:o})}else{if(I.current==null)throw Error(`File: A File instance should exist when unmounting`);I.current.cleanUp(),I.current=null,L.current=null}});return E(()=>{let{current:n}=I;if(n==null)return;let r=k({controlledSelection:C,hasCustomHeader:l,hasGutterRenderUtility:c,onEditChange:M,onEditComplete:F,options:t}),o=r!==void 0&&!u(n.options,r);if(n.setOptions(r),!h&&L.current!=null){let{current:e}=L;L.current=null,e()}let s=O(e,i,N);n.render({file:s.file,lineAnnotations:s.lineAnnotations,forceRender:o}),a!==void 0&&n.setSelectedLines(a),h&&L.current==null&&(L.current=A(n,R))}),{ref:z,getHoveredLine:(0,T.useCallback)(()=>I.current?.getHoveredLine(),[]),getAnnotationSlotName:(0,T.useCallback)(e=>I.current?.getAnnotationSlotName(e)??v(e),[])}}function O(e,t,n){let{current:r}=n;if(r==null)return{file:e,lineAnnotations:t};let{file:i,annotations:a}=r,o=e;i!=null&&(l(e,i.stale)?o=i.installed:r.file=null);let s=t;return a!=null&&(t===a.stale?s=a.installed:r.annotations=null),r.file==null&&r.annotations==null&&(n.current=null),{file:o,lineAnnotations:s}}function k({options:e,controlledSelection:t,hasCustomHeader:n,hasGutterRenderUtility:r,onEditChange:i,onEditComplete:a}){return t||r||n||i!=null||a!=null?{...e,controlledSelection:t,renderCustomHeader:n?d:e?.renderCustomHeader,renderGutterUtility:r?d:e?.renderGutterUtility,onEditChange:i,onEditComplete:a}:e}function A(e,t){let n=t();try{return n.edit(e)}catch(e){throw n.cleanUp(),e}}var j=e(i(),1);function M({file:e,lineAnnotations:t,selectedLines:n,options:r,editorOptions:i,editStateKey:a,metrics:o,className:c,style:l,renderAnnotation:u,renderCustomHeader:d,renderHeaderPrefix:f,renderHeaderFilenameSuffix:p,renderHeaderMetadata:m,prerenderedHTML:g,renderGutterUtility:_,disableWorkerPool:v=!1,edit:y=!1,onEditChange:b,onEditComplete:S}){let{ref:C,getHoveredLine:w,getAnnotationSlotName:T}=D({file:e,options:r,editorOptions:i,editStateKey:a,metrics:o,lineAnnotations:t,selectedLines:n,prerenderedHTML:g,hasGutterRenderUtility:_!=null,hasCustomHeader:d!=null,disableWorkerPool:v,edit:y,onEditChange:b,onEditComplete:S}),E=x({file:e,renderAnnotation:u,renderCustomHeader:d,renderHeaderPrefix:f,renderHeaderFilenameSuffix:p,renderHeaderMetadata:m,renderGutterUtility:_,lineAnnotations:t,getHoveredLine:w,getAnnotationSlotName:T});return(0,j.jsx)(s,{ref:C,className:c,style:l,children:h(E,g)})}var N=t({default:()=>F}),P=r();function F(e){let t=(0,P.c)(22),{resolvedTheme:n}=a(),r=o(I),i=e.wordWrap??r,s=`${e.name}:${n}:${e.text.length}`,l;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(l={overscrollSize:600,intersectionObserverMargin:1200},t[0]=l):l=t[0];let u;t[1]===e.cacheKey?u=t[2]:(u=e.cacheKey?{cacheKey:e.cacheKey}:{},t[1]=e.cacheKey,t[2]=u);let d;t[3]!==e.name||t[4]!==e.text||t[5]!==u?(d={name:e.name,contents:e.text,...u},t[3]=e.name,t[4]=e.text,t[5]=u,t[6]=d):d=t[6];let f=i?`wrap`:`scroll`,p;t[7]===n?p=t[8]:(p=c(n),t[7]=n,t[8]=p);let m;t[9]===e.onPostRender?m=t[10]:(m=e.onPostRender?{onPostRender:e.onPostRender}:{},t[9]=e.onPostRender,t[10]=m);let h;t[11]!==n||t[12]!==f||t[13]!==p||t[14]!==m?(h={disableFileHeader:!0,overflow:f,theme:p,preferredHighlighter:w,themeType:n,unsafeCSS:C,...m},t[11]=n,t[12]=f,t[13]=p,t[14]=m,t[15]=h):h=t[15];let _;t[16]!==d||t[17]!==h?(_=(0,j.jsx)(M,{file:d,options:h,className:`min-h-full`}),t[16]=d,t[17]=h,t[18]=_):_=t[18];let v;return t[19]!==s||t[20]!==_?(v=(0,j.jsx)(S,{children:(0,j.jsx)(g,{className:`file-preview-virtualizer min-h-0 flex-1 overflow-auto`,config:l,children:_},s)}),t[19]=s,t[20]=_,t[21]=v):v=t[21],v}function I(e){return e.wordWrap}export{N as n,M as r,F as t};
|
|
2
|
+
//# sourceMappingURL=ReadOnlySourcePreview-LxG8Br9J.js.map
|