dsh-qwenwork-connect 0.1.7 → 0.1.9
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/lib/index.js +11 -5
- package/package.json +12 -1
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 {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-qwenwork-connect",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.9",
|
|
4
4
|
"description": "千问办公(QwenWork)的 DSH 模型提供方:device flow 登录、官方网关、支持工具调用",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "AaIchhe",
|
|
@@ -55,5 +55,16 @@
|
|
|
55
55
|
],
|
|
56
56
|
"platform": "web"
|
|
57
57
|
}
|
|
58
|
+
},
|
|
59
|
+
"exports": {
|
|
60
|
+
".": "./lib/index.js",
|
|
61
|
+
"./client": "./lib/client.js",
|
|
62
|
+
"./credentials": "./lib/credentials.js",
|
|
63
|
+
"./rest": "./lib/rest.js",
|
|
64
|
+
"./errors": "./lib/errors.js",
|
|
65
|
+
"./login-device-flow": "./lib/login-device-flow.js",
|
|
66
|
+
"./login-route": "./lib/login-route.js",
|
|
67
|
+
"./cordis.patch.yml": "./cordis.patch.yml",
|
|
68
|
+
"./package.json": "./package.json"
|
|
58
69
|
}
|
|
59
70
|
}
|