@korso/shepherd-ui 0.5.1 → 0.7.0
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/ShepherdRoot.js +1 -1
- package/dist/client.d.ts +3 -1
- package/dist/client.js +13 -4
- package/dist/config/ConfigPanel.d.ts +3 -1
- package/dist/config/ConfigPanel.js +2 -2
- package/dist/config/ConfirmDeleteWorkspace.d.ts +13 -0
- package/dist/config/ConfirmDeleteWorkspace.js +28 -0
- package/dist/config/ConnectAgent.js +29 -11
- package/dist/config/GeneralSettings.d.ts +3 -1
- package/dist/config/GeneralSettings.js +41 -3
- package/dist/lib/{Dashboard-qipRa5MO.js → Dashboard-D7tbhMwK.js} +312 -307
- package/dist/lib/index.d.ts +18 -2
- package/dist/lib/index.js +446 -318
- package/dist/lib/selfhost.js +1 -1
- package/dist/lib/styles.css +43 -5
- package/dist/preview.js +4 -0
- package/dist/selfhost/assets/{index-xMSuivCM.js → index--_PPE03M.js} +7 -7
- package/dist/selfhost/assets/{index-DfVGGaT0.css → index-dBmCZSQx.css} +1 -1
- package/dist/selfhost/index.html +2 -2
- package/dist/test/mockClient.js +1 -0
- package/package.json +1 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var ue = (t, n, c) =>
|
|
4
|
-
import { jsx as
|
|
1
|
+
var Le = Object.defineProperty;
|
|
2
|
+
var Me = (t, n, c) => n in t ? Le(t, n, { enumerable: !0, configurable: !0, writable: !0, value: c }) : t[n] = c;
|
|
3
|
+
var ue = (t, n, c) => Me(t, typeof n != "symbol" ? n + "" : n, c);
|
|
4
|
+
import { jsx as o, jsxs as m, Fragment as H } from "react/jsx-runtime";
|
|
5
5
|
import { createContext as Pe, useContext as Oe, useState as N, useRef as P, useCallback as R, useEffect as se, Fragment as Ge, useLayoutEffect as Fe, useId as Se } from "react";
|
|
6
6
|
import { z as e } from "zod";
|
|
7
|
-
const E = e.string(), Y = e.number(),
|
|
7
|
+
const E = e.string(), Y = e.number(), We = e.object({
|
|
8
8
|
agentName: e.string(),
|
|
9
9
|
human: e.string(),
|
|
10
10
|
branch: e.string(),
|
|
@@ -15,7 +15,7 @@ const E = e.string(), Y = e.number(), Ue = e.object({
|
|
|
15
15
|
authorIsLive: e.boolean(),
|
|
16
16
|
authorLastActiveAt: E,
|
|
17
17
|
updatedAt: E
|
|
18
|
-
}),
|
|
18
|
+
}), Ue = e.object({
|
|
19
19
|
kind: e.enum(["committed", "uncommitted"]),
|
|
20
20
|
// A git object id (lowercase hex, 4–64 chars) for `committed` entries, or null
|
|
21
21
|
// for `uncommitted`. This value is forwarded by the hub to OTHER clients, which
|
|
@@ -36,7 +36,7 @@ const E = e.string(), Y = e.number(), Ue = e.object({
|
|
|
36
36
|
// (100) committed entries + 1 uncommitted, so this ceiling is generous. If
|
|
37
37
|
// MAX_COMMITS is ever raised above ~599, raise this in lockstep or the hub
|
|
38
38
|
// will start 400-rejecting otherwise-valid reports.
|
|
39
|
-
entries: e.array(
|
|
39
|
+
entries: e.array(Ue).max(600)
|
|
40
40
|
}), Z = e.object({
|
|
41
41
|
workItemId: e.string().uuid(),
|
|
42
42
|
agentName: e.string(),
|
|
@@ -64,8 +64,8 @@ const E = e.string(), Y = e.number(), Ue = e.object({
|
|
|
64
64
|
yourClaims: e.array(Z).default([]),
|
|
65
65
|
announcements: e.array(V),
|
|
66
66
|
// Per-agent change records for the workspace. Defaulted for version-skew safety.
|
|
67
|
-
changeRecords: e.array(
|
|
68
|
-
}),
|
|
67
|
+
changeRecords: e.array(We).default([])
|
|
68
|
+
}), He = e.object({
|
|
69
69
|
name: e.string(),
|
|
70
70
|
human: e.string(),
|
|
71
71
|
program: e.string(),
|
|
@@ -103,7 +103,7 @@ const E = e.string(), Y = e.number(), Ue = e.object({
|
|
|
103
103
|
toAdmin: e.boolean().default(!1),
|
|
104
104
|
createdAt: E
|
|
105
105
|
}), me = e.object({
|
|
106
|
-
agents: e.array(
|
|
106
|
+
agents: e.array(He),
|
|
107
107
|
tasks: e.array(Be),
|
|
108
108
|
announcements: e.array(Ke),
|
|
109
109
|
// The server's clock, so the client computes "expires in / last seen" against
|
|
@@ -241,6 +241,8 @@ e.object({
|
|
|
241
241
|
});
|
|
242
242
|
const Xe = re, Ze = e.object({
|
|
243
243
|
workspaces: e.array(re)
|
|
244
|
+
}), Je = e.object({
|
|
245
|
+
deleted: e.literal(!0)
|
|
244
246
|
});
|
|
245
247
|
e.object({
|
|
246
248
|
name: e.string().min(1).optional()
|
|
@@ -249,7 +251,7 @@ const pe = e.object({
|
|
|
249
251
|
// The raw shp_ token, shown once at creation and never returned again.
|
|
250
252
|
token: e.string(),
|
|
251
253
|
id: e.string()
|
|
252
|
-
}),
|
|
254
|
+
}), Qe = e.object({
|
|
253
255
|
id: e.string(),
|
|
254
256
|
name: e.string().nullable(),
|
|
255
257
|
// ISO timestamp string (see IsoTimestamp note above) or null when unused / not revoked.
|
|
@@ -257,7 +259,7 @@ const pe = e.object({
|
|
|
257
259
|
createdAt: E,
|
|
258
260
|
revokedAt: E.nullable()
|
|
259
261
|
}), ge = e.object({
|
|
260
|
-
tokens: e.array(
|
|
262
|
+
tokens: e.array(Qe)
|
|
261
263
|
});
|
|
262
264
|
e.object({
|
|
263
265
|
expiresInDays: e.number().int().positive().optional(),
|
|
@@ -265,7 +267,7 @@ e.object({
|
|
|
265
267
|
// integer to cap it instead.
|
|
266
268
|
maxUses: e.number().int().positive().optional()
|
|
267
269
|
});
|
|
268
|
-
const
|
|
270
|
+
const et = e.object({
|
|
269
271
|
code: e.string(),
|
|
270
272
|
// ISO timestamp string, or null when the invite never expires.
|
|
271
273
|
expiresAt: E.nullable(),
|
|
@@ -276,47 +278,47 @@ const Qe = e.object({
|
|
|
276
278
|
e.object({
|
|
277
279
|
email: e.string().email()
|
|
278
280
|
});
|
|
279
|
-
const
|
|
281
|
+
const tt = e.object({
|
|
280
282
|
email: e.string(),
|
|
281
283
|
sentAt: E
|
|
282
|
-
}),
|
|
284
|
+
}), nt = e.object({
|
|
283
285
|
// The workspace the caller just joined.
|
|
284
286
|
workspace: re
|
|
285
|
-
}),
|
|
287
|
+
}), st = e.object({
|
|
286
288
|
accountId: e.string(),
|
|
287
289
|
displayName: e.string().nullable(),
|
|
288
290
|
githubLogin: e.string().nullable(),
|
|
289
291
|
email: e.string().nullable(),
|
|
290
292
|
avatarUrl: e.string().nullable(),
|
|
291
293
|
role: Ce
|
|
292
|
-
}),
|
|
293
|
-
members: e.array(
|
|
294
|
-
}),
|
|
294
|
+
}), at = e.object({
|
|
295
|
+
members: e.array(st)
|
|
296
|
+
}), rt = e.enum(["bug", "suggestion", "other"]);
|
|
295
297
|
e.object({
|
|
296
|
-
type:
|
|
298
|
+
type: rt,
|
|
297
299
|
body: e.string().trim().min(1).max(4e3)
|
|
298
300
|
});
|
|
299
|
-
const
|
|
301
|
+
const ot = e.object({
|
|
300
302
|
ok: e.literal(!0),
|
|
301
303
|
// uuid PK (the feedback table, like workspaces, uses gen_random_uuid()).
|
|
302
304
|
id: e.string()
|
|
303
|
-
}),
|
|
304
|
-
class
|
|
305
|
+
}), it = 5e3;
|
|
306
|
+
class U extends Error {
|
|
305
307
|
/**
|
|
306
308
|
* @param message - Human-readable failure description.
|
|
307
309
|
* @param status - Upstream HTTP status, omitted for network/abort failures.
|
|
308
310
|
*/
|
|
309
|
-
constructor(c,
|
|
311
|
+
constructor(c, r) {
|
|
310
312
|
super(c);
|
|
311
313
|
/** Upstream HTTP status for a non-2xx response; absent for transport errors. */
|
|
312
314
|
ue(this, "status");
|
|
313
|
-
this.name = "ShepherdClientError",
|
|
315
|
+
this.name = "ShepherdClientError", r !== void 0 && (this.status = r);
|
|
314
316
|
}
|
|
315
317
|
}
|
|
316
|
-
function
|
|
318
|
+
function ct(t) {
|
|
317
319
|
return t instanceof Error ? t.message : "Something went wrong.";
|
|
318
320
|
}
|
|
319
|
-
async function
|
|
321
|
+
async function lt(t) {
|
|
320
322
|
try {
|
|
321
323
|
const n = await t.json();
|
|
322
324
|
if (n !== null && typeof n == "object" && "error" in n && typeof n.error == "string")
|
|
@@ -325,33 +327,31 @@ async function ct(t) {
|
|
|
325
327
|
}
|
|
326
328
|
return "";
|
|
327
329
|
}
|
|
328
|
-
function
|
|
329
|
-
const n = t.baseUrl.replace(/\/$/, ""), c = t.timeoutMs ??
|
|
330
|
+
function qt(t) {
|
|
331
|
+
const n = t.baseUrl.replace(/\/$/, ""), c = t.timeoutMs ?? it, r = encodeURIComponent;
|
|
330
332
|
async function s(a, i, l = {}) {
|
|
331
|
-
var f,
|
|
333
|
+
var f, k;
|
|
332
334
|
const h = new AbortController(), u = setTimeout(() => h.abort(), c);
|
|
333
335
|
let d;
|
|
334
336
|
try {
|
|
335
|
-
const v = {
|
|
336
|
-
"Content-Type": "application/json"
|
|
337
|
-
}, A = await ((f = t.getAuthHeader) == null ? void 0 : f.call(t)), S = {
|
|
337
|
+
const v = l.body !== void 0 ? { "Content-Type": "application/json" } : {}, A = await ((f = t.getAuthHeader) == null ? void 0 : f.call(t)), S = {
|
|
338
338
|
method: a,
|
|
339
339
|
headers: { ...v, ...typeof A == "string" ? { Authorization: A } : A ?? {} },
|
|
340
340
|
signal: h.signal
|
|
341
341
|
};
|
|
342
342
|
l.body !== void 0 && (S.body = JSON.stringify(l.body)), d = await fetch(`${n}${i}`, S);
|
|
343
343
|
} catch (v) {
|
|
344
|
-
throw new
|
|
344
|
+
throw new U(
|
|
345
345
|
v instanceof Error ? v.message : String(v)
|
|
346
346
|
);
|
|
347
347
|
} finally {
|
|
348
348
|
clearTimeout(u);
|
|
349
349
|
}
|
|
350
350
|
if (d.status === 401)
|
|
351
|
-
throw (
|
|
351
|
+
throw (k = t.onUnauthorized) == null || k.call(t), new U("Unauthorized", 401);
|
|
352
352
|
if (!d.ok) {
|
|
353
|
-
const v = await
|
|
354
|
-
throw new
|
|
353
|
+
const v = await lt(d);
|
|
354
|
+
throw new U(
|
|
355
355
|
v !== "" ? `HTTP ${d.status}: ${v}` : `HTTP ${d.status}`,
|
|
356
356
|
d.status
|
|
357
357
|
);
|
|
@@ -365,7 +365,7 @@ function Wt(t) {
|
|
|
365
365
|
}
|
|
366
366
|
const b = l.schema.safeParse(await d.json());
|
|
367
367
|
if (!b.success)
|
|
368
|
-
throw new
|
|
368
|
+
throw new U("Invalid response schema");
|
|
369
369
|
return b.data;
|
|
370
370
|
}
|
|
371
371
|
return {
|
|
@@ -382,21 +382,26 @@ function Wt(t) {
|
|
|
382
382
|
schema: Xe
|
|
383
383
|
});
|
|
384
384
|
},
|
|
385
|
+
deleteWorkspace(a) {
|
|
386
|
+
return s("DELETE", `/workspaces/${r(a)}`, {
|
|
387
|
+
schema: Je
|
|
388
|
+
});
|
|
389
|
+
},
|
|
385
390
|
mintToken(a, i) {
|
|
386
|
-
return s("POST", `/workspaces/${
|
|
391
|
+
return s("POST", `/workspaces/${r(a)}/tokens`, {
|
|
387
392
|
body: i,
|
|
388
393
|
schema: pe
|
|
389
394
|
});
|
|
390
395
|
},
|
|
391
396
|
listTokens(a) {
|
|
392
|
-
return s("GET", `/workspaces/${
|
|
397
|
+
return s("GET", `/workspaces/${r(a)}/tokens`, {
|
|
393
398
|
schema: ge
|
|
394
399
|
});
|
|
395
400
|
},
|
|
396
401
|
revokeToken(a, i) {
|
|
397
402
|
return s(
|
|
398
403
|
"DELETE",
|
|
399
|
-
`/workspaces/${
|
|
404
|
+
`/workspaces/${r(a)}/tokens/${r(i)}`
|
|
400
405
|
);
|
|
401
406
|
},
|
|
402
407
|
mintAccountToken(a) {
|
|
@@ -411,59 +416,59 @@ function Wt(t) {
|
|
|
411
416
|
});
|
|
412
417
|
},
|
|
413
418
|
revokeAccountToken(a) {
|
|
414
|
-
return s("DELETE", `/tokens/${
|
|
419
|
+
return s("DELETE", `/tokens/${r(a)}`);
|
|
415
420
|
},
|
|
416
421
|
createInvite(a, i) {
|
|
417
|
-
return s("POST", `/workspaces/${
|
|
422
|
+
return s("POST", `/workspaces/${r(a)}/invites`, {
|
|
418
423
|
body: i,
|
|
419
|
-
schema:
|
|
424
|
+
schema: et
|
|
420
425
|
});
|
|
421
426
|
},
|
|
422
427
|
inviteByEmail(a, i) {
|
|
423
|
-
return s("POST", `/workspaces/${
|
|
428
|
+
return s("POST", `/workspaces/${r(a)}/invites/email`, {
|
|
424
429
|
body: { email: i },
|
|
425
|
-
schema:
|
|
430
|
+
schema: tt
|
|
426
431
|
});
|
|
427
432
|
},
|
|
428
433
|
revokeInvite(a, i) {
|
|
429
434
|
return s(
|
|
430
435
|
"POST",
|
|
431
|
-
`/workspaces/${
|
|
436
|
+
`/workspaces/${r(a)}/invites/${r(i)}/revoke`
|
|
432
437
|
);
|
|
433
438
|
},
|
|
434
439
|
redeemInvite(a) {
|
|
435
|
-
return s("POST", `/invites/${
|
|
436
|
-
schema:
|
|
440
|
+
return s("POST", `/invites/${r(a)}/redeem`, {
|
|
441
|
+
schema: nt
|
|
437
442
|
});
|
|
438
443
|
},
|
|
439
444
|
listMembers(a) {
|
|
440
|
-
return s("GET", `/workspaces/${
|
|
441
|
-
schema:
|
|
445
|
+
return s("GET", `/workspaces/${r(a)}/members`, {
|
|
446
|
+
schema: at
|
|
442
447
|
});
|
|
443
448
|
},
|
|
444
449
|
removeMember(a, i) {
|
|
445
450
|
return s(
|
|
446
451
|
"DELETE",
|
|
447
|
-
`/workspaces/${
|
|
452
|
+
`/workspaces/${r(a)}/members/${r(i)}`
|
|
448
453
|
);
|
|
449
454
|
},
|
|
450
455
|
leave(a) {
|
|
451
|
-
return s("POST", `/workspaces/${
|
|
456
|
+
return s("POST", `/workspaces/${r(a)}/leave`);
|
|
452
457
|
},
|
|
453
458
|
landscape(a) {
|
|
454
|
-
return s("GET", `/workspaces/${
|
|
459
|
+
return s("GET", `/workspaces/${r(a)}/landscape`, {
|
|
455
460
|
schema: me
|
|
456
461
|
});
|
|
457
462
|
},
|
|
458
463
|
announceTo(a, i) {
|
|
459
|
-
return s("POST", `/workspaces/${
|
|
464
|
+
return s("POST", `/workspaces/${r(a)}/announce`, {
|
|
460
465
|
body: i,
|
|
461
466
|
schema: he
|
|
462
467
|
});
|
|
463
468
|
},
|
|
464
469
|
submitFeedback(a, i) {
|
|
465
|
-
const l = i !== void 0 ? `/workspaces/${
|
|
466
|
-
return s("POST", l, { body: a, schema:
|
|
470
|
+
const l = i !== void 0 ? `/workspaces/${r(i)}/feedback` : "/feedback";
|
|
471
|
+
return s("POST", l, { body: a, schema: ot });
|
|
467
472
|
},
|
|
468
473
|
// --- self-host singular aliases (implicit single workspace) -------------
|
|
469
474
|
getLandscape() {
|
|
@@ -480,11 +485,11 @@ function Wt(t) {
|
|
|
480
485
|
};
|
|
481
486
|
}
|
|
482
487
|
const $e = Pe(null);
|
|
483
|
-
function
|
|
488
|
+
function Bt({
|
|
484
489
|
client: t,
|
|
485
490
|
children: n
|
|
486
491
|
}) {
|
|
487
|
-
return /* @__PURE__ */
|
|
492
|
+
return /* @__PURE__ */ o($e.Provider, { value: t, children: n });
|
|
488
493
|
}
|
|
489
494
|
function oe() {
|
|
490
495
|
const t = Oe($e);
|
|
@@ -494,50 +499,50 @@ function oe() {
|
|
|
494
499
|
);
|
|
495
500
|
return t;
|
|
496
501
|
}
|
|
497
|
-
const
|
|
498
|
-
function
|
|
499
|
-
const n = oe(), c = t == null ? void 0 : t.workspaceId,
|
|
502
|
+
const dt = 5e3, ut = 1e3;
|
|
503
|
+
function mt(t) {
|
|
504
|
+
const n = oe(), c = t == null ? void 0 : t.workspaceId, r = (t == null ? void 0 : t.pollMs) ?? dt, s = (t == null ? void 0 : t.enabled) ?? !0, [a, i] = N(
|
|
500
505
|
null
|
|
501
506
|
), [l, h] = N("live"), [u, d] = N(null), [, b] = N(0), f = P(n);
|
|
502
507
|
f.current = n;
|
|
503
|
-
const
|
|
508
|
+
const k = P(0), v = R(
|
|
504
509
|
async ($) => {
|
|
505
510
|
try {
|
|
506
511
|
const S = c ? await f.current.landscape(c) : await f.current.getLandscape();
|
|
507
|
-
if ($ !==
|
|
512
|
+
if ($ !== k.current) return;
|
|
508
513
|
i(S), d(Date.now()), h("live");
|
|
509
514
|
} catch (S) {
|
|
510
|
-
if ($ !==
|
|
511
|
-
S instanceof
|
|
515
|
+
if ($ !== k.current) return;
|
|
516
|
+
S instanceof U && S.status === 401 ? h("unauthorized") : h("reconnecting");
|
|
512
517
|
}
|
|
513
518
|
},
|
|
514
519
|
[c]
|
|
515
520
|
);
|
|
516
521
|
se(() => {
|
|
517
522
|
if (!s) return;
|
|
518
|
-
const $ = ++
|
|
523
|
+
const $ = ++k.current;
|
|
519
524
|
v($);
|
|
520
525
|
const S = setInterval(() => {
|
|
521
526
|
document.visibilityState !== "hidden" && v($);
|
|
522
|
-
},
|
|
527
|
+
}, r), y = setInterval(() => {
|
|
523
528
|
b((T) => T + 1);
|
|
524
|
-
},
|
|
529
|
+
}, ut), j = () => {
|
|
525
530
|
document.visibilityState === "visible" && v($);
|
|
526
531
|
};
|
|
527
532
|
return document.addEventListener("visibilitychange", j), () => {
|
|
528
|
-
|
|
533
|
+
k.current++, clearInterval(S), clearInterval(y), document.removeEventListener("visibilitychange", j);
|
|
529
534
|
};
|
|
530
|
-
}, [v,
|
|
531
|
-
const A = R(() => v(
|
|
535
|
+
}, [v, r, s]);
|
|
536
|
+
const A = R(() => v(k.current), [v]);
|
|
532
537
|
return { snapshot: a, status: l, lastUpdatedMs: u, refresh: A };
|
|
533
538
|
}
|
|
534
539
|
function K(t, n) {
|
|
535
540
|
const c = Math.floor((n - Date.parse(t)) / 1e3);
|
|
536
541
|
if (c < 5) return "just now";
|
|
537
542
|
if (c < 60) return `${c}s ago`;
|
|
538
|
-
const
|
|
539
|
-
if (
|
|
540
|
-
const s = Math.floor(
|
|
543
|
+
const r = Math.floor(c / 60);
|
|
544
|
+
if (r < 60) return `${r}m ago`;
|
|
545
|
+
const s = Math.floor(r / 60);
|
|
541
546
|
return s < 24 ? `${s}h ago` : `${Math.floor(s / 24)}d ago`;
|
|
542
547
|
}
|
|
543
548
|
function z(t) {
|
|
@@ -551,17 +556,17 @@ function ie(t) {
|
|
|
551
556
|
return n && n.length >= 2 ? n[0] + n[1] : t.slice(0, 2).toUpperCase();
|
|
552
557
|
}
|
|
553
558
|
const Ee = "A-Za-z0-9_-";
|
|
554
|
-
function
|
|
555
|
-
const
|
|
556
|
-
if (!
|
|
557
|
-
const s =
|
|
559
|
+
function ht(t, n) {
|
|
560
|
+
const r = t.slice(0, n).match(new RegExp(`(?:^|\\s)@([${Ee}]*)$`));
|
|
561
|
+
if (!r) return null;
|
|
562
|
+
const s = r[1];
|
|
558
563
|
return { start: n - s.length - 1, end: n, query: s };
|
|
559
564
|
}
|
|
560
|
-
function
|
|
565
|
+
function pt(t, n) {
|
|
561
566
|
const c = new RegExp(`(?:^|\\s)@([${Ee}]+)`, "g");
|
|
562
|
-
let
|
|
563
|
-
for (; (
|
|
564
|
-
const s =
|
|
567
|
+
let r;
|
|
568
|
+
for (; (r = c.exec(t)) !== null; ) {
|
|
569
|
+
const s = r[1].toLowerCase(), a = n.find((i) => i.toLowerCase() === s);
|
|
565
570
|
if (a) return a;
|
|
566
571
|
}
|
|
567
572
|
return null;
|
|
@@ -569,13 +574,13 @@ function ht(t, n) {
|
|
|
569
574
|
function Re(t) {
|
|
570
575
|
return [...new Set(t.map((n) => n.repo))].sort();
|
|
571
576
|
}
|
|
572
|
-
function
|
|
577
|
+
function M(t, n) {
|
|
573
578
|
return n === null || n === "__all__" || t.repo === n;
|
|
574
579
|
}
|
|
575
|
-
function
|
|
580
|
+
function gt(t, n) {
|
|
576
581
|
return [
|
|
577
582
|
...new Set(
|
|
578
|
-
t.filter((c) => c.presence === "live" &&
|
|
583
|
+
t.filter((c) => c.presence === "live" && M(c, n)).map((c) => c.name)
|
|
579
584
|
)
|
|
580
585
|
].sort();
|
|
581
586
|
}
|
|
@@ -583,39 +588,39 @@ function fe(t) {
|
|
|
583
588
|
const n = t.find((c) => c.status === "active");
|
|
584
589
|
return n ? n.repo : t.length ? t[0].repo : null;
|
|
585
590
|
}
|
|
586
|
-
function
|
|
591
|
+
function ft(t) {
|
|
587
592
|
return t === "dropped" ? "dropped" : "done";
|
|
588
593
|
}
|
|
589
594
|
function be(t, n) {
|
|
590
595
|
if (!n) return "";
|
|
591
|
-
const c = Math.floor((Date.parse(n) - Date.parse(t)) / 1e3),
|
|
592
|
-
return
|
|
596
|
+
const c = Math.floor((Date.parse(n) - Date.parse(t)) / 1e3), r = Math.floor(c / 60);
|
|
597
|
+
return r < 60 ? `active ${r}m` : `active ${Math.floor(r / 60)}h`;
|
|
593
598
|
}
|
|
594
|
-
function
|
|
595
|
-
const c = new Date(Date.parse(t)),
|
|
599
|
+
function bt(t, n) {
|
|
600
|
+
const c = new Date(Date.parse(t)), r = new Date(n), s = (i) => new Date(i.getFullYear(), i.getMonth(), i.getDate()).getTime(), a = Math.round((s(r) - s(c)) / 864e5);
|
|
596
601
|
return a <= 0 ? "Today" : a === 1 ? "Yesterday" : c.toLocaleDateString(void 0, { month: "short", day: "numeric" });
|
|
597
602
|
}
|
|
598
603
|
function ve(t) {
|
|
599
604
|
let n = t.toLowerCase().replace(/\\/g, "/");
|
|
600
605
|
n.endsWith("/") && (n = n.replace(/\/+$/, "") + "/**");
|
|
601
606
|
const c = [];
|
|
602
|
-
for (const
|
|
603
|
-
if (!(
|
|
604
|
-
if (
|
|
607
|
+
for (const r of n.split("/"))
|
|
608
|
+
if (!(r === "" || r === ".")) {
|
|
609
|
+
if (r === "..") {
|
|
605
610
|
c.length && c.pop();
|
|
606
611
|
continue;
|
|
607
612
|
}
|
|
608
|
-
c.push(
|
|
613
|
+
c.push(r);
|
|
609
614
|
}
|
|
610
615
|
return c;
|
|
611
616
|
}
|
|
612
|
-
const
|
|
613
|
-
function bt(t, n) {
|
|
614
|
-
return t === "*" ? !0 : (ye.test(t) || !ye.test(n)) && t === n;
|
|
615
|
-
}
|
|
617
|
+
const ke = /[*?{}[\]]/;
|
|
616
618
|
function vt(t, n) {
|
|
619
|
+
return t === "*" ? !0 : (ke.test(t) || !ke.test(n)) && t === n;
|
|
620
|
+
}
|
|
621
|
+
function kt(t, n) {
|
|
617
622
|
const c = /* @__PURE__ */ new Map();
|
|
618
|
-
function
|
|
623
|
+
function r(s, a) {
|
|
619
624
|
if (n.length - a === 0) {
|
|
620
625
|
for (let b = s; b < t.length; b++) if (t[b] !== "**") return !1;
|
|
621
626
|
return !0;
|
|
@@ -625,30 +630,30 @@ function vt(t, n) {
|
|
|
625
630
|
if (l !== void 0) return l;
|
|
626
631
|
const h = t[s], u = n[a];
|
|
627
632
|
let d;
|
|
628
|
-
return h === "**" ? d =
|
|
633
|
+
return h === "**" ? d = r(s + 1, a) || r(s, a + 1) : u === "**" ? d = !1 : d = vt(h, u) && r(s + 1, a + 1), c.set(i, d), d;
|
|
629
634
|
}
|
|
630
|
-
return
|
|
635
|
+
return r(0, 0);
|
|
631
636
|
}
|
|
632
|
-
function
|
|
637
|
+
function ye(t, n) {
|
|
633
638
|
if (n.length === 0) return !0;
|
|
634
639
|
const c = t.map(ve);
|
|
635
|
-
return n.every((
|
|
636
|
-
const s = ve(
|
|
637
|
-
return c.some((a) =>
|
|
640
|
+
return n.every((r) => {
|
|
641
|
+
const s = ve(r);
|
|
642
|
+
return c.some((a) => kt(a, s));
|
|
638
643
|
});
|
|
639
644
|
}
|
|
640
645
|
function yt(t) {
|
|
641
646
|
const n = /* @__PURE__ */ new Map();
|
|
642
647
|
for (const s of t)
|
|
643
648
|
n.has(s.agentName) || n.set(s.agentName, []), n.get(s.agentName).push(s);
|
|
644
|
-
const c = (s, a) => a.createdAt.localeCompare(s.createdAt),
|
|
649
|
+
const c = (s, a) => a.createdAt.localeCompare(s.createdAt), r = [];
|
|
645
650
|
for (const [s, a] of n) {
|
|
646
651
|
const i = [...a].sort(c), l = i.map(
|
|
647
652
|
(u) => i.some(
|
|
648
|
-
(d) => d !== u &&
|
|
653
|
+
(d) => d !== u && ye(d.pathGlobs, u.pathGlobs) && !ye(u.pathGlobs, d.pathGlobs)
|
|
649
654
|
)
|
|
650
655
|
), h = i[0];
|
|
651
|
-
|
|
656
|
+
r.push({
|
|
652
657
|
agentName: s,
|
|
653
658
|
model: h.model,
|
|
654
659
|
program: h.program,
|
|
@@ -657,17 +662,17 @@ function yt(t) {
|
|
|
657
662
|
narrower: i.filter((u, d) => l[d])
|
|
658
663
|
});
|
|
659
664
|
}
|
|
660
|
-
return
|
|
665
|
+
return r.sort((s, a) => {
|
|
661
666
|
const i = s.primaries.concat(s.narrower)[0].createdAt;
|
|
662
667
|
return a.primaries.concat(a.narrower)[0].createdAt.localeCompare(i);
|
|
663
|
-
}),
|
|
668
|
+
}), r;
|
|
664
669
|
}
|
|
665
670
|
const _e = { active: 0, done: 0 };
|
|
666
|
-
function
|
|
671
|
+
function _t({
|
|
667
672
|
repos: t,
|
|
668
673
|
counts: n,
|
|
669
674
|
selected: c,
|
|
670
|
-
onSelect:
|
|
675
|
+
onSelect: r
|
|
671
676
|
}) {
|
|
672
677
|
const [s, a] = N(!1), i = P(null);
|
|
673
678
|
if (se(() => {
|
|
@@ -679,20 +684,20 @@ function kt({
|
|
|
679
684
|
b == null || b.focus();
|
|
680
685
|
}, [s]), t.length < 2) return null;
|
|
681
686
|
const l = c === null || c === "__all__", h = l ? "All repos" : c, u = (d, b) => {
|
|
682
|
-
const f = d === null ? n.__all__ ?? _e : n[d] ?? _e,
|
|
687
|
+
const f = d === null ? n.__all__ ?? _e : n[d] ?? _e, k = d === null ? l : c === d, v = "repo-mi" + (k ? " on" : "") + (d === null ? " all" : "");
|
|
683
688
|
return /* @__PURE__ */ m(
|
|
684
689
|
"button",
|
|
685
690
|
{
|
|
686
691
|
type: "button",
|
|
687
692
|
className: v,
|
|
688
693
|
role: "option",
|
|
689
|
-
"aria-selected":
|
|
694
|
+
"aria-selected": k,
|
|
690
695
|
onClick: (A) => {
|
|
691
|
-
A.stopPropagation(), a(!1),
|
|
696
|
+
A.stopPropagation(), a(!1), r(d);
|
|
692
697
|
},
|
|
693
698
|
children: [
|
|
694
|
-
/* @__PURE__ */
|
|
695
|
-
/* @__PURE__ */
|
|
699
|
+
/* @__PURE__ */ o("span", { children: b }),
|
|
700
|
+
/* @__PURE__ */ o("span", { className: "ct", children: `${f.active} active · ${f.done} done` })
|
|
696
701
|
]
|
|
697
702
|
},
|
|
698
703
|
d ?? "__all__"
|
|
@@ -719,9 +724,9 @@ function kt({
|
|
|
719
724
|
d.stopPropagation(), a((b) => !b);
|
|
720
725
|
},
|
|
721
726
|
children: [
|
|
722
|
-
/* @__PURE__ */
|
|
727
|
+
/* @__PURE__ */ o("span", { className: "slash", children: "/" }),
|
|
723
728
|
" " + h + " ",
|
|
724
|
-
/* @__PURE__ */
|
|
729
|
+
/* @__PURE__ */ o("span", { children: "▼" })
|
|
725
730
|
]
|
|
726
731
|
}
|
|
727
732
|
),
|
|
@@ -733,22 +738,22 @@ function kt({
|
|
|
733
738
|
}
|
|
734
739
|
);
|
|
735
740
|
}
|
|
736
|
-
function
|
|
737
|
-
const
|
|
738
|
-
(l) => l.presence === "live" &&
|
|
741
|
+
function Nt({ agents: t, tasks: n, selectedRepo: c }) {
|
|
742
|
+
const r = t.filter(
|
|
743
|
+
(l) => l.presence === "live" && M({ repo: l.repo ?? "" }, c)
|
|
739
744
|
), s = /* @__PURE__ */ new Set();
|
|
740
745
|
for (const l of n) l.status === "active" && s.add(l.agentName);
|
|
741
|
-
const a = (l) => s.has(l.name), i = [...
|
|
746
|
+
const a = (l) => s.has(l.name), i = [...r].sort((l, h) => {
|
|
742
747
|
const u = a(l), d = a(h);
|
|
743
748
|
return u !== d ? u ? -1 : 1 : l.name.localeCompare(h.name);
|
|
744
749
|
});
|
|
745
|
-
return /* @__PURE__ */
|
|
750
|
+
return /* @__PURE__ */ o("div", { className: "crew", id: "crew", children: i.map((l) => /* @__PURE__ */ m(
|
|
746
751
|
"div",
|
|
747
752
|
{
|
|
748
753
|
className: "person" + (a(l) ? "" : " person--idle"),
|
|
749
754
|
children: [
|
|
750
|
-
/* @__PURE__ */
|
|
751
|
-
/* @__PURE__ */
|
|
755
|
+
/* @__PURE__ */ o("div", { className: "avatar", style: { background: z(l.name) }, children: ie(l.name) }),
|
|
756
|
+
/* @__PURE__ */ o("span", { className: "person__name", children: l.name })
|
|
752
757
|
]
|
|
753
758
|
},
|
|
754
759
|
l.name
|
|
@@ -756,141 +761,141 @@ function _t({ agents: t, tasks: n, selectedRepo: c }) {
|
|
|
756
761
|
}
|
|
757
762
|
function je({ globs: t }) {
|
|
758
763
|
return t.length <= 1 ? /* @__PURE__ */ m("div", { className: "terr", children: [
|
|
759
|
-
/* @__PURE__ */
|
|
760
|
-
t.map((n) => /* @__PURE__ */
|
|
764
|
+
/* @__PURE__ */ o("span", { className: "terr__lbl", children: "territory" }),
|
|
765
|
+
t.map((n) => /* @__PURE__ */ o("span", { className: "glob", children: n }, n))
|
|
761
766
|
] }) : /* @__PURE__ */ m("details", { className: "terrx", children: [
|
|
762
767
|
/* @__PURE__ */ m("summary", { children: [
|
|
763
|
-
/* @__PURE__ */
|
|
768
|
+
/* @__PURE__ */ o("span", { className: "terr__lbl", children: "territory" }),
|
|
764
769
|
/* @__PURE__ */ m("span", { className: "glob glob--more", children: [
|
|
765
|
-
/* @__PURE__ */
|
|
770
|
+
/* @__PURE__ */ o("span", { className: "tw", children: "▶" }),
|
|
766
771
|
` ${t.length} paths`
|
|
767
772
|
] })
|
|
768
773
|
] }),
|
|
769
|
-
/* @__PURE__ */
|
|
774
|
+
/* @__PURE__ */ o("div", { className: "terr terr--full", children: t.map((n) => /* @__PURE__ */ o("span", { className: "glob", children: n }, n)) })
|
|
770
775
|
] });
|
|
771
776
|
}
|
|
772
|
-
const te = (t) => `${t.agentName}|${t.repo}|${t.createdAt}`,
|
|
777
|
+
const te = (t) => `${t.agentName}|${t.repo}|${t.createdAt}`, wt = (t) => t === null || t === "__all__";
|
|
773
778
|
function ne({
|
|
774
779
|
task: t,
|
|
775
780
|
nowMs: n
|
|
776
781
|
}) {
|
|
777
|
-
return /* @__PURE__ */ m(
|
|
778
|
-
/* @__PURE__ */
|
|
779
|
-
/* @__PURE__ */
|
|
780
|
-
/* @__PURE__ */
|
|
782
|
+
return /* @__PURE__ */ m(H, { children: [
|
|
783
|
+
/* @__PURE__ */ o("div", { className: "task__intent", children: t.intent }),
|
|
784
|
+
/* @__PURE__ */ o(je, { globs: t.pathGlobs }),
|
|
785
|
+
/* @__PURE__ */ o("div", { className: "task__meta", children: `started ${K(t.createdAt, n)}` })
|
|
781
786
|
] });
|
|
782
787
|
}
|
|
783
|
-
function
|
|
788
|
+
function At({
|
|
784
789
|
task: t,
|
|
785
790
|
nowMs: n,
|
|
786
791
|
allRepos: c
|
|
787
792
|
}) {
|
|
788
|
-
const
|
|
793
|
+
const r = t.model || t.program;
|
|
789
794
|
return /* @__PURE__ */ m("div", { className: "task", children: [
|
|
790
795
|
/* @__PURE__ */ m("div", { className: "task__r1", children: [
|
|
791
|
-
/* @__PURE__ */
|
|
792
|
-
c && /* @__PURE__ */
|
|
793
|
-
|
|
794
|
-
/* @__PURE__ */
|
|
796
|
+
/* @__PURE__ */ o("span", { className: "task__who", children: t.agentName }),
|
|
797
|
+
c && /* @__PURE__ */ o("span", { className: "task__repo", children: t.repo }),
|
|
798
|
+
r && /* @__PURE__ */ o("span", { className: "task__tag", children: r }),
|
|
799
|
+
/* @__PURE__ */ o("span", { className: "livedot", title: "active" })
|
|
795
800
|
] }),
|
|
796
|
-
/* @__PURE__ */
|
|
801
|
+
/* @__PURE__ */ o(ne, { task: t, nowMs: n })
|
|
797
802
|
] });
|
|
798
803
|
}
|
|
799
|
-
function
|
|
804
|
+
function St({
|
|
800
805
|
group: t,
|
|
801
806
|
nowMs: n,
|
|
802
807
|
allRepos: c
|
|
803
808
|
}) {
|
|
804
|
-
const
|
|
809
|
+
const r = t.model || t.program, s = t.primaries.length + t.narrower.length, a = t.narrower.length;
|
|
805
810
|
return /* @__PURE__ */ m("div", { className: "grp", children: [
|
|
806
811
|
/* @__PURE__ */ m("div", { className: "grp__head", children: [
|
|
807
|
-
/* @__PURE__ */
|
|
808
|
-
c && /* @__PURE__ */
|
|
809
|
-
|
|
810
|
-
/* @__PURE__ */
|
|
811
|
-
/* @__PURE__ */
|
|
812
|
+
/* @__PURE__ */ o("span", { className: "grp__who", children: t.agentName }),
|
|
813
|
+
c && /* @__PURE__ */ o("span", { className: "task__repo", children: t.repo }),
|
|
814
|
+
r && /* @__PURE__ */ o("span", { className: "grp__tag", children: r }),
|
|
815
|
+
/* @__PURE__ */ o("span", { className: "grp__count", children: `· ${s} active` }),
|
|
816
|
+
/* @__PURE__ */ o("span", { className: "grp__dot", title: "live" })
|
|
812
817
|
] }),
|
|
813
|
-
/* @__PURE__ */
|
|
818
|
+
/* @__PURE__ */ o("div", { className: "claims", children: t.primaries.map((i) => /* @__PURE__ */ o("div", { className: "claim", children: /* @__PURE__ */ o(ne, { task: i, nowMs: n }) }, te(i))) }),
|
|
814
819
|
a > 0 && /* @__PURE__ */ m("details", { className: "fold", children: [
|
|
815
820
|
/* @__PURE__ */ m("summary", { children: [
|
|
816
|
-
/* @__PURE__ */
|
|
821
|
+
/* @__PURE__ */ o("span", { className: "tw", children: "▶" }),
|
|
817
822
|
` +${a} narrower claim${a > 1 ? "s" : ""}`
|
|
818
823
|
] }),
|
|
819
|
-
/* @__PURE__ */
|
|
820
|
-
/* @__PURE__ */
|
|
821
|
-
/* @__PURE__ */
|
|
824
|
+
/* @__PURE__ */ o("div", { className: "fold__body", children: t.narrower.map((i) => /* @__PURE__ */ m("div", { className: "claim", children: [
|
|
825
|
+
/* @__PURE__ */ o(ne, { task: i, nowMs: n }),
|
|
826
|
+
/* @__PURE__ */ o("div", { className: "covered", children: "⊂ covered by a claim above" })
|
|
822
827
|
] }, te(i))) })
|
|
823
828
|
] })
|
|
824
829
|
] });
|
|
825
830
|
}
|
|
826
|
-
function
|
|
831
|
+
function Tt({
|
|
827
832
|
tasks: t,
|
|
828
833
|
nowMs: n,
|
|
829
834
|
selectedRepo: c
|
|
830
835
|
}) {
|
|
831
|
-
const
|
|
832
|
-
(a) => a.status === "active" &&
|
|
836
|
+
const r = wt(c), s = t.filter(
|
|
837
|
+
(a) => a.status === "active" && M(a, c)
|
|
833
838
|
);
|
|
834
839
|
if (s.length === 0) {
|
|
835
|
-
const a =
|
|
836
|
-
return /* @__PURE__ */
|
|
840
|
+
const a = r ? "Nothing active right now." : `Nothing active in ${c}.`;
|
|
841
|
+
return /* @__PURE__ */ o("div", { id: "active-list", children: /* @__PURE__ */ o("div", { className: "empty", children: a }) });
|
|
837
842
|
}
|
|
838
|
-
return /* @__PURE__ */
|
|
843
|
+
return /* @__PURE__ */ o("div", { id: "active-list", children: yt(s).map((a) => {
|
|
839
844
|
const i = a.primaries.length === 1 && a.narrower.length === 0, l = te(a.primaries.concat(a.narrower)[0]);
|
|
840
|
-
return i ? /* @__PURE__ */
|
|
841
|
-
|
|
845
|
+
return i ? /* @__PURE__ */ o(
|
|
846
|
+
At,
|
|
842
847
|
{
|
|
843
848
|
task: a.primaries[0],
|
|
844
849
|
nowMs: n,
|
|
845
|
-
allRepos:
|
|
850
|
+
allRepos: r
|
|
846
851
|
},
|
|
847
852
|
l
|
|
848
|
-
) : /* @__PURE__ */
|
|
853
|
+
) : /* @__PURE__ */ o(St, { group: a, nowMs: n, allRepos: r }, l);
|
|
849
854
|
}) });
|
|
850
855
|
}
|
|
851
|
-
const
|
|
852
|
-
function
|
|
856
|
+
const Ct = (t) => `${t.agentName}|${t.repo}|${t.createdAt}`, $t = (t) => t === null || t === "__all__";
|
|
857
|
+
function Et({
|
|
853
858
|
tasks: t,
|
|
854
859
|
nowMs: n,
|
|
855
860
|
selectedRepo: c,
|
|
856
|
-
doneShown:
|
|
861
|
+
doneShown: r,
|
|
857
862
|
onLoadMore: s
|
|
858
863
|
}) {
|
|
859
|
-
const a =
|
|
860
|
-
(u) => u.status !== "active" &&
|
|
864
|
+
const a = $t(c), i = t.filter(
|
|
865
|
+
(u) => u.status !== "active" && M(u, c)
|
|
861
866
|
);
|
|
862
867
|
if (i.length === 0) {
|
|
863
868
|
const u = a ? "No finished tasks yet." : `No finished tasks in ${c} yet.`;
|
|
864
|
-
return /* @__PURE__ */
|
|
869
|
+
return /* @__PURE__ */ o("div", { id: "done-list", children: /* @__PURE__ */ o("div", { className: "empty", children: u }) });
|
|
865
870
|
}
|
|
866
|
-
const l = i.slice(0,
|
|
871
|
+
const l = i.slice(0, r);
|
|
867
872
|
let h = null;
|
|
868
873
|
return /* @__PURE__ */ m("div", { id: "done-list", children: [
|
|
869
874
|
l.map((u) => {
|
|
870
|
-
const d =
|
|
875
|
+
const d = bt(u.endedAt ?? u.createdAt, n), b = d !== h ? d : null;
|
|
871
876
|
h = d;
|
|
872
|
-
const f = u.status === "dropped",
|
|
877
|
+
const f = u.status === "dropped", k = f ? `went offline ${K(u.endedAt ?? u.createdAt, n)} — no done signal` : `finished ${K(u.endedAt ?? u.createdAt, n)}${be(u.createdAt, u.endedAt) ? " · " + be(u.createdAt, u.endedAt) : ""}`;
|
|
873
878
|
return /* @__PURE__ */ m(Ge, { children: [
|
|
874
|
-
b !== null && /* @__PURE__ */
|
|
879
|
+
b !== null && /* @__PURE__ */ o("div", { className: "day", children: b }),
|
|
875
880
|
/* @__PURE__ */ m("div", { className: "task", children: [
|
|
876
881
|
/* @__PURE__ */ m("div", { className: "task__r1", children: [
|
|
877
|
-
/* @__PURE__ */
|
|
878
|
-
a && /* @__PURE__ */
|
|
879
|
-
/* @__PURE__ */
|
|
882
|
+
/* @__PURE__ */ o("span", { className: "task__who", children: u.agentName }),
|
|
883
|
+
a && /* @__PURE__ */ o("span", { className: "task__repo", children: u.repo }),
|
|
884
|
+
/* @__PURE__ */ o(
|
|
880
885
|
"span",
|
|
881
886
|
{
|
|
882
887
|
className: "task__stat" + (f ? " task__stat--drop" : ""),
|
|
883
|
-
children:
|
|
888
|
+
children: ft(u.status)
|
|
884
889
|
}
|
|
885
890
|
)
|
|
886
891
|
] }),
|
|
887
|
-
/* @__PURE__ */
|
|
888
|
-
/* @__PURE__ */
|
|
889
|
-
/* @__PURE__ */
|
|
892
|
+
/* @__PURE__ */ o("div", { className: "task__intent", children: u.intent }),
|
|
893
|
+
/* @__PURE__ */ o(je, { globs: u.pathGlobs }),
|
|
894
|
+
/* @__PURE__ */ o("div", { className: "task__meta", children: k })
|
|
890
895
|
] })
|
|
891
|
-
] },
|
|
896
|
+
] }, Ct(u));
|
|
892
897
|
}),
|
|
893
|
-
i.length >
|
|
898
|
+
i.length > r && /* @__PURE__ */ o(
|
|
894
899
|
"div",
|
|
895
900
|
{
|
|
896
901
|
className: "more",
|
|
@@ -900,25 +905,25 @@ function $t({
|
|
|
900
905
|
onKeyDown: (u) => {
|
|
901
906
|
(u.key === "Enter" || u.key === " ") && (u.preventDefault(), s());
|
|
902
907
|
},
|
|
903
|
-
children: `Load older · ${
|
|
908
|
+
children: `Load older · ${r} of ${i.length}`
|
|
904
909
|
}
|
|
905
910
|
)
|
|
906
911
|
] });
|
|
907
912
|
}
|
|
908
|
-
const
|
|
909
|
-
function
|
|
910
|
-
const
|
|
911
|
-
a && (s.current = a.scrollHeight - a.scrollTop - a.clientHeight <
|
|
912
|
-
const i = [...t].filter((l) =>
|
|
913
|
+
const Rt = 80;
|
|
914
|
+
function jt({ announcements: t, selectedRepo: n, nowMs: c }) {
|
|
915
|
+
const r = P(null), s = P(!0), a = r.current;
|
|
916
|
+
a && (s.current = a.scrollHeight - a.scrollTop - a.clientHeight < Rt);
|
|
917
|
+
const i = [...t].filter((l) => M(l, n)).reverse();
|
|
913
918
|
return Fe(() => {
|
|
914
|
-
s.current &&
|
|
915
|
-
}, [i.length]), /* @__PURE__ */
|
|
919
|
+
s.current && r.current && (r.current.scrollTop = r.current.scrollHeight);
|
|
920
|
+
}, [i.length]), /* @__PURE__ */ o("div", { id: "chat", className: "chat", ref: r, children: i.length === 0 ? /* @__PURE__ */ o("div", { className: "empty", children: "No announcements yet — agents will post here as they coordinate." }) : i.map((l, h) => {
|
|
916
921
|
const d = "msg" + (l.targetAgentName !== null || l.toAdmin ? " msg--targeted" : "") + (l.fromAdmin ? " msg--me" : "");
|
|
917
922
|
return (
|
|
918
923
|
// The feed has no stable id; index is acceptable because the list is
|
|
919
924
|
// append-only oldest->newest and rows are never reordered in place.
|
|
920
925
|
/* @__PURE__ */ m("div", { className: d, children: [
|
|
921
|
-
/* @__PURE__ */
|
|
926
|
+
/* @__PURE__ */ o(
|
|
922
927
|
"div",
|
|
923
928
|
{
|
|
924
929
|
className: "msg__avatar",
|
|
@@ -928,7 +933,7 @@ function Rt({ announcements: t, selectedRepo: n, nowMs: c }) {
|
|
|
928
933
|
),
|
|
929
934
|
/* @__PURE__ */ m("div", { className: "msg__body", children: [
|
|
930
935
|
/* @__PURE__ */ m("div", { className: "msg__head", children: [
|
|
931
|
-
/* @__PURE__ */
|
|
936
|
+
/* @__PURE__ */ o(
|
|
932
937
|
"span",
|
|
933
938
|
{
|
|
934
939
|
className: "msg__who",
|
|
@@ -936,34 +941,34 @@ function Rt({ announcements: t, selectedRepo: n, nowMs: c }) {
|
|
|
936
941
|
children: l.fromAgentName
|
|
937
942
|
}
|
|
938
943
|
),
|
|
939
|
-
l.fromHuman ? /* @__PURE__ */
|
|
940
|
-
l.targetAgentName !== null ? /* @__PURE__ */
|
|
941
|
-
/* @__PURE__ */
|
|
944
|
+
l.fromHuman ? /* @__PURE__ */ o("span", { className: "msg__human", children: l.fromHuman }) : null,
|
|
945
|
+
l.targetAgentName !== null ? /* @__PURE__ */ o("span", { className: "msg__to", children: `→ @${l.targetAgentName}` }) : l.toAdmin ? /* @__PURE__ */ o("span", { className: "msg__to", children: "→ admin" }) : null,
|
|
946
|
+
/* @__PURE__ */ o("span", { className: "msg__time", children: K(l.createdAt, c) })
|
|
942
947
|
] }),
|
|
943
|
-
/* @__PURE__ */
|
|
948
|
+
/* @__PURE__ */ o("div", { className: "msg__text", children: l.body })
|
|
944
949
|
] })
|
|
945
950
|
] }, h)
|
|
946
951
|
);
|
|
947
952
|
}) });
|
|
948
953
|
}
|
|
949
|
-
const
|
|
950
|
-
function
|
|
951
|
-
const s = oe(), a = P(null), [i, l] = N(""), [h, u] = N([]), [d, b] = N(0), [f,
|
|
954
|
+
const Dt = 8;
|
|
955
|
+
function It({ agents: t, selectedRepo: n, workspaceId: c, onSent: r }) {
|
|
956
|
+
const s = oe(), a = P(null), [i, l] = N(""), [h, u] = N([]), [d, b] = N(0), [f, k] = N(null), [v, A] = N(!1), [$, S] = N(!1), y = gt(
|
|
952
957
|
t.map((p) => ({ name: p.name, presence: p.presence, repo: p.repo ?? "" })),
|
|
953
958
|
n
|
|
954
959
|
), j = h.length > 0, T = R(() => {
|
|
955
|
-
u([]),
|
|
960
|
+
u([]), k(null);
|
|
956
961
|
}, []), q = R(
|
|
957
962
|
(p, _) => {
|
|
958
|
-
const C =
|
|
963
|
+
const C = ht(p, _);
|
|
959
964
|
if (!C) {
|
|
960
965
|
T();
|
|
961
966
|
return;
|
|
962
967
|
}
|
|
963
|
-
const D = C.query.toLowerCase(), I =
|
|
964
|
-
u(I),
|
|
968
|
+
const D = C.query.toLowerCase(), I = y.filter((B) => B.toLowerCase().startsWith(D)).slice(0, Dt);
|
|
969
|
+
u(I), k({ start: C.start, end: C.end }), b(0);
|
|
965
970
|
},
|
|
966
|
-
[
|
|
971
|
+
[y, T]
|
|
967
972
|
), G = R(
|
|
968
973
|
(p) => {
|
|
969
974
|
if (!f) return;
|
|
@@ -992,21 +997,21 @@ function Dt({ agents: t, selectedRepo: n, workspaceId: c, onSent: o }) {
|
|
|
992
997
|
p.preventDefault();
|
|
993
998
|
const _ = i.trim();
|
|
994
999
|
if (!_) return;
|
|
995
|
-
const C =
|
|
1000
|
+
const C = pt(_, y), D = n === null || n === "__all__" ? null : n;
|
|
996
1001
|
A(!0), S(!1);
|
|
997
1002
|
try {
|
|
998
1003
|
const I = { body: _, targetAgentName: C, repo: D };
|
|
999
|
-
await (c !== void 0 ? s.announceTo(c, I) : s.announce(I)), l(""), T(), await
|
|
1004
|
+
await (c !== void 0 ? s.announceTo(c, I) : s.announce(I)), l(""), T(), await r();
|
|
1000
1005
|
} catch {
|
|
1001
1006
|
S(!0);
|
|
1002
1007
|
} finally {
|
|
1003
1008
|
A(!1);
|
|
1004
1009
|
}
|
|
1005
1010
|
},
|
|
1006
|
-
[i,
|
|
1011
|
+
[i, y, n, c, s, T, r]
|
|
1007
1012
|
);
|
|
1008
1013
|
return /* @__PURE__ */ m("div", { className: "composer", children: [
|
|
1009
|
-
/* @__PURE__ */
|
|
1014
|
+
/* @__PURE__ */ o(
|
|
1010
1015
|
"div",
|
|
1011
1016
|
{
|
|
1012
1017
|
id: "mention-pop",
|
|
@@ -1026,8 +1031,8 @@ function Dt({ agents: t, selectedRepo: n, workspaceId: c, onSent: o }) {
|
|
|
1026
1031
|
C.preventDefault(), G(p);
|
|
1027
1032
|
},
|
|
1028
1033
|
children: [
|
|
1029
|
-
/* @__PURE__ */
|
|
1030
|
-
/* @__PURE__ */
|
|
1034
|
+
/* @__PURE__ */ o("div", { className: "ma", style: { background: z(p) }, children: ie(p) }),
|
|
1035
|
+
/* @__PURE__ */ o("span", { children: p })
|
|
1031
1036
|
]
|
|
1032
1037
|
},
|
|
1033
1038
|
p
|
|
@@ -1043,7 +1048,7 @@ function Dt({ agents: t, selectedRepo: n, workspaceId: c, onSent: o }) {
|
|
|
1043
1048
|
X(p);
|
|
1044
1049
|
},
|
|
1045
1050
|
children: [
|
|
1046
|
-
/* @__PURE__ */
|
|
1051
|
+
/* @__PURE__ */ o(
|
|
1047
1052
|
"input",
|
|
1048
1053
|
{
|
|
1049
1054
|
id: "chat-input",
|
|
@@ -1063,35 +1068,35 @@ function Dt({ agents: t, selectedRepo: n, workspaceId: c, onSent: o }) {
|
|
|
1063
1068
|
onKeyDown: F
|
|
1064
1069
|
}
|
|
1065
1070
|
),
|
|
1066
|
-
/* @__PURE__ */
|
|
1071
|
+
/* @__PURE__ */ o("button", { id: "chat-send", className: "chat-send", type: "submit", disabled: v, children: "Send" })
|
|
1067
1072
|
]
|
|
1068
1073
|
}
|
|
1069
1074
|
),
|
|
1070
|
-
$ ? /* @__PURE__ */
|
|
1075
|
+
$ ? /* @__PURE__ */ o("div", { className: "chat__note", role: "status", children: "send failed — retry" }) : null
|
|
1071
1076
|
] });
|
|
1072
1077
|
}
|
|
1073
1078
|
function Ne({
|
|
1074
1079
|
title: t = "No workspace yet",
|
|
1075
1080
|
children: n,
|
|
1076
1081
|
onGetStarted: c,
|
|
1077
|
-
ctaLabel:
|
|
1082
|
+
ctaLabel: r = "Go to Config"
|
|
1078
1083
|
}) {
|
|
1079
1084
|
const s = Se();
|
|
1080
1085
|
return /* @__PURE__ */ m("section", { className: "shepherd-empty-state", "aria-labelledby": s, children: [
|
|
1081
|
-
/* @__PURE__ */
|
|
1082
|
-
/* @__PURE__ */
|
|
1083
|
-
c && /* @__PURE__ */
|
|
1086
|
+
/* @__PURE__ */ o("h2", { id: s, children: t }),
|
|
1087
|
+
/* @__PURE__ */ o("p", { children: n ?? "Create a workspace or join one with an invite code to get started." }),
|
|
1088
|
+
c && /* @__PURE__ */ o("button", { type: "button", onClick: c, children: r })
|
|
1084
1089
|
] });
|
|
1085
1090
|
}
|
|
1086
|
-
const
|
|
1091
|
+
const xt = [
|
|
1087
1092
|
{ id: "bug", label: "Bug" },
|
|
1088
1093
|
{ id: "suggestion", label: "Suggestion" },
|
|
1089
1094
|
{ id: "other", label: "Other" }
|
|
1090
|
-
],
|
|
1095
|
+
], Lt = 1500;
|
|
1091
1096
|
function Mt({ workspaceId: t }) {
|
|
1092
|
-
const n = oe(), c = Se(), [
|
|
1097
|
+
const n = oe(), c = Se(), [r, s] = N(!1), [a, i] = N("bug"), [l, h] = N(""), [u, d] = N(!1), [b, f] = N(null), [k, v] = N(!1);
|
|
1093
1098
|
function A() {
|
|
1094
|
-
s((
|
|
1099
|
+
s((y) => !y);
|
|
1095
1100
|
}
|
|
1096
1101
|
function $() {
|
|
1097
1102
|
i("bug"), h(""), f(null), v(!1);
|
|
@@ -1101,53 +1106,53 @@ function Mt({ workspaceId: t }) {
|
|
|
1101
1106
|
try {
|
|
1102
1107
|
await n.submitFeedback({ type: a, body: l.trim() }, t), v(!0), h(""), setTimeout(() => {
|
|
1103
1108
|
s(!1), $();
|
|
1104
|
-
},
|
|
1105
|
-
} catch (
|
|
1106
|
-
f(
|
|
1109
|
+
}, Lt);
|
|
1110
|
+
} catch (y) {
|
|
1111
|
+
f(ct(y));
|
|
1107
1112
|
} finally {
|
|
1108
1113
|
d(!1);
|
|
1109
1114
|
}
|
|
1110
1115
|
}
|
|
1111
1116
|
return /* @__PURE__ */ m("div", { className: "shepherd-feedback", children: [
|
|
1112
|
-
/* @__PURE__ */
|
|
1117
|
+
/* @__PURE__ */ o(
|
|
1113
1118
|
"button",
|
|
1114
1119
|
{
|
|
1115
1120
|
type: "button",
|
|
1116
1121
|
className: "shepherd-feedback__trigger",
|
|
1117
1122
|
onClick: A,
|
|
1118
|
-
"aria-expanded":
|
|
1123
|
+
"aria-expanded": r,
|
|
1119
1124
|
children: "Feedback"
|
|
1120
1125
|
}
|
|
1121
1126
|
),
|
|
1122
|
-
|
|
1127
|
+
r && /* @__PURE__ */ m(
|
|
1123
1128
|
"section",
|
|
1124
1129
|
{
|
|
1125
1130
|
className: "shepherd-feedback__panel",
|
|
1126
1131
|
"aria-labelledby": c,
|
|
1127
1132
|
children: [
|
|
1128
|
-
/* @__PURE__ */
|
|
1129
|
-
|
|
1130
|
-
/* @__PURE__ */
|
|
1133
|
+
/* @__PURE__ */ o("h3", { id: c, children: "Give feedback" }),
|
|
1134
|
+
k ? /* @__PURE__ */ o("p", { role: "status", children: "Thanks! Your feedback was sent." }) : /* @__PURE__ */ m(H, { children: [
|
|
1135
|
+
/* @__PURE__ */ o("div", { className: "shepherd-feedback__types", children: xt.map((y) => /* @__PURE__ */ o(
|
|
1131
1136
|
"button",
|
|
1132
1137
|
{
|
|
1133
1138
|
type: "button",
|
|
1134
|
-
"aria-pressed": a ===
|
|
1135
|
-
onClick: () => i(
|
|
1136
|
-
children:
|
|
1139
|
+
"aria-pressed": a === y.id,
|
|
1140
|
+
onClick: () => i(y.id),
|
|
1141
|
+
children: y.label
|
|
1137
1142
|
},
|
|
1138
|
-
|
|
1143
|
+
y.id
|
|
1139
1144
|
)) }),
|
|
1140
|
-
/* @__PURE__ */
|
|
1145
|
+
/* @__PURE__ */ o(
|
|
1141
1146
|
"textarea",
|
|
1142
1147
|
{
|
|
1143
1148
|
"aria-label": "Feedback",
|
|
1144
1149
|
placeholder: "What's on your mind?",
|
|
1145
1150
|
value: l,
|
|
1146
|
-
onChange: (
|
|
1151
|
+
onChange: (y) => h(y.target.value)
|
|
1147
1152
|
}
|
|
1148
1153
|
),
|
|
1149
|
-
b && /* @__PURE__ */
|
|
1150
|
-
/* @__PURE__ */
|
|
1154
|
+
b && /* @__PURE__ */ o("p", { role: "alert", children: b }),
|
|
1155
|
+
/* @__PURE__ */ o(
|
|
1151
1156
|
"button",
|
|
1152
1157
|
{
|
|
1153
1158
|
type: "button",
|
|
@@ -1162,7 +1167,7 @@ function Mt({ workspaceId: t }) {
|
|
|
1162
1167
|
)
|
|
1163
1168
|
] });
|
|
1164
1169
|
}
|
|
1165
|
-
const we = "shepherd.tab", J = "shepherd.repo", Q = 10,
|
|
1170
|
+
const we = "shepherd.tab", J = "shepherd.repo", Q = 10, Pt = {
|
|
1166
1171
|
live: { text: "live", kind: "ok" },
|
|
1167
1172
|
reconnecting: { text: "reconnecting…", kind: "warn" },
|
|
1168
1173
|
// app.js cleared the token and re-prompted on 401; in the auth-agnostic port
|
|
@@ -1183,10 +1188,10 @@ function ee(t, n) {
|
|
|
1183
1188
|
} catch {
|
|
1184
1189
|
}
|
|
1185
1190
|
}
|
|
1186
|
-
function
|
|
1187
|
-
const
|
|
1191
|
+
function Ot(t, n, c) {
|
|
1192
|
+
const r = Re(n.tasks);
|
|
1188
1193
|
let s = t;
|
|
1189
|
-
if (s === null &&
|
|
1194
|
+
if (s === null && r.length >= 2 && (s = fe(n.tasks)), s !== null && s !== "__all__" && !r.includes(s) && (s = "__all__"), c && s !== null && s !== "__all__") {
|
|
1190
1195
|
const a = n.tasks.some(
|
|
1191
1196
|
(l) => l.status === "active" && l.repo === s
|
|
1192
1197
|
), i = n.tasks.some((l) => l.status === "active");
|
|
@@ -1194,24 +1199,24 @@ function Pt(t, n, c) {
|
|
|
1194
1199
|
}
|
|
1195
1200
|
return s;
|
|
1196
1201
|
}
|
|
1197
|
-
function
|
|
1198
|
-
const n = {}, c = (
|
|
1199
|
-
const a = n[
|
|
1202
|
+
function Gt(t) {
|
|
1203
|
+
const n = {}, c = (r, s) => {
|
|
1204
|
+
const a = n[r] ?? (n[r] = { active: 0, done: 0 });
|
|
1200
1205
|
a[s]++;
|
|
1201
1206
|
};
|
|
1202
|
-
for (const
|
|
1203
|
-
const s =
|
|
1204
|
-
c(
|
|
1207
|
+
for (const r of t.tasks) {
|
|
1208
|
+
const s = r.status === "active" ? "active" : "done";
|
|
1209
|
+
c(r.repo, s), c("__all__", s);
|
|
1205
1210
|
}
|
|
1206
1211
|
return n;
|
|
1207
1212
|
}
|
|
1208
|
-
function
|
|
1213
|
+
function Kt({
|
|
1209
1214
|
workspaceId: t,
|
|
1210
1215
|
config: n,
|
|
1211
1216
|
switcher: c,
|
|
1212
|
-
hasWorkspace:
|
|
1217
|
+
hasWorkspace: r
|
|
1213
1218
|
} = {}) {
|
|
1214
|
-
const s = n != null, a =
|
|
1219
|
+
const s = n != null, a = r === !1, { snapshot: i, status: l, lastUpdatedMs: h, refresh: u } = mt({
|
|
1215
1220
|
workspaceId: t,
|
|
1216
1221
|
// A no-workspace board has nothing to poll; keep it off the hub.
|
|
1217
1222
|
enabled: !a
|
|
@@ -1226,17 +1231,17 @@ function Bt({
|
|
|
1226
1231
|
] : [
|
|
1227
1232
|
{ id: "tasks", label: "Tasks" },
|
|
1228
1233
|
{ id: "chat", label: "Chat" }
|
|
1229
|
-
],
|
|
1230
|
-
(g,
|
|
1234
|
+
], k = P([]), v = R(
|
|
1235
|
+
(g, L) => {
|
|
1231
1236
|
var de;
|
|
1232
1237
|
const O = f.length - 1;
|
|
1233
1238
|
let x = null;
|
|
1234
1239
|
switch (g.key) {
|
|
1235
1240
|
case "ArrowRight":
|
|
1236
|
-
x =
|
|
1241
|
+
x = L === O ? 0 : L + 1;
|
|
1237
1242
|
break;
|
|
1238
1243
|
case "ArrowLeft":
|
|
1239
|
-
x =
|
|
1244
|
+
x = L === 0 ? O : L - 1;
|
|
1240
1245
|
break;
|
|
1241
1246
|
case "Home":
|
|
1242
1247
|
x = 0;
|
|
@@ -1249,7 +1254,7 @@ function Bt({
|
|
|
1249
1254
|
}
|
|
1250
1255
|
g.preventDefault();
|
|
1251
1256
|
const le = f[x];
|
|
1252
|
-
le && (T(le.id), (de =
|
|
1257
|
+
le && (T(le.id), (de = k.current[x]) == null || de.focus());
|
|
1253
1258
|
},
|
|
1254
1259
|
// `tabs` is rebuilt each render but its identity only matters by length,
|
|
1255
1260
|
// which is stable for a given `hasConfig`; `onTab` is stable.
|
|
@@ -1257,31 +1262,31 @@ function Bt({
|
|
|
1257
1262
|
[s]
|
|
1258
1263
|
), [A, $] = N(
|
|
1259
1264
|
() => Ae(J)
|
|
1260
|
-
), [S,
|
|
1265
|
+
), [S, y] = N(Q), j = P(!0), T = R((g) => {
|
|
1261
1266
|
b(g), ee(we, g);
|
|
1262
1267
|
}, []), q = R((g) => {
|
|
1263
|
-
const
|
|
1264
|
-
$(
|
|
1268
|
+
const L = g === null ? "__all__" : g;
|
|
1269
|
+
$(L), ee(J, L), y(Q);
|
|
1265
1270
|
}, []), G = R(() => {
|
|
1266
|
-
|
|
1267
|
-
}, []), w = i ?
|
|
1271
|
+
y((g) => g + Q);
|
|
1272
|
+
}, []), w = i ? Ot(A, i, j.current) : A;
|
|
1268
1273
|
se(() => {
|
|
1269
1274
|
i && (j.current = !1, w !== A && ($(w), w !== null && w !== "__all__" && ee(J, w)));
|
|
1270
1275
|
}, [i, w, A]);
|
|
1271
|
-
const F = i ? Date.parse(i.serverTime) : Date.now(), X = i ? Re(i.tasks) : [], p = i ?
|
|
1272
|
-
(g) => g.presence === "live" &&
|
|
1273
|
-
).length : 0, C = i ? i.tasks.filter((g) => g.status === "active" &&
|
|
1274
|
-
(g) => g.status === "active" &&
|
|
1275
|
-
).length, xe =
|
|
1276
|
-
(g) => g.status !== "active" &&
|
|
1276
|
+
const F = i ? Date.parse(i.serverTime) : Date.now(), X = i ? Re(i.tasks) : [], p = i ? Gt(i) : {}, _ = i ? i.agents.filter(
|
|
1277
|
+
(g) => g.presence === "live" && M({ repo: g.repo ?? "" }, w)
|
|
1278
|
+
).length : 0, C = i ? i.tasks.filter((g) => g.status === "active" && M(g, w)).length : 0, D = Pt[l], I = h === null ? "" : `updated ${Math.floor((Date.now() - h) / 1e3)}s ago`, B = (i == null ? void 0 : i.agents) ?? [], W = (i == null ? void 0 : i.tasks) ?? [], De = (i == null ? void 0 : i.announcements) ?? [], Ie = W.filter(
|
|
1279
|
+
(g) => g.status === "active" && M(g, w)
|
|
1280
|
+
).length, xe = W.filter(
|
|
1281
|
+
(g) => g.status !== "active" && M(g, w)
|
|
1277
1282
|
).length, ce = !a && d !== "config";
|
|
1278
1283
|
return /* @__PURE__ */ m("div", { id: "board", children: [
|
|
1279
1284
|
/* @__PURE__ */ m("header", { children: [
|
|
1280
|
-
/* @__PURE__ */
|
|
1285
|
+
/* @__PURE__ */ o("h1", { className: "brand", style: { margin: 0, font: "inherit" }, children: "Shepherd" }),
|
|
1281
1286
|
c,
|
|
1282
|
-
ce && /* @__PURE__ */ m(
|
|
1283
|
-
/* @__PURE__ */
|
|
1284
|
-
|
|
1287
|
+
ce && /* @__PURE__ */ m(H, { children: [
|
|
1288
|
+
/* @__PURE__ */ o(
|
|
1289
|
+
_t,
|
|
1285
1290
|
{
|
|
1286
1291
|
repos: X,
|
|
1287
1292
|
counts: p,
|
|
@@ -1290,15 +1295,15 @@ function Bt({
|
|
|
1290
1295
|
}
|
|
1291
1296
|
),
|
|
1292
1297
|
/* @__PURE__ */ m("span", { className: "vitals", children: [
|
|
1293
|
-
/* @__PURE__ */
|
|
1298
|
+
/* @__PURE__ */ o("b", { id: "vitals-online", children: _ }),
|
|
1294
1299
|
" online · ",
|
|
1295
|
-
/* @__PURE__ */
|
|
1300
|
+
/* @__PURE__ */ o("b", { id: "vitals-active", children: C }),
|
|
1296
1301
|
" active"
|
|
1297
1302
|
] })
|
|
1298
1303
|
] }),
|
|
1299
|
-
/* @__PURE__ */
|
|
1300
|
-
ce && /* @__PURE__ */ m(
|
|
1301
|
-
/* @__PURE__ */
|
|
1304
|
+
/* @__PURE__ */ o("span", { className: "grow" }),
|
|
1305
|
+
ce && /* @__PURE__ */ m(H, { children: [
|
|
1306
|
+
/* @__PURE__ */ o(
|
|
1302
1307
|
"span",
|
|
1303
1308
|
{
|
|
1304
1309
|
id: "status",
|
|
@@ -1306,13 +1311,13 @@ function Bt({
|
|
|
1306
1311
|
children: D.text
|
|
1307
1312
|
}
|
|
1308
1313
|
),
|
|
1309
|
-
/* @__PURE__ */
|
|
1314
|
+
/* @__PURE__ */ o("span", { id: "freshness", className: "freshness", children: I })
|
|
1310
1315
|
] }),
|
|
1311
|
-
/* @__PURE__ */
|
|
1316
|
+
/* @__PURE__ */ o("nav", { className: "tabs", role: "tablist", "aria-label": "Shepherd views", children: f.map(({ id: g, label: L }, O) => /* @__PURE__ */ o(
|
|
1312
1317
|
"button",
|
|
1313
1318
|
{
|
|
1314
1319
|
ref: (x) => {
|
|
1315
|
-
|
|
1320
|
+
k.current[O] = x;
|
|
1316
1321
|
},
|
|
1317
1322
|
className: "tab" + (d === g ? " tab--active" : ""),
|
|
1318
1323
|
"data-tab": g,
|
|
@@ -1324,38 +1329,38 @@ function Bt({
|
|
|
1324
1329
|
tabIndex: d === g ? 0 : -1,
|
|
1325
1330
|
onClick: () => T(g),
|
|
1326
1331
|
onKeyDown: (x) => v(x, O),
|
|
1327
|
-
children:
|
|
1332
|
+
children: L
|
|
1328
1333
|
},
|
|
1329
1334
|
g
|
|
1330
1335
|
)) })
|
|
1331
1336
|
] }),
|
|
1332
|
-
/* @__PURE__ */
|
|
1337
|
+
/* @__PURE__ */ o(
|
|
1333
1338
|
"section",
|
|
1334
1339
|
{
|
|
1335
1340
|
id: "panel-tasks",
|
|
1336
1341
|
role: "tabpanel",
|
|
1337
1342
|
"aria-labelledby": "tab-tasks",
|
|
1338
1343
|
hidden: d !== "tasks",
|
|
1339
|
-
children: a ? /* @__PURE__ */
|
|
1340
|
-
/* @__PURE__ */
|
|
1344
|
+
children: a ? /* @__PURE__ */ o(Ne, { onGetStarted: () => T("config") }) : /* @__PURE__ */ m(H, { children: [
|
|
1345
|
+
/* @__PURE__ */ o(Nt, { agents: B, tasks: W, selectedRepo: w }),
|
|
1341
1346
|
/* @__PURE__ */ m("div", { className: "board", children: [
|
|
1342
1347
|
/* @__PURE__ */ m("div", { className: "col", children: [
|
|
1343
1348
|
/* @__PURE__ */ m("div", { className: "colhead", children: [
|
|
1344
|
-
/* @__PURE__ */
|
|
1345
|
-
/* @__PURE__ */
|
|
1349
|
+
/* @__PURE__ */ o("h2", { children: "Active" }),
|
|
1350
|
+
/* @__PURE__ */ o("span", { className: "n", id: "active-count", children: Ie })
|
|
1346
1351
|
] }),
|
|
1347
|
-
/* @__PURE__ */
|
|
1352
|
+
/* @__PURE__ */ o(Tt, { tasks: W, nowMs: F, selectedRepo: w })
|
|
1348
1353
|
] }),
|
|
1349
|
-
/* @__PURE__ */
|
|
1354
|
+
/* @__PURE__ */ o("div", { className: "board__rule" }),
|
|
1350
1355
|
/* @__PURE__ */ m("div", { className: "col", children: [
|
|
1351
1356
|
/* @__PURE__ */ m("div", { className: "colhead", children: [
|
|
1352
|
-
/* @__PURE__ */
|
|
1353
|
-
/* @__PURE__ */
|
|
1357
|
+
/* @__PURE__ */ o("h2", { children: "Done" }),
|
|
1358
|
+
/* @__PURE__ */ o("span", { className: "n", id: "done-count", children: xe })
|
|
1354
1359
|
] }),
|
|
1355
|
-
/* @__PURE__ */
|
|
1356
|
-
|
|
1360
|
+
/* @__PURE__ */ o(
|
|
1361
|
+
Et,
|
|
1357
1362
|
{
|
|
1358
|
-
tasks:
|
|
1363
|
+
tasks: W,
|
|
1359
1364
|
nowMs: F,
|
|
1360
1365
|
selectedRepo: w,
|
|
1361
1366
|
doneShown: S,
|
|
@@ -1367,17 +1372,17 @@ function Bt({
|
|
|
1367
1372
|
] })
|
|
1368
1373
|
}
|
|
1369
1374
|
),
|
|
1370
|
-
/* @__PURE__ */
|
|
1375
|
+
/* @__PURE__ */ o(
|
|
1371
1376
|
"section",
|
|
1372
1377
|
{
|
|
1373
1378
|
id: "panel-chat",
|
|
1374
1379
|
role: "tabpanel",
|
|
1375
1380
|
"aria-labelledby": "tab-chat",
|
|
1376
1381
|
hidden: d !== "chat",
|
|
1377
|
-
children: a ? /* @__PURE__ */
|
|
1378
|
-
/* @__PURE__ */
|
|
1379
|
-
/* @__PURE__ */
|
|
1380
|
-
|
|
1382
|
+
children: a ? /* @__PURE__ */ o(Ne, { onGetStarted: () => T("config") }) : /* @__PURE__ */ m("div", { className: "chat-wrap", children: [
|
|
1383
|
+
/* @__PURE__ */ o(jt, { announcements: De, selectedRepo: w, nowMs: F }),
|
|
1384
|
+
/* @__PURE__ */ o(
|
|
1385
|
+
It,
|
|
1381
1386
|
{
|
|
1382
1387
|
agents: B,
|
|
1383
1388
|
selectedRepo: w,
|
|
@@ -1388,7 +1393,7 @@ function Bt({
|
|
|
1388
1393
|
] })
|
|
1389
1394
|
}
|
|
1390
1395
|
),
|
|
1391
|
-
s && /* @__PURE__ */
|
|
1396
|
+
s && /* @__PURE__ */ o(
|
|
1392
1397
|
"section",
|
|
1393
1398
|
{
|
|
1394
1399
|
id: "panel-config",
|
|
@@ -1398,16 +1403,16 @@ function Bt({
|
|
|
1398
1403
|
children: n
|
|
1399
1404
|
}
|
|
1400
1405
|
),
|
|
1401
|
-
/* @__PURE__ */
|
|
1406
|
+
/* @__PURE__ */ o(Mt, { workspaceId: t })
|
|
1402
1407
|
] });
|
|
1403
1408
|
}
|
|
1404
1409
|
export {
|
|
1405
|
-
|
|
1410
|
+
Kt as D,
|
|
1406
1411
|
Ne as E,
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1412
|
+
U as S,
|
|
1413
|
+
Bt as a,
|
|
1414
|
+
qt as c,
|
|
1415
|
+
ct as d,
|
|
1411
1416
|
K as f,
|
|
1412
1417
|
oe as u
|
|
1413
1418
|
};
|