dsh-paoding 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/README_en.md +1 -1
- package/docs/installation.md +4 -4
- package/docs/installation_en.md +3 -3
- package/package.json +1 -1
- package/plugins/paoding-config-ui/lib/base.css +18 -1
- package/plugins/paoding-config-ui/lib/client.js +22 -5
- package/plugins/paoding-config-ui/package.json +1 -1
package/README.md
CHANGED
|
@@ -44,7 +44,7 @@ npx github:lifangjin/dsh-paoding # 发布前从 GitHub 仓库直装,效果
|
|
|
44
44
|
|
|
45
45
|
这一条等价于 `--auto --config-ui`:生成编排预设、写好基础配置模板,并把「庖丁配置」挂进 DSH 设置页。开箱默认只带 DSH 自带的基础工具,检测到的 MCP/host 工具不会自动写入——装完在**设置 → 庖丁配置**里按需勾选工具与角色,「保存并应用」即生效;想逐项过一遍就跑 `npx dsh-paoding --wizard`,想沿用自动分配就加 `--suggest`。
|
|
46
46
|
|
|
47
|
-
偏好官方插件通道的话,`dsh plugin --profile web add dsh-paoding@
|
|
47
|
+
偏好官方插件通道的话,`dsh plugin --profile web add dsh-paoding@latest` 也能把「庖丁配置」按 profile 装进设置页(preset 本体仍走 npx / `./install.sh`),详见[安装文档](docs/installation.md)。
|
|
48
48
|
|
|
49
49
|
**克隆仓库安装**——老路线原样保留:
|
|
50
50
|
|
package/README_en.md
CHANGED
|
@@ -44,7 +44,7 @@ npx github:lifangjin/dsh-paoding # before publishing: runs straight from GitHu
|
|
|
44
44
|
|
|
45
45
|
This one command equals `--auto --config-ui`: it generates the orchestrator preset, writes the base config template, and mounts the config UI into the DSH Settings page. Out of the box the template only carries DSH's built-in base tools — detected MCP/host tools are not written in automatically. After installing, pick the tools and roles you need in **Settings → 庖丁配置 (Paoding Config)** and hit Save & Apply, or run `npx dsh-paoding --wizard` for a guided pass; add `--suggest` if you prefer the old auto-assignment.
|
|
46
46
|
|
|
47
|
-
If you prefer the official plugin channel, `dsh plugin --profile web add dsh-paoding@
|
|
47
|
+
If you prefer the official plugin channel, `dsh plugin --profile web add dsh-paoding@latest` installs the Paoding Config UI into Settings, scoped per profile (the preset itself still comes from npx / `./install.sh`) — see the [installation guide](docs/installation_en.md).
|
|
48
48
|
|
|
49
49
|
**Clone and install** — the classic route, unchanged:
|
|
50
50
|
|
package/docs/installation.md
CHANGED
|
@@ -72,7 +72,7 @@ npm 包与命令同名:包 `dsh-paoding`,命令 `dsh-paoding`。这条默认
|
|
|
72
72
|
npx 之外,配置 UI 还能走 DSH 的官方插件通道单独安装:
|
|
73
73
|
|
|
74
74
|
```bash
|
|
75
|
-
dsh plugin --profile web add dsh-paoding@
|
|
75
|
+
dsh plugin --profile web add dsh-paoding@latest
|
|
76
76
|
```
|
|
77
77
|
|
|
78
78
|
装完**重启 DSH(`dsh web`)**,设置页出现「庖丁配置」;卸载用 `dsh plugin --profile web remove dsh-paoding`。机制一句话:npm 包 `dsh-paoding` 在包根声明了 `dsh.bundle.patch`(一份 `cordis.patch.yml`,一行 insert:`id: paoding-config-ui` / `name: dsh-paoding`),安装后由 `reconcilePlugins` 自动并入该 profile 的启动层——与 npx 通道是同一个 npm 包,只是两种装法。
|
|
@@ -80,7 +80,7 @@ dsh plugin --profile web add dsh-paoding@0.2.0
|
|
|
80
80
|
**这条通道只装 UI 这一件**(机制所限,编排 preset 与配置文件装不了,preset 那半边走 npx / `./install.sh`),想两步装齐全就这样搭配:
|
|
81
81
|
|
|
82
82
|
```bash
|
|
83
|
-
dsh plugin --profile web add dsh-paoding@
|
|
83
|
+
dsh plugin --profile web add dsh-paoding@latest # 配置 UI,只在指定 profile 生效
|
|
84
84
|
npx dsh-paoding@latest --no-ui # 编排 preset + 配置模板,--no-ui 防止 UI 重复挂载
|
|
85
85
|
```
|
|
86
86
|
|
|
@@ -290,7 +290,7 @@ cd dsh-paoding
|
|
|
290
290
|
|
|
291
291
|
从 npx/npm 入口安装时没有仓库目录可链:安装器改为把整包复制到 `$DSH_HOME/dsh-paoding`(见第 2 节),再从那里挂载;只有克隆仓库跑 `./install.sh` 才走上面的符号链接直连。两种形态对 DSH 都是同一个 `paoding-config-ui` 包,下一节的加载机制完全一致。
|
|
292
292
|
|
|
293
|
-
除了 `--config-ui`,还有一条路通向同一个分区:DSH 官方插件通道 `dsh plugin --profile web add dsh-paoding@
|
|
293
|
+
除了 `--config-ui`,还有一条路通向同一个分区:DSH 官方插件通道 `dsh plugin --profile web add dsh-paoding@latest`,只装 UI、按 profile 生效(详见第 2 节)。它与这里的全局挂载勿并存,否则设置页会出现重复的「庖丁配置」。
|
|
294
294
|
|
|
295
295
|
### 加载机制
|
|
296
296
|
|
|
@@ -305,7 +305,7 @@ cd dsh-paoding
|
|
|
305
305
|
|
|
306
306
|
### 面板能力
|
|
307
307
|
|
|
308
|
-
-
|
|
308
|
+
- **状态与操作**:检测摘要与 chips(当前 profile、每个 MCP 服务器及工具数、插件 chips、技能数等);操作按钮「**保存并应用**」「预览生成」「重新检测」固定在面板底部悬浮操作坞(sticky bottom),滚动任意位置都可直接点击。
|
|
309
309
|
- **Agent 工具分配卡片**:主 agent 一张固定卡(基础工具取消勾选 = 加入 `main_agent_remove` 从主 agent 剔除;Host 工具勾选 = 加入 `main_agent_extra`;技能「read 按需」与「内联全文」两组勾选;另有「人设追加」编辑区,可改、清空、恢复默认)+ `search_external` / `design` / `implement` 三张内置角色卡 + 任意自定义角色卡(带删除按钮);每张角色卡可勾选/取消基础工具与 Host 工具、编辑 persona。底部「新建自定义 agent 角色」。
|
|
310
310
|
- **技能分配**:每个 skill 一行,勾选分配给哪些 agent(写入对应 persona 的 `Available skills` 软引导;角色技能软引导,主 agent 技能另有 read 按需/内联两组)。
|
|
311
311
|
- **预览生成**:不写盘生成 `agent.cordis.yml`,显示每个角色 allow 的 intent → kept 计数与生成全文。
|
package/docs/installation_en.md
CHANGED
|
@@ -72,7 +72,7 @@ When it finishes, **restart DSH (`dsh web`)**; the remaining steps are covered i
|
|
|
72
72
|
Besides npx, the config UI can also be installed on its own through DSH's official plugin channel:
|
|
73
73
|
|
|
74
74
|
```bash
|
|
75
|
-
dsh plugin --profile web add dsh-paoding@
|
|
75
|
+
dsh plugin --profile web add dsh-paoding@latest
|
|
76
76
|
```
|
|
77
77
|
|
|
78
78
|
Restart DSH (`dsh web`) afterwards and the「庖丁配置」(Paoding Config) section appears in Settings; uninstall with `dsh plugin --profile web remove dsh-paoding`. The mechanism in one line: the `dsh-paoding` npm package declares a `dsh.bundle.patch` at its root (a `cordis.patch.yml` with one insert row, `id: paoding-config-ui` / `name: dsh-paoding`), and `reconcilePlugins` folds it into that profile's startup layer — the same npm package as the npx channel, just a second way to install it.
|
|
@@ -80,7 +80,7 @@ Restart DSH (`dsh web`) afterwards and the「庖丁配置」(Paoding Config) sec
|
|
|
80
80
|
**This channel carries the UI only** (by design it cannot install the orchestrator preset or the config file — that half goes through npx / `./install.sh`), so the full setup takes two steps:
|
|
81
81
|
|
|
82
82
|
```bash
|
|
83
|
-
dsh plugin --profile web add dsh-paoding@
|
|
83
|
+
dsh plugin --profile web add dsh-paoding@latest # the config UI, effective in the given profile only
|
|
84
84
|
npx dsh-paoding@latest --no-ui # the preset + config template; --no-ui avoids mounting the UI twice
|
|
85
85
|
```
|
|
86
86
|
|
|
@@ -293,7 +293,7 @@ Then **restart DSH (`dsh web`)**; the "庖丁配置" (Paoding Config) section ap
|
|
|
293
293
|
|
|
294
294
|
On the npx/npm entry there is no repository directory to link: the installer instead copies the whole package to `$DSH_HOME/dsh-paoding` (see §2) and mounts from there; only the clone-and-run-`./install.sh` route uses the symlink shown above. Both forms present the same `paoding-config-ui` package to DSH, so the loading mechanism in the next subsection is identical.
|
|
295
295
|
|
|
296
|
-
Another route to the same section is DSH's official plugin channel: `dsh plugin --profile web add dsh-paoding@
|
|
296
|
+
Another route to the same section is DSH's official plugin channel: `dsh plugin --profile web add dsh-paoding@latest` installs the UI on its own, per profile (see §2). Don't keep that mount side by side with `--config-ui`'s global one, or the Settings page ends up with a duplicate Paoding Config section.
|
|
297
297
|
|
|
298
298
|
### Loading mechanism
|
|
299
299
|
|
package/package.json
CHANGED
|
@@ -98,11 +98,28 @@
|
|
|
98
98
|
color: var(--dsw-alias-state-error-primary);
|
|
99
99
|
}
|
|
100
100
|
|
|
101
|
-
|
|
101
|
+
/* Sticky bottom action dock: keeps the primary buttons reachable at the
|
|
102
|
+
bottom of the scroll container while the user edits lower groups. */
|
|
103
|
+
.omd-actionBar {
|
|
104
|
+
position: sticky;
|
|
105
|
+
bottom: 8px;
|
|
106
|
+
z-index: 6;
|
|
102
107
|
display: flex;
|
|
103
108
|
flex-wrap: wrap;
|
|
104
109
|
gap: 8px;
|
|
105
110
|
align-items: center;
|
|
111
|
+
padding: 10px 12px;
|
|
112
|
+
box-sizing: border-box;
|
|
113
|
+
border: 1px solid var(--dsw-alias-border-l2);
|
|
114
|
+
border-radius: 14px;
|
|
115
|
+
background: var(--dsw-alias-bg-layer-3);
|
|
116
|
+
box-shadow: 0 8px 24px -12px rgba(0, 0, 0, 0.35);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/* 主操作(保存并应用)推到操作坞最右;窄屏换行时落到次行右缘。 */
|
|
120
|
+
.omd-applyDock {
|
|
121
|
+
margin-left: auto;
|
|
122
|
+
display: inline-flex;
|
|
106
123
|
}
|
|
107
124
|
|
|
108
125
|
.omd-chips {
|
|
@@ -31,7 +31,7 @@ window.__ModuleLoader__.load({
|
|
|
31
31
|
|
|
32
32
|
var React = require("react");
|
|
33
33
|
var h = React.createElement;
|
|
34
|
-
var useState = React.useState, useEffect = React.useEffect, useCallback = React.useCallback;
|
|
34
|
+
var useState = React.useState, useEffect = React.useEffect, useCallback = React.useCallback, useRef = React.useRef;
|
|
35
35
|
var P = require("@deepseek-ai/dsh-client-ui-primitives");
|
|
36
36
|
|
|
37
37
|
// ── 样式注入(幂等)─────────────────────────────────────────────────
|
|
@@ -267,6 +267,9 @@ window.__ModuleLoader__.load({
|
|
|
267
267
|
var _mg = useState(null), modelGroups = _mg[0], setModelGroups = _mg[1]; // 模型目录 groups(/api/paoding/models)
|
|
268
268
|
var _mgok = useState(false), modelGroupsOk = _mgok[0], setModelGroupsOk = _mgok[1]; // 目录可用 = 下拉模式;false = 降级双 input
|
|
269
269
|
var _mgerr = useState(""), modelGroupsErr = _mgerr[0], setModelGroupsErr = _mgerr[1]; // 目录拉取失败原因(降级 hint 一句话展示)
|
|
270
|
+
var rootRef = useRef(null); // 面板根节点(重新检测后回顶用)
|
|
271
|
+
var previewRef = useRef(null); // 预览生成组根节点(条件渲染,预览成功后定位用)
|
|
272
|
+
var _sr = useState(null), scrollReq = _sr[0], setScrollReq = _sr[1]; // 滚动请求:"preview" | "top" | null
|
|
270
273
|
|
|
271
274
|
var api = useCallback(function (path, body) {
|
|
272
275
|
var opts = body === undefined ? {} : {
|
|
@@ -357,6 +360,14 @@ window.__ModuleLoader__.load({
|
|
|
357
360
|
|
|
358
361
|
useEffect(loadModels, [loadModels]);
|
|
359
362
|
|
|
363
|
+
// 滚动请求:preview 需等条件渲染挂载后生效(effect 在 commit 后运行),top 立即生效。
|
|
364
|
+
useEffect(function () {
|
|
365
|
+
if (!scrollReq) return;
|
|
366
|
+
var el = scrollReq === "preview" ? previewRef.current : rootRef.current;
|
|
367
|
+
if (el && el.scrollIntoView) el.scrollIntoView({ behavior: "smooth", block: "start" });
|
|
368
|
+
setScrollReq(null);
|
|
369
|
+
}, [scrollReq, preview]);
|
|
370
|
+
|
|
360
371
|
function setRoleTools(name, tool, on) {
|
|
361
372
|
setAssign(function (prev) {
|
|
362
373
|
var next = JSON.parse(JSON.stringify(prev));
|
|
@@ -511,6 +522,7 @@ window.__ModuleLoader__.load({
|
|
|
511
522
|
setPreview(null);
|
|
512
523
|
api("preview", { assignments: assign }).then(function (r) {
|
|
513
524
|
setPreview(r);
|
|
525
|
+
setScrollReq("preview"); // 预览成功后自动滚动定位到预览生成区
|
|
514
526
|
setNote("");
|
|
515
527
|
}).catch(function (err) { setError(err.message); }).finally(function () {
|
|
516
528
|
setBusy(false);
|
|
@@ -537,6 +549,7 @@ window.__ModuleLoader__.load({
|
|
|
537
549
|
function doRescan() {
|
|
538
550
|
setBusy(true);
|
|
539
551
|
setBusyOp("rescan");
|
|
552
|
+
setScrollReq("top"); // 立即滚动回面板顶部看状态说明(不等接口返回)
|
|
540
553
|
api("rescan", {}).then(function (d) {
|
|
541
554
|
setData(d);
|
|
542
555
|
setAssign(buildAssignments(d));
|
|
@@ -1051,7 +1064,7 @@ window.__ModuleLoader__.load({
|
|
|
1051
1064
|
|
|
1052
1065
|
var pluginChips = data ? pluginChipsOf(data) : { primary: [], secondary: [] };
|
|
1053
1066
|
|
|
1054
|
-
return h("div", { className: "omd-section" },
|
|
1067
|
+
return h("div", { className: "omd-section", ref: rootRef },
|
|
1055
1068
|
h("p", { className: "omd-intro" }, INTRO),
|
|
1056
1069
|
|
|
1057
1070
|
// 状态与操作
|
|
@@ -1061,7 +1074,6 @@ window.__ModuleLoader__.load({
|
|
|
1061
1074
|
h("span", null, "状态与操作")),
|
|
1062
1075
|
statusBarOf(),
|
|
1063
1076
|
runtimeNoteOf(data),
|
|
1064
|
-
h("div", { className: "omd-actions" }, applyBtn, previewBtn, rescanBtn),
|
|
1065
1077
|
h("div", { className: "omd-chips" },
|
|
1066
1078
|
h(P.Pill, null, "profile " + (data.effectiveProfile || "web")),
|
|
1067
1079
|
(data.mcpReports || []).map(function (m) {
|
|
@@ -1116,7 +1128,7 @@ window.__ModuleLoader__.load({
|
|
|
1116
1128
|
skillsBlock()),
|
|
1117
1129
|
|
|
1118
1130
|
// 预览生成(预览成功后才出现)
|
|
1119
|
-
preview ? h("div", { className: "omd-group" },
|
|
1131
|
+
preview ? h("div", { className: "omd-group", ref: previewRef },
|
|
1120
1132
|
h("div", { className: "omd-groupHeading" },
|
|
1121
1133
|
h("span", { className: "omd-groupIcon" }, ic(P.IconDataOutline16, 14)),
|
|
1122
1134
|
h("span", null, "预览生成")),
|
|
@@ -1124,7 +1136,12 @@ window.__ModuleLoader__.load({
|
|
|
1124
1136
|
"✅ 生成成功(未写盘)" + (preview.roleResults || []).map(function (r) {
|
|
1125
1137
|
return " · " + r.role + ": " + r.intent.length + " → " + r.kept.length;
|
|
1126
1138
|
}).join("")),
|
|
1127
|
-
h("pre", { className: "omd-pre" }, preview.text)) : null
|
|
1139
|
+
h("pre", { className: "omd-pre" }, preview.text)) : null,
|
|
1140
|
+
|
|
1141
|
+
// 悬浮操作坞(sticky bottom:按钮常驻滚动容器底部,改完配置无需滚回顶部再操作)
|
|
1142
|
+
h("div", { className: "omd-actionBar" },
|
|
1143
|
+
previewBtn, rescanBtn,
|
|
1144
|
+
h("span", { className: "omd-applyDock" }, applyBtn)));
|
|
1128
1145
|
}
|
|
1129
1146
|
|
|
1130
1147
|
// ── cordis client 插件:注册到设置页 settings.section 槽位 ──────────────
|