@wenaixi/dsh-superpower 7.5.5 → 7.5.6
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 +3 -3
- package/README.zh.md +1 -1
- package/lib/client.js +30 -33
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -28,7 +28,7 @@ dsh --profile web --dump-config | grep -A2 "@wenaixi/dsh-superpower"
|
|
|
28
28
|
dsh --profile web # skills are available immediately
|
|
29
29
|
```
|
|
30
30
|
|
|
31
|
-
Pin a version by appending `@<version>` (`@wenaixi/dsh-superpower@7.5.
|
|
31
|
+
Pin a version by appending `@<version>` (`@wenaixi/dsh-superpower@7.5.6`) or `#v7.5.6`.
|
|
32
32
|
|
|
33
33
|
The old unscoped package name `dsh-superpower` is deprecated (`npm deprecate`); use the scoped one.
|
|
34
34
|
|
|
@@ -82,7 +82,7 @@ The official registry arbitrates same-layer name collisions by ascending `rank`.
|
|
|
82
82
|
Open the `@wenaixi/dsh-superpower` card in the plugin manager; the panel sits at the bottom of its detail page.
|
|
83
83
|
|
|
84
84
|
- One switch per skill. Off means both sides lose it: the model no longer sees it in the available-skill catalog and `skill` tool calls are rejected; you can no longer reach it from slash-command completion or the CLI skill list.
|
|
85
|
-
- A single `中文 / English` button sits at the top of the panel, under the intro line, and switches the
|
|
85
|
+
- A single `中文 / English` button sits at the top of the panel, under the intro line, and switches the description language of all 15 skills at once — only the `Superpower Skill:` text users and the model see. The button label and the descriptions follow the preference; the rest of the panel stays in the Host UI language and skill bodies stay the English originals. The body is always the English original. Both descriptions start with `Superpower Skill:` / `Superpower Skill:`. The choice is per-language (a single `language` preference) and stored in the profile. Until you touch it, descriptions follow the Host UI language (settings language); once you switch it in the panel, the language stays fixed.
|
|
86
86
|
- The panel header also carries enable-all, disable-all, restore-defaults, and a search box. The head line shows this bundle's `provider`, `rank`, `source`, and panel build.
|
|
87
87
|
- Changes take effect immediately; the running turn is unaffected and the next turn sees the new catalog and language.
|
|
88
88
|
- State lives in the profile's `cordis.patch.yml` (`disabled` and `language` tables) and travels with the profile.
|
|
@@ -190,7 +190,7 @@ Since `v7.0.0` skill names follow upstream naming (no `superpower-` prefix) and
|
|
|
190
190
|
|
|
191
191
|
`v7.5.0` shipped every skill with an English body (`SKILL.en.md`, upstream original adapted for DSH) beside the Chinese one, added a per-skill `中文 / English` switch, made English descriptions always start with `Superpower Skill: `, routed the same language preference to the model-side catalog and body, and made README.md English by default with a Chinese twin.
|
|
192
192
|
|
|
193
|
-
`v7.5.
|
|
193
|
+
`v7.5.6` keeps the language button scoped to descriptions only: it switches the `Superpower Skill:` text users and the model see, the button label, and nothing else — the rest of the panel stays in the Host UI language, and skill bodies remain the English originals.: the panel's own copy (title, bulk buttons, search box, hints, meta labels) switches with the skill descriptions instead of following the Host UI language.
|
|
194
194
|
|
|
195
195
|
`v7.5.4` republished under a fresh version: the 7.5.3 release hit an npm staged-publish conflict; the code is identical to 7.5.3.
|
|
196
196
|
|
package/README.zh.md
CHANGED
|
@@ -190,7 +190,7 @@ scripts/build-client.mjs # 复制客户端产物后校验内联清单与 sk
|
|
|
190
190
|
|
|
191
191
|
`v7.5.0` 每个技能新增英文正文(`SKILL.en.md`,取自上游原版并做 DSH 专属化),与中文 `SKILL.md` 并存;面板每行新增「中文 / English」切换,英文描述一律以 `Superpower Skill: ` 开头;同一语言偏好同时决定模型侧目录描述与加载正文;README.md 改为默认英文并新增中文版 README.zh.md。
|
|
192
192
|
|
|
193
|
-
`v7.5.
|
|
193
|
+
`v7.5.6` 语言按钮只控制技能描述(`Superpower Skill:` 后面的文本)与按钮自身文案;面板其余 UI 恢复跟随宿主界面语言,技能正文恒为英文原版。,不再跟随宿主界面语言。
|
|
194
194
|
|
|
195
195
|
`v7.5.4` 改版重发(7.5.3 发布遇 npm staged-publish 冲突,代码内容与 7.5.3 相同)。
|
|
196
196
|
|
package/lib/client.js
CHANGED
|
@@ -34,7 +34,7 @@ window.__ModuleLoader__.load({
|
|
|
34
34
|
var SKILL_SOURCE = 'bundled';
|
|
35
35
|
/* 面板所在的包版本。写死而非从宿主取:浏览器侧读不到 package.json,
|
|
36
36
|
而版本号正是排查「装的是哪一版、界面是不是这一版」时唯一能直接看到的东西。 */
|
|
37
|
-
var PACKAGE_VERSION = '7.5.
|
|
37
|
+
var PACKAGE_VERSION = '7.5.4';
|
|
38
38
|
var NS = 'dsh-superpower';
|
|
39
39
|
var DISABLED_FIELD = 'disabled';
|
|
40
40
|
/* v7.3.0 及之前的双侧禁言表。面板写入成功后会把它们 unset,
|
|
@@ -83,7 +83,7 @@ window.__ModuleLoader__.load({
|
|
|
83
83
|
rank: '优先级',
|
|
84
84
|
source: '来源',
|
|
85
85
|
build: '面板版本',
|
|
86
|
-
langTitle: '
|
|
86
|
+
langTitle: '切换技能描述语言(中文 / English)。只影响用户与模型看到的技能描述,技能正文始终为英文原版。',
|
|
87
87
|
};
|
|
88
88
|
|
|
89
89
|
var en = {
|
|
@@ -104,7 +104,7 @@ window.__ModuleLoader__.load({
|
|
|
104
104
|
rank: 'Priority',
|
|
105
105
|
build: 'Panel build',
|
|
106
106
|
source: 'Source',
|
|
107
|
-
langTitle: 'Switch description language
|
|
107
|
+
langTitle: 'Switch the skill description language (Chinese / English). Affects only the descriptions users and the model see; skill bodies stay the English originals.',
|
|
108
108
|
};
|
|
109
109
|
|
|
110
110
|
/* 官方样式注入契约:style[data-plugin-css="<包名>/<文件名>"],宿主据此在
|
|
@@ -226,13 +226,10 @@ window.__ModuleLoader__.load({
|
|
|
226
226
|
* props.actions 是本面板独占的写操作面。
|
|
227
227
|
*/
|
|
228
228
|
function SkillSwitchPanel(props) {
|
|
229
|
+
var t = props.t;
|
|
229
230
|
var form = props.actions.form;
|
|
230
231
|
var state = props.useSwitches(function (value) { return value; });
|
|
231
232
|
var hostActive = props.useLocaleActive(function (v) { return v && v.preference === 'en' ? 'en' : 'zh'; });
|
|
232
|
-
var language = readLanguage(state.value);
|
|
233
|
-
var effective = language === undefined ? hostActive : language;
|
|
234
|
-
/* 面板 UI 文案按生效语言选词典(宿主界面语言对技能面板不再生效,与语言按钮一致)。 */
|
|
235
|
-
var uiText = function (key) { return (effective === 'zh' ? zh : en)[key]; };
|
|
236
233
|
|
|
237
234
|
var keywordState = React.useState('');
|
|
238
235
|
var keyword = keywordState[0];
|
|
@@ -246,8 +243,8 @@ window.__ModuleLoader__.load({
|
|
|
246
243
|
|
|
247
244
|
if (state.status !== 'ready') {
|
|
248
245
|
return h('div', { className: 'spSw' },
|
|
249
|
-
h('h4', { className: 'spSwTitle' },
|
|
250
|
-
h('p', { className: 'spSwIntro' },
|
|
246
|
+
h('h4', { className: 'spSwTitle' }, t('title')),
|
|
247
|
+
h('p', { className: 'spSwIntro' }, t('hostUnavailable')));
|
|
251
248
|
}
|
|
252
249
|
|
|
253
250
|
var value = state.value || {};
|
|
@@ -284,76 +281,76 @@ window.__ModuleLoader__.load({
|
|
|
284
281
|
h('p', { className: 'spSwDesc' }, skillText(skill)),
|
|
285
282
|
failure ? h('p', { className: 'spSwErr', role: 'alert' }, failure) : null),
|
|
286
283
|
h('div', { className: 'spSwSwitch' },
|
|
287
|
-
h('span', { className: 'spSwSwitchLabel' },
|
|
284
|
+
h('span', { className: 'spSwSwitchLabel' }, t('invocable')),
|
|
288
285
|
h(P.Switch, {
|
|
289
286
|
checked: on,
|
|
290
287
|
disabled: busy,
|
|
291
|
-
label:
|
|
292
|
-
title:
|
|
288
|
+
label: t('invocable') + ' ' + skill.name,
|
|
289
|
+
title: t('invocableHint'),
|
|
293
290
|
onChange: function (next) {
|
|
294
|
-
submit(form,
|
|
291
|
+
submit(form, t, [skill.name], next ? 'enable' : 'disable', setPending, setFailures);
|
|
295
292
|
},
|
|
296
293
|
})));
|
|
297
294
|
});
|
|
298
295
|
|
|
299
296
|
return h('div', { className: 'spSw' },
|
|
300
|
-
h('h4', { className: 'spSwTitle' },
|
|
301
|
-
h('p', { className: 'spSwIntro' },
|
|
297
|
+
h('h4', { className: 'spSwTitle' }, t('title')),
|
|
298
|
+
h('p', { className: 'spSwIntro' }, t('intro')),
|
|
302
299
|
h('div', { className: 'spSwLangBar' },
|
|
303
300
|
h('button', {
|
|
304
301
|
className: 'spSwLangBtn',
|
|
305
302
|
type: 'button',
|
|
306
303
|
disabled: !writable,
|
|
307
|
-
title:
|
|
304
|
+
title: t('langTitle'),
|
|
308
305
|
onClick: function () {
|
|
309
306
|
var effective = language === undefined ? hostActive : language;
|
|
310
|
-
submit(form,
|
|
307
|
+
submit(form, t, ['language'], 'enable', setPending, setFailures,
|
|
311
308
|
[{ op: 'set', path: [LANGUAGE_FIELD], value: effective === 'zh' ? 'en' : 'zh' }]);
|
|
312
309
|
},
|
|
313
310
|
}, (language === undefined ? hostActive : language) === 'zh' ? SP_LANG_EN : SP_LANG_ZH)),
|
|
314
311
|
h('ul', { className: 'spSwMeta' },
|
|
315
|
-
h('li', { className: 'spSwMetaItem' },
|
|
316
|
-
h('li', { className: 'spSwMetaItem' },
|
|
317
|
-
h('li', { className: 'spSwMetaItem' },
|
|
318
|
-
h('li', { className: 'spSwMetaItem' },
|
|
312
|
+
h('li', { className: 'spSwMetaItem' }, t('provider'), h('code', null, PROVIDER_NAME)),
|
|
313
|
+
h('li', { className: 'spSwMetaItem' }, t('rank'), h('code', null, String(PROVIDER_RANK))),
|
|
314
|
+
h('li', { className: 'spSwMetaItem' }, t('source'), h('code', null, SKILL_SOURCE)),
|
|
315
|
+
h('li', { className: 'spSwMetaItem' }, t('build'), h('code', null, PACKAGE_VERSION))),
|
|
319
316
|
h('div', { className: 'spSwBar' },
|
|
320
317
|
h(P.Button, {
|
|
321
318
|
variant: 'outline',
|
|
322
319
|
size: 'sm',
|
|
323
320
|
disabled: !writable,
|
|
324
|
-
title:
|
|
321
|
+
title: t('resetHint'),
|
|
325
322
|
onClick: function () {
|
|
326
|
-
submit(form,
|
|
323
|
+
submit(form, t, allNames, 'enable', setPending, setFailures);
|
|
327
324
|
},
|
|
328
|
-
},
|
|
325
|
+
}, t('enableAll')),
|
|
329
326
|
h(P.Button, {
|
|
330
327
|
variant: 'outline',
|
|
331
328
|
size: 'sm',
|
|
332
329
|
disabled: !writable,
|
|
333
|
-
title:
|
|
330
|
+
title: t('disableAllHint'),
|
|
334
331
|
onClick: function () {
|
|
335
|
-
submit(form,
|
|
332
|
+
submit(form, t, allNames, 'disable', setPending, setFailures);
|
|
336
333
|
},
|
|
337
|
-
},
|
|
334
|
+
}, t('disableAll')),
|
|
338
335
|
h(P.Button, {
|
|
339
336
|
variant: 'ghost',
|
|
340
337
|
size: 'sm',
|
|
341
338
|
disabled: !writable,
|
|
342
|
-
title:
|
|
339
|
+
title: t('resetHint'),
|
|
343
340
|
onClick: function () {
|
|
344
|
-
submit(form,
|
|
341
|
+
submit(form, t, allNames, 'enable', setPending, setFailures);
|
|
345
342
|
},
|
|
346
|
-
},
|
|
343
|
+
}, t('resetAll')),
|
|
347
344
|
h(P.Input, {
|
|
348
345
|
className: 'spSwSearch',
|
|
349
346
|
type: 'search',
|
|
350
347
|
value: keyword,
|
|
351
|
-
placeholder:
|
|
352
|
-
'aria-label':
|
|
348
|
+
placeholder: t('search'),
|
|
349
|
+
'aria-label': t('search'),
|
|
353
350
|
onChange: function (event) { setKeyword(event.target.value); },
|
|
354
351
|
})),
|
|
355
352
|
shown.length === 0
|
|
356
|
-
? h('p', { className: 'spSwEmpty' },
|
|
353
|
+
? h('p', { className: 'spSwEmpty' }, t('empty'))
|
|
357
354
|
: h('ul', { className: 'spSwList' }, rows));
|
|
358
355
|
}
|
|
359
356
|
|