@korso/shepherd-ui 0.10.0 → 0.11.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/LICENSE +661 -661
- package/README.md +50 -47
- package/dist/ShepherdRoot.d.ts +6 -1
- package/dist/ShepherdRoot.js +4 -3
- package/dist/components/Dashboard.d.ts +6 -1
- package/dist/components/Dashboard.js +2 -2
- package/dist/config/ConfigPanel.d.ts +6 -1
- package/dist/config/ConfigPanel.js +3 -2
- package/dist/config/SignOutAction.d.ts +7 -0
- package/dist/config/SignOutAction.js +7 -0
- package/dist/lib/{Dashboard-BSGZuM-A.js → Dashboard-YgxAVEUF.js} +604 -561
- package/dist/lib/index.d.ts +18 -3
- package/dist/lib/index.js +377 -359
- package/dist/lib/selfhost.js +32 -32
- package/dist/lib/styles.css +507 -495
- package/dist/selfhost/assets/index-BhrpCYNE.js +40 -0
- package/dist/selfhost/assets/index-Do2kYzi3.css +1 -0
- package/dist/selfhost/index.html +13 -13
- package/dist/selfhost.js +14 -13
- package/package.json +67 -67
- package/dist/selfhost/assets/index-BQL_SpLG.js +0 -40
- package/dist/selfhost/assets/index-CGncP2MD.css +0 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { jsx as r, jsxs as m, Fragment as
|
|
5
|
-
import { createContext as
|
|
1
|
+
var Pe = Object.defineProperty;
|
|
2
|
+
var Oe = (t, n, i) => n in t ? Pe(t, n, { enumerable: !0, configurable: !0, writable: !0, value: i }) : t[n] = i;
|
|
3
|
+
var he = (t, n, i) => Oe(t, typeof n != "symbol" ? n + "" : n, i);
|
|
4
|
+
import { jsx as r, jsxs as m, Fragment as q } from "react/jsx-runtime";
|
|
5
|
+
import { createContext as We, useContext as Ge, useState as _, useRef as P, useCallback as j, useEffect as ae, Fragment as Fe, useLayoutEffect as Ue, useId as Ce } from "react";
|
|
6
6
|
import { z as e } from "zod";
|
|
7
|
-
const
|
|
7
|
+
const C = e.string(), Y = e.number(), He = e.object({
|
|
8
8
|
agentName: e.string(),
|
|
9
9
|
human: e.string(),
|
|
10
10
|
branch: e.string(),
|
|
@@ -13,9 +13,9 @@ const E = e.string(), Y = e.number(), We = e.object({
|
|
|
13
13
|
message: e.string().nullable(),
|
|
14
14
|
paths: e.array(e.string()).min(1),
|
|
15
15
|
authorIsLive: e.boolean(),
|
|
16
|
-
authorLastActiveAt:
|
|
17
|
-
updatedAt:
|
|
18
|
-
}),
|
|
16
|
+
authorLastActiveAt: C,
|
|
17
|
+
updatedAt: C
|
|
18
|
+
}), qe = 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
|
|
@@ -27,7 +27,7 @@ const E = e.string(), Y = e.number(), We = e.object({
|
|
|
27
27
|
sha: e.string().regex(/^[0-9a-f]{4,64}$/).nullable(),
|
|
28
28
|
message: e.string().nullable(),
|
|
29
29
|
paths: e.array(e.string()).min(1).max(500)
|
|
30
|
-
}),
|
|
30
|
+
}), re = e.object({
|
|
31
31
|
branch: e.string(),
|
|
32
32
|
baseBranch: e.string(),
|
|
33
33
|
head: e.string(),
|
|
@@ -36,15 +36,15 @@ const E = e.string(), Y = e.number(), We = 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(
|
|
40
|
-
}),
|
|
39
|
+
entries: e.array(qe).max(600)
|
|
40
|
+
}), J = e.object({
|
|
41
41
|
workItemId: e.string().uuid(),
|
|
42
42
|
agentName: e.string(),
|
|
43
43
|
human: e.string().min(1),
|
|
44
44
|
intent: e.string().min(1).max(2048),
|
|
45
45
|
pathGlobs: e.array(e.string().min(1).max(512)).min(1).max(64),
|
|
46
46
|
// ISO timestamp string; see IsoTimestamp note above
|
|
47
|
-
expiresAt:
|
|
47
|
+
expiresAt: C
|
|
48
48
|
}), V = e.object({
|
|
49
49
|
// bigint PK serialised as number; see DbId note above
|
|
50
50
|
id: Y,
|
|
@@ -53,19 +53,19 @@ const E = e.string(), Y = e.number(), We = e.object({
|
|
|
53
53
|
body: e.string().min(1).max(8192),
|
|
54
54
|
targetAgentName: e.string().nullable(),
|
|
55
55
|
// ISO timestamp string; see IsoTimestamp note above
|
|
56
|
-
createdAt:
|
|
57
|
-
}),
|
|
58
|
-
conflicts: e.array(
|
|
59
|
-
activeClaims: e.array(
|
|
56
|
+
createdAt: C
|
|
57
|
+
}), $e = e.object({
|
|
58
|
+
conflicts: e.array(J),
|
|
59
|
+
activeClaims: e.array(J),
|
|
60
60
|
// The caller's OWN active claims. `activeClaims` deliberately excludes the
|
|
61
61
|
// caller's session, so without this an agent has no way to confirm its own
|
|
62
62
|
// claim is live. Optional with a default so an older client talking to a
|
|
63
63
|
// newer hub (or vice-versa) never fails validation on its absence.
|
|
64
|
-
yourClaims: e.array(
|
|
64
|
+
yourClaims: e.array(J).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(He).default([])
|
|
68
|
+
}), Be = e.object({
|
|
69
69
|
name: e.string(),
|
|
70
70
|
human: e.string(),
|
|
71
71
|
program: e.string(),
|
|
@@ -75,19 +75,19 @@ const E = e.string(), Y = e.number(), We = e.object({
|
|
|
75
75
|
// are null when the agent has no session yet.
|
|
76
76
|
repo: e.string().nullable(),
|
|
77
77
|
branch: e.string().nullable(),
|
|
78
|
-
lastHeartbeatAt:
|
|
78
|
+
lastHeartbeatAt: C.nullable(),
|
|
79
79
|
presence: e.enum(["live", "offline"])
|
|
80
|
-
}),
|
|
80
|
+
}), Ke = e.enum(["active", "done", "dropped"]), ze = e.object({
|
|
81
81
|
agentName: e.string(),
|
|
82
82
|
program: e.string(),
|
|
83
83
|
model: e.string().nullable(),
|
|
84
84
|
repo: e.string(),
|
|
85
85
|
intent: e.string(),
|
|
86
86
|
pathGlobs: e.array(e.string()),
|
|
87
|
-
status:
|
|
88
|
-
createdAt:
|
|
89
|
-
endedAt:
|
|
90
|
-
}),
|
|
87
|
+
status: Ke,
|
|
88
|
+
createdAt: C,
|
|
89
|
+
endedAt: C.nullable()
|
|
90
|
+
}), Ye = e.object({
|
|
91
91
|
fromAgentName: e.string(),
|
|
92
92
|
fromHuman: e.string(),
|
|
93
93
|
body: e.string(),
|
|
@@ -107,14 +107,14 @@ const E = e.string(), Y = e.number(), We = e.object({
|
|
|
107
107
|
// the collective "→ admin". Null for legacy/collective operator messages and
|
|
108
108
|
// everything else. Defaulted for version-skew safety with older hubs.
|
|
109
109
|
targetMemberName: e.string().nullable().default(null),
|
|
110
|
-
createdAt:
|
|
111
|
-
}),
|
|
112
|
-
agents: e.array(
|
|
113
|
-
tasks: e.array(
|
|
114
|
-
announcements: e.array(
|
|
110
|
+
createdAt: C
|
|
111
|
+
}), pe = e.object({
|
|
112
|
+
agents: e.array(Be),
|
|
113
|
+
tasks: e.array(ze),
|
|
114
|
+
announcements: e.array(Ye),
|
|
115
115
|
// The server's clock, so the client computes "expires in / last seen" against
|
|
116
116
|
// the hub rather than the (possibly skewed) browser clock.
|
|
117
|
-
serverTime:
|
|
117
|
+
serverTime: C
|
|
118
118
|
});
|
|
119
119
|
e.object({
|
|
120
120
|
body: e.string().min(1).max(8192),
|
|
@@ -126,7 +126,7 @@ e.object({
|
|
|
126
126
|
// Ignored for a DM (the target's own repo is used).
|
|
127
127
|
repo: e.string().min(1).nullable().optional()
|
|
128
128
|
});
|
|
129
|
-
const
|
|
129
|
+
const ge = e.object({
|
|
130
130
|
ok: e.literal(!0),
|
|
131
131
|
// One id per inserted row: a single id for a DM or repo-scoped broadcast, or
|
|
132
132
|
// several when an all-repos broadcast fans out across repos.
|
|
@@ -144,18 +144,18 @@ e.object({
|
|
|
144
144
|
agentName: e.string(),
|
|
145
145
|
sessionId: e.string().uuid()
|
|
146
146
|
});
|
|
147
|
-
const
|
|
147
|
+
const Ve = e.object({
|
|
148
148
|
sessionId: e.string().uuid(),
|
|
149
149
|
intent: e.string().min(1).max(2048),
|
|
150
150
|
pathGlobs: e.array(e.string().min(1).max(512)).min(1).max(64),
|
|
151
151
|
ttlSeconds: e.number().int().positive().optional(),
|
|
152
|
-
changeReport:
|
|
152
|
+
changeReport: re.optional()
|
|
153
153
|
});
|
|
154
154
|
e.object({
|
|
155
155
|
workItemId: e.string().uuid(),
|
|
156
|
-
landscape:
|
|
156
|
+
landscape: $e
|
|
157
157
|
});
|
|
158
|
-
const
|
|
158
|
+
const Xe = e.object({
|
|
159
159
|
sessionId: e.string().uuid(),
|
|
160
160
|
workItemId: e.string().uuid()
|
|
161
161
|
});
|
|
@@ -166,7 +166,7 @@ e.object({
|
|
|
166
166
|
// their next work/sync). Defaulted for version-skew safety with older hubs.
|
|
167
167
|
announcements: e.array(V).default([])
|
|
168
168
|
});
|
|
169
|
-
const
|
|
169
|
+
const Ze = e.object({
|
|
170
170
|
sessionId: e.string().uuid(),
|
|
171
171
|
body: e.string().min(1).max(8192),
|
|
172
172
|
// THE preferred addressing field: one name that reaches either kind of
|
|
@@ -196,14 +196,14 @@ e.object({
|
|
|
196
196
|
});
|
|
197
197
|
e.object({
|
|
198
198
|
sessionId: e.string().uuid(),
|
|
199
|
-
changeReport:
|
|
199
|
+
changeReport: re.optional()
|
|
200
200
|
});
|
|
201
201
|
e.object({
|
|
202
|
-
landscape:
|
|
202
|
+
landscape: $e
|
|
203
203
|
});
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
204
|
+
Ve.omit({ sessionId: !0, changeReport: !0 });
|
|
205
|
+
Ze.omit({ sessionId: !0 });
|
|
206
|
+
Xe.omit({ sessionId: !0 });
|
|
207
207
|
e.object({});
|
|
208
208
|
e.object({});
|
|
209
209
|
e.object({
|
|
@@ -212,7 +212,7 @@ e.object({
|
|
|
212
212
|
// change records fresh (commits surface within ~one heartbeat interval, not
|
|
213
213
|
// only when it next calls work/sync). Processed presence-style: it refreshes
|
|
214
214
|
// change records but, like the rest of heartbeat, does NOT renew claim TTLs.
|
|
215
|
-
changeReport:
|
|
215
|
+
changeReport: re.optional(),
|
|
216
216
|
// Opt-in: when set, the heartbeat returns any pending announcements for the
|
|
217
217
|
// caller in the response. Delivery is now TWO-PHASE and crash-safe: this fetch
|
|
218
218
|
// phase does NOT mark them delivered — the client persists them to its
|
|
@@ -243,36 +243,36 @@ e.object({
|
|
|
243
243
|
e.object({
|
|
244
244
|
ok: e.literal(!0)
|
|
245
245
|
});
|
|
246
|
-
const
|
|
246
|
+
const Ee = e.enum(["admin", "member"]), oe = e.object({
|
|
247
247
|
id: e.string(),
|
|
248
248
|
slug: e.string(),
|
|
249
249
|
name: e.string(),
|
|
250
|
-
role:
|
|
250
|
+
role: Ee
|
|
251
251
|
});
|
|
252
252
|
e.object({
|
|
253
253
|
name: e.string().min(1)
|
|
254
254
|
});
|
|
255
|
-
const
|
|
256
|
-
workspaces: e.array(
|
|
257
|
-
}),
|
|
255
|
+
const Je = oe, Qe = e.object({
|
|
256
|
+
workspaces: e.array(oe)
|
|
257
|
+
}), et = e.object({
|
|
258
258
|
deleted: e.literal(!0)
|
|
259
259
|
});
|
|
260
260
|
e.object({
|
|
261
261
|
name: e.string().min(1).optional()
|
|
262
262
|
});
|
|
263
|
-
const
|
|
263
|
+
const be = e.object({
|
|
264
264
|
// The raw shp_ token, shown once at creation and never returned again.
|
|
265
265
|
token: e.string(),
|
|
266
266
|
id: e.string()
|
|
267
|
-
}),
|
|
267
|
+
}), tt = e.object({
|
|
268
268
|
id: e.string(),
|
|
269
269
|
name: e.string().nullable(),
|
|
270
270
|
// ISO timestamp string (see IsoTimestamp note above) or null when unused / not revoked.
|
|
271
|
-
lastUsedAt:
|
|
272
|
-
createdAt:
|
|
273
|
-
revokedAt:
|
|
274
|
-
}),
|
|
275
|
-
tokens: e.array(
|
|
271
|
+
lastUsedAt: C.nullable(),
|
|
272
|
+
createdAt: C,
|
|
273
|
+
revokedAt: C.nullable()
|
|
274
|
+
}), fe = e.object({
|
|
275
|
+
tokens: e.array(tt)
|
|
276
276
|
});
|
|
277
277
|
e.object({
|
|
278
278
|
expiresInDays: e.number().int().positive().optional(),
|
|
@@ -280,10 +280,10 @@ e.object({
|
|
|
280
280
|
// integer to cap it instead.
|
|
281
281
|
maxUses: e.number().int().positive().optional()
|
|
282
282
|
});
|
|
283
|
-
const
|
|
283
|
+
const nt = e.object({
|
|
284
284
|
code: e.string(),
|
|
285
285
|
// ISO timestamp string, or null when the invite never expires.
|
|
286
|
-
expiresAt:
|
|
286
|
+
expiresAt: C.nullable(),
|
|
287
287
|
// null = unlimited (redeemable until revoked).
|
|
288
288
|
maxUses: e.number().int().positive().nullable(),
|
|
289
289
|
useCount: e.number().int().nonnegative()
|
|
@@ -291,47 +291,88 @@ const et = e.object({
|
|
|
291
291
|
e.object({
|
|
292
292
|
email: e.string().email()
|
|
293
293
|
});
|
|
294
|
-
const
|
|
294
|
+
const st = e.object({
|
|
295
295
|
email: e.string(),
|
|
296
|
-
sentAt:
|
|
297
|
-
}),
|
|
296
|
+
sentAt: C
|
|
297
|
+
}), at = e.object({
|
|
298
298
|
// The workspace the caller just joined.
|
|
299
|
-
workspace:
|
|
300
|
-
}),
|
|
299
|
+
workspace: oe
|
|
300
|
+
}), rt = e.object({
|
|
301
301
|
accountId: e.string(),
|
|
302
302
|
displayName: e.string().nullable(),
|
|
303
303
|
githubLogin: e.string().nullable(),
|
|
304
304
|
email: e.string().nullable(),
|
|
305
305
|
avatarUrl: e.string().nullable(),
|
|
306
|
-
role:
|
|
307
|
-
}),
|
|
308
|
-
members: e.array(
|
|
309
|
-
}),
|
|
306
|
+
role: Ee
|
|
307
|
+
}), ot = e.object({
|
|
308
|
+
members: e.array(rt)
|
|
309
|
+
}), ct = e.enum(["bug", "suggestion", "other"]);
|
|
310
310
|
e.object({
|
|
311
|
-
type:
|
|
311
|
+
type: ct,
|
|
312
312
|
body: e.string().trim().min(1).max(4e3)
|
|
313
313
|
});
|
|
314
|
-
const
|
|
314
|
+
const it = e.object({
|
|
315
315
|
ok: e.literal(!0),
|
|
316
316
|
// uuid PK (the feedback table, like workspaces, uses gen_random_uuid()).
|
|
317
317
|
id: e.string()
|
|
318
|
-
}),
|
|
319
|
-
|
|
318
|
+
}), B = e.object({
|
|
319
|
+
// `YYYY-MM-DD` (UTC day).
|
|
320
|
+
date: e.string(),
|
|
321
|
+
count: e.number()
|
|
322
|
+
}), lt = e.object({
|
|
323
|
+
name: e.string(),
|
|
324
|
+
slug: e.string(),
|
|
325
|
+
members: e.number(),
|
|
326
|
+
agents: e.number(),
|
|
327
|
+
liveSessions: e.number()
|
|
328
|
+
});
|
|
329
|
+
e.object({
|
|
330
|
+
generatedAt: C,
|
|
331
|
+
totals: e.object({
|
|
332
|
+
accounts: e.number(),
|
|
333
|
+
workspaces: e.number(),
|
|
334
|
+
memberships: e.number(),
|
|
335
|
+
agents: e.number(),
|
|
336
|
+
liveSessions: e.number(),
|
|
337
|
+
activeTokens: e.number(),
|
|
338
|
+
revokedTokens: e.number(),
|
|
339
|
+
activeInvites: e.number(),
|
|
340
|
+
feedback: e.number(),
|
|
341
|
+
changeRecords: e.number(),
|
|
342
|
+
activeWorkItems: e.number()
|
|
343
|
+
}),
|
|
344
|
+
engagement: e.object({
|
|
345
|
+
activeWorkspaces7d: e.number(),
|
|
346
|
+
activeWorkspaces30d: e.number(),
|
|
347
|
+
avgMembersPerWorkspace: e.number(),
|
|
348
|
+
largestWorkspace: e.number()
|
|
349
|
+
}),
|
|
350
|
+
feedbackByType: e.array(e.object({ type: e.string(), count: e.number() })),
|
|
351
|
+
trends: e.object({
|
|
352
|
+
newAccounts: e.array(B),
|
|
353
|
+
newWorkspaces: e.array(B),
|
|
354
|
+
newSessions: e.array(B),
|
|
355
|
+
commits: e.array(B)
|
|
356
|
+
}),
|
|
357
|
+
topWorkspaces: e.array(lt)
|
|
358
|
+
});
|
|
359
|
+
const dt = 5e3;
|
|
360
|
+
class H extends Error {
|
|
320
361
|
/**
|
|
321
362
|
* @param message - Human-readable failure description.
|
|
322
363
|
* @param status - Upstream HTTP status, omitted for network/abort failures.
|
|
323
364
|
*/
|
|
324
|
-
constructor(
|
|
325
|
-
super(
|
|
365
|
+
constructor(i, o) {
|
|
366
|
+
super(i);
|
|
326
367
|
/** Upstream HTTP status for a non-2xx response; absent for transport errors. */
|
|
327
|
-
|
|
368
|
+
he(this, "status");
|
|
328
369
|
this.name = "ShepherdClientError", o !== void 0 && (this.status = o);
|
|
329
370
|
}
|
|
330
371
|
}
|
|
331
|
-
function
|
|
372
|
+
function ut(t) {
|
|
332
373
|
return t instanceof Error ? t.message : "Something went wrong.";
|
|
333
374
|
}
|
|
334
|
-
async function
|
|
375
|
+
async function mt(t) {
|
|
335
376
|
try {
|
|
336
377
|
const n = await t.json();
|
|
337
378
|
if (n !== null && typeof n == "object" && "error" in n && typeof n.error == "string")
|
|
@@ -340,227 +381,227 @@ async function lt(t) {
|
|
|
340
381
|
}
|
|
341
382
|
return "";
|
|
342
383
|
}
|
|
343
|
-
function
|
|
344
|
-
const n = t.baseUrl.replace(/\/$/, ""),
|
|
345
|
-
async function s
|
|
384
|
+
function zt(t) {
|
|
385
|
+
const n = t.baseUrl.replace(/\/$/, ""), i = t.timeoutMs ?? dt, o = encodeURIComponent;
|
|
386
|
+
async function a(s, l, c = {}) {
|
|
346
387
|
var f, k;
|
|
347
|
-
const h = new AbortController(), u = setTimeout(() => h.abort(),
|
|
388
|
+
const h = new AbortController(), u = setTimeout(() => h.abort(), i);
|
|
348
389
|
let d;
|
|
349
390
|
try {
|
|
350
|
-
const v =
|
|
351
|
-
method:
|
|
352
|
-
headers: { ...v, ...typeof
|
|
391
|
+
const v = c.body !== void 0 ? { "Content-Type": "application/json" } : {}, $ = await ((f = t.getAuthHeader) == null ? void 0 : f.call(t)), A = {
|
|
392
|
+
method: s,
|
|
393
|
+
headers: { ...v, ...typeof $ == "string" ? { Authorization: $ } : $ ?? {} },
|
|
353
394
|
signal: h.signal
|
|
354
395
|
};
|
|
355
|
-
|
|
396
|
+
c.body !== void 0 && (A.body = JSON.stringify(c.body)), d = await fetch(`${n}${l}`, A);
|
|
356
397
|
} catch (v) {
|
|
357
|
-
throw new
|
|
398
|
+
throw new H(
|
|
358
399
|
v instanceof Error ? v.message : String(v)
|
|
359
400
|
);
|
|
360
401
|
} finally {
|
|
361
402
|
clearTimeout(u);
|
|
362
403
|
}
|
|
363
404
|
if (d.status === 401)
|
|
364
|
-
throw (k = t.onUnauthorized) == null || k.call(t), new
|
|
405
|
+
throw (k = t.onUnauthorized) == null || k.call(t), new H("Unauthorized", 401);
|
|
365
406
|
if (!d.ok) {
|
|
366
|
-
const v = await
|
|
367
|
-
throw new
|
|
407
|
+
const v = await mt(d);
|
|
408
|
+
throw new H(
|
|
368
409
|
v !== "" ? `HTTP ${d.status}: ${v}` : `HTTP ${d.status}`,
|
|
369
410
|
d.status
|
|
370
411
|
);
|
|
371
412
|
}
|
|
372
|
-
if (!
|
|
413
|
+
if (!c.schema) {
|
|
373
414
|
try {
|
|
374
415
|
await d.json();
|
|
375
416
|
} catch {
|
|
376
417
|
}
|
|
377
418
|
return;
|
|
378
419
|
}
|
|
379
|
-
const
|
|
380
|
-
if (!
|
|
381
|
-
throw new
|
|
382
|
-
return
|
|
420
|
+
const g = c.schema.safeParse(await d.json());
|
|
421
|
+
if (!g.success)
|
|
422
|
+
throw new H("Invalid response schema");
|
|
423
|
+
return g.data;
|
|
383
424
|
}
|
|
384
425
|
return {
|
|
385
426
|
baseUrl: n,
|
|
386
427
|
// --- multi-workspace management surface ---------------------------------
|
|
387
428
|
listWorkspaces() {
|
|
388
|
-
return
|
|
389
|
-
schema:
|
|
429
|
+
return a("GET", "/workspaces", {
|
|
430
|
+
schema: Qe
|
|
390
431
|
});
|
|
391
432
|
},
|
|
392
|
-
createWorkspace(
|
|
393
|
-
return
|
|
394
|
-
body:
|
|
395
|
-
schema:
|
|
433
|
+
createWorkspace(s) {
|
|
434
|
+
return a("POST", "/workspaces", {
|
|
435
|
+
body: s,
|
|
436
|
+
schema: Je
|
|
396
437
|
});
|
|
397
438
|
},
|
|
398
|
-
deleteWorkspace(
|
|
399
|
-
return
|
|
400
|
-
schema:
|
|
439
|
+
deleteWorkspace(s) {
|
|
440
|
+
return a("DELETE", `/workspaces/${o(s)}`, {
|
|
441
|
+
schema: et
|
|
401
442
|
});
|
|
402
443
|
},
|
|
403
|
-
mintToken(
|
|
404
|
-
return
|
|
405
|
-
body:
|
|
406
|
-
schema:
|
|
444
|
+
mintToken(s, l) {
|
|
445
|
+
return a("POST", `/workspaces/${o(s)}/tokens`, {
|
|
446
|
+
body: l,
|
|
447
|
+
schema: be
|
|
407
448
|
});
|
|
408
449
|
},
|
|
409
|
-
listTokens(
|
|
410
|
-
return
|
|
411
|
-
schema:
|
|
450
|
+
listTokens(s) {
|
|
451
|
+
return a("GET", `/workspaces/${o(s)}/tokens`, {
|
|
452
|
+
schema: fe
|
|
412
453
|
});
|
|
413
454
|
},
|
|
414
|
-
revokeToken(
|
|
415
|
-
return
|
|
455
|
+
revokeToken(s, l) {
|
|
456
|
+
return a(
|
|
416
457
|
"DELETE",
|
|
417
|
-
`/workspaces/${o(
|
|
458
|
+
`/workspaces/${o(s)}/tokens/${o(l)}`
|
|
418
459
|
);
|
|
419
460
|
},
|
|
420
|
-
mintAccountToken(
|
|
421
|
-
return
|
|
422
|
-
body:
|
|
423
|
-
schema:
|
|
461
|
+
mintAccountToken(s) {
|
|
462
|
+
return a("POST", "/tokens", {
|
|
463
|
+
body: s,
|
|
464
|
+
schema: be
|
|
424
465
|
});
|
|
425
466
|
},
|
|
426
467
|
listAccountTokens() {
|
|
427
|
-
return
|
|
428
|
-
schema:
|
|
468
|
+
return a("GET", "/tokens", {
|
|
469
|
+
schema: fe
|
|
429
470
|
});
|
|
430
471
|
},
|
|
431
|
-
revokeAccountToken(
|
|
432
|
-
return
|
|
472
|
+
revokeAccountToken(s) {
|
|
473
|
+
return a("DELETE", `/tokens/${o(s)}`);
|
|
433
474
|
},
|
|
434
|
-
createInvite(
|
|
435
|
-
return
|
|
436
|
-
body:
|
|
437
|
-
schema:
|
|
475
|
+
createInvite(s, l) {
|
|
476
|
+
return a("POST", `/workspaces/${o(s)}/invites`, {
|
|
477
|
+
body: l,
|
|
478
|
+
schema: nt
|
|
438
479
|
});
|
|
439
480
|
},
|
|
440
|
-
inviteByEmail(
|
|
441
|
-
return
|
|
442
|
-
body: { email:
|
|
443
|
-
schema:
|
|
481
|
+
inviteByEmail(s, l) {
|
|
482
|
+
return a("POST", `/workspaces/${o(s)}/invites/email`, {
|
|
483
|
+
body: { email: l },
|
|
484
|
+
schema: st
|
|
444
485
|
});
|
|
445
486
|
},
|
|
446
|
-
revokeInvite(
|
|
447
|
-
return
|
|
487
|
+
revokeInvite(s, l) {
|
|
488
|
+
return a(
|
|
448
489
|
"POST",
|
|
449
|
-
`/workspaces/${o(
|
|
490
|
+
`/workspaces/${o(s)}/invites/${o(l)}/revoke`
|
|
450
491
|
);
|
|
451
492
|
},
|
|
452
|
-
redeemInvite(
|
|
453
|
-
return
|
|
454
|
-
schema:
|
|
493
|
+
redeemInvite(s) {
|
|
494
|
+
return a("POST", `/invites/${o(s)}/redeem`, {
|
|
495
|
+
schema: at
|
|
455
496
|
});
|
|
456
497
|
},
|
|
457
|
-
listMembers(
|
|
458
|
-
return
|
|
459
|
-
schema:
|
|
498
|
+
listMembers(s) {
|
|
499
|
+
return a("GET", `/workspaces/${o(s)}/members`, {
|
|
500
|
+
schema: ot
|
|
460
501
|
});
|
|
461
502
|
},
|
|
462
|
-
removeMember(
|
|
463
|
-
return
|
|
503
|
+
removeMember(s, l) {
|
|
504
|
+
return a(
|
|
464
505
|
"DELETE",
|
|
465
|
-
`/workspaces/${o(
|
|
506
|
+
`/workspaces/${o(s)}/members/${o(l)}`
|
|
466
507
|
);
|
|
467
508
|
},
|
|
468
|
-
leave(
|
|
469
|
-
return
|
|
509
|
+
leave(s) {
|
|
510
|
+
return a("POST", `/workspaces/${o(s)}/leave`);
|
|
470
511
|
},
|
|
471
|
-
landscape(
|
|
472
|
-
return
|
|
473
|
-
schema:
|
|
512
|
+
landscape(s) {
|
|
513
|
+
return a("GET", `/workspaces/${o(s)}/landscape`, {
|
|
514
|
+
schema: pe
|
|
474
515
|
});
|
|
475
516
|
},
|
|
476
|
-
announceTo(
|
|
477
|
-
return
|
|
478
|
-
body:
|
|
479
|
-
schema:
|
|
517
|
+
announceTo(s, l) {
|
|
518
|
+
return a("POST", `/workspaces/${o(s)}/announce`, {
|
|
519
|
+
body: l,
|
|
520
|
+
schema: ge
|
|
480
521
|
});
|
|
481
522
|
},
|
|
482
|
-
submitFeedback(
|
|
483
|
-
const
|
|
484
|
-
return
|
|
523
|
+
submitFeedback(s, l) {
|
|
524
|
+
const c = l !== void 0 ? `/workspaces/${o(l)}/feedback` : "/feedback";
|
|
525
|
+
return a("POST", c, { body: s, schema: it });
|
|
485
526
|
},
|
|
486
527
|
// --- self-host singular aliases (implicit single workspace) -------------
|
|
487
528
|
getLandscape() {
|
|
488
|
-
return
|
|
489
|
-
schema:
|
|
529
|
+
return a("GET", "/workspace/landscape", {
|
|
530
|
+
schema: pe
|
|
490
531
|
});
|
|
491
532
|
},
|
|
492
|
-
announce(
|
|
493
|
-
return
|
|
494
|
-
body:
|
|
495
|
-
schema:
|
|
533
|
+
announce(s) {
|
|
534
|
+
return a("POST", "/workspace/announce", {
|
|
535
|
+
body: s,
|
|
536
|
+
schema: ge
|
|
496
537
|
});
|
|
497
538
|
}
|
|
498
539
|
};
|
|
499
540
|
}
|
|
500
|
-
const
|
|
501
|
-
function
|
|
541
|
+
const Re = We(null);
|
|
542
|
+
function Yt({
|
|
502
543
|
client: t,
|
|
503
544
|
children: n
|
|
504
545
|
}) {
|
|
505
|
-
return /* @__PURE__ */ r(
|
|
546
|
+
return /* @__PURE__ */ r(Re.Provider, { value: t, children: n });
|
|
506
547
|
}
|
|
507
|
-
function
|
|
508
|
-
const t =
|
|
548
|
+
function ce() {
|
|
549
|
+
const t = Ge(Re);
|
|
509
550
|
if (t === null)
|
|
510
551
|
throw new Error(
|
|
511
552
|
"useShepherdClient must be used within <ShepherdClientProvider>"
|
|
512
553
|
);
|
|
513
554
|
return t;
|
|
514
555
|
}
|
|
515
|
-
const
|
|
516
|
-
function
|
|
517
|
-
const n =
|
|
556
|
+
const ht = 5e3, pt = 1e3;
|
|
557
|
+
function gt(t) {
|
|
558
|
+
const n = ce(), i = t == null ? void 0 : t.workspaceId, o = (t == null ? void 0 : t.pollMs) ?? ht, a = (t == null ? void 0 : t.enabled) ?? !0, [s, l] = _(
|
|
518
559
|
null
|
|
519
|
-
), [
|
|
560
|
+
), [c, h] = _("live"), [u, d] = _(null), [, g] = _(0), f = P(n);
|
|
520
561
|
f.current = n;
|
|
521
|
-
const k = P(0), v =
|
|
522
|
-
async (
|
|
562
|
+
const k = P(0), v = j(
|
|
563
|
+
async (T) => {
|
|
523
564
|
try {
|
|
524
|
-
const
|
|
525
|
-
if (
|
|
526
|
-
|
|
527
|
-
} catch (
|
|
528
|
-
if (
|
|
529
|
-
|
|
565
|
+
const A = i ? await f.current.landscape(i) : await f.current.getLandscape();
|
|
566
|
+
if (T !== k.current) return;
|
|
567
|
+
l(A), d(Date.now()), h("live");
|
|
568
|
+
} catch (A) {
|
|
569
|
+
if (T !== k.current) return;
|
|
570
|
+
A instanceof H && A.status === 401 ? h("unauthorized") : h("reconnecting");
|
|
530
571
|
}
|
|
531
572
|
},
|
|
532
|
-
[
|
|
573
|
+
[i]
|
|
533
574
|
);
|
|
534
|
-
|
|
535
|
-
if (!
|
|
536
|
-
const
|
|
537
|
-
v(
|
|
538
|
-
const
|
|
539
|
-
document.visibilityState !== "hidden" && v(
|
|
540
|
-
}, o),
|
|
541
|
-
|
|
542
|
-
},
|
|
543
|
-
document.visibilityState === "visible" && v(
|
|
575
|
+
ae(() => {
|
|
576
|
+
if (!a) return;
|
|
577
|
+
const T = ++k.current;
|
|
578
|
+
v(T);
|
|
579
|
+
const A = setInterval(() => {
|
|
580
|
+
document.visibilityState !== "hidden" && v(T);
|
|
581
|
+
}, o), N = setInterval(() => {
|
|
582
|
+
g((E) => E + 1);
|
|
583
|
+
}, pt), D = () => {
|
|
584
|
+
document.visibilityState === "visible" && v(T);
|
|
544
585
|
};
|
|
545
|
-
return document.addEventListener("visibilitychange",
|
|
546
|
-
k.current++, clearInterval(
|
|
586
|
+
return document.addEventListener("visibilitychange", D), () => {
|
|
587
|
+
k.current++, clearInterval(A), clearInterval(N), document.removeEventListener("visibilitychange", D);
|
|
547
588
|
};
|
|
548
|
-
}, [v, o,
|
|
549
|
-
const
|
|
550
|
-
return { snapshot:
|
|
589
|
+
}, [v, o, a]);
|
|
590
|
+
const $ = j(() => v(k.current), [v]);
|
|
591
|
+
return { snapshot: s, status: c, lastUpdatedMs: u, refresh: $ };
|
|
551
592
|
}
|
|
552
593
|
function K(t, n) {
|
|
553
|
-
const
|
|
554
|
-
if (
|
|
555
|
-
if (
|
|
556
|
-
const o = Math.floor(
|
|
594
|
+
const i = Math.floor((n - Date.parse(t)) / 1e3);
|
|
595
|
+
if (i < 5) return "just now";
|
|
596
|
+
if (i < 60) return `${i}s ago`;
|
|
597
|
+
const o = Math.floor(i / 60);
|
|
557
598
|
if (o < 60) return `${o}m ago`;
|
|
558
|
-
const
|
|
559
|
-
return
|
|
599
|
+
const a = Math.floor(o / 60);
|
|
600
|
+
return a < 24 ? `${a}h ago` : `${Math.floor(a / 24)}d ago`;
|
|
560
601
|
}
|
|
561
602
|
function z(t) {
|
|
562
603
|
let n = 0;
|
|
563
|
-
for (let
|
|
604
|
+
for (let i = 0; i < t.length; i++) n = (n * 31 + t.charCodeAt(i)) % 360;
|
|
564
605
|
return `hsl(${n}, 38%, 42%)`;
|
|
565
606
|
}
|
|
566
607
|
function ie(t) {
|
|
@@ -568,136 +609,136 @@ function ie(t) {
|
|
|
568
609
|
const n = t.match(/[A-Z]/g);
|
|
569
610
|
return n && n.length >= 2 ? n[0] + n[1] : t.slice(0, 2).toUpperCase();
|
|
570
611
|
}
|
|
571
|
-
const
|
|
572
|
-
function
|
|
573
|
-
const o = t.slice(0, n).match(new RegExp(`(?:^|\\s)@([${
|
|
612
|
+
const je = "A-Za-z0-9_-";
|
|
613
|
+
function bt(t, n) {
|
|
614
|
+
const o = t.slice(0, n).match(new RegExp(`(?:^|\\s)@([${je}]*)$`));
|
|
574
615
|
if (!o) return null;
|
|
575
|
-
const
|
|
576
|
-
return { start: n -
|
|
616
|
+
const a = o[1];
|
|
617
|
+
return { start: n - a.length - 1, end: n, query: a };
|
|
577
618
|
}
|
|
578
|
-
function
|
|
579
|
-
const
|
|
619
|
+
function ft(t, n) {
|
|
620
|
+
const i = new RegExp(`(?:^|\\s)@([${je}]+)`, "g");
|
|
580
621
|
let o;
|
|
581
|
-
for (; (o =
|
|
582
|
-
const
|
|
583
|
-
if (
|
|
622
|
+
for (; (o = i.exec(t)) !== null; ) {
|
|
623
|
+
const a = o[1].toLowerCase(), s = n.find((l) => l.toLowerCase() === a);
|
|
624
|
+
if (s) return s;
|
|
584
625
|
}
|
|
585
626
|
return null;
|
|
586
627
|
}
|
|
587
|
-
function
|
|
628
|
+
function De(t) {
|
|
588
629
|
return [...new Set(t.map((n) => n.repo))].sort();
|
|
589
630
|
}
|
|
590
|
-
function
|
|
631
|
+
function M(t, n) {
|
|
591
632
|
return n === null || n === "__all__" || t.repo === n;
|
|
592
633
|
}
|
|
593
|
-
function
|
|
634
|
+
function vt(t, n) {
|
|
594
635
|
return [
|
|
595
636
|
...new Set(
|
|
596
|
-
t.filter((
|
|
637
|
+
t.filter((i) => i.presence === "live" && M(i, n)).map((i) => i.name)
|
|
597
638
|
)
|
|
598
639
|
].sort();
|
|
599
640
|
}
|
|
600
|
-
function
|
|
601
|
-
const n = t.find((
|
|
641
|
+
function ve(t) {
|
|
642
|
+
const n = t.find((i) => i.status === "active");
|
|
602
643
|
return n ? n.repo : t.length ? t[0].repo : null;
|
|
603
644
|
}
|
|
604
|
-
function
|
|
645
|
+
function kt(t) {
|
|
605
646
|
return t === "dropped" ? "dropped" : "done";
|
|
606
647
|
}
|
|
607
|
-
function
|
|
648
|
+
function ke(t, n) {
|
|
608
649
|
if (!n) return "";
|
|
609
|
-
const
|
|
650
|
+
const i = Math.floor((Date.parse(n) - Date.parse(t)) / 1e3), o = Math.floor(i / 60);
|
|
610
651
|
return o < 60 ? `active ${o}m` : `active ${Math.floor(o / 60)}h`;
|
|
611
652
|
}
|
|
612
|
-
function
|
|
613
|
-
const
|
|
614
|
-
return
|
|
653
|
+
function yt(t, n) {
|
|
654
|
+
const i = new Date(Date.parse(t)), o = new Date(n), a = (l) => new Date(l.getFullYear(), l.getMonth(), l.getDate()).getTime(), s = Math.round((a(o) - a(i)) / 864e5);
|
|
655
|
+
return s <= 0 ? "Today" : s === 1 ? "Yesterday" : i.toLocaleDateString(void 0, { month: "short", day: "numeric" });
|
|
615
656
|
}
|
|
616
|
-
function
|
|
657
|
+
function ye(t) {
|
|
617
658
|
let n = t.toLowerCase().replace(/\\/g, "/");
|
|
618
659
|
n.endsWith("/") && (n = n.replace(/\/+$/, "") + "/**");
|
|
619
|
-
const
|
|
660
|
+
const i = [];
|
|
620
661
|
for (const o of n.split("/"))
|
|
621
662
|
if (!(o === "" || o === ".")) {
|
|
622
663
|
if (o === "..") {
|
|
623
|
-
|
|
664
|
+
i.length && i.pop();
|
|
624
665
|
continue;
|
|
625
666
|
}
|
|
626
|
-
|
|
667
|
+
i.push(o);
|
|
627
668
|
}
|
|
628
|
-
return
|
|
669
|
+
return i;
|
|
629
670
|
}
|
|
630
|
-
const
|
|
631
|
-
function
|
|
632
|
-
return t === "*" ? !0 : (
|
|
671
|
+
const _e = /[*?{}[\]]/;
|
|
672
|
+
function _t(t, n) {
|
|
673
|
+
return t === "*" ? !0 : (_e.test(t) || !_e.test(n)) && t === n;
|
|
633
674
|
}
|
|
634
|
-
function
|
|
635
|
-
const
|
|
636
|
-
function o(
|
|
637
|
-
if (n.length -
|
|
638
|
-
for (let
|
|
675
|
+
function Nt(t, n) {
|
|
676
|
+
const i = /* @__PURE__ */ new Map();
|
|
677
|
+
function o(a, s) {
|
|
678
|
+
if (n.length - s === 0) {
|
|
679
|
+
for (let g = a; g < t.length; g++) if (t[g] !== "**") return !1;
|
|
639
680
|
return !0;
|
|
640
681
|
}
|
|
641
|
-
if (t.length -
|
|
642
|
-
const
|
|
643
|
-
if (
|
|
644
|
-
const h = t[
|
|
682
|
+
if (t.length - a === 0) return !1;
|
|
683
|
+
const l = a * (n.length + 1) + s, c = i.get(l);
|
|
684
|
+
if (c !== void 0) return c;
|
|
685
|
+
const h = t[a], u = n[s];
|
|
645
686
|
let d;
|
|
646
|
-
return h === "**" ? d = o(
|
|
687
|
+
return h === "**" ? d = o(a + 1, s) || o(a, s + 1) : u === "**" ? d = !1 : d = _t(h, u) && o(a + 1, s + 1), i.set(l, d), d;
|
|
647
688
|
}
|
|
648
689
|
return o(0, 0);
|
|
649
690
|
}
|
|
650
|
-
function
|
|
691
|
+
function Ne(t, n) {
|
|
651
692
|
if (n.length === 0) return !0;
|
|
652
|
-
const
|
|
693
|
+
const i = t.map(ye);
|
|
653
694
|
return n.every((o) => {
|
|
654
|
-
const
|
|
655
|
-
return
|
|
695
|
+
const a = ye(o);
|
|
696
|
+
return i.some((s) => Nt(s, a));
|
|
656
697
|
});
|
|
657
698
|
}
|
|
658
|
-
function
|
|
699
|
+
function wt(t) {
|
|
659
700
|
const n = /* @__PURE__ */ new Map();
|
|
660
|
-
for (const
|
|
661
|
-
n.has(
|
|
662
|
-
const
|
|
663
|
-
for (const [
|
|
664
|
-
const
|
|
665
|
-
(u) =>
|
|
666
|
-
(d) => d !== u &&
|
|
701
|
+
for (const a of t)
|
|
702
|
+
n.has(a.agentName) || n.set(a.agentName, []), n.get(a.agentName).push(a);
|
|
703
|
+
const i = (a, s) => s.createdAt.localeCompare(a.createdAt), o = [];
|
|
704
|
+
for (const [a, s] of n) {
|
|
705
|
+
const l = [...s].sort(i), c = l.map(
|
|
706
|
+
(u) => l.some(
|
|
707
|
+
(d) => d !== u && Ne(d.pathGlobs, u.pathGlobs) && !Ne(u.pathGlobs, d.pathGlobs)
|
|
667
708
|
)
|
|
668
|
-
), h =
|
|
709
|
+
), h = l[0];
|
|
669
710
|
o.push({
|
|
670
|
-
agentName:
|
|
711
|
+
agentName: a,
|
|
671
712
|
model: h.model,
|
|
672
713
|
program: h.program,
|
|
673
714
|
repo: h.repo,
|
|
674
|
-
primaries:
|
|
675
|
-
narrower:
|
|
715
|
+
primaries: l.filter((u, d) => !c[d]),
|
|
716
|
+
narrower: l.filter((u, d) => c[d])
|
|
676
717
|
});
|
|
677
718
|
}
|
|
678
|
-
return o.sort((
|
|
679
|
-
const
|
|
680
|
-
return
|
|
719
|
+
return o.sort((a, s) => {
|
|
720
|
+
const l = a.primaries.concat(a.narrower)[0].createdAt;
|
|
721
|
+
return s.primaries.concat(s.narrower)[0].createdAt.localeCompare(l);
|
|
681
722
|
}), o;
|
|
682
723
|
}
|
|
683
|
-
const
|
|
684
|
-
function
|
|
724
|
+
const we = { active: 0, done: 0 };
|
|
725
|
+
function At({
|
|
685
726
|
repos: t,
|
|
686
727
|
counts: n,
|
|
687
|
-
selected:
|
|
728
|
+
selected: i,
|
|
688
729
|
onSelect: o
|
|
689
730
|
}) {
|
|
690
|
-
const [
|
|
691
|
-
if (
|
|
731
|
+
const [a, s] = _(!1), l = P(null);
|
|
732
|
+
if (ae(() => {
|
|
692
733
|
var f;
|
|
693
|
-
if (!
|
|
694
|
-
const d = (f =
|
|
734
|
+
if (!a) return;
|
|
735
|
+
const d = (f = l.current) == null ? void 0 : f.querySelector(".repo-menu");
|
|
695
736
|
if (!d) return;
|
|
696
|
-
const
|
|
697
|
-
|
|
698
|
-
}, [
|
|
699
|
-
const
|
|
700
|
-
const f = d === null ? n.__all__ ??
|
|
737
|
+
const g = d.querySelector('[aria-selected="true"]') ?? d.querySelector("button");
|
|
738
|
+
g == null || g.focus();
|
|
739
|
+
}, [a]), t.length < 2) return null;
|
|
740
|
+
const c = i === null || i === "__all__", h = c ? "All repos" : i, u = (d, g) => {
|
|
741
|
+
const f = d === null ? n.__all__ ?? we : n[d] ?? we, k = d === null ? c : i === d, v = "repo-mi" + (k ? " on" : "") + (d === null ? " all" : "");
|
|
701
742
|
return /* @__PURE__ */ m(
|
|
702
743
|
"button",
|
|
703
744
|
{
|
|
@@ -705,11 +746,11 @@ function _t({
|
|
|
705
746
|
className: v,
|
|
706
747
|
role: "option",
|
|
707
748
|
"aria-selected": k,
|
|
708
|
-
onClick: (
|
|
709
|
-
|
|
749
|
+
onClick: ($) => {
|
|
750
|
+
$.stopPropagation(), s(!1), o(d);
|
|
710
751
|
},
|
|
711
752
|
children: [
|
|
712
|
-
/* @__PURE__ */ r("span", { children:
|
|
753
|
+
/* @__PURE__ */ r("span", { children: g }),
|
|
713
754
|
/* @__PURE__ */ r("span", { className: "ct", children: `${f.active} active · ${f.done} done` })
|
|
714
755
|
]
|
|
715
756
|
},
|
|
@@ -719,10 +760,10 @@ function _t({
|
|
|
719
760
|
return /* @__PURE__ */ m(
|
|
720
761
|
"span",
|
|
721
762
|
{
|
|
722
|
-
ref:
|
|
763
|
+
ref: l,
|
|
723
764
|
className: "repo",
|
|
724
765
|
onKeyDown: (d) => {
|
|
725
|
-
d.key === "Escape" &&
|
|
766
|
+
d.key === "Escape" && s(!1);
|
|
726
767
|
},
|
|
727
768
|
children: [
|
|
728
769
|
/* @__PURE__ */ m(
|
|
@@ -731,10 +772,10 @@ function _t({
|
|
|
731
772
|
type: "button",
|
|
732
773
|
className: "repo-trig",
|
|
733
774
|
"aria-haspopup": "listbox",
|
|
734
|
-
"aria-expanded":
|
|
775
|
+
"aria-expanded": a,
|
|
735
776
|
"aria-label": `Filter by repo (current: ${h})`,
|
|
736
777
|
onClick: (d) => {
|
|
737
|
-
d.stopPropagation(),
|
|
778
|
+
d.stopPropagation(), s((g) => !g);
|
|
738
779
|
},
|
|
739
780
|
children: [
|
|
740
781
|
/* @__PURE__ */ r("span", { className: "slash", children: "/" }),
|
|
@@ -743,7 +784,7 @@ function _t({
|
|
|
743
784
|
]
|
|
744
785
|
}
|
|
745
786
|
),
|
|
746
|
-
|
|
787
|
+
a && /* @__PURE__ */ m("div", { className: "repo-menu", role: "listbox", children: [
|
|
747
788
|
t.map((d) => u(d, d)),
|
|
748
789
|
u(null, "All repos")
|
|
749
790
|
] })
|
|
@@ -751,28 +792,28 @@ function _t({
|
|
|
751
792
|
}
|
|
752
793
|
);
|
|
753
794
|
}
|
|
754
|
-
function
|
|
795
|
+
function Tt({ agents: t, tasks: n, selectedRepo: i }) {
|
|
755
796
|
const o = t.filter(
|
|
756
|
-
(
|
|
757
|
-
),
|
|
758
|
-
for (const
|
|
759
|
-
const
|
|
760
|
-
const u =
|
|
761
|
-
return u !== d ? u ? -1 : 1 :
|
|
797
|
+
(c) => c.presence === "live" && M({ repo: c.repo ?? "" }, i)
|
|
798
|
+
), a = /* @__PURE__ */ new Set();
|
|
799
|
+
for (const c of n) c.status === "active" && a.add(c.agentName);
|
|
800
|
+
const s = (c) => a.has(c.name), l = [...o].sort((c, h) => {
|
|
801
|
+
const u = s(c), d = s(h);
|
|
802
|
+
return u !== d ? u ? -1 : 1 : c.name.localeCompare(h.name);
|
|
762
803
|
});
|
|
763
|
-
return /* @__PURE__ */ r("div", { className: "crew", id: "crew", children:
|
|
804
|
+
return /* @__PURE__ */ r("div", { className: "crew", id: "crew", children: l.map((c) => /* @__PURE__ */ m(
|
|
764
805
|
"div",
|
|
765
806
|
{
|
|
766
|
-
className: "person" + (
|
|
807
|
+
className: "person" + (s(c) ? "" : " person--idle"),
|
|
767
808
|
children: [
|
|
768
|
-
/* @__PURE__ */ r("div", { className: "avatar", style: { background: z(
|
|
769
|
-
/* @__PURE__ */ r("span", { className: "person__name", children:
|
|
809
|
+
/* @__PURE__ */ r("div", { className: "avatar", style: { background: z(c.name) }, children: ie(c.name) }),
|
|
810
|
+
/* @__PURE__ */ r("span", { className: "person__name", children: c.name })
|
|
770
811
|
]
|
|
771
812
|
},
|
|
772
|
-
|
|
813
|
+
c.name
|
|
773
814
|
)) });
|
|
774
815
|
}
|
|
775
|
-
function
|
|
816
|
+
function Ie({ globs: t }) {
|
|
776
817
|
return t.length <= 1 ? /* @__PURE__ */ m("div", { className: "terr", children: [
|
|
777
818
|
/* @__PURE__ */ r("span", { className: "terr__lbl", children: "territory" }),
|
|
778
819
|
t.map((n) => /* @__PURE__ */ r("span", { className: "glob", children: n }, n))
|
|
@@ -787,151 +828,151 @@ function je({ globs: t }) {
|
|
|
787
828
|
/* @__PURE__ */ r("div", { className: "terr terr--full", children: t.map((n) => /* @__PURE__ */ r("span", { className: "glob", children: n }, n)) })
|
|
788
829
|
] });
|
|
789
830
|
}
|
|
790
|
-
const
|
|
791
|
-
function
|
|
831
|
+
const ne = (t) => `${t.agentName}|${t.repo}|${t.createdAt}`, St = (t) => t === null || t === "__all__";
|
|
832
|
+
function se({
|
|
792
833
|
task: t,
|
|
793
834
|
nowMs: n
|
|
794
835
|
}) {
|
|
795
|
-
return /* @__PURE__ */ m(
|
|
836
|
+
return /* @__PURE__ */ m(q, { children: [
|
|
796
837
|
/* @__PURE__ */ r("div", { className: "task__intent", children: t.intent }),
|
|
797
|
-
/* @__PURE__ */ r(
|
|
838
|
+
/* @__PURE__ */ r(Ie, { globs: t.pathGlobs }),
|
|
798
839
|
/* @__PURE__ */ r("div", { className: "task__meta", children: `started ${K(t.createdAt, n)}` })
|
|
799
840
|
] });
|
|
800
841
|
}
|
|
801
|
-
function
|
|
842
|
+
function Ct({
|
|
802
843
|
task: t,
|
|
803
844
|
nowMs: n,
|
|
804
|
-
allRepos:
|
|
845
|
+
allRepos: i
|
|
805
846
|
}) {
|
|
806
847
|
const o = t.model || t.program;
|
|
807
848
|
return /* @__PURE__ */ m("div", { className: "task", children: [
|
|
808
849
|
/* @__PURE__ */ m("div", { className: "task__r1", children: [
|
|
809
850
|
/* @__PURE__ */ r("span", { className: "task__who", children: t.agentName }),
|
|
810
|
-
|
|
851
|
+
i && /* @__PURE__ */ r("span", { className: "task__repo", children: t.repo }),
|
|
811
852
|
o && /* @__PURE__ */ r("span", { className: "task__tag", children: o }),
|
|
812
853
|
/* @__PURE__ */ r("span", { className: "livedot", title: "active" })
|
|
813
854
|
] }),
|
|
814
|
-
/* @__PURE__ */ r(
|
|
855
|
+
/* @__PURE__ */ r(se, { task: t, nowMs: n })
|
|
815
856
|
] });
|
|
816
857
|
}
|
|
817
|
-
function
|
|
858
|
+
function $t({
|
|
818
859
|
group: t,
|
|
819
860
|
nowMs: n,
|
|
820
|
-
allRepos:
|
|
861
|
+
allRepos: i
|
|
821
862
|
}) {
|
|
822
|
-
const o = t.model || t.program,
|
|
863
|
+
const o = t.model || t.program, a = t.primaries.length + t.narrower.length, s = t.narrower.length;
|
|
823
864
|
return /* @__PURE__ */ m("div", { className: "grp", children: [
|
|
824
865
|
/* @__PURE__ */ m("div", { className: "grp__head", children: [
|
|
825
866
|
/* @__PURE__ */ r("span", { className: "grp__who", children: t.agentName }),
|
|
826
|
-
|
|
867
|
+
i && /* @__PURE__ */ r("span", { className: "task__repo", children: t.repo }),
|
|
827
868
|
o && /* @__PURE__ */ r("span", { className: "grp__tag", children: o }),
|
|
828
|
-
/* @__PURE__ */ r("span", { className: "grp__count", children: `· ${
|
|
869
|
+
/* @__PURE__ */ r("span", { className: "grp__count", children: `· ${a} active` }),
|
|
829
870
|
/* @__PURE__ */ r("span", { className: "grp__dot", title: "live" })
|
|
830
871
|
] }),
|
|
831
|
-
/* @__PURE__ */ r("div", { className: "claims", children: t.primaries.map((
|
|
832
|
-
|
|
872
|
+
/* @__PURE__ */ r("div", { className: "claims", children: t.primaries.map((l) => /* @__PURE__ */ r("div", { className: "claim", children: /* @__PURE__ */ r(se, { task: l, nowMs: n }) }, ne(l))) }),
|
|
873
|
+
s > 0 && /* @__PURE__ */ m("details", { className: "fold", children: [
|
|
833
874
|
/* @__PURE__ */ m("summary", { children: [
|
|
834
875
|
/* @__PURE__ */ r("span", { className: "tw", children: "▶" }),
|
|
835
|
-
` +${
|
|
876
|
+
` +${s} narrower claim${s > 1 ? "s" : ""}`
|
|
836
877
|
] }),
|
|
837
|
-
/* @__PURE__ */ r("div", { className: "fold__body", children: t.narrower.map((
|
|
838
|
-
/* @__PURE__ */ r(
|
|
878
|
+
/* @__PURE__ */ r("div", { className: "fold__body", children: t.narrower.map((l) => /* @__PURE__ */ m("div", { className: "claim", children: [
|
|
879
|
+
/* @__PURE__ */ r(se, { task: l, nowMs: n }),
|
|
839
880
|
/* @__PURE__ */ r("div", { className: "covered", children: "⊂ covered by a claim above" })
|
|
840
|
-
] },
|
|
881
|
+
] }, ne(l))) })
|
|
841
882
|
] })
|
|
842
883
|
] });
|
|
843
884
|
}
|
|
844
|
-
function
|
|
885
|
+
function Et({
|
|
845
886
|
tasks: t,
|
|
846
887
|
nowMs: n,
|
|
847
|
-
selectedRepo:
|
|
888
|
+
selectedRepo: i
|
|
848
889
|
}) {
|
|
849
|
-
const o =
|
|
850
|
-
(
|
|
890
|
+
const o = St(i), a = t.filter(
|
|
891
|
+
(s) => s.status === "active" && M(s, i)
|
|
851
892
|
);
|
|
852
|
-
if (
|
|
853
|
-
const
|
|
854
|
-
return /* @__PURE__ */ r("div", { id: "active-list", children: /* @__PURE__ */ r("div", { className: "empty", children:
|
|
893
|
+
if (a.length === 0) {
|
|
894
|
+
const s = o ? "Nothing active right now." : `Nothing active in ${i}.`;
|
|
895
|
+
return /* @__PURE__ */ r("div", { id: "active-list", children: /* @__PURE__ */ r("div", { className: "empty", children: s }) });
|
|
855
896
|
}
|
|
856
|
-
return /* @__PURE__ */ r("div", { id: "active-list", children:
|
|
857
|
-
const
|
|
858
|
-
return
|
|
859
|
-
|
|
897
|
+
return /* @__PURE__ */ r("div", { id: "active-list", children: wt(a).map((s) => {
|
|
898
|
+
const l = s.primaries.length === 1 && s.narrower.length === 0, c = ne(s.primaries.concat(s.narrower)[0]);
|
|
899
|
+
return l ? /* @__PURE__ */ r(
|
|
900
|
+
Ct,
|
|
860
901
|
{
|
|
861
|
-
task:
|
|
902
|
+
task: s.primaries[0],
|
|
862
903
|
nowMs: n,
|
|
863
904
|
allRepos: o
|
|
864
905
|
},
|
|
865
|
-
|
|
866
|
-
) : /* @__PURE__ */ r(
|
|
906
|
+
c
|
|
907
|
+
) : /* @__PURE__ */ r($t, { group: s, nowMs: n, allRepos: o }, c);
|
|
867
908
|
}) });
|
|
868
909
|
}
|
|
869
|
-
const
|
|
870
|
-
function
|
|
910
|
+
const Rt = (t) => `${t.agentName}|${t.repo}|${t.createdAt}`, jt = (t) => t === null || t === "__all__";
|
|
911
|
+
function Dt({
|
|
871
912
|
tasks: t,
|
|
872
913
|
nowMs: n,
|
|
873
|
-
selectedRepo:
|
|
914
|
+
selectedRepo: i,
|
|
874
915
|
doneShown: o,
|
|
875
|
-
onLoadMore:
|
|
916
|
+
onLoadMore: a
|
|
876
917
|
}) {
|
|
877
|
-
const
|
|
878
|
-
(u) => u.status !== "active" &&
|
|
918
|
+
const s = jt(i), l = t.filter(
|
|
919
|
+
(u) => u.status !== "active" && M(u, i)
|
|
879
920
|
);
|
|
880
|
-
if (
|
|
881
|
-
const u =
|
|
921
|
+
if (l.length === 0) {
|
|
922
|
+
const u = s ? "No finished tasks yet." : `No finished tasks in ${i} yet.`;
|
|
882
923
|
return /* @__PURE__ */ r("div", { id: "done-list", children: /* @__PURE__ */ r("div", { className: "empty", children: u }) });
|
|
883
924
|
}
|
|
884
|
-
const
|
|
925
|
+
const c = l.slice(0, o);
|
|
885
926
|
let h = null;
|
|
886
927
|
return /* @__PURE__ */ m("div", { id: "done-list", children: [
|
|
887
|
-
|
|
888
|
-
const d =
|
|
928
|
+
c.map((u) => {
|
|
929
|
+
const d = yt(u.endedAt ?? u.createdAt, n), g = d !== h ? d : null;
|
|
889
930
|
h = d;
|
|
890
|
-
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)}${
|
|
891
|
-
return /* @__PURE__ */ m(
|
|
892
|
-
|
|
931
|
+
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)}${ke(u.createdAt, u.endedAt) ? " · " + ke(u.createdAt, u.endedAt) : ""}`;
|
|
932
|
+
return /* @__PURE__ */ m(Fe, { children: [
|
|
933
|
+
g !== null && /* @__PURE__ */ r("div", { className: "day", children: g }),
|
|
893
934
|
/* @__PURE__ */ m("div", { className: "task", children: [
|
|
894
935
|
/* @__PURE__ */ m("div", { className: "task__r1", children: [
|
|
895
936
|
/* @__PURE__ */ r("span", { className: "task__who", children: u.agentName }),
|
|
896
|
-
|
|
937
|
+
s && /* @__PURE__ */ r("span", { className: "task__repo", children: u.repo }),
|
|
897
938
|
/* @__PURE__ */ r(
|
|
898
939
|
"span",
|
|
899
940
|
{
|
|
900
941
|
className: "task__stat" + (f ? " task__stat--drop" : ""),
|
|
901
|
-
children:
|
|
942
|
+
children: kt(u.status)
|
|
902
943
|
}
|
|
903
944
|
)
|
|
904
945
|
] }),
|
|
905
946
|
/* @__PURE__ */ r("div", { className: "task__intent", children: u.intent }),
|
|
906
|
-
/* @__PURE__ */ r(
|
|
947
|
+
/* @__PURE__ */ r(Ie, { globs: u.pathGlobs }),
|
|
907
948
|
/* @__PURE__ */ r("div", { className: "task__meta", children: k })
|
|
908
949
|
] })
|
|
909
|
-
] },
|
|
950
|
+
] }, Rt(u));
|
|
910
951
|
}),
|
|
911
|
-
|
|
952
|
+
l.length > o && /* @__PURE__ */ r(
|
|
912
953
|
"div",
|
|
913
954
|
{
|
|
914
955
|
className: "more",
|
|
915
956
|
role: "button",
|
|
916
957
|
tabIndex: 0,
|
|
917
|
-
onClick:
|
|
958
|
+
onClick: a,
|
|
918
959
|
onKeyDown: (u) => {
|
|
919
|
-
(u.key === "Enter" || u.key === " ") && (u.preventDefault(),
|
|
960
|
+
(u.key === "Enter" || u.key === " ") && (u.preventDefault(), a());
|
|
920
961
|
},
|
|
921
|
-
children: `Load older · ${o} of ${
|
|
962
|
+
children: `Load older · ${o} of ${l.length}`
|
|
922
963
|
}
|
|
923
964
|
)
|
|
924
965
|
] });
|
|
925
966
|
}
|
|
926
|
-
const
|
|
927
|
-
function
|
|
928
|
-
const o = P(null),
|
|
929
|
-
|
|
930
|
-
const
|
|
931
|
-
return
|
|
932
|
-
|
|
933
|
-
}, [
|
|
934
|
-
const d = "msg" + (
|
|
967
|
+
const It = 80;
|
|
968
|
+
function xt({ announcements: t, selectedRepo: n, nowMs: i }) {
|
|
969
|
+
const o = P(null), a = P(!0), s = o.current;
|
|
970
|
+
s && (a.current = s.scrollHeight - s.scrollTop - s.clientHeight < It);
|
|
971
|
+
const l = [...t].filter((c) => M(c, n)).reverse();
|
|
972
|
+
return Ue(() => {
|
|
973
|
+
a.current && o.current && (o.current.scrollTop = o.current.scrollHeight);
|
|
974
|
+
}, [l.length]), /* @__PURE__ */ r("div", { id: "chat", className: "chat", ref: o, children: l.length === 0 ? /* @__PURE__ */ r("div", { className: "empty", children: "No announcements yet — agents will post here as they coordinate." }) : l.map((c, h) => {
|
|
975
|
+
const d = "msg" + (c.targetAgentName !== null || c.toAdmin ? " msg--targeted" : "") + (c.fromAdmin ? " msg--me" : "");
|
|
935
976
|
return (
|
|
936
977
|
// The feed has no stable id; index is acceptable because the list is
|
|
937
978
|
// append-only oldest->newest and rows are never reordered in place.
|
|
@@ -940,8 +981,8 @@ function jt({ announcements: t, selectedRepo: n, nowMs: c }) {
|
|
|
940
981
|
"div",
|
|
941
982
|
{
|
|
942
983
|
className: "msg__avatar",
|
|
943
|
-
style: { background: z(
|
|
944
|
-
children: ie(
|
|
984
|
+
style: { background: z(c.fromAgentName) },
|
|
985
|
+
children: ie(c.fromAgentName)
|
|
945
986
|
}
|
|
946
987
|
),
|
|
947
988
|
/* @__PURE__ */ m("div", { className: "msg__body", children: [
|
|
@@ -950,82 +991,82 @@ function jt({ announcements: t, selectedRepo: n, nowMs: c }) {
|
|
|
950
991
|
"span",
|
|
951
992
|
{
|
|
952
993
|
className: "msg__who",
|
|
953
|
-
style: { color: z(
|
|
954
|
-
children:
|
|
994
|
+
style: { color: z(c.fromAgentName) },
|
|
995
|
+
children: c.fromAgentName
|
|
955
996
|
}
|
|
956
997
|
),
|
|
957
|
-
|
|
958
|
-
|
|
998
|
+
c.fromHuman ? /* @__PURE__ */ r("span", { className: "msg__human", children: c.fromHuman }) : null,
|
|
999
|
+
c.targetAgentName !== null ? /* @__PURE__ */ r("span", { className: "msg__to", children: `→ @${c.targetAgentName}` }) : c.targetMemberName !== null ? (
|
|
959
1000
|
// An agent addressed a specific workspace member by name;
|
|
960
1001
|
// legacy/collective operator messages fall through to "admin".
|
|
961
|
-
/* @__PURE__ */ r("span", { className: "msg__to", children: `→ @${
|
|
962
|
-
) :
|
|
963
|
-
/* @__PURE__ */ r("span", { className: "msg__time", children: K(
|
|
1002
|
+
/* @__PURE__ */ r("span", { className: "msg__to", children: `→ @${c.targetMemberName}` })
|
|
1003
|
+
) : c.toAdmin ? /* @__PURE__ */ r("span", { className: "msg__to", children: "→ admin" }) : null,
|
|
1004
|
+
/* @__PURE__ */ r("span", { className: "msg__time", children: K(c.createdAt, i) })
|
|
964
1005
|
] }),
|
|
965
|
-
/* @__PURE__ */ r("div", { className: "msg__text", children:
|
|
1006
|
+
/* @__PURE__ */ r("div", { className: "msg__text", children: c.body })
|
|
966
1007
|
] })
|
|
967
1008
|
] }, h)
|
|
968
1009
|
);
|
|
969
1010
|
}) });
|
|
970
1011
|
}
|
|
971
|
-
const
|
|
972
|
-
function
|
|
973
|
-
const
|
|
1012
|
+
const Mt = 8;
|
|
1013
|
+
function Lt({ agents: t, selectedRepo: n, workspaceId: i, onSent: o }) {
|
|
1014
|
+
const a = ce(), s = P(null), [l, c] = _(""), [h, u] = _([]), [d, g] = _(0), [f, k] = _(null), [v, $] = _(!1), [T, A] = _(!1), N = vt(
|
|
974
1015
|
t.map((p) => ({ name: p.name, presence: p.presence, repo: p.repo ?? "" })),
|
|
975
1016
|
n
|
|
976
|
-
),
|
|
1017
|
+
), D = h.length > 0, E = j(() => {
|
|
977
1018
|
u([]), k(null);
|
|
978
|
-
}, []),
|
|
979
|
-
(p,
|
|
980
|
-
const
|
|
981
|
-
if (!
|
|
982
|
-
|
|
1019
|
+
}, []), O = j(
|
|
1020
|
+
(p, y) => {
|
|
1021
|
+
const S = bt(p, y);
|
|
1022
|
+
if (!S) {
|
|
1023
|
+
E();
|
|
983
1024
|
return;
|
|
984
1025
|
}
|
|
985
|
-
const
|
|
986
|
-
u(
|
|
1026
|
+
const L = S.query.toLowerCase(), R = N.filter((Z) => Z.toLowerCase().startsWith(L)).slice(0, Mt);
|
|
1027
|
+
u(R), k({ start: S.start, end: S.end }), g(0);
|
|
987
1028
|
},
|
|
988
|
-
[
|
|
989
|
-
), G =
|
|
1029
|
+
[N, E]
|
|
1030
|
+
), G = j(
|
|
990
1031
|
(p) => {
|
|
991
1032
|
if (!f) return;
|
|
992
|
-
const
|
|
993
|
-
|
|
994
|
-
const
|
|
995
|
-
|
|
1033
|
+
const y = "@" + p + " ", S = l.slice(0, f.start) + y + l.slice(f.end), L = f.start + y.length;
|
|
1034
|
+
c(S), E(), requestAnimationFrame(() => {
|
|
1035
|
+
const R = s.current;
|
|
1036
|
+
R && (R.focus(), R.setSelectionRange(L, L));
|
|
996
1037
|
});
|
|
997
1038
|
},
|
|
998
|
-
[f,
|
|
999
|
-
),
|
|
1039
|
+
[f, l, E]
|
|
1040
|
+
), X = j(
|
|
1000
1041
|
(p) => {
|
|
1001
|
-
var
|
|
1002
|
-
|
|
1003
|
-
const
|
|
1004
|
-
|
|
1042
|
+
var S;
|
|
1043
|
+
c(p);
|
|
1044
|
+
const y = ((S = s.current) == null ? void 0 : S.selectionStart) ?? p.length;
|
|
1045
|
+
O(p, y);
|
|
1005
1046
|
},
|
|
1006
|
-
[
|
|
1007
|
-
),
|
|
1047
|
+
[O]
|
|
1048
|
+
), w = j(
|
|
1008
1049
|
(p) => {
|
|
1009
|
-
|
|
1050
|
+
D && (p.key === "ArrowDown" ? (p.preventDefault(), g((y) => (y + 1) % h.length)) : p.key === "ArrowUp" ? (p.preventDefault(), g((y) => (y - 1 + h.length) % h.length)) : p.key === "Enter" || p.key === "Tab" ? (p.preventDefault(), G(h[d])) : p.key === "Escape" && (p.preventDefault(), E()));
|
|
1010
1051
|
},
|
|
1011
|
-
[
|
|
1012
|
-
),
|
|
1052
|
+
[D, h, d, G, E]
|
|
1053
|
+
), F = j(
|
|
1013
1054
|
async (p) => {
|
|
1014
1055
|
p.preventDefault();
|
|
1015
|
-
const
|
|
1016
|
-
if (!
|
|
1017
|
-
const
|
|
1018
|
-
|
|
1056
|
+
const y = l.trim();
|
|
1057
|
+
if (!y) return;
|
|
1058
|
+
const S = ft(y, N), L = n === null || n === "__all__" ? null : n;
|
|
1059
|
+
$(!0), A(!1);
|
|
1019
1060
|
try {
|
|
1020
|
-
const
|
|
1021
|
-
await (
|
|
1061
|
+
const R = { body: y, targetAgentName: S, repo: L };
|
|
1062
|
+
await (i !== void 0 ? a.announceTo(i, R) : a.announce(R)), c(""), E(), await o();
|
|
1022
1063
|
} catch {
|
|
1023
|
-
|
|
1064
|
+
A(!0);
|
|
1024
1065
|
} finally {
|
|
1025
|
-
|
|
1066
|
+
$(!1);
|
|
1026
1067
|
}
|
|
1027
1068
|
},
|
|
1028
|
-
[
|
|
1069
|
+
[l, N, n, i, a, E, o]
|
|
1029
1070
|
);
|
|
1030
1071
|
return /* @__PURE__ */ m("div", { className: "composer", children: [
|
|
1031
1072
|
/* @__PURE__ */ r(
|
|
@@ -1035,17 +1076,17 @@ function It({ agents: t, selectedRepo: n, workspaceId: c, onSent: o }) {
|
|
|
1035
1076
|
className: "mention-pop",
|
|
1036
1077
|
role: "listbox",
|
|
1037
1078
|
"aria-label": "Agents to mention",
|
|
1038
|
-
hidden: !
|
|
1039
|
-
children: h.map((p,
|
|
1079
|
+
hidden: !D,
|
|
1080
|
+
children: h.map((p, y) => /* @__PURE__ */ m(
|
|
1040
1081
|
"button",
|
|
1041
1082
|
{
|
|
1042
|
-
id: `mention-opt-${
|
|
1083
|
+
id: `mention-opt-${y}`,
|
|
1043
1084
|
type: "button",
|
|
1044
1085
|
role: "option",
|
|
1045
|
-
"aria-selected":
|
|
1046
|
-
className: "mention-mi" + (
|
|
1047
|
-
onMouseDown: (
|
|
1048
|
-
|
|
1086
|
+
"aria-selected": y === d,
|
|
1087
|
+
className: "mention-mi" + (y === d ? " on" : ""),
|
|
1088
|
+
onMouseDown: (S) => {
|
|
1089
|
+
S.preventDefault(), G(p);
|
|
1049
1090
|
},
|
|
1050
1091
|
children: [
|
|
1051
1092
|
/* @__PURE__ */ r("div", { className: "ma", style: { background: z(p) }, children: ie(p) }),
|
|
@@ -1062,7 +1103,7 @@ function It({ agents: t, selectedRepo: n, workspaceId: c, onSent: o }) {
|
|
|
1062
1103
|
id: "chat-form",
|
|
1063
1104
|
className: "chat-form",
|
|
1064
1105
|
onSubmit: (p) => {
|
|
1065
|
-
|
|
1106
|
+
F(p);
|
|
1066
1107
|
},
|
|
1067
1108
|
children: [
|
|
1068
1109
|
/* @__PURE__ */ r(
|
|
@@ -1075,57 +1116,57 @@ function It({ agents: t, selectedRepo: n, workspaceId: c, onSent: o }) {
|
|
|
1075
1116
|
"aria-label": "Message the team",
|
|
1076
1117
|
placeholder: "Message the team… use @name to direct it",
|
|
1077
1118
|
role: "combobox",
|
|
1078
|
-
"aria-expanded":
|
|
1119
|
+
"aria-expanded": D,
|
|
1079
1120
|
"aria-controls": "mention-pop",
|
|
1080
1121
|
"aria-autocomplete": "list",
|
|
1081
|
-
"aria-activedescendant":
|
|
1082
|
-
ref:
|
|
1083
|
-
value:
|
|
1084
|
-
onChange: (p) =>
|
|
1085
|
-
onKeyDown:
|
|
1122
|
+
"aria-activedescendant": D ? `mention-opt-${d}` : void 0,
|
|
1123
|
+
ref: s,
|
|
1124
|
+
value: l,
|
|
1125
|
+
onChange: (p) => X(p.target.value),
|
|
1126
|
+
onKeyDown: w
|
|
1086
1127
|
}
|
|
1087
1128
|
),
|
|
1088
1129
|
/* @__PURE__ */ r("button", { id: "chat-send", className: "chat-send", type: "submit", disabled: v, children: "Send" })
|
|
1089
1130
|
]
|
|
1090
1131
|
}
|
|
1091
1132
|
),
|
|
1092
|
-
|
|
1133
|
+
T ? /* @__PURE__ */ r("div", { className: "chat__note", role: "status", children: "send failed — retry" }) : null
|
|
1093
1134
|
] });
|
|
1094
1135
|
}
|
|
1095
|
-
function
|
|
1136
|
+
function Ae({
|
|
1096
1137
|
title: t = "No workspace yet",
|
|
1097
1138
|
children: n,
|
|
1098
|
-
onGetStarted:
|
|
1139
|
+
onGetStarted: i,
|
|
1099
1140
|
ctaLabel: o = "Go to Config"
|
|
1100
1141
|
}) {
|
|
1101
|
-
const
|
|
1102
|
-
return /* @__PURE__ */ m("section", { className: "shepherd-empty-state", "aria-labelledby":
|
|
1103
|
-
/* @__PURE__ */ r("h2", { id:
|
|
1142
|
+
const a = Ce();
|
|
1143
|
+
return /* @__PURE__ */ m("section", { className: "shepherd-empty-state", "aria-labelledby": a, children: [
|
|
1144
|
+
/* @__PURE__ */ r("h2", { id: a, children: t }),
|
|
1104
1145
|
/* @__PURE__ */ r("p", { children: n ?? "Create a workspace or join one with an invite code to get started." }),
|
|
1105
|
-
|
|
1146
|
+
i && /* @__PURE__ */ r("button", { type: "button", onClick: i, children: o })
|
|
1106
1147
|
] });
|
|
1107
1148
|
}
|
|
1108
|
-
const
|
|
1149
|
+
const Pt = [
|
|
1109
1150
|
{ id: "bug", label: "Bug" },
|
|
1110
1151
|
{ id: "suggestion", label: "Suggestion" },
|
|
1111
1152
|
{ id: "other", label: "Other" }
|
|
1112
|
-
],
|
|
1113
|
-
function
|
|
1114
|
-
const n =
|
|
1115
|
-
function A() {
|
|
1116
|
-
s((y) => !y);
|
|
1117
|
-
}
|
|
1153
|
+
], Ot = 1500;
|
|
1154
|
+
function Wt({ workspaceId: t }) {
|
|
1155
|
+
const n = ce(), i = Ce(), [o, a] = _(!1), [s, l] = _("bug"), [c, h] = _(""), [u, d] = _(!1), [g, f] = _(null), [k, v] = _(!1);
|
|
1118
1156
|
function $() {
|
|
1119
|
-
|
|
1157
|
+
a((N) => !N);
|
|
1158
|
+
}
|
|
1159
|
+
function T() {
|
|
1160
|
+
l("bug"), h(""), f(null), v(!1);
|
|
1120
1161
|
}
|
|
1121
|
-
async function
|
|
1162
|
+
async function A() {
|
|
1122
1163
|
d(!0), f(null);
|
|
1123
1164
|
try {
|
|
1124
|
-
await n.submitFeedback({ type:
|
|
1125
|
-
|
|
1126
|
-
},
|
|
1127
|
-
} catch (
|
|
1128
|
-
f(
|
|
1165
|
+
await n.submitFeedback({ type: s, body: c.trim() }, t), v(!0), h(""), setTimeout(() => {
|
|
1166
|
+
a(!1), T();
|
|
1167
|
+
}, Ot);
|
|
1168
|
+
} catch (N) {
|
|
1169
|
+
f(ut(N));
|
|
1129
1170
|
} finally {
|
|
1130
1171
|
d(!1);
|
|
1131
1172
|
}
|
|
@@ -1136,7 +1177,7 @@ function Lt({ workspaceId: t }) {
|
|
|
1136
1177
|
{
|
|
1137
1178
|
type: "button",
|
|
1138
1179
|
className: "shepherd-feedback__trigger",
|
|
1139
|
-
onClick:
|
|
1180
|
+
onClick: $,
|
|
1140
1181
|
"aria-expanded": o,
|
|
1141
1182
|
children: "Feedback"
|
|
1142
1183
|
}
|
|
@@ -1145,36 +1186,36 @@ function Lt({ workspaceId: t }) {
|
|
|
1145
1186
|
"section",
|
|
1146
1187
|
{
|
|
1147
1188
|
className: "shepherd-feedback__panel",
|
|
1148
|
-
"aria-labelledby":
|
|
1189
|
+
"aria-labelledby": i,
|
|
1149
1190
|
children: [
|
|
1150
|
-
/* @__PURE__ */ r("h3", { id:
|
|
1151
|
-
k ? /* @__PURE__ */ r("p", { role: "status", children: "Thanks! Your feedback was sent." }) : /* @__PURE__ */ m(
|
|
1152
|
-
/* @__PURE__ */ r("div", { className: "shepherd-feedback__types", children:
|
|
1191
|
+
/* @__PURE__ */ r("h3", { id: i, children: "Give feedback" }),
|
|
1192
|
+
k ? /* @__PURE__ */ r("p", { role: "status", children: "Thanks! Your feedback was sent." }) : /* @__PURE__ */ m(q, { children: [
|
|
1193
|
+
/* @__PURE__ */ r("div", { className: "shepherd-feedback__types", children: Pt.map((N) => /* @__PURE__ */ r(
|
|
1153
1194
|
"button",
|
|
1154
1195
|
{
|
|
1155
1196
|
type: "button",
|
|
1156
|
-
"aria-pressed":
|
|
1157
|
-
onClick: () =>
|
|
1158
|
-
children:
|
|
1197
|
+
"aria-pressed": s === N.id,
|
|
1198
|
+
onClick: () => l(N.id),
|
|
1199
|
+
children: N.label
|
|
1159
1200
|
},
|
|
1160
|
-
|
|
1201
|
+
N.id
|
|
1161
1202
|
)) }),
|
|
1162
1203
|
/* @__PURE__ */ r(
|
|
1163
1204
|
"textarea",
|
|
1164
1205
|
{
|
|
1165
1206
|
"aria-label": "Feedback",
|
|
1166
1207
|
placeholder: "What's on your mind?",
|
|
1167
|
-
value:
|
|
1168
|
-
onChange: (
|
|
1208
|
+
value: c,
|
|
1209
|
+
onChange: (N) => h(N.target.value)
|
|
1169
1210
|
}
|
|
1170
1211
|
),
|
|
1171
|
-
|
|
1212
|
+
g && /* @__PURE__ */ r("p", { role: "alert", children: g }),
|
|
1172
1213
|
/* @__PURE__ */ r(
|
|
1173
1214
|
"button",
|
|
1174
1215
|
{
|
|
1175
1216
|
type: "button",
|
|
1176
|
-
onClick: () => void
|
|
1177
|
-
disabled:
|
|
1217
|
+
onClick: () => void A(),
|
|
1218
|
+
disabled: c.trim() === "" || u,
|
|
1178
1219
|
children: "Submit"
|
|
1179
1220
|
}
|
|
1180
1221
|
)
|
|
@@ -1184,7 +1225,7 @@ function Lt({ workspaceId: t }) {
|
|
|
1184
1225
|
)
|
|
1185
1226
|
] });
|
|
1186
1227
|
}
|
|
1187
|
-
const
|
|
1228
|
+
const Te = "shepherd.tab", Q = "shepherd.repo", ee = 10, Gt = {
|
|
1188
1229
|
live: { text: "live", kind: "ok" },
|
|
1189
1230
|
reconnecting: { text: "reconnecting…", kind: "warn" },
|
|
1190
1231
|
// app.js cleared the token and re-prompted on 401; in the auth-agnostic port
|
|
@@ -1192,163 +1233,165 @@ const we = "shepherd.tab", J = "shepherd.repo", Q = 10, Pt = {
|
|
|
1192
1233
|
// only surfaces the rejected state.
|
|
1193
1234
|
unauthorized: { text: "token rejected", kind: "error" }
|
|
1194
1235
|
};
|
|
1195
|
-
function
|
|
1236
|
+
function Se(t) {
|
|
1196
1237
|
try {
|
|
1197
1238
|
return localStorage.getItem(t);
|
|
1198
1239
|
} catch {
|
|
1199
1240
|
return null;
|
|
1200
1241
|
}
|
|
1201
1242
|
}
|
|
1202
|
-
function
|
|
1243
|
+
function te(t, n) {
|
|
1203
1244
|
try {
|
|
1204
1245
|
localStorage.setItem(t, n);
|
|
1205
1246
|
} catch {
|
|
1206
1247
|
}
|
|
1207
1248
|
}
|
|
1208
|
-
function
|
|
1209
|
-
const o =
|
|
1210
|
-
let
|
|
1211
|
-
if (
|
|
1212
|
-
const
|
|
1213
|
-
(
|
|
1214
|
-
),
|
|
1215
|
-
!
|
|
1249
|
+
function Ft(t, n, i) {
|
|
1250
|
+
const o = De(n.tasks);
|
|
1251
|
+
let a = t;
|
|
1252
|
+
if (a === null && o.length >= 2 && (a = ve(n.tasks)), a !== null && a !== "__all__" && !o.includes(a) && (a = "__all__"), i && a !== null && a !== "__all__") {
|
|
1253
|
+
const s = n.tasks.some(
|
|
1254
|
+
(c) => c.status === "active" && c.repo === a
|
|
1255
|
+
), l = n.tasks.some((c) => c.status === "active");
|
|
1256
|
+
!s && l && (a = ve(n.tasks));
|
|
1216
1257
|
}
|
|
1217
|
-
return
|
|
1258
|
+
return a;
|
|
1218
1259
|
}
|
|
1219
|
-
function
|
|
1220
|
-
const n = {},
|
|
1221
|
-
const
|
|
1222
|
-
a
|
|
1260
|
+
function Ut(t) {
|
|
1261
|
+
const n = {}, i = (o, a) => {
|
|
1262
|
+
const s = n[o] ?? (n[o] = { active: 0, done: 0 });
|
|
1263
|
+
s[a]++;
|
|
1223
1264
|
};
|
|
1224
1265
|
for (const o of t.tasks) {
|
|
1225
|
-
const
|
|
1226
|
-
|
|
1266
|
+
const a = o.status === "active" ? "active" : "done";
|
|
1267
|
+
i(o.repo, a), i("__all__", a);
|
|
1227
1268
|
}
|
|
1228
1269
|
return n;
|
|
1229
1270
|
}
|
|
1230
|
-
function
|
|
1271
|
+
function Vt({
|
|
1231
1272
|
workspaceId: t,
|
|
1232
1273
|
config: n,
|
|
1233
|
-
switcher:
|
|
1234
|
-
hasWorkspace: o
|
|
1274
|
+
switcher: i,
|
|
1275
|
+
hasWorkspace: o,
|
|
1276
|
+
onLogout: a
|
|
1235
1277
|
} = {}) {
|
|
1236
|
-
const s = n != null,
|
|
1278
|
+
const s = n != null, l = o === !1, { snapshot: c, status: h, lastUpdatedMs: u, refresh: d } = gt({
|
|
1237
1279
|
workspaceId: t,
|
|
1238
1280
|
// A no-workspace board has nothing to poll; keep it off the hub.
|
|
1239
|
-
enabled: !
|
|
1240
|
-
}), [
|
|
1241
|
-
if (s &&
|
|
1242
|
-
const
|
|
1243
|
-
return
|
|
1244
|
-
}),
|
|
1281
|
+
enabled: !l
|
|
1282
|
+
}), [g, f] = _(() => {
|
|
1283
|
+
if (s && l) return "config";
|
|
1284
|
+
const b = Se(Te);
|
|
1285
|
+
return b === "chat" ? "chat" : b === "config" && s ? "config" : "tasks";
|
|
1286
|
+
}), k = s ? [
|
|
1245
1287
|
{ id: "tasks", label: "Tasks" },
|
|
1246
1288
|
{ id: "chat", label: "Chat" },
|
|
1247
1289
|
{ id: "config", label: "Config" }
|
|
1248
1290
|
] : [
|
|
1249
1291
|
{ id: "tasks", label: "Tasks" },
|
|
1250
1292
|
{ id: "chat", label: "Chat" }
|
|
1251
|
-
],
|
|
1252
|
-
(
|
|
1253
|
-
var
|
|
1254
|
-
const
|
|
1255
|
-
let
|
|
1256
|
-
switch (
|
|
1293
|
+
], v = P([]), $ = j(
|
|
1294
|
+
(b, x) => {
|
|
1295
|
+
var me;
|
|
1296
|
+
const W = k.length - 1;
|
|
1297
|
+
let I = null;
|
|
1298
|
+
switch (b.key) {
|
|
1257
1299
|
case "ArrowRight":
|
|
1258
|
-
|
|
1300
|
+
I = x === W ? 0 : x + 1;
|
|
1259
1301
|
break;
|
|
1260
1302
|
case "ArrowLeft":
|
|
1261
|
-
|
|
1303
|
+
I = x === 0 ? W : x - 1;
|
|
1262
1304
|
break;
|
|
1263
1305
|
case "Home":
|
|
1264
|
-
|
|
1306
|
+
I = 0;
|
|
1265
1307
|
break;
|
|
1266
1308
|
case "End":
|
|
1267
|
-
|
|
1309
|
+
I = W;
|
|
1268
1310
|
break;
|
|
1269
1311
|
default:
|
|
1270
1312
|
return;
|
|
1271
1313
|
}
|
|
1272
|
-
|
|
1273
|
-
const
|
|
1274
|
-
|
|
1314
|
+
b.preventDefault();
|
|
1315
|
+
const ue = k[I];
|
|
1316
|
+
ue && (O(ue.id), (me = v.current[I]) == null || me.focus());
|
|
1275
1317
|
},
|
|
1276
1318
|
// `tabs` is rebuilt each render but its identity only matters by length,
|
|
1277
1319
|
// which is stable for a given `hasConfig`; `onTab` is stable.
|
|
1278
1320
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1279
1321
|
[s]
|
|
1280
|
-
), [
|
|
1281
|
-
() =>
|
|
1282
|
-
), [
|
|
1283
|
-
b
|
|
1284
|
-
}, []),
|
|
1285
|
-
const
|
|
1286
|
-
|
|
1287
|
-
}, []),
|
|
1288
|
-
|
|
1289
|
-
}, []), w =
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
}, [
|
|
1293
|
-
const F =
|
|
1294
|
-
(
|
|
1295
|
-
).length : 0,
|
|
1296
|
-
(
|
|
1297
|
-
).length,
|
|
1298
|
-
(
|
|
1299
|
-
).length,
|
|
1322
|
+
), [T, A] = _(
|
|
1323
|
+
() => Se(Q)
|
|
1324
|
+
), [N, D] = _(ee), E = P(!0), O = j((b) => {
|
|
1325
|
+
f(b), te(Te, b);
|
|
1326
|
+
}, []), G = j((b) => {
|
|
1327
|
+
const x = b === null ? "__all__" : b;
|
|
1328
|
+
A(x), te(Q, x), D(ee);
|
|
1329
|
+
}, []), X = j(() => {
|
|
1330
|
+
D((b) => b + ee);
|
|
1331
|
+
}, []), w = c ? Ft(T, c, E.current) : T;
|
|
1332
|
+
ae(() => {
|
|
1333
|
+
c && (E.current = !1, w !== T && (A(w), w !== null && w !== "__all__" && te(Q, w)));
|
|
1334
|
+
}, [c, w, T]);
|
|
1335
|
+
const F = c ? Date.parse(c.serverTime) : Date.now(), p = c ? De(c.tasks) : [], y = c ? Ut(c) : {}, S = c ? c.agents.filter(
|
|
1336
|
+
(b) => b.presence === "live" && M({ repo: b.repo ?? "" }, w)
|
|
1337
|
+
).length : 0, L = c ? c.tasks.filter((b) => b.status === "active" && M(b, w)).length : 0, R = Gt[h], Z = u === null ? "" : `updated ${Math.floor((Date.now() - u) / 1e3)}s ago`, le = (c == null ? void 0 : c.agents) ?? [], U = (c == null ? void 0 : c.tasks) ?? [], xe = (c == null ? void 0 : c.announcements) ?? [], Me = U.filter(
|
|
1338
|
+
(b) => b.status === "active" && M(b, w)
|
|
1339
|
+
).length, Le = U.filter(
|
|
1340
|
+
(b) => b.status !== "active" && M(b, w)
|
|
1341
|
+
).length, de = !l && g !== "config";
|
|
1300
1342
|
return /* @__PURE__ */ m("div", { id: "board", children: [
|
|
1301
1343
|
/* @__PURE__ */ m("header", { children: [
|
|
1302
1344
|
/* @__PURE__ */ r("h1", { className: "brand", style: { margin: 0, font: "inherit" }, children: "Shepherd" }),
|
|
1303
|
-
|
|
1304
|
-
|
|
1345
|
+
i,
|
|
1346
|
+
de && /* @__PURE__ */ m(q, { children: [
|
|
1305
1347
|
/* @__PURE__ */ r(
|
|
1306
|
-
|
|
1348
|
+
At,
|
|
1307
1349
|
{
|
|
1308
|
-
repos:
|
|
1309
|
-
counts:
|
|
1350
|
+
repos: p,
|
|
1351
|
+
counts: y,
|
|
1310
1352
|
selected: w,
|
|
1311
|
-
onSelect:
|
|
1353
|
+
onSelect: G
|
|
1312
1354
|
}
|
|
1313
1355
|
),
|
|
1314
1356
|
/* @__PURE__ */ m("span", { className: "vitals", children: [
|
|
1315
|
-
/* @__PURE__ */ r("b", { id: "vitals-online", children:
|
|
1357
|
+
/* @__PURE__ */ r("b", { id: "vitals-online", children: S }),
|
|
1316
1358
|
" online · ",
|
|
1317
|
-
/* @__PURE__ */ r("b", { id: "vitals-active", children:
|
|
1359
|
+
/* @__PURE__ */ r("b", { id: "vitals-active", children: L }),
|
|
1318
1360
|
" active"
|
|
1319
1361
|
] })
|
|
1320
1362
|
] }),
|
|
1321
1363
|
/* @__PURE__ */ r("span", { className: "grow" }),
|
|
1322
|
-
|
|
1364
|
+
de && /* @__PURE__ */ m(q, { children: [
|
|
1323
1365
|
/* @__PURE__ */ r(
|
|
1324
1366
|
"span",
|
|
1325
1367
|
{
|
|
1326
1368
|
id: "status",
|
|
1327
|
-
className: "status" + (
|
|
1328
|
-
children:
|
|
1369
|
+
className: "status" + (R.kind ? ` status--${R.kind}` : ""),
|
|
1370
|
+
children: R.text
|
|
1329
1371
|
}
|
|
1330
1372
|
),
|
|
1331
|
-
/* @__PURE__ */ r("span", { id: "freshness", className: "freshness", children:
|
|
1373
|
+
/* @__PURE__ */ r("span", { id: "freshness", className: "freshness", children: Z })
|
|
1332
1374
|
] }),
|
|
1333
|
-
/* @__PURE__ */ r("
|
|
1375
|
+
a && /* @__PURE__ */ r("button", { type: "button", className: "header-signout", onClick: a, children: "Sign out" }),
|
|
1376
|
+
/* @__PURE__ */ r("nav", { className: "tabs", role: "tablist", "aria-label": "Shepherd views", children: k.map(({ id: b, label: x }, W) => /* @__PURE__ */ r(
|
|
1334
1377
|
"button",
|
|
1335
1378
|
{
|
|
1336
|
-
ref: (
|
|
1337
|
-
|
|
1379
|
+
ref: (I) => {
|
|
1380
|
+
v.current[W] = I;
|
|
1338
1381
|
},
|
|
1339
|
-
className: "tab" + (
|
|
1340
|
-
"data-tab":
|
|
1382
|
+
className: "tab" + (g === b ? " tab--active" : ""),
|
|
1383
|
+
"data-tab": b,
|
|
1341
1384
|
type: "button",
|
|
1342
1385
|
role: "tab",
|
|
1343
|
-
id: `tab-${
|
|
1344
|
-
"aria-controls": `panel-${
|
|
1345
|
-
"aria-selected":
|
|
1346
|
-
tabIndex:
|
|
1347
|
-
onClick: () =>
|
|
1348
|
-
onKeyDown: (
|
|
1349
|
-
children:
|
|
1386
|
+
id: `tab-${b}`,
|
|
1387
|
+
"aria-controls": `panel-${b}`,
|
|
1388
|
+
"aria-selected": g === b,
|
|
1389
|
+
tabIndex: g === b ? 0 : -1,
|
|
1390
|
+
onClick: () => O(b),
|
|
1391
|
+
onKeyDown: (I) => $(I, W),
|
|
1392
|
+
children: x
|
|
1350
1393
|
},
|
|
1351
|
-
|
|
1394
|
+
b
|
|
1352
1395
|
)) })
|
|
1353
1396
|
] }),
|
|
1354
1397
|
/* @__PURE__ */ r(
|
|
@@ -1357,31 +1400,31 @@ function Kt({
|
|
|
1357
1400
|
id: "panel-tasks",
|
|
1358
1401
|
role: "tabpanel",
|
|
1359
1402
|
"aria-labelledby": "tab-tasks",
|
|
1360
|
-
hidden:
|
|
1361
|
-
children:
|
|
1362
|
-
/* @__PURE__ */ r(
|
|
1403
|
+
hidden: g !== "tasks",
|
|
1404
|
+
children: l ? /* @__PURE__ */ r(Ae, { onGetStarted: () => O("config") }) : /* @__PURE__ */ m(q, { children: [
|
|
1405
|
+
/* @__PURE__ */ r(Tt, { agents: le, tasks: U, selectedRepo: w }),
|
|
1363
1406
|
/* @__PURE__ */ m("div", { className: "board", children: [
|
|
1364
1407
|
/* @__PURE__ */ m("div", { className: "col", children: [
|
|
1365
1408
|
/* @__PURE__ */ m("div", { className: "colhead", children: [
|
|
1366
1409
|
/* @__PURE__ */ r("h2", { children: "Active" }),
|
|
1367
|
-
/* @__PURE__ */ r("span", { className: "n", id: "active-count", children:
|
|
1410
|
+
/* @__PURE__ */ r("span", { className: "n", id: "active-count", children: Me })
|
|
1368
1411
|
] }),
|
|
1369
|
-
/* @__PURE__ */ r(
|
|
1412
|
+
/* @__PURE__ */ r(Et, { tasks: U, nowMs: F, selectedRepo: w })
|
|
1370
1413
|
] }),
|
|
1371
1414
|
/* @__PURE__ */ r("div", { className: "board__rule" }),
|
|
1372
1415
|
/* @__PURE__ */ m("div", { className: "col", children: [
|
|
1373
1416
|
/* @__PURE__ */ m("div", { className: "colhead", children: [
|
|
1374
1417
|
/* @__PURE__ */ r("h2", { children: "Done" }),
|
|
1375
|
-
/* @__PURE__ */ r("span", { className: "n", id: "done-count", children:
|
|
1418
|
+
/* @__PURE__ */ r("span", { className: "n", id: "done-count", children: Le })
|
|
1376
1419
|
] }),
|
|
1377
1420
|
/* @__PURE__ */ r(
|
|
1378
|
-
|
|
1421
|
+
Dt,
|
|
1379
1422
|
{
|
|
1380
|
-
tasks:
|
|
1423
|
+
tasks: U,
|
|
1381
1424
|
nowMs: F,
|
|
1382
1425
|
selectedRepo: w,
|
|
1383
|
-
doneShown:
|
|
1384
|
-
onLoadMore:
|
|
1426
|
+
doneShown: N,
|
|
1427
|
+
onLoadMore: X
|
|
1385
1428
|
}
|
|
1386
1429
|
)
|
|
1387
1430
|
] })
|
|
@@ -1395,16 +1438,16 @@ function Kt({
|
|
|
1395
1438
|
id: "panel-chat",
|
|
1396
1439
|
role: "tabpanel",
|
|
1397
1440
|
"aria-labelledby": "tab-chat",
|
|
1398
|
-
hidden:
|
|
1399
|
-
children:
|
|
1400
|
-
/* @__PURE__ */ r(
|
|
1441
|
+
hidden: g !== "chat",
|
|
1442
|
+
children: l ? /* @__PURE__ */ r(Ae, { onGetStarted: () => O("config") }) : /* @__PURE__ */ m("div", { className: "chat-wrap", children: [
|
|
1443
|
+
/* @__PURE__ */ r(xt, { announcements: xe, selectedRepo: w, nowMs: F }),
|
|
1401
1444
|
/* @__PURE__ */ r(
|
|
1402
|
-
|
|
1445
|
+
Lt,
|
|
1403
1446
|
{
|
|
1404
|
-
agents:
|
|
1447
|
+
agents: le,
|
|
1405
1448
|
selectedRepo: w,
|
|
1406
1449
|
workspaceId: t,
|
|
1407
|
-
onSent:
|
|
1450
|
+
onSent: d
|
|
1408
1451
|
}
|
|
1409
1452
|
)
|
|
1410
1453
|
] })
|
|
@@ -1416,20 +1459,20 @@ function Kt({
|
|
|
1416
1459
|
id: "panel-config",
|
|
1417
1460
|
role: "tabpanel",
|
|
1418
1461
|
"aria-labelledby": "tab-config",
|
|
1419
|
-
hidden:
|
|
1462
|
+
hidden: g !== "config",
|
|
1420
1463
|
children: n
|
|
1421
1464
|
}
|
|
1422
1465
|
),
|
|
1423
|
-
/* @__PURE__ */ r(
|
|
1466
|
+
/* @__PURE__ */ r(Wt, { workspaceId: t })
|
|
1424
1467
|
] });
|
|
1425
1468
|
}
|
|
1426
1469
|
export {
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1470
|
+
Vt as D,
|
|
1471
|
+
Ae as E,
|
|
1472
|
+
H as S,
|
|
1473
|
+
Yt as a,
|
|
1474
|
+
zt as c,
|
|
1475
|
+
ut as d,
|
|
1433
1476
|
K as f,
|
|
1434
|
-
|
|
1477
|
+
ce as u
|
|
1435
1478
|
};
|