@dylanpiercey/work 0.0.4 → 0.0.6
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 +63 -16
- package/dist/index.mjs +417 -304
- package/dist/public/assets/{_C2OWYmOV2.js → _17ixsFjl2.js} +2 -2
- package/dist/public/assets/{_C2OWYmOV2.js.map → _17ixsFjl2.js.map} +1 -1
- package/dist/public/assets/{_CDxGtjxF.js → _38qjx0VE.js} +2 -2
- package/dist/public/assets/{_CDxGtjxF.js.map → _38qjx0VE.js.map} +1 -1
- package/dist/public/assets/{_6NZXZz0U.js → _B01vNcBH.js} +2 -2
- package/dist/public/assets/{_6NZXZz0U.js.map → _B01vNcBH.js.map} +1 -1
- package/dist/public/assets/{_DNHife_g.js → _B5_K4U35.js} +2 -2
- package/dist/public/assets/{_DNHife_g.js.map → _B5_K4U35.js.map} +1 -1
- package/dist/public/assets/{_CaeKtFJo.js → _B7WJMKdz.js} +2 -2
- package/dist/public/assets/{_CaeKtFJo.js.map → _B7WJMKdz.js.map} +1 -1
- package/dist/public/assets/{_Cx41Mgpz.js → _BCmJwCZ4.js} +2 -2
- package/dist/public/assets/{_Cx41Mgpz.js.map → _BCmJwCZ4.js.map} +1 -1
- package/dist/public/assets/{_BPSWgjuz.js → _BGfZ-AIc.js} +2 -2
- package/dist/public/assets/{_BPSWgjuz.js.map → _BGfZ-AIc.js.map} +1 -1
- package/dist/public/assets/{_WxtdaovB.js → _BGjK3KLI.js} +2 -2
- package/dist/public/assets/{_WxtdaovB.js.map → _BGjK3KLI.js.map} +1 -1
- package/dist/public/assets/{_DlJIAp-e2.js → _BO1auSkL2.js} +2 -2
- package/dist/public/assets/{_DlJIAp-e2.js.map → _BO1auSkL2.js.map} +1 -1
- package/dist/public/assets/{_pF1NwO662.js → _BSe5zjTJ2.js} +2 -2
- package/dist/public/assets/{_pF1NwO662.js.map → _BSe5zjTJ2.js.map} +1 -1
- package/dist/public/assets/{_BVPf_3NH2.js → _BV7Qzzwy2.js} +2 -2
- package/dist/public/assets/{_BVPf_3NH2.js.map → _BV7Qzzwy2.js.map} +1 -1
- package/dist/public/assets/{_D3qm9y_8.js → _BZgEX-SR.js} +2 -2
- package/dist/public/assets/{_D3qm9y_8.js.map → _BZgEX-SR.js.map} +1 -1
- package/dist/public/assets/{_BRsLMWXx.js → _Bj_P-is9.js} +2 -2
- package/dist/public/assets/{_BRsLMWXx.js.map → _Bj_P-is9.js.map} +1 -1
- package/dist/public/assets/{_DzLFCDwC.js → _BjlFBd9j.js} +2 -2
- package/dist/public/assets/{_DzLFCDwC.js.map → _BjlFBd9j.js.map} +1 -1
- package/dist/public/assets/{_DZ6rrEUv.js → _BqB9YKHu.js} +2 -2
- package/dist/public/assets/{_DZ6rrEUv.js.map → _BqB9YKHu.js.map} +1 -1
- package/dist/public/assets/{_DZ5NkLP12.js → _Bs-d5a142.js} +2 -2
- package/dist/public/assets/{_DZ5NkLP12.js.map → _Bs-d5a142.js.map} +1 -1
- package/dist/public/assets/{_D5WZYe4F.js → _Bt1hNExm.js} +2 -2
- package/dist/public/assets/{_D5WZYe4F.js.map → _Bt1hNExm.js.map} +1 -1
- package/dist/public/assets/{_By1-FL6R.js → _BvkUWaoR.js} +2 -2
- package/dist/public/assets/{_By1-FL6R.js.map → _BvkUWaoR.js.map} +1 -1
- package/dist/public/assets/{_BPFUqkXg.js → _C0fM-yEd.js} +2 -2
- package/dist/public/assets/{_BPFUqkXg.js.map → _C0fM-yEd.js.map} +1 -1
- package/dist/public/assets/{_CcUVcU_m2.js → _C52df4172.js} +2 -2
- package/dist/public/assets/{_CcUVcU_m2.js.map → _C52df4172.js.map} +1 -1
- package/dist/public/assets/{_7S2D4sFr2.js → _CATT-8QU2.js} +2 -2
- package/dist/public/assets/{_7S2D4sFr2.js.map → _CATT-8QU2.js.map} +1 -1
- package/dist/public/assets/{_CDBcf8AV.js → _CDUUTPIa.js} +2 -2
- package/dist/public/assets/{_CDBcf8AV.js.map → _CDUUTPIa.js.map} +1 -1
- package/dist/public/assets/{_Bm9cP56-.js → _CIE37fGr.js} +2 -2
- package/dist/public/assets/{_Bm9cP56-.js.map → _CIE37fGr.js.map} +1 -1
- package/dist/public/assets/{_CzD57slz.js → _CLjg6iH5.js} +2 -2
- package/dist/public/assets/{_CzD57slz.js.map → _CLjg6iH5.js.map} +1 -1
- package/dist/public/assets/{_BbI4K8xR.js → _CPMq9qKD.js} +2 -2
- package/dist/public/assets/{_BbI4K8xR.js.map → _CPMq9qKD.js.map} +1 -1
- package/dist/public/assets/{_4URBBrd4.js → _CUCwB86v.js} +2 -2
- package/dist/public/assets/{_4URBBrd4.js.map → _CUCwB86v.js.map} +1 -1
- package/dist/public/assets/{_CvvYhUU22.js → _CUdHfuKf2.js} +2 -2
- package/dist/public/assets/{_CvvYhUU22.js.map → _CUdHfuKf2.js.map} +1 -1
- package/dist/public/assets/{_DtShQzo92.js → _CVvMxylB2.js} +2 -2
- package/dist/public/assets/{_DtShQzo92.js.map → _CVvMxylB2.js.map} +1 -1
- package/dist/public/assets/{_COBuAz6L2.js → _CeDXSlq_2.js} +2 -2
- package/dist/public/assets/{_COBuAz6L2.js.map → _CeDXSlq_2.js.map} +1 -1
- package/dist/public/assets/{_CJ6FFYq4.js → _CgK4NAc5.js} +2 -2
- package/dist/public/assets/{_CJ6FFYq4.js.map → _CgK4NAc5.js.map} +1 -1
- package/dist/public/assets/{_DT0MWDGy.js → _ChbGErmQ.js} +2 -2
- package/dist/public/assets/{_DT0MWDGy.js.map → _ChbGErmQ.js.map} +1 -1
- package/dist/public/assets/{_CSki3kdf.js → _CjoA9dbQ.js} +2 -2
- package/dist/public/assets/{_CSki3kdf.js.map → _CjoA9dbQ.js.map} +1 -1
- package/dist/public/assets/{_DpAEShDp.js → _Cm0oW23H.js} +2 -2
- package/dist/public/assets/{_DpAEShDp.js.map → _Cm0oW23H.js.map} +1 -1
- package/dist/public/assets/{_BdgwEEwH.js → _CscsJi7i.js} +2 -2
- package/dist/public/assets/{_BdgwEEwH.js.map → _CscsJi7i.js.map} +1 -1
- package/dist/public/assets/{_CfRDhuRJ.js → _Czy_Rmr8.js} +2 -2
- package/dist/public/assets/{_CfRDhuRJ.js.map → _Czy_Rmr8.js.map} +1 -1
- package/dist/public/assets/{_mIdiFhUY.js → _D-u1ssE0.js} +2 -2
- package/dist/public/assets/{_mIdiFhUY.js.map → _D-u1ssE0.js.map} +1 -1
- package/dist/public/assets/{_DyB9g4FQ.js → _D1AvypB0.js} +2 -2
- package/dist/public/assets/{_DyB9g4FQ.js.map → _D1AvypB0.js.map} +1 -1
- package/dist/public/assets/{_D4aP9Den2.js → _D4Z_UM_B2.js} +2 -2
- package/dist/public/assets/{_D4aP9Den2.js.map → _D4Z_UM_B2.js.map} +1 -1
- package/dist/public/assets/{_DuvU-rBy.js → _D7AQAhlo.js} +2 -2
- package/dist/public/assets/{_DuvU-rBy.js.map → _D7AQAhlo.js.map} +1 -1
- package/dist/public/assets/{_CnuGBiPC.js → _D8RDRYsV.js} +2 -2
- package/dist/public/assets/{_CnuGBiPC.js.map → _D8RDRYsV.js.map} +1 -1
- package/dist/public/assets/{_CVP8fR6u.js → _D9oMqxHc.js} +2 -2
- package/dist/public/assets/{_CVP8fR6u.js.map → _D9oMqxHc.js.map} +1 -1
- package/dist/public/assets/{_CDYUlsuF.js → _DDDACu2e.js} +2 -2
- package/dist/public/assets/{_CDYUlsuF.js.map → _DDDACu2e.js.map} +1 -1
- package/dist/public/assets/{_pkHvbEIU2.js → _DFLlSEDh2.js} +2 -2
- package/dist/public/assets/{_pkHvbEIU2.js.map → _DFLlSEDh2.js.map} +1 -1
- package/dist/public/assets/{_CBKhcuu0.js → _DOeCLKRd.js} +2 -2
- package/dist/public/assets/{_CBKhcuu0.js.map → _DOeCLKRd.js.map} +1 -1
- package/dist/public/assets/{_Bi8hNrhq.js → _DWSSCCOX.js} +2 -2
- package/dist/public/assets/{_Bi8hNrhq.js.map → _DWSSCCOX.js.map} +1 -1
- package/dist/public/assets/{_DdIE_v6w2.js → _DcCF4p4b2.js} +2 -2
- package/dist/public/assets/{_DdIE_v6w2.js.map → _DcCF4p4b2.js.map} +1 -1
- package/dist/public/assets/{_PAkhtzEw.js → _Dfi8Atag.js} +2 -2
- package/dist/public/assets/{_PAkhtzEw.js.map → _Dfi8Atag.js.map} +1 -1
- package/dist/public/assets/{_XvG7HpyL2.js → _Dg2FAYj_2.js} +2 -2
- package/dist/public/assets/{_XvG7HpyL2.js.map → _Dg2FAYj_2.js.map} +1 -1
- package/dist/public/assets/{_BguW6EKV.js → _Dlbc7SgI.js} +2 -2
- package/dist/public/assets/{_BguW6EKV.js.map → _Dlbc7SgI.js.map} +1 -1
- package/dist/public/assets/{_BvoV4dxN.js → _DoTuVtdo.js} +2 -2
- package/dist/public/assets/{_BvoV4dxN.js.map → _DoTuVtdo.js.map} +1 -1
- package/dist/public/assets/{_Cbw2eJTh.js → _DpRvij_q.js} +2 -2
- package/dist/public/assets/{_Cbw2eJTh.js.map → _DpRvij_q.js.map} +1 -1
- package/dist/public/assets/{_CrDaP7CH.js → _DpdFHjlT.js} +2 -2
- package/dist/public/assets/{_CrDaP7CH.js.map → _DpdFHjlT.js.map} +1 -1
- package/dist/public/assets/{_CoNipTpF2.js → _DsK9qp5z2.js} +2 -2
- package/dist/public/assets/{_CoNipTpF2.js.map → _DsK9qp5z2.js.map} +1 -1
- package/dist/public/assets/{_0UyQt34a2.js → _DtkPfG0P2.js} +2 -2
- package/dist/public/assets/{_0UyQt34a2.js.map → _DtkPfG0P2.js.map} +1 -1
- package/dist/public/assets/{_ZUD1u66c.js → _DtpDQy9c.js} +2 -2
- package/dist/public/assets/{_ZUD1u66c.js.map → _DtpDQy9c.js.map} +1 -1
- package/dist/public/assets/{_DO2DN-aE.js → _DvigaXuY.js} +2 -2
- package/dist/public/assets/{_DO2DN-aE.js.map → _DvigaXuY.js.map} +1 -1
- package/dist/public/assets/{_BuieZWnY2.js → _PBOdFezG2.js} +2 -2
- package/dist/public/assets/{_BuieZWnY2.js.map → _PBOdFezG2.js.map} +1 -1
- package/dist/public/assets/{_CkIiQ_AH.js → _Q7i-xAMZ.js} +2 -2
- package/dist/public/assets/{_CkIiQ_AH.js.map → _Q7i-xAMZ.js.map} +1 -1
- package/dist/public/assets/{_DIfc6QT0.js → _T-HpFRXH.js} +2 -2
- package/dist/public/assets/{_DIfc6QT0.js.map → _T-HpFRXH.js.map} +1 -1
- package/dist/public/assets/{_eiZQtf7t2.js → _U-btoBCb2.js} +2 -2
- package/dist/public/assets/{_eiZQtf7t2.js.map → _U-btoBCb2.js.map} +1 -1
- package/dist/public/assets/{__rFXtMC92.js → _VVnpWsa-2.js} +2 -2
- package/dist/public/assets/{__rFXtMC92.js.map → _VVnpWsa-2.js.map} +1 -1
- package/dist/public/assets/{_CDb0Peps2.js → _kN8jmSEy2.js} +2 -2
- package/dist/public/assets/{_CDb0Peps2.js.map → _kN8jmSEy2.js.map} +1 -1
- package/dist/public/assets/{_D-klkgfM2.js → _kf1lUDoU2.js} +2 -2
- package/dist/public/assets/{_D-klkgfM2.js.map → _kf1lUDoU2.js.map} +1 -1
- package/dist/public/assets/{_DDeA3LYh.js → _kzd-9LxV.js} +2 -2
- package/dist/public/assets/{_DDeA3LYh.js.map → _kzd-9LxV.js.map} +1 -1
- package/dist/public/assets/{_MX2VSdhD.js → _lENTdKos.js} +2 -2
- package/dist/public/assets/{_MX2VSdhD.js.map → _lENTdKos.js.map} +1 -1
- package/dist/public/assets/{_Jj2MLToB.js → _lO429-VP.js} +2 -2
- package/dist/public/assets/{_Jj2MLToB.js.map → _lO429-VP.js.map} +1 -1
- package/dist/public/assets/{_CWEe7mvO2.js → _nfuFU9Un2.js} +2 -2
- package/dist/public/assets/{_CWEe7mvO2.js.map → _nfuFU9Un2.js.map} +1 -1
- package/dist/public/assets/{_C4b38BCJ.js → _nv0goT4Z.js} +2 -2
- package/dist/public/assets/{_C4b38BCJ.js.map → _nv0goT4Z.js.map} +1 -1
- package/dist/public/assets/{_AW6u7M5Y2.js → _o_JLlSoU2.js} +2 -2
- package/dist/public/assets/{_AW6u7M5Y2.js.map → _o_JLlSoU2.js.map} +1 -1
- package/dist/public/assets/{_xXB-92-y.js → _rDdCnzAf.js} +2 -2
- package/dist/public/assets/{_xXB-92-y.js.map → _rDdCnzAf.js.map} +1 -1
- package/dist/public/assets/{_BJujzXWS.js → _tf4220G9.js} +2 -2
- package/dist/public/assets/{_BJujzXWS.js.map → _tf4220G9.js.map} +1 -1
- package/dist/public/assets/{_DtLmqll0.js → _uhGymT-L.js} +2 -2
- package/dist/public/assets/{_DtLmqll0.js.map → _uhGymT-L.js.map} +1 -1
- package/dist/public/assets/{_CeE4INls.js → _vd_LQrD6.js} +2 -2
- package/dist/public/assets/{_CeE4INls.js.map → _vd_LQrD6.js.map} +1 -1
- package/dist/public/assets/{_BspXs8j72.js → _xikqPUw52.js} +2 -2
- package/dist/public/assets/{_BspXs8j72.js.map → _xikqPUw52.js.map} +1 -1
- package/dist/public/assets/{index-C67H3oTb.js → index-BwlA-lgI.js} +59 -59
- package/dist/public/assets/index-BwlA-lgI.js.map +1 -0
- package/install.sh +4 -1
- package/package.json +1 -1
- package/dist/public/assets/index-C67H3oTb.js.map +0 -1
package/dist/index.mjs
CHANGED
|
@@ -3481,7 +3481,7 @@ var palette_default = _template("h", (input) => {
|
|
|
3481
3481
|
const $input_status__closures = /* @__PURE__ */ new Set();
|
|
3482
3482
|
const $input_settings_agents__closures = /* @__PURE__ */ new Set();
|
|
3483
3483
|
let query = "";
|
|
3484
|
-
let
|
|
3484
|
+
let hiRaw = 0;
|
|
3485
3485
|
let showArchived = false;
|
|
3486
3486
|
const active = input.workspaces.filter((ws) => ws.status === "active");
|
|
3487
3487
|
const archived = input.workspaces.filter((ws) => ws.status === "archived");
|
|
@@ -3517,6 +3517,7 @@ var palette_default = _template("h", (input) => {
|
|
|
3517
3517
|
...commands,
|
|
3518
3518
|
{ kind: "new" }
|
|
3519
3519
|
];
|
|
3520
|
+
const hi = Math.min(hiRaw, rows.length - 1);
|
|
3520
3521
|
const pick = _resume((row) => {
|
|
3521
3522
|
if (!row) return;
|
|
3522
3523
|
if (row.kind === "new") input.onNew();
|
|
@@ -3543,7 +3544,7 @@ var palette_default = _template("h", (input) => {
|
|
|
3543
3544
|
}, $scope0_id, "c", $sg__input_inline__OR__input_workspaces_length, $sg__input_inline__OR__input_workspaces_length, 1, 0, 1);
|
|
3544
3545
|
_html(`<input${_attr_input_value($scope0_id, "d", query, _resume(function(v) {
|
|
3545
3546
|
query = v;
|
|
3546
|
-
|
|
3547
|
+
hiRaw = 0;
|
|
3547
3548
|
}, "h0", $scope0_id))} autofocus placeholder="Jump to workspace…" aria-label="Filter workspaces">${_el_resume($scope0_id, "d")}<ul class=rows>`);
|
|
3548
3549
|
_for_of(rows, (row, i) => {
|
|
3549
3550
|
const $scope2_id = _scope_id();
|
|
@@ -3740,7 +3741,7 @@ var palette_default = _template("h", (input) => {
|
|
|
3740
3741
|
z: input.settings?.agents,
|
|
3741
3742
|
a0: input.onSettings,
|
|
3742
3743
|
a1: query,
|
|
3743
|
-
a2:
|
|
3744
|
+
a2: hiRaw,
|
|
3744
3745
|
a3: showArchived,
|
|
3745
3746
|
a4: active,
|
|
3746
3747
|
a5: archived,
|
|
@@ -3749,10 +3750,12 @@ var palette_default = _template("h", (input) => {
|
|
|
3749
3750
|
a9: currentWs,
|
|
3750
3751
|
ab: commands,
|
|
3751
3752
|
ad: rows,
|
|
3752
|
-
af:
|
|
3753
|
-
|
|
3754
|
-
ai:
|
|
3755
|
-
aj: $
|
|
3753
|
+
af: rows.length,
|
|
3754
|
+
ah: hi,
|
|
3755
|
+
ai: pick,
|
|
3756
|
+
aj: $si__input_selectedId && $input_selectedId__closures,
|
|
3757
|
+
al: $si__input_status && $input_status__closures,
|
|
3758
|
+
am: $si__input_settings_agents && $input_settings_agents__closures
|
|
3756
3759
|
});
|
|
3757
3760
|
_resume_branch($scope0_id);
|
|
3758
3761
|
});
|
|
@@ -4647,10 +4650,12 @@ var new_workspace_default = _template("g", (input) => {
|
|
|
4647
4650
|
* first render on it); getters return defaults during a server render.
|
|
4648
4651
|
* Writes update the map immediately and post fire-and-forget. */
|
|
4649
4652
|
var prefs$1 = /* @__PURE__ */ new Map();
|
|
4653
|
+
var written = /* @__PURE__ */ new Set();
|
|
4650
4654
|
function get$1(key) {
|
|
4651
4655
|
return prefs$1.get(key) ?? null;
|
|
4652
4656
|
}
|
|
4653
4657
|
function set(key, value) {
|
|
4658
|
+
written.add(key);
|
|
4654
4659
|
if (value === null) prefs$1.delete(key);
|
|
4655
4660
|
else prefs$1.set(key, value);
|
|
4656
4661
|
post(key, value);
|
|
@@ -5483,7 +5488,7 @@ _template("c", (input) => {
|
|
|
5483
5488
|
//#endregion
|
|
5484
5489
|
//#region src/tags/prompt-dialog.marko
|
|
5485
5490
|
var prompt_dialog_default = _template("i", (input) => {
|
|
5486
|
-
const $scope0_reason = _scope_reason(), $sg__input_label = _serialize_guard($scope0_reason,
|
|
5491
|
+
const $scope0_reason = _scope_reason(), $sg__input_label = _serialize_guard($scope0_reason, 1), $sg__input_onCancel = _serialize_guard($scope0_reason, 2), $si__input_submitLabel = _serialize_if($scope0_reason, 3), $si__input_label = _serialize_if($scope0_reason, 1), $si__input_placeholder = _serialize_if($scope0_reason, 4);
|
|
5487
5492
|
const $scope0_id = _scope_id();
|
|
5488
5493
|
const $modalview_content__subscribers = /* @__PURE__ */ new Set();
|
|
5489
5494
|
const $input_submitLabel__closures = /* @__PURE__ */ new Set();
|
|
@@ -5510,7 +5515,7 @@ var prompt_dialog_default = _template("i", (input) => {
|
|
|
5510
5515
|
footer: attrTag({ content: _content_resume("i5", () => {
|
|
5511
5516
|
_scope_reason();
|
|
5512
5517
|
const $scope1_id = _scope_id();
|
|
5513
|
-
_html(`<button class="btn primary"${_attr("disabled", !value.trim())}>${_escape(input.submitLabel || "OK")}${_el_resume($scope1_id, "b", _serialize_guard($scope0_reason,
|
|
5518
|
+
_html(`<button class="btn primary"${_attr("disabled", !value.trim())}>${_escape(input.submitLabel || "OK")}${_el_resume($scope1_id, "b", _serialize_guard($scope0_reason, 3))}</button>${_el_resume($scope1_id, "a")}<div class=spacer></div><button class=btn>Cancel</button>${_el_resume($scope1_id, "c")}`);
|
|
5514
5519
|
_script($scope1_id, "i3");
|
|
5515
5520
|
_subscribe($value__closures, _subscribe($si__input_submitLabel && $input_submitLabel__closures, writeScope($scope1_id, { _: _scope_with_id($scope0_id) })));
|
|
5516
5521
|
_resume_branch($scope1_id);
|
|
@@ -5553,14 +5558,16 @@ var getTermDims;
|
|
|
5553
5558
|
var makeFileFilter;
|
|
5554
5559
|
var CUSTOM = "__custom";
|
|
5555
5560
|
var diff_view_default = _template("d", (input) => {
|
|
5556
|
-
const $scope0_reason = _scope_reason(), $sg__input_onExit = _serialize_guard($scope0_reason, 1), $sg__input_sessions = _serialize_guard($scope0_reason, 0), $si__input_sessions = _serialize_if($scope0_reason, 0);
|
|
5561
|
+
const $scope0_reason = _scope_reason(), $sg__input_onExit = _serialize_guard($scope0_reason, 1), $sg__input_sessions = _serialize_guard($scope0_reason, 0), $si__input_sessions = _serialize_if($scope0_reason, 0), $si__input_sessions_0_title = _serialize_if($scope0_reason, 2), $si__input_sessions_0_agent = _serialize_if($scope0_reason, 3);
|
|
5557
5562
|
const $scope0_id = _scope_id();
|
|
5558
5563
|
const $collapsedDirs__closures = /* @__PURE__ */ new Set();
|
|
5559
5564
|
const $viewed__closures = /* @__PURE__ */ new Set();
|
|
5560
5565
|
const $commentsByFile__closures = /* @__PURE__ */ new Set();
|
|
5561
5566
|
const $filesByRepo__closures = /* @__PURE__ */ new Set();
|
|
5562
|
-
const $
|
|
5567
|
+
const $input_sessions_0_title__closures = /* @__PURE__ */ new Set();
|
|
5568
|
+
const $input_sessions_0_agent__closures = /* @__PURE__ */ new Set();
|
|
5563
5569
|
const $sending__closures = /* @__PURE__ */ new Set();
|
|
5570
|
+
const $input_sessions__closures = /* @__PURE__ */ new Set();
|
|
5564
5571
|
const $sendTarget__closures = /* @__PURE__ */ new Set();
|
|
5565
5572
|
const $collapsedRepos__closures = /* @__PURE__ */ new Set();
|
|
5566
5573
|
const $draft__closures = /* @__PURE__ */ new Set();
|
|
@@ -5740,14 +5747,14 @@ var diff_view_default = _template("d", (input) => {
|
|
|
5740
5747
|
}, "d15", $scope0_id);
|
|
5741
5748
|
_html(`<div class=diff-view><aside class=${!treeOpen ? "\"tree closed\"" : "tree"}>`);
|
|
5742
5749
|
_for_of(repoList.filter((r) => filesByRepo.get(r.worktree)?.length), (repo) => {
|
|
5743
|
-
const $
|
|
5744
|
-
_html(`<div class=tree-repo><button class=${collapsedRepos.has(repo.worktree) ? "\"tree-repo-name mono closed\"" : "\"tree-repo-name mono\""}><span class=tree-chev>${collapsedRepos.has(repo.worktree) ? "▸" : "▾"}${_el_resume($
|
|
5750
|
+
const $scope5_id = _scope_id();
|
|
5751
|
+
_html(`<div class=tree-repo><button class=${collapsedRepos.has(repo.worktree) ? "\"tree-repo-name mono closed\"" : "\"tree-repo-name mono\""}><span class=tree-chev>${collapsedRepos.has(repo.worktree) ? "▸" : "▾"}${_el_resume($scope5_id, "b")}</span><!>${_escape(repo.worktree)}${_el_resume($scope5_id, "c")}</button>${_el_resume($scope5_id, "a")}`);
|
|
5745
5752
|
_if(() => {
|
|
5746
5753
|
if (!collapsedRepos.has(repo.worktree)) {
|
|
5747
|
-
const $
|
|
5754
|
+
const $scope6_id = _scope_id();
|
|
5748
5755
|
const $if_content4__dirKey__closures = /* @__PURE__ */ new Set();
|
|
5749
5756
|
const repoRows = treeRows(filesByRepo.get(repo.worktree) || []);
|
|
5750
|
-
const dirKey = _resume((path) => `${repo.worktree}/${path}`, "d16", $
|
|
5757
|
+
const dirKey = _resume((path) => `${repo.worktree}/${path}`, "d16", $scope6_id);
|
|
5751
5758
|
const rowDir = _resume((row) => row.kind === "dir" ? row.path : row.file.path.includes("/") ? row.file.path.slice(0, row.file.path.lastIndexOf("/")) : "", "d17");
|
|
5752
5759
|
const hiddenByCollapse = _resume((row) => {
|
|
5753
5760
|
const dir = rowDir(row);
|
|
@@ -5758,34 +5765,34 @@ var diff_view_default = _template("d", (input) => {
|
|
|
5758
5765
|
if (dir === path || dir.startsWith(`${path}/`)) return true;
|
|
5759
5766
|
}
|
|
5760
5767
|
return false;
|
|
5761
|
-
}, "d18", $
|
|
5768
|
+
}, "d18", $scope6_id);
|
|
5762
5769
|
_for_of(repoRows, (row) => {
|
|
5763
|
-
const $
|
|
5770
|
+
const $scope7_id = _scope_id();
|
|
5764
5771
|
_if(() => {
|
|
5765
5772
|
if (!hiddenByCollapse(row) && row.kind === "dir") {
|
|
5766
|
-
const $
|
|
5767
|
-
_html(`<button class=${collapsedDirs.has(dirKey(row.path)) ? "\"tree-dir dim mono closed\"" : "\"tree-dir dim mono\""}${_attr("title", row.path)}${_attr_style(`padding-left:${.35 + row.depth * .75}rem`)}><span class=tree-chev>${collapsedDirs.has(dirKey(row.path)) ? "▸" : "▾"}${_el_resume($
|
|
5768
|
-
_script($
|
|
5769
|
-
_subscribe($if_content4__dirKey__closures, _subscribe($collapsedDirs__closures, writeScope($
|
|
5773
|
+
const $scope22_id = _scope_id();
|
|
5774
|
+
_html(`<button class=${collapsedDirs.has(dirKey(row.path)) ? "\"tree-dir dim mono closed\"" : "\"tree-dir dim mono\""}${_attr("title", row.path)}${_attr_style(`padding-left:${.35 + row.depth * .75}rem`)}><span class=tree-chev>${collapsedDirs.has(dirKey(row.path)) ? "▸" : "▾"}${_el_resume($scope22_id, "b")}</span>${_escape(row.label)}${_el_resume($scope22_id, "c")}/</button>${_el_resume($scope22_id, "a")}`);
|
|
5775
|
+
_script($scope22_id, "d26");
|
|
5776
|
+
_subscribe($if_content4__dirKey__closures, _subscribe($collapsedDirs__closures, writeScope($scope22_id, { Cca: 1 })));
|
|
5770
5777
|
return 0;
|
|
5771
5778
|
} else if (!hiddenByCollapse(row) && row.kind !== "dir") {
|
|
5772
|
-
const $
|
|
5773
|
-
_html(`<button class=${viewed.has(row.file.key) ? "\"tree-file mono seen\"" : "\"tree-file mono\""}${_attr("title", row.file.path)}${_attr_style(`padding-left:${.5 + row.depth * .75}rem`)}><span${_attr_class(["status", row.file.status])}>${_escape(row.file.status)}${_el_resume($
|
|
5779
|
+
const $scope8_id = _scope_id();
|
|
5780
|
+
_html(`<button class=${viewed.has(row.file.key) ? "\"tree-file mono seen\"" : "\"tree-file mono\""}${_attr("title", row.file.path)}${_attr_style(`padding-left:${.5 + row.depth * .75}rem`)}><span${_attr_class(["status", row.file.status])}>${_escape(row.file.status)}${_el_resume($scope8_id, "c")}</span>${_el_resume($scope8_id, "b")}<span class=tree-file-name>${_escape(row.name)}${_el_resume($scope8_id, "d")}</span>`);
|
|
5774
5781
|
_if(() => {
|
|
5775
5782
|
if (commentsByFile.has(row.file.key)) {
|
|
5776
|
-
const $
|
|
5783
|
+
const $scope25_id = _scope_id();
|
|
5777
5784
|
_html("<span class=tree-note>💬</span>");
|
|
5778
|
-
writeScope($
|
|
5785
|
+
writeScope($scope25_id, {});
|
|
5779
5786
|
return 0;
|
|
5780
5787
|
}
|
|
5781
|
-
}, $
|
|
5782
|
-
_html(`</button>${_el_resume($
|
|
5783
|
-
_script($
|
|
5784
|
-
_subscribe($commentsByFile__closures, _subscribe($viewed__closures, writeScope($
|
|
5788
|
+
}, $scope8_id, "e", 1, 1, 1, 0, 1);
|
|
5789
|
+
_html(`</button>${_el_resume($scope8_id, "a")}`);
|
|
5790
|
+
_script($scope8_id, "d27");
|
|
5791
|
+
_subscribe($commentsByFile__closures, _subscribe($viewed__closures, writeScope($scope8_id, {})));
|
|
5785
5792
|
return 1;
|
|
5786
5793
|
}
|
|
5787
|
-
}, $
|
|
5788
|
-
writeScope($
|
|
5794
|
+
}, $scope7_id, "a", 1, 1, 1, 0, 1);
|
|
5795
|
+
writeScope($scope7_id, {
|
|
5789
5796
|
c: row,
|
|
5790
5797
|
e: row?.path,
|
|
5791
5798
|
f: row?.depth,
|
|
@@ -5795,8 +5802,8 @@ var diff_view_default = _template("d", (input) => {
|
|
|
5795
5802
|
k: row?.file?.status,
|
|
5796
5803
|
l: row?.name
|
|
5797
5804
|
});
|
|
5798
|
-
}, (r) => r.kind === "dir" ? `d:${r.path}` : r.file.key, $
|
|
5799
|
-
_subscribe($filesByRepo__closures, _subscribe($collapsedDirs__closures, writeScope($
|
|
5805
|
+
}, (r) => r.kind === "dir" ? `d:${r.path}` : r.file.key, $scope6_id, "a");
|
|
5806
|
+
_subscribe($filesByRepo__closures, _subscribe($collapsedDirs__closures, writeScope($scope6_id, {
|
|
5800
5807
|
c: dirKey,
|
|
5801
5808
|
d: rowDir,
|
|
5802
5809
|
f: hiddenByCollapse,
|
|
@@ -5804,10 +5811,10 @@ var diff_view_default = _template("d", (input) => {
|
|
|
5804
5811
|
})));
|
|
5805
5812
|
return 0;
|
|
5806
5813
|
}
|
|
5807
|
-
}, $
|
|
5814
|
+
}, $scope5_id, "d");
|
|
5808
5815
|
_html("</div>");
|
|
5809
|
-
_script($
|
|
5810
|
-
writeScope($
|
|
5816
|
+
_script($scope5_id, "d28");
|
|
5817
|
+
writeScope($scope5_id, { g: repo?.worktree });
|
|
5811
5818
|
}, "worktree", $scope0_id, "a", 1, 1, 1, "</aside>", 1);
|
|
5812
5819
|
_html("<div class=diff-col><div class=diff-head>");
|
|
5813
5820
|
_if(() => {
|
|
@@ -5827,35 +5834,44 @@ var diff_view_default = _template("d", (input) => {
|
|
|
5827
5834
|
const $scope2_id = _scope_id();
|
|
5828
5835
|
_html(`<button class=btn title="Copy comments as markdown">${copied ? "Copied ✓" : "Copy"}${_el_resume($scope2_id, "b")}</button>${_el_resume($scope2_id, "a")}`);
|
|
5829
5836
|
_if(() => {
|
|
5830
|
-
if ((input.sessions || []).length) {
|
|
5837
|
+
if ((input.sessions || []).length === 1) {
|
|
5831
5838
|
const $scope3_id = _scope_id();
|
|
5832
|
-
_html(`<
|
|
5833
|
-
|
|
5839
|
+
_html(`<button class="btn primary"${_attr("disabled", sending)}>${sending ? "Sending…" : `Send to ${_escape(`${input.sessions[0].title || input.sessions[0].agent}`)}`}${_el_resume($scope3_id, "b")}</button>${_el_resume($scope3_id, "a")}`);
|
|
5840
|
+
_script($scope3_id, "d30");
|
|
5841
|
+
_subscribe($sending__closures, _subscribe($si__input_sessions_0_agent && $input_sessions_0_agent__closures, _subscribe($si__input_sessions_0_title && $input_sessions_0_title__closures, writeScope($scope3_id, { _: _scope_with_id($scope2_id) }))));
|
|
5842
|
+
return 0;
|
|
5843
|
+
} else if ((input.sessions || []).length) {
|
|
5844
|
+
const $scope4_id = _scope_id();
|
|
5845
|
+
_html(`<span class="split-btn primary"><button${_attr("disabled", sending)}>${sending ? "Sending…" : "Send to"}${_el_resume($scope4_id, "b")}</button>${_el_resume($scope4_id, "a")}`);
|
|
5846
|
+
_attr_select_value($scope4_id, "c", sendTarget, _resume((_new_sendTarget) => {
|
|
5834
5847
|
sendTarget = _new_sendTarget;
|
|
5835
|
-
}, "d0", $
|
|
5848
|
+
}, "d0", $scope4_id), () => {
|
|
5836
5849
|
_html(`<select aria-label="Send comments to session"${_attr("disabled", sending)}>`);
|
|
5837
5850
|
_for_of(input.sessions, (s) => {
|
|
5838
|
-
const $
|
|
5839
|
-
_html(`<option${_attr_option_value(s.id)}>${_escape(s.title || s.agent)}${_el_resume($
|
|
5840
|
-
$si__input_sessions && writeScope($
|
|
5841
|
-
}, "id", $
|
|
5851
|
+
const $scope26_id = _scope_id();
|
|
5852
|
+
_html(`<option${_attr_option_value(s.id)}>${_escape(s.title || s.agent)}${_el_resume($scope26_id, "b", $sg__input_sessions)}</option>${_el_resume($scope26_id, "a", $sg__input_sessions)}`);
|
|
5853
|
+
$si__input_sessions && writeScope($scope26_id, {});
|
|
5854
|
+
}, "id", $scope4_id, "c", $sg__input_sessions, 1, $sg__input_sessions, "</select>", 1);
|
|
5842
5855
|
});
|
|
5843
5856
|
_html("</span>");
|
|
5844
|
-
_script($
|
|
5845
|
-
_subscribe($sendTarget__closures, _subscribe($sending__closures, _subscribe($si__input_sessions && $input_sessions__closures, writeScope($
|
|
5846
|
-
|
|
5857
|
+
_script($scope4_id, "d31");
|
|
5858
|
+
_subscribe($sendTarget__closures, _subscribe($sending__closures, _subscribe($si__input_sessions && $input_sessions__closures, writeScope($scope4_id, {
|
|
5859
|
+
_: _scope_with_id($scope2_id),
|
|
5860
|
+
Cc6: 1
|
|
5861
|
+
}))));
|
|
5862
|
+
return 1;
|
|
5847
5863
|
}
|
|
5848
5864
|
}, $scope2_id, "c", $sg__input_sessions, $sg__input_sessions, $sg__input_sessions, 0, 1);
|
|
5849
|
-
_script($scope2_id, "
|
|
5865
|
+
_script($scope2_id, "d32");
|
|
5850
5866
|
writeScope($scope2_id, {});
|
|
5851
5867
|
return 0;
|
|
5852
5868
|
}
|
|
5853
5869
|
}, $scope0_id, "g", 1, 1, 1, "</span>");
|
|
5854
5870
|
_if(() => {
|
|
5855
5871
|
if (loading) {
|
|
5856
|
-
const $
|
|
5872
|
+
const $scope27_id = _scope_id();
|
|
5857
5873
|
_html("<span class=\"refresh-chip dim\"><span class=spin></span>Refreshing…</span>");
|
|
5858
|
-
writeScope($
|
|
5874
|
+
writeScope($scope27_id, {});
|
|
5859
5875
|
return 0;
|
|
5860
5876
|
}
|
|
5861
5877
|
}, $scope0_id, "h", 1, 1, 1, 0, 1);
|
|
@@ -5872,15 +5888,15 @@ var diff_view_default = _template("d", (input) => {
|
|
|
5872
5888
|
}, "d2", $scope0_id), () => {
|
|
5873
5889
|
_html(`<select class=base-pick aria-label="Compare against"><option${_attr_option_value("")}>vs base</option>`);
|
|
5874
5890
|
_for_of(defaultBranches, (branch) => {
|
|
5875
|
-
const $
|
|
5876
|
-
_html(`<option${_attr_option_value(branch)}>vs <!>${_escape(branch)}${_el_resume($
|
|
5877
|
-
writeScope($
|
|
5891
|
+
const $scope28_id = _scope_id();
|
|
5892
|
+
_html(`<option${_attr_option_value(branch)}>vs <!>${_escape(branch)}${_el_resume($scope28_id, "b")}</option>${_el_resume($scope28_id, "a")}`);
|
|
5893
|
+
writeScope($scope28_id, {});
|
|
5878
5894
|
}, (b) => b, $scope0_id, "q", 1, 1, 1, 0, 1);
|
|
5879
5895
|
_if(() => {
|
|
5880
5896
|
if (baseRef && !defaultBranches.includes(baseRef)) {
|
|
5881
|
-
const $
|
|
5882
|
-
_html(`<option${_attr_option_value(baseRef)}>vs <!>${_escape(baseRef)}${_el_resume($
|
|
5883
|
-
writeScope($
|
|
5897
|
+
const $scope19_id = _scope_id();
|
|
5898
|
+
_html(`<option${_attr_option_value(baseRef)}>vs <!>${_escape(baseRef)}${_el_resume($scope19_id, "b")}</option>${_el_resume($scope19_id, "a")}`);
|
|
5899
|
+
writeScope($scope19_id, {});
|
|
5884
5900
|
return 0;
|
|
5885
5901
|
}
|
|
5886
5902
|
}, $scope0_id, "r", 1, 1, 1, 0, 1);
|
|
@@ -5889,36 +5905,41 @@ var diff_view_default = _template("d", (input) => {
|
|
|
5889
5905
|
_html(`${_el_resume($scope0_id, "p")}</div><div class=diff-main>`);
|
|
5890
5906
|
_if(() => {
|
|
5891
5907
|
if (error) {
|
|
5892
|
-
const $
|
|
5893
|
-
_html(`<p class=toast-error>${_escape(error)}${_el_resume($
|
|
5894
|
-
_script($
|
|
5895
|
-
writeScope($
|
|
5908
|
+
const $scope17_id = _scope_id();
|
|
5909
|
+
_html(`<p class=toast-error>${_escape(error)}${_el_resume($scope17_id, "a")} <button>×</button>${_el_resume($scope17_id, "b")}</p>`);
|
|
5910
|
+
_script($scope17_id, "d33");
|
|
5911
|
+
writeScope($scope17_id, {});
|
|
5896
5912
|
return 0;
|
|
5897
5913
|
}
|
|
5898
5914
|
}, $scope0_id, "u", 1, 1, 1, 0, 1);
|
|
5915
|
+
_for_of(repoList.filter((r) => r.baseMissing), (repo) => {
|
|
5916
|
+
const $scope29_id = _scope_id();
|
|
5917
|
+
_html(`<p class=toast-error>${_escape(repo.worktree)}${_el_resume($scope29_id, "a")}: base <!>${_escape(repo.base)}${_el_resume($scope29_id, "b")} not found — showing uncommitted changes only.</p>`);
|
|
5918
|
+
writeScope($scope29_id, {});
|
|
5919
|
+
}, "worktree", $scope0_id, "v", 1, 1, 1, 0, 1);
|
|
5899
5920
|
_if(() => {
|
|
5900
5921
|
if (!repos && loading) {
|
|
5901
|
-
const $
|
|
5922
|
+
const $scope30_id = _scope_id();
|
|
5902
5923
|
_html("<div class=diff-skel><p class=dim><span class=spin></span>Loading diff…</p><div class=skel-row></div><div class=skel-row></div><div class=skel-row></div></div>");
|
|
5903
|
-
writeScope($
|
|
5924
|
+
writeScope($scope30_id, {});
|
|
5904
5925
|
return 0;
|
|
5905
5926
|
}
|
|
5906
|
-
}, $scope0_id, "
|
|
5927
|
+
}, $scope0_id, "w", 1, 1, 1, 0, 1);
|
|
5907
5928
|
_if(() => {
|
|
5908
5929
|
if (repos && !allFiles.length) {
|
|
5909
|
-
const $
|
|
5910
|
-
_html(`<p class="dim center-pad">No changes vs <!>${_escape(baseRef || "base")}${_el_resume($
|
|
5911
|
-
writeScope($
|
|
5930
|
+
const $scope20_id = _scope_id();
|
|
5931
|
+
_html(`<p class="dim center-pad">No changes vs <!>${_escape(baseRef || "base")}${_el_resume($scope20_id, "a")}.</p>`);
|
|
5932
|
+
writeScope($scope20_id, {});
|
|
5912
5933
|
return 0;
|
|
5913
5934
|
} else if (repos && !shownFiles.length) {
|
|
5914
|
-
const $
|
|
5915
|
-
_html(`<p class="dim center-pad">No files match "<!>${_escape(fileFilter)}${_el_resume($
|
|
5916
|
-
writeScope($
|
|
5935
|
+
const $scope18_id = _scope_id();
|
|
5936
|
+
_html(`<p class="dim center-pad">No files match "<!>${_escape(fileFilter)}${_el_resume($scope18_id, "a")}".</p>`);
|
|
5937
|
+
writeScope($scope18_id, {});
|
|
5917
5938
|
return 1;
|
|
5918
5939
|
}
|
|
5919
|
-
}, $scope0_id, "
|
|
5940
|
+
}, $scope0_id, "x", 1, 1, 1, 0, 1);
|
|
5920
5941
|
_for_of(repoList, (repo) => {
|
|
5921
|
-
const $
|
|
5942
|
+
const $scope9_id = _scope_id();
|
|
5922
5943
|
const $for_content3__repo_worktree__closures = /* @__PURE__ */ new Set();
|
|
5923
5944
|
const $for_content3__repo_full_name__closures = /* @__PURE__ */ new Set();
|
|
5924
5945
|
const $for_content3__repo_base__closures = /* @__PURE__ */ new Set();
|
|
@@ -5926,93 +5947,100 @@ var diff_view_default = _template("d", (input) => {
|
|
|
5926
5947
|
const repoFiles = filesByRepo.get(repo.worktree) || [];
|
|
5927
5948
|
_if(() => {
|
|
5928
5949
|
if (repoFiles.length) {
|
|
5929
|
-
const $
|
|
5950
|
+
const $scope10_id = _scope_id();
|
|
5930
5951
|
_html("<section class=repo-section>");
|
|
5931
5952
|
_if(() => {
|
|
5932
5953
|
if (repoList.length > 1) {
|
|
5933
|
-
const $
|
|
5934
|
-
_html(`<button class=${collapsedRepos.has(repo.worktree) ? "\"repo-sep closed\"" : "repo-sep"}><span class=tree-chev>${collapsedRepos.has(repo.worktree) ? "▸" : "▾"}${_el_resume($
|
|
5935
|
-
_script($
|
|
5936
|
-
_subscribe($for_content3__repo_base__closures, _subscribe($for_content3__repo_full_name__closures, _subscribe($for_content3__repo_worktree__closures, _subscribe($collapsedRepos__closures, writeScope($
|
|
5954
|
+
const $scope23_id = _scope_id();
|
|
5955
|
+
_html(`<button class=${collapsedRepos.has(repo.worktree) ? "\"repo-sep closed\"" : "repo-sep"}><span class=tree-chev>${collapsedRepos.has(repo.worktree) ? "▸" : "▾"}${_el_resume($scope23_id, "b")}</span><span class=mono>${_escape(repo.worktree)}${_el_resume($scope23_id, "c")}</span><span class=dim>${_escape(repo.full_name)}${_el_resume($scope23_id, "d")}</span><span class=chip>vs <!>${_escape(repo.base)}${_el_resume($scope23_id, "e")}</span></button>${_el_resume($scope23_id, "a")}`);
|
|
5956
|
+
_script($scope23_id, "d34");
|
|
5957
|
+
_subscribe($for_content3__repo_base__closures, _subscribe($for_content3__repo_full_name__closures, _subscribe($for_content3__repo_worktree__closures, _subscribe($collapsedRepos__closures, writeScope($scope23_id, { Ccb: 1 })))));
|
|
5937
5958
|
return 0;
|
|
5938
5959
|
}
|
|
5939
|
-
}, $
|
|
5960
|
+
}, $scope10_id, "a", 1, 1, 1, 0, 1);
|
|
5940
5961
|
_if(() => {
|
|
5941
5962
|
if (!(repoList.length > 1 && collapsedRepos.has(repo.worktree))) {
|
|
5942
|
-
const $
|
|
5963
|
+
const $scope11_id = _scope_id();
|
|
5943
5964
|
_html("<div class=files>");
|
|
5944
5965
|
_for_of(repoFiles, (file) => {
|
|
5945
|
-
const $
|
|
5966
|
+
const $scope12_id = _scope_id();
|
|
5946
5967
|
const $for_content4__file__closures = /* @__PURE__ */ new Set();
|
|
5947
5968
|
const $for_content4__file_key__closures = /* @__PURE__ */ new Set();
|
|
5948
5969
|
const $for_content4__fileComments__closures = /* @__PURE__ */ new Set();
|
|
5949
5970
|
const fileComments = commentsByFile.get(file.key) || [];
|
|
5950
5971
|
let expanded = !viewed.has(file.key);
|
|
5951
|
-
_html(`<details${_attr_details_or_dialog_open($
|
|
5972
|
+
_html(`<details${_attr_details_or_dialog_open($scope12_id, "a", expanded)} class=file${_attr("data-key", file.key)}><summary><span${_attr_class(["status", file.status])}>${_escape(file.status)}${_el_resume($scope12_id, "c")}</span>${_el_resume($scope12_id, "b")}<span class=path${_attr("title", file.path)}><bdi>${_escape(file.path)}${_el_resume($scope12_id, "e")}</bdi></span>${_el_resume($scope12_id, "d")}`);
|
|
5952
5973
|
_if(() => {
|
|
5953
5974
|
if (fileComments.length) {
|
|
5954
|
-
const $
|
|
5955
|
-
_html(`<span class=chip>💬 <!>${_escape(fileComments.length)}${_el_resume($
|
|
5956
|
-
writeScope($
|
|
5975
|
+
const $scope31_id = _scope_id();
|
|
5976
|
+
_html(`<span class=chip>💬 <!>${_escape(fileComments.length)}${_el_resume($scope31_id, "a")}</span>`);
|
|
5977
|
+
writeScope($scope31_id, {});
|
|
5957
5978
|
return 0;
|
|
5958
5979
|
}
|
|
5959
|
-
}, $
|
|
5960
|
-
_html(`<label class=viewed><input${_attr_input_checked($
|
|
5980
|
+
}, $scope12_id, "f", 1, 1, 1, 0, 1);
|
|
5981
|
+
_html(`<label class=viewed><input${_attr_input_checked($scope12_id, "h", viewed.has(file.key), _resume(function() {
|
|
5961
5982
|
toggleViewed(file.key);
|
|
5962
|
-
}, "d3", $
|
|
5983
|
+
}, "d3", $scope12_id))} type=checkbox>${_el_resume($scope12_id, "h")}<span class=dim>viewed</span></label>${_el_resume($scope12_id, "g")}</summary>`);
|
|
5963
5984
|
_if(() => {
|
|
5964
5985
|
if (file.binary) {
|
|
5965
|
-
const $
|
|
5986
|
+
const $scope32_id = _scope_id();
|
|
5966
5987
|
_html("<p class=\"dim diff-pad\">binary file</p>");
|
|
5967
|
-
writeScope($
|
|
5988
|
+
writeScope($scope32_id, {});
|
|
5968
5989
|
return 0;
|
|
5969
5990
|
} else if (file.tooLarge) {
|
|
5970
|
-
const $
|
|
5991
|
+
const $scope33_id = _scope_id();
|
|
5971
5992
|
_html("<p class=\"dim diff-pad\">file too large to display</p>");
|
|
5972
|
-
writeScope($
|
|
5993
|
+
writeScope($scope33_id, {});
|
|
5973
5994
|
return 1;
|
|
5995
|
+
} else if (file.old == null && file.new == null) {
|
|
5996
|
+
const $scope34_id = _scope_id();
|
|
5997
|
+
_html("<p class=\"dim diff-pad\">file could not be read</p>");
|
|
5998
|
+
writeScope($scope34_id, {});
|
|
5999
|
+
return 2;
|
|
5974
6000
|
} else if (expanded) {
|
|
5975
|
-
const $
|
|
6001
|
+
const $scope15_id = _scope_id();
|
|
5976
6002
|
_if(() => {
|
|
5977
6003
|
{
|
|
5978
|
-
const $
|
|
5979
|
-
_html(`<div class=diff-wait></div>${_el_resume($
|
|
5980
|
-
_script($
|
|
5981
|
-
writeScope($
|
|
6004
|
+
const $scope24_id = _scope_id();
|
|
6005
|
+
_html(`<div class=diff-wait></div>${_el_resume($scope24_id, "a")}`);
|
|
6006
|
+
_script($scope24_id, "d35");
|
|
6007
|
+
writeScope($scope24_id, {});
|
|
5982
6008
|
return 0;
|
|
5983
6009
|
}
|
|
5984
|
-
}, $
|
|
5985
|
-
writeScope($
|
|
5986
|
-
return
|
|
6010
|
+
}, $scope15_id, "a", 1, 1, 1, 0, 1);
|
|
6011
|
+
writeScope($scope15_id, {});
|
|
6012
|
+
return 3;
|
|
5987
6013
|
}
|
|
5988
|
-
}, $
|
|
5989
|
-
_html(`</details>${_el_resume($
|
|
5990
|
-
_script($
|
|
5991
|
-
_subscribe($toggleViewed2__closures, _subscribe($commentsByFile__closures, _subscribe($viewed__closures, writeScope($
|
|
6014
|
+
}, $scope12_id, "i");
|
|
6015
|
+
_html(`</details>${_el_resume($scope12_id, "a")}`);
|
|
6016
|
+
_script($scope12_id, "d36");
|
|
6017
|
+
_subscribe($toggleViewed2__closures, _subscribe($commentsByFile__closures, _subscribe($viewed__closures, writeScope($scope12_id, {
|
|
5992
6018
|
k: file,
|
|
5993
6019
|
l: file?.key,
|
|
5994
6020
|
r: file?.binary,
|
|
5995
6021
|
s: file?.tooLarge,
|
|
5996
|
-
t:
|
|
5997
|
-
u:
|
|
5998
|
-
v:
|
|
5999
|
-
|
|
6000
|
-
|
|
6001
|
-
z: $
|
|
6002
|
-
|
|
6003
|
-
|
|
6022
|
+
t: file?.old,
|
|
6023
|
+
u: file?.new,
|
|
6024
|
+
v: fileComments,
|
|
6025
|
+
w: fileComments.length,
|
|
6026
|
+
x: expanded,
|
|
6027
|
+
z: $for_content4__file__closures,
|
|
6028
|
+
a0: $for_content4__file_key__closures,
|
|
6029
|
+
a1: $for_content4__fileComments__closures,
|
|
6030
|
+
Cc1: 1,
|
|
6031
|
+
Cch: 1
|
|
6004
6032
|
}))));
|
|
6005
|
-
}, "key", $
|
|
6006
|
-
_subscribe($for_content3__repoFiles__closures, writeScope($
|
|
6033
|
+
}, "key", $scope11_id, "a", 1, 1, 1, "</div>", 1);
|
|
6034
|
+
_subscribe($for_content3__repoFiles__closures, writeScope($scope11_id, {}));
|
|
6007
6035
|
return 0;
|
|
6008
6036
|
}
|
|
6009
|
-
}, $
|
|
6037
|
+
}, $scope10_id, "b", 1, 1, 1, 0, 1);
|
|
6010
6038
|
_html("</section>");
|
|
6011
|
-
_subscribe($repoList_length__closures, _subscribe($collapsedRepos__closures, writeScope($
|
|
6039
|
+
_subscribe($repoList_length__closures, _subscribe($collapsedRepos__closures, writeScope($scope10_id, {})));
|
|
6012
6040
|
return 0;
|
|
6013
6041
|
}
|
|
6014
|
-
}, $
|
|
6015
|
-
writeScope($
|
|
6042
|
+
}, $scope9_id, "a", 1, 1, 1, 0, 1);
|
|
6043
|
+
writeScope($scope9_id, {
|
|
6016
6044
|
d: repo?.worktree,
|
|
6017
6045
|
f: repo?.full_name,
|
|
6018
6046
|
g: repo?.base,
|
|
@@ -6022,14 +6050,13 @@ var diff_view_default = _template("d", (input) => {
|
|
|
6022
6050
|
l: $for_content3__repo_base__closures,
|
|
6023
6051
|
m: $for_content3__repoFiles__closures
|
|
6024
6052
|
});
|
|
6025
|
-
}, "worktree", $scope0_id, "
|
|
6053
|
+
}, "worktree", $scope0_id, "y");
|
|
6026
6054
|
_html(`</div>${_el_resume($scope0_id, "t")}</div>`);
|
|
6027
|
-
_if(() => {}, $scope0_id, "
|
|
6055
|
+
_if(() => {}, $scope0_id, "z");
|
|
6028
6056
|
_html("</div>");
|
|
6029
6057
|
_if(() => {
|
|
6030
6058
|
if (askBase) {
|
|
6031
|
-
const $
|
|
6032
|
-
_set_serialize_reason(4);
|
|
6059
|
+
const $scope21_id = _scope_id();
|
|
6033
6060
|
const $childScope2 = _peek_scope_id();
|
|
6034
6061
|
prompt_dialog_default({
|
|
6035
6062
|
label: "Compare against ref",
|
|
@@ -6039,75 +6066,79 @@ var diff_view_default = _template("d", (input) => {
|
|
|
6039
6066
|
onSubmit: _resume(function(ref) {
|
|
6040
6067
|
askBase = false;
|
|
6041
6068
|
setBase(ref);
|
|
6042
|
-
}, "d24", $
|
|
6069
|
+
}, "d24", $scope21_id),
|
|
6043
6070
|
onCancel: _resume(function() {
|
|
6044
6071
|
askBase = false;
|
|
6045
|
-
}, "d25", $
|
|
6072
|
+
}, "d25", $scope21_id)
|
|
6046
6073
|
});
|
|
6047
|
-
writeScope($
|
|
6074
|
+
writeScope($scope21_id, { a: _existing_scope($childScope2) });
|
|
6048
6075
|
return 0;
|
|
6049
6076
|
}
|
|
6050
|
-
}, $scope0_id, "
|
|
6051
|
-
_script($scope0_id, "d38");
|
|
6077
|
+
}, $scope0_id, "a0");
|
|
6052
6078
|
_script($scope0_id, "d39");
|
|
6079
|
+
_script($scope0_id, "d40");
|
|
6053
6080
|
writeScope($scope0_id, {
|
|
6054
|
-
|
|
6055
|
-
|
|
6056
|
-
|
|
6057
|
-
|
|
6058
|
-
|
|
6059
|
-
|
|
6060
|
-
|
|
6061
|
-
|
|
6062
|
-
ac:
|
|
6063
|
-
|
|
6064
|
-
|
|
6065
|
-
|
|
6066
|
-
|
|
6067
|
-
|
|
6068
|
-
|
|
6069
|
-
|
|
6070
|
-
|
|
6071
|
-
|
|
6072
|
-
|
|
6073
|
-
at:
|
|
6074
|
-
|
|
6075
|
-
|
|
6076
|
-
|
|
6077
|
-
|
|
6078
|
-
|
|
6079
|
-
|
|
6080
|
-
|
|
6081
|
-
|
|
6082
|
-
|
|
6083
|
-
|
|
6084
|
-
|
|
6085
|
-
|
|
6086
|
-
|
|
6087
|
-
|
|
6088
|
-
|
|
6089
|
-
|
|
6090
|
-
|
|
6091
|
-
|
|
6092
|
-
|
|
6093
|
-
|
|
6094
|
-
|
|
6095
|
-
br:
|
|
6096
|
-
bs:
|
|
6097
|
-
|
|
6098
|
-
|
|
6099
|
-
|
|
6100
|
-
|
|
6101
|
-
|
|
6102
|
-
|
|
6103
|
-
|
|
6104
|
-
|
|
6105
|
-
|
|
6106
|
-
|
|
6107
|
-
|
|
6108
|
-
|
|
6109
|
-
|
|
6110
|
-
|
|
6081
|
+
a3: input.workspaceId,
|
|
6082
|
+
a4: input.active,
|
|
6083
|
+
a5: input.sessions,
|
|
6084
|
+
a7: input.onSent,
|
|
6085
|
+
a8: input.onExit,
|
|
6086
|
+
a9: input.sessions?.[0]?.title,
|
|
6087
|
+
aa: input.sessions?.[0]?.agent,
|
|
6088
|
+
ab: repos,
|
|
6089
|
+
ac: comments,
|
|
6090
|
+
ae: viewed,
|
|
6091
|
+
ag: viewed?.size,
|
|
6092
|
+
ah: draft,
|
|
6093
|
+
aj: error,
|
|
6094
|
+
ak: loading,
|
|
6095
|
+
am: copied,
|
|
6096
|
+
an: sending,
|
|
6097
|
+
ao: sendTarget,
|
|
6098
|
+
aq: fileFilter,
|
|
6099
|
+
ar: baseRef,
|
|
6100
|
+
at: treeOpen,
|
|
6101
|
+
aw: collapsedDirs,
|
|
6102
|
+
ax: collapsedRepos,
|
|
6103
|
+
ay: toggleRepo,
|
|
6104
|
+
b0: nearBox.cbs,
|
|
6105
|
+
b1: nearBox.io,
|
|
6106
|
+
b3: observeNear,
|
|
6107
|
+
b4: load,
|
|
6108
|
+
b5: loadReview,
|
|
6109
|
+
b7: repoList,
|
|
6110
|
+
b8: repoList.length,
|
|
6111
|
+
b9: allFiles,
|
|
6112
|
+
ba: allFiles?.length,
|
|
6113
|
+
bb: fileMatch,
|
|
6114
|
+
bd: shownFiles,
|
|
6115
|
+
bh: filesByRepo,
|
|
6116
|
+
bj: commentsByFile,
|
|
6117
|
+
bk: defaultBranches,
|
|
6118
|
+
bm: sendPick,
|
|
6119
|
+
bn: setBase,
|
|
6120
|
+
bp: toggleViewed,
|
|
6121
|
+
bq: saveComment,
|
|
6122
|
+
br: removeComment,
|
|
6123
|
+
bs: clearComments,
|
|
6124
|
+
bv: copyMarkdown,
|
|
6125
|
+
bw: sendTo,
|
|
6126
|
+
bx: jumpTo,
|
|
6127
|
+
ca: $collapsedDirs__closures,
|
|
6128
|
+
c1: $viewed__closures,
|
|
6129
|
+
ch: $commentsByFile__closures,
|
|
6130
|
+
cg: $filesByRepo__closures,
|
|
6131
|
+
bz: $si__input_sessions_0_title && $input_sessions_0_title__closures,
|
|
6132
|
+
c0: $si__input_sessions_0_agent && $input_sessions_0_agent__closures,
|
|
6133
|
+
c6: $sending__closures,
|
|
6134
|
+
by: $si__input_sessions && $input_sessions__closures,
|
|
6135
|
+
c7: $sendTarget__closures,
|
|
6136
|
+
cb: $collapsedRepos__closures,
|
|
6137
|
+
c3: $draft__closures,
|
|
6138
|
+
ck: $saveComment2__closures,
|
|
6139
|
+
cl: $removeComment2__closures,
|
|
6140
|
+
cj: $toggleViewed2__closures,
|
|
6141
|
+
cd: $repoList_length__closures
|
|
6111
6142
|
});
|
|
6112
6143
|
_resume_branch($scope0_id);
|
|
6113
6144
|
});
|
|
@@ -6485,7 +6516,7 @@ var usage_stats_default = _template("n", (input) => {
|
|
|
6485
6516
|
//#region src/tags/work-view.marko
|
|
6486
6517
|
var api$1;
|
|
6487
6518
|
var work_view_default = _template("o", (input) => {
|
|
6488
|
-
const $scope0_reason = _scope_reason(), $sg__input_agents = _serialize_guard($scope0_reason, 8), $sg__input_workspace = _serialize_guard($scope0_reason, 2), $si__input_workspace = _serialize_if($scope0_reason, 2), $
|
|
6519
|
+
const $scope0_reason = _scope_reason(), $sg__input_agents = _serialize_guard($scope0_reason, 8), $sg__input_workspace = _serialize_guard($scope0_reason, 2), $si__input_workspace = _serialize_if($scope0_reason, 2), $si__input_active = _serialize_if($scope0_reason, 4), $si__input_agents = _serialize_if($scope0_reason, 8), $si__input_preferred = _serialize_if($scope0_reason, 5);
|
|
6489
6520
|
const $scope0_id = _scope_id();
|
|
6490
6521
|
const $input_active__closures = /* @__PURE__ */ new Set();
|
|
6491
6522
|
const $input_agents__closures = /* @__PURE__ */ new Set();
|
|
@@ -6497,12 +6528,14 @@ var work_view_default = _template("o", (input) => {
|
|
|
6497
6528
|
const $closeSession2__closures = /* @__PURE__ */ new Set();
|
|
6498
6529
|
const $newSession2__closures = /* @__PURE__ */ new Set();
|
|
6499
6530
|
const $input_preferred__closures = /* @__PURE__ */ new Set();
|
|
6531
|
+
const $spawning__closures = /* @__PURE__ */ new Set();
|
|
6500
6532
|
let sessions = null;
|
|
6501
6533
|
let tab = null;
|
|
6502
6534
|
let view = "term";
|
|
6503
6535
|
let drawerOpen = false;
|
|
6504
6536
|
let usageOpen = false;
|
|
6505
6537
|
let error = null;
|
|
6538
|
+
let spawning = false;
|
|
6506
6539
|
let renaming = null;
|
|
6507
6540
|
const ws = input.workspace;
|
|
6508
6541
|
const shownSessions = sessions ?? input.allStatus?.[ws.id]?.sessions ?? null;
|
|
@@ -6513,6 +6546,7 @@ var work_view_default = _template("o", (input) => {
|
|
|
6513
6546
|
return shownSessions?.[0]?.id ?? null;
|
|
6514
6547
|
})();
|
|
6515
6548
|
const createSession = _resume(async (agent, select) => {
|
|
6549
|
+
spawning = true;
|
|
6516
6550
|
try {
|
|
6517
6551
|
const session = await api$1(`/api/workspaces/${ws.id}/sessions`, {
|
|
6518
6552
|
method: "POST",
|
|
@@ -6527,6 +6561,8 @@ var work_view_default = _template("o", (input) => {
|
|
|
6527
6561
|
} catch (err) {
|
|
6528
6562
|
error = String(err.message || err);
|
|
6529
6563
|
return null;
|
|
6564
|
+
} finally {
|
|
6565
|
+
spawning = false;
|
|
6530
6566
|
}
|
|
6531
6567
|
}, "o0", $scope0_id);
|
|
6532
6568
|
const loadMem = {
|
|
@@ -6666,7 +6702,7 @@ var work_view_default = _template("o", (input) => {
|
|
|
6666
6702
|
}, $scope0_id, "b", 1, 1, 1, 0, 1);
|
|
6667
6703
|
const $show = view === "diff";
|
|
6668
6704
|
_show_start($show, 1);
|
|
6669
|
-
_set_serialize_reason(
|
|
6705
|
+
_set_serialize_reason(26);
|
|
6670
6706
|
const $childScope2 = _peek_scope_id();
|
|
6671
6707
|
diff_view_default({
|
|
6672
6708
|
workspaceId: ws.id,
|
|
@@ -6752,9 +6788,9 @@ var work_view_default = _template("o", (input) => {
|
|
|
6752
6788
|
_if(() => {
|
|
6753
6789
|
if (!shownSessions.length) {
|
|
6754
6790
|
const $scope3_id = _scope_id();
|
|
6755
|
-
_html(`<div class=empty-sess><p class=dim>No sessions in this workspace.</p><button class="btn primary"
|
|
6791
|
+
_html(`<div class=empty-sess><p class=dim>No sessions in this workspace.</p><button class="btn primary"${_attr("disabled", spawning)}>${spawning ? "Starting…" : `Start ${_escape(`${input.preferred || "claude"}`)}`}${_el_resume($scope3_id, "b")}</button>${_el_resume($scope3_id, "a")}</div>`);
|
|
6756
6792
|
_script($scope3_id, "o29");
|
|
6757
|
-
_subscribe($si__input_preferred && $input_preferred__closures, writeScope($scope3_id, {}));
|
|
6793
|
+
_subscribe($spawning__closures, _subscribe($si__input_preferred && $input_preferred__closures, writeScope($scope3_id, {})));
|
|
6758
6794
|
return 0;
|
|
6759
6795
|
}
|
|
6760
6796
|
}, $scope1_id, "b", 1, 1, 1, 0, 1);
|
|
@@ -6781,7 +6817,6 @@ var work_view_default = _template("o", (input) => {
|
|
|
6781
6817
|
_if(() => {
|
|
6782
6818
|
if (renaming) {
|
|
6783
6819
|
const $scope6_id = _scope_id();
|
|
6784
|
-
_set_serialize_reason(4);
|
|
6785
6820
|
const $childScope4 = _peek_scope_id();
|
|
6786
6821
|
prompt_dialog_default({
|
|
6787
6822
|
label: "Rename session",
|
|
@@ -6817,36 +6852,38 @@ var work_view_default = _template("o", (input) => {
|
|
|
6817
6852
|
y: view,
|
|
6818
6853
|
a0: drawerOpen,
|
|
6819
6854
|
a2: error,
|
|
6820
|
-
|
|
6821
|
-
a5: renaming?.
|
|
6822
|
-
a6: renaming?.
|
|
6823
|
-
|
|
6824
|
-
|
|
6825
|
-
ae: ws?.
|
|
6826
|
-
af:
|
|
6827
|
-
|
|
6828
|
-
ai:
|
|
6829
|
-
|
|
6830
|
-
|
|
6831
|
-
|
|
6832
|
-
aq:
|
|
6833
|
-
|
|
6834
|
-
|
|
6835
|
-
av:
|
|
6836
|
-
aw:
|
|
6837
|
-
ax:
|
|
6855
|
+
a3: spawning,
|
|
6856
|
+
a5: renaming?.title,
|
|
6857
|
+
a6: renaming?.agent,
|
|
6858
|
+
a7: renaming?.id,
|
|
6859
|
+
a9: ws?.id,
|
|
6860
|
+
ae: ws?.status,
|
|
6861
|
+
af: ws?.name,
|
|
6862
|
+
ag: shownSessions,
|
|
6863
|
+
ai: shownSessions?.length,
|
|
6864
|
+
aj: curTab,
|
|
6865
|
+
al: createSession,
|
|
6866
|
+
ao: loadMem.wanted,
|
|
6867
|
+
aq: loadMem.run,
|
|
6868
|
+
ar: loadBody,
|
|
6869
|
+
at: loadSessions,
|
|
6870
|
+
av: closeSession,
|
|
6871
|
+
aw: renameSession,
|
|
6872
|
+
ax: newSession,
|
|
6873
|
+
ay: promptRename,
|
|
6838
6874
|
a: _existing_scope($childScope),
|
|
6839
6875
|
d: _existing_scope($childScope2),
|
|
6840
|
-
|
|
6841
|
-
|
|
6842
|
-
|
|
6843
|
-
|
|
6844
|
-
|
|
6845
|
-
|
|
6846
|
-
|
|
6847
|
-
|
|
6848
|
-
|
|
6849
|
-
|
|
6876
|
+
az: $si__input_active && $input_active__closures,
|
|
6877
|
+
b1: $si__input_agents && $input_agents__closures,
|
|
6878
|
+
b2: $view__closures,
|
|
6879
|
+
b8: $si__input_workspace && $ws_id__closures,
|
|
6880
|
+
b9: $si__input_workspace && $ws_name__closures,
|
|
6881
|
+
ba: $shownSessions__closures,
|
|
6882
|
+
bc: $curTab__closures,
|
|
6883
|
+
bd: $closeSession2__closures,
|
|
6884
|
+
bf: $newSession2__closures,
|
|
6885
|
+
b0: $si__input_preferred && $input_preferred__closures,
|
|
6886
|
+
b4: $spawning__closures
|
|
6850
6887
|
});
|
|
6851
6888
|
_resume_branch($scope0_id);
|
|
6852
6889
|
});
|
|
@@ -6858,6 +6895,7 @@ var prefs;
|
|
|
6858
6895
|
var _page_default = _template("b", (input) => {
|
|
6859
6896
|
_scope_reason();
|
|
6860
6897
|
const $scope0_id = _scope_id();
|
|
6898
|
+
const $error__closures = /* @__PURE__ */ new Set();
|
|
6861
6899
|
const $workspaces__closures = /* @__PURE__ */ new Set();
|
|
6862
6900
|
const $status__closures = /* @__PURE__ */ new Set();
|
|
6863
6901
|
const $settings__closures = /* @__PURE__ */ new Set();
|
|
@@ -6876,23 +6914,27 @@ var _page_default = _template("b", (input) => {
|
|
|
6876
6914
|
let paletteOpen = false;
|
|
6877
6915
|
let error = null;
|
|
6878
6916
|
const load = _resume(async () => {
|
|
6879
|
-
|
|
6880
|
-
|
|
6881
|
-
|
|
6882
|
-
|
|
6883
|
-
|
|
6884
|
-
|
|
6885
|
-
|
|
6886
|
-
|
|
6887
|
-
|
|
6888
|
-
|
|
6889
|
-
|
|
6890
|
-
|
|
6891
|
-
selectedId
|
|
6892
|
-
|
|
6917
|
+
try {
|
|
6918
|
+
const [list] = await Promise.all([api("/api/workspaces"), prefs.sync()]);
|
|
6919
|
+
workspaces = list;
|
|
6920
|
+
if (!loaded) {
|
|
6921
|
+
const last = prefs.lastWorkspace();
|
|
6922
|
+
if (last && list.some((ws) => ws.id === last)) {
|
|
6923
|
+
selectedId = last;
|
|
6924
|
+
openIds = [last];
|
|
6925
|
+
}
|
|
6926
|
+
} else {
|
|
6927
|
+
const activeIds = new Set(list.filter((ws) => ws.status === "active").map((ws) => ws.id));
|
|
6928
|
+
openIds = openIds.filter((id) => activeIds.has(id));
|
|
6929
|
+
if (selectedId && !activeIds.has(selectedId)) {
|
|
6930
|
+
selectedId = openIds[openIds.length - 1] || null;
|
|
6931
|
+
prefs.setLastWorkspace(selectedId);
|
|
6932
|
+
}
|
|
6893
6933
|
}
|
|
6934
|
+
loaded = true;
|
|
6935
|
+
} catch (err) {
|
|
6936
|
+
error = `Loading workspaces failed: ${err.message || String(err)}`;
|
|
6894
6937
|
}
|
|
6895
|
-
loaded = true;
|
|
6896
6938
|
}, "b0", $scope0_id);
|
|
6897
6939
|
const statusMem = {
|
|
6898
6940
|
run: void 0,
|
|
@@ -6930,7 +6972,7 @@ var _page_default = _template("b", (input) => {
|
|
|
6930
6972
|
const showInlinePalette = !creating && !selected && loaded;
|
|
6931
6973
|
_html("<main>");
|
|
6932
6974
|
_if(() => {
|
|
6933
|
-
if (error) {
|
|
6975
|
+
if (error && loaded) {
|
|
6934
6976
|
const $scope6_id = _scope_id();
|
|
6935
6977
|
_html(`<p class=toast-error>${_escape(error)}${_el_resume($scope6_id, "a")} <button>×</button>${_el_resume($scope6_id, "b")}</p>`);
|
|
6936
6978
|
_script($scope6_id, "b18");
|
|
@@ -6941,7 +6983,21 @@ var _page_default = _template("b", (input) => {
|
|
|
6941
6983
|
_if(() => {
|
|
6942
6984
|
if (!loaded) {
|
|
6943
6985
|
const $scope7_id = _scope_id();
|
|
6944
|
-
_html("<div class=\"boot dim\"
|
|
6986
|
+
_html("<div class=\"boot dim\">");
|
|
6987
|
+
_if(() => {
|
|
6988
|
+
if (error) {
|
|
6989
|
+
const $scope8_id = _scope_id();
|
|
6990
|
+
_html(`<p>${_escape(error)}${_el_resume($scope8_id, "a")}</p><button class=btn>Retry</button>${_el_resume($scope8_id, "b")}`);
|
|
6991
|
+
_script($scope8_id, "b19");
|
|
6992
|
+
_subscribe($error__closures, writeScope($scope8_id, {}));
|
|
6993
|
+
return 0;
|
|
6994
|
+
} else {
|
|
6995
|
+
const $scope9_id = _scope_id();
|
|
6996
|
+
_html("<span class=spin></span>Loading workspaces…");
|
|
6997
|
+
writeScope($scope9_id, {});
|
|
6998
|
+
return 1;
|
|
6999
|
+
}
|
|
7000
|
+
}, $scope7_id, "a", 1, 1, 1, "</div>");
|
|
6945
7001
|
writeScope($scope7_id, {});
|
|
6946
7002
|
return 0;
|
|
6947
7003
|
}
|
|
@@ -6968,6 +7024,7 @@ var _page_default = _template("b", (input) => {
|
|
|
6968
7024
|
openWorkspace(ws.id);
|
|
6969
7025
|
}, "b5", $scope1_id),
|
|
6970
7026
|
onNewSession: _resume(function(ws, agent) {
|
|
7027
|
+
paletteOpen = false;
|
|
6971
7028
|
api(`/api/workspaces/${ws.id}/sessions`, {
|
|
6972
7029
|
method: "POST",
|
|
6973
7030
|
headers: { "content-type": "application/json" },
|
|
@@ -7076,7 +7133,7 @@ var _page_default = _template("b", (input) => {
|
|
|
7076
7133
|
});
|
|
7077
7134
|
}, (id) => id, $scope0_id, "f");
|
|
7078
7135
|
_html("</main>");
|
|
7079
|
-
_script($scope0_id, "
|
|
7136
|
+
_script($scope0_id, "b20");
|
|
7080
7137
|
writeScope($scope0_id, {
|
|
7081
7138
|
g: workspaces,
|
|
7082
7139
|
h: status,
|
|
@@ -7088,21 +7145,22 @@ var _page_default = _template("b", (input) => {
|
|
|
7088
7145
|
q: managingId,
|
|
7089
7146
|
s: paletteOpen,
|
|
7090
7147
|
t: error,
|
|
7091
|
-
|
|
7092
|
-
|
|
7093
|
-
|
|
7094
|
-
|
|
7095
|
-
|
|
7096
|
-
|
|
7097
|
-
|
|
7098
|
-
|
|
7099
|
-
|
|
7100
|
-
a8: $
|
|
7101
|
-
a9: $
|
|
7102
|
-
aa: $
|
|
7103
|
-
ab: $
|
|
7104
|
-
|
|
7105
|
-
af: $
|
|
7148
|
+
v: load,
|
|
7149
|
+
x: statusMem.fresh,
|
|
7150
|
+
y: statusMem.run,
|
|
7151
|
+
a0: loadStatus,
|
|
7152
|
+
a1: openWorkspace,
|
|
7153
|
+
a3: selected,
|
|
7154
|
+
a5: managing,
|
|
7155
|
+
a6: showInlinePalette,
|
|
7156
|
+
ae: $error__closures,
|
|
7157
|
+
a8: $workspaces__closures,
|
|
7158
|
+
a9: $status__closures,
|
|
7159
|
+
aa: $settings__closures,
|
|
7160
|
+
ab: $selectedId__closures,
|
|
7161
|
+
ac: $creating__closures,
|
|
7162
|
+
af: $openWorkspace2__closures,
|
|
7163
|
+
ag: $managing__closures
|
|
7106
7164
|
});
|
|
7107
7165
|
_resume_branch($scope0_id);
|
|
7108
7166
|
});
|
|
@@ -13063,8 +13121,14 @@ function setScrapedPhase(sessionId, phase, blockerText) {
|
|
|
13063
13121
|
reasons.set(sessionId, "attention");
|
|
13064
13122
|
if (blockerText) scrapedSummaries.set(sessionId, blockerText);
|
|
13065
13123
|
} else scrapedSummaries.delete(sessionId);
|
|
13066
|
-
|
|
13124
|
+
const stalePin = phase === "working" && phases.get(sessionId) === "waiting" && (reasons.get(sessionId) === "done" || scraped.get(sessionId) === "waiting");
|
|
13125
|
+
if (scraped.get(sessionId) === phase && !stalePin) return;
|
|
13067
13126
|
applyChange(sessionId, () => {
|
|
13127
|
+
if (stalePin) {
|
|
13128
|
+
phases.delete(sessionId);
|
|
13129
|
+
summaries.delete(sessionId);
|
|
13130
|
+
reasons.delete(sessionId);
|
|
13131
|
+
}
|
|
13068
13132
|
if (phase) scraped.set(sessionId, phase);
|
|
13069
13133
|
else scraped.delete(sessionId);
|
|
13070
13134
|
});
|
|
@@ -13437,6 +13501,10 @@ function cleanEnv() {
|
|
|
13437
13501
|
];
|
|
13438
13502
|
const parts = (env.PATH || "").split(":");
|
|
13439
13503
|
env.PATH = [...parts, ...bins.filter((bin) => !parts.includes(bin))].join(":");
|
|
13504
|
+
if (!/utf-?8/i.test(env.LC_ALL || env.LC_CTYPE || env.LANG || "")) {
|
|
13505
|
+
delete env.LC_ALL;
|
|
13506
|
+
env.LC_CTYPE = process.platform === "darwin" ? "UTF-8" : "C.UTF-8";
|
|
13507
|
+
}
|
|
13440
13508
|
return env;
|
|
13441
13509
|
}
|
|
13442
13510
|
var AGENT_BOOT_MS = 1500;
|
|
@@ -13707,8 +13775,8 @@ function hydrate(ws) {
|
|
|
13707
13775
|
return ws;
|
|
13708
13776
|
}
|
|
13709
13777
|
async function createWorkspace(name, repos) {
|
|
13778
|
+
if (!name.trim()) throw new Error("workspace name required");
|
|
13710
13779
|
const slug = slugify(name);
|
|
13711
|
-
if (!slug) throw new Error("workspace name required");
|
|
13712
13780
|
const id = randomId();
|
|
13713
13781
|
const dir = path.join(config.workRoot, `${slug}-${id}`);
|
|
13714
13782
|
const branch = `${config.branchPrefix}-${slug}-${id}`;
|
|
@@ -13817,9 +13885,14 @@ async function removeRepo(workspaceId, worktree) {
|
|
|
13817
13885
|
], bare).catch(() => {});
|
|
13818
13886
|
});
|
|
13819
13887
|
db.prepare("DELETE FROM repos WHERE workspace_id = ? AND worktree = ?").run(workspaceId, worktree);
|
|
13888
|
+
db.prepare("DELETE FROM review_comments WHERE workspace_id = ? AND worktree = ?").run(workspaceId, worktree);
|
|
13889
|
+
db.prepare("DELETE FROM review_viewed WHERE workspace_id = ? AND key GLOB ? || '/*'").run(workspaceId, worktree);
|
|
13820
13890
|
const updated = getWorkspace(workspaceId);
|
|
13821
|
-
|
|
13891
|
+
try {
|
|
13892
|
+
writeAgentsMd(ws.path, ws.branch, updated.repos);
|
|
13893
|
+
} catch {}
|
|
13822
13894
|
publish("workspaces.changed");
|
|
13895
|
+
publish("review.changed", { workspaceId });
|
|
13823
13896
|
return updated;
|
|
13824
13897
|
}
|
|
13825
13898
|
async function setWorkspaceStatus(id, status) {
|
|
@@ -13967,8 +14040,12 @@ async function workspaceBranches(bare, branch, exclude) {
|
|
|
13967
14040
|
const owns = (ref, b) => ref === b || ref.startsWith(`${b}-`);
|
|
13968
14041
|
return out.split("\n").filter((b) => owns(b, branch) && !exclude.some((x) => owns(b, x)));
|
|
13969
14042
|
}
|
|
14043
|
+
/** Directory/branch-safe prefix for a workspace name. Decomposing first keeps
|
|
14044
|
+
* accented Latin readable (é → e); a name with nothing ASCII left (another
|
|
14045
|
+
* script, emoji) falls back to a generic prefix — the random id is what makes
|
|
14046
|
+
* the name unique, so the slug never has to be rejected. */
|
|
13970
14047
|
function slugify(name) {
|
|
13971
|
-
return name.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "");
|
|
14048
|
+
return name.normalize("NFKD").replace(/\p{M}+/gu, "").toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "") || "ws";
|
|
13972
14049
|
}
|
|
13973
14050
|
function randomId() {
|
|
13974
14051
|
return Math.random().toString(36).slice(2, 8);
|
|
@@ -15366,16 +15443,18 @@ async function scan() {
|
|
|
15366
15443
|
"-a",
|
|
15367
15444
|
"-F",
|
|
15368
15445
|
"#{session_name} #{pane_title}"
|
|
15369
|
-
]).catch(() =>
|
|
15446
|
+
]).catch(() => null);
|
|
15447
|
+
if (out === null) return false;
|
|
15370
15448
|
for (const line of out.split("\n")) {
|
|
15371
15449
|
const [name, ...title] = line.split(" ");
|
|
15372
15450
|
if (name?.startsWith("wk-")) panes.set(name.slice(3), title.join(" "));
|
|
15373
15451
|
}
|
|
15374
|
-
|
|
15375
|
-
if (
|
|
15376
|
-
|
|
15377
|
-
|
|
15378
|
-
|
|
15452
|
+
for (const session of sessions) {
|
|
15453
|
+
if (panes.has(session.id)) continue;
|
|
15454
|
+
clearAgentPhase(session.id);
|
|
15455
|
+
}
|
|
15456
|
+
const live = sessions.filter((session) => panes.has(session.id));
|
|
15457
|
+
await Promise.all(live.map(async (session) => {
|
|
15379
15458
|
const screen = await tmux([
|
|
15380
15459
|
"capture-pane",
|
|
15381
15460
|
"-p",
|
|
@@ -15390,7 +15469,7 @@ async function scan() {
|
|
|
15390
15469
|
if (result.skip) return;
|
|
15391
15470
|
setScrapedPhase(session.id, result.state === "working" ? "working" : result.state === "blocked" ? "waiting" : void 0, result.blockerText && blockerSummary(result.blockerText));
|
|
15392
15471
|
}));
|
|
15393
|
-
return
|
|
15472
|
+
return live.length > 0;
|
|
15394
15473
|
}
|
|
15395
15474
|
/** Human-readable line(s) from a blocker region: the question the agent is
|
|
15396
15475
|
* asking, with box borders, option lists, and hint bars stripped. */
|
|
@@ -15540,7 +15619,10 @@ async function refreshPrsBatch(fullNames, force = false) {
|
|
|
15540
15619
|
const [owner, name] = fullName.split("/");
|
|
15541
15620
|
return `r${i}: repository(owner: ${JSON.stringify(owner)}, name: ${JSON.stringify(name)}) { pullRequests(first: 50, orderBy: {field: UPDATED_AT, direction: DESC}) { nodes { number title url headRefName isDraft state reviewDecision } } }`;
|
|
15542
15621
|
}).join(" ") + "}"}`
|
|
15543
|
-
])
|
|
15622
|
+
]).catch((err) => {
|
|
15623
|
+
if (!err.stdout) throw err;
|
|
15624
|
+
return err.stdout;
|
|
15625
|
+
});
|
|
15544
15626
|
const data = JSON.parse(out).data;
|
|
15545
15627
|
if (!data) throw new Error("graphql response without data");
|
|
15546
15628
|
names.forEach((fullName, i) => {
|
|
@@ -15587,7 +15669,11 @@ async function freshenBaseRefs(dir, fullName, refs) {
|
|
|
15587
15669
|
"origin",
|
|
15588
15670
|
ref
|
|
15589
15671
|
], dir).catch(() => {}));
|
|
15590
|
-
|
|
15672
|
+
let timer;
|
|
15673
|
+
await Promise.race([Promise.all(fetches), new Promise((resolve) => {
|
|
15674
|
+
timer = setTimeout(resolve, FETCH_WAIT_MS);
|
|
15675
|
+
})]);
|
|
15676
|
+
clearTimeout(timer);
|
|
15591
15677
|
}
|
|
15592
15678
|
/** The ref the working tree is compared against by default, best first:
|
|
15593
15679
|
* the workspace branch's remote (a lane worktree then shows its whole
|
|
@@ -15620,7 +15706,8 @@ async function resolveBase(dir, wsBranch, baseBranch, baseRef) {
|
|
|
15620
15706
|
} catch {}
|
|
15621
15707
|
return {
|
|
15622
15708
|
mergeBase: "HEAD",
|
|
15623
|
-
label: baseRef || baseBranch
|
|
15709
|
+
label: baseRef || baseBranch,
|
|
15710
|
+
missing: true
|
|
15624
15711
|
};
|
|
15625
15712
|
}
|
|
15626
15713
|
/** Changed files per repo: merge-base of a base ref vs the working tree.
|
|
@@ -15638,7 +15725,7 @@ async function workspaceDiff(ws, baseRef) {
|
|
|
15638
15725
|
...branch !== "HEAD" ? [branch] : [],
|
|
15639
15726
|
...baseRef ? [baseRef] : [repo.base_branch]
|
|
15640
15727
|
]);
|
|
15641
|
-
const { mergeBase, label } = await resolveBase(dir, ws.branch, repo.base_branch, baseRef);
|
|
15728
|
+
const { mergeBase, label, missing } = await resolveBase(dir, ws.branch, repo.base_branch, baseRef);
|
|
15642
15729
|
const [nameStatus, untracked] = await Promise.all([git([
|
|
15643
15730
|
"diff",
|
|
15644
15731
|
"--name-status",
|
|
@@ -15669,6 +15756,7 @@ async function workspaceDiff(ws, baseRef) {
|
|
|
15669
15756
|
full_name: repo.full_name,
|
|
15670
15757
|
base: label,
|
|
15671
15758
|
default_branch: repo.default_branch,
|
|
15759
|
+
...missing && { baseMissing: true },
|
|
15672
15760
|
files
|
|
15673
15761
|
};
|
|
15674
15762
|
}));
|
|
@@ -15676,8 +15764,8 @@ async function workspaceDiff(ws, baseRef) {
|
|
|
15676
15764
|
/** Count of changed files vs the default base's merge-base (incl.
|
|
15677
15765
|
* untracked) — same notion of "changed" as the diff view's default. */
|
|
15678
15766
|
async function changedFileCount(dir, wsBranch, baseBranch) {
|
|
15679
|
-
const { mergeBase } = await resolveBase(dir, wsBranch, baseBranch);
|
|
15680
|
-
if (
|
|
15767
|
+
const { mergeBase, missing } = await resolveBase(dir, wsBranch, baseBranch);
|
|
15768
|
+
if (missing) return 0;
|
|
15681
15769
|
const [changed, untracked] = await Promise.all([git([
|
|
15682
15770
|
"diff",
|
|
15683
15771
|
"--name-only",
|
|
@@ -15854,22 +15942,21 @@ async function computeStatus() {
|
|
|
15854
15942
|
const workspaces = listWorkspaces().filter((ws) => ws.status === "active");
|
|
15855
15943
|
const paths = new Map(workspaces.map((ws) => [ws.id, ws.path]));
|
|
15856
15944
|
const [ports, states] = await Promise.all([portsByWorkspace(paths), sessionStates()]);
|
|
15857
|
-
const result = {};
|
|
15858
15945
|
const allBranches = listWorkspaces().map((w) => ({
|
|
15859
15946
|
id: w.id,
|
|
15860
15947
|
branch: w.branch
|
|
15861
15948
|
}));
|
|
15862
|
-
await Promise.all(workspaces.map(async (ws) => {
|
|
15949
|
+
const entries = await Promise.all(workspaces.map(async (ws) => {
|
|
15863
15950
|
const foreign = allBranches.filter((w) => w.id !== ws.id).map((w) => w.branch);
|
|
15864
15951
|
const statuses = await Promise.all(ws.repos.map((repo) => repoStatus(ws, repo, foreign)));
|
|
15865
|
-
|
|
15952
|
+
return [ws.id, {
|
|
15866
15953
|
ports: ports.get(ws.id) || [],
|
|
15867
15954
|
repos: statuses.map((s) => s.status),
|
|
15868
15955
|
...sessionCounts(ws.id, states),
|
|
15869
15956
|
changes: statuses.reduce((sum, s) => sum + s.changed, 0)
|
|
15870
|
-
};
|
|
15957
|
+
}];
|
|
15871
15958
|
}));
|
|
15872
|
-
return
|
|
15959
|
+
return Object.fromEntries(entries);
|
|
15873
15960
|
}
|
|
15874
15961
|
async function repoStatus(ws, repo, foreign) {
|
|
15875
15962
|
const dir = path.join(ws.path, repo.worktree);
|
|
@@ -15926,39 +16013,50 @@ var PADDING = `: ${" ".repeat(2048)}\n\n`;
|
|
|
15926
16013
|
/** Heartbeat cadence: keeps intermediaries from idling the stream out and
|
|
15927
16014
|
* lets the client detect a dead/buffered stream and fall back to polling. */
|
|
15928
16015
|
var PING_MS = 15e3;
|
|
16016
|
+
var SSE_HEADERS = {
|
|
16017
|
+
"content-type": "text/event-stream",
|
|
16018
|
+
"cache-control": "no-store, no-transform",
|
|
16019
|
+
"x-accel-buffering": "no"
|
|
16020
|
+
};
|
|
15929
16021
|
//#endregion
|
|
15930
16022
|
//#region __marko-run__api.events.js
|
|
15931
16023
|
var getHandler$14 = normalizeHandler(Run.GET((ctx) => {
|
|
16024
|
+
if (ctx.request.method === "HEAD") return new Response(null, { headers: SSE_HEADERS });
|
|
15932
16025
|
const encoder = new TextEncoder();
|
|
15933
|
-
|
|
15934
|
-
|
|
15935
|
-
|
|
15936
|
-
|
|
15937
|
-
|
|
15938
|
-
|
|
15939
|
-
|
|
15940
|
-
|
|
15941
|
-
|
|
15942
|
-
|
|
15943
|
-
|
|
15944
|
-
|
|
15945
|
-
|
|
16026
|
+
let cleanup = () => {};
|
|
16027
|
+
const stream = new ReadableStream({
|
|
16028
|
+
start(controller) {
|
|
16029
|
+
controller.enqueue(encoder.encode(`retry: 3000\n${PADDING}event: hello\ndata: ${JSON.stringify({ boot: BOOT_ID })}\n\n`));
|
|
16030
|
+
const ping = setInterval(() => {
|
|
16031
|
+
try {
|
|
16032
|
+
controller.enqueue(encoder.encode(`event: ping\ndata: 1\n\n`));
|
|
16033
|
+
} catch {
|
|
16034
|
+
clearInterval(ping);
|
|
16035
|
+
}
|
|
16036
|
+
}, PING_MS);
|
|
16037
|
+
const unsubscribe = subscribe((event) => {
|
|
16038
|
+
try {
|
|
16039
|
+
controller.enqueue(encoder.encode(`event: ${event.type}\ndata: ${JSON.stringify(event.data ?? null)}\n\n`));
|
|
16040
|
+
} catch {
|
|
16041
|
+
unsubscribe();
|
|
16042
|
+
}
|
|
16043
|
+
});
|
|
16044
|
+
cleanup = () => {
|
|
15946
16045
|
unsubscribe();
|
|
15947
|
-
|
|
15948
|
-
|
|
15949
|
-
|
|
15950
|
-
|
|
15951
|
-
|
|
15952
|
-
|
|
15953
|
-
|
|
15954
|
-
}
|
|
15955
|
-
}
|
|
15956
|
-
|
|
15957
|
-
|
|
15958
|
-
|
|
15959
|
-
|
|
15960
|
-
|
|
15961
|
-
} });
|
|
16046
|
+
clearInterval(ping);
|
|
16047
|
+
};
|
|
16048
|
+
ctx.request.signal.addEventListener("abort", () => {
|
|
16049
|
+
cleanup();
|
|
16050
|
+
try {
|
|
16051
|
+
controller.close();
|
|
16052
|
+
} catch {}
|
|
16053
|
+
});
|
|
16054
|
+
},
|
|
16055
|
+
cancel() {
|
|
16056
|
+
cleanup();
|
|
16057
|
+
}
|
|
16058
|
+
});
|
|
16059
|
+
return new Response(stream, { headers: SSE_HEADERS });
|
|
15962
16060
|
}), "GET");
|
|
15963
16061
|
var get4_options = mergeOptions(mware3, getHandler$14);
|
|
15964
16062
|
var head4_options = mergeOptions(mware3);
|
|
@@ -16114,12 +16212,16 @@ function readDiskCache() {
|
|
|
16114
16212
|
}
|
|
16115
16213
|
}
|
|
16116
16214
|
async function fetchCatalog() {
|
|
16215
|
+
let partial = false;
|
|
16117
16216
|
const orgs = (await gh([
|
|
16118
16217
|
"api",
|
|
16119
16218
|
"user/orgs",
|
|
16120
16219
|
"--jq",
|
|
16121
16220
|
".[].login"
|
|
16122
|
-
]).catch(() =>
|
|
16221
|
+
]).catch(() => {
|
|
16222
|
+
partial = true;
|
|
16223
|
+
return "";
|
|
16224
|
+
})).split("\n").filter(Boolean);
|
|
16123
16225
|
const lists = await Promise.all([void 0, ...orgs].map((owner) => gh([
|
|
16124
16226
|
"repo",
|
|
16125
16227
|
"list",
|
|
@@ -16128,7 +16230,10 @@ async function fetchCatalog() {
|
|
|
16128
16230
|
"500",
|
|
16129
16231
|
"--json",
|
|
16130
16232
|
"nameWithOwner,defaultBranchRef,isArchived"
|
|
16131
|
-
]).catch(() =>
|
|
16233
|
+
]).catch(() => {
|
|
16234
|
+
partial = true;
|
|
16235
|
+
return "[]";
|
|
16236
|
+
})));
|
|
16132
16237
|
const byName = /* @__PURE__ */ new Map();
|
|
16133
16238
|
for (const out of lists) for (const r of JSON.parse(out)) byName.set(r.nameWithOwner, {
|
|
16134
16239
|
nameWithOwner: r.nameWithOwner,
|
|
@@ -16140,6 +16245,10 @@ async function fetchCatalog() {
|
|
|
16140
16245
|
fetchedAt: Date.now(),
|
|
16141
16246
|
repos
|
|
16142
16247
|
};
|
|
16248
|
+
if (partial) {
|
|
16249
|
+
if (readDiskCache()) throw new Error("gh repo listing failed");
|
|
16250
|
+
return catalog;
|
|
16251
|
+
}
|
|
16143
16252
|
const tmp = cachePath() + ".tmp";
|
|
16144
16253
|
fs.writeFileSync(tmp, JSON.stringify(catalog));
|
|
16145
16254
|
fs.renameSync(tmp, cachePath());
|
|
@@ -20897,6 +21006,7 @@ function attachTermServer(server) {
|
|
|
20897
21006
|
if (!wsPath) return ws.close(4004, "unknown workspace");
|
|
20898
21007
|
const cols = Number(url.searchParams.get("cols")) || 80;
|
|
20899
21008
|
const rows = Number(url.searchParams.get("rows")) || 24;
|
|
21009
|
+
const connectedVisible = url.searchParams.get("visible") !== "0";
|
|
20900
21010
|
const proc = pty.spawn("tmux", [
|
|
20901
21011
|
"-L",
|
|
20902
21012
|
TMUX_SOCKET,
|
|
@@ -20942,10 +21052,11 @@ function attachTermServer(server) {
|
|
|
20942
21052
|
flushTimer = setTimeout(flush, Date.now() - lastSend >= FLUSH_MS ? 1 : FLUSH_MS);
|
|
20943
21053
|
});
|
|
20944
21054
|
proc.onExit(() => ws.close());
|
|
20945
|
-
let visible =
|
|
20946
|
-
trackViewer(session.id, 1);
|
|
21055
|
+
let visible = connectedVisible;
|
|
21056
|
+
if (visible) trackViewer(session.id, 1);
|
|
20947
21057
|
let dims = [cols, rows];
|
|
20948
21058
|
const forceWindowSize = () => {
|
|
21059
|
+
if (!visible) return;
|
|
20949
21060
|
lastForced.set(session.id, `${dims[0]}x${dims[1]}`);
|
|
20950
21061
|
tmux([
|
|
20951
21062
|
"resize-window",
|
|
@@ -20967,7 +21078,9 @@ function attachTermServer(server) {
|
|
|
20967
21078
|
const resize = parseResize(text);
|
|
20968
21079
|
if (resize) {
|
|
20969
21080
|
dims = resize;
|
|
20970
|
-
|
|
21081
|
+
try {
|
|
21082
|
+
proc.resize(resize[0], resize[1]);
|
|
21083
|
+
} catch {}
|
|
20971
21084
|
forceWindowSize();
|
|
20972
21085
|
}
|
|
20973
21086
|
const vis = parseVisible(text);
|
|
@@ -21053,4 +21166,4 @@ server.listen(port, () => {
|
|
|
21053
21166
|
//#endregion
|
|
21054
21167
|
export {};
|
|
21055
21168
|
|
|
21056
|
-
;var __MARKO_MANIFEST__={"esfPH6H":{"block":[2,"stylesheet#/assets/index-KIy0rCx1.css",6,"<link",0," rel=\"stylesheet\" crossorigin href=\"",1,"assets/index-KIy0rCx1.css\"",">"],"defer":[2,"/assets/index-
|
|
21169
|
+
;var __MARKO_MANIFEST__={"esfPH6H":{"block":[2,"stylesheet#/assets/index-KIy0rCx1.css",6,"<link",0," rel=\"stylesheet\" crossorigin href=\"",1,"assets/index-KIy0rCx1.css\"",">"],"defer":[2,"/assets/index-BwlA-lgI.js",6,"<script",0," async type=\"module\" crossorigin src=\"",1,"assets/index-BwlA-lgI.js\"","></script>"]}};
|