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 CHANGED
@@ -17,12 +17,18 @@
17
17
  ## 安装
18
18
 
19
19
  ```bash
20
- dsh plugin --profile web add github:AlaIchhe/dsh-qwenwork-connect
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
- settingsCtx.settings.installSection(ctx, QWENWORK_SETTINGS_NS, Config, config ?? {}, {
360
- setSource() {},
361
- onChange() {},
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: false,
425
+ declared: true,
420
426
  },
421
427
  ]);
422
428
  } finally {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-qwenwork-connect",
3
- "version": "0.1.6",
3
+ "version": "0.1.8",
4
4
  "description": "千问办公(QwenWork)的 DSH 模型提供方:device flow 登录、官方网关、支持工具调用",
5
5
  "license": "MIT",
6
6
  "author": "AaIchhe",