dsh-quick-toc 0.6.0 → 0.6.2
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 +28 -0
- package/CHANGELOG.md +28 -0
- package/README.en.md +9 -8
- package/README.md +9 -8
- package/lib/client.js +4587 -4257
- package/lib/index.js +12 -0
- package/package.json +1 -1
package/CHANGELOG.en.md
CHANGED
|
@@ -2,6 +2,34 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to **dsh-quick-toc** are documented here. Chinese version: [CHANGELOG.md](CHANGELOG.md).
|
|
4
4
|
|
|
5
|
+
## [0.6.2] - 2026-09-15
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
- **A vertical position for the collapsed handle**: the card gains a "Handle position" row — a **0%–100% slider in 1% steps** that decides where the edge handle sits vertically once the panel is collapsed: `0%` at the bottom, `100%` at the top, and `50%` (the previously fixed centred spot) by default. The handle follows that height on whichever edge the panel is docked to.
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
- **Writing a default value back means "not customized"**: as soon as a card field is back at its default (a slider returned to the default step, a switch returned to its default state, the level set back to the default selection), the entry leaves the document's user layer — the "customized" badge and that field's "Reset" go with it, exactly as if it had never been changed. 0.6.1 and earlier pinned the default into the settings document and kept the badge.
|
|
12
|
+
|
|
13
|
+
### Fixed
|
|
14
|
+
- **A panel size could fail to reach storage**: the size write is debounced by 0.4s, and the "already published" record was advanced the moment a write was scheduled — so a second adjustment inside that window (dragging the height, dragging the top bar, toggling a level or the fuzzy switch) cancelled the pending write while the record already counted it as published, and that size was never written again. Measured: drag the width 200 → 150 and then drag the height, and the stored width stayed 200 — the next load brought the panel back 200px wide. The record now advances only when the write really happens, and a cancelled write is issued again on the next pass.
|
|
15
|
+
- **A narrow or short panel's size was stored in vain**: the limits used when reading a size back disagreed with the drag limits — dragging allows 120px wide and 60px high, but anything under 180px wide / 160px high was discarded as invalid on the next load, dropping the panel back to the default width. Both sides now share the same floors (120px / 60px).
|
|
16
|
+
- **The first height drag jumped while the height was "auto"**: the drag started from a fixed 400px guess, so a panel that was in fact taller or shorter jumped to a wrong height on the very first move. It now starts from the panel's measured height (the visual height after the panel scale — the unit that gets stored), falling back to 400px only when nothing can be measured.
|
|
17
|
+
|
|
18
|
+
## [0.6.1] - 2026-09-15
|
|
19
|
+
|
|
20
|
+
### Added
|
|
21
|
+
- **A panel-scale slider**: the card gains a "Panel scale" row — a **50%–200% slider in 5% steps** (the same control shape as the font-tune plugin's slider) that scales the panel's **content** (text, icons, buttons and their spacing). The scale does **not** change the panel's own size: a width and height dragged to some size stay exactly that size at 50% and at 200%, so magnifying simply shows less on screen at once. Dragging only moves the readout and the settings document is written **once the pointer is released** (no rewrite per notch); the readout keeps the dragged value until the host confirms it, so it never flashes back to the old number.
|
|
22
|
+
- **A narrow panel's header**: the four buttons stay on one line — the empty middle gives way first, and once the buttons would touch, the row becomes sideways-scrollable (the wheel over the header reaches the buttons behind the edge) while the grey grab bar above fades out.
|
|
23
|
+
|
|
24
|
+
### Changed
|
|
25
|
+
- **The jump animation goes back to the browser's own smooth scrolling**: the motion is handed to the container's `scrollTo({behavior:"smooth"})` — advanced on the wall clock, so it takes the same time on a 60Hz and a 240Hz panel, and it coasts to a stop. Three guards remain: step out of DSH's stick-to-bottom zone before jumping; re-aim once when the target's live offset drifts by more than 40px (the host re-paging moves it); and re-issue the call when the animation was cut short by the host's own compensation scroll (more than 400ms with less than a pixel of movement). Only a browser that carries the call out as an instant jump falls back to the plugin's frame-by-frame glide (also timed in milliseconds, quick off the mark and coasting to a stop).
|
|
26
|
+
- **Panel size limits removed**: the width used to be clamped to 180–560px and the height had a 160px floor. Only a "still draggable back" floor of 120px wide / 60px high remains; how large or small it gets is the reader's call.
|
|
27
|
+
- **The panel scale acts on the content only** (see above): the factor applies inside the panel, so the panel's own width, height, position, collapse clip and collapse animation are untouched.
|
|
28
|
+
|
|
29
|
+
### Fixed
|
|
30
|
+
- **Long jumps were an instant jump on a 240Hz panel**: 0.6.0's frame-by-frame glide was timed in **frames** (22–46 of them), and 46 frames is only about 190ms on a 240Hz display (measured: 5078px in 188ms, roughly four times too fast), which reads as a teleport or a uniform blur; the same frame count is about 770ms at 60Hz, which is why neither the offline tests nor a headless browser could see it. The animation is now timed in real milliseconds, independent of the refresh rate.
|
|
31
|
+
- **A dragged panel size sprang back to its old size**: the panel kept "what I published" and "what I adopted from outside" in one ledger. Any settings write or host snapshot refresh during a drag then compared the **not-yet-persisted** old value against that ledger and pulled the panel back to its previous size, cancelling the pending write — the drag was silently undone. The two directions are now kept apart: a value is adopted only when it differs from both the panel's live state and the value the panel itself just sent, and size/position are never read back from the settings at all (this panel is their only writer, so a read could only ever return a stale copy).
|
|
32
|
+
|
|
5
33
|
## [0.6.0] - 2026-09-14
|
|
6
34
|
|
|
7
35
|
### Added
|
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,34 @@
|
|
|
2
2
|
|
|
3
3
|
**dsh-quick-toc** 的重要变更都记录在这里。英文版见 [CHANGELOG.en.md](CHANGELOG.en.md)。
|
|
4
4
|
|
|
5
|
+
## [0.6.2] - 2026-09-15
|
|
6
|
+
|
|
7
|
+
### 新增
|
|
8
|
+
- **收起把手的垂直位置**:设置卡片里新增「把手位置」——**0%–100%、每档 1%** 的滑块,决定面板收起后那枚边缘把手停在对话区的什么高度:`0%` 在最下、`100%` 在最上,默认 `50%`(就是原先固定的居中位置)。无论面板停在哪一侧,把手都按这个高度贴边。
|
|
9
|
+
|
|
10
|
+
### 变更
|
|
11
|
+
- **写回默认值等于「未自定义」**:卡片里的字段一旦回到它的默认值(滑块拖回默认档、开关拨回默认状态、层级选回默认集合),该项就从设置的用户层移除——「已自定义」标记与「重置」随之消失,等同于从未改过。0.6.1 及更早版本会把默认值也写进设置文档,并且一直标着「已自定义」。
|
|
12
|
+
|
|
13
|
+
### 修复
|
|
14
|
+
- **面板尺寸可能不落盘**:尺寸写入有 0.4 秒去抖,而"已发布"的台账在发起写入的那一刻就被推进——拖动后在 0.4 秒内再动一次(拖高度、拖顶栏、切层级或模糊开关等),前一次的待写会被取消,台账却已经记成发布过,于是那个尺寸再也不会写入。实测:宽度 200 → 150 之后再拖高度,存下来的宽度仍是 200,刷新后面板回到 200。现在台账只在真正写入时推进,被取消的那次会在下一轮重新发出。
|
|
15
|
+
- **宽度或高度偏小的面板存了也白存**:读回尺寸的下限与拖动下限不一致——拖动允许宽度到 120px、高度到 60px,但下次打开时低于 180px 宽 / 160px 高的值会被当作无效丢弃,面板回到默认宽度。现在两侧下限一致(120px / 60px)。
|
|
16
|
+
- **高度为「自动」时第一次拖高度会跳**:拖拽起点原先按固定的 400px 估算,面板实际更高或更矮时,第一次移动就跳到错误的高度。现在起点取面板的实测高度(缩放后的视觉高度,与存储同一个单位),量不到才退回 400px。
|
|
17
|
+
|
|
18
|
+
## [0.6.1] - 2026-09-15
|
|
19
|
+
|
|
20
|
+
### 新增
|
|
21
|
+
- **面板缩放滑块**:设置卡片里新增「面板缩放」——**50%–200%、每档 5%** 的滑块(与字体增强插件的滑块同一形制),把面板**内容**(文字、图标、按钮及其间距)等比放大或缩小。缩放**不改变面板本身的尺寸**:拖出来的宽高在 50% 与 200% 下完全一致,放大只是让内容更大、屏幕上一屏看到的行更少。拖动滑块只移动读数,**松手才写入设置**(避免每个档位都重写设置文档);宿主未确认前读数保持为拖动后的值,不会闪回旧数字。
|
|
22
|
+
- **窄面板的顶栏**:面板变得很窄时,四颗按钮保持一行——中间的空白先让位,挤满后整行变成可横向滚动(在顶栏上滚滚轮即可找到后面的按钮),此时顶部的灰色拖拽横条渐隐消失。
|
|
23
|
+
|
|
24
|
+
### 变更
|
|
25
|
+
- **跳转动画改回浏览器自己的平滑滚动**:动画交给容器的 `scrollTo({behavior:"smooth"})`(按真实时间推进,因此在 60Hz 与 240Hz 屏幕上时长一致,且带有最后的减速滑停)。保留三层护栏:起跳前先脱离 DSH 的贴底吸附区;飞行中目标的实时偏移若变化超过 40px 就重新瞄准一次(宿主翻页会挪动目标);动画被宿主的补偿滚动打断(超过 400ms 且位移不足 1px)时重新发起。只有浏览器把该调用直接执行成瞬移时,才退回插件逐帧绘制(自绘同样按毫秒计时、先快后慢)。
|
|
26
|
+
- **面板尺寸取消上下限**:宽度原先被限制在 180–560px、高度下限 160px。现在只保留「还能拖回来」的 120px 宽 / 60px 高地板,放大缩小都由读者决定。
|
|
27
|
+
- **面板缩放只作用于内容**(见上):缩放因子作用在面板内部,面板自身的宽高、位置、折叠裁剪与其折叠动画都不受影响。
|
|
28
|
+
|
|
29
|
+
### 修复
|
|
30
|
+
- **长距离跳转在 240Hz 屏幕上等同瞬移**:0.6.0 的逐帧动画按**帧数**计时(22–46 帧),在 240Hz 面板上 46 帧只有约 190ms(实测 5078px 用了 188ms,约 4 倍过快),看起来像瞬移或匀速一闪;60Hz 下同样的帧数是约 770ms,因此离线测试与无头浏览器都测不出这个问题。现在动画按真实时间推进,与刷新率无关。
|
|
31
|
+
- **拖动面板尺寸后会被拽回原尺寸**:面板把「自己的改动传出」和「采纳外部改动」记在同一份台账里。拖动期间只要发生一次设置写入或宿主快照刷新,就会拿**尚未落盘的旧值**把面板拽回原尺寸,并且正在等待的落盘会被取消——拖动等于白做。现在两条路径分开记账:只采纳既不同于面板当前状态、也不是自己刚发出的值;尺寸与位置不再从设置里回读(它们只有面板自己会写,回读只可能拿到旧副本)。
|
|
32
|
+
|
|
5
33
|
## [0.6.0] - 2026-09-14
|
|
6
34
|
|
|
7
35
|
### 新增
|
package/README.en.md
CHANGED
|
@@ -10,7 +10,7 @@ A conversation TOC plugin for [DeepSeek Harness](https://github.com/deepseek-ai/
|
|
|
10
10
|
- **Whole-session coverage** — turns the conversation window has not loaded are listed too (tagged `未加载` / "Not loaded", with previews); clicking one loads that turn and jumps to it
|
|
11
11
|
- **Failures are reported** — a turn with no reply at all (request timeout, upstream error) shows `请求失败` / "Request failed" plus the host's error text, and clicking it jumps to that error in the conversation
|
|
12
12
|
- **Bilingual** — the interface language can follow the host, or be forced to Chinese or English; Chinese stamps use `昨天` / `前天`, English reads yesterday as the word (`yesterday`) and carries the `YY-MM-DD HH:MM` date for anything older
|
|
13
|
-
- **A plugin-configuration card** — a "Conversation Outline" card under Settings → Plugins → Plugin configuration: the language, the default docked edge, the heading levels shown, fuzzy search, hover previews and the diagnostic switch; changed fields are marked "customized" and can be reset individually, and the card and the panel stay in sync
|
|
13
|
+
- **A plugin-configuration card** — a "Conversation Outline" card under Settings → Plugins → Plugin configuration: the language, the default docked edge, the heading levels shown, where the collapsed handle sits, fuzzy search, hover previews and the diagnostic switch; changed fields are marked "customized" and can be reset individually (returning a field to its default drops the mark), and the card and the panel stay in sync
|
|
14
14
|
- **Turn stamps carry the day** — yesterday reads `昨天 15:04`, the day before `前天 15:04`, anything older `25-09-11 15:04`, so times never blur together in a session spanning days (with the interface in English every stamp older than today carries a `YY-MM-DD` date instead)
|
|
15
15
|
- **Row subtitles** — under each heading, the first sentence of that section, so identically-titled headings can be told apart
|
|
16
16
|
- **Hover previews** — hovering a heading row shows the section's opening, the turn time and the heading path
|
|
@@ -20,9 +20,10 @@ A conversation TOC plugin for [DeepSeek Harness](https://github.com/deepseek-ai/
|
|
|
20
20
|
- **Sticky group headers** — while scrolling the outline, the current turn's header stays pinned at the top of the panel
|
|
21
21
|
- **Heading level filter** — the round levels button in the header pops down H1–H6 switches for any combination
|
|
22
22
|
- **Auto-follow** — the turn being read lights up in a closed blue box while you scroll the conversation; the outline follows on its own
|
|
23
|
-
- **Jumping** — click a heading to jump to its position in the conversation
|
|
23
|
+
- **Jumping** — click a heading to jump to its position in the conversation, with the scroll animation handed to the browser's own smooth scrolling (advanced on the wall clock, so it takes the same time on a 60 Hz and a 240 Hz panel); when the host re-pages and moves the target mid-flight the jump re-aims, and when the host's own scrolling cancels the animation it is issued again, so a cross-page jump never stops halfway; a browser that carries the call out at once gets a frame-by-frame glide drawn by the plugin instead
|
|
24
24
|
- **Back to the newest row** — after paging far up, a floating button in the list's lower-right corner returns to the newest entry in one click (it appears when the list is not at its bottom and disappears once it is)
|
|
25
|
-
- **Dockable and resizable** — drag the top bar to move the panel, ◀ / ▶ to dock left or right, drag an edge to resize, and collapse it into an edge handle; position and size are remembered per browser (top offset, width and height are adjusted by dragging only)
|
|
25
|
+
- **Dockable and resizable** — drag the top bar to move the panel, ◀ / ▶ to dock left or right, drag an edge to resize (no upper bound, down to 120px wide), and collapse it into an edge handle (its height is set by the card's "Handle position"); position and size are remembered per browser (top offset, width and height are adjusted by dragging only)
|
|
26
|
+
- **Panel scale** — a slider in the settings card scales the **content** (text, icons, buttons and their spacing) from 50% to 200% in 5% steps while the **panel's own size stays exactly as dragged**; dragging only moves the readout, and the settings document is written once you let go. A narrow panel keeps its four header buttons on one line: the empty middle gives way first, then the whole row scrolls sideways (wheel over the header), and the grey grab bar fades out
|
|
26
27
|
- **Paging** — the most recent groups show first; scrolling up both expands the index and loads older conversation
|
|
27
28
|
- **Edge hints** — a brief hint at the bottom of the panel when you keep scrolling past the first or the last entry
|
|
28
29
|
- **Markdown-aware** — inline markup in headings is stripped; `#` lines inside fenced code blocks are not headings
|
|
@@ -33,7 +34,7 @@ A conversation TOC plugin for [DeepSeek Harness](https://github.com/deepseek-ai/
|
|
|
33
34
|
|
|
34
35
|
| Plugin | Supported DSH |
|
|
35
36
|
| --- | --- |
|
|
36
|
-
| **0.6.x** (latest, 0.6.
|
|
37
|
+
| **0.6.x** (latest, 0.6.2) | 0.1.5-rc.1, 0.1.5-rc.2 |
|
|
37
38
|
| 0.5.x (0.5.1) | 0.1.5-rc.1, 0.1.5-rc.2 |
|
|
38
39
|
| 0.4.x (0.4.1) | 0.1.5-rc.1, 0.1.5-rc.2 |
|
|
39
40
|
| 0.3.x (0.3.3) | 0.1.5-rc.1 |
|
|
@@ -41,7 +42,7 @@ A conversation TOC plugin for [DeepSeek Harness](https://github.com/deepseek-ai/
|
|
|
41
42
|
|
|
42
43
|
Each major line lists only its newest patch (the defects a new feature introduces are fixed in the patches that follow, so within one major line the newest patch is the one to use; older patches keep working — the plugin does not break existing interfaces).
|
|
43
44
|
|
|
44
|
-
`engines.dsh` has a floor of **0.1.5-rc.1** (`>=`): from that release on, the plugin uses the host's session-scoped slot injection. 0.6.
|
|
45
|
+
`engines.dsh` has a floor of **0.1.5-rc.1** (`>=`): from that release on, the plugin uses the host's session-scoped slot injection. 0.6.2 was tested on **0.1.5-rc.2** (a dragged size reaching storage and coming back after a reload, and the collapsed handle's position, were both measured in a real browser; "a default value written back drops the customized mark" is covered by offline cases; 0.6.1 already measured the host half's settings-namespace registration, the configuration card, the jump animation and the panel scale); on **0.1.5-rc.1** the plugin's loading and client-module delivery were tested for real (the host boots, and the `dsh-quick-toc/client.js` rev in its boot graph is byte-identical to this repository's `lib/client.js`). The host interfaces it relies on — the `turnOutline` projection, the session-scoped `useProjection`, the client `sessions` service and its `loadThrough` jump loader (since 0.5.0), the `turn-error` node used for failed turns (since 0.5.1), and the host `settings` service (`installSection`), the client `settingsScope` and the `settings.plugin.item` card slot added in 0.6.0 — were checked one by one against the installed 0.1.5-rc.1 and 0.1.5-rc.2 bundles, whose code is byte-identical between the two releases (`dsh-client-ui-chat` differs by a single CSS declaration unrelated to this plugin); nothing in 0.6.2 relies on a new host interface (the scale is CSS inside the panel, the sliders and the handle position are settings in the plugin's own card, and the jump uses the container's `scrollTo`), so both releases are claimed. Older or newer DSH versions are unverified and therefore not claimed; on an older DSH the newest usable plugin version is **0.3.2**. On install or update, the DSH market pre-flights host compatibility from `engines.dsh`, `dsh.compatibility.dshReleases` and `peerDependencies` in `package.json`.
|
|
45
46
|
|
|
46
47
|
## Install
|
|
47
48
|
|
|
@@ -72,11 +73,11 @@ After installing, restart DSH and open the Web UI. The panel starts collapsed; c
|
|
|
72
73
|
- **Search tolerance**: full-width/half-width, case and whitespace differences match automatically; for looser matching turn on the "fuzzy" switch next to the search box
|
|
73
74
|
- **Level filter**: click the round levels button in the header to pop down the H1–H6 switches
|
|
74
75
|
- **Moving and docking**: drag the top bar to move, ◀ / ▶ to switch sides
|
|
75
|
-
- **Resizing**: drag the right edge, bottom edge or bottom-right corner
|
|
76
|
+
- **Resizing**: drag the right edge, bottom edge or bottom-right corner (no upper bound, down to 120px wide; a very narrow panel scrolls its header sideways)
|
|
76
77
|
- **Loading older turns**: scroll up inside the outline (it both expands the index and loads older conversation)
|
|
77
78
|
- **Back to the newest row**: after paging far up, click the floating button in the list's lower-right corner
|
|
78
79
|
- **Reading position**: scroll the conversation and the turn you are reading is boxed in blue; the outline follows
|
|
79
|
-
- **Settings**: expand the "Conversation Outline" card under **Settings → Plugins → Plugin configuration** for the language, the default docked edge, the heading levels shown and the fuzzy / hover / diagnostic switches; changed fields can be reset individually. The card and the panel are live in both directions, with no reload needed, and the preferences follow the DSH settings document
|
|
80
|
+
- **Settings**: expand the "Conversation Outline" card under **Settings → Plugins → Plugin configuration** for the language, the default docked edge, the panel scale (a 50%–200% slider in 5% steps), where the collapsed handle sits (a 0%–100% slider in 1% steps: 0% at the bottom, 100% at the top, 50% centred by default), the heading levels shown and the fuzzy / hover / diagnostic switches; changed fields can be reset individually (returning one to its default drops the mark). The card and the panel are live in both directions, with no reload needed, and the preferences follow the DSH settings document
|
|
80
81
|
|
|
81
82
|
## Diagnostics
|
|
82
83
|
|
|
@@ -97,7 +98,7 @@ A missing `turnOutline` means the host has no such projection, and the staged `j
|
|
|
97
98
|
- The "unloaded turn" capability needs two host facilities: the `turnOutline` projection (the whole-session turn index, each entry carrying its `turn/start` seq) and the turn-jump loader (the client `sessions` service's `binding(sessionId).session.loadThrough(seq)`, reached through the client ctx's declaration-free `ctx.get("sessions")` lookup). Each degrades on its own: without the projection the outline lists loaded turns only, without the loader unloaded entries are shown but not jumped to, and nothing else in the panel is affected.
|
|
98
99
|
- The failure row reads the host's `turn-error` conversation node (published when `turn/end` carries an `error` reason, with `message` and an optional `code`); on a host without that node the row is simply absent and nothing else changes.
|
|
99
100
|
- Interface text lives in one string table at the top of `lib/client.js` (`DICTS`, one Chinese and one English copy) and the language setting picks between them: on `follow the host` the host's translate function (`ctx.locale.bind("dsh-quick-toc")`, fed by the same `DICTS` tables) is asked first and the built-in table is only the fallback. The two tables must stay key-aligned; the only Chinese-only entry is `time.beforeYesterday` (English carries the date for anything older than yesterday), while `time.yesterday` exists in both (`yesterday`).
|
|
100
|
-
- Preferences sit in two layers behind one module-level store: the Host settings document (`ctx.settingsScope.bind({ namespace: "dsh-quick-toc" })` — language, docked edge, levels, fuzzy, hover and diagnostic; authoritative on a loopback page) and `localStorage` (the mirror, plus the real storage for top offset / width / height, which describe this screen and are saved per browser). Writes are routed per field: host fields go through `scope.mutate` (folded in locally, reconciled when the host answers), everything else goes to `localStorage
|
|
101
|
+
- Preferences sit in two layers behind one module-level store: the Host settings document (`ctx.settingsScope.bind({ namespace: "dsh-quick-toc" })` — language, docked edge, levels, scale, handle position, fuzzy, hover and diagnostic; authoritative on a loopback page) and `localStorage` (the mirror, plus the real storage for top offset / width / height, which describe this screen and are saved per browser). Writes are routed per field: host fields go through `scope.mutate` (folded in locally, reconciled when the host answers), everything else goes to `localStorage`; a value that IS the field's default is written by removing that entry from the user layer instead (the same thing as "not customized"). On a non-loopback page DSH marks settings read-only, so those eight preferences fall back to the mirror and behave exactly as in 0.5.x; values left by a 0.5.x install are imported into the host layer once, the first time it answers (and only while the user layer is empty).
|
|
101
102
|
- The configuration card registers into the `settings.plugin.item` slot (keyed on the plugin's namespace; the slot is dispatched only for namespaces the Host actually serves, so a deployment without the host half simply shows no card and the panel is unaffected). The card and the panel share the store above, which is what makes the two live in both directions.
|
|
102
103
|
- Changes to `lib/client.js` show up after a page refresh (client modules are served under a content hash and DSH's client HMR pushes reloads); changes to `lib/index.js` (the host half) need a DSH restart
|
|
103
104
|
|
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
- **覆盖整段会话** —— 未加载进对话窗口的回合也在列表里(带「未加载」标记与预览);点击即加载该回合并跳过去
|
|
11
11
|
- **失败回合的报错** —— 请求超时 / 上游报错这类没有回复的回合显示 `请求失败` 与报错原文,点击跳到对话中的报错位置
|
|
12
12
|
- **中英双语** —— 界面语言可设为跟随宿主、中文或 English;中文时间戳用 `昨天` / `前天`,英文昨天用 `yesterday`、更早用 `YY-MM-DD HH:MM` 日期
|
|
13
|
-
- **插件配置卡片** —— 设置 → 插件 →
|
|
13
|
+
- **插件配置卡片** —— 设置 → 插件 → 插件配置里的「对话大纲」卡片:语言、默认停靠边缘、显示的标题层级、收起把手的位置、模糊搜索、悬停预览与诊断开关;改过的字段标「已自定义」并可单独重置(改回默认值时标记自动消失),卡片与面板实时同步
|
|
14
14
|
- **回合时间带日期** —— 昨天 `昨天 15:04`、前天 `前天 15:04`、更早 `25-09-11 15:04`,跨天的会话里时间不再重影
|
|
15
15
|
- **标题行副标题** —— 每行标题下方显示该节正文的第一句,同名标题一眼可辨
|
|
16
16
|
- **悬停预览** —— 悬停标题行显示该节开头、回合时间与层级路径
|
|
@@ -20,9 +20,10 @@
|
|
|
20
20
|
- **组头吸顶** —— 滚动大纲时,当前回合的组头固定在面板顶部
|
|
21
21
|
- **层级筛选** —— 标题栏的圆形层级按钮弹出 H1–H6 开关,任意组合显示
|
|
22
22
|
- **自动跟随** —— 滚动对话时正在阅读的回合自动点亮(封闭蓝框),大纲自动跟随
|
|
23
|
-
- **跳转** ——
|
|
23
|
+
- **跳转** —— 点击标题跳到对话中该标题的位置,滚动动画交给浏览器自己的平滑滚动(按真实时间推进,60Hz 与 240Hz 屏幕上时长一致);飞行中目标被宿主翻页挪动时会重新瞄准、动画被宿主滚动打断时会重新发起,跨页远跳不会半途停下;若某个浏览器把平滑滚动直接执行成瞬移,插件改为自己逐帧绘制。面板与对话双向定位
|
|
24
24
|
- **回到底部** —— 往上翻远之后,列表右下角的浮动按钮一步回到最新一条(不在底部时出现、到底后消失)
|
|
25
|
-
- **可停靠、可缩放** —— 拖顶部横条移动,◀ / ▶
|
|
25
|
+
- **可停靠、可缩放** —— 拖顶部横条移动,◀ / ▶ 切换左右停靠,拖边缘调宽高(尺寸没有上限,最窄可到 120px),收起后成为边缘把手(停在什么高度由设置里的「把手位置」决定);位置与尺寸按浏览器记住(顶边距、宽度、高度只通过拖拽调整)
|
|
26
|
+
- **面板缩放** —— 设置里的滑块把**内容**(文字、图标、按钮及其间距)在 50%–200% 之间按 5% 一档缩放,**面板本身的尺寸不变**;拖动滑块时只移动读数,松手才写入设置。面板变窄时顶栏四颗按钮保持一行:先挤掉中间的空白,挤满后整行可横向滚动(在顶栏上滚滚轮即可),此时顶部的灰色拖拽横条渐隐消失
|
|
26
27
|
- **分页** —— 默认显示最近的若干组,向上滚动既展开索引也加载更早的对话
|
|
27
28
|
- **边界提示** —— 滚到最早或最新再继续滚动时,面板底部短暂提示
|
|
28
29
|
- **Markdown 感知** —— 标题中的行内标记会被剥离;围栏代码块里的 `#` 行不算标题
|
|
@@ -33,7 +34,7 @@
|
|
|
33
34
|
|
|
34
35
|
| 插件版本 | 支持的 DSH 版本 |
|
|
35
36
|
| --- | --- |
|
|
36
|
-
| **0.6.x**(最新,0.6.
|
|
37
|
+
| **0.6.x**(最新,0.6.2) | 0.1.5-rc.1、0.1.5-rc.2 |
|
|
37
38
|
| 0.5.x(0.5.1) | 0.1.5-rc.1、0.1.5-rc.2 |
|
|
38
39
|
| 0.4.x(0.4.1) | 0.1.5-rc.1、0.1.5-rc.2 |
|
|
39
40
|
| 0.3.x(0.3.3) | 0.1.5-rc.1 |
|
|
@@ -41,7 +42,7 @@
|
|
|
41
42
|
|
|
42
43
|
每个大版本只列该系列最新的一个补丁版本(新功能引入的缺陷都在其后的补丁里修掉了,所以同一个大版本内直接用最新补丁即可;旧补丁仍可继续用,插件不破坏既有接口)。
|
|
43
44
|
|
|
44
|
-
`engines.dsh` 下限为 **0.1.5-rc.1**(`>=`,该版本起插件改用会话级槽位注入的宿主接口)。0.6.
|
|
45
|
+
`engines.dsh` 下限为 **0.1.5-rc.1**(`>=`,该版本起插件改用会话级槽位注入的宿主接口)。0.6.2 在 **0.1.5-rc.2** 上实测通过(面板尺寸的落盘与刷新后的读回、收起把手的位置都在真实浏览器里量过;「写回默认值即取消已自定义」由离线用例覆盖。0.6.1 已实测宿主半的设置命名空间注册、配置卡片、跳转动画与面板缩放);**0.1.5-rc.1** 上实测了插件加载与客户端模块下发(宿主启动正常、boot graph 中 `dsh-quick-toc/client.js` 的 rev 与本仓库 `lib/client.js` 逐字节一致),它依赖的宿主接口——`turnOutline` 投影、会话级槽位的 `useProjection`、客户端 `sessions` 服务与 `loadThrough` 跳转加载器(0.5.0 起)、失败回合所用的 `turn-error` 节点(0.5.1 起)、以及 0.6.0 新增的宿主 `settings` 服务(`installSection`)、客户端 `settingsScope` 与 `settings.plugin.item` 配置卡片槽位——在 0.1.5-rc.1 与 0.1.5-rc.2 的安装包中逐个核对存在(这些宿主包的代码在两版之间逐字节相同,`dsh-client-ui-chat` 仅差一条与本插件无关的 CSS 声明);0.6.2 的新功能都不依赖新的宿主接口(缩放是面板内的 CSS,滑块与把手位置都是插件自己卡片里的设置,跳转用容器的 `scrollTo`),因此两版都声明兼容。更早或更新的 DSH 版本未经验证,不作声明;在更早的 DSH 上可安装的最新插件版本是 **0.3.2**。安装或更新时,DSH 市场会依据 `package.json` 中的 `engines.dsh`、`dsh.compatibility.dshReleases` 与 `peerDependencies` 做宿主兼容预检。
|
|
45
46
|
|
|
46
47
|
## 安装
|
|
47
48
|
|
|
@@ -72,11 +73,11 @@ dsh plugin --profile web add <插件目录路径>
|
|
|
72
73
|
- **搜索容错**:全角/半角、大小写、空格差异会自动匹配;需要更宽松时点搜索框右侧的「模糊」开关
|
|
73
74
|
- **层级筛选**:点标题栏的圆形层级按钮弹出 H1–H6 开关,选择显示的层级
|
|
74
75
|
- **移动与停靠**:拖顶部横条移动,◀ / ▶ 切换左右停靠
|
|
75
|
-
-
|
|
76
|
+
- **调整大小**:拖右边缘、下边缘或右下角(没有上限,最窄到 120px;面板过窄时顶栏可横向滚动)
|
|
76
77
|
- **加载更早**:在大纲中向上滚动(既展开索引,也加载更早的对话)
|
|
77
78
|
- **回到底部**:翻远了之后点列表右下角的浮动按钮回到最新一条
|
|
78
79
|
- **阅读位置**:滚动对话,正在阅读的回合会以蓝框标出;大纲会自动跟随
|
|
79
|
-
- **设置**:在 **设置 → 插件 → 插件配置**
|
|
80
|
+
- **设置**:在 **设置 → 插件 → 插件配置** 里展开「对话大纲」卡片,可改语言、默认停靠边缘、面板缩放(50%–200% 滑块,5% 一档)、收起把手的位置(0%–100% 滑块,1% 一档;0% 在最下、100% 在最上,默认 50% 居中)、显示的标题层级与模糊/悬停/诊断开关;改过的字段可单独重置(改回默认值时标记自动消失)。卡片与面板实时同步,不需要刷新;偏好保存在 DSH 的设置里,跟随配置走
|
|
80
81
|
|
|
81
82
|
## 诊断
|
|
82
83
|
|
|
@@ -97,7 +98,7 @@ dsh plugin --profile web add <插件目录路径>
|
|
|
97
98
|
- 「未加载回合」能力依赖宿主的两样东西:`turnOutline` 投影(整段会话的回合索引,每条含 `turn/start` 的 seq)与会话跳转加载器(客户端 `sessions` 服务的 `binding(sessionId).session.loadThrough(seq)`,通过客户端 ctx 的 `ctx.get("sessions")` 免声明查找取得)。两者各自独立降级:没有投影时只列已加载回合,没有加载器时未加载条目只展示、不跳转,面板其余功能不受影响。
|
|
98
99
|
- 失败回合的报错行读的是宿主的 `turn-error` 会话节点(宿主在 `turn/end` 的原因为 `error` 时发布,含 `message` 与可选的 `code`);宿主不提供该节点时只是不显示这一行,其余功能不受影响。
|
|
99
100
|
- 界面文字来自 `lib/client.js` 顶部的一张字符串表(`DICTS`,中英各一份),语言设置决定用哪一份:`跟随宿主` 时优先问宿主的翻译函数(`ctx.locale.bind("dsh-quick-toc")`,注册的表就来自 `DICTS`),拿不到才回退到内置表。中英两份表的键必须对齐(仅 `time.beforeYesterday`(前天)是中文独有——英文对更早的时间直接用日期;`time.yesterday` 两语言都有,英文作 `yesterday`)。
|
|
100
|
-
- 偏好存储分两层,由一个模块级 store 统一读出:宿主设置文档(`ctx.settingsScope.bind({ namespace: "dsh-quick-toc" })
|
|
101
|
+
- 偏好存储分两层,由一个模块级 store 统一读出:宿主设置文档(`ctx.settingsScope.bind({ namespace: "dsh-quick-toc" })`,语言/停靠边/层级/缩放/把手位置/模糊/悬停/诊断八项,回环页面上是权威层)与 `localStorage`(镜像 + 顶边距/宽度/高度三项的正式存储——它们描述"这一块屏幕",按浏览器保存)。写入按字段路由:宿主字段走 `scope.mutate`(本地同步折叠、宿主应答后对账),其余写 `localStorage`;写入的值若正好是该字段的默认值,则改为把用户层里的这一项删掉(等同于"未自定义")。非回环页面 DSH 将设置标记为只读,此时这八项偏好退回本地镜像,行为与 0.5.x 一致;0.5.x 留下的本地值会在宿主层首次应答时导入一次(仅当用户层为空)。
|
|
101
102
|
- 插件配置卡片注册进 `settings.plugin.item` 槽(`key` 为插件命名空间;该槽按宿主实际提供的命名空间派发,宿主半未加载时卡片自然不出现,面板不受影响);卡片与面板共享上面那个 store,因此两边实时互通。
|
|
102
103
|
- 修改 `lib/client.js` 后刷新页面即可看到变化(客户端模块按内容哈希发版,DSH 的客户端 HMR 也会推送重载);改 `lib/index.js`(宿主半)需重启 DSH
|
|
103
104
|
|