@dylanpiercey/work 0.0.57 → 0.0.59
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 +15 -38
- package/dist/{_DFLVEzHW.js → _BejZlkF2.js} +7 -2
- package/dist/{_FtnOihLp.js → _CBPKAw5M.js} +59 -59
- package/dist/_C_Ufy3TH.js +2 -0
- package/dist/{_w176gAgg.js → _DlRAzicn.js} +28 -5
- package/dist/index.mjs +380 -332
- package/dist/public/assets/{_BnarL5fN.js → _4C0UpFVx.js} +1 -1
- package/dist/public/assets/_4C0UpFVx.js.br +0 -0
- package/dist/public/assets/{_D-cnMUsr2.js → _9LzCBhS_2.js} +1 -1
- package/dist/public/assets/_9LzCBhS_2.js.br +0 -0
- package/dist/public/assets/{_D4j2b-Sq.js → _Aq6Y2T0v.js} +1 -1
- package/dist/public/assets/_Aq6Y2T0v.js.br +0 -0
- package/dist/public/assets/{_BtfQL6MC.js → _B01zAY-u.js} +1 -1
- package/dist/public/assets/_B01zAY-u.js.br +0 -0
- package/dist/public/assets/{_GFh_4VnR.js → _B9NTGug5.js} +1 -1
- package/dist/public/assets/_B9NTGug5.js.br +0 -0
- package/dist/public/assets/{_CQppsb6k2.js → _B9hkAC6z2.js} +1 -1
- package/dist/public/assets/_B9hkAC6z2.js.br +0 -0
- package/dist/public/assets/{_BFI_GEk72.js → _BBb3VfqT2.js} +1 -1
- package/dist/public/assets/_BBb3VfqT2.js.br +0 -0
- package/dist/public/assets/{_wc0iQVbg.js → _BEspmXDA.js} +1 -1
- package/dist/public/assets/_BEspmXDA.js.br +0 -0
- package/dist/public/assets/{_JaDTz4Zd.js → _BHVhtRKY.js} +1 -1
- package/dist/public/assets/_BHVhtRKY.js.br +0 -0
- package/dist/public/assets/{_DgPtL3nO2.js → _BJOUijGq2.js} +1 -1
- package/dist/public/assets/_BJOUijGq2.js.br +0 -0
- package/dist/public/assets/{_BeVJhIuF2.js → _BJb-9ysw2.js} +1 -1
- package/dist/public/assets/_BJb-9ysw2.js.br +0 -0
- package/dist/public/assets/{_DdxTeNA9.js → _BKeftndI.js} +1 -1
- package/dist/public/assets/_BKeftndI.js.br +0 -0
- package/dist/public/assets/{_DCOTsdST.js → _BLgHPwA3.js} +1 -1
- package/dist/public/assets/_BLgHPwA3.js.br +0 -0
- package/dist/public/assets/{_eYTm2vWj.js → _BNgrfL8o.js} +1 -1
- package/dist/public/assets/_BNgrfL8o.js.br +0 -0
- package/dist/public/assets/{_DHHUcj7y.js → _BVgS7NCP.js} +1 -1
- package/dist/public/assets/_BVgS7NCP.js.br +0 -0
- package/dist/public/assets/{_PDPd6X9w.js → _BZBtmMSn.js} +1 -1
- package/dist/public/assets/_BZBtmMSn.js.br +0 -0
- package/dist/public/assets/{__KJ088ly.js → _BZXMvrbw.js} +1 -1
- package/dist/public/assets/_BZXMvrbw.js.br +0 -0
- package/dist/public/assets/{_Ch0jJRpF2.js → _Bk7dXsZx2.js} +1 -1
- package/dist/public/assets/_Bk7dXsZx2.js.br +0 -0
- package/dist/public/assets/{_BwLUD1-V.js → _Bk7ftDUt.js} +1 -1
- package/dist/public/assets/_Bk7ftDUt.js.br +0 -0
- package/dist/public/assets/{_HaM1Jlk_.js → _BluNlEZv.js} +1 -1
- package/dist/public/assets/_BluNlEZv.js.br +0 -0
- package/dist/public/assets/{_Cb49FSPc.js → _BuYT8HKk.js} +1 -1
- package/dist/public/assets/_BuYT8HKk.js.br +0 -0
- package/dist/public/assets/{_BTSelz322.js → _Bub7buTu2.js} +1 -1
- package/dist/public/assets/_Bub7buTu2.js.br +0 -0
- package/dist/public/assets/{_CMh1B9b2.js → _ByRG5g91.js} +1 -1
- package/dist/public/assets/_ByRG5g91.js.br +0 -0
- package/dist/public/assets/{_T9SFwu6g.js → _C14R-b_v.js} +1 -1
- package/dist/public/assets/_C14R-b_v.js.br +0 -0
- package/dist/public/assets/{_DSCr8lsq.js → _C6IjtbVg.js} +1 -1
- package/dist/public/assets/_C6IjtbVg.js.br +0 -0
- package/dist/public/assets/{_DtPDIeZK2.js → _C7JJMpo42.js} +1 -1
- package/dist/public/assets/_C7JJMpo42.js.br +0 -0
- package/dist/public/assets/{_D2U5c8OX.js → _CA3tdsQv.js} +1 -1
- package/dist/public/assets/_CA3tdsQv.js.br +0 -0
- package/dist/public/assets/{_CV_YENib.js → _CBPJ4RVr.js} +1 -1
- package/dist/public/assets/_CBPJ4RVr.js.br +0 -0
- package/dist/public/assets/{_DoRfBKHD2.js → _CCafS5sw2.js} +1 -1
- package/dist/public/assets/_CCafS5sw2.js.br +0 -0
- package/dist/public/assets/{_1fi3_epC2.js → _CMvFdyIa2.js} +1 -1
- package/dist/public/assets/_CMvFdyIa2.js.br +0 -0
- package/dist/public/assets/{_DFb-bc2g.js → _CNcDdAH8.js} +1 -1
- package/dist/public/assets/_CNcDdAH8.js.br +0 -0
- package/dist/public/assets/{_fnxdmnrX2.js → _CYMo9MTE2.js} +1 -1
- package/dist/public/assets/_CYMo9MTE2.js.br +0 -0
- package/dist/public/assets/{_ynedISZP.js → _CYXUTd7l.js} +1 -1
- package/dist/public/assets/_CYXUTd7l.js.br +0 -0
- package/dist/public/assets/{_C0G6dH_3.js → _CZEgD1x7.js} +1 -1
- package/dist/public/assets/_CZEgD1x7.js.br +0 -0
- package/dist/public/assets/{_1wDweXVz.js → _CcuGGPVb.js} +1 -1
- package/dist/public/assets/_CcuGGPVb.js.br +0 -0
- package/dist/public/assets/{_C7Sxjw9-2.js → _Cebuufke2.js} +1 -1
- package/dist/public/assets/_Cebuufke2.js.br +0 -0
- package/dist/public/assets/{_CerTd-Ge.js → _CggqBYox.js} +1 -1
- package/dist/public/assets/_CggqBYox.js.br +0 -0
- package/dist/public/assets/{_we6oEKqn.js → _ChcMMi8_.js} +1 -1
- package/dist/public/assets/_ChcMMi8_.js.br +0 -0
- package/dist/public/assets/{_B9I0gYKr.js → _Chrwmafx.js} +1 -1
- package/dist/public/assets/_Chrwmafx.js.br +0 -0
- package/dist/public/assets/{_ChH_lxP0.js → _Cj4m0y5p.js} +1 -1
- package/dist/public/assets/_Cj4m0y5p.js.br +0 -0
- package/dist/public/assets/{_GL3cIFCF.js → _Ct2eXJFw.js} +1 -1
- package/dist/public/assets/_Ct2eXJFw.js.br +0 -0
- package/dist/public/assets/{_CEPbJDCZ2.js → _CufQkVCk2.js} +1 -1
- package/dist/public/assets/_CufQkVCk2.js.br +0 -0
- package/dist/public/assets/{_B_XtpOB4.js → _CuuU2kTd.js} +1 -1
- package/dist/public/assets/_CuuU2kTd.js.br +0 -0
- package/dist/public/assets/{_BqVZXi4B2.js → _CzHu5Yml2.js} +1 -1
- package/dist/public/assets/_CzHu5Yml2.js.br +0 -0
- package/dist/public/assets/{_C5ycl8bH.js → _CzmS5OWM.js} +1 -1
- package/dist/public/assets/_CzmS5OWM.js.br +0 -0
- package/dist/public/assets/{_BE7DCCdk.js → _D13rZRRa.js} +1 -1
- package/dist/public/assets/_D13rZRRa.js.br +0 -0
- package/dist/public/assets/{_BVgN-hoS2.js → _D2Mf1_R32.js} +1 -1
- package/dist/public/assets/_D2Mf1_R32.js.br +0 -0
- package/dist/public/assets/{_5Iu7-7Yu.js → _D2_tGg5T.js} +1 -1
- package/dist/public/assets/_D2_tGg5T.js.br +0 -0
- package/dist/public/assets/{_B2hrD7F7.js → _D2quHHcV.js} +1 -1
- package/dist/public/assets/_D2quHHcV.js.br +0 -0
- package/dist/public/assets/{_B2LynlWb2.js → _D7tlC7QS2.js} +1 -1
- package/dist/public/assets/_D7tlC7QS2.js.br +0 -0
- package/dist/public/assets/{_D6yFaFbX2.js → _DDsJiq8D2.js} +1 -1
- package/dist/public/assets/_DDsJiq8D2.js.br +0 -0
- package/dist/public/assets/{_Bwsljc8D.js → _DFVeM5NA.js} +1 -1
- package/dist/public/assets/_DFVeM5NA.js.br +0 -0
- package/dist/public/assets/{_cNK-MYFz.js → _DFrArZs9.js} +1 -1
- package/dist/public/assets/_DFrArZs9.js.br +0 -0
- package/dist/public/assets/{_MTTPoEES.js → _DGtjfukV.js} +1 -1
- package/dist/public/assets/_DGtjfukV.js.br +0 -0
- package/dist/public/assets/{_Dfp4rDzR.js → _DLfLpiZj.js} +1 -1
- package/dist/public/assets/{_9hZUx9rh2.js → _DN9XEtZz2.js} +1 -1
- package/dist/public/assets/{_BDAJLqcL.js → _DP-17N2s.js} +1 -1
- package/dist/public/assets/_DP-17N2s.js.br +0 -0
- package/dist/public/assets/{_6T4AyNhc.js → _DR0mwaFQ.js} +1 -1
- package/dist/public/assets/_DR0mwaFQ.js.br +0 -0
- package/dist/public/assets/{_CwTH8KQI.js → _DRahWkav.js} +1 -1
- package/dist/public/assets/_DRahWkav.js.br +0 -0
- package/dist/public/assets/{_Cdh1RpOT.js → _DY7iDxoP.js} +1 -1
- package/dist/public/assets/_DY7iDxoP.js.br +7 -0
- package/dist/public/assets/{_9MQkmzyB.js → _Deyb3rSm.js} +1 -1
- package/dist/public/assets/_Deyb3rSm.js.br +0 -0
- package/dist/public/assets/{_Dmu0qP4E2.js → _DgoS2wC12.js} +1 -1
- package/dist/public/assets/_DgoS2wC12.js.br +0 -0
- package/dist/public/assets/{_CFmJjroU.js → _Dj_tOoaj.js} +1 -1
- package/dist/public/assets/_Dj_tOoaj.js.br +0 -0
- package/dist/public/assets/{_DU8wr53F.js → _DtUxmPJy.js} +1 -1
- package/dist/public/assets/_DtUxmPJy.js.br +0 -0
- package/dist/public/assets/{_Cze8y5Dt.js → _Du2rfXEU.js} +1 -1
- package/dist/public/assets/_Du2rfXEU.js.br +0 -0
- package/dist/public/assets/{_jzPvuV0O.js → _DurjFcgk.js} +1 -1
- package/dist/public/assets/_DurjFcgk.js.br +0 -0
- package/dist/public/assets/{_ZYMh934D2.js → _DwFXsHPv2.js} +1 -1
- package/dist/public/assets/_DwFXsHPv2.js.br +0 -0
- package/dist/public/assets/{_CLNzU4Fu2.js → _HUnZTZzC2.js} +1 -1
- package/dist/public/assets/_HUnZTZzC2.js.br +0 -0
- package/dist/public/assets/{_Cyj2M_On2.js → _J2G4VP2o2.js} +1 -1
- package/dist/public/assets/_J2G4VP2o2.js.br +0 -0
- package/dist/public/assets/{_zkD43Znp.js → _J9_cXa3d.js} +44 -44
- package/dist/public/assets/_J9_cXa3d.js.br +0 -0
- package/dist/public/assets/{_Y34IZ-eE.js → _MtHFvhAh.js} +1 -1
- package/dist/public/assets/_MtHFvhAh.js.br +0 -0
- package/dist/public/assets/{_2eNsNaYO2.js → _SACEj-V12.js} +1 -1
- package/dist/public/assets/{_B4kzyFEk2.js → _Z8pHVZX12.js} +1 -1
- package/dist/public/assets/_Z8pHVZX12.js.br +0 -0
- package/dist/public/assets/{_8SEHbP04.js → _rAo0Ovch.js} +1 -1
- package/dist/public/assets/_rAo0Ovch.js.br +0 -0
- package/dist/public/assets/{_DrnyAK_d.js → _t6cd2p_I.js} +1 -1
- package/dist/public/assets/_t6cd2p_I.js.br +0 -0
- package/dist/public/assets/diff-view-Cj44T1y7.css +1 -0
- package/dist/public/assets/diff-view-Cj44T1y7.css.br +0 -0
- package/dist/public/assets/{index-CxFTRVMW.js → index-D9hzDezQ.js} +20 -20
- package/dist/public/assets/index-D9hzDezQ.js.br +0 -0
- package/dist/public/assets/{index-BVwzVz2z.css → index-DdvzAbHa.css} +1 -1
- package/dist/public/assets/index-DdvzAbHa.css.br +0 -0
- package/install.sh +2 -4
- package/lib/setup/install.d.mts +1 -0
- package/lib/setup/install.mjs +6 -0
- package/package.json +1 -1
- package/dist/_CpT5OTA0.js +0 -2
- package/dist/public/assets/_1fi3_epC2.js.br +0 -0
- package/dist/public/assets/_1wDweXVz.js.br +0 -0
- package/dist/public/assets/_5Iu7-7Yu.js.br +0 -0
- package/dist/public/assets/_6T4AyNhc.js.br +0 -0
- package/dist/public/assets/_8SEHbP04.js.br +0 -0
- package/dist/public/assets/_9MQkmzyB.js.br +0 -0
- package/dist/public/assets/_B2LynlWb2.js.br +0 -0
- package/dist/public/assets/_B2hrD7F7.js.br +0 -0
- package/dist/public/assets/_B4kzyFEk2.js.br +0 -0
- package/dist/public/assets/_B9I0gYKr.js.br +0 -0
- package/dist/public/assets/_BDAJLqcL.js.br +0 -0
- package/dist/public/assets/_BE7DCCdk.js.br +0 -0
- package/dist/public/assets/_BFI_GEk72.js.br +0 -0
- package/dist/public/assets/_BTSelz322.js.br +0 -0
- package/dist/public/assets/_BVgN-hoS2.js.br +0 -0
- package/dist/public/assets/_B_XtpOB4.js.br +0 -0
- package/dist/public/assets/_BeVJhIuF2.js.br +0 -0
- package/dist/public/assets/_BnarL5fN.js.br +0 -0
- package/dist/public/assets/_BqVZXi4B2.js.br +0 -0
- package/dist/public/assets/_BtfQL6MC.js.br +0 -0
- package/dist/public/assets/_BwLUD1-V.js.br +0 -0
- package/dist/public/assets/_Bwsljc8D.js.br +0 -0
- package/dist/public/assets/_C0G6dH_3.js.br +0 -0
- package/dist/public/assets/_C5ycl8bH.js.br +0 -0
- package/dist/public/assets/_C7Sxjw9-2.js.br +0 -0
- package/dist/public/assets/_CEPbJDCZ2.js.br +0 -0
- package/dist/public/assets/_CFmJjroU.js.br +0 -0
- package/dist/public/assets/_CLNzU4Fu2.js.br +0 -0
- package/dist/public/assets/_CMh1B9b2.js.br +0 -0
- package/dist/public/assets/_CQppsb6k2.js.br +0 -0
- package/dist/public/assets/_CV_YENib.js.br +0 -0
- package/dist/public/assets/_Cb49FSPc.js.br +0 -0
- package/dist/public/assets/_Cdh1RpOT.js.br +0 -0
- package/dist/public/assets/_CerTd-Ge.js.br +0 -0
- package/dist/public/assets/_Ch0jJRpF2.js.br +0 -0
- package/dist/public/assets/_ChH_lxP0.js.br +0 -0
- package/dist/public/assets/_CwTH8KQI.js.br +0 -0
- package/dist/public/assets/_Cyj2M_On2.js.br +0 -0
- package/dist/public/assets/_Cze8y5Dt.js.br +0 -0
- package/dist/public/assets/_D-cnMUsr2.js.br +0 -0
- package/dist/public/assets/_D2U5c8OX.js.br +0 -0
- package/dist/public/assets/_D4j2b-Sq.js.br +0 -0
- package/dist/public/assets/_D6yFaFbX2.js.br +0 -0
- package/dist/public/assets/_DCOTsdST.js.br +0 -0
- package/dist/public/assets/_DFb-bc2g.js.br +0 -0
- package/dist/public/assets/_DHHUcj7y.js.br +0 -0
- package/dist/public/assets/_DSCr8lsq.js.br +0 -0
- package/dist/public/assets/_DU8wr53F.js.br +0 -0
- package/dist/public/assets/_DdxTeNA9.js.br +0 -0
- package/dist/public/assets/_DgPtL3nO2.js.br +0 -0
- package/dist/public/assets/_Dmu0qP4E2.js.br +0 -0
- package/dist/public/assets/_DoRfBKHD2.js.br +0 -0
- package/dist/public/assets/_DrnyAK_d.js.br +0 -0
- package/dist/public/assets/_DtPDIeZK2.js.br +0 -0
- package/dist/public/assets/_GFh_4VnR.js.br +0 -0
- package/dist/public/assets/_GL3cIFCF.js.br +0 -0
- package/dist/public/assets/_HaM1Jlk_.js.br +0 -0
- package/dist/public/assets/_JaDTz4Zd.js.br +0 -0
- package/dist/public/assets/_MTTPoEES.js.br +0 -0
- package/dist/public/assets/_PDPd6X9w.js.br +0 -0
- package/dist/public/assets/_T9SFwu6g.js.br +0 -0
- package/dist/public/assets/_Y34IZ-eE.js.br +0 -0
- package/dist/public/assets/_ZYMh934D2.js.br +0 -0
- package/dist/public/assets/__KJ088ly.js.br +0 -0
- package/dist/public/assets/_cNK-MYFz.js.br +0 -0
- package/dist/public/assets/_eYTm2vWj.js.br +0 -0
- package/dist/public/assets/_fnxdmnrX2.js.br +0 -0
- package/dist/public/assets/_jzPvuV0O.js.br +0 -0
- package/dist/public/assets/_wc0iQVbg.js.br +0 -0
- package/dist/public/assets/_we6oEKqn.js.br +0 -0
- package/dist/public/assets/_ynedISZP.js.br +0 -0
- package/dist/public/assets/_zkD43Znp.js.br +0 -0
- package/dist/public/assets/diff-view-BmH-xWiy.css +0 -1
- package/dist/public/assets/diff-view-BmH-xWiy.css.br +0 -0
- package/dist/public/assets/index-BVwzVz2z.css.br +0 -0
- package/dist/public/assets/index-CxFTRVMW.js.br +0 -0
package/bin/work.mjs
CHANGED
|
@@ -21,9 +21,8 @@ import os from "node:os";
|
|
|
21
21
|
import path from "node:path";
|
|
22
22
|
import { fileURLToPath } from "node:url";
|
|
23
23
|
import { createRequire } from "node:module";
|
|
24
|
-
import readline from "node:readline/promises";
|
|
25
24
|
import { doctor, formatDoctor } from "../lib/setup/doctor.mjs";
|
|
26
|
-
import {
|
|
25
|
+
import { installTool } from "../lib/setup/install.mjs";
|
|
27
26
|
|
|
28
27
|
const pkgRoot = path.dirname(path.dirname(fileURLToPath(import.meta.url)));
|
|
29
28
|
const pkg = JSON.parse(fs.readFileSync(path.join(pkgRoot, "package.json"), "utf8"));
|
|
@@ -290,7 +289,7 @@ function short(ms) {
|
|
|
290
289
|
}
|
|
291
290
|
|
|
292
291
|
async function setup() {
|
|
293
|
-
await fix(await doctor()
|
|
292
|
+
await fix(await doctor());
|
|
294
293
|
|
|
295
294
|
// One-shot cleanups between versions. Run them against the settings the
|
|
296
295
|
// service actually uses: migrate.mjs exits quietly when it finds no db, so
|
|
@@ -326,7 +325,7 @@ async function update() {
|
|
|
326
325
|
async function doctorCmd() {
|
|
327
326
|
let d = await doctor();
|
|
328
327
|
if (args.includes("--fix")) {
|
|
329
|
-
await fix(d
|
|
328
|
+
await fix(d);
|
|
330
329
|
d = await doctor();
|
|
331
330
|
}
|
|
332
331
|
if (args.includes("--json")) return console.log(JSON.stringify(d, null, 2));
|
|
@@ -336,11 +335,11 @@ async function doctorCmd() {
|
|
|
336
335
|
|
|
337
336
|
/**
|
|
338
337
|
* Bring the machine to "ready": required tools, then optional ones (each
|
|
339
|
-
* non-fatal)
|
|
340
|
-
*
|
|
338
|
+
* non-fatal). GitHub sign-in and agent CLIs are app jobs (Settings) — this
|
|
339
|
+
* never prompts, so `--yes` and interactive runs behave the same. Re-runs are idempotent
|
|
341
340
|
* because everything is keyed off what doctor() found missing.
|
|
342
341
|
*/
|
|
343
|
-
async function fix(d
|
|
342
|
+
async function fix(d) {
|
|
344
343
|
for (const tool of d.tools.filter((t) => !t.installed)) {
|
|
345
344
|
if (!tool.installable) {
|
|
346
345
|
if (tool.required) die(`${tool.label} not found — install it and re-run (the curl installer does this automatically)`);
|
|
@@ -354,38 +353,16 @@ async function fix(d, { agents = "prompt" } = {}) {
|
|
|
354
353
|
warn(`${tool.label} install failed (non-fatal)`);
|
|
355
354
|
}
|
|
356
355
|
}
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
warn("gh is not authenticated — run `gh auth login` later");
|
|
363
|
-
} else {
|
|
364
|
-
log("signing in to GitHub (PRs/clones) — open https://github.com/login/device in any browser and enter the code below; no browser is launched here");
|
|
365
|
-
await authGithub("github.com", { interactive: true }).catch((err) => warn(err.message));
|
|
366
|
-
}
|
|
356
|
+
// GitHub sign-in is a UI job (Settings → GitHub runs gh's device flow and
|
|
357
|
+
// wires git credentials); here we only say so. GH_TOKEN still works headless.
|
|
358
|
+
if (!d.github.some((h) => h.authed)) {
|
|
359
|
+
if (process.env.GH_TOKEN || process.env.GITHUB_TOKEN) log("gh will use GH_TOKEN from the environment");
|
|
360
|
+
else warn("GitHub is not signed in — open the app and use Settings → GitHub → Sign in");
|
|
367
361
|
}
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
if (!go) {
|
|
373
|
-
const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
|
|
374
|
-
const ans = await rl.question(`Install coding agent CLIs (${names})? [y/N] `).catch(() => "");
|
|
375
|
-
rl.close();
|
|
376
|
-
go = /^y/i.test(ans.trim());
|
|
377
|
-
}
|
|
378
|
-
if (go) {
|
|
379
|
-
for (const a of missingAgents) {
|
|
380
|
-
try {
|
|
381
|
-
await installAgent(a.id, { log: (l) => console.log(` ${l}`) });
|
|
382
|
-
} catch (err) {
|
|
383
|
-
warn(`${a.label} install failed (non-fatal): ${err.message}`);
|
|
384
|
-
}
|
|
385
|
-
}
|
|
386
|
-
}
|
|
387
|
-
} else if (!d.agents.some((a) => a.installed)) {
|
|
388
|
-
warn(`no coding agent CLI found — install one later from Settings or: work doctor --fix`);
|
|
362
|
+
// Agent CLIs are installed from the app (Settings → Agents), where each
|
|
363
|
+
// one is a click and the picker updates immediately — no prompt here.
|
|
364
|
+
if (!d.agents.some((a) => a.installed)) {
|
|
365
|
+
warn("no coding agent CLI found — install one from Settings → Agents in the app");
|
|
389
366
|
}
|
|
390
367
|
}
|
|
391
368
|
|
|
@@ -45,7 +45,12 @@ async function run$1(cmd, args, cwd, env) {
|
|
|
45
45
|
});
|
|
46
46
|
return stdout.trim();
|
|
47
47
|
}
|
|
48
|
-
|
|
48
|
+
/** Never let git wait on a terminal it doesn't have — a missing credential
|
|
49
|
+
* fails with a message instead of hanging the clone forever. */
|
|
50
|
+
var git = (args, cwd) => run$1("git", args, cwd, {
|
|
51
|
+
...process.env,
|
|
52
|
+
GIT_TERMINAL_PROMPT: "0"
|
|
53
|
+
});
|
|
49
54
|
/** `gh` against one GitHub host — `GH_HOST` picks the stored credential. */
|
|
50
55
|
var gh = (args, host) => run$1("gh", args, void 0, host ? {
|
|
51
56
|
...process.env,
|
|
@@ -6429,7 +6434,7 @@ function publishChange(sessionId) {
|
|
|
6429
6434
|
const row = get("SELECT workspace_id FROM sessions WHERE id = ?", sessionId);
|
|
6430
6435
|
if (row?.workspace_id) {
|
|
6431
6436
|
const workspaceId = row.workspace_id;
|
|
6432
|
-
import("./
|
|
6437
|
+
import("./_C_Ufy3TH.js").then((m) => m.notifySessionsChanged(workspaceId));
|
|
6433
6438
|
return;
|
|
6434
6439
|
}
|
|
6435
6440
|
publish("sessions.changed");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as
|
|
1
|
+
import { A as tone, Ct as attrTag, F as _attr_input_value, I as _attr_option_value, J as _el_resume, K as _el, M as _attr, N as _attr_class, P as _attr_details_or_dialog_open, Q as _for_of, R as _attr_select_value, T as iconBtnRow, Tt as writeScope, W as _content_resume, X as _existing_scope, Y as _escape, _t as _subscribe, a as diffTreeOpen, at as _resume, ct as _scope_reason, dt as _sep, f as icon_back_default, ft as _serialize_guard, gt as _show_start, ht as _show_end, i as icon_sidebar_default, it as _peek_scope_id, lt as _scope_with_id, mt as _set_serialize_reason, n as findIconBtn, o as diffUncommitted, ot as _resume_branch, p as icon_refresh_default, pt as _serialize_if, q as _el_read_error, r as findInput, rt as _if, st as _scope_id, t as icon_search_default, tt as _html, u as fuzzy, ut as _script, v as toast_default, vt as _template, w as iconBtnLg, y as repoLabel, z as _attr_style } from "./_DlRAzicn.js";
|
|
2
2
|
//#region src/client/clipboard.ts
|
|
3
3
|
/** Copy text to the clipboard. `navigator.clipboard` needs a secure
|
|
4
4
|
* context — absent over plain-http LAN origins — so fall back to a hidden
|
|
@@ -260,10 +260,10 @@ function treeRows(files) {
|
|
|
260
260
|
walk(root, 0, "");
|
|
261
261
|
return rows;
|
|
262
262
|
}
|
|
263
|
-
var treeToggle = "
|
|
264
|
-
var repoWorktree = "
|
|
265
|
-
var repoTitle = "
|
|
266
|
-
var fileFilter = "
|
|
263
|
+
var treeToggle = "_dH _R _d";
|
|
264
|
+
var repoWorktree = "_d_ _r";
|
|
265
|
+
var repoTitle = "_eb _q";
|
|
266
|
+
var fileFilter = "_eU _f";
|
|
267
267
|
//#endregion
|
|
268
268
|
//#region src/tags/file-filter.marko
|
|
269
269
|
var file_filter_default = _template("j", (input) => {
|
|
@@ -293,7 +293,7 @@ var file_filter_default = _template("j", (input) => {
|
|
|
293
293
|
pending = v;
|
|
294
294
|
box.timer = setTimeout(flush, 150);
|
|
295
295
|
}, "j2", $scope0_id);
|
|
296
|
-
_html(`<div${_attr_class("
|
|
296
|
+
_html(`<div${_attr_class("_eT")}><input${_attr_input_value($scope0_id, "b", draft, _resume(function(v) {
|
|
297
297
|
type(v);
|
|
298
298
|
}, "j0", $scope0_id))}${_attr_class(fileFilter)} type=search placeholder="Filter files…" aria-label="Filter files">${_el_resume($scope0_id, "b")}</div>`);
|
|
299
299
|
_script($scope0_id, "j3");
|
|
@@ -319,7 +319,7 @@ var diff_send_default = _template("g", (input) => {
|
|
|
319
319
|
let sendTarget = null;
|
|
320
320
|
const sessions = input.sessions || [];
|
|
321
321
|
const sendPick = sessions.some((s) => s.id === sendTarget) ? sendTarget : sessions[0]?.id ?? null;
|
|
322
|
-
_html(`<span${_attr_class("
|
|
322
|
+
_html(`<span${_attr_class("_e8")}><button type=button${_attr_class("_i")} title="Copy comments as markdown">Copy${_el_resume($scope0_id, "c")}</button>${_el_resume($scope0_id, "b")}`);
|
|
323
323
|
_if(() => {
|
|
324
324
|
if (sessions.length === 1) {
|
|
325
325
|
const $scope1_id = _scope_id();
|
|
@@ -329,11 +329,11 @@ var diff_send_default = _template("g", (input) => {
|
|
|
329
329
|
return 0;
|
|
330
330
|
} else if (sessions.length) {
|
|
331
331
|
const $scope2_id = _scope_id();
|
|
332
|
-
_html(`<span${_attr_class("
|
|
332
|
+
_html(`<span${_attr_class("_e9")}><button type=button${_attr_class(["_j", "_e_"])}${_attr("disabled", sending)}>Send to${_el_resume($scope2_id, "c")}</button>${_el_resume($scope2_id, "b")}`);
|
|
333
333
|
_attr_select_value($scope2_id, "d", sendTarget, _resume((_new_sendTarget) => {
|
|
334
334
|
sendTarget = _new_sendTarget;
|
|
335
335
|
}, "g0", $scope2_id), () => {
|
|
336
|
-
_html(`<select${_attr_class("
|
|
336
|
+
_html(`<select${_attr_class("_fa")} aria-label="Send comments to session"${_attr("disabled", sending)}>`);
|
|
337
337
|
_for_of(sessions, (s) => {
|
|
338
338
|
const $scope3_id = _scope_id();
|
|
339
339
|
_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,9 +1869,9 @@ var diff_find_default = _template("f", (input) => {
|
|
|
1869
1869
|
el.select();
|
|
1870
1870
|
}, 0);
|
|
1871
1871
|
}, "f5", $scope0_id);
|
|
1872
|
-
_html(`<div${_attr_class(["
|
|
1872
|
+
_html(`<div${_attr_class(["_eW", !open && "_eV"])} aria-hidden=${open ? "false" : "true"}><input${_attr_input_value($scope0_id, "b", query || "", _resume(function(v) {
|
|
1873
1873
|
type(v);
|
|
1874
|
-
}, "f0", $scope0_id))}${_attr_class(findInput)} type=search enterkeyhint=search autocomplete=off tabindex=${open ? "0" : "-1"} placeholder="Find in diffs" aria-label="Find in diffs">${_el_resume($scope0_id, "b")}<span${_attr_class("
|
|
1874
|
+
}, "f0", $scope0_id))}${_attr_class(findInput)} type=search enterkeyhint=search autocomplete=off tabindex=${open ? "0" : "-1"} placeholder="Find in diffs" aria-label="Find in diffs">${_el_resume($scope0_id, "b")}<span${_attr_class("_eZ")}>${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"}>×</button>${_el_resume($scope0_id, "g")}</div>${_el_resume($scope0_id, "a")}`);
|
|
1875
1875
|
_script($scope0_id, "f6");
|
|
1876
1876
|
_script($scope0_id, "f7");
|
|
1877
1877
|
_script($scope0_id, "f8");
|
|
@@ -1910,7 +1910,7 @@ var diff_file_default = _template("e", (input) => {
|
|
|
1910
1910
|
_scope_reason();
|
|
1911
1911
|
const $scope0_id = _scope_id();
|
|
1912
1912
|
_el($scope0_id, "e0");
|
|
1913
|
-
_html(`<div${_attr_class(["
|
|
1913
|
+
_html(`<div${_attr_class(["_fb", input.class])}></div>${_el_resume($scope0_id, "a")}`);
|
|
1914
1914
|
_script($scope0_id, "e1");
|
|
1915
1915
|
writeScope($scope0_id, {
|
|
1916
1916
|
e: input.file,
|
|
@@ -1939,10 +1939,10 @@ var diff_tree_default = _template("h", (input) => {
|
|
|
1939
1939
|
let openedRepos = input.openedRepos;
|
|
1940
1940
|
let collapsedDirs = /* @__PURE__ */ new Set();
|
|
1941
1941
|
const commentKeys = input.commentKeys || /* @__PURE__ */ new Set();
|
|
1942
|
-
_html(`<aside${_attr_class(["
|
|
1942
|
+
_html(`<aside${_attr_class(["_fp", { ["_fo"]: input.open === false }])}>`);
|
|
1943
1943
|
_for_of(input.sections, (section) => {
|
|
1944
1944
|
const $scope1_id = _scope_id();
|
|
1945
|
-
_html(`<div${_attr_class("
|
|
1945
|
+
_html(`<div${_attr_class("_fq")}><button type=button${_attr_class(["_fr", { ["_fo"]: collapsedRepos.has(section.id) }])}><span${_attr_class("_fw")}>${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")}`);
|
|
1946
1946
|
_if(() => {
|
|
1947
1947
|
if (!collapsedRepos.has(section.id) || openedRepos.has(section.id)) {
|
|
1948
1948
|
const $scope2_id = _scope_id();
|
|
@@ -1969,17 +1969,17 @@ var diff_tree_default = _template("h", (input) => {
|
|
|
1969
1969
|
_if(() => {
|
|
1970
1970
|
if (!hiddenByCollapse(row) && row.kind === "dir") {
|
|
1971
1971
|
const $scope5_id = _scope_id();
|
|
1972
|
-
_html(`<button type=button${_attr_class(["
|
|
1972
|
+
_html(`<button type=button${_attr_class(["_fs", { ["_fo"]: collapsedDirs.has(dirKey(row.path)) }])}${_attr("title", row.path)}${_attr_style(`padding-left:${.35 + row.depth * .75}rem`)}><span${_attr_class("_fw")}>${collapsedDirs.has(dirKey(row.path)) ? "▸" : "▾"}${_el_resume($scope5_id, "c")}</span>${_escape(row.label)}${_el_resume($scope5_id, "d", $sg__input_sections)}/</button>${_el_resume($scope5_id, "a")}`);
|
|
1973
1973
|
_script($scope5_id, "h3");
|
|
1974
1974
|
_subscribe($si__input_sections && $if_content__dirKey__closures, _subscribe($collapsedDirs__closures, writeScope($scope5_id, { Cv: 1 })));
|
|
1975
1975
|
return 0;
|
|
1976
1976
|
} else if (!hiddenByCollapse(row) && row.kind !== "dir") {
|
|
1977
1977
|
const $scope4_id = _scope_id();
|
|
1978
|
-
_html(`<button type=button${_attr_class("
|
|
1978
|
+
_html(`<button type=button${_attr_class("_ft")}${_attr("title", row.file.path)}${_attr_style(`padding-left:${.5 + row.depth * .75}rem`)}><span${_attr_class("_fx")}${_attr("data-status", row.file.status)}>${_escape(row.file.status)}${_el_resume($scope4_id, "c", $sg__input_sections)}</span>${_el_resume($scope4_id, "b", $sg__input_sections)}<span${_attr_class("_fu")}>${_escape(row.name)}${_el_resume($scope4_id, "e", $sg__input_sections)}</span>`);
|
|
1979
1979
|
_if(() => {
|
|
1980
1980
|
if (commentKeys.has(row.file.key)) {
|
|
1981
1981
|
const $scope6_id = _scope_id();
|
|
1982
|
-
_html(`<span${_attr_class("
|
|
1982
|
+
_html(`<span${_attr_class("_fv")}>💬</span>`);
|
|
1983
1983
|
_serialize_if($scope0_reason, 0) && writeScope($scope6_id, {});
|
|
1984
1984
|
return 0;
|
|
1985
1985
|
}
|
|
@@ -2050,10 +2050,10 @@ var diff_file_sheet_default = _template("d", (input) => {
|
|
|
2050
2050
|
_if(() => {
|
|
2051
2051
|
if (open) {
|
|
2052
2052
|
const $scope1_id = _scope_id();
|
|
2053
|
-
_html(`<div${_attr_class("
|
|
2053
|
+
_html(`<div${_attr_class("_fe")}></div>${_el_resume($scope1_id, "a")}<div${_attr_class("_ff")} role=dialog aria-label="Jump to file"><div${_attr_class("_fg")}><strong${_attr_class("_fd")}>Files</strong><span${_attr_class("_fh")}>${_escape(input.files.length)}${_el_resume($scope1_id, "f", _serialize_guard($scope0_reason, 6))}${_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, "_fc"])} title=Close aria-label=Close>×</button>${_el_resume($scope1_id, "h")}</div><div${_attr_class("_fi")}>`);
|
|
2054
2054
|
_for_of(input.files, (file) => {
|
|
2055
2055
|
const $scope2_id = _scope_id();
|
|
2056
|
-
_html(`<button type=button${_attr_class(["
|
|
2056
|
+
_html(`<button type=button${_attr_class(["_fj", "_r"])}><span${_attr_class("_fl")}${_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("_fk")}${_attr("title", file.key)}><bdi>${_escape(file.key)}${_el_resume($scope2_id, "e", $sg__input_files)}</bdi></span>${_el_resume($scope2_id, "d", $sg__input_files)}`);
|
|
2057
2057
|
_if(() => {
|
|
2058
2058
|
if (commentKeys.has(file.key)) {
|
|
2059
2059
|
const $scope3_id = _scope_id();
|
|
@@ -2447,11 +2447,11 @@ var diff_view_default = _template("i", (input) => {
|
|
|
2447
2447
|
revealSearchHit();
|
|
2448
2448
|
}, 0);
|
|
2449
2449
|
}, "i20", $scope0_id);
|
|
2450
|
-
_html(`<div${_attr_class("
|
|
2450
|
+
_html(`<div${_attr_class("_dE")}><div${_attr_class("_dJ")}><div${_attr_class(["_dK", { ["_dM"]: comments.length > 0 }])}><div${_attr_class("_dW")}>`);
|
|
2451
2451
|
_if(() => {
|
|
2452
2452
|
if (input.onExit) {
|
|
2453
2453
|
const $scope1_id = _scope_id();
|
|
2454
|
-
_html(`<button${_attr_class([iconBtnRow, "
|
|
2454
|
+
_html(`<button${_attr_class([iconBtnRow, "_dL"])} title="Back to terminal (Esc)">`);
|
|
2455
2455
|
icon_back_default({ size: 14 });
|
|
2456
2456
|
_html(`</button>${_el_resume($scope1_id, "a")}`);
|
|
2457
2457
|
_script($scope1_id, "i36");
|
|
@@ -2459,7 +2459,7 @@ var diff_view_default = _template("i", (input) => {
|
|
|
2459
2459
|
return 0;
|
|
2460
2460
|
}
|
|
2461
2461
|
}, $scope0_id, "e", $sg__input_onExit, $sg__input_onExit, 1, 0, 1);
|
|
2462
|
-
_html(`<h1${_attr_class("
|
|
2462
|
+
_html(`<h1${_attr_class("_dO")}>Review</h1><div${_attr_class("_dX")}>`);
|
|
2463
2463
|
_set_serialize_reason(2);
|
|
2464
2464
|
const $childScope = _peek_scope_id();
|
|
2465
2465
|
file_filter_default({
|
|
@@ -2468,16 +2468,16 @@ var diff_view_default = _template("i", (input) => {
|
|
|
2468
2468
|
fileFilter = _new_fileFilter;
|
|
2469
2469
|
}, "i21", $scope0_id)
|
|
2470
2470
|
});
|
|
2471
|
-
_html(`</div><div${_attr_class("
|
|
2471
|
+
_html(`</div><div${_attr_class("_dN")}><span${_attr_class("_dY")}>`);
|
|
2472
2472
|
_if(() => {
|
|
2473
2473
|
if (lineStats.additions || lineStats.deletions) {
|
|
2474
2474
|
const $scope27_id = _scope_id();
|
|
2475
|
-
_html(`<span${_attr_class("
|
|
2475
|
+
_html(`<span${_attr_class("_dZ")}>+<!>${_escape(lineStats.additions)}${_el_resume($scope27_id, "b")}</span><span${_attr_class("_d0")}>−<!>${_escape(lineStats.deletions)}${_el_resume($scope27_id, "d")}</span>`);
|
|
2476
2476
|
writeScope($scope27_id, {});
|
|
2477
2477
|
return 0;
|
|
2478
2478
|
} else {
|
|
2479
2479
|
const $scope29_id = _scope_id();
|
|
2480
|
-
_html(`<span${_attr_class("
|
|
2480
|
+
_html(`<span${_attr_class("_d1")}>0</span>`);
|
|
2481
2481
|
writeScope($scope29_id, {});
|
|
2482
2482
|
return 1;
|
|
2483
2483
|
}
|
|
@@ -2485,7 +2485,7 @@ var diff_view_default = _template("i", (input) => {
|
|
|
2485
2485
|
_if(() => {
|
|
2486
2486
|
if (comments.length) {
|
|
2487
2487
|
const $scope13_id = _scope_id();
|
|
2488
|
-
_html(`<span${_attr_class("
|
|
2488
|
+
_html(`<span${_attr_class("_d2")}>·</span>${_escape(comments.length)}${_el_resume($scope13_id, "b")} comment<!>${comments.length === 1 ? "" : "s"}${_el_resume($scope13_id, "c")}`);
|
|
2489
2489
|
writeScope($scope13_id, {});
|
|
2490
2490
|
return 0;
|
|
2491
2491
|
}
|
|
@@ -2505,23 +2505,23 @@ var diff_view_default = _template("i", (input) => {
|
|
|
2505
2505
|
return 0;
|
|
2506
2506
|
}
|
|
2507
2507
|
}, $scope0_id, "m", 1, 1, 1, 0, 1);
|
|
2508
|
-
_html(`</div><div${_attr_class("
|
|
2508
|
+
_html(`</div><div${_attr_class("_dI")}><button${_attr_class([
|
|
2509
2509
|
treeToggle,
|
|
2510
|
-
"
|
|
2511
|
-
{ ["
|
|
2510
|
+
"_dG",
|
|
2511
|
+
{ ["_dF"]: treeOpen }
|
|
2512
2512
|
])} title=${treeOpen ? "\"Hide file tree\"" : "\"Show file tree\""}>`);
|
|
2513
2513
|
icon_sidebar_default({ size: 14 });
|
|
2514
|
-
_html(`</button>${_el_resume($scope0_id, "o")}<button${_attr_class([iconBtnRow, "
|
|
2514
|
+
_html(`</button>${_el_resume($scope0_id, "o")}<button${_attr_class([iconBtnRow, "_dG"])} title="Refresh diff"${_attr("disabled", loading)}>`);
|
|
2515
2515
|
_set_serialize_reason(1);
|
|
2516
2516
|
const $childScope3 = _peek_scope_id();
|
|
2517
2517
|
icon_refresh_default({
|
|
2518
2518
|
size: 14,
|
|
2519
2519
|
class: loading && "_y"
|
|
2520
2520
|
});
|
|
2521
|
-
_html(`</button>${_el_resume($scope0_id, "q")}<button${_attr_class(["_i", "
|
|
2522
|
-
["
|
|
2521
|
+
_html(`</button>${_el_resume($scope0_id, "q")}<button${_attr_class(["_i", "_es"])} title="Jump to file">Files (<!>${_escape(shownFiles.length)}${_el_resume($scope0_id, "t")})</button>${_el_resume($scope0_id, "s")}<div${_attr_class("_d3")} role=group aria-label="Review scope"><button type=button${_attr_class(["_d5", { ["_d4"]: !uncommitted }])} aria-pressed=${!uncommitted ? "true" : "false"} title="Committed changes only — base…tip, no working-tree edits"${_attr("disabled", loading)}>Committed</button>${_el_resume($scope0_id, "v")}<button type=button${_attr_class(["_d5", { ["_d4"]: uncommitted }])} aria-pressed=${uncommitted ? "true" : "false"} title="Include uncommitted and untracked files in the working tree"${_attr("disabled", loading)}>Working tree</button>${_el_resume($scope0_id, "w")}</div><button type=button${_attr_class(["_d6", {
|
|
2522
|
+
["_d4"]: uncommitted,
|
|
2523
2523
|
["_V"]: uncommitted
|
|
2524
|
-
}])} aria-pressed=${uncommitted ? "true" : "false"} title=${uncommitted ? "\"Working tree (incl. uncommitted) — tap for committed only\"" : "\"Committed only — tap to include the working tree\""}${_attr("disabled", loading)}>${uncommitted ? "Working tree" : "Committed"}${_el_resume($scope0_id, "y")}</button>${_el_resume($scope0_id, "x")}<div${_attr_class(["
|
|
2524
|
+
}])} aria-pressed=${uncommitted ? "true" : "false"} title=${uncommitted ? "\"Working tree (incl. uncommitted) — tap for committed only\"" : "\"Committed only — tap to include the working tree\""}${_attr("disabled", loading)}>${uncommitted ? "Working tree" : "Committed"}${_el_resume($scope0_id, "y")}</button>${_el_resume($scope0_id, "x")}<div${_attr_class(["_dR", { ["_dQ"]: !findOpen }])}>`);
|
|
2525
2525
|
_set_serialize_reason(2);
|
|
2526
2526
|
const $childScope4 = _peek_scope_id();
|
|
2527
2527
|
diff_find_default({
|
|
@@ -2538,11 +2538,11 @@ var diff_view_default = _template("i", (input) => {
|
|
|
2538
2538
|
});
|
|
2539
2539
|
_html(`</div>${_el_resume($scope0_id, "z")}<button${_attr_class([
|
|
2540
2540
|
iconBtnRow,
|
|
2541
|
-
"
|
|
2542
|
-
"
|
|
2541
|
+
"_dP",
|
|
2542
|
+
"_dG"
|
|
2543
2543
|
])} title="Find in the review (⌘/Ctrl+F)" aria-label="Find in the review"${_attr("hidden", findOpen)}>`);
|
|
2544
2544
|
icon_search_default({ size: 14 });
|
|
2545
|
-
_html(`</button>${_el_resume($scope0_id, "a1")}</div></div>${_el_resume($scope0_id, "c")}<div${_attr_class("
|
|
2545
|
+
_html(`</button>${_el_resume($scope0_id, "a1")}</div></div>${_el_resume($scope0_id, "c")}<div${_attr_class("_dU")} data-diff-main>`);
|
|
2546
2546
|
_if(() => {
|
|
2547
2547
|
if (error) {
|
|
2548
2548
|
const $scope14_id = _scope_id();
|
|
@@ -2565,7 +2565,7 @@ var diff_view_default = _template("i", (input) => {
|
|
|
2565
2565
|
_if(() => {
|
|
2566
2566
|
if (!repos && loading) {
|
|
2567
2567
|
const $scope30_id = _scope_id();
|
|
2568
|
-
_html(`<p${_attr_class("
|
|
2568
|
+
_html(`<p${_attr_class("_bx")}>Loading diff…</p>`);
|
|
2569
2569
|
writeScope($scope30_id, {});
|
|
2570
2570
|
return 0;
|
|
2571
2571
|
}
|
|
@@ -2648,7 +2648,7 @@ var diff_view_default = _template("i", (input) => {
|
|
|
2648
2648
|
_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")}`);
|
|
2649
2649
|
writeScope($scope31_id, {});
|
|
2650
2650
|
}, "id", $scope28_id, "b");
|
|
2651
|
-
_html(` — this view has a newer tip than the PR page.</span><span${_attr_class(["_r", "
|
|
2651
|
+
_html(` — this view has a newer tip than the PR page.</span><span${_attr_class(["_r", "_dV"])}>`);
|
|
2652
2652
|
_for_of(driftRepos, (repo, i) => {
|
|
2653
2653
|
const $scope32_id = _scope_id();
|
|
2654
2654
|
_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")}`);
|
|
@@ -2700,12 +2700,12 @@ var diff_view_default = _template("i", (input) => {
|
|
|
2700
2700
|
_if(() => {
|
|
2701
2701
|
if (repos && !allFiles.length) {
|
|
2702
2702
|
const $scope26_id = _scope_id();
|
|
2703
|
-
_html(`<p${_attr_class("
|
|
2703
|
+
_html(`<p${_attr_class("_bx")}>${repoList.some((r) => r.pr) ? "No file changes on these PRs." : "No changes vs base."}${_el_resume($scope26_id, "b")}</p>`);
|
|
2704
2704
|
writeScope($scope26_id, {});
|
|
2705
2705
|
return 0;
|
|
2706
2706
|
} else if (repos && !shownFiles.length && !findState.hit) {
|
|
2707
2707
|
const $scope18_id = _scope_id();
|
|
2708
|
-
_html(`<p${_attr_class("
|
|
2708
|
+
_html(`<p${_attr_class("_bx")}>${findState.query.trim() ? "No matches in diffs." : `No files match "${_escape(`${fileFilter}`)}".`}${_el_resume($scope18_id, "b")}</p>`);
|
|
2709
2709
|
writeScope($scope18_id, {});
|
|
2710
2710
|
return 1;
|
|
2711
2711
|
}
|
|
@@ -2734,16 +2734,16 @@ var diff_view_default = _template("i", (input) => {
|
|
|
2734
2734
|
_if(() => {
|
|
2735
2735
|
if (repoFiles.length || repo.pr) {
|
|
2736
2736
|
const $scope4_id = _scope_id();
|
|
2737
|
-
_html(`<section${_attr_class("
|
|
2737
|
+
_html(`<section${_attr_class("_d7")}${repo.pr ? _attr("data-pr", `${repo.worktree}/${repo.pr.number}`) : ""}${_attr("hidden", !shownInRepo.length && !repo.pr && findState.hit?.repo !== repo.id)}>`);
|
|
2738
2738
|
_if(() => {
|
|
2739
2739
|
if (repoList.length > 1) {
|
|
2740
2740
|
const $scope5_id = _scope_id();
|
|
2741
2741
|
const repoCollapsed = collapsedRepos.has(repo.id);
|
|
2742
2742
|
const repoExpanding = expandingRepos.has(repo.id);
|
|
2743
|
-
_html(`<button type=button${_attr_class(["
|
|
2744
|
-
"
|
|
2745
|
-
!repoCollapsed && "
|
|
2746
|
-
repoExpanding && "
|
|
2743
|
+
_html(`<button type=button${_attr_class(["_d8", repoCollapsed && "_d9"])} aria-expanded=${!repoCollapsed ? "true" : "false"} aria-busy=${repoExpanding ? "true" : "false"}${repoCollapsed ? _attr("title", `Show ${shownInRepo.length || repoFiles.length} files`) : " title=\"Hide files\""}><span${_attr_class([
|
|
2744
|
+
"_en",
|
|
2745
|
+
!repoCollapsed && "_eo",
|
|
2746
|
+
repoExpanding && "_ep"
|
|
2747
2747
|
])} aria-hidden=true>${repoCollapsed ? "▸" : "▾"}${_el_resume($scope5_id, "c")}</span>${_el_resume($scope5_id, "b")}<span${_attr_class(repoWorktree)}>${_escape(repo.worktree)}${_el_resume($scope5_id, "e")}</span>`);
|
|
2748
2748
|
_if(() => {
|
|
2749
2749
|
if (repo.pr) {
|
|
@@ -2759,20 +2759,20 @@ var diff_view_default = _template("i", (input) => {
|
|
|
2759
2759
|
return 0;
|
|
2760
2760
|
} else {
|
|
2761
2761
|
const $scope34_id = _scope_id();
|
|
2762
|
-
_html(`<span${_attr_class(repoTitle)}>${_escape(repo.full_name)}${_el_resume($scope34_id, "b")}</span>`);
|
|
2762
|
+
_html(`<span${_attr_class(repoTitle)}>${_escape(repoLabel(repo.full_name))}${_el_resume($scope34_id, "b")}</span>`);
|
|
2763
2763
|
_subscribe($for_content__repo_full_name__closures, writeScope($scope34_id, {}));
|
|
2764
2764
|
return 1;
|
|
2765
2765
|
}
|
|
2766
2766
|
}, $scope5_id, "f");
|
|
2767
2767
|
const compare$1 = reviewCompareLabel(repo.pr?.baseRefName || repo.base, repo.pr?.headRefName || repo.branch, input.workspaceBranch || "", input.workspaceName || "");
|
|
2768
|
-
_html(`<span${_attr_class("
|
|
2768
|
+
_html(`<span${_attr_class("_ed")}${_attr("title", `${compare$1.title} · ${repo.head.slice(0, 7)}…${repo.baseSha.slice(0, 7)}`)}><span${_attr_class(["_C", "_ee"])}>${_escape(compare$1.base)}${_el_resume($scope5_id, "i")}</span><span${_attr_class(["_E", "_eg"])} aria-hidden=true>vs</span><span${_attr_class(["_C", "_ef"])}>${_escape(compare$1.head)}${_el_resume($scope5_id, "l")}</span>`);
|
|
2769
2769
|
_if(() => {
|
|
2770
2770
|
if (compare$1.topic) {
|
|
2771
2771
|
const $scope36_id = _scope_id();
|
|
2772
2772
|
_html(`<span${_attr_class([
|
|
2773
2773
|
"_C",
|
|
2774
2774
|
tone.accent,
|
|
2775
|
-
"
|
|
2775
|
+
"_eh"
|
|
2776
2776
|
])}>${_escape(compare$1.topic)}${_el_resume($scope36_id, "b")}</span>`);
|
|
2777
2777
|
writeScope($scope36_id, {});
|
|
2778
2778
|
return 0;
|
|
@@ -2791,7 +2791,7 @@ var diff_view_default = _template("i", (input) => {
|
|
|
2791
2791
|
return 0;
|
|
2792
2792
|
}
|
|
2793
2793
|
}, $scope5_id, "n", 1, 1, 1, 0, 1);
|
|
2794
|
-
_html(`<span${_attr_class("
|
|
2794
|
+
_html(`<span${_attr_class("_ea")}>${_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")}`);
|
|
2795
2795
|
_script($scope5_id, "i45");
|
|
2796
2796
|
_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, {
|
|
2797
2797
|
r: repoCollapsed,
|
|
@@ -2802,7 +2802,7 @@ var diff_view_default = _template("i", (input) => {
|
|
|
2802
2802
|
return 0;
|
|
2803
2803
|
} else {
|
|
2804
2804
|
const $scope7_id = _scope_id();
|
|
2805
|
-
_html(`<p${_attr_class("
|
|
2805
|
+
_html(`<p${_attr_class("_ec")}>`);
|
|
2806
2806
|
_if(() => {
|
|
2807
2807
|
if (repo.pr) {
|
|
2808
2808
|
const $scope35_id = _scope_id();
|
|
@@ -2820,14 +2820,14 @@ var diff_view_default = _template("i", (input) => {
|
|
|
2820
2820
|
}
|
|
2821
2821
|
}, $scope7_id, "b");
|
|
2822
2822
|
const compare$2 = reviewCompareLabel(repo.pr?.baseRefName || repo.base, repo.pr?.headRefName || repo.branch, input.workspaceBranch || "", input.workspaceName || "");
|
|
2823
|
-
_html(`<span${_attr_class("
|
|
2823
|
+
_html(`<span${_attr_class("_ed")}${_attr("title", `${compare$2.title} · ${repo.head.slice(0, 7)}…${repo.baseSha.slice(0, 7)}`)}><span${_attr_class(["_C", "_ee"])}>${_escape(compare$2.base)}${_el_resume($scope7_id, "e")}</span><span${_attr_class(["_E", "_eg"])} aria-hidden=true>vs</span><span${_attr_class(["_C", "_ef"])}>${_escape(compare$2.head)}${_el_resume($scope7_id, "h")}</span>`);
|
|
2824
2824
|
_if(() => {
|
|
2825
2825
|
if (compare$2.topic) {
|
|
2826
2826
|
const $scope37_id = _scope_id();
|
|
2827
2827
|
_html(`<span${_attr_class([
|
|
2828
2828
|
"_C",
|
|
2829
2829
|
tone.accent,
|
|
2830
|
-
"
|
|
2830
|
+
"_eh"
|
|
2831
2831
|
])}>${_escape(compare$2.topic)}${_el_resume($scope37_id, "b")}</span>`);
|
|
2832
2832
|
writeScope($scope37_id, {});
|
|
2833
2833
|
return 0;
|
|
@@ -2870,7 +2870,7 @@ var diff_view_default = _template("i", (input) => {
|
|
|
2870
2870
|
const $scope9_id = _scope_id();
|
|
2871
2871
|
const $show = repoList.length === 1 || !collapsedRepos.has(repo.id);
|
|
2872
2872
|
_show_start($show);
|
|
2873
|
-
_html(`<div${_attr_class("
|
|
2873
|
+
_html(`<div${_attr_class("_ei")}>`);
|
|
2874
2874
|
_for_of(repoFiles, (file$1) => {
|
|
2875
2875
|
const $scope10_id = _scope_id();
|
|
2876
2876
|
const $for_content2__file__closures = /* @__PURE__ */ new Set();
|
|
@@ -2878,7 +2878,7 @@ var diff_view_default = _template("i", (input) => {
|
|
|
2878
2878
|
const $for_content2__fileComments__closures = /* @__PURE__ */ new Set();
|
|
2879
2879
|
const fileComments = commentsByFile.get(file$1.key) || [];
|
|
2880
2880
|
let expanded = true;
|
|
2881
|
-
_html(`<details${_attr_details_or_dialog_open($scope10_id, "a", expanded)}${_attr_class(["
|
|
2881
|
+
_html(`<details${_attr_details_or_dialog_open($scope10_id, "a", expanded)}${_attr_class(["_ej", findState.hit?.key === file$1.key && "_dS"])}${_attr("data-key", file$1.key)}${_attr("hidden", !shownKeySet.has(file$1.key))}><summary${_attr_class("_el")}><span${_attr_class("_eq")}${_attr("data-status", file$1.status)}>${_escape(file$1.status)}${_el_resume($scope10_id, "d")}</span>${_el_resume($scope10_id, "c")}<span${_attr_class(["_er", findState.hit?.key === file$1.key && findState.hit.line < 1 && "_dT"])}${_attr("title", file$1.path)}><bdi>${_escape(file$1.path)}${_el_resume($scope10_id, "f")}</bdi></span>${_el_resume($scope10_id, "e")}`);
|
|
2882
2882
|
_if(() => {
|
|
2883
2883
|
if (fileComments.length) {
|
|
2884
2884
|
const $scope38_id = _scope_id();
|
|
@@ -2891,17 +2891,17 @@ var diff_view_default = _template("i", (input) => {
|
|
|
2891
2891
|
_if(() => {
|
|
2892
2892
|
if (file$1.binary) {
|
|
2893
2893
|
const $scope39_id = _scope_id();
|
|
2894
|
-
_html(`<p${_attr_class(["
|
|
2894
|
+
_html(`<p${_attr_class(["_et", "_ek"])}>binary file</p>`);
|
|
2895
2895
|
writeScope($scope39_id, {});
|
|
2896
2896
|
return 0;
|
|
2897
2897
|
} else if (file$1.tooLarge) {
|
|
2898
2898
|
const $scope40_id = _scope_id();
|
|
2899
|
-
_html(`<p${_attr_class(["
|
|
2899
|
+
_html(`<p${_attr_class(["_et", "_ek"])}>file too large to display</p>`);
|
|
2900
2900
|
writeScope($scope40_id, {});
|
|
2901
2901
|
return 1;
|
|
2902
2902
|
} else if (file$1.old == null && file$1.new == null) {
|
|
2903
2903
|
const $scope41_id = _scope_id();
|
|
2904
|
-
_html(`<p${_attr_class(["
|
|
2904
|
+
_html(`<p${_attr_class(["_et", "_ek"])}>file could not be read</p>`);
|
|
2905
2905
|
writeScope($scope41_id, {});
|
|
2906
2906
|
return 2;
|
|
2907
2907
|
} else {
|
|
@@ -2911,7 +2911,7 @@ var diff_view_default = _template("i", (input) => {
|
|
|
2911
2911
|
_if(() => {
|
|
2912
2912
|
if (!forceNear) {
|
|
2913
2913
|
const $scope25_id = _scope_id();
|
|
2914
|
-
_html(`<div${_attr_class(["
|
|
2914
|
+
_html(`<div${_attr_class(["_em", "_ek"])}></div>${_el_resume($scope25_id, "a")}`);
|
|
2915
2915
|
_script($scope25_id, "i46");
|
|
2916
2916
|
writeScope($scope25_id, {});
|
|
2917
2917
|
return 0;
|
|
@@ -2919,7 +2919,7 @@ var diff_view_default = _template("i", (input) => {
|
|
|
2919
2919
|
const $scope12_id = _scope_id();
|
|
2920
2920
|
const $childScope9 = _peek_scope_id();
|
|
2921
2921
|
diff_file_default({
|
|
2922
|
-
class: "
|
|
2922
|
+
class: "_ek",
|
|
2923
2923
|
file: file$1,
|
|
2924
2924
|
comments: fileComments,
|
|
2925
2925
|
draft: draft && draft.key === file$1.key ? draft : null,
|
|
@@ -2004,6 +2004,29 @@ var inputLg = "_P _O";
|
|
|
2004
2004
|
var iconBtnXs = "_Q _d";
|
|
2005
2005
|
var iconBtnRow = "_R _d";
|
|
2006
2006
|
var iconBtnLg = "_S _d";
|
|
2007
|
+
//#endregion
|
|
2008
|
+
//#region src/client/github.ts
|
|
2009
|
+
/** A repo's full name is `[host/]owner/name`; the host segment is present
|
|
2010
|
+
* only for GitHub Enterprise (server mirror: github-hosts.ts `splitRepo`). */
|
|
2011
|
+
function repoWebUrl(fullName) {
|
|
2012
|
+
const parts = fullName.split("/");
|
|
2013
|
+
if (parts.length >= 3 && parts[0].includes(".")) return `https://${parts[0]}/${parts.slice(1).join("/")}`;
|
|
2014
|
+
return `https://github.com/${fullName}`;
|
|
2015
|
+
}
|
|
2016
|
+
/** Host whose prefix is dropped in labels: github.com by default, or the
|
|
2017
|
+
* one Enterprise host when it is the only host signed in — then it reads
|
|
2018
|
+
* like "home", exactly as github.com does. Set from the boot snapshot. */
|
|
2019
|
+
var primaryHost = "github.com";
|
|
2020
|
+
function setPrimaryHost(hosts) {
|
|
2021
|
+
const authed = (hosts || []).filter((h) => h.authed).map((h) => h.host);
|
|
2022
|
+
primaryHost = authed.includes("github.com") || authed.length !== 1 ? "github.com" : authed[0];
|
|
2023
|
+
}
|
|
2024
|
+
/** `[host/]owner/name` for display: the primary host's prefix is dropped. */
|
|
2025
|
+
function repoLabel(fullName) {
|
|
2026
|
+
const parts = fullName.split("/");
|
|
2027
|
+
if (parts.length >= 3 && parts[0].includes(".") && parts[0] === primaryHost) return parts.slice(1).join("/");
|
|
2028
|
+
return fullName;
|
|
2029
|
+
}
|
|
2007
2030
|
var toastKind = {
|
|
2008
2031
|
error: "_2",
|
|
2009
2032
|
warn: "_3",
|
|
@@ -2098,8 +2121,8 @@ var toast_default = _template("x", (input) => {
|
|
|
2098
2121
|
});
|
|
2099
2122
|
_resume_branch($scope0_id);
|
|
2100
2123
|
});
|
|
2101
|
-
var sectionCount = "
|
|
2102
|
-
var row = "
|
|
2124
|
+
var sectionCount = "_bn _C _D";
|
|
2125
|
+
var row = "_by _bq";
|
|
2103
2126
|
var iconBtn = "_R _d";
|
|
2104
2127
|
//#endregion
|
|
2105
2128
|
//#region src/tags/icons/icon-base.marko
|
|
@@ -2246,8 +2269,8 @@ var icon_sidebar_default = _template("S", (input) => {
|
|
|
2246
2269
|
});
|
|
2247
2270
|
_serialize_if($scope0_reason, 0) && writeScope($scope0_id, { a: _existing_scope($childScope) });
|
|
2248
2271
|
});
|
|
2249
|
-
var findInput = "
|
|
2250
|
-
var findIconBtn = "
|
|
2272
|
+
var findInput = "_eX _f";
|
|
2273
|
+
var findIconBtn = "_e0 _d";
|
|
2251
2274
|
//#endregion
|
|
2252
2275
|
//#region src/tags/icons/icon-search.marko
|
|
2253
2276
|
var icon_search_default = _template("P", (input) => {
|
|
@@ -2266,4 +2289,4 @@ var icon_search_default = _template("P", (input) => {
|
|
|
2266
2289
|
_serialize_if($scope0_reason, 0) && writeScope($scope0_id, { a: _existing_scope($childScope) });
|
|
2267
2290
|
});
|
|
2268
2291
|
//#endregion
|
|
2269
|
-
export {
|
|
2292
|
+
export { _hoist as $, tone as A, _attrs as B, btnSm as C, attrTag as Ct, inputLg as D, iconBtnXs as E, _attr_input_value as F, _dynamic_tag as G, _await as H, _attr_option_value as I, _el_resume as J, _el as K, _attr_or as L, _attr as M, _attr_class as N, metaTrunc as O, _attr_details_or_dialog_open as P, _for_of as Q, _attr_select_value as R, btnLg as S, _var as St, iconBtnRow as T, writeScope as Tt, _content as U, _attrs_partial as V, _content_resume as W, _existing_scope as X, _escape as Y, _flush_head as Z, sectionCount as _, _subscribe as _t, diffTreeOpen as a, _resume as at, repoWebUrl as b, _trailers as bt, sideNavOpen as c, _scope_reason as ct, rankRepos as d, _sep as dt, _hoist_read_error as et, icon_back_default as f, _serialize_guard as ft, row as g, _show_start as gt, iconBtn as h, _show_end as ht, icon_sidebar_default as i, _peek_scope_id as it, $global as j, phase as k, workspaceTab as l, _scope_with_id as lt, icon_base_default as m, _set_serialize_reason as mt, findIconBtn as n, _id as nt, diffUncommitted as o, _resume_branch as ot, icon_refresh_default as p, _serialize_if as pt, _el_read_error as q, findInput as r, _if as rt, setWorkspaceTab as s, _scope_id as st, icon_search_default as t, _html as tt, fuzzy as u, _script as ut, toast_default as v, _template as vt, iconBtnLg as w, withPageAssets as wt, setPrimaryHost as x, _try as xt, repoLabel as y, _to_text as yt, _attr_style as z };
|