dsh-qwenwork-connect 0.1.7 → 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/lib/index.js +11 -5
- package/package.json +1 -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 {
|