@dylanpiercey/work 0.0.66 → 0.0.68
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/work.mjs +17 -1
- package/dist/_C8-SYmgW.js +2 -0
- package/dist/{_CLt6aKrh.js → _CiiZ9YMw.js} +20 -15
- package/dist/{_prItJCwP.js → _CmWodq4J.js} +1176 -975
- package/dist/{_Dp9_KYvx.js → _mSrLyFdO.js} +9 -1
- package/dist/index.mjs +958 -703
- package/dist/public/assets/{_ByLRpoD8.js → _0DzfEV0S.js} +1 -1
- package/dist/public/assets/{_Bu3F-JoI.js → _0GtddR3c.js} +1 -1
- package/dist/public/assets/_0GtddR3c.js.br +0 -0
- package/dist/public/assets/{_D-NX3TNd.js → _1QTSrs1d.js} +1 -1
- package/dist/public/assets/_1QTSrs1d.js.br +0 -0
- package/dist/public/assets/{_ILiR5QWb2.js → _38FppfYs2.js} +1 -1
- package/dist/public/assets/_38FppfYs2.js.br +0 -0
- package/dist/public/assets/{_BD4oLAJs.js → _4ARsqX0i.js} +1 -1
- package/dist/public/assets/_4ARsqX0i.js.br +0 -0
- package/dist/public/assets/{_CMW5tN5O2.js → _7s5yw-v52.js} +1 -1
- package/dist/public/assets/_7s5yw-v52.js.br +0 -0
- package/dist/public/assets/{_BQx2yI4L2.js → _B-Uc5ZM32.js} +1 -1
- package/dist/public/assets/_B-Uc5ZM32.js.br +0 -0
- package/dist/public/assets/{_r0Ipkhml2.js → _B5fosk_S2.js} +1 -1
- package/dist/public/assets/_B5fosk_S2.js.br +0 -0
- package/dist/public/assets/{_WP2Lc15n2.js → _B7F5dl7b2.js} +1 -1
- package/dist/public/assets/{_TGf7nf1b.js → _B8yc63Y7.js} +1 -1
- package/dist/public/assets/_B8yc63Y7.js.br +0 -0
- package/dist/public/assets/{_BzqAPgV-.js → _BBl6TGGl.js} +1 -1
- package/dist/public/assets/_BBl6TGGl.js.br +0 -0
- package/dist/public/assets/{_DDlrIXcy.js → _BCyp3snr.js} +1 -1
- package/dist/public/assets/_BCyp3snr.js.br +0 -0
- package/dist/public/assets/{_DTKF7fNw.js → _BErnD8Jh.js} +1 -1
- package/dist/public/assets/_BErnD8Jh.js.br +0 -0
- package/dist/public/assets/{_DoPHUocN2.js → _BHSIo3Em2.js} +1 -1
- package/dist/public/assets/_BHSIo3Em2.js.br +0 -0
- package/dist/public/assets/{_C9OXLFHE.js → _BTnbsbZN.js} +1 -1
- package/dist/public/assets/_BTnbsbZN.js.br +0 -0
- package/dist/public/assets/{_kh47s6nR.js → _BUNXdYQk.js} +1 -1
- package/dist/public/assets/_BUNXdYQk.js.br +0 -0
- package/dist/public/assets/{_BHfYUVf92.js → _B_Nm8nVX2.js} +1 -1
- package/dist/public/assets/{_HzkUNjYF.js → _BaTRbzd-.js} +1 -1
- package/dist/public/assets/_BaTRbzd-.js.br +4 -0
- package/dist/public/assets/{_Cdheecpj.js → _BhGMgo6c.js} +1 -1
- package/dist/public/assets/_BhGMgo6c.js.br +0 -0
- package/dist/public/assets/{_vRoufqCj.js → _BhZnc_Z0.js} +45 -45
- package/dist/public/assets/_BhZnc_Z0.js.br +0 -0
- package/dist/public/assets/{_DcprnWO8.js → _BigETRAv.js} +1 -1
- package/dist/public/assets/_BigETRAv.js.br +0 -0
- package/dist/public/assets/{_DQUq9TzX2.js → _BomNvUTq2.js} +1 -1
- package/dist/public/assets/_BomNvUTq2.js.br +0 -0
- package/dist/public/assets/{_B1EEc4qP.js → _BrWwXNry.js} +1 -1
- package/dist/public/assets/_BrWwXNry.js.br +0 -0
- package/dist/public/assets/{_CCthH_iX.js → _C2JzQsiQ.js} +1 -1
- package/dist/public/assets/_C2JzQsiQ.js.br +0 -0
- package/dist/public/assets/{_jOq05NWI.js → _C3GcDfTX.js} +1 -1
- package/dist/public/assets/_C3GcDfTX.js.br +0 -0
- package/dist/public/assets/{_DYzEbPN62.js → _C89y7YVy2.js} +1 -1
- package/dist/public/assets/_C89y7YVy2.js.br +0 -0
- package/dist/public/assets/{_DaJqwjNP2.js → _CADyGyO_2.js} +1 -1
- package/dist/public/assets/_CADyGyO_2.js.br +0 -0
- package/dist/public/assets/{_dh9Nkmu2.js → _CAFup1_W.js} +1 -1
- package/dist/public/assets/_CAFup1_W.js.br +0 -0
- package/dist/public/assets/{_DNEFW33V.js → _CBWgUlgl.js} +1 -1
- package/dist/public/assets/_CBWgUlgl.js.br +0 -0
- package/dist/public/assets/{_CaqW-zk5.js → _CEM0yQh2.js} +1 -1
- package/dist/public/assets/_CEM0yQh2.js.br +0 -0
- package/dist/public/assets/{_B5xui1fA.js → _CHFUAx5X.js} +1 -1
- package/dist/public/assets/_CHFUAx5X.js.br +0 -0
- package/dist/public/assets/{_B1mF3byy.js → _CJHMFvCB.js} +1 -1
- package/dist/public/assets/_CJHMFvCB.js.br +0 -0
- package/dist/public/assets/{_w1EhXX_8.js → _CQ2iIrcz.js} +1 -1
- package/dist/public/assets/_CQ2iIrcz.js.br +0 -0
- package/dist/public/assets/{_d0SVuxND.js → _CSXOb1Nz.js} +1 -1
- package/dist/public/assets/_CSXOb1Nz.js.br +0 -0
- package/dist/public/assets/{_mcTiUg5Q.js → _CWi6EnQr.js} +1 -1
- package/dist/public/assets/_CWi6EnQr.js.br +0 -0
- package/dist/public/assets/{_BWVJscSb.js → _C_GZhZw8.js} +1 -1
- package/dist/public/assets/_C_GZhZw8.js.br +0 -0
- package/dist/public/assets/{_CCtam4vN2.js → _C_HO3H8C2.js} +1 -1
- package/dist/public/assets/_C_HO3H8C2.js.br +0 -0
- package/dist/public/assets/{_Uj1o8NRL.js → _CibAH7os.js} +1 -1
- package/dist/public/assets/_CibAH7os.js.br +0 -0
- package/dist/public/assets/{_CnuCerLV.js → _CkOph3YU.js} +1 -1
- package/dist/public/assets/_CkOph3YU.js.br +0 -0
- package/dist/public/assets/{_CusaLcB32.js → _CkQwIPJB2.js} +1 -1
- package/dist/public/assets/_CkQwIPJB2.js.br +0 -0
- package/dist/public/assets/{_bN6AHjz72.js → _CnJuHi072.js} +1 -1
- package/dist/public/assets/_CnJuHi072.js.br +0 -0
- package/dist/public/assets/{_B05o73WT2.js → _CvjCKo622.js} +1 -1
- package/dist/public/assets/_CvjCKo622.js.br +0 -0
- package/dist/public/assets/{_C4-16Peb2.js → _CwPprDz22.js} +1 -1
- package/dist/public/assets/_CwPprDz22.js.br +0 -0
- package/dist/public/assets/{_B8G3NoPj.js → _D2Ff9GZJ.js} +1 -1
- package/dist/public/assets/_D2Ff9GZJ.js.br +0 -0
- package/dist/public/assets/{_CPFyUv8c.js → _D7BeMLFv.js} +1 -1
- package/dist/public/assets/_D7BeMLFv.js.br +0 -0
- package/dist/public/assets/{_CxfdAeEw2.js → _DF6XKhzB2.js} +1 -1
- package/dist/public/assets/_DF6XKhzB2.js.br +0 -0
- package/dist/public/assets/{_e-tg77rn.js → _DOJN7tEK.js} +1 -1
- package/dist/public/assets/_DOJN7tEK.js.br +0 -0
- package/dist/public/assets/{_CVsVJtsx2.js → _DPfaeP-82.js} +1 -1
- package/dist/public/assets/_DPfaeP-82.js.br +0 -0
- package/dist/public/assets/{_C49UpI2x.js → _DUNum2CP.js} +1 -1
- package/dist/public/assets/_DUNum2CP.js.br +0 -0
- package/dist/public/assets/{_wN6_cR73.js → _DVjg6wHM.js} +4 -4
- package/dist/public/assets/_DVjg6wHM.js.br +0 -0
- package/dist/public/assets/{_BsO1b3gk.js → _DgUfKb9A.js} +1 -1
- package/dist/public/assets/_DgUfKb9A.js.br +0 -0
- package/dist/public/assets/{_Bz51lZqR.js → _Dh78anhY.js} +1 -1
- package/dist/public/assets/_Dh78anhY.js.br +0 -0
- package/dist/public/assets/{_jR8RP1Ko2.js → _DkAinoPb2.js} +1 -1
- package/dist/public/assets/_DkAinoPb2.js.br +0 -0
- package/dist/public/assets/{_B0k7NugC2.js → _DmanHBCF2.js} +1 -1
- package/dist/public/assets/_DmanHBCF2.js.br +0 -0
- package/dist/public/assets/{_D816eq_5.js → _DqyNj1TX.js} +1 -1
- package/dist/public/assets/_DqyNj1TX.js.br +0 -0
- package/dist/public/assets/{_CqVqqLWQ.js → _DrxJalR9.js} +1 -1
- package/dist/public/assets/_DrxJalR9.js.br +0 -0
- package/dist/public/assets/{_DmiiHlMw.js → _DtSFAO0E.js} +1 -1
- package/dist/public/assets/_DtSFAO0E.js.br +0 -0
- package/dist/public/assets/{_DNX2C5WJ2.js → _DwPC_Vqh2.js} +1 -1
- package/dist/public/assets/_DwPC_Vqh2.js.br +0 -0
- package/dist/public/assets/{_DuYhjVLw.js → _DxF52SLM.js} +1 -1
- package/dist/public/assets/_DxF52SLM.js.br +0 -0
- package/dist/public/assets/{_BrmwzOnI.js → _Fufp6K4q.js} +1 -1
- package/dist/public/assets/_Fufp6K4q.js.br +0 -0
- package/dist/public/assets/{_CHvHhxWd2.js → _GXQstiZy2.js} +1 -1
- package/dist/public/assets/_GXQstiZy2.js.br +0 -0
- package/dist/public/assets/{_D9saMO33.js → _K0LvfbpY.js} +1 -1
- package/dist/public/assets/_K0LvfbpY.js.br +0 -0
- package/dist/public/assets/{_DgRqz5gW.js → _LSqXrs2F.js} +1 -1
- package/dist/public/assets/_LSqXrs2F.js.br +0 -0
- package/dist/public/assets/{_CuKBxxEj.js → _LkBMtasz.js} +1 -1
- package/dist/public/assets/_LkBMtasz.js.br +0 -0
- package/dist/public/assets/{_DuRPosDU2.js → _M_Ucoj372.js} +1 -1
- package/dist/public/assets/_M_Ucoj372.js.br +0 -0
- package/dist/public/assets/{_DV7j4cO7.js → _N0Sbox9W.js} +1 -1
- package/dist/public/assets/_N0Sbox9W.js.br +0 -0
- package/dist/public/assets/{_BS0vA9WC.js → _NRYJ_4ge.js} +1 -1
- package/dist/public/assets/_NRYJ_4ge.js.br +0 -0
- package/dist/public/assets/{_PuhXJ75Y2.js → _O7xGyDQA2.js} +1 -1
- package/dist/public/assets/_O7xGyDQA2.js.br +0 -0
- package/dist/public/assets/{_6zkzF93t.js → _OaRrg6zQ.js} +1 -1
- package/dist/public/assets/_OaRrg6zQ.js.br +0 -0
- package/dist/public/assets/{_BskoQ_9N.js → __6vKLthg.js} +1 -1
- package/dist/public/assets/__6vKLthg.js.br +0 -0
- package/dist/public/assets/{_rZXmOaG32.js → _dt8wOGnj2.js} +1 -1
- package/dist/public/assets/_dt8wOGnj2.js.br +0 -0
- package/dist/public/assets/{_CXUgu159.js → _e-vmRXWg.js} +1 -1
- package/dist/public/assets/_e-vmRXWg.js.br +0 -0
- package/dist/public/assets/{_CbWbEVg6.js → _eJeVge2q.js} +1 -1
- package/dist/public/assets/_eJeVge2q.js.br +0 -0
- package/dist/public/assets/{_opBVTnU5.js → _r4UEjN6i.js} +1 -1
- package/dist/public/assets/_r4UEjN6i.js.br +0 -0
- package/dist/public/assets/{_D7CRrNvF.js → _x2a4iv92.js} +1 -1
- package/dist/public/assets/_x2a4iv92.js.br +0 -0
- package/dist/public/assets/{_CPY9iUML.js → _yxucBX-G.js} +1 -1
- package/dist/public/assets/_yxucBX-G.js.br +0 -0
- package/dist/public/assets/{app-page-DASXpmZa.css → app-page-8DhqRdJj.css} +1 -1
- package/dist/public/assets/app-page-8DhqRdJj.css.br +0 -0
- package/dist/public/assets/diff-view-DyGcpsic.css +1 -0
- package/dist/public/assets/diff-view-DyGcpsic.css.br +0 -0
- package/dist/public/assets/new-DGta5r6w.js +1 -0
- package/dist/public/assets/settings-DGta5r6w.js +1 -0
- package/dist/public/assets/w-DGta5r6w.js +1 -0
- package/dist/public/assets/w._-9m6uIPo_.js +1 -0
- package/dist/public/assets/w._-DGta5r6w.js +1 -0
- package/lib/review/markdown.d.mts +37 -0
- package/lib/review/markdown.mjs +117 -0
- package/package.json +1 -1
- package/dist/_CTJQVrRJ.js +0 -2
- package/dist/public/assets/_6zkzF93t.js.br +0 -0
- package/dist/public/assets/_B05o73WT2.js.br +0 -0
- package/dist/public/assets/_B0k7NugC2.js.br +0 -0
- package/dist/public/assets/_B1EEc4qP.js.br +0 -0
- package/dist/public/assets/_B1mF3byy.js.br +0 -0
- package/dist/public/assets/_B5xui1fA.js.br +0 -0
- package/dist/public/assets/_B8G3NoPj.js.br +0 -0
- package/dist/public/assets/_BD4oLAJs.js.br +0 -0
- package/dist/public/assets/_BQx2yI4L2.js.br +0 -0
- package/dist/public/assets/_BS0vA9WC.js.br +0 -0
- package/dist/public/assets/_BWVJscSb.js.br +0 -0
- package/dist/public/assets/_BrmwzOnI.js.br +0 -0
- package/dist/public/assets/_BsO1b3gk.js.br +0 -0
- package/dist/public/assets/_BskoQ_9N.js.br +0 -0
- package/dist/public/assets/_Bu3F-JoI.js.br +0 -0
- package/dist/public/assets/_Bz51lZqR.js.br +0 -0
- package/dist/public/assets/_BzqAPgV-.js.br +0 -0
- package/dist/public/assets/_C4-16Peb2.js.br +0 -0
- package/dist/public/assets/_C49UpI2x.js.br +0 -0
- package/dist/public/assets/_C9OXLFHE.js.br +0 -0
- package/dist/public/assets/_CCtam4vN2.js.br +0 -0
- package/dist/public/assets/_CCthH_iX.js.br +0 -0
- package/dist/public/assets/_CHvHhxWd2.js.br +0 -0
- package/dist/public/assets/_CMW5tN5O2.js.br +0 -0
- package/dist/public/assets/_CPFyUv8c.js.br +0 -0
- package/dist/public/assets/_CPY9iUML.js.br +0 -0
- package/dist/public/assets/_CVsVJtsx2.js.br +0 -0
- package/dist/public/assets/_CXUgu159.js.br +0 -0
- package/dist/public/assets/_CaqW-zk5.js.br +0 -0
- package/dist/public/assets/_CbWbEVg6.js.br +0 -0
- package/dist/public/assets/_Cdheecpj.js.br +0 -0
- package/dist/public/assets/_CnuCerLV.js.br +0 -0
- package/dist/public/assets/_CqVqqLWQ.js.br +0 -0
- package/dist/public/assets/_CuKBxxEj.js.br +0 -0
- package/dist/public/assets/_CusaLcB32.js.br +0 -0
- package/dist/public/assets/_CxfdAeEw2.js.br +0 -0
- package/dist/public/assets/_D-NX3TNd.js.br +0 -0
- package/dist/public/assets/_D7CRrNvF.js.br +0 -0
- package/dist/public/assets/_D816eq_5.js.br +0 -0
- package/dist/public/assets/_D9saMO33.js.br +0 -0
- package/dist/public/assets/_DDlrIXcy.js.br +0 -0
- package/dist/public/assets/_DNEFW33V.js.br +0 -0
- package/dist/public/assets/_DNX2C5WJ2.js.br +0 -0
- package/dist/public/assets/_DQUq9TzX2.js.br +0 -0
- package/dist/public/assets/_DTKF7fNw.js.br +0 -0
- package/dist/public/assets/_DV7j4cO7.js.br +0 -0
- package/dist/public/assets/_DYzEbPN62.js.br +0 -0
- package/dist/public/assets/_DaJqwjNP2.js.br +0 -0
- package/dist/public/assets/_DcprnWO8.js.br +0 -0
- package/dist/public/assets/_DgRqz5gW.js.br +0 -0
- package/dist/public/assets/_DmiiHlMw.js.br +0 -0
- package/dist/public/assets/_DoPHUocN2.js.br +0 -0
- package/dist/public/assets/_DuRPosDU2.js.br +0 -0
- package/dist/public/assets/_DuYhjVLw.js.br +0 -0
- package/dist/public/assets/_HzkUNjYF.js.br +0 -0
- package/dist/public/assets/_ILiR5QWb2.js.br +0 -0
- package/dist/public/assets/_PuhXJ75Y2.js.br +0 -0
- package/dist/public/assets/_TGf7nf1b.js.br +0 -0
- package/dist/public/assets/_Uj1o8NRL.js.br +0 -0
- package/dist/public/assets/_bN6AHjz72.js.br +0 -0
- package/dist/public/assets/_d0SVuxND.js.br +0 -0
- package/dist/public/assets/_dh9Nkmu2.js.br +0 -0
- package/dist/public/assets/_e-tg77rn.js.br +0 -0
- package/dist/public/assets/_jOq05NWI.js.br +0 -0
- package/dist/public/assets/_jR8RP1Ko2.js.br +0 -0
- package/dist/public/assets/_kh47s6nR.js.br +0 -0
- package/dist/public/assets/_mcTiUg5Q.js.br +0 -0
- package/dist/public/assets/_opBVTnU5.js.br +0 -0
- package/dist/public/assets/_r0Ipkhml2.js.br +0 -0
- package/dist/public/assets/_rZXmOaG32.js.br +0 -0
- package/dist/public/assets/_vRoufqCj.js.br +0 -0
- package/dist/public/assets/_w1EhXX_8.js.br +0 -0
- package/dist/public/assets/_wN6_cR73.js.br +0 -0
- package/dist/public/assets/app-page-DASXpmZa.css.br +0 -0
- package/dist/public/assets/diff-view-DsPD6PLr.css +0 -1
- package/dist/public/assets/diff-view-DsPD6PLr.css.br +0 -0
- package/dist/public/assets/new-DYa0KZD7.js +0 -1
- package/dist/public/assets/settings-DYa0KZD7.js +0 -1
- package/dist/public/assets/w-DYa0KZD7.js +0 -1
- package/dist/public/assets/w._-CN7l1nb6.js +0 -1
- package/dist/public/assets/w._-DYa0KZD7.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
|
-
import { $ as get, A as subscribe, B as setPref, C as setScrapedPhase, D as pushPublicKey, E as deleteSubscription, F as disabledAgents, G as setupPath, H as doctor, I as enabledAgents, J as TOOLS, K as which, L as getSetting, M as subscriberJoins, N as agentChoices, O as saveSubscription, P as allPrefs, Q as db, R as preferredAgent, S as setAgentPhase, T as summaryFromHookPayload, U as ghKnownHosts, V as setSetting, W as miseVersions, X as toolById, Y as agentById, Z as all, _ as tmuxName, a as ensureTmuxServer, at as tmux, b as clearAgentPhase, c as killWorkspaceSessions, d as newSessionArgs, et as workspacePath, g as sessionStates, h as sendToSession, i as disposeSessions, it as run, j as subscriberCount, k as publish, l as listSessions, m as renameSession, n as clearTmuxStarted, nt as gh, o as getSession, ot as config, p as panePids, q as DEFAULT_GITHUB_HOST, r as createSession, rt as git, s as killSession, t as cleanEnv, tt as TMUX_SOCKET, u as markTmuxStarted, v as tmuxWasStarted, w as setSessionViewers, x as reasonFromHookPayload, y as reportsWorking, z as setDisabledAgents } from "./
|
|
3
|
-
import { $ as
|
|
2
|
+
import { $ as get, A as subscribe, B as setPref, C as setScrapedPhase, D as pushPublicKey, E as deleteSubscription, F as disabledAgents, G as setupPath, H as doctor, I as enabledAgents, J as TOOLS, K as which, L as getSetting, M as subscriberJoins, N as agentChoices, O as saveSubscription, P as allPrefs, Q as db, R as preferredAgent, S as setAgentPhase, T as summaryFromHookPayload, U as ghKnownHosts, V as setSetting, W as miseVersions, X as toolById, Y as agentById, Z as all, _ as tmuxName, a as ensureTmuxServer, at as tmux, b as clearAgentPhase, c as killWorkspaceSessions, d as newSessionArgs, et as workspacePath, g as sessionStates, h as sendToSession, i as disposeSessions, it as run, j as subscriberCount, k as publish, l as listSessions, m as renameSession, n as clearTmuxStarted, nt as gh, o as getSession, ot as config, p as panePids, q as DEFAULT_GITHUB_HOST, r as createSession, rt as git, s as killSession, t as cleanEnv, tt as TMUX_SOCKET, u as markTmuxStarted, v as tmuxWasStarted, w as setSessionViewers, x as reasonFromHookPayload, y as reportsWorking, z as setDisabledAgents } from "./_mSrLyFdO.js";
|
|
3
|
+
import { $ as _flush_head, A as metaTrunc, B as _attr_select_value, C as setPrimaryHost, Ct as _try, D as iconBtnRow, Dt as writeScope, Et as withPageAssets, F as _attr_class, G as _content, H as _attrs, K as _content_resume, L as _attr_input_value, M as tone, N as $global, O as iconBtnXs, P as _attr, Q as _existing_scope, R as _attr_option_value, S as repoWebUrl$1, St as _trailers, T as btnSm, Tt as attrTag, U as _attrs_partial, V as _attr_style, W as _await, X as _el_resume, Y as _el_read_error, Z as _escape, _ as sectionCount$1, _t as _show_end, at as _if, b as icon_base_default, bt as _template, c as sideNavOpen, ct as _resume_branch, d as rankRepos, dt as _scope_with_id, et as _for_of, f as icon_search_default, ft as _script, g as row, gt as _set_serialize_reason, h as iconBtn$2, ht as _serialize_if, it as _id, j as phase, k as inputLg, l as workspaceTab, lt as _scope_id, m as icon_refresh_default, mt as _serialize_guard, n as findInput, nt as _hoist_read_error, ot as _peek_scope_id, p as icon_back_default, pt as _sep, q as _dynamic_tag, r as icon_sidebar_default, rt as _html, s as setWorkspaceTab, st as _resume, t as findIconBtn, tt as _hoist, ut as _scope_reason, v as toast_default, vt as _show_start, w as btnLg, wt as _var, x as repoLabel, xt as _to_text, y as icon_xmark_default, yt as _subscribe, z as _attr_or } from "./_CiiZ9YMw.js";
|
|
4
4
|
import fs from "node:fs";
|
|
5
5
|
import { createServer } from "node:http";
|
|
6
6
|
import path from "node:path";
|
|
@@ -12,7 +12,7 @@ import os from "node:os";
|
|
|
12
12
|
import { spawn } from "node:child_process";
|
|
13
13
|
import { DatabaseSync } from "node:sqlite";
|
|
14
14
|
import fsp from "node:fs/promises";
|
|
15
|
-
import crypto from "node:crypto";
|
|
15
|
+
import crypto, { createHash } from "node:crypto";
|
|
16
16
|
import pty from "node-pty";
|
|
17
17
|
//#region node_modules/.pnpm/@marko+run@0.11.9_@types+node@26.2.0_esbuild@0.27.7_marko@6.3.34/node_modules/@marko/run/dist/adapter/middleware.js
|
|
18
18
|
function getOrigin(req, trustProxy) {
|
|
@@ -1851,6 +1851,7 @@ async function deleteWorkspace(id) {
|
|
|
1851
1851
|
if (!ws) throw new Error(`unknown workspace: ${id}`);
|
|
1852
1852
|
const sessions = listSessions(id);
|
|
1853
1853
|
db.prepare("DELETE FROM workspaces WHERE id = ?").run(id);
|
|
1854
|
+
db.prepare("DELETE FROM settings WHERE key = ?").run(`review.seen:${id}`);
|
|
1854
1855
|
notifyWorkspacesChanged();
|
|
1855
1856
|
progress$1(`Stopping sessions and processes…`);
|
|
1856
1857
|
await disposeSessions(sessions);
|
|
@@ -2169,9 +2170,11 @@ ${repos.map((r) => `- \`${r.worktree}/\`: ${r.full_name} (base: \`${r.base_branc
|
|
|
2169
2170
|
- **Ask \`work\` for facts:** the \`work\` CLI answers from the same data as
|
|
2170
2171
|
the app: \`work workspace\` (this workspace: repos, base branches, open PRs,
|
|
2171
2172
|
sessions, running procs/ports), \`work repos\`, \`work procs\`,
|
|
2172
|
-
\`work
|
|
2173
|
-
|
|
2174
|
-
|
|
2173
|
+
\`work review\` (review comments the user left on the diff and has not
|
|
2174
|
+
sent yet, as markdown), \`work workspaces\`, \`work doctor\` (installed
|
|
2175
|
+
tools / agents / GitHub sign-in), \`work usage\` (agent plan quotas). Add
|
|
2176
|
+
\`--json\` for machine output. Prefer these over guessing from the
|
|
2177
|
+
filesystem or calling GitHub.
|
|
2175
2178
|
`;
|
|
2176
2179
|
fs.writeFileSync(path.join(dir, "AGENTS.md"), content);
|
|
2177
2180
|
const claudeMd = path.join(dir, "CLAUDE.md");
|
|
@@ -3052,7 +3055,7 @@ var _middleware_default = Run.ALL((ctx, next) => {
|
|
|
3052
3055
|
var mware3 = normalizeHandler(_middleware_default$3);
|
|
3053
3056
|
var mware7 = normalizeHandler(_middleware_default$2);
|
|
3054
3057
|
var mware11 = normalizeHandler(_middleware_default$1);
|
|
3055
|
-
var
|
|
3058
|
+
var mware33 = normalizeHandler(_middleware_default);
|
|
3056
3059
|
//#endregion
|
|
3057
3060
|
//#region \0marko-link-assets.mjs
|
|
3058
3061
|
var base = "/";
|
|
@@ -3188,9 +3191,9 @@ function agentFromCommand(command) {
|
|
|
3188
3191
|
}
|
|
3189
3192
|
//#endregion
|
|
3190
3193
|
//#region src/tags/settings-page.css.ts
|
|
3191
|
-
var content$2 = "
|
|
3192
|
-
var agentGrid = "
|
|
3193
|
-
var toolGrid = "
|
|
3194
|
+
var content$2 = "_bV _bh _bi";
|
|
3195
|
+
var agentGrid = "_bZ _bs";
|
|
3196
|
+
var toolGrid = "_b9 _bs";
|
|
3194
3197
|
//#endregion
|
|
3195
3198
|
//#region src/tags/page-head.marko
|
|
3196
3199
|
var page_head_default = _template("o", (input) => {
|
|
@@ -3200,14 +3203,14 @@ var page_head_default = _template("o", (input) => {
|
|
|
3200
3203
|
_if(() => {
|
|
3201
3204
|
if (input.backHref) {
|
|
3202
3205
|
const $scope1_id = _scope_id();
|
|
3203
|
-
_html(`<a${_attr("href", input.backHref)}${_attr_class([iconBtnRow, "
|
|
3206
|
+
_html(`<a${_attr("href", input.backHref)}${_attr_class([iconBtnRow, "_cr"])}${_attr_or("title", input.backTitle, " title=\"Back (Esc)\"")}${_attr_or("aria-label", input.backTitle, " aria-label=Back")}>`);
|
|
3204
3207
|
icon_back_default({ size: 16 });
|
|
3205
3208
|
_html(`</a>${_el_resume($scope1_id, "a", _serialize_guard($scope0_reason, 0))}`);
|
|
3206
3209
|
_serialize_if($scope0_reason, 2) && writeScope($scope1_id, { _: _serialize_if($scope0_reason, 0) && _scope_with_id($scope0_id) });
|
|
3207
3210
|
return 0;
|
|
3208
3211
|
} else if (input.onBack) {
|
|
3209
3212
|
const $scope2_id = _scope_id();
|
|
3210
|
-
_html(`<button${_attr_class([iconBtnRow, "
|
|
3213
|
+
_html(`<button${_attr_class([iconBtnRow, "_cr"])}${_attr_or("title", input.backTitle, " title=\"Back (Esc)\"")}${_attr_or("aria-label", input.backTitle, " aria-label=Back")}>`);
|
|
3211
3214
|
icon_back_default({ size: 16 });
|
|
3212
3215
|
_html(`</button>${_el_resume($scope2_id, "a")}`);
|
|
3213
3216
|
_script($scope2_id, "o0");
|
|
@@ -3255,7 +3258,7 @@ var PATHS = {
|
|
|
3255
3258
|
copilot: "M19.245 5.364c1.322 1.36 1.877 3.216 2.11 5.817.622 0 1.2.135 1.592.654l.73.964c.21.278.323.61.323.955v2.62c0 .339-.173.669-.453.868C20.239 19.602 16.157 21.5 12 21.5c-4.6 0-9.205-2.583-11.547-4.258-.28-.2-.452-.53-.453-.868v-2.62c0-.345.113-.679.321-.956l.73-.963c.392-.517.974-.654 1.593-.654l.029-.297c.25-2.446.81-4.213 2.082-5.52 2.461-2.54 5.71-2.851 7.146-2.864h.198c1.436.013 4.685.323 7.146 2.864zm-7.244 4.328c-.284 0-.613.016-.962.05-.123.447-.305.85-.57 1.108-1.05 1.023-2.316 1.18-2.994 1.18-.638 0-1.306-.13-1.851-.464-.516.165-1.012.403-1.044.996a65.882 65.882 0 00-.063 2.884l-.002.48c-.002.563-.005 1.126-.013 1.69.002.326.204.63.51.765 2.482 1.102 4.83 1.657 6.99 1.657 2.156 0 4.504-.555 6.985-1.657a.854.854 0 00.51-.766c.03-1.682.006-3.372-.076-5.053-.031-.596-.528-.83-1.046-.996-.546.333-1.212.464-1.85.464-.677 0-1.942-.157-2.993-1.18-.266-.258-.447-.661-.57-1.108-.32-.032-.64-.049-.96-.05zm-2.525 4.013c.539 0 .976.426.976.95v1.753c0 .525-.437.95-.976.95a.964.964 0 01-.976-.95v-1.752c0-.525.437-.951.976-.951zm5 0c.539 0 .976.426.976.95v1.753c0 .525-.437.95-.976.95a.964.964 0 01-.976-.95v-1.752c0-.525.437-.951.976-.951zM7.635 5.087c-1.05.102-1.935.438-2.385.906-.975 1.037-.765 3.668-.21 4.224.405.394 1.17.657 1.995.657h.09c.649-.013 1.785-.176 2.73-1.11.435-.41.705-1.433.675-2.47-.03-.834-.27-1.52-.63-1.813-.39-.336-1.275-.482-2.265-.394zm6.465.394c-.36.292-.6.98-.63 1.813-.03 1.037.24 2.06.675 2.47.968.957 2.136 1.104 2.776 1.11h.044c.825 0 1.59-.263 1.995-.657.555-.556.765-3.187-.21-4.224-.45-.468-1.335-.804-2.385-.906-.99-.088-1.875.058-2.265.394zM12 7.615c-.24 0-.525.015-.84.044.03.16.045.336.06.526l-.001.159a2.94 2.94 0 01-.014.25c.225-.022.425-.027.612-.028h.366c.187 0 .387.006.612.028-.015-.146-.015-.277-.015-.409.015-.19.03-.365.06-.526a9.29 9.29 0 00-.84-.044z",
|
|
3256
3259
|
cursor: "M22.106 5.68L12.5.135a.998.998 0 00-.998 0L1.893 5.68a.84.84 0 00-.419.726v11.186c0 .3.16.577.42.727l9.607 5.547a.999.999 0 00.998 0l9.608-5.547a.84.84 0 00.42-.727V6.407a.84.84 0 00-.42-.726zm-.603 1.176L12.228 22.92c-.063.108-.228.064-.228-.061V12.34a.59.59 0 00-.295-.51l-9.11-5.26c-.107-.062-.063-.228.062-.228h18.55c.264 0 .428.286.296.514z"
|
|
3257
3260
|
};
|
|
3258
|
-
var icon_agent_default = _template("
|
|
3261
|
+
var icon_agent_default = _template("C", (input) => {
|
|
3259
3262
|
const $scope0_reason = _scope_reason(), $sg__input_agent = _serialize_guard($scope0_reason, 2), $sg__input_size__OR__input_class = _serialize_guard($scope0_reason, 0), $si__input_size__OR__input_class = _serialize_if($scope0_reason, 0), $si__input_size__OR__input_agent__OR__input_class = _serialize_if($scope0_reason, 1), $si__input_agent = _serialize_if($scope0_reason, 2);
|
|
3260
3263
|
const $scope0_id = _scope_id();
|
|
3261
3264
|
const $badge__closures = /* @__PURE__ */ new Set();
|
|
@@ -3315,7 +3318,7 @@ function duration(ms) {
|
|
|
3315
3318
|
if (h < 48) return `${h}h`;
|
|
3316
3319
|
return `${Math.round(h / 24)}d`;
|
|
3317
3320
|
}
|
|
3318
|
-
function pctText(pct) {
|
|
3321
|
+
function pctText$1(pct) {
|
|
3319
3322
|
const rounded = Math.round(pct);
|
|
3320
3323
|
return rounded !== pct && (rounded === 100 || rounded === 0) ? `${pct.toFixed(1)}%` : `${rounded}%`;
|
|
3321
3324
|
}
|
|
@@ -3325,7 +3328,7 @@ function resetLabel(iso, stale) {
|
|
|
3325
3328
|
if (ms <= 0) return stale ? null : "now";
|
|
3326
3329
|
return duration(ms);
|
|
3327
3330
|
}
|
|
3328
|
-
var usage_meters_default = _template("
|
|
3331
|
+
var usage_meters_default = _template("z", (input) => {
|
|
3329
3332
|
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);
|
|
3330
3333
|
const $scope0_id = _scope_id();
|
|
3331
3334
|
const agent = input.agent;
|
|
@@ -3357,7 +3360,7 @@ var usage_meters_default = _template("y", (input) => {
|
|
|
3357
3360
|
_html(`</div><div${_attr_class(["_cK", { ["_c1"]: agent.stale_seconds != null }])}>`);
|
|
3358
3361
|
_for_of(agent.windows || [], (win) => {
|
|
3359
3362
|
const $scope4_id = _scope_id();
|
|
3360
|
-
const pct = pctText(win.used_percent);
|
|
3363
|
+
const pct = pctText$1(win.used_percent);
|
|
3361
3364
|
const label = resetLabel(win.resets_at, agent.stale_seconds != null);
|
|
3362
3365
|
const fillClass = win.used_percent >= 90 ? "_cT" : win.used_percent >= 70 ? "_cS" : win.used_percent >= 40 ? "_cR" : "_cQ";
|
|
3363
3366
|
const pctClass = win.used_percent >= 90 ? "_cY" : win.used_percent >= 70 ? "_cX" : win.used_percent >= 40 ? "_cW" : "_cV";
|
|
@@ -3382,7 +3385,7 @@ var usage_meters_default = _template("y", (input) => {
|
|
|
3382
3385
|
});
|
|
3383
3386
|
//#endregion
|
|
3384
3387
|
//#region src/tags/icons/icon-plus.marko
|
|
3385
|
-
var icon_plus_default = _template("
|
|
3388
|
+
var icon_plus_default = _template("P", (input) => {
|
|
3386
3389
|
const $scope0_reason = _scope_reason(), $sg__input_size__OR__input_class = _serialize_guard($scope0_reason, 0);
|
|
3387
3390
|
const $scope0_id = _scope_id();
|
|
3388
3391
|
_set_serialize_reason({
|
|
@@ -3420,7 +3423,7 @@ var modal_view_default = _template("m", (input) => {
|
|
|
3420
3423
|
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;
|
|
3421
3424
|
const dismissable = input.dismissable !== false;
|
|
3422
3425
|
let open = input.open;
|
|
3423
|
-
_html(`<dialog${_attr_class(["
|
|
3426
|
+
_html(`<dialog${_attr_class(["_c2", inputClass])}${_attr("aria-labelledby", inputLabelledBy)}${inputLabelledBy ? _attr("aria-label", inputAriaLabel) : _attr("aria-label", inputAriaLabel || label)} closedby=${dismissable ? "any" : "none"}${_attrs_partial({
|
|
3424
3427
|
...htmlInput,
|
|
3425
3428
|
open: null
|
|
3426
3429
|
}, {
|
|
@@ -3430,20 +3433,20 @@ var modal_view_default = _template("m", (input) => {
|
|
|
3430
3433
|
closedby: 1,
|
|
3431
3434
|
"on-cancel": 1,
|
|
3432
3435
|
"on-close": 1
|
|
3433
|
-
}, "a", $scope0_id, "dialog")}><div${_attr_class("
|
|
3436
|
+
}, "a", $scope0_id, "dialog")}><div${_attr_class("_c3")}>`);
|
|
3434
3437
|
_dynamic_tag($scope0_id, "c", content, {}, 0, 0, _serialize_guard($scope0_reason, 6));
|
|
3435
3438
|
_html("</div>");
|
|
3436
3439
|
_if(() => {
|
|
3437
3440
|
if (footer) {
|
|
3438
3441
|
const $scope1_id = _scope_id();
|
|
3439
|
-
_html(`<form method=dialog${_attr_class("
|
|
3442
|
+
_html(`<form method=dialog${_attr_class("_c4")}>`);
|
|
3440
3443
|
_dynamic_tag($scope1_id, "b", footer.content, {}, 0, 0, _serialize_guard($scope0_reason, 7));
|
|
3441
3444
|
_html("</form>");
|
|
3442
3445
|
$si__input_openChange__OR__input_footer && writeScope($scope1_id, { _: _serialize_if($scope0_reason, 7) && _scope_with_id($scope0_id) });
|
|
3443
3446
|
return 0;
|
|
3444
3447
|
} else if (input.openChange) {
|
|
3445
3448
|
const $scope2_id = _scope_id();
|
|
3446
|
-
_html(`<form method=dialog${_attr_class("
|
|
3449
|
+
_html(`<form method=dialog${_attr_class("_c4")}>`);
|
|
3447
3450
|
dialog_close_default({
|
|
3448
3451
|
class: ["_l", "_m"],
|
|
3449
3452
|
content: _content("m0", () => {
|
|
@@ -3502,7 +3505,7 @@ var prompt_dialog_default = _template("p", (input) => {
|
|
|
3502
3505
|
const $childScope = _peek_scope_id();
|
|
3503
3506
|
modal_view_default({
|
|
3504
3507
|
label: input.label,
|
|
3505
|
-
class: "
|
|
3508
|
+
class: "_cp",
|
|
3506
3509
|
open: input.open,
|
|
3507
3510
|
openChange: input.openChange,
|
|
3508
3511
|
"aria-labelledby": titleId,
|
|
@@ -3525,7 +3528,7 @@ var prompt_dialog_default = _template("p", (input) => {
|
|
|
3525
3528
|
content: _content("p6", () => {
|
|
3526
3529
|
_scope_reason();
|
|
3527
3530
|
const $scope2_id = _scope_id();
|
|
3528
|
-
_html(`<h2${_attr_class("
|
|
3531
|
+
_html(`<h2${_attr_class("_cq")}${_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) => {
|
|
3529
3532
|
value = _new_value;
|
|
3530
3533
|
}, "p0", $scope2_id))}${_attr("placeholder", input.placeholder)}>${_el_resume($scope2_id, "c")}`);
|
|
3531
3534
|
_script($scope2_id, "p4");
|
|
@@ -3565,7 +3568,7 @@ function familyOf(usageAgent, families) {
|
|
|
3565
3568
|
}
|
|
3566
3569
|
var lastSetup = null;
|
|
3567
3570
|
var lastUsage = null;
|
|
3568
|
-
var settings_page_default = _template("
|
|
3571
|
+
var settings_page_default = _template("s", (input) => {
|
|
3569
3572
|
const $scope0_reason = _scope_reason(), $sg__input_backHref__OR__input_onExit = _serialize_guard($scope0_reason, 0), $sg__input_agents = _serialize_guard($scope0_reason, 3), $si__input_preferred = _serialize_if($scope0_reason, 1);
|
|
3570
3573
|
const $scope0_id = _scope_id();
|
|
3571
3574
|
const $setup_missing__closures = /* @__PURE__ */ new Set();
|
|
@@ -3599,21 +3602,21 @@ var settings_page_default = _template("r", (input) => {
|
|
|
3599
3602
|
lastSetup = s;
|
|
3600
3603
|
setPrimaryHost(s.github);
|
|
3601
3604
|
input.setupChange?.(s);
|
|
3602
|
-
}, "
|
|
3605
|
+
}, "s3", $scope0_id);
|
|
3603
3606
|
const syncAgents = _resume(async () => {
|
|
3604
3607
|
try {
|
|
3605
3608
|
const snap = await api$6("/api/settings");
|
|
3606
3609
|
input.agentsChange?.(snap.agents);
|
|
3607
3610
|
if (snap.preferredAgent !== input.preferred) input.preferredChange?.(snap.preferredAgent);
|
|
3608
3611
|
} catch {}
|
|
3609
|
-
}, "
|
|
3612
|
+
}, "s4", $scope0_id);
|
|
3610
3613
|
const loadSetup = _resume(async (refresh) => {
|
|
3611
3614
|
try {
|
|
3612
3615
|
applySetup(await api$6(`/api/setup${refresh ? "?refresh" : ""}`));
|
|
3613
3616
|
} catch (err) {
|
|
3614
3617
|
error = String(err.message || err);
|
|
3615
3618
|
}
|
|
3616
|
-
}, "
|
|
3619
|
+
}, "s5", $scope0_id);
|
|
3617
3620
|
const loadUsage = _resume(async (refresh) => {
|
|
3618
3621
|
try {
|
|
3619
3622
|
usage = await api$6(`/api/usage${refresh ? "?refresh" : ""}`);
|
|
@@ -3621,23 +3624,23 @@ var settings_page_default = _template("r", (input) => {
|
|
|
3621
3624
|
usage = { error: String(err.message || err) };
|
|
3622
3625
|
}
|
|
3623
3626
|
lastUsage = usage;
|
|
3624
|
-
}, "
|
|
3627
|
+
}, "s6", $scope0_id);
|
|
3625
3628
|
const refresh = _resume(async () => {
|
|
3626
3629
|
refreshing = true;
|
|
3627
3630
|
await loadSetup(true);
|
|
3628
3631
|
refreshing = false;
|
|
3629
|
-
}, "
|
|
3632
|
+
}, "s7", $scope0_id);
|
|
3630
3633
|
const refreshUsage = _resume(async () => {
|
|
3631
3634
|
usageRefreshing = true;
|
|
3632
3635
|
await loadUsage(true);
|
|
3633
3636
|
usageRefreshing = false;
|
|
3634
|
-
}, "
|
|
3637
|
+
}, "s8", $scope0_id);
|
|
3635
3638
|
const setActive = _resume((id, line) => {
|
|
3636
3639
|
const next = new Map(active);
|
|
3637
3640
|
if (line === null) next.delete(id);
|
|
3638
3641
|
else next.set(id, line);
|
|
3639
3642
|
active = next;
|
|
3640
|
-
}, "
|
|
3643
|
+
}, "s9", $scope0_id);
|
|
3641
3644
|
const run = _resume(async (id, action, version) => {
|
|
3642
3645
|
if (active.has(id)) return;
|
|
3643
3646
|
error = null;
|
|
@@ -3668,7 +3671,7 @@ var settings_page_default = _template("r", (input) => {
|
|
|
3668
3671
|
watcher.stop();
|
|
3669
3672
|
setActive(id, null);
|
|
3670
3673
|
}
|
|
3671
|
-
}, "
|
|
3674
|
+
}, "s10", $scope0_id);
|
|
3672
3675
|
const changeHost = _resume(async (host, remove) => {
|
|
3673
3676
|
hostBusy = true;
|
|
3674
3677
|
error = null;
|
|
@@ -3687,10 +3690,10 @@ var settings_page_default = _template("r", (input) => {
|
|
|
3687
3690
|
} finally {
|
|
3688
3691
|
hostBusy = false;
|
|
3689
3692
|
}
|
|
3690
|
-
}, "
|
|
3693
|
+
}, "s11", $scope0_id);
|
|
3691
3694
|
const runEach = _resume(async (ids, action) => {
|
|
3692
3695
|
for (const id of ids) await run(id, action);
|
|
3693
|
-
}, "
|
|
3696
|
+
}, "s12", $scope0_id);
|
|
3694
3697
|
const setPreferred = _resume(async (agent) => {
|
|
3695
3698
|
input.preferredChange?.(agent);
|
|
3696
3699
|
try {
|
|
@@ -3702,7 +3705,7 @@ var settings_page_default = _template("r", (input) => {
|
|
|
3702
3705
|
} catch (err) {
|
|
3703
3706
|
error = String(err.message || err);
|
|
3704
3707
|
}
|
|
3705
|
-
}, "
|
|
3708
|
+
}, "s13", $scope0_id);
|
|
3706
3709
|
const setEnabled = _resume(async (id, on) => {
|
|
3707
3710
|
if (!setup) return;
|
|
3708
3711
|
const off = new Set(setup.agents.flatMap((f) => f.instances.filter((i) => !i.enabled).map((i) => i.id)));
|
|
@@ -3729,7 +3732,7 @@ var settings_page_default = _template("r", (input) => {
|
|
|
3729
3732
|
} catch (err) {
|
|
3730
3733
|
error = String(err.message || err);
|
|
3731
3734
|
}
|
|
3732
|
-
}, "
|
|
3735
|
+
}, "s14", $scope0_id);
|
|
3733
3736
|
const search = _resume((q) => {
|
|
3734
3737
|
query = q;
|
|
3735
3738
|
clearTimeout(searchTimer.id);
|
|
@@ -3749,16 +3752,16 @@ var settings_page_default = _template("r", (input) => {
|
|
|
3749
3752
|
if (query === q) searching = false;
|
|
3750
3753
|
}
|
|
3751
3754
|
}, 250);
|
|
3752
|
-
}, "
|
|
3753
|
-
const outdated = _resume((t) => !!(t.installed && t.latest && t.latest !== t.version), "
|
|
3755
|
+
}, "s0", $scope0_id);
|
|
3756
|
+
const outdated = _resume((t) => !!(t.installed && t.latest && t.latest !== t.version), "s15");
|
|
3754
3757
|
const tools = setup?.tools || [];
|
|
3755
3758
|
const missingInstallable = tools.filter((t) => t.recommended && !t.installed && t.installable);
|
|
3756
3759
|
const missingCount = tools.filter((t) => t.recommended && !t.installed).length;
|
|
3757
3760
|
const outdatedIds = tools.filter(outdated).map((t) => t.id);
|
|
3758
3761
|
const families = setup?.agents || [];
|
|
3759
3762
|
const instanceIds = new Set(families.flatMap((f) => f.instances.map((i) => i.id)));
|
|
3760
|
-
const accountsFor = _resume((id) => (usage?.agents || []).filter((u) => u.agent === id), "
|
|
3761
|
-
const strayAccountsFor = _resume((f) => (usage?.agents || []).filter((u) => !instanceIds.has(u.agent) && familyOf(u.agent, families) === f.id), "
|
|
3763
|
+
const accountsFor = _resume((id) => (usage?.agents || []).filter((u) => u.agent === id), "s16", $scope0_id);
|
|
3764
|
+
const strayAccountsFor = _resume((f) => (usage?.agents || []).filter((u) => !instanceIds.has(u.agent) && familyOf(u.agent, families) === f.id), "s17", $scope0_id);
|
|
3762
3765
|
const otherUsage = (usage?.agents || []).filter((u) => familyOf(u.agent, families) === null);
|
|
3763
3766
|
const titleId = _id();
|
|
3764
3767
|
const agentsId = _id();
|
|
@@ -3776,8 +3779,8 @@ var settings_page_default = _template("r", (input) => {
|
|
|
3776
3779
|
title: "Settings",
|
|
3777
3780
|
titleId,
|
|
3778
3781
|
backHref: input.backHref,
|
|
3779
|
-
onBack: input.onExit && _resume(() => input.onExit?.(), "
|
|
3780
|
-
meta: attrTag({ content: _content_resume("
|
|
3782
|
+
onBack: input.onExit && _resume(() => input.onExit?.(), "s18", $scope0_id),
|
|
3783
|
+
meta: attrTag({ content: _content_resume("s23", () => {
|
|
3781
3784
|
_scope_reason();
|
|
3782
3785
|
const $scope4_id = _scope_id();
|
|
3783
3786
|
_if(() => {
|
|
@@ -3788,12 +3791,12 @@ var settings_page_default = _template("r", (input) => {
|
|
|
3788
3791
|
return 0;
|
|
3789
3792
|
} else if (setup.ready) {
|
|
3790
3793
|
const $scope43_id = _scope_id();
|
|
3791
|
-
_html(`<span${_attr_class("
|
|
3794
|
+
_html(`<span${_attr_class("_bX")}>Ready</span>. Tools, GitHub, and an agent are all in place.`);
|
|
3792
3795
|
writeScope($scope43_id, {});
|
|
3793
3796
|
return 1;
|
|
3794
3797
|
} else {
|
|
3795
3798
|
const $scope5_id = _scope_id();
|
|
3796
|
-
_html(`<span${_attr_class("
|
|
3799
|
+
_html(`<span${_attr_class("_bY")}>Not ready</span>. Missing <!>${_escape(setup.missing.map((m) => MISSING_LABEL[m] || m).join(", "))}${_el_resume($scope5_id, "b")}.`);
|
|
3797
3800
|
_subscribe($setup_missing__closures, writeScope($scope5_id, {}));
|
|
3798
3801
|
return 2;
|
|
3799
3802
|
}
|
|
@@ -3801,7 +3804,7 @@ var settings_page_default = _template("r", (input) => {
|
|
|
3801
3804
|
_subscribe($setup2__closures, writeScope($scope4_id, { _: _scope_with_id($scope0_id) }));
|
|
3802
3805
|
_resume_branch($scope4_id);
|
|
3803
3806
|
}, $scope0_id) }),
|
|
3804
|
-
actions: attrTag({ content: _content_resume("
|
|
3807
|
+
actions: attrTag({ content: _content_resume("s24", () => {
|
|
3805
3808
|
_scope_reason();
|
|
3806
3809
|
const $scope9_id = _scope_id();
|
|
3807
3810
|
_html(`<button${_attr_class(iconBtnRow)} title="Re-check this machine" aria-label="Re-check this machine"${_attr("disabled", refreshing)}>`);
|
|
@@ -3812,7 +3815,7 @@ var settings_page_default = _template("r", (input) => {
|
|
|
3812
3815
|
class: refreshing && "_B"
|
|
3813
3816
|
});
|
|
3814
3817
|
_html(`</button>${_el_resume($scope9_id, "a")}`);
|
|
3815
|
-
_script($scope9_id, "
|
|
3818
|
+
_script($scope9_id, "s22");
|
|
3816
3819
|
_subscribe($refreshing__closures, writeScope($scope9_id, {
|
|
3817
3820
|
_: _scope_with_id($scope0_id),
|
|
3818
3821
|
b: _existing_scope($childScope)
|
|
@@ -3827,8 +3830,8 @@ var settings_page_default = _template("r", (input) => {
|
|
|
3827
3830
|
placement: "inline",
|
|
3828
3831
|
onDismiss: _resume(function() {
|
|
3829
3832
|
error = null;
|
|
3830
|
-
}, "
|
|
3831
|
-
content: _content_resume("
|
|
3833
|
+
}, "s19", $scope7_id),
|
|
3834
|
+
content: _content_resume("s25", () => {
|
|
3832
3835
|
_scope_reason();
|
|
3833
3836
|
const $scope8_id = _scope_id();
|
|
3834
3837
|
_html(`${_escape(error)}${_el_resume($scope8_id, "a")}`);
|
|
@@ -3840,11 +3843,11 @@ var settings_page_default = _template("r", (input) => {
|
|
|
3840
3843
|
return 0;
|
|
3841
3844
|
}
|
|
3842
3845
|
}, $scope0_id, "e", 1, 1, 1, 0, 1);
|
|
3843
|
-
_html(`<section${_attr_class("_bp")}${_attr("aria-labelledby", agentsId)}><div${_attr_class("_bq")}><h2${_attr("id", agentsId)}${_attr_class("_bE")}>Agents</h2><div${_attr_class("_v")}></div><label${_attr_class("
|
|
3846
|
+
_html(`<section${_attr_class("_bp")}${_attr("aria-labelledby", agentsId)}><div${_attr_class("_bq")}><h2${_attr("id", agentsId)}${_attr_class("_bE")}>Agents</h2><div${_attr_class("_v")}></div><label${_attr_class("_b1")}><span${_attr_class("_P")}>Default</span><span${_attr_class("_j")}>`);
|
|
3844
3847
|
_attr_select_value($scope0_id, "m", input.preferred, _resume(function(v) {
|
|
3845
3848
|
setPreferred(v);
|
|
3846
|
-
}, "
|
|
3847
|
-
_html(`<select${_attr_class(["_k", "
|
|
3849
|
+
}, "s1", $scope0_id), () => {
|
|
3850
|
+
_html(`<select${_attr_class(["_k", "_b2"])} aria-label="Default agent (starts when a workspace has no session yet)" title="Starts when a workspace has no session yet">`);
|
|
3848
3851
|
_for_of(input.agents.filter((a) => a !== "shell"), (id) => {
|
|
3849
3852
|
const $scope44_id = _scope_id();
|
|
3850
3853
|
_html(`<option${_attr_option_value(id)}>${_escape(agentLabel(id))}${_el_resume($scope44_id, "b", $sg__input_agents)}</option>${_el_resume($scope44_id, "a", $sg__input_agents)}`);
|
|
@@ -3865,7 +3868,7 @@ var settings_page_default = _template("r", (input) => {
|
|
|
3865
3868
|
const rows = lone ? [] : a.instances;
|
|
3866
3869
|
const loneAccounts = lone && lone.enabled ? accountsFor(lone.id) : [];
|
|
3867
3870
|
const extraAccounts = a.installed ? strayAccountsFor(a) : [];
|
|
3868
|
-
_html(`<li${_attr_class(["_bu", "
|
|
3871
|
+
_html(`<li${_attr_class(["_bu", "_b0"])}><div${_attr_class(["_b3", { ["_b6"]: lone && !lone.enabled }])}>`);
|
|
3869
3872
|
_set_serialize_reason(12);
|
|
3870
3873
|
const $childScope4 = _peek_scope_id();
|
|
3871
3874
|
icon_agent_default({
|
|
@@ -3885,7 +3888,7 @@ var settings_page_default = _template("r", (input) => {
|
|
|
3885
3888
|
_if(() => {
|
|
3886
3889
|
if (active.has(a.id)) {
|
|
3887
3890
|
const $scope10_id = _scope_id();
|
|
3888
|
-
_html(`<span${_attr_class("
|
|
3891
|
+
_html(`<span${_attr_class("_bW")}><span${_attr_class("_C")}></span><!>${_escape(active.get(a.id) || "Starting…")}${_el_resume($scope10_id, "c")}</span>`);
|
|
3889
3892
|
_subscribe($active__closures, writeScope($scope10_id, {}));
|
|
3890
3893
|
return 0;
|
|
3891
3894
|
} else if (!a.installed) {
|
|
@@ -3900,7 +3903,7 @@ var settings_page_default = _template("r", (input) => {
|
|
|
3900
3903
|
if (!a.installed && !active.has(a.id)) {
|
|
3901
3904
|
const $scope35_id = _scope_id();
|
|
3902
3905
|
_html(`<button${_attr_class(btnSm)}>Install</button>${_el_resume($scope35_id, "a")}`);
|
|
3903
|
-
_script($scope35_id, "
|
|
3906
|
+
_script($scope35_id, "s26");
|
|
3904
3907
|
writeScope($scope35_id, {});
|
|
3905
3908
|
return 0;
|
|
3906
3909
|
}
|
|
@@ -3913,7 +3916,7 @@ var settings_page_default = _template("r", (input) => {
|
|
|
3913
3916
|
"_H",
|
|
3914
3917
|
{ [tone.ok]: lone.enabled }
|
|
3915
3918
|
])} 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($scope39_id, "b")}</button>${_el_resume($scope39_id, "a")}`);
|
|
3916
|
-
_script($scope39_id, "
|
|
3919
|
+
_script($scope39_id, "s27");
|
|
3917
3920
|
writeScope($scope39_id, {});
|
|
3918
3921
|
return 0;
|
|
3919
3922
|
}
|
|
@@ -3922,18 +3925,18 @@ var settings_page_default = _template("r", (input) => {
|
|
|
3922
3925
|
_if(() => {
|
|
3923
3926
|
if (rows.length || loneAccounts.length || extraAccounts.length) {
|
|
3924
3927
|
const $scope2_id = _scope_id();
|
|
3925
|
-
_html(`<ul${_attr_class("
|
|
3928
|
+
_html(`<ul${_attr_class("_b8")}>`);
|
|
3926
3929
|
_for_of(rows, (inst) => {
|
|
3927
3930
|
const $scope3_id = _scope_id();
|
|
3928
3931
|
const accounts = inst.enabled ? accountsFor(inst.id) : [];
|
|
3929
|
-
_html(`<li${_attr_class("
|
|
3932
|
+
_html(`<li${_attr_class("_b4")}><div${_attr_class(["_b5", { ["_b6"]: !inst.enabled }])}>`);
|
|
3930
3933
|
_set_serialize_reason(12);
|
|
3931
3934
|
const $childScope5 = _peek_scope_id();
|
|
3932
3935
|
icon_agent_default({
|
|
3933
3936
|
agent: inst.id,
|
|
3934
3937
|
size: 15
|
|
3935
3938
|
});
|
|
3936
|
-
_html(`<span${_attr_class(["
|
|
3939
|
+
_html(`<span${_attr_class(["_b7", "_u"])}>${_escape(inst.command)}${_el_resume($scope3_id, "e")}</span>`);
|
|
3937
3940
|
_if(() => {
|
|
3938
3941
|
if (input.preferred === inst.id) {
|
|
3939
3942
|
const $scope47_id = _scope_id();
|
|
@@ -3958,7 +3961,7 @@ var settings_page_default = _template("r", (input) => {
|
|
|
3958
3961
|
writeScope($scope48_id, { a: _existing_scope($childScope6) });
|
|
3959
3962
|
}, (u) => `${u.agent}-${u.account || ""}`, $scope3_id, "j", 1, 1, 1, 0, 1);
|
|
3960
3963
|
_html("</li>");
|
|
3961
|
-
_script($scope3_id, "
|
|
3964
|
+
_script($scope3_id, "s28");
|
|
3962
3965
|
_subscribe($accountsFor2__closures, _subscribe($si__input_preferred && $input_preferred__closures, writeScope($scope3_id, {
|
|
3963
3966
|
m: inst?.enabled,
|
|
3964
3967
|
n: inst?.id,
|
|
@@ -4008,7 +4011,7 @@ var settings_page_default = _template("r", (input) => {
|
|
|
4008
4011
|
}, "id", $scope0_id, "q", 1, 1, 1, 0, 1);
|
|
4009
4012
|
_for_of(otherUsage, (u) => {
|
|
4010
4013
|
const $scope51_id = _scope_id();
|
|
4011
|
-
_html(`<li${_attr_class(["_bu", "
|
|
4014
|
+
_html(`<li${_attr_class(["_bu", "_b0"])}>`);
|
|
4012
4015
|
_set_serialize_reason(6);
|
|
4013
4016
|
const $childScope9 = _peek_scope_id();
|
|
4014
4017
|
usage_meters_default({ agent: u });
|
|
@@ -4046,12 +4049,12 @@ var settings_page_default = _template("r", (input) => {
|
|
|
4046
4049
|
_if(() => {
|
|
4047
4050
|
if (active.has(h.host) && authCodes.has(h.host)) {
|
|
4048
4051
|
const $scope22_id = _scope_id();
|
|
4049
|
-
_html(`<span${_attr_class("
|
|
4052
|
+
_html(`<span${_attr_class("_bW")}><span${_attr_class("_C")}></span> Enter code <strong${_attr_class("_cf")}>${_escape(authCodes.get(h.host))}${_el_resume($scope22_id, "d")}</strong> at <a${_attr("href", `https://${h.host}/login/device`)} target=_blank rel=noopener${_attr_class("_cg")}>${_escape(h.host)}${_el_resume($scope22_id, "f")}/login/device</a>${_el_resume($scope22_id, "e")}</span>`);
|
|
4050
4053
|
_subscribe($authCodes__closures, writeScope($scope22_id, {}));
|
|
4051
4054
|
return 0;
|
|
4052
4055
|
} else if (active.has(h.host)) {
|
|
4053
4056
|
const $scope12_id = _scope_id();
|
|
4054
|
-
_html(`<span${_attr_class("
|
|
4057
|
+
_html(`<span${_attr_class("_bW")}><span${_attr_class("_C")}></span><!>${_escape(active.get(h.host) || "Starting…")}${_el_resume($scope12_id, "c")}</span>`);
|
|
4055
4058
|
_subscribe($active__closures, writeScope($scope12_id, { Cck: 1 }));
|
|
4056
4059
|
return 1;
|
|
4057
4060
|
} else if (h.authed) {
|
|
@@ -4074,7 +4077,7 @@ var settings_page_default = _template("r", (input) => {
|
|
|
4074
4077
|
if (!h.authed) {
|
|
4075
4078
|
const $scope36_id = _scope_id();
|
|
4076
4079
|
_html(`<button${_attr_class(btnSm)}>Sign in</button>${_el_resume($scope36_id, "a")}`);
|
|
4077
|
-
_script($scope36_id, "
|
|
4080
|
+
_script($scope36_id, "s29");
|
|
4078
4081
|
writeScope($scope36_id, {});
|
|
4079
4082
|
return 0;
|
|
4080
4083
|
} else {
|
|
@@ -4083,7 +4086,7 @@ var settings_page_default = _template("r", (input) => {
|
|
|
4083
4086
|
["_o"]: confirmingRemove === `out:${h.host}`,
|
|
4084
4087
|
["_n"]: confirmingRemove === `out:${h.host}`
|
|
4085
4088
|
}])}${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($scope24_id, "b")}</button>${_el_resume($scope24_id, "a")}`);
|
|
4086
|
-
_script($scope24_id, "
|
|
4089
|
+
_script($scope24_id, "s30");
|
|
4087
4090
|
_subscribe($for_content3__h_host__closures, _subscribe($confirmingRemove__closures, writeScope($scope24_id, {})));
|
|
4088
4091
|
return 1;
|
|
4089
4092
|
}
|
|
@@ -4110,7 +4113,7 @@ var settings_page_default = _template("r", (input) => {
|
|
|
4110
4113
|
return 1;
|
|
4111
4114
|
}
|
|
4112
4115
|
}, $scope25_id, "a", 1, 1, 1, "</button>");
|
|
4113
|
-
_script($scope25_id, "
|
|
4116
|
+
_script($scope25_id, "s31");
|
|
4114
4117
|
_subscribe($for_content3__h_host__closures, _subscribe($confirmingRemove__closures, writeScope($scope25_id, {
|
|
4115
4118
|
Ccn: 1,
|
|
4116
4119
|
Cr: 1
|
|
@@ -4143,15 +4146,15 @@ var settings_page_default = _template("r", (input) => {
|
|
|
4143
4146
|
_if(() => {
|
|
4144
4147
|
if (setup) {
|
|
4145
4148
|
const $scope33_id = _scope_id();
|
|
4146
|
-
_html(`<form${_attr_class("
|
|
4149
|
+
_html(`<form${_attr_class("_ce")}><label${_attr_class("_T")}>`);
|
|
4147
4150
|
icon_plus_default({
|
|
4148
4151
|
size: 14,
|
|
4149
4152
|
class: "_U"
|
|
4150
4153
|
});
|
|
4151
4154
|
_html(`<input${_attr_input_value($scope33_id, "d", hostInput, _resume((_new_hostInput) => {
|
|
4152
4155
|
hostInput = _new_hostInput;
|
|
4153
|
-
}, "
|
|
4154
|
-
_script($scope33_id, "
|
|
4156
|
+
}, "s2", $scope33_id))}${_attr_class([inputLg, "_V"])} type=text placeholder="Add a GitHub Enterprise host, e.g. github.example.com" aria-label="GitHub Enterprise host" autocomplete=off spellcheck=false>${_el_resume($scope33_id, "d")}</label><button${_attr_class(btnSm)} type=submit${_attr("disabled", !hostInput.trim() || hostBusy)}>${hostBusy ? "Adding…" : "Add host"}${_el_resume($scope33_id, "f")}</button>${_el_resume($scope33_id, "e")}</form>${_el_resume($scope33_id, "a")}`);
|
|
4157
|
+
_script($scope33_id, "s32");
|
|
4155
4158
|
writeScope($scope33_id, {});
|
|
4156
4159
|
return 0;
|
|
4157
4160
|
}
|
|
@@ -4178,7 +4181,7 @@ var settings_page_default = _template("r", (input) => {
|
|
|
4178
4181
|
if (outdatedIds.length > 1) {
|
|
4179
4182
|
const $scope13_id = _scope_id();
|
|
4180
4183
|
_html(`<button${_attr_class(btnSm)}${_attr("disabled", active.size > 0)}>Update all</button>${_el_resume($scope13_id, "a")}`);
|
|
4181
|
-
_script($scope13_id, "
|
|
4184
|
+
_script($scope13_id, "s33");
|
|
4182
4185
|
writeScope($scope13_id, {});
|
|
4183
4186
|
return 0;
|
|
4184
4187
|
}
|
|
@@ -4187,7 +4190,7 @@ var settings_page_default = _template("r", (input) => {
|
|
|
4187
4190
|
if (missingInstallable.length > 1) {
|
|
4188
4191
|
const $scope14_id = _scope_id();
|
|
4189
4192
|
_html(`<button${_attr_class(btnSm)}${_attr("disabled", active.size > 0)}>Install missing</button>${_el_resume($scope14_id, "a")}`);
|
|
4190
|
-
_script($scope14_id, "
|
|
4193
|
+
_script($scope14_id, "s34");
|
|
4191
4194
|
writeScope($scope14_id, {});
|
|
4192
4195
|
return 0;
|
|
4193
4196
|
}
|
|
@@ -4197,7 +4200,7 @@ var settings_page_default = _template("r", (input) => {
|
|
|
4197
4200
|
if (setup && !setup.mise.installed) {
|
|
4198
4201
|
const $scope15_id = _scope_id();
|
|
4199
4202
|
_html(`<p${_attr_class("_bA")}>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($scope15_id, "c")}</button>${_el_resume($scope15_id, "b")}</p>`);
|
|
4200
|
-
_script($scope15_id, "
|
|
4203
|
+
_script($scope15_id, "s35");
|
|
4201
4204
|
writeScope($scope15_id, {});
|
|
4202
4205
|
return 0;
|
|
4203
4206
|
}
|
|
@@ -4210,11 +4213,11 @@ var settings_page_default = _template("r", (input) => {
|
|
|
4210
4213
|
const $for_content4__t_path__closures = /* @__PURE__ */ new Set();
|
|
4211
4214
|
const $for_content4__t_latest__closures = /* @__PURE__ */ new Set();
|
|
4212
4215
|
const $for_content4__t_id__closures = /* @__PURE__ */ new Set();
|
|
4213
|
-
_html(`<li${_attr_class([row, { ["
|
|
4216
|
+
_html(`<li${_attr_class([row, { ["_b_"]: !t.installed }])}><span${_attr_class(["_ca", "_u"])}>${_escape(t.label)}${_el_resume($scope16_id, "c")}</span>`);
|
|
4214
4217
|
_if(() => {
|
|
4215
4218
|
if (active.has(t.id)) {
|
|
4216
4219
|
const $scope17_id = _scope_id();
|
|
4217
|
-
_html(`<span${_attr_class("
|
|
4220
|
+
_html(`<span${_attr_class("_bW")}><span${_attr_class("_C")}></span><!>${_escape(active.get(t.id) || "Starting…")}${_el_resume($scope17_id, "c")}</span>`);
|
|
4218
4221
|
_subscribe($active__closures, writeScope($scope17_id, { Cck: 2 }));
|
|
4219
4222
|
return 0;
|
|
4220
4223
|
} else if (t.installed) {
|
|
@@ -4222,8 +4225,8 @@ var settings_page_default = _template("r", (input) => {
|
|
|
4222
4225
|
_if(() => {
|
|
4223
4226
|
if (t.version) {
|
|
4224
4227
|
const $scope30_id = _scope_id();
|
|
4225
|
-
_html(`<button${_attr_class(["
|
|
4226
|
-
_script($scope30_id, "
|
|
4228
|
+
_html(`<button${_attr_class(["_cb", "_u"])}${_attr("title", `${t.path || t.label}. Pin a version`)}>v<!>${_escape(t.version)}${_el_resume($scope30_id, "b")}</button>${_el_resume($scope30_id, "a")}`);
|
|
4229
|
+
_script($scope30_id, "s36");
|
|
4227
4230
|
_subscribe($for_content4__t_path__closures, _subscribe($for_content4__t_version__closures, _subscribe($for_content4__t_label__closures, writeScope($scope30_id, { Cu: 1 }))));
|
|
4228
4231
|
return 0;
|
|
4229
4232
|
} else {
|
|
@@ -4236,8 +4239,8 @@ var settings_page_default = _template("r", (input) => {
|
|
|
4236
4239
|
_if(() => {
|
|
4237
4240
|
if (outdated(t)) {
|
|
4238
4241
|
const $scope37_id = _scope_id();
|
|
4239
|
-
_html(`<button${_attr_class([btnSm, "
|
|
4240
|
-
_script($scope37_id, "
|
|
4242
|
+
_html(`<button${_attr_class([btnSm, "_cc"])}${_attr("title", `Update to v${t.latest}`)}>↑ <!>${_escape(t.latest)}${_el_resume($scope37_id, "b")}</button>${_el_resume($scope37_id, "a")}`);
|
|
4243
|
+
_script($scope37_id, "s37");
|
|
4241
4244
|
_subscribe($for_content4__t_latest__closures, writeScope($scope37_id, {}));
|
|
4242
4245
|
return 0;
|
|
4243
4246
|
}
|
|
@@ -4272,7 +4275,7 @@ var settings_page_default = _template("r", (input) => {
|
|
|
4272
4275
|
if (!t.installed && t.installable) {
|
|
4273
4276
|
const $scope38_id = _scope_id();
|
|
4274
4277
|
_html(`<button${_attr_class(btnSm)}>Install</button>${_el_resume($scope38_id, "a")}`);
|
|
4275
|
-
_script($scope38_id, "
|
|
4278
|
+
_script($scope38_id, "s38");
|
|
4276
4279
|
writeScope($scope38_id, {});
|
|
4277
4280
|
return 0;
|
|
4278
4281
|
} else if (t.installed && t.version && !t.required) {
|
|
@@ -4296,7 +4299,7 @@ var settings_page_default = _template("r", (input) => {
|
|
|
4296
4299
|
return 1;
|
|
4297
4300
|
}
|
|
4298
4301
|
}, $scope27_id, "a", 1, 1, 1, "</button>");
|
|
4299
|
-
_script($scope27_id, "
|
|
4302
|
+
_script($scope27_id, "s39");
|
|
4300
4303
|
_subscribe($for_content4__t_id__closures, _subscribe($for_content4__t_label__closures, _subscribe($confirmingRemove__closures, writeScope($scope27_id, { Ccn: 2 }))));
|
|
4301
4304
|
return 1;
|
|
4302
4305
|
}
|
|
@@ -4335,14 +4338,14 @@ var settings_page_default = _template("r", (input) => {
|
|
|
4335
4338
|
_if(() => {
|
|
4336
4339
|
if (hits && hits.length) {
|
|
4337
4340
|
const $scope19_id = _scope_id();
|
|
4338
|
-
_html(`<ul${_attr_class([toolGrid, "
|
|
4341
|
+
_html(`<ul${_attr_class([toolGrid, "_cd"])}>`);
|
|
4339
4342
|
_for_of(hits, (h) => {
|
|
4340
4343
|
const $scope20_id = _scope_id();
|
|
4341
|
-
_html(`<li${_attr_class(row)}><div${_attr_class("_bv")}><span${_attr_class(["
|
|
4344
|
+
_html(`<li${_attr_class(row)}><div${_attr_class("_bv")}><span${_attr_class(["_ca", "_u"])}>${_escape(h.name)}${_el_resume($scope20_id, "d")}</span>`);
|
|
4342
4345
|
_if(() => {
|
|
4343
4346
|
if (active.has(h.name)) {
|
|
4344
4347
|
const $scope21_id = _scope_id();
|
|
4345
|
-
_html(`<span${_attr_class("
|
|
4348
|
+
_html(`<span${_attr_class("_bW")}><span${_attr_class("_C")}></span><!>${_escape(active.get(h.name) || "Starting…")}${_el_resume($scope21_id, "c")}</span>`);
|
|
4346
4349
|
_subscribe($active__closures, writeScope($scope21_id, { Cck: 4 }));
|
|
4347
4350
|
return 0;
|
|
4348
4351
|
} else if (h.description) {
|
|
@@ -4365,7 +4368,7 @@ var settings_page_default = _template("r", (input) => {
|
|
|
4365
4368
|
} else {
|
|
4366
4369
|
const $scope32_id = _scope_id();
|
|
4367
4370
|
_html(`<button${_attr_class(btnSm)}>Install</button>${_el_resume($scope32_id, "a")}<button${_attr_class(btnSm)} title="Install a specific version">@…</button>${_el_resume($scope32_id, "b")}`);
|
|
4368
|
-
_script($scope32_id, "
|
|
4371
|
+
_script($scope32_id, "s40");
|
|
4369
4372
|
writeScope($scope32_id, {});
|
|
4370
4373
|
return 1;
|
|
4371
4374
|
}
|
|
@@ -4392,7 +4395,7 @@ var settings_page_default = _template("r", (input) => {
|
|
|
4392
4395
|
}
|
|
4393
4396
|
}, $scope18_id, "d", 1, 1, 1, 0, 1);
|
|
4394
4397
|
_html("</div>");
|
|
4395
|
-
_script($scope18_id, "
|
|
4398
|
+
_script($scope18_id, "s41");
|
|
4396
4399
|
writeScope($scope18_id, {});
|
|
4397
4400
|
return 0;
|
|
4398
4401
|
}
|
|
@@ -4411,19 +4414,19 @@ var settings_page_default = _template("r", (input) => {
|
|
|
4411
4414
|
open: versionPick != null,
|
|
4412
4415
|
openChange: _resume(function(o) {
|
|
4413
4416
|
if (!o) versionPick = null;
|
|
4414
|
-
}, "
|
|
4417
|
+
}, "s20", $scope28_id),
|
|
4415
4418
|
onSubmit: _resume(function(v) {
|
|
4416
4419
|
const pick = versionPick;
|
|
4417
4420
|
versionPick = null;
|
|
4418
4421
|
run(pick.id, "install", v);
|
|
4419
|
-
}, "
|
|
4422
|
+
}, "s21", $scope28_id)
|
|
4420
4423
|
});
|
|
4421
4424
|
writeScope($scope28_id, { a: _existing_scope($childScope10) });
|
|
4422
4425
|
return 0;
|
|
4423
4426
|
}
|
|
4424
4427
|
}, $scope0_id, "aa", 1, 1, 1, 0, 1);
|
|
4425
|
-
_script($scope0_id, "
|
|
4426
|
-
_script($scope0_id, "
|
|
4428
|
+
_script($scope0_id, "s42");
|
|
4429
|
+
_script($scope0_id, "s43");
|
|
4427
4430
|
writeScope($scope0_id, {
|
|
4428
4431
|
ae: input.setupChange,
|
|
4429
4432
|
af: input.agentsChange,
|
|
@@ -4498,8 +4501,8 @@ var curBase = "_bN _Q _P";
|
|
|
4498
4501
|
var archived = "_bR _bp";
|
|
4499
4502
|
var archivedHint = "_bS _P";
|
|
4500
4503
|
var archivedCard = "_bT _bu";
|
|
4501
|
-
var resultBranch = "
|
|
4502
|
-
var branchInput = "
|
|
4504
|
+
var resultBranch = "_cy _W _g";
|
|
4505
|
+
var branchInput = "_cD _S _R";
|
|
4503
4506
|
//#endregion
|
|
4504
4507
|
//#region src/tags/repo-picker.marko
|
|
4505
4508
|
var api$5;
|
|
@@ -4549,7 +4552,7 @@ var repo_picker_default = _template("q", (input) => {
|
|
|
4549
4552
|
input.onError?.(String(err.message || err));
|
|
4550
4553
|
}
|
|
4551
4554
|
}, "q5", $scope0_id);
|
|
4552
|
-
_html(`<div${_attr_class("
|
|
4555
|
+
_html(`<div${_attr_class("_cs")}><label${_attr_class("_T")}>`);
|
|
4553
4556
|
icon_search_default({
|
|
4554
4557
|
size: 14,
|
|
4555
4558
|
class: "_U"
|
|
@@ -4569,19 +4572,19 @@ var repo_picker_default = _template("q", (input) => {
|
|
|
4569
4572
|
_if(() => {
|
|
4570
4573
|
if (results.length) {
|
|
4571
4574
|
const $scope2_id = _scope_id();
|
|
4572
|
-
_html(`<ul${_attr_class("
|
|
4575
|
+
_html(`<ul${_attr_class("_ct")}>`);
|
|
4573
4576
|
_for_of(results, (repo, i) => {
|
|
4574
4577
|
const $scope3_id = _scope_id();
|
|
4575
|
-
_html(`<li><div${_attr_class(["
|
|
4578
|
+
_html(`<li><div${_attr_class(["_cv", { ["_cu"]: i === highlight }])}><button${_attr_class("_cw")}>`);
|
|
4576
4579
|
icon_plus_default({
|
|
4577
4580
|
size: 12,
|
|
4578
|
-
class: "
|
|
4581
|
+
class: "_cB"
|
|
4579
4582
|
});
|
|
4580
|
-
_html(`<span${_attr_class("
|
|
4583
|
+
_html(`<span${_attr_class("_cC")}>${_escape(repoLabel(repo.nameWithOwner))}${_el_resume($scope3_id, "e")}</span></button>${_el_resume($scope3_id, "b")}<button${_attr_class([resultBranch, { ["_cx"]: branchesFor === repo.nameWithOwner }])}${_attr("title", `Pick a base branch for ${repo.nameWithOwner}`)}${_attr("aria-label", `Pick a base branch for ${repo.nameWithOwner}`)}>⎇</button>${_el_resume($scope3_id, "f")}</div>${_el_resume($scope3_id, "a")}`);
|
|
4581
4584
|
_if(() => {
|
|
4582
4585
|
if (branchesFor === repo.nameWithOwner) {
|
|
4583
4586
|
const $scope4_id = _scope_id();
|
|
4584
|
-
_html(`<div${_attr_class("
|
|
4587
|
+
_html(`<div${_attr_class("_cz")}>`);
|
|
4585
4588
|
_if(() => {
|
|
4586
4589
|
if (!branches) {
|
|
4587
4590
|
const $scope9_id = _scope_id();
|
|
@@ -4602,10 +4605,10 @@ var repo_picker_default = _template("q", (input) => {
|
|
|
4602
4605
|
}
|
|
4603
4606
|
}, $scope5_id, "a", 1, 1, 1, 0, 1);
|
|
4604
4607
|
const shown = (branchFilter ? branches.filter((b) => b.toLowerCase().includes(branchFilter.toLowerCase())) : branches).slice(0, 12);
|
|
4605
|
-
_html(`<ul${_attr_class("
|
|
4608
|
+
_html(`<ul${_attr_class("_cA")}>`);
|
|
4606
4609
|
_for_of(shown, (branch) => {
|
|
4607
4610
|
const $scope7_id = _scope_id();
|
|
4608
|
-
_html(`<li><button${_attr_class(["
|
|
4611
|
+
_html(`<li><button${_attr_class(["_cw", "_cE"])}><span${_attr_class(["_cC", "_u"])}>${_escape(branch)}${_el_resume($scope7_id, "c")}</span></button>${_el_resume($scope7_id, "a")}</li>`);
|
|
4609
4612
|
_script($scope7_id, "q7");
|
|
4610
4613
|
writeScope($scope7_id, { e: branch });
|
|
4611
4614
|
}, (b) => b, $scope5_id, "c", 1, 1, 1, 0, 1);
|
|
@@ -5038,9 +5041,9 @@ function activeAgent(session) {
|
|
|
5038
5041
|
const command = session.state?.command?.trim();
|
|
5039
5042
|
return command && agentFromCommand(command) || session.agent;
|
|
5040
5043
|
}
|
|
5041
|
-
var iconBtn$1 = "
|
|
5042
|
-
var navToggle = "
|
|
5043
|
-
_template("
|
|
5044
|
+
var iconBtn$1 = "_c6 _g";
|
|
5045
|
+
var navToggle = "_da _g";
|
|
5046
|
+
_template("F", (input) => {
|
|
5044
5047
|
const $scope0_reason = _scope_reason(), $sg__input_size__OR__input_class = _serialize_guard($scope0_reason, 0);
|
|
5045
5048
|
const $scope0_id = _scope_id();
|
|
5046
5049
|
_set_serialize_reason({
|
|
@@ -5057,7 +5060,7 @@ _template("D", (input) => {
|
|
|
5057
5060
|
});
|
|
5058
5061
|
//#endregion
|
|
5059
5062
|
//#region src/tags/icons/icon-settings.marko
|
|
5060
|
-
var icon_settings_default = _template("
|
|
5063
|
+
var icon_settings_default = _template("S", (input) => {
|
|
5061
5064
|
const $scope0_reason = _scope_reason(), $sg__input_size__OR__input_class = _serialize_guard($scope0_reason, 0);
|
|
5062
5065
|
const $scope0_id = _scope_id();
|
|
5063
5066
|
_set_serialize_reason({
|
|
@@ -5082,15 +5085,15 @@ var ARM_MS = 3500;
|
|
|
5082
5085
|
function disarmLater(fn) {
|
|
5083
5086
|
return setTimeout(fn, ARM_MS);
|
|
5084
5087
|
}
|
|
5085
|
-
var railBtn = "
|
|
5086
|
-
var rowIcon = "
|
|
5087
|
-
var close = "
|
|
5088
|
+
var railBtn = "_e2 _g";
|
|
5089
|
+
var rowIcon = "_fa _W _g";
|
|
5090
|
+
var close = "_fb _W _g _Z";
|
|
5088
5091
|
//#endregion
|
|
5089
5092
|
//#region src/styles/session-pop.css.ts
|
|
5090
|
-
var sessionPop = "
|
|
5093
|
+
var sessionPop = "_eY _1";
|
|
5091
5094
|
//#endregion
|
|
5092
5095
|
//#region src/tags/icons/icon-diff.marko
|
|
5093
|
-
var icon_diff_default = _template("
|
|
5096
|
+
var icon_diff_default = _template("I", (input) => {
|
|
5094
5097
|
const $scope0_reason = _scope_reason(), $sg__input_size__OR__input_class = _serialize_guard($scope0_reason, 0);
|
|
5095
5098
|
const $scope0_id = _scope_id();
|
|
5096
5099
|
_set_serialize_reason({
|
|
@@ -5107,7 +5110,7 @@ var icon_diff_default = _template("G", (input) => {
|
|
|
5107
5110
|
});
|
|
5108
5111
|
//#endregion
|
|
5109
5112
|
//#region src/tags/icons/icon-manage.marko
|
|
5110
|
-
var icon_manage_default = _template("
|
|
5113
|
+
var icon_manage_default = _template("O", (input) => {
|
|
5111
5114
|
const $scope0_reason = _scope_reason(), $sg__input_size__OR__input_class = _serialize_guard($scope0_reason, 0);
|
|
5112
5115
|
const $scope0_id = _scope_id();
|
|
5113
5116
|
_set_serialize_reason({
|
|
@@ -5124,7 +5127,7 @@ var icon_manage_default = _template("M", (input) => {
|
|
|
5124
5127
|
});
|
|
5125
5128
|
//#endregion
|
|
5126
5129
|
//#region src/tags/icons/icon-edit.marko
|
|
5127
|
-
var icon_edit_default = _template("
|
|
5130
|
+
var icon_edit_default = _template("K", (input) => {
|
|
5128
5131
|
const $scope0_reason = _scope_reason(), $sg__input_size__OR__input_class = _serialize_guard($scope0_reason, 0);
|
|
5129
5132
|
const $scope0_id = _scope_id();
|
|
5130
5133
|
_set_serialize_reason({
|
|
@@ -5139,12 +5142,12 @@ var icon_edit_default = _template("I", (input) => {
|
|
|
5139
5142
|
});
|
|
5140
5143
|
_serialize_if($scope0_reason, 0) && writeScope($scope0_id, { a: _existing_scope($childScope) });
|
|
5141
5144
|
});
|
|
5142
|
-
var prChip = "
|
|
5143
|
-
var portChip = "
|
|
5145
|
+
var prChip = "_gv _p _gu";
|
|
5146
|
+
var portChip = "_gw _p _gu";
|
|
5144
5147
|
var prState = {
|
|
5145
|
-
open: "
|
|
5146
|
-
merged: "
|
|
5147
|
-
closed: "
|
|
5148
|
+
open: "_gA",
|
|
5149
|
+
merged: "_gB",
|
|
5150
|
+
closed: "_gC"
|
|
5148
5151
|
};
|
|
5149
5152
|
//#endregion
|
|
5150
5153
|
//#region src/tags/side-nav-chips.marko
|
|
@@ -5157,7 +5160,7 @@ var prTitle = (repo, pr) => {
|
|
|
5157
5160
|
return parts.join(" · ");
|
|
5158
5161
|
};
|
|
5159
5162
|
var isOpen = (pr) => !pr.state || pr.state === "OPEN";
|
|
5160
|
-
var side_nav_chips_default = _template("
|
|
5163
|
+
var side_nav_chips_default = _template("t", (input) => {
|
|
5161
5164
|
const $scope0_reason = _scope_reason(), $sg__input_status_repos = _serialize_guard($scope0_reason, 4), $si__input_status_repos = _serialize_if($scope0_reason, 4), $sg__input_status_ports = _serialize_guard($scope0_reason, 5), $sg__input_status_repos__OR__input_status_ports = _serialize_guard($scope0_reason, 1), $si__input_status_repos__OR__input_status_ports = _serialize_if($scope0_reason, 1), $si__input_workspaceId = _serialize_if($scope0_reason, 3);
|
|
5162
5165
|
const $scope0_id = _scope_id();
|
|
5163
5166
|
const $input_workspaceId__closures = /* @__PURE__ */ new Set();
|
|
@@ -5170,7 +5173,7 @@ var side_nav_chips_default = _template("s", (input) => {
|
|
|
5170
5173
|
armBox.timer = disarmLater(() => {
|
|
5171
5174
|
armedPid = null;
|
|
5172
5175
|
});
|
|
5173
|
-
}, "
|
|
5176
|
+
}, "t0", $scope0_id);
|
|
5174
5177
|
const dismissPr = _resume((fullName, number) => {
|
|
5175
5178
|
fetch(`/api/workspaces/${input.workspaceId}/prs`, {
|
|
5176
5179
|
method: "POST",
|
|
@@ -5180,7 +5183,7 @@ var side_nav_chips_default = _template("s", (input) => {
|
|
|
5180
5183
|
number
|
|
5181
5184
|
})
|
|
5182
5185
|
}).catch(() => {});
|
|
5183
|
-
}, "
|
|
5186
|
+
}, "t1", $scope0_id);
|
|
5184
5187
|
const repos = input.status?.repos || [];
|
|
5185
5188
|
const ports = input.status?.ports || [];
|
|
5186
5189
|
_if(() => {
|
|
@@ -5191,8 +5194,8 @@ var side_nav_chips_default = _template("s", (input) => {
|
|
|
5191
5194
|
if (repos.length < 2) return "";
|
|
5192
5195
|
const name = repo.full_name.split("/").at(-1);
|
|
5193
5196
|
return repos.some((r) => r.full_name !== repo.full_name && r.full_name.split("/").at(-1) === name) ? repoLabel(repo.full_name) : name;
|
|
5194
|
-
}, "
|
|
5195
|
-
_html(`<div${_attr_class("
|
|
5197
|
+
}, "t2", $scope1_id);
|
|
5198
|
+
_html(`<div${_attr_class("_gt")}>`);
|
|
5196
5199
|
_for_of(repos, (repo) => {
|
|
5197
5200
|
const $scope2_id = _scope_id();
|
|
5198
5201
|
const $for_content__repo_worktree__closures = /* @__PURE__ */ new Set();
|
|
@@ -5208,11 +5211,11 @@ var side_nav_chips_default = _template("s", (input) => {
|
|
|
5208
5211
|
[prState.merged]: pr.state === "MERGED",
|
|
5209
5212
|
[prState.closed]: pr.state === "CLOSED"
|
|
5210
5213
|
}
|
|
5211
|
-
])}${_attr("title", prTitle(repo, pr))}><a${_attr_class(["
|
|
5214
|
+
])}${_attr("title", prTitle(repo, pr))}><a${_attr_class(["_gx", { ["_gE"]: !open }])}${_attr("href", pr.url)} target=_blank rel=noopener>${_escape(repoLabel$1(repo))}${_el_resume($scope3_id, "c", $sg__input_status_repos)}#${_sep($sg__input_status_repos)}${_escape(pr.number)}${_el_resume($scope3_id, "d", $sg__input_status_repos)}</a>${_el_resume($scope3_id, "b", $sg__input_status_repos)}`);
|
|
5212
5215
|
_if(() => {
|
|
5213
5216
|
if (open) {
|
|
5214
5217
|
const $scope4_id = _scope_id();
|
|
5215
|
-
_html(`<a${_attr_class(["
|
|
5218
|
+
_html(`<a${_attr_class(["_gx", "_gy"])}${_attr("href", `/w/${input.workspaceId}/review?pr=${encodeURIComponent(`${repo.worktree}/${pr.number}`)}`)}${_attr("title", `Review #${pr.number} changes`)}>`);
|
|
5216
5219
|
icon_diff_default({ size: 12 });
|
|
5217
5220
|
_html(`</a>${_el_resume($scope4_id, "a", _serialize_guard($scope0_reason, 0))}`);
|
|
5218
5221
|
_serialize_if($scope0_reason, 2) && _subscribe($si__input_status_repos && $for_content__repo_worktree__closures, _subscribe($si__input_workspaceId && $input_workspaceId__closures, writeScope($scope4_id, { _: _scope_with_id($scope3_id) })));
|
|
@@ -5220,13 +5223,13 @@ var side_nav_chips_default = _template("s", (input) => {
|
|
|
5220
5223
|
} else {
|
|
5221
5224
|
const $scope6_id = _scope_id();
|
|
5222
5225
|
_html(`<button type=button${_attr_class([
|
|
5223
|
-
"
|
|
5224
|
-
"
|
|
5225
|
-
"
|
|
5226
|
+
"_gx",
|
|
5227
|
+
"_gy",
|
|
5228
|
+
"_gz"
|
|
5226
5229
|
])}${_attr("title", `Dismiss #${pr.number}`)}>`);
|
|
5227
5230
|
icon_xmark_default({ size: 12 });
|
|
5228
5231
|
_html(`</button>${_el_resume($scope6_id, "a")}`);
|
|
5229
|
-
_script($scope6_id, "
|
|
5232
|
+
_script($scope6_id, "t3");
|
|
5230
5233
|
writeScope($scope6_id, { _: _scope_with_id($scope3_id) });
|
|
5231
5234
|
return 1;
|
|
5232
5235
|
}
|
|
@@ -5247,15 +5250,15 @@ var side_nav_chips_default = _template("s", (input) => {
|
|
|
5247
5250
|
}, "full_name", $scope1_id, "b", $sg__input_status_repos, $sg__input_status_repos, $sg__input_status_repos__OR__input_status_ports);
|
|
5248
5251
|
_for_of(ports, (p) => {
|
|
5249
5252
|
const $scope5_id = _scope_id();
|
|
5250
|
-
_html(`<span${_attr_class(["_p", portChip])}${_attr("title", p.cmd)}><button type=button${_attr_class(["
|
|
5251
|
-
"
|
|
5252
|
-
"
|
|
5253
|
-
"
|
|
5253
|
+
_html(`<span${_attr_class(["_p", portChip])}${_attr("title", p.cmd)}><button type=button${_attr_class(["_gx", "_gD"])}${_attr("title", `Open http://${typeof location === "undefined" ? "localhost" : location.hostname}:${p.port}`)}>:${_sep($sg__input_status_ports)}${_escape(p.port)}${_el_resume($scope5_id, "c", $sg__input_status_ports)}</button>${_el_resume($scope5_id, "b")}<button type=button${_attr_class([
|
|
5254
|
+
"_gx",
|
|
5255
|
+
"_gy",
|
|
5256
|
+
"_gz",
|
|
5254
5257
|
{ ["_n"]: armedPid === p.pid }
|
|
5255
5258
|
])}${armedPid === p.pid ? " title=Kill?" : _attr("title", `Kill ${p.cmd} (pid ${p.pid})`)}>`);
|
|
5256
5259
|
icon_xmark_default({ size: 12 });
|
|
5257
5260
|
_html(`</button>${_el_resume($scope5_id, "d")}</span>${_el_resume($scope5_id, "a", $sg__input_status_ports)}`);
|
|
5258
|
-
_script($scope5_id, "
|
|
5261
|
+
_script($scope5_id, "t4");
|
|
5259
5262
|
_subscribe($armedPid__closures, writeScope($scope5_id, {
|
|
5260
5263
|
h: p?.cmd,
|
|
5261
5264
|
i: p?.port,
|
|
@@ -5288,7 +5291,7 @@ var side_nav_chips_default = _template("s", (input) => {
|
|
|
5288
5291
|
});
|
|
5289
5292
|
//#endregion
|
|
5290
5293
|
//#region src/tags/side-nav-item.marko
|
|
5291
|
-
var side_nav_item_default = _template("
|
|
5294
|
+
var side_nav_item_default = _template("u", (input) => {
|
|
5292
5295
|
const $scope0_reason = _scope_reason(), $si__input_workspaces__OR__input_workspaceId = _serialize_if($scope0_reason, 0), $sg__input_workspaceId__OR__input_status = _serialize_guard($scope0_reason, 1), $sg__input_sessions = _serialize_guard($scope0_reason, 22), $si__input_sessions = _serialize_if($scope0_reason, 22), $si__input_workspaceId__OR__input_status__OR__input_sessions__OR__input_page = _serialize_if($scope0_reason, 12), $sg__input_workspaceId__OR__input_status__OR__input_sessions__OR__input_page = _serialize_guard($scope0_reason, 12), $si__input_current = _serialize_if($scope0_reason, 20), $sg__input_page = _serialize_guard($scope0_reason, 24), $sg__input_workspaces__OR__input_workspaceId = _serialize_guard($scope0_reason, 0), $si__input_agents = _serialize_if($scope0_reason, 26), $sg__input_onNewSession = _serialize_guard($scope0_reason, 25), $sg__input_onNewSession__OR__input_onReview = _serialize_guard($scope0_reason, 2), $sg__input_onReview = _serialize_guard($scope0_reason, 27), $sg__input_rail = _serialize_guard($scope0_reason, 19), $si__input_rail = _serialize_if($scope0_reason, 19), $si__input_workspaceId = _serialize_if($scope0_reason, 18), $si__input_workspaces__OR__input_workspaceId__OR__input_rail = _serialize_if($scope0_reason, 3), $si__input_workspaces__OR__input_workspaceId__OR__input_rail__OR__input_current__OR__input_page = _serialize_if($scope0_reason, 13), $si__input_workspaces__OR__input_workspaceId__OR__input_rail__OR__input_page = _serialize_if($scope0_reason, 11), $si__input_index = _serialize_if($scope0_reason, 21), $si__input_onNewSession = _serialize_if($scope0_reason, 25), $si__input_onReview = _serialize_if($scope0_reason, 27), $si__input_managing = _serialize_if($scope0_reason, 28), $si__input_currentTab = _serialize_if($scope0_reason, 29), $si__input_railPop = _serialize_if($scope0_reason, 23), $si__input_page = _serialize_if($scope0_reason, 24);
|
|
5293
5296
|
const $scope0_id = _scope_id();
|
|
5294
5297
|
const $input_current__closures = /* @__PURE__ */ new Set();
|
|
@@ -5315,15 +5318,14 @@ var side_nav_item_default = _template("t", (input) => {
|
|
|
5315
5318
|
armBox.timer = disarmLater(() => {
|
|
5316
5319
|
armedKill = null;
|
|
5317
5320
|
});
|
|
5318
|
-
}, "
|
|
5321
|
+
}, "u1", $scope0_id);
|
|
5319
5322
|
let renamingId = null;
|
|
5320
5323
|
let renameValue = "";
|
|
5321
5324
|
const commitRename = _resume((s) => {
|
|
5322
5325
|
if (renamingId !== s.id) return;
|
|
5323
|
-
const title = renameValue.trim();
|
|
5324
5326
|
renamingId = null;
|
|
5325
|
-
|
|
5326
|
-
}, "
|
|
5327
|
+
input.onRenameSession?.(s, renameValue.trim());
|
|
5328
|
+
}, "u2", $scope0_id);
|
|
5327
5329
|
const ws$1 = input.workspaces.find((w) => w.id === input.workspaceId);
|
|
5328
5330
|
_if(() => {
|
|
5329
5331
|
if (ws$1) {
|
|
@@ -5333,10 +5335,10 @@ var side_nav_item_default = _template("t", (input) => {
|
|
|
5333
5335
|
_if(() => {
|
|
5334
5336
|
if (input.rail) {
|
|
5335
5337
|
const $scope2_id = _scope_id();
|
|
5336
|
-
_html(`<a${_attr("href", `/w/${ws$1.id}`)}${_attr_class([railBtn, { ["
|
|
5338
|
+
_html(`<a${_attr("href", `/w/${ws$1.id}`)}${_attr_class([railBtn, { ["_e0"]: input.current }])}${_attr("title", ws$1.name)}>${_escape((input.index ?? 0) + 1)}${_el_resume($scope2_id, "b", _serialize_guard($scope0_reason, 21))}<span${_attr_class([
|
|
5337
5339
|
"_w",
|
|
5338
5340
|
phase[dot],
|
|
5339
|
-
"
|
|
5341
|
+
"_e3"
|
|
5340
5342
|
])}></span>${_el_resume($scope2_id, "c", $sg__input_workspaceId__OR__input_status)}</a>${_el_resume($scope2_id, "a", _serialize_guard($scope0_reason, 4))}`);
|
|
5341
5343
|
_serialize_if($scope0_reason, 16) && _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) })))));
|
|
5342
5344
|
return 0;
|
|
@@ -5344,15 +5346,15 @@ var side_nav_item_default = _template("t", (input) => {
|
|
|
5344
5346
|
const $scope3_id = _scope_id();
|
|
5345
5347
|
const sessions$1 = input.sessions || [];
|
|
5346
5348
|
const phaseLabel = dot === "working" ? "Working" : dot === "waiting" ? "Needs input" : dot === "idle" ? "Idle" : "Not running";
|
|
5347
|
-
_html(`<section${_attr_class(["
|
|
5348
|
-
["
|
|
5349
|
+
_html(`<section${_attr_class(["_e5", {
|
|
5350
|
+
["_e0"]: input.current,
|
|
5349
5351
|
["_2"]: input.current,
|
|
5350
|
-
["
|
|
5351
|
-
["
|
|
5352
|
-
}])}><div${_attr_class("
|
|
5352
|
+
["_e6"]: input.railPop,
|
|
5353
|
+
["_e4"]: input.page
|
|
5354
|
+
}])}><div${_attr_class("_e7")}><a${_attr("href", `/w/${ws$1.id}`)}${_attr_class("_e8")}><span${_attr_class([
|
|
5353
5355
|
"_w",
|
|
5354
5356
|
phase[dot],
|
|
5355
|
-
"
|
|
5357
|
+
"_fi"
|
|
5356
5358
|
])}${_attr("title", phaseLabel)}></span>${_el_resume($scope3_id, "d", $sg__input_workspaceId__OR__input_status)}`);
|
|
5357
5359
|
_if(() => {
|
|
5358
5360
|
if (sessions$1.length === 1) {
|
|
@@ -5365,7 +5367,7 @@ var side_nav_item_default = _template("t", (input) => {
|
|
|
5365
5367
|
icon_agent_default({
|
|
5366
5368
|
agent: activeAgent(sessions$1[0]),
|
|
5367
5369
|
size: 12,
|
|
5368
|
-
class: "
|
|
5370
|
+
class: "_fc"
|
|
5369
5371
|
});
|
|
5370
5372
|
$si__input_sessions && writeScope($scope12_id, {
|
|
5371
5373
|
_: _scope_with_id($scope3_id),
|
|
@@ -5375,16 +5377,16 @@ var side_nav_item_default = _template("t", (input) => {
|
|
|
5375
5377
|
}
|
|
5376
5378
|
}, $scope3_id, "e", $sg__input_sessions, $sg__input_sessions, $sg__input_workspaceId__OR__input_status__OR__input_sessions__OR__input_page);
|
|
5377
5379
|
const metaText = sessions$1.length === 0 ? phaseLabel : sessions$1.length === 1 ? sessions$1[0].title || "" : `${sessions$1.length} sessions`;
|
|
5378
|
-
_html(`<span${_attr_class("
|
|
5380
|
+
_html(`<span${_attr_class("_fd")}><span${_attr_class("_fe")}>${_escape(ws$1.name)}${_el_resume($scope3_id, "h", $sg__input_workspaces__OR__input_workspaceId)}</span>`);
|
|
5379
5381
|
_if(() => {
|
|
5380
5382
|
if (input.page && metaText) {
|
|
5381
5383
|
const $scope14_id = _scope_id();
|
|
5382
|
-
_html(`<span${_attr_class("
|
|
5384
|
+
_html(`<span${_attr_class("_fg")}>${_escape(metaText)}${_el_resume($scope14_id, "b", _serialize_guard($scope0_reason, 8))}</span>`);
|
|
5383
5385
|
$si__input_workspaceId__OR__input_status__OR__input_sessions__OR__input_page && writeScope($scope14_id, { _: _serialize_if($scope0_reason, 8) && _scope_with_id($scope3_id) });
|
|
5384
5386
|
return 0;
|
|
5385
5387
|
} else if (sessions$1.length === 1 && sessions$1[0].title) {
|
|
5386
5388
|
const $scope13_id = _scope_id();
|
|
5387
|
-
_html(`<span${_attr_class("
|
|
5389
|
+
_html(`<span${_attr_class("_ff")}>${_escape(sessions$1[0].title)}${_el_resume($scope13_id, "b", $sg__input_sessions)}</span>`);
|
|
5388
5390
|
$si__input_workspaceId__OR__input_status__OR__input_sessions__OR__input_page && writeScope($scope13_id, { _: $si__input_sessions && _scope_with_id($scope3_id) });
|
|
5389
5391
|
return 1;
|
|
5390
5392
|
}
|
|
@@ -5397,7 +5399,7 @@ var side_nav_item_default = _template("t", (input) => {
|
|
|
5397
5399
|
"_F",
|
|
5398
5400
|
"_O",
|
|
5399
5401
|
"_H",
|
|
5400
|
-
"
|
|
5402
|
+
"_fh"
|
|
5401
5403
|
])}>${input.current ? "Open" : ""}${_el_resume($scope4_id, "b", _serialize_guard($scope0_reason, 20))}</span>`);
|
|
5402
5404
|
$si__input_workspaces__OR__input_workspaceId__OR__input_rail__OR__input_current__OR__input_page && _subscribe($si__input_current && $input_current__closures, writeScope($scope4_id, {
|
|
5403
5405
|
_: _scope_with_id($scope3_id),
|
|
@@ -5410,7 +5412,7 @@ var side_nav_item_default = _template("t", (input) => {
|
|
|
5410
5412
|
_if(() => {
|
|
5411
5413
|
if (!input.page) {
|
|
5412
5414
|
const $scope5_id = _scope_id();
|
|
5413
|
-
_html(`<div${_attr_class("
|
|
5415
|
+
_html(`<div${_attr_class("_e9")}>`);
|
|
5414
5416
|
_if(() => {
|
|
5415
5417
|
if (input.onNewSession) {
|
|
5416
5418
|
const $scope6_id = _scope_id();
|
|
@@ -5424,7 +5426,7 @@ var side_nav_item_default = _template("t", (input) => {
|
|
|
5424
5426
|
_html(`</button>${_el_resume($scope6_id, "a")}<div${_attr("id", newPopId)} popover=auto${_attr_class(sessionPop)}>`);
|
|
5425
5427
|
_for_of([], (agent) => {
|
|
5426
5428
|
const $scope7_id = _scope_id();
|
|
5427
|
-
_html(`<button${_attr_class("
|
|
5429
|
+
_html(`<button${_attr_class("_eZ")}>`);
|
|
5428
5430
|
_set_serialize_reason(12);
|
|
5429
5431
|
const $childScope2 = _peek_scope_id();
|
|
5430
5432
|
icon_agent_default({
|
|
@@ -5432,13 +5434,13 @@ var side_nav_item_default = _template("t", (input) => {
|
|
|
5432
5434
|
size: 14
|
|
5433
5435
|
});
|
|
5434
5436
|
_html(`<!>${_escape(agent)}${_el_resume($scope7_id, "c")}</button>${_el_resume($scope7_id, "a")}`);
|
|
5435
|
-
_script($scope7_id, "
|
|
5437
|
+
_script($scope7_id, "u3");
|
|
5436
5438
|
writeScope($scope7_id, {
|
|
5437
5439
|
e: agent,
|
|
5438
5440
|
b: _existing_scope($childScope2)
|
|
5439
5441
|
});
|
|
5440
5442
|
}, (a) => a, $scope6_id, "c", 1, 1, 1, "</div>", 1);
|
|
5441
|
-
_script($scope6_id, "
|
|
5443
|
+
_script($scope6_id, "u4");
|
|
5442
5444
|
_subscribe($si__input_agents && $input_agents__closures, writeScope($scope6_id, {
|
|
5443
5445
|
e: $si__input_agents && pickerReady,
|
|
5444
5446
|
_: _scope_with_id($scope5_id)
|
|
@@ -5459,7 +5461,7 @@ var side_nav_item_default = _template("t", (input) => {
|
|
|
5459
5461
|
return 0;
|
|
5460
5462
|
}
|
|
5461
5463
|
}, $scope5_id, "c", $sg__input_onReview, $sg__input_onReview, $sg__input_onNewSession__OR__input_onReview, 0, 1);
|
|
5462
|
-
_html(`<a${_attr("href", `/w/${ws$1.id}/manage`)}${_attr_class([rowIcon, { ["
|
|
5464
|
+
_html(`<a${_attr("href", `/w/${ws$1.id}/manage`)}${_attr_class([rowIcon, { ["_e1"]: input.managing }])} title="Manage workspace"${input.managing ? " aria-current=page" : ""}>`);
|
|
5463
5465
|
icon_manage_default({ size: 12 });
|
|
5464
5466
|
_html(`</a>${_el_resume($scope5_id, "d", _serialize_guard($scope0_reason, 6))}</div>`);
|
|
5465
5467
|
_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, {
|
|
@@ -5469,17 +5471,17 @@ var side_nav_item_default = _template("t", (input) => {
|
|
|
5469
5471
|
return 0;
|
|
5470
5472
|
}
|
|
5471
5473
|
}, $scope3_id, "k", $sg__input_page, $sg__input_page, $sg__input_workspaceId__OR__input_status__OR__input_sessions__OR__input_page, 0, 1);
|
|
5472
|
-
_html(`</div><div${_attr_class("
|
|
5474
|
+
_html(`</div><div${_attr_class("_fn")}>`);
|
|
5473
5475
|
_for_of(sessions$1.length > 1 ? sessions$1 : [], (s) => {
|
|
5474
5476
|
const $scope8_id = _scope_id();
|
|
5475
|
-
_html(`<div${_attr_class(["
|
|
5477
|
+
_html(`<div${_attr_class(["_e_", { ["_e0"]: s.id === input.currentTab }])}>`);
|
|
5476
5478
|
_if(() => {
|
|
5477
5479
|
if (renamingId === s.id) {
|
|
5478
5480
|
const $scope10_id = _scope_id();
|
|
5479
5481
|
_html(`<span${_attr_class([
|
|
5480
5482
|
"_w",
|
|
5481
5483
|
phase[sessionPhase(s.state)],
|
|
5482
|
-
"
|
|
5484
|
+
"_fl"
|
|
5483
5485
|
])}></span>${_el_resume($scope10_id, "a", $sg__input_sessions)}`);
|
|
5484
5486
|
_set_serialize_reason({
|
|
5485
5487
|
1: $sg__input_sessions,
|
|
@@ -5489,17 +5491,17 @@ var side_nav_item_default = _template("t", (input) => {
|
|
|
5489
5491
|
icon_agent_default({
|
|
5490
5492
|
agent: activeAgent(s),
|
|
5491
5493
|
size: 13,
|
|
5492
|
-
class: "
|
|
5494
|
+
class: "_fp"
|
|
5493
5495
|
});
|
|
5494
5496
|
_html(`<input${_attr_input_value($scope10_id, "c", renameValue, _resume((_new_renameValue) => {
|
|
5495
5497
|
renameValue = _new_renameValue;
|
|
5496
|
-
}, "
|
|
5497
|
-
_script($scope10_id, "
|
|
5498
|
+
}, "u0", $scope10_id))}${_attr_class(["_R", "_fm"])} aria-label="Session name">${_el_resume($scope10_id, "c")}`);
|
|
5499
|
+
_script($scope10_id, "u5");
|
|
5498
5500
|
_subscribe($renameValue__closures, writeScope($scope10_id, { b: $si__input_sessions && _existing_scope($childScope3) }));
|
|
5499
5501
|
return 0;
|
|
5500
5502
|
} else {
|
|
5501
5503
|
const $scope9_id = _scope_id();
|
|
5502
|
-
_html(`<a${_attr("href", `/w/${ws$1.id}?s=${s.id}`)}${_attr_class("
|
|
5504
|
+
_html(`<a${_attr("href", `/w/${ws$1.id}?s=${s.id}`)}${_attr_class("_fo")}><span${_attr_class(["_w", phase[sessionPhase(s.state)]])}></span>${_el_resume($scope9_id, "b", $sg__input_sessions)}`);
|
|
5503
5505
|
_set_serialize_reason({
|
|
5504
5506
|
1: $sg__input_sessions,
|
|
5505
5507
|
2: $sg__input_sessions
|
|
@@ -5508,14 +5510,14 @@ var side_nav_item_default = _template("t", (input) => {
|
|
|
5508
5510
|
icon_agent_default({
|
|
5509
5511
|
agent: activeAgent(s),
|
|
5510
5512
|
size: 13,
|
|
5511
|
-
class: "
|
|
5513
|
+
class: "_fp"
|
|
5512
5514
|
});
|
|
5513
|
-
_html(`<span${_attr_class("
|
|
5515
|
+
_html(`<span${_attr_class("_fj")}>${_escape(s.title || activeAgent(s))}${_el_resume($scope9_id, "e", $sg__input_sessions)}</span></a>${_el_resume($scope9_id, "a", _serialize_guard($scope0_reason, 5))}<div${_attr_class("_fk")}><button${_attr_class(rowIcon)} title="Rename session">`);
|
|
5514
5516
|
icon_edit_default({ size: 12 });
|
|
5515
5517
|
_html(`</button>${_el_resume($scope9_id, "g")}<button${_attr_class([close, { ["_n"]: armedKill === s.id }])} title=${armedKill === s.id ? "Close?" : "\"Close session\""}>`);
|
|
5516
5518
|
icon_xmark_default({ size: 12 });
|
|
5517
5519
|
_html(`</button>${_el_resume($scope9_id, "i")}</div>`);
|
|
5518
|
-
_script($scope9_id, "
|
|
5520
|
+
_script($scope9_id, "u6");
|
|
5519
5521
|
_subscribe($si__input_workspaces__OR__input_workspaceId && $ws_id__closures, _subscribe($armedKill__closures, writeScope($scope9_id, {
|
|
5520
5522
|
c: $si__input_sessions && _existing_scope($childScope4),
|
|
5521
5523
|
Cam: $si__input_workspaces__OR__input_workspaceId && 3
|
|
@@ -5546,7 +5548,7 @@ var side_nav_item_default = _template("t", (input) => {
|
|
|
5546
5548
|
status: st
|
|
5547
5549
|
});
|
|
5548
5550
|
_html(`</div></section>${_el_resume($scope3_id, "a")}`);
|
|
5549
|
-
_script($scope3_id, "
|
|
5551
|
+
_script($scope3_id, "u7");
|
|
5550
5552
|
_subscribe($si__input_workspaces__OR__input_workspaceId && $ws_name__closures, _subscribe($si__input_workspaces__OR__input_workspaceId && $ws_id__closures, _subscribe($si__input_page && $input_page__closures, _subscribe($si__input_railPop && $input_railPop__closures, _subscribe($si__input_sessions && $input_sessions__closures, _subscribe($si__input_current && $input_current__closures, _subscribe($si__input_workspaceId && $input_workspaceId__closures, writeScope($scope3_id, {
|
|
5551
5553
|
p: $si__input_workspaceId__OR__input_status__OR__input_sessions__OR__input_page && sessions$1.length,
|
|
5552
5554
|
q: $si__input_sessions && sessions$1[0],
|
|
@@ -5617,7 +5619,7 @@ var side_nav_item_default = _template("t", (input) => {
|
|
|
5617
5619
|
});
|
|
5618
5620
|
//#endregion
|
|
5619
5621
|
//#region src/tags/icons/icon-folder-plus.marko
|
|
5620
|
-
var icon_folder_plus_default = _template("
|
|
5622
|
+
var icon_folder_plus_default = _template("L", (input) => {
|
|
5621
5623
|
const $scope0_reason = _scope_reason(), $sg__input_size__OR__input_class = _serialize_guard($scope0_reason, 0);
|
|
5622
5624
|
const $scope0_id = _scope_id();
|
|
5623
5625
|
_set_serialize_reason({
|
|
@@ -5634,7 +5636,7 @@ var icon_folder_plus_default = _template("J", (input) => {
|
|
|
5634
5636
|
});
|
|
5635
5637
|
//#endregion
|
|
5636
5638
|
//#region src/tags/icons/icon-sidebar-collapse.marko
|
|
5637
|
-
var icon_sidebar_collapse_default = _template("
|
|
5639
|
+
var icon_sidebar_collapse_default = _template("T", (input) => {
|
|
5638
5640
|
const $scope0_reason = _scope_reason(), $sg__input_size__OR__input_class = _serialize_guard($scope0_reason, 0);
|
|
5639
5641
|
const $scope0_id = _scope_id();
|
|
5640
5642
|
_set_serialize_reason({
|
|
@@ -5651,7 +5653,7 @@ var icon_sidebar_collapse_default = _template("R", (input) => {
|
|
|
5651
5653
|
});
|
|
5652
5654
|
//#endregion
|
|
5653
5655
|
//#region src/tags/side-nav.marko
|
|
5654
|
-
var side_nav_default = _template("
|
|
5656
|
+
var side_nav_default = _template("v", (input) => {
|
|
5655
5657
|
const $scope0_reason = _scope_reason(), $sg__input_setupReady = _serialize_guard($scope0_reason, 9), $sg__input_workspace__OR__input_allWorkspaces = _serialize_guard($scope0_reason, 0), $sg__input_workspace__OR__input_allWorkspaces__OR__input_allStatus = _serialize_guard($scope0_reason, 1), $sg__input_agents = _serialize_guard($scope0_reason, 11), $si__input_workspace = _serialize_if($scope0_reason, 2), $si__input_workspace__OR__input_allWorkspaces = _serialize_if($scope0_reason, 0), $si__input_allStatus = _serialize_if($scope0_reason, 8), $si__input_setupReady = _serialize_if($scope0_reason, 9), $si__input_onSelectWorkspace = _serialize_if($scope0_reason, 10), $si__input_agents = _serialize_if($scope0_reason, 11), $si__input_onNewSession = _serialize_if($scope0_reason, 12), $si__input_onReviewOpened = _serialize_if($scope0_reason, 13), $si__input_sessions = _serialize_if($scope0_reason, 14), $si__input_onRenameSession = _serialize_if($scope0_reason, 15), $si__input_onCloseSession = _serialize_if($scope0_reason, 16);
|
|
5656
5658
|
const $scope0_id = _scope_id();
|
|
5657
5659
|
const $notifyOn__closures = /* @__PURE__ */ new Set();
|
|
@@ -5675,7 +5677,7 @@ var side_nav_default = _template("u", (input) => {
|
|
|
5675
5677
|
let canPush = false;
|
|
5676
5678
|
const leaveNav = _resume(() => {
|
|
5677
5679
|
if (view === "nav") view = "term";
|
|
5678
|
-
}, "
|
|
5680
|
+
}, "v0", $scope0_id);
|
|
5679
5681
|
const toggleNotify = _resume(async () => {
|
|
5680
5682
|
try {
|
|
5681
5683
|
if (notifyOn) {
|
|
@@ -5689,7 +5691,7 @@ var side_nav_default = _template("u", (input) => {
|
|
|
5689
5691
|
notifyOn = false;
|
|
5690
5692
|
input.onError?.(`Notifications failed: ${String(err.message || err)}`);
|
|
5691
5693
|
}
|
|
5692
|
-
}, "
|
|
5694
|
+
}, "v1", $scope0_id);
|
|
5693
5695
|
const itemIds = input.allWorkspaces?.length ? input.allWorkspaces.filter((w) => w.status === "active").map((w) => w.id) : [ws.id];
|
|
5694
5696
|
const workspaces = input.allWorkspaces || [ws];
|
|
5695
5697
|
const allStatus = input.allStatus || {};
|
|
@@ -5697,25 +5699,25 @@ var side_nav_default = _template("u", (input) => {
|
|
|
5697
5699
|
const isPage = view === "nav";
|
|
5698
5700
|
const otherIds = itemIds.filter((id) => id !== ws.id);
|
|
5699
5701
|
const listIds = isPage ? [ws.id, ...otherIds] : itemIds;
|
|
5700
|
-
_html(`<aside${_attr_class(["
|
|
5701
|
-
["
|
|
5702
|
-
["
|
|
5702
|
+
_html(`<aside${_attr_class(["_c_", {
|
|
5703
|
+
["_c8"]: !navOpen,
|
|
5704
|
+
["_c9"]: isPage
|
|
5703
5705
|
}])}${_attr("hidden", view === "diff")}>`);
|
|
5704
5706
|
_if(() => {
|
|
5705
5707
|
if (isPage) {
|
|
5706
5708
|
const $scope1_id = _scope_id();
|
|
5707
|
-
_html(`<header${_attr_class("
|
|
5709
|
+
_html(`<header${_attr_class("_dc")}><h1${_attr_class("_dd")}>Workspaces</h1><div${_attr_class("_de")}>`);
|
|
5708
5710
|
_if(() => {}, $scope1_id, "d", 1, 1, 1, 0, 1);
|
|
5709
5711
|
_html(`<a href=/settings${_attr_class([
|
|
5710
5712
|
iconBtn$1,
|
|
5711
|
-
"
|
|
5712
|
-
{ ["
|
|
5713
|
+
"_df",
|
|
5714
|
+
{ ["_c5"]: view === "settings" }
|
|
5713
5715
|
])} title=Settings${view === "settings" ? " aria-current=page" : ""}>`);
|
|
5714
5716
|
icon_settings_default({ size: 16 });
|
|
5715
5717
|
_if(() => {
|
|
5716
5718
|
if (input.setupReady === false) {
|
|
5717
5719
|
const $scope10_id = _scope_id();
|
|
5718
|
-
_html(`<span${_attr_class(["_w", "
|
|
5720
|
+
_html(`<span${_attr_class(["_w", "_c7"])} title="Machine setup incomplete"></span>`);
|
|
5719
5721
|
$si__input_setupReady && writeScope($scope10_id, {});
|
|
5720
5722
|
return 0;
|
|
5721
5723
|
}
|
|
@@ -5725,13 +5727,13 @@ var side_nav_default = _template("u", (input) => {
|
|
|
5725
5727
|
return 0;
|
|
5726
5728
|
}
|
|
5727
5729
|
}, $scope0_id, "b", 1, 1, 1, 0, 1);
|
|
5728
|
-
_html(`<div${_attr_class("
|
|
5730
|
+
_html(`<div${_attr_class("_di")}>`);
|
|
5729
5731
|
_for_of(listIds, (wsId) => {
|
|
5730
5732
|
const $scope2_id = _scope_id();
|
|
5731
5733
|
_if(() => {
|
|
5732
5734
|
if (isPage && wsId === ws.id) {
|
|
5733
5735
|
const $scope11_id = _scope_id();
|
|
5734
|
-
_html(`<h2${_attr_class(["_bE", "
|
|
5736
|
+
_html(`<h2${_attr_class(["_bE", "_dg"])}>Current</h2>`);
|
|
5735
5737
|
writeScope($scope11_id, {});
|
|
5736
5738
|
return 0;
|
|
5737
5739
|
}
|
|
@@ -5739,7 +5741,7 @@ var side_nav_default = _template("u", (input) => {
|
|
|
5739
5741
|
_if(() => {
|
|
5740
5742
|
if (isPage && wsId !== ws.id && wsId === otherIds[0]) {
|
|
5741
5743
|
const $scope12_id = _scope_id();
|
|
5742
|
-
_html(`<h2${_attr_class(["_bE", "
|
|
5744
|
+
_html(`<h2${_attr_class(["_bE", "_dg"])}>Other workspaces</h2>`);
|
|
5743
5745
|
writeScope($scope12_id, {});
|
|
5744
5746
|
return 0;
|
|
5745
5747
|
}
|
|
@@ -5786,12 +5788,12 @@ var side_nav_default = _template("u", (input) => {
|
|
|
5786
5788
|
leaveNav();
|
|
5787
5789
|
input.onSelectWorkspace?.(wsId);
|
|
5788
5790
|
} else if (view === "nav" || view === "manage" || view === "settings" || view === "new") view = "term";
|
|
5789
|
-
}, "
|
|
5791
|
+
}, "v2", $scope2_id),
|
|
5790
5792
|
agents: input.agents,
|
|
5791
5793
|
onNewSession: _resume(function(agent) {
|
|
5792
5794
|
leaveNav();
|
|
5793
5795
|
input.onNewSession(wsId, agent);
|
|
5794
|
-
}, "
|
|
5796
|
+
}, "v3", $scope2_id),
|
|
5795
5797
|
onReview: _resume(function() {
|
|
5796
5798
|
if (wsId === ws.id) {
|
|
5797
5799
|
if (view === "diff") view = "term";
|
|
@@ -5800,7 +5802,7 @@ var side_nav_default = _template("u", (input) => {
|
|
|
5800
5802
|
requestDiff(wsId);
|
|
5801
5803
|
input.onSelectWorkspace?.(wsId);
|
|
5802
5804
|
}
|
|
5803
|
-
}, "
|
|
5805
|
+
}, "v4", $scope2_id),
|
|
5804
5806
|
sessions: wsId === ws.id && input.sessions ? input.sessions : allStatus[wsId]?.sessions || [],
|
|
5805
5807
|
currentTab: wsId === ws.id && view === "term" ? tab : null,
|
|
5806
5808
|
onRenameSession: input.onRenameSession,
|
|
@@ -5816,14 +5818,14 @@ var side_nav_default = _template("u", (input) => {
|
|
|
5816
5818
|
const $scope3_id = _scope_id();
|
|
5817
5819
|
let railHover = null;
|
|
5818
5820
|
const railHoverBox = { timer: 0 };
|
|
5819
|
-
const railKeep = _resume(() => clearTimeout(railHoverBox.timer), "
|
|
5821
|
+
const railKeep = _resume(() => clearTimeout(railHoverBox.timer), "v5", $scope3_id);
|
|
5820
5822
|
const railHide = _resume(() => {
|
|
5821
5823
|
clearTimeout(railHoverBox.timer);
|
|
5822
5824
|
railHoverBox.timer = setTimeout(() => {
|
|
5823
5825
|
railHover = null;
|
|
5824
5826
|
}, 150);
|
|
5825
|
-
}, "
|
|
5826
|
-
_html(`<div${_attr_class("
|
|
5827
|
+
}, "v6", $scope3_id);
|
|
5828
|
+
_html(`<div${_attr_class("_dj")}>`);
|
|
5827
5829
|
_for_of(itemIds, (wsId, i) => {
|
|
5828
5830
|
const $scope4_id = _scope_id();
|
|
5829
5831
|
_html("<span>");
|
|
@@ -5860,10 +5862,10 @@ var side_nav_default = _template("u", (input) => {
|
|
|
5860
5862
|
onSelect: _resume(function() {
|
|
5861
5863
|
if (wsId !== ws.id) input.onSelectWorkspace?.(wsId);
|
|
5862
5864
|
else if (view === "manage" || view === "settings" || view === "new") view = "term";
|
|
5863
|
-
}, "
|
|
5865
|
+
}, "v7", $scope4_id)
|
|
5864
5866
|
});
|
|
5865
5867
|
_html(`</span>${_el_resume($scope4_id, "a")}`);
|
|
5866
|
-
_script($scope4_id, "
|
|
5868
|
+
_script($scope4_id, "v12");
|
|
5867
5869
|
_subscribe($si__input_allStatus && $allStatus__closures, _subscribe($si__input_workspace__OR__input_allWorkspaces && $workspaces__closures, _subscribe($si__input_workspace && $ws_id__closures, writeScope($scope4_id, {
|
|
5868
5870
|
d: wsId,
|
|
5869
5871
|
_: _scope_with_id($scope3_id),
|
|
@@ -5874,7 +5876,7 @@ var side_nav_default = _template("u", (input) => {
|
|
|
5874
5876
|
if (railHover) {
|
|
5875
5877
|
const $scope5_id = _scope_id();
|
|
5876
5878
|
const hoverId = railHover.id;
|
|
5877
|
-
_html(`<div${_attr_class(["_1", "
|
|
5879
|
+
_html(`<div${_attr_class(["_1", "_dm"])}${_attr_style(`top:${railHover.top}px;left:${railHover.left}px`)}>`);
|
|
5878
5880
|
_set_serialize_reason({
|
|
5879
5881
|
0: 1,
|
|
5880
5882
|
1: 1,
|
|
@@ -5915,12 +5917,12 @@ var side_nav_default = _template("u", (input) => {
|
|
|
5915
5917
|
railHover = null;
|
|
5916
5918
|
if (hoverId !== ws.id) input.onSelectWorkspace?.(hoverId);
|
|
5917
5919
|
else if (view === "manage" || view === "settings" || view === "new") view = "term";
|
|
5918
|
-
}, "
|
|
5920
|
+
}, "v8", $scope5_id),
|
|
5919
5921
|
agents: input.agents,
|
|
5920
5922
|
onNewSession: _resume(function(agent) {
|
|
5921
5923
|
railHover = null;
|
|
5922
5924
|
input.onNewSession(hoverId, agent);
|
|
5923
|
-
}, "
|
|
5925
|
+
}, "v9", $scope5_id),
|
|
5924
5926
|
onReview: _resume(function() {
|
|
5925
5927
|
railHover = null;
|
|
5926
5928
|
if (hoverId === ws.id) {
|
|
@@ -5930,14 +5932,14 @@ var side_nav_default = _template("u", (input) => {
|
|
|
5930
5932
|
requestDiff(hoverId);
|
|
5931
5933
|
input.onSelectWorkspace?.(hoverId);
|
|
5932
5934
|
}
|
|
5933
|
-
}, "
|
|
5935
|
+
}, "v10", $scope5_id),
|
|
5934
5936
|
sessions: hoverId === ws.id && input.sessions ? input.sessions : allStatus[hoverId]?.sessions || [],
|
|
5935
5937
|
currentTab: hoverId === ws.id && view === "term" ? tab : null,
|
|
5936
5938
|
onRenameSession: input.onRenameSession,
|
|
5937
5939
|
onCloseSession: input.onCloseSession
|
|
5938
5940
|
});
|
|
5939
5941
|
_html(`</div>${_el_resume($scope5_id, "a")}`);
|
|
5940
|
-
_script($scope5_id, "
|
|
5942
|
+
_script($scope5_id, "v13");
|
|
5941
5943
|
_subscribe($si__input_allStatus && $allStatus__closures, _subscribe($si__input_workspace__OR__input_allWorkspaces && $workspaces__closures, _subscribe($view__closures, _subscribe($tab__closures, _subscribe($si__input_workspace && $ws_id__closures, _subscribe($si__input_onCloseSession && $input_onCloseSession__closures, _subscribe($si__input_onRenameSession && $input_onRenameSession__closures, _subscribe($si__input_sessions && $input_sessions__closures, _subscribe($si__input_onReviewOpened && $input_onReviewOpened__closures, _subscribe($si__input_onNewSession && $input_onNewSession__closures, _subscribe($si__input_agents && $input_agents__closures, _subscribe($si__input_onSelectWorkspace && $input_onSelectWorkspace__closures, writeScope($scope5_id, {
|
|
5942
5944
|
c: hoverId,
|
|
5943
5945
|
b: _existing_scope($childScope3),
|
|
@@ -5959,7 +5961,7 @@ var side_nav_default = _template("u", (input) => {
|
|
|
5959
5961
|
return 0;
|
|
5960
5962
|
}
|
|
5961
5963
|
}, $scope0_id, "d");
|
|
5962
|
-
_html(`<div${_attr_class("
|
|
5964
|
+
_html(`<div${_attr_class("_dk")}>`);
|
|
5963
5965
|
_if(() => {
|
|
5964
5966
|
if (isPage) {
|
|
5965
5967
|
const $scope7_id = _scope_id();
|
|
@@ -5967,7 +5969,7 @@ var side_nav_default = _template("u", (input) => {
|
|
|
5967
5969
|
"_l",
|
|
5968
5970
|
"_m",
|
|
5969
5971
|
btnLg,
|
|
5970
|
-
"
|
|
5972
|
+
"_dh"
|
|
5971
5973
|
])} title="New workspace"${view === "new" ? " aria-current=page" : ""}>`);
|
|
5972
5974
|
icon_folder_plus_default({ size: 16 });
|
|
5973
5975
|
_html(` New workspace</a>${_el_resume($scope7_id, "a")}`);
|
|
@@ -5989,29 +5991,29 @@ var side_nav_default = _template("u", (input) => {
|
|
|
5989
5991
|
return 1;
|
|
5990
5992
|
}
|
|
5991
5993
|
}, $scope6_id, "a", 1, 1, 1, "</button>", 1);
|
|
5992
|
-
_html(`<div${_attr_class(["_v", "
|
|
5994
|
+
_html(`<div${_attr_class(["_v", "_dl"])}></div>`);
|
|
5993
5995
|
_if(() => {}, $scope6_id, "c", 1, 1, 1, 0, 1);
|
|
5994
|
-
_html(`<a href=/settings${_attr_class([iconBtn$1, { ["
|
|
5996
|
+
_html(`<a href=/settings${_attr_class([iconBtn$1, { ["_c5"]: view === "settings" }])} title=Settings${view === "settings" ? " aria-current=page" : ""}>`);
|
|
5995
5997
|
icon_settings_default({ size: 15 });
|
|
5996
5998
|
_if(() => {
|
|
5997
5999
|
if (input.setupReady === false) {
|
|
5998
6000
|
const $scope15_id = _scope_id();
|
|
5999
|
-
_html(`<span${_attr_class(["_w", "
|
|
6001
|
+
_html(`<span${_attr_class(["_w", "_c7"])} title="Machine setup incomplete"></span>`);
|
|
6000
6002
|
$si__input_setupReady && writeScope($scope15_id, {});
|
|
6001
6003
|
return 0;
|
|
6002
6004
|
}
|
|
6003
6005
|
}, $scope6_id, "f", $sg__input_setupReady, $sg__input_setupReady, 1, 0, 1);
|
|
6004
|
-
_html(`</a>${_el_resume($scope6_id, "d")}<a href=/new${_attr_class([iconBtn$1, { ["
|
|
6006
|
+
_html(`</a>${_el_resume($scope6_id, "d")}<a href=/new${_attr_class([iconBtn$1, { ["_c5"]: view === "new" }])} title="New workspace"${view === "new" ? " aria-current=page" : ""}>`);
|
|
6005
6007
|
icon_folder_plus_default({ size: 16 });
|
|
6006
6008
|
_html(`</a>${_el_resume($scope6_id, "g")}`);
|
|
6007
|
-
_script($scope6_id, "
|
|
6009
|
+
_script($scope6_id, "v15");
|
|
6008
6010
|
writeScope($scope6_id, {});
|
|
6009
6011
|
return 1;
|
|
6010
6012
|
}
|
|
6011
6013
|
}, $scope0_id, "e", 1, 1, 1, "</div>");
|
|
6012
6014
|
_html(`</aside>${_el_resume($scope0_id, "a")}`);
|
|
6013
|
-
_script($scope0_id, "
|
|
6014
|
-
_script($scope0_id, "
|
|
6015
|
+
_script($scope0_id, "v16");
|
|
6016
|
+
_script($scope0_id, "v17");
|
|
6015
6017
|
writeScope($scope0_id, {
|
|
6016
6018
|
i: _serialize_if($scope0_reason, 4) && input.tab,
|
|
6017
6019
|
j: _serialize_if($scope0_reason, 3) && input.tabChange,
|
|
@@ -6063,10 +6065,10 @@ var side_nav_default = _template("u", (input) => {
|
|
|
6063
6065
|
});
|
|
6064
6066
|
var iconBtn = "_X _g";
|
|
6065
6067
|
var sectionCount = "_br _F _G";
|
|
6066
|
-
var content = "
|
|
6067
|
-
var pageMeta = "
|
|
6068
|
-
var pathMeta = "
|
|
6069
|
-
var dangerHint = "
|
|
6068
|
+
var content = "_dn _bh";
|
|
6069
|
+
var pageMeta = "_do _bm";
|
|
6070
|
+
var pathMeta = "_dr _u";
|
|
6071
|
+
var dangerHint = "_dx _P";
|
|
6070
6072
|
//#endregion
|
|
6071
6073
|
//#region src/tags/manage-workspace.marko
|
|
6072
6074
|
var api$2;
|
|
@@ -6177,7 +6179,7 @@ var manage_workspace_default = _template("l", (input) => {
|
|
|
6177
6179
|
meta: attrTag({ content: _content_resume("l11", () => {
|
|
6178
6180
|
_scope_reason();
|
|
6179
6181
|
const $scope8_id = _scope_id();
|
|
6180
|
-
_html(`<span${_attr_class(pageMeta)}${_attr("title", ws.display_path || ws.path)}><span${_attr_class("
|
|
6182
|
+
_html(`<span${_attr_class(pageMeta)}${_attr("title", ws.display_path || ws.path)}><span${_attr_class("_dp")}>${_escape(ws.name)}${_el_resume($scope8_id, "c")}</span>`);
|
|
6181
6183
|
_if(() => {
|
|
6182
6184
|
if (ws.status !== "active") {
|
|
6183
6185
|
const $scope11_id = _scope_id();
|
|
@@ -6186,7 +6188,7 @@ var manage_workspace_default = _template("l", (input) => {
|
|
|
6186
6188
|
return 0;
|
|
6187
6189
|
}
|
|
6188
6190
|
}, $scope8_id, "d", 1, 1, 1, 0, 1);
|
|
6189
|
-
_html(`<span${_attr_class("
|
|
6191
|
+
_html(`<span${_attr_class("_dq")} 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")}`);
|
|
6190
6192
|
_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) })))));
|
|
6191
6193
|
_resume_branch($scope8_id);
|
|
6192
6194
|
}, $scope0_id) })
|
|
@@ -6229,7 +6231,7 @@ var manage_workspace_default = _template("l", (input) => {
|
|
|
6229
6231
|
_html(`</button>${_el_resume($scope0_id, "m")}</div><ul${_attr_class("_bs")}>`);
|
|
6230
6232
|
_for_of(ws.repos, (row) => {
|
|
6231
6233
|
const $scope1_id = _scope_id();
|
|
6232
|
-
_html(`<li${_attr_class("_bu")}><div${_attr_class("_bv")}><span${_attr_class(["_bw", "_u"])}>${_escape(row.worktree)}${_el_resume($scope1_id, "d")}/</span><span${_attr_class("_bx")}><a${_attr_class(["_by", "
|
|
6234
|
+
_html(`<li${_attr_class("_bu")}><div${_attr_class("_bv")}><span${_attr_class(["_bw", "_u"])}>${_escape(row.worktree)}${_el_resume($scope1_id, "d")}/</span><span${_attr_class("_bx")}><a${_attr_class(["_by", "_dt"])}${_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")}`);
|
|
6233
6235
|
_if(() => {
|
|
6234
6236
|
if (row.base_branch !== row.default_branch) {
|
|
6235
6237
|
const $scope12_id = _scope_id();
|
|
@@ -6293,7 +6295,7 @@ var manage_workspace_default = _template("l", (input) => {
|
|
|
6293
6295
|
return 0;
|
|
6294
6296
|
}
|
|
6295
6297
|
}, $scope0_id, "r", 1, 1, 1, 0, 1);
|
|
6296
|
-
_html(`<div${_attr_class("
|
|
6298
|
+
_html(`<div${_attr_class("_ds")}>`);
|
|
6297
6299
|
const $childScope3 = _peek_scope_id();
|
|
6298
6300
|
let refreshCatalog = repo_picker_default({
|
|
6299
6301
|
exclude: inWorkspace,
|
|
@@ -6323,7 +6325,7 @@ var manage_workspace_default = _template("l", (input) => {
|
|
|
6323
6325
|
_html(`<span${_attr_class("_bx")}>`);
|
|
6324
6326
|
_for_of(p.ports, (port) => {
|
|
6325
6327
|
const $scope19_id = _scope_id();
|
|
6326
|
-
_html(`<button${_attr_class(["_p", "
|
|
6328
|
+
_html(`<button${_attr_class(["_p", "_du"])}${_attr("title", `Open http://${typeof location === "undefined" ? "localhost" : location.hostname}:${port}`)}>:<!>${_escape(port)}${_el_resume($scope19_id, "b")}</button>${_el_resume($scope19_id, "a")}`);
|
|
6327
6329
|
_script($scope19_id, "l15");
|
|
6328
6330
|
writeScope($scope19_id, { d: port });
|
|
6329
6331
|
}, (x) => String(x), $scope18_id, "a", 1, 1, 1, "</span>", 1);
|
|
@@ -6345,7 +6347,7 @@ var manage_workspace_default = _template("l", (input) => {
|
|
|
6345
6347
|
return 0;
|
|
6346
6348
|
}
|
|
6347
6349
|
}, $scope0_id, "v", 1, 1, 1, 0, 1);
|
|
6348
|
-
_html(`<section${_attr_class(["_bp", "
|
|
6350
|
+
_html(`<section${_attr_class(["_bp", "_dv"])}><div${_attr_class("_bq")}><h2${_attr_class("_bE")}>Workspace</h2></div><div${_attr_class("_dw")}>`);
|
|
6349
6351
|
_if(() => {
|
|
6350
6352
|
if (ws.status === "active") {
|
|
6351
6353
|
const $scope4_id = _scope_id();
|
|
@@ -6412,7 +6414,7 @@ var manage_workspace_default = _template("l", (input) => {
|
|
|
6412
6414
|
});
|
|
6413
6415
|
//#endregion
|
|
6414
6416
|
//#region src/tags/term-find.marko
|
|
6415
|
-
var term_find_default = _template("
|
|
6417
|
+
var term_find_default = _template("w", (input) => {
|
|
6416
6418
|
const $scope0_reason = _scope_reason();
|
|
6417
6419
|
const $scope0_id = _scope_id();
|
|
6418
6420
|
let open = input.open;
|
|
@@ -6429,37 +6431,37 @@ var term_find_default = _template("v", (input) => {
|
|
|
6429
6431
|
if (!live.open) return;
|
|
6430
6432
|
const search = input.onSearch;
|
|
6431
6433
|
if (search) search(live.query, dir);
|
|
6432
|
-
}, "
|
|
6434
|
+
}, "w1", $scope0_id);
|
|
6433
6435
|
const close = _resume(() => {
|
|
6434
6436
|
open = false;
|
|
6435
6437
|
live.open = false;
|
|
6436
6438
|
const clear = input.onClear;
|
|
6437
6439
|
if (clear) clear();
|
|
6438
|
-
}, "
|
|
6440
|
+
}, "w2", $scope0_id);
|
|
6439
6441
|
const focusInput = _resume(() => {
|
|
6440
6442
|
const el = ((findEl) => findEl())(_el_read_error);
|
|
6441
6443
|
if (!el) return;
|
|
6442
6444
|
el.focus();
|
|
6443
6445
|
if (document.activeElement !== el) setTimeout(() => el.focus(), 0);
|
|
6444
|
-
}, "
|
|
6446
|
+
}, "w3", $scope0_id);
|
|
6445
6447
|
const hasQuery = !!query.trim();
|
|
6446
6448
|
const canStep = hasQuery && open;
|
|
6447
6449
|
const keybar = input.placement === "keybar";
|
|
6448
6450
|
_html(`<div${_attr_class([
|
|
6449
|
-
"
|
|
6450
|
-
keybar ? "
|
|
6451
|
-
!open && "
|
|
6452
|
-
])} aria-hidden=${open ? "false" : "true"}><div${_attr_class(["
|
|
6451
|
+
"_eR",
|
|
6452
|
+
keybar ? "_eT" : "_eS",
|
|
6453
|
+
!open && "_eV"
|
|
6454
|
+
])} aria-hidden=${open ? "false" : "true"}><div${_attr_class(["_eM", keybar ? "_eU" : "_eO"])}><input${_attr_input_value($scope0_id, "c", query, _resume(function(v) {
|
|
6453
6455
|
if (!open) return;
|
|
6454
6456
|
query = v;
|
|
6455
6457
|
live.query = v;
|
|
6456
6458
|
run(0);
|
|
6457
|
-
}, "
|
|
6459
|
+
}, "w0", $scope0_id))}${_attr_class([findInput, keybar && "_eW"])} 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 && "_eX"])} title="Previous match"${_attr("disabled", !canStep)} tabindex=${open ? "0" : "-1"}>↑</button>${_el_resume($scope0_id, "d")}<button type=button${_attr_class([findIconBtn, keybar && "_eX"])} title="Next match"${_attr("disabled", !canStep)} tabindex=${open ? "0" : "-1"}>↓</button>${_el_resume($scope0_id, "e")}<button type=button${_attr_class([findIconBtn, keybar && "_eX"])} title="Close find" tabindex=${open ? "0" : "-1"}>`);
|
|
6458
6460
|
icon_xmark_default({ size: 14 });
|
|
6459
6461
|
_html(`</button>${_el_resume($scope0_id, "f")}</div>${_el_resume($scope0_id, "b", _serialize_guard($scope0_reason, 2))}</div>${_el_resume($scope0_id, "a")}`);
|
|
6460
|
-
_script($scope0_id, "
|
|
6461
|
-
_script($scope0_id, "
|
|
6462
|
-
_script($scope0_id, "
|
|
6462
|
+
_script($scope0_id, "w4");
|
|
6463
|
+
_script($scope0_id, "w5");
|
|
6464
|
+
_script($scope0_id, "w6");
|
|
6463
6465
|
writeScope($scope0_id, {
|
|
6464
6466
|
j: _serialize_if($scope0_reason, 1) && input.open,
|
|
6465
6467
|
k: _serialize_if($scope0_reason, 0) && input.openChange,
|
|
@@ -6482,7 +6484,7 @@ var term_find_default = _template("v", (input) => {
|
|
|
6482
6484
|
});
|
|
6483
6485
|
_resume_branch($scope0_id);
|
|
6484
6486
|
});
|
|
6485
|
-
_template("
|
|
6487
|
+
_template("W", (input) => {
|
|
6486
6488
|
const $scope0_reason = _scope_reason(), $sg__input_size__OR__input_class = _serialize_guard($scope0_reason, 0);
|
|
6487
6489
|
const $scope0_id = _scope_id();
|
|
6488
6490
|
_set_serialize_reason({
|
|
@@ -6497,7 +6499,50 @@ _template("U", (input) => {
|
|
|
6497
6499
|
});
|
|
6498
6500
|
_serialize_if($scope0_reason, 0) && writeScope($scope0_id, { a: _existing_scope($childScope) });
|
|
6499
6501
|
});
|
|
6500
|
-
|
|
6502
|
+
//#endregion
|
|
6503
|
+
//#region src/tags/usage-pcts.marko
|
|
6504
|
+
function pctText(pct) {
|
|
6505
|
+
const rounded = Math.round(pct);
|
|
6506
|
+
return rounded !== pct && (rounded === 100 || rounded === 0) ? `${pct.toFixed(1)}%` : `${rounded}%`;
|
|
6507
|
+
}
|
|
6508
|
+
_template("A", (input) => {
|
|
6509
|
+
const $scope0_reason = _scope_reason(), $sg__input_agent = _serialize_guard($scope0_reason, 1), $si__input_agent = _serialize_if($scope0_reason, 1), $sg__input_agent__OR__input_class = _serialize_guard($scope0_reason, 0), $si__input_agent__OR__input_class = _serialize_if($scope0_reason, 0);
|
|
6510
|
+
const $scope0_id = _scope_id();
|
|
6511
|
+
const agent = input.agent;
|
|
6512
|
+
const windows = agent.windows || [];
|
|
6513
|
+
_if(() => {
|
|
6514
|
+
if (windows.length) {
|
|
6515
|
+
const $scope1_id = _scope_id();
|
|
6516
|
+
_html(`<span${_attr_class([
|
|
6517
|
+
"_eF",
|
|
6518
|
+
input.class,
|
|
6519
|
+
{ ["_eG"]: agent.stale_seconds != null }
|
|
6520
|
+
])}${agent.stale_seconds != null ? _attr("title", `${agent.note || "provider unreachable"}; last cached numbers`) : " title=\"Plan usage\""}>`);
|
|
6521
|
+
_for_of(windows, (win$1, i) => {
|
|
6522
|
+
const $scope2_id = _scope_id();
|
|
6523
|
+
_if(() => {
|
|
6524
|
+
if (i) {
|
|
6525
|
+
const $scope3_id = _scope_id();
|
|
6526
|
+
_html(`<span${_attr_class("_eK")} aria-hidden=true>·</span>`);
|
|
6527
|
+
$si__input_agent && writeScope($scope3_id, {});
|
|
6528
|
+
return 0;
|
|
6529
|
+
}
|
|
6530
|
+
}, $scope2_id, "a", $sg__input_agent, $sg__input_agent, $sg__input_agent, 0, 1);
|
|
6531
|
+
_html(`<span${_attr_class("_eH")}><span${_attr_class("_eI")}>${_escape(win$1.window)}${_el_resume($scope2_id, "d", $sg__input_agent)}</span><span${_attr_class(["_eJ", win$1.used_percent >= 90 ? "_cY" : win$1.used_percent >= 70 ? "_cX" : win$1.used_percent >= 40 ? "_cW" : "_cV"])}>${_escape(pctText(win$1.used_percent))}${_el_resume($scope2_id, "f", $sg__input_agent)}</span>${_el_resume($scope2_id, "e", $sg__input_agent)}</span>`);
|
|
6532
|
+
$si__input_agent && writeScope($scope2_id, {});
|
|
6533
|
+
}, "window", $scope1_id, "a", $sg__input_agent, $sg__input_agent__OR__input_class, $sg__input_agent, "</span>");
|
|
6534
|
+
$si__input_agent__OR__input_class && writeScope($scope1_id, { _: _scope_with_id($scope0_id) });
|
|
6535
|
+
return 0;
|
|
6536
|
+
}
|
|
6537
|
+
}, $scope0_id, "a", $sg__input_agent__OR__input_class, $sg__input_agent, $sg__input_agent, 0, 1);
|
|
6538
|
+
$si__input_agent__OR__input_class && writeScope($scope0_id, {
|
|
6539
|
+
e: $si__input_agent && input.class,
|
|
6540
|
+
h: agent?.stale_seconds,
|
|
6541
|
+
i: $si__input_agent && agent?.note,
|
|
6542
|
+
j: $si__input_agent && windows
|
|
6543
|
+
});
|
|
6544
|
+
});
|
|
6545
|
+
_template("J", (input) => {
|
|
6501
6546
|
const $scope0_reason = _scope_reason(), $sg__input_size__OR__input_class = _serialize_guard($scope0_reason, 0);
|
|
6502
6547
|
const $scope0_id = _scope_id();
|
|
6503
6548
|
_set_serialize_reason({
|
|
@@ -6512,7 +6557,7 @@ _template("H", (input) => {
|
|
|
6512
6557
|
});
|
|
6513
6558
|
_serialize_if($scope0_reason, 0) && writeScope($scope0_id, { a: _existing_scope($childScope) });
|
|
6514
6559
|
});
|
|
6515
|
-
_template("
|
|
6560
|
+
_template("N", (input) => {
|
|
6516
6561
|
const $scope0_reason = _scope_reason(), $sg__input_size__OR__input_class = _serialize_guard($scope0_reason, 0);
|
|
6517
6562
|
const $scope0_id = _scope_id();
|
|
6518
6563
|
_set_serialize_reason({
|
|
@@ -6527,7 +6572,7 @@ _template("L", (input) => {
|
|
|
6527
6572
|
});
|
|
6528
6573
|
_serialize_if($scope0_reason, 0) && writeScope($scope0_id, { a: _existing_scope($childScope) });
|
|
6529
6574
|
});
|
|
6530
|
-
_template("
|
|
6575
|
+
_template("H", (input) => {
|
|
6531
6576
|
const $scope0_reason = _scope_reason(), $sg__input_size__OR__input_class = _serialize_guard($scope0_reason, 0);
|
|
6532
6577
|
const $scope0_id = _scope_id();
|
|
6533
6578
|
_set_serialize_reason({
|
|
@@ -6546,30 +6591,31 @@ _template("F", (input) => {
|
|
|
6546
6591
|
//#region src/tags/term.marko
|
|
6547
6592
|
var REPEAT_DELAY = 400;
|
|
6548
6593
|
var REPEAT_EVERY = 55;
|
|
6549
|
-
var term_default = _template("
|
|
6594
|
+
var term_default = _template("x", (input) => {
|
|
6550
6595
|
const $scope0_reason = _scope_reason();
|
|
6551
|
-
_serialize_guard($scope0_reason,
|
|
6596
|
+
_serialize_guard($scope0_reason, 5);
|
|
6552
6597
|
_serialize_guard($scope0_reason, 0);
|
|
6553
6598
|
_serialize_guard($scope0_reason, 1);
|
|
6554
|
-
_serialize_guard($scope0_reason, 9);
|
|
6555
6599
|
_serialize_guard($scope0_reason, 10);
|
|
6556
|
-
const $si__input_sessions = _serialize_if($scope0_reason,
|
|
6600
|
+
const $si__input_sessions = _serialize_if($scope0_reason, 10);
|
|
6557
6601
|
_serialize_guard($scope0_reason, 2);
|
|
6558
|
-
_serialize_guard($scope0_reason,
|
|
6559
|
-
const $si__input_onRenameSession = _serialize_if($scope0_reason, 10);
|
|
6602
|
+
_serialize_guard($scope0_reason, 4);
|
|
6560
6603
|
_serialize_guard($scope0_reason, 11);
|
|
6561
|
-
|
|
6562
|
-
|
|
6563
|
-
_serialize_guard($scope0_reason, 8);
|
|
6604
|
+
_serialize_guard($scope0_reason, 7);
|
|
6605
|
+
const $si__input_sessionId = _serialize_if($scope0_reason, 8), $si__input_onRenameSession = _serialize_if($scope0_reason, 11);
|
|
6564
6606
|
_serialize_guard($scope0_reason, 12);
|
|
6565
|
-
const $
|
|
6607
|
+
const $si__input_agents = _serialize_if($scope0_reason, 12), $si__input_mode = _serialize_if($scope0_reason, 5), $si__input_agent__OR__input_sessionState = _serialize_if($scope0_reason, 1);
|
|
6608
|
+
_serialize_guard($scope0_reason, 3);
|
|
6609
|
+
_serialize_guard($scope0_reason, 9);
|
|
6610
|
+
_serialize_guard($scope0_reason, 13);
|
|
6611
|
+
const $si__input_sessionState = _serialize_if($scope0_reason, 6), $si__input_onCloseSession = _serialize_if($scope0_reason, 7), $si__input_workspaceName = _serialize_if($scope0_reason, 13);
|
|
6566
6612
|
const $scope0_id = _scope_id();
|
|
6567
|
-
_hoist($scope0_id, "
|
|
6613
|
+
_hoist($scope0_id, "x21");
|
|
6568
6614
|
const $findOpen__closures = /* @__PURE__ */ new Set();
|
|
6569
6615
|
const $findTick__closures = /* @__PURE__ */ new Set();
|
|
6570
6616
|
const $input_onCloseSession__closures = /* @__PURE__ */ new Set();
|
|
6571
|
-
const $input_onRenameSession__closures = /* @__PURE__ */ new Set();
|
|
6572
6617
|
const $input_sessionId__closures = /* @__PURE__ */ new Set();
|
|
6618
|
+
const $input_onRenameSession__closures = /* @__PURE__ */ new Set();
|
|
6573
6619
|
const $input_sessions__closures = /* @__PURE__ */ new Set();
|
|
6574
6620
|
const $input_sessionState__closures = /* @__PURE__ */ new Set();
|
|
6575
6621
|
const $input_agents__closures = /* @__PURE__ */ new Set();
|
|
@@ -6586,7 +6632,7 @@ var term_default = _template("w", (input) => {
|
|
|
6586
6632
|
let findOpen = false;
|
|
6587
6633
|
const $openChange = _resume((_new_findOpen) => {
|
|
6588
6634
|
findOpen = _new_findOpen;
|
|
6589
|
-
}, "
|
|
6635
|
+
}, "x1", $scope0_id);
|
|
6590
6636
|
let findTick = 0;
|
|
6591
6637
|
const ioBox = { current: null };
|
|
6592
6638
|
const searchBox = {
|
|
@@ -6594,7 +6640,7 @@ var term_default = _template("w", (input) => {
|
|
|
6594
6640
|
query: "",
|
|
6595
6641
|
refreshTimer: 0
|
|
6596
6642
|
};
|
|
6597
|
-
const findFocusRef = { focus: _resume(function() {}, "
|
|
6643
|
+
const findFocusRef = { focus: _resume(function() {}, "x2") };
|
|
6598
6644
|
const scheduleFindRefresh = _resume(() => {
|
|
6599
6645
|
if (!searchBox.query.trim() || !searchBox.overlay) return;
|
|
6600
6646
|
if (searchBox.refreshTimer) clearTimeout(searchBox.refreshTimer);
|
|
@@ -6602,7 +6648,7 @@ var term_default = _template("w", (input) => {
|
|
|
6602
6648
|
searchBox.refreshTimer = 0;
|
|
6603
6649
|
searchBox.overlay?.refresh();
|
|
6604
6650
|
}, 32);
|
|
6605
|
-
}, "
|
|
6651
|
+
}, "x3", $scope0_id);
|
|
6606
6652
|
const runFind = _resume((query, dir) => {
|
|
6607
6653
|
const overlay = searchBox.overlay;
|
|
6608
6654
|
if (!overlay) return;
|
|
@@ -6616,7 +6662,7 @@ var term_default = _template("w", (input) => {
|
|
|
6616
6662
|
return;
|
|
6617
6663
|
}
|
|
6618
6664
|
overlay.search(query, dir);
|
|
6619
|
-
}, "
|
|
6665
|
+
}, "x4", $scope0_id);
|
|
6620
6666
|
const clearFind = _resume(() => {
|
|
6621
6667
|
if (searchBox.refreshTimer) {
|
|
6622
6668
|
clearTimeout(searchBox.refreshTimer);
|
|
@@ -6624,7 +6670,7 @@ var term_default = _template("w", (input) => {
|
|
|
6624
6670
|
}
|
|
6625
6671
|
searchBox.query = "";
|
|
6626
6672
|
searchBox.overlay?.clear();
|
|
6627
|
-
}, "
|
|
6673
|
+
}, "x5", $scope0_id);
|
|
6628
6674
|
const openFind = _resume(() => {
|
|
6629
6675
|
if (kb) {
|
|
6630
6676
|
kb = false;
|
|
@@ -6634,7 +6680,7 @@ var term_default = _template("w", (input) => {
|
|
|
6634
6680
|
findOpen = true;
|
|
6635
6681
|
findTick++;
|
|
6636
6682
|
findFocusRef.focus();
|
|
6637
|
-
}, "
|
|
6683
|
+
}, "x6", $scope0_id);
|
|
6638
6684
|
const toggleFind = _resume(() => {
|
|
6639
6685
|
if (findOpen) {
|
|
6640
6686
|
findOpen = false;
|
|
@@ -6643,7 +6689,7 @@ var term_default = _template("w", (input) => {
|
|
|
6643
6689
|
return;
|
|
6644
6690
|
}
|
|
6645
6691
|
openFind();
|
|
6646
|
-
}, "
|
|
6692
|
+
}, "x7", $scope0_id);
|
|
6647
6693
|
const onTermPage = input.mode == null || input.mode === "term";
|
|
6648
6694
|
const canKeys = onTermPage || input.mode === "diff";
|
|
6649
6695
|
const findLit = onTermPage ? findOpen : input.mode === "diff" && !!input.reviewFindOpen;
|
|
@@ -6654,7 +6700,7 @@ var term_default = _template("w", (input) => {
|
|
|
6654
6700
|
return;
|
|
6655
6701
|
}
|
|
6656
6702
|
if (input.mode === "diff") input.onToggleReviewFind?.();
|
|
6657
|
-
}, "
|
|
6703
|
+
}, "x8", $scope0_id);
|
|
6658
6704
|
const thisAgent = activeAgent({
|
|
6659
6705
|
agent: input.agent || "shell",
|
|
6660
6706
|
state: input.sessionState
|
|
@@ -6666,7 +6712,7 @@ var term_default = _template("w", (input) => {
|
|
|
6666
6712
|
copyFlashBox.timer = setTimeout(() => {
|
|
6667
6713
|
copiedFlash = false;
|
|
6668
6714
|
}, 1200);
|
|
6669
|
-
}, "
|
|
6715
|
+
}, "x9", $scope0_id);
|
|
6670
6716
|
const holdBox = { current: null };
|
|
6671
6717
|
const startHold = _resume((seq) => {
|
|
6672
6718
|
((stopHold) => stopHold())(_hoist_read_error);
|
|
@@ -6676,7 +6722,7 @@ var term_default = _template("w", (input) => {
|
|
|
6676
6722
|
state.repeat = setInterval(() => ioBox.current?.send(seq), REPEAT_EVERY);
|
|
6677
6723
|
}, REPEAT_DELAY);
|
|
6678
6724
|
holdBox.current = state;
|
|
6679
|
-
}, "
|
|
6725
|
+
}, "x10", $scope0_id);
|
|
6680
6726
|
const stopHold = _resume(() => {
|
|
6681
6727
|
const hold = holdBox.current;
|
|
6682
6728
|
if (hold) {
|
|
@@ -6684,7 +6730,7 @@ var term_default = _template("w", (input) => {
|
|
|
6684
6730
|
clearInterval(hold.repeat);
|
|
6685
6731
|
holdBox.current = null;
|
|
6686
6732
|
}
|
|
6687
|
-
}, "
|
|
6733
|
+
}, "x11", $scope0_id);
|
|
6688
6734
|
const uploadAsset = _resume(async (file) => {
|
|
6689
6735
|
if (!file) return;
|
|
6690
6736
|
uploading = true;
|
|
@@ -6697,7 +6743,7 @@ var term_default = _template("w", (input) => {
|
|
|
6697
6743
|
} finally {
|
|
6698
6744
|
uploading = false;
|
|
6699
6745
|
}
|
|
6700
|
-
}, "
|
|
6746
|
+
}, "x12", $scope0_id);
|
|
6701
6747
|
const handlePasted = _resume(async (clipboardData) => {
|
|
6702
6748
|
const files = [...clipboardData?.files || []];
|
|
6703
6749
|
for (const file of files) await uploadAsset(file);
|
|
@@ -6706,7 +6752,7 @@ var term_default = _template("w", (input) => {
|
|
|
6706
6752
|
if (text) ioBox.current?.send(text);
|
|
6707
6753
|
}
|
|
6708
6754
|
trapOpen = false;
|
|
6709
|
-
}, "
|
|
6755
|
+
}, "x13", $scope0_id);
|
|
6710
6756
|
const pasteClipboard = _resume(async () => {
|
|
6711
6757
|
if (!navigator.clipboard?.read) {
|
|
6712
6758
|
trapOpen = true;
|
|
@@ -6726,8 +6772,8 @@ var term_default = _template("w", (input) => {
|
|
|
6726
6772
|
} catch {
|
|
6727
6773
|
trapOpen = true;
|
|
6728
6774
|
}
|
|
6729
|
-
}, "
|
|
6730
|
-
_html(`<div${_attr("hidden", !onTermPage)}${_attr_class("
|
|
6775
|
+
}, "x14", $scope0_id);
|
|
6776
|
+
_html(`<div${_attr("hidden", !onTermPage)}${_attr_class("_dy")}><div${_attr_class("_dz")}></div>${_el_resume($scope0_id, "b")}`);
|
|
6731
6777
|
_if(() => {
|
|
6732
6778
|
if (findOpen) {
|
|
6733
6779
|
const $scope12_id = _scope_id();
|
|
@@ -6741,11 +6787,11 @@ var term_default = _template("w", (input) => {
|
|
|
6741
6787
|
focusRef: findFocusRef,
|
|
6742
6788
|
onSearch: _resume(function(q, dir) {
|
|
6743
6789
|
runFind(q, dir);
|
|
6744
|
-
}, "
|
|
6790
|
+
}, "x15", $scope12_id),
|
|
6745
6791
|
onClear: _resume(function() {
|
|
6746
6792
|
clearFind();
|
|
6747
6793
|
ioBox.current?.setFindMode(false);
|
|
6748
|
-
}, "
|
|
6794
|
+
}, "x16", $scope12_id)
|
|
6749
6795
|
});
|
|
6750
6796
|
writeScope($scope12_id, { a: _existing_scope($childScope) });
|
|
6751
6797
|
return 0;
|
|
@@ -6754,7 +6800,7 @@ var term_default = _template("w", (input) => {
|
|
|
6754
6800
|
_if(() => {
|
|
6755
6801
|
if (uploading) {
|
|
6756
6802
|
const $scope19_id = _scope_id();
|
|
6757
|
-
_html(`<div${_attr_class("
|
|
6803
|
+
_html(`<div${_attr_class("_dF")}>uploading…</div>`);
|
|
6758
6804
|
writeScope($scope19_id, {});
|
|
6759
6805
|
return 0;
|
|
6760
6806
|
}
|
|
@@ -6762,7 +6808,7 @@ var term_default = _template("w", (input) => {
|
|
|
6762
6808
|
_if(() => {
|
|
6763
6809
|
if (copiedFlash) {
|
|
6764
6810
|
const $scope20_id = _scope_id();
|
|
6765
|
-
_html(`<div${_attr_class("
|
|
6811
|
+
_html(`<div${_attr_class("_dE")}>Copied</div>`);
|
|
6766
6812
|
writeScope($scope20_id, {});
|
|
6767
6813
|
return 0;
|
|
6768
6814
|
}
|
|
@@ -6771,18 +6817,18 @@ var term_default = _template("w", (input) => {
|
|
|
6771
6817
|
_if(() => {
|
|
6772
6818
|
if (trapOpen) {
|
|
6773
6819
|
const $scope11_id = _scope_id();
|
|
6774
|
-
_html(`<div${_attr_class("
|
|
6775
|
-
_script($scope11_id, "
|
|
6776
|
-
_script($scope11_id, "
|
|
6820
|
+
_html(`<div${_attr_class("_dG")}><div${_attr_class("_dH")}><p${_attr_class("_eb")}>Long-press the field below and choose Paste</p><input placeholder="Paste here…">${_el_resume($scope11_id, "d")}<button${_attr_class("_l")}>Cancel</button>${_el_resume($scope11_id, "e")}</div>${_el_resume($scope11_id, "b")}</div>${_el_resume($scope11_id, "a")}`);
|
|
6821
|
+
_script($scope11_id, "x25");
|
|
6822
|
+
_script($scope11_id, "x26");
|
|
6777
6823
|
writeScope($scope11_id, {});
|
|
6778
6824
|
return 0;
|
|
6779
6825
|
}
|
|
6780
6826
|
}, $scope0_id, "g", 1, 1, 1, 0, 1);
|
|
6781
6827
|
_html(`</div>${_el_resume($scope0_id, "a")}`);
|
|
6782
6828
|
_if(() => {}, $scope0_id, "h", 1, 1, 1, 0, 1);
|
|
6783
|
-
_script($scope0_id, "
|
|
6784
|
-
_script($scope0_id, "
|
|
6785
|
-
_script($scope0_id, "
|
|
6829
|
+
_script($scope0_id, "x41");
|
|
6830
|
+
_script($scope0_id, "x42");
|
|
6831
|
+
_script($scope0_id, "x43");
|
|
6786
6832
|
writeScope($scope0_id, {
|
|
6787
6833
|
k: input.mode,
|
|
6788
6834
|
l: input.reviewFindOpen,
|
|
@@ -6834,8 +6880,8 @@ var term_default = _template("w", (input) => {
|
|
|
6834
6880
|
br: $findOpen__closures,
|
|
6835
6881
|
bt: $findTick__closures,
|
|
6836
6882
|
bh: $si__input_onCloseSession && $input_onCloseSession__closures,
|
|
6837
|
-
bl: $si__input_onRenameSession && $input_onRenameSession__closures,
|
|
6838
6883
|
bi: $si__input_sessionId && $input_sessionId__closures,
|
|
6884
|
+
bl: $si__input_onRenameSession && $input_onRenameSession__closures,
|
|
6839
6885
|
bk: $si__input_sessions && $input_sessions__closures,
|
|
6840
6886
|
bf: $si__input_sessionState && $input_sessionState__closures,
|
|
6841
6887
|
bm: $si__input_agents && $input_agents__closures,
|
|
@@ -6849,7 +6895,7 @@ var term_default = _template("w", (input) => {
|
|
|
6849
6895
|
//#region src/tags/work-view.marko
|
|
6850
6896
|
var api$1;
|
|
6851
6897
|
var isTransientApiError$1;
|
|
6852
|
-
var work_view_default = _template("
|
|
6898
|
+
var work_view_default = _template("B", (input) => {
|
|
6853
6899
|
const $scope0_reason = _scope_reason(), $sg__input_workspace = _serialize_guard($scope0_reason, 4), $sg__input_agents = _serialize_guard($scope0_reason, 10), $sg__input_allWorkspaces = _serialize_guard($scope0_reason, 9), $si__input_workspace = _serialize_if($scope0_reason, 4), $si__input_active = _serialize_if($scope0_reason, 6), $si__input_agents = _serialize_if($scope0_reason, 10), $si__input_preferred = _serialize_if($scope0_reason, 7);
|
|
6854
6900
|
const $scope0_id = _scope_id();
|
|
6855
6901
|
const $error__closures = /* @__PURE__ */ new Set();
|
|
@@ -6874,43 +6920,49 @@ var work_view_default = _template("z", (input) => {
|
|
|
6874
6920
|
let DiffView = null;
|
|
6875
6921
|
const loadDiffView = _resume(() => {
|
|
6876
6922
|
if (DiffView) return;
|
|
6877
|
-
import("./
|
|
6923
|
+
import("./_CmWodq4J.js").then((m) => {
|
|
6878
6924
|
DiffView = m.default;
|
|
6879
6925
|
});
|
|
6880
|
-
}, "
|
|
6926
|
+
}, "B6", $scope0_id);
|
|
6881
6927
|
let manageMounted = input.initialView === "manage";
|
|
6882
6928
|
let settingsMounted = input.initialView === "settings";
|
|
6883
6929
|
let newMounted = input.initialView === "new";
|
|
6884
6930
|
let reviewFindOpen = false;
|
|
6885
6931
|
let reviewFindTick = 0;
|
|
6886
|
-
const reviewFindFocus = { focus: _resume(function() {}, "
|
|
6932
|
+
const reviewFindFocus = { focus: _resume(function() {}, "B0") };
|
|
6887
6933
|
let focusPr = input.initialPr ?? "";
|
|
6888
6934
|
let focusNonce = 0;
|
|
6935
|
+
let reviewScope = input.initialScope ?? null;
|
|
6936
|
+
let reviewFile = input.initialFile ?? null;
|
|
6937
|
+
let focusFile = input.initialFile ?? "";
|
|
6938
|
+
let focusFileNonce = 0;
|
|
6889
6939
|
let error = null;
|
|
6890
6940
|
let spawning = false;
|
|
6891
6941
|
const ws = input.workspace;
|
|
6892
|
-
const openDiff = _resume((pr) => {
|
|
6942
|
+
const openDiff = _resume((pr, file) => {
|
|
6893
6943
|
focusPr = pr || "";
|
|
6894
6944
|
if (pr) focusNonce++;
|
|
6945
|
+
focusFile = file || "";
|
|
6946
|
+
if (file) focusFileNonce++;
|
|
6895
6947
|
loadDiffView();
|
|
6896
6948
|
diffMounted = true;
|
|
6897
6949
|
view = "diff";
|
|
6898
|
-
}, "
|
|
6950
|
+
}, "B7", $scope0_id);
|
|
6899
6951
|
const openManage = _resume(() => {
|
|
6900
6952
|
manageMounted = true;
|
|
6901
6953
|
view = "manage";
|
|
6902
|
-
}, "
|
|
6954
|
+
}, "B8", $scope0_id);
|
|
6903
6955
|
const openSettings = _resume(() => {
|
|
6904
6956
|
settingsMounted = true;
|
|
6905
6957
|
view = "settings";
|
|
6906
|
-
}, "
|
|
6958
|
+
}, "B9", $scope0_id);
|
|
6907
6959
|
const toggleNav = _resume(() => {
|
|
6908
6960
|
view = view === "nav" ? "term" : "nav";
|
|
6909
|
-
}, "
|
|
6961
|
+
}, "B10", $scope0_id);
|
|
6910
6962
|
const toggleDiff = _resume(() => {
|
|
6911
6963
|
if (view === "diff") view = "term";
|
|
6912
6964
|
else openDiff();
|
|
6913
|
-
}, "
|
|
6965
|
+
}, "B11", $scope0_id);
|
|
6914
6966
|
const shownSessions = sessions ?? input.allStatus?.[ws.id]?.sessions ?? null;
|
|
6915
6967
|
const curTab = (() => {
|
|
6916
6968
|
if (tab && shownSessions?.some((s) => s.id === tab)) return tab;
|
|
@@ -6927,13 +6979,15 @@ var work_view_default = _template("z", (input) => {
|
|
|
6927
6979
|
reviewFindOpen = true;
|
|
6928
6980
|
reviewFindTick++;
|
|
6929
6981
|
reviewFindFocus.focus();
|
|
6930
|
-
}, "
|
|
6982
|
+
}, "B12", $scope0_id);
|
|
6931
6983
|
const exitCreate = _resume(() => {
|
|
6932
6984
|
if (view === "new") view = "term";
|
|
6933
|
-
}, "
|
|
6985
|
+
}, "B13", $scope0_id);
|
|
6934
6986
|
const applyView = _resume((v) => {
|
|
6935
|
-
if (v.view === "diff")
|
|
6936
|
-
|
|
6987
|
+
if (v.view === "diff") {
|
|
6988
|
+
if (v.scope !== void 0) reviewScope = v.scope ?? null;
|
|
6989
|
+
openDiff(v.pr, v.file);
|
|
6990
|
+
} else if (v.view === "manage") openManage();
|
|
6937
6991
|
else if (v.view === "settings") openSettings();
|
|
6938
6992
|
else if (v.view === "new") input.onNew?.();
|
|
6939
6993
|
else {
|
|
@@ -6943,7 +6997,7 @@ var work_view_default = _template("z", (input) => {
|
|
|
6943
6997
|
}
|
|
6944
6998
|
view = "term";
|
|
6945
6999
|
}
|
|
6946
|
-
}, "
|
|
7000
|
+
}, "B14", $scope0_id);
|
|
6947
7001
|
const createSession = _resume(async (agent, select) => {
|
|
6948
7002
|
spawning = true;
|
|
6949
7003
|
try {
|
|
@@ -6964,7 +7018,7 @@ var work_view_default = _template("z", (input) => {
|
|
|
6964
7018
|
} finally {
|
|
6965
7019
|
spawning = false;
|
|
6966
7020
|
}
|
|
6967
|
-
}, "
|
|
7021
|
+
}, "B15", $scope0_id);
|
|
6968
7022
|
const loadMem = {
|
|
6969
7023
|
wanted: false,
|
|
6970
7024
|
run: void 0
|
|
@@ -6990,11 +7044,11 @@ var work_view_default = _template("z", (input) => {
|
|
|
6990
7044
|
if (isTransientApiError$1(err)) return;
|
|
6991
7045
|
error = String(err.message || err);
|
|
6992
7046
|
}
|
|
6993
|
-
}, "
|
|
7047
|
+
}, "B16", $scope0_id);
|
|
6994
7048
|
const loadSessions = _resume((autoCreate) => {
|
|
6995
7049
|
if (autoCreate) loadMem.wanted = true;
|
|
6996
7050
|
return (loadMem.run ??= coalesce(loadBody))();
|
|
6997
|
-
}, "
|
|
7051
|
+
}, "B17", $scope0_id);
|
|
6998
7052
|
const closeSession = _resume(async (id) => {
|
|
6999
7053
|
try {
|
|
7000
7054
|
sessions = (sessions || []).filter((s) => s.id !== id);
|
|
@@ -7004,20 +7058,22 @@ var work_view_default = _template("z", (input) => {
|
|
|
7004
7058
|
error = `Close session failed: ${String(err.message || err)}`;
|
|
7005
7059
|
loadSessions(false);
|
|
7006
7060
|
}
|
|
7007
|
-
}, "
|
|
7061
|
+
}, "B18", $scope0_id);
|
|
7008
7062
|
const renameSession = _resume(async (id, title) => {
|
|
7009
7063
|
title = title.trim();
|
|
7010
|
-
|
|
7064
|
+
const cur = (sessions || []).find((s) => s.id === id);
|
|
7065
|
+
if (cur && title === cur.agent) title = "";
|
|
7066
|
+
if (cur && (cur.title || "") === title) return;
|
|
7011
7067
|
sessions = (sessions || []).map((s) => s.id === id ? {
|
|
7012
7068
|
...s,
|
|
7013
|
-
title
|
|
7069
|
+
title: title || null
|
|
7014
7070
|
} : s);
|
|
7015
7071
|
await fetch(`/api/sessions/${id}`, {
|
|
7016
7072
|
method: "PATCH",
|
|
7017
7073
|
headers: { "content-type": "application/json" },
|
|
7018
7074
|
body: JSON.stringify({ title })
|
|
7019
7075
|
});
|
|
7020
|
-
}, "
|
|
7076
|
+
}, "B19", $scope0_id);
|
|
7021
7077
|
const newSession = _resume(async (wsId, agent) => {
|
|
7022
7078
|
if (wsId === ws.id) {
|
|
7023
7079
|
const session = await createSession(agent, true);
|
|
@@ -7035,7 +7091,7 @@ var work_view_default = _template("z", (input) => {
|
|
|
7035
7091
|
} catch (err) {
|
|
7036
7092
|
error = String(err.message || err);
|
|
7037
7093
|
}
|
|
7038
|
-
}, "
|
|
7094
|
+
}, "B20", $scope0_id);
|
|
7039
7095
|
const onKey = _resume((e) => {
|
|
7040
7096
|
const target = e.target;
|
|
7041
7097
|
const typing = !!target && !target.closest(".xterm") && (target.tagName === "INPUT" || target.tagName === "TEXTAREA" || target.tagName === "SELECT" || target.isContentEditable);
|
|
@@ -7049,8 +7105,8 @@ var work_view_default = _template("z", (input) => {
|
|
|
7049
7105
|
e.preventDefault();
|
|
7050
7106
|
toggleDiff();
|
|
7051
7107
|
}
|
|
7052
|
-
}, "
|
|
7053
|
-
_html(`<div${_attr_class(["
|
|
7108
|
+
}, "B21", $scope0_id);
|
|
7109
|
+
_html(`<div${_attr_class(["_ci", { ["_ch"]: view === "nav" }])}><div${_attr_class("_cj")}>`);
|
|
7054
7110
|
_set_serialize_reason({
|
|
7055
7111
|
0: _serialize_guard($scope0_reason, 0),
|
|
7056
7112
|
1: _serialize_guard($scope0_reason, 1),
|
|
@@ -7076,45 +7132,45 @@ var work_view_default = _template("z", (input) => {
|
|
|
7076
7132
|
tab: curTab,
|
|
7077
7133
|
tabChange: _resume(function(id) {
|
|
7078
7134
|
tab = id;
|
|
7079
|
-
}, "
|
|
7135
|
+
}, "B22", $scope0_id),
|
|
7080
7136
|
view,
|
|
7081
7137
|
viewChange: _resume((_new_view) => {
|
|
7082
7138
|
view = _new_view;
|
|
7083
|
-
}, "
|
|
7139
|
+
}, "B23", $scope0_id),
|
|
7084
7140
|
allWorkspaces: input.allWorkspaces,
|
|
7085
7141
|
allStatus: input.allStatus,
|
|
7086
7142
|
agents: input.agents,
|
|
7087
7143
|
onError: _resume(function(message) {
|
|
7088
7144
|
error = message;
|
|
7089
|
-
}, "
|
|
7145
|
+
}, "B24", $scope0_id),
|
|
7090
7146
|
onSelectWorkspace: _resume(function(id) {
|
|
7091
7147
|
exitCreate();
|
|
7092
7148
|
input.onSelectWorkspace?.(id);
|
|
7093
|
-
}, "
|
|
7149
|
+
}, "B25", $scope0_id),
|
|
7094
7150
|
onNewSession: _resume(function(wsId, agent) {
|
|
7095
7151
|
exitCreate();
|
|
7096
7152
|
newSession(wsId, agent);
|
|
7097
|
-
}, "
|
|
7153
|
+
}, "B26", $scope0_id),
|
|
7098
7154
|
onCloseSession: _resume(function(id) {
|
|
7099
7155
|
closeSession(id);
|
|
7100
|
-
}, "
|
|
7156
|
+
}, "B27", $scope0_id),
|
|
7101
7157
|
onRenameSession: _resume(function(s, title) {
|
|
7102
7158
|
renameSession(s.id, title);
|
|
7103
|
-
}, "
|
|
7159
|
+
}, "B28", $scope0_id),
|
|
7104
7160
|
onReviewOpened: _resume(function(pr) {
|
|
7105
7161
|
exitCreate();
|
|
7106
7162
|
openDiff(pr);
|
|
7107
|
-
}, "
|
|
7163
|
+
}, "B29", $scope0_id)
|
|
7108
7164
|
});
|
|
7109
|
-
_html(`</div><div${_attr_class("
|
|
7165
|
+
_html(`</div><div${_attr_class("_ck")}>`);
|
|
7110
7166
|
_if(() => {
|
|
7111
7167
|
if (error) {
|
|
7112
7168
|
const $scope8_id = _scope_id();
|
|
7113
7169
|
toast_default({
|
|
7114
7170
|
onDismiss: _resume(function() {
|
|
7115
7171
|
error = null;
|
|
7116
|
-
}, "
|
|
7117
|
-
content: _content_resume("
|
|
7172
|
+
}, "B30", $scope8_id),
|
|
7173
|
+
content: _content_resume("B47", () => {
|
|
7118
7174
|
_scope_reason();
|
|
7119
7175
|
const $scope9_id = _scope_id();
|
|
7120
7176
|
_html(`${_escape(error)}${_el_resume($scope9_id, "a")}`);
|
|
@@ -7139,19 +7195,28 @@ var work_view_default = _template("z", (input) => {
|
|
|
7139
7195
|
active: input.active && view === "diff",
|
|
7140
7196
|
focusPr,
|
|
7141
7197
|
focusNonce,
|
|
7198
|
+
focusFile,
|
|
7199
|
+
focusFileNonce,
|
|
7200
|
+
scope: reviewScope,
|
|
7201
|
+
onScopeChange: _resume(function(s) {
|
|
7202
|
+
reviewScope = s === "committed" ? null : s;
|
|
7203
|
+
}, "B1", $scope1_id),
|
|
7204
|
+
onFileChange: _resume(function(f) {
|
|
7205
|
+
reviewFile = f;
|
|
7206
|
+
}, "B2", $scope1_id),
|
|
7142
7207
|
findOpen: reviewFindOpen,
|
|
7143
7208
|
findOpenChange: _resume((_new_reviewFindOpen) => {
|
|
7144
7209
|
reviewFindOpen = _new_reviewFindOpen;
|
|
7145
|
-
}, "
|
|
7210
|
+
}, "B3", $scope1_id),
|
|
7146
7211
|
findTick: reviewFindTick,
|
|
7147
7212
|
findFocusRef: reviewFindFocus,
|
|
7148
7213
|
onSent: _resume(function(sessionId) {
|
|
7149
7214
|
tab = sessionId;
|
|
7150
7215
|
view = "term";
|
|
7151
|
-
}, "
|
|
7216
|
+
}, "B4", $scope1_id),
|
|
7152
7217
|
onExit: _resume(function() {
|
|
7153
7218
|
view = "term";
|
|
7154
|
-
}, "
|
|
7219
|
+
}, "B5", $scope1_id)
|
|
7155
7220
|
});
|
|
7156
7221
|
_show_end($scope1_id, "d", $show);
|
|
7157
7222
|
writeScope($scope1_id, {});
|
|
@@ -7169,13 +7234,13 @@ var work_view_default = _template("z", (input) => {
|
|
|
7169
7234
|
workspace: ws,
|
|
7170
7235
|
workspaceChange: _resume(function(next) {
|
|
7171
7236
|
input.onWorkspaceChange?.(next);
|
|
7172
|
-
}, "
|
|
7237
|
+
}, "B31", $scope2_id),
|
|
7173
7238
|
onExit: _resume(function() {
|
|
7174
7239
|
view = "term";
|
|
7175
|
-
}, "
|
|
7240
|
+
}, "B32", $scope2_id),
|
|
7176
7241
|
onDeleted: _resume(function() {
|
|
7177
7242
|
input.onWorkspaceDeleted?.(ws.id);
|
|
7178
|
-
}, "
|
|
7243
|
+
}, "B33", $scope2_id)
|
|
7179
7244
|
});
|
|
7180
7245
|
_show_end($scope2_id, "d", $show2);
|
|
7181
7246
|
writeScope($scope2_id, { b: _serialize_if($scope0_reason, 2) && _existing_scope($childScope2) });
|
|
@@ -7200,17 +7265,17 @@ var work_view_default = _template("z", (input) => {
|
|
|
7200
7265
|
backHref: `/w/${ws.id}`,
|
|
7201
7266
|
onExit: _resume(function() {
|
|
7202
7267
|
view = "term";
|
|
7203
|
-
}, "
|
|
7268
|
+
}, "B34", $scope3_id),
|
|
7204
7269
|
setup: input.setup,
|
|
7205
7270
|
setupChange: _resume(function(s) {
|
|
7206
7271
|
input.onSetupChange?.(s);
|
|
7207
|
-
}, "
|
|
7272
|
+
}, "B35", $scope3_id),
|
|
7208
7273
|
preferredChange: _resume(function(agent) {
|
|
7209
7274
|
input.onPreferredChange?.(agent);
|
|
7210
|
-
}, "
|
|
7275
|
+
}, "B36", $scope3_id),
|
|
7211
7276
|
agentsChange: _resume(function(agents) {
|
|
7212
7277
|
input.onAgentsChange?.(agents);
|
|
7213
|
-
}, "
|
|
7278
|
+
}, "B37", $scope3_id)
|
|
7214
7279
|
});
|
|
7215
7280
|
_show_end($scope3_id, "d", $show3);
|
|
7216
7281
|
writeScope($scope3_id, { b: _serialize_if($scope0_reason, 3) && _existing_scope($childScope3) });
|
|
@@ -7233,28 +7298,28 @@ var work_view_default = _template("z", (input) => {
|
|
|
7233
7298
|
backHref: `/w/${ws.id}`,
|
|
7234
7299
|
onExit: _resume(function() {
|
|
7235
7300
|
exitCreate();
|
|
7236
|
-
}, "
|
|
7301
|
+
}, "B38", $scope4_id),
|
|
7237
7302
|
onCreate: _resume(function(ws) {
|
|
7238
7303
|
input.onCreated?.(ws);
|
|
7239
|
-
}, "
|
|
7304
|
+
}, "B39", $scope4_id),
|
|
7240
7305
|
onRestore: _resume(function(next) {
|
|
7241
7306
|
input.onWorkspaceChange?.(next);
|
|
7242
7307
|
input.onSelectWorkspace?.(next.id);
|
|
7243
7308
|
exitCreate();
|
|
7244
|
-
}, "
|
|
7309
|
+
}, "B40", $scope4_id)
|
|
7245
7310
|
});
|
|
7246
7311
|
_show_end($scope4_id, "d", $show4);
|
|
7247
7312
|
writeScope($scope4_id, { b: _existing_scope($childScope4) });
|
|
7248
7313
|
return 0;
|
|
7249
7314
|
}
|
|
7250
7315
|
}, $scope0_id, "i");
|
|
7251
|
-
_html(`<div${_attr_class(["
|
|
7316
|
+
_html(`<div${_attr_class(["_cm", { ["_cl"]: view !== "term" }])}>`);
|
|
7252
7317
|
_if(() => {
|
|
7253
7318
|
if (shownSessions) {
|
|
7254
7319
|
const $scope5_id = _scope_id();
|
|
7255
7320
|
_for_of(shownSessions, (s) => {
|
|
7256
7321
|
const $scope6_id = _scope_id();
|
|
7257
|
-
_html(`<div${_attr_class(["
|
|
7322
|
+
_html(`<div${_attr_class(["_cn", { ["_co"]: s.id === curTab }])}>`);
|
|
7258
7323
|
_set_serialize_reason({
|
|
7259
7324
|
0: 1,
|
|
7260
7325
|
1: 1,
|
|
@@ -7267,8 +7332,9 @@ var work_view_default = _template("z", (input) => {
|
|
|
7267
7332
|
8: 1,
|
|
7268
7333
|
9: 1,
|
|
7269
7334
|
10: 1,
|
|
7270
|
-
11:
|
|
7271
|
-
12: $
|
|
7335
|
+
11: 1,
|
|
7336
|
+
12: $sg__input_agents,
|
|
7337
|
+
13: $sg__input_workspace
|
|
7272
7338
|
});
|
|
7273
7339
|
const $childScope5 = _peek_scope_id();
|
|
7274
7340
|
term_default({
|
|
@@ -7282,26 +7348,26 @@ var work_view_default = _template("z", (input) => {
|
|
|
7282
7348
|
onNewSession: _resume(function(agent) {
|
|
7283
7349
|
view = "term";
|
|
7284
7350
|
newSession(ws.id, agent);
|
|
7285
|
-
}, "
|
|
7351
|
+
}, "B41", $scope6_id),
|
|
7286
7352
|
onOpenTab: _resume(function(id) {
|
|
7287
7353
|
tab = id;
|
|
7288
7354
|
view = "term";
|
|
7289
|
-
}, "
|
|
7355
|
+
}, "B42", $scope6_id),
|
|
7290
7356
|
onCloseSession: _resume(function(id) {
|
|
7291
7357
|
closeSession(id);
|
|
7292
|
-
}, "
|
|
7358
|
+
}, "B43", $scope6_id),
|
|
7293
7359
|
onRenameSession: _resume(function(id, title) {
|
|
7294
7360
|
renameSession(id, title);
|
|
7295
|
-
}, "
|
|
7361
|
+
}, "B44", $scope6_id),
|
|
7296
7362
|
active: input.active && view === "term" && s.id === curTab,
|
|
7297
7363
|
mode: view,
|
|
7298
7364
|
onOpenNav: _resume(function() {
|
|
7299
7365
|
toggleNav();
|
|
7300
|
-
}, "
|
|
7366
|
+
}, "B45", $scope6_id),
|
|
7301
7367
|
reviewFindOpen,
|
|
7302
7368
|
onToggleReviewFind: _resume(function() {
|
|
7303
7369
|
toggleReviewFind();
|
|
7304
|
-
}, "
|
|
7370
|
+
}, "B46", $scope6_id)
|
|
7305
7371
|
});
|
|
7306
7372
|
_html(`</div>${_el_resume($scope6_id, "a")}`);
|
|
7307
7373
|
_subscribe($newSession2__closures, _subscribe($renameSession2__closures, _subscribe($closeSession2__closures, _subscribe($toggleReviewFind2__closures, _subscribe($curTab__closures, _subscribe($shownSessions__closures, _subscribe($si__input_workspace && $ws_name__closures, _subscribe($si__input_workspace && $ws_id__closures, _subscribe($reviewFindOpen__closures, _subscribe($view__closures, _subscribe($si__input_agents && $input_agents__closures, _subscribe($si__input_active && $input_active__closures, writeScope($scope6_id, {
|
|
@@ -7313,7 +7379,7 @@ var work_view_default = _template("z", (input) => {
|
|
|
7313
7379
|
if (!shownSessions.length && view === "term") {
|
|
7314
7380
|
const $scope7_id = _scope_id();
|
|
7315
7381
|
_html(`<div${_attr_class("_bB")}><span>No sessions in this workspace.</span><button${_attr_class(["_l", "_m"])}${_attr("disabled", spawning)}>${spawning ? "Starting…" : `Start ${_escape(`${input.preferred || "shell"}`)}`}${_el_resume($scope7_id, "c")}</button>${_el_resume($scope7_id, "b")}</div>`);
|
|
7316
|
-
_script($scope7_id, "
|
|
7382
|
+
_script($scope7_id, "B48");
|
|
7317
7383
|
_subscribe($spawning__closures, _subscribe($si__input_preferred && $input_preferred__closures, writeScope($scope7_id, {})));
|
|
7318
7384
|
return 0;
|
|
7319
7385
|
}
|
|
@@ -7328,89 +7394,93 @@ var work_view_default = _template("z", (input) => {
|
|
|
7328
7394
|
}
|
|
7329
7395
|
}, $scope0_id, "j", 1, 1, 1, "</div>");
|
|
7330
7396
|
_html(`</div></div>${_el_resume($scope0_id, "a")}`);
|
|
7331
|
-
_script($scope0_id, "
|
|
7332
|
-
_script($scope0_id, "
|
|
7333
|
-
_script($scope0_id, "
|
|
7334
|
-
_script($scope0_id, "
|
|
7335
|
-
_script($scope0_id, "
|
|
7336
|
-
_script($scope0_id, "
|
|
7337
|
-
_script($scope0_id, "
|
|
7338
|
-
_script($scope0_id, "
|
|
7339
|
-
_script($scope0_id, "
|
|
7397
|
+
_script($scope0_id, "B49");
|
|
7398
|
+
_script($scope0_id, "B50");
|
|
7399
|
+
_script($scope0_id, "B51");
|
|
7400
|
+
_script($scope0_id, "B52");
|
|
7401
|
+
_script($scope0_id, "B53");
|
|
7402
|
+
_script($scope0_id, "B54");
|
|
7403
|
+
_script($scope0_id, "B55");
|
|
7404
|
+
_script($scope0_id, "B56");
|
|
7405
|
+
_script($scope0_id, "B57");
|
|
7340
7406
|
writeScope($scope0_id, {
|
|
7341
7407
|
n: input.initialView,
|
|
7342
|
-
|
|
7343
|
-
|
|
7344
|
-
|
|
7345
|
-
|
|
7346
|
-
|
|
7347
|
-
|
|
7348
|
-
|
|
7349
|
-
|
|
7350
|
-
|
|
7351
|
-
|
|
7352
|
-
|
|
7353
|
-
|
|
7354
|
-
|
|
7355
|
-
|
|
7356
|
-
|
|
7357
|
-
|
|
7358
|
-
|
|
7359
|
-
|
|
7360
|
-
|
|
7361
|
-
|
|
7362
|
-
|
|
7363
|
-
|
|
7364
|
-
|
|
7365
|
-
|
|
7366
|
-
|
|
7367
|
-
|
|
7368
|
-
|
|
7369
|
-
|
|
7370
|
-
|
|
7371
|
-
|
|
7372
|
-
|
|
7373
|
-
|
|
7374
|
-
|
|
7375
|
-
|
|
7376
|
-
|
|
7377
|
-
|
|
7378
|
-
|
|
7379
|
-
b5:
|
|
7380
|
-
|
|
7381
|
-
|
|
7382
|
-
|
|
7383
|
-
|
|
7384
|
-
|
|
7385
|
-
|
|
7386
|
-
|
|
7387
|
-
|
|
7388
|
-
|
|
7389
|
-
|
|
7390
|
-
|
|
7391
|
-
|
|
7392
|
-
|
|
7393
|
-
|
|
7394
|
-
|
|
7395
|
-
|
|
7396
|
-
|
|
7397
|
-
|
|
7408
|
+
s: input.allStatus,
|
|
7409
|
+
t: input.active,
|
|
7410
|
+
u: input.creating,
|
|
7411
|
+
v: input.onExitCreate,
|
|
7412
|
+
w: input.onNew,
|
|
7413
|
+
x: input.onRouteChange,
|
|
7414
|
+
y: input.preferred,
|
|
7415
|
+
z: input.onSelectWorkspace,
|
|
7416
|
+
a0: input.setup,
|
|
7417
|
+
a1: input.allWorkspaces,
|
|
7418
|
+
a2: input.agents,
|
|
7419
|
+
a3: input.onWorkspaceChange,
|
|
7420
|
+
a4: input.onWorkspaceDeleted,
|
|
7421
|
+
a5: input.onSetupChange,
|
|
7422
|
+
a6: input.onPreferredChange,
|
|
7423
|
+
a7: input.onAgentsChange,
|
|
7424
|
+
a8: input.onCreated,
|
|
7425
|
+
a9: sessions,
|
|
7426
|
+
aa: tab,
|
|
7427
|
+
ab: view,
|
|
7428
|
+
ad: diffMounted,
|
|
7429
|
+
ae: DiffView,
|
|
7430
|
+
ag: loadDiffView,
|
|
7431
|
+
al: reviewFindOpen,
|
|
7432
|
+
an: reviewFindTick,
|
|
7433
|
+
ao: reviewFindFocus,
|
|
7434
|
+
aq: focusPr,
|
|
7435
|
+
ar: focusNonce,
|
|
7436
|
+
as: reviewScope,
|
|
7437
|
+
at: reviewFile,
|
|
7438
|
+
au: focusFile,
|
|
7439
|
+
av: focusFileNonce,
|
|
7440
|
+
ax: error,
|
|
7441
|
+
ay: spawning,
|
|
7442
|
+
az: ws,
|
|
7443
|
+
b0: ws?.id,
|
|
7444
|
+
b4: ws?.status,
|
|
7445
|
+
b5: ws?.branch,
|
|
7446
|
+
b6: ws?.name,
|
|
7447
|
+
b7: openDiff,
|
|
7448
|
+
b9: openManage,
|
|
7449
|
+
bb: openSettings,
|
|
7450
|
+
be: toggleNav,
|
|
7451
|
+
bf: toggleDiff,
|
|
7452
|
+
bg: shownSessions,
|
|
7453
|
+
bi: shownSessions?.length,
|
|
7454
|
+
bj: curTab,
|
|
7455
|
+
bm: createGate.open,
|
|
7456
|
+
bo: toggleReviewFind,
|
|
7457
|
+
bp: exitCreate,
|
|
7458
|
+
bt: applyView,
|
|
7459
|
+
bv: createSession,
|
|
7460
|
+
by: loadMem.wanted,
|
|
7461
|
+
c0: loadMem.run,
|
|
7462
|
+
c1: loadBody,
|
|
7463
|
+
c3: loadSessions,
|
|
7464
|
+
c6: closeSession,
|
|
7465
|
+
c7: renameSession,
|
|
7466
|
+
c8: newSession,
|
|
7467
|
+
ca: onKey,
|
|
7398
7468
|
c: _existing_scope($childScope),
|
|
7399
|
-
|
|
7400
|
-
|
|
7401
|
-
|
|
7402
|
-
|
|
7403
|
-
|
|
7404
|
-
|
|
7405
|
-
|
|
7406
|
-
|
|
7407
|
-
|
|
7408
|
-
|
|
7409
|
-
|
|
7410
|
-
|
|
7411
|
-
|
|
7412
|
-
|
|
7413
|
-
|
|
7469
|
+
cy: $error__closures,
|
|
7470
|
+
cc: $si__input_active && $input_active__closures,
|
|
7471
|
+
ch: $si__input_agents && $input_agents__closures,
|
|
7472
|
+
co: $view__closures,
|
|
7473
|
+
cq: $reviewFindOpen__closures,
|
|
7474
|
+
d1: $si__input_workspace && $ws_id__closures,
|
|
7475
|
+
d3: $si__input_workspace && $ws_name__closures,
|
|
7476
|
+
d4: $shownSessions__closures,
|
|
7477
|
+
d6: $curTab__closures,
|
|
7478
|
+
d7: $toggleReviewFind2__closures,
|
|
7479
|
+
d9: $closeSession2__closures,
|
|
7480
|
+
da: $renameSession2__closures,
|
|
7481
|
+
db: $newSession2__closures,
|
|
7482
|
+
cd: $si__input_preferred && $input_preferred__closures,
|
|
7483
|
+
cz: $spawning__closures
|
|
7414
7484
|
});
|
|
7415
7485
|
_resume_branch($scope0_id);
|
|
7416
7486
|
});
|
|
@@ -7427,6 +7497,8 @@ var app_shell_default = _template("c", (input) => {
|
|
|
7427
7497
|
const $initial_view__closures = /* @__PURE__ */ new Set();
|
|
7428
7498
|
const $initial_sessionId__closures = /* @__PURE__ */ new Set();
|
|
7429
7499
|
const $initial_pr__closures = /* @__PURE__ */ new Set();
|
|
7500
|
+
const $initial_scope__closures = /* @__PURE__ */ new Set();
|
|
7501
|
+
const $initial_file__closures = /* @__PURE__ */ new Set();
|
|
7430
7502
|
const $workspaces__closures = /* @__PURE__ */ new Set();
|
|
7431
7503
|
const $status__closures = /* @__PURE__ */ new Set();
|
|
7432
7504
|
const $settings__closures = /* @__PURE__ */ new Set();
|
|
@@ -7632,13 +7704,17 @@ var app_shell_default = _template("c", (input) => {
|
|
|
7632
7704
|
initialView: ws.id === initial.workspaceId || !initial.workspaceId ? initial.view : void 0,
|
|
7633
7705
|
initialTab: ws.id === initial.workspaceId ? initial.sessionId ?? null : null,
|
|
7634
7706
|
initialPr: ws.id === initial.workspaceId ? initial.pr ?? null : null,
|
|
7707
|
+
initialScope: ws.id === initial.workspaceId ? initial.scope ?? null : null,
|
|
7708
|
+
initialFile: ws.id === initial.workspaceId ? initial.file ?? null : null,
|
|
7635
7709
|
onRouteChange: _resume(function(r) {
|
|
7636
7710
|
if (ws.id !== selectedId) return;
|
|
7637
7711
|
route = {
|
|
7638
7712
|
workspaceId: ws.id,
|
|
7639
7713
|
view: r.view,
|
|
7640
7714
|
sessionId: r.sessionId,
|
|
7641
|
-
pr: r.pr
|
|
7715
|
+
pr: r.pr,
|
|
7716
|
+
scope: r.scope,
|
|
7717
|
+
file: r.file
|
|
7642
7718
|
};
|
|
7643
7719
|
}, "c12", $scope2_id),
|
|
7644
7720
|
onPreferredChange: _resume(function(agent) {
|
|
@@ -7677,7 +7753,7 @@ var app_shell_default = _template("c", (input) => {
|
|
|
7677
7753
|
}, "c20", $scope2_id)
|
|
7678
7754
|
});
|
|
7679
7755
|
_show_end($scope2_id, "d", $show);
|
|
7680
|
-
_subscribe($openWorkspace2__closures, _subscribe($applyWorkspaces2__closures, _subscribe($setup2__closures, _subscribe($creating__closures, _subscribe($selectedId__closures, _subscribe($settings__closures, _subscribe($status__closures, _subscribe($workspaces__closures, _subscribe($si__input_initial && $initial_pr__closures, _subscribe($si__input_initial && $initial_sessionId__closures, _subscribe($si__input_initial && $initial_view__closures, _subscribe($si__input_initial && $initial_workspaceId__closures, writeScope($scope2_id, { b: _existing_scope($childScope3) })))))))))))));
|
|
7756
|
+
_subscribe($openWorkspace2__closures, _subscribe($applyWorkspaces2__closures, _subscribe($setup2__closures, _subscribe($creating__closures, _subscribe($selectedId__closures, _subscribe($settings__closures, _subscribe($status__closures, _subscribe($workspaces__closures, _subscribe($si__input_initial && $initial_file__closures, _subscribe($si__input_initial && $initial_scope__closures, _subscribe($si__input_initial && $initial_pr__closures, _subscribe($si__input_initial && $initial_sessionId__closures, _subscribe($si__input_initial && $initial_view__closures, _subscribe($si__input_initial && $initial_workspaceId__closures, writeScope($scope2_id, { b: _existing_scope($childScope3) })))))))))))))));
|
|
7681
7757
|
return 0;
|
|
7682
7758
|
}
|
|
7683
7759
|
}, $scope1_id, "a");
|
|
@@ -7697,41 +7773,45 @@ var app_shell_default = _template("c", (input) => {
|
|
|
7697
7773
|
t: initial.view,
|
|
7698
7774
|
u: initial.sessionId,
|
|
7699
7775
|
v: initial.pr,
|
|
7700
|
-
w:
|
|
7701
|
-
x:
|
|
7702
|
-
y:
|
|
7703
|
-
z:
|
|
7704
|
-
a0:
|
|
7705
|
-
|
|
7706
|
-
|
|
7707
|
-
|
|
7708
|
-
|
|
7709
|
-
|
|
7710
|
-
|
|
7711
|
-
|
|
7712
|
-
|
|
7713
|
-
af:
|
|
7714
|
-
|
|
7715
|
-
|
|
7716
|
-
aj:
|
|
7717
|
-
ak:
|
|
7718
|
-
|
|
7719
|
-
|
|
7720
|
-
|
|
7721
|
-
|
|
7722
|
-
|
|
7723
|
-
as:
|
|
7724
|
-
|
|
7725
|
-
au: $si__input_initial && $
|
|
7726
|
-
av: $si__input_initial && $
|
|
7727
|
-
aw: $
|
|
7728
|
-
ax: $
|
|
7729
|
-
ay: $
|
|
7730
|
-
az: $
|
|
7731
|
-
b0: $
|
|
7732
|
-
b1: $
|
|
7733
|
-
|
|
7734
|
-
|
|
7776
|
+
w: initial.scope,
|
|
7777
|
+
x: initial.file,
|
|
7778
|
+
y: workspaces,
|
|
7779
|
+
z: status,
|
|
7780
|
+
a0: settings,
|
|
7781
|
+
a1: $si__input_initial && last,
|
|
7782
|
+
a2: $si__input_initial && bootActive,
|
|
7783
|
+
a4: $si__input_initial && bootActive?.length,
|
|
7784
|
+
a6: selectedId,
|
|
7785
|
+
a7: openIds,
|
|
7786
|
+
aa: creating,
|
|
7787
|
+
ab: route,
|
|
7788
|
+
ad: lastUrl.route,
|
|
7789
|
+
af: setup,
|
|
7790
|
+
ag: wantSetup,
|
|
7791
|
+
ah: showSetup,
|
|
7792
|
+
aj: error,
|
|
7793
|
+
ak: applyWorkspaces,
|
|
7794
|
+
al: load,
|
|
7795
|
+
am: patchStatusSessions,
|
|
7796
|
+
ao: statusMem.fresh,
|
|
7797
|
+
ap: statusMem.run,
|
|
7798
|
+
ar: loadStatus,
|
|
7799
|
+
as: openWorkspace,
|
|
7800
|
+
b6: $error__closures,
|
|
7801
|
+
au: $si__input_initial && $initial_workspaceId__closures,
|
|
7802
|
+
av: $si__input_initial && $initial_view__closures,
|
|
7803
|
+
aw: $si__input_initial && $initial_sessionId__closures,
|
|
7804
|
+
ax: $si__input_initial && $initial_pr__closures,
|
|
7805
|
+
ay: $si__input_initial && $initial_scope__closures,
|
|
7806
|
+
az: $si__input_initial && $initial_file__closures,
|
|
7807
|
+
b0: $workspaces__closures,
|
|
7808
|
+
b1: $status__closures,
|
|
7809
|
+
b2: $settings__closures,
|
|
7810
|
+
b3: $selectedId__closures,
|
|
7811
|
+
b4: $creating__closures,
|
|
7812
|
+
b5: $setup2__closures,
|
|
7813
|
+
b7: $applyWorkspaces2__closures,
|
|
7814
|
+
b8: $openWorkspace2__closures
|
|
7735
7815
|
});
|
|
7736
7816
|
_resume_branch($scope0_id);
|
|
7737
7817
|
});
|
|
@@ -7831,7 +7911,7 @@ var app_page_default = _template("b", (input) => {
|
|
|
7831
7911
|
});
|
|
7832
7912
|
//#endregion
|
|
7833
7913
|
//#region src/routes/_app/new/+page.marko
|
|
7834
|
-
var _page_default$4 = _template("
|
|
7914
|
+
var _page_default$4 = _template("Y", (input) => {
|
|
7835
7915
|
_scope_reason();
|
|
7836
7916
|
_scope_id();
|
|
7837
7917
|
app_page_default({ initial: {
|
|
@@ -7873,7 +7953,7 @@ var GET$18 = Run.GET(async (_ctx, next) => {
|
|
|
7873
7953
|
});
|
|
7874
7954
|
//#endregion
|
|
7875
7955
|
//#region src/routes/_app/settings/+page.marko
|
|
7876
|
-
var _page_default$3 = _template("
|
|
7956
|
+
var _page_default$3 = _template("Z", (input) => {
|
|
7877
7957
|
_scope_reason();
|
|
7878
7958
|
_scope_id();
|
|
7879
7959
|
app_page_default({ initial: {
|
|
@@ -7910,7 +7990,7 @@ function head3(context) {
|
|
|
7910
7990
|
}
|
|
7911
7991
|
//#endregion
|
|
7912
7992
|
//#region src/routes/_app/w/$id/+page.marko
|
|
7913
|
-
var _page_default$2 = _template("
|
|
7993
|
+
var _page_default$2 = _template("$", (input) => {
|
|
7914
7994
|
_scope_reason();
|
|
7915
7995
|
_scope_id();
|
|
7916
7996
|
app_page_default({ initial: {
|
|
@@ -7947,7 +8027,7 @@ function head4(context) {
|
|
|
7947
8027
|
}
|
|
7948
8028
|
//#endregion
|
|
7949
8029
|
//#region src/routes/_app/w/$id/manage/+page.marko
|
|
7950
|
-
var _page_default$1 = _template("
|
|
8030
|
+
var _page_default$1 = _template("ab", (input) => {
|
|
7951
8031
|
_scope_reason();
|
|
7952
8032
|
_scope_id();
|
|
7953
8033
|
app_page_default({ initial: {
|
|
@@ -7983,13 +8063,17 @@ function head5(context) {
|
|
|
7983
8063
|
}
|
|
7984
8064
|
//#endregion
|
|
7985
8065
|
//#region src/routes/_app/w/$id/review/+page.marko
|
|
7986
|
-
var _page_default = _template("
|
|
8066
|
+
var _page_default = _template("bb", (input) => {
|
|
7987
8067
|
_scope_reason();
|
|
7988
8068
|
_scope_id();
|
|
8069
|
+
const q = $global().url.searchParams;
|
|
8070
|
+
const scope = q.get("scope");
|
|
7989
8071
|
app_page_default({ initial: {
|
|
7990
8072
|
workspaceId: $global().params.id,
|
|
7991
8073
|
view: "diff",
|
|
7992
|
-
pr:
|
|
8074
|
+
pr: q.get("pr"),
|
|
8075
|
+
scope: scope === "working" || scope === "dirty" ? scope : null,
|
|
8076
|
+
file: q.get("file")
|
|
7993
8077
|
} });
|
|
7994
8078
|
});
|
|
7995
8079
|
//#endregion
|
|
@@ -8158,6 +8242,21 @@ function _getStandardProps(context) {
|
|
|
8158
8242
|
return cached;
|
|
8159
8243
|
}
|
|
8160
8244
|
/**
|
|
8245
|
+
* Disallows inherited object properties and prevents object prototype
|
|
8246
|
+
* pollution by disallowing certain keys.
|
|
8247
|
+
*
|
|
8248
|
+
* @param object The object to check.
|
|
8249
|
+
* @param key The key to check.
|
|
8250
|
+
*
|
|
8251
|
+
* @returns Whether the key is allowed.
|
|
8252
|
+
*
|
|
8253
|
+
* @internal
|
|
8254
|
+
*/
|
|
8255
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
8256
|
+
function _isValidObjectKey(object$1, key) {
|
|
8257
|
+
return Object.prototype.hasOwnProperty.call(object$1, key) && key !== "__proto__" && key !== "prototype" && key !== "constructor";
|
|
8258
|
+
}
|
|
8259
|
+
/**
|
|
8161
8260
|
* Joins multiple `expects` values with the given separator.
|
|
8162
8261
|
*
|
|
8163
8262
|
* @param values The `expects` values.
|
|
@@ -8577,6 +8676,74 @@ function picklist(options, message$1) {
|
|
|
8577
8676
|
};
|
|
8578
8677
|
}
|
|
8579
8678
|
/* @__NO_SIDE_EFFECTS__ */
|
|
8679
|
+
function record(key, value$1, message$1) {
|
|
8680
|
+
return {
|
|
8681
|
+
kind: "schema",
|
|
8682
|
+
type: "record",
|
|
8683
|
+
reference: record,
|
|
8684
|
+
expects: "Object",
|
|
8685
|
+
async: false,
|
|
8686
|
+
key,
|
|
8687
|
+
value: value$1,
|
|
8688
|
+
message: message$1,
|
|
8689
|
+
get "~standard"() {
|
|
8690
|
+
return /* @__PURE__ */ _getStandardProps(this);
|
|
8691
|
+
},
|
|
8692
|
+
"~run"(dataset, config$1) {
|
|
8693
|
+
const input = dataset.value;
|
|
8694
|
+
if (input && typeof input === "object") {
|
|
8695
|
+
dataset.typed = true;
|
|
8696
|
+
dataset.value = {};
|
|
8697
|
+
for (const entryKey in input) if (/* @__PURE__ */ _isValidObjectKey(input, entryKey)) {
|
|
8698
|
+
const entryValue = input[entryKey];
|
|
8699
|
+
const keyDataset = this.key["~run"]({ value: entryKey }, config$1);
|
|
8700
|
+
if (keyDataset.issues) {
|
|
8701
|
+
const pathItem = {
|
|
8702
|
+
type: "object",
|
|
8703
|
+
origin: "key",
|
|
8704
|
+
input,
|
|
8705
|
+
key: entryKey,
|
|
8706
|
+
value: entryValue
|
|
8707
|
+
};
|
|
8708
|
+
for (const issue of keyDataset.issues) {
|
|
8709
|
+
issue.path = [pathItem];
|
|
8710
|
+
dataset.issues?.push(issue);
|
|
8711
|
+
}
|
|
8712
|
+
if (!dataset.issues) dataset.issues = keyDataset.issues;
|
|
8713
|
+
if (config$1.abortEarly) {
|
|
8714
|
+
dataset.typed = false;
|
|
8715
|
+
break;
|
|
8716
|
+
}
|
|
8717
|
+
}
|
|
8718
|
+
const valueDataset = this.value["~run"]({ value: entryValue }, config$1);
|
|
8719
|
+
if (valueDataset.issues) {
|
|
8720
|
+
const pathItem = {
|
|
8721
|
+
type: "object",
|
|
8722
|
+
origin: "value",
|
|
8723
|
+
input,
|
|
8724
|
+
key: entryKey,
|
|
8725
|
+
value: entryValue
|
|
8726
|
+
};
|
|
8727
|
+
for (const issue of valueDataset.issues) {
|
|
8728
|
+
if (issue.path) issue.path.unshift(pathItem);
|
|
8729
|
+
else issue.path = [pathItem];
|
|
8730
|
+
dataset.issues?.push(issue);
|
|
8731
|
+
}
|
|
8732
|
+
if (!dataset.issues) dataset.issues = valueDataset.issues;
|
|
8733
|
+
if (config$1.abortEarly) {
|
|
8734
|
+
dataset.typed = false;
|
|
8735
|
+
break;
|
|
8736
|
+
}
|
|
8737
|
+
}
|
|
8738
|
+
if (!keyDataset.typed || !valueDataset.typed) dataset.typed = false;
|
|
8739
|
+
if (keyDataset.typed) dataset.value[keyDataset.value] = valueDataset.value;
|
|
8740
|
+
}
|
|
8741
|
+
} else _addIssue(this, "type", dataset, config$1);
|
|
8742
|
+
return dataset;
|
|
8743
|
+
}
|
|
8744
|
+
};
|
|
8745
|
+
}
|
|
8746
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
8580
8747
|
function string(message$1) {
|
|
8581
8748
|
return {
|
|
8582
8749
|
kind: "schema",
|
|
@@ -9113,45 +9280,9 @@ function head17(context) {
|
|
|
9113
9280
|
return stripResponseBody(get17(context));
|
|
9114
9281
|
}
|
|
9115
9282
|
//#endregion
|
|
9116
|
-
//#region src/server/review.ts
|
|
9117
|
-
function reviewState(workspaceId) {
|
|
9118
|
-
return { comments: all("SELECT * FROM review_comments WHERE workspace_id = ? ORDER BY worktree, path, line_start", workspaceId) };
|
|
9119
|
-
}
|
|
9120
|
-
function addComment(workspaceId, comment) {
|
|
9121
|
-
const { lastInsertRowid } = db.prepare(`INSERT INTO review_comments
|
|
9122
|
-
(workspace_id, worktree, path, side, line_start, line_end, text)
|
|
9123
|
-
VALUES (?, ?, ?, ?, ?, ?, ?)`).run(workspaceId, comment.worktree, comment.path, comment.side, comment.line_start, comment.line_end, comment.text);
|
|
9124
|
-
publish("review.changed", { workspaceId });
|
|
9125
|
-
return get("SELECT * FROM review_comments WHERE id = ?", lastInsertRowid);
|
|
9126
|
-
}
|
|
9127
|
-
function deleteComment(id) {
|
|
9128
|
-
const row = get("SELECT workspace_id FROM review_comments WHERE id = ?", id);
|
|
9129
|
-
db.prepare("DELETE FROM review_comments WHERE id = ?").run(id);
|
|
9130
|
-
if (row) publish("review.changed", { workspaceId: row.workspace_id });
|
|
9131
|
-
}
|
|
9132
|
-
function clearComments(workspaceId) {
|
|
9133
|
-
db.prepare("DELETE FROM review_comments WHERE workspace_id = ?").run(workspaceId);
|
|
9134
|
-
publish("review.changed", { workspaceId });
|
|
9135
|
-
}
|
|
9136
|
-
//#endregion
|
|
9137
|
-
//#region __marko-run__api.review-comments.$.js
|
|
9138
|
-
var deleteHandler$2 = normalizeHandler(Run.DELETE({ params({ id }) {
|
|
9139
|
-
const n = Number(id);
|
|
9140
|
-
if (!Number.isInteger(n)) throw httpError(400, "invalid comment id");
|
|
9141
|
-
return { id: n };
|
|
9142
|
-
} }, (ctx) => {
|
|
9143
|
-
deleteComment(ctx.params.id);
|
|
9144
|
-
return Response.json({ ok: true });
|
|
9145
|
-
}), "DELETE");
|
|
9146
|
-
var delete18_options = mergeOptions(mware11, deleteHandler$2);
|
|
9147
|
-
function delete18(context) {
|
|
9148
|
-
const __deleteHandler = (data) => call(deleteHandler$2, noContent, context, data);
|
|
9149
|
-
return call(mware11, __deleteHandler, context);
|
|
9150
|
-
}
|
|
9151
|
-
//#endregion
|
|
9152
9283
|
//#region src/routes/api/sessions/$id/+handler.ts
|
|
9153
|
-
var Rename = /* @__PURE__ */ object({ title: /* @__PURE__ */ pipe(/* @__PURE__ */ string(), /* @__PURE__ */ trim(), /* @__PURE__ */
|
|
9154
|
-
var DELETE$
|
|
9284
|
+
var Rename = /* @__PURE__ */ object({ title: /* @__PURE__ */ pipe(/* @__PURE__ */ string(), /* @__PURE__ */ trim(), /* @__PURE__ */ maxLength(60)) });
|
|
9285
|
+
var DELETE$2 = Run.DELETE(async (ctx) => {
|
|
9155
9286
|
await killSession(ctx.params.id);
|
|
9156
9287
|
return Response.json({ ok: true });
|
|
9157
9288
|
});
|
|
@@ -9159,17 +9290,17 @@ var DELETE$1 = Run.DELETE(async (ctx) => {
|
|
|
9159
9290
|
//#region __marko-run__api.sessions.$.js
|
|
9160
9291
|
var patchHandler = normalizeHandler(Run.PATCH({ json: Rename }, async (ctx) => {
|
|
9161
9292
|
const body = await readBody(ctx);
|
|
9162
|
-
renameSession(ctx.params.id, body.title);
|
|
9293
|
+
renameSession(ctx.params.id, body.title || null);
|
|
9163
9294
|
return Response.json({ ok: true });
|
|
9164
9295
|
}), "PATCH");
|
|
9165
|
-
var deleteHandler$
|
|
9166
|
-
var
|
|
9167
|
-
var
|
|
9168
|
-
function
|
|
9169
|
-
const __deleteHandler = (data) => call(deleteHandler$
|
|
9296
|
+
var deleteHandler$2 = normalizeHandler(DELETE$2, "DELETE");
|
|
9297
|
+
var delete18_options = mergeOptions(mware11, deleteHandler$2);
|
|
9298
|
+
var patch18_options = mergeOptions(mware11, patchHandler);
|
|
9299
|
+
function delete18(context) {
|
|
9300
|
+
const __deleteHandler = (data) => call(deleteHandler$2, noContent, context, data);
|
|
9170
9301
|
return call(mware11, __deleteHandler, context);
|
|
9171
9302
|
}
|
|
9172
|
-
function
|
|
9303
|
+
function patch18(context) {
|
|
9173
9304
|
const __patchHandler = (data) => call(patchHandler, noContent, context, data);
|
|
9174
9305
|
return call(mware11, __patchHandler, context);
|
|
9175
9306
|
}
|
|
@@ -9190,8 +9321,8 @@ var postHandler$8 = normalizeHandler(Run.POST({ json: Send }, async (ctx) => {
|
|
|
9190
9321
|
} : void 0);
|
|
9191
9322
|
return Response.json({ ok: true });
|
|
9192
9323
|
}), "POST");
|
|
9193
|
-
var
|
|
9194
|
-
function
|
|
9324
|
+
var post19_options = mergeOptions(mware11, postHandler$8);
|
|
9325
|
+
function post19(context) {
|
|
9195
9326
|
const __postHandler = (data) => call(postHandler$8, noContent, context, data);
|
|
9196
9327
|
return call(mware11, __postHandler, context);
|
|
9197
9328
|
}
|
|
@@ -9223,31 +9354,31 @@ var putHandler = normalizeHandler(Run.PUT({ json: Patch }, async (ctx) => {
|
|
|
9223
9354
|
return Response.json(snapshot());
|
|
9224
9355
|
}), "PUT");
|
|
9225
9356
|
var getHandler$10 = normalizeHandler(GET$10, "GET");
|
|
9226
|
-
var
|
|
9227
|
-
var
|
|
9228
|
-
var
|
|
9229
|
-
function
|
|
9357
|
+
var get20_options = mergeOptions(mware11, getHandler$10);
|
|
9358
|
+
var head20_options = mergeOptions(mware11);
|
|
9359
|
+
var put20_options = mergeOptions(mware11, putHandler);
|
|
9360
|
+
function get20(context) {
|
|
9230
9361
|
const __getHandler = (data) => call(getHandler$10, noContent, context, data);
|
|
9231
9362
|
return call(mware11, __getHandler, context);
|
|
9232
9363
|
}
|
|
9233
|
-
function
|
|
9234
|
-
return stripResponseBody(
|
|
9364
|
+
function head20(context) {
|
|
9365
|
+
return stripResponseBody(get20(context));
|
|
9235
9366
|
}
|
|
9236
|
-
function
|
|
9367
|
+
function put20(context) {
|
|
9237
9368
|
const __putHandler = (data) => call(putHandler, noContent, context, data);
|
|
9238
9369
|
return call(mware11, __putHandler, context);
|
|
9239
9370
|
}
|
|
9240
9371
|
//#endregion
|
|
9241
9372
|
//#region __marko-run__api.setup.js
|
|
9242
9373
|
var getHandler$9 = normalizeHandler(Run.GET({ search: (value) => ({ refresh: "refresh" in value }) }, async (ctx) => Response.json(await getSetup(ctx.search.refresh))), "GET");
|
|
9243
|
-
var
|
|
9244
|
-
var
|
|
9245
|
-
function
|
|
9374
|
+
var get21_options = mergeOptions(mware11, getHandler$9);
|
|
9375
|
+
var head21_options = mergeOptions(mware11);
|
|
9376
|
+
function get21(context) {
|
|
9246
9377
|
const __getHandler = (data) => call(getHandler$9, noContent, context, data);
|
|
9247
9378
|
return call(mware11, __getHandler, context);
|
|
9248
9379
|
}
|
|
9249
|
-
function
|
|
9250
|
-
return stripResponseBody(
|
|
9380
|
+
function head21(context) {
|
|
9381
|
+
return stripResponseBody(get21(context));
|
|
9251
9382
|
}
|
|
9252
9383
|
//#endregion
|
|
9253
9384
|
//#region src/routes/api/setup/$id/+handler.ts
|
|
@@ -9267,34 +9398,34 @@ var postHandler$7 = normalizeHandler(Run.POST({ json: Body }, async (ctx) => {
|
|
|
9267
9398
|
const body = await readBody(ctx);
|
|
9268
9399
|
return Response.json(await runSetupAction(ctx.params.id, body.action, { version: body.version }));
|
|
9269
9400
|
}), "POST");
|
|
9270
|
-
var
|
|
9271
|
-
function
|
|
9401
|
+
var post22_options = mergeOptions(mware11, postHandler$7);
|
|
9402
|
+
function post22(context) {
|
|
9272
9403
|
const __postHandler = (data) => call(postHandler$7, noContent, context, data);
|
|
9273
9404
|
return call(mware11, __postHandler, context);
|
|
9274
9405
|
}
|
|
9275
9406
|
//#endregion
|
|
9276
9407
|
//#region __marko-run__api.setup.search.js
|
|
9277
9408
|
var getHandler$8 = normalizeHandler(Run.GET({ search: (value) => ({ q: typeof value.q === "string" ? value.q : "" }) }, async (ctx) => Response.json(await searchMise(ctx.search.q))), "GET");
|
|
9278
|
-
var
|
|
9279
|
-
var
|
|
9280
|
-
function
|
|
9409
|
+
var get23_options = mergeOptions(mware11, getHandler$8);
|
|
9410
|
+
var head23_options = mergeOptions(mware11);
|
|
9411
|
+
function get23(context) {
|
|
9281
9412
|
const __getHandler = (data) => call(getHandler$8, noContent, context, data);
|
|
9282
9413
|
return call(mware11, __getHandler, context);
|
|
9283
9414
|
}
|
|
9284
|
-
function
|
|
9285
|
-
return stripResponseBody(
|
|
9415
|
+
function head23(context) {
|
|
9416
|
+
return stripResponseBody(get23(context));
|
|
9286
9417
|
}
|
|
9287
9418
|
//#endregion
|
|
9288
9419
|
//#region __marko-run__api.status.js
|
|
9289
9420
|
var getHandler$7 = normalizeHandler(Run.GET({ search: (value) => ({ fresh: "fresh" in value }) }, async (ctx) => Response.json(await (ctx.search.fresh ? statusForAllFresh() : statusForAll()))), "GET");
|
|
9290
|
-
var
|
|
9291
|
-
var
|
|
9292
|
-
function
|
|
9421
|
+
var get24_options = mergeOptions(mware11, getHandler$7);
|
|
9422
|
+
var head24_options = mergeOptions(mware11);
|
|
9423
|
+
function get24(context) {
|
|
9293
9424
|
const __getHandler = (data) => call(getHandler$7, noContent, context, data);
|
|
9294
9425
|
return call(mware11, __getHandler, context);
|
|
9295
9426
|
}
|
|
9296
|
-
function
|
|
9297
|
-
return stripResponseBody(
|
|
9427
|
+
function head24(context) {
|
|
9428
|
+
return stripResponseBody(get24(context));
|
|
9298
9429
|
}
|
|
9299
9430
|
//#endregion
|
|
9300
9431
|
//#region src/server/usage/shared.ts
|
|
@@ -10045,14 +10176,14 @@ var usage = async (refresh = false) => {
|
|
|
10045
10176
|
//#endregion
|
|
10046
10177
|
//#region __marko-run__api.usage.js
|
|
10047
10178
|
var getHandler$6 = normalizeHandler(Run.GET({ search: (value) => ({ refresh: "refresh" in value }) }, async (ctx) => Response.json(await usage(ctx.search.refresh))), "GET");
|
|
10048
|
-
var
|
|
10049
|
-
var
|
|
10050
|
-
function
|
|
10179
|
+
var get25_options = mergeOptions(mware11, getHandler$6);
|
|
10180
|
+
var head25_options = mergeOptions(mware11);
|
|
10181
|
+
function get25(context) {
|
|
10051
10182
|
const __getHandler = (data) => call(getHandler$6, noContent, context, data);
|
|
10052
10183
|
return call(mware11, __getHandler, context);
|
|
10053
10184
|
}
|
|
10054
|
-
function
|
|
10055
|
-
return stripResponseBody(
|
|
10185
|
+
function head25(context) {
|
|
10186
|
+
return stripResponseBody(get25(context));
|
|
10056
10187
|
}
|
|
10057
10188
|
//#endregion
|
|
10058
10189
|
//#region src/routes/api/workspaces/+handler.ts
|
|
@@ -10074,17 +10205,17 @@ var postHandler$6 = normalizeHandler(Run.POST({ json: CreateWorkspace }, async (
|
|
|
10074
10205
|
return Response.json(await withProgressOp(body.opId ?? "", () => createWorkspace(body.name, body.repos)));
|
|
10075
10206
|
}), "POST");
|
|
10076
10207
|
var getHandler$5 = normalizeHandler(GET$5, "GET");
|
|
10077
|
-
var
|
|
10078
|
-
var
|
|
10079
|
-
var
|
|
10080
|
-
function
|
|
10208
|
+
var get26_options = mergeOptions(mware11, getHandler$5);
|
|
10209
|
+
var head26_options = mergeOptions(mware11);
|
|
10210
|
+
var post26_options = mergeOptions(mware11, postHandler$6);
|
|
10211
|
+
function get26(context) {
|
|
10081
10212
|
const __getHandler = (data) => call(getHandler$5, noContent, context, data);
|
|
10082
10213
|
return call(mware11, __getHandler, context);
|
|
10083
10214
|
}
|
|
10084
|
-
function
|
|
10085
|
-
return stripResponseBody(
|
|
10215
|
+
function head26(context) {
|
|
10216
|
+
return stripResponseBody(get26(context));
|
|
10086
10217
|
}
|
|
10087
|
-
function
|
|
10218
|
+
function post26(context) {
|
|
10088
10219
|
const __postHandler = (data) => call(postHandler$6, noContent, context, data);
|
|
10089
10220
|
return call(mware11, __postHandler, context);
|
|
10090
10221
|
}
|
|
@@ -10107,11 +10238,11 @@ var postHandler$5 = normalizeHandler(Run.POST({ json: WorkspaceAction }, async (
|
|
|
10107
10238
|
});
|
|
10108
10239
|
return Response.json({ ok: true });
|
|
10109
10240
|
}), "POST");
|
|
10110
|
-
var
|
|
10111
|
-
function
|
|
10241
|
+
var post27_options = mergeOptions(mware11, mware33, postHandler$5);
|
|
10242
|
+
function post27(context) {
|
|
10112
10243
|
const __postHandler = (data) => call(postHandler$5, noContent, context, data);
|
|
10113
|
-
const
|
|
10114
|
-
return call(mware11,
|
|
10244
|
+
const __mware33 = (data) => call(mware33, __postHandler, context, data);
|
|
10245
|
+
return call(mware11, __mware33, context);
|
|
10115
10246
|
}
|
|
10116
10247
|
//#endregion
|
|
10117
10248
|
//#region src/routes/api/workspaces/$id/assets/+handler.ts
|
|
@@ -10130,11 +10261,49 @@ var postHandler$4 = normalizeHandler(Run.POST({ search: (value) => ({ name: type
|
|
|
10130
10261
|
fs.writeFileSync(path.join(ws.path, relative), data);
|
|
10131
10262
|
return Response.json({ path: relative });
|
|
10132
10263
|
}), "POST");
|
|
10133
|
-
var
|
|
10134
|
-
function
|
|
10264
|
+
var post28_options = mergeOptions(mware11, mware33, postHandler$4);
|
|
10265
|
+
function post28(context) {
|
|
10135
10266
|
const __postHandler = (data) => call(postHandler$4, noContent, context, data);
|
|
10136
|
-
const
|
|
10137
|
-
return call(mware11,
|
|
10267
|
+
const __mware33 = (data) => call(mware33, __postHandler, context, data);
|
|
10268
|
+
return call(mware11, __mware33, context);
|
|
10269
|
+
}
|
|
10270
|
+
//#endregion
|
|
10271
|
+
//#region src/server/review.ts
|
|
10272
|
+
function reviewState(workspaceId) {
|
|
10273
|
+
return { comments: all("SELECT * FROM review_comments WHERE workspace_id = ? ORDER BY worktree, path, line_start", workspaceId) };
|
|
10274
|
+
}
|
|
10275
|
+
function addComment(workspaceId, comment) {
|
|
10276
|
+
const { lastInsertRowid } = db.prepare(`INSERT INTO review_comments
|
|
10277
|
+
(workspace_id, worktree, path, side, line_start, line_end, text, head, snippet)
|
|
10278
|
+
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)`).run(workspaceId, comment.worktree, comment.path, comment.side, comment.line_start, comment.line_end, comment.text, comment.head ?? null, comment.snippet ?? null);
|
|
10279
|
+
publish("review.changed", { workspaceId });
|
|
10280
|
+
return get("SELECT * FROM review_comments WHERE id = ?", lastInsertRowid);
|
|
10281
|
+
}
|
|
10282
|
+
function deleteComment(id) {
|
|
10283
|
+
const row = get("SELECT workspace_id FROM review_comments WHERE id = ?", id);
|
|
10284
|
+
db.prepare("DELETE FROM review_comments WHERE id = ?").run(id);
|
|
10285
|
+
if (row) publish("review.changed", { workspaceId: row.workspace_id });
|
|
10286
|
+
}
|
|
10287
|
+
function clearComments(workspaceId) {
|
|
10288
|
+
db.prepare("DELETE FROM review_comments WHERE workspace_id = ?").run(workspaceId);
|
|
10289
|
+
publish("review.changed", { workspaceId });
|
|
10290
|
+
}
|
|
10291
|
+
var seenKey = (workspaceId) => `review.seen:${workspaceId}`;
|
|
10292
|
+
function reviewSeen(workspaceId) {
|
|
10293
|
+
const raw = getSetting(seenKey(workspaceId));
|
|
10294
|
+
if (!raw) return null;
|
|
10295
|
+
try {
|
|
10296
|
+
const parsed = JSON.parse(raw);
|
|
10297
|
+
return {
|
|
10298
|
+
heads: parsed.heads || {},
|
|
10299
|
+
dirty: parsed.dirty || {}
|
|
10300
|
+
};
|
|
10301
|
+
} catch {
|
|
10302
|
+
return null;
|
|
10303
|
+
}
|
|
10304
|
+
}
|
|
10305
|
+
function markReviewSeen(workspaceId, seen) {
|
|
10306
|
+
setSetting(seenKey(workspaceId), JSON.stringify(seen));
|
|
10138
10307
|
}
|
|
10139
10308
|
//#endregion
|
|
10140
10309
|
//#region src/server/diff.ts
|
|
@@ -10232,12 +10401,13 @@ async function treeContainedIn(dir, base, head) {
|
|
|
10232
10401
|
}
|
|
10233
10402
|
/** Open PRs as GitHub's files tab (remote head vs the PR's `--base`).
|
|
10234
10403
|
* Repos with no open PR fall back to the local checkout vs the derived
|
|
10235
|
-
* base. `pr` (`worktree/number`) focuses one PR. `
|
|
10236
|
-
* the working tree on the PR whose head is the current branch. */
|
|
10404
|
+
* base. `pr` (`worktree/number`) focuses one PR. `scope` (see DiffScope)
|
|
10405
|
+
* overlays the working tree on the PR whose head is the current branch. */
|
|
10237
10406
|
async function workspaceDiff(ws, opts = {}) {
|
|
10238
|
-
const { baseRef,
|
|
10407
|
+
const { baseRef, scope = "committed", pr: focus, refresh = false } = opts;
|
|
10239
10408
|
if (refresh) for (const repo of ws.repos) lastFetch.delete(repo.full_name);
|
|
10240
10409
|
const foreign = otherWorkspaceBranches(ws.id);
|
|
10410
|
+
const seen = reviewSeen(ws.id);
|
|
10241
10411
|
return (await Promise.all(ws.repos.map(async (repo) => {
|
|
10242
10412
|
const dir = path.join(ws.path, repo.worktree);
|
|
10243
10413
|
const branch = await git([
|
|
@@ -10247,15 +10417,44 @@ async function workspaceDiff(ws, opts = {}) {
|
|
|
10247
10417
|
], dir).catch(() => "HEAD");
|
|
10248
10418
|
const localHead = await headOid(dir);
|
|
10249
10419
|
const open = (await workspacePrs(repo.full_name, ws.branch, foreign, refresh)).filter((p) => p.state === "OPEN" && p.baseRefName && p.headRefName && (!focus || focus === `${repo.worktree}/${p.number}`));
|
|
10250
|
-
|
|
10251
|
-
|
|
10420
|
+
let list;
|
|
10421
|
+
if (open.length) list = await Promise.all(open.map((p) => prDiff(dir, repo, p, {
|
|
10422
|
+
scope: branch === p.headRefName ? scope : "committed",
|
|
10252
10423
|
localHead,
|
|
10253
10424
|
branch
|
|
10254
10425
|
})));
|
|
10255
|
-
if (focus)
|
|
10256
|
-
|
|
10426
|
+
else if (focus) list = [];
|
|
10427
|
+
else list = [await localDiff(dir, ws, repo, branch, localHead, baseRef, scope)];
|
|
10428
|
+
for (const section of list) await markChangedSince(dir, section, seen);
|
|
10429
|
+
return list;
|
|
10257
10430
|
}))).flat();
|
|
10258
10431
|
}
|
|
10432
|
+
/** Flag files touched since the reviewer's last visit: committed changes
|
|
10433
|
+
* between the seen head and this head, plus working-tree files whose
|
|
10434
|
+
* content fingerprint moved. Nothing is flagged on the first visit. */
|
|
10435
|
+
async function markChangedSince(dir, section, seen) {
|
|
10436
|
+
if (!seen) return;
|
|
10437
|
+
const seenHead = seen.heads[section.worktree];
|
|
10438
|
+
if (!seenHead) return;
|
|
10439
|
+
section.seenHead = seenHead;
|
|
10440
|
+
const committed = /* @__PURE__ */ new Set();
|
|
10441
|
+
if (seenHead !== section.head) {
|
|
10442
|
+
const names = await git([
|
|
10443
|
+
"diff",
|
|
10444
|
+
"--name-only",
|
|
10445
|
+
"-z",
|
|
10446
|
+
"--no-renames",
|
|
10447
|
+
seenHead,
|
|
10448
|
+
section.head
|
|
10449
|
+
], dir).catch(() => "");
|
|
10450
|
+
for (const p of names.split("\0")) if (p) committed.add(p);
|
|
10451
|
+
}
|
|
10452
|
+
for (const file of section.files) {
|
|
10453
|
+
const key = `${section.worktree}/${file.path}`;
|
|
10454
|
+
const dirtyMoved = file.hash != null && seen.dirty[key] !== file.hash;
|
|
10455
|
+
if (committed.has(file.path) || dirtyMoved) file.changedSince = true;
|
|
10456
|
+
}
|
|
10457
|
+
}
|
|
10259
10458
|
async function prDiff(dir, repo, pr, ctx) {
|
|
10260
10459
|
await freshenBaseRefs(dir, repo.full_name, [pr.baseRefName, pr.headRefName]);
|
|
10261
10460
|
const headRef = `origin/${pr.headRefName}`;
|
|
@@ -10282,7 +10481,7 @@ async function prDiff(dir, repo, pr, ctx) {
|
|
|
10282
10481
|
head
|
|
10283
10482
|
], dir).catch(() => "");
|
|
10284
10483
|
const contained = await treeContainedIn(dir, baseRef, head);
|
|
10285
|
-
const files = await collectFiles(dir, contained ? head : mergeBase || baseRef, head, ctx.
|
|
10484
|
+
const files = await collectFiles(dir, contained ? head : mergeBase || baseRef, head, ctx.scope);
|
|
10286
10485
|
const githubDrift = !!pr.headRefOid && head !== pr.headRefOid;
|
|
10287
10486
|
return {
|
|
10288
10487
|
id: `${repo.worktree}#${pr.number}`,
|
|
@@ -10300,7 +10499,8 @@ async function prDiff(dir, repo, pr, ctx) {
|
|
|
10300
10499
|
files
|
|
10301
10500
|
};
|
|
10302
10501
|
}
|
|
10303
|
-
async function localDiff(dir, ws, repo, branch, localHead, baseRef,
|
|
10502
|
+
async function localDiff(dir, ws, repo, branch, localHead, baseRef, scope) {
|
|
10503
|
+
const uncommitted = scope !== "committed";
|
|
10304
10504
|
await freshenBaseRefs(dir, repo.full_name, [
|
|
10305
10505
|
ws.branch,
|
|
10306
10506
|
...branch !== "HEAD" ? [branch] : [],
|
|
@@ -10322,7 +10522,7 @@ async function localDiff(dir, ws, repo, branch, localHead, baseRef, uncommitted)
|
|
|
10322
10522
|
const contained = !missing && await treeContainedIn(dir, ref, "HEAD");
|
|
10323
10523
|
const against = contained ? "HEAD" : mergeBase;
|
|
10324
10524
|
const baseSha = missing ? localHead : await git(["rev-parse", ref], dir).catch(() => mergeBase);
|
|
10325
|
-
const files = await collectFiles(dir, against, "HEAD",
|
|
10525
|
+
const files = await collectFiles(dir, against, "HEAD", scope);
|
|
10326
10526
|
return {
|
|
10327
10527
|
id: repo.worktree,
|
|
10328
10528
|
worktree: repo.worktree,
|
|
@@ -10347,7 +10547,9 @@ function prMeta(pr) {
|
|
|
10347
10547
|
...pr.headRefOid && { headRefOid: pr.headRefOid }
|
|
10348
10548
|
};
|
|
10349
10549
|
}
|
|
10350
|
-
async function collectFiles(dir, oldRev, newRev,
|
|
10550
|
+
async function collectFiles(dir, oldRev, newRev, scope) {
|
|
10551
|
+
if (scope === "dirty") oldRev = newRev;
|
|
10552
|
+
const uncommitted = scope !== "committed";
|
|
10351
10553
|
const nameArgs = uncommitted ? [
|
|
10352
10554
|
"diff",
|
|
10353
10555
|
"--name-status",
|
|
@@ -10376,7 +10578,7 @@ async function collectFiles(dir, oldRev, newRev, uncommitted) {
|
|
|
10376
10578
|
oldRev,
|
|
10377
10579
|
newRev
|
|
10378
10580
|
];
|
|
10379
|
-
const [nameStatus, numstat, untracked] = await Promise.all([
|
|
10581
|
+
const [nameStatus, numstat, untracked, dirtyNames] = await Promise.all([
|
|
10380
10582
|
git(nameArgs, dir).catch(() => ""),
|
|
10381
10583
|
git(numArgs, dir).catch(() => ""),
|
|
10382
10584
|
uncommitted ? git([
|
|
@@ -10384,8 +10586,17 @@ async function collectFiles(dir, oldRev, newRev, uncommitted) {
|
|
|
10384
10586
|
"--others",
|
|
10385
10587
|
"--exclude-standard",
|
|
10386
10588
|
"-z"
|
|
10589
|
+
], dir).catch(() => "") : Promise.resolve(""),
|
|
10590
|
+
uncommitted ? git([
|
|
10591
|
+
"diff",
|
|
10592
|
+
"--name-only",
|
|
10593
|
+
"-z",
|
|
10594
|
+
"--no-renames",
|
|
10595
|
+
"HEAD"
|
|
10387
10596
|
], dir).catch(() => "") : Promise.resolve("")
|
|
10388
10597
|
]);
|
|
10598
|
+
const dirtyPaths = new Set(dirtyNames.split("\0").filter(Boolean));
|
|
10599
|
+
for (const file of untracked.split("\0")) if (file) dirtyPaths.add(file);
|
|
10389
10600
|
const entries = [];
|
|
10390
10601
|
const parts = nameStatus.split("\0").filter(Boolean);
|
|
10391
10602
|
for (let i = 0; i + 1 < parts.length; i += 2) entries.push({
|
|
@@ -10401,6 +10612,7 @@ async function collectFiles(dir, oldRev, newRev, uncommitted) {
|
|
|
10401
10612
|
const news = uncommitted ? null : await batchContents(dir, newRev, entries.filter((e) => e.status !== "D").map((e) => e.path));
|
|
10402
10613
|
const files = await Promise.all(entries.map(async (e) => {
|
|
10403
10614
|
const file = news ? fromBlobs(e.path, e.status, olds.get(e.path), news.get(e.path)) : await loadWorktreeFile(dir, e.path, e.status, olds.get(e.path));
|
|
10615
|
+
if (!news && dirtyPaths.has(e.path)) file.hash = createHash("sha1").update(e.status).update(file.new ?? "").digest("hex").slice(0, 16);
|
|
10404
10616
|
const st = stats.get(e.path);
|
|
10405
10617
|
if (st) {
|
|
10406
10618
|
file.additions = st.additions;
|
|
@@ -10533,40 +10745,47 @@ async function loadWorktreeFile(dir, filePath, status, old) {
|
|
|
10533
10745
|
return result;
|
|
10534
10746
|
}
|
|
10535
10747
|
//#endregion
|
|
10748
|
+
//#region src/routes/api/workspaces/$id/diff/+handler.ts
|
|
10749
|
+
var SCOPES = [
|
|
10750
|
+
"committed",
|
|
10751
|
+
"working",
|
|
10752
|
+
"dirty"
|
|
10753
|
+
];
|
|
10754
|
+
//#endregion
|
|
10536
10755
|
//#region __marko-run__api.workspaces.$.diff.js
|
|
10537
10756
|
var getHandler$4 = normalizeHandler(Run.GET({ search: (value) => ({
|
|
10538
10757
|
base: typeof value.base === "string" && value.base ? value.base : void 0,
|
|
10539
|
-
|
|
10758
|
+
scope: SCOPES.includes(value.scope) ? value.scope : value.uncommitted === "1" || value.uncommitted === "true" ? "working" : "committed",
|
|
10540
10759
|
pr: typeof value.pr === "string" && value.pr ? value.pr : void 0,
|
|
10541
10760
|
refresh: "refresh" in value
|
|
10542
10761
|
}) }, async (ctx) => Response.json(await workspaceDiff(ctx.data.workspace, {
|
|
10543
10762
|
baseRef: ctx.search.base,
|
|
10544
|
-
|
|
10763
|
+
scope: ctx.search.scope,
|
|
10545
10764
|
pr: ctx.search.pr,
|
|
10546
10765
|
refresh: ctx.search.refresh
|
|
10547
10766
|
}))), "GET");
|
|
10548
|
-
var
|
|
10549
|
-
var
|
|
10550
|
-
function
|
|
10767
|
+
var get29_options = mergeOptions(mware11, mware33, getHandler$4);
|
|
10768
|
+
var head29_options = mergeOptions(mware11, mware33);
|
|
10769
|
+
function get29(context) {
|
|
10551
10770
|
const __getHandler = (data) => call(getHandler$4, noContent, context, data);
|
|
10552
|
-
const
|
|
10553
|
-
return call(mware11,
|
|
10771
|
+
const __mware33 = (data) => call(mware33, __getHandler, context, data);
|
|
10772
|
+
return call(mware11, __mware33, context);
|
|
10554
10773
|
}
|
|
10555
|
-
function
|
|
10556
|
-
return stripResponseBody(
|
|
10774
|
+
function head29(context) {
|
|
10775
|
+
return stripResponseBody(get29(context));
|
|
10557
10776
|
}
|
|
10558
10777
|
//#endregion
|
|
10559
10778
|
//#region __marko-run__api.workspaces.$.procs.js
|
|
10560
10779
|
var getHandler$3 = normalizeHandler(Run.GET(async (ctx) => Response.json(await workspaceProcs(ctx.data.workspace.path))), "GET");
|
|
10561
|
-
var
|
|
10562
|
-
var
|
|
10563
|
-
function
|
|
10780
|
+
var get30_options = mergeOptions(mware11, mware33, getHandler$3);
|
|
10781
|
+
var head30_options = mergeOptions(mware11, mware33);
|
|
10782
|
+
function get30(context) {
|
|
10564
10783
|
const __getHandler = (data) => call(getHandler$3, noContent, context, data);
|
|
10565
|
-
const
|
|
10566
|
-
return call(mware11,
|
|
10784
|
+
const __mware33 = (data) => call(mware33, __getHandler, context, data);
|
|
10785
|
+
return call(mware11, __mware33, context);
|
|
10567
10786
|
}
|
|
10568
|
-
function
|
|
10569
|
-
return stripResponseBody(
|
|
10787
|
+
function head30(context) {
|
|
10788
|
+
return stripResponseBody(get30(context));
|
|
10570
10789
|
}
|
|
10571
10790
|
//#endregion
|
|
10572
10791
|
//#region src/routes/api/workspaces/$id/prs/+handler.ts
|
|
@@ -10613,21 +10832,21 @@ async function listPrs(ws, refresh) {
|
|
|
10613
10832
|
//#region __marko-run__api.workspaces.$.prs.js
|
|
10614
10833
|
var postHandler$3 = normalizeHandler(POST$3, "POST");
|
|
10615
10834
|
var getHandler$2 = normalizeHandler(GET$2, "GET");
|
|
10616
|
-
var
|
|
10617
|
-
var
|
|
10618
|
-
var
|
|
10619
|
-
function
|
|
10835
|
+
var get31_options = mergeOptions(mware11, mware33, getHandler$2);
|
|
10836
|
+
var head31_options = mergeOptions(mware11, mware33);
|
|
10837
|
+
var post31_options = mergeOptions(mware11, mware33, postHandler$3);
|
|
10838
|
+
function get31(context) {
|
|
10620
10839
|
const __getHandler = (data) => call(getHandler$2, noContent, context, data);
|
|
10621
|
-
const
|
|
10622
|
-
return call(mware11,
|
|
10840
|
+
const __mware33 = (data) => call(mware33, __getHandler, context, data);
|
|
10841
|
+
return call(mware11, __mware33, context);
|
|
10623
10842
|
}
|
|
10624
|
-
function
|
|
10625
|
-
return stripResponseBody(
|
|
10843
|
+
function head31(context) {
|
|
10844
|
+
return stripResponseBody(get31(context));
|
|
10626
10845
|
}
|
|
10627
|
-
function
|
|
10846
|
+
function post31(context) {
|
|
10628
10847
|
const __postHandler = (data) => call(postHandler$3, noContent, context, data);
|
|
10629
|
-
const
|
|
10630
|
-
return call(mware11,
|
|
10848
|
+
const __mware33 = (data) => call(mware33, __postHandler, context, data);
|
|
10849
|
+
return call(mware11, __mware33, context);
|
|
10631
10850
|
}
|
|
10632
10851
|
//#endregion
|
|
10633
10852
|
//#region src/routes/api/workspaces/$id/repos/+handler.ts
|
|
@@ -10641,35 +10860,45 @@ var postHandler$2 = normalizeHandler(Run.POST({ json: AddRepo }, async (ctx) =>
|
|
|
10641
10860
|
const body = await readBody(ctx);
|
|
10642
10861
|
return Response.json(await withProgressOp(ctx.params.id, () => addRepo$1(ctx.params.id, body.fullName, body.baseBranch)));
|
|
10643
10862
|
}), "POST");
|
|
10644
|
-
var
|
|
10645
|
-
function
|
|
10863
|
+
var post32_options = mergeOptions(mware11, mware33, postHandler$2);
|
|
10864
|
+
function post32(context) {
|
|
10646
10865
|
const __postHandler = (data) => call(postHandler$2, noContent, context, data);
|
|
10647
|
-
const
|
|
10648
|
-
return call(mware11,
|
|
10866
|
+
const __mware33 = (data) => call(mware33, __postHandler, context, data);
|
|
10867
|
+
return call(mware11, __mware33, context);
|
|
10649
10868
|
}
|
|
10650
10869
|
//#endregion
|
|
10651
10870
|
//#region __marko-run__api.workspaces.$.repos.$.js
|
|
10652
|
-
var deleteHandler = normalizeHandler(Run.DELETE(async (ctx) => {
|
|
10871
|
+
var deleteHandler$1 = normalizeHandler(Run.DELETE(async (ctx) => {
|
|
10653
10872
|
await withProgressOp(ctx.params.id, () => removeRepo(ctx.params.id, ctx.params.worktree));
|
|
10654
10873
|
return Response.json({ ok: true });
|
|
10655
10874
|
}), "DELETE");
|
|
10656
|
-
var
|
|
10657
|
-
function
|
|
10658
|
-
const __deleteHandler = (data) => call(deleteHandler, noContent, context, data);
|
|
10659
|
-
const
|
|
10660
|
-
return call(mware11,
|
|
10875
|
+
var delete33_options = mergeOptions(mware11, mware33, deleteHandler$1);
|
|
10876
|
+
function delete33(context) {
|
|
10877
|
+
const __deleteHandler = (data) => call(deleteHandler$1, noContent, context, data);
|
|
10878
|
+
const __mware33 = (data) => call(mware33, __deleteHandler, context, data);
|
|
10879
|
+
return call(mware11, __mware33, context);
|
|
10661
10880
|
}
|
|
10662
10881
|
//#endregion
|
|
10663
10882
|
//#region src/routes/api/workspaces/$id/review/+handler.ts
|
|
10664
|
-
var ReviewAction = /* @__PURE__ */ union([
|
|
10665
|
-
|
|
10666
|
-
|
|
10667
|
-
|
|
10668
|
-
|
|
10669
|
-
|
|
10670
|
-
|
|
10671
|
-
|
|
10672
|
-
|
|
10883
|
+
var ReviewAction = /* @__PURE__ */ union([
|
|
10884
|
+
/* @__PURE__ */ object({
|
|
10885
|
+
action: /* @__PURE__ */ literal("comment"),
|
|
10886
|
+
worktree: /* @__PURE__ */ string(),
|
|
10887
|
+
path: /* @__PURE__ */ string(),
|
|
10888
|
+
side: /* @__PURE__ */ picklist(["additions", "deletions"]),
|
|
10889
|
+
line_start: /* @__PURE__ */ pipe(/* @__PURE__ */ number(), /* @__PURE__ */ integer(), /* @__PURE__ */ minValue(1)),
|
|
10890
|
+
line_end: /* @__PURE__ */ pipe(/* @__PURE__ */ number(), /* @__PURE__ */ integer(), /* @__PURE__ */ minValue(1)),
|
|
10891
|
+
text: /* @__PURE__ */ pipe(/* @__PURE__ */ string(), /* @__PURE__ */ trim(), /* @__PURE__ */ minLength(1)),
|
|
10892
|
+
head: /* @__PURE__ */ optional(/* @__PURE__ */ string()),
|
|
10893
|
+
snippet: /* @__PURE__ */ optional(/* @__PURE__ */ string())
|
|
10894
|
+
}),
|
|
10895
|
+
/* @__PURE__ */ object({ action: /* @__PURE__ */ literal("clear") }),
|
|
10896
|
+
/* @__PURE__ */ object({
|
|
10897
|
+
action: /* @__PURE__ */ literal("seen"),
|
|
10898
|
+
heads: /* @__PURE__ */ record(/* @__PURE__ */ string(), /* @__PURE__ */ string()),
|
|
10899
|
+
dirty: /* @__PURE__ */ record(/* @__PURE__ */ string(), /* @__PURE__ */ string())
|
|
10900
|
+
})
|
|
10901
|
+
]);
|
|
10673
10902
|
var GET$1 = Run.GET((ctx) => {
|
|
10674
10903
|
return Response.json(reviewState(ctx.params.id));
|
|
10675
10904
|
});
|
|
@@ -10682,25 +10911,48 @@ var postHandler$1 = normalizeHandler(Run.POST({ json: ReviewAction }, async (ctx
|
|
|
10682
10911
|
if (comment.line_end < comment.line_start) [comment.line_start, comment.line_end] = [comment.line_end, comment.line_start];
|
|
10683
10912
|
return Response.json(addComment(ctx.params.id, comment));
|
|
10684
10913
|
}
|
|
10914
|
+
if (body.action === "seen") {
|
|
10915
|
+
markReviewSeen(ctx.params.id, {
|
|
10916
|
+
heads: body.heads,
|
|
10917
|
+
dirty: body.dirty
|
|
10918
|
+
});
|
|
10919
|
+
return Response.json({ ok: true });
|
|
10920
|
+
}
|
|
10685
10921
|
clearComments(ctx.params.id);
|
|
10686
10922
|
return Response.json({ ok: true });
|
|
10687
10923
|
}), "POST");
|
|
10688
10924
|
var getHandler$1 = normalizeHandler(GET$1, "GET");
|
|
10689
|
-
var
|
|
10690
|
-
var
|
|
10691
|
-
var
|
|
10692
|
-
function
|
|
10925
|
+
var get34_options = mergeOptions(mware11, mware33, getHandler$1);
|
|
10926
|
+
var head34_options = mergeOptions(mware11, mware33);
|
|
10927
|
+
var post34_options = mergeOptions(mware11, mware33, postHandler$1);
|
|
10928
|
+
function get34(context) {
|
|
10693
10929
|
const __getHandler = (data) => call(getHandler$1, noContent, context, data);
|
|
10694
|
-
const
|
|
10695
|
-
return call(mware11,
|
|
10930
|
+
const __mware33 = (data) => call(mware33, __getHandler, context, data);
|
|
10931
|
+
return call(mware11, __mware33, context);
|
|
10696
10932
|
}
|
|
10697
|
-
function
|
|
10698
|
-
return stripResponseBody(
|
|
10933
|
+
function head34(context) {
|
|
10934
|
+
return stripResponseBody(get34(context));
|
|
10699
10935
|
}
|
|
10700
|
-
function
|
|
10936
|
+
function post34(context) {
|
|
10701
10937
|
const __postHandler = (data) => call(postHandler$1, noContent, context, data);
|
|
10702
|
-
const
|
|
10703
|
-
return call(mware11,
|
|
10938
|
+
const __mware33 = (data) => call(mware33, __postHandler, context, data);
|
|
10939
|
+
return call(mware11, __mware33, context);
|
|
10940
|
+
}
|
|
10941
|
+
//#endregion
|
|
10942
|
+
//#region __marko-run__api.workspaces.$.review.$.js
|
|
10943
|
+
var deleteHandler = normalizeHandler(Run.DELETE((ctx) => {
|
|
10944
|
+
const commentId = Number(ctx.params.commentId);
|
|
10945
|
+
if (!Number.isInteger(commentId)) throw httpError(400, "invalid comment id");
|
|
10946
|
+
const row = get("SELECT workspace_id FROM review_comments WHERE id = ?", commentId);
|
|
10947
|
+
if (!row || row.workspace_id !== ctx.params.id) throw httpError(404, "no such comment");
|
|
10948
|
+
deleteComment(commentId);
|
|
10949
|
+
return Response.json({ ok: true });
|
|
10950
|
+
}), "DELETE");
|
|
10951
|
+
var delete35_options = mergeOptions(mware11, mware33, deleteHandler);
|
|
10952
|
+
function delete35(context) {
|
|
10953
|
+
const __deleteHandler = (data) => call(deleteHandler, noContent, context, data);
|
|
10954
|
+
const __mware33 = (data) => call(mware33, __deleteHandler, context, data);
|
|
10955
|
+
return call(mware11, __mware33, context);
|
|
10704
10956
|
}
|
|
10705
10957
|
//#endregion
|
|
10706
10958
|
//#region src/routes/api/workspaces/$id/sessions/+handler.ts
|
|
@@ -10719,21 +10971,21 @@ var postHandler = normalizeHandler(Run.POST({ json: CreateSession }, async (ctx)
|
|
|
10719
10971
|
return Response.json(createSession(ctx.params.id, body.agent || preferredAgent()));
|
|
10720
10972
|
}), "POST");
|
|
10721
10973
|
var getHandler = normalizeHandler(GET, "GET");
|
|
10722
|
-
var get36_options = mergeOptions(mware11,
|
|
10723
|
-
var head36_options = mergeOptions(mware11,
|
|
10724
|
-
var post36_options = mergeOptions(mware11,
|
|
10974
|
+
var get36_options = mergeOptions(mware11, mware33, getHandler);
|
|
10975
|
+
var head36_options = mergeOptions(mware11, mware33);
|
|
10976
|
+
var post36_options = mergeOptions(mware11, mware33, postHandler);
|
|
10725
10977
|
function get36(context) {
|
|
10726
10978
|
const __getHandler = (data) => call(getHandler, noContent, context, data);
|
|
10727
|
-
const
|
|
10728
|
-
return call(mware11,
|
|
10979
|
+
const __mware33 = (data) => call(mware33, __getHandler, context, data);
|
|
10980
|
+
return call(mware11, __mware33, context);
|
|
10729
10981
|
}
|
|
10730
10982
|
function head36(context) {
|
|
10731
10983
|
return stripResponseBody(get36(context));
|
|
10732
10984
|
}
|
|
10733
10985
|
function post36(context) {
|
|
10734
10986
|
const __postHandler = (data) => call(postHandler, noContent, context, data);
|
|
10735
|
-
const
|
|
10736
|
-
return call(mware11,
|
|
10987
|
+
const __mware33 = (data) => call(mware33, __postHandler, context, data);
|
|
10988
|
+
return call(mware11, __mware33, context);
|
|
10737
10989
|
}
|
|
10738
10990
|
//#endregion
|
|
10739
10991
|
//#region __marko-run__router.js
|
|
@@ -10858,38 +11110,38 @@ function match_internal(method, pathname) {
|
|
|
10858
11110
|
meta: {}
|
|
10859
11111
|
};
|
|
10860
11112
|
case "settings": return {
|
|
10861
|
-
handler:
|
|
11113
|
+
handler: get20,
|
|
10862
11114
|
path: "/api/settings",
|
|
10863
11115
|
params: {},
|
|
10864
|
-
options:
|
|
11116
|
+
options: get20_options,
|
|
10865
11117
|
meta: {}
|
|
10866
11118
|
};
|
|
10867
11119
|
case "setup": return {
|
|
10868
|
-
handler:
|
|
11120
|
+
handler: get21,
|
|
10869
11121
|
path: "/api/setup",
|
|
10870
11122
|
params: {},
|
|
10871
|
-
options:
|
|
11123
|
+
options: get21_options,
|
|
10872
11124
|
meta: {}
|
|
10873
11125
|
};
|
|
10874
11126
|
case "status": return {
|
|
10875
|
-
handler:
|
|
11127
|
+
handler: get24,
|
|
10876
11128
|
path: "/api/status",
|
|
10877
11129
|
params: {},
|
|
10878
|
-
options:
|
|
11130
|
+
options: get24_options,
|
|
10879
11131
|
meta: {}
|
|
10880
11132
|
};
|
|
10881
11133
|
case "usage": return {
|
|
10882
|
-
handler:
|
|
11134
|
+
handler: get25,
|
|
10883
11135
|
path: "/api/usage",
|
|
10884
11136
|
params: {},
|
|
10885
|
-
options:
|
|
11137
|
+
options: get25_options,
|
|
10886
11138
|
meta: {}
|
|
10887
11139
|
};
|
|
10888
11140
|
case "workspaces": return {
|
|
10889
|
-
handler:
|
|
11141
|
+
handler: get26,
|
|
10890
11142
|
path: "/api/workspaces",
|
|
10891
11143
|
params: {},
|
|
10892
|
-
options:
|
|
11144
|
+
options: get26_options,
|
|
10893
11145
|
meta: {}
|
|
10894
11146
|
};
|
|
10895
11147
|
}
|
|
@@ -10913,10 +11165,10 @@ function match_internal(method, pathname) {
|
|
|
10913
11165
|
const i3 = pathname.indexOf("/", 11) + 1;
|
|
10914
11166
|
if (!i3 || i3 === len) {
|
|
10915
11167
|
if (pathname.slice(11, i3 ? -1 : len) === "search") return {
|
|
10916
|
-
handler:
|
|
11168
|
+
handler: get23,
|
|
10917
11169
|
path: "/api/setup/search",
|
|
10918
11170
|
params: {},
|
|
10919
|
-
options:
|
|
11171
|
+
options: get23_options,
|
|
10920
11172
|
meta: {}
|
|
10921
11173
|
};
|
|
10922
11174
|
}
|
|
@@ -10930,31 +11182,31 @@ function match_internal(method, pathname) {
|
|
|
10930
11182
|
const i4 = pathname.indexOf("/", i3) + 1;
|
|
10931
11183
|
if (!i4 || i4 === len) switch (pathname.slice(i3, i4 ? -1 : len)) {
|
|
10932
11184
|
case "diff": return {
|
|
10933
|
-
handler:
|
|
11185
|
+
handler: get29,
|
|
10934
11186
|
path: "/api/workspaces/$id/diff",
|
|
10935
11187
|
params: { id: s3 },
|
|
10936
|
-
options:
|
|
11188
|
+
options: get29_options,
|
|
10937
11189
|
meta: {}
|
|
10938
11190
|
};
|
|
10939
11191
|
case "procs": return {
|
|
10940
|
-
handler:
|
|
11192
|
+
handler: get30,
|
|
10941
11193
|
path: "/api/workspaces/$id/procs",
|
|
10942
11194
|
params: { id: s3 },
|
|
10943
|
-
options:
|
|
11195
|
+
options: get30_options,
|
|
10944
11196
|
meta: {}
|
|
10945
11197
|
};
|
|
10946
11198
|
case "prs": return {
|
|
10947
|
-
handler:
|
|
11199
|
+
handler: get31,
|
|
10948
11200
|
path: "/api/workspaces/$id/prs",
|
|
10949
11201
|
params: { id: s3 },
|
|
10950
|
-
options:
|
|
11202
|
+
options: get31_options,
|
|
10951
11203
|
meta: {}
|
|
10952
11204
|
};
|
|
10953
11205
|
case "review": return {
|
|
10954
|
-
handler:
|
|
11206
|
+
handler: get34,
|
|
10955
11207
|
path: "/api/workspaces/$id/review",
|
|
10956
11208
|
params: { id: s3 },
|
|
10957
|
-
options:
|
|
11209
|
+
options: get34_options,
|
|
10958
11210
|
meta: {}
|
|
10959
11211
|
};
|
|
10960
11212
|
case "sessions": return {
|
|
@@ -11082,38 +11334,38 @@ function match_internal(method, pathname) {
|
|
|
11082
11334
|
meta: {}
|
|
11083
11335
|
};
|
|
11084
11336
|
case "settings": return {
|
|
11085
|
-
handler:
|
|
11337
|
+
handler: head20,
|
|
11086
11338
|
path: "/api/settings",
|
|
11087
11339
|
params: {},
|
|
11088
|
-
options:
|
|
11340
|
+
options: head20_options,
|
|
11089
11341
|
meta: {}
|
|
11090
11342
|
};
|
|
11091
11343
|
case "setup": return {
|
|
11092
|
-
handler:
|
|
11344
|
+
handler: head21,
|
|
11093
11345
|
path: "/api/setup",
|
|
11094
11346
|
params: {},
|
|
11095
|
-
options:
|
|
11347
|
+
options: head21_options,
|
|
11096
11348
|
meta: {}
|
|
11097
11349
|
};
|
|
11098
11350
|
case "status": return {
|
|
11099
|
-
handler:
|
|
11351
|
+
handler: head24,
|
|
11100
11352
|
path: "/api/status",
|
|
11101
11353
|
params: {},
|
|
11102
|
-
options:
|
|
11354
|
+
options: head24_options,
|
|
11103
11355
|
meta: {}
|
|
11104
11356
|
};
|
|
11105
11357
|
case "usage": return {
|
|
11106
|
-
handler:
|
|
11358
|
+
handler: head25,
|
|
11107
11359
|
path: "/api/usage",
|
|
11108
11360
|
params: {},
|
|
11109
|
-
options:
|
|
11361
|
+
options: head25_options,
|
|
11110
11362
|
meta: {}
|
|
11111
11363
|
};
|
|
11112
11364
|
case "workspaces": return {
|
|
11113
|
-
handler:
|
|
11365
|
+
handler: head26,
|
|
11114
11366
|
path: "/api/workspaces",
|
|
11115
11367
|
params: {},
|
|
11116
|
-
options:
|
|
11368
|
+
options: head26_options,
|
|
11117
11369
|
meta: {}
|
|
11118
11370
|
};
|
|
11119
11371
|
}
|
|
@@ -11137,10 +11389,10 @@ function match_internal(method, pathname) {
|
|
|
11137
11389
|
const i3 = pathname.indexOf("/", 11) + 1;
|
|
11138
11390
|
if (!i3 || i3 === len) {
|
|
11139
11391
|
if (pathname.slice(11, i3 ? -1 : len) === "search") return {
|
|
11140
|
-
handler:
|
|
11392
|
+
handler: head23,
|
|
11141
11393
|
path: "/api/setup/search",
|
|
11142
11394
|
params: {},
|
|
11143
|
-
options:
|
|
11395
|
+
options: head23_options,
|
|
11144
11396
|
meta: {}
|
|
11145
11397
|
};
|
|
11146
11398
|
}
|
|
@@ -11154,31 +11406,31 @@ function match_internal(method, pathname) {
|
|
|
11154
11406
|
const i4 = pathname.indexOf("/", i3) + 1;
|
|
11155
11407
|
if (!i4 || i4 === len) switch (pathname.slice(i3, i4 ? -1 : len)) {
|
|
11156
11408
|
case "diff": return {
|
|
11157
|
-
handler:
|
|
11409
|
+
handler: head29,
|
|
11158
11410
|
path: "/api/workspaces/$id/diff",
|
|
11159
11411
|
params: { id: s3 },
|
|
11160
|
-
options:
|
|
11412
|
+
options: head29_options,
|
|
11161
11413
|
meta: {}
|
|
11162
11414
|
};
|
|
11163
11415
|
case "procs": return {
|
|
11164
|
-
handler:
|
|
11416
|
+
handler: head30,
|
|
11165
11417
|
path: "/api/workspaces/$id/procs",
|
|
11166
11418
|
params: { id: s3 },
|
|
11167
|
-
options:
|
|
11419
|
+
options: head30_options,
|
|
11168
11420
|
meta: {}
|
|
11169
11421
|
};
|
|
11170
11422
|
case "prs": return {
|
|
11171
|
-
handler:
|
|
11423
|
+
handler: head31,
|
|
11172
11424
|
path: "/api/workspaces/$id/prs",
|
|
11173
11425
|
params: { id: s3 },
|
|
11174
|
-
options:
|
|
11426
|
+
options: head31_options,
|
|
11175
11427
|
meta: {}
|
|
11176
11428
|
};
|
|
11177
11429
|
case "review": return {
|
|
11178
|
-
handler:
|
|
11430
|
+
handler: head34,
|
|
11179
11431
|
path: "/api/workspaces/$id/review",
|
|
11180
11432
|
params: { id: s3 },
|
|
11181
|
-
options:
|
|
11433
|
+
options: head34_options,
|
|
11182
11434
|
meta: {}
|
|
11183
11435
|
};
|
|
11184
11436
|
case "sessions": return {
|
|
@@ -11234,10 +11486,10 @@ function match_internal(method, pathname) {
|
|
|
11234
11486
|
meta: {}
|
|
11235
11487
|
};
|
|
11236
11488
|
case "workspaces": return {
|
|
11237
|
-
handler:
|
|
11489
|
+
handler: post26,
|
|
11238
11490
|
path: "/api/workspaces",
|
|
11239
11491
|
params: {},
|
|
11240
|
-
options:
|
|
11492
|
+
options: post26_options,
|
|
11241
11493
|
meta: {}
|
|
11242
11494
|
};
|
|
11243
11495
|
}
|
|
@@ -11265,10 +11517,10 @@ function match_internal(method, pathname) {
|
|
|
11265
11517
|
const i4 = pathname.indexOf("/", i3) + 1;
|
|
11266
11518
|
if (!i4 || i4 === len) {
|
|
11267
11519
|
if (pathname.slice(i3, i4 ? -1 : len) === "send") return {
|
|
11268
|
-
handler:
|
|
11520
|
+
handler: post19,
|
|
11269
11521
|
path: "/api/sessions/$id/send",
|
|
11270
11522
|
params: { id: s3 },
|
|
11271
|
-
options:
|
|
11523
|
+
options: post19_options,
|
|
11272
11524
|
meta: {}
|
|
11273
11525
|
};
|
|
11274
11526
|
}
|
|
@@ -11282,10 +11534,10 @@ function match_internal(method, pathname) {
|
|
|
11282
11534
|
if (!i3 || i3 === len) {
|
|
11283
11535
|
const s3 = decodeURIComponent(pathname.slice(11, i3 ? -1 : len));
|
|
11284
11536
|
if (s3) return {
|
|
11285
|
-
handler:
|
|
11537
|
+
handler: post22,
|
|
11286
11538
|
path: "/api/setup/$id",
|
|
11287
11539
|
params: { id: s3 },
|
|
11288
|
-
options:
|
|
11540
|
+
options: post22_options,
|
|
11289
11541
|
meta: {}
|
|
11290
11542
|
};
|
|
11291
11543
|
}
|
|
@@ -11296,10 +11548,10 @@ function match_internal(method, pathname) {
|
|
|
11296
11548
|
if (!i3 || i3 === len) {
|
|
11297
11549
|
const s3 = decodeURIComponent(pathname.slice(16, i3 ? -1 : len));
|
|
11298
11550
|
if (s3) return {
|
|
11299
|
-
handler:
|
|
11551
|
+
handler: post27,
|
|
11300
11552
|
path: "/api/workspaces/$id",
|
|
11301
11553
|
params: { id: s3 },
|
|
11302
|
-
options:
|
|
11554
|
+
options: post27_options,
|
|
11303
11555
|
meta: {}
|
|
11304
11556
|
};
|
|
11305
11557
|
} else {
|
|
@@ -11308,31 +11560,31 @@ function match_internal(method, pathname) {
|
|
|
11308
11560
|
const i4 = pathname.indexOf("/", i3) + 1;
|
|
11309
11561
|
if (!i4 || i4 === len) switch (pathname.slice(i3, i4 ? -1 : len)) {
|
|
11310
11562
|
case "assets": return {
|
|
11311
|
-
handler:
|
|
11563
|
+
handler: post28,
|
|
11312
11564
|
path: "/api/workspaces/$id/assets",
|
|
11313
11565
|
params: { id: s3 },
|
|
11314
|
-
options:
|
|
11566
|
+
options: post28_options,
|
|
11315
11567
|
meta: {}
|
|
11316
11568
|
};
|
|
11317
11569
|
case "prs": return {
|
|
11318
|
-
handler:
|
|
11570
|
+
handler: post31,
|
|
11319
11571
|
path: "/api/workspaces/$id/prs",
|
|
11320
11572
|
params: { id: s3 },
|
|
11321
|
-
options:
|
|
11573
|
+
options: post31_options,
|
|
11322
11574
|
meta: {}
|
|
11323
11575
|
};
|
|
11324
11576
|
case "repos": return {
|
|
11325
|
-
handler:
|
|
11577
|
+
handler: post32,
|
|
11326
11578
|
path: "/api/workspaces/$id/repos",
|
|
11327
11579
|
params: { id: s3 },
|
|
11328
|
-
options:
|
|
11580
|
+
options: post32_options,
|
|
11329
11581
|
meta: {}
|
|
11330
11582
|
};
|
|
11331
11583
|
case "review": return {
|
|
11332
|
-
handler:
|
|
11584
|
+
handler: post34,
|
|
11333
11585
|
path: "/api/workspaces/$id/review",
|
|
11334
11586
|
params: { id: s3 },
|
|
11335
|
-
options:
|
|
11587
|
+
options: post34_options,
|
|
11336
11588
|
meta: {}
|
|
11337
11589
|
};
|
|
11338
11590
|
case "sessions": return {
|
|
@@ -11360,10 +11612,10 @@ function match_internal(method, pathname) {
|
|
|
11360
11612
|
const i2 = pathname.indexOf("/", 5) + 1;
|
|
11361
11613
|
if (!i2 || i2 === len) {
|
|
11362
11614
|
if (pathname.slice(5, i2 ? -1 : len) === "settings") return {
|
|
11363
|
-
handler:
|
|
11615
|
+
handler: put20,
|
|
11364
11616
|
path: "/api/settings",
|
|
11365
11617
|
params: {},
|
|
11366
|
-
options:
|
|
11618
|
+
options: put20_options,
|
|
11367
11619
|
meta: {}
|
|
11368
11620
|
};
|
|
11369
11621
|
}
|
|
@@ -11402,31 +11654,16 @@ function match_internal(method, pathname) {
|
|
|
11402
11654
|
}
|
|
11403
11655
|
}
|
|
11404
11656
|
break;
|
|
11405
|
-
case "review-comments":
|
|
11406
|
-
{
|
|
11407
|
-
const i3 = pathname.indexOf("/", 21) + 1;
|
|
11408
|
-
if (!i3 || i3 === len) {
|
|
11409
|
-
const s3 = decodeURIComponent(pathname.slice(21, i3 ? -1 : len));
|
|
11410
|
-
if (s3) return {
|
|
11411
|
-
handler: delete18,
|
|
11412
|
-
path: "/api/review-comments/$id",
|
|
11413
|
-
params: { id: s3 },
|
|
11414
|
-
options: delete18_options,
|
|
11415
|
-
meta: {}
|
|
11416
|
-
};
|
|
11417
|
-
}
|
|
11418
|
-
}
|
|
11419
|
-
break;
|
|
11420
11657
|
case "sessions":
|
|
11421
11658
|
{
|
|
11422
11659
|
const i3 = pathname.indexOf("/", 14) + 1;
|
|
11423
11660
|
if (!i3 || i3 === len) {
|
|
11424
11661
|
const s3 = decodeURIComponent(pathname.slice(14, i3 ? -1 : len));
|
|
11425
11662
|
if (s3) return {
|
|
11426
|
-
handler:
|
|
11663
|
+
handler: delete18,
|
|
11427
11664
|
path: "/api/sessions/$id",
|
|
11428
11665
|
params: { id: s3 },
|
|
11429
|
-
options:
|
|
11666
|
+
options: delete18_options,
|
|
11430
11667
|
meta: {}
|
|
11431
11668
|
};
|
|
11432
11669
|
}
|
|
@@ -11438,19 +11675,37 @@ function match_internal(method, pathname) {
|
|
|
11438
11675
|
const s3 = decodeURIComponent(pathname.slice(16, i3 - 1));
|
|
11439
11676
|
if (s3) {
|
|
11440
11677
|
const i4 = pathname.indexOf("/", i3) + 1;
|
|
11441
|
-
if (i4 && i4 !== len) {
|
|
11442
|
-
|
|
11678
|
+
if (i4 && i4 !== len) switch (pathname.slice(i3, i4 - 1)) {
|
|
11679
|
+
case "repos":
|
|
11680
|
+
{
|
|
11681
|
+
const i5 = pathname.indexOf("/", i4) + 1;
|
|
11682
|
+
if (!i5 || i5 === len) {
|
|
11683
|
+
const s5 = decodeURIComponent(pathname.slice(i4, i5 ? -1 : len));
|
|
11684
|
+
if (s5) return {
|
|
11685
|
+
handler: delete33,
|
|
11686
|
+
path: "/api/workspaces/$id/repos/$worktree",
|
|
11687
|
+
params: {
|
|
11688
|
+
id: s3,
|
|
11689
|
+
worktree: s5
|
|
11690
|
+
},
|
|
11691
|
+
options: delete33_options,
|
|
11692
|
+
meta: {}
|
|
11693
|
+
};
|
|
11694
|
+
}
|
|
11695
|
+
}
|
|
11696
|
+
break;
|
|
11697
|
+
case "review": {
|
|
11443
11698
|
const i5 = pathname.indexOf("/", i4) + 1;
|
|
11444
11699
|
if (!i5 || i5 === len) {
|
|
11445
11700
|
const s5 = decodeURIComponent(pathname.slice(i4, i5 ? -1 : len));
|
|
11446
11701
|
if (s5) return {
|
|
11447
|
-
handler:
|
|
11448
|
-
path: "/api/workspaces/$id/
|
|
11702
|
+
handler: delete35,
|
|
11703
|
+
path: "/api/workspaces/$id/review/$commentId",
|
|
11449
11704
|
params: {
|
|
11450
11705
|
id: s3,
|
|
11451
|
-
|
|
11706
|
+
commentId: s5
|
|
11452
11707
|
},
|
|
11453
|
-
options:
|
|
11708
|
+
options: delete35_options,
|
|
11454
11709
|
meta: {}
|
|
11455
11710
|
};
|
|
11456
11711
|
}
|
|
@@ -11477,10 +11732,10 @@ function match_internal(method, pathname) {
|
|
|
11477
11732
|
if (!i3 || i3 === len) {
|
|
11478
11733
|
const s3 = decodeURIComponent(pathname.slice(14, i3 ? -1 : len));
|
|
11479
11734
|
if (s3) return {
|
|
11480
|
-
handler:
|
|
11735
|
+
handler: patch18,
|
|
11481
11736
|
path: "/api/sessions/$id",
|
|
11482
11737
|
params: { id: s3 },
|
|
11483
|
-
options:
|
|
11738
|
+
options: patch18_options,
|
|
11484
11739
|
meta: {}
|
|
11485
11740
|
};
|
|
11486
11741
|
}
|
|
@@ -13586,7 +13841,7 @@ var require_websocket = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
13586
13841
|
var http$1 = __require("http");
|
|
13587
13842
|
var net = __require("net");
|
|
13588
13843
|
var tls = __require("tls");
|
|
13589
|
-
var { randomBytes, createHash: createHash$
|
|
13844
|
+
var { randomBytes, createHash: createHash$2 } = __require("crypto");
|
|
13590
13845
|
var { Duplex: Duplex$2, Readable: Readable$1 } = __require("stream");
|
|
13591
13846
|
var { URL: URL$1 } = __require("url");
|
|
13592
13847
|
var PerMessageDeflate = require_permessage_deflate();
|
|
@@ -14258,7 +14513,7 @@ var require_websocket = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
14258
14513
|
abortHandshake(websocket, socket, "Invalid Upgrade header");
|
|
14259
14514
|
return;
|
|
14260
14515
|
}
|
|
14261
|
-
const digest = createHash$
|
|
14516
|
+
const digest = createHash$2("sha1").update(key + GUID).digest("base64");
|
|
14262
14517
|
if (res.headers["sec-websocket-accept"] !== digest) {
|
|
14263
14518
|
abortHandshake(websocket, socket, "Invalid Sec-WebSocket-Accept header");
|
|
14264
14519
|
return;
|
|
@@ -14732,7 +14987,7 @@ var require_websocket_server = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
14732
14987
|
var EventEmitter = __require("events");
|
|
14733
14988
|
var http = __require("http");
|
|
14734
14989
|
var { Duplex } = __require("stream");
|
|
14735
|
-
var { createHash } = __require("crypto");
|
|
14990
|
+
var { createHash: createHash$1 } = __require("crypto");
|
|
14736
14991
|
var extension = require_extension();
|
|
14737
14992
|
var PerMessageDeflate = require_permessage_deflate();
|
|
14738
14993
|
var subprotocol = require_subprotocol();
|
|
@@ -15002,7 +15257,7 @@ var require_websocket_server = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
15002
15257
|
"HTTP/1.1 101 Switching Protocols",
|
|
15003
15258
|
"Upgrade: websocket",
|
|
15004
15259
|
"Connection: Upgrade",
|
|
15005
|
-
`Sec-WebSocket-Accept: ${createHash("sha1").update(key + GUID).digest("base64")}`
|
|
15260
|
+
`Sec-WebSocket-Accept: ${createHash$1("sha1").update(key + GUID).digest("base64")}`
|
|
15006
15261
|
];
|
|
15007
15262
|
const ws = new this.options.WebSocket(null, void 0, this.options);
|
|
15008
15263
|
if (protocols.size) {
|
|
@@ -15481,4 +15736,4 @@ server.listen(port, () => {
|
|
|
15481
15736
|
//#endregion
|
|
15482
15737
|
export {};
|
|
15483
15738
|
|
|
15484
|
-
;var __MARKO_MANIFEST__={"
|
|
15739
|
+
;var __MARKO_MANIFEST__={"AA0T2xt":{"block":[2,"stylesheet#/assets/app-page-8DhqRdJj.css",6,"<link",0," rel=\"stylesheet\" crossorigin href=\"",1,"assets/app-page-8DhqRdJj.css\"",">"],"defer":[2,"/assets/settings-DGta5r6w.js",6,"<script",0," async type=\"module\" crossorigin src=\"",1,"assets/settings-DGta5r6w.js\"","></script>",2,"modulepreload#/assets/_DVjg6wHM.js",6,"<link",0," rel=\"modulepreload\" crossorigin href=\"",1,"assets/_DVjg6wHM.js\"",">"]},"ZLT8joi":{"block":[2,"stylesheet#/assets/app-page-8DhqRdJj.css",6,"<link",0," rel=\"stylesheet\" crossorigin href=\"",1,"assets/app-page-8DhqRdJj.css\"",">"],"defer":[2,"/assets/new-DGta5r6w.js",6,"<script",0," async type=\"module\" crossorigin src=\"",1,"assets/new-DGta5r6w.js\"","></script>",2,"modulepreload#/assets/_DVjg6wHM.js",6,"<link",0," rel=\"modulepreload\" crossorigin href=\"",1,"assets/_DVjg6wHM.js\"",">"]},"LH2lXAg":{"block":[2,"stylesheet#/assets/app-page-8DhqRdJj.css",6,"<link",0," rel=\"stylesheet\" crossorigin href=\"",1,"assets/app-page-8DhqRdJj.css\"",">"],"defer":[2,"/assets/w-DGta5r6w.js",6,"<script",0," async type=\"module\" crossorigin src=\"",1,"assets/w-DGta5r6w.js\"","></script>",2,"modulepreload#/assets/_DVjg6wHM.js",6,"<link",0," rel=\"modulepreload\" crossorigin href=\"",1,"assets/_DVjg6wHM.js\"",">"]},"ibphXY4":{"block":[2,"stylesheet#/assets/app-page-8DhqRdJj.css",6,"<link",0," rel=\"stylesheet\" crossorigin href=\"",1,"assets/app-page-8DhqRdJj.css\"",">"],"defer":[2,"/assets/w._-DGta5r6w.js",6,"<script",0," async type=\"module\" crossorigin src=\"",1,"assets/w._-DGta5r6w.js\"","></script>",2,"modulepreload#/assets/_DVjg6wHM.js",6,"<link",0," rel=\"modulepreload\" crossorigin href=\"",1,"assets/_DVjg6wHM.js\"",">"]},"T$MNY0k":{"block":[2,"stylesheet#/assets/app-page-8DhqRdJj.css",6,"<link",0," rel=\"stylesheet\" crossorigin href=\"",1,"assets/app-page-8DhqRdJj.css\"",">"],"defer":[2,"/assets/w._-9m6uIPo_.js",6,"<script",0," async type=\"module\" crossorigin src=\"",1,"assets/w._-9m6uIPo_.js\"","></script>",2,"modulepreload#/assets/_DVjg6wHM.js",6,"<link",0," rel=\"modulepreload\" crossorigin href=\"",1,"assets/_DVjg6wHM.js\"",">"]}};
|