dsh-qwenwork-connect 0.1.6 → 0.1.8
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 +8 -2
- package/lib/index.js +11 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -17,12 +17,18 @@
|
|
|
17
17
|
## 安装
|
|
18
18
|
|
|
19
19
|
```bash
|
|
20
|
-
dsh plugin --profile web add
|
|
20
|
+
dsh plugin --profile web add dsh-qwenwork-connect
|
|
21
21
|
```
|
|
22
22
|
|
|
23
|
-
还没发 npm,所以用 github 源装;出包之后可以直接 `add dsh-qwenwork-connect`。
|
|
24
23
|
装完重启 DSH,模型选择器里会多出 `qwenwork` 下三个模型。
|
|
25
24
|
|
|
25
|
+
发布走 GitHub Actions + npm trusted publishing,打 tag 就自动发,不需要 token,
|
|
26
|
+
也不需要 2FA:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
npm version patch && git push --follow-tags
|
|
30
|
+
```
|
|
31
|
+
|
|
26
32
|
## 登录
|
|
27
33
|
|
|
28
34
|
第一次用需要一份凭据:
|
package/lib/index.js
CHANGED
|
@@ -356,10 +356,16 @@ export function apply(ctx, config) {
|
|
|
356
356
|
const Config = z.object({});
|
|
357
357
|
ctx.inject(['settings'], (settingsCtx) => {
|
|
358
358
|
try {
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
359
|
+
// DSH 0.2.x 起 settings 服务改用 configure(presentation, fiber),
|
|
360
|
+
// 旧的 installSection 已被移除;两者都试一下,缺哪个都不影响 provider。
|
|
361
|
+
if (typeof settingsCtx.settings.installSection === 'function') {
|
|
362
|
+
settingsCtx.settings.installSection(ctx, QWENWORK_SETTINGS_NS, Config, config ?? {}, {
|
|
363
|
+
setSource() {},
|
|
364
|
+
onChange() {},
|
|
365
|
+
});
|
|
366
|
+
} else if (typeof settingsCtx.settings.configure === 'function') {
|
|
367
|
+
settingsCtx.settings.configure({}, ctx.fiber);
|
|
368
|
+
}
|
|
363
369
|
} catch (error) {
|
|
364
370
|
ctx.logger?.warn('dsh-qwenwork-connect: settings section unavailable', error);
|
|
365
371
|
}
|
|
@@ -416,7 +422,7 @@ export function apply(ctx, config) {
|
|
|
416
422
|
displayName: 'QwenWork',
|
|
417
423
|
settingsNs: QWENWORK_SETTINGS_NS,
|
|
418
424
|
settingsPath: [],
|
|
419
|
-
declared:
|
|
425
|
+
declared: true,
|
|
420
426
|
},
|
|
421
427
|
]);
|
|
422
428
|
} finally {
|