dsh-coding 0.0.1 → 0.1.1-rc1
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 +65 -58
- package/cordis.patch.yml +231 -4
- package/docs/DETAIL.md +183 -0
- package/docs/DEVELOPMENT.md +189 -0
- package/icon.svg +4 -4
- package/lib/apply-patch.js +268 -0
- package/lib/client/capsule.js +120 -0
- package/lib/client/card.js +220 -0
- package/lib/client/command-row.js +76 -0
- package/lib/client/config-page.js +392 -0
- package/lib/client/definition.js +164 -0
- package/lib/client/index.js +129 -0
- package/lib/client/locales.js +156 -0
- package/lib/client/mode-picker.js +77 -0
- package/lib/client/styles.js +283 -0
- package/lib/client.js +1691 -0
- package/lib/coding-projection.js +349 -0
- package/lib/config.js +204 -0
- package/lib/contract.js +124 -0
- package/lib/editor.js +23 -0
- package/lib/failures.js +142 -0
- package/lib/handoff.js +312 -0
- package/lib/index.js +109 -7
- package/lib/language.js +136 -0
- package/lib/messages.js +43 -0
- package/lib/models.js +154 -0
- package/lib/patch.js +235 -0
- package/lib/preset.js +1488 -0
- package/lib/reasoning-levels.js +28 -0
- package/lib/reasoning-projection.js +178 -0
- package/lib/reasoning.js +585 -0
- package/lib/stages.js +306 -0
- package/lib/state.js +550 -0
- package/lib/system-language.js +56 -0
- package/lib/types/apply-patch.d.ts +13 -0
- package/lib/types/client/capsule.d.ts +9 -0
- package/lib/types/client/card.d.ts +72 -0
- package/lib/types/client/command-row.d.ts +42 -0
- package/lib/types/client/config-page.d.ts +136 -0
- package/lib/types/client/definition.d.ts +51 -0
- package/lib/types/client/index.d.ts +10 -0
- package/lib/types/client/locales.d.ts +18 -0
- package/lib/types/client/mode-picker.d.ts +25 -0
- package/lib/types/client/styles.d.ts +28 -0
- package/lib/types/coding-projection.d.ts +116 -0
- package/lib/types/config.d.ts +193 -0
- package/lib/types/contract.d.ts +33 -0
- package/lib/types/editor.d.ts +9 -0
- package/lib/types/failures.d.ts +62 -0
- package/lib/types/handoff.d.ts +112 -0
- package/lib/types/index.d.ts +144 -0
- package/lib/types/language.d.ts +56 -0
- package/lib/types/messages.d.ts +27 -0
- package/lib/types/models.d.ts +82 -0
- package/lib/types/patch.d.ts +37 -0
- package/lib/types/preset.d.ts +22 -0
- package/lib/types/reasoning-levels.d.ts +20 -0
- package/lib/types/reasoning-projection.d.ts +64 -0
- package/lib/types/reasoning.d.ts +141 -0
- package/lib/types/stages.d.ts +164 -0
- package/lib/types/state.d.ts +261 -0
- package/lib/types/system-language.d.ts +10 -0
- package/lib/types/verification-tool.d.ts +32 -0
- package/lib/types/verification.d.ts +77 -0
- package/lib/types/verifier.d.ts +9 -0
- package/lib/types/volatile.d.ts +17 -0
- package/lib/verification-tool.js +176 -0
- package/lib/verification.js +337 -0
- package/lib/verifier.js +25 -0
- package/lib/volatile.js +20 -0
- package/locale/en.json +3 -2
- package/locale/zh.json +3 -2
- package/package.json +83 -9
- package/lib/index.d.ts +0 -11
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
# DSH Coding 编程智能体 — 开发者文档
|
|
2
|
+
|
|
3
|
+
面向维护者:目录结构、构建测试、实现依赖的 DSH 契约、必须保持的实现约束、调试与验收。使用者看 [README](../README.md);设计思路与分层结构见 [DETAIL.md](DETAIL.md)。
|
|
4
|
+
|
|
5
|
+
## 1. 环境与命令
|
|
6
|
+
|
|
7
|
+
- Node.js ≥ 24.9.0(`.node-version` 已锁定)
|
|
8
|
+
- pnpm 12+
|
|
9
|
+
- DSH 0.2.2-rc.5(本插件按该版本的实际契约实现,见第 4 节)
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
pnpm install
|
|
13
|
+
pnpm typecheck # tsc --noEmit
|
|
14
|
+
pnpm build # 生成 lib/*.js、lib/types/**、lib/client.js
|
|
15
|
+
pnpm test # 先 build,再 node --test test/*.test.mjs
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## 2. 目录结构
|
|
19
|
+
|
|
20
|
+
```
|
|
21
|
+
src/
|
|
22
|
+
index.ts Host 设置服务(ctx.dshCodingRuntime)
|
|
23
|
+
config.ts Config(Schemastery)、configSchema、路由解析
|
|
24
|
+
models.ts worker 模型路由:resolveWorkerRoute / assertWorkerModel / WorkerModelError
|
|
25
|
+
handoff.ts 跨阶段交接记录:合并去重、摘要渲染、checkpoint 校验(纯函数,浏览器可用)
|
|
26
|
+
stages.ts 阶段/模式常量、工具分类、阶段准入、checkpoint 类型(宿主+浏览器共用)
|
|
27
|
+
failures.ts 阻断性异常的结构化记录与中英文通知渲染
|
|
28
|
+
state.ts 每 Agent 状态机、推进门禁、工具判定、工具表裁剪、验证预算、checkpoint
|
|
29
|
+
contract.ts 按阶段拆分的交付契约片段
|
|
30
|
+
messages.ts dsh-coding-stage / dsh-coding-control 消息源
|
|
31
|
+
preset.ts 预设主插件:双层门禁、pre-step、工具、/coding 命令、语言提示、投影
|
|
32
|
+
language.ts 会话语言解析(auto/zh/en)
|
|
33
|
+
system-language.ts macOS AppleLanguages 探测(Host-only)
|
|
34
|
+
reasoning.ts 推理等级:分类器、effort 映射、每会话控制器
|
|
35
|
+
reasoning-projection.ts dshCodingReasoning 持久投影
|
|
36
|
+
coding-projection.ts dshCodingStage 持久投影
|
|
37
|
+
editor.ts apply_patch(主预设 + implement worker 共用)
|
|
38
|
+
verifier.ts run_verification 入口(verify worker)
|
|
39
|
+
verification.ts 命令解析 + ctx.subprocess 执行 + 失败输出解析
|
|
40
|
+
verification-tool.ts run_verification 工具定义
|
|
41
|
+
patch.ts Codex patch 语法解析
|
|
42
|
+
apply-patch.ts apply_patch 工具
|
|
43
|
+
client/ 浏览器半:index / definition / capsule / mode-picker / card /
|
|
44
|
+
command-row / config-page / styles / locales
|
|
45
|
+
scripts/build.mjs esbuild 打包 client + tsc 编译宿主 + 原子替换 lib
|
|
46
|
+
scripts/mount-probe.mjs 隔离挂载探针
|
|
47
|
+
test/ node:test 用例(跑构建后的 lib,而不是源码)
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## 3. 构建产物
|
|
51
|
+
|
|
52
|
+
| 入口 | 产物 | 说明 |
|
|
53
|
+
| --- | --- | --- |
|
|
54
|
+
| `dsh-coding` | `lib/index.js` | Host 设置服务;同时导出 `Config` 与 `configSchema` |
|
|
55
|
+
| `dsh-coding/preset` | `lib/preset.js` | 预设运行时 |
|
|
56
|
+
| `dsh-coding/editor` | `lib/editor.js` | `apply_patch` |
|
|
57
|
+
| `dsh-coding/verifier` | `lib/verifier.js` | `run_verification` |
|
|
58
|
+
| `dsh-coding/client` | `lib/client.js` | 浏览器模块表:`window.__ModuleLoader__.load({ id, factory })` |
|
|
59
|
+
|
|
60
|
+
宿主代码只编译、不打包,所有 `@deepseek-ai/*` 保持外部引用,运行时由 DSH 安装目录解析;客户端用 esbuild 打包为 CJS,再由脚本包一层模块表工厂,React 由宿主模块表提供。`scripts/build.mjs` 先写临时目录、全部成功后才替换 `lib/`,构建失败不会留下半成品。
|
|
61
|
+
|
|
62
|
+
## 4. 已核实的 DSH 契约(改动前必须复核)
|
|
63
|
+
|
|
64
|
+
以下结论来自运行时 `cordis_inspect_query` 与安装目录源码。改代码前请用同样方法复核。
|
|
65
|
+
|
|
66
|
+
| 契约 | 事实 | 出处 |
|
|
67
|
+
| --- | --- | --- |
|
|
68
|
+
| `PreToolDecision` | `allow / deny{reason, info?} / cancel / ask{reason, displayReason}`;deny 产生 `Error: <reason>` | `dsh-tools/src/contracts.ts`、`pipeline.ts` |
|
|
69
|
+
| 派发顺序 | pre-execute waterfall →(ask 转审批)→ `checkGuards` → 派发;guard 拒绝单调生效 | `dsh-tools/src/pipeline.ts` |
|
|
70
|
+
| `tools.guard(guard)` | 同步守卫,注册在当前 scope;`checkGuards` 遍历 global + agent 作用域链 | `dsh-tools/src/index.ts` |
|
|
71
|
+
| `tools.restrict(filter)` | 必须在 scoped ctx(`agent.ctx`)调用;拒绝未知工具名;多个限制取交集 | `dsh-tools/src/index.ts` |
|
|
72
|
+
| `agent/pre-step` | `{kind:'reject'}` 或 `{kind:'enter', messages, startsRequestSeries?}`;拒绝后 Turn 以 `blocked` 结束 | `dsh-agent`、`dsh-agent-loop` |
|
|
73
|
+
| `AgentOptions` | 只有 `provider / model / reasoningEffort / maxTokens`,**没有工具字段** | `dsh-agent/src/runtime-types.ts` |
|
|
74
|
+
| `SubagentStartRequest` | 有 `agentPreset / agentOptions / outputSchema / cwd / maxDepth`;**没有** `toolFilter` | `dsh-subagent/src/types.ts` |
|
|
75
|
+
| spawn provider | `agentOptions / agentPreset / outputSchema / depthLimit` 全为 true;不继承父上下文 | `dsh-subagent-spawn-in-process/src/index.ts` |
|
|
76
|
+
| 结构化子代理 | `outputSchema` 注册 `structured_output` 工具、追加提示并校验取值 | `dsh-subagent/src/structured.ts` |
|
|
77
|
+
| 会话事件 | 未知且非 `ignorable` 的事件会让 Session 拒绝重开 | `dsh-session/src/index.ts` |
|
|
78
|
+
| 新会话首页 | `conversation.hero.options` 仅在空白首页且存在 `sessionId` 时渲染 | `dsh-client-ui-conversation` |
|
|
79
|
+
| 预设 Remote | `remote.agentPresets.list/select`;Host 侧过滤替换 `ctx.agentPresets.remoteExportList`(网关用 `Reflect.get` 解析实现) | `dsh-agent-preset-registry/src/index.ts` |
|
|
80
|
+
| 客户端控制通道 | `remote.commands.execute(agentId, line, attachments)`;命令生命周期以 `command/run`、`command/done` 持久记录 | `dsh-api-session-controller`、`dsh-commands` |
|
|
81
|
+
| 命令回执卡片 | `conversation.chat.commandview` 是 keyed 槽,同名 key 会替换该命令的默认卡片 | `dsh-client-ui-chat` |
|
|
82
|
+
| `ConversationNodeDefinition` | `match / start / update / buildViewNode`;每次 start 用窗口内最早的 start,其余经 update 折叠 | `dsh-client-ui-conversation` |
|
|
83
|
+
| `ctx.effect` | 返回 disposer;插件卸载时统一释放 | `@deepseek-ai/cordis` |
|
|
84
|
+
| `ctx.subprocess` | `spawn(spec)` → `{ done, collected, terminate }`;argv 不做 shell 解释 | `dsh-subprocess/src/types.ts` |
|
|
85
|
+
| 设置页表单 | bundle 页渲染配置槽时只传 `{ view }`(不传 `form`);可编辑字段须是 volatile,命名空间键是行 id | `dsh-client-ui-plugin-manager`、`dsh-settings` |
|
|
86
|
+
| 推理等级写入 | `agent/inbox/claimed` 在 Host 快照前同步;`agent.model.select()` 只对下一步生效 | `dsh-agent/src/model-selection.js` |
|
|
87
|
+
|
|
88
|
+
## 5. 实现约束(改代码时不要破坏)
|
|
89
|
+
|
|
90
|
+
1. **门禁只用 `deny`**:不要改成 `ask`,`ask` 是审批语义。
|
|
91
|
+
2. **双层必须同时存在**:`tools.restrict` 裁剪 + `tools/pre-execute`/guard 拒绝,不能只留一层。
|
|
92
|
+
3. **guard 与 waterfall 共用同一个判定函数**(`checkTool`),避免两层漂移。
|
|
93
|
+
4. **子代理白名单写在预设组合里**:不要假设“子代理会继承父级限制”,也不要试图通过 `agentOptions` 传工具(契约没有该字段)。
|
|
94
|
+
5. **不新增自定义 Session 事件类型**;需要新状态就放进 `tool/result.meta` 的整值 checkpoint,或走 `ctx.sessionProjections`。
|
|
95
|
+
6. **所有监听与注册都走 `ctx.effect`**:`ctx.on`、`ctx.tools.register`、`ctx.tools.guard`、客户端 `locale`/Definition 注册全部包在 `ctx.effect` 里。
|
|
96
|
+
7. **worker 路由缺失必须失败**:不要在代码里写“回退到主代理模型”的兜底。
|
|
97
|
+
8. **浏览器半只管渲染与控制回流**:不写 DOM、不加载其他 DSH Client 包;控制动作走 `/coding` 命令或官方 Remote,前端不直接改 Host 状态。预设可见性过滤放在 Host 端 `installWorkerPresetFilter`。
|
|
98
|
+
9. **胶囊只能读整值 checkpoint**:`asCheckpoint()` 必须继续做全字段校验,`meta` 是历史版本写下的任意 JSON。
|
|
99
|
+
10. **配置页依赖 volatile 字段**:字段改回普通字段会让插件页面上的表单消失,同时要保留 `ctx.settings.configure({ auto: false })`,否则会出现重复的自动页面。
|
|
100
|
+
11. **bundle 配置页不要等 owner 传 `form`**:当前版本只传 `view`;页面必须经 `ctx.configForms.get('dsh-coding')` 读写 Host 表单,不能自行调用 `ctx.remote.settings`。
|
|
101
|
+
12. **worker 预设只从对外花名册里隐藏**:过滤发生在 Host,注册表必须继续包含三个 worker 预设,否则 `delegate_*` 找不到组合;不要为此改 `cordis.patch.yml` 的预设声明。
|
|
102
|
+
13. **turn 快照与卡片字段一一对应**:`turn/end` 冻结的字段必须是卡片渲染的全部动态值(mode/stage/verification/planItems/openPlanItems/edits);卡片不得直接读实时 plan/edits。
|
|
103
|
+
14. **`handoff` 必须有界**:所有新增字段都要走 `HANDOFF_*` 上限并随 checkpoint 持久化;不得把无界的对话历史塞进 worker 提示词。
|
|
104
|
+
15. **模型路由只走 `resolveWorkerRoute` / `assertWorkerModel`**:不得新增“回退主代理模型”的分支,也不要在别处另写一套 route 解析。
|
|
105
|
+
16. **验证失败记账只走 `recordVerification`**:不得绕过预算直接写 `state.verification`,否则阻塞出口会失效。
|
|
106
|
+
17. **阻塞交付的放行只由 `checkAdvance` 的 `blocked` 返回决定**:不要用 `deny` / `ask` 实现它——那是工具门禁的语义。
|
|
107
|
+
18. **验证命令必须受 `verificationTimeoutMs` 约束**:新增执行路径不得绕过 `executeVerification`,否则超时与预算都会失效。
|
|
108
|
+
19. **失败提示只走 `recordFailure` + `takeFailureNotice`**:不要在异常处理里新建 Turn,也不要直接 append Session 事件——前者会打断当前对话节奏,后者会破坏缓存与持久化约束。
|
|
109
|
+
|
|
110
|
+
## 6. 测试
|
|
111
|
+
|
|
112
|
+
测试跑**构建产物**(`lib/*.js`),不是源码;`pnpm test` 先执行 `pnpm build`。
|
|
113
|
+
|
|
114
|
+
| 文件 | 覆盖 |
|
|
115
|
+
| --- | --- |
|
|
116
|
+
| `test/stages.test.mjs` | 阶段集合、门禁条件(含 handoff 的 goal / acceptance 门禁)、工具判定、实现表、验证预算与阻塞交付、`resetVerification`、checkpoint 校验(含 `failure` 与旧 checkpoint 兼容)、`restoreFromView`、状态行的 `failure <point>` |
|
|
117
|
+
| `test/failures.test.mjs` | failure 结构(point / reason / action / at)、原因与处理截断到 600 字符、中英文 notice 文案、`asFailure` 逐字段校验与空消息回退 |
|
|
118
|
+
| `test/runtime.test.mjs` | 假 Host 挂载真实 preset:waterfall 拒绝、guard 单调、工具表裁剪、派发参数、`coding_handoff` 读写与 worker 自动写回、模型缺失拒绝、验证失败阻断交付与预算耗尽后的 BLOCKED 交付、`/coding reset`、拒绝原因回流、失败通知只注入一次并在同点成功后清除、断点恢复、`/coding` 控制语义、路由缺失挂载失败、对外花名册过滤 |
|
|
119
|
+
| `test/definition.test.mjs` | 仅凭 checkpoint 构造胶囊、pending 继承、turn/end 收尾、跨轮 checkpoint 拒绝、视图节点身份 |
|
|
120
|
+
| `test/client.test.mjs` | 浏览器 bundle 加载、Definition/渲染器/模式选择器/配置页注册、胶囊渲染、picker 仅在 Coding 会话出现、静默 `set` 回流、推理行逐轮显示 |
|
|
121
|
+
| `test/projection.test.mjs` | 投影折叠(模式/阶段/任务单/验证/`/coding`)、turn 快照字段与校验 |
|
|
122
|
+
| `test/reasoning.test.mjs` | 分类 low/high/max、effort 映射、控制器四来源、逐轮冻结与校验 |
|
|
123
|
+
| `test/verification.test.mjs` | 命令解析、配置覆盖、缺失脚本报错、输出解析、`ctx.subprocess` 执行、超时终止与 `0` 不限制 |
|
|
124
|
+
| `test/language.test.mjs` | 会话语言解析与提示段 |
|
|
125
|
+
| `test/manifest.test.mjs` | 清单/导出/构建产物、locale 与详情文档、补丁里的预设与 worker 白名单、client 包装格式、宿主外部依赖 |
|
|
126
|
+
|
|
127
|
+
新增行为请同时补一条断言;`test/runtime.test.mjs` 的假上下文已经实现 `on/effect/tools/inject/get`。
|
|
128
|
+
|
|
129
|
+
### 手工验证
|
|
130
|
+
|
|
131
|
+
```text
|
|
132
|
+
1. 新建会话 → 预设列表出现 "Coding",三个 worker 预设不出现。
|
|
133
|
+
2. 让模型直接改文件 → 规划阶段收到 deny,reason 提示先 todo_write / 再委派。
|
|
134
|
+
3. 进入实现阶段 → 主代理工具表无 apply_patch/edit/write。
|
|
135
|
+
4. 验证失败 → /coding stage deliver 被拒,下一步 Step 被 blocked。
|
|
136
|
+
5. 历史翻页 → 卡片仍显示该轮阶段与验证;重启 Host 后运行时与卡片一致。
|
|
137
|
+
6. 中文提问 → 中文回复(language: auto 且系统语言为中文)。
|
|
138
|
+
7. 新建 Coding 会话 → 空白首页出现工作模式选择;点选后第一条消息按该模式运行。
|
|
139
|
+
8. codex 模式未记录 goal 直接 `coding_stage(plan)` → 被拒,reason 指明先调 `coding_handoff`。
|
|
140
|
+
9. 连续失败到预算 → `coding_stage(deliver)` 放行但状态显示 `BLOCKED`;`/coding reset` 后可重新验证交付。
|
|
141
|
+
10. 把 `verificationTimeoutMs` 设为很小值(如 50)跑一个 sleep 检查 → 验证状态显示超时失败,并计入重试预算。
|
|
142
|
+
11. 让 worker 模型不可用(或把验证命令改成解析不出的值)后派发 → 下一步出现“运行中断”通知(原因 + 处理);修好并再次成功后,状态行不再显示 `failure`。
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
## 7. 调试
|
|
146
|
+
|
|
147
|
+
| 现象 | 排查 |
|
|
148
|
+
| --- | --- |
|
|
149
|
+
| 预设列表没有 Coding | `plugin_manager list_plugins` 看 `include:preset-dsh-coding` 是否 active;`application` 是否 `applied` |
|
|
150
|
+
| 预设激活失败 | 看启动日志;常见原因是 worker 路由配置缺失或 provider 不存在 |
|
|
151
|
+
| 预设列表里仍出现 worker 预设 | `pnpm build` 后**完整重启 DSH**;检查 `installWorkerPresetFilter` 是否执行、`remoteExportList` 是否被二次包装 |
|
|
152
|
+
| 模型说没有某个工具 | 正常:工具表已按阶段裁剪;`/coding` 看当前阶段 |
|
|
153
|
+
| 工具被拒 | reason 含当前阶段、允许阶段与补救动作;reason 也写进胶囊的 `refusal` |
|
|
154
|
+
| 卡片/胶囊都不出现 | 确认会话选中 **Coding** 预设;Host 投影与客户端 bundle 都需完整重启 DSH;用 `Slots.listSubTree` 确认 `conversation.chat.turnTail` 含 `dsh-coding/turn-card` |
|
|
155
|
+
| 插件页面没有配置表单 | `Slots.listSubTree` 的 `plugins.bundle.config` 应含 key `dsh-coding`;页面必须走 `ctx.configForms.get('dsh-coding')` |
|
|
156
|
+
| 中文提问得到英文回复 | 确认 `language`;`auto` 按 DSH 界面 → 系统语言 → 宿主 locale 解析;Host 改动需重启 |
|
|
157
|
+
| 验证命令不对 | 在 `verificationCommands` 里按 `kind` 或 `kind:scope` 覆盖 |
|
|
158
|
+
|
|
159
|
+
## 8. 隔离挂载探针
|
|
160
|
+
|
|
161
|
+
`scripts/mount-probe.mjs` 在临时 `DSH_HOME` 下创建 `base + dsh-coding` 的探测 profile,启动真实 Host,读取预设花名册并像会话控制器一样 `mount` Coding 预设,打印可见工具与 `settings.describe()` 命名空间;不动用户 profile。
|
|
162
|
+
|
|
163
|
+
```bash
|
|
164
|
+
H=/tmp/dsh-probe-home && rm -rf "$H" && mkdir -p "$H/profiles/probe/node_modules"
|
|
165
|
+
cat > "$H/profiles/probe/package.json" <<'JSON'
|
|
166
|
+
{ "name": "dsh-profile-probe", "private": true,
|
|
167
|
+
"dsh": { "profile": { "bundles": ["@deepseek-ai/dsh-base", "dsh-coding"] } },
|
|
168
|
+
"dependencies": { "dsh-coding": "link:/绝对路径/dsh-coding" } }
|
|
169
|
+
JSON
|
|
170
|
+
printf '[]\n' > "$H/profiles/probe/cordis.yml"
|
|
171
|
+
printf '[]\n' > "$H/profiles/probe/cordis.patch.yml"
|
|
172
|
+
ln -sfn /绝对路径/dsh-coding "$H/profiles/probe/node_modules/dsh-coding"
|
|
173
|
+
|
|
174
|
+
DSH_HOME="$H" ELECTRON_RUN_AS_NODE=1 \
|
|
175
|
+
DSH_INSTALL_DIR="/Applications/DeepSeek Harness.app/Contents/Resources/app.asar/dsh" \
|
|
176
|
+
"/Applications/DeepSeek Harness.app/Contents/MacOS/DeepSeek Harness" scripts/mount-probe.mjs
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
探针额外打印三项关键事实:`prompt context coding:language`(语言提示段)、`projection dshCodingStage`(卡片数据源是否注册)、`after agent-preset/selected`(选中 Coding 后投影是否 `active: true`)。
|
|
180
|
+
|
|
181
|
+
## 9. 发布
|
|
182
|
+
|
|
183
|
+
```bash
|
|
184
|
+
pnpm typecheck && pnpm build && pnpm test
|
|
185
|
+
pnpm pack --dry-run # 检查 files 是否包含 lib/locale/docs/icon/patch
|
|
186
|
+
pnpm publish # prepublishOnly 会再跑一遍 typecheck/build/test
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
本地安装调试:`plugin_manager install_bundle` 传工作区绝对路径,或 `dsh plugin --profile <profile> add /绝对路径`。替换已安装版本需先移除再安装(同一路径的 `link:` 会直接读取新产物,但正在运行的 JS 需要重载)。
|
package/icon.svg
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" role="img" aria-label="DSH Coding">
|
|
2
|
-
<rect width="64" height="64" rx="14" fill="#
|
|
3
|
-
<path d="
|
|
4
|
-
<path d="
|
|
5
|
-
<
|
|
2
|
+
<rect width="64" height="64" rx="14" fill="#1f6feb"/>
|
|
3
|
+
<path d="M22 20 12 32l10 12" fill="none" stroke="#fff" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/>
|
|
4
|
+
<path d="m42 20 10 12-10 12" fill="none" stroke="#fff" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/>
|
|
5
|
+
<path d="m36 16-8 32" fill="none" stroke="#9ecbff" stroke-width="4" stroke-linecap="round"/>
|
|
6
6
|
</svg>
|
|
@@ -0,0 +1,268 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Codex-compatible `apply_patch` tool for DSH.
|
|
3
|
+
*
|
|
4
|
+
* It resolves every file first, computes every hunk, then writes. That keeps a
|
|
5
|
+
* stale or ambiguous patch from leaving a half-edited tree behind and gives the
|
|
6
|
+
* model one clear A/M/D summary.
|
|
7
|
+
*/
|
|
8
|
+
import { defineTool } from '@deepseek-ai/dsh-tools';
|
|
9
|
+
import { APPLY_PATCH_DESCRIPTION, applyHunks, parsePatch, } from './patch.js';
|
|
10
|
+
function fail(message) {
|
|
11
|
+
throw new Error(`apply_patch: ${message}`);
|
|
12
|
+
}
|
|
13
|
+
/** Preset children can sit above Host services; the agent scope sees more. */
|
|
14
|
+
function scopesOf(ctx, exec) {
|
|
15
|
+
return [exec?.agent?.ctx, ctx].filter((scope) => scope !== undefined);
|
|
16
|
+
}
|
|
17
|
+
function serviceOf(ctx, exec, name) {
|
|
18
|
+
for (const scope of scopesOf(ctx, exec)) {
|
|
19
|
+
try {
|
|
20
|
+
const service = scope.get?.(name) ?? scope[name];
|
|
21
|
+
if (service !== undefined)
|
|
22
|
+
return service;
|
|
23
|
+
}
|
|
24
|
+
catch {
|
|
25
|
+
// Try the next scope.
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
return undefined;
|
|
29
|
+
}
|
|
30
|
+
function fsOf(ctx, exec) {
|
|
31
|
+
return serviceOf(ctx, exec, 'fs');
|
|
32
|
+
}
|
|
33
|
+
async function sessionCwd(ctx, exec) {
|
|
34
|
+
const workingDirectory = serviceOf(ctx, exec, 'workingDirectory');
|
|
35
|
+
if (exec.agent !== undefined && typeof workingDirectory?.ensure === 'function') {
|
|
36
|
+
try {
|
|
37
|
+
const value = await workingDirectory.ensure(exec.agent, exec.signal);
|
|
38
|
+
if (typeof value === 'string' && value !== '')
|
|
39
|
+
return value;
|
|
40
|
+
}
|
|
41
|
+
catch {
|
|
42
|
+
// The session header remains the fallback.
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
const cwd = exec.agent?.session?.header?.cwd;
|
|
46
|
+
return typeof cwd === 'string' && cwd !== '' ? cwd : undefined;
|
|
47
|
+
}
|
|
48
|
+
function sandboxPolicyOf(ctx, exec) {
|
|
49
|
+
const service = serviceOf(ctx, exec, 'sandboxPolicy');
|
|
50
|
+
if (typeof service?.resolve !== 'function')
|
|
51
|
+
return undefined;
|
|
52
|
+
try {
|
|
53
|
+
return service.resolve(exec.agent === undefined ? {} : { session: exec.agent.session });
|
|
54
|
+
}
|
|
55
|
+
catch {
|
|
56
|
+
return undefined;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
async function resolveTarget(fs, path, cwd, signal) {
|
|
60
|
+
return fs.resolve(path, {
|
|
61
|
+
...(cwd === undefined ? {} : { cwd }),
|
|
62
|
+
signal,
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
async function statFile(fs, target, signal) {
|
|
66
|
+
const info = await fs.stat(target, signal);
|
|
67
|
+
if (info === undefined)
|
|
68
|
+
fail(`file not found: ${target.displayPath}`);
|
|
69
|
+
if (info.type !== 'file')
|
|
70
|
+
fail(`not a regular file: ${target.displayPath}`);
|
|
71
|
+
return info;
|
|
72
|
+
}
|
|
73
|
+
function observe(ctx, target, observation, exec) {
|
|
74
|
+
if (typeof ctx.emit === 'function')
|
|
75
|
+
ctx.emit('fs/observed', target, observation, exec);
|
|
76
|
+
}
|
|
77
|
+
async function intentFor(ctx, target, fallback, exec) {
|
|
78
|
+
if (typeof ctx.waterfall !== 'function')
|
|
79
|
+
return fallback;
|
|
80
|
+
const intent = await ctx.waterfall('fs/write-intent', target, exec, () => fallback);
|
|
81
|
+
return intent ?? fallback;
|
|
82
|
+
}
|
|
83
|
+
async function planPatches(ctx, fs, files, exec, cwd, policy) {
|
|
84
|
+
const plans = [];
|
|
85
|
+
for (const file of files) {
|
|
86
|
+
const target = await resolveTarget(fs, file.path, cwd, exec.signal);
|
|
87
|
+
if (file.kind === 'add') {
|
|
88
|
+
if (await fs.stat(target, exec.signal) !== undefined) {
|
|
89
|
+
fail(`file already exists: ${target.displayPath}`);
|
|
90
|
+
}
|
|
91
|
+
observe(ctx, target, { kind: 'absent' }, exec);
|
|
92
|
+
plans.push({ kind: 'add', path: file.path, target, content: file.content, policy });
|
|
93
|
+
continue;
|
|
94
|
+
}
|
|
95
|
+
const info = await statFile(fs, target, exec.signal);
|
|
96
|
+
observe(ctx, target, { kind: 'present', version: info.version }, exec);
|
|
97
|
+
if (file.kind === 'delete') {
|
|
98
|
+
if (typeof fs.deleteFile !== 'function') {
|
|
99
|
+
fail(`deleting files is not supported by the configured filesystem; delete ${target.displayPath} another way`);
|
|
100
|
+
}
|
|
101
|
+
plans.push({ kind: 'delete', path: file.path, target, version: info.version, policy });
|
|
102
|
+
continue;
|
|
103
|
+
}
|
|
104
|
+
const original = await fs.readText(target, exec.signal);
|
|
105
|
+
const content = file.hunks.length === 0 ? original : applyHunks(original, file.hunks, file.path);
|
|
106
|
+
if (file.moveTo === undefined) {
|
|
107
|
+
plans.push({ kind: 'update', path: file.path, target, version: info.version, content, policy });
|
|
108
|
+
continue;
|
|
109
|
+
}
|
|
110
|
+
const destination = await resolveTarget(fs, file.moveTo, cwd, exec.signal);
|
|
111
|
+
if (destination.targetKey === target.targetKey) {
|
|
112
|
+
plans.push({
|
|
113
|
+
kind: 'update',
|
|
114
|
+
path: file.path,
|
|
115
|
+
target,
|
|
116
|
+
version: info.version,
|
|
117
|
+
content,
|
|
118
|
+
moveTo: file.moveTo,
|
|
119
|
+
policy,
|
|
120
|
+
});
|
|
121
|
+
continue;
|
|
122
|
+
}
|
|
123
|
+
if (await fs.stat(destination, exec.signal) !== undefined) {
|
|
124
|
+
fail(`move destination already exists: ${destination.displayPath}`);
|
|
125
|
+
}
|
|
126
|
+
observe(ctx, destination, { kind: 'absent' }, exec);
|
|
127
|
+
plans.push({
|
|
128
|
+
kind: 'move',
|
|
129
|
+
path: file.path,
|
|
130
|
+
target,
|
|
131
|
+
version: info.version,
|
|
132
|
+
content,
|
|
133
|
+
destination,
|
|
134
|
+
moveTo: file.moveTo,
|
|
135
|
+
policy,
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
return plans;
|
|
139
|
+
}
|
|
140
|
+
async function writePlans(ctx, fs, plans, exec) {
|
|
141
|
+
const applied = [];
|
|
142
|
+
try {
|
|
143
|
+
for (const plan of plans) {
|
|
144
|
+
if (plan.kind === 'add') {
|
|
145
|
+
const intent = await intentFor(ctx, plan.target, { kind: 'createIfAbsent' }, exec);
|
|
146
|
+
const outcome = await fs.writeText(plan.target, plan.content, intent, exec.signal, plan.policy);
|
|
147
|
+
observe(ctx, plan.target, { kind: 'present', version: outcome.version }, exec);
|
|
148
|
+
applied.push({ path: plan.path, operation: 'created' });
|
|
149
|
+
continue;
|
|
150
|
+
}
|
|
151
|
+
if (plan.kind === 'update') {
|
|
152
|
+
const intent = await intentFor(ctx, plan.target, { kind: 'replaceIfVersion', version: plan.version }, exec);
|
|
153
|
+
const outcome = await fs.writeText(plan.target, plan.content, intent, exec.signal, plan.policy);
|
|
154
|
+
observe(ctx, plan.target, { kind: 'present', version: outcome.version }, exec);
|
|
155
|
+
applied.push({
|
|
156
|
+
path: plan.path,
|
|
157
|
+
operation: 'updated',
|
|
158
|
+
...(plan.moveTo === undefined ? {} : { moveTo: plan.moveTo }),
|
|
159
|
+
});
|
|
160
|
+
continue;
|
|
161
|
+
}
|
|
162
|
+
if (plan.kind === 'delete') {
|
|
163
|
+
if (typeof fs.deleteFile !== 'function')
|
|
164
|
+
fail('the filesystem no longer supports deletion');
|
|
165
|
+
await fs.deleteFile(plan.target, { version: plan.version }, exec.signal, plan.policy);
|
|
166
|
+
observe(ctx, plan.target, { kind: 'absent' }, exec);
|
|
167
|
+
applied.push({ path: plan.path, operation: 'deleted' });
|
|
168
|
+
continue;
|
|
169
|
+
}
|
|
170
|
+
if (typeof fs.deleteFile !== 'function')
|
|
171
|
+
fail('the filesystem no longer supports deletion');
|
|
172
|
+
const intent = await intentFor(ctx, plan.destination, { kind: 'createIfAbsent' }, exec);
|
|
173
|
+
const outcome = await fs.writeText(plan.destination, plan.content, intent, exec.signal, plan.policy);
|
|
174
|
+
observe(ctx, plan.destination, { kind: 'present', version: outcome.version }, exec);
|
|
175
|
+
await fs.deleteFile(plan.target, { version: plan.version }, exec.signal, plan.policy);
|
|
176
|
+
observe(ctx, plan.target, { kind: 'absent' }, exec);
|
|
177
|
+
applied.push({ path: plan.path, operation: 'moved', moveTo: plan.moveTo });
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
catch (error) {
|
|
181
|
+
const done = applied.map((file) => `${file.operation} ${file.path}`).join(', ');
|
|
182
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
183
|
+
const text = message.startsWith('apply_patch:') ? message : `apply_patch: ${message}`;
|
|
184
|
+
throw new Error(done === '' ? text : `${text}; already applied: ${done}`);
|
|
185
|
+
}
|
|
186
|
+
return { files: applied };
|
|
187
|
+
}
|
|
188
|
+
/** Parse and apply one Codex-format patch. Exported for focused tests. */
|
|
189
|
+
export async function applyPatchInput(ctx, input, exec) {
|
|
190
|
+
const fs = fsOf(ctx, exec);
|
|
191
|
+
if (fs === undefined)
|
|
192
|
+
fail('the filesystem capability is unavailable');
|
|
193
|
+
const files = parsePatch(input);
|
|
194
|
+
const cwd = await sessionCwd(ctx, exec);
|
|
195
|
+
const policy = sandboxPolicyOf(ctx, exec);
|
|
196
|
+
if (fs.sandboxMode !== undefined && policy === undefined) {
|
|
197
|
+
fail('the sandbox policy service is required for a confined filesystem');
|
|
198
|
+
}
|
|
199
|
+
const plans = await planPatches(ctx, fs, files, exec, cwd, policy);
|
|
200
|
+
return writePlans(ctx, fs, plans, exec);
|
|
201
|
+
}
|
|
202
|
+
export function renderPatchResult(value) {
|
|
203
|
+
const lines = value.files.map((file) => {
|
|
204
|
+
const letter = file.operation === 'created'
|
|
205
|
+
? 'A'
|
|
206
|
+
: file.operation === 'deleted'
|
|
207
|
+
? 'D'
|
|
208
|
+
: 'M';
|
|
209
|
+
const path = file.operation === 'moved'
|
|
210
|
+
? `${file.path} -> ${file.moveTo ?? file.path}`
|
|
211
|
+
: file.path;
|
|
212
|
+
return `${letter} ${path}`;
|
|
213
|
+
});
|
|
214
|
+
return `Success. Updated the following files:\n${lines.join('\n')}\n`;
|
|
215
|
+
}
|
|
216
|
+
/** Register `apply_patch` in an agent scope that has the filesystem service. */
|
|
217
|
+
export function registerApplyPatch(ctx, enabled = () => true) {
|
|
218
|
+
if (typeof ctx?.tools?.register !== 'function')
|
|
219
|
+
return;
|
|
220
|
+
ctx.tools.register(defineTool({
|
|
221
|
+
name: 'apply_patch',
|
|
222
|
+
description: APPLY_PATCH_DESCRIPTION,
|
|
223
|
+
parameters: {
|
|
224
|
+
input: {
|
|
225
|
+
type: 'string',
|
|
226
|
+
required: true,
|
|
227
|
+
description: 'The complete patch text, from "*** Begin Patch" through "*** End Patch".',
|
|
228
|
+
},
|
|
229
|
+
},
|
|
230
|
+
output: {
|
|
231
|
+
schema: {
|
|
232
|
+
type: 'object',
|
|
233
|
+
additionalProperties: false,
|
|
234
|
+
properties: {
|
|
235
|
+
files: {
|
|
236
|
+
type: 'array',
|
|
237
|
+
required: true,
|
|
238
|
+
items: {
|
|
239
|
+
type: 'object',
|
|
240
|
+
additionalProperties: false,
|
|
241
|
+
properties: {
|
|
242
|
+
path: { type: 'string', required: true },
|
|
243
|
+
operation: {
|
|
244
|
+
type: 'string',
|
|
245
|
+
required: true,
|
|
246
|
+
enum: ['created', 'updated', 'deleted', 'moved'],
|
|
247
|
+
},
|
|
248
|
+
moveTo: { type: 'string' },
|
|
249
|
+
},
|
|
250
|
+
},
|
|
251
|
+
},
|
|
252
|
+
},
|
|
253
|
+
},
|
|
254
|
+
render: (_args, value) => [{
|
|
255
|
+
type: 'text',
|
|
256
|
+
text: renderPatchResult(value),
|
|
257
|
+
}],
|
|
258
|
+
},
|
|
259
|
+
async execute(args, exec) {
|
|
260
|
+
if (!enabled())
|
|
261
|
+
throw new Error('apply_patch: disabled by Coding settings');
|
|
262
|
+
if (typeof args?.input !== 'string' || args.input.trim() === '') {
|
|
263
|
+
throw new Error('apply_patch: input must be a non-empty patch string');
|
|
264
|
+
}
|
|
265
|
+
return applyPatchInput(ctx, args.input, exec);
|
|
266
|
+
},
|
|
267
|
+
}));
|
|
268
|
+
}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Stage capsule rendered in the Chat flow at each Coding tool call.
|
|
3
|
+
*
|
|
4
|
+
* It shows the state the runtime recorded — mode, stage path, verification,
|
|
5
|
+
* plan, worker, pending call, refusal — and nothing else. There is no control
|
|
6
|
+
* here: mode and stage changes re-enter the agent through `/coding`, which
|
|
7
|
+
* delivers them with `agent.followup()` / `agent.steer()`.
|
|
8
|
+
*
|
|
9
|
+
* The capsule is one plain status line at DSH's caption size; it deliberately
|
|
10
|
+
* avoids chips, pills, and custom colors, and uses only the shipped classes
|
|
11
|
+
* from `./styles.ts`.
|
|
12
|
+
*
|
|
13
|
+
* @module dsh-coding/client/capsule
|
|
14
|
+
*/
|
|
15
|
+
import { createElement as h, memo } from 'react';
|
|
16
|
+
/** The forward stage order every capsule renders against. */
|
|
17
|
+
const ALL_STAGES = ['requirements', 'plan', 'implement', 'verify', 'deliver'];
|
|
18
|
+
/**
|
|
19
|
+
* One turn's Coding stage capsule.
|
|
20
|
+
* @param props - Chat renderer props and the `dsh-coding` translate seat.
|
|
21
|
+
*/
|
|
22
|
+
export const CodingStageCapsule = memo(function CodingStageCapsule({ node, t }) {
|
|
23
|
+
const data = node.data;
|
|
24
|
+
const checkpoint = data.checkpoint;
|
|
25
|
+
const admitted = checkpoint?.allowedStages ?? ALL_STAGES;
|
|
26
|
+
const activeIndex = admitted.indexOf(data.stage);
|
|
27
|
+
const children = [
|
|
28
|
+
h('span', {
|
|
29
|
+
key: 'mode',
|
|
30
|
+
className: 'dsh-coding-faint',
|
|
31
|
+
'data-mode': data.mode,
|
|
32
|
+
// The card owns switching; the capsule only states the current mode.
|
|
33
|
+
title: t('hint.mode'),
|
|
34
|
+
}, t(`mode.${data.mode}`)),
|
|
35
|
+
h('span', { key: 'mode-sep', className: 'dsh-coding-faint', 'aria-hidden': 'true' }, '·'),
|
|
36
|
+
];
|
|
37
|
+
for (const [index, stage] of ALL_STAGES.entries()) {
|
|
38
|
+
if (index > 0) {
|
|
39
|
+
children.push(h('span', { key: `arrow-${stage}`, className: 'dsh-coding-arrow', 'aria-hidden': 'true' }, '→'));
|
|
40
|
+
}
|
|
41
|
+
const stageIndex = admitted.indexOf(stage);
|
|
42
|
+
const isActive = stage === data.stage;
|
|
43
|
+
children.push(h('span', {
|
|
44
|
+
key: stage,
|
|
45
|
+
className: 'dsh-coding-stage',
|
|
46
|
+
'data-stage': stage,
|
|
47
|
+
...isActive ? { 'data-active': 'true', 'data-current': 'true' } : {},
|
|
48
|
+
...stageIndex >= 0 && activeIndex >= 0 && stageIndex < activeIndex ? { 'data-done': 'true' } : {},
|
|
49
|
+
}, t(`stage.${stage}`)));
|
|
50
|
+
}
|
|
51
|
+
const verification = checkpoint?.verification;
|
|
52
|
+
children.push(h('span', { key: 'verify-sep', className: 'dsh-coding-faint', 'aria-hidden': 'true' }, '·'));
|
|
53
|
+
if (verification !== undefined) {
|
|
54
|
+
children.push(h('span', {
|
|
55
|
+
key: 'verification',
|
|
56
|
+
className: verification.passed ? 'dsh-coding-success' : 'dsh-coding-warn',
|
|
57
|
+
title: verification.command,
|
|
58
|
+
'data-verification': verification.passed ? 'passed' : 'failed',
|
|
59
|
+
}, t(verification.passed ? 'verification.passed' : 'verification.failed')));
|
|
60
|
+
}
|
|
61
|
+
else {
|
|
62
|
+
children.push(h('span', {
|
|
63
|
+
key: 'verification',
|
|
64
|
+
className: 'dsh-coding-faint',
|
|
65
|
+
'data-verification': 'none',
|
|
66
|
+
}, t('verification.none')));
|
|
67
|
+
}
|
|
68
|
+
if (checkpoint !== undefined && checkpoint.planItems > 0) {
|
|
69
|
+
const done = checkpoint.planItems - checkpoint.openPlanItems;
|
|
70
|
+
children.push(h('span', {
|
|
71
|
+
key: 'plan',
|
|
72
|
+
className: 'dsh-coding-muted',
|
|
73
|
+
'data-plan': String(checkpoint.planItems),
|
|
74
|
+
}, t('plan.progress', { done, total: checkpoint.planItems })));
|
|
75
|
+
}
|
|
76
|
+
if (checkpoint !== undefined && checkpoint.edits > 0) {
|
|
77
|
+
children.push(h('span', {
|
|
78
|
+
key: 'files',
|
|
79
|
+
className: 'dsh-coding-muted',
|
|
80
|
+
}, t('files', { count: checkpoint.edits })));
|
|
81
|
+
}
|
|
82
|
+
const worker = checkpoint?.worker;
|
|
83
|
+
if (worker !== undefined) {
|
|
84
|
+
const label = worker.status === 'running'
|
|
85
|
+
? 'worker.running'
|
|
86
|
+
: worker.status === 'completed' ? 'worker.completed' : 'worker.failed';
|
|
87
|
+
children.push(h('span', {
|
|
88
|
+
key: 'worker',
|
|
89
|
+
className: worker.status === 'failed' ? 'dsh-coding-warn' : 'dsh-coding-muted',
|
|
90
|
+
'data-worker': worker.status,
|
|
91
|
+
}, t(label, { role: worker.role })));
|
|
92
|
+
}
|
|
93
|
+
if (data.pending !== undefined) {
|
|
94
|
+
children.push(h('span', {
|
|
95
|
+
key: 'pending',
|
|
96
|
+
className: 'dsh-coding-muted',
|
|
97
|
+
'data-pending': data.pending.tool,
|
|
98
|
+
}, t('pending', { tool: data.pending.requested === undefined
|
|
99
|
+
? data.pending.tool
|
|
100
|
+
: `${data.pending.tool} → ${data.pending.requested}` })));
|
|
101
|
+
}
|
|
102
|
+
const refusal = checkpoint?.refusal;
|
|
103
|
+
if (refusal !== undefined) {
|
|
104
|
+
children.push(h('span', {
|
|
105
|
+
key: 'refusal',
|
|
106
|
+
className: 'dsh-coding-warn',
|
|
107
|
+
title: refusal.reason,
|
|
108
|
+
'data-refusal': refusal.target,
|
|
109
|
+
}, `${t('refused')}: ${refusal.target}`));
|
|
110
|
+
}
|
|
111
|
+
return h('div', {
|
|
112
|
+
className: 'dsh-coding-capsule',
|
|
113
|
+
role: 'group',
|
|
114
|
+
'aria-label': t('aria'),
|
|
115
|
+
'data-coding-capsule': '',
|
|
116
|
+
'data-stage': data.stage,
|
|
117
|
+
'data-mode': data.mode,
|
|
118
|
+
...data.partial ? { 'data-partial': 'true' } : {},
|
|
119
|
+
}, ...children);
|
|
120
|
+
});
|