@lynn123411/dsh-notify-user 0.5.7 → 0.5.8
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 +9 -7
- package/lib/client.js +125 -83
- package/lib/client.js.map +3 -3
- package/lib/index.js +1 -1
- package/lib/index.js.map +2 -2
- package/package.json +28 -28
package/README.md
CHANGED
|
@@ -24,13 +24,13 @@ dsh plugin --profile web add @lynn123411/dsh-notify-user
|
|
|
24
24
|
|
|
25
25
|
一个会话开不开由 `enabledFor(sessionOverrides, defaultEnabled, sessionId)` 回答:会话有自己的记录就用它,否则用默认值。判定是纯函数,宿主与浏览器两半边共用 `src/shared/config.ts` 里那一份。
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
会话选择保存在插件配置的 `sessionOverrides` 字典里。会话继承配置中已有的该会话值,缺省时使用 `defaultEnabled`。切回继承值会移除这次设置的覆盖。
|
|
28
28
|
|
|
29
29
|
关掉之后两处一起变:催办状态机不催,计数一并清零,重新打开从零开始;`notify_user` 用 `ctx.tools.register(def, { when })` 按会话收放,关掉的会话在这一步的声明与派发里都没有它。
|
|
30
30
|
|
|
31
31
|
子代理会话没有汇报工具和催办,也不显示这个开关。判定同时看当前会话快照的 `subagent` 与会话列表里的 `origin`。
|
|
32
32
|
|
|
33
|
-
|
|
33
|
+
点开关会立即显示所选值,当前会话的开关在保存期间暂时禁用。每次保存只改当前会话。另一处先改了其他会话时,插件用新的配置修订号再尝试一次。保存失败时,开关恢复为宿主上的值并提示重试。
|
|
34
34
|
|
|
35
35
|
## 配置
|
|
36
36
|
|
|
@@ -39,8 +39,8 @@ dsh plugin --profile web add @lynn123411/dsh-notify-user
|
|
|
39
39
|
| 字段 | 默认 | 范围 | 说明 |
|
|
40
40
|
| --- | --- | --- | --- |
|
|
41
41
|
| `defaultEnabled` | true | 布尔 | 会话没有自己的选择时,主动汇报开不开。 |
|
|
42
|
-
| `sessionOverrides` | `{}` | 会话 id → 布尔 |
|
|
43
|
-
| `nudgeAfter` | 10 | 0–100 |
|
|
42
|
+
| `sessionOverrides` | `{}` | 会话 id → 布尔 | 按会话覆盖继承值。 |
|
|
43
|
+
| `nudgeAfter` | 10 | 0–100 | 配置页的催办阈值接受 1–100 次根工具调用。关闭「催办提醒」写入 0,仍可主动汇报。重新打开后从默认的 10 次开始。 |
|
|
44
44
|
| `resetOnProse` | true | 布尔 | 助手消息里写了正文就清零计数。 |
|
|
45
45
|
| `collapsible` | true | 布尔 | 卡片带不带折叠键;关掉后正文始终展开。 |
|
|
46
46
|
| `summaryOnly` | false | 布尔 | 模型只写一行标题,卡片只显示标题行。 |
|
|
@@ -51,6 +51,8 @@ dsh plugin --profile web add @lynn123411/dsh-notify-user
|
|
|
51
51
|
|
|
52
52
|
配置卡把 `summaryOnly` 画成「结构化正文 / 只报摘要」两选一,把 `collapsible` 与 `bodyExpandedByDefault` 合成「始终展开 / 默认收起 / 默认展开」三选一,把 `showTime` 画成一个开关;只报摘要时「正文显示」整行不出现,改出现「摘要呈现」,摘要按散文渲染时根本不画卡片,「显示时间」整行随之不出现。
|
|
53
53
|
|
|
54
|
+
催办阈值在按 Enter 或离开输入框时保存。如果保存失败,输入会保留。再次进入输入框后按 Enter 或离开,即可重试同一个值。
|
|
55
|
+
|
|
54
56
|
字段都标了 `.volatile()`:改它们不重挂这条 loader entry。催办状态机每次 `pre-step` 现读 `nudgeAfter`、`summaryOnly` 与 `defaultEnabled`/`sessionOverrides`;浏览器用宿主下发的同步配置引用决定进度卡的位置、汇报形态、展开方式和时间显示。配置页与会话开关通过配置表单读写。
|
|
55
57
|
|
|
56
58
|
宿主没服务这份配置时卡片整块不出现。插件同时用 `ctx.settings.configure({ auto: false })` 关掉内核按 schema 自动生成的那份设置页。
|
|
@@ -149,9 +151,9 @@ cd plugins/dsh-notify-user && pnpm check
|
|
|
149
151
|
- `smoke-host.mjs`:真 cordis + 真 `ToolRuntime`,断言配置形状、工具注册与执行、装配行,以及催办接线在真 `ctx.waterfall` 下的行为(满阈值注入、汇报/散文/新回合/用户插话/阈值 0 清零、只有思考块不清零、失败尝试不清零、散文开关关掉不清零、上下文注入不清零、PTC 子调用不计数、嵌套汇报清零、子代理不注入、下游拒绝时不追加),以及按会话开关、零阈值仍可汇报,以及直接和 PTC 调用失败后保留计数、重试成功后清零。
|
|
150
152
|
- `smoke-client.mjs`:按 Web shell 方式装载浏览器 bundle,断言对话节点定义、位置切换会重挂定义、四处座位注册(进度卡、跟随工具行、菜单开关、配置卡)、同步展示配置、字典键集与「未声明服务读取会抛」的守卫。
|
|
151
153
|
- `test-nudge.mjs`:催办状态机的纯逻辑(阈值、四条清零路径、阈值与散文开关现读、按会话隔离、散文判定、开关关掉时不催且计数清零)。
|
|
152
|
-
- `test-config.mjs
|
|
153
|
-
- `test-render.mjs
|
|
154
|
-
- `test-card.mjs
|
|
154
|
+
- `test-config.mjs` 验证按会话开关的纯逻辑,包括默认值、会话选择优先,以及忽略无效值与原型属性。
|
|
155
|
+
- `test-render.mjs` 用 React 和 jsdom 验证会话开关的继承规则、不同会话并发保存、修订号冲突、失败回退、保存期间禁用和可见条件。
|
|
156
|
+
- `test-card.mjs` 用 React 和 jsdom 验证进度卡与配置卡,包括阈值保存失败后的草稿与重试、并发编辑、摘要与正文呈现、默认展开和宿主错误提示。
|
|
155
157
|
- `test-row-model.mjs`:进度卡数据视图的三条来路(`meta` / PTC 参数 / start 参数)与标题回退。
|
|
156
158
|
- `test-notify-node.mjs`:对话节点定义的认领范围、节点位置与卡片数据(原生调用、结果落定、流式增量与块结束、PTC 子调用、直接调用失败、PTC 失败交给原生行、结果先到、没有正文时的兜底)。
|
|
157
159
|
- `assert-lib-untracked.mjs`:`lib/` 是构建镜像,不入 git。
|
package/lib/client.js
CHANGED
|
@@ -44,21 +44,9 @@ var CARD_PLACEMENTS = ["boundary", "inline"];
|
|
|
44
44
|
var DEFAULT_CARD_PLACEMENT = "boundary";
|
|
45
45
|
var DEFAULT_ENABLED = true;
|
|
46
46
|
function enabledFor(overrides, fallback, sessionId) {
|
|
47
|
-
const explicit = overrides
|
|
47
|
+
const explicit = overrides !== void 0 && Object.hasOwn(overrides, sessionId) ? overrides[sessionId] : void 0;
|
|
48
48
|
return typeof explicit === "boolean" ? explicit : fallback;
|
|
49
49
|
}
|
|
50
|
-
function overridesAfterWrite(overrides, sessionId, enabled, fallback) {
|
|
51
|
-
const current = overrides ?? {};
|
|
52
|
-
const hasEntry = Object.hasOwn(current, sessionId);
|
|
53
|
-
if (enabled === fallback) {
|
|
54
|
-
if (!hasEntry) return current;
|
|
55
|
-
const next = { ...current };
|
|
56
|
-
delete next[sessionId];
|
|
57
|
-
return next;
|
|
58
|
-
}
|
|
59
|
-
if (hasEntry && current[sessionId] === enabled) return current;
|
|
60
|
-
return { ...current, [sessionId]: enabled };
|
|
61
|
-
}
|
|
62
50
|
|
|
63
51
|
// src/client/ConfigCard.tsx
|
|
64
52
|
var import_react = require("react");
|
|
@@ -71,6 +59,37 @@ var MODEL_OPTIONS_SLOT = "conversation.input.model.options";
|
|
|
71
59
|
function isRecord(value) {
|
|
72
60
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
73
61
|
}
|
|
62
|
+
var writeQueues = /* @__PURE__ */ new WeakMap();
|
|
63
|
+
function enqueueConfigWrite(form, operation) {
|
|
64
|
+
const task = (writeQueues.get(form) ?? Promise.resolve()).then(operation);
|
|
65
|
+
writeQueues.set(form, task.catch(() => false));
|
|
66
|
+
return task;
|
|
67
|
+
}
|
|
68
|
+
function sessionOverride(section, sessionId) {
|
|
69
|
+
const overrides = isRecord(section) ? section["sessionOverrides"] : void 0;
|
|
70
|
+
return isRecord(overrides) && Object.hasOwn(overrides, sessionId) ? overrides[sessionId] : void 0;
|
|
71
|
+
}
|
|
72
|
+
function mutateSessionEnabled(form, snapshot, sessionId, enabled) {
|
|
73
|
+
const config = decodeConfig(snapshot.value);
|
|
74
|
+
const inherited = sessionOverride(snapshot.base, sessionId);
|
|
75
|
+
const path = ["sessionOverrides", sessionId];
|
|
76
|
+
const op = enabled === (typeof inherited === "boolean" ? inherited : config.defaultEnabled) ? { op: "unset", path } : { op: "set", path, value: enabled };
|
|
77
|
+
return form.mutate([op], snapshot.revision);
|
|
78
|
+
}
|
|
79
|
+
function writeSessionEnabled(form, sessionId, enabled) {
|
|
80
|
+
return enqueueConfigWrite(form, async () => {
|
|
81
|
+
const snapshot = form.getSnapshot();
|
|
82
|
+
if (snapshot.status !== "ready") return false;
|
|
83
|
+
if (await mutateSessionEnabled(form, snapshot, sessionId, enabled)) return true;
|
|
84
|
+
const latest = form.getSnapshot();
|
|
85
|
+
if (latest.status !== "ready" || latest.revision === snapshot.revision) return false;
|
|
86
|
+
const config = decodeConfig(latest.value);
|
|
87
|
+
const currentOverride = sessionOverride(latest.value, sessionId);
|
|
88
|
+
if ((typeof currentOverride === "boolean" ? currentOverride : config.defaultEnabled) === enabled) return true;
|
|
89
|
+
if (sessionOverride(latest.user, sessionId) !== sessionOverride(snapshot.user, sessionId)) return false;
|
|
90
|
+
return mutateSessionEnabled(form, latest, sessionId, enabled);
|
|
91
|
+
});
|
|
92
|
+
}
|
|
74
93
|
var DEFAULT_CLIENT_CONFIG = {
|
|
75
94
|
nudgeAfter: DEFAULT_NUDGE_AFTER,
|
|
76
95
|
resetOnProse: DEFAULT_RESET_ON_PROSE,
|
|
@@ -91,10 +110,12 @@ function readOverrides(value) {
|
|
|
91
110
|
}
|
|
92
111
|
return overrides;
|
|
93
112
|
}
|
|
94
|
-
function readConfig(
|
|
95
|
-
const snapshot = form.getSnapshot();
|
|
113
|
+
function readConfig(snapshot) {
|
|
96
114
|
if (snapshot.status === "unavailable") return void 0;
|
|
97
|
-
|
|
115
|
+
return decodeConfig(snapshot.value);
|
|
116
|
+
}
|
|
117
|
+
function decodeConfig(section) {
|
|
118
|
+
const value = isRecord(section) ? section : {};
|
|
98
119
|
const rawThreshold = value["nudgeAfter"];
|
|
99
120
|
const nudgeAfter = typeof rawThreshold === "number" && Number.isFinite(rawThreshold) ? Math.min(MAX_NUDGE_AFTER, Math.max(0, Math.floor(rawThreshold))) : DEFAULT_CLIENT_CONFIG.nudgeAfter;
|
|
100
121
|
const rawResetOnProse = value["resetOnProse"];
|
|
@@ -138,6 +159,21 @@ function bodyModeOf(config) {
|
|
|
138
159
|
if (!config.collapsible) return "always";
|
|
139
160
|
return config.bodyExpandedByDefault ? "expanded" : "collapsed";
|
|
140
161
|
}
|
|
162
|
+
function parseThreshold(text) {
|
|
163
|
+
const value = Number(text);
|
|
164
|
+
return Number.isInteger(value) && value >= 1 && value <= MAX_NUDGE_AFTER ? value : void 0;
|
|
165
|
+
}
|
|
166
|
+
function writeThreshold(form, next) {
|
|
167
|
+
return enqueueConfigWrite(form, async () => {
|
|
168
|
+
const snapshot = form.getSnapshot();
|
|
169
|
+
if (snapshot.status !== "ready") return false;
|
|
170
|
+
const current = readConfig(snapshot)?.nudgeAfter;
|
|
171
|
+
if (current === void 0 || current === 0) return false;
|
|
172
|
+
return current === next || await form.mutate([
|
|
173
|
+
{ op: "set", path: ["nudgeAfter"], value: next }
|
|
174
|
+
], snapshot.revision);
|
|
175
|
+
});
|
|
176
|
+
}
|
|
141
177
|
function ChoiceGroup({ label, options, value, onSelect }) {
|
|
142
178
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "dsh-notify-config-field", role: "group", "aria-label": label, children: options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
143
179
|
import_dsh_client_ui_primitives.Pill,
|
|
@@ -154,73 +190,70 @@ function ChoiceGroup({ label, options, value, onSelect }) {
|
|
|
154
190
|
}
|
|
155
191
|
function ConfigCard(props) {
|
|
156
192
|
const { form, t } = props;
|
|
157
|
-
const [config, setConfig] = (0, import_react.useState)(() => readConfig(form));
|
|
158
|
-
const [
|
|
193
|
+
const [config, setConfig] = (0, import_react.useState)(() => readConfig(form.getSnapshot()));
|
|
194
|
+
const [draft, setDraft] = (0, import_react.useState)();
|
|
159
195
|
const [error, setError] = (0, import_react.useState)(null);
|
|
160
196
|
const [bodyModeDraft, setBodyModeDraft] = (0, import_react.useState)();
|
|
161
|
-
const draftRef = (0, import_react.useRef)(
|
|
162
|
-
const
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
setError(t("config.write.failed"));
|
|
170
|
-
}
|
|
171
|
-
});
|
|
172
|
-
return queueRef.current;
|
|
197
|
+
const draftRef = (0, import_react.useRef)(void 0);
|
|
198
|
+
const updateDraft = (next) => {
|
|
199
|
+
draftRef.current = next;
|
|
200
|
+
setDraft(next);
|
|
201
|
+
};
|
|
202
|
+
const enqueue = async (operation) => {
|
|
203
|
+
const accepted = await enqueueConfigWrite(form, operation).catch(() => false);
|
|
204
|
+
setError(accepted ? null : t("config.write.failed"));
|
|
173
205
|
};
|
|
174
206
|
(0, import_react.useEffect)(() => {
|
|
175
207
|
const sync = () => {
|
|
176
|
-
const next = readConfig(form);
|
|
208
|
+
const next = readConfig(form.getSnapshot());
|
|
177
209
|
setConfig(next);
|
|
178
|
-
if (next !== void 0)
|
|
210
|
+
if (next?.nudgeAfter === 0 && draftRef.current !== void 0) {
|
|
211
|
+
draftRef.current = void 0;
|
|
212
|
+
setDraft(void 0);
|
|
213
|
+
}
|
|
179
214
|
};
|
|
180
215
|
sync();
|
|
181
216
|
return form.subscribe(sync);
|
|
182
217
|
}, [form]);
|
|
183
|
-
(0, import_react.useEffect)(() => {
|
|
184
|
-
draftRef.current = text;
|
|
185
|
-
}, [text]);
|
|
186
|
-
(0, import_react.useEffect)(() => {
|
|
187
|
-
committedRef.current = config?.nudgeAfter;
|
|
188
|
-
}, [config?.nudgeAfter]);
|
|
189
218
|
(0, import_react.useEffect)(() => () => {
|
|
190
|
-
const
|
|
191
|
-
if (
|
|
192
|
-
const next =
|
|
193
|
-
if (next !==
|
|
219
|
+
const draft2 = draftRef.current;
|
|
220
|
+
if (draft2?.status !== "editing") return;
|
|
221
|
+
const next = parseThreshold(draft2.text);
|
|
222
|
+
if (next !== void 0) void writeThreshold(form, next).catch(() => false);
|
|
194
223
|
}, [form]);
|
|
195
224
|
if (config === void 0) {
|
|
196
225
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "dsh-notify-config", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "dsh-notify-config-note", children: t("config.unavailable") }) });
|
|
197
226
|
}
|
|
198
227
|
const bodyMode = bodyModeDraft?.mode ?? bodyModeOf(config);
|
|
199
228
|
const drawsCard = !(config.summaryOnly && config.summaryRender === "prose");
|
|
229
|
+
const displayedError = draft?.status === "rejected" ? t("config.write.failed") : error;
|
|
200
230
|
const write = (field, value) => {
|
|
201
231
|
void enqueue(() => form.set(field, value));
|
|
202
232
|
};
|
|
203
233
|
const chooseBodyMode = (mode) => {
|
|
204
|
-
const
|
|
205
|
-
setBodyModeDraft(
|
|
234
|
+
const draft2 = { mode };
|
|
235
|
+
setBodyModeDraft(draft2);
|
|
206
236
|
void enqueue(() => form.mutate([
|
|
207
237
|
{ op: "set", path: ["collapsible"], value: mode !== "always" },
|
|
208
238
|
{ op: "set", path: ["bodyExpandedByDefault"], value: mode === "expanded" }
|
|
209
239
|
])).then(() => {
|
|
210
|
-
setBodyModeDraft((current) => current ===
|
|
240
|
+
setBodyModeDraft((current) => current === draft2 ? void 0 : current);
|
|
211
241
|
});
|
|
212
242
|
};
|
|
213
243
|
const commitThreshold = () => {
|
|
214
|
-
const
|
|
215
|
-
if (
|
|
216
|
-
|
|
244
|
+
const current = draftRef.current;
|
|
245
|
+
if (current === void 0 || current.status === "pending") return;
|
|
246
|
+
const next = parseThreshold(current.text);
|
|
247
|
+
if (next === void 0 || config.nudgeAfter === 0) {
|
|
248
|
+
updateDraft();
|
|
217
249
|
return;
|
|
218
250
|
}
|
|
219
|
-
const
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
251
|
+
const pending = { ...current, status: "pending" };
|
|
252
|
+
updateDraft(pending);
|
|
253
|
+
void writeThreshold(form, next).catch(() => false).then((accepted) => {
|
|
254
|
+
if (draftRef.current !== pending) return;
|
|
255
|
+
updateDraft(accepted ? void 0 : { ...pending, status: "rejected" });
|
|
256
|
+
});
|
|
224
257
|
};
|
|
225
258
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "dsh-notify-config", children: [
|
|
226
259
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "dsh-notify-config-row", children: [
|
|
@@ -241,6 +274,22 @@ function ConfigCard(props) {
|
|
|
241
274
|
) })
|
|
242
275
|
] }),
|
|
243
276
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "dsh-notify-config-row", children: [
|
|
277
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "dsh-notify-config-info", children: [
|
|
278
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "dsh-notify-config-label", children: t("config.nudgeEnabled.label") }),
|
|
279
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "dsh-notify-config-hint", children: t("config.nudgeEnabled.hint") })
|
|
280
|
+
] }),
|
|
281
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "dsh-notify-config-field", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
282
|
+
import_dsh_client_ui_primitives.Switch,
|
|
283
|
+
{
|
|
284
|
+
checked: config.nudgeAfter > 0,
|
|
285
|
+
label: t("config.nudgeEnabled.label"),
|
|
286
|
+
onChange: (next) => {
|
|
287
|
+
write("nudgeAfter", next ? DEFAULT_NUDGE_AFTER : 0);
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
) })
|
|
291
|
+
] }),
|
|
292
|
+
config.nudgeAfter > 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "dsh-notify-config-row", children: [
|
|
244
293
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "dsh-notify-config-info", children: [
|
|
245
294
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "dsh-notify-config-label", children: t("config.threshold.label") }),
|
|
246
295
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "dsh-notify-config-hint", children: t("config.threshold.hint") })
|
|
@@ -252,13 +301,13 @@ function ConfigCard(props) {
|
|
|
252
301
|
className: "dsh-notify-config-input",
|
|
253
302
|
type: "number",
|
|
254
303
|
inputMode: "numeric",
|
|
255
|
-
min:
|
|
304
|
+
min: 1,
|
|
256
305
|
max: MAX_NUDGE_AFTER,
|
|
257
306
|
step: 1,
|
|
258
|
-
value: text,
|
|
307
|
+
value: draft?.text ?? String(config.nudgeAfter),
|
|
259
308
|
"aria-label": t("config.threshold.label"),
|
|
260
309
|
onChange: (event) => {
|
|
261
|
-
|
|
310
|
+
updateDraft({ text: event.target.value, status: "editing" });
|
|
262
311
|
},
|
|
263
312
|
onBlur: commitThreshold,
|
|
264
313
|
onKeyDown: (event) => {
|
|
@@ -268,7 +317,7 @@ function ConfigCard(props) {
|
|
|
268
317
|
),
|
|
269
318
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "dsh-notify-config-unit", children: t("config.threshold.unit") })
|
|
270
319
|
] })
|
|
271
|
-
] }),
|
|
320
|
+
] }) : null,
|
|
272
321
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "dsh-notify-config-row", children: [
|
|
273
322
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "dsh-notify-config-info", children: [
|
|
274
323
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "dsh-notify-config-label", children: t("config.resetOnProse.label") }),
|
|
@@ -378,7 +427,7 @@ function ConfigCard(props) {
|
|
|
378
427
|
}
|
|
379
428
|
) })
|
|
380
429
|
] }) : null,
|
|
381
|
-
|
|
430
|
+
displayedError === null ? null : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "dsh-notify-config-error", role: "status", children: displayedError })
|
|
382
431
|
] });
|
|
383
432
|
}
|
|
384
433
|
|
|
@@ -391,14 +440,14 @@ function EnabledToggle(props) {
|
|
|
391
440
|
const addressedChild = useSession((snapshot) => snapshot.subagent !== null);
|
|
392
441
|
const listedChild = useSessions((state) => state.byId[sessionId]?.origin === "subagent");
|
|
393
442
|
if (addressedChild || listedChild) return null;
|
|
394
|
-
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(RootEnabledToggle, { ...props });
|
|
443
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(RootEnabledToggle, { ...props }, sessionId);
|
|
395
444
|
}
|
|
396
445
|
function RootEnabledToggle({ sessionId, form, locked, reportFailure, t }) {
|
|
397
|
-
const [config, setConfig] = (0, import_react2.useState)(() => readConfig(form));
|
|
398
|
-
const [pending, setPending] = (0, import_react2.useState)(
|
|
446
|
+
const [config, setConfig] = (0, import_react2.useState)(() => readConfig(form.getSnapshot()));
|
|
447
|
+
const [pending, setPending] = (0, import_react2.useState)();
|
|
399
448
|
(0, import_react2.useEffect)(() => {
|
|
400
449
|
const sync = () => {
|
|
401
|
-
setConfig(readConfig(form));
|
|
450
|
+
setConfig(readConfig(form.getSnapshot()));
|
|
402
451
|
};
|
|
403
452
|
sync();
|
|
404
453
|
return form.subscribe(sync);
|
|
@@ -406,23 +455,12 @@ function RootEnabledToggle({ sessionId, form, locked, reportFailure, t }) {
|
|
|
406
455
|
if (config === void 0) return null;
|
|
407
456
|
const enabled = enabledFor(config.sessionOverrides, config.defaultEnabled, sessionId);
|
|
408
457
|
const select = (next) => {
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
(
|
|
415
|
-
if (!accepted) {
|
|
416
|
-
setConfig(readConfig(form));
|
|
417
|
-
reportFailure(t("toggle.failed"));
|
|
418
|
-
}
|
|
419
|
-
},
|
|
420
|
-
() => {
|
|
421
|
-
setConfig(readConfig(form));
|
|
422
|
-
reportFailure(t("toggle.failed"));
|
|
423
|
-
}
|
|
424
|
-
).finally(() => {
|
|
425
|
-
setPending(false);
|
|
458
|
+
setPending(next);
|
|
459
|
+
void writeSessionEnabled(form, sessionId, next).catch(() => false).then((accepted) => {
|
|
460
|
+
setConfig(readConfig(form.getSnapshot()));
|
|
461
|
+
if (!accepted) reportFailure(t("toggle.failed"));
|
|
462
|
+
}).finally(() => {
|
|
463
|
+
setPending(void 0);
|
|
426
464
|
});
|
|
427
465
|
};
|
|
428
466
|
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "dsh-notify-toggle-row", children: [
|
|
@@ -434,8 +472,8 @@ function RootEnabledToggle({ sessionId, form, locked, reportFailure, t }) {
|
|
|
434
472
|
import_dsh_client_ui_primitives2.Switch,
|
|
435
473
|
{
|
|
436
474
|
className: "dsh-notify-toggle-switch",
|
|
437
|
-
checked: enabled,
|
|
438
|
-
disabled: locked || pending,
|
|
475
|
+
checked: pending ?? enabled,
|
|
476
|
+
disabled: locked || pending !== void 0,
|
|
439
477
|
label: t("toggle.label"),
|
|
440
478
|
onChange: select
|
|
441
479
|
}
|
|
@@ -459,7 +497,9 @@ var en = {
|
|
|
459
497
|
"config.defaultEnabled.label": "On by default",
|
|
460
498
|
"config.defaultEnabled.hint": "New sessions start with proactive updates on; change a single session in the model and reasoning menu.",
|
|
461
499
|
"config.threshold.label": "Nudge after",
|
|
462
|
-
"config.threshold.hint": "Tool calls without an update before the model is nudged
|
|
500
|
+
"config.threshold.hint": "Tool calls without an update before the model is nudged.",
|
|
501
|
+
"config.nudgeEnabled.label": "Nudge for updates",
|
|
502
|
+
"config.nudgeEnabled.hint": "The model can still send updates when nudging is off.",
|
|
463
503
|
"config.threshold.unit": "calls",
|
|
464
504
|
"config.resetOnProse.label": "Reset on prose",
|
|
465
505
|
"config.resetOnProse.hint": "Any assistant reply with text counts as an update and resets the count; turn it off to reset only on a successful update, a new turn, or a user message.",
|
|
@@ -499,7 +539,9 @@ var zh = {
|
|
|
499
539
|
"config.defaultEnabled.label": "\u9ED8\u8BA4\u5F00\u542F",
|
|
500
540
|
"config.defaultEnabled.hint": "\u65B0\u4F1A\u8BDD\u9ED8\u8BA4\u6253\u5F00\u4E3B\u52A8\u6C47\u62A5\uFF1B\u5355\u4E2A\u4F1A\u8BDD\u7684\u5F00\u5173\u5728\u6A21\u578B\u4E0E\u63A8\u7406\u7B49\u7EA7\u83DC\u5355\u91CC\u3002",
|
|
501
541
|
"config.threshold.label": "\u50AC\u529E\u9608\u503C",
|
|
502
|
-
"config.threshold.hint": "\u8FDE\u7EED\u591A\u5C11\u6B21\u5DE5\u5177\u8C03\u7528\u6CA1\u6709\u6C47\u62A5\u65F6\u50AC\u4E00\u6B21\
|
|
542
|
+
"config.threshold.hint": "\u8FDE\u7EED\u591A\u5C11\u6B21\u5DE5\u5177\u8C03\u7528\u6CA1\u6709\u6C47\u62A5\u65F6\u50AC\u4E00\u6B21\u3002",
|
|
543
|
+
"config.nudgeEnabled.label": "\u50AC\u529E\u63D0\u9192",
|
|
544
|
+
"config.nudgeEnabled.hint": "\u5173\u95ED\u50AC\u529E\u540E\uFF0C\u6A21\u578B\u4ECD\u53EF\u4E3B\u52A8\u6C47\u62A5\u3002",
|
|
503
545
|
"config.threshold.unit": "\u6B21",
|
|
504
546
|
"config.resetOnProse.label": "\u6563\u6587\u56DE\u590D\u6E05\u96F6",
|
|
505
547
|
"config.resetOnProse.hint": "\u6A21\u578B\u5728\u52A9\u624B\u6D88\u606F\u91CC\u5199\u4E86\u6B63\u6587\u5C31\u7B97\u6C47\u62A5\u8FC7\uFF0C\u8BA1\u6570\u6E05\u96F6\uFF1B\u5173\u6389\u540E\u53EA\u5728\u6C47\u62A5\u6210\u529F\u3001\u65B0\u56DE\u5408\u6216\u7528\u6237\u63D2\u8BDD\u65F6\u6E05\u96F6\u3002",
|
package/lib/client.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/client/index.ts", "../src/shared/config.ts", "../src/client/ConfigCard.tsx", "../src/client/config.ts", "../src/client/EnabledToggle.tsx", "../src/client/locales.ts", "../src/client/row-model.ts", "../src/client/notify-node.ts", "../src/client/NotifyCard.tsx", "../src/client/NotifyNodeView.tsx", "../src/client/NotifyRow.tsx", "../src/client/ConfigCard.css", "../src/client/NotifyCard.css", "../src/client/EnabledToggle.css"],
|
|
4
|
-
"sourcesContent": ["import type { Context as ClientContext } from '@deepseek-ai/cordis';\nimport type {} from '@deepseek-ai/dsh-client-locale/client';\nimport type {} from '@deepseek-ai/dsh-client-ui-renderer/client';\nimport type {} from '@deepseek-ai/dsh-client-ui-settings/client';\nimport type {} from '@deepseek-ai/dsh-client-ui-plugin-manager/client';\nimport type {} from '@deepseek-ai/dsh-client-ui-tool/client';\nimport type {} from '@deepseek-ai/dsh-client-ui-conversation/client';\nimport type { SyncedConfig } from '@deepseek-ai/dsh-client-config/types';\nimport type { PluginConfig } from '../config.js';\nimport { NOTIFY_TOOL_NAME } from '../shared/config.js';\nimport { ConfigCard } from './ConfigCard.js';\nimport {\n BUNDLE_CONFIG_SLOT,\n BUNDLE_NAME,\n DEFAULT_CARD_PLACEMENT,\n MODEL_OPTIONS_SLOT,\n SETTINGS_NAMESPACE,\n} from './config.js';\nimport { EnabledToggle } from './EnabledToggle.js';\nimport { NS, en, zh } from './locales.js';\nimport { NOTIFY_NODE_KIND, createNotifyDefinition } from './notify-node.js';\nimport type { CardHooks } from './NotifyCard.js';\nimport { NotifyNodeView } from './NotifyNodeView.js';\nimport { NotifyRow } from './NotifyRow.js';\nimport configCss from './ConfigCard.css';\nimport cardCss from './NotifyCard.css';\nimport toggleCss from './EnabledToggle.css';\n\nexport { NS } from './locales.js';\n\n\nexport const name = BUNDLE_NAME;\n\nexport const inject = ['configForms', 'slots', 'locale', 'uiConversation'];\n\nconst SHEETS: readonly (readonly [string, string])[] = [\n ['NotifyCard.css', cardCss],\n ['ConfigCard.css', configCss],\n ['EnabledToggle.css', toggleCss],\n];\n\nfunction injectStyles(): void {\n if (typeof document === 'undefined') return;\n for (const [file, css] of SHEETS) {\n const key = `${BUNDLE_NAME}/${file}`;\n const existing = document.head.querySelector<HTMLStyleElement>(`style[data-plugin-css=\"${key}\"]`);\n const tag = existing ?? document.createElement('style');\n tag.dataset.plugin = BUNDLE_NAME;\n tag.dataset.pluginCss = key;\n tag.textContent = css;\n if (existing === null) document.head.appendChild(tag);\n }\n}\n\nfunction removeStyles(): void {\n if (typeof document === 'undefined') return;\n for (const tag of document.head.querySelectorAll(`style[data-plugin=\"${BUNDLE_NAME}\"]`)) tag.remove();\n}\n\nexport function apply(ctx: ClientContext, config: SyncedConfig<PluginConfig>): void {\n const cardHooks: CardHooks = {\n collapsible: config.collapsible,\n summaryOnly: config.summaryOnly,\n summaryRender: config.summaryRender,\n bodyExpandedByDefault: config.bodyExpandedByDefault,\n showTime: config.showTime,\n };\n ctx.effect(() => {\n injectStyles();\n return () => { removeStyles(); };\n }, 'dsh-notify-user: stylesheets');\n\n ctx.effect(() => ctx.locale.register(NS, { zh, en }), 'dsh-notify-user: dictionaries');\n\n ctx.effect(() => {\n let placement: 'boundary' | 'inline' | undefined;\n let dispose: (() => void) | undefined;\n const sync = (): void => {\n const next = config.cardPlacement.get() === 'inline' ? 'inline' : DEFAULT_CARD_PLACEMENT;\n if (next === placement) return;\n dispose?.();\n placement = next;\n dispose = next === 'boundary'\n ? ctx.uiConversation.events.register(createNotifyDefinition())\n : ctx.slots.inject('tool.call.toolview', () => ctx.slots.register({\n name: 'tool.call.toolview',\n key: NOTIFY_TOOL_NAME,\n locale: NS,\n inject: () => ({ hooks: cardHooks }),\n }, NotifyRow));\n };\n sync();\n const unsubscribe = config.cardPlacement.subscribe(sync);\n return () => {\n unsubscribe();\n dispose?.();\n };\n }, 'dsh-notify-user: card placement');\n\n ctx.slots.inject('conversation.chat.node', () => ctx.slots.register({\n name: 'conversation.chat.node',\n key: NOTIFY_NODE_KIND,\n locale: NS,\n inject: () => ({ hooks: cardHooks }),\n }, NotifyNodeView));\n\n ctx.slots.inject(MODEL_OPTIONS_SLOT, () => ctx.slots.register({\n name: MODEL_OPTIONS_SLOT,\n id: 'notify-user-enabled',\n locale: NS,\n inject: () => ({ form: ctx.configForms.get(SETTINGS_NAMESPACE) }),\n }, EnabledToggle));\n\n ctx.effect(() => ctx.configForms.whileServed([SETTINGS_NAMESPACE], () => ctx.slots.inject(\n BUNDLE_CONFIG_SLOT,\n () => ctx.slots.register({\n name: BUNDLE_CONFIG_SLOT,\n key: BUNDLE_NAME,\n locale: NS,\n inject: () => ({ form: ctx.configForms.get(SETTINGS_NAMESPACE) }),\n }, ConfigCard),\n )), 'dsh-notify-user: plugins page config');\n}\n", "\nexport const SETTINGS_NAMESPACE = 'dsh-notify-user';\n\nexport const NOTIFY_TOOL_NAME = 'notify_user';\n\nexport const DEFAULT_NUDGE_AFTER = 10;\n\nexport const MAX_NUDGE_AFTER = 100;\n\nexport const DEFAULT_RESET_ON_PROSE = true;\n\nexport const DEFAULT_COLLAPSIBLE = true;\n\nexport const DEFAULT_SUMMARY_ONLY = false;\n\nexport const DEFAULT_BODY_EXPANDED_BY_DEFAULT = false;\n\nexport const DEFAULT_SHOW_TIME = false;\n\nexport const SUMMARY_ONLY_FIELD = 'summaryOnly';\n\nexport const SUMMARY_RENDERS = ['card', 'prose'] as const;\n\nexport const DEFAULT_SUMMARY_RENDER = 'card';\n\nexport type SummaryRender = typeof SUMMARY_RENDERS[number];\n\nexport const CARD_PLACEMENTS = ['boundary', 'inline'] as const;\n\nexport type CardPlacement = typeof CARD_PLACEMENTS[number];\n\nexport const DEFAULT_CARD_PLACEMENT: CardPlacement = 'boundary';\n\nexport const DEFAULT_ENABLED = true;\n\nexport type SessionOverrides = Readonly<Record<string, boolean>>;\n\nexport function enabledFor(\n overrides: SessionOverrides | undefined,\n fallback: boolean,\n sessionId: string,\n): boolean {\n const explicit = overrides?.[sessionId];\n return typeof explicit === 'boolean' ? explicit : fallback;\n}\n\nexport function overridesAfterWrite(\n overrides: SessionOverrides | undefined,\n sessionId: string,\n enabled: boolean,\n fallback: boolean,\n): SessionOverrides {\n const current = overrides ?? {};\n const hasEntry = Object.hasOwn(current, sessionId);\n if (enabled === fallback) {\n if (!hasEntry) return current;\n const next = { ...current };\n delete next[sessionId];\n return next;\n }\n if (hasEntry && current[sessionId] === enabled) return current;\n return { ...current, [sessionId]: enabled };\n}\n", "import { useEffect, useRef, useState } from 'react';\nimport type { ChangeEvent, KeyboardEvent, ReactElement } from 'react';\nimport { Input, Pill, Switch } from '@deepseek-ai/dsh-client-ui-primitives';\nimport type { PropsLocale } from '@deepseek-ai/dsh-client-ui-slots';\nimport {\n CARD_PLACEMENTS,\n DEFAULT_NUDGE_AFTER,\n MAX_NUDGE_AFTER,\n SUMMARY_RENDERS,\n readConfig,\n type ClientConfig,\n type ConfigForm,\n type SummaryRender,\n} from './config.js';\nimport { NS, type NotifyKey } from './locales.js';\n\n\ntype ConfigCardProps = PropsLocale<typeof NS> & { form: ConfigForm };\n\nconst REPORT_MODES = ['structured', 'summary'] as const;\n\nconst BODY_MODES = ['always', 'collapsed', 'expanded'] as const;\n\ntype BodyMode = typeof BODY_MODES[number];\n\ninterface Choice<T extends string> {\n readonly id: T;\n readonly label: string;\n}\n\nconst REPORT_MODE_LABELS = {\n structured: 'config.reportMode.structured',\n summary: 'config.reportMode.summary',\n} as const satisfies Record<typeof REPORT_MODES[number], NotifyKey>;\n\nconst SUMMARY_RENDER_LABELS = {\n card: 'config.summaryRender.card',\n prose: 'config.summaryRender.prose',\n} as const satisfies Record<SummaryRender, NotifyKey>;\n\nconst BODY_MODE_LABELS = {\n always: 'config.bodyMode.always',\n collapsed: 'config.bodyMode.collapsed',\n expanded: 'config.bodyMode.expanded',\n} as const satisfies Record<BodyMode, NotifyKey>;\n\nfunction bodyModeOf(config: ClientConfig): BodyMode {\n if (!config.collapsible) return 'always';\n return config.bodyExpandedByDefault ? 'expanded' : 'collapsed';\n}\n\nfunction ChoiceGroup<T extends string>({ label, options, value, onSelect }: {\n readonly label: string;\n readonly options: readonly Choice<T>[];\n readonly value: T;\n readonly onSelect: (id: T) => void;\n}): ReactElement {\n return (\n <div className=\"dsh-notify-config-field\" role=\"group\" aria-label={label}>\n {options.map((option) => (\n <Pill\n key={option.id}\n active={value === option.id}\n aria-pressed={value === option.id}\n onClick={() => { if (value !== option.id) onSelect(option.id); }}\n >\n {option.label}\n </Pill>\n ))}\n </div>\n );\n}\n\nexport function ConfigCard(props: ConfigCardProps): ReactElement {\n const { form, t } = props;\n const [config, setConfig] = useState(() => readConfig(form));\n const [text, setText] = useState<string>(() => String(readConfig(form)?.nudgeAfter ?? DEFAULT_NUDGE_AFTER));\n const [error, setError] = useState<string | null>(null);\n const [bodyModeDraft, setBodyModeDraft] = useState<{ mode: BodyMode }>();\n const draftRef = useRef(text);\n const committedRef = useRef(config?.nudgeAfter);\n\n const queueRef = useRef<Promise<void>>(Promise.resolve());\n const enqueue = (operation: () => Promise<boolean>): Promise<void> => {\n queueRef.current = queueRef.current.then(async () => {\n try {\n setError(await operation() ? null : t('config.write.failed'));\n } catch {\n setError(t('config.write.failed'));\n }\n });\n return queueRef.current;\n };\n\n useEffect(() => {\n const sync = (): void => {\n const next = readConfig(form);\n setConfig(next);\n if (next !== undefined) setText(String(next.nudgeAfter));\n };\n sync();\n return form.subscribe(sync);\n }, [form]);\n\n useEffect(() => { draftRef.current = text; }, [text]);\n useEffect(() => { committedRef.current = config?.nudgeAfter; }, [config?.nudgeAfter]);\n useEffect(() => () => {\n const parsed = Number(draftRef.current);\n if (!Number.isFinite(parsed)) return;\n const next = Math.min(MAX_NUDGE_AFTER, Math.max(0, Math.floor(parsed)));\n if (next !== committedRef.current) void enqueue(() => form.set('nudgeAfter', next));\n }, [form]);\n\n if (config === undefined) {\n return (\n <div className=\"dsh-notify-config\">\n <div className=\"dsh-notify-config-note\">{t('config.unavailable')}</div>\n </div>\n );\n }\n\n const bodyMode = bodyModeDraft?.mode ?? bodyModeOf(config);\n const drawsCard = !(config.summaryOnly && config.summaryRender === 'prose');\n\n const write = (field: string, value: unknown): void => { void enqueue(() => form.set(field, value)); };\n\n const chooseBodyMode = (mode: BodyMode): void => {\n const draft = { mode };\n setBodyModeDraft(draft);\n void enqueue(() => form.mutate([\n { op: 'set', path: ['collapsible'], value: mode !== 'always' },\n { op: 'set', path: ['bodyExpandedByDefault'], value: mode === 'expanded' },\n ])).then(() => {\n setBodyModeDraft((current) => current === draft ? undefined : current);\n });\n };\n\n const commitThreshold = (): void => {\n const parsed = Number(text);\n if (!Number.isFinite(parsed)) {\n setText(String(config.nudgeAfter));\n return;\n }\n const next = Math.min(MAX_NUDGE_AFTER, Math.max(0, Math.floor(parsed)));\n setText(String(next));\n if (next === config.nudgeAfter) return;\n setConfig({ ...config, nudgeAfter: next });\n write('nudgeAfter', next);\n };\n\n return (\n <div className=\"dsh-notify-config\">\n <div className=\"dsh-notify-config-row\">\n <div className=\"dsh-notify-config-info\">\n <div className=\"dsh-notify-config-label\">{t('config.defaultEnabled.label')}</div>\n <div className=\"dsh-notify-config-hint\">{t('config.defaultEnabled.hint')}</div>\n </div>\n <div className=\"dsh-notify-config-field\">\n <Switch\n checked={config.defaultEnabled}\n label={t('config.defaultEnabled.label')}\n onChange={(next: boolean) => {\n setConfig({ ...config, defaultEnabled: next });\n write('defaultEnabled', next);\n }}\n />\n </div>\n </div>\n <div className=\"dsh-notify-config-row\">\n <div className=\"dsh-notify-config-info\">\n <div className=\"dsh-notify-config-label\">{t('config.threshold.label')}</div>\n <div className=\"dsh-notify-config-hint\">{t('config.threshold.hint')}</div>\n </div>\n <div className=\"dsh-notify-config-field\">\n <Input\n className=\"dsh-notify-config-input\"\n type=\"number\"\n inputMode=\"numeric\"\n min={0}\n max={MAX_NUDGE_AFTER}\n step={1}\n value={text}\n aria-label={t('config.threshold.label')}\n onChange={(event: ChangeEvent<HTMLInputElement>) => { setText(event.target.value); }}\n onBlur={commitThreshold}\n onKeyDown={(event: KeyboardEvent<HTMLInputElement>) => {\n if (event.key === 'Enter') event.currentTarget.blur();\n }}\n />\n <span className=\"dsh-notify-config-unit\">{t('config.threshold.unit')}</span>\n </div>\n </div>\n <div className=\"dsh-notify-config-row\">\n <div className=\"dsh-notify-config-info\">\n <div className=\"dsh-notify-config-label\">{t('config.resetOnProse.label')}</div>\n <div className=\"dsh-notify-config-hint\">{t('config.resetOnProse.hint')}</div>\n </div>\n <div className=\"dsh-notify-config-field\">\n <Switch\n checked={config.resetOnProse}\n label={t('config.resetOnProse.label')}\n onChange={(next: boolean) => {\n setConfig({ ...config, resetOnProse: next });\n write('resetOnProse', next);\n }}\n />\n </div>\n </div>\n <div className=\"dsh-notify-config-row\">\n <div className=\"dsh-notify-config-info\">\n <div className=\"dsh-notify-config-label\">{t('config.placement.label')}</div>\n <div className=\"dsh-notify-config-hint\">{t('config.placement.hint')}</div>\n </div>\n <ChoiceGroup\n label={t('config.placement.label')}\n value={config.cardPlacement}\n options={CARD_PLACEMENTS.map((id) => ({\n id,\n label: t(id === 'boundary' ? 'config.placement.boundary' : 'config.placement.inline'),\n }))}\n onSelect={(id) => {\n setConfig({ ...config, cardPlacement: id });\n write('cardPlacement', id);\n }}\n />\n </div>\n <div className=\"dsh-notify-config-row\">\n <div className=\"dsh-notify-config-info\">\n <div className=\"dsh-notify-config-label\">{t('config.reportMode.label')}</div>\n <div className=\"dsh-notify-config-hint\">{t('config.reportMode.hint')}</div>\n </div>\n <ChoiceGroup\n label={t('config.reportMode.label')}\n value={config.summaryOnly ? 'summary' : 'structured'}\n options={REPORT_MODES.map((id) => ({ id, label: t(REPORT_MODE_LABELS[id]) }))}\n onSelect={(id) => {\n const summary = id === 'summary';\n setConfig({ ...config, summaryOnly: summary });\n write('summaryOnly', summary);\n }}\n />\n </div>\n {config.summaryOnly ? (\n <div className=\"dsh-notify-config-row\">\n <div className=\"dsh-notify-config-info\">\n <div className=\"dsh-notify-config-label\">{t('config.summaryRender.label')}</div>\n <div className=\"dsh-notify-config-hint\">{t('config.summaryRender.hint')}</div>\n </div>\n <ChoiceGroup\n label={t('config.summaryRender.label')}\n value={config.summaryRender}\n options={SUMMARY_RENDERS.map((id) => ({ id, label: t(SUMMARY_RENDER_LABELS[id]) }))}\n onSelect={(id) => {\n setConfig({ ...config, summaryRender: id });\n write('summaryRender', id);\n }}\n />\n </div>\n ) : null}\n {config.summaryOnly ? null : (\n <div className=\"dsh-notify-config-row\">\n <div className=\"dsh-notify-config-info\">\n <div className=\"dsh-notify-config-label\">{t('config.bodyMode.label')}</div>\n <div className=\"dsh-notify-config-hint\">{t('config.bodyMode.hint')}</div>\n </div>\n <ChoiceGroup\n label={t('config.bodyMode.label')}\n value={bodyMode}\n options={BODY_MODES.map((id) => ({ id, label: t(BODY_MODE_LABELS[id]) }))}\n onSelect={(id) => { chooseBodyMode(id); }}\n />\n </div>\n )}\n {drawsCard ? (\n <div className=\"dsh-notify-config-row\">\n <div className=\"dsh-notify-config-info\">\n <div className=\"dsh-notify-config-label\">{t('config.showTime.label')}</div>\n <div className=\"dsh-notify-config-hint\">{t('config.showTime.hint')}</div>\n </div>\n <div className=\"dsh-notify-config-field\">\n <Switch\n checked={config.showTime}\n label={t('config.showTime.label')}\n onChange={(next: boolean) => {\n setConfig({ ...config, showTime: next });\n write('showTime', next);\n }}\n />\n </div>\n </div>\n ) : null}\n {error === null ? null : <div className=\"dsh-notify-config-error\" role=\"status\">{error}</div>}\n </div>\n );\n}\n", "import type { ConfigForm as HostConfigForm } from '@deepseek-ai/dsh-client-ui-settings/client';\nimport {\n CARD_PLACEMENTS,\n DEFAULT_BODY_EXPANDED_BY_DEFAULT,\n DEFAULT_CARD_PLACEMENT,\n DEFAULT_COLLAPSIBLE,\n DEFAULT_ENABLED,\n DEFAULT_NUDGE_AFTER,\n DEFAULT_RESET_ON_PROSE,\n DEFAULT_SHOW_TIME,\n DEFAULT_SUMMARY_ONLY,\n DEFAULT_SUMMARY_RENDER,\n MAX_NUDGE_AFTER,\n SUMMARY_RENDERS,\n type CardPlacement,\n type SessionOverrides,\n type SummaryRender,\n} from '../shared/config.js';\n\nexport {\n CARD_PLACEMENTS,\n DEFAULT_BODY_EXPANDED_BY_DEFAULT,\n DEFAULT_CARD_PLACEMENT,\n DEFAULT_COLLAPSIBLE,\n DEFAULT_ENABLED,\n DEFAULT_NUDGE_AFTER,\n DEFAULT_RESET_ON_PROSE,\n DEFAULT_SHOW_TIME,\n DEFAULT_SUMMARY_ONLY,\n DEFAULT_SUMMARY_RENDER,\n MAX_NUDGE_AFTER,\n SETTINGS_NAMESPACE,\n SUMMARY_RENDERS,\n enabledFor,\n overridesAfterWrite,\n} from '../shared/config.js';\n\nexport type { CardPlacement, SessionOverrides, SummaryRender } from '../shared/config.js';\n\nexport const BUNDLE_NAME = '@lynn123411/dsh-notify-user';\n\nexport const BUNDLE_CONFIG_SLOT = 'plugins.bundle.config';\n\nexport const MODEL_OPTIONS_SLOT = 'conversation.input.model.options';\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null && !Array.isArray(value);\n}\n\nexport type ConfigForm = Pick<HostConfigForm<unknown>, 'getSnapshot' | 'subscribe' | 'set' | 'mutate'>;\n\nexport interface ClientConfig {\n nudgeAfter: number;\n resetOnProse: boolean;\n collapsible: boolean;\n summaryOnly: boolean;\n summaryRender: SummaryRender;\n bodyExpandedByDefault: boolean;\n showTime: boolean;\n cardPlacement: CardPlacement;\n defaultEnabled: boolean;\n sessionOverrides: SessionOverrides;\n}\n\nexport const DEFAULT_CLIENT_CONFIG: ClientConfig = {\n nudgeAfter: DEFAULT_NUDGE_AFTER,\n resetOnProse: DEFAULT_RESET_ON_PROSE,\n collapsible: DEFAULT_COLLAPSIBLE,\n summaryOnly: DEFAULT_SUMMARY_ONLY,\n summaryRender: DEFAULT_SUMMARY_RENDER,\n bodyExpandedByDefault: DEFAULT_BODY_EXPANDED_BY_DEFAULT,\n showTime: DEFAULT_SHOW_TIME,\n cardPlacement: DEFAULT_CARD_PLACEMENT,\n defaultEnabled: DEFAULT_ENABLED,\n sessionOverrides: {},\n};\n\nfunction readOverrides(value: unknown): Record<string, boolean> {\n if (!isRecord(value)) return {};\n const overrides: Record<string, boolean> = {};\n for (const [sessionId, enabled] of Object.entries(value)) {\n if (typeof enabled === 'boolean') overrides[sessionId] = enabled;\n }\n return overrides;\n}\n\nexport function readConfig(form: ConfigForm): ClientConfig | undefined {\n const snapshot = form.getSnapshot();\n if (snapshot.status === 'unavailable') return undefined;\n const value = isRecord(snapshot.value) ? snapshot.value : {};\n const rawThreshold = value['nudgeAfter'];\n const nudgeAfter = typeof rawThreshold === 'number' && Number.isFinite(rawThreshold)\n ? Math.min(MAX_NUDGE_AFTER, Math.max(0, Math.floor(rawThreshold)))\n : DEFAULT_CLIENT_CONFIG.nudgeAfter;\n const rawResetOnProse = value['resetOnProse'];\n const resetOnProse = typeof rawResetOnProse === 'boolean' ? rawResetOnProse : DEFAULT_CLIENT_CONFIG.resetOnProse;\n const rawCollapsible = value['collapsible'];\n const collapsible = typeof rawCollapsible === 'boolean' ? rawCollapsible : DEFAULT_CLIENT_CONFIG.collapsible;\n const rawSummaryOnly = value['summaryOnly'];\n const summaryOnly = typeof rawSummaryOnly === 'boolean' ? rawSummaryOnly : DEFAULT_CLIENT_CONFIG.summaryOnly;\n const rawSummaryRender = value['summaryRender'];\n const summaryRender = SUMMARY_RENDERS.find(render => render === rawSummaryRender) ?? DEFAULT_CLIENT_CONFIG.summaryRender;\n const rawBodyExpanded = value['bodyExpandedByDefault'];\n const bodyExpandedByDefault = typeof rawBodyExpanded === 'boolean' ? rawBodyExpanded : DEFAULT_CLIENT_CONFIG.bodyExpandedByDefault;\n const rawShowTime = value['showTime'];\n const showTime = typeof rawShowTime === 'boolean' ? rawShowTime : DEFAULT_CLIENT_CONFIG.showTime;\n const rawPlacement = value['cardPlacement'];\n const cardPlacement = CARD_PLACEMENTS.find(placement => placement === rawPlacement) ?? DEFAULT_CLIENT_CONFIG.cardPlacement;\n const rawDefaultEnabled = value['defaultEnabled'];\n const defaultEnabled = typeof rawDefaultEnabled === 'boolean' ? rawDefaultEnabled : DEFAULT_CLIENT_CONFIG.defaultEnabled;\n const sessionOverrides = readOverrides(value['sessionOverrides']);\n return { nudgeAfter, resetOnProse, collapsible, summaryOnly, summaryRender, bodyExpandedByDefault, showTime, cardPlacement, defaultEnabled, sessionOverrides };\n}\n", "import { useEffect, useState } from 'react';\nimport type { ReactElement } from 'react';\nimport { Button, IconInfoOutlineRegular, Switch, Tooltip } from '@deepseek-ai/dsh-client-ui-primitives';\nimport type { PropsLocale, PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots';\nimport type {} from '@deepseek-ai/dsh-client-ui-model-selection/client';\nimport type {} from '@deepseek-ai/dsh-client-ui-session/client';\nimport {\n enabledFor,\n overridesAfterWrite,\n readConfig,\n type ConfigForm,\n} from './config.js';\nimport { NS } from './locales.js';\n\n\ntype EnabledToggleProps = PropsRuntime<'conversation.input.model.options'>\n & PropsLocale<typeof NS>\n & { form: ConfigForm };\n\nexport function EnabledToggle(props: EnabledToggleProps): ReactElement | null {\n const { sessionId, useSession, useSessions } = props;\n const addressedChild = useSession(snapshot => snapshot.subagent !== null);\n const listedChild = useSessions(state => state.byId[sessionId]?.origin === 'subagent');\n if (addressedChild || listedChild) return null;\n return <RootEnabledToggle {...props} />;\n}\n\nfunction RootEnabledToggle(\n { sessionId, form, locked, reportFailure, t }: EnabledToggleProps,\n): ReactElement | null {\n const [config, setConfig] = useState(() => readConfig(form));\n const [pending, setPending] = useState(false);\n\n useEffect(() => {\n const sync = (): void => { setConfig(readConfig(form)); };\n sync();\n return form.subscribe(sync);\n }, [form]);\n\n if (config === undefined) return null;\n\n const enabled = enabledFor(config.sessionOverrides, config.defaultEnabled, sessionId);\n\n const select = (next: boolean): void => {\n const overrides = overridesAfterWrite(config.sessionOverrides, sessionId, next, config.defaultEnabled);\n if (overrides === config.sessionOverrides) return;\n setConfig({ ...config, sessionOverrides: overrides });\n setPending(true);\n void form.set('sessionOverrides', overrides).then(\n (accepted) => {\n if (!accepted) {\n setConfig(readConfig(form));\n reportFailure(t('toggle.failed'));\n }\n },\n () => {\n setConfig(readConfig(form));\n reportFailure(t('toggle.failed'));\n },\n ).finally(() => { setPending(false); });\n };\n\n return (\n <div className=\"dsh-notify-toggle-row\">\n <span className=\"dsh-notify-toggle-label\">\n <span>{t('toggle.label')}</span>\n <Tooltip label={t('toggle.description')} side=\"top\" delayMs={300} maxWidth={300} portal openOnClick>\n <Button variant=\"ghost\" size=\"sm\" className=\"dsh-notify-toggle-info\" aria-label={t('toggle.infoLabel')}>\n <IconInfoOutlineRegular size={11} aria-hidden=\"true\" />\n </Button>\n </Tooltip>\n </span>\n <Switch\n className=\"dsh-notify-toggle-switch\"\n checked={enabled}\n disabled={locked || pending}\n label={t('toggle.label')}\n onChange={select}\n />\n </div>\n );\n}\n", "export const NS = 'notifyUser';\n\nexport const en = {\n 'row.preparing': 'Sending update\u2026',\n 'row.failed': 'Could not send update',\n 'row.fallbackTitle': 'Update',\n 'markdown.copy': 'Copy',\n 'markdown.copied': 'Copied',\n 'markdown.footnotes': 'Footnotes',\n 'toggle.label': 'Proactive updates',\n 'toggle.description': 'The model reports progress while it works. Turn it off and this session stops nudging it to report and no longer offers it the reporting tool.',\n 'toggle.infoLabel': 'About proactive updates',\n 'toggle.failed': \"Couldn't save the setting; try again.\",\n 'config.defaultEnabled.label': 'On by default',\n 'config.defaultEnabled.hint': 'New sessions start with proactive updates on; change a single session in the model and reasoning menu.',\n 'config.threshold.label': 'Nudge after',\n 'config.threshold.hint': 'Tool calls without an update before the model is nudged; 0 turns nudging off and leaves the update tool available.',\n 'config.threshold.unit': 'calls',\n 'config.resetOnProse.label': 'Reset on prose',\n 'config.resetOnProse.hint': 'Any assistant reply with text counts as an update and resets the count; turn it off to reset only on a successful update, a new turn, or a user message.',\n 'config.reportMode.label': 'Update format',\n 'config.reportMode.hint': 'Summary only: the model writes one line and the card shows just the title; structured body: the model writes a title and a body.',\n 'config.reportMode.structured': 'Structured body',\n 'config.reportMode.summary': 'Summary only',\n 'config.summaryRender.label': 'Summary display',\n 'config.summaryRender.hint': 'Card shows the dot and time; prose renders as a plain paragraph like an assistant reply.',\n 'config.summaryRender.card': 'Card',\n 'config.summaryRender.prose': 'Prose',\n 'config.bodyMode.label': 'Body display',\n 'config.bodyMode.hint': 'Always expanded has no toggle; collapsed expands from the dot; expanded shows the body right away.',\n 'config.bodyMode.always': 'Always expanded',\n 'config.bodyMode.collapsed': 'Collapsed',\n 'config.bodyMode.expanded': 'Expanded',\n 'config.showTime.label': 'Show time',\n 'config.showTime.hint': 'Shows when the update was sent at the right end of the title row; turn it off to keep just the dot and the title.',\n 'config.placement.label': 'Card placement',\n 'config.placement.hint': 'At the step-group boundary, tool calls between two updates fold into their own sub-folds; following the tool row, the card folds with the group.',\n 'config.placement.boundary': 'Step-group boundary',\n 'config.placement.inline': 'Follow tool row',\n 'config.write.failed': \"Couldn't save; change it again to retry.\",\n 'config.unavailable': 'This configuration is unavailable right now.',\n};\n\nexport const zh = {\n 'row.preparing': '\u6B63\u5728\u6C47\u62A5\u2026',\n 'row.failed': '\u6C47\u62A5\u5931\u8D25',\n 'row.fallbackTitle': '\u66F4\u65B0',\n 'markdown.copy': '\u590D\u5236',\n 'markdown.copied': '\u5DF2\u590D\u5236',\n 'markdown.footnotes': '\u811A\u6CE8',\n 'toggle.label': '\u4E3B\u52A8\u6C47\u62A5',\n 'toggle.description': '\u6A21\u578B\u5728\u5E72\u6D3B\u9014\u4E2D\u5411\u4F60\u6C47\u62A5\u8FDB\u5EA6\u3002\u5173\u6389\u540E\u8FD9\u4E2A\u4F1A\u8BDD\u4E0D\u518D\u50AC\u5B83\u6C47\u62A5\uFF0C\u4E5F\u4E0D\u518D\u5411\u5B83\u63D0\u4F9B\u6C47\u62A5\u5DE5\u5177\u3002',\n 'toggle.infoLabel': '\u5173\u4E8E\u4E3B\u52A8\u6C47\u62A5',\n 'toggle.failed': '\u6CA1\u4FDD\u5B58\u4E0A\uFF0C\u8BF7\u91CD\u8BD5\u3002',\n 'config.defaultEnabled.label': '\u9ED8\u8BA4\u5F00\u542F',\n 'config.defaultEnabled.hint': '\u65B0\u4F1A\u8BDD\u9ED8\u8BA4\u6253\u5F00\u4E3B\u52A8\u6C47\u62A5\uFF1B\u5355\u4E2A\u4F1A\u8BDD\u7684\u5F00\u5173\u5728\u6A21\u578B\u4E0E\u63A8\u7406\u7B49\u7EA7\u83DC\u5355\u91CC\u3002',\n 'config.threshold.label': '\u50AC\u529E\u9608\u503C',\n 'config.threshold.hint': '\u8FDE\u7EED\u591A\u5C11\u6B21\u5DE5\u5177\u8C03\u7528\u6CA1\u6709\u6C47\u62A5\u65F6\u50AC\u4E00\u6B21\uFF1B0 \u5173\u95ED\u50AC\u529E\uFF0C\u4ECD\u53EF\u4E3B\u52A8\u6C47\u62A5\u3002',\n 'config.threshold.unit': '\u6B21',\n 'config.resetOnProse.label': '\u6563\u6587\u56DE\u590D\u6E05\u96F6',\n 'config.resetOnProse.hint': '\u6A21\u578B\u5728\u52A9\u624B\u6D88\u606F\u91CC\u5199\u4E86\u6B63\u6587\u5C31\u7B97\u6C47\u62A5\u8FC7\uFF0C\u8BA1\u6570\u6E05\u96F6\uFF1B\u5173\u6389\u540E\u53EA\u5728\u6C47\u62A5\u6210\u529F\u3001\u65B0\u56DE\u5408\u6216\u7528\u6237\u63D2\u8BDD\u65F6\u6E05\u96F6\u3002',\n 'config.reportMode.label': '\u6C47\u62A5\u5F62\u6001',\n 'config.reportMode.hint': '\u53EA\u62A5\u6458\u8981\u65F6\u6A21\u578B\u53EA\u5199\u4E00\u884C\u6807\u9898\uFF0C\u5361\u7247\u53EA\u663E\u793A\u6807\u9898\u884C\uFF1B\u7ED3\u6784\u5316\u6B63\u6587\u65F6\u6A21\u578B\u5199\u6807\u9898\u4E0E\u6B63\u6587\u3002',\n 'config.reportMode.structured': '\u7ED3\u6784\u5316\u6B63\u6587',\n 'config.reportMode.summary': '\u53EA\u62A5\u6458\u8981',\n 'config.summaryRender.label': '\u6458\u8981\u5448\u73B0',\n 'config.summaryRender.hint': '\u8FDB\u5EA6\u5361\u5E26\u5706\u70B9\u4E0E\u65F6\u95F4\uFF1B\u6563\u6587\u6309\u666E\u901A\u6BB5\u843D\u6E32\u67D3\uFF0C\u770B\u8D77\u6765\u50CF\u52A9\u624B\u5199\u7684\u6B63\u6587\u3002',\n 'config.summaryRender.card': '\u8FDB\u5EA6\u5361',\n 'config.summaryRender.prose': '\u6563\u6587',\n 'config.bodyMode.label': '\u6B63\u6587\u663E\u793A',\n 'config.bodyMode.hint': '\u59CB\u7EC8\u5C55\u5F00\u6CA1\u6709\u6298\u53E0\u952E\uFF1B\u9ED8\u8BA4\u6536\u8D77\u65F6\u70B9\u5706\u70B9\u5C55\u5F00\uFF1B\u9ED8\u8BA4\u5C55\u5F00\u76F4\u63A5\u770B\u5230\u6B63\u6587\u3002',\n 'config.bodyMode.always': '\u59CB\u7EC8\u5C55\u5F00',\n 'config.bodyMode.collapsed': '\u9ED8\u8BA4\u6536\u8D77',\n 'config.bodyMode.expanded': '\u9ED8\u8BA4\u5C55\u5F00',\n 'config.showTime.label': '\u663E\u793A\u65F6\u95F4',\n 'config.showTime.hint': '\u6807\u9898\u884C\u53F3\u4FA7\u663E\u793A\u8FD9\u6761\u6C47\u62A5\u7684\u65F6\u95F4\uFF1B\u5173\u6389\u540E\u6807\u9898\u884C\u53EA\u5269\u5706\u70B9\u4E0E\u6807\u9898\u3002',\n 'config.placement.label': '\u8FDB\u5EA6\u5361\u4F4D\u7F6E',\n 'config.placement.hint': '\u653E\u5728\u6B65\u9AA4\u7EC4\u8FB9\u754C\u65F6\uFF0C\u4E24\u6B21\u6C47\u62A5\u4E4B\u95F4\u7684\u5DE5\u5177\u8C03\u7528\u5404\u81EA\u6298\u6210\u4E00\u4E2A\u5B50\u6298\u53E0\uFF1B\u8DDF\u968F\u5DE5\u5177\u884C\u65F6\uFF0C\u5361\u7247\u968F\u5DE5\u5177\u884C\u4E00\u8D77\u6298\u8FDB\u7EC4\u91CC\u3002',\n 'config.placement.boundary': '\u6B65\u9AA4\u7EC4\u8FB9\u754C',\n 'config.placement.inline': '\u8DDF\u968F\u5DE5\u5177\u884C',\n 'config.write.failed': '\u6CA1\u5199\u8FDB\u53BB\uFF0C\u518D\u6539\u4E00\u6B21\u8BD5\u8BD5\u3002',\n 'config.unavailable': '\u8FD9\u4EFD\u914D\u7F6E\u73B0\u5728\u8BFB\u4E0D\u5230\u3002',\n};\n\nexport type NotifyKey = keyof typeof en;\n\ndeclare module '@deepseek-ai/dsh-client-ui-slots' {\n interface LocaleNamespaceMap {\n notifyUser: NotifyKey;\n }\n}\n", "\nexport interface Update {\n title?: string;\n message: string;\n}\n\nexport interface NotifyCardData {\n readonly title?: string;\n readonly message: string;\n readonly time: number;\n readonly settled: boolean;\n readonly failure?: { readonly detail: string };\n}\n\nexport function failureOf(\n content: readonly { readonly type: string; readonly text?: string }[],\n error?: { readonly name: string; readonly code: string; readonly reason?: string },\n): NonNullable<NotifyCardData['failure']> {\n const text = content.flatMap(block => block.type === 'text' && block.text?.trim() ? [block.text] : []).join('\\n');\n const detail = text || (error === undefined ? '' : error.reason || `${error.name}: ${error.code}`);\n return { detail };\n}\n\nexport function parseUpdate(value: unknown): Update | null {\n if (typeof value !== 'object' || value === null) return null;\n const record = value as Record<string, unknown>;\n const message = typeof record['message'] === 'string' ? record['message'] : '';\n const title = typeof record['title'] === 'string' && record['title'].length > 0 ? record['title'] : undefined;\n if (message.length === 0 && title === undefined) return null;\n return title === undefined ? { message } : { title, message };\n}\n\nexport function parseArgs(raw: string | undefined): Update | null {\n if (typeof raw !== 'string' || raw.length === 0) return null;\n try {\n return parseUpdate(JSON.parse(raw));\n } catch {\n return null;\n }\n}\n\nexport function readUpdate(block: unknown): Update {\n if (typeof block !== 'object' || block === null) return { message: '' };\n const record = block as Record<string, unknown>;\n const fromMeta = parseUpdate(record['meta']);\n if (fromMeta !== null) return fromMeta;\n const call = record['call'];\n if (typeof call === 'object' && call !== null) {\n const fromCall = parseArgs((call as Record<string, unknown>)['argsRaw'] as string | undefined);\n if (fromCall !== null) return fromCall;\n }\n return parseArgs(record['argsRaw'] as string | undefined) ?? { message: '' };\n}\n\nexport function titleOf(update: Update, fallback: string): string {\n if (update.title !== undefined) return update.title;\n const first = update.message\n .split('\\n')\n .map((line) => line.trim())\n .find((line) => line.length > 0);\n if (first === undefined) return fallback;\n return first.length > 60 ? `${first.slice(0, 59)}\u2026` : first;\n}\n\nexport function formatClock(ms: unknown): string | null {\n if (typeof ms !== 'number' || !Number.isFinite(ms)) return null;\n const date = new Date(ms);\n const pad = (value: number): string => String(value).padStart(2, '0');\n return `${pad(date.getMonth() + 1)}-${pad(date.getDate())} ${pad(date.getHours())}:${pad(date.getMinutes())}`;\n}\n", "\nimport type {\n ConversationMatch, ConversationMatchResult, ConversationNodeContext, ConversationNodeDefinition,\n ConversationStartMatch,\n} from '@deepseek-ai/dsh-client-ui-conversation/client';\nimport type { ChatNode } from '@deepseek-ai/dsh-client-ui-chat/client';\nimport { NOTIFY_TOOL_NAME } from '../shared/config.js';\nimport { failureOf, parseArgs, parseUpdate, type NotifyCardData, type Update } from './row-model.js';\n\nexport const NOTIFY_NODE_KIND = 'notify-user';\n\nconst MAX_COMPLETED_CALLS = 4096;\n\ninterface NotifyNodeState extends NotifyCardData {\n readonly anchorSeq?: number;\n readonly useNativeError?: true;\n}\n\ndeclare module '@deepseek-ai/dsh-client-ui-chat/client' {\n interface ChatNodeDataMap {\n 'notify-user': NotifyCardData;\n }\n}\n\nfunction stateOf(update: Update | null, time: number, settled: boolean, anchorSeq: number): NotifyNodeState {\n return {\n ...update === null ? { message: '' } : update,\n time,\n settled,\n anchorSeq,\n };\n}\n\nfunction settledState(current: NotifyNodeState, update: Update | null): NotifyNodeState {\n return {\n ...update ?? current,\n time: current.time,\n settled: true,\n ...current.anchorSeq === undefined ? {} : { anchorSeq: current.anchorSeq },\n };\n}\n\nfunction rootResultState(\n event: Extract<ConversationMatch['event'], { type: 'tool/result' }>,\n current?: NotifyNodeState,\n): NotifyNodeState {\n if (event.data.message.isError) {\n return {\n ...stateOf(null, current?.time ?? event.time, true, current?.anchorSeq ?? event.seq),\n failure: failureOf(event.data.message.content, event.data.error),\n };\n }\n const update = parseUpdate(event.data.meta);\n return current === undefined ? stateOf(update, event.time, true, event.seq) : settledState(current, update);\n}\n\nfunction fallbackState(context: ConversationNodeContext<NotifyNodeState>): NotifyNodeState | undefined {\n for (let index = context.matches.length - 1; index >= 0; index -= 1) {\n const event = context.matches[index].event;\n if (event.type === 'tool/result') return rootResultState(event);\n if (event.type === 'tool/ptc-dispatch') {\n if (event.data.isError) return undefined;\n return {\n ...parseUpdate(event.data.meta) ?? parseUpdate(event.data.arguments) ?? { message: '' },\n time: event.time,\n settled: true,\n anchorSeq: event.seq,\n };\n }\n }\n return undefined;\n}\n\nexport function createNotifyDefinition(): ConversationNodeDefinition<NotifyNodeState> {\n const pendingCalls = new Set<string>();\n const completedCalls = new Set<string>();\n\n return {\n kind: NOTIFY_NODE_KIND,\n target: 'chat',\n\n match(event): ConversationMatchResult | null {\n switch (event.type) {\n case 'tool/call': {\n if (event.data.name !== NOTIFY_TOOL_NAME) return null;\n const callId = String(event.data.callId);\n if (!completedCalls.has(callId)) pendingCalls.add(callId);\n return { id: callId, role: 'start', exclusive: true };\n }\n case 'tool/result': {\n if (event.surfaceOp !== 'append') return null;\n const callId = String(event.data.message.source.callId);\n if (pendingCalls.delete(callId)) {\n completedCalls.add(callId);\n if (completedCalls.size > MAX_COMPLETED_CALLS) {\n const oldest = completedCalls.values().next().value;\n if (oldest !== undefined) completedCalls.delete(oldest);\n }\n } else if (!completedCalls.has(callId)) {\n return null;\n }\n return { id: callId, role: 'update', exclusive: true };\n }\n case 'assistant/live-chunk': {\n const chunk = event.data.chunk;\n if (chunk.type === 'block-end' && chunk.block.type === 'tool-call' && chunk.block.name === NOTIFY_TOOL_NAME) {\n return { id: String(chunk.block.id), role: 'start', exclusive: true };\n }\n if (chunk.type === 'tool-call-delta' && chunk.name === NOTIFY_TOOL_NAME) {\n return { id: String(chunk.id), role: 'start', exclusive: true };\n }\n return null;\n }\n case 'tool/ptc-dispatch-start':\n case 'tool/ptc-dispatch': {\n if (event.data.name !== NOTIFY_TOOL_NAME) return null;\n if (event.type === 'tool/ptc-dispatch' && event.data.isError) {\n return { id: String(event.data.subCallId), role: 'update' };\n }\n return {\n id: String(event.data.subCallId),\n role: event.type === 'tool/ptc-dispatch-start' ? 'start' : 'update',\n exclusive: true,\n };\n }\n default:\n return null;\n }\n },\n\n start(_context: ConversationNodeContext<NotifyNodeState>, match: ConversationStartMatch): NotifyNodeState {\n const event = match.event;\n if (event.type === 'tool/call') return stateOf(parseArgs(event.data.arguments), event.time, false, event.seq);\n if (event.type === 'tool/ptc-dispatch-start') {\n return stateOf(parseUpdate(event.data.arguments), event.time, false, event.seq);\n }\n return { message: '', time: event.time, settled: false };\n },\n\n update(\n context: ConversationNodeContext<NotifyNodeState> & { readonly state: NotifyNodeState },\n match: ConversationMatch,\n ): NotifyNodeState {\n const event = match.event;\n const current = context.state;\n if (event.type === 'tool/call') {\n return stateOf(parseArgs(event.data.arguments) ?? { message: current.message }, event.time, current.settled, event.seq);\n }\n if (event.type === 'tool/result') return rootResultState(event, current);\n if (event.type === 'tool/ptc-dispatch') {\n if (event.data.isError) return { ...current, useNativeError: true };\n return settledState(current, parseUpdate(event.data.meta) ?? parseUpdate(event.data.arguments));\n }\n return current;\n },\n\n buildViewNode(context: ConversationNodeContext<NotifyNodeState>): ChatNode<'notify-user'> | null {\n const state = context.state ?? fallbackState(context);\n if (state === undefined || state.anchorSeq === undefined) return null;\n const node: ChatNode<'notify-user'> = {\n key: context.key,\n id: context.id,\n kind: NOTIFY_NODE_KIND,\n target: 'chat',\n anchorSeq: state.anchorSeq,\n location: context.start?.location ?? context.matches[0]?.location ?? { kind: 'unresolved' },\n groupTree: state.failure === undefined ? 'process' : undefined,\n visibility: state.useNativeError ? 'hidden' : 'visible',\n data: {\n ...state.title === undefined ? {} : { title: state.title },\n message: state.message,\n time: state.time,\n settled: state.settled,\n ...state.failure === undefined ? {} : { failure: state.failure },\n },\n };\n return node;\n },\n };\n}\n", "import { useState } from 'react';\nimport type { ReactElement } from 'react';\nimport {\n IconChevronDownOutlineRegular,\n MarkdownDelegateProvider,\n MarkdownText,\n TextShimmer,\n} from '@deepseek-ai/dsh-client-ui-primitives';\nimport type { MarkdownLabels } from '@deepseek-ai/dsh-client-ui-primitives';\nimport type { OpenFileOptions } from '@deepseek-ai/dsh-client-ui-chat/client';\nimport type { InjectFace, PropsLocale } from '@deepseek-ai/dsh-client-ui-slots';\nimport { NOTIFY_TOOL_NAME } from '../shared/config.js';\nimport type { SyncedConfig } from '@deepseek-ai/dsh-client-config/types';\nimport type { PluginConfig } from '../config.js';\nimport { DEFAULT_CLIENT_CONFIG } from './config.js';\nimport { NS } from './locales.js';\nimport { formatClock, titleOf, type NotifyCardData } from './row-model.js';\n\n\nexport type CardHooks = Pick<SyncedConfig<PluginConfig>,\n 'collapsible' | 'summaryOnly' | 'summaryRender' | 'bodyExpandedByDefault' | 'showTime'>;\nexport type CardConfigProps = InjectFace<{ hooks: CardHooks }>;\n\ntype NotifyCardProps = {\n readonly config: CardConfigProps;\n readonly data: NotifyCardData;\n readonly openFile: (path: string, options?: OpenFileOptions) => void;\n readonly t: PropsLocale<typeof NS>['t'];\n readonly seat: 'node' | 'row';\n};\n\nfunction markdownLabels(t: NotifyCardProps['t']): MarkdownLabels {\n return {\n code: { copyLabel: t('markdown.copy'), copiedLabel: t('markdown.copied') },\n footnotes: t('markdown.footnotes'),\n };\n}\n\nexport function NotifyCard({\n data, openFile, t, seat,\n config: { useCollapsible, useSummaryOnly, useSummaryRender, useBodyExpandedByDefault, useShowTime },\n}: NotifyCardProps): ReactElement {\n const collapsibleByConfig = useCollapsible(value => value ?? DEFAULT_CLIENT_CONFIG.collapsible);\n const summaryOnly = useSummaryOnly(value => value ?? DEFAULT_CLIENT_CONFIG.summaryOnly);\n const summaryRender = useSummaryRender(value => value ?? DEFAULT_CLIENT_CONFIG.summaryRender);\n const bodyExpandedByDefault = useBodyExpandedByDefault(value => value ?? DEFAULT_CLIENT_CONFIG.bodyExpandedByDefault);\n const showTime = useShowTime(value => value ?? DEFAULT_CLIENT_CONFIG.showTime);\n const [open, setOpen] = useState<boolean | null>(null);\n\n if (data.failure !== undefined) {\n return (\n <div className=\"dsh-notify-failure\" data-tool={NOTIFY_TOOL_NAME} data-state=\"error\">\n <strong>{t('row.failed')}</strong>\n {data.failure.detail.length === 0 ? null : <div>{data.failure.detail}</div>}\n </div>\n );\n }\n\n const title = titleOf({ title: data.title, message: data.message }, t('row.fallbackTitle'));\n\n if (summaryOnly && summaryRender === 'prose') {\n return (\n <div className=\"dsh-notify-prose\" data-tool={NOTIFY_TOOL_NAME} data-state={data.settled ? 'settled' : 'running'}>\n <MarkdownDelegateProvider openFile={openFile}>\n <MarkdownText text={title} labels={markdownLabels(t)} />\n </MarkdownDelegateProvider>\n </div>\n );\n }\n\n const hasBody = !summaryOnly && data.message.trim().length > 0;\n const collapsible = collapsibleByConfig && hasBody;\n const expanded = collapsible ? open ?? bodyExpandedByDefault : true;\n const time = showTime ? formatClock(data.time) : null;\n const titleNode = data.settled ? title : <TextShimmer active>{title}</TextShimmer>;\n\n return (\n <div\n className=\"dsh-notify-card\"\n data-seat={seat}\n data-tool={NOTIFY_TOOL_NAME}\n data-state={data.settled ? 'settled' : 'running'}\n data-collapsible={collapsible || undefined}\n >\n <div className=\"dsh-notify-head\">\n {collapsible ? (\n <button\n type=\"button\"\n className=\"dsh-notify-toggle\"\n aria-expanded={expanded}\n onClick={() => { setOpen(!expanded); }}\n >\n <span className=\"dsh-notify-dot\" data-open={expanded || undefined} aria-hidden=\"true\">\n <span className=\"dsh-notify-dot-idle\" />\n <IconChevronDownOutlineRegular className=\"dsh-notify-chevron\" size={14} />\n </span>\n <span className=\"dsh-notify-title\">{titleNode}</span>\n </button>\n ) : (\n <>\n <span className=\"dsh-notify-dot\" aria-hidden=\"true\">\n <span className=\"dsh-notify-dot-idle\" />\n </span>\n <span className=\"dsh-notify-title\">{titleNode}</span>\n </>\n )}\n {time === null ? null : <span className=\"dsh-notify-time\">{time}</span>}\n </div>\n {expanded && hasBody ? (\n <div className=\"dsh-notify-body\">\n <MarkdownDelegateProvider openFile={openFile}>\n <MarkdownText text={data.message} labels={markdownLabels(t)} variant=\"compact\" />\n </MarkdownDelegateProvider>\n </div>\n ) : null}\n </div>\n );\n}\n", "import type { ReactElement } from 'react';\nimport type { PropsLocale, PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots';\nimport type {} from '@deepseek-ai/dsh-client-ui-chat/client';\nimport { NS } from './locales.js';\nimport { NotifyCard, type CardConfigProps } from './NotifyCard.js';\n\n\ntype NotifyNodeViewProps = PropsRuntime<'conversation.chat.node', 'notify-user'>\n & PropsLocale<typeof NS>\n & CardConfigProps;\n\nexport function NotifyNodeView(props: NotifyNodeViewProps): ReactElement {\n const { node, openFile, t } = props;\n return <NotifyCard data={node.data} config={props} openFile={openFile} t={t} seat=\"node\" />;\n}\n", "import type { ReactElement } from 'react';\nimport type { ToolCallViewProps } from '@deepseek-ai/dsh-client-ui-tool/client';\nimport type { PropsLocale } from '@deepseek-ai/dsh-client-ui-slots';\nimport { NS } from './locales.js';\nimport { NotifyCard, type CardConfigProps } from './NotifyCard.js';\nimport { failureOf, readUpdate, type NotifyCardData } from './row-model.js';\n\n\ntype NotifyRowProps = ToolCallViewProps & PropsLocale<typeof NS> & CardConfigProps;\n\nexport function NotifyRow(props: NotifyRowProps): ReactElement {\n const { t } = props;\n const failure = props.phase === 'result' && props.block.isError\n ? failureOf(props.block.content, props.block.error)\n : undefined;\n const preparing = props.phase === 'preparing';\n const update = preparing || failure !== undefined ? { message: '' } : readUpdate(props.block);\n const data: NotifyCardData = {\n ...preparing ? { title: t('row.preparing') } : update.title === undefined ? {} : { title: update.title },\n message: update.message,\n time: props.block.time,\n settled: props.phase === 'result',\n ...failure === undefined ? {} : { failure },\n };\n return <NotifyCard data={data} config={props} openFile={props.openFile} t={t} seat=\"row\" />;\n}\n", "export default \"\\n.dsh-notify-config {\\n display: flex;\\n flex-direction: column;\\n gap: 10px;\\n}\\n\\n.dsh-notify-config-row {\\n display: flex;\\n align-items: flex-start;\\n justify-content: space-between;\\n gap: 16px;\\n}\\n\\n.dsh-notify-config-info {\\n display: flex;\\n flex-direction: column;\\n gap: 2px;\\n min-width: 0;\\n}\\n\\n.dsh-notify-config-label {\\n color: var(--dsw-alias-label-primary);\\n font-size: 13px;\\n line-height: 20px;\\n}\\n\\n.dsh-notify-config-hint {\\n color: var(--dsw-alias-label-secondary);\\n font-size: 12px;\\n line-height: 18px;\\n}\\n\\n.dsh-notify-config-field {\\n display: flex;\\n flex: none;\\n align-items: center;\\n gap: 6px;\\n}\\n\\n.dsh-notify-config-input {\\n width: 88px;\\n}\\n\\n.dsh-notify-config-unit {\\n color: var(--dsw-alias-label-secondary);\\n font-size: 12px;\\n}\\n\\n.dsh-notify-config-error {\\n color: var(--dsw-alias-state-error-primary);\\n font-size: 12px;\\n line-height: 18px;\\n}\\n\\n.dsh-notify-config-note {\\n color: var(--dsw-alias-label-secondary);\\n font-size: 12px;\\n line-height: 18px;\\n}\\n\";", "export default \"\\n.dsh-notify-card {\\n padding: 2px 0 8px;\\n}\\n\\n.dsh-notify-card[data-seat=\\\"node\\\"] {\\n padding: 0;\\n}\\n\\n.dsh-notify-head {\\n display: flex;\\n align-items: center;\\n gap: 6px;\\n min-height: 24px;\\n}\\n\\n.dsh-notify-dot {\\n position: relative;\\n display: inline-flex;\\n align-items: center;\\n justify-content: center;\\n flex: none;\\n width: calc(16px + var(--dsh-content-font-delta, 0px));\\n height: calc(16px + var(--dsh-content-font-delta, 0px));\\n}\\n\\n.dsh-notify-dot-idle {\\n display: inline-flex;\\n align-items: center;\\n justify-content: center;\\n opacity: 1;\\n transition: opacity 100ms ease;\\n}\\n\\n.dsh-notify-dot-idle::before {\\n content: '';\\n width: 7px;\\n height: 7px;\\n border-radius: 50%;\\n corner-shape: round;\\n background: var(--dsw-alias-state-business-primary);\\n}\\n\\n.dsh-notify-toggle {\\n display: inline-flex;\\n align-items: center;\\n gap: 6px;\\n min-width: 0;\\n padding: 0;\\n border: 0;\\n background: none;\\n color: inherit;\\n font: inherit;\\n text-align: left;\\n cursor: pointer;\\n}\\n\\n.dsh-notify-title {\\n color: var(--dsw-alias-state-business-primary);\\n font-size: 14px;\\n font-weight: 600;\\n line-height: 22px;\\n}\\n\\n.dsh-notify-chevron {\\n position: absolute;\\n inset: 0;\\n margin: auto;\\n color: var(--dsw-alias-state-business-primary);\\n opacity: 0;\\n transition: transform 0.15s ease, opacity 100ms ease;\\n}\\n\\n.dsh-notify-dot[data-open] .dsh-notify-chevron {\\n transform: rotate(180deg);\\n}\\n\\n@media (hover: hover) {\\n .dsh-notify-card[data-collapsible] .dsh-notify-head:hover .dsh-notify-dot-idle {\\n opacity: 0;\\n }\\n\\n .dsh-notify-card[data-collapsible] .dsh-notify-head:hover .dsh-notify-chevron {\\n opacity: 1;\\n }\\n}\\n\\n@media (prefers-reduced-motion: reduce) {\\n .dsh-notify-dot-idle,\\n .dsh-notify-chevron {\\n transition: none;\\n }\\n}\\n\\n.dsh-notify-time {\\n flex: none;\\n margin-left: auto;\\n color: var(--dsw-alias-label-tertiary);\\n font-size: 12px;\\n line-height: 18px;\\n}\\n\\n.dsh-notify-prose {\\n padding: 0;\\n}\\n\\n.dsh-notify-body {\\n margin: 2px 0 0 calc(8px + var(--dsh-content-font-delta, 0px) * 0.5);\\n padding-left: calc(13px + var(--dsh-content-font-delta, 0px) * 0.5);\\n border-left: 1px solid var(--dsw-alias-border-l1);\\n color: var(--dsw-alias-label-primary);\\n}\\n\\n.dsh-notify-body > div {\\n color: var(--dsw-alias-label-primary);\\n}\\n\\n[data-chat-flow-kind=\\\"notify-user\\\"] {\\n --dsh-chat-flow-gap: 12px;\\n}\\n\\n[data-chat-flow-kind=\\\"notify-user\\\"] + * {\\n --dsh-chat-flow-gap: 12px;\\n}\\n\\n.dsh-notify-failure {\\n color: var(--dsw-alias-state-error-primary);\\n overflow-wrap: anywhere;\\n white-space: pre-wrap;\\n}\\n\";", "export default \"\\n.dsh-notify-toggle-row {\\n position: relative;\\n display: flex;\\n align-items: center;\\n justify-content: space-between;\\n gap: 16px;\\n min-height: 34px;\\n padding: 0 8px;\\n border-radius: var(--dsw-radius-md);\\n color: var(--dsw-alias-label-primary);\\n font-size: 13px;\\n line-height: 20px;\\n}\\n\\n.dsh-notify-toggle-label {\\n display: inline-flex;\\n align-items: center;\\n gap: 4px;\\n min-width: 0;\\n}\\n\\n.dsh-notify-toggle-info {\\n position: relative;\\n z-index: 1;\\n flex: none;\\n width: 20px;\\n height: 20px;\\n padding: 0;\\n color: var(--dsw-alias-label-caption);\\n}\\n\\n.dsh-notify-toggle-row .dsh-notify-toggle-switch {\\n position: static;\\n}\\n\\n.dsh-notify-toggle-switch::after {\\n content: '';\\n position: absolute;\\n inset: 0;\\n border-radius: var(--dsw-radius-md);\\n}\\n\\n.dsh-notify-toggle-row:has(.dsh-notify-toggle-switch:focus-visible) {\\n background: var(--dsw-alias-interactive-bg-hover);\\n}\\n\\n@media (hover: hover) {\\n .dsh-notify-toggle-row:has(.dsh-notify-toggle-switch:not(:disabled)):hover {\\n background: var(--dsw-alias-interactive-bg-hover);\\n }\\n}\\n\";"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACCO,IAAM,qBAAqB;AAE3B,IAAM,mBAAmB;AAEzB,IAAM,sBAAsB;AAE5B,IAAM,kBAAkB;AAExB,IAAM,yBAAyB;AAE/B,IAAM,sBAAsB;AAE5B,IAAM,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SAAS,CAAC;AAAA,IACjB;AACA,SAAK;AACL,UAAM,cAAc,OAAO,cAAc,UAAU,IAAI;AACvD,WAAO,MAAM;AACX,kBAAY;AACZ,gBAAU;AAAA,IACZ;AAAA,EACF,GAAG,iCAAiC;AAEpC,MAAI,MAAM,OAAO,0BAA0B,MAAM,IAAI,MAAM,SAAS;AAAA,IAClE,MAAM;AAAA,IACN,KAAK;AAAA,IACL,QAAQ;AAAA,IACR,QAAQ,OAAO,EAAE,OAAO,UAAU;AAAA,EACpC,GAAG,cAAc,CAAC;AAElB,MAAI,MAAM,OAAO,oBAAoB,MAAM,IAAI,MAAM,SAAS;AAAA,IAC5D,MAAM;AAAA,IACN,IAAI;AAAA,IACJ,QAAQ;AAAA,IACR,QAAQ,OAAO,EAAE,MAAM,IAAI,YAAY,IAAI,kBAAkB,EAAE;AAAA,EACjE,GAAG,aAAa,CAAC;AAEjB,MAAI,OAAO,MAAM,IAAI,YAAY,YAAY,CAAC,kBAAkB,GAAG,MAAM,IAAI,MAAM;AAAA,IACjF;AAAA,IACA,MAAM,IAAI,MAAM,SAAS;AAAA,MACvB,MAAM;AAAA,MACN,KAAK;AAAA,MACL,QAAQ;AAAA,MACR,QAAQ,OAAO,EAAE,MAAM,IAAI,YAAY,IAAI,kBAAkB,EAAE;AAAA,IACjE,GAAG,UAAU;AAAA,EACf,CAAC,GAAG,sCAAsC;AAC5C;",
|
|
6
|
-
"names": ["import_react", "import_dsh_client_ui_primitives", "import_jsx_runtime", "import_react", "import_dsh_client_ui_primitives", "import_jsx_runtime", "import_jsx_runtime", "import_jsx_runtime"]
|
|
4
|
+
"sourcesContent": ["import type { Context as ClientContext } from '@deepseek-ai/cordis';\nimport type {} from '@deepseek-ai/dsh-client-locale/client';\nimport type {} from '@deepseek-ai/dsh-client-ui-renderer/client';\nimport type {} from '@deepseek-ai/dsh-client-ui-settings/client';\nimport type {} from '@deepseek-ai/dsh-client-ui-plugin-manager/client';\nimport type {} from '@deepseek-ai/dsh-client-ui-tool/client';\nimport type {} from '@deepseek-ai/dsh-client-ui-conversation/client';\nimport type { SyncedConfig } from '@deepseek-ai/dsh-client-config/types';\nimport type { PluginConfig } from '../config.js';\nimport { NOTIFY_TOOL_NAME } from '../shared/config.js';\nimport { ConfigCard } from './ConfigCard.js';\nimport {\n BUNDLE_CONFIG_SLOT,\n BUNDLE_NAME,\n DEFAULT_CARD_PLACEMENT,\n MODEL_OPTIONS_SLOT,\n SETTINGS_NAMESPACE,\n} from './config.js';\nimport { EnabledToggle } from './EnabledToggle.js';\nimport { NS, en, zh } from './locales.js';\nimport { NOTIFY_NODE_KIND, createNotifyDefinition } from './notify-node.js';\nimport type { CardHooks } from './NotifyCard.js';\nimport { NotifyNodeView } from './NotifyNodeView.js';\nimport { NotifyRow } from './NotifyRow.js';\nimport configCss from './ConfigCard.css';\nimport cardCss from './NotifyCard.css';\nimport toggleCss from './EnabledToggle.css';\n\nexport { NS } from './locales.js';\n\n\nexport const name = BUNDLE_NAME;\n\nexport const inject = ['configForms', 'slots', 'locale', 'uiConversation'];\n\nconst SHEETS: readonly (readonly [string, string])[] = [\n ['NotifyCard.css', cardCss],\n ['ConfigCard.css', configCss],\n ['EnabledToggle.css', toggleCss],\n];\n\nfunction injectStyles(): void {\n if (typeof document === 'undefined') return;\n for (const [file, css] of SHEETS) {\n const key = `${BUNDLE_NAME}/${file}`;\n const existing = document.head.querySelector<HTMLStyleElement>(`style[data-plugin-css=\"${key}\"]`);\n const tag = existing ?? document.createElement('style');\n tag.dataset.plugin = BUNDLE_NAME;\n tag.dataset.pluginCss = key;\n tag.textContent = css;\n if (existing === null) document.head.appendChild(tag);\n }\n}\n\nfunction removeStyles(): void {\n if (typeof document === 'undefined') return;\n for (const tag of document.head.querySelectorAll(`style[data-plugin=\"${BUNDLE_NAME}\"]`)) tag.remove();\n}\n\nexport function apply(ctx: ClientContext, config: SyncedConfig<PluginConfig>): void {\n const cardHooks: CardHooks = {\n collapsible: config.collapsible,\n summaryOnly: config.summaryOnly,\n summaryRender: config.summaryRender,\n bodyExpandedByDefault: config.bodyExpandedByDefault,\n showTime: config.showTime,\n };\n ctx.effect(() => {\n injectStyles();\n return () => { removeStyles(); };\n }, 'dsh-notify-user: stylesheets');\n\n ctx.effect(() => ctx.locale.register(NS, { zh, en }), 'dsh-notify-user: dictionaries');\n\n ctx.effect(() => {\n let placement: 'boundary' | 'inline' | undefined;\n let dispose: (() => void) | undefined;\n const sync = (): void => {\n const next = config.cardPlacement.get() === 'inline' ? 'inline' : DEFAULT_CARD_PLACEMENT;\n if (next === placement) return;\n dispose?.();\n placement = next;\n dispose = next === 'boundary'\n ? ctx.uiConversation.events.register(createNotifyDefinition())\n : ctx.slots.inject('tool.call.toolview', () => ctx.slots.register({\n name: 'tool.call.toolview',\n key: NOTIFY_TOOL_NAME,\n locale: NS,\n inject: () => ({ hooks: cardHooks }),\n }, NotifyRow));\n };\n sync();\n const unsubscribe = config.cardPlacement.subscribe(sync);\n return () => {\n unsubscribe();\n dispose?.();\n };\n }, 'dsh-notify-user: card placement');\n\n ctx.slots.inject('conversation.chat.node', () => ctx.slots.register({\n name: 'conversation.chat.node',\n key: NOTIFY_NODE_KIND,\n locale: NS,\n inject: () => ({ hooks: cardHooks }),\n }, NotifyNodeView));\n\n ctx.slots.inject(MODEL_OPTIONS_SLOT, () => ctx.slots.register({\n name: MODEL_OPTIONS_SLOT,\n id: 'notify-user-enabled',\n locale: NS,\n inject: () => ({ form: ctx.configForms.get(SETTINGS_NAMESPACE) }),\n }, EnabledToggle));\n\n ctx.effect(() => ctx.configForms.whileServed([SETTINGS_NAMESPACE], () => ctx.slots.inject(\n BUNDLE_CONFIG_SLOT,\n () => ctx.slots.register({\n name: BUNDLE_CONFIG_SLOT,\n key: BUNDLE_NAME,\n locale: NS,\n inject: () => ({ form: ctx.configForms.get(SETTINGS_NAMESPACE) }),\n }, ConfigCard),\n )), 'dsh-notify-user: plugins page config');\n}\n", "\nexport const SETTINGS_NAMESPACE = 'dsh-notify-user';\n\nexport const NOTIFY_TOOL_NAME = 'notify_user';\n\nexport const DEFAULT_NUDGE_AFTER = 10;\n\nexport const MAX_NUDGE_AFTER = 100;\n\nexport const DEFAULT_RESET_ON_PROSE = true;\n\nexport const DEFAULT_COLLAPSIBLE = true;\n\nexport const DEFAULT_SUMMARY_ONLY = false;\n\nexport const DEFAULT_BODY_EXPANDED_BY_DEFAULT = false;\n\nexport const DEFAULT_SHOW_TIME = false;\n\nexport const SUMMARY_ONLY_FIELD = 'summaryOnly';\n\nexport const SUMMARY_RENDERS = ['card', 'prose'] as const;\n\nexport const DEFAULT_SUMMARY_RENDER = 'card';\n\nexport type SummaryRender = typeof SUMMARY_RENDERS[number];\n\nexport const CARD_PLACEMENTS = ['boundary', 'inline'] as const;\n\nexport type CardPlacement = typeof CARD_PLACEMENTS[number];\n\nexport const DEFAULT_CARD_PLACEMENT: CardPlacement = 'boundary';\n\nexport const DEFAULT_ENABLED = true;\n\nexport type SessionOverrides = Readonly<Record<string, boolean>>;\n\nexport function enabledFor(\n overrides: SessionOverrides | undefined,\n fallback: boolean,\n sessionId: string,\n): boolean {\n const explicit = overrides !== undefined && Object.hasOwn(overrides, sessionId) ? overrides[sessionId] : undefined;\n return typeof explicit === 'boolean' ? explicit : fallback;\n}\n", "import { useEffect, useRef, useState } from 'react';\nimport type { ChangeEvent, KeyboardEvent, ReactElement } from 'react';\nimport { Input, Pill, Switch } from '@deepseek-ai/dsh-client-ui-primitives';\nimport type { PropsLocale } from '@deepseek-ai/dsh-client-ui-slots';\nimport {\n CARD_PLACEMENTS,\n DEFAULT_NUDGE_AFTER,\n MAX_NUDGE_AFTER,\n SUMMARY_RENDERS,\n enqueueConfigWrite,\n readConfig,\n type ClientConfig,\n type ConfigForm,\n type SummaryRender,\n} from './config.js';\nimport { NS, type NotifyKey } from './locales.js';\n\n\ntype ConfigCardProps = PropsLocale<typeof NS> & { form: ConfigForm };\n\nconst REPORT_MODES = ['structured', 'summary'] as const;\n\nconst BODY_MODES = ['always', 'collapsed', 'expanded'] as const;\n\ntype BodyMode = typeof BODY_MODES[number];\n\ninterface ThresholdDraft {\n readonly text: string;\n readonly status: 'editing' | 'pending' | 'rejected';\n}\n\ninterface Choice<T extends string> {\n readonly id: T;\n readonly label: string;\n}\n\nconst REPORT_MODE_LABELS = {\n structured: 'config.reportMode.structured',\n summary: 'config.reportMode.summary',\n} as const satisfies Record<typeof REPORT_MODES[number], NotifyKey>;\n\nconst SUMMARY_RENDER_LABELS = {\n card: 'config.summaryRender.card',\n prose: 'config.summaryRender.prose',\n} as const satisfies Record<SummaryRender, NotifyKey>;\n\nconst BODY_MODE_LABELS = {\n always: 'config.bodyMode.always',\n collapsed: 'config.bodyMode.collapsed',\n expanded: 'config.bodyMode.expanded',\n} as const satisfies Record<BodyMode, NotifyKey>;\n\nfunction bodyModeOf(config: ClientConfig): BodyMode {\n if (!config.collapsible) return 'always';\n return config.bodyExpandedByDefault ? 'expanded' : 'collapsed';\n}\n\nfunction parseThreshold(text: string): number | undefined {\n const value = Number(text);\n return Number.isInteger(value) && value >= 1 && value <= MAX_NUDGE_AFTER ? value : undefined;\n}\n\nfunction writeThreshold(form: ConfigForm, next: number): Promise<boolean> {\n return enqueueConfigWrite(form, async () => {\n const snapshot = form.getSnapshot();\n if (snapshot.status !== 'ready') return false;\n const current = readConfig(snapshot)?.nudgeAfter;\n if (current === undefined || current === 0) return false;\n return current === next || await form.mutate([\n { op: 'set', path: ['nudgeAfter'], value: next },\n ], snapshot.revision);\n });\n}\n\nfunction ChoiceGroup<T extends string>({ label, options, value, onSelect }: {\n readonly label: string;\n readonly options: readonly Choice<T>[];\n readonly value: T;\n readonly onSelect: (id: T) => void;\n}): ReactElement {\n return (\n <div className=\"dsh-notify-config-field\" role=\"group\" aria-label={label}>\n {options.map((option) => (\n <Pill\n key={option.id}\n active={value === option.id}\n aria-pressed={value === option.id}\n onClick={() => { if (value !== option.id) onSelect(option.id); }}\n >\n {option.label}\n </Pill>\n ))}\n </div>\n );\n}\n\nexport function ConfigCard(props: ConfigCardProps): ReactElement {\n const { form, t } = props;\n const [config, setConfig] = useState(() => readConfig(form.getSnapshot()));\n const [draft, setDraft] = useState<ThresholdDraft>();\n const [error, setError] = useState<string | null>(null);\n const [bodyModeDraft, setBodyModeDraft] = useState<{ mode: BodyMode }>();\n const draftRef = useRef<ThresholdDraft | undefined>(undefined);\n\n const updateDraft = (next?: ThresholdDraft): void => {\n draftRef.current = next;\n setDraft(next);\n };\n\n const enqueue = async (operation: () => Promise<boolean>): Promise<void> => {\n const accepted = await enqueueConfigWrite(form, operation).catch(() => false);\n setError(accepted ? null : t('config.write.failed'));\n };\n\n useEffect(() => {\n const sync = (): void => {\n const next = readConfig(form.getSnapshot());\n setConfig(next);\n if (next?.nudgeAfter === 0 && draftRef.current !== undefined) {\n draftRef.current = undefined;\n setDraft(undefined);\n }\n };\n sync();\n return form.subscribe(sync);\n }, [form]);\n\n useEffect(() => () => {\n const draft = draftRef.current;\n if (draft?.status !== 'editing') return;\n const next = parseThreshold(draft.text);\n if (next !== undefined) void writeThreshold(form, next).catch(() => false);\n }, [form]);\n\n if (config === undefined) {\n return (\n <div className=\"dsh-notify-config\">\n <div className=\"dsh-notify-config-note\">{t('config.unavailable')}</div>\n </div>\n );\n }\n\n const bodyMode = bodyModeDraft?.mode ?? bodyModeOf(config);\n const drawsCard = !(config.summaryOnly && config.summaryRender === 'prose');\n const displayedError = draft?.status === 'rejected' ? t('config.write.failed') : error;\n\n const write = (field: string, value: unknown): void => { void enqueue(() => form.set(field, value)); };\n\n const chooseBodyMode = (mode: BodyMode): void => {\n const draft = { mode };\n setBodyModeDraft(draft);\n void enqueue(() => form.mutate([\n { op: 'set', path: ['collapsible'], value: mode !== 'always' },\n { op: 'set', path: ['bodyExpandedByDefault'], value: mode === 'expanded' },\n ])).then(() => {\n setBodyModeDraft((current) => current === draft ? undefined : current);\n });\n };\n\n const commitThreshold = (): void => {\n const current = draftRef.current;\n if (current === undefined || current.status === 'pending') return;\n const next = parseThreshold(current.text);\n if (next === undefined || config.nudgeAfter === 0) {\n updateDraft();\n return;\n }\n const pending: ThresholdDraft = { ...current, status: 'pending' };\n updateDraft(pending);\n void writeThreshold(form, next).catch(() => false).then((accepted) => {\n if (draftRef.current !== pending) return;\n updateDraft(accepted ? undefined : { ...pending, status: 'rejected' });\n });\n };\n\n return (\n <div className=\"dsh-notify-config\">\n <div className=\"dsh-notify-config-row\">\n <div className=\"dsh-notify-config-info\">\n <div className=\"dsh-notify-config-label\">{t('config.defaultEnabled.label')}</div>\n <div className=\"dsh-notify-config-hint\">{t('config.defaultEnabled.hint')}</div>\n </div>\n <div className=\"dsh-notify-config-field\">\n <Switch\n checked={config.defaultEnabled}\n label={t('config.defaultEnabled.label')}\n onChange={(next: boolean) => {\n setConfig({ ...config, defaultEnabled: next });\n write('defaultEnabled', next);\n }}\n />\n </div>\n </div>\n <div className=\"dsh-notify-config-row\">\n <div className=\"dsh-notify-config-info\">\n <div className=\"dsh-notify-config-label\">{t('config.nudgeEnabled.label')}</div>\n <div className=\"dsh-notify-config-hint\">{t('config.nudgeEnabled.hint')}</div>\n </div>\n <div className=\"dsh-notify-config-field\">\n <Switch\n checked={config.nudgeAfter > 0}\n label={t('config.nudgeEnabled.label')}\n onChange={(next: boolean) => { write('nudgeAfter', next ? DEFAULT_NUDGE_AFTER : 0); }}\n />\n </div>\n </div>\n {config.nudgeAfter > 0 ? <div className=\"dsh-notify-config-row\">\n <div className=\"dsh-notify-config-info\">\n <div className=\"dsh-notify-config-label\">{t('config.threshold.label')}</div>\n <div className=\"dsh-notify-config-hint\">{t('config.threshold.hint')}</div>\n </div>\n <div className=\"dsh-notify-config-field\">\n <Input\n className=\"dsh-notify-config-input\"\n type=\"number\"\n inputMode=\"numeric\"\n min={1}\n max={MAX_NUDGE_AFTER}\n step={1}\n value={draft?.text ?? String(config.nudgeAfter)}\n aria-label={t('config.threshold.label')}\n onChange={(event: ChangeEvent<HTMLInputElement>) => {\n updateDraft({ text: event.target.value, status: 'editing' });\n }}\n onBlur={commitThreshold}\n onKeyDown={(event: KeyboardEvent<HTMLInputElement>) => {\n if (event.key === 'Enter') event.currentTarget.blur();\n }}\n />\n <span className=\"dsh-notify-config-unit\">{t('config.threshold.unit')}</span>\n </div>\n </div> : null}\n <div className=\"dsh-notify-config-row\">\n <div className=\"dsh-notify-config-info\">\n <div className=\"dsh-notify-config-label\">{t('config.resetOnProse.label')}</div>\n <div className=\"dsh-notify-config-hint\">{t('config.resetOnProse.hint')}</div>\n </div>\n <div className=\"dsh-notify-config-field\">\n <Switch\n checked={config.resetOnProse}\n label={t('config.resetOnProse.label')}\n onChange={(next: boolean) => {\n setConfig({ ...config, resetOnProse: next });\n write('resetOnProse', next);\n }}\n />\n </div>\n </div>\n <div className=\"dsh-notify-config-row\">\n <div className=\"dsh-notify-config-info\">\n <div className=\"dsh-notify-config-label\">{t('config.placement.label')}</div>\n <div className=\"dsh-notify-config-hint\">{t('config.placement.hint')}</div>\n </div>\n <ChoiceGroup\n label={t('config.placement.label')}\n value={config.cardPlacement}\n options={CARD_PLACEMENTS.map((id) => ({\n id,\n label: t(id === 'boundary' ? 'config.placement.boundary' : 'config.placement.inline'),\n }))}\n onSelect={(id) => {\n setConfig({ ...config, cardPlacement: id });\n write('cardPlacement', id);\n }}\n />\n </div>\n <div className=\"dsh-notify-config-row\">\n <div className=\"dsh-notify-config-info\">\n <div className=\"dsh-notify-config-label\">{t('config.reportMode.label')}</div>\n <div className=\"dsh-notify-config-hint\">{t('config.reportMode.hint')}</div>\n </div>\n <ChoiceGroup\n label={t('config.reportMode.label')}\n value={config.summaryOnly ? 'summary' : 'structured'}\n options={REPORT_MODES.map((id) => ({ id, label: t(REPORT_MODE_LABELS[id]) }))}\n onSelect={(id) => {\n const summary = id === 'summary';\n setConfig({ ...config, summaryOnly: summary });\n write('summaryOnly', summary);\n }}\n />\n </div>\n {config.summaryOnly ? (\n <div className=\"dsh-notify-config-row\">\n <div className=\"dsh-notify-config-info\">\n <div className=\"dsh-notify-config-label\">{t('config.summaryRender.label')}</div>\n <div className=\"dsh-notify-config-hint\">{t('config.summaryRender.hint')}</div>\n </div>\n <ChoiceGroup\n label={t('config.summaryRender.label')}\n value={config.summaryRender}\n options={SUMMARY_RENDERS.map((id) => ({ id, label: t(SUMMARY_RENDER_LABELS[id]) }))}\n onSelect={(id) => {\n setConfig({ ...config, summaryRender: id });\n write('summaryRender', id);\n }}\n />\n </div>\n ) : null}\n {config.summaryOnly ? null : (\n <div className=\"dsh-notify-config-row\">\n <div className=\"dsh-notify-config-info\">\n <div className=\"dsh-notify-config-label\">{t('config.bodyMode.label')}</div>\n <div className=\"dsh-notify-config-hint\">{t('config.bodyMode.hint')}</div>\n </div>\n <ChoiceGroup\n label={t('config.bodyMode.label')}\n value={bodyMode}\n options={BODY_MODES.map((id) => ({ id, label: t(BODY_MODE_LABELS[id]) }))}\n onSelect={(id) => { chooseBodyMode(id); }}\n />\n </div>\n )}\n {drawsCard ? (\n <div className=\"dsh-notify-config-row\">\n <div className=\"dsh-notify-config-info\">\n <div className=\"dsh-notify-config-label\">{t('config.showTime.label')}</div>\n <div className=\"dsh-notify-config-hint\">{t('config.showTime.hint')}</div>\n </div>\n <div className=\"dsh-notify-config-field\">\n <Switch\n checked={config.showTime}\n label={t('config.showTime.label')}\n onChange={(next: boolean) => {\n setConfig({ ...config, showTime: next });\n write('showTime', next);\n }}\n />\n </div>\n </div>\n ) : null}\n {displayedError === null ? null : <div className=\"dsh-notify-config-error\" role=\"status\">{displayedError}</div>}\n </div>\n );\n}\n", "import type { ConfigForm as HostConfigForm } from '@deepseek-ai/dsh-client-ui-settings/client';\nimport {\n CARD_PLACEMENTS,\n DEFAULT_BODY_EXPANDED_BY_DEFAULT,\n DEFAULT_CARD_PLACEMENT,\n DEFAULT_COLLAPSIBLE,\n DEFAULT_ENABLED,\n DEFAULT_NUDGE_AFTER,\n DEFAULT_RESET_ON_PROSE,\n DEFAULT_SHOW_TIME,\n DEFAULT_SUMMARY_ONLY,\n DEFAULT_SUMMARY_RENDER,\n MAX_NUDGE_AFTER,\n SUMMARY_RENDERS,\n type CardPlacement,\n type SessionOverrides,\n type SummaryRender,\n} from '../shared/config.js';\n\nexport {\n CARD_PLACEMENTS,\n DEFAULT_BODY_EXPANDED_BY_DEFAULT,\n DEFAULT_CARD_PLACEMENT,\n DEFAULT_COLLAPSIBLE,\n DEFAULT_ENABLED,\n DEFAULT_NUDGE_AFTER,\n DEFAULT_RESET_ON_PROSE,\n DEFAULT_SHOW_TIME,\n DEFAULT_SUMMARY_ONLY,\n DEFAULT_SUMMARY_RENDER,\n MAX_NUDGE_AFTER,\n SETTINGS_NAMESPACE,\n SUMMARY_RENDERS,\n enabledFor,\n} from '../shared/config.js';\n\nexport type { CardPlacement, SessionOverrides, SummaryRender } from '../shared/config.js';\n\nexport const BUNDLE_NAME = '@lynn123411/dsh-notify-user';\n\nexport const BUNDLE_CONFIG_SLOT = 'plugins.bundle.config';\n\nexport const MODEL_OPTIONS_SLOT = 'conversation.input.model.options';\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null && !Array.isArray(value);\n}\n\nexport type ConfigForm = Pick<HostConfigForm<unknown>, 'getSnapshot' | 'subscribe' | 'set' | 'mutate'>;\n\ntype ConfigSnapshot = ReturnType<ConfigForm['getSnapshot']>;\n\nconst writeQueues = new WeakMap<ConfigForm, Promise<boolean>>();\n\nexport function enqueueConfigWrite(form: ConfigForm, operation: () => Promise<boolean>): Promise<boolean> {\n const task = (writeQueues.get(form) ?? Promise.resolve()).then(operation);\n writeQueues.set(form, task.catch(() => false));\n return task;\n}\n\nfunction sessionOverride(section: unknown, sessionId: string): unknown {\n const overrides = isRecord(section) ? section['sessionOverrides'] : undefined;\n return isRecord(overrides) && Object.hasOwn(overrides, sessionId) ? overrides[sessionId] : undefined;\n}\n\nfunction mutateSessionEnabled(\n form: ConfigForm,\n snapshot: ConfigSnapshot,\n sessionId: string,\n enabled: boolean,\n): Promise<boolean> {\n const config = decodeConfig(snapshot.value);\n const inherited = sessionOverride(snapshot.base, sessionId);\n const path = ['sessionOverrides', sessionId];\n const op = enabled === (typeof inherited === 'boolean' ? inherited : config.defaultEnabled)\n ? { op: 'unset' as const, path }\n : { op: 'set' as const, path, value: enabled };\n return form.mutate([op], snapshot.revision);\n}\n\nexport function writeSessionEnabled(form: ConfigForm, sessionId: string, enabled: boolean): Promise<boolean> {\n return enqueueConfigWrite(form, async () => {\n const snapshot = form.getSnapshot();\n if (snapshot.status !== 'ready') return false;\n if (await mutateSessionEnabled(form, snapshot, sessionId, enabled)) return true;\n\n const latest = form.getSnapshot();\n if (latest.status !== 'ready' || latest.revision === snapshot.revision) return false;\n const config = decodeConfig(latest.value);\n const currentOverride = sessionOverride(latest.value, sessionId);\n if ((typeof currentOverride === 'boolean' ? currentOverride : config.defaultEnabled) === enabled) return true;\n if (sessionOverride(latest.user, sessionId) !== sessionOverride(snapshot.user, sessionId)) return false;\n return mutateSessionEnabled(form, latest, sessionId, enabled);\n });\n}\n\nexport interface ClientConfig {\n nudgeAfter: number;\n resetOnProse: boolean;\n collapsible: boolean;\n summaryOnly: boolean;\n summaryRender: SummaryRender;\n bodyExpandedByDefault: boolean;\n showTime: boolean;\n cardPlacement: CardPlacement;\n defaultEnabled: boolean;\n sessionOverrides: SessionOverrides;\n}\n\nexport const DEFAULT_CLIENT_CONFIG: ClientConfig = {\n nudgeAfter: DEFAULT_NUDGE_AFTER,\n resetOnProse: DEFAULT_RESET_ON_PROSE,\n collapsible: DEFAULT_COLLAPSIBLE,\n summaryOnly: DEFAULT_SUMMARY_ONLY,\n summaryRender: DEFAULT_SUMMARY_RENDER,\n bodyExpandedByDefault: DEFAULT_BODY_EXPANDED_BY_DEFAULT,\n showTime: DEFAULT_SHOW_TIME,\n cardPlacement: DEFAULT_CARD_PLACEMENT,\n defaultEnabled: DEFAULT_ENABLED,\n sessionOverrides: {},\n};\n\nfunction readOverrides(value: unknown): Record<string, boolean> {\n if (!isRecord(value)) return {};\n const overrides: Record<string, boolean> = {};\n for (const [sessionId, enabled] of Object.entries(value)) {\n if (typeof enabled === 'boolean') overrides[sessionId] = enabled;\n }\n return overrides;\n}\n\nexport function readConfig(snapshot: ConfigSnapshot): ClientConfig | undefined {\n if (snapshot.status === 'unavailable') return undefined;\n return decodeConfig(snapshot.value);\n}\n\nfunction decodeConfig(section: unknown): ClientConfig {\n const value = isRecord(section) ? section : {};\n const rawThreshold = value['nudgeAfter'];\n const nudgeAfter = typeof rawThreshold === 'number' && Number.isFinite(rawThreshold)\n ? Math.min(MAX_NUDGE_AFTER, Math.max(0, Math.floor(rawThreshold)))\n : DEFAULT_CLIENT_CONFIG.nudgeAfter;\n const rawResetOnProse = value['resetOnProse'];\n const resetOnProse = typeof rawResetOnProse === 'boolean' ? rawResetOnProse : DEFAULT_CLIENT_CONFIG.resetOnProse;\n const rawCollapsible = value['collapsible'];\n const collapsible = typeof rawCollapsible === 'boolean' ? rawCollapsible : DEFAULT_CLIENT_CONFIG.collapsible;\n const rawSummaryOnly = value['summaryOnly'];\n const summaryOnly = typeof rawSummaryOnly === 'boolean' ? rawSummaryOnly : DEFAULT_CLIENT_CONFIG.summaryOnly;\n const rawSummaryRender = value['summaryRender'];\n const summaryRender = SUMMARY_RENDERS.find(render => render === rawSummaryRender) ?? DEFAULT_CLIENT_CONFIG.summaryRender;\n const rawBodyExpanded = value['bodyExpandedByDefault'];\n const bodyExpandedByDefault = typeof rawBodyExpanded === 'boolean' ? rawBodyExpanded : DEFAULT_CLIENT_CONFIG.bodyExpandedByDefault;\n const rawShowTime = value['showTime'];\n const showTime = typeof rawShowTime === 'boolean' ? rawShowTime : DEFAULT_CLIENT_CONFIG.showTime;\n const rawPlacement = value['cardPlacement'];\n const cardPlacement = CARD_PLACEMENTS.find(placement => placement === rawPlacement) ?? DEFAULT_CLIENT_CONFIG.cardPlacement;\n const rawDefaultEnabled = value['defaultEnabled'];\n const defaultEnabled = typeof rawDefaultEnabled === 'boolean' ? rawDefaultEnabled : DEFAULT_CLIENT_CONFIG.defaultEnabled;\n const sessionOverrides = readOverrides(value['sessionOverrides']);\n return { nudgeAfter, resetOnProse, collapsible, summaryOnly, summaryRender, bodyExpandedByDefault, showTime, cardPlacement, defaultEnabled, sessionOverrides };\n}\n", "import { useEffect, useState } from 'react';\nimport type { ReactElement } from 'react';\nimport { Button, IconInfoOutlineRegular, Switch, Tooltip } from '@deepseek-ai/dsh-client-ui-primitives';\nimport type { PropsLocale, PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots';\nimport type {} from '@deepseek-ai/dsh-client-ui-model-selection/client';\nimport type {} from '@deepseek-ai/dsh-client-ui-session/client';\nimport {\n enabledFor,\n readConfig,\n writeSessionEnabled,\n type ConfigForm,\n} from './config.js';\nimport { NS } from './locales.js';\n\n\ntype EnabledToggleProps = PropsRuntime<'conversation.input.model.options'>\n & PropsLocale<typeof NS>\n & { form: ConfigForm };\n\nexport function EnabledToggle(props: EnabledToggleProps): ReactElement | null {\n const { sessionId, useSession, useSessions } = props;\n const addressedChild = useSession(snapshot => snapshot.subagent !== null);\n const listedChild = useSessions(state => state.byId[sessionId]?.origin === 'subagent');\n if (addressedChild || listedChild) return null;\n return <RootEnabledToggle key={sessionId} {...props} />;\n}\n\nfunction RootEnabledToggle(\n { sessionId, form, locked, reportFailure, t }: EnabledToggleProps,\n): ReactElement | null {\n const [config, setConfig] = useState(() => readConfig(form.getSnapshot()));\n const [pending, setPending] = useState<boolean>();\n\n useEffect(() => {\n const sync = (): void => { setConfig(readConfig(form.getSnapshot())); };\n sync();\n return form.subscribe(sync);\n }, [form]);\n\n if (config === undefined) return null;\n\n const enabled = enabledFor(config.sessionOverrides, config.defaultEnabled, sessionId);\n\n const select = (next: boolean): void => {\n setPending(next);\n void writeSessionEnabled(form, sessionId, next).catch(() => false).then((accepted) => {\n setConfig(readConfig(form.getSnapshot()));\n if (!accepted) reportFailure(t('toggle.failed'));\n }).finally(() => { setPending(undefined); });\n };\n\n return (\n <div className=\"dsh-notify-toggle-row\">\n <span className=\"dsh-notify-toggle-label\">\n <span>{t('toggle.label')}</span>\n <Tooltip label={t('toggle.description')} side=\"top\" delayMs={300} maxWidth={300} portal openOnClick>\n <Button variant=\"ghost\" size=\"sm\" className=\"dsh-notify-toggle-info\" aria-label={t('toggle.infoLabel')}>\n <IconInfoOutlineRegular size={11} aria-hidden=\"true\" />\n </Button>\n </Tooltip>\n </span>\n <Switch\n className=\"dsh-notify-toggle-switch\"\n checked={pending ?? enabled}\n disabled={locked || pending !== undefined}\n label={t('toggle.label')}\n onChange={select}\n />\n </div>\n );\n}\n", "export const NS = 'notifyUser';\n\nexport const en = {\n 'row.preparing': 'Sending update\u2026',\n 'row.failed': 'Could not send update',\n 'row.fallbackTitle': 'Update',\n 'markdown.copy': 'Copy',\n 'markdown.copied': 'Copied',\n 'markdown.footnotes': 'Footnotes',\n 'toggle.label': 'Proactive updates',\n 'toggle.description': 'The model reports progress while it works. Turn it off and this session stops nudging it to report and no longer offers it the reporting tool.',\n 'toggle.infoLabel': 'About proactive updates',\n 'toggle.failed': \"Couldn't save the setting; try again.\",\n 'config.defaultEnabled.label': 'On by default',\n 'config.defaultEnabled.hint': 'New sessions start with proactive updates on; change a single session in the model and reasoning menu.',\n 'config.threshold.label': 'Nudge after',\n 'config.threshold.hint': 'Tool calls without an update before the model is nudged.',\n 'config.nudgeEnabled.label': 'Nudge for updates',\n 'config.nudgeEnabled.hint': 'The model can still send updates when nudging is off.',\n 'config.threshold.unit': 'calls',\n 'config.resetOnProse.label': 'Reset on prose',\n 'config.resetOnProse.hint': 'Any assistant reply with text counts as an update and resets the count; turn it off to reset only on a successful update, a new turn, or a user message.',\n 'config.reportMode.label': 'Update format',\n 'config.reportMode.hint': 'Summary only: the model writes one line and the card shows just the title; structured body: the model writes a title and a body.',\n 'config.reportMode.structured': 'Structured body',\n 'config.reportMode.summary': 'Summary only',\n 'config.summaryRender.label': 'Summary display',\n 'config.summaryRender.hint': 'Card shows the dot and time; prose renders as a plain paragraph like an assistant reply.',\n 'config.summaryRender.card': 'Card',\n 'config.summaryRender.prose': 'Prose',\n 'config.bodyMode.label': 'Body display',\n 'config.bodyMode.hint': 'Always expanded has no toggle; collapsed expands from the dot; expanded shows the body right away.',\n 'config.bodyMode.always': 'Always expanded',\n 'config.bodyMode.collapsed': 'Collapsed',\n 'config.bodyMode.expanded': 'Expanded',\n 'config.showTime.label': 'Show time',\n 'config.showTime.hint': 'Shows when the update was sent at the right end of the title row; turn it off to keep just the dot and the title.',\n 'config.placement.label': 'Card placement',\n 'config.placement.hint': 'At the step-group boundary, tool calls between two updates fold into their own sub-folds; following the tool row, the card folds with the group.',\n 'config.placement.boundary': 'Step-group boundary',\n 'config.placement.inline': 'Follow tool row',\n 'config.write.failed': \"Couldn't save; change it again to retry.\",\n 'config.unavailable': 'This configuration is unavailable right now.',\n};\n\nexport const zh = {\n 'row.preparing': '\u6B63\u5728\u6C47\u62A5\u2026',\n 'row.failed': '\u6C47\u62A5\u5931\u8D25',\n 'row.fallbackTitle': '\u66F4\u65B0',\n 'markdown.copy': '\u590D\u5236',\n 'markdown.copied': '\u5DF2\u590D\u5236',\n 'markdown.footnotes': '\u811A\u6CE8',\n 'toggle.label': '\u4E3B\u52A8\u6C47\u62A5',\n 'toggle.description': '\u6A21\u578B\u5728\u5E72\u6D3B\u9014\u4E2D\u5411\u4F60\u6C47\u62A5\u8FDB\u5EA6\u3002\u5173\u6389\u540E\u8FD9\u4E2A\u4F1A\u8BDD\u4E0D\u518D\u50AC\u5B83\u6C47\u62A5\uFF0C\u4E5F\u4E0D\u518D\u5411\u5B83\u63D0\u4F9B\u6C47\u62A5\u5DE5\u5177\u3002',\n 'toggle.infoLabel': '\u5173\u4E8E\u4E3B\u52A8\u6C47\u62A5',\n 'toggle.failed': '\u6CA1\u4FDD\u5B58\u4E0A\uFF0C\u8BF7\u91CD\u8BD5\u3002',\n 'config.defaultEnabled.label': '\u9ED8\u8BA4\u5F00\u542F',\n 'config.defaultEnabled.hint': '\u65B0\u4F1A\u8BDD\u9ED8\u8BA4\u6253\u5F00\u4E3B\u52A8\u6C47\u62A5\uFF1B\u5355\u4E2A\u4F1A\u8BDD\u7684\u5F00\u5173\u5728\u6A21\u578B\u4E0E\u63A8\u7406\u7B49\u7EA7\u83DC\u5355\u91CC\u3002',\n 'config.threshold.label': '\u50AC\u529E\u9608\u503C',\n 'config.threshold.hint': '\u8FDE\u7EED\u591A\u5C11\u6B21\u5DE5\u5177\u8C03\u7528\u6CA1\u6709\u6C47\u62A5\u65F6\u50AC\u4E00\u6B21\u3002',\n 'config.nudgeEnabled.label': '\u50AC\u529E\u63D0\u9192',\n 'config.nudgeEnabled.hint': '\u5173\u95ED\u50AC\u529E\u540E\uFF0C\u6A21\u578B\u4ECD\u53EF\u4E3B\u52A8\u6C47\u62A5\u3002',\n 'config.threshold.unit': '\u6B21',\n 'config.resetOnProse.label': '\u6563\u6587\u56DE\u590D\u6E05\u96F6',\n 'config.resetOnProse.hint': '\u6A21\u578B\u5728\u52A9\u624B\u6D88\u606F\u91CC\u5199\u4E86\u6B63\u6587\u5C31\u7B97\u6C47\u62A5\u8FC7\uFF0C\u8BA1\u6570\u6E05\u96F6\uFF1B\u5173\u6389\u540E\u53EA\u5728\u6C47\u62A5\u6210\u529F\u3001\u65B0\u56DE\u5408\u6216\u7528\u6237\u63D2\u8BDD\u65F6\u6E05\u96F6\u3002',\n 'config.reportMode.label': '\u6C47\u62A5\u5F62\u6001',\n 'config.reportMode.hint': '\u53EA\u62A5\u6458\u8981\u65F6\u6A21\u578B\u53EA\u5199\u4E00\u884C\u6807\u9898\uFF0C\u5361\u7247\u53EA\u663E\u793A\u6807\u9898\u884C\uFF1B\u7ED3\u6784\u5316\u6B63\u6587\u65F6\u6A21\u578B\u5199\u6807\u9898\u4E0E\u6B63\u6587\u3002',\n 'config.reportMode.structured': '\u7ED3\u6784\u5316\u6B63\u6587',\n 'config.reportMode.summary': '\u53EA\u62A5\u6458\u8981',\n 'config.summaryRender.label': '\u6458\u8981\u5448\u73B0',\n 'config.summaryRender.hint': '\u8FDB\u5EA6\u5361\u5E26\u5706\u70B9\u4E0E\u65F6\u95F4\uFF1B\u6563\u6587\u6309\u666E\u901A\u6BB5\u843D\u6E32\u67D3\uFF0C\u770B\u8D77\u6765\u50CF\u52A9\u624B\u5199\u7684\u6B63\u6587\u3002',\n 'config.summaryRender.card': '\u8FDB\u5EA6\u5361',\n 'config.summaryRender.prose': '\u6563\u6587',\n 'config.bodyMode.label': '\u6B63\u6587\u663E\u793A',\n 'config.bodyMode.hint': '\u59CB\u7EC8\u5C55\u5F00\u6CA1\u6709\u6298\u53E0\u952E\uFF1B\u9ED8\u8BA4\u6536\u8D77\u65F6\u70B9\u5706\u70B9\u5C55\u5F00\uFF1B\u9ED8\u8BA4\u5C55\u5F00\u76F4\u63A5\u770B\u5230\u6B63\u6587\u3002',\n 'config.bodyMode.always': '\u59CB\u7EC8\u5C55\u5F00',\n 'config.bodyMode.collapsed': '\u9ED8\u8BA4\u6536\u8D77',\n 'config.bodyMode.expanded': '\u9ED8\u8BA4\u5C55\u5F00',\n 'config.showTime.label': '\u663E\u793A\u65F6\u95F4',\n 'config.showTime.hint': '\u6807\u9898\u884C\u53F3\u4FA7\u663E\u793A\u8FD9\u6761\u6C47\u62A5\u7684\u65F6\u95F4\uFF1B\u5173\u6389\u540E\u6807\u9898\u884C\u53EA\u5269\u5706\u70B9\u4E0E\u6807\u9898\u3002',\n 'config.placement.label': '\u8FDB\u5EA6\u5361\u4F4D\u7F6E',\n 'config.placement.hint': '\u653E\u5728\u6B65\u9AA4\u7EC4\u8FB9\u754C\u65F6\uFF0C\u4E24\u6B21\u6C47\u62A5\u4E4B\u95F4\u7684\u5DE5\u5177\u8C03\u7528\u5404\u81EA\u6298\u6210\u4E00\u4E2A\u5B50\u6298\u53E0\uFF1B\u8DDF\u968F\u5DE5\u5177\u884C\u65F6\uFF0C\u5361\u7247\u968F\u5DE5\u5177\u884C\u4E00\u8D77\u6298\u8FDB\u7EC4\u91CC\u3002',\n 'config.placement.boundary': '\u6B65\u9AA4\u7EC4\u8FB9\u754C',\n 'config.placement.inline': '\u8DDF\u968F\u5DE5\u5177\u884C',\n 'config.write.failed': '\u6CA1\u5199\u8FDB\u53BB\uFF0C\u518D\u6539\u4E00\u6B21\u8BD5\u8BD5\u3002',\n 'config.unavailable': '\u8FD9\u4EFD\u914D\u7F6E\u73B0\u5728\u8BFB\u4E0D\u5230\u3002',\n};\n\nexport type NotifyKey = keyof typeof en;\n\ndeclare module '@deepseek-ai/dsh-client-ui-slots' {\n interface LocaleNamespaceMap {\n notifyUser: NotifyKey;\n }\n}\n", "\nexport interface Update {\n title?: string;\n message: string;\n}\n\nexport interface NotifyCardData {\n readonly title?: string;\n readonly message: string;\n readonly time: number;\n readonly settled: boolean;\n readonly failure?: { readonly detail: string };\n}\n\nexport function failureOf(\n content: readonly { readonly type: string; readonly text?: string }[],\n error?: { readonly name: string; readonly code: string; readonly reason?: string },\n): NonNullable<NotifyCardData['failure']> {\n const text = content.flatMap(block => block.type === 'text' && block.text?.trim() ? [block.text] : []).join('\\n');\n const detail = text || (error === undefined ? '' : error.reason || `${error.name}: ${error.code}`);\n return { detail };\n}\n\nexport function parseUpdate(value: unknown): Update | null {\n if (typeof value !== 'object' || value === null) return null;\n const record = value as Record<string, unknown>;\n const message = typeof record['message'] === 'string' ? record['message'] : '';\n const title = typeof record['title'] === 'string' && record['title'].length > 0 ? record['title'] : undefined;\n if (message.length === 0 && title === undefined) return null;\n return title === undefined ? { message } : { title, message };\n}\n\nexport function parseArgs(raw: string | undefined): Update | null {\n if (typeof raw !== 'string' || raw.length === 0) return null;\n try {\n return parseUpdate(JSON.parse(raw));\n } catch {\n return null;\n }\n}\n\nexport function readUpdate(block: unknown): Update {\n if (typeof block !== 'object' || block === null) return { message: '' };\n const record = block as Record<string, unknown>;\n const fromMeta = parseUpdate(record['meta']);\n if (fromMeta !== null) return fromMeta;\n const call = record['call'];\n if (typeof call === 'object' && call !== null) {\n const fromCall = parseArgs((call as Record<string, unknown>)['argsRaw'] as string | undefined);\n if (fromCall !== null) return fromCall;\n }\n return parseArgs(record['argsRaw'] as string | undefined) ?? { message: '' };\n}\n\nexport function titleOf(update: Update, fallback: string): string {\n if (update.title !== undefined) return update.title;\n const first = update.message\n .split('\\n')\n .map((line) => line.trim())\n .find((line) => line.length > 0);\n if (first === undefined) return fallback;\n return first.length > 60 ? `${first.slice(0, 59)}\u2026` : first;\n}\n\nexport function formatClock(ms: unknown): string | null {\n if (typeof ms !== 'number' || !Number.isFinite(ms)) return null;\n const date = new Date(ms);\n const pad = (value: number): string => String(value).padStart(2, '0');\n return `${pad(date.getMonth() + 1)}-${pad(date.getDate())} ${pad(date.getHours())}:${pad(date.getMinutes())}`;\n}\n", "\nimport type {\n ConversationMatch, ConversationMatchResult, ConversationNodeContext, ConversationNodeDefinition,\n ConversationStartMatch,\n} from '@deepseek-ai/dsh-client-ui-conversation/client';\nimport type { ChatNode } from '@deepseek-ai/dsh-client-ui-chat/client';\nimport { NOTIFY_TOOL_NAME } from '../shared/config.js';\nimport { failureOf, parseArgs, parseUpdate, type NotifyCardData, type Update } from './row-model.js';\n\nexport const NOTIFY_NODE_KIND = 'notify-user';\n\nconst MAX_COMPLETED_CALLS = 4096;\n\ninterface NotifyNodeState extends NotifyCardData {\n readonly anchorSeq?: number;\n readonly useNativeError?: true;\n}\n\ndeclare module '@deepseek-ai/dsh-client-ui-chat/client' {\n interface ChatNodeDataMap {\n 'notify-user': NotifyCardData;\n }\n}\n\nfunction stateOf(update: Update | null, time: number, settled: boolean, anchorSeq: number): NotifyNodeState {\n return {\n ...update === null ? { message: '' } : update,\n time,\n settled,\n anchorSeq,\n };\n}\n\nfunction settledState(current: NotifyNodeState, update: Update | null): NotifyNodeState {\n return {\n ...update ?? current,\n time: current.time,\n settled: true,\n ...current.anchorSeq === undefined ? {} : { anchorSeq: current.anchorSeq },\n };\n}\n\nfunction rootResultState(\n event: Extract<ConversationMatch['event'], { type: 'tool/result' }>,\n current?: NotifyNodeState,\n): NotifyNodeState {\n if (event.data.message.isError) {\n return {\n ...stateOf(null, current?.time ?? event.time, true, current?.anchorSeq ?? event.seq),\n failure: failureOf(event.data.message.content, event.data.error),\n };\n }\n const update = parseUpdate(event.data.meta);\n return current === undefined ? stateOf(update, event.time, true, event.seq) : settledState(current, update);\n}\n\nfunction fallbackState(context: ConversationNodeContext<NotifyNodeState>): NotifyNodeState | undefined {\n for (let index = context.matches.length - 1; index >= 0; index -= 1) {\n const event = context.matches[index].event;\n if (event.type === 'tool/result') return rootResultState(event);\n if (event.type === 'tool/ptc-dispatch') {\n if (event.data.isError) return undefined;\n return {\n ...parseUpdate(event.data.meta) ?? parseUpdate(event.data.arguments) ?? { message: '' },\n time: event.time,\n settled: true,\n anchorSeq: event.seq,\n };\n }\n }\n return undefined;\n}\n\nexport function createNotifyDefinition(): ConversationNodeDefinition<NotifyNodeState> {\n const pendingCalls = new Set<string>();\n const completedCalls = new Set<string>();\n\n return {\n kind: NOTIFY_NODE_KIND,\n target: 'chat',\n\n match(event): ConversationMatchResult | null {\n switch (event.type) {\n case 'tool/call': {\n if (event.data.name !== NOTIFY_TOOL_NAME) return null;\n const callId = String(event.data.callId);\n if (!completedCalls.has(callId)) pendingCalls.add(callId);\n return { id: callId, role: 'start', exclusive: true };\n }\n case 'tool/result': {\n if (event.surfaceOp !== 'append') return null;\n const callId = String(event.data.message.source.callId);\n if (pendingCalls.delete(callId)) {\n completedCalls.add(callId);\n if (completedCalls.size > MAX_COMPLETED_CALLS) {\n const oldest = completedCalls.values().next().value;\n if (oldest !== undefined) completedCalls.delete(oldest);\n }\n } else if (!completedCalls.has(callId)) {\n return null;\n }\n return { id: callId, role: 'update', exclusive: true };\n }\n case 'assistant/live-chunk': {\n const chunk = event.data.chunk;\n if (chunk.type === 'block-end' && chunk.block.type === 'tool-call' && chunk.block.name === NOTIFY_TOOL_NAME) {\n return { id: String(chunk.block.id), role: 'start', exclusive: true };\n }\n if (chunk.type === 'tool-call-delta' && chunk.name === NOTIFY_TOOL_NAME) {\n return { id: String(chunk.id), role: 'start', exclusive: true };\n }\n return null;\n }\n case 'tool/ptc-dispatch-start':\n case 'tool/ptc-dispatch': {\n if (event.data.name !== NOTIFY_TOOL_NAME) return null;\n if (event.type === 'tool/ptc-dispatch' && event.data.isError) {\n return { id: String(event.data.subCallId), role: 'update' };\n }\n return {\n id: String(event.data.subCallId),\n role: event.type === 'tool/ptc-dispatch-start' ? 'start' : 'update',\n exclusive: true,\n };\n }\n default:\n return null;\n }\n },\n\n start(_context: ConversationNodeContext<NotifyNodeState>, match: ConversationStartMatch): NotifyNodeState {\n const event = match.event;\n if (event.type === 'tool/call') return stateOf(parseArgs(event.data.arguments), event.time, false, event.seq);\n if (event.type === 'tool/ptc-dispatch-start') {\n return stateOf(parseUpdate(event.data.arguments), event.time, false, event.seq);\n }\n return { message: '', time: event.time, settled: false };\n },\n\n update(\n context: ConversationNodeContext<NotifyNodeState> & { readonly state: NotifyNodeState },\n match: ConversationMatch,\n ): NotifyNodeState {\n const event = match.event;\n const current = context.state;\n if (event.type === 'tool/call') {\n return stateOf(parseArgs(event.data.arguments) ?? { message: current.message }, event.time, current.settled, event.seq);\n }\n if (event.type === 'tool/result') return rootResultState(event, current);\n if (event.type === 'tool/ptc-dispatch') {\n if (event.data.isError) return { ...current, useNativeError: true };\n return settledState(current, parseUpdate(event.data.meta) ?? parseUpdate(event.data.arguments));\n }\n return current;\n },\n\n buildViewNode(context: ConversationNodeContext<NotifyNodeState>): ChatNode<'notify-user'> | null {\n const state = context.state ?? fallbackState(context);\n if (state === undefined || state.anchorSeq === undefined) return null;\n const node: ChatNode<'notify-user'> = {\n key: context.key,\n id: context.id,\n kind: NOTIFY_NODE_KIND,\n target: 'chat',\n anchorSeq: state.anchorSeq,\n location: context.start?.location ?? context.matches[0]?.location ?? { kind: 'unresolved' },\n groupTree: state.failure === undefined ? 'process' : undefined,\n visibility: state.useNativeError ? 'hidden' : 'visible',\n data: {\n ...state.title === undefined ? {} : { title: state.title },\n message: state.message,\n time: state.time,\n settled: state.settled,\n ...state.failure === undefined ? {} : { failure: state.failure },\n },\n };\n return node;\n },\n };\n}\n", "import { useState } from 'react';\nimport type { ReactElement } from 'react';\nimport {\n IconChevronDownOutlineRegular,\n MarkdownDelegateProvider,\n MarkdownText,\n TextShimmer,\n} from '@deepseek-ai/dsh-client-ui-primitives';\nimport type { MarkdownLabels } from '@deepseek-ai/dsh-client-ui-primitives';\nimport type { OpenFileOptions } from '@deepseek-ai/dsh-client-ui-chat/client';\nimport type { InjectFace, PropsLocale } from '@deepseek-ai/dsh-client-ui-slots';\nimport { NOTIFY_TOOL_NAME } from '../shared/config.js';\nimport type { SyncedConfig } from '@deepseek-ai/dsh-client-config/types';\nimport type { PluginConfig } from '../config.js';\nimport { DEFAULT_CLIENT_CONFIG } from './config.js';\nimport { NS } from './locales.js';\nimport { formatClock, titleOf, type NotifyCardData } from './row-model.js';\n\n\nexport type CardHooks = Pick<SyncedConfig<PluginConfig>,\n 'collapsible' | 'summaryOnly' | 'summaryRender' | 'bodyExpandedByDefault' | 'showTime'>;\nexport type CardConfigProps = InjectFace<{ hooks: CardHooks }>;\n\ntype NotifyCardProps = {\n readonly config: CardConfigProps;\n readonly data: NotifyCardData;\n readonly openFile: (path: string, options?: OpenFileOptions) => void;\n readonly t: PropsLocale<typeof NS>['t'];\n readonly seat: 'node' | 'row';\n};\n\nfunction markdownLabels(t: NotifyCardProps['t']): MarkdownLabels {\n return {\n code: { copyLabel: t('markdown.copy'), copiedLabel: t('markdown.copied') },\n footnotes: t('markdown.footnotes'),\n };\n}\n\nexport function NotifyCard({\n data, openFile, t, seat,\n config: { useCollapsible, useSummaryOnly, useSummaryRender, useBodyExpandedByDefault, useShowTime },\n}: NotifyCardProps): ReactElement {\n const collapsibleByConfig = useCollapsible(value => value ?? DEFAULT_CLIENT_CONFIG.collapsible);\n const summaryOnly = useSummaryOnly(value => value ?? DEFAULT_CLIENT_CONFIG.summaryOnly);\n const summaryRender = useSummaryRender(value => value ?? DEFAULT_CLIENT_CONFIG.summaryRender);\n const bodyExpandedByDefault = useBodyExpandedByDefault(value => value ?? DEFAULT_CLIENT_CONFIG.bodyExpandedByDefault);\n const showTime = useShowTime(value => value ?? DEFAULT_CLIENT_CONFIG.showTime);\n const [open, setOpen] = useState<boolean | null>(null);\n\n if (data.failure !== undefined) {\n return (\n <div className=\"dsh-notify-failure\" data-tool={NOTIFY_TOOL_NAME} data-state=\"error\">\n <strong>{t('row.failed')}</strong>\n {data.failure.detail.length === 0 ? null : <div>{data.failure.detail}</div>}\n </div>\n );\n }\n\n const title = titleOf({ title: data.title, message: data.message }, t('row.fallbackTitle'));\n\n if (summaryOnly && summaryRender === 'prose') {\n return (\n <div className=\"dsh-notify-prose\" data-tool={NOTIFY_TOOL_NAME} data-state={data.settled ? 'settled' : 'running'}>\n <MarkdownDelegateProvider openFile={openFile}>\n <MarkdownText text={title} labels={markdownLabels(t)} />\n </MarkdownDelegateProvider>\n </div>\n );\n }\n\n const hasBody = !summaryOnly && data.message.trim().length > 0;\n const collapsible = collapsibleByConfig && hasBody;\n const expanded = collapsible ? open ?? bodyExpandedByDefault : true;\n const time = showTime ? formatClock(data.time) : null;\n const titleNode = data.settled ? title : <TextShimmer active>{title}</TextShimmer>;\n\n return (\n <div\n className=\"dsh-notify-card\"\n data-seat={seat}\n data-tool={NOTIFY_TOOL_NAME}\n data-state={data.settled ? 'settled' : 'running'}\n data-collapsible={collapsible || undefined}\n >\n <div className=\"dsh-notify-head\">\n {collapsible ? (\n <button\n type=\"button\"\n className=\"dsh-notify-toggle\"\n aria-expanded={expanded}\n onClick={() => { setOpen(!expanded); }}\n >\n <span className=\"dsh-notify-dot\" data-open={expanded || undefined} aria-hidden=\"true\">\n <span className=\"dsh-notify-dot-idle\" />\n <IconChevronDownOutlineRegular className=\"dsh-notify-chevron\" size={14} />\n </span>\n <span className=\"dsh-notify-title\">{titleNode}</span>\n </button>\n ) : (\n <>\n <span className=\"dsh-notify-dot\" aria-hidden=\"true\">\n <span className=\"dsh-notify-dot-idle\" />\n </span>\n <span className=\"dsh-notify-title\">{titleNode}</span>\n </>\n )}\n {time === null ? null : <span className=\"dsh-notify-time\">{time}</span>}\n </div>\n {expanded && hasBody ? (\n <div className=\"dsh-notify-body\">\n <MarkdownDelegateProvider openFile={openFile}>\n <MarkdownText text={data.message} labels={markdownLabels(t)} variant=\"compact\" />\n </MarkdownDelegateProvider>\n </div>\n ) : null}\n </div>\n );\n}\n", "import type { ReactElement } from 'react';\nimport type { PropsLocale, PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots';\nimport type {} from '@deepseek-ai/dsh-client-ui-chat/client';\nimport { NS } from './locales.js';\nimport { NotifyCard, type CardConfigProps } from './NotifyCard.js';\n\n\ntype NotifyNodeViewProps = PropsRuntime<'conversation.chat.node', 'notify-user'>\n & PropsLocale<typeof NS>\n & CardConfigProps;\n\nexport function NotifyNodeView(props: NotifyNodeViewProps): ReactElement {\n const { node, openFile, t } = props;\n return <NotifyCard data={node.data} config={props} openFile={openFile} t={t} seat=\"node\" />;\n}\n", "import type { ReactElement } from 'react';\nimport type { ToolCallViewProps } from '@deepseek-ai/dsh-client-ui-tool/client';\nimport type { PropsLocale } from '@deepseek-ai/dsh-client-ui-slots';\nimport { NS } from './locales.js';\nimport { NotifyCard, type CardConfigProps } from './NotifyCard.js';\nimport { failureOf, readUpdate, type NotifyCardData } from './row-model.js';\n\n\ntype NotifyRowProps = ToolCallViewProps & PropsLocale<typeof NS> & CardConfigProps;\n\nexport function NotifyRow(props: NotifyRowProps): ReactElement {\n const { t } = props;\n const failure = props.phase === 'result' && props.block.isError\n ? failureOf(props.block.content, props.block.error)\n : undefined;\n const preparing = props.phase === 'preparing';\n const update = preparing || failure !== undefined ? { message: '' } : readUpdate(props.block);\n const data: NotifyCardData = {\n ...preparing ? { title: t('row.preparing') } : update.title === undefined ? {} : { title: update.title },\n message: update.message,\n time: props.block.time,\n settled: props.phase === 'result',\n ...failure === undefined ? {} : { failure },\n };\n return <NotifyCard data={data} config={props} openFile={props.openFile} t={t} seat=\"row\" />;\n}\n", "export default \"\\n.dsh-notify-config {\\n display: flex;\\n flex-direction: column;\\n gap: 10px;\\n}\\n\\n.dsh-notify-config-row {\\n display: flex;\\n align-items: flex-start;\\n justify-content: space-between;\\n gap: 16px;\\n}\\n\\n.dsh-notify-config-info {\\n display: flex;\\n flex-direction: column;\\n gap: 2px;\\n min-width: 0;\\n}\\n\\n.dsh-notify-config-label {\\n color: var(--dsw-alias-label-primary);\\n font-size: 13px;\\n line-height: 20px;\\n}\\n\\n.dsh-notify-config-hint {\\n color: var(--dsw-alias-label-secondary);\\n font-size: 12px;\\n line-height: 18px;\\n}\\n\\n.dsh-notify-config-field {\\n display: flex;\\n flex: none;\\n align-items: center;\\n gap: 6px;\\n}\\n\\n.dsh-notify-config-input {\\n width: 88px;\\n}\\n\\n.dsh-notify-config-unit {\\n color: var(--dsw-alias-label-secondary);\\n font-size: 12px;\\n}\\n\\n.dsh-notify-config-error {\\n color: var(--dsw-alias-state-error-primary);\\n font-size: 12px;\\n line-height: 18px;\\n}\\n\\n.dsh-notify-config-note {\\n color: var(--dsw-alias-label-secondary);\\n font-size: 12px;\\n line-height: 18px;\\n}\\n\";", "export default \"\\n.dsh-notify-card {\\n padding: 2px 0 8px;\\n}\\n\\n.dsh-notify-card[data-seat=\\\"node\\\"] {\\n padding: 0;\\n}\\n\\n.dsh-notify-head {\\n display: flex;\\n align-items: center;\\n gap: 6px;\\n min-height: 24px;\\n}\\n\\n.dsh-notify-dot {\\n position: relative;\\n display: inline-flex;\\n align-items: center;\\n justify-content: center;\\n flex: none;\\n width: calc(16px + var(--dsh-content-font-delta, 0px));\\n height: calc(16px + var(--dsh-content-font-delta, 0px));\\n}\\n\\n.dsh-notify-dot-idle {\\n display: inline-flex;\\n align-items: center;\\n justify-content: center;\\n opacity: 1;\\n transition: opacity 100ms ease;\\n}\\n\\n.dsh-notify-dot-idle::before {\\n content: '';\\n width: 7px;\\n height: 7px;\\n border-radius: 50%;\\n corner-shape: round;\\n background: var(--dsw-alias-state-business-primary);\\n}\\n\\n.dsh-notify-toggle {\\n display: inline-flex;\\n align-items: center;\\n gap: 6px;\\n min-width: 0;\\n padding: 0;\\n border: 0;\\n background: none;\\n color: inherit;\\n font: inherit;\\n text-align: left;\\n cursor: pointer;\\n}\\n\\n.dsh-notify-title {\\n color: var(--dsw-alias-state-business-primary);\\n font-size: 14px;\\n font-weight: 600;\\n line-height: 22px;\\n}\\n\\n.dsh-notify-chevron {\\n position: absolute;\\n inset: 0;\\n margin: auto;\\n color: var(--dsw-alias-state-business-primary);\\n opacity: 0;\\n transition: transform 0.15s ease, opacity 100ms ease;\\n}\\n\\n.dsh-notify-dot[data-open] .dsh-notify-chevron {\\n transform: rotate(180deg);\\n}\\n\\n@media (hover: hover) {\\n .dsh-notify-card[data-collapsible] .dsh-notify-head:hover .dsh-notify-dot-idle {\\n opacity: 0;\\n }\\n\\n .dsh-notify-card[data-collapsible] .dsh-notify-head:hover .dsh-notify-chevron {\\n opacity: 1;\\n }\\n}\\n\\n@media (prefers-reduced-motion: reduce) {\\n .dsh-notify-dot-idle,\\n .dsh-notify-chevron {\\n transition: none;\\n }\\n}\\n\\n.dsh-notify-time {\\n flex: none;\\n margin-left: auto;\\n color: var(--dsw-alias-label-tertiary);\\n font-size: 12px;\\n line-height: 18px;\\n}\\n\\n.dsh-notify-prose {\\n padding: 0;\\n}\\n\\n.dsh-notify-body {\\n margin: 2px 0 0 calc(8px + var(--dsh-content-font-delta, 0px) * 0.5);\\n padding-left: calc(13px + var(--dsh-content-font-delta, 0px) * 0.5);\\n border-left: 1px solid var(--dsw-alias-border-l1);\\n color: var(--dsw-alias-label-primary);\\n}\\n\\n.dsh-notify-body > div {\\n color: var(--dsw-alias-label-primary);\\n}\\n\\n[data-chat-flow-kind=\\\"notify-user\\\"] {\\n --dsh-chat-flow-gap: 12px;\\n}\\n\\n[data-chat-flow-kind=\\\"notify-user\\\"] + * {\\n --dsh-chat-flow-gap: 12px;\\n}\\n\\n.dsh-notify-failure {\\n color: var(--dsw-alias-state-error-primary);\\n overflow-wrap: anywhere;\\n white-space: pre-wrap;\\n}\\n\";", "export default \"\\n.dsh-notify-toggle-row {\\n position: relative;\\n display: flex;\\n align-items: center;\\n justify-content: space-between;\\n gap: 16px;\\n min-height: 34px;\\n padding: 0 8px;\\n border-radius: var(--dsw-radius-md);\\n color: var(--dsw-alias-label-primary);\\n font-size: 13px;\\n line-height: 20px;\\n}\\n\\n.dsh-notify-toggle-label {\\n display: inline-flex;\\n align-items: center;\\n gap: 4px;\\n min-width: 0;\\n}\\n\\n.dsh-notify-toggle-info {\\n position: relative;\\n z-index: 1;\\n flex: none;\\n width: 20px;\\n height: 20px;\\n padding: 0;\\n color: var(--dsw-alias-label-caption);\\n}\\n\\n.dsh-notify-toggle-row .dsh-notify-toggle-switch {\\n position: static;\\n}\\n\\n.dsh-notify-toggle-switch::after {\\n content: '';\\n position: absolute;\\n inset: 0;\\n border-radius: var(--dsw-radius-md);\\n}\\n\\n.dsh-notify-toggle-row:has(.dsh-notify-toggle-switch:focus-visible) {\\n background: var(--dsw-alias-interactive-bg-hover);\\n}\\n\\n@media (hover: hover) {\\n .dsh-notify-toggle-row:has(.dsh-notify-toggle-switch:not(:disabled)):hover {\\n background: var(--dsw-alias-interactive-bg-hover);\\n }\\n}\\n\";"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACCO,IAAM,qBAAqB;AAE3B,IAAM,mBAAmB;AAEzB,IAAM,sBAAsB;AAE5B,IAAM,kBAAkB;AAExB,IAAM,yBAAyB;AAE/B,IAAM,sBAAsB;AAE5B,IAAM,uBAAuB;AAE7B,IAAM,mCAAmC;AAEzC,IAAM,oBAAoB;AAI1B,IAAM,kBAAkB,CAAC,QAAQ,OAAO;AAExC,IAA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AAI,YAAY,IAAI,kBAAkB,EAAE;AAAA,IACjE,GAAG,UAAU;AAAA,EACf,CAAC,GAAG,sCAAsC;AAC5C;",
|
|
6
|
+
"names": ["draft", "import_react", "import_dsh_client_ui_primitives", "import_jsx_runtime", "import_react", "import_dsh_client_ui_primitives", "import_jsx_runtime", "import_jsx_runtime", "import_jsx_runtime"]
|
|
7
7
|
}
|
package/lib/index.js
CHANGED
|
@@ -21,7 +21,7 @@ var CARD_PLACEMENTS = ["boundary", "inline"];
|
|
|
21
21
|
var DEFAULT_CARD_PLACEMENT = "boundary";
|
|
22
22
|
var DEFAULT_ENABLED = true;
|
|
23
23
|
function enabledFor(overrides, fallback, sessionId) {
|
|
24
|
-
const explicit = overrides
|
|
24
|
+
const explicit = overrides !== void 0 && Object.hasOwn(overrides, sessionId) ? overrides[sessionId] : void 0;
|
|
25
25
|
return typeof explicit === "boolean" ? explicit : fallback;
|
|
26
26
|
}
|
|
27
27
|
|
package/lib/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/index.ts", "../src/config.ts", "../src/shared/config.ts", "../src/nudge.ts", "../src/client/row-model.ts"],
|
|
4
|
-
"sourcesContent": ["import { defineTool } from '@deepseek-ai/dsh-tools';\nimport { AgentToolRegistry } from '@deepseek-ai/dsh-tools/pipeline';\nimport type { ToolDefinition } from '@deepseek-ai/dsh-tools';\nimport type { Context } from '@deepseek-ai/cordis';\nimport type { Agent } from '@deepseek-ai/dsh-agent';\nimport type { Session } from '@deepseek-ai/dsh-session';\nimport type {} from '@deepseek-ai/dsh-settings';\nimport { isEnabledFor, nudgeAfterOf, type PluginConfig } from './config.js';\nimport { createNudgeController, installNudge, isSubagentSession } from './nudge.js';\nimport { NOTIFY_TOOL_NAME, SUMMARY_ONLY_FIELD } from './shared/config.js';\nimport { parseUpdate } from './client/row-model.js';\n\n\nexport const name = 'dsh-notify-user';\n\nexport const inject = ['tools', 'agents'];\n\nexport { Config } from './config.js';\n\ndeclare module '@deepseek-ai/cordis' {\n interface Events {\n 'loader/volatile-update'(paths: readonly (readonly string[])[]): void;\n }\n}\n\nconst TITLE_PARAMETER = {\n type: 'string',\n description: \"One line the user can take in at a glance: the conclusion or current phase, in the user's language, under 60 characters, plain text.\",\n} as const;\n\nconst MESSAGE_PARAMETER = {\n type: 'string',\n required: true,\n description: \"The details behind the title, without repeating it: a short paragraph plus a few bullet points of light Markdown, in the user's language, under 1000 characters.\",\n} as const;\n\nconst OUTPUT = {\n schema: {\n type: 'object' as const,\n additionalProperties: false,\n properties: {\n ok: {\n type: 'boolean' as const,\n description: 'Whether the update was recorded.',\n },\n },\n },\n render: () => [{ type: 'text' as const, text: 'Update shown in the conversation.' }],\n presentationMeta: (args: unknown) => {\n const update = parseUpdate(args);\n const meta: Record<string, string> = { message: update?.message ?? '' };\n if (update?.title !== undefined) meta['title'] = update.title;\n return meta;\n },\n};\n\nconst DETAILED_DESCRIPTION = 'Send the user a short progress update without ending your turn. Use it when you have been working through several tool calls, when you finish a stage or change direction, or when you find something the user should know before you finish. Do not use it for the final answer: findings that belong in the reply still go in the reply.';\n\nconst SUMMARY_ONLY_DESCRIPTION = 'Send the user a one-line progress update without ending your turn. Use it when you have been working through several tool calls, when you finish a stage or change direction, or when you find something the user should know before you finish. Write only the title: one line the user can take in at a glance. Do not use it for the final answer: findings that belong in the reply still go in the reply.';\n\nfunction notifyTool(summaryOnly: boolean): ToolDefinition {\n return defineTool({\n name: NOTIFY_TOOL_NAME,\n description: summaryOnly ? SUMMARY_ONLY_DESCRIPTION : DETAILED_DESCRIPTION,\n parameters: summaryOnly\n ? { title: { ...TITLE_PARAMETER, required: true } }\n : { title: TITLE_PARAMETER, message: MESSAGE_PARAMETER },\n output: OUTPUT,\n isConcurrencySafe: () => true,\n async execute() {\n return { ok: true };\n },\n });\n}\n\nexport function apply(ctx: Context, config: PluginConfig): void {\n const enabledIn = (session: Session): boolean => !isSubagentSession(session) && isEnabledFor(config, session.header.id);\n\n const controller = createNudgeController({\n readThreshold: () => nudgeAfterOf(config),\n readProseResets: () => config.resetOnProse.get(),\n readSummaryOnly: () => config.summaryOnly.get(),\n readEnabled: enabledIn,\n });\n installNudge(ctx, controller, NOTIFY_TOOL_NAME);\n\n const registry = new AgentToolRegistry();\n let disposeTool = registry.register(notifyTool(config.summaryOnly.get()));\n ctx.effect(() => () => disposeTool());\n ctx.tools.include(registry);\n const sync = (agent: Agent): void => registry.set(agent, enabledIn(agent.session) ? [NOTIFY_TOOL_NAME] : []);\n const syncAll = (): void => { for (const agent of ctx.agents.list()) sync(agent); };\n ctx.on('agent/created', ({ agent }) => { sync(agent); });\n syncAll();\n\n ctx.on('loader/volatile-update', (paths) => {\n if (paths.some(path => path[0] === SUMMARY_ONLY_FIELD)) {\n disposeTool();\n disposeTool = registry.register(notifyTool(config.summaryOnly.get()));\n }\n if (paths.some(path => path[0] === 'defaultEnabled' || path[0] === 'sessionOverrides')) syncAll();\n });\n\n ctx.inject(['settings'], (scoped) => {\n scoped.effect(() => scoped.settings.configure({ auto: false }, ctx.fiber));\n });\n}\n", "import z from '@deepseek-ai/schemastery';\nimport type { Volatile } from '@deepseek-ai/cordis';\nimport {\n CARD_PLACEMENTS,\n DEFAULT_BODY_EXPANDED_BY_DEFAULT,\n DEFAULT_CARD_PLACEMENT,\n DEFAULT_COLLAPSIBLE,\n DEFAULT_ENABLED,\n DEFAULT_NUDGE_AFTER,\n DEFAULT_RESET_ON_PROSE,\n DEFAULT_SHOW_TIME,\n DEFAULT_SUMMARY_ONLY,\n DEFAULT_SUMMARY_RENDER,\n MAX_NUDGE_AFTER,\n SUMMARY_RENDERS,\n enabledFor,\n type SessionOverrides,\n} from './shared/config.js';\n\nexport interface PluginConfig {\n nudgeAfter: Volatile<number>;\n resetOnProse: Volatile<boolean>;\n collapsible: Volatile<boolean>;\n summaryOnly: Volatile<boolean>;\n summaryRender: Volatile<string>;\n bodyExpandedByDefault: Volatile<boolean>;\n showTime: Volatile<boolean>;\n cardPlacement: Volatile<string>;\n defaultEnabled: Volatile<boolean>;\n sessionOverrides: Volatile<SessionOverrides>;\n}\n\nexport const Config = z.object({\n nudgeAfter: z.number().min(0).max(MAX_NUDGE_AFTER).default(DEFAULT_NUDGE_AFTER).volatile(),\n resetOnProse: z.boolean().default(DEFAULT_RESET_ON_PROSE).volatile(),\n collapsible: z.boolean().default(DEFAULT_COLLAPSIBLE).volatile(),\n summaryOnly: z.boolean().default(DEFAULT_SUMMARY_ONLY).volatile(),\n summaryRender: z.union(SUMMARY_RENDERS.map(value => z.const(value)))\n .default(DEFAULT_SUMMARY_RENDER)\n .volatile(),\n bodyExpandedByDefault: z.boolean().default(DEFAULT_BODY_EXPANDED_BY_DEFAULT).volatile(),\n showTime: z.boolean().default(DEFAULT_SHOW_TIME).volatile(),\n cardPlacement: z.union(CARD_PLACEMENTS.map(value => z.const(value)))\n .default(DEFAULT_CARD_PLACEMENT)\n .volatile(),\n defaultEnabled: z.boolean().default(DEFAULT_ENABLED).volatile(),\n sessionOverrides: z.dict(z.boolean()).default({}).volatile(),\n});\n\nexport function nudgeAfterOf(config: PluginConfig): number {\n const value = config.nudgeAfter.get();\n if (!Number.isFinite(value)) return DEFAULT_NUDGE_AFTER;\n return Math.min(MAX_NUDGE_AFTER, Math.max(0, Math.floor(value)));\n}\n\nexport function isEnabledFor(config: PluginConfig, sessionId: string): boolean {\n return enabledFor(config.sessionOverrides.get(), config.defaultEnabled.get(), sessionId);\n}\n", "\nexport const SETTINGS_NAMESPACE = 'dsh-notify-user';\n\nexport const NOTIFY_TOOL_NAME = 'notify_user';\n\nexport const DEFAULT_NUDGE_AFTER = 10;\n\nexport const MAX_NUDGE_AFTER = 100;\n\nexport const DEFAULT_RESET_ON_PROSE = true;\n\nexport const DEFAULT_COLLAPSIBLE = true;\n\nexport const DEFAULT_SUMMARY_ONLY = false;\n\nexport const DEFAULT_BODY_EXPANDED_BY_DEFAULT = false;\n\nexport const DEFAULT_SHOW_TIME = false;\n\nexport const SUMMARY_ONLY_FIELD = 'summaryOnly';\n\nexport const SUMMARY_RENDERS = ['card', 'prose'] as const;\n\nexport const DEFAULT_SUMMARY_RENDER = 'card';\n\nexport type SummaryRender = typeof SUMMARY_RENDERS[number];\n\nexport const CARD_PLACEMENTS = ['boundary', 'inline'] as const;\n\nexport type CardPlacement = typeof CARD_PLACEMENTS[number];\n\nexport const DEFAULT_CARD_PLACEMENT: CardPlacement = 'boundary';\n\nexport const DEFAULT_ENABLED = true;\n\nexport type SessionOverrides = Readonly<Record<string, boolean>>;\n\nexport function enabledFor(\n overrides: SessionOverrides | undefined,\n fallback: boolean,\n sessionId: string,\n): boolean {\n const explicit = overrides?.[sessionId];\n return typeof explicit === 'boolean' ? explicit : fallback;\n}\n\nexport function overridesAfterWrite(\n overrides: SessionOverrides | undefined,\n sessionId: string,\n enabled: boolean,\n fallback: boolean,\n): SessionOverrides {\n const current = overrides ?? {};\n const hasEntry = Object.hasOwn(current, sessionId);\n if (enabled === fallback) {\n if (!hasEntry) return current;\n const next = { ...current };\n delete next[sessionId];\n return next;\n }\n if (hasEntry && current[sessionId] === enabled) return current;\n return { ...current, [sessionId]: enabled };\n}\n", "import { createUserMessage } from '@deepseek-ai/dsh-llm';\nimport type { ContentBlock, ContextFormed } from '@deepseek-ai/dsh-llm';\nimport type { PreStepDecision } from '@deepseek-ai/dsh-agent';\nimport type { Session, UserMessage } from '@deepseek-ai/dsh-session';\nimport type { ToolExecution, ToolExecutionResult } from '@deepseek-ai/dsh-tools';\nimport type { Context } from '@deepseek-ai/cordis';\n\n\ndeclare module '@deepseek-ai/dsh-llm' {\n interface MessageSourceMap {\n 'notify-user-nudge': { kind: 'notify-user-nudge' } & ContextFormed;\n }\n}\n\nconst NUDGE_SOURCE = { kind: 'notify-user-nudge' } as const;\n\nexport function renderNudge(count: number, summaryOnly = false): string {\n const head = `You have gone ${String(count)} tool calls without a notify_user update \u2014 the user has seen no progress from you since. `;\n if (summaryOnly) {\n return head + 'Send one now: a one-line title with what you have concluded so far, batched with your next tool calls.';\n }\n return head\n + 'Send one now: a one-line title with what you have concluded so far, and a structured, chat-style message '\n + '(a well structured paragraph with a few bullet points, under ~1000 characters) with the details and what you will do next, '\n + 'batched with your next tool calls.';\n}\n\nexport function hasProse(content: readonly ContentBlock[]): boolean {\n return content.some(block => block.type === 'text' && block.text.trim() !== '');\n}\n\nexport function nudgeSummary(count: number): string {\n return `${String(count)} tool calls without a notify_user update`;\n}\n\nexport interface NudgeController {\n notify(session: Session): void;\n prose(session: Session): void;\n toolCall(session: Session): void;\n step(session: Session, freshInput: boolean): UserMessage | null;\n}\n\nexport interface NudgeOptions {\n readThreshold: () => number;\n readProseResets: () => boolean;\n readSummaryOnly: () => boolean;\n readEnabled: (session: Session) => boolean;\n}\n\nexport function createNudgeController(options: NudgeOptions): NudgeController {\n const counts = new WeakMap<Session, number>();\n\n return {\n notify(session) {\n counts.set(session, 0);\n },\n prose(session) {\n if (!options.readProseResets()) return;\n counts.set(session, 0);\n },\n toolCall(session) {\n if (!options.readEnabled(session) || options.readThreshold() <= 0) {\n counts.delete(session);\n return;\n }\n counts.set(session, (counts.get(session) ?? 0) + 1);\n },\n step(session, freshInput) {\n if (!options.readEnabled(session)) {\n counts.set(session, 0);\n return null;\n }\n const threshold = options.readThreshold();\n if (freshInput || threshold <= 0) {\n counts.set(session, 0);\n return null;\n }\n const count = counts.get(session) ?? 0;\n if (count < threshold) return null;\n counts.set(session, 0);\n return createUserMessage({\n content: [{ type: 'text', text: renderNudge(count, options.readSummaryOnly()) }],\n source: { ...NUDGE_SOURCE, form: 'notice', summary: nudgeSummary(count) },\n });\n },\n };\n}\n\nexport function isSubagentSession(session: Session): boolean {\n return session.header.origin === 'subagent';\n}\n\nexport function installNudge(ctx: Context, controller: NudgeController, toolName: string): void {\n ctx.on('tools/result', (exec: Readonly<ToolExecution>, result: Readonly<ToolExecutionResult>): undefined => {\n if (result.isError && result.error.info?.code === 'ABORTED_BEFORE_DISPATCH') return undefined;\n const session = exec.agent?.session;\n if (session !== undefined && !isSubagentSession(session)) {\n if (exec.name === toolName && !result.isError) controller.notify(session);\n else if (exec.parent === undefined) controller.toolCall(session);\n }\n return undefined;\n });\n\n ctx.on('session/event', (session, event): void => {\n if (isSubagentSession(session)) return;\n if (event.type !== 'assistant/message') return;\n if (!hasProse(event.data.message.content)) return;\n controller.prose(session);\n });\n\n ctx.on('agent/pre-step', async ({ agent, messages, step }, next): Promise<PreStepDecision> => {\n if (isSubagentSession(agent.session)) return next();\n const downstream = await next();\n if (downstream.kind !== 'enter') return downstream;\n const freshInput = step === 1 || messages.some((message) => message.source.kind === 'user');\n const notice = controller.step(agent.session, freshInput);\n if (notice === null) return downstream;\n return { ...downstream, messages: [...downstream.messages, notice] };\n });\n}\n", "\nexport interface Update {\n title?: string;\n message: string;\n}\n\nexport interface NotifyCardData {\n readonly title?: string;\n readonly message: string;\n readonly time: number;\n readonly settled: boolean;\n readonly failure?: { readonly detail: string };\n}\n\nexport function failureOf(\n content: readonly { readonly type: string; readonly text?: string }[],\n error?: { readonly name: string; readonly code: string; readonly reason?: string },\n): NonNullable<NotifyCardData['failure']> {\n const text = content.flatMap(block => block.type === 'text' && block.text?.trim() ? [block.text] : []).join('\\n');\n const detail = text || (error === undefined ? '' : error.reason || `${error.name}: ${error.code}`);\n return { detail };\n}\n\nexport function parseUpdate(value: unknown): Update | null {\n if (typeof value !== 'object' || value === null) return null;\n const record = value as Record<string, unknown>;\n const message = typeof record['message'] === 'string' ? record['message'] : '';\n const title = typeof record['title'] === 'string' && record['title'].length > 0 ? record['title'] : undefined;\n if (message.length === 0 && title === undefined) return null;\n return title === undefined ? { message } : { title, message };\n}\n\nexport function parseArgs(raw: string | undefined): Update | null {\n if (typeof raw !== 'string' || raw.length === 0) return null;\n try {\n return parseUpdate(JSON.parse(raw));\n } catch {\n return null;\n }\n}\n\nexport function readUpdate(block: unknown): Update {\n if (typeof block !== 'object' || block === null) return { message: '' };\n const record = block as Record<string, unknown>;\n const fromMeta = parseUpdate(record['meta']);\n if (fromMeta !== null) return fromMeta;\n const call = record['call'];\n if (typeof call === 'object' && call !== null) {\n const fromCall = parseArgs((call as Record<string, unknown>)['argsRaw'] as string | undefined);\n if (fromCall !== null) return fromCall;\n }\n return parseArgs(record['argsRaw'] as string | undefined) ?? { message: '' };\n}\n\nexport function titleOf(update: Update, fallback: string): string {\n if (update.title !== undefined) return update.title;\n const first = update.message\n .split('\\n')\n .map((line) => line.trim())\n .find((line) => line.length > 0);\n if (first === undefined) return fallback;\n return first.length > 60 ? `${first.slice(0, 59)}\u2026` : first;\n}\n\nexport function formatClock(ms: unknown): string | null {\n if (typeof ms !== 'number' || !Number.isFinite(ms)) return null;\n const date = new Date(ms);\n const pad = (value: number): string => String(value).padStart(2, '0');\n return `${pad(date.getMonth() + 1)}-${pad(date.getDate())} ${pad(date.getHours())}:${pad(date.getMinutes())}`;\n}\n"],
|
|
5
|
-
"mappings": ";AAAA,SAAS,kBAAkB;AAC3B,SAAS,yBAAyB;;;ACDlC,OAAO,OAAO;;;ACGP,IAAM,mBAAmB;AAEzB,IAAM,sBAAsB;AAE5B,IAAM,kBAAkB;AAExB,IAAM,yBAAyB;AAE/B,IAAM,sBAAsB;AAE5B,IAAM,uBAAuB;AAE7B,IAAM,mCAAmC;AAEzC,IAAM,oBAAoB;AAE1B,IAAM,qBAAqB;AAE3B,IAAM,kBAAkB,CAAC,QAAQ,OAAO;AAExC,IAAM,yBAAyB;AAI/B,IAAM,kBAAkB,CAAC,YAAY,QAAQ;AAI7C,IAAM,yBAAwC;AAE9C,IAAM,kBAAkB;AAIxB,SAAS,WACd,WACA,UACA,WACS;AACT,QAAM,WAAW,
|
|
4
|
+
"sourcesContent": ["import { defineTool } from '@deepseek-ai/dsh-tools';\nimport { AgentToolRegistry } from '@deepseek-ai/dsh-tools/pipeline';\nimport type { ToolDefinition } from '@deepseek-ai/dsh-tools';\nimport type { Context } from '@deepseek-ai/cordis';\nimport type { Agent } from '@deepseek-ai/dsh-agent';\nimport type { Session } from '@deepseek-ai/dsh-session';\nimport type {} from '@deepseek-ai/dsh-settings';\nimport { isEnabledFor, nudgeAfterOf, type PluginConfig } from './config.js';\nimport { createNudgeController, installNudge, isSubagentSession } from './nudge.js';\nimport { NOTIFY_TOOL_NAME, SUMMARY_ONLY_FIELD } from './shared/config.js';\nimport { parseUpdate } from './client/row-model.js';\n\n\nexport const name = 'dsh-notify-user';\n\nexport const inject = ['tools', 'agents'];\n\nexport { Config } from './config.js';\n\ndeclare module '@deepseek-ai/cordis' {\n interface Events {\n 'loader/volatile-update'(paths: readonly (readonly string[])[]): void;\n }\n}\n\nconst TITLE_PARAMETER = {\n type: 'string',\n description: \"One line the user can take in at a glance: the conclusion or current phase, in the user's language, under 60 characters, plain text.\",\n} as const;\n\nconst MESSAGE_PARAMETER = {\n type: 'string',\n required: true,\n description: \"The details behind the title, without repeating it: a short paragraph plus a few bullet points of light Markdown, in the user's language, under 1000 characters.\",\n} as const;\n\nconst OUTPUT = {\n schema: {\n type: 'object' as const,\n additionalProperties: false,\n properties: {\n ok: {\n type: 'boolean' as const,\n description: 'Whether the update was recorded.',\n },\n },\n },\n render: () => [{ type: 'text' as const, text: 'Update shown in the conversation.' }],\n presentationMeta: (args: unknown) => {\n const update = parseUpdate(args);\n const meta: Record<string, string> = { message: update?.message ?? '' };\n if (update?.title !== undefined) meta['title'] = update.title;\n return meta;\n },\n};\n\nconst DETAILED_DESCRIPTION = 'Send the user a short progress update without ending your turn. Use it when you have been working through several tool calls, when you finish a stage or change direction, or when you find something the user should know before you finish. Do not use it for the final answer: findings that belong in the reply still go in the reply.';\n\nconst SUMMARY_ONLY_DESCRIPTION = 'Send the user a one-line progress update without ending your turn. Use it when you have been working through several tool calls, when you finish a stage or change direction, or when you find something the user should know before you finish. Write only the title: one line the user can take in at a glance. Do not use it for the final answer: findings that belong in the reply still go in the reply.';\n\nfunction notifyTool(summaryOnly: boolean): ToolDefinition {\n return defineTool({\n name: NOTIFY_TOOL_NAME,\n description: summaryOnly ? SUMMARY_ONLY_DESCRIPTION : DETAILED_DESCRIPTION,\n parameters: summaryOnly\n ? { title: { ...TITLE_PARAMETER, required: true } }\n : { title: TITLE_PARAMETER, message: MESSAGE_PARAMETER },\n output: OUTPUT,\n isConcurrencySafe: () => true,\n async execute() {\n return { ok: true };\n },\n });\n}\n\nexport function apply(ctx: Context, config: PluginConfig): void {\n const enabledIn = (session: Session): boolean => !isSubagentSession(session) && isEnabledFor(config, session.header.id);\n\n const controller = createNudgeController({\n readThreshold: () => nudgeAfterOf(config),\n readProseResets: () => config.resetOnProse.get(),\n readSummaryOnly: () => config.summaryOnly.get(),\n readEnabled: enabledIn,\n });\n installNudge(ctx, controller, NOTIFY_TOOL_NAME);\n\n const registry = new AgentToolRegistry();\n let disposeTool = registry.register(notifyTool(config.summaryOnly.get()));\n ctx.effect(() => () => disposeTool());\n ctx.tools.include(registry);\n const sync = (agent: Agent): void => registry.set(agent, enabledIn(agent.session) ? [NOTIFY_TOOL_NAME] : []);\n const syncAll = (): void => { for (const agent of ctx.agents.list()) sync(agent); };\n ctx.on('agent/created', ({ agent }) => { sync(agent); });\n syncAll();\n\n ctx.on('loader/volatile-update', (paths) => {\n if (paths.some(path => path[0] === SUMMARY_ONLY_FIELD)) {\n disposeTool();\n disposeTool = registry.register(notifyTool(config.summaryOnly.get()));\n }\n if (paths.some(path => path[0] === 'defaultEnabled' || path[0] === 'sessionOverrides')) syncAll();\n });\n\n ctx.inject(['settings'], (scoped) => {\n scoped.effect(() => scoped.settings.configure({ auto: false }, ctx.fiber));\n });\n}\n", "import z from '@deepseek-ai/schemastery';\nimport type { Volatile } from '@deepseek-ai/cordis';\nimport {\n CARD_PLACEMENTS,\n DEFAULT_BODY_EXPANDED_BY_DEFAULT,\n DEFAULT_CARD_PLACEMENT,\n DEFAULT_COLLAPSIBLE,\n DEFAULT_ENABLED,\n DEFAULT_NUDGE_AFTER,\n DEFAULT_RESET_ON_PROSE,\n DEFAULT_SHOW_TIME,\n DEFAULT_SUMMARY_ONLY,\n DEFAULT_SUMMARY_RENDER,\n MAX_NUDGE_AFTER,\n SUMMARY_RENDERS,\n enabledFor,\n type SessionOverrides,\n} from './shared/config.js';\n\nexport interface PluginConfig {\n nudgeAfter: Volatile<number>;\n resetOnProse: Volatile<boolean>;\n collapsible: Volatile<boolean>;\n summaryOnly: Volatile<boolean>;\n summaryRender: Volatile<string>;\n bodyExpandedByDefault: Volatile<boolean>;\n showTime: Volatile<boolean>;\n cardPlacement: Volatile<string>;\n defaultEnabled: Volatile<boolean>;\n sessionOverrides: Volatile<SessionOverrides>;\n}\n\nexport const Config = z.object({\n nudgeAfter: z.number().min(0).max(MAX_NUDGE_AFTER).default(DEFAULT_NUDGE_AFTER).volatile(),\n resetOnProse: z.boolean().default(DEFAULT_RESET_ON_PROSE).volatile(),\n collapsible: z.boolean().default(DEFAULT_COLLAPSIBLE).volatile(),\n summaryOnly: z.boolean().default(DEFAULT_SUMMARY_ONLY).volatile(),\n summaryRender: z.union(SUMMARY_RENDERS.map(value => z.const(value)))\n .default(DEFAULT_SUMMARY_RENDER)\n .volatile(),\n bodyExpandedByDefault: z.boolean().default(DEFAULT_BODY_EXPANDED_BY_DEFAULT).volatile(),\n showTime: z.boolean().default(DEFAULT_SHOW_TIME).volatile(),\n cardPlacement: z.union(CARD_PLACEMENTS.map(value => z.const(value)))\n .default(DEFAULT_CARD_PLACEMENT)\n .volatile(),\n defaultEnabled: z.boolean().default(DEFAULT_ENABLED).volatile(),\n sessionOverrides: z.dict(z.boolean()).default({}).volatile(),\n});\n\nexport function nudgeAfterOf(config: PluginConfig): number {\n const value = config.nudgeAfter.get();\n if (!Number.isFinite(value)) return DEFAULT_NUDGE_AFTER;\n return Math.min(MAX_NUDGE_AFTER, Math.max(0, Math.floor(value)));\n}\n\nexport function isEnabledFor(config: PluginConfig, sessionId: string): boolean {\n return enabledFor(config.sessionOverrides.get(), config.defaultEnabled.get(), sessionId);\n}\n", "\nexport const SETTINGS_NAMESPACE = 'dsh-notify-user';\n\nexport const NOTIFY_TOOL_NAME = 'notify_user';\n\nexport const DEFAULT_NUDGE_AFTER = 10;\n\nexport const MAX_NUDGE_AFTER = 100;\n\nexport const DEFAULT_RESET_ON_PROSE = true;\n\nexport const DEFAULT_COLLAPSIBLE = true;\n\nexport const DEFAULT_SUMMARY_ONLY = false;\n\nexport const DEFAULT_BODY_EXPANDED_BY_DEFAULT = false;\n\nexport const DEFAULT_SHOW_TIME = false;\n\nexport const SUMMARY_ONLY_FIELD = 'summaryOnly';\n\nexport const SUMMARY_RENDERS = ['card', 'prose'] as const;\n\nexport const DEFAULT_SUMMARY_RENDER = 'card';\n\nexport type SummaryRender = typeof SUMMARY_RENDERS[number];\n\nexport const CARD_PLACEMENTS = ['boundary', 'inline'] as const;\n\nexport type CardPlacement = typeof CARD_PLACEMENTS[number];\n\nexport const DEFAULT_CARD_PLACEMENT: CardPlacement = 'boundary';\n\nexport const DEFAULT_ENABLED = true;\n\nexport type SessionOverrides = Readonly<Record<string, boolean>>;\n\nexport function enabledFor(\n overrides: SessionOverrides | undefined,\n fallback: boolean,\n sessionId: string,\n): boolean {\n const explicit = overrides !== undefined && Object.hasOwn(overrides, sessionId) ? overrides[sessionId] : undefined;\n return typeof explicit === 'boolean' ? explicit : fallback;\n}\n", "import { createUserMessage } from '@deepseek-ai/dsh-llm';\nimport type { ContentBlock, ContextFormed } from '@deepseek-ai/dsh-llm';\nimport type { PreStepDecision } from '@deepseek-ai/dsh-agent';\nimport type { Session, UserMessage } from '@deepseek-ai/dsh-session';\nimport type { ToolExecution, ToolExecutionResult } from '@deepseek-ai/dsh-tools';\nimport type { Context } from '@deepseek-ai/cordis';\n\n\ndeclare module '@deepseek-ai/dsh-llm' {\n interface MessageSourceMap {\n 'notify-user-nudge': { kind: 'notify-user-nudge' } & ContextFormed;\n }\n}\n\nconst NUDGE_SOURCE = { kind: 'notify-user-nudge' } as const;\n\nexport function renderNudge(count: number, summaryOnly = false): string {\n const head = `You have gone ${String(count)} tool calls without a notify_user update \u2014 the user has seen no progress from you since. `;\n if (summaryOnly) {\n return head + 'Send one now: a one-line title with what you have concluded so far, batched with your next tool calls.';\n }\n return head\n + 'Send one now: a one-line title with what you have concluded so far, and a structured, chat-style message '\n + '(a well structured paragraph with a few bullet points, under ~1000 characters) with the details and what you will do next, '\n + 'batched with your next tool calls.';\n}\n\nexport function hasProse(content: readonly ContentBlock[]): boolean {\n return content.some(block => block.type === 'text' && block.text.trim() !== '');\n}\n\nexport function nudgeSummary(count: number): string {\n return `${String(count)} tool calls without a notify_user update`;\n}\n\nexport interface NudgeController {\n notify(session: Session): void;\n prose(session: Session): void;\n toolCall(session: Session): void;\n step(session: Session, freshInput: boolean): UserMessage | null;\n}\n\nexport interface NudgeOptions {\n readThreshold: () => number;\n readProseResets: () => boolean;\n readSummaryOnly: () => boolean;\n readEnabled: (session: Session) => boolean;\n}\n\nexport function createNudgeController(options: NudgeOptions): NudgeController {\n const counts = new WeakMap<Session, number>();\n\n return {\n notify(session) {\n counts.set(session, 0);\n },\n prose(session) {\n if (!options.readProseResets()) return;\n counts.set(session, 0);\n },\n toolCall(session) {\n if (!options.readEnabled(session) || options.readThreshold() <= 0) {\n counts.delete(session);\n return;\n }\n counts.set(session, (counts.get(session) ?? 0) + 1);\n },\n step(session, freshInput) {\n if (!options.readEnabled(session)) {\n counts.set(session, 0);\n return null;\n }\n const threshold = options.readThreshold();\n if (freshInput || threshold <= 0) {\n counts.set(session, 0);\n return null;\n }\n const count = counts.get(session) ?? 0;\n if (count < threshold) return null;\n counts.set(session, 0);\n return createUserMessage({\n content: [{ type: 'text', text: renderNudge(count, options.readSummaryOnly()) }],\n source: { ...NUDGE_SOURCE, form: 'notice', summary: nudgeSummary(count) },\n });\n },\n };\n}\n\nexport function isSubagentSession(session: Session): boolean {\n return session.header.origin === 'subagent';\n}\n\nexport function installNudge(ctx: Context, controller: NudgeController, toolName: string): void {\n ctx.on('tools/result', (exec: Readonly<ToolExecution>, result: Readonly<ToolExecutionResult>): undefined => {\n if (result.isError && result.error.info?.code === 'ABORTED_BEFORE_DISPATCH') return undefined;\n const session = exec.agent?.session;\n if (session !== undefined && !isSubagentSession(session)) {\n if (exec.name === toolName && !result.isError) controller.notify(session);\n else if (exec.parent === undefined) controller.toolCall(session);\n }\n return undefined;\n });\n\n ctx.on('session/event', (session, event): void => {\n if (isSubagentSession(session)) return;\n if (event.type !== 'assistant/message') return;\n if (!hasProse(event.data.message.content)) return;\n controller.prose(session);\n });\n\n ctx.on('agent/pre-step', async ({ agent, messages, step }, next): Promise<PreStepDecision> => {\n if (isSubagentSession(agent.session)) return next();\n const downstream = await next();\n if (downstream.kind !== 'enter') return downstream;\n const freshInput = step === 1 || messages.some((message) => message.source.kind === 'user');\n const notice = controller.step(agent.session, freshInput);\n if (notice === null) return downstream;\n return { ...downstream, messages: [...downstream.messages, notice] };\n });\n}\n", "\nexport interface Update {\n title?: string;\n message: string;\n}\n\nexport interface NotifyCardData {\n readonly title?: string;\n readonly message: string;\n readonly time: number;\n readonly settled: boolean;\n readonly failure?: { readonly detail: string };\n}\n\nexport function failureOf(\n content: readonly { readonly type: string; readonly text?: string }[],\n error?: { readonly name: string; readonly code: string; readonly reason?: string },\n): NonNullable<NotifyCardData['failure']> {\n const text = content.flatMap(block => block.type === 'text' && block.text?.trim() ? [block.text] : []).join('\\n');\n const detail = text || (error === undefined ? '' : error.reason || `${error.name}: ${error.code}`);\n return { detail };\n}\n\nexport function parseUpdate(value: unknown): Update | null {\n if (typeof value !== 'object' || value === null) return null;\n const record = value as Record<string, unknown>;\n const message = typeof record['message'] === 'string' ? record['message'] : '';\n const title = typeof record['title'] === 'string' && record['title'].length > 0 ? record['title'] : undefined;\n if (message.length === 0 && title === undefined) return null;\n return title === undefined ? { message } : { title, message };\n}\n\nexport function parseArgs(raw: string | undefined): Update | null {\n if (typeof raw !== 'string' || raw.length === 0) return null;\n try {\n return parseUpdate(JSON.parse(raw));\n } catch {\n return null;\n }\n}\n\nexport function readUpdate(block: unknown): Update {\n if (typeof block !== 'object' || block === null) return { message: '' };\n const record = block as Record<string, unknown>;\n const fromMeta = parseUpdate(record['meta']);\n if (fromMeta !== null) return fromMeta;\n const call = record['call'];\n if (typeof call === 'object' && call !== null) {\n const fromCall = parseArgs((call as Record<string, unknown>)['argsRaw'] as string | undefined);\n if (fromCall !== null) return fromCall;\n }\n return parseArgs(record['argsRaw'] as string | undefined) ?? { message: '' };\n}\n\nexport function titleOf(update: Update, fallback: string): string {\n if (update.title !== undefined) return update.title;\n const first = update.message\n .split('\\n')\n .map((line) => line.trim())\n .find((line) => line.length > 0);\n if (first === undefined) return fallback;\n return first.length > 60 ? `${first.slice(0, 59)}\u2026` : first;\n}\n\nexport function formatClock(ms: unknown): string | null {\n if (typeof ms !== 'number' || !Number.isFinite(ms)) return null;\n const date = new Date(ms);\n const pad = (value: number): string => String(value).padStart(2, '0');\n return `${pad(date.getMonth() + 1)}-${pad(date.getDate())} ${pad(date.getHours())}:${pad(date.getMinutes())}`;\n}\n"],
|
|
5
|
+
"mappings": ";AAAA,SAAS,kBAAkB;AAC3B,SAAS,yBAAyB;;;ACDlC,OAAO,OAAO;;;ACGP,IAAM,mBAAmB;AAEzB,IAAM,sBAAsB;AAE5B,IAAM,kBAAkB;AAExB,IAAM,yBAAyB;AAE/B,IAAM,sBAAsB;AAE5B,IAAM,uBAAuB;AAE7B,IAAM,mCAAmC;AAEzC,IAAM,oBAAoB;AAE1B,IAAM,qBAAqB;AAE3B,IAAM,kBAAkB,CAAC,QAAQ,OAAO;AAExC,IAAM,yBAAyB;AAI/B,IAAM,kBAAkB,CAAC,YAAY,QAAQ;AAI7C,IAAM,yBAAwC;AAE9C,IAAM,kBAAkB;AAIxB,SAAS,WACd,WACA,UACA,WACS;AACT,QAAM,WAAW,cAAc,UAAa,OAAO,OAAO,WAAW,SAAS,IAAI,UAAU,SAAS,IAAI;AACzG,SAAO,OAAO,aAAa,YAAY,WAAW;AACpD;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K,CAAC,MAAM,kBAAkB,EAAG,SAAQ;AAAA,EAClG,CAAC;AAED,MAAI,OAAO,CAAC,UAAU,GAAG,CAAC,WAAW;AACnC,WAAO,OAAO,MAAM,OAAO,SAAS,UAAU,EAAE,MAAM,MAAM,GAAG,IAAI,KAAK,CAAC;AAAA,EAC3E,CAAC;AACH;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lynn123411/dsh-notify-user",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.8",
|
|
4
4
|
"description": "给模型一条不结束本轮就能向用户汇报进度的通道;连续多次工具调用没汇报时,插件会催它发一条。",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -56,37 +56,37 @@
|
|
|
56
56
|
}
|
|
57
57
|
},
|
|
58
58
|
"peerDependencies": {
|
|
59
|
-
"@deepseek-ai/cordis": "^4.2.0-alpha.
|
|
60
|
-
"@deepseek-ai/dsh-client-ui-primitives": ">=0.2.3-alpha.
|
|
61
|
-
"@deepseek-ai/dsh-llm": ">=0.2.3-alpha.
|
|
62
|
-
"@deepseek-ai/dsh-tools": ">=0.2.3-alpha.
|
|
63
|
-
"@deepseek-ai/schemastery": "^3.20.0-alpha.
|
|
59
|
+
"@deepseek-ai/cordis": "^4.2.0-alpha.3",
|
|
60
|
+
"@deepseek-ai/dsh-client-ui-primitives": ">=0.2.3-alpha.4",
|
|
61
|
+
"@deepseek-ai/dsh-llm": ">=0.2.3-alpha.4",
|
|
62
|
+
"@deepseek-ai/dsh-tools": ">=0.2.3-alpha.4",
|
|
63
|
+
"@deepseek-ai/schemastery": "^3.20.0-alpha.3",
|
|
64
64
|
"react": "^19.3.1"
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|
|
67
|
-
"@deepseek-ai/cordis": "^4.2.0-alpha.
|
|
67
|
+
"@deepseek-ai/cordis": "^4.2.0-alpha.3",
|
|
68
68
|
"@deepseek-ai/cordis-plugin-group": "1.2.0-alpha.2",
|
|
69
69
|
"@deepseek-ai/cordis-plugin-include": "1.2.0-alpha.2",
|
|
70
|
-
"@deepseek-ai/dsh-agent": ">=0.2.3-alpha.
|
|
71
|
-
"@deepseek-ai/dsh-client-config": ">=0.2.3-alpha.
|
|
72
|
-
"@deepseek-ai/dsh-client-locale": ">=0.2.3-alpha.
|
|
73
|
-
"@deepseek-ai/dsh-client-store": ">=0.2.3-alpha.
|
|
74
|
-
"@deepseek-ai/dsh-client-ui-chat": ">=0.2.3-alpha.
|
|
75
|
-
"@deepseek-ai/dsh-client-ui-conversation": ">=0.2.3-alpha.
|
|
76
|
-
"@deepseek-ai/dsh-client-ui-model-selection": ">=0.2.3-alpha.
|
|
77
|
-
"@deepseek-ai/dsh-client-ui-plugin-manager": ">=0.2.3-alpha.
|
|
78
|
-
"@deepseek-ai/dsh-client-ui-primitives": ">=0.2.3-alpha.
|
|
79
|
-
"@deepseek-ai/dsh-client-ui-renderer": ">=0.2.3-alpha.
|
|
80
|
-
"@deepseek-ai/dsh-client-ui-session": ">=0.2.3-alpha.
|
|
81
|
-
"@deepseek-ai/dsh-client-ui-settings": ">=0.2.3-alpha.
|
|
82
|
-
"@deepseek-ai/dsh-client-ui-slots": ">=0.2.3-alpha.
|
|
83
|
-
"@deepseek-ai/dsh-client-ui-tool": ">=0.2.3-alpha.
|
|
84
|
-
"@deepseek-ai/dsh-llm": ">=0.2.3-alpha.
|
|
85
|
-
"@deepseek-ai/dsh-session": ">=0.2.3-alpha.
|
|
86
|
-
"@deepseek-ai/dsh-settings": ">=0.2.3-alpha.
|
|
87
|
-
"@deepseek-ai/dsh-system-prompt": ">=0.2.3-alpha.
|
|
88
|
-
"@deepseek-ai/dsh-tools": ">=0.2.3-alpha.
|
|
89
|
-
"@deepseek-ai/schemastery": "^3.20.0-alpha.
|
|
70
|
+
"@deepseek-ai/dsh-agent": ">=0.2.3-alpha.4",
|
|
71
|
+
"@deepseek-ai/dsh-client-config": ">=0.2.3-alpha.4",
|
|
72
|
+
"@deepseek-ai/dsh-client-locale": ">=0.2.3-alpha.4",
|
|
73
|
+
"@deepseek-ai/dsh-client-store": ">=0.2.3-alpha.4",
|
|
74
|
+
"@deepseek-ai/dsh-client-ui-chat": ">=0.2.3-alpha.4",
|
|
75
|
+
"@deepseek-ai/dsh-client-ui-conversation": ">=0.2.3-alpha.4",
|
|
76
|
+
"@deepseek-ai/dsh-client-ui-model-selection": ">=0.2.3-alpha.4",
|
|
77
|
+
"@deepseek-ai/dsh-client-ui-plugin-manager": ">=0.2.3-alpha.4",
|
|
78
|
+
"@deepseek-ai/dsh-client-ui-primitives": ">=0.2.3-alpha.4",
|
|
79
|
+
"@deepseek-ai/dsh-client-ui-renderer": ">=0.2.3-alpha.4",
|
|
80
|
+
"@deepseek-ai/dsh-client-ui-session": ">=0.2.3-alpha.4",
|
|
81
|
+
"@deepseek-ai/dsh-client-ui-settings": ">=0.2.3-alpha.4",
|
|
82
|
+
"@deepseek-ai/dsh-client-ui-slots": ">=0.2.3-alpha.4",
|
|
83
|
+
"@deepseek-ai/dsh-client-ui-tool": ">=0.2.3-alpha.4",
|
|
84
|
+
"@deepseek-ai/dsh-llm": ">=0.2.3-alpha.4",
|
|
85
|
+
"@deepseek-ai/dsh-session": ">=0.2.3-alpha.4",
|
|
86
|
+
"@deepseek-ai/dsh-settings": ">=0.2.3-alpha.4",
|
|
87
|
+
"@deepseek-ai/dsh-system-prompt": ">=0.2.3-alpha.4",
|
|
88
|
+
"@deepseek-ai/dsh-tools": ">=0.2.3-alpha.4",
|
|
89
|
+
"@deepseek-ai/schemastery": "^3.20.0-alpha.3",
|
|
90
90
|
"@types/node": "^22.20.0",
|
|
91
91
|
"@types/react": "~19.3.0",
|
|
92
92
|
"esbuild": "^0.25.0",
|
|
@@ -96,7 +96,7 @@
|
|
|
96
96
|
"typescript": "^6.0.0"
|
|
97
97
|
},
|
|
98
98
|
"engines": {
|
|
99
|
-
"dsh": ">=0.2.3-alpha.
|
|
99
|
+
"dsh": ">=0.2.3-alpha.4",
|
|
100
100
|
"node": "^22.19 || >=24"
|
|
101
101
|
},
|
|
102
102
|
"packageManager": "pnpm@11.7.0",
|