dsh-client-auto-continue 0.11.7 → 0.11.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
@@ -83,6 +83,8 @@ DSH plugins install into a **profile** (`dsh web` → `web` profile). Install, r
83
83
 
84
84
  > **Use the latest DSH (recommended: 0.1.2-alpha.4 or newer).** Run `dsh --version` before installing. Plugin v0.11.1 supports the settings API used by DSH 0.1.2-alpha.2+ (including alpha.3 and alpha.4) while retaining compatibility with DSH 0.1.0-rc.7 through 0.1.1; rc.6 and earlier remain unsupported (`list slot ... requires options.id`). Preview releases may appear on the [official DSH releases page](https://github.com/deepseek-ai/deepseek-harness/releases) before the public npm tag catches up.
85
85
 
86
+ Plugin v0.11.8 also supports DSH 0.1.7-alpha.2's `configForms` API. Open **Plugins → dsh-client-auto-continue** for its settings; older DSH versions retain **Settings → Plugins**. This fixes the startup error `pending (waiting for service: settingsScope)` on the newer API.
87
+
86
88
  ### From npm (recommended)
87
89
 
88
90
  Published as [`dsh-client-auto-continue`](https://www.npmjs.com/package/dsh-client-auto-continue):
@@ -266,7 +268,7 @@ npm run test # node tests/simulate-host.mjs — 15 host-side behavioral s
266
268
 
267
269
  While `npm run watch` runs, the profile's client-hmr row polls `lib/client.js` every 500 ms and hot-reloads the plugin in the browser — no server restart needed for code changes.
268
270
 
269
- CI installs from the lockfile, typechecks, rebuilds and verifies committed artifacts, runs the host and dual-layout client simulations, then runs [dsh-plugin-check](https://github.com/omdsh-dev/dsh-plugin-check). The same health check gates releases.
271
+ CI installs from the lockfile, typechecks, rebuilds and verifies committed artifacts, runs the host and client simulations (including legacy settings scopes and DSH 0.1.7 configuration forms through Cordis), then runs [dsh-plugin-check](https://github.com/omdsh-dev/dsh-plugin-check). The same health check gates releases.
270
272
 
271
273
  ---
272
274
 
package/README.zh.md CHANGED
@@ -83,6 +83,8 @@ DSH 插件安装进 **profile**(`dsh web` 对应 `web` profile)。安装后重
83
83
 
84
84
  > **请使用最新 DSH(推荐 0.1.2-alpha.4 或更高版本)。** 安装前先运行 `dsh --version`。插件 v0.11.1 已支持 DSH 0.1.2-alpha.2+ 使用的设置 API(包括 alpha.3 和 alpha.4), 同时继续兼容 DSH 0.1.0-rc.7 至 0.1.1; rc.6 及更早版本仍不支持(`list slot ... requires options.id`)。预览版可能先发布在 [DSH 官方 Releases](https://github.com/deepseek-ai/deepseek-harness/releases), 公开 npm 标签会稍后跟进。
85
85
 
86
+ 插件 v0.11.8 也已支持 DSH 0.1.7-alpha.2 的 `configForms` API。新版从 **插件 → dsh-client-auto-continue** 进入设置, 旧版仍从 **设置 → 插件** 进入。此适配修复了新版启动时的 `pending (waiting for service: settingsScope)` 错误。
87
+
86
88
  ### 从 npm 安装(推荐)
87
89
 
88
90
  已发布为 [`dsh-client-auto-continue`](https://www.npmjs.com/package/dsh-client-auto-continue):
@@ -266,7 +268,7 @@ npm run test # node tests/simulate-host.mjs — 15 个 host 侧行为场
266
268
 
267
269
  `npm run watch` 运行时, profile 的 client-hmr 行每 500ms 轮询 `lib/client.js` 并在浏览器中热重载插件——改代码无需重启服务。
268
270
 
269
- CI 会按锁文件安装依赖, 执行类型检查、重新构建并核对已提交产物, 跑 host 与双模块布局 client 模拟测试, 最后运行 [dsh-plugin-check](https://github.com/omdsh-dev/dsh-plugin-check); 发布也受同一体检门禁约束。
271
+ CI 会按锁文件安装依赖, 执行类型检查、重新构建并核对已提交产物, 跑 host 与 client 模拟测试(包括通过 Cordis 加载旧版 settings scope 和 DSH 0.1.7 configuration form), 最后运行 [dsh-plugin-check](https://github.com/omdsh-dev/dsh-plugin-check); 发布也受同一体检门禁约束。
270
272
 
271
273
  ---
272
274
 
package/lib/client.js CHANGED
@@ -482,7 +482,12 @@ var CardForm = class {
482
482
  this.saving = false;
483
483
  this.failed = false;
484
484
  this.specs = new Map(specs.map((spec) => [spec.field, spec]));
485
- this.scope.subscribe(() => this.publish());
485
+ this.unsubscribe = this.scope.subscribe(() => this.publish());
486
+ }
487
+ /** Release this editor's listeners without disposing the provider's shared form. */
488
+ dispose() {
489
+ this.unsubscribe();
490
+ this.listeners.clear();
486
491
  }
487
492
  /** Publish a projection of this form, rebuilt whenever the scope or a draft changes. */
488
493
  bind(project, createStore) {
@@ -1090,7 +1095,14 @@ var AutoContinueSettingsCardController = class {
1090
1095
  inject() {
1091
1096
  return { hooks: { autoContinueSettingsCard: this.store }, ...this.form.actions() };
1092
1097
  }
1098
+ /** Release this card's subscription to the provider-owned settings form. */
1099
+ dispose() {
1100
+ this.form.dispose();
1101
+ }
1093
1102
  };
1103
+ function AutoContinueSettingsPage(props) {
1104
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("ul", { style: { listStyle: "none", margin: 0, padding: 0 }, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AutoContinueSettingsCard, { ...props }) });
1105
+ }
1094
1106
  var REPOSITORY_URL = "https://github.com/HsiangNianian/dsh-auto-continue";
1095
1107
  var REPOSITORY_SLUG = "HsiangNianian/dsh-auto-continue";
1096
1108
  function RelayMark() {
@@ -1795,10 +1807,19 @@ function AutoContinueSettingsCard(props) {
1795
1807
  // src/client/index.ts
1796
1808
  var NS = "auto-continue";
1797
1809
  var SETTINGS_NS = "auto-continue";
1798
- var inject = ["slots", "locale", "settingsScope"];
1810
+ var inject = ["slots", "locale"];
1799
1811
  function apply(ctx) {
1800
1812
  ctx.effect(() => ctx.locale.register(NS, { zh, en }), "auto-continue: dictionaries");
1801
- const scope = ctx.settingsScope.bind({ namespace: SETTINGS_NS });
1813
+ ctx.effect(() => startBridge(), "auto-continue: host bridge");
1814
+ ctx.inject(["settingsScope"], (settingsCtx) => {
1815
+ mountSettings(settingsCtx, settingsCtx.settingsScope.bind({ namespace: SETTINGS_NS }));
1816
+ });
1817
+ ctx.inject(["configForms"], (settingsCtx) => {
1818
+ const forms = settingsCtx.configForms;
1819
+ mountSettings(settingsCtx, forms.get(SETTINGS_NS));
1820
+ });
1821
+ }
1822
+ function mountSettings(ctx, scope) {
1802
1823
  const MAX_MIRROR_ATTEMPTS = 3;
1803
1824
  let mirroredLocale;
1804
1825
  let mirrorAttempts = 0;
@@ -1818,8 +1839,8 @@ function apply(ctx) {
1818
1839
  ctx.effect(() => scope.subscribe(syncLocale), "auto-continue: locale settings sync");
1819
1840
  ctx.on("locale/change", syncLocale);
1820
1841
  syncLocale();
1821
- ctx.effect(() => startBridge(), "auto-continue: host bridge");
1822
1842
  const controller = new AutoContinueSettingsCardController(scope);
1843
+ ctx.effect(() => () => controller.dispose(), "auto-continue: settings form");
1823
1844
  ctx.slots.inject(
1824
1845
  "settings.plugin.item",
1825
1846
  () => ctx.slots.register(
@@ -1832,6 +1853,18 @@ function apply(ctx) {
1832
1853
  AutoContinueSettingsCard
1833
1854
  )
1834
1855
  );
1856
+ ctx.slots.inject(
1857
+ "plugins.bundle.config",
1858
+ () => ctx.slots.register(
1859
+ {
1860
+ name: "plugins.bundle.config",
1861
+ key: "dsh-client-auto-continue",
1862
+ locale: NS,
1863
+ inject: () => controller.inject()
1864
+ },
1865
+ AutoContinueSettingsPage
1866
+ )
1867
+ );
1835
1868
  }
1836
1869
  //# sourceMappingURL=client.js.map
1837
1870
  return module.exports;