@dylanpiercey/work 0.0.108 → 0.0.110
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/{_D60UKgk7.js → _B0yxZ9Td.js} +17 -17
- package/dist/{_4U00WI47.js → _BjC9119e.js} +76 -75
- package/dist/index.mjs +605 -565
- package/dist/public/assets/{_LpMRsHBj.js → _7ckzktli.js} +1 -1
- package/dist/public/assets/_7ckzktli.js.br +0 -0
- package/dist/public/assets/{_Bd1pgCVU.js → _B0ltsCEb.js} +1 -1
- package/dist/public/assets/_B0ltsCEb.js.br +0 -0
- package/dist/public/assets/{_D0MMHjUQ.js → _B2HSDl-f.js} +1 -1
- package/dist/public/assets/_B2HSDl-f.js.br +0 -0
- package/dist/public/assets/{_DIlBIf-A.js → _B9rRct_x.js} +1 -1
- package/dist/public/assets/_B9rRct_x.js.br +0 -0
- package/dist/public/assets/{_WETndjfo.js → _BBT6_Y4j.js} +1 -1
- package/dist/public/assets/_BBT6_Y4j.js.br +0 -0
- package/dist/public/assets/{_Cwr7DlYk2.js → _BBWg8weo2.js} +1 -1
- package/dist/public/assets/_BBWg8weo2.js.br +0 -0
- package/dist/public/assets/_BDPhcxem.js +86 -0
- package/dist/public/assets/_BDPhcxem.js.br +0 -0
- package/dist/public/assets/{_Djf-fwhe2.js → _BKkGjOfB2.js} +1 -1
- package/dist/public/assets/{_A_OowyKJ2.js → _BOBRRCbH2.js} +1 -1
- package/dist/public/assets/_BOBRRCbH2.js.br +0 -0
- package/dist/public/assets/{_C0jyA9P3.js → _BOsu4gZN.js} +1 -1
- package/dist/public/assets/_BOsu4gZN.js.br +0 -0
- package/dist/public/assets/{_BsPMrz7F.js → _BUJAxhJ5.js} +1 -1
- package/dist/public/assets/_BUJAxhJ5.js.br +0 -0
- package/dist/public/assets/{_AS_QNAut.js → _BVS2lv-F.js} +1 -1
- package/dist/public/assets/_BVS2lv-F.js.br +0 -0
- package/dist/public/assets/{_DPmzsr0b.js → _BYHfOiRZ.js} +1 -1
- package/dist/public/assets/_BYHfOiRZ.js.br +0 -0
- package/dist/public/assets/{_DK2UAgBJ2.js → _B_hyezQp2.js} +1 -1
- package/dist/public/assets/_B_hyezQp2.js.br +0 -0
- package/dist/public/assets/{_oZRSosjr2.js → _BdJ7_CPB2.js} +1 -1
- package/dist/public/assets/_BdJ7_CPB2.js.br +0 -0
- package/dist/public/assets/{_B_02a7gR.js → _BitNKwvy.js} +1 -1
- package/dist/public/assets/_BitNKwvy.js.br +0 -0
- package/dist/public/assets/{_Cg9E-hC9.js → _BmJYXyvb.js} +1 -1
- package/dist/public/assets/_BmJYXyvb.js.br +0 -0
- package/dist/public/assets/{_C040XCr_2.js → _Bq9eJ7e32.js} +1 -1
- package/dist/public/assets/_Bq9eJ7e32.js.br +0 -0
- package/dist/public/assets/{_bm5qnTpZ.js → _Bs7mTjc6.js} +1 -1
- package/dist/public/assets/_Bs7mTjc6.js.br +0 -0
- package/dist/public/assets/{_Bo7bxECF.js → _BuZp09LD.js} +1 -1
- package/dist/public/assets/_BuZp09LD.js.br +0 -0
- package/dist/public/assets/{_BLMDpuBW.js → _BwBKVcvZ.js} +1 -1
- package/dist/public/assets/_BwBKVcvZ.js.br +0 -0
- package/dist/public/assets/{_DjrRedRo.js → _ByOhRaax.js} +1 -1
- package/dist/public/assets/_ByOhRaax.js.br +0 -0
- package/dist/public/assets/{_Dp2CEQ4Q.js → _BzGD3bqn.js} +1 -1
- package/dist/public/assets/_BzGD3bqn.js.br +0 -0
- package/dist/public/assets/{_BUvhBhYI.js → _BzbUIOlR.js} +1 -1
- package/dist/public/assets/_BzbUIOlR.js.br +0 -0
- package/dist/public/assets/{_DiJIDgvc.js → _BzfF2AHs.js} +1 -1
- package/dist/public/assets/_BzfF2AHs.js.br +0 -0
- package/dist/public/assets/{_k-IEVEnY2.js → _C4XebexE2.js} +1 -1
- package/dist/public/assets/_C4XebexE2.js.br +0 -0
- package/dist/public/assets/{_3ZSompN02.js → _C97AD5si2.js} +1 -1
- package/dist/public/assets/_C97AD5si2.js.br +0 -0
- package/dist/public/assets/{_CTagvw5f2.js → _CEVQ6vp52.js} +1 -1
- package/dist/public/assets/_CEVQ6vp52.js.br +0 -0
- package/dist/public/assets/{_Dwxc6WXv.js → _CLav0960.js} +1 -1
- package/dist/public/assets/_CLav0960.js.br +0 -0
- package/dist/public/assets/{_DCZujH2N2.js → _CMbJwLbg2.js} +1 -1
- package/dist/public/assets/_CMbJwLbg2.js.br +0 -0
- package/dist/public/assets/{_DSWiQozG.js → _CVC2UZVe.js} +1 -1
- package/dist/public/assets/_CVC2UZVe.js.br +0 -0
- package/dist/public/assets/{_Cc9FkJJU.js → _CWOqsgnr.js} +1 -1
- package/dist/public/assets/_CWOqsgnr.js.br +0 -0
- package/dist/public/assets/{_Dc8rm3jI.js → _CY491ZBs.js} +1 -1
- package/dist/public/assets/_CY491ZBs.js.br +0 -0
- package/dist/public/assets/{_CvxThUGr.js → _CZpoitW_.js} +1 -1
- package/dist/public/assets/_CZpoitW_.js.br +0 -0
- package/dist/public/assets/{_D8kKtbZL2.js → _CaMXAiQl2.js} +1 -1
- package/dist/public/assets/_CaMXAiQl2.js.br +0 -0
- package/dist/public/assets/{_BZR8clV2.js → _CbqyR7DJ.js} +1 -1
- package/dist/public/assets/_CbqyR7DJ.js.br +0 -0
- package/dist/public/assets/{_hz5dauNZ.js → _ChXCmWKM.js} +1 -1
- package/dist/public/assets/_ChXCmWKM.js.br +0 -0
- package/dist/public/assets/{_Dl07-GMx.js → _ClVK4eME.js} +1 -1
- package/dist/public/assets/_ClVK4eME.js.br +0 -0
- package/dist/public/assets/{_iTvtyEoL.js → _CnjqeevJ.js} +43 -43
- package/dist/public/assets/_CnjqeevJ.js.br +0 -0
- package/dist/public/assets/{_Dw-O85yr.js → _CrDPLSY7.js} +1 -1
- package/dist/public/assets/_CrDPLSY7.js.br +0 -0
- package/dist/public/assets/{_hAOdnTV6.js → _CvwhKcer.js} +1 -1
- package/dist/public/assets/_CvwhKcer.js.br +0 -0
- package/dist/public/assets/{_Kwrx7rB4.js → _D2e4Sg3s.js} +1 -1
- package/dist/public/assets/_D2e4Sg3s.js.br +0 -0
- package/dist/public/assets/{_CtQKrFEA2.js → _D65ZvCI72.js} +1 -1
- package/dist/public/assets/_D65ZvCI72.js.br +0 -0
- package/dist/public/assets/{_YQPM-WZr2.js → _DE4v_AsV2.js} +1 -1
- package/dist/public/assets/_DE4v_AsV2.js.br +0 -0
- package/dist/public/assets/{_Dblgtz99.js → _DF2Fogr4.js} +1 -1
- package/dist/public/assets/_DF2Fogr4.js.br +0 -0
- package/dist/public/assets/{_UDa7z5Hc.js → _DFpXBzq0.js} +1 -1
- package/dist/public/assets/_DFpXBzq0.js.br +0 -0
- package/dist/public/assets/{_CIqrNCTI.js → _DKtuwLR0.js} +1 -1
- package/dist/public/assets/_DKtuwLR0.js.br +0 -0
- package/dist/public/assets/{_AjvVVtb-2.js → _DMUwd9H92.js} +1 -1
- package/dist/public/assets/_DMUwd9H92.js.br +0 -0
- package/dist/public/assets/{_DGktplbo2.js → _DMtPvxcV2.js} +1 -1
- package/dist/public/assets/_DMtPvxcV2.js.br +0 -0
- package/dist/public/assets/{_D4WhUwUL2.js → _DT-26-wO2.js} +1 -1
- package/dist/public/assets/_DT-26-wO2.js.br +0 -0
- package/dist/public/assets/{_CVWmEDK_.js → _DUdV0gz0.js} +1 -1
- package/dist/public/assets/_DUdV0gz0.js.br +0 -0
- package/dist/public/assets/{_D5QfUmLo.js → _DUzysI8D.js} +1 -1
- package/dist/public/assets/_DUzysI8D.js.br +0 -0
- package/dist/public/assets/{_C1EPmd7c.js → _DXHS0gtY.js} +1 -1
- package/dist/public/assets/_DXHS0gtY.js.br +0 -0
- package/dist/public/assets/{_CgStCf6c.js → _D_QBXdt_.js} +1 -1
- package/dist/public/assets/_D_QBXdt_.js.br +0 -0
- package/dist/public/assets/{_B_DF81_a2.js → _DcrfU7rG2.js} +1 -1
- package/dist/public/assets/_DcrfU7rG2.js.br +0 -0
- package/dist/public/assets/{_DwUcwzyn.js → _DeLJUKDo.js} +1 -1
- package/dist/public/assets/_DeLJUKDo.js.br +0 -0
- package/dist/public/assets/{_D1kUHoph.js → _DhiEZNWQ.js} +1 -1
- package/dist/public/assets/_DhiEZNWQ.js.br +0 -0
- package/dist/public/assets/{_CBqQa764.js → _DpxdduiL.js} +1 -1
- package/dist/public/assets/_DpxdduiL.js.br +0 -0
- package/dist/public/assets/{_BJxldHyB.js → _GHsg-0WN.js} +1 -1
- package/dist/public/assets/_GHsg-0WN.js.br +0 -0
- package/dist/public/assets/{_Dh0VQfQJ.js → _GNS_1-no.js} +1 -1
- package/dist/public/assets/_GNS_1-no.js.br +0 -0
- package/dist/public/assets/{_Rh7Ur8FS.js → _JnfClY18.js} +1 -1
- package/dist/public/assets/_JnfClY18.js.br +0 -0
- package/dist/public/assets/{_BKnscBu22.js → _JpHoXHnG2.js} +1 -1
- package/dist/public/assets/_JpHoXHnG2.js.br +0 -0
- package/dist/public/assets/{_CUQj5ppf.js → _MvFtViDV.js} +1 -1
- package/dist/public/assets/_MvFtViDV.js.br +0 -0
- package/dist/public/assets/{_Bj_cWMOB.js → _NsfLTym2.js} +1 -1
- package/dist/public/assets/_NsfLTym2.js.br +0 -0
- package/dist/public/assets/{_Ba9xe9U02.js → _PejqmM9H2.js} +1 -1
- package/dist/public/assets/_PejqmM9H2.js.br +0 -0
- package/dist/public/assets/{_B5o4lJM-2.js → _QEWkVGVk2.js} +1 -1
- package/dist/public/assets/_QEWkVGVk2.js.br +0 -0
- package/dist/public/assets/{_DTTkFy3z2.js → _W-TttWav2.js} +1 -1
- package/dist/public/assets/_W-TttWav2.js.br +0 -0
- package/dist/public/assets/{_hAGd6rfv2.js → _ZRQ47Ejr2.js} +1 -1
- package/dist/public/assets/{_B-fILq9z2.js → _g2T-JNXL2.js} +1 -1
- package/dist/public/assets/_g2T-JNXL2.js.br +0 -0
- package/dist/public/assets/{_DGLSFxYV.js → _knKPvKOH.js} +1 -1
- package/dist/public/assets/_knKPvKOH.js.br +0 -0
- package/dist/public/assets/{_BOXInE4V.js → _oI8LLbVP.js} +1 -1
- package/dist/public/assets/_oI8LLbVP.js.br +0 -0
- package/dist/public/assets/{_BdWb51WI.js → _pXWCzuLS.js} +1 -1
- package/dist/public/assets/_pXWCzuLS.js.br +0 -0
- package/dist/public/assets/{_CSHJATpy.js → _v0rWp9Cj.js} +1 -1
- package/dist/public/assets/_v0rWp9Cj.js.br +0 -0
- package/dist/public/assets/{_CYBd6Oge.js → _wgT8HlwA.js} +1 -1
- package/dist/public/assets/{_CGe2Wzv9.js → _z-WUeSlu.js} +1 -1
- package/dist/public/assets/_z-WUeSlu.js.br +0 -0
- package/dist/public/assets/{_BcZJAvN-2.js → _zd34gq7E2.js} +1 -1
- package/dist/public/assets/_zd34gq7E2.js.br +0 -0
- package/dist/public/assets/app-page-fA496vCk.css +1 -0
- package/dist/public/assets/app-page-fA496vCk.css.br +0 -0
- package/dist/public/assets/diff-view-DS3JYk7X.css +1 -0
- package/dist/public/assets/diff-view-DS3JYk7X.css.br +0 -0
- package/dist/public/assets/new-C0PsT8Xt.js +1 -0
- package/dist/public/assets/settings-C0PsT8Xt.js +1 -0
- package/dist/public/assets/w-C0PsT8Xt.js +1 -0
- package/dist/public/assets/w._-B71Uf4-5.js +1 -0
- package/dist/public/assets/w._-C0PsT8Xt.js +1 -0
- package/package.json +1 -1
- package/scripts/migrate.mjs +19 -0
- package/dist/public/assets/_3ZSompN02.js.br +0 -0
- package/dist/public/assets/_AS_QNAut.js.br +0 -0
- package/dist/public/assets/_A_OowyKJ2.js.br +0 -0
- package/dist/public/assets/_AjvVVtb-2.js.br +0 -0
- package/dist/public/assets/_B-fILq9z2.js.br +0 -0
- package/dist/public/assets/_B5o4lJM-2.js.br +0 -0
- package/dist/public/assets/_BJxldHyB.js.br +0 -0
- package/dist/public/assets/_BKnscBu22.js.br +0 -0
- package/dist/public/assets/_BLMDpuBW.js.br +0 -0
- package/dist/public/assets/_BOXInE4V.js.br +0 -0
- package/dist/public/assets/_BUvhBhYI.js.br +0 -0
- package/dist/public/assets/_BZR8clV2.js.br +0 -0
- package/dist/public/assets/_B_02a7gR.js.br +0 -0
- package/dist/public/assets/_B_DF81_a2.js.br +0 -0
- package/dist/public/assets/_Ba9xe9U02.js.br +0 -0
- package/dist/public/assets/_BcZJAvN-2.js.br +0 -0
- package/dist/public/assets/_Bd1pgCVU.js.br +0 -0
- package/dist/public/assets/_BdWb51WI.js.br +0 -0
- package/dist/public/assets/_Bj_cWMOB.js.br +0 -0
- package/dist/public/assets/_Bo7bxECF.js.br +0 -0
- package/dist/public/assets/_BsPMrz7F.js.br +0 -0
- package/dist/public/assets/_C040XCr_2.js.br +0 -0
- package/dist/public/assets/_C0jyA9P3.js.br +0 -0
- package/dist/public/assets/_C1EPmd7c.js.br +0 -0
- package/dist/public/assets/_CBqQa764.js.br +0 -0
- package/dist/public/assets/_CGe2Wzv9.js.br +0 -0
- package/dist/public/assets/_CIqrNCTI.js.br +0 -0
- package/dist/public/assets/_CSHJATpy.js.br +0 -0
- package/dist/public/assets/_CTagvw5f2.js.br +0 -0
- package/dist/public/assets/_CUQj5ppf.js.br +0 -0
- package/dist/public/assets/_CVWmEDK_.js.br +0 -0
- package/dist/public/assets/_Cc9FkJJU.js.br +0 -0
- package/dist/public/assets/_Cg9E-hC9.js.br +0 -0
- package/dist/public/assets/_CgStCf6c.js.br +0 -0
- package/dist/public/assets/_CtQKrFEA2.js.br +0 -0
- package/dist/public/assets/_CvxThUGr.js.br +0 -0
- package/dist/public/assets/_Cwr7DlYk2.js.br +0 -0
- package/dist/public/assets/_D0MMHjUQ.js.br +0 -0
- package/dist/public/assets/_D1kUHoph.js.br +0 -0
- package/dist/public/assets/_D4WhUwUL2.js.br +0 -0
- package/dist/public/assets/_D5QfUmLo.js.br +0 -0
- package/dist/public/assets/_D8kKtbZL2.js.br +0 -0
- package/dist/public/assets/_DCZujH2N2.js.br +0 -0
- package/dist/public/assets/_DGLSFxYV.js.br +0 -0
- package/dist/public/assets/_DGktplbo2.js.br +0 -0
- package/dist/public/assets/_DIlBIf-A.js.br +0 -0
- package/dist/public/assets/_DK2UAgBJ2.js.br +0 -0
- package/dist/public/assets/_DPmzsr0b.js.br +0 -0
- package/dist/public/assets/_DSWiQozG.js.br +0 -0
- package/dist/public/assets/_DTTkFy3z2.js.br +0 -0
- package/dist/public/assets/_Dblgtz99.js.br +0 -0
- package/dist/public/assets/_Dc8rm3jI.js.br +0 -0
- package/dist/public/assets/_Dh0VQfQJ.js.br +0 -0
- package/dist/public/assets/_DiJIDgvc.js.br +0 -0
- package/dist/public/assets/_DjrRedRo.js.br +0 -0
- package/dist/public/assets/_Dl07-GMx.js.br +0 -0
- package/dist/public/assets/_Dp2CEQ4Q.js.br +0 -0
- package/dist/public/assets/_Dw-O85yr.js.br +0 -0
- package/dist/public/assets/_DwUcwzyn.js.br +0 -0
- package/dist/public/assets/_Dwxc6WXv.js.br +0 -0
- package/dist/public/assets/_Kwrx7rB4.js.br +0 -0
- package/dist/public/assets/_LpMRsHBj.js.br +0 -0
- package/dist/public/assets/_Rh7Ur8FS.js.br +0 -0
- package/dist/public/assets/_UDa7z5Hc.js.br +0 -0
- package/dist/public/assets/_WETndjfo.js.br +0 -0
- package/dist/public/assets/_YQPM-WZr2.js.br +0 -0
- package/dist/public/assets/__4GwJAR8.js +0 -86
- package/dist/public/assets/__4GwJAR8.js.br +0 -0
- package/dist/public/assets/_bm5qnTpZ.js.br +0 -0
- package/dist/public/assets/_hAOdnTV6.js.br +0 -0
- package/dist/public/assets/_hz5dauNZ.js.br +0 -0
- package/dist/public/assets/_iTvtyEoL.js.br +0 -0
- package/dist/public/assets/_k-IEVEnY2.js.br +0 -0
- package/dist/public/assets/_oZRSosjr2.js.br +0 -0
- package/dist/public/assets/app-page-B9bx61fb.css +0 -1
- package/dist/public/assets/app-page-B9bx61fb.css.br +0 -0
- package/dist/public/assets/diff-view-CB87Ra6B.css +0 -1
- package/dist/public/assets/diff-view-CB87Ra6B.css.br +0 -0
- package/dist/public/assets/new-Cg2dy7JI.js +0 -1
- package/dist/public/assets/settings-Cg2dy7JI.js +0 -1
- package/dist/public/assets/w-Cg2dy7JI.js +0 -1
- package/dist/public/assets/w._-Cg-GdtFy.js +0 -1
- package/dist/public/assets/w._-Cg2dy7JI.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 "./_BYk3MBDh.js";
|
|
3
|
-
import { $ as _await, A as repoLabel, At as _try, B as phase, C as sideNavOpen, Ct as _serialize_guard, D as icon_xmark_default, Dt as _template, E as toast_default, Et as _subscribe, H as $global, I as iconBtnRow, J as _attr_or, K as _attr_input_value, L as iconBtnXs, M as setPrimaryHost, Mt as attrTag, N as btnLg, Nt as
|
|
3
|
+
import { $ as _await, A as repoLabel, At as _try, B as phase, C as sideNavOpen, Ct as _serialize_guard, D as icon_xmark_default, Dt as _template, E as toast_default, Et as _subscribe, Ft as writeScope, H as $global, I as iconBtnRow, J as _attr_or, K as _attr_input_value, L as iconBtnXs, M as setPrimaryHost, Mt as attrTag, N as btnLg, Nt as forOf, O as icon_base_default, Ot as _to_text, P as btnSm, Pt as withPageAssets, Q as _attrs_partial, R as inputLg, S as setWorkspaceTab, St as _sep, T as workspaceTab, Tt as _set_serialize_reason, U as _attr, V as tone, W as _attr_class, X as _attr_style, Y as _attr_select_value, Z as _attrs, _t as _resume_branch, at as _el_resume, bt as _scope_with_id, c as icon_arrow_up_default, ct as _flush_head, d as iconBtn$2, dt as _hoist_read_error, et as _content, f as row, ft as _html, gt as _resume, ht as _peek_scope_id, i as icon_sidebar_default, it as _el_read_error, j as repoWebUrl$1, jt as _var, k as parseRepoUrl, kt as _trailers, l as icon_back_default, lt as _for_of, mt as _if, n as findIconBtn, nt as _dynamic_tag, o as rankRepos, ot as _escape, p as sectionCount$1, pt as _id, q as _attr_option_value, r as findInput, s as icon_search_default, st as _existing_scope, t as icon_arrow_down_default, tt as _content_resume, u as icon_refresh_default, ut as _hoist, v as ignoredSsoOrgs, vt as _scope_id, w as theme, wt as _serialize_if, x as setTheme, xt as _script, yt as _scope_reason, z as metaTrunc } from "./_B0yxZ9Td.js";
|
|
4
4
|
import fs from "node:fs";
|
|
5
5
|
import { createServer } from "node:http";
|
|
6
6
|
import path from "node:path";
|
|
@@ -2016,16 +2016,16 @@ function realPath(p) {
|
|
|
2016
2016
|
* refresh pings. Persisted so hooks survive server restarts; migrate.mjs
|
|
2017
2017
|
* reads the same file. */
|
|
2018
2018
|
var file = path.join(config.dataDir, "hook-token");
|
|
2019
|
-
var cached$
|
|
2019
|
+
var cached$2;
|
|
2020
2020
|
function hookToken() {
|
|
2021
|
-
if (cached$
|
|
2021
|
+
if (cached$2) return cached$2;
|
|
2022
2022
|
try {
|
|
2023
|
-
cached$
|
|
2024
|
-
if (cached$
|
|
2023
|
+
cached$2 = fs.readFileSync(file, "utf8").trim();
|
|
2024
|
+
if (cached$2) return cached$2;
|
|
2025
2025
|
} catch {}
|
|
2026
|
-
cached$
|
|
2027
|
-
fs.writeFileSync(file, `${cached$
|
|
2028
|
-
return cached$
|
|
2026
|
+
cached$2 = crypto.randomBytes(16).toString("hex");
|
|
2027
|
+
fs.writeFileSync(file, `${cached$2}\n`, { mode: 384 });
|
|
2028
|
+
return cached$2;
|
|
2029
2029
|
}
|
|
2030
2030
|
//#endregion
|
|
2031
2031
|
//#region src/server/repo-events.ts
|
|
@@ -2566,6 +2566,8 @@ it is the required **prefix** for every other branch you create.
|
|
|
2566
2566
|
so a branch named anything else is invisible: never invent one.
|
|
2567
2567
|
- **Repos:**
|
|
2568
2568
|
${repos.map((r) => `- \`${r.worktree}/\`: ${r.full_name} (base: \`${r.base_branch}\`)`).join("\n")}
|
|
2569
|
+
- **Repo agents files:** you **MUST** read a repo's \`AGENTS.md\` (or
|
|
2570
|
+
\`CLAUDE.md\`) before doing any work in it. It is not loaded for you.
|
|
2569
2571
|
- **No \`git stash\`:** every workspace using a repo shares one stash stack, so
|
|
2570
2572
|
a pop can take another workspace's work. Commit as you go; uncommitted
|
|
2571
2573
|
work isn't part of the review.
|
|
@@ -3019,6 +3021,62 @@ function head1(context) {
|
|
|
3019
3021
|
return stripResponseBody(get1(context));
|
|
3020
3022
|
}
|
|
3021
3023
|
//#endregion
|
|
3024
|
+
//#region src/server/usage/index.ts
|
|
3025
|
+
var TTL_MS$2 = 6e4;
|
|
3026
|
+
/** Plan/quota usage across every agent account this machine is signed into.
|
|
3027
|
+
*
|
|
3028
|
+
* Each provider is one blocking HTTPS round trip against the same endpoint its
|
|
3029
|
+
* own CLI uses; they touch disjoint credentials and cache files, so they run
|
|
3030
|
+
* concurrently and the wait is the slowest single provider, not their sum. */
|
|
3031
|
+
async function collect() {
|
|
3032
|
+
return (await Promise.all(AGENTS.map((agent) => (agent.usage?.() ?? Promise.resolve([])).catch(() => [{
|
|
3033
|
+
...blankRow(agent.meta.id, "error"),
|
|
3034
|
+
note: "fetch failed"
|
|
3035
|
+
}])))).flat();
|
|
3036
|
+
}
|
|
3037
|
+
/** Age of a row served from a failed refresh, in seconds — undefined when the
|
|
3038
|
+
* numbers are current. Percentages from a stale row describe a window that has
|
|
3039
|
+
* since moved on, so they can't be shown as live figures. */
|
|
3040
|
+
function staleSeconds(source) {
|
|
3041
|
+
const match = /^stale-cache\s+(\d+)s/.exec(source);
|
|
3042
|
+
return match ? Number(match[1]) : void 0;
|
|
3043
|
+
}
|
|
3044
|
+
var cached$1 = swr(TTL_MS$2, (_key, _refresh) => collect());
|
|
3045
|
+
function shape(rows) {
|
|
3046
|
+
return { agents: rows.map((row) => ({
|
|
3047
|
+
agent: row.agent,
|
|
3048
|
+
plan: row.plan,
|
|
3049
|
+
account: row.account,
|
|
3050
|
+
stale_seconds: staleSeconds(row.source),
|
|
3051
|
+
note: row.stale_reason || row.note,
|
|
3052
|
+
windows: [
|
|
3053
|
+
{
|
|
3054
|
+
window: "5h",
|
|
3055
|
+
used_percent: row.five_h,
|
|
3056
|
+
resets_at: row.five_h_resets
|
|
3057
|
+
},
|
|
3058
|
+
{
|
|
3059
|
+
window: row.seven_d_label || "7d",
|
|
3060
|
+
used_percent: row.seven_d,
|
|
3061
|
+
resets_at: row.seven_d_resets
|
|
3062
|
+
},
|
|
3063
|
+
{
|
|
3064
|
+
window: "fable",
|
|
3065
|
+
used_percent: row.fable,
|
|
3066
|
+
resets_at: row.fable_resets
|
|
3067
|
+
}
|
|
3068
|
+
].filter((w) => w.used_percent != null)
|
|
3069
|
+
})) };
|
|
3070
|
+
}
|
|
3071
|
+
var usage = async (refresh = false) => shape(await cached$1("usage", refresh));
|
|
3072
|
+
/** What is already known, without asking any provider — for the first
|
|
3073
|
+
* paint, so the nav's plan line renders with the page instead of landing a
|
|
3074
|
+
* moment later and pushing the rows down. Null on a cold server. */
|
|
3075
|
+
var usagePeek = () => {
|
|
3076
|
+
const rows = cached$1.get("usage");
|
|
3077
|
+
return rows ? shape(rows) : null;
|
|
3078
|
+
};
|
|
3079
|
+
//#endregion
|
|
3022
3080
|
//#region src/server/github-api.ts
|
|
3023
3081
|
/** Run a GraphQL query against one host.
|
|
3024
3082
|
*
|
|
@@ -3047,7 +3105,7 @@ async function graphql(query, host = DEFAULT_HOST) {
|
|
|
3047
3105
|
}
|
|
3048
3106
|
//#endregion
|
|
3049
3107
|
//#region src/server/prs.ts
|
|
3050
|
-
var TTL_MS$
|
|
3108
|
+
var TTL_MS$1 = 12e4;
|
|
3051
3109
|
/** PRs whose head is the workspace branch or one of its `-topic` lanes.
|
|
3052
3110
|
* `exclude` lists other workspaces' branches — slugs are user-chosen, so
|
|
3053
3111
|
* another workspace's branch can extend this prefix and its PRs must not
|
|
@@ -3064,7 +3122,7 @@ var branchKey = (fullName, branch) => `${fullName}#${branch}`;
|
|
|
3064
3122
|
* a recency window over all of a repo's PRs, fetched roughly twice what it
|
|
3065
3123
|
* kept here and still aged a quiet workspace out on a busy repo.
|
|
3066
3124
|
* Key: `fullName#branch`. */
|
|
3067
|
-
var branchPrs = swr(TTL_MS$
|
|
3125
|
+
var branchPrs = swr(TTL_MS$1, async (key, refresh) => {
|
|
3068
3126
|
const sep = key.indexOf("#");
|
|
3069
3127
|
const fullName = key.slice(0, sep);
|
|
3070
3128
|
const { host, name } = splitRepo(fullName);
|
|
@@ -3265,7 +3323,7 @@ var exists = (file) => fsp.stat(file).then(() => true, () => false);
|
|
|
3265
3323
|
var isDir = (file) => fsp.stat(file).then((s) => s.isDirectory(), () => false);
|
|
3266
3324
|
//#endregion
|
|
3267
3325
|
//#region src/server/status.ts
|
|
3268
|
-
var TTL_MS
|
|
3326
|
+
var TTL_MS = 2e3;
|
|
3269
3327
|
var snapshot$1 = null;
|
|
3270
3328
|
var inflight = null;
|
|
3271
3329
|
var snapshotGen = 0;
|
|
@@ -3277,7 +3335,7 @@ function invalidateSnapshot() {
|
|
|
3277
3335
|
inflight = null;
|
|
3278
3336
|
}
|
|
3279
3337
|
function statusForAll() {
|
|
3280
|
-
if (snapshot$1 && Date.now() - snapshot$1.at < TTL_MS
|
|
3338
|
+
if (snapshot$1 && Date.now() - snapshot$1.at < TTL_MS) return Promise.resolve(snapshot$1.value);
|
|
3281
3339
|
if (!inflight) {
|
|
3282
3340
|
const gen = snapshotGen;
|
|
3283
3341
|
const run = computeStatus().then((value) => {
|
|
@@ -3444,7 +3502,8 @@ var _middleware_default$3 = Run.ALL(async (_ctx, next) => {
|
|
|
3444
3502
|
prefs: allPrefs(),
|
|
3445
3503
|
instance: getInstance(),
|
|
3446
3504
|
status: quick ? quick.s : statusP,
|
|
3447
|
-
setup: null
|
|
3505
|
+
setup: null,
|
|
3506
|
+
usage: usagePeek()
|
|
3448
3507
|
});
|
|
3449
3508
|
});
|
|
3450
3509
|
//#endregion
|
|
@@ -3549,6 +3608,92 @@ var _layout_default = _template("a", (input) => {
|
|
|
3549
3608
|
_serialize_if($scope0_reason, 0) && writeScope($scope0_id, {});
|
|
3550
3609
|
}, 1);
|
|
3551
3610
|
//#endregion
|
|
3611
|
+
//#region src/client/session.ts
|
|
3612
|
+
/** When an edge auth proxy (oauth2-proxy, Cloudflare Access, …) drops the
|
|
3613
|
+
* session, API fetches turn into login HTML and websocket upgrades fail.
|
|
3614
|
+
* A full reload is what users already do — and unlike a hardcoded
|
|
3615
|
+
* `/oauth2/sign_in` URL, it works for any hosting setup (or none). */
|
|
3616
|
+
var RELOAD_KEY = "work:auth-reload";
|
|
3617
|
+
var reloading = false;
|
|
3618
|
+
/** One reload per death episode. Cleared after a successful API call so a
|
|
3619
|
+
* later expiry can recover again; blocks loops if reload didn't help. */
|
|
3620
|
+
function reloadOnceForAuth() {
|
|
3621
|
+
if (typeof location === "undefined" || reloading) return;
|
|
3622
|
+
try {
|
|
3623
|
+
if (sessionStorage.getItem(RELOAD_KEY)) return;
|
|
3624
|
+
sessionStorage.setItem(RELOAD_KEY, "1");
|
|
3625
|
+
} catch {}
|
|
3626
|
+
reloading = true;
|
|
3627
|
+
location.reload();
|
|
3628
|
+
}
|
|
3629
|
+
/** Successful traffic means we're past any auth gate — allow a future reload. */
|
|
3630
|
+
function clearAuthReloadGuard() {
|
|
3631
|
+
try {
|
|
3632
|
+
sessionStorage.removeItem(RELOAD_KEY);
|
|
3633
|
+
} catch {}
|
|
3634
|
+
}
|
|
3635
|
+
/** True when a Response looks like an auth/proxy bounce instead of our JSON API. */
|
|
3636
|
+
function isAuthDeathResponse(res) {
|
|
3637
|
+
if (res.status === 401 || res.status === 403) return true;
|
|
3638
|
+
const ct = res.headers.get("content-type") || "";
|
|
3639
|
+
if (ct.includes("text/html") && !ct.includes("json")) return true;
|
|
3640
|
+
return false;
|
|
3641
|
+
}
|
|
3642
|
+
//#endregion
|
|
3643
|
+
//#region src/client/api.ts
|
|
3644
|
+
/** Fetch JSON from an API route. Error bodies are always `{ error: string }`;
|
|
3645
|
+
* when one comes back (or the response isn't ok / isn't JSON) this throws,
|
|
3646
|
+
* so callers handle failure in one place. Pass `{ signal: $signal }` where
|
|
3647
|
+
* a component-scoped fetch should abort on destroy.
|
|
3648
|
+
*
|
|
3649
|
+
* Behind an auth proxy, an expired session turns into login HTML (or 401).
|
|
3650
|
+
* Reload once — same fix users already apply by hand, hosting-agnostic. */
|
|
3651
|
+
async function api$7(url, init) {
|
|
3652
|
+
const res = await fetch(url, init);
|
|
3653
|
+
if (isAuthDeathResponse(res)) {
|
|
3654
|
+
reloadOnceForAuth();
|
|
3655
|
+
throw new Error("session expired");
|
|
3656
|
+
}
|
|
3657
|
+
let data;
|
|
3658
|
+
try {
|
|
3659
|
+
data = await res.json();
|
|
3660
|
+
} catch {
|
|
3661
|
+
if (isAuthDeathResponse(res)) {
|
|
3662
|
+
reloadOnceForAuth();
|
|
3663
|
+
throw new Error("session expired");
|
|
3664
|
+
}
|
|
3665
|
+
throw new Error(res.ok ? "invalid response" : `HTTP ${res.status}`);
|
|
3666
|
+
}
|
|
3667
|
+
if (data && typeof data === "object" && data.error) throw new Error(data.error);
|
|
3668
|
+
if (!res.ok) throw new Error(`HTTP ${res.status}`);
|
|
3669
|
+
clearAuthReloadGuard();
|
|
3670
|
+
return data;
|
|
3671
|
+
}
|
|
3672
|
+
//#endregion
|
|
3673
|
+
//#region src/client/usage.ts
|
|
3674
|
+
var cached = null;
|
|
3675
|
+
function lastUsage$1() {
|
|
3676
|
+
return cached?.value ?? null;
|
|
3677
|
+
}
|
|
3678
|
+
/** Prime the store with the server's cached snapshot (SSR and resume), so
|
|
3679
|
+
* the first render has numbers. Stamped as fresh: the server already
|
|
3680
|
+
* revalidates its own copy in the background. */
|
|
3681
|
+
function seedUsage(value) {
|
|
3682
|
+
if (value && !cached) cached = {
|
|
3683
|
+
at: Date.now(),
|
|
3684
|
+
value
|
|
3685
|
+
};
|
|
3686
|
+
}
|
|
3687
|
+
/** The plan row an agent instance draws on: its own account (`claude2`)
|
|
3688
|
+
* when the provider reports per account, else the family's (`codex`). */
|
|
3689
|
+
function usageFor(agentId, usage) {
|
|
3690
|
+
const rows = usage?.agents || [];
|
|
3691
|
+
const exact = rows.find((r) => r.agent === agentId);
|
|
3692
|
+
if (exact) return exact;
|
|
3693
|
+
const family = agentFamily(agentId);
|
|
3694
|
+
return rows.find((r) => r.agent === family) ?? null;
|
|
3695
|
+
}
|
|
3696
|
+
//#endregion
|
|
3552
3697
|
//#region src/client/coalesce.ts
|
|
3553
3698
|
/** Wrap an async task so event bursts collapse: never more than one run in
|
|
3554
3699
|
* flight, with at most one queued rerun that drains after the current one. */
|
|
@@ -3582,38 +3727,6 @@ var connection_pill_default = _template("e", (input) => {
|
|
|
3582
3727
|
_resume_branch($scope0_id);
|
|
3583
3728
|
});
|
|
3584
3729
|
//#endregion
|
|
3585
|
-
//#region src/client/session.ts
|
|
3586
|
-
/** When an edge auth proxy (oauth2-proxy, Cloudflare Access, …) drops the
|
|
3587
|
-
* session, API fetches turn into login HTML and websocket upgrades fail.
|
|
3588
|
-
* A full reload is what users already do — and unlike a hardcoded
|
|
3589
|
-
* `/oauth2/sign_in` URL, it works for any hosting setup (or none). */
|
|
3590
|
-
var RELOAD_KEY = "work:auth-reload";
|
|
3591
|
-
var reloading = false;
|
|
3592
|
-
/** One reload per death episode. Cleared after a successful API call so a
|
|
3593
|
-
* later expiry can recover again; blocks loops if reload didn't help. */
|
|
3594
|
-
function reloadOnceForAuth() {
|
|
3595
|
-
if (typeof location === "undefined" || reloading) return;
|
|
3596
|
-
try {
|
|
3597
|
-
if (sessionStorage.getItem(RELOAD_KEY)) return;
|
|
3598
|
-
sessionStorage.setItem(RELOAD_KEY, "1");
|
|
3599
|
-
} catch {}
|
|
3600
|
-
reloading = true;
|
|
3601
|
-
location.reload();
|
|
3602
|
-
}
|
|
3603
|
-
/** Successful traffic means we're past any auth gate — allow a future reload. */
|
|
3604
|
-
function clearAuthReloadGuard() {
|
|
3605
|
-
try {
|
|
3606
|
-
sessionStorage.removeItem(RELOAD_KEY);
|
|
3607
|
-
} catch {}
|
|
3608
|
-
}
|
|
3609
|
-
/** True when a Response looks like an auth/proxy bounce instead of our JSON API. */
|
|
3610
|
-
function isAuthDeathResponse(res) {
|
|
3611
|
-
if (res.status === 401 || res.status === 403) return true;
|
|
3612
|
-
const ct = res.headers.get("content-type") || "";
|
|
3613
|
-
if (ct.includes("text/html") && !ct.includes("json")) return true;
|
|
3614
|
-
return false;
|
|
3615
|
-
}
|
|
3616
|
-
//#endregion
|
|
3617
3730
|
//#region src/client/theme.ts
|
|
3618
3731
|
var LIGHT_CHROME = "#fafafa";
|
|
3619
3732
|
var DARK_CHROME = "#131316";
|
|
@@ -3700,26 +3813,28 @@ function applyInstance(inst) {
|
|
|
3700
3813
|
}
|
|
3701
3814
|
//#endregion
|
|
3702
3815
|
//#region src/tags/settings-page.css.ts
|
|
3703
|
-
var content$2 = "
|
|
3704
|
-
var agentGrid = "
|
|
3705
|
-
var toolGrid = "
|
|
3816
|
+
var content$2 = "_cd _bG _bH";
|
|
3817
|
+
var agentGrid = "_ch _br";
|
|
3818
|
+
var toolGrid = "_cr _br";
|
|
3819
|
+
var themeSeg = "_cG _6";
|
|
3820
|
+
var swatches = "_cO _6";
|
|
3706
3821
|
//#endregion
|
|
3707
3822
|
//#region src/tags/page-head.marko
|
|
3708
3823
|
var page_head_default = _template("r", (input) => {
|
|
3709
3824
|
const $scope0_reason = _scope_reason(), $sg__input_backHref__OR__input_onBack__OR__input_meta__OR__input_actions = _serialize_guard($scope0_reason, 3), $sg__input_meta = _serialize_guard($scope0_reason, 6), $sg__input_actions = _serialize_guard($scope0_reason, 7), $si__input_backHref__OR__input_onBack = _serialize_if($scope0_reason, 1), $si__input_meta = _serialize_if($scope0_reason, 6), $si__input_actions = _serialize_if($scope0_reason, 7);
|
|
3710
3825
|
const $scope0_id = _scope_id();
|
|
3711
|
-
_html(`<header${_attr_class("
|
|
3826
|
+
_html(`<header${_attr_class("_bI")}>`);
|
|
3712
3827
|
_if(() => {
|
|
3713
3828
|
if (input.backHref) {
|
|
3714
3829
|
const $scope1_id = _scope_id();
|
|
3715
|
-
_html(`<a${_attr("href", input.backHref)}${_attr_class([iconBtnRow, "
|
|
3830
|
+
_html(`<a${_attr("href", input.backHref)}${_attr_class([iconBtnRow, "_cU"])}${_attr_or("title", input.backTitle, " title=\"Back (Esc)\"")}${_attr_or("aria-label", input.backTitle, " aria-label=Back")}>`);
|
|
3716
3831
|
icon_back_default({ size: 16 });
|
|
3717
3832
|
_html(`</a>${_el_resume($scope1_id, "a", _serialize_guard($scope0_reason, 0))}`);
|
|
3718
3833
|
_serialize_if($scope0_reason, 2) && writeScope($scope1_id, { _: _serialize_if($scope0_reason, 0) && _scope_with_id($scope0_id) });
|
|
3719
3834
|
return 0;
|
|
3720
3835
|
} else if (input.onBack) {
|
|
3721
3836
|
const $scope2_id = _scope_id();
|
|
3722
|
-
_html(`<button${_attr_class([iconBtnRow, "
|
|
3837
|
+
_html(`<button${_attr_class([iconBtnRow, "_cU"])}${_attr_or("title", input.backTitle, " title=\"Back (Esc)\"")}${_attr_or("aria-label", input.backTitle, " aria-label=Back")}>`);
|
|
3723
3838
|
icon_back_default({ size: 16 });
|
|
3724
3839
|
_html(`</button>${_el_resume($scope2_id, "a")}`);
|
|
3725
3840
|
_script($scope2_id, "r0");
|
|
@@ -3727,11 +3842,11 @@ var page_head_default = _template("r", (input) => {
|
|
|
3727
3842
|
return 1;
|
|
3728
3843
|
}
|
|
3729
3844
|
}, $scope0_id, "b", _serialize_guard($scope0_reason, 2), _serialize_guard($scope0_reason, 1), $sg__input_backHref__OR__input_onBack__OR__input_meta__OR__input_actions, 0, 1);
|
|
3730
|
-
_html(`<div${_attr_class("
|
|
3845
|
+
_html(`<div${_attr_class("_bK")}><h1${_attr("id", input.titleId)}${_attr_class("_bJ")}>${_escape(input.title)}${_el_resume($scope0_id, "e", _serialize_guard($scope0_reason, 5))}</h1>${_el_resume($scope0_id, "d", _serialize_guard($scope0_reason, 4))}`);
|
|
3731
3846
|
_if(() => {
|
|
3732
3847
|
if (input.meta) {
|
|
3733
3848
|
const $scope3_id = _scope_id();
|
|
3734
|
-
_html(`<p${_attr_class("
|
|
3849
|
+
_html(`<p${_attr_class("_bL")}>`);
|
|
3735
3850
|
_dynamic_tag($scope3_id, "b", input.meta, {}, 0, 0, $sg__input_meta);
|
|
3736
3851
|
_html("</p>");
|
|
3737
3852
|
$si__input_meta && writeScope($scope3_id, { _: _scope_with_id($scope0_id) });
|
|
@@ -3742,7 +3857,7 @@ var page_head_default = _template("r", (input) => {
|
|
|
3742
3857
|
_if(() => {
|
|
3743
3858
|
if (input.actions) {
|
|
3744
3859
|
const $scope4_id = _scope_id();
|
|
3745
|
-
_html(`<div${_attr_class("
|
|
3860
|
+
_html(`<div${_attr_class("_bM")}>`);
|
|
3746
3861
|
_dynamic_tag($scope4_id, "b", input.actions, {}, 0, 0, $sg__input_actions);
|
|
3747
3862
|
_html("</div>");
|
|
3748
3863
|
$si__input_actions && writeScope($scope4_id, { _: _scope_with_id($scope0_id) });
|
|
@@ -3810,7 +3925,7 @@ var icon_agent_default = _template("G", (input) => {
|
|
|
3810
3925
|
n: $badge__closures
|
|
3811
3926
|
});
|
|
3812
3927
|
});
|
|
3813
|
-
var usageNote = "
|
|
3928
|
+
var usageNote = "_c3 _S";
|
|
3814
3929
|
//#endregion
|
|
3815
3930
|
//#region src/tags/icons/icon-warning.marko
|
|
3816
3931
|
var icon_warning_default = _template("kb", (input) => {
|
|
@@ -3851,11 +3966,11 @@ var usage_meters_default = _template("D", (input) => {
|
|
|
3851
3966
|
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);
|
|
3852
3967
|
const $scope0_id = _scope_id();
|
|
3853
3968
|
const agent = input.agent;
|
|
3854
|
-
_html(`<div${_attr_class(["
|
|
3969
|
+
_html(`<div${_attr_class(["_cX", { ["_cY"]: input.hideName }])}><div${_attr_class("_cZ")}>`);
|
|
3855
3970
|
_if(() => {
|
|
3856
3971
|
if (!input.hideName) {
|
|
3857
3972
|
const $scope1_id = _scope_id();
|
|
3858
|
-
_html(`<strong${_attr_class("
|
|
3973
|
+
_html(`<strong${_attr_class("_dh")}>${_escape(agent.agent)}${_el_resume($scope1_id, "b", $sg__input_agent)}</strong>`);
|
|
3859
3974
|
$si__input_agent__OR__input_hideName && writeScope($scope1_id, { _: $si__input_agent && _scope_with_id($scope0_id) });
|
|
3860
3975
|
return 0;
|
|
3861
3976
|
}
|
|
@@ -3863,7 +3978,7 @@ var usage_meters_default = _template("D", (input) => {
|
|
|
3863
3978
|
_if(() => {
|
|
3864
3979
|
if (agent.plan && agent.plan.toLowerCase() !== agent.agent.toLowerCase()) {
|
|
3865
3980
|
const $scope2_id = _scope_id();
|
|
3866
|
-
_html(`<span${_attr_class("
|
|
3981
|
+
_html(`<span${_attr_class("_c0")}>${_escape(agent.plan.replace(/^default_/, "").replaceAll("_", " "))}${_el_resume($scope2_id, "b", $sg__input_agent)}</span>`);
|
|
3867
3982
|
$si__input_agent && writeScope($scope2_id, { _: _scope_with_id($scope0_id) });
|
|
3868
3983
|
return 0;
|
|
3869
3984
|
}
|
|
@@ -3871,21 +3986,21 @@ var usage_meters_default = _template("D", (input) => {
|
|
|
3871
3986
|
_if(() => {
|
|
3872
3987
|
if (agent.stale_seconds != null) {
|
|
3873
3988
|
const $scope3_id = _scope_id();
|
|
3874
|
-
_html(`<span${_attr_class("
|
|
3989
|
+
_html(`<span${_attr_class("_c1")}${_attr("title", `${agent.note || "provider unreachable"}. Last cached numbers, ${duration(agent.stale_seconds * 1e3)} old`)}>`);
|
|
3875
3990
|
icon_warning_default({ size: 12 });
|
|
3876
3991
|
_html(` ${_sep($sg__input_agent)}${_escape(duration(agent.stale_seconds * 1e3))}${_el_resume($scope3_id, "c", $sg__input_agent)} old</span>${_el_resume($scope3_id, "a", $sg__input_agent)}`);
|
|
3877
3992
|
$si__input_agent && writeScope($scope3_id, { _: _scope_with_id($scope0_id) });
|
|
3878
3993
|
return 0;
|
|
3879
3994
|
}
|
|
3880
3995
|
}, $scope0_id, "e", $sg__input_agent, $sg__input_agent, $sg__input_agent__OR__input_hideName, 0, 1);
|
|
3881
|
-
_html(`</div><div${_attr_class(["
|
|
3996
|
+
_html(`</div><div${_attr_class(["_c2", { ["_di"]: agent.stale_seconds != null }])}>`);
|
|
3882
3997
|
_for_of(agent.windows || [], (win) => {
|
|
3883
3998
|
const $scope4_id = _scope_id();
|
|
3884
3999
|
const pct = pctText$1(win.used_percent);
|
|
3885
4000
|
const label = resetLabel(win.resets_at, agent.stale_seconds != null);
|
|
3886
|
-
const fillClass = win.used_percent >= 90 ? "
|
|
3887
|
-
const pctClass = win.used_percent >= 90 ? "
|
|
3888
|
-
_html(`<div${_attr_class("
|
|
4001
|
+
const fillClass = win.used_percent >= 90 ? "_da" : win.used_percent >= 70 ? "_c_" : win.used_percent >= 40 ? "_c9" : "_c8";
|
|
4002
|
+
const pctClass = win.used_percent >= 90 ? "_df" : win.used_percent >= 70 ? "_de" : win.used_percent >= 40 ? "_dd" : "_dc";
|
|
4003
|
+
_html(`<div${_attr_class("_c4")}${_attr("title", `${win.window}: ${pct} used${win.resets_at ? `, resets ${new Date(win.resets_at).toLocaleString()}` : ""}`)}><span${_attr_class("_c5")}>${_escape(win.window)}${_el_resume($scope4_id, "c", $sg__input_agent)}</span><span${_attr_class("_c6")}><span${_attr_class(["_c7", 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(["_db", pctClass])}>${_escape(pct)}${_el_resume($scope4_id, "g", $sg__input_agent)}</span>${_el_resume($scope4_id, "f", $sg__input_agent)}<span${_attr_class("_dg")}>`);
|
|
3889
4004
|
_if(() => {
|
|
3890
4005
|
if (label) {
|
|
3891
4006
|
const $scope6_id = _scope_id();
|
|
@@ -3919,7 +4034,7 @@ var usage_meters_default = _template("D", (input) => {
|
|
|
3919
4034
|
});
|
|
3920
4035
|
//#endregion
|
|
3921
4036
|
//#region src/tags/sso-auth.marko
|
|
3922
|
-
var api$
|
|
4037
|
+
var api$6;
|
|
3923
4038
|
var watchProgress$2;
|
|
3924
4039
|
var sso_auth_default = _template("z", (input) => {
|
|
3925
4040
|
const $scope0_reason = _scope_reason(), $sg__input_items = _serialize_guard($scope0_reason, 2), $sg__input_skipped = _serialize_guard($scope0_reason, 1), $sg__input_skipped__OR__input_items_length = _serialize_guard($scope0_reason, 0), $si__input_items_0_host = _serialize_if($scope0_reason, 3);
|
|
@@ -3950,7 +4065,7 @@ var sso_auth_default = _template("z", (input) => {
|
|
|
3950
4065
|
});
|
|
3951
4066
|
await watcher.ready;
|
|
3952
4067
|
try {
|
|
3953
|
-
await api$
|
|
4068
|
+
await api$6(`/api/setup/${encodeURIComponent(host)}`, {
|
|
3954
4069
|
method: "POST",
|
|
3955
4070
|
headers: { "content-type": "application/json" },
|
|
3956
4071
|
body: JSON.stringify({ action: "auth-refresh" })
|
|
@@ -3964,14 +4079,14 @@ var sso_auth_default = _template("z", (input) => {
|
|
|
3964
4079
|
localCode = null;
|
|
3965
4080
|
}
|
|
3966
4081
|
}, "z0", $scope0_id);
|
|
3967
|
-
_html(`<div${_attr_class("
|
|
4082
|
+
_html(`<div${_attr_class("_dz")}>`);
|
|
3968
4083
|
_if(() => {
|
|
3969
4084
|
if (input.items.length) {
|
|
3970
4085
|
const $scope1_id = _scope_id();
|
|
3971
|
-
_html(`<p${_attr_class("
|
|
4086
|
+
_html(`<p${_attr_class("_dK")}>GitHub CLI needs org SSO for ${_sep($sg__input_items)}${_escape(input.items.map((s) => s.org).join(", "))}${_el_resume($scope1_id, "b", $sg__input_items)}.</p><ul${_attr_class("_dA")}>`);
|
|
3972
4087
|
_for_of(input.items, (s) => {
|
|
3973
4088
|
const $scope2_id = _scope_id();
|
|
3974
|
-
_html(`<li${_attr_class("
|
|
4089
|
+
_html(`<li${_attr_class("_dB")}>${_escape(s.org)}${_el_resume($scope2_id, "b", $sg__input_items)}<button type=button${_attr_class("_dC")}${_attr("title", `Skip ${s.org}`)}${_attr("aria-label", `Skip ${s.org}`)}${_attr("disabled", busy)}>`);
|
|
3975
4090
|
icon_xmark_default({ size: 11 });
|
|
3976
4091
|
_html(`</button>${_el_resume($scope2_id, "c")}</li>`);
|
|
3977
4092
|
_script($scope2_id, "z1");
|
|
@@ -3980,17 +4095,17 @@ var sso_auth_default = _template("z", (input) => {
|
|
|
3980
4095
|
_: _scope_with_id($scope1_id)
|
|
3981
4096
|
}));
|
|
3982
4097
|
}, "org", $scope1_id, "c", $sg__input_items, $sg__input_items, $sg__input_items, "</ul>", 1);
|
|
3983
|
-
_html(`<div${_attr_class("
|
|
4098
|
+
_html(`<div${_attr_class("_dD")}>`);
|
|
3984
4099
|
_if(() => {
|
|
3985
4100
|
if (busy && authCode$2) {
|
|
3986
4101
|
const $scope5_id = _scope_id();
|
|
3987
|
-
_html(`<span${_attr_class("
|
|
4102
|
+
_html(`<span${_attr_class("_dE")}><span${_attr_class("_F")}></span> Enter code <strong${_attr_class("_dF")}>${_escape(authCode$2)}${_el_resume($scope5_id, "d")}</strong> at <a${_attr("href", `https://${host}/login/device`)}${_attr_class("_dG")}>${_escape(host)}${_el_resume($scope5_id, "f", _serialize_guard($scope0_reason, 3))}/login/device</a>${_el_resume($scope5_id, "e")}</span>`);
|
|
3988
4103
|
_script($scope5_id, "z2");
|
|
3989
4104
|
_subscribe($authCode__closures, _subscribe($si__input_items_0_host && $host__closures, writeScope($scope5_id, {})));
|
|
3990
4105
|
return 0;
|
|
3991
4106
|
} else if (busy) {
|
|
3992
4107
|
const $scope8_id = _scope_id();
|
|
3993
|
-
_html(`<span${_attr_class("
|
|
4108
|
+
_html(`<span${_attr_class("_dE")}><span${_attr_class("_F")}></span>Starting GitHub re-authorization…</span>`);
|
|
3994
4109
|
writeScope($scope8_id, {});
|
|
3995
4110
|
return 1;
|
|
3996
4111
|
} else {
|
|
@@ -4004,7 +4119,7 @@ var sso_auth_default = _template("z", (input) => {
|
|
|
4004
4119
|
_if(() => {
|
|
4005
4120
|
if (localError) {
|
|
4006
4121
|
const $scope6_id = _scope_id();
|
|
4007
|
-
_html(`<p${_attr_class("
|
|
4122
|
+
_html(`<p${_attr_class("_dK")}>${_escape(localError)}${_el_resume($scope6_id, "b")}</p>`);
|
|
4008
4123
|
_subscribe($localError__closures, writeScope($scope6_id, {}));
|
|
4009
4124
|
return 0;
|
|
4010
4125
|
}
|
|
@@ -4016,10 +4131,10 @@ var sso_auth_default = _template("z", (input) => {
|
|
|
4016
4131
|
_if(() => {
|
|
4017
4132
|
if (skipped$1.length) {
|
|
4018
4133
|
const $scope3_id = _scope_id();
|
|
4019
|
-
_html(`<p${_attr_class("
|
|
4134
|
+
_html(`<p${_attr_class("_dH")}>Skipped SSO for `);
|
|
4020
4135
|
_for_of(skipped$1, (s) => {
|
|
4021
4136
|
const $scope4_id = _scope_id();
|
|
4022
|
-
_html(`<span${_attr_class("
|
|
4137
|
+
_html(`<span${_attr_class("_dI")}>${_escape(s.org)}${_el_resume($scope4_id, "b", $sg__input_skipped)}<button type=button${_attr_class("_dJ")}${_attr("title", `Show ${s.org} again`)}>(undo)</button>${_el_resume($scope4_id, "c")}</span>`);
|
|
4023
4138
|
_script($scope4_id, "z4");
|
|
4024
4139
|
writeScope($scope4_id, {
|
|
4025
4140
|
f: s?.org,
|
|
@@ -4094,7 +4209,7 @@ var modal_view_default = _template("p", (input) => {
|
|
|
4094
4209
|
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;
|
|
4095
4210
|
const dismissable = input.dismissable !== false;
|
|
4096
4211
|
let open = input.open;
|
|
4097
|
-
_html(`<dialog${_attr_class(["
|
|
4212
|
+
_html(`<dialog${_attr_class(["_fw", inputClass])}${_attr("aria-labelledby", inputLabelledBy)}${inputLabelledBy ? _attr("aria-label", inputAriaLabel) : _attr("aria-label", inputAriaLabel || label)} closedby=${dismissable ? "any" : "none"}${_attrs_partial({
|
|
4098
4213
|
...htmlInput,
|
|
4099
4214
|
open: null
|
|
4100
4215
|
}, {
|
|
@@ -4104,20 +4219,20 @@ var modal_view_default = _template("p", (input) => {
|
|
|
4104
4219
|
closedby: 1,
|
|
4105
4220
|
"on-cancel": 1,
|
|
4106
4221
|
"on-close": 1
|
|
4107
|
-
}, "a", $scope0_id, "dialog")}><div${_attr_class("
|
|
4222
|
+
}, "a", $scope0_id, "dialog")}><div${_attr_class("_fx")}>`);
|
|
4108
4223
|
_dynamic_tag($scope0_id, "c", content, {}, 0, 0, _serialize_guard($scope0_reason, 6));
|
|
4109
4224
|
_html("</div>");
|
|
4110
4225
|
_if(() => {
|
|
4111
4226
|
if (footer) {
|
|
4112
4227
|
const $scope1_id = _scope_id();
|
|
4113
|
-
_html(`<form method=dialog${_attr_class("
|
|
4228
|
+
_html(`<form method=dialog${_attr_class("_fy")}>`);
|
|
4114
4229
|
_dynamic_tag($scope1_id, "b", footer.content, {}, 0, 0, _serialize_guard($scope0_reason, 7));
|
|
4115
4230
|
_html("</form>");
|
|
4116
4231
|
$si__input_openChange__OR__input_footer && writeScope($scope1_id, { _: _serialize_if($scope0_reason, 7) && _scope_with_id($scope0_id) });
|
|
4117
4232
|
return 0;
|
|
4118
4233
|
} else if (input.openChange) {
|
|
4119
4234
|
const $scope2_id = _scope_id();
|
|
4120
|
-
_html(`<form method=dialog${_attr_class("
|
|
4235
|
+
_html(`<form method=dialog${_attr_class("_fy")}>`);
|
|
4121
4236
|
dialog_close_default({
|
|
4122
4237
|
class: ["_o", "_p"],
|
|
4123
4238
|
content: _content("p0", () => {
|
|
@@ -4176,7 +4291,7 @@ var prompt_dialog_default = _template("s", (input) => {
|
|
|
4176
4291
|
const $childScope = _peek_scope_id();
|
|
4177
4292
|
modal_view_default({
|
|
4178
4293
|
label: input.label,
|
|
4179
|
-
class: "
|
|
4294
|
+
class: "_cV",
|
|
4180
4295
|
open: input.open,
|
|
4181
4296
|
openChange: input.openChange,
|
|
4182
4297
|
"aria-labelledby": titleId,
|
|
@@ -4199,7 +4314,7 @@ var prompt_dialog_default = _template("s", (input) => {
|
|
|
4199
4314
|
content: _content("s6", () => {
|
|
4200
4315
|
_scope_reason();
|
|
4201
4316
|
const $scope2_id = _scope_id();
|
|
4202
|
-
_html(`<h2${_attr_class("
|
|
4317
|
+
_html(`<h2${_attr_class("_cW")}${_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) => {
|
|
4203
4318
|
value = _new_value;
|
|
4204
4319
|
}, "s0", $scope2_id))}${_attr("placeholder", input.placeholder)}>${_el_resume($scope2_id, "c")}`);
|
|
4205
4320
|
_script($scope2_id, "s4");
|
|
@@ -4228,7 +4343,7 @@ var prompt_dialog_default = _template("s", (input) => {
|
|
|
4228
4343
|
});
|
|
4229
4344
|
//#endregion
|
|
4230
4345
|
//#region src/tags/settings-page.marko
|
|
4231
|
-
var api$
|
|
4346
|
+
var api$5;
|
|
4232
4347
|
var watchProgress$1;
|
|
4233
4348
|
var MISSING_LABEL = {
|
|
4234
4349
|
"github-auth": "GitHub sign-in",
|
|
@@ -4280,41 +4395,41 @@ var settings_page_default = _template("v", (input) => {
|
|
|
4280
4395
|
themeMode = mode;
|
|
4281
4396
|
setTheme(mode);
|
|
4282
4397
|
applyTheme(mode);
|
|
4283
|
-
}, "
|
|
4398
|
+
}, "v6", $scope0_id);
|
|
4284
4399
|
const selfUpdatePending = !!(self && !selfUpdating && self.install !== "source" && self.latest && self.latest !== self.version);
|
|
4285
4400
|
const applySetup = _resume((s) => {
|
|
4286
4401
|
setup = s;
|
|
4287
4402
|
lastSetup = s;
|
|
4288
4403
|
setPrimaryHost(s.github);
|
|
4289
4404
|
input.setupChange?.(s);
|
|
4290
|
-
}, "
|
|
4405
|
+
}, "v7", $scope0_id);
|
|
4291
4406
|
const syncAgents = _resume(async () => {
|
|
4292
4407
|
try {
|
|
4293
|
-
const snap = await api$
|
|
4408
|
+
const snap = await api$5("/api/settings");
|
|
4294
4409
|
input.agentsChange?.(snap.agents);
|
|
4295
4410
|
if (snap.preferredAgent !== input.preferred) input.preferredChange?.(snap.preferredAgent);
|
|
4296
4411
|
} catch {}
|
|
4297
|
-
}, "
|
|
4412
|
+
}, "v8", $scope0_id);
|
|
4298
4413
|
const loadSetup = _resume(async (refresh) => {
|
|
4299
4414
|
try {
|
|
4300
|
-
applySetup(await api$
|
|
4415
|
+
applySetup(await api$5(`/api/setup${refresh ? "?refresh" : ""}`));
|
|
4301
4416
|
} catch (err) {
|
|
4302
4417
|
error = String(err.message || err);
|
|
4303
4418
|
}
|
|
4304
|
-
}, "
|
|
4419
|
+
}, "v9", $scope0_id);
|
|
4305
4420
|
const loadSelf = _resume(async (refresh) => {
|
|
4306
4421
|
try {
|
|
4307
|
-
const info = await api$
|
|
4422
|
+
const info = await api$5(`/api/setup/self${refresh ? "?refresh" : ""}`);
|
|
4308
4423
|
self = info;
|
|
4309
4424
|
if (info.updating) selfUpdating = true;
|
|
4310
4425
|
} catch {}
|
|
4311
|
-
}, "
|
|
4426
|
+
}, "v10", $scope0_id);
|
|
4312
4427
|
const updateSelf = _resume(async () => {
|
|
4313
4428
|
if (!self || selfUpdating) return;
|
|
4314
4429
|
selfUpdating = true;
|
|
4315
4430
|
const from = self.version;
|
|
4316
4431
|
try {
|
|
4317
|
-
await api$
|
|
4432
|
+
await api$5("/api/setup/self", { method: "POST" });
|
|
4318
4433
|
} catch (err) {
|
|
4319
4434
|
selfUpdating = false;
|
|
4320
4435
|
error = String(err.message || err);
|
|
@@ -4323,7 +4438,7 @@ var settings_page_default = _template("v", (input) => {
|
|
|
4323
4438
|
const started = Date.now();
|
|
4324
4439
|
const tick = async () => {
|
|
4325
4440
|
try {
|
|
4326
|
-
if ((await api$
|
|
4441
|
+
if ((await api$5("/api/setup/self")).version !== from) {
|
|
4327
4442
|
location.reload();
|
|
4328
4443
|
return;
|
|
4329
4444
|
}
|
|
@@ -4332,31 +4447,31 @@ var settings_page_default = _template("v", (input) => {
|
|
|
4332
4447
|
else selfUpdating = false;
|
|
4333
4448
|
};
|
|
4334
4449
|
setTimeout(tick, 4e3);
|
|
4335
|
-
}, "
|
|
4450
|
+
}, "v11", $scope0_id);
|
|
4336
4451
|
const loadUsage = _resume(async (refresh) => {
|
|
4337
4452
|
try {
|
|
4338
|
-
usage = await api$
|
|
4453
|
+
usage = await api$5(`/api/usage${refresh ? "?refresh" : ""}`);
|
|
4339
4454
|
} catch (err) {
|
|
4340
4455
|
usage = { error: String(err.message || err) };
|
|
4341
4456
|
}
|
|
4342
4457
|
lastUsage = usage;
|
|
4343
|
-
}, "
|
|
4458
|
+
}, "v12", $scope0_id);
|
|
4344
4459
|
const refresh = _resume(async () => {
|
|
4345
4460
|
refreshing = true;
|
|
4346
4461
|
await Promise.all([loadSetup(true), loadSelf(true)]);
|
|
4347
4462
|
refreshing = false;
|
|
4348
|
-
}, "
|
|
4463
|
+
}, "v13", $scope0_id);
|
|
4349
4464
|
const refreshUsage = _resume(async () => {
|
|
4350
4465
|
usageRefreshing = true;
|
|
4351
4466
|
await loadUsage(true);
|
|
4352
4467
|
usageRefreshing = false;
|
|
4353
|
-
}, "
|
|
4468
|
+
}, "v14", $scope0_id);
|
|
4354
4469
|
const setActive = _resume((id, line) => {
|
|
4355
4470
|
const next = new Map(active);
|
|
4356
4471
|
if (line === null) next.delete(id);
|
|
4357
4472
|
else next.set(id, line);
|
|
4358
4473
|
active = next;
|
|
4359
|
-
}, "
|
|
4474
|
+
}, "v15", $scope0_id);
|
|
4360
4475
|
const run = _resume(async (id, action, version) => {
|
|
4361
4476
|
if (active.has(id)) return;
|
|
4362
4477
|
error = null;
|
|
@@ -4368,7 +4483,7 @@ var settings_page_default = _template("v", (input) => {
|
|
|
4368
4483
|
});
|
|
4369
4484
|
await watcher.ready;
|
|
4370
4485
|
try {
|
|
4371
|
-
applySetup(await api$
|
|
4486
|
+
applySetup(await api$5(`/api/setup/${encodeURIComponent(id)}`, {
|
|
4372
4487
|
method: "POST",
|
|
4373
4488
|
headers: { "content-type": "application/json" },
|
|
4374
4489
|
body: JSON.stringify({
|
|
@@ -4387,12 +4502,12 @@ var settings_page_default = _template("v", (input) => {
|
|
|
4387
4502
|
watcher.stop();
|
|
4388
4503
|
setActive(id, null);
|
|
4389
4504
|
}
|
|
4390
|
-
}, "
|
|
4505
|
+
}, "v16", $scope0_id);
|
|
4391
4506
|
const changeHost = _resume(async (host, remove) => {
|
|
4392
4507
|
hostBusy = true;
|
|
4393
4508
|
error = null;
|
|
4394
4509
|
try {
|
|
4395
|
-
applySetup(await api$
|
|
4510
|
+
applySetup(await api$5("/api/github/hosts", {
|
|
4396
4511
|
method: "POST",
|
|
4397
4512
|
headers: { "content-type": "application/json" },
|
|
4398
4513
|
body: JSON.stringify({
|
|
@@ -4406,14 +4521,14 @@ var settings_page_default = _template("v", (input) => {
|
|
|
4406
4521
|
} finally {
|
|
4407
4522
|
hostBusy = false;
|
|
4408
4523
|
}
|
|
4409
|
-
}, "
|
|
4524
|
+
}, "v17", $scope0_id);
|
|
4410
4525
|
const runEach = _resume(async (ids, action) => {
|
|
4411
4526
|
for (const id of ids) await run(id, action);
|
|
4412
|
-
}, "
|
|
4527
|
+
}, "v18", $scope0_id);
|
|
4413
4528
|
const setPreferred = _resume(async (agent) => {
|
|
4414
4529
|
input.preferredChange?.(agent);
|
|
4415
4530
|
try {
|
|
4416
|
-
await api$
|
|
4531
|
+
await api$5("/api/settings", {
|
|
4417
4532
|
method: "PUT",
|
|
4418
4533
|
headers: { "content-type": "application/json" },
|
|
4419
4534
|
body: JSON.stringify({ preferredAgent: agent })
|
|
@@ -4421,7 +4536,7 @@ var settings_page_default = _template("v", (input) => {
|
|
|
4421
4536
|
} catch (err) {
|
|
4422
4537
|
error = String(err.message || err);
|
|
4423
4538
|
}
|
|
4424
|
-
}, "
|
|
4539
|
+
}, "v19", $scope0_id);
|
|
4425
4540
|
const saveTimer = { id: 0 };
|
|
4426
4541
|
const setInstance = _resume((patch) => {
|
|
4427
4542
|
const next = {
|
|
@@ -4433,7 +4548,7 @@ var settings_page_default = _template("v", (input) => {
|
|
|
4433
4548
|
clearTimeout(saveTimer.id);
|
|
4434
4549
|
saveTimer.id = setTimeout(async () => {
|
|
4435
4550
|
try {
|
|
4436
|
-
const snap = await api$
|
|
4551
|
+
const snap = await api$5("/api/settings", {
|
|
4437
4552
|
method: "PUT",
|
|
4438
4553
|
headers: { "content-type": "application/json" },
|
|
4439
4554
|
body: JSON.stringify({ instance: next })
|
|
@@ -4446,14 +4561,14 @@ var settings_page_default = _template("v", (input) => {
|
|
|
4446
4561
|
error = String(err.message || err);
|
|
4447
4562
|
}
|
|
4448
4563
|
}, 300);
|
|
4449
|
-
}, "
|
|
4564
|
+
}, "v20", $scope0_id);
|
|
4450
4565
|
const setEnabled = _resume(async (id, on) => {
|
|
4451
4566
|
if (!setup) return;
|
|
4452
4567
|
const off = new Set(setup.agents.flatMap((f) => f.instances.filter((i) => !i.enabled).map((i) => i.id)));
|
|
4453
4568
|
if (on) off.delete(id);
|
|
4454
4569
|
else off.add(id);
|
|
4455
4570
|
try {
|
|
4456
|
-
const snap = await api$
|
|
4571
|
+
const snap = await api$5("/api/settings", {
|
|
4457
4572
|
method: "PUT",
|
|
4458
4573
|
headers: { "content-type": "application/json" },
|
|
4459
4574
|
body: JSON.stringify({ disabledAgents: [...off] })
|
|
@@ -4473,7 +4588,7 @@ var settings_page_default = _template("v", (input) => {
|
|
|
4473
4588
|
} catch (err) {
|
|
4474
4589
|
error = String(err.message || err);
|
|
4475
4590
|
}
|
|
4476
|
-
}, "
|
|
4591
|
+
}, "v21", $scope0_id);
|
|
4477
4592
|
const search = _resume((q) => {
|
|
4478
4593
|
query = q;
|
|
4479
4594
|
clearTimeout(searchTimer.id);
|
|
@@ -4485,7 +4600,7 @@ var settings_page_default = _template("v", (input) => {
|
|
|
4485
4600
|
searching = true;
|
|
4486
4601
|
searchTimer.id = setTimeout(async () => {
|
|
4487
4602
|
try {
|
|
4488
|
-
const res = await api$
|
|
4603
|
+
const res = await api$5(`/api/setup/search?q=${encodeURIComponent(q.trim())}`);
|
|
4489
4604
|
if (query === q) hits = res;
|
|
4490
4605
|
} catch (err) {
|
|
4491
4606
|
error = String(err.message || err);
|
|
@@ -4494,22 +4609,22 @@ var settings_page_default = _template("v", (input) => {
|
|
|
4494
4609
|
}
|
|
4495
4610
|
}, 250);
|
|
4496
4611
|
}, "v0", $scope0_id);
|
|
4497
|
-
const outdated = _resume((t) => !!(t.installed && t.latest && t.latest !== t.version), "
|
|
4612
|
+
const outdated = _resume((t) => !!(t.installed && t.latest && t.latest !== t.version), "v22");
|
|
4498
4613
|
const tools = setup?.tools || [];
|
|
4499
4614
|
const missingInstallable = tools.filter((t) => t.recommended && !t.installed && t.installable);
|
|
4500
4615
|
const missingCount = tools.filter((t) => t.recommended && !t.installed).length;
|
|
4501
4616
|
const outdatedIds = tools.filter(outdated).map((t) => t.id);
|
|
4502
4617
|
const families = setup?.agents || [];
|
|
4503
4618
|
const instanceIds = new Set(families.flatMap((f) => f.instances.map((i) => i.id)));
|
|
4504
|
-
const accountsFor = _resume((id) => (usage?.agents || []).filter((u) => u.agent === id), "
|
|
4505
|
-
const strayAccountsFor = _resume((f) => (usage?.agents || []).filter((u) => !instanceIds.has(u.agent) && familyOf(u.agent, families) === f.id), "
|
|
4619
|
+
const accountsFor = _resume((id) => (usage?.agents || []).filter((u) => u.agent === id), "v23", $scope0_id);
|
|
4620
|
+
const strayAccountsFor = _resume((f) => (usage?.agents || []).filter((u) => !instanceIds.has(u.agent) && familyOf(u.agent, families) === f.id), "v24", $scope0_id);
|
|
4506
4621
|
const otherUsage = (usage?.agents || []).filter((u) => familyOf(u.agent, families) === null);
|
|
4507
4622
|
const titleId = _id();
|
|
4508
4623
|
const agentsId = _id();
|
|
4509
4624
|
const appearanceId = _id();
|
|
4510
4625
|
const githubId = _id();
|
|
4511
4626
|
const machineId = _id();
|
|
4512
|
-
_html(`<div${_attr_class("
|
|
4627
|
+
_html(`<div${_attr_class("_bE")} role=region${_attr("aria-labelledby", titleId)}><div${_attr_class("_bF")}><div${_attr_class(content$2)}>`);
|
|
4513
4628
|
_set_serialize_reason({
|
|
4514
4629
|
0: _serialize_guard($scope0_reason, 4),
|
|
4515
4630
|
1: $sg__input_backHref__OR__input_onExit,
|
|
@@ -4521,8 +4636,8 @@ var settings_page_default = _template("v", (input) => {
|
|
|
4521
4636
|
title: "Settings",
|
|
4522
4637
|
titleId,
|
|
4523
4638
|
backHref: input.backHref,
|
|
4524
|
-
onBack: input.onExit && _resume(() => input.onExit?.(), "
|
|
4525
|
-
meta: attrTag({ content: _content_resume("
|
|
4639
|
+
onBack: input.onExit && _resume(() => input.onExit?.(), "v25", $scope0_id),
|
|
4640
|
+
meta: attrTag({ content: _content_resume("v33", () => {
|
|
4526
4641
|
_scope_reason();
|
|
4527
4642
|
const $scope5_id = _scope_id();
|
|
4528
4643
|
_if(() => {
|
|
@@ -4533,12 +4648,12 @@ var settings_page_default = _template("v", (input) => {
|
|
|
4533
4648
|
return 0;
|
|
4534
4649
|
} else if (setup.ready) {
|
|
4535
4650
|
const $scope52_id = _scope_id();
|
|
4536
|
-
_html(`<span${_attr_class("
|
|
4651
|
+
_html(`<span${_attr_class("_cf")}>Ready</span>. Tools, GitHub, and an agent are all in place.`);
|
|
4537
4652
|
writeScope($scope52_id, {});
|
|
4538
4653
|
return 1;
|
|
4539
4654
|
} else {
|
|
4540
4655
|
const $scope6_id = _scope_id();
|
|
4541
|
-
_html(`<span${_attr_class("
|
|
4656
|
+
_html(`<span${_attr_class("_cg")}>Not ready</span>. Missing <!>${_escape(setup.missing.map((m) => MISSING_LABEL[m] || m).join(", "))}${_el_resume($scope6_id, "b")}.`);
|
|
4542
4657
|
_subscribe($setup_missing__closures, writeScope($scope6_id, {}));
|
|
4543
4658
|
return 2;
|
|
4544
4659
|
}
|
|
@@ -4546,7 +4661,7 @@ var settings_page_default = _template("v", (input) => {
|
|
|
4546
4661
|
_subscribe($setup2__closures, writeScope($scope5_id, { _: _scope_with_id($scope0_id) }));
|
|
4547
4662
|
_resume_branch($scope5_id);
|
|
4548
4663
|
}, $scope0_id) }),
|
|
4549
|
-
actions: attrTag({ content: _content_resume("
|
|
4664
|
+
actions: attrTag({ content: _content_resume("v34", () => {
|
|
4550
4665
|
_scope_reason();
|
|
4551
4666
|
const $scope10_id = _scope_id();
|
|
4552
4667
|
_html(`<button${_attr_class(iconBtnRow)} title="Re-check this machine" aria-label="Re-check this machine"${_attr("disabled", refreshing)}>`);
|
|
@@ -4557,7 +4672,7 @@ var settings_page_default = _template("v", (input) => {
|
|
|
4557
4672
|
class: refreshing && "_E"
|
|
4558
4673
|
});
|
|
4559
4674
|
_html(`</button>${_el_resume($scope10_id, "a")}`);
|
|
4560
|
-
_script($scope10_id, "
|
|
4675
|
+
_script($scope10_id, "v32");
|
|
4561
4676
|
_subscribe($refreshing__closures, writeScope($scope10_id, {
|
|
4562
4677
|
_: _scope_with_id($scope0_id),
|
|
4563
4678
|
b: _existing_scope($childScope)
|
|
@@ -4572,8 +4687,8 @@ var settings_page_default = _template("v", (input) => {
|
|
|
4572
4687
|
placement: "inline",
|
|
4573
4688
|
onDismiss: _resume(function() {
|
|
4574
4689
|
error = null;
|
|
4575
|
-
}, "
|
|
4576
|
-
content: _content_resume("
|
|
4690
|
+
}, "v26", $scope8_id),
|
|
4691
|
+
content: _content_resume("v35", () => {
|
|
4577
4692
|
_scope_reason();
|
|
4578
4693
|
const $scope9_id = _scope_id();
|
|
4579
4694
|
_html(`${_escape(error)}${_el_resume($scope9_id, "a")}`);
|
|
@@ -4588,16 +4703,16 @@ var settings_page_default = _template("v", (input) => {
|
|
|
4588
4703
|
_if(() => {
|
|
4589
4704
|
if (selfUpdatePending || selfUpdating) {
|
|
4590
4705
|
const $scope37_id = _scope_id();
|
|
4591
|
-
_html(`<div${_attr_class("
|
|
4706
|
+
_html(`<div${_attr_class("_cK")} role=status><div${_attr_class("_cL")}>`);
|
|
4592
4707
|
_if(() => {
|
|
4593
4708
|
if (selfUpdating) {
|
|
4594
4709
|
const $scope53_id = _scope_id();
|
|
4595
|
-
_html(`<span${_attr_class("
|
|
4710
|
+
_html(`<span${_attr_class("_cM")}><span${_attr_class("_F")}></span> Updating work…</span><span${_attr_class("_cN")}>The app restarts and reloads when it is done.</span>`);
|
|
4596
4711
|
writeScope($scope53_id, {});
|
|
4597
4712
|
return 0;
|
|
4598
4713
|
} else {
|
|
4599
4714
|
const $scope38_id = _scope_id();
|
|
4600
|
-
_html(`<span${_attr_class("
|
|
4715
|
+
_html(`<span${_attr_class("_cM")}>Update available</span><span${_attr_class("_cN")}>v<!>${_escape(self.version)}${_el_resume($scope38_id, "c")} → v<!>${_escape(self.latest)}${_el_resume($scope38_id, "d")}</span>`);
|
|
4601
4716
|
_subscribe($self_version__closures, _subscribe($self_latest__closures, writeScope($scope38_id, {})));
|
|
4602
4717
|
return 1;
|
|
4603
4718
|
}
|
|
@@ -4606,8 +4721,8 @@ var settings_page_default = _template("v", (input) => {
|
|
|
4606
4721
|
if (!selfUpdating) {
|
|
4607
4722
|
const $scope39_id = _scope_id();
|
|
4608
4723
|
_html(`<button${_attr_class(["_o", "_p"])}${_attr("title", `Update work to v${self.latest} and restart`)}>Update and restart</button>${_el_resume($scope39_id, "a")}`);
|
|
4609
|
-
_script($scope39_id, "
|
|
4610
|
-
_subscribe($self_latest__closures, writeScope($scope39_id, {
|
|
4724
|
+
_script($scope39_id, "v36");
|
|
4725
|
+
_subscribe($self_latest__closures, writeScope($scope39_id, { Ceb: 1 }));
|
|
4611
4726
|
return 0;
|
|
4612
4727
|
}
|
|
4613
4728
|
}, $scope37_id, "c", 1, 1, 1, 0, 1);
|
|
@@ -4616,11 +4731,11 @@ var settings_page_default = _template("v", (input) => {
|
|
|
4616
4731
|
return 0;
|
|
4617
4732
|
}
|
|
4618
4733
|
}, $scope0_id, "f", 1, 1, 1, 0, 1);
|
|
4619
|
-
_html(`<section${_attr_class("
|
|
4734
|
+
_html(`<section${_attr_class("_bo")}${_attr("aria-labelledby", agentsId)}><div${_attr_class("_bp")}><h2${_attr("id", agentsId)}${_attr_class("_bD")}>Agents</h2><div${_attr_class("_y")}></div><label${_attr_class("_cj")}><span${_attr_class("_S")}>Default</span><span${_attr_class("_m")}>`);
|
|
4620
4735
|
_attr_select_value($scope0_id, "n", input.preferred, _resume(function(v) {
|
|
4621
4736
|
setPreferred(v);
|
|
4622
4737
|
}, "v1", $scope0_id), () => {
|
|
4623
|
-
_html(`<select${_attr_class(["_n", "
|
|
4738
|
+
_html(`<select${_attr_class(["_n", "_ck"])} aria-label="Default agent (starts when a workspace has no session yet)" title="Starts when a workspace has no session yet">`);
|
|
4624
4739
|
_for_of(input.agents.filter((a) => a !== "shell"), (id) => {
|
|
4625
4740
|
const $scope54_id = _scope_id();
|
|
4626
4741
|
_html(`<option${_attr_option_value(id)}>${_escape(agentLabel(id))}${_el_resume($scope54_id, "b", $sg__input_agents)}</option>${_el_resume($scope54_id, "a", $sg__input_agents)}`);
|
|
@@ -4641,14 +4756,14 @@ var settings_page_default = _template("v", (input) => {
|
|
|
4641
4756
|
const rows = lone ? [] : a.instances;
|
|
4642
4757
|
const loneAccounts = lone && lone.enabled ? accountsFor(lone.id) : [];
|
|
4643
4758
|
const extraAccounts = a.installed ? strayAccountsFor(a) : [];
|
|
4644
|
-
_html(`<li${_attr_class(["
|
|
4759
|
+
_html(`<li${_attr_class(["_bt", "_ci"])}><div${_attr_class(["_cl", { ["_co"]: lone && !lone.enabled }])}>`);
|
|
4645
4760
|
_set_serialize_reason(12);
|
|
4646
4761
|
const $childScope4 = _peek_scope_id();
|
|
4647
4762
|
icon_agent_default({
|
|
4648
4763
|
agent: a.id,
|
|
4649
4764
|
size: 18
|
|
4650
4765
|
});
|
|
4651
|
-
_html(`<div${_attr_class("
|
|
4766
|
+
_html(`<div${_attr_class("_bu")}><span${_attr_class("_bw")}><span${_attr_class("_bv")}>${_escape(a.label)}${_el_resume($scope1_id, "g")}</span>`);
|
|
4652
4767
|
_if(() => {
|
|
4653
4768
|
if (lone && input.preferred === lone.id) {
|
|
4654
4769
|
const $scope55_id = _scope_id();
|
|
@@ -4661,12 +4776,12 @@ var settings_page_default = _template("v", (input) => {
|
|
|
4661
4776
|
_if(() => {
|
|
4662
4777
|
if (active.has(a.id)) {
|
|
4663
4778
|
const $scope11_id = _scope_id();
|
|
4664
|
-
_html(`<span${_attr_class("
|
|
4779
|
+
_html(`<span${_attr_class("_ce")}><span${_attr_class("_F")}></span><!>${_escape(active.get(a.id) || "Starting…")}${_el_resume($scope11_id, "c")}</span>`);
|
|
4665
4780
|
_subscribe($active__closures, writeScope($scope11_id, {}));
|
|
4666
4781
|
return 0;
|
|
4667
4782
|
} else if (!a.installed) {
|
|
4668
4783
|
const $scope56_id = _scope_id();
|
|
4669
|
-
_html(`<span${_attr_class("
|
|
4784
|
+
_html(`<span${_attr_class("_bx")}>Not installed</span>`);
|
|
4670
4785
|
writeScope($scope56_id, {});
|
|
4671
4786
|
return 1;
|
|
4672
4787
|
}
|
|
@@ -4676,7 +4791,7 @@ var settings_page_default = _template("v", (input) => {
|
|
|
4676
4791
|
if (!a.installed && !active.has(a.id)) {
|
|
4677
4792
|
const $scope44_id = _scope_id();
|
|
4678
4793
|
_html(`<button${_attr_class(btnSm)}>Install</button>${_el_resume($scope44_id, "a")}`);
|
|
4679
|
-
_script($scope44_id, "
|
|
4794
|
+
_script($scope44_id, "v37");
|
|
4680
4795
|
writeScope($scope44_id, {});
|
|
4681
4796
|
return 0;
|
|
4682
4797
|
}
|
|
@@ -4689,7 +4804,7 @@ var settings_page_default = _template("v", (input) => {
|
|
|
4689
4804
|
"_K",
|
|
4690
4805
|
{ [tone.ok]: lone.enabled }
|
|
4691
4806
|
])} 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($scope48_id, "b")}</button>${_el_resume($scope48_id, "a")}`);
|
|
4692
|
-
_script($scope48_id, "
|
|
4807
|
+
_script($scope48_id, "v38");
|
|
4693
4808
|
writeScope($scope48_id, {});
|
|
4694
4809
|
return 0;
|
|
4695
4810
|
}
|
|
@@ -4698,18 +4813,18 @@ var settings_page_default = _template("v", (input) => {
|
|
|
4698
4813
|
_if(() => {
|
|
4699
4814
|
if (rows.length || loneAccounts.length || extraAccounts.length) {
|
|
4700
4815
|
const $scope2_id = _scope_id();
|
|
4701
|
-
_html(`<ul${_attr_class("
|
|
4816
|
+
_html(`<ul${_attr_class("_cq")}>`);
|
|
4702
4817
|
_for_of(rows, (inst) => {
|
|
4703
4818
|
const $scope3_id = _scope_id();
|
|
4704
4819
|
const accounts = inst.enabled ? accountsFor(inst.id) : [];
|
|
4705
|
-
_html(`<li${_attr_class("
|
|
4820
|
+
_html(`<li${_attr_class("_cm")}><div${_attr_class(["_cn", { ["_co"]: !inst.enabled }])}>`);
|
|
4706
4821
|
_set_serialize_reason(12);
|
|
4707
4822
|
const $childScope5 = _peek_scope_id();
|
|
4708
4823
|
icon_agent_default({
|
|
4709
4824
|
agent: inst.id,
|
|
4710
4825
|
size: 15
|
|
4711
4826
|
});
|
|
4712
|
-
_html(`<span${_attr_class(["
|
|
4827
|
+
_html(`<span${_attr_class(["_cp", "_x"])}>${_escape(inst.command)}${_el_resume($scope3_id, "e")}</span>`);
|
|
4713
4828
|
_if(() => {
|
|
4714
4829
|
if (input.preferred === inst.id) {
|
|
4715
4830
|
const $scope57_id = _scope_id();
|
|
@@ -4734,7 +4849,7 @@ var settings_page_default = _template("v", (input) => {
|
|
|
4734
4849
|
writeScope($scope58_id, { a: _existing_scope($childScope6) });
|
|
4735
4850
|
}, (u) => `${u.agent}-${u.account || ""}`, $scope3_id, "j", 1, 1, 1, 0, 1);
|
|
4736
4851
|
_html("</li>");
|
|
4737
|
-
_script($scope3_id, "
|
|
4852
|
+
_script($scope3_id, "v39");
|
|
4738
4853
|
_subscribe($accountsFor2__closures, _subscribe($si__input_preferred && $input_preferred__closures, writeScope($scope3_id, {
|
|
4739
4854
|
m: inst?.enabled,
|
|
4740
4855
|
n: inst?.id,
|
|
@@ -4784,7 +4899,7 @@ var settings_page_default = _template("v", (input) => {
|
|
|
4784
4899
|
}, "id", $scope0_id, "r", 1, 1, 1, 0, 1);
|
|
4785
4900
|
_for_of(otherUsage, (u) => {
|
|
4786
4901
|
const $scope61_id = _scope_id();
|
|
4787
|
-
_html(`<li${_attr_class(["
|
|
4902
|
+
_html(`<li${_attr_class(["_bt", "_ci"])}>`);
|
|
4788
4903
|
_set_serialize_reason(6);
|
|
4789
4904
|
const $childScope9 = _peek_scope_id();
|
|
4790
4905
|
usage_meters_default({ agent: u });
|
|
@@ -4795,17 +4910,17 @@ var settings_page_default = _template("v", (input) => {
|
|
|
4795
4910
|
_if(() => {
|
|
4796
4911
|
if (!usage && families.length) {
|
|
4797
4912
|
const $scope62_id = _scope_id();
|
|
4798
|
-
_html(`<p${_attr_class("
|
|
4913
|
+
_html(`<p${_attr_class("_bz")}><span${_attr_class("_F")}></span> Loading usage…</p>`);
|
|
4799
4914
|
writeScope($scope62_id, {});
|
|
4800
4915
|
return 0;
|
|
4801
4916
|
} else if (usage?.error) {
|
|
4802
4917
|
const $scope7_id = _scope_id();
|
|
4803
|
-
_html(`<p${_attr_class("
|
|
4918
|
+
_html(`<p${_attr_class("_bz")}>${_escape(usage.error)}${_el_resume($scope7_id, "b")}</p>`);
|
|
4804
4919
|
writeScope($scope7_id, {});
|
|
4805
4920
|
return 1;
|
|
4806
4921
|
}
|
|
4807
4922
|
}, $scope0_id, "t", 1, 1, 1, 0, 1);
|
|
4808
|
-
_html(`</section><section${_attr_class("
|
|
4923
|
+
_html(`</section><section${_attr_class("_bo")}${_attr("aria-labelledby", githubId)}><div${_attr_class("_bp")}><h2${_attr("id", githubId)}${_attr_class("_bD")}>GitHub</h2></div><ul${_attr_class("_br")}>`);
|
|
4809
4924
|
_for_of(setup?.github || [], (h) => {
|
|
4810
4925
|
const $scope12_id = _scope_id();
|
|
4811
4926
|
const $for_content4__h_host__closures = /* @__PURE__ */ new Set();
|
|
@@ -4819,7 +4934,7 @@ var settings_page_default = _template("v", (input) => {
|
|
|
4819
4934
|
const skippedSso = (() => {
|
|
4820
4935
|
return (h.sso || []).filter((s) => ignoredSso.has(s.org));
|
|
4821
4936
|
})();
|
|
4822
|
-
_html(`<li${_attr_class(["
|
|
4937
|
+
_html(`<li${_attr_class(["_bt", "_cA"])}><div${_attr_class("_cB")}><div${_attr_class("_bu")}><span${_attr_class("_bw")}><span${_attr_class(["_bv", "_x"])}>${_escape(h.host)}${_el_resume($scope12_id, "f")}</span>`);
|
|
4823
4938
|
_if(() => {
|
|
4824
4939
|
if (h.isEnterprise) {
|
|
4825
4940
|
const $scope65_id = _scope_id();
|
|
@@ -4832,22 +4947,22 @@ var settings_page_default = _template("v", (input) => {
|
|
|
4832
4947
|
_if(() => {
|
|
4833
4948
|
if (active.has(h.host) && authCodes.has(h.host)) {
|
|
4834
4949
|
const $scope24_id = _scope_id();
|
|
4835
|
-
_html(`<span${_attr_class("
|
|
4836
|
-
_subscribe($authCodes__closures, writeScope($scope24_id, {
|
|
4950
|
+
_html(`<span${_attr_class("_ce")}><span${_attr_class("_F")}></span> Enter code <strong${_attr_class("_cy")}>${_escape(authCodes.get(h.host))}${_el_resume($scope24_id, "d")}</strong> at <a${_attr("href", `https://${h.host}/login/device`)} target=_blank rel=noopener${_attr_class("_cz")}>${_escape(h.host)}${_el_resume($scope24_id, "f")}/login/device</a>${_el_resume($scope24_id, "e")}</span>`);
|
|
4951
|
+
_subscribe($authCodes__closures, writeScope($scope24_id, { Ce1: 1 }));
|
|
4837
4952
|
return 0;
|
|
4838
4953
|
} else if (active.has(h.host)) {
|
|
4839
4954
|
const $scope13_id = _scope_id();
|
|
4840
|
-
_html(`<span${_attr_class("
|
|
4841
|
-
_subscribe($active__closures, writeScope($scope13_id, {
|
|
4955
|
+
_html(`<span${_attr_class("_ce")}><span${_attr_class("_F")}></span><!>${_escape(active.get(h.host) || "Starting…")}${_el_resume($scope13_id, "c")}</span>`);
|
|
4956
|
+
_subscribe($active__closures, writeScope($scope13_id, { Cdz: 1 }));
|
|
4842
4957
|
return 1;
|
|
4843
4958
|
} else if (h.authed) {
|
|
4844
4959
|
const $scope63_id = _scope_id();
|
|
4845
|
-
_html(`<span${_attr_class("
|
|
4960
|
+
_html(`<span${_attr_class("_bx")}>Signed in<!>${h.user ? ` as ${_escape(`${_to_text(h.user)}`)}` : ""}${_el_resume($scope63_id, "b")}</span>`);
|
|
4846
4961
|
writeScope($scope63_id, {});
|
|
4847
4962
|
return 2;
|
|
4848
4963
|
} else {
|
|
4849
4964
|
const $scope64_id = _scope_id();
|
|
4850
|
-
_html(`<span${_attr_class("
|
|
4965
|
+
_html(`<span${_attr_class("_bx")}>${_escape(h.error || "Not signed in")}${_el_resume($scope64_id, "b")}</span>`);
|
|
4851
4966
|
writeScope($scope64_id, {});
|
|
4852
4967
|
return 3;
|
|
4853
4968
|
}
|
|
@@ -4860,7 +4975,7 @@ var settings_page_default = _template("v", (input) => {
|
|
|
4860
4975
|
if (!h.authed) {
|
|
4861
4976
|
const $scope45_id = _scope_id();
|
|
4862
4977
|
_html(`<button${_attr_class(btnSm)}>Sign in</button>${_el_resume($scope45_id, "a")}`);
|
|
4863
|
-
_script($scope45_id, "
|
|
4978
|
+
_script($scope45_id, "v40");
|
|
4864
4979
|
writeScope($scope45_id, {});
|
|
4865
4980
|
return 0;
|
|
4866
4981
|
} else {
|
|
@@ -4869,7 +4984,7 @@ var settings_page_default = _template("v", (input) => {
|
|
|
4869
4984
|
["_r"]: confirmingRemove === `out:${h.host}`,
|
|
4870
4985
|
["_q"]: confirmingRemove === `out:${h.host}`
|
|
4871
4986
|
}])}${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($scope26_id, "b")}</button>${_el_resume($scope26_id, "a")}`);
|
|
4872
|
-
_script($scope26_id, "
|
|
4987
|
+
_script($scope26_id, "v41");
|
|
4873
4988
|
_subscribe($for_content4__h_host__closures, _subscribe($confirmingRemove__closures, writeScope($scope26_id, {})));
|
|
4874
4989
|
return 1;
|
|
4875
4990
|
}
|
|
@@ -4878,7 +4993,7 @@ var settings_page_default = _template("v", (input) => {
|
|
|
4878
4993
|
if (h.isEnterprise) {
|
|
4879
4994
|
const $scope27_id = _scope_id();
|
|
4880
4995
|
_html(`<button${_attr_class([
|
|
4881
|
-
"
|
|
4996
|
+
"_by",
|
|
4882
4997
|
"_2",
|
|
4883
4998
|
"_3",
|
|
4884
4999
|
{ ["_q"]: confirmingRemove === h.host }
|
|
@@ -4896,9 +5011,9 @@ var settings_page_default = _template("v", (input) => {
|
|
|
4896
5011
|
return 1;
|
|
4897
5012
|
}
|
|
4898
5013
|
}, $scope27_id, "a", 1, 1, 1, "</button>");
|
|
4899
|
-
_script($scope27_id, "
|
|
5014
|
+
_script($scope27_id, "v42");
|
|
4900
5015
|
_subscribe($for_content4__h_host__closures, _subscribe($confirmingRemove__closures, writeScope($scope27_id, {
|
|
4901
|
-
|
|
5016
|
+
Ce2: 1,
|
|
4902
5017
|
Ca2: 1
|
|
4903
5018
|
})));
|
|
4904
5019
|
return 0;
|
|
@@ -4921,17 +5036,17 @@ var settings_page_default = _template("v", (input) => {
|
|
|
4921
5036
|
authCode: authCodes.get(h.host),
|
|
4922
5037
|
onChange: _resume(function() {
|
|
4923
5038
|
ssoIgnoreTick++;
|
|
4924
|
-
}, "
|
|
5039
|
+
}, "v27", $scope14_id),
|
|
4925
5040
|
onAuthorize: _resume(function() {
|
|
4926
5041
|
run(h.host, "auth-refresh");
|
|
4927
|
-
}, "
|
|
5042
|
+
}, "v28", $scope14_id),
|
|
4928
5043
|
onDone: _resume(function() {
|
|
4929
5044
|
refresh();
|
|
4930
|
-
}, "
|
|
5045
|
+
}, "v29", $scope14_id)
|
|
4931
5046
|
});
|
|
4932
5047
|
_subscribe($run2__closures, _subscribe($si__input_setupChange && $refresh2__closures, _subscribe($authCodes__closures, _subscribe($active__closures, writeScope($scope14_id, {
|
|
4933
5048
|
a: _existing_scope($childScope10),
|
|
4934
|
-
|
|
5049
|
+
Cdz: 2
|
|
4935
5050
|
})))));
|
|
4936
5051
|
return 0;
|
|
4937
5052
|
}
|
|
@@ -4954,7 +5069,7 @@ var settings_page_default = _template("v", (input) => {
|
|
|
4954
5069
|
_if(() => {
|
|
4955
5070
|
if (setup && !setup.github.length) {
|
|
4956
5071
|
const $scope68_id = _scope_id();
|
|
4957
|
-
_html(`<p${_attr_class("
|
|
5072
|
+
_html(`<p${_attr_class("_bz")}>Install the GitHub CLI below to sign in.</p>`);
|
|
4958
5073
|
writeScope($scope68_id, {});
|
|
4959
5074
|
return 0;
|
|
4960
5075
|
}
|
|
@@ -4962,7 +5077,7 @@ var settings_page_default = _template("v", (input) => {
|
|
|
4962
5077
|
_if(() => {
|
|
4963
5078
|
if (setup) {
|
|
4964
5079
|
const $scope35_id = _scope_id();
|
|
4965
|
-
_html(`<form${_attr_class("
|
|
5080
|
+
_html(`<form${_attr_class("_cx")}><label${_attr_class("_W")}>`);
|
|
4966
5081
|
icon_plus_default({
|
|
4967
5082
|
size: 14,
|
|
4968
5083
|
class: "_X"
|
|
@@ -4970,12 +5085,12 @@ var settings_page_default = _template("v", (input) => {
|
|
|
4970
5085
|
_html(`<input${_attr_input_value($scope35_id, "d", hostInput, _resume((_new_hostInput) => {
|
|
4971
5086
|
hostInput = _new_hostInput;
|
|
4972
5087
|
}, "v2", $scope35_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($scope35_id, "d")}</label><button${_attr_class(btnSm)} type=submit${_attr("disabled", !hostInput.trim() || hostBusy)}>${hostBusy ? "Adding…" : "Add host"}${_el_resume($scope35_id, "f")}</button>${_el_resume($scope35_id, "e")}</form>${_el_resume($scope35_id, "a")}`);
|
|
4973
|
-
_script($scope35_id, "
|
|
5088
|
+
_script($scope35_id, "v43");
|
|
4974
5089
|
writeScope($scope35_id, {});
|
|
4975
5090
|
return 0;
|
|
4976
5091
|
}
|
|
4977
5092
|
}, $scope0_id, "z", 1, 1, 1, 0, 1);
|
|
4978
|
-
_html(`</section><section${_attr_class("
|
|
5093
|
+
_html(`</section><section${_attr_class("_bo")}${_attr("aria-labelledby", machineId)}><div${_attr_class("_bp")}><h2${_attr("id", machineId)}${_attr_class("_bD")}>Machine</h2>`);
|
|
4979
5094
|
_if(() => {
|
|
4980
5095
|
if (missingCount) {
|
|
4981
5096
|
const $scope49_id = _scope_id();
|
|
@@ -4997,7 +5112,7 @@ var settings_page_default = _template("v", (input) => {
|
|
|
4997
5112
|
if (outdatedIds.length > 1) {
|
|
4998
5113
|
const $scope15_id = _scope_id();
|
|
4999
5114
|
_html(`<button${_attr_class(btnSm)}${_attr("disabled", active.size > 0)}>Update all</button>${_el_resume($scope15_id, "a")}`);
|
|
5000
|
-
_script($scope15_id, "
|
|
5115
|
+
_script($scope15_id, "v44");
|
|
5001
5116
|
writeScope($scope15_id, {});
|
|
5002
5117
|
return 0;
|
|
5003
5118
|
}
|
|
@@ -5006,7 +5121,7 @@ var settings_page_default = _template("v", (input) => {
|
|
|
5006
5121
|
if (missingInstallable.length > 1) {
|
|
5007
5122
|
const $scope16_id = _scope_id();
|
|
5008
5123
|
_html(`<button${_attr_class(btnSm)}${_attr("disabled", active.size > 0)}>Install missing</button>${_el_resume($scope16_id, "a")}`);
|
|
5009
|
-
_script($scope16_id, "
|
|
5124
|
+
_script($scope16_id, "v45");
|
|
5010
5125
|
writeScope($scope16_id, {});
|
|
5011
5126
|
return 0;
|
|
5012
5127
|
}
|
|
@@ -5015,8 +5130,8 @@ var settings_page_default = _template("v", (input) => {
|
|
|
5015
5130
|
_if(() => {
|
|
5016
5131
|
if (setup && !setup.mise.installed) {
|
|
5017
5132
|
const $scope17_id = _scope_id();
|
|
5018
|
-
_html(`<p${_attr_class("
|
|
5019
|
-
_script($scope17_id, "
|
|
5133
|
+
_html(`<p${_attr_class("_bz")}>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($scope17_id, "c")}</button>${_el_resume($scope17_id, "b")}</p>`);
|
|
5134
|
+
_script($scope17_id, "v46");
|
|
5020
5135
|
writeScope($scope17_id, {});
|
|
5021
5136
|
return 0;
|
|
5022
5137
|
}
|
|
@@ -5025,11 +5140,11 @@ var settings_page_default = _template("v", (input) => {
|
|
|
5025
5140
|
_if(() => {
|
|
5026
5141
|
if (self) {
|
|
5027
5142
|
const $scope40_id = _scope_id();
|
|
5028
|
-
_html(`<li${_attr_class(row)}><span${_attr_class(["
|
|
5143
|
+
_html(`<li${_attr_class(row)}><span${_attr_class(["_ct", "_x"])}>work</span>`);
|
|
5029
5144
|
_if(() => {
|
|
5030
5145
|
if (selfUpdating) {
|
|
5031
5146
|
const $scope69_id = _scope_id();
|
|
5032
|
-
_html(`<span${_attr_class("
|
|
5147
|
+
_html(`<span${_attr_class("_ce")}><span${_attr_class("_F")}></span>Updating — the app restarts and reloads when it is done…</span>`);
|
|
5033
5148
|
writeScope($scope69_id, {});
|
|
5034
5149
|
return 0;
|
|
5035
5150
|
} else {
|
|
@@ -5043,11 +5158,11 @@ var settings_page_default = _template("v", (input) => {
|
|
|
5043
5158
|
return 0;
|
|
5044
5159
|
} else if (self.latest && self.latest !== self.version) {
|
|
5045
5160
|
const $scope42_id = _scope_id();
|
|
5046
|
-
_html(`<button${_attr_class([btnSm, "
|
|
5161
|
+
_html(`<button${_attr_class([btnSm, "_cv"])}${_attr("title", `Update work to v${self.latest} and restart`)}>`);
|
|
5047
5162
|
icon_arrow_up_default({ size: 12 });
|
|
5048
5163
|
_html(` <!>${_escape(self.latest)}${_el_resume($scope42_id, "c")}</button>${_el_resume($scope42_id, "a")}`);
|
|
5049
|
-
_script($scope42_id, "
|
|
5050
|
-
_subscribe($self_latest__closures, writeScope($scope42_id, {
|
|
5164
|
+
_script($scope42_id, "v47");
|
|
5165
|
+
_subscribe($self_latest__closures, writeScope($scope42_id, { Ceb: 3 }));
|
|
5051
5166
|
return 1;
|
|
5052
5167
|
} else if (self.latest) {
|
|
5053
5168
|
const $scope71_id = _scope_id();
|
|
@@ -5057,8 +5172,8 @@ var settings_page_default = _template("v", (input) => {
|
|
|
5057
5172
|
}
|
|
5058
5173
|
}, $scope41_id, "c", 1, 1, 1, 0, 1);
|
|
5059
5174
|
_subscribe($self_version__closures, _subscribe($self_latest__closures, _subscribe($self_install__closures, writeScope($scope41_id, {
|
|
5060
|
-
|
|
5061
|
-
|
|
5175
|
+
Ceb: 2,
|
|
5176
|
+
Cec: 1
|
|
5062
5177
|
}))));
|
|
5063
5178
|
return 1;
|
|
5064
5179
|
}
|
|
@@ -5084,20 +5199,20 @@ var settings_page_default = _template("v", (input) => {
|
|
|
5084
5199
|
const $for_content5__t_path__closures = /* @__PURE__ */ new Set();
|
|
5085
5200
|
const $for_content5__t_latest__closures = /* @__PURE__ */ new Set();
|
|
5086
5201
|
const $for_content5__t_id__closures = /* @__PURE__ */ new Set();
|
|
5087
|
-
_html(`<li${_attr_class([row, { ["
|
|
5202
|
+
_html(`<li${_attr_class([row, { ["_cs"]: !t.installed }])}><span${_attr_class(["_ct", "_x"])}>${_escape(t.label)}${_el_resume($scope18_id, "c")}</span>`);
|
|
5088
5203
|
_if(() => {
|
|
5089
5204
|
if (active.has(t.id)) {
|
|
5090
5205
|
const $scope19_id = _scope_id();
|
|
5091
|
-
_html(`<span${_attr_class("
|
|
5092
|
-
_subscribe($active__closures, writeScope($scope19_id, {
|
|
5206
|
+
_html(`<span${_attr_class("_ce")}><span${_attr_class("_F")}></span><!>${_escape(active.get(t.id) || "Starting…")}${_el_resume($scope19_id, "c")}</span>`);
|
|
5207
|
+
_subscribe($active__closures, writeScope($scope19_id, { Cdz: 3 }));
|
|
5093
5208
|
return 0;
|
|
5094
5209
|
} else if (t.installed) {
|
|
5095
5210
|
const $scope31_id = _scope_id();
|
|
5096
5211
|
_if(() => {
|
|
5097
5212
|
if (t.version) {
|
|
5098
5213
|
const $scope32_id = _scope_id();
|
|
5099
|
-
_html(`<button${_attr_class(["
|
|
5100
|
-
_script($scope32_id, "
|
|
5214
|
+
_html(`<button${_attr_class(["_cu", "_x"])}${_attr("title", `${t.path || t.label}. Pin a version`)}>v<!>${_escape(t.version)}${_el_resume($scope32_id, "b")}</button>${_el_resume($scope32_id, "a")}`);
|
|
5215
|
+
_script($scope32_id, "v48");
|
|
5101
5216
|
_subscribe($for_content5__t_path__closures, _subscribe($for_content5__t_version__closures, _subscribe($for_content5__t_label__closures, writeScope($scope32_id, { Cu: 1 }))));
|
|
5102
5217
|
return 0;
|
|
5103
5218
|
} else {
|
|
@@ -5110,10 +5225,10 @@ var settings_page_default = _template("v", (input) => {
|
|
|
5110
5225
|
_if(() => {
|
|
5111
5226
|
if (outdated(t)) {
|
|
5112
5227
|
const $scope46_id = _scope_id();
|
|
5113
|
-
_html(`<button${_attr_class([btnSm, "
|
|
5228
|
+
_html(`<button${_attr_class([btnSm, "_cv"])}${_attr("title", `Update to v${t.latest}`)}>`);
|
|
5114
5229
|
icon_arrow_up_default({ size: 12 });
|
|
5115
5230
|
_html(` <!>${_escape(t.latest)}${_el_resume($scope46_id, "c")}</button>${_el_resume($scope46_id, "a")}`);
|
|
5116
|
-
_script($scope46_id, "
|
|
5231
|
+
_script($scope46_id, "v49");
|
|
5117
5232
|
_subscribe($for_content5__t_latest__closures, writeScope($scope46_id, {}));
|
|
5118
5233
|
return 0;
|
|
5119
5234
|
}
|
|
@@ -5148,7 +5263,7 @@ var settings_page_default = _template("v", (input) => {
|
|
|
5148
5263
|
if (!t.installed && t.installable) {
|
|
5149
5264
|
const $scope47_id = _scope_id();
|
|
5150
5265
|
_html(`<button${_attr_class(btnSm)}>Install</button>${_el_resume($scope47_id, "a")}`);
|
|
5151
|
-
_script($scope47_id, "
|
|
5266
|
+
_script($scope47_id, "v50");
|
|
5152
5267
|
writeScope($scope47_id, {});
|
|
5153
5268
|
return 0;
|
|
5154
5269
|
} else if (t.installed && t.version && !t.required) {
|
|
@@ -5172,8 +5287,8 @@ var settings_page_default = _template("v", (input) => {
|
|
|
5172
5287
|
return 1;
|
|
5173
5288
|
}
|
|
5174
5289
|
}, $scope29_id, "a", 1, 1, 1, "</button>");
|
|
5175
|
-
_script($scope29_id, "
|
|
5176
|
-
_subscribe($for_content5__t_id__closures, _subscribe($for_content5__t_label__closures, _subscribe($confirmingRemove__closures, writeScope($scope29_id, {
|
|
5290
|
+
_script($scope29_id, "v51");
|
|
5291
|
+
_subscribe($for_content5__t_id__closures, _subscribe($for_content5__t_label__closures, _subscribe($confirmingRemove__closures, writeScope($scope29_id, { Ce2: 2 }))));
|
|
5177
5292
|
return 1;
|
|
5178
5293
|
}
|
|
5179
5294
|
}, $scope28_id, "b", 1, 1, 1, 0, 1);
|
|
@@ -5212,19 +5327,19 @@ var settings_page_default = _template("v", (input) => {
|
|
|
5212
5327
|
_if(() => {
|
|
5213
5328
|
if (hits && hits.length) {
|
|
5214
5329
|
const $scope21_id = _scope_id();
|
|
5215
|
-
_html(`<ul${_attr_class([toolGrid, "
|
|
5330
|
+
_html(`<ul${_attr_class([toolGrid, "_cw"])}>`);
|
|
5216
5331
|
_for_of(hits, (h) => {
|
|
5217
5332
|
const $scope22_id = _scope_id();
|
|
5218
|
-
_html(`<li${_attr_class(row)}><div${_attr_class("
|
|
5333
|
+
_html(`<li${_attr_class(row)}><div${_attr_class("_bu")}><span${_attr_class(["_ct", "_x"])}>${_escape(h.name)}${_el_resume($scope22_id, "d")}</span>`);
|
|
5219
5334
|
_if(() => {
|
|
5220
5335
|
if (active.has(h.name)) {
|
|
5221
5336
|
const $scope23_id = _scope_id();
|
|
5222
|
-
_html(`<span${_attr_class("
|
|
5223
|
-
_subscribe($active__closures, writeScope($scope23_id, {
|
|
5337
|
+
_html(`<span${_attr_class("_ce")}><span${_attr_class("_F")}></span><!>${_escape(active.get(h.name) || "Starting…")}${_el_resume($scope23_id, "c")}</span>`);
|
|
5338
|
+
_subscribe($active__closures, writeScope($scope23_id, { Cdz: 5 }));
|
|
5224
5339
|
return 0;
|
|
5225
5340
|
} else if (h.description) {
|
|
5226
5341
|
const $scope79_id = _scope_id();
|
|
5227
|
-
_html(`<span${_attr_class("
|
|
5342
|
+
_html(`<span${_attr_class("_bx")}${_attr("title", h.description)}>${_escape(h.description)}${_el_resume($scope79_id, "b")}</span>${_el_resume($scope79_id, "a")}`);
|
|
5228
5343
|
writeScope($scope79_id, {});
|
|
5229
5344
|
return 1;
|
|
5230
5345
|
}
|
|
@@ -5242,7 +5357,7 @@ var settings_page_default = _template("v", (input) => {
|
|
|
5242
5357
|
} else {
|
|
5243
5358
|
const $scope34_id = _scope_id();
|
|
5244
5359
|
_html(`<button${_attr_class(btnSm)}>Install</button>${_el_resume($scope34_id, "a")}<button${_attr_class(btnSm)} title="Install a specific version">@…</button>${_el_resume($scope34_id, "b")}`);
|
|
5245
|
-
_script($scope34_id, "
|
|
5360
|
+
_script($scope34_id, "v52");
|
|
5246
5361
|
writeScope($scope34_id, {});
|
|
5247
5362
|
return 1;
|
|
5248
5363
|
}
|
|
@@ -5256,28 +5371,25 @@ var settings_page_default = _template("v", (input) => {
|
|
|
5256
5371
|
i: h?.name,
|
|
5257
5372
|
k: h?.description,
|
|
5258
5373
|
m: h?.installed,
|
|
5259
|
-
|
|
5374
|
+
Cdz: 4
|
|
5260
5375
|
}));
|
|
5261
5376
|
}, "name", $scope21_id, "a", 1, 1, 1, "</ul>", 1);
|
|
5262
5377
|
_subscribe($hits__closures, writeScope($scope21_id, {}));
|
|
5263
5378
|
return 0;
|
|
5264
5379
|
} else if (hits && !searching) {
|
|
5265
5380
|
const $scope36_id = _scope_id();
|
|
5266
|
-
_html(`<p${_attr_class("
|
|
5381
|
+
_html(`<p${_attr_class("_bz")}>No tools match "<!>${_escape(query)}${_el_resume($scope36_id, "b")}".</p>`);
|
|
5267
5382
|
_subscribe($query__closures, writeScope($scope36_id, {}));
|
|
5268
5383
|
return 1;
|
|
5269
5384
|
}
|
|
5270
5385
|
}, $scope20_id, "d", 1, 1, 1, 0, 1);
|
|
5271
5386
|
_html("</div>");
|
|
5272
|
-
_script($scope20_id, "
|
|
5387
|
+
_script($scope20_id, "v53");
|
|
5273
5388
|
writeScope($scope20_id, {});
|
|
5274
5389
|
return 0;
|
|
5275
5390
|
}
|
|
5276
5391
|
}, $scope0_id, "ac", 1, 1, 1, 0, 1);
|
|
5277
|
-
|
|
5278
|
-
setInstance({ name: v });
|
|
5279
|
-
}, "v3", $scope0_id))}${_attr_class(["_U", "_cC"])} 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", "_cD"])}>Tab title, home-screen icon, and notifications.</span></label><div${_attr_class("_cA")} role=radiogroup aria-label="Color theme"><span${_attr_class("_cB")}>Theme</span><span${_attr_class("_cE")}>`);
|
|
5280
|
-
_for_of([
|
|
5392
|
+
const themeOpts = [
|
|
5281
5393
|
{
|
|
5282
5394
|
id: "system",
|
|
5283
5395
|
label: "System"
|
|
@@ -5290,37 +5402,52 @@ var settings_page_default = _template("v", (input) => {
|
|
|
5290
5402
|
id: "dark",
|
|
5291
5403
|
label: "Dark"
|
|
5292
5404
|
}
|
|
5293
|
-
]
|
|
5405
|
+
];
|
|
5406
|
+
_html(`</section><section${_attr_class("_bo")}${_attr("aria-labelledby", appearanceId)}><div${_attr_class("_bp")}><h2${_attr("id", appearanceId)}${_attr_class("_bD")}>Appearance</h2></div><div${_attr_class(["_bt", "_cC"])}><label${_attr_class("_cD")}><span${_attr_class("_cE")}>Name</span><input${_attr_input_value($scope0_id, "aj", input.instance.name, _resume(function(v) {
|
|
5407
|
+
setInstance({ name: v });
|
|
5408
|
+
}, "v3", $scope0_id))}${_attr_class(["_U", "_cF"])} type=text placeholder="Tab title" maxlength=32 autocomplete=off spellcheck=false>${_el_resume($scope0_id, "aj")}</label><div${_attr_class("_cD")}><span${_attr_class("_cE")}>Theme</span><span${_attr_class("_cH")}><span${_attr_class(themeSeg)} role=radiogroup aria-label="Color theme">`);
|
|
5409
|
+
_for_of(themeOpts, (opt) => {
|
|
5294
5410
|
const $scope43_id = _scope_id();
|
|
5295
|
-
_html(`<button type=button${_attr_class(["
|
|
5296
|
-
_script($scope43_id, "
|
|
5411
|
+
_html(`<button type=button${_attr_class(["_8", { ["_7"]: themeMode === opt.id }])} role=radio aria-checked=${themeMode === opt.id ? "true" : "false"}>${_escape(opt.label)}</button>${_el_resume($scope43_id, "a")}`);
|
|
5412
|
+
_script($scope43_id, "v54");
|
|
5297
5413
|
writeScope($scope43_id, {
|
|
5298
5414
|
e: opt?.id,
|
|
5299
5415
|
_: _scope_with_id($scope0_id)
|
|
5300
5416
|
});
|
|
5301
5417
|
}, "id", $scope0_id, "an", 1, 0, 1, 0, 1);
|
|
5302
|
-
_html(`</span><span${_attr_class(["
|
|
5303
|
-
|
|
5304
|
-
|
|
5305
|
-
|
|
5306
|
-
|
|
5418
|
+
_html(`</span><span${_attr_class(["_m", "_cI"])}>`);
|
|
5419
|
+
_attr_select_value($scope0_id, "ap", themeMode, _resume(function(v) {
|
|
5420
|
+
setThemeMode(v);
|
|
5421
|
+
}, "v4", $scope0_id), () => {
|
|
5422
|
+
_html(`<select${_attr_class(["_n", "_cJ"])} aria-label="Color theme">`);
|
|
5423
|
+
forOf(themeOpts, (opt) => {
|
|
5424
|
+
_scope_id();
|
|
5425
|
+
_html(`<option${_attr_option_value(opt.id)}>${_escape(opt.label)}</option>`);
|
|
5426
|
+
});
|
|
5427
|
+
_html("</select>");
|
|
5428
|
+
});
|
|
5429
|
+
_html(`${_el_resume($scope0_id, "ap")}</span></span></div><div${_attr_class("_cD")}><span${_attr_class("_cE")}>Accent</span><span${_attr_class(swatches)} role=radiogroup aria-label="Accent colour"><button type=button${_attr_class([
|
|
5430
|
+
"_cP",
|
|
5431
|
+
"_cR",
|
|
5432
|
+
{ ["_cQ"]: !input.instance.accent }
|
|
5433
|
+
])} role=radio aria-checked=${!input.instance.accent ? "true" : "false"} title="Default (blue)" aria-label="Default (blue)"></button>${_el_resume($scope0_id, "at")}`);
|
|
5307
5434
|
_for_of(ACCENT_PRESETS, (p) => {
|
|
5308
5435
|
const $scope4_id = _scope_id();
|
|
5309
|
-
_html(`<button type=button${_attr_class(["
|
|
5310
|
-
_script($scope4_id, "
|
|
5436
|
+
_html(`<button type=button${_attr_class(["_cP", { ["_cQ"]: 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")}`);
|
|
5437
|
+
_script($scope4_id, "v55");
|
|
5311
5438
|
writeScope($scope4_id, {
|
|
5312
5439
|
d: p?.value,
|
|
5313
5440
|
_: _scope_with_id($scope0_id)
|
|
5314
5441
|
});
|
|
5315
|
-
}, "value", $scope0_id, "
|
|
5442
|
+
}, "value", $scope0_id, "au", $sg__input_instance_accent, 0, 1, 0, 1);
|
|
5316
5443
|
const customOn = !!input.instance.accent && !ACCENT_PRESETS.some((p) => p.value === input.instance.accent);
|
|
5317
5444
|
_html(`<label${_attr_class([
|
|
5318
|
-
"_cM",
|
|
5319
5445
|
"_cP",
|
|
5320
|
-
|
|
5321
|
-
|
|
5446
|
+
"_cS",
|
|
5447
|
+
{ ["_cQ"]: customOn }
|
|
5448
|
+
])}${customOn ? _attr_style(`--swatch:${input.instance.accent}`) : ""} title="Custom colour"><input${_attr_input_value($scope0_id, "aw", input.instance.accent || "#3556d8", _resume(function(v) {
|
|
5322
5449
|
setInstance({ accent: v });
|
|
5323
|
-
}, "
|
|
5450
|
+
}, "v5", $scope0_id))}${_attr_class("_cT")} type=color aria-label="Custom accent colour">${_el_resume($scope0_id, "aw")}<span aria-hidden=true>+</span></label>${_el_resume($scope0_id, "av", $sg__input_instance_accent)}</span></div></div></section></div></div></div>`);
|
|
5324
5451
|
_if(() => {
|
|
5325
5452
|
if (versionPick) {
|
|
5326
5453
|
const $scope30_id = _scope_id();
|
|
@@ -5334,19 +5461,19 @@ var settings_page_default = _template("v", (input) => {
|
|
|
5334
5461
|
open: versionPick != null,
|
|
5335
5462
|
openChange: _resume(function(o) {
|
|
5336
5463
|
if (!o) versionPick = null;
|
|
5337
|
-
}, "
|
|
5464
|
+
}, "v30", $scope30_id),
|
|
5338
5465
|
onSubmit: _resume(function(v) {
|
|
5339
5466
|
const pick = versionPick;
|
|
5340
5467
|
versionPick = null;
|
|
5341
5468
|
run(pick.id, "install", v);
|
|
5342
|
-
}, "
|
|
5469
|
+
}, "v31", $scope30_id)
|
|
5343
5470
|
});
|
|
5344
5471
|
writeScope($scope30_id, { a: _existing_scope($childScope11) });
|
|
5345
5472
|
return 0;
|
|
5346
5473
|
}
|
|
5347
5474
|
}, $scope0_id, "ax", 1, 1, 1, 0, 1);
|
|
5348
|
-
_script($scope0_id, "v55");
|
|
5349
5475
|
_script($scope0_id, "v56");
|
|
5476
|
+
_script($scope0_id, "v57");
|
|
5350
5477
|
writeScope($scope0_id, {
|
|
5351
5478
|
b1: input.setupChange,
|
|
5352
5479
|
b2: input.agentsChange,
|
|
@@ -5384,62 +5511,62 @@ var settings_page_default = _template("v", (input) => {
|
|
|
5384
5511
|
c6: searching,
|
|
5385
5512
|
c8: searchTimer.id,
|
|
5386
5513
|
ca: setThemeMode,
|
|
5387
|
-
|
|
5388
|
-
|
|
5389
|
-
|
|
5390
|
-
|
|
5391
|
-
|
|
5392
|
-
|
|
5393
|
-
|
|
5394
|
-
|
|
5395
|
-
|
|
5396
|
-
|
|
5397
|
-
|
|
5398
|
-
|
|
5399
|
-
|
|
5400
|
-
|
|
5401
|
-
|
|
5402
|
-
|
|
5403
|
-
|
|
5404
|
-
|
|
5405
|
-
|
|
5406
|
-
|
|
5407
|
-
|
|
5408
|
-
|
|
5409
|
-
|
|
5410
|
-
|
|
5411
|
-
|
|
5412
|
-
|
|
5413
|
-
|
|
5414
|
-
|
|
5415
|
-
|
|
5416
|
-
|
|
5514
|
+
ce: applySetup,
|
|
5515
|
+
cg: syncAgents,
|
|
5516
|
+
ch: loadSetup,
|
|
5517
|
+
ci: loadSelf,
|
|
5518
|
+
ck: updateSelf,
|
|
5519
|
+
cl: loadUsage,
|
|
5520
|
+
cn: refresh,
|
|
5521
|
+
co: refreshUsage,
|
|
5522
|
+
cp: setActive,
|
|
5523
|
+
cr: run,
|
|
5524
|
+
cs: changeHost,
|
|
5525
|
+
ct: runEach,
|
|
5526
|
+
cu: setPreferred,
|
|
5527
|
+
cx: saveTimer.id,
|
|
5528
|
+
cz: setInstance,
|
|
5529
|
+
d2: setEnabled,
|
|
5530
|
+
d3: search,
|
|
5531
|
+
d4: outdated,
|
|
5532
|
+
d7: missingInstallable,
|
|
5533
|
+
d9: missingCount,
|
|
5534
|
+
da: outdatedIds,
|
|
5535
|
+
db: outdatedIds?.length,
|
|
5536
|
+
dc: families,
|
|
5537
|
+
de: families.length,
|
|
5538
|
+
dg: instanceIds,
|
|
5539
|
+
di: accountsFor,
|
|
5540
|
+
dj: strayAccountsFor,
|
|
5541
|
+
dv: $setup_missing__closures,
|
|
5542
|
+
du: $setup2__closures,
|
|
5543
|
+
dy: $refreshing__closures,
|
|
5417
5544
|
d: _serialize_if($scope0_reason, 1) && _existing_scope($childScope2),
|
|
5418
|
-
|
|
5419
|
-
|
|
5420
|
-
|
|
5545
|
+
dx: $error__closures,
|
|
5546
|
+
eb: $self_latest__closures,
|
|
5547
|
+
ec: $self_version__closures,
|
|
5421
5548
|
p: _existing_scope($childScope3),
|
|
5422
|
-
|
|
5423
|
-
|
|
5424
|
-
|
|
5425
|
-
|
|
5426
|
-
|
|
5427
|
-
|
|
5428
|
-
|
|
5429
|
-
|
|
5430
|
-
|
|
5431
|
-
|
|
5549
|
+
dz: $active__closures,
|
|
5550
|
+
ds: $si__input_preferred && $input_preferred__closures,
|
|
5551
|
+
em: $accountsFor2__closures,
|
|
5552
|
+
e1: $authCodes__closures,
|
|
5553
|
+
e2: $confirmingRemove__closures,
|
|
5554
|
+
eg: $si__input_setupChange && $refresh2__closures,
|
|
5555
|
+
eh: $run2__closures,
|
|
5556
|
+
ea: $self_install__closures,
|
|
5557
|
+
e9: $hits__closures,
|
|
5558
|
+
e8: $query__closures
|
|
5432
5559
|
});
|
|
5433
5560
|
_resume_branch($scope0_id);
|
|
5434
5561
|
});
|
|
5435
5562
|
//#endregion
|
|
5436
5563
|
//#region src/tags/new-workspace.css.ts
|
|
5437
|
-
var content$1 = "
|
|
5438
|
-
var section$1 = "
|
|
5439
|
-
var curBase = "
|
|
5440
|
-
var archived = "
|
|
5441
|
-
var archivedHint = "
|
|
5442
|
-
var archivedCard = "
|
|
5564
|
+
var content$1 = "_bN _bG";
|
|
5565
|
+
var section$1 = "_bR _bo";
|
|
5566
|
+
var curBase = "_bW _T _S";
|
|
5567
|
+
var archived = "_b1 _bo";
|
|
5568
|
+
var archivedHint = "_b2 _S";
|
|
5569
|
+
var archivedCard = "_b3 _bt";
|
|
5443
5570
|
//#endregion
|
|
5444
5571
|
//#region src/tags/icons/icon-check.marko
|
|
5445
5572
|
var icon_check_default = _template("P", (input) => {
|
|
@@ -5474,7 +5601,7 @@ var icon_branch_default = _template("O", (input) => {
|
|
|
5474
5601
|
});
|
|
5475
5602
|
_serialize_if($scope0_reason, 0) && writeScope($scope0_id, { a: _existing_scope($childScope) });
|
|
5476
5603
|
});
|
|
5477
|
-
var resultBranch = "
|
|
5604
|
+
var resultBranch = "_dq _Z _j";
|
|
5478
5605
|
//#endregion
|
|
5479
5606
|
//#region src/tags/branch-pick.marko
|
|
5480
5607
|
var branch_pick_default = _template("d", (input) => {
|
|
@@ -5485,11 +5612,11 @@ var branch_pick_default = _template("d", (input) => {
|
|
|
5485
5612
|
let branches = null;
|
|
5486
5613
|
let defaultBranch = null;
|
|
5487
5614
|
let branchFilter = "";
|
|
5488
|
-
_html(`<div${_attr_class("
|
|
5615
|
+
_html(`<div${_attr_class("_ds")}>`);
|
|
5489
5616
|
_if(() => {
|
|
5490
5617
|
{
|
|
5491
5618
|
const $scope4_id = _scope_id();
|
|
5492
|
-
_html(`<p${_attr_class("
|
|
5619
|
+
_html(`<p${_attr_class("_bz")}><span${_attr_class("_F")}></span> Loading branches…</p>`);
|
|
5493
5620
|
writeScope($scope4_id, {});
|
|
5494
5621
|
return 0;
|
|
5495
5622
|
}
|
|
@@ -5511,7 +5638,7 @@ var branch_pick_default = _template("d", (input) => {
|
|
|
5511
5638
|
});
|
|
5512
5639
|
//#endregion
|
|
5513
5640
|
//#region src/tags/repo-picker.marko
|
|
5514
|
-
var api$
|
|
5641
|
+
var api$4;
|
|
5515
5642
|
var prefs$1;
|
|
5516
5643
|
var repo_picker_default = _template("t", (input) => {
|
|
5517
5644
|
const $scope0_reason = _scope_reason(), $si__input_onError = _serialize_if($scope0_reason, 2);
|
|
@@ -5528,7 +5655,7 @@ var repo_picker_default = _template("t", (input) => {
|
|
|
5528
5655
|
const loadCatalog = _resume(async (refresh) => {
|
|
5529
5656
|
if (refresh);
|
|
5530
5657
|
try {
|
|
5531
|
-
catalog = await api$
|
|
5658
|
+
catalog = await api$4(`/api/repos${refresh ? "?refresh" : ""}`);
|
|
5532
5659
|
} catch (err) {
|
|
5533
5660
|
input.onError?.(String(err.message || err));
|
|
5534
5661
|
}
|
|
@@ -5565,11 +5692,11 @@ var repo_picker_default = _template("t", (input) => {
|
|
|
5565
5692
|
const ignored = new Set(prefs$1?.ignoredSsoOrgs?.() ?? []);
|
|
5566
5693
|
return (catalog?.sso || []).filter((s) => !ignored.has(s.org));
|
|
5567
5694
|
})();
|
|
5568
|
-
_html(`<div${_attr_class("
|
|
5695
|
+
_html(`<div${_attr_class("_dj")}>`);
|
|
5569
5696
|
_if(() => {
|
|
5570
5697
|
if (ssoPending.length) {
|
|
5571
5698
|
const $scope7_id = _scope_id();
|
|
5572
|
-
_html(`<div${_attr_class("
|
|
5699
|
+
_html(`<div${_attr_class("_dk")}>`);
|
|
5573
5700
|
_set_serialize_reason(154);
|
|
5574
5701
|
const $childScope = _peek_scope_id();
|
|
5575
5702
|
sso_auth_default({
|
|
@@ -5599,16 +5726,16 @@ var repo_picker_default = _template("t", (input) => {
|
|
|
5599
5726
|
_if(() => {
|
|
5600
5727
|
if (pasted) {
|
|
5601
5728
|
const $scope1_id = _scope_id();
|
|
5602
|
-
_html(`<ul${_attr_class("
|
|
5729
|
+
_html(`<ul${_attr_class("_dl")}><li><div${_attr_class(["_dn", "_dm"])}><button${_attr_class("_do")}${pasteWillFork ? _attr("title", `Fork ${pasted} to your account and add the fork`) : _attr("title", `Add ${pasted} as-is (pushes go to that repo)`)}>`);
|
|
5603
5730
|
icon_plus_default({
|
|
5604
5731
|
size: 12,
|
|
5605
|
-
class: "
|
|
5732
|
+
class: "_du"
|
|
5606
5733
|
});
|
|
5607
|
-
_html(`<span${_attr_class("
|
|
5734
|
+
_html(`<span${_attr_class("_dv")}>${_escape(repoLabel(pasted))}${_el_resume($scope1_id, "f")}</span></button>${_el_resume($scope1_id, "c")}`);
|
|
5608
5735
|
_if(() => {
|
|
5609
5736
|
if (pastedForkable) {
|
|
5610
5737
|
const $scope8_id = _scope_id();
|
|
5611
|
-
_html(`<button${_attr_class(["
|
|
5738
|
+
_html(`<button${_attr_class(["_dr", { ["_dp"]: 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"}>`);
|
|
5612
5739
|
_if(() => {
|
|
5613
5740
|
if (pasteWillFork) {
|
|
5614
5741
|
const $scope10_id = _scope_id();
|
|
@@ -5628,7 +5755,7 @@ var repo_picker_default = _template("t", (input) => {
|
|
|
5628
5755
|
return 0;
|
|
5629
5756
|
}
|
|
5630
5757
|
}, $scope1_id, "g", 1, 1, 1, 0, 1);
|
|
5631
|
-
_html(`<button${_attr_class([resultBranch, { ["
|
|
5758
|
+
_html(`<button${_attr_class([resultBranch, { ["_dp"]: branchesFor === pasted }])}${_attr("title", `Pick a base branch for ${pasted}`)}${_attr("aria-label", `Pick a base branch for ${pasted}`)}>`);
|
|
5632
5759
|
icon_branch_default({ size: 12 });
|
|
5633
5760
|
_html(`</button>${_el_resume($scope1_id, "h")}</div>`);
|
|
5634
5761
|
_if(() => {
|
|
@@ -5655,7 +5782,7 @@ var repo_picker_default = _template("t", (input) => {
|
|
|
5655
5782
|
return 0;
|
|
5656
5783
|
} else if (filter && !catalog) {
|
|
5657
5784
|
const $scope9_id = _scope_id();
|
|
5658
|
-
_html(`<p${_attr_class("
|
|
5785
|
+
_html(`<p${_attr_class("_bz")}>Loading repos…</p>`);
|
|
5659
5786
|
writeScope($scope9_id, {});
|
|
5660
5787
|
return 1;
|
|
5661
5788
|
}
|
|
@@ -5663,15 +5790,15 @@ var repo_picker_default = _template("t", (input) => {
|
|
|
5663
5790
|
_if(() => {
|
|
5664
5791
|
if (results.length) {
|
|
5665
5792
|
const $scope3_id = _scope_id();
|
|
5666
|
-
_html(`<ul${_attr_class("
|
|
5793
|
+
_html(`<ul${_attr_class("_dl")}>`);
|
|
5667
5794
|
_for_of(results, (repo, i) => {
|
|
5668
5795
|
const $scope4_id = _scope_id();
|
|
5669
|
-
_html(`<li><div${_attr_class(["
|
|
5796
|
+
_html(`<li><div${_attr_class(["_dn", { ["_dm"]: i === highlight }])}><button${_attr_class("_do")}>`);
|
|
5670
5797
|
icon_plus_default({
|
|
5671
5798
|
size: 12,
|
|
5672
|
-
class: "
|
|
5799
|
+
class: "_du"
|
|
5673
5800
|
});
|
|
5674
|
-
_html(`<span${_attr_class("
|
|
5801
|
+
_html(`<span${_attr_class("_dv")}>${_escape(repoLabel(repo.nameWithOwner))}${_el_resume($scope4_id, "e")}</span></button>${_el_resume($scope4_id, "b")}<button${_attr_class([resultBranch, { ["_dp"]: branchesFor === repo.nameWithOwner }])}${_attr("title", `Pick a base branch for ${repo.nameWithOwner}`)}${_attr("aria-label", `Pick a base branch for ${repo.nameWithOwner}`)}>`);
|
|
5675
5802
|
icon_branch_default({ size: 12 });
|
|
5676
5803
|
_html(`</button>${_el_resume($scope4_id, "f")}</div>${_el_resume($scope4_id, "a")}`);
|
|
5677
5804
|
_if(() => {
|
|
@@ -5706,7 +5833,7 @@ var repo_picker_default = _template("t", (input) => {
|
|
|
5706
5833
|
return 0;
|
|
5707
5834
|
} else if (filter && catalog && !pasted) {
|
|
5708
5835
|
const $scope6_id = _scope_id();
|
|
5709
|
-
_html(`<p${_attr_class("
|
|
5836
|
+
_html(`<p${_attr_class("_bz")}>No repos match "<!>${_escape(filter)}${_el_resume($scope6_id, "b")}". Paste a clone URL to add any repo.</p>`);
|
|
5710
5837
|
writeScope($scope6_id, {});
|
|
5711
5838
|
return 1;
|
|
5712
5839
|
}
|
|
@@ -5750,7 +5877,7 @@ var repo_picker_default = _template("t", (input) => {
|
|
|
5750
5877
|
});
|
|
5751
5878
|
//#endregion
|
|
5752
5879
|
//#region src/tags/new-workspace.marko
|
|
5753
|
-
var api$
|
|
5880
|
+
var api$3;
|
|
5754
5881
|
var watchProgress;
|
|
5755
5882
|
var new_workspace_default = _template("q", (input) => {
|
|
5756
5883
|
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);
|
|
@@ -5798,7 +5925,7 @@ var new_workspace_default = _template("q", (input) => {
|
|
|
5798
5925
|
error = null;
|
|
5799
5926
|
restoring = ws.id;
|
|
5800
5927
|
try {
|
|
5801
|
-
await api$
|
|
5928
|
+
await api$3(`/api/workspaces/${ws.id}`, {
|
|
5802
5929
|
method: "POST",
|
|
5803
5930
|
headers: { "content-type": "application/json" },
|
|
5804
5931
|
body: JSON.stringify({ action: "restore" })
|
|
@@ -5826,7 +5953,7 @@ var new_workspace_default = _template("q", (input) => {
|
|
|
5826
5953
|
});
|
|
5827
5954
|
await watcher.ready;
|
|
5828
5955
|
try {
|
|
5829
|
-
const ws = await api$
|
|
5956
|
+
const ws = await api$3("/api/workspaces", {
|
|
5830
5957
|
method: "POST",
|
|
5831
5958
|
headers: { "content-type": "application/json" },
|
|
5832
5959
|
body: JSON.stringify({
|
|
@@ -5847,7 +5974,7 @@ var new_workspace_default = _template("q", (input) => {
|
|
|
5847
5974
|
}
|
|
5848
5975
|
}, "q6", $scope0_id);
|
|
5849
5976
|
const titleId = _id();
|
|
5850
|
-
_html(`<div${_attr_class("
|
|
5977
|
+
_html(`<div${_attr_class("_bE")} role=region${_attr("aria-labelledby", titleId)}><div${_attr_class("_bF")}><div${_attr_class(content$1)}>`);
|
|
5851
5978
|
_set_serialize_reason({
|
|
5852
5979
|
0: _serialize_guard($scope0_reason, 2),
|
|
5853
5980
|
1: $sg__input_backHref__OR__input_onExit,
|
|
@@ -5886,23 +6013,23 @@ var new_workspace_default = _template("q", (input) => {
|
|
|
5886
6013
|
return 0;
|
|
5887
6014
|
}
|
|
5888
6015
|
}, $scope0_id, "e", 1, 1, 1, 0, 1);
|
|
5889
|
-
_html(`<label${_attr_class("
|
|
6016
|
+
_html(`<label${_attr_class("_bQ")}><span${_attr_class("_bD")}>Name</span><input${_attr_input_value($scope0_id, "h", name, _resume((_new_name) => {
|
|
5890
6017
|
name = _new_name;
|
|
5891
|
-
}, "q0", $scope0_id))}${_attr_class(inputLg)} placeholder=my-feature${_attr("disabled", busy)} autofocus>${_el_resume($scope0_id, "h")}</label><section${_attr_class(section$1)}><div${_attr_class("
|
|
6018
|
+
}, "q0", $scope0_id))}${_attr_class(inputLg)} placeholder=my-feature${_attr("disabled", busy)} autofocus>${_el_resume($scope0_id, "h")}</label><section${_attr_class(section$1)}><div${_attr_class("_bS")}><h2${_attr_class("_bD")}>Repos</h2><button${_attr_class(iconBtnRow)} title="Refresh repo list" aria-label="Refresh repo list"${_attr("disabled", catalogRefreshing)}>`);
|
|
5892
6019
|
_set_serialize_reason(1);
|
|
5893
6020
|
const $childScope2 = _peek_scope_id();
|
|
5894
6021
|
icon_refresh_default({
|
|
5895
6022
|
size: 14,
|
|
5896
6023
|
class: catalogRefreshing && "_E"
|
|
5897
6024
|
});
|
|
5898
|
-
_html(`</button>${_el_resume($scope0_id, "l")}</div><ul${_attr_class("
|
|
6025
|
+
_html(`</button>${_el_resume($scope0_id, "l")}</div><ul${_attr_class("_bT")}>`);
|
|
5899
6026
|
_for_of(selected, (repo) => {
|
|
5900
6027
|
const $scope2_id = _scope_id();
|
|
5901
|
-
_html(`<li><div${_attr_class(row)}><span${_attr_class("
|
|
6028
|
+
_html(`<li><div${_attr_class(row)}><span${_attr_class("_bU")}>${_escape(repoLabel(repo.fullName))}${_el_resume($scope2_id, "c")}</span>`);
|
|
5902
6029
|
_if(() => {
|
|
5903
6030
|
if (repo.fork !== void 0) {
|
|
5904
6031
|
const $scope3_id = _scope_id();
|
|
5905
|
-
_html(`<button${_attr_class(["
|
|
6032
|
+
_html(`<button${_attr_class(["_bX", { ["_bV"]: 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)}>`);
|
|
5906
6033
|
_if(() => {
|
|
5907
6034
|
if (repo.fork) {
|
|
5908
6035
|
const $scope12_id = _scope_id();
|
|
@@ -5925,7 +6052,7 @@ var new_workspace_default = _template("q", (input) => {
|
|
|
5925
6052
|
_html(`<button${_attr_class([
|
|
5926
6053
|
curBase,
|
|
5927
6054
|
"_x",
|
|
5928
|
-
{ ["
|
|
6055
|
+
{ ["_bV"]: branchesFor === repo.fullName }
|
|
5929
6056
|
])}${_attr("title", `Change base branch for ${repo.fullName}`)}${_attr("aria-label", `Change base branch for ${repo.fullName}`)}${_attr("disabled", busy)}>`);
|
|
5930
6057
|
icon_branch_default({ size: 12 });
|
|
5931
6058
|
_html(`<!>${repo.baseBranch ? ` ${_escape(`${_to_text(repo.baseBranch)}`)}` : ""}${_el_resume($scope2_id, "g")}</button>${_el_resume($scope2_id, "e")}<button${_attr_class([iconBtnXs, "_2"])}${_attr("title", `Remove ${repo.fullName}`)}${_attr("disabled", busy)}>`);
|
|
@@ -5961,7 +6088,7 @@ var new_workspace_default = _template("q", (input) => {
|
|
|
5961
6088
|
_if(() => {
|
|
5962
6089
|
if (!selected.length) {
|
|
5963
6090
|
const $scope14_id = _scope_id();
|
|
5964
|
-
_html(`<li${_attr_class("
|
|
6091
|
+
_html(`<li${_attr_class("_bz")}>No repos yet. Search below to add one, or create it empty.</li>`);
|
|
5965
6092
|
writeScope($scope14_id, {});
|
|
5966
6093
|
return 0;
|
|
5967
6094
|
}
|
|
@@ -5986,10 +6113,10 @@ var new_workspace_default = _template("q", (input) => {
|
|
|
5986
6113
|
_if(() => {
|
|
5987
6114
|
if (busy && steps$1.length) {
|
|
5988
6115
|
const $scope9_id = _scope_id();
|
|
5989
|
-
_html(`<ul${_attr_class("
|
|
6116
|
+
_html(`<ul${_attr_class("_bY")}>`);
|
|
5990
6117
|
_for_of(steps$1, (step$1, i) => {
|
|
5991
6118
|
const $scope10_id = _scope_id();
|
|
5992
|
-
_html(`<li${_attr_class(["
|
|
6119
|
+
_html(`<li${_attr_class(["_b4", { ["_bZ"]: i === steps$1.length - 1 }])}>`);
|
|
5993
6120
|
_if(() => {
|
|
5994
6121
|
if (i === steps$1.length - 1) {
|
|
5995
6122
|
const $scope15_id = _scope_id();
|
|
@@ -5998,7 +6125,7 @@ var new_workspace_default = _template("q", (input) => {
|
|
|
5998
6125
|
return 0;
|
|
5999
6126
|
} else {
|
|
6000
6127
|
const $scope16_id = _scope_id();
|
|
6001
|
-
_html(`<span${_attr_class("
|
|
6128
|
+
_html(`<span${_attr_class("_b0")}>`);
|
|
6002
6129
|
icon_check_default({ size: 14 });
|
|
6003
6130
|
_html("</span>");
|
|
6004
6131
|
writeScope($scope16_id, {});
|
|
@@ -6012,7 +6139,7 @@ var new_workspace_default = _template("q", (input) => {
|
|
|
6012
6139
|
return 0;
|
|
6013
6140
|
}
|
|
6014
6141
|
}, $scope0_id, "s", 1, 1, 1, 0, 1);
|
|
6015
|
-
_html(`<div${_attr_class("
|
|
6142
|
+
_html(`<div${_attr_class("_bO")}>`);
|
|
6016
6143
|
_if(() => {
|
|
6017
6144
|
if (input.onExit || busy) {
|
|
6018
6145
|
const $scope1_id = _scope_id();
|
|
@@ -6025,15 +6152,15 @@ var new_workspace_default = _template("q", (input) => {
|
|
|
6025
6152
|
_html(`<button type=button${_attr_class([
|
|
6026
6153
|
btnLg,
|
|
6027
6154
|
"_p",
|
|
6028
|
-
"
|
|
6155
|
+
"_bP"
|
|
6029
6156
|
])}${_attr("disabled", busy || !!restoring || !name.trim())}>${busy ? "Creating…" : "Create workspace"}${_el_resume($scope0_id, "w")}</button>${_el_resume($scope0_id, "v")}</div>`);
|
|
6030
6157
|
_if(() => {
|
|
6031
6158
|
if (archived$1.length) {
|
|
6032
6159
|
const $scope4_id = _scope_id();
|
|
6033
|
-
_html(`<section${_attr_class(archived)}><div${_attr_class("
|
|
6160
|
+
_html(`<section${_attr_class(archived)}><div${_attr_class("_bS")}><h2${_attr_class("_bD")}>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("_br")}>`);
|
|
6034
6161
|
_for_of(archived$1, (ws) => {
|
|
6035
6162
|
const $scope5_id = _scope_id();
|
|
6036
|
-
_html(`<li${_attr_class(archivedCard)}><div${_attr_class("
|
|
6163
|
+
_html(`<li${_attr_class(archivedCard)}><div${_attr_class("_bu")}><span${_attr_class("_bv")}>${_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)}>`);
|
|
6037
6164
|
_if(() => {
|
|
6038
6165
|
if (restoring === ws.id) {
|
|
6039
6166
|
const $scope17_id = _scope_id();
|
|
@@ -6096,36 +6223,6 @@ var new_workspace_default = _template("q", (input) => {
|
|
|
6096
6223
|
_resume_branch($scope0_id);
|
|
6097
6224
|
});
|
|
6098
6225
|
//#endregion
|
|
6099
|
-
//#region src/client/api.ts
|
|
6100
|
-
/** Fetch JSON from an API route. Error bodies are always `{ error: string }`;
|
|
6101
|
-
* when one comes back (or the response isn't ok / isn't JSON) this throws,
|
|
6102
|
-
* so callers handle failure in one place. Pass `{ signal: $signal }` where
|
|
6103
|
-
* a component-scoped fetch should abort on destroy.
|
|
6104
|
-
*
|
|
6105
|
-
* Behind an auth proxy, an expired session turns into login HTML (or 401).
|
|
6106
|
-
* Reload once — same fix users already apply by hand, hosting-agnostic. */
|
|
6107
|
-
async function api$3(url, init) {
|
|
6108
|
-
const res = await fetch(url, init);
|
|
6109
|
-
if (isAuthDeathResponse(res)) {
|
|
6110
|
-
reloadOnceForAuth();
|
|
6111
|
-
throw new Error("session expired");
|
|
6112
|
-
}
|
|
6113
|
-
let data;
|
|
6114
|
-
try {
|
|
6115
|
-
data = await res.json();
|
|
6116
|
-
} catch {
|
|
6117
|
-
if (isAuthDeathResponse(res)) {
|
|
6118
|
-
reloadOnceForAuth();
|
|
6119
|
-
throw new Error("session expired");
|
|
6120
|
-
}
|
|
6121
|
-
throw new Error(res.ok ? "invalid response" : `HTTP ${res.status}`);
|
|
6122
|
-
}
|
|
6123
|
-
if (data && typeof data === "object" && data.error) throw new Error(data.error);
|
|
6124
|
-
if (!res.ok) throw new Error(`HTTP ${res.status}`);
|
|
6125
|
-
clearAuthReloadGuard();
|
|
6126
|
-
return data;
|
|
6127
|
-
}
|
|
6128
|
-
//#endregion
|
|
6129
6226
|
//#region src/client/push.ts
|
|
6130
6227
|
/** Web Push subscription for "agent waiting" alerts. iOS requires the app
|
|
6131
6228
|
* to be installed to the home screen and the request to happen in a user
|
|
@@ -6142,13 +6239,13 @@ async function enablePush() {
|
|
|
6142
6239
|
const reg = await registration();
|
|
6143
6240
|
let sub = await reg.pushManager.getSubscription();
|
|
6144
6241
|
if (!sub) {
|
|
6145
|
-
const { publicKey } = await api$
|
|
6242
|
+
const { publicKey } = await api$7("/api/push");
|
|
6146
6243
|
sub = await reg.pushManager.subscribe({
|
|
6147
6244
|
userVisibleOnly: true,
|
|
6148
6245
|
applicationServerKey: vapidKey(publicKey)
|
|
6149
6246
|
});
|
|
6150
6247
|
}
|
|
6151
|
-
await api$
|
|
6248
|
+
await api$7("/api/push", {
|
|
6152
6249
|
method: "POST",
|
|
6153
6250
|
headers: { "content-type": "application/json" },
|
|
6154
6251
|
body: JSON.stringify(sub.toJSON())
|
|
@@ -6158,7 +6255,7 @@ async function enablePush() {
|
|
|
6158
6255
|
async function disablePush() {
|
|
6159
6256
|
const sub = await pushSubscription();
|
|
6160
6257
|
if (!sub) return;
|
|
6161
|
-
await api$
|
|
6258
|
+
await api$7(`/api/push?endpoint=${encodeURIComponent(sub.endpoint)}`, { method: "DELETE" }).catch(() => {});
|
|
6162
6259
|
await sub.unsubscribe();
|
|
6163
6260
|
}
|
|
6164
6261
|
async function registration() {
|
|
@@ -6190,8 +6287,8 @@ function activeAgent(session) {
|
|
|
6190
6287
|
const command = session.state?.command?.trim();
|
|
6191
6288
|
return command && agentFromCommand(command) || session.agent;
|
|
6192
6289
|
}
|
|
6193
|
-
var iconBtn$1 = "
|
|
6194
|
-
var navToggle = "
|
|
6290
|
+
var iconBtn$1 = "_dX _j";
|
|
6291
|
+
var navToggle = "_d2 _j";
|
|
6195
6292
|
_template("N", (input) => {
|
|
6196
6293
|
const $scope0_reason = _scope_reason(), $sg__input_size__OR__input_class = _serialize_guard($scope0_reason, 0);
|
|
6197
6294
|
const $scope0_id = _scope_id();
|
|
@@ -6234,23 +6331,12 @@ var ARM_MS = 3500;
|
|
|
6234
6331
|
function disarmLater(fn) {
|
|
6235
6332
|
return setTimeout(fn, ARM_MS);
|
|
6236
6333
|
}
|
|
6237
|
-
var railBtn = "
|
|
6238
|
-
var rowIcon = "
|
|
6239
|
-
var close = "
|
|
6334
|
+
var railBtn = "_gp _j";
|
|
6335
|
+
var rowIcon = "_gy _Z _j";
|
|
6336
|
+
var close = "_gz _Z _j _2";
|
|
6240
6337
|
//#endregion
|
|
6241
6338
|
//#region src/styles/session-pop.css.ts
|
|
6242
|
-
var sessionPop = "
|
|
6243
|
-
//#endregion
|
|
6244
|
-
//#region src/client/usage.ts
|
|
6245
|
-
/** The plan row an agent instance draws on: its own account (`claude2`)
|
|
6246
|
-
* when the provider reports per account, else the family's (`codex`). */
|
|
6247
|
-
function usageFor(agentId, usage) {
|
|
6248
|
-
const rows = usage?.agents || [];
|
|
6249
|
-
const exact = rows.find((r) => r.agent === agentId);
|
|
6250
|
-
if (exact) return exact;
|
|
6251
|
-
const family = agentFamily(agentId);
|
|
6252
|
-
return rows.find((r) => r.agent === family) ?? null;
|
|
6253
|
-
}
|
|
6339
|
+
var sessionPop = "_gl _4";
|
|
6254
6340
|
//#endregion
|
|
6255
6341
|
//#region src/tags/icons/icon-diff.marko
|
|
6256
6342
|
var icon_diff_default = _template("V", (input) => {
|
|
@@ -6300,22 +6386,22 @@ var usage_pcts_default = _template("E", (input) => {
|
|
|
6300
6386
|
if (windows.length) {
|
|
6301
6387
|
const $scope1_id = _scope_id();
|
|
6302
6388
|
_html(`<span${_attr_class([
|
|
6303
|
-
"
|
|
6389
|
+
"_fm",
|
|
6304
6390
|
input.class,
|
|
6305
|
-
{ ["
|
|
6391
|
+
{ ["_fn"]: agent.stale_seconds != null }
|
|
6306
6392
|
])}${agent.stale_seconds != null ? _attr("title", `${agent.note || "provider unreachable"}; last cached numbers`) : " title=\"Plan usage\""}>`);
|
|
6307
6393
|
_for_of(windows, (win$1, i) => {
|
|
6308
6394
|
const $scope2_id = _scope_id();
|
|
6309
|
-
_html(`<span${_attr_class("
|
|
6395
|
+
_html(`<span${_attr_class("_fo")}>`);
|
|
6310
6396
|
_if(() => {
|
|
6311
6397
|
if (i) {
|
|
6312
6398
|
const $scope3_id = _scope_id();
|
|
6313
|
-
_html(`<span${_attr_class("
|
|
6399
|
+
_html(`<span${_attr_class("_fr")} aria-hidden=true>·</span>`);
|
|
6314
6400
|
$si__input_agent && writeScope($scope3_id, {});
|
|
6315
6401
|
return 0;
|
|
6316
6402
|
}
|
|
6317
6403
|
}, $scope2_id, "b", $sg__input_agent, $sg__input_agent, $sg__input_agent, 0, 1);
|
|
6318
|
-
_html(`<span${_attr_class("
|
|
6404
|
+
_html(`<span${_attr_class("_fp")}>${_escape(win$1.window)}${_el_resume($scope2_id, "d", $sg__input_agent)}</span><span${_attr_class(["_fq", win$1.used_percent >= 90 ? "_df" : win$1.used_percent >= 70 ? "_de" : win$1.used_percent >= 40 ? "_dd" : "_dc"])}>${_escape(pctText(win$1.used_percent))}${_el_resume($scope2_id, "f", $sg__input_agent)}</span>${_el_resume($scope2_id, "e", $sg__input_agent)}</span>`);
|
|
6319
6405
|
$si__input_agent && writeScope($scope2_id, {});
|
|
6320
6406
|
}, "window", $scope1_id, "a", $sg__input_agent, $sg__input_agent__OR__input_class, $sg__input_agent, "</span>", 1);
|
|
6321
6407
|
$si__input_agent__OR__input_class && writeScope($scope1_id, { _: _scope_with_id($scope0_id) });
|
|
@@ -6346,12 +6432,12 @@ var icon_edit_default = _template("X", (input) => {
|
|
|
6346
6432
|
});
|
|
6347
6433
|
_serialize_if($scope0_reason, 0) && writeScope($scope0_id, { a: _existing_scope($childScope) });
|
|
6348
6434
|
});
|
|
6349
|
-
var prChip = "
|
|
6350
|
-
var portChip = "
|
|
6435
|
+
var prChip = "_hr _s _hq";
|
|
6436
|
+
var portChip = "_hs _s _hq";
|
|
6351
6437
|
var prState = {
|
|
6352
|
-
open: "
|
|
6353
|
-
merged: "
|
|
6354
|
-
closed: "
|
|
6438
|
+
open: "_hw",
|
|
6439
|
+
merged: "_hx",
|
|
6440
|
+
closed: "_hy"
|
|
6355
6441
|
};
|
|
6356
6442
|
//#endregion
|
|
6357
6443
|
//#region src/tags/side-nav-chips.marko
|
|
@@ -6423,7 +6509,7 @@ var side_nav_chips_default = _template("w", (input) => {
|
|
|
6423
6509
|
const name = repo.full_name.split("/").at(-1);
|
|
6424
6510
|
return repos.some((r) => r.full_name !== repo.full_name && r.full_name.split("/").at(-1) === name) ? repoLabel(repo.full_name) : name;
|
|
6425
6511
|
}, "w4", $scope1_id);
|
|
6426
|
-
_html(`<div${_attr_class("
|
|
6512
|
+
_html(`<div${_attr_class("_hp")}>`);
|
|
6427
6513
|
_for_of(repos, (repo) => {
|
|
6428
6514
|
const $scope2_id = _scope_id();
|
|
6429
6515
|
const $for_content__repo_worktree__closures = /* @__PURE__ */ new Set();
|
|
@@ -6439,11 +6525,11 @@ var side_nav_chips_default = _template("w", (input) => {
|
|
|
6439
6525
|
[prState.merged]: pr.state === "MERGED",
|
|
6440
6526
|
[prState.closed]: pr.state === "CLOSED"
|
|
6441
6527
|
}
|
|
6442
|
-
])}${_attr("title", prTitle(repo, pr))}><a${_attr_class(["
|
|
6528
|
+
])}${_attr("title", prTitle(repo, pr))}><a${_attr_class(["_ht", { ["_hA"]: !open }])}${_attr("href", pr.url)} target=_blank rel=noopener>${_escape(repoLabel$1(repo))}${_el_resume($scope3_id, "c")}#<!>${_escape(pr.number)}${_el_resume($scope3_id, "d")}</a>${_el_resume($scope3_id, "b")}`);
|
|
6443
6529
|
_if(() => {
|
|
6444
6530
|
if (open) {
|
|
6445
6531
|
const $scope4_id = _scope_id();
|
|
6446
|
-
_html(`<a${_attr_class(["
|
|
6532
|
+
_html(`<a${_attr_class(["_ht", "_hu"])}${_attr("href", `/w/${input.workspaceId}/review?pr=${encodeURIComponent(`${repo.worktree}/${pr.number}`)}`)}${_attr("title", `Review #${pr.number} changes`)}>`);
|
|
6447
6533
|
icon_diff_default({ size: 12 });
|
|
6448
6534
|
_html(`</a>${_el_resume($scope4_id, "a")}`);
|
|
6449
6535
|
_subscribe($for_content__repo_worktree__closures, _subscribe($si__input_workspaceId && $input_workspaceId__closures, writeScope($scope4_id, {})));
|
|
@@ -6451,9 +6537,9 @@ var side_nav_chips_default = _template("w", (input) => {
|
|
|
6451
6537
|
} else {
|
|
6452
6538
|
const $scope6_id = _scope_id();
|
|
6453
6539
|
_html(`<button type=button${_attr_class([
|
|
6454
|
-
"_hs",
|
|
6455
6540
|
"_ht",
|
|
6456
|
-
"_hu"
|
|
6541
|
+
"_hu",
|
|
6542
|
+
"_hv"
|
|
6457
6543
|
])}${_attr("title", `Dismiss #${pr.number}`)}>`);
|
|
6458
6544
|
icon_xmark_default({ size: 12 });
|
|
6459
6545
|
_html(`</button>${_el_resume($scope6_id, "a")}`);
|
|
@@ -6474,10 +6560,10 @@ var side_nav_chips_default = _template("w", (input) => {
|
|
|
6474
6560
|
}, "full_name", $scope1_id, "b");
|
|
6475
6561
|
_for_of(ports, (p) => {
|
|
6476
6562
|
const $scope5_id = _scope_id();
|
|
6477
|
-
_html(`<span${_attr_class(["_s", portChip])}${_attr("title", p.cmd)}><button type=button${_attr_class(["
|
|
6478
|
-
"_hs",
|
|
6563
|
+
_html(`<span${_attr_class(["_s", portChip])}${_attr("title", p.cmd)}><button type=button${_attr_class(["_ht", "_hz"])}${_attr("title", `Open http://${typeof location === "undefined" ? "localhost" : location.hostname}:${p.port}`)}>:<!>${_escape(p.port)}${_el_resume($scope5_id, "c")}</button>${_el_resume($scope5_id, "b")}<button type=button${_attr_class([
|
|
6479
6564
|
"_ht",
|
|
6480
6565
|
"_hu",
|
|
6566
|
+
"_hv",
|
|
6481
6567
|
{ ["_q"]: armedPid === p.pid }
|
|
6482
6568
|
])}${armedPid === p.pid ? " title=Kill?" : _attr("title", `Kill ${p.cmd} (pid ${p.pid})`)}>`);
|
|
6483
6569
|
icon_xmark_default({ size: 12 });
|
|
@@ -6556,7 +6642,7 @@ var side_nav_item_default = _template("x", (input) => {
|
|
|
6556
6642
|
renamingId = null;
|
|
6557
6643
|
input.onRenameSession?.(s, renameValue.trim());
|
|
6558
6644
|
}, "x2", $scope0_id);
|
|
6559
|
-
let usage =
|
|
6645
|
+
let usage = lastUsage$1();
|
|
6560
6646
|
const openSess = (() => {
|
|
6561
6647
|
if (!input.current || input.page || input.rail) return null;
|
|
6562
6648
|
const list = input.sessions || [];
|
|
@@ -6573,10 +6659,10 @@ var side_nav_item_default = _template("x", (input) => {
|
|
|
6573
6659
|
_if(() => {
|
|
6574
6660
|
if (input.rail) {
|
|
6575
6661
|
const $scope2_id = _scope_id();
|
|
6576
|
-
_html(`<a${_attr("href", `/w/${ws$1.id}`)}${_attr_class([railBtn, { ["
|
|
6662
|
+
_html(`<a${_attr("href", `/w/${ws$1.id}`)}${_attr_class([railBtn, { ["_gn"]: 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([
|
|
6577
6663
|
"_z",
|
|
6578
6664
|
phase[dot],
|
|
6579
|
-
"
|
|
6665
|
+
"_gq"
|
|
6580
6666
|
])}></span>${_el_resume($scope2_id, "c", $sg__input_workspaceId__OR__input_status)}</a>${_el_resume($scope2_id, "a", _serialize_guard($scope0_reason, 3))}`);
|
|
6581
6667
|
_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) })))));
|
|
6582
6668
|
return 0;
|
|
@@ -6584,15 +6670,15 @@ var side_nav_item_default = _template("x", (input) => {
|
|
|
6584
6670
|
const $scope3_id = _scope_id();
|
|
6585
6671
|
const sessions$1 = input.sessions || [];
|
|
6586
6672
|
const phaseLabel = dot === "working" ? "Working" : dot === "waiting" ? "Needs input" : dot === "idle" ? "Idle" : "Not running";
|
|
6587
|
-
_html(`<section${_attr_class(["
|
|
6588
|
-
["
|
|
6673
|
+
_html(`<section${_attr_class(["_gs", {
|
|
6674
|
+
["_gn"]: input.current,
|
|
6589
6675
|
["_5"]: input.current,
|
|
6590
|
-
["
|
|
6591
|
-
["
|
|
6592
|
-
}])}><div${_attr_class("
|
|
6676
|
+
["_gt"]: input.railPop,
|
|
6677
|
+
["_gr"]: input.page
|
|
6678
|
+
}])}><div${_attr_class("_gu")}><a${_attr("href", `/w/${ws$1.id}`)}${_attr_class("_gv")}><span${_attr_class([
|
|
6593
6679
|
"_z",
|
|
6594
6680
|
phase[dot],
|
|
6595
|
-
"
|
|
6681
|
+
"_gI"
|
|
6596
6682
|
])}${_attr("title", phaseLabel)}></span>${_el_resume($scope3_id, "d", $sg__input_workspaceId__OR__input_status)}`);
|
|
6597
6683
|
_if(() => {
|
|
6598
6684
|
if (sessions$1.length === 1) {
|
|
@@ -6605,7 +6691,7 @@ var side_nav_item_default = _template("x", (input) => {
|
|
|
6605
6691
|
icon_agent_default({
|
|
6606
6692
|
agent: activeAgent(sessions$1[0]),
|
|
6607
6693
|
size: 12,
|
|
6608
|
-
class: "
|
|
6694
|
+
class: "_gA"
|
|
6609
6695
|
});
|
|
6610
6696
|
$si__input_sessions && writeScope($scope14_id, {
|
|
6611
6697
|
_: _scope_with_id($scope3_id),
|
|
@@ -6615,16 +6701,16 @@ var side_nav_item_default = _template("x", (input) => {
|
|
|
6615
6701
|
}
|
|
6616
6702
|
}, $scope3_id, "e", $sg__input_sessions, $sg__input_sessions);
|
|
6617
6703
|
const metaText = sessions$1.length === 0 ? phaseLabel : sessions$1.length === 1 ? sessions$1[0].title || "" : `${sessions$1.length} sessions`;
|
|
6618
|
-
_html(`<span${_attr_class("
|
|
6704
|
+
_html(`<span${_attr_class("_gB")}><span${_attr_class("_gC")}>${_escape(ws$1.name)}${_el_resume($scope3_id, "h", $sg__input_workspaces__OR__input_workspaceId)}</span>`);
|
|
6619
6705
|
_if(() => {
|
|
6620
6706
|
if (input.page && metaText) {
|
|
6621
6707
|
const $scope16_id = _scope_id();
|
|
6622
|
-
_html(`<span${_attr_class("
|
|
6708
|
+
_html(`<span${_attr_class("_gG")}>${_escape(metaText)}${_el_resume($scope16_id, "b", _serialize_guard($scope0_reason, 7))}</span>`);
|
|
6623
6709
|
$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) });
|
|
6624
6710
|
return 0;
|
|
6625
6711
|
} else if (sessions$1.length === 1 && sessions$1[0].title) {
|
|
6626
6712
|
const $scope15_id = _scope_id();
|
|
6627
|
-
_html(`<span${_attr_class("
|
|
6713
|
+
_html(`<span${_attr_class("_gD")}>${_escape(sessions$1[0].title)}${_el_resume($scope15_id, "b", $sg__input_sessions)}</span>`);
|
|
6628
6714
|
$si__input_page__OR__input_sessions__OR__input_workspaceId__OR__input_status && writeScope($scope15_id, { _: $si__input_sessions && _scope_with_id($scope3_id) });
|
|
6629
6715
|
return 1;
|
|
6630
6716
|
}
|
|
@@ -6637,7 +6723,7 @@ var side_nav_item_default = _template("x", (input) => {
|
|
|
6637
6723
|
"_I",
|
|
6638
6724
|
"_R",
|
|
6639
6725
|
"_K",
|
|
6640
|
-
"
|
|
6726
|
+
"_gH"
|
|
6641
6727
|
])}>${input.current ? "Open" : ""}${_el_resume($scope4_id, "b", _serialize_guard($scope0_reason, 21))}</span>`);
|
|
6642
6728
|
$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, {
|
|
6643
6729
|
_: _scope_with_id($scope3_id),
|
|
@@ -6650,7 +6736,7 @@ var side_nav_item_default = _template("x", (input) => {
|
|
|
6650
6736
|
_if(() => {
|
|
6651
6737
|
if (!input.page) {
|
|
6652
6738
|
const $scope5_id = _scope_id();
|
|
6653
|
-
_html(`<div${_attr_class("
|
|
6739
|
+
_html(`<div${_attr_class("_gw")}>`);
|
|
6654
6740
|
_if(() => {
|
|
6655
6741
|
if (input.onNewSession) {
|
|
6656
6742
|
const $scope6_id = _scope_id();
|
|
@@ -6664,7 +6750,7 @@ var side_nav_item_default = _template("x", (input) => {
|
|
|
6664
6750
|
_html(`</button>${_el_resume($scope6_id, "a")}<div${_attr("id", newPopId)} popover=auto${_attr_class(sessionPop)}>`);
|
|
6665
6751
|
_for_of([], (agent) => {
|
|
6666
6752
|
const $scope7_id = _scope_id();
|
|
6667
|
-
_html(`<button${_attr_class("
|
|
6753
|
+
_html(`<button${_attr_class("_gm")}>`);
|
|
6668
6754
|
_set_serialize_reason(12);
|
|
6669
6755
|
const $childScope2 = _peek_scope_id();
|
|
6670
6756
|
icon_agent_default({
|
|
@@ -6699,7 +6785,7 @@ var side_nav_item_default = _template("x", (input) => {
|
|
|
6699
6785
|
return 0;
|
|
6700
6786
|
}
|
|
6701
6787
|
}, $scope5_id, "c", $sg__input_onReview, $sg__input_onReview, $sg__input_onNewSession__OR__input_onReview, 0, 1);
|
|
6702
|
-
_html(`<a${input.managing ? _attr("href", `/w/${ws$1.id}`) : _attr("href", `/w/${ws$1.id}/manage`)}${_attr_class([rowIcon, { ["
|
|
6788
|
+
_html(`<a${input.managing ? _attr("href", `/w/${ws$1.id}`) : _attr("href", `/w/${ws$1.id}/manage`)}${_attr_class([rowIcon, { ["_go"]: input.managing }])} title=${input.managing ? "\"Back to terminal\"" : "\"Manage workspace\""}${input.managing ? " aria-current=page" : ""}>`);
|
|
6703
6789
|
icon_manage_default({ size: 12 });
|
|
6704
6790
|
_html(`</a>${_el_resume($scope5_id, "d", _serialize_guard($scope0_reason, 8))}</div>`);
|
|
6705
6791
|
_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, {
|
|
@@ -6709,7 +6795,7 @@ var side_nav_item_default = _template("x", (input) => {
|
|
|
6709
6795
|
return 0;
|
|
6710
6796
|
}
|
|
6711
6797
|
}, $scope3_id, "k", $sg__input_page, $sg__input_page, 1, 0, 1);
|
|
6712
|
-
_html(`</div><div${_attr_class("
|
|
6798
|
+
_html(`</div><div${_attr_class("_gN")}>`);
|
|
6713
6799
|
_if(() => {
|
|
6714
6800
|
if (sessions$1.length === 1 && openPlan) {
|
|
6715
6801
|
const $scope11_id = _scope_id();
|
|
@@ -6717,7 +6803,7 @@ var side_nav_item_default = _template("x", (input) => {
|
|
|
6717
6803
|
const $childScope3 = _peek_scope_id();
|
|
6718
6804
|
usage_pcts_default({
|
|
6719
6805
|
agent: openPlan,
|
|
6720
|
-
class: "
|
|
6806
|
+
class: "_gE"
|
|
6721
6807
|
});
|
|
6722
6808
|
_subscribe($openPlan__closures, writeScope($scope11_id, {
|
|
6723
6809
|
a: _existing_scope($childScope3),
|
|
@@ -6728,14 +6814,14 @@ var side_nav_item_default = _template("x", (input) => {
|
|
|
6728
6814
|
}, $scope3_id, "m");
|
|
6729
6815
|
_for_of(sessions$1.length > 1 ? sessions$1 : [], (s) => {
|
|
6730
6816
|
const $scope8_id = _scope_id();
|
|
6731
|
-
_html(`<div${_attr_class(["
|
|
6817
|
+
_html(`<div${_attr_class(["_gx", { ["_gn"]: s.id === input.currentTab }])}>`);
|
|
6732
6818
|
_if(() => {
|
|
6733
6819
|
if (renamingId === s.id) {
|
|
6734
6820
|
const $scope10_id = _scope_id();
|
|
6735
6821
|
_html(`<span${_attr_class([
|
|
6736
6822
|
"_z",
|
|
6737
6823
|
phase[sessionPhase(s.state)],
|
|
6738
|
-
"
|
|
6824
|
+
"_gL"
|
|
6739
6825
|
])}></span>${_el_resume($scope10_id, "a", $sg__input_sessions)}`);
|
|
6740
6826
|
_set_serialize_reason({
|
|
6741
6827
|
1: $sg__input_sessions,
|
|
@@ -6745,17 +6831,17 @@ var side_nav_item_default = _template("x", (input) => {
|
|
|
6745
6831
|
icon_agent_default({
|
|
6746
6832
|
agent: activeAgent(s),
|
|
6747
6833
|
size: 13,
|
|
6748
|
-
class: "
|
|
6834
|
+
class: "_gP"
|
|
6749
6835
|
});
|
|
6750
6836
|
_html(`<input${_attr_input_value($scope10_id, "c", renameValue, _resume((_new_renameValue) => {
|
|
6751
6837
|
renameValue = _new_renameValue;
|
|
6752
|
-
}, "x0", $scope10_id))}${_attr_class(["_U", "
|
|
6838
|
+
}, "x0", $scope10_id))}${_attr_class(["_U", "_gM"])} aria-label="Session name">${_el_resume($scope10_id, "c")}`);
|
|
6753
6839
|
_script($scope10_id, "x5");
|
|
6754
6840
|
_subscribe($renameValue__closures, writeScope($scope10_id, { b: $si__input_sessions && _existing_scope($childScope4) }));
|
|
6755
6841
|
return 0;
|
|
6756
6842
|
} else {
|
|
6757
6843
|
const $scope9_id = _scope_id();
|
|
6758
|
-
_html(`<a${_attr("href", `/w/${ws$1.id}?s=${s.id}`)}${_attr_class("
|
|
6844
|
+
_html(`<a${_attr("href", `/w/${ws$1.id}?s=${s.id}`)}${_attr_class("_gO")}><span${_attr_class(["_z", phase[sessionPhase(s.state)]])}></span>${_el_resume($scope9_id, "b", $sg__input_sessions)}`);
|
|
6759
6845
|
_set_serialize_reason({
|
|
6760
6846
|
1: $sg__input_sessions,
|
|
6761
6847
|
2: $sg__input_sessions
|
|
@@ -6764,9 +6850,9 @@ var side_nav_item_default = _template("x", (input) => {
|
|
|
6764
6850
|
icon_agent_default({
|
|
6765
6851
|
agent: activeAgent(s),
|
|
6766
6852
|
size: 13,
|
|
6767
|
-
class: "
|
|
6853
|
+
class: "_gP"
|
|
6768
6854
|
});
|
|
6769
|
-
_html(`<span${_attr_class("
|
|
6855
|
+
_html(`<span${_attr_class("_gJ")}>${_escape(s.title || activeAgent(s))}${_el_resume($scope9_id, "e", $sg__input_sessions)}</span></a>${_el_resume($scope9_id, "a", _serialize_guard($scope0_reason, 6))}<div${_attr_class("_gK")}><button${_attr_class(rowIcon)} title="Rename session">`);
|
|
6770
6856
|
icon_edit_default({ size: 12 });
|
|
6771
6857
|
_html(`</button>${_el_resume($scope9_id, "g")}<button${_attr_class([close, { ["_q"]: armedKill === s.id }])} title=${armedKill === s.id ? "Close?" : "\"Close session\""}>`);
|
|
6772
6858
|
icon_xmark_default({ size: 12 });
|
|
@@ -6778,7 +6864,7 @@ var side_nav_item_default = _template("x", (input) => {
|
|
|
6778
6864
|
const $childScope6 = _peek_scope_id();
|
|
6779
6865
|
usage_pcts_default({
|
|
6780
6866
|
agent: openPlan,
|
|
6781
|
-
class: "
|
|
6867
|
+
class: "_gF"
|
|
6782
6868
|
});
|
|
6783
6869
|
_subscribe($openPlan__closures, writeScope($scope12_id, {
|
|
6784
6870
|
a: _existing_scope($childScope6),
|
|
@@ -6974,34 +7060,34 @@ var side_nav_default = _template("y", (input) => {
|
|
|
6974
7060
|
const iconSrc = `/api/instance/icon${input.instanceAccent ? `?v=${input.instanceAccent.slice(1)}` : ""}`;
|
|
6975
7061
|
const otherIds = itemIds.filter((id) => id !== ws.id);
|
|
6976
7062
|
const listIds = isPage ? [ws.id, ...otherIds] : itemIds;
|
|
6977
|
-
_html(`<aside${_attr_class(["
|
|
6978
|
-
["
|
|
6979
|
-
["
|
|
7063
|
+
_html(`<aside${_attr_class(["_d1", {
|
|
7064
|
+
["_dZ"]: !navOpen,
|
|
7065
|
+
["_d0"]: isPage
|
|
6980
7066
|
}])}${_attr("hidden", view === "diff")}>`);
|
|
6981
7067
|
_if(() => {
|
|
6982
7068
|
if (isPage) {
|
|
6983
7069
|
const $scope1_id = _scope_id();
|
|
6984
|
-
_html(`<header${_attr_class("
|
|
7070
|
+
_html(`<header${_attr_class("_d4")}><div${_attr_class("_ec")}>`);
|
|
6985
7071
|
_if(() => {
|
|
6986
7072
|
if (input.instanceName) {
|
|
6987
7073
|
const $scope2_id = _scope_id();
|
|
6988
|
-
_html(`<div${_attr_class("
|
|
7074
|
+
_html(`<div${_attr_class("_d_")} title="This work server (Settings → Appearance)"><img${_attr_class("_ea")}${_attr("src", iconSrc)} alt aria-hidden=true>${_el_resume($scope2_id, "b", $sg__input_instanceAccent)}<span${_attr_class("_eb")}>${_escape(input.instanceName)}${_el_resume($scope2_id, "d", $sg__input_instanceName)}</span></div>`);
|
|
6989
7075
|
_subscribe($si__input_instanceAccent && $iconSrc__closures, _subscribe($si__input_instanceName && $input_instanceName__closures, writeScope($scope2_id, { _: _scope_with_id($scope1_id) })));
|
|
6990
7076
|
return 0;
|
|
6991
7077
|
}
|
|
6992
7078
|
}, $scope1_id, "c", $sg__input_instanceName, $sg__input_instanceName, 1, 0, 1);
|
|
6993
|
-
_html(`<h1${_attr_class("
|
|
7079
|
+
_html(`<h1${_attr_class("_d5")}>Workspaces</h1></div><div${_attr_class("_d6")}>`);
|
|
6994
7080
|
_if(() => {}, $scope1_id, "f", 1, 1, 1, 0, 1);
|
|
6995
7081
|
_html(`<a${view === "settings" ? _attr("href", backHref) : " href=/settings"}${_attr_class([
|
|
6996
7082
|
iconBtn$1,
|
|
6997
|
-
"
|
|
6998
|
-
{ ["
|
|
7083
|
+
"_d7",
|
|
7084
|
+
{ ["_dW"]: view === "settings" }
|
|
6999
7085
|
])} title=${view === "settings" ? "\"Back to workspace\"" : "Settings"}${view === "settings" ? " aria-current=page" : ""}>`);
|
|
7000
7086
|
icon_settings_default({ size: 16 });
|
|
7001
7087
|
_if(() => {
|
|
7002
7088
|
if (input.setupReady === false) {
|
|
7003
7089
|
const $scope12_id = _scope_id();
|
|
7004
|
-
_html(`<span${_attr_class(["_z", "
|
|
7090
|
+
_html(`<span${_attr_class(["_z", "_dY"])} title="Machine setup incomplete"></span>`);
|
|
7005
7091
|
$si__input_setupReady && writeScope($scope12_id, {});
|
|
7006
7092
|
return 0;
|
|
7007
7093
|
}
|
|
@@ -7014,18 +7100,18 @@ var side_nav_default = _template("y", (input) => {
|
|
|
7014
7100
|
_if(() => {
|
|
7015
7101
|
if (!isPage && input.instanceName) {
|
|
7016
7102
|
const $scope3_id = _scope_id();
|
|
7017
|
-
_html(`<div${_attr_class("
|
|
7103
|
+
_html(`<div${_attr_class("_d_")} title="This work server (Settings → Appearance)"><img${_attr_class("_ea")}${_attr("src", iconSrc)} alt aria-hidden=true>${_el_resume($scope3_id, "b", $sg__input_instanceAccent)}<span${_attr_class("_eb")}>${_escape(input.instanceName)}${_el_resume($scope3_id, "d", $sg__input_instanceName)}</span></div>`);
|
|
7018
7104
|
writeScope($scope3_id, {});
|
|
7019
7105
|
return 0;
|
|
7020
7106
|
}
|
|
7021
7107
|
}, $scope0_id, "c", 1, 1, 1, 0, 1);
|
|
7022
|
-
_html(`<div${_attr_class("
|
|
7108
|
+
_html(`<div${_attr_class("_ed")}>`);
|
|
7023
7109
|
_for_of(listIds, (wsId) => {
|
|
7024
7110
|
const $scope4_id = _scope_id();
|
|
7025
7111
|
_if(() => {
|
|
7026
7112
|
if (isPage && wsId === ws.id) {
|
|
7027
7113
|
const $scope13_id = _scope_id();
|
|
7028
|
-
_html(`<h2${_attr_class(["
|
|
7114
|
+
_html(`<h2${_attr_class(["_bD", "_d8"])}>Current</h2>`);
|
|
7029
7115
|
writeScope($scope13_id, {});
|
|
7030
7116
|
return 0;
|
|
7031
7117
|
}
|
|
@@ -7033,7 +7119,7 @@ var side_nav_default = _template("y", (input) => {
|
|
|
7033
7119
|
_if(() => {
|
|
7034
7120
|
if (isPage && wsId !== ws.id && wsId === otherIds[0]) {
|
|
7035
7121
|
const $scope14_id = _scope_id();
|
|
7036
|
-
_html(`<h2${_attr_class(["
|
|
7122
|
+
_html(`<h2${_attr_class(["_bD", "_d8"])}>Other workspaces</h2>`);
|
|
7037
7123
|
writeScope($scope14_id, {});
|
|
7038
7124
|
return 0;
|
|
7039
7125
|
}
|
|
@@ -7117,7 +7203,7 @@ var side_nav_default = _template("y", (input) => {
|
|
|
7117
7203
|
railHover = null;
|
|
7118
7204
|
}, 150);
|
|
7119
7205
|
}, "y6", $scope5_id);
|
|
7120
|
-
_html(`<div${_attr_class("
|
|
7206
|
+
_html(`<div${_attr_class("_ee")}>`);
|
|
7121
7207
|
_for_of(itemIds, (wsId, i) => {
|
|
7122
7208
|
const $scope6_id = _scope_id();
|
|
7123
7209
|
_html("<span>");
|
|
@@ -7171,7 +7257,7 @@ var side_nav_default = _template("y", (input) => {
|
|
|
7171
7257
|
if (railHover) {
|
|
7172
7258
|
const $scope7_id = _scope_id();
|
|
7173
7259
|
const hoverId = railHover.id;
|
|
7174
|
-
_html(`<div${_attr_class(["_4", "
|
|
7260
|
+
_html(`<div${_attr_class(["_4", "_eh"])}${_attr_style(`top:${railHover.top}px;left:${railHover.left}px`)}>`);
|
|
7175
7261
|
_set_serialize_reason({
|
|
7176
7262
|
0: 1,
|
|
7177
7263
|
1: 1,
|
|
@@ -7256,7 +7342,7 @@ var side_nav_default = _template("y", (input) => {
|
|
|
7256
7342
|
return 0;
|
|
7257
7343
|
}
|
|
7258
7344
|
}, $scope0_id, "e");
|
|
7259
|
-
_html(`<div${_attr_class("
|
|
7345
|
+
_html(`<div${_attr_class("_ef")}>`);
|
|
7260
7346
|
_if(() => {
|
|
7261
7347
|
if (isPage) {
|
|
7262
7348
|
const $scope9_id = _scope_id();
|
|
@@ -7264,7 +7350,7 @@ var side_nav_default = _template("y", (input) => {
|
|
|
7264
7350
|
"_o",
|
|
7265
7351
|
"_p",
|
|
7266
7352
|
btnLg,
|
|
7267
|
-
"
|
|
7353
|
+
"_d9"
|
|
7268
7354
|
])} title=${view === "new" ? "\"Back to workspace\"" : "\"New workspace\""}${view === "new" ? " aria-current=page" : ""}>`);
|
|
7269
7355
|
icon_folder_plus_default({ size: 16 });
|
|
7270
7356
|
_html(` New workspace</a>${_el_resume($scope9_id, "a")}`);
|
|
@@ -7286,19 +7372,19 @@ var side_nav_default = _template("y", (input) => {
|
|
|
7286
7372
|
return 1;
|
|
7287
7373
|
}
|
|
7288
7374
|
}, $scope8_id, "a", 1, 1, 1, "</button>", 1);
|
|
7289
|
-
_html(`<div${_attr_class(["_y", "
|
|
7375
|
+
_html(`<div${_attr_class(["_y", "_eg"])}></div>`);
|
|
7290
7376
|
_if(() => {}, $scope8_id, "c", 1, 1, 1, 0, 1);
|
|
7291
|
-
_html(`<a${view === "settings" ? _attr("href", backHref) : " href=/settings"}${_attr_class([iconBtn$1, { ["
|
|
7377
|
+
_html(`<a${view === "settings" ? _attr("href", backHref) : " href=/settings"}${_attr_class([iconBtn$1, { ["_dW"]: view === "settings" }])} title=${view === "settings" ? "\"Back to workspace\"" : "Settings"}${view === "settings" ? " aria-current=page" : ""}>`);
|
|
7292
7378
|
icon_settings_default({ size: 15 });
|
|
7293
7379
|
_if(() => {
|
|
7294
7380
|
if (input.setupReady === false) {
|
|
7295
7381
|
const $scope17_id = _scope_id();
|
|
7296
|
-
_html(`<span${_attr_class(["_z", "
|
|
7382
|
+
_html(`<span${_attr_class(["_z", "_dY"])} title="Machine setup incomplete"></span>`);
|
|
7297
7383
|
$si__input_setupReady && writeScope($scope17_id, {});
|
|
7298
7384
|
return 0;
|
|
7299
7385
|
}
|
|
7300
7386
|
}, $scope8_id, "f", $sg__input_setupReady, $sg__input_setupReady, 1, 0, 1);
|
|
7301
|
-
_html(`</a>${_el_resume($scope8_id, "d")}<a${view === "new" ? _attr("href", backHref) : " href=/new"}${_attr_class([iconBtn$1, { ["
|
|
7387
|
+
_html(`</a>${_el_resume($scope8_id, "d")}<a${view === "new" ? _attr("href", backHref) : " href=/new"}${_attr_class([iconBtn$1, { ["_dW"]: view === "new" }])} title=${view === "new" ? "\"Back to workspace\"" : "\"New workspace\""}${view === "new" ? " aria-current=page" : ""}>`);
|
|
7302
7388
|
icon_folder_plus_default({ size: 16 });
|
|
7303
7389
|
_html(`</a>${_el_resume($scope8_id, "g")}`);
|
|
7304
7390
|
_script($scope8_id, "y15");
|
|
@@ -7364,11 +7450,11 @@ var side_nav_default = _template("y", (input) => {
|
|
|
7364
7450
|
_resume_branch($scope0_id);
|
|
7365
7451
|
});
|
|
7366
7452
|
var iconBtn = "_0 _j";
|
|
7367
|
-
var sectionCount = "
|
|
7368
|
-
var content = "
|
|
7369
|
-
var pageMeta = "
|
|
7370
|
-
var pathMeta = "
|
|
7371
|
-
var dangerHint = "
|
|
7453
|
+
var sectionCount = "_bq _I _J";
|
|
7454
|
+
var content = "_dL _bG";
|
|
7455
|
+
var pageMeta = "_dM _bL";
|
|
7456
|
+
var pathMeta = "_dP _x";
|
|
7457
|
+
var dangerHint = "_dV _S";
|
|
7372
7458
|
//#endregion
|
|
7373
7459
|
//#region src/tags/manage-workspace.marko
|
|
7374
7460
|
var api$2;
|
|
@@ -7467,7 +7553,7 @@ var manage_workspace_default = _template("o", (input) => {
|
|
|
7467
7553
|
setTimeout(() => loadProcs(void 0), 500);
|
|
7468
7554
|
}, "o5", $scope0_id);
|
|
7469
7555
|
const titleId = _id();
|
|
7470
|
-
_html(`<div${_attr_class("
|
|
7556
|
+
_html(`<div${_attr_class("_bE")} role=region${_attr("aria-labelledby", titleId)}><div${_attr_class("_bF")}><div${_attr_class(content)}>`);
|
|
7471
7557
|
_set_serialize_reason(30);
|
|
7472
7558
|
const $childScope = _peek_scope_id();
|
|
7473
7559
|
page_head_default({
|
|
@@ -7480,7 +7566,7 @@ var manage_workspace_default = _template("o", (input) => {
|
|
|
7480
7566
|
meta: attrTag({ content: _content_resume("o11", () => {
|
|
7481
7567
|
_scope_reason();
|
|
7482
7568
|
const $scope8_id = _scope_id();
|
|
7483
|
-
_html(`<span${_attr_class(pageMeta)}${_attr("title", ws.display_path || ws.path)}><span${_attr_class("
|
|
7569
|
+
_html(`<span${_attr_class(pageMeta)}${_attr("title", ws.display_path || ws.path)}><span${_attr_class("_dN")}>${_escape(ws.name)}${_el_resume($scope8_id, "c")}</span>`);
|
|
7484
7570
|
_if(() => {
|
|
7485
7571
|
if (ws.status !== "active") {
|
|
7486
7572
|
const $scope11_id = _scope_id();
|
|
@@ -7489,7 +7575,7 @@ var manage_workspace_default = _template("o", (input) => {
|
|
|
7489
7575
|
return 0;
|
|
7490
7576
|
}
|
|
7491
7577
|
}, $scope8_id, "d", 1, 1, 1, 0, 1);
|
|
7492
|
-
_html(`<span${_attr_class("
|
|
7578
|
+
_html(`<span${_attr_class("_dO")} 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")}`);
|
|
7493
7579
|
_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) })))));
|
|
7494
7580
|
_resume_branch($scope8_id);
|
|
7495
7581
|
}, $scope0_id) })
|
|
@@ -7517,22 +7603,22 @@ var manage_workspace_default = _template("o", (input) => {
|
|
|
7517
7603
|
_if(() => {
|
|
7518
7604
|
if (pendingAction && actionStep) {
|
|
7519
7605
|
const $scope7_id = _scope_id();
|
|
7520
|
-
_html(`<p${_attr_class("
|
|
7606
|
+
_html(`<p${_attr_class("_bn")}><span${_attr_class("_F")}></span><!>${_escape(actionStep)}${_el_resume($scope7_id, "c")}</p>`);
|
|
7521
7607
|
writeScope($scope7_id, {});
|
|
7522
7608
|
return 0;
|
|
7523
7609
|
}
|
|
7524
7610
|
}, $scope0_id, "f", 1, 1, 1, 0, 1);
|
|
7525
|
-
_html(`<section${_attr_class("
|
|
7611
|
+
_html(`<section${_attr_class("_bo")}><div${_attr_class("_bp")}><h2${_attr_class("_bD")}>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)}>`);
|
|
7526
7612
|
_set_serialize_reason(1);
|
|
7527
7613
|
const $childScope2 = _peek_scope_id();
|
|
7528
7614
|
icon_refresh_default({
|
|
7529
7615
|
size: 14,
|
|
7530
7616
|
class: catalogRefreshing && "_E"
|
|
7531
7617
|
});
|
|
7532
|
-
_html(`</button>${_el_resume($scope0_id, "m")}</div><ul${_attr_class("
|
|
7618
|
+
_html(`</button>${_el_resume($scope0_id, "m")}</div><ul${_attr_class("_br")}>`);
|
|
7533
7619
|
_for_of(ws.repos, (row) => {
|
|
7534
7620
|
const $scope1_id = _scope_id();
|
|
7535
|
-
_html(`<li${_attr_class("
|
|
7621
|
+
_html(`<li${_attr_class("_bt")}><div${_attr_class("_bu")}><span${_attr_class(["_bv", "_x"])}>${_escape(row.worktree)}${_el_resume($scope1_id, "d")}/</span><span${_attr_class("_bw")}><a${_attr_class(["_bx", "_dR"])}${_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")}`);
|
|
7536
7622
|
_if(() => {
|
|
7537
7623
|
if (row.base_branch !== row.default_branch) {
|
|
7538
7624
|
const $scope12_id = _scope_id();
|
|
@@ -7553,7 +7639,7 @@ var manage_workspace_default = _template("o", (input) => {
|
|
|
7553
7639
|
} else {
|
|
7554
7640
|
const $scope6_id = _scope_id();
|
|
7555
7641
|
_html(`<button${_attr_class([
|
|
7556
|
-
"
|
|
7642
|
+
"_by",
|
|
7557
7643
|
"_2",
|
|
7558
7644
|
"_3",
|
|
7559
7645
|
{ ["_q"]: confirmingRemove === row.full_name }
|
|
@@ -7586,19 +7672,19 @@ var manage_workspace_default = _template("o", (input) => {
|
|
|
7586
7672
|
}, "full_name", $scope0_id, "p", 1, 1, 1, 0, 1);
|
|
7587
7673
|
_for_of([...busy].filter((n) => !inWorkspace.has(n)), (name) => {
|
|
7588
7674
|
const $scope16_id = _scope_id();
|
|
7589
|
-
_html(`<li${_attr_class(["
|
|
7675
|
+
_html(`<li${_attr_class(["_bt", "_bs"])}><span${_attr_class("_F")}></span><div${_attr_class("_bu")}><span${_attr_class("_bx")}>Adding <!>${_escape(name)}${_el_resume($scope16_id, "e")}…</span></div></li>`);
|
|
7590
7676
|
writeScope($scope16_id, {});
|
|
7591
7677
|
}, (n) => n, $scope0_id, "q", 1, 1, 1, 0, 1);
|
|
7592
7678
|
_html("</ul>");
|
|
7593
7679
|
_if(() => {
|
|
7594
7680
|
if (!ws.repos.length && !busy.size) {
|
|
7595
7681
|
const $scope17_id = _scope_id();
|
|
7596
|
-
_html(`<p${_attr_class("
|
|
7682
|
+
_html(`<p${_attr_class("_bz")}>No repos yet. Search below to add one.</p>`);
|
|
7597
7683
|
writeScope($scope17_id, {});
|
|
7598
7684
|
return 0;
|
|
7599
7685
|
}
|
|
7600
7686
|
}, $scope0_id, "r", 1, 1, 1, 0, 1);
|
|
7601
|
-
_html(`<div${_attr_class("
|
|
7687
|
+
_html(`<div${_attr_class("_dQ")}>`);
|
|
7602
7688
|
const $childScope3 = _peek_scope_id();
|
|
7603
7689
|
let refreshCatalog = repo_picker_default({
|
|
7604
7690
|
exclude: inWorkspace,
|
|
@@ -7618,17 +7704,17 @@ var manage_workspace_default = _template("o", (input) => {
|
|
|
7618
7704
|
_if(() => {
|
|
7619
7705
|
if (running.length) {
|
|
7620
7706
|
const $scope9_id = _scope_id();
|
|
7621
|
-
_html(`<section${_attr_class("
|
|
7707
|
+
_html(`<section${_attr_class("_bo")}><div${_attr_class("_bp")}><h2${_attr_class("_bD")}>Running</h2><span${_attr_class(sectionCount)}>${_escape(running.length)}${_el_resume($scope9_id, "e")}</span></div><ul${_attr_class("_br")}>`);
|
|
7622
7708
|
_for_of(running, (p) => {
|
|
7623
7709
|
const $scope10_id = _scope_id();
|
|
7624
|
-
_html(`<li${_attr_class("
|
|
7710
|
+
_html(`<li${_attr_class("_bt")}><div${_attr_class("_bu")}${_attr("title", p.args)}><span${_attr_class(["_bv", "_x"])}>${_escape(p.cmd)}${_el_resume($scope10_id, "d")}</span>`);
|
|
7625
7711
|
_if(() => {
|
|
7626
7712
|
if (p.ports.length) {
|
|
7627
7713
|
const $scope18_id = _scope_id();
|
|
7628
|
-
_html(`<span${_attr_class("
|
|
7714
|
+
_html(`<span${_attr_class("_bw")}>`);
|
|
7629
7715
|
_for_of(p.ports, (port) => {
|
|
7630
7716
|
const $scope19_id = _scope_id();
|
|
7631
|
-
_html(`<button${_attr_class(["_s", "
|
|
7717
|
+
_html(`<button${_attr_class(["_s", "_dS"])}${_attr("title", `Open http://${typeof location === "undefined" ? "localhost" : location.hostname}:${port}`)}>:<!>${_escape(port)}${_el_resume($scope19_id, "b")}</button>${_el_resume($scope19_id, "a")}`);
|
|
7632
7718
|
_script($scope19_id, "o15");
|
|
7633
7719
|
writeScope($scope19_id, { d: port });
|
|
7634
7720
|
}, (x) => String(x), $scope18_id, "a", 1, 1, 1, "</span>", 1);
|
|
@@ -7636,7 +7722,7 @@ var manage_workspace_default = _template("o", (input) => {
|
|
|
7636
7722
|
return 0;
|
|
7637
7723
|
}
|
|
7638
7724
|
}, $scope10_id, "e", 1, 1, 1, 0, 1);
|
|
7639
|
-
_html(`</div>${_el_resume($scope10_id, "b")}<button${_attr_class(["
|
|
7725
|
+
_html(`</div>${_el_resume($scope10_id, "b")}<button${_attr_class(["_by", "_2"])} type=button${_attr("title", `Kill process ${p.pid}`)}${_attr("aria-label", `Kill process ${p.pid}`)}>`);
|
|
7640
7726
|
icon_xmark_default({ size: 14 });
|
|
7641
7727
|
_html(`</button>${_el_resume($scope10_id, "f")}</li>`);
|
|
7642
7728
|
_script($scope10_id, "o16");
|
|
@@ -7650,7 +7736,7 @@ var manage_workspace_default = _template("o", (input) => {
|
|
|
7650
7736
|
return 0;
|
|
7651
7737
|
}
|
|
7652
7738
|
}, $scope0_id, "v", 1, 1, 1, 0, 1);
|
|
7653
|
-
_html(`<section${_attr_class(["
|
|
7739
|
+
_html(`<section${_attr_class(["_bo", "_dT"])}><div${_attr_class("_bp")}><h2${_attr_class("_bD")}>Workspace</h2></div><div${_attr_class("_dU")}>`);
|
|
7654
7740
|
_if(() => {
|
|
7655
7741
|
if (ws.status === "active") {
|
|
7656
7742
|
const $scope4_id = _scope_id();
|
|
@@ -7751,19 +7837,19 @@ var term_find_default = _template("A", (input) => {
|
|
|
7751
7837
|
const canStep = hasQuery && open;
|
|
7752
7838
|
const keybar = input.placement === "keybar";
|
|
7753
7839
|
_html(`<div${_attr_class([
|
|
7754
|
-
"
|
|
7755
|
-
keybar ? "
|
|
7756
|
-
!open && "
|
|
7757
|
-
])} aria-hidden=${open ? "false" : "true"}><div${_attr_class(["
|
|
7840
|
+
"_fF",
|
|
7841
|
+
keybar ? "_fH" : "_fG",
|
|
7842
|
+
!open && "_fJ"
|
|
7843
|
+
])} aria-hidden=${open ? "false" : "true"}><div${_attr_class(["_fA", keybar ? "_fI" : "_fC"])}><input${_attr_input_value($scope0_id, "c", query, _resume(function(v) {
|
|
7758
7844
|
if (!open) return;
|
|
7759
7845
|
query = v;
|
|
7760
7846
|
live.query = v;
|
|
7761
7847
|
run(0);
|
|
7762
|
-
}, "A0", $scope0_id))}${_attr_class([findInput, keybar && "
|
|
7848
|
+
}, "A0", $scope0_id))}${_attr_class([findInput, keybar && "_fK"])} 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 && "_fL"])} title="Previous match"${_attr("disabled", !canStep)} tabindex=${open ? "0" : "-1"}>`);
|
|
7763
7849
|
icon_arrow_up_default({ size: 14 });
|
|
7764
|
-
_html(`</button>${_el_resume($scope0_id, "d")}<button type=button${_attr_class([findIconBtn, keybar && "
|
|
7850
|
+
_html(`</button>${_el_resume($scope0_id, "d")}<button type=button${_attr_class([findIconBtn, keybar && "_fL"])} title="Next match"${_attr("disabled", !canStep)} tabindex=${open ? "0" : "-1"}>`);
|
|
7765
7851
|
icon_arrow_down_default({ size: 14 });
|
|
7766
|
-
_html(`</button>${_el_resume($scope0_id, "f")}<button type=button${_attr_class([findIconBtn, keybar && "
|
|
7852
|
+
_html(`</button>${_el_resume($scope0_id, "f")}<button type=button${_attr_class([findIconBtn, keybar && "_fL"])} title="Close find" tabindex=${open ? "0" : "-1"}>`);
|
|
7767
7853
|
icon_xmark_default({ size: 14 });
|
|
7768
7854
|
_html(`</button>${_el_resume($scope0_id, "h")}</div>${_el_resume($scope0_id, "b", _serialize_guard($scope0_reason, 2))}</div>${_el_resume($scope0_id, "a")}`);
|
|
7769
7855
|
_script($scope0_id, "A4");
|
|
@@ -8097,7 +8183,7 @@ var term_default = _template("B", (input) => {
|
|
|
8097
8183
|
trapOpen = true;
|
|
8098
8184
|
}
|
|
8099
8185
|
}, "B14", $scope0_id);
|
|
8100
|
-
_html(`<div${_attr("hidden", !onTermPage)}${_attr_class("
|
|
8186
|
+
_html(`<div${_attr("hidden", !onTermPage)}${_attr_class("_ei")}><div${_attr_class("_ej")}></div>${_el_resume($scope0_id, "b")}`);
|
|
8101
8187
|
_if(() => {
|
|
8102
8188
|
if (findOpen) {
|
|
8103
8189
|
const $scope12_id = _scope_id();
|
|
@@ -8124,7 +8210,7 @@ var term_default = _template("B", (input) => {
|
|
|
8124
8210
|
_if(() => {
|
|
8125
8211
|
if (uploading) {
|
|
8126
8212
|
const $scope19_id = _scope_id();
|
|
8127
|
-
_html(`<div${_attr_class("
|
|
8213
|
+
_html(`<div${_attr_class("_ep")}>uploading…</div>`);
|
|
8128
8214
|
writeScope($scope19_id, {});
|
|
8129
8215
|
return 0;
|
|
8130
8216
|
}
|
|
@@ -8132,7 +8218,7 @@ var term_default = _template("B", (input) => {
|
|
|
8132
8218
|
_if(() => {
|
|
8133
8219
|
if (copiedFlash) {
|
|
8134
8220
|
const $scope20_id = _scope_id();
|
|
8135
|
-
_html(`<div${_attr_class("
|
|
8221
|
+
_html(`<div${_attr_class("_eo")}>Copied</div>`);
|
|
8136
8222
|
writeScope($scope20_id, {});
|
|
8137
8223
|
return 0;
|
|
8138
8224
|
}
|
|
@@ -8141,7 +8227,7 @@ var term_default = _template("B", (input) => {
|
|
|
8141
8227
|
_if(() => {
|
|
8142
8228
|
if (trapOpen) {
|
|
8143
8229
|
const $scope11_id = _scope_id();
|
|
8144
|
-
_html(`<div${_attr_class("
|
|
8230
|
+
_html(`<div${_attr_class("_eq")}><div${_attr_class("_er")}><p${_attr_class("_eV")}>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")}`);
|
|
8145
8231
|
_script($scope11_id, "B25");
|
|
8146
8232
|
_script($scope11_id, "B26");
|
|
8147
8233
|
writeScope($scope11_id, {});
|
|
@@ -8244,7 +8330,7 @@ var work_view_default = _template("F", (input) => {
|
|
|
8244
8330
|
let DiffView = null;
|
|
8245
8331
|
const loadDiffView = _resume(() => {
|
|
8246
8332
|
if (DiffView) return;
|
|
8247
|
-
import("./
|
|
8333
|
+
import("./_BjC9119e.js").then((m) => {
|
|
8248
8334
|
DiffView = m.default;
|
|
8249
8335
|
});
|
|
8250
8336
|
}, "F6", $scope0_id);
|
|
@@ -8432,10 +8518,10 @@ var work_view_default = _template("F", (input) => {
|
|
|
8432
8518
|
toggleDiff();
|
|
8433
8519
|
}
|
|
8434
8520
|
}, "F21", $scope0_id);
|
|
8435
|
-
_html(`<div${_attr_class(["
|
|
8436
|
-
["
|
|
8437
|
-
["
|
|
8438
|
-
}])}><div${_attr_class("
|
|
8521
|
+
_html(`<div${_attr_class(["_b7", {
|
|
8522
|
+
["_b5"]: view === "nav",
|
|
8523
|
+
["_b6"]: !input.active
|
|
8524
|
+
}])}><div${_attr_class("_b8")}>`);
|
|
8439
8525
|
_set_serialize_reason({
|
|
8440
8526
|
0: _serialize_guard($scope0_reason, 0),
|
|
8441
8527
|
1: 1,
|
|
@@ -8504,7 +8590,7 @@ var work_view_default = _template("F", (input) => {
|
|
|
8504
8590
|
});
|
|
8505
8591
|
}, "F30", $scope0_id)
|
|
8506
8592
|
});
|
|
8507
|
-
_html(`</div><div${_attr_class("
|
|
8593
|
+
_html(`</div><div${_attr_class("_b9")}>`);
|
|
8508
8594
|
_if(() => {
|
|
8509
8595
|
if (error) {
|
|
8510
8596
|
const $scope8_id = _scope_id();
|
|
@@ -8527,7 +8613,7 @@ var work_view_default = _template("F", (input) => {
|
|
|
8527
8613
|
_if(() => {
|
|
8528
8614
|
if (diffMounted && DiffView) {
|
|
8529
8615
|
const $scope1_id = _scope_id();
|
|
8530
|
-
_html(`<div${_attr_class("
|
|
8616
|
+
_html(`<div${_attr_class("_b_")}${_attr_or("data-live", view === "diff", "")}${_attr("inert", view !== "diff")}>`);
|
|
8531
8617
|
_dynamic_tag($scope1_id, "b", DiffView, {
|
|
8532
8618
|
workspaceId: ws.id,
|
|
8533
8619
|
workspaceBranch: ws.branch,
|
|
@@ -8567,7 +8653,7 @@ var work_view_default = _template("F", (input) => {
|
|
|
8567
8653
|
_if(() => {
|
|
8568
8654
|
if (manageMounted) {
|
|
8569
8655
|
const $scope2_id = _scope_id();
|
|
8570
|
-
_html(`<div${_attr_class("
|
|
8656
|
+
_html(`<div${_attr_class("_b_")}${_attr_or("data-live", view === "manage", "")}${_attr("inert", view !== "manage")}>`);
|
|
8571
8657
|
_set_serialize_reason(_serialize_guard($scope0_reason, 16));
|
|
8572
8658
|
const $childScope2 = _peek_scope_id();
|
|
8573
8659
|
manage_workspace_default({
|
|
@@ -8590,7 +8676,7 @@ var work_view_default = _template("F", (input) => {
|
|
|
8590
8676
|
_if(() => {
|
|
8591
8677
|
if (settingsMounted) {
|
|
8592
8678
|
const $scope3_id = _scope_id();
|
|
8593
|
-
_html(`<div${_attr_class("
|
|
8679
|
+
_html(`<div${_attr_class("_b_")}${_attr_or("data-live", view === "settings", "")}${_attr("inert", view !== "settings")}>`);
|
|
8594
8680
|
_set_serialize_reason({
|
|
8595
8681
|
0: _serialize_guard($scope0_reason, 1),
|
|
8596
8682
|
1: $sg__input_workspace,
|
|
@@ -8631,7 +8717,7 @@ var work_view_default = _template("F", (input) => {
|
|
|
8631
8717
|
_if(() => {
|
|
8632
8718
|
if (newMounted) {
|
|
8633
8719
|
const $scope4_id = _scope_id();
|
|
8634
|
-
_html(`<div${_attr_class("
|
|
8720
|
+
_html(`<div${_attr_class("_b_")}${_attr_or("data-live", view === "new", "")}${_attr("inert", view !== "new")}>`);
|
|
8635
8721
|
_set_serialize_reason({
|
|
8636
8722
|
0: 1,
|
|
8637
8723
|
1: $sg__input_allWorkspaces,
|
|
@@ -8658,13 +8744,13 @@ var work_view_default = _template("F", (input) => {
|
|
|
8658
8744
|
return 0;
|
|
8659
8745
|
}
|
|
8660
8746
|
}, $scope0_id, "i", 1, 1, 1, 0, 1);
|
|
8661
|
-
_html(`<div${_attr_class(["
|
|
8747
|
+
_html(`<div${_attr_class(["_cb", { ["_ca"]: view !== "term" }])}>`);
|
|
8662
8748
|
_if(() => {
|
|
8663
8749
|
if (shownSessions) {
|
|
8664
8750
|
const $scope5_id = _scope_id();
|
|
8665
8751
|
_for_of(input.active ? shownSessions : shownSessions.filter((x) => x.id === curTab), (s) => {
|
|
8666
8752
|
const $scope6_id = _scope_id();
|
|
8667
|
-
_html(`<div${_attr_class("
|
|
8753
|
+
_html(`<div${_attr_class("_cc")}${_attr_or("data-live", s.id === curTab, "")}${_attr("inert", s.id !== curTab)}>`);
|
|
8668
8754
|
_set_serialize_reason({
|
|
8669
8755
|
0: 1,
|
|
8670
8756
|
1: 1,
|
|
@@ -8723,7 +8809,7 @@ var work_view_default = _template("F", (input) => {
|
|
|
8723
8809
|
_if(() => {
|
|
8724
8810
|
if (!shownSessions.length && view === "term") {
|
|
8725
8811
|
const $scope7_id = _scope_id();
|
|
8726
|
-
_html(`<div${_attr_class("
|
|
8812
|
+
_html(`<div${_attr_class("_bA")}><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>`);
|
|
8727
8813
|
_script($scope7_id, "F50");
|
|
8728
8814
|
_subscribe($spawning__closures, _subscribe($si__input_preferred && $input_preferred__closures, writeScope($scope7_id, {})));
|
|
8729
8815
|
return 0;
|
|
@@ -8733,7 +8819,7 @@ var work_view_default = _template("F", (input) => {
|
|
|
8733
8819
|
return 0;
|
|
8734
8820
|
} else {
|
|
8735
8821
|
const $scope10_id = _scope_id();
|
|
8736
|
-
_html(`<p${_attr_class("
|
|
8822
|
+
_html(`<p${_attr_class("_bA")}>Loading sessions…</p>`);
|
|
8737
8823
|
writeScope($scope10_id, {});
|
|
8738
8824
|
return 1;
|
|
8739
8825
|
}
|
|
@@ -8869,6 +8955,7 @@ var app_shell_default = _template("c", (input) => {
|
|
|
8869
8955
|
const $openWorkspace2__closures = /* @__PURE__ */ new Set();
|
|
8870
8956
|
const $go2__closures = /* @__PURE__ */ new Set();
|
|
8871
8957
|
const boot = input.boot;
|
|
8958
|
+
seedUsage(boot.usage ?? null);
|
|
8872
8959
|
const initial = input.initial || {
|
|
8873
8960
|
workspaceId: null,
|
|
8874
8961
|
view: "term"
|
|
@@ -9168,56 +9255,56 @@ var app_shell_default = _template("c", (input) => {
|
|
|
9168
9255
|
_script($scope0_id, "c28");
|
|
9169
9256
|
_script($scope0_id, "c29");
|
|
9170
9257
|
writeScope($scope0_id, {
|
|
9171
|
-
|
|
9172
|
-
|
|
9173
|
-
|
|
9174
|
-
|
|
9175
|
-
|
|
9176
|
-
|
|
9177
|
-
|
|
9178
|
-
|
|
9179
|
-
|
|
9180
|
-
|
|
9181
|
-
|
|
9182
|
-
|
|
9183
|
-
|
|
9184
|
-
|
|
9185
|
-
|
|
9186
|
-
|
|
9187
|
-
|
|
9188
|
-
|
|
9189
|
-
|
|
9190
|
-
|
|
9191
|
-
|
|
9192
|
-
|
|
9193
|
-
|
|
9194
|
-
|
|
9195
|
-
|
|
9196
|
-
|
|
9197
|
-
|
|
9198
|
-
|
|
9199
|
-
|
|
9200
|
-
|
|
9201
|
-
|
|
9202
|
-
|
|
9203
|
-
|
|
9204
|
-
|
|
9205
|
-
|
|
9206
|
-
|
|
9207
|
-
|
|
9208
|
-
|
|
9209
|
-
|
|
9210
|
-
|
|
9211
|
-
|
|
9212
|
-
|
|
9213
|
-
|
|
9214
|
-
|
|
9215
|
-
|
|
9216
|
-
|
|
9217
|
-
|
|
9218
|
-
|
|
9219
|
-
|
|
9220
|
-
|
|
9258
|
+
o: boot?.prefs,
|
|
9259
|
+
u: initial.workspaceId,
|
|
9260
|
+
v: initial.view,
|
|
9261
|
+
w: initial.sessionId,
|
|
9262
|
+
x: initial.pr,
|
|
9263
|
+
y: initial.scope,
|
|
9264
|
+
z: initial.file,
|
|
9265
|
+
a0: workspaces,
|
|
9266
|
+
a1: status,
|
|
9267
|
+
a2: settings,
|
|
9268
|
+
a3: $si__input_initial && last,
|
|
9269
|
+
a4: $si__input_initial && bootActive,
|
|
9270
|
+
a6: $si__input_initial && bootActive?.length,
|
|
9271
|
+
a8: selectedId,
|
|
9272
|
+
a9: openIds,
|
|
9273
|
+
ac: creating,
|
|
9274
|
+
ad: route,
|
|
9275
|
+
ae: nav,
|
|
9276
|
+
af: navNonce,
|
|
9277
|
+
ah: lastUrl.route,
|
|
9278
|
+
aj: setup,
|
|
9279
|
+
ak: wantSetup,
|
|
9280
|
+
al: showSetup,
|
|
9281
|
+
an: error,
|
|
9282
|
+
ao: applyWorkspaces,
|
|
9283
|
+
ap: load,
|
|
9284
|
+
aq: patchStatusSessions,
|
|
9285
|
+
as: statusMem.fresh,
|
|
9286
|
+
at: statusMem.run,
|
|
9287
|
+
av: loadStatus,
|
|
9288
|
+
aw: openWorkspace,
|
|
9289
|
+
ay: go,
|
|
9290
|
+
be: $error__closures,
|
|
9291
|
+
b0: $si__input_initial && $initial_workspaceId__closures,
|
|
9292
|
+
b1: $si__input_initial && $initial_view__closures,
|
|
9293
|
+
b2: $si__input_initial && $initial_sessionId__closures,
|
|
9294
|
+
b3: $si__input_initial && $initial_pr__closures,
|
|
9295
|
+
b4: $si__input_initial && $initial_scope__closures,
|
|
9296
|
+
b5: $si__input_initial && $initial_file__closures,
|
|
9297
|
+
b6: $workspaces__closures,
|
|
9298
|
+
b7: $status__closures,
|
|
9299
|
+
b8: $settings__closures,
|
|
9300
|
+
b9: $selectedId__closures,
|
|
9301
|
+
ba: $creating__closures,
|
|
9302
|
+
bb: $nav__closures,
|
|
9303
|
+
bc: $navNonce__closures,
|
|
9304
|
+
bd: $setup2__closures,
|
|
9305
|
+
bf: $applyWorkspaces2__closures,
|
|
9306
|
+
bg: $openWorkspace2__closures,
|
|
9307
|
+
bh: $go2__closures
|
|
9221
9308
|
});
|
|
9222
9309
|
_resume_branch($scope0_id);
|
|
9223
9310
|
});
|
|
@@ -9227,12 +9314,13 @@ var app_page_default = _template("b", (input) => {
|
|
|
9227
9314
|
const $scope0_reason = _scope_reason(), $sg__input_initial = _serialize_guard($scope0_reason, 0), $si__input_initial = _serialize_if($scope0_reason, 0);
|
|
9228
9315
|
const $scope0_id = _scope_id();
|
|
9229
9316
|
const $input_initial__closures = /* @__PURE__ */ new Set();
|
|
9230
|
-
const { workspaces, settings, prefs, status, setup } = $global().data;
|
|
9317
|
+
const { workspaces, settings, prefs, status, setup, usage } = $global().data;
|
|
9231
9318
|
const base = {
|
|
9232
9319
|
workspaces,
|
|
9233
9320
|
settings,
|
|
9234
9321
|
prefs: prefs ?? {},
|
|
9235
|
-
setup
|
|
9322
|
+
setup,
|
|
9323
|
+
usage: usage ?? null
|
|
9236
9324
|
};
|
|
9237
9325
|
const ready = status instanceof Promise ? null : status;
|
|
9238
9326
|
_html(`<main${_attr_class("_c")}>`);
|
|
@@ -9273,7 +9361,7 @@ var app_page_default = _template("b", (input) => {
|
|
|
9273
9361
|
$si__input_initial && writeScope($scope5_id, {
|
|
9274
9362
|
_: _scope_with_id($scope4_id),
|
|
9275
9363
|
a: _existing_scope($childScope3),
|
|
9276
|
-
|
|
9364
|
+
Co: 1
|
|
9277
9365
|
});
|
|
9278
9366
|
_resume_branch($scope5_id);
|
|
9279
9367
|
}, $sg__input_initial);
|
|
@@ -9311,8 +9399,8 @@ var app_page_default = _template("b", (input) => {
|
|
|
9311
9399
|
_html("</main>");
|
|
9312
9400
|
writeScope($scope0_id, {
|
|
9313
9401
|
d: input.initial,
|
|
9314
|
-
|
|
9315
|
-
|
|
9402
|
+
m: base,
|
|
9403
|
+
o: $si__input_initial && $input_initial__closures
|
|
9316
9404
|
});
|
|
9317
9405
|
});
|
|
9318
9406
|
//#endregion
|
|
@@ -10928,54 +11016,6 @@ function head27(context) {
|
|
|
10928
11016
|
return stripResponseBody(get27(context));
|
|
10929
11017
|
}
|
|
10930
11018
|
//#endregion
|
|
10931
|
-
//#region src/server/usage/index.ts
|
|
10932
|
-
var TTL_MS = 6e4;
|
|
10933
|
-
/** Plan/quota usage across every agent account this machine is signed into.
|
|
10934
|
-
*
|
|
10935
|
-
* Each provider is one blocking HTTPS round trip against the same endpoint its
|
|
10936
|
-
* own CLI uses; they touch disjoint credentials and cache files, so they run
|
|
10937
|
-
* concurrently and the wait is the slowest single provider, not their sum. */
|
|
10938
|
-
async function collect() {
|
|
10939
|
-
return (await Promise.all(AGENTS.map((agent) => (agent.usage?.() ?? Promise.resolve([])).catch(() => [{
|
|
10940
|
-
...blankRow(agent.meta.id, "error"),
|
|
10941
|
-
note: "fetch failed"
|
|
10942
|
-
}])))).flat();
|
|
10943
|
-
}
|
|
10944
|
-
/** Age of a row served from a failed refresh, in seconds — undefined when the
|
|
10945
|
-
* numbers are current. Percentages from a stale row describe a window that has
|
|
10946
|
-
* since moved on, so they can't be shown as live figures. */
|
|
10947
|
-
function staleSeconds(source) {
|
|
10948
|
-
const match = /^stale-cache\s+(\d+)s/.exec(source);
|
|
10949
|
-
return match ? Number(match[1]) : void 0;
|
|
10950
|
-
}
|
|
10951
|
-
var cached = swr(TTL_MS, (_key, _refresh) => collect());
|
|
10952
|
-
var usage = async (refresh = false) => {
|
|
10953
|
-
return { agents: (await cached("usage", refresh)).map((row) => ({
|
|
10954
|
-
agent: row.agent,
|
|
10955
|
-
plan: row.plan,
|
|
10956
|
-
account: row.account,
|
|
10957
|
-
stale_seconds: staleSeconds(row.source),
|
|
10958
|
-
note: row.stale_reason || row.note,
|
|
10959
|
-
windows: [
|
|
10960
|
-
{
|
|
10961
|
-
window: "5h",
|
|
10962
|
-
used_percent: row.five_h,
|
|
10963
|
-
resets_at: row.five_h_resets
|
|
10964
|
-
},
|
|
10965
|
-
{
|
|
10966
|
-
window: row.seven_d_label || "7d",
|
|
10967
|
-
used_percent: row.seven_d,
|
|
10968
|
-
resets_at: row.seven_d_resets
|
|
10969
|
-
},
|
|
10970
|
-
{
|
|
10971
|
-
window: "fable",
|
|
10972
|
-
used_percent: row.fable,
|
|
10973
|
-
resets_at: row.fable_resets
|
|
10974
|
-
}
|
|
10975
|
-
].filter((w) => w.used_percent != null)
|
|
10976
|
-
})) };
|
|
10977
|
-
};
|
|
10978
|
-
//#endregion
|
|
10979
11019
|
//#region __marko-run__api.usage.js
|
|
10980
11020
|
var getHandler$6 = normalizeHandler(Run.GET({ search: (value) => ({ refresh: "refresh" in value }) }, async (ctx) => Response.json(await usage(ctx.search.refresh))), "GET");
|
|
10981
11021
|
var get28_options = mergeOptions(mware11, getHandler$6);
|
|
@@ -16775,4 +16815,4 @@ server.listen(port, () => {
|
|
|
16775
16815
|
//#endregion
|
|
16776
16816
|
export {};
|
|
16777
16817
|
|
|
16778
|
-
;var __MARKO_MANIFEST__={"
|
|
16818
|
+
;var __MARKO_MANIFEST__={"AA0T2xt":{"block":[2,"stylesheet#/assets/app-page-fA496vCk.css",6,"<link",0," rel=\"stylesheet\" crossorigin href=\"",1,"assets/app-page-fA496vCk.css\"",">"],"defer":[2,"/assets/settings-C0PsT8Xt.js",6,"<script",0," async type=\"module\" crossorigin src=\"",1,"assets/settings-C0PsT8Xt.js\"","></script>",2,"modulepreload#/assets/_BDPhcxem.js",6,"<link",0," rel=\"modulepreload\" crossorigin href=\"",1,"assets/_BDPhcxem.js\"",">"]},"ZLT8joi":{"block":[2,"stylesheet#/assets/app-page-fA496vCk.css",6,"<link",0," rel=\"stylesheet\" crossorigin href=\"",1,"assets/app-page-fA496vCk.css\"",">"],"defer":[2,"/assets/new-C0PsT8Xt.js",6,"<script",0," async type=\"module\" crossorigin src=\"",1,"assets/new-C0PsT8Xt.js\"","></script>",2,"modulepreload#/assets/_BDPhcxem.js",6,"<link",0," rel=\"modulepreload\" crossorigin href=\"",1,"assets/_BDPhcxem.js\"",">"]},"LH2lXAg":{"block":[2,"stylesheet#/assets/app-page-fA496vCk.css",6,"<link",0," rel=\"stylesheet\" crossorigin href=\"",1,"assets/app-page-fA496vCk.css\"",">"],"defer":[2,"/assets/w-C0PsT8Xt.js",6,"<script",0," async type=\"module\" crossorigin src=\"",1,"assets/w-C0PsT8Xt.js\"","></script>",2,"modulepreload#/assets/_BDPhcxem.js",6,"<link",0," rel=\"modulepreload\" crossorigin href=\"",1,"assets/_BDPhcxem.js\"",">"]},"ibphXY4":{"block":[2,"stylesheet#/assets/app-page-fA496vCk.css",6,"<link",0," rel=\"stylesheet\" crossorigin href=\"",1,"assets/app-page-fA496vCk.css\"",">"],"defer":[2,"/assets/w._-C0PsT8Xt.js",6,"<script",0," async type=\"module\" crossorigin src=\"",1,"assets/w._-C0PsT8Xt.js\"","></script>",2,"modulepreload#/assets/_BDPhcxem.js",6,"<link",0," rel=\"modulepreload\" crossorigin href=\"",1,"assets/_BDPhcxem.js\"",">"]},"T$MNY0k":{"block":[2,"stylesheet#/assets/app-page-fA496vCk.css",6,"<link",0," rel=\"stylesheet\" crossorigin href=\"",1,"assets/app-page-fA496vCk.css\"",">"],"defer":[2,"/assets/w._-B71Uf4-5.js",6,"<script",0," async type=\"module\" crossorigin src=\"",1,"assets/w._-B71Uf4-5.js\"","></script>",2,"modulepreload#/assets/_BDPhcxem.js",6,"<link",0," rel=\"modulepreload\" crossorigin href=\"",1,"assets/_BDPhcxem.js\"",">"]}};
|