@dylanpiercey/work 0.0.65 → 0.0.67
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/{_CJOORMBO.js → _B9UH2f9c.js} +61 -37
- package/dist/_C8-SYmgW.js +2 -0
- package/dist/{_CSvmyeWI.js → _D78MdEM0.js} +1205 -999
- package/dist/{_Dp9_KYvx.js → _mSrLyFdO.js} +9 -1
- package/dist/index.mjs +1071 -830
- package/dist/public/assets/{_tyL67pnw.js → _3k9q7qTZ.js} +1 -1
- package/dist/public/assets/_3k9q7qTZ.js.br +0 -0
- package/dist/public/assets/{_CeiVaZaE2.js → _6Uv2mA8-2.js} +1 -1
- package/dist/public/assets/_6Uv2mA8-2.js.br +0 -0
- package/dist/public/assets/{_BdX2kLzM.js → _AMWZA0be.js} +1 -1
- package/dist/public/assets/_AMWZA0be.js.br +0 -0
- package/dist/public/assets/{_BlzJNKIq.js → _B1ZCEYOD.js} +1 -1
- package/dist/public/assets/_B1ZCEYOD.js.br +0 -0
- package/dist/public/assets/{_Dla_sQtT.js → _B1vmwnMa.js} +1 -1
- package/dist/public/assets/_B1vmwnMa.js.br +0 -0
- package/dist/public/assets/{_BThtwt0w.js → _B5iCC67h.js} +1 -1
- package/dist/public/assets/_B5iCC67h.js.br +0 -0
- package/dist/public/assets/{_DRy7E0y4.js → _BL7XgPZ_.js} +1 -1
- package/dist/public/assets/_BL7XgPZ_.js.br +0 -0
- package/dist/public/assets/{_DQnRz4N-2.js → _BSNS3UMH2.js} +1 -1
- package/dist/public/assets/_BSNS3UMH2.js.br +0 -0
- package/dist/public/assets/{_IQRs4Vxk2.js → _BV3Xd3ki2.js} +1 -1
- package/dist/public/assets/{_B0K8ONkz.js → _BW1UpUrT.js} +1 -1
- package/dist/public/assets/_BW1UpUrT.js.br +0 -0
- package/dist/public/assets/{_BoY3-Vy52.js → _BW81rf1H2.js} +1 -1
- package/dist/public/assets/_BW81rf1H2.js.br +0 -0
- package/dist/public/assets/{_BQQEle5V2.js → _BXCZuUQA2.js} +1 -1
- package/dist/public/assets/_BXCZuUQA2.js.br +0 -0
- package/dist/public/assets/{_BtQw2bmP.js → _B_cZqSdw.js} +1 -1
- package/dist/public/assets/_B_cZqSdw.js.br +0 -0
- package/dist/public/assets/{_DGSiyVF7.js → _BaoSUC_i.js} +1 -1
- package/dist/public/assets/_BaoSUC_i.js.br +0 -0
- package/dist/public/assets/{_DW89HP67.js → _BkgwhUlf.js} +1 -1
- package/dist/public/assets/_BkgwhUlf.js.br +0 -0
- package/dist/public/assets/{_DktisilP.js → _Bs3zDe42.js} +1 -1
- package/dist/public/assets/_Bs3zDe42.js.br +0 -0
- package/dist/public/assets/{_Dhz04q_D.js → _BtsudbJn.js} +1 -1
- package/dist/public/assets/_BtsudbJn.js.br +0 -0
- package/dist/public/assets/{_DIqr-isS2.js → _BwQNx6NX2.js} +1 -1
- package/dist/public/assets/_BwQNx6NX2.js.br +0 -0
- package/dist/public/assets/{_COmbCgXJ.js → _Bx58LnKm.js} +1 -1
- package/dist/public/assets/_Bx58LnKm.js.br +0 -0
- package/dist/public/assets/{_zBoBE4zG2.js → _BzP13oLI2.js} +1 -1
- package/dist/public/assets/_BzP13oLI2.js.br +0 -0
- package/dist/public/assets/{_C8nC95yB.js → _C13mV9Vy.js} +1 -1
- package/dist/public/assets/_C13mV9Vy.js.br +0 -0
- package/dist/public/assets/{_dGG0GxLJ.js → _C7_gIQ1W.js} +1 -1
- package/dist/public/assets/_C7_gIQ1W.js.br +0 -0
- package/dist/public/assets/{_DSl96WfX.js → _C8IzwQRq.js} +1 -1
- package/dist/public/assets/_C8IzwQRq.js.br +0 -0
- package/dist/public/assets/{_GAJYC2Mn.js → _C9ETD15k.js} +1 -1
- package/dist/public/assets/_C9ETD15k.js.br +0 -0
- package/dist/public/assets/{_BZ1m666c2.js → _CBo0xAjA2.js} +1 -1
- package/dist/public/assets/{_CITgMOC9.js → _CCbKzznD.js} +1 -1
- package/dist/public/assets/_CCbKzznD.js.br +0 -0
- package/dist/public/assets/{_DsedTKoi2.js → _CHxLUwRe2.js} +1 -1
- package/dist/public/assets/_CHxLUwRe2.js.br +0 -0
- package/dist/public/assets/{_CaI2OErv2.js → _CPi3B_vr2.js} +1 -1
- package/dist/public/assets/_CPi3B_vr2.js.br +0 -0
- package/dist/public/assets/{_DIPk3FlP.js → _CS_y_5bW.js} +1 -1
- package/dist/public/assets/_CS_y_5bW.js.br +0 -0
- package/dist/public/assets/{_CioERcnr2.js → _CYMzncSB2.js} +1 -1
- package/dist/public/assets/_CYMzncSB2.js.br +0 -0
- package/dist/public/assets/{_Dj5rhxkK2.js → _CZyTbXSO2.js} +1 -1
- package/dist/public/assets/_CZyTbXSO2.js.br +0 -0
- package/dist/public/assets/{_BUgZMYtw.js → _Cc8KMyAp.js} +1 -1
- package/dist/public/assets/_Cc8KMyAp.js.br +0 -0
- package/dist/public/assets/{_DvCKkq4p.js → _CcdwqB39.js} +1 -1
- package/dist/public/assets/_CcdwqB39.js.br +0 -0
- package/dist/public/assets/{_CaKapByl.js → _CduHXYfC.js} +45 -45
- package/dist/public/assets/_CduHXYfC.js.br +0 -0
- package/dist/public/assets/{_BboF69sq.js → _CgMtsYIH.js} +1 -1
- package/dist/public/assets/_CgMtsYIH.js.br +0 -0
- package/dist/public/assets/{_CrV-j-_J2.js → _CgdPOrhX2.js} +1 -1
- package/dist/public/assets/_CgdPOrhX2.js.br +0 -0
- package/dist/public/assets/{_Dk0TvYyB.js → _Chsu042s.js} +1 -1
- package/dist/public/assets/_Chsu042s.js.br +0 -0
- package/dist/public/assets/{_Ig-G3Vb-2.js → _CjxTlEOw2.js} +1 -1
- package/dist/public/assets/_CjxTlEOw2.js.br +0 -0
- package/dist/public/assets/{_DTg6G0mG2.js → _ClECf4L52.js} +1 -1
- package/dist/public/assets/_ClECf4L52.js.br +0 -0
- package/dist/public/assets/{_DmhJqFxg.js → _CnQdBazT.js} +1 -1
- package/dist/public/assets/_CnQdBazT.js.br +0 -0
- package/dist/public/assets/{_DVhX7A38.js → _CsVHdEro.js} +1 -1
- package/dist/public/assets/{_BCM54uP7.js → _CsdnwX6C.js} +1 -1
- package/dist/public/assets/_CsdnwX6C.js.br +0 -0
- package/dist/public/assets/{_B7r33ix3.js → _CsuFzJmI.js} +1 -1
- package/dist/public/assets/_CsuFzJmI.js.br +0 -0
- package/dist/public/assets/{_DdWJlopw.js → _CuUYX7O6.js} +1 -1
- package/dist/public/assets/_CuUYX7O6.js.br +0 -0
- package/dist/public/assets/{_bAkDCn_T2.js → _Cvm7LApl2.js} +1 -1
- package/dist/public/assets/_Cvm7LApl2.js.br +0 -0
- package/dist/public/assets/{_D4ERlOIt.js → _CzJu_xMs.js} +1 -1
- package/dist/public/assets/_CzJu_xMs.js.br +0 -0
- package/dist/public/assets/{_C4xR-bcw.js → _D3ardbW_.js} +1 -1
- package/dist/public/assets/_D3ardbW_.js.br +0 -0
- package/dist/public/assets/{_CIkG14ic.js → _D6UgA7_X.js} +1 -1
- package/dist/public/assets/_D6UgA7_X.js.br +0 -0
- package/dist/public/assets/{_CqwvvARM2.js → _D6hi7ua72.js} +1 -1
- package/dist/public/assets/_D6hi7ua72.js.br +0 -0
- package/dist/public/assets/{_CTuqiWc4.js → _D9eCCnFe.js} +1 -1
- package/dist/public/assets/_D9eCCnFe.js.br +0 -0
- package/dist/public/assets/{_DXx38Nka.js → _DHLcQgxi.js} +1 -1
- package/dist/public/assets/_DHLcQgxi.js.br +0 -0
- package/dist/public/assets/{_DHM4stpd.js → _DLfp1TG-.js} +1 -1
- package/dist/public/assets/_DLfp1TG-.js.br +0 -0
- package/dist/public/assets/{_C-9k1_iP.js → _DRbnn8C_.js} +1 -1
- package/dist/public/assets/_DRbnn8C_.js.br +0 -0
- package/dist/public/assets/{_DBsRrJl2.js → _DTD1tZCR.js} +1 -1
- package/dist/public/assets/_DTD1tZCR.js.br +0 -0
- package/dist/public/assets/{_Bp8I3szc.js → _DX5zvNmD.js} +1 -1
- package/dist/public/assets/_DX5zvNmD.js.br +0 -0
- package/dist/public/assets/{_BxbPiayr.js → _DbEBleKv.js} +1 -1
- package/dist/public/assets/_DbEBleKv.js.br +0 -0
- package/dist/public/assets/{_DobhJicG2.js → _DeKPlPsD2.js} +1 -1
- package/dist/public/assets/_DeKPlPsD2.js.br +0 -0
- package/dist/public/assets/{_DkrY5R_L.js → _DfBlfnwv.js} +1 -1
- package/dist/public/assets/_DfBlfnwv.js.br +0 -0
- package/dist/public/assets/{_CTT6B6-b.js → _DiAj-Esd.js} +1 -1
- package/dist/public/assets/_DiAj-Esd.js.br +0 -0
- package/dist/public/assets/{_DAEfR_pv2.js → _DlpIObWk2.js} +1 -1
- package/dist/public/assets/_DlpIObWk2.js.br +0 -0
- package/dist/public/assets/{_DMSaSonW.js → _Dlrc6R2N.js} +20 -20
- package/dist/public/assets/_Dlrc6R2N.js.br +0 -0
- package/dist/public/assets/{_DbucXXAA.js → _Ds1l_cNr.js} +1 -1
- package/dist/public/assets/_Ds1l_cNr.js.br +0 -0
- package/dist/public/assets/{_CerQ_0732.js → _Dzm4iymN2.js} +1 -1
- package/dist/public/assets/_Dzm4iymN2.js.br +0 -0
- package/dist/public/assets/{_BmiI8e9v.js → _NElrm0bu.js} +1 -1
- package/dist/public/assets/_NElrm0bu.js.br +0 -0
- package/dist/public/assets/{_DwFgGl5j.js → _QqRd5Qfx.js} +1 -1
- package/dist/public/assets/_QqRd5Qfx.js.br +0 -0
- package/dist/public/assets/{_COIRZlBz.js → _VuWoXkq_.js} +1 -1
- package/dist/public/assets/_VuWoXkq_.js.br +0 -0
- package/dist/public/assets/{_CqRLihbS.js → _W9tsjAUN.js} +1 -1
- package/dist/public/assets/_W9tsjAUN.js.br +0 -0
- package/dist/public/assets/{_Cs1TioRL.js → _g4l6Vz4T.js} +1 -1
- package/dist/public/assets/_g4l6Vz4T.js.br +0 -0
- package/dist/public/assets/{_C5wBIhjz.js → _iFcqMrGB.js} +1 -1
- package/dist/public/assets/_iFcqMrGB.js.br +0 -0
- package/dist/public/assets/{_CUyMzA_n2.js → _m3dEhGTX2.js} +1 -1
- package/dist/public/assets/_m3dEhGTX2.js.br +0 -0
- package/dist/public/assets/{_JJ2tpZIq2.js → _pfnxgR1W2.js} +1 -1
- package/dist/public/assets/_pfnxgR1W2.js.br +0 -0
- package/dist/public/assets/{_BEfV6dr52.js → _sNxRRogh2.js} +1 -1
- package/dist/public/assets/_sNxRRogh2.js.br +0 -0
- package/dist/public/assets/{_BH1orsGI.js → _uDnfyVmG.js} +1 -1
- package/dist/public/assets/_uDnfyVmG.js.br +0 -0
- package/dist/public/assets/{_CWbBPRed.js → _u_iVn6qP.js} +1 -1
- package/dist/public/assets/_u_iVn6qP.js.br +0 -0
- package/dist/public/assets/{_Bo6_Newo.js → _y4Ul_ohO.js} +1 -1
- package/dist/public/assets/_y4Ul_ohO.js.br +0 -0
- package/dist/public/assets/{_CZn9N_LK2.js → _ypxye8UD2.js} +1 -1
- package/dist/public/assets/_ypxye8UD2.js.br +0 -0
- package/dist/public/assets/app-page-DZhaOCYJ.css +1 -0
- package/dist/public/assets/app-page-DZhaOCYJ.css.br +0 -0
- package/dist/public/assets/diff-view-QQN-PSAx.css +1 -0
- package/dist/public/assets/diff-view-QQN-PSAx.css.br +0 -0
- package/dist/public/assets/new-Cia2P5u6.js +1 -0
- package/dist/public/assets/settings-Cia2P5u6.js +1 -0
- package/dist/public/assets/w-Cia2P5u6.js +1 -0
- package/dist/public/assets/w._-BwIlYQ_7.js +1 -0
- package/dist/public/assets/w._-Cia2P5u6.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/_B0K8ONkz.js.br +0 -0
- package/dist/public/assets/_B7r33ix3.js.br +0 -0
- package/dist/public/assets/_BCM54uP7.js.br +0 -0
- package/dist/public/assets/_BEfV6dr52.js.br +0 -0
- package/dist/public/assets/_BH1orsGI.js.br +0 -0
- package/dist/public/assets/_BQQEle5V2.js.br +0 -0
- package/dist/public/assets/_BThtwt0w.js.br +0 -0
- package/dist/public/assets/_BUgZMYtw.js.br +0 -0
- package/dist/public/assets/_BboF69sq.js.br +0 -0
- package/dist/public/assets/_BdX2kLzM.js.br +0 -0
- package/dist/public/assets/_BlzJNKIq.js.br +0 -0
- package/dist/public/assets/_BmiI8e9v.js.br +0 -0
- package/dist/public/assets/_Bo6_Newo.js.br +0 -0
- package/dist/public/assets/_BoY3-Vy52.js.br +0 -0
- package/dist/public/assets/_Bp8I3szc.js.br +0 -0
- package/dist/public/assets/_BtQw2bmP.js.br +0 -0
- package/dist/public/assets/_BxbPiayr.js.br +0 -0
- package/dist/public/assets/_C-9k1_iP.js.br +0 -0
- package/dist/public/assets/_C4xR-bcw.js.br +0 -0
- package/dist/public/assets/_C5wBIhjz.js.br +0 -0
- package/dist/public/assets/_C8nC95yB.js.br +0 -0
- package/dist/public/assets/_CITgMOC9.js.br +0 -0
- package/dist/public/assets/_CIkG14ic.js.br +0 -0
- package/dist/public/assets/_COIRZlBz.js.br +0 -0
- package/dist/public/assets/_COmbCgXJ.js.br +0 -0
- package/dist/public/assets/_CTT6B6-b.js.br +0 -0
- package/dist/public/assets/_CTuqiWc4.js.br +0 -0
- package/dist/public/assets/_CUyMzA_n2.js.br +0 -0
- package/dist/public/assets/_CWbBPRed.js.br +0 -0
- package/dist/public/assets/_CZn9N_LK2.js.br +0 -0
- package/dist/public/assets/_CaI2OErv2.js.br +0 -0
- package/dist/public/assets/_CaKapByl.js.br +0 -0
- package/dist/public/assets/_CeiVaZaE2.js.br +0 -0
- package/dist/public/assets/_CerQ_0732.js.br +0 -0
- package/dist/public/assets/_CioERcnr2.js.br +0 -0
- package/dist/public/assets/_CqRLihbS.js.br +0 -0
- package/dist/public/assets/_CqwvvARM2.js.br +0 -0
- package/dist/public/assets/_CrV-j-_J2.js.br +0 -0
- package/dist/public/assets/_Cs1TioRL.js.br +0 -0
- package/dist/public/assets/_D4ERlOIt.js.br +0 -0
- package/dist/public/assets/_DAEfR_pv2.js.br +0 -0
- package/dist/public/assets/_DBsRrJl2.js.br +0 -0
- package/dist/public/assets/_DGSiyVF7.js.br +0 -0
- package/dist/public/assets/_DHM4stpd.js.br +0 -0
- package/dist/public/assets/_DIPk3FlP.js.br +0 -0
- package/dist/public/assets/_DIqr-isS2.js.br +0 -0
- package/dist/public/assets/_DMSaSonW.js.br +0 -0
- package/dist/public/assets/_DQnRz4N-2.js.br +0 -0
- package/dist/public/assets/_DRy7E0y4.js.br +0 -0
- package/dist/public/assets/_DSl96WfX.js.br +0 -0
- package/dist/public/assets/_DTg6G0mG2.js.br +0 -0
- package/dist/public/assets/_DW89HP67.js.br +0 -0
- package/dist/public/assets/_DXx38Nka.js.br +0 -0
- package/dist/public/assets/_DbucXXAA.js.br +0 -0
- package/dist/public/assets/_DdWJlopw.js.br +0 -0
- package/dist/public/assets/_Dhz04q_D.js.br +0 -0
- package/dist/public/assets/_Dj5rhxkK2.js.br +0 -0
- package/dist/public/assets/_Dk0TvYyB.js.br +0 -0
- package/dist/public/assets/_DkrY5R_L.js.br +0 -0
- package/dist/public/assets/_DktisilP.js.br +0 -0
- package/dist/public/assets/_Dla_sQtT.js.br +0 -0
- package/dist/public/assets/_DmhJqFxg.js.br +0 -0
- package/dist/public/assets/_DobhJicG2.js.br +0 -0
- package/dist/public/assets/_DsedTKoi2.js.br +0 -0
- package/dist/public/assets/_DvCKkq4p.js.br +0 -0
- package/dist/public/assets/_DwFgGl5j.js.br +0 -0
- package/dist/public/assets/_GAJYC2Mn.js.br +0 -0
- package/dist/public/assets/_Ig-G3Vb-2.js.br +0 -0
- package/dist/public/assets/_JJ2tpZIq2.js.br +0 -0
- package/dist/public/assets/_bAkDCn_T2.js.br +0 -0
- package/dist/public/assets/_dGG0GxLJ.js.br +0 -0
- package/dist/public/assets/_tyL67pnw.js.br +0 -0
- package/dist/public/assets/_zBoBE4zG2.js.br +0 -0
- package/dist/public/assets/app-page-BDcrPm2k.css +0 -1
- package/dist/public/assets/app-page-BDcrPm2k.css.br +0 -0
- package/dist/public/assets/diff-view-UombrS99.css +0 -1
- package/dist/public/assets/diff-view-UombrS99.css.br +0 -0
- package/dist/public/assets/new-CzSXygvC.js +0 -1
- package/dist/public/assets/settings-CzSXygvC.js +0 -1
- package/dist/public/assets/w-CzSXygvC.js +0 -1
- package/dist/public/assets/w._-CzSXygvC.js +0 -1
- package/dist/public/assets/w._-q-GIPDIo.js +0 -1
|
@@ -1,4 +1,22 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { B as _attr_select_value, D as iconBtnRow, Dt as writeScope, E as iconBtnLg, F as _attr_class, I as _attr_details_or_dialog_open, J as _el, K as _content_resume, L as _attr_input_value, M as tone, P as _attr, Q as _existing_scope, R as _attr_option_value, V as _attr_style, X as _el_resume, Y as _el_read_error, Z as _escape, _t as _show_end, a as diffTreeOpen, at as _if, bt as _template, ct as _resume_branch, dt as _scope_with_id, et as _for_of, f as icon_search_default, ft as _script, gt as _set_serialize_reason, ht as _serialize_if, i as diffScope, lt as _scope_id, m as icon_refresh_default, mt as _serialize_guard, n as findInput, o as setDiffScope, ot as _peek_scope_id, p as icon_back_default, pt as _sep, r as icon_sidebar_default, rt as _html, st as _resume, t as findIconBtn, u as fuzzy, ut as _scope_reason, v as toast_default, vt as _show_start, x as repoLabel, y as icon_xmark_default, yt as _subscribe } from "./_B9UH2f9c.js";
|
|
2
|
+
//#region src/client/router.ts
|
|
3
|
+
function urlFor(r) {
|
|
4
|
+
if (r.view === "settings") return "/settings";
|
|
5
|
+
if (r.view === "new") return "/new";
|
|
6
|
+
if (!r.workspaceId) return "/";
|
|
7
|
+
const base = `/w/${encodeURIComponent(r.workspaceId)}`;
|
|
8
|
+
if (r.view === "diff") {
|
|
9
|
+
const q = new URLSearchParams();
|
|
10
|
+
if (r.pr) q.set("pr", r.pr);
|
|
11
|
+
if (r.scope && r.scope !== "committed") q.set("scope", r.scope);
|
|
12
|
+
if (r.file) q.set("file", r.file);
|
|
13
|
+
const qs = q.toString();
|
|
14
|
+
return `${base}/review${qs ? `?${qs}` : ""}`;
|
|
15
|
+
}
|
|
16
|
+
if (r.view === "manage") return `${base}/manage`;
|
|
17
|
+
return `${base}${r.sessionId ? `?s=${encodeURIComponent(r.sessionId)}` : ""}`;
|
|
18
|
+
}
|
|
19
|
+
//#endregion
|
|
2
20
|
//#region src/client/clipboard.ts
|
|
3
21
|
/** Copy text to the clipboard. `navigator.clipboard` needs a secure
|
|
4
22
|
* context — absent over plain-http LAN origins — so fall back to a hidden
|
|
@@ -73,72 +91,24 @@ function termMatcher(term) {
|
|
|
73
91
|
}
|
|
74
92
|
}
|
|
75
93
|
//#endregion
|
|
76
|
-
//#region
|
|
77
|
-
|
|
78
|
-
* hand: `dpiercey-ws-work-4f1hei` → `dpiercey-ws-work`.
|
|
79
|
-
*
|
|
80
|
-
* Deliberately only drops the trailing id. The branch is
|
|
81
|
-
* `{user}-{host}-{slug}-{id}` (server/config.ts `branchPrefix`), and both
|
|
82
|
-
* user and host are arbitrary — the host is this machine's hostname, so the
|
|
83
|
-
* `ws-` that used to be matched here was one developer's laptop leaking into
|
|
84
|
-
* a parser. Callers that know the workspace name should pass it instead. */
|
|
85
|
-
function shortWorkspaceName(wsBranch) {
|
|
86
|
-
const name = wsBranch.replace(/^origin\//, "");
|
|
87
|
-
return dropRandomId(name.includes("/") ? name.slice(name.lastIndexOf("/") + 1) : name);
|
|
88
|
-
}
|
|
89
|
-
/** Strip a trailing `-<id>` segment (workspaces.ts:
|
|
90
|
-
* `Math.random().toString(36).slice(2, 8)`), keeping the input when that
|
|
91
|
-
* would leave nothing. */
|
|
92
|
-
function dropRandomId(slug) {
|
|
93
|
-
return slug.replace(/-[a-z0-9]{1,6}$/i, "") || slug;
|
|
94
|
-
}
|
|
95
|
-
/** Topic suffix when `head` is a `-topic` lane under the workspace branch. */
|
|
96
|
-
function topicLane(head, wsBranch) {
|
|
97
|
-
if (!wsBranch) return "";
|
|
98
|
-
const h = head.replace(/^origin\//, "");
|
|
99
|
-
const ws = wsBranch.replace(/^origin\//, "");
|
|
100
|
-
if (h.startsWith(`${ws}-`)) return h.slice(ws.length + 1);
|
|
101
|
-
return "";
|
|
102
|
-
}
|
|
103
|
-
function shortHeadFallback(head) {
|
|
104
|
-
const short = dropRandomId(head);
|
|
105
|
-
if (short.length <= 20) return short;
|
|
106
|
-
const parts = short.split("-");
|
|
107
|
-
return parts.length > 1 ? parts[parts.length - 1] : short;
|
|
108
|
-
}
|
|
94
|
+
//#region lib/review/markdown.mjs
|
|
95
|
+
var CONTEXT = 3;
|
|
109
96
|
/**
|
|
110
|
-
*
|
|
97
|
+
* @typedef {{ worktree: string, path: string, side: "additions"|"deletions",
|
|
98
|
+
* line_start: number, line_end: number, text: string,
|
|
99
|
+
* head?: string|null, snippet?: string|null }} Comment
|
|
100
|
+
* @typedef {{ worktree: string, head?: string, baseSha?: string, base?: string,
|
|
101
|
+
* branch?: string, pr?: { number: number, headRefName: string } | null,
|
|
102
|
+
* files?: { path: string, old: string|null, new: string|null }[] }} Repo
|
|
103
|
+
*/
|
|
104
|
+
/**
|
|
105
|
+
* Per-repo base/head so the agent can see if it has moved on, plus ±3
|
|
106
|
+
* numbered lines of context so the snippet is still locatable after a small
|
|
107
|
+
* edit. A comment's stored `snippet` (what the reviewer actually saw) wins
|
|
108
|
+
* over re-reading the file, which may have changed since.
|
|
109
|
+
* @param {Comment[]} comments
|
|
110
|
+
* @param {Repo[] | null | undefined} repos
|
|
111
111
|
*/
|
|
112
|
-
function reviewCompareLabel(base, head, wsBranch = "", wsName = "") {
|
|
113
|
-
const baseName = (base || "base").replace(/^origin\//, "");
|
|
114
|
-
const headName = (head || "HEAD").replace(/^origin\//, "");
|
|
115
|
-
const ws = (wsBranch || "").replace(/^origin\//, "");
|
|
116
|
-
const onWs = !!ws && (headName === ws || headName.startsWith(`${ws}-`));
|
|
117
|
-
return {
|
|
118
|
-
base: baseName,
|
|
119
|
-
head: onWs ? wsName || shortWorkspaceName(ws) : shortHeadFallback(headName),
|
|
120
|
-
topic: onWs ? topicLane(headName, ws) : "",
|
|
121
|
-
title: headName === baseName ? baseName : `${headName} vs ${baseName}`
|
|
122
|
-
};
|
|
123
|
-
}
|
|
124
|
-
/** Short label for "local …" chips (workspace name, plus [topic] if any). */
|
|
125
|
-
function shortBranch(name, wsBranch = "", wsName = "") {
|
|
126
|
-
const head = name.replace(/^origin\//, "");
|
|
127
|
-
if (!head || head === "HEAD") return head || "HEAD";
|
|
128
|
-
const ws = wsBranch.replace(/^origin\//, "");
|
|
129
|
-
if (ws && (head === ws || head.startsWith(`${ws}-`))) {
|
|
130
|
-
const work = wsName || shortWorkspaceName(ws);
|
|
131
|
-
const topic = topicLane(head, ws);
|
|
132
|
-
return topic ? `${work} [${topic}]` : work;
|
|
133
|
-
}
|
|
134
|
-
return shortHeadFallback(head);
|
|
135
|
-
}
|
|
136
|
-
//#endregion
|
|
137
|
-
//#region src/client/review.ts
|
|
138
|
-
var CONTEXT = 3;
|
|
139
|
-
/** Render review comments as markdown: per-repo base/head so the agent
|
|
140
|
-
* can see if it has moved on, plus ±3 lines of numbered patch context
|
|
141
|
-
* so the snippet is still locatable after a small edit. */
|
|
142
112
|
function commentMarkdown(comments, repos) {
|
|
143
113
|
const byRepo = /* @__PURE__ */ new Map();
|
|
144
114
|
for (const c of comments) byRepo.set(c.worktree, [...byRepo.get(c.worktree) || [], c]);
|
|
@@ -147,17 +117,15 @@ function commentMarkdown(comments, repos) {
|
|
|
147
117
|
for (const [worktree, list] of byRepo) {
|
|
148
118
|
const repo = (repos || []).find((r) => r.worktree === worktree);
|
|
149
119
|
chunks.push("");
|
|
150
|
-
chunks.push(repoHeader(worktree, repo));
|
|
120
|
+
chunks.push(repoHeader(worktree, repo, list));
|
|
151
121
|
for (const c of list) {
|
|
152
122
|
n++;
|
|
153
|
-
const file = repo?.files.find((f) => f.path === c.path);
|
|
154
|
-
const source = c.side === "deletions" ? file?.old : file?.new;
|
|
155
123
|
const side = c.side === "deletions" ? "Old" : "New";
|
|
156
124
|
const range = c.line_start === c.line_end ? `line ${c.line_start}` : `lines ${c.line_start}-${c.line_end}`;
|
|
157
125
|
chunks.push("");
|
|
158
126
|
chunks.push(`${n}. **${c.path}** (${side} ${range})`);
|
|
159
|
-
|
|
160
|
-
|
|
127
|
+
const snippet = c.snippet ?? currentSnippet(repo, c);
|
|
128
|
+
if (snippet != null) {
|
|
161
129
|
const fence = markdownFence(snippet);
|
|
162
130
|
chunks.push("");
|
|
163
131
|
chunks.push(indent(`${fence}diff\n${snippet}\n${fence}`));
|
|
@@ -168,18 +136,33 @@ function commentMarkdown(comments, repos) {
|
|
|
168
136
|
}
|
|
169
137
|
return chunks.join("\n");
|
|
170
138
|
}
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
const
|
|
174
|
-
const
|
|
175
|
-
|
|
176
|
-
|
|
139
|
+
/** @param {Repo | undefined} repo @param {Comment} c */
|
|
140
|
+
function currentSnippet(repo, c) {
|
|
141
|
+
const file = repo?.files?.find((f) => f.path === c.path);
|
|
142
|
+
const source = c.side === "deletions" ? file?.old : file?.new;
|
|
143
|
+
return source == null ? null : quoteRange(source, c.line_start, c.line_end, c.side);
|
|
144
|
+
}
|
|
145
|
+
/** @param {string} worktree @param {Repo | undefined} repo @param {Comment[]} list */
|
|
146
|
+
function repoHeader(worktree, repo, list) {
|
|
147
|
+
if (repo?.head) {
|
|
148
|
+
const head = shortSha(repo.head);
|
|
149
|
+
const base = repo.baseSha ? shortSha(repo.baseSha) : "";
|
|
150
|
+
const branch = repo.pr?.headRefName || repo.branch || "HEAD";
|
|
151
|
+
return `${worktree}/${repo.pr ? ` #${repo.pr.number}` : ""}: \`${branch}\` ${head}${repo.base ? ` vs \`${repo.base}\` ${base}` : ""}`;
|
|
152
|
+
}
|
|
153
|
+
const heads = [...new Set(list.map((c) => c.head).filter(Boolean))];
|
|
154
|
+
return heads.length ? `${worktree}/: ${heads.map((h) => shortSha(h)).join(", ")}` : `${worktree}/`;
|
|
177
155
|
}
|
|
156
|
+
/** @param {string} sha */
|
|
178
157
|
function shortSha(sha, n = 12) {
|
|
179
158
|
return sha.slice(0, n);
|
|
180
159
|
}
|
|
181
|
-
/**
|
|
182
|
-
*
|
|
160
|
+
/**
|
|
161
|
+
* ±CONTEXT rows around the commented range, with +/- prefixes and line
|
|
162
|
+
* numbers — same shape as codiff's review payload.
|
|
163
|
+
* @param {string} source @param {number} start @param {number} end
|
|
164
|
+
* @param {"additions"|"deletions"} side
|
|
165
|
+
*/
|
|
183
166
|
function quoteRange(source, start, end, side) {
|
|
184
167
|
const lines = source.split("\n");
|
|
185
168
|
const from = Math.max(1, start - CONTEXT);
|
|
@@ -192,6 +175,7 @@ function quoteRange(source, start, end, side) {
|
|
|
192
175
|
}
|
|
193
176
|
return rows.join("\n");
|
|
194
177
|
}
|
|
178
|
+
/** @param {string} body */
|
|
195
179
|
function markdownFence(body) {
|
|
196
180
|
let ticks = 3;
|
|
197
181
|
const re = /`+/g;
|
|
@@ -199,9 +183,12 @@ function markdownFence(body) {
|
|
|
199
183
|
while (m = re.exec(body)) ticks = Math.max(ticks, m[0].length + 1);
|
|
200
184
|
return "`".repeat(ticks);
|
|
201
185
|
}
|
|
186
|
+
/** @param {string} text */
|
|
202
187
|
function indent(text) {
|
|
203
188
|
return text.split("\n").map((line) => line ? ` ${line}` : line).join("\n");
|
|
204
189
|
}
|
|
190
|
+
//#endregion
|
|
191
|
+
//#region src/client/review.ts
|
|
205
192
|
/** Build hierarchical rows from a sorted file list: a path trie with
|
|
206
193
|
* single-child directory chains compressed into one label (GitHub-style
|
|
207
194
|
* "src/util" segments), each level indented by depth — labels stay short
|
|
@@ -260,56 +247,7 @@ function treeRows(files) {
|
|
|
260
247
|
walk(root, 0, "");
|
|
261
248
|
return rows;
|
|
262
249
|
}
|
|
263
|
-
var treeToggle = "
|
|
264
|
-
var repoWorktree = "_eF _u";
|
|
265
|
-
var repoTitle = "_eH _t";
|
|
266
|
-
var fileFilter = "_fG _i";
|
|
267
|
-
//#endregion
|
|
268
|
-
//#region src/tags/file-filter.marko
|
|
269
|
-
var file_filter_default = _template("k", (input) => {
|
|
270
|
-
const $scope0_reason = _scope_reason();
|
|
271
|
-
const $scope0_id = _scope_id();
|
|
272
|
-
let value = input.value;
|
|
273
|
-
let pending = null;
|
|
274
|
-
const draft = (pending ?? value) || "";
|
|
275
|
-
const box = { timer: 0 };
|
|
276
|
-
const flush = _resume(() => {
|
|
277
|
-
if (box.timer) {
|
|
278
|
-
clearTimeout(box.timer);
|
|
279
|
-
box.timer = 0;
|
|
280
|
-
}
|
|
281
|
-
const next = pending !== null ? pending : value || "";
|
|
282
|
-
pending = null;
|
|
283
|
-
value = next;
|
|
284
|
-
}, "k1", $scope0_id);
|
|
285
|
-
const type = _resume((v) => {
|
|
286
|
-
if (box.timer) clearTimeout(box.timer);
|
|
287
|
-
if (!v) {
|
|
288
|
-
box.timer = 0;
|
|
289
|
-
pending = null;
|
|
290
|
-
value = "";
|
|
291
|
-
return;
|
|
292
|
-
}
|
|
293
|
-
pending = v;
|
|
294
|
-
box.timer = setTimeout(flush, 150);
|
|
295
|
-
}, "k2", $scope0_id);
|
|
296
|
-
_html(`<div${_attr_class("_fF")}><input${_attr_input_value($scope0_id, "b", draft, _resume(function(v) {
|
|
297
|
-
type(v);
|
|
298
|
-
}, "k0", $scope0_id))}${_attr_class(fileFilter)} type=search placeholder="Filter files…" aria-label="Filter files">${_el_resume($scope0_id, "b")}</div>`);
|
|
299
|
-
_script($scope0_id, "k3");
|
|
300
|
-
writeScope($scope0_id, {
|
|
301
|
-
e: _serialize_if($scope0_reason, 1) && input.value,
|
|
302
|
-
f: _serialize_if($scope0_reason, 0) && input.valueChange,
|
|
303
|
-
h: value,
|
|
304
|
-
j: pending,
|
|
305
|
-
l: draft,
|
|
306
|
-
n: box.timer,
|
|
307
|
-
p: flush,
|
|
308
|
-
r: type,
|
|
309
|
-
i: input.valueChange || void 0
|
|
310
|
-
});
|
|
311
|
-
_resume_branch($scope0_id);
|
|
312
|
-
});
|
|
250
|
+
var treeToggle = "_ea _X _g";
|
|
313
251
|
//#endregion
|
|
314
252
|
//#region src/tags/diff-send.marko
|
|
315
253
|
var diff_send_default = _template("h", (input) => {
|
|
@@ -319,7 +257,7 @@ var diff_send_default = _template("h", (input) => {
|
|
|
319
257
|
let sendTarget = null;
|
|
320
258
|
const sessions = input.sessions || [];
|
|
321
259
|
const sendPick = sessions.some((s) => s.id === sendTarget) ? sendTarget : sessions[0]?.id ?? null;
|
|
322
|
-
_html(`<span${_attr_class("
|
|
260
|
+
_html(`<span${_attr_class("_eA")}><button type=button${_attr_class("_l")} title="Copy comments as markdown">Copy${_el_resume($scope0_id, "c")}</button>${_el_resume($scope0_id, "b")}`);
|
|
323
261
|
_if(() => {
|
|
324
262
|
if (sessions.length === 1) {
|
|
325
263
|
const $scope1_id = _scope_id();
|
|
@@ -329,11 +267,11 @@ var diff_send_default = _template("h", (input) => {
|
|
|
329
267
|
return 0;
|
|
330
268
|
} else if (sessions.length) {
|
|
331
269
|
const $scope2_id = _scope_id();
|
|
332
|
-
_html(`<span${_attr_class("
|
|
270
|
+
_html(`<span${_attr_class("_eB")}><button type=button${_attr_class(["_m", "_eC"])}${_attr("disabled", sending)}>Send to${_el_resume($scope2_id, "c")}</button>${_el_resume($scope2_id, "b")}`);
|
|
333
271
|
_attr_select_value($scope2_id, "d", sendTarget, _resume((_new_sendTarget) => {
|
|
334
272
|
sendTarget = _new_sendTarget;
|
|
335
273
|
}, "h0", $scope2_id), () => {
|
|
336
|
-
_html(`<select${_attr_class("
|
|
274
|
+
_html(`<select${_attr_class("_eD")} aria-label="Send comments to session"${_attr("disabled", sending)}>`);
|
|
337
275
|
_for_of(sessions, (s) => {
|
|
338
276
|
const $scope3_id = _scope_id();
|
|
339
277
|
_html(`<option${_attr_option_value(s.id)}>${_escape(s.title || s.agent)}${_el_resume($scope3_id, "b", $sg__input_sessions)}</option>${_el_resume($scope3_id, "a", $sg__input_sessions)}`);
|
|
@@ -1869,46 +1807,113 @@ var diff_find_default = _template("g", (input) => {
|
|
|
1869
1807
|
el.select();
|
|
1870
1808
|
}, 0);
|
|
1871
1809
|
}, "g5", $scope0_id);
|
|
1872
|
-
_html(`<div${_attr_class(["
|
|
1810
|
+
_html(`<div${_attr_class(["_eI", !open && "_eH"])} aria-hidden=${open ? "false" : "true"}><input${_attr_input_value($scope0_id, "b", query || "", _resume(function(v) {
|
|
1873
1811
|
type(v);
|
|
1874
|
-
}, "g0", $scope0_id))}${_attr_class(findInput)} type=search enterkeyhint=search autocomplete=off tabindex=${open ? "0" : "-1"} placeholder="Find in review" aria-label="Find in review">${_el_resume($scope0_id, "b")}<span${_attr_class("
|
|
1812
|
+
}, "g0", $scope0_id))}${_attr_class(findInput)} type=search enterkeyhint=search autocomplete=off tabindex=${open ? "0" : "-1"} placeholder="Find in review" aria-label="Find in review">${_el_resume($scope0_id, "b")}<span${_attr_class("_eL")}>${open && (query || "").trim() ? hits.length ? `${_escape(`${at + 1}`)}/${_escape(`${hits.length}`)}` : "0/0" : ""}${_el_resume($scope0_id, "d")}</span><button type=button${_attr_class(findIconBtn)} title="Previous match"${_attr("disabled", !hits.length || !open)} tabindex=${open ? "0" : "-1"}>↑</button>${_el_resume($scope0_id, "e")}<button type=button${_attr_class(findIconBtn)} title="Next match"${_attr("disabled", !hits.length || !open)} tabindex=${open ? "0" : "-1"}>↓</button>${_el_resume($scope0_id, "f")}<button type=button${_attr_class(findIconBtn)} title="Close find" tabindex=${open ? "0" : "-1"}>`);
|
|
1813
|
+
icon_xmark_default({ size: 14 });
|
|
1814
|
+
_html(`</button>${_el_resume($scope0_id, "g")}</div>${_el_resume($scope0_id, "a")}`);
|
|
1875
1815
|
_script($scope0_id, "g6");
|
|
1876
1816
|
_script($scope0_id, "g7");
|
|
1877
1817
|
_script($scope0_id, "g8");
|
|
1878
1818
|
writeScope($scope0_id, {
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1819
|
+
k: _serialize_if($scope0_reason, 1) && input.open,
|
|
1820
|
+
l: _serialize_if($scope0_reason, 0) && input.openChange,
|
|
1821
|
+
n: _serialize_if($scope0_reason, 3) && input.query,
|
|
1822
|
+
o: _serialize_if($scope0_reason, 2) && input.queryChange,
|
|
1823
|
+
q: _serialize_if($scope0_reason, 5) && input.state,
|
|
1824
|
+
r: _serialize_if($scope0_reason, 4) && input.stateChange,
|
|
1825
|
+
t: input.files,
|
|
1826
|
+
u: input.focusRef,
|
|
1827
|
+
v: input.tick,
|
|
1828
|
+
w: open,
|
|
1829
|
+
y: query,
|
|
1830
|
+
a1: hi,
|
|
1831
|
+
a3: hits?.length,
|
|
1832
|
+
a6: at,
|
|
1833
|
+
a9: live.open,
|
|
1834
|
+
ac: box.timer,
|
|
1835
|
+
ae: box.tick,
|
|
1836
|
+
af: box.wasOpen,
|
|
1837
|
+
ag: emit,
|
|
1838
|
+
aj: type,
|
|
1839
|
+
al: next,
|
|
1840
|
+
am: close,
|
|
1841
|
+
an: focusInput,
|
|
1842
|
+
x: input.openChange || void 0,
|
|
1843
|
+
z: input.queryChange || void 0,
|
|
1844
|
+
p: input.stateChange || void 0
|
|
1904
1845
|
});
|
|
1905
1846
|
_resume_branch($scope0_id);
|
|
1906
1847
|
});
|
|
1848
|
+
//#endregion
|
|
1849
|
+
//#region src/client/branch-label.ts
|
|
1850
|
+
/** Fallback label for a workspace branch when the workspace name is not to
|
|
1851
|
+
* hand: `dpiercey-ws-work-4f1hei` → `dpiercey-ws-work`.
|
|
1852
|
+
*
|
|
1853
|
+
* Deliberately only drops the trailing id. The branch is
|
|
1854
|
+
* `{user}-{host}-{slug}-{id}` (server/config.ts `branchPrefix`), and both
|
|
1855
|
+
* user and host are arbitrary — the host is this machine's hostname, so the
|
|
1856
|
+
* `ws-` that used to be matched here was one developer's laptop leaking into
|
|
1857
|
+
* a parser. Callers that know the workspace name should pass it instead. */
|
|
1858
|
+
function shortWorkspaceName(wsBranch) {
|
|
1859
|
+
const name = wsBranch.replace(/^origin\//, "");
|
|
1860
|
+
return dropRandomId(name.includes("/") ? name.slice(name.lastIndexOf("/") + 1) : name);
|
|
1861
|
+
}
|
|
1862
|
+
/** Strip a trailing `-<id>` segment (workspaces.ts:
|
|
1863
|
+
* `Math.random().toString(36).slice(2, 8)`), keeping the input when that
|
|
1864
|
+
* would leave nothing. */
|
|
1865
|
+
function dropRandomId(slug) {
|
|
1866
|
+
return slug.replace(/-[a-z0-9]{1,6}$/i, "") || slug;
|
|
1867
|
+
}
|
|
1868
|
+
/** Topic suffix when `head` is a `-topic` lane under the workspace branch. */
|
|
1869
|
+
function topicLane(head, wsBranch) {
|
|
1870
|
+
if (!wsBranch) return "";
|
|
1871
|
+
const h = head.replace(/^origin\//, "");
|
|
1872
|
+
const ws = wsBranch.replace(/^origin\//, "");
|
|
1873
|
+
if (h.startsWith(`${ws}-`)) return h.slice(ws.length + 1);
|
|
1874
|
+
return "";
|
|
1875
|
+
}
|
|
1876
|
+
function shortHeadFallback(head) {
|
|
1877
|
+
const short = dropRandomId(head);
|
|
1878
|
+
if (short.length <= 20) return short;
|
|
1879
|
+
const parts = short.split("-");
|
|
1880
|
+
return parts.length > 1 ? parts[parts.length - 1] : short;
|
|
1881
|
+
}
|
|
1882
|
+
/**
|
|
1883
|
+
* Review compare parts: render as `main` → `work` `[topic]`, not one chip.
|
|
1884
|
+
*/
|
|
1885
|
+
function reviewCompareLabel(base, head, wsBranch = "", wsName = "") {
|
|
1886
|
+
const baseName = (base || "base").replace(/^origin\//, "");
|
|
1887
|
+
const headName = (head || "HEAD").replace(/^origin\//, "");
|
|
1888
|
+
const ws = (wsBranch || "").replace(/^origin\//, "");
|
|
1889
|
+
const onWs = !!ws && (headName === ws || headName.startsWith(`${ws}-`));
|
|
1890
|
+
return {
|
|
1891
|
+
base: baseName,
|
|
1892
|
+
head: onWs ? wsName || shortWorkspaceName(ws) : shortHeadFallback(headName),
|
|
1893
|
+
topic: onWs ? topicLane(headName, ws) : "",
|
|
1894
|
+
title: headName === baseName ? baseName : `${headName} vs ${baseName}`
|
|
1895
|
+
};
|
|
1896
|
+
}
|
|
1897
|
+
/** Short label for "local …" chips (workspace name, plus [topic] if any). */
|
|
1898
|
+
function shortBranch(name, wsBranch = "", wsName = "") {
|
|
1899
|
+
const head = name.replace(/^origin\//, "");
|
|
1900
|
+
if (!head || head === "HEAD") return head || "HEAD";
|
|
1901
|
+
const ws = wsBranch.replace(/^origin\//, "");
|
|
1902
|
+
if (ws && (head === ws || head.startsWith(`${ws}-`))) {
|
|
1903
|
+
const work = wsName || shortWorkspaceName(ws);
|
|
1904
|
+
const topic = topicLane(head, ws);
|
|
1905
|
+
return topic ? `${work} [${topic}]` : work;
|
|
1906
|
+
}
|
|
1907
|
+
return shortHeadFallback(head);
|
|
1908
|
+
}
|
|
1909
|
+
var repoWorktree = "_fU _u";
|
|
1910
|
+
var repoTitle = "_f0 _t";
|
|
1911
|
+
tone.warn;
|
|
1907
1912
|
var diff_file_default = _template("f", (input) => {
|
|
1908
1913
|
_scope_reason();
|
|
1909
1914
|
const $scope0_id = _scope_id();
|
|
1910
1915
|
_el($scope0_id, "f0");
|
|
1911
|
-
_html(`<div${_attr_class(["
|
|
1916
|
+
_html(`<div${_attr_class(["_gw", input.class])}></div>${_el_resume($scope0_id, "a")}`);
|
|
1912
1917
|
_script($scope0_id, "f1");
|
|
1913
1918
|
writeScope($scope0_id, {
|
|
1914
1919
|
e: input.file,
|
|
@@ -1926,65 +1931,471 @@ var diff_file_default = _template("f", (input) => {
|
|
|
1926
1931
|
_resume_branch($scope0_id);
|
|
1927
1932
|
});
|
|
1928
1933
|
//#endregion
|
|
1929
|
-
//#region src/tags/
|
|
1930
|
-
var
|
|
1931
|
-
const $scope0_reason = _scope_reason(), $
|
|
1934
|
+
//#region src/tags/review-section.marko
|
|
1935
|
+
var review_section_default = _template("r", (input) => {
|
|
1936
|
+
const $scope0_reason = _scope_reason(), $sg__input_repo = _serialize_guard($scope0_reason, 30), $si__input_repo = _serialize_if($scope0_reason, 30), $sg__input_repo__OR__input_files__OR__input_shownKeys__OR__input_workspaceBranch__OR__input_workspaceName__OR__input_collapsible__OR__input_collapsed__OR__input_localDiffers__OR__input_onlyNew__OR__input_opened = _serialize_guard($scope0_reason, 27), $sg__input_repo__OR__input_workspaceBranch__OR__input_workspaceName = _serialize_guard($scope0_reason, 12), $sg__input_repo__OR__input_files_length = _serialize_guard($scope0_reason, 0), $si__input_repo__OR__input_workspaceBranch__OR__input_workspaceName = _serialize_if($scope0_reason, 12), $sg__input_files__OR__input_shownKeys = _serialize_guard($scope0_reason, 3), $sg__input_files__OR__input_onlyNew = _serialize_guard($scope0_reason, 4), $sg__input_files = _serialize_guard($scope0_reason, 31), $sg__input_files__OR__input_commentsByFile = _serialize_guard($scope0_reason, 5), $si__input_files = _serialize_if($scope0_reason, 31), $si__input_files__OR__input_commentsByFile = _serialize_if($scope0_reason, 5), $si__input_findHit_key = _serialize_if($scope0_reason, 38), $sg__input_collapsible__OR__input_collapsed = _serialize_guard($scope0_reason, 8), $si__input_repo__OR__input_files__OR__input_shownKeys = _serialize_if($scope0_reason, 10), $si__input_collapsible__OR__input_collapsed = _serialize_if($scope0_reason, 8), $si__input_files__OR__input_collapsible__OR__input_collapsed__OR__input_opened = _serialize_if($scope0_reason, 21), $si__input_repo__OR__input_workspaceBranch__OR__input_workspaceName__OR__input_localDiffers = _serialize_if($scope0_reason, 20), $si__input_files__OR__input_shownKeys = _serialize_if($scope0_reason, 3), $si__input_files__OR__input_onlyNew = _serialize_if($scope0_reason, 4), $si__input = _serialize_if($scope0_reason, 29), $si__input_draft = _serialize_if($scope0_reason, 40), $si__input_sessions = _serialize_if($scope0_reason, 41), $si__input_onSelect = _serialize_if($scope0_reason, 42), $si__input_onSaveComment = _serialize_if($scope0_reason, 43), $si__input_onSendDraft = _serialize_if($scope0_reason, 44), $si__input_onCancelDraft = _serialize_if($scope0_reason, 45), $si__input_onDeleteComment = _serialize_if($scope0_reason, 46), $si__input_onSendComment = _serialize_if($scope0_reason, 47), $si__input_onError = _serialize_if($scope0_reason, 48), $si__input_shownKeys = _serialize_if($scope0_reason, 32), $si__input_commentsByFile = _serialize_if($scope0_reason, 37), $si__input_findHit_line = _serialize_if($scope0_reason, 39);
|
|
1932
1937
|
const $scope0_id = _scope_id();
|
|
1933
|
-
const $
|
|
1934
|
-
const $
|
|
1935
|
-
const $
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
const
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1938
|
+
const $input__closures = /* @__PURE__ */ new Set();
|
|
1939
|
+
const $input_draft__closures = /* @__PURE__ */ new Set();
|
|
1940
|
+
const $input_sessions__closures = /* @__PURE__ */ new Set();
|
|
1941
|
+
const $input_onSelect__closures = /* @__PURE__ */ new Set();
|
|
1942
|
+
const $input_onSaveComment__closures = /* @__PURE__ */ new Set();
|
|
1943
|
+
const $input_onSendDraft__closures = /* @__PURE__ */ new Set();
|
|
1944
|
+
const $input_onCancelDraft__closures = /* @__PURE__ */ new Set();
|
|
1945
|
+
const $input_onDeleteComment__closures = /* @__PURE__ */ new Set();
|
|
1946
|
+
const $input_onSendComment__closures = /* @__PURE__ */ new Set();
|
|
1947
|
+
const $input_onError__closures = /* @__PURE__ */ new Set();
|
|
1948
|
+
const $input_findHit_key__closures = /* @__PURE__ */ new Set();
|
|
1949
|
+
const $input_shownKeys__closures = /* @__PURE__ */ new Set();
|
|
1950
|
+
const $input_commentsByFile__closures = /* @__PURE__ */ new Set();
|
|
1951
|
+
const $input_findHit_line__closures = /* @__PURE__ */ new Set();
|
|
1952
|
+
const repo = input.repo;
|
|
1953
|
+
const shownFiles = input.files.filter((f) => input.shownKeys.has(f.key));
|
|
1954
|
+
const shownCount = shownFiles.length;
|
|
1955
|
+
const countLabel = shownCount || input.files.length;
|
|
1956
|
+
const stats = (() => {
|
|
1957
|
+
let additions = 0;
|
|
1958
|
+
let deletions = 0;
|
|
1959
|
+
for (const f of shownFiles) {
|
|
1960
|
+
additions += f.additions || 0;
|
|
1961
|
+
deletions += f.deletions || 0;
|
|
1962
|
+
}
|
|
1963
|
+
return {
|
|
1964
|
+
additions,
|
|
1965
|
+
deletions
|
|
1966
|
+
};
|
|
1967
|
+
})();
|
|
1968
|
+
const newCount = input.files.filter((f) => f.changedSince).length;
|
|
1969
|
+
const compare$1 = reviewCompareLabel(repo.pr?.baseRefName || repo.base, repo.pr?.headRefName || repo.branch, input.workspaceBranch, input.workspaceName);
|
|
1970
|
+
const prTitle = repo.pr ? `${repo.pr.title}: ${repo.pr.headRefName} ${repo.head} vs ${repo.base} ${repo.baseSha}` : "";
|
|
1971
|
+
_html(`<section${_attr_class("_fQ")}${repo.pr ? _attr("data-pr", `${repo.worktree}/${repo.pr.number}`) : ""}${_attr("hidden", !shownCount && !repo.pr && input.findHit?.repo !== repo.id)}><div${_attr_class(["_fR", { ["_fS"]: input.collapsible && input.collapsed }])}>`);
|
|
1972
|
+
_if(() => {
|
|
1973
|
+
if (input.collapsible) {
|
|
1974
|
+
const $scope1_id = _scope_id();
|
|
1975
|
+
_html(`<button type=button${_attr_class("_fT")} aria-expanded=${!input.collapsed ? "true" : "false"} aria-busy=${input.expanding ? "true" : "false"}${input.collapsed ? _attr("title", `Show ${countLabel} files`) : " title=\"Hide files\""}><span${_attr_class([
|
|
1976
|
+
"_gc",
|
|
1977
|
+
!input.collapsed && "_gd",
|
|
1978
|
+
input.expanding && "_ge"
|
|
1979
|
+
])} aria-hidden=true>${input.collapsed ? "▸" : "▾"}${_el_resume($scope1_id, "c", _serialize_guard($scope0_reason, 35))}</span>${_el_resume($scope1_id, "b", _serialize_guard($scope0_reason, 9))}<span${_attr_class(repoWorktree)}>${_escape(repo.worktree)}${_el_resume($scope1_id, "e", $sg__input_repo)}</span></button>${_el_resume($scope1_id, "a")}`);
|
|
1980
|
+
_script($scope1_id, "r7");
|
|
1981
|
+
writeScope($scope1_id, { _: _scope_with_id($scope0_id) });
|
|
1982
|
+
return 0;
|
|
1983
|
+
} else {
|
|
1984
|
+
const $scope10_id = _scope_id();
|
|
1985
|
+
_html(`<span${_attr_class(repoWorktree)}>${_escape(repo.worktree)}${_el_resume($scope10_id, "b", $sg__input_repo)}</span>`);
|
|
1986
|
+
_serialize_if($scope0_reason, 1) && writeScope($scope10_id, { _: $si__input_repo && _scope_with_id($scope0_id) });
|
|
1987
|
+
return 1;
|
|
1988
|
+
}
|
|
1989
|
+
}, $scope0_id, "c", _serialize_guard($scope0_reason, 1) || _serialize_guard($scope0_reason, 25), _serialize_guard($scope0_reason, 34), $sg__input_repo__OR__input_files__OR__input_shownKeys__OR__input_workspaceBranch__OR__input_workspaceName__OR__input_collapsible__OR__input_collapsed__OR__input_localDiffers__OR__input_onlyNew__OR__input_opened, 0, 1);
|
|
1990
|
+
_if(() => {
|
|
1991
|
+
if (repo.pr) {
|
|
1992
|
+
const $scope11_id = _scope_id();
|
|
1993
|
+
_html(`<a${_attr_class(["_p", "_r"])}${_attr("href", `${repo.pr.url}/files`)} target=_blank rel=noopener${_attr("title", prTitle)}>#${_sep($sg__input_repo)}${_escape(repo.pr.number)}${_el_resume($scope11_id, "b", $sg__input_repo)}</a>${_el_resume($scope11_id, "a", $sg__input_repo)}<span${_attr_class(repoTitle)}>${_escape(repo.pr.title)}${_el_resume($scope11_id, "d", $sg__input_repo)}</span>`);
|
|
1994
|
+
$si__input_repo && writeScope($scope11_id, { _: _scope_with_id($scope0_id) });
|
|
1995
|
+
return 0;
|
|
1996
|
+
} else {
|
|
1997
|
+
const $scope12_id = _scope_id();
|
|
1998
|
+
_html(`<span${_attr_class(repoTitle)}>${_escape(repoLabel(repo.full_name))}${_el_resume($scope12_id, "b", $sg__input_repo)}</span>`);
|
|
1999
|
+
$si__input_repo && writeScope($scope12_id, { _: _scope_with_id($scope0_id) });
|
|
2000
|
+
return 1;
|
|
2001
|
+
}
|
|
2002
|
+
}, $scope0_id, "d", $sg__input_repo, $sg__input_repo, $sg__input_repo__OR__input_files__OR__input_shownKeys__OR__input_workspaceBranch__OR__input_workspaceName__OR__input_collapsible__OR__input_collapsed__OR__input_localDiffers__OR__input_onlyNew__OR__input_opened);
|
|
2003
|
+
_html(`<span${_attr_class("_f1")}${_attr("title", `${compare$1.title} · ${repo.head.slice(0, 7)}…${repo.baseSha.slice(0, 7)}`)}><span${_attr_class(["_F", "_f2"])}>${_escape(compare$1.base)}${_el_resume($scope0_id, "g", $sg__input_repo__OR__input_workspaceBranch__OR__input_workspaceName)}</span><span${_attr_class(["_H", "_f4"])} aria-hidden=true>vs</span><span${_attr_class(["_F", "_f3"])}>${_escape(compare$1.head)}${_el_resume($scope0_id, "j", $sg__input_repo__OR__input_workspaceBranch__OR__input_workspaceName)}</span>`);
|
|
2004
|
+
_if(() => {
|
|
2005
|
+
if (compare$1.topic) {
|
|
2006
|
+
const $scope15_id = _scope_id();
|
|
2007
|
+
_html(`<span${_attr_class([
|
|
2008
|
+
"_F",
|
|
2009
|
+
tone.accent,
|
|
2010
|
+
"_f5"
|
|
2011
|
+
])}>${_escape(compare$1.topic)}${_el_resume($scope15_id, "b", $sg__input_repo__OR__input_workspaceBranch__OR__input_workspaceName)}</span>`);
|
|
2012
|
+
$si__input_repo__OR__input_workspaceBranch__OR__input_workspaceName && writeScope($scope15_id, { _: _scope_with_id($scope0_id) });
|
|
2013
|
+
return 0;
|
|
2014
|
+
}
|
|
2015
|
+
}, $scope0_id, "k", $sg__input_repo__OR__input_workspaceBranch__OR__input_workspaceName, $sg__input_repo__OR__input_workspaceBranch__OR__input_workspaceName, $sg__input_repo__OR__input_files__OR__input_shownKeys__OR__input_workspaceBranch__OR__input_workspaceName__OR__input_collapsible__OR__input_collapsed__OR__input_localDiffers__OR__input_onlyNew__OR__input_opened, 0, 1);
|
|
2016
|
+
_html(`</span>${_el_resume($scope0_id, "e", $sg__input_repo__OR__input_workspaceBranch__OR__input_workspaceName)}`);
|
|
2017
|
+
_if(() => {
|
|
2018
|
+
if (repo.githubDrift) {
|
|
2019
|
+
const $scope2_id = _scope_id();
|
|
2020
|
+
_html(`<button type=button${_attr_class([
|
|
2021
|
+
"_F",
|
|
2022
|
+
tone.warn,
|
|
2023
|
+
"_f6"
|
|
2024
|
+
])}${_attr("title", `origin/${repo.pr.headRefName} ${repo.head} · GitHub ${repo.pr.headRefOid}. Reload to re-ask GitHub`)}${_attr("disabled", input.loading)}>behind GitHub ${_sep($sg__input_repo)}${_escape(shortSha(repo.head, 7))}${_el_resume($scope2_id, "b", $sg__input_repo)} → ${_sep($sg__input_repo)}${_escape(shortSha(repo.pr.headRefOid, 7))}${_el_resume($scope2_id, "c", $sg__input_repo)}</button>${_el_resume($scope2_id, "a")}`);
|
|
2025
|
+
_script($scope2_id, "r8");
|
|
2026
|
+
writeScope($scope2_id, { _: _scope_with_id($scope0_id) });
|
|
2027
|
+
return 0;
|
|
2028
|
+
}
|
|
2029
|
+
}, $scope0_id, "l", _serialize_guard($scope0_reason, 2), $sg__input_repo, $sg__input_repo__OR__input_files__OR__input_shownKeys__OR__input_workspaceBranch__OR__input_workspaceName__OR__input_collapsible__OR__input_collapsed__OR__input_localDiffers__OR__input_onlyNew__OR__input_opened, 0, 1);
|
|
2030
|
+
_if(() => {
|
|
2031
|
+
if (repo.contained && input.files.length) {
|
|
2032
|
+
const $scope13_id = _scope_id();
|
|
2033
|
+
_html(`<span${_attr_class(["_F", "_f6"])}${_attr("title", `${repo.pr ? `#${repo.pr.number}` : repo.branch} is already in ${repo.base}; showing the working tree only`)}>already in ${_sep($sg__input_repo)}${_escape(repo.base)}${_el_resume($scope13_id, "b", $sg__input_repo)}</span>${_el_resume($scope13_id, "a", $sg__input_repo)}`);
|
|
2034
|
+
_serialize_if($scope0_reason, 0) && writeScope($scope13_id, { _: $si__input_repo && _scope_with_id($scope0_id) });
|
|
2035
|
+
return 0;
|
|
2036
|
+
}
|
|
2037
|
+
}, $scope0_id, "m", $sg__input_repo__OR__input_files_length, $sg__input_repo__OR__input_files_length, $sg__input_repo__OR__input_files__OR__input_shownKeys__OR__input_workspaceBranch__OR__input_workspaceName__OR__input_collapsible__OR__input_collapsed__OR__input_localDiffers__OR__input_onlyNew__OR__input_opened, 0, 1);
|
|
2038
|
+
_if(() => {
|
|
2039
|
+
if (input.localDiffers) {
|
|
2040
|
+
const $scope3_id = _scope_id();
|
|
2041
|
+
_html(`<span${_attr_class(["_F", "_f6"])}${_attr("title", `This view is ${shortSha(repo.head)} (${repo.pr.headRefName}); checked out is ${shortSha(repo.localHead)} (${repo.branch})`)}>local ${_sep($sg__input_repo__OR__input_workspaceBranch__OR__input_workspaceName)}${_escape(shortBranch(repo.branch, input.workspaceBranch, input.workspaceName))}${_el_resume($scope3_id, "b", $sg__input_repo__OR__input_workspaceBranch__OR__input_workspaceName)} ${_sep($sg__input_repo)}${_escape(shortSha(repo.localHead, 7))}${_el_resume($scope3_id, "c", $sg__input_repo)}</span>${_el_resume($scope3_id, "a", $sg__input_repo)}`);
|
|
2042
|
+
$si__input_repo__OR__input_workspaceBranch__OR__input_workspaceName__OR__input_localDiffers && writeScope($scope3_id, { _: $si__input_repo__OR__input_workspaceBranch__OR__input_workspaceName && _scope_with_id($scope0_id) });
|
|
2043
|
+
return 0;
|
|
2044
|
+
}
|
|
2045
|
+
}, $scope0_id, "n", _serialize_guard($scope0_reason, 20), _serialize_guard($scope0_reason, 36), $sg__input_repo__OR__input_files__OR__input_shownKeys__OR__input_workspaceBranch__OR__input_workspaceName__OR__input_collapsible__OR__input_collapsed__OR__input_localDiffers__OR__input_onlyNew__OR__input_opened, 0, 1);
|
|
2046
|
+
_html(`<span${_attr_class("_fV")}><span>${_escape(countLabel)}${_el_resume($scope0_id, "p", $sg__input_files__OR__input_shownKeys)} file${_sep($sg__input_files__OR__input_shownKeys)}${countLabel === 1 ? "" : "s"}${_el_resume($scope0_id, "q", $sg__input_files__OR__input_shownKeys)}</span>`);
|
|
2047
|
+
_if(() => {
|
|
2048
|
+
if (stats.additions || stats.deletions) {
|
|
2049
|
+
const $scope14_id = _scope_id();
|
|
2050
|
+
_html(`<span${_attr_class("_fW")}>+${_sep($sg__input_files__OR__input_shownKeys)}${_escape(stats.additions)}${_el_resume($scope14_id, "b", $sg__input_files__OR__input_shownKeys)}</span><span${_attr_class("_fX")}>−${_sep($sg__input_files__OR__input_shownKeys)}${_escape(stats.deletions)}${_el_resume($scope14_id, "d", $sg__input_files__OR__input_shownKeys)}</span>`);
|
|
2051
|
+
$si__input_files__OR__input_shownKeys && writeScope($scope14_id, { _: _scope_with_id($scope0_id) });
|
|
2052
|
+
return 0;
|
|
2053
|
+
}
|
|
2054
|
+
}, $scope0_id, "r", $sg__input_files__OR__input_shownKeys, $sg__input_files__OR__input_shownKeys, $sg__input_repo__OR__input_files__OR__input_shownKeys__OR__input_workspaceBranch__OR__input_workspaceName__OR__input_collapsible__OR__input_collapsed__OR__input_localDiffers__OR__input_onlyNew__OR__input_opened);
|
|
2055
|
+
_if(() => {
|
|
2056
|
+
if (newCount || input.onlyNew) {
|
|
2057
|
+
const $scope4_id = _scope_id();
|
|
2058
|
+
_html(`<button type=button${_attr_class(["_fZ", { ["_fY"]: input.onlyNew }])} aria-pressed=${input.onlyNew ? "true" : "false"} title=${input.onlyNew ? "\"Show every file\"" : "\"Show only files changed since your last visit\""}>${_escape(newCount)}${_el_resume($scope4_id, "b", $sg__input_files)} new</button>${_el_resume($scope4_id, "a")}`);
|
|
2059
|
+
_script($scope4_id, "r9");
|
|
2060
|
+
writeScope($scope4_id, { _: _scope_with_id($scope0_id) });
|
|
2061
|
+
return 0;
|
|
2062
|
+
}
|
|
2063
|
+
}, $scope0_id, "s", $sg__input_files__OR__input_onlyNew, $sg__input_files__OR__input_onlyNew, $sg__input_repo__OR__input_files__OR__input_shownKeys__OR__input_workspaceBranch__OR__input_workspaceName__OR__input_collapsible__OR__input_collapsed__OR__input_localDiffers__OR__input_onlyNew__OR__input_opened, 0, 1);
|
|
2064
|
+
_html(`</span></div>${_el_resume($scope0_id, "b", $sg__input_collapsible__OR__input_collapsed)}`);
|
|
2065
|
+
_if(() => {
|
|
2066
|
+
if (!input.collapsible || !input.collapsed || input.opened) {
|
|
2067
|
+
const $scope5_id = _scope_id();
|
|
2068
|
+
const $show = !input.collapsible || !input.collapsed;
|
|
2069
|
+
_show_start($show);
|
|
2070
|
+
_html(`<div${_attr_class("_f8")}>`);
|
|
2071
|
+
_for_of(input.files, (file$1) => {
|
|
2072
|
+
const $scope6_id = _scope_id();
|
|
2073
|
+
const $for_content__file__closures = /* @__PURE__ */ new Set();
|
|
2074
|
+
const $for_content__file_key__closures = /* @__PURE__ */ new Set();
|
|
2075
|
+
const $for_content__fileComments__closures = /* @__PURE__ */ new Set();
|
|
2076
|
+
const fileComments = input.commentsByFile.get(file$1.key) || [];
|
|
2077
|
+
let expanded = true;
|
|
2078
|
+
_html(`<details${_attr_details_or_dialog_open($scope6_id, "a", expanded)}${_attr_class(["_f9", input.findHit?.key === file$1.key && "_fO"])}${_attr("data-key", file$1.key)}${_attr("hidden", !input.shownKeys.has(file$1.key))}><summary${_attr_class("_ga")}><span${_attr_class("_gf")}${_attr("data-status", file$1.status)}>${_escape(file$1.status)}${_el_resume($scope6_id, "d", $sg__input_files)}</span>${_el_resume($scope6_id, "c", $sg__input_files)}<span${_attr_class(["_gg", input.findHit?.key === file$1.key && input.findHit.line < 1 && "_fP"])}${_attr("title", file$1.path)}><bdi>${_escape(file$1.path)}${_el_resume($scope6_id, "f", $sg__input_files)}</bdi></span>${_el_resume($scope6_id, "e", _serialize_guard($scope0_reason, 16))}`);
|
|
2079
|
+
_if(() => {
|
|
2080
|
+
if (file$1.changedSince) {
|
|
2081
|
+
const $scope17_id = _scope_id();
|
|
2082
|
+
_html(`<span${_attr_class(["_w", "_f7"])} title="Changed since your last visit"></span>`);
|
|
2083
|
+
$si__input_files && writeScope($scope17_id, {});
|
|
2084
|
+
return 0;
|
|
1962
2085
|
}
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
2086
|
+
}, $scope6_id, "g", $sg__input_files, $sg__input_files, 1, 0, 1);
|
|
2087
|
+
_if(() => {
|
|
2088
|
+
if (fileComments.length) {
|
|
2089
|
+
const $scope16_id = _scope_id();
|
|
2090
|
+
_html(`<span${_attr_class("_p")}>💬 ${_sep($sg__input_files__OR__input_commentsByFile)}${_escape(fileComments.length)}${_el_resume($scope16_id, "b", $sg__input_files__OR__input_commentsByFile)}</span>`);
|
|
2091
|
+
$si__input_files__OR__input_commentsByFile && writeScope($scope16_id, { _: _scope_with_id($scope6_id) });
|
|
2092
|
+
return 0;
|
|
2093
|
+
}
|
|
2094
|
+
}, $scope6_id, "h", $sg__input_files__OR__input_commentsByFile, $sg__input_files__OR__input_commentsByFile, 1, 0, 1);
|
|
2095
|
+
_html("</summary>");
|
|
2096
|
+
_if(() => {
|
|
2097
|
+
if (file$1.binary) {
|
|
2098
|
+
const $scope18_id = _scope_id();
|
|
2099
|
+
_html(`<p${_attr_class(["_gh", "_f_"])}>binary file</p>`);
|
|
2100
|
+
writeScope($scope18_id, {});
|
|
2101
|
+
return 0;
|
|
2102
|
+
} else if (file$1.tooLarge) {
|
|
2103
|
+
const $scope19_id = _scope_id();
|
|
2104
|
+
_html(`<p${_attr_class(["_gh", "_f_"])}>file too large to display</p>`);
|
|
2105
|
+
writeScope($scope19_id, {});
|
|
2106
|
+
return 1;
|
|
2107
|
+
} else if (file$1.old == null && file$1.new == null) {
|
|
2108
|
+
const $scope20_id = _scope_id();
|
|
2109
|
+
_html(`<p${_attr_class(["_gh", "_f_"])}>file could not be read</p>`);
|
|
2110
|
+
writeScope($scope20_id, {});
|
|
2111
|
+
return 2;
|
|
2112
|
+
} else {
|
|
2113
|
+
const $scope7_id = _scope_id();
|
|
2114
|
+
let near = false;
|
|
2115
|
+
const forceNear = input.findHit?.key === file$1.key;
|
|
2116
|
+
_if(() => {
|
|
2117
|
+
if (!forceNear) {
|
|
2118
|
+
const $scope8_id = _scope_id();
|
|
2119
|
+
_html(`<div${_attr_class(["_gb", "_f_"])}></div>${_el_resume($scope8_id, "a")}`);
|
|
2120
|
+
_script($scope8_id, "r10");
|
|
2121
|
+
_subscribe($si__input && $input__closures, writeScope($scope8_id, {}));
|
|
2122
|
+
return 0;
|
|
2123
|
+
} else {
|
|
2124
|
+
const $scope9_id = _scope_id();
|
|
2125
|
+
const $childScope = _peek_scope_id();
|
|
2126
|
+
diff_file_default({
|
|
2127
|
+
class: "_f_",
|
|
2128
|
+
file: file$1,
|
|
2129
|
+
comments: fileComments,
|
|
2130
|
+
draft: input.draft && input.draft.key === file$1.key ? input.draft : null,
|
|
2131
|
+
sessions: input.sessions,
|
|
2132
|
+
onSelect: _resume(function(range) {
|
|
2133
|
+
input.onSelect(file$1, range);
|
|
2134
|
+
}, "r0", $scope9_id),
|
|
2135
|
+
onSaveComment: _resume(function(text) {
|
|
2136
|
+
input.onSaveComment(file$1, text);
|
|
2137
|
+
}, "r1", $scope9_id),
|
|
2138
|
+
onSendDraft: _resume(function(text, sessionId) {
|
|
2139
|
+
input.onSendDraft(file$1, text, sessionId);
|
|
2140
|
+
}, "r2", $scope9_id),
|
|
2141
|
+
onCancelDraft: _resume(function() {
|
|
2142
|
+
input.onCancelDraft();
|
|
2143
|
+
}, "r3", $scope9_id),
|
|
2144
|
+
onDeleteComment: _resume(function(id) {
|
|
2145
|
+
input.onDeleteComment(id);
|
|
2146
|
+
}, "r4", $scope9_id),
|
|
2147
|
+
onSendComment: _resume(function(id, sessionId) {
|
|
2148
|
+
input.onSendComment(id, sessionId);
|
|
2149
|
+
}, "r5", $scope9_id),
|
|
2150
|
+
onError: _resume(function(message) {
|
|
2151
|
+
input.onError(message);
|
|
2152
|
+
}, "r6", $scope9_id)
|
|
2153
|
+
});
|
|
2154
|
+
_subscribe($si__input_files__OR__input_commentsByFile && $for_content__fileComments__closures, _subscribe($si__input_files && $for_content__file_key__closures, _subscribe($si__input_files && $for_content__file__closures, _subscribe($si__input_onError && $input_onError__closures, _subscribe($si__input_onSendComment && $input_onSendComment__closures, _subscribe($si__input_onDeleteComment && $input_onDeleteComment__closures, _subscribe($si__input_onCancelDraft && $input_onCancelDraft__closures, _subscribe($si__input_onSendDraft && $input_onSendDraft__closures, _subscribe($si__input_onSaveComment && $input_onSaveComment__closures, _subscribe($si__input_onSelect && $input_onSelect__closures, _subscribe($si__input_sessions && $input_sessions__closures, _subscribe($si__input_draft && $input_draft__closures, writeScope($scope9_id, { a: _serialize_if($scope0_reason, 28) && _existing_scope($childScope) })))))))))))));
|
|
2155
|
+
return 1;
|
|
2156
|
+
}
|
|
2157
|
+
}, $scope7_id, "a", 1, 1, 1, 0, 1);
|
|
2158
|
+
_subscribe($si__input_findHit_key && $input_findHit_key__closures, writeScope($scope7_id, {
|
|
2159
|
+
b: _serialize_if($scope0_reason, 6) && near,
|
|
2160
|
+
c: forceNear,
|
|
2161
|
+
Cc7: $si__input_findHit_key && 1
|
|
2162
|
+
}));
|
|
2163
|
+
return 3;
|
|
2164
|
+
}
|
|
2165
|
+
}, $scope6_id, "i");
|
|
2166
|
+
_html(`</details>${_el_resume($scope6_id, "a")}`);
|
|
2167
|
+
_script($scope6_id, "r11");
|
|
2168
|
+
_subscribe($si__input_findHit_line && $input_findHit_line__closures, _subscribe($si__input_findHit_key && $input_findHit_key__closures, _subscribe($si__input_commentsByFile && $input_commentsByFile__closures, _subscribe($si__input_shownKeys && $input_shownKeys__closures, writeScope($scope6_id, {
|
|
2169
|
+
k: file$1,
|
|
2170
|
+
l: file$1?.key,
|
|
2171
|
+
t: file$1?.binary,
|
|
2172
|
+
u: file$1?.tooLarge,
|
|
2173
|
+
v: file$1?.old,
|
|
2174
|
+
w: file$1?.new,
|
|
2175
|
+
x: fileComments,
|
|
2176
|
+
y: $si__input_files__OR__input_commentsByFile && fileComments.length,
|
|
2177
|
+
z: $si__input_files && expanded,
|
|
2178
|
+
_: _scope_with_id($scope5_id),
|
|
2179
|
+
a1: $si__input_files && $for_content__file__closures,
|
|
2180
|
+
a2: $si__input_files && $for_content__file_key__closures,
|
|
2181
|
+
a3: $si__input_files__OR__input_commentsByFile && $for_content__fileComments__closures
|
|
2182
|
+
})))));
|
|
2183
|
+
}, "key", $scope5_id, "b", $sg__input_files, $sg__input_files, $sg__input_files, "</div>", 1);
|
|
2184
|
+
_show_end($scope5_id, "c", $show, $sg__input_collapsible__OR__input_collapsed, $sg__input_collapsible__OR__input_collapsed, 0, 1);
|
|
2185
|
+
writeScope($scope5_id, { _: _scope_with_id($scope0_id) });
|
|
2186
|
+
return 0;
|
|
2187
|
+
}
|
|
2188
|
+
}, $scope0_id, "t", _serialize_guard($scope0_reason, 21), _serialize_guard($scope0_reason, 17), $sg__input_repo__OR__input_files__OR__input_shownKeys__OR__input_workspaceBranch__OR__input_workspaceName__OR__input_collapsible__OR__input_collapsed__OR__input_localDiffers__OR__input_onlyNew__OR__input_opened);
|
|
2189
|
+
_html(`</section>${_el_resume($scope0_id, "a", _serialize_guard($scope0_reason, 18))}`);
|
|
2190
|
+
writeScope($scope0_id, {
|
|
2191
|
+
v: input,
|
|
2192
|
+
x: _serialize_if($scope0_reason, 22) && input.files,
|
|
2193
|
+
y: $si__input_files__OR__input_collapsible__OR__input_collapsed__OR__input_opened && input.shownKeys,
|
|
2194
|
+
a0: $si__input_repo__OR__input_files__OR__input_shownKeys && input.files?.length,
|
|
2195
|
+
a1: _serialize_if($scope0_reason, 14) && input.workspaceBranch,
|
|
2196
|
+
a2: _serialize_if($scope0_reason, 13) && input.workspaceName,
|
|
2197
|
+
a4: $si__input_repo__OR__input_files__OR__input_shownKeys && input.findHit?.repo,
|
|
2198
|
+
a5: _serialize_if($scope0_reason, 17) && input.collapsible,
|
|
2199
|
+
a6: _serialize_if($scope0_reason, 26) && input.collapsed,
|
|
2200
|
+
a8: $si__input_collapsible__OR__input_collapsed && input.expanding,
|
|
2201
|
+
a9: input.onToggle,
|
|
2202
|
+
aa: $si__input_repo && input.loading,
|
|
2203
|
+
ab: input.onReload,
|
|
2204
|
+
ad: $si__input_files__OR__input_onlyNew && input.onlyNew,
|
|
2205
|
+
ae: input.onToggleNew,
|
|
2206
|
+
af: $si__input_collapsible__OR__input_collapsed && input.opened,
|
|
2207
|
+
ah: $si__input_files__OR__input_collapsible__OR__input_collapsed__OR__input_opened && input.commentsByFile,
|
|
2208
|
+
ai: input.findHit?.key,
|
|
2209
|
+
aj: _serialize_if($scope0_reason, 24) && input.findHit?.line,
|
|
2210
|
+
ak: input.draft,
|
|
2211
|
+
al: input.sessions,
|
|
2212
|
+
am: input.onSelect,
|
|
2213
|
+
an: input.onSaveComment,
|
|
2214
|
+
ao: input.onSendDraft,
|
|
2215
|
+
ap: input.onCancelDraft,
|
|
2216
|
+
aq: input.onDeleteComment,
|
|
2217
|
+
ar: input.onSendComment,
|
|
2218
|
+
as: input.onError,
|
|
2219
|
+
au: _serialize_if($scope0_reason, 18) && repo?.pr,
|
|
2220
|
+
av: _serialize_if($scope0_reason, 7) && repo?.pr?.baseRefName,
|
|
2221
|
+
aw: _serialize_if($scope0_reason, 19) && repo?.base,
|
|
2222
|
+
ax: $si__input_repo__OR__input_workspaceBranch__OR__input_workspaceName__OR__input_localDiffers && repo?.pr?.headRefName,
|
|
2223
|
+
ay: _serialize_if($scope0_reason, 23) && repo?.branch,
|
|
2224
|
+
b0: $si__input_repo && repo?.pr?.title,
|
|
2225
|
+
b1: $si__input_repo__OR__input_workspaceBranch__OR__input_workspaceName__OR__input_localDiffers && repo?.head,
|
|
2226
|
+
b2: $si__input_repo__OR__input_workspaceBranch__OR__input_workspaceName && repo?.baseSha,
|
|
2227
|
+
b3: _serialize_if($scope0_reason, 34) && repo?.worktree,
|
|
2228
|
+
b4: $si__input_repo && repo?.pr?.number,
|
|
2229
|
+
b5: _serialize_if($scope0_reason, 15) && repo?.id,
|
|
2230
|
+
b6: $si__input_repo && repo?.pr?.url,
|
|
2231
|
+
b7: $si__input_repo && repo?.full_name,
|
|
2232
|
+
b9: $si__input_repo && repo?.pr?.headRefOid,
|
|
2233
|
+
ba: _serialize_if($scope0_reason, 33) && repo?.contained,
|
|
2234
|
+
bc: _serialize_if($scope0_reason, 36) && repo?.localHead,
|
|
2235
|
+
bf: _serialize_if($scope0_reason, 11) && shownCount,
|
|
2236
|
+
bi: $si__input_collapsible__OR__input_collapsed && countLabel,
|
|
2237
|
+
bk: $si__input_files__OR__input_shownKeys && stats?.additions,
|
|
2238
|
+
bl: $si__input_files__OR__input_shownKeys && stats?.deletions,
|
|
2239
|
+
bn: $si__input_files__OR__input_onlyNew && newCount,
|
|
2240
|
+
bu: $si__input_repo__OR__input_workspaceBranch__OR__input_workspaceName && compare$1?.topic,
|
|
2241
|
+
bv: $si__input_repo && prTitle,
|
|
2242
|
+
bw: $si__input && $input__closures,
|
|
2243
|
+
c9: $si__input_draft && $input_draft__closures,
|
|
2244
|
+
ca: $si__input_sessions && $input_sessions__closures,
|
|
2245
|
+
cb: $si__input_onSelect && $input_onSelect__closures,
|
|
2246
|
+
cc: $si__input_onSaveComment && $input_onSaveComment__closures,
|
|
2247
|
+
cd: $si__input_onSendDraft && $input_onSendDraft__closures,
|
|
2248
|
+
ce: $si__input_onCancelDraft && $input_onCancelDraft__closures,
|
|
2249
|
+
cf: $si__input_onDeleteComment && $input_onDeleteComment__closures,
|
|
2250
|
+
cg: $si__input_onSendComment && $input_onSendComment__closures,
|
|
2251
|
+
ch: $si__input_onError && $input_onError__closures,
|
|
2252
|
+
c7: $si__input_findHit_key && $input_findHit_key__closures,
|
|
2253
|
+
by: $si__input_shownKeys && $input_shownKeys__closures,
|
|
2254
|
+
c6: $si__input_commentsByFile && $input_commentsByFile__closures,
|
|
2255
|
+
c8: $si__input_findHit_line && $input_findHit_line__closures
|
|
2256
|
+
});
|
|
2257
|
+
});
|
|
2258
|
+
var fileFilter = "_gj _i";
|
|
2259
|
+
//#endregion
|
|
2260
|
+
//#region src/tags/file-filter.marko
|
|
2261
|
+
var file_filter_default = _template("k", (input) => {
|
|
2262
|
+
const $scope0_reason = _scope_reason();
|
|
2263
|
+
const $scope0_id = _scope_id();
|
|
2264
|
+
let value = input.value;
|
|
2265
|
+
let pending = null;
|
|
2266
|
+
const draft = (pending ?? value) || "";
|
|
2267
|
+
const box = { timer: 0 };
|
|
2268
|
+
const flush = _resume(() => {
|
|
2269
|
+
if (box.timer) {
|
|
2270
|
+
clearTimeout(box.timer);
|
|
2271
|
+
box.timer = 0;
|
|
2272
|
+
}
|
|
2273
|
+
const next = pending !== null ? pending : value || "";
|
|
2274
|
+
pending = null;
|
|
2275
|
+
value = next;
|
|
2276
|
+
}, "k1", $scope0_id);
|
|
2277
|
+
const type = _resume((v) => {
|
|
2278
|
+
if (box.timer) clearTimeout(box.timer);
|
|
2279
|
+
if (!v) {
|
|
2280
|
+
box.timer = 0;
|
|
2281
|
+
pending = null;
|
|
2282
|
+
value = "";
|
|
2283
|
+
return;
|
|
2284
|
+
}
|
|
2285
|
+
pending = v;
|
|
2286
|
+
box.timer = setTimeout(flush, 150);
|
|
2287
|
+
}, "k2", $scope0_id);
|
|
2288
|
+
_html(`<div${_attr_class("_gi")}><input${_attr_input_value($scope0_id, "b", draft, _resume(function(v) {
|
|
2289
|
+
type(v);
|
|
2290
|
+
}, "k0", $scope0_id))}${_attr_class(fileFilter)} type=search placeholder="Filter files…" aria-label="Filter files">${_el_resume($scope0_id, "b")}</div>`);
|
|
2291
|
+
_script($scope0_id, "k3");
|
|
2292
|
+
writeScope($scope0_id, {
|
|
2293
|
+
e: _serialize_if($scope0_reason, 1) && input.value,
|
|
2294
|
+
f: _serialize_if($scope0_reason, 0) && input.valueChange,
|
|
2295
|
+
h: value,
|
|
2296
|
+
j: pending,
|
|
2297
|
+
l: draft,
|
|
2298
|
+
n: box.timer,
|
|
2299
|
+
p: flush,
|
|
2300
|
+
r: type,
|
|
2301
|
+
i: input.valueChange || void 0
|
|
2302
|
+
});
|
|
2303
|
+
_resume_branch($scope0_id);
|
|
2304
|
+
});
|
|
2305
|
+
//#endregion
|
|
2306
|
+
//#region src/tags/diff-tree.marko
|
|
2307
|
+
var diff_tree_default = _template("i", (input) => {
|
|
2308
|
+
const $scope0_reason = _scope_reason(), $sg__input_sections = _serialize_guard($scope0_reason, 14), $sg__input_newKeys__OR__input_sections = _serialize_guard($scope0_reason, 1), $sg__input_commentKeys__OR__input_newKeys__OR__input_sections = _serialize_guard($scope0_reason, 3), $sg__input_commentKeys__OR__input_sections = _serialize_guard($scope0_reason, 0), $si__input_sections = _serialize_if($scope0_reason, 14), $si__input_commentKeys = _serialize_if($scope0_reason, 11), $si__input_newKeys = _serialize_if($scope0_reason, 12), $si__input_workspaceId__OR__input_scope = _serialize_if($scope0_reason, 2);
|
|
2309
|
+
const $scope0_id = _scope_id();
|
|
2310
|
+
const $collapsedDirs__closures = /* @__PURE__ */ new Set();
|
|
2311
|
+
const $commentKeys__closures = /* @__PURE__ */ new Set();
|
|
2312
|
+
const $newKeys__closures = /* @__PURE__ */ new Set();
|
|
2313
|
+
const $hrefFor2__closures = /* @__PURE__ */ new Set();
|
|
2314
|
+
const $collapsedRepos__closures = /* @__PURE__ */ new Set();
|
|
2315
|
+
let collapsedRepos = input.collapsedRepos;
|
|
2316
|
+
let openedRepos = input.openedRepos;
|
|
2317
|
+
let filter = input.filter;
|
|
2318
|
+
let collapsedDirs = /* @__PURE__ */ new Set();
|
|
2319
|
+
const commentKeys = input.commentKeys || /* @__PURE__ */ new Set();
|
|
2320
|
+
const newKeys = input.newKeys || /* @__PURE__ */ new Set();
|
|
2321
|
+
const hrefFor = _resume((key) => urlFor({
|
|
2322
|
+
workspaceId: input.workspaceId,
|
|
2323
|
+
view: "diff",
|
|
2324
|
+
scope: input.scope ?? null,
|
|
2325
|
+
file: key
|
|
2326
|
+
}), "i0", $scope0_id);
|
|
2327
|
+
_html(`<aside${_attr_class(["_fn", { ["_fm"]: input.open === false }])}><div${_attr_class("_fo")}>`);
|
|
2328
|
+
_set_serialize_reason(2);
|
|
2329
|
+
const $childScope = _peek_scope_id();
|
|
2330
|
+
file_filter_default({
|
|
2331
|
+
value: filter,
|
|
2332
|
+
valueChange: _resume((_new_filter) => {
|
|
2333
|
+
filter = _new_filter;
|
|
2334
|
+
}, "i1", $scope0_id)
|
|
2335
|
+
});
|
|
2336
|
+
_html("</div>");
|
|
2337
|
+
_if(() => {
|
|
2338
|
+
if (!input.sections.length && filter) {
|
|
2339
|
+
const $scope6_id = _scope_id();
|
|
2340
|
+
_html(`<p${_attr_class("_fp")}>No files match.</p>`);
|
|
2341
|
+
writeScope($scope6_id, {});
|
|
2342
|
+
return 0;
|
|
2343
|
+
}
|
|
2344
|
+
}, $scope0_id, "d", 1, 1, 1, 0, 1);
|
|
2345
|
+
_for_of(input.sections, (section) => {
|
|
2346
|
+
const $scope1_id = _scope_id();
|
|
2347
|
+
_html(`<div${_attr_class("_fq")}><button type=button${_attr_class(["_fr", { ["_fm"]: collapsedRepos.has(section.id) }])}><span${_attr_class("_fx")}>${collapsedRepos.has(section.id) ? "▸" : "▾"}${_el_resume($scope1_id, "d")}</span>${_sep($sg__input_sections)}${_escape(section.label)}${_el_resume($scope1_id, "e", $sg__input_sections)}</button>${_el_resume($scope1_id, "b")}`);
|
|
2348
|
+
_if(() => {
|
|
2349
|
+
if (!collapsedRepos.has(section.id) || openedRepos.has(section.id)) {
|
|
2350
|
+
const $scope2_id = _scope_id();
|
|
2351
|
+
const $if_content__dirKey__closures = /* @__PURE__ */ new Set();
|
|
2352
|
+
const $show = !collapsedRepos.has(section.id);
|
|
2353
|
+
_show_start($show, 1);
|
|
2354
|
+
const repoRows = treeRows(section.files);
|
|
2355
|
+
const dirKey = _resume((path) => `${section.id}/${path}`, "i2", $scope2_id);
|
|
2356
|
+
const rowDir = _resume((row) => row.kind === "dir" ? row.path : row.file.path.includes("/") ? row.file.path.slice(0, row.file.path.lastIndexOf("/")) : "", "i3");
|
|
2357
|
+
const hiddenByCollapse = _resume((row) => {
|
|
2358
|
+
const dir = rowDir(row);
|
|
2359
|
+
for (const collapsed of collapsedDirs) {
|
|
2360
|
+
const slash = collapsed.indexOf("/");
|
|
2361
|
+
const wt = collapsed.slice(0, slash);
|
|
2362
|
+
const path = collapsed.slice(slash + 1);
|
|
2363
|
+
if (wt !== section.id) continue;
|
|
2364
|
+
if (row.kind === "dir" && row.path === path) continue;
|
|
2365
|
+
if (dir === path || dir.startsWith(`${path}/`)) return true;
|
|
2366
|
+
}
|
|
2367
|
+
return false;
|
|
2368
|
+
}, "i4", $scope2_id);
|
|
2369
|
+
_for_of(repoRows, (row) => {
|
|
2370
|
+
const $scope3_id = _scope_id();
|
|
1967
2371
|
_if(() => {
|
|
1968
2372
|
if (!hiddenByCollapse(row) && row.kind === "dir") {
|
|
1969
|
-
const $
|
|
1970
|
-
_html(`<button type=button${_attr_class(["
|
|
1971
|
-
_script($
|
|
1972
|
-
_subscribe($si__input_sections && $if_content__dirKey__closures, _subscribe($collapsedDirs__closures, writeScope($
|
|
2373
|
+
const $scope4_id = _scope_id();
|
|
2374
|
+
_html(`<button type=button${_attr_class(["_fs", { ["_fm"]: collapsedDirs.has(dirKey(row.path)) }])}${_attr("title", row.path)}${_attr_style(`padding-left:${.35 + row.depth * .75}rem`)}><span${_attr_class("_fx")}>${collapsedDirs.has(dirKey(row.path)) ? "▸" : "▾"}${_el_resume($scope4_id, "c")}</span>${_escape(row.label)}${_el_resume($scope4_id, "d", $sg__input_sections)}/</button>${_el_resume($scope4_id, "a")}`);
|
|
2375
|
+
_script($scope4_id, "i5");
|
|
2376
|
+
_subscribe($si__input_sections && $if_content__dirKey__closures, _subscribe($collapsedDirs__closures, writeScope($scope4_id, { Cab: 1 })));
|
|
1973
2377
|
return 0;
|
|
1974
2378
|
} else if (!hiddenByCollapse(row) && row.kind !== "dir") {
|
|
1975
|
-
const $
|
|
1976
|
-
_html(`<
|
|
2379
|
+
const $scope5_id = _scope_id();
|
|
2380
|
+
_html(`<a${_attr("href", hrefFor(row.file.key))}${_attr_class("_ft")}${_attr("title", row.file.path)}${_attr_style(`padding-left:${.5 + row.depth * .75}rem`)}><span${_attr_class("_fy")}${_attr("data-status", row.file.status)}>${_escape(row.file.status)}${_el_resume($scope5_id, "c", $sg__input_sections)}</span>${_el_resume($scope5_id, "b", $sg__input_sections)}<span${_attr_class("_fu")}>${_escape(row.name)}${_el_resume($scope5_id, "e", $sg__input_sections)}</span>`);
|
|
2381
|
+
_if(() => {
|
|
2382
|
+
if (newKeys.has(row.file.key)) {
|
|
2383
|
+
const $scope7_id = _scope_id();
|
|
2384
|
+
_html(`<span${_attr_class(["_w", "_fv"])} title="Changed since your last visit"></span>`);
|
|
2385
|
+
_serialize_if($scope0_reason, 1) && writeScope($scope7_id, {});
|
|
2386
|
+
return 0;
|
|
2387
|
+
}
|
|
2388
|
+
}, $scope5_id, "f", $sg__input_newKeys__OR__input_sections, $sg__input_newKeys__OR__input_sections, $sg__input_commentKeys__OR__input_newKeys__OR__input_sections, 0, 1);
|
|
1977
2389
|
_if(() => {
|
|
1978
2390
|
if (commentKeys.has(row.file.key)) {
|
|
1979
|
-
const $
|
|
1980
|
-
_html(`<span${_attr_class("
|
|
1981
|
-
_serialize_if($scope0_reason, 0) && writeScope($
|
|
2391
|
+
const $scope8_id = _scope_id();
|
|
2392
|
+
_html(`<span${_attr_class("_fw")}>💬</span>`);
|
|
2393
|
+
_serialize_if($scope0_reason, 0) && writeScope($scope8_id, {});
|
|
1982
2394
|
return 0;
|
|
1983
2395
|
}
|
|
1984
|
-
}, $
|
|
1985
|
-
_html(`</
|
|
1986
|
-
|
|
1987
|
-
_subscribe($si__input_commentKeys && $commentKeys__closures, writeScope($scope4_id, {}));
|
|
2396
|
+
}, $scope5_id, "g", $sg__input_commentKeys__OR__input_sections, $sg__input_commentKeys__OR__input_sections, $sg__input_commentKeys__OR__input_newKeys__OR__input_sections, 0, 1);
|
|
2397
|
+
_html(`</a>${_el_resume($scope5_id, "a", _serialize_guard($scope0_reason, 4))}`);
|
|
2398
|
+
_subscribe($si__input_workspaceId__OR__input_scope && $hrefFor2__closures, _subscribe($si__input_newKeys && $newKeys__closures, _subscribe($si__input_commentKeys && $commentKeys__closures, writeScope($scope5_id, {}))));
|
|
1988
2399
|
return 1;
|
|
1989
2400
|
}
|
|
1990
2401
|
}, $scope3_id, "a", 1, 1, 1, 0, 1);
|
|
@@ -1993,8 +2404,8 @@ var diff_tree_default = _template("i", (input) => {
|
|
|
1993
2404
|
e: row?.path,
|
|
1994
2405
|
f: row?.depth,
|
|
1995
2406
|
g: row?.label,
|
|
1996
|
-
i: row?.file?.
|
|
1997
|
-
j: row?.file?.
|
|
2407
|
+
i: row?.file?.key,
|
|
2408
|
+
j: row?.file?.path,
|
|
1998
2409
|
k: row?.file?.status,
|
|
1999
2410
|
l: row?.name,
|
|
2000
2411
|
_: _scope_with_id($scope2_id)
|
|
@@ -2011,79 +2422,159 @@ var diff_tree_default = _template("i", (input) => {
|
|
|
2011
2422
|
}
|
|
2012
2423
|
}, $scope1_id, "f");
|
|
2013
2424
|
_html("</div>");
|
|
2014
|
-
_script($scope1_id, "
|
|
2425
|
+
_script($scope1_id, "i6");
|
|
2015
2426
|
writeScope($scope1_id, {
|
|
2016
2427
|
i: section?.id,
|
|
2017
2428
|
m: section?.files,
|
|
2018
2429
|
_: _scope_with_id($scope0_id)
|
|
2019
2430
|
});
|
|
2020
|
-
}, "id", $scope0_id, "
|
|
2431
|
+
}, "id", $scope0_id, "e", 1, $sg__input_sections, $sg__input_sections, 0, 1);
|
|
2432
|
+
_html(`</aside>${_el_resume($scope0_id, "a", _serialize_guard($scope0_reason, 13))}`);
|
|
2021
2433
|
writeScope($scope0_id, {
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2434
|
+
h: _serialize_if($scope0_reason, 6) && input.collapsedRepos,
|
|
2435
|
+
i: _serialize_if($scope0_reason, 5) && input.collapsedReposChange,
|
|
2436
|
+
k: _serialize_if($scope0_reason, 8) && input.openedRepos,
|
|
2437
|
+
l: _serialize_if($scope0_reason, 7) && input.openedReposChange,
|
|
2438
|
+
n: _serialize_if($scope0_reason, 10) && input.filter,
|
|
2439
|
+
o: _serialize_if($scope0_reason, 9) && input.filterChange,
|
|
2440
|
+
s: input.workspaceId,
|
|
2441
|
+
t: input.scope,
|
|
2442
|
+
x: input.sections?.length,
|
|
2443
|
+
y: collapsedRepos,
|
|
2444
|
+
a0: openedRepos,
|
|
2445
|
+
a2: _serialize_if($scope0_reason, 15) && filter,
|
|
2446
|
+
a5: collapsedDirs,
|
|
2447
|
+
a6: commentKeys,
|
|
2448
|
+
a7: newKeys,
|
|
2449
|
+
a8: hrefFor,
|
|
2450
|
+
z: input.collapsedReposChange || void 0,
|
|
2451
|
+
a1: input.openedReposChange || void 0,
|
|
2452
|
+
a3: input.filterChange || void 0,
|
|
2453
|
+
c: _existing_scope($childScope),
|
|
2454
|
+
ab: $collapsedDirs__closures,
|
|
2455
|
+
ac: $si__input_commentKeys && $commentKeys__closures,
|
|
2456
|
+
ad: $si__input_newKeys && $newKeys__closures,
|
|
2457
|
+
ae: $si__input_workspaceId__OR__input_scope && $hrefFor2__closures,
|
|
2458
|
+
a9: $collapsedRepos__closures
|
|
2036
2459
|
});
|
|
2037
2460
|
_resume_branch($scope0_id);
|
|
2038
2461
|
});
|
|
2039
2462
|
//#endregion
|
|
2040
2463
|
//#region src/tags/diff-file-sheet.marko
|
|
2041
2464
|
var diff_file_sheet_default = _template("e", (input) => {
|
|
2042
|
-
const $scope0_reason = _scope_reason(), $sg__input_total__OR__input_files_length = _serialize_guard($scope0_reason,
|
|
2465
|
+
const $scope0_reason = _scope_reason(), $sg__input_total__OR__input_files_length = _serialize_guard($scope0_reason, 2), $sg__input_files = _serialize_guard($scope0_reason, 12), $sg__input_commentKeys__OR__input_newKeys__OR__input_files = _serialize_guard($scope0_reason, 4), $sg__input_newKeys__OR__input_files = _serialize_guard($scope0_reason, 1), $sg__input_commentKeys__OR__input_files = _serialize_guard($scope0_reason, 0), $si__input_files = _serialize_if($scope0_reason, 12), $sg__input_files_length = _serialize_guard($scope0_reason, 13), $si__input_files_length = _serialize_if($scope0_reason, 13), $si__input_commentKeys = _serialize_if($scope0_reason, 10), $si__input_newKeys = _serialize_if($scope0_reason, 11), $si__input_workspaceId__OR__input_scope = _serialize_if($scope0_reason, 3);
|
|
2043
2466
|
const $scope0_id = _scope_id();
|
|
2044
2467
|
const $commentKeys__closures = /* @__PURE__ */ new Set();
|
|
2468
|
+
const $newKeys__closures = /* @__PURE__ */ new Set();
|
|
2469
|
+
const $hrefFor2__closures = /* @__PURE__ */ new Set();
|
|
2045
2470
|
let open = input.open;
|
|
2471
|
+
let filter = input.filter;
|
|
2046
2472
|
const commentKeys = input.commentKeys || /* @__PURE__ */ new Set();
|
|
2473
|
+
const newKeys = input.newKeys || /* @__PURE__ */ new Set();
|
|
2047
2474
|
const total = input.total ?? input.files.length;
|
|
2475
|
+
const hrefFor = _resume((key) => urlFor({
|
|
2476
|
+
workspaceId: input.workspaceId,
|
|
2477
|
+
view: "diff",
|
|
2478
|
+
scope: input.scope ?? null,
|
|
2479
|
+
file: key
|
|
2480
|
+
}), "e0", $scope0_id);
|
|
2481
|
+
const splitKey = _resume((key) => {
|
|
2482
|
+
const slash = key.lastIndexOf("/");
|
|
2483
|
+
return slash < 0 ? {
|
|
2484
|
+
dir: "",
|
|
2485
|
+
name: key
|
|
2486
|
+
} : {
|
|
2487
|
+
dir: key.slice(0, slash),
|
|
2488
|
+
name: key.slice(slash + 1)
|
|
2489
|
+
};
|
|
2490
|
+
}, "e1");
|
|
2048
2491
|
_if(() => {
|
|
2049
2492
|
if (open) {
|
|
2050
2493
|
const $scope1_id = _scope_id();
|
|
2051
|
-
_html(`<div${_attr_class("
|
|
2494
|
+
_html(`<div${_attr_class("_fB")}></div>${_el_resume($scope1_id, "a")}<div${_attr_class("_fC")} role=dialog aria-label="Jump to file"><div${_attr_class("_fD")}><strong${_attr_class("_fA")}>Files</strong><span${_attr_class("_fE")}>${_escape(input.files.length)}${_el_resume($scope1_id, "f", $sg__input_files_length)}${_sep($sg__input_total__OR__input_files_length)}${input.files.length !== total ? ` / ${_escape(`${total}`)}` : ""}${_el_resume($scope1_id, "g", $sg__input_total__OR__input_files_length)}</span><button type=button${_attr_class([iconBtnLg, "_fz"])} title=Close aria-label=Close>`);
|
|
2495
|
+
icon_xmark_default({ size: 16 });
|
|
2496
|
+
_html(`</button>${_el_resume($scope1_id, "h")}</div><div${_attr_class("_fK")}>`);
|
|
2497
|
+
_set_serialize_reason(2);
|
|
2498
|
+
const $childScope = _peek_scope_id();
|
|
2499
|
+
file_filter_default({
|
|
2500
|
+
value: filter,
|
|
2501
|
+
valueChange: _resume((_new_filter) => {
|
|
2502
|
+
filter = _new_filter;
|
|
2503
|
+
}, "e2", $scope1_id)
|
|
2504
|
+
});
|
|
2505
|
+
_html(`</div><div${_attr_class("_fF")}>`);
|
|
2052
2506
|
_for_of(input.files, (file) => {
|
|
2053
2507
|
const $scope2_id = _scope_id();
|
|
2054
|
-
|
|
2508
|
+
const parts = splitKey(file.key);
|
|
2509
|
+
_html(`<a${_attr("href", hrefFor(file.key))}${_attr_class(["_fG", "_u"])}><span${_attr_class("_fN")}${_attr("data-status", file.status)}>${_escape(file.status)}${_el_resume($scope2_id, "c", $sg__input_files)}</span>${_el_resume($scope2_id, "b", $sg__input_files)}<span${_attr_class("_fH")}>`);
|
|
2055
2510
|
_if(() => {
|
|
2056
|
-
if (
|
|
2511
|
+
if (parts.dir) {
|
|
2057
2512
|
const $scope3_id = _scope_id();
|
|
2513
|
+
_html(`<span${_attr_class("_fI")}><bdi>${_escape(parts.dir)}${_el_resume($scope3_id, "b", $sg__input_files)}/</bdi></span>`);
|
|
2514
|
+
$si__input_files && writeScope($scope3_id, { _: _scope_with_id($scope2_id) });
|
|
2515
|
+
return 0;
|
|
2516
|
+
}
|
|
2517
|
+
}, $scope2_id, "e", $sg__input_files, $sg__input_files, $sg__input_commentKeys__OR__input_newKeys__OR__input_files, 0, 1);
|
|
2518
|
+
_html(`<span${_attr_class("_fJ")}><bdi>${_escape(parts.name)}${_el_resume($scope2_id, "g", $sg__input_files)}</bdi></span></span>`);
|
|
2519
|
+
_if(() => {
|
|
2520
|
+
if (newKeys.has(file.key)) {
|
|
2521
|
+
const $scope4_id = _scope_id();
|
|
2522
|
+
_html(`<span${_attr_class(["_w", "_fM"])} title="Changed since your last visit"></span>`);
|
|
2523
|
+
_serialize_if($scope0_reason, 1) && writeScope($scope4_id, {});
|
|
2524
|
+
return 0;
|
|
2525
|
+
}
|
|
2526
|
+
}, $scope2_id, "h", $sg__input_newKeys__OR__input_files, $sg__input_newKeys__OR__input_files, $sg__input_commentKeys__OR__input_newKeys__OR__input_files, 0, 1);
|
|
2527
|
+
_if(() => {
|
|
2528
|
+
if (commentKeys.has(file.key)) {
|
|
2529
|
+
const $scope5_id = _scope_id();
|
|
2058
2530
|
_html("<span>💬</span>");
|
|
2059
|
-
_serialize_if($scope0_reason, 0) && writeScope($
|
|
2531
|
+
_serialize_if($scope0_reason, 0) && writeScope($scope5_id, {});
|
|
2060
2532
|
return 0;
|
|
2061
2533
|
}
|
|
2062
|
-
}, $scope2_id, "
|
|
2063
|
-
_html(`</
|
|
2064
|
-
_script($scope2_id, "
|
|
2065
|
-
_subscribe($si__input_commentKeys && $commentKeys__closures, writeScope($scope2_id, {
|
|
2066
|
-
|
|
2534
|
+
}, $scope2_id, "i", $sg__input_commentKeys__OR__input_files, $sg__input_commentKeys__OR__input_files, $sg__input_commentKeys__OR__input_newKeys__OR__input_files, 0, 1);
|
|
2535
|
+
_html(`</a>${_el_resume($scope2_id, "a")}`);
|
|
2536
|
+
_script($scope2_id, "e3");
|
|
2537
|
+
_subscribe($si__input_workspaceId__OR__input_scope && $hrefFor2__closures, _subscribe($si__input_newKeys && $newKeys__closures, _subscribe($si__input_commentKeys && $commentKeys__closures, writeScope($scope2_id, {
|
|
2538
|
+
l: _serialize_if($scope0_reason, 5) && file?.key,
|
|
2539
|
+
s: $si__input_files && parts?.dir,
|
|
2067
2540
|
_: _scope_with_id($scope1_id)
|
|
2068
|
-
}));
|
|
2069
|
-
}, "key", $scope1_id, "
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2541
|
+
}))));
|
|
2542
|
+
}, "key", $scope1_id, "m", $sg__input_files, $sg__input_files, $sg__input_files, 0, 1);
|
|
2543
|
+
_if(() => {
|
|
2544
|
+
if (!input.files.length) {
|
|
2545
|
+
const $scope6_id = _scope_id();
|
|
2546
|
+
_html(`<p${_attr_class("_fL")}>No files match.</p>`);
|
|
2547
|
+
$si__input_files_length && writeScope($scope6_id, {});
|
|
2548
|
+
return 0;
|
|
2549
|
+
}
|
|
2550
|
+
}, $scope1_id, "n", $sg__input_files_length, $sg__input_files_length, $sg__input_files_length, 0, 1);
|
|
2551
|
+
_html("</div></div>");
|
|
2552
|
+
_script($scope1_id, "e4");
|
|
2553
|
+
writeScope($scope1_id, { k: _existing_scope($childScope) });
|
|
2073
2554
|
return 0;
|
|
2074
2555
|
}
|
|
2075
2556
|
}, $scope0_id, "a");
|
|
2076
2557
|
writeScope($scope0_id, {
|
|
2077
|
-
d: _serialize_if($scope0_reason,
|
|
2078
|
-
e: _serialize_if($scope0_reason,
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
p:
|
|
2085
|
-
|
|
2086
|
-
|
|
2558
|
+
d: _serialize_if($scope0_reason, 7) && input.open,
|
|
2559
|
+
e: _serialize_if($scope0_reason, 6) && input.openChange,
|
|
2560
|
+
g: _serialize_if($scope0_reason, 9) && input.filter,
|
|
2561
|
+
h: _serialize_if($scope0_reason, 8) && input.filterChange,
|
|
2562
|
+
l: $si__input_files_length && input.total,
|
|
2563
|
+
m: input.files,
|
|
2564
|
+
n: input.files?.length,
|
|
2565
|
+
p: input.workspaceId,
|
|
2566
|
+
q: input.scope,
|
|
2567
|
+
u: filter,
|
|
2568
|
+
w: commentKeys,
|
|
2569
|
+
x: newKeys,
|
|
2570
|
+
y: total,
|
|
2571
|
+
z: hrefFor,
|
|
2572
|
+
a0: splitKey,
|
|
2573
|
+
t: input.openChange || void 0,
|
|
2574
|
+
v: input.filterChange || void 0,
|
|
2575
|
+
a4: $si__input_commentKeys && $commentKeys__closures,
|
|
2576
|
+
a5: $si__input_newKeys && $newKeys__closures,
|
|
2577
|
+
a7: $si__input_workspaceId__OR__input_scope && $hrefFor2__closures
|
|
2087
2578
|
});
|
|
2088
2579
|
_resume_branch($scope0_id);
|
|
2089
2580
|
});
|
|
@@ -2094,42 +2585,46 @@ var getTermDims;
|
|
|
2094
2585
|
var revealSearchHit;
|
|
2095
2586
|
var setSearchPaint;
|
|
2096
2587
|
var diff_view_default = _template("j", (input) => {
|
|
2097
|
-
const $scope0_reason = _scope_reason(), $
|
|
2588
|
+
const $scope0_reason = _scope_reason(), $si__input_sessions = _serialize_if($scope0_reason, 5), $si__input_workspaceBranch = _serialize_if($scope0_reason, 6), $si__input_workspaceName = _serialize_if($scope0_reason, 7);
|
|
2098
2589
|
const $scope0_id = _scope_id();
|
|
2099
2590
|
const $error__closures = /* @__PURE__ */ new Set();
|
|
2100
|
-
const $
|
|
2101
|
-
const $
|
|
2102
|
-
const $driftRepos__closures = /* @__PURE__ */ new Set();
|
|
2591
|
+
const $scope__closures = /* @__PURE__ */ new Set();
|
|
2592
|
+
const $input_sessions__closures = /* @__PURE__ */ new Set();
|
|
2103
2593
|
const $input_workspaceBranch__closures = /* @__PURE__ */ new Set();
|
|
2104
2594
|
const $input_workspaceName__closures = /* @__PURE__ */ new Set();
|
|
2595
|
+
const $draft__closures = /* @__PURE__ */ new Set();
|
|
2596
|
+
const $loading__closures = /* @__PURE__ */ new Set();
|
|
2597
|
+
const $onlyNew__closures = /* @__PURE__ */ new Set();
|
|
2598
|
+
const $findState_hit__closures = /* @__PURE__ */ new Set();
|
|
2105
2599
|
const $collapsedRepos__closures = /* @__PURE__ */ new Set();
|
|
2600
|
+
const $openedRepos__closures = /* @__PURE__ */ new Set();
|
|
2106
2601
|
const $expandingRepos__closures = /* @__PURE__ */ new Set();
|
|
2602
|
+
const $reload2__closures = /* @__PURE__ */ new Set();
|
|
2603
|
+
const $repoList_length__closures = /* @__PURE__ */ new Set();
|
|
2604
|
+
const $shownKeySet__closures = /* @__PURE__ */ new Set();
|
|
2605
|
+
const $commentsByFile__closures = /* @__PURE__ */ new Set();
|
|
2107
2606
|
const $localDifferIds__closures = /* @__PURE__ */ new Set();
|
|
2108
|
-
const $input_sessions__closures = /* @__PURE__ */ new Set();
|
|
2109
|
-
const $draft__closures = /* @__PURE__ */ new Set();
|
|
2110
2607
|
const $saveComment2__closures = /* @__PURE__ */ new Set();
|
|
2111
2608
|
const $removeComment2__closures = /* @__PURE__ */ new Set();
|
|
2112
|
-
const $sendDraftComment2__closures = /* @__PURE__ */ new Set();
|
|
2113
2609
|
const $sendOneComment2__closures = /* @__PURE__ */ new Set();
|
|
2114
|
-
const $
|
|
2115
|
-
const $
|
|
2116
|
-
const $shownKeySet__closures = /* @__PURE__ */ new Set();
|
|
2117
|
-
const $commentsByFile__closures = /* @__PURE__ */ new Set();
|
|
2118
|
-
const $repoList_length__closures = /* @__PURE__ */ new Set();
|
|
2119
|
-
const $findState_hit_repo__closures = /* @__PURE__ */ new Set();
|
|
2120
|
-
const $openedRepos__closures = /* @__PURE__ */ new Set();
|
|
2610
|
+
const $sendDraftComment2__closures = /* @__PURE__ */ new Set();
|
|
2611
|
+
const $toggleSection2__closures = /* @__PURE__ */ new Set();
|
|
2121
2612
|
let repos = null;
|
|
2122
2613
|
let comments = [];
|
|
2123
2614
|
let draft = null;
|
|
2124
2615
|
let error = null;
|
|
2125
2616
|
let loading = false;
|
|
2126
2617
|
let fileFilter = "";
|
|
2127
|
-
|
|
2618
|
+
const $filterChange = _resume((_new_fileFilter) => {
|
|
2619
|
+
fileFilter = _new_fileFilter;
|
|
2620
|
+
}, "j1", $scope0_id);
|
|
2621
|
+
let onlyNew = false;
|
|
2622
|
+
let scope$1 = input.scope ?? diffScope();
|
|
2128
2623
|
let treeOpen = diffTreeOpen();
|
|
2129
2624
|
let fileSheet = false;
|
|
2130
2625
|
let findOpen = input.findOpen;
|
|
2131
2626
|
let findTick = input.findTick || 0;
|
|
2132
|
-
const findFocusRef = input.findFocusRef || { focus: _resume(function() {}, "
|
|
2627
|
+
const findFocusRef = input.findFocusRef || { focus: _resume(function() {}, "j2") };
|
|
2133
2628
|
let findState = {
|
|
2134
2629
|
query: "",
|
|
2135
2630
|
hit: null,
|
|
@@ -2138,7 +2633,6 @@ var diff_view_default = _template("j", (input) => {
|
|
|
2138
2633
|
let collapsedRepos = /* @__PURE__ */ new Set();
|
|
2139
2634
|
let openedRepos = /* @__PURE__ */ new Set();
|
|
2140
2635
|
let expandingRepos = /* @__PURE__ */ new Set();
|
|
2141
|
-
let dismissedDrift = /* @__PURE__ */ new Set();
|
|
2142
2636
|
const nearBox = {
|
|
2143
2637
|
io: null,
|
|
2144
2638
|
root: null,
|
|
@@ -2177,7 +2671,16 @@ var diff_view_default = _template("j", (input) => {
|
|
|
2177
2671
|
cb();
|
|
2178
2672
|
}
|
|
2179
2673
|
});
|
|
2180
|
-
}, "
|
|
2674
|
+
}, "j3", $scope0_id);
|
|
2675
|
+
const pinToTop = _resume((el) => {
|
|
2676
|
+
const root = ((scrollEl) => scrollEl())(_el_read_error);
|
|
2677
|
+
if (!root) {
|
|
2678
|
+
el.scrollIntoView({ block: "start" });
|
|
2679
|
+
return;
|
|
2680
|
+
}
|
|
2681
|
+
const top = el.getBoundingClientRect().top - root.getBoundingClientRect().top + root.scrollTop;
|
|
2682
|
+
root.scrollTo({ top: Math.max(0, top - 8) });
|
|
2683
|
+
}, "j4", $scope0_id);
|
|
2181
2684
|
const focusPrSection = _resume((pr) => {
|
|
2182
2685
|
if (!pr) return;
|
|
2183
2686
|
const list = repos || [];
|
|
@@ -2198,23 +2701,40 @@ var diff_view_default = _template("j", (input) => {
|
|
|
2198
2701
|
if (Date.now() - started < 2500) requestAnimationFrame(tryScroll);
|
|
2199
2702
|
return;
|
|
2200
2703
|
}
|
|
2201
|
-
|
|
2202
|
-
root.scrollTo({ top: Math.max(0, top - 8) });
|
|
2704
|
+
pinToTop(el);
|
|
2203
2705
|
};
|
|
2204
2706
|
requestAnimationFrame(tryScroll);
|
|
2205
|
-
}, "
|
|
2707
|
+
}, "j5", $scope0_id);
|
|
2708
|
+
const openFile = _resume((key) => {
|
|
2709
|
+
const el = ((scrollEl) => scrollEl())(_el_read_error)?.querySelector(`details[data-key="${CSS.escape(key)}"]`);
|
|
2710
|
+
if (el) el.open = true;
|
|
2711
|
+
return el;
|
|
2712
|
+
}, "j6", $scope0_id);
|
|
2713
|
+
const jumpTo = _resume((key) => {
|
|
2714
|
+
input.onFileChange?.(key);
|
|
2715
|
+
const started = Date.now();
|
|
2716
|
+
const tryJump = () => {
|
|
2717
|
+
const el = openFile(key);
|
|
2718
|
+
if (el) {
|
|
2719
|
+
pinToTop(el);
|
|
2720
|
+
return;
|
|
2721
|
+
}
|
|
2722
|
+
if (Date.now() - started < 2500) requestAnimationFrame(tryJump);
|
|
2723
|
+
};
|
|
2724
|
+
tryJump();
|
|
2725
|
+
}, "j7", $scope0_id);
|
|
2206
2726
|
const headBox = {
|
|
2207
2727
|
sig: "",
|
|
2208
2728
|
timer: 0
|
|
2209
2729
|
};
|
|
2210
2730
|
const loadBox = { seq: 0 };
|
|
2211
|
-
const load = _resume(async (
|
|
2731
|
+
const load = _resume(async (which = scope$1, refresh = false) => {
|
|
2212
2732
|
const seq = ++loadBox.seq;
|
|
2213
2733
|
loading = true;
|
|
2214
2734
|
error = null;
|
|
2215
2735
|
try {
|
|
2216
2736
|
const q = new URLSearchParams();
|
|
2217
|
-
if (
|
|
2737
|
+
if (which !== "committed") q.set("scope", which);
|
|
2218
2738
|
if (refresh) q.set("refresh", "1");
|
|
2219
2739
|
const qs = q.size ? `?${q}` : "";
|
|
2220
2740
|
const [diffData, reviewData] = await Promise.all([api(`/api/workspaces/${input.workspaceId}/diff${qs}`), api(`/api/workspaces/${input.workspaceId}/review`)]);
|
|
@@ -2223,13 +2743,21 @@ var diff_view_default = _template("j", (input) => {
|
|
|
2223
2743
|
comments = reviewData.comments || [];
|
|
2224
2744
|
headBox.sig = prHeadSigFromDiff(diffData);
|
|
2225
2745
|
if (input.focusPr) focusPrSection(input.focusPr);
|
|
2746
|
+
else if (input.focusFile) jumpTo(input.focusFile);
|
|
2226
2747
|
} catch (err) {
|
|
2227
2748
|
if (seq !== loadBox.seq) return;
|
|
2228
2749
|
error = String(err.message || err);
|
|
2229
2750
|
} finally {
|
|
2230
2751
|
if (seq === loadBox.seq) loading = false;
|
|
2231
2752
|
}
|
|
2232
|
-
}, "
|
|
2753
|
+
}, "j8", $scope0_id);
|
|
2754
|
+
const setScope = _resume((next, persist = true) => {
|
|
2755
|
+
if (next === scope$1) return;
|
|
2756
|
+
scope$1 = next;
|
|
2757
|
+
if (persist) setDiffScope(next);
|
|
2758
|
+
input.onScopeChange?.(next);
|
|
2759
|
+
load(next);
|
|
2760
|
+
}, "j9", $scope0_id);
|
|
2233
2761
|
const sendGate = { busy: 0 };
|
|
2234
2762
|
const loadReview = _resume(async () => {
|
|
2235
2763
|
if (sendGate.busy) return;
|
|
@@ -2238,43 +2766,49 @@ var diff_view_default = _template("j", (input) => {
|
|
|
2238
2766
|
if (sendGate.busy) return;
|
|
2239
2767
|
comments = reviewData.comments || [];
|
|
2240
2768
|
} catch {}
|
|
2241
|
-
}, "
|
|
2242
|
-
const reload = _resume(() =>
|
|
2243
|
-
dismissedDrift = /* @__PURE__ */ new Set();
|
|
2244
|
-
return load(uncommitted, true);
|
|
2245
|
-
}, "j5", $scope0_id);
|
|
2769
|
+
}, "j10", $scope0_id);
|
|
2770
|
+
const reload = _resume(() => load(scope$1, true), "j11", $scope0_id);
|
|
2246
2771
|
const reloadSoon = _resume(() => {
|
|
2247
2772
|
if (headBox.timer) clearTimeout(headBox.timer);
|
|
2248
2773
|
headBox.timer = setTimeout(() => {
|
|
2249
2774
|
headBox.timer = 0;
|
|
2250
2775
|
reload();
|
|
2251
2776
|
}, 250);
|
|
2252
|
-
}, "
|
|
2777
|
+
}, "j12", $scope0_id);
|
|
2778
|
+
const markSeen = _resume(() => {
|
|
2779
|
+
if (!repos) return;
|
|
2780
|
+
const heads = {};
|
|
2781
|
+
const dirty = {};
|
|
2782
|
+
for (const r of repos) {
|
|
2783
|
+
if (!heads[r.worktree] || !r.pr) heads[r.worktree] = r.head;
|
|
2784
|
+
for (const f of r.files) if (f.hash) dirty[`${r.worktree}/${f.path}`] = f.hash;
|
|
2785
|
+
}
|
|
2786
|
+
fetch(`/api/workspaces/${input.workspaceId}/review`, {
|
|
2787
|
+
method: "POST",
|
|
2788
|
+
headers: { "content-type": "application/json" },
|
|
2789
|
+
body: JSON.stringify({
|
|
2790
|
+
action: "seen",
|
|
2791
|
+
heads,
|
|
2792
|
+
dirty
|
|
2793
|
+
}),
|
|
2794
|
+
keepalive: true
|
|
2795
|
+
}).catch(() => {});
|
|
2796
|
+
}, "j13", $scope0_id);
|
|
2253
2797
|
const repoList = repos || [];
|
|
2254
2798
|
const allFiles = repoList.flatMap((r) => r.files.map((f) => ({
|
|
2255
2799
|
...f,
|
|
2256
2800
|
repo: r.id,
|
|
2257
2801
|
key: `${r.worktree}/${f.path}`
|
|
2258
2802
|
})));
|
|
2803
|
+
allFiles.filter((f) => f.changedSince).length;
|
|
2259
2804
|
const fileFiltered = (() => {
|
|
2260
2805
|
const match = makeFileFilter(fileFilter);
|
|
2261
|
-
return allFiles.filter((f) => match(f.key));
|
|
2262
|
-
})();
|
|
2263
|
-
const lineStats = (() => {
|
|
2264
|
-
let additions = 0;
|
|
2265
|
-
let deletions = 0;
|
|
2266
|
-
for (const f of fileFiltered) {
|
|
2267
|
-
additions += f.additions || 0;
|
|
2268
|
-
deletions += f.deletions || 0;
|
|
2269
|
-
}
|
|
2270
|
-
return {
|
|
2271
|
-
additions,
|
|
2272
|
-
deletions
|
|
2273
|
-
};
|
|
2806
|
+
return allFiles.filter((f) => match(f.key) && (!onlyNew || f.changedSince));
|
|
2274
2807
|
})();
|
|
2275
2808
|
const findKeys = findState.query.trim() ? new Set(findState.keys) : null;
|
|
2276
2809
|
const shownFiles = findKeys ? fileFiltered.filter((f) => findKeys.has(f.key) || f.key === findState.hit?.key) : fileFiltered;
|
|
2277
2810
|
const shownKeySet = new Set(shownFiles.map((f) => f.key));
|
|
2811
|
+
const newKeys = new Set(allFiles.filter((f) => f.changedSince).map((f) => f.key));
|
|
2278
2812
|
const filesByRepo = new Map(repoList.map((r) => [r.id, allFiles.filter((f) => f.repo === r.id)]));
|
|
2279
2813
|
const shownByRepo = new Map(repoList.map((r) => [r.id, shownFiles.filter((f) => f.repo === r.id)]));
|
|
2280
2814
|
const commentsByFile = (() => {
|
|
@@ -2291,16 +2825,21 @@ var diff_view_default = _template("j", (input) => {
|
|
|
2291
2825
|
label: r.pr ? `${r.worktree} #${r.pr.number}` : r.worktree,
|
|
2292
2826
|
files: shownByRepo.get(r.id) || []
|
|
2293
2827
|
}));
|
|
2294
|
-
const
|
|
2295
|
-
const
|
|
2296
|
-
const
|
|
2297
|
-
const
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2828
|
+
const localDifferIds = new Set(repoList.filter((repo) => !!repo.pr && !!repo.localHead && (repo.localHead !== repo.head || repo.branch !== repo.pr.headRefName)).map((r) => r.id));
|
|
2829
|
+
const hasFiles = !repos || allFiles.length > 0;
|
|
2830
|
+
const fileWorktree = _resume((repo) => repo.includes("#") ? repo.split("#")[0] : repo, "j14");
|
|
2831
|
+
const anchorFor = _resume((file, range) => {
|
|
2832
|
+
const section = repoList.find((r) => r.id === file.repo);
|
|
2833
|
+
const source = range.side === "deletions" ? file.old : file.new;
|
|
2834
|
+
return {
|
|
2835
|
+
head: section?.head,
|
|
2836
|
+
snippet: source == null ? void 0 : quoteRange(source, range.start, range.end, range.side === "deletions" ? "deletions" : "additions")
|
|
2837
|
+
};
|
|
2838
|
+
}, "j15", $scope0_id);
|
|
2301
2839
|
const saveComment = _resume(async (file, text) => {
|
|
2302
2840
|
const range = draft;
|
|
2303
2841
|
draft = null;
|
|
2842
|
+
if (!range) return;
|
|
2304
2843
|
try {
|
|
2305
2844
|
const comment = await api(`/api/workspaces/${input.workspaceId}/review`, {
|
|
2306
2845
|
method: "POST",
|
|
@@ -2312,70 +2851,70 @@ var diff_view_default = _template("j", (input) => {
|
|
|
2312
2851
|
side: range.side,
|
|
2313
2852
|
line_start: range.start,
|
|
2314
2853
|
line_end: range.end,
|
|
2315
|
-
text: text.trim()
|
|
2854
|
+
text: text.trim(),
|
|
2855
|
+
...anchorFor(file, range)
|
|
2316
2856
|
})
|
|
2317
2857
|
});
|
|
2318
2858
|
comments = comments.concat(comment);
|
|
2319
2859
|
} catch (err) {
|
|
2320
2860
|
error = String(err.message || err);
|
|
2321
2861
|
}
|
|
2322
|
-
}, "
|
|
2862
|
+
}, "j16", $scope0_id);
|
|
2863
|
+
const deleteRemote = _resume((ids) => ids === "all" ? fetch(`/api/workspaces/${input.workspaceId}/review`, {
|
|
2864
|
+
method: "POST",
|
|
2865
|
+
headers: { "content-type": "application/json" },
|
|
2866
|
+
body: JSON.stringify({ action: "clear" })
|
|
2867
|
+
}) : Promise.all(ids.map((id) => fetch(`/api/workspaces/${input.workspaceId}/review/${id}`, { method: "DELETE" }))), "j17", $scope0_id);
|
|
2323
2868
|
const removeComment = _resume(async (id) => {
|
|
2324
2869
|
comments = comments.filter((c) => c.id !== id);
|
|
2325
|
-
await
|
|
2326
|
-
}, "
|
|
2327
|
-
const
|
|
2328
|
-
|
|
2329
|
-
draft = null;
|
|
2330
|
-
await fetch(`/api/workspaces/${input.workspaceId}/review`, {
|
|
2331
|
-
method: "POST",
|
|
2332
|
-
headers: { "content-type": "application/json" },
|
|
2333
|
-
body: JSON.stringify({ action: "clear" })
|
|
2334
|
-
});
|
|
2335
|
-
}, "j11", $scope0_id);
|
|
2336
|
-
const postToSession = _resume(async (list, sessionId) => {
|
|
2337
|
-
if (!list.length) return;
|
|
2338
|
-
await api(`/api/sessions/${sessionId}/send`, {
|
|
2339
|
-
method: "POST",
|
|
2340
|
-
headers: { "content-type": "application/json" },
|
|
2341
|
-
body: JSON.stringify({
|
|
2342
|
-
text: `Please address this review feedback, then summarize what you changed.\n\n${commentMarkdown(list, repos)}`,
|
|
2343
|
-
...getTermDims() || {}
|
|
2344
|
-
})
|
|
2345
|
-
});
|
|
2346
|
-
}, "j12", $scope0_id);
|
|
2347
|
-
const copyMarkdown = _resume(async () => {
|
|
2348
|
-
if (!await copyText(commentMarkdown(comments, repos))) {
|
|
2349
|
-
error = "Copy failed: the clipboard needs HTTPS in this browser.";
|
|
2350
|
-
return false;
|
|
2351
|
-
}
|
|
2352
|
-
await clearComments();
|
|
2353
|
-
return true;
|
|
2354
|
-
}, "j13", $scope0_id);
|
|
2355
|
-
const sendTo = _resume(async (sessionId) => {
|
|
2356
|
-
const batch = comments;
|
|
2870
|
+
await deleteRemote([id]).catch(() => {});
|
|
2871
|
+
}, "j18", $scope0_id);
|
|
2872
|
+
const dispatch = _resume(async (list, to, consume) => {
|
|
2873
|
+
if (!list.length) return true;
|
|
2357
2874
|
sendGate.busy++;
|
|
2358
2875
|
try {
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2876
|
+
const text = commentMarkdown(list, repos);
|
|
2877
|
+
if ("clipboard" in to) {
|
|
2878
|
+
if (!await copyText(text)) {
|
|
2879
|
+
error = "Copy failed: the clipboard needs HTTPS in this browser.";
|
|
2880
|
+
return false;
|
|
2881
|
+
}
|
|
2882
|
+
} else {
|
|
2883
|
+
await api(`/api/sessions/${to.session}/send`, {
|
|
2884
|
+
method: "POST",
|
|
2885
|
+
headers: { "content-type": "application/json" },
|
|
2886
|
+
body: JSON.stringify({
|
|
2887
|
+
text: `Please address this review feedback, then summarize what you changed.\n\n${text}`,
|
|
2888
|
+
...getTermDims() || {}
|
|
2889
|
+
})
|
|
2890
|
+
});
|
|
2891
|
+
input.onSent?.(to.session);
|
|
2892
|
+
}
|
|
2362
2893
|
draft = null;
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
}
|
|
2894
|
+
if (consume === "all") comments = [];
|
|
2895
|
+
else {
|
|
2896
|
+
const gone = new Set(consume);
|
|
2897
|
+
comments = comments.filter((c) => !gone.has(c.id));
|
|
2898
|
+
}
|
|
2899
|
+
if (consume === "all" || consume.length) await deleteRemote(consume).catch(() => {});
|
|
2900
|
+
return true;
|
|
2368
2901
|
} catch (err) {
|
|
2369
2902
|
error = String(err.message || err);
|
|
2903
|
+
return false;
|
|
2370
2904
|
} finally {
|
|
2371
2905
|
sendGate.busy--;
|
|
2372
2906
|
}
|
|
2373
|
-
}, "
|
|
2374
|
-
const
|
|
2907
|
+
}, "j19", $scope0_id);
|
|
2908
|
+
const copyMarkdown = _resume(() => dispatch(comments, { clipboard: true }, "all"), "j20", $scope0_id);
|
|
2909
|
+
const sendTo = _resume((sessionId) => dispatch(comments, { session: sessionId }, "all"), "j21", $scope0_id);
|
|
2910
|
+
const sendOneComment = _resume((id, sessionId) => {
|
|
2911
|
+
const comment = comments.find((c) => c.id === id);
|
|
2912
|
+
return comment ? dispatch([comment], { session: sessionId }, [id]) : Promise.resolve(false);
|
|
2913
|
+
}, "j22", $scope0_id);
|
|
2914
|
+
const sendDraftComment = _resume((file, text, sessionId) => {
|
|
2375
2915
|
const range = draft;
|
|
2376
|
-
if (!range) return;
|
|
2377
2916
|
const trimmed = text.trim();
|
|
2378
|
-
if (!trimmed) return;
|
|
2917
|
+
if (!range || !trimmed) return Promise.resolve(false);
|
|
2379
2918
|
const one = {
|
|
2380
2919
|
id: -1,
|
|
2381
2920
|
workspace_id: input.workspaceId,
|
|
@@ -2385,47 +2924,16 @@ var diff_view_default = _template("j", (input) => {
|
|
|
2385
2924
|
line_start: range.start,
|
|
2386
2925
|
line_end: range.end,
|
|
2387
2926
|
text: trimmed,
|
|
2388
|
-
created_at: ""
|
|
2927
|
+
created_at: "",
|
|
2928
|
+
...anchorFor(file, range)
|
|
2389
2929
|
};
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
await postToSession([one], sessionId);
|
|
2393
|
-
input.onSent?.(sessionId);
|
|
2394
|
-
draft = null;
|
|
2395
|
-
} catch (err) {
|
|
2396
|
-
error = String(err.message || err);
|
|
2397
|
-
} finally {
|
|
2398
|
-
sendGate.busy--;
|
|
2399
|
-
}
|
|
2400
|
-
}, "j15", $scope0_id);
|
|
2401
|
-
const sendOneComment = _resume(async (id, sessionId) => {
|
|
2402
|
-
const comment = comments.find((c) => c.id === id);
|
|
2403
|
-
if (!comment) return;
|
|
2404
|
-
sendGate.busy++;
|
|
2405
|
-
try {
|
|
2406
|
-
await postToSession([comment], sessionId);
|
|
2407
|
-
input.onSent?.(sessionId);
|
|
2408
|
-
comments = comments.filter((c) => c.id !== id);
|
|
2409
|
-
await fetch(`/api/review-comments/${id}`, { method: "DELETE" }).catch(() => {});
|
|
2410
|
-
} catch (err) {
|
|
2411
|
-
error = String(err.message || err);
|
|
2412
|
-
} finally {
|
|
2413
|
-
sendGate.busy--;
|
|
2414
|
-
}
|
|
2415
|
-
}, "j16", $scope0_id);
|
|
2416
|
-
const openFile = _resume((key) => {
|
|
2417
|
-
const el = ((scrollEl) => scrollEl())(_el_read_error)?.querySelector(`details[data-key="${CSS.escape(key)}"]`);
|
|
2418
|
-
if (el) el.open = true;
|
|
2419
|
-
return el;
|
|
2420
|
-
}, "j17", $scope0_id);
|
|
2421
|
-
const jumpTo = _resume((key) => {
|
|
2422
|
-
openFile(key)?.scrollIntoView({ block: "start" });
|
|
2423
|
-
}, "j18", $scope0_id);
|
|
2930
|
+
return dispatch([one], { session: sessionId }, []);
|
|
2931
|
+
}, "j23", $scope0_id);
|
|
2424
2932
|
const openFind = _resume(() => {
|
|
2425
2933
|
findOpen = true;
|
|
2426
2934
|
findTick++;
|
|
2427
2935
|
findFocusRef.focus();
|
|
2428
|
-
}, "
|
|
2936
|
+
}, "j24", $scope0_id);
|
|
2429
2937
|
const onFindState = _resume((next) => {
|
|
2430
2938
|
findState = next;
|
|
2431
2939
|
if (!next.hit) return;
|
|
@@ -2434,628 +2942,320 @@ var diff_view_default = _template("j", (input) => {
|
|
|
2434
2942
|
const el = openFile(hit.key);
|
|
2435
2943
|
if (!el) return;
|
|
2436
2944
|
if (hit.line < 1) {
|
|
2437
|
-
|
|
2438
|
-
if (root) {
|
|
2439
|
-
const top = el.getBoundingClientRect().top - root.getBoundingClientRect().top + root.scrollTop;
|
|
2440
|
-
root.scrollTo({ top: Math.max(0, top - 8) });
|
|
2441
|
-
} else el.scrollIntoView({ block: "start" });
|
|
2945
|
+
pinToTop(el);
|
|
2442
2946
|
return;
|
|
2443
2947
|
}
|
|
2444
2948
|
setSearchPaint(next.query, hit);
|
|
2445
2949
|
revealSearchHit();
|
|
2446
2950
|
}, 0);
|
|
2447
|
-
}, "
|
|
2448
|
-
|
|
2951
|
+
}, "j25", $scope0_id);
|
|
2952
|
+
const toggleSection = _resume((id) => {
|
|
2953
|
+
if (expandingRepos.has(id)) {
|
|
2954
|
+
const busy = new Set(expandingRepos);
|
|
2955
|
+
busy.delete(id);
|
|
2956
|
+
expandingRepos = busy;
|
|
2957
|
+
if (!collapsedRepos.has(id)) collapsedRepos = /* @__PURE__ */ new Set([...collapsedRepos, id]);
|
|
2958
|
+
return;
|
|
2959
|
+
}
|
|
2960
|
+
if (collapsedRepos.has(id)) {
|
|
2961
|
+
if (openedRepos.has(id)) {
|
|
2962
|
+
const next = new Set(collapsedRepos);
|
|
2963
|
+
next.delete(id);
|
|
2964
|
+
collapsedRepos = next;
|
|
2965
|
+
return;
|
|
2966
|
+
}
|
|
2967
|
+
expandingRepos = /* @__PURE__ */ new Set([...expandingRepos, id]);
|
|
2968
|
+
requestAnimationFrame(() => {
|
|
2969
|
+
requestAnimationFrame(() => {
|
|
2970
|
+
if (!expandingRepos.has(id)) return;
|
|
2971
|
+
const next = new Set(collapsedRepos);
|
|
2972
|
+
next.delete(id);
|
|
2973
|
+
collapsedRepos = next;
|
|
2974
|
+
const done = new Set(expandingRepos);
|
|
2975
|
+
done.delete(id);
|
|
2976
|
+
expandingRepos = done;
|
|
2977
|
+
});
|
|
2978
|
+
});
|
|
2979
|
+
} else {
|
|
2980
|
+
openedRepos = /* @__PURE__ */ new Set([...openedRepos, id]);
|
|
2981
|
+
collapsedRepos = /* @__PURE__ */ new Set([...collapsedRepos, id]);
|
|
2982
|
+
}
|
|
2983
|
+
}, "j26", $scope0_id);
|
|
2984
|
+
_html(`<div${_attr_class("_d8")}><div${_attr_class("_ec")}><div${_attr_class("_ed")}><div${_attr_class(["_en", { ["_em"]: !comments.length }])}>`);
|
|
2449
2985
|
_if(() => {
|
|
2450
2986
|
if (input.onExit) {
|
|
2451
2987
|
const $scope1_id = _scope_id();
|
|
2452
|
-
_html(`<a${_attr("href", `/w/${input.workspaceId}`)}${_attr_class([iconBtnRow, "
|
|
2988
|
+
_html(`<a${_attr("href", `/w/${input.workspaceId}`)}${_attr_class([iconBtnRow, "_ee"])} title="Back to terminal (Esc)">`);
|
|
2453
2989
|
icon_back_default({ size: 14 });
|
|
2454
2990
|
_html(`</a>${_el_resume($scope1_id, "a", _serialize_guard($scope0_reason, 3))}`);
|
|
2455
2991
|
_serialize_if($scope0_reason, 0) && writeScope($scope1_id, { _: _serialize_if($scope0_reason, 3) && _scope_with_id($scope0_id) });
|
|
2456
2992
|
return 0;
|
|
2457
2993
|
}
|
|
2458
2994
|
}, $scope0_id, "e", _serialize_guard($scope0_reason, 0), _serialize_guard($scope0_reason, 4), 1, 0, 1);
|
|
2459
|
-
_html(`<h1${_attr_class("
|
|
2460
|
-
_set_serialize_reason(2);
|
|
2461
|
-
const $childScope = _peek_scope_id();
|
|
2462
|
-
file_filter_default({
|
|
2463
|
-
value: fileFilter,
|
|
2464
|
-
valueChange: _resume((_new_fileFilter) => {
|
|
2465
|
-
fileFilter = _new_fileFilter;
|
|
2466
|
-
}, "j21", $scope0_id)
|
|
2467
|
-
});
|
|
2468
|
-
_html(`</div><div${_attr_class("_ei")}><span${_attr_class("_et")}>`);
|
|
2469
|
-
_if(() => {
|
|
2470
|
-
if (lineStats.additions || lineStats.deletions) {
|
|
2471
|
-
const $scope27_id = _scope_id();
|
|
2472
|
-
_html(`<span${_attr_class("_eu")}>+<!>${_escape(lineStats.additions)}${_el_resume($scope27_id, "b")}</span><span${_attr_class("_ev")}>−<!>${_escape(lineStats.deletions)}${_el_resume($scope27_id, "d")}</span>`);
|
|
2473
|
-
writeScope($scope27_id, {});
|
|
2474
|
-
return 0;
|
|
2475
|
-
} else {
|
|
2476
|
-
const $scope29_id = _scope_id();
|
|
2477
|
-
_html(`<span${_attr_class("_ew")}>0</span>`);
|
|
2478
|
-
writeScope($scope29_id, {});
|
|
2479
|
-
return 1;
|
|
2480
|
-
}
|
|
2481
|
-
}, $scope0_id, "k");
|
|
2995
|
+
_html(`<h1${_attr_class("_eh")}>Review</h1>`);
|
|
2482
2996
|
_if(() => {
|
|
2483
2997
|
if (comments.length) {
|
|
2484
|
-
const $
|
|
2485
|
-
_html(`<span${_attr_class("
|
|
2486
|
-
writeScope($
|
|
2998
|
+
const $scope5_id = _scope_id();
|
|
2999
|
+
_html(`<span${_attr_class("_eg")}>${_escape(comments.length)}${_el_resume($scope5_id, "b")} comment<!>${comments.length === 1 ? "" : "s"}${_el_resume($scope5_id, "c")}</span>`);
|
|
3000
|
+
writeScope($scope5_id, {});
|
|
2487
3001
|
return 0;
|
|
2488
3002
|
}
|
|
2489
|
-
}, $scope0_id, "
|
|
2490
|
-
_html("</span></div>");
|
|
3003
|
+
}, $scope0_id, "g", 1, 1, 1, 0, 1);
|
|
2491
3004
|
_if(() => {
|
|
2492
3005
|
if (comments.length) {
|
|
2493
3006
|
const $scope2_id = _scope_id();
|
|
3007
|
+
_html(`<span${_attr_class("_ef")}>`);
|
|
2494
3008
|
_set_serialize_reason(_serialize_guard($scope0_reason, 5));
|
|
2495
|
-
const $
|
|
3009
|
+
const $childScope = _peek_scope_id();
|
|
2496
3010
|
diff_send_default({
|
|
2497
3011
|
sessions: input.sessions,
|
|
2498
3012
|
onCopy: copyMarkdown,
|
|
2499
3013
|
onSend: sendTo
|
|
2500
3014
|
});
|
|
2501
|
-
|
|
3015
|
+
_html("</span>");
|
|
3016
|
+
writeScope($scope2_id, { b: _existing_scope($childScope) });
|
|
2502
3017
|
return 0;
|
|
2503
3018
|
}
|
|
2504
|
-
}, $scope0_id, "
|
|
2505
|
-
_html(`</div
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
3019
|
+
}, $scope0_id, "h", 1, 1, 1, 0, 1);
|
|
3020
|
+
_html(`</div>${_el_resume($scope0_id, "d")}<div${_attr_class("_eb")}>`);
|
|
3021
|
+
_if(() => {
|
|
3022
|
+
if (hasFiles) {
|
|
3023
|
+
const $scope12_id = _scope_id();
|
|
3024
|
+
_html(`<button${_attr_class([
|
|
3025
|
+
treeToggle,
|
|
3026
|
+
"_d_",
|
|
3027
|
+
{ ["_d9"]: treeOpen }
|
|
3028
|
+
])} title=${treeOpen ? "\"Hide file tree\"" : "\"Show file tree\""}>`);
|
|
3029
|
+
icon_sidebar_default({ size: 14 });
|
|
3030
|
+
_html(`</button>${_el_resume($scope12_id, "a")}`);
|
|
3031
|
+
_script($scope12_id, "j42");
|
|
3032
|
+
writeScope($scope12_id, {});
|
|
3033
|
+
return 0;
|
|
3034
|
+
}
|
|
3035
|
+
}, $scope0_id, "j", 1, 1, 1, 0, 1);
|
|
3036
|
+
_html(`<button${_attr_class([iconBtnRow, "_d_"])} title="Refresh diff"${_attr("disabled", loading)}>`);
|
|
2512
3037
|
_set_serialize_reason(1);
|
|
2513
|
-
const $
|
|
3038
|
+
const $childScope2 = _peek_scope_id();
|
|
2514
3039
|
icon_refresh_default({
|
|
2515
3040
|
size: 14,
|
|
2516
3041
|
class: loading && "_B"
|
|
2517
3042
|
});
|
|
2518
|
-
_html(`</button>${_el_resume($scope0_id, "
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
3043
|
+
_html(`</button>${_el_resume($scope0_id, "k")}`);
|
|
3044
|
+
_if(() => {
|
|
3045
|
+
if (hasFiles) {
|
|
3046
|
+
const $scope13_id = _scope_id();
|
|
3047
|
+
_html(`<button${_attr_class(["_l", "_ez"])} title="Jump to file">Files (<!>${_escape(shownFiles.length)}${_el_resume($scope13_id, "b")})</button>${_el_resume($scope13_id, "a")}`);
|
|
3048
|
+
_script($scope13_id, "j43");
|
|
3049
|
+
writeScope($scope13_id, {});
|
|
3050
|
+
return 0;
|
|
3051
|
+
}
|
|
3052
|
+
}, $scope0_id, "m", 1, 1, 1, 0, 1);
|
|
3053
|
+
_html(`<div${_attr_class("_eo")} role=group aria-label="Review scope"><button type=button${_attr_class(["_eq", { ["_ep"]: scope$1 === "committed" }])} aria-pressed=${scope$1 === "committed" ? "true" : "false"} title="Committed changes only (base…tip, no working-tree edits)"${_attr("disabled", loading)}>Committed</button>${_el_resume($scope0_id, "o")}<button type=button${_attr_class(["_eq", { ["_ep"]: scope$1 === "working" }])} aria-pressed=${scope$1 === "working" ? "true" : "false"} title="Committed changes plus uncommitted and untracked files"${_attr("disabled", loading)}>Working tree</button>${_el_resume($scope0_id, "p")}<button type=button${_attr_class(["_eq", { ["_ep"]: scope$1 === "dirty" }])} aria-pressed=${scope$1 === "dirty" ? "true" : "false"} title="Only uncommitted and untracked files, against HEAD"${_attr("disabled", loading)}>Uncommitted</button>${_el_resume($scope0_id, "q")}</div><span${_attr_class(["_j", "_er"])}>`);
|
|
3054
|
+
_attr_select_value($scope0_id, "s", scope$1, _resume(function(v) {
|
|
3055
|
+
setScope(v);
|
|
3056
|
+
}, "j0", $scope0_id), () => {
|
|
3057
|
+
_html(`<select${_attr_class(["_k", "_es"])} aria-label="Review scope"${_attr("disabled", loading)}><option${_attr_option_value("committed")}>Committed</option><option${_attr_option_value("working")}>Working tree</option><option${_attr_option_value("dirty")}>Uncommitted</option></select>`);
|
|
3058
|
+
});
|
|
3059
|
+
_html(`${_el_resume($scope0_id, "s")}</span><div${_attr_class(["_ek", { ["_ej"]: !findOpen }])}>`);
|
|
2522
3060
|
_set_serialize_reason(2);
|
|
2523
|
-
const $
|
|
3061
|
+
const $childScope3 = _peek_scope_id();
|
|
2524
3062
|
diff_find_default({
|
|
2525
3063
|
files: fileFiltered,
|
|
2526
3064
|
tick: findTick,
|
|
2527
3065
|
open: findOpen,
|
|
2528
3066
|
openChange: _resume((_new_findOpen) => {
|
|
2529
3067
|
findOpen = _new_findOpen;
|
|
2530
|
-
}, "
|
|
3068
|
+
}, "j27", $scope0_id),
|
|
2531
3069
|
focusRef: findFocusRef,
|
|
2532
3070
|
stateChange: _resume(function(s) {
|
|
2533
3071
|
onFindState(s);
|
|
2534
|
-
}, "
|
|
3072
|
+
}, "j28", $scope0_id)
|
|
2535
3073
|
});
|
|
2536
|
-
_html(`</div>${_el_resume($scope0_id, "
|
|
2537
|
-
iconBtnRow,
|
|
2538
|
-
"_ek",
|
|
2539
|
-
"_eb"
|
|
2540
|
-
])} title="Find in review (⌘/Ctrl+F)" aria-label="Find in review"${_attr("hidden", findOpen)}>`);
|
|
2541
|
-
icon_search_default({ size: 14 });
|
|
2542
|
-
_html(`</button>${_el_resume($scope0_id, "a1")}</div></div>${_el_resume($scope0_id, "c")}<div${_attr_class("_ep")} data-diff-main>`);
|
|
3074
|
+
_html(`</div>${_el_resume($scope0_id, "t")}`);
|
|
2543
3075
|
_if(() => {
|
|
2544
|
-
if (
|
|
3076
|
+
if (hasFiles) {
|
|
2545
3077
|
const $scope14_id = _scope_id();
|
|
3078
|
+
_html(`<button${_attr_class([
|
|
3079
|
+
iconBtnRow,
|
|
3080
|
+
"_ei",
|
|
3081
|
+
"_d_"
|
|
3082
|
+
])} title="Find in review (⌘/Ctrl+F)" aria-label="Find in review"${_attr("hidden", findOpen)}>`);
|
|
3083
|
+
icon_search_default({ size: 14 });
|
|
3084
|
+
_html(`</button>${_el_resume($scope14_id, "a")}`);
|
|
3085
|
+
_script($scope14_id, "j44");
|
|
3086
|
+
writeScope($scope14_id, {});
|
|
3087
|
+
return 0;
|
|
3088
|
+
}
|
|
3089
|
+
}, $scope0_id, "v", 1, 1, 1, 0, 1);
|
|
3090
|
+
_html(`</div></div><div${_attr_class("_el")} data-diff-main>`);
|
|
3091
|
+
_if(() => {
|
|
3092
|
+
if (error) {
|
|
3093
|
+
const $scope6_id = _scope_id();
|
|
2546
3094
|
toast_default({
|
|
2547
3095
|
onDismiss: _resume(function() {
|
|
2548
3096
|
error = null;
|
|
2549
|
-
}, "
|
|
2550
|
-
content: _content_resume("
|
|
3097
|
+
}, "j29", $scope6_id),
|
|
3098
|
+
content: _content_resume("j45", () => {
|
|
2551
3099
|
_scope_reason();
|
|
2552
|
-
const $
|
|
2553
|
-
_html(`${_escape(error)}${_el_resume($
|
|
2554
|
-
_subscribe($error__closures, writeScope($
|
|
2555
|
-
_resume_branch($
|
|
2556
|
-
}, $
|
|
3100
|
+
const $scope7_id = _scope_id();
|
|
3101
|
+
_html(`${_escape(error)}${_el_resume($scope7_id, "a")}`);
|
|
3102
|
+
_subscribe($error__closures, writeScope($scope7_id, { _: _scope_with_id($scope6_id) }));
|
|
3103
|
+
_resume_branch($scope7_id);
|
|
3104
|
+
}, $scope6_id)
|
|
2557
3105
|
});
|
|
2558
|
-
writeScope($
|
|
3106
|
+
writeScope($scope6_id, {});
|
|
2559
3107
|
return 0;
|
|
2560
3108
|
}
|
|
2561
|
-
}, $scope0_id, "
|
|
3109
|
+
}, $scope0_id, "x", 1, 1, 1, 0, 1);
|
|
2562
3110
|
_if(() => {
|
|
2563
3111
|
if (!repos && loading) {
|
|
2564
|
-
const $
|
|
2565
|
-
_html(`<
|
|
2566
|
-
writeScope($
|
|
3112
|
+
const $scope15_id = _scope_id();
|
|
3113
|
+
_html(`<div${_attr_class("_eu")} aria-hidden=true><div${_attr_class(["_ev", "_ew"])}></div><div${_attr_class(["_ev", "_ex"])}></div><div${_attr_class(["_ev", "_ey"])}></div><div${_attr_class(["_ev", "_ex"])}></div><div${_attr_class(["_ev", "_ey"])}></div></div>`);
|
|
3114
|
+
writeScope($scope15_id, {});
|
|
2567
3115
|
return 0;
|
|
2568
3116
|
}
|
|
2569
|
-
}, $scope0_id, "
|
|
3117
|
+
}, $scope0_id, "y", 1, 1, 1, 0, 1);
|
|
2570
3118
|
_for_of(repoList.filter((r) => r.baseMissing), (repo) => {
|
|
2571
|
-
const $
|
|
2572
|
-
const $
|
|
3119
|
+
const $scope9_id = _scope_id();
|
|
3120
|
+
const $for_content2__repo_base__closures = /* @__PURE__ */ new Set();
|
|
2573
3121
|
_set_serialize_reason(356);
|
|
2574
|
-
const $
|
|
3122
|
+
const $childScope4 = _peek_scope_id();
|
|
2575
3123
|
toast_default({
|
|
2576
3124
|
kind: "warn",
|
|
2577
3125
|
placement: "inline",
|
|
2578
3126
|
title: `${repo.worktree}: base not found`,
|
|
2579
|
-
content: _content_resume("
|
|
3127
|
+
content: _content_resume("j46", () => {
|
|
2580
3128
|
_scope_reason();
|
|
2581
|
-
const $
|
|
2582
|
-
_html(`${_escape(repo.base)}${_el_resume($
|
|
2583
|
-
_subscribe($
|
|
2584
|
-
_resume_branch($
|
|
2585
|
-
}, $
|
|
3129
|
+
const $scope10_id = _scope_id();
|
|
3130
|
+
_html(`${_escape(repo.base)}${_el_resume($scope10_id, "a")}<!>${scope$1 !== "committed" ? ", showing uncommitted changes only" : ""}${_el_resume($scope10_id, "b")}.`);
|
|
3131
|
+
_subscribe($for_content2__repo_base__closures, _subscribe($scope__closures, writeScope($scope10_id, { _: _scope_with_id($scope9_id) })));
|
|
3132
|
+
_resume_branch($scope10_id);
|
|
3133
|
+
}, $scope9_id)
|
|
2586
3134
|
});
|
|
2587
|
-
writeScope($
|
|
3135
|
+
writeScope($scope9_id, {
|
|
2588
3136
|
e: repo?.base,
|
|
2589
|
-
f: $
|
|
2590
|
-
a: _existing_scope($
|
|
2591
|
-
});
|
|
2592
|
-
}, "id", $scope0_id, "a6", 1, 1, 1, 0, 1);
|
|
2593
|
-
_for_of(repoList.filter((r) => r.contained && r.files.length), (repo) => {
|
|
2594
|
-
const $scope21_id = _scope_id();
|
|
2595
|
-
const $for_content4__repo_base__closures = /* @__PURE__ */ new Set();
|
|
2596
|
-
_set_serialize_reason(356);
|
|
2597
|
-
const $childScope6 = _peek_scope_id();
|
|
2598
|
-
toast_default({
|
|
2599
|
-
kind: "info",
|
|
2600
|
-
placement: "inline",
|
|
2601
|
-
title: repo.pr ? `${repo.worktree} #${repo.pr.number}` : repo.worktree,
|
|
2602
|
-
content: _content_resume("j38", () => {
|
|
2603
|
-
_scope_reason();
|
|
2604
|
-
const $scope22_id = _scope_id();
|
|
2605
|
-
_html(`already in <!>${_escape(repo.base)}${_el_resume($scope22_id, "a")}<!>${uncommitted ? ", showing uncommitted changes only" : ""}${_el_resume($scope22_id, "b")}.`);
|
|
2606
|
-
_subscribe($for_content4__repo_base__closures, _subscribe($uncommitted__closures, writeScope($scope22_id, {
|
|
2607
|
-
_: _scope_with_id($scope21_id),
|
|
2608
|
-
Cdw: 1
|
|
2609
|
-
})));
|
|
2610
|
-
_resume_branch($scope22_id);
|
|
2611
|
-
}, $scope21_id)
|
|
2612
|
-
});
|
|
2613
|
-
writeScope($scope21_id, {
|
|
2614
|
-
g: repo?.base,
|
|
2615
|
-
h: $for_content4__repo_base__closures,
|
|
2616
|
-
a: _existing_scope($childScope6)
|
|
2617
|
-
});
|
|
2618
|
-
}, "id", $scope0_id, "a7", 1, 1, 1, 0, 1);
|
|
2619
|
-
_if(() => {
|
|
2620
|
-
if (driftRepos.length) {
|
|
2621
|
-
const $scope16_id = _scope_id();
|
|
2622
|
-
_set_serialize_reason(4176);
|
|
2623
|
-
const $childScope7 = _peek_scope_id();
|
|
2624
|
-
toast_default({
|
|
2625
|
-
kind: "info",
|
|
2626
|
-
placement: "inline",
|
|
2627
|
-
title: "GitHub is behind",
|
|
2628
|
-
onDismiss: _resume(function() {
|
|
2629
|
-
dismissDrift();
|
|
2630
|
-
}, "j25", $scope16_id),
|
|
2631
|
-
action: attrTag({ content: _content_resume("j40", () => {
|
|
2632
|
-
_scope_reason();
|
|
2633
|
-
const $scope17_id = _scope_id();
|
|
2634
|
-
_html(`<button${_attr_class("_l")}${_attr("disabled", loading)}>${loading ? "Reloading…" : "Reload"}${_el_resume($scope17_id, "b")}</button>${_el_resume($scope17_id, "a")}`);
|
|
2635
|
-
_script($scope17_id, "j39");
|
|
2636
|
-
_subscribe($loading__closures, writeScope($scope17_id, { _: _scope_with_id($scope16_id) }));
|
|
2637
|
-
_resume_branch($scope17_id);
|
|
2638
|
-
}, $scope16_id) }),
|
|
2639
|
-
content: _content_resume("j41", () => {
|
|
2640
|
-
_scope_reason();
|
|
2641
|
-
const $scope28_id = _scope_id();
|
|
2642
|
-
_html(`<span${_attr_class("_t")}>`);
|
|
2643
|
-
_for_of(driftRepos, (repo, i) => {
|
|
2644
|
-
const $scope31_id = _scope_id();
|
|
2645
|
-
_html(`${i > 0 ? " · " : ""}${_el_resume($scope31_id, "a")}<!>${_escape(repo.worktree)}${_el_resume($scope31_id, "b")} #<!>${_escape(repo.pr.number)}${_el_resume($scope31_id, "c")}`);
|
|
2646
|
-
writeScope($scope31_id, {});
|
|
2647
|
-
}, "id", $scope28_id, "b");
|
|
2648
|
-
_html(` : this view has a newer tip than the PR page.</span><span${_attr_class(["_u", "_eq"])}>`);
|
|
2649
|
-
_for_of(driftRepos, (repo, i) => {
|
|
2650
|
-
const $scope32_id = _scope_id();
|
|
2651
|
-
_html(`<span${_attr("title", `origin/${repo.pr.headRefName} ${repo.head} · GitHub ${repo.pr.headRefOid}`)}>${i > 0 ? " · " : ""}${_el_resume($scope32_id, "b")}<!>${_escape(shortSha(repo.head))}${_el_resume($scope32_id, "c")} → <!>${_escape(shortSha(repo.pr.headRefOid))}${_el_resume($scope32_id, "d")}</span>${_el_resume($scope32_id, "a")}`);
|
|
2652
|
-
writeScope($scope32_id, {});
|
|
2653
|
-
}, "id", $scope28_id, "c", 1, 1, 1, "</span>", 1);
|
|
2654
|
-
_subscribe($driftRepos__closures, writeScope($scope28_id, { _: _scope_with_id($scope16_id) }));
|
|
2655
|
-
_resume_branch($scope28_id);
|
|
2656
|
-
}, $scope16_id)
|
|
2657
|
-
});
|
|
2658
|
-
writeScope($scope16_id, { a: _existing_scope($childScope7) });
|
|
2659
|
-
return 0;
|
|
2660
|
-
}
|
|
2661
|
-
}, $scope0_id, "a8", 1, 1, 1, 0, 1);
|
|
2662
|
-
_for_of(localDifferList, (repo) => {
|
|
2663
|
-
const $scope23_id = _scope_id();
|
|
2664
|
-
const $for_content5__repo_head__closures = /* @__PURE__ */ new Set();
|
|
2665
|
-
const $for_content5__repo_pr_headRefName__closures = /* @__PURE__ */ new Set();
|
|
2666
|
-
const $for_content5__repo_localHead__closures = /* @__PURE__ */ new Set();
|
|
2667
|
-
const $for_content5__repo_branch__closures = /* @__PURE__ */ new Set();
|
|
2668
|
-
_set_serialize_reason(356);
|
|
2669
|
-
const $childScope8 = _peek_scope_id();
|
|
2670
|
-
toast_default({
|
|
2671
|
-
kind: "info",
|
|
2672
|
-
placement: "inline",
|
|
2673
|
-
title: `${repo.worktree} #${repo.pr.number}`,
|
|
2674
|
-
content: _content_resume("j42", () => {
|
|
2675
|
-
_scope_reason();
|
|
2676
|
-
const $scope24_id = _scope_id();
|
|
2677
|
-
_html(`this view is <!>${_escape(shortSha(repo.head))}${_el_resume($scope24_id, "a")} (<!>${_escape(repo.pr.headRefName)}${_el_resume($scope24_id, "b")}). Local is <!>${_escape(shortSha(repo.localHead))}${_el_resume($scope24_id, "c")} (<!>${_escape(repo.branch)}${_el_resume($scope24_id, "d")}<!>${uncommitted ? ", plus uncommitted" : ""}${_el_resume($scope24_id, "e")}).`);
|
|
2678
|
-
_subscribe($for_content5__repo_branch__closures, _subscribe($for_content5__repo_localHead__closures, _subscribe($for_content5__repo_pr_headRefName__closures, _subscribe($for_content5__repo_head__closures, _subscribe($uncommitted__closures, writeScope($scope24_id, {
|
|
2679
|
-
_: _scope_with_id($scope23_id),
|
|
2680
|
-
Cdw: 2
|
|
2681
|
-
}))))));
|
|
2682
|
-
_resume_branch($scope24_id);
|
|
2683
|
-
}, $scope23_id)
|
|
3137
|
+
f: $for_content2__repo_base__closures,
|
|
3138
|
+
a: _existing_scope($childScope4)
|
|
2684
3139
|
});
|
|
2685
|
-
|
|
2686
|
-
h: repo?.head,
|
|
2687
|
-
i: repo?.pr?.headRefName,
|
|
2688
|
-
j: repo?.localHead,
|
|
2689
|
-
k: repo?.branch,
|
|
2690
|
-
l: $for_content5__repo_head__closures,
|
|
2691
|
-
m: $for_content5__repo_pr_headRefName__closures,
|
|
2692
|
-
n: $for_content5__repo_localHead__closures,
|
|
2693
|
-
o: $for_content5__repo_branch__closures,
|
|
2694
|
-
a: _existing_scope($childScope8)
|
|
2695
|
-
});
|
|
2696
|
-
}, "id", $scope0_id, "a9", 1, 1, 1, 0, 1);
|
|
3140
|
+
}, "id", $scope0_id, "z", 1, 1, 1, 0, 1);
|
|
2697
3141
|
_if(() => {
|
|
2698
3142
|
if (repos && !allFiles.length) {
|
|
2699
|
-
const $
|
|
2700
|
-
_html(`<p${_attr_class("
|
|
2701
|
-
writeScope($
|
|
3143
|
+
const $scope11_id = _scope_id();
|
|
3144
|
+
_html(`<p${_attr_class("_bB")}>${scope$1 === "dirty" ? "Nothing uncommitted." : repoList.some((r) => r.pr) ? "No file changes on these PRs." : "No changes vs base."}${_el_resume($scope11_id, "b")}</p>`);
|
|
3145
|
+
writeScope($scope11_id, {});
|
|
2702
3146
|
return 0;
|
|
2703
3147
|
} else if (repos && !shownFiles.length && !findState.hit) {
|
|
2704
|
-
const $
|
|
2705
|
-
_html(`<p${_attr_class("
|
|
2706
|
-
writeScope($
|
|
3148
|
+
const $scope8_id = _scope_id();
|
|
3149
|
+
_html(`<p${_attr_class("_bB")}>${findState.query.trim() ? "No matches in review." : onlyNew && !fileFilter ? "Nothing changed since your last visit." : `No files match "${_escape(`${fileFilter}`)}".`}${_el_resume($scope8_id, "b")}</p>`);
|
|
3150
|
+
writeScope($scope8_id, {});
|
|
2707
3151
|
return 1;
|
|
2708
3152
|
}
|
|
2709
|
-
}, $scope0_id, "
|
|
3153
|
+
}, $scope0_id, "a0", 1, 1, 1, 0, 1);
|
|
2710
3154
|
_for_of(repoList, (repo) => {
|
|
2711
3155
|
const $scope3_id = _scope_id();
|
|
2712
|
-
const $for_content__repo_pr_number__closures = /* @__PURE__ */ new Set();
|
|
2713
|
-
const $for_content__repo_pr_url__closures = /* @__PURE__ */ new Set();
|
|
2714
|
-
const $for_content__repo_pr_title__closures = /* @__PURE__ */ new Set();
|
|
2715
|
-
const $for_content__repo_pr_headRefName__closures = /* @__PURE__ */ new Set();
|
|
2716
|
-
const $for_content__repo_head__closures = /* @__PURE__ */ new Set();
|
|
2717
|
-
const $for_content__repo_base__closures = /* @__PURE__ */ new Set();
|
|
2718
|
-
const $for_content__repo_baseSha__closures = /* @__PURE__ */ new Set();
|
|
2719
|
-
const $for_content__repo_full_name__closures = /* @__PURE__ */ new Set();
|
|
2720
|
-
const $for_content__repo_branch__closures = /* @__PURE__ */ new Set();
|
|
2721
|
-
const $for_content__repo_localHead__closures = /* @__PURE__ */ new Set();
|
|
2722
|
-
const $for_content__repo_id__closures = /* @__PURE__ */ new Set();
|
|
2723
|
-
const $for_content__repo_pr__closures = /* @__PURE__ */ new Set();
|
|
2724
|
-
const $for_content__repo_worktree__closures = /* @__PURE__ */ new Set();
|
|
2725
|
-
const $for_content__repo_pr_baseRefName__closures = /* @__PURE__ */ new Set();
|
|
2726
|
-
const $for_content__repoFiles_length__closures = /* @__PURE__ */ new Set();
|
|
2727
|
-
const $for_content__shownInRepo_length__closures = /* @__PURE__ */ new Set();
|
|
2728
|
-
const $for_content__repoFiles__closures = /* @__PURE__ */ new Set();
|
|
2729
3156
|
const repoFiles = filesByRepo.get(repo.id) || [];
|
|
2730
|
-
const shownInRepo = shownByRepo.get(repo.id) || [];
|
|
2731
3157
|
_if(() => {
|
|
2732
|
-
if (repoFiles.length || repo.pr) {
|
|
3158
|
+
if (repoFiles.length || repo.pr && hasFiles) {
|
|
2733
3159
|
const $scope4_id = _scope_id();
|
|
2734
|
-
|
|
2735
|
-
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
|
|
2742
|
-
|
|
2743
|
-
|
|
2744
|
-
|
|
2745
|
-
|
|
2746
|
-
|
|
2747
|
-
|
|
2748
|
-
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
|
|
2753
|
-
|
|
2754
|
-
|
|
2755
|
-
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
|
|
2759
|
-
|
|
2760
|
-
|
|
2761
|
-
|
|
2762
|
-
|
|
2763
|
-
|
|
2764
|
-
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
|
|
2768
|
-
|
|
2769
|
-
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
|
|
2776
|
-
|
|
2777
|
-
|
|
2778
|
-
|
|
2779
|
-
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
}
|
|
2790
|
-
}, $scope5_id, "n", 1, 1, 1, 0, 1);
|
|
2791
|
-
_html(`<span${_attr_class("_eG")}>${_escape(shownInRepo.length || repoFiles.length)}${_el_resume($scope5_id, "p")} file<!>${(shownInRepo.length || repoFiles.length) === 1 ? "" : "s"}${_el_resume($scope5_id, "q")}</span></button>${_el_resume($scope5_id, "a")}`);
|
|
2792
|
-
_script($scope5_id, "j44");
|
|
2793
|
-
_subscribe($for_content__shownInRepo_length__closures, _subscribe($for_content__repoFiles_length__closures, _subscribe($for_content__repo_branch__closures, _subscribe($for_content__repo_pr_baseRefName__closures, _subscribe($for_content__repo_baseSha__closures, _subscribe($for_content__repo_base__closures, _subscribe($for_content__repo_head__closures, _subscribe($for_content__repo_pr_headRefName__closures, _subscribe($for_content__repo_worktree__closures, _subscribe($for_content__repo_pr__closures, _subscribe($for_content__repo_id__closures, _subscribe($localDifferIds__closures, _subscribe($expandingRepos__closures, _subscribe($collapsedRepos__closures, _subscribe($si__input_workspaceName && $input_workspaceName__closures, _subscribe($si__input_workspaceBranch && $input_workspaceBranch__closures, writeScope($scope5_id, {
|
|
2794
|
-
r: repoCollapsed,
|
|
2795
|
-
t: repoExpanding,
|
|
2796
|
-
a0: compare$1?.topic,
|
|
2797
|
-
Ce1: 1
|
|
2798
|
-
})))))))))))))))));
|
|
2799
|
-
return 0;
|
|
2800
|
-
} else {
|
|
2801
|
-
const $scope7_id = _scope_id();
|
|
2802
|
-
_html(`<p${_attr_class("_eI")}>`);
|
|
2803
|
-
_if(() => {
|
|
2804
|
-
if (repo.pr) {
|
|
2805
|
-
const $scope35_id = _scope_id();
|
|
2806
|
-
_html(`<a${_attr_class(["_p", "_r"])}${_attr("href", `${repo.pr.url}/files`)} target=_blank rel=noopener${_attr("title", `${repo.pr.title}: ${repo.pr.headRefName} ${repo.head} vs ${repo.base} ${repo.baseSha}`)}>#<!>${_escape(repo.pr.number)}${_el_resume($scope35_id, "b")}</a>${_el_resume($scope35_id, "a")}<span${_attr_class("_t")}>${_escape(repo.pr.title)}${_el_resume($scope35_id, "d")}</span>`);
|
|
2807
|
-
_subscribe($for_content__repo_baseSha__closures, _subscribe($for_content__repo_base__closures, _subscribe($for_content__repo_head__closures, _subscribe($for_content__repo_pr_headRefName__closures, _subscribe($for_content__repo_pr_title__closures, _subscribe($for_content__repo_pr_url__closures, _subscribe($for_content__repo_pr_number__closures, writeScope($scope35_id, {
|
|
2808
|
-
Ca1: 1,
|
|
2809
|
-
Ca2: 1,
|
|
2810
|
-
Ca3: 1,
|
|
2811
|
-
Ca4: 3,
|
|
2812
|
-
Ca5: 3,
|
|
2813
|
-
Ca6: 3,
|
|
2814
|
-
Ca7: 3
|
|
2815
|
-
}))))))));
|
|
2816
|
-
return 0;
|
|
2817
|
-
}
|
|
2818
|
-
}, $scope7_id, "b");
|
|
2819
|
-
const compare$2 = reviewCompareLabel(repo.pr?.baseRefName || repo.base, repo.pr?.headRefName || repo.branch, input.workspaceBranch || "", input.workspaceName || "");
|
|
2820
|
-
_html(`<span${_attr_class("_eJ")}${_attr("title", `${compare$2.title} · ${repo.head.slice(0, 7)}…${repo.baseSha.slice(0, 7)}`)}><span${_attr_class(["_F", "_eK"])}>${_escape(compare$2.base)}${_el_resume($scope7_id, "e")}</span><span${_attr_class(["_H", "_eM"])} aria-hidden=true>vs</span><span${_attr_class(["_F", "_eL"])}>${_escape(compare$2.head)}${_el_resume($scope7_id, "h")}</span>`);
|
|
2821
|
-
_if(() => {
|
|
2822
|
-
if (compare$2.topic) {
|
|
2823
|
-
const $scope37_id = _scope_id();
|
|
2824
|
-
_html(`<span${_attr_class([
|
|
2825
|
-
"_F",
|
|
2826
|
-
tone.accent,
|
|
2827
|
-
"_eN"
|
|
2828
|
-
])}>${_escape(compare$2.topic)}${_el_resume($scope37_id, "b")}</span>`);
|
|
2829
|
-
writeScope($scope37_id, {});
|
|
2830
|
-
return 0;
|
|
2831
|
-
}
|
|
2832
|
-
}, $scope7_id, "i", 1, 1, 1, 0, 1);
|
|
2833
|
-
_html(`</span>${_el_resume($scope7_id, "c")}`);
|
|
2834
|
-
_if(() => {
|
|
2835
|
-
if (localDifferIds.has(repo.id)) {
|
|
2836
|
-
const $scope8_id = _scope_id();
|
|
2837
|
-
_html(`<span${_attr_class("_p")}${_attr("title", `checked out ${repo.branch} ${repo.localHead}`)}>local <!>${_escape(shortBranch(repo.branch, input.workspaceBranch || "", input.workspaceName || ""))}${_el_resume($scope8_id, "b")}</span>${_el_resume($scope8_id, "a")}`);
|
|
2838
|
-
_subscribe($for_content__repo_localHead__closures, _subscribe($for_content__repo_branch__closures, _subscribe($si__input_workspaceName && $input_workspaceName__closures, _subscribe($si__input_workspaceBranch && $input_workspaceBranch__closures, writeScope($scope8_id, {
|
|
2839
|
-
Cdp: $si__input_workspaceBranch && 3,
|
|
2840
|
-
Cdq: $si__input_workspaceName && 3,
|
|
2841
|
-
Caa: 3,
|
|
2842
|
-
Cab: 1
|
|
2843
|
-
})))));
|
|
2844
|
-
return 0;
|
|
2845
|
-
}
|
|
2846
|
-
}, $scope7_id, "j", 1, 1, 1, 0, 1);
|
|
2847
|
-
_html("</p>");
|
|
2848
|
-
_subscribe($for_content__repo_branch__closures, _subscribe($for_content__repo_pr_baseRefName__closures, _subscribe($for_content__repo_baseSha__closures, _subscribe($for_content__repo_base__closures, _subscribe($for_content__repo_head__closures, _subscribe($for_content__repo_pr_headRefName__closures, _subscribe($for_content__repo_pr__closures, _subscribe($for_content__repo_id__closures, _subscribe($localDifferIds__closures, _subscribe($si__input_workspaceName && $input_workspaceName__closures, _subscribe($si__input_workspaceBranch && $input_workspaceBranch__closures, writeScope($scope7_id, {
|
|
2849
|
-
p: compare$2?.topic,
|
|
2850
|
-
Cdp: $si__input_workspaceBranch && 2,
|
|
2851
|
-
Cdq: $si__input_workspaceName && 2,
|
|
2852
|
-
Ced: 1,
|
|
2853
|
-
Cy: 1,
|
|
2854
|
-
Cz: 1,
|
|
2855
|
-
Ca4: 1,
|
|
2856
|
-
Ca5: 1,
|
|
2857
|
-
Ca6: 1,
|
|
2858
|
-
Ca7: 1,
|
|
2859
|
-
Ca9: 1,
|
|
2860
|
-
Caa: 2
|
|
2861
|
-
}))))))))))));
|
|
2862
|
-
return 1;
|
|
2863
|
-
}
|
|
2864
|
-
}, $scope4_id, "b", 1, 1, 1, 0, 1);
|
|
2865
|
-
_if(() => {
|
|
2866
|
-
if (repoList.length === 1 || !collapsedRepos.has(repo.id) || openedRepos.has(repo.id)) {
|
|
2867
|
-
const $scope9_id = _scope_id();
|
|
2868
|
-
const $show = repoList.length === 1 || !collapsedRepos.has(repo.id);
|
|
2869
|
-
_show_start($show);
|
|
2870
|
-
_html(`<div${_attr_class("_eO")}>`);
|
|
2871
|
-
_for_of(repoFiles, (file$1) => {
|
|
2872
|
-
const $scope10_id = _scope_id();
|
|
2873
|
-
const $for_content2__file__closures = /* @__PURE__ */ new Set();
|
|
2874
|
-
const $for_content2__file_key__closures = /* @__PURE__ */ new Set();
|
|
2875
|
-
const $for_content2__fileComments__closures = /* @__PURE__ */ new Set();
|
|
2876
|
-
const fileComments = commentsByFile.get(file$1.key) || [];
|
|
2877
|
-
let expanded = true;
|
|
2878
|
-
_html(`<details${_attr_details_or_dialog_open($scope10_id, "a", expanded)}${_attr_class(["_eP", findState.hit?.key === file$1.key && "_en"])}${_attr("data-key", file$1.key)}${_attr("hidden", !shownKeySet.has(file$1.key))}><summary${_attr_class("_eR")}><span${_attr_class("_eW")}${_attr("data-status", file$1.status)}>${_escape(file$1.status)}${_el_resume($scope10_id, "d")}</span>${_el_resume($scope10_id, "c")}<span${_attr_class(["_eX", findState.hit?.key === file$1.key && findState.hit.line < 1 && "_eo"])}${_attr("title", file$1.path)}><bdi>${_escape(file$1.path)}${_el_resume($scope10_id, "f")}</bdi></span>${_el_resume($scope10_id, "e")}`);
|
|
2879
|
-
_if(() => {
|
|
2880
|
-
if (fileComments.length) {
|
|
2881
|
-
const $scope38_id = _scope_id();
|
|
2882
|
-
_html(`<span${_attr_class("_p")}>💬 <!>${_escape(fileComments.length)}${_el_resume($scope38_id, "b")}</span>`);
|
|
2883
|
-
writeScope($scope38_id, {});
|
|
2884
|
-
return 0;
|
|
2885
|
-
}
|
|
2886
|
-
}, $scope10_id, "g", 1, 1, 1, 0, 1);
|
|
2887
|
-
_html("</summary>");
|
|
2888
|
-
_if(() => {
|
|
2889
|
-
if (file$1.binary) {
|
|
2890
|
-
const $scope39_id = _scope_id();
|
|
2891
|
-
_html(`<p${_attr_class(["_eZ", "_eQ"])}>binary file</p>`);
|
|
2892
|
-
writeScope($scope39_id, {});
|
|
2893
|
-
return 0;
|
|
2894
|
-
} else if (file$1.tooLarge) {
|
|
2895
|
-
const $scope40_id = _scope_id();
|
|
2896
|
-
_html(`<p${_attr_class(["_eZ", "_eQ"])}>file too large to display</p>`);
|
|
2897
|
-
writeScope($scope40_id, {});
|
|
2898
|
-
return 1;
|
|
2899
|
-
} else if (file$1.old == null && file$1.new == null) {
|
|
2900
|
-
const $scope41_id = _scope_id();
|
|
2901
|
-
_html(`<p${_attr_class(["_eZ", "_eQ"])}>file could not be read</p>`);
|
|
2902
|
-
writeScope($scope41_id, {});
|
|
2903
|
-
return 2;
|
|
2904
|
-
} else {
|
|
2905
|
-
const $scope11_id = _scope_id();
|
|
2906
|
-
let near = false;
|
|
2907
|
-
const forceNear = findState.hit?.key === file$1.key;
|
|
2908
|
-
_if(() => {
|
|
2909
|
-
if (!forceNear) {
|
|
2910
|
-
const $scope25_id = _scope_id();
|
|
2911
|
-
_html(`<div${_attr_class(["_eS", "_eQ"])}></div>${_el_resume($scope25_id, "a")}`);
|
|
2912
|
-
_script($scope25_id, "j45");
|
|
2913
|
-
writeScope($scope25_id, {});
|
|
2914
|
-
return 0;
|
|
2915
|
-
} else {
|
|
2916
|
-
const $scope12_id = _scope_id();
|
|
2917
|
-
const $childScope9 = _peek_scope_id();
|
|
2918
|
-
diff_file_default({
|
|
2919
|
-
class: "_eQ",
|
|
2920
|
-
file: file$1,
|
|
2921
|
-
comments: fileComments,
|
|
2922
|
-
draft: draft && draft.key === file$1.key ? draft : null,
|
|
2923
|
-
sessions: input.sessions || [],
|
|
2924
|
-
onSelect: _resume(function(range) {
|
|
2925
|
-
draft = {
|
|
2926
|
-
key: file$1.key,
|
|
2927
|
-
side: range.side || "additions",
|
|
2928
|
-
start: Math.min(range.start, range.end),
|
|
2929
|
-
end: Math.max(range.start, range.end)
|
|
2930
|
-
};
|
|
2931
|
-
}, "j26", $scope12_id),
|
|
2932
|
-
onSaveComment: _resume(function(text) {
|
|
2933
|
-
saveComment(file$1, text);
|
|
2934
|
-
}, "j27", $scope12_id),
|
|
2935
|
-
onSendDraft: _resume(function(text, sessionId) {
|
|
2936
|
-
sendDraftComment(file$1, text, sessionId);
|
|
2937
|
-
}, "j28", $scope12_id),
|
|
2938
|
-
onCancelDraft: _resume(function() {
|
|
2939
|
-
draft = null;
|
|
2940
|
-
}, "j29", $scope12_id),
|
|
2941
|
-
onDeleteComment: _resume(function(id) {
|
|
2942
|
-
removeComment(id);
|
|
2943
|
-
}, "j30", $scope12_id),
|
|
2944
|
-
onSendComment: _resume(function(id, sessionId) {
|
|
2945
|
-
sendOneComment(id, sessionId);
|
|
2946
|
-
}, "j31", $scope12_id),
|
|
2947
|
-
onError: _resume(function(message) {
|
|
2948
|
-
error = message;
|
|
2949
|
-
}, "j32", $scope12_id)
|
|
2950
|
-
});
|
|
2951
|
-
_subscribe($for_content2__fileComments__closures, _subscribe($for_content2__file_key__closures, _subscribe($for_content2__file__closures, _subscribe($sendOneComment2__closures, _subscribe($sendDraftComment2__closures, _subscribe($removeComment2__closures, _subscribe($saveComment2__closures, _subscribe($draft__closures, _subscribe($si__input_sessions && $input_sessions__closures, writeScope($scope12_id, { a: _existing_scope($childScope9) }))))))))));
|
|
2952
|
-
return 1;
|
|
2953
|
-
}
|
|
2954
|
-
}, $scope11_id, "a", 1, 1, 1, 0, 1);
|
|
2955
|
-
_subscribe($findState_hit_key__closures, writeScope($scope11_id, {
|
|
2956
|
-
b: near,
|
|
2957
|
-
c: forceNear,
|
|
2958
|
-
Cdy: 1
|
|
2959
|
-
}));
|
|
2960
|
-
return 3;
|
|
2961
|
-
}
|
|
2962
|
-
}, $scope10_id, "h");
|
|
2963
|
-
_html(`</details>${_el_resume($scope10_id, "a")}`);
|
|
2964
|
-
_script($scope10_id, "j46");
|
|
2965
|
-
_subscribe($commentsByFile__closures, _subscribe($shownKeySet__closures, _subscribe($findState_hit_line__closures, _subscribe($findState_hit_key__closures, writeScope($scope10_id, {
|
|
2966
|
-
j: file$1,
|
|
2967
|
-
k: file$1?.key,
|
|
2968
|
-
r: file$1?.binary,
|
|
2969
|
-
s: file$1?.tooLarge,
|
|
2970
|
-
t: file$1?.old,
|
|
2971
|
-
u: file$1?.new,
|
|
2972
|
-
v: fileComments,
|
|
2973
|
-
w: fileComments.length,
|
|
2974
|
-
x: expanded,
|
|
2975
|
-
z: $for_content2__file__closures,
|
|
2976
|
-
a0: $for_content2__file_key__closures,
|
|
2977
|
-
a1: $for_content2__fileComments__closures
|
|
2978
|
-
})))));
|
|
2979
|
-
}, "key", $scope9_id, "b", 1, 1, 1, "</div>", 1);
|
|
2980
|
-
_show_end($scope9_id, "c", $show, 1, 1, 0, 1);
|
|
2981
|
-
_subscribe($for_content__repoFiles__closures, _subscribe($for_content__repo_id__closures, _subscribe($repoList_length__closures, _subscribe($collapsedRepos__closures, writeScope($scope9_id, {
|
|
2982
|
-
Ce1: 2,
|
|
2983
|
-
Ce6: 1,
|
|
2984
|
-
Cy: 2
|
|
2985
|
-
})))));
|
|
2986
|
-
return 0;
|
|
2987
|
-
}
|
|
2988
|
-
}, $scope4_id, "c");
|
|
2989
|
-
_html(`</section>${_el_resume($scope4_id, "a")}`);
|
|
2990
|
-
_subscribe($repoList_length__closures, _subscribe($openedRepos__closures, _subscribe($collapsedRepos__closures, _subscribe($findState_hit_repo__closures, writeScope($scope4_id, {})))));
|
|
3160
|
+
_set_serialize_reason(1);
|
|
3161
|
+
const $childScope5 = _peek_scope_id();
|
|
3162
|
+
review_section_default({
|
|
3163
|
+
repo,
|
|
3164
|
+
files: repoFiles,
|
|
3165
|
+
shownKeys: shownKeySet,
|
|
3166
|
+
collapsible: repoList.length > 1,
|
|
3167
|
+
collapsed: collapsedRepos.has(repo.id),
|
|
3168
|
+
expanding: expandingRepos.has(repo.id),
|
|
3169
|
+
opened: openedRepos.has(repo.id),
|
|
3170
|
+
onToggle: _resume(function() {
|
|
3171
|
+
toggleSection(repo.id);
|
|
3172
|
+
}, "j30", $scope4_id),
|
|
3173
|
+
workspaceBranch: input.workspaceBranch || "",
|
|
3174
|
+
workspaceName: input.workspaceName || "",
|
|
3175
|
+
localDiffers: localDifferIds.has(repo.id),
|
|
3176
|
+
onlyNew,
|
|
3177
|
+
onToggleNew: _resume(function() {
|
|
3178
|
+
onlyNew = !onlyNew;
|
|
3179
|
+
}, "j31", $scope4_id),
|
|
3180
|
+
onReload: reload,
|
|
3181
|
+
loading,
|
|
3182
|
+
findHit: findState.hit,
|
|
3183
|
+
commentsByFile,
|
|
3184
|
+
draft,
|
|
3185
|
+
sessions: input.sessions || [],
|
|
3186
|
+
observeNear,
|
|
3187
|
+
onSelect: _resume(function(file, range) {
|
|
3188
|
+
draft = {
|
|
3189
|
+
key: file.key,
|
|
3190
|
+
side: range.side || "additions",
|
|
3191
|
+
start: Math.min(range.start, range.end),
|
|
3192
|
+
end: Math.max(range.start, range.end)
|
|
3193
|
+
};
|
|
3194
|
+
}, "j32", $scope4_id),
|
|
3195
|
+
onSaveComment: _resume(function(file, text) {
|
|
3196
|
+
saveComment(file, text);
|
|
3197
|
+
}, "j33", $scope4_id),
|
|
3198
|
+
onSendDraft: _resume(function(file, text, sessionId) {
|
|
3199
|
+
sendDraftComment(file, text, sessionId);
|
|
3200
|
+
}, "j34", $scope4_id),
|
|
3201
|
+
onCancelDraft: _resume(function() {
|
|
3202
|
+
draft = null;
|
|
3203
|
+
}, "j35", $scope4_id),
|
|
3204
|
+
onDeleteComment: _resume(function(id) {
|
|
3205
|
+
removeComment(id);
|
|
3206
|
+
}, "j36", $scope4_id),
|
|
3207
|
+
onSendComment: _resume(function(id, sessionId) {
|
|
3208
|
+
sendOneComment(id, sessionId);
|
|
3209
|
+
}, "j37", $scope4_id),
|
|
3210
|
+
onError: _resume(function(message) {
|
|
3211
|
+
error = message;
|
|
3212
|
+
}, "j38", $scope4_id)
|
|
3213
|
+
});
|
|
3214
|
+
_subscribe($toggleSection2__closures, _subscribe($sendDraftComment2__closures, _subscribe($sendOneComment2__closures, _subscribe($removeComment2__closures, _subscribe($saveComment2__closures, _subscribe($localDifferIds__closures, _subscribe($commentsByFile__closures, _subscribe($shownKeySet__closures, _subscribe($repoList_length__closures, _subscribe($reload2__closures, _subscribe($expandingRepos__closures, _subscribe($openedRepos__closures, _subscribe($collapsedRepos__closures, _subscribe($findState_hit__closures, _subscribe($onlyNew__closures, _subscribe($loading__closures, _subscribe($draft__closures, _subscribe($si__input_workspaceName && $input_workspaceName__closures, _subscribe($si__input_workspaceBranch && $input_workspaceBranch__closures, _subscribe($si__input_sessions && $input_sessions__closures, writeScope($scope4_id, { a: _existing_scope($childScope5) })))))))))))))))))))));
|
|
2991
3215
|
return 0;
|
|
2992
3216
|
}
|
|
2993
3217
|
}, $scope3_id, "a", 1, 1, 1, 0, 1);
|
|
2994
3218
|
writeScope($scope3_id, {
|
|
2995
|
-
|
|
2996
|
-
g:
|
|
2997
|
-
h: repo?.worktree,
|
|
2998
|
-
i: repo?.pr?.number,
|
|
2999
|
-
j: repo?.pr?.url,
|
|
3000
|
-
k: repo?.pr?.title,
|
|
3001
|
-
l: repo?.pr?.headRefName,
|
|
3002
|
-
m: repo?.head,
|
|
3003
|
-
n: repo?.base,
|
|
3004
|
-
o: repo?.baseSha,
|
|
3005
|
-
p: repo?.full_name,
|
|
3006
|
-
q: repo?.pr?.baseRefName,
|
|
3007
|
-
r: repo?.branch,
|
|
3008
|
-
s: repo?.localHead,
|
|
3009
|
-
t: repoFiles,
|
|
3010
|
-
u: repoFiles.length,
|
|
3011
|
-
x: shownInRepo.length,
|
|
3012
|
-
a1: $for_content__repo_pr_number__closures,
|
|
3013
|
-
a2: $for_content__repo_pr_url__closures,
|
|
3014
|
-
a3: $for_content__repo_pr_title__closures,
|
|
3015
|
-
a4: $for_content__repo_pr_headRefName__closures,
|
|
3016
|
-
a5: $for_content__repo_head__closures,
|
|
3017
|
-
a6: $for_content__repo_base__closures,
|
|
3018
|
-
a7: $for_content__repo_baseSha__closures,
|
|
3019
|
-
a8: $for_content__repo_full_name__closures,
|
|
3020
|
-
aa: $for_content__repo_branch__closures,
|
|
3021
|
-
ab: $for_content__repo_localHead__closures,
|
|
3022
|
-
y: $for_content__repo_id__closures,
|
|
3023
|
-
z: $for_content__repo_pr__closures,
|
|
3024
|
-
a0: $for_content__repo_worktree__closures,
|
|
3025
|
-
a9: $for_content__repo_pr_baseRefName__closures,
|
|
3026
|
-
ad: $for_content__repoFiles_length__closures,
|
|
3027
|
-
ae: $for_content__shownInRepo_length__closures,
|
|
3028
|
-
ac: $for_content__repoFiles__closures
|
|
3219
|
+
c: repo,
|
|
3220
|
+
g: repoFiles
|
|
3029
3221
|
});
|
|
3030
|
-
}, "id", $scope0_id, "
|
|
3031
|
-
_html(`</div>${_el_resume($scope0_id, "
|
|
3032
|
-
_set_serialize_reason(
|
|
3033
|
-
const $
|
|
3222
|
+
}, "id", $scope0_id, "a1");
|
|
3223
|
+
_html(`</div>${_el_resume($scope0_id, "w")}</div>`);
|
|
3224
|
+
_set_serialize_reason(128382);
|
|
3225
|
+
const $childScope6 = _peek_scope_id();
|
|
3034
3226
|
diff_tree_default({
|
|
3035
3227
|
open: treeOpen,
|
|
3036
3228
|
sections: treeSections,
|
|
3229
|
+
filter: fileFilter,
|
|
3230
|
+
filterChange: $filterChange,
|
|
3037
3231
|
collapsedRepos,
|
|
3038
3232
|
collapsedReposChange: _resume((_new_collapsedRepos) => {
|
|
3039
3233
|
collapsedRepos = _new_collapsedRepos;
|
|
3040
|
-
}, "
|
|
3234
|
+
}, "j39", $scope0_id),
|
|
3041
3235
|
openedRepos,
|
|
3042
3236
|
openedReposChange: _resume((_new_openedRepos) => {
|
|
3043
3237
|
openedRepos = _new_openedRepos;
|
|
3044
|
-
}, "
|
|
3238
|
+
}, "j40", $scope0_id),
|
|
3045
3239
|
commentKeys,
|
|
3046
|
-
|
|
3240
|
+
newKeys,
|
|
3241
|
+
workspaceId: input.workspaceId,
|
|
3242
|
+
scope: scope$1
|
|
3047
3243
|
});
|
|
3048
|
-
_set_serialize_reason(
|
|
3049
|
-
const $
|
|
3244
|
+
_set_serialize_reason(31486);
|
|
3245
|
+
const $childScope7 = _peek_scope_id();
|
|
3050
3246
|
diff_file_sheet_default({
|
|
3051
3247
|
open: fileSheet,
|
|
3052
3248
|
openChange: _resume((_new_fileSheet) => {
|
|
3053
3249
|
fileSheet = _new_fileSheet;
|
|
3054
|
-
}, "
|
|
3250
|
+
}, "j41", $scope0_id),
|
|
3055
3251
|
files: shownFiles,
|
|
3252
|
+
filter: fileFilter,
|
|
3253
|
+
filterChange: $filterChange,
|
|
3056
3254
|
commentKeys,
|
|
3255
|
+
newKeys,
|
|
3057
3256
|
total: allFiles.length,
|
|
3058
|
-
|
|
3257
|
+
workspaceId: input.workspaceId,
|
|
3258
|
+
scope: scope$1
|
|
3059
3259
|
});
|
|
3060
3260
|
_html("</div>");
|
|
3061
3261
|
_script($scope0_id, "j47");
|
|
@@ -3063,105 +3263,111 @@ var diff_view_default = _template("j", (input) => {
|
|
|
3063
3263
|
_script($scope0_id, "j49");
|
|
3064
3264
|
_script($scope0_id, "j50");
|
|
3065
3265
|
writeScope($scope0_id, {
|
|
3066
|
-
|
|
3067
|
-
|
|
3068
|
-
|
|
3069
|
-
|
|
3070
|
-
|
|
3071
|
-
|
|
3072
|
-
|
|
3073
|
-
|
|
3074
|
-
|
|
3075
|
-
|
|
3076
|
-
|
|
3077
|
-
|
|
3078
|
-
|
|
3079
|
-
|
|
3080
|
-
|
|
3081
|
-
|
|
3082
|
-
|
|
3083
|
-
|
|
3084
|
-
|
|
3085
|
-
|
|
3086
|
-
|
|
3087
|
-
|
|
3088
|
-
|
|
3089
|
-
|
|
3090
|
-
|
|
3091
|
-
|
|
3092
|
-
|
|
3093
|
-
|
|
3094
|
-
|
|
3095
|
-
|
|
3096
|
-
|
|
3097
|
-
|
|
3098
|
-
|
|
3099
|
-
|
|
3100
|
-
|
|
3101
|
-
|
|
3102
|
-
|
|
3103
|
-
|
|
3104
|
-
|
|
3105
|
-
|
|
3106
|
-
|
|
3107
|
-
|
|
3108
|
-
|
|
3109
|
-
|
|
3110
|
-
|
|
3111
|
-
|
|
3112
|
-
|
|
3113
|
-
|
|
3114
|
-
|
|
3115
|
-
|
|
3116
|
-
|
|
3266
|
+
a6: input.scope,
|
|
3267
|
+
a7: _serialize_if($scope0_reason, 2) && input.findOpen,
|
|
3268
|
+
a8: _serialize_if($scope0_reason, 1) && input.findOpenChange,
|
|
3269
|
+
aa: input.findTick,
|
|
3270
|
+
ac: input.onFileChange,
|
|
3271
|
+
ad: input.workspaceId,
|
|
3272
|
+
ae: input.focusPr,
|
|
3273
|
+
af: input.focusFile,
|
|
3274
|
+
ag: input.onScopeChange,
|
|
3275
|
+
ah: input.active,
|
|
3276
|
+
ai: input.focusNonce,
|
|
3277
|
+
aj: input.focusFileNonce,
|
|
3278
|
+
ak: input.onSent,
|
|
3279
|
+
am: input.sessions,
|
|
3280
|
+
an: input.workspaceBranch,
|
|
3281
|
+
ao: input.workspaceName,
|
|
3282
|
+
ap: repos,
|
|
3283
|
+
ar: comments,
|
|
3284
|
+
as: comments?.length,
|
|
3285
|
+
at: draft,
|
|
3286
|
+
au: error,
|
|
3287
|
+
av: loading,
|
|
3288
|
+
ax: fileFilter,
|
|
3289
|
+
az: onlyNew,
|
|
3290
|
+
b0: scope$1,
|
|
3291
|
+
b1: treeOpen,
|
|
3292
|
+
b3: findOpen,
|
|
3293
|
+
b5: findTick,
|
|
3294
|
+
b7: findFocusRef,
|
|
3295
|
+
ba: findState?.query,
|
|
3296
|
+
bc: findState?.hit,
|
|
3297
|
+
bd: findState?.hit?.key,
|
|
3298
|
+
be: collapsedRepos,
|
|
3299
|
+
bf: openedRepos,
|
|
3300
|
+
bg: expandingRepos,
|
|
3301
|
+
bj: nearBox.cbs,
|
|
3302
|
+
bk: nearBox.io,
|
|
3303
|
+
bl: nearBox.root,
|
|
3304
|
+
bn: observeNear,
|
|
3305
|
+
bo: pinToTop,
|
|
3306
|
+
bq: focusPrSection,
|
|
3307
|
+
br: openFile,
|
|
3308
|
+
bu: jumpTo,
|
|
3309
|
+
bw: headBox.sig,
|
|
3310
|
+
bx: headBox.timer,
|
|
3311
|
+
bz: loadBox.seq,
|
|
3312
|
+
c1: load,
|
|
3313
|
+
c4: setScope,
|
|
3314
|
+
c7: sendGate.busy,
|
|
3315
|
+
c9: loadReview,
|
|
3316
|
+
ca: reload,
|
|
3317
|
+
cc: reloadSoon,
|
|
3318
|
+
cd: markSeen,
|
|
3319
|
+
cf: repoList,
|
|
3320
|
+
cg: repoList.length,
|
|
3321
|
+
ch: allFiles,
|
|
3322
|
+
cj: allFiles?.length,
|
|
3323
|
+
ck: fileFiltered,
|
|
3117
3324
|
cl: findKeys,
|
|
3325
|
+
cp: shownFiles?.length,
|
|
3118
3326
|
cr: shownKeySet,
|
|
3119
|
-
|
|
3120
|
-
|
|
3121
|
-
cv: commentsByFile,
|
|
3327
|
+
ct: filesByRepo,
|
|
3328
|
+
cw: commentsByFile,
|
|
3122
3329
|
cz: localDifferIds,
|
|
3123
|
-
d0:
|
|
3124
|
-
|
|
3125
|
-
|
|
3126
|
-
|
|
3127
|
-
|
|
3128
|
-
d8:
|
|
3129
|
-
|
|
3130
|
-
|
|
3131
|
-
|
|
3132
|
-
|
|
3133
|
-
|
|
3134
|
-
|
|
3135
|
-
|
|
3136
|
-
|
|
3137
|
-
|
|
3138
|
-
|
|
3139
|
-
|
|
3140
|
-
|
|
3141
|
-
|
|
3142
|
-
|
|
3143
|
-
|
|
3144
|
-
|
|
3145
|
-
dp: $
|
|
3146
|
-
|
|
3147
|
-
|
|
3148
|
-
|
|
3149
|
-
|
|
3150
|
-
|
|
3151
|
-
|
|
3152
|
-
|
|
3153
|
-
|
|
3154
|
-
|
|
3155
|
-
|
|
3156
|
-
|
|
3157
|
-
|
|
3158
|
-
|
|
3159
|
-
|
|
3160
|
-
|
|
3161
|
-
|
|
3162
|
-
|
|
3163
|
-
|
|
3164
|
-
ad: _existing_scope($childScope11)
|
|
3330
|
+
d0: hasFiles,
|
|
3331
|
+
d1: fileWorktree,
|
|
3332
|
+
d2: anchorFor,
|
|
3333
|
+
d4: saveComment,
|
|
3334
|
+
d5: deleteRemote,
|
|
3335
|
+
d8: removeComment,
|
|
3336
|
+
d9: dispatch,
|
|
3337
|
+
dc: copyMarkdown,
|
|
3338
|
+
dd: sendTo,
|
|
3339
|
+
de: sendOneComment,
|
|
3340
|
+
df: sendDraftComment,
|
|
3341
|
+
dg: openFind,
|
|
3342
|
+
di: onFindState,
|
|
3343
|
+
dj: toggleSection,
|
|
3344
|
+
b4: input.findOpenChange || void 0,
|
|
3345
|
+
l: _existing_scope($childScope2),
|
|
3346
|
+
u: _existing_scope($childScope3),
|
|
3347
|
+
dq: $error__closures,
|
|
3348
|
+
du: $scope__closures,
|
|
3349
|
+
dl: $si__input_sessions && $input_sessions__closures,
|
|
3350
|
+
dm: $si__input_workspaceBranch && $input_workspaceBranch__closures,
|
|
3351
|
+
dn: $si__input_workspaceName && $input_workspaceName__closures,
|
|
3352
|
+
dp: $draft__closures,
|
|
3353
|
+
dr: $loading__closures,
|
|
3354
|
+
dt: $onlyNew__closures,
|
|
3355
|
+
dy: $findState_hit__closures,
|
|
3356
|
+
dz: $collapsedRepos__closures,
|
|
3357
|
+
e0: $openedRepos__closures,
|
|
3358
|
+
e1: $expandingRepos__closures,
|
|
3359
|
+
e3: $reload2__closures,
|
|
3360
|
+
e5: $repoList_length__closures,
|
|
3361
|
+
e7: $shownKeySet__closures,
|
|
3362
|
+
e9: $commentsByFile__closures,
|
|
3363
|
+
ea: $localDifferIds__closures,
|
|
3364
|
+
ec: $saveComment2__closures,
|
|
3365
|
+
ed: $removeComment2__closures,
|
|
3366
|
+
eg: $sendOneComment2__closures,
|
|
3367
|
+
eh: $sendDraftComment2__closures,
|
|
3368
|
+
ei: $toggleSection2__closures,
|
|
3369
|
+
a2: _existing_scope($childScope6),
|
|
3370
|
+
a3: _existing_scope($childScope7)
|
|
3165
3371
|
});
|
|
3166
3372
|
_resume_branch($scope0_id);
|
|
3167
3373
|
});
|