dsh-quick-toc 0.7.5 → 0.7.6
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/CHANGELOG.en.md +5 -0
- package/CHANGELOG.md +5 -0
- package/README.en.md +1 -1
- package/README.md +1 -1
- package/lib/client.js +69 -25
- package/package.json +1 -1
package/CHANGELOG.en.md
CHANGED
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to **dsh-quick-toc** are documented here. Chinese version: [CHANGELOG.md](CHANGELOG.md).
|
|
4
4
|
|
|
5
|
+
## [0.7.6] - 2026-09-24
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
- **On the 0.1.7 line the settings card's writes only reached the browser**: on a profile whose entry id differs from the first candidate name (the real profile names the entry `dsh-quick-toc` while the first candidate is `quick-toc`), the `configForms.describe()` view was still EMPTY at the moment the plugin applied, so the code that looks up the settings namespace guessed a candidate name the host does not serve and bound a form that never became ready. The card still opened and still took clicks, but every write fell back to this browser's mirror while the settings document (the profile's `cordis.patch.yml` on 0.1.7) stayed untouched — and the console stayed silent. Now an empty view means "the document has not arrived", not "the host serves nothing": the plugin no longer guesses, it subscribes to `describe()` and binds once the document is there, and only then registers the card; a host that never serves a document still gets the card after 4 seconds, reading and writing the browser mirror (the documented fallback layer). Verified on both lines: on 0.1.7-rc.1 the profile's `cordis.patch.yml` gained `lang: en`, on 0.1.5-rc.3 `settings.yaml`'s `dsh-quick-toc:` became `{ handle: 0.6, autoLoad: false, lang: en }`.
|
|
9
|
+
|
|
5
10
|
## [0.7.5] - 2026-09-24
|
|
6
11
|
|
|
7
12
|
### Changed
|
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
**dsh-quick-toc** 的重要变更都记录在这里。英文版见 [CHANGELOG.en.md](CHANGELOG.en.md)。
|
|
4
4
|
|
|
5
|
+
## [0.7.6] - 2026-09-24
|
|
6
|
+
|
|
7
|
+
### 修复
|
|
8
|
+
- **0.1.7 线上设置卡片的写入只落在浏览器里**:入口 id 与候选名不一致的 profile 上(例如真实 profile 把入口命名为 `dsh-quick-toc`,而候选表第一个是 `quick-toc`),插件加载的那一刻 `configForms.describe()` 的视图**还没到**(实测返回空表),于是找设置命名空间的那段代码按候选名猜了一个**宿主并不服务**的名字,绑上一个永远不就绪的表单——卡片照常能开能点,但所有写入都退回本浏览器的镜像,设置文档(0.1.7 上是 profile 的 `cordis.patch.yml`)永远不动,而且控制台没有任何报错。现在:视图为空时**不再猜名字**(空 ≠ 宿主不服务),改为订阅 `describe()` 并在文档到位后绑定,绑定成功才注册卡片;宿主始终不给文档时 4 秒后仍注册卡片、退回本地镜像这个既有的降级层。0.1.7-rc.1 与 0.1.5-rc.3 两条线都实测确认写入落盘(前者 `cordis.patch.yml` 新增 `lang: en`,后者 `settings.yaml` 的 `dsh-quick-toc:` 变成 `{ handle: 0.6, autoLoad: false, lang: en }`)。
|
|
9
|
+
|
|
5
10
|
## [0.7.5] - 2026-09-24
|
|
6
11
|
|
|
7
12
|
### 变更
|
package/README.en.md
CHANGED
|
@@ -42,7 +42,7 @@ A conversation TOC plugin for [DeepSeek Harness](https://github.com/deepseek-ai/
|
|
|
42
42
|
|
|
43
43
|
| Plugin | Supported DSH |
|
|
44
44
|
| --- | --- |
|
|
45
|
-
| **0.7.x** (latest, 0.7.
|
|
45
|
+
| **0.7.x** (latest, 0.7.6) | 0.1.5-rc.3, 0.1.7-alpha.1, 0.1.7-alpha.2, 0.1.7-rc.1 |
|
|
46
46
|
| 0.6.x (0.6.3) | 0.1.5-rc.1, 0.1.5-rc.2 |
|
|
47
47
|
| 0.5.x (0.5.1) | 0.1.5-rc.1, 0.1.5-rc.2 |
|
|
48
48
|
| 0.4.x (0.4.1) | 0.1.5-rc.1, 0.1.5-rc.2 |
|
package/README.md
CHANGED
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
|
|
43
43
|
| 插件版本 | 支持的 DSH 版本 |
|
|
44
44
|
| --- | --- |
|
|
45
|
-
| **0.7.x**(最新,0.7.
|
|
45
|
+
| **0.7.x**(最新,0.7.6) | 0.1.5-rc.3、0.1.7-alpha.1、0.1.7-alpha.2、0.1.7-rc.1 |
|
|
46
46
|
| 0.6.x(0.6.3) | 0.1.5-rc.1、0.1.5-rc.2 |
|
|
47
47
|
| 0.5.x(0.5.1) | 0.1.5-rc.1、0.1.5-rc.2 |
|
|
48
48
|
| 0.4.x(0.4.1) | 0.1.5-rc.1、0.1.5-rc.2 |
|
package/lib/client.js
CHANGED
|
@@ -7335,6 +7335,13 @@ window.__ModuleLoader__.load({
|
|
|
7335
7335
|
try { json = JSON.stringify(ns.schema || {}); } catch (e) { json = ""; }
|
|
7336
7336
|
if (json.indexOf("sheetZoom") >= 0 && json.indexOf("autoLoad") >= 0) return ns.ns;
|
|
7337
7337
|
}
|
|
7338
|
+
// An EMPTY describe view means the settings document has not arrived yet
|
|
7339
|
+
// (measured on 0.1.7-rc.1: `served=[]` while the document loads), NOT that
|
|
7340
|
+
// the host serves nothing. Guessing a candidate name here binds the card
|
|
7341
|
+
// to a form that never answers, and every write silently stayed in this
|
|
7342
|
+
// browser's mirror instead of the settings document; the caller waits for
|
|
7343
|
+
// the view instead.
|
|
7344
|
+
if (served.length === 0) return null;
|
|
7338
7345
|
for (var j = 0; j < candidates.length; j++) {
|
|
7339
7346
|
try {
|
|
7340
7347
|
var form = forms.get(candidates[j]);
|
|
@@ -7352,7 +7359,7 @@ window.__ModuleLoader__.load({
|
|
|
7352
7359
|
if (forms.get(candidates[k])) return candidates[k];
|
|
7353
7360
|
} catch (e) { /* try the next candidate */ }
|
|
7354
7361
|
}
|
|
7355
|
-
return
|
|
7362
|
+
return null;
|
|
7356
7363
|
};
|
|
7357
7364
|
var pickSettingsScope = function () {
|
|
7358
7365
|
var scope = getService("settingsScope");
|
|
@@ -7365,34 +7372,23 @@ window.__ModuleLoader__.load({
|
|
|
7365
7372
|
var forms = getService("configForms");
|
|
7366
7373
|
if (forms && typeof forms.get === "function") {
|
|
7367
7374
|
try {
|
|
7368
|
-
|
|
7375
|
+
var ns = formsNamespace(forms);
|
|
7376
|
+
// null = the describe view has not arrived: no scope yet, the caller
|
|
7377
|
+
// waits for it instead of binding to a name the host does not serve.
|
|
7378
|
+
if (ns === null) return null;
|
|
7379
|
+
return forms.get(ns);
|
|
7369
7380
|
} catch (e) { /* leave the localStorage layer in charge */ }
|
|
7370
7381
|
}
|
|
7371
7382
|
return null;
|
|
7372
7383
|
};
|
|
7373
|
-
|
|
7374
|
-
|
|
7375
|
-
|
|
7376
|
-
|
|
7377
|
-
|
|
7378
|
-
|
|
7379
|
-
|
|
7380
|
-
|
|
7381
|
-
}
|
|
7382
|
-
|
|
7383
|
-
// The plugin-configuration card, in whichever seat the running host offers:
|
|
7384
|
-
// * up to rc.2 it is a keyed `settings.plugin.item` cell under
|
|
7385
|
-
// Settings → Plugins → Plugin configuration, keyed by the settings namespace;
|
|
7386
|
-
// * on the alpha the plugin's own page in the sidebar's Plugins list carries it,
|
|
7387
|
-
// as the bundle's configuration keyed by the npm package name
|
|
7388
|
-
// (`plugins.bundle.config`). A row-level cell (`plugins.row.config`, keyed
|
|
7389
|
-
// `<package>#<row id>`) exists too, but a registration there did not reach that
|
|
7390
|
-
// page in 0.1.7-alpha.1 while the bundle cell did — and these preferences are the
|
|
7391
|
-
// plugin's, not one row's, so the bundle page is the right seat anyway.
|
|
7392
|
-
// Registering into a slot a given host never declares is inert (the registration
|
|
7393
|
-
// waits), so both are offered unconditionally, and only once a scope bound keeps a
|
|
7394
|
-
// half-configured host from rendering a card that could not read or write anything.
|
|
7395
|
-
if (boundScope) {
|
|
7384
|
+
// Host layer first: bind it, and on 0.1.7 WAIT for the settings document —
|
|
7385
|
+
// its `configForms` describe view is empty until the document arrives, and
|
|
7386
|
+
// binding a guessed namespace there left the card reading and writing this
|
|
7387
|
+
// browser's mirror while the settings document sat untouched.
|
|
7388
|
+
var seatsOffered = false;
|
|
7389
|
+
var offerSeats = function () {
|
|
7390
|
+
if (seatsOffered) return;
|
|
7391
|
+
seatsOffered = true;
|
|
7396
7392
|
ctx.slots.inject("plugins.bundle.config", function () {
|
|
7397
7393
|
return ctx.slots.register({
|
|
7398
7394
|
name: "plugins.bundle.config",
|
|
@@ -7407,7 +7403,55 @@ window.__ModuleLoader__.load({
|
|
|
7407
7403
|
locale: "dsh-quick-toc"
|
|
7408
7404
|
}, TocSettingsCard);
|
|
7409
7405
|
});
|
|
7406
|
+
};
|
|
7407
|
+
var tryAttachHost = function () {
|
|
7408
|
+
var scope = pickSettingsScope();
|
|
7409
|
+
if (!scope) return false;
|
|
7410
|
+
try {
|
|
7411
|
+
prefsStore.attachHost(scope);
|
|
7412
|
+
} catch (e) {
|
|
7413
|
+
console.warn("[dsh-quick-toc] settings scope unavailable, preferences stay in this browser:", e);
|
|
7414
|
+
return false;
|
|
7415
|
+
}
|
|
7416
|
+
offerSeats();
|
|
7417
|
+
return true;
|
|
7418
|
+
};
|
|
7419
|
+
if (!tryAttachHost()) {
|
|
7420
|
+
var formsMirror = null;
|
|
7421
|
+
try {
|
|
7422
|
+
var formsService = getService("configForms");
|
|
7423
|
+
formsMirror = formsService && typeof formsService.describe === "function" ? formsService.describe() : null;
|
|
7424
|
+
} catch (e) { formsMirror = null; }
|
|
7425
|
+
if (formsMirror && typeof formsMirror.subscribe === "function") {
|
|
7426
|
+
var offMirror = null;
|
|
7427
|
+
var adopt = function () {
|
|
7428
|
+
if (tryAttachHost() && typeof offMirror === "function") offMirror();
|
|
7429
|
+
};
|
|
7430
|
+
offMirror = formsMirror.subscribe(adopt);
|
|
7431
|
+
if (typeof formsMirror.ensure === "function") formsMirror.ensure();
|
|
7432
|
+
adopt();
|
|
7433
|
+
}
|
|
7434
|
+
// A host that never serves a document still gets the card, reading and
|
|
7435
|
+
// writing this browser's mirror — the documented fallback layer. The
|
|
7436
|
+
// delay only exists so a slow document is preferred over the fallback.
|
|
7437
|
+
if (!seatsOffered) {
|
|
7438
|
+
setTimeout(function () {
|
|
7439
|
+
if (!seatsOffered) offerSeats();
|
|
7440
|
+
}, 4000);
|
|
7441
|
+
}
|
|
7410
7442
|
}
|
|
7443
|
+
|
|
7444
|
+
// The plugin-configuration card, in whichever seat the running host offers:
|
|
7445
|
+
// * up to rc.2 it is a keyed `settings.plugin.item` cell under
|
|
7446
|
+
// Settings → Plugins → Plugin configuration, keyed by the settings namespace;
|
|
7447
|
+
// * on the alpha the plugin's own page in the sidebar's Plugins list carries it,
|
|
7448
|
+
// as the bundle's configuration keyed by the npm package name
|
|
7449
|
+
// (`plugins.bundle.config`). A row-level cell (`plugins.row.config`, keyed
|
|
7450
|
+
// `<package>#<row id>`) exists too, but a registration there did not reach that
|
|
7451
|
+
// page in 0.1.7-alpha.1 while the bundle cell did — and these preferences are the
|
|
7452
|
+
// plugin's, not one row's, so the bundle page is the right seat anyway.
|
|
7453
|
+
// Registering into a slot a given host never declares is inert, so both are
|
|
7454
|
+
// offered together, once the host layer bound (or the fallback timer fired).
|
|
7411
7455
|
}
|
|
7412
7456
|
|
|
7413
7457
|
exports.name = "dsh-quick-toc"; // runner attributes slot entries to this registrant
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-quick-toc",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.6",
|
|
4
4
|
"description": "Conversation TOC for DeepSeek Harness (DSH): a whole-session, turn-grouped Markdown outline with hover previews, a level filter, a full-width curtain, jump-to-end buttons, title/full-text/cross-session search and a Chinese/English interface.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|