@dylanpiercey/work 0.0.58 → 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 +10 -28
- package/dist/{_DvTZBSt5.js → _CBPKAw5M.js} +15 -15
- package/dist/{_Cb3KjoHw.js → _DlRAzicn.js} +26 -3
- package/dist/index.mjs +246 -217
- package/dist/public/assets/{_rYS8Jg7q.js → _4C0UpFVx.js} +1 -1
- package/dist/public/assets/_4C0UpFVx.js.br +0 -0
- package/dist/public/assets/{_WO60AwgK2.js → _9LzCBhS_2.js} +1 -1
- package/dist/public/assets/_9LzCBhS_2.js.br +0 -0
- package/dist/public/assets/{_BUbGUBWq.js → _Aq6Y2T0v.js} +1 -1
- package/dist/public/assets/_Aq6Y2T0v.js.br +0 -0
- package/dist/public/assets/{_vooPnW75.js → _B01zAY-u.js} +1 -1
- package/dist/public/assets/_B01zAY-u.js.br +0 -0
- package/dist/public/assets/{_CwmnUEmm.js → _B9NTGug5.js} +1 -1
- package/dist/public/assets/_B9NTGug5.js.br +0 -0
- package/dist/public/assets/{_FrhVGlkX2.js → _B9hkAC6z2.js} +1 -1
- package/dist/public/assets/_B9hkAC6z2.js.br +0 -0
- package/dist/public/assets/{_CUrj0V6l2.js → _BBb3VfqT2.js} +1 -1
- package/dist/public/assets/_BBb3VfqT2.js.br +0 -0
- package/dist/public/assets/{_CxKhvkgU.js → _BEspmXDA.js} +1 -1
- package/dist/public/assets/_BEspmXDA.js.br +0 -0
- package/dist/public/assets/{_DbAtKX6v.js → _BHVhtRKY.js} +1 -1
- package/dist/public/assets/_BHVhtRKY.js.br +0 -0
- package/dist/public/assets/{_C7rg8vAk2.js → _BJOUijGq2.js} +1 -1
- package/dist/public/assets/_BJOUijGq2.js.br +0 -0
- package/dist/public/assets/{_aTBAqWUi2.js → _BJb-9ysw2.js} +1 -1
- package/dist/public/assets/_BJb-9ysw2.js.br +0 -0
- package/dist/public/assets/{_BJsj50u-.js → _BKeftndI.js} +1 -1
- package/dist/public/assets/_BKeftndI.js.br +0 -0
- package/dist/public/assets/{_2enE2mXk.js → _BLgHPwA3.js} +1 -1
- package/dist/public/assets/_BLgHPwA3.js.br +0 -0
- package/dist/public/assets/{_Donn4ZV3.js → _BNgrfL8o.js} +1 -1
- package/dist/public/assets/_BNgrfL8o.js.br +0 -0
- package/dist/public/assets/{_2eGBqq7u.js → _BVgS7NCP.js} +1 -1
- package/dist/public/assets/_BVgS7NCP.js.br +0 -0
- package/dist/public/assets/{_CnQ1qTVp.js → _BZBtmMSn.js} +1 -1
- package/dist/public/assets/_BZBtmMSn.js.br +0 -0
- package/dist/public/assets/{_Gc8cRUIR.js → _BZXMvrbw.js} +1 -1
- package/dist/public/assets/_BZXMvrbw.js.br +0 -0
- package/dist/public/assets/{_CkGun6pW2.js → _Bk7dXsZx2.js} +1 -1
- package/dist/public/assets/_Bk7dXsZx2.js.br +0 -0
- package/dist/public/assets/{_BcxfZRD_.js → _Bk7ftDUt.js} +1 -1
- package/dist/public/assets/_Bk7ftDUt.js.br +0 -0
- package/dist/public/assets/{_FcsxOYFa.js → _BluNlEZv.js} +1 -1
- package/dist/public/assets/_BluNlEZv.js.br +0 -0
- package/dist/public/assets/{_BDLl6zCb.js → _BuYT8HKk.js} +1 -1
- package/dist/public/assets/_BuYT8HKk.js.br +0 -0
- package/dist/public/assets/{_CABt3f9f2.js → _Bub7buTu2.js} +1 -1
- package/dist/public/assets/_Bub7buTu2.js.br +0 -0
- package/dist/public/assets/{_rz4NzBjK.js → _ByRG5g91.js} +1 -1
- package/dist/public/assets/_ByRG5g91.js.br +0 -0
- package/dist/public/assets/{_DuBgsDGT.js → _C14R-b_v.js} +1 -1
- package/dist/public/assets/_C14R-b_v.js.br +0 -0
- package/dist/public/assets/{_eHliiA8e.js → _C6IjtbVg.js} +1 -1
- package/dist/public/assets/_C6IjtbVg.js.br +0 -0
- package/dist/public/assets/{_BXMs216Y2.js → _C7JJMpo42.js} +1 -1
- package/dist/public/assets/_C7JJMpo42.js.br +0 -0
- package/dist/public/assets/{_h97mmeY5.js → _CA3tdsQv.js} +1 -1
- package/dist/public/assets/_CA3tdsQv.js.br +0 -0
- package/dist/public/assets/{_DdkVC_L3.js → _CBPJ4RVr.js} +1 -1
- package/dist/public/assets/_CBPJ4RVr.js.br +0 -0
- package/dist/public/assets/{_Vhemgosw2.js → _CCafS5sw2.js} +1 -1
- package/dist/public/assets/_CCafS5sw2.js.br +0 -0
- package/dist/public/assets/{_BEiHICL92.js → _CMvFdyIa2.js} +1 -1
- package/dist/public/assets/_CMvFdyIa2.js.br +0 -0
- package/dist/public/assets/{_DTQJWxJ3.js → _CNcDdAH8.js} +1 -1
- package/dist/public/assets/_CNcDdAH8.js.br +0 -0
- package/dist/public/assets/{_BbqCJvNQ2.js → _CYMo9MTE2.js} +1 -1
- package/dist/public/assets/_CYMo9MTE2.js.br +0 -0
- package/dist/public/assets/{_CogE7pQW.js → _CYXUTd7l.js} +1 -1
- package/dist/public/assets/_CYXUTd7l.js.br +0 -0
- package/dist/public/assets/{_B1vDwe3h.js → _CZEgD1x7.js} +1 -1
- package/dist/public/assets/_CZEgD1x7.js.br +0 -0
- package/dist/public/assets/{_Dylxmxf9.js → _CcuGGPVb.js} +1 -1
- package/dist/public/assets/_CcuGGPVb.js.br +0 -0
- package/dist/public/assets/{_DHQA_xFp2.js → _Cebuufke2.js} +1 -1
- package/dist/public/assets/_Cebuufke2.js.br +0 -0
- package/dist/public/assets/{_BsIllTK-.js → _CggqBYox.js} +1 -1
- package/dist/public/assets/_CggqBYox.js.br +0 -0
- package/dist/public/assets/{_DGChusXS.js → _ChcMMi8_.js} +1 -1
- package/dist/public/assets/_ChcMMi8_.js.br +0 -0
- package/dist/public/assets/{_TYzcqd7s.js → _Chrwmafx.js} +1 -1
- package/dist/public/assets/_Chrwmafx.js.br +0 -0
- package/dist/public/assets/{_CV_Ae5Rk.js → _Cj4m0y5p.js} +1 -1
- package/dist/public/assets/_Cj4m0y5p.js.br +0 -0
- package/dist/public/assets/{_Bb3yoWYL.js → _Ct2eXJFw.js} +1 -1
- package/dist/public/assets/_Ct2eXJFw.js.br +0 -0
- package/dist/public/assets/{_C16-D_Ch2.js → _CufQkVCk2.js} +1 -1
- package/dist/public/assets/_CufQkVCk2.js.br +0 -0
- package/dist/public/assets/{_D3ekmaa_.js → _CuuU2kTd.js} +1 -1
- package/dist/public/assets/_CuuU2kTd.js.br +0 -0
- package/dist/public/assets/{_xriTRTEq2.js → _CzHu5Yml2.js} +1 -1
- package/dist/public/assets/_CzHu5Yml2.js.br +0 -0
- package/dist/public/assets/{__dsfQUPl.js → _CzmS5OWM.js} +1 -1
- package/dist/public/assets/_CzmS5OWM.js.br +0 -0
- package/dist/public/assets/{_BWEYGWEd.js → _D13rZRRa.js} +1 -1
- package/dist/public/assets/_D13rZRRa.js.br +0 -0
- package/dist/public/assets/{_CoSL1kZW2.js → _D2Mf1_R32.js} +1 -1
- package/dist/public/assets/_D2Mf1_R32.js.br +0 -0
- package/dist/public/assets/{_4nL2uQpg.js → _D2_tGg5T.js} +1 -1
- package/dist/public/assets/_D2_tGg5T.js.br +0 -0
- package/dist/public/assets/{_D_Ht0sHB.js → _D2quHHcV.js} +1 -1
- package/dist/public/assets/_D2quHHcV.js.br +0 -0
- package/dist/public/assets/{_DSCzozlR2.js → _D7tlC7QS2.js} +1 -1
- package/dist/public/assets/_D7tlC7QS2.js.br +0 -0
- package/dist/public/assets/{_Cs_cvN1j2.js → _DDsJiq8D2.js} +1 -1
- package/dist/public/assets/_DDsJiq8D2.js.br +0 -0
- package/dist/public/assets/{_sMuZrVfM.js → _DFVeM5NA.js} +1 -1
- package/dist/public/assets/_DFVeM5NA.js.br +0 -0
- package/dist/public/assets/{_CTObmQlY.js → _DFrArZs9.js} +1 -1
- package/dist/public/assets/_DFrArZs9.js.br +0 -0
- package/dist/public/assets/{_BX_wL0YE.js → _DGtjfukV.js} +1 -1
- package/dist/public/assets/_DGtjfukV.js.br +0 -0
- package/dist/public/assets/{_C5UB-NsT.js → _DLfLpiZj.js} +1 -1
- package/dist/public/assets/{_Bcfy36362.js → _DN9XEtZz2.js} +1 -1
- package/dist/public/assets/{_DEBVsO__.js → _DP-17N2s.js} +1 -1
- package/dist/public/assets/_DP-17N2s.js.br +0 -0
- package/dist/public/assets/{_GT3_DJs7.js → _DR0mwaFQ.js} +1 -1
- package/dist/public/assets/_DR0mwaFQ.js.br +0 -0
- package/dist/public/assets/{_DgowXRep.js → _DRahWkav.js} +1 -1
- package/dist/public/assets/_DRahWkav.js.br +0 -0
- package/dist/public/assets/{_ok38vxPs.js → _DY7iDxoP.js} +1 -1
- package/dist/public/assets/_DY7iDxoP.js.br +7 -0
- package/dist/public/assets/{_BX-7KyDA.js → _Deyb3rSm.js} +1 -1
- package/dist/public/assets/_Deyb3rSm.js.br +0 -0
- package/dist/public/assets/{_Cw2Yp_cn2.js → _DgoS2wC12.js} +1 -1
- package/dist/public/assets/_DgoS2wC12.js.br +0 -0
- package/dist/public/assets/{_De-u8h72.js → _Dj_tOoaj.js} +1 -1
- package/dist/public/assets/_Dj_tOoaj.js.br +0 -0
- package/dist/public/assets/{_BsqNUn4o.js → _DtUxmPJy.js} +1 -1
- package/dist/public/assets/_DtUxmPJy.js.br +0 -0
- package/dist/public/assets/{_DyraSGWg.js → _Du2rfXEU.js} +1 -1
- package/dist/public/assets/_Du2rfXEU.js.br +0 -0
- package/dist/public/assets/{_uKbtpQux.js → _DurjFcgk.js} +1 -1
- package/dist/public/assets/_DurjFcgk.js.br +0 -0
- package/dist/public/assets/{_D5QR-lwA2.js → _DwFXsHPv2.js} +1 -1
- package/dist/public/assets/_DwFXsHPv2.js.br +0 -0
- package/dist/public/assets/{_DYoRFUu32.js → _HUnZTZzC2.js} +1 -1
- package/dist/public/assets/_HUnZTZzC2.js.br +0 -0
- package/dist/public/assets/{_Dcepauhq2.js → _J2G4VP2o2.js} +1 -1
- package/dist/public/assets/_J2G4VP2o2.js.br +0 -0
- package/dist/public/assets/{_DW30hPqj.js → _J9_cXa3d.js} +44 -44
- package/dist/public/assets/_J9_cXa3d.js.br +0 -0
- package/dist/public/assets/{_BWZ5PUEV.js → _MtHFvhAh.js} +1 -1
- package/dist/public/assets/_MtHFvhAh.js.br +0 -0
- package/dist/public/assets/{_BPUzMj1d2.js → _SACEj-V12.js} +1 -1
- package/dist/public/assets/{_D67E_AcU2.js → _Z8pHVZX12.js} +1 -1
- package/dist/public/assets/_Z8pHVZX12.js.br +0 -0
- package/dist/public/assets/{_CR2XV8hm.js → _rAo0Ovch.js} +1 -1
- package/dist/public/assets/_rAo0Ovch.js.br +0 -0
- package/dist/public/assets/{_BROdi7Gp.js → _t6cd2p_I.js} +1 -1
- package/dist/public/assets/_t6cd2p_I.js.br +0 -0
- package/dist/public/assets/{diff-view-C1EWWWXL.css → diff-view-Cj44T1y7.css} +1 -1
- package/dist/public/assets/diff-view-Cj44T1y7.css.br +0 -0
- package/dist/public/assets/{index-CMhO9RSz.js → index-D9hzDezQ.js} +20 -20
- package/dist/public/assets/index-D9hzDezQ.js.br +0 -0
- package/dist/public/assets/{index-I2jhJMJc.css → index-DdvzAbHa.css} +1 -1
- package/dist/public/assets/index-DdvzAbHa.css.br +0 -0
- package/install.sh +1 -3
- package/lib/setup/install.d.mts +1 -0
- package/lib/setup/install.mjs +6 -0
- package/package.json +1 -1
- package/dist/public/assets/_2eGBqq7u.js.br +0 -0
- package/dist/public/assets/_2enE2mXk.js.br +0 -0
- package/dist/public/assets/_4nL2uQpg.js.br +0 -0
- package/dist/public/assets/_B1vDwe3h.js.br +0 -0
- package/dist/public/assets/_BDLl6zCb.js.br +0 -0
- package/dist/public/assets/_BEiHICL92.js.br +0 -0
- package/dist/public/assets/_BJsj50u-.js.br +0 -0
- package/dist/public/assets/_BROdi7Gp.js.br +0 -0
- package/dist/public/assets/_BUbGUBWq.js.br +0 -0
- package/dist/public/assets/_BWEYGWEd.js.br +0 -0
- package/dist/public/assets/_BWZ5PUEV.js.br +0 -0
- package/dist/public/assets/_BX-7KyDA.js.br +0 -0
- package/dist/public/assets/_BXMs216Y2.js.br +0 -0
- package/dist/public/assets/_BX_wL0YE.js.br +0 -0
- package/dist/public/assets/_Bb3yoWYL.js.br +0 -0
- package/dist/public/assets/_BbqCJvNQ2.js.br +0 -0
- package/dist/public/assets/_BcxfZRD_.js.br +0 -0
- package/dist/public/assets/_BsIllTK-.js.br +0 -0
- package/dist/public/assets/_BsqNUn4o.js.br +0 -0
- package/dist/public/assets/_C16-D_Ch2.js.br +0 -0
- package/dist/public/assets/_C7rg8vAk2.js.br +0 -0
- package/dist/public/assets/_CABt3f9f2.js.br +0 -0
- package/dist/public/assets/_CR2XV8hm.js.br +0 -0
- package/dist/public/assets/_CTObmQlY.js.br +0 -0
- package/dist/public/assets/_CUrj0V6l2.js.br +0 -0
- package/dist/public/assets/_CV_Ae5Rk.js.br +0 -0
- package/dist/public/assets/_CkGun6pW2.js.br +0 -0
- package/dist/public/assets/_CnQ1qTVp.js.br +0 -0
- package/dist/public/assets/_CoSL1kZW2.js.br +0 -0
- package/dist/public/assets/_CogE7pQW.js.br +0 -0
- package/dist/public/assets/_Cs_cvN1j2.js.br +0 -0
- package/dist/public/assets/_Cw2Yp_cn2.js.br +0 -0
- package/dist/public/assets/_CwmnUEmm.js.br +0 -0
- package/dist/public/assets/_CxKhvkgU.js.br +0 -0
- package/dist/public/assets/_D3ekmaa_.js.br +0 -0
- package/dist/public/assets/_D5QR-lwA2.js.br +0 -0
- package/dist/public/assets/_D67E_AcU2.js.br +0 -0
- package/dist/public/assets/_DEBVsO__.js.br +0 -0
- package/dist/public/assets/_DGChusXS.js.br +0 -0
- package/dist/public/assets/_DHQA_xFp2.js.br +0 -0
- package/dist/public/assets/_DSCzozlR2.js.br +0 -0
- package/dist/public/assets/_DTQJWxJ3.js.br +0 -0
- package/dist/public/assets/_DW30hPqj.js.br +0 -0
- package/dist/public/assets/_DYoRFUu32.js.br +0 -0
- package/dist/public/assets/_D_Ht0sHB.js.br +0 -0
- package/dist/public/assets/_DbAtKX6v.js.br +0 -0
- package/dist/public/assets/_Dcepauhq2.js.br +0 -0
- package/dist/public/assets/_DdkVC_L3.js.br +0 -0
- package/dist/public/assets/_De-u8h72.js.br +0 -0
- package/dist/public/assets/_DgowXRep.js.br +0 -0
- package/dist/public/assets/_Donn4ZV3.js.br +0 -0
- package/dist/public/assets/_DuBgsDGT.js.br +0 -0
- package/dist/public/assets/_Dylxmxf9.js.br +0 -0
- package/dist/public/assets/_DyraSGWg.js.br +0 -0
- package/dist/public/assets/_FcsxOYFa.js.br +0 -0
- package/dist/public/assets/_FrhVGlkX2.js.br +0 -0
- package/dist/public/assets/_GT3_DJs7.js.br +0 -0
- package/dist/public/assets/_Gc8cRUIR.js.br +0 -0
- package/dist/public/assets/_TYzcqd7s.js.br +0 -0
- package/dist/public/assets/_Vhemgosw2.js.br +0 -0
- package/dist/public/assets/_WO60AwgK2.js.br +0 -0
- package/dist/public/assets/__dsfQUPl.js.br +0 -0
- package/dist/public/assets/_aTBAqWUi2.js.br +0 -0
- package/dist/public/assets/_eHliiA8e.js.br +0 -0
- package/dist/public/assets/_h97mmeY5.js.br +0 -0
- package/dist/public/assets/_ok38vxPs.js.br +0 -0
- package/dist/public/assets/_rYS8Jg7q.js.br +0 -0
- package/dist/public/assets/_rz4NzBjK.js.br +0 -0
- package/dist/public/assets/_sMuZrVfM.js.br +0 -3
- package/dist/public/assets/_uKbtpQux.js.br +0 -0
- package/dist/public/assets/_vooPnW75.js.br +0 -0
- package/dist/public/assets/_xriTRTEq2.js.br +0 -0
- package/dist/public/assets/diff-view-C1EWWWXL.css.br +0 -0
- package/dist/public/assets/index-CMhO9RSz.js.br +0 -0
- package/dist/public/assets/index-I2jhJMJc.css.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)`);
|
|
@@ -360,27 +359,10 @@ async function fix(d, { agents = "prompt" } = {}) {
|
|
|
360
359
|
if (process.env.GH_TOKEN || process.env.GITHUB_TOKEN) log("gh will use GH_TOKEN from the environment");
|
|
361
360
|
else warn("GitHub is not signed in — open the app and use Settings → GitHub → Sign in");
|
|
362
361
|
}
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
if (!go) {
|
|
368
|
-
const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
|
|
369
|
-
const ans = await rl.question(`Install coding agent CLIs (${names})? [y/N] `).catch(() => "");
|
|
370
|
-
rl.close();
|
|
371
|
-
go = /^y/i.test(ans.trim());
|
|
372
|
-
}
|
|
373
|
-
if (go) {
|
|
374
|
-
for (const a of missingAgents) {
|
|
375
|
-
try {
|
|
376
|
-
await installAgent(a.id, { log: (l) => console.log(` ${l}`) });
|
|
377
|
-
} catch (err) {
|
|
378
|
-
warn(`${a.label} install failed (non-fatal): ${err.message}`);
|
|
379
|
-
}
|
|
380
|
-
}
|
|
381
|
-
}
|
|
382
|
-
} else if (!d.agents.some((a) => a.installed)) {
|
|
383
|
-
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");
|
|
384
366
|
}
|
|
385
367
|
}
|
|
386
368
|
|
|
@@ -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
|
|
@@ -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();
|
|
@@ -2759,7 +2759,7 @@ 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
|
}
|
|
@@ -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",
|
|
@@ -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 };
|