@cannbot-plugin/cannbot-harness 0.1.4 → 0.1.5
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 +12 -11
- package/lib/client.js +8 -137
- package/lib/client.js.map +1 -1
- package/lib/index.js +3 -8
- package/locale/en.json +1 -1
- package/locale/zh.json +1 -1
- package/package.json +2 -3
package/README.md
CHANGED
|
@@ -5,11 +5,11 @@ Windows 桌面端和 Linux Web 端使用同一个 `.tgz` 安装包。
|
|
|
5
5
|
|
|
6
6
|
## 使用
|
|
7
7
|
|
|
8
|
-
-
|
|
9
|
-
-
|
|
8
|
+
- 在 DSH 的插件页面启用 **CANNBot Harness**:立即显示品牌、红白主题和工作流选择,同时挂载 40 个 Skills。
|
|
9
|
+
- 左下角没有额外开关;界面跟随插件本身的启用状态,早期版本保存的界面关闭偏好不再影响显示。
|
|
10
10
|
- 选择工作目录,在 **选择工作流 → 算子开发工作流** 中点击一次,输入框会填入 `/ops-direct-invoke `。
|
|
11
11
|
继续输入需求,然后手动发送。已有正文、引用和附件不会被替换;重复选择不重复添加命令。
|
|
12
|
-
- 在 DSH
|
|
12
|
+
- 在 DSH 的插件页面停用 **CANNBot Harness**:恢复原版界面和模式选择,同时卸载 Skills;重新启用后界面与 Skills 一起恢复。
|
|
13
13
|
- 本插件不提供 SSH 或远程连接控件。Linux 用户通过 DSH 自身的 Web 界面访问服务。
|
|
14
14
|
|
|
15
15
|
## 安装
|
|
@@ -24,13 +24,13 @@ Windows 桌面端和 Linux Web 端使用同一个 `.tgz` 安装包。
|
|
|
24
24
|
Windows 桌面端先正常退出 DSH,再用 DSH 自带的 CLI 安装:
|
|
25
25
|
|
|
26
26
|
```powershell
|
|
27
|
-
dsh plugin --profile desktop add @cannbot-plugin/cannbot-harness@0.1.
|
|
27
|
+
dsh plugin --profile desktop add @cannbot-plugin/cannbot-harness@0.1.5
|
|
28
28
|
```
|
|
29
29
|
|
|
30
30
|
Linux 使用运行 DSH 的同一用户安装,随后启动对应配置:
|
|
31
31
|
|
|
32
32
|
```bash
|
|
33
|
-
dsh plugin --profile web add @cannbot-plugin/cannbot-harness@0.1.
|
|
33
|
+
dsh plugin --profile web add @cannbot-plugin/cannbot-harness@0.1.5
|
|
34
34
|
dsh web --no-open
|
|
35
35
|
```
|
|
36
36
|
|
|
@@ -44,12 +44,12 @@ dsh plugin --profile <你的配置名> remove @cannbot/dsh-harness
|
|
|
44
44
|
|
|
45
45
|
### Windows 桌面端
|
|
46
46
|
|
|
47
|
-
在原版 DSH 的 **插件 → 添加插件** 中安装本地文件 `cannbot-plugin-cannbot-harness-0.1.
|
|
47
|
+
在原版 DSH 的 **插件 → 添加插件** 中安装本地文件 `cannbot-plugin-cannbot-harness-0.1.5.tgz`。
|
|
48
48
|
安装后启用 **CANNBot Harness**。如果当前 DSH 提示需要重启,正常退出并重新打开 DSH。
|
|
49
49
|
也可先完全退出 DSH,再用 DSH 自带的 CLI:
|
|
50
50
|
|
|
51
51
|
```powershell
|
|
52
|
-
dsh plugin --profile desktop add "C:\Downloads\cannbot-plugin-cannbot-harness-0.1.
|
|
52
|
+
dsh plugin --profile desktop add "C:\Downloads\cannbot-plugin-cannbot-harness-0.1.5.tgz"
|
|
53
53
|
```
|
|
54
54
|
|
|
55
55
|
### Linux 浏览器端
|
|
@@ -57,7 +57,7 @@ dsh plugin --profile desktop add "C:\Downloads\cannbot-plugin-cannbot-harness-0.
|
|
|
57
57
|
先安装原版 DSH,再将安装包放到服务器上,以运行 DSH 的同一用户执行:
|
|
58
58
|
|
|
59
59
|
```bash
|
|
60
|
-
dsh plugin --profile web add /path/to/cannbot-plugin-cannbot-harness-0.1.
|
|
60
|
+
dsh plugin --profile web add /path/to/cannbot-plugin-cannbot-harness-0.1.5.tgz
|
|
61
61
|
dsh web --no-open
|
|
62
62
|
```
|
|
63
63
|
|
|
@@ -68,9 +68,10 @@ DSH 的浏览器访问、认证、绑定地址及模型配置仍按原版方式
|
|
|
68
68
|
## 实现
|
|
69
69
|
|
|
70
70
|
`dsh.bundle` 声明标准 Bundle,`cordis.patch.yml` 仅插入本插件的一行。
|
|
71
|
-
Node 半区通过官方 `FileSystemSkillProvider` 挂载随包 Skills
|
|
72
|
-
Browser 半区使用原有品牌插槽、`conversation.hero.agentPreset
|
|
73
|
-
|
|
71
|
+
Node 半区通过官方 `FileSystemSkillProvider` 挂载随包 Skills。
|
|
72
|
+
Browser 半区使用原有品牌插槽、`conversation.hero.agentPreset` 和主题覆盖 API。
|
|
73
|
+
插件启用时直接挂载界面;停用时撤销插槽和主题覆盖,原版控件一直保留在下层,不改写 DSH 核心文件。
|
|
74
|
+
工作流图标直接复用 DSH 标准模式使用的 `IconAgentPresetOutlineRegular`。
|
|
74
75
|
工作流选择调用 DSH 的 `inputActions.insertText`,在当前草稿第一个位置插入命令,并保留引用和附件;不自动提交。
|
|
75
76
|
|
|
76
77
|
首页标题的样式规则仅以本插件的品牌插槽标记为锚点,隐藏旁边的原版标语;不依赖 DSH 私有 CSS 类名。
|
package/lib/client.js
CHANGED
|
@@ -4,42 +4,27 @@ window.__ModuleLoader__.load({
|
|
|
4
4
|
var module = { exports: {} };
|
|
5
5
|
var exports = module.exports;
|
|
6
6
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
7
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
7
8
|
let react = require("react");
|
|
8
9
|
let _deepseek_ai_dsh_client_ui_primitives = require("@deepseek-ai/dsh-client-ui-primitives");
|
|
9
|
-
let react_jsx_runtime = require("react/jsx-runtime");
|
|
10
10
|
//#region src/client/locales.ts
|
|
11
11
|
const PRODUCT = "CANNBot Harness";
|
|
12
12
|
const NAMESPACE = "cannbotHarness";
|
|
13
|
-
const SETTINGS_ID = "cannbot-harness";
|
|
14
13
|
const PACKAGE = "@cannbot-plugin/cannbot-harness";
|
|
15
14
|
const COMMAND = "/ops-direct-invoke";
|
|
16
15
|
const zh = {
|
|
17
|
-
interface: "CANNBot Harness 界面",
|
|
18
|
-
on: "已开启",
|
|
19
|
-
off: "原版 DSH 界面",
|
|
20
|
-
saving: "正在保存…",
|
|
21
|
-
description: "切换界面后,算子 Skills 仍可使用。",
|
|
22
|
-
saveFailed: "切换未成功,请重试。",
|
|
23
16
|
workflow: "选择工作流",
|
|
24
17
|
operator: "算子开发工作流",
|
|
25
18
|
commandHint: "填入 /ops-direct-invoke,由你补充需求后发送。",
|
|
26
19
|
chooseWorkspace: "请先选择工作目录。",
|
|
27
|
-
insertFailed: "输入框正在处理其他操作,请稍后重试。"
|
|
28
|
-
unavailable: "当前连接无法修改界面设置。"
|
|
20
|
+
insertFailed: "输入框正在处理其他操作,请稍后重试。"
|
|
29
21
|
};
|
|
30
22
|
const en = {
|
|
31
|
-
interface: "CANNBot Harness interface",
|
|
32
|
-
on: "Enabled",
|
|
33
|
-
off: "Original DSH interface",
|
|
34
|
-
saving: "Saving…",
|
|
35
|
-
description: "Operator Skills remain available with either interface.",
|
|
36
|
-
saveFailed: "Could not switch the interface. Please retry.",
|
|
37
23
|
workflow: "Choose workflow",
|
|
38
24
|
operator: "Operator development workflow",
|
|
39
25
|
commandHint: "Insert /ops-direct-invoke, add your requirements, then send.",
|
|
40
26
|
chooseWorkspace: "Choose a working directory first.",
|
|
41
|
-
insertFailed: "The composer is busy. Please retry."
|
|
42
|
-
unavailable: "Interface settings cannot be changed through this connection."
|
|
27
|
+
insertFailed: "The composer is busy. Please retry."
|
|
43
28
|
};
|
|
44
29
|
//#endregion
|
|
45
30
|
//#region src/client/Brand.tsx
|
|
@@ -81,88 +66,10 @@ window.__ModuleLoader__.load({
|
|
|
81
66
|
});
|
|
82
67
|
}
|
|
83
68
|
//#endregion
|
|
84
|
-
//#region src/client/InterfaceToggle.tsx
|
|
85
|
-
function ToggleControl({ useHarnessSettings, setEnabled, t, compact = false }) {
|
|
86
|
-
const settings = useHarnessSettings((value) => value);
|
|
87
|
-
const [busy, setBusy] = (0, react.useState)(false);
|
|
88
|
-
const [failed, setFailed] = (0, react.useState)(false);
|
|
89
|
-
const ready = settings.status === "ready" && settings.writable;
|
|
90
|
-
const enabled = settings.value?.interfaceEnabled === true;
|
|
91
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
92
|
-
className: "cannbot-harness-toggle",
|
|
93
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
94
|
-
className: `cannbot-harness-toggle-line${compact ? " cannbot-harness-toggle-compact" : ""}`,
|
|
95
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Tooltip, {
|
|
96
|
-
label: t("interface"),
|
|
97
|
-
side: "right",
|
|
98
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
99
|
-
className: "cannbot-harness-toggle-name",
|
|
100
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Mark, { size: 20 }), !compact && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("interface") })]
|
|
101
|
-
})
|
|
102
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Switch, {
|
|
103
|
-
checked: enabled,
|
|
104
|
-
disabled: busy || !ready,
|
|
105
|
-
label: t("interface"),
|
|
106
|
-
title: busy ? t("saving") : !ready ? t("unavailable") : void 0,
|
|
107
|
-
onChange: (next) => {
|
|
108
|
-
setBusy(true);
|
|
109
|
-
setFailed(false);
|
|
110
|
-
setEnabled(next).then((ok) => setFailed(!ok), () => setFailed(true)).finally(() => setBusy(false));
|
|
111
|
-
}
|
|
112
|
-
})]
|
|
113
|
-
}), failed && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
114
|
-
role: "alert",
|
|
115
|
-
className: "cannbot-harness-error",
|
|
116
|
-
children: t("saveFailed")
|
|
117
|
-
})]
|
|
118
|
-
});
|
|
119
|
-
}
|
|
120
|
-
function FooterToggle({ wide, useHarnessSettings, ...props }) {
|
|
121
|
-
return useHarnessSettings((state) => state.status !== "unavailable") ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ToggleControl, {
|
|
122
|
-
...props,
|
|
123
|
-
useHarnessSettings,
|
|
124
|
-
compact: !wide
|
|
125
|
-
}) : null;
|
|
126
|
-
}
|
|
127
|
-
function PluginSettings(props) {
|
|
128
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", {
|
|
129
|
-
className: "cannbot-harness-settings",
|
|
130
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(ToggleControl, { ...props }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { children: props.t("description") })]
|
|
131
|
-
});
|
|
132
|
-
}
|
|
133
|
-
//#endregion
|
|
134
69
|
//#region src/client/WorkflowIcon.tsx
|
|
135
|
-
/**
|
|
70
|
+
/** The exact icon component used by DSH's original Standard mode selector. */
|
|
136
71
|
function WorkflowIcon({ size = 16 }) {
|
|
137
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.
|
|
138
|
-
width: size,
|
|
139
|
-
height: size,
|
|
140
|
-
viewBox: "0 0 16 16",
|
|
141
|
-
fill: "none",
|
|
142
|
-
stroke: "currentColor",
|
|
143
|
-
strokeWidth: "1.2",
|
|
144
|
-
strokeLinecap: "round",
|
|
145
|
-
strokeLinejoin: "round",
|
|
146
|
-
"aria-hidden": "true",
|
|
147
|
-
focusable: "false",
|
|
148
|
-
children: [
|
|
149
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("rect", {
|
|
150
|
-
x: "1.5",
|
|
151
|
-
y: "1.5",
|
|
152
|
-
width: "5",
|
|
153
|
-
height: "5",
|
|
154
|
-
rx: "1.4"
|
|
155
|
-
}),
|
|
156
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M6.5 4H10a2 2 0 0 1 2 2v3.5" }),
|
|
157
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("rect", {
|
|
158
|
-
x: "9.5",
|
|
159
|
-
y: "9.5",
|
|
160
|
-
width: "5",
|
|
161
|
-
height: "5",
|
|
162
|
-
rx: "1.4"
|
|
163
|
-
})
|
|
164
|
-
]
|
|
165
|
-
});
|
|
72
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconAgentPresetOutlineRegular, { size });
|
|
166
73
|
}
|
|
167
74
|
//#endregion
|
|
168
75
|
//#region src/client/WorkflowSelector.tsx
|
|
@@ -278,7 +185,7 @@ window.__ModuleLoader__.load({
|
|
|
278
185
|
var interface_css_default = "span:has(>[data-slot=\"conversation.hero.brand.mark\"]>[data-cannbot-harness-hero]){width:auto;min-width:0;height:auto}span:has(>[data-slot=\"conversation.hero.brand.mark\"]>[data-cannbot-harness-hero])+span{display:none}[data-cannbot-harness-hero]{letter-spacing:-.6px;color:var(--dsw-alias-label-primary);justify-content:center;align-items:center;gap:12px;font-size:26px;font-weight:650;line-height:1.3;display:inline-flex}[data-cannbot-harness-hero] svg{flex-shrink:0}.cannbot-harness-name{letter-spacing:-.3px;font-weight:650}";
|
|
279
186
|
//#endregion
|
|
280
187
|
//#region \0dsh-global-css:D:\code\cannbot-harness-plugin\src\client\controls.css.mjs
|
|
281
|
-
const css = ".cannbot-harness-
|
|
188
|
+
const css = ".cannbot-harness-workflow{align-items:center;min-width:0;max-width:240px;display:inline-flex;position:relative}.cannbot-harness-workflow-anchor{min-width:54px;max-width:100%}.cannbot-harness-workflow-trigger{border-radius:var(--dsw-radius-sm);min-width:0;max-width:100%;min-height:28px;color:var(--dsw-alias-label-primary);white-space:nowrap;cursor:pointer;background:0 0;border:0;align-items:center;gap:4px;padding:0 8px;font-family:inherit;font-size:13px;font-weight:500;line-height:20px;display:inline-flex}.cannbot-harness-workflow-trigger svg{flex:none}.cannbot-harness-workflow-trigger svg:last-child{color:var(--dsw-alias-label-caption)}.cannbot-harness-workflow-trigger[aria-expanded=true]{background:var(--dsw-alias-interactive-bg-hover)}.cannbot-harness-workflow-trigger:disabled{cursor:default;color:var(--dsw-alias-label-quaternary)}.cannbot-harness-workflow-trigger:focus-visible{outline:2px solid var(--dsw-focus-ring-color);outline-offset:2px}.cannbot-harness-workflow-label{text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}@media (hover:hover){.cannbot-harness-workflow-trigger:not(:disabled):hover{background:var(--dsw-alias-interactive-bg-hover)}}.cannbot-harness-workflow-option{white-space:normal;flex-direction:column;gap:4px;max-width:320px;padding:5px 0;display:flex}.cannbot-harness-workflow-option small{color:var(--dsw-alias-label-secondary);font-size:12px;line-height:1.5}.cannbot-harness-error{color:var(--dsw-alias-label-secondary);margin:4px 0;font-size:12px}";
|
|
282
189
|
const tagId = "@cannbot-plugin/cannbot-harness/controls.css";
|
|
283
190
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId) + "]") === null) {
|
|
284
191
|
const tag = document.createElement("style");
|
|
@@ -292,8 +199,7 @@ window.__ModuleLoader__.load({
|
|
|
292
199
|
const inject = [
|
|
293
200
|
"slots",
|
|
294
201
|
"theme",
|
|
295
|
-
"locale"
|
|
296
|
-
"configForms"
|
|
202
|
+
"locale"
|
|
297
203
|
];
|
|
298
204
|
/** Register presentation with an explicit disposer so the original entries remain live underneath. */
|
|
299
205
|
function mountInterface(ctx) {
|
|
@@ -337,42 +243,7 @@ window.__ModuleLoader__.load({
|
|
|
337
243
|
ru: en,
|
|
338
244
|
pt: en
|
|
339
245
|
}));
|
|
340
|
-
|
|
341
|
-
const injectToggle = () => ({
|
|
342
|
-
hooks: { harnessSettings: preferences },
|
|
343
|
-
setEnabled: (value) => preferences.set("interfaceEnabled", value)
|
|
344
|
-
});
|
|
345
|
-
ctx.slots.inject("sidebar.footer.action", () => ctx.slots.register({
|
|
346
|
-
name: "sidebar.footer.action",
|
|
347
|
-
id: "cannbot-harness-interface",
|
|
348
|
-
order: -100,
|
|
349
|
-
locale: NAMESPACE,
|
|
350
|
-
inject: injectToggle
|
|
351
|
-
}, FooterToggle));
|
|
352
|
-
ctx.slots.inject("plugins.bundle.config", () => ctx.slots.register({
|
|
353
|
-
name: "plugins.bundle.config",
|
|
354
|
-
key: PACKAGE,
|
|
355
|
-
locale: NAMESPACE,
|
|
356
|
-
inject: injectToggle
|
|
357
|
-
}, PluginSettings));
|
|
358
|
-
ctx.effect(() => {
|
|
359
|
-
let unmount;
|
|
360
|
-
const sync = () => {
|
|
361
|
-
const state = preferences.getSnapshot();
|
|
362
|
-
const enabled = state.status === "ready" && state.value?.interfaceEnabled === true;
|
|
363
|
-
if (enabled && unmount === void 0) unmount = mountInterface(ctx);
|
|
364
|
-
else if (!enabled && unmount !== void 0) {
|
|
365
|
-
unmount();
|
|
366
|
-
unmount = void 0;
|
|
367
|
-
}
|
|
368
|
-
};
|
|
369
|
-
const unsubscribe = preferences.subscribe(sync);
|
|
370
|
-
sync();
|
|
371
|
-
return () => {
|
|
372
|
-
unsubscribe();
|
|
373
|
-
unmount?.();
|
|
374
|
-
};
|
|
375
|
-
});
|
|
246
|
+
ctx.effect(() => mountInterface(ctx));
|
|
376
247
|
}
|
|
377
248
|
//#endregion
|
|
378
249
|
exports.apply = apply;
|
package/lib/client.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","names":["Tooltip","Switch","Menu","IconChevronDownOutlineRegular","MenuItemButton","interfaceCss"],"sources":["../src/client/locales.ts","../src/client/Brand.tsx","../src/client/InterfaceToggle.tsx","../src/client/WorkflowIcon.tsx","../src/client/WorkflowSelector.tsx","../src/client/theme.ts","../src/client/index.ts"],"sourcesContent":["export const PRODUCT = 'CANNBot Harness'\nexport const NAMESPACE = 'cannbotHarness'\nexport const SETTINGS_ID = 'cannbot-harness'\nexport const PACKAGE = '@cannbot-plugin/cannbot-harness'\nexport const COMMAND = '/ops-direct-invoke'\n\nexport const zh = {\n interface: 'CANNBot Harness 界面', on: '已开启', off: '原版 DSH 界面', saving: '正在保存…',\n description: '切换界面后,算子 Skills 仍可使用。', saveFailed: '切换未成功,请重试。',\n workflow: '选择工作流', operator: '算子开发工作流', commandHint: '填入 /ops-direct-invoke,由你补充需求后发送。',\n chooseWorkspace: '请先选择工作目录。', insertFailed: '输入框正在处理其他操作,请稍后重试。',\n unavailable: '当前连接无法修改界面设置。',\n}\nexport const en: typeof zh = {\n interface: 'CANNBot Harness interface', on: 'Enabled', off: 'Original DSH interface', saving: 'Saving…',\n description: 'Operator Skills remain available with either interface.', saveFailed: 'Could not switch the interface. Please retry.',\n workflow: 'Choose workflow', operator: 'Operator development workflow', commandHint: 'Insert /ops-direct-invoke, add your requirements, then send.',\n chooseWorkspace: 'Choose a working directory first.', insertFailed: 'The composer is busy. Please retry.',\n unavailable: 'Interface settings cannot be changed through this connection.',\n}\nexport type LocaleKey = keyof typeof zh\n","import type { HeroBrandMarkOwnerProps } from '@deepseek-ai/dsh-client-ui-conversation/client'\nimport type { SidebarBrandMarkOwnerProps } from '@deepseek-ai/dsh-client-ui-sidebar/client'\nimport { PRODUCT } from './locales.ts'\n\nexport function Mark({ size }: { size: number }) {\n return <svg width={size} height={size} viewBox=\"0 0 40 40\" aria-hidden=\"true\">\n <rect x=\"1\" y=\"1\" width=\"38\" height=\"38\" rx=\"12\" fill=\"var(--dsw-alias-brand-primary)\" />\n <path d=\"M27 12a11 11 0 1 0 0 16\" fill=\"none\" stroke=\"var(--dsw-alias-label-primary-foreground)\" strokeWidth=\"4\" strokeLinecap=\"round\" />\n </svg>\n}\nexport function SidebarMark({ size }: SidebarBrandMarkOwnerProps) { return <Mark size={size} /> }\nexport function SidebarName() { return <span className=\"cannbot-harness-name\">{PRODUCT}</span> }\nexport function Hero({ size }: HeroBrandMarkOwnerProps) {\n return <span data-cannbot-harness-hero=\"\"><Mark size={size} /><span>{PRODUCT}</span></span>\n}\n","import { useState } from 'react'\nimport { Switch, Tooltip } from '@deepseek-ai/dsh-client-ui-primitives'\nimport type { InjectFace, PropsLocale, PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots'\nimport type { ConfigForm } from '@deepseek-ai/dsh-client-ui-settings/client'\nimport type {} from '@deepseek-ai/dsh-client-ui-sidebar/client'\nimport type {} from '@deepseek-ai/dsh-client-ui-plugin-manager/client'\nimport { Mark } from './Brand.tsx'\n\nexport interface Preferences { interfaceEnabled: boolean }\nexport interface ToggleFace {\n hooks: { harnessSettings: ConfigForm<Preferences> }\n setEnabled: (enabled: boolean) => Promise<boolean>\n}\ntype ControlProps = InjectFace<ToggleFace> & PropsLocale<'cannbotHarness'>\nexport function ToggleControl({ useHarnessSettings, setEnabled, t, compact = false }: ControlProps & { compact?: boolean }) {\n const settings = useHarnessSettings(value => value)\n const [busy, setBusy] = useState(false)\n const [failed, setFailed] = useState(false)\n const ready = settings.status === 'ready' && settings.writable\n const enabled = settings.value?.interfaceEnabled === true\n return <div className=\"cannbot-harness-toggle\">\n <div className={`cannbot-harness-toggle-line${compact ? ' cannbot-harness-toggle-compact' : ''}`}>\n <Tooltip label={t('interface')} side=\"right\"><span className=\"cannbot-harness-toggle-name\"><Mark size={20} />{!compact && <span>{t('interface')}</span>}</span></Tooltip>\n <Switch checked={enabled} disabled={busy || !ready} label={t('interface')}\n title={busy ? t('saving') : !ready ? t('unavailable') : undefined}\n onChange={next => {\n setBusy(true); setFailed(false)\n void setEnabled(next).then(ok => setFailed(!ok), () => setFailed(true)).finally(() => setBusy(false))\n }} />\n </div>\n {failed && <p role=\"alert\" className=\"cannbot-harness-error\">{t('saveFailed')}</p>}\n </div>\n}\nexport function FooterToggle({ wide, useHarnessSettings, ...props }: PropsRuntime<'sidebar.footer.action'> & ControlProps) {\n const available = useHarnessSettings(state => state.status !== 'unavailable')\n return available ? <ToggleControl {...props} useHarnessSettings={useHarnessSettings} compact={!wide} /> : null\n}\nexport function PluginSettings(props: PropsRuntime<'plugins.bundle.config'> & ControlProps) {\n return <section className=\"cannbot-harness-settings\"><ToggleControl {...props} /><p>{props.t('description')}</p></section>\n}\n","/** Compact, pixel-aligned workflow stages matching DSH's outline icon weight. */\nexport function WorkflowIcon({ size = 16 }: { size?: number }) {\n return <svg width={size} height={size} viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\" focusable=\"false\">\n <rect x=\"1.5\" y=\"1.5\" width=\"5\" height=\"5\" rx=\"1.4\" />\n <path d=\"M6.5 4H10a2 2 0 0 1 2 2v3.5\" />\n <rect x=\"9.5\" y=\"9.5\" width=\"5\" height=\"5\" rx=\"1.4\" />\n </svg>\n}\n","import { useState } from 'react'\nimport { IconChevronDownOutlineRegular, Menu, MenuItemButton } 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-conversation/client'\nimport { COMMAND } from './locales.ts'\nimport { WorkflowIcon } from './WorkflowIcon.tsx'\n\nexport type WorkflowProps = PropsRuntime<'conversation.hero.agentPreset'> & PropsLocale<'cannbotHarness'>\n\n/** Select a workflow without submitting, replacing text, or discarding reference chips. */\nexport function WorkflowSelector({ inputActions, useInput, t }: WorkflowProps) {\n const input = useInput(state => state)\n const [open, setOpen] = useState(false)\n const [failed, setFailed] = useState(false)\n const selected = input?.draft === COMMAND || input?.draft.startsWith(`${COMMAND} `) || input?.draft.startsWith(`${COMMAND}\\n`)\n const available = inputActions !== undefined && input !== undefined && input.phase === 'plain'\n const pick = () => {\n setOpen(false)\n if (!inputActions || !input) return\n if (selected) { setFailed(false); return }\n const accepted = inputActions.insertText(`${COMMAND} `, { start: 0, end: 0, draftRev: input.draftRev })\n setFailed(!accepted)\n }\n return <span className=\"cannbot-harness-workflow\">\n <Menu open={open} onClose={() => setOpen(false)} portal className=\"cannbot-harness-workflow-anchor\" anchor={\n <button type=\"button\" className=\"cannbot-harness-workflow-trigger\" aria-label={t('workflow')} aria-haspopup=\"menu\" aria-expanded={open}\n disabled={!available} title={inputActions === undefined ? t('chooseWorkspace') : t('commandHint')}\n onClick={() => setOpen(value => !value)}>\n <WorkflowIcon />\n <span className=\"cannbot-harness-workflow-label\">{selected ? t('operator') : t('workflow')}</span><IconChevronDownOutlineRegular size={12} />\n </button>\n }>\n <MenuItemButton icon={<WorkflowIcon />} onSelect={pick}><span className=\"cannbot-harness-workflow-option\">\n <span>{t('operator')}</span><small>{t('commandHint')}</small>\n </span></MenuItemButton>\n </Menu>\n {failed && <span role=\"alert\" className=\"cannbot-harness-error\">{t('insertFailed')}</span>}\n </span>\n}\n","import type { ThemeTokenOverrides } from '@deepseek-ai/dsh-client-ui-theme/client'\n\n/** Portal design-v2 palette, applied through the documented theme override layer. */\nexport const cannTheme: ThemeTokenOverrides = Object.fromEntries(Object.entries({\n '--dsw-alias-bg-base': ['#ffffff', '#101114'],\n '--dsw-alias-bg-layer-1': ['#ffffff', '#17191e'],\n '--dsw-alias-bg-layer-2': ['#ffffff', '#1d2026'],\n '--dsw-alias-bg-layer-3': ['#f6f8fa', '#252830'],\n '--dsw-specific-sidebar-fill': ['#f6f8fa', '#14161b'],\n '--dsw-specific-input-major': ['#ffffff', '#1d2026'],\n '--dsw-specific-sidebar-nav-item-active': ['#fdeef0', '#392029'],\n '--dsw-specific-sidebar-nav-item-active-accent': ['#fdeef0', '#392029'],\n '--dsw-alias-label-primary': ['#17181d', '#f3f4f6'],\n '--dsw-alias-label-primary-foreground': ['#ffffff', '#ffffff'],\n '--dsw-alias-label-primary-inverted': ['#ffffff', '#ffffff'],\n '--dsw-alias-label-primary-dimmed': ['#30343e', '#dde1e8'],\n '--dsw-alias-label-primary-bluish': ['#7f0f26', '#ff9aab'],\n '--dsw-alias-label-secondary': ['#59637a', '#b0b8c7'],\n '--dsw-alias-label-tertiary': ['#727d91', '#929db0'],\n '--dsw-alias-brand-primary': ['#da203e', '#ef4560'],\n '--dsw-alias-brand-text': ['#17181d', '#f3f4f6'],\n '--dsw-alias-button-primary-hover': ['#b11430', '#ff647d'],\n '--dsw-alias-button-info-fill': ['#da203e', '#da203e'],\n '--dsw-alias-button-info-hover': ['#b11430', '#b11430'],\n '--dsw-alias-state-business-primary': ['#da203e', '#ff8297'],\n '--dsw-alias-state-business-tertiary': ['#fdeef0', '#392029'],\n '--dsw-alias-link': ['#b11430', '#ff9aab'],\n '--dsw-focus-ring-color': ['#da203e', '#ff8297'],\n '--dsw-alias-border-l1': ['#f0f1f5', '#252830'],\n '--dsw-alias-border-l2': ['#e6e9ef', '#323641'],\n '--dsw-alias-border-l3': ['#dce0e8', '#414754'],\n '--dsw-alias-border-l4': ['#ced4df', '#505867'],\n '--dsw-alias-interactive-bg-hover': ['#eef0f4', '#252830'],\n '--dsw-alias-interactive-bg-active': ['#fdeef0', '#392029'],\n '--dsw-specific-bubble': ['#fff3f5', '#302027'],\n '--dsw-specific-bubble-highlight': ['#fbd6dd', '#59303d'],\n '--dsw-radius-panel': ['18px', '18px'],\n '--dsw-radius-xl': ['14px', '14px'],\n '--dsw-radius-lg': ['12px', '12px'],\n '--dsw-radius-md': ['10px', '10px'],\n '--cann-grid': ['#e6e9ef', '#323641'],\n '--cann-night': ['#0e0f12', '#0e0f12'],\n '--cann-night-label': ['#dde1e8', '#dde1e8'],\n}).map(([name, values]) => [name, { light: values[0]!, dark: values[1]! }]))\n","/** Browser companion using the existing DSH theme, settings and UI slots. */\nimport type { Context } 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-sidebar/client'\nimport type {} from '@deepseek-ai/dsh-client-ui-conversation/client'\nimport type {} from '@deepseek-ai/dsh-client-ui-theme/client'\nimport type {} from '@deepseek-ai/dsh-client-ui-settings/client'\nimport type {} from '@deepseek-ai/dsh-client-ui-plugin-manager/client'\nimport { en, zh, NAMESPACE, SETTINGS_ID, PACKAGE, type LocaleKey } from './locales.ts'\nimport { FooterToggle, PluginSettings, type Preferences } from './InterfaceToggle.tsx'\nimport { SidebarMark, SidebarName, Hero } from './Brand.tsx'\nimport { WorkflowSelector } from './WorkflowSelector.tsx'\nimport { cannTheme } from './theme.ts'\nimport interfaceCss from './interface.css?inline'\nimport './controls.css'\n\ndeclare module '@deepseek-ai/dsh-client-ui-slots' {\n interface LocaleNamespaceMap { cannbotHarness: LocaleKey }\n}\nexport const inject = ['slots', 'theme', 'locale', 'configForms']\n\n/** Register presentation with an explicit disposer so the original entries remain live underneath. */\nfunction mountInterface(ctx: Context): () => void {\n const style = document.createElement('style')\n style.dataset.cannbotHarness = 'interface'\n style.textContent = interfaceCss\n document.head.append(style)\n const releases = [\n ctx.theme.overrideTokens(PACKAGE, cannTheme),\n ctx.slots.inject('sidebar.brand.mark', () => ctx.slots.register({ name: 'sidebar.brand.mark', priority: -100 }, SidebarMark)),\n ctx.slots.inject('sidebar.brand.name', () => ctx.slots.register({ name: 'sidebar.brand.name', priority: -100 }, SidebarName)),\n ctx.slots.inject('conversation.hero.brand.mark', () => ctx.slots.register({ name: 'conversation.hero.brand.mark', priority: -100 }, Hero)),\n ctx.slots.inject('conversation.hero.agentPreset', () => ctx.slots.register({ name: 'conversation.hero.agentPreset', priority: -100, locale: NAMESPACE }, WorkflowSelector)),\n ]\n return () => { for (const release of releases.reverse()) release(); style.remove() }\n}\n\nexport function apply(ctx: Context): void {\n ctx.effect(() => ctx.locale.register(NAMESPACE, { zh, en, ja: en, es: en, fr: en, de: en, ru: en, pt: en }))\n const preferences = ctx.configForms.get<Preferences>(SETTINGS_ID)\n const injectToggle = () => ({ hooks: { harnessSettings: preferences }, setEnabled: (value: boolean) => preferences.set('interfaceEnabled', value) })\n ctx.slots.inject('sidebar.footer.action', () => ctx.slots.register({\n name: 'sidebar.footer.action', id: 'cannbot-harness-interface', order: -100, locale: NAMESPACE, inject: injectToggle,\n }, FooterToggle))\n ctx.slots.inject('plugins.bundle.config', () => ctx.slots.register({\n name: 'plugins.bundle.config', key: PACKAGE, locale: NAMESPACE, inject: injectToggle,\n }, PluginSettings))\n ctx.effect(() => {\n let unmount: (() => void) | undefined\n const sync = () => {\n const state = preferences.getSnapshot()\n const enabled = state.status === 'ready' && state.value?.interfaceEnabled === true\n if (enabled && unmount === undefined) unmount = mountInterface(ctx)\n else if (!enabled && unmount !== undefined) { unmount(); unmount = undefined }\n }\n const unsubscribe = preferences.subscribe(sync)\n sync()\n return () => { unsubscribe(); unmount?.() }\n })\n}\n"],"mappings":";;;;;;;;;;EAAA,MAAa,UAAU;EACvB,MAAa,YAAY;EACzB,MAAa,cAAc;EAC3B,MAAa,UAAU;EACvB,MAAa,UAAU;EAEvB,MAAa,KAAK;GAChB,WAAW;GAAsB,IAAI;GAAO,KAAK;GAAa,QAAQ;GACtE,aAAa;GAAyB,YAAY;GAClD,UAAU;GAAS,UAAU;GAAW,aAAa;GACrD,iBAAiB;GAAa,cAAc;GAC5C,aAAa;EACf;EACA,MAAa,KAAgB;GAC3B,WAAW;GAA6B,IAAI;GAAW,KAAK;GAA0B,QAAQ;GAC9F,aAAa;GAA2D,YAAY;GACpF,UAAU;GAAmB,UAAU;GAAiC,aAAa;GACrF,iBAAiB;GAAqC,cAAc;GACpE,aAAa;EACf;;;ECfA,SAAgB,KAAK,EAAE,QAA0B;GAC/C,OAAO,iBAAA,GAAA,kBAAA,KAAA,CAAC,OAAD;IAAK,OAAO;IAAM,QAAQ;IAAM,SAAQ;IAAY,eAAY;cAAhE,CACL,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD;KAAM,GAAE;KAAI,GAAE;KAAI,OAAM;KAAK,QAAO;KAAK,IAAG;KAAK,MAAK;IAAkC,CAAA,GACxF,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD;KAAM,GAAE;KAA0B,MAAK;KAAO,QAAO;KAA4C,aAAY;KAAI,eAAc;IAAS,CAAA,CACrI;;EACP;EACA,SAAgB,YAAY,EAAE,QAAoC;GAAE,OAAO,iBAAA,GAAA,kBA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;GAClB,IAAI,aAAa;IACf,IAAI;IACJ,MAAM,aAAa;KACjB,MAAM,QAAQ,YAAY,YAAY;KACtC,MAAM,UAAU,MAAM,WAAW,WAAW,MAAM,OAAO,qBAAqB;KAC9E,IAAI,WAAW,YAAY,KAAA,GAAW,UAAU,eAAe,GAAG;UAC7D,IAAI,CAAC,WAAW,YAAY,KAAA,GAAW;MAAE,QAAQ;MAAG,UAAU,KAAA;KAAU;IAC/E;IACA,MAAM,cAAc,YAAY,UAAU,IAAI;IAC9C,KAAK;IACL,aAAa;KAAE,YAAY;KAAG,UAAU;IAAE;GAC5C,CAAC;EACH"}
|
|
1
|
+
{"version":3,"file":"client.js","names":["IconAgentPresetOutlineRegular","Menu","IconChevronDownOutlineRegular","MenuItemButton","interfaceCss"],"sources":["../src/client/locales.ts","../src/client/Brand.tsx","../src/client/WorkflowIcon.tsx","../src/client/WorkflowSelector.tsx","../src/client/theme.ts","../src/client/index.ts"],"sourcesContent":["export const PRODUCT = 'CANNBot Harness'\nexport const NAMESPACE = 'cannbotHarness'\nexport const PACKAGE = '@cannbot-plugin/cannbot-harness'\nexport const COMMAND = '/ops-direct-invoke'\n\nexport const zh = {\n workflow: '选择工作流', operator: '算子开发工作流', commandHint: '填入 /ops-direct-invoke,由你补充需求后发送。',\n chooseWorkspace: '请先选择工作目录。', insertFailed: '输入框正在处理其他操作,请稍后重试。',\n}\nexport const en: typeof zh = {\n workflow: 'Choose workflow', operator: 'Operator development workflow', commandHint: 'Insert /ops-direct-invoke, add your requirements, then send.',\n chooseWorkspace: 'Choose a working directory first.', insertFailed: 'The composer is busy. Please retry.',\n}\nexport type LocaleKey = keyof typeof zh\n","import type { HeroBrandMarkOwnerProps } from '@deepseek-ai/dsh-client-ui-conversation/client'\nimport type { SidebarBrandMarkOwnerProps } from '@deepseek-ai/dsh-client-ui-sidebar/client'\nimport { PRODUCT } from './locales.ts'\n\nexport function Mark({ size }: { size: number }) {\n return <svg width={size} height={size} viewBox=\"0 0 40 40\" aria-hidden=\"true\">\n <rect x=\"1\" y=\"1\" width=\"38\" height=\"38\" rx=\"12\" fill=\"var(--dsw-alias-brand-primary)\" />\n <path d=\"M27 12a11 11 0 1 0 0 16\" fill=\"none\" stroke=\"var(--dsw-alias-label-primary-foreground)\" strokeWidth=\"4\" strokeLinecap=\"round\" />\n </svg>\n}\nexport function SidebarMark({ size }: SidebarBrandMarkOwnerProps) { return <Mark size={size} /> }\nexport function SidebarName() { return <span className=\"cannbot-harness-name\">{PRODUCT}</span> }\nexport function Hero({ size }: HeroBrandMarkOwnerProps) {\n return <span data-cannbot-harness-hero=\"\"><Mark size={size} /><span>{PRODUCT}</span></span>\n}\n","import { IconAgentPresetOutlineRegular } from '@deepseek-ai/dsh-client-ui-primitives'\n\n/** The exact icon component used by DSH's original Standard mode selector. */\nexport function WorkflowIcon({ size = 16 }: { size?: number }) {\n return <IconAgentPresetOutlineRegular size={size} />\n}\n","import { useState } from 'react'\nimport { IconChevronDownOutlineRegular, Menu, MenuItemButton } 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-conversation/client'\nimport { COMMAND } from './locales.ts'\nimport { WorkflowIcon } from './WorkflowIcon.tsx'\n\nexport type WorkflowProps = PropsRuntime<'conversation.hero.agentPreset'> & PropsLocale<'cannbotHarness'>\n\n/** Select a workflow without submitting, replacing text, or discarding reference chips. */\nexport function WorkflowSelector({ inputActions, useInput, t }: WorkflowProps) {\n const input = useInput(state => state)\n const [open, setOpen] = useState(false)\n const [failed, setFailed] = useState(false)\n const selected = input?.draft === COMMAND || input?.draft.startsWith(`${COMMAND} `) || input?.draft.startsWith(`${COMMAND}\\n`)\n const available = inputActions !== undefined && input !== undefined && input.phase === 'plain'\n const pick = () => {\n setOpen(false)\n if (!inputActions || !input) return\n if (selected) { setFailed(false); return }\n const accepted = inputActions.insertText(`${COMMAND} `, { start: 0, end: 0, draftRev: input.draftRev })\n setFailed(!accepted)\n }\n return <span className=\"cannbot-harness-workflow\">\n <Menu open={open} onClose={() => setOpen(false)} portal className=\"cannbot-harness-workflow-anchor\" anchor={\n <button type=\"button\" className=\"cannbot-harness-workflow-trigger\" aria-label={t('workflow')} aria-haspopup=\"menu\" aria-expanded={open}\n disabled={!available} title={inputActions === undefined ? t('chooseWorkspace') : t('commandHint')}\n onClick={() => setOpen(value => !value)}>\n <WorkflowIcon />\n <span className=\"cannbot-harness-workflow-label\">{selected ? t('operator') : t('workflow')}</span><IconChevronDownOutlineRegular size={12} />\n </button>\n }>\n <MenuItemButton icon={<WorkflowIcon />} onSelect={pick}><span className=\"cannbot-harness-workflow-option\">\n <span>{t('operator')}</span><small>{t('commandHint')}</small>\n </span></MenuItemButton>\n </Menu>\n {failed && <span role=\"alert\" className=\"cannbot-harness-error\">{t('insertFailed')}</span>}\n </span>\n}\n","import type { ThemeTokenOverrides } from '@deepseek-ai/dsh-client-ui-theme/client'\n\n/** Portal design-v2 palette, applied through the documented theme override layer. */\nexport const cannTheme: ThemeTokenOverrides = Object.fromEntries(Object.entries({\n '--dsw-alias-bg-base': ['#ffffff', '#101114'],\n '--dsw-alias-bg-layer-1': ['#ffffff', '#17191e'],\n '--dsw-alias-bg-layer-2': ['#ffffff', '#1d2026'],\n '--dsw-alias-bg-layer-3': ['#f6f8fa', '#252830'],\n '--dsw-specific-sidebar-fill': ['#f6f8fa', '#14161b'],\n '--dsw-specific-input-major': ['#ffffff', '#1d2026'],\n '--dsw-specific-sidebar-nav-item-active': ['#fdeef0', '#392029'],\n '--dsw-specific-sidebar-nav-item-active-accent': ['#fdeef0', '#392029'],\n '--dsw-alias-label-primary': ['#17181d', '#f3f4f6'],\n '--dsw-alias-label-primary-foreground': ['#ffffff', '#ffffff'],\n '--dsw-alias-label-primary-inverted': ['#ffffff', '#ffffff'],\n '--dsw-alias-label-primary-dimmed': ['#30343e', '#dde1e8'],\n '--dsw-alias-label-primary-bluish': ['#7f0f26', '#ff9aab'],\n '--dsw-alias-label-secondary': ['#59637a', '#b0b8c7'],\n '--dsw-alias-label-tertiary': ['#727d91', '#929db0'],\n '--dsw-alias-brand-primary': ['#da203e', '#ef4560'],\n '--dsw-alias-brand-text': ['#17181d', '#f3f4f6'],\n '--dsw-alias-button-primary-hover': ['#b11430', '#ff647d'],\n '--dsw-alias-button-info-fill': ['#da203e', '#da203e'],\n '--dsw-alias-button-info-hover': ['#b11430', '#b11430'],\n '--dsw-alias-state-business-primary': ['#da203e', '#ff8297'],\n '--dsw-alias-state-business-tertiary': ['#fdeef0', '#392029'],\n '--dsw-alias-link': ['#b11430', '#ff9aab'],\n '--dsw-focus-ring-color': ['#da203e', '#ff8297'],\n '--dsw-alias-border-l1': ['#f0f1f5', '#252830'],\n '--dsw-alias-border-l2': ['#e6e9ef', '#323641'],\n '--dsw-alias-border-l3': ['#dce0e8', '#414754'],\n '--dsw-alias-border-l4': ['#ced4df', '#505867'],\n '--dsw-alias-interactive-bg-hover': ['#eef0f4', '#252830'],\n '--dsw-alias-interactive-bg-active': ['#fdeef0', '#392029'],\n '--dsw-specific-bubble': ['#fff3f5', '#302027'],\n '--dsw-specific-bubble-highlight': ['#fbd6dd', '#59303d'],\n '--dsw-radius-panel': ['18px', '18px'],\n '--dsw-radius-xl': ['14px', '14px'],\n '--dsw-radius-lg': ['12px', '12px'],\n '--dsw-radius-md': ['10px', '10px'],\n '--cann-grid': ['#e6e9ef', '#323641'],\n '--cann-night': ['#0e0f12', '#0e0f12'],\n '--cann-night-label': ['#dde1e8', '#dde1e8'],\n}).map(([name, values]) => [name, { light: values[0]!, dark: values[1]! }]))\n","/** Browser companion using the existing DSH theme, settings and UI slots. */\nimport type { Context } 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-sidebar/client'\nimport type {} from '@deepseek-ai/dsh-client-ui-conversation/client'\nimport type {} from '@deepseek-ai/dsh-client-ui-theme/client'\nimport { en, zh, NAMESPACE, PACKAGE, type LocaleKey } from './locales.ts'\nimport { SidebarMark, SidebarName, Hero } from './Brand.tsx'\nimport { WorkflowSelector } from './WorkflowSelector.tsx'\nimport { cannTheme } from './theme.ts'\nimport interfaceCss from './interface.css?inline'\nimport './controls.css'\n\ndeclare module '@deepseek-ai/dsh-client-ui-slots' {\n interface LocaleNamespaceMap { cannbotHarness: LocaleKey }\n}\nexport const inject = ['slots', 'theme', 'locale']\n\n/** Register presentation with an explicit disposer so the original entries remain live underneath. */\nfunction mountInterface(ctx: Context): () => void {\n const style = document.createElement('style')\n style.dataset.cannbotHarness = 'interface'\n style.textContent = interfaceCss\n document.head.append(style)\n const releases = [\n ctx.theme.overrideTokens(PACKAGE, cannTheme),\n ctx.slots.inject('sidebar.brand.mark', () => ctx.slots.register({ name: 'sidebar.brand.mark', priority: -100 }, SidebarMark)),\n ctx.slots.inject('sidebar.brand.name', () => ctx.slots.register({ name: 'sidebar.brand.name', priority: -100 }, SidebarName)),\n ctx.slots.inject('conversation.hero.brand.mark', () => ctx.slots.register({ name: 'conversation.hero.brand.mark', priority: -100 }, Hero)),\n ctx.slots.inject('conversation.hero.agentPreset', () => ctx.slots.register({ name: 'conversation.hero.agentPreset', priority: -100, locale: NAMESPACE }, WorkflowSelector)),\n ]\n return () => { for (const release of releases.reverse()) release(); style.remove() }\n}\n\nexport function apply(ctx: Context): void {\n ctx.effect(() => ctx.locale.register(NAMESPACE, { zh, en, ja: en, es: en, fr: en, de: en, ru: en, pt: en }))\n ctx.effect(() => mountInterface(ctx))\n}\n"],"mappings":";;;;;;;;;;EAAA,MAAa,UAAU;EACvB,MAAa,YAAY;EACzB,MAAa,UAAU;EACvB,MAAa,UAAU;EAEvB,MAAa,KAAK;GAChB,UAAU;GAAS,UAAU;GAAW,aAAa;GACrD,iBAAiB;GAAa,cAAc;EAC9C;EACA,MAAa,KAAgB;GAC3B,UAAU;GAAmB,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C,IAAI,MAAM,SAAS;KAAE,MAAM;KAAiC,UAAU;KAAM,QAAQ;IAAU,GAAG,gBAAgB,CAAC;GAC5K;GACA,aAAa;IAAE,KAAK,MAAM,WAAW,SAAS,QAAQ,GAAG,QAAQ;IAAG,MAAM,OAAO;GAAE;EACrF;EAEA,SAAgB,MAAM,KAAoB;GACxC,IAAI,aAAa,IAAI,OAAO,SAAS,WAAW;IAAE;IAAI;IAAI,IAAI;IAAI,IAAI;IAAI,IAAI;IAAI,IAAI;IAAI,IAAI;IAAI,IAAI;GAAG,CAAC,CAAC;GAC3G,IAAI,aAAa,eAAe,GAAG,CAAC;EACtC"}
|
package/lib/index.js
CHANGED
|
@@ -1,14 +1,9 @@
|
|
|
1
|
-
import z from "@deepseek-ai/schemastery";
|
|
2
1
|
import { FileSystemSkillProvider } from "@deepseek-ai/dsh-skill-filesystem";
|
|
3
2
|
import { fileURLToPath } from "node:url";
|
|
4
3
|
//#region src/index.ts
|
|
5
|
-
const Config = z.object({ interfaceEnabled: z.boolean().default(true).volatile() });
|
|
6
4
|
const inject = ["skills"];
|
|
7
|
-
/**
|
|
8
|
-
function apply(ctx
|
|
9
|
-
ctx.inject(["settings"], (child) => {
|
|
10
|
-
child.effect(() => child.settings.configure({ auto: false }, ctx.fiber));
|
|
11
|
-
});
|
|
5
|
+
/** DSH's own plugin enable/disable lifecycle controls both presentation and Skills. */
|
|
6
|
+
function apply(ctx) {
|
|
12
7
|
ctx.skills.registerProvider((control) => new FileSystemSkillProvider(ctx, control, {
|
|
13
8
|
providerName: "cannbot-harness",
|
|
14
9
|
includeDefaultRoots: false,
|
|
@@ -17,4 +12,4 @@ function apply(ctx, _config) {
|
|
|
17
12
|
}));
|
|
18
13
|
}
|
|
19
14
|
//#endregion
|
|
20
|
-
export {
|
|
15
|
+
export { apply, inject };
|
package/locale/en.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{ "meta": { "title": "CANNBot Harness", "description": "
|
|
1
|
+
{ "meta": { "title": "CANNBot Harness", "description": "CANNBot Harness branding and theme, operator development workflow and 40 bundled Skills.", "detail": "README.md" } }
|
package/locale/zh.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{ "meta": { "title": "CANNBot Harness", "description": "
|
|
1
|
+
{ "meta": { "title": "CANNBot Harness", "description": "CANNBot Harness 品牌与主题、算子开发工作流和 40 个 Skills。", "detail": "README.md" } }
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cannbot-plugin/cannbot-harness",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "CANNBot Harness:
|
|
3
|
+
"version": "0.1.5",
|
|
4
|
+
"description": "CANNBot Harness: DSH interface and bundled operator workflows",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "SEE LICENSE IN THIRD_PARTY_NOTICES.md",
|
|
7
7
|
"main": "lib/index.js",
|
|
@@ -33,7 +33,6 @@
|
|
|
33
33
|
"@deepseek-ai/dsh-client-ui-conversation",
|
|
34
34
|
"@deepseek-ai/dsh-client-ui-sidebar",
|
|
35
35
|
"@deepseek-ai/dsh-client-ui-theme",
|
|
36
|
-
"@deepseek-ai/dsh-client-ui-settings",
|
|
37
36
|
"@deepseek-ai/dsh-client-locale"
|
|
38
37
|
]
|
|
39
38
|
}
|