@lynn123411/dsh-notify-user 0.4.2 → 0.5.1

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/DETAILS.md CHANGED
@@ -19,6 +19,8 @@ dsh plugin --profile web add @lynn123411/dsh-notify-user
19
19
 
20
20
  `notify_user` 的每次调用在对话流里是一个 `notify-user` 节点,位置是 `process`:它站在步骤组外,客户端的分组逻辑遇到它就结束当前组,于是两次汇报之间的工具调用各自折成一个原生子折叠。
21
21
 
22
+ 节点座位不自带上下内边距:上下留白由宿主的 `--dsh-chat-flow-gap` 给,本插件把它提到 12px,与助手散文块同距;工具行座位保留卡片自己的内边距。
23
+
22
24
  通用工具定义也会匹配同一次调用的全部事件,所以定义用 `exclusive` 认领它们,通用定义不再为这次调用建节点:
23
25
 
24
26
  | 事件 | 认领条件 |
@@ -42,10 +44,23 @@ dsh plugin --profile web add @lynn123411/dsh-notify-user
42
44
  | `sessionOverrides` | `{}` | 会话 id → 布尔 | 按会话的选择;只留与默认值不同的会话,切回默认值就删掉那条。 |
43
45
  | `nudgeAfter` | 10 | 0–100 | 连续多少次根工具调用没有汇报时催一次;0 关闭催办。 |
44
46
  | `resetOnProse` | true | 布尔 | 助手消息里写了正文(非空白 `text` 块)就清零计数;关掉后只在 `notify_user`、新回合或用户插话时清零。 |
45
- | `collapsible` | true | 布尔 | 进度卡标题旁带不带折叠键;带折叠键时正文仍默认展开,关掉后正文始终展开、不显示折叠键。 |
47
+ | `collapsible` | true | 布尔 | 卡片带不带折叠键;关掉后正文始终展开、不显示折叠键。 |
48
+ | `summaryOnly` | false | 布尔 | 模型只写一行标题,卡片只显示标题行;工具描述、参数与催办文案同步改。 |
49
+ | `summaryRender` | `card` | `card` / `prose` | 只报摘要时的呈现:进度卡,或按普通段落渲染(看起来像助手写的正文)。 |
50
+ | `bodyExpandedByDefault` | false | 布尔 | 结构化正文模式下卡片是否默认展开;`collapsible` 关掉时不起作用。 |
46
51
  | `cardPlacement` | `boundary` | `boundary` / `inline` | 进度卡位置:`boundary` 站在步骤组边界,`inline` 跟随工具行、随组折叠。 |
47
52
 
48
- 字段都标了 `.volatile()`:改它们不重挂这条 loader entry。催办状态机每次 `pre-step` 现读 `nudgeAfter` 与 `defaultEnabled`/`sessionOverrides`;进度卡与菜单开关通过注册项的 `inject` 拿到同一张配置表单并订阅,所以改完当前页面的卡片与开关立刻跟着变。配置界面在宿主「插件」页本插件的详情页上;宿主没服务这份配置时卡片整块不出现。插件同时用 `ctx.settings.configure({ auto: false })` 关掉内核按 schema 自动生成的那份设置页。
53
+ 配置卡把 `summaryOnly` 画成「结构化正文 / 只报摘要」两选一,把 `collapsible` 与 `bodyExpandedByDefault` 合成「始终展开 / 默认收起 / 默认展开」三选一;只报摘要时「正文显示」整行不出现,改出现「摘要呈现」(进度卡 / 散文)。
54
+
55
+ 字段都标了 `.volatile()`:改它们不重挂这条 loader entry。催办状态机每次 `pre-step` 现读 `nudgeAfter`、`summaryOnly` 与 `defaultEnabled`/`sessionOverrides`;进度卡与菜单开关通过注册项的 `inject` 拿到同一张配置表单并订阅,所以改完当前页面的卡片与开关立刻跟着变。`summaryOnly` 还要换工具定义,见下一节。配置界面在宿主「插件」页本插件的详情页上;宿主没服务这份配置时卡片整块不出现。插件同时用 `ctx.settings.configure({ auto: false })` 关掉内核按 schema 自动生成的那份设置页。
56
+
57
+ ## 只报摘要
58
+
59
+ 开启后宿主半边把 `notify_user` 换成另一份定义:描述只要一行标题,参数只剩 `title`(必填),不再声明 `message`;催办注入的文案同步改成只要标题。浏览器半边只画标题行,没有正文也没有折叠键;摘要呈现选「散文」时连卡片也不画,标题按普通段落渲染,看起来像助手写的正文。
60
+
61
+ 开关只改工具面,不重挂插件:配置的 volatile 字段合并进运行中的插件后,loader 在拥有它的 fiber 上发 `loader/volatile-update`,宿主按路径里的 `summaryOnly` 换一份定义。在途调用持有旧定义,下一步用新定义。
62
+
63
+ 历史卡片按新配置重画:摘要模式隐藏正文,标题仍按「模型给的标题 → 正文首行 → 兜底文案」取,所以旧卡片不会只剩一句「更新」。关掉摘要后,旧卡片没有正文可展开,只画标题行。
49
64
 
50
65
  ## 按会话开关
51
66
 
@@ -65,6 +80,8 @@ dsh plugin --profile web add @lynn123411/dsh-notify-user
65
80
 
66
81
  ## 计数口径
67
82
 
83
+ - `notify_user` 工具在计数第一次到阈值之前不向模型声明;到阈值那一步放行,之后本会话一直可用。放行标志一旦置上就不随清零回退;阈值运行中调小后按新值立即判定,同样在那一步放行。关掉主动汇报的会话始终不声明。
84
+ - 散文清零照常生效:模型一直写散文时计数不断归零,不会催办,工具也一直不放行。
68
85
  - 只数**根调用**:原生模式下是模型每次直接发起的调用(同一轮里的并行调用各算一次);PTC 模式下是每次 `run_code`,程序内部的子调用不算。
69
86
  - `notify_user` 无论根调用还是 PTC 子调用都清零。
70
87
  - 助手消息(`assistant/message`)里带非空白正文时清零,`resetOnProse` 关掉则不算;`reasoning` 块不算正文,失败、重试、取消的尝试(`assistant/attempt`)也不清零。
@@ -102,11 +119,12 @@ cd plugins/dsh-notify-user && pnpm check
102
119
  `check` 链上每一步:
103
120
 
104
121
  - `typecheck`:`src` 的类型闸门。
105
- - `smoke-host.mjs`:真 cordis + 真 `ToolRuntime`,断言配置形状、工具注册与执行、装配行,以及催办接线在真 `ctx.waterfall` 下的行为(满阈值注入、汇报/散文/新回合/用户插话/阈值 0 清零、只有思考块不清零、失败尝试不清零、散文开关关掉不清零、上下文注入不清零、PTC 子调用不计数、嵌套汇报清零、子代理不注入、下游拒绝时不追加),以及按会话开关(关掉的会话不催、默认关掉时新会话不催、显式打开的会话照常催、开关现读、关掉的会话里没有 `notify_user` 工具)。
122
+ - `smoke-host.mjs`:真 cordis + 真 `ToolRuntime`,断言配置形状、工具注册与执行、装配行,以及催办接线在真 `ctx.waterfall` 下的行为(满阈值注入、汇报/散文/新回合/用户插话/阈值 0 清零、只有思考块不清零、失败尝试不清零、散文开关关掉不清零、上下文注入不清零、PTC 子调用不计数、嵌套汇报清零、子代理不注入、下游拒绝时不追加),以及按会话开关(关掉的会话不催、默认关掉时新会话不催、显式打开的会话照常催、开关现读、关掉的会话里没有 `notify_user` 工具、开着的会话到阈值后才有),以及工具放行(首次到阈值前不声明、到阈值那一步放行、之后一直可用、散文一直清零时不放行、关掉的会话不放行、运行中调小阈值时同一步放行)。
106
123
  - `smoke-client.mjs`:按 Web shell 方式装载浏览器 bundle,断言对话节点定义、位置切换会重挂定义、四处座位注册(进度卡、兜底行、菜单开关、配置卡)、字典键集与「未声明服务读取会抛」的守卫。
107
- - `test-nudge.mjs`:催办状态机的纯逻辑(阈值、四条清零路径、阈值与散文开关现读、按会话隔离、散文判定、开关关掉时不催且计数清零、开关按会话现读)。
124
+ - `test-nudge.mjs`:催办状态机的纯逻辑(阈值、四条清零路径、阈值与散文开关现读、按会话隔离、散文判定、开关关掉时不催且计数清零、开关按会话现读、计数首次到阈值放行工具且之后不回退、运行中调小阈值时工具解析就认出放行、关掉的会话与阈值 0 不放行)。
108
125
  - `test-config.mjs`:按会话开关的纯逻辑(默认值、会话自己的选择优先、脏数据与原型键不算记录、写入时只留与默认值不同的会话、没有变化时返回同一个对象)。
109
126
  - `test-render.mjs`:用真 react 把菜单开关画进 jsdom(默认值、写入规则、宿主拒收回退并报失败、写入在途禁用、子代理会话不画、配置不可用不画、锁住不可点)。
127
+ - `test-card.mjs`:用真 react 把进度卡与配置卡画进 jsdom(只报摘要时只有标题行、折叠键长在圆点里、正文三种显示形态、配置卡汇报形态两选一与正文显示三选一及各自写入、写入排队不并行、配置晚到时默认展开在就绪后生效)。
110
128
  - `test-row-model.mjs`:进度卡数据视图的三条来路(`meta` / PTC 参数 / start 参数)与标题回退。
111
129
  - `test-notify-node.mjs`:对话节点定义的认领范围、节点位置与卡片数据(原生调用、结果落定、流式增量与块结束、PTC 子调用、结果先到、没有正文时的兜底)。
112
130
  - `assert-lib-untracked.mjs`:`lib/` 是构建镜像,不入 git。
package/README.md CHANGED
@@ -4,19 +4,21 @@
4
4
 
5
5
  ## 功能
6
6
 
7
- - **主动汇报**:模型在干活途中调 `notify_user`,对话流里立刻出现一张进度卡——圆点、标题、时间,正文默认展开。本轮不结束、不阻塞,也不等你回答。
7
+ - **主动汇报**:工具放行后,模型在干活途中调 `notify_user`,对话流里立刻出现一张进度卡——圆点、标题、时间,正文默认收起。本轮不结束、不阻塞,也不等你回答。
8
8
  - **按会话开关**:模型与推理等级菜单里有「主动汇报」开关,与官方智能体团队开关同处一行。关掉后这个会话不再催模型汇报,也不再向它提供汇报工具。子代理会话里没有这个开关——催办本来就不进子代理。
9
9
  - **久不汇报会被催**:连续多次根工具调用没有汇报时,插件在下一步之前注入一条提醒,让模型把当前结论与下一步发出来;汇报过、或开了新回合就重新计数。子代理不催。
10
10
  - **散文回复也算汇报**:模型在助手消息里写了正文就清零计数,催办只在它连续只有工具调用、一句话都没说时出现;插件页的配置卡里可以关掉。
11
11
  - **默认值可改**:插件页的配置卡里定新会话默认开不开主动汇报,默认开启;单个会话在菜单里改,改完当前会话下一步就生效。
12
12
  - **阈值可改**:同一张配置卡里改催办阈值,默认 10 次工具调用,0 关闭催办。
13
- - **折叠可关**:同一张配置卡里决定进度卡带不带折叠键;带折叠键时正文仍默认展开,关掉后正文始终展开、不显示折叠键。
13
+ - **正文显示三选一**:同一张配置卡里选「始终展开」(没有折叠键)、「默认收起」(悬停圆点出现折叠键,点它展开)或「默认展开」(直接看到正文)。
14
+ - **只报摘要**:同一张配置卡里把汇报形态切成「只报摘要」,模型只写一行标题,卡片只显示标题行;工具描述、参数与催办文案跟着变,不再要结构化正文。摘要呈现可以选「进度卡」或「散文」——散文按普通段落渲染,看起来像助手写的正文。
14
15
  - **位置可切**:同一张配置卡里切换进度卡位置——放在步骤组边界(默认),或跟随工具行、随组一起折叠。
15
16
 
16
17
  ## 特性
17
18
 
19
+ - **达到阈值后提供汇报工具**:计数第一次到阈值之前,模型看不到 `notify_user`;催办那一步起工具放行,之后本会话一直可用。散文清零照常生效,一直写散文的会话不会催办,也不会出现汇报工具。
18
20
  - **只加一条通道**:不改系统提示、不改工具策略、不结束本轮;工具结果只有一句确认,正文由模型自己写。
19
- - **卡片是过程的分界**:进度卡是一个声明了过程位置的对话节点,站在步骤组外;两次汇报之间的工具调用各自折成一个原生子折叠,卡片本身不会被折进组里。本轮进行中始终可见,回合结束后随「工作过程」一起折叠。标题行是圆点 + 标题 + 折叠键 + 时间,正文缩进在一条竖线里。
21
+ - **卡片是过程的分界**:进度卡是一个声明了过程位置的对话节点,站在步骤组外;两次汇报之间的工具调用各自折成一个原生子折叠,卡片本身不会被折进组里。本轮进行中始终可见,回合结束后随「工作过程」一起折叠。标题行是圆点 + 标题 + 时间,悬停时圆点变成折叠键;正文缩进在一条竖线里。
20
22
  - **PTC 下同样成立**:工具出现在 `run_code` 的 SDK 里,程序内的调用画同一张卡;计数只算根调用,程序内部的子调用不算,程序里的 `notify_user` 照样清零。
21
23
  - **形态与装配**:bundle 型插件,装完即用、在 profile 里不用手写补丁;装配、配置项与验证见 [DETAILS.md](./DETAILS.md)。
22
24
 
package/lib/client.js CHANGED
@@ -35,6 +35,10 @@ var DEFAULT_NUDGE_AFTER = 10;
35
35
  var MAX_NUDGE_AFTER = 100;
36
36
  var DEFAULT_RESET_ON_PROSE = true;
37
37
  var DEFAULT_COLLAPSIBLE = true;
38
+ var DEFAULT_SUMMARY_ONLY = false;
39
+ var DEFAULT_BODY_EXPANDED_BY_DEFAULT = false;
40
+ var SUMMARY_RENDERS = ["card", "prose"];
41
+ var DEFAULT_SUMMARY_RENDER = "card";
38
42
  var CARD_PLACEMENTS = ["boundary", "inline"];
39
43
  var DEFAULT_CARD_PLACEMENT = "boundary";
40
44
  var DEFAULT_ENABLED = true;
@@ -70,6 +74,9 @@ var DEFAULT_CLIENT_CONFIG = {
70
74
  nudgeAfter: DEFAULT_NUDGE_AFTER,
71
75
  resetOnProse: DEFAULT_RESET_ON_PROSE,
72
76
  collapsible: DEFAULT_COLLAPSIBLE,
77
+ summaryOnly: DEFAULT_SUMMARY_ONLY,
78
+ summaryRender: DEFAULT_SUMMARY_RENDER,
79
+ bodyExpandedByDefault: DEFAULT_BODY_EXPANDED_BY_DEFAULT,
73
80
  cardPlacement: DEFAULT_CARD_PLACEMENT,
74
81
  defaultEnabled: DEFAULT_ENABLED,
75
82
  sessionOverrides: {}
@@ -92,16 +99,55 @@ function readConfig(form) {
92
99
  const resetOnProse = typeof rawResetOnProse === "boolean" ? rawResetOnProse : DEFAULT_CLIENT_CONFIG.resetOnProse;
93
100
  const rawCollapsible = value["collapsible"];
94
101
  const collapsible = typeof rawCollapsible === "boolean" ? rawCollapsible : DEFAULT_CLIENT_CONFIG.collapsible;
102
+ const rawSummaryOnly = value["summaryOnly"];
103
+ const summaryOnly = typeof rawSummaryOnly === "boolean" ? rawSummaryOnly : DEFAULT_CLIENT_CONFIG.summaryOnly;
104
+ const rawSummaryRender = value["summaryRender"];
105
+ const summaryRender = SUMMARY_RENDERS.find((render) => render === rawSummaryRender) ?? DEFAULT_CLIENT_CONFIG.summaryRender;
106
+ const rawBodyExpanded = value["bodyExpandedByDefault"];
107
+ const bodyExpandedByDefault = typeof rawBodyExpanded === "boolean" ? rawBodyExpanded : DEFAULT_CLIENT_CONFIG.bodyExpandedByDefault;
95
108
  const rawPlacement = value["cardPlacement"];
96
109
  const cardPlacement = CARD_PLACEMENTS.find((placement) => placement === rawPlacement) ?? DEFAULT_CLIENT_CONFIG.cardPlacement;
97
110
  const rawDefaultEnabled = value["defaultEnabled"];
98
111
  const defaultEnabled = typeof rawDefaultEnabled === "boolean" ? rawDefaultEnabled : DEFAULT_CLIENT_CONFIG.defaultEnabled;
99
112
  const sessionOverrides = readOverrides(value["sessionOverrides"]);
100
- return { nudgeAfter, resetOnProse, collapsible, cardPlacement, defaultEnabled, sessionOverrides };
113
+ return { nudgeAfter, resetOnProse, collapsible, summaryOnly, summaryRender, bodyExpandedByDefault, cardPlacement, defaultEnabled, sessionOverrides };
101
114
  }
102
115
 
103
116
  // src/client/ConfigCard.tsx
104
117
  var import_jsx_runtime = require("react/jsx-runtime");
118
+ var REPORT_MODES = ["structured", "summary"];
119
+ var BODY_MODES = ["always", "collapsed", "expanded"];
120
+ var REPORT_MODE_LABELS = {
121
+ structured: "config.reportMode.structured",
122
+ summary: "config.reportMode.summary"
123
+ };
124
+ var SUMMARY_RENDER_LABELS = {
125
+ card: "config.summaryRender.card",
126
+ prose: "config.summaryRender.prose"
127
+ };
128
+ var BODY_MODE_LABELS = {
129
+ always: "config.bodyMode.always",
130
+ collapsed: "config.bodyMode.collapsed",
131
+ expanded: "config.bodyMode.expanded"
132
+ };
133
+ function bodyModeOf(config) {
134
+ if (!config.collapsible) return "always";
135
+ return config.bodyExpandedByDefault ? "expanded" : "collapsed";
136
+ }
137
+ function ChoiceGroup({ label, options, value, onSelect }) {
138
+ 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)(
139
+ import_dsh_client_ui_primitives.Pill,
140
+ {
141
+ active: value === option.id,
142
+ "aria-pressed": value === option.id,
143
+ onClick: () => {
144
+ if (value !== option.id) onSelect(option.id);
145
+ },
146
+ children: option.label
147
+ },
148
+ option.id
149
+ )) });
150
+ }
105
151
  function ConfigCard(props) {
106
152
  const { form, t } = props;
107
153
  const [config, setConfig] = (0, import_react.useState)(() => readConfig(form));
@@ -109,6 +155,22 @@ function ConfigCard(props) {
109
155
  const [error, setError] = (0, import_react.useState)(null);
110
156
  const draftRef = (0, import_react.useRef)(text);
111
157
  const committedRef = (0, import_react.useRef)(config?.nudgeAfter);
158
+ const queueRef = (0, import_react.useRef)(Promise.resolve());
159
+ const enqueue = (pairs) => {
160
+ queueRef.current = queueRef.current.then(async () => {
161
+ try {
162
+ for (const [field, value] of pairs) {
163
+ if (!await form.set(field, value)) {
164
+ setError(t("config.write.failed"));
165
+ return;
166
+ }
167
+ }
168
+ setError(null);
169
+ } catch {
170
+ setError(t("config.write.failed"));
171
+ }
172
+ });
173
+ };
112
174
  (0, import_react.useEffect)(() => {
113
175
  const sync = () => {
114
176
  const next = readConfig(form);
@@ -128,20 +190,21 @@ function ConfigCard(props) {
128
190
  const parsed = Number(draftRef.current);
129
191
  if (!Number.isFinite(parsed)) return;
130
192
  const next = Math.min(MAX_NUDGE_AFTER, Math.max(0, Math.floor(parsed)));
131
- if (next !== committedRef.current) void form.set("nudgeAfter", next);
193
+ if (next !== committedRef.current) enqueue([["nudgeAfter", next]]);
132
194
  }, [form]);
133
195
  if (config === void 0) {
134
196
  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") }) });
135
197
  }
198
+ const bodyMode = bodyModeOf(config);
136
199
  const write = (field, value) => {
137
- void form.set(field, value).then(
138
- (accepted) => {
139
- setError(accepted ? null : t("config.write.failed"));
140
- },
141
- () => {
142
- setError(t("config.write.failed"));
143
- }
144
- );
200
+ enqueue([[field, value]]);
201
+ };
202
+ const chooseBodyMode = (mode) => {
203
+ if (mode === bodyMode) return;
204
+ const collapsible = mode !== "always";
205
+ const bodyExpandedByDefault = mode === "expanded";
206
+ setConfig({ ...config, collapsible, bodyExpandedByDefault });
207
+ enqueue([["collapsible", collapsible], ["bodyExpandedByDefault", bodyExpandedByDefault]]);
145
208
  };
146
209
  const commitThreshold = () => {
147
210
  const parsed = Number(text);
@@ -224,37 +287,75 @@ function ConfigCard(props) {
224
287
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "dsh-notify-config-label", children: t("config.placement.label") }),
225
288
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "dsh-notify-config-hint", children: t("config.placement.hint") })
226
289
  ] }),
227
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "dsh-notify-config-field", role: "group", "aria-label": t("config.placement.label"), children: CARD_PLACEMENTS.map((placement) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
228
- import_dsh_client_ui_primitives.Pill,
290
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
291
+ ChoiceGroup,
229
292
  {
230
- active: config.cardPlacement === placement,
231
- "aria-pressed": config.cardPlacement === placement,
232
- onClick: () => {
233
- if (config.cardPlacement === placement) return;
234
- setConfig({ ...config, cardPlacement: placement });
235
- write("cardPlacement", placement);
236
- },
237
- children: t(placement === "boundary" ? "config.placement.boundary" : "config.placement.inline")
238
- },
239
- placement
240
- )) })
293
+ label: t("config.placement.label"),
294
+ value: config.cardPlacement,
295
+ options: CARD_PLACEMENTS.map((id) => ({
296
+ id,
297
+ label: t(id === "boundary" ? "config.placement.boundary" : "config.placement.inline")
298
+ })),
299
+ onSelect: (id) => {
300
+ setConfig({ ...config, cardPlacement: id });
301
+ write("cardPlacement", id);
302
+ }
303
+ }
304
+ )
241
305
  ] }),
242
306
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "dsh-notify-config-row", children: [
243
307
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "dsh-notify-config-info", children: [
244
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "dsh-notify-config-label", children: t("config.collapsible.label") }),
245
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "dsh-notify-config-hint", children: t("config.collapsible.hint") })
308
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "dsh-notify-config-label", children: t("config.reportMode.label") }),
309
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "dsh-notify-config-hint", children: t("config.reportMode.hint") })
246
310
  ] }),
247
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "dsh-notify-config-field", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
248
- import_dsh_client_ui_primitives.Switch,
311
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
312
+ ChoiceGroup,
249
313
  {
250
- checked: config.collapsible,
251
- label: t("config.collapsible.label"),
252
- onChange: (next) => {
253
- setConfig({ ...config, collapsible: next });
254
- write("collapsible", next);
314
+ label: t("config.reportMode.label"),
315
+ value: config.summaryOnly ? "summary" : "structured",
316
+ options: REPORT_MODES.map((id) => ({ id, label: t(REPORT_MODE_LABELS[id]) })),
317
+ onSelect: (id) => {
318
+ const summary = id === "summary";
319
+ setConfig({ ...config, summaryOnly: summary });
320
+ write("summaryOnly", summary);
255
321
  }
256
322
  }
257
- ) })
323
+ )
324
+ ] }),
325
+ config.summaryOnly ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "dsh-notify-config-row", children: [
326
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "dsh-notify-config-info", children: [
327
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "dsh-notify-config-label", children: t("config.summaryRender.label") }),
328
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "dsh-notify-config-hint", children: t("config.summaryRender.hint") })
329
+ ] }),
330
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
331
+ ChoiceGroup,
332
+ {
333
+ label: t("config.summaryRender.label"),
334
+ value: config.summaryRender,
335
+ options: SUMMARY_RENDERS.map((id) => ({ id, label: t(SUMMARY_RENDER_LABELS[id]) })),
336
+ onSelect: (id) => {
337
+ setConfig({ ...config, summaryRender: id });
338
+ write("summaryRender", id);
339
+ }
340
+ }
341
+ )
342
+ ] }) : null,
343
+ config.summaryOnly ? null : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "dsh-notify-config-row", children: [
344
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "dsh-notify-config-info", children: [
345
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "dsh-notify-config-label", children: t("config.bodyMode.label") }),
346
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "dsh-notify-config-hint", children: t("config.bodyMode.hint") })
347
+ ] }),
348
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
349
+ ChoiceGroup,
350
+ {
351
+ label: t("config.bodyMode.label"),
352
+ value: bodyMode,
353
+ options: BODY_MODES.map((id) => ({ id, label: t(BODY_MODE_LABELS[id]) })),
354
+ onSelect: (id) => {
355
+ chooseBodyMode(id);
356
+ }
357
+ }
358
+ )
258
359
  ] }),
259
360
  error === null ? null : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "dsh-notify-config-error", role: "status", children: error })
260
361
  ] });
@@ -340,8 +441,19 @@ var en = {
340
441
  "config.threshold.unit": "calls",
341
442
  "config.resetOnProse.label": "Reset on prose",
342
443
  "config.resetOnProse.hint": "Any assistant reply with text counts as an update and resets the count; turn it off to reset only on notify_user, a new turn, or a user message.",
343
- "config.collapsible.label": "Collapsible",
344
- "config.collapsible.hint": "The update body starts expanded with a collapse button beside the title; turn it off to keep the body always expanded with no button.",
444
+ "config.reportMode.label": "Update format",
445
+ "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.",
446
+ "config.reportMode.structured": "Structured body",
447
+ "config.reportMode.summary": "Summary only",
448
+ "config.summaryRender.label": "Summary display",
449
+ "config.summaryRender.hint": "Card shows the dot and time; prose renders as a plain paragraph like an assistant reply.",
450
+ "config.summaryRender.card": "Card",
451
+ "config.summaryRender.prose": "Prose",
452
+ "config.bodyMode.label": "Body display",
453
+ "config.bodyMode.hint": "Always expanded has no toggle; collapsed expands from the dot; expanded shows the body right away.",
454
+ "config.bodyMode.always": "Always expanded",
455
+ "config.bodyMode.collapsed": "Collapsed",
456
+ "config.bodyMode.expanded": "Expanded",
345
457
  "config.placement.label": "Card placement",
346
458
  "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.",
347
459
  "config.placement.boundary": "Step-group boundary",
@@ -366,8 +478,19 @@ var zh = {
366
478
  "config.threshold.unit": "\u6B21",
367
479
  "config.resetOnProse.label": "\u6563\u6587\u56DE\u590D\u6E05\u96F6",
368
480
  "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 notify_user\u3001\u65B0\u56DE\u5408\u6216\u7528\u6237\u63D2\u8BDD\u65F6\u6E05\u96F6\u3002",
369
- "config.collapsible.label": "\u53EF\u6298\u53E0",
370
- "config.collapsible.hint": "\u8FDB\u5EA6\u5361\u6B63\u6587\u9ED8\u8BA4\u5C55\u5F00\uFF0C\u6807\u9898\u65C1\u5E26\u4E00\u4E2A\u6298\u53E0\u952E\uFF1B\u5173\u6389\u540E\u6B63\u6587\u59CB\u7EC8\u5C55\u5F00\u3001\u4E0D\u663E\u793A\u6298\u53E0\u952E\u3002",
481
+ "config.reportMode.label": "\u6C47\u62A5\u5F62\u6001",
482
+ "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",
483
+ "config.reportMode.structured": "\u7ED3\u6784\u5316\u6B63\u6587",
484
+ "config.reportMode.summary": "\u53EA\u62A5\u6458\u8981",
485
+ "config.summaryRender.label": "\u6458\u8981\u5448\u73B0",
486
+ "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",
487
+ "config.summaryRender.card": "\u8FDB\u5EA6\u5361",
488
+ "config.summaryRender.prose": "\u6563\u6587",
489
+ "config.bodyMode.label": "\u6B63\u6587\u663E\u793A",
490
+ "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",
491
+ "config.bodyMode.always": "\u59CB\u7EC8\u5C55\u5F00",
492
+ "config.bodyMode.collapsed": "\u9ED8\u8BA4\u6536\u8D77",
493
+ "config.bodyMode.expanded": "\u9ED8\u8BA4\u5C55\u5F00",
371
494
  "config.placement.label": "\u8FDB\u5EA6\u5361\u4F4D\u7F6E",
372
495
  "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",
373
496
  "config.placement.boundary": "\u6B65\u9AA4\u7EC4\u8FB9\u754C",
@@ -564,25 +687,28 @@ function markdownLabels(t) {
564
687
  footnotes: t("markdown.footnotes")
565
688
  };
566
689
  }
567
- function NotifyCard({ data, form, openFile, t }) {
690
+ function NotifyCard({ data, form, openFile, t, seat }) {
568
691
  const config = useClientConfig(form);
569
- const [open, setOpen] = (0, import_react3.useState)(true);
692
+ const [open, setOpen] = (0, import_react3.useState)(null);
570
693
  const title = titleOf({ title: data.title, message: data.message }, t("row.fallbackTitle"));
571
- const hasBody = data.message.trim().length > 0;
694
+ if (config.summaryOnly && config.summaryRender === "prose") {
695
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "dsh-notify-prose", "data-tool": NOTIFY_TOOL_NAME, "data-state": data.settled ? "settled" : "running", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_dsh_client_ui_primitives3.MarkdownDelegateProvider, { openFile, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_dsh_client_ui_primitives3.MarkdownText, { text: title, labels: markdownLabels(t) }) }) });
696
+ }
697
+ const hasBody = !config.summaryOnly && data.message.trim().length > 0;
572
698
  const collapsible = config.collapsible && hasBody;
573
- const expanded = collapsible ? open : true;
699
+ const expanded = collapsible ? open ?? config.bodyExpandedByDefault : true;
574
700
  const time = formatClock(data.time);
575
701
  const titleNode = data.settled ? title : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_dsh_client_ui_primitives3.TextShimmer, { active: true, children: title });
576
702
  return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
577
703
  "div",
578
704
  {
579
705
  className: "dsh-notify-card",
706
+ "data-seat": seat,
580
707
  "data-tool": NOTIFY_TOOL_NAME,
581
708
  "data-state": data.settled ? "settled" : "running",
582
709
  "data-collapsible": collapsible || void 0,
583
710
  children: [
584
711
  /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "dsh-notify-head", children: [
585
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "dsh-notify-dot", "aria-hidden": "true" }),
586
712
  collapsible ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
587
713
  "button",
588
714
  {
@@ -590,21 +716,20 @@ function NotifyCard({ data, form, openFile, t }) {
590
716
  className: "dsh-notify-toggle",
591
717
  "aria-expanded": expanded,
592
718
  onClick: () => {
593
- setOpen((value) => !value);
719
+ setOpen(!expanded);
594
720
  },
595
721
  children: [
596
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "dsh-notify-title", children: titleNode }),
597
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
598
- import_dsh_client_ui_primitives3.IconChevronDownOutlineRegular,
599
- {
600
- className: "dsh-notify-chevron",
601
- "data-open": expanded || void 0,
602
- size: 14
603
- }
604
- )
722
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: "dsh-notify-dot", "data-open": expanded || void 0, "aria-hidden": "true", children: [
723
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "dsh-notify-dot-idle" }),
724
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_dsh_client_ui_primitives3.IconChevronDownOutlineRegular, { className: "dsh-notify-chevron", size: 14 })
725
+ ] }),
726
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "dsh-notify-title", children: titleNode })
605
727
  ]
606
728
  }
607
- ) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "dsh-notify-title", children: titleNode }),
729
+ ) : /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
730
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "dsh-notify-dot", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "dsh-notify-dot-idle" }) }),
731
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "dsh-notify-title", children: titleNode })
732
+ ] }),
608
733
  time === null ? null : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "dsh-notify-time", children: time })
609
734
  ] }),
610
735
  expanded && hasBody ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "dsh-notify-body", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_dsh_client_ui_primitives3.MarkdownDelegateProvider, { openFile, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_dsh_client_ui_primitives3.MarkdownText, { text: data.message, labels: markdownLabels(t), variant: "compact" }) }) }) : null
@@ -616,7 +741,7 @@ function NotifyCard({ data, form, openFile, t }) {
616
741
  // src/client/NotifyNodeView.tsx
617
742
  var import_jsx_runtime4 = require("react/jsx-runtime");
618
743
  function NotifyNodeView({ node, openFile, t, form }) {
619
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(NotifyCard, { data: node.data, form, openFile, t });
744
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(NotifyCard, { data: node.data, form, openFile, t, seat: "node" });
620
745
  }
621
746
 
622
747
  // src/client/NotifyRow.tsx
@@ -631,14 +756,14 @@ function NotifyRow(props) {
631
756
  time: props.block.time,
632
757
  settled: props.phase === "result"
633
758
  };
634
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(NotifyCard, { data, form, openFile: props.openFile, t });
759
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(NotifyCard, { data, form, openFile: props.openFile, t, seat: "row" });
635
760
  }
636
761
 
637
762
  // src/client/ConfigCard.css
638
763
  var ConfigCard_default = "/* \u63D2\u4EF6\u9875\u4E0A\u7684\u50AC\u529E\u914D\u7F6E\u5361\u3002 */\n\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";
639
764
 
640
765
  // src/client/NotifyCard.css
641
- var NotifyCard_default = "/* `notify_user` \u7684\u8FDB\u5EA6\u5361\uFF1A\u5706\u70B9 + \u6807\u9898 + \u6298\u53E0\u952E + \u65F6\u95F4\uFF0C\u6B63\u6587\u9ED8\u8BA4\u5C55\u5F00\u3002\n *\n * \u884C\u9996\u53D6\u5BBF\u4E3B `DisclosureRow` \u7684\u540C\u4E00\u5957\u51E0\u4F55\uFF1A16px \u56FE\u6807\u6846 + 6px \u95F4\u8DDD\uFF0C\u6807\u9898\u6587\u5B57\u56E0\u6B64\u843D\u5728\n * \u884C\u5DE6\u8FB9\u7F18 +22px\uFF0C\u4E0E\u8FC7\u7A0B\u884C\u3001\u5DE5\u5177\u884C\u7684\u6587\u5B57\u5217\u5BF9\u9F50\uFF1B\u6846\u5BBD\u8DDF\u968F\u5BBF\u4E3B\u7684\u5B57\u53F7\u8F74\uFF0C\u6539\u5B57\u53F7\u540E\u4ECD\u5BF9\u9F50\u3002 */\n\n.dsh-notify-card {\n padding: 2px 0 8px;\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 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::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 flex: none;\n color: var(--dsw-alias-state-business-primary);\n transition: transform 0.15s ease;\n}\n\n.dsh-notify-chevron[data-open] {\n transform: rotate(180deg);\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/* \u7AD6\u7EBF\u843D\u5728\u5706\u70B9\u7684\u5706\u5FC3\u4E0A\uFF08\u884C\u5DE6\u8FB9\u7F18 +8px\uFF09\uFF0C\u6B63\u6587\u6587\u5B57\u4E0E\u6807\u9898\u540C\u5217\uFF08+22px\uFF09\u3002 */\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/* \u5BBF\u4E3B\u7684 compact markdown \u81EA\u5E26\u7070\u5B57\uFF0C\u8FD9\u91CC\u6309\u6563\u6587\u9ED1\u8986\u76D6\u5230\u5B83\u7684\u6839\u8282\u70B9\u3002 */\n.dsh-notify-body > div {\n color: var(--dsw-alias-label-primary);\n}\n";
766
+ var NotifyCard_default = '/* `notify_user` \u7684\u8FDB\u5EA6\u5361\uFF1A\u5706\u70B9 + \u6807\u9898 + \u65F6\u95F4\uFF0C\u6B63\u6587\u9ED8\u8BA4\u6536\u8D77\uFF1B\u60AC\u505C\u65F6\u5706\u70B9\u53D8\u6210\u6298\u53E0\u952E\u3002\n *\n * \u884C\u9996\u53D6\u5BBF\u4E3B `DisclosureRow` \u7684\u540C\u4E00\u5957\u51E0\u4F55\uFF1A16px \u56FE\u6807\u6846 + 6px \u95F4\u8DDD\uFF0C\u6807\u9898\u6587\u5B57\u56E0\u6B64\u843D\u5728\n * \u884C\u5DE6\u8FB9\u7F18 +22px\uFF0C\u4E0E\u8FC7\u7A0B\u884C\u3001\u5DE5\u5177\u884C\u7684\u6587\u5B57\u5217\u5BF9\u9F50\uFF1B\u6846\u5BBD\u8DDF\u968F\u5BBF\u4E3B\u7684\u5B57\u53F7\u8F74\uFF0C\u6539\u5B57\u53F7\u540E\u4ECD\u5BF9\u9F50\u3002 */\n\n.dsh-notify-card {\n padding: 2px 0 8px;\n}\n\n/* \u5BF9\u8BDD\u8282\u70B9\u5EA7\u4F4D\uFF1A\u4E0A\u4E0B\u95F4\u8DDD\u4EA4\u7ED9\u5BBF\u4E3B\u7684\u6D41\u95F4\u8DDD\uFF08\u89C1\u6587\u4EF6\u672B\u5C3E\u7684 --dsh-chat-flow-gap\uFF09\uFF0C\u5361\u7247\u672C\u8EAB\u4E0D\u52A0\u5185\u8FB9\u8DDD\u3002 */\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/* \u5706\u70B9\u662F\u5E73\u65F6\u7684\u6837\u5B50\uFF1B\u60AC\u505C\u6807\u9898\u884C\u65F6\u8BA9\u4F4D\u7ED9\u6298\u53E0\u952E\uFF0C\u4E0E\u5BBF\u4E3B DisclosureRow \u7684 leading \u540C\u6784\u3002 */\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/* \u60AC\u505C\u65F6\u6309\u5C55\u5F00\u72B6\u6001\u7ED9\u65B9\u5411\uFF1A\u6536\u8D77\u671D\u4E0B\uFF0C\u5C55\u5F00\u671D\u4E0A\u3002 */\n.dsh-notify-dot[data-open] .dsh-notify-chevron {\n transform: rotate(180deg);\n}\n\n/* \u5C55\u5F00\u4E0E\u6536\u8D77\u90FD\u663E\u793A\u5706\u70B9\uFF1B\u6298\u53E0\u952E\u53EA\u5728\u60AC\u505C\u6807\u9898\u884C\u65F6\u51FA\u73B0\uFF0C\u4E0D\u968F\u5C55\u5F00\u72B6\u6001\u5E38\u9A7B\u3002 */\n@media (hover: hover) {\n /* \u53EA\u6709\u5E26\u6298\u53E0\u952E\u7684\u5361\u7247\u624D\u5728\u60AC\u505C\u65F6\u8BA9\u5706\u70B9\u8BA9\u4F4D\uFF1B\u6458\u8981\u6A21\u5F0F\u6CA1\u6709\u6298\u53E0\u952E\uFF0C\u5706\u70B9\u4FDD\u6301\u4E0D\u52A8\u3002 */\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/* \u6458\u8981\u6309\u6563\u6587\u6E32\u67D3\uFF1A\u4E0D\u52A0\u5361\u7247\u5185\u8FB9\u8DDD\uFF0C\u6392\u7248\u4EA4\u7ED9\u5BBF\u4E3B\u7684\u6B63\u6587\u6837\u5F0F\u3002 */\n.dsh-notify-prose {\n padding: 0;\n}\n\n/* \u7AD6\u7EBF\u843D\u5728\u5706\u70B9\u7684\u5706\u5FC3\u4E0A\uFF08\u884C\u5DE6\u8FB9\u7F18 +8px\uFF09\uFF0C\u6B63\u6587\u6587\u5B57\u4E0E\u6807\u9898\u540C\u5217\uFF08+22px\uFF09\u3002 */\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/* \u5BBF\u4E3B\u7684 compact markdown \u81EA\u5E26\u7070\u5B57\uFF0C\u8FD9\u91CC\u6309\u6563\u6587\u9ED1\u8986\u76D6\u5230\u5B83\u7684\u6839\u8282\u70B9\u3002 */\n.dsh-notify-body > div {\n color: var(--dsw-alias-label-primary);\n}\n\n/* \u6298\u53E0\u6001\u7684\u6C47\u62A5\u884C\u4E0E\u6563\u6587\u5757\u540C\u8DDD\uFF1A\u5BBF\u4E3B\u6309 --dsh-chat-flow-gap \u7ED9\u6D41\u8282\u70B9\u7559\u767D\uFF0C\u9ED8\u8BA4 4px\uFF1B\n \u8FD9\u91CC\u628A\u6C47\u62A5\u884C\u81EA\u5DF1\u4E0E\u5B83\u540E\u9762\u90A3\u4E00\u884C\u90FD\u63D0\u5230\u6563\u6587\u7684 12px\u3002 */\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';
642
767
 
643
768
  // src/client/EnabledToggle.css
644
769
  var EnabledToggle_default = "/* \u6A21\u578B\u4E0E\u63A8\u7406\u7B49\u7EA7\u83DC\u5355\u91CC\u7684\u300C\u4E3B\u52A8\u6C47\u62A5\u300D\u5F00\u5173\u3002 */\n\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/* \u5F00\u5173\u7684\u70B9\u51FB\u533A\u94FA\u6EE1\u6574\u884C\uFF0C\u4F46\u4E0D\u5305\u4F4F\u4FE1\u606F\u6309\u94AE\u3002 */\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";