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