@dylanpiercey/work 0.0.48 → 0.0.49
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_B1U5NJd1.js +2 -0
- package/dist/{_CO83dVER.js → _Bi2N56tu.js} +60 -57
- package/dist/{_Hz_qlZE1.js → _DPQxTPYF.js} +58 -58
- package/dist/{_m3ryV1w6.js → _DdgmjMNU.js} +15 -15
- package/dist/index.mjs +3996 -3682
- package/dist/public/assets/{_B2fn4I8S2.js → _4zqifGZf2.js} +1 -1
- package/dist/public/assets/_4zqifGZf2.js.br +0 -0
- package/dist/public/assets/{_BbW3-3ve.js → _8D88iC2Y.js} +1 -1
- package/dist/public/assets/_8D88iC2Y.js.br +0 -0
- package/dist/public/assets/{_CHqTBuzz2.js → _B-7M0VuK2.js} +1 -1
- package/dist/public/assets/_B-7M0VuK2.js.br +0 -0
- package/dist/public/assets/{_BLjOZLxk.js → _B-XihPlt.js} +1 -1
- package/dist/public/assets/_B-XihPlt.js.br +0 -0
- package/dist/public/assets/{_DOpT45mO.js → _B01yJM_n.js} +1 -1
- package/dist/public/assets/_B01yJM_n.js.br +0 -0
- package/dist/public/assets/{_DHvVwuPu2.js → _B3dWhBsL2.js} +1 -1
- package/dist/public/assets/_B3dWhBsL2.js.br +0 -0
- package/dist/public/assets/{_Bg9mkw0u.js → _B6JLzfQk.js} +1 -1
- package/dist/public/assets/_B6JLzfQk.js.br +0 -0
- package/dist/public/assets/{_CObQoJCq.js → _B92xkQnk.js} +1 -1
- package/dist/public/assets/_B92xkQnk.js.br +0 -0
- package/dist/public/assets/{_h8qSl3Me.js → _B9STxcPh.js} +1 -1
- package/dist/public/assets/{_CQDBqJkT.js → _BH7cFvM5.js} +1 -1
- package/dist/public/assets/_BH7cFvM5.js.br +0 -0
- package/dist/public/assets/{_BeSgyXoy2.js → _BP2BHaYT2.js} +1 -1
- package/dist/public/assets/_BP2BHaYT2.js.br +0 -0
- package/dist/public/assets/{_DAfu0wMa.js → _BPmHfnJD.js} +1 -1
- package/dist/public/assets/_BPmHfnJD.js.br +0 -0
- package/dist/public/assets/{_BdbnwCKs2.js → _BRURAzLu2.js} +1 -1
- package/dist/public/assets/_BRURAzLu2.js.br +0 -0
- package/dist/public/assets/{_De7fhQUT.js → _BUhKc7uT.js} +1 -1
- package/dist/public/assets/_BUhKc7uT.js.br +0 -0
- package/dist/public/assets/{_1oYv4fmY2.js → _BX76n7oq2.js} +1 -1
- package/dist/public/assets/_BX76n7oq2.js.br +0 -0
- package/dist/public/assets/{_DBn74psf2.js → _BYn0odAU2.js} +1 -1
- package/dist/public/assets/{_Ced5468N2.js → _BZDb9Hzx2.js} +1 -1
- package/dist/public/assets/{_ClEKr0Tm2.js → _B_Wegq962.js} +1 -1
- package/dist/public/assets/_B_Wegq962.js.br +0 -0
- package/dist/public/assets/{_CASsRCtt.js → _Bb4a7oF1.js} +1 -1
- package/dist/public/assets/_Bb4a7oF1.js.br +0 -0
- package/dist/public/assets/{_B-MMW3nb2.js → _BhAegdMF2.js} +1 -1
- package/dist/public/assets/_BhAegdMF2.js.br +0 -0
- package/dist/public/assets/{_BbMkV19p2.js → _BlPl6sCu2.js} +1 -1
- package/dist/public/assets/_BlPl6sCu2.js.br +0 -0
- package/dist/public/assets/{_DLFnXIrG2.js → _BmEd20O42.js} +1 -1
- package/dist/public/assets/_BmEd20O42.js.br +0 -0
- package/dist/public/assets/{_B49r6O_E.js → _BpxZLi8K.js} +1 -1
- package/dist/public/assets/_BpxZLi8K.js.br +0 -0
- package/dist/public/assets/{_CtErcdf92.js → _BrNzM4EC2.js} +1 -1
- package/dist/public/assets/_BrNzM4EC2.js.br +0 -0
- package/dist/public/assets/{_Ez06j6Qv.js → _Bvgyberk.js} +1 -1
- package/dist/public/assets/_Bvgyberk.js.br +0 -0
- package/dist/public/assets/{_BFt-jSq-.js → _ByKU0Hfi.js} +1 -1
- package/dist/public/assets/_ByKU0Hfi.js.br +0 -0
- package/dist/public/assets/{_Bhnzfac_.js → _ByaG8bWs.js} +1 -1
- package/dist/public/assets/_ByaG8bWs.js.br +0 -0
- package/dist/public/assets/{_DgmBuYFG2.js → _BziqIADV2.js} +1 -1
- package/dist/public/assets/_BziqIADV2.js.br +0 -0
- package/dist/public/assets/{_1cz-l3Ka.js → _C2-Kd826.js} +1 -1
- package/dist/public/assets/_C2-Kd826.js.br +0 -0
- package/dist/public/assets/{_DBN8F3s1.js → _C2rSDO7f.js} +1 -1
- package/dist/public/assets/_C2rSDO7f.js.br +0 -0
- package/dist/public/assets/{_ByiODT9w.js → _C6jAYlE8.js} +1 -1
- package/dist/public/assets/_C6jAYlE8.js.br +0 -0
- package/dist/public/assets/{_cRLLpjIg.js → _C9E3fz2-.js} +1 -1
- package/dist/public/assets/_C9E3fz2-.js.br +0 -0
- package/dist/public/assets/{_yQJK428k.js → _C9hmrTBV.js} +1 -1
- package/dist/public/assets/_C9hmrTBV.js.br +0 -0
- package/dist/public/assets/{_DLK0WouR.js → _CMGqtmQt.js} +1 -1
- package/dist/public/assets/_CMGqtmQt.js.br +0 -0
- package/dist/public/assets/{_DFOnuGNp.js → _CNxYMMPa.js} +1 -1
- package/dist/public/assets/_CNxYMMPa.js.br +0 -0
- package/dist/public/assets/{_BRzL7uNP.js → _CRmHsbsL.js} +1 -1
- package/dist/public/assets/_CRmHsbsL.js.br +0 -0
- package/dist/public/assets/{_kv39JOeM.js → _CVQKEVHV.js} +1 -1
- package/dist/public/assets/_CVQKEVHV.js.br +0 -0
- package/dist/public/assets/{_BiEWaww7.js → _Cci4ZExC.js} +1 -1
- package/dist/public/assets/_Cci4ZExC.js.br +0 -0
- package/dist/public/assets/{_Bm-lmvlM.js → _CgnZDJPL.js} +1 -1
- package/dist/public/assets/_CgnZDJPL.js.br +0 -0
- package/dist/public/assets/{_BGyMoPGj2.js → _CkeutYnJ2.js} +1 -1
- package/dist/public/assets/_CkeutYnJ2.js.br +0 -0
- package/dist/public/assets/{_DKnLFVdw.js → _D0L-Bq8g.js} +1 -1
- package/dist/public/assets/_D0L-Bq8g.js.br +0 -0
- package/dist/public/assets/{_DLLEkkcM.js → _D48HGWNS.js} +5 -5
- package/dist/public/assets/_D48HGWNS.js.br +0 -0
- package/dist/public/assets/{_Dn4wMX5v.js → _D4J5RQqK.js} +1 -1
- package/dist/public/assets/_D4J5RQqK.js.br +0 -0
- package/dist/public/assets/{_Cf0wSsqE.js → _D6xeqZLn.js} +1 -1
- package/dist/public/assets/_D6xeqZLn.js.br +0 -0
- package/dist/public/assets/{_CIeZtXbg2.js → _D7TvcnuF2.js} +1 -1
- package/dist/public/assets/_D7TvcnuF2.js.br +0 -0
- package/dist/public/assets/{_Bpdzs0h4.js → _D99Y49OA.js} +1 -1
- package/dist/public/assets/_D99Y49OA.js.br +0 -0
- package/dist/public/assets/{_CUwAZxRw.js → _D9jhO9rQ.js} +1 -1
- package/dist/public/assets/_D9jhO9rQ.js.br +0 -0
- package/dist/public/assets/{_KjztUkjx.js → _DBzS4J_k.js} +1 -1
- package/dist/public/assets/_DBzS4J_k.js.br +0 -0
- package/dist/public/assets/{_CbMNS899.js → _DDsFYxIq.js} +1 -1
- package/dist/public/assets/_DDsFYxIq.js.br +0 -0
- package/dist/public/assets/{_o1of2_lP.js → _DIiEy_VP.js} +1 -1
- package/dist/public/assets/_DIiEy_VP.js.br +0 -0
- package/dist/public/assets/{_K6PNL3j4.js → _DImQNomk.js} +1 -1
- package/dist/public/assets/_DImQNomk.js.br +0 -0
- package/dist/public/assets/{_BhUM9ZCP.js → _DRRQXGKH.js} +1 -1
- package/dist/public/assets/_DRRQXGKH.js.br +0 -0
- package/dist/public/assets/{_DsJkMBKU2.js → _DZ0pRMJN2.js} +1 -1
- package/dist/public/assets/_DZ0pRMJN2.js.br +0 -0
- package/dist/public/assets/{_9yP8iK4t2.js → _DbkjWa7i2.js} +1 -1
- package/dist/public/assets/_DbkjWa7i2.js.br +0 -0
- package/dist/public/assets/{_I6H6F0ME.js → _DjKQr6mH.js} +1 -1
- package/dist/public/assets/_DjKQr6mH.js.br +0 -0
- package/dist/public/assets/{_CsNJf4g52.js → _Dji7sUrK2.js} +1 -1
- package/dist/public/assets/_Dji7sUrK2.js.br +0 -0
- package/dist/public/assets/{_CH4P29Yf2.js → _DkMIDB1P2.js} +1 -1
- package/dist/public/assets/_DkMIDB1P2.js.br +0 -0
- package/dist/public/assets/{_BqeAAcor.js → _DlC4k_XP.js} +1 -1
- package/dist/public/assets/_DlC4k_XP.js.br +0 -0
- package/dist/public/assets/{_DVPPxo4e2.js → _DljpB8742.js} +1 -1
- package/dist/public/assets/_DljpB8742.js.br +0 -0
- package/dist/public/assets/{_qoSWRJiT.js → _DlsPVtFC.js} +1 -1
- package/dist/public/assets/_DlsPVtFC.js.br +0 -0
- package/dist/public/assets/{_DT9Qs1il.js → _Dmw0DArq.js} +1 -1
- package/dist/public/assets/_Dmw0DArq.js.br +0 -0
- package/dist/public/assets/{_KVpYyL9A.js → _DyNwE1Gc.js} +1 -1
- package/dist/public/assets/_DyNwE1Gc.js.br +0 -0
- package/dist/public/assets/{_FCV34uHN.js → _F3u8qQ9y.js} +1 -1
- package/dist/public/assets/_F3u8qQ9y.js.br +0 -0
- package/dist/public/assets/{_8nx9Raqx2.js → _HH6t8aRM2.js} +1 -1
- package/dist/public/assets/_HH6t8aRM2.js.br +0 -0
- package/dist/public/assets/{_Bvwr3uff.js → _JYBrvu87.js} +1 -1
- package/dist/public/assets/_JYBrvu87.js.br +0 -0
- package/dist/public/assets/{_BBW7mJhZ.js → _Kzpu52En.js} +1 -1
- package/dist/public/assets/_Kzpu52En.js.br +0 -0
- package/dist/public/assets/{_Q6y5EfU1.js → _UWZzN8Rg.js} +1 -1
- package/dist/public/assets/_UWZzN8Rg.js.br +0 -0
- package/dist/public/assets/{_C4NK2Cq5.js → _YLPBpmu6.js} +1 -1
- package/dist/public/assets/_YLPBpmu6.js.br +0 -0
- package/dist/public/assets/{_BC2FBUbj.js → _f4yPg-i-.js} +1 -1
- package/dist/public/assets/_f4yPg-i-.js.br +0 -0
- package/dist/public/assets/{_3i592Qvz2.js → _lBeubFtN2.js} +1 -1
- package/dist/public/assets/_lBeubFtN2.js.br +0 -0
- package/dist/public/assets/{_BV-nVD9L2.js → _llnipctq2.js} +1 -1
- package/dist/public/assets/_llnipctq2.js.br +0 -0
- package/dist/public/assets/{_BPLnh5S4.js → _sBNm9tCS.js} +1 -1
- package/dist/public/assets/_sBNm9tCS.js.br +0 -0
- package/dist/public/assets/{_DjLQQUoq.js → _u3et6kdz.js} +1 -1
- package/dist/public/assets/_u3et6kdz.js.br +0 -0
- package/dist/public/assets/{_CUqlR7rP.js → _v4TxGuxE.js} +1 -1
- package/dist/public/assets/_v4TxGuxE.js.br +0 -0
- package/dist/public/assets/{_BPFJiBiE.js → _wvTh271a.js} +1 -1
- package/dist/public/assets/_wvTh271a.js.br +0 -0
- package/dist/public/assets/diff-view-CKEylX6w.css +1 -0
- package/dist/public/assets/diff-view-CKEylX6w.css.br +0 -0
- package/dist/public/assets/index-Bfh8nSee.js +85 -0
- package/dist/public/assets/index-Bfh8nSee.js.br +0 -0
- package/dist/public/assets/index-D41huIuZ.css +1 -0
- package/dist/public/assets/index-D41huIuZ.css.br +0 -0
- package/package.json +1 -1
- package/dist/_DjrRGy4k.js +0 -2
- package/dist/public/assets/_1cz-l3Ka.js.br +0 -0
- package/dist/public/assets/_1oYv4fmY2.js.br +0 -0
- package/dist/public/assets/_3i592Qvz2.js.br +0 -0
- package/dist/public/assets/_8nx9Raqx2.js.br +0 -0
- package/dist/public/assets/_9yP8iK4t2.js.br +0 -0
- package/dist/public/assets/_B-MMW3nb2.js.br +0 -0
- package/dist/public/assets/_B2fn4I8S2.js.br +0 -0
- package/dist/public/assets/_B49r6O_E.js.br +0 -0
- package/dist/public/assets/_BBW7mJhZ.js.br +0 -0
- package/dist/public/assets/_BC2FBUbj.js.br +0 -0
- package/dist/public/assets/_BFt-jSq-.js.br +0 -0
- package/dist/public/assets/_BGyMoPGj2.js.br +0 -0
- package/dist/public/assets/_BLjOZLxk.js.br +0 -0
- package/dist/public/assets/_BPFJiBiE.js.br +0 -0
- package/dist/public/assets/_BPLnh5S4.js.br +0 -0
- package/dist/public/assets/_BRzL7uNP.js.br +0 -0
- package/dist/public/assets/_BV-nVD9L2.js.br +0 -0
- package/dist/public/assets/_BbMkV19p2.js.br +0 -0
- package/dist/public/assets/_BbW3-3ve.js.br +0 -0
- package/dist/public/assets/_BdbnwCKs2.js.br +0 -0
- package/dist/public/assets/_BeSgyXoy2.js.br +0 -0
- package/dist/public/assets/_Bg9mkw0u.js.br +0 -0
- package/dist/public/assets/_BhUM9ZCP.js.br +0 -0
- package/dist/public/assets/_Bhnzfac_.js.br +0 -0
- package/dist/public/assets/_BiEWaww7.js.br +0 -0
- package/dist/public/assets/_Bm-lmvlM.js.br +0 -0
- package/dist/public/assets/_Bpdzs0h4.js.br +0 -0
- package/dist/public/assets/_BqeAAcor.js.br +0 -0
- package/dist/public/assets/_Bvwr3uff.js.br +0 -0
- package/dist/public/assets/_ByiODT9w.js.br +0 -0
- package/dist/public/assets/_C4NK2Cq5.js.br +0 -0
- package/dist/public/assets/_CASsRCtt.js.br +0 -0
- package/dist/public/assets/_CH4P29Yf2.js.br +0 -0
- package/dist/public/assets/_CHqTBuzz2.js.br +0 -0
- package/dist/public/assets/_CIeZtXbg2.js.br +0 -0
- package/dist/public/assets/_CObQoJCq.js.br +0 -0
- package/dist/public/assets/_CQDBqJkT.js.br +0 -0
- package/dist/public/assets/_CUqlR7rP.js.br +0 -0
- package/dist/public/assets/_CUwAZxRw.js.br +0 -0
- package/dist/public/assets/_CbMNS899.js.br +0 -0
- package/dist/public/assets/_Cf0wSsqE.js.br +0 -0
- package/dist/public/assets/_ClEKr0Tm2.js.br +0 -0
- package/dist/public/assets/_CsNJf4g52.js.br +0 -0
- package/dist/public/assets/_CtErcdf92.js.br +0 -0
- package/dist/public/assets/_DAfu0wMa.js.br +0 -0
- package/dist/public/assets/_DBN8F3s1.js.br +0 -0
- package/dist/public/assets/_DFOnuGNp.js.br +0 -0
- package/dist/public/assets/_DHvVwuPu2.js.br +0 -0
- package/dist/public/assets/_DKnLFVdw.js.br +0 -0
- package/dist/public/assets/_DLFnXIrG2.js.br +0 -0
- package/dist/public/assets/_DLK0WouR.js.br +0 -0
- package/dist/public/assets/_DLLEkkcM.js.br +0 -0
- package/dist/public/assets/_DOpT45mO.js.br +0 -0
- package/dist/public/assets/_DT9Qs1il.js.br +0 -0
- package/dist/public/assets/_DVPPxo4e2.js.br +0 -0
- package/dist/public/assets/_De7fhQUT.js.br +0 -0
- package/dist/public/assets/_DgmBuYFG2.js.br +0 -0
- package/dist/public/assets/_DjLQQUoq.js.br +0 -0
- package/dist/public/assets/_Dn4wMX5v.js.br +0 -0
- package/dist/public/assets/_DsJkMBKU2.js.br +0 -0
- package/dist/public/assets/_Ez06j6Qv.js.br +0 -0
- package/dist/public/assets/_FCV34uHN.js.br +0 -0
- package/dist/public/assets/_I6H6F0ME.js.br +0 -0
- package/dist/public/assets/_K6PNL3j4.js.br +0 -0
- package/dist/public/assets/_KVpYyL9A.js.br +0 -0
- package/dist/public/assets/_KjztUkjx.js.br +0 -0
- package/dist/public/assets/_Q6y5EfU1.js.br +0 -0
- package/dist/public/assets/_cRLLpjIg.js.br +0 -0
- package/dist/public/assets/_kv39JOeM.js.br +0 -0
- package/dist/public/assets/_o1of2_lP.js.br +0 -0
- package/dist/public/assets/_qoSWRJiT.js.br +0 -0
- package/dist/public/assets/_yQJK428k.js.br +0 -0
- package/dist/public/assets/diff-view-CQX-Ovnt.css +0 -1
- package/dist/public/assets/diff-view-CQX-Ovnt.css.br +0 -0
- package/dist/public/assets/index-DR0Bvd6u.css +0 -1
- package/dist/public/assets/index-DR0Bvd6u.css.br +0 -0
- package/dist/public/assets/index-fCEONff1.js +0 -85
- package/dist/public/assets/index-fCEONff1.js.br +0 -0
|
@@ -4,9 +4,9 @@ import { t as require_safe_buffer } from "./_BmSjjJ2E.js";
|
|
|
4
4
|
import fs from "node:fs";
|
|
5
5
|
import path from "node:path";
|
|
6
6
|
import os from "node:os";
|
|
7
|
-
import { DatabaseSync } from "node:sqlite";
|
|
8
7
|
import { execFile } from "node:child_process";
|
|
9
8
|
import { promisify } from "node:util";
|
|
9
|
+
import { DatabaseSync } from "node:sqlite";
|
|
10
10
|
//#region src/server/config.ts
|
|
11
11
|
var home$1 = os.homedir();
|
|
12
12
|
var config = {
|
|
@@ -18,7 +18,6 @@ var config = {
|
|
|
18
18
|
},
|
|
19
19
|
/** Data directory for the sqlite db and other server state. */
|
|
20
20
|
dataDir: process.env.WORK_DATA_DIR || path.join(process.env.XDG_DATA_HOME || path.join(home$1, ".local", "share"), "work"),
|
|
21
|
-
gitHost: "github.com",
|
|
22
21
|
user: process.env.WORK_USER || os.userInfo().username,
|
|
23
22
|
host: process.env.WORK_HOST || os.hostname().split(".")[0],
|
|
24
23
|
/** Prefix every workspace branch starts with. Tooling finds a workspace's PRs
|
|
@@ -33,6 +32,31 @@ var config = {
|
|
|
33
32
|
};
|
|
34
33
|
fs.mkdirSync(config.dataDir, { recursive: true });
|
|
35
34
|
//#endregion
|
|
35
|
+
//#region src/server/exec.ts
|
|
36
|
+
/** Dedicated tmux server so we never touch another multiplexer's or the
|
|
37
|
+
* user's default tmux. */
|
|
38
|
+
var TMUX_SOCKET = "work";
|
|
39
|
+
var execFileAsync = promisify(execFile);
|
|
40
|
+
async function run$1(cmd, args, cwd, env) {
|
|
41
|
+
const { stdout } = await execFileAsync(cmd, args, {
|
|
42
|
+
cwd,
|
|
43
|
+
env,
|
|
44
|
+
maxBuffer: 67108864
|
|
45
|
+
});
|
|
46
|
+
return stdout.trim();
|
|
47
|
+
}
|
|
48
|
+
var git = (args, cwd) => run$1("git", args, cwd);
|
|
49
|
+
/** `gh` against one GitHub host — `GH_HOST` picks the stored credential. */
|
|
50
|
+
var gh = (args, host) => run$1("gh", args, void 0, host ? {
|
|
51
|
+
...process.env,
|
|
52
|
+
GH_HOST: host
|
|
53
|
+
} : void 0);
|
|
54
|
+
var tmux = (args, env) => run$1("tmux", [
|
|
55
|
+
"-L",
|
|
56
|
+
TMUX_SOCKET,
|
|
57
|
+
...args
|
|
58
|
+
], void 0, env);
|
|
59
|
+
//#endregion
|
|
36
60
|
//#region src/server/db.ts
|
|
37
61
|
var db = new DatabaseSync(path.join(config.dataDir, "work.db"));
|
|
38
62
|
db.exec("PRAGMA busy_timeout = 5000");
|
|
@@ -111,59 +135,6 @@ db.exec(`
|
|
|
111
135
|
);
|
|
112
136
|
`);
|
|
113
137
|
//#endregion
|
|
114
|
-
//#region src/server/events.ts
|
|
115
|
-
var listeners = /* @__PURE__ */ new Set();
|
|
116
|
-
function publish(type, data) {
|
|
117
|
-
const event = {
|
|
118
|
-
type,
|
|
119
|
-
data
|
|
120
|
-
};
|
|
121
|
-
for (const listener of [...listeners]) try {
|
|
122
|
-
listener(event);
|
|
123
|
-
} catch (err) {
|
|
124
|
-
console.error("[work] event listener error", err);
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
var joins = 0;
|
|
128
|
-
function subscribe(listener) {
|
|
129
|
-
listeners.add(listener);
|
|
130
|
-
joins++;
|
|
131
|
-
return () => listeners.delete(listener);
|
|
132
|
-
}
|
|
133
|
-
/** Count of subscriptions ever made. A watcher that publishes only what
|
|
134
|
-
* changed has to send everything to a listener that was not there for the
|
|
135
|
-
* earlier ones — including a reconnect, which arrives here as a new
|
|
136
|
-
* subscription and would otherwise sit on whatever it missed. */
|
|
137
|
-
function subscriberJoins() {
|
|
138
|
-
return joins;
|
|
139
|
-
}
|
|
140
|
-
/** Connected SSE clients — lets background watchers idle when no one
|
|
141
|
-
* is listening. */
|
|
142
|
-
function subscriberCount() {
|
|
143
|
-
return listeners.size;
|
|
144
|
-
}
|
|
145
|
-
//#endregion
|
|
146
|
-
//#region src/server/exec.ts
|
|
147
|
-
/** Dedicated tmux server so we never touch another multiplexer's or the
|
|
148
|
-
* user's default tmux. */
|
|
149
|
-
var TMUX_SOCKET = "work";
|
|
150
|
-
var execFileAsync = promisify(execFile);
|
|
151
|
-
async function run$1(cmd, args, cwd, env) {
|
|
152
|
-
const { stdout } = await execFileAsync(cmd, args, {
|
|
153
|
-
cwd,
|
|
154
|
-
env,
|
|
155
|
-
maxBuffer: 67108864
|
|
156
|
-
});
|
|
157
|
-
return stdout.trim();
|
|
158
|
-
}
|
|
159
|
-
var git = (args, cwd) => run$1("git", args, cwd);
|
|
160
|
-
var gh = (args) => run$1("gh", args);
|
|
161
|
-
var tmux = (args, env) => run$1("tmux", [
|
|
162
|
-
"-L",
|
|
163
|
-
TMUX_SOCKET,
|
|
164
|
-
...args
|
|
165
|
-
], void 0, env);
|
|
166
|
-
//#endregion
|
|
167
138
|
//#region lib/setup/catalog.mjs
|
|
168
139
|
/** Machine tools. `required` ones gate readiness; the rest are the utilities
|
|
169
140
|
* agents reach for constantly (mirrors DylanPiercey/start). Static binaries via
|
|
@@ -606,6 +577,38 @@ function preferredAgent() {
|
|
|
606
577
|
return enabled.find((id) => id !== "shell") || stored || "claude";
|
|
607
578
|
}
|
|
608
579
|
//#endregion
|
|
580
|
+
//#region src/server/events.ts
|
|
581
|
+
var listeners = /* @__PURE__ */ new Set();
|
|
582
|
+
function publish(type, data) {
|
|
583
|
+
const event = {
|
|
584
|
+
type,
|
|
585
|
+
data
|
|
586
|
+
};
|
|
587
|
+
for (const listener of [...listeners]) try {
|
|
588
|
+
listener(event);
|
|
589
|
+
} catch (err) {
|
|
590
|
+
console.error("[work] event listener error", err);
|
|
591
|
+
}
|
|
592
|
+
}
|
|
593
|
+
var joins = 0;
|
|
594
|
+
function subscribe(listener) {
|
|
595
|
+
listeners.add(listener);
|
|
596
|
+
joins++;
|
|
597
|
+
return () => listeners.delete(listener);
|
|
598
|
+
}
|
|
599
|
+
/** Count of subscriptions ever made. A watcher that publishes only what
|
|
600
|
+
* changed has to send everything to a listener that was not there for the
|
|
601
|
+
* earlier ones — including a reconnect, which arrives here as a new
|
|
602
|
+
* subscription and would otherwise sit on whatever it missed. */
|
|
603
|
+
function subscriberJoins() {
|
|
604
|
+
return joins;
|
|
605
|
+
}
|
|
606
|
+
/** Connected SSE clients — lets background watchers idle when no one
|
|
607
|
+
* is listening. */
|
|
608
|
+
function subscriberCount() {
|
|
609
|
+
return listeners.size;
|
|
610
|
+
}
|
|
611
|
+
//#endregion
|
|
609
612
|
//#region node_modules/.pnpm/bn.js@4.12.5/node_modules/bn.js/lib/bn.js
|
|
610
613
|
var require_bn = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
611
614
|
(function(module$1, exports$2) {
|
|
@@ -6425,7 +6428,7 @@ function publishChange(sessionId) {
|
|
|
6425
6428
|
const row = get("SELECT workspace_id FROM sessions WHERE id = ?", sessionId);
|
|
6426
6429
|
if (row?.workspace_id) {
|
|
6427
6430
|
const workspaceId = row.workspace_id;
|
|
6428
|
-
import("./
|
|
6431
|
+
import("./_B1U5NJd1.js").then((m) => m.notifySessionsChanged(workspaceId));
|
|
6429
6432
|
return;
|
|
6430
6433
|
}
|
|
6431
6434
|
publish("sessions.changed");
|
|
@@ -6826,4 +6829,4 @@ function sleep(ms) {
|
|
|
6826
6829
|
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
6827
6830
|
}
|
|
6828
6831
|
//#endregion
|
|
6829
|
-
export {
|
|
6832
|
+
export { get as $, subscribe as A, setPref as B, setScrapedPhase as C, pushPublicKey as D, deleteSubscription as E, disabledAgents as F, setupPath as G, doctor as H, enabledAgents as I, TOOLS as J, which as K, getSetting as L, subscriberJoins as M, agentChoices as N, saveSubscription as O, allPrefs as P, db as Q, preferredAgent as R, setAgentPhase as S, summaryFromHookPayload as T, ghKnownHosts as U, setSetting as V, miseVersions as W, toolById as X, agentById as Y, all as Z, tmuxName as _, ensureTmuxServer as a, tmux as at, clearAgentPhase as b, killWorkspaceSessions as c, newSessionArgs as d, workspacePath as et, notifySessionsChanged as f, sessionStates as g, sendToSession as h, disposeSessions as i, run$1 as it, subscriberCount as j, publish as k, listSessions as l, renameSession as m, clearTmuxStarted as n, gh as nt, getSession as o, config as ot, panePids as p, DEFAULT_GITHUB_HOST as q, createSession as r, git as rt, killSession as s, cleanEnv as t, TMUX_SOCKET as tt, markTmuxStarted as u, tmuxWasStarted as v, setSessionViewers as w, reasonFromHookPayload as x, reportsWorking as y, setDisabledAgents as z };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as _set_serialize_reason, B as _html, C as _attr_select_value, F as _existing_scope, G as _resume_branch, H as _if, J as _scope_with_id, K as _scope_id, L as _for_of, M as _el_read_error, N as _el_resume, P as _escape, Q as _serialize_if, S as _attr_option_value, U as _peek_scope_id, W as _resume, X as _sep, Y as _script, Z as _serialize_guard, a as diffTreeOpen, b as _attr_details_or_dialog_open, ct as attrTag, et as _show_end, f as icon_refresh_default, i as icon_sidebar_default, j as _el, k as _content_resume, m as toast_default, n as findIconBtn, nt as _subscribe, o as diffUncommitted, p as icon_base_default, q as _scope_reason, r as findInput, rt as _template, t as icon_search_default, tt as _show_start, u as fuzzy, ut as writeScope, v as _attr, w as _attr_style, x as _attr_input_value, y as _attr_class } from "./
|
|
1
|
+
import { $ as _set_serialize_reason, B as _html, C as _attr_select_value, F as _existing_scope, G as _resume_branch, H as _if, J as _scope_with_id, K as _scope_id, L as _for_of, M as _el_read_error, N as _el_resume, P as _escape, Q as _serialize_if, S as _attr_option_value, U as _peek_scope_id, W as _resume, X as _sep, Y as _script, Z as _serialize_guard, a as diffTreeOpen, b as _attr_details_or_dialog_open, ct as attrTag, et as _show_end, f as icon_refresh_default, i as icon_sidebar_default, j as _el, k as _content_resume, m as toast_default, n as findIconBtn, nt as _subscribe, o as diffUncommitted, p as icon_base_default, q as _scope_reason, r as findInput, rt as _template, t as icon_search_default, tt as _show_start, u as fuzzy, ut as writeScope, v as _attr, w as _attr_style, x as _attr_input_value, y as _attr_class } from "./_DdgmjMNU.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
|
|
@@ -262,10 +262,10 @@ function treeRows(files) {
|
|
|
262
262
|
}
|
|
263
263
|
//#endregion
|
|
264
264
|
//#region src/tags/diff-view.css.ts
|
|
265
|
-
var iconBtn$1 = "
|
|
266
|
-
var treeToggle = "
|
|
267
|
-
var repoWorktree = "
|
|
268
|
-
var repoTitle = "
|
|
265
|
+
var iconBtn$1 = "_eb _D";
|
|
266
|
+
var treeToggle = "_ef _D";
|
|
267
|
+
var repoWorktree = "_eI _q";
|
|
268
|
+
var repoTitle = "_eK _p";
|
|
269
269
|
//#endregion
|
|
270
270
|
//#region src/tags/icons/icon-back.marko
|
|
271
271
|
var icon_back_default = _template("A", (input) => {
|
|
@@ -283,7 +283,7 @@ var icon_back_default = _template("A", (input) => {
|
|
|
283
283
|
});
|
|
284
284
|
_serialize_if($scope0_reason, 0) && writeScope($scope0_id, { a: _existing_scope($childScope) });
|
|
285
285
|
});
|
|
286
|
-
var fileFilter = "
|
|
286
|
+
var fileFilter = "_e9 _e";
|
|
287
287
|
//#endregion
|
|
288
288
|
//#region src/tags/file-filter.marko
|
|
289
289
|
var file_filter_default = _template("j", (input) => {
|
|
@@ -313,7 +313,7 @@ var file_filter_default = _template("j", (input) => {
|
|
|
313
313
|
pending = v;
|
|
314
314
|
box.timer = setTimeout(flush, 150);
|
|
315
315
|
}, "j2", $scope0_id);
|
|
316
|
-
_html(`<div${_attr_class("
|
|
316
|
+
_html(`<div${_attr_class("_e8")}><input${_attr_input_value($scope0_id, "b", draft, _resume(function(v) {
|
|
317
317
|
type(v);
|
|
318
318
|
}, "j0", $scope0_id))}${_attr_class(fileFilter)} type=search placeholder="Filter files…" aria-label="Filter files">${_el_resume($scope0_id, "b")}</div>`);
|
|
319
319
|
_script($scope0_id, "j3");
|
|
@@ -339,7 +339,7 @@ var diff_send_default = _template("g", (input) => {
|
|
|
339
339
|
let sendTarget = null;
|
|
340
340
|
const sessions = input.sessions || [];
|
|
341
341
|
const sendPick = sessions.some((s) => s.id === sendTarget) ? sendTarget : sessions[0]?.id ?? null;
|
|
342
|
-
_html(`<span${_attr_class("
|
|
342
|
+
_html(`<span${_attr_class("_e_")}><button type=button${_attr_class("_h")} title="Copy comments as markdown">Copy${_el_resume($scope0_id, "c")}</button>${_el_resume($scope0_id, "b")}`);
|
|
343
343
|
_if(() => {
|
|
344
344
|
if (sessions.length === 1) {
|
|
345
345
|
const $scope1_id = _scope_id();
|
|
@@ -349,11 +349,11 @@ var diff_send_default = _template("g", (input) => {
|
|
|
349
349
|
return 0;
|
|
350
350
|
} else if (sessions.length) {
|
|
351
351
|
const $scope2_id = _scope_id();
|
|
352
|
-
_html(`<span${_attr_class("
|
|
352
|
+
_html(`<span${_attr_class("_fa")}><button type=button${_attr_class("_fb")}${_attr("disabled", sending)}>Send to${_el_resume($scope2_id, "c")}</button>${_el_resume($scope2_id, "b")}`);
|
|
353
353
|
_attr_select_value($scope2_id, "d", sendTarget, _resume((_new_sendTarget) => {
|
|
354
354
|
sendTarget = _new_sendTarget;
|
|
355
355
|
}, "g0", $scope2_id), () => {
|
|
356
|
-
_html(`<select${_attr_class("
|
|
356
|
+
_html(`<select${_attr_class("_fc")} aria-label="Send comments to session"${_attr("disabled", sending)}>`);
|
|
357
357
|
_for_of(sessions, (s) => {
|
|
358
358
|
const $scope3_id = _scope_id();
|
|
359
359
|
_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)}`);
|
|
@@ -1889,9 +1889,9 @@ var diff_find_default = _template("f", (input) => {
|
|
|
1889
1889
|
el.select();
|
|
1890
1890
|
}, 0);
|
|
1891
1891
|
}, "f5", $scope0_id);
|
|
1892
|
-
_html(`<div${_attr_class(["
|
|
1892
|
+
_html(`<div${_attr_class(["_fo", !open && "_fn"])} aria-hidden=${open ? "false" : "true"}><input${_attr_input_value($scope0_id, "b", query || "", _resume(function(v) {
|
|
1893
1893
|
type(v);
|
|
1894
|
-
}, "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("
|
|
1894
|
+
}, "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("_fr")}>${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")}`);
|
|
1895
1895
|
_script($scope0_id, "f6");
|
|
1896
1896
|
_script($scope0_id, "f7");
|
|
1897
1897
|
_script($scope0_id, "f8");
|
|
@@ -1930,7 +1930,7 @@ var diff_file_default = _template("e", (input) => {
|
|
|
1930
1930
|
_scope_reason();
|
|
1931
1931
|
const $scope0_id = _scope_id();
|
|
1932
1932
|
_el($scope0_id, "e0");
|
|
1933
|
-
_html(`<div${_attr_class(["
|
|
1933
|
+
_html(`<div${_attr_class(["_e7", input.class])}></div>${_el_resume($scope0_id, "a")}`);
|
|
1934
1934
|
_script($scope0_id, "e1");
|
|
1935
1935
|
writeScope($scope0_id, {
|
|
1936
1936
|
e: input.file,
|
|
@@ -1959,10 +1959,10 @@ var diff_tree_default = _template("h", (input) => {
|
|
|
1959
1959
|
let openedRepos = input.openedRepos;
|
|
1960
1960
|
let collapsedDirs = /* @__PURE__ */ new Set();
|
|
1961
1961
|
const commentKeys = input.commentKeys || /* @__PURE__ */ new Set();
|
|
1962
|
-
_html(`<aside${_attr_class(["
|
|
1962
|
+
_html(`<aside${_attr_class(["_fD", { ["_fC"]: input.open === false }])}>`);
|
|
1963
1963
|
_for_of(input.sections, (section) => {
|
|
1964
1964
|
const $scope1_id = _scope_id();
|
|
1965
|
-
_html(`<div${_attr_class("
|
|
1965
|
+
_html(`<div${_attr_class("_fE")}><button type=button${_attr_class(["_fF", { ["_fC"]: collapsedRepos.has(section.id) }])}><span${_attr_class("_fK")}>${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")}`);
|
|
1966
1966
|
_if(() => {
|
|
1967
1967
|
if (!collapsedRepos.has(section.id) || openedRepos.has(section.id)) {
|
|
1968
1968
|
const $scope2_id = _scope_id();
|
|
@@ -1989,17 +1989,17 @@ var diff_tree_default = _template("h", (input) => {
|
|
|
1989
1989
|
_if(() => {
|
|
1990
1990
|
if (!hiddenByCollapse(row) && row.kind === "dir") {
|
|
1991
1991
|
const $scope5_id = _scope_id();
|
|
1992
|
-
_html(`<button type=button${_attr_class(["
|
|
1992
|
+
_html(`<button type=button${_attr_class(["_fG", { ["_fC"]: collapsedDirs.has(dirKey(row.path)) }])}${_attr("title", row.path)}${_attr_style(`padding-left:${.35 + row.depth * .75}rem`)}><span${_attr_class("_fK")}>${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")}`);
|
|
1993
1993
|
_script($scope5_id, "h3");
|
|
1994
1994
|
_subscribe($si__input_sections && $if_content__dirKey__closures, _subscribe($collapsedDirs__closures, writeScope($scope5_id, { Cv: 1 })));
|
|
1995
1995
|
return 0;
|
|
1996
1996
|
} else if (!hiddenByCollapse(row) && row.kind !== "dir") {
|
|
1997
1997
|
const $scope4_id = _scope_id();
|
|
1998
|
-
_html(`<button type=button${_attr_class("
|
|
1998
|
+
_html(`<button type=button${_attr_class("_fH")}${_attr("title", row.file.path)}${_attr_style(`padding-left:${.5 + row.depth * .75}rem`)}><span${_attr_class("_fL")}${_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("_fI")}>${_escape(row.name)}${_el_resume($scope4_id, "e", $sg__input_sections)}</span>`);
|
|
1999
1999
|
_if(() => {
|
|
2000
2000
|
if (commentKeys.has(row.file.key)) {
|
|
2001
2001
|
const $scope6_id = _scope_id();
|
|
2002
|
-
_html(`<span${_attr_class("
|
|
2002
|
+
_html(`<span${_attr_class("_fJ")}>💬</span>`);
|
|
2003
2003
|
_serialize_if($scope0_reason, 0) && writeScope($scope6_id, {});
|
|
2004
2004
|
return 0;
|
|
2005
2005
|
}
|
|
@@ -2060,7 +2060,7 @@ var diff_tree_default = _template("h", (input) => {
|
|
|
2060
2060
|
});
|
|
2061
2061
|
//#endregion
|
|
2062
2062
|
//#region src/tags/diff-file-sheet.css.ts
|
|
2063
|
-
var iconBtn = "
|
|
2063
|
+
var iconBtn = "_fd _D";
|
|
2064
2064
|
//#endregion
|
|
2065
2065
|
//#region src/tags/diff-file-sheet.marko
|
|
2066
2066
|
var diff_file_sheet_default = _template("d", (input) => {
|
|
@@ -2073,10 +2073,10 @@ var diff_file_sheet_default = _template("d", (input) => {
|
|
|
2073
2073
|
_if(() => {
|
|
2074
2074
|
if (open) {
|
|
2075
2075
|
const $scope1_id = _scope_id();
|
|
2076
|
-
_html(`<div${_attr_class("
|
|
2076
|
+
_html(`<div${_attr_class("_ff")}></div>${_el_resume($scope1_id, "a")}<div${_attr_class("_fg")} role=dialog aria-label="Jump to file"><div${_attr_class("_fh")}><strong${_attr_class("_fe")}>Files</strong><span${_attr_class("_fi")}>${_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(iconBtn)} title=Close aria-label=Close>×</button>${_el_resume($scope1_id, "h")}</div><div${_attr_class("_fj")}>`);
|
|
2077
2077
|
_for_of(input.files, (file) => {
|
|
2078
2078
|
const $scope2_id = _scope_id();
|
|
2079
|
-
_html(`<button type=button${_attr_class(["
|
|
2079
|
+
_html(`<button type=button${_attr_class(["_fk", "_q"])}><span${_attr_class("_fm")}${_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("_fl")}${_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)}`);
|
|
2080
2080
|
_if(() => {
|
|
2081
2081
|
if (commentKeys.has(file.key)) {
|
|
2082
2082
|
const $scope3_id = _scope_id();
|
|
@@ -2470,11 +2470,11 @@ var diff_view_default = _template("i", (input) => {
|
|
|
2470
2470
|
revealSearchHit();
|
|
2471
2471
|
}, 0);
|
|
2472
2472
|
}, "i20", $scope0_id);
|
|
2473
|
-
_html(`<div${_attr_class("
|
|
2473
|
+
_html(`<div${_attr_class("_ec")}><div${_attr_class("_eh")}><div${_attr_class(["_ei", { ["_ek"]: comments.length > 0 }])}><div${_attr_class("_eu")}>`);
|
|
2474
2474
|
_if(() => {
|
|
2475
2475
|
if (input.onExit) {
|
|
2476
2476
|
const $scope1_id = _scope_id();
|
|
2477
|
-
_html(`<button${_attr_class([iconBtn$1, "
|
|
2477
|
+
_html(`<button${_attr_class([iconBtn$1, "_ej"])} title="Back to terminal">`);
|
|
2478
2478
|
icon_back_default({ size: 14 });
|
|
2479
2479
|
_html(`</button>${_el_resume($scope1_id, "a")}`);
|
|
2480
2480
|
_script($scope1_id, "i36");
|
|
@@ -2482,7 +2482,7 @@ var diff_view_default = _template("i", (input) => {
|
|
|
2482
2482
|
return 0;
|
|
2483
2483
|
}
|
|
2484
2484
|
}, $scope0_id, "e", $sg__input_onExit, $sg__input_onExit, 1, 0, 1);
|
|
2485
|
-
_html(`<div${_attr_class("
|
|
2485
|
+
_html(`<div${_attr_class("_ev")}>`);
|
|
2486
2486
|
_set_serialize_reason(2);
|
|
2487
2487
|
const $childScope = _peek_scope_id();
|
|
2488
2488
|
file_filter_default({
|
|
@@ -2491,16 +2491,16 @@ var diff_view_default = _template("i", (input) => {
|
|
|
2491
2491
|
fileFilter = _new_fileFilter;
|
|
2492
2492
|
}, "i21", $scope0_id)
|
|
2493
2493
|
});
|
|
2494
|
-
_html(`</div><div${_attr_class("
|
|
2494
|
+
_html(`</div><div${_attr_class("_el")}><h1${_attr_class("_em")}>Review</h1><span${_attr_class("_ew")}>`);
|
|
2495
2495
|
_if(() => {
|
|
2496
2496
|
if (lineStats.additions || lineStats.deletions) {
|
|
2497
2497
|
const $scope27_id = _scope_id();
|
|
2498
|
-
_html(`<span${_attr_class("
|
|
2498
|
+
_html(`<span${_attr_class("_ex")}>+<!>${_escape(lineStats.additions)}${_el_resume($scope27_id, "b")}</span><span${_attr_class("_ey")}>−<!>${_escape(lineStats.deletions)}${_el_resume($scope27_id, "d")}</span>`);
|
|
2499
2499
|
writeScope($scope27_id, {});
|
|
2500
2500
|
return 0;
|
|
2501
2501
|
} else {
|
|
2502
2502
|
const $scope29_id = _scope_id();
|
|
2503
|
-
_html(`<span${_attr_class("
|
|
2503
|
+
_html(`<span${_attr_class("_ez")}>0</span>`);
|
|
2504
2504
|
writeScope($scope29_id, {});
|
|
2505
2505
|
return 1;
|
|
2506
2506
|
}
|
|
@@ -2508,7 +2508,7 @@ var diff_view_default = _template("i", (input) => {
|
|
|
2508
2508
|
_if(() => {
|
|
2509
2509
|
if (comments.length) {
|
|
2510
2510
|
const $scope13_id = _scope_id();
|
|
2511
|
-
_html(`<span${_attr_class("
|
|
2511
|
+
_html(`<span${_attr_class("_eA")}>·</span>${_escape(comments.length)}${_el_resume($scope13_id, "b")} comment<!>${comments.length === 1 ? "" : "s"}${_el_resume($scope13_id, "c")}`);
|
|
2512
2512
|
writeScope($scope13_id, {});
|
|
2513
2513
|
return 0;
|
|
2514
2514
|
}
|
|
@@ -2528,20 +2528,20 @@ var diff_view_default = _template("i", (input) => {
|
|
|
2528
2528
|
return 0;
|
|
2529
2529
|
}
|
|
2530
2530
|
}, $scope0_id, "m", 1, 1, 1, 0, 1);
|
|
2531
|
-
_html(`</div><div${_attr_class("
|
|
2531
|
+
_html(`</div><div${_attr_class("_eg")}><button${_attr_class([
|
|
2532
2532
|
treeToggle,
|
|
2533
|
-
"
|
|
2534
|
-
{ ["
|
|
2533
|
+
"_ee",
|
|
2534
|
+
{ ["_ed"]: treeOpen }
|
|
2535
2535
|
])} title=${treeOpen ? "\"Hide file tree\"" : "\"Show file tree\""}>`);
|
|
2536
2536
|
icon_sidebar_default({ size: 14 });
|
|
2537
|
-
_html(`</button>${_el_resume($scope0_id, "o")}<button${_attr_class([iconBtn$1, "
|
|
2537
|
+
_html(`</button>${_el_resume($scope0_id, "o")}<button${_attr_class([iconBtn$1, "_ee"])} title="Refresh diff"${_attr("disabled", loading)}>`);
|
|
2538
2538
|
_set_serialize_reason(1);
|
|
2539
2539
|
const $childScope3 = _peek_scope_id();
|
|
2540
2540
|
icon_refresh_default({
|
|
2541
2541
|
size: 14,
|
|
2542
2542
|
class: loading && "_x"
|
|
2543
2543
|
});
|
|
2544
|
-
_html(`</button>${_el_resume($scope0_id, "q")}<button${_attr_class("
|
|
2544
|
+
_html(`</button>${_el_resume($scope0_id, "q")}<button${_attr_class("_e2")} title="Jump to file">Files (<!>${_escape(shownFiles.length)}${_el_resume($scope0_id, "t")})</button>${_el_resume($scope0_id, "s")}<div${_attr_class("_eB")} role=group aria-label="Review scope"><button type=button${_attr_class(["_eD", { ["_eC"]: !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(["_eD", { ["_eC"]: 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(["_eE", { ["_eC"]: uncommitted }])} aria-pressed=${uncommitted ? "true" : "false"} title=${uncommitted ? "\"Showing working tree — tap for committed only\"" : "\"Showing committed only — tap to include uncommitted\""}${_attr("disabled", loading)}>${uncommitted ? "Dirty" : "Clean"}${_el_resume($scope0_id, "y")}</button>${_el_resume($scope0_id, "x")}<div${_attr_class(["_ep", { ["_eo"]: !findOpen }])}>`);
|
|
2545
2545
|
_set_serialize_reason(2);
|
|
2546
2546
|
const $childScope4 = _peek_scope_id();
|
|
2547
2547
|
diff_find_default({
|
|
@@ -2558,11 +2558,11 @@ var diff_view_default = _template("i", (input) => {
|
|
|
2558
2558
|
});
|
|
2559
2559
|
_html(`</div>${_el_resume($scope0_id, "z")}<button${_attr_class([
|
|
2560
2560
|
iconBtn$1,
|
|
2561
|
-
"
|
|
2562
|
-
"
|
|
2561
|
+
"_en",
|
|
2562
|
+
"_ee"
|
|
2563
2563
|
])} title="Find in the review (⌘/Ctrl+F)" aria-label="Find in the review"${_attr("hidden", findOpen)}>`);
|
|
2564
2564
|
icon_search_default({ size: 14 });
|
|
2565
|
-
_html(`</button>${_el_resume($scope0_id, "a1")}</div></div>${_el_resume($scope0_id, "c")}<div${_attr_class("
|
|
2565
|
+
_html(`</button>${_el_resume($scope0_id, "a1")}</div></div>${_el_resume($scope0_id, "c")}<div${_attr_class("_es")} data-diff-main>`);
|
|
2566
2566
|
_if(() => {
|
|
2567
2567
|
if (error) {
|
|
2568
2568
|
const $scope14_id = _scope_id();
|
|
@@ -2585,7 +2585,7 @@ var diff_view_default = _template("i", (input) => {
|
|
|
2585
2585
|
_if(() => {
|
|
2586
2586
|
if (!repos && loading) {
|
|
2587
2587
|
const $scope30_id = _scope_id();
|
|
2588
|
-
_html(`<p${_attr_class("
|
|
2588
|
+
_html(`<p${_attr_class("_e1")}>Loading diff…</p>`);
|
|
2589
2589
|
writeScope($scope30_id, {});
|
|
2590
2590
|
return 0;
|
|
2591
2591
|
}
|
|
@@ -2668,7 +2668,7 @@ var diff_view_default = _template("i", (input) => {
|
|
|
2668
2668
|
_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")}`);
|
|
2669
2669
|
writeScope($scope31_id, {});
|
|
2670
2670
|
}, "id", $scope28_id, "b");
|
|
2671
|
-
_html(` — this view has a newer tip than the PR page.</span><span${_attr_class(["_q", "
|
|
2671
|
+
_html(` — this view has a newer tip than the PR page.</span><span${_attr_class(["_q", "_et"])}>`);
|
|
2672
2672
|
_for_of(driftRepos, (repo, i) => {
|
|
2673
2673
|
const $scope32_id = _scope_id();
|
|
2674
2674
|
_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")}`);
|
|
@@ -2720,12 +2720,12 @@ var diff_view_default = _template("i", (input) => {
|
|
|
2720
2720
|
_if(() => {
|
|
2721
2721
|
if (repos && !allFiles.length) {
|
|
2722
2722
|
const $scope26_id = _scope_id();
|
|
2723
|
-
_html(`<p${_attr_class("
|
|
2723
|
+
_html(`<p${_attr_class("_e1")}>${repoList.some((r) => r.pr) ? "No file changes on these PRs." : "No changes vs base."}${_el_resume($scope26_id, "b")}</p>`);
|
|
2724
2724
|
writeScope($scope26_id, {});
|
|
2725
2725
|
return 0;
|
|
2726
2726
|
} else if (repos && !shownFiles.length && !findState.hit) {
|
|
2727
2727
|
const $scope18_id = _scope_id();
|
|
2728
|
-
_html(`<p${_attr_class("
|
|
2728
|
+
_html(`<p${_attr_class("_e1")}>${findState.query.trim() ? "No matches in diffs." : `No files match "${_escape(`${fileFilter}`)}".`}${_el_resume($scope18_id, "b")}</p>`);
|
|
2729
2729
|
writeScope($scope18_id, {});
|
|
2730
2730
|
return 1;
|
|
2731
2731
|
}
|
|
@@ -2754,16 +2754,16 @@ var diff_view_default = _template("i", (input) => {
|
|
|
2754
2754
|
_if(() => {
|
|
2755
2755
|
if (repoFiles.length || repo.pr) {
|
|
2756
2756
|
const $scope4_id = _scope_id();
|
|
2757
|
-
_html(`<section${_attr_class("
|
|
2757
|
+
_html(`<section${_attr_class("_eF")}${repo.pr ? _attr("data-pr", `${repo.worktree}/${repo.pr.number}`) : ""}${_attr("hidden", !shownInRepo.length && !repo.pr && findState.hit?.repo !== repo.id)}>`);
|
|
2758
2758
|
_if(() => {
|
|
2759
2759
|
if (repoList.length > 1) {
|
|
2760
2760
|
const $scope5_id = _scope_id();
|
|
2761
2761
|
const repoCollapsed = collapsedRepos.has(repo.id);
|
|
2762
2762
|
const repoExpanding = expandingRepos.has(repo.id);
|
|
2763
|
-
_html(`<button type=button${_attr_class(["
|
|
2764
|
-
"
|
|
2765
|
-
!repoCollapsed && "
|
|
2766
|
-
repoExpanding && "
|
|
2763
|
+
_html(`<button type=button${_attr_class(["_eG", repoCollapsed && "_eH"])} 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([
|
|
2764
|
+
"_eW",
|
|
2765
|
+
!repoCollapsed && "_eX",
|
|
2766
|
+
repoExpanding && "_eY"
|
|
2767
2767
|
])} 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>`);
|
|
2768
2768
|
_if(() => {
|
|
2769
2769
|
if (repo.pr) {
|
|
@@ -2785,11 +2785,11 @@ var diff_view_default = _template("i", (input) => {
|
|
|
2785
2785
|
}
|
|
2786
2786
|
}, $scope5_id, "f");
|
|
2787
2787
|
const compare$1 = reviewCompareLabel(repo.pr?.baseRefName || repo.base, repo.pr?.headRefName || repo.branch, input.workspaceBranch || "", input.workspaceName || "");
|
|
2788
|
-
_html(`<span${_attr_class("
|
|
2788
|
+
_html(`<span${_attr_class("_eM")}${_attr("title", `${compare$1.title} · ${repo.head.slice(0, 7)}…${repo.baseSha.slice(0, 7)}`)}><span${_attr_class("_eN")}>${_escape(compare$1.base)}${_el_resume($scope5_id, "i")}</span><span${_attr_class("_eP")} aria-hidden=true>vs</span><span${_attr_class("_eO")}>${_escape(compare$1.head)}${_el_resume($scope5_id, "l")}</span>`);
|
|
2789
2789
|
_if(() => {
|
|
2790
2790
|
if (compare$1.topic) {
|
|
2791
2791
|
const $scope36_id = _scope_id();
|
|
2792
|
-
_html(`<span${_attr_class("
|
|
2792
|
+
_html(`<span${_attr_class("_eQ")}>${_escape(compare$1.topic)}${_el_resume($scope36_id, "b")}</span>`);
|
|
2793
2793
|
writeScope($scope36_id, {});
|
|
2794
2794
|
return 0;
|
|
2795
2795
|
}
|
|
@@ -2807,7 +2807,7 @@ var diff_view_default = _template("i", (input) => {
|
|
|
2807
2807
|
return 0;
|
|
2808
2808
|
}
|
|
2809
2809
|
}, $scope5_id, "n", 1, 1, 1, 0, 1);
|
|
2810
|
-
_html(`<span${_attr_class("
|
|
2810
|
+
_html(`<span${_attr_class("_eJ")}>${_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")}`);
|
|
2811
2811
|
_script($scope5_id, "i45");
|
|
2812
2812
|
_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, {
|
|
2813
2813
|
r: repoCollapsed,
|
|
@@ -2818,7 +2818,7 @@ var diff_view_default = _template("i", (input) => {
|
|
|
2818
2818
|
return 0;
|
|
2819
2819
|
} else {
|
|
2820
2820
|
const $scope7_id = _scope_id();
|
|
2821
|
-
_html(`<p${_attr_class("
|
|
2821
|
+
_html(`<p${_attr_class("_eL")}>`);
|
|
2822
2822
|
_if(() => {
|
|
2823
2823
|
if (repo.pr) {
|
|
2824
2824
|
const $scope35_id = _scope_id();
|
|
@@ -2836,11 +2836,11 @@ var diff_view_default = _template("i", (input) => {
|
|
|
2836
2836
|
}
|
|
2837
2837
|
}, $scope7_id, "b");
|
|
2838
2838
|
const compare$2 = reviewCompareLabel(repo.pr?.baseRefName || repo.base, repo.pr?.headRefName || repo.branch, input.workspaceBranch || "", input.workspaceName || "");
|
|
2839
|
-
_html(`<span${_attr_class("
|
|
2839
|
+
_html(`<span${_attr_class("_eM")}${_attr("title", `${compare$2.title} · ${repo.head.slice(0, 7)}…${repo.baseSha.slice(0, 7)}`)}><span${_attr_class("_eN")}>${_escape(compare$2.base)}${_el_resume($scope7_id, "e")}</span><span${_attr_class("_eP")} aria-hidden=true>vs</span><span${_attr_class("_eO")}>${_escape(compare$2.head)}${_el_resume($scope7_id, "h")}</span>`);
|
|
2840
2840
|
_if(() => {
|
|
2841
2841
|
if (compare$2.topic) {
|
|
2842
2842
|
const $scope37_id = _scope_id();
|
|
2843
|
-
_html(`<span${_attr_class("
|
|
2843
|
+
_html(`<span${_attr_class("_eQ")}>${_escape(compare$2.topic)}${_el_resume($scope37_id, "b")}</span>`);
|
|
2844
2844
|
writeScope($scope37_id, {});
|
|
2845
2845
|
return 0;
|
|
2846
2846
|
}
|
|
@@ -2882,7 +2882,7 @@ var diff_view_default = _template("i", (input) => {
|
|
|
2882
2882
|
const $scope9_id = _scope_id();
|
|
2883
2883
|
const $show = repoList.length === 1 || !collapsedRepos.has(repo.id);
|
|
2884
2884
|
_show_start($show);
|
|
2885
|
-
_html(`<div${_attr_class("
|
|
2885
|
+
_html(`<div${_attr_class("_eR")}>`);
|
|
2886
2886
|
_for_of(repoFiles, (file$1) => {
|
|
2887
2887
|
const $scope10_id = _scope_id();
|
|
2888
2888
|
const $for_content2__file__closures = /* @__PURE__ */ new Set();
|
|
@@ -2890,7 +2890,7 @@ var diff_view_default = _template("i", (input) => {
|
|
|
2890
2890
|
const $for_content2__fileComments__closures = /* @__PURE__ */ new Set();
|
|
2891
2891
|
const fileComments = commentsByFile.get(file$1.key) || [];
|
|
2892
2892
|
let expanded = true;
|
|
2893
|
-
_html(`<details${_attr_details_or_dialog_open($scope10_id, "a", expanded)}${_attr_class(["
|
|
2893
|
+
_html(`<details${_attr_details_or_dialog_open($scope10_id, "a", expanded)}${_attr_class(["_eS", findState.hit?.key === file$1.key && "_eq"])}${_attr("data-key", file$1.key)}${_attr("hidden", !shownKeySet.has(file$1.key))}><summary${_attr_class("_eU")}><span${_attr_class("_eZ")}${_attr("data-status", file$1.status)}>${_escape(file$1.status)}${_el_resume($scope10_id, "d")}</span>${_el_resume($scope10_id, "c")}<span${_attr_class(["_e0", findState.hit?.key === file$1.key && findState.hit.line < 1 && "_er"])}${_attr("title", file$1.path)}><bdi>${_escape(file$1.path)}${_el_resume($scope10_id, "f")}</bdi></span>${_el_resume($scope10_id, "e")}`);
|
|
2894
2894
|
_if(() => {
|
|
2895
2895
|
if (fileComments.length) {
|
|
2896
2896
|
const $scope38_id = _scope_id();
|
|
@@ -2903,17 +2903,17 @@ var diff_view_default = _template("i", (input) => {
|
|
|
2903
2903
|
_if(() => {
|
|
2904
2904
|
if (file$1.binary) {
|
|
2905
2905
|
const $scope39_id = _scope_id();
|
|
2906
|
-
_html(`<p${_attr_class(["
|
|
2906
|
+
_html(`<p${_attr_class(["_e3", "_eT"])}>binary file</p>`);
|
|
2907
2907
|
writeScope($scope39_id, {});
|
|
2908
2908
|
return 0;
|
|
2909
2909
|
} else if (file$1.tooLarge) {
|
|
2910
2910
|
const $scope40_id = _scope_id();
|
|
2911
|
-
_html(`<p${_attr_class(["
|
|
2911
|
+
_html(`<p${_attr_class(["_e3", "_eT"])}>file too large to display</p>`);
|
|
2912
2912
|
writeScope($scope40_id, {});
|
|
2913
2913
|
return 1;
|
|
2914
2914
|
} else if (file$1.old == null && file$1.new == null) {
|
|
2915
2915
|
const $scope41_id = _scope_id();
|
|
2916
|
-
_html(`<p${_attr_class(["
|
|
2916
|
+
_html(`<p${_attr_class(["_e3", "_eT"])}>file could not be read</p>`);
|
|
2917
2917
|
writeScope($scope41_id, {});
|
|
2918
2918
|
return 2;
|
|
2919
2919
|
} else {
|
|
@@ -2923,7 +2923,7 @@ var diff_view_default = _template("i", (input) => {
|
|
|
2923
2923
|
_if(() => {
|
|
2924
2924
|
if (!forceNear) {
|
|
2925
2925
|
const $scope25_id = _scope_id();
|
|
2926
|
-
_html(`<div${_attr_class(["
|
|
2926
|
+
_html(`<div${_attr_class(["_eV", "_eT"])}></div>${_el_resume($scope25_id, "a")}`);
|
|
2927
2927
|
_script($scope25_id, "i46");
|
|
2928
2928
|
writeScope($scope25_id, {});
|
|
2929
2929
|
return 0;
|
|
@@ -2931,7 +2931,7 @@ var diff_view_default = _template("i", (input) => {
|
|
|
2931
2931
|
const $scope12_id = _scope_id();
|
|
2932
2932
|
const $childScope9 = _peek_scope_id();
|
|
2933
2933
|
diff_file_default({
|
|
2934
|
-
class: "
|
|
2934
|
+
class: "_eT",
|
|
2935
2935
|
file: file$1,
|
|
2936
2936
|
comments: fileComments,
|
|
2937
2937
|
draft: draft && draft.key === file$1.key ? draft : null,
|