@dylanpiercey/work 0.0.47 → 0.0.48
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/bin/work.mjs +77 -47
- package/dist/{_DM_oFS_v.js → _CO83dVER.js} +446 -34
- package/dist/_DjrRGy4k.js +2 -0
- package/dist/{_o0dwm0Ww.js → _Hz_qlZE1.js} +59 -59
- package/dist/{_Dm4BVuln.js → _m3ryV1w6.js} +23 -22
- package/dist/index.mjs +2027 -662
- package/dist/public/assets/{_9CHuxVRu.js → _1cz-l3Ka.js} +1 -1
- package/dist/public/assets/_1cz-l3Ka.js.br +0 -0
- package/dist/public/assets/{_By0S6RFm2.js → _1oYv4fmY2.js} +1 -1
- package/dist/public/assets/_1oYv4fmY2.js.br +0 -0
- package/dist/public/assets/{_CfyASWBT2.js → _3i592Qvz2.js} +1 -1
- package/dist/public/assets/_3i592Qvz2.js.br +0 -0
- package/dist/public/assets/{_6fdNa05X2.js → _8nx9Raqx2.js} +1 -1
- package/dist/public/assets/_8nx9Raqx2.js.br +0 -0
- package/dist/public/assets/{_DJYs9cGt2.js → _9yP8iK4t2.js} +1 -1
- package/dist/public/assets/_9yP8iK4t2.js.br +0 -0
- package/dist/public/assets/{_zkaPdW0C2.js → _B-MMW3nb2.js} +1 -1
- package/dist/public/assets/_B-MMW3nb2.js.br +0 -0
- package/dist/public/assets/{_D1Ecsx8-2.js → _B2fn4I8S2.js} +1 -1
- package/dist/public/assets/_B2fn4I8S2.js.br +0 -0
- package/dist/public/assets/{_CrvHv7e4.js → _B49r6O_E.js} +1 -1
- package/dist/public/assets/_B49r6O_E.js.br +0 -0
- package/dist/public/assets/{_FZ5aDFyS.js → _BBW7mJhZ.js} +1 -1
- package/dist/public/assets/_BBW7mJhZ.js.br +0 -0
- package/dist/public/assets/{_fkktwOR8.js → _BC2FBUbj.js} +1 -1
- package/dist/public/assets/_BC2FBUbj.js.br +0 -0
- package/dist/public/assets/{_2_8X99jw.js → _BFt-jSq-.js} +1 -1
- package/dist/public/assets/_BFt-jSq-.js.br +0 -0
- package/dist/public/assets/{_BmH7JUGb2.js → _BGyMoPGj2.js} +1 -1
- package/dist/public/assets/_BGyMoPGj2.js.br +0 -0
- package/dist/public/assets/{_B8PQyubX.js → _BLjOZLxk.js} +1 -1
- package/dist/public/assets/_BLjOZLxk.js.br +0 -0
- package/dist/public/assets/{_BPq9uIVf.js → _BPFJiBiE.js} +1 -1
- package/dist/public/assets/_BPFJiBiE.js.br +0 -0
- package/dist/public/assets/{_DFC22iAc.js → _BPLnh5S4.js} +1 -1
- package/dist/public/assets/_BPLnh5S4.js.br +0 -0
- package/dist/public/assets/{_CMIAElmF.js → _BRzL7uNP.js} +1 -1
- package/dist/public/assets/_BRzL7uNP.js.br +0 -0
- package/dist/public/assets/{_DZExUZ7A.js → _BV-nVD9L2.js} +1 -1
- package/dist/public/assets/_BV-nVD9L2.js.br +0 -0
- package/dist/public/assets/{_DbkqHev42.js → _BbMkV19p2.js} +1 -1
- package/dist/public/assets/_BbMkV19p2.js.br +0 -0
- package/dist/public/assets/{_QZ7jIJEp.js → _BbW3-3ve.js} +1 -1
- package/dist/public/assets/_BbW3-3ve.js.br +0 -0
- package/dist/public/assets/{_BRHBgjBP2.js → _BdbnwCKs2.js} +1 -1
- package/dist/public/assets/_BdbnwCKs2.js.br +0 -0
- package/dist/public/assets/_BeSgyXoy2.js +1 -0
- package/dist/public/assets/_BeSgyXoy2.js.br +0 -0
- package/dist/public/assets/{_CRF3psRH.js → _Bg9mkw0u.js} +1 -1
- package/dist/public/assets/_Bg9mkw0u.js.br +0 -0
- package/dist/public/assets/{_BHjsQD4C.js → _BhUM9ZCP.js} +1 -1
- package/dist/public/assets/_BhUM9ZCP.js.br +0 -0
- package/dist/public/assets/{_C9YvMapn.js → _Bhnzfac_.js} +1 -1
- package/dist/public/assets/_Bhnzfac_.js.br +0 -0
- package/dist/public/assets/{_BPiDffSK.js → _BiEWaww7.js} +1 -1
- package/dist/public/assets/_BiEWaww7.js.br +0 -0
- package/dist/public/assets/{_B3rIZBik.js → _Bm-lmvlM.js} +1 -1
- package/dist/public/assets/_Bm-lmvlM.js.br +0 -0
- package/dist/public/assets/{_Cu3f85ax2.js → _Bpdzs0h4.js} +1 -1
- package/dist/public/assets/_Bpdzs0h4.js.br +0 -0
- package/dist/public/assets/{_BzuTzxB9.js → _BqeAAcor.js} +1 -1
- package/dist/public/assets/_BqeAAcor.js.br +0 -0
- package/dist/public/assets/{_5pEZdV75.js → _Bvwr3uff.js} +1 -1
- package/dist/public/assets/_Bvwr3uff.js.br +0 -0
- package/dist/public/assets/{_CRpvVy-g.js → _ByiODT9w.js} +1 -1
- package/dist/public/assets/_ByiODT9w.js.br +0 -0
- package/dist/public/assets/{_nqBpAHq9.js → _C4NK2Cq5.js} +1 -1
- package/dist/public/assets/_C4NK2Cq5.js.br +0 -0
- package/dist/public/assets/{_B2pxLNBO.js → _CASsRCtt.js} +1 -1
- package/dist/public/assets/_CASsRCtt.js.br +0 -0
- package/dist/public/assets/{_DPW4NADy2.js → _CH4P29Yf2.js} +1 -1
- package/dist/public/assets/_CH4P29Yf2.js.br +0 -0
- package/dist/public/assets/{_COmscE442.js → _CHqTBuzz2.js} +1 -1
- package/dist/public/assets/_CHqTBuzz2.js.br +0 -0
- package/dist/public/assets/{_DvqRc7vA2.js → _CIeZtXbg2.js} +1 -1
- package/dist/public/assets/_CIeZtXbg2.js.br +0 -0
- package/dist/public/assets/{_DU0F-fSc.js → _CObQoJCq.js} +1 -1
- package/dist/public/assets/_CObQoJCq.js.br +0 -0
- package/dist/public/assets/{_BxuGlOMJ.js → _CQDBqJkT.js} +1 -1
- package/dist/public/assets/_CQDBqJkT.js.br +0 -0
- package/dist/public/assets/{_DZyW50O5.js → _CUqlR7rP.js} +1 -1
- package/dist/public/assets/_CUqlR7rP.js.br +0 -0
- package/dist/public/assets/{_BDIKDRj8.js → _CUwAZxRw.js} +1 -1
- package/dist/public/assets/_CUwAZxRw.js.br +0 -0
- package/dist/public/assets/{_DeCqhciO.js → _CbMNS899.js} +1 -1
- package/dist/public/assets/_CbMNS899.js.br +0 -0
- package/dist/public/assets/{_BIP7B1g62.js → _Ced5468N2.js} +1 -1
- package/dist/public/assets/{_Cawlufow.js → _Cf0wSsqE.js} +1 -1
- package/dist/public/assets/_Cf0wSsqE.js.br +0 -0
- package/dist/public/assets/{_BMWhe7UA2.js → _ClEKr0Tm2.js} +1 -1
- package/dist/public/assets/_ClEKr0Tm2.js.br +0 -0
- package/dist/public/assets/{_ChIGZgCK2.js → _CsNJf4g52.js} +1 -1
- package/dist/public/assets/_CsNJf4g52.js.br +0 -0
- package/dist/public/assets/{_Dj0FqIsq2.js → _CtErcdf92.js} +1 -1
- package/dist/public/assets/_CtErcdf92.js.br +0 -0
- package/dist/public/assets/{_Btx74Q-k.js → _DAfu0wMa.js} +1 -1
- package/dist/public/assets/_DAfu0wMa.js.br +0 -0
- package/dist/public/assets/{_DgucIXC9.js → _DBN8F3s1.js} +1 -1
- package/dist/public/assets/_DBN8F3s1.js.br +0 -0
- package/dist/public/assets/{_DPc97sYv2.js → _DBn74psf2.js} +1 -1
- package/dist/public/assets/{_lTcPBjyz2.js → _DFOnuGNp.js} +1 -1
- package/dist/public/assets/_DFOnuGNp.js.br +0 -0
- package/dist/public/assets/{_CYb-TtX12.js → _DHvVwuPu2.js} +1 -1
- package/dist/public/assets/_DHvVwuPu2.js.br +0 -0
- package/dist/public/assets/{_AG00U05V.js → _DKnLFVdw.js} +1 -1
- package/dist/public/assets/_DKnLFVdw.js.br +0 -0
- package/dist/public/assets/{_D5DIKC5J2.js → _DLFnXIrG2.js} +1 -1
- package/dist/public/assets/_DLFnXIrG2.js.br +0 -0
- package/dist/public/assets/{_Dvsdxjs1.js → _DLK0WouR.js} +1 -1
- package/dist/public/assets/_DLK0WouR.js.br +0 -0
- package/dist/public/assets/_DLLEkkcM.js +1531 -0
- package/dist/public/assets/_DLLEkkcM.js.br +0 -0
- package/dist/public/assets/{_ClduJgR5.js → _DOpT45mO.js} +1 -1
- package/dist/public/assets/_DOpT45mO.js.br +0 -0
- package/dist/public/assets/{_ByQc1pkS.js → _DT9Qs1il.js} +1 -1
- package/dist/public/assets/_DT9Qs1il.js.br +0 -0
- package/dist/public/assets/{_C3QGlxhv2.js → _DVPPxo4e2.js} +1 -1
- package/dist/public/assets/_DVPPxo4e2.js.br +0 -0
- package/dist/public/assets/{_CpxRirGf.js → _De7fhQUT.js} +1 -1
- package/dist/public/assets/_De7fhQUT.js.br +0 -0
- package/dist/public/assets/{_BmtVFK052.js → _DgmBuYFG2.js} +1 -1
- package/dist/public/assets/_DgmBuYFG2.js.br +0 -0
- package/dist/public/assets/{_BLvHtG5b.js → _DjLQQUoq.js} +1 -1
- package/dist/public/assets/_DjLQQUoq.js.br +0 -0
- package/dist/public/assets/{_CBF2sJFl.js → _Dn4wMX5v.js} +1 -1
- package/dist/public/assets/_Dn4wMX5v.js.br +0 -0
- package/dist/public/assets/{_tKPNE6U52.js → _DsJkMBKU2.js} +1 -1
- package/dist/public/assets/_DsJkMBKU2.js.br +0 -0
- package/dist/public/assets/{_CYLr_2iE.js → _Ez06j6Qv.js} +1 -1
- package/dist/public/assets/_Ez06j6Qv.js.br +0 -0
- package/dist/public/assets/{_CyDJr5hJ.js → _FCV34uHN.js} +1 -1
- package/dist/public/assets/_FCV34uHN.js.br +0 -0
- package/dist/public/assets/{_BgDRYHYE.js → _I6H6F0ME.js} +1 -1
- package/dist/public/assets/_I6H6F0ME.js.br +0 -0
- package/dist/public/assets/{_ji5qc8J4.js → _K6PNL3j4.js} +1 -1
- package/dist/public/assets/_K6PNL3j4.js.br +0 -0
- package/dist/public/assets/{_CCXyJU0G.js → _KVpYyL9A.js} +1 -1
- package/dist/public/assets/_KVpYyL9A.js.br +0 -0
- package/dist/public/assets/{_BEEHMSv_.js → _KjztUkjx.js} +1 -1
- package/dist/public/assets/_KjztUkjx.js.br +0 -0
- package/dist/public/assets/{_BGFm3dJ4.js → _Q6y5EfU1.js} +1 -1
- package/dist/public/assets/_Q6y5EfU1.js.br +0 -0
- package/dist/public/assets/{_C7kYFLNM.js → _cRLLpjIg.js} +1 -1
- package/dist/public/assets/_cRLLpjIg.js.br +0 -0
- package/dist/public/assets/{_CXsVxa93.js → _h8qSl3Me.js} +1 -1
- package/dist/public/assets/{_BxlHpe2T.js → _kv39JOeM.js} +1 -1
- package/dist/public/assets/_kv39JOeM.js.br +0 -0
- package/dist/public/assets/{_DTXvrAdN.js → _o1of2_lP.js} +1 -1
- package/dist/public/assets/_o1of2_lP.js.br +0 -0
- package/dist/public/assets/{_T_hWiFRO.js → _qoSWRJiT.js} +1 -1
- package/dist/public/assets/_qoSWRJiT.js.br +0 -0
- package/dist/public/assets/{_BZe4BZ4G.js → _yQJK428k.js} +1 -1
- package/dist/public/assets/_yQJK428k.js.br +0 -0
- package/dist/public/assets/diff-view-CQX-Ovnt.css +1 -0
- package/dist/public/assets/diff-view-CQX-Ovnt.css.br +0 -0
- package/dist/public/assets/index-DR0Bvd6u.css +1 -0
- package/dist/public/assets/index-DR0Bvd6u.css.br +0 -0
- package/dist/public/assets/index-fCEONff1.js +85 -0
- package/dist/public/assets/index-fCEONff1.js.br +0 -0
- package/lib/setup/catalog.d.mts +22 -0
- package/lib/setup/catalog.mjs +72 -0
- package/lib/setup/doctor.d.mts +49 -0
- package/lib/setup/doctor.mjs +203 -0
- package/lib/setup/install.d.mts +14 -0
- package/lib/setup/install.mjs +135 -0
- package/package.json +2 -1
- package/dist/_CV5G1-Sr.js +0 -2
- package/dist/public/assets/_2_8X99jw.js.br +0 -0
- package/dist/public/assets/_5pEZdV75.js.br +0 -0
- package/dist/public/assets/_6fdNa05X2.js.br +0 -0
- package/dist/public/assets/_9CHuxVRu.js.br +0 -0
- package/dist/public/assets/_AG00U05V.js.br +0 -0
- package/dist/public/assets/_B2pxLNBO.js.br +0 -0
- package/dist/public/assets/_B3rIZBik.js.br +0 -0
- package/dist/public/assets/_B8PQyubX.js.br +0 -0
- package/dist/public/assets/_BDIKDRj8.js.br +0 -0
- package/dist/public/assets/_BEEHMSv_.js.br +0 -0
- package/dist/public/assets/_BGFm3dJ4.js.br +0 -0
- package/dist/public/assets/_BHjsQD4C.js.br +0 -0
- package/dist/public/assets/_BLibugcj.js +0 -1531
- package/dist/public/assets/_BLibugcj.js.br +0 -0
- package/dist/public/assets/_BLvHtG5b.js.br +0 -0
- package/dist/public/assets/_BMWhe7UA2.js.br +0 -0
- package/dist/public/assets/_BPiDffSK.js.br +0 -0
- package/dist/public/assets/_BPq9uIVf.js.br +0 -0
- package/dist/public/assets/_BRHBgjBP2.js.br +0 -0
- package/dist/public/assets/_BZe4BZ4G.js.br +0 -0
- package/dist/public/assets/_BgDRYHYE.js.br +0 -0
- package/dist/public/assets/_BmH7JUGb2.js.br +0 -0
- package/dist/public/assets/_BmtVFK052.js.br +0 -0
- package/dist/public/assets/_Btx74Q-k.js.br +0 -0
- package/dist/public/assets/_BxlHpe2T.js.br +0 -0
- package/dist/public/assets/_BxuGlOMJ.js.br +0 -0
- package/dist/public/assets/_By0S6RFm2.js.br +0 -0
- package/dist/public/assets/_ByQc1pkS.js.br +0 -0
- package/dist/public/assets/_BzuTzxB9.js.br +0 -0
- package/dist/public/assets/_C3QGlxhv2.js.br +0 -0
- package/dist/public/assets/_C7kYFLNM.js.br +0 -0
- package/dist/public/assets/_C9YvMapn.js.br +0 -0
- package/dist/public/assets/_CBF2sJFl.js.br +0 -0
- package/dist/public/assets/_CCXyJU0G.js.br +0 -0
- package/dist/public/assets/_CMIAElmF.js.br +0 -0
- package/dist/public/assets/_COmscE442.js.br +0 -0
- package/dist/public/assets/_CRF3psRH.js.br +0 -0
- package/dist/public/assets/_CRpvVy-g.js.br +0 -0
- package/dist/public/assets/_CYLr_2iE.js.br +0 -0
- package/dist/public/assets/_CYb-TtX12.js.br +0 -0
- package/dist/public/assets/_Cawlufow.js.br +0 -0
- package/dist/public/assets/_CfyASWBT2.js.br +0 -0
- package/dist/public/assets/_ChIGZgCK2.js.br +0 -0
- package/dist/public/assets/_ClduJgR5.js.br +0 -0
- package/dist/public/assets/_Cp2bkjzT2.js +0 -1
- package/dist/public/assets/_Cp2bkjzT2.js.br +0 -0
- package/dist/public/assets/_CpxRirGf.js.br +0 -0
- package/dist/public/assets/_CrvHv7e4.js.br +0 -0
- package/dist/public/assets/_Cu3f85ax2.js.br +0 -0
- package/dist/public/assets/_CyDJr5hJ.js.br +0 -0
- package/dist/public/assets/_D1Ecsx8-2.js.br +0 -0
- package/dist/public/assets/_D2tmOnaH.js +0 -1
- package/dist/public/assets/_D2tmOnaH.js.br +0 -0
- package/dist/public/assets/_D5DIKC5J2.js.br +0 -0
- package/dist/public/assets/_DFC22iAc.js.br +0 -0
- package/dist/public/assets/_DJYs9cGt2.js.br +0 -0
- package/dist/public/assets/_DPW4NADy2.js.br +0 -0
- package/dist/public/assets/_DTXvrAdN.js.br +0 -0
- package/dist/public/assets/_DU0F-fSc.js.br +0 -0
- package/dist/public/assets/_DZExUZ7A.js.br +0 -0
- package/dist/public/assets/_DZyW50O5.js.br +0 -0
- package/dist/public/assets/_DbkqHev42.js.br +0 -0
- package/dist/public/assets/_DeCqhciO.js.br +0 -0
- package/dist/public/assets/_DgucIXC9.js.br +0 -0
- package/dist/public/assets/_Dj0FqIsq2.js.br +0 -0
- package/dist/public/assets/_DvqRc7vA2.js.br +0 -0
- package/dist/public/assets/_Dvsdxjs1.js.br +0 -0
- package/dist/public/assets/_FZ5aDFyS.js.br +0 -0
- package/dist/public/assets/_QZ7jIJEp.js.br +0 -0
- package/dist/public/assets/_T_hWiFRO.js.br +0 -0
- package/dist/public/assets/_fkktwOR8.js.br +0 -0
- package/dist/public/assets/_ji5qc8J4.js.br +0 -0
- package/dist/public/assets/_lTcPBjyz2.js.br +0 -0
- package/dist/public/assets/_nqBpAHq9.js.br +0 -0
- package/dist/public/assets/_tKPNE6U52.js.br +0 -0
- package/dist/public/assets/_zkaPdW0C2.js.br +0 -0
- package/dist/public/assets/diff-view-AJeZtePd.css +0 -1
- package/dist/public/assets/diff-view-AJeZtePd.css.br +0 -0
- package/dist/public/assets/index-BG3uLJV6.js +0 -85
- package/dist/public/assets/index-BG3uLJV6.js.br +0 -0
- package/dist/public/assets/index-_5MkiydM.css +0 -1
- package/dist/public/assets/index-_5MkiydM.css.br +0 -0
- package/dist/public/assets/preload-helper-C1JvlFma.css +0 -1
- package/dist/public/assets/preload-helper-C1JvlFma.css.br +0 -0
- /package/dist/public/assets/{_B5W6OYN72.js → _B5W6OYN7.js} +0 -0
- /package/dist/public/assets/{_B5W6OYN72.js.br → _B5W6OYN7.js.br} +0 -0
- /package/dist/public/assets/{_DMoTqEGO2.js → _DMoTqEGO.js} +0 -0
- /package/dist/public/assets/{_DMoTqEGO2.js.br → _DMoTqEGO.js.br} +0 -0
- /package/dist/public/assets/{_DmIc4jLQ2.js → _DmIc4jLQ.js} +0 -0
- /package/dist/public/assets/{_DmIc4jLQ2.js.br → _DmIc4jLQ.js.br} +0 -0
- /package/dist/public/assets/{_DsUTQ-LC.js → _DsUTQ-LC2.js} +0 -0
- /package/dist/public/assets/{_DsUTQ-LC.js.br → _DsUTQ-LC2.js.br} +0 -0
- /package/dist/public/assets/{_VbXTXTou.js → _VbXTXTou2.js} +0 -0
- /package/dist/public/assets/{_VbXTXTou.js.br → _VbXTXTou2.js.br} +0 -0
- /package/dist/public/assets/{_iXnhIJG7.js → _iXnhIJG72.js} +0 -0
- /package/dist/public/assets/{_iXnhIJG7.js.br → _iXnhIJG72.js.br} +0 -0
- /package/dist/public/assets/{_vGVdxbeo.js → _vGVdxbeo2.js} +0 -0
- /package/dist/public/assets/{_vGVdxbeo.js.br → _vGVdxbeo2.js.br} +0 -0
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as __toCommonJS, i as __require, n as __esmMin, o as __toESM, r as __exportAll, t as __commonJSMin } from "./_BMI-E3GI.js";
|
|
2
|
-
import { A as allPrefs, B as
|
|
3
|
-
import { $ as
|
|
2
|
+
import { $ as all, A as allPrefs, B as which, C as setScrapedPhase, D as pushPublicKey, E as deleteSubscription, F as setPref, G as gh, H as agentById, I as setSetting, J as tmux, K as git, L as doctor, M as enabledAgents, N as preferredAgent, O as saveSubscription, P as setDisabledAgents, Q as subscriberJoins, R as miseVersions, S as setAgentPhase, T as summaryFromHookPayload, U as toolById, V as TOOLS, W as TMUX_SOCKET, X as subscribe, Y as publish, Z as subscriberCount, _ as tmuxName, a as ensureTmuxServer, b as clearAgentPhase, c as killWorkspaceSessions, d as newSessionArgs, et as db, g as sessionStates, h as sendToSession, i as disposeSessions, j as disabledAgents, k as agentChoices, l as listSessions, m as renameSession, n as clearTmuxStarted, nt as workspacePath, o as getSession, p as panePids, q as run, r as createSession, rt as config, s as killSession, t as cleanEnv, tt as get, u as markTmuxStarted, v as tmuxWasStarted, w as setSessionViewers, x as reasonFromHookPayload, y as reportsWorking, z as setupPath } from "./_CO83dVER.js";
|
|
3
|
+
import { $ as _set_serialize_reason, A as _dynamic_tag, B as _html, C as _attr_select_value, D as _await, E as _attrs_partial, F as _existing_scope, G as _resume_branch, H as _if, I as _flush_head, J as _scope_with_id, K as _scope_id, L as _for_of, M as _el_read_error, N as _el_resume, O as _content, P as _escape, Q as _serialize_if, R as _hoist, S as _attr_option_value, T as _attrs, U as _peek_scope_id, V as _id, W as _resume, X as _sep, Y as _script, Z as _serialize_guard, _ as $global, at as _trailers, c as sideNavOpen, ct as attrTag, d as rankRepos, et as _show_end, f as icon_refresh_default, g as phase, h as btnSm, i as icon_sidebar_default, it as _to_text, k as _content_resume, l as workspaceTab, lt as withPageAssets, m as toast_default, n as findIconBtn, nt as _subscribe, ot as _try, p as icon_base_default, q as _scope_reason, r as findInput, rt as _template, s as setWorkspaceTab, st as _var, tt as _show_start, ut as writeScope, v as _attr, w as _attr_style, x as _attr_input_value, y as _attr_class, z as _hoist_read_error } from "./_m3ryV1w6.js";
|
|
4
4
|
import fs from "node:fs";
|
|
5
5
|
import { createServer } from "node:http";
|
|
6
6
|
import path from "node:path";
|
|
@@ -2341,22 +2341,22 @@ var isDir = (file) => fsp.stat(file).then((s) => s.isDirectory(), () => false);
|
|
|
2341
2341
|
//#endregion
|
|
2342
2342
|
//#region src/server/status.ts
|
|
2343
2343
|
var TTL_MS$2 = 2e3;
|
|
2344
|
-
var snapshot = null;
|
|
2344
|
+
var snapshot$1 = null;
|
|
2345
2345
|
var inflight = null;
|
|
2346
2346
|
var snapshotGen = 0;
|
|
2347
2347
|
/** Drop the cached snapshot AND detach any in-flight compute — callers
|
|
2348
2348
|
* after an invalidation get a computation that starts from fresh state. */
|
|
2349
2349
|
function invalidateSnapshot() {
|
|
2350
|
-
snapshot = null;
|
|
2350
|
+
snapshot$1 = null;
|
|
2351
2351
|
snapshotGen++;
|
|
2352
2352
|
inflight = null;
|
|
2353
2353
|
}
|
|
2354
2354
|
function statusForAll() {
|
|
2355
|
-
if (snapshot && Date.now() - snapshot.at < TTL_MS$2) return Promise.resolve(snapshot.value);
|
|
2355
|
+
if (snapshot$1 && Date.now() - snapshot$1.at < TTL_MS$2) return Promise.resolve(snapshot$1.value);
|
|
2356
2356
|
if (!inflight) {
|
|
2357
2357
|
const gen = snapshotGen;
|
|
2358
2358
|
const run = computeStatus().then((value) => {
|
|
2359
|
-
if (gen === snapshotGen) snapshot = {
|
|
2359
|
+
if (gen === snapshotGen) snapshot$1 = {
|
|
2360
2360
|
at: Date.now(),
|
|
2361
2361
|
value
|
|
2362
2362
|
};
|
|
@@ -2497,12 +2497,12 @@ function sessionCounts(workspaceId, states) {
|
|
|
2497
2497
|
* Page data for `/`. Pass promises (don't await) so the document shell can
|
|
2498
2498
|
* stream while status computes; the template unwraps with `<await>`.
|
|
2499
2499
|
*/
|
|
2500
|
-
var GET$
|
|
2500
|
+
var GET$18 = Run.GET((_ctx, next) => {
|
|
2501
2501
|
return next({
|
|
2502
2502
|
workspaces: listWorkspaces(),
|
|
2503
2503
|
settings: {
|
|
2504
2504
|
preferredAgent: preferredAgent(),
|
|
2505
|
-
agents:
|
|
2505
|
+
agents: enabledAgents()
|
|
2506
2506
|
},
|
|
2507
2507
|
prefs: allPrefs(),
|
|
2508
2508
|
status: statusForAll()
|
|
@@ -2592,8 +2592,8 @@ function coalesce(fn) {
|
|
|
2592
2592
|
}
|
|
2593
2593
|
//#endregion
|
|
2594
2594
|
//#region src/tags/new-workspace.css.ts
|
|
2595
|
-
var content$2 = "
|
|
2596
|
-
var iconBtn$3 = "
|
|
2595
|
+
var content$2 = "_Y _R";
|
|
2596
|
+
var iconBtn$3 = "_1 _B";
|
|
2597
2597
|
//#endregion
|
|
2598
2598
|
//#region src/tags/icons/icon-plus.marko
|
|
2599
2599
|
var icon_plus_default = _template("M", (input) => {
|
|
@@ -2660,14 +2660,14 @@ var repo_picker_default = _template("p", (input) => {
|
|
|
2660
2660
|
input.onError?.(String(err.message || err));
|
|
2661
2661
|
}
|
|
2662
2662
|
}, "p5", $scope0_id);
|
|
2663
|
-
_html(`<div${_attr_class("
|
|
2663
|
+
_html(`<div${_attr_class("_bC")}><input${_attr_input_value($scope0_id, "b", filter, _resume(function(v) {
|
|
2664
2664
|
filter = v;
|
|
2665
2665
|
highlight = 0;
|
|
2666
|
-
}, "p0", $scope0_id))}${_attr_class("
|
|
2666
|
+
}, "p0", $scope0_id))}${_attr_class("_bO")} placeholder="Add a repo…" aria-label="Add a repo"${_attr("disabled", input.disabled)}>${_el_resume($scope0_id, "b")}`);
|
|
2667
2667
|
_if(() => {
|
|
2668
2668
|
if (filter && !catalog) {
|
|
2669
2669
|
const $scope8_id = _scope_id();
|
|
2670
|
-
_html(`<p${_attr_class("
|
|
2670
|
+
_html(`<p${_attr_class("_bN")}>Loading repos…</p>`);
|
|
2671
2671
|
writeScope($scope8_id, {});
|
|
2672
2672
|
return 0;
|
|
2673
2673
|
}
|
|
@@ -2675,23 +2675,23 @@ var repo_picker_default = _template("p", (input) => {
|
|
|
2675
2675
|
_if(() => {
|
|
2676
2676
|
if (results.length) {
|
|
2677
2677
|
const $scope2_id = _scope_id();
|
|
2678
|
-
_html(`<ul${_attr_class("
|
|
2678
|
+
_html(`<ul${_attr_class("_bD")}>`);
|
|
2679
2679
|
_for_of(results, (repo, i) => {
|
|
2680
2680
|
const $scope3_id = _scope_id();
|
|
2681
|
-
_html(`<li><div${_attr_class(["
|
|
2681
|
+
_html(`<li><div${_attr_class(["_bF", { ["_bE"]: i === highlight }])}><button${_attr_class("_bG")}>`);
|
|
2682
2682
|
icon_plus_default({
|
|
2683
2683
|
size: 12,
|
|
2684
|
-
class: "
|
|
2684
|
+
class: "_bL"
|
|
2685
2685
|
});
|
|
2686
|
-
_html(`<span${_attr_class("
|
|
2686
|
+
_html(`<span${_attr_class("_bM")}>${_escape(repo.nameWithOwner)}${_el_resume($scope3_id, "e")}</span></button>${_el_resume($scope3_id, "b")}<button${_attr_class(["_bI", { ["_bH"]: branchesFor === repo.nameWithOwner }])}${_attr("title", `Pick a base branch for ${repo.nameWithOwner}`)}${_attr("aria-label", `Pick a base branch for ${repo.nameWithOwner}`)}>⎇</button>${_el_resume($scope3_id, "f")}</div>${_el_resume($scope3_id, "a")}`);
|
|
2687
2687
|
_if(() => {
|
|
2688
2688
|
if (branchesFor === repo.nameWithOwner) {
|
|
2689
2689
|
const $scope4_id = _scope_id();
|
|
2690
|
-
_html(`<div${_attr_class("
|
|
2690
|
+
_html(`<div${_attr_class("_bJ")}>`);
|
|
2691
2691
|
_if(() => {
|
|
2692
2692
|
if (!branches) {
|
|
2693
2693
|
const $scope9_id = _scope_id();
|
|
2694
|
-
_html(`<p${_attr_class("
|
|
2694
|
+
_html(`<p${_attr_class("_bN")}><span${_attr_class("_y")}></span> Loading branches…</p>`);
|
|
2695
2695
|
writeScope($scope9_id, {});
|
|
2696
2696
|
return 0;
|
|
2697
2697
|
} else {
|
|
@@ -2701,24 +2701,24 @@ var repo_picker_default = _template("p", (input) => {
|
|
|
2701
2701
|
const $scope6_id = _scope_id();
|
|
2702
2702
|
_html(`<input${_attr_input_value($scope6_id, "a", branchFilter, _resume((_new_branchFilter) => {
|
|
2703
2703
|
branchFilter = _new_branchFilter;
|
|
2704
|
-
}, "p1", $scope6_id))}${_attr_class("
|
|
2704
|
+
}, "p1", $scope6_id))}${_attr_class("_bP")} placeholder="Filter branches…" aria-label="Filter branches" autofocus>${_el_resume($scope6_id, "a")}`);
|
|
2705
2705
|
_script($scope6_id, "p6");
|
|
2706
2706
|
_subscribe($branchFilter__closures, writeScope($scope6_id, { Ca9: 1 }));
|
|
2707
2707
|
return 0;
|
|
2708
2708
|
}
|
|
2709
2709
|
}, $scope5_id, "a", 1, 1, 1, 0, 1);
|
|
2710
2710
|
const shown = (branchFilter ? branches.filter((b) => b.toLowerCase().includes(branchFilter.toLowerCase())) : branches).slice(0, 12);
|
|
2711
|
-
_html(`<ul${_attr_class("
|
|
2711
|
+
_html(`<ul${_attr_class("_bK")}>`);
|
|
2712
2712
|
_for_of(shown, (branch) => {
|
|
2713
2713
|
const $scope7_id = _scope_id();
|
|
2714
|
-
_html(`<li><button${_attr_class(["
|
|
2714
|
+
_html(`<li><button${_attr_class(["_bG", "_bQ"])}><span${_attr_class(["_bM", "_q"])}>${_escape(branch)}${_el_resume($scope7_id, "c")}</span></button>${_el_resume($scope7_id, "a")}</li>`);
|
|
2715
2715
|
_script($scope7_id, "p7");
|
|
2716
2716
|
writeScope($scope7_id, { e: branch });
|
|
2717
2717
|
}, (b) => b, $scope5_id, "c", 1, 1, 1, 0, 1);
|
|
2718
2718
|
_if(() => {
|
|
2719
2719
|
if (!shown.length) {
|
|
2720
2720
|
const $scope10_id = _scope_id();
|
|
2721
|
-
_html(`<li><p${_attr_class("
|
|
2721
|
+
_html(`<li><p${_attr_class("_bN")}>No branches match.</p></li>`);
|
|
2722
2722
|
writeScope($scope10_id, {});
|
|
2723
2723
|
return 0;
|
|
2724
2724
|
}
|
|
@@ -2743,7 +2743,7 @@ var repo_picker_default = _template("p", (input) => {
|
|
|
2743
2743
|
return 0;
|
|
2744
2744
|
} else if (filter && catalog) {
|
|
2745
2745
|
const $scope1_id = _scope_id();
|
|
2746
|
-
_html(`<p${_attr_class("
|
|
2746
|
+
_html(`<p${_attr_class("_bN")}>No repos match "<!>${_escape(filter)}${_el_resume($scope1_id, "b")}".</p>`);
|
|
2747
2747
|
writeScope($scope1_id, {});
|
|
2748
2748
|
return 1;
|
|
2749
2749
|
}
|
|
@@ -2873,7 +2873,7 @@ var new_workspace_default = _template("m", (input) => {
|
|
|
2873
2873
|
}
|
|
2874
2874
|
}, "m5", $scope0_id);
|
|
2875
2875
|
const titleId = _id();
|
|
2876
|
-
_html(`<div${_attr_class("
|
|
2876
|
+
_html(`<div${_attr_class("_P")} role=region${_attr("aria-labelledby", titleId)}><div${_attr_class("_Q")}><div${_attr_class(content$2)}><header${_attr_class("_T")}><div${_attr_class("_V")}><h1${_attr("id", titleId)}${_attr_class("_U")}>New workspace</h1><p${_attr_class("_W")}>Name the space and pick repos — or restore an archived one below.</p></div></header>`);
|
|
2877
2877
|
_if(() => {
|
|
2878
2878
|
if (error) {
|
|
2879
2879
|
const $scope4_id = _scope_id();
|
|
@@ -2894,28 +2894,28 @@ var new_workspace_default = _template("m", (input) => {
|
|
|
2894
2894
|
return 0;
|
|
2895
2895
|
}
|
|
2896
2896
|
}, $scope0_id, "h", 1, 1, 1, 0, 1);
|
|
2897
|
-
_html(`<label${_attr_class("
|
|
2897
|
+
_html(`<label${_attr_class("_2")}><span${_attr_class("_bm")}>Name</span><input${_attr_input_value($scope0_id, "k", name, _resume((_new_name) => {
|
|
2898
2898
|
name = _new_name;
|
|
2899
|
-
}, "m0", $scope0_id))}${_attr_class("
|
|
2899
|
+
}, "m0", $scope0_id))}${_attr_class("_bn")} placeholder=my-feature${_attr("disabled", busy)} autofocus>${_el_resume($scope0_id, "k")}</label><section${_attr_class("_3")}><div${_attr_class("_4")}><h2${_attr_class("_bo")}>Repos</h2><button${_attr_class(iconBtn$3)} title="Refresh repo list" aria-label="Refresh repo list"${_attr("disabled", catalogRefreshing)}>`);
|
|
2900
2900
|
_set_serialize_reason(1);
|
|
2901
2901
|
const $childScope = _peek_scope_id();
|
|
2902
2902
|
icon_refresh_default({
|
|
2903
2903
|
size: 14,
|
|
2904
2904
|
class: catalogRefreshing && "_x"
|
|
2905
2905
|
});
|
|
2906
|
-
_html(`</button>${_el_resume($scope0_id, "o")}</div><ul${_attr_class("
|
|
2906
|
+
_html(`</button>${_el_resume($scope0_id, "o")}</div><ul${_attr_class("_5")}>`);
|
|
2907
2907
|
_for_of(selected, (repo) => {
|
|
2908
2908
|
const $scope1_id = _scope_id();
|
|
2909
|
-
_html(`<li${_attr_class("
|
|
2909
|
+
_html(`<li${_attr_class("_6")}><span${_attr_class("_7")}>${_escape(repo.fullName)}${_el_resume($scope1_id, "c")}</span>`);
|
|
2910
2910
|
_if(() => {
|
|
2911
2911
|
if (repo.baseBranch) {
|
|
2912
2912
|
const $scope8_id = _scope_id();
|
|
2913
|
-
_html(`<span${_attr_class(["
|
|
2913
|
+
_html(`<span${_attr_class(["_8", "_q"])} title="Base branch">⎇ <!>${_escape(repo.baseBranch)}${_el_resume($scope8_id, "b")}</span>`);
|
|
2914
2914
|
writeScope($scope8_id, {});
|
|
2915
2915
|
return 0;
|
|
2916
2916
|
}
|
|
2917
2917
|
}, $scope1_id, "d", 1, 1, 1, 0, 1);
|
|
2918
|
-
_html(`<button${_attr_class("
|
|
2918
|
+
_html(`<button${_attr_class("_9")}${_attr("title", `Remove ${repo.fullName}`)}${_attr("disabled", busy)}>×</button>${_el_resume($scope1_id, "e")}</li>`);
|
|
2919
2919
|
_script($scope1_id, "m11");
|
|
2920
2920
|
writeScope($scope1_id, {
|
|
2921
2921
|
h: repo?.fullName,
|
|
@@ -2925,7 +2925,7 @@ var new_workspace_default = _template("m", (input) => {
|
|
|
2925
2925
|
_if(() => {
|
|
2926
2926
|
if (!selected.length) {
|
|
2927
2927
|
const $scope9_id = _scope_id();
|
|
2928
|
-
_html(`<li${_attr_class("
|
|
2928
|
+
_html(`<li${_attr_class("__")}>No repos yet — search below to add one (or create empty).</li>`);
|
|
2929
2929
|
writeScope($scope9_id, {});
|
|
2930
2930
|
return 0;
|
|
2931
2931
|
}
|
|
@@ -2950,10 +2950,10 @@ var new_workspace_default = _template("m", (input) => {
|
|
|
2950
2950
|
_if(() => {
|
|
2951
2951
|
if (busy && steps$1.length) {
|
|
2952
2952
|
const $scope6_id = _scope_id();
|
|
2953
|
-
_html(`<ul${_attr_class("
|
|
2953
|
+
_html(`<ul${_attr_class("_ba")}>`);
|
|
2954
2954
|
_for_of(steps$1, (step$1, i) => {
|
|
2955
2955
|
const $scope7_id = _scope_id();
|
|
2956
|
-
_html(`<li${_attr_class(["
|
|
2956
|
+
_html(`<li${_attr_class(["_bp", { ["_bb"]: i === steps$1.length - 1 }])}>`);
|
|
2957
2957
|
_if(() => {
|
|
2958
2958
|
if (i === steps$1.length - 1) {
|
|
2959
2959
|
const $scope10_id = _scope_id();
|
|
@@ -2962,7 +2962,7 @@ var new_workspace_default = _template("m", (input) => {
|
|
|
2962
2962
|
return 0;
|
|
2963
2963
|
} else {
|
|
2964
2964
|
const $scope11_id = _scope_id();
|
|
2965
|
-
_html(`<span${_attr_class("
|
|
2965
|
+
_html(`<span${_attr_class("_bc")}>✓</span>`);
|
|
2966
2966
|
writeScope($scope11_id, {});
|
|
2967
2967
|
return 1;
|
|
2968
2968
|
}
|
|
@@ -2974,19 +2974,19 @@ var new_workspace_default = _template("m", (input) => {
|
|
|
2974
2974
|
return 0;
|
|
2975
2975
|
}
|
|
2976
2976
|
}, $scope0_id, "v", 1, 1, 1, 0, 1);
|
|
2977
|
-
_html(`<div${_attr_class("
|
|
2977
|
+
_html(`<div${_attr_class("_Z")}><button type=button${_attr_class(["_h", "_bq"])}${_attr("disabled", busy || !!restoring)}>Cancel</button>${_el_resume($scope0_id, "x")}<button type=button${_attr_class([
|
|
2978
2978
|
"_h",
|
|
2979
2979
|
"_i",
|
|
2980
|
-
"
|
|
2981
|
-
"
|
|
2980
|
+
"_0",
|
|
2981
|
+
"_bq"
|
|
2982
2982
|
])}${_attr("disabled", busy || !!restoring || !name.trim())}>${busy ? "Creating…" : "Create workspace"}${_el_resume($scope0_id, "z")}</button>${_el_resume($scope0_id, "y")}</div>`);
|
|
2983
2983
|
_if(() => {
|
|
2984
2984
|
if (archived$1.length) {
|
|
2985
2985
|
const $scope2_id = _scope_id();
|
|
2986
|
-
_html(`<section${_attr_class("
|
|
2986
|
+
_html(`<section${_attr_class("_bd")}><div${_attr_class("_4")}><h2${_attr_class("_bo")}>Archived</h2><span${_attr_class("_be")}>${_escape(archived$1.length)}${_el_resume($scope2_id, "e", $sg__input_workspaces)}</span></div><p${_attr_class("_bf")}>Restore a parked space instead of creating a new one.</p><ul${_attr_class("_bg")}>`);
|
|
2987
2987
|
_for_of(archived$1, (ws) => {
|
|
2988
2988
|
const $scope3_id = _scope_id();
|
|
2989
|
-
_html(`<li${_attr_class("
|
|
2989
|
+
_html(`<li${_attr_class("_bh")}><div${_attr_class("_bi")}><span${_attr_class("_bj")}>${_escape(ws.name)}${_el_resume($scope3_id, "d", $sg__input_workspaces)}</span><span${_attr_class(["_bk", "_q"])}${_attr("title", ws.display_path || ws.path)}>${_escape(ws.display_path || ws.path)}${_el_resume($scope3_id, "f", $sg__input_workspaces)}</span>${_el_resume($scope3_id, "e", $sg__input_workspaces)}</div><button type=button${_attr_class(["_h", "_bl"])}${_attr("disabled", busy || !!restoring)}>`);
|
|
2990
2990
|
_if(() => {
|
|
2991
2991
|
if (restoring === ws.id) {
|
|
2992
2992
|
const $scope12_id = _scope_id();
|
|
@@ -3109,6 +3109,63 @@ function vapidKey(base64) {
|
|
|
3109
3109
|
return Uint8Array.from(raw, (c) => c.charCodeAt(0));
|
|
3110
3110
|
}
|
|
3111
3111
|
//#endregion
|
|
3112
|
+
//#region src/client/agents.ts
|
|
3113
|
+
/** Agent instance ids are `<family><n?>` (`claude`, `claude2`) — see
|
|
3114
|
+
* lib/setup/catalog.mjs `parseAgentId`. This is the browser-side mirror for
|
|
3115
|
+
* icons, labels, and reading a shell's running command; the family table is
|
|
3116
|
+
* static so the client bundle needs no server round-trip. */
|
|
3117
|
+
var FAMILIES = {
|
|
3118
|
+
claude: {
|
|
3119
|
+
label: "Claude",
|
|
3120
|
+
bin: "claude"
|
|
3121
|
+
},
|
|
3122
|
+
codex: {
|
|
3123
|
+
label: "Codex",
|
|
3124
|
+
bin: "codex"
|
|
3125
|
+
},
|
|
3126
|
+
grok: {
|
|
3127
|
+
label: "Grok",
|
|
3128
|
+
bin: "grok"
|
|
3129
|
+
},
|
|
3130
|
+
copilot: {
|
|
3131
|
+
label: "Copilot",
|
|
3132
|
+
bin: "copilot"
|
|
3133
|
+
},
|
|
3134
|
+
cursor: {
|
|
3135
|
+
label: "Cursor",
|
|
3136
|
+
bin: "cursor-agent"
|
|
3137
|
+
}
|
|
3138
|
+
};
|
|
3139
|
+
function parseAgent(id) {
|
|
3140
|
+
const m = /^([a-z]+?)(\d*)$/.exec(id || "");
|
|
3141
|
+
return m && FAMILIES[m[1]] ? {
|
|
3142
|
+
family: m[1],
|
|
3143
|
+
suffix: m[2]
|
|
3144
|
+
} : null;
|
|
3145
|
+
}
|
|
3146
|
+
/** Icon family for an id — `shell` (or unknown) falls back to the prompt glyph. */
|
|
3147
|
+
function agentFamily(id) {
|
|
3148
|
+
return parseAgent(id)?.family ?? id;
|
|
3149
|
+
}
|
|
3150
|
+
/** Numeric suffix to badge on the icon; empty for the primary instance. */
|
|
3151
|
+
function agentBadge(id) {
|
|
3152
|
+
return parseAgent(id)?.suffix ?? "";
|
|
3153
|
+
}
|
|
3154
|
+
/** "Claude 2" / "Shell". */
|
|
3155
|
+
function agentLabel(id) {
|
|
3156
|
+
const p = parseAgent(id);
|
|
3157
|
+
if (!p) return id === "shell" ? "Shell" : id;
|
|
3158
|
+
return `${FAMILIES[p.family].label}${p.suffix ? ` ${p.suffix}` : ""}`;
|
|
3159
|
+
}
|
|
3160
|
+
/** Instance id for a running command (`cursor-agent2` → `cursor2`), or null. */
|
|
3161
|
+
function agentFromCommand(command) {
|
|
3162
|
+
for (const [family, { bin }] of Object.entries(FAMILIES)) {
|
|
3163
|
+
if (command === bin) return family;
|
|
3164
|
+
if (command.startsWith(bin) && /^\d+$/.test(command.slice(bin.length))) return `${family}${command.slice(bin.length)}`;
|
|
3165
|
+
}
|
|
3166
|
+
return null;
|
|
3167
|
+
}
|
|
3168
|
+
//#endregion
|
|
3112
3169
|
//#region src/client/status.ts
|
|
3113
3170
|
/** Workspace activity dot from its polled status counts. */
|
|
3114
3171
|
function phaseOf(status) {
|
|
@@ -3118,14 +3175,6 @@ function phaseOf(status) {
|
|
|
3118
3175
|
function sessionPhase(state) {
|
|
3119
3176
|
return state?.phase === "working" ? "working" : state?.phase === "waiting" ? "waiting" : state?.alive ? "idle" : "off";
|
|
3120
3177
|
}
|
|
3121
|
-
/** Binary each session kind launches, inverted — `sessions.ts` COMMANDS. */
|
|
3122
|
-
var AGENT_BY_COMMAND = {
|
|
3123
|
-
claude: "claude",
|
|
3124
|
-
codex: "codex",
|
|
3125
|
-
grok: "grok",
|
|
3126
|
-
copilot: "copilot",
|
|
3127
|
-
"cursor-agent": "cursor"
|
|
3128
|
-
};
|
|
3129
3178
|
/**
|
|
3130
3179
|
* What a session is *running*, which is not always what it was started as: a
|
|
3131
3180
|
* shell someone typed `claude` into is a claude session as far as the reader
|
|
@@ -3135,11 +3184,11 @@ var AGENT_BY_COMMAND = {
|
|
|
3135
3184
|
function activeAgent(session) {
|
|
3136
3185
|
if (session.agent !== "shell") return session.agent;
|
|
3137
3186
|
const command = session.state?.command?.trim();
|
|
3138
|
-
return command &&
|
|
3187
|
+
return command && agentFromCommand(command) || session.agent;
|
|
3139
3188
|
}
|
|
3140
|
-
var iconBtn$2 = "
|
|
3141
|
-
var navToggle = "
|
|
3142
|
-
_template("
|
|
3189
|
+
var iconBtn$2 = "_cn _B";
|
|
3190
|
+
var navToggle = "_cr _B";
|
|
3191
|
+
_template("C", (input) => {
|
|
3143
3192
|
const $scope0_reason = _scope_reason(), $sg__input_size__OR__input_class = _serialize_guard($scope0_reason, 0);
|
|
3144
3193
|
const $scope0_id = _scope_id();
|
|
3145
3194
|
_set_serialize_reason({
|
|
@@ -3155,8 +3204,8 @@ _template("B", (input) => {
|
|
|
3155
3204
|
_serialize_if($scope0_reason, 0) && writeScope($scope0_id, { a: _existing_scope($childScope) });
|
|
3156
3205
|
});
|
|
3157
3206
|
//#endregion
|
|
3158
|
-
//#region src/tags/icons/icon-
|
|
3159
|
-
var
|
|
3207
|
+
//#region src/tags/icons/icon-settings.marko
|
|
3208
|
+
var icon_settings_default = _template("P", (input) => {
|
|
3160
3209
|
const $scope0_reason = _scope_reason(), $sg__input_size__OR__input_class = _serialize_guard($scope0_reason, 0);
|
|
3161
3210
|
const $scope0_id = _scope_id();
|
|
3162
3211
|
_set_serialize_reason({
|
|
@@ -3165,13 +3214,13 @@ var icon_gauge_default = _template("I", (input) => {
|
|
|
3165
3214
|
});
|
|
3166
3215
|
const $childScope = _peek_scope_id();
|
|
3167
3216
|
icon_base_default({
|
|
3168
|
-
d: "
|
|
3217
|
+
d: "M12 15C13.6569 15 15 13.6569 15 12C15 10.3431 13.6569 9 12 9C10.3431 9 9 10.3431 9 12C9 13.6569 10.3431 15 12 15Z M19.6224 10.3954L18.5247 7.7448L20 6L18 4L16.2647 5.48295L13.5578 4.36974L12.9353 2H10.981L10.3491 4.40113L7.70441 5.51596L6 4L4 6L5.45337 7.78885L4.3725 10.4463L2 11V13L4.40111 13.6555L5.51575 16.2997L4 18L6 20L7.79116 18.5403L10.397 19.6123L11 22H13L13.6045 19.6132L16.2551 18.5155C16.6969 18.8313 18 20 18 20L20 18L18.5159 16.2494L19.6139 13.598L21.9999 12.9772L22 11L19.6224 10.3954Z",
|
|
3169
3218
|
size: input.size,
|
|
3170
3219
|
class: input.class
|
|
3171
3220
|
});
|
|
3172
3221
|
_serialize_if($scope0_reason, 0) && writeScope($scope0_id, { a: _existing_scope($childScope) });
|
|
3173
3222
|
});
|
|
3174
|
-
var railBtn = "
|
|
3223
|
+
var railBtn = "_fg _B";
|
|
3175
3224
|
//#endregion
|
|
3176
3225
|
//#region src/tags/icons/icon-agent.marko
|
|
3177
3226
|
var PATHS = {
|
|
@@ -3181,15 +3230,26 @@ var PATHS = {
|
|
|
3181
3230
|
copilot: "M19.245 5.364c1.322 1.36 1.877 3.216 2.11 5.817.622 0 1.2.135 1.592.654l.73.964c.21.278.323.61.323.955v2.62c0 .339-.173.669-.453.868C20.239 19.602 16.157 21.5 12 21.5c-4.6 0-9.205-2.583-11.547-4.258-.28-.2-.452-.53-.453-.868v-2.62c0-.345.113-.679.321-.956l.73-.963c.392-.517.974-.654 1.593-.654l.029-.297c.25-2.446.81-4.213 2.082-5.52 2.461-2.54 5.71-2.851 7.146-2.864h.198c1.436.013 4.685.323 7.146 2.864zm-7.244 4.328c-.284 0-.613.016-.962.05-.123.447-.305.85-.57 1.108-1.05 1.023-2.316 1.18-2.994 1.18-.638 0-1.306-.13-1.851-.464-.516.165-1.012.403-1.044.996a65.882 65.882 0 00-.063 2.884l-.002.48c-.002.563-.005 1.126-.013 1.69.002.326.204.63.51.765 2.482 1.102 4.83 1.657 6.99 1.657 2.156 0 4.504-.555 6.985-1.657a.854.854 0 00.51-.766c.03-1.682.006-3.372-.076-5.053-.031-.596-.528-.83-1.046-.996-.546.333-1.212.464-1.85.464-.677 0-1.942-.157-2.993-1.18-.266-.258-.447-.661-.57-1.108-.32-.032-.64-.049-.96-.05zm-2.525 4.013c.539 0 .976.426.976.95v1.753c0 .525-.437.95-.976.95a.964.964 0 01-.976-.95v-1.752c0-.525.437-.951.976-.951zm5 0c.539 0 .976.426.976.95v1.753c0 .525-.437.95-.976.95a.964.964 0 01-.976-.95v-1.752c0-.525.437-.951.976-.951zM7.635 5.087c-1.05.102-1.935.438-2.385.906-.975 1.037-.765 3.668-.21 4.224.405.394 1.17.657 1.995.657h.09c.649-.013 1.785-.176 2.73-1.11.435-.41.705-1.433.675-2.47-.03-.834-.27-1.52-.63-1.813-.39-.336-1.275-.482-2.265-.394zm6.465.394c-.36.292-.6.98-.63 1.813-.03 1.037.24 2.06.675 2.47.968.957 2.136 1.104 2.776 1.11h.044c.825 0 1.59-.263 1.995-.657.555-.556.765-3.187-.21-4.224-.45-.468-1.335-.804-2.385-.906-.99-.088-1.875.058-2.265.394zM12 7.615c-.24 0-.525.015-.84.044.03.16.045.336.06.526l-.001.159a2.94 2.94 0 01-.014.25c.225-.022.425-.027.612-.028h.366c.187 0 .387.006.612.028-.015-.146-.015-.277-.015-.409.015-.19.03-.365.06-.526a9.29 9.29 0 00-.84-.044z",
|
|
3182
3231
|
cursor: "M22.106 5.68L12.5.135a.998.998 0 00-.998 0L1.893 5.68a.84.84 0 00-.419.726v11.186c0 .3.16.577.42.727l9.607 5.547a.999.999 0 00.998 0l9.608-5.547a.84.84 0 00.42-.727V6.407a.84.84 0 00-.42-.726zm-.603 1.176L12.228 22.92c-.063.108-.228.064-.228-.061V12.34a.59.59 0 00-.295-.51l-9.11-5.26c-.107-.062-.063-.228.062-.228h18.55c.264 0 .428.286.296.514z"
|
|
3183
3232
|
};
|
|
3184
|
-
var icon_agent_default = _template("
|
|
3185
|
-
const $scope0_reason = _scope_reason(), $sg__input_size__OR__input_class = _serialize_guard($scope0_reason, 0), $si__input_size__OR__input_class = _serialize_if($scope0_reason, 0), $si__input_size__OR__input_agent__OR__input_class = _serialize_if($scope0_reason, 1), $
|
|
3233
|
+
var icon_agent_default = _template("z", (input) => {
|
|
3234
|
+
const $scope0_reason = _scope_reason(), $sg__input_agent = _serialize_guard($scope0_reason, 2), $sg__input_size__OR__input_class = _serialize_guard($scope0_reason, 0), $si__input_size__OR__input_class = _serialize_if($scope0_reason, 0), $si__input_size__OR__input_agent__OR__input_class = _serialize_if($scope0_reason, 1), $si__input_agent = _serialize_if($scope0_reason, 2);
|
|
3186
3235
|
const $scope0_id = _scope_id();
|
|
3236
|
+
const $badge__closures = /* @__PURE__ */ new Set();
|
|
3187
3237
|
const size = input.size ?? 15;
|
|
3188
|
-
const d = PATHS[input.agent];
|
|
3238
|
+
const d = PATHS[agentFamily(input.agent)];
|
|
3239
|
+
const badge = agentBadge(input.agent);
|
|
3189
3240
|
_if(() => {
|
|
3190
3241
|
if (d) {
|
|
3191
3242
|
const $scope1_id = _scope_id();
|
|
3192
|
-
_html(`<svg${_attr_class(["_d", input.class])}${_attr("width", size)}${_attr("height", size)} viewBox="0 0 24 24" fill=currentColor fill-rule=evenodd aria-hidden=true><path${_attr("d", d)}></path>${_el_resume($scope1_id, "b", $sg__input_agent)}
|
|
3243
|
+
_html(`<svg${_attr_class(["_d", input.class])}${_attr("width", size)}${_attr("height", size)} viewBox="0 0 24 24" fill=currentColor fill-rule=evenodd aria-hidden=true><path${_attr("d", d)}></path>${_el_resume($scope1_id, "b", $sg__input_agent)}`);
|
|
3244
|
+
_if(() => {
|
|
3245
|
+
if (badge) {
|
|
3246
|
+
const $scope3_id = _scope_id();
|
|
3247
|
+
_html(`<circle cx=18 cy=18 r=6.5 fill="var(--panel, canvas)"></circle><text x=18 y=18 text-anchor=middle dominant-baseline=central font-size=9 font-weight=700 font-family="system-ui, sans-serif" fill=currentColor>${_escape(badge)}${_el_resume($scope3_id, "a", $sg__input_agent)}</text>`);
|
|
3248
|
+
$si__input_agent && _subscribe($badge__closures, writeScope($scope3_id, { _: _scope_with_id($scope1_id) }));
|
|
3249
|
+
return 0;
|
|
3250
|
+
}
|
|
3251
|
+
}, $scope1_id, "c", $sg__input_agent, $sg__input_agent, $sg__input_agent);
|
|
3252
|
+
_html(`</svg>${_el_resume($scope1_id, "a", $sg__input_size__OR__input_class)}`);
|
|
3193
3253
|
$si__input_size__OR__input_agent__OR__input_class && writeScope($scope1_id, { _: _scope_with_id($scope0_id) });
|
|
3194
3254
|
return 0;
|
|
3195
3255
|
} else {
|
|
@@ -3211,16 +3271,18 @@ var icon_agent_default = _template("y", (input) => {
|
|
|
3211
3271
|
return 1;
|
|
3212
3272
|
}
|
|
3213
3273
|
}, $scope0_id, "a", _serialize_guard($scope0_reason, 1), $sg__input_agent, $sg__input_agent, 0, 1);
|
|
3214
|
-
|
|
3274
|
+
$si__input_agent && writeScope($scope0_id, {
|
|
3215
3275
|
d: input.size,
|
|
3216
3276
|
f: input.class,
|
|
3217
3277
|
g: size,
|
|
3218
|
-
h: d
|
|
3278
|
+
h: d,
|
|
3279
|
+
i: badge,
|
|
3280
|
+
n: $badge__closures
|
|
3219
3281
|
});
|
|
3220
3282
|
});
|
|
3221
3283
|
//#endregion
|
|
3222
3284
|
//#region src/tags/icons/icon-diff.marko
|
|
3223
|
-
var icon_diff_default = _template("
|
|
3285
|
+
var icon_diff_default = _template("F", (input) => {
|
|
3224
3286
|
const $scope0_reason = _scope_reason(), $sg__input_size__OR__input_class = _serialize_guard($scope0_reason, 0);
|
|
3225
3287
|
const $scope0_id = _scope_id();
|
|
3226
3288
|
_set_serialize_reason({
|
|
@@ -3246,7 +3308,7 @@ var icon_manage_default = _template("L", (input) => {
|
|
|
3246
3308
|
});
|
|
3247
3309
|
const $childScope = _peek_scope_id();
|
|
3248
3310
|
icon_base_default({
|
|
3249
|
-
d: "
|
|
3311
|
+
d: "M2.6 4H8.77805C8.92127 4 9.05977 4.05124 9.16852 4.14445L12.3315 6.85555C12.4402 6.94876 12.5787 7 12.722 7H21.4C21.7314 7 22 7.26863 22 7.6V10.4C22 10.7314 21.7314 11 21.4 11H2.6C2.26863 11 2 10.7314 2 10.4V4.6C2 4.26863 2.26863 4 2.6 4Z M22 10L22 14 M2 10V19.4C2 19.7314 2.26863 20 2.6 20H13 M19 21C20.1046 21 21 20.1046 21 19C21 17.8954 20.1046 17 19 17C18.6357 17 18.2942 17.0974 18 17.2676C17.4022 17.6134 17 18.2597 17 19C17 19.7403 17.4022 20.3866 18 20.7324C18.2942 20.9026 18.6357 21 19 21Z M19 22C20.6569 22 22 20.6569 22 19C22 17.3431 20.6569 16 19 16C17.3431 16 16 17.3431 16 19C16 20.6569 17.3431 22 19 22Z",
|
|
3250
3312
|
size: input.size,
|
|
3251
3313
|
class: input.class
|
|
3252
3314
|
});
|
|
@@ -3254,7 +3316,7 @@ var icon_manage_default = _template("L", (input) => {
|
|
|
3254
3316
|
});
|
|
3255
3317
|
//#endregion
|
|
3256
3318
|
//#region src/tags/icons/icon-edit.marko
|
|
3257
|
-
var icon_edit_default = _template("
|
|
3319
|
+
var icon_edit_default = _template("H", (input) => {
|
|
3258
3320
|
const $scope0_reason = _scope_reason(), $sg__input_size__OR__input_class = _serialize_guard($scope0_reason, 0);
|
|
3259
3321
|
const $scope0_id = _scope_id();
|
|
3260
3322
|
_set_serialize_reason({
|
|
@@ -3269,16 +3331,16 @@ var icon_edit_default = _template("G", (input) => {
|
|
|
3269
3331
|
});
|
|
3270
3332
|
_serialize_if($scope0_reason, 0) && writeScope($scope0_id, { a: _existing_scope($childScope) });
|
|
3271
3333
|
});
|
|
3272
|
-
var prChip = "
|
|
3273
|
-
var portChip = "
|
|
3334
|
+
var prChip = "_f9 _l _f8";
|
|
3335
|
+
var portChip = "_f_ _l _f8";
|
|
3274
3336
|
var prState = {
|
|
3275
|
-
open: "
|
|
3276
|
-
merged: "
|
|
3277
|
-
closed: "
|
|
3337
|
+
open: "_ge",
|
|
3338
|
+
merged: "_gf",
|
|
3339
|
+
closed: "_gg"
|
|
3278
3340
|
};
|
|
3279
3341
|
//#endregion
|
|
3280
3342
|
//#region src/tags/icons/icon-xmark.marko
|
|
3281
|
-
var icon_xmark_default = _template("
|
|
3343
|
+
var icon_xmark_default = _template("U", (input) => {
|
|
3282
3344
|
const $scope0_reason = _scope_reason(), $sg__input_size__OR__input_class = _serialize_guard($scope0_reason, 0);
|
|
3283
3345
|
const $scope0_id = _scope_id();
|
|
3284
3346
|
_set_serialize_reason({
|
|
@@ -3304,7 +3366,7 @@ var prTitle = (repo, pr) => {
|
|
|
3304
3366
|
return parts.join(" · ");
|
|
3305
3367
|
};
|
|
3306
3368
|
var isOpen = (pr) => !pr.state || pr.state === "OPEN";
|
|
3307
|
-
var side_nav_chips_default = _template("
|
|
3369
|
+
var side_nav_chips_default = _template("r", (input) => {
|
|
3308
3370
|
const $scope0_reason = _scope_reason(), $sg__input_status_repos = _serialize_guard($scope0_reason, 1), $si__input_status_repos = _serialize_if($scope0_reason, 1), $sg__input_status_ports = _serialize_guard($scope0_reason, 2), $sg__input_status_repos__OR__input_status_ports = _serialize_guard($scope0_reason, 0), $si__input_status_repos__OR__input_status_ports = _serialize_if($scope0_reason, 0);
|
|
3309
3371
|
const $scope0_id = _scope_id();
|
|
3310
3372
|
const $armedPid__closures = /* @__PURE__ */ new Set();
|
|
@@ -3316,7 +3378,7 @@ var side_nav_chips_default = _template("q", (input) => {
|
|
|
3316
3378
|
armBox.timer = setTimeout(() => {
|
|
3317
3379
|
armedPid = null;
|
|
3318
3380
|
}, 3500);
|
|
3319
|
-
}, "
|
|
3381
|
+
}, "r0", $scope0_id);
|
|
3320
3382
|
const dismissPr = _resume((fullName, number) => {
|
|
3321
3383
|
fetch(`/api/workspaces/${input.workspaceId}/prs`, {
|
|
3322
3384
|
method: "POST",
|
|
@@ -3326,7 +3388,7 @@ var side_nav_chips_default = _template("q", (input) => {
|
|
|
3326
3388
|
number
|
|
3327
3389
|
})
|
|
3328
3390
|
}).catch(() => {});
|
|
3329
|
-
}, "
|
|
3391
|
+
}, "r1", $scope0_id);
|
|
3330
3392
|
const repos = input.status?.repos || [];
|
|
3331
3393
|
const ports = input.status?.ports || [];
|
|
3332
3394
|
_if(() => {
|
|
@@ -3337,8 +3399,8 @@ var side_nav_chips_default = _template("q", (input) => {
|
|
|
3337
3399
|
if (repos.length < 2) return "";
|
|
3338
3400
|
const name = repo.full_name.split("/")[1];
|
|
3339
3401
|
return repos.some((r) => r.full_name !== repo.full_name && r.full_name.split("/")[1] === name) ? repo.full_name : name;
|
|
3340
|
-
}, "
|
|
3341
|
-
_html(`<div${_attr_class("
|
|
3402
|
+
}, "r2", $scope1_id);
|
|
3403
|
+
_html(`<div${_attr_class("_f7")}>`);
|
|
3342
3404
|
_for_of(repos, (repo) => {
|
|
3343
3405
|
const $scope2_id = _scope_id();
|
|
3344
3406
|
_for_of(repo.prs || [], (pr) => {
|
|
@@ -3353,26 +3415,26 @@ var side_nav_chips_default = _template("q", (input) => {
|
|
|
3353
3415
|
[prState.merged]: pr.state === "MERGED",
|
|
3354
3416
|
[prState.closed]: pr.state === "CLOSED"
|
|
3355
3417
|
}
|
|
3356
|
-
])}${_attr("title", prTitle(repo, pr))}><a${_attr_class(["
|
|
3418
|
+
])}${_attr("title", prTitle(repo, pr))}><a${_attr_class(["_ga", { ["_gi"]: !open }])}${_attr("href", pr.url)} target=_blank rel=noopener>${_escape(repoLabel(repo))}${_el_resume($scope3_id, "c", $sg__input_status_repos)}#${_sep($sg__input_status_repos)}${_escape(pr.number)}${_el_resume($scope3_id, "d", $sg__input_status_repos)}</a>${_el_resume($scope3_id, "b", $sg__input_status_repos)}`);
|
|
3357
3419
|
_if(() => {
|
|
3358
3420
|
if (open) {
|
|
3359
3421
|
const $scope4_id = _scope_id();
|
|
3360
|
-
_html(`<button type=button${_attr_class(["
|
|
3422
|
+
_html(`<button type=button${_attr_class(["_ga", "_gb"])}${_attr("title", `Review #${pr.number} diff`)}>`);
|
|
3361
3423
|
icon_diff_default({ size: 12 });
|
|
3362
3424
|
_html(`</button>${_el_resume($scope4_id, "a")}`);
|
|
3363
|
-
_script($scope4_id, "
|
|
3425
|
+
_script($scope4_id, "r3");
|
|
3364
3426
|
writeScope($scope4_id, { _: _scope_with_id($scope3_id) });
|
|
3365
3427
|
return 0;
|
|
3366
3428
|
} else {
|
|
3367
3429
|
const $scope6_id = _scope_id();
|
|
3368
3430
|
_html(`<button type=button${_attr_class([
|
|
3369
|
-
"
|
|
3370
|
-
"
|
|
3371
|
-
"
|
|
3431
|
+
"_ga",
|
|
3432
|
+
"_gb",
|
|
3433
|
+
"_gc"
|
|
3372
3434
|
])}${_attr("title", `Clear #${pr.number} from this list`)}>`);
|
|
3373
3435
|
icon_xmark_default({ size: 12 });
|
|
3374
3436
|
_html(`</button>${_el_resume($scope6_id, "a")}`);
|
|
3375
|
-
_script($scope6_id, "
|
|
3437
|
+
_script($scope6_id, "r4");
|
|
3376
3438
|
writeScope($scope6_id, { _: _scope_with_id($scope3_id) });
|
|
3377
3439
|
return 1;
|
|
3378
3440
|
}
|
|
@@ -3392,15 +3454,15 @@ var side_nav_chips_default = _template("q", (input) => {
|
|
|
3392
3454
|
}, "full_name", $scope1_id, "b", $sg__input_status_repos, $sg__input_status_repos, $sg__input_status_repos__OR__input_status_ports);
|
|
3393
3455
|
_for_of(ports, (p) => {
|
|
3394
3456
|
const $scope5_id = _scope_id();
|
|
3395
|
-
_html(`<span${_attr_class(["_l", portChip])}${_attr("title", p.cmd)}><button type=button${_attr_class(["
|
|
3396
|
-
"
|
|
3397
|
-
"
|
|
3398
|
-
"
|
|
3399
|
-
{ ["
|
|
3457
|
+
_html(`<span${_attr_class(["_l", portChip])}${_attr("title", p.cmd)}><button type=button${_attr_class(["_ga", "_gh"])}${_attr("title", `Open http://${typeof location === "undefined" ? "localhost" : location.hostname}:${p.port}`)}>:${_sep($sg__input_status_ports)}${_escape(p.port)}${_el_resume($scope5_id, "c", $sg__input_status_ports)}</button>${_el_resume($scope5_id, "b")}<button type=button${_attr_class([
|
|
3458
|
+
"_ga",
|
|
3459
|
+
"_gb",
|
|
3460
|
+
"_gc",
|
|
3461
|
+
{ ["_gd"]: armedPid === p.pid }
|
|
3400
3462
|
])}${armedPid === p.pid ? _attr("title", `Really kill ${p.cmd}?`) : _attr("title", `Kill ${p.cmd} (pid ${p.pid})`)}>`);
|
|
3401
3463
|
icon_xmark_default({ size: 12 });
|
|
3402
3464
|
_html(`</button>${_el_resume($scope5_id, "d")}</span>${_el_resume($scope5_id, "a", $sg__input_status_ports)}`);
|
|
3403
|
-
_script($scope5_id, "
|
|
3465
|
+
_script($scope5_id, "r5");
|
|
3404
3466
|
_subscribe($armedPid__closures, writeScope($scope5_id, {
|
|
3405
3467
|
h: p?.cmd,
|
|
3406
3468
|
i: p?.port,
|
|
@@ -3433,7 +3495,7 @@ var side_nav_chips_default = _template("q", (input) => {
|
|
|
3433
3495
|
});
|
|
3434
3496
|
//#endregion
|
|
3435
3497
|
//#region src/tags/side-nav-item.marko
|
|
3436
|
-
var side_nav_item_default = _template("
|
|
3498
|
+
var side_nav_item_default = _template("s", (input) => {
|
|
3437
3499
|
const $scope0_reason = _scope_reason(), $sg__input_workspaceId__OR__input_status = _serialize_guard($scope0_reason, 1), $sg__input_sessions = _serialize_guard($scope0_reason, 18), $sg__input_workspaceId__OR__input_status__OR__input_sessions__OR__input_page = _serialize_guard($scope0_reason, 10), $si__input_current = _serialize_if($scope0_reason, 16), $sg__input_page = _serialize_guard($scope0_reason, 20), $si__input_agents = _serialize_if($scope0_reason, 22), $sg__input_onNewSession = _serialize_guard($scope0_reason, 21), $sg__input_onNewSession__OR__input_onReview = _serialize_guard($scope0_reason, 2), $sg__input_onReview = _serialize_guard($scope0_reason, 23), $si__input_sessions = _serialize_if($scope0_reason, 18), $si__input_workspaces__OR__input_workspaceId = _serialize_if($scope0_reason, 0), $si__input_workspaceId__OR__input_status = _serialize_if($scope0_reason, 1), $si__input_workspaceId__OR__input_status__OR__input_sessions__OR__input_page = _serialize_if($scope0_reason, 10), $sg__input_rail = _serialize_guard($scope0_reason, 15), $si__input_rail = _serialize_if($scope0_reason, 15), $sg__input_workspaces__OR__input_workspaceId = _serialize_guard($scope0_reason, 0), $si__input_workspaceId = _serialize_if($scope0_reason, 14), $si__input_workspaces__OR__input_workspaceId__OR__input_rail = _serialize_if($scope0_reason, 3), $si__input_workspaces__OR__input_workspaceId__OR__input_rail__OR__input_current__OR__input_page = _serialize_if($scope0_reason, 11), $si__input_index = _serialize_if($scope0_reason, 17), $si__input_onNewSession = _serialize_if($scope0_reason, 21), $si__input_onReview = _serialize_if($scope0_reason, 23), $si__input_managing = _serialize_if($scope0_reason, 24), $si__input_currentTab = _serialize_if($scope0_reason, 25), $si__input_railPop = _serialize_if($scope0_reason, 19), $si__input_page = _serialize_if($scope0_reason, 20), $si__input_onReviewPr = _serialize_if($scope0_reason, 26);
|
|
3438
3500
|
const $scope0_id = _scope_id();
|
|
3439
3501
|
const $input_current__closures = /* @__PURE__ */ new Set();
|
|
@@ -3460,7 +3522,7 @@ var side_nav_item_default = _template("r", (input) => {
|
|
|
3460
3522
|
armBox.timer = setTimeout(() => {
|
|
3461
3523
|
armedKill = null;
|
|
3462
3524
|
}, 3500);
|
|
3463
|
-
}, "
|
|
3525
|
+
}, "s1", $scope0_id);
|
|
3464
3526
|
let renamingId = null;
|
|
3465
3527
|
let renameValue = "";
|
|
3466
3528
|
const commitRename = _resume((s) => {
|
|
@@ -3468,7 +3530,7 @@ var side_nav_item_default = _template("r", (input) => {
|
|
|
3468
3530
|
const title = renameValue.trim();
|
|
3469
3531
|
renamingId = null;
|
|
3470
3532
|
if (title) input.onRenameSession?.(s, title);
|
|
3471
|
-
}, "
|
|
3533
|
+
}, "s2", $scope0_id);
|
|
3472
3534
|
const ws$1 = input.workspaces.find((w) => w.id === input.workspaceId);
|
|
3473
3535
|
_if(() => {
|
|
3474
3536
|
if (ws$1) {
|
|
@@ -3478,26 +3540,26 @@ var side_nav_item_default = _template("r", (input) => {
|
|
|
3478
3540
|
_if(() => {
|
|
3479
3541
|
if (input.rail) {
|
|
3480
3542
|
const $scope2_id = _scope_id();
|
|
3481
|
-
_html(`<button${_attr_class([railBtn, { ["
|
|
3543
|
+
_html(`<button${_attr_class([railBtn, { ["_fd"]: input.current }])}${_attr("title", ws$1.name)}>${_escape((input.index ?? 0) + 1)}${_el_resume($scope2_id, "b", _serialize_guard($scope0_reason, 17))}<span${_attr_class([
|
|
3482
3544
|
"_s",
|
|
3483
3545
|
phase[dot],
|
|
3484
|
-
"
|
|
3546
|
+
"_fh"
|
|
3485
3547
|
])}></span>${_el_resume($scope2_id, "c", $sg__input_workspaceId__OR__input_status)}</button>${_el_resume($scope2_id, "a")}`);
|
|
3486
|
-
_script($scope2_id, "
|
|
3548
|
+
_script($scope2_id, "s3");
|
|
3487
3549
|
_subscribe($si__input_workspaces__OR__input_workspaceId && $ws_name__closures, _subscribe($si__input_index && $input_index__closures, _subscribe($si__input_current && $input_current__closures, writeScope($scope2_id, { _: _scope_with_id($scope1_id) }))));
|
|
3488
3550
|
return 0;
|
|
3489
3551
|
} else {
|
|
3490
3552
|
const $scope3_id = _scope_id();
|
|
3491
3553
|
const sessions$1 = input.sessions || [];
|
|
3492
3554
|
const phaseLabel = dot === "working" ? "Working" : dot === "waiting" ? "Needs you" : dot === "idle" ? "Idle" : "Off";
|
|
3493
|
-
_html(`<section${_attr_class(["
|
|
3494
|
-
["
|
|
3495
|
-
["
|
|
3496
|
-
["
|
|
3497
|
-
}])}><div${_attr_class("
|
|
3555
|
+
_html(`<section${_attr_class(["_fj", {
|
|
3556
|
+
["_fd"]: input.current,
|
|
3557
|
+
["_fk"]: input.railPop,
|
|
3558
|
+
["_fi"]: input.page
|
|
3559
|
+
}])}><div${_attr_class("_fl")}><button${_attr_class("_fm")}><span${_attr_class([
|
|
3498
3560
|
"_s",
|
|
3499
3561
|
phase[dot],
|
|
3500
|
-
"
|
|
3562
|
+
"_fw"
|
|
3501
3563
|
])}></span>${_el_resume($scope3_id, "d", $sg__input_workspaceId__OR__input_status)}`);
|
|
3502
3564
|
_if(() => {
|
|
3503
3565
|
if (sessions$1.length === 1) {
|
|
@@ -3510,7 +3572,7 @@ var side_nav_item_default = _template("r", (input) => {
|
|
|
3510
3572
|
icon_agent_default({
|
|
3511
3573
|
agent: activeAgent(sessions$1[0]),
|
|
3512
3574
|
size: 12,
|
|
3513
|
-
class: "
|
|
3575
|
+
class: "_fr"
|
|
3514
3576
|
});
|
|
3515
3577
|
$si__input_sessions && writeScope($scope12_id, {
|
|
3516
3578
|
_: _scope_with_id($scope3_id),
|
|
@@ -3520,11 +3582,11 @@ var side_nav_item_default = _template("r", (input) => {
|
|
|
3520
3582
|
}
|
|
3521
3583
|
}, $scope3_id, "e", $sg__input_sessions, $sg__input_sessions, $sg__input_workspaceId__OR__input_status__OR__input_sessions__OR__input_page);
|
|
3522
3584
|
const metaText = sessions$1.length === 0 ? phaseLabel : sessions$1.length === 1 ? sessions$1[0].title || "" : `${sessions$1.length} sessions`;
|
|
3523
|
-
_html(`<span${_attr_class("
|
|
3585
|
+
_html(`<span${_attr_class("_fs")}><span${_attr_class("_ft")}>${_escape(ws$1.name)}${_el_resume($scope3_id, "h", $sg__input_workspaces__OR__input_workspaceId)}</span>`);
|
|
3524
3586
|
_if(() => {
|
|
3525
3587
|
if (input.page && metaText) {
|
|
3526
3588
|
const $scope13_id = _scope_id();
|
|
3527
|
-
_html(`<span${_attr_class("
|
|
3589
|
+
_html(`<span${_attr_class("_fu")}>${_escape(metaText)}${_el_resume($scope13_id, "b", _serialize_guard($scope0_reason, 5))}</span>`);
|
|
3528
3590
|
$si__input_workspaceId__OR__input_status__OR__input_sessions__OR__input_page && writeScope($scope13_id, { _: _serialize_if($scope0_reason, 5) && _scope_with_id($scope3_id) });
|
|
3529
3591
|
return 0;
|
|
3530
3592
|
}
|
|
@@ -3533,7 +3595,7 @@ var side_nav_item_default = _template("r", (input) => {
|
|
|
3533
3595
|
_if(() => {
|
|
3534
3596
|
if (input.page) {
|
|
3535
3597
|
const $scope4_id = _scope_id();
|
|
3536
|
-
_html(`<span${_attr_class("
|
|
3598
|
+
_html(`<span${_attr_class("_fv")}>${input.current ? "Open" : ""}${_el_resume($scope4_id, "b", _serialize_guard($scope0_reason, 16))}</span>`);
|
|
3537
3599
|
$si__input_workspaces__OR__input_workspaceId__OR__input_rail__OR__input_current__OR__input_page && _subscribe($si__input_current && $input_current__closures, writeScope($scope4_id, {
|
|
3538
3600
|
_: _scope_with_id($scope3_id),
|
|
3539
3601
|
Cab: $si__input_current && 2
|
|
@@ -3545,21 +3607,21 @@ var side_nav_item_default = _template("r", (input) => {
|
|
|
3545
3607
|
_if(() => {
|
|
3546
3608
|
if (!input.page) {
|
|
3547
3609
|
const $scope5_id = _scope_id();
|
|
3548
|
-
_html(`<div${_attr_class("
|
|
3610
|
+
_html(`<div${_attr_class("_fn")}>`);
|
|
3549
3611
|
_if(() => {
|
|
3550
3612
|
if (input.onNewSession) {
|
|
3551
3613
|
const $scope6_id = _scope_id();
|
|
3552
3614
|
const newPopId = _id();
|
|
3553
3615
|
let pickerReady = false;
|
|
3554
|
-
_html(`<button${_attr_class("
|
|
3616
|
+
_html(`<button${_attr_class("_fp")} title="New session"${_attr("popovertarget", newPopId)}>`);
|
|
3555
3617
|
icon_agent_default({
|
|
3556
3618
|
agent: "shell",
|
|
3557
3619
|
size: 12
|
|
3558
3620
|
});
|
|
3559
|
-
_html(`</button>${_el_resume($scope6_id, "a")}<div${_attr("id", newPopId)} popover=auto${_attr_class("
|
|
3621
|
+
_html(`</button>${_el_resume($scope6_id, "a")}<div${_attr("id", newPopId)} popover=auto${_attr_class("_fa")}>`);
|
|
3560
3622
|
_for_of([], (agent) => {
|
|
3561
3623
|
const $scope7_id = _scope_id();
|
|
3562
|
-
_html(`<button${_attr_class("
|
|
3624
|
+
_html(`<button${_attr_class("_fb")}>`);
|
|
3563
3625
|
_set_serialize_reason(12);
|
|
3564
3626
|
const $childScope2 = _peek_scope_id();
|
|
3565
3627
|
icon_agent_default({
|
|
@@ -3567,13 +3629,13 @@ var side_nav_item_default = _template("r", (input) => {
|
|
|
3567
3629
|
size: 14
|
|
3568
3630
|
});
|
|
3569
3631
|
_html(`<!>${_escape(agent)}${_el_resume($scope7_id, "c")}</button>${_el_resume($scope7_id, "a")}`);
|
|
3570
|
-
_script($scope7_id, "
|
|
3632
|
+
_script($scope7_id, "s4");
|
|
3571
3633
|
writeScope($scope7_id, {
|
|
3572
3634
|
e: agent,
|
|
3573
3635
|
b: _existing_scope($childScope2)
|
|
3574
3636
|
});
|
|
3575
3637
|
}, (a) => a, $scope6_id, "c", 1, 1, 1, "</div>", 1);
|
|
3576
|
-
_script($scope6_id, "
|
|
3638
|
+
_script($scope6_id, "s5");
|
|
3577
3639
|
_subscribe($si__input_agents && $input_agents__closures, writeScope($scope6_id, {
|
|
3578
3640
|
e: $si__input_agents && pickerReady,
|
|
3579
3641
|
_: _scope_with_id($scope5_id)
|
|
@@ -3584,33 +3646,33 @@ var side_nav_item_default = _template("r", (input) => {
|
|
|
3584
3646
|
_if(() => {
|
|
3585
3647
|
if (input.onReview) {
|
|
3586
3648
|
const $scope8_id = _scope_id();
|
|
3587
|
-
_html(`<button${_attr_class("
|
|
3649
|
+
_html(`<button${_attr_class("_fp")} title="Review changes">`);
|
|
3588
3650
|
icon_diff_default({ size: 12 });
|
|
3589
3651
|
_html(`</button>${_el_resume($scope8_id, "a")}`);
|
|
3590
|
-
_script($scope8_id, "
|
|
3652
|
+
_script($scope8_id, "s6");
|
|
3591
3653
|
writeScope($scope8_id, { _: _scope_with_id($scope5_id) });
|
|
3592
3654
|
return 0;
|
|
3593
3655
|
}
|
|
3594
3656
|
}, $scope5_id, "c", $sg__input_onReview, $sg__input_onReview, $sg__input_onNewSession__OR__input_onReview, 0, 1);
|
|
3595
|
-
_html(`<button${_attr_class(["
|
|
3657
|
+
_html(`<button${_attr_class(["_fp", { ["_fe"]: input.managing }])} title="Manage workspace" aria-pressed=${input.managing ? "true" : "false"}>`);
|
|
3596
3658
|
icon_manage_default({ size: 12 });
|
|
3597
3659
|
_html(`</button>${_el_resume($scope5_id, "d")}</div>`);
|
|
3598
|
-
_script($scope5_id, "
|
|
3660
|
+
_script($scope5_id, "s7");
|
|
3599
3661
|
_subscribe($si__input_managing && $input_managing__closures, _subscribe($si__input_onReview && $input_onReview__closures, _subscribe($si__input_onNewSession && $input_onNewSession__closures, writeScope($scope5_id, { _: _scope_with_id($scope3_id) }))));
|
|
3600
3662
|
return 0;
|
|
3601
3663
|
}
|
|
3602
3664
|
}, $scope3_id, "k", $sg__input_page, $sg__input_page, $sg__input_workspaceId__OR__input_status__OR__input_sessions__OR__input_page, 0, 1);
|
|
3603
|
-
_html(`</div><div${_attr_class("
|
|
3665
|
+
_html(`</div><div${_attr_class("_fB")}>`);
|
|
3604
3666
|
_for_of(sessions$1.length > 1 ? sessions$1 : [], (s) => {
|
|
3605
3667
|
const $scope9_id = _scope_id();
|
|
3606
|
-
_html(`<div${_attr_class(["
|
|
3668
|
+
_html(`<div${_attr_class(["_fo", { ["_fd"]: s.id === input.currentTab }])}>`);
|
|
3607
3669
|
_if(() => {
|
|
3608
3670
|
if (renamingId === s.id) {
|
|
3609
3671
|
const $scope11_id = _scope_id();
|
|
3610
3672
|
_html(`<span${_attr_class([
|
|
3611
3673
|
"_s",
|
|
3612
3674
|
phase[sessionPhase(s.state)],
|
|
3613
|
-
"
|
|
3675
|
+
"_fz"
|
|
3614
3676
|
])}></span>${_el_resume($scope11_id, "a", $sg__input_sessions)}`);
|
|
3615
3677
|
_set_serialize_reason({
|
|
3616
3678
|
1: $sg__input_sessions,
|
|
@@ -3620,17 +3682,17 @@ var side_nav_item_default = _template("r", (input) => {
|
|
|
3620
3682
|
icon_agent_default({
|
|
3621
3683
|
agent: activeAgent(s),
|
|
3622
3684
|
size: 13,
|
|
3623
|
-
class: "
|
|
3685
|
+
class: "_fD"
|
|
3624
3686
|
});
|
|
3625
3687
|
_html(`<input${_attr_input_value($scope11_id, "c", renameValue, _resume((_new_renameValue) => {
|
|
3626
3688
|
renameValue = _new_renameValue;
|
|
3627
|
-
}, "
|
|
3628
|
-
_script($scope11_id, "
|
|
3689
|
+
}, "s0", $scope11_id))}${_attr_class("_fA")} aria-label="Session name">${_el_resume($scope11_id, "c")}`);
|
|
3690
|
+
_script($scope11_id, "s8");
|
|
3629
3691
|
_subscribe($renameValue__closures, writeScope($scope11_id, { b: $si__input_sessions && _existing_scope($childScope3) }));
|
|
3630
3692
|
return 0;
|
|
3631
3693
|
} else {
|
|
3632
3694
|
const $scope10_id = _scope_id();
|
|
3633
|
-
_html(`<button${_attr_class("
|
|
3695
|
+
_html(`<button${_attr_class("_fC")}><span${_attr_class(["_s", phase[sessionPhase(s.state)]])}></span>${_el_resume($scope10_id, "b", $sg__input_sessions)}`);
|
|
3634
3696
|
_set_serialize_reason({
|
|
3635
3697
|
1: $sg__input_sessions,
|
|
3636
3698
|
2: $sg__input_sessions
|
|
@@ -3639,12 +3701,12 @@ var side_nav_item_default = _template("r", (input) => {
|
|
|
3639
3701
|
icon_agent_default({
|
|
3640
3702
|
agent: activeAgent(s),
|
|
3641
3703
|
size: 13,
|
|
3642
|
-
class: "
|
|
3704
|
+
class: "_fD"
|
|
3643
3705
|
});
|
|
3644
|
-
_html(`<span${_attr_class("
|
|
3706
|
+
_html(`<span${_attr_class("_fx")}>${_escape(s.title || activeAgent(s))}${_el_resume($scope10_id, "e", $sg__input_sessions)}</span></button>${_el_resume($scope10_id, "a")}<div${_attr_class("_fy")}><button${_attr_class("_fp")} title="Rename session">`);
|
|
3645
3707
|
icon_edit_default({ size: 12 });
|
|
3646
|
-
_html(`</button>${_el_resume($scope10_id, "g")}<button${_attr_class(["
|
|
3647
|
-
_script($scope10_id, "
|
|
3708
|
+
_html(`</button>${_el_resume($scope10_id, "g")}<button${_attr_class(["_fq", { ["_ff"]: armedKill === s.id }])} title=${armedKill === s.id ? "\"Really kill this session?\"" : "\"Kill session\""}>×</button>${_el_resume($scope10_id, "i")}</div>`);
|
|
3709
|
+
_script($scope10_id, "s9");
|
|
3648
3710
|
_subscribe($armedKill__closures, writeScope($scope10_id, { c: $si__input_sessions && _existing_scope($childScope4) }));
|
|
3649
3711
|
return 1;
|
|
3650
3712
|
}
|
|
@@ -3670,7 +3732,7 @@ var side_nav_item_default = _template("r", (input) => {
|
|
|
3670
3732
|
onReviewPr: input.onReviewPr
|
|
3671
3733
|
});
|
|
3672
3734
|
_html(`</div></section>${_el_resume($scope3_id, "a")}`);
|
|
3673
|
-
_script($scope3_id, "
|
|
3735
|
+
_script($scope3_id, "s10");
|
|
3674
3736
|
_subscribe($si__input_workspaces__OR__input_workspaceId && $ws_name__closures, _subscribe($si__input_onReviewPr && $input_onReviewPr__closures, _subscribe($si__input_page && $input_page__closures, _subscribe($si__input_railPop && $input_railPop__closures, _subscribe($si__input_sessions && $input_sessions__closures, _subscribe($si__input_current && $input_current__closures, _subscribe($si__input_workspaceId && $input_workspaceId__closures, writeScope($scope3_id, {
|
|
3675
3737
|
p: $si__input_workspaceId__OR__input_status && sessions$1.length,
|
|
3676
3738
|
q: $si__input_sessions && sessions$1[0],
|
|
@@ -3742,7 +3804,7 @@ var side_nav_item_default = _template("r", (input) => {
|
|
|
3742
3804
|
});
|
|
3743
3805
|
//#endregion
|
|
3744
3806
|
//#region src/tags/icons/icon-folder-plus.marko
|
|
3745
|
-
var icon_folder_plus_default = _template("
|
|
3807
|
+
var icon_folder_plus_default = _template("I", (input) => {
|
|
3746
3808
|
const $scope0_reason = _scope_reason(), $sg__input_size__OR__input_class = _serialize_guard($scope0_reason, 0);
|
|
3747
3809
|
const $scope0_id = _scope_id();
|
|
3748
3810
|
_set_serialize_reason({
|
|
@@ -3759,7 +3821,7 @@ var icon_folder_plus_default = _template("H", (input) => {
|
|
|
3759
3821
|
});
|
|
3760
3822
|
//#endregion
|
|
3761
3823
|
//#region src/tags/icons/icon-sidebar-collapse.marko
|
|
3762
|
-
var icon_sidebar_collapse_default = _template("
|
|
3824
|
+
var icon_sidebar_collapse_default = _template("Q", (input) => {
|
|
3763
3825
|
const $scope0_reason = _scope_reason(), $sg__input_size__OR__input_class = _serialize_guard($scope0_reason, 0);
|
|
3764
3826
|
const $scope0_id = _scope_id();
|
|
3765
3827
|
_set_serialize_reason({
|
|
@@ -3776,7 +3838,7 @@ var icon_sidebar_collapse_default = _template("P", (input) => {
|
|
|
3776
3838
|
});
|
|
3777
3839
|
//#endregion
|
|
3778
3840
|
//#region src/tags/side-nav.marko
|
|
3779
|
-
var side_nav_default = _template("
|
|
3841
|
+
var side_nav_default = _template("t", (input) => {
|
|
3780
3842
|
const $scope0_reason = _scope_reason(), $sg__input_workspace__OR__input_allWorkspaces = _serialize_guard($scope0_reason, 0), $sg__input_workspace__OR__input_allWorkspaces__OR__input_allStatus = _serialize_guard($scope0_reason, 1), $sg__input_agents = _serialize_guard($scope0_reason, 10), $sg__input_workspace = _serialize_guard($scope0_reason, 2), $si__input_workspace = _serialize_if($scope0_reason, 2), $si__input_workspace__OR__input_allWorkspaces = _serialize_if($scope0_reason, 0), $si__input_allStatus = _serialize_if($scope0_reason, 8), $si__input_onSelectWorkspace = _serialize_if($scope0_reason, 9), $si__input_agents = _serialize_if($scope0_reason, 10), $si__input_onNewSession = _serialize_if($scope0_reason, 11), $si__input_onReviewOpened = _serialize_if($scope0_reason, 12), $si__input_sessions = _serialize_if($scope0_reason, 13), $si__input_onRenameSession = _serialize_if($scope0_reason, 14), $si__input_onCloseSession = _serialize_if($scope0_reason, 15);
|
|
3781
3843
|
const $scope0_id = _scope_id();
|
|
3782
3844
|
const $notifyOn__closures = /* @__PURE__ */ new Set();
|
|
@@ -3801,7 +3863,7 @@ var side_nav_default = _template("s", (input) => {
|
|
|
3801
3863
|
let canPush = false;
|
|
3802
3864
|
const leaveNav = _resume(() => {
|
|
3803
3865
|
if (view === "nav") view = "term";
|
|
3804
|
-
}, "
|
|
3866
|
+
}, "t0", $scope0_id);
|
|
3805
3867
|
const toggleNotify = _resume(async () => {
|
|
3806
3868
|
try {
|
|
3807
3869
|
if (notifyOn) {
|
|
@@ -3815,43 +3877,43 @@ var side_nav_default = _template("s", (input) => {
|
|
|
3815
3877
|
notifyOn = false;
|
|
3816
3878
|
input.onError?.(`Notifications failed: ${String(err.message || err)}`);
|
|
3817
3879
|
}
|
|
3818
|
-
}, "
|
|
3880
|
+
}, "t1", $scope0_id);
|
|
3819
3881
|
const itemIds = input.allWorkspaces?.length ? input.allWorkspaces.filter((w) => w.status === "active").map((w) => w.id) : [ws.id];
|
|
3820
3882
|
const workspaces = input.allWorkspaces || [ws];
|
|
3821
3883
|
const allStatus = input.allStatus || {};
|
|
3822
3884
|
allStatus[ws.id];
|
|
3823
3885
|
const isPage = view === "nav";
|
|
3824
|
-
const wsSelected = view !== "
|
|
3886
|
+
const wsSelected = view !== "settings" && view !== "new";
|
|
3825
3887
|
const otherIds = itemIds.filter((id) => id !== ws.id);
|
|
3826
3888
|
const listIds = isPage ? [ws.id, ...otherIds] : itemIds;
|
|
3827
|
-
_html(`<aside${_attr_class(["
|
|
3828
|
-
["
|
|
3829
|
-
["
|
|
3889
|
+
_html(`<aside${_attr_class(["_cq", {
|
|
3890
|
+
["_co"]: !navOpen,
|
|
3891
|
+
["_cp"]: isPage
|
|
3830
3892
|
}])}${_attr("hidden", view === "diff")}>`);
|
|
3831
3893
|
_if(() => {
|
|
3832
3894
|
if (isPage) {
|
|
3833
3895
|
const $scope1_id = _scope_id();
|
|
3834
|
-
_html(`<header${_attr_class("
|
|
3896
|
+
_html(`<header${_attr_class("_ct")}><h1${_attr_class("_cu")}>Workspaces</h1><div${_attr_class("_cv")}>`);
|
|
3835
3897
|
_if(() => {}, $scope1_id, "d", 1, 1, 1, 0, 1);
|
|
3836
3898
|
_html(`<button${_attr_class([
|
|
3837
3899
|
iconBtn$2,
|
|
3838
|
-
"
|
|
3839
|
-
{ ["
|
|
3840
|
-
])} title=
|
|
3841
|
-
|
|
3900
|
+
"_cw",
|
|
3901
|
+
{ ["_cm"]: view === "settings" }
|
|
3902
|
+
])} title=Settings aria-pressed=${view === "settings" ? "true" : "false"}>`);
|
|
3903
|
+
icon_settings_default({ size: 16 });
|
|
3842
3904
|
_html(`</button>${_el_resume($scope1_id, "e")}</div></header>`);
|
|
3843
|
-
_script($scope1_id, "
|
|
3905
|
+
_script($scope1_id, "t18");
|
|
3844
3906
|
writeScope($scope1_id, {});
|
|
3845
3907
|
return 0;
|
|
3846
3908
|
}
|
|
3847
3909
|
}, $scope0_id, "b", 1, 1, 1, 0, 1);
|
|
3848
|
-
_html(`<div${_attr_class("
|
|
3910
|
+
_html(`<div${_attr_class("_cz")}>`);
|
|
3849
3911
|
_for_of(listIds, (wsId) => {
|
|
3850
3912
|
const $scope2_id = _scope_id();
|
|
3851
3913
|
_if(() => {
|
|
3852
3914
|
if (isPage && wsId === ws.id) {
|
|
3853
3915
|
const $scope10_id = _scope_id();
|
|
3854
|
-
_html(`<h2${_attr_class("
|
|
3916
|
+
_html(`<h2${_attr_class("_cx")}>Current</h2>`);
|
|
3855
3917
|
writeScope($scope10_id, {});
|
|
3856
3918
|
return 0;
|
|
3857
3919
|
}
|
|
@@ -3859,7 +3921,7 @@ var side_nav_default = _template("s", (input) => {
|
|
|
3859
3921
|
_if(() => {
|
|
3860
3922
|
if (isPage && wsId !== ws.id && wsId === otherIds[0]) {
|
|
3861
3923
|
const $scope11_id = _scope_id();
|
|
3862
|
-
_html(`<h2${_attr_class("
|
|
3924
|
+
_html(`<h2${_attr_class("_cx")}>Other spaces</h2>`);
|
|
3863
3925
|
writeScope($scope11_id, {});
|
|
3864
3926
|
return 0;
|
|
3865
3927
|
}
|
|
@@ -3902,16 +3964,16 @@ var side_nav_default = _template("s", (input) => {
|
|
|
3902
3964
|
if (wsId !== ws.id) {
|
|
3903
3965
|
leaveNav();
|
|
3904
3966
|
input.onSelectWorkspace?.(wsId);
|
|
3905
|
-
} else if (view === "nav" || view === "manage" || view === "
|
|
3906
|
-
}, "
|
|
3967
|
+
} else if (view === "nav" || view === "manage" || view === "settings" || view === "new") view = "term";
|
|
3968
|
+
}, "t2", $scope2_id),
|
|
3907
3969
|
onManage: _resume(function() {
|
|
3908
3970
|
input.onManage?.(wsId);
|
|
3909
|
-
}, "
|
|
3971
|
+
}, "t3", $scope2_id),
|
|
3910
3972
|
agents: input.agents,
|
|
3911
3973
|
onNewSession: _resume(function(agent) {
|
|
3912
3974
|
leaveNav();
|
|
3913
3975
|
input.onNewSession(wsId, agent);
|
|
3914
|
-
}, "
|
|
3976
|
+
}, "t4", $scope2_id),
|
|
3915
3977
|
onReview: _resume(function() {
|
|
3916
3978
|
if (wsId === ws.id) {
|
|
3917
3979
|
if (view === "diff") view = "term";
|
|
@@ -3920,7 +3982,7 @@ var side_nav_default = _template("s", (input) => {
|
|
|
3920
3982
|
requestDiff(wsId);
|
|
3921
3983
|
input.onSelectWorkspace?.(wsId);
|
|
3922
3984
|
}
|
|
3923
|
-
}, "
|
|
3985
|
+
}, "t5", $scope2_id),
|
|
3924
3986
|
onReviewPr: _resume(function(worktree, number) {
|
|
3925
3987
|
const pr = `${worktree}/${number}`;
|
|
3926
3988
|
if (wsId === ws.id) input.onReviewOpened?.(pr);
|
|
@@ -3928,7 +3990,7 @@ var side_nav_default = _template("s", (input) => {
|
|
|
3928
3990
|
requestDiff(wsId, pr);
|
|
3929
3991
|
input.onSelectWorkspace?.(wsId);
|
|
3930
3992
|
}
|
|
3931
|
-
}, "
|
|
3993
|
+
}, "t6", $scope2_id),
|
|
3932
3994
|
sessions: wsId === ws.id && input.sessions ? input.sessions : allStatus[wsId]?.sessions || [],
|
|
3933
3995
|
currentTab: wsId === ws.id && view === "term" ? tab : null,
|
|
3934
3996
|
onOpenTab: _resume(function(sessionId) {
|
|
@@ -3936,7 +3998,7 @@ var side_nav_default = _template("s", (input) => {
|
|
|
3936
3998
|
tab = sessionId;
|
|
3937
3999
|
view = "term";
|
|
3938
4000
|
} else input.onOpenSession?.(wsId, sessionId);
|
|
3939
|
-
}, "
|
|
4001
|
+
}, "t7", $scope2_id),
|
|
3940
4002
|
onRenameSession: input.onRenameSession,
|
|
3941
4003
|
onCloseSession: input.onCloseSession
|
|
3942
4004
|
});
|
|
@@ -3950,14 +4012,14 @@ var side_nav_default = _template("s", (input) => {
|
|
|
3950
4012
|
const $scope3_id = _scope_id();
|
|
3951
4013
|
let railHover = null;
|
|
3952
4014
|
const railHoverBox = { timer: 0 };
|
|
3953
|
-
const railKeep = _resume(() => clearTimeout(railHoverBox.timer), "
|
|
4015
|
+
const railKeep = _resume(() => clearTimeout(railHoverBox.timer), "t8", $scope3_id);
|
|
3954
4016
|
const railHide = _resume(() => {
|
|
3955
4017
|
clearTimeout(railHoverBox.timer);
|
|
3956
4018
|
railHoverBox.timer = setTimeout(() => {
|
|
3957
4019
|
railHover = null;
|
|
3958
4020
|
}, 150);
|
|
3959
|
-
}, "
|
|
3960
|
-
_html(`<div${_attr_class("
|
|
4021
|
+
}, "t9", $scope3_id);
|
|
4022
|
+
_html(`<div${_attr_class("_cA")}>`);
|
|
3961
4023
|
_for_of(itemIds, (wsId, i) => {
|
|
3962
4024
|
const $scope4_id = _scope_id();
|
|
3963
4025
|
_html("<span>");
|
|
@@ -3989,11 +4051,11 @@ var side_nav_default = _template("s", (input) => {
|
|
|
3989
4051
|
current: wsSelected && wsId === ws.id,
|
|
3990
4052
|
onSelect: _resume(function() {
|
|
3991
4053
|
if (wsId !== ws.id) input.onSelectWorkspace?.(wsId);
|
|
3992
|
-
else if (view === "manage" || view === "
|
|
3993
|
-
}, "
|
|
4054
|
+
else if (view === "manage" || view === "settings" || view === "new") view = "term";
|
|
4055
|
+
}, "t10", $scope4_id)
|
|
3994
4056
|
});
|
|
3995
4057
|
_html(`</span>${_el_resume($scope4_id, "a")}`);
|
|
3996
|
-
_script($scope4_id, "
|
|
4058
|
+
_script($scope4_id, "t19");
|
|
3997
4059
|
_subscribe($wsSelected__closures, _subscribe($si__input_allStatus && $allStatus__closures, _subscribe($si__input_workspace__OR__input_allWorkspaces && $workspaces__closures, _subscribe($si__input_workspace && $ws_id__closures, writeScope($scope4_id, {
|
|
3998
4060
|
d: wsId,
|
|
3999
4061
|
_: _scope_with_id($scope3_id),
|
|
@@ -4004,7 +4066,7 @@ var side_nav_default = _template("s", (input) => {
|
|
|
4004
4066
|
if (railHover) {
|
|
4005
4067
|
const $scope5_id = _scope_id();
|
|
4006
4068
|
const hoverId = railHover.id;
|
|
4007
|
-
_html(`<div${_attr_class("
|
|
4069
|
+
_html(`<div${_attr_class("_cD")}${_attr_style(`top:${railHover.top}px;left:${railHover.left}px`)}>`);
|
|
4008
4070
|
_set_serialize_reason({
|
|
4009
4071
|
0: 1,
|
|
4010
4072
|
1: 1,
|
|
@@ -4041,17 +4103,17 @@ var side_nav_default = _template("s", (input) => {
|
|
|
4041
4103
|
onSelect: _resume(function() {
|
|
4042
4104
|
railHover = null;
|
|
4043
4105
|
if (hoverId !== ws.id) input.onSelectWorkspace?.(hoverId);
|
|
4044
|
-
else if (view === "manage" || view === "
|
|
4045
|
-
}, "
|
|
4106
|
+
else if (view === "manage" || view === "settings" || view === "new") view = "term";
|
|
4107
|
+
}, "t11", $scope5_id),
|
|
4046
4108
|
onManage: _resume(function() {
|
|
4047
4109
|
railHover = null;
|
|
4048
4110
|
input.onManage?.(hoverId);
|
|
4049
|
-
}, "
|
|
4111
|
+
}, "t12", $scope5_id),
|
|
4050
4112
|
agents: input.agents,
|
|
4051
4113
|
onNewSession: _resume(function(agent) {
|
|
4052
4114
|
railHover = null;
|
|
4053
4115
|
input.onNewSession(hoverId, agent);
|
|
4054
|
-
}, "
|
|
4116
|
+
}, "t13", $scope5_id),
|
|
4055
4117
|
onReview: _resume(function() {
|
|
4056
4118
|
railHover = null;
|
|
4057
4119
|
if (hoverId === ws.id) {
|
|
@@ -4061,7 +4123,7 @@ var side_nav_default = _template("s", (input) => {
|
|
|
4061
4123
|
requestDiff(hoverId);
|
|
4062
4124
|
input.onSelectWorkspace?.(hoverId);
|
|
4063
4125
|
}
|
|
4064
|
-
}, "
|
|
4126
|
+
}, "t14", $scope5_id),
|
|
4065
4127
|
onReviewPr: _resume(function(worktree, number) {
|
|
4066
4128
|
railHover = null;
|
|
4067
4129
|
const pr = `${worktree}/${number}`;
|
|
@@ -4070,7 +4132,7 @@ var side_nav_default = _template("s", (input) => {
|
|
|
4070
4132
|
requestDiff(hoverId, pr);
|
|
4071
4133
|
input.onSelectWorkspace?.(hoverId);
|
|
4072
4134
|
}
|
|
4073
|
-
}, "
|
|
4135
|
+
}, "t15", $scope5_id),
|
|
4074
4136
|
sessions: hoverId === ws.id && input.sessions ? input.sessions : allStatus[hoverId]?.sessions || [],
|
|
4075
4137
|
currentTab: hoverId === ws.id && view === "term" ? tab : null,
|
|
4076
4138
|
onOpenTab: _resume(function(sessionId) {
|
|
@@ -4079,12 +4141,12 @@ var side_nav_default = _template("s", (input) => {
|
|
|
4079
4141
|
tab = sessionId;
|
|
4080
4142
|
view = "term";
|
|
4081
4143
|
} else input.onOpenSession?.(hoverId, sessionId);
|
|
4082
|
-
}, "
|
|
4144
|
+
}, "t16", $scope5_id),
|
|
4083
4145
|
onRenameSession: input.onRenameSession,
|
|
4084
4146
|
onCloseSession: input.onCloseSession
|
|
4085
4147
|
});
|
|
4086
4148
|
_html(`</div>${_el_resume($scope5_id, "a")}`);
|
|
4087
|
-
_script($scope5_id, "
|
|
4149
|
+
_script($scope5_id, "t20");
|
|
4088
4150
|
_subscribe($wsSelected__closures, _subscribe($si__input_allStatus && $allStatus__closures, _subscribe($si__input_workspace__OR__input_allWorkspaces && $workspaces__closures, _subscribe($view__closures, _subscribe($tab__closures, _subscribe($si__input_workspace && $ws_id__closures, _subscribe($si__input_onCloseSession && $input_onCloseSession__closures, _subscribe($si__input_onRenameSession && $input_onRenameSession__closures, _subscribe($si__input_sessions && $input_sessions__closures, _subscribe($si__input_onReviewOpened && $input_onReviewOpened__closures, _subscribe($si__input_onNewSession && $input_onNewSession__closures, _subscribe($si__input_agents && $input_agents__closures, _subscribe($si__input_onSelectWorkspace && $input_onSelectWorkspace__closures, writeScope($scope5_id, {
|
|
4089
4151
|
c: hoverId,
|
|
4090
4152
|
b: _existing_scope($childScope3),
|
|
@@ -4107,14 +4169,14 @@ var side_nav_default = _template("s", (input) => {
|
|
|
4107
4169
|
return 0;
|
|
4108
4170
|
}
|
|
4109
4171
|
}, $scope0_id, "d");
|
|
4110
|
-
_html(`<div${_attr_class("
|
|
4172
|
+
_html(`<div${_attr_class("_cB")}>`);
|
|
4111
4173
|
_if(() => {
|
|
4112
4174
|
if (isPage) {
|
|
4113
4175
|
const $scope6_id = _scope_id();
|
|
4114
|
-
_html(`<button${_attr_class(["
|
|
4176
|
+
_html(`<button${_attr_class(["_cy", { ["_cm"]: view === "new" }])} title="New workspace" aria-pressed=${view === "new" ? "true" : "false"}>`);
|
|
4115
4177
|
icon_folder_plus_default({ size: 16 });
|
|
4116
4178
|
_html(` New workspace</button>${_el_resume($scope6_id, "a")}`);
|
|
4117
|
-
_script($scope6_id, "
|
|
4179
|
+
_script($scope6_id, "t21");
|
|
4118
4180
|
writeScope($scope6_id, {});
|
|
4119
4181
|
return 0;
|
|
4120
4182
|
} else {
|
|
@@ -4133,21 +4195,21 @@ var side_nav_default = _template("s", (input) => {
|
|
|
4133
4195
|
return 1;
|
|
4134
4196
|
}
|
|
4135
4197
|
}, $scope7_id, "a", 1, 1, 1, "</button>", 1);
|
|
4136
|
-
_html(`<div${_attr_class(["_r", "
|
|
4198
|
+
_html(`<div${_attr_class(["_r", "_cC"])}></div>`);
|
|
4137
4199
|
_if(() => {}, $scope7_id, "c", 1, 1, 1, 0, 1);
|
|
4138
|
-
_html(`<button${_attr_class([iconBtn$2, { ["
|
|
4139
|
-
|
|
4140
|
-
_html(`</button>${_el_resume($scope7_id, "d")}<button${_attr_class([iconBtn$2, { ["
|
|
4200
|
+
_html(`<button${_attr_class([iconBtn$2, { ["_cm"]: view === "settings" }])} title=Settings aria-pressed=${view === "settings" ? "true" : "false"}>`);
|
|
4201
|
+
icon_settings_default({ size: 15 });
|
|
4202
|
+
_html(`</button>${_el_resume($scope7_id, "d")}<button${_attr_class([iconBtn$2, { ["_cm"]: view === "new" }])} title="New workspace" aria-pressed=${view === "new" ? "true" : "false"}>`);
|
|
4141
4203
|
icon_folder_plus_default({ size: 16 });
|
|
4142
4204
|
_html(`</button>${_el_resume($scope7_id, "f")}`);
|
|
4143
|
-
_script($scope7_id, "
|
|
4205
|
+
_script($scope7_id, "t23");
|
|
4144
4206
|
writeScope($scope7_id, {});
|
|
4145
4207
|
return 1;
|
|
4146
4208
|
}
|
|
4147
4209
|
}, $scope0_id, "e", 1, 1, 1, "</div>");
|
|
4148
4210
|
_html(`</aside>${_el_resume($scope0_id, "a")}`);
|
|
4149
|
-
_script($scope0_id, "
|
|
4150
|
-
_script($scope0_id, "
|
|
4211
|
+
_script($scope0_id, "t24");
|
|
4212
|
+
_script($scope0_id, "t25");
|
|
4151
4213
|
writeScope($scope0_id, {
|
|
4152
4214
|
i: _serialize_if($scope0_reason, 4) && input.tab,
|
|
4153
4215
|
j: _serialize_if($scope0_reason, 3) && input.tabChange,
|
|
@@ -4156,7 +4218,7 @@ var side_nav_default = _template("s", (input) => {
|
|
|
4156
4218
|
o: input.onError,
|
|
4157
4219
|
p: input.active,
|
|
4158
4220
|
q: $si__input_workspace && input.allWorkspaces,
|
|
4159
|
-
s: input.
|
|
4221
|
+
s: input.onSettings,
|
|
4160
4222
|
t: input.onSelectWorkspace,
|
|
4161
4223
|
u: input.onManage,
|
|
4162
4224
|
v: input.agents,
|
|
@@ -4202,11 +4264,9 @@ var side_nav_default = _template("s", (input) => {
|
|
|
4202
4264
|
});
|
|
4203
4265
|
_resume_branch($scope0_id);
|
|
4204
4266
|
});
|
|
4205
|
-
|
|
4206
|
-
|
|
4207
|
-
var
|
|
4208
|
-
var pageMeta = "_cl _V";
|
|
4209
|
-
var iconBtn$1 = "_cO _A";
|
|
4267
|
+
var iconBtn$1 = "_b7 _B";
|
|
4268
|
+
var content$1 = "_b9 _R";
|
|
4269
|
+
var pageMeta = "_b_ _W";
|
|
4210
4270
|
//#endregion
|
|
4211
4271
|
//#region src/tags/manage-workspace.marko
|
|
4212
4272
|
var api$3;
|
|
@@ -4300,16 +4360,16 @@ var manage_workspace_default = _template("k", (input) => {
|
|
|
4300
4360
|
setTimeout(() => loadProcs(void 0), 500);
|
|
4301
4361
|
}, "k5", $scope0_id);
|
|
4302
4362
|
const titleId = _id();
|
|
4303
|
-
_html(`<div${_attr_class("
|
|
4363
|
+
_html(`<div${_attr_class("_P")} role=region${_attr("aria-labelledby", titleId)}><div${_attr_class("_Q")}><div${_attr_class(content$1)}><header${_attr_class("_T")}><div${_attr_class("_V")}><h1${_attr("id", titleId)}${_attr_class("_U")}>Manage</h1><p${_attr_class(pageMeta)}${_attr("title", ws.display_path || ws.path)}><span${_attr_class("_ca")}>${_escape(ws.name)}${_el_resume($scope0_id, "i")}</span>`);
|
|
4304
4364
|
_if(() => {
|
|
4305
4365
|
if (ws.status !== "active") {
|
|
4306
4366
|
const $scope10_id = _scope_id();
|
|
4307
|
-
_html(`<span${_attr_class(["
|
|
4367
|
+
_html(`<span${_attr_class(["_cd", "_ce"])}>Archived</span>`);
|
|
4308
4368
|
writeScope($scope10_id, {});
|
|
4309
4369
|
return 0;
|
|
4310
4370
|
}
|
|
4311
4371
|
}, $scope0_id, "j", 1, 1, 1, 0, 1);
|
|
4312
|
-
_html(`<span${_attr_class("
|
|
4372
|
+
_html(`<span${_attr_class("_cb")} aria-hidden=true>·</span><span${_attr_class(["_cc", "_q"])}>${_escape(ws.display_path || ws.path)}${_el_resume($scope0_id, "m")}</span></p>${_el_resume($scope0_id, "g")}</div></header>`);
|
|
4313
4373
|
_if(() => {
|
|
4314
4374
|
if (error) {
|
|
4315
4375
|
const $scope2_id = _scope_id();
|
|
@@ -4333,26 +4393,26 @@ var manage_workspace_default = _template("k", (input) => {
|
|
|
4333
4393
|
_if(() => {
|
|
4334
4394
|
if (pendingAction && actionStep) {
|
|
4335
4395
|
const $scope7_id = _scope_id();
|
|
4336
|
-
_html(`<p${_attr_class("
|
|
4396
|
+
_html(`<p${_attr_class("_bR")}><span${_attr_class("_y")}></span><!>${_escape(actionStep)}${_el_resume($scope7_id, "c")}</p>`);
|
|
4337
4397
|
writeScope($scope7_id, {});
|
|
4338
4398
|
return 0;
|
|
4339
4399
|
}
|
|
4340
4400
|
}, $scope0_id, "o", 1, 1, 1, 0, 1);
|
|
4341
|
-
_html(`<section${_attr_class("
|
|
4401
|
+
_html(`<section${_attr_class("_bS")}><div${_attr_class("_bT")}><h2${_attr_class("_b8")}>Repos</h2><span${_attr_class("_bU")}>${_escape(ws.repos.length)}${_el_resume($scope0_id, "t")}</span><div${_attr_class("_r")}></div><button${_attr_class(iconBtn$1)} title="Refresh repo list" aria-label="Refresh repo list"${_attr("disabled", catalogRefreshing)}>`);
|
|
4342
4402
|
_set_serialize_reason(1);
|
|
4343
4403
|
const $childScope = _peek_scope_id();
|
|
4344
4404
|
icon_refresh_default({
|
|
4345
4405
|
size: 14,
|
|
4346
4406
|
class: catalogRefreshing && "_x"
|
|
4347
4407
|
});
|
|
4348
|
-
_html(`</button>${_el_resume($scope0_id, "v")}</div><ul${_attr_class("
|
|
4408
|
+
_html(`</button>${_el_resume($scope0_id, "v")}</div><ul${_attr_class("_bV")}>`);
|
|
4349
4409
|
_for_of(ws.repos, (row) => {
|
|
4350
4410
|
const $scope1_id = _scope_id();
|
|
4351
|
-
_html(`<li${_attr_class("
|
|
4411
|
+
_html(`<li${_attr_class("_bX")}><div${_attr_class("_bY")}><span${_attr_class(["_bZ", "_q"])}>${_escape(row.worktree)}${_el_resume($scope1_id, "d")}/</span><span${_attr_class("_b0")}><a${_attr_class(["_b1", "_cg"])}${_attr("href", `https://github.com/${row.full_name}`)} target=_blank rel=noopener${_attr("title", `Open ${row.full_name} on GitHub`)}>${_escape(row.full_name)}${_el_resume($scope1_id, "g")}</a>${_el_resume($scope1_id, "f")}`);
|
|
4352
4412
|
_if(() => {
|
|
4353
4413
|
if (row.base_branch !== row.default_branch) {
|
|
4354
4414
|
const $scope11_id = _scope_id();
|
|
4355
|
-
_html(`<span${_attr_class(["
|
|
4415
|
+
_html(`<span${_attr_class(["_b2", "_q"])} title="Base branch">⎇ <!>${_escape(row.base_branch)}${_el_resume($scope11_id, "b")}</span>`);
|
|
4356
4416
|
writeScope($scope11_id, {});
|
|
4357
4417
|
return 0;
|
|
4358
4418
|
}
|
|
@@ -4367,9 +4427,9 @@ var manage_workspace_default = _template("k", (input) => {
|
|
|
4367
4427
|
} else {
|
|
4368
4428
|
const $scope6_id = _scope_id();
|
|
4369
4429
|
_html(`<button${_attr_class([
|
|
4370
|
-
"
|
|
4371
|
-
"
|
|
4372
|
-
{ ["
|
|
4430
|
+
"_b3",
|
|
4431
|
+
"_b5",
|
|
4432
|
+
{ ["_b4"]: confirmingRemove === row.full_name }
|
|
4373
4433
|
])}${confirmingRemove === row.full_name ? _attr("title", `Really remove ${row.worktree}/? Uncommitted changes are lost.`) : _attr("title", `Remove ${row.worktree}/`)}>${confirmingRemove === row.full_name ? "Remove?" : "×"}${_el_resume($scope6_id, "b")}</button>${_el_resume($scope6_id, "a")}`);
|
|
4374
4434
|
_script($scope6_id, "k11");
|
|
4375
4435
|
_subscribe($confirmingRemove__closures, writeScope($scope6_id, {}));
|
|
@@ -4386,19 +4446,19 @@ var manage_workspace_default = _template("k", (input) => {
|
|
|
4386
4446
|
}, "full_name", $scope0_id, "y", 1, 1, 1, 0, 1);
|
|
4387
4447
|
_for_of([...busy].filter((n) => !inWorkspace.has(n)), (name) => {
|
|
4388
4448
|
const $scope13_id = _scope_id();
|
|
4389
|
-
_html(`<li${_attr_class(["
|
|
4449
|
+
_html(`<li${_attr_class(["_bX", "_bW"])}><span${_attr_class("_y")}></span><div${_attr_class("_bY")}><span${_attr_class("_b1")}>Adding <!>${_escape(name)}${_el_resume($scope13_id, "e")}…</span></div></li>`);
|
|
4390
4450
|
writeScope($scope13_id, {});
|
|
4391
4451
|
}, (n) => n, $scope0_id, "z", 1, 1, 1, 0, 1);
|
|
4392
4452
|
_html("</ul>");
|
|
4393
4453
|
_if(() => {
|
|
4394
4454
|
if (!ws.repos.length && !busy.size) {
|
|
4395
4455
|
const $scope14_id = _scope_id();
|
|
4396
|
-
_html(`<p${_attr_class("
|
|
4456
|
+
_html(`<p${_attr_class("_b6")}>No repos yet — search below to add one.</p>`);
|
|
4397
4457
|
writeScope($scope14_id, {});
|
|
4398
4458
|
return 0;
|
|
4399
4459
|
}
|
|
4400
4460
|
}, $scope0_id, "a0", 1, 1, 1, 0, 1);
|
|
4401
|
-
_html(`<div${_attr_class("
|
|
4461
|
+
_html(`<div${_attr_class("_cf")}>`);
|
|
4402
4462
|
const $childScope2 = _peek_scope_id();
|
|
4403
4463
|
let refreshCatalog = repo_picker_default({
|
|
4404
4464
|
exclude: inWorkspace,
|
|
@@ -4418,17 +4478,17 @@ var manage_workspace_default = _template("k", (input) => {
|
|
|
4418
4478
|
_if(() => {
|
|
4419
4479
|
if (running.length) {
|
|
4420
4480
|
const $scope8_id = _scope_id();
|
|
4421
|
-
_html(`<section${_attr_class("
|
|
4481
|
+
_html(`<section${_attr_class("_bS")}><div${_attr_class("_bT")}><h2${_attr_class("_b8")}>Running</h2><span${_attr_class("_bU")}>${_escape(running.length)}${_el_resume($scope8_id, "e")}</span></div><ul${_attr_class("_bV")}>`);
|
|
4422
4482
|
_for_of(running, (p) => {
|
|
4423
4483
|
const $scope9_id = _scope_id();
|
|
4424
|
-
_html(`<li${_attr_class("
|
|
4484
|
+
_html(`<li${_attr_class("_bX")}><div${_attr_class("_bY")}${_attr("title", p.args)}><span${_attr_class(["_bZ", "_q"])}>${_escape(p.cmd)}${_el_resume($scope9_id, "d")}</span>`);
|
|
4425
4485
|
_if(() => {
|
|
4426
4486
|
if (p.ports.length) {
|
|
4427
4487
|
const $scope15_id = _scope_id();
|
|
4428
|
-
_html(`<span${_attr_class("
|
|
4488
|
+
_html(`<span${_attr_class("_b0")}>`);
|
|
4429
4489
|
_for_of(p.ports, (port) => {
|
|
4430
4490
|
const $scope16_id = _scope_id();
|
|
4431
|
-
_html(`<button${_attr_class(["_l", "
|
|
4491
|
+
_html(`<button${_attr_class(["_l", "_ch"])}${_attr("title", `Open http://${typeof location === "undefined" ? "localhost" : location.hostname}:${port}`)}>:<!>${_escape(port)}${_el_resume($scope16_id, "b")}</button>${_el_resume($scope16_id, "a")}`);
|
|
4432
4492
|
_script($scope16_id, "k13");
|
|
4433
4493
|
writeScope($scope16_id, { d: port });
|
|
4434
4494
|
}, (x) => String(x), $scope15_id, "a", 1, 1, 1, "</span>", 1);
|
|
@@ -4436,7 +4496,7 @@ var manage_workspace_default = _template("k", (input) => {
|
|
|
4436
4496
|
return 0;
|
|
4437
4497
|
}
|
|
4438
4498
|
}, $scope9_id, "e", 1, 1, 1, 0, 1);
|
|
4439
|
-
_html(`</div>${_el_resume($scope9_id, "b")}<button${_attr_class(["
|
|
4499
|
+
_html(`</div>${_el_resume($scope9_id, "b")}<button${_attr_class(["_b3", "_b5"])} type=button${_attr("title", `Kill ${p.pid}`)}${_attr("aria-label", `Kill process ${p.pid}`)}>×</button>${_el_resume($scope9_id, "f")}</li>`);
|
|
4440
4500
|
_script($scope9_id, "k14");
|
|
4441
4501
|
writeScope($scope9_id, {
|
|
4442
4502
|
k: p?.ports,
|
|
@@ -4448,17 +4508,17 @@ var manage_workspace_default = _template("k", (input) => {
|
|
|
4448
4508
|
return 0;
|
|
4449
4509
|
}
|
|
4450
4510
|
}, $scope0_id, "a4", 1, 1, 1, 0, 1);
|
|
4451
|
-
_html(`<section${_attr_class(["
|
|
4511
|
+
_html(`<section${_attr_class(["_bS", "_ci"])}><div${_attr_class("_bT")}><h2${_attr_class("_b8")}>Workspace</h2></div><div${_attr_class("_cj")}>`);
|
|
4452
4512
|
_if(() => {
|
|
4453
4513
|
if (ws.status === "active") {
|
|
4454
4514
|
const $scope4_id = _scope_id();
|
|
4455
|
-
_html(`<button type=button${_attr_class(["_h", "
|
|
4515
|
+
_html(`<button type=button${_attr_class(["_h", "_ck"])}${_attr("disabled", !!pendingAction)}>${pendingAction === "archive" ? "Archiving…" : "Archive"}${_el_resume($scope4_id, "b")}</button>${_el_resume($scope4_id, "a")}`);
|
|
4456
4516
|
_script($scope4_id, "k15");
|
|
4457
4517
|
writeScope($scope4_id, {});
|
|
4458
4518
|
return 0;
|
|
4459
4519
|
} else {
|
|
4460
4520
|
const $scope5_id = _scope_id();
|
|
4461
|
-
_html(`<button type=button${_attr_class(["_h", "
|
|
4521
|
+
_html(`<button type=button${_attr_class(["_h", "_ck"])}${_attr("disabled", !!pendingAction)}>Restore</button>${_el_resume($scope5_id, "a")}`);
|
|
4462
4522
|
_script($scope5_id, "k16");
|
|
4463
4523
|
writeScope($scope5_id, {});
|
|
4464
4524
|
return 1;
|
|
@@ -4467,9 +4527,9 @@ var manage_workspace_default = _template("k", (input) => {
|
|
|
4467
4527
|
_html(`<button type=button${_attr_class([
|
|
4468
4528
|
"_h",
|
|
4469
4529
|
"_k",
|
|
4470
|
-
"
|
|
4530
|
+
"_ck",
|
|
4471
4531
|
{ ["_j"]: confirmingDelete }
|
|
4472
|
-
])}${_attr("disabled", !!pendingAction)}>${pendingAction === "delete" ? "Deleting…" : "Delete"}${_el_resume($scope0_id, "ab")}</button>${_el_resume($scope0_id, "aa")}</div><p${_attr_class("
|
|
4532
|
+
])}${_attr("disabled", !!pendingAction)}>${pendingAction === "delete" ? "Deleting…" : "Delete"}${_el_resume($scope0_id, "ab")}</button>${_el_resume($scope0_id, "aa")}</div><p${_attr_class("_cl")}>Archive hides the space from the list. Delete removes it and its worktrees.</p></section></div></div></div>`);
|
|
4473
4533
|
_script($scope0_id, "k17");
|
|
4474
4534
|
_script($scope0_id, "k18");
|
|
4475
4535
|
writeScope($scope0_id, {
|
|
@@ -4505,12 +4565,14 @@ var manage_workspace_default = _template("k", (input) => {
|
|
|
4505
4565
|
_resume_branch($scope0_id);
|
|
4506
4566
|
});
|
|
4507
4567
|
//#endregion
|
|
4508
|
-
//#region src/tags/
|
|
4509
|
-
var content = "
|
|
4510
|
-
var
|
|
4568
|
+
//#region src/tags/settings-page.css.ts
|
|
4569
|
+
var content = "_dg _R _S";
|
|
4570
|
+
var agentGrid = "_dk _bV";
|
|
4571
|
+
var defaultTag = "_dq _b2";
|
|
4572
|
+
var toolGrid = "_dx _bV";
|
|
4573
|
+
var iconBtn = "_b7 _B";
|
|
4511
4574
|
//#endregion
|
|
4512
|
-
//#region src/tags/usage-
|
|
4513
|
-
var api$2;
|
|
4575
|
+
//#region src/tags/usage-meters.marko
|
|
4514
4576
|
function duration(ms) {
|
|
4515
4577
|
const m = Math.round(ms / 6e4);
|
|
4516
4578
|
if (m < 60) return `${m}m`;
|
|
@@ -4524,127 +4586,985 @@ function resetLabel(iso, stale) {
|
|
|
4524
4586
|
if (ms <= 0) return stale ? null : "now";
|
|
4525
4587
|
return duration(ms);
|
|
4526
4588
|
}
|
|
4527
|
-
var
|
|
4528
|
-
const $scope0_reason = _scope_reason(), $
|
|
4589
|
+
var usage_meters_default = _template("x", (input) => {
|
|
4590
|
+
const $scope0_reason = _scope_reason(), $sg__input_agent__OR__input_hideName = _serialize_guard($scope0_reason, 0), $sg__input_agent = _serialize_guard($scope0_reason, 1), $si__input_agent = _serialize_if($scope0_reason, 1), $sg__input_hideName = _serialize_guard($scope0_reason, 2), $si__input_agent__OR__input_hideName = _serialize_if($scope0_reason, 0);
|
|
4591
|
+
const $scope0_id = _scope_id();
|
|
4592
|
+
const agent = input.agent;
|
|
4593
|
+
_html(`<div${_attr_class(["_eO", { ["_eP"]: input.hideName }])}><div${_attr_class("_eQ")}>`);
|
|
4594
|
+
_if(() => {
|
|
4595
|
+
if (!input.hideName) {
|
|
4596
|
+
const $scope1_id = _scope_id();
|
|
4597
|
+
_html(`<strong${_attr_class("_e9")}>${_escape(agent.agent)}${_el_resume($scope1_id, "b", $sg__input_agent)}</strong>`);
|
|
4598
|
+
$si__input_agent__OR__input_hideName && writeScope($scope1_id, { _: $si__input_agent && _scope_with_id($scope0_id) });
|
|
4599
|
+
return 0;
|
|
4600
|
+
}
|
|
4601
|
+
}, $scope0_id, "c", $sg__input_agent__OR__input_hideName, $sg__input_hideName, $sg__input_agent__OR__input_hideName, 0, 1);
|
|
4602
|
+
_if(() => {
|
|
4603
|
+
if (agent.plan) {
|
|
4604
|
+
const $scope2_id = _scope_id();
|
|
4605
|
+
_html(`<span${_attr_class("_eR")}>${_escape(agent.plan.replace(/^default_/, "").replaceAll("_", " "))}${_el_resume($scope2_id, "b", $sg__input_agent)}</span>`);
|
|
4606
|
+
$si__input_agent && writeScope($scope2_id, { _: _scope_with_id($scope0_id) });
|
|
4607
|
+
return 0;
|
|
4608
|
+
}
|
|
4609
|
+
}, $scope0_id, "d", $sg__input_agent, $sg__input_agent, $sg__input_agent__OR__input_hideName, 0, 1);
|
|
4610
|
+
_if(() => {
|
|
4611
|
+
if (agent.stale_seconds != null) {
|
|
4612
|
+
const $scope3_id = _scope_id();
|
|
4613
|
+
_html(`<span${_attr_class("_eS")}${_attr("title", `${agent.note || "couldn't reach this provider"} — these are the last cached numbers, ${duration(agent.stale_seconds * 1e3)} old`)}>⚠ ${_sep($sg__input_agent)}${_escape(duration(agent.stale_seconds * 1e3))}${_el_resume($scope3_id, "b", $sg__input_agent)} old</span>${_el_resume($scope3_id, "a", $sg__input_agent)}`);
|
|
4614
|
+
$si__input_agent && writeScope($scope3_id, { _: _scope_with_id($scope0_id) });
|
|
4615
|
+
return 0;
|
|
4616
|
+
}
|
|
4617
|
+
}, $scope0_id, "e", $sg__input_agent, $sg__input_agent, $sg__input_agent__OR__input_hideName, 0, 1);
|
|
4618
|
+
_html(`</div><div${_attr_class(["_eT", { ["_e_"]: agent.stale_seconds != null }])}>`);
|
|
4619
|
+
_for_of(agent.windows || [], (win) => {
|
|
4620
|
+
const $scope4_id = _scope_id();
|
|
4621
|
+
const pct = Math.round(win.used_percent);
|
|
4622
|
+
const label = resetLabel(win.resets_at, agent.stale_seconds != null);
|
|
4623
|
+
const fillClass = win.used_percent >= 90 ? "_e2" : win.used_percent >= 70 ? "_e1" : win.used_percent >= 40 ? "_e0" : "_eZ";
|
|
4624
|
+
const pctClass = win.used_percent >= 90 ? "_e7" : win.used_percent >= 70 ? "_e6" : win.used_percent >= 40 ? "_e5" : "_e4";
|
|
4625
|
+
_html(`<div${_attr_class("_eV")}${_attr("title", `${win.window}: ${pct}% used${win.resets_at ? ` — resets ${new Date(win.resets_at).toLocaleString()}` : ""}`)}><span${_attr_class("_eW")}>${_escape(win.window)}${_el_resume($scope4_id, "c", $sg__input_agent)}</span><span${_attr_class("_eX")}><span${_attr_class(["_eY", fillClass])}${_attr_style(`width:${Math.min(100, Math.max(2, win.used_percent))}%`)}></span>${_el_resume($scope4_id, "e", $sg__input_agent)}</span><span${_attr_class(["_e3", pctClass])}>${_escape(pct)}${_el_resume($scope4_id, "g", $sg__input_agent)}%</span>${_el_resume($scope4_id, "f", $sg__input_agent)}<span${_attr_class("_e8")}>${label ? `↻ ${_escape(`${_to_text(label)}`)}` : ""}${_el_resume($scope4_id, "i", $sg__input_agent)}</span></div>${_el_resume($scope4_id, "a", $sg__input_agent)}`);
|
|
4626
|
+
$si__input_agent && writeScope($scope4_id, { _: _scope_with_id($scope0_id) });
|
|
4627
|
+
}, "window", $scope0_id, "g", $sg__input_agent, $sg__input_agent, $sg__input_agent, 0, 1);
|
|
4628
|
+
_if(() => {
|
|
4629
|
+
if (agent.note) {
|
|
4630
|
+
const $scope5_id = _scope_id();
|
|
4631
|
+
_html(`<p${_attr_class("_eU")}>${_escape(agent.note)}${_el_resume($scope5_id, "b", $sg__input_agent)}</p>`);
|
|
4632
|
+
$si__input_agent && writeScope($scope5_id, { _: _scope_with_id($scope0_id) });
|
|
4633
|
+
return 0;
|
|
4634
|
+
}
|
|
4635
|
+
}, $scope0_id, "h", $sg__input_agent, $sg__input_agent, $sg__input_agent__OR__input_hideName, 0, 1);
|
|
4636
|
+
_html(`</div>${_el_resume($scope0_id, "f", $sg__input_agent)}</div>${_el_resume($scope0_id, "a", $sg__input_hideName)}`);
|
|
4637
|
+
$si__input_agent__OR__input_hideName && writeScope($scope0_id, {
|
|
4638
|
+
n: _serialize_if($scope0_reason, 2) && agent?.agent,
|
|
4639
|
+
o: $si__input_agent && agent?.plan,
|
|
4640
|
+
p: $si__input_agent && agent?.stale_seconds,
|
|
4641
|
+
q: $si__input_agent && agent?.note
|
|
4642
|
+
});
|
|
4643
|
+
});
|
|
4644
|
+
//#endregion
|
|
4645
|
+
//#region src/tags/dialog-close.marko
|
|
4646
|
+
var dialog_close_default = _template("c", (input) => {
|
|
4647
|
+
const $scope0_reason = _scope_reason();
|
|
4648
|
+
const $scope0_id = _scope_id();
|
|
4649
|
+
const { content, ...htmlInput } = input;
|
|
4650
|
+
_html(`<button${_attrs({
|
|
4651
|
+
type: "submit",
|
|
4652
|
+
...htmlInput
|
|
4653
|
+
}, "a", $scope0_id, "button")}>`);
|
|
4654
|
+
_dynamic_tag($scope0_id, "b", content, {}, 0, 0, _serialize_guard($scope0_reason, 0));
|
|
4655
|
+
_html(`</button>${_el_resume($scope0_id, "a")}`);
|
|
4656
|
+
_script($scope0_id, "c0");
|
|
4657
|
+
writeScope($scope0_id, {});
|
|
4658
|
+
});
|
|
4659
|
+
//#endregion
|
|
4660
|
+
//#region src/tags/modal-view.marko
|
|
4661
|
+
var modal_view_default = _template("l", (input) => {
|
|
4662
|
+
const $scope0_reason = _scope_reason(), $si__input_openChange__OR__input_footer = _serialize_if($scope0_reason, 1), $sg__input_openChange__OR__input_footer = _serialize_guard($scope0_reason, 1), $si__input_openChange = _serialize_if($scope0_reason, 5);
|
|
4663
|
+
const $scope0_id = _scope_id();
|
|
4664
|
+
const { label, class: inputClass, open: _open, openChange: _openChange, dismissable: _dismissable, content, footer, closedby: _closedby, onCancel: _onCancel, onClose: _onClose, "aria-label": inputAriaLabel, "aria-labelledby": inputLabelledBy, ...htmlInput } = input;
|
|
4665
|
+
const dismissable = input.dismissable !== false;
|
|
4666
|
+
let open = input.open;
|
|
4667
|
+
_html(`<dialog${_attr_class(["_f4", inputClass])}${_attr("aria-labelledby", inputLabelledBy)}${inputLabelledBy ? _attr("aria-label", inputAriaLabel) : _attr("aria-label", inputAriaLabel || label)} closedby=${dismissable ? "any" : "none"}${_attrs_partial({
|
|
4668
|
+
...htmlInput,
|
|
4669
|
+
open: null
|
|
4670
|
+
}, {
|
|
4671
|
+
class: 1,
|
|
4672
|
+
"aria-labelledby": 1,
|
|
4673
|
+
"aria-label": 1,
|
|
4674
|
+
closedby: 1,
|
|
4675
|
+
"on-cancel": 1,
|
|
4676
|
+
"on-close": 1
|
|
4677
|
+
}, "a", $scope0_id, "dialog")}><div${_attr_class("_f5")}>`);
|
|
4678
|
+
_dynamic_tag($scope0_id, "c", content, {}, 0, 0, _serialize_guard($scope0_reason, 6));
|
|
4679
|
+
_html("</div>");
|
|
4680
|
+
_if(() => {
|
|
4681
|
+
if (footer) {
|
|
4682
|
+
const $scope1_id = _scope_id();
|
|
4683
|
+
_html(`<form method=dialog${_attr_class("_f6")}>`);
|
|
4684
|
+
_dynamic_tag($scope1_id, "b", footer.content, {}, 0, 0, _serialize_guard($scope0_reason, 7));
|
|
4685
|
+
_html("</form>");
|
|
4686
|
+
$si__input_openChange__OR__input_footer && writeScope($scope1_id, { _: _serialize_if($scope0_reason, 7) && _scope_with_id($scope0_id) });
|
|
4687
|
+
return 0;
|
|
4688
|
+
} else if (input.openChange) {
|
|
4689
|
+
const $scope2_id = _scope_id();
|
|
4690
|
+
_html(`<form method=dialog${_attr_class("_f6")}>`);
|
|
4691
|
+
dialog_close_default({
|
|
4692
|
+
class: ["_h", "_i"],
|
|
4693
|
+
content: _content("l0", () => {
|
|
4694
|
+
_scope_reason();
|
|
4695
|
+
_scope_id();
|
|
4696
|
+
_html("Done");
|
|
4697
|
+
})
|
|
4698
|
+
});
|
|
4699
|
+
_html("</form>");
|
|
4700
|
+
$si__input_openChange__OR__input_footer && writeScope($scope2_id, {});
|
|
4701
|
+
return 1;
|
|
4702
|
+
}
|
|
4703
|
+
}, $scope0_id, "d", $sg__input_openChange__OR__input_footer, $sg__input_openChange__OR__input_footer, $sg__input_openChange__OR__input_footer, 0, 1);
|
|
4704
|
+
_html(`</dialog>${_el_resume($scope0_id, "a")}`);
|
|
4705
|
+
_script($scope0_id, "l1");
|
|
4706
|
+
_script($scope0_id, "l2");
|
|
4707
|
+
_script($scope0_id, "l3");
|
|
4708
|
+
writeScope($scope0_id, {
|
|
4709
|
+
h: $si__input_openChange && input.open,
|
|
4710
|
+
i: _serialize_if($scope0_reason, 0) && input.openChange,
|
|
4711
|
+
k: _serialize_if($scope0_reason, 4) && label,
|
|
4712
|
+
n: $si__input_openChange && footer,
|
|
4713
|
+
p: $si__input_openChange__OR__input_footer && footer?.content,
|
|
4714
|
+
q: _serialize_if($scope0_reason, 3) && inputAriaLabel,
|
|
4715
|
+
r: _serialize_if($scope0_reason, 2) && inputLabelledBy,
|
|
4716
|
+
t: htmlInput,
|
|
4717
|
+
u: dismissable,
|
|
4718
|
+
v: open,
|
|
4719
|
+
w: input.openChange || void 0
|
|
4720
|
+
});
|
|
4721
|
+
_resume_branch($scope0_id);
|
|
4722
|
+
});
|
|
4723
|
+
//#endregion
|
|
4724
|
+
//#region src/tags/prompt-dialog.marko
|
|
4725
|
+
var prompt_dialog_default = _template("o", (input) => {
|
|
4726
|
+
const $scope0_reason = _scope_reason(), $sg__input_label = _serialize_guard($scope0_reason, 4), $sg__input_openChange = _serialize_guard($scope0_reason, 2), $si__input_submitLabel = _serialize_if($scope0_reason, 3), $si__input_label = _serialize_if($scope0_reason, 4), $si__input_placeholder = _serialize_if($scope0_reason, 5);
|
|
4727
|
+
const $scope0_id = _scope_id();
|
|
4728
|
+
const $modalview_content__subscribers = /* @__PURE__ */ new Set();
|
|
4729
|
+
const $value__closures = /* @__PURE__ */ new Set();
|
|
4730
|
+
const $submitLabel__closures = /* @__PURE__ */ new Set();
|
|
4731
|
+
const $input_label__closures = /* @__PURE__ */ new Set();
|
|
4732
|
+
const $input_placeholder__closures = /* @__PURE__ */ new Set();
|
|
4733
|
+
input.open;
|
|
4734
|
+
let value = input.value || "";
|
|
4735
|
+
const submitLabel = input.submitLabel || "OK";
|
|
4736
|
+
const submit = _resume(() => {
|
|
4737
|
+
const v = value.trim();
|
|
4738
|
+
if (v) input.onSubmit(v);
|
|
4739
|
+
}, "o1", $scope0_id);
|
|
4740
|
+
const titleId = _id();
|
|
4741
|
+
_set_serialize_reason({
|
|
4742
|
+
0: _serialize_guard($scope0_reason, 1),
|
|
4743
|
+
1: $sg__input_openChange,
|
|
4744
|
+
2: $sg__input_label,
|
|
4745
|
+
3: $sg__input_label,
|
|
4746
|
+
5: $sg__input_openChange
|
|
4747
|
+
});
|
|
4748
|
+
const $childScope = _peek_scope_id();
|
|
4749
|
+
modal_view_default({
|
|
4750
|
+
label: input.label,
|
|
4751
|
+
class: "_fI",
|
|
4752
|
+
open: input.open,
|
|
4753
|
+
openChange: input.openChange,
|
|
4754
|
+
"aria-labelledby": titleId,
|
|
4755
|
+
footer: attrTag({ content: _content_resume("o5", () => {
|
|
4756
|
+
_scope_reason();
|
|
4757
|
+
const $scope2_id = _scope_id();
|
|
4758
|
+
_html(`<button type=button${_attr_class(["_h", "_i"])}${_attr("disabled", !value.trim())}>${_escape(submitLabel)}${_el_resume($scope2_id, "b", _serialize_guard($scope0_reason, 3))}</button>${_el_resume($scope2_id, "a")}<div${_attr_class("_r")}></div>`);
|
|
4759
|
+
dialog_close_default({
|
|
4760
|
+
class: "_h",
|
|
4761
|
+
content: _content("o2", () => {
|
|
4762
|
+
_scope_reason();
|
|
4763
|
+
_scope_id();
|
|
4764
|
+
_html("Cancel");
|
|
4765
|
+
})
|
|
4766
|
+
});
|
|
4767
|
+
_script($scope2_id, "o3");
|
|
4768
|
+
_subscribe($si__input_submitLabel && $submitLabel__closures, _subscribe($value__closures, writeScope($scope2_id, {
|
|
4769
|
+
_: _scope_with_id($scope0_id),
|
|
4770
|
+
Cs: 1
|
|
4771
|
+
})));
|
|
4772
|
+
_resume_branch($scope2_id);
|
|
4773
|
+
}, $scope0_id) }),
|
|
4774
|
+
content: _content("o6", () => {
|
|
4775
|
+
_scope_reason();
|
|
4776
|
+
const $scope1_id = _scope_id();
|
|
4777
|
+
_html(`<h2${_attr_class("_fJ")}${_attr("id", titleId)}>${_escape(input.label)}${_el_resume($scope1_id, "b", $sg__input_label)}</h2><input${_attr_input_value($scope1_id, "c", value, _resume((_new_value) => {
|
|
4778
|
+
value = _new_value;
|
|
4779
|
+
}, "o0", $scope1_id))}${_attr("placeholder", input.placeholder)}>${_el_resume($scope1_id, "c")}`);
|
|
4780
|
+
_script($scope1_id, "o4");
|
|
4781
|
+
_subscribe($value__closures, _subscribe($si__input_placeholder && $input_placeholder__closures, _subscribe($si__input_label && $input_label__closures, _subscribe($modalview_content__subscribers, writeScope($scope1_id, { _: _scope_with_id($scope0_id) })))));
|
|
4782
|
+
_resume_branch($scope1_id);
|
|
4783
|
+
})
|
|
4784
|
+
});
|
|
4785
|
+
_script($scope0_id, "o7");
|
|
4786
|
+
writeScope($scope0_id, {
|
|
4787
|
+
d: _serialize_if($scope0_reason, 2) && input.open,
|
|
4788
|
+
e: _serialize_if($scope0_reason, 1) && input.openChange,
|
|
4789
|
+
i: input.onSubmit,
|
|
4790
|
+
l: value,
|
|
4791
|
+
n: submitLabel,
|
|
4792
|
+
o: submit,
|
|
4793
|
+
B1: $modalview_content__subscribers,
|
|
4794
|
+
k: input.openChange || void 0,
|
|
4795
|
+
s: $value__closures,
|
|
4796
|
+
t: $si__input_submitLabel && $submitLabel__closures,
|
|
4797
|
+
q: $si__input_label && $input_label__closures,
|
|
4798
|
+
r: $si__input_placeholder && $input_placeholder__closures,
|
|
4799
|
+
a: _serialize_if($scope0_reason, 0) && _existing_scope($childScope)
|
|
4800
|
+
});
|
|
4801
|
+
_resume_branch($scope0_id);
|
|
4802
|
+
});
|
|
4803
|
+
//#endregion
|
|
4804
|
+
//#region src/tags/settings-page.marko
|
|
4805
|
+
var api$2;
|
|
4806
|
+
var watchProgress;
|
|
4807
|
+
var MISSING_LABEL = {
|
|
4808
|
+
"github-auth": "GitHub sign-in",
|
|
4809
|
+
agent: "an agent CLI"
|
|
4810
|
+
};
|
|
4811
|
+
function familyOf(usageAgent, families) {
|
|
4812
|
+
return families.find((f) => new RegExp(`^${f.id}\\d*$`).test(usageAgent))?.id ?? null;
|
|
4813
|
+
}
|
|
4814
|
+
var lastSetup = null;
|
|
4815
|
+
var lastUsage = null;
|
|
4816
|
+
var settings_page_default = _template("q", (input) => {
|
|
4817
|
+
const $scope0_reason = _scope_reason(), $sg__input_agents = _serialize_guard($scope0_reason, 1), $si__input_preferred = _serialize_if($scope0_reason, 0);
|
|
4529
4818
|
const $scope0_id = _scope_id();
|
|
4530
|
-
|
|
4819
|
+
const $error__closures = /* @__PURE__ */ new Set();
|
|
4820
|
+
const $active__closures = /* @__PURE__ */ new Set();
|
|
4821
|
+
const $input_preferred__closures = /* @__PURE__ */ new Set();
|
|
4822
|
+
const $accountsFor2__closures = /* @__PURE__ */ new Set();
|
|
4823
|
+
const $confirmingRemove__closures = /* @__PURE__ */ new Set();
|
|
4824
|
+
const $hits__closures = /* @__PURE__ */ new Set();
|
|
4825
|
+
const $query__closures = /* @__PURE__ */ new Set();
|
|
4826
|
+
let setup = input.setup || lastSetup;
|
|
4827
|
+
let usage = lastUsage;
|
|
4828
|
+
let error = null;
|
|
4531
4829
|
let refreshing = false;
|
|
4532
|
-
|
|
4830
|
+
let usageRefreshing = false;
|
|
4831
|
+
let active = /* @__PURE__ */ new Map();
|
|
4832
|
+
let confirmingRemove = null;
|
|
4833
|
+
let versionPick = null;
|
|
4834
|
+
let query = "";
|
|
4835
|
+
let hits = null;
|
|
4836
|
+
let searching = false;
|
|
4837
|
+
const searchTimer = { id: 0 };
|
|
4838
|
+
const applySetup = _resume((s) => {
|
|
4839
|
+
setup = s;
|
|
4840
|
+
lastSetup = s;
|
|
4841
|
+
input.setupChange?.(s);
|
|
4842
|
+
}, "q1", $scope0_id);
|
|
4843
|
+
const loadSetup = _resume(async (refresh) => {
|
|
4844
|
+
try {
|
|
4845
|
+
applySetup(await api$2(`/api/setup${refresh ? "?refresh" : ""}`));
|
|
4846
|
+
} catch (err) {
|
|
4847
|
+
error = String(err.message || err);
|
|
4848
|
+
}
|
|
4849
|
+
}, "q2", $scope0_id);
|
|
4850
|
+
const loadUsage = _resume(async (refresh) => {
|
|
4533
4851
|
try {
|
|
4534
4852
|
usage = await api$2(`/api/usage${refresh ? "?refresh" : ""}`);
|
|
4535
4853
|
} catch (err) {
|
|
4536
4854
|
usage = { error: String(err.message || err) };
|
|
4537
4855
|
}
|
|
4538
|
-
|
|
4856
|
+
lastUsage = usage;
|
|
4857
|
+
}, "q3", $scope0_id);
|
|
4539
4858
|
const refresh = _resume(async () => {
|
|
4540
4859
|
refreshing = true;
|
|
4541
|
-
await
|
|
4860
|
+
await loadSetup(true);
|
|
4542
4861
|
refreshing = false;
|
|
4543
|
-
}, "
|
|
4862
|
+
}, "q4", $scope0_id);
|
|
4863
|
+
const refreshUsage = _resume(async () => {
|
|
4864
|
+
usageRefreshing = true;
|
|
4865
|
+
await loadUsage(true);
|
|
4866
|
+
usageRefreshing = false;
|
|
4867
|
+
}, "q5", $scope0_id);
|
|
4868
|
+
const setActive = _resume((id, line) => {
|
|
4869
|
+
const next = new Map(active);
|
|
4870
|
+
if (line === null) next.delete(id);
|
|
4871
|
+
else next.set(id, line);
|
|
4872
|
+
active = next;
|
|
4873
|
+
}, "q6", $scope0_id);
|
|
4874
|
+
const run = _resume(async (id, action, version) => {
|
|
4875
|
+
if (active.has(id)) return;
|
|
4876
|
+
error = null;
|
|
4877
|
+
setActive(id, "");
|
|
4878
|
+
const watcher = watchProgress(`setup:${id}`, (line) => setActive(id, line));
|
|
4879
|
+
try {
|
|
4880
|
+
applySetup(await api$2(`/api/setup/${encodeURIComponent(id)}`, {
|
|
4881
|
+
method: "POST",
|
|
4882
|
+
headers: { "content-type": "application/json" },
|
|
4883
|
+
body: JSON.stringify({
|
|
4884
|
+
action,
|
|
4885
|
+
version
|
|
4886
|
+
})
|
|
4887
|
+
}));
|
|
4888
|
+
if (hits) hits = hits.map((h) => h.name === id ? {
|
|
4889
|
+
...h,
|
|
4890
|
+
installed: action !== "remove"
|
|
4891
|
+
} : h);
|
|
4892
|
+
} catch (err) {
|
|
4893
|
+
error = String(err.message || err);
|
|
4894
|
+
} finally {
|
|
4895
|
+
watcher.stop();
|
|
4896
|
+
setActive(id, null);
|
|
4897
|
+
}
|
|
4898
|
+
}, "q7", $scope0_id);
|
|
4899
|
+
const runEach = _resume(async (ids, action) => {
|
|
4900
|
+
for (const id of ids) await run(id, action);
|
|
4901
|
+
}, "q8", $scope0_id);
|
|
4902
|
+
const setPreferred = _resume(async (agent) => {
|
|
4903
|
+
input.preferredChange?.(agent);
|
|
4904
|
+
try {
|
|
4905
|
+
await api$2("/api/settings", {
|
|
4906
|
+
method: "PUT",
|
|
4907
|
+
headers: { "content-type": "application/json" },
|
|
4908
|
+
body: JSON.stringify({ preferredAgent: agent })
|
|
4909
|
+
});
|
|
4910
|
+
} catch (err) {
|
|
4911
|
+
error = String(err.message || err);
|
|
4912
|
+
}
|
|
4913
|
+
}, "q9", $scope0_id);
|
|
4914
|
+
const setEnabled = _resume(async (id, on) => {
|
|
4915
|
+
if (!setup) return;
|
|
4916
|
+
const off = new Set(setup.agents.flatMap((f) => f.instances.filter((i) => !i.enabled).map((i) => i.id)));
|
|
4917
|
+
if (on) off.delete(id);
|
|
4918
|
+
else off.add(id);
|
|
4919
|
+
try {
|
|
4920
|
+
const snap = await api$2("/api/settings", {
|
|
4921
|
+
method: "PUT",
|
|
4922
|
+
headers: { "content-type": "application/json" },
|
|
4923
|
+
body: JSON.stringify({ disabledAgents: [...off] })
|
|
4924
|
+
});
|
|
4925
|
+
input.agentsChange?.(snap.agents);
|
|
4926
|
+
if (snap.preferredAgent !== input.preferred) input.preferredChange?.(snap.preferredAgent);
|
|
4927
|
+
applySetup({
|
|
4928
|
+
...setup,
|
|
4929
|
+
agents: setup.agents.map((f) => ({
|
|
4930
|
+
...f,
|
|
4931
|
+
instances: f.instances.map((i) => i.id === id ? {
|
|
4932
|
+
...i,
|
|
4933
|
+
enabled: on
|
|
4934
|
+
} : i)
|
|
4935
|
+
}))
|
|
4936
|
+
});
|
|
4937
|
+
} catch (err) {
|
|
4938
|
+
error = String(err.message || err);
|
|
4939
|
+
}
|
|
4940
|
+
}, "q10", $scope0_id);
|
|
4941
|
+
const search = _resume((q) => {
|
|
4942
|
+
query = q;
|
|
4943
|
+
clearTimeout(searchTimer.id);
|
|
4944
|
+
if (!q.trim()) {
|
|
4945
|
+
hits = null;
|
|
4946
|
+
searching = false;
|
|
4947
|
+
return;
|
|
4948
|
+
}
|
|
4949
|
+
searching = true;
|
|
4950
|
+
searchTimer.id = setTimeout(async () => {
|
|
4951
|
+
try {
|
|
4952
|
+
const res = await api$2(`/api/setup/search?q=${encodeURIComponent(q.trim())}`);
|
|
4953
|
+
if (query === q) hits = res;
|
|
4954
|
+
} catch (err) {
|
|
4955
|
+
error = String(err.message || err);
|
|
4956
|
+
} finally {
|
|
4957
|
+
if (query === q) searching = false;
|
|
4958
|
+
}
|
|
4959
|
+
}, 250);
|
|
4960
|
+
}, "q11", $scope0_id);
|
|
4961
|
+
const outdated = _resume((t) => !!(t.installed && t.latest && t.latest !== t.version), "q12");
|
|
4962
|
+
const tools = setup?.tools || [];
|
|
4963
|
+
const missingInstallable = tools.filter((t) => t.recommended && !t.installed && t.installable);
|
|
4964
|
+
const missingCount = tools.filter((t) => t.recommended && !t.installed).length;
|
|
4965
|
+
const outdatedIds = tools.filter(outdated).map((t) => t.id);
|
|
4966
|
+
const families = setup?.agents || [];
|
|
4967
|
+
const instanceIds = new Set(families.flatMap((f) => f.instances.map((i) => i.id)));
|
|
4968
|
+
const accountsFor = _resume((id) => (usage?.agents || []).filter((u) => u.agent === id), "q13", $scope0_id);
|
|
4969
|
+
const strayAccountsFor = _resume((f) => (usage?.agents || []).filter((u) => !instanceIds.has(u.agent) && familyOf(u.agent, families) === f.id), "q14", $scope0_id);
|
|
4970
|
+
const otherUsage = (usage?.agents || []).filter((u) => familyOf(u.agent, families) === null);
|
|
4544
4971
|
const titleId = _id();
|
|
4545
|
-
_html(`<div${_attr_class("
|
|
4972
|
+
_html(`<div${_attr_class("_P")} role=region${_attr("aria-labelledby", titleId)}><div${_attr_class("_Q")}><div${_attr_class(content)}><header${_attr_class("_T")}><div${_attr_class("_V")}><h1${_attr("id", titleId)}${_attr_class("_U")}>Settings</h1><p${_attr_class("_W")}>`);
|
|
4973
|
+
_if(() => {
|
|
4974
|
+
if (!setup) {
|
|
4975
|
+
const $scope35_id = _scope_id();
|
|
4976
|
+
_html("Checking this machine…");
|
|
4977
|
+
writeScope($scope35_id, {});
|
|
4978
|
+
return 0;
|
|
4979
|
+
} else if (setup.ready) {
|
|
4980
|
+
const $scope36_id = _scope_id();
|
|
4981
|
+
_html(`<span${_attr_class("_di")}>Ready</span> — tools, GitHub, and an agent are all in place.`);
|
|
4982
|
+
writeScope($scope36_id, {});
|
|
4983
|
+
return 1;
|
|
4984
|
+
} else {
|
|
4985
|
+
const $scope4_id = _scope_id();
|
|
4986
|
+
_html(`<span${_attr_class("_dj")}>Not ready</span> — missing <!>${_escape(setup.missing.map((m) => MISSING_LABEL[m] || m).join(", "))}${_el_resume($scope4_id, "b")}.`);
|
|
4987
|
+
writeScope($scope4_id, {});
|
|
4988
|
+
return 2;
|
|
4989
|
+
}
|
|
4990
|
+
}, $scope0_id, "g", 1, 1, 1, "</p>");
|
|
4991
|
+
_html(`</div><div${_attr_class("_X")}><button${_attr_class(iconBtn)} title="Re-check this machine" aria-label="Re-check this machine"${_attr("disabled", refreshing)}>`);
|
|
4546
4992
|
_set_serialize_reason(1);
|
|
4547
4993
|
const $childScope = _peek_scope_id();
|
|
4548
4994
|
icon_refresh_default({
|
|
4549
4995
|
size: 14,
|
|
4550
4996
|
class: refreshing && "_x"
|
|
4551
4997
|
});
|
|
4552
|
-
_html(`</button>${_el_resume($scope0_id, "i")}</div></header
|
|
4553
|
-
|
|
4554
|
-
|
|
4555
|
-
|
|
4556
|
-
|
|
4557
|
-
|
|
4558
|
-
|
|
4559
|
-
|
|
4560
|
-
|
|
4561
|
-
|
|
4562
|
-
|
|
4563
|
-
|
|
4564
|
-
|
|
4565
|
-
|
|
4566
|
-
|
|
4998
|
+
_html(`</button>${_el_resume($scope0_id, "i")}</div></header>`);
|
|
4999
|
+
_if(() => {
|
|
5000
|
+
if (error) {
|
|
5001
|
+
const $scope6_id = _scope_id();
|
|
5002
|
+
toast_default({
|
|
5003
|
+
placement: "inline",
|
|
5004
|
+
onDismiss: _resume(function() {
|
|
5005
|
+
error = null;
|
|
5006
|
+
}, "q15", $scope6_id),
|
|
5007
|
+
content: _content_resume("q18", () => {
|
|
5008
|
+
_scope_reason();
|
|
5009
|
+
const $scope7_id = _scope_id();
|
|
5010
|
+
_html(`${_escape(error)}${_el_resume($scope7_id, "a")}`);
|
|
5011
|
+
_subscribe($error__closures, writeScope($scope7_id, { _: _scope_with_id($scope6_id) }));
|
|
5012
|
+
_resume_branch($scope7_id);
|
|
5013
|
+
}, $scope6_id)
|
|
5014
|
+
});
|
|
5015
|
+
writeScope($scope6_id, {});
|
|
5016
|
+
return 0;
|
|
5017
|
+
}
|
|
5018
|
+
}, $scope0_id, "k", 1, 1, 1, 0, 1);
|
|
5019
|
+
_html(`<section${_attr_class("_bS")} aria-labelledby=settings-agents><div${_attr_class("_bT")}><h2 id=settings-agents${_attr_class("_b8")}>Agents</h2><div${_attr_class("_r")}></div><label${_attr_class("_dm")}><span${_attr_class("_dn")}>Default</span><span${_attr_class("_f")}>`);
|
|
5020
|
+
_attr_select_value($scope0_id, "s", input.preferred, _resume(function(v) {
|
|
5021
|
+
setPreferred(v);
|
|
5022
|
+
}, "q0", $scope0_id), () => {
|
|
5023
|
+
_html(`<select${_attr_class(["_g", "_do"])} aria-label="Default agent — starts when a workspace has no session yet" title="Starts when a workspace has no session yet">`);
|
|
5024
|
+
_for_of(input.agents.filter((a) => a !== "shell"), (id) => {
|
|
5025
|
+
const $scope37_id = _scope_id();
|
|
5026
|
+
_html(`<option${_attr_option_value(id)}>${_escape(agentLabel(id))}${_el_resume($scope37_id, "b", $sg__input_agents)}</option>${_el_resume($scope37_id, "a", $sg__input_agents)}`);
|
|
5027
|
+
_serialize_if($scope0_reason, 1) && writeScope($scope37_id, {});
|
|
5028
|
+
}, (a) => a, $scope0_id, "s", $sg__input_agents, 1, 1, "</select>", 1);
|
|
4567
5029
|
});
|
|
4568
|
-
_html(
|
|
5030
|
+
_html(`</span></label><button${_attr_class(iconBtn)} title="Refresh usage" aria-label="Refresh usage"${_attr("disabled", usageRefreshing)}>`);
|
|
5031
|
+
_set_serialize_reason(1);
|
|
5032
|
+
const $childScope2 = _peek_scope_id();
|
|
5033
|
+
icon_refresh_default({
|
|
5034
|
+
size: 14,
|
|
5035
|
+
class: usageRefreshing && "_x"
|
|
5036
|
+
});
|
|
5037
|
+
_html(`</button>${_el_resume($scope0_id, "t")}</div><ul${_attr_class(agentGrid)}>`);
|
|
5038
|
+
_for_of(families, (a) => {
|
|
5039
|
+
const $scope1_id = _scope_id();
|
|
5040
|
+
const lone = a.instances.length === 1 && a.instances[0].id === a.id ? a.instances[0] : null;
|
|
5041
|
+
const rows = lone ? [] : a.instances;
|
|
5042
|
+
const loneAccounts = lone && lone.enabled ? accountsFor(lone.id) : [];
|
|
5043
|
+
const extraAccounts = strayAccountsFor(a);
|
|
5044
|
+
_html(`<li${_attr_class(["_bX", "_dl"])}><div${_attr_class("_dp")}>`);
|
|
5045
|
+
_set_serialize_reason(12);
|
|
5046
|
+
const $childScope3 = _peek_scope_id();
|
|
5047
|
+
icon_agent_default({
|
|
5048
|
+
agent: a.id,
|
|
5049
|
+
size: 18
|
|
5050
|
+
});
|
|
5051
|
+
_html(`<div${_attr_class("_bY")}><span${_attr_class("_b0")}><span${_attr_class("_bZ")}>${_escape(a.label)}${_el_resume($scope1_id, "g")}</span>`);
|
|
5052
|
+
_if(() => {
|
|
5053
|
+
if (lone && input.preferred === lone.id) {
|
|
5054
|
+
const $scope38_id = _scope_id();
|
|
5055
|
+
_html(`<span${_attr_class(defaultTag)}>default</span>`);
|
|
5056
|
+
writeScope($scope38_id, {});
|
|
5057
|
+
return 0;
|
|
5058
|
+
}
|
|
5059
|
+
}, $scope1_id, "h", 1, 1, 1, 0, 1);
|
|
5060
|
+
_html("</span>");
|
|
5061
|
+
_if(() => {
|
|
5062
|
+
if (active.has(a.id)) {
|
|
5063
|
+
const $scope8_id = _scope_id();
|
|
5064
|
+
_html(`<span${_attr_class("_dh")}><span${_attr_class("_y")}></span><!>${_escape(active.get(a.id) || "Starting…")}${_el_resume($scope8_id, "c")}</span>`);
|
|
5065
|
+
_subscribe($active__closures, writeScope($scope8_id, {}));
|
|
5066
|
+
return 0;
|
|
5067
|
+
} else if (!a.installed) {
|
|
5068
|
+
const $scope39_id = _scope_id();
|
|
5069
|
+
_html(`<span${_attr_class("_b1")}>Not installed</span>`);
|
|
5070
|
+
writeScope($scope39_id, {});
|
|
5071
|
+
return 1;
|
|
5072
|
+
}
|
|
5073
|
+
}, $scope1_id, "i", 1, 1, 1, 0, 1);
|
|
5074
|
+
_html("</div>");
|
|
5075
|
+
_if(() => {
|
|
5076
|
+
if (!a.installed && !active.has(a.id)) {
|
|
5077
|
+
const $scope28_id = _scope_id();
|
|
5078
|
+
_html(`<button${_attr_class(btnSm)}>Install</button>${_el_resume($scope28_id, "a")}`);
|
|
5079
|
+
_script($scope28_id, "q19");
|
|
5080
|
+
writeScope($scope28_id, {});
|
|
5081
|
+
return 0;
|
|
5082
|
+
}
|
|
5083
|
+
}, $scope1_id, "j", 1, 1, 1, 0, 1);
|
|
5084
|
+
_if(() => {
|
|
5085
|
+
if (lone) {
|
|
5086
|
+
const $scope32_id = _scope_id();
|
|
5087
|
+
_html(`<button${_attr_class(["_ds", { ["_dr"]: lone.enabled }])} role=switch aria-checked=${lone.enabled ? "true" : "false"} title=${lone.enabled ? "\"Shown in session pickers — click to hide\"" : "\"Hidden from session pickers — click to show\""}>${lone.enabled ? "on" : "off"}${_el_resume($scope32_id, "b")}</button>${_el_resume($scope32_id, "a")}`);
|
|
5088
|
+
_script($scope32_id, "q20");
|
|
5089
|
+
writeScope($scope32_id, {});
|
|
5090
|
+
return 0;
|
|
5091
|
+
}
|
|
5092
|
+
}, $scope1_id, "k", 1, 1, 1, 0, 1);
|
|
5093
|
+
_html("</div>");
|
|
5094
|
+
_if(() => {
|
|
5095
|
+
if (rows.length || loneAccounts.length || extraAccounts.length) {
|
|
5096
|
+
const $scope2_id = _scope_id();
|
|
5097
|
+
_html(`<ul${_attr_class("_dw")}>`);
|
|
5098
|
+
_for_of(rows, (inst) => {
|
|
5099
|
+
const $scope3_id = _scope_id();
|
|
5100
|
+
const accounts = inst.enabled ? accountsFor(inst.id) : [];
|
|
5101
|
+
_html(`<li${_attr_class("_dt")}><div${_attr_class("_du")}>`);
|
|
5102
|
+
_set_serialize_reason(12);
|
|
5103
|
+
const $childScope4 = _peek_scope_id();
|
|
5104
|
+
icon_agent_default({
|
|
5105
|
+
agent: inst.id,
|
|
5106
|
+
size: 15
|
|
5107
|
+
});
|
|
5108
|
+
_html(`<span${_attr_class(["_dv", "_q"])}>${_escape(inst.command)}${_el_resume($scope3_id, "e")}</span>`);
|
|
5109
|
+
_if(() => {
|
|
5110
|
+
if (input.preferred === inst.id) {
|
|
5111
|
+
const $scope40_id = _scope_id();
|
|
5112
|
+
_html(`<span${_attr_class(defaultTag)}>default</span>`);
|
|
5113
|
+
writeScope($scope40_id, {});
|
|
5114
|
+
return 0;
|
|
5115
|
+
}
|
|
5116
|
+
}, $scope3_id, "f", 1, 1, 1, 0, 1);
|
|
5117
|
+
_html(`<span${_attr_class("_r")}></span><button${_attr_class(["_ds", { ["_dr"]: inst.enabled }])} role=switch aria-checked=${inst.enabled ? "true" : "false"} title=${inst.enabled ? "\"Shown in session pickers — click to hide\"" : "\"Hidden from session pickers — click to show\""}>${inst.enabled ? "on" : "off"}${_el_resume($scope3_id, "i")}</button>${_el_resume($scope3_id, "h")}</div>`);
|
|
5118
|
+
_for_of(accounts, (u) => {
|
|
5119
|
+
const $scope41_id = _scope_id();
|
|
5120
|
+
_set_serialize_reason(6);
|
|
5121
|
+
const $childScope5 = _peek_scope_id();
|
|
5122
|
+
usage_meters_default({
|
|
5123
|
+
agent: u,
|
|
5124
|
+
hideName: true
|
|
5125
|
+
});
|
|
5126
|
+
writeScope($scope41_id, { a: _existing_scope($childScope5) });
|
|
5127
|
+
}, (u) => `${u.agent}-${u.account || ""}`, $scope3_id, "j", 1, 1, 1, 0, 1);
|
|
5128
|
+
_html("</li>");
|
|
5129
|
+
_script($scope3_id, "q21");
|
|
5130
|
+
_subscribe($accountsFor2__closures, _subscribe($si__input_preferred && $input_preferred__closures, writeScope($scope3_id, {
|
|
5131
|
+
m: inst?.enabled,
|
|
5132
|
+
n: inst?.id,
|
|
5133
|
+
c: _existing_scope($childScope4)
|
|
5134
|
+
})));
|
|
5135
|
+
}, "id", $scope2_id, "b", 1, 1, 1, 0, 1);
|
|
5136
|
+
_for_of(loneAccounts, (u) => {
|
|
5137
|
+
const $scope42_id = _scope_id();
|
|
5138
|
+
_html("<li>");
|
|
5139
|
+
_set_serialize_reason(6);
|
|
5140
|
+
const $childScope6 = _peek_scope_id();
|
|
5141
|
+
usage_meters_default({
|
|
5142
|
+
agent: u,
|
|
5143
|
+
hideName: true
|
|
5144
|
+
});
|
|
5145
|
+
_html("</li>");
|
|
5146
|
+
writeScope($scope42_id, { a: _existing_scope($childScope6) });
|
|
5147
|
+
}, (u) => `${u.agent}-${u.account || ""}`, $scope2_id, "c", 1, 1, 1, 0, 1);
|
|
5148
|
+
_for_of(extraAccounts, (u) => {
|
|
5149
|
+
const $scope43_id = _scope_id();
|
|
5150
|
+
_html("<li>");
|
|
5151
|
+
_set_serialize_reason(6);
|
|
5152
|
+
const $childScope7 = _peek_scope_id();
|
|
5153
|
+
usage_meters_default({ agent: u });
|
|
5154
|
+
_html("</li>");
|
|
5155
|
+
writeScope($scope43_id, { a: _existing_scope($childScope7) });
|
|
5156
|
+
}, (u) => `${u.agent}-${u.account || ""}`, $scope2_id, "d", 1, 1, 1, 0, 1);
|
|
5157
|
+
_html("</ul>");
|
|
5158
|
+
writeScope($scope2_id, {});
|
|
5159
|
+
return 0;
|
|
5160
|
+
}
|
|
5161
|
+
}, $scope1_id, "l", 1, 1, 1, 0, 1);
|
|
5162
|
+
_html("</li>");
|
|
5163
|
+
writeScope($scope1_id, {
|
|
5164
|
+
n: a,
|
|
5165
|
+
s: a?.id,
|
|
5166
|
+
v: a?.installed,
|
|
5167
|
+
x: lone,
|
|
5168
|
+
a1: lone?.enabled,
|
|
5169
|
+
a2: lone?.id,
|
|
5170
|
+
a3: rows,
|
|
5171
|
+
a4: rows?.length,
|
|
5172
|
+
a5: loneAccounts,
|
|
5173
|
+
a7: extraAccounts,
|
|
5174
|
+
c: _existing_scope($childScope3)
|
|
5175
|
+
});
|
|
5176
|
+
}, "id", $scope0_id, "w", 1, 1, 1, 0, 1);
|
|
5177
|
+
_for_of(otherUsage, (u) => {
|
|
5178
|
+
const $scope44_id = _scope_id();
|
|
5179
|
+
_html(`<li${_attr_class(["_bX", "_dl"])}>`);
|
|
5180
|
+
_set_serialize_reason(6);
|
|
5181
|
+
const $childScope8 = _peek_scope_id();
|
|
5182
|
+
usage_meters_default({ agent: u });
|
|
5183
|
+
_html("</li>");
|
|
5184
|
+
writeScope($scope44_id, { b: _existing_scope($childScope8) });
|
|
5185
|
+
}, (u) => `${u.agent}-${u.account || ""}`, $scope0_id, "x", 1, 1, 1, 0, 1);
|
|
5186
|
+
_html("</ul>");
|
|
4569
5187
|
_if(() => {
|
|
4570
|
-
if (!usage) {
|
|
4571
|
-
const $
|
|
4572
|
-
_html(`<p${_attr_class(
|
|
4573
|
-
writeScope($
|
|
5188
|
+
if (!usage && families.length) {
|
|
5189
|
+
const $scope45_id = _scope_id();
|
|
5190
|
+
_html(`<p${_attr_class("_b6")}><span${_attr_class("_y")}></span> Loading usage…</p>`);
|
|
5191
|
+
writeScope($scope45_id, {});
|
|
4574
5192
|
return 0;
|
|
4575
|
-
} else if (usage
|
|
4576
|
-
const $
|
|
4577
|
-
_html(`<p${_attr_class(
|
|
4578
|
-
writeScope($
|
|
5193
|
+
} else if (usage?.error) {
|
|
5194
|
+
const $scope5_id = _scope_id();
|
|
5195
|
+
_html(`<p${_attr_class("_b6")}>${_escape(usage.error)}${_el_resume($scope5_id, "b")}</p>`);
|
|
5196
|
+
writeScope($scope5_id, {});
|
|
4579
5197
|
return 1;
|
|
4580
|
-
}
|
|
4581
|
-
|
|
4582
|
-
|
|
4583
|
-
|
|
4584
|
-
|
|
4585
|
-
|
|
5198
|
+
}
|
|
5199
|
+
}, $scope0_id, "y", 1, 1, 1, 0, 1);
|
|
5200
|
+
_html(`</section><section${_attr_class("_bS")} aria-labelledby=settings-github><div${_attr_class("_bT")}><h2 id=settings-github${_attr_class("_b8")}>GitHub</h2></div><ul${_attr_class("_bV")}>`);
|
|
5201
|
+
_for_of(setup?.github || [], (h) => {
|
|
5202
|
+
const $scope9_id = _scope_id();
|
|
5203
|
+
_html(`<li${_attr_class("_bX")}><div${_attr_class("_bY")}><span${_attr_class("_b0")}><span${_attr_class(["_bZ", "_q"])}>${_escape(h.host)}${_el_resume($scope9_id, "e")}</span>`);
|
|
5204
|
+
_if(() => {
|
|
5205
|
+
if (h.isEnterprise) {
|
|
5206
|
+
const $scope48_id = _scope_id();
|
|
5207
|
+
_html(`<span${_attr_class("_b2")}>Enterprise</span>`);
|
|
5208
|
+
writeScope($scope48_id, {});
|
|
5209
|
+
return 0;
|
|
5210
|
+
}
|
|
5211
|
+
}, $scope9_id, "f", 1, 1, 1, 0, 1);
|
|
5212
|
+
_html("</span>");
|
|
5213
|
+
_if(() => {
|
|
5214
|
+
if (active.has(h.host)) {
|
|
5215
|
+
const $scope10_id = _scope_id();
|
|
5216
|
+
_html(`<span${_attr_class("_dh")}><span${_attr_class("_y")}></span><!>${_escape(active.get(h.host) || "Starting…")}${_el_resume($scope10_id, "c")}</span>`);
|
|
5217
|
+
_subscribe($active__closures, writeScope($scope10_id, { Ccc: 1 }));
|
|
5218
|
+
return 0;
|
|
5219
|
+
} else if (h.authed) {
|
|
5220
|
+
const $scope46_id = _scope_id();
|
|
5221
|
+
_html(`<span${_attr_class("_b1")}>Signed in<!>${h.user ? ` as ${_escape(`${_to_text(h.user)}`)}` : ""}${_el_resume($scope46_id, "b")}</span>`);
|
|
5222
|
+
writeScope($scope46_id, {});
|
|
5223
|
+
return 1;
|
|
5224
|
+
} else {
|
|
5225
|
+
const $scope47_id = _scope_id();
|
|
5226
|
+
_html(`<span${_attr_class("_b1")}>${_escape(h.error || "Not signed in")}${_el_resume($scope47_id, "b")}</span>`);
|
|
5227
|
+
writeScope($scope47_id, {});
|
|
5228
|
+
return 2;
|
|
5229
|
+
}
|
|
5230
|
+
}, $scope9_id, "g", 1, 1, 1, 0, 1);
|
|
5231
|
+
_html("</div>");
|
|
5232
|
+
_if(() => {
|
|
5233
|
+
if (!h.authed && !active.has(h.host)) {
|
|
5234
|
+
const $scope29_id = _scope_id();
|
|
5235
|
+
_html(`<button${_attr_class(btnSm)}>Sign in</button>${_el_resume($scope29_id, "a")}`);
|
|
5236
|
+
_script($scope29_id, "q22");
|
|
5237
|
+
writeScope($scope29_id, {});
|
|
5238
|
+
return 0;
|
|
5239
|
+
}
|
|
5240
|
+
}, $scope9_id, "h", 1, 1, 1, 0, 1);
|
|
5241
|
+
_html("</li>");
|
|
5242
|
+
writeScope($scope9_id, {
|
|
5243
|
+
k: h?.host,
|
|
5244
|
+
m: h?.authed,
|
|
5245
|
+
o: h?.user,
|
|
5246
|
+
p: h?.error
|
|
5247
|
+
});
|
|
5248
|
+
}, "host", $scope0_id, "a2", 1, 1, 1, "</ul>", 1);
|
|
5249
|
+
_if(() => {
|
|
5250
|
+
if (setup && !setup.github.length) {
|
|
5251
|
+
const $scope49_id = _scope_id();
|
|
5252
|
+
_html(`<p${_attr_class("_b6")}>Install the GitHub CLI below to sign in.</p>`);
|
|
5253
|
+
writeScope($scope49_id, {});
|
|
5254
|
+
return 0;
|
|
5255
|
+
}
|
|
5256
|
+
}, $scope0_id, "a3", 1, 1, 1, 0, 1);
|
|
5257
|
+
_html(`</section><section${_attr_class("_bS")} aria-labelledby=settings-machine><div${_attr_class("_bT")}><h2 id=settings-machine${_attr_class("_b8")}>Machine</h2>`);
|
|
5258
|
+
_if(() => {
|
|
5259
|
+
if (missingCount) {
|
|
5260
|
+
const $scope33_id = _scope_id();
|
|
5261
|
+
_html(`<span${_attr_class("_bU")}>${_escape(missingCount)}${_el_resume($scope33_id, "b")} missing</span>`);
|
|
5262
|
+
writeScope($scope33_id, {});
|
|
5263
|
+
return 0;
|
|
5264
|
+
}
|
|
5265
|
+
}, $scope0_id, "a7", 1, 1, 1, 0, 1);
|
|
5266
|
+
_if(() => {
|
|
5267
|
+
if (outdatedIds.length) {
|
|
5268
|
+
const $scope34_id = _scope_id();
|
|
5269
|
+
_html(`<span${_attr_class("_bU")}>${_escape(outdatedIds.length)}${_el_resume($scope34_id, "b")} outdated</span>`);
|
|
5270
|
+
writeScope($scope34_id, {});
|
|
5271
|
+
return 0;
|
|
5272
|
+
}
|
|
5273
|
+
}, $scope0_id, "a8", 1, 1, 1, 0, 1);
|
|
5274
|
+
_html(`<div${_attr_class("_r")}></div>`);
|
|
5275
|
+
_if(() => {
|
|
5276
|
+
if (outdatedIds.length > 1) {
|
|
5277
|
+
const $scope11_id = _scope_id();
|
|
5278
|
+
_html(`<button${_attr_class(btnSm)}${_attr("disabled", active.size > 0)}>Update all</button>${_el_resume($scope11_id, "a")}`);
|
|
5279
|
+
_script($scope11_id, "q23");
|
|
5280
|
+
writeScope($scope11_id, {});
|
|
5281
|
+
return 0;
|
|
5282
|
+
}
|
|
5283
|
+
}, $scope0_id, "aa", 1, 1, 1, 0, 1);
|
|
5284
|
+
_if(() => {
|
|
5285
|
+
if (missingInstallable.length > 1) {
|
|
5286
|
+
const $scope12_id = _scope_id();
|
|
5287
|
+
_html(`<button${_attr_class(btnSm)}${_attr("disabled", active.size > 0)}>Install missing</button>${_el_resume($scope12_id, "a")}`);
|
|
5288
|
+
_script($scope12_id, "q24");
|
|
5289
|
+
writeScope($scope12_id, {});
|
|
5290
|
+
return 0;
|
|
5291
|
+
}
|
|
5292
|
+
}, $scope0_id, "ab", 1, 1, 1, 0, 1);
|
|
5293
|
+
_html("</div>");
|
|
5294
|
+
_if(() => {
|
|
5295
|
+
if (setup && !setup.mise.installed) {
|
|
5296
|
+
const $scope13_id = _scope_id();
|
|
5297
|
+
_html(`<p${_attr_class("_b6")}>mise isn't installed — it provides every tool below. <button${_attr_class(btnSm)}${_attr("disabled", active.has("mise"))}>${active.has("mise") ? "Installing…" : "Install mise"}${_el_resume($scope13_id, "c")}</button>${_el_resume($scope13_id, "b")}</p>`);
|
|
5298
|
+
_script($scope13_id, "q25");
|
|
5299
|
+
writeScope($scope13_id, {});
|
|
5300
|
+
return 0;
|
|
5301
|
+
}
|
|
5302
|
+
}, $scope0_id, "ac", 1, 1, 1, 0, 1);
|
|
5303
|
+
_html(`<ul${_attr_class(toolGrid)}>`);
|
|
5304
|
+
_for_of(tools, (t) => {
|
|
5305
|
+
const $scope14_id = _scope_id();
|
|
5306
|
+
const $for_content4__t_label__closures = /* @__PURE__ */ new Set();
|
|
5307
|
+
const $for_content4__t_version__closures = /* @__PURE__ */ new Set();
|
|
5308
|
+
const $for_content4__t_path__closures = /* @__PURE__ */ new Set();
|
|
5309
|
+
const $for_content4__t_latest__closures = /* @__PURE__ */ new Set();
|
|
5310
|
+
const $for_content4__t_id__closures = /* @__PURE__ */ new Set();
|
|
5311
|
+
_html(`<li${_attr_class([
|
|
5312
|
+
"_bX",
|
|
5313
|
+
"_dy",
|
|
5314
|
+
{ ["_dz"]: !t.installed }
|
|
5315
|
+
])}><span${_attr_class(["_dA", "_q"])}>${_escape(t.label)}${_el_resume($scope14_id, "c")}</span>`);
|
|
5316
|
+
_if(() => {
|
|
5317
|
+
if (active.has(t.id)) {
|
|
5318
|
+
const $scope15_id = _scope_id();
|
|
5319
|
+
_html(`<span${_attr_class("_dh")}><span${_attr_class("_y")}></span><!>${_escape(active.get(t.id) || "Starting…")}${_el_resume($scope15_id, "c")}</span>`);
|
|
5320
|
+
_subscribe($active__closures, writeScope($scope15_id, { Ccc: 2 }));
|
|
5321
|
+
return 0;
|
|
5322
|
+
} else if (t.installed) {
|
|
5323
|
+
const $scope23_id = _scope_id();
|
|
5324
|
+
_if(() => {
|
|
5325
|
+
if (t.version) {
|
|
5326
|
+
const $scope24_id = _scope_id();
|
|
5327
|
+
_html(`<button${_attr_class(["_dC", "_q"])}${_attr("title", `${t.path || t.label} — pin a version`)}>v<!>${_escape(t.version)}${_el_resume($scope24_id, "b")}</button>${_el_resume($scope24_id, "a")}`);
|
|
5328
|
+
_script($scope24_id, "q26");
|
|
5329
|
+
_subscribe($for_content4__t_path__closures, _subscribe($for_content4__t_version__closures, _subscribe($for_content4__t_label__closures, writeScope($scope24_id, { Cu: 1 }))));
|
|
5330
|
+
return 0;
|
|
5331
|
+
} else {
|
|
5332
|
+
const $scope50_id = _scope_id();
|
|
5333
|
+
_html(`<span${_attr_class(["_dB", "_q"])}${_attr("title", t.path)}>${_escape(t.path)}${_el_resume($scope50_id, "b")}</span>${_el_resume($scope50_id, "a")}`);
|
|
5334
|
+
_subscribe($for_content4__t_path__closures, writeScope($scope50_id, { Cx: 1 }));
|
|
5335
|
+
return 1;
|
|
5336
|
+
}
|
|
5337
|
+
}, $scope23_id, "a", 1, 1, 1, 0, 1);
|
|
4586
5338
|
_if(() => {
|
|
4587
|
-
if (
|
|
4588
|
-
const $
|
|
4589
|
-
_html(`<
|
|
4590
|
-
|
|
5339
|
+
if (outdated(t)) {
|
|
5340
|
+
const $scope30_id = _scope_id();
|
|
5341
|
+
_html(`<button${_attr_class([btnSm, "_dD"])}${_attr("title", `Update to v${t.latest}`)}>↑ <!>${_escape(t.latest)}${_el_resume($scope30_id, "b")}</button>${_el_resume($scope30_id, "a")}`);
|
|
5342
|
+
_script($scope30_id, "q27");
|
|
5343
|
+
_subscribe($for_content4__t_latest__closures, writeScope($scope30_id, {}));
|
|
4591
5344
|
return 0;
|
|
4592
5345
|
}
|
|
4593
|
-
}, $
|
|
5346
|
+
}, $scope23_id, "b", 1, 1, 1, 0, 1);
|
|
5347
|
+
writeScope($scope23_id, {});
|
|
5348
|
+
return 1;
|
|
5349
|
+
} else if (t.installable) {
|
|
5350
|
+
const $scope51_id = _scope_id();
|
|
5351
|
+
_html(`<span${_attr_class("_dB")}>not installed</span>`);
|
|
5352
|
+
writeScope($scope51_id, {});
|
|
5353
|
+
return 2;
|
|
5354
|
+
} else {
|
|
5355
|
+
const $scope52_id = _scope_id();
|
|
5356
|
+
_html(`<span${_attr_class("_dB")} title="Add it with your package manager">system package</span>`);
|
|
5357
|
+
writeScope($scope52_id, {});
|
|
5358
|
+
return 3;
|
|
5359
|
+
}
|
|
5360
|
+
}, $scope14_id, "d");
|
|
5361
|
+
_html(`<span${_attr_class("_r")}></span>`);
|
|
5362
|
+
_if(() => {
|
|
5363
|
+
if (!active.has(t.id)) {
|
|
5364
|
+
const $scope20_id = _scope_id();
|
|
4594
5365
|
_if(() => {
|
|
4595
|
-
if (
|
|
4596
|
-
const $
|
|
4597
|
-
_html(`<span${_attr_class("_b2")}
|
|
4598
|
-
writeScope($
|
|
5366
|
+
if (t.required) {
|
|
5367
|
+
const $scope53_id = _scope_id();
|
|
5368
|
+
_html(`<span${_attr_class("_b2")}>required</span>`);
|
|
5369
|
+
writeScope($scope53_id, {});
|
|
4599
5370
|
return 0;
|
|
4600
5371
|
}
|
|
4601
|
-
}, $
|
|
4602
|
-
_html(`</div><div${_attr_class(["_b3", { ["_cj"]: agent.stale_seconds != null }])}>`);
|
|
4603
|
-
_for_of(agent.windows || [], (win) => {
|
|
4604
|
-
const $scope8_id = _scope_id();
|
|
4605
|
-
const pct = Math.round(win.used_percent);
|
|
4606
|
-
const label = resetLabel(win.resets_at, agent.stale_seconds != null);
|
|
4607
|
-
const fillClass = win.used_percent >= 90 ? "_cb" : win.used_percent >= 70 ? "_ca" : win.used_percent >= 40 ? "_b_" : "_b9";
|
|
4608
|
-
const pctClass = win.used_percent >= 90 ? "_cg" : win.used_percent >= 70 ? "_cf" : win.used_percent >= 40 ? "_ce" : "_cd";
|
|
4609
|
-
_html(`<div${_attr_class("_b5")}${_attr("title", `${win.window}: ${pct}% used${win.resets_at ? ` — resets ${new Date(win.resets_at).toLocaleString()}` : ""}`)}><span${_attr_class("_b6")}>${_escape(win.window)}${_el_resume($scope8_id, "c")}</span><span${_attr_class("_b7")}><span${_attr_class(["_b8", fillClass])}${_attr_style(`width:${Math.min(100, Math.max(2, win.used_percent))}%`)}></span>${_el_resume($scope8_id, "e")}</span><span${_attr_class(["_cc", pctClass])}>${_escape(pct)}${_el_resume($scope8_id, "g")}%</span>${_el_resume($scope8_id, "f")}<span${_attr_class("_ch")}>${label ? `↻ ${_escape(`${_to_text(label)}`)}` : ""}${_el_resume($scope8_id, "i")}</span></div>${_el_resume($scope8_id, "a")}`);
|
|
4610
|
-
writeScope($scope8_id, {});
|
|
4611
|
-
}, "window", $scope5_id, "h", 1, 1, 1, 0, 1);
|
|
5372
|
+
}, $scope20_id, "a", 1, 1, 1, 0, 1);
|
|
4612
5373
|
_if(() => {
|
|
4613
|
-
if (
|
|
4614
|
-
const $
|
|
4615
|
-
_html(`<
|
|
4616
|
-
|
|
5374
|
+
if (!t.installed && t.installable) {
|
|
5375
|
+
const $scope31_id = _scope_id();
|
|
5376
|
+
_html(`<button${_attr_class(btnSm)}>Install</button>${_el_resume($scope31_id, "a")}`);
|
|
5377
|
+
_script($scope31_id, "q28");
|
|
5378
|
+
writeScope($scope31_id, {});
|
|
4617
5379
|
return 0;
|
|
5380
|
+
} else if (t.installed && t.version && !t.required) {
|
|
5381
|
+
const $scope21_id = _scope_id();
|
|
5382
|
+
_html(`<button${_attr_class([
|
|
5383
|
+
"_b3",
|
|
5384
|
+
"_b5",
|
|
5385
|
+
"_dE",
|
|
5386
|
+
{ ["_b4"]: confirmingRemove === t.id }
|
|
5387
|
+
])}${confirmingRemove === t.id ? _attr("title", `Really remove ${t.label}?`) : _attr("title", `Remove ${t.label}`)}>${confirmingRemove === t.id ? "Remove?" : "×"}${_el_resume($scope21_id, "b")}</button>${_el_resume($scope21_id, "a")}`);
|
|
5388
|
+
_script($scope21_id, "q29");
|
|
5389
|
+
_subscribe($for_content4__t_id__closures, _subscribe($for_content4__t_label__closures, _subscribe($confirmingRemove__closures, writeScope($scope21_id, {}))));
|
|
5390
|
+
return 1;
|
|
4618
5391
|
}
|
|
4619
|
-
}, $
|
|
4620
|
-
|
|
4621
|
-
|
|
4622
|
-
|
|
4623
|
-
|
|
4624
|
-
|
|
4625
|
-
|
|
4626
|
-
|
|
4627
|
-
|
|
4628
|
-
|
|
5392
|
+
}, $scope20_id, "b", 1, 1, 1, 0, 1);
|
|
5393
|
+
writeScope($scope20_id, {});
|
|
5394
|
+
return 0;
|
|
5395
|
+
}
|
|
5396
|
+
}, $scope14_id, "f");
|
|
5397
|
+
_html(`</li>${_el_resume($scope14_id, "a")}`);
|
|
5398
|
+
writeScope($scope14_id, {
|
|
5399
|
+
h: t,
|
|
5400
|
+
i: t?.installed,
|
|
5401
|
+
j: t?.label,
|
|
5402
|
+
k: t?.id,
|
|
5403
|
+
m: t?.version,
|
|
5404
|
+
n: t?.path,
|
|
5405
|
+
o: t?.latest,
|
|
5406
|
+
p: t?.installable,
|
|
5407
|
+
r: t?.required,
|
|
5408
|
+
u: $for_content4__t_label__closures,
|
|
5409
|
+
w: $for_content4__t_version__closures,
|
|
5410
|
+
x: $for_content4__t_path__closures,
|
|
5411
|
+
y: $for_content4__t_latest__closures,
|
|
5412
|
+
v: $for_content4__t_id__closures
|
|
5413
|
+
});
|
|
5414
|
+
}, "id", $scope0_id, "ad", 1, 1, 1, "</ul>", 1);
|
|
5415
|
+
_if(() => {
|
|
5416
|
+
if (setup && setup.mise.installed) {
|
|
5417
|
+
const $scope16_id = _scope_id();
|
|
5418
|
+
_html(`<div><input${_attr_input_value($scope16_id, "a", query)}${_attr_class("_dF")} type=text placeholder="Add a tool from the mise registry…" aria-label="Search the mise registry" autocomplete=off>${_el_resume($scope16_id, "a")}`);
|
|
5419
|
+
_if(() => {
|
|
5420
|
+
if (hits && hits.length) {
|
|
5421
|
+
const $scope17_id = _scope_id();
|
|
5422
|
+
_html(`<ul${_attr_class([toolGrid, "_dG"])}>`);
|
|
5423
|
+
_for_of(hits, (h) => {
|
|
5424
|
+
const $scope18_id = _scope_id();
|
|
5425
|
+
_html(`<li${_attr_class(["_bX", "_dy"])}><div${_attr_class("_bY")}><span${_attr_class(["_dA", "_q"])}>${_escape(h.name)}${_el_resume($scope18_id, "d")}</span>`);
|
|
5426
|
+
_if(() => {
|
|
5427
|
+
if (active.has(h.name)) {
|
|
5428
|
+
const $scope19_id = _scope_id();
|
|
5429
|
+
_html(`<span${_attr_class("_dh")}><span${_attr_class("_y")}></span><!>${_escape(active.get(h.name) || "Starting…")}${_el_resume($scope19_id, "c")}</span>`);
|
|
5430
|
+
_subscribe($active__closures, writeScope($scope19_id, { Ccc: 4 }));
|
|
5431
|
+
return 0;
|
|
5432
|
+
} else if (h.description) {
|
|
5433
|
+
const $scope54_id = _scope_id();
|
|
5434
|
+
_html(`<span${_attr_class("_b1")}${_attr("title", h.description)}>${_escape(h.description)}${_el_resume($scope54_id, "b")}</span>${_el_resume($scope54_id, "a")}`);
|
|
5435
|
+
writeScope($scope54_id, {});
|
|
5436
|
+
return 1;
|
|
5437
|
+
}
|
|
5438
|
+
}, $scope18_id, "e", 1, 1, 1, 0, 1);
|
|
5439
|
+
_html("</div>");
|
|
5440
|
+
_if(() => {
|
|
5441
|
+
if (!active.has(h.name)) {
|
|
5442
|
+
const $scope25_id = _scope_id();
|
|
5443
|
+
_if(() => {
|
|
5444
|
+
if (h.installed) {
|
|
5445
|
+
const $scope55_id = _scope_id();
|
|
5446
|
+
_html(`<span${_attr_class("_b2")}>installed</span>`);
|
|
5447
|
+
writeScope($scope55_id, {});
|
|
5448
|
+
return 0;
|
|
5449
|
+
} else {
|
|
5450
|
+
const $scope26_id = _scope_id();
|
|
5451
|
+
_html(`<button${_attr_class(btnSm)}>Install</button>${_el_resume($scope26_id, "a")}<button${_attr_class(btnSm)} title="Install a specific version">@…</button>${_el_resume($scope26_id, "b")}`);
|
|
5452
|
+
_script($scope26_id, "q30");
|
|
5453
|
+
writeScope($scope26_id, {});
|
|
5454
|
+
return 1;
|
|
5455
|
+
}
|
|
5456
|
+
}, $scope25_id, "a");
|
|
5457
|
+
writeScope($scope25_id, {});
|
|
5458
|
+
return 0;
|
|
5459
|
+
}
|
|
5460
|
+
}, $scope18_id, "f");
|
|
5461
|
+
_html("</li>");
|
|
5462
|
+
_subscribe($active__closures, writeScope($scope18_id, {
|
|
5463
|
+
i: h?.name,
|
|
5464
|
+
k: h?.description,
|
|
5465
|
+
m: h?.installed,
|
|
5466
|
+
Ccc: 3
|
|
5467
|
+
}));
|
|
5468
|
+
}, "name", $scope17_id, "a", 1, 1, 1, "</ul>", 1);
|
|
5469
|
+
_subscribe($hits__closures, writeScope($scope17_id, {}));
|
|
5470
|
+
return 0;
|
|
5471
|
+
} else if (hits && !searching) {
|
|
5472
|
+
const $scope27_id = _scope_id();
|
|
5473
|
+
_html(`<p${_attr_class("_b6")}>No tools match “<!>${_escape(query)}${_el_resume($scope27_id, "b")}”.</p>`);
|
|
5474
|
+
_subscribe($query__closures, writeScope($scope27_id, {}));
|
|
5475
|
+
return 1;
|
|
5476
|
+
}
|
|
5477
|
+
}, $scope16_id, "b", 1, 1, 1, 0, 1);
|
|
5478
|
+
_html("</div>");
|
|
5479
|
+
_script($scope16_id, "q31");
|
|
5480
|
+
writeScope($scope16_id, {});
|
|
5481
|
+
return 0;
|
|
4629
5482
|
}
|
|
4630
|
-
}, $scope0_id, "
|
|
4631
|
-
_html("</div></div></div>");
|
|
4632
|
-
|
|
4633
|
-
|
|
5483
|
+
}, $scope0_id, "ae", 1, 1, 1, 0, 1);
|
|
5484
|
+
_html("</section></div></div></div>");
|
|
5485
|
+
_if(() => {
|
|
5486
|
+
if (versionPick) {
|
|
5487
|
+
const $scope22_id = _scope_id();
|
|
5488
|
+
_set_serialize_reason(38);
|
|
5489
|
+
const $childScope9 = _peek_scope_id();
|
|
5490
|
+
prompt_dialog_default({
|
|
5491
|
+
label: `Pin ${versionPick.label}: latest, lts, a prefix (22), or exact (22.11.0)`,
|
|
5492
|
+
placeholder: "latest",
|
|
5493
|
+
value: versionPick.current,
|
|
5494
|
+
submitLabel: "Install",
|
|
5495
|
+
open: versionPick != null,
|
|
5496
|
+
openChange: _resume(function(o) {
|
|
5497
|
+
if (!o) versionPick = null;
|
|
5498
|
+
}, "q16", $scope22_id),
|
|
5499
|
+
onSubmit: _resume(function(v) {
|
|
5500
|
+
const pick = versionPick;
|
|
5501
|
+
versionPick = null;
|
|
5502
|
+
run(pick.id, "install", v);
|
|
5503
|
+
}, "q17", $scope22_id)
|
|
5504
|
+
});
|
|
5505
|
+
writeScope($scope22_id, { a: _existing_scope($childScope9) });
|
|
5506
|
+
return 0;
|
|
5507
|
+
}
|
|
5508
|
+
}, $scope0_id, "af", 1, 1, 1, 0, 1);
|
|
5509
|
+
_script($scope0_id, "q32");
|
|
5510
|
+
_script($scope0_id, "q33");
|
|
4634
5511
|
writeScope($scope0_id, {
|
|
4635
|
-
|
|
4636
|
-
|
|
4637
|
-
|
|
4638
|
-
|
|
4639
|
-
|
|
4640
|
-
|
|
4641
|
-
|
|
5512
|
+
aj: input.setupChange,
|
|
5513
|
+
ak: input.preferredChange,
|
|
5514
|
+
al: input.agentsChange,
|
|
5515
|
+
am: input.preferred,
|
|
5516
|
+
ao: setup,
|
|
5517
|
+
ar: setup?.missing,
|
|
5518
|
+
at: usage,
|
|
5519
|
+
au: usage?.agents,
|
|
5520
|
+
av: usage?.error,
|
|
5521
|
+
aw: error,
|
|
5522
|
+
az: active,
|
|
5523
|
+
b0: active?.size,
|
|
5524
|
+
b1: confirmingRemove,
|
|
5525
|
+
b2: versionPick,
|
|
5526
|
+
b3: versionPick?.label,
|
|
5527
|
+
b4: versionPick?.current,
|
|
5528
|
+
b5: query,
|
|
5529
|
+
b6: hits,
|
|
5530
|
+
b7: searching,
|
|
5531
|
+
b9: searchTimer.id,
|
|
5532
|
+
bb: applySetup,
|
|
5533
|
+
bd: loadSetup,
|
|
5534
|
+
be: loadUsage,
|
|
5535
|
+
bg: refresh,
|
|
5536
|
+
bh: refreshUsage,
|
|
5537
|
+
bi: setActive,
|
|
5538
|
+
bk: run,
|
|
5539
|
+
bl: runEach,
|
|
5540
|
+
bm: setPreferred,
|
|
5541
|
+
bo: setEnabled,
|
|
5542
|
+
bp: search,
|
|
5543
|
+
bq: outdated,
|
|
5544
|
+
bt: missingInstallable,
|
|
5545
|
+
bv: missingCount,
|
|
5546
|
+
bw: outdatedIds,
|
|
5547
|
+
bx: outdatedIds?.length,
|
|
5548
|
+
by: families,
|
|
5549
|
+
c0: families.length,
|
|
5550
|
+
c2: instanceIds,
|
|
5551
|
+
c4: accountsFor,
|
|
5552
|
+
c5: strayAccountsFor,
|
|
5553
|
+
j: _existing_scope($childScope),
|
|
5554
|
+
cb: $error__closures,
|
|
5555
|
+
u: _existing_scope($childScope2),
|
|
5556
|
+
cc: $active__closures,
|
|
5557
|
+
c8: $si__input_preferred && $input_preferred__closures,
|
|
5558
|
+
cp: $accountsFor2__closures,
|
|
5559
|
+
ce: $confirmingRemove__closures,
|
|
5560
|
+
cj: $hits__closures,
|
|
5561
|
+
ci: $query__closures
|
|
4642
5562
|
});
|
|
4643
5563
|
_resume_branch($scope0_id);
|
|
4644
5564
|
});
|
|
4645
5565
|
//#endregion
|
|
4646
5566
|
//#region src/tags/term-find.marko
|
|
4647
|
-
var term_find_default = _template("
|
|
5567
|
+
var term_find_default = _template("u", (input) => {
|
|
4648
5568
|
const $scope0_reason = _scope_reason();
|
|
4649
5569
|
const $scope0_id = _scope_id();
|
|
4650
5570
|
let open = input.open;
|
|
@@ -4661,35 +5581,35 @@ var term_find_default = _template("t", (input) => {
|
|
|
4661
5581
|
if (!live.open) return;
|
|
4662
5582
|
const search = input.onSearch;
|
|
4663
5583
|
if (search) search(live.query, dir);
|
|
4664
|
-
}, "
|
|
5584
|
+
}, "u1", $scope0_id);
|
|
4665
5585
|
const close = _resume(() => {
|
|
4666
5586
|
open = false;
|
|
4667
5587
|
live.open = false;
|
|
4668
5588
|
const clear = input.onClear;
|
|
4669
5589
|
if (clear) clear();
|
|
4670
|
-
}, "
|
|
5590
|
+
}, "u2", $scope0_id);
|
|
4671
5591
|
const focusInput = _resume(() => {
|
|
4672
5592
|
const el = ((findEl) => findEl())(_el_read_error);
|
|
4673
5593
|
if (!el) return;
|
|
4674
5594
|
el.focus();
|
|
4675
5595
|
if (document.activeElement !== el) setTimeout(() => el.focus(), 0);
|
|
4676
|
-
}, "
|
|
5596
|
+
}, "u3", $scope0_id);
|
|
4677
5597
|
const hasQuery = !!query.trim();
|
|
4678
5598
|
const canStep = hasQuery && open;
|
|
4679
5599
|
const keybar = input.placement === "keybar";
|
|
4680
5600
|
_html(`<div${_attr_class([
|
|
4681
|
-
"
|
|
4682
|
-
keybar ? "
|
|
4683
|
-
!open && "
|
|
4684
|
-
])} aria-hidden=${open ? "false" : "true"}><div${_attr_class(["
|
|
5601
|
+
"_eH",
|
|
5602
|
+
keybar ? "_eJ" : "_eI",
|
|
5603
|
+
!open && "_eL"
|
|
5604
|
+
])} aria-hidden=${open ? "false" : "true"}><div${_attr_class(["_eC", keybar ? "_eK" : "_eE"])}><input${_attr_input_value($scope0_id, "c", query, _resume(function(v) {
|
|
4685
5605
|
if (!open) return;
|
|
4686
5606
|
query = v;
|
|
4687
5607
|
live.query = v;
|
|
4688
5608
|
run(0);
|
|
4689
|
-
}, "
|
|
4690
|
-
_script($scope0_id, "
|
|
4691
|
-
_script($scope0_id, "
|
|
4692
|
-
_script($scope0_id, "
|
|
5609
|
+
}, "u0", $scope0_id))}${_attr_class([findInput, keybar && "_eM"])} type=search enterkeyhint=search autocomplete=off tabindex=${open ? "0" : "-1"} placeholder="Find in terminal" aria-label="Find in terminal">${_el_resume($scope0_id, "c")}<button type=button${_attr_class([findIconBtn, keybar && "_eN"])} title="Previous match"${_attr("disabled", !canStep)} tabindex=${open ? "0" : "-1"}>↑</button>${_el_resume($scope0_id, "d")}<button type=button${_attr_class([findIconBtn, keybar && "_eN"])} title="Next match"${_attr("disabled", !canStep)} tabindex=${open ? "0" : "-1"}>↓</button>${_el_resume($scope0_id, "e")}<button type=button${_attr_class([findIconBtn, keybar && "_eN"])} title="Close find" tabindex=${open ? "0" : "-1"}>×</button>${_el_resume($scope0_id, "f")}</div>${_el_resume($scope0_id, "b", _serialize_guard($scope0_reason, 2))}</div>${_el_resume($scope0_id, "a")}`);
|
|
5610
|
+
_script($scope0_id, "u4");
|
|
5611
|
+
_script($scope0_id, "u5");
|
|
5612
|
+
_script($scope0_id, "u6");
|
|
4693
5613
|
writeScope($scope0_id, {
|
|
4694
5614
|
i: _serialize_if($scope0_reason, 1) && input.open,
|
|
4695
5615
|
j: _serialize_if($scope0_reason, 0) && input.openChange,
|
|
@@ -4712,7 +5632,7 @@ var term_find_default = _template("t", (input) => {
|
|
|
4712
5632
|
});
|
|
4713
5633
|
_resume_branch($scope0_id);
|
|
4714
5634
|
});
|
|
4715
|
-
_template("
|
|
5635
|
+
_template("T", (input) => {
|
|
4716
5636
|
const $scope0_reason = _scope_reason(), $sg__input_size__OR__input_class = _serialize_guard($scope0_reason, 0);
|
|
4717
5637
|
const $scope0_id = _scope_id();
|
|
4718
5638
|
_set_serialize_reason({
|
|
@@ -4727,7 +5647,7 @@ _template("S", (input) => {
|
|
|
4727
5647
|
});
|
|
4728
5648
|
_serialize_if($scope0_reason, 0) && writeScope($scope0_id, { a: _existing_scope($childScope) });
|
|
4729
5649
|
});
|
|
4730
|
-
_template("
|
|
5650
|
+
_template("G", (input) => {
|
|
4731
5651
|
const $scope0_reason = _scope_reason(), $sg__input_size__OR__input_class = _serialize_guard($scope0_reason, 0);
|
|
4732
5652
|
const $scope0_id = _scope_id();
|
|
4733
5653
|
_set_serialize_reason({
|
|
@@ -4757,7 +5677,7 @@ _template("K", (input) => {
|
|
|
4757
5677
|
});
|
|
4758
5678
|
_serialize_if($scope0_reason, 0) && writeScope($scope0_id, { a: _existing_scope($childScope) });
|
|
4759
5679
|
});
|
|
4760
|
-
_template("
|
|
5680
|
+
_template("E", (input) => {
|
|
4761
5681
|
const $scope0_reason = _scope_reason(), $sg__input_size__OR__input_class = _serialize_guard($scope0_reason, 0);
|
|
4762
5682
|
const $scope0_id = _scope_id();
|
|
4763
5683
|
_set_serialize_reason({
|
|
@@ -4776,7 +5696,7 @@ _template("D", (input) => {
|
|
|
4776
5696
|
//#region src/tags/term.marko
|
|
4777
5697
|
var REPEAT_DELAY = 400;
|
|
4778
5698
|
var REPEAT_EVERY = 55;
|
|
4779
|
-
var term_default = _template("
|
|
5699
|
+
var term_default = _template("v", (input) => {
|
|
4780
5700
|
const $scope0_reason = _scope_reason();
|
|
4781
5701
|
_serialize_guard($scope0_reason, 4);
|
|
4782
5702
|
_serialize_guard($scope0_reason, 0);
|
|
@@ -4793,7 +5713,7 @@ var term_default = _template("u", (input) => {
|
|
|
4793
5713
|
_serialize_guard($scope0_reason, 12);
|
|
4794
5714
|
const $si__input_sessionState = _serialize_if($scope0_reason, 5), $si__input_onCloseSession = _serialize_if($scope0_reason, 10), $si__input_sessionId = _serialize_if($scope0_reason, 7), $si__input_workspaceName = _serialize_if($scope0_reason, 12);
|
|
4795
5715
|
const $scope0_id = _scope_id();
|
|
4796
|
-
_hoist($scope0_id, "
|
|
5716
|
+
_hoist($scope0_id, "v20");
|
|
4797
5717
|
const $findOpen__closures = /* @__PURE__ */ new Set();
|
|
4798
5718
|
const $findTick__closures = /* @__PURE__ */ new Set();
|
|
4799
5719
|
const $input_onRenameSession__closures = /* @__PURE__ */ new Set();
|
|
@@ -4814,7 +5734,7 @@ var term_default = _template("u", (input) => {
|
|
|
4814
5734
|
let findOpen = false;
|
|
4815
5735
|
const $openChange = _resume((_new_findOpen) => {
|
|
4816
5736
|
findOpen = _new_findOpen;
|
|
4817
|
-
}, "
|
|
5737
|
+
}, "v1", $scope0_id);
|
|
4818
5738
|
let findTick = 0;
|
|
4819
5739
|
const ioBox = { current: null };
|
|
4820
5740
|
const searchBox = {
|
|
@@ -4822,7 +5742,7 @@ var term_default = _template("u", (input) => {
|
|
|
4822
5742
|
query: "",
|
|
4823
5743
|
refreshTimer: 0
|
|
4824
5744
|
};
|
|
4825
|
-
const findFocusRef = { focus: _resume(function() {}, "
|
|
5745
|
+
const findFocusRef = { focus: _resume(function() {}, "v2") };
|
|
4826
5746
|
const scheduleFindRefresh = _resume(() => {
|
|
4827
5747
|
if (!searchBox.query.trim() || !searchBox.overlay) return;
|
|
4828
5748
|
if (searchBox.refreshTimer) clearTimeout(searchBox.refreshTimer);
|
|
@@ -4830,7 +5750,7 @@ var term_default = _template("u", (input) => {
|
|
|
4830
5750
|
searchBox.refreshTimer = 0;
|
|
4831
5751
|
searchBox.overlay?.refresh();
|
|
4832
5752
|
}, 32);
|
|
4833
|
-
}, "
|
|
5753
|
+
}, "v3", $scope0_id);
|
|
4834
5754
|
const runFind = _resume((query, dir) => {
|
|
4835
5755
|
const overlay = searchBox.overlay;
|
|
4836
5756
|
if (!overlay) return;
|
|
@@ -4844,7 +5764,7 @@ var term_default = _template("u", (input) => {
|
|
|
4844
5764
|
return;
|
|
4845
5765
|
}
|
|
4846
5766
|
overlay.search(query, dir);
|
|
4847
|
-
}, "
|
|
5767
|
+
}, "v4", $scope0_id);
|
|
4848
5768
|
const clearFind = _resume(() => {
|
|
4849
5769
|
if (searchBox.refreshTimer) {
|
|
4850
5770
|
clearTimeout(searchBox.refreshTimer);
|
|
@@ -4852,7 +5772,7 @@ var term_default = _template("u", (input) => {
|
|
|
4852
5772
|
}
|
|
4853
5773
|
searchBox.query = "";
|
|
4854
5774
|
searchBox.overlay?.clear();
|
|
4855
|
-
}, "
|
|
5775
|
+
}, "v5", $scope0_id);
|
|
4856
5776
|
const openFind = _resume(() => {
|
|
4857
5777
|
if (kb) {
|
|
4858
5778
|
kb = false;
|
|
@@ -4862,7 +5782,7 @@ var term_default = _template("u", (input) => {
|
|
|
4862
5782
|
findOpen = true;
|
|
4863
5783
|
findTick++;
|
|
4864
5784
|
findFocusRef.focus();
|
|
4865
|
-
}, "
|
|
5785
|
+
}, "v6", $scope0_id);
|
|
4866
5786
|
const toggleFind = _resume(() => {
|
|
4867
5787
|
if (findOpen) {
|
|
4868
5788
|
findOpen = false;
|
|
@@ -4871,7 +5791,7 @@ var term_default = _template("u", (input) => {
|
|
|
4871
5791
|
return;
|
|
4872
5792
|
}
|
|
4873
5793
|
openFind();
|
|
4874
|
-
}, "
|
|
5794
|
+
}, "v7", $scope0_id);
|
|
4875
5795
|
const onTermPage = input.mode == null || input.mode === "term";
|
|
4876
5796
|
const canKeys = onTermPage || input.mode === "diff";
|
|
4877
5797
|
const findLit = onTermPage ? findOpen : input.mode === "diff" && !!input.reviewFindOpen;
|
|
@@ -4882,7 +5802,7 @@ var term_default = _template("u", (input) => {
|
|
|
4882
5802
|
return;
|
|
4883
5803
|
}
|
|
4884
5804
|
if (input.mode === "diff") input.onToggleReviewFind?.();
|
|
4885
|
-
}, "
|
|
5805
|
+
}, "v8", $scope0_id);
|
|
4886
5806
|
const thisAgent = activeAgent({
|
|
4887
5807
|
agent: input.agent || "shell",
|
|
4888
5808
|
state: input.sessionState
|
|
@@ -4894,7 +5814,7 @@ var term_default = _template("u", (input) => {
|
|
|
4894
5814
|
copyFlashBox.timer = setTimeout(() => {
|
|
4895
5815
|
copiedFlash = false;
|
|
4896
5816
|
}, 1200);
|
|
4897
|
-
}, "
|
|
5817
|
+
}, "v9", $scope0_id);
|
|
4898
5818
|
const holdBox = { current: null };
|
|
4899
5819
|
const startHold = _resume((seq) => {
|
|
4900
5820
|
((stopHold) => stopHold())(_hoist_read_error);
|
|
@@ -4904,7 +5824,7 @@ var term_default = _template("u", (input) => {
|
|
|
4904
5824
|
state.repeat = setInterval(() => ioBox.current?.send(seq), REPEAT_EVERY);
|
|
4905
5825
|
}, REPEAT_DELAY);
|
|
4906
5826
|
holdBox.current = state;
|
|
4907
|
-
}, "
|
|
5827
|
+
}, "v10", $scope0_id);
|
|
4908
5828
|
const stopHold = _resume(() => {
|
|
4909
5829
|
const hold = holdBox.current;
|
|
4910
5830
|
if (hold) {
|
|
@@ -4912,7 +5832,7 @@ var term_default = _template("u", (input) => {
|
|
|
4912
5832
|
clearInterval(hold.repeat);
|
|
4913
5833
|
holdBox.current = null;
|
|
4914
5834
|
}
|
|
4915
|
-
}, "
|
|
5835
|
+
}, "v11", $scope0_id);
|
|
4916
5836
|
const uploadAsset = _resume(async (file) => {
|
|
4917
5837
|
if (!file) return;
|
|
4918
5838
|
uploading = true;
|
|
@@ -4925,7 +5845,7 @@ var term_default = _template("u", (input) => {
|
|
|
4925
5845
|
} finally {
|
|
4926
5846
|
uploading = false;
|
|
4927
5847
|
}
|
|
4928
|
-
}, "
|
|
5848
|
+
}, "v12", $scope0_id);
|
|
4929
5849
|
const handlePasted = _resume(async (clipboardData) => {
|
|
4930
5850
|
const files = [...clipboardData?.files || []];
|
|
4931
5851
|
for (const file of files) await uploadAsset(file);
|
|
@@ -4934,7 +5854,7 @@ var term_default = _template("u", (input) => {
|
|
|
4934
5854
|
if (text) ioBox.current?.send(text);
|
|
4935
5855
|
}
|
|
4936
5856
|
trapOpen = false;
|
|
4937
|
-
}, "
|
|
5857
|
+
}, "v13", $scope0_id);
|
|
4938
5858
|
const pasteClipboard = _resume(async () => {
|
|
4939
5859
|
if (!navigator.clipboard?.read) {
|
|
4940
5860
|
trapOpen = true;
|
|
@@ -4954,8 +5874,8 @@ var term_default = _template("u", (input) => {
|
|
|
4954
5874
|
} catch {
|
|
4955
5875
|
trapOpen = true;
|
|
4956
5876
|
}
|
|
4957
|
-
}, "
|
|
4958
|
-
_html(`<div${_attr("hidden", !onTermPage)}${_attr_class("
|
|
5877
|
+
}, "v14", $scope0_id);
|
|
5878
|
+
_html(`<div${_attr("hidden", !onTermPage)}${_attr_class("_cF")}><div${_attr_class("_cG")}></div>${_el_resume($scope0_id, "b")}`);
|
|
4959
5879
|
_if(() => {
|
|
4960
5880
|
if (findOpen) {
|
|
4961
5881
|
const $scope11_id = _scope_id();
|
|
@@ -4969,11 +5889,11 @@ var term_default = _template("u", (input) => {
|
|
|
4969
5889
|
focusRef: findFocusRef,
|
|
4970
5890
|
onSearch: _resume(function(q, dir) {
|
|
4971
5891
|
runFind(q, dir);
|
|
4972
|
-
}, "
|
|
5892
|
+
}, "v15", $scope11_id),
|
|
4973
5893
|
onClear: _resume(function() {
|
|
4974
5894
|
clearFind();
|
|
4975
5895
|
ioBox.current?.setFindMode(false);
|
|
4976
|
-
}, "
|
|
5896
|
+
}, "v16", $scope11_id)
|
|
4977
5897
|
});
|
|
4978
5898
|
writeScope($scope11_id, { a: _existing_scope($childScope) });
|
|
4979
5899
|
return 0;
|
|
@@ -4982,7 +5902,7 @@ var term_default = _template("u", (input) => {
|
|
|
4982
5902
|
_if(() => {
|
|
4983
5903
|
if (uploading) {
|
|
4984
5904
|
const $scope18_id = _scope_id();
|
|
4985
|
-
_html(`<div${_attr_class("
|
|
5905
|
+
_html(`<div${_attr_class("_cK")}>uploading…</div>`);
|
|
4986
5906
|
writeScope($scope18_id, {});
|
|
4987
5907
|
return 0;
|
|
4988
5908
|
}
|
|
@@ -4990,7 +5910,7 @@ var term_default = _template("u", (input) => {
|
|
|
4990
5910
|
_if(() => {
|
|
4991
5911
|
if (copiedFlash) {
|
|
4992
5912
|
const $scope19_id = _scope_id();
|
|
4993
|
-
_html(`<div${_attr_class("
|
|
5913
|
+
_html(`<div${_attr_class("_cJ")}>Copied</div>`);
|
|
4994
5914
|
writeScope($scope19_id, {});
|
|
4995
5915
|
return 0;
|
|
4996
5916
|
}
|
|
@@ -4999,18 +5919,18 @@ var term_default = _template("u", (input) => {
|
|
|
4999
5919
|
_if(() => {
|
|
5000
5920
|
if (trapOpen) {
|
|
5001
5921
|
const $scope10_id = _scope_id();
|
|
5002
|
-
_html(`<div${_attr_class("
|
|
5003
|
-
_script($scope10_id, "
|
|
5004
|
-
_script($scope10_id, "
|
|
5922
|
+
_html(`<div${_attr_class("_cL")}><div${_attr_class("_cM")}><p${_attr_class("_df")}>Long-press below and choose Paste</p><input placeholder="Paste here…">${_el_resume($scope10_id, "d")}<button${_attr_class("_h")}>Cancel</button>${_el_resume($scope10_id, "e")}</div>${_el_resume($scope10_id, "b")}</div>${_el_resume($scope10_id, "a")}`);
|
|
5923
|
+
_script($scope10_id, "v23");
|
|
5924
|
+
_script($scope10_id, "v24");
|
|
5005
5925
|
writeScope($scope10_id, {});
|
|
5006
5926
|
return 0;
|
|
5007
5927
|
}
|
|
5008
5928
|
}, $scope0_id, "g", 1, 1, 1, 0, 1);
|
|
5009
5929
|
_html(`</div>${_el_resume($scope0_id, "a")}`);
|
|
5010
5930
|
_if(() => {}, $scope0_id, "h", 1, 1, 1, 0, 1);
|
|
5011
|
-
_script($scope0_id, "
|
|
5012
|
-
_script($scope0_id, "
|
|
5013
|
-
_script($scope0_id, "
|
|
5931
|
+
_script($scope0_id, "v39");
|
|
5932
|
+
_script($scope0_id, "v40");
|
|
5933
|
+
_script($scope0_id, "v41");
|
|
5014
5934
|
writeScope($scope0_id, {
|
|
5015
5935
|
k: input.mode,
|
|
5016
5936
|
l: input.reviewFindOpen,
|
|
@@ -5079,7 +5999,7 @@ var term_default = _template("u", (input) => {
|
|
|
5079
5999
|
//#region src/tags/work-view.marko
|
|
5080
6000
|
var api$1;
|
|
5081
6001
|
var isTransientApiError$1;
|
|
5082
|
-
var work_view_default = _template("
|
|
6002
|
+
var work_view_default = _template("y", (input) => {
|
|
5083
6003
|
const $scope0_reason = _scope_reason(), $sg__input_agents = _serialize_guard($scope0_reason, 9), $sg__input_allWorkspaces = _serialize_guard($scope0_reason, 8), $sg__input_workspace = _serialize_guard($scope0_reason, 4), $si__input_workspace = _serialize_if($scope0_reason, 4), $si__input_active = _serialize_if($scope0_reason, 6), $si__input_agents = _serialize_if($scope0_reason, 9), $si__input_preferred = _serialize_if($scope0_reason, 7);
|
|
5084
6004
|
const $scope0_id = _scope_id();
|
|
5085
6005
|
const $error__closures = /* @__PURE__ */ new Set();
|
|
@@ -5104,15 +6024,15 @@ var work_view_default = _template("x", (input) => {
|
|
|
5104
6024
|
let DiffView = null;
|
|
5105
6025
|
const loadDiffView = _resume(() => {
|
|
5106
6026
|
if (DiffView) return;
|
|
5107
|
-
import("./
|
|
6027
|
+
import("./_Hz_qlZE1.js").then((m) => {
|
|
5108
6028
|
DiffView = m.default;
|
|
5109
6029
|
});
|
|
5110
|
-
}, "
|
|
6030
|
+
}, "y4", $scope0_id);
|
|
5111
6031
|
let manageMounted = false;
|
|
5112
|
-
let
|
|
6032
|
+
let settingsMounted = false;
|
|
5113
6033
|
let reviewFindOpen = false;
|
|
5114
6034
|
let reviewFindTick = 0;
|
|
5115
|
-
const reviewFindFocus = { focus: _resume(function() {}, "
|
|
6035
|
+
const reviewFindFocus = { focus: _resume(function() {}, "y0") };
|
|
5116
6036
|
let focusPr = "";
|
|
5117
6037
|
let focusNonce = 0;
|
|
5118
6038
|
let error = null;
|
|
@@ -5124,30 +6044,30 @@ var work_view_default = _template("x", (input) => {
|
|
|
5124
6044
|
loadDiffView();
|
|
5125
6045
|
diffMounted = true;
|
|
5126
6046
|
view = "diff";
|
|
5127
|
-
}, "
|
|
6047
|
+
}, "y5", $scope0_id);
|
|
5128
6048
|
const openManage = _resume(() => {
|
|
5129
6049
|
manageMounted = true;
|
|
5130
6050
|
view = "manage";
|
|
5131
|
-
}, "
|
|
5132
|
-
const
|
|
5133
|
-
|
|
5134
|
-
view = "
|
|
5135
|
-
}, "
|
|
5136
|
-
const
|
|
5137
|
-
if (view === "
|
|
5138
|
-
else
|
|
5139
|
-
}, "
|
|
6051
|
+
}, "y6", $scope0_id);
|
|
6052
|
+
const openSettings = _resume(() => {
|
|
6053
|
+
settingsMounted = true;
|
|
6054
|
+
view = "settings";
|
|
6055
|
+
}, "y7", $scope0_id);
|
|
6056
|
+
const toggleSettings = _resume(() => {
|
|
6057
|
+
if (view === "settings") view = "term";
|
|
6058
|
+
else openSettings();
|
|
6059
|
+
}, "y8", $scope0_id);
|
|
5140
6060
|
const toggleNav = _resume(() => {
|
|
5141
6061
|
view = view === "nav" ? "term" : "nav";
|
|
5142
|
-
}, "
|
|
6062
|
+
}, "y9", $scope0_id);
|
|
5143
6063
|
const toggleManage = _resume(() => {
|
|
5144
6064
|
if (view === "manage") view = "term";
|
|
5145
6065
|
else openManage();
|
|
5146
|
-
}, "
|
|
6066
|
+
}, "y10", $scope0_id);
|
|
5147
6067
|
const toggleDiff = _resume(() => {
|
|
5148
6068
|
if (view === "diff") view = "term";
|
|
5149
6069
|
else openDiff();
|
|
5150
|
-
}, "
|
|
6070
|
+
}, "y11", $scope0_id);
|
|
5151
6071
|
const shownSessions = sessions ?? input.allStatus?.[ws.id]?.sessions ?? null;
|
|
5152
6072
|
const curTab = (() => {
|
|
5153
6073
|
if (tab && shownSessions?.some((s) => s.id === tab)) return tab;
|
|
@@ -5164,10 +6084,10 @@ var work_view_default = _template("x", (input) => {
|
|
|
5164
6084
|
reviewFindOpen = true;
|
|
5165
6085
|
reviewFindTick++;
|
|
5166
6086
|
reviewFindFocus.focus();
|
|
5167
|
-
}, "
|
|
6087
|
+
}, "y12", $scope0_id);
|
|
5168
6088
|
const exitCreate = _resume(() => {
|
|
5169
6089
|
if (view === "new") view = "term";
|
|
5170
|
-
}, "
|
|
6090
|
+
}, "y13", $scope0_id);
|
|
5171
6091
|
const createSession = _resume(async (agent, select) => {
|
|
5172
6092
|
spawning = true;
|
|
5173
6093
|
try {
|
|
@@ -5188,7 +6108,7 @@ var work_view_default = _template("x", (input) => {
|
|
|
5188
6108
|
} finally {
|
|
5189
6109
|
spawning = false;
|
|
5190
6110
|
}
|
|
5191
|
-
}, "
|
|
6111
|
+
}, "y14", $scope0_id);
|
|
5192
6112
|
const loadMem = {
|
|
5193
6113
|
wanted: false,
|
|
5194
6114
|
run: void 0
|
|
@@ -5214,11 +6134,11 @@ var work_view_default = _template("x", (input) => {
|
|
|
5214
6134
|
if (isTransientApiError$1(err)) return;
|
|
5215
6135
|
error = String(err.message || err);
|
|
5216
6136
|
}
|
|
5217
|
-
}, "
|
|
6137
|
+
}, "y15", $scope0_id);
|
|
5218
6138
|
const loadSessions = _resume((autoCreate) => {
|
|
5219
6139
|
if (autoCreate) loadMem.wanted = true;
|
|
5220
6140
|
return (loadMem.run ??= coalesce(loadBody))();
|
|
5221
|
-
}, "
|
|
6141
|
+
}, "y16", $scope0_id);
|
|
5222
6142
|
const closeSession = _resume(async (id) => {
|
|
5223
6143
|
try {
|
|
5224
6144
|
sessions = (sessions || []).filter((s) => s.id !== id);
|
|
@@ -5228,7 +6148,7 @@ var work_view_default = _template("x", (input) => {
|
|
|
5228
6148
|
error = `Kill session failed: ${String(err.message || err)}`;
|
|
5229
6149
|
loadSessions(false);
|
|
5230
6150
|
}
|
|
5231
|
-
}, "
|
|
6151
|
+
}, "y17", $scope0_id);
|
|
5232
6152
|
const renameSession = _resume(async (id, title) => {
|
|
5233
6153
|
title = title.trim();
|
|
5234
6154
|
if (!title) return;
|
|
@@ -5241,7 +6161,7 @@ var work_view_default = _template("x", (input) => {
|
|
|
5241
6161
|
headers: { "content-type": "application/json" },
|
|
5242
6162
|
body: JSON.stringify({ title })
|
|
5243
6163
|
});
|
|
5244
|
-
}, "
|
|
6164
|
+
}, "y18", $scope0_id);
|
|
5245
6165
|
const newSession = _resume(async (wsId, agent) => {
|
|
5246
6166
|
if (wsId === ws.id) {
|
|
5247
6167
|
const session = await createSession(agent, true);
|
|
@@ -5259,8 +6179,8 @@ var work_view_default = _template("x", (input) => {
|
|
|
5259
6179
|
} catch (err) {
|
|
5260
6180
|
error = String(err.message || err);
|
|
5261
6181
|
}
|
|
5262
|
-
}, "
|
|
5263
|
-
_html(`<div${_attr_class(["
|
|
6182
|
+
}, "y19", $scope0_id);
|
|
6183
|
+
_html(`<div${_attr_class(["_bs", { ["_br"]: view === "nav" }])}><div${_attr_class("_bt")}>`);
|
|
5264
6184
|
_set_serialize_reason({
|
|
5265
6185
|
0: _serialize_guard($scope0_reason, 0),
|
|
5266
6186
|
1: _serialize_guard($scope0_reason, 1),
|
|
@@ -5284,62 +6204,62 @@ var work_view_default = _template("x", (input) => {
|
|
|
5284
6204
|
tab: curTab,
|
|
5285
6205
|
tabChange: _resume(function(id) {
|
|
5286
6206
|
tab = id;
|
|
5287
|
-
}, "
|
|
6207
|
+
}, "y20", $scope0_id),
|
|
5288
6208
|
view,
|
|
5289
6209
|
viewChange: _resume((_new_view) => {
|
|
5290
6210
|
view = _new_view;
|
|
5291
|
-
}, "
|
|
6211
|
+
}, "y21", $scope0_id),
|
|
5292
6212
|
allWorkspaces: input.allWorkspaces,
|
|
5293
6213
|
allStatus: input.allStatus,
|
|
5294
6214
|
agents: input.agents,
|
|
5295
6215
|
onError: _resume(function(message) {
|
|
5296
6216
|
error = message;
|
|
5297
|
-
}, "
|
|
6217
|
+
}, "y22", $scope0_id),
|
|
5298
6218
|
onSelectWorkspace: _resume(function(id) {
|
|
5299
6219
|
exitCreate();
|
|
5300
6220
|
input.onSelectWorkspace?.(id);
|
|
5301
|
-
}, "
|
|
6221
|
+
}, "y23", $scope0_id),
|
|
5302
6222
|
onOpenSession: _resume(function(wsId, sessionId) {
|
|
5303
6223
|
exitCreate();
|
|
5304
6224
|
input.onOpenSession?.(wsId, sessionId);
|
|
5305
|
-
}, "
|
|
6225
|
+
}, "y24", $scope0_id),
|
|
5306
6226
|
onManage: _resume(function(id) {
|
|
5307
6227
|
exitCreate();
|
|
5308
6228
|
if (!id || id === ws.id) toggleManage();
|
|
5309
6229
|
else input.onManage?.(id);
|
|
5310
|
-
}, "
|
|
6230
|
+
}, "y25", $scope0_id),
|
|
5311
6231
|
onNew: _resume(function() {
|
|
5312
6232
|
if (view === "new") exitCreate();
|
|
5313
6233
|
else input.onNew?.();
|
|
5314
|
-
}, "
|
|
5315
|
-
|
|
6234
|
+
}, "y26", $scope0_id),
|
|
6235
|
+
onSettings: _resume(function() {
|
|
5316
6236
|
exitCreate();
|
|
5317
|
-
|
|
5318
|
-
}, "
|
|
6237
|
+
toggleSettings();
|
|
6238
|
+
}, "y27", $scope0_id),
|
|
5319
6239
|
onNewSession: _resume(function(wsId, agent) {
|
|
5320
6240
|
exitCreate();
|
|
5321
6241
|
newSession(wsId, agent);
|
|
5322
|
-
}, "
|
|
6242
|
+
}, "y28", $scope0_id),
|
|
5323
6243
|
onCloseSession: _resume(function(id) {
|
|
5324
6244
|
closeSession(id);
|
|
5325
|
-
}, "
|
|
6245
|
+
}, "y29", $scope0_id),
|
|
5326
6246
|
onRenameSession: _resume(function(s, title) {
|
|
5327
6247
|
renameSession(s.id, title);
|
|
5328
|
-
}, "
|
|
6248
|
+
}, "y30", $scope0_id),
|
|
5329
6249
|
onReviewOpened: _resume(function(pr) {
|
|
5330
6250
|
exitCreate();
|
|
5331
6251
|
openDiff(pr);
|
|
5332
|
-
}, "
|
|
6252
|
+
}, "y31", $scope0_id)
|
|
5333
6253
|
});
|
|
5334
|
-
_html(`</div><div${_attr_class("
|
|
6254
|
+
_html(`</div><div${_attr_class("_bu")}>`);
|
|
5335
6255
|
_if(() => {
|
|
5336
6256
|
if (error) {
|
|
5337
6257
|
const $scope8_id = _scope_id();
|
|
5338
6258
|
toast_default({
|
|
5339
6259
|
onDismiss: _resume(function() {
|
|
5340
6260
|
error = null;
|
|
5341
|
-
}, "
|
|
5342
|
-
content: _content_resume("
|
|
6261
|
+
}, "y32", $scope8_id),
|
|
6262
|
+
content: _content_resume("y49", () => {
|
|
5343
6263
|
_scope_reason();
|
|
5344
6264
|
const $scope9_id = _scope_id();
|
|
5345
6265
|
_html(`${_escape(error)}${_el_resume($scope9_id, "a")}`);
|
|
@@ -5367,16 +6287,16 @@ var work_view_default = _template("x", (input) => {
|
|
|
5367
6287
|
findOpen: reviewFindOpen,
|
|
5368
6288
|
findOpenChange: _resume((_new_reviewFindOpen) => {
|
|
5369
6289
|
reviewFindOpen = _new_reviewFindOpen;
|
|
5370
|
-
}, "
|
|
6290
|
+
}, "y1", $scope1_id),
|
|
5371
6291
|
findTick: reviewFindTick,
|
|
5372
6292
|
findFocusRef: reviewFindFocus,
|
|
5373
6293
|
onSent: _resume(function(sessionId) {
|
|
5374
6294
|
tab = sessionId;
|
|
5375
6295
|
view = "term";
|
|
5376
|
-
}, "
|
|
6296
|
+
}, "y2", $scope1_id),
|
|
5377
6297
|
onExit: _resume(function() {
|
|
5378
6298
|
view = "term";
|
|
5379
|
-
}, "
|
|
6299
|
+
}, "y3", $scope1_id)
|
|
5380
6300
|
});
|
|
5381
6301
|
_show_end($scope1_id, "d", $show);
|
|
5382
6302
|
writeScope($scope1_id, {});
|
|
@@ -5394,10 +6314,10 @@ var work_view_default = _template("x", (input) => {
|
|
|
5394
6314
|
workspace: ws,
|
|
5395
6315
|
workspaceChange: _resume(function(next) {
|
|
5396
6316
|
input.onWorkspaceChange?.(next);
|
|
5397
|
-
}, "
|
|
6317
|
+
}, "y33", $scope2_id),
|
|
5398
6318
|
onDeleted: _resume(function() {
|
|
5399
6319
|
input.onWorkspaceDeleted?.(ws.id);
|
|
5400
|
-
}, "
|
|
6320
|
+
}, "y34", $scope2_id)
|
|
5401
6321
|
});
|
|
5402
6322
|
_show_end($scope2_id, "d", $show2);
|
|
5403
6323
|
writeScope($scope2_id, { b: _serialize_if($scope0_reason, 2) && _existing_scope($childScope2) });
|
|
@@ -5405,21 +6325,24 @@ var work_view_default = _template("x", (input) => {
|
|
|
5405
6325
|
}
|
|
5406
6326
|
}, $scope0_id, "g");
|
|
5407
6327
|
_if(() => {
|
|
5408
|
-
if (
|
|
6328
|
+
if (settingsMounted) {
|
|
5409
6329
|
const $scope3_id = _scope_id();
|
|
5410
|
-
const $show3 = view === "
|
|
6330
|
+
const $show3 = view === "settings";
|
|
5411
6331
|
_show_start($show3, 1);
|
|
5412
6332
|
_set_serialize_reason({
|
|
5413
|
-
0: _serialize_guard($scope0_reason,
|
|
6333
|
+
0: _serialize_guard($scope0_reason, 7),
|
|
5414
6334
|
1: $sg__input_agents
|
|
5415
6335
|
});
|
|
5416
6336
|
const $childScope3 = _peek_scope_id();
|
|
5417
|
-
|
|
6337
|
+
settings_page_default({
|
|
5418
6338
|
preferred: input.preferred,
|
|
5419
6339
|
agents: input.agents,
|
|
5420
6340
|
preferredChange: _resume(function(agent) {
|
|
5421
6341
|
input.onPreferredChange?.(agent);
|
|
5422
|
-
}, "
|
|
6342
|
+
}, "y35", $scope3_id),
|
|
6343
|
+
agentsChange: _resume(function(agents) {
|
|
6344
|
+
input.onAgentsChange?.(agents);
|
|
6345
|
+
}, "y36", $scope3_id)
|
|
5423
6346
|
});
|
|
5424
6347
|
_show_end($scope3_id, "d", $show3);
|
|
5425
6348
|
writeScope($scope3_id, { b: _serialize_if($scope0_reason, 3) && _existing_scope($childScope3) });
|
|
@@ -5427,13 +6350,13 @@ var work_view_default = _template("x", (input) => {
|
|
|
5427
6350
|
}
|
|
5428
6351
|
}, $scope0_id, "h");
|
|
5429
6352
|
_if(() => {}, $scope0_id, "i");
|
|
5430
|
-
_html(`<div${_attr_class(["
|
|
6353
|
+
_html(`<div${_attr_class(["_bw", { ["_bv"]: view !== "term" }])}>`);
|
|
5431
6354
|
_if(() => {
|
|
5432
6355
|
if (shownSessions) {
|
|
5433
6356
|
const $scope5_id = _scope_id();
|
|
5434
6357
|
_for_of(shownSessions, (s) => {
|
|
5435
6358
|
const $scope6_id = _scope_id();
|
|
5436
|
-
_html(`<div${_attr_class(["
|
|
6359
|
+
_html(`<div${_attr_class(["_bx", { ["_by"]: s.id === curTab }])}>`);
|
|
5437
6360
|
_set_serialize_reason({
|
|
5438
6361
|
0: 1,
|
|
5439
6362
|
1: 1,
|
|
@@ -5461,35 +6384,35 @@ var work_view_default = _template("x", (input) => {
|
|
|
5461
6384
|
onNewSession: _resume(function(agent) {
|
|
5462
6385
|
view = "term";
|
|
5463
6386
|
newSession(ws.id, agent);
|
|
5464
|
-
}, "
|
|
6387
|
+
}, "y40", $scope6_id),
|
|
5465
6388
|
onOpenTab: _resume(function(id) {
|
|
5466
6389
|
tab = id;
|
|
5467
6390
|
view = "term";
|
|
5468
|
-
}, "
|
|
6391
|
+
}, "y41", $scope6_id),
|
|
5469
6392
|
onCloseSession: _resume(function(id) {
|
|
5470
6393
|
closeSession(id);
|
|
5471
|
-
}, "
|
|
6394
|
+
}, "y42", $scope6_id),
|
|
5472
6395
|
onRenameSession: _resume(function(id, title) {
|
|
5473
6396
|
renameSession(id, title);
|
|
5474
|
-
}, "
|
|
6397
|
+
}, "y43", $scope6_id),
|
|
5475
6398
|
active: input.active && view === "term" && s.id === curTab,
|
|
5476
6399
|
mode: view,
|
|
5477
6400
|
onToggleDiff: _resume(function() {
|
|
5478
6401
|
toggleDiff();
|
|
5479
|
-
}, "
|
|
6402
|
+
}, "y44", $scope6_id),
|
|
5480
6403
|
onExitReview: _resume(function() {
|
|
5481
6404
|
view = "term";
|
|
5482
|
-
}, "
|
|
6405
|
+
}, "y45", $scope6_id),
|
|
5483
6406
|
onOpenNav: _resume(function() {
|
|
5484
6407
|
toggleNav();
|
|
5485
|
-
}, "
|
|
6408
|
+
}, "y46", $scope6_id),
|
|
5486
6409
|
onManage: _resume(function() {
|
|
5487
6410
|
toggleManage();
|
|
5488
|
-
}, "
|
|
6411
|
+
}, "y47", $scope6_id),
|
|
5489
6412
|
reviewFindOpen,
|
|
5490
6413
|
onToggleReviewFind: _resume(function() {
|
|
5491
6414
|
toggleReviewFind();
|
|
5492
|
-
}, "
|
|
6415
|
+
}, "y48", $scope6_id)
|
|
5493
6416
|
});
|
|
5494
6417
|
_html(`</div>${_el_resume($scope6_id, "a")}`);
|
|
5495
6418
|
_subscribe($newSession2__closures, _subscribe($renameSession2__closures, _subscribe($closeSession2__closures, _subscribe($toggleReviewFind2__closures, _subscribe($curTab__closures, _subscribe($shownSessions__closures, _subscribe($si__input_workspace && $ws_name__closures, _subscribe($si__input_workspace && $ws_id__closures, _subscribe($reviewFindOpen__closures, _subscribe($view__closures, _subscribe($si__input_agents && $input_agents__closures, _subscribe($si__input_active && $input_active__closures, writeScope($scope6_id, {
|
|
@@ -5500,8 +6423,8 @@ var work_view_default = _template("x", (input) => {
|
|
|
5500
6423
|
_if(() => {
|
|
5501
6424
|
if (!shownSessions.length && view === "term") {
|
|
5502
6425
|
const $scope7_id = _scope_id();
|
|
5503
|
-
_html(`<div${_attr_class("
|
|
5504
|
-
_script($scope7_id, "
|
|
6426
|
+
_html(`<div${_attr_class("_bA")}><p${_attr_class("_bB")}>No sessions in this workspace.</p><button${_attr_class(["_h", "_i"])}${_attr("disabled", spawning)}>${spawning ? "Starting…" : `Start ${_escape(`${input.preferred || "claude"}`)}`}${_el_resume($scope7_id, "d")}</button>${_el_resume($scope7_id, "c")}</div>`);
|
|
6427
|
+
_script($scope7_id, "y50");
|
|
5505
6428
|
_subscribe($spawning__closures, _subscribe($si__input_preferred && $input_preferred__closures, writeScope($scope7_id, {})));
|
|
5506
6429
|
return 0;
|
|
5507
6430
|
}
|
|
@@ -5510,19 +6433,19 @@ var work_view_default = _template("x", (input) => {
|
|
|
5510
6433
|
return 0;
|
|
5511
6434
|
} else {
|
|
5512
6435
|
const $scope10_id = _scope_id();
|
|
5513
|
-
_html(`<p${_attr_class("
|
|
6436
|
+
_html(`<p${_attr_class("_bz")}>Loading sessions…</p>`);
|
|
5514
6437
|
writeScope($scope10_id, {});
|
|
5515
6438
|
return 1;
|
|
5516
6439
|
}
|
|
5517
6440
|
}, $scope0_id, "j", 1, 1, 1, "</div>");
|
|
5518
6441
|
_html(`</div></div>${_el_resume($scope0_id, "a")}`);
|
|
5519
|
-
_script($scope0_id, "
|
|
5520
|
-
_script($scope0_id, "
|
|
5521
|
-
_script($scope0_id, "
|
|
5522
|
-
_script($scope0_id, "
|
|
5523
|
-
_script($scope0_id, "
|
|
5524
|
-
_script($scope0_id, "
|
|
5525
|
-
_script($scope0_id, "
|
|
6442
|
+
_script($scope0_id, "y51");
|
|
6443
|
+
_script($scope0_id, "y52");
|
|
6444
|
+
_script($scope0_id, "y53");
|
|
6445
|
+
_script($scope0_id, "y54");
|
|
6446
|
+
_script($scope0_id, "y55");
|
|
6447
|
+
_script($scope0_id, "y56");
|
|
6448
|
+
_script($scope0_id, "y57");
|
|
5526
6449
|
writeScope($scope0_id, {
|
|
5527
6450
|
n: input.allStatus,
|
|
5528
6451
|
o: input.active,
|
|
@@ -5538,62 +6461,63 @@ var work_view_default = _template("x", (input) => {
|
|
|
5538
6461
|
y: input.onWorkspaceChange,
|
|
5539
6462
|
z: input.onWorkspaceDeleted,
|
|
5540
6463
|
a0: input.onPreferredChange,
|
|
5541
|
-
a1: input.
|
|
5542
|
-
a2:
|
|
5543
|
-
a3:
|
|
5544
|
-
a4:
|
|
5545
|
-
|
|
5546
|
-
a7:
|
|
5547
|
-
|
|
5548
|
-
|
|
5549
|
-
|
|
5550
|
-
ag:
|
|
5551
|
-
|
|
5552
|
-
aj:
|
|
5553
|
-
|
|
5554
|
-
am:
|
|
5555
|
-
an:
|
|
5556
|
-
ao: ws
|
|
5557
|
-
|
|
5558
|
-
at: ws?.
|
|
5559
|
-
au: ws?.
|
|
5560
|
-
av:
|
|
5561
|
-
|
|
5562
|
-
|
|
5563
|
-
|
|
5564
|
-
b3:
|
|
5565
|
-
b4:
|
|
5566
|
-
b5:
|
|
5567
|
-
b6:
|
|
5568
|
-
|
|
5569
|
-
b9:
|
|
5570
|
-
|
|
5571
|
-
|
|
5572
|
-
be:
|
|
5573
|
-
|
|
5574
|
-
|
|
5575
|
-
|
|
5576
|
-
bn:
|
|
5577
|
-
|
|
5578
|
-
|
|
5579
|
-
bt:
|
|
5580
|
-
bu:
|
|
6464
|
+
a1: input.onAgentsChange,
|
|
6465
|
+
a2: input.onCreated,
|
|
6466
|
+
a3: sessions,
|
|
6467
|
+
a4: tab,
|
|
6468
|
+
a5: view,
|
|
6469
|
+
a7: diffMounted,
|
|
6470
|
+
a8: DiffView,
|
|
6471
|
+
aa: loadDiffView,
|
|
6472
|
+
ae: reviewFindOpen,
|
|
6473
|
+
ag: reviewFindTick,
|
|
6474
|
+
ah: reviewFindFocus,
|
|
6475
|
+
aj: focusPr,
|
|
6476
|
+
ak: focusNonce,
|
|
6477
|
+
am: error,
|
|
6478
|
+
an: spawning,
|
|
6479
|
+
ao: ws,
|
|
6480
|
+
ap: ws?.id,
|
|
6481
|
+
at: ws?.status,
|
|
6482
|
+
au: ws?.branch,
|
|
6483
|
+
av: ws?.name,
|
|
6484
|
+
aw: openDiff,
|
|
6485
|
+
ay: openManage,
|
|
6486
|
+
b1: openSettings,
|
|
6487
|
+
b3: toggleSettings,
|
|
6488
|
+
b4: toggleNav,
|
|
6489
|
+
b5: toggleManage,
|
|
6490
|
+
b6: toggleDiff,
|
|
6491
|
+
b7: shownSessions,
|
|
6492
|
+
b9: shownSessions?.length,
|
|
6493
|
+
ba: curTab,
|
|
6494
|
+
bc: createGate.open,
|
|
6495
|
+
be: toggleReviewFind,
|
|
6496
|
+
bf: exitCreate,
|
|
6497
|
+
bi: createSession,
|
|
6498
|
+
bl: loadMem.wanted,
|
|
6499
|
+
bn: loadMem.run,
|
|
6500
|
+
bo: loadBody,
|
|
6501
|
+
bq: loadSessions,
|
|
6502
|
+
bt: closeSession,
|
|
6503
|
+
bu: renameSession,
|
|
6504
|
+
bv: newSession,
|
|
5581
6505
|
c: _existing_scope($childScope),
|
|
5582
|
-
|
|
5583
|
-
|
|
5584
|
-
|
|
5585
|
-
|
|
5586
|
-
|
|
5587
|
-
|
|
5588
|
-
|
|
5589
|
-
|
|
5590
|
-
|
|
5591
|
-
|
|
5592
|
-
|
|
5593
|
-
|
|
5594
|
-
|
|
5595
|
-
|
|
5596
|
-
|
|
6506
|
+
ce: $error__closures,
|
|
6507
|
+
bx: $si__input_active && $input_active__closures,
|
|
6508
|
+
c1: $si__input_agents && $input_agents__closures,
|
|
6509
|
+
c7: $view__closures,
|
|
6510
|
+
c9: $reviewFindOpen__closures,
|
|
6511
|
+
ch: $si__input_workspace && $ws_id__closures,
|
|
6512
|
+
cj: $si__input_workspace && $ws_name__closures,
|
|
6513
|
+
ck: $shownSessions__closures,
|
|
6514
|
+
cm: $curTab__closures,
|
|
6515
|
+
cn: $toggleReviewFind2__closures,
|
|
6516
|
+
cp: $closeSession2__closures,
|
|
6517
|
+
cq: $renameSession2__closures,
|
|
6518
|
+
cr: $newSession2__closures,
|
|
6519
|
+
by: $si__input_preferred && $input_preferred__closures,
|
|
6520
|
+
cf: $spawning__closures
|
|
5597
6521
|
});
|
|
5598
6522
|
_resume_branch($scope0_id);
|
|
5599
6523
|
});
|
|
@@ -5701,7 +6625,7 @@ var page_boot_default = _template("n", (input) => {
|
|
|
5701
6625
|
if (!openIds.includes(id)) openIds = openIds.concat(id);
|
|
5702
6626
|
prefs.setLastWorkspace(id);
|
|
5703
6627
|
}, "n4", $scope0_id);
|
|
5704
|
-
_html(`<div${_attr_class("
|
|
6628
|
+
_html(`<div${_attr_class("_A")}>`);
|
|
5705
6629
|
_if(() => {
|
|
5706
6630
|
if (error) {
|
|
5707
6631
|
const $scope4_id = _scope_id();
|
|
@@ -5709,7 +6633,7 @@ var page_boot_default = _template("n", (input) => {
|
|
|
5709
6633
|
onDismiss: _resume(function() {
|
|
5710
6634
|
error = null;
|
|
5711
6635
|
}, "n5", $scope4_id),
|
|
5712
|
-
content: _content_resume("
|
|
6636
|
+
content: _content_resume("n19", () => {
|
|
5713
6637
|
_scope_reason();
|
|
5714
6638
|
const $scope5_id = _scope_id();
|
|
5715
6639
|
_html(`${_escape(error)}${_el_resume($scope5_id, "a")}`);
|
|
@@ -5769,36 +6693,43 @@ var page_boot_default = _template("n", (input) => {
|
|
|
5769
6693
|
preferredAgent: agent
|
|
5770
6694
|
};
|
|
5771
6695
|
}, "n9", $scope3_id),
|
|
6696
|
+
onAgentsChange: _resume(function(agents) {
|
|
6697
|
+
if (!settings) return;
|
|
6698
|
+
settings = {
|
|
6699
|
+
...settings,
|
|
6700
|
+
agents
|
|
6701
|
+
};
|
|
6702
|
+
}, "n10", $scope3_id),
|
|
5772
6703
|
onSelectWorkspace: _resume(function(wsId) {
|
|
5773
6704
|
openWorkspace(wsId);
|
|
5774
|
-
}, "
|
|
6705
|
+
}, "n11", $scope3_id),
|
|
5775
6706
|
onOpenSession: _resume(function(wsId, sessionId) {
|
|
5776
6707
|
requestTab(wsId, sessionId);
|
|
5777
6708
|
prefs.setWorkspaceTab(wsId, sessionId);
|
|
5778
6709
|
openWorkspace(wsId);
|
|
5779
|
-
}, "
|
|
6710
|
+
}, "n12", $scope3_id),
|
|
5780
6711
|
onManage: _resume(function(wsId) {
|
|
5781
6712
|
const id = wsId || ws.id;
|
|
5782
6713
|
requestManage(id);
|
|
5783
6714
|
openWorkspace(id);
|
|
5784
|
-
}, "
|
|
6715
|
+
}, "n13", $scope3_id),
|
|
5785
6716
|
onWorkspaceChange: _resume(function(next) {
|
|
5786
6717
|
applyWorkspaces(workspaces.map((w) => w.id === next.id ? next : w));
|
|
5787
|
-
}, "
|
|
6718
|
+
}, "n14", $scope3_id),
|
|
5788
6719
|
onWorkspaceDeleted: _resume(function(id) {
|
|
5789
6720
|
applyWorkspaces(workspaces.filter((w) => w.id !== id));
|
|
5790
|
-
}, "
|
|
6721
|
+
}, "n15", $scope3_id),
|
|
5791
6722
|
onNew: _resume(function() {
|
|
5792
6723
|
creating = true;
|
|
5793
|
-
}, "
|
|
6724
|
+
}, "n16", $scope3_id),
|
|
5794
6725
|
onExitCreate: _resume(function() {
|
|
5795
6726
|
creating = false;
|
|
5796
|
-
}, "
|
|
6727
|
+
}, "n17", $scope3_id),
|
|
5797
6728
|
onCreated: _resume(function(ws) {
|
|
5798
6729
|
if (!workspaces.some((w) => w.id === ws.id)) workspaces = [ws, ...workspaces];
|
|
5799
6730
|
creating = false;
|
|
5800
6731
|
openWorkspace(ws.id);
|
|
5801
|
-
}, "
|
|
6732
|
+
}, "n18", $scope3_id)
|
|
5802
6733
|
});
|
|
5803
6734
|
_show_end($scope3_id, "d", $show);
|
|
5804
6735
|
_subscribe($openWorkspace2__closures, _subscribe($applyWorkspaces2__closures, _subscribe($creating__closures, _subscribe($selectedId__closures, _subscribe($settings__closures, _subscribe($status__closures, _subscribe($workspaces__closures, writeScope($scope3_id, { b: _existing_scope($childScope2) }))))))));
|
|
@@ -5812,8 +6743,8 @@ var page_boot_default = _template("n", (input) => {
|
|
|
5812
6743
|
});
|
|
5813
6744
|
}, (id) => id, $scope0_id, "d");
|
|
5814
6745
|
_html(`</div>${_el_resume($scope0_id, "a")}`);
|
|
5815
|
-
_script($scope0_id, "n19");
|
|
5816
6746
|
_script($scope0_id, "n20");
|
|
6747
|
+
_script($scope0_id, "n21");
|
|
5817
6748
|
writeScope($scope0_id, {
|
|
5818
6749
|
l: boot?.prefs,
|
|
5819
6750
|
n: workspaces,
|
|
@@ -5895,12 +6826,12 @@ var _marko_run_default = _template("esfPH6H", (input) => {
|
|
|
5895
6826
|
var index_server_entry_default = withPageAssets(_marko_run_default, flush, "esfPH6H");
|
|
5896
6827
|
//#endregion
|
|
5897
6828
|
//#region __marko-run__index.js
|
|
5898
|
-
var getHandler$
|
|
5899
|
-
var get1_options = mergeOptions(getHandler$
|
|
6829
|
+
var getHandler$18 = normalizeHandler(GET$18, "GET");
|
|
6830
|
+
var get1_options = mergeOptions(getHandler$18);
|
|
5900
6831
|
var head1_options = {};
|
|
5901
6832
|
function get1(context) {
|
|
5902
6833
|
const __page = (data) => render(context, index_server_entry_default, {}, data);
|
|
5903
|
-
return call(getHandler$
|
|
6834
|
+
return call(getHandler$18, __page, context);
|
|
5904
6835
|
}
|
|
5905
6836
|
function head1(context) {
|
|
5906
6837
|
return stripResponseBody(get1(context));
|
|
@@ -5939,7 +6870,7 @@ var _middleware_default = Run.ALL((ctx, next) => {
|
|
|
5939
6870
|
//#endregion
|
|
5940
6871
|
//#region __marko-run__middleware.js
|
|
5941
6872
|
var mware4 = normalizeHandler(_middleware_default$1);
|
|
5942
|
-
var
|
|
6873
|
+
var mware26 = normalizeHandler(_middleware_default);
|
|
5943
6874
|
//#endregion
|
|
5944
6875
|
//#region node_modules/.pnpm/valibot@1.4.2_typescript@6.0.3/node_modules/valibot/dist/index.mjs
|
|
5945
6876
|
var store$4;
|
|
@@ -6609,7 +7540,7 @@ var Query$1 = /* @__PURE__ */ object({
|
|
|
6609
7540
|
});
|
|
6610
7541
|
//#endregion
|
|
6611
7542
|
//#region __marko-run__api.agent-state.js
|
|
6612
|
-
var postHandler$
|
|
7543
|
+
var postHandler$12 = normalizeHandler(Run.POST({ search: (value) => parse(Query$1, value) }, async (ctx) => {
|
|
6613
7544
|
const q = ctx.search;
|
|
6614
7545
|
if (q.session && q.state) {
|
|
6615
7546
|
const payload = await ctx.request.json().catch(() => void 0);
|
|
@@ -6622,9 +7553,9 @@ var postHandler$11 = normalizeHandler(Run.POST({ search: (value) => parse(Query$
|
|
|
6622
7553
|
else setAgentPhase(body.session, body.state, body.reason);
|
|
6623
7554
|
return Response.json({ ok: true });
|
|
6624
7555
|
}), "POST");
|
|
6625
|
-
var post2_options = mergeOptions(mware4, postHandler$
|
|
7556
|
+
var post2_options = mergeOptions(mware4, postHandler$12);
|
|
6626
7557
|
function post2(context) {
|
|
6627
|
-
const __postHandler = (data) => call(postHandler$
|
|
7558
|
+
const __postHandler = (data) => call(postHandler$12, noContent, context, data);
|
|
6628
7559
|
return call(mware4, __postHandler, context);
|
|
6629
7560
|
}
|
|
6630
7561
|
//#endregion
|
|
@@ -6721,13 +7652,13 @@ startScraper();
|
|
|
6721
7652
|
startStatusWatch();
|
|
6722
7653
|
//#endregion
|
|
6723
7654
|
//#region __marko-run__api.boot.js
|
|
6724
|
-
var getHandler$
|
|
7655
|
+
var getHandler$17 = normalizeHandler(Run.GET(() => {
|
|
6725
7656
|
return Response.json({ boot: BOOT_ID }, { headers: { "cache-control": "no-store" } });
|
|
6726
7657
|
}), "GET");
|
|
6727
|
-
var get3_options = mergeOptions(mware4, getHandler$
|
|
7658
|
+
var get3_options = mergeOptions(mware4, getHandler$17);
|
|
6728
7659
|
var head3_options = mergeOptions(mware4);
|
|
6729
7660
|
function get3(context) {
|
|
6730
|
-
const __getHandler = (data) => call(getHandler$
|
|
7661
|
+
const __getHandler = (data) => call(getHandler$17, noContent, context, data);
|
|
6731
7662
|
return call(mware4, __getHandler, context);
|
|
6732
7663
|
}
|
|
6733
7664
|
function head3(context) {
|
|
@@ -6735,11 +7666,11 @@ function head3(context) {
|
|
|
6735
7666
|
}
|
|
6736
7667
|
//#endregion
|
|
6737
7668
|
//#region __marko-run__api.events.js
|
|
6738
|
-
var getHandler$
|
|
6739
|
-
var get4_options = mergeOptions(mware4, getHandler$
|
|
7669
|
+
var getHandler$16 = normalizeHandler(Run.GET(() => Response.json({ error: "events bus is websocket — connect with ws(s)://host/api/events" }, { status: 410 })), "GET");
|
|
7670
|
+
var get4_options = mergeOptions(mware4, getHandler$16);
|
|
6740
7671
|
var head4_options = mergeOptions(mware4);
|
|
6741
7672
|
function get4(context) {
|
|
6742
|
-
const __getHandler = (data) => call(getHandler$
|
|
7673
|
+
const __getHandler = (data) => call(getHandler$16, noContent, context, data);
|
|
6743
7674
|
return call(mware4, __getHandler, context);
|
|
6744
7675
|
}
|
|
6745
7676
|
function head4(context) {
|
|
@@ -6751,27 +7682,27 @@ var Pref = /* @__PURE__ */ object({
|
|
|
6751
7682
|
key: /* @__PURE__ */ pipe(/* @__PURE__ */ string(), /* @__PURE__ */ maxLength(120)),
|
|
6752
7683
|
value: /* @__PURE__ */ nullable(/* @__PURE__ */ pipe(/* @__PURE__ */ string(), /* @__PURE__ */ maxLength(4096)))
|
|
6753
7684
|
});
|
|
6754
|
-
var GET$
|
|
7685
|
+
var GET$15 = Run.GET(() => Response.json(allPrefs()));
|
|
6755
7686
|
//#endregion
|
|
6756
7687
|
//#region __marko-run__api.prefs.js
|
|
6757
|
-
var postHandler$
|
|
7688
|
+
var postHandler$11 = normalizeHandler(Run.POST({ json: Pref }, async (ctx) => {
|
|
6758
7689
|
const body = await readBody(ctx);
|
|
6759
7690
|
setPref(body.key, body.value);
|
|
6760
7691
|
return Response.json({ ok: true });
|
|
6761
7692
|
}), "POST");
|
|
6762
|
-
var getHandler$
|
|
6763
|
-
var get5_options = mergeOptions(mware4, getHandler$
|
|
7693
|
+
var getHandler$15 = normalizeHandler(GET$15, "GET");
|
|
7694
|
+
var get5_options = mergeOptions(mware4, getHandler$15);
|
|
6764
7695
|
var head5_options = mergeOptions(mware4);
|
|
6765
|
-
var post5_options = mergeOptions(mware4, postHandler$
|
|
7696
|
+
var post5_options = mergeOptions(mware4, postHandler$11);
|
|
6766
7697
|
function get5(context) {
|
|
6767
|
-
const __getHandler = (data) => call(getHandler$
|
|
7698
|
+
const __getHandler = (data) => call(getHandler$15, noContent, context, data);
|
|
6768
7699
|
return call(mware4, __getHandler, context);
|
|
6769
7700
|
}
|
|
6770
7701
|
function head5(context) {
|
|
6771
7702
|
return stripResponseBody(get5(context));
|
|
6772
7703
|
}
|
|
6773
7704
|
function post5(context) {
|
|
6774
|
-
const __postHandler = (data) => call(postHandler$
|
|
7705
|
+
const __postHandler = (data) => call(postHandler$11, noContent, context, data);
|
|
6775
7706
|
return call(mware4, __postHandler, context);
|
|
6776
7707
|
}
|
|
6777
7708
|
//#endregion
|
|
@@ -6792,15 +7723,15 @@ function delete6(context) {
|
|
|
6792
7723
|
}
|
|
6793
7724
|
//#endregion
|
|
6794
7725
|
//#region __marko-run__api.progress.js
|
|
6795
|
-
var getHandler$
|
|
7726
|
+
var getHandler$14 = normalizeHandler(Run.GET((ctx) => {
|
|
6796
7727
|
const params = new URL(ctx.request.url).searchParams;
|
|
6797
7728
|
const since = params.get("since");
|
|
6798
7729
|
return Response.json(progressSince(since === null ? void 0 : Number(since), params.get("op") || void 0));
|
|
6799
7730
|
}), "GET");
|
|
6800
|
-
var get7_options = mergeOptions(mware4, getHandler$
|
|
7731
|
+
var get7_options = mergeOptions(mware4, getHandler$14);
|
|
6801
7732
|
var head7_options = mergeOptions(mware4);
|
|
6802
7733
|
function get7(context) {
|
|
6803
|
-
const __getHandler = (data) => call(getHandler$
|
|
7734
|
+
const __getHandler = (data) => call(getHandler$14, noContent, context, data);
|
|
6804
7735
|
return call(mware4, __getHandler, context);
|
|
6805
7736
|
}
|
|
6806
7737
|
function head7(context) {
|
|
@@ -6808,7 +7739,7 @@ function head7(context) {
|
|
|
6808
7739
|
}
|
|
6809
7740
|
//#endregion
|
|
6810
7741
|
//#region src/routes/api/push/+handler.ts
|
|
6811
|
-
var GET$
|
|
7742
|
+
var GET$13 = Run.GET(() => Response.json({ publicKey: pushPublicKey() }));
|
|
6812
7743
|
var Subscription = /* @__PURE__ */ object({
|
|
6813
7744
|
endpoint: /* @__PURE__ */ pipe(/* @__PURE__ */ string(), /* @__PURE__ */ url()),
|
|
6814
7745
|
keys: /* @__PURE__ */ object({
|
|
@@ -6816,7 +7747,7 @@ var Subscription = /* @__PURE__ */ object({
|
|
|
6816
7747
|
auth: /* @__PURE__ */ string()
|
|
6817
7748
|
})
|
|
6818
7749
|
});
|
|
6819
|
-
var POST$
|
|
7750
|
+
var POST$10 = Run.POST({ json: Subscription }, async (ctx) => {
|
|
6820
7751
|
saveSubscription(await readBody(ctx));
|
|
6821
7752
|
return Response.json({ ok: true });
|
|
6822
7753
|
});
|
|
@@ -6826,21 +7757,21 @@ var deleteHandler$3 = normalizeHandler(Run.DELETE({ search: (value) => ({ endpoi
|
|
|
6826
7757
|
deleteSubscription(ctx.search.endpoint);
|
|
6827
7758
|
return Response.json({ ok: true });
|
|
6828
7759
|
}), "DELETE");
|
|
6829
|
-
var postHandler$
|
|
6830
|
-
var getHandler$
|
|
6831
|
-
var get8_options = mergeOptions(mware4, getHandler$
|
|
7760
|
+
var postHandler$10 = normalizeHandler(POST$10, "POST");
|
|
7761
|
+
var getHandler$13 = normalizeHandler(GET$13, "GET");
|
|
7762
|
+
var get8_options = mergeOptions(mware4, getHandler$13);
|
|
6832
7763
|
var head8_options = mergeOptions(mware4);
|
|
6833
|
-
var post8_options = mergeOptions(mware4, postHandler$
|
|
7764
|
+
var post8_options = mergeOptions(mware4, postHandler$10);
|
|
6834
7765
|
var delete8_options = mergeOptions(mware4, deleteHandler$3);
|
|
6835
7766
|
function get8(context) {
|
|
6836
|
-
const __getHandler = (data) => call(getHandler$
|
|
7767
|
+
const __getHandler = (data) => call(getHandler$13, noContent, context, data);
|
|
6837
7768
|
return call(mware4, __getHandler, context);
|
|
6838
7769
|
}
|
|
6839
7770
|
function head8(context) {
|
|
6840
7771
|
return stripResponseBody(get8(context));
|
|
6841
7772
|
}
|
|
6842
7773
|
function post8(context) {
|
|
6843
|
-
const __postHandler = (data) => call(postHandler$
|
|
7774
|
+
const __postHandler = (data) => call(postHandler$10, noContent, context, data);
|
|
6844
7775
|
return call(mware4, __postHandler, context);
|
|
6845
7776
|
}
|
|
6846
7777
|
function delete8(context) {
|
|
@@ -6855,7 +7786,7 @@ var Query = /* @__PURE__ */ object({
|
|
|
6855
7786
|
});
|
|
6856
7787
|
//#endregion
|
|
6857
7788
|
//#region __marko-run__api.repo-pushed.js
|
|
6858
|
-
var postHandler$
|
|
7789
|
+
var postHandler$9 = normalizeHandler(Run.POST({ search: (value) => parse(Query, value) }, async (ctx) => {
|
|
6859
7790
|
if (ctx.search.token !== hookToken()) return Response.json({ error: "bad token" }, { status: 403 });
|
|
6860
7791
|
notePushActivity();
|
|
6861
7792
|
const targets = activeRepoTargets().filter((t) => t.fullName === ctx.search.repo);
|
|
@@ -6866,9 +7797,9 @@ var postHandler$8 = normalizeHandler(Run.POST({ search: (value) => parse(Query,
|
|
|
6866
7797
|
pokeStatusWatch();
|
|
6867
7798
|
return Response.json({ ok: true });
|
|
6868
7799
|
}), "POST");
|
|
6869
|
-
var post9_options = mergeOptions(mware4, postHandler$
|
|
7800
|
+
var post9_options = mergeOptions(mware4, postHandler$9);
|
|
6870
7801
|
function post9(context) {
|
|
6871
|
-
const __postHandler = (data) => call(postHandler$
|
|
7802
|
+
const __postHandler = (data) => call(postHandler$9, noContent, context, data);
|
|
6872
7803
|
return call(mware4, __postHandler, context);
|
|
6873
7804
|
}
|
|
6874
7805
|
//#endregion
|
|
@@ -6948,11 +7879,11 @@ var branches = swr(3e5, async (fullName) => {
|
|
|
6948
7879
|
});
|
|
6949
7880
|
//#endregion
|
|
6950
7881
|
//#region __marko-run__api.repos.js
|
|
6951
|
-
var getHandler$
|
|
6952
|
-
var get10_options = mergeOptions(mware4, getHandler$
|
|
7882
|
+
var getHandler$12 = normalizeHandler(Run.GET({ search: (value) => ({ refresh: "refresh" in value }) }, async (ctx) => Response.json(await repoCatalog(ctx.search.refresh))), "GET");
|
|
7883
|
+
var get10_options = mergeOptions(mware4, getHandler$12);
|
|
6953
7884
|
var head10_options = mergeOptions(mware4);
|
|
6954
7885
|
function get10(context) {
|
|
6955
|
-
const __getHandler = (data) => call(getHandler$
|
|
7886
|
+
const __getHandler = (data) => call(getHandler$12, noContent, context, data);
|
|
6956
7887
|
return call(mware4, __getHandler, context);
|
|
6957
7888
|
}
|
|
6958
7889
|
function head10(context) {
|
|
@@ -6960,15 +7891,15 @@ function head10(context) {
|
|
|
6960
7891
|
}
|
|
6961
7892
|
//#endregion
|
|
6962
7893
|
//#region __marko-run__api.repos.branches.js
|
|
6963
|
-
var getHandler$
|
|
7894
|
+
var getHandler$11 = normalizeHandler(Run.GET({ search: (value) => {
|
|
6964
7895
|
const repo = typeof value.repo === "string" ? value.repo : "";
|
|
6965
7896
|
if (!/^[\w.-]+\/[\w.-]+$/.test(repo)) throw httpError(400, "invalid repo");
|
|
6966
7897
|
return { repo };
|
|
6967
7898
|
} }, async (ctx) => Response.json({ branches: await repoBranches(ctx.search.repo) })), "GET");
|
|
6968
|
-
var get11_options = mergeOptions(mware4, getHandler$
|
|
7899
|
+
var get11_options = mergeOptions(mware4, getHandler$11);
|
|
6969
7900
|
var head11_options = mergeOptions(mware4);
|
|
6970
7901
|
function get11(context) {
|
|
6971
|
-
const __getHandler = (data) => call(getHandler$
|
|
7902
|
+
const __getHandler = (data) => call(getHandler$11, noContent, context, data);
|
|
6972
7903
|
return call(mware4, __getHandler, context);
|
|
6973
7904
|
}
|
|
6974
7905
|
function head11(context) {
|
|
@@ -7044,7 +7975,7 @@ var Send = /* @__PURE__ */ object({
|
|
|
7044
7975
|
});
|
|
7045
7976
|
//#endregion
|
|
7046
7977
|
//#region __marko-run__api.sessions.$.send.js
|
|
7047
|
-
var postHandler$
|
|
7978
|
+
var postHandler$8 = normalizeHandler(Run.POST({ json: Send }, async (ctx) => {
|
|
7048
7979
|
const body = await readBody(ctx);
|
|
7049
7980
|
await sendToSession(ctx.params.id, body.text, body.cols && body.rows ? {
|
|
7050
7981
|
cols: body.cols,
|
|
@@ -7052,33 +7983,44 @@ var postHandler$7 = normalizeHandler(Run.POST({ json: Send }, async (ctx) => {
|
|
|
7052
7983
|
} : void 0);
|
|
7053
7984
|
return Response.json({ ok: true });
|
|
7054
7985
|
}), "POST");
|
|
7055
|
-
var post14_options = mergeOptions(mware4, postHandler$
|
|
7986
|
+
var post14_options = mergeOptions(mware4, postHandler$8);
|
|
7056
7987
|
function post14(context) {
|
|
7057
|
-
const __postHandler = (data) => call(postHandler$
|
|
7988
|
+
const __postHandler = (data) => call(postHandler$8, noContent, context, data);
|
|
7058
7989
|
return call(mware4, __postHandler, context);
|
|
7059
7990
|
}
|
|
7060
7991
|
//#endregion
|
|
7061
7992
|
//#region src/routes/api/settings/+handler.ts
|
|
7062
|
-
var
|
|
7063
|
-
|
|
7064
|
-
|
|
7065
|
-
|
|
7066
|
-
agents: AGENTS
|
|
7067
|
-
});
|
|
7993
|
+
var Patch = /* @__PURE__ */ object({
|
|
7994
|
+
preferredAgent: /* @__PURE__ */ optional(/* @__PURE__ */ string()),
|
|
7995
|
+
/** Instance ids to switch off in pickers (installed but unwanted). */
|
|
7996
|
+
disabledAgents: /* @__PURE__ */ optional(/* @__PURE__ */ array(/* @__PURE__ */ string()))
|
|
7068
7997
|
});
|
|
7998
|
+
function snapshot() {
|
|
7999
|
+
return {
|
|
8000
|
+
preferredAgent: preferredAgent(),
|
|
8001
|
+
agents: enabledAgents(),
|
|
8002
|
+
catalog: agentChoices(),
|
|
8003
|
+
disabledAgents: [...disabledAgents()]
|
|
8004
|
+
};
|
|
8005
|
+
}
|
|
8006
|
+
var GET$10 = Run.GET(() => Response.json(snapshot()));
|
|
7069
8007
|
//#endregion
|
|
7070
8008
|
//#region __marko-run__api.settings.js
|
|
7071
|
-
var putHandler = normalizeHandler(Run.PUT({ json:
|
|
8009
|
+
var putHandler = normalizeHandler(Run.PUT({ json: Patch }, async (ctx) => {
|
|
7072
8010
|
const body = await readBody(ctx);
|
|
7073
|
-
|
|
7074
|
-
|
|
8011
|
+
if (body.disabledAgents) setDisabledAgents(body.disabledAgents.filter((id) => id !== "shell"));
|
|
8012
|
+
if (body.preferredAgent !== void 0) {
|
|
8013
|
+
if (!agentChoices().some((a) => a.id === body.preferredAgent)) throw httpError(400, `unknown agent: ${body.preferredAgent}`);
|
|
8014
|
+
setSetting("preferredAgent", body.preferredAgent);
|
|
8015
|
+
}
|
|
8016
|
+
return Response.json(snapshot());
|
|
7075
8017
|
}), "PUT");
|
|
7076
|
-
var getHandler$
|
|
7077
|
-
var get15_options = mergeOptions(mware4, getHandler$
|
|
8018
|
+
var getHandler$10 = normalizeHandler(GET$10, "GET");
|
|
8019
|
+
var get15_options = mergeOptions(mware4, getHandler$10);
|
|
7078
8020
|
var head15_options = mergeOptions(mware4);
|
|
7079
8021
|
var put15_options = mergeOptions(mware4, putHandler);
|
|
7080
8022
|
function get15(context) {
|
|
7081
|
-
const __getHandler = (data) => call(getHandler$
|
|
8023
|
+
const __getHandler = (data) => call(getHandler$10, noContent, context, data);
|
|
7082
8024
|
return call(mware4, __getHandler, context);
|
|
7083
8025
|
}
|
|
7084
8026
|
function head15(context) {
|
|
@@ -7089,19 +8031,385 @@ function put15(context) {
|
|
|
7089
8031
|
return call(mware4, __putHandler, context);
|
|
7090
8032
|
}
|
|
7091
8033
|
//#endregion
|
|
8034
|
+
//#region lib/setup/install.mjs
|
|
8035
|
+
/**
|
|
8036
|
+
* Run a command, streaming each output line to `log`.
|
|
8037
|
+
* `interactive` hands the terminal over (CLI prompts such as gh's device
|
|
8038
|
+
* flow); otherwise stdout/err are captured line by line and `input` (if
|
|
8039
|
+
* any) is written to stdin before it closes.
|
|
8040
|
+
*/
|
|
8041
|
+
function runStreaming(cmd, args, { log = () => {}, interactive = false, input, env, timeout = 9e5 } = {}) {
|
|
8042
|
+
return new Promise((resolve, reject) => {
|
|
8043
|
+
const child = spawn(cmd, args, {
|
|
8044
|
+
stdio: interactive ? "inherit" : [
|
|
8045
|
+
"pipe",
|
|
8046
|
+
"pipe",
|
|
8047
|
+
"pipe"
|
|
8048
|
+
],
|
|
8049
|
+
env: {
|
|
8050
|
+
...process.env,
|
|
8051
|
+
...env,
|
|
8052
|
+
PATH: setupPath()
|
|
8053
|
+
}
|
|
8054
|
+
});
|
|
8055
|
+
const lines = [];
|
|
8056
|
+
let buf = "";
|
|
8057
|
+
const onData = (chunk) => {
|
|
8058
|
+
buf += String(chunk);
|
|
8059
|
+
let i;
|
|
8060
|
+
while ((i = buf.search(/\r?\n/)) >= 0) {
|
|
8061
|
+
const line = buf.slice(0, i).replace(/\x1b\[[0-9;]*[A-Za-z]/g, "").trimEnd();
|
|
8062
|
+
buf = buf.slice(i + (buf[i] === "\r" ? 2 : 1));
|
|
8063
|
+
if (line) {
|
|
8064
|
+
lines.push(line);
|
|
8065
|
+
log(line);
|
|
8066
|
+
}
|
|
8067
|
+
}
|
|
8068
|
+
};
|
|
8069
|
+
child.stdout?.on("data", onData);
|
|
8070
|
+
child.stderr?.on("data", onData);
|
|
8071
|
+
if (child.stdin) {
|
|
8072
|
+
if (input) child.stdin.write(input);
|
|
8073
|
+
child.stdin.end();
|
|
8074
|
+
}
|
|
8075
|
+
const timer = setTimeout(() => child.kill("SIGTERM"), timeout);
|
|
8076
|
+
child.on("error", (err) => {
|
|
8077
|
+
clearTimeout(timer);
|
|
8078
|
+
reject(err);
|
|
8079
|
+
});
|
|
8080
|
+
child.on("close", (code) => {
|
|
8081
|
+
clearTimeout(timer);
|
|
8082
|
+
if (buf.trim()) onData("\n");
|
|
8083
|
+
if (code === 0) resolve(lines);
|
|
8084
|
+
else reject(/* @__PURE__ */ new Error(`${cmd} ${args.join(" ")} exited ${code}${lines.length ? `: ${lines[lines.length - 1]}` : ""}`));
|
|
8085
|
+
});
|
|
8086
|
+
});
|
|
8087
|
+
}
|
|
8088
|
+
/** Fetch a vendor install script to a temp file and run it with `shell`.
|
|
8089
|
+
* Same effect as the documented `curl … | bash`, without piping a network
|
|
8090
|
+
* stream into a login shell: the URL is pinned in the catalog and the
|
|
8091
|
+
* script runs in the setup PATH, not the user's rc. */
|
|
8092
|
+
async function runRemoteScript(url, shell, opts) {
|
|
8093
|
+
const res = await fetch(url, {
|
|
8094
|
+
redirect: "follow",
|
|
8095
|
+
signal: AbortSignal.timeout(6e4)
|
|
8096
|
+
});
|
|
8097
|
+
if (!res.ok) throw new Error(`${url} → ${res.status}`);
|
|
8098
|
+
const dir = fs.mkdtempSync(path.join(os.tmpdir(), "work-install-"));
|
|
8099
|
+
const file = path.join(dir, "install.sh");
|
|
8100
|
+
fs.writeFileSync(file, await res.text(), { mode: 448 });
|
|
8101
|
+
try {
|
|
8102
|
+
return await runStreaming(shell, [file], opts);
|
|
8103
|
+
} finally {
|
|
8104
|
+
fs.rmSync(dir, {
|
|
8105
|
+
recursive: true,
|
|
8106
|
+
force: true
|
|
8107
|
+
});
|
|
8108
|
+
}
|
|
8109
|
+
}
|
|
8110
|
+
async function installMise(opts = {}) {
|
|
8111
|
+
if (which("mise")) return;
|
|
8112
|
+
opts.log?.("installing mise");
|
|
8113
|
+
await runRemoteScript("https://mise.run", "sh", opts);
|
|
8114
|
+
if (!which("mise")) throw new Error("mise install finished but binary not found");
|
|
8115
|
+
}
|
|
8116
|
+
function miseName(idOrName) {
|
|
8117
|
+
const t = toolById(idOrName);
|
|
8118
|
+
if (t && !t.mise) throw new Error(`${t.label} is a system package — install it with your package manager`);
|
|
8119
|
+
return t ? t.mise : idOrName;
|
|
8120
|
+
}
|
|
8121
|
+
/** `mise use -g name@version` — installs (or re-pins) a global tool. Accepts
|
|
8122
|
+
* catalog ids or any mise registry short name (Settings search). */
|
|
8123
|
+
async function installTool(idOrName, { version = "latest", ...opts } = {}) {
|
|
8124
|
+
await installMise(opts);
|
|
8125
|
+
const name = miseName(idOrName);
|
|
8126
|
+
opts.log?.(`mise use -g ${name}@${version}`);
|
|
8127
|
+
await runStreaming("mise", [
|
|
8128
|
+
"use",
|
|
8129
|
+
"-g",
|
|
8130
|
+
"-y",
|
|
8131
|
+
`${name}@${version}`
|
|
8132
|
+
], opts);
|
|
8133
|
+
}
|
|
8134
|
+
/** Move to the newest release and rewrite the global pin to match
|
|
8135
|
+
* (`--bump`), so an exact pin such as `1.5.0` updates too. */
|
|
8136
|
+
async function updateTool(idOrName, opts = {}) {
|
|
8137
|
+
const name = miseName(idOrName);
|
|
8138
|
+
opts.log?.(`mise upgrade --bump ${name}`);
|
|
8139
|
+
await runStreaming("mise", [
|
|
8140
|
+
"upgrade",
|
|
8141
|
+
"--bump",
|
|
8142
|
+
"-y",
|
|
8143
|
+
name
|
|
8144
|
+
], opts);
|
|
8145
|
+
}
|
|
8146
|
+
/** Drop the global pin and prune its installs. Required tools cannot go. */
|
|
8147
|
+
async function removeTool(idOrName, opts = {}) {
|
|
8148
|
+
const t = toolById(idOrName);
|
|
8149
|
+
if (t?.required) throw new Error(`${t.label} is required`);
|
|
8150
|
+
const name = miseName(idOrName);
|
|
8151
|
+
opts.log?.(`mise unuse -g ${name}`);
|
|
8152
|
+
await runStreaming("mise", [
|
|
8153
|
+
"unuse",
|
|
8154
|
+
"-g",
|
|
8155
|
+
name
|
|
8156
|
+
], opts);
|
|
8157
|
+
await runStreaming("mise", [
|
|
8158
|
+
"prune",
|
|
8159
|
+
"-y",
|
|
8160
|
+
name
|
|
8161
|
+
], opts).catch(() => {});
|
|
8162
|
+
}
|
|
8163
|
+
async function installAgent(id, opts = {}) {
|
|
8164
|
+
const a = agentById(id);
|
|
8165
|
+
if (!a) throw new Error(`unknown agent: ${id}`);
|
|
8166
|
+
opts.log?.(`installing ${a.label} (${a.install.url})`);
|
|
8167
|
+
await runRemoteScript(a.install.url, a.install.shell, opts);
|
|
8168
|
+
if (!a.bins.some((b) => which(b))) throw new Error(`${a.label} installer finished but ${a.bins[0]} is not on PATH`);
|
|
8169
|
+
}
|
|
8170
|
+
/**
|
|
8171
|
+
* Sign in to a GitHub host with gh's browser device flow.
|
|
8172
|
+
* Interactive (CLI): gh owns the terminal. Otherwise (server) we press Enter
|
|
8173
|
+
* for it and stop it launching a browser, so the one-time code and URL flow
|
|
8174
|
+
* out through `log` for the UI to show — gh keeps polling until the user
|
|
8175
|
+
* finishes in their own browser.
|
|
8176
|
+
*/
|
|
8177
|
+
async function authGithub(host, { interactive = false, ...opts } = {}) {
|
|
8178
|
+
if (!which("gh")) throw new Error("gh is not installed");
|
|
8179
|
+
const args = [
|
|
8180
|
+
"auth",
|
|
8181
|
+
"login",
|
|
8182
|
+
"--hostname",
|
|
8183
|
+
host,
|
|
8184
|
+
"--web",
|
|
8185
|
+
"--git-protocol",
|
|
8186
|
+
"https"
|
|
8187
|
+
];
|
|
8188
|
+
if (interactive) return runStreaming("gh", args, {
|
|
8189
|
+
...opts,
|
|
8190
|
+
interactive: true
|
|
8191
|
+
});
|
|
8192
|
+
return runStreaming("gh", args, {
|
|
8193
|
+
...opts,
|
|
8194
|
+
input: "\n",
|
|
8195
|
+
env: {
|
|
8196
|
+
BROWSER: "true",
|
|
8197
|
+
GH_PROMPT_DISABLED: "1"
|
|
8198
|
+
}
|
|
8199
|
+
});
|
|
8200
|
+
}
|
|
8201
|
+
//#endregion
|
|
8202
|
+
//#region src/server/setup.ts
|
|
8203
|
+
/** Server side of machine setup: the shared lib/setup probe + installers,
|
|
8204
|
+
* wrapped with caching, per-item locking, and progress streaming so the
|
|
8205
|
+
* Settings page and `work doctor` are two views of one truth. */
|
|
8206
|
+
/** Probing spawns gh per host and mise once; a minute of staleness is fine
|
|
8207
|
+
* for a page load, and every mutation below refreshes explicitly. */
|
|
8208
|
+
var doctorCache = swr(6e4, (_key, _refresh) => doctor());
|
|
8209
|
+
/** `mise outdated --bump` (latest release even past an exact pin) hits the network per tool, so it lives in its own cache
|
|
8210
|
+
* and is only awaited by an explicit refresh — a plain snapshot merges in
|
|
8211
|
+
* whatever is already known and warms it in the background. */
|
|
8212
|
+
var outdated = swr(6e5, async (_key) => {
|
|
8213
|
+
if (!which("mise")) return {};
|
|
8214
|
+
const json = (await runStreaming("mise", [
|
|
8215
|
+
"outdated",
|
|
8216
|
+
"--bump",
|
|
8217
|
+
"--json"
|
|
8218
|
+
], { timeout: 9e4 }).catch(() => [])).join("\n").trim() || "{}";
|
|
8219
|
+
const out = {};
|
|
8220
|
+
try {
|
|
8221
|
+
for (const [name, info] of Object.entries(JSON.parse(json))) if (info?.latest) out[name] = info.latest;
|
|
8222
|
+
} catch {}
|
|
8223
|
+
return out;
|
|
8224
|
+
});
|
|
8225
|
+
/**
|
|
8226
|
+
* Snapshot for the UI: doctor plus every other global mise pin (node,
|
|
8227
|
+
* shellcheck…), so the Machine section shows the machine, not just the
|
|
8228
|
+
* catalog. `refresh` re-probes and awaits `mise outdated`.
|
|
8229
|
+
*/
|
|
8230
|
+
async function getSetup(refresh = false) {
|
|
8231
|
+
const [d, versions] = await Promise.all([doctorCache("doctor", refresh), miseVersions()]);
|
|
8232
|
+
if (refresh) await outdated("all", true);
|
|
8233
|
+
else outdated("all").catch(() => {});
|
|
8234
|
+
const latest = outdated.get("all") || {};
|
|
8235
|
+
const tools = d.tools.map((t) => ({
|
|
8236
|
+
...t,
|
|
8237
|
+
latest: t.mise ? latest[t.mise] : void 0,
|
|
8238
|
+
recommended: true
|
|
8239
|
+
}));
|
|
8240
|
+
const known = new Set(TOOLS.map((t) => t.mise).filter(Boolean));
|
|
8241
|
+
for (const [name, version] of Object.entries(versions || {})) {
|
|
8242
|
+
if (known.has(name)) continue;
|
|
8243
|
+
tools.push({
|
|
8244
|
+
id: name,
|
|
8245
|
+
label: name,
|
|
8246
|
+
required: false,
|
|
8247
|
+
installed: true,
|
|
8248
|
+
installable: true,
|
|
8249
|
+
version,
|
|
8250
|
+
latest: latest[name],
|
|
8251
|
+
mise: name,
|
|
8252
|
+
recommended: false
|
|
8253
|
+
});
|
|
8254
|
+
}
|
|
8255
|
+
const off = disabledAgents();
|
|
8256
|
+
const agents = d.agents.map((a) => ({
|
|
8257
|
+
...a,
|
|
8258
|
+
instances: a.instances.map((i) => ({
|
|
8259
|
+
...i,
|
|
8260
|
+
enabled: !off.has(i.id)
|
|
8261
|
+
}))
|
|
8262
|
+
}));
|
|
8263
|
+
return {
|
|
8264
|
+
...d,
|
|
8265
|
+
tools,
|
|
8266
|
+
agents
|
|
8267
|
+
};
|
|
8268
|
+
}
|
|
8269
|
+
var registry = swr(36e5, async (_key) => {
|
|
8270
|
+
if (!which("mise")) return [];
|
|
8271
|
+
const lines = await runStreaming("mise", ["registry", "--json"], { timeout: 6e4 }).catch(() => []);
|
|
8272
|
+
try {
|
|
8273
|
+
return JSON.parse(lines.join("\n"));
|
|
8274
|
+
} catch {
|
|
8275
|
+
return [];
|
|
8276
|
+
}
|
|
8277
|
+
});
|
|
8278
|
+
async function searchMise(query, limit = 20) {
|
|
8279
|
+
const q = query.trim().toLowerCase();
|
|
8280
|
+
if (!q) return [];
|
|
8281
|
+
const [entries, versions] = await Promise.all([registry("all"), miseVersions()]);
|
|
8282
|
+
const scored = [];
|
|
8283
|
+
for (const e of entries) {
|
|
8284
|
+
const names = [e.short, ...e.aliases || []].map((s) => s.toLowerCase());
|
|
8285
|
+
let score = 0;
|
|
8286
|
+
if (names.includes(q)) score = 3;
|
|
8287
|
+
else if (names.some((n) => n.startsWith(q))) score = 2;
|
|
8288
|
+
else if (names.some((n) => n.includes(q))) score = 1;
|
|
8289
|
+
else if (e.description?.toLowerCase().includes(q)) score = .5;
|
|
8290
|
+
if (score) scored.push({
|
|
8291
|
+
e,
|
|
8292
|
+
score
|
|
8293
|
+
});
|
|
8294
|
+
}
|
|
8295
|
+
scored.sort((a, b) => b.score - a.score || a.e.short.localeCompare(b.e.short));
|
|
8296
|
+
return scored.slice(0, limit).map(({ e }) => ({
|
|
8297
|
+
name: e.short,
|
|
8298
|
+
description: e.description,
|
|
8299
|
+
installed: !!versions?.[e.short],
|
|
8300
|
+
version: versions?.[e.short]
|
|
8301
|
+
}));
|
|
8302
|
+
}
|
|
8303
|
+
/** One action at a time per item, and one mise write at a time overall —
|
|
8304
|
+
* two `mise use -g` racing on config.toml would interleave. */
|
|
8305
|
+
var locks = /* @__PURE__ */ new Map();
|
|
8306
|
+
function withLock(key, fn) {
|
|
8307
|
+
const run = (locks.get(key) ?? Promise.resolve()).then(fn);
|
|
8308
|
+
const tail = run.then(() => {}, () => {});
|
|
8309
|
+
locks.set(key, tail);
|
|
8310
|
+
tail.then(() => {
|
|
8311
|
+
if (locks.get(key) === tail) locks.delete(key);
|
|
8312
|
+
});
|
|
8313
|
+
return run;
|
|
8314
|
+
}
|
|
8315
|
+
/**
|
|
8316
|
+
* Run a setup action for a catalog tool, agent, GitHub host, or any mise
|
|
8317
|
+
* registry name. Streams lines on the shared progress bus under
|
|
8318
|
+
* `op = setup:<id>` and returns the refreshed snapshot.
|
|
8319
|
+
*/
|
|
8320
|
+
async function runSetupAction(id, action, opts = {}) {
|
|
8321
|
+
const log = (line) => progress$1(line);
|
|
8322
|
+
const lockKey = action === "auth" ? `auth:${id}` : "mise";
|
|
8323
|
+
await withProgressOp(`setup:${id}`, () => withLock(lockKey, async () => {
|
|
8324
|
+
if (action === "auth") {
|
|
8325
|
+
await authGithub(id, { log });
|
|
8326
|
+
return;
|
|
8327
|
+
}
|
|
8328
|
+
if (id === "mise") {
|
|
8329
|
+
if (action !== "install") throw httpError(400, `${action} is not supported for mise`);
|
|
8330
|
+
await installMise({ log });
|
|
8331
|
+
return;
|
|
8332
|
+
}
|
|
8333
|
+
if (agentById(id)) {
|
|
8334
|
+
if (action !== "install") throw httpError(400, `${action} is not supported for agents`);
|
|
8335
|
+
await installAgent(id, { log });
|
|
8336
|
+
return;
|
|
8337
|
+
}
|
|
8338
|
+
const tool = toolById(id);
|
|
8339
|
+
if (tool && !tool.mise) throw httpError(400, `${tool.label} is a system package`);
|
|
8340
|
+
if (action === "install") await installTool(id, {
|
|
8341
|
+
log,
|
|
8342
|
+
version: opts.version
|
|
8343
|
+
});
|
|
8344
|
+
else if (action === "update") await updateTool(id, { log });
|
|
8345
|
+
else if (action === "remove") await removeTool(id, { log });
|
|
8346
|
+
}));
|
|
8347
|
+
return getSetup(true);
|
|
8348
|
+
}
|
|
8349
|
+
//#endregion
|
|
8350
|
+
//#region __marko-run__api.setup.js
|
|
8351
|
+
var getHandler$9 = normalizeHandler(Run.GET(async (ctx) => {
|
|
8352
|
+
return Response.json(await getSetup(ctx.url.searchParams.has("refresh")));
|
|
8353
|
+
}), "GET");
|
|
8354
|
+
var get16_options = mergeOptions(mware4, getHandler$9);
|
|
8355
|
+
var head16_options = mergeOptions(mware4);
|
|
8356
|
+
function get16(context) {
|
|
8357
|
+
const __getHandler = (data) => call(getHandler$9, noContent, context, data);
|
|
8358
|
+
return call(mware4, __getHandler, context);
|
|
8359
|
+
}
|
|
8360
|
+
function head16(context) {
|
|
8361
|
+
return stripResponseBody(get16(context));
|
|
8362
|
+
}
|
|
8363
|
+
//#endregion
|
|
8364
|
+
//#region src/routes/api/setup/$id/+handler.ts
|
|
8365
|
+
var Body = /* @__PURE__ */ object({
|
|
8366
|
+
action: /* @__PURE__ */ picklist([
|
|
8367
|
+
"install",
|
|
8368
|
+
"update",
|
|
8369
|
+
"remove",
|
|
8370
|
+
"auth"
|
|
8371
|
+
]),
|
|
8372
|
+
version: /* @__PURE__ */ optional(/* @__PURE__ */ string())
|
|
8373
|
+
});
|
|
8374
|
+
//#endregion
|
|
8375
|
+
//#region __marko-run__api.setup.$.js
|
|
8376
|
+
var postHandler$7 = normalizeHandler(Run.POST({ json: Body }, async (ctx) => {
|
|
8377
|
+
const body = await readBody(ctx);
|
|
8378
|
+
return Response.json(await runSetupAction(ctx.params.id, body.action, { version: body.version }));
|
|
8379
|
+
}), "POST");
|
|
8380
|
+
var post17_options = mergeOptions(mware4, postHandler$7);
|
|
8381
|
+
function post17(context) {
|
|
8382
|
+
const __postHandler = (data) => call(postHandler$7, noContent, context, data);
|
|
8383
|
+
return call(mware4, __postHandler, context);
|
|
8384
|
+
}
|
|
8385
|
+
//#endregion
|
|
8386
|
+
//#region __marko-run__api.setup.search.js
|
|
8387
|
+
var getHandler$8 = normalizeHandler(Run.GET(async (ctx) => {
|
|
8388
|
+
return Response.json(await searchMise(ctx.url.searchParams.get("q") || ""));
|
|
8389
|
+
}), "GET");
|
|
8390
|
+
var get18_options = mergeOptions(mware4, getHandler$8);
|
|
8391
|
+
var head18_options = mergeOptions(mware4);
|
|
8392
|
+
function get18(context) {
|
|
8393
|
+
const __getHandler = (data) => call(getHandler$8, noContent, context, data);
|
|
8394
|
+
return call(mware4, __getHandler, context);
|
|
8395
|
+
}
|
|
8396
|
+
function head18(context) {
|
|
8397
|
+
return stripResponseBody(get18(context));
|
|
8398
|
+
}
|
|
8399
|
+
//#endregion
|
|
7092
8400
|
//#region __marko-run__api.status.js
|
|
7093
8401
|
var getHandler$7 = normalizeHandler(Run.GET(async (ctx) => {
|
|
7094
8402
|
const fresh = new URL(ctx.request.url).searchParams.has("fresh");
|
|
7095
8403
|
return Response.json(await (fresh ? statusForAllFresh() : statusForAll()));
|
|
7096
8404
|
}), "GET");
|
|
7097
|
-
var
|
|
7098
|
-
var
|
|
7099
|
-
function
|
|
8405
|
+
var get19_options = mergeOptions(mware4, getHandler$7);
|
|
8406
|
+
var head19_options = mergeOptions(mware4);
|
|
8407
|
+
function get19(context) {
|
|
7100
8408
|
const __getHandler = (data) => call(getHandler$7, noContent, context, data);
|
|
7101
8409
|
return call(mware4, __getHandler, context);
|
|
7102
8410
|
}
|
|
7103
|
-
function
|
|
7104
|
-
return stripResponseBody(
|
|
8411
|
+
function head19(context) {
|
|
8412
|
+
return stripResponseBody(get19(context));
|
|
7105
8413
|
}
|
|
7106
8414
|
//#endregion
|
|
7107
8415
|
//#region src/server/usage/shared.ts
|
|
@@ -7849,14 +9157,14 @@ var usage = async (refresh = false) => {
|
|
|
7849
9157
|
//#endregion
|
|
7850
9158
|
//#region __marko-run__api.usage.js
|
|
7851
9159
|
var getHandler$6 = normalizeHandler(Run.GET({ search: (value) => ({ refresh: "refresh" in value }) }, async (ctx) => Response.json(await usage(ctx.search.refresh))), "GET");
|
|
7852
|
-
var
|
|
7853
|
-
var
|
|
7854
|
-
function
|
|
9160
|
+
var get20_options = mergeOptions(mware4, getHandler$6);
|
|
9161
|
+
var head20_options = mergeOptions(mware4);
|
|
9162
|
+
function get20(context) {
|
|
7855
9163
|
const __getHandler = (data) => call(getHandler$6, noContent, context, data);
|
|
7856
9164
|
return call(mware4, __getHandler, context);
|
|
7857
9165
|
}
|
|
7858
|
-
function
|
|
7859
|
-
return stripResponseBody(
|
|
9166
|
+
function head20(context) {
|
|
9167
|
+
return stripResponseBody(get20(context));
|
|
7860
9168
|
}
|
|
7861
9169
|
//#endregion
|
|
7862
9170
|
//#region src/routes/api/workspaces/+handler.ts
|
|
@@ -7878,17 +9186,17 @@ var postHandler$6 = normalizeHandler(Run.POST({ json: CreateWorkspace }, async (
|
|
|
7878
9186
|
return Response.json(await withProgressOp(body.opId ?? "", () => createWorkspace(body.name, body.repos)));
|
|
7879
9187
|
}), "POST");
|
|
7880
9188
|
var getHandler$5 = normalizeHandler(GET$5, "GET");
|
|
7881
|
-
var
|
|
7882
|
-
var
|
|
7883
|
-
var
|
|
7884
|
-
function
|
|
9189
|
+
var get21_options = mergeOptions(mware4, getHandler$5);
|
|
9190
|
+
var head21_options = mergeOptions(mware4);
|
|
9191
|
+
var post21_options = mergeOptions(mware4, postHandler$6);
|
|
9192
|
+
function get21(context) {
|
|
7885
9193
|
const __getHandler = (data) => call(getHandler$5, noContent, context, data);
|
|
7886
9194
|
return call(mware4, __getHandler, context);
|
|
7887
9195
|
}
|
|
7888
|
-
function
|
|
7889
|
-
return stripResponseBody(
|
|
9196
|
+
function head21(context) {
|
|
9197
|
+
return stripResponseBody(get21(context));
|
|
7890
9198
|
}
|
|
7891
|
-
function
|
|
9199
|
+
function post21(context) {
|
|
7892
9200
|
const __postHandler = (data) => call(postHandler$6, noContent, context, data);
|
|
7893
9201
|
return call(mware4, __postHandler, context);
|
|
7894
9202
|
}
|
|
@@ -7911,11 +9219,11 @@ var postHandler$5 = normalizeHandler(Run.POST({ json: WorkspaceAction }, async (
|
|
|
7911
9219
|
});
|
|
7912
9220
|
return Response.json({ ok: true });
|
|
7913
9221
|
}), "POST");
|
|
7914
|
-
var
|
|
7915
|
-
function
|
|
9222
|
+
var post22_options = mergeOptions(mware4, mware26, postHandler$5);
|
|
9223
|
+
function post22(context) {
|
|
7916
9224
|
const __postHandler = (data) => call(postHandler$5, noContent, context, data);
|
|
7917
|
-
const
|
|
7918
|
-
return call(mware4,
|
|
9225
|
+
const __mware26 = (data) => call(mware26, __postHandler, context, data);
|
|
9226
|
+
return call(mware4, __mware26, context);
|
|
7919
9227
|
}
|
|
7920
9228
|
//#endregion
|
|
7921
9229
|
//#region src/routes/api/workspaces/$id/assets/+handler.ts
|
|
@@ -7934,11 +9242,11 @@ var postHandler$4 = normalizeHandler(Run.POST({ search: (value) => ({ name: type
|
|
|
7934
9242
|
fs.writeFileSync(path.join(ws.path, relative), data);
|
|
7935
9243
|
return Response.json({ path: relative });
|
|
7936
9244
|
}), "POST");
|
|
7937
|
-
var
|
|
7938
|
-
function
|
|
9245
|
+
var post23_options = mergeOptions(mware4, mware26, postHandler$4);
|
|
9246
|
+
function post23(context) {
|
|
7939
9247
|
const __postHandler = (data) => call(postHandler$4, noContent, context, data);
|
|
7940
|
-
const
|
|
7941
|
-
return call(mware4,
|
|
9248
|
+
const __mware26 = (data) => call(mware26, __postHandler, context, data);
|
|
9249
|
+
return call(mware4, __mware26, context);
|
|
7942
9250
|
}
|
|
7943
9251
|
//#endregion
|
|
7944
9252
|
//#region src/server/diff.ts
|
|
@@ -8349,28 +9657,28 @@ var getHandler$4 = normalizeHandler(Run.GET({ search: (value) => ({
|
|
|
8349
9657
|
pr: ctx.search.pr,
|
|
8350
9658
|
refresh: ctx.search.refresh
|
|
8351
9659
|
}))), "GET");
|
|
8352
|
-
var
|
|
8353
|
-
var
|
|
8354
|
-
function
|
|
9660
|
+
var get24_options = mergeOptions(mware4, mware26, getHandler$4);
|
|
9661
|
+
var head24_options = mergeOptions(mware4, mware26);
|
|
9662
|
+
function get24(context) {
|
|
8355
9663
|
const __getHandler = (data) => call(getHandler$4, noContent, context, data);
|
|
8356
|
-
const
|
|
8357
|
-
return call(mware4,
|
|
9664
|
+
const __mware26 = (data) => call(mware26, __getHandler, context, data);
|
|
9665
|
+
return call(mware4, __mware26, context);
|
|
8358
9666
|
}
|
|
8359
|
-
function
|
|
8360
|
-
return stripResponseBody(
|
|
9667
|
+
function head24(context) {
|
|
9668
|
+
return stripResponseBody(get24(context));
|
|
8361
9669
|
}
|
|
8362
9670
|
//#endregion
|
|
8363
9671
|
//#region __marko-run__api.workspaces.$.procs.js
|
|
8364
9672
|
var getHandler$3 = normalizeHandler(Run.GET(async (ctx) => Response.json(await workspaceProcs(ctx.data.workspace.path))), "GET");
|
|
8365
|
-
var
|
|
8366
|
-
var
|
|
8367
|
-
function
|
|
9673
|
+
var get25_options = mergeOptions(mware4, mware26, getHandler$3);
|
|
9674
|
+
var head25_options = mergeOptions(mware4, mware26);
|
|
9675
|
+
function get25(context) {
|
|
8368
9676
|
const __getHandler = (data) => call(getHandler$3, noContent, context, data);
|
|
8369
|
-
const
|
|
8370
|
-
return call(mware4,
|
|
9677
|
+
const __mware26 = (data) => call(mware26, __getHandler, context, data);
|
|
9678
|
+
return call(mware4, __mware26, context);
|
|
8371
9679
|
}
|
|
8372
|
-
function
|
|
8373
|
-
return stripResponseBody(
|
|
9680
|
+
function head25(context) {
|
|
9681
|
+
return stripResponseBody(get25(context));
|
|
8374
9682
|
}
|
|
8375
9683
|
//#endregion
|
|
8376
9684
|
//#region src/routes/api/workspaces/$id/prs/+handler.ts
|
|
@@ -8417,21 +9725,21 @@ async function listPrs(ws, refresh) {
|
|
|
8417
9725
|
//#region __marko-run__api.workspaces.$.prs.js
|
|
8418
9726
|
var postHandler$3 = normalizeHandler(POST$3, "POST");
|
|
8419
9727
|
var getHandler$2 = normalizeHandler(GET$2, "GET");
|
|
8420
|
-
var
|
|
8421
|
-
var
|
|
8422
|
-
var
|
|
8423
|
-
function
|
|
9728
|
+
var get26_options = mergeOptions(mware4, mware26, getHandler$2);
|
|
9729
|
+
var head26_options = mergeOptions(mware4, mware26);
|
|
9730
|
+
var post26_options = mergeOptions(mware4, mware26, postHandler$3);
|
|
9731
|
+
function get26(context) {
|
|
8424
9732
|
const __getHandler = (data) => call(getHandler$2, noContent, context, data);
|
|
8425
|
-
const
|
|
8426
|
-
return call(mware4,
|
|
9733
|
+
const __mware26 = (data) => call(mware26, __getHandler, context, data);
|
|
9734
|
+
return call(mware4, __mware26, context);
|
|
8427
9735
|
}
|
|
8428
|
-
function
|
|
8429
|
-
return stripResponseBody(
|
|
9736
|
+
function head26(context) {
|
|
9737
|
+
return stripResponseBody(get26(context));
|
|
8430
9738
|
}
|
|
8431
|
-
function
|
|
9739
|
+
function post26(context) {
|
|
8432
9740
|
const __postHandler = (data) => call(postHandler$3, noContent, context, data);
|
|
8433
|
-
const
|
|
8434
|
-
return call(mware4,
|
|
9741
|
+
const __mware26 = (data) => call(mware26, __postHandler, context, data);
|
|
9742
|
+
return call(mware4, __mware26, context);
|
|
8435
9743
|
}
|
|
8436
9744
|
//#endregion
|
|
8437
9745
|
//#region src/routes/api/workspaces/$id/repos/+handler.ts
|
|
@@ -8445,11 +9753,11 @@ var postHandler$2 = normalizeHandler(Run.POST({ json: AddRepo }, async (ctx) =>
|
|
|
8445
9753
|
const body = await readBody(ctx);
|
|
8446
9754
|
return Response.json(await withProgressOp(ctx.params.id, () => addRepo$1(ctx.params.id, body.fullName, body.baseBranch)));
|
|
8447
9755
|
}), "POST");
|
|
8448
|
-
var
|
|
8449
|
-
function
|
|
9756
|
+
var post27_options = mergeOptions(mware4, mware26, postHandler$2);
|
|
9757
|
+
function post27(context) {
|
|
8450
9758
|
const __postHandler = (data) => call(postHandler$2, noContent, context, data);
|
|
8451
|
-
const
|
|
8452
|
-
return call(mware4,
|
|
9759
|
+
const __mware26 = (data) => call(mware26, __postHandler, context, data);
|
|
9760
|
+
return call(mware4, __mware26, context);
|
|
8453
9761
|
}
|
|
8454
9762
|
//#endregion
|
|
8455
9763
|
//#region __marko-run__api.workspaces.$.repos.$.js
|
|
@@ -8457,11 +9765,11 @@ var deleteHandler = normalizeHandler(Run.DELETE(async (ctx) => {
|
|
|
8457
9765
|
await withProgressOp(ctx.params.id, () => removeRepo(ctx.params.id, ctx.params.worktree));
|
|
8458
9766
|
return Response.json({ ok: true });
|
|
8459
9767
|
}), "DELETE");
|
|
8460
|
-
var
|
|
8461
|
-
function
|
|
9768
|
+
var delete28_options = mergeOptions(mware4, mware26, deleteHandler);
|
|
9769
|
+
function delete28(context) {
|
|
8462
9770
|
const __deleteHandler = (data) => call(deleteHandler, noContent, context, data);
|
|
8463
|
-
const
|
|
8464
|
-
return call(mware4,
|
|
9771
|
+
const __mware26 = (data) => call(mware26, __deleteHandler, context, data);
|
|
9772
|
+
return call(mware4, __mware26, context);
|
|
8465
9773
|
}
|
|
8466
9774
|
//#endregion
|
|
8467
9775
|
//#region src/routes/api/workspaces/$id/review/+handler.ts
|
|
@@ -8490,21 +9798,21 @@ var postHandler$1 = normalizeHandler(Run.POST({ json: ReviewAction }, async (ctx
|
|
|
8490
9798
|
return Response.json({ ok: true });
|
|
8491
9799
|
}), "POST");
|
|
8492
9800
|
var getHandler$1 = normalizeHandler(GET$1, "GET");
|
|
8493
|
-
var
|
|
8494
|
-
var
|
|
8495
|
-
var
|
|
8496
|
-
function
|
|
9801
|
+
var get29_options = mergeOptions(mware4, mware26, getHandler$1);
|
|
9802
|
+
var head29_options = mergeOptions(mware4, mware26);
|
|
9803
|
+
var post29_options = mergeOptions(mware4, mware26, postHandler$1);
|
|
9804
|
+
function get29(context) {
|
|
8497
9805
|
const __getHandler = (data) => call(getHandler$1, noContent, context, data);
|
|
8498
|
-
const
|
|
8499
|
-
return call(mware4,
|
|
9806
|
+
const __mware26 = (data) => call(mware26, __getHandler, context, data);
|
|
9807
|
+
return call(mware4, __mware26, context);
|
|
8500
9808
|
}
|
|
8501
|
-
function
|
|
8502
|
-
return stripResponseBody(
|
|
9809
|
+
function head29(context) {
|
|
9810
|
+
return stripResponseBody(get29(context));
|
|
8503
9811
|
}
|
|
8504
|
-
function
|
|
9812
|
+
function post29(context) {
|
|
8505
9813
|
const __postHandler = (data) => call(postHandler$1, noContent, context, data);
|
|
8506
|
-
const
|
|
8507
|
-
return call(mware4,
|
|
9814
|
+
const __mware26 = (data) => call(mware26, __postHandler, context, data);
|
|
9815
|
+
return call(mware4, __mware26, context);
|
|
8508
9816
|
}
|
|
8509
9817
|
//#endregion
|
|
8510
9818
|
//#region src/routes/api/workspaces/$id/sessions/+handler.ts
|
|
@@ -8523,21 +9831,21 @@ var postHandler = normalizeHandler(Run.POST({ json: CreateSession }, async (ctx)
|
|
|
8523
9831
|
return Response.json(createSession(ctx.params.id, body.agent || preferredAgent()));
|
|
8524
9832
|
}), "POST");
|
|
8525
9833
|
var getHandler = normalizeHandler(GET, "GET");
|
|
8526
|
-
var
|
|
8527
|
-
var
|
|
8528
|
-
var
|
|
8529
|
-
function
|
|
9834
|
+
var get30_options = mergeOptions(mware4, mware26, getHandler);
|
|
9835
|
+
var head30_options = mergeOptions(mware4, mware26);
|
|
9836
|
+
var post30_options = mergeOptions(mware4, mware26, postHandler);
|
|
9837
|
+
function get30(context) {
|
|
8530
9838
|
const __getHandler = (data) => call(getHandler, noContent, context, data);
|
|
8531
|
-
const
|
|
8532
|
-
return call(mware4,
|
|
9839
|
+
const __mware26 = (data) => call(mware26, __getHandler, context, data);
|
|
9840
|
+
return call(mware4, __mware26, context);
|
|
8533
9841
|
}
|
|
8534
|
-
function
|
|
8535
|
-
return stripResponseBody(
|
|
9842
|
+
function head30(context) {
|
|
9843
|
+
return stripResponseBody(get30(context));
|
|
8536
9844
|
}
|
|
8537
|
-
function
|
|
9845
|
+
function post30(context) {
|
|
8538
9846
|
const __postHandler = (data) => call(postHandler, noContent, context, data);
|
|
8539
|
-
const
|
|
8540
|
-
return call(mware4,
|
|
9847
|
+
const __mware26 = (data) => call(mware26, __postHandler, context, data);
|
|
9848
|
+
return call(mware4, __mware26, context);
|
|
8541
9849
|
}
|
|
8542
9850
|
//#endregion
|
|
8543
9851
|
//#region __marko-run__router.js
|
|
@@ -8616,25 +9924,32 @@ function match_internal(method, pathname) {
|
|
|
8616
9924
|
options: get15_options,
|
|
8617
9925
|
meta: {}
|
|
8618
9926
|
};
|
|
8619
|
-
case "
|
|
9927
|
+
case "setup": return {
|
|
8620
9928
|
handler: get16,
|
|
8621
|
-
path: "/api/
|
|
9929
|
+
path: "/api/setup",
|
|
8622
9930
|
params: {},
|
|
8623
9931
|
options: get16_options,
|
|
8624
9932
|
meta: {}
|
|
8625
9933
|
};
|
|
9934
|
+
case "status": return {
|
|
9935
|
+
handler: get19,
|
|
9936
|
+
path: "/api/status",
|
|
9937
|
+
params: {},
|
|
9938
|
+
options: get19_options,
|
|
9939
|
+
meta: {}
|
|
9940
|
+
};
|
|
8626
9941
|
case "usage": return {
|
|
8627
|
-
handler:
|
|
9942
|
+
handler: get20,
|
|
8628
9943
|
path: "/api/usage",
|
|
8629
9944
|
params: {},
|
|
8630
|
-
options:
|
|
9945
|
+
options: get20_options,
|
|
8631
9946
|
meta: {}
|
|
8632
9947
|
};
|
|
8633
9948
|
case "workspaces": return {
|
|
8634
|
-
handler:
|
|
9949
|
+
handler: get21,
|
|
8635
9950
|
path: "/api/workspaces",
|
|
8636
9951
|
params: {},
|
|
8637
|
-
options:
|
|
9952
|
+
options: get21_options,
|
|
8638
9953
|
meta: {}
|
|
8639
9954
|
};
|
|
8640
9955
|
}
|
|
@@ -8653,6 +9968,20 @@ function match_internal(method, pathname) {
|
|
|
8653
9968
|
}
|
|
8654
9969
|
}
|
|
8655
9970
|
break;
|
|
9971
|
+
case "setup":
|
|
9972
|
+
{
|
|
9973
|
+
const i3 = pathname.indexOf("/", 11) + 1;
|
|
9974
|
+
if (!i3 || i3 === len) {
|
|
9975
|
+
if (pathname.slice(11, i3 ? -1 : len) === "search") return {
|
|
9976
|
+
handler: get18,
|
|
9977
|
+
path: "/api/setup/search",
|
|
9978
|
+
params: {},
|
|
9979
|
+
options: get18_options,
|
|
9980
|
+
meta: {}
|
|
9981
|
+
};
|
|
9982
|
+
}
|
|
9983
|
+
}
|
|
9984
|
+
break;
|
|
8656
9985
|
case "workspaces": {
|
|
8657
9986
|
const i3 = pathname.indexOf("/", 16) + 1;
|
|
8658
9987
|
if (i3 && i3 !== len) {
|
|
@@ -8661,38 +9990,38 @@ function match_internal(method, pathname) {
|
|
|
8661
9990
|
const i4 = pathname.indexOf("/", i3) + 1;
|
|
8662
9991
|
if (!i4 || i4 === len) switch (pathname.slice(i3, i4 ? -1 : len)) {
|
|
8663
9992
|
case "diff": return {
|
|
8664
|
-
handler:
|
|
9993
|
+
handler: get24,
|
|
8665
9994
|
path: "/api/workspaces/$id/diff",
|
|
8666
9995
|
params: { id: s3 },
|
|
8667
|
-
options:
|
|
9996
|
+
options: get24_options,
|
|
8668
9997
|
meta: {}
|
|
8669
9998
|
};
|
|
8670
9999
|
case "procs": return {
|
|
8671
|
-
handler:
|
|
10000
|
+
handler: get25,
|
|
8672
10001
|
path: "/api/workspaces/$id/procs",
|
|
8673
10002
|
params: { id: s3 },
|
|
8674
|
-
options:
|
|
10003
|
+
options: get25_options,
|
|
8675
10004
|
meta: {}
|
|
8676
10005
|
};
|
|
8677
10006
|
case "prs": return {
|
|
8678
|
-
handler:
|
|
10007
|
+
handler: get26,
|
|
8679
10008
|
path: "/api/workspaces/$id/prs",
|
|
8680
10009
|
params: { id: s3 },
|
|
8681
|
-
options:
|
|
10010
|
+
options: get26_options,
|
|
8682
10011
|
meta: {}
|
|
8683
10012
|
};
|
|
8684
10013
|
case "review": return {
|
|
8685
|
-
handler:
|
|
10014
|
+
handler: get29,
|
|
8686
10015
|
path: "/api/workspaces/$id/review",
|
|
8687
10016
|
params: { id: s3 },
|
|
8688
|
-
options:
|
|
10017
|
+
options: get29_options,
|
|
8689
10018
|
meta: {}
|
|
8690
10019
|
};
|
|
8691
10020
|
case "sessions": return {
|
|
8692
|
-
handler:
|
|
10021
|
+
handler: get30,
|
|
8693
10022
|
path: "/api/workspaces/$id/sessions",
|
|
8694
10023
|
params: { id: s3 },
|
|
8695
|
-
options:
|
|
10024
|
+
options: get30_options,
|
|
8696
10025
|
meta: {}
|
|
8697
10026
|
};
|
|
8698
10027
|
}
|
|
@@ -8767,25 +10096,32 @@ function match_internal(method, pathname) {
|
|
|
8767
10096
|
options: head15_options,
|
|
8768
10097
|
meta: {}
|
|
8769
10098
|
};
|
|
8770
|
-
case "
|
|
10099
|
+
case "setup": return {
|
|
8771
10100
|
handler: head16,
|
|
8772
|
-
path: "/api/
|
|
10101
|
+
path: "/api/setup",
|
|
8773
10102
|
params: {},
|
|
8774
10103
|
options: head16_options,
|
|
8775
10104
|
meta: {}
|
|
8776
10105
|
};
|
|
10106
|
+
case "status": return {
|
|
10107
|
+
handler: head19,
|
|
10108
|
+
path: "/api/status",
|
|
10109
|
+
params: {},
|
|
10110
|
+
options: head19_options,
|
|
10111
|
+
meta: {}
|
|
10112
|
+
};
|
|
8777
10113
|
case "usage": return {
|
|
8778
|
-
handler:
|
|
10114
|
+
handler: head20,
|
|
8779
10115
|
path: "/api/usage",
|
|
8780
10116
|
params: {},
|
|
8781
|
-
options:
|
|
10117
|
+
options: head20_options,
|
|
8782
10118
|
meta: {}
|
|
8783
10119
|
};
|
|
8784
10120
|
case "workspaces": return {
|
|
8785
|
-
handler:
|
|
10121
|
+
handler: head21,
|
|
8786
10122
|
path: "/api/workspaces",
|
|
8787
10123
|
params: {},
|
|
8788
|
-
options:
|
|
10124
|
+
options: head21_options,
|
|
8789
10125
|
meta: {}
|
|
8790
10126
|
};
|
|
8791
10127
|
}
|
|
@@ -8804,6 +10140,20 @@ function match_internal(method, pathname) {
|
|
|
8804
10140
|
}
|
|
8805
10141
|
}
|
|
8806
10142
|
break;
|
|
10143
|
+
case "setup":
|
|
10144
|
+
{
|
|
10145
|
+
const i3 = pathname.indexOf("/", 11) + 1;
|
|
10146
|
+
if (!i3 || i3 === len) {
|
|
10147
|
+
if (pathname.slice(11, i3 ? -1 : len) === "search") return {
|
|
10148
|
+
handler: head18,
|
|
10149
|
+
path: "/api/setup/search",
|
|
10150
|
+
params: {},
|
|
10151
|
+
options: head18_options,
|
|
10152
|
+
meta: {}
|
|
10153
|
+
};
|
|
10154
|
+
}
|
|
10155
|
+
}
|
|
10156
|
+
break;
|
|
8807
10157
|
case "workspaces": {
|
|
8808
10158
|
const i3 = pathname.indexOf("/", 16) + 1;
|
|
8809
10159
|
if (i3 && i3 !== len) {
|
|
@@ -8812,38 +10162,38 @@ function match_internal(method, pathname) {
|
|
|
8812
10162
|
const i4 = pathname.indexOf("/", i3) + 1;
|
|
8813
10163
|
if (!i4 || i4 === len) switch (pathname.slice(i3, i4 ? -1 : len)) {
|
|
8814
10164
|
case "diff": return {
|
|
8815
|
-
handler:
|
|
10165
|
+
handler: head24,
|
|
8816
10166
|
path: "/api/workspaces/$id/diff",
|
|
8817
10167
|
params: { id: s3 },
|
|
8818
|
-
options:
|
|
10168
|
+
options: head24_options,
|
|
8819
10169
|
meta: {}
|
|
8820
10170
|
};
|
|
8821
10171
|
case "procs": return {
|
|
8822
|
-
handler:
|
|
10172
|
+
handler: head25,
|
|
8823
10173
|
path: "/api/workspaces/$id/procs",
|
|
8824
10174
|
params: { id: s3 },
|
|
8825
|
-
options:
|
|
10175
|
+
options: head25_options,
|
|
8826
10176
|
meta: {}
|
|
8827
10177
|
};
|
|
8828
10178
|
case "prs": return {
|
|
8829
|
-
handler:
|
|
10179
|
+
handler: head26,
|
|
8830
10180
|
path: "/api/workspaces/$id/prs",
|
|
8831
10181
|
params: { id: s3 },
|
|
8832
|
-
options:
|
|
10182
|
+
options: head26_options,
|
|
8833
10183
|
meta: {}
|
|
8834
10184
|
};
|
|
8835
10185
|
case "review": return {
|
|
8836
|
-
handler:
|
|
10186
|
+
handler: head29,
|
|
8837
10187
|
path: "/api/workspaces/$id/review",
|
|
8838
10188
|
params: { id: s3 },
|
|
8839
|
-
options:
|
|
10189
|
+
options: head29_options,
|
|
8840
10190
|
meta: {}
|
|
8841
10191
|
};
|
|
8842
10192
|
case "sessions": return {
|
|
8843
|
-
handler:
|
|
10193
|
+
handler: head30,
|
|
8844
10194
|
path: "/api/workspaces/$id/sessions",
|
|
8845
10195
|
params: { id: s3 },
|
|
8846
|
-
options:
|
|
10196
|
+
options: head30_options,
|
|
8847
10197
|
meta: {}
|
|
8848
10198
|
};
|
|
8849
10199
|
}
|
|
@@ -8892,10 +10242,10 @@ function match_internal(method, pathname) {
|
|
|
8892
10242
|
meta: {}
|
|
8893
10243
|
};
|
|
8894
10244
|
case "workspaces": return {
|
|
8895
|
-
handler:
|
|
10245
|
+
handler: post21,
|
|
8896
10246
|
path: "/api/workspaces",
|
|
8897
10247
|
params: {},
|
|
8898
|
-
options:
|
|
10248
|
+
options: post21_options,
|
|
8899
10249
|
meta: {}
|
|
8900
10250
|
};
|
|
8901
10251
|
}
|
|
@@ -8920,15 +10270,30 @@ function match_internal(method, pathname) {
|
|
|
8920
10270
|
}
|
|
8921
10271
|
}
|
|
8922
10272
|
break;
|
|
10273
|
+
case "setup":
|
|
10274
|
+
{
|
|
10275
|
+
const i3 = pathname.indexOf("/", 11) + 1;
|
|
10276
|
+
if (!i3 || i3 === len) {
|
|
10277
|
+
const s3 = decodeURIComponent(pathname.slice(11, i3 ? -1 : len));
|
|
10278
|
+
if (s3) return {
|
|
10279
|
+
handler: post17,
|
|
10280
|
+
path: "/api/setup/$id",
|
|
10281
|
+
params: { id: s3 },
|
|
10282
|
+
options: post17_options,
|
|
10283
|
+
meta: {}
|
|
10284
|
+
};
|
|
10285
|
+
}
|
|
10286
|
+
}
|
|
10287
|
+
break;
|
|
8923
10288
|
case "workspaces": {
|
|
8924
10289
|
const i3 = pathname.indexOf("/", 16) + 1;
|
|
8925
10290
|
if (!i3 || i3 === len) {
|
|
8926
10291
|
const s3 = decodeURIComponent(pathname.slice(16, i3 ? -1 : len));
|
|
8927
10292
|
if (s3) return {
|
|
8928
|
-
handler:
|
|
10293
|
+
handler: post22,
|
|
8929
10294
|
path: "/api/workspaces/$id",
|
|
8930
10295
|
params: { id: s3 },
|
|
8931
|
-
options:
|
|
10296
|
+
options: post22_options,
|
|
8932
10297
|
meta: {}
|
|
8933
10298
|
};
|
|
8934
10299
|
} else {
|
|
@@ -8937,38 +10302,38 @@ function match_internal(method, pathname) {
|
|
|
8937
10302
|
const i4 = pathname.indexOf("/", i3) + 1;
|
|
8938
10303
|
if (!i4 || i4 === len) switch (pathname.slice(i3, i4 ? -1 : len)) {
|
|
8939
10304
|
case "assets": return {
|
|
8940
|
-
handler:
|
|
10305
|
+
handler: post23,
|
|
8941
10306
|
path: "/api/workspaces/$id/assets",
|
|
8942
10307
|
params: { id: s3 },
|
|
8943
|
-
options:
|
|
10308
|
+
options: post23_options,
|
|
8944
10309
|
meta: {}
|
|
8945
10310
|
};
|
|
8946
10311
|
case "prs": return {
|
|
8947
|
-
handler:
|
|
10312
|
+
handler: post26,
|
|
8948
10313
|
path: "/api/workspaces/$id/prs",
|
|
8949
10314
|
params: { id: s3 },
|
|
8950
|
-
options:
|
|
10315
|
+
options: post26_options,
|
|
8951
10316
|
meta: {}
|
|
8952
10317
|
};
|
|
8953
10318
|
case "repos": return {
|
|
8954
|
-
handler:
|
|
10319
|
+
handler: post27,
|
|
8955
10320
|
path: "/api/workspaces/$id/repos",
|
|
8956
10321
|
params: { id: s3 },
|
|
8957
|
-
options:
|
|
10322
|
+
options: post27_options,
|
|
8958
10323
|
meta: {}
|
|
8959
10324
|
};
|
|
8960
10325
|
case "review": return {
|
|
8961
|
-
handler:
|
|
10326
|
+
handler: post29,
|
|
8962
10327
|
path: "/api/workspaces/$id/review",
|
|
8963
10328
|
params: { id: s3 },
|
|
8964
|
-
options:
|
|
10329
|
+
options: post29_options,
|
|
8965
10330
|
meta: {}
|
|
8966
10331
|
};
|
|
8967
10332
|
case "sessions": return {
|
|
8968
|
-
handler:
|
|
10333
|
+
handler: post30,
|
|
8969
10334
|
path: "/api/workspaces/$id/sessions",
|
|
8970
10335
|
params: { id: s3 },
|
|
8971
|
-
options:
|
|
10336
|
+
options: post30_options,
|
|
8972
10337
|
meta: {}
|
|
8973
10338
|
};
|
|
8974
10339
|
}
|
|
@@ -9073,13 +10438,13 @@ function match_internal(method, pathname) {
|
|
|
9073
10438
|
if (!i5 || i5 === len) {
|
|
9074
10439
|
const s5 = decodeURIComponent(pathname.slice(i4, i5 ? -1 : len));
|
|
9075
10440
|
if (s5) return {
|
|
9076
|
-
handler:
|
|
10441
|
+
handler: delete28,
|
|
9077
10442
|
path: "/api/workspaces/$id/repos/$worktree",
|
|
9078
10443
|
params: {
|
|
9079
10444
|
id: s3,
|
|
9080
10445
|
worktree: s5
|
|
9081
10446
|
},
|
|
9082
|
-
options:
|
|
10447
|
+
options: delete28_options,
|
|
9083
10448
|
meta: {}
|
|
9084
10449
|
};
|
|
9085
10450
|
}
|
|
@@ -13108,4 +14473,4 @@ server.listen(port, () => {
|
|
|
13108
14473
|
//#endregion
|
|
13109
14474
|
export {};
|
|
13110
14475
|
|
|
13111
|
-
;var __MARKO_MANIFEST__={"esfPH6H":{"block":[2,"stylesheet#/assets/
|
|
14476
|
+
;var __MARKO_MANIFEST__={"esfPH6H":{"block":[2,"stylesheet#/assets/index-DR0Bvd6u.css",6,"<link",0," rel=\"stylesheet\" crossorigin href=\"",1,"assets/index-DR0Bvd6u.css\"",">"],"defer":[2,"/assets/index-fCEONff1.js",6,"<script",0," async type=\"module\" crossorigin src=\"",1,"assets/index-fCEONff1.js\"","></script>"]}};
|