@yankeguo/dsh-client-ui-devlead 0.1.1 → 0.2.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/README.md ADDED
@@ -0,0 +1,47 @@
1
+ # @yankeguo/dsh-client-ui-devlead
2
+
3
+ Browser half of the DevLead suite, loaded on the DSH **Web** platform.
4
+
5
+ - **Off state:** a compact ghost icon in the composer toolbar (`conversation.input.left`) sends
6
+ `/devlead on`.
7
+ - **On state:** a status strip above the composer (`conversation.input.dock`) shows the switch,
8
+ watched/running counts, and the latest retained notification; the switch sends `/devlead off`.
9
+ - **Sidebar marks:** enabled Sessions get a shield mark (`sidebar.session.row.trailing`) and a
10
+ line in the row hover card (`sidebar.session.row.hover`), read from the summary-sized
11
+ `devLeadMode` projection.
12
+
13
+ The browser bundle only registers into DSH client slots and sends `/devlead` commands. It has no
14
+ custom Remote API, no optimistic state flips, and no direct Host access; all durable state comes
15
+ from the `devLead` / `devLeadMode` projections. The locale namespace is `devlead` with `zh` and
16
+ `en` dictionaries.
17
+
18
+ Style injection is reference-counted across **module instances** (`Symbol.for(...)` key on `globalThis`):
19
+ HMR old/new instances can coexist without an old disposer removing the `<style>` tag a new instance
20
+ still uses. The two entry points and `useDevLeadAdmission` have React render tests using
21
+ `react-test-renderer` (devDependency only, pure node, no jsdom); the style-tag refcount is covered
22
+ by a second-module-instance test (`vi.resetModules()` + dynamic import).
23
+
24
+ Known UI limits: the mark is subject to the projection-cache backfill described in the repository
25
+ README, and DSH 0.2.2-rc.1 does not render the trailing seat on a blank (no-turn-yet) Session row.
26
+
27
+ ## Install
28
+
29
+ Normally installed as part of the bundle:
30
+
31
+ ```sh
32
+ dsh plugin --profile desktop add @yankeguo/dsh-devlead-bundle
33
+ ```
34
+
35
+ ## Related docs
36
+
37
+ - [Repository README (English)](https://github.com/yankeguo/dsh-devlead/blob/main/README.md) / [中文](https://github.com/yankeguo/dsh-devlead/blob/main/README.zh.md)
38
+ - [Design notes: browser UI, slots, locale and accessibility](https://github.com/yankeguo/dsh-devlead/blob/main/docs/DESIGN.md)
39
+ - [Optional-dependency audit: client inject ids](https://github.com/yankeguo/dsh-devlead/blob/main/docs/OPTIONAL-DEPENDENCIES.md)
40
+
41
+ ## 中文
42
+
43
+ `@yankeguo/dsh-client-ui-devlead` 是浏览器半边:未开启时的 composer 工具条图标、开启后的
44
+ DevLeadBar、侧边栏会话行标记;只读 `devLead`/`devLeadMode` projection 并发送 `/devlead`
45
+ 命令。0.2.0 起样式注入用跨模块实例引用计数(HMR 新旧实例交替不误删标签),两个入口与准入
46
+ hook 用 `react-test-renderer` 做渲染测试。已知 mark 回填与 blank 行限制见根 README。完整中文文档见
47
+ [根 README.zh.md](https://github.com/yankeguo/dsh-devlead/blob/main/README.zh.md)与[设计说明](https://github.com/yankeguo/dsh-devlead/blob/main/docs/DESIGN.md)。
package/lib/client.js CHANGED
@@ -35,6 +35,9 @@ window.__ModuleLoader__.load({
35
35
 
36
36
  // packages/protocol/src/types.ts
37
37
  var DEVLEAD_PROJECTION_KEY = "devLead";
38
+ var DEVLEAD_MODE_PROJECTION_KEY = "devLeadMode";
39
+ var DEVLEAD_COMMAND_NAME = "devlead";
40
+ var DEVLEAD_ERROR_EXCERPT_MAX = 240;
38
41
 
39
42
  // packages/protocol/src/format.ts
40
43
  var DEVLEAD_TRANSITIONS = [
@@ -50,6 +53,15 @@ window.__ModuleLoader__.load({
50
53
  function isDevLeadTransition(value) {
51
54
  return typeof value === "string" && TRANSITION_SET.has(value);
52
55
  }
56
+ function excerptLine(text, max) {
57
+ const collapsed = text.replace(/\s+/gu, " ").trim();
58
+ if (collapsed.length === 0) return void 0;
59
+ const budget = Number.isFinite(max) ? Math.floor(max) : Number.POSITIVE_INFINITY;
60
+ if (budget < 1) return void 0;
61
+ const points = Array.from(collapsed);
62
+ if (points.length <= budget) return collapsed;
63
+ return `${points.slice(0, budget - 1).join("")}\u2026`;
64
+ }
53
65
  var TRANSITION_LABELS = {
54
66
  completed: "completed",
55
67
  error: "failed",
@@ -64,8 +76,7 @@ window.__ModuleLoader__.load({
64
76
  }
65
77
  function presentLine(value) {
66
78
  if (value === void 0) return void 0;
67
- const trimmed = value.trim();
68
- return trimmed.length === 0 ? void 0 : trimmed;
79
+ return excerptLine(value, DEVLEAD_ERROR_EXCERPT_MAX);
69
80
  }
70
81
  function notificationLine(notification) {
71
82
  const title = presentLine(notification.sessionTitle);
@@ -90,18 +101,18 @@ window.__ModuleLoader__.load({
90
101
  return isDevLeadTransition(transition) ? TRANSITION_LABEL_KEYS[transition] : "transition.unknown";
91
102
  }
92
103
  function notificationSummary(notification) {
93
- const rawTitle = typeof notification.sessionTitle === "string" ? notification.sessionTitle.trim() : "";
94
- const who = rawTitle.length > 0 ? rawTitle : notification.sessionId;
104
+ const title = typeof notification.sessionTitle === "string" ? excerptLine(notification.sessionTitle, DEVLEAD_ERROR_EXCERPT_MAX) : void 0;
105
+ const who = title ?? notification.sessionId;
95
106
  const turn = Number.isInteger(notification.turn) && notification.turn > 0 ? notification.turn : 0;
96
107
  const tooltip = isDevLeadTransition(notification.transition) ? notificationLine(notification) : `${who} \u2014 ${String(notification.transition)}`;
97
- const rawError = typeof notification.error === "string" ? notification.error.trim() : "";
108
+ const error = typeof notification.error === "string" ? excerptLine(notification.error, DEVLEAD_ERROR_EXCERPT_MAX) : void 0;
98
109
  return {
99
110
  tooltip,
100
111
  who,
101
112
  turn,
102
113
  transition: String(notification.transition),
103
114
  labelKey: transitionLabelKey(notification.transition),
104
- error: rawError.length > 0 ? rawError : void 0
115
+ error
105
116
  };
106
117
  }
107
118
  function latestNotification(notifications) {
@@ -124,10 +135,6 @@ window.__ModuleLoader__.load({
124
135
  }
125
136
 
126
137
  // packages/client-ui/src/client/results.ts
127
- var REJECTED_FALLBACK = "command rejected";
128
- var TRANSPORT_FALLBACK = "command failed";
129
- var UNEXPECTED_FALLBACK = "unknown error";
130
- var UNRESOLVED_TEXT = "the Host did not recognize the command line";
131
138
  function presentMessage(value) {
132
139
  if (value === void 0) return void 0;
133
140
  const trimmed = value.trim();
@@ -135,19 +142,21 @@ window.__ModuleLoader__.load({
135
142
  }
136
143
  function commandFailure(result) {
137
144
  if (!result.ok) {
145
+ const message2 = presentMessage(result.error.message);
138
146
  return {
139
147
  kind: "transport",
140
- message: presentMessage(result.error.message) ?? TRANSPORT_FALLBACK,
148
+ ...message2 === void 0 ? {} : { message: message2 },
141
149
  code: result.error.code
142
150
  };
143
151
  }
144
152
  const outcome = result.value?.result;
145
153
  if (outcome === void 0 || outcome.kind !== "error") return void 0;
146
- return { kind: "rejected", message: presentMessage(outcome.text) ?? REJECTED_FALLBACK };
154
+ const message = presentMessage(outcome.text);
155
+ return { kind: "rejected", ...message === void 0 ? {} : { message } };
147
156
  }
148
157
  function unexpectedFailure(error) {
149
158
  const message = error instanceof Error ? presentMessage(error.message) : void 0;
150
- return { kind: "unexpected", message: message ?? UNEXPECTED_FALLBACK };
159
+ return { kind: "unexpected", ...message === void 0 ? {} : { message } };
151
160
  }
152
161
  async function admitCommand(executeCommand, line) {
153
162
  try {
@@ -158,17 +167,23 @@ window.__ModuleLoader__.load({
158
167
  return unexpectedFailure(error);
159
168
  }
160
169
  }
161
- function failureMessage(failure) {
162
- return failure.kind === "unresolved" ? UNRESOLVED_TEXT : failure.message;
170
+ var FAILURE_FALLBACK_KEYS = {
171
+ transport: "error.fallback.transport",
172
+ rejected: "error.fallback.rejected",
173
+ unexpected: "error.fallback.unknown"
174
+ };
175
+ function failureMessage(failure, t) {
176
+ if (failure.kind === "unresolved") return t("error.fallback.unresolved");
177
+ return failure.message ?? t(FAILURE_FALLBACK_KEYS[failure.kind]);
163
178
  }
164
179
  function failureCopy(failure) {
165
180
  switch (failure.kind) {
166
181
  case "transport":
167
- return { key: "error.command", params: { message: failure.message, code: failure.code } };
182
+ return failure.message === void 0 ? { key: "error.fallback.transport", params: {} } : { key: "error.command", params: { message: failure.message, code: failure.code } };
168
183
  case "rejected":
169
- return { key: "error.rejected", params: { message: failure.message } };
184
+ return failure.message === void 0 ? { key: "error.fallback.rejected", params: {} } : { key: "error.rejected", params: { message: failure.message } };
170
185
  case "unexpected":
171
- return { key: "error.unknown", params: { message: failure.message } };
186
+ return failure.message === void 0 ? { key: "error.fallback.unknown", params: {} } : { key: "error.unknown", params: { message: failure.message } };
172
187
  case "unresolved":
173
188
  return { key: "error.unresolved", params: { line: failure.line } };
174
189
  }
@@ -247,7 +262,7 @@ window.__ModuleLoader__.load({
247
262
  const switchTitle = pending ? t("switch.pending") : t("switch.disable");
248
263
  const toggle = (next) => {
249
264
  if (next) return;
250
- run("/devlead off");
265
+ run(`/${DEVLEAD_COMMAND_NAME} off`);
251
266
  };
252
267
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
253
268
  "div",
@@ -337,7 +352,7 @@ window.__ModuleLoader__.load({
337
352
  const enabled = projection?.enabled ?? false;
338
353
  const { pending, failure, run } = useDevLeadAdmission(executeCommand, enabled);
339
354
  if (projection === void 0 || enabled) return null;
340
- const label = failure === null ? t("toggle.enable") : t("toggle.failed", { message: failureMessage(failure) });
355
+ const label = failure === null ? t("toggle.enable") : t("toggle.failed", { message: failureMessage(failure, t) });
341
356
  return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
342
357
  /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_dsh_client_ui_primitives2.Tooltip, { label, side: "top", delayMs: 300, maxWidth: 300, portal: true, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
343
358
  import_dsh_client_ui_primitives2.Button,
@@ -352,19 +367,56 @@ window.__ModuleLoader__.load({
352
367
  "data-devlead-pending": pending ? "true" : "false",
353
368
  "data-devlead-failed": failure === null ? "false" : "true",
354
369
  onClick: () => {
355
- run("/devlead on");
370
+ run(`/${DEVLEAD_COMMAND_NAME} on`);
356
371
  },
357
372
  children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_dsh_client_ui_primitives2.IconUsersOutlineRegular, { size: 16 })
358
373
  }
359
374
  ) }),
360
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "devlead-sr-only", role: "status", "aria-live": "polite", "aria-atomic": "true", children: failure === null ? null : t("toggle.failed.status", { message: failureMessage(failure) }) })
375
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "devlead-sr-only", role: "status", "aria-live": "polite", "aria-atomic": "true", children: failure === null ? null : t("toggle.failed.status", { message: failureMessage(failure, t) }) })
361
376
  ] });
362
377
  }
363
378
 
379
+ // packages/client-ui/src/client/DevLeadSessionHoverMark.tsx
380
+ var import_dsh_client_ui_primitives3 = require("@deepseek-ai/dsh-client-ui-primitives");
381
+
382
+ // packages/client-ui/src/client/sessionMark.ts
383
+ function devLeadRowEnabled(summary) {
384
+ return summary?.projectionValues?.[DEVLEAD_MODE_PROJECTION_KEY]?.enabled === true;
385
+ }
386
+
387
+ // packages/client-ui/src/client/DevLeadSessionHoverMark.tsx
388
+ var import_jsx_runtime3 = require("react/jsx-runtime");
389
+ function DevLeadSessionHoverMark({ sessionId, useSessions, t }) {
390
+ const enabled = useSessions((state) => devLeadRowEnabled(state.byId[sessionId]));
391
+ if (!enabled) return null;
392
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "devlead-row-hover", "data-devlead-row-hover": "true", children: [
393
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "devlead-row-hover-glyph", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_dsh_client_ui_primitives3.IconShieldOutlineRegular, { size: 14 }) }),
394
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { children: t("row.hover.enabled") })
395
+ ] });
396
+ }
397
+
398
+ // packages/client-ui/src/client/DevLeadSessionMark.tsx
399
+ var import_dsh_client_ui_primitives4 = require("@deepseek-ai/dsh-client-ui-primitives");
400
+ var import_jsx_runtime4 = require("react/jsx-runtime");
401
+ function DevLeadSessionMark({ sessionId, useSessions, t }) {
402
+ const enabled = useSessions((state) => devLeadRowEnabled(state.byId[sessionId]));
403
+ if (!enabled) return null;
404
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
405
+ "span",
406
+ {
407
+ className: "devlead-row-mark",
408
+ role: "img",
409
+ "aria-label": t("row.mark.aria"),
410
+ "data-devlead-row-mark": "true",
411
+ children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_dsh_client_ui_primitives4.IconShieldOutlineRegular, { size: 13 })
412
+ }
413
+ );
414
+ }
415
+
364
416
  // packages/client-ui/src/client/locales.ts
365
417
  var zh = {
366
418
  "meta.title": "DevLead \u6A21\u5F0F",
367
- "meta.description": "\u5728\u8F93\u5165\u6846\u5DE5\u5177\u6761\u4E2D\u5F00\u5173 DevLead \u6A21\u5F0F\uFF1B\u5F00\u542F\u540E\u5728\u8F93\u5165\u6846\u4E0A\u65B9\u663E\u793A\u72B6\u6001\u6761\u3001\u76D1\u7763\u4F1A\u8BDD\u72B6\u6001\u4E0E\u6700\u8FD1\u4E00\u6761\u901A\u77E5\u3002",
419
+ "meta.description": "\u5728\u8F93\u5165\u6846\u5DE5\u5177\u6761\u4E2D\u5F00\u5173 DevLead \u6A21\u5F0F\uFF1B\u5F00\u542F\u540E\u5728\u8F93\u5165\u6846\u4E0A\u65B9\u663E\u793A\u72B6\u6001\u6761\uFF0C\u5E76\u5728\u4FA7\u8FB9\u680F\u4F1A\u8BDD\u884C\u6807\u8BB0\u8BE5\u4F1A\u8BDD\u3002",
368
420
  "bar.aria": "DevLead \u72B6\u6001\u680F",
369
421
  "label": "DevLead",
370
422
  "switch.aria": "DevLead \u6A21\u5F0F",
@@ -374,6 +426,8 @@ window.__ModuleLoader__.load({
374
426
  "count.watched": "\u76D1\u7763 {count} \u4E2A\u4F1A\u8BDD",
375
427
  "count.running": "\u8FD0\u884C\u4E2D {count}",
376
428
  "count.missing": "{count} \u4E2A\u5DF2\u4E0D\u53EF\u7528",
429
+ "row.mark.aria": "DevLead \u6A21\u5F0F\u5DF2\u542F\u7528",
430
+ "row.hover.enabled": "DevLead \u6A21\u5F0F\u5DF2\u542F\u7528\uFF1A\u672C\u4F1A\u8BDD\u53EF\u8C03\u5EA6\u5E76\u76D1\u7763\u5176\u4ED6\u4F1A\u8BDD\u3002",
377
431
  "toggle.enable": "\u5F00\u542F DevLead \u6A21\u5F0F",
378
432
  "toggle.failed": "\u5F00\u542F DevLead \u6A21\u5F0F\u5931\u8D25\uFF1A{message}\uFF08\u60AC\u505C\u67E5\u770B\uFF0C\u53EF\u91CD\u8BD5\uFF09",
379
433
  "toggle.failed.status": "\u5F00\u542F DevLead \u6A21\u5F0F\u5931\u8D25\uFF1A{message}",
@@ -389,11 +443,15 @@ window.__ModuleLoader__.load({
389
443
  "error.command": "\u547D\u4EE4\u5931\u8D25\uFF1A{message}\uFF08{code}\uFF09",
390
444
  "error.rejected": "\u547D\u4EE4\u88AB\u62D2\u7EDD\uFF1A{message}",
391
445
  "error.unknown": "\u547D\u4EE4\u6267\u884C\u5931\u8D25\uFF1A{message}",
392
- "error.unresolved": "\u547D\u4EE4\u672A\u6267\u884C\uFF1AHost \u672A\u8BC6\u522B {line}"
446
+ "error.unresolved": "\u547D\u4EE4\u672A\u6267\u884C\uFF1AHost \u672A\u8BC6\u522B {line}",
447
+ "error.fallback.transport": "\u547D\u4EE4\u5931\u8D25",
448
+ "error.fallback.rejected": "\u547D\u4EE4\u88AB\u62D2\u7EDD",
449
+ "error.fallback.unknown": "\u672A\u77E5\u9519\u8BEF",
450
+ "error.fallback.unresolved": "Host \u672A\u8BC6\u522B\u8BE5\u547D\u4EE4"
393
451
  };
394
452
  var en = {
395
453
  "meta.title": "DevLead mode",
396
- "meta.description": "Toggles DevLead mode from the composer toolbar; once enabled, a status strip above the composer shows watched sessions and the latest notification.",
454
+ "meta.description": "Toggles DevLead mode from the composer toolbar; once enabled, a status strip appears above the composer and the Session is marked in the sidebar list.",
397
455
  "bar.aria": "DevLead status bar",
398
456
  "label": "DevLead",
399
457
  "switch.aria": "DevLead mode",
@@ -403,6 +461,8 @@ window.__ModuleLoader__.load({
403
461
  "count.watched": "{count} watched",
404
462
  "count.running": "{count} running",
405
463
  "count.missing": "{count} unavailable",
464
+ "row.mark.aria": "DevLead mode is on",
465
+ "row.hover.enabled": "DevLead mode is on: this session can dispatch and watch other Sessions.",
406
466
  "toggle.enable": "Turn on DevLead mode",
407
467
  "toggle.failed": "Could not turn on DevLead mode: {message} (hover to read, then retry)",
408
468
  "toggle.failed.status": "Could not turn on DevLead mode: {message}",
@@ -418,7 +478,11 @@ window.__ModuleLoader__.load({
418
478
  "error.command": "Command failed: {message} ({code})",
419
479
  "error.rejected": "Command rejected: {message}",
420
480
  "error.unknown": "Command failed: {message}",
421
- "error.unresolved": "Command did not run: the Host did not recognize {line}"
481
+ "error.unresolved": "Command did not run: the Host did not recognize {line}",
482
+ "error.fallback.transport": "command failed",
483
+ "error.fallback.rejected": "command rejected",
484
+ "error.fallback.unknown": "unknown error",
485
+ "error.fallback.unresolved": "the Host did not recognize the command"
422
486
  };
423
487
 
424
488
  // packages/client-ui/src/client/styles.ts
@@ -648,22 +712,71 @@ window.__ModuleLoader__.load({
648
712
  clip: rect(0 0 0 0);
649
713
  white-space: nowrap;
650
714
  }
715
+
716
+ /* Sidebar Session-row mark: a non-interactive glyph after the row's time
717
+ label. The seat is inline inside the row's 20px line box, so the icon can
718
+ never change the row height or the title's ellipsis width. */
719
+ .devlead-row-mark {
720
+ display: inline-flex;
721
+ flex: none;
722
+ align-items: center;
723
+ color: var(--dsw-alias-label-secondary, GrayText);
724
+ }
725
+
726
+ /* Hover-card line explaining the mark; mirrors the shell's hover status rows
727
+ (12px text on a 20px line) so the card keeps one rhythm. */
728
+ .devlead-row-hover {
729
+ display: flex;
730
+ align-items: center;
731
+ gap: 8px;
732
+ font-size: 12px;
733
+ line-height: 20px;
734
+ color: var(--dsw-alias-label-secondary, GrayText);
735
+ }
736
+
737
+ .devlead-row-hover-glyph {
738
+ display: inline-flex;
739
+ flex: none;
740
+ align-items: center;
741
+ }
651
742
  `;
743
+ var STYLE_TAG_STATE = /* @__PURE__ */ Symbol.for("@yankeguo/dsh-client-ui-devlead.style-tag");
744
+ function styleTagState() {
745
+ const store = globalThis;
746
+ const existing = store[STYLE_TAG_STATE];
747
+ if (existing !== void 0) return existing;
748
+ const created = { refs: 0, element: void 0 };
749
+ store[STYLE_TAG_STATE] = created;
750
+ return created;
751
+ }
752
+ function resolveStyleTag(state) {
753
+ const known = state.element;
754
+ if (known !== void 0 && known.isConnected) return known;
755
+ const adopted = document.head.querySelector(
756
+ `style[${STYLE_ATTRIBUTE}="${STYLE_KEY}"]`
757
+ );
758
+ if (adopted !== null) return adopted;
759
+ const created = document.createElement("style");
760
+ created.setAttribute(STYLE_ATTRIBUTE, STYLE_KEY);
761
+ document.head.appendChild(created);
762
+ return created;
763
+ }
652
764
  function ensureStyleTag() {
653
765
  if (typeof document === "undefined") return () => {
654
766
  };
655
- const existing = document.head.querySelector(`style[${STYLE_ATTRIBUTE}="${STYLE_KEY}"]`);
656
- if (existing !== null) {
657
- if (existing.textContent !== styles) existing.textContent = styles;
658
- return () => {
659
- };
660
- }
661
- const element = document.createElement("style");
662
- element.setAttribute(STYLE_ATTRIBUTE, STYLE_KEY);
663
- element.textContent = styles;
664
- document.head.appendChild(element);
767
+ const state = styleTagState();
768
+ const element = resolveStyleTag(state);
769
+ state.element = element;
770
+ state.refs += 1;
771
+ if (element.textContent !== styles) element.textContent = styles;
772
+ let released = false;
665
773
  return () => {
774
+ if (released) return;
775
+ released = true;
776
+ state.refs = Math.max(0, state.refs - 1);
777
+ if (state.refs > 0) return;
666
778
  element.remove();
779
+ if (state.element === element) state.element = void 0;
667
780
  };
668
781
  }
669
782
 
@@ -694,6 +807,20 @@ window.__ModuleLoader__.load({
694
807
  locale: NS,
695
808
  inject: face
696
809
  }, DevLeadBar));
810
+ ctx.slots.inject("sidebar.session.row.trailing", () => ctx.slots.register({
811
+ name: "sidebar.session.row.trailing",
812
+ id: "devlead",
813
+ // After the shipped/experimental trailing marks; no shipped entry occupies
814
+ // this id, so the order only sequences additive contributions.
815
+ order: 20,
816
+ locale: NS
817
+ }, DevLeadSessionMark));
818
+ ctx.slots.inject("sidebar.session.row.hover", () => ctx.slots.register({
819
+ name: "sidebar.session.row.hover",
820
+ id: "devlead",
821
+ order: 20,
822
+ locale: NS
823
+ }, DevLeadSessionHoverMark));
697
824
  }
698
825
 
699
826
  return module.exports;
package/locale/en.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "meta": {
3
3
  "title": "DevLead mode",
4
- "description": "Toggles DevLead mode from the composer toolbar; once enabled, a status strip above the composer shows watched sessions and the latest notification."
4
+ "description": "Toggles DevLead mode from the composer toolbar; once enabled, a status strip appears above the composer and the Session is marked in the sidebar list."
5
5
  }
6
6
  }
package/locale/zh.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "meta": {
3
3
  "title": "DevLead 模式",
4
- "description": "在输入框工具条中开关 DevLead 模式;开启后在输入框上方显示状态条、监督会话状态与最近一条通知。"
4
+ "description": "在输入框工具条中开关 DevLead 模式;开启后在输入框上方显示状态条,并在侧边栏会话行标记该会话。"
5
5
  }
6
6
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@yankeguo/dsh-client-ui-devlead",
3
- "version": "0.1.1",
4
- "description": "DevLead surfaces: a compact composer-toolbar switch while off, and the full status strip above the composer while the mode is on.",
3
+ "version": "0.2.0",
4
+ "description": "DevLead surfaces: a compact composer-toolbar switch while off, the full 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",
7
7
  "main": "lib/index.js",
@@ -13,7 +13,8 @@
13
13
  },
14
14
  "files": [
15
15
  "lib",
16
- "locale/*.json"
16
+ "locale/*.json",
17
+ "README.md"
17
18
  ],
18
19
  "dsh": {
19
20
  "client": {
@@ -24,7 +25,8 @@
24
25
  "@deepseek-ai/dsh-client-ui-conversation",
25
26
  "@deepseek-ai/dsh-client-ui-primitives",
26
27
  "@deepseek-ai/dsh-client-ui-renderer",
27
- "@deepseek-ai/dsh-client-ui-session"
28
+ "@deepseek-ai/dsh-client-ui-session",
29
+ "@deepseek-ai/dsh-client-ui-workspace"
28
30
  ],
29
31
  "platform": "web"
30
32
  }
@@ -33,7 +35,7 @@
33
35
  "@deepseek-ai/cordis": "~4.1.0"
34
36
  },
35
37
  "dependencies": {
36
- "@yankeguo/dsh-devlead-protocol": "0.1.1"
38
+ "@yankeguo/dsh-devlead-protocol": "0.2.0"
37
39
  },
38
40
  "engines": {
39
41
  "dsh": ">=0.2.2-rc.1 <0.3.0"