@dylanpiercey/work 0.0.145 → 0.0.146
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/_CCA0c-I0.js +2 -0
- package/dist/{_RdvbSrnZ.js → _OZ9nLhXp.js} +126 -24
- package/dist/index.mjs +306 -384
- package/dist/public/assets/_2f6GkTCF.js +1 -0
- package/dist/public/assets/{_DQ3bjKhC.js → _BJq6B3f8.js} +4 -4
- package/dist/public/assets/_BJq6B3f8.js.br +0 -0
- package/dist/public/assets/_BRiyTqqx.js +1 -0
- package/dist/public/assets/_BXJd6h5q.js +1 -0
- package/dist/public/assets/_Bc7wOUYH.js +1 -0
- package/dist/public/assets/{_Dy1DNuXx.js → _Bkg2RxMC.js} +4 -4
- package/dist/public/assets/_Bkg2RxMC.js.br +0 -0
- package/dist/public/assets/_BnihlWIp.js +1 -0
- package/dist/public/assets/_C-wKjwXX.js +1 -0
- package/dist/public/assets/_C408Iqy7.js +1 -0
- package/dist/public/assets/_CVunWnOY.js +1 -0
- package/dist/public/assets/_CeK9LJkw.js +1 -0
- package/dist/public/assets/_CgfKx3kO.js +1 -0
- package/dist/public/assets/_DCCIL6WI.js +1 -0
- package/dist/public/assets/_DQDxPXHD.js +1 -0
- package/dist/public/assets/_DRLjyh60.js +1 -0
- package/dist/public/assets/_DlE-V9GA.js +1 -0
- package/dist/public/assets/_DzgxFeeE.js +1 -0
- package/dist/public/assets/_Xp-Chjfv.js +1 -0
- package/dist/public/assets/_b6v9fOcC.js +1 -0
- package/dist/public/assets/{_C7gmftFo.js → _oalV3UwK.js} +1 -1
- package/dist/public/assets/_oalV3UwK.js.br +0 -0
- package/dist/public/assets/_vQM4oRsw.js +1 -0
- package/dist/public/assets/_xiuhy85t.js +1 -0
- package/dist/public/assets/{app-page-k1J1kX4l.css → app-page-IRq6b-Ob.css} +1 -1
- package/dist/public/assets/app-page-IRq6b-Ob.css.br +0 -0
- package/dist/public/assets/{diff-view-Ch_De7qH.css → diff-view-6-VC0hOC.css} +1 -1
- package/dist/public/assets/diff-view-6-VC0hOC.css.br +0 -0
- package/dist/public/assets/diff-view-CHN5eqyz.js +2 -0
- package/dist/public/assets/{icon-arrow-down-CMd0RUdb.css → icon-arrow-down-Dcmmz4Cl.css} +1 -1
- package/dist/public/assets/icon-arrow-down-Dcmmz4Cl.css.br +0 -0
- package/dist/public/assets/new-BpPnfh6F.js +1 -0
- package/dist/public/assets/settings-BpPnfh6F.js +1 -0
- package/dist/public/assets/w-BpPnfh6F.js +1 -0
- package/dist/public/assets/w._-B5NuNac4.js +1 -0
- package/dist/public/assets/w._-BpPnfh6F.js +1 -0
- package/package.json +1 -1
- package/dist/_BF-bl9wz.js +0 -2
- package/dist/public/assets/_21mgW-1Z.js +0 -1
- package/dist/public/assets/_B9sRUkZv.js +0 -1
- package/dist/public/assets/_BQDnrQES.js +0 -1
- package/dist/public/assets/_BgCHTkW2.js +0 -1
- package/dist/public/assets/_BvOfxkzU.js +0 -1
- package/dist/public/assets/_C448NmFH.js +0 -1
- package/dist/public/assets/_C4_-B9wF.js +0 -1
- package/dist/public/assets/_C7gmftFo.js.br +0 -0
- package/dist/public/assets/_CEw_Mye5.js +0 -1
- package/dist/public/assets/_CFi5anE6.js +0 -1
- package/dist/public/assets/_CGcmWQOb.js +0 -1
- package/dist/public/assets/_CeGQErY4.js +0 -1
- package/dist/public/assets/_D2C1S8zb.js +0 -1
- package/dist/public/assets/_D5RLfyQD.js +0 -1
- package/dist/public/assets/_DBeqA_AC.js +0 -1
- package/dist/public/assets/_DFvgQmuO.js +0 -1
- package/dist/public/assets/_DQ3bjKhC.js.br +0 -0
- package/dist/public/assets/_DQO13XHH.js +0 -1
- package/dist/public/assets/_DsCpEqH5.js +0 -1
- package/dist/public/assets/_Dy1DNuXx.js.br +0 -0
- package/dist/public/assets/_VnRbDdk0.js +0 -1
- package/dist/public/assets/_bVO2SjRK.js +0 -1
- package/dist/public/assets/app-page-k1J1kX4l.css.br +0 -0
- package/dist/public/assets/diff-view-Ch_De7qH.css.br +0 -0
- package/dist/public/assets/diff-view-D7PqjZCP.js +0 -2
- package/dist/public/assets/icon-arrow-down-CMd0RUdb.css.br +0 -0
- package/dist/public/assets/new-ieyLBknO.js +0 -1
- package/dist/public/assets/settings-ieyLBknO.js +0 -1
- package/dist/public/assets/w-ieyLBknO.js +0 -1
- package/dist/public/assets/w._-DRZmWqrE.js +0 -1
- package/dist/public/assets/w._-ieyLBknO.js +0 -1
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as __toCommonJS, i as __require, n as __esmMin, o as __toESM, r as __exportAll, t as __commonJSMin } from "./_BMI-E3GI.js";
|
|
2
|
-
import { $ as
|
|
2
|
+
import { $ as getSetting, A as setAgentPhase, B as pushPublicKey, C as blankRow, Ct as run, D as agentLabel, E as agentFromCommand, F as iconSvg, G as subscriberJoins, H as publish, I as manifest, J as withLock, K as shared, L as normalizeAccent, M as setSessionViewers, N as ACCENT_RE, O as agentMeta, P as getInstance, Q as enabledAgents, R as setInstance, S as reportsWorking, St as git, T as agentFamily, Tt as config, U as subscribe, V as saveSubscription, W as subscriberCount, X as allPrefs, Y as agentChoices, Z as disabledAgents, _ as sessionStates, _t as db, a as ensureTmuxServer, at as doctor, b as AGENTS, bt as TMUX_SOCKET, c as killWorkspaceSessions, ct as miseVersions, d as markTmuxStarted, dt as DEFAULT_GITHUB_HOST, et as preferredAgent, f as newSessionArgs, ft as TOOLS, g as sendToSession, gt as all, h as renameSession, ht as toolById, i as disposeSessions, it as discoverAgents, j as setScrapedPhase, k as clearAgentPhase, l as listPanes, lt as setupPath, m as panePids, mt as agentLabel$1, n as clearTmuxStarted, nt as setPref, o as getSession, ot as ghKnownHosts, pt as agentById, q as swr, r as createSession, rt as setSetting, s as killSession, st as miseInstalls, t as cleanEnv, tt as setDisabledAgents, u as listSessions, ut as which, v as tmuxName, vt as get$1, w as agentBadge, wt as tmux, x as readHookPayload, xt as gh, y as tmuxWasStarted, yt as workspacePath, z as deleteSubscription } from "./_OZ9nLhXp.js";
|
|
3
3
|
import fs from "node:fs";
|
|
4
4
|
import http, { createServer } from "node:http";
|
|
5
5
|
import path from "node:path";
|
|
@@ -2318,74 +2318,6 @@ function forgetToken(host) {
|
|
|
2318
2318
|
tokens.delete(host);
|
|
2319
2319
|
}
|
|
2320
2320
|
//#endregion
|
|
2321
|
-
//#region src/server/cache.ts
|
|
2322
|
-
/** Keyed stale-while-revalidate cache: a cached value is served immediately
|
|
2323
|
-
* (revalidating in the background when older than `ttlMs`); loads are deduped
|
|
2324
|
-
* per key, and `refresh` bypasses both the cache and any in-flight load. */
|
|
2325
|
-
function swr(ttlMs, load, seed) {
|
|
2326
|
-
const cache = /* @__PURE__ */ new Map();
|
|
2327
|
-
const inflight = /* @__PURE__ */ new Map();
|
|
2328
|
-
function start(key, refresh) {
|
|
2329
|
-
const startedAt = Date.now();
|
|
2330
|
-
const promise = load(key, refresh).then((value) => {
|
|
2331
|
-
const existing = cache.get(key);
|
|
2332
|
-
if (!existing || existing.at <= startedAt) cache.set(key, {
|
|
2333
|
-
at: Date.now(),
|
|
2334
|
-
value
|
|
2335
|
-
});
|
|
2336
|
-
return value;
|
|
2337
|
-
}).finally(() => {
|
|
2338
|
-
if (inflight.get(key)?.promise === promise) inflight.delete(key);
|
|
2339
|
-
});
|
|
2340
|
-
inflight.set(key, {
|
|
2341
|
-
promise,
|
|
2342
|
-
refresh
|
|
2343
|
-
});
|
|
2344
|
-
return promise;
|
|
2345
|
-
}
|
|
2346
|
-
const read = (key, refresh = false) => {
|
|
2347
|
-
if (refresh) {
|
|
2348
|
-
const current = inflight.get(key);
|
|
2349
|
-
return current?.refresh ? current.promise : start(key, true);
|
|
2350
|
-
}
|
|
2351
|
-
let cached = cache.get(key);
|
|
2352
|
-
if (!cached && seed) {
|
|
2353
|
-
cached = seed(key);
|
|
2354
|
-
if (cached) cache.set(key, cached);
|
|
2355
|
-
}
|
|
2356
|
-
if (cached) {
|
|
2357
|
-
if (Date.now() - cached.at >= ttlMs && !inflight.has(key)) start(key, false).catch(() => {});
|
|
2358
|
-
return Promise.resolve(cached.value);
|
|
2359
|
-
}
|
|
2360
|
-
return inflight.get(key)?.promise ?? start(key, false);
|
|
2361
|
-
};
|
|
2362
|
-
/** Inject an externally fetched value (e.g. from a batched load). */
|
|
2363
|
-
read.set = (key, value) => {
|
|
2364
|
-
cache.set(key, {
|
|
2365
|
-
at: Date.now(),
|
|
2366
|
-
value
|
|
2367
|
-
});
|
|
2368
|
-
};
|
|
2369
|
-
/** Current cached value, if any — used when a batch update must merge
|
|
2370
|
-
* with a richer per-key load rather than replace it. */
|
|
2371
|
-
read.get = (key) => cache.get(key)?.value;
|
|
2372
|
-
return read;
|
|
2373
|
-
}
|
|
2374
|
-
/** Serialize async work per key: calls for one key run in submission order,
|
|
2375
|
-
* each starting only after the previous settled. The stored tail is the
|
|
2376
|
-
* all-settled form, so a rejection neither blocks the next caller nor leaves
|
|
2377
|
-
* the entry behind — the map holds only keys with work still in flight. */
|
|
2378
|
-
var locks = /* @__PURE__ */ new Map();
|
|
2379
|
-
function withLock(key, fn) {
|
|
2380
|
-
const run = (locks.get(key) ?? Promise.resolve()).then(fn);
|
|
2381
|
-
const tail = run.then(() => {}, () => {});
|
|
2382
|
-
locks.set(key, tail);
|
|
2383
|
-
tail.then(() => {
|
|
2384
|
-
if (locks.get(key) === tail) locks.delete(key);
|
|
2385
|
-
});
|
|
2386
|
-
return run;
|
|
2387
|
-
}
|
|
2388
|
-
//#endregion
|
|
2389
2321
|
//#region src/server/github.ts
|
|
2390
2322
|
var TTL_MS$4 = 9e5;
|
|
2391
2323
|
/** github.com keeps the historical file name; Enterprise hosts get their own. */
|
|
@@ -2797,31 +2729,12 @@ var darwin = process.platform === "darwin";
|
|
|
2797
2729
|
* CPU it would keep burning. */
|
|
2798
2730
|
var PROBE_TIMEOUT_MS = 2e4;
|
|
2799
2731
|
var probe = (cmd, args) => run(cmd, args, void 0, void 0, { timeoutMs: PROBE_TIMEOUT_MS });
|
|
2800
|
-
/**
|
|
2801
|
-
*
|
|
2802
|
-
*
|
|
2803
|
-
*
|
|
2804
|
-
*
|
|
2805
|
-
*
|
|
2806
|
-
* apart, so joining the in-flight sweep or reusing a seconds-old result
|
|
2807
|
-
* is the right answer, not another process. */
|
|
2808
|
-
function shared(fn, ttlMs) {
|
|
2809
|
-
let inflight = null;
|
|
2810
|
-
let last = null;
|
|
2811
|
-
return () => {
|
|
2812
|
-
if (last && Date.now() - last.at < ttlMs) return Promise.resolve(last.value);
|
|
2813
|
-
if (!inflight) inflight = fn().then((value) => {
|
|
2814
|
-
last = {
|
|
2815
|
-
at: Date.now(),
|
|
2816
|
-
value
|
|
2817
|
-
};
|
|
2818
|
-
return value;
|
|
2819
|
-
}).finally(() => {
|
|
2820
|
-
inflight = null;
|
|
2821
|
-
});
|
|
2822
|
-
return inflight;
|
|
2823
|
-
};
|
|
2824
|
-
}
|
|
2732
|
+
/** Every status compute wants the port table, and status is recomputed on
|
|
2733
|
+
* every invalidation (PR refresh, push hook, client `?fresh`) — without a
|
|
2734
|
+
* reuse window each of those spawned its own lsof pair while the previous
|
|
2735
|
+
* ones were still running, and on a slow machine the sweeps piled up
|
|
2736
|
+
* faster than they finished. Ports do not change in the time between two
|
|
2737
|
+
* computes worth telling apart. */
|
|
2825
2738
|
var SWEEP_TTL_MS = 5e3;
|
|
2826
2739
|
/** Is `cwd` the workspace root or somewhere under it? The trailing slash is
|
|
2827
2740
|
* the whole point: a sibling `…/work-2` must not read as inside `…/work`. */
|
|
@@ -2849,16 +2762,17 @@ async function portsByWorkspace(paths) {
|
|
|
2849
2762
|
async function workspaceProcs(wsPath) {
|
|
2850
2763
|
wsPath = realPath(wsPath);
|
|
2851
2764
|
const portsByPid = /* @__PURE__ */ new Map();
|
|
2852
|
-
const [ports, panes, cwds] = await Promise.all([
|
|
2765
|
+
const [ports, panes, cwds, argv] = await Promise.all([
|
|
2853
2766
|
listeningPorts(),
|
|
2854
2767
|
panePids(),
|
|
2855
|
-
processCwds()
|
|
2768
|
+
processCwds(),
|
|
2769
|
+
darwin ? processArgs() : void 0
|
|
2856
2770
|
]);
|
|
2857
2771
|
for (const { port, pid } of ports) portsByPid.set(pid, [...portsByPid.get(pid) || [], port]);
|
|
2858
2772
|
const procs = [];
|
|
2859
2773
|
for (const [pid, cwd] of cwds) {
|
|
2860
2774
|
if (!inside(cwd, wsPath)) continue;
|
|
2861
|
-
const parts = await procArgs(pid);
|
|
2775
|
+
const parts = argv ? argv.get(pid) || [] : await procArgs(pid);
|
|
2862
2776
|
if (!parts.length) continue;
|
|
2863
2777
|
const cmd = parts[0].split("/").pop() || parts[0];
|
|
2864
2778
|
if (cmd === "tmux" || cmd.startsWith("tmux:") || cmd === "git" || cmd.startsWith("git-") || panes.has(pid)) continue;
|
|
@@ -2959,14 +2873,28 @@ async function processCwdsNow() {
|
|
|
2959
2873
|
}
|
|
2960
2874
|
return cwds;
|
|
2961
2875
|
}
|
|
2962
|
-
/**
|
|
2963
|
-
|
|
2964
|
-
|
|
2965
|
-
|
|
2966
|
-
|
|
2876
|
+
/** Every process's argv on macOS in one `ps`. A per-pid `ps -p` costs a
|
|
2877
|
+
* spawn each (~13 ms behind endpoint-security vetting), and a workspace
|
|
2878
|
+
* with a handful of processes already spends more on those than the whole
|
|
2879
|
+
* table costs. Linux reads /proc per pid instead — a file read, not a
|
|
2880
|
+
* spawn — so it has no sweep. */
|
|
2881
|
+
var processArgs = shared(processArgsNow, SWEEP_TTL_MS);
|
|
2882
|
+
async function processArgsNow() {
|
|
2883
|
+
const argv = /* @__PURE__ */ new Map();
|
|
2884
|
+
const out = await probe("ps", [
|
|
2885
|
+
"-Aww",
|
|
2967
2886
|
"-o",
|
|
2968
|
-
"args="
|
|
2969
|
-
]).catch(() => "")
|
|
2887
|
+
"pid=,args="
|
|
2888
|
+
]).catch(() => "");
|
|
2889
|
+
for (const line of out.split("\n")) {
|
|
2890
|
+
const m = line.match(/^\s*(\d+)\s+(.*)$/);
|
|
2891
|
+
if (m) argv.set(Number(m[1]), m[2].split(/\s+/).filter(Boolean));
|
|
2892
|
+
}
|
|
2893
|
+
return argv;
|
|
2894
|
+
}
|
|
2895
|
+
/** A process's argv on Linux (best-effort; empty when it died or is
|
|
2896
|
+
* unreadable). */
|
|
2897
|
+
async function procArgs(pid) {
|
|
2970
2898
|
try {
|
|
2971
2899
|
return (await fs$1.readFile(`/proc/${pid}/cmdline`, "utf8")).split("\0").filter(Boolean);
|
|
2972
2900
|
} catch {
|
|
@@ -3975,6 +3903,10 @@ async function logoutGithub(host, opts = {}) {
|
|
|
3975
3903
|
/** Probing spawns gh per host and mise once; a minute of staleness is fine
|
|
3976
3904
|
* for a page load, and every mutation below refreshes explicitly. */
|
|
3977
3905
|
var doctorCache = swr(6e4, (_key, _refresh) => doctor({ hosts: configuredHosts() }));
|
|
3906
|
+
/** Same lifetime as the doctor probe: `mise ls --json` is one more spawn
|
|
3907
|
+
* (~90 ms on macOS) and without a cache it set the floor for every
|
|
3908
|
+
* `/api/setup` — the request Settings and the first-run probe both make. */
|
|
3909
|
+
var installsCache = swr(6e4, (_key, _refresh) => miseInstalls());
|
|
3978
3910
|
var outdated = swr(6e5, async (_key) => {
|
|
3979
3911
|
if (!which("mise")) return {};
|
|
3980
3912
|
const probe = (bump) => runStreaming("mise", [
|
|
@@ -4001,7 +3933,7 @@ var outdated = swr(6e5, async (_key) => {
|
|
|
4001
3933
|
* catalog. `refresh` re-probes and awaits `mise outdated`.
|
|
4002
3934
|
*/
|
|
4003
3935
|
async function getSetup(refresh = false) {
|
|
4004
|
-
const [d, installs] = await Promise.all([doctorCache("doctor", refresh),
|
|
3936
|
+
const [d, installs] = await Promise.all([doctorCache("doctor", refresh), installsCache("installs", refresh)]);
|
|
4005
3937
|
if (refresh) await outdated("all", true);
|
|
4006
3938
|
else outdated("all").catch(() => {});
|
|
4007
3939
|
const known = outdated.get("all") || {};
|
|
@@ -7244,14 +7176,14 @@ function applyInstance(inst) {
|
|
|
7244
7176
|
}
|
|
7245
7177
|
//#endregion
|
|
7246
7178
|
//#region src/tags/settings-page.css.ts
|
|
7247
|
-
var content$2 = "_cz
|
|
7179
|
+
var content$2 = "_cz _cb _cc";
|
|
7248
7180
|
var agentGrid = "_cC _bz";
|
|
7249
|
-
var toolGrid = "_cM
|
|
7250
|
-
var toolRow = "_cN
|
|
7181
|
+
var toolGrid = "_cM _cw";
|
|
7182
|
+
var toolRow = "_cN _cx";
|
|
7251
7183
|
var themeSeg = "_da _bc";
|
|
7252
7184
|
var swatches = "_di _bc";
|
|
7253
7185
|
var checkList = "_dz _bz";
|
|
7254
|
-
var flatCardRow = "
|
|
7186
|
+
var flatCardRow = "_cy _cx";
|
|
7255
7187
|
var pop$1 = "_b6 _8";
|
|
7256
7188
|
var spinner = "_b9 _0 _E";
|
|
7257
7189
|
var busy = "_bX _bW";
|
|
@@ -7298,7 +7230,7 @@ var icon_back_default = _template("O", (input) => {
|
|
|
7298
7230
|
var page_head_default = _template("t", (input) => {
|
|
7299
7231
|
const $scope0_reason = _scope_reason(), $sg__input_backHref__OR__input_onBack__OR__input_meta__OR__input_actions = _serialize_guard($scope0_reason, 3), $sg__input_meta = _serialize_guard($scope0_reason, 6), $sg__input_actions = _serialize_guard($scope0_reason, 7), $si__input_backHref__OR__input_onBack = _serialize_if($scope0_reason, 1), $si__input_meta = _serialize_if($scope0_reason, 6), $si__input_actions = _serialize_if($scope0_reason, 7);
|
|
7300
7232
|
const $scope0_id = _scope_id();
|
|
7301
|
-
_html(`<header${_attr_class("
|
|
7233
|
+
_html(`<header${_attr_class("_cd")}>`);
|
|
7302
7234
|
_if(() => {
|
|
7303
7235
|
if (input.backHref) {
|
|
7304
7236
|
const $scope1_id = _scope_id();
|
|
@@ -7317,11 +7249,11 @@ var page_head_default = _template("t", (input) => {
|
|
|
7317
7249
|
return 1;
|
|
7318
7250
|
}
|
|
7319
7251
|
}, $scope0_id, "b", _serialize_guard($scope0_reason, 2), _serialize_guard($scope0_reason, 1), $sg__input_backHref__OR__input_onBack__OR__input_meta__OR__input_actions, 0, 1);
|
|
7320
|
-
_html(`<div${_attr_class("
|
|
7252
|
+
_html(`<div${_attr_class("_cf")}><h1${_attr("id", input.titleId)}${_attr_class("_ce")}>${_text_resume($scope0_id, "e", input.title, _serialize_guard($scope0_reason, 5))}</h1>${_el_resume($scope0_id, "d", _serialize_guard($scope0_reason, 4))}`);
|
|
7321
7253
|
_if(() => {
|
|
7322
7254
|
if (input.meta) {
|
|
7323
7255
|
const $scope3_id = _scope_id();
|
|
7324
|
-
_html(`<p${_attr_class("
|
|
7256
|
+
_html(`<p${_attr_class("_cg")}>`);
|
|
7325
7257
|
_dynamic_tag($scope3_id, "b", input.meta, {}, 0, 0, $sg__input_meta);
|
|
7326
7258
|
_html("</p>");
|
|
7327
7259
|
$si__input_meta && writeScope($scope3_id, { _: _scope_with_id($scope0_id) });
|
|
@@ -7332,7 +7264,7 @@ var page_head_default = _template("t", (input) => {
|
|
|
7332
7264
|
_if(() => {
|
|
7333
7265
|
if (input.actions) {
|
|
7334
7266
|
const $scope4_id = _scope_id();
|
|
7335
|
-
_html(`<div${_attr_class("
|
|
7267
|
+
_html(`<div${_attr_class("_ch")}>`);
|
|
7336
7268
|
_dynamic_tag($scope4_id, "b", input.actions, {}, 0, 0, $sg__input_actions);
|
|
7337
7269
|
_html("</div>");
|
|
7338
7270
|
$si__input_actions && writeScope($scope4_id, { _: _scope_with_id($scope0_id) });
|
|
@@ -7400,7 +7332,7 @@ var icon_agent_default = _template("J", (input) => {
|
|
|
7400
7332
|
n: $badge__closures
|
|
7401
7333
|
});
|
|
7402
7334
|
});
|
|
7403
|
-
var usageNote = "
|
|
7335
|
+
var usageNote = "_fO _V";
|
|
7404
7336
|
//#endregion
|
|
7405
7337
|
//#region src/tags/icons/icon-warning.marko
|
|
7406
7338
|
var icon_warning_default = _template("ob", (input) => {
|
|
@@ -7430,11 +7362,11 @@ var usage_meters_default = _template("G", (input) => {
|
|
|
7430
7362
|
const $scope0_reason = _scope_reason(), $sg__input_agent__OR__input_hideName = _serialize_guard($scope0_reason, 0), $sg__input_agent = _serialize_guard($scope0_reason, 1), $si__input_agent = _serialize_if($scope0_reason, 1), $sg__input_hideName = _serialize_guard($scope0_reason, 2), $si__input_agent__OR__input_hideName = _serialize_if($scope0_reason, 0);
|
|
7431
7363
|
const $scope0_id = _scope_id();
|
|
7432
7364
|
const agent = input.agent;
|
|
7433
|
-
_html(`<div${_attr_class(["
|
|
7365
|
+
_html(`<div${_attr_class(["_fI", { ["_fJ"]: input.hideName }])}><div${_attr_class("_fK")}>`);
|
|
7434
7366
|
_if(() => {
|
|
7435
7367
|
if (!input.hideName) {
|
|
7436
7368
|
const $scope1_id = _scope_id();
|
|
7437
|
-
_html(`<strong${_attr_class("
|
|
7369
|
+
_html(`<strong${_attr_class("_f3")}>${_text_resume($scope1_id, "b", agent.agent, $sg__input_agent)}</strong>`);
|
|
7438
7370
|
$si__input_agent__OR__input_hideName && writeScope($scope1_id, { _: $si__input_agent && _scope_with_id($scope0_id) });
|
|
7439
7371
|
return 0;
|
|
7440
7372
|
}
|
|
@@ -7442,7 +7374,7 @@ var usage_meters_default = _template("G", (input) => {
|
|
|
7442
7374
|
_if(() => {
|
|
7443
7375
|
if (agent.plan && agent.plan.toLowerCase() !== agent.agent.toLowerCase()) {
|
|
7444
7376
|
const $scope2_id = _scope_id();
|
|
7445
|
-
_html(`<span${_attr_class("
|
|
7377
|
+
_html(`<span${_attr_class("_fL")}>${_text_resume($scope2_id, "b", agent.plan.replace(/^default_/, "").replaceAll("_", " "), $sg__input_agent)}</span>`);
|
|
7446
7378
|
$si__input_agent && writeScope($scope2_id, { _: _scope_with_id($scope0_id) });
|
|
7447
7379
|
return 0;
|
|
7448
7380
|
}
|
|
@@ -7450,21 +7382,21 @@ var usage_meters_default = _template("G", (input) => {
|
|
|
7450
7382
|
_if(() => {
|
|
7451
7383
|
if (agent.stale_seconds != null) {
|
|
7452
7384
|
const $scope3_id = _scope_id();
|
|
7453
|
-
_html(`<span${_attr_class("
|
|
7385
|
+
_html(`<span${_attr_class("_fM")}${_attr("title", `${agent.note || "provider unreachable"}. Last cached numbers, ${duration(agent.stale_seconds * 1e3)} old`)}>`);
|
|
7454
7386
|
icon_warning_default({ size: 12 });
|
|
7455
7387
|
_html(` ${_text_resume($scope3_id, "c", duration(agent.stale_seconds * 1e3), $sg__input_agent * 2)} old</span>${_el_resume($scope3_id, "a", $sg__input_agent)}`);
|
|
7456
7388
|
$si__input_agent && writeScope($scope3_id, { _: _scope_with_id($scope0_id) });
|
|
7457
7389
|
return 0;
|
|
7458
7390
|
}
|
|
7459
7391
|
}, $scope0_id, "e", $sg__input_agent, $sg__input_agent, $sg__input_agent__OR__input_hideName, 0, 1);
|
|
7460
|
-
_html(`</div><div${_attr_class(["
|
|
7392
|
+
_html(`</div><div${_attr_class(["_fN", { ["_f4"]: agent.stale_seconds != null }])}>`);
|
|
7461
7393
|
_for_of(agent.windows || [], (win) => {
|
|
7462
7394
|
const $scope4_id = _scope_id();
|
|
7463
7395
|
const pct = pctText(win.used_percent);
|
|
7464
7396
|
const label = resetLabel(win.resets_at, agent.stale_seconds != null);
|
|
7465
|
-
const fillClass = win.used_percent >= 90 ? "
|
|
7466
|
-
const pctClass = win.used_percent >= 90 ? "
|
|
7467
|
-
_html(`<div${_attr_class("
|
|
7397
|
+
const fillClass = win.used_percent >= 90 ? "_fW" : win.used_percent >= 70 ? "_fV" : win.used_percent >= 40 ? "_fU" : "_fT";
|
|
7398
|
+
const pctClass = win.used_percent >= 90 ? "_f1" : win.used_percent >= 70 ? "_f0" : win.used_percent >= 40 ? "_fZ" : "_fY";
|
|
7399
|
+
_html(`<div${_attr_class("_fP")}${_attr("title", `${win.window}: ${pct} used${win.resets_at ? `, resets ${new Date(win.resets_at).toLocaleString()}` : ""}`)}><span${_attr_class("_fQ")}>${_text_resume($scope4_id, "c", win.window, $sg__input_agent)}</span><span${_attr_class("_fR")}><span${_attr_class(["_fS", fillClass])}${_attr_style(`width:${Math.min(100, Math.max(2, win.used_percent))}%`)}></span>${_el_resume($scope4_id, "e", $sg__input_agent)}</span><span${_attr_class(["_fX", pctClass])}>${_text_resume($scope4_id, "g", pct, $sg__input_agent)}</span>${_el_resume($scope4_id, "f", $sg__input_agent)}<span${_attr_class("_f2")}>`);
|
|
7468
7400
|
_if(() => {
|
|
7469
7401
|
if (label) {
|
|
7470
7402
|
const $scope6_id = _scope_id();
|
|
@@ -7581,14 +7513,14 @@ var sso_auth_default = _template("C", (input) => {
|
|
|
7581
7513
|
localCode = null;
|
|
7582
7514
|
}
|
|
7583
7515
|
}, "C0", $scope0_id);
|
|
7584
|
-
_html(`<div${_attr_class(["
|
|
7516
|
+
_html(`<div${_attr_class(["_fw", input.class])}>`);
|
|
7585
7517
|
_for_of(input.items, (s) => {
|
|
7586
7518
|
const $scope1_id = _scope_id();
|
|
7587
|
-
_html(`<div${_attr_class("
|
|
7519
|
+
_html(`<div${_attr_class("_fx")}><span${_attr_class("_fz")}><span${_attr_class("_fA")}>${_text_resume($scope1_id, "d", s.org, $sg__input_items)}</span><span${_attr_class(["_fB", "_fC"])} title="Repos and PRs in this org stay hidden until the GitHub CLI is authorized for it.">SSO not authorized</span></span>`);
|
|
7588
7520
|
_if(() => {
|
|
7589
7521
|
if (!busy) {
|
|
7590
7522
|
const $scope2_id = _scope_id();
|
|
7591
|
-
_html(`<button type=button${_attr_class([btnSm, "_p"])} title="Re-authorize GitHub CLI (same device flow as Sign in)">Authorize</button>${_el_resume($scope2_id, "a")}<button type=button${_attr_class([btnSm, "
|
|
7523
|
+
_html(`<button type=button${_attr_class([btnSm, "_p"])} title="Re-authorize GitHub CLI (same device flow as Sign in)">Authorize</button>${_el_resume($scope2_id, "a")}<button type=button${_attr_class([btnSm, "_fD"])}${_attr("title", `Ignore ${s.org} — stop asking about it`)}>Ignore</button>${_el_resume($scope2_id, "b")}`);
|
|
7592
7524
|
_script($scope2_id, "C1");
|
|
7593
7525
|
writeScope($scope2_id, {});
|
|
7594
7526
|
return 0;
|
|
@@ -7603,13 +7535,13 @@ var sso_auth_default = _template("C", (input) => {
|
|
|
7603
7535
|
_if(() => {
|
|
7604
7536
|
if (localBusy && localCode) {
|
|
7605
7537
|
const $scope4_id = _scope_id();
|
|
7606
|
-
_html(`<div${_attr_class(["
|
|
7538
|
+
_html(`<div${_attr_class(["_fx", "_fE"])}><span${_attr_class("_E")}></span> Enter code <strong${_attr_class("_fF")}>${_text_resume($scope4_id, "d", localCode)}</strong> at <a${_attr("href", `https://${host}/login/device`)}${_attr_class("_fG")}>${_text_resume($scope4_id, "f", host, _serialize_guard($scope0_reason, 3))}/login/device</a>${_el_resume($scope4_id, "e")}</div>`);
|
|
7607
7539
|
_script($scope4_id, "C2");
|
|
7608
7540
|
writeScope($scope4_id, {});
|
|
7609
7541
|
return 0;
|
|
7610
7542
|
} else if (localBusy) {
|
|
7611
7543
|
const $scope6_id = _scope_id();
|
|
7612
|
-
_html(`<div${_attr_class(["
|
|
7544
|
+
_html(`<div${_attr_class(["_fx", "_fE"])}><span${_attr_class("_E")}></span>Starting GitHub re-authorization…</div>`);
|
|
7613
7545
|
writeScope($scope6_id, {});
|
|
7614
7546
|
return 1;
|
|
7615
7547
|
}
|
|
@@ -7617,14 +7549,14 @@ var sso_auth_default = _template("C", (input) => {
|
|
|
7617
7549
|
_if(() => {
|
|
7618
7550
|
if (localError) {
|
|
7619
7551
|
const $scope5_id = _scope_id();
|
|
7620
|
-
_html(`<p${_attr_class(["
|
|
7552
|
+
_html(`<p${_attr_class(["_fx", "_fH"])}>${_text_resume($scope5_id, "b", localError)}</p>`);
|
|
7621
7553
|
writeScope($scope5_id, {});
|
|
7622
7554
|
return 0;
|
|
7623
7555
|
}
|
|
7624
7556
|
}, $scope0_id, "d", 1, 1, 1, 0, 1);
|
|
7625
7557
|
_for_of(skipped, (s) => {
|
|
7626
7558
|
const $scope3_id = _scope_id();
|
|
7627
|
-
_html(`<div${_attr_class(["
|
|
7559
|
+
_html(`<div${_attr_class(["_fx", "_fy"])}><span${_attr_class("_fz")}><span${_attr_class("_fA")}>${_text_resume($scope3_id, "d", s.org, $sg__input_skipped)}</span><span${_attr_class("_fB")}>Ignored</span></span><button type=button${_attr_class([btnSm, "_fD"])}${_attr("title", `Ask about ${s.org} again`)}>Undo</button>${_el_resume($scope3_id, "f")}</div>`);
|
|
7628
7560
|
_script($scope3_id, "C3");
|
|
7629
7561
|
writeScope($scope3_id, {
|
|
7630
7562
|
i: s?.org,
|
|
@@ -7814,7 +7746,7 @@ var icon_arrow_up_default = _template("N", (input) => {
|
|
|
7814
7746
|
});
|
|
7815
7747
|
//#endregion
|
|
7816
7748
|
//#region src/tags/prompt-dialog.css.ts
|
|
7817
|
-
var promptDlg = "
|
|
7749
|
+
var promptDlg = "_fv _fr";
|
|
7818
7750
|
//#endregion
|
|
7819
7751
|
//#region src/tags/dialog-close.marko
|
|
7820
7752
|
var dialog_close_default = _template("f", (input) => {
|
|
@@ -7838,7 +7770,7 @@ var modal_view_default = _template("r", (input) => {
|
|
|
7838
7770
|
const { label, class: inputClass, open: _open, openChange: _openChange, dismissable: _dismissable, content, footer, closedby: _closedby, onCancel: _onCancel, onClose: _onClose, "aria-label": inputAriaLabel, "aria-labelledby": inputLabelledBy, ...htmlInput } = input;
|
|
7839
7771
|
const dismissable = input.dismissable !== false;
|
|
7840
7772
|
let open = input.open;
|
|
7841
|
-
_html(`<dialog${_attr_class(["
|
|
7773
|
+
_html(`<dialog${_attr_class(["_fq", inputClass])}${_attr("aria-labelledby", inputLabelledBy)}${inputLabelledBy ? _attr("aria-label", inputAriaLabel) : _attr("aria-label", inputAriaLabel || label)} closedby=${dismissable ? "any" : "none"}${_attrs_partial({
|
|
7842
7774
|
...htmlInput,
|
|
7843
7775
|
open: null
|
|
7844
7776
|
}, {
|
|
@@ -7848,20 +7780,20 @@ var modal_view_default = _template("r", (input) => {
|
|
|
7848
7780
|
closedby: 1,
|
|
7849
7781
|
"on-cancel": 1,
|
|
7850
7782
|
"on-close": 1
|
|
7851
|
-
}, "a", $scope0_id, "dialog")}><div${_attr_class("
|
|
7783
|
+
}, "a", $scope0_id, "dialog")}><div${_attr_class("_ft")}>`);
|
|
7852
7784
|
_dynamic_tag($scope0_id, "c", content, {}, 0, 0, _serialize_guard($scope0_reason, 6));
|
|
7853
7785
|
_html("</div>");
|
|
7854
7786
|
_if(() => {
|
|
7855
7787
|
if (footer) {
|
|
7856
7788
|
const $scope1_id = _scope_id();
|
|
7857
|
-
_html(`<form method=dialog${_attr_class("
|
|
7789
|
+
_html(`<form method=dialog${_attr_class("_fu")}>`);
|
|
7858
7790
|
_dynamic_tag($scope1_id, "b", footer.content, {}, 0, 0, _serialize_guard($scope0_reason, 7));
|
|
7859
7791
|
_html("</form>");
|
|
7860
7792
|
$si__input_openChange__OR__input_footer && writeScope($scope1_id, { _: _serialize_if($scope0_reason, 7) && _scope_with_id($scope0_id) });
|
|
7861
7793
|
return 0;
|
|
7862
7794
|
} else if (input.openChange) {
|
|
7863
7795
|
const $scope2_id = _scope_id();
|
|
7864
|
-
_html(`<form method=dialog${_attr_class("
|
|
7796
|
+
_html(`<form method=dialog${_attr_class("_fu")}>`);
|
|
7865
7797
|
dialog_close_default({
|
|
7866
7798
|
class: ["_o", "_p"],
|
|
7867
7799
|
content: _content("r0", () => {
|
|
@@ -7945,7 +7877,7 @@ var prompt_dialog_default = _template("u", (input) => {
|
|
|
7945
7877
|
content: _content("u7", () => {
|
|
7946
7878
|
_scope_reason();
|
|
7947
7879
|
const $scope2_id = _scope_id();
|
|
7948
|
-
_html(`<h2${_attr_class("
|
|
7880
|
+
_html(`<h2${_attr_class("_fs")}${_attr("id", titleId)}>${_text_resume($scope2_id, "b", input.label, $sg__input_label)}</h2><input${_attr_input_value($scope2_id, "c", value, _resume((_new_value) => {
|
|
7949
7881
|
value = _new_value;
|
|
7950
7882
|
}, "u0", $scope2_id))}${_attr("placeholder", input.placeholder)}>${_el_resume($scope2_id, "c")}`);
|
|
7951
7883
|
_script($scope2_id, "u5");
|
|
@@ -8467,7 +8399,7 @@ var settings_page_default = _template("x", (input$3) => {
|
|
|
8467
8399
|
const githubId = _id();
|
|
8468
8400
|
const backupId = _id();
|
|
8469
8401
|
const machineId = _id();
|
|
8470
|
-
_html(`<div${_attr_class("
|
|
8402
|
+
_html(`<div${_attr_class("_b_")} role=region${_attr("aria-labelledby", titleId)}><div${_attr_class("_ca")}><div${_attr_class(content$2)}>`);
|
|
8471
8403
|
_set_serialize_reason({
|
|
8472
8404
|
0: _serialize_guard($scope0_reason, 4),
|
|
8473
8405
|
1: $sg__input_backHref__OR__input_onExit,
|
|
@@ -8773,14 +8705,14 @@ var settings_page_default = _template("x", (input$3) => {
|
|
|
8773
8705
|
return 0;
|
|
8774
8706
|
}
|
|
8775
8707
|
}, $scope0_id, "w", 1, 1, 1, 0, 1);
|
|
8776
|
-
_html(`</div><div${_attr_class(["_bB", "
|
|
8708
|
+
_html(`</div><div${_attr_class(["_bB", "_ci"])}>`);
|
|
8777
8709
|
_for_of(setup?.github || [], (h) => {
|
|
8778
8710
|
const $scope7_id = _scope_id();
|
|
8779
8711
|
const $for_content4__h_host__closures = /* @__PURE__ */ new Set();
|
|
8780
8712
|
const hostSso$1 = (h.sso || []).filter((s) => !ignoredSso.has(s.org));
|
|
8781
8713
|
const skippedSso = (h.sso || []).filter((s) => ignoredSso.has(s.org));
|
|
8782
8714
|
const busy = active.has(h.host);
|
|
8783
|
-
_html(`<div${_attr_class(["
|
|
8715
|
+
_html(`<div${_attr_class(["_cj", "_cV"])}><div${_attr_class("_cW")}>`);
|
|
8784
8716
|
icon_github_default({
|
|
8785
8717
|
size: 18,
|
|
8786
8718
|
class: "_cX"
|
|
@@ -8901,7 +8833,7 @@ var settings_page_default = _template("x", (input$3) => {
|
|
|
8901
8833
|
_set_serialize_reason(30);
|
|
8902
8834
|
const $childScope9 = _peek_scope_id();
|
|
8903
8835
|
sso_auth_default({
|
|
8904
|
-
class: ["
|
|
8836
|
+
class: ["_cj", "_c6"],
|
|
8905
8837
|
items: hostSso$1,
|
|
8906
8838
|
skipped: skippedSso,
|
|
8907
8839
|
busy,
|
|
@@ -8940,18 +8872,18 @@ var settings_page_default = _template("x", (input$3) => {
|
|
|
8940
8872
|
return 0;
|
|
8941
8873
|
}
|
|
8942
8874
|
}, $scope0_id, "y", 1, 1, 1, 0, 1);
|
|
8943
|
-
_html(`</section><section${_attr_class("_bw")}${_attr("aria-labelledby", machineId)}><div${_attr_class("_bx")}><h2${_attr("id", machineId)}${_attr_class("_bK")}>Machine</h2></div><div${_attr_class(["_bB", "
|
|
8875
|
+
_html(`</section><section${_attr_class("_bw")}${_attr("aria-labelledby", machineId)}><div${_attr_class("_bx")}><h2${_attr("id", machineId)}${_attr_class("_bK")}>Machine</h2></div><div${_attr_class(["_bB", "_ci"])}><div${_attr_class(["_cj", "_cn"])}><div${_attr_class(["_co", { ["_cp"]: skillsOpen }])}><button${_attr_class("_cq")} aria-expanded=true>`);
|
|
8944
8876
|
_set_serialize_reason(1);
|
|
8945
8877
|
const $childScope10 = _peek_scope_id();
|
|
8946
8878
|
icon_chevron_right_default({
|
|
8947
8879
|
size: 12,
|
|
8948
|
-
class: ["
|
|
8880
|
+
class: ["_cu", { ["_cv"]: skillsOpen }]
|
|
8949
8881
|
});
|
|
8950
|
-
_html(`<span${_attr_class("
|
|
8882
|
+
_html(`<span${_attr_class("_cr")}>Skills</span>`);
|
|
8951
8883
|
_if(() => {
|
|
8952
8884
|
if (skills?.global.length) {
|
|
8953
8885
|
const $scope52_id = _scope_id();
|
|
8954
|
-
_html(`<span${_attr_class("
|
|
8886
|
+
_html(`<span${_attr_class("_cs")}>${_text_resume($scope52_id, "b", skills.global.length)} installed</span>`);
|
|
8955
8887
|
writeScope($scope52_id, {});
|
|
8956
8888
|
return 0;
|
|
8957
8889
|
}
|
|
@@ -9113,7 +9045,7 @@ var settings_page_default = _template("x", (input$3) => {
|
|
|
9113
9045
|
_if(() => {
|
|
9114
9046
|
{
|
|
9115
9047
|
const $scope20_id = _scope_id();
|
|
9116
|
-
_html(`<div${_attr_class("
|
|
9048
|
+
_html(`<div${_attr_class("_ct")}>`);
|
|
9117
9049
|
_if(() => {
|
|
9118
9050
|
if (skills && !skills.agents.length) {
|
|
9119
9051
|
const $scope103_id = _scope_id();
|
|
@@ -9214,14 +9146,14 @@ var settings_page_default = _template("x", (input$3) => {
|
|
|
9214
9146
|
return 0;
|
|
9215
9147
|
}
|
|
9216
9148
|
}, $scope0_id, "ab", 1, 1, 1, 0, 1);
|
|
9217
|
-
_html(`</div><div${_attr_class(["
|
|
9149
|
+
_html(`</div><div${_attr_class(["_cj", "_cn"])}><div${_attr_class(["_co", { ["_cp"]: machineOpen }])}><button${_attr_class("_cq")} aria-expanded=${machineOpen ? "true" : "false"}>`);
|
|
9218
9150
|
_set_serialize_reason(1);
|
|
9219
9151
|
const $childScope12 = _peek_scope_id();
|
|
9220
9152
|
icon_chevron_right_default({
|
|
9221
9153
|
size: 12,
|
|
9222
|
-
class: ["
|
|
9154
|
+
class: ["_cu", { ["_cv"]: machineOpen }]
|
|
9223
9155
|
});
|
|
9224
|
-
_html(`<span${_attr_class("
|
|
9156
|
+
_html(`<span${_attr_class("_cr")}>Tools</span><span${_attr_class("_cs")}>${_text_resume($scope0_id, "ai", tools.filter((t) => t.installed).length)} installed ${_text_resume($scope0_id, "aj", missingCount ? `${_to_text(" · ")}${_to_text(missingCount)} missing` : "", 2)}${_text_resume($scope0_id, "ak", outdatedIds.length ? `${_to_text(" · ")}${_to_text(outdatedIds.length)} outdated` : "", 2)}</span></button>${_el_resume($scope0_id, "ae")}`);
|
|
9225
9157
|
_if(() => {
|
|
9226
9158
|
if (outdatedIds.length > 1) {
|
|
9227
9159
|
const $scope23_id = _scope_id();
|
|
@@ -9350,7 +9282,7 @@ var settings_page_default = _template("x", (input$3) => {
|
|
|
9350
9282
|
_if(() => {
|
|
9351
9283
|
if (machineOpen) {
|
|
9352
9284
|
const $scope6_id = _scope_id();
|
|
9353
|
-
_html(`<div${_attr_class("
|
|
9285
|
+
_html(`<div${_attr_class("_ct")}>`);
|
|
9354
9286
|
_if(() => {
|
|
9355
9287
|
if (setup && !setup.mise.installed) {
|
|
9356
9288
|
const $scope28_id = _scope_id();
|
|
@@ -9628,7 +9560,7 @@ var settings_page_default = _template("x", (input$3) => {
|
|
|
9628
9560
|
{ ["_dk"]: customOn }
|
|
9629
9561
|
])}${customOn ? _attr_style(`--swatch:${input$3.instance.accent}`) : ""} title="Custom colour"><input${_attr_input_value($scope0_id, "b9", input$3.instance.accent || "#3556d8", _resume(function(v) {
|
|
9630
9562
|
setInstance({ accent: v });
|
|
9631
|
-
}, "x6", $scope0_id))}${_attr_class("_dn")} type=color aria-label="Custom accent colour">${_el_resume($scope0_id, "b9")}<span aria-hidden=true>+</span></label>${_el_resume($scope0_id, "b8", $sg__input_instance_accent)}</span></div></div></section><section${_attr_class("_bw")}${_attr("aria-labelledby", backupId)}><div${_attr_class("_bx")}><h2${_attr("id", backupId)}${_attr_class("_bK")}>Backup</h2></div><div${_attr_class(["_bB", "
|
|
9563
|
+
}, "x6", $scope0_id))}${_attr_class("_dn")} type=color aria-label="Custom accent colour">${_el_resume($scope0_id, "b9")}<span aria-hidden=true>+</span></label>${_el_resume($scope0_id, "b8", $sg__input_instance_accent)}</span></div></div></section><section${_attr_class("_bw")}${_attr("aria-labelledby", backupId)}><div${_attr_class("_bx")}><h2${_attr("id", backupId)}${_attr_class("_bK")}>Backup</h2></div><div${_attr_class(["_bB", "_ci"])}><div${_attr_class("_cj")}><div${_attr_class("_do")}><div${_attr_class("_bC")}>`);
|
|
9632
9564
|
_if(() => {
|
|
9633
9565
|
if (backupBusy === "preflight") {
|
|
9634
9566
|
const $scope66_id = _scope_id();
|
|
@@ -9753,7 +9685,7 @@ var settings_page_default = _template("x", (input$3) => {
|
|
|
9753
9685
|
return 0;
|
|
9754
9686
|
}
|
|
9755
9687
|
}, $scope0_id, "bi", 1, 1, 1, 0, 1);
|
|
9756
|
-
_html(`</div><div${_attr_class("
|
|
9688
|
+
_html(`</div><div${_attr_class("_cj")}><div${_attr_class("_do")}><div${_attr_class("_bC")}>`);
|
|
9757
9689
|
_if(() => {
|
|
9758
9690
|
if (backupBusy === "restore") {
|
|
9759
9691
|
const $scope67_id = _scope_id();
|
|
@@ -10366,8 +10298,8 @@ function treeDirs(files) {
|
|
|
10366
10298
|
};
|
|
10367
10299
|
return build(root, "", "", -1);
|
|
10368
10300
|
}
|
|
10369
|
-
var treeToggle = "
|
|
10370
|
-
var pageTitle$1 = "
|
|
10301
|
+
var treeToggle = "_e3 _3 _j";
|
|
10302
|
+
var pageTitle$1 = "_e_ _ce";
|
|
10371
10303
|
//#endregion
|
|
10372
10304
|
//#region src/tags/diff-send.marko
|
|
10373
10305
|
var diff_send_default = _template("j", (input) => {
|
|
@@ -10377,7 +10309,7 @@ var diff_send_default = _template("j", (input) => {
|
|
|
10377
10309
|
let sendTarget = null;
|
|
10378
10310
|
const sessions = input.sessions || [];
|
|
10379
10311
|
const sendPick = sessions.some((s) => s.id === sendTarget) ? sendTarget : sessions[0]?.id ?? null;
|
|
10380
|
-
_html(`<span${_attr_class("
|
|
10312
|
+
_html(`<span${_attr_class("_hn")}><button type=button${_attr_class("_o")} title="Copy comments as markdown">${_text_resume($scope0_id, "c", "Copy")}</button>${_el_resume($scope0_id, "b")}`);
|
|
10381
10313
|
_if(() => {
|
|
10382
10314
|
if (sessions.length === 1) {
|
|
10383
10315
|
const $scope1_id = _scope_id();
|
|
@@ -10387,11 +10319,11 @@ var diff_send_default = _template("j", (input) => {
|
|
|
10387
10319
|
return 0;
|
|
10388
10320
|
} else if (sessions.length) {
|
|
10389
10321
|
const $scope2_id = _scope_id();
|
|
10390
|
-
_html(`<span${_attr_class("
|
|
10322
|
+
_html(`<span${_attr_class("_ho")}><button type=button${_attr_class(["_p", "_hp"])}${_attr("disabled", sending)}>${_text_resume($scope2_id, "c", "Send to")}</button>${_el_resume($scope2_id, "b")}`);
|
|
10391
10323
|
_attr_select_value($scope2_id, "d", sendTarget, _resume((_new_sendTarget) => {
|
|
10392
10324
|
sendTarget = _new_sendTarget;
|
|
10393
10325
|
}, "j0", $scope2_id), () => {
|
|
10394
|
-
_html(`<select${_attr_class("
|
|
10326
|
+
_html(`<select${_attr_class("_hq")} aria-label="Send comments to session"${_attr("disabled", sending)}>`);
|
|
10395
10327
|
_for_of(sessions, (s) => {
|
|
10396
10328
|
const $scope3_id = _scope_id();
|
|
10397
10329
|
_html(`<option${_attr_option_value(s.id)}>${_text_resume($scope3_id, "b", s.title || s.agent, $sg__input_sessions)}</option>${_el_resume($scope3_id, "a", $sg__input_sessions)}`);
|
|
@@ -11920,8 +11852,8 @@ function clip(line, at, len) {
|
|
|
11920
11852
|
const end = Math.min(line.length, at + len + pad);
|
|
11921
11853
|
return (start > 0 ? "…" : "") + line.slice(start, end) + (end < line.length ? "…" : "");
|
|
11922
11854
|
}
|
|
11923
|
-
var findInput = "
|
|
11924
|
-
var findIconBtn = "
|
|
11855
|
+
var findInput = "_gA _l";
|
|
11856
|
+
var findIconBtn = "_gD _j";
|
|
11925
11857
|
//#endregion
|
|
11926
11858
|
//#region src/tags/icons/icon-arrow-down.marko
|
|
11927
11859
|
var icon_arrow_down_default = _template("K", (input) => {
|
|
@@ -12009,9 +11941,9 @@ var diff_find_default = _template("i", (input) => {
|
|
|
12009
11941
|
el.select();
|
|
12010
11942
|
}, 0);
|
|
12011
11943
|
}, "i0", $scope0_id);
|
|
12012
|
-
_html(`<div${_attr_class(["
|
|
11944
|
+
_html(`<div${_attr_class(["_gz", !open && "_gy"])} aria-hidden=${open ? "false" : "true"}><input${_attr_input_value($scope0_id, "b", query || "", _resume(function(v) {
|
|
12013
11945
|
type(v);
|
|
12014
|
-
}, "i1", $scope0_id))}${_attr_class(findInput)} type=search enterkeyhint=search autocomplete=off tabindex=${open ? "0" : "-1"} placeholder="Find in review" aria-label="Find in review">${_el_resume($scope0_id, "b")}<span${_attr_class("
|
|
11946
|
+
}, "i1", $scope0_id))}${_attr_class(findInput)} type=search enterkeyhint=search autocomplete=off tabindex=${open ? "0" : "-1"} placeholder="Find in review" aria-label="Find in review">${_el_resume($scope0_id, "b")}<span${_attr_class("_gC")}>${_text_resume($scope0_id, "d", open && (query || "").trim() ? hits.length ? `${at + 1}/${hits.length}` : "0/0" : "")}</span><button type=button${_attr_class(findIconBtn)} title="Previous match"${_attr("disabled", !hits.length || !open)} tabindex=${open ? "0" : "-1"}>`);
|
|
12015
11947
|
icon_arrow_up_default({ size: 14 });
|
|
12016
11948
|
_html(`</button>${_el_resume($scope0_id, "e")}<button type=button${_attr_class(findIconBtn)} title="Next match"${_attr("disabled", !hits.length || !open)} tabindex=${open ? "0" : "-1"}>`);
|
|
12017
11949
|
icon_arrow_down_default({ size: 14 });
|
|
@@ -12660,7 +12592,7 @@ var $content = (input) => {
|
|
|
12660
12592
|
_for_of(dir.dirs, (child) => {
|
|
12661
12593
|
const $scope1_id = _scope_id();
|
|
12662
12594
|
const shut = input.collapsed.has(input.collapsedKey(child.path));
|
|
12663
|
-
_html(`<div${_attr_class("
|
|
12595
|
+
_html(`<div${_attr_class("_hQ")}><button type=button${_attr_class(["_hR", { ["_hI"]: shut }])}${_attr("title", child.path)}${_attr_style(`--depth:${child.depth}`)}><span${_attr_class("_hY")}>`);
|
|
12664
12596
|
_if(() => {
|
|
12665
12597
|
if (shut) {
|
|
12666
12598
|
const $scope4_id = _scope_id();
|
|
@@ -12674,7 +12606,7 @@ var $content = (input) => {
|
|
|
12674
12606
|
return 1;
|
|
12675
12607
|
}
|
|
12676
12608
|
}, $scope1_id, "c", $sg__input, $sg__input, $sg__input, "</span>", 1);
|
|
12677
|
-
_html(`<span${_attr_class("
|
|
12609
|
+
_html(`<span${_attr_class("_hS")}>${_text_resume($scope1_id, "e", child.label, $sg__input_dir)}/</span></button>${_el_resume($scope1_id, "b")}`);
|
|
12678
12610
|
_if(() => {
|
|
12679
12611
|
if (!shut) {
|
|
12680
12612
|
const $scope2_id = _scope_id();
|
|
@@ -12721,11 +12653,11 @@ var $content = (input) => {
|
|
|
12721
12653
|
}, "path", $scope0_id, "a", $sg__input, $sg__input_dir, $sg__input_dir, 0, 1);
|
|
12722
12654
|
_for_of(dir.files, ({ file, name }) => {
|
|
12723
12655
|
const $scope3_id = _scope_id();
|
|
12724
|
-
_html(`<a${_attr("href", input.hrefFor(file.key))}${_attr_class(["
|
|
12656
|
+
_html(`<a${_attr("href", input.hrefFor(file.key))}${_attr_class(["_hU", { ["_hT"]: input.collapsedFiles?.has(file.key) }])}${input.collapsedFiles?.has(file.key) ? _attr("title", `${file.path} (folded — click to open)`) : _attr("title", file.path)}${_attr_style(`--depth:${dir.depth + 1}`)}><span${_attr_class("_9")}${_attr("data-status", file.status)}>${_text_resume($scope3_id, "c", file.status, $sg__input_dir)}</span>${_el_resume($scope3_id, "b", $sg__input_dir)}<span${_attr_class("_hV")}>${_text_resume($scope3_id, "e", name, $sg__input_dir)}</span>`);
|
|
12725
12657
|
_if(() => {
|
|
12726
12658
|
if (input.newKeys.has(file.key)) {
|
|
12727
12659
|
const $scope6_id = _scope_id();
|
|
12728
|
-
_html(`<span${_attr_class(["_y", "
|
|
12660
|
+
_html(`<span${_attr_class(["_y", "_hW"])} title="Changed since your last visit"></span>`);
|
|
12729
12661
|
_serialize_if($scope0_reason, 1) && writeScope($scope6_id, {});
|
|
12730
12662
|
return 0;
|
|
12731
12663
|
}
|
|
@@ -12733,7 +12665,7 @@ var $content = (input) => {
|
|
|
12733
12665
|
_if(() => {
|
|
12734
12666
|
if (input.commentKeys.has(file.key)) {
|
|
12735
12667
|
const $scope7_id = _scope_id();
|
|
12736
|
-
_html(`<span${_attr_class("
|
|
12668
|
+
_html(`<span${_attr_class("_hX")}>`);
|
|
12737
12669
|
icon_comment_default({ size: 12 });
|
|
12738
12670
|
_html("</span>");
|
|
12739
12671
|
_serialize_if($scope0_reason, 0) && writeScope($scope7_id, {});
|
|
@@ -12791,7 +12723,7 @@ var diff_tree_default = _template("l", (input) => {
|
|
|
12791
12723
|
scope: input.scope ?? null,
|
|
12792
12724
|
file: key
|
|
12793
12725
|
}), "l0", $scope0_id);
|
|
12794
|
-
_html(`<aside${_attr_class(["
|
|
12726
|
+
_html(`<aside${_attr_class(["_hJ", { ["_hI"]: input.open === false }])}><div${_attr_class("_hK")}>`);
|
|
12795
12727
|
_set_serialize_reason(2);
|
|
12796
12728
|
const $childScope = _peek_scope_id();
|
|
12797
12729
|
file_filter_default({
|
|
@@ -12800,18 +12732,18 @@ var diff_tree_default = _template("l", (input) => {
|
|
|
12800
12732
|
filter = _new_filter;
|
|
12801
12733
|
}, "l1", $scope0_id)
|
|
12802
12734
|
});
|
|
12803
|
-
_html(`</div><div${_attr_class("
|
|
12735
|
+
_html(`</div><div${_attr_class("_hL")}>`);
|
|
12804
12736
|
_if(() => {
|
|
12805
12737
|
if (!input.sections.length && filter) {
|
|
12806
12738
|
const $scope3_id = _scope_id();
|
|
12807
|
-
_html(`<p${_attr_class("
|
|
12739
|
+
_html(`<p${_attr_class("_hM")}>No files match.</p>`);
|
|
12808
12740
|
writeScope($scope3_id, {});
|
|
12809
12741
|
return 0;
|
|
12810
12742
|
}
|
|
12811
12743
|
}, $scope0_id, "e", 1, 1, 1, 0, 1);
|
|
12812
12744
|
_for_of(input.sections, (section) => {
|
|
12813
12745
|
const $scope1_id = _scope_id();
|
|
12814
|
-
_html(`<div${_attr_class("
|
|
12746
|
+
_html(`<div${_attr_class("_hN")}><button type=button${_attr_class(["_hO", { ["_hI"]: collapsedRepos.has(section.id) }])}><span${_attr_class("_hY")}>`);
|
|
12815
12747
|
_if(() => {
|
|
12816
12748
|
if (collapsedRepos.has(section.id)) {
|
|
12817
12749
|
const $scope4_id = _scope_id();
|
|
@@ -12825,12 +12757,12 @@ var diff_tree_default = _template("l", (input) => {
|
|
|
12825
12757
|
return 1;
|
|
12826
12758
|
}
|
|
12827
12759
|
}, $scope1_id, "c", 1, 1, 1, "</span>", 1);
|
|
12828
|
-
_html(`<span${_attr_class("
|
|
12760
|
+
_html(`<span${_attr_class("_hS")}>${_text_resume($scope1_id, "e", section.label, $sg__input_sections)}</span></button>${_el_resume($scope1_id, "b")}`);
|
|
12829
12761
|
_if(() => {
|
|
12830
12762
|
if (!collapsedRepos.has(section.id) || openedRepos.has(section.id)) {
|
|
12831
12763
|
const $scope2_id = _scope_id();
|
|
12832
12764
|
const root = treeDirs(section.files);
|
|
12833
|
-
_html(`<div${_attr_class("
|
|
12765
|
+
_html(`<div${_attr_class("_hP")}${_attr("hidden", collapsedRepos.has(section.id))}>`);
|
|
12834
12766
|
_set_serialize_reason(1);
|
|
12835
12767
|
const $childScope2 = _peek_scope_id();
|
|
12836
12768
|
diff_tree_dir_default({
|
|
@@ -12900,7 +12832,7 @@ var diff_tree_default = _template("l", (input) => {
|
|
|
12900
12832
|
});
|
|
12901
12833
|
_resume_branch($scope0_id);
|
|
12902
12834
|
});
|
|
12903
|
-
var sheetDir = "
|
|
12835
|
+
var sheetDir = "_hC __";
|
|
12904
12836
|
//#endregion
|
|
12905
12837
|
//#region src/tags/diff-file-sheet.marko
|
|
12906
12838
|
var diff_file_sheet_default = _template("g", (input) => {
|
|
@@ -12956,9 +12888,9 @@ var diff_file_sheet_default = _template("g", (input) => {
|
|
|
12956
12888
|
_if(() => {
|
|
12957
12889
|
if (open) {
|
|
12958
12890
|
const $scope1_id = _scope_id();
|
|
12959
|
-
_html(`<div${_attr_class("
|
|
12891
|
+
_html(`<div${_attr_class("_ht")}></div>${_el_resume($scope1_id, "a")}<div${_attr_class("_hu")} role=dialog aria-label="Jump to file"><div${_attr_class("_hv")}><strong${_attr_class("_hs")}>Files</strong><span${_attr_class("_hw")}>${_text_resume($scope1_id, "f", input.files.length, $sg__input_files_length)}${_text_resume($scope1_id, "g", input.files.length !== total ? ` / ${total}` : "", _serialize_guard($scope0_reason, 2) * 2)}</span><button type=button${_attr_class([iconBtnLg, "_hr"])} title=Close aria-label=Close>`);
|
|
12960
12892
|
icon_xmark_default({ size: 16 });
|
|
12961
|
-
_html(`</button>${_el_resume($scope1_id, "h")}</div><div${_attr_class("
|
|
12893
|
+
_html(`</button>${_el_resume($scope1_id, "h")}</div><div${_attr_class("_hE")}>`);
|
|
12962
12894
|
_set_serialize_reason(2);
|
|
12963
12895
|
const $childScope = _peek_scope_id();
|
|
12964
12896
|
file_filter_default({
|
|
@@ -12967,13 +12899,13 @@ var diff_file_sheet_default = _template("g", (input) => {
|
|
|
12967
12899
|
filter = _new_filter;
|
|
12968
12900
|
}, "g1", $scope1_id)
|
|
12969
12901
|
});
|
|
12970
|
-
_html(`</div><div${_attr_class("
|
|
12902
|
+
_html(`</div><div${_attr_class("_hx")}>`);
|
|
12971
12903
|
_for_of(groups, (group) => {
|
|
12972
12904
|
const $scope2_id = _scope_id();
|
|
12973
|
-
_html(`<div${_attr_class("
|
|
12905
|
+
_html(`<div${_attr_class("_hy")}><div${_attr_class("_hz")}>${_text_resume($scope2_id, "c", group.repo, $sg__input_files)}</div>`);
|
|
12974
12906
|
_for_of(group.dirs, ({ dir, files }) => {
|
|
12975
12907
|
const $scope3_id = _scope_id();
|
|
12976
|
-
_html(`<div${_attr_class("
|
|
12908
|
+
_html(`<div${_attr_class("_hA")}>`);
|
|
12977
12909
|
_if(() => {
|
|
12978
12910
|
if (dir) {
|
|
12979
12911
|
const $scope5_id = _scope_id();
|
|
@@ -12984,11 +12916,11 @@ var diff_file_sheet_default = _template("g", (input) => {
|
|
|
12984
12916
|
}, $scope3_id, "b", $sg__input_files, $sg__input_files, $sg__input_files, 0, 1);
|
|
12985
12917
|
_for_of(files, ({ file, name }) => {
|
|
12986
12918
|
const $scope4_id = _scope_id();
|
|
12987
|
-
_html(`<a${_attr("href", hrefFor(file.key))}${_attr_class(["
|
|
12919
|
+
_html(`<a${_attr("href", hrefFor(file.key))}${_attr_class(["_hB", "_w"])}><span${_attr_class("_9")}${_attr("data-status", file.status)}>${_text_resume($scope4_id, "c", file.status, $sg__input_files)}</span>${_el_resume($scope4_id, "b", $sg__input_files)}<span${_attr_class("_hD")}><bdi>${_text_resume($scope4_id, "e", name, $sg__input_files)}</bdi></span>`);
|
|
12988
12920
|
_if(() => {
|
|
12989
12921
|
if (newKeys.has(file.key)) {
|
|
12990
12922
|
const $scope6_id = _scope_id();
|
|
12991
|
-
_html(`<span${_attr_class(["_y", "
|
|
12923
|
+
_html(`<span${_attr_class(["_y", "_hG"])} title="Changed since your last visit"></span>`);
|
|
12992
12924
|
_serialize_if($scope0_reason, 1) && writeScope($scope6_id, {});
|
|
12993
12925
|
return 0;
|
|
12994
12926
|
}
|
|
@@ -12998,7 +12930,7 @@ var diff_file_sheet_default = _template("g", (input) => {
|
|
|
12998
12930
|
const $scope7_id = _scope_id();
|
|
12999
12931
|
icon_comment_default({
|
|
13000
12932
|
size: 12,
|
|
13001
|
-
class: "
|
|
12933
|
+
class: "_hH"
|
|
13002
12934
|
});
|
|
13003
12935
|
_serialize_if($scope0_reason, 0) && writeScope($scope7_id, {});
|
|
13004
12936
|
return 0;
|
|
@@ -13023,7 +12955,7 @@ var diff_file_sheet_default = _template("g", (input) => {
|
|
|
13023
12955
|
_if(() => {
|
|
13024
12956
|
if (!input.files.length) {
|
|
13025
12957
|
const $scope8_id = _scope_id();
|
|
13026
|
-
_html(`<p${_attr_class("
|
|
12958
|
+
_html(`<p${_attr_class("_hF")}>No files match.</p>`);
|
|
13027
12959
|
$si__input_files_length && writeScope($scope8_id, {});
|
|
13028
12960
|
return 0;
|
|
13029
12961
|
}
|
|
@@ -13563,11 +13495,11 @@ var diff_view_default = _template("m", (input) => {
|
|
|
13563
13495
|
collapsedRepos = /* @__PURE__ */ new Set([...collapsedRepos, id]);
|
|
13564
13496
|
}
|
|
13565
13497
|
}, "m33", $scope0_id);
|
|
13566
|
-
_html(`<div${_attr_class("
|
|
13498
|
+
_html(`<div${_attr_class("_e0")}><div${_attr_class("_e5")}><div${_attr_class("_e6")}><div${_attr_class(["_ff", { ["_fe"]: !comments.length }])}>`);
|
|
13567
13499
|
_if(() => {
|
|
13568
13500
|
if (input.onExit) {
|
|
13569
13501
|
const $scope1_id = _scope_id();
|
|
13570
|
-
_html(`<a${_attr("href", `/w/${input.workspaceId}`)}${_attr_class([iconBtnRow, "
|
|
13502
|
+
_html(`<a${_attr("href", `/w/${input.workspaceId}`)}${_attr_class([iconBtnRow, "_e7"])} title="Back to terminal (Esc)">`);
|
|
13571
13503
|
icon_back_default({ size: 14 });
|
|
13572
13504
|
_html(`</a>${_el_resume($scope1_id, "a", _serialize_guard($scope0_reason, 1))}`);
|
|
13573
13505
|
_serialize_if($scope0_reason, 0) && writeScope($scope1_id, { _: _serialize_if($scope0_reason, 1) && _scope_with_id($scope0_id) });
|
|
@@ -13578,7 +13510,7 @@ var diff_view_default = _template("m", (input) => {
|
|
|
13578
13510
|
_if(() => {
|
|
13579
13511
|
if (comments.length) {
|
|
13580
13512
|
const $scope5_id = _scope_id();
|
|
13581
|
-
_html(`<span${_attr_class("
|
|
13513
|
+
_html(`<span${_attr_class("_e9")}>${_text_resume($scope5_id, "b", comments.length)} comment${_text_resume($scope5_id, "c", comments.length === 1 ? "" : "s", 2)}</span>`);
|
|
13582
13514
|
writeScope($scope5_id, {});
|
|
13583
13515
|
return 0;
|
|
13584
13516
|
}
|
|
@@ -13586,7 +13518,7 @@ var diff_view_default = _template("m", (input) => {
|
|
|
13586
13518
|
_if(() => {
|
|
13587
13519
|
if (comments.length) {
|
|
13588
13520
|
const $scope2_id = _scope_id();
|
|
13589
|
-
_html(`<span${_attr_class("
|
|
13521
|
+
_html(`<span${_attr_class("_e8")}>`);
|
|
13590
13522
|
_set_serialize_reason(_serialize_guard($scope0_reason, 7));
|
|
13591
13523
|
const $childScope = _peek_scope_id();
|
|
13592
13524
|
diff_send_default({
|
|
@@ -13599,14 +13531,14 @@ var diff_view_default = _template("m", (input) => {
|
|
|
13599
13531
|
return 0;
|
|
13600
13532
|
}
|
|
13601
13533
|
}, $scope0_id, "h", 1, 1, 1, 0, 1);
|
|
13602
|
-
_html(`</div>${_el_resume($scope0_id, "d")}<div${_attr_class("
|
|
13534
|
+
_html(`</div>${_el_resume($scope0_id, "d")}<div${_attr_class("_e4")}>`);
|
|
13603
13535
|
_if(() => {
|
|
13604
13536
|
if (hasFiles) {
|
|
13605
13537
|
const $scope12_id = _scope_id();
|
|
13606
13538
|
_html(`<button${_attr_class([
|
|
13607
13539
|
treeToggle,
|
|
13608
|
-
"
|
|
13609
|
-
{ ["
|
|
13540
|
+
"_e2",
|
|
13541
|
+
{ ["_e1"]: treeOpen }
|
|
13610
13542
|
])} title=${treeOpen ? "\"Hide file tree\"" : "\"Show file tree\""}>`);
|
|
13611
13543
|
icon_sidebar_default({ size: 14 });
|
|
13612
13544
|
_html(`</button>${_el_resume($scope12_id, "a")}`);
|
|
@@ -13615,7 +13547,7 @@ var diff_view_default = _template("m", (input) => {
|
|
|
13615
13547
|
return 0;
|
|
13616
13548
|
}
|
|
13617
13549
|
}, $scope0_id, "j", 1, 1, 1, 0, 1);
|
|
13618
|
-
_html(`<button${_attr_class([iconBtnRow, "
|
|
13550
|
+
_html(`<button${_attr_class([iconBtnRow, "_e2"])} title="Refresh diff"${_attr("disabled", loading)}>`);
|
|
13619
13551
|
_set_serialize_reason(1);
|
|
13620
13552
|
const $childScope2 = _peek_scope_id();
|
|
13621
13553
|
icon_refresh_default({
|
|
@@ -13626,19 +13558,19 @@ var diff_view_default = _template("m", (input) => {
|
|
|
13626
13558
|
_if(() => {
|
|
13627
13559
|
if (hasFiles) {
|
|
13628
13560
|
const $scope13_id = _scope_id();
|
|
13629
|
-
_html(`<button${_attr_class(["_o", "
|
|
13561
|
+
_html(`<button${_attr_class(["_o", "_fo"])} title="Jump to file">Files (${_text_resume($scope13_id, "b", shownFiles.length, 2)})</button>${_el_resume($scope13_id, "a")}`);
|
|
13630
13562
|
_script($scope13_id, "m53");
|
|
13631
13563
|
writeScope($scope13_id, {});
|
|
13632
13564
|
return 0;
|
|
13633
13565
|
}
|
|
13634
13566
|
}, $scope0_id, "m", 1, 1, 1, 0, 1);
|
|
13635
|
-
_html(`<span${_attr_class(["_m", "
|
|
13567
|
+
_html(`<span${_attr_class(["_m", "_fg"])}>`);
|
|
13636
13568
|
_attr_select_value($scope0_id, "o", scope, _resume(function(v) {
|
|
13637
13569
|
setScope(v);
|
|
13638
13570
|
}, "m0", $scope0_id), () => {
|
|
13639
|
-
_html(`<select${_attr_class(["_n", "
|
|
13571
|
+
_html(`<select${_attr_class(["_n", "_fh"])} aria-label="Review scope"${_attr("disabled", loading)}><option${_attr_option_value("committed")}>Committed</option><option${_attr_option_value("working")}>Working tree</option><option${_attr_option_value("dirty")}>Uncommitted</option></select>`);
|
|
13640
13572
|
});
|
|
13641
|
-
_html(`${_el_resume($scope0_id, "o")}</span><div${_attr_class(["
|
|
13573
|
+
_html(`${_el_resume($scope0_id, "o")}</span><div${_attr_class(["_fc", { ["_fb"]: !findOpen }])}>`);
|
|
13642
13574
|
_set_serialize_reason(2);
|
|
13643
13575
|
const $childScope3 = _peek_scope_id();
|
|
13644
13576
|
let findFocus = diff_find_default({
|
|
@@ -13659,8 +13591,8 @@ var diff_view_default = _template("m", (input) => {
|
|
|
13659
13591
|
const $scope14_id = _scope_id();
|
|
13660
13592
|
_html(`<button${_attr_class([
|
|
13661
13593
|
iconBtnRow,
|
|
13662
|
-
"
|
|
13663
|
-
"
|
|
13594
|
+
"_fa",
|
|
13595
|
+
"_e2"
|
|
13664
13596
|
])} title="Find in review (⌘/Ctrl+F)" aria-label="Find in review"${_attr("hidden", findOpen)}>`);
|
|
13665
13597
|
icon_search_default({ size: 14 });
|
|
13666
13598
|
_html(`</button>${_el_resume($scope14_id, "a")}`);
|
|
@@ -13669,7 +13601,7 @@ var diff_view_default = _template("m", (input) => {
|
|
|
13669
13601
|
return 0;
|
|
13670
13602
|
}
|
|
13671
13603
|
}, $scope0_id, "s", 1, 1, 1, 0, 1);
|
|
13672
|
-
_html(`</div></div><div${_attr_class("
|
|
13604
|
+
_html(`</div></div><div${_attr_class("_fd")} data-diff-main>`);
|
|
13673
13605
|
_if(() => {
|
|
13674
13606
|
if (error) {
|
|
13675
13607
|
const $scope6_id = _scope_id();
|
|
@@ -13692,7 +13624,7 @@ var diff_view_default = _template("m", (input) => {
|
|
|
13692
13624
|
_if(() => {
|
|
13693
13625
|
if (!repos && loading) {
|
|
13694
13626
|
const $scope15_id = _scope_id();
|
|
13695
|
-
_html(`<div${_attr_class("
|
|
13627
|
+
_html(`<div${_attr_class("_fj")} aria-hidden=true><div${_attr_class(["_fk", "_fl"])}></div><div${_attr_class(["_fk", "_fm"])}></div><div${_attr_class(["_fk", "_fn"])}></div><div${_attr_class(["_fk", "_fm"])}></div><div${_attr_class(["_fk", "_fn"])}></div></div>`);
|
|
13696
13628
|
writeScope($scope15_id, {});
|
|
13697
13629
|
return 0;
|
|
13698
13630
|
}
|
|
@@ -14026,9 +13958,9 @@ function vapidKey(base64) {
|
|
|
14026
13958
|
const raw = atob(padded.replace(/-/g, "+").replace(/_/g, "/"));
|
|
14027
13959
|
return Uint8Array.from(raw, (c) => c.charCodeAt(0));
|
|
14028
13960
|
}
|
|
14029
|
-
var iconBtn = "
|
|
14030
|
-
var settingsDot = "
|
|
14031
|
-
var navToggle = "
|
|
13961
|
+
var iconBtn = "_dN _j";
|
|
13962
|
+
var settingsDot = "_dO _ba";
|
|
13963
|
+
var navToggle = "_dS _j";
|
|
14032
13964
|
_template("Q", (input) => {
|
|
14033
13965
|
const $scope0_reason = _scope_reason(), $sg__input_size__OR__input_class = _serialize_guard($scope0_reason, 0);
|
|
14034
13966
|
const $scope0_id = _scope_id();
|
|
@@ -14071,16 +14003,16 @@ var ARM_MS = 3500;
|
|
|
14071
14003
|
function disarmLater(fn) {
|
|
14072
14004
|
return setTimeout(fn, ARM_MS);
|
|
14073
14005
|
}
|
|
14074
|
-
var railBtn = "
|
|
14075
|
-
var wsBtn = "
|
|
14076
|
-
var rowIcon = "
|
|
14077
|
-
var close = "
|
|
14078
|
-
var sessRename$1 = "
|
|
14079
|
-
var sessBtn$1 = "
|
|
14006
|
+
var railBtn = "_gV _j";
|
|
14007
|
+
var wsBtn = "_g0 _G";
|
|
14008
|
+
var rowIcon = "_g3 _2 _j";
|
|
14009
|
+
var close = "_g4 _5 _j _6";
|
|
14010
|
+
var sessRename$1 = "_hf _H";
|
|
14011
|
+
var sessBtn$1 = "_hh _G";
|
|
14080
14012
|
//#endregion
|
|
14081
14013
|
//#region src/styles/session-pop.css.ts
|
|
14082
|
-
var sessionPop = "
|
|
14083
|
-
var sessionPopBtn = "
|
|
14014
|
+
var sessionPop = "_gR _8";
|
|
14015
|
+
var sessionPopBtn = "_gS _G";
|
|
14084
14016
|
//#endregion
|
|
14085
14017
|
//#region src/client/status.ts
|
|
14086
14018
|
/** Workspace activity dot from its polled status counts. */
|
|
@@ -14147,22 +14079,22 @@ var usage_pcts_default = _template("H", (input) => {
|
|
|
14147
14079
|
if (windows.length) {
|
|
14148
14080
|
const $scope1_id = _scope_id();
|
|
14149
14081
|
_html(`<span${_attr_class([
|
|
14150
|
-
"
|
|
14082
|
+
"_gL",
|
|
14151
14083
|
input.class,
|
|
14152
|
-
{ ["
|
|
14084
|
+
{ ["_gM"]: agent.stale_seconds != null }
|
|
14153
14085
|
])}${agent.stale_seconds != null ? _attr("title", `${agent.note || "provider unreachable"}; last cached numbers`) : " title=\"Plan usage\""}>`);
|
|
14154
14086
|
_for_of(windows, (win$1, i) => {
|
|
14155
14087
|
const $scope2_id = _scope_id();
|
|
14156
|
-
_html(`<span${_attr_class("
|
|
14088
|
+
_html(`<span${_attr_class("_gN")}>`);
|
|
14157
14089
|
_if(() => {
|
|
14158
14090
|
if (i) {
|
|
14159
14091
|
const $scope3_id = _scope_id();
|
|
14160
|
-
_html(`<span${_attr_class("
|
|
14092
|
+
_html(`<span${_attr_class("_gQ")} aria-hidden=true>·</span>`);
|
|
14161
14093
|
$si__input_agent && writeScope($scope3_id, {});
|
|
14162
14094
|
return 0;
|
|
14163
14095
|
}
|
|
14164
14096
|
}, $scope2_id, "b", $sg__input_agent, $sg__input_agent, $sg__input_agent, 0, 1);
|
|
14165
|
-
_html(`<span${_attr_class("
|
|
14097
|
+
_html(`<span${_attr_class("_gO")}>${_text_resume($scope2_id, "d", win$1.window, $sg__input_agent)}</span><span${_attr_class(["_gP", win$1.used_percent >= 90 ? "_f1" : win$1.used_percent >= 70 ? "_f0" : win$1.used_percent >= 40 ? "_fZ" : "_fY"])}>${_text_resume($scope2_id, "f", pctText(win$1.used_percent), $sg__input_agent)}</span>${_el_resume($scope2_id, "e", $sg__input_agent)}</span>`);
|
|
14166
14098
|
$si__input_agent && writeScope($scope2_id, {});
|
|
14167
14099
|
}, "window", $scope1_id, "a", $sg__input_agent, $sg__input_agent__OR__input_class, $sg__input_agent, "</span>", 1);
|
|
14168
14100
|
$si__input_agent__OR__input_class && writeScope($scope1_id, { _: _scope_with_id($scope0_id) });
|
|
@@ -14427,7 +14359,7 @@ var side_nav_item_default = _template("z", (input) => {
|
|
|
14427
14359
|
_if(() => {
|
|
14428
14360
|
if (input.rail) {
|
|
14429
14361
|
const $scope2_id = _scope_id();
|
|
14430
|
-
_html(`<a${_attr("href", `/w/${ws$1.id}`)}${_attr_class([railBtn, { ["
|
|
14362
|
+
_html(`<a${_attr("href", `/w/${ws$1.id}`)}${_attr_class([railBtn, { ["_gT"]: input.current }])}${ws$1.pending ? _attr("title", `${ws$1.name} — restoring`) : _attr("title", ws$1.name)}>${_text_resume($scope2_id, "b", input.index === void 0 ? "·" : input.index + 1, _serialize_guard($scope0_reason, 26))}<span${_attr_class([
|
|
14431
14363
|
"_y",
|
|
14432
14364
|
phase[dot$1],
|
|
14433
14365
|
"_ba"
|
|
@@ -14437,30 +14369,30 @@ var side_nav_item_default = _template("z", (input) => {
|
|
|
14437
14369
|
} else if (ws$1.pending) {
|
|
14438
14370
|
const $scope3_id = _scope_id();
|
|
14439
14371
|
_html(`<section${_attr_class([
|
|
14440
|
-
"
|
|
14441
|
-
"
|
|
14372
|
+
"_gX",
|
|
14373
|
+
"_hj",
|
|
14442
14374
|
{
|
|
14443
|
-
["
|
|
14444
|
-
["
|
|
14375
|
+
["_gY"]: input.railPop,
|
|
14376
|
+
["_gW"]: input.page
|
|
14445
14377
|
}
|
|
14446
|
-
])} aria-busy=${ws$1.pending_error ? "false" : "true"}><div${_attr_class("
|
|
14378
|
+
])} aria-busy=${ws$1.pending_error ? "false" : "true"}><div${_attr_class("_gZ")}><div${_attr_class(wsBtn)}>`);
|
|
14447
14379
|
_if(() => {
|
|
14448
14380
|
if (ws$1.pending_error) {
|
|
14449
14381
|
const $scope15_id = _scope_id();
|
|
14450
14382
|
icon_warning_default({
|
|
14451
14383
|
size: 12,
|
|
14452
|
-
class: "
|
|
14384
|
+
class: "_hl"
|
|
14453
14385
|
});
|
|
14454
14386
|
$si__input_workspaces__OR__input_workspaceId && writeScope($scope15_id, {});
|
|
14455
14387
|
return 0;
|
|
14456
14388
|
} else {
|
|
14457
14389
|
const $scope16_id = _scope_id();
|
|
14458
|
-
_html(`<span${_attr_class(["_E", "
|
|
14390
|
+
_html(`<span${_attr_class(["_E", "_hk"])}></span>`);
|
|
14459
14391
|
$si__input_workspaces__OR__input_workspaceId && writeScope($scope16_id, {});
|
|
14460
14392
|
return 1;
|
|
14461
14393
|
}
|
|
14462
14394
|
}, $scope3_id, "d", $sg__input_workspaces__OR__input_workspaceId, $sg__input_workspaces__OR__input_workspaceId, $sg__input_workspaces__OR__input_workspaceId, 0, 1);
|
|
14463
|
-
_html(`<span${_attr_class("
|
|
14395
|
+
_html(`<span${_attr_class("_g6")}><span${_attr_class("_g7")}>${_text_resume($scope3_id, "g", ws$1.name, $sg__input_workspaces__OR__input_workspaceId)}</span><span${_attr_class("_hm")}${_attr("title", ws$1.pending_error || restoreLine)}>${_text_resume($scope3_id, "i", ws$1.pending_error ? `Restore failed: ${ws$1.pending_error}` : "Restoring…")}</span>${_el_resume($scope3_id, "h")}</span></div></div></section>${_el_resume($scope3_id, "a", _serialize_guard($scope0_reason, 10))}`);
|
|
14464
14396
|
_subscribe($restoreLine__closures, _subscribe($si__input_workspaces__OR__input_workspaceId && $ws_pending_error__closures, _subscribe($si__input_workspaces__OR__input_workspaceId && $ws_name__closures, _subscribe($si__input_railPop && $input_railPop__closures, _subscribe($si__input_page && $input_page__closures, writeScope($scope3_id, {
|
|
14465
14397
|
_: _scope_with_id($scope1_id),
|
|
14466
14398
|
Cb0: $si__input_workspaces__OR__input_workspaceId && 1
|
|
@@ -14470,15 +14402,15 @@ var side_nav_item_default = _template("z", (input) => {
|
|
|
14470
14402
|
const $scope4_id = _scope_id();
|
|
14471
14403
|
const sessions$1 = input.sessions || [];
|
|
14472
14404
|
const phaseLabel = dot$1 === "working" ? "Working" : dot$1 === "waiting" ? "Needs input" : dot$1 === "idle" ? "Idle" : "Not running";
|
|
14473
|
-
_html(`<section${_attr_class(["
|
|
14474
|
-
["
|
|
14405
|
+
_html(`<section${_attr_class(["_gX", {
|
|
14406
|
+
["_gT"]: input.current,
|
|
14475
14407
|
["_bb"]: input.current,
|
|
14476
|
-
["
|
|
14477
|
-
["
|
|
14478
|
-
}])}><div${_attr_class("
|
|
14408
|
+
["_gY"]: input.railPop,
|
|
14409
|
+
["_gW"]: input.page
|
|
14410
|
+
}])}><div${_attr_class("_gZ")}><a${_attr("href", `/w/${ws$1.id}`)}${_attr_class(wsBtn)}><span${_attr_class([
|
|
14479
14411
|
"_y",
|
|
14480
14412
|
phase[dot$1],
|
|
14481
|
-
"
|
|
14413
|
+
"_hb"
|
|
14482
14414
|
])}${_attr("title", phaseLabel)}></span>${_el_resume($scope4_id, "d", $sg__input_workspaceId__OR__input_status)}`);
|
|
14483
14415
|
_if(() => {
|
|
14484
14416
|
if (sessions$1.length === 1) {
|
|
@@ -14491,7 +14423,7 @@ var side_nav_item_default = _template("z", (input) => {
|
|
|
14491
14423
|
icon_agent_default({
|
|
14492
14424
|
agent: activeAgent(sessions$1[0]),
|
|
14493
14425
|
size: 12,
|
|
14494
|
-
class: "
|
|
14426
|
+
class: "_g5"
|
|
14495
14427
|
});
|
|
14496
14428
|
$si__input_sessions && writeScope($scope17_id, {
|
|
14497
14429
|
_: _scope_with_id($scope4_id),
|
|
@@ -14501,11 +14433,11 @@ var side_nav_item_default = _template("z", (input) => {
|
|
|
14501
14433
|
}
|
|
14502
14434
|
}, $scope4_id, "e", $sg__input_sessions, $sg__input_sessions);
|
|
14503
14435
|
const metaText = sessions$1.length === 0 ? phaseLabel : sessions$1.length > 1 ? `${sessions$1.length} sessions` : "";
|
|
14504
|
-
_html(`<span${_attr_class("
|
|
14436
|
+
_html(`<span${_attr_class("_g6")}><span${_attr_class("_g7")}>${_text_resume($scope4_id, "h", ws$1.name, $sg__input_workspaces__OR__input_workspaceId)}</span>`);
|
|
14505
14437
|
_if(() => {
|
|
14506
14438
|
if (input.page && metaText) {
|
|
14507
14439
|
const $scope18_id = _scope_id();
|
|
14508
|
-
_html(`<span${_attr_class("
|
|
14440
|
+
_html(`<span${_attr_class("_g_")}>${_text_resume($scope18_id, "b", metaText, _serialize_guard($scope0_reason, 6))}</span>`);
|
|
14509
14441
|
$si__input_page__OR__input_sessions__OR__input_workspaceId__OR__input_status && writeScope($scope18_id, { _: _serialize_if($scope0_reason, 6) && _scope_with_id($scope4_id) });
|
|
14510
14442
|
return 0;
|
|
14511
14443
|
}
|
|
@@ -14518,7 +14450,7 @@ var side_nav_item_default = _template("z", (input) => {
|
|
|
14518
14450
|
"_L",
|
|
14519
14451
|
"_U",
|
|
14520
14452
|
"_N",
|
|
14521
|
-
"
|
|
14453
|
+
"_ha"
|
|
14522
14454
|
])}>${_text_resume($scope5_id, "b", input.current ? "Open" : "", _serialize_guard($scope0_reason, 21))}</span>`);
|
|
14523
14455
|
$si__input_current__OR__input_page__OR__input_rail__OR__input_workspaces__OR__input_workspaceId && _subscribe($si__input_current && $input_current__closures, writeScope($scope5_id, {
|
|
14524
14456
|
_: _scope_with_id($scope4_id),
|
|
@@ -14531,7 +14463,7 @@ var side_nav_item_default = _template("z", (input) => {
|
|
|
14531
14463
|
_if(() => {
|
|
14532
14464
|
if (!input.page) {
|
|
14533
14465
|
const $scope6_id = _scope_id();
|
|
14534
|
-
_html(`<div${_attr_class("
|
|
14466
|
+
_html(`<div${_attr_class("_g1")}>`);
|
|
14535
14467
|
_if(() => {
|
|
14536
14468
|
if (input.onNewSession) {
|
|
14537
14469
|
const $scope7_id = _scope_id();
|
|
@@ -14580,7 +14512,7 @@ var side_nav_item_default = _template("z", (input) => {
|
|
|
14580
14512
|
return 0;
|
|
14581
14513
|
}
|
|
14582
14514
|
}, $scope6_id, "c", $sg__input_onReview, $sg__input_onReview, $sg__input_onNewSession__OR__input_onReview, 0, 1);
|
|
14583
|
-
_html(`<a${input.managing ? _attr("href", `/w/${ws$1.id}`) : _attr("href", `/w/${ws$1.id}/manage`)}${_attr_class([rowIcon, { ["
|
|
14515
|
+
_html(`<a${input.managing ? _attr("href", `/w/${ws$1.id}`) : _attr("href", `/w/${ws$1.id}/manage`)}${_attr_class([rowIcon, { ["_gU"]: input.managing }])} title=${input.managing ? "\"Back to terminal\"" : "\"Manage workspace\""}${input.managing ? " aria-current=page" : ""}>`);
|
|
14584
14516
|
icon_manage_default({ size: 12 });
|
|
14585
14517
|
_html(`</a>${_el_resume($scope6_id, "d", _serialize_guard($scope0_reason, 7))}</div>`);
|
|
14586
14518
|
_subscribe($si__input_workspaces__OR__input_workspaceId && $ws_id__closures, _subscribe($si__input_managing && $input_managing__closures, _subscribe($si__input_onReview && $input_onReview__closures, _subscribe($si__input_onNewSession && $input_onNewSession__closures, writeScope($scope6_id, {
|
|
@@ -14590,7 +14522,7 @@ var side_nav_item_default = _template("z", (input) => {
|
|
|
14590
14522
|
return 0;
|
|
14591
14523
|
}
|
|
14592
14524
|
}, $scope4_id, "k", $sg__input_page, $sg__input_page, 1, 0, 1);
|
|
14593
|
-
_html(`</div><div${_attr_class("
|
|
14525
|
+
_html(`</div><div${_attr_class("_hg")}>`);
|
|
14594
14526
|
_if(() => {
|
|
14595
14527
|
if (sessions$1.length === 1 && openPlan) {
|
|
14596
14528
|
const $scope12_id = _scope_id();
|
|
@@ -14598,7 +14530,7 @@ var side_nav_item_default = _template("z", (input) => {
|
|
|
14598
14530
|
const $childScope3 = _peek_scope_id();
|
|
14599
14531
|
usage_pcts_default({
|
|
14600
14532
|
agent: openPlan,
|
|
14601
|
-
class: "
|
|
14533
|
+
class: "_g8"
|
|
14602
14534
|
});
|
|
14603
14535
|
_subscribe($openPlan__closures, writeScope($scope12_id, {
|
|
14604
14536
|
a: _existing_scope($childScope3),
|
|
@@ -14609,14 +14541,14 @@ var side_nav_item_default = _template("z", (input) => {
|
|
|
14609
14541
|
}, $scope4_id, "m");
|
|
14610
14542
|
_for_of(sessions$1.length > 1 ? sessions$1 : [], (s) => {
|
|
14611
14543
|
const $scope9_id = _scope_id();
|
|
14612
|
-
_html(`<div${_attr_class(["
|
|
14544
|
+
_html(`<div${_attr_class(["_g2", { ["_gT"]: s.id === input.currentTab }])}>`);
|
|
14613
14545
|
_if(() => {
|
|
14614
14546
|
if (renamingId === s.id) {
|
|
14615
14547
|
const $scope11_id = _scope_id();
|
|
14616
14548
|
_html(`<span${_attr_class([
|
|
14617
14549
|
"_y",
|
|
14618
14550
|
phase[sessionPhase(s.state)],
|
|
14619
|
-
"
|
|
14551
|
+
"_he"
|
|
14620
14552
|
])}></span>${_el_resume($scope11_id, "a", $sg__input_sessions)}`);
|
|
14621
14553
|
_set_serialize_reason({
|
|
14622
14554
|
1: $sg__input_sessions,
|
|
@@ -14626,7 +14558,7 @@ var side_nav_item_default = _template("z", (input) => {
|
|
|
14626
14558
|
icon_agent_default({
|
|
14627
14559
|
agent: activeAgent(s),
|
|
14628
14560
|
size: 12,
|
|
14629
|
-
class: "
|
|
14561
|
+
class: "_hi"
|
|
14630
14562
|
});
|
|
14631
14563
|
_html(`<input${_attr_input_value($scope11_id, "c", renameValue, _resume((_new_renameValue) => {
|
|
14632
14564
|
renameValue = _new_renameValue;
|
|
@@ -14645,9 +14577,9 @@ var side_nav_item_default = _template("z", (input) => {
|
|
|
14645
14577
|
icon_agent_default({
|
|
14646
14578
|
agent: activeAgent(s),
|
|
14647
14579
|
size: 12,
|
|
14648
|
-
class: "
|
|
14580
|
+
class: "_hi"
|
|
14649
14581
|
});
|
|
14650
|
-
_html(`<span${_attr_class("
|
|
14582
|
+
_html(`<span${_attr_class("_hc")}>${_text_resume($scope10_id, "e", s.title || activeAgent(s), $sg__input_sessions)}</span></a>${_el_resume($scope10_id, "a", _serialize_guard($scope0_reason, 5))}<div${_attr_class("_hd")}><button${_attr_class(rowIcon)} title="Rename session">`);
|
|
14651
14583
|
icon_edit_default({ size: 12 });
|
|
14652
14584
|
_html(`</button>${_el_resume($scope10_id, "g")}<button${_attr_class([close, { ["_q"]: armedKill === s.id }])} title=${armedKill === s.id ? "Close?" : "\"Close session\""}>`);
|
|
14653
14585
|
icon_xmark_default({ size: 12 });
|
|
@@ -14659,7 +14591,7 @@ var side_nav_item_default = _template("z", (input) => {
|
|
|
14659
14591
|
const $childScope6 = _peek_scope_id();
|
|
14660
14592
|
usage_pcts_default({
|
|
14661
14593
|
agent: openPlan,
|
|
14662
|
-
class: "
|
|
14594
|
+
class: "_g9"
|
|
14663
14595
|
});
|
|
14664
14596
|
_subscribe($openPlan__closures, writeScope($scope13_id, {
|
|
14665
14597
|
a: _existing_scope($childScope6),
|
|
@@ -14873,28 +14805,28 @@ var side_nav_default = _template("A", (input) => {
|
|
|
14873
14805
|
const iconSrc = `/api/instance/icon${input.instanceAccent ? `?v=${input.instanceAccent.slice(1)}` : ""}`;
|
|
14874
14806
|
const otherIds = itemIds.filter((id) => id !== ws?.id);
|
|
14875
14807
|
const listIds = isPage && ws ? [ws.id, ...otherIds] : itemIds;
|
|
14876
|
-
_html(`<aside${_attr_class(["
|
|
14877
|
-
["
|
|
14878
|
-
["
|
|
14808
|
+
_html(`<aside${_attr_class(["_dR", {
|
|
14809
|
+
["_dP"]: !navOpen,
|
|
14810
|
+
["_dQ"]: isPage
|
|
14879
14811
|
}])}${_attr("hidden", view === "diff")}>`);
|
|
14880
14812
|
_if(() => {
|
|
14881
14813
|
if (isPage) {
|
|
14882
14814
|
const $scope1_id = _scope_id();
|
|
14883
|
-
_html(`<header${_attr_class("
|
|
14815
|
+
_html(`<header${_attr_class("_dU")}><div${_attr_class("_d3")}>`);
|
|
14884
14816
|
_if(() => {
|
|
14885
14817
|
if (input.instanceName) {
|
|
14886
14818
|
const $scope2_id = _scope_id();
|
|
14887
|
-
_html(`<div${_attr_class("
|
|
14819
|
+
_html(`<div${_attr_class("_d0")} title="This work server (Settings → Appearance)"><img${_attr_class("_d1")}${_attr("src", iconSrc)} alt aria-hidden=true>${_el_resume($scope2_id, "b", $sg__input_instanceAccent)}<span${_attr_class("_d2")}>${_text_resume($scope2_id, "d", input.instanceName, $sg__input_instanceName)}</span></div>`);
|
|
14888
14820
|
_subscribe($si__input_instanceAccent && $iconSrc__closures, _subscribe($si__input_instanceName && $input_instanceName__closures, writeScope($scope2_id, { _: _scope_with_id($scope1_id) })));
|
|
14889
14821
|
return 0;
|
|
14890
14822
|
}
|
|
14891
14823
|
}, $scope1_id, "c", $sg__input_instanceName, $sg__input_instanceName, 1, 0, 1);
|
|
14892
|
-
_html(`<h1${_attr_class("
|
|
14824
|
+
_html(`<h1${_attr_class("_dV")}>Workspaces</h1></div><div${_attr_class("_dW")}>`);
|
|
14893
14825
|
_if(() => {}, $scope1_id, "f", 1, 1, 1, 0, 1);
|
|
14894
14826
|
_html(`<a${view === "settings" ? _attr("href", backHref) : " href=/settings"}${_attr_class([
|
|
14895
14827
|
iconBtn,
|
|
14896
|
-
"
|
|
14897
|
-
{ ["
|
|
14828
|
+
"_dX",
|
|
14829
|
+
{ ["_dM"]: view === "settings" }
|
|
14898
14830
|
])} title=${view === "settings" ? "\"Back to workspace\"" : "Settings"}${view === "settings" ? " aria-current=page" : ""}>`);
|
|
14899
14831
|
icon_settings_default({ size: 16 });
|
|
14900
14832
|
_if(() => {
|
|
@@ -14913,18 +14845,18 @@ var side_nav_default = _template("A", (input) => {
|
|
|
14913
14845
|
_if(() => {
|
|
14914
14846
|
if (!isPage && input.instanceName) {
|
|
14915
14847
|
const $scope3_id = _scope_id();
|
|
14916
|
-
_html(`<div${_attr_class("
|
|
14848
|
+
_html(`<div${_attr_class("_d0")} title="This work server (Settings → Appearance)"><img${_attr_class("_d1")}${_attr("src", iconSrc)} alt aria-hidden=true>${_el_resume($scope3_id, "b", $sg__input_instanceAccent)}<span${_attr_class("_d2")}>${_text_resume($scope3_id, "d", input.instanceName, $sg__input_instanceName)}</span></div>`);
|
|
14917
14849
|
writeScope($scope3_id, {});
|
|
14918
14850
|
return 0;
|
|
14919
14851
|
}
|
|
14920
14852
|
}, $scope0_id, "c", 1, 1, 1, 0, 1);
|
|
14921
|
-
_html(`<div${_attr_class("
|
|
14853
|
+
_html(`<div${_attr_class("_d4")}>`);
|
|
14922
14854
|
_for_of(listIds, (wsId) => {
|
|
14923
14855
|
const $scope4_id = _scope_id();
|
|
14924
14856
|
_if(() => {
|
|
14925
14857
|
if (isPage && wsId === ws?.id) {
|
|
14926
14858
|
const $scope13_id = _scope_id();
|
|
14927
|
-
_html(`<h2${_attr_class(["_bK", "
|
|
14859
|
+
_html(`<h2${_attr_class(["_bK", "_dY"])}>Current</h2>`);
|
|
14928
14860
|
writeScope($scope13_id, {});
|
|
14929
14861
|
return 0;
|
|
14930
14862
|
}
|
|
@@ -14932,7 +14864,7 @@ var side_nav_default = _template("A", (input) => {
|
|
|
14932
14864
|
_if(() => {
|
|
14933
14865
|
if (isPage && ws && wsId !== ws.id && wsId === otherIds[0]) {
|
|
14934
14866
|
const $scope14_id = _scope_id();
|
|
14935
|
-
_html(`<h2${_attr_class(["_bK", "
|
|
14867
|
+
_html(`<h2${_attr_class(["_bK", "_dY"])}>Other workspaces</h2>`);
|
|
14936
14868
|
writeScope($scope14_id, {});
|
|
14937
14869
|
return 0;
|
|
14938
14870
|
}
|
|
@@ -15016,7 +14948,7 @@ var side_nav_default = _template("A", (input) => {
|
|
|
15016
14948
|
railHover = null;
|
|
15017
14949
|
}, 150);
|
|
15018
14950
|
}, "A6", $scope5_id);
|
|
15019
|
-
_html(`<div${_attr_class("
|
|
14951
|
+
_html(`<div${_attr_class("_d5")}>`);
|
|
15020
14952
|
_for_of(itemIds, (wsId, i) => {
|
|
15021
14953
|
const $scope6_id = _scope_id();
|
|
15022
14954
|
_html("<span>");
|
|
@@ -15070,7 +15002,7 @@ var side_nav_default = _template("A", (input) => {
|
|
|
15070
15002
|
if (railHover) {
|
|
15071
15003
|
const $scope7_id = _scope_id();
|
|
15072
15004
|
const hoverId = railHover.id;
|
|
15073
|
-
_html(`<div${_attr_class(["_8", "
|
|
15005
|
+
_html(`<div${_attr_class(["_8", "_d8"])}${_attr_style(`top:${railHover.top}px;left:${railHover.left}px`)}>`);
|
|
15074
15006
|
_set_serialize_reason({
|
|
15075
15007
|
0: 1,
|
|
15076
15008
|
1: 1,
|
|
@@ -15155,7 +15087,7 @@ var side_nav_default = _template("A", (input) => {
|
|
|
15155
15087
|
return 0;
|
|
15156
15088
|
}
|
|
15157
15089
|
}, $scope0_id, "e");
|
|
15158
|
-
_html(`<div${_attr_class("
|
|
15090
|
+
_html(`<div${_attr_class("_d6")}>`);
|
|
15159
15091
|
_if(() => {
|
|
15160
15092
|
if (isPage) {
|
|
15161
15093
|
const $scope9_id = _scope_id();
|
|
@@ -15163,7 +15095,7 @@ var side_nav_default = _template("A", (input) => {
|
|
|
15163
15095
|
"_o",
|
|
15164
15096
|
"_p",
|
|
15165
15097
|
btnLg,
|
|
15166
|
-
"
|
|
15098
|
+
"_dZ"
|
|
15167
15099
|
])} title=${view === "new" ? "\"Back to workspace\"" : "\"New workspace\""}${view === "new" ? " aria-current=page" : ""}>`);
|
|
15168
15100
|
icon_folder_plus_default({ size: 16 });
|
|
15169
15101
|
_html(` New workspace</a>${_el_resume($scope9_id, "a")}`);
|
|
@@ -15185,9 +15117,9 @@ var side_nav_default = _template("A", (input) => {
|
|
|
15185
15117
|
return 1;
|
|
15186
15118
|
}
|
|
15187
15119
|
}, $scope8_id, "a", 1, 1, 1, "</button>", 1);
|
|
15188
|
-
_html(`<div${_attr_class(["_x", "
|
|
15120
|
+
_html(`<div${_attr_class(["_x", "_d7"])}></div>`);
|
|
15189
15121
|
_if(() => {}, $scope8_id, "c", 1, 1, 1, 0, 1);
|
|
15190
|
-
_html(`<a${view === "settings" ? _attr("href", backHref) : " href=/settings"}${_attr_class([iconBtn, { ["
|
|
15122
|
+
_html(`<a${view === "settings" ? _attr("href", backHref) : " href=/settings"}${_attr_class([iconBtn, { ["_dM"]: view === "settings" }])} title=${view === "settings" ? "\"Back to workspace\"" : "Settings"}${view === "settings" ? " aria-current=page" : ""}>`);
|
|
15191
15123
|
icon_settings_default({});
|
|
15192
15124
|
_if(() => {
|
|
15193
15125
|
if (input.setupReady === false) {
|
|
@@ -15197,7 +15129,7 @@ var side_nav_default = _template("A", (input) => {
|
|
|
15197
15129
|
return 0;
|
|
15198
15130
|
}
|
|
15199
15131
|
}, $scope8_id, "f", $sg__input_setupReady, $sg__input_setupReady, 1, 0, 1);
|
|
15200
|
-
_html(`</a>${_el_resume($scope8_id, "d")}<a${view === "new" ? _attr("href", backHref) : " href=/new"}${_attr_class([iconBtn, { ["
|
|
15132
|
+
_html(`</a>${_el_resume($scope8_id, "d")}<a${view === "new" ? _attr("href", backHref) : " href=/new"}${_attr_class([iconBtn, { ["_dM"]: view === "new" }])} title=${view === "new" ? "\"Back to workspace\"" : "\"New workspace\""}${view === "new" ? " aria-current=page" : ""}>`);
|
|
15201
15133
|
icon_folder_plus_default({ size: 16 });
|
|
15202
15134
|
_html(`</a>${_el_resume($scope8_id, "g")}`);
|
|
15203
15135
|
_script($scope8_id, "A15");
|
|
@@ -15376,9 +15308,9 @@ function parseInvite(text) {
|
|
|
15376
15308
|
}
|
|
15377
15309
|
//#endregion
|
|
15378
15310
|
//#region src/tags/manage-workspace.css.ts
|
|
15379
|
-
var content$1 = "
|
|
15380
|
-
var pageMeta = "
|
|
15381
|
-
var pathMeta = "
|
|
15311
|
+
var content$1 = "_d9 _cb";
|
|
15312
|
+
var pageMeta = "_d_ _cg";
|
|
15313
|
+
var pathMeta = "_ec _w";
|
|
15382
15314
|
//#endregion
|
|
15383
15315
|
//#region src/tags/icons/icon-clipboard.marko
|
|
15384
15316
|
var icon_clipboard_default = _template("V", (input) => {
|
|
@@ -15396,8 +15328,8 @@ var icon_clipboard_default = _template("V", (input) => {
|
|
|
15396
15328
|
});
|
|
15397
15329
|
_serialize_if($scope0_reason, 0) && writeScope($scope0_id, { a: _existing_scope($childScope) });
|
|
15398
15330
|
});
|
|
15399
|
-
var resultRow = "
|
|
15400
|
-
var resultBranch = "
|
|
15331
|
+
var resultRow = "_ga _G";
|
|
15332
|
+
var resultBranch = "_gc _2 _j";
|
|
15401
15333
|
//#endregion
|
|
15402
15334
|
//#region src/tags/icons/icon-branch.marko
|
|
15403
15335
|
var icon_branch_default = _template("R", (input) => {
|
|
@@ -15427,7 +15359,7 @@ var branch_pick_default = _template("d", (input) => {
|
|
|
15427
15359
|
let branchFilter = "";
|
|
15428
15360
|
let reloadTick = 0;
|
|
15429
15361
|
let refreshing = false;
|
|
15430
|
-
_html(`<div${_attr_class("
|
|
15362
|
+
_html(`<div${_attr_class("_ge")}>`);
|
|
15431
15363
|
_if(() => {
|
|
15432
15364
|
{
|
|
15433
15365
|
const $scope4_id = _scope_id();
|
|
@@ -15532,11 +15464,11 @@ var repo_picker_default = _template("v", (input$2) => {
|
|
|
15532
15464
|
_resume_branch($scope8_id);
|
|
15533
15465
|
}, $scope0_id) };
|
|
15534
15466
|
const hasBody = !!(pasted || results.length || filter && (!catalog || !pasted) || compact && ssoPending.length);
|
|
15535
|
-
_html(`<div${_attr_class([compact ? "_b1" : "
|
|
15467
|
+
_html(`<div${_attr_class([compact ? "_b1" : "_f5", { ["_b2"]: compact && !input$2.open }])}>`);
|
|
15536
15468
|
_if(() => {
|
|
15537
15469
|
if (!compact && ssoPending.length) {
|
|
15538
15470
|
const $scope10_id = _scope_id();
|
|
15539
|
-
_html(`<div${_attr_class("
|
|
15471
|
+
_html(`<div${_attr_class("_f6")}>`);
|
|
15540
15472
|
ssoBlock.content({});
|
|
15541
15473
|
_html("</div>");
|
|
15542
15474
|
writeScope($scope10_id, {});
|
|
@@ -15568,11 +15500,11 @@ var repo_picker_default = _template("v", (input$2) => {
|
|
|
15568
15500
|
return 0;
|
|
15569
15501
|
}
|
|
15570
15502
|
}, $scope0_id, "f", $sg__input_compact__OR__input_open, $sg__input_compact, 1, 0, 1);
|
|
15571
|
-
_html(`<div${_attr_class([compact ? pop$1 : "
|
|
15503
|
+
_html(`<div${_attr_class([compact ? pop$1 : "_f7"])}${_attr("hidden", !hasBody || compact && !input$2.open)}>`);
|
|
15572
15504
|
_if(() => {
|
|
15573
15505
|
if (compact && ssoPending.length) {
|
|
15574
15506
|
const $scope11_id = _scope_id();
|
|
15575
|
-
_html(`<div${_attr_class("
|
|
15507
|
+
_html(`<div${_attr_class("_f6")}>`);
|
|
15576
15508
|
ssoBlock.content({});
|
|
15577
15509
|
_html("</div>");
|
|
15578
15510
|
writeScope($scope11_id, {});
|
|
@@ -15582,16 +15514,16 @@ var repo_picker_default = _template("v", (input$2) => {
|
|
|
15582
15514
|
_if(() => {
|
|
15583
15515
|
if (pasted) {
|
|
15584
15516
|
const $scope2_id = _scope_id();
|
|
15585
|
-
_html(`<ul${_attr_class("
|
|
15517
|
+
_html(`<ul${_attr_class("_f8")}><li><div${_attr_class(["_f_", "_f9"])}><button${_attr_class(resultRow)}${pasteWillFork ? _attr("title", `Fork ${pasted} to your account and add the fork`) : _attr("title", `Add ${pasted} as-is (pushes go to that repo)`)}>`);
|
|
15586
15518
|
icon_plus_default({
|
|
15587
15519
|
size: 12,
|
|
15588
|
-
class: "
|
|
15520
|
+
class: "_gg"
|
|
15589
15521
|
});
|
|
15590
|
-
_html(`<span${_attr_class("
|
|
15522
|
+
_html(`<span${_attr_class("_gh")}>${_text_resume($scope2_id, "f", repoLabel(pasted))}</span></button>${_el_resume($scope2_id, "c")}`);
|
|
15591
15523
|
_if(() => {
|
|
15592
15524
|
if (pastedForkable) {
|
|
15593
15525
|
const $scope9_id = _scope_id();
|
|
15594
|
-
_html(`<button${_attr_class(["
|
|
15526
|
+
_html(`<button${_attr_class(["_gd", { ["_gb"]: pasteWillFork }])}${pasteWillFork ? " title=\"Will fork to your account; click to clone as-is instead\"" : _attr("title", `Fork ${pasted} to your account and clone the fork`)} aria-pressed=${pasteWillFork ? "true" : "false"}>`);
|
|
15595
15527
|
_if(() => {
|
|
15596
15528
|
if (pasteWillFork) {
|
|
15597
15529
|
const $scope13_id = _scope_id();
|
|
@@ -15611,7 +15543,7 @@ var repo_picker_default = _template("v", (input$2) => {
|
|
|
15611
15543
|
return 0;
|
|
15612
15544
|
}
|
|
15613
15545
|
}, $scope2_id, "g", 1, 1, 1, 0, 1);
|
|
15614
|
-
_html(`<button${_attr_class([resultBranch, { ["
|
|
15546
|
+
_html(`<button${_attr_class([resultBranch, { ["_gb"]: branchesFor === pasted }])}${_attr("title", `Pick a base branch for ${pasted}`)}${_attr("aria-label", `Pick a base branch for ${pasted}`)}>`);
|
|
15615
15547
|
icon_branch_default({ size: 12 });
|
|
15616
15548
|
_html(`</button>${_el_resume($scope2_id, "h")}</div>`);
|
|
15617
15549
|
_if(() => {
|
|
@@ -15646,15 +15578,15 @@ var repo_picker_default = _template("v", (input$2) => {
|
|
|
15646
15578
|
_if(() => {
|
|
15647
15579
|
if (results.length) {
|
|
15648
15580
|
const $scope4_id = _scope_id();
|
|
15649
|
-
_html(`<ul${_attr_class("
|
|
15581
|
+
_html(`<ul${_attr_class("_f8")}>`);
|
|
15650
15582
|
_for_of(results, (repo, i) => {
|
|
15651
15583
|
const $scope5_id = _scope_id();
|
|
15652
|
-
_html(`<li><div${_attr_class(["
|
|
15584
|
+
_html(`<li><div${_attr_class(["_f_", { ["_f9"]: i === highlight }])}><button${_attr_class(resultRow)}>`);
|
|
15653
15585
|
icon_plus_default({
|
|
15654
15586
|
size: 12,
|
|
15655
|
-
class: "
|
|
15587
|
+
class: "_gg"
|
|
15656
15588
|
});
|
|
15657
|
-
_html(`<span${_attr_class("
|
|
15589
|
+
_html(`<span${_attr_class("_gh")}>${_text_resume($scope5_id, "e", repoLabel(repo.nameWithOwner))}</span></button>${_el_resume($scope5_id, "b")}<button${_attr_class([resultBranch, { ["_gb"]: branchesFor === repo.nameWithOwner }])}${_attr("title", `Pick a base branch for ${repo.nameWithOwner}`)}${_attr("aria-label", `Pick a base branch for ${repo.nameWithOwner}`)}>`);
|
|
15658
15590
|
icon_branch_default({ size: 12 });
|
|
15659
15591
|
_html(`</button>${_el_resume($scope5_id, "f")}</div>${_el_resume($scope5_id, "a")}`);
|
|
15660
15592
|
_if(() => {
|
|
@@ -15899,7 +15831,7 @@ var manage_workspace_default = _template("q", (input) => {
|
|
|
15899
15831
|
setTimeout(() => loadProcs(void 0), 500);
|
|
15900
15832
|
}, "q9", $scope0_id);
|
|
15901
15833
|
const titleId = _id();
|
|
15902
|
-
_html(`<div${_attr_class("
|
|
15834
|
+
_html(`<div${_attr_class("_b_")} role=region${_attr("aria-labelledby", titleId)}><div${_attr_class("_ca")}><div${_attr_class(content$1)}>`);
|
|
15903
15835
|
_set_serialize_reason(286);
|
|
15904
15836
|
let $actions;
|
|
15905
15837
|
if (ws.repos.length) $actions = attrTag({ content: _content_resume("q17", () => {
|
|
@@ -15935,7 +15867,7 @@ var manage_workspace_default = _template("q", (input) => {
|
|
|
15935
15867
|
meta: attrTag({ content: _content("q16", () => {
|
|
15936
15868
|
_scope_reason();
|
|
15937
15869
|
const $scope15_id = _scope_id();
|
|
15938
|
-
_html(`<span${_attr_class(pageMeta)}${_attr("title", ws.display_path || ws.path)}><span${_attr_class("
|
|
15870
|
+
_html(`<span${_attr_class(pageMeta)}${_attr("title", ws.display_path || ws.path)}><span${_attr_class("_ea")}>${_text_resume($scope15_id, "c", ws.name)}</span>`);
|
|
15939
15871
|
_if(() => {
|
|
15940
15872
|
if (ws.status !== "active") {
|
|
15941
15873
|
const $scope19_id = _scope_id();
|
|
@@ -15944,7 +15876,7 @@ var manage_workspace_default = _template("q", (input) => {
|
|
|
15944
15876
|
return 0;
|
|
15945
15877
|
}
|
|
15946
15878
|
}, $scope15_id, "d", 1, 1, 1, 0, 1);
|
|
15947
|
-
_html(`<span${_attr_class("
|
|
15879
|
+
_html(`<span${_attr_class("_eb")} aria-hidden=true>·</span><span${_attr_class(pathMeta)}>${_text_resume($scope15_id, "g", ws.display_path || ws.path)}</span></span>${_el_resume($scope15_id, "a")}`);
|
|
15948
15880
|
_subscribe($ws_status__closures, _subscribe($ws_path__closures, _subscribe($ws_display_path__closures, _subscribe($ws_name__closures, writeScope($scope15_id, { _: _scope_with_id($scope0_id) })))));
|
|
15949
15881
|
_resume_branch($scope15_id);
|
|
15950
15882
|
}, $scope0_id) })
|
|
@@ -15977,23 +15909,23 @@ var manage_workspace_default = _template("q", (input) => {
|
|
|
15977
15909
|
return 0;
|
|
15978
15910
|
}
|
|
15979
15911
|
}, $scope0_id, "f", 1, 1, 1, 0, 1);
|
|
15980
|
-
_html(`<section${_attr_class("_bw")}><div${_attr_class("_bx")}><h2${_attr_class("_bK")}>Workspace</h2></div><div${_attr_class(["_bB", "
|
|
15912
|
+
_html(`<section${_attr_class("_bw")}><div${_attr_class("_bx")}><h2${_attr_class("_bK")}>Workspace</h2></div><div${_attr_class(["_bB", "_ci"])}><div${_attr_class(["_cj", "_ck"])}>`);
|
|
15981
15913
|
_if(() => {
|
|
15982
15914
|
if (ws.status === "active") {
|
|
15983
15915
|
const $scope8_id = _scope_id();
|
|
15984
|
-
_html(`<span${_attr_class("
|
|
15916
|
+
_html(`<span${_attr_class("_cm")}>Hide from the list. Worktrees stay on disk.</span><button type=button${_attr_class(btnSm)}${_attr("disabled", !!pendingAction)}>${_text_resume($scope8_id, "c", pendingAction === "archive" ? "Archiving…" : "Archive")}</button>${_el_resume($scope8_id, "b")}`);
|
|
15985
15917
|
_script($scope8_id, "q19");
|
|
15986
15918
|
writeScope($scope8_id, {});
|
|
15987
15919
|
return 0;
|
|
15988
15920
|
} else {
|
|
15989
15921
|
const $scope9_id = _scope_id();
|
|
15990
|
-
_html(`<span${_attr_class("
|
|
15922
|
+
_html(`<span${_attr_class("_cm")}>Archived and hidden from the list.</span><button type=button${_attr_class([btnSm, "_p"])}${_attr("disabled", !!pendingAction)}>${_text_resume($scope9_id, "c", pendingAction === "restore" ? "Restoring…" : "Restore")}</button>${_el_resume($scope9_id, "b")}`);
|
|
15991
15923
|
_script($scope9_id, "q20");
|
|
15992
15924
|
writeScope($scope9_id, {});
|
|
15993
15925
|
return 1;
|
|
15994
15926
|
}
|
|
15995
15927
|
}, $scope0_id, "k", 1, 1, 1, "</div>");
|
|
15996
|
-
_html(`<div${_attr_class(["
|
|
15928
|
+
_html(`<div${_attr_class(["_cj", "_ck"])}><span${_attr_class("_cm")}>Remove the workspace and its worktrees. Branches on origin stay.</span><button type=button${_attr_class([
|
|
15997
15929
|
btnSm,
|
|
15998
15930
|
"_r",
|
|
15999
15931
|
{ ["_q"]: confirmingDelete }
|
|
@@ -16029,8 +15961,8 @@ var manage_workspace_default = _template("q", (input) => {
|
|
|
16029
15961
|
});
|
|
16030
15962
|
_html(`</button>${_el_resume($scope0_id, "z")}</div><ul${_attr_class([
|
|
16031
15963
|
"_bB",
|
|
16032
|
-
"
|
|
16033
|
-
"
|
|
15964
|
+
"_ci",
|
|
15965
|
+
"_cw"
|
|
16034
15966
|
])}>`);
|
|
16035
15967
|
_for_of(ws.repos, (row) => {
|
|
16036
15968
|
const $scope1_id = _scope_id();
|
|
@@ -16280,15 +16212,15 @@ var manage_workspace_default = _template("q", (input) => {
|
|
|
16280
16212
|
const $scope17_id = _scope_id();
|
|
16281
16213
|
_html(`<section${_attr_class("_bw")}><div${_attr_class("_bx")}><h2${_attr_class("_bK")}>Running</h2><span${_attr_class(sectionCount)}>${_text_resume($scope17_id, "e", running.length)}</span></div><ul${_attr_class([
|
|
16282
16214
|
"_bB",
|
|
16283
|
-
"
|
|
16284
|
-
"
|
|
16215
|
+
"_ci",
|
|
16216
|
+
"_cw"
|
|
16285
16217
|
])}>`);
|
|
16286
16218
|
_for_of(running, (p) => {
|
|
16287
16219
|
const $scope18_id = _scope_id();
|
|
16288
16220
|
_html(`<li${_attr_class(flatCardRow)}><div${_attr_class("_bC")}${_attr("title", p.args)}><span${_attr_class([
|
|
16289
16221
|
"_bD",
|
|
16290
16222
|
"_w",
|
|
16291
|
-
"
|
|
16223
|
+
"_ed"
|
|
16292
16224
|
])}>${_text_resume($scope18_id, "d", p.cmd)}</span>`);
|
|
16293
16225
|
_if(() => {
|
|
16294
16226
|
if (p.ports.length) {
|
|
@@ -16386,11 +16318,11 @@ var manage_workspace_default = _template("q", (input) => {
|
|
|
16386
16318
|
});
|
|
16387
16319
|
//#endregion
|
|
16388
16320
|
//#region src/tags/new-workspace.css.ts
|
|
16389
|
-
var content = "
|
|
16390
|
-
var curBase = "
|
|
16391
|
-
var archived = "
|
|
16392
|
-
var archivedHint = "
|
|
16393
|
-
var archivedCard = "
|
|
16321
|
+
var content = "_ee _cb";
|
|
16322
|
+
var curBase = "_em _W _V";
|
|
16323
|
+
var archived = "_er _bw";
|
|
16324
|
+
var archivedHint = "_es _V";
|
|
16325
|
+
var archivedCard = "_et _bB";
|
|
16394
16326
|
//#endregion
|
|
16395
16327
|
//#region src/tags/icons/icon-group.marko
|
|
16396
16328
|
var icon_group_default = _template("eb", (input) => {
|
|
@@ -16410,8 +16342,8 @@ var icon_group_default = _template("eb", (input) => {
|
|
|
16410
16342
|
});
|
|
16411
16343
|
//#endregion
|
|
16412
16344
|
//#region src/tags/join-dialog.css.ts
|
|
16413
|
-
var dlg = "
|
|
16414
|
-
var hint = "
|
|
16345
|
+
var dlg = "_gm _fr";
|
|
16346
|
+
var hint = "_gn _V";
|
|
16415
16347
|
//#endregion
|
|
16416
16348
|
//#region src/tags/join-dialog.marko
|
|
16417
16349
|
var api$3;
|
|
@@ -16540,26 +16472,26 @@ var join_dialog_default = _template("o", (input) => {
|
|
|
16540
16472
|
content: _content("o12", () => {
|
|
16541
16473
|
_scope_reason();
|
|
16542
16474
|
const $scope1_id = _scope_id();
|
|
16543
|
-
_html(`<h2${_attr_class("
|
|
16475
|
+
_html(`<h2${_attr_class("_fs")}${_attr("id", titleId)}>Join a workspace</h2><p${_attr_class(hint)}>Paste an invite: the same repos, on your own lane of their branch.</p><textarea${_attr_class([
|
|
16544
16476
|
"_X",
|
|
16545
16477
|
"_w",
|
|
16546
|
-
"
|
|
16478
|
+
"_gp"
|
|
16547
16479
|
])} placeholder="{ "name": …, "branch": …, "repos": ["owner/name", …] }" aria-label="Workspace invite" rows=6 autocomplete=off spellcheck=false${_attr("disabled", busy)} autofocus>${_attr_textarea_value($scope1_id, "c", invite, setInvite)}</textarea>${_el_resume($scope1_id, "c")}`);
|
|
16548
16480
|
_if(() => {
|
|
16549
16481
|
if (parsed.error) {
|
|
16550
16482
|
const $scope8_id = _scope_id();
|
|
16551
|
-
_html(`<p${_attr_class([hint, "
|
|
16483
|
+
_html(`<p${_attr_class([hint, "_go"])}>${_text_resume($scope8_id, "b", parsed.error)}</p>`);
|
|
16552
16484
|
_subscribe($parsed_error__closures, writeScope($scope8_id, { Cag: 1 }));
|
|
16553
16485
|
return 0;
|
|
16554
16486
|
} else if (parsed.ok) {
|
|
16555
16487
|
const $scope3_id = _scope_id();
|
|
16556
|
-
_html(`<ul${_attr_class("
|
|
16488
|
+
_html(`<ul${_attr_class("_gq")}>`);
|
|
16557
16489
|
_for_of(parsed.ok.repos, (fullName) => {
|
|
16558
16490
|
const $scope9_id = _scope_id();
|
|
16559
|
-
_html(`<li${_attr_class("
|
|
16491
|
+
_html(`<li${_attr_class("_gr")}><span${_attr_class("_gs")}>${_text_resume($scope9_id, "c", repoLabel(fullName))}</span></li>`);
|
|
16560
16492
|
writeScope($scope9_id, {});
|
|
16561
16493
|
}, (r) => r, $scope3_id, "a", 1, 1, 1, "</ul>", 1);
|
|
16562
|
-
_html(`<p${_attr_class(hint)}>Your own lane of <span${_attr_class("_w")}>${_text_resume($scope3_id, "d", parsed.ok.branch)}</span> in each; PRs target theirs.</p><label${_attr_class("
|
|
16494
|
+
_html(`<p${_attr_class(hint)}>Your own lane of <span${_attr_class("_w")}>${_text_resume($scope3_id, "d", parsed.ok.branch)}</span> in each; PRs target theirs.</p><label${_attr_class("_gt")}><span${_attr_class("_bK")}>Name</span><input${_attr_input_value($scope3_id, "g", name, _resume((_new_name) => {
|
|
16563
16495
|
name = _new_name;
|
|
16564
16496
|
}, "o1", $scope3_id))}${_attr_class("_X")}${_attr("placeholder", parsed.ok.name)}${_attr("disabled", busy)}>${_el_resume($scope3_id, "g")}</label>`);
|
|
16565
16497
|
_script($scope3_id, "o8");
|
|
@@ -16596,10 +16528,10 @@ var join_dialog_default = _template("o", (input) => {
|
|
|
16596
16528
|
_if(() => {
|
|
16597
16529
|
if (busy && steps$2.length) {
|
|
16598
16530
|
const $scope6_id = _scope_id();
|
|
16599
|
-
_html(`<ul${_attr_class("
|
|
16531
|
+
_html(`<ul${_attr_class("_gu")}>`);
|
|
16600
16532
|
_for_of(steps$2, (step$2, i) => {
|
|
16601
16533
|
const $scope7_id = _scope_id();
|
|
16602
|
-
_html(`<li${_attr_class(["
|
|
16534
|
+
_html(`<li${_attr_class(["_gw", { ["_gv"]: i === steps$2.length - 1 }])}>`);
|
|
16603
16535
|
_if(() => {
|
|
16604
16536
|
if (i === steps$2.length - 1) {
|
|
16605
16537
|
const $scope10_id = _scope_id();
|
|
@@ -16608,7 +16540,7 @@ var join_dialog_default = _template("o", (input) => {
|
|
|
16608
16540
|
return 0;
|
|
16609
16541
|
} else {
|
|
16610
16542
|
const $scope11_id = _scope_id();
|
|
16611
|
-
_html(`<span${_attr_class("
|
|
16543
|
+
_html(`<span${_attr_class("_gx")}>`);
|
|
16612
16544
|
icon_check_default({ size: 14 });
|
|
16613
16545
|
_html("</span>");
|
|
16614
16546
|
writeScope($scope11_id, {});
|
|
@@ -16765,7 +16697,7 @@ var new_workspace_default = _template("s", (input) => {
|
|
|
16765
16697
|
}
|
|
16766
16698
|
}, "s6", $scope0_id);
|
|
16767
16699
|
const titleId = _id();
|
|
16768
|
-
_html(`<div${_attr_class("
|
|
16700
|
+
_html(`<div${_attr_class("_b_")} role=region${_attr("aria-labelledby", titleId)}><div${_attr_class("_ca")}><div${_attr_class(content)}>`);
|
|
16769
16701
|
_set_serialize_reason({
|
|
16770
16702
|
0: _serialize_guard($scope0_reason, 2),
|
|
16771
16703
|
1: $sg__input_backHref__OR__input_onExit,
|
|
@@ -16814,23 +16746,23 @@ var new_workspace_default = _template("s", (input) => {
|
|
|
16814
16746
|
return 0;
|
|
16815
16747
|
}
|
|
16816
16748
|
}, $scope0_id, "e", 1, 1, 1, 0, 1);
|
|
16817
|
-
_html(`<label${_attr_class("
|
|
16749
|
+
_html(`<label${_attr_class("_eh")}><span${_attr_class("_bK")}>Name</span><input${_attr_input_value($scope0_id, "h", name, _resume((_new_name) => {
|
|
16818
16750
|
name = _new_name;
|
|
16819
|
-
}, "s0", $scope0_id))}${_attr_class(inputLg)} placeholder=my-feature${_attr("disabled", busy)} autofocus>${_el_resume($scope0_id, "h")}</label><section${_attr_class("_bw")}><div${_attr_class("
|
|
16751
|
+
}, "s0", $scope0_id))}${_attr_class(inputLg)} placeholder=my-feature${_attr("disabled", busy)} autofocus>${_el_resume($scope0_id, "h")}</label><section${_attr_class("_bw")}><div${_attr_class("_ei")}><h2${_attr_class("_bK")}>Repos</h2><button${_attr_class(iconBtnRow)} title="Refresh repo list" aria-label="Refresh repo list"${_attr("disabled", catalogRefreshing)}>`);
|
|
16820
16752
|
_set_serialize_reason(1);
|
|
16821
16753
|
const $childScope2 = _peek_scope_id();
|
|
16822
16754
|
icon_refresh_default({
|
|
16823
16755
|
size: 14,
|
|
16824
16756
|
class: catalogRefreshing && "_D"
|
|
16825
16757
|
});
|
|
16826
|
-
_html(`</button>${_el_resume($scope0_id, "l")}</div><ul${_attr_class("
|
|
16758
|
+
_html(`</button>${_el_resume($scope0_id, "l")}</div><ul${_attr_class("_ej")}>`);
|
|
16827
16759
|
_for_of(selected, (repo) => {
|
|
16828
16760
|
const $scope4_id = _scope_id();
|
|
16829
|
-
_html(`<li><div${_attr_class(row)}><span${_attr_class("
|
|
16761
|
+
_html(`<li><div${_attr_class(row)}><span${_attr_class("_ek")}>${_text_resume($scope4_id, "c", repoLabel(repo.fullName))}</span>`);
|
|
16830
16762
|
_if(() => {
|
|
16831
16763
|
if (repo.fork !== void 0) {
|
|
16832
16764
|
const $scope5_id = _scope_id();
|
|
16833
|
-
_html(`<button${_attr_class(["
|
|
16765
|
+
_html(`<button${_attr_class(["_en", { ["_el"]: repo.fork }])}${repo.fork ? _attr("title", `${repo.fullName} will be forked to your account; click to clone as-is instead`) : _attr("title", `Fork ${repo.fullName} to your account and clone the fork`)} aria-pressed=${repo.fork ? "true" : "false"}${_attr("disabled", busy)}>`);
|
|
16834
16766
|
_if(() => {
|
|
16835
16767
|
if (repo.fork) {
|
|
16836
16768
|
const $scope14_id = _scope_id();
|
|
@@ -16853,7 +16785,7 @@ var new_workspace_default = _template("s", (input) => {
|
|
|
16853
16785
|
_html(`<button${_attr_class([
|
|
16854
16786
|
curBase,
|
|
16855
16787
|
"_w",
|
|
16856
|
-
{ ["
|
|
16788
|
+
{ ["_el"]: branchesFor === repo.fullName }
|
|
16857
16789
|
])}${_attr("title", `Change base branch for ${repo.fullName}`)}${_attr("aria-label", `Change base branch for ${repo.fullName}`)}${_attr("disabled", busy)}>`);
|
|
16858
16790
|
icon_branch_default({ size: 12 });
|
|
16859
16791
|
_html(`${_text_resume($scope4_id, "g", repo.baseBranch ? `${_to_text(" ")}${_to_text(repo.baseBranch)}` : "")}</button>${_el_resume($scope4_id, "e")}<button${_attr_class([iconBtnXs, "_6"])}${_attr("title", `Remove ${repo.fullName}`)}${_attr("disabled", busy)}>`);
|
|
@@ -16914,10 +16846,10 @@ var new_workspace_default = _template("s", (input) => {
|
|
|
16914
16846
|
_if(() => {
|
|
16915
16847
|
if (busy && steps.length) {
|
|
16916
16848
|
const $scope11_id = _scope_id();
|
|
16917
|
-
_html(`<ul${_attr_class("
|
|
16849
|
+
_html(`<ul${_attr_class("_eo")}>`);
|
|
16918
16850
|
_for_of(steps, (step, i) => {
|
|
16919
16851
|
const $scope12_id = _scope_id();
|
|
16920
|
-
_html(`<li${_attr_class(["
|
|
16852
|
+
_html(`<li${_attr_class(["_eu", { ["_ep"]: i === steps.length - 1 }])}>`);
|
|
16921
16853
|
_if(() => {
|
|
16922
16854
|
if (i === steps.length - 1) {
|
|
16923
16855
|
const $scope17_id = _scope_id();
|
|
@@ -16926,7 +16858,7 @@ var new_workspace_default = _template("s", (input) => {
|
|
|
16926
16858
|
return 0;
|
|
16927
16859
|
} else {
|
|
16928
16860
|
const $scope18_id = _scope_id();
|
|
16929
|
-
_html(`<span${_attr_class("
|
|
16861
|
+
_html(`<span${_attr_class("_eq")}>`);
|
|
16930
16862
|
icon_check_default({ size: 14 });
|
|
16931
16863
|
_html("</span>");
|
|
16932
16864
|
writeScope($scope18_id, {});
|
|
@@ -16940,7 +16872,7 @@ var new_workspace_default = _template("s", (input) => {
|
|
|
16940
16872
|
return 0;
|
|
16941
16873
|
}
|
|
16942
16874
|
}, $scope0_id, "s", 1, 1, 1, 0, 1);
|
|
16943
|
-
_html(`<div${_attr_class("
|
|
16875
|
+
_html(`<div${_attr_class("_ef")}>`);
|
|
16944
16876
|
_if(() => {
|
|
16945
16877
|
if (input.onExit || busy) {
|
|
16946
16878
|
const $scope1_id = _scope_id();
|
|
@@ -16953,12 +16885,12 @@ var new_workspace_default = _template("s", (input) => {
|
|
|
16953
16885
|
_html(`<button type=button${_attr_class([
|
|
16954
16886
|
btnLg,
|
|
16955
16887
|
"_p",
|
|
16956
|
-
"
|
|
16888
|
+
"_eg"
|
|
16957
16889
|
])}${_attr("disabled", busy || !!restoring || !name.trim())}>${_text_resume($scope0_id, "w", busy ? "Creating…" : "Create workspace")}</button>${_el_resume($scope0_id, "v")}</div>`);
|
|
16958
16890
|
_if(() => {
|
|
16959
16891
|
if (archived$1.length) {
|
|
16960
16892
|
const $scope6_id = _scope_id();
|
|
16961
|
-
_html(`<section${_attr_class(archived)}><div${_attr_class("
|
|
16893
|
+
_html(`<section${_attr_class(archived)}><div${_attr_class("_ei")}><h2${_attr_class("_bK")}>Archived</h2><span${_attr_class(sectionCount)}>${_text_resume($scope6_id, "e", archived$1.length, $sg__input_workspaces)}</span></div><p${_attr_class(archivedHint)}>Restore an archived workspace instead of creating a new one.</p><ul${_attr_class("_bz")}>`);
|
|
16962
16894
|
_for_of(archived$1, (ws) => {
|
|
16963
16895
|
const $scope7_id = _scope_id();
|
|
16964
16896
|
_html(`<li${_attr_class(archivedCard)}><div${_attr_class("_bC")}><span${_attr_class("_bD")}>${_text_resume($scope7_id, "d", ws.name, $sg__input_workspaces)}</span><span${_attr_class([metaTrunc, "_w"])}${_attr("title", ws.display_path || ws.path)}>${_text_resume($scope7_id, "f", ws.display_path || ws.path, $sg__input_workspaces)}</span>${_el_resume($scope7_id, "e", $sg__input_workspaces)}</div><button type=button${_attr_class(btnLg)}${_attr("disabled", busy || !!restoring)}>`);
|
|
@@ -17042,11 +16974,11 @@ var new_workspace_default = _template("s", (input) => {
|
|
|
17042
16974
|
_resume_branch($scope0_id);
|
|
17043
16975
|
});
|
|
17044
16976
|
var kbtn = "_dL _4 _j";
|
|
17045
|
-
var sessOpen = "
|
|
17046
|
-
var sessRename = "
|
|
17047
|
-
var dpadPaste = "
|
|
17048
|
-
var repeat = "
|
|
17049
|
-
var dpadEsc = "
|
|
16977
|
+
var sessOpen = "_eJ _G";
|
|
16978
|
+
var sessRename = "_eN _H";
|
|
16979
|
+
var dpadPaste = "_eV _eU";
|
|
16980
|
+
var repeat = "_eW _eU";
|
|
16981
|
+
var dpadEsc = "_eY _eU";
|
|
17050
16982
|
//#endregion
|
|
17051
16983
|
//#region src/tags/term-find.marko
|
|
17052
16984
|
var term_find_default = _template("D", (input) => {
|
|
@@ -17083,19 +17015,19 @@ var term_find_default = _template("D", (input) => {
|
|
|
17083
17015
|
const canStep = hasQuery && open;
|
|
17084
17016
|
const keybar = input.placement === "keybar";
|
|
17085
17017
|
_html(`<div${_attr_class([
|
|
17086
|
-
"
|
|
17087
|
-
keybar ? "
|
|
17088
|
-
!open && "
|
|
17089
|
-
])} aria-hidden=${open ? "false" : "true"}><div${_attr_class(["
|
|
17018
|
+
"_gE",
|
|
17019
|
+
keybar ? "_gG" : "_gF",
|
|
17020
|
+
!open && "_gI"
|
|
17021
|
+
])} aria-hidden=${open ? "false" : "true"}><div${_attr_class(["_gz", keybar ? "_gH" : "_gB"])}><input${_attr_input_value($scope0_id, "c", query, _resume(function(v) {
|
|
17090
17022
|
if (!open) return;
|
|
17091
17023
|
query = v;
|
|
17092
17024
|
live.query = v;
|
|
17093
17025
|
run(0);
|
|
17094
|
-
}, "D1", $scope0_id))}${_attr_class([findInput, keybar && "
|
|
17026
|
+
}, "D1", $scope0_id))}${_attr_class([findInput, keybar && "_gJ"])} type=search enterkeyhint=search autocomplete=off tabindex=${open ? "0" : "-1"} placeholder="Find in terminal" aria-label="Find in terminal">${_el_resume($scope0_id, "c")}<button type=button${_attr_class([findIconBtn, keybar && "_gK"])} title="Previous match"${_attr("disabled", !canStep)} tabindex=${open ? "0" : "-1"}>`);
|
|
17095
17027
|
icon_arrow_up_default({ size: 14 });
|
|
17096
|
-
_html(`</button>${_el_resume($scope0_id, "d")}<button type=button${_attr_class([findIconBtn, keybar && "
|
|
17028
|
+
_html(`</button>${_el_resume($scope0_id, "d")}<button type=button${_attr_class([findIconBtn, keybar && "_gK"])} title="Next match"${_attr("disabled", !canStep)} tabindex=${open ? "0" : "-1"}>`);
|
|
17097
17029
|
icon_arrow_down_default({ size: 14 });
|
|
17098
|
-
_html(`</button>${_el_resume($scope0_id, "f")}<button type=button${_attr_class([findIconBtn, keybar && "
|
|
17030
|
+
_html(`</button>${_el_resume($scope0_id, "f")}<button type=button${_attr_class([findIconBtn, keybar && "_gK"])} title="Close find" tabindex=${open ? "0" : "-1"}>`);
|
|
17099
17031
|
icon_xmark_default({ size: 14 });
|
|
17100
17032
|
_html(`</button>${_el_resume($scope0_id, "h")}</div>${_el_resume($scope0_id, "b", _serialize_guard($scope0_reason, 2))}</div>${_el_resume($scope0_id, "a")}`);
|
|
17101
17033
|
const $return = focusInput;
|
|
@@ -17516,7 +17448,7 @@ var term_default = _template("E", (input) => {
|
|
|
17516
17448
|
trapOpen = true;
|
|
17517
17449
|
}
|
|
17518
17450
|
}, "E13", $scope0_id);
|
|
17519
|
-
_html(`<div${_attr("hidden", !onTermPage)}${_attr_class("
|
|
17451
|
+
_html(`<div${_attr("hidden", !onTermPage)}${_attr_class("_ev")}><div${_attr_class("_ew")}></div>${_el_resume($scope0_id, "b")}`);
|
|
17520
17452
|
_if(() => {
|
|
17521
17453
|
if (findOpen) {
|
|
17522
17454
|
const $scope12_id = _scope_id();
|
|
@@ -17546,7 +17478,7 @@ var term_default = _template("E", (input) => {
|
|
|
17546
17478
|
_if(() => {
|
|
17547
17479
|
if (uploading) {
|
|
17548
17480
|
const $scope21_id = _scope_id();
|
|
17549
|
-
_html(`<div${_attr_class("
|
|
17481
|
+
_html(`<div${_attr_class("_eC")}>uploading…</div>`);
|
|
17550
17482
|
writeScope($scope21_id, {});
|
|
17551
17483
|
return 0;
|
|
17552
17484
|
}
|
|
@@ -17554,7 +17486,7 @@ var term_default = _template("E", (input) => {
|
|
|
17554
17486
|
_if(() => {
|
|
17555
17487
|
if (copiedFlash) {
|
|
17556
17488
|
const $scope22_id = _scope_id();
|
|
17557
|
-
_html(`<div${_attr_class("
|
|
17489
|
+
_html(`<div${_attr_class("_eB")}>Copied</div>`);
|
|
17558
17490
|
writeScope($scope22_id, {});
|
|
17559
17491
|
return 0;
|
|
17560
17492
|
}
|
|
@@ -17563,7 +17495,7 @@ var term_default = _template("E", (input) => {
|
|
|
17563
17495
|
_if(() => {
|
|
17564
17496
|
if (trapOpen) {
|
|
17565
17497
|
const $scope11_id = _scope_id();
|
|
17566
|
-
_html(`<div${_attr_class("
|
|
17498
|
+
_html(`<div${_attr_class("_eD")}><div${_attr_class("_eE")}><p${_attr_class("_eZ")}>Long-press the field below and choose Paste</p><input placeholder="Paste here…">${_el_resume($scope11_id, "d")}<button${_attr_class("_o")}>Cancel</button>${_el_resume($scope11_id, "e")}</div>${_el_resume($scope11_id, "b")}</div>${_el_resume($scope11_id, "a")}`);
|
|
17567
17499
|
_script($scope11_id, "E28");
|
|
17568
17500
|
_script($scope11_id, "E29");
|
|
17569
17501
|
writeScope($scope11_id, {});
|
|
@@ -17641,7 +17573,7 @@ var term_default = _template("E", (input) => {
|
|
|
17641
17573
|
popEl.style.top = `${Math.max(8, btn.top - popEl.offsetHeight - 8)}px`;
|
|
17642
17574
|
popEl.style.left = `${Math.max(8, Math.min(btn.left + btn.width / 2 - popEl.offsetWidth / 2, window.innerWidth - popEl.offsetWidth - 8))}px`;
|
|
17643
17575
|
}, "E19", $scope4_id);
|
|
17644
|
-
_html(`<button${_attr_class([kbtn, "
|
|
17576
|
+
_html(`<button${_attr_class([kbtn, "_eF"])} title=${onTermPage ? "Sessions" : "\"Back to session\""}${onTermPage ? _attr("popovertarget", sessPopId) : ""}>`);
|
|
17645
17577
|
_set_serialize_reason({
|
|
17646
17578
|
1: $sg__input_agent__OR__input_sessionState,
|
|
17647
17579
|
2: $sg__input_agent__OR__input_sessionState
|
|
@@ -17655,7 +17587,7 @@ var term_default = _template("E", (input) => {
|
|
|
17655
17587
|
"_y",
|
|
17656
17588
|
"_ba",
|
|
17657
17589
|
phase[sessionPhase(input.sessionState)]
|
|
17658
|
-
])}></span>${_el_resume($scope4_id, "c", _serialize_guard($scope0_reason, 6))}</button>${_el_resume($scope4_id, "a")}<div${_attr("id", sessPopId)} popover=auto${_attr_class(["_8", "
|
|
17590
|
+
])}></span>${_el_resume($scope4_id, "c", _serialize_guard($scope0_reason, 6))}</button>${_el_resume($scope4_id, "a")}<div${_attr("id", sessPopId)} popover=auto${_attr_class(["_8", "_eG"])}>`);
|
|
17659
17591
|
_if(() => {
|
|
17660
17592
|
if ((input.sessions || []).length > 0) {
|
|
17661
17593
|
const $scope5_id = _scope_id();
|
|
@@ -17671,7 +17603,7 @@ var term_default = _template("E", (input) => {
|
|
|
17671
17603
|
const $scope6_id = _scope_id();
|
|
17672
17604
|
const $for_content__s_agent__closures = /* @__PURE__ */ new Set();
|
|
17673
17605
|
const $for_content__s_id__closures = /* @__PURE__ */ new Set();
|
|
17674
|
-
_html(`<div${_attr_class(["
|
|
17606
|
+
_html(`<div${_attr_class(["_eI", { ["_eH"]: s.id === input.sessionId }])}>`);
|
|
17675
17607
|
_if(() => {
|
|
17676
17608
|
if (renamingId === s.id) {
|
|
17677
17609
|
const $scope24_id = _scope_id();
|
|
@@ -17703,7 +17635,7 @@ var term_default = _template("E", (input) => {
|
|
|
17703
17635
|
agent: activeAgent(s),
|
|
17704
17636
|
size: 14
|
|
17705
17637
|
});
|
|
17706
|
-
_html(`<span${_attr_class("
|
|
17638
|
+
_html(`<span${_attr_class("_eK")}><span${_attr_class("_eM")}>${_text_resume($scope7_id, "f", s.title || activeAgent(s), $sg__input_sessions)}</span>`);
|
|
17707
17639
|
_if(() => {
|
|
17708
17640
|
if (s.id === input.sessionId) {
|
|
17709
17641
|
const $scope23_id = _scope_id();
|
|
@@ -17715,7 +17647,7 @@ var term_default = _template("E", (input) => {
|
|
|
17715
17647
|
const $childScope6 = _peek_scope_id();
|
|
17716
17648
|
usage_pcts_default({
|
|
17717
17649
|
agent: plan,
|
|
17718
|
-
class: "
|
|
17650
|
+
class: "_eL"
|
|
17719
17651
|
});
|
|
17720
17652
|
writeScope($scope26_id, { a: _existing_scope($childScope6) });
|
|
17721
17653
|
return 0;
|
|
@@ -17732,7 +17664,7 @@ var term_default = _template("E", (input) => {
|
|
|
17732
17664
|
_if(() => {
|
|
17733
17665
|
if (input.onRenameSession) {
|
|
17734
17666
|
const $scope25_id = _scope_id();
|
|
17735
|
-
_html(`<button${_attr_class(["
|
|
17667
|
+
_html(`<button${_attr_class(["_eO", "_eP"])} title="Rename session">`);
|
|
17736
17668
|
icon_edit_default({ size: 12 });
|
|
17737
17669
|
_html(`</button>${_el_resume($scope25_id, "a")}`);
|
|
17738
17670
|
_script($scope25_id, "E32");
|
|
@@ -17744,7 +17676,7 @@ var term_default = _template("E", (input) => {
|
|
|
17744
17676
|
if (input.onCloseSession) {
|
|
17745
17677
|
const $scope8_id = _scope_id();
|
|
17746
17678
|
_html(`<button${_attr_class([
|
|
17747
|
-
"
|
|
17679
|
+
"_eO",
|
|
17748
17680
|
"_6",
|
|
17749
17681
|
{ ["_q"]: armedClose === s.id }
|
|
17750
17682
|
])} title=${armedClose === s.id ? "Close?" : "\"Close session\""}>`);
|
|
@@ -17786,7 +17718,7 @@ var term_default = _template("E", (input) => {
|
|
|
17786
17718
|
return 0;
|
|
17787
17719
|
}
|
|
17788
17720
|
}, $scope4_id, "e", $sg__input_sessions, $sg__input_sessions, $sg__input_sessions);
|
|
17789
|
-
_html(`<div${_attr_class("
|
|
17721
|
+
_html(`<div${_attr_class("_eQ")}><span${_attr_class("_eR")}>New session</span><div${_attr_class("_eS")}>`);
|
|
17790
17722
|
_for_of(["shell", ...input.agents || []], (agent) => {
|
|
17791
17723
|
const $scope9_id = _scope_id();
|
|
17792
17724
|
_html(`<button${_attr_class(iconBtnRow)}${_attr("title", `New ${agent} session`)}>`);
|
|
@@ -17849,7 +17781,7 @@ var term_default = _template("E", (input) => {
|
|
|
17849
17781
|
overlay: attrTag({ content: _content_resume("E49", () => {
|
|
17850
17782
|
_scope_reason();
|
|
17851
17783
|
const $scope15_id = _scope_id();
|
|
17852
|
-
_html(`<div${_attr("id", $dpadId_getter)} popover=auto${_attr_class("
|
|
17784
|
+
_html(`<div${_attr("id", $dpadId_getter)} popover=auto${_attr_class("_eT")}>`);
|
|
17853
17785
|
forOf(DPAD, (row) => {
|
|
17854
17786
|
const $scope16_id = _scope_id();
|
|
17855
17787
|
forOf(row, (cell) => {
|
|
@@ -17869,7 +17801,7 @@ var term_default = _template("E", (input) => {
|
|
|
17869
17801
|
writeScope($scope18_id, { _: _scope_with_id($scope17_id) });
|
|
17870
17802
|
} else {
|
|
17871
17803
|
const $scope19_id = _scope_id();
|
|
17872
|
-
_html(`<button${_attr_class([repeat, { ["
|
|
17804
|
+
_html(`<button${_attr_class([repeat, { ["_eX"]: cell.icon === "enter" }])}${_attr("title", cell.label)}${_attr("aria-label", cell.label)}>`);
|
|
17873
17805
|
if (cell.icon === "arrow-up") {
|
|
17874
17806
|
_scope_id();
|
|
17875
17807
|
icon_arrow_up_default({ size: 18 });
|
|
@@ -19537,7 +19469,8 @@ function cliArgs(args, opts, scopeToAgents) {
|
|
|
19537
19469
|
function runCli(args, opts, scopeToAgents = true) {
|
|
19538
19470
|
if (!skillsCliAvailable()) throw httpError(400, "The skills CLI is not installed — add it from the Machine section.");
|
|
19539
19471
|
const cwd = opts.scope === "workspace" ? opts.wsPath : void 0;
|
|
19540
|
-
|
|
19472
|
+
const key = opts.scope === "global" ? "global" : opts.wsPath ?? "workspace";
|
|
19473
|
+
return withLock(key, () => runStreaming("skills", cliArgs(args, opts, scopeToAgents), {
|
|
19541
19474
|
log: opts.log,
|
|
19542
19475
|
cwd,
|
|
19543
19476
|
timeout: 18e4
|
|
@@ -20211,18 +20144,10 @@ var started = false;
|
|
|
20211
20144
|
async function scan() {
|
|
20212
20145
|
const sessions = all("SELECT id, agent FROM sessions").filter((session) => session.agent !== "shell");
|
|
20213
20146
|
if (!sessions.length) return false;
|
|
20214
|
-
const
|
|
20215
|
-
|
|
20216
|
-
"-a",
|
|
20217
|
-
"-F",
|
|
20218
|
-
"#{session_name} #{window_activity}"
|
|
20219
|
-
]).catch(() => null);
|
|
20220
|
-
if (out === null) return false;
|
|
20147
|
+
const panes = await listPanes();
|
|
20148
|
+
if (panes === null) return false;
|
|
20221
20149
|
const wroteAt = /* @__PURE__ */ new Map();
|
|
20222
|
-
for (const
|
|
20223
|
-
const [name, stamp] = line.split(" ");
|
|
20224
|
-
if (name?.startsWith("wk-")) wroteAt.set(name.slice(3), Number(stamp) * 1e3);
|
|
20225
|
-
}
|
|
20150
|
+
for (const { id, activityAt } of panes) if (id) wroteAt.set(id, activityAt);
|
|
20226
20151
|
const now = Date.now();
|
|
20227
20152
|
let live = 0;
|
|
20228
20153
|
for (const session of sessions) {
|
|
@@ -26799,24 +26724,32 @@ var DEFLATE_THRESHOLD = 512;
|
|
|
26799
26724
|
/** Which dims each session's tmux window was last forced to — lets the
|
|
26800
26725
|
* input path skip the tmux exec when this client already holds the size.
|
|
26801
26726
|
* A memo, not the truth: the window can move under it (another client, a
|
|
26802
|
-
* tmux restart, an old tmux that ignores resize-window), so
|
|
26803
|
-
*
|
|
26804
|
-
*
|
|
26805
|
-
*
|
|
26727
|
+
* tmux restart, an old tmux that ignores resize-window), so every force
|
|
26728
|
+
* still checks the real window size inside tmux and goes ahead when they
|
|
26729
|
+
* disagree — the fix for "the pane came up small and only a window resize
|
|
26730
|
+
* put it right". */
|
|
26806
26731
|
var lastForced = /* @__PURE__ */ new Map();
|
|
26807
26732
|
/** Forces for one session run in order: the connect-time force and the
|
|
26808
26733
|
* resize that follows it a frame later are separate tmux execs, and the
|
|
26809
26734
|
* later, correct one must not finish first. */
|
|
26810
26735
|
var forceChain = /* @__PURE__ */ new Map();
|
|
26811
|
-
|
|
26812
|
-
|
|
26813
|
-
|
|
26814
|
-
|
|
26736
|
+
/** Resize the window to `cols`x`rows` only when it is not already there,
|
|
26737
|
+
* decided inside tmux: `if-shell -F` evaluates the format without a shell
|
|
26738
|
+
* and runs the resize in the same exec, so the "is it already this size"
|
|
26739
|
+
* read and the write cannot interleave with another client's force, and an
|
|
26740
|
+
* attach or viewport change costs one tmux spawn instead of two. A
|
|
26741
|
+
* same-size resize-window would still SIGWINCH the agent TUI into a
|
|
26742
|
+
* visible reflow, which is why the check exists at all. */
|
|
26743
|
+
async function resizeWindowIfNeeded(name, cols, rows) {
|
|
26744
|
+
await tmux([
|
|
26745
|
+
"if-shell",
|
|
26746
|
+
"-F",
|
|
26815
26747
|
"-t",
|
|
26816
26748
|
name,
|
|
26817
|
-
|
|
26818
|
-
|
|
26819
|
-
|
|
26749
|
+
`#{==:#{window_width}x#{window_height},${cols}x${rows}}`,
|
|
26750
|
+
"",
|
|
26751
|
+
`resize-window -t ${name} -x ${cols} -y ${rows}`
|
|
26752
|
+
]).catch(() => {});
|
|
26820
26753
|
}
|
|
26821
26754
|
/** Visible-viewer counts per session; mirrored into agent state so push
|
|
26822
26755
|
* notifications skip sessions someone is actively watching. */
|
|
@@ -26879,13 +26812,13 @@ async function handleTermConnection(ws, req) {
|
|
|
26879
26812
|
ws.close();
|
|
26880
26813
|
} catch {}
|
|
26881
26814
|
});
|
|
26882
|
-
await ensureTmuxServer();
|
|
26883
26815
|
const name = tmuxName(session.id);
|
|
26884
26816
|
const alive = await tmux([
|
|
26885
26817
|
"has-session",
|
|
26886
26818
|
"-t",
|
|
26887
26819
|
name
|
|
26888
26820
|
]).then(() => true, () => false);
|
|
26821
|
+
if (!alive) await ensureTmuxServer();
|
|
26889
26822
|
let tmuxArgs;
|
|
26890
26823
|
if (alive && !respawn) {
|
|
26891
26824
|
markTmuxStarted(session.id);
|
|
@@ -26987,22 +26920,11 @@ async function handleTermConnection(ws, req) {
|
|
|
26987
26920
|
let dims = [cols, rows];
|
|
26988
26921
|
const forceWindowSize = () => {
|
|
26989
26922
|
if (!visible) return;
|
|
26990
|
-
|
|
26991
|
-
const memo = lastForced.get(session.id);
|
|
26992
|
-
lastForced.set(session.id, key);
|
|
26923
|
+
lastForced.set(session.id, `${dims[0]}x${dims[1]}`);
|
|
26993
26924
|
const run = (forceChain.get(session.id) || Promise.resolve()).then(async () => {
|
|
26994
|
-
if (memo === key && await windowSize(tmuxName(session.id)) === key) return;
|
|
26995
26925
|
const [x, y] = dims;
|
|
26996
26926
|
lastForced.set(session.id, `${x}x${y}`);
|
|
26997
|
-
await
|
|
26998
|
-
"resize-window",
|
|
26999
|
-
"-t",
|
|
27000
|
-
tmuxName(session.id),
|
|
27001
|
-
"-x",
|
|
27002
|
-
String(x),
|
|
27003
|
-
"-y",
|
|
27004
|
-
String(y)
|
|
27005
|
-
]).catch(() => {});
|
|
26927
|
+
await resizeWindowIfNeeded(tmuxName(session.id), x, y);
|
|
27006
26928
|
});
|
|
27007
26929
|
forceChain.set(session.id, run);
|
|
27008
26930
|
run.finally(() => {
|
|
@@ -27220,4 +27142,4 @@ server.listen(port, () => {
|
|
|
27220
27142
|
//#endregion
|
|
27221
27143
|
export {};
|
|
27222
27144
|
|
|
27223
|
-
;var __MARKO_MANIFEST__={"ZLT8joi":{"block":[2,"stylesheet#/assets/icon-arrow-down-
|
|
27145
|
+
;var __MARKO_MANIFEST__={"ZLT8joi":{"block":[2,"stylesheet#/assets/icon-arrow-down-Dcmmz4Cl.css",6,"<link",0," rel=\"stylesheet\" crossorigin href=\"",1,"assets/icon-arrow-down-Dcmmz4Cl.css\"",">",2,"stylesheet#/assets/app-page-IRq6b-Ob.css",6,"<link",0," rel=\"stylesheet\" crossorigin href=\"",1,"assets/app-page-IRq6b-Ob.css\"",">"],"defer":[2,"/assets/new-BpPnfh6F.js",6,"<script",0," async type=\"module\" crossorigin src=\"",1,"assets/new-BpPnfh6F.js\"","></script>",2,"modulepreload#/assets/_BOllftHQ.js",6,"<link",0," rel=\"modulepreload\" crossorigin href=\"",1,"assets/_BOllftHQ.js\"",">",2,"modulepreload#/assets/_hePW80VL.js",6,"<link",0," rel=\"modulepreload\" crossorigin href=\"",1,"assets/_hePW80VL.js\"",">",2,"modulepreload#/assets/_oalV3UwK.js",6,"<link",0," rel=\"modulepreload\" crossorigin href=\"",1,"assets/_oalV3UwK.js\"",">",2,"modulepreload#/assets/_BJq6B3f8.js",6,"<link",0," rel=\"modulepreload\" crossorigin href=\"",1,"assets/_BJq6B3f8.js\"",">"]},"AA0T2xt":{"block":[2,"stylesheet#/assets/icon-arrow-down-Dcmmz4Cl.css",6,"<link",0," rel=\"stylesheet\" crossorigin href=\"",1,"assets/icon-arrow-down-Dcmmz4Cl.css\"",">",2,"stylesheet#/assets/app-page-IRq6b-Ob.css",6,"<link",0," rel=\"stylesheet\" crossorigin href=\"",1,"assets/app-page-IRq6b-Ob.css\"",">"],"defer":[2,"/assets/settings-BpPnfh6F.js",6,"<script",0," async type=\"module\" crossorigin src=\"",1,"assets/settings-BpPnfh6F.js\"","></script>",2,"modulepreload#/assets/_BOllftHQ.js",6,"<link",0," rel=\"modulepreload\" crossorigin href=\"",1,"assets/_BOllftHQ.js\"",">",2,"modulepreload#/assets/_hePW80VL.js",6,"<link",0," rel=\"modulepreload\" crossorigin href=\"",1,"assets/_hePW80VL.js\"",">",2,"modulepreload#/assets/_oalV3UwK.js",6,"<link",0," rel=\"modulepreload\" crossorigin href=\"",1,"assets/_oalV3UwK.js\"",">",2,"modulepreload#/assets/_BJq6B3f8.js",6,"<link",0," rel=\"modulepreload\" crossorigin href=\"",1,"assets/_BJq6B3f8.js\"",">"]},"ibphXY4":{"block":[2,"stylesheet#/assets/icon-arrow-down-Dcmmz4Cl.css",6,"<link",0," rel=\"stylesheet\" crossorigin href=\"",1,"assets/icon-arrow-down-Dcmmz4Cl.css\"",">",2,"stylesheet#/assets/app-page-IRq6b-Ob.css",6,"<link",0," rel=\"stylesheet\" crossorigin href=\"",1,"assets/app-page-IRq6b-Ob.css\"",">"],"defer":[2,"/assets/w._-BpPnfh6F.js",6,"<script",0," async type=\"module\" crossorigin src=\"",1,"assets/w._-BpPnfh6F.js\"","></script>",2,"modulepreload#/assets/_BOllftHQ.js",6,"<link",0," rel=\"modulepreload\" crossorigin href=\"",1,"assets/_BOllftHQ.js\"",">",2,"modulepreload#/assets/_hePW80VL.js",6,"<link",0," rel=\"modulepreload\" crossorigin href=\"",1,"assets/_hePW80VL.js\"",">",2,"modulepreload#/assets/_oalV3UwK.js",6,"<link",0," rel=\"modulepreload\" crossorigin href=\"",1,"assets/_oalV3UwK.js\"",">",2,"modulepreload#/assets/_BJq6B3f8.js",6,"<link",0," rel=\"modulepreload\" crossorigin href=\"",1,"assets/_BJq6B3f8.js\"",">"]},"T$MNY0k":{"block":[2,"stylesheet#/assets/icon-arrow-down-Dcmmz4Cl.css",6,"<link",0," rel=\"stylesheet\" crossorigin href=\"",1,"assets/icon-arrow-down-Dcmmz4Cl.css\"",">",2,"stylesheet#/assets/app-page-IRq6b-Ob.css",6,"<link",0," rel=\"stylesheet\" crossorigin href=\"",1,"assets/app-page-IRq6b-Ob.css\"",">"],"defer":[2,"/assets/w._-B5NuNac4.js",6,"<script",0," async type=\"module\" crossorigin src=\"",1,"assets/w._-B5NuNac4.js\"","></script>",2,"modulepreload#/assets/_BOllftHQ.js",6,"<link",0," rel=\"modulepreload\" crossorigin href=\"",1,"assets/_BOllftHQ.js\"",">",2,"modulepreload#/assets/_hePW80VL.js",6,"<link",0," rel=\"modulepreload\" crossorigin href=\"",1,"assets/_hePW80VL.js\"",">",2,"modulepreload#/assets/_oalV3UwK.js",6,"<link",0," rel=\"modulepreload\" crossorigin href=\"",1,"assets/_oalV3UwK.js\"",">",2,"modulepreload#/assets/_BJq6B3f8.js",6,"<link",0," rel=\"modulepreload\" crossorigin href=\"",1,"assets/_BJq6B3f8.js\"",">"]},"LH2lXAg":{"block":[2,"stylesheet#/assets/icon-arrow-down-Dcmmz4Cl.css",6,"<link",0," rel=\"stylesheet\" crossorigin href=\"",1,"assets/icon-arrow-down-Dcmmz4Cl.css\"",">",2,"stylesheet#/assets/app-page-IRq6b-Ob.css",6,"<link",0," rel=\"stylesheet\" crossorigin href=\"",1,"assets/app-page-IRq6b-Ob.css\"",">"],"defer":[2,"/assets/w-BpPnfh6F.js",6,"<script",0," async type=\"module\" crossorigin src=\"",1,"assets/w-BpPnfh6F.js\"","></script>",2,"modulepreload#/assets/_BOllftHQ.js",6,"<link",0," rel=\"modulepreload\" crossorigin href=\"",1,"assets/_BOllftHQ.js\"",">",2,"modulepreload#/assets/_hePW80VL.js",6,"<link",0," rel=\"modulepreload\" crossorigin href=\"",1,"assets/_hePW80VL.js\"",">",2,"modulepreload#/assets/_oalV3UwK.js",6,"<link",0," rel=\"modulepreload\" crossorigin href=\"",1,"assets/_oalV3UwK.js\"",">",2,"modulepreload#/assets/_BJq6B3f8.js",6,"<link",0," rel=\"modulepreload\" crossorigin href=\"",1,"assets/_BJq6B3f8.js\"",">"]},"_m":{"block":[2,"stylesheet#/assets/diff-view-6-VC0hOC.css",6,"<link",0," rel=\"stylesheet\" href=\"",1,"assets/diff-view-6-VC0hOC.css\"",">",2,"stylesheet#/assets/icon-arrow-down-Dcmmz4Cl.css",6,"<link",0," rel=\"stylesheet\" href=\"",1,"assets/icon-arrow-down-Dcmmz4Cl.css\"",">"],"defer":[2,"/assets/diff-view-CHN5eqyz.js",6,"<script",0," async type=\"module\" crossorigin src=\"",1,"assets/diff-view-CHN5eqyz.js\"","></script>",2,"modulepreload#/assets/_BOllftHQ.js",6,"<link",0," rel=\"modulepreload\" crossorigin href=\"",1,"assets/_BOllftHQ.js\"",">"]}};
|