@dylanpiercey/work 0.0.85 → 0.0.87
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 → _CGQWSq7x.js} +295 -261
- package/dist/{_mv7NEfX0.js → _DA4jJP-k.js} +111 -90
- package/dist/index.mjs +1204 -846
- package/dist/public/assets/{_BjEsAKXh.js → _3pnM3GnR.js} +1 -1
- package/dist/public/assets/_3pnM3GnR.js.br +0 -0
- package/dist/public/assets/{_DK9AAOZp.js → _4-GSVnAN.js} +6 -6
- package/dist/public/assets/_4-GSVnAN.js.br +0 -0
- package/dist/public/assets/{_C-BzebGR.js → _B00t6Lqk.js} +1 -1
- package/dist/public/assets/_B00t6Lqk.js.br +0 -0
- package/dist/public/assets/{_C8oyUxT6.js → _B1bIs2_k.js} +1 -1
- package/dist/public/assets/_B1bIs2_k.js.br +0 -0
- package/dist/public/assets/{_B1Z1hJGn2.js → _B1lW0JwB2.js} +1 -1
- package/dist/public/assets/_B1lW0JwB2.js.br +0 -0
- package/dist/public/assets/{_Dm07KeQi2.js → _B85aTaqZ2.js} +1 -1
- package/dist/public/assets/_B85aTaqZ2.js.br +0 -0
- package/dist/public/assets/{_DwWcfMba.js → _BAvf1cap.js} +1 -1
- package/dist/public/assets/_BAvf1cap.js.br +0 -0
- package/dist/public/assets/{_CgkfHUqc2.js → _BI2Swe_u2.js} +1 -1
- package/dist/public/assets/_BI2Swe_u2.js.br +0 -0
- package/dist/public/assets/{_CwZZbyL7.js → _BJG4qcrP.js} +1 -1
- package/dist/public/assets/_BJG4qcrP.js.br +0 -0
- package/dist/public/assets/{_C1a8yKxf2.js → _BQYp-OlQ2.js} +1 -1
- package/dist/public/assets/_BQYp-OlQ2.js.br +0 -0
- package/dist/public/assets/{_BjVUCdYI.js → _BRMTGLhC.js} +1 -1
- package/dist/public/assets/_BRMTGLhC.js.br +0 -0
- package/dist/public/assets/{_DZY5Isxk.js → _BT-gmkkS.js} +1 -1
- package/dist/public/assets/_BT-gmkkS.js.br +0 -0
- package/dist/public/assets/{_ByxTzbwH2.js → _BWyRK-vd2.js} +1 -1
- package/dist/public/assets/_BWyRK-vd2.js.br +0 -0
- package/dist/public/assets/{_BUXWMqIU.js → _BYYz0lx8.js} +1 -1
- package/dist/public/assets/_BYYz0lx8.js.br +0 -0
- package/dist/public/assets/{_Djp7iq652.js → _B_Mbp4rL2.js} +1 -1
- package/dist/public/assets/{_Bpg_ooRv.js → _BbIL-U7Q.js} +1 -1
- package/dist/public/assets/_BbIL-U7Q.js.br +0 -0
- package/dist/public/assets/{_D_LErC4-.js → _BblIDBxk.js} +1 -1
- package/dist/public/assets/_BblIDBxk.js.br +2 -0
- package/dist/public/assets/{_-WmXU-Ck2.js → _Bc2XBH7E2.js} +1 -1
- package/dist/public/assets/_Bc2XBH7E2.js.br +0 -0
- package/dist/public/assets/{_DDphf7Gv2.js → _Bf3K2pdL2.js} +1 -1
- package/dist/public/assets/_Bf3K2pdL2.js.br +0 -0
- package/dist/public/assets/{_BXsHAtou.js → _BfymrLUh.js} +1 -1
- package/dist/public/assets/_BfymrLUh.js.br +0 -0
- package/dist/public/assets/{_bAY6mkrH.js → _BiIzmSt-.js} +1 -1
- package/dist/public/assets/_BiIzmSt-.js.br +0 -0
- package/dist/public/assets/{_BCV01fYS.js → _BmuJ1O9P.js} +1 -1
- package/dist/public/assets/_BmuJ1O9P.js.br +0 -0
- package/dist/public/assets/{_CtCr-bK2.js → _Bn5bz8Fw.js} +1 -1
- package/dist/public/assets/_Bn5bz8Fw.js.br +0 -0
- package/dist/public/assets/{_DOav6UsU.js → _Bn8crSCH.js} +1 -1
- package/dist/public/assets/_Bn8crSCH.js.br +0 -0
- package/dist/public/assets/{_DbfrRxLt.js → _Bs60UQQp.js} +1 -1
- package/dist/public/assets/_Bs60UQQp.js.br +0 -0
- package/dist/public/assets/{_tng7Ctl52.js → _Bu0d16Gz2.js} +1 -1
- package/dist/public/assets/_Bu0d16Gz2.js.br +0 -0
- package/dist/public/assets/{_C07OAOG6.js → _BuFvVDBW.js} +1 -1
- package/dist/public/assets/_BuFvVDBW.js.br +0 -0
- package/dist/public/assets/{_nz3ixzI3.js → _BuPlYdZf.js} +1 -1
- package/dist/public/assets/_BuPlYdZf.js.br +0 -0
- package/dist/public/assets/{_BD8O2K_O.js → _BuxBV9KZ.js} +1 -1
- package/dist/public/assets/_BuxBV9KZ.js.br +1 -0
- package/dist/public/assets/{_Cv3WsmqQ.js → _BvYVSdj3.js} +1 -1
- package/dist/public/assets/_BvYVSdj3.js.br +0 -0
- package/dist/public/assets/{_DiGtUP0z.js → _BwubERfJ.js} +1 -1
- package/dist/public/assets/_BwubERfJ.js.br +0 -0
- package/dist/public/assets/{_DGyPz6VI2.js → _Bx-akz-g2.js} +1 -1
- package/dist/public/assets/_Bx-akz-g2.js.br +0 -0
- package/dist/public/assets/{_D8FrQTdt.js → _C-6C490f.js} +1 -1
- package/dist/public/assets/_C-6C490f.js.br +0 -0
- package/dist/public/assets/{_DunIU1gI.js → _C1jhh4rH.js} +1 -1
- package/dist/public/assets/_C1jhh4rH.js.br +0 -0
- package/dist/public/assets/{_BvUZ8h-x.js → _C6ldYeFm.js} +1 -1
- package/dist/public/assets/_C6ldYeFm.js.br +0 -0
- package/dist/public/assets/{_DEY6fLoS2.js → _CCBfIvK-2.js} +1 -1
- package/dist/public/assets/_CCBfIvK-2.js.br +0 -0
- package/dist/public/assets/{_BlE98RWB.js → _CE47SDMW.js} +1 -1
- package/dist/public/assets/_CE47SDMW.js.br +0 -0
- package/dist/public/assets/{_BbigvT1q2.js → _CKjR1BXt2.js} +1 -1
- package/dist/public/assets/_CKjR1BXt2.js.br +0 -0
- package/dist/public/assets/{_DUXtjYQn2.js → _CYia-nz02.js} +1 -1
- package/dist/public/assets/_CYia-nz02.js.br +0 -0
- package/dist/public/assets/{_BrNrnCdj.js → _CcrxW0kr.js} +1 -1
- package/dist/public/assets/_CcrxW0kr.js.br +0 -0
- package/dist/public/assets/{_DlNb-fYu.js → _Cf9cdsh0.js} +1 -1
- package/dist/public/assets/_Cf9cdsh0.js.br +0 -0
- package/dist/public/assets/{_BFNm4iX52.js → _Ciq2ywTg2.js} +1 -1
- package/dist/public/assets/_Ciq2ywTg2.js.br +0 -0
- package/dist/public/assets/{_DUko1Sy92.js → _Co8Ezvh22.js} +1 -1
- package/dist/public/assets/_Co8Ezvh22.js.br +0 -0
- package/dist/public/assets/{_8c-uHmeW2.js → _Cqjh6FxH2.js} +1 -1
- package/dist/public/assets/_Cqjh6FxH2.js.br +0 -0
- package/dist/public/assets/{_igERlCUJ2.js → _Csb4KIv-2.js} +1 -1
- package/dist/public/assets/_Csb4KIv-2.js.br +0 -0
- package/dist/public/assets/{_BdsfdexS.js → _CuyaYiRW.js} +1 -1
- package/dist/public/assets/_CuyaYiRW.js.br +0 -0
- package/dist/public/assets/{_CV-6gAkw.js → _CyefKW6N.js} +1 -1
- package/dist/public/assets/_CyefKW6N.js.br +0 -0
- package/dist/public/assets/{_Drj40pVX.js → _CyrJ6uCP.js} +1 -1
- package/dist/public/assets/_CyrJ6uCP.js.br +0 -0
- package/dist/public/assets/{_DSS7F-KT2.js → _CzF3na4k2.js} +1 -1
- package/dist/public/assets/_CzF3na4k2.js.br +0 -0
- package/dist/public/assets/{_BJcu7zuL.js → _D0GH7ugf.js} +1 -1
- package/dist/public/assets/_D0GH7ugf.js.br +0 -0
- package/dist/public/assets/{_DMz1MwaQ.js → _D273_csH.js} +1 -1
- package/dist/public/assets/_D273_csH.js.br +0 -0
- package/dist/public/assets/{_CeI4faG12.js → _D6nGNdbM2.js} +1 -1
- package/dist/public/assets/_D6nGNdbM2.js.br +0 -0
- package/dist/public/assets/{_CUFjqbZE.js → _D8yBV-3W.js} +1 -1
- package/dist/public/assets/_D8yBV-3W.js.br +0 -0
- package/dist/public/assets/{_BiTayVh0.js → _D9FyVasE.js} +1 -1
- package/dist/public/assets/_D9FyVasE.js.br +0 -0
- package/dist/public/assets/{_CeiupuAL2.js → _DBN-ARTK2.js} +1 -1
- package/dist/public/assets/_DBN-ARTK2.js.br +0 -0
- package/dist/public/assets/{_CEV-O2hk.js → _DF7p8NtB.js} +1 -1
- package/dist/public/assets/_DF7p8NtB.js.br +0 -0
- package/dist/public/assets/{_JSFtvHrr2.js → _DGiIMv8G2.js} +1 -1
- package/dist/public/assets/_DGiIMv8G2.js.br +0 -0
- package/dist/public/assets/{_DQDkXhCW.js → _DOyko_7k.js} +1 -1
- package/dist/public/assets/{_D88tqCHV.js → _DRF3Di45.js} +1 -1
- package/dist/public/assets/_DRF3Di45.js.br +0 -0
- package/dist/public/assets/{_Bz5O3Mrq.js → _DX3XTwvW.js} +1 -1
- package/dist/public/assets/_DX3XTwvW.js.br +0 -0
- package/dist/public/assets/{_DDpSvFlC.js → _DYkG4loD.js} +1 -1
- package/dist/public/assets/_DYkG4loD.js.br +0 -0
- package/dist/public/assets/{_-ru5vl7a.js → _DbEL5xWz.js} +1 -1
- package/dist/public/assets/_DbEL5xWz.js.br +0 -0
- package/dist/public/assets/{_tX_6AA9a.js → _Dhm70a8Q.js} +1 -1
- package/dist/public/assets/_Dhm70a8Q.js.br +0 -0
- package/dist/public/assets/{_SR9h4Okl.js → _DjPgs5rw.js} +1 -1
- package/dist/public/assets/_DjPgs5rw.js.br +0 -0
- package/dist/public/assets/{_BvAqq5m6.js → _Dnva3Iwh.js} +1 -1
- package/dist/public/assets/_Dnva3Iwh.js.br +0 -0
- package/dist/public/assets/{_T9z-lYxT.js → _Dt4Da0qD.js} +1 -1
- package/dist/public/assets/_Dt4Da0qD.js.br +0 -0
- package/dist/public/assets/{_Dxxi3lS5.js → _IvxXQmT0.js} +1 -1
- package/dist/public/assets/_IvxXQmT0.js.br +0 -0
- package/dist/public/assets/{_DjQpfByq.js → _JLngONpn.js} +1 -1
- package/dist/public/assets/_JLngONpn.js.br +0 -0
- package/dist/public/assets/{_Cvt5BAln.js → _K7Edgfgc.js} +1 -1
- package/dist/public/assets/_K7Edgfgc.js.br +0 -0
- package/dist/public/assets/{_B21IMSvY.js → _MlgXnVcu.js} +1 -1
- package/dist/public/assets/_MlgXnVcu.js.br +0 -0
- package/dist/public/assets/{_DPz8SQGB2.js → _PKde0FEU2.js} +1 -1
- package/dist/public/assets/_PKde0FEU2.js.br +0 -0
- package/dist/public/assets/{_uI46O0Ad.js → _RjK3rf_Y.js} +1 -1
- package/dist/public/assets/_RjK3rf_Y.js.br +0 -0
- package/dist/public/assets/{_DWhr2Wyd.js → _S4Deki6-.js} +20 -20
- package/dist/public/assets/_S4Deki6-.js.br +0 -0
- package/dist/public/assets/{_Chrp8y2F.js → __CmiW5mo.js} +1 -1
- package/dist/public/assets/__CmiW5mo.js.br +0 -0
- package/dist/public/assets/{_CFvnHEVa2.js → _o1mi4aXB2.js} +1 -1
- package/dist/public/assets/_o1mi4aXB2.js.br +0 -0
- package/dist/public/assets/{_BPLDg25T2.js → _pehMb-MO2.js} +1 -1
- package/dist/public/assets/app-page-DgDTDOHI.css +1 -0
- package/dist/public/assets/app-page-DgDTDOHI.css.br +0 -0
- package/dist/public/assets/diff-view-BXhpA0AC.css +1 -0
- package/dist/public/assets/diff-view-BXhpA0AC.css.br +0 -0
- package/dist/public/assets/new-BH-hZ4d8.js +1 -0
- package/dist/public/assets/settings-BH-hZ4d8.js +1 -0
- package/dist/public/assets/w-BH-hZ4d8.js +1 -0
- package/dist/public/assets/w._-BH-hZ4d8.js +1 -0
- package/dist/public/assets/w._-DxgRF7k8.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 +0 -1
- 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 _dynamic_tag, A as btnLg, At as withPageAssets, B as _attr, C as toast_default, Ct as _subscribe, D as repoLabel, Dt as _try, E as parseRepoUrl, Et as _trailers, F as inputLg, G as _attr_or, I as metaTrunc, J as _attrs, K as _attr_select_value, L as phase, N as iconBtnRow, O as repoWebUrl$1, Ot as _var, P as iconBtnXs, Q as _content_resume, R as tone, S as workspaceTab, St as _set_serialize_reason, T as icon_base_default, Tt as _to_text, U as _attr_input_value, V as _attr_class, W as _attr_option_value, X as _await, Y as _attrs_partial, Z as _content, _t as _scope_with_id, a as rankRepos, at as _flush_head, b as sideNavOpen, bt as _serialize_guard, c as icon_refresh_default, ct as _hoist_read_error, d as sectionCount$1, dt as _if, ft as _peek_scope_id, gt as _scope_reason, ht as _scope_id, it as _existing_scope, j as btnSm, jt as writeScope, k as setPrimaryHost, kt as attrTag, l as iconBtn$2, lt as _html, mt as _resume_branch, n as findInput, nt as _el_resume, o as icon_search_default, ot as _for_of, pt as _resume, q as _attr_style, r as icon_sidebar_default, rt as _escape, s as icon_back_default, st as _hoist, t as findIconBtn, tt as _el_read_error, u as row, ut as _id, v as setTheme, vt as _script, w as icon_xmark_default, wt as _template, x as theme, xt as _serialize_if, y as setWorkspaceTab, yt as _sep, z as $global } from "./_DA4jJP-k.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) {
|
|
@@ -2650,136 +2873,10 @@ async function graphql(query, host = DEFAULT_HOST) {
|
|
|
2650
2873
|
if (res.status === 401 || res.status === 403) forgetToken(host);
|
|
2651
2874
|
throw new Error(`github graphql ${res.status}`);
|
|
2652
2875
|
}
|
|
2653
|
-
const body = await res.json();
|
|
2654
|
-
if (!body?.data) throw new Error(body?.errors?.[0]?.message || "graphql response without data");
|
|
2655
|
-
return body.data;
|
|
2656
|
-
}
|
|
2657
|
-
//#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;
|
|
2876
|
+
const body = await res.json();
|
|
2877
|
+
if (!body?.data) throw new Error(body?.errors?.[0]?.message || "graphql response without data");
|
|
2878
|
+
return body.data;
|
|
2754
2879
|
}
|
|
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
2880
|
//#endregion
|
|
2784
2881
|
//#region src/server/prs.ts
|
|
2785
2882
|
var TTL_MS$2 = 12e4;
|
|
@@ -3260,12 +3357,26 @@ function renderParts(g, parts) {
|
|
|
3260
3357
|
var _layout_default = _template("a", (input) => {
|
|
3261
3358
|
const $scope0_reason = _scope_reason();
|
|
3262
3359
|
const $scope0_id = _scope_id();
|
|
3263
|
-
const
|
|
3360
|
+
const data = $global().data;
|
|
3361
|
+
const inst = data?.instance;
|
|
3264
3362
|
const name = inst?.name || "work";
|
|
3265
3363
|
const accent = inst?.accent || "";
|
|
3364
|
+
const themePref = data?.prefs?.theme;
|
|
3365
|
+
const theme = themePref === "light" || themePref === "dark" ? themePref : "system";
|
|
3266
3366
|
const iconHref = `/api/instance/icon${accent ? `?v=${accent.slice(1)}` : ""}`;
|
|
3267
|
-
_html(`<!doctype html><html lang=en${accent ? _attr_style(`--accent:${accent}`) : ""}><head><meta charset=utf-8><meta name=viewport content="width=device-width, initial-scale=1, viewport-fit=cover, interactive-widget=resizes-content"
|
|
3268
|
-
|
|
3367
|
+
_html(`<!doctype html><html lang=en${theme === "system" ? "" : _attr("data-theme", theme)}${accent ? _attr_style(`--accent:${accent}`) : ""}><head><meta charset=utf-8><meta name=viewport content="width=device-width, initial-scale=1, viewport-fit=cover, interactive-widget=resizes-content">`);
|
|
3368
|
+
if (theme === "light") {
|
|
3369
|
+
_scope_id();
|
|
3370
|
+
_html(`<meta name=theme-color${_attr_or("content", accent, " content=#fafafa")}>`);
|
|
3371
|
+
} else if (theme === "dark") {
|
|
3372
|
+
_scope_id();
|
|
3373
|
+
_html(`<meta name=theme-color${_attr_or("content", accent, " content=#131316")}>`);
|
|
3374
|
+
} else {
|
|
3375
|
+
_scope_id();
|
|
3376
|
+
_html(`<meta name=theme-color media="(prefers-color-scheme: light)"${_attr_or("content", accent, " content=#fafafa")}><meta name=theme-color media="(prefers-color-scheme: dark)"${_attr_or("content", accent, " content=#131316")}>`);
|
|
3377
|
+
}
|
|
3378
|
+
_html(`<link rel=manifest href=/api/instance/manifest crossorigin=use-credentials><link rel=icon${_attr("href", iconHref)} type=image/svg+xml><link rel=apple-touch-icon href=/apple-touch-icon.png><meta name=apple-mobile-web-app-title${_attr("content", name)}><title>${_escape(name)}</title>${_flush_head()}</head><body>`);
|
|
3379
|
+
_dynamic_tag($scope0_id, "f", input.content, {}, 0, 0, _serialize_guard($scope0_reason, 0));
|
|
3269
3380
|
_trailers("</body></html>");
|
|
3270
3381
|
_serialize_if($scope0_reason, 0) && writeScope($scope0_id, {});
|
|
3271
3382
|
}, 1);
|
|
@@ -3297,6 +3408,40 @@ function coalesce(fn) {
|
|
|
3297
3408
|
};
|
|
3298
3409
|
}
|
|
3299
3410
|
//#endregion
|
|
3411
|
+
//#region src/client/theme.ts
|
|
3412
|
+
var LIGHT_CHROME = "#fafafa";
|
|
3413
|
+
var DARK_CHROME = "#131316";
|
|
3414
|
+
/** Force light/dark, or clear to follow the OS. The layout declares
|
|
3415
|
+
* `:root[data-theme=…] { color-scheme: … }`; native `light-dark()` and the
|
|
3416
|
+
* bundler's polyfill both key off that. */
|
|
3417
|
+
function applyTheme(mode) {
|
|
3418
|
+
if (typeof document === "undefined") return;
|
|
3419
|
+
const root = document.documentElement;
|
|
3420
|
+
if (mode === "system") root.removeAttribute("data-theme");
|
|
3421
|
+
else root.setAttribute("data-theme", mode);
|
|
3422
|
+
syncThemeColorMetas(mode, root.style.getPropertyValue("--accent").trim() || "");
|
|
3423
|
+
}
|
|
3424
|
+
/** Rebuild theme-color metas for the current force (or both media queries
|
|
3425
|
+
* when following the system). Accent, when set, still paints the chrome. */
|
|
3426
|
+
function syncThemeColorMetas(mode, accent) {
|
|
3427
|
+
if (typeof document === "undefined") return;
|
|
3428
|
+
const head = document.head;
|
|
3429
|
+
for (const meta of head.querySelectorAll("meta[name=\"theme-color\"]")) meta.remove();
|
|
3430
|
+
const add = (content, media) => {
|
|
3431
|
+
const meta = document.createElement("meta");
|
|
3432
|
+
meta.name = "theme-color";
|
|
3433
|
+
meta.content = content;
|
|
3434
|
+
if (media) meta.media = media;
|
|
3435
|
+
head.append(meta);
|
|
3436
|
+
};
|
|
3437
|
+
if (mode === "light") add(accent || LIGHT_CHROME);
|
|
3438
|
+
else if (mode === "dark") add(accent || DARK_CHROME);
|
|
3439
|
+
else {
|
|
3440
|
+
add(accent || LIGHT_CHROME, "(prefers-color-scheme: light)");
|
|
3441
|
+
add(accent || DARK_CHROME, "(prefers-color-scheme: dark)");
|
|
3442
|
+
}
|
|
3443
|
+
}
|
|
3444
|
+
//#endregion
|
|
3300
3445
|
//#region src/client/instance.ts
|
|
3301
3446
|
/** Curated hues (mirrors server/instance.ts ACCENT_PRESETS; the browser
|
|
3302
3447
|
* bundle must not import server code). Any `#rrggbb` is still accepted. */
|
|
@@ -3345,13 +3490,13 @@ function applyInstance(inst) {
|
|
|
3345
3490
|
document.title = inst.name || "work";
|
|
3346
3491
|
const icon = document.querySelector("link[rel=\"icon\"]");
|
|
3347
3492
|
if (icon) icon.href = `/api/instance/icon${inst.accent ? `?v=${inst.accent.slice(1)}` : ""}`;
|
|
3348
|
-
|
|
3493
|
+
syncThemeColorMetas(theme(), inst.accent || "");
|
|
3349
3494
|
}
|
|
3350
3495
|
//#endregion
|
|
3351
3496
|
//#region src/tags/settings-page.css.ts
|
|
3352
|
-
var content$2 = "
|
|
3353
|
-
var agentGrid = "
|
|
3354
|
-
var toolGrid = "
|
|
3497
|
+
var content$2 = "_ca _bk _bl";
|
|
3498
|
+
var agentGrid = "_ce _bv";
|
|
3499
|
+
var toolGrid = "_co _bv";
|
|
3355
3500
|
//#endregion
|
|
3356
3501
|
//#region src/tags/page-head.marko
|
|
3357
3502
|
var page_head_default = _template("q", (input) => {
|
|
@@ -3361,14 +3506,14 @@ var page_head_default = _template("q", (input) => {
|
|
|
3361
3506
|
_if(() => {
|
|
3362
3507
|
if (input.backHref) {
|
|
3363
3508
|
const $scope1_id = _scope_id();
|
|
3364
|
-
_html(`<a${_attr("href", input.backHref)}${_attr_class([iconBtnRow, "
|
|
3509
|
+
_html(`<a${_attr("href", input.backHref)}${_attr_class([iconBtnRow, "_cP"])}${_attr_or("title", input.backTitle, " title=\"Back (Esc)\"")}${_attr_or("aria-label", input.backTitle, " aria-label=Back")}>`);
|
|
3365
3510
|
icon_back_default({ size: 16 });
|
|
3366
3511
|
_html(`</a>${_el_resume($scope1_id, "a", _serialize_guard($scope0_reason, 0))}`);
|
|
3367
3512
|
_serialize_if($scope0_reason, 2) && writeScope($scope1_id, { _: _serialize_if($scope0_reason, 0) && _scope_with_id($scope0_id) });
|
|
3368
3513
|
return 0;
|
|
3369
3514
|
} else if (input.onBack) {
|
|
3370
3515
|
const $scope2_id = _scope_id();
|
|
3371
|
-
_html(`<button${_attr_class([iconBtnRow, "
|
|
3516
|
+
_html(`<button${_attr_class([iconBtnRow, "_cP"])}${_attr_or("title", input.backTitle, " title=\"Back (Esc)\"")}${_attr_or("aria-label", input.backTitle, " aria-label=Back")}>`);
|
|
3372
3517
|
icon_back_default({ size: 16 });
|
|
3373
3518
|
_html(`</button>${_el_resume($scope2_id, "a")}`);
|
|
3374
3519
|
_script($scope2_id, "q0");
|
|
@@ -3419,7 +3564,7 @@ var icon_agent_default = _template("E", (input) => {
|
|
|
3419
3564
|
_if(() => {
|
|
3420
3565
|
if (d) {
|
|
3421
3566
|
const $scope1_id = _scope_id();
|
|
3422
|
-
_html(`<svg${_attr_class(["
|
|
3567
|
+
_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
3568
|
_if(() => {
|
|
3424
3569
|
if (badge) {
|
|
3425
3570
|
const $scope3_id = _scope_id();
|
|
@@ -3459,7 +3604,7 @@ var icon_agent_default = _template("E", (input) => {
|
|
|
3459
3604
|
n: $badge__closures
|
|
3460
3605
|
});
|
|
3461
3606
|
});
|
|
3462
|
-
var usageNote = "
|
|
3607
|
+
var usageNote = "_da _S";
|
|
3463
3608
|
//#endregion
|
|
3464
3609
|
//#region src/tags/usage-meters.marko
|
|
3465
3610
|
function duration(ms) {
|
|
@@ -3483,11 +3628,11 @@ var usage_meters_default = _template("B", (input) => {
|
|
|
3483
3628
|
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
3629
|
const $scope0_id = _scope_id();
|
|
3485
3630
|
const agent = input.agent;
|
|
3486
|
-
_html(`<div${_attr_class(["
|
|
3631
|
+
_html(`<div${_attr_class(["_c5", { ["_c6"]: input.hideName }])}><div${_attr_class("_c7")}>`);
|
|
3487
3632
|
_if(() => {
|
|
3488
3633
|
if (!input.hideName) {
|
|
3489
3634
|
const $scope1_id = _scope_id();
|
|
3490
|
-
_html(`<strong${_attr_class("
|
|
3635
|
+
_html(`<strong${_attr_class("_dp")}>${_escape(agent.agent)}${_el_resume($scope1_id, "b", $sg__input_agent)}</strong>`);
|
|
3491
3636
|
$si__input_agent__OR__input_hideName && writeScope($scope1_id, { _: $si__input_agent && _scope_with_id($scope0_id) });
|
|
3492
3637
|
return 0;
|
|
3493
3638
|
}
|
|
@@ -3495,7 +3640,7 @@ var usage_meters_default = _template("B", (input) => {
|
|
|
3495
3640
|
_if(() => {
|
|
3496
3641
|
if (agent.plan && agent.plan.toLowerCase() !== agent.agent.toLowerCase()) {
|
|
3497
3642
|
const $scope2_id = _scope_id();
|
|
3498
|
-
_html(`<span${_attr_class("
|
|
3643
|
+
_html(`<span${_attr_class("_c8")}>${_escape(agent.plan.replace(/^default_/, "").replaceAll("_", " "))}${_el_resume($scope2_id, "b", $sg__input_agent)}</span>`);
|
|
3499
3644
|
$si__input_agent && writeScope($scope2_id, { _: _scope_with_id($scope0_id) });
|
|
3500
3645
|
return 0;
|
|
3501
3646
|
}
|
|
@@ -3503,19 +3648,19 @@ var usage_meters_default = _template("B", (input) => {
|
|
|
3503
3648
|
_if(() => {
|
|
3504
3649
|
if (agent.stale_seconds != null) {
|
|
3505
3650
|
const $scope3_id = _scope_id();
|
|
3506
|
-
_html(`<span${_attr_class("
|
|
3651
|
+
_html(`<span${_attr_class("_c9")}${_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
3652
|
$si__input_agent && writeScope($scope3_id, { _: _scope_with_id($scope0_id) });
|
|
3508
3653
|
return 0;
|
|
3509
3654
|
}
|
|
3510
3655
|
}, $scope0_id, "e", $sg__input_agent, $sg__input_agent, $sg__input_agent__OR__input_hideName, 0, 1);
|
|
3511
|
-
_html(`</div><div${_attr_class(["
|
|
3656
|
+
_html(`</div><div${_attr_class(["_c_", { ["_dq"]: agent.stale_seconds != null }])}>`);
|
|
3512
3657
|
_for_of(agent.windows || [], (win) => {
|
|
3513
3658
|
const $scope4_id = _scope_id();
|
|
3514
3659
|
const pct = pctText$1(win.used_percent);
|
|
3515
3660
|
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("
|
|
3661
|
+
const fillClass = win.used_percent >= 90 ? "_di" : win.used_percent >= 70 ? "_dh" : win.used_percent >= 40 ? "_dg" : "_df";
|
|
3662
|
+
const pctClass = win.used_percent >= 90 ? "_dn" : win.used_percent >= 70 ? "_dm" : win.used_percent >= 40 ? "_dl" : "_dk";
|
|
3663
|
+
_html(`<div${_attr_class("_db")}${_attr("title", `${win.window}: ${pct} used${win.resets_at ? `, resets ${new Date(win.resets_at).toLocaleString()}` : ""}`)}><span${_attr_class("_dc")}>${_escape(win.window)}${_el_resume($scope4_id, "c", $sg__input_agent)}</span><span${_attr_class("_dd")}><span${_attr_class(["_de", 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(["_dj", pctClass])}>${_escape(pct)}${_el_resume($scope4_id, "g", $sg__input_agent)}</span>${_el_resume($scope4_id, "f", $sg__input_agent)}<span${_attr_class("_do")}>${label ? `↻ ${_escape(`${_to_text(label)}`)}` : ""}${_el_resume($scope4_id, "i", $sg__input_agent)}</span></div>${_el_resume($scope4_id, "a", $sg__input_agent)}`);
|
|
3519
3664
|
$si__input_agent && writeScope($scope4_id, { _: _scope_with_id($scope0_id) });
|
|
3520
3665
|
}, "window", $scope0_id, "g", $sg__input_agent, $sg__input_agent, $sg__input_agent, 0, 1);
|
|
3521
3666
|
_if(() => {
|
|
@@ -3574,7 +3719,7 @@ var modal_view_default = _template("o", (input) => {
|
|
|
3574
3719
|
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
3720
|
const dismissable = input.dismissable !== false;
|
|
3576
3721
|
let open = input.open;
|
|
3577
|
-
_html(`<dialog${_attr_class(["
|
|
3722
|
+
_html(`<dialog${_attr_class(["_e8", inputClass])}${_attr("aria-labelledby", inputLabelledBy)}${inputLabelledBy ? _attr("aria-label", inputAriaLabel) : _attr("aria-label", inputAriaLabel || label)} closedby=${dismissable ? "any" : "none"}${_attrs_partial({
|
|
3578
3723
|
...htmlInput,
|
|
3579
3724
|
open: null
|
|
3580
3725
|
}, {
|
|
@@ -3584,22 +3729,22 @@ var modal_view_default = _template("o", (input) => {
|
|
|
3584
3729
|
closedby: 1,
|
|
3585
3730
|
"on-cancel": 1,
|
|
3586
3731
|
"on-close": 1
|
|
3587
|
-
}, "a", $scope0_id, "dialog")}><div${_attr_class("
|
|
3732
|
+
}, "a", $scope0_id, "dialog")}><div${_attr_class("_e9")}>`);
|
|
3588
3733
|
_dynamic_tag($scope0_id, "c", content, {}, 0, 0, _serialize_guard($scope0_reason, 6));
|
|
3589
3734
|
_html("</div>");
|
|
3590
3735
|
_if(() => {
|
|
3591
3736
|
if (footer) {
|
|
3592
3737
|
const $scope1_id = _scope_id();
|
|
3593
|
-
_html(`<form method=dialog${_attr_class("
|
|
3738
|
+
_html(`<form method=dialog${_attr_class("_e_")}>`);
|
|
3594
3739
|
_dynamic_tag($scope1_id, "b", footer.content, {}, 0, 0, _serialize_guard($scope0_reason, 7));
|
|
3595
3740
|
_html("</form>");
|
|
3596
3741
|
$si__input_openChange__OR__input_footer && writeScope($scope1_id, { _: _serialize_if($scope0_reason, 7) && _scope_with_id($scope0_id) });
|
|
3597
3742
|
return 0;
|
|
3598
3743
|
} else if (input.openChange) {
|
|
3599
3744
|
const $scope2_id = _scope_id();
|
|
3600
|
-
_html(`<form method=dialog${_attr_class("
|
|
3745
|
+
_html(`<form method=dialog${_attr_class("_e_")}>`);
|
|
3601
3746
|
dialog_close_default({
|
|
3602
|
-
class: ["
|
|
3747
|
+
class: ["_o", "_p"],
|
|
3603
3748
|
content: _content("o0", () => {
|
|
3604
3749
|
_scope_reason();
|
|
3605
3750
|
_scope_id();
|
|
@@ -3656,16 +3801,16 @@ var prompt_dialog_default = _template("r", (input) => {
|
|
|
3656
3801
|
const $childScope = _peek_scope_id();
|
|
3657
3802
|
modal_view_default({
|
|
3658
3803
|
label: input.label,
|
|
3659
|
-
class: "
|
|
3804
|
+
class: "_dr",
|
|
3660
3805
|
open: input.open,
|
|
3661
3806
|
openChange: input.openChange,
|
|
3662
3807
|
"aria-labelledby": titleId,
|
|
3663
3808
|
footer: attrTag({ content: _content_resume("r5", () => {
|
|
3664
3809
|
_scope_reason();
|
|
3665
3810
|
const $scope1_id = _scope_id();
|
|
3666
|
-
_html(`<button type=button${_attr_class(["
|
|
3811
|
+
_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
3812
|
dialog_close_default({
|
|
3668
|
-
class: "
|
|
3813
|
+
class: "_o",
|
|
3669
3814
|
content: _content("r2", () => {
|
|
3670
3815
|
_scope_reason();
|
|
3671
3816
|
_scope_id();
|
|
@@ -3679,7 +3824,7 @@ var prompt_dialog_default = _template("r", (input) => {
|
|
|
3679
3824
|
content: _content("r6", () => {
|
|
3680
3825
|
_scope_reason();
|
|
3681
3826
|
const $scope2_id = _scope_id();
|
|
3682
|
-
_html(`<h2${_attr_class("
|
|
3827
|
+
_html(`<h2${_attr_class("_ds")}${_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
3828
|
value = _new_value;
|
|
3684
3829
|
}, "r0", $scope2_id))}${_attr("placeholder", input.placeholder)}>${_el_resume($scope2_id, "c")}`);
|
|
3685
3830
|
_script($scope2_id, "r4");
|
|
@@ -3726,13 +3871,13 @@ var settings_page_default = _template("u", (input) => {
|
|
|
3726
3871
|
const $setup2__closures = /* @__PURE__ */ new Set();
|
|
3727
3872
|
const $refreshing__closures = /* @__PURE__ */ new Set();
|
|
3728
3873
|
const $error__closures = /* @__PURE__ */ new Set();
|
|
3874
|
+
const $self_latest__closures = /* @__PURE__ */ new Set();
|
|
3875
|
+
const $self_version__closures = /* @__PURE__ */ new Set();
|
|
3729
3876
|
const $active__closures = /* @__PURE__ */ new Set();
|
|
3730
3877
|
const $input_preferred__closures = /* @__PURE__ */ new Set();
|
|
3731
3878
|
const $accountsFor2__closures = /* @__PURE__ */ new Set();
|
|
3732
3879
|
const $authCodes__closures = /* @__PURE__ */ new Set();
|
|
3733
3880
|
const $confirmingRemove__closures = /* @__PURE__ */ new Set();
|
|
3734
|
-
const $self_latest__closures = /* @__PURE__ */ new Set();
|
|
3735
|
-
const $self_version__closures = /* @__PURE__ */ new Set();
|
|
3736
3881
|
const $self_install__closures = /* @__PURE__ */ new Set();
|
|
3737
3882
|
const $hits__closures = /* @__PURE__ */ new Set();
|
|
3738
3883
|
const $query__closures = /* @__PURE__ */ new Set();
|
|
@@ -3751,35 +3896,42 @@ var settings_page_default = _template("u", (input) => {
|
|
|
3751
3896
|
let hits = null;
|
|
3752
3897
|
let self = null;
|
|
3753
3898
|
let selfUpdating = false;
|
|
3899
|
+
let themeMode = theme();
|
|
3754
3900
|
let searching = false;
|
|
3755
3901
|
const searchTimer = { id: 0 };
|
|
3902
|
+
const setThemeMode = _resume((mode) => {
|
|
3903
|
+
themeMode = mode;
|
|
3904
|
+
setTheme(mode);
|
|
3905
|
+
applyTheme(mode);
|
|
3906
|
+
}, "u5", $scope0_id);
|
|
3907
|
+
const selfUpdatePending = !!(self && !selfUpdating && self.install !== "source" && self.latest && self.latest !== self.version);
|
|
3756
3908
|
const applySetup = _resume((s) => {
|
|
3757
3909
|
setup = s;
|
|
3758
3910
|
lastSetup = s;
|
|
3759
3911
|
setPrimaryHost(s.github);
|
|
3760
3912
|
input.setupChange?.(s);
|
|
3761
|
-
}, "
|
|
3913
|
+
}, "u6", $scope0_id);
|
|
3762
3914
|
const syncAgents = _resume(async () => {
|
|
3763
3915
|
try {
|
|
3764
3916
|
const snap = await api$6("/api/settings");
|
|
3765
3917
|
input.agentsChange?.(snap.agents);
|
|
3766
3918
|
if (snap.preferredAgent !== input.preferred) input.preferredChange?.(snap.preferredAgent);
|
|
3767
3919
|
} catch {}
|
|
3768
|
-
}, "
|
|
3920
|
+
}, "u7", $scope0_id);
|
|
3769
3921
|
const loadSetup = _resume(async (refresh) => {
|
|
3770
3922
|
try {
|
|
3771
3923
|
applySetup(await api$6(`/api/setup${refresh ? "?refresh" : ""}`));
|
|
3772
3924
|
} catch (err) {
|
|
3773
3925
|
error = String(err.message || err);
|
|
3774
3926
|
}
|
|
3775
|
-
}, "
|
|
3927
|
+
}, "u8", $scope0_id);
|
|
3776
3928
|
const loadSelf = _resume(async (refresh) => {
|
|
3777
3929
|
try {
|
|
3778
3930
|
const info = await api$6(`/api/setup/self${refresh ? "?refresh" : ""}`);
|
|
3779
3931
|
self = info;
|
|
3780
3932
|
if (info.updating) selfUpdating = true;
|
|
3781
3933
|
} catch {}
|
|
3782
|
-
}, "
|
|
3934
|
+
}, "u9", $scope0_id);
|
|
3783
3935
|
const updateSelf = _resume(async () => {
|
|
3784
3936
|
if (!self || selfUpdating) return;
|
|
3785
3937
|
selfUpdating = true;
|
|
@@ -3803,7 +3955,7 @@ var settings_page_default = _template("u", (input) => {
|
|
|
3803
3955
|
else selfUpdating = false;
|
|
3804
3956
|
};
|
|
3805
3957
|
setTimeout(tick, 4e3);
|
|
3806
|
-
}, "
|
|
3958
|
+
}, "u10", $scope0_id);
|
|
3807
3959
|
const loadUsage = _resume(async (refresh) => {
|
|
3808
3960
|
try {
|
|
3809
3961
|
usage = await api$6(`/api/usage${refresh ? "?refresh" : ""}`);
|
|
@@ -3811,23 +3963,23 @@ var settings_page_default = _template("u", (input) => {
|
|
|
3811
3963
|
usage = { error: String(err.message || err) };
|
|
3812
3964
|
}
|
|
3813
3965
|
lastUsage = usage;
|
|
3814
|
-
}, "
|
|
3966
|
+
}, "u11", $scope0_id);
|
|
3815
3967
|
const refresh = _resume(async () => {
|
|
3816
3968
|
refreshing = true;
|
|
3817
3969
|
await Promise.all([loadSetup(true), loadSelf(true)]);
|
|
3818
3970
|
refreshing = false;
|
|
3819
|
-
}, "
|
|
3971
|
+
}, "u12", $scope0_id);
|
|
3820
3972
|
const refreshUsage = _resume(async () => {
|
|
3821
3973
|
usageRefreshing = true;
|
|
3822
3974
|
await loadUsage(true);
|
|
3823
3975
|
usageRefreshing = false;
|
|
3824
|
-
}, "
|
|
3976
|
+
}, "u13", $scope0_id);
|
|
3825
3977
|
const setActive = _resume((id, line) => {
|
|
3826
3978
|
const next = new Map(active);
|
|
3827
3979
|
if (line === null) next.delete(id);
|
|
3828
3980
|
else next.set(id, line);
|
|
3829
3981
|
active = next;
|
|
3830
|
-
}, "
|
|
3982
|
+
}, "u14", $scope0_id);
|
|
3831
3983
|
const run = _resume(async (id, action, version) => {
|
|
3832
3984
|
if (active.has(id)) return;
|
|
3833
3985
|
error = null;
|
|
@@ -3858,7 +4010,7 @@ var settings_page_default = _template("u", (input) => {
|
|
|
3858
4010
|
watcher.stop();
|
|
3859
4011
|
setActive(id, null);
|
|
3860
4012
|
}
|
|
3861
|
-
}, "
|
|
4013
|
+
}, "u15", $scope0_id);
|
|
3862
4014
|
const changeHost = _resume(async (host, remove) => {
|
|
3863
4015
|
hostBusy = true;
|
|
3864
4016
|
error = null;
|
|
@@ -3877,10 +4029,10 @@ var settings_page_default = _template("u", (input) => {
|
|
|
3877
4029
|
} finally {
|
|
3878
4030
|
hostBusy = false;
|
|
3879
4031
|
}
|
|
3880
|
-
}, "
|
|
4032
|
+
}, "u16", $scope0_id);
|
|
3881
4033
|
const runEach = _resume(async (ids, action) => {
|
|
3882
4034
|
for (const id of ids) await run(id, action);
|
|
3883
|
-
}, "
|
|
4035
|
+
}, "u17", $scope0_id);
|
|
3884
4036
|
const setPreferred = _resume(async (agent) => {
|
|
3885
4037
|
input.preferredChange?.(agent);
|
|
3886
4038
|
try {
|
|
@@ -3892,7 +4044,7 @@ var settings_page_default = _template("u", (input) => {
|
|
|
3892
4044
|
} catch (err) {
|
|
3893
4045
|
error = String(err.message || err);
|
|
3894
4046
|
}
|
|
3895
|
-
}, "
|
|
4047
|
+
}, "u18", $scope0_id);
|
|
3896
4048
|
const saveTimer = { id: 0 };
|
|
3897
4049
|
const setInstance = _resume((patch) => {
|
|
3898
4050
|
const next = {
|
|
@@ -3917,7 +4069,7 @@ var settings_page_default = _template("u", (input) => {
|
|
|
3917
4069
|
error = String(err.message || err);
|
|
3918
4070
|
}
|
|
3919
4071
|
}, 300);
|
|
3920
|
-
}, "
|
|
4072
|
+
}, "u19", $scope0_id);
|
|
3921
4073
|
const setEnabled = _resume(async (id, on) => {
|
|
3922
4074
|
if (!setup) return;
|
|
3923
4075
|
const off = new Set(setup.agents.flatMap((f) => f.instances.filter((i) => !i.enabled).map((i) => i.id)));
|
|
@@ -3944,7 +4096,7 @@ var settings_page_default = _template("u", (input) => {
|
|
|
3944
4096
|
} catch (err) {
|
|
3945
4097
|
error = String(err.message || err);
|
|
3946
4098
|
}
|
|
3947
|
-
}, "
|
|
4099
|
+
}, "u20", $scope0_id);
|
|
3948
4100
|
const search = _resume((q) => {
|
|
3949
4101
|
query = q;
|
|
3950
4102
|
clearTimeout(searchTimer.id);
|
|
@@ -3965,15 +4117,15 @@ var settings_page_default = _template("u", (input) => {
|
|
|
3965
4117
|
}
|
|
3966
4118
|
}, 250);
|
|
3967
4119
|
}, "u0", $scope0_id);
|
|
3968
|
-
const outdated = _resume((t) => !!(t.installed && t.latest && t.latest !== t.version), "
|
|
4120
|
+
const outdated = _resume((t) => !!(t.installed && t.latest && t.latest !== t.version), "u21");
|
|
3969
4121
|
const tools = setup?.tools || [];
|
|
3970
4122
|
const missingInstallable = tools.filter((t) => t.recommended && !t.installed && t.installable);
|
|
3971
4123
|
const missingCount = tools.filter((t) => t.recommended && !t.installed).length;
|
|
3972
4124
|
const outdatedIds = tools.filter(outdated).map((t) => t.id);
|
|
3973
4125
|
const families = setup?.agents || [];
|
|
3974
4126
|
const instanceIds = new Set(families.flatMap((f) => f.instances.map((i) => i.id)));
|
|
3975
|
-
const accountsFor = _resume((id) => (usage?.agents || []).filter((u) => u.agent === id), "
|
|
3976
|
-
const strayAccountsFor = _resume((f) => (usage?.agents || []).filter((u) => !instanceIds.has(u.agent) && familyOf(u.agent, families) === f.id), "
|
|
4127
|
+
const accountsFor = _resume((id) => (usage?.agents || []).filter((u) => u.agent === id), "u22", $scope0_id);
|
|
4128
|
+
const strayAccountsFor = _resume((f) => (usage?.agents || []).filter((u) => !instanceIds.has(u.agent) && familyOf(u.agent, families) === f.id), "u23", $scope0_id);
|
|
3977
4129
|
const otherUsage = (usage?.agents || []).filter((u) => familyOf(u.agent, families) === null);
|
|
3978
4130
|
const titleId = _id();
|
|
3979
4131
|
const agentsId = _id();
|
|
@@ -3992,24 +4144,24 @@ var settings_page_default = _template("u", (input) => {
|
|
|
3992
4144
|
title: "Settings",
|
|
3993
4145
|
titleId,
|
|
3994
4146
|
backHref: input.backHref,
|
|
3995
|
-
onBack: input.onExit && _resume(() => input.onExit?.(), "
|
|
3996
|
-
meta: attrTag({ content: _content_resume("
|
|
4147
|
+
onBack: input.onExit && _resume(() => input.onExit?.(), "u24", $scope0_id),
|
|
4148
|
+
meta: attrTag({ content: _content_resume("u29", () => {
|
|
3997
4149
|
_scope_reason();
|
|
3998
4150
|
const $scope5_id = _scope_id();
|
|
3999
4151
|
_if(() => {
|
|
4000
4152
|
if (!setup) {
|
|
4001
|
-
const $
|
|
4153
|
+
const $scope50_id = _scope_id();
|
|
4002
4154
|
_html("Checking this machine…");
|
|
4003
|
-
writeScope($
|
|
4155
|
+
writeScope($scope50_id, {});
|
|
4004
4156
|
return 0;
|
|
4005
4157
|
} else if (setup.ready) {
|
|
4006
|
-
const $
|
|
4007
|
-
_html(`<span${_attr_class("
|
|
4008
|
-
writeScope($
|
|
4158
|
+
const $scope51_id = _scope_id();
|
|
4159
|
+
_html(`<span${_attr_class("_cc")}>Ready</span>. Tools, GitHub, and an agent are all in place.`);
|
|
4160
|
+
writeScope($scope51_id, {});
|
|
4009
4161
|
return 1;
|
|
4010
4162
|
} else {
|
|
4011
4163
|
const $scope6_id = _scope_id();
|
|
4012
|
-
_html(`<span${_attr_class("
|
|
4164
|
+
_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
4165
|
_subscribe($setup_missing__closures, writeScope($scope6_id, {}));
|
|
4014
4166
|
return 2;
|
|
4015
4167
|
}
|
|
@@ -4017,7 +4169,7 @@ var settings_page_default = _template("u", (input) => {
|
|
|
4017
4169
|
_subscribe($setup2__closures, writeScope($scope5_id, { _: _scope_with_id($scope0_id) }));
|
|
4018
4170
|
_resume_branch($scope5_id);
|
|
4019
4171
|
}, $scope0_id) }),
|
|
4020
|
-
actions: attrTag({ content: _content_resume("
|
|
4172
|
+
actions: attrTag({ content: _content_resume("u30", () => {
|
|
4021
4173
|
_scope_reason();
|
|
4022
4174
|
const $scope10_id = _scope_id();
|
|
4023
4175
|
_html(`<button${_attr_class(iconBtnRow)} title="Re-check this machine" aria-label="Re-check this machine"${_attr("disabled", refreshing)}>`);
|
|
@@ -4025,10 +4177,10 @@ var settings_page_default = _template("u", (input) => {
|
|
|
4025
4177
|
const $childScope = _peek_scope_id();
|
|
4026
4178
|
icon_refresh_default({
|
|
4027
4179
|
size: 14,
|
|
4028
|
-
class: refreshing && "
|
|
4180
|
+
class: refreshing && "_E"
|
|
4029
4181
|
});
|
|
4030
4182
|
_html(`</button>${_el_resume($scope10_id, "a")}`);
|
|
4031
|
-
_script($scope10_id, "
|
|
4183
|
+
_script($scope10_id, "u28");
|
|
4032
4184
|
_subscribe($refreshing__closures, writeScope($scope10_id, {
|
|
4033
4185
|
_: _scope_with_id($scope0_id),
|
|
4034
4186
|
b: _existing_scope($childScope)
|
|
@@ -4043,8 +4195,8 @@ var settings_page_default = _template("u", (input) => {
|
|
|
4043
4195
|
placement: "inline",
|
|
4044
4196
|
onDismiss: _resume(function() {
|
|
4045
4197
|
error = null;
|
|
4046
|
-
}, "
|
|
4047
|
-
content: _content_resume("
|
|
4198
|
+
}, "u25", $scope8_id),
|
|
4199
|
+
content: _content_resume("u31", () => {
|
|
4048
4200
|
_scope_reason();
|
|
4049
4201
|
const $scope9_id = _scope_id();
|
|
4050
4202
|
_html(`${_escape(error)}${_el_resume($scope9_id, "a")}`);
|
|
@@ -4056,32 +4208,63 @@ var settings_page_default = _template("u", (input) => {
|
|
|
4056
4208
|
return 0;
|
|
4057
4209
|
}
|
|
4058
4210
|
}, $scope0_id, "e", 1, 1, 1, 0, 1);
|
|
4059
|
-
|
|
4060
|
-
|
|
4211
|
+
_if(() => {
|
|
4212
|
+
if (selfUpdatePending || selfUpdating) {
|
|
4213
|
+
const $scope36_id = _scope_id();
|
|
4214
|
+
_html(`<div${_attr_class("_cF")} role=status><div${_attr_class("_cG")}>`);
|
|
4215
|
+
_if(() => {
|
|
4216
|
+
if (selfUpdating) {
|
|
4217
|
+
const $scope52_id = _scope_id();
|
|
4218
|
+
_html(`<span${_attr_class("_cH")}><span${_attr_class("_F")}></span> Updating work…</span><span${_attr_class("_cI")}>The app restarts and reloads when it is done.</span>`);
|
|
4219
|
+
writeScope($scope52_id, {});
|
|
4220
|
+
return 0;
|
|
4221
|
+
} else {
|
|
4222
|
+
const $scope37_id = _scope_id();
|
|
4223
|
+
_html(`<span${_attr_class("_cH")}>Update available</span><span${_attr_class("_cI")}>v<!>${_escape(self.version)}${_el_resume($scope37_id, "c")} → v<!>${_escape(self.latest)}${_el_resume($scope37_id, "d")}</span>`);
|
|
4224
|
+
_subscribe($self_version__closures, _subscribe($self_latest__closures, writeScope($scope37_id, {})));
|
|
4225
|
+
return 1;
|
|
4226
|
+
}
|
|
4227
|
+
}, $scope36_id, "b", 1, 1, 1, "</div>");
|
|
4228
|
+
_if(() => {
|
|
4229
|
+
if (!selfUpdating) {
|
|
4230
|
+
const $scope38_id = _scope_id();
|
|
4231
|
+
_html(`<button${_attr_class(["_o", "_p"])}${_attr("title", `Update work to v${self.latest} and restart`)}>Update and restart</button>${_el_resume($scope38_id, "a")}`);
|
|
4232
|
+
_script($scope38_id, "u32");
|
|
4233
|
+
_subscribe($self_latest__closures, writeScope($scope38_id, { Ce9: 1 }));
|
|
4234
|
+
return 0;
|
|
4235
|
+
}
|
|
4236
|
+
}, $scope36_id, "c", 1, 1, 1, 0, 1);
|
|
4237
|
+
_html("</div>");
|
|
4238
|
+
writeScope($scope36_id, {});
|
|
4239
|
+
return 0;
|
|
4240
|
+
}
|
|
4241
|
+
}, $scope0_id, "f", 1, 1, 1, 0, 1);
|
|
4242
|
+
_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")}>`);
|
|
4243
|
+
_attr_select_value($scope0_id, "n", input.preferred, _resume(function(v) {
|
|
4061
4244
|
setPreferred(v);
|
|
4062
4245
|
}, "u1", $scope0_id), () => {
|
|
4063
|
-
_html(`<select${_attr_class(["
|
|
4246
|
+
_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
4247
|
_for_of(input.agents.filter((a) => a !== "shell"), (id) => {
|
|
4065
|
-
const $
|
|
4066
|
-
_html(`<option${_attr_option_value(id)}>${_escape(agentLabel(id))}${_el_resume($
|
|
4067
|
-
_serialize_if($scope0_reason, 4) && writeScope($
|
|
4068
|
-
}, (a) => a, $scope0_id, "
|
|
4248
|
+
const $scope53_id = _scope_id();
|
|
4249
|
+
_html(`<option${_attr_option_value(id)}>${_escape(agentLabel(id))}${_el_resume($scope53_id, "b", $sg__input_agents)}</option>${_el_resume($scope53_id, "a", $sg__input_agents)}`);
|
|
4250
|
+
_serialize_if($scope0_reason, 4) && writeScope($scope53_id, {});
|
|
4251
|
+
}, (a) => a, $scope0_id, "n", $sg__input_agents, 1, 1, "</select>", 1);
|
|
4069
4252
|
});
|
|
4070
4253
|
_html(`</span></label><button${_attr_class(iconBtn$2)} title="Refresh usage" aria-label="Refresh usage"${_attr("disabled", usageRefreshing)}>`);
|
|
4071
4254
|
_set_serialize_reason(1);
|
|
4072
4255
|
const $childScope3 = _peek_scope_id();
|
|
4073
4256
|
icon_refresh_default({
|
|
4074
4257
|
size: 14,
|
|
4075
|
-
class: usageRefreshing && "
|
|
4258
|
+
class: usageRefreshing && "_E"
|
|
4076
4259
|
});
|
|
4077
|
-
_html(`</button>${_el_resume($scope0_id, "
|
|
4260
|
+
_html(`</button>${_el_resume($scope0_id, "o")}</div><ul${_attr_class(agentGrid)}>`);
|
|
4078
4261
|
_for_of(families, (a) => {
|
|
4079
4262
|
const $scope1_id = _scope_id();
|
|
4080
4263
|
const lone = a.instances.length === 1 && a.instances[0].id === a.id ? a.instances[0] : null;
|
|
4081
4264
|
const rows = lone ? [] : a.instances;
|
|
4082
4265
|
const loneAccounts = lone && lone.enabled ? accountsFor(lone.id) : [];
|
|
4083
4266
|
const extraAccounts = a.installed ? strayAccountsFor(a) : [];
|
|
4084
|
-
_html(`<li${_attr_class(["_bx", "
|
|
4267
|
+
_html(`<li${_attr_class(["_bx", "_cf"])}><div${_attr_class(["_ci", { ["_cl"]: lone && !lone.enabled }])}>`);
|
|
4085
4268
|
_set_serialize_reason(12);
|
|
4086
4269
|
const $childScope4 = _peek_scope_id();
|
|
4087
4270
|
icon_agent_default({
|
|
@@ -4091,9 +4274,9 @@ var settings_page_default = _template("u", (input) => {
|
|
|
4091
4274
|
_html(`<div${_attr_class("_by")}><span${_attr_class("_bA")}><span${_attr_class("_bz")}>${_escape(a.label)}${_el_resume($scope1_id, "g")}</span>`);
|
|
4092
4275
|
_if(() => {
|
|
4093
4276
|
if (lone && input.preferred === lone.id) {
|
|
4094
|
-
const $
|
|
4095
|
-
_html(`<span${_attr_class(["
|
|
4096
|
-
writeScope($
|
|
4277
|
+
const $scope54_id = _scope_id();
|
|
4278
|
+
_html(`<span${_attr_class(["_I", tone.accent])}>default</span>`);
|
|
4279
|
+
writeScope($scope54_id, {});
|
|
4097
4280
|
return 0;
|
|
4098
4281
|
}
|
|
4099
4282
|
}, $scope1_id, "h", 1, 1, 1, 0, 1);
|
|
@@ -4101,36 +4284,36 @@ var settings_page_default = _template("u", (input) => {
|
|
|
4101
4284
|
_if(() => {
|
|
4102
4285
|
if (active.has(a.id)) {
|
|
4103
4286
|
const $scope11_id = _scope_id();
|
|
4104
|
-
_html(`<span${_attr_class("
|
|
4287
|
+
_html(`<span${_attr_class("_cb")}><span${_attr_class("_F")}></span><!>${_escape(active.get(a.id) || "Starting…")}${_el_resume($scope11_id, "c")}</span>`);
|
|
4105
4288
|
_subscribe($active__closures, writeScope($scope11_id, {}));
|
|
4106
4289
|
return 0;
|
|
4107
4290
|
} else if (!a.installed) {
|
|
4108
|
-
const $
|
|
4291
|
+
const $scope55_id = _scope_id();
|
|
4109
4292
|
_html(`<span${_attr_class("_bB")}>Not installed</span>`);
|
|
4110
|
-
writeScope($
|
|
4293
|
+
writeScope($scope55_id, {});
|
|
4111
4294
|
return 1;
|
|
4112
4295
|
}
|
|
4113
4296
|
}, $scope1_id, "i", 1, 1, 1, 0, 1);
|
|
4114
4297
|
_html("</div>");
|
|
4115
4298
|
_if(() => {
|
|
4116
4299
|
if (!a.installed && !active.has(a.id)) {
|
|
4117
|
-
const $
|
|
4118
|
-
_html(`<button${_attr_class(btnSm)}>Install</button>${_el_resume($
|
|
4119
|
-
_script($
|
|
4120
|
-
writeScope($
|
|
4300
|
+
const $scope43_id = _scope_id();
|
|
4301
|
+
_html(`<button${_attr_class(btnSm)}>Install</button>${_el_resume($scope43_id, "a")}`);
|
|
4302
|
+
_script($scope43_id, "u33");
|
|
4303
|
+
writeScope($scope43_id, {});
|
|
4121
4304
|
return 0;
|
|
4122
4305
|
}
|
|
4123
4306
|
}, $scope1_id, "j", 1, 1, 1, 0, 1);
|
|
4124
4307
|
_if(() => {
|
|
4125
4308
|
if (lone) {
|
|
4126
|
-
const $
|
|
4309
|
+
const $scope47_id = _scope_id();
|
|
4127
4310
|
_html(`<button${_attr_class([
|
|
4128
|
-
"
|
|
4129
|
-
"
|
|
4311
|
+
"_I",
|
|
4312
|
+
"_K",
|
|
4130
4313
|
{ [tone.ok]: lone.enabled }
|
|
4131
|
-
])} 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($
|
|
4132
|
-
_script($
|
|
4133
|
-
writeScope($
|
|
4314
|
+
])} 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($scope47_id, "b")}</button>${_el_resume($scope47_id, "a")}`);
|
|
4315
|
+
_script($scope47_id, "u34");
|
|
4316
|
+
writeScope($scope47_id, {});
|
|
4134
4317
|
return 0;
|
|
4135
4318
|
}
|
|
4136
4319
|
}, $scope1_id, "k", 1, 1, 1, 0, 1);
|
|
@@ -4138,43 +4321,43 @@ var settings_page_default = _template("u", (input) => {
|
|
|
4138
4321
|
_if(() => {
|
|
4139
4322
|
if (rows.length || loneAccounts.length || extraAccounts.length) {
|
|
4140
4323
|
const $scope2_id = _scope_id();
|
|
4141
|
-
_html(`<ul${_attr_class("
|
|
4324
|
+
_html(`<ul${_attr_class("_cn")}>`);
|
|
4142
4325
|
_for_of(rows, (inst) => {
|
|
4143
4326
|
const $scope3_id = _scope_id();
|
|
4144
4327
|
const accounts = inst.enabled ? accountsFor(inst.id) : [];
|
|
4145
|
-
_html(`<li${_attr_class("
|
|
4328
|
+
_html(`<li${_attr_class("_cj")}><div${_attr_class(["_ck", { ["_cl"]: !inst.enabled }])}>`);
|
|
4146
4329
|
_set_serialize_reason(12);
|
|
4147
4330
|
const $childScope5 = _peek_scope_id();
|
|
4148
4331
|
icon_agent_default({
|
|
4149
4332
|
agent: inst.id,
|
|
4150
4333
|
size: 15
|
|
4151
4334
|
});
|
|
4152
|
-
_html(`<span${_attr_class(["
|
|
4335
|
+
_html(`<span${_attr_class(["_cm", "_x"])}>${_escape(inst.command)}${_el_resume($scope3_id, "e")}</span>`);
|
|
4153
4336
|
_if(() => {
|
|
4154
4337
|
if (input.preferred === inst.id) {
|
|
4155
|
-
const $
|
|
4156
|
-
_html(`<span${_attr_class(["
|
|
4157
|
-
writeScope($
|
|
4338
|
+
const $scope56_id = _scope_id();
|
|
4339
|
+
_html(`<span${_attr_class(["_I", tone.accent])}>default</span>`);
|
|
4340
|
+
writeScope($scope56_id, {});
|
|
4158
4341
|
return 0;
|
|
4159
4342
|
}
|
|
4160
4343
|
}, $scope3_id, "f", 1, 1, 1, 0, 1);
|
|
4161
|
-
_html(`<span${_attr_class("
|
|
4162
|
-
"
|
|
4163
|
-
"
|
|
4344
|
+
_html(`<span${_attr_class("_y")}></span><button${_attr_class([
|
|
4345
|
+
"_I",
|
|
4346
|
+
"_K",
|
|
4164
4347
|
{ [tone.ok]: inst.enabled }
|
|
4165
4348
|
])} 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
4349
|
_for_of(accounts, (u) => {
|
|
4167
|
-
const $
|
|
4350
|
+
const $scope57_id = _scope_id();
|
|
4168
4351
|
_set_serialize_reason(6);
|
|
4169
4352
|
const $childScope6 = _peek_scope_id();
|
|
4170
4353
|
usage_meters_default({
|
|
4171
4354
|
agent: u,
|
|
4172
4355
|
hideName: true
|
|
4173
4356
|
});
|
|
4174
|
-
writeScope($
|
|
4357
|
+
writeScope($scope57_id, { a: _existing_scope($childScope6) });
|
|
4175
4358
|
}, (u) => `${u.agent}-${u.account || ""}`, $scope3_id, "j", 1, 1, 1, 0, 1);
|
|
4176
4359
|
_html("</li>");
|
|
4177
|
-
_script($scope3_id, "
|
|
4360
|
+
_script($scope3_id, "u35");
|
|
4178
4361
|
_subscribe($accountsFor2__closures, _subscribe($si__input_preferred && $input_preferred__closures, writeScope($scope3_id, {
|
|
4179
4362
|
m: inst?.enabled,
|
|
4180
4363
|
n: inst?.id,
|
|
@@ -4182,7 +4365,7 @@ var settings_page_default = _template("u", (input) => {
|
|
|
4182
4365
|
})));
|
|
4183
4366
|
}, "id", $scope2_id, "b", 1, 1, 1, 0, 1);
|
|
4184
4367
|
_for_of(loneAccounts, (u) => {
|
|
4185
|
-
const $
|
|
4368
|
+
const $scope58_id = _scope_id();
|
|
4186
4369
|
_html("<li>");
|
|
4187
4370
|
_set_serialize_reason(6);
|
|
4188
4371
|
const $childScope7 = _peek_scope_id();
|
|
@@ -4191,16 +4374,16 @@ var settings_page_default = _template("u", (input) => {
|
|
|
4191
4374
|
hideName: true
|
|
4192
4375
|
});
|
|
4193
4376
|
_html("</li>");
|
|
4194
|
-
writeScope($
|
|
4377
|
+
writeScope($scope58_id, { a: _existing_scope($childScope7) });
|
|
4195
4378
|
}, (u) => `${u.agent}-${u.account || ""}`, $scope2_id, "c", 1, 1, 1, 0, 1);
|
|
4196
4379
|
_for_of(extraAccounts, (u) => {
|
|
4197
|
-
const $
|
|
4380
|
+
const $scope59_id = _scope_id();
|
|
4198
4381
|
_html("<li>");
|
|
4199
4382
|
_set_serialize_reason(6);
|
|
4200
4383
|
const $childScope8 = _peek_scope_id();
|
|
4201
4384
|
usage_meters_default({ agent: u });
|
|
4202
4385
|
_html("</li>");
|
|
4203
|
-
writeScope($
|
|
4386
|
+
writeScope($scope59_id, { a: _existing_scope($childScope8) });
|
|
4204
4387
|
}, (u) => `${u.agent}-${u.account || ""}`, $scope2_id, "d", 1, 1, 1, 0, 1);
|
|
4205
4388
|
_html("</ul>");
|
|
4206
4389
|
writeScope($scope2_id, {});
|
|
@@ -4221,22 +4404,22 @@ var settings_page_default = _template("u", (input) => {
|
|
|
4221
4404
|
a7: extraAccounts,
|
|
4222
4405
|
c: _existing_scope($childScope4)
|
|
4223
4406
|
});
|
|
4224
|
-
}, "id", $scope0_id, "
|
|
4407
|
+
}, "id", $scope0_id, "r", 1, 1, 1, 0, 1);
|
|
4225
4408
|
_for_of(otherUsage, (u) => {
|
|
4226
|
-
const $
|
|
4227
|
-
_html(`<li${_attr_class(["_bx", "
|
|
4409
|
+
const $scope60_id = _scope_id();
|
|
4410
|
+
_html(`<li${_attr_class(["_bx", "_cf"])}>`);
|
|
4228
4411
|
_set_serialize_reason(6);
|
|
4229
4412
|
const $childScope9 = _peek_scope_id();
|
|
4230
4413
|
usage_meters_default({ agent: u });
|
|
4231
4414
|
_html("</li>");
|
|
4232
|
-
writeScope($
|
|
4233
|
-
}, (u) => `${u.agent}-${u.account || ""}`, $scope0_id, "
|
|
4415
|
+
writeScope($scope60_id, { b: _existing_scope($childScope9) });
|
|
4416
|
+
}, (u) => `${u.agent}-${u.account || ""}`, $scope0_id, "s", 1, 1, 1, 0, 1);
|
|
4234
4417
|
_html("</ul>");
|
|
4235
4418
|
_if(() => {
|
|
4236
4419
|
if (!usage && families.length) {
|
|
4237
|
-
const $
|
|
4238
|
-
_html(`<p${_attr_class("_bD")}><span${_attr_class("
|
|
4239
|
-
writeScope($
|
|
4420
|
+
const $scope61_id = _scope_id();
|
|
4421
|
+
_html(`<p${_attr_class("_bD")}><span${_attr_class("_F")}></span> Loading usage…</p>`);
|
|
4422
|
+
writeScope($scope61_id, {});
|
|
4240
4423
|
return 0;
|
|
4241
4424
|
} else if (usage?.error) {
|
|
4242
4425
|
const $scope7_id = _scope_id();
|
|
@@ -4244,17 +4427,17 @@ var settings_page_default = _template("u", (input) => {
|
|
|
4244
4427
|
writeScope($scope7_id, {});
|
|
4245
4428
|
return 1;
|
|
4246
4429
|
}
|
|
4247
|
-
}, $scope0_id, "
|
|
4430
|
+
}, $scope0_id, "t", 1, 1, 1, 0, 1);
|
|
4248
4431
|
_html(`</section><section${_attr_class("_bs")}${_attr("aria-labelledby", githubId)}><div${_attr_class("_bt")}><h2${_attr("id", githubId)}${_attr_class("_bH")}>GitHub</h2></div><ul${_attr_class("_bv")}>`);
|
|
4249
4432
|
_for_of(setup?.github || [], (h) => {
|
|
4250
4433
|
const $scope12_id = _scope_id();
|
|
4251
4434
|
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", "
|
|
4435
|
+
_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
4436
|
_if(() => {
|
|
4254
4437
|
if (h.isEnterprise) {
|
|
4255
|
-
const $
|
|
4256
|
-
_html(`<span${_attr_class("
|
|
4257
|
-
writeScope($
|
|
4438
|
+
const $scope64_id = _scope_id();
|
|
4439
|
+
_html(`<span${_attr_class("_I")}>Enterprise</span>`);
|
|
4440
|
+
writeScope($scope64_id, {});
|
|
4258
4441
|
return 0;
|
|
4259
4442
|
}
|
|
4260
4443
|
}, $scope12_id, "f", 1, 1, 1, 0, 1);
|
|
@@ -4262,23 +4445,23 @@ var settings_page_default = _template("u", (input) => {
|
|
|
4262
4445
|
_if(() => {
|
|
4263
4446
|
if (active.has(h.host) && authCodes.has(h.host)) {
|
|
4264
4447
|
const $scope23_id = _scope_id();
|
|
4265
|
-
_html(`<span${_attr_class("
|
|
4448
|
+
_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
4449
|
_subscribe($authCodes__closures, writeScope($scope23_id, {}));
|
|
4267
4450
|
return 0;
|
|
4268
4451
|
} else if (active.has(h.host)) {
|
|
4269
4452
|
const $scope13_id = _scope_id();
|
|
4270
|
-
_html(`<span${_attr_class("
|
|
4271
|
-
_subscribe($active__closures, writeScope($scope13_id, {
|
|
4453
|
+
_html(`<span${_attr_class("_cb")}><span${_attr_class("_F")}></span><!>${_escape(active.get(h.host) || "Starting…")}${_el_resume($scope13_id, "c")}</span>`);
|
|
4454
|
+
_subscribe($active__closures, writeScope($scope13_id, { Cdx: 1 }));
|
|
4272
4455
|
return 1;
|
|
4273
4456
|
} else if (h.authed) {
|
|
4274
|
-
const $
|
|
4275
|
-
_html(`<span${_attr_class("_bB")}>Signed in<!>${h.user ? ` as ${_escape(`${_to_text(h.user)}`)}` : ""}${_el_resume($
|
|
4276
|
-
writeScope($
|
|
4457
|
+
const $scope62_id = _scope_id();
|
|
4458
|
+
_html(`<span${_attr_class("_bB")}>Signed in<!>${h.user ? ` as ${_escape(`${_to_text(h.user)}`)}` : ""}${_el_resume($scope62_id, "b")}</span>`);
|
|
4459
|
+
writeScope($scope62_id, {});
|
|
4277
4460
|
return 2;
|
|
4278
4461
|
} else {
|
|
4279
|
-
const $
|
|
4280
|
-
_html(`<span${_attr_class("_bB")}>${_escape(h.error || "Not signed in")}${_el_resume($
|
|
4281
|
-
writeScope($
|
|
4462
|
+
const $scope63_id = _scope_id();
|
|
4463
|
+
_html(`<span${_attr_class("_bB")}>${_escape(h.error || "Not signed in")}${_el_resume($scope63_id, "b")}</span>`);
|
|
4464
|
+
writeScope($scope63_id, {});
|
|
4282
4465
|
return 3;
|
|
4283
4466
|
}
|
|
4284
4467
|
}, $scope12_id, "g", 1, 1, 1, 0, 1);
|
|
@@ -4288,18 +4471,18 @@ var settings_page_default = _template("u", (input) => {
|
|
|
4288
4471
|
const $scope24_id = _scope_id();
|
|
4289
4472
|
_if(() => {
|
|
4290
4473
|
if (!h.authed) {
|
|
4291
|
-
const $
|
|
4292
|
-
_html(`<button${_attr_class(btnSm)}>Sign in</button>${_el_resume($
|
|
4293
|
-
_script($
|
|
4294
|
-
writeScope($
|
|
4474
|
+
const $scope44_id = _scope_id();
|
|
4475
|
+
_html(`<button${_attr_class(btnSm)}>Sign in</button>${_el_resume($scope44_id, "a")}`);
|
|
4476
|
+
_script($scope44_id, "u36");
|
|
4477
|
+
writeScope($scope44_id, {});
|
|
4295
4478
|
return 0;
|
|
4296
4479
|
} else {
|
|
4297
4480
|
const $scope25_id = _scope_id();
|
|
4298
4481
|
_html(`<button${_attr_class([btnSm, {
|
|
4299
|
-
["
|
|
4300
|
-
["
|
|
4482
|
+
["_r"]: confirmingRemove === `out:${h.host}`,
|
|
4483
|
+
["_q"]: confirmingRemove === `out:${h.host}`
|
|
4301
4484
|
}])}${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
|
-
_script($scope25_id, "
|
|
4485
|
+
_script($scope25_id, "u37");
|
|
4303
4486
|
_subscribe($for_content4__h_host__closures, _subscribe($confirmingRemove__closures, writeScope($scope25_id, {})));
|
|
4304
4487
|
return 1;
|
|
4305
4488
|
}
|
|
@@ -4309,26 +4492,26 @@ var settings_page_default = _template("u", (input) => {
|
|
|
4309
4492
|
const $scope26_id = _scope_id();
|
|
4310
4493
|
_html(`<button${_attr_class([
|
|
4311
4494
|
"_bC",
|
|
4312
|
-
"
|
|
4313
|
-
"
|
|
4314
|
-
{ ["
|
|
4495
|
+
"_2",
|
|
4496
|
+
"_3",
|
|
4497
|
+
{ ["_q"]: confirmingRemove === h.host }
|
|
4315
4498
|
])}${confirmingRemove === h.host ? _attr("title", `Forget ${h.host}? (gh stays signed in)`) : _attr("title", `Forget ${h.host}`)}>`);
|
|
4316
4499
|
_if(() => {
|
|
4317
4500
|
if (confirmingRemove === h.host) {
|
|
4318
|
-
const $
|
|
4501
|
+
const $scope65_id = _scope_id();
|
|
4319
4502
|
_html("Forget?");
|
|
4320
|
-
writeScope($
|
|
4503
|
+
writeScope($scope65_id, {});
|
|
4321
4504
|
return 0;
|
|
4322
4505
|
} else {
|
|
4323
|
-
const $
|
|
4506
|
+
const $scope66_id = _scope_id();
|
|
4324
4507
|
icon_xmark_default({ size: 13 });
|
|
4325
|
-
writeScope($
|
|
4508
|
+
writeScope($scope66_id, {});
|
|
4326
4509
|
return 1;
|
|
4327
4510
|
}
|
|
4328
4511
|
}, $scope26_id, "a", 1, 1, 1, "</button>");
|
|
4329
|
-
_script($scope26_id, "
|
|
4512
|
+
_script($scope26_id, "u38");
|
|
4330
4513
|
_subscribe($for_content4__h_host__closures, _subscribe($confirmingRemove__closures, writeScope($scope26_id, {
|
|
4331
|
-
|
|
4514
|
+
Ce0: 1,
|
|
4332
4515
|
Cr: 1
|
|
4333
4516
|
})));
|
|
4334
4517
|
return 0;
|
|
@@ -4347,128 +4530,131 @@ var settings_page_default = _template("u", (input) => {
|
|
|
4347
4530
|
q: h?.error,
|
|
4348
4531
|
r: $for_content4__h_host__closures
|
|
4349
4532
|
});
|
|
4350
|
-
}, "host", $scope0_id, "
|
|
4533
|
+
}, "host", $scope0_id, "x", 1, 1, 1, "</ul>", 1);
|
|
4351
4534
|
_if(() => {
|
|
4352
4535
|
if (setup && !setup.github.length) {
|
|
4353
|
-
const $
|
|
4536
|
+
const $scope67_id = _scope_id();
|
|
4354
4537
|
_html(`<p${_attr_class("_bD")}>Install the GitHub CLI below to sign in.</p>`);
|
|
4355
|
-
writeScope($
|
|
4538
|
+
writeScope($scope67_id, {});
|
|
4356
4539
|
return 0;
|
|
4357
4540
|
}
|
|
4358
|
-
}, $scope0_id, "
|
|
4541
|
+
}, $scope0_id, "y", 1, 1, 1, 0, 1);
|
|
4359
4542
|
_if(() => {
|
|
4360
4543
|
if (setup) {
|
|
4361
4544
|
const $scope34_id = _scope_id();
|
|
4362
|
-
_html(`<form${_attr_class("
|
|
4545
|
+
_html(`<form${_attr_class("_cu")}><label${_attr_class("_W")}>`);
|
|
4363
4546
|
icon_plus_default({
|
|
4364
4547
|
size: 14,
|
|
4365
|
-
class: "
|
|
4548
|
+
class: "_X"
|
|
4366
4549
|
});
|
|
4367
4550
|
_html(`<input${_attr_input_value($scope34_id, "d", hostInput, _resume((_new_hostInput) => {
|
|
4368
4551
|
hostInput = _new_hostInput;
|
|
4369
|
-
}, "u2", $scope34_id))}${_attr_class([inputLg, "
|
|
4370
|
-
_script($scope34_id, "
|
|
4552
|
+
}, "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")}`);
|
|
4553
|
+
_script($scope34_id, "u39");
|
|
4371
4554
|
writeScope($scope34_id, {});
|
|
4372
4555
|
return 0;
|
|
4373
4556
|
}
|
|
4374
|
-
}, $scope0_id, "
|
|
4557
|
+
}, $scope0_id, "z", 1, 1, 1, 0, 1);
|
|
4375
4558
|
_html(`</section><section${_attr_class("_bs")}${_attr("aria-labelledby", machineId)}><div${_attr_class("_bt")}><h2${_attr("id", machineId)}${_attr_class("_bH")}>Machine</h2>`);
|
|
4376
4559
|
_if(() => {
|
|
4377
4560
|
if (missingCount) {
|
|
4378
|
-
const $
|
|
4379
|
-
_html(`<span${_attr_class(sectionCount$1)}>${_escape(missingCount)}${_el_resume($
|
|
4380
|
-
writeScope($
|
|
4561
|
+
const $scope48_id = _scope_id();
|
|
4562
|
+
_html(`<span${_attr_class(sectionCount$1)}>${_escape(missingCount)}${_el_resume($scope48_id, "b")} missing</span>`);
|
|
4563
|
+
writeScope($scope48_id, {});
|
|
4381
4564
|
return 0;
|
|
4382
4565
|
}
|
|
4383
|
-
}, $scope0_id, "
|
|
4566
|
+
}, $scope0_id, "a3", 1, 1, 1, 0, 1);
|
|
4384
4567
|
_if(() => {
|
|
4385
4568
|
if (outdatedIds.length) {
|
|
4386
|
-
const $
|
|
4387
|
-
_html(`<span${_attr_class(sectionCount$1)}>${_escape(outdatedIds.length)}${_el_resume($
|
|
4388
|
-
writeScope($
|
|
4569
|
+
const $scope49_id = _scope_id();
|
|
4570
|
+
_html(`<span${_attr_class(sectionCount$1)}>${_escape(outdatedIds.length)}${_el_resume($scope49_id, "b")} outdated</span>`);
|
|
4571
|
+
writeScope($scope49_id, {});
|
|
4389
4572
|
return 0;
|
|
4390
4573
|
}
|
|
4391
|
-
}, $scope0_id, "
|
|
4392
|
-
_html(`<div${_attr_class("
|
|
4574
|
+
}, $scope0_id, "a4", 1, 1, 1, 0, 1);
|
|
4575
|
+
_html(`<div${_attr_class("_y")}></div>`);
|
|
4393
4576
|
_if(() => {
|
|
4394
4577
|
if (outdatedIds.length > 1) {
|
|
4395
4578
|
const $scope14_id = _scope_id();
|
|
4396
4579
|
_html(`<button${_attr_class(btnSm)}${_attr("disabled", active.size > 0)}>Update all</button>${_el_resume($scope14_id, "a")}`);
|
|
4397
|
-
_script($scope14_id, "
|
|
4580
|
+
_script($scope14_id, "u40");
|
|
4398
4581
|
writeScope($scope14_id, {});
|
|
4399
4582
|
return 0;
|
|
4400
4583
|
}
|
|
4401
|
-
}, $scope0_id, "
|
|
4584
|
+
}, $scope0_id, "a6", 1, 1, 1, 0, 1);
|
|
4402
4585
|
_if(() => {
|
|
4403
4586
|
if (missingInstallable.length > 1) {
|
|
4404
4587
|
const $scope15_id = _scope_id();
|
|
4405
4588
|
_html(`<button${_attr_class(btnSm)}${_attr("disabled", active.size > 0)}>Install missing</button>${_el_resume($scope15_id, "a")}`);
|
|
4406
|
-
_script($scope15_id, "
|
|
4589
|
+
_script($scope15_id, "u41");
|
|
4407
4590
|
writeScope($scope15_id, {});
|
|
4408
4591
|
return 0;
|
|
4409
4592
|
}
|
|
4410
|
-
}, $scope0_id, "
|
|
4593
|
+
}, $scope0_id, "a7", 1, 1, 1, 0, 1);
|
|
4411
4594
|
_html("</div>");
|
|
4412
4595
|
_if(() => {
|
|
4413
4596
|
if (setup && !setup.mise.installed) {
|
|
4414
4597
|
const $scope16_id = _scope_id();
|
|
4415
4598
|
_html(`<p${_attr_class("_bD")}>mise is not installed. It provides every tool below. <button${_attr_class(btnSm)}${_attr("disabled", active.has("mise"))}>${active.has("mise") ? "Installing…" : "Install mise"}${_el_resume($scope16_id, "c")}</button>${_el_resume($scope16_id, "b")}</p>`);
|
|
4416
|
-
_script($scope16_id, "
|
|
4599
|
+
_script($scope16_id, "u42");
|
|
4417
4600
|
writeScope($scope16_id, {});
|
|
4418
4601
|
return 0;
|
|
4419
4602
|
}
|
|
4420
|
-
}, $scope0_id, "
|
|
4603
|
+
}, $scope0_id, "a8", 1, 1, 1, 0, 1);
|
|
4421
4604
|
_html(`<ul${_attr_class(toolGrid)}>`);
|
|
4422
4605
|
_if(() => {
|
|
4423
4606
|
if (self) {
|
|
4424
|
-
const $
|
|
4425
|
-
_html(`<li${_attr_class(row)}><span${_attr_class(["
|
|
4607
|
+
const $scope39_id = _scope_id();
|
|
4608
|
+
_html(`<li${_attr_class(row)}><span${_attr_class(["_cq", "_x"])}>work</span>`);
|
|
4426
4609
|
_if(() => {
|
|
4427
4610
|
if (selfUpdating) {
|
|
4428
|
-
const $
|
|
4429
|
-
_html(`<span${_attr_class("
|
|
4430
|
-
writeScope($
|
|
4611
|
+
const $scope68_id = _scope_id();
|
|
4612
|
+
_html(`<span${_attr_class("_cb")}><span${_attr_class("_F")}></span>Updating — the app restarts and reloads when it is done…</span>`);
|
|
4613
|
+
writeScope($scope68_id, {});
|
|
4431
4614
|
return 0;
|
|
4432
4615
|
} else {
|
|
4433
|
-
const $
|
|
4434
|
-
_html(`<span${_attr_class(["
|
|
4616
|
+
const $scope40_id = _scope_id();
|
|
4617
|
+
_html(`<span${_attr_class(["_x", metaTrunc])} title="Running version">v<!>${_escape(self.version)}${_el_resume($scope40_id, "b")}</span>`);
|
|
4435
4618
|
_if(() => {
|
|
4436
4619
|
if (self.install === "source") {
|
|
4437
|
-
const $
|
|
4620
|
+
const $scope69_id = _scope_id();
|
|
4438
4621
|
_html(`<span${_attr_class(metaTrunc)} title="Started from a checkout, not the published package">source checkout — update with git</span>`);
|
|
4439
|
-
writeScope($
|
|
4622
|
+
writeScope($scope69_id, {});
|
|
4440
4623
|
return 0;
|
|
4441
4624
|
} else if (self.latest && self.latest !== self.version) {
|
|
4442
|
-
const $
|
|
4443
|
-
_html(`<button${_attr_class([btnSm, "
|
|
4444
|
-
_script($
|
|
4445
|
-
_subscribe($self_latest__closures, writeScope($
|
|
4625
|
+
const $scope41_id = _scope_id();
|
|
4626
|
+
_html(`<button${_attr_class([btnSm, "_cs"])}${_attr("title", `Update work to v${self.latest} and restart`)}>↑ <!>${_escape(self.latest)}${_el_resume($scope41_id, "b")}</button>${_el_resume($scope41_id, "a")}`);
|
|
4627
|
+
_script($scope41_id, "u43");
|
|
4628
|
+
_subscribe($self_latest__closures, writeScope($scope41_id, { Ce9: 3 }));
|
|
4446
4629
|
return 1;
|
|
4447
4630
|
} else if (self.latest) {
|
|
4448
|
-
const $
|
|
4631
|
+
const $scope70_id = _scope_id();
|
|
4449
4632
|
_html(`<span${_attr_class(metaTrunc)}>up to date</span>`);
|
|
4450
|
-
writeScope($
|
|
4633
|
+
writeScope($scope70_id, {});
|
|
4451
4634
|
return 2;
|
|
4452
4635
|
}
|
|
4453
|
-
}, $
|
|
4454
|
-
_subscribe($
|
|
4636
|
+
}, $scope40_id, "c", 1, 1, 1, 0, 1);
|
|
4637
|
+
_subscribe($self_version__closures, _subscribe($self_latest__closures, _subscribe($self_install__closures, writeScope($scope40_id, {
|
|
4638
|
+
Ce9: 2,
|
|
4639
|
+
Cea: 1
|
|
4640
|
+
}))));
|
|
4455
4641
|
return 1;
|
|
4456
4642
|
}
|
|
4457
|
-
}, $
|
|
4458
|
-
_html(`<span${_attr_class("
|
|
4643
|
+
}, $scope39_id, "c");
|
|
4644
|
+
_html(`<span${_attr_class("_y")}></span>`);
|
|
4459
4645
|
_if(() => {
|
|
4460
4646
|
if (!selfUpdating) {
|
|
4461
|
-
const $
|
|
4462
|
-
_html(`<span${_attr_class("
|
|
4463
|
-
writeScope($
|
|
4647
|
+
const $scope71_id = _scope_id();
|
|
4648
|
+
_html(`<span${_attr_class("_I")}>app</span>`);
|
|
4649
|
+
writeScope($scope71_id, {});
|
|
4464
4650
|
return 0;
|
|
4465
4651
|
}
|
|
4466
|
-
}, $
|
|
4652
|
+
}, $scope39_id, "e", 1, 1, 1, 0, 1);
|
|
4467
4653
|
_html("</li>");
|
|
4468
|
-
writeScope($
|
|
4654
|
+
writeScope($scope39_id, {});
|
|
4469
4655
|
return 0;
|
|
4470
4656
|
}
|
|
4471
|
-
}, $scope0_id, "
|
|
4657
|
+
}, $scope0_id, "aa", 1, 1, 1, 0, 1);
|
|
4472
4658
|
_for_of(tools, (t) => {
|
|
4473
4659
|
const $scope17_id = _scope_id();
|
|
4474
4660
|
const $for_content5__t_label__closures = /* @__PURE__ */ new Set();
|
|
@@ -4476,94 +4662,94 @@ var settings_page_default = _template("u", (input) => {
|
|
|
4476
4662
|
const $for_content5__t_path__closures = /* @__PURE__ */ new Set();
|
|
4477
4663
|
const $for_content5__t_latest__closures = /* @__PURE__ */ new Set();
|
|
4478
4664
|
const $for_content5__t_id__closures = /* @__PURE__ */ new Set();
|
|
4479
|
-
_html(`<li${_attr_class([row, { ["
|
|
4665
|
+
_html(`<li${_attr_class([row, { ["_cp"]: !t.installed }])}><span${_attr_class(["_cq", "_x"])}>${_escape(t.label)}${_el_resume($scope17_id, "c")}</span>`);
|
|
4480
4666
|
_if(() => {
|
|
4481
4667
|
if (active.has(t.id)) {
|
|
4482
4668
|
const $scope18_id = _scope_id();
|
|
4483
|
-
_html(`<span${_attr_class("
|
|
4484
|
-
_subscribe($active__closures, writeScope($scope18_id, {
|
|
4669
|
+
_html(`<span${_attr_class("_cb")}><span${_attr_class("_F")}></span><!>${_escape(active.get(t.id) || "Starting…")}${_el_resume($scope18_id, "c")}</span>`);
|
|
4670
|
+
_subscribe($active__closures, writeScope($scope18_id, { Cdx: 2 }));
|
|
4485
4671
|
return 0;
|
|
4486
4672
|
} else if (t.installed) {
|
|
4487
4673
|
const $scope30_id = _scope_id();
|
|
4488
4674
|
_if(() => {
|
|
4489
4675
|
if (t.version) {
|
|
4490
4676
|
const $scope31_id = _scope_id();
|
|
4491
|
-
_html(`<button${_attr_class(["
|
|
4492
|
-
_script($scope31_id, "
|
|
4677
|
+
_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")}`);
|
|
4678
|
+
_script($scope31_id, "u44");
|
|
4493
4679
|
_subscribe($for_content5__t_path__closures, _subscribe($for_content5__t_version__closures, _subscribe($for_content5__t_label__closures, writeScope($scope31_id, { Cu: 1 }))));
|
|
4494
4680
|
return 0;
|
|
4495
4681
|
} else {
|
|
4496
|
-
const $
|
|
4497
|
-
_html(`<span${_attr_class([metaTrunc, "
|
|
4498
|
-
_subscribe($for_content5__t_path__closures, writeScope($
|
|
4682
|
+
const $scope72_id = _scope_id();
|
|
4683
|
+
_html(`<span${_attr_class([metaTrunc, "_x"])}${_attr("title", t.path)}>${_escape(t.path)}${_el_resume($scope72_id, "b")}</span>${_el_resume($scope72_id, "a")}`);
|
|
4684
|
+
_subscribe($for_content5__t_path__closures, writeScope($scope72_id, { Cx: 1 }));
|
|
4499
4685
|
return 1;
|
|
4500
4686
|
}
|
|
4501
4687
|
}, $scope30_id, "a", 1, 1, 1, 0, 1);
|
|
4502
4688
|
_if(() => {
|
|
4503
4689
|
if (outdated(t)) {
|
|
4504
|
-
const $
|
|
4505
|
-
_html(`<button${_attr_class([btnSm, "
|
|
4506
|
-
_script($
|
|
4507
|
-
_subscribe($for_content5__t_latest__closures, writeScope($
|
|
4690
|
+
const $scope45_id = _scope_id();
|
|
4691
|
+
_html(`<button${_attr_class([btnSm, "_cs"])}${_attr("title", `Update to v${t.latest}`)}>↑ <!>${_escape(t.latest)}${_el_resume($scope45_id, "b")}</button>${_el_resume($scope45_id, "a")}`);
|
|
4692
|
+
_script($scope45_id, "u45");
|
|
4693
|
+
_subscribe($for_content5__t_latest__closures, writeScope($scope45_id, {}));
|
|
4508
4694
|
return 0;
|
|
4509
4695
|
}
|
|
4510
4696
|
}, $scope30_id, "b", 1, 1, 1, 0, 1);
|
|
4511
4697
|
writeScope($scope30_id, {});
|
|
4512
4698
|
return 1;
|
|
4513
4699
|
} else if (t.installable) {
|
|
4514
|
-
const $
|
|
4700
|
+
const $scope73_id = _scope_id();
|
|
4515
4701
|
_html(`<span${_attr_class(metaTrunc)}>not installed</span>`);
|
|
4516
|
-
writeScope($
|
|
4702
|
+
writeScope($scope73_id, {});
|
|
4517
4703
|
return 2;
|
|
4518
4704
|
} else {
|
|
4519
|
-
const $
|
|
4705
|
+
const $scope74_id = _scope_id();
|
|
4520
4706
|
_html(`<span${_attr_class(metaTrunc)} title="Installed with the system package manager">system package</span>`);
|
|
4521
|
-
writeScope($
|
|
4707
|
+
writeScope($scope74_id, {});
|
|
4522
4708
|
return 3;
|
|
4523
4709
|
}
|
|
4524
4710
|
}, $scope17_id, "d");
|
|
4525
|
-
_html(`<span${_attr_class("
|
|
4711
|
+
_html(`<span${_attr_class("_y")}></span>`);
|
|
4526
4712
|
_if(() => {
|
|
4527
4713
|
if (!active.has(t.id)) {
|
|
4528
4714
|
const $scope27_id = _scope_id();
|
|
4529
4715
|
_if(() => {
|
|
4530
4716
|
if (t.required) {
|
|
4531
|
-
const $
|
|
4532
|
-
_html(`<span${_attr_class("
|
|
4533
|
-
writeScope($
|
|
4717
|
+
const $scope75_id = _scope_id();
|
|
4718
|
+
_html(`<span${_attr_class("_I")}>required</span>`);
|
|
4719
|
+
writeScope($scope75_id, {});
|
|
4534
4720
|
return 0;
|
|
4535
4721
|
}
|
|
4536
4722
|
}, $scope27_id, "a", 1, 1, 1, 0, 1);
|
|
4537
4723
|
_if(() => {
|
|
4538
4724
|
if (!t.installed && t.installable) {
|
|
4539
|
-
const $
|
|
4540
|
-
_html(`<button${_attr_class(btnSm)}>Install</button>${_el_resume($
|
|
4541
|
-
_script($
|
|
4542
|
-
writeScope($
|
|
4725
|
+
const $scope46_id = _scope_id();
|
|
4726
|
+
_html(`<button${_attr_class(btnSm)}>Install</button>${_el_resume($scope46_id, "a")}`);
|
|
4727
|
+
_script($scope46_id, "u46");
|
|
4728
|
+
writeScope($scope46_id, {});
|
|
4543
4729
|
return 0;
|
|
4544
4730
|
} else if (t.installed && t.version && !t.required) {
|
|
4545
4731
|
const $scope28_id = _scope_id();
|
|
4546
4732
|
_html(`<button${_attr_class([
|
|
4547
4733
|
iconBtnXs,
|
|
4548
|
-
"
|
|
4549
|
-
"
|
|
4550
|
-
{ ["
|
|
4734
|
+
"_2",
|
|
4735
|
+
"_3",
|
|
4736
|
+
{ ["_q"]: confirmingRemove === t.id }
|
|
4551
4737
|
])}${confirmingRemove === t.id ? _attr("title", `Remove ${t.label}?`) : _attr("title", `Remove ${t.label}`)}>`);
|
|
4552
4738
|
_if(() => {
|
|
4553
4739
|
if (confirmingRemove === t.id) {
|
|
4554
|
-
const $
|
|
4740
|
+
const $scope76_id = _scope_id();
|
|
4555
4741
|
_html("Remove?");
|
|
4556
|
-
writeScope($
|
|
4742
|
+
writeScope($scope76_id, {});
|
|
4557
4743
|
return 0;
|
|
4558
4744
|
} else {
|
|
4559
|
-
const $
|
|
4745
|
+
const $scope77_id = _scope_id();
|
|
4560
4746
|
icon_xmark_default({ size: 13 });
|
|
4561
|
-
writeScope($
|
|
4747
|
+
writeScope($scope77_id, {});
|
|
4562
4748
|
return 1;
|
|
4563
4749
|
}
|
|
4564
4750
|
}, $scope28_id, "a", 1, 1, 1, "</button>");
|
|
4565
|
-
_script($scope28_id, "
|
|
4566
|
-
_subscribe($for_content5__t_id__closures, _subscribe($for_content5__t_label__closures, _subscribe($confirmingRemove__closures, writeScope($scope28_id, {
|
|
4751
|
+
_script($scope28_id, "u47");
|
|
4752
|
+
_subscribe($for_content5__t_id__closures, _subscribe($for_content5__t_label__closures, _subscribe($confirmingRemove__closures, writeScope($scope28_id, { Ce0: 2 }))));
|
|
4567
4753
|
return 1;
|
|
4568
4754
|
}
|
|
4569
4755
|
}, $scope27_id, "b", 1, 1, 1, 0, 1);
|
|
@@ -4588,34 +4774,34 @@ var settings_page_default = _template("u", (input) => {
|
|
|
4588
4774
|
y: $for_content5__t_latest__closures,
|
|
4589
4775
|
v: $for_content5__t_id__closures
|
|
4590
4776
|
});
|
|
4591
|
-
}, "id", $scope0_id, "
|
|
4777
|
+
}, "id", $scope0_id, "ab", 1, 1, 1, 0, 1);
|
|
4592
4778
|
_html("</ul>");
|
|
4593
4779
|
_if(() => {
|
|
4594
4780
|
if (setup && setup.mise.installed) {
|
|
4595
4781
|
const $scope19_id = _scope_id();
|
|
4596
|
-
_html(`<div><label${_attr_class("
|
|
4782
|
+
_html(`<div><label${_attr_class("_W")}>`);
|
|
4597
4783
|
icon_search_default({
|
|
4598
4784
|
size: 14,
|
|
4599
|
-
class: "
|
|
4785
|
+
class: "_X"
|
|
4600
4786
|
});
|
|
4601
|
-
_html(`<input${_attr_input_value($scope19_id, "c", query, search)}${_attr_class([inputLg, "
|
|
4787
|
+
_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
4788
|
_if(() => {
|
|
4603
4789
|
if (hits && hits.length) {
|
|
4604
4790
|
const $scope20_id = _scope_id();
|
|
4605
|
-
_html(`<ul${_attr_class([toolGrid, "
|
|
4791
|
+
_html(`<ul${_attr_class([toolGrid, "_ct"])}>`);
|
|
4606
4792
|
_for_of(hits, (h) => {
|
|
4607
4793
|
const $scope21_id = _scope_id();
|
|
4608
|
-
_html(`<li${_attr_class(row)}><div${_attr_class("_by")}><span${_attr_class(["
|
|
4794
|
+
_html(`<li${_attr_class(row)}><div${_attr_class("_by")}><span${_attr_class(["_cq", "_x"])}>${_escape(h.name)}${_el_resume($scope21_id, "d")}</span>`);
|
|
4609
4795
|
_if(() => {
|
|
4610
4796
|
if (active.has(h.name)) {
|
|
4611
4797
|
const $scope22_id = _scope_id();
|
|
4612
|
-
_html(`<span${_attr_class("
|
|
4613
|
-
_subscribe($active__closures, writeScope($scope22_id, {
|
|
4798
|
+
_html(`<span${_attr_class("_cb")}><span${_attr_class("_F")}></span><!>${_escape(active.get(h.name) || "Starting…")}${_el_resume($scope22_id, "c")}</span>`);
|
|
4799
|
+
_subscribe($active__closures, writeScope($scope22_id, { Cdx: 4 }));
|
|
4614
4800
|
return 0;
|
|
4615
4801
|
} else if (h.description) {
|
|
4616
|
-
const $
|
|
4617
|
-
_html(`<span${_attr_class("_bB")}${_attr("title", h.description)}>${_escape(h.description)}${_el_resume($
|
|
4618
|
-
writeScope($
|
|
4802
|
+
const $scope78_id = _scope_id();
|
|
4803
|
+
_html(`<span${_attr_class("_bB")}${_attr("title", h.description)}>${_escape(h.description)}${_el_resume($scope78_id, "b")}</span>${_el_resume($scope78_id, "a")}`);
|
|
4804
|
+
writeScope($scope78_id, {});
|
|
4619
4805
|
return 1;
|
|
4620
4806
|
}
|
|
4621
4807
|
}, $scope21_id, "e", 1, 1, 1, 0, 1);
|
|
@@ -4625,14 +4811,14 @@ var settings_page_default = _template("u", (input) => {
|
|
|
4625
4811
|
const $scope32_id = _scope_id();
|
|
4626
4812
|
_if(() => {
|
|
4627
4813
|
if (h.installed) {
|
|
4628
|
-
const $
|
|
4629
|
-
_html(`<span${_attr_class("
|
|
4630
|
-
writeScope($
|
|
4814
|
+
const $scope79_id = _scope_id();
|
|
4815
|
+
_html(`<span${_attr_class("_I")}>installed</span>`);
|
|
4816
|
+
writeScope($scope79_id, {});
|
|
4631
4817
|
return 0;
|
|
4632
4818
|
} else {
|
|
4633
4819
|
const $scope33_id = _scope_id();
|
|
4634
4820
|
_html(`<button${_attr_class(btnSm)}>Install</button>${_el_resume($scope33_id, "a")}<button${_attr_class(btnSm)} title="Install a specific version">@…</button>${_el_resume($scope33_id, "b")}`);
|
|
4635
|
-
_script($scope33_id, "
|
|
4821
|
+
_script($scope33_id, "u48");
|
|
4636
4822
|
writeScope($scope33_id, {});
|
|
4637
4823
|
return 1;
|
|
4638
4824
|
}
|
|
@@ -4646,7 +4832,7 @@ var settings_page_default = _template("u", (input) => {
|
|
|
4646
4832
|
i: h?.name,
|
|
4647
4833
|
k: h?.description,
|
|
4648
4834
|
m: h?.installed,
|
|
4649
|
-
|
|
4835
|
+
Cdx: 3
|
|
4650
4836
|
}));
|
|
4651
4837
|
}, "name", $scope20_id, "a", 1, 1, 1, "</ul>", 1);
|
|
4652
4838
|
_subscribe($hits__closures, writeScope($scope20_id, {}));
|
|
@@ -4659,35 +4845,58 @@ var settings_page_default = _template("u", (input) => {
|
|
|
4659
4845
|
}
|
|
4660
4846
|
}, $scope19_id, "d", 1, 1, 1, 0, 1);
|
|
4661
4847
|
_html("</div>");
|
|
4662
|
-
_script($scope19_id, "
|
|
4848
|
+
_script($scope19_id, "u49");
|
|
4663
4849
|
writeScope($scope19_id, {});
|
|
4664
4850
|
return 0;
|
|
4665
4851
|
}
|
|
4666
|
-
}, $scope0_id, "
|
|
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", "
|
|
4852
|
+
}, $scope0_id, "ac", 1, 1, 1, 0, 1);
|
|
4853
|
+
_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, "aj", input.instance.name, _resume(function(v) {
|
|
4668
4854
|
setInstance({ name: v });
|
|
4669
|
-
}, "u3", $scope0_id))}${_attr_class(["
|
|
4670
|
-
|
|
4671
|
-
|
|
4672
|
-
|
|
4673
|
-
|
|
4855
|
+
}, "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, "aj")}<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="Color theme"><span${_attr_class("_cz")}>Theme</span><span${_attr_class("_cC")}>`);
|
|
4856
|
+
_for_of([
|
|
4857
|
+
{
|
|
4858
|
+
id: "system",
|
|
4859
|
+
label: "System"
|
|
4860
|
+
},
|
|
4861
|
+
{
|
|
4862
|
+
id: "light",
|
|
4863
|
+
label: "Light"
|
|
4864
|
+
},
|
|
4865
|
+
{
|
|
4866
|
+
id: "dark",
|
|
4867
|
+
label: "Dark"
|
|
4868
|
+
}
|
|
4869
|
+
], (opt) => {
|
|
4870
|
+
const $scope42_id = _scope_id();
|
|
4871
|
+
_html(`<button type=button${_attr_class(["_cD", { ["_cE"]: themeMode === opt.id }])} role=radio aria-checked=${themeMode === opt.id ? "true" : "false"}>${_escape(opt.label)}</button>${_el_resume($scope42_id, "a")}`);
|
|
4872
|
+
_script($scope42_id, "u50");
|
|
4873
|
+
writeScope($scope42_id, {
|
|
4874
|
+
e: opt?.id,
|
|
4875
|
+
_: _scope_with_id($scope0_id)
|
|
4876
|
+
});
|
|
4877
|
+
}, "id", $scope0_id, "an", 1, 0, 1, 0, 1);
|
|
4878
|
+
_html(`</span><span${_attr_class(["_S", "_cB"])}>Follow the OS, or force light or dark.</span></div><div${_attr_class("_cy")} role=radiogroup aria-label="Accent colour"><span${_attr_class("_cz")}>Accent</span><span${_attr_class("_cJ")}><button type=button${_attr_class([
|
|
4879
|
+
"_cK",
|
|
4880
|
+
"_cM",
|
|
4881
|
+
{ ["_cL"]: !input.instance.accent }
|
|
4882
|
+
])} role=radio aria-checked=${!input.instance.accent ? "true" : "false"} title="Default (blue)" aria-label="Default (blue)"></button>${_el_resume($scope0_id, "as")}`);
|
|
4674
4883
|
_for_of(ACCENT_PRESETS, (p) => {
|
|
4675
4884
|
const $scope4_id = _scope_id();
|
|
4676
|
-
_html(`<button type=button${_attr_class(["
|
|
4677
|
-
_script($scope4_id, "
|
|
4885
|
+
_html(`<button type=button${_attr_class(["_cK", { ["_cL"]: 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")}`);
|
|
4886
|
+
_script($scope4_id, "u51");
|
|
4678
4887
|
writeScope($scope4_id, {
|
|
4679
4888
|
d: p?.value,
|
|
4680
4889
|
_: _scope_with_id($scope0_id)
|
|
4681
4890
|
});
|
|
4682
|
-
}, "value", $scope0_id, "
|
|
4891
|
+
}, "value", $scope0_id, "at", $sg__input_instance_accent, 0, 1, 0, 1);
|
|
4683
4892
|
const customOn = !!input.instance.accent && !ACCENT_PRESETS.some((p) => p.value === input.instance.accent);
|
|
4684
4893
|
_html(`<label${_attr_class([
|
|
4685
|
-
"
|
|
4686
|
-
"
|
|
4687
|
-
{ ["
|
|
4688
|
-
])}${customOn ? _attr_style(`--swatch:${input.instance.accent}`) : ""} title="Custom colour"><input${_attr_input_value($scope0_id, "
|
|
4894
|
+
"_cK",
|
|
4895
|
+
"_cN",
|
|
4896
|
+
{ ["_cL"]: customOn }
|
|
4897
|
+
])}${customOn ? _attr_style(`--swatch:${input.instance.accent}`) : ""} title="Custom colour"><input${_attr_input_value($scope0_id, "av", input.instance.accent || "#3556d8", _resume(function(v) {
|
|
4689
4898
|
setInstance({ accent: v });
|
|
4690
|
-
}, "u4", $scope0_id))}${_attr_class("
|
|
4899
|
+
}, "u4", $scope0_id))}${_attr_class("_cO")} type=color aria-label="Custom accent colour">${_el_resume($scope0_id, "av")}<span aria-hidden=true>+</span></label>${_el_resume($scope0_id, "au", $sg__input_instance_accent)}</span><span${_attr_class(["_S", "_cB"])}>Selected rows, buttons, and the icon.</span></div></div></section></div></div></div>`);
|
|
4691
4900
|
_if(() => {
|
|
4692
4901
|
if (versionPick) {
|
|
4693
4902
|
const $scope29_id = _scope_id();
|
|
@@ -4701,98 +4910,99 @@ var settings_page_default = _template("u", (input) => {
|
|
|
4701
4910
|
open: versionPick != null,
|
|
4702
4911
|
openChange: _resume(function(o) {
|
|
4703
4912
|
if (!o) versionPick = null;
|
|
4704
|
-
}, "
|
|
4913
|
+
}, "u26", $scope29_id),
|
|
4705
4914
|
onSubmit: _resume(function(v) {
|
|
4706
4915
|
const pick = versionPick;
|
|
4707
4916
|
versionPick = null;
|
|
4708
4917
|
run(pick.id, "install", v);
|
|
4709
|
-
}, "
|
|
4918
|
+
}, "u27", $scope29_id)
|
|
4710
4919
|
});
|
|
4711
4920
|
writeScope($scope29_id, { a: _existing_scope($childScope10) });
|
|
4712
4921
|
return 0;
|
|
4713
4922
|
}
|
|
4714
|
-
}, $scope0_id, "
|
|
4715
|
-
_script($scope0_id, "
|
|
4716
|
-
_script($scope0_id, "
|
|
4923
|
+
}, $scope0_id, "ax", 1, 1, 1, 0, 1);
|
|
4924
|
+
_script($scope0_id, "u52");
|
|
4925
|
+
_script($scope0_id, "u53");
|
|
4717
4926
|
writeScope($scope0_id, {
|
|
4718
|
-
|
|
4719
|
-
|
|
4720
|
-
|
|
4721
|
-
|
|
4722
|
-
|
|
4723
|
-
|
|
4724
|
-
|
|
4725
|
-
|
|
4726
|
-
|
|
4727
|
-
|
|
4728
|
-
|
|
4729
|
-
|
|
4730
|
-
|
|
4731
|
-
|
|
4732
|
-
|
|
4733
|
-
|
|
4734
|
-
|
|
4735
|
-
|
|
4736
|
-
|
|
4737
|
-
|
|
4738
|
-
|
|
4739
|
-
|
|
4740
|
-
|
|
4741
|
-
|
|
4742
|
-
|
|
4743
|
-
|
|
4744
|
-
|
|
4745
|
-
|
|
4746
|
-
|
|
4747
|
-
|
|
4748
|
-
|
|
4749
|
-
|
|
4750
|
-
|
|
4751
|
-
|
|
4752
|
-
|
|
4753
|
-
|
|
4754
|
-
|
|
4755
|
-
|
|
4756
|
-
|
|
4757
|
-
|
|
4758
|
-
|
|
4759
|
-
|
|
4760
|
-
|
|
4761
|
-
|
|
4762
|
-
|
|
4763
|
-
|
|
4764
|
-
|
|
4765
|
-
|
|
4766
|
-
|
|
4767
|
-
|
|
4768
|
-
|
|
4769
|
-
|
|
4770
|
-
|
|
4771
|
-
|
|
4772
|
-
|
|
4773
|
-
|
|
4774
|
-
|
|
4775
|
-
|
|
4776
|
-
|
|
4777
|
-
|
|
4778
|
-
|
|
4779
|
-
|
|
4780
|
-
|
|
4781
|
-
|
|
4782
|
-
|
|
4927
|
+
b1: input.setupChange,
|
|
4928
|
+
b2: input.agentsChange,
|
|
4929
|
+
b3: input.preferred,
|
|
4930
|
+
b4: input.preferredChange,
|
|
4931
|
+
b6: input.instance,
|
|
4932
|
+
b7: input.instanceChange,
|
|
4933
|
+
b9: input.onExit,
|
|
4934
|
+
bb: $si__input_instance__OR__input_instanceChange && input.instance?.name,
|
|
4935
|
+
bc: $si__input_instance__OR__input_instanceChange && input.instance?.accent,
|
|
4936
|
+
bd: setup,
|
|
4937
|
+
be: setup?.agents,
|
|
4938
|
+
bg: setup?.missing,
|
|
4939
|
+
bi: usage,
|
|
4940
|
+
bj: usage?.agents,
|
|
4941
|
+
bk: usage?.error,
|
|
4942
|
+
bl: error,
|
|
4943
|
+
bm: refreshing,
|
|
4944
|
+
bo: active,
|
|
4945
|
+
bp: active?.size,
|
|
4946
|
+
bq: authCodes,
|
|
4947
|
+
br: confirmingRemove,
|
|
4948
|
+
bs: versionPick,
|
|
4949
|
+
bt: versionPick?.label,
|
|
4950
|
+
bu: versionPick?.current,
|
|
4951
|
+
bv: hostInput,
|
|
4952
|
+
bw: hostBusy,
|
|
4953
|
+
bx: query,
|
|
4954
|
+
by: hits,
|
|
4955
|
+
bz: self,
|
|
4956
|
+
c0: self?.install,
|
|
4957
|
+
c1: self?.latest,
|
|
4958
|
+
c2: self?.version,
|
|
4959
|
+
c3: selfUpdating,
|
|
4960
|
+
c6: searching,
|
|
4961
|
+
c8: searchTimer.id,
|
|
4962
|
+
ca: setThemeMode,
|
|
4963
|
+
cd: applySetup,
|
|
4964
|
+
cf: syncAgents,
|
|
4965
|
+
cg: loadSetup,
|
|
4966
|
+
ch: loadSelf,
|
|
4967
|
+
cj: updateSelf,
|
|
4968
|
+
ck: loadUsage,
|
|
4969
|
+
cm: refresh,
|
|
4970
|
+
cn: refreshUsage,
|
|
4971
|
+
co: setActive,
|
|
4972
|
+
cq: run,
|
|
4973
|
+
cr: changeHost,
|
|
4974
|
+
cs: runEach,
|
|
4975
|
+
ct: setPreferred,
|
|
4976
|
+
cw: saveTimer.id,
|
|
4977
|
+
cy: setInstance,
|
|
4978
|
+
d1: setEnabled,
|
|
4979
|
+
d2: search,
|
|
4980
|
+
d3: outdated,
|
|
4981
|
+
d6: missingInstallable,
|
|
4982
|
+
d8: missingCount,
|
|
4983
|
+
d9: outdatedIds,
|
|
4984
|
+
da: outdatedIds?.length,
|
|
4985
|
+
db: families,
|
|
4986
|
+
dd: families.length,
|
|
4987
|
+
df: instanceIds,
|
|
4988
|
+
dh: accountsFor,
|
|
4989
|
+
di: strayAccountsFor,
|
|
4990
|
+
dt: $setup_missing__closures,
|
|
4991
|
+
ds: $setup2__closures,
|
|
4992
|
+
dw: $refreshing__closures,
|
|
4783
4993
|
d: _serialize_if($scope0_reason, 1) && _existing_scope($childScope2),
|
|
4784
|
-
|
|
4785
|
-
|
|
4786
|
-
|
|
4787
|
-
|
|
4788
|
-
|
|
4789
|
-
dq: $
|
|
4790
|
-
|
|
4791
|
-
|
|
4792
|
-
|
|
4793
|
-
|
|
4794
|
-
|
|
4795
|
-
|
|
4994
|
+
dv: $error__closures,
|
|
4995
|
+
e9: $self_latest__closures,
|
|
4996
|
+
ea: $self_version__closures,
|
|
4997
|
+
p: _existing_scope($childScope3),
|
|
4998
|
+
dx: $active__closures,
|
|
4999
|
+
dq: $si__input_preferred && $input_preferred__closures,
|
|
5000
|
+
ej: $accountsFor2__closures,
|
|
5001
|
+
dz: $authCodes__closures,
|
|
5002
|
+
e0: $confirmingRemove__closures,
|
|
5003
|
+
e8: $self_install__closures,
|
|
5004
|
+
e7: $hits__closures,
|
|
5005
|
+
e6: $query__closures
|
|
4796
5006
|
});
|
|
4797
5007
|
_resume_branch($scope0_id);
|
|
4798
5008
|
});
|
|
@@ -4800,11 +5010,11 @@ var settings_page_default = _template("u", (input) => {
|
|
|
4800
5010
|
//#region src/tags/new-workspace.css.ts
|
|
4801
5011
|
var content$1 = "_bI _bk";
|
|
4802
5012
|
var section$1 = "_bM _bs";
|
|
4803
|
-
var curBase = "_bR
|
|
4804
|
-
var archived = "
|
|
4805
|
-
var archivedHint = "
|
|
4806
|
-
var archivedCard = "
|
|
4807
|
-
var resultBranch = "
|
|
5013
|
+
var curBase = "_bR _T _S";
|
|
5014
|
+
var archived = "_bW _bs";
|
|
5015
|
+
var archivedHint = "_bX _S";
|
|
5016
|
+
var archivedCard = "_bY _bx";
|
|
5017
|
+
var resultBranch = "_cW _Z _j";
|
|
4808
5018
|
//#endregion
|
|
4809
5019
|
//#region src/tags/branch-pick.marko
|
|
4810
5020
|
var branch_pick_default = _template("d", (input) => {
|
|
@@ -4815,11 +5025,11 @@ var branch_pick_default = _template("d", (input) => {
|
|
|
4815
5025
|
let branches = null;
|
|
4816
5026
|
let defaultBranch = null;
|
|
4817
5027
|
let branchFilter = "";
|
|
4818
|
-
_html(`<div${_attr_class("
|
|
5028
|
+
_html(`<div${_attr_class("_cY")}>`);
|
|
4819
5029
|
_if(() => {
|
|
4820
5030
|
{
|
|
4821
5031
|
const $scope4_id = _scope_id();
|
|
4822
|
-
_html(`<p${_attr_class("_bD")}><span${_attr_class("
|
|
5032
|
+
_html(`<p${_attr_class("_bD")}><span${_attr_class("_F")}></span> Loading branches…</p>`);
|
|
4823
5033
|
writeScope($scope4_id, {});
|
|
4824
5034
|
return 0;
|
|
4825
5035
|
}
|
|
@@ -4845,6 +5055,8 @@ var api$5;
|
|
|
4845
5055
|
var repo_picker_default = _template("s", (input) => {
|
|
4846
5056
|
const $scope0_reason = _scope_reason(), $si__input_onError = _serialize_if($scope0_reason, 2);
|
|
4847
5057
|
const $scope0_id = _scope_id();
|
|
5058
|
+
const $pasted__closures = /* @__PURE__ */ new Set();
|
|
5059
|
+
const $pasteWillFork__closures = /* @__PURE__ */ new Set();
|
|
4848
5060
|
const $input_onError__closures = /* @__PURE__ */ new Set();
|
|
4849
5061
|
const $highlight__closures = /* @__PURE__ */ new Set();
|
|
4850
5062
|
const $branchesFor__closures = /* @__PURE__ */ new Set();
|
|
@@ -4861,83 +5073,143 @@ var repo_picker_default = _template("s", (input) => {
|
|
|
4861
5073
|
}
|
|
4862
5074
|
if (refresh);
|
|
4863
5075
|
}, "s2", $scope0_id);
|
|
4864
|
-
const
|
|
5076
|
+
const excluded = _resume((name) => {
|
|
5077
|
+
if (input.exclude.has(name)) return true;
|
|
5078
|
+
const repos = catalog?.repos || [];
|
|
5079
|
+
if (repos.some((r) => input.exclude.has(r.nameWithOwner) && r.parent === name)) return true;
|
|
5080
|
+
const entry = repos.find((r) => r.nameWithOwner === name);
|
|
5081
|
+
return !!(entry?.parent && input.exclude.has(entry.parent));
|
|
5082
|
+
}, "s3", $scope0_id);
|
|
5083
|
+
const results = catalog && filter ? rankRepos(filter, catalog.repos, (name) => excluded(name)) : [];
|
|
5084
|
+
const pasted = (() => {
|
|
5085
|
+
const name = parseRepoUrl(filter);
|
|
5086
|
+
return name && !excluded(name) ? name : null;
|
|
5087
|
+
})();
|
|
5088
|
+
const pastedForkable = !!pasted && !catalog?.repos.some((r) => r.nameWithOwner === pasted);
|
|
4865
5089
|
let branchesFor = null;
|
|
4866
|
-
|
|
5090
|
+
let pasteWillFork = false;
|
|
5091
|
+
const pick = _resume((fullName, baseBranch, fork) => {
|
|
4867
5092
|
filter = "";
|
|
4868
5093
|
branchesFor = null;
|
|
4869
|
-
|
|
4870
|
-
|
|
5094
|
+
pasteWillFork = false;
|
|
5095
|
+
input.onPick(fullName, baseBranch, fork);
|
|
5096
|
+
}, "s4", $scope0_id);
|
|
5097
|
+
const pastedFork = _resume((fork) => pastedForkable ? fork : void 0, "s5", $scope0_id);
|
|
4871
5098
|
const toggleBranches = _resume((fullName) => {
|
|
4872
5099
|
branchesFor = branchesFor === fullName ? null : fullName;
|
|
4873
|
-
|
|
4874
|
-
|
|
5100
|
+
if (fullName !== pasted) pasteWillFork = false;
|
|
5101
|
+
}, "s6", $scope0_id);
|
|
5102
|
+
_html(`<div${_attr_class("_cQ")}><label${_attr_class("_W")}>`);
|
|
4875
5103
|
icon_search_default({
|
|
4876
5104
|
size: 14,
|
|
4877
|
-
class: "
|
|
5105
|
+
class: "_X"
|
|
4878
5106
|
});
|
|
4879
5107
|
_html(`<input${_attr_input_value($scope0_id, "d", filter, _resume(function(v) {
|
|
4880
5108
|
filter = v;
|
|
4881
5109
|
highlight = 0;
|
|
4882
|
-
|
|
5110
|
+
pasteWillFork = false;
|
|
5111
|
+
}, "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
5112
|
_if(() => {
|
|
4884
|
-
if (
|
|
4885
|
-
const $
|
|
4886
|
-
_html(`<
|
|
4887
|
-
|
|
5113
|
+
if (pasted) {
|
|
5114
|
+
const $scope1_id = _scope_id();
|
|
5115
|
+
_html(`<ul${_attr_class("_cR")}><li><div${_attr_class(["_cT", "_cS"])}><button${_attr_class("_cU")}${pasteWillFork ? _attr("title", `Fork ${pasted} to your account and add the fork`) : _attr("title", `Add ${pasted} as-is (pushes go to that repo)`)}>`);
|
|
5116
|
+
icon_plus_default({
|
|
5117
|
+
size: 12,
|
|
5118
|
+
class: "_c0"
|
|
5119
|
+
});
|
|
5120
|
+
_html(`<span${_attr_class("_c1")}>${_escape(repoLabel(pasted))}${_el_resume($scope1_id, "f")}</span></button>${_el_resume($scope1_id, "c")}`);
|
|
5121
|
+
_if(() => {
|
|
5122
|
+
if (pastedForkable) {
|
|
5123
|
+
const $scope7_id = _scope_id();
|
|
5124
|
+
_html(`<button${_attr_class(["_cX", { ["_cV"]: 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")}`);
|
|
5125
|
+
_script($scope7_id, "s11");
|
|
5126
|
+
_subscribe($pasteWillFork__closures, _subscribe($pasted__closures, writeScope($scope7_id, { Cah: 1 })));
|
|
5127
|
+
return 0;
|
|
5128
|
+
}
|
|
5129
|
+
}, $scope1_id, "g", 1, 1, 1, 0, 1);
|
|
5130
|
+
_html(`<button${_attr_class([resultBranch, { ["_cV"]: 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>`);
|
|
5131
|
+
_if(() => {
|
|
5132
|
+
if (branchesFor === pasted) {
|
|
5133
|
+
const $scope2_id = _scope_id();
|
|
5134
|
+
const $childScope = _peek_scope_id();
|
|
5135
|
+
branch_pick_default({
|
|
5136
|
+
repo: pasted,
|
|
5137
|
+
onPick: _resume(function(branch, isDefault) {
|
|
5138
|
+
pick(pasted, isDefault ? void 0 : branch, pastedFork(pasteWillFork));
|
|
5139
|
+
}, "s7", $scope2_id),
|
|
5140
|
+
onError: _resume(function(message) {
|
|
5141
|
+
branchesFor = null;
|
|
5142
|
+
input.onError?.(message);
|
|
5143
|
+
}, "s8", $scope2_id)
|
|
5144
|
+
});
|
|
5145
|
+
_subscribe($pasted__closures, _subscribe($si__input_onError && $input_onError__closures, writeScope($scope2_id, { a: _existing_scope($childScope) })));
|
|
5146
|
+
return 0;
|
|
5147
|
+
}
|
|
5148
|
+
}, $scope1_id, "i", 1, 1, 1, 0, 1);
|
|
5149
|
+
_html("</li></ul>");
|
|
5150
|
+
_script($scope1_id, "s12");
|
|
5151
|
+
writeScope($scope1_id, {});
|
|
4888
5152
|
return 0;
|
|
5153
|
+
} else if (filter && !catalog) {
|
|
5154
|
+
const $scope8_id = _scope_id();
|
|
5155
|
+
_html(`<p${_attr_class("_bD")}>Loading repos…</p>`);
|
|
5156
|
+
writeScope($scope8_id, {});
|
|
5157
|
+
return 1;
|
|
4889
5158
|
}
|
|
4890
5159
|
}, $scope0_id, "e", 1, 1, 1, 0, 1);
|
|
4891
5160
|
_if(() => {
|
|
4892
5161
|
if (results.length) {
|
|
4893
|
-
const $
|
|
4894
|
-
_html(`<ul${_attr_class("
|
|
5162
|
+
const $scope3_id = _scope_id();
|
|
5163
|
+
_html(`<ul${_attr_class("_cR")}>`);
|
|
4895
5164
|
_for_of(results, (repo, i) => {
|
|
4896
|
-
const $
|
|
4897
|
-
_html(`<li><div${_attr_class(["
|
|
5165
|
+
const $scope4_id = _scope_id();
|
|
5166
|
+
_html(`<li><div${_attr_class(["_cT", { ["_cS"]: i === highlight }])}><button${_attr_class("_cU")}>`);
|
|
4898
5167
|
icon_plus_default({
|
|
4899
5168
|
size: 12,
|
|
4900
|
-
class: "
|
|
5169
|
+
class: "_c0"
|
|
4901
5170
|
});
|
|
4902
|
-
_html(`<span${_attr_class("
|
|
5171
|
+
_html(`<span${_attr_class("_c1")}>${_escape(repoLabel(repo.nameWithOwner))}${_el_resume($scope4_id, "e")}</span></button>${_el_resume($scope4_id, "b")}<button${_attr_class([resultBranch, { ["_cV"]: 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
5172
|
_if(() => {
|
|
4904
5173
|
if (branchesFor === repo.nameWithOwner) {
|
|
4905
|
-
const $
|
|
4906
|
-
const $
|
|
5174
|
+
const $scope5_id = _scope_id();
|
|
5175
|
+
const $childScope2 = _peek_scope_id();
|
|
4907
5176
|
branch_pick_default({
|
|
4908
5177
|
repo: repo.nameWithOwner,
|
|
4909
5178
|
onPick: _resume(function(branch, isDefault) {
|
|
4910
5179
|
pick(repo.nameWithOwner, isDefault ? void 0 : branch);
|
|
4911
|
-
}, "
|
|
5180
|
+
}, "s9", $scope5_id),
|
|
4912
5181
|
onError: _resume(function(message) {
|
|
4913
5182
|
branchesFor = null;
|
|
4914
5183
|
input.onError?.(message);
|
|
4915
|
-
}, "
|
|
5184
|
+
}, "s10", $scope5_id)
|
|
4916
5185
|
});
|
|
4917
|
-
_subscribe($si__input_onError && $input_onError__closures, writeScope($
|
|
5186
|
+
_subscribe($si__input_onError && $input_onError__closures, writeScope($scope5_id, {
|
|
5187
|
+
a: _existing_scope($childScope2),
|
|
5188
|
+
Cad: $si__input_onError && 1
|
|
5189
|
+
}));
|
|
4918
5190
|
return 0;
|
|
4919
5191
|
}
|
|
4920
|
-
}, $
|
|
5192
|
+
}, $scope4_id, "g", 1, 1, 1, 0, 1);
|
|
4921
5193
|
_html("</li>");
|
|
4922
|
-
_script($
|
|
4923
|
-
_subscribe($branchesFor__closures, _subscribe($highlight__closures, writeScope($
|
|
5194
|
+
_script($scope4_id, "s13");
|
|
5195
|
+
_subscribe($branchesFor__closures, _subscribe($highlight__closures, writeScope($scope4_id, {
|
|
4924
5196
|
j: repo?.nameWithOwner,
|
|
4925
5197
|
l: i
|
|
4926
5198
|
})));
|
|
4927
|
-
}, "nameWithOwner", $
|
|
4928
|
-
writeScope($
|
|
5199
|
+
}, "nameWithOwner", $scope3_id, "a", 1, 1, 1, "</ul>", 1);
|
|
5200
|
+
writeScope($scope3_id, {});
|
|
4929
5201
|
return 0;
|
|
4930
|
-
} else if (filter && catalog) {
|
|
4931
|
-
const $
|
|
4932
|
-
_html(`<p${_attr_class("_bD")}>No repos match "<!>${_escape(filter)}${_el_resume($
|
|
4933
|
-
writeScope($
|
|
5202
|
+
} else if (filter && catalog && !pasted) {
|
|
5203
|
+
const $scope6_id = _scope_id();
|
|
5204
|
+
_html(`<p${_attr_class("_bD")}>No repos match "<!>${_escape(filter)}${_el_resume($scope6_id, "b")}". Paste a clone URL to add any repo.</p>`);
|
|
5205
|
+
writeScope($scope6_id, {});
|
|
4934
5206
|
return 1;
|
|
4935
5207
|
}
|
|
4936
5208
|
}, $scope0_id, "f", 1, 1, 1, 0, 1);
|
|
4937
5209
|
_html("</div>");
|
|
4938
5210
|
const $return = _resume(() => loadCatalog(true), "s1", $scope0_id);
|
|
4939
|
-
_script($scope0_id, "
|
|
4940
|
-
_script($scope0_id, "
|
|
5211
|
+
_script($scope0_id, "s14");
|
|
5212
|
+
_script($scope0_id, "s15");
|
|
4941
5213
|
writeScope($scope0_id, {
|
|
4942
5214
|
i: _serialize_if($scope0_reason, 1) && input.refreshing,
|
|
4943
5215
|
j: _serialize_if($scope0_reason, 0) && input.refreshingChange,
|
|
@@ -4945,17 +5217,25 @@ var repo_picker_default = _template("s", (input) => {
|
|
|
4945
5217
|
m: input.exclude,
|
|
4946
5218
|
n: input.onPick,
|
|
4947
5219
|
r: catalog,
|
|
4948
|
-
s:
|
|
5220
|
+
s: catalog?.repos,
|
|
5221
|
+
u: filter,
|
|
4949
5222
|
v: highlight,
|
|
4950
5223
|
w: loadCatalog,
|
|
4951
|
-
x:
|
|
4952
|
-
a0:
|
|
4953
|
-
|
|
4954
|
-
|
|
5224
|
+
x: excluded,
|
|
5225
|
+
a0: results,
|
|
5226
|
+
a2: pasted,
|
|
5227
|
+
a6: pastedForkable,
|
|
5228
|
+
a7: branchesFor,
|
|
5229
|
+
a9: pasteWillFork,
|
|
5230
|
+
aa: pick,
|
|
5231
|
+
ab: pastedFork,
|
|
5232
|
+
ac: toggleBranches,
|
|
4955
5233
|
q: input.refreshingChange || void 0,
|
|
4956
|
-
|
|
4957
|
-
|
|
4958
|
-
|
|
5234
|
+
ah: $pasted__closures,
|
|
5235
|
+
ak: $pasteWillFork__closures,
|
|
5236
|
+
ad: $si__input_onError && $input_onError__closures,
|
|
5237
|
+
af: $highlight__closures,
|
|
5238
|
+
aj: $branchesFor__closures
|
|
4959
5239
|
});
|
|
4960
5240
|
_resume_branch($scope0_id);
|
|
4961
5241
|
return $return;
|
|
@@ -4968,8 +5248,8 @@ var new_workspace_default = _template("p", (input) => {
|
|
|
4968
5248
|
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
5249
|
const $scope0_id = _scope_id();
|
|
4970
5250
|
const $error__closures = /* @__PURE__ */ new Set();
|
|
4971
|
-
const $steps_length__closures = /* @__PURE__ */ new Set();
|
|
4972
5251
|
const $busy__closures = /* @__PURE__ */ new Set();
|
|
5252
|
+
const $steps_length__closures = /* @__PURE__ */ new Set();
|
|
4973
5253
|
const $restoring__closures = /* @__PURE__ */ new Set();
|
|
4974
5254
|
let name = "";
|
|
4975
5255
|
let catalogRefreshing = false;
|
|
@@ -4979,11 +5259,12 @@ var new_workspace_default = _template("p", (input) => {
|
|
|
4979
5259
|
let error = null;
|
|
4980
5260
|
let steps$1 = [];
|
|
4981
5261
|
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) => {
|
|
5262
|
+
const addRepo = _resume((fullName, baseBranch, fork) => {
|
|
4983
5263
|
if (!fullName || selected.some((r) => r.fullName === fullName)) return;
|
|
4984
5264
|
selected = selected.concat({
|
|
4985
5265
|
fullName,
|
|
4986
|
-
baseBranch
|
|
5266
|
+
baseBranch,
|
|
5267
|
+
fork
|
|
4987
5268
|
});
|
|
4988
5269
|
}, "p1", $scope0_id);
|
|
4989
5270
|
let branchesFor = null;
|
|
@@ -4991,13 +5272,19 @@ var new_workspace_default = _template("p", (input) => {
|
|
|
4991
5272
|
selected = selected.filter((r) => r.fullName !== fullName);
|
|
4992
5273
|
if (branchesFor === fullName) branchesFor = null;
|
|
4993
5274
|
}, "p2", $scope0_id);
|
|
5275
|
+
const toggleFork = _resume((fullName) => {
|
|
5276
|
+
selected = selected.map((r) => r.fullName === fullName ? {
|
|
5277
|
+
...r,
|
|
5278
|
+
fork: !r.fork
|
|
5279
|
+
} : r);
|
|
5280
|
+
}, "p3", $scope0_id);
|
|
4994
5281
|
const setBranch = _resume((fullName, baseBranch) => {
|
|
4995
5282
|
selected = selected.map((r) => r.fullName === fullName ? {
|
|
4996
5283
|
...r,
|
|
4997
5284
|
baseBranch
|
|
4998
5285
|
} : r);
|
|
4999
5286
|
branchesFor = null;
|
|
5000
|
-
}, "
|
|
5287
|
+
}, "p4", $scope0_id);
|
|
5001
5288
|
const restore = _resume(async (ws) => {
|
|
5002
5289
|
if (busy || restoring) return;
|
|
5003
5290
|
error = null;
|
|
@@ -5017,7 +5304,7 @@ var new_workspace_default = _template("p", (input) => {
|
|
|
5017
5304
|
} finally {
|
|
5018
5305
|
restoring = null;
|
|
5019
5306
|
}
|
|
5020
|
-
}, "
|
|
5307
|
+
}, "p5", $scope0_id);
|
|
5021
5308
|
const createGen = { n: 0 };
|
|
5022
5309
|
const create = _resume(async () => {
|
|
5023
5310
|
if (restoring) return;
|
|
@@ -5050,7 +5337,7 @@ var new_workspace_default = _template("p", (input) => {
|
|
|
5050
5337
|
} finally {
|
|
5051
5338
|
watcher.stop();
|
|
5052
5339
|
}
|
|
5053
|
-
}, "
|
|
5340
|
+
}, "p6", $scope0_id);
|
|
5054
5341
|
const titleId = _id();
|
|
5055
5342
|
_html(`<div${_attr_class("_bi")} role=region${_attr("aria-labelledby", titleId)}><div${_attr_class("_bj")}><div${_attr_class(content$1)}>`);
|
|
5056
5343
|
_set_serialize_reason({
|
|
@@ -5064,8 +5351,8 @@ var new_workspace_default = _template("p", (input) => {
|
|
|
5064
5351
|
title: "New workspace",
|
|
5065
5352
|
titleId,
|
|
5066
5353
|
backHref: input.backHref,
|
|
5067
|
-
onBack: input.onExit && _resume(() => input.onExit?.(), "
|
|
5068
|
-
meta: attrTag({ content: _content_resume("
|
|
5354
|
+
onBack: input.onExit && _resume(() => input.onExit?.(), "p7", $scope0_id),
|
|
5355
|
+
meta: attrTag({ content: _content_resume("p14", () => {
|
|
5069
5356
|
_scope_reason();
|
|
5070
5357
|
_scope_id();
|
|
5071
5358
|
_html("Name the workspace and pick repos, or restore an archived one below.");
|
|
@@ -5073,21 +5360,21 @@ var new_workspace_default = _template("p", (input) => {
|
|
|
5073
5360
|
});
|
|
5074
5361
|
_if(() => {
|
|
5075
5362
|
if (error) {
|
|
5076
|
-
const $
|
|
5363
|
+
const $scope6_id = _scope_id();
|
|
5077
5364
|
toast_default({
|
|
5078
5365
|
placement: "inline",
|
|
5079
5366
|
onDismiss: _resume(function() {
|
|
5080
5367
|
error = null;
|
|
5081
|
-
}, "
|
|
5082
|
-
content: _content_resume("
|
|
5368
|
+
}, "p8", $scope6_id),
|
|
5369
|
+
content: _content_resume("p15", () => {
|
|
5083
5370
|
_scope_reason();
|
|
5084
|
-
const $
|
|
5085
|
-
_html(`${_escape(error)}${_el_resume($
|
|
5086
|
-
_subscribe($error__closures, writeScope($
|
|
5087
|
-
_resume_branch($
|
|
5088
|
-
}, $
|
|
5371
|
+
const $scope7_id = _scope_id();
|
|
5372
|
+
_html(`${_escape(error)}${_el_resume($scope7_id, "a")}`);
|
|
5373
|
+
_subscribe($error__closures, writeScope($scope7_id, { _: _scope_with_id($scope6_id) }));
|
|
5374
|
+
_resume_branch($scope7_id);
|
|
5375
|
+
}, $scope6_id)
|
|
5089
5376
|
});
|
|
5090
|
-
writeScope($
|
|
5377
|
+
writeScope($scope6_id, {});
|
|
5091
5378
|
return 0;
|
|
5092
5379
|
}
|
|
5093
5380
|
}, $scope0_id, "e", 1, 1, 1, 0, 1);
|
|
@@ -5098,49 +5385,60 @@ var new_workspace_default = _template("p", (input) => {
|
|
|
5098
5385
|
const $childScope2 = _peek_scope_id();
|
|
5099
5386
|
icon_refresh_default({
|
|
5100
5387
|
size: 14,
|
|
5101
|
-
class: catalogRefreshing && "
|
|
5388
|
+
class: catalogRefreshing && "_E"
|
|
5102
5389
|
});
|
|
5103
5390
|
_html(`</button>${_el_resume($scope0_id, "l")}</div><ul${_attr_class("_bO")}>`);
|
|
5104
5391
|
_for_of(selected, (repo) => {
|
|
5105
5392
|
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
|
|
5393
|
+
_html(`<li><div${_attr_class(row)}><span${_attr_class("_bP")}>${_escape(repoLabel(repo.fullName))}${_el_resume($scope2_id, "c")}</span>`);
|
|
5394
|
+
_if(() => {
|
|
5395
|
+
if (repo.fork !== void 0) {
|
|
5396
|
+
const $scope3_id = _scope_id();
|
|
5397
|
+
_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")}`);
|
|
5398
|
+
_script($scope3_id, "p16");
|
|
5399
|
+
_subscribe($busy__closures, writeScope($scope3_id, {}));
|
|
5400
|
+
return 0;
|
|
5401
|
+
}
|
|
5402
|
+
}, $scope2_id, "d", 1, 1, 1, 0, 1);
|
|
5403
|
+
_html(`<button${_attr_class([
|
|
5107
5404
|
curBase,
|
|
5108
|
-
"
|
|
5405
|
+
"_x",
|
|
5109
5406
|
{ ["_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, "
|
|
5407
|
+
])}${_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
5408
|
icon_xmark_default({ size: 12 });
|
|
5112
|
-
_html(`</button>${_el_resume($scope2_id, "
|
|
5409
|
+
_html(`</button>${_el_resume($scope2_id, "g")}</div>`);
|
|
5113
5410
|
_if(() => {
|
|
5114
5411
|
if (branchesFor === repo.fullName) {
|
|
5115
|
-
const $
|
|
5412
|
+
const $scope8_id = _scope_id();
|
|
5116
5413
|
const $childScope3 = _peek_scope_id();
|
|
5117
5414
|
branch_pick_default({
|
|
5118
5415
|
repo: repo.fullName,
|
|
5119
5416
|
current: repo.baseBranch,
|
|
5120
5417
|
onPick: _resume(function(branch, isDefault) {
|
|
5121
5418
|
setBranch(repo.fullName, isDefault ? void 0 : branch);
|
|
5122
|
-
}, "
|
|
5419
|
+
}, "p9", $scope8_id),
|
|
5123
5420
|
onError: _resume(function(message) {
|
|
5124
5421
|
branchesFor = null;
|
|
5125
5422
|
error = message;
|
|
5126
|
-
}, "
|
|
5423
|
+
}, "p10", $scope8_id)
|
|
5127
5424
|
});
|
|
5128
|
-
writeScope($
|
|
5425
|
+
writeScope($scope8_id, { a: _existing_scope($childScope3) });
|
|
5129
5426
|
return 0;
|
|
5130
5427
|
}
|
|
5131
|
-
}, $scope2_id, "
|
|
5428
|
+
}, $scope2_id, "i", 1, 1, 1, 0, 1);
|
|
5132
5429
|
_html("</li>");
|
|
5133
|
-
_script($scope2_id, "
|
|
5430
|
+
_script($scope2_id, "p17");
|
|
5134
5431
|
writeScope($scope2_id, {
|
|
5135
|
-
|
|
5136
|
-
|
|
5432
|
+
l: repo?.fullName,
|
|
5433
|
+
n: repo?.fork,
|
|
5434
|
+
o: repo?.baseBranch
|
|
5137
5435
|
});
|
|
5138
5436
|
}, "fullName", $scope0_id, "o", 1, 1, 1, 0, 1);
|
|
5139
5437
|
_if(() => {
|
|
5140
5438
|
if (!selected.length) {
|
|
5141
|
-
const $
|
|
5439
|
+
const $scope12_id = _scope_id();
|
|
5142
5440
|
_html(`<li${_attr_class("_bD")}>No repos yet. Search below to add one, or create it empty.</li>`);
|
|
5143
|
-
writeScope($
|
|
5441
|
+
writeScope($scope12_id, {});
|
|
5144
5442
|
return 0;
|
|
5145
5443
|
}
|
|
5146
5444
|
}, $scope0_id, "p", 1, 1, 1, 0, 1);
|
|
@@ -5149,42 +5447,42 @@ var new_workspace_default = _template("p", (input) => {
|
|
|
5149
5447
|
let refreshCatalog = repo_picker_default({
|
|
5150
5448
|
exclude: new Set(selected.map((r) => r.fullName)),
|
|
5151
5449
|
disabled: busy,
|
|
5152
|
-
onPick: _resume(function(fullName, baseBranch) {
|
|
5153
|
-
addRepo(fullName, baseBranch);
|
|
5154
|
-
}, "
|
|
5450
|
+
onPick: _resume(function(fullName, baseBranch, fork) {
|
|
5451
|
+
addRepo(fullName, baseBranch, fork);
|
|
5452
|
+
}, "p11", $scope0_id),
|
|
5155
5453
|
onError: _resume(function(message) {
|
|
5156
5454
|
error = message;
|
|
5157
|
-
}, "
|
|
5455
|
+
}, "p12", $scope0_id),
|
|
5158
5456
|
refreshingChange: _resume(function(v) {
|
|
5159
5457
|
catalogRefreshing = v;
|
|
5160
|
-
}, "
|
|
5458
|
+
}, "p13", $scope0_id)
|
|
5161
5459
|
});
|
|
5162
|
-
_var($scope0_id, "r", $childScope4, "
|
|
5460
|
+
_var($scope0_id, "r", $childScope4, "p18");
|
|
5163
5461
|
_html("</section>");
|
|
5164
5462
|
_if(() => {
|
|
5165
5463
|
if (busy && steps$1.length) {
|
|
5166
|
-
const $
|
|
5167
|
-
_html(`<ul${_attr_class("
|
|
5464
|
+
const $scope9_id = _scope_id();
|
|
5465
|
+
_html(`<ul${_attr_class("_bT")}>`);
|
|
5168
5466
|
_for_of(steps$1, (step$1, i) => {
|
|
5169
|
-
const $
|
|
5170
|
-
_html(`<li${_attr_class(["
|
|
5467
|
+
const $scope10_id = _scope_id();
|
|
5468
|
+
_html(`<li${_attr_class(["_bZ", { ["_bU"]: i === steps$1.length - 1 }])}>`);
|
|
5171
5469
|
_if(() => {
|
|
5172
5470
|
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
5471
|
const $scope13_id = _scope_id();
|
|
5179
|
-
_html(`<span${_attr_class("
|
|
5472
|
+
_html(`<span${_attr_class("_F")}></span>`);
|
|
5180
5473
|
writeScope($scope13_id, {});
|
|
5474
|
+
return 0;
|
|
5475
|
+
} else {
|
|
5476
|
+
const $scope14_id = _scope_id();
|
|
5477
|
+
_html(`<span${_attr_class("_bV")}>✓</span>`);
|
|
5478
|
+
writeScope($scope14_id, {});
|
|
5181
5479
|
return 1;
|
|
5182
5480
|
}
|
|
5183
|
-
}, $
|
|
5184
|
-
_html(`<!>${_escape(step$1)}${_el_resume($
|
|
5185
|
-
_subscribe($steps_length__closures, writeScope($
|
|
5186
|
-
}, 0, $
|
|
5187
|
-
writeScope($
|
|
5481
|
+
}, $scope10_id, "b", 1, 1, 1, 0, 1);
|
|
5482
|
+
_html(`<!>${_escape(step$1)}${_el_resume($scope10_id, "c")}</li>${_el_resume($scope10_id, "a")}`);
|
|
5483
|
+
_subscribe($steps_length__closures, writeScope($scope10_id, {}));
|
|
5484
|
+
}, 0, $scope9_id, "a", 1, 1, 1, "</ul>", 1);
|
|
5485
|
+
writeScope($scope9_id, {});
|
|
5188
5486
|
return 0;
|
|
5189
5487
|
}
|
|
5190
5488
|
}, $scope0_id, "s", 1, 1, 1, 0, 1);
|
|
@@ -5193,51 +5491,52 @@ var new_workspace_default = _template("p", (input) => {
|
|
|
5193
5491
|
if (input.onExit || busy) {
|
|
5194
5492
|
const $scope1_id = _scope_id();
|
|
5195
5493
|
_html(`<button type=button${_attr_class(btnLg)}${_attr("disabled", !!restoring)}>Cancel</button>${_el_resume($scope1_id, "a")}`);
|
|
5196
|
-
_script($scope1_id, "
|
|
5494
|
+
_script($scope1_id, "p19");
|
|
5197
5495
|
writeScope($scope1_id, {});
|
|
5198
5496
|
return 0;
|
|
5199
5497
|
}
|
|
5200
5498
|
}, $scope0_id, "u", 1, 1, 1, 0, 1);
|
|
5201
5499
|
_html(`<button type=button${_attr_class([
|
|
5202
5500
|
btnLg,
|
|
5203
|
-
"
|
|
5501
|
+
"_p",
|
|
5204
5502
|
"_bK"
|
|
5205
5503
|
])}${_attr("disabled", busy || !!restoring || !name.trim())}>${busy ? "Creating…" : "Create workspace"}${_el_resume($scope0_id, "w")}</button>${_el_resume($scope0_id, "v")}</div>`);
|
|
5206
5504
|
_if(() => {
|
|
5207
5505
|
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($
|
|
5506
|
+
const $scope4_id = _scope_id();
|
|
5507
|
+
_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
5508
|
_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($
|
|
5509
|
+
const $scope5_id = _scope_id();
|
|
5510
|
+
_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
5511
|
_if(() => {
|
|
5214
5512
|
if (restoring === ws.id) {
|
|
5215
|
-
const $
|
|
5216
|
-
_html(`<span${_attr_class("
|
|
5217
|
-
writeScope($
|
|
5513
|
+
const $scope15_id = _scope_id();
|
|
5514
|
+
_html(`<span${_attr_class("_F")}></span> Restoring…`);
|
|
5515
|
+
writeScope($scope15_id, {});
|
|
5218
5516
|
return 0;
|
|
5219
5517
|
} else {
|
|
5220
|
-
const $
|
|
5518
|
+
const $scope16_id = _scope_id();
|
|
5221
5519
|
_html("Restore");
|
|
5222
|
-
writeScope($
|
|
5520
|
+
writeScope($scope16_id, {});
|
|
5223
5521
|
return 1;
|
|
5224
5522
|
}
|
|
5225
|
-
}, $
|
|
5523
|
+
}, $scope5_id, "g", 1, 1, 1, "</button>");
|
|
5226
5524
|
_html("</li>");
|
|
5227
|
-
_script($
|
|
5228
|
-
_subscribe($restoring__closures, _subscribe($busy__closures, writeScope($
|
|
5525
|
+
_script($scope5_id, "p20");
|
|
5526
|
+
_subscribe($restoring__closures, _subscribe($busy__closures, writeScope($scope5_id, {
|
|
5229
5527
|
j: ws,
|
|
5230
5528
|
o: ws?.id,
|
|
5231
|
-
_: _scope_with_id($
|
|
5529
|
+
_: _scope_with_id($scope4_id),
|
|
5530
|
+
Cax: 1
|
|
5232
5531
|
})));
|
|
5233
|
-
}, "id", $
|
|
5532
|
+
}, "id", $scope4_id, "g", $sg__input_workspaces, $sg__input_workspaces, $sg__input_workspaces, "</ul>", 1);
|
|
5234
5533
|
_html("</section>");
|
|
5235
|
-
writeScope($
|
|
5534
|
+
writeScope($scope4_id, { _: _scope_with_id($scope0_id) });
|
|
5236
5535
|
return 0;
|
|
5237
5536
|
}
|
|
5238
5537
|
}, $scope0_id, "x", $sg__input_workspaces, $sg__input_workspaces, 1, 0, 1);
|
|
5239
5538
|
_html("</div></div></div>");
|
|
5240
|
-
_script($scope0_id, "
|
|
5539
|
+
_script($scope0_id, "p21");
|
|
5241
5540
|
writeScope($scope0_id, {
|
|
5242
5541
|
a1: input.onRestore,
|
|
5243
5542
|
a2: input.onCreate,
|
|
@@ -5254,18 +5553,19 @@ var new_workspace_default = _template("p", (input) => {
|
|
|
5254
5553
|
ak: addRepo,
|
|
5255
5554
|
al: branchesFor,
|
|
5256
5555
|
an: removeRepo,
|
|
5257
|
-
ao:
|
|
5258
|
-
ap:
|
|
5259
|
-
|
|
5260
|
-
|
|
5261
|
-
|
|
5556
|
+
ao: toggleFork,
|
|
5557
|
+
ap: setBranch,
|
|
5558
|
+
aq: restore,
|
|
5559
|
+
as: createGen.n,
|
|
5560
|
+
au: create,
|
|
5561
|
+
aw: refreshCatalog,
|
|
5262
5562
|
d: _serialize_if($scope0_reason, 0) && _existing_scope($childScope),
|
|
5263
|
-
|
|
5563
|
+
az: $error__closures,
|
|
5264
5564
|
m: _existing_scope($childScope2),
|
|
5565
|
+
ax: $busy__closures,
|
|
5265
5566
|
q: _existing_scope($childScope4),
|
|
5266
|
-
|
|
5267
|
-
|
|
5268
|
-
ax: $restoring__closures
|
|
5567
|
+
b1: $steps_length__closures,
|
|
5568
|
+
ay: $restoring__closures
|
|
5269
5569
|
});
|
|
5270
5570
|
_resume_branch($scope0_id);
|
|
5271
5571
|
});
|
|
@@ -5352,8 +5652,8 @@ function activeAgent(session) {
|
|
|
5352
5652
|
const command = session.state?.command?.trim();
|
|
5353
5653
|
return command && agentFromCommand(command) || session.agent;
|
|
5354
5654
|
}
|
|
5355
|
-
var iconBtn$1 = "
|
|
5356
|
-
var navToggle = "
|
|
5655
|
+
var iconBtn$1 = "_dF _j";
|
|
5656
|
+
var navToggle = "_dK _j";
|
|
5357
5657
|
_template("H", (input) => {
|
|
5358
5658
|
const $scope0_reason = _scope_reason(), $sg__input_size__OR__input_class = _serialize_guard($scope0_reason, 0);
|
|
5359
5659
|
const $scope0_id = _scope_id();
|
|
@@ -5396,12 +5696,12 @@ var ARM_MS = 3500;
|
|
|
5396
5696
|
function disarmLater(fn) {
|
|
5397
5697
|
return setTimeout(fn, ARM_MS);
|
|
5398
5698
|
}
|
|
5399
|
-
var railBtn = "
|
|
5400
|
-
var rowIcon = "
|
|
5401
|
-
var close = "
|
|
5699
|
+
var railBtn = "_gE _j";
|
|
5700
|
+
var rowIcon = "_gN _Z _j";
|
|
5701
|
+
var close = "_gO _Z _j _2";
|
|
5402
5702
|
//#endregion
|
|
5403
5703
|
//#region src/styles/session-pop.css.ts
|
|
5404
|
-
var sessionPop = "
|
|
5704
|
+
var sessionPop = "_f6 _4";
|
|
5405
5705
|
//#endregion
|
|
5406
5706
|
//#region src/client/usage.ts
|
|
5407
5707
|
/** The plan row an agent instance draws on: its own account (`claude2`)
|
|
@@ -5462,22 +5762,22 @@ var usage_pcts_default = _template("C", (input) => {
|
|
|
5462
5762
|
if (windows.length) {
|
|
5463
5763
|
const $scope1_id = _scope_id();
|
|
5464
5764
|
_html(`<span${_attr_class([
|
|
5465
|
-
"
|
|
5765
|
+
"_fe",
|
|
5466
5766
|
input.class,
|
|
5467
|
-
{ ["
|
|
5767
|
+
{ ["_ff"]: agent.stale_seconds != null }
|
|
5468
5768
|
])}${agent.stale_seconds != null ? _attr("title", `${agent.note || "provider unreachable"}; last cached numbers`) : " title=\"Plan usage\""}>`);
|
|
5469
5769
|
_for_of(windows, (win$1, i) => {
|
|
5470
5770
|
const $scope2_id = _scope_id();
|
|
5471
|
-
_html(`<span${_attr_class("
|
|
5771
|
+
_html(`<span${_attr_class("_fg")}>`);
|
|
5472
5772
|
_if(() => {
|
|
5473
5773
|
if (i) {
|
|
5474
5774
|
const $scope3_id = _scope_id();
|
|
5475
|
-
_html(`<span${_attr_class("
|
|
5775
|
+
_html(`<span${_attr_class("_fj")} aria-hidden=true>·</span>`);
|
|
5476
5776
|
$si__input_agent && writeScope($scope3_id, {});
|
|
5477
5777
|
return 0;
|
|
5478
5778
|
}
|
|
5479
5779
|
}, $scope2_id, "b", $sg__input_agent, $sg__input_agent, $sg__input_agent, 0, 1);
|
|
5480
|
-
_html(`<span${_attr_class("
|
|
5780
|
+
_html(`<span${_attr_class("_fh")}>${_escape(win$1.window)}${_el_resume($scope2_id, "d", $sg__input_agent)}</span><span${_attr_class(["_fi", win$1.used_percent >= 90 ? "_dn" : win$1.used_percent >= 70 ? "_dm" : win$1.used_percent >= 40 ? "_dl" : "_dk"])}>${_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
5781
|
$si__input_agent && writeScope($scope2_id, {});
|
|
5482
5782
|
}, "window", $scope1_id, "a", $sg__input_agent, $sg__input_agent__OR__input_class, $sg__input_agent, "</span>", 1);
|
|
5483
5783
|
$si__input_agent__OR__input_class && writeScope($scope1_id, { _: _scope_with_id($scope0_id) });
|
|
@@ -5508,12 +5808,12 @@ var icon_edit_default = _template("M", (input) => {
|
|
|
5508
5808
|
});
|
|
5509
5809
|
_serialize_if($scope0_reason, 0) && writeScope($scope0_id, { a: _existing_scope($childScope) });
|
|
5510
5810
|
});
|
|
5511
|
-
var prChip = "
|
|
5512
|
-
var portChip = "
|
|
5811
|
+
var prChip = "_g_ _s _g9";
|
|
5812
|
+
var portChip = "_ha _s _g9";
|
|
5513
5813
|
var prState = {
|
|
5514
|
-
open: "
|
|
5515
|
-
merged: "
|
|
5516
|
-
closed: "
|
|
5814
|
+
open: "_he",
|
|
5815
|
+
merged: "_hf",
|
|
5816
|
+
closed: "_hg"
|
|
5517
5817
|
};
|
|
5518
5818
|
//#endregion
|
|
5519
5819
|
//#region src/tags/side-nav-chips.marko
|
|
@@ -5561,7 +5861,7 @@ var side_nav_chips_default = _template("v", (input) => {
|
|
|
5561
5861
|
const name = repo.full_name.split("/").at(-1);
|
|
5562
5862
|
return repos.some((r) => r.full_name !== repo.full_name && r.full_name.split("/").at(-1) === name) ? repoLabel(repo.full_name) : name;
|
|
5563
5863
|
}, "v2", $scope1_id);
|
|
5564
|
-
_html(`<div${_attr_class("
|
|
5864
|
+
_html(`<div${_attr_class("_g8")}>`);
|
|
5565
5865
|
_for_of(repos, (repo) => {
|
|
5566
5866
|
const $scope2_id = _scope_id();
|
|
5567
5867
|
const $for_content__repo_worktree__closures = /* @__PURE__ */ new Set();
|
|
@@ -5569,19 +5869,19 @@ var side_nav_chips_default = _template("v", (input) => {
|
|
|
5569
5869
|
const $scope3_id = _scope_id();
|
|
5570
5870
|
const open = isOpen(pr);
|
|
5571
5871
|
_html(`<span${_attr_class([
|
|
5572
|
-
"
|
|
5872
|
+
"_s",
|
|
5573
5873
|
prChip,
|
|
5574
5874
|
{
|
|
5575
|
-
["
|
|
5576
|
-
["
|
|
5875
|
+
["_u"]: open && !pr.isDraft,
|
|
5876
|
+
["_v"]: open && pr.isDraft,
|
|
5577
5877
|
[prState.merged]: pr.state === "MERGED",
|
|
5578
5878
|
[prState.closed]: pr.state === "CLOSED"
|
|
5579
5879
|
}
|
|
5580
|
-
])}${_attr("title", prTitle(repo, pr))}><a${_attr_class(["
|
|
5880
|
+
])}${_attr("title", prTitle(repo, pr))}><a${_attr_class(["_hb", { ["_hi"]: !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
5881
|
_if(() => {
|
|
5582
5882
|
if (open) {
|
|
5583
5883
|
const $scope4_id = _scope_id();
|
|
5584
|
-
_html(`<a${_attr_class(["
|
|
5884
|
+
_html(`<a${_attr_class(["_hb", "_hc"])}${_attr("href", `/w/${input.workspaceId}/review?pr=${encodeURIComponent(`${repo.worktree}/${pr.number}`)}`)}${_attr("title", `Review #${pr.number} changes`)}>`);
|
|
5585
5885
|
icon_diff_default({ size: 12 });
|
|
5586
5886
|
_html(`</a>${_el_resume($scope4_id, "a", _serialize_guard($scope0_reason, 0))}`);
|
|
5587
5887
|
_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 +5889,9 @@ var side_nav_chips_default = _template("v", (input) => {
|
|
|
5589
5889
|
} else {
|
|
5590
5890
|
const $scope6_id = _scope_id();
|
|
5591
5891
|
_html(`<button type=button${_attr_class([
|
|
5592
|
-
"
|
|
5593
|
-
"
|
|
5594
|
-
"
|
|
5892
|
+
"_hb",
|
|
5893
|
+
"_hc",
|
|
5894
|
+
"_hd"
|
|
5595
5895
|
])}${_attr("title", `Dismiss #${pr.number}`)}>`);
|
|
5596
5896
|
icon_xmark_default({ size: 12 });
|
|
5597
5897
|
_html(`</button>${_el_resume($scope6_id, "a")}`);
|
|
@@ -5616,11 +5916,11 @@ var side_nav_chips_default = _template("v", (input) => {
|
|
|
5616
5916
|
}, "full_name", $scope1_id, "b", $sg__input_status_repos, $sg__input_status_repos, $sg__input_status_repos__OR__input_status_ports);
|
|
5617
5917
|
_for_of(ports, (p) => {
|
|
5618
5918
|
const $scope5_id = _scope_id();
|
|
5619
|
-
_html(`<span${_attr_class(["
|
|
5620
|
-
"
|
|
5621
|
-
"
|
|
5622
|
-
"
|
|
5623
|
-
{ ["
|
|
5919
|
+
_html(`<span${_attr_class(["_s", portChip])}${_attr("title", p.cmd)}><button type=button${_attr_class(["_hb", "_hh"])}${_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([
|
|
5920
|
+
"_hb",
|
|
5921
|
+
"_hc",
|
|
5922
|
+
"_hd",
|
|
5923
|
+
{ ["_q"]: armedPid === p.pid }
|
|
5624
5924
|
])}${armedPid === p.pid ? " title=Kill?" : _attr("title", `Kill ${p.cmd} (pid ${p.pid})`)}>`);
|
|
5625
5925
|
icon_xmark_default({ size: 12 });
|
|
5626
5926
|
_html(`</button>${_el_resume($scope5_id, "d")}</span>${_el_resume($scope5_id, "a", $sg__input_status_ports)}`);
|
|
@@ -5711,10 +6011,10 @@ var side_nav_item_default = _template("w", (input) => {
|
|
|
5711
6011
|
_if(() => {
|
|
5712
6012
|
if (input.rail) {
|
|
5713
6013
|
const $scope2_id = _scope_id();
|
|
5714
|
-
_html(`<a${_attr("href", `/w/${ws$1.id}`)}${_attr_class([railBtn, { ["
|
|
5715
|
-
"
|
|
6014
|
+
_html(`<a${_attr("href", `/w/${ws$1.id}`)}${_attr_class([railBtn, { ["_gC"]: 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([
|
|
6015
|
+
"_z",
|
|
5716
6016
|
phase[dot],
|
|
5717
|
-
"
|
|
6017
|
+
"_gF"
|
|
5718
6018
|
])}></span>${_el_resume($scope2_id, "c", $sg__input_workspaceId__OR__input_status)}</a>${_el_resume($scope2_id, "a", _serialize_guard($scope0_reason, 3))}`);
|
|
5719
6019
|
_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
6020
|
return 0;
|
|
@@ -5722,15 +6022,15 @@ var side_nav_item_default = _template("w", (input) => {
|
|
|
5722
6022
|
const $scope3_id = _scope_id();
|
|
5723
6023
|
const sessions$1 = input.sessions || [];
|
|
5724
6024
|
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
|
-
"
|
|
6025
|
+
_html(`<section${_attr_class(["_gH", {
|
|
6026
|
+
["_gC"]: input.current,
|
|
6027
|
+
["_5"]: input.current,
|
|
6028
|
+
["_gI"]: input.railPop,
|
|
6029
|
+
["_gG"]: input.page
|
|
6030
|
+
}])}><div${_attr_class("_gJ")}><a${_attr("href", `/w/${ws$1.id}`)}${_attr_class("_gK")}><span${_attr_class([
|
|
6031
|
+
"_z",
|
|
5732
6032
|
phase[dot],
|
|
5733
|
-
"
|
|
6033
|
+
"_gX"
|
|
5734
6034
|
])}${_attr("title", phaseLabel)}></span>${_el_resume($scope3_id, "d", $sg__input_workspaceId__OR__input_status)}`);
|
|
5735
6035
|
_if(() => {
|
|
5736
6036
|
if (sessions$1.length === 1) {
|
|
@@ -5743,7 +6043,7 @@ var side_nav_item_default = _template("w", (input) => {
|
|
|
5743
6043
|
icon_agent_default({
|
|
5744
6044
|
agent: activeAgent(sessions$1[0]),
|
|
5745
6045
|
size: 12,
|
|
5746
|
-
class: "
|
|
6046
|
+
class: "_gP"
|
|
5747
6047
|
});
|
|
5748
6048
|
$si__input_sessions && writeScope($scope14_id, {
|
|
5749
6049
|
_: _scope_with_id($scope3_id),
|
|
@@ -5753,16 +6053,16 @@ var side_nav_item_default = _template("w", (input) => {
|
|
|
5753
6053
|
}
|
|
5754
6054
|
}, $scope3_id, "e", $sg__input_sessions, $sg__input_sessions);
|
|
5755
6055
|
const metaText = sessions$1.length === 0 ? phaseLabel : sessions$1.length === 1 ? sessions$1[0].title || "" : `${sessions$1.length} sessions`;
|
|
5756
|
-
_html(`<span${_attr_class("
|
|
6056
|
+
_html(`<span${_attr_class("_gQ")}><span${_attr_class("_gR")}>${_escape(ws$1.name)}${_el_resume($scope3_id, "h", $sg__input_workspaces__OR__input_workspaceId)}</span>`);
|
|
5757
6057
|
_if(() => {
|
|
5758
6058
|
if (input.page && metaText) {
|
|
5759
6059
|
const $scope16_id = _scope_id();
|
|
5760
|
-
_html(`<span${_attr_class("
|
|
6060
|
+
_html(`<span${_attr_class("_gV")}>${_escape(metaText)}${_el_resume($scope16_id, "b", _serialize_guard($scope0_reason, 7))}</span>`);
|
|
5761
6061
|
$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
6062
|
return 0;
|
|
5763
6063
|
} else if (sessions$1.length === 1 && sessions$1[0].title) {
|
|
5764
6064
|
const $scope15_id = _scope_id();
|
|
5765
|
-
_html(`<span${_attr_class("
|
|
6065
|
+
_html(`<span${_attr_class("_gS")}>${_escape(sessions$1[0].title)}${_el_resume($scope15_id, "b", $sg__input_sessions)}</span>`);
|
|
5766
6066
|
$si__input_page__OR__input_sessions__OR__input_workspaceId__OR__input_status && writeScope($scope15_id, { _: $si__input_sessions && _scope_with_id($scope3_id) });
|
|
5767
6067
|
return 1;
|
|
5768
6068
|
}
|
|
@@ -5772,10 +6072,10 @@ var side_nav_item_default = _template("w", (input) => {
|
|
|
5772
6072
|
if (input.page) {
|
|
5773
6073
|
const $scope4_id = _scope_id();
|
|
5774
6074
|
_html(`<span${_attr_class([
|
|
5775
|
-
"
|
|
5776
|
-
"
|
|
5777
|
-
"
|
|
5778
|
-
"
|
|
6075
|
+
"_I",
|
|
6076
|
+
"_R",
|
|
6077
|
+
"_K",
|
|
6078
|
+
"_gW"
|
|
5779
6079
|
])}>${input.current ? "Open" : ""}${_el_resume($scope4_id, "b", _serialize_guard($scope0_reason, 21))}</span>`);
|
|
5780
6080
|
$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
6081
|
_: _scope_with_id($scope3_id),
|
|
@@ -5788,7 +6088,7 @@ var side_nav_item_default = _template("w", (input) => {
|
|
|
5788
6088
|
_if(() => {
|
|
5789
6089
|
if (!input.page) {
|
|
5790
6090
|
const $scope5_id = _scope_id();
|
|
5791
|
-
_html(`<div${_attr_class("
|
|
6091
|
+
_html(`<div${_attr_class("_gL")}>`);
|
|
5792
6092
|
_if(() => {
|
|
5793
6093
|
if (input.onNewSession) {
|
|
5794
6094
|
const $scope6_id = _scope_id();
|
|
@@ -5802,7 +6102,7 @@ var side_nav_item_default = _template("w", (input) => {
|
|
|
5802
6102
|
_html(`</button>${_el_resume($scope6_id, "a")}<div${_attr("id", newPopId)} popover=auto${_attr_class(sessionPop)}>`);
|
|
5803
6103
|
_for_of([], (agent) => {
|
|
5804
6104
|
const $scope7_id = _scope_id();
|
|
5805
|
-
_html(`<button${_attr_class("
|
|
6105
|
+
_html(`<button${_attr_class("_f7")}>`);
|
|
5806
6106
|
_set_serialize_reason(12);
|
|
5807
6107
|
const $childScope2 = _peek_scope_id();
|
|
5808
6108
|
icon_agent_default({
|
|
@@ -5837,7 +6137,7 @@ var side_nav_item_default = _template("w", (input) => {
|
|
|
5837
6137
|
return 0;
|
|
5838
6138
|
}
|
|
5839
6139
|
}, $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, { ["
|
|
6140
|
+
_html(`<a${input.managing ? _attr("href", `/w/${ws$1.id}`) : _attr("href", `/w/${ws$1.id}/manage`)}${_attr_class([rowIcon, { ["_gD"]: input.managing }])} title=${input.managing ? "\"Back to terminal\"" : "\"Manage workspace\""}${input.managing ? " aria-current=page" : ""}>`);
|
|
5841
6141
|
icon_manage_default({ size: 12 });
|
|
5842
6142
|
_html(`</a>${_el_resume($scope5_id, "d", _serialize_guard($scope0_reason, 8))}</div>`);
|
|
5843
6143
|
_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 +6147,7 @@ var side_nav_item_default = _template("w", (input) => {
|
|
|
5847
6147
|
return 0;
|
|
5848
6148
|
}
|
|
5849
6149
|
}, $scope3_id, "k", $sg__input_page, $sg__input_page, 1, 0, 1);
|
|
5850
|
-
_html(`</div><div${_attr_class("
|
|
6150
|
+
_html(`</div><div${_attr_class("_g2")}>`);
|
|
5851
6151
|
_if(() => {
|
|
5852
6152
|
if (sessions$1.length === 1 && openPlan) {
|
|
5853
6153
|
const $scope11_id = _scope_id();
|
|
@@ -5855,7 +6155,7 @@ var side_nav_item_default = _template("w", (input) => {
|
|
|
5855
6155
|
const $childScope3 = _peek_scope_id();
|
|
5856
6156
|
usage_pcts_default({
|
|
5857
6157
|
agent: openPlan,
|
|
5858
|
-
class: "
|
|
6158
|
+
class: "_gT"
|
|
5859
6159
|
});
|
|
5860
6160
|
_subscribe($openPlan__closures, writeScope($scope11_id, {
|
|
5861
6161
|
a: _existing_scope($childScope3),
|
|
@@ -5866,14 +6166,14 @@ var side_nav_item_default = _template("w", (input) => {
|
|
|
5866
6166
|
}, $scope3_id, "m");
|
|
5867
6167
|
_for_of(sessions$1.length > 1 ? sessions$1 : [], (s) => {
|
|
5868
6168
|
const $scope8_id = _scope_id();
|
|
5869
|
-
_html(`<div${_attr_class(["
|
|
6169
|
+
_html(`<div${_attr_class(["_gM", { ["_gC"]: s.id === input.currentTab }])}>`);
|
|
5870
6170
|
_if(() => {
|
|
5871
6171
|
if (renamingId === s.id) {
|
|
5872
6172
|
const $scope10_id = _scope_id();
|
|
5873
6173
|
_html(`<span${_attr_class([
|
|
5874
|
-
"
|
|
6174
|
+
"_z",
|
|
5875
6175
|
phase[sessionPhase(s.state)],
|
|
5876
|
-
"
|
|
6176
|
+
"_g0"
|
|
5877
6177
|
])}></span>${_el_resume($scope10_id, "a", $sg__input_sessions)}`);
|
|
5878
6178
|
_set_serialize_reason({
|
|
5879
6179
|
1: $sg__input_sessions,
|
|
@@ -5883,17 +6183,17 @@ var side_nav_item_default = _template("w", (input) => {
|
|
|
5883
6183
|
icon_agent_default({
|
|
5884
6184
|
agent: activeAgent(s),
|
|
5885
6185
|
size: 13,
|
|
5886
|
-
class: "
|
|
6186
|
+
class: "_g4"
|
|
5887
6187
|
});
|
|
5888
6188
|
_html(`<input${_attr_input_value($scope10_id, "c", renameValue, _resume((_new_renameValue) => {
|
|
5889
6189
|
renameValue = _new_renameValue;
|
|
5890
|
-
}, "w0", $scope10_id))}${_attr_class(["
|
|
6190
|
+
}, "w0", $scope10_id))}${_attr_class(["_U", "_g1"])} aria-label="Session name">${_el_resume($scope10_id, "c")}`);
|
|
5891
6191
|
_script($scope10_id, "w5");
|
|
5892
6192
|
_subscribe($renameValue__closures, writeScope($scope10_id, { b: $si__input_sessions && _existing_scope($childScope4) }));
|
|
5893
6193
|
return 0;
|
|
5894
6194
|
} else {
|
|
5895
6195
|
const $scope9_id = _scope_id();
|
|
5896
|
-
_html(`<a${_attr("href", `/w/${ws$1.id}?s=${s.id}`)}${_attr_class("
|
|
6196
|
+
_html(`<a${_attr("href", `/w/${ws$1.id}?s=${s.id}`)}${_attr_class("_g3")}><span${_attr_class(["_z", phase[sessionPhase(s.state)]])}></span>${_el_resume($scope9_id, "b", $sg__input_sessions)}`);
|
|
5897
6197
|
_set_serialize_reason({
|
|
5898
6198
|
1: $sg__input_sessions,
|
|
5899
6199
|
2: $sg__input_sessions
|
|
@@ -5902,11 +6202,11 @@ var side_nav_item_default = _template("w", (input) => {
|
|
|
5902
6202
|
icon_agent_default({
|
|
5903
6203
|
agent: activeAgent(s),
|
|
5904
6204
|
size: 13,
|
|
5905
|
-
class: "
|
|
6205
|
+
class: "_g4"
|
|
5906
6206
|
});
|
|
5907
|
-
_html(`<span${_attr_class("
|
|
6207
|
+
_html(`<span${_attr_class("_gY")}>${_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("_gZ")}><button${_attr_class(rowIcon)} title="Rename session">`);
|
|
5908
6208
|
icon_edit_default({ size: 12 });
|
|
5909
|
-
_html(`</button>${_el_resume($scope9_id, "g")}<button${_attr_class([close, { ["
|
|
6209
|
+
_html(`</button>${_el_resume($scope9_id, "g")}<button${_attr_class([close, { ["_q"]: armedKill === s.id }])} title=${armedKill === s.id ? "Close?" : "\"Close session\""}>`);
|
|
5910
6210
|
icon_xmark_default({ size: 12 });
|
|
5911
6211
|
_html(`</button>${_el_resume($scope9_id, "i")}</div>`);
|
|
5912
6212
|
_if(() => {
|
|
@@ -5916,7 +6216,7 @@ var side_nav_item_default = _template("w", (input) => {
|
|
|
5916
6216
|
const $childScope6 = _peek_scope_id();
|
|
5917
6217
|
usage_pcts_default({
|
|
5918
6218
|
agent: openPlan,
|
|
5919
|
-
class: "
|
|
6219
|
+
class: "_gU"
|
|
5920
6220
|
});
|
|
5921
6221
|
_subscribe($openPlan__closures, writeScope($scope12_id, {
|
|
5922
6222
|
a: _existing_scope($childScope6),
|
|
@@ -6070,7 +6370,7 @@ var icon_sidebar_collapse_default = _template("V", (input) => {
|
|
|
6070
6370
|
//#endregion
|
|
6071
6371
|
//#region src/tags/side-nav.marko
|
|
6072
6372
|
var side_nav_default = _template("x", (input) => {
|
|
6073
|
-
const $scope0_reason = _scope_reason(), $sg__input_instanceName = _serialize_guard($scope0_reason,
|
|
6373
|
+
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
6374
|
const $scope0_id = _scope_id();
|
|
6075
6375
|
const $input_instanceName__closures = /* @__PURE__ */ new Set();
|
|
6076
6376
|
const $iconSrc__closures = /* @__PURE__ */ new Set();
|
|
@@ -6119,34 +6419,34 @@ var side_nav_default = _template("x", (input) => {
|
|
|
6119
6419
|
const iconSrc = `/api/instance/icon${input.instanceAccent ? `?v=${input.instanceAccent.slice(1)}` : ""}`;
|
|
6120
6420
|
const otherIds = itemIds.filter((id) => id !== ws.id);
|
|
6121
6421
|
const listIds = isPage ? [ws.id, ...otherIds] : itemIds;
|
|
6122
|
-
_html(`<aside${_attr_class(["
|
|
6123
|
-
["
|
|
6124
|
-
["
|
|
6422
|
+
_html(`<aside${_attr_class(["_dJ", {
|
|
6423
|
+
["_dH"]: !navOpen,
|
|
6424
|
+
["_dI"]: isPage
|
|
6125
6425
|
}])}${_attr("hidden", view === "diff")}>`);
|
|
6126
6426
|
_if(() => {
|
|
6127
6427
|
if (isPage) {
|
|
6128
6428
|
const $scope1_id = _scope_id();
|
|
6129
|
-
_html(`<header${_attr_class("
|
|
6429
|
+
_html(`<header${_attr_class("_dM")}><div${_attr_class("_dV")}>`);
|
|
6130
6430
|
_if(() => {
|
|
6131
6431
|
if (input.instanceName) {
|
|
6132
6432
|
const $scope2_id = _scope_id();
|
|
6133
|
-
_html(`<div${_attr_class("
|
|
6433
|
+
_html(`<div${_attr_class("_dS")} title="This work server (Settings → Appearance)"><img${_attr_class("_dT")}${_attr("src", iconSrc)} alt aria-hidden=true>${_el_resume($scope2_id, "b", $sg__input_instanceAccent)}<span${_attr_class("_dU")}>${_escape(input.instanceName)}${_el_resume($scope2_id, "d", $sg__input_instanceName)}</span></div>`);
|
|
6134
6434
|
_subscribe($si__input_instanceAccent && $iconSrc__closures, _subscribe($si__input_instanceName && $input_instanceName__closures, writeScope($scope2_id, { _: _scope_with_id($scope1_id) })));
|
|
6135
6435
|
return 0;
|
|
6136
6436
|
}
|
|
6137
6437
|
}, $scope1_id, "c", $sg__input_instanceName, $sg__input_instanceName, 1, 0, 1);
|
|
6138
|
-
_html(`<h1${_attr_class("
|
|
6438
|
+
_html(`<h1${_attr_class("_dN")}>Workspaces</h1></div><div${_attr_class("_dO")}>`);
|
|
6139
6439
|
_if(() => {}, $scope1_id, "f", 1, 1, 1, 0, 1);
|
|
6140
6440
|
_html(`<a${view === "settings" ? _attr("href", backHref) : " href=/settings"}${_attr_class([
|
|
6141
6441
|
iconBtn$1,
|
|
6142
|
-
"
|
|
6143
|
-
{ ["
|
|
6442
|
+
"_dP",
|
|
6443
|
+
{ ["_dE"]: view === "settings" }
|
|
6144
6444
|
])} title=${view === "settings" ? "\"Back to workspace\"" : "Settings"}${view === "settings" ? " aria-current=page" : ""}>`);
|
|
6145
6445
|
icon_settings_default({ size: 16 });
|
|
6146
6446
|
_if(() => {
|
|
6147
6447
|
if (input.setupReady === false) {
|
|
6148
6448
|
const $scope12_id = _scope_id();
|
|
6149
|
-
_html(`<span${_attr_class(["
|
|
6449
|
+
_html(`<span${_attr_class(["_z", "_dG"])} title="Machine setup incomplete"></span>`);
|
|
6150
6450
|
$si__input_setupReady && writeScope($scope12_id, {});
|
|
6151
6451
|
return 0;
|
|
6152
6452
|
}
|
|
@@ -6159,18 +6459,18 @@ var side_nav_default = _template("x", (input) => {
|
|
|
6159
6459
|
_if(() => {
|
|
6160
6460
|
if (!isPage && input.instanceName) {
|
|
6161
6461
|
const $scope3_id = _scope_id();
|
|
6162
|
-
_html(`<div${_attr_class("
|
|
6462
|
+
_html(`<div${_attr_class("_dS")} title="This work server (Settings → Appearance)"><img${_attr_class("_dT")}${_attr("src", iconSrc)} alt aria-hidden=true>${_el_resume($scope3_id, "b", $sg__input_instanceAccent)}<span${_attr_class("_dU")}>${_escape(input.instanceName)}${_el_resume($scope3_id, "d", $sg__input_instanceName)}</span></div>`);
|
|
6163
6463
|
writeScope($scope3_id, {});
|
|
6164
6464
|
return 0;
|
|
6165
6465
|
}
|
|
6166
6466
|
}, $scope0_id, "c", 1, 1, 1, 0, 1);
|
|
6167
|
-
_html(`<div${_attr_class("
|
|
6467
|
+
_html(`<div${_attr_class("_dW")}>`);
|
|
6168
6468
|
_for_of(listIds, (wsId) => {
|
|
6169
6469
|
const $scope4_id = _scope_id();
|
|
6170
6470
|
_if(() => {
|
|
6171
6471
|
if (isPage && wsId === ws.id) {
|
|
6172
6472
|
const $scope13_id = _scope_id();
|
|
6173
|
-
_html(`<h2${_attr_class(["_bH", "
|
|
6473
|
+
_html(`<h2${_attr_class(["_bH", "_dQ"])}>Current</h2>`);
|
|
6174
6474
|
writeScope($scope13_id, {});
|
|
6175
6475
|
return 0;
|
|
6176
6476
|
}
|
|
@@ -6178,7 +6478,7 @@ var side_nav_default = _template("x", (input) => {
|
|
|
6178
6478
|
_if(() => {
|
|
6179
6479
|
if (isPage && wsId !== ws.id && wsId === otherIds[0]) {
|
|
6180
6480
|
const $scope14_id = _scope_id();
|
|
6181
|
-
_html(`<h2${_attr_class(["_bH", "
|
|
6481
|
+
_html(`<h2${_attr_class(["_bH", "_dQ"])}>Other workspaces</h2>`);
|
|
6182
6482
|
writeScope($scope14_id, {});
|
|
6183
6483
|
return 0;
|
|
6184
6484
|
}
|
|
@@ -6265,7 +6565,7 @@ var side_nav_default = _template("x", (input) => {
|
|
|
6265
6565
|
railHover = null;
|
|
6266
6566
|
}, 150);
|
|
6267
6567
|
}, "x6", $scope5_id);
|
|
6268
|
-
_html(`<div${_attr_class("
|
|
6568
|
+
_html(`<div${_attr_class("_dX")}>`);
|
|
6269
6569
|
_for_of(itemIds, (wsId, i) => {
|
|
6270
6570
|
const $scope6_id = _scope_id();
|
|
6271
6571
|
_html("<span>");
|
|
@@ -6312,14 +6612,14 @@ var side_nav_default = _template("x", (input) => {
|
|
|
6312
6612
|
_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
6613
|
d: wsId,
|
|
6314
6614
|
_: _scope_with_id($scope5_id),
|
|
6315
|
-
b: _serialize_if($scope0_reason,
|
|
6615
|
+
b: _serialize_if($scope0_reason, 3) && _existing_scope($childScope2)
|
|
6316
6616
|
}))));
|
|
6317
6617
|
}, (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
6618
|
_if(() => {
|
|
6319
6619
|
if (railHover) {
|
|
6320
6620
|
const $scope7_id = _scope_id();
|
|
6321
6621
|
const hoverId = railHover.id;
|
|
6322
|
-
_html(`<div${_attr_class(["
|
|
6622
|
+
_html(`<div${_attr_class(["_4", "_d0"])}${_attr_style(`top:${railHover.top}px;left:${railHover.left}px`)}>`);
|
|
6323
6623
|
_set_serialize_reason({
|
|
6324
6624
|
0: 1,
|
|
6325
6625
|
1: 1,
|
|
@@ -6386,7 +6686,7 @@ var side_nav_default = _template("x", (input) => {
|
|
|
6386
6686
|
});
|
|
6387
6687
|
_html(`</div>${_el_resume($scope7_id, "a")}`);
|
|
6388
6688
|
_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, {
|
|
6689
|
+
_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
6690
|
d: hoverId,
|
|
6391
6691
|
b: _existing_scope($childScope3),
|
|
6392
6692
|
Cb4: $si__input_workspace && 1,
|
|
@@ -6407,15 +6707,15 @@ var side_nav_default = _template("x", (input) => {
|
|
|
6407
6707
|
return 0;
|
|
6408
6708
|
}
|
|
6409
6709
|
}, $scope0_id, "e");
|
|
6410
|
-
_html(`<div${_attr_class("
|
|
6710
|
+
_html(`<div${_attr_class("_dY")}>`);
|
|
6411
6711
|
_if(() => {
|
|
6412
6712
|
if (isPage) {
|
|
6413
6713
|
const $scope9_id = _scope_id();
|
|
6414
6714
|
_html(`<a${view === "new" ? _attr("href", backHref) : " href=/new"}${_attr_class([
|
|
6415
|
-
"
|
|
6416
|
-
"
|
|
6715
|
+
"_o",
|
|
6716
|
+
"_p",
|
|
6417
6717
|
btnLg,
|
|
6418
|
-
"
|
|
6718
|
+
"_dR"
|
|
6419
6719
|
])} title=${view === "new" ? "\"Back to workspace\"" : "\"New workspace\""}${view === "new" ? " aria-current=page" : ""}>`);
|
|
6420
6720
|
icon_folder_plus_default({ size: 16 });
|
|
6421
6721
|
_html(` New workspace</a>${_el_resume($scope9_id, "a")}`);
|
|
@@ -6437,19 +6737,19 @@ var side_nav_default = _template("x", (input) => {
|
|
|
6437
6737
|
return 1;
|
|
6438
6738
|
}
|
|
6439
6739
|
}, $scope8_id, "a", 1, 1, 1, "</button>", 1);
|
|
6440
|
-
_html(`<div${_attr_class(["
|
|
6740
|
+
_html(`<div${_attr_class(["_y", "_dZ"])}></div>`);
|
|
6441
6741
|
_if(() => {}, $scope8_id, "c", 1, 1, 1, 0, 1);
|
|
6442
|
-
_html(`<a${view === "settings" ? _attr("href", backHref) : " href=/settings"}${_attr_class([iconBtn$1, { ["
|
|
6742
|
+
_html(`<a${view === "settings" ? _attr("href", backHref) : " href=/settings"}${_attr_class([iconBtn$1, { ["_dE"]: view === "settings" }])} title=${view === "settings" ? "\"Back to workspace\"" : "Settings"}${view === "settings" ? " aria-current=page" : ""}>`);
|
|
6443
6743
|
icon_settings_default({ size: 15 });
|
|
6444
6744
|
_if(() => {
|
|
6445
6745
|
if (input.setupReady === false) {
|
|
6446
6746
|
const $scope17_id = _scope_id();
|
|
6447
|
-
_html(`<span${_attr_class(["
|
|
6747
|
+
_html(`<span${_attr_class(["_z", "_dG"])} title="Machine setup incomplete"></span>`);
|
|
6448
6748
|
$si__input_setupReady && writeScope($scope17_id, {});
|
|
6449
6749
|
return 0;
|
|
6450
6750
|
}
|
|
6451
6751
|
}, $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, { ["
|
|
6752
|
+
_html(`</a>${_el_resume($scope8_id, "d")}<a${view === "new" ? _attr("href", backHref) : " href=/new"}${_attr_class([iconBtn$1, { ["_dE"]: view === "new" }])} title=${view === "new" ? "\"Back to workspace\"" : "\"New workspace\""}${view === "new" ? " aria-current=page" : ""}>`);
|
|
6453
6753
|
icon_folder_plus_default({ size: 16 });
|
|
6454
6754
|
_html(`</a>${_el_resume($scope8_id, "g")}`);
|
|
6455
6755
|
_script($scope8_id, "x15");
|
|
@@ -6461,10 +6761,10 @@ var side_nav_default = _template("x", (input) => {
|
|
|
6461
6761
|
_script($scope0_id, "x16");
|
|
6462
6762
|
_script($scope0_id, "x17");
|
|
6463
6763
|
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,
|
|
6764
|
+
j: _serialize_if($scope0_reason, 6) && input.tab,
|
|
6765
|
+
k: _serialize_if($scope0_reason, 5) && input.tabChange,
|
|
6766
|
+
m: _serialize_if($scope0_reason, 8) && input.view,
|
|
6767
|
+
n: _serialize_if($scope0_reason, 7) && input.viewChange,
|
|
6468
6768
|
p: input.onError,
|
|
6469
6769
|
q: input.active,
|
|
6470
6770
|
r: $si__input_workspace && input.allWorkspaces,
|
|
@@ -6477,7 +6777,7 @@ var side_nav_default = _template("x", (input) => {
|
|
|
6477
6777
|
a0: input.sessions,
|
|
6478
6778
|
a1: input.onRenameSession,
|
|
6479
6779
|
a2: input.onCloseSession,
|
|
6480
|
-
a3: _serialize_if($scope0_reason,
|
|
6780
|
+
a3: _serialize_if($scope0_reason, 9) && ws,
|
|
6481
6781
|
a5: ws?.id,
|
|
6482
6782
|
a7: tab,
|
|
6483
6783
|
a9: view,
|
|
@@ -6494,7 +6794,6 @@ var side_nav_default = _template("x", (input) => {
|
|
|
6494
6794
|
aq: iconSrc,
|
|
6495
6795
|
ar: otherIds,
|
|
6496
6796
|
at: otherIds?.[0],
|
|
6497
|
-
a8: input.tabChange || void 0,
|
|
6498
6797
|
aa: input.viewChange || void 0,
|
|
6499
6798
|
av: $si__input_instanceName && $input_instanceName__closures,
|
|
6500
6799
|
bg: $si__input_instanceAccent && $iconSrc__closures,
|
|
@@ -6509,17 +6808,17 @@ var side_nav_default = _template("x", (input) => {
|
|
|
6509
6808
|
b1: $si__input_sessions && $input_sessions__closures,
|
|
6510
6809
|
b2: $si__input_onRenameSession && $input_onRenameSession__closures,
|
|
6511
6810
|
b3: $si__input_onCloseSession && $input_onCloseSession__closures,
|
|
6512
|
-
b5: $tab__closures,
|
|
6811
|
+
b5: $si__input_tab__OR__input_tabChange && $tab__closures,
|
|
6513
6812
|
b6: $view__closures
|
|
6514
6813
|
});
|
|
6515
6814
|
_resume_branch($scope0_id);
|
|
6516
6815
|
});
|
|
6517
|
-
var iconBtn = "
|
|
6518
|
-
var sectionCount = "_bu
|
|
6519
|
-
var content = "
|
|
6520
|
-
var pageMeta = "
|
|
6521
|
-
var pathMeta = "
|
|
6522
|
-
var dangerHint = "
|
|
6816
|
+
var iconBtn = "_0 _j";
|
|
6817
|
+
var sectionCount = "_bu _I _J";
|
|
6818
|
+
var content = "_dt _bk";
|
|
6819
|
+
var pageMeta = "_du _bp";
|
|
6820
|
+
var pathMeta = "_dx _x";
|
|
6821
|
+
var dangerHint = "_dD _S";
|
|
6523
6822
|
//#endregion
|
|
6524
6823
|
//#region src/tags/manage-workspace.marko
|
|
6525
6824
|
var api$2;
|
|
@@ -6557,7 +6856,7 @@ var manage_workspace_default = _template("n", (input) => {
|
|
|
6557
6856
|
else next.delete(name);
|
|
6558
6857
|
busy = next;
|
|
6559
6858
|
}, "n1", $scope0_id);
|
|
6560
|
-
const addRepo = _resume(async (name, baseBranch) => {
|
|
6859
|
+
const addRepo = _resume(async (name, baseBranch, fork) => {
|
|
6561
6860
|
if (!name || busy.has(name)) return;
|
|
6562
6861
|
error = null;
|
|
6563
6862
|
setBusy(name, true);
|
|
@@ -6567,7 +6866,8 @@ var manage_workspace_default = _template("n", (input) => {
|
|
|
6567
6866
|
headers: { "content-type": "application/json" },
|
|
6568
6867
|
body: JSON.stringify({
|
|
6569
6868
|
fullName: name,
|
|
6570
|
-
baseBranch
|
|
6869
|
+
baseBranch,
|
|
6870
|
+
fork
|
|
6571
6871
|
})
|
|
6572
6872
|
});
|
|
6573
6873
|
} catch (err) {
|
|
@@ -6630,16 +6930,16 @@ var manage_workspace_default = _template("n", (input) => {
|
|
|
6630
6930
|
meta: attrTag({ content: _content_resume("n11", () => {
|
|
6631
6931
|
_scope_reason();
|
|
6632
6932
|
const $scope8_id = _scope_id();
|
|
6633
|
-
_html(`<span${_attr_class(pageMeta)}${_attr("title", ws.display_path || ws.path)}><span${_attr_class("
|
|
6933
|
+
_html(`<span${_attr_class(pageMeta)}${_attr("title", ws.display_path || ws.path)}><span${_attr_class("_dv")}>${_escape(ws.name)}${_el_resume($scope8_id, "c")}</span>`);
|
|
6634
6934
|
_if(() => {
|
|
6635
6935
|
if (ws.status !== "active") {
|
|
6636
6936
|
const $scope11_id = _scope_id();
|
|
6637
|
-
_html(`<span${_attr_class(["
|
|
6937
|
+
_html(`<span${_attr_class(["_I", "_K"])}>Archived</span>`);
|
|
6638
6938
|
writeScope($scope11_id, {});
|
|
6639
6939
|
return 0;
|
|
6640
6940
|
}
|
|
6641
6941
|
}, $scope8_id, "d", 1, 1, 1, 0, 1);
|
|
6642
|
-
_html(`<span${_attr_class("
|
|
6942
|
+
_html(`<span${_attr_class("_dw")} 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
6943
|
_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
6944
|
_resume_branch($scope8_id);
|
|
6645
6945
|
}, $scope0_id) })
|
|
@@ -6667,26 +6967,26 @@ var manage_workspace_default = _template("n", (input) => {
|
|
|
6667
6967
|
_if(() => {
|
|
6668
6968
|
if (pendingAction && actionStep) {
|
|
6669
6969
|
const $scope7_id = _scope_id();
|
|
6670
|
-
_html(`<p${_attr_class("_br")}><span${_attr_class("
|
|
6970
|
+
_html(`<p${_attr_class("_br")}><span${_attr_class("_F")}></span><!>${_escape(actionStep)}${_el_resume($scope7_id, "c")}</p>`);
|
|
6671
6971
|
writeScope($scope7_id, {});
|
|
6672
6972
|
return 0;
|
|
6673
6973
|
}
|
|
6674
6974
|
}, $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("
|
|
6975
|
+
_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
6976
|
_set_serialize_reason(1);
|
|
6677
6977
|
const $childScope2 = _peek_scope_id();
|
|
6678
6978
|
icon_refresh_default({
|
|
6679
6979
|
size: 14,
|
|
6680
|
-
class: catalogRefreshing && "
|
|
6980
|
+
class: catalogRefreshing && "_E"
|
|
6681
6981
|
});
|
|
6682
6982
|
_html(`</button>${_el_resume($scope0_id, "m")}</div><ul${_attr_class("_bv")}>`);
|
|
6683
6983
|
_for_of(ws.repos, (row) => {
|
|
6684
6984
|
const $scope1_id = _scope_id();
|
|
6685
|
-
_html(`<li${_attr_class("_bx")}><div${_attr_class("_by")}><span${_attr_class(["_bz", "
|
|
6985
|
+
_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", "_dz"])}${_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
6986
|
_if(() => {
|
|
6687
6987
|
if (row.base_branch !== row.default_branch) {
|
|
6688
6988
|
const $scope12_id = _scope_id();
|
|
6689
|
-
_html(`<span${_attr_class(["
|
|
6989
|
+
_html(`<span${_attr_class(["_I", "_x"])} title="Base branch">⎇ <!>${_escape(row.base_branch)}${_el_resume($scope12_id, "b")}</span>`);
|
|
6690
6990
|
writeScope($scope12_id, {});
|
|
6691
6991
|
return 0;
|
|
6692
6992
|
}
|
|
@@ -6695,16 +6995,16 @@ var manage_workspace_default = _template("n", (input) => {
|
|
|
6695
6995
|
_if(() => {
|
|
6696
6996
|
if (busy.has(row.full_name)) {
|
|
6697
6997
|
const $scope13_id = _scope_id();
|
|
6698
|
-
_html(`<span${_attr_class("
|
|
6998
|
+
_html(`<span${_attr_class("_F")}></span>`);
|
|
6699
6999
|
writeScope($scope13_id, {});
|
|
6700
7000
|
return 0;
|
|
6701
7001
|
} else {
|
|
6702
7002
|
const $scope6_id = _scope_id();
|
|
6703
7003
|
_html(`<button${_attr_class([
|
|
6704
7004
|
"_bC",
|
|
6705
|
-
"
|
|
6706
|
-
"
|
|
6707
|
-
{ ["
|
|
7005
|
+
"_2",
|
|
7006
|
+
"_3",
|
|
7007
|
+
{ ["_q"]: confirmingRemove === row.full_name }
|
|
6708
7008
|
])}${confirmingRemove === row.full_name ? _attr("title", `Remove ${row.worktree}/? Uncommitted changes are lost.`) : _attr("title", `Remove ${row.worktree}/`)}>`);
|
|
6709
7009
|
_if(() => {
|
|
6710
7010
|
if (confirmingRemove === row.full_name) {
|
|
@@ -6734,7 +7034,7 @@ var manage_workspace_default = _template("n", (input) => {
|
|
|
6734
7034
|
}, "full_name", $scope0_id, "p", 1, 1, 1, 0, 1);
|
|
6735
7035
|
_for_of([...busy].filter((n) => !inWorkspace.has(n)), (name) => {
|
|
6736
7036
|
const $scope16_id = _scope_id();
|
|
6737
|
-
_html(`<li${_attr_class(["_bx", "_bw"])}><span${_attr_class("
|
|
7037
|
+
_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
7038
|
writeScope($scope16_id, {});
|
|
6739
7039
|
}, (n) => n, $scope0_id, "q", 1, 1, 1, 0, 1);
|
|
6740
7040
|
_html("</ul>");
|
|
@@ -6746,12 +7046,12 @@ var manage_workspace_default = _template("n", (input) => {
|
|
|
6746
7046
|
return 0;
|
|
6747
7047
|
}
|
|
6748
7048
|
}, $scope0_id, "r", 1, 1, 1, 0, 1);
|
|
6749
|
-
_html(`<div${_attr_class("
|
|
7049
|
+
_html(`<div${_attr_class("_dy")}>`);
|
|
6750
7050
|
const $childScope3 = _peek_scope_id();
|
|
6751
7051
|
let refreshCatalog = repo_picker_default({
|
|
6752
7052
|
exclude: inWorkspace,
|
|
6753
|
-
onPick: _resume(function(name, baseBranch) {
|
|
6754
|
-
addRepo(name, baseBranch);
|
|
7053
|
+
onPick: _resume(function(name, baseBranch, fork) {
|
|
7054
|
+
addRepo(name, baseBranch, fork);
|
|
6755
7055
|
}, "n8", $scope0_id),
|
|
6756
7056
|
onError: _resume(function(message) {
|
|
6757
7057
|
error = message;
|
|
@@ -6769,14 +7069,14 @@ var manage_workspace_default = _template("n", (input) => {
|
|
|
6769
7069
|
_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
7070
|
_for_of(running, (p) => {
|
|
6771
7071
|
const $scope10_id = _scope_id();
|
|
6772
|
-
_html(`<li${_attr_class("_bx")}><div${_attr_class("_by")}${_attr("title", p.args)}><span${_attr_class(["_bz", "
|
|
7072
|
+
_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
7073
|
_if(() => {
|
|
6774
7074
|
if (p.ports.length) {
|
|
6775
7075
|
const $scope18_id = _scope_id();
|
|
6776
7076
|
_html(`<span${_attr_class("_bA")}>`);
|
|
6777
7077
|
_for_of(p.ports, (port) => {
|
|
6778
7078
|
const $scope19_id = _scope_id();
|
|
6779
|
-
_html(`<button${_attr_class(["
|
|
7079
|
+
_html(`<button${_attr_class(["_s", "_dA"])}${_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
7080
|
_script($scope19_id, "n15");
|
|
6781
7081
|
writeScope($scope19_id, { d: port });
|
|
6782
7082
|
}, (x) => String(x), $scope18_id, "a", 1, 1, 1, "</span>", 1);
|
|
@@ -6784,7 +7084,7 @@ var manage_workspace_default = _template("n", (input) => {
|
|
|
6784
7084
|
return 0;
|
|
6785
7085
|
}
|
|
6786
7086
|
}, $scope10_id, "e", 1, 1, 1, 0, 1);
|
|
6787
|
-
_html(`</div>${_el_resume($scope10_id, "b")}<button${_attr_class(["_bC", "
|
|
7087
|
+
_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
7088
|
icon_xmark_default({ size: 14 });
|
|
6789
7089
|
_html(`</button>${_el_resume($scope10_id, "f")}</li>`);
|
|
6790
7090
|
_script($scope10_id, "n16");
|
|
@@ -6798,7 +7098,7 @@ var manage_workspace_default = _template("n", (input) => {
|
|
|
6798
7098
|
return 0;
|
|
6799
7099
|
}
|
|
6800
7100
|
}, $scope0_id, "v", 1, 1, 1, 0, 1);
|
|
6801
|
-
_html(`<section${_attr_class(["_bs", "
|
|
7101
|
+
_html(`<section${_attr_class(["_bs", "_dB"])}><div${_attr_class("_bt")}><h2${_attr_class("_bH")}>Workspace</h2></div><div${_attr_class("_dC")}>`);
|
|
6802
7102
|
_if(() => {
|
|
6803
7103
|
if (ws.status === "active") {
|
|
6804
7104
|
const $scope4_id = _scope_id();
|
|
@@ -6816,8 +7116,8 @@ var manage_workspace_default = _template("n", (input) => {
|
|
|
6816
7116
|
}, $scope0_id, "a0", 1, 1, 1, 0, 1);
|
|
6817
7117
|
_html(`<button type=button${_attr_class([
|
|
6818
7118
|
btnLg,
|
|
6819
|
-
"
|
|
6820
|
-
{ ["
|
|
7119
|
+
"_r",
|
|
7120
|
+
{ ["_q"]: confirmingDelete }
|
|
6821
7121
|
])}${_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
7122
|
_script($scope0_id, "n19");
|
|
6823
7123
|
_script($scope0_id, "n20");
|
|
@@ -6899,15 +7199,15 @@ var term_find_default = _template("y", (input) => {
|
|
|
6899
7199
|
const canStep = hasQuery && open;
|
|
6900
7200
|
const keybar = input.placement === "keybar";
|
|
6901
7201
|
_html(`<div${_attr_class([
|
|
6902
|
-
"
|
|
6903
|
-
keybar ? "
|
|
6904
|
-
!open && "
|
|
6905
|
-
])} aria-hidden=${open ? "false" : "true"}><div${_attr_class(["
|
|
7202
|
+
"_fq",
|
|
7203
|
+
keybar ? "_fs" : "_fr",
|
|
7204
|
+
!open && "_fu"
|
|
7205
|
+
])} aria-hidden=${open ? "false" : "true"}><div${_attr_class(["_fl", keybar ? "_ft" : "_fn"])}><input${_attr_input_value($scope0_id, "c", query, _resume(function(v) {
|
|
6906
7206
|
if (!open) return;
|
|
6907
7207
|
query = v;
|
|
6908
7208
|
live.query = v;
|
|
6909
7209
|
run(0);
|
|
6910
|
-
}, "y0", $scope0_id))}${_attr_class([findInput, keybar && "
|
|
7210
|
+
}, "y0", $scope0_id))}${_attr_class([findInput, keybar && "_fv"])} 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 && "_fw"])} title="Previous match"${_attr("disabled", !canStep)} tabindex=${open ? "0" : "-1"}>↑</button>${_el_resume($scope0_id, "d")}<button type=button${_attr_class([findIconBtn, keybar && "_fw"])} title="Next match"${_attr("disabled", !canStep)} tabindex=${open ? "0" : "-1"}>↓</button>${_el_resume($scope0_id, "e")}<button type=button${_attr_class([findIconBtn, keybar && "_fw"])} title="Close find" tabindex=${open ? "0" : "-1"}>`);
|
|
6911
7211
|
icon_xmark_default({ size: 14 });
|
|
6912
7212
|
_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
7213
|
_script($scope0_id, "y4");
|
|
@@ -7181,7 +7481,7 @@ var term_default = _template("z", (input) => {
|
|
|
7181
7481
|
trapOpen = true;
|
|
7182
7482
|
}
|
|
7183
7483
|
}, "z14", $scope0_id);
|
|
7184
|
-
_html(`<div${_attr("hidden", !onTermPage)}${_attr_class("
|
|
7484
|
+
_html(`<div${_attr("hidden", !onTermPage)}${_attr_class("_et")}><div${_attr_class("_eu")}></div>${_el_resume($scope0_id, "b")}`);
|
|
7185
7485
|
_if(() => {
|
|
7186
7486
|
if (findOpen) {
|
|
7187
7487
|
const $scope12_id = _scope_id();
|
|
@@ -7208,7 +7508,7 @@ var term_default = _template("z", (input) => {
|
|
|
7208
7508
|
_if(() => {
|
|
7209
7509
|
if (uploading) {
|
|
7210
7510
|
const $scope19_id = _scope_id();
|
|
7211
|
-
_html(`<div${_attr_class("
|
|
7511
|
+
_html(`<div${_attr_class("_eA")}>uploading…</div>`);
|
|
7212
7512
|
writeScope($scope19_id, {});
|
|
7213
7513
|
return 0;
|
|
7214
7514
|
}
|
|
@@ -7216,7 +7516,7 @@ var term_default = _template("z", (input) => {
|
|
|
7216
7516
|
_if(() => {
|
|
7217
7517
|
if (copiedFlash) {
|
|
7218
7518
|
const $scope20_id = _scope_id();
|
|
7219
|
-
_html(`<div${_attr_class("
|
|
7519
|
+
_html(`<div${_attr_class("_ez")}>Copied</div>`);
|
|
7220
7520
|
writeScope($scope20_id, {});
|
|
7221
7521
|
return 0;
|
|
7222
7522
|
}
|
|
@@ -7225,7 +7525,7 @@ var term_default = _template("z", (input) => {
|
|
|
7225
7525
|
_if(() => {
|
|
7226
7526
|
if (trapOpen) {
|
|
7227
7527
|
const $scope11_id = _scope_id();
|
|
7228
|
-
_html(`<div${_attr_class("
|
|
7528
|
+
_html(`<div${_attr_class("_eB")}><div${_attr_class("_eC")}><p${_attr_class("_e7")}>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
7529
|
_script($scope11_id, "z25");
|
|
7230
7530
|
_script($scope11_id, "z26");
|
|
7231
7531
|
writeScope($scope11_id, {});
|
|
@@ -7328,7 +7628,7 @@ var work_view_default = _template("D", (input) => {
|
|
|
7328
7628
|
let DiffView = null;
|
|
7329
7629
|
const loadDiffView = _resume(() => {
|
|
7330
7630
|
if (DiffView) return;
|
|
7331
|
-
import("./
|
|
7631
|
+
import("./_CGQWSq7x.js").then((m) => {
|
|
7332
7632
|
DiffView = m.default;
|
|
7333
7633
|
});
|
|
7334
7634
|
}, "D6", $scope0_id);
|
|
@@ -7514,28 +7814,29 @@ var work_view_default = _template("D", (input) => {
|
|
|
7514
7814
|
toggleDiff();
|
|
7515
7815
|
}
|
|
7516
7816
|
}, "D21", $scope0_id);
|
|
7517
|
-
_html(`<div${_attr_class(["
|
|
7518
|
-
["
|
|
7519
|
-
["
|
|
7520
|
-
}])}><div${_attr_class("
|
|
7817
|
+
_html(`<div${_attr_class(["_b2", {
|
|
7818
|
+
["_b0"]: view === "nav",
|
|
7819
|
+
["_b1"]: !input.active
|
|
7820
|
+
}])}><div${_attr_class("_b3")}>`);
|
|
7521
7821
|
_set_serialize_reason({
|
|
7522
7822
|
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:
|
|
7823
|
+
1: 1,
|
|
7824
|
+
2: _serialize_guard($scope0_reason, 2),
|
|
7825
|
+
3: _serialize_guard($scope0_reason, 3),
|
|
7826
|
+
4: $sg__input_workspace,
|
|
7827
|
+
5: 1,
|
|
7828
|
+
7: 1,
|
|
7829
|
+
9: $sg__input_allWorkspaces,
|
|
7830
|
+
10: _serialize_guard($scope0_reason, 7),
|
|
7831
|
+
11: _serialize_guard($scope0_reason, 12),
|
|
7832
|
+
12: _serialize_guard($scope0_reason, 11),
|
|
7833
|
+
13: _serialize_guard($scope0_reason, 13),
|
|
7834
|
+
14: 1,
|
|
7835
|
+
15: $sg__input_agents,
|
|
7536
7836
|
16: 1,
|
|
7537
7837
|
17: 1,
|
|
7538
|
-
18: 1
|
|
7838
|
+
18: 1,
|
|
7839
|
+
19: 1
|
|
7539
7840
|
});
|
|
7540
7841
|
const $childScope = _peek_scope_id();
|
|
7541
7842
|
side_nav_default({
|
|
@@ -7578,7 +7879,7 @@ var work_view_default = _template("D", (input) => {
|
|
|
7578
7879
|
openDiff(pr);
|
|
7579
7880
|
}, "D29", $scope0_id)
|
|
7580
7881
|
});
|
|
7581
|
-
_html(`</div><div${_attr_class("
|
|
7882
|
+
_html(`</div><div${_attr_class("_b4")}>`);
|
|
7582
7883
|
_if(() => {
|
|
7583
7884
|
if (error) {
|
|
7584
7885
|
const $scope8_id = _scope_id();
|
|
@@ -7601,7 +7902,7 @@ var work_view_default = _template("D", (input) => {
|
|
|
7601
7902
|
_if(() => {
|
|
7602
7903
|
if (diffMounted && DiffView) {
|
|
7603
7904
|
const $scope1_id = _scope_id();
|
|
7604
|
-
_html(`<div${_attr_class(["
|
|
7905
|
+
_html(`<div${_attr_class(["_b5", { ["_b6"]: view === "diff" }])}>`);
|
|
7605
7906
|
_dynamic_tag($scope1_id, "b", DiffView, {
|
|
7606
7907
|
workspaceId: ws.id,
|
|
7607
7908
|
workspaceBranch: ws.branch,
|
|
@@ -7641,7 +7942,7 @@ var work_view_default = _template("D", (input) => {
|
|
|
7641
7942
|
_if(() => {
|
|
7642
7943
|
if (manageMounted) {
|
|
7643
7944
|
const $scope2_id = _scope_id();
|
|
7644
|
-
_html(`<div${_attr_class(["
|
|
7945
|
+
_html(`<div${_attr_class(["_b5", { ["_b6"]: view === "manage" }])}>`);
|
|
7645
7946
|
_set_serialize_reason(_serialize_guard($scope0_reason, 16));
|
|
7646
7947
|
const $childScope2 = _peek_scope_id();
|
|
7647
7948
|
manage_workspace_default({
|
|
@@ -7664,7 +7965,7 @@ var work_view_default = _template("D", (input) => {
|
|
|
7664
7965
|
_if(() => {
|
|
7665
7966
|
if (settingsMounted) {
|
|
7666
7967
|
const $scope3_id = _scope_id();
|
|
7667
|
-
_html(`<div${_attr_class(["
|
|
7968
|
+
_html(`<div${_attr_class(["_b5", { ["_b6"]: view === "settings" }])}>`);
|
|
7668
7969
|
_set_serialize_reason({
|
|
7669
7970
|
0: _serialize_guard($scope0_reason, 1),
|
|
7670
7971
|
1: $sg__input_workspace,
|
|
@@ -7704,7 +8005,7 @@ var work_view_default = _template("D", (input) => {
|
|
|
7704
8005
|
_if(() => {
|
|
7705
8006
|
if (newMounted) {
|
|
7706
8007
|
const $scope4_id = _scope_id();
|
|
7707
|
-
_html(`<div${_attr_class(["
|
|
8008
|
+
_html(`<div${_attr_class(["_b5", { ["_b6"]: view === "new" }])}>`);
|
|
7708
8009
|
_set_serialize_reason({
|
|
7709
8010
|
0: 1,
|
|
7710
8011
|
1: $sg__input_allWorkspaces,
|
|
@@ -7731,13 +8032,13 @@ var work_view_default = _template("D", (input) => {
|
|
|
7731
8032
|
return 0;
|
|
7732
8033
|
}
|
|
7733
8034
|
}, $scope0_id, "i", 1, 1, 1, 0, 1);
|
|
7734
|
-
_html(`<div${_attr_class(["
|
|
8035
|
+
_html(`<div${_attr_class(["_b8", { ["_b7"]: view !== "term" }])}>`);
|
|
7735
8036
|
_if(() => {
|
|
7736
8037
|
if (shownSessions) {
|
|
7737
8038
|
const $scope5_id = _scope_id();
|
|
7738
8039
|
_for_of(shownSessions, (s) => {
|
|
7739
8040
|
const $scope6_id = _scope_id();
|
|
7740
|
-
_html(`<div${_attr_class(["
|
|
8041
|
+
_html(`<div${_attr_class(["_b9", { ["_b_"]: s.id === curTab }])}>`);
|
|
7741
8042
|
_set_serialize_reason({
|
|
7742
8043
|
0: 1,
|
|
7743
8044
|
1: 1,
|
|
@@ -7796,7 +8097,7 @@ var work_view_default = _template("D", (input) => {
|
|
|
7796
8097
|
_if(() => {
|
|
7797
8098
|
if (!shownSessions.length && view === "term") {
|
|
7798
8099
|
const $scope7_id = _scope_id();
|
|
7799
|
-
_html(`<div${_attr_class("_bE")}><span>No sessions in this workspace.</span><button${_attr_class(["
|
|
8100
|
+
_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
8101
|
_script($scope7_id, "D49");
|
|
7801
8102
|
_subscribe($spawning__closures, _subscribe($si__input_preferred && $input_preferred__closures, writeScope($scope7_id, {})));
|
|
7802
8103
|
return 0;
|
|
@@ -8029,7 +8330,7 @@ var app_shell_default = _template("c", (input) => {
|
|
|
8029
8330
|
if (!openIds.includes(id)) openIds = openIds.concat(id);
|
|
8030
8331
|
prefs.setLastWorkspace(id);
|
|
8031
8332
|
}, "c4", $scope0_id);
|
|
8032
|
-
_html(`<div${_attr_class("
|
|
8333
|
+
_html(`<div${_attr_class("_d")}>`);
|
|
8033
8334
|
_if(() => {
|
|
8034
8335
|
if (error) {
|
|
8035
8336
|
const $scope5_id = _scope_id();
|
|
@@ -8052,7 +8353,7 @@ var app_shell_default = _template("c", (input) => {
|
|
|
8052
8353
|
_if(() => {
|
|
8053
8354
|
if (!selectedId && showSetup) {
|
|
8054
8355
|
const $scope4_id = _scope_id();
|
|
8055
|
-
_html(`<div${_attr_class("
|
|
8356
|
+
_html(`<div${_attr_class("_h")}>`);
|
|
8056
8357
|
_set_serialize_reason(106);
|
|
8057
8358
|
const $childScope = _peek_scope_id();
|
|
8058
8359
|
settings_page_default({
|
|
@@ -8086,7 +8387,7 @@ var app_shell_default = _template("c", (input) => {
|
|
|
8086
8387
|
};
|
|
8087
8388
|
}, "c9", $scope4_id)
|
|
8088
8389
|
});
|
|
8089
|
-
_html(`<div${_attr_class("
|
|
8390
|
+
_html(`<div${_attr_class("_i")}><button type=button${_attr_class("_o")}>Later, go to workspaces</button>${_el_resume($scope4_id, "d")}</div></div>`);
|
|
8090
8391
|
_script($scope4_id, "c24");
|
|
8091
8392
|
writeScope($scope4_id, { b: _existing_scope($childScope) });
|
|
8092
8393
|
return 0;
|
|
@@ -8111,14 +8412,14 @@ var app_shell_default = _template("c", (input) => {
|
|
|
8111
8412
|
return 1;
|
|
8112
8413
|
}
|
|
8113
8414
|
}, $scope0_id, "c", 1, 1, 1, 0, 1);
|
|
8114
|
-
_html(`<div${_attr_class(["
|
|
8415
|
+
_html(`<div${_attr_class(["_e", { ["_f"]: !selectedId }])}>`);
|
|
8115
8416
|
_for_of(openIds, (id) => {
|
|
8116
8417
|
const $scope1_id = _scope_id();
|
|
8117
8418
|
const ws = workspaces.find((w) => w.id === id);
|
|
8118
8419
|
_if(() => {
|
|
8119
8420
|
if (ws) {
|
|
8120
8421
|
const $scope2_id = _scope_id();
|
|
8121
|
-
_html(`<div${_attr_class("
|
|
8422
|
+
_html(`<div${_attr_class("_g")}>`);
|
|
8122
8423
|
_set_serialize_reason(1);
|
|
8123
8424
|
const $childScope3 = _peek_scope_id();
|
|
8124
8425
|
work_view_default({
|
|
@@ -9678,20 +9979,20 @@ var DELETE$2 = Run.DELETE(async (ctx) => {
|
|
|
9678
9979
|
});
|
|
9679
9980
|
//#endregion
|
|
9680
9981
|
//#region __marko-run__api.sessions.$.js
|
|
9681
|
-
var patchHandler = normalizeHandler(Run.PATCH({ json: Rename }, async (ctx) => {
|
|
9982
|
+
var patchHandler$1 = normalizeHandler(Run.PATCH({ json: Rename }, async (ctx) => {
|
|
9682
9983
|
const body = await readBody(ctx);
|
|
9683
9984
|
renameSession(ctx.params.id, body.title || null);
|
|
9684
9985
|
return Response.json({ ok: true });
|
|
9685
9986
|
}), "PATCH");
|
|
9686
9987
|
var deleteHandler$2 = normalizeHandler(DELETE$2, "DELETE");
|
|
9687
9988
|
var delete20_options = mergeOptions(mware11, deleteHandler$2);
|
|
9688
|
-
var patch20_options = mergeOptions(mware11, patchHandler);
|
|
9989
|
+
var patch20_options = mergeOptions(mware11, patchHandler$1);
|
|
9689
9990
|
function delete20(context) {
|
|
9690
9991
|
const __deleteHandler = (data) => call(deleteHandler$2, noContent, context, data);
|
|
9691
9992
|
return call(mware11, __deleteHandler, context);
|
|
9692
9993
|
}
|
|
9693
9994
|
function patch20(context) {
|
|
9694
|
-
const __patchHandler = (data) => call(patchHandler, noContent, context, data);
|
|
9995
|
+
const __patchHandler = (data) => call(patchHandler$1, noContent, context, data);
|
|
9695
9996
|
return call(mware11, __patchHandler, context);
|
|
9696
9997
|
}
|
|
9697
9998
|
//#endregion
|
|
@@ -10026,7 +10327,8 @@ var CreateWorkspace = /* @__PURE__ */ object({
|
|
|
10026
10327
|
name: /* @__PURE__ */ pipe(/* @__PURE__ */ string(), /* @__PURE__ */ trim(), /* @__PURE__ */ minLength(1)),
|
|
10027
10328
|
repos: /* @__PURE__ */ array(/* @__PURE__ */ object({
|
|
10028
10329
|
fullName: /* @__PURE__ */ pipe(/* @__PURE__ */ string(), /* @__PURE__ */ regex(/^(?:[\w.-]+\/)?[\w.-]+\/[\w.-]+$/)),
|
|
10029
|
-
baseBranch: /* @__PURE__ */ optional(/* @__PURE__ */ string())
|
|
10330
|
+
baseBranch: /* @__PURE__ */ optional(/* @__PURE__ */ string()),
|
|
10331
|
+
fork: /* @__PURE__ */ optional(/* @__PURE__ */ boolean())
|
|
10030
10332
|
})),
|
|
10031
10333
|
opId: /* @__PURE__ */ optional(/* @__PURE__ */ pipe(/* @__PURE__ */ string(), /* @__PURE__ */ maxLength(40)))
|
|
10032
10334
|
});
|
|
@@ -10114,6 +10416,13 @@ function addComment(workspaceId, comment) {
|
|
|
10114
10416
|
publish("review.changed", { workspaceId });
|
|
10115
10417
|
return get("SELECT * FROM review_comments WHERE id = ?", lastInsertRowid);
|
|
10116
10418
|
}
|
|
10419
|
+
function updateComment(id, text) {
|
|
10420
|
+
const row = get("SELECT * FROM review_comments WHERE id = ?", id);
|
|
10421
|
+
if (!row) throw new Error(`no such comment: ${id}`);
|
|
10422
|
+
db.prepare("UPDATE review_comments SET text = ? WHERE id = ?").run(text, id);
|
|
10423
|
+
publish("review.changed", { workspaceId: row.workspace_id });
|
|
10424
|
+
return get("SELECT * FROM review_comments WHERE id = ?", id);
|
|
10425
|
+
}
|
|
10117
10426
|
function deleteComment(id) {
|
|
10118
10427
|
const row = get("SELECT workspace_id FROM review_comments WHERE id = ?", id);
|
|
10119
10428
|
db.prepare("DELETE FROM review_comments WHERE id = ?").run(id);
|
|
@@ -10687,13 +10996,14 @@ function post34(context) {
|
|
|
10687
10996
|
//#region src/routes/api/workspaces/$id/repos/+handler.ts
|
|
10688
10997
|
var AddRepo = /* @__PURE__ */ object({
|
|
10689
10998
|
fullName: /* @__PURE__ */ pipe(/* @__PURE__ */ string(), /* @__PURE__ */ regex(/^(?:[\w.-]+\/)?[\w.-]+\/[\w.-]+$/)),
|
|
10690
|
-
baseBranch: /* @__PURE__ */ optional(/* @__PURE__ */ string())
|
|
10999
|
+
baseBranch: /* @__PURE__ */ optional(/* @__PURE__ */ string()),
|
|
11000
|
+
fork: /* @__PURE__ */ optional(/* @__PURE__ */ boolean())
|
|
10691
11001
|
});
|
|
10692
11002
|
//#endregion
|
|
10693
11003
|
//#region __marko-run__api.workspaces.$.repos.js
|
|
10694
11004
|
var postHandler$2 = normalizeHandler(Run.POST({ json: AddRepo }, async (ctx) => {
|
|
10695
11005
|
const body = await readBody(ctx);
|
|
10696
|
-
return Response.json(await withProgressOp(ctx.params.id, () => addRepo$1(ctx.params.id, body.fullName, body.baseBranch)));
|
|
11006
|
+
return Response.json(await withProgressOp(ctx.params.id, () => addRepo$1(ctx.params.id, body.fullName, body.baseBranch, body.fork)));
|
|
10697
11007
|
}), "POST");
|
|
10698
11008
|
var post35_options = mergeOptions(mware11, mware36, postHandler$2);
|
|
10699
11009
|
function post35(context) {
|
|
@@ -10774,21 +11084,40 @@ function post37(context) {
|
|
|
10774
11084
|
return call(mware11, __mware36, context);
|
|
10775
11085
|
}
|
|
10776
11086
|
//#endregion
|
|
11087
|
+
//#region src/routes/api/workspaces/$id/review/$commentId/+handler.ts
|
|
11088
|
+
function commentInWorkspace(workspaceId, commentId) {
|
|
11089
|
+
if (!Number.isInteger(commentId)) throw httpError(400, "invalid comment id");
|
|
11090
|
+
const row = get("SELECT workspace_id FROM review_comments WHERE id = ?", commentId);
|
|
11091
|
+
if (!row || row.workspace_id !== workspaceId) throw httpError(404, "no such comment");
|
|
11092
|
+
}
|
|
11093
|
+
var Edit = /* @__PURE__ */ object({ text: /* @__PURE__ */ pipe(/* @__PURE__ */ string(), /* @__PURE__ */ trim(), /* @__PURE__ */ minLength(1)) });
|
|
11094
|
+
var PATCH = Run.PATCH({ json: Edit }, async (ctx) => {
|
|
11095
|
+
const commentId = Number(ctx.params.commentId);
|
|
11096
|
+
commentInWorkspace(ctx.params.id, commentId);
|
|
11097
|
+
const body = await readBody(ctx);
|
|
11098
|
+
return Response.json(updateComment(commentId, body.text));
|
|
11099
|
+
});
|
|
11100
|
+
//#endregion
|
|
10777
11101
|
//#region __marko-run__api.workspaces.$.review.$.js
|
|
10778
11102
|
var deleteHandler = normalizeHandler(Run.DELETE((ctx) => {
|
|
10779
11103
|
const commentId = Number(ctx.params.commentId);
|
|
10780
|
-
|
|
10781
|
-
const row = get("SELECT workspace_id FROM review_comments WHERE id = ?", commentId);
|
|
10782
|
-
if (!row || row.workspace_id !== ctx.params.id) throw httpError(404, "no such comment");
|
|
11104
|
+
commentInWorkspace(ctx.params.id, commentId);
|
|
10783
11105
|
deleteComment(commentId);
|
|
10784
11106
|
return Response.json({ ok: true });
|
|
10785
11107
|
}), "DELETE");
|
|
11108
|
+
var patchHandler = normalizeHandler(PATCH, "PATCH");
|
|
10786
11109
|
var delete38_options = mergeOptions(mware11, mware36, deleteHandler);
|
|
11110
|
+
var patch38_options = mergeOptions(mware11, mware36, patchHandler);
|
|
10787
11111
|
function delete38(context) {
|
|
10788
11112
|
const __deleteHandler = (data) => call(deleteHandler, noContent, context, data);
|
|
10789
11113
|
const __mware36 = (data) => call(mware36, __deleteHandler, context, data);
|
|
10790
11114
|
return call(mware11, __mware36, context);
|
|
10791
11115
|
}
|
|
11116
|
+
function patch38(context) {
|
|
11117
|
+
const __patchHandler = (data) => call(patchHandler, noContent, context, data);
|
|
11118
|
+
const __mware36 = (data) => call(mware36, __patchHandler, context, data);
|
|
11119
|
+
return call(mware11, __mware36, context);
|
|
11120
|
+
}
|
|
10792
11121
|
//#endregion
|
|
10793
11122
|
//#region src/routes/api/workspaces/$id/sessions/+handler.ts
|
|
10794
11123
|
var CreateSession = /* @__PURE__ */ object({ agent: /* @__PURE__ */ optional(/* @__PURE__ */ string()) });
|
|
@@ -11624,18 +11953,47 @@ function match_internal(method, pathname) {
|
|
|
11624
11953
|
if (i1 && i1 !== len) {
|
|
11625
11954
|
if (pathname.slice(1, i1 - 1) === "api") {
|
|
11626
11955
|
const i2 = pathname.indexOf("/", 5) + 1;
|
|
11627
|
-
if (i2 && i2 !== len) {
|
|
11628
|
-
|
|
11629
|
-
|
|
11630
|
-
|
|
11631
|
-
|
|
11632
|
-
|
|
11633
|
-
|
|
11634
|
-
|
|
11635
|
-
|
|
11636
|
-
|
|
11637
|
-
|
|
11638
|
-
|
|
11956
|
+
if (i2 && i2 !== len) switch (pathname.slice(5, i2 - 1)) {
|
|
11957
|
+
case "sessions":
|
|
11958
|
+
{
|
|
11959
|
+
const i3 = pathname.indexOf("/", 14) + 1;
|
|
11960
|
+
if (!i3 || i3 === len) {
|
|
11961
|
+
const s3 = decodeURIComponent(pathname.slice(14, i3 ? -1 : len));
|
|
11962
|
+
if (s3) return {
|
|
11963
|
+
handler: patch20,
|
|
11964
|
+
path: "/api/sessions/$id",
|
|
11965
|
+
params: { id: s3 },
|
|
11966
|
+
options: patch20_options,
|
|
11967
|
+
meta: {}
|
|
11968
|
+
};
|
|
11969
|
+
}
|
|
11970
|
+
}
|
|
11971
|
+
break;
|
|
11972
|
+
case "workspaces": {
|
|
11973
|
+
const i3 = pathname.indexOf("/", 16) + 1;
|
|
11974
|
+
if (i3 && i3 !== len) {
|
|
11975
|
+
const s3 = decodeURIComponent(pathname.slice(16, i3 - 1));
|
|
11976
|
+
if (s3) {
|
|
11977
|
+
const i4 = pathname.indexOf("/", i3) + 1;
|
|
11978
|
+
if (i4 && i4 !== len) {
|
|
11979
|
+
if (pathname.slice(i3, i4 - 1) === "review") {
|
|
11980
|
+
const i5 = pathname.indexOf("/", i4) + 1;
|
|
11981
|
+
if (!i5 || i5 === len) {
|
|
11982
|
+
const s5 = decodeURIComponent(pathname.slice(i4, i5 ? -1 : len));
|
|
11983
|
+
if (s5) return {
|
|
11984
|
+
handler: patch38,
|
|
11985
|
+
path: "/api/workspaces/$id/review/$commentId",
|
|
11986
|
+
params: {
|
|
11987
|
+
id: s3,
|
|
11988
|
+
commentId: s5
|
|
11989
|
+
},
|
|
11990
|
+
options: patch38_options,
|
|
11991
|
+
meta: {}
|
|
11992
|
+
};
|
|
11993
|
+
}
|
|
11994
|
+
}
|
|
11995
|
+
}
|
|
11996
|
+
}
|
|
11639
11997
|
}
|
|
11640
11998
|
}
|
|
11641
11999
|
}
|
|
@@ -15692,4 +16050,4 @@ server.listen(port, () => {
|
|
|
15692
16050
|
//#endregion
|
|
15693
16051
|
export {};
|
|
15694
16052
|
|
|
15695
|
-
;var __MARKO_MANIFEST__={"
|
|
16053
|
+
;var __MARKO_MANIFEST__={"AA0T2xt":{"block":[2,"stylesheet#/assets/app-page-DgDTDOHI.css",6,"<link",0," rel=\"stylesheet\" crossorigin href=\"",1,"assets/app-page-DgDTDOHI.css\"",">"],"defer":[2,"/assets/settings-BH-hZ4d8.js",6,"<script",0," async type=\"module\" crossorigin src=\"",1,"assets/settings-BH-hZ4d8.js\"","></script>",2,"modulepreload#/assets/_S4Deki6-.js",6,"<link",0," rel=\"modulepreload\" crossorigin href=\"",1,"assets/_S4Deki6-.js\"",">"]},"T$MNY0k":{"block":[2,"stylesheet#/assets/app-page-DgDTDOHI.css",6,"<link",0," rel=\"stylesheet\" crossorigin href=\"",1,"assets/app-page-DgDTDOHI.css\"",">"],"defer":[2,"/assets/w._-BH-hZ4d8.js",6,"<script",0," async type=\"module\" crossorigin src=\"",1,"assets/w._-BH-hZ4d8.js\"","></script>",2,"modulepreload#/assets/_S4Deki6-.js",6,"<link",0," rel=\"modulepreload\" crossorigin href=\"",1,"assets/_S4Deki6-.js\"",">"]},"ibphXY4":{"block":[2,"stylesheet#/assets/app-page-DgDTDOHI.css",6,"<link",0," rel=\"stylesheet\" crossorigin href=\"",1,"assets/app-page-DgDTDOHI.css\"",">"],"defer":[2,"/assets/w._-DxgRF7k8.js",6,"<script",0," async type=\"module\" crossorigin src=\"",1,"assets/w._-DxgRF7k8.js\"","></script>",2,"modulepreload#/assets/_S4Deki6-.js",6,"<link",0," rel=\"modulepreload\" crossorigin href=\"",1,"assets/_S4Deki6-.js\"",">"]},"LH2lXAg":{"block":[2,"stylesheet#/assets/app-page-DgDTDOHI.css",6,"<link",0," rel=\"stylesheet\" crossorigin href=\"",1,"assets/app-page-DgDTDOHI.css\"",">"],"defer":[2,"/assets/w-BH-hZ4d8.js",6,"<script",0," async type=\"module\" crossorigin src=\"",1,"assets/w-BH-hZ4d8.js\"","></script>",2,"modulepreload#/assets/_S4Deki6-.js",6,"<link",0," rel=\"modulepreload\" crossorigin href=\"",1,"assets/_S4Deki6-.js\"",">"]},"ZLT8joi":{"block":[2,"stylesheet#/assets/app-page-DgDTDOHI.css",6,"<link",0," rel=\"stylesheet\" crossorigin href=\"",1,"assets/app-page-DgDTDOHI.css\"",">"],"defer":[2,"/assets/new-BH-hZ4d8.js",6,"<script",0," async type=\"module\" crossorigin src=\"",1,"assets/new-BH-hZ4d8.js\"","></script>",2,"modulepreload#/assets/_S4Deki6-.js",6,"<link",0," rel=\"modulepreload\" crossorigin href=\"",1,"assets/_S4Deki6-.js\"",">"]}};
|