@yankeguo/dsh-client-ui-devlead 0.2.6 → 0.3.0-rc.2
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/lib/client.js +107 -44
- package/package.json +3 -2
package/lib/client.js
CHANGED
|
@@ -39,7 +39,13 @@ window.__ModuleLoader__.load({
|
|
|
39
39
|
var DEVLEAD_WATCH_PROJECTION_KEY = "devLeadWatch";
|
|
40
40
|
var DEVLEAD_COMMAND_NAME = "devlead";
|
|
41
41
|
var DEVLEAD_ERROR_EXCERPT_MAX = 240;
|
|
42
|
-
var DEVLEAD_REPORT_KINDS = [
|
|
42
|
+
var DEVLEAD_REPORT_KINDS = [
|
|
43
|
+
"progress",
|
|
44
|
+
"blocked",
|
|
45
|
+
"decision",
|
|
46
|
+
"question",
|
|
47
|
+
"fyi"
|
|
48
|
+
];
|
|
43
49
|
|
|
44
50
|
// packages/protocol/src/format.ts
|
|
45
51
|
var DEVLEAD_TRANSITIONS = [
|
|
@@ -56,7 +62,7 @@ window.__ModuleLoader__.load({
|
|
|
56
62
|
return typeof value === "string" && TRANSITION_SET.has(value);
|
|
57
63
|
}
|
|
58
64
|
function excerptLine(text, max) {
|
|
59
|
-
const collapsed = text.replace(/\s+/gu, " ").trim();
|
|
65
|
+
const collapsed = text.replace(/\s+/gu, " ").replace(/[\u0000-\u001f\u007f-\u009f]/gu, "").trim();
|
|
60
66
|
if (collapsed.length === 0) return void 0;
|
|
61
67
|
const budget = Number.isFinite(max) ? Math.floor(max) : Number.POSITIVE_INFINITY;
|
|
62
68
|
if (budget < 1) return void 0;
|
|
@@ -77,12 +83,15 @@ window.__ModuleLoader__.load({
|
|
|
77
83
|
return TRANSITION_LABELS[transition];
|
|
78
84
|
}
|
|
79
85
|
function presentLine(value) {
|
|
80
|
-
if (value
|
|
86
|
+
if (typeof value !== "string") return void 0;
|
|
81
87
|
return excerptLine(value, DEVLEAD_ERROR_EXCERPT_MAX);
|
|
82
88
|
}
|
|
89
|
+
function sessionRefLabel(sessionId, title) {
|
|
90
|
+
const line = presentLine(title);
|
|
91
|
+
return line === void 0 ? sessionId : `${line} (${sessionId})`;
|
|
92
|
+
}
|
|
83
93
|
function notificationLine(notification) {
|
|
84
|
-
const
|
|
85
|
-
const who = title === void 0 ? notification.sessionId : `${title} (${notification.sessionId})`;
|
|
94
|
+
const who = sessionRefLabel(notification.sessionId, notification.sessionTitle);
|
|
86
95
|
const error = presentLine(notification.error);
|
|
87
96
|
const detail = error ?? presentLine(notification.summary);
|
|
88
97
|
const suffix = detail === void 0 ? "" : `: ${detail}`;
|
|
@@ -92,17 +101,18 @@ window.__ModuleLoader__.load({
|
|
|
92
101
|
progress: "progress",
|
|
93
102
|
blocked: "blocked",
|
|
94
103
|
decision: "decision needed",
|
|
104
|
+
question: "question",
|
|
95
105
|
fyi: "fyi"
|
|
96
106
|
};
|
|
97
107
|
function isDevLeadReportKind(value) {
|
|
98
108
|
return typeof value === "string" && DEVLEAD_REPORT_KINDS.includes(value);
|
|
99
109
|
}
|
|
100
110
|
function reportLine(report) {
|
|
101
|
-
const
|
|
102
|
-
const
|
|
103
|
-
const detail = presentLine(report.summary) ?? excerptLine(report.message, DEVLEAD_ERROR_EXCERPT_MAX);
|
|
111
|
+
const who = sessionRefLabel(report.senderSessionId, report.senderSessionTitle);
|
|
112
|
+
const detail = presentLine(report.summary) ?? presentLine(report.message);
|
|
104
113
|
const suffix = detail === void 0 ? "" : `: ${detail}`;
|
|
105
|
-
|
|
114
|
+
const kind = REPORT_KIND_LABELS[report.kind] ?? String(report.kind);
|
|
115
|
+
return `${who} \u2014 report ${kind}${suffix}`;
|
|
106
116
|
}
|
|
107
117
|
|
|
108
118
|
// packages/client-ui/src/client/format.ts
|
|
@@ -124,19 +134,23 @@ window.__ModuleLoader__.load({
|
|
|
124
134
|
const turn = Number.isInteger(notification.turn) && notification.turn > 0 ? notification.turn : 0;
|
|
125
135
|
const tooltip = isDevLeadTransition(notification.transition) ? notificationLine(notification) : `${who} \u2014 ${String(notification.transition)}`;
|
|
126
136
|
const error = typeof notification.error === "string" ? excerptLine(notification.error, DEVLEAD_ERROR_EXCERPT_MAX) : void 0;
|
|
137
|
+
const summary = typeof notification.summary === "string" ? excerptLine(notification.summary, DEVLEAD_ERROR_EXCERPT_MAX) : void 0;
|
|
127
138
|
return {
|
|
128
139
|
tooltip,
|
|
129
140
|
who,
|
|
130
141
|
turn,
|
|
131
142
|
transition: String(notification.transition),
|
|
132
143
|
labelKey: transitionLabelKey(notification.transition),
|
|
133
|
-
error
|
|
144
|
+
error,
|
|
145
|
+
summary
|
|
134
146
|
};
|
|
135
147
|
}
|
|
136
148
|
function latestNotification(notifications) {
|
|
149
|
+
if (!Array.isArray(notifications)) return null;
|
|
137
150
|
return notifications.at(-1) ?? null;
|
|
138
151
|
}
|
|
139
152
|
function summarizeWatched(watchedSessions, rows, statuses) {
|
|
153
|
+
if (!Array.isArray(watchedSessions)) return { watched: 0, running: 0, missing: 0 };
|
|
140
154
|
const seen = /* @__PURE__ */ new Set();
|
|
141
155
|
let running = 0;
|
|
142
156
|
let missing = 0;
|
|
@@ -144,7 +158,7 @@ window.__ModuleLoader__.load({
|
|
|
144
158
|
if (typeof candidate !== "string" || candidate.length === 0) continue;
|
|
145
159
|
if (seen.has(candidate)) continue;
|
|
146
160
|
seen.add(candidate);
|
|
147
|
-
const row = rows[candidate];
|
|
161
|
+
const row = Object.hasOwn(rows, candidate) ? rows[candidate] : void 0;
|
|
148
162
|
if (row === void 0) missing += 1;
|
|
149
163
|
const status = statuses?.get(candidate);
|
|
150
164
|
if (status?.running ?? row?.running ?? false) running += 1;
|
|
@@ -155,11 +169,15 @@ window.__ModuleLoader__.load({
|
|
|
155
169
|
progress: "report.kind.progress",
|
|
156
170
|
blocked: "report.kind.blocked",
|
|
157
171
|
decision: "report.kind.decision",
|
|
172
|
+
question: "report.kind.question",
|
|
158
173
|
fyi: "report.kind.fyi"
|
|
159
174
|
};
|
|
160
175
|
function reportLabelKey(kind) {
|
|
161
176
|
return isDevLeadReportKind(kind) ? REPORT_LABEL_KEYS[kind] : "report.kind.unknown";
|
|
162
177
|
}
|
|
178
|
+
function epochMillis(value) {
|
|
179
|
+
return typeof value === "number" && Number.isFinite(value) ? value : 0;
|
|
180
|
+
}
|
|
163
181
|
function reportSummary(report) {
|
|
164
182
|
const title = typeof report.senderSessionTitle === "string" ? excerptLine(report.senderSessionTitle, DEVLEAD_ERROR_EXCERPT_MAX) : void 0;
|
|
165
183
|
const who = title ?? report.senderSessionId;
|
|
@@ -170,30 +188,37 @@ window.__ModuleLoader__.load({
|
|
|
170
188
|
kind: String(report.kind),
|
|
171
189
|
labelKey: reportLabelKey(report.kind),
|
|
172
190
|
detail,
|
|
173
|
-
at:
|
|
191
|
+
at: epochMillis(report.at)
|
|
174
192
|
};
|
|
175
193
|
}
|
|
176
194
|
function latestReport(reports) {
|
|
195
|
+
if (!Array.isArray(reports)) return null;
|
|
177
196
|
return reports.at(-1) ?? null;
|
|
178
197
|
}
|
|
179
198
|
|
|
180
199
|
// packages/client-ui/src/client/DevLeadBar.tsx
|
|
181
200
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
182
201
|
function DevLeadBar({
|
|
202
|
+
useSession,
|
|
183
203
|
useProjection,
|
|
184
204
|
useSessions,
|
|
185
205
|
useSessionStatus,
|
|
186
206
|
t
|
|
187
207
|
}) {
|
|
208
|
+
const subagent = useSession((snapshot) => snapshot.subagent !== null) ?? false;
|
|
188
209
|
const projection = useProjection(DEVLEAD_PROJECTION_KEY);
|
|
189
210
|
const rows = useSessions((state) => state.byId);
|
|
190
211
|
const statuses = useSessionStatus((current) => current);
|
|
191
212
|
const enabled = projection?.enabled ?? false;
|
|
213
|
+
if (subagent) return null;
|
|
192
214
|
if (projection === void 0 || !enabled) return null;
|
|
193
|
-
const
|
|
194
|
-
const
|
|
195
|
-
const
|
|
196
|
-
const
|
|
215
|
+
const watchedSessions = Array.isArray(projection.sessions) ? projection.sessions : [];
|
|
216
|
+
const notifications = Array.isArray(projection.notifications) ? projection.notifications : [];
|
|
217
|
+
const reports = Array.isArray(projection.reports) ? projection.reports : [];
|
|
218
|
+
const summary = summarizeWatched(watchedSessions, rows, statuses);
|
|
219
|
+
const latest = latestNotification(notifications);
|
|
220
|
+
const latestRep = latestReport(reports);
|
|
221
|
+
const showReport = latestRep !== null && (latest === null || epochMillis(latestRep.at) >= epochMillis(latest.at));
|
|
197
222
|
const notice = !showReport && latest !== null ? notificationSummary(latest) : null;
|
|
198
223
|
const reportNotice = showReport && latestRep !== null ? reportSummary(latestRep) : null;
|
|
199
224
|
const tooltip = reportNotice?.tooltip ?? notice?.tooltip ?? t("hint.enabled");
|
|
@@ -246,7 +271,7 @@ window.__ModuleLoader__.load({
|
|
|
246
271
|
),
|
|
247
272
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "devlead-notification-who", children: reportNotice.who }),
|
|
248
273
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "devlead-notification-label", children: t(reportNotice.labelKey) }),
|
|
249
|
-
reportNotice.detail !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "devlead-notification-
|
|
274
|
+
reportNotice.detail !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "devlead-notification-detail", children: reportNotice.detail })
|
|
250
275
|
] }) : notice === null ? (
|
|
251
276
|
// An enabled Session with no retained notification keeps the help
|
|
252
277
|
// hint visible instead of leaving the row visually empty.
|
|
@@ -263,7 +288,14 @@ window.__ModuleLoader__.load({
|
|
|
263
288
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "devlead-notification-who", children: notice.who }),
|
|
264
289
|
notice.turn > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "devlead-notification-turn", children: t("notification.turn", { turn: notice.turn }) }),
|
|
265
290
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "devlead-notification-label", children: t(notice.labelKey) }),
|
|
266
|
-
notice.error !== void 0
|
|
291
|
+
notice.error !== void 0 ? (
|
|
292
|
+
// Only a real Host failure excerpt wears the error ink.
|
|
293
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "devlead-notification-error", children: notice.error })
|
|
294
|
+
) : notice.summary !== void 0 ? (
|
|
295
|
+
// A settled turn's assistant excerpt is neutral detail, like a
|
|
296
|
+
// report's summary: the dot and label carry the outcome.
|
|
297
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "devlead-notification-detail", children: notice.summary })
|
|
298
|
+
) : null
|
|
267
299
|
] })
|
|
268
300
|
}
|
|
269
301
|
)
|
|
@@ -318,23 +350,22 @@ window.__ModuleLoader__.load({
|
|
|
318
350
|
};
|
|
319
351
|
var ALREADY_ACTIVE_PREFIX = "Another Session is already in DevLead mode: ";
|
|
320
352
|
var ALREADY_ACTIVE_INSTRUCTION = ". Run /devlead off there first";
|
|
321
|
-
var
|
|
353
|
+
var ALREADY_ACTIVE_TAIL = `${ALREADY_ACTIVE_INSTRUCTION}, then enable this Session.`;
|
|
322
354
|
function alreadyActiveDetails(message) {
|
|
323
355
|
if (!message.startsWith(ALREADY_ACTIVE_PREFIX)) return void 0;
|
|
324
356
|
const rest = message.slice(ALREADY_ACTIVE_PREFIX.length);
|
|
325
|
-
const
|
|
326
|
-
const marker = archived ? ALREADY_ACTIVE_ARCHIVED_INSTRUCTION : ALREADY_ACTIVE_INSTRUCTION;
|
|
327
|
-
const end = rest.indexOf(marker);
|
|
357
|
+
const end = rest.lastIndexOf(ALREADY_ACTIVE_INSTRUCTION);
|
|
328
358
|
if (end <= 0) return void 0;
|
|
359
|
+
if (rest.slice(end) !== ALREADY_ACTIVE_TAIL) return void 0;
|
|
329
360
|
const session = rest.slice(0, end).trim();
|
|
330
|
-
return session.length === 0 ? void 0 : { session
|
|
361
|
+
return session.length === 0 ? void 0 : { session };
|
|
331
362
|
}
|
|
332
363
|
function failureMessage(failure, t) {
|
|
333
364
|
if (failure.kind === "unresolved") return t("error.fallback.unresolved");
|
|
334
365
|
if (failure.kind === "rejected" && failure.message !== void 0) {
|
|
335
366
|
const active = alreadyActiveDetails(failure.message);
|
|
336
367
|
if (active !== void 0) {
|
|
337
|
-
return t(
|
|
368
|
+
return t("error.alreadyActive", { session: active.session });
|
|
338
369
|
}
|
|
339
370
|
}
|
|
340
371
|
return failure.message ?? t(FAILURE_FALLBACK_KEYS[failure.kind]);
|
|
@@ -376,16 +407,20 @@ window.__ModuleLoader__.load({
|
|
|
376
407
|
aliveRef.current = false;
|
|
377
408
|
};
|
|
378
409
|
}, []);
|
|
410
|
+
const resetKeyRef = (0, import_react.useRef)(resetKey);
|
|
379
411
|
(0, import_react.useEffect)(() => {
|
|
412
|
+
resetKeyRef.current = resetKey;
|
|
380
413
|
dispatch({ type: "reset" });
|
|
381
414
|
}, [resetKey]);
|
|
382
415
|
const run = (line) => {
|
|
383
416
|
if (!gate.tryEnter()) return;
|
|
417
|
+
const admittedKey = resetKeyRef.current;
|
|
384
418
|
dispatch({ type: "begin" });
|
|
385
419
|
void admitCommand(executeCommand, line).then((failure) => {
|
|
386
420
|
gate.leave();
|
|
387
421
|
if (!aliveRef.current) return;
|
|
388
|
-
|
|
422
|
+
const stale = resetKeyRef.current !== admittedKey;
|
|
423
|
+
dispatch({ type: "settle", failure: stale ? null : failure ?? null });
|
|
389
424
|
});
|
|
390
425
|
};
|
|
391
426
|
return { pending: state.pending, failure: state.failure, run };
|
|
@@ -393,11 +428,13 @@ window.__ModuleLoader__.load({
|
|
|
393
428
|
|
|
394
429
|
// packages/client-ui/src/client/DevLeadIconToggle.tsx
|
|
395
430
|
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
396
|
-
function DevLeadIconToggle({ useProjection, executeCommand, t }) {
|
|
431
|
+
function DevLeadIconToggle({ useSession, useProjection, executeCommand, t }) {
|
|
432
|
+
const subagent = useSession((snapshot) => snapshot.subagent !== null) ?? false;
|
|
397
433
|
const projection = useProjection(DEVLEAD_PROJECTION_KEY);
|
|
398
434
|
const enabled = projection?.enabled ?? false;
|
|
399
435
|
const { pending, failure, run } = useDevLeadAdmission(executeCommand, enabled);
|
|
400
436
|
const [attempt, setAttempt] = (0, import_react2.useState)("on");
|
|
437
|
+
if (subagent) return null;
|
|
401
438
|
if (projection === void 0) return null;
|
|
402
439
|
const direction = enabled ? "off" : "on";
|
|
403
440
|
const failureText = failure === null ? null : failureMessage(failure, t);
|
|
@@ -458,21 +495,35 @@ window.__ModuleLoader__.load({
|
|
|
458
495
|
function devLeadRowEnabled(summary) {
|
|
459
496
|
return summary?.projectionValues?.[DEVLEAD_MODE_PROJECTION_KEY]?.enabled === true;
|
|
460
497
|
}
|
|
461
|
-
function
|
|
462
|
-
|
|
463
|
-
|
|
498
|
+
function devLeadRowSummaryOf(byId, sessionId) {
|
|
499
|
+
return Object.hasOwn(byId, sessionId) ? byId[sessionId] : void 0;
|
|
500
|
+
}
|
|
501
|
+
var watchedIdsCache = /* @__PURE__ */ new WeakMap();
|
|
502
|
+
function watchedIdsOf(byId) {
|
|
503
|
+
const cached = watchedIdsCache.get(byId);
|
|
504
|
+
if (cached !== void 0) return cached;
|
|
505
|
+
const watched = /* @__PURE__ */ new Set();
|
|
464
506
|
for (const [leadId, lead] of Object.entries(byId)) {
|
|
465
|
-
if (
|
|
507
|
+
if (!devLeadRowEnabled(lead)) continue;
|
|
466
508
|
const sessions = lead?.projectionValues?.[DEVLEAD_WATCH_PROJECTION_KEY]?.sessions;
|
|
467
|
-
if (Array.isArray(sessions)
|
|
509
|
+
if (!Array.isArray(sessions)) continue;
|
|
510
|
+
for (const candidate of sessions) {
|
|
511
|
+
if (typeof candidate !== "string" || candidate.length === 0 || candidate === leadId) continue;
|
|
512
|
+
watched.add(candidate);
|
|
513
|
+
}
|
|
468
514
|
}
|
|
469
|
-
|
|
515
|
+
watchedIdsCache.set(byId, watched);
|
|
516
|
+
return watched;
|
|
517
|
+
}
|
|
518
|
+
function devLeadRowWatched(sessionId, byId) {
|
|
519
|
+
if (devLeadRowEnabled(devLeadRowSummaryOf(byId, sessionId))) return false;
|
|
520
|
+
return watchedIdsOf(byId).has(sessionId);
|
|
470
521
|
}
|
|
471
522
|
|
|
472
523
|
// packages/client-ui/src/client/DevLeadSessionHoverMark.tsx
|
|
473
524
|
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
474
525
|
function DevLeadSessionHoverMark({ sessionId, useSessions, t }) {
|
|
475
|
-
const enabled = useSessions((state) => devLeadRowEnabled(state.byId
|
|
526
|
+
const enabled = useSessions((state) => devLeadRowEnabled(devLeadRowSummaryOf(state.byId, sessionId)));
|
|
476
527
|
const watched = useSessions((state) => devLeadRowWatched(sessionId, state.byId));
|
|
477
528
|
if (enabled) {
|
|
478
529
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "devlead-row-hover", "data-devlead-row-hover": "true", children: [
|
|
@@ -491,7 +542,7 @@ window.__ModuleLoader__.load({
|
|
|
491
542
|
var import_dsh_client_ui_primitives4 = require("@deepseek-ai/dsh-client-ui-primitives");
|
|
492
543
|
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
493
544
|
function DevLeadSessionMark({ sessionId, useSessions, t }) {
|
|
494
|
-
const enabled = useSessions((state) => devLeadRowEnabled(state.byId
|
|
545
|
+
const enabled = useSessions((state) => devLeadRowEnabled(devLeadRowSummaryOf(state.byId, sessionId)));
|
|
495
546
|
const watched = useSessions((state) => devLeadRowWatched(sessionId, state.byId));
|
|
496
547
|
if (enabled) {
|
|
497
548
|
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
@@ -523,14 +574,14 @@ window.__ModuleLoader__.load({
|
|
|
523
574
|
"meta.description": "DevLead \u6A21\u5F0F\u7684 Web \u754C\u9762\uFF1A\u8F93\u5165\u6846\u5DE5\u5177\u6761\u7684 DevLead \u5F00\u5173\uFF08\u4E24\u6001\u5747\u53EF\u5207\u6362\uFF09\u3001\u6A21\u5F0F\u5F00\u542F\u540E\u663E\u793A\u7684\u72B6\u6001\u6761\uFF0C\u4EE5\u53CA\u4FA7\u8FB9\u680F\u4E2D\u6FC0\u6D3B DevLead \u884C\u4E0E\u5DF2\u5173\u6CE8\u4F1A\u8BDD\u7684\u6807\u8BB0\u3002",
|
|
524
575
|
"bar.aria": "DevLead \u72B6\u6001\u680F",
|
|
525
576
|
"label": "DevLead",
|
|
526
|
-
"hint.enabled": "DevLead \u5DF2\u5F00\u542F\uFF1A\u5DF2\u5173\u6CE8\u4F1A\u8BDD\u7684\u8F6E\u6B21\u7ED3\u675F\u4F1A\u901A\u77E5\u5E76\u5524\u9192\u672C\u4F1A\u8BDD\u3002",
|
|
577
|
+
"hint.enabled": "DevLead \u5DF2\u5F00\u542F\uFF1A\u5DF2\u5173\u6CE8\u4F1A\u8BDD\u7684\u8F6E\u6B21\u7ED3\u675F\u4E0E\u4E2D\u9014\u6C47\u62A5\uFF08\u542B\u63D0\u95EE\uFF09\u4F1A\u901A\u77E5\u5E76\u5524\u9192\u672C\u4F1A\u8BDD\u3002",
|
|
527
578
|
"count.watched": "\u5DF2\u5173\u6CE8 {count} \u4E2A\u4F1A\u8BDD",
|
|
528
579
|
"count.running": "\u8FD0\u884C\u4E2D {count}",
|
|
529
580
|
"count.missing": "{count} \u4E2A\u5DF2\u4E0D\u53EF\u7528",
|
|
530
581
|
"row.mark.aria": "\u5F53\u524D\u6FC0\u6D3B\u7684 DevLead \u4F1A\u8BDD",
|
|
531
582
|
"row.watched.aria": "\u88AB\u5F53\u524D DevLead \u5173\u6CE8",
|
|
532
583
|
"row.hover.enabled": "\u5F53\u524D\u6FC0\u6D3B\u7684 DevLead \u4F1A\u8BDD\uFF1A\u53EF\u8C03\u5EA6\u5E76\u5173\u6CE8\u5176\u4ED6\u4F1A\u8BDD\u3002",
|
|
533
|
-
"row.hover.watched": "\u88AB\u5F53\u524D DevLead \u5173\u6CE8\uFF1A\u5B83\u7684\u8F6E\u6B21\u7ED3\u675F\u4F1A\u901A\u77E5\u5E76\u5524\u9192 lead\u3002",
|
|
584
|
+
"row.hover.watched": "\u88AB\u5F53\u524D DevLead \u5173\u6CE8\uFF1A\u5B83\u7684\u8F6E\u6B21\u7ED3\u675F\u4E0E\u4E2D\u9014\u6C47\u62A5\uFF08\u542B\u63D0\u95EE\uFF09\u4F1A\u901A\u77E5\u5E76\u5524\u9192 lead\u3002",
|
|
534
585
|
"toggle.label": "DevLead",
|
|
535
586
|
"toggle.enable": "\u5F00\u542F DevLead \u6A21\u5F0F",
|
|
536
587
|
"toggle.disable": "\u5173\u95ED DevLead \u6A21\u5F0F",
|
|
@@ -543,6 +594,7 @@ window.__ModuleLoader__.load({
|
|
|
543
594
|
"report.kind.progress": "\u8FDB\u5EA6",
|
|
544
595
|
"report.kind.blocked": "\u963B\u585E",
|
|
545
596
|
"report.kind.decision": "\u5F85\u51B3\u7B56",
|
|
597
|
+
"report.kind.question": "\u63D0\u95EE",
|
|
546
598
|
"report.kind.fyi": "\u544A\u77E5",
|
|
547
599
|
"report.kind.unknown": "\u62A5\u544A",
|
|
548
600
|
"transition.completed": "\u5B8C\u6210",
|
|
@@ -554,7 +606,6 @@ window.__ModuleLoader__.load({
|
|
|
554
606
|
"transition.forked": "\u5DF2\u5206\u53C9",
|
|
555
607
|
"transition.unknown": "\u672A\u77E5\u72B6\u6001",
|
|
556
608
|
"error.alreadyActive": "\u53E6\u4E00\u4E2A\u4F1A\u8BDD\u5DF2\u5904\u4E8E DevLead \u6A21\u5F0F\uFF1A{session}\u3002\u8BF7\u5148\u5728\u90A3\u91CC\u6267\u884C /devlead off\uFF0C\u518D\u5F00\u542F\u672C\u4F1A\u8BDD\u3002",
|
|
557
|
-
"error.alreadyActive.archived": "\u53E6\u4E00\u4E2A\u4F1A\u8BDD\u5DF2\u5904\u4E8E DevLead \u6A21\u5F0F\uFF1A{session}\u3002\u8BE5\u4F1A\u8BDD\u5DF2\u5F52\u6863\u4E14\u65E0\u6CD5\u81EA\u52A8\u91CA\u653E\uFF1B\u8BF7\u6253\u5F00\u5B83\uFF0C\u6267\u884C /devlead off \u540E\u91CD\u8BD5\u3002",
|
|
558
609
|
"error.fallback.transport": "\u547D\u4EE4\u5931\u8D25",
|
|
559
610
|
"error.fallback.rejected": "\u547D\u4EE4\u88AB\u62D2\u7EDD",
|
|
560
611
|
"error.fallback.unknown": "\u672A\u77E5\u9519\u8BEF",
|
|
@@ -565,14 +616,14 @@ window.__ModuleLoader__.load({
|
|
|
565
616
|
"meta.description": "Web UI for DevLead mode: the composer-toolbar toggle that switches the mode on or off, the status strip shown while the mode is on, and the active-DevLead and watched-session marks in the sidebar.",
|
|
566
617
|
"bar.aria": "DevLead status bar",
|
|
567
618
|
"label": "DevLead",
|
|
568
|
-
"hint.enabled": "DevLead is on: watched-session turn
|
|
619
|
+
"hint.enabled": "DevLead is on: watched-session turn ends and mid-turn reports (including questions) notify and wake this session.",
|
|
569
620
|
"count.watched": "{count} watched",
|
|
570
621
|
"count.running": "{count} running",
|
|
571
622
|
"count.missing": "{count} unavailable",
|
|
572
623
|
"row.mark.aria": "Active DevLead Session",
|
|
573
624
|
"row.watched.aria": "Watched by the active DevLead",
|
|
574
625
|
"row.hover.enabled": "Active DevLead Session: this session can dispatch and watch other Sessions.",
|
|
575
|
-
"row.hover.watched": "Watched by the active DevLead: its turn
|
|
626
|
+
"row.hover.watched": "Watched by the active DevLead: its turn ends and mid-turn reports (including questions) notify and wake the lead.",
|
|
576
627
|
"toggle.label": "DevLead",
|
|
577
628
|
"toggle.enable": "Turn on DevLead mode",
|
|
578
629
|
"toggle.disable": "Turn off DevLead mode",
|
|
@@ -585,6 +636,7 @@ window.__ModuleLoader__.load({
|
|
|
585
636
|
"report.kind.progress": "progress",
|
|
586
637
|
"report.kind.blocked": "blocked",
|
|
587
638
|
"report.kind.decision": "decision",
|
|
639
|
+
"report.kind.question": "question",
|
|
588
640
|
"report.kind.fyi": "fyi",
|
|
589
641
|
"report.kind.unknown": "report",
|
|
590
642
|
"transition.completed": "completed",
|
|
@@ -596,7 +648,6 @@ window.__ModuleLoader__.load({
|
|
|
596
648
|
"transition.forked": "forked",
|
|
597
649
|
"transition.unknown": "unknown state",
|
|
598
650
|
"error.alreadyActive": "Another Session is already in DevLead mode: {session}. Run /devlead off there first, then enable this Session.",
|
|
599
|
-
"error.alreadyActive.archived": "Another Session is already in DevLead mode: {session}. That Session is archived and could not be released automatically; open it, run /devlead off, then retry.",
|
|
600
651
|
"error.fallback.transport": "command failed",
|
|
601
652
|
"error.fallback.rejected": "command rejected",
|
|
602
653
|
"error.fallback.unknown": "unknown error",
|
|
@@ -850,7 +901,8 @@ window.__ModuleLoader__.load({
|
|
|
850
901
|
background: var(--dsw-alias-state-error-primary, #c0392b);
|
|
851
902
|
}
|
|
852
903
|
|
|
853
|
-
.devlead-notification-dot[data-report-kind="decision"]
|
|
904
|
+
.devlead-notification-dot[data-report-kind="decision"],
|
|
905
|
+
.devlead-notification-dot[data-report-kind="question"] {
|
|
854
906
|
background: var(--dsw-alias-state-warn-primary, #a15c00);
|
|
855
907
|
}
|
|
856
908
|
|
|
@@ -867,15 +919,26 @@ window.__ModuleLoader__.load({
|
|
|
867
919
|
flex: none;
|
|
868
920
|
}
|
|
869
921
|
|
|
870
|
-
|
|
922
|
+
/* A turn failure excerpt keeps the error ink; a report's summary/message
|
|
923
|
+
detail is neutral copy \u2014 the kind dot and localized label carry the
|
|
924
|
+
semantics, so progress/fyi/question text must not read as a failure. */
|
|
925
|
+
.devlead-notification-error,
|
|
926
|
+
.devlead-notification-detail {
|
|
871
927
|
flex: 0 1 auto;
|
|
872
928
|
min-width: 0;
|
|
873
929
|
overflow: hidden;
|
|
874
|
-
color: var(--dsw-alias-label-error, #c0392b);
|
|
875
930
|
font-size: 12px;
|
|
876
931
|
text-overflow: ellipsis;
|
|
877
932
|
}
|
|
878
933
|
|
|
934
|
+
.devlead-notification-error {
|
|
935
|
+
color: var(--dsw-alias-label-error, #c0392b);
|
|
936
|
+
}
|
|
937
|
+
|
|
938
|
+
.devlead-notification-detail {
|
|
939
|
+
color: var(--dsw-alias-label-secondary, GrayText);
|
|
940
|
+
}
|
|
941
|
+
|
|
879
942
|
/* Visually hidden but announced: the compact toolbar surface has no inline
|
|
880
943
|
error seat, so its failure text is mirrored into a live region through this
|
|
881
944
|
class (the shipped visually-hidden idiom used by the chat surfaces). */
|
|
@@ -916,7 +979,7 @@ window.__ModuleLoader__.load({
|
|
|
916
979
|
[data-row-key^="session:"]:has([data-devlead-active-mark="true"])::after {
|
|
917
980
|
content: '';
|
|
918
981
|
position: absolute;
|
|
919
|
-
inset: 0 calc(-1 * var(--dsh-sidebar-paint-inset));
|
|
982
|
+
inset: 0 calc(-1 * var(--dsh-sidebar-paint-inset, 3px));
|
|
920
983
|
border: 1px solid var(--dsw-alias-state-business-primary, #4176e6);
|
|
921
984
|
border-radius: inherit;
|
|
922
985
|
box-shadow: 0 0 0 2px var(--dsw-alias-state-business-tertiary, rgba(65, 118, 230, 0.12));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yankeguo/dsh-client-ui-devlead",
|
|
3
|
-
"version": "0.2
|
|
3
|
+
"version": "0.3.0-rc.2",
|
|
4
4
|
"description": "DevLead surfaces: the composer-toolbar toggle that switches the mode on or off, the status strip above the composer while the mode is on, and a DevLead mark on the Session's sidebar row.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
"./package.json": "./package.json"
|
|
13
13
|
},
|
|
14
14
|
"files": [
|
|
15
|
+
"LICENSE",
|
|
15
16
|
"lib",
|
|
16
17
|
"locale/*.json",
|
|
17
18
|
"README.md"
|
|
@@ -35,7 +36,7 @@
|
|
|
35
36
|
"@deepseek-ai/cordis": "~4.1.0"
|
|
36
37
|
},
|
|
37
38
|
"dependencies": {
|
|
38
|
-
"@yankeguo/dsh-devlead-protocol": "0.2
|
|
39
|
+
"@yankeguo/dsh-devlead-protocol": "0.3.0-rc.2"
|
|
39
40
|
},
|
|
40
41
|
"engines": {
|
|
41
42
|
"dsh": ">=0.2.2-rc.1 <0.3.0"
|