@dylanpiercey/work 0.0.85 → 0.0.86
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{_D30X7Qrj.js → _BDBtGsdY.js} +60 -60
- package/dist/{_mv7NEfX0.js → _D5j6bTJl.js} +37 -23
- package/dist/index.mjs +767 -577
- package/dist/public/assets/{_uI46O0Ad.js → _1MO3zLi0.js} +1 -1
- package/dist/public/assets/_1MO3zLi0.js.br +0 -0
- package/dist/public/assets/{_-ru5vl7a.js → _3_osenBu.js} +1 -1
- package/dist/public/assets/_3_osenBu.js.br +0 -0
- package/dist/public/assets/{_BFNm4iX52.js → _4c6ZP_DE2.js} +1 -1
- package/dist/public/assets/_4c6ZP_DE2.js.br +0 -0
- package/dist/public/assets/{_CeiupuAL2.js → _8DabaQc42.js} +1 -1
- package/dist/public/assets/_8DabaQc42.js.br +0 -0
- package/dist/public/assets/{_ByxTzbwH2.js → _B38vzMde2.js} +1 -1
- package/dist/public/assets/_B38vzMde2.js.br +0 -0
- package/dist/public/assets/{_CEV-O2hk.js → _B6HRx3mv.js} +1 -1
- package/dist/public/assets/_B6HRx3mv.js.br +0 -0
- package/dist/public/assets/{_tng7Ctl52.js → _B7tW52ox2.js} +1 -1
- package/dist/public/assets/_B7tW52ox2.js.br +0 -0
- package/dist/public/assets/{_SR9h4Okl.js → _BDKexg9K.js} +1 -1
- package/dist/public/assets/_BDKexg9K.js.br +0 -0
- package/dist/public/assets/{_nz3ixzI3.js → _BE6VqQVA.js} +1 -1
- package/dist/public/assets/_BE6VqQVA.js.br +0 -0
- package/dist/public/assets/{_DEY6fLoS2.js → _BRgDp6dq2.js} +1 -1
- package/dist/public/assets/_BRgDp6dq2.js.br +0 -0
- package/dist/public/assets/{_CV-6gAkw.js → _BVR2bnH7.js} +1 -1
- package/dist/public/assets/_BVR2bnH7.js.br +0 -0
- package/dist/public/assets/{_DWhr2Wyd.js → _BW-Z7z3K.js} +20 -20
- package/dist/public/assets/_BW-Z7z3K.js.br +0 -0
- package/dist/public/assets/{_Chrp8y2F.js → _BXoOogd_.js} +1 -1
- package/dist/public/assets/_BXoOogd_.js.br +0 -0
- package/dist/public/assets/{_BjVUCdYI.js → _B_hYt6WL.js} +1 -1
- package/dist/public/assets/_B_hYt6WL.js.br +0 -0
- package/dist/public/assets/{_CUFjqbZE.js → _B_iQ_vXs.js} +1 -1
- package/dist/public/assets/_B_iQ_vXs.js.br +0 -0
- package/dist/public/assets/{_DDphf7Gv2.js → _BcLoolnz2.js} +1 -1
- package/dist/public/assets/_BcLoolnz2.js.br +0 -0
- package/dist/public/assets/{_DSS7F-KT2.js → _BdWFr75M2.js} +1 -1
- package/dist/public/assets/_BdWFr75M2.js.br +0 -0
- package/dist/public/assets/{_BvAqq5m6.js → _BfKlqNx9.js} +1 -1
- package/dist/public/assets/_BfKlqNx9.js.br +0 -0
- package/dist/public/assets/{_CeI4faG12.js → _BjHYQyTW2.js} +1 -1
- package/dist/public/assets/_BjHYQyTW2.js.br +0 -0
- package/dist/public/assets/{_C07OAOG6.js → _Bl32WbGR.js} +1 -1
- package/dist/public/assets/_Bl32WbGR.js.br +0 -0
- package/dist/public/assets/{_BPLDg25T2.js → _BmRxh0Eh2.js} +1 -1
- package/dist/public/assets/{_C-BzebGR.js → _BneLpkUj.js} +1 -1
- package/dist/public/assets/_BneLpkUj.js.br +0 -0
- package/dist/public/assets/{_BlE98RWB.js → _BpQROnKB.js} +1 -1
- package/dist/public/assets/_BpQROnKB.js.br +0 -0
- package/dist/public/assets/{_tX_6AA9a.js → _BpaSM2Ut.js} +1 -1
- package/dist/public/assets/_BpaSM2Ut.js.br +0 -0
- package/dist/public/assets/{_BrNrnCdj.js → _BqEupx9T.js} +1 -1
- package/dist/public/assets/_BqEupx9T.js.br +0 -0
- package/dist/public/assets/{_DGyPz6VI2.js → _BrHg1vmp2.js} +1 -1
- package/dist/public/assets/_BrHg1vmp2.js.br +0 -0
- package/dist/public/assets/{_DunIU1gI.js → _BuVTK0nK.js} +1 -1
- package/dist/public/assets/_BuVTK0nK.js.br +0 -0
- package/dist/public/assets/{_8c-uHmeW2.js → _BxhMnvoI2.js} +1 -1
- package/dist/public/assets/_BxhMnvoI2.js.br +0 -0
- package/dist/public/assets/{_DUko1Sy92.js → _Byj_kDek2.js} +1 -1
- package/dist/public/assets/_Byj_kDek2.js.br +0 -0
- package/dist/public/assets/{_DbfrRxLt.js → _C669lqE1.js} +1 -1
- package/dist/public/assets/_C669lqE1.js.br +0 -0
- package/dist/public/assets/{_DiGtUP0z.js → _CN4RWjdg.js} +1 -1
- package/dist/public/assets/_CN4RWjdg.js.br +0 -0
- package/dist/public/assets/{_C8oyUxT6.js → _CQ8XIG32.js} +1 -1
- package/dist/public/assets/_CQ8XIG32.js.br +0 -0
- package/dist/public/assets/{_DlNb-fYu.js → _CR7jZl_o.js} +1 -1
- package/dist/public/assets/_CR7jZl_o.js.br +0 -0
- package/dist/public/assets/{_DUXtjYQn2.js → _CR_N8Jxw2.js} +1 -1
- package/dist/public/assets/_CR_N8Jxw2.js.br +0 -0
- package/dist/public/assets/{_BJcu7zuL.js → _CUy49fiW.js} +1 -1
- package/dist/public/assets/_CUy49fiW.js.br +0 -0
- package/dist/public/assets/{_Bpg_ooRv.js → _CVI5Z1ap.js} +1 -1
- package/dist/public/assets/_CVI5Z1ap.js.br +0 -0
- package/dist/public/assets/{_DZY5Isxk.js → _CXQb7FHW.js} +1 -1
- package/dist/public/assets/_CXQb7FHW.js.br +0 -0
- package/dist/public/assets/{_D8FrQTdt.js → _CXbfNROI.js} +1 -1
- package/dist/public/assets/_CXbfNROI.js.br +0 -0
- package/dist/public/assets/{_bAY6mkrH.js → _C_GySFna.js} +1 -1
- package/dist/public/assets/_C_GySFna.js.br +0 -0
- package/dist/public/assets/{_JSFtvHrr2.js → _Cb4BQ87V2.js} +1 -1
- package/dist/public/assets/_Cb4BQ87V2.js.br +0 -0
- package/dist/public/assets/{_C1a8yKxf2.js → _CekDvoOm2.js} +1 -1
- package/dist/public/assets/_CekDvoOm2.js.br +0 -0
- package/dist/public/assets/{_CwZZbyL7.js → _CiyoX76R.js} +1 -1
- package/dist/public/assets/_CiyoX76R.js.br +0 -0
- package/dist/public/assets/{_Cv3WsmqQ.js → _D31bJ4DY.js} +1 -1
- package/dist/public/assets/_D31bJ4DY.js.br +0 -0
- package/dist/public/assets/{_BiTayVh0.js → _D7MBKQAt.js} +1 -1
- package/dist/public/assets/_D7MBKQAt.js.br +0 -0
- package/dist/public/assets/{_igERlCUJ2.js → _D8NtarGl2.js} +1 -1
- package/dist/public/assets/_D8NtarGl2.js.br +0 -0
- package/dist/public/assets/{_BbigvT1q2.js → _DHQRi0uw2.js} +1 -1
- package/dist/public/assets/_DHQRi0uw2.js.br +0 -0
- package/dist/public/assets/{_CtCr-bK2.js → _DHjOV863.js} +1 -1
- package/dist/public/assets/_DHjOV863.js.br +0 -0
- package/dist/public/assets/{_BCV01fYS.js → _DIFhW7d2.js} +1 -1
- package/dist/public/assets/_DIFhW7d2.js.br +0 -0
- package/dist/public/assets/{_Bz5O3Mrq.js → _DK0ZyRpN.js} +1 -1
- package/dist/public/assets/_DK0ZyRpN.js.br +0 -0
- package/dist/public/assets/{_DwWcfMba.js → _DLV-pFpn.js} +1 -1
- package/dist/public/assets/_DLV-pFpn.js.br +0 -0
- package/dist/public/assets/{_D88tqCHV.js → _DOiBi4I0.js} +1 -1
- package/dist/public/assets/_DOiBi4I0.js.br +0 -0
- package/dist/public/assets/{_B21IMSvY.js → _DRSO79wd.js} +1 -1
- package/dist/public/assets/_DRSO79wd.js.br +0 -0
- package/dist/public/assets/{_DOav6UsU.js → _DbJsbj5D.js} +1 -1
- package/dist/public/assets/_DbJsbj5D.js.br +0 -0
- package/dist/public/assets/{_Cvt5BAln.js → _DboFmLJ5.js} +1 -1
- package/dist/public/assets/_DboFmLJ5.js.br +0 -0
- package/dist/public/assets/{_BD8O2K_O.js → _DfayPfGn.js} +1 -1
- package/dist/public/assets/_DfayPfGn.js.br +0 -0
- package/dist/public/assets/{_BjEsAKXh.js → _DlKqfl3x.js} +1 -1
- package/dist/public/assets/_DlKqfl3x.js.br +0 -0
- package/dist/public/assets/{_T9z-lYxT.js → _Drl9WI2Q.js} +1 -1
- package/dist/public/assets/_Drl9WI2Q.js.br +0 -0
- package/dist/public/assets/{_D_LErC4-.js → _DtvBiqKq.js} +1 -1
- package/dist/public/assets/_DtvBiqKq.js.br +0 -0
- package/dist/public/assets/{_Djp7iq652.js → _DxQEc7cj2.js} +1 -1
- package/dist/public/assets/{_B1Z1hJGn2.js → _DymTiS2l2.js} +1 -1
- package/dist/public/assets/_DymTiS2l2.js.br +0 -0
- package/dist/public/assets/{_Dm07KeQi2.js → _ELEfU1ZJ2.js} +1 -1
- package/dist/public/assets/_ELEfU1ZJ2.js.br +0 -0
- package/dist/public/assets/{_Dxxi3lS5.js → _En2Jcy8J.js} +1 -1
- package/dist/public/assets/_En2Jcy8J.js.br +0 -0
- package/dist/public/assets/{_Drj40pVX.js → _HJ4l6yxN.js} +1 -1
- package/dist/public/assets/_HJ4l6yxN.js.br +0 -0
- package/dist/public/assets/{_BvUZ8h-x.js → _IuMur5Ym.js} +1 -1
- package/dist/public/assets/_IuMur5Ym.js.br +0 -0
- package/dist/public/assets/{_CgkfHUqc2.js → _LIg4gQDB2.js} +1 -1
- package/dist/public/assets/_LIg4gQDB2.js.br +0 -0
- package/dist/public/assets/{_DMz1MwaQ.js → _Q62npO-T.js} +1 -1
- package/dist/public/assets/_Q62npO-T.js.br +0 -0
- package/dist/public/assets/{_BUXWMqIU.js → _RRBED5IT.js} +1 -1
- package/dist/public/assets/_RRBED5IT.js.br +0 -0
- package/dist/public/assets/{_DK9AAOZp.js → _TNYXBRTD.js} +6 -6
- package/dist/public/assets/_TNYXBRTD.js.br +0 -0
- package/dist/public/assets/{_DDpSvFlC.js → _YkjHoUJ2.js} +1 -1
- package/dist/public/assets/_YkjHoUJ2.js.br +0 -0
- package/dist/public/assets/{_-WmXU-Ck2.js → _ZPETJBJo2.js} +1 -1
- package/dist/public/assets/_ZPETJBJo2.js.br +0 -0
- package/dist/public/assets/{_DPz8SQGB2.js → _c1k15BL72.js} +1 -1
- package/dist/public/assets/_c1k15BL72.js.br +0 -0
- package/dist/public/assets/{_DjQpfByq.js → _gzI_71qk.js} +1 -1
- package/dist/public/assets/_gzI_71qk.js.br +0 -0
- package/dist/public/assets/{_BXsHAtou.js → _oLZchIMS.js} +1 -1
- package/dist/public/assets/_oLZchIMS.js.br +0 -0
- package/dist/public/assets/{_DQDkXhCW.js → _olWgegfx.js} +1 -1
- package/dist/public/assets/{_CFvnHEVa2.js → _sRlPXrhp2.js} +1 -1
- package/dist/public/assets/_sRlPXrhp2.js.br +0 -0
- package/dist/public/assets/{_BdsfdexS.js → _t1bRY80J.js} +1 -1
- package/dist/public/assets/_t1bRY80J.js.br +0 -0
- package/dist/public/assets/app-page-D2MGNs24.css +1 -0
- package/dist/public/assets/app-page-D2MGNs24.css.br +0 -0
- package/dist/public/assets/{diff-view-Baatv3LB.css → diff-view-UG7NdbBG.css} +1 -1
- package/dist/public/assets/diff-view-UG7NdbBG.css.br +0 -0
- package/dist/public/assets/new-BAusPvMv.js +1 -0
- package/dist/public/assets/settings-BAusPvMv.js +1 -0
- package/dist/public/assets/w-BAusPvMv.js +1 -0
- package/dist/public/assets/w._-BAusPvMv.js +1 -0
- package/dist/public/assets/w._-CuEUWcak.js +1 -0
- package/package.json +1 -1
- package/dist/public/assets/_-WmXU-Ck2.js.br +0 -0
- package/dist/public/assets/_-ru5vl7a.js.br +0 -0
- package/dist/public/assets/_8c-uHmeW2.js.br +0 -0
- package/dist/public/assets/_B1Z1hJGn2.js.br +0 -0
- package/dist/public/assets/_B21IMSvY.js.br +0 -0
- package/dist/public/assets/_BCV01fYS.js.br +0 -0
- package/dist/public/assets/_BD8O2K_O.js.br +0 -0
- package/dist/public/assets/_BFNm4iX52.js.br +0 -0
- package/dist/public/assets/_BJcu7zuL.js.br +0 -0
- package/dist/public/assets/_BUXWMqIU.js.br +0 -0
- package/dist/public/assets/_BXsHAtou.js.br +0 -0
- package/dist/public/assets/_BbigvT1q2.js.br +0 -0
- package/dist/public/assets/_BdsfdexS.js.br +0 -0
- package/dist/public/assets/_BiTayVh0.js.br +0 -0
- package/dist/public/assets/_BjEsAKXh.js.br +0 -0
- package/dist/public/assets/_BjVUCdYI.js.br +0 -0
- package/dist/public/assets/_BlE98RWB.js.br +0 -0
- package/dist/public/assets/_Bpg_ooRv.js.br +0 -0
- package/dist/public/assets/_BrNrnCdj.js.br +0 -0
- package/dist/public/assets/_BvAqq5m6.js.br +0 -0
- package/dist/public/assets/_BvUZ8h-x.js.br +0 -0
- package/dist/public/assets/_ByxTzbwH2.js.br +0 -0
- package/dist/public/assets/_Bz5O3Mrq.js.br +0 -0
- package/dist/public/assets/_C-BzebGR.js.br +0 -0
- package/dist/public/assets/_C07OAOG6.js.br +0 -0
- package/dist/public/assets/_C1a8yKxf2.js.br +0 -0
- package/dist/public/assets/_C8oyUxT6.js.br +0 -0
- package/dist/public/assets/_CEV-O2hk.js.br +0 -0
- package/dist/public/assets/_CFvnHEVa2.js.br +0 -0
- package/dist/public/assets/_CUFjqbZE.js.br +0 -0
- package/dist/public/assets/_CV-6gAkw.js.br +0 -0
- package/dist/public/assets/_CeI4faG12.js.br +0 -0
- package/dist/public/assets/_CeiupuAL2.js.br +0 -0
- package/dist/public/assets/_CgkfHUqc2.js.br +0 -0
- package/dist/public/assets/_Chrp8y2F.js.br +0 -0
- package/dist/public/assets/_CtCr-bK2.js.br +0 -0
- package/dist/public/assets/_Cv3WsmqQ.js.br +0 -0
- package/dist/public/assets/_Cvt5BAln.js.br +0 -0
- package/dist/public/assets/_CwZZbyL7.js.br +0 -0
- package/dist/public/assets/_D88tqCHV.js.br +0 -0
- package/dist/public/assets/_D8FrQTdt.js.br +0 -0
- package/dist/public/assets/_DDpSvFlC.js.br +0 -0
- package/dist/public/assets/_DDphf7Gv2.js.br +0 -0
- package/dist/public/assets/_DEY6fLoS2.js.br +0 -0
- package/dist/public/assets/_DGyPz6VI2.js.br +0 -0
- package/dist/public/assets/_DK9AAOZp.js.br +0 -0
- package/dist/public/assets/_DMz1MwaQ.js.br +0 -0
- package/dist/public/assets/_DOav6UsU.js.br +0 -0
- package/dist/public/assets/_DPz8SQGB2.js.br +0 -0
- package/dist/public/assets/_DSS7F-KT2.js.br +0 -0
- package/dist/public/assets/_DUXtjYQn2.js.br +0 -0
- package/dist/public/assets/_DUko1Sy92.js.br +0 -0
- package/dist/public/assets/_DWhr2Wyd.js.br +0 -0
- package/dist/public/assets/_DZY5Isxk.js.br +0 -0
- package/dist/public/assets/_D_LErC4-.js.br +0 -0
- package/dist/public/assets/_DbfrRxLt.js.br +0 -0
- package/dist/public/assets/_DiGtUP0z.js.br +0 -0
- package/dist/public/assets/_DjQpfByq.js.br +0 -0
- package/dist/public/assets/_DlNb-fYu.js.br +0 -0
- package/dist/public/assets/_Dm07KeQi2.js.br +0 -0
- package/dist/public/assets/_Drj40pVX.js.br +0 -0
- package/dist/public/assets/_DunIU1gI.js.br +0 -0
- package/dist/public/assets/_DwWcfMba.js.br +0 -0
- package/dist/public/assets/_Dxxi3lS5.js.br +0 -0
- package/dist/public/assets/_JSFtvHrr2.js.br +0 -0
- package/dist/public/assets/_SR9h4Okl.js.br +0 -0
- package/dist/public/assets/_T9z-lYxT.js.br +0 -0
- package/dist/public/assets/_bAY6mkrH.js.br +0 -0
- package/dist/public/assets/_igERlCUJ2.js.br +0 -0
- package/dist/public/assets/_nz3ixzI3.js.br +0 -0
- package/dist/public/assets/_tX_6AA9a.js.br +0 -0
- package/dist/public/assets/_tng7Ctl52.js.br +0 -0
- package/dist/public/assets/_uI46O0Ad.js.br +0 -0
- package/dist/public/assets/app-page-CBOLkS3u.css +0 -1
- package/dist/public/assets/app-page-CBOLkS3u.css.br +0 -0
- package/dist/public/assets/diff-view-Baatv3LB.css.br +0 -0
- package/dist/public/assets/new-Btf-ladG.js +0 -1
- package/dist/public/assets/settings-Btf-ladG.js +0 -1
- package/dist/public/assets/w-Btf-ladG.js +0 -1
- package/dist/public/assets/w._-Btf-ladG.js +0 -1
- package/dist/public/assets/w._-ihiSObwS.js +0 -1
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
2
|
import { $ as setSetting, A as setScrapedPhase, B as saveSubscription, C as agentBadge, D as agentMeta, E as agentLabel, F as manifest, G as agentChoices, H as subscribe, I as normalizeAccent, J as enabledAgents, K as allPrefs, L as setInstance, M as ACCENT_RE, N as getInstance, O as clearAgentPhase, P as iconSvg, Q as setPref, R as deleteSubscription, S as blankRow, T as agentFromCommand, U as subscriberCount, V as publish, W as subscriberJoins, X as preferredAgent, Y as getSetting, Z as setDisabledAgents, _ as tmuxName, _t as tmux, a as ensureTmuxServer, at as DEFAULT_GITHUB_HOST, b as readHookPayload, c as killWorkspaceSessions, ct as toolById, d as newSessionArgs, dt as get, et as doctor, ft as workspacePath, g as sessionStates, gt as run, h as sendToSession, ht as git, i as disposeSessions, it as which, j as setSessionViewers, k as setAgentPhase, l as listSessions, lt as all, m as renameSession, mt as gh, n as clearTmuxStarted, nt as miseVersions, o as getSession, ot as TOOLS, p as panePids, pt as TMUX_SOCKET, q as disabledAgents, r as createSession, rt as setupPath, s as killSession, st as agentById, t as cleanEnv, tt as ghKnownHosts, u as markTmuxStarted, ut as db, v as tmuxWasStarted, vt as config, w as agentFamily, x as reportsWorking, y as AGENTS, z as pushPublicKey } from "./_CExzMbX7.js";
|
|
3
|
-
import { $ as
|
|
3
|
+
import { $ as _el_read_error, C as icon_base_default, Ct as _to_text, D as setPrimaryHost, Dt as attrTag, E as repoWebUrl$1, Et as _var, F as phase, G as _attr_style, H as _attr_option_value, I as tone, J as _await, K as _attrs, L as $global, M as iconBtnXs, N as inputLg, O as btnLg, Ot as withPageAssets, P as metaTrunc, R as _attr, S as icon_xmark_default, St as _template, T as repoLabel, Tt as _try, U as _attr_or, V as _attr_input_value, W as _attr_select_value, X as _content_resume, Y as _content, Z as _dynamic_tag, _ as icon_refresh_default, _t as _sep, at as _hoist, b as sectionCount$1, bt as _set_serialize_reason, ct as _id, d as sideNavOpen, dt as _resume, et as _el_resume, f as workspaceTab, ft as _resume_branch, g as icon_back_default, gt as _script, h as icon_search_default, ht as _scope_with_id, it as _for_of, j as iconBtnRow, k as btnSm, kt as writeScope, lt as _if, m as rankRepos, mt as _scope_reason, n as findInput, nt as _existing_scope, ot as _hoist_read_error, pt as _scope_id, q as _attrs_partial, r as icon_sidebar_default, rt as _flush_head, st as _html, t as findIconBtn, tt as _escape, u as setWorkspaceTab, ut as _peek_scope_id, v as iconBtn$2, vt as _serialize_guard, w as parseRepoUrl, wt as _trailers, x as toast_default, xt as _subscribe, y as row, yt as _serialize_if, z as _attr_class } from "./_D5j6bTJl.js";
|
|
4
4
|
import fs from "node:fs";
|
|
5
5
|
import { createServer } from "node:http";
|
|
6
6
|
import path from "node:path";
|
|
@@ -1494,6 +1494,248 @@ function forgetToken(host) {
|
|
|
1494
1494
|
tokens.delete(host);
|
|
1495
1495
|
}
|
|
1496
1496
|
//#endregion
|
|
1497
|
+
//#region src/server/cache.ts
|
|
1498
|
+
/** Keyed stale-while-revalidate cache: a cached value is served immediately
|
|
1499
|
+
* (revalidating in the background when older than `ttlMs`); loads are deduped
|
|
1500
|
+
* per key, and `refresh` bypasses both the cache and any in-flight load. */
|
|
1501
|
+
function swr(ttlMs, load, seed) {
|
|
1502
|
+
const cache = /* @__PURE__ */ new Map();
|
|
1503
|
+
const inflight = /* @__PURE__ */ new Map();
|
|
1504
|
+
function start(key, refresh) {
|
|
1505
|
+
const startedAt = Date.now();
|
|
1506
|
+
const promise = load(key, refresh).then((value) => {
|
|
1507
|
+
const existing = cache.get(key);
|
|
1508
|
+
if (!existing || existing.at <= startedAt) cache.set(key, {
|
|
1509
|
+
at: Date.now(),
|
|
1510
|
+
value
|
|
1511
|
+
});
|
|
1512
|
+
return value;
|
|
1513
|
+
}).finally(() => {
|
|
1514
|
+
if (inflight.get(key)?.promise === promise) inflight.delete(key);
|
|
1515
|
+
});
|
|
1516
|
+
inflight.set(key, {
|
|
1517
|
+
promise,
|
|
1518
|
+
refresh
|
|
1519
|
+
});
|
|
1520
|
+
return promise;
|
|
1521
|
+
}
|
|
1522
|
+
const read = (key, refresh = false) => {
|
|
1523
|
+
if (refresh) {
|
|
1524
|
+
const current = inflight.get(key);
|
|
1525
|
+
return current?.refresh ? current.promise : start(key, true);
|
|
1526
|
+
}
|
|
1527
|
+
let cached = cache.get(key);
|
|
1528
|
+
if (!cached && seed) {
|
|
1529
|
+
cached = seed(key);
|
|
1530
|
+
if (cached) cache.set(key, cached);
|
|
1531
|
+
}
|
|
1532
|
+
if (cached) {
|
|
1533
|
+
if (Date.now() - cached.at >= ttlMs && !inflight.has(key)) start(key, false).catch(() => {});
|
|
1534
|
+
return Promise.resolve(cached.value);
|
|
1535
|
+
}
|
|
1536
|
+
return inflight.get(key)?.promise ?? start(key, false);
|
|
1537
|
+
};
|
|
1538
|
+
/** Inject an externally fetched value (e.g. from a batched load). */
|
|
1539
|
+
read.set = (key, value) => {
|
|
1540
|
+
cache.set(key, {
|
|
1541
|
+
at: Date.now(),
|
|
1542
|
+
value
|
|
1543
|
+
});
|
|
1544
|
+
};
|
|
1545
|
+
/** Current cached value, if any — used when a batch update must merge
|
|
1546
|
+
* with a richer per-key load rather than replace it. */
|
|
1547
|
+
read.get = (key) => cache.get(key)?.value;
|
|
1548
|
+
return read;
|
|
1549
|
+
}
|
|
1550
|
+
//#endregion
|
|
1551
|
+
//#region src/server/github.ts
|
|
1552
|
+
var TTL_MS$3 = 9e5;
|
|
1553
|
+
/** github.com keeps the historical file name; Enterprise hosts get their own. */
|
|
1554
|
+
var cachePath = (host) => path.join(config.dataDir, host === DEFAULT_HOST ? "repos.json" : `repos.${host}.json`);
|
|
1555
|
+
/**
|
|
1556
|
+
* User's repos plus every org's on every configured host, merged and cached
|
|
1557
|
+
* (in memory, persisted to disk across restarts). Cached results are served
|
|
1558
|
+
* immediately no matter their age, with a background revalidate when stale
|
|
1559
|
+
* — only an explicit refresh or an empty cache blocks. Hosts are
|
|
1560
|
+
* independent: a signed-out Enterprise server costs its own repos, never
|
|
1561
|
+
* github.com's.
|
|
1562
|
+
*/
|
|
1563
|
+
async function repoCatalog(refresh = false) {
|
|
1564
|
+
const hosts = configuredHosts();
|
|
1565
|
+
const parts = await Promise.all(hosts.map((host) => catalog(host, refresh).catch(() => {
|
|
1566
|
+
if (host === DEFAULT_HOST && refresh) throw new Error(`gh repo listing failed`);
|
|
1567
|
+
return catalog.get(host) ?? null;
|
|
1568
|
+
})));
|
|
1569
|
+
const repos = parts.flatMap((c) => c?.repos ?? []);
|
|
1570
|
+
return {
|
|
1571
|
+
fetchedAt: Math.min(...parts.map((c) => c?.fetchedAt ?? Date.now())),
|
|
1572
|
+
repos: repos.sort((a, b) => a.nameWithOwner.localeCompare(b.nameWithOwner))
|
|
1573
|
+
};
|
|
1574
|
+
}
|
|
1575
|
+
var catalog = swr(TTL_MS$3, fetchCatalog, readDiskCache);
|
|
1576
|
+
function readDiskCache(host) {
|
|
1577
|
+
try {
|
|
1578
|
+
const cached = JSON.parse(fs.readFileSync(cachePath(host), "utf8"));
|
|
1579
|
+
if (!Array.isArray(cached?.repos)) return void 0;
|
|
1580
|
+
for (const r of cached.repos) r.host ||= host;
|
|
1581
|
+
return {
|
|
1582
|
+
at: cached.fetchedAt,
|
|
1583
|
+
value: cached
|
|
1584
|
+
};
|
|
1585
|
+
} catch {
|
|
1586
|
+
return;
|
|
1587
|
+
}
|
|
1588
|
+
}
|
|
1589
|
+
async function fetchCatalog(host) {
|
|
1590
|
+
let partial = false;
|
|
1591
|
+
const orgs = (await gh([
|
|
1592
|
+
"api",
|
|
1593
|
+
"user/orgs",
|
|
1594
|
+
"--jq",
|
|
1595
|
+
".[].login"
|
|
1596
|
+
], host).catch(() => {
|
|
1597
|
+
partial = true;
|
|
1598
|
+
return "";
|
|
1599
|
+
})).split("\n").filter(Boolean);
|
|
1600
|
+
const lists = await Promise.all([void 0, ...orgs].map((owner) => gh([
|
|
1601
|
+
"repo",
|
|
1602
|
+
"list",
|
|
1603
|
+
...owner ? [owner] : [],
|
|
1604
|
+
"--limit",
|
|
1605
|
+
"500",
|
|
1606
|
+
"--json",
|
|
1607
|
+
"nameWithOwner,defaultBranchRef,isArchived,parent"
|
|
1608
|
+
], host).catch(() => {
|
|
1609
|
+
partial = true;
|
|
1610
|
+
return "[]";
|
|
1611
|
+
})));
|
|
1612
|
+
const byName = /* @__PURE__ */ new Map();
|
|
1613
|
+
for (const out of lists) for (const r of JSON.parse(out)) byName.set(r.nameWithOwner, {
|
|
1614
|
+
nameWithOwner: joinRepo(host, r.nameWithOwner),
|
|
1615
|
+
host,
|
|
1616
|
+
defaultBranch: r.defaultBranchRef?.name || "main",
|
|
1617
|
+
isArchived: !!r.isArchived,
|
|
1618
|
+
parent: r.parent ? joinRepo(host, `${r.parent.owner.login}/${r.parent.name}`) : null
|
|
1619
|
+
});
|
|
1620
|
+
const repos = [...byName.values()].sort((a, b) => a.nameWithOwner.localeCompare(b.nameWithOwner));
|
|
1621
|
+
const catalog = {
|
|
1622
|
+
fetchedAt: Date.now(),
|
|
1623
|
+
repos
|
|
1624
|
+
};
|
|
1625
|
+
if (partial) {
|
|
1626
|
+
if (readDiskCache(host)) throw new Error("gh repo listing failed");
|
|
1627
|
+
return catalog;
|
|
1628
|
+
}
|
|
1629
|
+
const tmp = cachePath(host) + ".tmp";
|
|
1630
|
+
fs.writeFileSync(tmp, JSON.stringify(catalog));
|
|
1631
|
+
fs.renameSync(tmp, cachePath(host));
|
|
1632
|
+
return catalog;
|
|
1633
|
+
}
|
|
1634
|
+
/** Fork `fullName` under the signed-in user and return the fork's
|
|
1635
|
+
* `[host/]owner/name`. Idempotent: GitHub answers the POST with the
|
|
1636
|
+
* existing fork if there is one. Fork creation is async on GitHub's side,
|
|
1637
|
+
* so wait until the fork actually has branches — cloning too early gets a
|
|
1638
|
+
* repo with no refs and the worktree add fails on a missing base. An
|
|
1639
|
+
* empty *upstream* also has no branches; the timeout lets that case fall
|
|
1640
|
+
* through to the clone rather than erroring here. */
|
|
1641
|
+
async function ensureFork(fullName) {
|
|
1642
|
+
const { host, name } = splitRepo(fullName);
|
|
1643
|
+
const out = await gh([
|
|
1644
|
+
"api",
|
|
1645
|
+
"-X",
|
|
1646
|
+
"POST",
|
|
1647
|
+
`repos/${name}/forks`,
|
|
1648
|
+
"--jq",
|
|
1649
|
+
".full_name"
|
|
1650
|
+
], host);
|
|
1651
|
+
const fork = out.trim();
|
|
1652
|
+
if (!/^[\w.-]+\/[\w.-]+$/.test(fork)) throw new Error(`forking ${fullName} failed: ${out || "no response"}`);
|
|
1653
|
+
const forkFull = joinRepo(host, fork);
|
|
1654
|
+
for (let tries = 0; tries < 15; tries++) {
|
|
1655
|
+
if (await forkHasRefs(forkFull, host, fork)) break;
|
|
1656
|
+
if (tries < 14) await new Promise((r) => setTimeout(r, 2e3));
|
|
1657
|
+
}
|
|
1658
|
+
return forkFull;
|
|
1659
|
+
}
|
|
1660
|
+
async function forkHasRefs(forkFull, host, fork) {
|
|
1661
|
+
try {
|
|
1662
|
+
await ensureGitCredentials(host);
|
|
1663
|
+
if ((await git([
|
|
1664
|
+
"ls-remote",
|
|
1665
|
+
"--heads",
|
|
1666
|
+
cloneUrl(forkFull)
|
|
1667
|
+
])).split("\n").some((l) => l.includes(" refs/heads/"))) return true;
|
|
1668
|
+
} catch {}
|
|
1669
|
+
const count = await gh([
|
|
1670
|
+
"api",
|
|
1671
|
+
`repos/${fork}/branches?per_page=1`,
|
|
1672
|
+
"--jq",
|
|
1673
|
+
"length"
|
|
1674
|
+
], host).catch(() => "");
|
|
1675
|
+
return !!count && count !== "0";
|
|
1676
|
+
}
|
|
1677
|
+
/** Branch names for a repo (for base-branch selection). */
|
|
1678
|
+
var repoBranches = (fullName) => branches(fullName);
|
|
1679
|
+
/** Upstream `[host/]owner/name` when the repo is a fork, else null. A PR
|
|
1680
|
+
* opened from a fork lives in the upstream repo, so PR search needs this to
|
|
1681
|
+
* know where else to look. The catalog answers from disk for listed repos
|
|
1682
|
+
* (the status batch asks for every active repo at once, and must not fan
|
|
1683
|
+
* out into per-repo REST calls on a cold start); the per-repo lookup covers
|
|
1684
|
+
* repos outside it. Failures resolve to null (and age out with the TTL) —
|
|
1685
|
+
* a blip here must cost fork PRs, not the whole status tick. */
|
|
1686
|
+
async function repoParent(fullName) {
|
|
1687
|
+
const hit = (await repoCatalog().catch(() => null))?.repos.find((r) => r.nameWithOwner === fullName);
|
|
1688
|
+
if (hit && hit.parent !== void 0) return hit.parent;
|
|
1689
|
+
return (await repoMeta(fullName)).parent;
|
|
1690
|
+
}
|
|
1691
|
+
/** The repo's default branch, or null when the lookup failed. */
|
|
1692
|
+
var repoDefaultBranch = async (fullName) => (await repoMeta(fullName)).defaultBranch;
|
|
1693
|
+
var repoMeta = swr(36e5, async (fullName) => {
|
|
1694
|
+
const { host, name } = splitRepo(fullName);
|
|
1695
|
+
const out = await gh([
|
|
1696
|
+
"api",
|
|
1697
|
+
`repos/${name}`,
|
|
1698
|
+
"--jq",
|
|
1699
|
+
"{parent: (.parent.full_name // null), default: .default_branch}"
|
|
1700
|
+
], host).catch(() => "");
|
|
1701
|
+
let parsed = {};
|
|
1702
|
+
try {
|
|
1703
|
+
parsed = JSON.parse(out);
|
|
1704
|
+
} catch {}
|
|
1705
|
+
if (!parsed.default) try {
|
|
1706
|
+
await ensureGitCredentials(host);
|
|
1707
|
+
const symref = await git([
|
|
1708
|
+
"ls-remote",
|
|
1709
|
+
"--symref",
|
|
1710
|
+
cloneUrl(fullName),
|
|
1711
|
+
"HEAD"
|
|
1712
|
+
]);
|
|
1713
|
+
parsed.default = /^ref: refs\/heads\/(\S+)\tHEAD/m.exec(symref)?.[1] ?? null;
|
|
1714
|
+
} catch {}
|
|
1715
|
+
return {
|
|
1716
|
+
parent: parsed.parent ? joinRepo(host, parsed.parent) : null,
|
|
1717
|
+
defaultBranch: parsed.default || null
|
|
1718
|
+
};
|
|
1719
|
+
});
|
|
1720
|
+
var branches = swr(3e5, async (fullName) => {
|
|
1721
|
+
const { host, name } = splitRepo(fullName);
|
|
1722
|
+
try {
|
|
1723
|
+
return (await gh([
|
|
1724
|
+
"api",
|
|
1725
|
+
`repos/${name}/branches?per_page=100`,
|
|
1726
|
+
"--jq",
|
|
1727
|
+
".[].name"
|
|
1728
|
+
], host)).split("\n").filter(Boolean);
|
|
1729
|
+
} catch {
|
|
1730
|
+
await ensureGitCredentials(host);
|
|
1731
|
+
return (await git([
|
|
1732
|
+
"ls-remote",
|
|
1733
|
+
"--heads",
|
|
1734
|
+
cloneUrl(fullName)
|
|
1735
|
+
])).split("\n").map((l) => l.split(" refs/heads/")[1]).filter(Boolean);
|
|
1736
|
+
}
|
|
1737
|
+
});
|
|
1738
|
+
//#endregion
|
|
1497
1739
|
//#region src/server/procs.ts
|
|
1498
1740
|
var darwin = process.platform === "darwin";
|
|
1499
1741
|
/** Listening TCP ports attributed to workspaces by the owning process's cwd. */
|
|
@@ -1729,6 +1971,7 @@ function hydrate(ws) {
|
|
|
1729
1971
|
}
|
|
1730
1972
|
async function createWorkspace(name, repos) {
|
|
1731
1973
|
if (!name.trim()) throw new Error("workspace name required");
|
|
1974
|
+
for (const repo of repos) assertKnownHost(repo.fullName);
|
|
1732
1975
|
const slug = slugify(name);
|
|
1733
1976
|
const id = randomId();
|
|
1734
1977
|
const dir = path.join(config.workRoot, `${slug}-${id}`);
|
|
@@ -1739,13 +1982,14 @@ async function createWorkspace(name, repos) {
|
|
|
1739
1982
|
try {
|
|
1740
1983
|
for (const repo of repos) {
|
|
1741
1984
|
const worktree = siblings.get(repo.fullName);
|
|
1742
|
-
const
|
|
1743
|
-
|
|
1985
|
+
const fullName = await resolveFork(repo);
|
|
1986
|
+
const row = await withRepoLock(fullName, async () => {
|
|
1987
|
+
const bare = await ensureBare(fullName);
|
|
1744
1988
|
const defaultBranch = await bareDefaultBranch(bare);
|
|
1745
1989
|
const base = repo.baseBranch || defaultBranch;
|
|
1746
1990
|
await addWorkspaceWorktree(bare, path.join(dir, worktree), branch, base);
|
|
1747
1991
|
return {
|
|
1748
|
-
full_name:
|
|
1992
|
+
full_name: fullName,
|
|
1749
1993
|
worktree,
|
|
1750
1994
|
base_branch: base,
|
|
1751
1995
|
default_branch: defaultBranch
|
|
@@ -1772,11 +2016,17 @@ async function createWorkspace(name, repos) {
|
|
|
1772
2016
|
notifyWorkspacesChanged();
|
|
1773
2017
|
return getWorkspace(id);
|
|
1774
2018
|
}
|
|
1775
|
-
async function addRepo$1(workspaceId, fullName, baseBranch) {
|
|
2019
|
+
async function addRepo$1(workspaceId, fullName, baseBranch, fork) {
|
|
1776
2020
|
const ws = getWorkspace(workspaceId);
|
|
1777
2021
|
if (!ws) throw new Error(`unknown workspace: ${workspaceId}`);
|
|
1778
|
-
|
|
1779
|
-
const
|
|
2022
|
+
assertKnownHost(fullName);
|
|
2023
|
+
const requested = fullName;
|
|
2024
|
+
const worktree = assignSiblingNames([...ws.repos.map((r) => r.full_name), requested]).get(requested);
|
|
2025
|
+
fullName = await resolveFork({
|
|
2026
|
+
fullName: requested,
|
|
2027
|
+
fork
|
|
2028
|
+
});
|
|
2029
|
+
await assertRepoNotInWorkspace(ws, requested, fullName);
|
|
1780
2030
|
const { base, defaultBranch } = await withRepoLock(fullName, async () => {
|
|
1781
2031
|
const bare = await ensureBare(fullName);
|
|
1782
2032
|
const defaultBranch = await bareDefaultBranch(bare);
|
|
@@ -1915,6 +2165,33 @@ function progressSince(seq, op) {
|
|
|
1915
2165
|
messages: seq === void 0 ? [] : progressLog.filter((e) => e.seq > seq && (!op || e.op === op))
|
|
1916
2166
|
};
|
|
1917
2167
|
}
|
|
2168
|
+
/** The name to clone: the user's fork of `fullName` when asked, made (or
|
|
2169
|
+
* found — GitHub's fork POST is idempotent) on the spot. */
|
|
2170
|
+
async function resolveFork(repo) {
|
|
2171
|
+
if (!repo.fork) return repo.fullName;
|
|
2172
|
+
progress$1(`Forking ${repo.fullName}…`);
|
|
2173
|
+
return ensureFork(repo.fullName);
|
|
2174
|
+
}
|
|
2175
|
+
/** Only github.com and hosts the user added (or gh already knows). Blocks
|
|
2176
|
+
* pasted `evil.com/o/r` from reaching ls-remote / clone. */
|
|
2177
|
+
function assertKnownHost(fullName) {
|
|
2178
|
+
const { host } = splitRepo(fullName);
|
|
2179
|
+
if (!configuredHosts().includes(host)) throw new Error(`unknown host ${host}: add it in Settings before cloning`);
|
|
2180
|
+
}
|
|
2181
|
+
/** Reject when the workspace already holds the resolved name, the
|
|
2182
|
+
* requested upstream, or a fork/parent pair of either — so forking
|
|
2183
|
+
* `torvalds/linux` then pasting that URL as-is (or the reverse) fails
|
|
2184
|
+
* cleanly instead of adding a second worktree. */
|
|
2185
|
+
async function assertRepoNotInWorkspace(ws, requested, resolved) {
|
|
2186
|
+
const held = new Set(ws.repos.map((r) => r.full_name));
|
|
2187
|
+
if (held.has(resolved) || held.has(requested)) throw new Error(`${held.has(resolved) ? resolved : requested} is already in this workspace`);
|
|
2188
|
+
for (const r of ws.repos) {
|
|
2189
|
+
const parent = await repoParent(r.full_name).catch(() => null);
|
|
2190
|
+
if (parent === requested || parent === resolved) throw new Error(`${r.full_name} (fork of ${parent}) is already in this workspace`);
|
|
2191
|
+
}
|
|
2192
|
+
const parentOfRequested = await repoParent(requested).catch(() => null);
|
|
2193
|
+
if (parentOfRequested && held.has(parentOfRequested)) throw new Error(`${parentOfRequested} (upstream of ${requested}) is already in this workspace`);
|
|
2194
|
+
}
|
|
1918
2195
|
/** One operation at a time per shared bare cache: concurrent create/delete
|
|
1919
2196
|
* on the same repo would race `worktree add` against `worktree prune` and
|
|
1920
2197
|
* concurrent fetches. Chained promises, released even on failure. */
|
|
@@ -2197,60 +2474,6 @@ ${repos.map((r) => `- \`${r.worktree}/\`: ${r.full_name} (base: \`${r.base_branc
|
|
|
2197
2474
|
if (!fs.existsSync(claudeMd)) fs.symlinkSync("AGENTS.md", claudeMd);
|
|
2198
2475
|
}
|
|
2199
2476
|
//#endregion
|
|
2200
|
-
//#region src/server/cache.ts
|
|
2201
|
-
/** Keyed stale-while-revalidate cache: a cached value is served immediately
|
|
2202
|
-
* (revalidating in the background when older than `ttlMs`); loads are deduped
|
|
2203
|
-
* per key, and `refresh` bypasses both the cache and any in-flight load. */
|
|
2204
|
-
function swr(ttlMs, load, seed) {
|
|
2205
|
-
const cache = /* @__PURE__ */ new Map();
|
|
2206
|
-
const inflight = /* @__PURE__ */ new Map();
|
|
2207
|
-
function start(key, refresh) {
|
|
2208
|
-
const startedAt = Date.now();
|
|
2209
|
-
const promise = load(key, refresh).then((value) => {
|
|
2210
|
-
const existing = cache.get(key);
|
|
2211
|
-
if (!existing || existing.at <= startedAt) cache.set(key, {
|
|
2212
|
-
at: Date.now(),
|
|
2213
|
-
value
|
|
2214
|
-
});
|
|
2215
|
-
return value;
|
|
2216
|
-
}).finally(() => {
|
|
2217
|
-
if (inflight.get(key)?.promise === promise) inflight.delete(key);
|
|
2218
|
-
});
|
|
2219
|
-
inflight.set(key, {
|
|
2220
|
-
promise,
|
|
2221
|
-
refresh
|
|
2222
|
-
});
|
|
2223
|
-
return promise;
|
|
2224
|
-
}
|
|
2225
|
-
const read = (key, refresh = false) => {
|
|
2226
|
-
if (refresh) {
|
|
2227
|
-
const current = inflight.get(key);
|
|
2228
|
-
return current?.refresh ? current.promise : start(key, true);
|
|
2229
|
-
}
|
|
2230
|
-
let cached = cache.get(key);
|
|
2231
|
-
if (!cached && seed) {
|
|
2232
|
-
cached = seed(key);
|
|
2233
|
-
if (cached) cache.set(key, cached);
|
|
2234
|
-
}
|
|
2235
|
-
if (cached) {
|
|
2236
|
-
if (Date.now() - cached.at >= ttlMs && !inflight.has(key)) start(key, false).catch(() => {});
|
|
2237
|
-
return Promise.resolve(cached.value);
|
|
2238
|
-
}
|
|
2239
|
-
return inflight.get(key)?.promise ?? start(key, false);
|
|
2240
|
-
};
|
|
2241
|
-
/** Inject an externally fetched value (e.g. from a batched load). */
|
|
2242
|
-
read.set = (key, value) => {
|
|
2243
|
-
cache.set(key, {
|
|
2244
|
-
at: Date.now(),
|
|
2245
|
-
value
|
|
2246
|
-
});
|
|
2247
|
-
};
|
|
2248
|
-
/** Current cached value, if any — used when a batch update must merge
|
|
2249
|
-
* with a richer per-key load rather than replace it. */
|
|
2250
|
-
read.get = (key) => cache.get(key)?.value;
|
|
2251
|
-
return read;
|
|
2252
|
-
}
|
|
2253
|
-
//#endregion
|
|
2254
2477
|
//#region src/server/http.ts
|
|
2255
2478
|
/** Error whose `status` the API error-boundary middleware uses for the response. */
|
|
2256
2479
|
function httpError(status, message) {
|
|
@@ -2655,132 +2878,6 @@ async function graphql(query, host = DEFAULT_HOST) {
|
|
|
2655
2878
|
return body.data;
|
|
2656
2879
|
}
|
|
2657
2880
|
//#endregion
|
|
2658
|
-
//#region src/server/github.ts
|
|
2659
|
-
var TTL_MS$3 = 9e5;
|
|
2660
|
-
/** github.com keeps the historical file name; Enterprise hosts get their own. */
|
|
2661
|
-
var cachePath = (host) => path.join(config.dataDir, host === DEFAULT_HOST ? "repos.json" : `repos.${host}.json`);
|
|
2662
|
-
/**
|
|
2663
|
-
* User's repos plus every org's on every configured host, merged and cached
|
|
2664
|
-
* (in memory, persisted to disk across restarts). Cached results are served
|
|
2665
|
-
* immediately no matter their age, with a background revalidate when stale
|
|
2666
|
-
* — only an explicit refresh or an empty cache blocks. Hosts are
|
|
2667
|
-
* independent: a signed-out Enterprise server costs its own repos, never
|
|
2668
|
-
* github.com's.
|
|
2669
|
-
*/
|
|
2670
|
-
async function repoCatalog(refresh = false) {
|
|
2671
|
-
const hosts = configuredHosts();
|
|
2672
|
-
const parts = await Promise.all(hosts.map((host) => catalog(host, refresh).catch(() => {
|
|
2673
|
-
if (host === DEFAULT_HOST && refresh) throw new Error(`gh repo listing failed`);
|
|
2674
|
-
return catalog.get(host) ?? null;
|
|
2675
|
-
})));
|
|
2676
|
-
const repos = parts.flatMap((c) => c?.repos ?? []);
|
|
2677
|
-
return {
|
|
2678
|
-
fetchedAt: Math.min(...parts.map((c) => c?.fetchedAt ?? Date.now())),
|
|
2679
|
-
repos: repos.sort((a, b) => a.nameWithOwner.localeCompare(b.nameWithOwner))
|
|
2680
|
-
};
|
|
2681
|
-
}
|
|
2682
|
-
var catalog = swr(TTL_MS$3, fetchCatalog, readDiskCache);
|
|
2683
|
-
function readDiskCache(host) {
|
|
2684
|
-
try {
|
|
2685
|
-
const cached = JSON.parse(fs.readFileSync(cachePath(host), "utf8"));
|
|
2686
|
-
if (!Array.isArray(cached?.repos)) return void 0;
|
|
2687
|
-
for (const r of cached.repos) r.host ||= host;
|
|
2688
|
-
return {
|
|
2689
|
-
at: cached.fetchedAt,
|
|
2690
|
-
value: cached
|
|
2691
|
-
};
|
|
2692
|
-
} catch {
|
|
2693
|
-
return;
|
|
2694
|
-
}
|
|
2695
|
-
}
|
|
2696
|
-
async function fetchCatalog(host) {
|
|
2697
|
-
let partial = false;
|
|
2698
|
-
const orgs = (await gh([
|
|
2699
|
-
"api",
|
|
2700
|
-
"user/orgs",
|
|
2701
|
-
"--jq",
|
|
2702
|
-
".[].login"
|
|
2703
|
-
], host).catch(() => {
|
|
2704
|
-
partial = true;
|
|
2705
|
-
return "";
|
|
2706
|
-
})).split("\n").filter(Boolean);
|
|
2707
|
-
const lists = await Promise.all([void 0, ...orgs].map((owner) => gh([
|
|
2708
|
-
"repo",
|
|
2709
|
-
"list",
|
|
2710
|
-
...owner ? [owner] : [],
|
|
2711
|
-
"--limit",
|
|
2712
|
-
"500",
|
|
2713
|
-
"--json",
|
|
2714
|
-
"nameWithOwner,defaultBranchRef,isArchived,parent"
|
|
2715
|
-
], host).catch(() => {
|
|
2716
|
-
partial = true;
|
|
2717
|
-
return "[]";
|
|
2718
|
-
})));
|
|
2719
|
-
const byName = /* @__PURE__ */ new Map();
|
|
2720
|
-
for (const out of lists) for (const r of JSON.parse(out)) byName.set(r.nameWithOwner, {
|
|
2721
|
-
nameWithOwner: joinRepo(host, r.nameWithOwner),
|
|
2722
|
-
host,
|
|
2723
|
-
defaultBranch: r.defaultBranchRef?.name || "main",
|
|
2724
|
-
isArchived: !!r.isArchived,
|
|
2725
|
-
parent: r.parent ? joinRepo(host, `${r.parent.owner.login}/${r.parent.name}`) : null
|
|
2726
|
-
});
|
|
2727
|
-
const repos = [...byName.values()].sort((a, b) => a.nameWithOwner.localeCompare(b.nameWithOwner));
|
|
2728
|
-
const catalog = {
|
|
2729
|
-
fetchedAt: Date.now(),
|
|
2730
|
-
repos
|
|
2731
|
-
};
|
|
2732
|
-
if (partial) {
|
|
2733
|
-
if (readDiskCache(host)) throw new Error("gh repo listing failed");
|
|
2734
|
-
return catalog;
|
|
2735
|
-
}
|
|
2736
|
-
const tmp = cachePath(host) + ".tmp";
|
|
2737
|
-
fs.writeFileSync(tmp, JSON.stringify(catalog));
|
|
2738
|
-
fs.renameSync(tmp, cachePath(host));
|
|
2739
|
-
return catalog;
|
|
2740
|
-
}
|
|
2741
|
-
/** Branch names for a repo (for base-branch selection). */
|
|
2742
|
-
var repoBranches = (fullName) => branches(fullName);
|
|
2743
|
-
/** Upstream `[host/]owner/name` when the repo is a fork, else null. A PR
|
|
2744
|
-
* opened from a fork lives in the upstream repo, so PR search needs this to
|
|
2745
|
-
* know where else to look. The catalog answers from disk for listed repos
|
|
2746
|
-
* (the status batch asks for every active repo at once, and must not fan
|
|
2747
|
-
* out into per-repo REST calls on a cold start); the per-repo lookup covers
|
|
2748
|
-
* repos outside it. Failures resolve to null (and age out with the TTL) —
|
|
2749
|
-
* a blip here must cost fork PRs, not the whole status tick. */
|
|
2750
|
-
async function repoParent(fullName) {
|
|
2751
|
-
const hit = (await repoCatalog().catch(() => null))?.repos.find((r) => r.nameWithOwner === fullName);
|
|
2752
|
-
if (hit && hit.parent !== void 0) return hit.parent;
|
|
2753
|
-
return (await repoMeta(fullName)).parent;
|
|
2754
|
-
}
|
|
2755
|
-
/** The repo's default branch, or null when the lookup failed. */
|
|
2756
|
-
var repoDefaultBranch = async (fullName) => (await repoMeta(fullName)).defaultBranch;
|
|
2757
|
-
var repoMeta = swr(36e5, async (fullName) => {
|
|
2758
|
-
const { host, name } = splitRepo(fullName);
|
|
2759
|
-
const out = await gh([
|
|
2760
|
-
"api",
|
|
2761
|
-
`repos/${name}`,
|
|
2762
|
-
"--jq",
|
|
2763
|
-
"{parent: (.parent.full_name // null), default: .default_branch}"
|
|
2764
|
-
], host).catch(() => "");
|
|
2765
|
-
let parsed = {};
|
|
2766
|
-
try {
|
|
2767
|
-
parsed = JSON.parse(out);
|
|
2768
|
-
} catch {}
|
|
2769
|
-
return {
|
|
2770
|
-
parent: parsed.parent ? joinRepo(host, parsed.parent) : null,
|
|
2771
|
-
defaultBranch: parsed.default || null
|
|
2772
|
-
};
|
|
2773
|
-
});
|
|
2774
|
-
var branches = swr(3e5, async (fullName) => {
|
|
2775
|
-
const { host, name } = splitRepo(fullName);
|
|
2776
|
-
return (await gh([
|
|
2777
|
-
"api",
|
|
2778
|
-
`repos/${name}/branches?per_page=100`,
|
|
2779
|
-
"--jq",
|
|
2780
|
-
".[].name"
|
|
2781
|
-
], host)).split("\n").filter(Boolean);
|
|
2782
|
-
});
|
|
2783
|
-
//#endregion
|
|
2784
2881
|
//#region src/server/prs.ts
|
|
2785
2882
|
var TTL_MS$2 = 12e4;
|
|
2786
2883
|
/** PRs whose head is the workspace branch or one of its `-topic` lanes.
|
|
@@ -3349,9 +3446,9 @@ function applyInstance(inst) {
|
|
|
3349
3446
|
}
|
|
3350
3447
|
//#endregion
|
|
3351
3448
|
//#region src/tags/settings-page.css.ts
|
|
3352
|
-
var content$2 = "
|
|
3353
|
-
var agentGrid = "
|
|
3354
|
-
var toolGrid = "
|
|
3449
|
+
var content$2 = "_ca _bk _bl";
|
|
3450
|
+
var agentGrid = "_ce _bv";
|
|
3451
|
+
var toolGrid = "_co _bv";
|
|
3355
3452
|
//#endregion
|
|
3356
3453
|
//#region src/tags/page-head.marko
|
|
3357
3454
|
var page_head_default = _template("q", (input) => {
|
|
@@ -3361,14 +3458,14 @@ var page_head_default = _template("q", (input) => {
|
|
|
3361
3458
|
_if(() => {
|
|
3362
3459
|
if (input.backHref) {
|
|
3363
3460
|
const $scope1_id = _scope_id();
|
|
3364
|
-
_html(`<a${_attr("href", input.backHref)}${_attr_class([iconBtnRow, "
|
|
3461
|
+
_html(`<a${_attr("href", input.backHref)}${_attr_class([iconBtnRow, "_cX"])}${_attr_or("title", input.backTitle, " title=\"Back (Esc)\"")}${_attr_or("aria-label", input.backTitle, " aria-label=Back")}>`);
|
|
3365
3462
|
icon_back_default({ size: 16 });
|
|
3366
3463
|
_html(`</a>${_el_resume($scope1_id, "a", _serialize_guard($scope0_reason, 0))}`);
|
|
3367
3464
|
_serialize_if($scope0_reason, 2) && writeScope($scope1_id, { _: _serialize_if($scope0_reason, 0) && _scope_with_id($scope0_id) });
|
|
3368
3465
|
return 0;
|
|
3369
3466
|
} else if (input.onBack) {
|
|
3370
3467
|
const $scope2_id = _scope_id();
|
|
3371
|
-
_html(`<button${_attr_class([iconBtnRow, "
|
|
3468
|
+
_html(`<button${_attr_class([iconBtnRow, "_cX"])}${_attr_or("title", input.backTitle, " title=\"Back (Esc)\"")}${_attr_or("aria-label", input.backTitle, " aria-label=Back")}>`);
|
|
3372
3469
|
icon_back_default({ size: 16 });
|
|
3373
3470
|
_html(`</button>${_el_resume($scope2_id, "a")}`);
|
|
3374
3471
|
_script($scope2_id, "q0");
|
|
@@ -3419,7 +3516,7 @@ var icon_agent_default = _template("E", (input) => {
|
|
|
3419
3516
|
_if(() => {
|
|
3420
3517
|
if (d) {
|
|
3421
3518
|
const $scope1_id = _scope_id();
|
|
3422
|
-
_html(`<svg${_attr_class(["
|
|
3519
|
+
_html(`<svg${_attr_class(["_k", 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)}`);
|
|
3423
3520
|
_if(() => {
|
|
3424
3521
|
if (badge) {
|
|
3425
3522
|
const $scope3_id = _scope_id();
|
|
@@ -3459,7 +3556,7 @@ var icon_agent_default = _template("E", (input) => {
|
|
|
3459
3556
|
n: $badge__closures
|
|
3460
3557
|
});
|
|
3461
3558
|
});
|
|
3462
|
-
var usageNote = "
|
|
3559
|
+
var usageNote = "_eK _S";
|
|
3463
3560
|
//#endregion
|
|
3464
3561
|
//#region src/tags/usage-meters.marko
|
|
3465
3562
|
function duration(ms) {
|
|
@@ -3483,11 +3580,11 @@ var usage_meters_default = _template("B", (input) => {
|
|
|
3483
3580
|
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);
|
|
3484
3581
|
const $scope0_id = _scope_id();
|
|
3485
3582
|
const agent = input.agent;
|
|
3486
|
-
_html(`<div${_attr_class(["
|
|
3583
|
+
_html(`<div${_attr_class(["_eE", { ["_eF"]: input.hideName }])}><div${_attr_class("_eG")}>`);
|
|
3487
3584
|
_if(() => {
|
|
3488
3585
|
if (!input.hideName) {
|
|
3489
3586
|
const $scope1_id = _scope_id();
|
|
3490
|
-
_html(`<strong${_attr_class("
|
|
3587
|
+
_html(`<strong${_attr_class("_eZ")}>${_escape(agent.agent)}${_el_resume($scope1_id, "b", $sg__input_agent)}</strong>`);
|
|
3491
3588
|
$si__input_agent__OR__input_hideName && writeScope($scope1_id, { _: $si__input_agent && _scope_with_id($scope0_id) });
|
|
3492
3589
|
return 0;
|
|
3493
3590
|
}
|
|
@@ -3495,7 +3592,7 @@ var usage_meters_default = _template("B", (input) => {
|
|
|
3495
3592
|
_if(() => {
|
|
3496
3593
|
if (agent.plan && agent.plan.toLowerCase() !== agent.agent.toLowerCase()) {
|
|
3497
3594
|
const $scope2_id = _scope_id();
|
|
3498
|
-
_html(`<span${_attr_class("
|
|
3595
|
+
_html(`<span${_attr_class("_eH")}>${_escape(agent.plan.replace(/^default_/, "").replaceAll("_", " "))}${_el_resume($scope2_id, "b", $sg__input_agent)}</span>`);
|
|
3499
3596
|
$si__input_agent && writeScope($scope2_id, { _: _scope_with_id($scope0_id) });
|
|
3500
3597
|
return 0;
|
|
3501
3598
|
}
|
|
@@ -3503,19 +3600,19 @@ var usage_meters_default = _template("B", (input) => {
|
|
|
3503
3600
|
_if(() => {
|
|
3504
3601
|
if (agent.stale_seconds != null) {
|
|
3505
3602
|
const $scope3_id = _scope_id();
|
|
3506
|
-
_html(`<span${_attr_class("
|
|
3603
|
+
_html(`<span${_attr_class("_eI")}${_attr("title", `${agent.note || "provider unreachable"}. 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)}`);
|
|
3507
3604
|
$si__input_agent && writeScope($scope3_id, { _: _scope_with_id($scope0_id) });
|
|
3508
3605
|
return 0;
|
|
3509
3606
|
}
|
|
3510
3607
|
}, $scope0_id, "e", $sg__input_agent, $sg__input_agent, $sg__input_agent__OR__input_hideName, 0, 1);
|
|
3511
|
-
_html(`</div><div${_attr_class(["
|
|
3608
|
+
_html(`</div><div${_attr_class(["_eJ", { ["_e0"]: agent.stale_seconds != null }])}>`);
|
|
3512
3609
|
_for_of(agent.windows || [], (win) => {
|
|
3513
3610
|
const $scope4_id = _scope_id();
|
|
3514
3611
|
const pct = pctText$1(win.used_percent);
|
|
3515
3612
|
const label = resetLabel(win.resets_at, agent.stale_seconds != null);
|
|
3516
|
-
const fillClass = win.used_percent >= 90 ? "
|
|
3517
|
-
const pctClass = win.used_percent >= 90 ? "
|
|
3518
|
-
_html(`<div${_attr_class("
|
|
3613
|
+
const fillClass = win.used_percent >= 90 ? "_eS" : win.used_percent >= 70 ? "_eR" : win.used_percent >= 40 ? "_eQ" : "_eP";
|
|
3614
|
+
const pctClass = win.used_percent >= 90 ? "_eX" : win.used_percent >= 70 ? "_eW" : win.used_percent >= 40 ? "_eV" : "_eU";
|
|
3615
|
+
_html(`<div${_attr_class("_eL")}${_attr("title", `${win.window}: ${pct} used${win.resets_at ? `, resets ${new Date(win.resets_at).toLocaleString()}` : ""}`)}><span${_attr_class("_eM")}>${_escape(win.window)}${_el_resume($scope4_id, "c", $sg__input_agent)}</span><span${_attr_class("_eN")}><span${_attr_class(["_eO", 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(["_eT", pctClass])}>${_escape(pct)}${_el_resume($scope4_id, "g", $sg__input_agent)}</span>${_el_resume($scope4_id, "f", $sg__input_agent)}<span${_attr_class("_eY")}>${label ? `↻ ${_escape(`${_to_text(label)}`)}` : ""}${_el_resume($scope4_id, "i", $sg__input_agent)}</span></div>${_el_resume($scope4_id, "a", $sg__input_agent)}`);
|
|
3519
3616
|
$si__input_agent && writeScope($scope4_id, { _: _scope_with_id($scope0_id) });
|
|
3520
3617
|
}, "window", $scope0_id, "g", $sg__input_agent, $sg__input_agent, $sg__input_agent, 0, 1);
|
|
3521
3618
|
_if(() => {
|
|
@@ -3574,7 +3671,7 @@ var modal_view_default = _template("o", (input) => {
|
|
|
3574
3671
|
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;
|
|
3575
3672
|
const dismissable = input.dismissable !== false;
|
|
3576
3673
|
let open = input.open;
|
|
3577
|
-
_html(`<dialog${_attr_class(["
|
|
3674
|
+
_html(`<dialog${_attr_class(["_gX", inputClass])}${_attr("aria-labelledby", inputLabelledBy)}${inputLabelledBy ? _attr("aria-label", inputAriaLabel) : _attr("aria-label", inputAriaLabel || label)} closedby=${dismissable ? "any" : "none"}${_attrs_partial({
|
|
3578
3675
|
...htmlInput,
|
|
3579
3676
|
open: null
|
|
3580
3677
|
}, {
|
|
@@ -3584,22 +3681,22 @@ var modal_view_default = _template("o", (input) => {
|
|
|
3584
3681
|
closedby: 1,
|
|
3585
3682
|
"on-cancel": 1,
|
|
3586
3683
|
"on-close": 1
|
|
3587
|
-
}, "a", $scope0_id, "dialog")}><div${_attr_class("
|
|
3684
|
+
}, "a", $scope0_id, "dialog")}><div${_attr_class("_gY")}>`);
|
|
3588
3685
|
_dynamic_tag($scope0_id, "c", content, {}, 0, 0, _serialize_guard($scope0_reason, 6));
|
|
3589
3686
|
_html("</div>");
|
|
3590
3687
|
_if(() => {
|
|
3591
3688
|
if (footer) {
|
|
3592
3689
|
const $scope1_id = _scope_id();
|
|
3593
|
-
_html(`<form method=dialog${_attr_class("
|
|
3690
|
+
_html(`<form method=dialog${_attr_class("_gZ")}>`);
|
|
3594
3691
|
_dynamic_tag($scope1_id, "b", footer.content, {}, 0, 0, _serialize_guard($scope0_reason, 7));
|
|
3595
3692
|
_html("</form>");
|
|
3596
3693
|
$si__input_openChange__OR__input_footer && writeScope($scope1_id, { _: _serialize_if($scope0_reason, 7) && _scope_with_id($scope0_id) });
|
|
3597
3694
|
return 0;
|
|
3598
3695
|
} else if (input.openChange) {
|
|
3599
3696
|
const $scope2_id = _scope_id();
|
|
3600
|
-
_html(`<form method=dialog${_attr_class("
|
|
3697
|
+
_html(`<form method=dialog${_attr_class("_gZ")}>`);
|
|
3601
3698
|
dialog_close_default({
|
|
3602
|
-
class: ["
|
|
3699
|
+
class: ["_o", "_p"],
|
|
3603
3700
|
content: _content("o0", () => {
|
|
3604
3701
|
_scope_reason();
|
|
3605
3702
|
_scope_id();
|
|
@@ -3656,16 +3753,16 @@ var prompt_dialog_default = _template("r", (input) => {
|
|
|
3656
3753
|
const $childScope = _peek_scope_id();
|
|
3657
3754
|
modal_view_default({
|
|
3658
3755
|
label: input.label,
|
|
3659
|
-
class: "
|
|
3756
|
+
class: "_eC",
|
|
3660
3757
|
open: input.open,
|
|
3661
3758
|
openChange: input.openChange,
|
|
3662
3759
|
"aria-labelledby": titleId,
|
|
3663
3760
|
footer: attrTag({ content: _content_resume("r5", () => {
|
|
3664
3761
|
_scope_reason();
|
|
3665
3762
|
const $scope1_id = _scope_id();
|
|
3666
|
-
_html(`<button type=button${_attr_class(["
|
|
3763
|
+
_html(`<button type=button${_attr_class(["_o", "_p"])}${_attr("disabled", !value.trim())}>${_escape(input.submitLabel || "OK")}${_el_resume($scope1_id, "b", _serialize_guard($scope0_reason, 4))}</button>${_el_resume($scope1_id, "a")}<div${_attr_class("_y")}></div>`);
|
|
3667
3764
|
dialog_close_default({
|
|
3668
|
-
class: "
|
|
3765
|
+
class: "_o",
|
|
3669
3766
|
content: _content("r2", () => {
|
|
3670
3767
|
_scope_reason();
|
|
3671
3768
|
_scope_id();
|
|
@@ -3679,7 +3776,7 @@ var prompt_dialog_default = _template("r", (input) => {
|
|
|
3679
3776
|
content: _content("r6", () => {
|
|
3680
3777
|
_scope_reason();
|
|
3681
3778
|
const $scope2_id = _scope_id();
|
|
3682
|
-
_html(`<h2${_attr_class("
|
|
3779
|
+
_html(`<h2${_attr_class("_eD")}${_attr("id", titleId)}>${_escape(input.label)}${_el_resume($scope2_id, "b", $sg__input_label)}</h2><input${_attr_input_value($scope2_id, "c", value, _resume((_new_value) => {
|
|
3683
3780
|
value = _new_value;
|
|
3684
3781
|
}, "r0", $scope2_id))}${_attr("placeholder", input.placeholder)}>${_el_resume($scope2_id, "c")}`);
|
|
3685
3782
|
_script($scope2_id, "r4");
|
|
@@ -4004,12 +4101,12 @@ var settings_page_default = _template("u", (input) => {
|
|
|
4004
4101
|
return 0;
|
|
4005
4102
|
} else if (setup.ready) {
|
|
4006
4103
|
const $scope47_id = _scope_id();
|
|
4007
|
-
_html(`<span${_attr_class("
|
|
4104
|
+
_html(`<span${_attr_class("_cc")}>Ready</span>. Tools, GitHub, and an agent are all in place.`);
|
|
4008
4105
|
writeScope($scope47_id, {});
|
|
4009
4106
|
return 1;
|
|
4010
4107
|
} else {
|
|
4011
4108
|
const $scope6_id = _scope_id();
|
|
4012
|
-
_html(`<span${_attr_class("
|
|
4109
|
+
_html(`<span${_attr_class("_cd")}>Not ready</span>. Missing <!>${_escape(setup.missing.map((m) => MISSING_LABEL[m] || m).join(", "))}${_el_resume($scope6_id, "b")}.`);
|
|
4013
4110
|
_subscribe($setup_missing__closures, writeScope($scope6_id, {}));
|
|
4014
4111
|
return 2;
|
|
4015
4112
|
}
|
|
@@ -4025,7 +4122,7 @@ var settings_page_default = _template("u", (input) => {
|
|
|
4025
4122
|
const $childScope = _peek_scope_id();
|
|
4026
4123
|
icon_refresh_default({
|
|
4027
4124
|
size: 14,
|
|
4028
|
-
class: refreshing && "
|
|
4125
|
+
class: refreshing && "_E"
|
|
4029
4126
|
});
|
|
4030
4127
|
_html(`</button>${_el_resume($scope10_id, "a")}`);
|
|
4031
4128
|
_script($scope10_id, "u27");
|
|
@@ -4056,11 +4153,11 @@ var settings_page_default = _template("u", (input) => {
|
|
|
4056
4153
|
return 0;
|
|
4057
4154
|
}
|
|
4058
4155
|
}, $scope0_id, "e", 1, 1, 1, 0, 1);
|
|
4059
|
-
_html(`<section${_attr_class("_bs")}${_attr("aria-labelledby", agentsId)}><div${_attr_class("_bt")}><h2${_attr("id", agentsId)}${_attr_class("_bH")}>Agents</h2><div${_attr_class("
|
|
4156
|
+
_html(`<section${_attr_class("_bs")}${_attr("aria-labelledby", agentsId)}><div${_attr_class("_bt")}><h2${_attr("id", agentsId)}${_attr_class("_bH")}>Agents</h2><div${_attr_class("_y")}></div><label${_attr_class("_cg")}><span${_attr_class("_S")}>Default</span><span${_attr_class("_m")}>`);
|
|
4060
4157
|
_attr_select_value($scope0_id, "m", input.preferred, _resume(function(v) {
|
|
4061
4158
|
setPreferred(v);
|
|
4062
4159
|
}, "u1", $scope0_id), () => {
|
|
4063
|
-
_html(`<select${_attr_class(["
|
|
4160
|
+
_html(`<select${_attr_class(["_n", "_ch"])} aria-label="Default agent (starts when a workspace has no session yet)" title="Starts when a workspace has no session yet">`);
|
|
4064
4161
|
_for_of(input.agents.filter((a) => a !== "shell"), (id) => {
|
|
4065
4162
|
const $scope48_id = _scope_id();
|
|
4066
4163
|
_html(`<option${_attr_option_value(id)}>${_escape(agentLabel(id))}${_el_resume($scope48_id, "b", $sg__input_agents)}</option>${_el_resume($scope48_id, "a", $sg__input_agents)}`);
|
|
@@ -4072,7 +4169,7 @@ var settings_page_default = _template("u", (input) => {
|
|
|
4072
4169
|
const $childScope3 = _peek_scope_id();
|
|
4073
4170
|
icon_refresh_default({
|
|
4074
4171
|
size: 14,
|
|
4075
|
-
class: usageRefreshing && "
|
|
4172
|
+
class: usageRefreshing && "_E"
|
|
4076
4173
|
});
|
|
4077
4174
|
_html(`</button>${_el_resume($scope0_id, "n")}</div><ul${_attr_class(agentGrid)}>`);
|
|
4078
4175
|
_for_of(families, (a) => {
|
|
@@ -4081,7 +4178,7 @@ var settings_page_default = _template("u", (input) => {
|
|
|
4081
4178
|
const rows = lone ? [] : a.instances;
|
|
4082
4179
|
const loneAccounts = lone && lone.enabled ? accountsFor(lone.id) : [];
|
|
4083
4180
|
const extraAccounts = a.installed ? strayAccountsFor(a) : [];
|
|
4084
|
-
_html(`<li${_attr_class(["_bx", "
|
|
4181
|
+
_html(`<li${_attr_class(["_bx", "_cf"])}><div${_attr_class(["_ci", { ["_cl"]: lone && !lone.enabled }])}>`);
|
|
4085
4182
|
_set_serialize_reason(12);
|
|
4086
4183
|
const $childScope4 = _peek_scope_id();
|
|
4087
4184
|
icon_agent_default({
|
|
@@ -4092,7 +4189,7 @@ var settings_page_default = _template("u", (input) => {
|
|
|
4092
4189
|
_if(() => {
|
|
4093
4190
|
if (lone && input.preferred === lone.id) {
|
|
4094
4191
|
const $scope49_id = _scope_id();
|
|
4095
|
-
_html(`<span${_attr_class(["
|
|
4192
|
+
_html(`<span${_attr_class(["_I", tone.accent])}>default</span>`);
|
|
4096
4193
|
writeScope($scope49_id, {});
|
|
4097
4194
|
return 0;
|
|
4098
4195
|
}
|
|
@@ -4101,7 +4198,7 @@ var settings_page_default = _template("u", (input) => {
|
|
|
4101
4198
|
_if(() => {
|
|
4102
4199
|
if (active.has(a.id)) {
|
|
4103
4200
|
const $scope11_id = _scope_id();
|
|
4104
|
-
_html(`<span${_attr_class("
|
|
4201
|
+
_html(`<span${_attr_class("_cb")}><span${_attr_class("_F")}></span><!>${_escape(active.get(a.id) || "Starting…")}${_el_resume($scope11_id, "c")}</span>`);
|
|
4105
4202
|
_subscribe($active__closures, writeScope($scope11_id, {}));
|
|
4106
4203
|
return 0;
|
|
4107
4204
|
} else if (!a.installed) {
|
|
@@ -4125,8 +4222,8 @@ var settings_page_default = _template("u", (input) => {
|
|
|
4125
4222
|
if (lone) {
|
|
4126
4223
|
const $scope43_id = _scope_id();
|
|
4127
4224
|
_html(`<button${_attr_class([
|
|
4128
|
-
"
|
|
4129
|
-
"
|
|
4225
|
+
"_I",
|
|
4226
|
+
"_K",
|
|
4130
4227
|
{ [tone.ok]: lone.enabled }
|
|
4131
4228
|
])} role=switch aria-checked=${lone.enabled ? "true" : "false"} title=${lone.enabled ? "\"Shown in session pickers. Hide it\"" : "\"Hidden from session pickers. Show it\""}>${lone.enabled ? "on" : "off"}${_el_resume($scope43_id, "b")}</button>${_el_resume($scope43_id, "a")}`);
|
|
4132
4229
|
_script($scope43_id, "u32");
|
|
@@ -4138,29 +4235,29 @@ var settings_page_default = _template("u", (input) => {
|
|
|
4138
4235
|
_if(() => {
|
|
4139
4236
|
if (rows.length || loneAccounts.length || extraAccounts.length) {
|
|
4140
4237
|
const $scope2_id = _scope_id();
|
|
4141
|
-
_html(`<ul${_attr_class("
|
|
4238
|
+
_html(`<ul${_attr_class("_cn")}>`);
|
|
4142
4239
|
_for_of(rows, (inst) => {
|
|
4143
4240
|
const $scope3_id = _scope_id();
|
|
4144
4241
|
const accounts = inst.enabled ? accountsFor(inst.id) : [];
|
|
4145
|
-
_html(`<li${_attr_class("
|
|
4242
|
+
_html(`<li${_attr_class("_cj")}><div${_attr_class(["_ck", { ["_cl"]: !inst.enabled }])}>`);
|
|
4146
4243
|
_set_serialize_reason(12);
|
|
4147
4244
|
const $childScope5 = _peek_scope_id();
|
|
4148
4245
|
icon_agent_default({
|
|
4149
4246
|
agent: inst.id,
|
|
4150
4247
|
size: 15
|
|
4151
4248
|
});
|
|
4152
|
-
_html(`<span${_attr_class(["
|
|
4249
|
+
_html(`<span${_attr_class(["_cm", "_x"])}>${_escape(inst.command)}${_el_resume($scope3_id, "e")}</span>`);
|
|
4153
4250
|
_if(() => {
|
|
4154
4251
|
if (input.preferred === inst.id) {
|
|
4155
4252
|
const $scope51_id = _scope_id();
|
|
4156
|
-
_html(`<span${_attr_class(["
|
|
4253
|
+
_html(`<span${_attr_class(["_I", tone.accent])}>default</span>`);
|
|
4157
4254
|
writeScope($scope51_id, {});
|
|
4158
4255
|
return 0;
|
|
4159
4256
|
}
|
|
4160
4257
|
}, $scope3_id, "f", 1, 1, 1, 0, 1);
|
|
4161
|
-
_html(`<span${_attr_class("
|
|
4162
|
-
"
|
|
4163
|
-
"
|
|
4258
|
+
_html(`<span${_attr_class("_y")}></span><button${_attr_class([
|
|
4259
|
+
"_I",
|
|
4260
|
+
"_K",
|
|
4164
4261
|
{ [tone.ok]: inst.enabled }
|
|
4165
4262
|
])} role=switch aria-checked=${inst.enabled ? "true" : "false"} title=${inst.enabled ? "\"Shown in session pickers. Hide it\"" : "\"Hidden from session pickers. Show it\""}>${inst.enabled ? "on" : "off"}${_el_resume($scope3_id, "i")}</button>${_el_resume($scope3_id, "h")}</div>${_el_resume($scope3_id, "b")}`);
|
|
4166
4263
|
_for_of(accounts, (u) => {
|
|
@@ -4224,7 +4321,7 @@ var settings_page_default = _template("u", (input) => {
|
|
|
4224
4321
|
}, "id", $scope0_id, "q", 1, 1, 1, 0, 1);
|
|
4225
4322
|
_for_of(otherUsage, (u) => {
|
|
4226
4323
|
const $scope55_id = _scope_id();
|
|
4227
|
-
_html(`<li${_attr_class(["_bx", "
|
|
4324
|
+
_html(`<li${_attr_class(["_bx", "_cf"])}>`);
|
|
4228
4325
|
_set_serialize_reason(6);
|
|
4229
4326
|
const $childScope9 = _peek_scope_id();
|
|
4230
4327
|
usage_meters_default({ agent: u });
|
|
@@ -4235,7 +4332,7 @@ var settings_page_default = _template("u", (input) => {
|
|
|
4235
4332
|
_if(() => {
|
|
4236
4333
|
if (!usage && families.length) {
|
|
4237
4334
|
const $scope56_id = _scope_id();
|
|
4238
|
-
_html(`<p${_attr_class("_bD")}><span${_attr_class("
|
|
4335
|
+
_html(`<p${_attr_class("_bD")}><span${_attr_class("_F")}></span> Loading usage…</p>`);
|
|
4239
4336
|
writeScope($scope56_id, {});
|
|
4240
4337
|
return 0;
|
|
4241
4338
|
} else if (usage?.error) {
|
|
@@ -4249,11 +4346,11 @@ var settings_page_default = _template("u", (input) => {
|
|
|
4249
4346
|
_for_of(setup?.github || [], (h) => {
|
|
4250
4347
|
const $scope12_id = _scope_id();
|
|
4251
4348
|
const $for_content4__h_host__closures = /* @__PURE__ */ new Set();
|
|
4252
|
-
_html(`<li${_attr_class("_bx")}><div${_attr_class("_by")}><span${_attr_class("_bA")}><span${_attr_class(["_bz", "
|
|
4349
|
+
_html(`<li${_attr_class("_bx")}><div${_attr_class("_by")}><span${_attr_class("_bA")}><span${_attr_class(["_bz", "_x"])}>${_escape(h.host)}${_el_resume($scope12_id, "e")}</span>`);
|
|
4253
4350
|
_if(() => {
|
|
4254
4351
|
if (h.isEnterprise) {
|
|
4255
4352
|
const $scope59_id = _scope_id();
|
|
4256
|
-
_html(`<span${_attr_class("
|
|
4353
|
+
_html(`<span${_attr_class("_I")}>Enterprise</span>`);
|
|
4257
4354
|
writeScope($scope59_id, {});
|
|
4258
4355
|
return 0;
|
|
4259
4356
|
}
|
|
@@ -4262,12 +4359,12 @@ var settings_page_default = _template("u", (input) => {
|
|
|
4262
4359
|
_if(() => {
|
|
4263
4360
|
if (active.has(h.host) && authCodes.has(h.host)) {
|
|
4264
4361
|
const $scope23_id = _scope_id();
|
|
4265
|
-
_html(`<span${_attr_class("
|
|
4362
|
+
_html(`<span${_attr_class("_cb")}><span${_attr_class("_F")}></span> Enter code <strong${_attr_class("_cv")}>${_escape(authCodes.get(h.host))}${_el_resume($scope23_id, "d")}</strong> at <a${_attr("href", `https://${h.host}/login/device`)} target=_blank rel=noopener${_attr_class("_cw")}>${_escape(h.host)}${_el_resume($scope23_id, "f")}/login/device</a>${_el_resume($scope23_id, "e")}</span>`);
|
|
4266
4363
|
_subscribe($authCodes__closures, writeScope($scope23_id, {}));
|
|
4267
4364
|
return 0;
|
|
4268
4365
|
} else if (active.has(h.host)) {
|
|
4269
4366
|
const $scope13_id = _scope_id();
|
|
4270
|
-
_html(`<span${_attr_class("
|
|
4367
|
+
_html(`<span${_attr_class("_cb")}><span${_attr_class("_F")}></span><!>${_escape(active.get(h.host) || "Starting…")}${_el_resume($scope13_id, "c")}</span>`);
|
|
4271
4368
|
_subscribe($active__closures, writeScope($scope13_id, { Cdo: 1 }));
|
|
4272
4369
|
return 1;
|
|
4273
4370
|
} else if (h.authed) {
|
|
@@ -4296,8 +4393,8 @@ var settings_page_default = _template("u", (input) => {
|
|
|
4296
4393
|
} else {
|
|
4297
4394
|
const $scope25_id = _scope_id();
|
|
4298
4395
|
_html(`<button${_attr_class([btnSm, {
|
|
4299
|
-
["
|
|
4300
|
-
["
|
|
4396
|
+
["_r"]: confirmingRemove === `out:${h.host}`,
|
|
4397
|
+
["_q"]: confirmingRemove === `out:${h.host}`
|
|
4301
4398
|
}])}${confirmingRemove === `out:${h.host}` ? _attr("title", `Sign out of ${h.host}?`) : _attr("title", `Sign out of ${h.host}`)}>${confirmingRemove === `out:${h.host}` ? "Sign out?" : "Sign out"}${_el_resume($scope25_id, "b")}</button>${_el_resume($scope25_id, "a")}`);
|
|
4302
4399
|
_script($scope25_id, "u35");
|
|
4303
4400
|
_subscribe($for_content4__h_host__closures, _subscribe($confirmingRemove__closures, writeScope($scope25_id, {})));
|
|
@@ -4309,9 +4406,9 @@ var settings_page_default = _template("u", (input) => {
|
|
|
4309
4406
|
const $scope26_id = _scope_id();
|
|
4310
4407
|
_html(`<button${_attr_class([
|
|
4311
4408
|
"_bC",
|
|
4312
|
-
"
|
|
4313
|
-
"
|
|
4314
|
-
{ ["
|
|
4409
|
+
"_2",
|
|
4410
|
+
"_3",
|
|
4411
|
+
{ ["_q"]: confirmingRemove === h.host }
|
|
4315
4412
|
])}${confirmingRemove === h.host ? _attr("title", `Forget ${h.host}? (gh stays signed in)`) : _attr("title", `Forget ${h.host}`)}>`);
|
|
4316
4413
|
_if(() => {
|
|
4317
4414
|
if (confirmingRemove === h.host) {
|
|
@@ -4359,14 +4456,14 @@ var settings_page_default = _template("u", (input) => {
|
|
|
4359
4456
|
_if(() => {
|
|
4360
4457
|
if (setup) {
|
|
4361
4458
|
const $scope34_id = _scope_id();
|
|
4362
|
-
_html(`<form${_attr_class("
|
|
4459
|
+
_html(`<form${_attr_class("_cu")}><label${_attr_class("_W")}>`);
|
|
4363
4460
|
icon_plus_default({
|
|
4364
4461
|
size: 14,
|
|
4365
|
-
class: "
|
|
4462
|
+
class: "_X"
|
|
4366
4463
|
});
|
|
4367
4464
|
_html(`<input${_attr_input_value($scope34_id, "d", hostInput, _resume((_new_hostInput) => {
|
|
4368
4465
|
hostInput = _new_hostInput;
|
|
4369
|
-
}, "u2", $scope34_id))}${_attr_class([inputLg, "
|
|
4466
|
+
}, "u2", $scope34_id))}${_attr_class([inputLg, "_Y"])} type=text placeholder="Add a GitHub Enterprise host, e.g. github.example.com" aria-label="GitHub Enterprise host" autocomplete=off spellcheck=false>${_el_resume($scope34_id, "d")}</label><button${_attr_class(btnSm)} type=submit${_attr("disabled", !hostInput.trim() || hostBusy)}>${hostBusy ? "Adding…" : "Add host"}${_el_resume($scope34_id, "f")}</button>${_el_resume($scope34_id, "e")}</form>${_el_resume($scope34_id, "a")}`);
|
|
4370
4467
|
_script($scope34_id, "u37");
|
|
4371
4468
|
writeScope($scope34_id, {});
|
|
4372
4469
|
return 0;
|
|
@@ -4389,7 +4486,7 @@ var settings_page_default = _template("u", (input) => {
|
|
|
4389
4486
|
return 0;
|
|
4390
4487
|
}
|
|
4391
4488
|
}, $scope0_id, "a3", 1, 1, 1, 0, 1);
|
|
4392
|
-
_html(`<div${_attr_class("
|
|
4489
|
+
_html(`<div${_attr_class("_y")}></div>`);
|
|
4393
4490
|
_if(() => {
|
|
4394
4491
|
if (outdatedIds.length > 1) {
|
|
4395
4492
|
const $scope14_id = _scope_id();
|
|
@@ -4422,16 +4519,16 @@ var settings_page_default = _template("u", (input) => {
|
|
|
4422
4519
|
_if(() => {
|
|
4423
4520
|
if (self) {
|
|
4424
4521
|
const $scope36_id = _scope_id();
|
|
4425
|
-
_html(`<li${_attr_class(row)}><span${_attr_class(["
|
|
4522
|
+
_html(`<li${_attr_class(row)}><span${_attr_class(["_cq", "_x"])}>work</span>`);
|
|
4426
4523
|
_if(() => {
|
|
4427
4524
|
if (selfUpdating) {
|
|
4428
4525
|
const $scope63_id = _scope_id();
|
|
4429
|
-
_html(`<span${_attr_class("
|
|
4526
|
+
_html(`<span${_attr_class("_cb")}><span${_attr_class("_F")}></span>Updating — the app restarts and reloads when it is done…</span>`);
|
|
4430
4527
|
writeScope($scope63_id, {});
|
|
4431
4528
|
return 0;
|
|
4432
4529
|
} else {
|
|
4433
4530
|
const $scope37_id = _scope_id();
|
|
4434
|
-
_html(`<span${_attr_class(["
|
|
4531
|
+
_html(`<span${_attr_class(["_x", metaTrunc])} title="Running version">v<!>${_escape(self.version)}${_el_resume($scope37_id, "b")}</span>`);
|
|
4435
4532
|
_if(() => {
|
|
4436
4533
|
if (self.install === "source") {
|
|
4437
4534
|
const $scope64_id = _scope_id();
|
|
@@ -4440,7 +4537,7 @@ var settings_page_default = _template("u", (input) => {
|
|
|
4440
4537
|
return 0;
|
|
4441
4538
|
} else if (self.latest && self.latest !== self.version) {
|
|
4442
4539
|
const $scope38_id = _scope_id();
|
|
4443
|
-
_html(`<button${_attr_class([btnSm, "
|
|
4540
|
+
_html(`<button${_attr_class([btnSm, "_cs"])}${_attr("title", `Update work to v${self.latest} and restart`)}>↑ <!>${_escape(self.latest)}${_el_resume($scope38_id, "b")}</button>${_el_resume($scope38_id, "a")}`);
|
|
4444
4541
|
_script($scope38_id, "u41");
|
|
4445
4542
|
_subscribe($self_latest__closures, writeScope($scope38_id, { Ce1: 1 }));
|
|
4446
4543
|
return 1;
|
|
@@ -4455,11 +4552,11 @@ var settings_page_default = _template("u", (input) => {
|
|
|
4455
4552
|
return 1;
|
|
4456
4553
|
}
|
|
4457
4554
|
}, $scope36_id, "c");
|
|
4458
|
-
_html(`<span${_attr_class("
|
|
4555
|
+
_html(`<span${_attr_class("_y")}></span>`);
|
|
4459
4556
|
_if(() => {
|
|
4460
4557
|
if (!selfUpdating) {
|
|
4461
4558
|
const $scope66_id = _scope_id();
|
|
4462
|
-
_html(`<span${_attr_class("
|
|
4559
|
+
_html(`<span${_attr_class("_I")}>app</span>`);
|
|
4463
4560
|
writeScope($scope66_id, {});
|
|
4464
4561
|
return 0;
|
|
4465
4562
|
}
|
|
@@ -4476,11 +4573,11 @@ var settings_page_default = _template("u", (input) => {
|
|
|
4476
4573
|
const $for_content5__t_path__closures = /* @__PURE__ */ new Set();
|
|
4477
4574
|
const $for_content5__t_latest__closures = /* @__PURE__ */ new Set();
|
|
4478
4575
|
const $for_content5__t_id__closures = /* @__PURE__ */ new Set();
|
|
4479
|
-
_html(`<li${_attr_class([row, { ["
|
|
4576
|
+
_html(`<li${_attr_class([row, { ["_cp"]: !t.installed }])}><span${_attr_class(["_cq", "_x"])}>${_escape(t.label)}${_el_resume($scope17_id, "c")}</span>`);
|
|
4480
4577
|
_if(() => {
|
|
4481
4578
|
if (active.has(t.id)) {
|
|
4482
4579
|
const $scope18_id = _scope_id();
|
|
4483
|
-
_html(`<span${_attr_class("
|
|
4580
|
+
_html(`<span${_attr_class("_cb")}><span${_attr_class("_F")}></span><!>${_escape(active.get(t.id) || "Starting…")}${_el_resume($scope18_id, "c")}</span>`);
|
|
4484
4581
|
_subscribe($active__closures, writeScope($scope18_id, { Cdo: 2 }));
|
|
4485
4582
|
return 0;
|
|
4486
4583
|
} else if (t.installed) {
|
|
@@ -4488,13 +4585,13 @@ var settings_page_default = _template("u", (input) => {
|
|
|
4488
4585
|
_if(() => {
|
|
4489
4586
|
if (t.version) {
|
|
4490
4587
|
const $scope31_id = _scope_id();
|
|
4491
|
-
_html(`<button${_attr_class(["
|
|
4588
|
+
_html(`<button${_attr_class(["_cr", "_x"])}${_attr("title", `${t.path || t.label}. Pin a version`)}>v<!>${_escape(t.version)}${_el_resume($scope31_id, "b")}</button>${_el_resume($scope31_id, "a")}`);
|
|
4492
4589
|
_script($scope31_id, "u42");
|
|
4493
4590
|
_subscribe($for_content5__t_path__closures, _subscribe($for_content5__t_version__closures, _subscribe($for_content5__t_label__closures, writeScope($scope31_id, { Cu: 1 }))));
|
|
4494
4591
|
return 0;
|
|
4495
4592
|
} else {
|
|
4496
4593
|
const $scope67_id = _scope_id();
|
|
4497
|
-
_html(`<span${_attr_class([metaTrunc, "
|
|
4594
|
+
_html(`<span${_attr_class([metaTrunc, "_x"])}${_attr("title", t.path)}>${_escape(t.path)}${_el_resume($scope67_id, "b")}</span>${_el_resume($scope67_id, "a")}`);
|
|
4498
4595
|
_subscribe($for_content5__t_path__closures, writeScope($scope67_id, { Cx: 1 }));
|
|
4499
4596
|
return 1;
|
|
4500
4597
|
}
|
|
@@ -4502,7 +4599,7 @@ var settings_page_default = _template("u", (input) => {
|
|
|
4502
4599
|
_if(() => {
|
|
4503
4600
|
if (outdated(t)) {
|
|
4504
4601
|
const $scope41_id = _scope_id();
|
|
4505
|
-
_html(`<button${_attr_class([btnSm, "
|
|
4602
|
+
_html(`<button${_attr_class([btnSm, "_cs"])}${_attr("title", `Update to v${t.latest}`)}>↑ <!>${_escape(t.latest)}${_el_resume($scope41_id, "b")}</button>${_el_resume($scope41_id, "a")}`);
|
|
4506
4603
|
_script($scope41_id, "u43");
|
|
4507
4604
|
_subscribe($for_content5__t_latest__closures, writeScope($scope41_id, {}));
|
|
4508
4605
|
return 0;
|
|
@@ -4522,14 +4619,14 @@ var settings_page_default = _template("u", (input) => {
|
|
|
4522
4619
|
return 3;
|
|
4523
4620
|
}
|
|
4524
4621
|
}, $scope17_id, "d");
|
|
4525
|
-
_html(`<span${_attr_class("
|
|
4622
|
+
_html(`<span${_attr_class("_y")}></span>`);
|
|
4526
4623
|
_if(() => {
|
|
4527
4624
|
if (!active.has(t.id)) {
|
|
4528
4625
|
const $scope27_id = _scope_id();
|
|
4529
4626
|
_if(() => {
|
|
4530
4627
|
if (t.required) {
|
|
4531
4628
|
const $scope70_id = _scope_id();
|
|
4532
|
-
_html(`<span${_attr_class("
|
|
4629
|
+
_html(`<span${_attr_class("_I")}>required</span>`);
|
|
4533
4630
|
writeScope($scope70_id, {});
|
|
4534
4631
|
return 0;
|
|
4535
4632
|
}
|
|
@@ -4545,9 +4642,9 @@ var settings_page_default = _template("u", (input) => {
|
|
|
4545
4642
|
const $scope28_id = _scope_id();
|
|
4546
4643
|
_html(`<button${_attr_class([
|
|
4547
4644
|
iconBtnXs,
|
|
4548
|
-
"
|
|
4549
|
-
"
|
|
4550
|
-
{ ["
|
|
4645
|
+
"_2",
|
|
4646
|
+
"_3",
|
|
4647
|
+
{ ["_q"]: confirmingRemove === t.id }
|
|
4551
4648
|
])}${confirmingRemove === t.id ? _attr("title", `Remove ${t.label}?`) : _attr("title", `Remove ${t.label}`)}>`);
|
|
4552
4649
|
_if(() => {
|
|
4553
4650
|
if (confirmingRemove === t.id) {
|
|
@@ -4593,23 +4690,23 @@ var settings_page_default = _template("u", (input) => {
|
|
|
4593
4690
|
_if(() => {
|
|
4594
4691
|
if (setup && setup.mise.installed) {
|
|
4595
4692
|
const $scope19_id = _scope_id();
|
|
4596
|
-
_html(`<div><label${_attr_class("
|
|
4693
|
+
_html(`<div><label${_attr_class("_W")}>`);
|
|
4597
4694
|
icon_search_default({
|
|
4598
4695
|
size: 14,
|
|
4599
|
-
class: "
|
|
4696
|
+
class: "_X"
|
|
4600
4697
|
});
|
|
4601
|
-
_html(`<input${_attr_input_value($scope19_id, "c", query, search)}${_attr_class([inputLg, "
|
|
4698
|
+
_html(`<input${_attr_input_value($scope19_id, "c", query, search)}${_attr_class([inputLg, "_Y"])} type=text placeholder="Add a tool from the mise registry…" aria-label="Search the mise registry" autocomplete=off>${_el_resume($scope19_id, "c")}</label>`);
|
|
4602
4699
|
_if(() => {
|
|
4603
4700
|
if (hits && hits.length) {
|
|
4604
4701
|
const $scope20_id = _scope_id();
|
|
4605
|
-
_html(`<ul${_attr_class([toolGrid, "
|
|
4702
|
+
_html(`<ul${_attr_class([toolGrid, "_ct"])}>`);
|
|
4606
4703
|
_for_of(hits, (h) => {
|
|
4607
4704
|
const $scope21_id = _scope_id();
|
|
4608
|
-
_html(`<li${_attr_class(row)}><div${_attr_class("_by")}><span${_attr_class(["
|
|
4705
|
+
_html(`<li${_attr_class(row)}><div${_attr_class("_by")}><span${_attr_class(["_cq", "_x"])}>${_escape(h.name)}${_el_resume($scope21_id, "d")}</span>`);
|
|
4609
4706
|
_if(() => {
|
|
4610
4707
|
if (active.has(h.name)) {
|
|
4611
4708
|
const $scope22_id = _scope_id();
|
|
4612
|
-
_html(`<span${_attr_class("
|
|
4709
|
+
_html(`<span${_attr_class("_cb")}><span${_attr_class("_F")}></span><!>${_escape(active.get(h.name) || "Starting…")}${_el_resume($scope22_id, "c")}</span>`);
|
|
4613
4710
|
_subscribe($active__closures, writeScope($scope22_id, { Cdo: 4 }));
|
|
4614
4711
|
return 0;
|
|
4615
4712
|
} else if (h.description) {
|
|
@@ -4626,7 +4723,7 @@ var settings_page_default = _template("u", (input) => {
|
|
|
4626
4723
|
_if(() => {
|
|
4627
4724
|
if (h.installed) {
|
|
4628
4725
|
const $scope74_id = _scope_id();
|
|
4629
|
-
_html(`<span${_attr_class("
|
|
4726
|
+
_html(`<span${_attr_class("_I")}>installed</span>`);
|
|
4630
4727
|
writeScope($scope74_id, {});
|
|
4631
4728
|
return 0;
|
|
4632
4729
|
} else {
|
|
@@ -4664,16 +4761,16 @@ var settings_page_default = _template("u", (input) => {
|
|
|
4664
4761
|
return 0;
|
|
4665
4762
|
}
|
|
4666
4763
|
}, $scope0_id, "ab", 1, 1, 1, 0, 1);
|
|
4667
|
-
_html(`</section><section${_attr_class("_bs")}${_attr("aria-labelledby", appearanceId)}><div${_attr_class("_bt")}><h2${_attr("id", appearanceId)}${_attr_class("_bH")}>Appearance</h2></div><div${_attr_class(["_bx", "
|
|
4764
|
+
_html(`</section><section${_attr_class("_bs")}${_attr("aria-labelledby", appearanceId)}><div${_attr_class("_bt")}><h2${_attr("id", appearanceId)}${_attr_class("_bH")}>Appearance</h2></div><div${_attr_class(["_bx", "_cx"])}><label${_attr_class("_cy")}><span${_attr_class("_cz")}>Name</span><input${_attr_input_value($scope0_id, "ai", input.instance.name, _resume(function(v) {
|
|
4668
4765
|
setInstance({ name: v });
|
|
4669
|
-
}, "u3", $scope0_id))}${_attr_class(["
|
|
4670
|
-
"
|
|
4671
|
-
"
|
|
4672
|
-
{ ["
|
|
4766
|
+
}, "u3", $scope0_id))}${_attr_class(["_U", "_cA"])} type=text placeholder=work maxlength=32 autocomplete=off spellcheck=false aria-describedby=look-name-hint>${_el_resume($scope0_id, "ai")}<span id=look-name-hint${_attr_class(["_S", "_cB"])}>Tab title, home-screen icon, and notifications.</span></label><div${_attr_class("_cy")} role=radiogroup aria-label="Accent colour"><span${_attr_class("_cz")}>Accent</span><span${_attr_class("_cC")}><button type=button${_attr_class([
|
|
4767
|
+
"_cD",
|
|
4768
|
+
"_cF",
|
|
4769
|
+
{ ["_cE"]: !input.instance.accent }
|
|
4673
4770
|
])} role=radio aria-checked=${!input.instance.accent ? "true" : "false"} title="Default (blue)" aria-label="Default (blue)"></button>${_el_resume($scope0_id, "an")}`);
|
|
4674
4771
|
_for_of(ACCENT_PRESETS, (p) => {
|
|
4675
4772
|
const $scope4_id = _scope_id();
|
|
4676
|
-
_html(`<button type=button${_attr_class(["
|
|
4773
|
+
_html(`<button type=button${_attr_class(["_cD", { ["_cE"]: input.instance.accent === p.value }])}${_attr_style(`--swatch:${p.value}`)} role=radio aria-checked=${input.instance.accent === p.value ? "true" : "false"}${_attr("title", p.name)}${_attr("aria-label", p.name)}></button>${_el_resume($scope4_id, "a")}`);
|
|
4677
4774
|
_script($scope4_id, "u48");
|
|
4678
4775
|
writeScope($scope4_id, {
|
|
4679
4776
|
d: p?.value,
|
|
@@ -4682,12 +4779,12 @@ var settings_page_default = _template("u", (input) => {
|
|
|
4682
4779
|
}, "value", $scope0_id, "ao", $sg__input_instance_accent, 0, 1, 0, 1);
|
|
4683
4780
|
const customOn = !!input.instance.accent && !ACCENT_PRESETS.some((p) => p.value === input.instance.accent);
|
|
4684
4781
|
_html(`<label${_attr_class([
|
|
4685
|
-
"
|
|
4686
|
-
"
|
|
4687
|
-
{ ["
|
|
4782
|
+
"_cD",
|
|
4783
|
+
"_cG",
|
|
4784
|
+
{ ["_cE"]: customOn }
|
|
4688
4785
|
])}${customOn ? _attr_style(`--swatch:${input.instance.accent}`) : ""} title="Custom colour"><input${_attr_input_value($scope0_id, "aq", input.instance.accent || "#3556d8", _resume(function(v) {
|
|
4689
4786
|
setInstance({ accent: v });
|
|
4690
|
-
}, "u4", $scope0_id))}${_attr_class("
|
|
4787
|
+
}, "u4", $scope0_id))}${_attr_class("_cH")} type=color aria-label="Custom accent colour">${_el_resume($scope0_id, "aq")}<span aria-hidden=true>+</span></label>${_el_resume($scope0_id, "ap", $sg__input_instance_accent)}</span><span${_attr_class(["_S", "_cB"])}>Selected rows, buttons, and the icon.</span></div></div></section></div></div></div>`);
|
|
4691
4788
|
_if(() => {
|
|
4692
4789
|
if (versionPick) {
|
|
4693
4790
|
const $scope29_id = _scope_id();
|
|
@@ -4800,11 +4897,11 @@ var settings_page_default = _template("u", (input) => {
|
|
|
4800
4897
|
//#region src/tags/new-workspace.css.ts
|
|
4801
4898
|
var content$1 = "_bI _bk";
|
|
4802
4899
|
var section$1 = "_bM _bs";
|
|
4803
|
-
var curBase = "_bR
|
|
4804
|
-
var archived = "
|
|
4805
|
-
var archivedHint = "
|
|
4806
|
-
var archivedCard = "
|
|
4807
|
-
var resultBranch = "
|
|
4900
|
+
var curBase = "_bR _T _S";
|
|
4901
|
+
var archived = "_bW _bs";
|
|
4902
|
+
var archivedHint = "_bX _S";
|
|
4903
|
+
var archivedCard = "_bY _bx";
|
|
4904
|
+
var resultBranch = "_cO _Z _j";
|
|
4808
4905
|
//#endregion
|
|
4809
4906
|
//#region src/tags/branch-pick.marko
|
|
4810
4907
|
var branch_pick_default = _template("d", (input) => {
|
|
@@ -4815,11 +4912,11 @@ var branch_pick_default = _template("d", (input) => {
|
|
|
4815
4912
|
let branches = null;
|
|
4816
4913
|
let defaultBranch = null;
|
|
4817
4914
|
let branchFilter = "";
|
|
4818
|
-
_html(`<div${_attr_class("
|
|
4915
|
+
_html(`<div${_attr_class("_cQ")}>`);
|
|
4819
4916
|
_if(() => {
|
|
4820
4917
|
{
|
|
4821
4918
|
const $scope4_id = _scope_id();
|
|
4822
|
-
_html(`<p${_attr_class("_bD")}><span${_attr_class("
|
|
4919
|
+
_html(`<p${_attr_class("_bD")}><span${_attr_class("_F")}></span> Loading branches…</p>`);
|
|
4823
4920
|
writeScope($scope4_id, {});
|
|
4824
4921
|
return 0;
|
|
4825
4922
|
}
|
|
@@ -4845,6 +4942,8 @@ var api$5;
|
|
|
4845
4942
|
var repo_picker_default = _template("s", (input) => {
|
|
4846
4943
|
const $scope0_reason = _scope_reason(), $si__input_onError = _serialize_if($scope0_reason, 2);
|
|
4847
4944
|
const $scope0_id = _scope_id();
|
|
4945
|
+
const $pasted__closures = /* @__PURE__ */ new Set();
|
|
4946
|
+
const $pasteWillFork__closures = /* @__PURE__ */ new Set();
|
|
4848
4947
|
const $input_onError__closures = /* @__PURE__ */ new Set();
|
|
4849
4948
|
const $highlight__closures = /* @__PURE__ */ new Set();
|
|
4850
4949
|
const $branchesFor__closures = /* @__PURE__ */ new Set();
|
|
@@ -4861,83 +4960,143 @@ var repo_picker_default = _template("s", (input) => {
|
|
|
4861
4960
|
}
|
|
4862
4961
|
if (refresh);
|
|
4863
4962
|
}, "s2", $scope0_id);
|
|
4864
|
-
const
|
|
4963
|
+
const excluded = _resume((name) => {
|
|
4964
|
+
if (input.exclude.has(name)) return true;
|
|
4965
|
+
const repos = catalog?.repos || [];
|
|
4966
|
+
if (repos.some((r) => input.exclude.has(r.nameWithOwner) && r.parent === name)) return true;
|
|
4967
|
+
const entry = repos.find((r) => r.nameWithOwner === name);
|
|
4968
|
+
return !!(entry?.parent && input.exclude.has(entry.parent));
|
|
4969
|
+
}, "s3", $scope0_id);
|
|
4970
|
+
const results = catalog && filter ? rankRepos(filter, catalog.repos, (name) => excluded(name)) : [];
|
|
4971
|
+
const pasted = (() => {
|
|
4972
|
+
const name = parseRepoUrl(filter);
|
|
4973
|
+
return name && !excluded(name) ? name : null;
|
|
4974
|
+
})();
|
|
4975
|
+
const pastedForkable = !!pasted && !catalog?.repos.some((r) => r.nameWithOwner === pasted);
|
|
4865
4976
|
let branchesFor = null;
|
|
4866
|
-
|
|
4977
|
+
let pasteWillFork = false;
|
|
4978
|
+
const pick = _resume((fullName, baseBranch, fork) => {
|
|
4867
4979
|
filter = "";
|
|
4868
4980
|
branchesFor = null;
|
|
4869
|
-
|
|
4870
|
-
|
|
4981
|
+
pasteWillFork = false;
|
|
4982
|
+
input.onPick(fullName, baseBranch, fork);
|
|
4983
|
+
}, "s4", $scope0_id);
|
|
4984
|
+
const pastedFork = _resume((fork) => pastedForkable ? fork : void 0, "s5", $scope0_id);
|
|
4871
4985
|
const toggleBranches = _resume((fullName) => {
|
|
4872
4986
|
branchesFor = branchesFor === fullName ? null : fullName;
|
|
4873
|
-
|
|
4874
|
-
|
|
4987
|
+
if (fullName !== pasted) pasteWillFork = false;
|
|
4988
|
+
}, "s6", $scope0_id);
|
|
4989
|
+
_html(`<div${_attr_class("_cI")}><label${_attr_class("_W")}>`);
|
|
4875
4990
|
icon_search_default({
|
|
4876
4991
|
size: 14,
|
|
4877
|
-
class: "
|
|
4992
|
+
class: "_X"
|
|
4878
4993
|
});
|
|
4879
4994
|
_html(`<input${_attr_input_value($scope0_id, "d", filter, _resume(function(v) {
|
|
4880
4995
|
filter = v;
|
|
4881
4996
|
highlight = 0;
|
|
4882
|
-
|
|
4997
|
+
pasteWillFork = false;
|
|
4998
|
+
}, "s0", $scope0_id))}${_attr_class([inputLg, "_Y"])} placeholder="Add a repo…" aria-label="Add a repo"${_attr("disabled", input.disabled)}>${_el_resume($scope0_id, "d")}</label>`);
|
|
4883
4999
|
_if(() => {
|
|
4884
|
-
if (
|
|
4885
|
-
const $
|
|
4886
|
-
_html(`<
|
|
4887
|
-
|
|
5000
|
+
if (pasted) {
|
|
5001
|
+
const $scope1_id = _scope_id();
|
|
5002
|
+
_html(`<ul${_attr_class("_cJ")}><li><div${_attr_class(["_cL", "_cK"])}><button${_attr_class("_cM")}${pasteWillFork ? _attr("title", `Fork ${pasted} to your account and add the fork`) : _attr("title", `Add ${pasted} as-is (pushes go to that repo)`)}>`);
|
|
5003
|
+
icon_plus_default({
|
|
5004
|
+
size: 12,
|
|
5005
|
+
class: "_cS"
|
|
5006
|
+
});
|
|
5007
|
+
_html(`<span${_attr_class("_cT")}>${_escape(repoLabel(pasted))}${_el_resume($scope1_id, "f")}</span></button>${_el_resume($scope1_id, "c")}`);
|
|
5008
|
+
_if(() => {
|
|
5009
|
+
if (pastedForkable) {
|
|
5010
|
+
const $scope7_id = _scope_id();
|
|
5011
|
+
_html(`<button${_attr_class(["_cP", { ["_cN"]: pasteWillFork }])}${pasteWillFork ? " title=\"Will fork to your account; click to clone as-is instead\"" : _attr("title", `Fork ${pasted} to your account and clone the fork`)} aria-pressed=${pasteWillFork ? "true" : "false"}>${pasteWillFork ? "✓ fork" : "Fork"}${_el_resume($scope7_id, "b")}</button>${_el_resume($scope7_id, "a")}`);
|
|
5012
|
+
_script($scope7_id, "s11");
|
|
5013
|
+
_subscribe($pasteWillFork__closures, _subscribe($pasted__closures, writeScope($scope7_id, { Cah: 1 })));
|
|
5014
|
+
return 0;
|
|
5015
|
+
}
|
|
5016
|
+
}, $scope1_id, "g", 1, 1, 1, 0, 1);
|
|
5017
|
+
_html(`<button${_attr_class([resultBranch, { ["_cN"]: branchesFor === pasted }])}${_attr("title", `Pick a base branch for ${pasted}`)}${_attr("aria-label", `Pick a base branch for ${pasted}`)}>⎇</button>${_el_resume($scope1_id, "h")}</div>`);
|
|
5018
|
+
_if(() => {
|
|
5019
|
+
if (branchesFor === pasted) {
|
|
5020
|
+
const $scope2_id = _scope_id();
|
|
5021
|
+
const $childScope = _peek_scope_id();
|
|
5022
|
+
branch_pick_default({
|
|
5023
|
+
repo: pasted,
|
|
5024
|
+
onPick: _resume(function(branch, isDefault) {
|
|
5025
|
+
pick(pasted, isDefault ? void 0 : branch, pastedFork(pasteWillFork));
|
|
5026
|
+
}, "s7", $scope2_id),
|
|
5027
|
+
onError: _resume(function(message) {
|
|
5028
|
+
branchesFor = null;
|
|
5029
|
+
input.onError?.(message);
|
|
5030
|
+
}, "s8", $scope2_id)
|
|
5031
|
+
});
|
|
5032
|
+
_subscribe($pasted__closures, _subscribe($si__input_onError && $input_onError__closures, writeScope($scope2_id, { a: _existing_scope($childScope) })));
|
|
5033
|
+
return 0;
|
|
5034
|
+
}
|
|
5035
|
+
}, $scope1_id, "i", 1, 1, 1, 0, 1);
|
|
5036
|
+
_html("</li></ul>");
|
|
5037
|
+
_script($scope1_id, "s12");
|
|
5038
|
+
writeScope($scope1_id, {});
|
|
4888
5039
|
return 0;
|
|
5040
|
+
} else if (filter && !catalog) {
|
|
5041
|
+
const $scope8_id = _scope_id();
|
|
5042
|
+
_html(`<p${_attr_class("_bD")}>Loading repos…</p>`);
|
|
5043
|
+
writeScope($scope8_id, {});
|
|
5044
|
+
return 1;
|
|
4889
5045
|
}
|
|
4890
5046
|
}, $scope0_id, "e", 1, 1, 1, 0, 1);
|
|
4891
5047
|
_if(() => {
|
|
4892
5048
|
if (results.length) {
|
|
4893
|
-
const $
|
|
4894
|
-
_html(`<ul${_attr_class("
|
|
5049
|
+
const $scope3_id = _scope_id();
|
|
5050
|
+
_html(`<ul${_attr_class("_cJ")}>`);
|
|
4895
5051
|
_for_of(results, (repo, i) => {
|
|
4896
|
-
const $
|
|
4897
|
-
_html(`<li><div${_attr_class(["
|
|
5052
|
+
const $scope4_id = _scope_id();
|
|
5053
|
+
_html(`<li><div${_attr_class(["_cL", { ["_cK"]: i === highlight }])}><button${_attr_class("_cM")}>`);
|
|
4898
5054
|
icon_plus_default({
|
|
4899
5055
|
size: 12,
|
|
4900
|
-
class: "
|
|
5056
|
+
class: "_cS"
|
|
4901
5057
|
});
|
|
4902
|
-
_html(`<span${_attr_class("
|
|
5058
|
+
_html(`<span${_attr_class("_cT")}>${_escape(repoLabel(repo.nameWithOwner))}${_el_resume($scope4_id, "e")}</span></button>${_el_resume($scope4_id, "b")}<button${_attr_class([resultBranch, { ["_cN"]: 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($scope4_id, "f")}</div>${_el_resume($scope4_id, "a")}`);
|
|
4903
5059
|
_if(() => {
|
|
4904
5060
|
if (branchesFor === repo.nameWithOwner) {
|
|
4905
|
-
const $
|
|
4906
|
-
const $
|
|
5061
|
+
const $scope5_id = _scope_id();
|
|
5062
|
+
const $childScope2 = _peek_scope_id();
|
|
4907
5063
|
branch_pick_default({
|
|
4908
5064
|
repo: repo.nameWithOwner,
|
|
4909
5065
|
onPick: _resume(function(branch, isDefault) {
|
|
4910
5066
|
pick(repo.nameWithOwner, isDefault ? void 0 : branch);
|
|
4911
|
-
}, "
|
|
5067
|
+
}, "s9", $scope5_id),
|
|
4912
5068
|
onError: _resume(function(message) {
|
|
4913
5069
|
branchesFor = null;
|
|
4914
5070
|
input.onError?.(message);
|
|
4915
|
-
}, "
|
|
5071
|
+
}, "s10", $scope5_id)
|
|
4916
5072
|
});
|
|
4917
|
-
_subscribe($si__input_onError && $input_onError__closures, writeScope($
|
|
5073
|
+
_subscribe($si__input_onError && $input_onError__closures, writeScope($scope5_id, {
|
|
5074
|
+
a: _existing_scope($childScope2),
|
|
5075
|
+
Cad: $si__input_onError && 1
|
|
5076
|
+
}));
|
|
4918
5077
|
return 0;
|
|
4919
5078
|
}
|
|
4920
|
-
}, $
|
|
5079
|
+
}, $scope4_id, "g", 1, 1, 1, 0, 1);
|
|
4921
5080
|
_html("</li>");
|
|
4922
|
-
_script($
|
|
4923
|
-
_subscribe($branchesFor__closures, _subscribe($highlight__closures, writeScope($
|
|
5081
|
+
_script($scope4_id, "s13");
|
|
5082
|
+
_subscribe($branchesFor__closures, _subscribe($highlight__closures, writeScope($scope4_id, {
|
|
4924
5083
|
j: repo?.nameWithOwner,
|
|
4925
5084
|
l: i
|
|
4926
5085
|
})));
|
|
4927
|
-
}, "nameWithOwner", $
|
|
4928
|
-
writeScope($
|
|
5086
|
+
}, "nameWithOwner", $scope3_id, "a", 1, 1, 1, "</ul>", 1);
|
|
5087
|
+
writeScope($scope3_id, {});
|
|
4929
5088
|
return 0;
|
|
4930
|
-
} else if (filter && catalog) {
|
|
4931
|
-
const $
|
|
4932
|
-
_html(`<p${_attr_class("_bD")}>No repos match "<!>${_escape(filter)}${_el_resume($
|
|
4933
|
-
writeScope($
|
|
5089
|
+
} else if (filter && catalog && !pasted) {
|
|
5090
|
+
const $scope6_id = _scope_id();
|
|
5091
|
+
_html(`<p${_attr_class("_bD")}>No repos match "<!>${_escape(filter)}${_el_resume($scope6_id, "b")}". Paste a clone URL to add any repo.</p>`);
|
|
5092
|
+
writeScope($scope6_id, {});
|
|
4934
5093
|
return 1;
|
|
4935
5094
|
}
|
|
4936
5095
|
}, $scope0_id, "f", 1, 1, 1, 0, 1);
|
|
4937
5096
|
_html("</div>");
|
|
4938
5097
|
const $return = _resume(() => loadCatalog(true), "s1", $scope0_id);
|
|
4939
|
-
_script($scope0_id, "
|
|
4940
|
-
_script($scope0_id, "
|
|
5098
|
+
_script($scope0_id, "s14");
|
|
5099
|
+
_script($scope0_id, "s15");
|
|
4941
5100
|
writeScope($scope0_id, {
|
|
4942
5101
|
i: _serialize_if($scope0_reason, 1) && input.refreshing,
|
|
4943
5102
|
j: _serialize_if($scope0_reason, 0) && input.refreshingChange,
|
|
@@ -4945,17 +5104,25 @@ var repo_picker_default = _template("s", (input) => {
|
|
|
4945
5104
|
m: input.exclude,
|
|
4946
5105
|
n: input.onPick,
|
|
4947
5106
|
r: catalog,
|
|
4948
|
-
s:
|
|
5107
|
+
s: catalog?.repos,
|
|
5108
|
+
u: filter,
|
|
4949
5109
|
v: highlight,
|
|
4950
5110
|
w: loadCatalog,
|
|
4951
|
-
x:
|
|
4952
|
-
a0:
|
|
4953
|
-
|
|
4954
|
-
|
|
5111
|
+
x: excluded,
|
|
5112
|
+
a0: results,
|
|
5113
|
+
a2: pasted,
|
|
5114
|
+
a6: pastedForkable,
|
|
5115
|
+
a7: branchesFor,
|
|
5116
|
+
a9: pasteWillFork,
|
|
5117
|
+
aa: pick,
|
|
5118
|
+
ab: pastedFork,
|
|
5119
|
+
ac: toggleBranches,
|
|
4955
5120
|
q: input.refreshingChange || void 0,
|
|
4956
|
-
|
|
4957
|
-
|
|
4958
|
-
|
|
5121
|
+
ah: $pasted__closures,
|
|
5122
|
+
ak: $pasteWillFork__closures,
|
|
5123
|
+
ad: $si__input_onError && $input_onError__closures,
|
|
5124
|
+
af: $highlight__closures,
|
|
5125
|
+
aj: $branchesFor__closures
|
|
4959
5126
|
});
|
|
4960
5127
|
_resume_branch($scope0_id);
|
|
4961
5128
|
return $return;
|
|
@@ -4968,8 +5135,8 @@ var new_workspace_default = _template("p", (input) => {
|
|
|
4968
5135
|
const $scope0_reason = _scope_reason(), $sg__input_backHref__OR__input_onExit = _serialize_guard($scope0_reason, 0), $sg__input_workspaces = _serialize_guard($scope0_reason, 1), $si__input_workspaces = _serialize_if($scope0_reason, 1);
|
|
4969
5136
|
const $scope0_id = _scope_id();
|
|
4970
5137
|
const $error__closures = /* @__PURE__ */ new Set();
|
|
4971
|
-
const $steps_length__closures = /* @__PURE__ */ new Set();
|
|
4972
5138
|
const $busy__closures = /* @__PURE__ */ new Set();
|
|
5139
|
+
const $steps_length__closures = /* @__PURE__ */ new Set();
|
|
4973
5140
|
const $restoring__closures = /* @__PURE__ */ new Set();
|
|
4974
5141
|
let name = "";
|
|
4975
5142
|
let catalogRefreshing = false;
|
|
@@ -4979,11 +5146,12 @@ var new_workspace_default = _template("p", (input) => {
|
|
|
4979
5146
|
let error = null;
|
|
4980
5147
|
let steps$1 = [];
|
|
4981
5148
|
const archived$1 = (input.workspaces || []).filter((ws) => ws.status === "archived").slice().sort((a, b) => b.created_at.localeCompare(a.created_at));
|
|
4982
|
-
const addRepo = _resume((fullName, baseBranch) => {
|
|
5149
|
+
const addRepo = _resume((fullName, baseBranch, fork) => {
|
|
4983
5150
|
if (!fullName || selected.some((r) => r.fullName === fullName)) return;
|
|
4984
5151
|
selected = selected.concat({
|
|
4985
5152
|
fullName,
|
|
4986
|
-
baseBranch
|
|
5153
|
+
baseBranch,
|
|
5154
|
+
fork
|
|
4987
5155
|
});
|
|
4988
5156
|
}, "p1", $scope0_id);
|
|
4989
5157
|
let branchesFor = null;
|
|
@@ -4991,13 +5159,19 @@ var new_workspace_default = _template("p", (input) => {
|
|
|
4991
5159
|
selected = selected.filter((r) => r.fullName !== fullName);
|
|
4992
5160
|
if (branchesFor === fullName) branchesFor = null;
|
|
4993
5161
|
}, "p2", $scope0_id);
|
|
5162
|
+
const toggleFork = _resume((fullName) => {
|
|
5163
|
+
selected = selected.map((r) => r.fullName === fullName ? {
|
|
5164
|
+
...r,
|
|
5165
|
+
fork: !r.fork
|
|
5166
|
+
} : r);
|
|
5167
|
+
}, "p3", $scope0_id);
|
|
4994
5168
|
const setBranch = _resume((fullName, baseBranch) => {
|
|
4995
5169
|
selected = selected.map((r) => r.fullName === fullName ? {
|
|
4996
5170
|
...r,
|
|
4997
5171
|
baseBranch
|
|
4998
5172
|
} : r);
|
|
4999
5173
|
branchesFor = null;
|
|
5000
|
-
}, "
|
|
5174
|
+
}, "p4", $scope0_id);
|
|
5001
5175
|
const restore = _resume(async (ws) => {
|
|
5002
5176
|
if (busy || restoring) return;
|
|
5003
5177
|
error = null;
|
|
@@ -5017,7 +5191,7 @@ var new_workspace_default = _template("p", (input) => {
|
|
|
5017
5191
|
} finally {
|
|
5018
5192
|
restoring = null;
|
|
5019
5193
|
}
|
|
5020
|
-
}, "
|
|
5194
|
+
}, "p5", $scope0_id);
|
|
5021
5195
|
const createGen = { n: 0 };
|
|
5022
5196
|
const create = _resume(async () => {
|
|
5023
5197
|
if (restoring) return;
|
|
@@ -5050,7 +5224,7 @@ var new_workspace_default = _template("p", (input) => {
|
|
|
5050
5224
|
} finally {
|
|
5051
5225
|
watcher.stop();
|
|
5052
5226
|
}
|
|
5053
|
-
}, "
|
|
5227
|
+
}, "p6", $scope0_id);
|
|
5054
5228
|
const titleId = _id();
|
|
5055
5229
|
_html(`<div${_attr_class("_bi")} role=region${_attr("aria-labelledby", titleId)}><div${_attr_class("_bj")}><div${_attr_class(content$1)}>`);
|
|
5056
5230
|
_set_serialize_reason({
|
|
@@ -5064,8 +5238,8 @@ var new_workspace_default = _template("p", (input) => {
|
|
|
5064
5238
|
title: "New workspace",
|
|
5065
5239
|
titleId,
|
|
5066
5240
|
backHref: input.backHref,
|
|
5067
|
-
onBack: input.onExit && _resume(() => input.onExit?.(), "
|
|
5068
|
-
meta: attrTag({ content: _content_resume("
|
|
5241
|
+
onBack: input.onExit && _resume(() => input.onExit?.(), "p7", $scope0_id),
|
|
5242
|
+
meta: attrTag({ content: _content_resume("p14", () => {
|
|
5069
5243
|
_scope_reason();
|
|
5070
5244
|
_scope_id();
|
|
5071
5245
|
_html("Name the workspace and pick repos, or restore an archived one below.");
|
|
@@ -5073,21 +5247,21 @@ var new_workspace_default = _template("p", (input) => {
|
|
|
5073
5247
|
});
|
|
5074
5248
|
_if(() => {
|
|
5075
5249
|
if (error) {
|
|
5076
|
-
const $
|
|
5250
|
+
const $scope6_id = _scope_id();
|
|
5077
5251
|
toast_default({
|
|
5078
5252
|
placement: "inline",
|
|
5079
5253
|
onDismiss: _resume(function() {
|
|
5080
5254
|
error = null;
|
|
5081
|
-
}, "
|
|
5082
|
-
content: _content_resume("
|
|
5255
|
+
}, "p8", $scope6_id),
|
|
5256
|
+
content: _content_resume("p15", () => {
|
|
5083
5257
|
_scope_reason();
|
|
5084
|
-
const $
|
|
5085
|
-
_html(`${_escape(error)}${_el_resume($
|
|
5086
|
-
_subscribe($error__closures, writeScope($
|
|
5087
|
-
_resume_branch($
|
|
5088
|
-
}, $
|
|
5258
|
+
const $scope7_id = _scope_id();
|
|
5259
|
+
_html(`${_escape(error)}${_el_resume($scope7_id, "a")}`);
|
|
5260
|
+
_subscribe($error__closures, writeScope($scope7_id, { _: _scope_with_id($scope6_id) }));
|
|
5261
|
+
_resume_branch($scope7_id);
|
|
5262
|
+
}, $scope6_id)
|
|
5089
5263
|
});
|
|
5090
|
-
writeScope($
|
|
5264
|
+
writeScope($scope6_id, {});
|
|
5091
5265
|
return 0;
|
|
5092
5266
|
}
|
|
5093
5267
|
}, $scope0_id, "e", 1, 1, 1, 0, 1);
|
|
@@ -5098,49 +5272,60 @@ var new_workspace_default = _template("p", (input) => {
|
|
|
5098
5272
|
const $childScope2 = _peek_scope_id();
|
|
5099
5273
|
icon_refresh_default({
|
|
5100
5274
|
size: 14,
|
|
5101
|
-
class: catalogRefreshing && "
|
|
5275
|
+
class: catalogRefreshing && "_E"
|
|
5102
5276
|
});
|
|
5103
5277
|
_html(`</button>${_el_resume($scope0_id, "l")}</div><ul${_attr_class("_bO")}>`);
|
|
5104
5278
|
_for_of(selected, (repo) => {
|
|
5105
5279
|
const $scope2_id = _scope_id();
|
|
5106
|
-
_html(`<li><div${_attr_class(row)}><span${_attr_class("_bP")}>${_escape(repoLabel(repo.fullName))}${_el_resume($scope2_id, "c")}</span
|
|
5280
|
+
_html(`<li><div${_attr_class(row)}><span${_attr_class("_bP")}>${_escape(repoLabel(repo.fullName))}${_el_resume($scope2_id, "c")}</span>`);
|
|
5281
|
+
_if(() => {
|
|
5282
|
+
if (repo.fork !== void 0) {
|
|
5283
|
+
const $scope3_id = _scope_id();
|
|
5284
|
+
_html(`<button${_attr_class(["_bS", { ["_bQ"]: repo.fork }])}${repo.fork ? _attr("title", `${repo.fullName} will be forked to your account; click to clone as-is instead`) : _attr("title", `Fork ${repo.fullName} to your account and clone the fork`)} aria-pressed=${repo.fork ? "true" : "false"}${_attr("disabled", busy)}>${repo.fork ? "✓ fork" : "fork"}${_el_resume($scope3_id, "b")}</button>${_el_resume($scope3_id, "a")}`);
|
|
5285
|
+
_script($scope3_id, "p16");
|
|
5286
|
+
_subscribe($busy__closures, writeScope($scope3_id, {}));
|
|
5287
|
+
return 0;
|
|
5288
|
+
}
|
|
5289
|
+
}, $scope2_id, "d", 1, 1, 1, 0, 1);
|
|
5290
|
+
_html(`<button${_attr_class([
|
|
5107
5291
|
curBase,
|
|
5108
|
-
"
|
|
5292
|
+
"_x",
|
|
5109
5293
|
{ ["_bQ"]: branchesFor === repo.fullName }
|
|
5110
|
-
])}${_attr("title", `Change base branch for ${repo.fullName}`)}${_attr("aria-label", `Change base branch for ${repo.fullName}`)}${_attr("disabled", busy)}>${repo.baseBranch ? `⎇ ${_escape(`${repo.baseBranch}`)}` : "⎇"}${_el_resume($scope2_id, "
|
|
5294
|
+
])}${_attr("title", `Change base branch for ${repo.fullName}`)}${_attr("aria-label", `Change base branch for ${repo.fullName}`)}${_attr("disabled", busy)}>${repo.baseBranch ? `⎇ ${_escape(`${repo.baseBranch}`)}` : "⎇"}${_el_resume($scope2_id, "f")}</button>${_el_resume($scope2_id, "e")}<button${_attr_class([iconBtnXs, "_2"])}${_attr("title", `Remove ${repo.fullName}`)}${_attr("disabled", busy)}>`);
|
|
5111
5295
|
icon_xmark_default({ size: 12 });
|
|
5112
|
-
_html(`</button>${_el_resume($scope2_id, "
|
|
5296
|
+
_html(`</button>${_el_resume($scope2_id, "g")}</div>`);
|
|
5113
5297
|
_if(() => {
|
|
5114
5298
|
if (branchesFor === repo.fullName) {
|
|
5115
|
-
const $
|
|
5299
|
+
const $scope8_id = _scope_id();
|
|
5116
5300
|
const $childScope3 = _peek_scope_id();
|
|
5117
5301
|
branch_pick_default({
|
|
5118
5302
|
repo: repo.fullName,
|
|
5119
5303
|
current: repo.baseBranch,
|
|
5120
5304
|
onPick: _resume(function(branch, isDefault) {
|
|
5121
5305
|
setBranch(repo.fullName, isDefault ? void 0 : branch);
|
|
5122
|
-
}, "
|
|
5306
|
+
}, "p9", $scope8_id),
|
|
5123
5307
|
onError: _resume(function(message) {
|
|
5124
5308
|
branchesFor = null;
|
|
5125
5309
|
error = message;
|
|
5126
|
-
}, "
|
|
5310
|
+
}, "p10", $scope8_id)
|
|
5127
5311
|
});
|
|
5128
|
-
writeScope($
|
|
5312
|
+
writeScope($scope8_id, { a: _existing_scope($childScope3) });
|
|
5129
5313
|
return 0;
|
|
5130
5314
|
}
|
|
5131
|
-
}, $scope2_id, "
|
|
5315
|
+
}, $scope2_id, "i", 1, 1, 1, 0, 1);
|
|
5132
5316
|
_html("</li>");
|
|
5133
|
-
_script($scope2_id, "
|
|
5317
|
+
_script($scope2_id, "p17");
|
|
5134
5318
|
writeScope($scope2_id, {
|
|
5135
|
-
|
|
5136
|
-
|
|
5319
|
+
l: repo?.fullName,
|
|
5320
|
+
n: repo?.fork,
|
|
5321
|
+
o: repo?.baseBranch
|
|
5137
5322
|
});
|
|
5138
5323
|
}, "fullName", $scope0_id, "o", 1, 1, 1, 0, 1);
|
|
5139
5324
|
_if(() => {
|
|
5140
5325
|
if (!selected.length) {
|
|
5141
|
-
const $
|
|
5326
|
+
const $scope12_id = _scope_id();
|
|
5142
5327
|
_html(`<li${_attr_class("_bD")}>No repos yet. Search below to add one, or create it empty.</li>`);
|
|
5143
|
-
writeScope($
|
|
5328
|
+
writeScope($scope12_id, {});
|
|
5144
5329
|
return 0;
|
|
5145
5330
|
}
|
|
5146
5331
|
}, $scope0_id, "p", 1, 1, 1, 0, 1);
|
|
@@ -5149,42 +5334,42 @@ var new_workspace_default = _template("p", (input) => {
|
|
|
5149
5334
|
let refreshCatalog = repo_picker_default({
|
|
5150
5335
|
exclude: new Set(selected.map((r) => r.fullName)),
|
|
5151
5336
|
disabled: busy,
|
|
5152
|
-
onPick: _resume(function(fullName, baseBranch) {
|
|
5153
|
-
addRepo(fullName, baseBranch);
|
|
5154
|
-
}, "
|
|
5337
|
+
onPick: _resume(function(fullName, baseBranch, fork) {
|
|
5338
|
+
addRepo(fullName, baseBranch, fork);
|
|
5339
|
+
}, "p11", $scope0_id),
|
|
5155
5340
|
onError: _resume(function(message) {
|
|
5156
5341
|
error = message;
|
|
5157
|
-
}, "
|
|
5342
|
+
}, "p12", $scope0_id),
|
|
5158
5343
|
refreshingChange: _resume(function(v) {
|
|
5159
5344
|
catalogRefreshing = v;
|
|
5160
|
-
}, "
|
|
5345
|
+
}, "p13", $scope0_id)
|
|
5161
5346
|
});
|
|
5162
|
-
_var($scope0_id, "r", $childScope4, "
|
|
5347
|
+
_var($scope0_id, "r", $childScope4, "p18");
|
|
5163
5348
|
_html("</section>");
|
|
5164
5349
|
_if(() => {
|
|
5165
5350
|
if (busy && steps$1.length) {
|
|
5166
|
-
const $
|
|
5167
|
-
_html(`<ul${_attr_class("
|
|
5351
|
+
const $scope9_id = _scope_id();
|
|
5352
|
+
_html(`<ul${_attr_class("_bT")}>`);
|
|
5168
5353
|
_for_of(steps$1, (step$1, i) => {
|
|
5169
|
-
const $
|
|
5170
|
-
_html(`<li${_attr_class(["
|
|
5354
|
+
const $scope10_id = _scope_id();
|
|
5355
|
+
_html(`<li${_attr_class(["_bZ", { ["_bU"]: i === steps$1.length - 1 }])}>`);
|
|
5171
5356
|
_if(() => {
|
|
5172
5357
|
if (i === steps$1.length - 1) {
|
|
5173
|
-
const $scope12_id = _scope_id();
|
|
5174
|
-
_html(`<span${_attr_class("_z")}></span>`);
|
|
5175
|
-
writeScope($scope12_id, {});
|
|
5176
|
-
return 0;
|
|
5177
|
-
} else {
|
|
5178
5358
|
const $scope13_id = _scope_id();
|
|
5179
|
-
_html(`<span${_attr_class("
|
|
5359
|
+
_html(`<span${_attr_class("_F")}></span>`);
|
|
5180
5360
|
writeScope($scope13_id, {});
|
|
5361
|
+
return 0;
|
|
5362
|
+
} else {
|
|
5363
|
+
const $scope14_id = _scope_id();
|
|
5364
|
+
_html(`<span${_attr_class("_bV")}>✓</span>`);
|
|
5365
|
+
writeScope($scope14_id, {});
|
|
5181
5366
|
return 1;
|
|
5182
5367
|
}
|
|
5183
|
-
}, $
|
|
5184
|
-
_html(`<!>${_escape(step$1)}${_el_resume($
|
|
5185
|
-
_subscribe($steps_length__closures, writeScope($
|
|
5186
|
-
}, 0, $
|
|
5187
|
-
writeScope($
|
|
5368
|
+
}, $scope10_id, "b", 1, 1, 1, 0, 1);
|
|
5369
|
+
_html(`<!>${_escape(step$1)}${_el_resume($scope10_id, "c")}</li>${_el_resume($scope10_id, "a")}`);
|
|
5370
|
+
_subscribe($steps_length__closures, writeScope($scope10_id, {}));
|
|
5371
|
+
}, 0, $scope9_id, "a", 1, 1, 1, "</ul>", 1);
|
|
5372
|
+
writeScope($scope9_id, {});
|
|
5188
5373
|
return 0;
|
|
5189
5374
|
}
|
|
5190
5375
|
}, $scope0_id, "s", 1, 1, 1, 0, 1);
|
|
@@ -5193,51 +5378,52 @@ var new_workspace_default = _template("p", (input) => {
|
|
|
5193
5378
|
if (input.onExit || busy) {
|
|
5194
5379
|
const $scope1_id = _scope_id();
|
|
5195
5380
|
_html(`<button type=button${_attr_class(btnLg)}${_attr("disabled", !!restoring)}>Cancel</button>${_el_resume($scope1_id, "a")}`);
|
|
5196
|
-
_script($scope1_id, "
|
|
5381
|
+
_script($scope1_id, "p19");
|
|
5197
5382
|
writeScope($scope1_id, {});
|
|
5198
5383
|
return 0;
|
|
5199
5384
|
}
|
|
5200
5385
|
}, $scope0_id, "u", 1, 1, 1, 0, 1);
|
|
5201
5386
|
_html(`<button type=button${_attr_class([
|
|
5202
5387
|
btnLg,
|
|
5203
|
-
"
|
|
5388
|
+
"_p",
|
|
5204
5389
|
"_bK"
|
|
5205
5390
|
])}${_attr("disabled", busy || !!restoring || !name.trim())}>${busy ? "Creating…" : "Create workspace"}${_el_resume($scope0_id, "w")}</button>${_el_resume($scope0_id, "v")}</div>`);
|
|
5206
5391
|
_if(() => {
|
|
5207
5392
|
if (archived$1.length) {
|
|
5208
|
-
const $
|
|
5209
|
-
_html(`<section${_attr_class(archived)}><div${_attr_class("_bN")}><h2${_attr_class("_bH")}>Archived</h2><span${_attr_class(sectionCount$1)}>${_escape(archived$1.length)}${_el_resume($
|
|
5393
|
+
const $scope4_id = _scope_id();
|
|
5394
|
+
_html(`<section${_attr_class(archived)}><div${_attr_class("_bN")}><h2${_attr_class("_bH")}>Archived</h2><span${_attr_class(sectionCount$1)}>${_escape(archived$1.length)}${_el_resume($scope4_id, "e", $sg__input_workspaces)}</span></div><p${_attr_class(archivedHint)}>Restore an archived workspace instead of creating a new one.</p><ul${_attr_class("_bv")}>`);
|
|
5210
5395
|
_for_of(archived$1, (ws) => {
|
|
5211
|
-
const $
|
|
5212
|
-
_html(`<li${_attr_class(archivedCard)}><div${_attr_class("_by")}><span${_attr_class("_bz")}>${_escape(ws.name)}${_el_resume($
|
|
5396
|
+
const $scope5_id = _scope_id();
|
|
5397
|
+
_html(`<li${_attr_class(archivedCard)}><div${_attr_class("_by")}><span${_attr_class("_bz")}>${_escape(ws.name)}${_el_resume($scope5_id, "d", $sg__input_workspaces)}</span><span${_attr_class([metaTrunc, "_x"])}${_attr("title", ws.display_path || ws.path)}>${_escape(ws.display_path || ws.path)}${_el_resume($scope5_id, "f", $sg__input_workspaces)}</span>${_el_resume($scope5_id, "e", $sg__input_workspaces)}</div><button type=button${_attr_class(btnLg)}${_attr("disabled", busy || !!restoring)}>`);
|
|
5213
5398
|
_if(() => {
|
|
5214
5399
|
if (restoring === ws.id) {
|
|
5215
|
-
const $
|
|
5216
|
-
_html(`<span${_attr_class("
|
|
5217
|
-
writeScope($
|
|
5400
|
+
const $scope15_id = _scope_id();
|
|
5401
|
+
_html(`<span${_attr_class("_F")}></span> Restoring…`);
|
|
5402
|
+
writeScope($scope15_id, {});
|
|
5218
5403
|
return 0;
|
|
5219
5404
|
} else {
|
|
5220
|
-
const $
|
|
5405
|
+
const $scope16_id = _scope_id();
|
|
5221
5406
|
_html("Restore");
|
|
5222
|
-
writeScope($
|
|
5407
|
+
writeScope($scope16_id, {});
|
|
5223
5408
|
return 1;
|
|
5224
5409
|
}
|
|
5225
|
-
}, $
|
|
5410
|
+
}, $scope5_id, "g", 1, 1, 1, "</button>");
|
|
5226
5411
|
_html("</li>");
|
|
5227
|
-
_script($
|
|
5228
|
-
_subscribe($restoring__closures, _subscribe($busy__closures, writeScope($
|
|
5412
|
+
_script($scope5_id, "p20");
|
|
5413
|
+
_subscribe($restoring__closures, _subscribe($busy__closures, writeScope($scope5_id, {
|
|
5229
5414
|
j: ws,
|
|
5230
5415
|
o: ws?.id,
|
|
5231
|
-
_: _scope_with_id($
|
|
5416
|
+
_: _scope_with_id($scope4_id),
|
|
5417
|
+
Cax: 1
|
|
5232
5418
|
})));
|
|
5233
|
-
}, "id", $
|
|
5419
|
+
}, "id", $scope4_id, "g", $sg__input_workspaces, $sg__input_workspaces, $sg__input_workspaces, "</ul>", 1);
|
|
5234
5420
|
_html("</section>");
|
|
5235
|
-
writeScope($
|
|
5421
|
+
writeScope($scope4_id, { _: _scope_with_id($scope0_id) });
|
|
5236
5422
|
return 0;
|
|
5237
5423
|
}
|
|
5238
5424
|
}, $scope0_id, "x", $sg__input_workspaces, $sg__input_workspaces, 1, 0, 1);
|
|
5239
5425
|
_html("</div></div></div>");
|
|
5240
|
-
_script($scope0_id, "
|
|
5426
|
+
_script($scope0_id, "p21");
|
|
5241
5427
|
writeScope($scope0_id, {
|
|
5242
5428
|
a1: input.onRestore,
|
|
5243
5429
|
a2: input.onCreate,
|
|
@@ -5254,18 +5440,19 @@ var new_workspace_default = _template("p", (input) => {
|
|
|
5254
5440
|
ak: addRepo,
|
|
5255
5441
|
al: branchesFor,
|
|
5256
5442
|
an: removeRepo,
|
|
5257
|
-
ao:
|
|
5258
|
-
ap:
|
|
5259
|
-
|
|
5260
|
-
|
|
5261
|
-
|
|
5443
|
+
ao: toggleFork,
|
|
5444
|
+
ap: setBranch,
|
|
5445
|
+
aq: restore,
|
|
5446
|
+
as: createGen.n,
|
|
5447
|
+
au: create,
|
|
5448
|
+
aw: refreshCatalog,
|
|
5262
5449
|
d: _serialize_if($scope0_reason, 0) && _existing_scope($childScope),
|
|
5263
|
-
|
|
5450
|
+
az: $error__closures,
|
|
5264
5451
|
m: _existing_scope($childScope2),
|
|
5452
|
+
ax: $busy__closures,
|
|
5265
5453
|
q: _existing_scope($childScope4),
|
|
5266
|
-
|
|
5267
|
-
|
|
5268
|
-
ax: $restoring__closures
|
|
5454
|
+
b1: $steps_length__closures,
|
|
5455
|
+
ay: $restoring__closures
|
|
5269
5456
|
});
|
|
5270
5457
|
_resume_branch($scope0_id);
|
|
5271
5458
|
});
|
|
@@ -5352,8 +5539,8 @@ function activeAgent(session) {
|
|
|
5352
5539
|
const command = session.state?.command?.trim();
|
|
5353
5540
|
return command && agentFromCommand(command) || session.agent;
|
|
5354
5541
|
}
|
|
5355
|
-
var iconBtn$1 = "
|
|
5356
|
-
var navToggle = "
|
|
5542
|
+
var iconBtn$1 = "_cZ _j";
|
|
5543
|
+
var navToggle = "_c4 _j";
|
|
5357
5544
|
_template("H", (input) => {
|
|
5358
5545
|
const $scope0_reason = _scope_reason(), $sg__input_size__OR__input_class = _serialize_guard($scope0_reason, 0);
|
|
5359
5546
|
const $scope0_id = _scope_id();
|
|
@@ -5396,12 +5583,12 @@ var ARM_MS = 3500;
|
|
|
5396
5583
|
function disarmLater(fn) {
|
|
5397
5584
|
return setTimeout(fn, ARM_MS);
|
|
5398
5585
|
}
|
|
5399
|
-
var railBtn = "
|
|
5400
|
-
var rowIcon = "
|
|
5401
|
-
var close = "
|
|
5586
|
+
var railBtn = "_f0 _j";
|
|
5587
|
+
var rowIcon = "_f9 _Z _j";
|
|
5588
|
+
var close = "_f_ _Z _j _2";
|
|
5402
5589
|
//#endregion
|
|
5403
5590
|
//#region src/styles/session-pop.css.ts
|
|
5404
|
-
var sessionPop = "
|
|
5591
|
+
var sessionPop = "_fW _4";
|
|
5405
5592
|
//#endregion
|
|
5406
5593
|
//#region src/client/usage.ts
|
|
5407
5594
|
/** The plan row an agent instance draws on: its own account (`claude2`)
|
|
@@ -5462,22 +5649,22 @@ var usage_pcts_default = _template("C", (input) => {
|
|
|
5462
5649
|
if (windows.length) {
|
|
5463
5650
|
const $scope1_id = _scope_id();
|
|
5464
5651
|
_html(`<span${_attr_class([
|
|
5465
|
-
"
|
|
5652
|
+
"_fm",
|
|
5466
5653
|
input.class,
|
|
5467
|
-
{ ["
|
|
5654
|
+
{ ["_fn"]: agent.stale_seconds != null }
|
|
5468
5655
|
])}${agent.stale_seconds != null ? _attr("title", `${agent.note || "provider unreachable"}; last cached numbers`) : " title=\"Plan usage\""}>`);
|
|
5469
5656
|
_for_of(windows, (win$1, i) => {
|
|
5470
5657
|
const $scope2_id = _scope_id();
|
|
5471
|
-
_html(`<span${_attr_class("
|
|
5658
|
+
_html(`<span${_attr_class("_fo")}>`);
|
|
5472
5659
|
_if(() => {
|
|
5473
5660
|
if (i) {
|
|
5474
5661
|
const $scope3_id = _scope_id();
|
|
5475
|
-
_html(`<span${_attr_class("
|
|
5662
|
+
_html(`<span${_attr_class("_fr")} aria-hidden=true>·</span>`);
|
|
5476
5663
|
$si__input_agent && writeScope($scope3_id, {});
|
|
5477
5664
|
return 0;
|
|
5478
5665
|
}
|
|
5479
5666
|
}, $scope2_id, "b", $sg__input_agent, $sg__input_agent, $sg__input_agent, 0, 1);
|
|
5480
|
-
_html(`<span${_attr_class("
|
|
5667
|
+
_html(`<span${_attr_class("_fp")}>${_escape(win$1.window)}${_el_resume($scope2_id, "d", $sg__input_agent)}</span><span${_attr_class(["_fq", win$1.used_percent >= 90 ? "_eX" : win$1.used_percent >= 70 ? "_eW" : win$1.used_percent >= 40 ? "_eV" : "_eU"])}>${_escape(pctText(win$1.used_percent))}${_el_resume($scope2_id, "f", $sg__input_agent)}</span>${_el_resume($scope2_id, "e", $sg__input_agent)}</span>`);
|
|
5481
5668
|
$si__input_agent && writeScope($scope2_id, {});
|
|
5482
5669
|
}, "window", $scope1_id, "a", $sg__input_agent, $sg__input_agent__OR__input_class, $sg__input_agent, "</span>", 1);
|
|
5483
5670
|
$si__input_agent__OR__input_class && writeScope($scope1_id, { _: _scope_with_id($scope0_id) });
|
|
@@ -5508,12 +5695,12 @@ var icon_edit_default = _template("M", (input) => {
|
|
|
5508
5695
|
});
|
|
5509
5696
|
_serialize_if($scope0_reason, 0) && writeScope($scope0_id, { a: _existing_scope($childScope) });
|
|
5510
5697
|
});
|
|
5511
|
-
var prChip = "
|
|
5512
|
-
var portChip = "
|
|
5698
|
+
var prChip = "_g3 _s _g2";
|
|
5699
|
+
var portChip = "_g4 _s _g2";
|
|
5513
5700
|
var prState = {
|
|
5514
|
-
open: "
|
|
5515
|
-
merged: "
|
|
5516
|
-
closed: "
|
|
5701
|
+
open: "_g8",
|
|
5702
|
+
merged: "_g9",
|
|
5703
|
+
closed: "_g_"
|
|
5517
5704
|
};
|
|
5518
5705
|
//#endregion
|
|
5519
5706
|
//#region src/tags/side-nav-chips.marko
|
|
@@ -5561,7 +5748,7 @@ var side_nav_chips_default = _template("v", (input) => {
|
|
|
5561
5748
|
const name = repo.full_name.split("/").at(-1);
|
|
5562
5749
|
return repos.some((r) => r.full_name !== repo.full_name && r.full_name.split("/").at(-1) === name) ? repoLabel(repo.full_name) : name;
|
|
5563
5750
|
}, "v2", $scope1_id);
|
|
5564
|
-
_html(`<div${_attr_class("
|
|
5751
|
+
_html(`<div${_attr_class("_g1")}>`);
|
|
5565
5752
|
_for_of(repos, (repo) => {
|
|
5566
5753
|
const $scope2_id = _scope_id();
|
|
5567
5754
|
const $for_content__repo_worktree__closures = /* @__PURE__ */ new Set();
|
|
@@ -5569,19 +5756,19 @@ var side_nav_chips_default = _template("v", (input) => {
|
|
|
5569
5756
|
const $scope3_id = _scope_id();
|
|
5570
5757
|
const open = isOpen(pr);
|
|
5571
5758
|
_html(`<span${_attr_class([
|
|
5572
|
-
"
|
|
5759
|
+
"_s",
|
|
5573
5760
|
prChip,
|
|
5574
5761
|
{
|
|
5575
|
-
["
|
|
5576
|
-
["
|
|
5762
|
+
["_u"]: open && !pr.isDraft,
|
|
5763
|
+
["_v"]: open && pr.isDraft,
|
|
5577
5764
|
[prState.merged]: pr.state === "MERGED",
|
|
5578
5765
|
[prState.closed]: pr.state === "CLOSED"
|
|
5579
5766
|
}
|
|
5580
|
-
])}${_attr("title", prTitle(repo, pr))}><a${_attr_class(["
|
|
5767
|
+
])}${_attr("title", prTitle(repo, pr))}><a${_attr_class(["_g5", { ["_hb"]: !open }])}${_attr("href", pr.url)} target=_blank rel=noopener>${_escape(repoLabel$1(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)}`);
|
|
5581
5768
|
_if(() => {
|
|
5582
5769
|
if (open) {
|
|
5583
5770
|
const $scope4_id = _scope_id();
|
|
5584
|
-
_html(`<a${_attr_class(["
|
|
5771
|
+
_html(`<a${_attr_class(["_g5", "_g6"])}${_attr("href", `/w/${input.workspaceId}/review?pr=${encodeURIComponent(`${repo.worktree}/${pr.number}`)}`)}${_attr("title", `Review #${pr.number} changes`)}>`);
|
|
5585
5772
|
icon_diff_default({ size: 12 });
|
|
5586
5773
|
_html(`</a>${_el_resume($scope4_id, "a", _serialize_guard($scope0_reason, 0))}`);
|
|
5587
5774
|
_serialize_if($scope0_reason, 2) && _subscribe($si__input_status_repos && $for_content__repo_worktree__closures, _subscribe($si__input_workspaceId && $input_workspaceId__closures, writeScope($scope4_id, { _: _scope_with_id($scope3_id) })));
|
|
@@ -5589,9 +5776,9 @@ var side_nav_chips_default = _template("v", (input) => {
|
|
|
5589
5776
|
} else {
|
|
5590
5777
|
const $scope6_id = _scope_id();
|
|
5591
5778
|
_html(`<button type=button${_attr_class([
|
|
5592
|
-
"
|
|
5593
|
-
"
|
|
5594
|
-
"
|
|
5779
|
+
"_g5",
|
|
5780
|
+
"_g6",
|
|
5781
|
+
"_g7"
|
|
5595
5782
|
])}${_attr("title", `Dismiss #${pr.number}`)}>`);
|
|
5596
5783
|
icon_xmark_default({ size: 12 });
|
|
5597
5784
|
_html(`</button>${_el_resume($scope6_id, "a")}`);
|
|
@@ -5616,11 +5803,11 @@ var side_nav_chips_default = _template("v", (input) => {
|
|
|
5616
5803
|
}, "full_name", $scope1_id, "b", $sg__input_status_repos, $sg__input_status_repos, $sg__input_status_repos__OR__input_status_ports);
|
|
5617
5804
|
_for_of(ports, (p) => {
|
|
5618
5805
|
const $scope5_id = _scope_id();
|
|
5619
|
-
_html(`<span${_attr_class(["
|
|
5620
|
-
"_g3",
|
|
5621
|
-
"_g4",
|
|
5806
|
+
_html(`<span${_attr_class(["_s", portChip])}${_attr("title", p.cmd)}><button type=button${_attr_class(["_g5", "_ha"])}${_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([
|
|
5622
5807
|
"_g5",
|
|
5623
|
-
|
|
5808
|
+
"_g6",
|
|
5809
|
+
"_g7",
|
|
5810
|
+
{ ["_q"]: armedPid === p.pid }
|
|
5624
5811
|
])}${armedPid === p.pid ? " title=Kill?" : _attr("title", `Kill ${p.cmd} (pid ${p.pid})`)}>`);
|
|
5625
5812
|
icon_xmark_default({ size: 12 });
|
|
5626
5813
|
_html(`</button>${_el_resume($scope5_id, "d")}</span>${_el_resume($scope5_id, "a", $sg__input_status_ports)}`);
|
|
@@ -5711,10 +5898,10 @@ var side_nav_item_default = _template("w", (input) => {
|
|
|
5711
5898
|
_if(() => {
|
|
5712
5899
|
if (input.rail) {
|
|
5713
5900
|
const $scope2_id = _scope_id();
|
|
5714
|
-
_html(`<a${_attr("href", `/w/${ws$1.id}`)}${_attr_class([railBtn, { ["
|
|
5715
|
-
"
|
|
5901
|
+
_html(`<a${_attr("href", `/w/${ws$1.id}`)}${_attr_class([railBtn, { ["_fY"]: input.current }])}${_attr("title", ws$1.name)}>${_escape((input.index ?? 0) + 1)}${_el_resume($scope2_id, "b", _serialize_guard($scope0_reason, 27))}<span${_attr_class([
|
|
5902
|
+
"_z",
|
|
5716
5903
|
phase[dot],
|
|
5717
|
-
"
|
|
5904
|
+
"_f1"
|
|
5718
5905
|
])}></span>${_el_resume($scope2_id, "c", $sg__input_workspaceId__OR__input_status)}</a>${_el_resume($scope2_id, "a", _serialize_guard($scope0_reason, 3))}`);
|
|
5719
5906
|
_serialize_if($scope0_reason, 18) && _subscribe($si__input_workspaces__OR__input_workspaceId && $ws_name__closures, _subscribe($si__input_workspaces__OR__input_workspaceId && $ws_id__closures, _subscribe($si__input_index && $input_index__closures, _subscribe($si__input_current && $input_current__closures, writeScope($scope2_id, { _: _scope_with_id($scope1_id) })))));
|
|
5720
5907
|
return 0;
|
|
@@ -5722,15 +5909,15 @@ var side_nav_item_default = _template("w", (input) => {
|
|
|
5722
5909
|
const $scope3_id = _scope_id();
|
|
5723
5910
|
const sessions$1 = input.sessions || [];
|
|
5724
5911
|
const phaseLabel = dot === "working" ? "Working" : dot === "waiting" ? "Needs input" : dot === "idle" ? "Idle" : "Not running";
|
|
5725
|
-
_html(`<section${_attr_class(["
|
|
5726
|
-
["
|
|
5727
|
-
["
|
|
5728
|
-
["
|
|
5729
|
-
["
|
|
5730
|
-
}])}><div${_attr_class("
|
|
5731
|
-
"
|
|
5912
|
+
_html(`<section${_attr_class(["_f3", {
|
|
5913
|
+
["_fY"]: input.current,
|
|
5914
|
+
["_5"]: input.current,
|
|
5915
|
+
["_f4"]: input.railPop,
|
|
5916
|
+
["_f2"]: input.page
|
|
5917
|
+
}])}><div${_attr_class("_f5")}><a${_attr("href", `/w/${ws$1.id}`)}${_attr_class("_f6")}><span${_attr_class([
|
|
5918
|
+
"_z",
|
|
5732
5919
|
phase[dot],
|
|
5733
|
-
"
|
|
5920
|
+
"_gi"
|
|
5734
5921
|
])}${_attr("title", phaseLabel)}></span>${_el_resume($scope3_id, "d", $sg__input_workspaceId__OR__input_status)}`);
|
|
5735
5922
|
_if(() => {
|
|
5736
5923
|
if (sessions$1.length === 1) {
|
|
@@ -5743,7 +5930,7 @@ var side_nav_item_default = _template("w", (input) => {
|
|
|
5743
5930
|
icon_agent_default({
|
|
5744
5931
|
agent: activeAgent(sessions$1[0]),
|
|
5745
5932
|
size: 12,
|
|
5746
|
-
class: "
|
|
5933
|
+
class: "_ga"
|
|
5747
5934
|
});
|
|
5748
5935
|
$si__input_sessions && writeScope($scope14_id, {
|
|
5749
5936
|
_: _scope_with_id($scope3_id),
|
|
@@ -5753,16 +5940,16 @@ var side_nav_item_default = _template("w", (input) => {
|
|
|
5753
5940
|
}
|
|
5754
5941
|
}, $scope3_id, "e", $sg__input_sessions, $sg__input_sessions);
|
|
5755
5942
|
const metaText = sessions$1.length === 0 ? phaseLabel : sessions$1.length === 1 ? sessions$1[0].title || "" : `${sessions$1.length} sessions`;
|
|
5756
|
-
_html(`<span${_attr_class("
|
|
5943
|
+
_html(`<span${_attr_class("_gb")}><span${_attr_class("_gc")}>${_escape(ws$1.name)}${_el_resume($scope3_id, "h", $sg__input_workspaces__OR__input_workspaceId)}</span>`);
|
|
5757
5944
|
_if(() => {
|
|
5758
5945
|
if (input.page && metaText) {
|
|
5759
5946
|
const $scope16_id = _scope_id();
|
|
5760
|
-
_html(`<span${_attr_class("
|
|
5947
|
+
_html(`<span${_attr_class("_gg")}>${_escape(metaText)}${_el_resume($scope16_id, "b", _serialize_guard($scope0_reason, 7))}</span>`);
|
|
5761
5948
|
$si__input_page__OR__input_sessions__OR__input_workspaceId__OR__input_status && writeScope($scope16_id, { _: _serialize_if($scope0_reason, 7) && _scope_with_id($scope3_id) });
|
|
5762
5949
|
return 0;
|
|
5763
5950
|
} else if (sessions$1.length === 1 && sessions$1[0].title) {
|
|
5764
5951
|
const $scope15_id = _scope_id();
|
|
5765
|
-
_html(`<span${_attr_class("
|
|
5952
|
+
_html(`<span${_attr_class("_gd")}>${_escape(sessions$1[0].title)}${_el_resume($scope15_id, "b", $sg__input_sessions)}</span>`);
|
|
5766
5953
|
$si__input_page__OR__input_sessions__OR__input_workspaceId__OR__input_status && writeScope($scope15_id, { _: $si__input_sessions && _scope_with_id($scope3_id) });
|
|
5767
5954
|
return 1;
|
|
5768
5955
|
}
|
|
@@ -5772,10 +5959,10 @@ var side_nav_item_default = _template("w", (input) => {
|
|
|
5772
5959
|
if (input.page) {
|
|
5773
5960
|
const $scope4_id = _scope_id();
|
|
5774
5961
|
_html(`<span${_attr_class([
|
|
5775
|
-
"
|
|
5776
|
-
"
|
|
5777
|
-
"
|
|
5778
|
-
"
|
|
5962
|
+
"_I",
|
|
5963
|
+
"_R",
|
|
5964
|
+
"_K",
|
|
5965
|
+
"_gh"
|
|
5779
5966
|
])}>${input.current ? "Open" : ""}${_el_resume($scope4_id, "b", _serialize_guard($scope0_reason, 21))}</span>`);
|
|
5780
5967
|
$si__input_current__OR__input_page__OR__input_rail__OR__input_workspaces__OR__input_workspaceId && _subscribe($si__input_current && $input_current__closures, writeScope($scope4_id, {
|
|
5781
5968
|
_: _scope_with_id($scope3_id),
|
|
@@ -5788,7 +5975,7 @@ var side_nav_item_default = _template("w", (input) => {
|
|
|
5788
5975
|
_if(() => {
|
|
5789
5976
|
if (!input.page) {
|
|
5790
5977
|
const $scope5_id = _scope_id();
|
|
5791
|
-
_html(`<div${_attr_class("
|
|
5978
|
+
_html(`<div${_attr_class("_f7")}>`);
|
|
5792
5979
|
_if(() => {
|
|
5793
5980
|
if (input.onNewSession) {
|
|
5794
5981
|
const $scope6_id = _scope_id();
|
|
@@ -5802,7 +5989,7 @@ var side_nav_item_default = _template("w", (input) => {
|
|
|
5802
5989
|
_html(`</button>${_el_resume($scope6_id, "a")}<div${_attr("id", newPopId)} popover=auto${_attr_class(sessionPop)}>`);
|
|
5803
5990
|
_for_of([], (agent) => {
|
|
5804
5991
|
const $scope7_id = _scope_id();
|
|
5805
|
-
_html(`<button${_attr_class("
|
|
5992
|
+
_html(`<button${_attr_class("_fX")}>`);
|
|
5806
5993
|
_set_serialize_reason(12);
|
|
5807
5994
|
const $childScope2 = _peek_scope_id();
|
|
5808
5995
|
icon_agent_default({
|
|
@@ -5837,7 +6024,7 @@ var side_nav_item_default = _template("w", (input) => {
|
|
|
5837
6024
|
return 0;
|
|
5838
6025
|
}
|
|
5839
6026
|
}, $scope5_id, "c", $sg__input_onReview, $sg__input_onReview, $sg__input_onNewSession__OR__input_onReview, 0, 1);
|
|
5840
|
-
_html(`<a${input.managing ? _attr("href", `/w/${ws$1.id}`) : _attr("href", `/w/${ws$1.id}/manage`)}${_attr_class([rowIcon, { ["
|
|
6027
|
+
_html(`<a${input.managing ? _attr("href", `/w/${ws$1.id}`) : _attr("href", `/w/${ws$1.id}/manage`)}${_attr_class([rowIcon, { ["_fZ"]: input.managing }])} title=${input.managing ? "\"Back to terminal\"" : "\"Manage workspace\""}${input.managing ? " aria-current=page" : ""}>`);
|
|
5841
6028
|
icon_manage_default({ size: 12 });
|
|
5842
6029
|
_html(`</a>${_el_resume($scope5_id, "d", _serialize_guard($scope0_reason, 8))}</div>`);
|
|
5843
6030
|
_subscribe($si__input_workspaces__OR__input_workspaceId && $ws_id__closures, _subscribe($si__input_managing && $input_managing__closures, _subscribe($si__input_onReview && $input_onReview__closures, _subscribe($si__input_onNewSession && $input_onNewSession__closures, writeScope($scope5_id, {
|
|
@@ -5847,7 +6034,7 @@ var side_nav_item_default = _template("w", (input) => {
|
|
|
5847
6034
|
return 0;
|
|
5848
6035
|
}
|
|
5849
6036
|
}, $scope3_id, "k", $sg__input_page, $sg__input_page, 1, 0, 1);
|
|
5850
|
-
_html(`</div><div${_attr_class("
|
|
6037
|
+
_html(`</div><div${_attr_class("_gn")}>`);
|
|
5851
6038
|
_if(() => {
|
|
5852
6039
|
if (sessions$1.length === 1 && openPlan) {
|
|
5853
6040
|
const $scope11_id = _scope_id();
|
|
@@ -5855,7 +6042,7 @@ var side_nav_item_default = _template("w", (input) => {
|
|
|
5855
6042
|
const $childScope3 = _peek_scope_id();
|
|
5856
6043
|
usage_pcts_default({
|
|
5857
6044
|
agent: openPlan,
|
|
5858
|
-
class: "
|
|
6045
|
+
class: "_ge"
|
|
5859
6046
|
});
|
|
5860
6047
|
_subscribe($openPlan__closures, writeScope($scope11_id, {
|
|
5861
6048
|
a: _existing_scope($childScope3),
|
|
@@ -5866,14 +6053,14 @@ var side_nav_item_default = _template("w", (input) => {
|
|
|
5866
6053
|
}, $scope3_id, "m");
|
|
5867
6054
|
_for_of(sessions$1.length > 1 ? sessions$1 : [], (s) => {
|
|
5868
6055
|
const $scope8_id = _scope_id();
|
|
5869
|
-
_html(`<div${_attr_class(["
|
|
6056
|
+
_html(`<div${_attr_class(["_f8", { ["_fY"]: s.id === input.currentTab }])}>`);
|
|
5870
6057
|
_if(() => {
|
|
5871
6058
|
if (renamingId === s.id) {
|
|
5872
6059
|
const $scope10_id = _scope_id();
|
|
5873
6060
|
_html(`<span${_attr_class([
|
|
5874
|
-
"
|
|
6061
|
+
"_z",
|
|
5875
6062
|
phase[sessionPhase(s.state)],
|
|
5876
|
-
"
|
|
6063
|
+
"_gl"
|
|
5877
6064
|
])}></span>${_el_resume($scope10_id, "a", $sg__input_sessions)}`);
|
|
5878
6065
|
_set_serialize_reason({
|
|
5879
6066
|
1: $sg__input_sessions,
|
|
@@ -5883,17 +6070,17 @@ var side_nav_item_default = _template("w", (input) => {
|
|
|
5883
6070
|
icon_agent_default({
|
|
5884
6071
|
agent: activeAgent(s),
|
|
5885
6072
|
size: 13,
|
|
5886
|
-
class: "
|
|
6073
|
+
class: "_gp"
|
|
5887
6074
|
});
|
|
5888
6075
|
_html(`<input${_attr_input_value($scope10_id, "c", renameValue, _resume((_new_renameValue) => {
|
|
5889
6076
|
renameValue = _new_renameValue;
|
|
5890
|
-
}, "w0", $scope10_id))}${_attr_class(["
|
|
6077
|
+
}, "w0", $scope10_id))}${_attr_class(["_U", "_gm"])} aria-label="Session name">${_el_resume($scope10_id, "c")}`);
|
|
5891
6078
|
_script($scope10_id, "w5");
|
|
5892
6079
|
_subscribe($renameValue__closures, writeScope($scope10_id, { b: $si__input_sessions && _existing_scope($childScope4) }));
|
|
5893
6080
|
return 0;
|
|
5894
6081
|
} else {
|
|
5895
6082
|
const $scope9_id = _scope_id();
|
|
5896
|
-
_html(`<a${_attr("href", `/w/${ws$1.id}?s=${s.id}`)}${_attr_class("
|
|
6083
|
+
_html(`<a${_attr("href", `/w/${ws$1.id}?s=${s.id}`)}${_attr_class("_go")}><span${_attr_class(["_z", phase[sessionPhase(s.state)]])}></span>${_el_resume($scope9_id, "b", $sg__input_sessions)}`);
|
|
5897
6084
|
_set_serialize_reason({
|
|
5898
6085
|
1: $sg__input_sessions,
|
|
5899
6086
|
2: $sg__input_sessions
|
|
@@ -5902,11 +6089,11 @@ var side_nav_item_default = _template("w", (input) => {
|
|
|
5902
6089
|
icon_agent_default({
|
|
5903
6090
|
agent: activeAgent(s),
|
|
5904
6091
|
size: 13,
|
|
5905
|
-
class: "
|
|
6092
|
+
class: "_gp"
|
|
5906
6093
|
});
|
|
5907
|
-
_html(`<span${_attr_class("
|
|
6094
|
+
_html(`<span${_attr_class("_gj")}>${_escape(s.title || activeAgent(s))}${_el_resume($scope9_id, "e", $sg__input_sessions)}</span></a>${_el_resume($scope9_id, "a", _serialize_guard($scope0_reason, 6))}<div${_attr_class("_gk")}><button${_attr_class(rowIcon)} title="Rename session">`);
|
|
5908
6095
|
icon_edit_default({ size: 12 });
|
|
5909
|
-
_html(`</button>${_el_resume($scope9_id, "g")}<button${_attr_class([close, { ["
|
|
6096
|
+
_html(`</button>${_el_resume($scope9_id, "g")}<button${_attr_class([close, { ["_q"]: armedKill === s.id }])} title=${armedKill === s.id ? "Close?" : "\"Close session\""}>`);
|
|
5910
6097
|
icon_xmark_default({ size: 12 });
|
|
5911
6098
|
_html(`</button>${_el_resume($scope9_id, "i")}</div>`);
|
|
5912
6099
|
_if(() => {
|
|
@@ -5916,7 +6103,7 @@ var side_nav_item_default = _template("w", (input) => {
|
|
|
5916
6103
|
const $childScope6 = _peek_scope_id();
|
|
5917
6104
|
usage_pcts_default({
|
|
5918
6105
|
agent: openPlan,
|
|
5919
|
-
class: "
|
|
6106
|
+
class: "_gf"
|
|
5920
6107
|
});
|
|
5921
6108
|
_subscribe($openPlan__closures, writeScope($scope12_id, {
|
|
5922
6109
|
a: _existing_scope($childScope6),
|
|
@@ -6070,7 +6257,7 @@ var icon_sidebar_collapse_default = _template("V", (input) => {
|
|
|
6070
6257
|
//#endregion
|
|
6071
6258
|
//#region src/tags/side-nav.marko
|
|
6072
6259
|
var side_nav_default = _template("x", (input) => {
|
|
6073
|
-
const $scope0_reason = _scope_reason(), $sg__input_instanceName = _serialize_guard($scope0_reason,
|
|
6260
|
+
const $scope0_reason = _scope_reason(), $sg__input_instanceName = _serialize_guard($scope0_reason, 12), $sg__input_setupReady = _serialize_guard($scope0_reason, 13), $sg__input_instanceAccent = _serialize_guard($scope0_reason, 11), $sg__input_workspace__OR__input_allWorkspaces = _serialize_guard($scope0_reason, 0), $sg__input_workspace__OR__input_allWorkspaces__OR__input_allStatus = _serialize_guard($scope0_reason, 3), $sg__input_agents = _serialize_guard($scope0_reason, 15), $si__input_workspace = _serialize_if($scope0_reason, 4), $si__input_workspace__OR__input_allWorkspaces = _serialize_if($scope0_reason, 0), $si__input_allStatus = _serialize_if($scope0_reason, 10), $si__input_setupReady = _serialize_if($scope0_reason, 13), $si__input_instanceName = _serialize_if($scope0_reason, 12), $si__input_instanceAccent = _serialize_if($scope0_reason, 11), $si__input_onSelectWorkspace = _serialize_if($scope0_reason, 14), $si__input_agents = _serialize_if($scope0_reason, 15), $si__input_onNewSession = _serialize_if($scope0_reason, 16), $si__input_onReviewOpened = _serialize_if($scope0_reason, 17), $si__input_sessions = _serialize_if($scope0_reason, 18), $si__input_onRenameSession = _serialize_if($scope0_reason, 19), $si__input_onCloseSession = _serialize_if($scope0_reason, 20), $si__input_tab__OR__input_tabChange = _serialize_if($scope0_reason, 1);
|
|
6074
6261
|
const $scope0_id = _scope_id();
|
|
6075
6262
|
const $input_instanceName__closures = /* @__PURE__ */ new Set();
|
|
6076
6263
|
const $iconSrc__closures = /* @__PURE__ */ new Set();
|
|
@@ -6119,34 +6306,34 @@ var side_nav_default = _template("x", (input) => {
|
|
|
6119
6306
|
const iconSrc = `/api/instance/icon${input.instanceAccent ? `?v=${input.instanceAccent.slice(1)}` : ""}`;
|
|
6120
6307
|
const otherIds = itemIds.filter((id) => id !== ws.id);
|
|
6121
6308
|
const listIds = isPage ? [ws.id, ...otherIds] : itemIds;
|
|
6122
|
-
_html(`<aside${_attr_class(["
|
|
6123
|
-
["
|
|
6124
|
-
["
|
|
6309
|
+
_html(`<aside${_attr_class(["_c3", {
|
|
6310
|
+
["_c1"]: !navOpen,
|
|
6311
|
+
["_c2"]: isPage
|
|
6125
6312
|
}])}${_attr("hidden", view === "diff")}>`);
|
|
6126
6313
|
_if(() => {
|
|
6127
6314
|
if (isPage) {
|
|
6128
6315
|
const $scope1_id = _scope_id();
|
|
6129
|
-
_html(`<header${_attr_class("
|
|
6316
|
+
_html(`<header${_attr_class("_c6")}><div${_attr_class("_de")}>`);
|
|
6130
6317
|
_if(() => {
|
|
6131
6318
|
if (input.instanceName) {
|
|
6132
6319
|
const $scope2_id = _scope_id();
|
|
6133
|
-
_html(`<div${_attr_class("
|
|
6320
|
+
_html(`<div${_attr_class("_db")} title="This work server (Settings → Appearance)"><img${_attr_class("_dc")}${_attr("src", iconSrc)} alt aria-hidden=true>${_el_resume($scope2_id, "b", $sg__input_instanceAccent)}<span${_attr_class("_dd")}>${_escape(input.instanceName)}${_el_resume($scope2_id, "d", $sg__input_instanceName)}</span></div>`);
|
|
6134
6321
|
_subscribe($si__input_instanceAccent && $iconSrc__closures, _subscribe($si__input_instanceName && $input_instanceName__closures, writeScope($scope2_id, { _: _scope_with_id($scope1_id) })));
|
|
6135
6322
|
return 0;
|
|
6136
6323
|
}
|
|
6137
6324
|
}, $scope1_id, "c", $sg__input_instanceName, $sg__input_instanceName, 1, 0, 1);
|
|
6138
|
-
_html(`<h1${_attr_class("
|
|
6325
|
+
_html(`<h1${_attr_class("_c7")}>Workspaces</h1></div><div${_attr_class("_c8")}>`);
|
|
6139
6326
|
_if(() => {}, $scope1_id, "f", 1, 1, 1, 0, 1);
|
|
6140
6327
|
_html(`<a${view === "settings" ? _attr("href", backHref) : " href=/settings"}${_attr_class([
|
|
6141
6328
|
iconBtn$1,
|
|
6142
|
-
"
|
|
6143
|
-
{ ["
|
|
6329
|
+
"_c9",
|
|
6330
|
+
{ ["_cY"]: view === "settings" }
|
|
6144
6331
|
])} title=${view === "settings" ? "\"Back to workspace\"" : "Settings"}${view === "settings" ? " aria-current=page" : ""}>`);
|
|
6145
6332
|
icon_settings_default({ size: 16 });
|
|
6146
6333
|
_if(() => {
|
|
6147
6334
|
if (input.setupReady === false) {
|
|
6148
6335
|
const $scope12_id = _scope_id();
|
|
6149
|
-
_html(`<span${_attr_class(["
|
|
6336
|
+
_html(`<span${_attr_class(["_z", "_c0"])} title="Machine setup incomplete"></span>`);
|
|
6150
6337
|
$si__input_setupReady && writeScope($scope12_id, {});
|
|
6151
6338
|
return 0;
|
|
6152
6339
|
}
|
|
@@ -6159,18 +6346,18 @@ var side_nav_default = _template("x", (input) => {
|
|
|
6159
6346
|
_if(() => {
|
|
6160
6347
|
if (!isPage && input.instanceName) {
|
|
6161
6348
|
const $scope3_id = _scope_id();
|
|
6162
|
-
_html(`<div${_attr_class("
|
|
6349
|
+
_html(`<div${_attr_class("_db")} title="This work server (Settings → Appearance)"><img${_attr_class("_dc")}${_attr("src", iconSrc)} alt aria-hidden=true>${_el_resume($scope3_id, "b", $sg__input_instanceAccent)}<span${_attr_class("_dd")}>${_escape(input.instanceName)}${_el_resume($scope3_id, "d", $sg__input_instanceName)}</span></div>`);
|
|
6163
6350
|
writeScope($scope3_id, {});
|
|
6164
6351
|
return 0;
|
|
6165
6352
|
}
|
|
6166
6353
|
}, $scope0_id, "c", 1, 1, 1, 0, 1);
|
|
6167
|
-
_html(`<div${_attr_class("
|
|
6354
|
+
_html(`<div${_attr_class("_df")}>`);
|
|
6168
6355
|
_for_of(listIds, (wsId) => {
|
|
6169
6356
|
const $scope4_id = _scope_id();
|
|
6170
6357
|
_if(() => {
|
|
6171
6358
|
if (isPage && wsId === ws.id) {
|
|
6172
6359
|
const $scope13_id = _scope_id();
|
|
6173
|
-
_html(`<h2${_attr_class(["_bH", "
|
|
6360
|
+
_html(`<h2${_attr_class(["_bH", "_c_"])}>Current</h2>`);
|
|
6174
6361
|
writeScope($scope13_id, {});
|
|
6175
6362
|
return 0;
|
|
6176
6363
|
}
|
|
@@ -6178,7 +6365,7 @@ var side_nav_default = _template("x", (input) => {
|
|
|
6178
6365
|
_if(() => {
|
|
6179
6366
|
if (isPage && wsId !== ws.id && wsId === otherIds[0]) {
|
|
6180
6367
|
const $scope14_id = _scope_id();
|
|
6181
|
-
_html(`<h2${_attr_class(["_bH", "
|
|
6368
|
+
_html(`<h2${_attr_class(["_bH", "_c_"])}>Other workspaces</h2>`);
|
|
6182
6369
|
writeScope($scope14_id, {});
|
|
6183
6370
|
return 0;
|
|
6184
6371
|
}
|
|
@@ -6265,7 +6452,7 @@ var side_nav_default = _template("x", (input) => {
|
|
|
6265
6452
|
railHover = null;
|
|
6266
6453
|
}, 150);
|
|
6267
6454
|
}, "x6", $scope5_id);
|
|
6268
|
-
_html(`<div${_attr_class("
|
|
6455
|
+
_html(`<div${_attr_class("_dg")}>`);
|
|
6269
6456
|
_for_of(itemIds, (wsId, i) => {
|
|
6270
6457
|
const $scope6_id = _scope_id();
|
|
6271
6458
|
_html("<span>");
|
|
@@ -6312,14 +6499,14 @@ var side_nav_default = _template("x", (input) => {
|
|
|
6312
6499
|
_subscribe($si__input_allStatus && $allStatus__closures, _subscribe($si__input_workspace__OR__input_allWorkspaces && $workspaces__closures, _subscribe($si__input_workspace && $ws_id__closures, writeScope($scope6_id, {
|
|
6313
6500
|
d: wsId,
|
|
6314
6501
|
_: _scope_with_id($scope5_id),
|
|
6315
|
-
b: _serialize_if($scope0_reason,
|
|
6502
|
+
b: _serialize_if($scope0_reason, 3) && _existing_scope($childScope2)
|
|
6316
6503
|
}))));
|
|
6317
6504
|
}, (id) => id, $scope5_id, "a", $sg__input_workspace__OR__input_allWorkspaces, $sg__input_workspace__OR__input_allWorkspaces, $sg__input_workspace__OR__input_allWorkspaces, "</div>", 1);
|
|
6318
6505
|
_if(() => {
|
|
6319
6506
|
if (railHover) {
|
|
6320
6507
|
const $scope7_id = _scope_id();
|
|
6321
6508
|
const hoverId = railHover.id;
|
|
6322
|
-
_html(`<div${_attr_class(["
|
|
6509
|
+
_html(`<div${_attr_class(["_4", "_dj"])}${_attr_style(`top:${railHover.top}px;left:${railHover.left}px`)}>`);
|
|
6323
6510
|
_set_serialize_reason({
|
|
6324
6511
|
0: 1,
|
|
6325
6512
|
1: 1,
|
|
@@ -6386,7 +6573,7 @@ var side_nav_default = _template("x", (input) => {
|
|
|
6386
6573
|
});
|
|
6387
6574
|
_html(`</div>${_el_resume($scope7_id, "a")}`);
|
|
6388
6575
|
_script($scope7_id, "x13");
|
|
6389
|
-
_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($scope7_id, {
|
|
6576
|
+
_subscribe($si__input_allStatus && $allStatus__closures, _subscribe($si__input_workspace__OR__input_allWorkspaces && $workspaces__closures, _subscribe($view__closures, _subscribe($si__input_tab__OR__input_tabChange && $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($scope7_id, {
|
|
6390
6577
|
d: hoverId,
|
|
6391
6578
|
b: _existing_scope($childScope3),
|
|
6392
6579
|
Cb4: $si__input_workspace && 1,
|
|
@@ -6407,15 +6594,15 @@ var side_nav_default = _template("x", (input) => {
|
|
|
6407
6594
|
return 0;
|
|
6408
6595
|
}
|
|
6409
6596
|
}, $scope0_id, "e");
|
|
6410
|
-
_html(`<div${_attr_class("
|
|
6597
|
+
_html(`<div${_attr_class("_dh")}>`);
|
|
6411
6598
|
_if(() => {
|
|
6412
6599
|
if (isPage) {
|
|
6413
6600
|
const $scope9_id = _scope_id();
|
|
6414
6601
|
_html(`<a${view === "new" ? _attr("href", backHref) : " href=/new"}${_attr_class([
|
|
6415
|
-
"
|
|
6416
|
-
"
|
|
6602
|
+
"_o",
|
|
6603
|
+
"_p",
|
|
6417
6604
|
btnLg,
|
|
6418
|
-
"
|
|
6605
|
+
"_da"
|
|
6419
6606
|
])} title=${view === "new" ? "\"Back to workspace\"" : "\"New workspace\""}${view === "new" ? " aria-current=page" : ""}>`);
|
|
6420
6607
|
icon_folder_plus_default({ size: 16 });
|
|
6421
6608
|
_html(` New workspace</a>${_el_resume($scope9_id, "a")}`);
|
|
@@ -6437,19 +6624,19 @@ var side_nav_default = _template("x", (input) => {
|
|
|
6437
6624
|
return 1;
|
|
6438
6625
|
}
|
|
6439
6626
|
}, $scope8_id, "a", 1, 1, 1, "</button>", 1);
|
|
6440
|
-
_html(`<div${_attr_class(["
|
|
6627
|
+
_html(`<div${_attr_class(["_y", "_di"])}></div>`);
|
|
6441
6628
|
_if(() => {}, $scope8_id, "c", 1, 1, 1, 0, 1);
|
|
6442
|
-
_html(`<a${view === "settings" ? _attr("href", backHref) : " href=/settings"}${_attr_class([iconBtn$1, { ["
|
|
6629
|
+
_html(`<a${view === "settings" ? _attr("href", backHref) : " href=/settings"}${_attr_class([iconBtn$1, { ["_cY"]: view === "settings" }])} title=${view === "settings" ? "\"Back to workspace\"" : "Settings"}${view === "settings" ? " aria-current=page" : ""}>`);
|
|
6443
6630
|
icon_settings_default({ size: 15 });
|
|
6444
6631
|
_if(() => {
|
|
6445
6632
|
if (input.setupReady === false) {
|
|
6446
6633
|
const $scope17_id = _scope_id();
|
|
6447
|
-
_html(`<span${_attr_class(["
|
|
6634
|
+
_html(`<span${_attr_class(["_z", "_c0"])} title="Machine setup incomplete"></span>`);
|
|
6448
6635
|
$si__input_setupReady && writeScope($scope17_id, {});
|
|
6449
6636
|
return 0;
|
|
6450
6637
|
}
|
|
6451
6638
|
}, $scope8_id, "f", $sg__input_setupReady, $sg__input_setupReady, 1, 0, 1);
|
|
6452
|
-
_html(`</a>${_el_resume($scope8_id, "d")}<a${view === "new" ? _attr("href", backHref) : " href=/new"}${_attr_class([iconBtn$1, { ["
|
|
6639
|
+
_html(`</a>${_el_resume($scope8_id, "d")}<a${view === "new" ? _attr("href", backHref) : " href=/new"}${_attr_class([iconBtn$1, { ["_cY"]: view === "new" }])} title=${view === "new" ? "\"Back to workspace\"" : "\"New workspace\""}${view === "new" ? " aria-current=page" : ""}>`);
|
|
6453
6640
|
icon_folder_plus_default({ size: 16 });
|
|
6454
6641
|
_html(`</a>${_el_resume($scope8_id, "g")}`);
|
|
6455
6642
|
_script($scope8_id, "x15");
|
|
@@ -6461,10 +6648,10 @@ var side_nav_default = _template("x", (input) => {
|
|
|
6461
6648
|
_script($scope0_id, "x16");
|
|
6462
6649
|
_script($scope0_id, "x17");
|
|
6463
6650
|
writeScope($scope0_id, {
|
|
6464
|
-
j: _serialize_if($scope0_reason,
|
|
6465
|
-
k: _serialize_if($scope0_reason,
|
|
6466
|
-
m: _serialize_if($scope0_reason,
|
|
6467
|
-
n: _serialize_if($scope0_reason,
|
|
6651
|
+
j: _serialize_if($scope0_reason, 6) && input.tab,
|
|
6652
|
+
k: _serialize_if($scope0_reason, 5) && input.tabChange,
|
|
6653
|
+
m: _serialize_if($scope0_reason, 8) && input.view,
|
|
6654
|
+
n: _serialize_if($scope0_reason, 7) && input.viewChange,
|
|
6468
6655
|
p: input.onError,
|
|
6469
6656
|
q: input.active,
|
|
6470
6657
|
r: $si__input_workspace && input.allWorkspaces,
|
|
@@ -6477,7 +6664,7 @@ var side_nav_default = _template("x", (input) => {
|
|
|
6477
6664
|
a0: input.sessions,
|
|
6478
6665
|
a1: input.onRenameSession,
|
|
6479
6666
|
a2: input.onCloseSession,
|
|
6480
|
-
a3: _serialize_if($scope0_reason,
|
|
6667
|
+
a3: _serialize_if($scope0_reason, 9) && ws,
|
|
6481
6668
|
a5: ws?.id,
|
|
6482
6669
|
a7: tab,
|
|
6483
6670
|
a9: view,
|
|
@@ -6494,7 +6681,6 @@ var side_nav_default = _template("x", (input) => {
|
|
|
6494
6681
|
aq: iconSrc,
|
|
6495
6682
|
ar: otherIds,
|
|
6496
6683
|
at: otherIds?.[0],
|
|
6497
|
-
a8: input.tabChange || void 0,
|
|
6498
6684
|
aa: input.viewChange || void 0,
|
|
6499
6685
|
av: $si__input_instanceName && $input_instanceName__closures,
|
|
6500
6686
|
bg: $si__input_instanceAccent && $iconSrc__closures,
|
|
@@ -6509,17 +6695,17 @@ var side_nav_default = _template("x", (input) => {
|
|
|
6509
6695
|
b1: $si__input_sessions && $input_sessions__closures,
|
|
6510
6696
|
b2: $si__input_onRenameSession && $input_onRenameSession__closures,
|
|
6511
6697
|
b3: $si__input_onCloseSession && $input_onCloseSession__closures,
|
|
6512
|
-
b5: $tab__closures,
|
|
6698
|
+
b5: $si__input_tab__OR__input_tabChange && $tab__closures,
|
|
6513
6699
|
b6: $view__closures
|
|
6514
6700
|
});
|
|
6515
6701
|
_resume_branch($scope0_id);
|
|
6516
6702
|
});
|
|
6517
|
-
var iconBtn = "
|
|
6518
|
-
var sectionCount = "_bu
|
|
6519
|
-
var content = "
|
|
6520
|
-
var pageMeta = "
|
|
6521
|
-
var pathMeta = "
|
|
6522
|
-
var dangerHint = "
|
|
6703
|
+
var iconBtn = "_0 _j";
|
|
6704
|
+
var sectionCount = "_bu _I _J";
|
|
6705
|
+
var content = "_dk _bk";
|
|
6706
|
+
var pageMeta = "_dl _bp";
|
|
6707
|
+
var pathMeta = "_do _x";
|
|
6708
|
+
var dangerHint = "_du _S";
|
|
6523
6709
|
//#endregion
|
|
6524
6710
|
//#region src/tags/manage-workspace.marko
|
|
6525
6711
|
var api$2;
|
|
@@ -6557,7 +6743,7 @@ var manage_workspace_default = _template("n", (input) => {
|
|
|
6557
6743
|
else next.delete(name);
|
|
6558
6744
|
busy = next;
|
|
6559
6745
|
}, "n1", $scope0_id);
|
|
6560
|
-
const addRepo = _resume(async (name, baseBranch) => {
|
|
6746
|
+
const addRepo = _resume(async (name, baseBranch, fork) => {
|
|
6561
6747
|
if (!name || busy.has(name)) return;
|
|
6562
6748
|
error = null;
|
|
6563
6749
|
setBusy(name, true);
|
|
@@ -6567,7 +6753,8 @@ var manage_workspace_default = _template("n", (input) => {
|
|
|
6567
6753
|
headers: { "content-type": "application/json" },
|
|
6568
6754
|
body: JSON.stringify({
|
|
6569
6755
|
fullName: name,
|
|
6570
|
-
baseBranch
|
|
6756
|
+
baseBranch,
|
|
6757
|
+
fork
|
|
6571
6758
|
})
|
|
6572
6759
|
});
|
|
6573
6760
|
} catch (err) {
|
|
@@ -6630,16 +6817,16 @@ var manage_workspace_default = _template("n", (input) => {
|
|
|
6630
6817
|
meta: attrTag({ content: _content_resume("n11", () => {
|
|
6631
6818
|
_scope_reason();
|
|
6632
6819
|
const $scope8_id = _scope_id();
|
|
6633
|
-
_html(`<span${_attr_class(pageMeta)}${_attr("title", ws.display_path || ws.path)}><span${_attr_class("
|
|
6820
|
+
_html(`<span${_attr_class(pageMeta)}${_attr("title", ws.display_path || ws.path)}><span${_attr_class("_dm")}>${_escape(ws.name)}${_el_resume($scope8_id, "c")}</span>`);
|
|
6634
6821
|
_if(() => {
|
|
6635
6822
|
if (ws.status !== "active") {
|
|
6636
6823
|
const $scope11_id = _scope_id();
|
|
6637
|
-
_html(`<span${_attr_class(["
|
|
6824
|
+
_html(`<span${_attr_class(["_I", "_K"])}>Archived</span>`);
|
|
6638
6825
|
writeScope($scope11_id, {});
|
|
6639
6826
|
return 0;
|
|
6640
6827
|
}
|
|
6641
6828
|
}, $scope8_id, "d", 1, 1, 1, 0, 1);
|
|
6642
|
-
_html(`<span${_attr_class("
|
|
6829
|
+
_html(`<span${_attr_class("_dn")} aria-hidden=true>·</span><span${_attr_class(pathMeta)}>${_escape(ws.display_path || ws.path)}${_el_resume($scope8_id, "g")}</span></span>${_el_resume($scope8_id, "a")}`);
|
|
6643
6830
|
_subscribe($ws_status__closures, _subscribe($ws_name__closures, _subscribe($ws_path__closures, _subscribe($ws_display_path__closures, writeScope($scope8_id, { _: _scope_with_id($scope0_id) })))));
|
|
6644
6831
|
_resume_branch($scope8_id);
|
|
6645
6832
|
}, $scope0_id) })
|
|
@@ -6667,26 +6854,26 @@ var manage_workspace_default = _template("n", (input) => {
|
|
|
6667
6854
|
_if(() => {
|
|
6668
6855
|
if (pendingAction && actionStep) {
|
|
6669
6856
|
const $scope7_id = _scope_id();
|
|
6670
|
-
_html(`<p${_attr_class("_br")}><span${_attr_class("
|
|
6857
|
+
_html(`<p${_attr_class("_br")}><span${_attr_class("_F")}></span><!>${_escape(actionStep)}${_el_resume($scope7_id, "c")}</p>`);
|
|
6671
6858
|
writeScope($scope7_id, {});
|
|
6672
6859
|
return 0;
|
|
6673
6860
|
}
|
|
6674
6861
|
}, $scope0_id, "f", 1, 1, 1, 0, 1);
|
|
6675
|
-
_html(`<section${_attr_class("_bs")}><div${_attr_class("_bt")}><h2${_attr_class("_bH")}>Repos</h2><span${_attr_class(sectionCount)}>${_escape(ws.repos.length)}${_el_resume($scope0_id, "k")}</span><div${_attr_class("
|
|
6862
|
+
_html(`<section${_attr_class("_bs")}><div${_attr_class("_bt")}><h2${_attr_class("_bH")}>Repos</h2><span${_attr_class(sectionCount)}>${_escape(ws.repos.length)}${_el_resume($scope0_id, "k")}</span><div${_attr_class("_y")}></div><button${_attr_class(iconBtn)} title="Refresh repo list" aria-label="Refresh repo list"${_attr("disabled", catalogRefreshing)}>`);
|
|
6676
6863
|
_set_serialize_reason(1);
|
|
6677
6864
|
const $childScope2 = _peek_scope_id();
|
|
6678
6865
|
icon_refresh_default({
|
|
6679
6866
|
size: 14,
|
|
6680
|
-
class: catalogRefreshing && "
|
|
6867
|
+
class: catalogRefreshing && "_E"
|
|
6681
6868
|
});
|
|
6682
6869
|
_html(`</button>${_el_resume($scope0_id, "m")}</div><ul${_attr_class("_bv")}>`);
|
|
6683
6870
|
_for_of(ws.repos, (row) => {
|
|
6684
6871
|
const $scope1_id = _scope_id();
|
|
6685
|
-
_html(`<li${_attr_class("_bx")}><div${_attr_class("_by")}><span${_attr_class(["_bz", "
|
|
6872
|
+
_html(`<li${_attr_class("_bx")}><div${_attr_class("_by")}><span${_attr_class(["_bz", "_x"])}>${_escape(row.worktree)}${_el_resume($scope1_id, "d")}/</span><span${_attr_class("_bA")}><a${_attr_class(["_bB", "_dq"])}${_attr("href", repoWebUrl$1(row.full_name))} target=_blank rel=noopener${_attr("title", `Open ${row.full_name} on GitHub`)}>${_escape(repoLabel(row.full_name))}${_el_resume($scope1_id, "g")}</a>${_el_resume($scope1_id, "f")}`);
|
|
6686
6873
|
_if(() => {
|
|
6687
6874
|
if (row.base_branch !== row.default_branch) {
|
|
6688
6875
|
const $scope12_id = _scope_id();
|
|
6689
|
-
_html(`<span${_attr_class(["
|
|
6876
|
+
_html(`<span${_attr_class(["_I", "_x"])} title="Base branch">⎇ <!>${_escape(row.base_branch)}${_el_resume($scope12_id, "b")}</span>`);
|
|
6690
6877
|
writeScope($scope12_id, {});
|
|
6691
6878
|
return 0;
|
|
6692
6879
|
}
|
|
@@ -6695,16 +6882,16 @@ var manage_workspace_default = _template("n", (input) => {
|
|
|
6695
6882
|
_if(() => {
|
|
6696
6883
|
if (busy.has(row.full_name)) {
|
|
6697
6884
|
const $scope13_id = _scope_id();
|
|
6698
|
-
_html(`<span${_attr_class("
|
|
6885
|
+
_html(`<span${_attr_class("_F")}></span>`);
|
|
6699
6886
|
writeScope($scope13_id, {});
|
|
6700
6887
|
return 0;
|
|
6701
6888
|
} else {
|
|
6702
6889
|
const $scope6_id = _scope_id();
|
|
6703
6890
|
_html(`<button${_attr_class([
|
|
6704
6891
|
"_bC",
|
|
6705
|
-
"
|
|
6706
|
-
"
|
|
6707
|
-
{ ["
|
|
6892
|
+
"_2",
|
|
6893
|
+
"_3",
|
|
6894
|
+
{ ["_q"]: confirmingRemove === row.full_name }
|
|
6708
6895
|
])}${confirmingRemove === row.full_name ? _attr("title", `Remove ${row.worktree}/? Uncommitted changes are lost.`) : _attr("title", `Remove ${row.worktree}/`)}>`);
|
|
6709
6896
|
_if(() => {
|
|
6710
6897
|
if (confirmingRemove === row.full_name) {
|
|
@@ -6734,7 +6921,7 @@ var manage_workspace_default = _template("n", (input) => {
|
|
|
6734
6921
|
}, "full_name", $scope0_id, "p", 1, 1, 1, 0, 1);
|
|
6735
6922
|
_for_of([...busy].filter((n) => !inWorkspace.has(n)), (name) => {
|
|
6736
6923
|
const $scope16_id = _scope_id();
|
|
6737
|
-
_html(`<li${_attr_class(["_bx", "_bw"])}><span${_attr_class("
|
|
6924
|
+
_html(`<li${_attr_class(["_bx", "_bw"])}><span${_attr_class("_F")}></span><div${_attr_class("_by")}><span${_attr_class("_bB")}>Adding <!>${_escape(name)}${_el_resume($scope16_id, "e")}…</span></div></li>`);
|
|
6738
6925
|
writeScope($scope16_id, {});
|
|
6739
6926
|
}, (n) => n, $scope0_id, "q", 1, 1, 1, 0, 1);
|
|
6740
6927
|
_html("</ul>");
|
|
@@ -6746,12 +6933,12 @@ var manage_workspace_default = _template("n", (input) => {
|
|
|
6746
6933
|
return 0;
|
|
6747
6934
|
}
|
|
6748
6935
|
}, $scope0_id, "r", 1, 1, 1, 0, 1);
|
|
6749
|
-
_html(`<div${_attr_class("
|
|
6936
|
+
_html(`<div${_attr_class("_dp")}>`);
|
|
6750
6937
|
const $childScope3 = _peek_scope_id();
|
|
6751
6938
|
let refreshCatalog = repo_picker_default({
|
|
6752
6939
|
exclude: inWorkspace,
|
|
6753
|
-
onPick: _resume(function(name, baseBranch) {
|
|
6754
|
-
addRepo(name, baseBranch);
|
|
6940
|
+
onPick: _resume(function(name, baseBranch, fork) {
|
|
6941
|
+
addRepo(name, baseBranch, fork);
|
|
6755
6942
|
}, "n8", $scope0_id),
|
|
6756
6943
|
onError: _resume(function(message) {
|
|
6757
6944
|
error = message;
|
|
@@ -6769,14 +6956,14 @@ var manage_workspace_default = _template("n", (input) => {
|
|
|
6769
6956
|
_html(`<section${_attr_class("_bs")}><div${_attr_class("_bt")}><h2${_attr_class("_bH")}>Running</h2><span${_attr_class(sectionCount)}>${_escape(running.length)}${_el_resume($scope9_id, "e")}</span></div><ul${_attr_class("_bv")}>`);
|
|
6770
6957
|
_for_of(running, (p) => {
|
|
6771
6958
|
const $scope10_id = _scope_id();
|
|
6772
|
-
_html(`<li${_attr_class("_bx")}><div${_attr_class("_by")}${_attr("title", p.args)}><span${_attr_class(["_bz", "
|
|
6959
|
+
_html(`<li${_attr_class("_bx")}><div${_attr_class("_by")}${_attr("title", p.args)}><span${_attr_class(["_bz", "_x"])}>${_escape(p.cmd)}${_el_resume($scope10_id, "d")}</span>`);
|
|
6773
6960
|
_if(() => {
|
|
6774
6961
|
if (p.ports.length) {
|
|
6775
6962
|
const $scope18_id = _scope_id();
|
|
6776
6963
|
_html(`<span${_attr_class("_bA")}>`);
|
|
6777
6964
|
_for_of(p.ports, (port) => {
|
|
6778
6965
|
const $scope19_id = _scope_id();
|
|
6779
|
-
_html(`<button${_attr_class(["
|
|
6966
|
+
_html(`<button${_attr_class(["_s", "_dr"])}${_attr("title", `Open http://${typeof location === "undefined" ? "localhost" : location.hostname}:${port}`)}>:<!>${_escape(port)}${_el_resume($scope19_id, "b")}</button>${_el_resume($scope19_id, "a")}`);
|
|
6780
6967
|
_script($scope19_id, "n15");
|
|
6781
6968
|
writeScope($scope19_id, { d: port });
|
|
6782
6969
|
}, (x) => String(x), $scope18_id, "a", 1, 1, 1, "</span>", 1);
|
|
@@ -6784,7 +6971,7 @@ var manage_workspace_default = _template("n", (input) => {
|
|
|
6784
6971
|
return 0;
|
|
6785
6972
|
}
|
|
6786
6973
|
}, $scope10_id, "e", 1, 1, 1, 0, 1);
|
|
6787
|
-
_html(`</div>${_el_resume($scope10_id, "b")}<button${_attr_class(["_bC", "
|
|
6974
|
+
_html(`</div>${_el_resume($scope10_id, "b")}<button${_attr_class(["_bC", "_2"])} type=button${_attr("title", `Kill process ${p.pid}`)}${_attr("aria-label", `Kill process ${p.pid}`)}>`);
|
|
6788
6975
|
icon_xmark_default({ size: 14 });
|
|
6789
6976
|
_html(`</button>${_el_resume($scope10_id, "f")}</li>`);
|
|
6790
6977
|
_script($scope10_id, "n16");
|
|
@@ -6798,7 +6985,7 @@ var manage_workspace_default = _template("n", (input) => {
|
|
|
6798
6985
|
return 0;
|
|
6799
6986
|
}
|
|
6800
6987
|
}, $scope0_id, "v", 1, 1, 1, 0, 1);
|
|
6801
|
-
_html(`<section${_attr_class(["_bs", "
|
|
6988
|
+
_html(`<section${_attr_class(["_bs", "_ds"])}><div${_attr_class("_bt")}><h2${_attr_class("_bH")}>Workspace</h2></div><div${_attr_class("_dt")}>`);
|
|
6802
6989
|
_if(() => {
|
|
6803
6990
|
if (ws.status === "active") {
|
|
6804
6991
|
const $scope4_id = _scope_id();
|
|
@@ -6816,8 +7003,8 @@ var manage_workspace_default = _template("n", (input) => {
|
|
|
6816
7003
|
}, $scope0_id, "a0", 1, 1, 1, 0, 1);
|
|
6817
7004
|
_html(`<button type=button${_attr_class([
|
|
6818
7005
|
btnLg,
|
|
6819
|
-
"
|
|
6820
|
-
{ ["
|
|
7006
|
+
"_r",
|
|
7007
|
+
{ ["_q"]: confirmingDelete }
|
|
6821
7008
|
])}${_attr("disabled", !!pendingAction)}>${pendingAction === "delete" ? "Deleting…" : "Delete"}${_el_resume($scope0_id, "a2")}</button>${_el_resume($scope0_id, "a1")}</div><p${_attr_class(dangerHint)}>Archive hides the workspace from the list. Delete removes it and its worktrees.</p></section></div></div></div>`);
|
|
6822
7009
|
_script($scope0_id, "n19");
|
|
6823
7010
|
_script($scope0_id, "n20");
|
|
@@ -6899,15 +7086,15 @@ var term_find_default = _template("y", (input) => {
|
|
|
6899
7086
|
const canStep = hasQuery && open;
|
|
6900
7087
|
const keybar = input.placement === "keybar";
|
|
6901
7088
|
_html(`<div${_attr_class([
|
|
6902
|
-
"
|
|
6903
|
-
keybar ? "
|
|
6904
|
-
!open && "
|
|
6905
|
-
])} aria-hidden=${open ? "false" : "true"}><div${_attr_class(["
|
|
7089
|
+
"_fy",
|
|
7090
|
+
keybar ? "_fA" : "_fz",
|
|
7091
|
+
!open && "_fC"
|
|
7092
|
+
])} aria-hidden=${open ? "false" : "true"}><div${_attr_class(["_ft", keybar ? "_fB" : "_fv"])}><input${_attr_input_value($scope0_id, "c", query, _resume(function(v) {
|
|
6906
7093
|
if (!open) return;
|
|
6907
7094
|
query = v;
|
|
6908
7095
|
live.query = v;
|
|
6909
7096
|
run(0);
|
|
6910
|
-
}, "y0", $scope0_id))}${_attr_class([findInput, keybar && "
|
|
7097
|
+
}, "y0", $scope0_id))}${_attr_class([findInput, keybar && "_fD"])} 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 && "_fE"])} title="Previous match"${_attr("disabled", !canStep)} tabindex=${open ? "0" : "-1"}>↑</button>${_el_resume($scope0_id, "d")}<button type=button${_attr_class([findIconBtn, keybar && "_fE"])} title="Next match"${_attr("disabled", !canStep)} tabindex=${open ? "0" : "-1"}>↓</button>${_el_resume($scope0_id, "e")}<button type=button${_attr_class([findIconBtn, keybar && "_fE"])} title="Close find" tabindex=${open ? "0" : "-1"}>`);
|
|
6911
7098
|
icon_xmark_default({ size: 14 });
|
|
6912
7099
|
_html(`</button>${_el_resume($scope0_id, "f")}</div>${_el_resume($scope0_id, "b", _serialize_guard($scope0_reason, 2))}</div>${_el_resume($scope0_id, "a")}`);
|
|
6913
7100
|
_script($scope0_id, "y4");
|
|
@@ -7181,7 +7368,7 @@ var term_default = _template("z", (input) => {
|
|
|
7181
7368
|
trapOpen = true;
|
|
7182
7369
|
}
|
|
7183
7370
|
}, "z14", $scope0_id);
|
|
7184
|
-
_html(`<div${_attr("hidden", !onTermPage)}${_attr_class("
|
|
7371
|
+
_html(`<div${_attr("hidden", !onTermPage)}${_attr_class("_dY")}><div${_attr_class("_dZ")}></div>${_el_resume($scope0_id, "b")}`);
|
|
7185
7372
|
_if(() => {
|
|
7186
7373
|
if (findOpen) {
|
|
7187
7374
|
const $scope12_id = _scope_id();
|
|
@@ -7208,7 +7395,7 @@ var term_default = _template("z", (input) => {
|
|
|
7208
7395
|
_if(() => {
|
|
7209
7396
|
if (uploading) {
|
|
7210
7397
|
const $scope19_id = _scope_id();
|
|
7211
|
-
_html(`<div${_attr_class("
|
|
7398
|
+
_html(`<div${_attr_class("_d5")}>uploading…</div>`);
|
|
7212
7399
|
writeScope($scope19_id, {});
|
|
7213
7400
|
return 0;
|
|
7214
7401
|
}
|
|
@@ -7216,7 +7403,7 @@ var term_default = _template("z", (input) => {
|
|
|
7216
7403
|
_if(() => {
|
|
7217
7404
|
if (copiedFlash) {
|
|
7218
7405
|
const $scope20_id = _scope_id();
|
|
7219
|
-
_html(`<div${_attr_class("
|
|
7406
|
+
_html(`<div${_attr_class("_d4")}>Copied</div>`);
|
|
7220
7407
|
writeScope($scope20_id, {});
|
|
7221
7408
|
return 0;
|
|
7222
7409
|
}
|
|
@@ -7225,7 +7412,7 @@ var term_default = _template("z", (input) => {
|
|
|
7225
7412
|
_if(() => {
|
|
7226
7413
|
if (trapOpen) {
|
|
7227
7414
|
const $scope11_id = _scope_id();
|
|
7228
|
-
_html(`<div${_attr_class("
|
|
7415
|
+
_html(`<div${_attr_class("_d6")}><div${_attr_class("_d7")}><p${_attr_class("_eB")}>Long-press the field below and choose Paste</p><input placeholder="Paste here…">${_el_resume($scope11_id, "d")}<button${_attr_class("_o")}>Cancel</button>${_el_resume($scope11_id, "e")}</div>${_el_resume($scope11_id, "b")}</div>${_el_resume($scope11_id, "a")}`);
|
|
7229
7416
|
_script($scope11_id, "z25");
|
|
7230
7417
|
_script($scope11_id, "z26");
|
|
7231
7418
|
writeScope($scope11_id, {});
|
|
@@ -7328,7 +7515,7 @@ var work_view_default = _template("D", (input) => {
|
|
|
7328
7515
|
let DiffView = null;
|
|
7329
7516
|
const loadDiffView = _resume(() => {
|
|
7330
7517
|
if (DiffView) return;
|
|
7331
|
-
import("./
|
|
7518
|
+
import("./_BDBtGsdY.js").then((m) => {
|
|
7332
7519
|
DiffView = m.default;
|
|
7333
7520
|
});
|
|
7334
7521
|
}, "D6", $scope0_id);
|
|
@@ -7514,28 +7701,29 @@ var work_view_default = _template("D", (input) => {
|
|
|
7514
7701
|
toggleDiff();
|
|
7515
7702
|
}
|
|
7516
7703
|
}, "D21", $scope0_id);
|
|
7517
|
-
_html(`<div${_attr_class(["
|
|
7518
|
-
["
|
|
7519
|
-
["
|
|
7520
|
-
}])}><div${_attr_class("
|
|
7704
|
+
_html(`<div${_attr_class(["_b2", {
|
|
7705
|
+
["_b0"]: view === "nav",
|
|
7706
|
+
["_b1"]: !input.active
|
|
7707
|
+
}])}><div${_attr_class("_b3")}>`);
|
|
7521
7708
|
_set_serialize_reason({
|
|
7522
7709
|
0: _serialize_guard($scope0_reason, 0),
|
|
7523
|
-
1:
|
|
7524
|
-
2: _serialize_guard($scope0_reason,
|
|
7525
|
-
3: $
|
|
7526
|
-
4:
|
|
7527
|
-
|
|
7528
|
-
|
|
7529
|
-
9:
|
|
7530
|
-
10: _serialize_guard($scope0_reason,
|
|
7531
|
-
11: _serialize_guard($scope0_reason,
|
|
7532
|
-
12: _serialize_guard($scope0_reason,
|
|
7533
|
-
13:
|
|
7534
|
-
14:
|
|
7535
|
-
15:
|
|
7710
|
+
1: 1,
|
|
7711
|
+
2: _serialize_guard($scope0_reason, 2),
|
|
7712
|
+
3: _serialize_guard($scope0_reason, 3),
|
|
7713
|
+
4: $sg__input_workspace,
|
|
7714
|
+
5: 1,
|
|
7715
|
+
7: 1,
|
|
7716
|
+
9: $sg__input_allWorkspaces,
|
|
7717
|
+
10: _serialize_guard($scope0_reason, 7),
|
|
7718
|
+
11: _serialize_guard($scope0_reason, 12),
|
|
7719
|
+
12: _serialize_guard($scope0_reason, 11),
|
|
7720
|
+
13: _serialize_guard($scope0_reason, 13),
|
|
7721
|
+
14: 1,
|
|
7722
|
+
15: $sg__input_agents,
|
|
7536
7723
|
16: 1,
|
|
7537
7724
|
17: 1,
|
|
7538
|
-
18: 1
|
|
7725
|
+
18: 1,
|
|
7726
|
+
19: 1
|
|
7539
7727
|
});
|
|
7540
7728
|
const $childScope = _peek_scope_id();
|
|
7541
7729
|
side_nav_default({
|
|
@@ -7578,7 +7766,7 @@ var work_view_default = _template("D", (input) => {
|
|
|
7578
7766
|
openDiff(pr);
|
|
7579
7767
|
}, "D29", $scope0_id)
|
|
7580
7768
|
});
|
|
7581
|
-
_html(`</div><div${_attr_class("
|
|
7769
|
+
_html(`</div><div${_attr_class("_b4")}>`);
|
|
7582
7770
|
_if(() => {
|
|
7583
7771
|
if (error) {
|
|
7584
7772
|
const $scope8_id = _scope_id();
|
|
@@ -7601,7 +7789,7 @@ var work_view_default = _template("D", (input) => {
|
|
|
7601
7789
|
_if(() => {
|
|
7602
7790
|
if (diffMounted && DiffView) {
|
|
7603
7791
|
const $scope1_id = _scope_id();
|
|
7604
|
-
_html(`<div${_attr_class(["
|
|
7792
|
+
_html(`<div${_attr_class(["_b5", { ["_b6"]: view === "diff" }])}>`);
|
|
7605
7793
|
_dynamic_tag($scope1_id, "b", DiffView, {
|
|
7606
7794
|
workspaceId: ws.id,
|
|
7607
7795
|
workspaceBranch: ws.branch,
|
|
@@ -7641,7 +7829,7 @@ var work_view_default = _template("D", (input) => {
|
|
|
7641
7829
|
_if(() => {
|
|
7642
7830
|
if (manageMounted) {
|
|
7643
7831
|
const $scope2_id = _scope_id();
|
|
7644
|
-
_html(`<div${_attr_class(["
|
|
7832
|
+
_html(`<div${_attr_class(["_b5", { ["_b6"]: view === "manage" }])}>`);
|
|
7645
7833
|
_set_serialize_reason(_serialize_guard($scope0_reason, 16));
|
|
7646
7834
|
const $childScope2 = _peek_scope_id();
|
|
7647
7835
|
manage_workspace_default({
|
|
@@ -7664,7 +7852,7 @@ var work_view_default = _template("D", (input) => {
|
|
|
7664
7852
|
_if(() => {
|
|
7665
7853
|
if (settingsMounted) {
|
|
7666
7854
|
const $scope3_id = _scope_id();
|
|
7667
|
-
_html(`<div${_attr_class(["
|
|
7855
|
+
_html(`<div${_attr_class(["_b5", { ["_b6"]: view === "settings" }])}>`);
|
|
7668
7856
|
_set_serialize_reason({
|
|
7669
7857
|
0: _serialize_guard($scope0_reason, 1),
|
|
7670
7858
|
1: $sg__input_workspace,
|
|
@@ -7704,7 +7892,7 @@ var work_view_default = _template("D", (input) => {
|
|
|
7704
7892
|
_if(() => {
|
|
7705
7893
|
if (newMounted) {
|
|
7706
7894
|
const $scope4_id = _scope_id();
|
|
7707
|
-
_html(`<div${_attr_class(["
|
|
7895
|
+
_html(`<div${_attr_class(["_b5", { ["_b6"]: view === "new" }])}>`);
|
|
7708
7896
|
_set_serialize_reason({
|
|
7709
7897
|
0: 1,
|
|
7710
7898
|
1: $sg__input_allWorkspaces,
|
|
@@ -7731,13 +7919,13 @@ var work_view_default = _template("D", (input) => {
|
|
|
7731
7919
|
return 0;
|
|
7732
7920
|
}
|
|
7733
7921
|
}, $scope0_id, "i", 1, 1, 1, 0, 1);
|
|
7734
|
-
_html(`<div${_attr_class(["
|
|
7922
|
+
_html(`<div${_attr_class(["_b8", { ["_b7"]: view !== "term" }])}>`);
|
|
7735
7923
|
_if(() => {
|
|
7736
7924
|
if (shownSessions) {
|
|
7737
7925
|
const $scope5_id = _scope_id();
|
|
7738
7926
|
_for_of(shownSessions, (s) => {
|
|
7739
7927
|
const $scope6_id = _scope_id();
|
|
7740
|
-
_html(`<div${_attr_class(["
|
|
7928
|
+
_html(`<div${_attr_class(["_b9", { ["_b_"]: s.id === curTab }])}>`);
|
|
7741
7929
|
_set_serialize_reason({
|
|
7742
7930
|
0: 1,
|
|
7743
7931
|
1: 1,
|
|
@@ -7796,7 +7984,7 @@ var work_view_default = _template("D", (input) => {
|
|
|
7796
7984
|
_if(() => {
|
|
7797
7985
|
if (!shownSessions.length && view === "term") {
|
|
7798
7986
|
const $scope7_id = _scope_id();
|
|
7799
|
-
_html(`<div${_attr_class("_bE")}><span>No sessions in this workspace.</span><button${_attr_class(["
|
|
7987
|
+
_html(`<div${_attr_class("_bE")}><span>No sessions in this workspace.</span><button${_attr_class(["_o", "_p"])}${_attr("disabled", spawning)}>${spawning ? "Starting…" : `Start ${_escape(`${input.preferred || "shell"}`)}`}${_el_resume($scope7_id, "c")}</button>${_el_resume($scope7_id, "b")}</div>`);
|
|
7800
7988
|
_script($scope7_id, "D49");
|
|
7801
7989
|
_subscribe($spawning__closures, _subscribe($si__input_preferred && $input_preferred__closures, writeScope($scope7_id, {})));
|
|
7802
7990
|
return 0;
|
|
@@ -8029,7 +8217,7 @@ var app_shell_default = _template("c", (input) => {
|
|
|
8029
8217
|
if (!openIds.includes(id)) openIds = openIds.concat(id);
|
|
8030
8218
|
prefs.setLastWorkspace(id);
|
|
8031
8219
|
}, "c4", $scope0_id);
|
|
8032
|
-
_html(`<div${_attr_class("
|
|
8220
|
+
_html(`<div${_attr_class("_d")}>`);
|
|
8033
8221
|
_if(() => {
|
|
8034
8222
|
if (error) {
|
|
8035
8223
|
const $scope5_id = _scope_id();
|
|
@@ -8052,7 +8240,7 @@ var app_shell_default = _template("c", (input) => {
|
|
|
8052
8240
|
_if(() => {
|
|
8053
8241
|
if (!selectedId && showSetup) {
|
|
8054
8242
|
const $scope4_id = _scope_id();
|
|
8055
|
-
_html(`<div${_attr_class("
|
|
8243
|
+
_html(`<div${_attr_class("_h")}>`);
|
|
8056
8244
|
_set_serialize_reason(106);
|
|
8057
8245
|
const $childScope = _peek_scope_id();
|
|
8058
8246
|
settings_page_default({
|
|
@@ -8086,7 +8274,7 @@ var app_shell_default = _template("c", (input) => {
|
|
|
8086
8274
|
};
|
|
8087
8275
|
}, "c9", $scope4_id)
|
|
8088
8276
|
});
|
|
8089
|
-
_html(`<div${_attr_class("
|
|
8277
|
+
_html(`<div${_attr_class("_i")}><button type=button${_attr_class("_o")}>Later, go to workspaces</button>${_el_resume($scope4_id, "d")}</div></div>`);
|
|
8090
8278
|
_script($scope4_id, "c24");
|
|
8091
8279
|
writeScope($scope4_id, { b: _existing_scope($childScope) });
|
|
8092
8280
|
return 0;
|
|
@@ -8111,14 +8299,14 @@ var app_shell_default = _template("c", (input) => {
|
|
|
8111
8299
|
return 1;
|
|
8112
8300
|
}
|
|
8113
8301
|
}, $scope0_id, "c", 1, 1, 1, 0, 1);
|
|
8114
|
-
_html(`<div${_attr_class(["
|
|
8302
|
+
_html(`<div${_attr_class(["_e", { ["_f"]: !selectedId }])}>`);
|
|
8115
8303
|
_for_of(openIds, (id) => {
|
|
8116
8304
|
const $scope1_id = _scope_id();
|
|
8117
8305
|
const ws = workspaces.find((w) => w.id === id);
|
|
8118
8306
|
_if(() => {
|
|
8119
8307
|
if (ws) {
|
|
8120
8308
|
const $scope2_id = _scope_id();
|
|
8121
|
-
_html(`<div${_attr_class("
|
|
8309
|
+
_html(`<div${_attr_class("_g")}>`);
|
|
8122
8310
|
_set_serialize_reason(1);
|
|
8123
8311
|
const $childScope3 = _peek_scope_id();
|
|
8124
8312
|
work_view_default({
|
|
@@ -10026,7 +10214,8 @@ var CreateWorkspace = /* @__PURE__ */ object({
|
|
|
10026
10214
|
name: /* @__PURE__ */ pipe(/* @__PURE__ */ string(), /* @__PURE__ */ trim(), /* @__PURE__ */ minLength(1)),
|
|
10027
10215
|
repos: /* @__PURE__ */ array(/* @__PURE__ */ object({
|
|
10028
10216
|
fullName: /* @__PURE__ */ pipe(/* @__PURE__ */ string(), /* @__PURE__ */ regex(/^(?:[\w.-]+\/)?[\w.-]+\/[\w.-]+$/)),
|
|
10029
|
-
baseBranch: /* @__PURE__ */ optional(/* @__PURE__ */ string())
|
|
10217
|
+
baseBranch: /* @__PURE__ */ optional(/* @__PURE__ */ string()),
|
|
10218
|
+
fork: /* @__PURE__ */ optional(/* @__PURE__ */ boolean())
|
|
10030
10219
|
})),
|
|
10031
10220
|
opId: /* @__PURE__ */ optional(/* @__PURE__ */ pipe(/* @__PURE__ */ string(), /* @__PURE__ */ maxLength(40)))
|
|
10032
10221
|
});
|
|
@@ -10687,13 +10876,14 @@ function post34(context) {
|
|
|
10687
10876
|
//#region src/routes/api/workspaces/$id/repos/+handler.ts
|
|
10688
10877
|
var AddRepo = /* @__PURE__ */ object({
|
|
10689
10878
|
fullName: /* @__PURE__ */ pipe(/* @__PURE__ */ string(), /* @__PURE__ */ regex(/^(?:[\w.-]+\/)?[\w.-]+\/[\w.-]+$/)),
|
|
10690
|
-
baseBranch: /* @__PURE__ */ optional(/* @__PURE__ */ string())
|
|
10879
|
+
baseBranch: /* @__PURE__ */ optional(/* @__PURE__ */ string()),
|
|
10880
|
+
fork: /* @__PURE__ */ optional(/* @__PURE__ */ boolean())
|
|
10691
10881
|
});
|
|
10692
10882
|
//#endregion
|
|
10693
10883
|
//#region __marko-run__api.workspaces.$.repos.js
|
|
10694
10884
|
var postHandler$2 = normalizeHandler(Run.POST({ json: AddRepo }, async (ctx) => {
|
|
10695
10885
|
const body = await readBody(ctx);
|
|
10696
|
-
return Response.json(await withProgressOp(ctx.params.id, () => addRepo$1(ctx.params.id, body.fullName, body.baseBranch)));
|
|
10886
|
+
return Response.json(await withProgressOp(ctx.params.id, () => addRepo$1(ctx.params.id, body.fullName, body.baseBranch, body.fork)));
|
|
10697
10887
|
}), "POST");
|
|
10698
10888
|
var post35_options = mergeOptions(mware11, mware36, postHandler$2);
|
|
10699
10889
|
function post35(context) {
|
|
@@ -15692,4 +15882,4 @@ server.listen(port, () => {
|
|
|
15692
15882
|
//#endregion
|
|
15693
15883
|
export {};
|
|
15694
15884
|
|
|
15695
|
-
;var __MARKO_MANIFEST__={"
|
|
15885
|
+
;var __MARKO_MANIFEST__={"LH2lXAg":{"block":[2,"stylesheet#/assets/app-page-D2MGNs24.css",6,"<link",0," rel=\"stylesheet\" crossorigin href=\"",1,"assets/app-page-D2MGNs24.css\"",">"],"defer":[2,"/assets/w-BAusPvMv.js",6,"<script",0," async type=\"module\" crossorigin src=\"",1,"assets/w-BAusPvMv.js\"","></script>",2,"modulepreload#/assets/_BW-Z7z3K.js",6,"<link",0," rel=\"modulepreload\" crossorigin href=\"",1,"assets/_BW-Z7z3K.js\"",">"]},"T$MNY0k":{"block":[2,"stylesheet#/assets/app-page-D2MGNs24.css",6,"<link",0," rel=\"stylesheet\" crossorigin href=\"",1,"assets/app-page-D2MGNs24.css\"",">"],"defer":[2,"/assets/w._-BAusPvMv.js",6,"<script",0," async type=\"module\" crossorigin src=\"",1,"assets/w._-BAusPvMv.js\"","></script>",2,"modulepreload#/assets/_BW-Z7z3K.js",6,"<link",0," rel=\"modulepreload\" crossorigin href=\"",1,"assets/_BW-Z7z3K.js\"",">"]},"AA0T2xt":{"block":[2,"stylesheet#/assets/app-page-D2MGNs24.css",6,"<link",0," rel=\"stylesheet\" crossorigin href=\"",1,"assets/app-page-D2MGNs24.css\"",">"],"defer":[2,"/assets/settings-BAusPvMv.js",6,"<script",0," async type=\"module\" crossorigin src=\"",1,"assets/settings-BAusPvMv.js\"","></script>",2,"modulepreload#/assets/_BW-Z7z3K.js",6,"<link",0," rel=\"modulepreload\" crossorigin href=\"",1,"assets/_BW-Z7z3K.js\"",">"]},"ibphXY4":{"block":[2,"stylesheet#/assets/app-page-D2MGNs24.css",6,"<link",0," rel=\"stylesheet\" crossorigin href=\"",1,"assets/app-page-D2MGNs24.css\"",">"],"defer":[2,"/assets/w._-CuEUWcak.js",6,"<script",0," async type=\"module\" crossorigin src=\"",1,"assets/w._-CuEUWcak.js\"","></script>",2,"modulepreload#/assets/_BW-Z7z3K.js",6,"<link",0," rel=\"modulepreload\" crossorigin href=\"",1,"assets/_BW-Z7z3K.js\"",">"]},"ZLT8joi":{"block":[2,"stylesheet#/assets/app-page-D2MGNs24.css",6,"<link",0," rel=\"stylesheet\" crossorigin href=\"",1,"assets/app-page-D2MGNs24.css\"",">"],"defer":[2,"/assets/new-BAusPvMv.js",6,"<script",0," async type=\"module\" crossorigin src=\"",1,"assets/new-BAusPvMv.js\"","></script>",2,"modulepreload#/assets/_BW-Z7z3K.js",6,"<link",0," rel=\"modulepreload\" crossorigin href=\"",1,"assets/_BW-Z7z3K.js\"",">"]}};
|