dsh-quick-toc 0.6.2 → 0.7.0
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 +22 -0
- package/CHANGELOG.md +22 -0
- package/README.en.md +20 -7
- package/README.md +20 -7
- package/lib/client.js +2500 -537
- package/lib/index.js +4 -0
- package/package.json +2 -2
package/CHANGELOG.en.md
CHANGED
|
@@ -2,6 +2,28 @@
|
|
|
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.0] - 2026-09-19
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
- **A full-width "curtain" outline**: the view-tab strip along the top of the conversation now carries a droplet handle (half-transparent at rest, solid under the pointer, its base resting on the strip's lower line) — click it and the outline drops down across the full width of the conversation area. Its height is 82% of what is left of the conversation (at least 240px, at most 760px), its top edge meets the tab strip and its lower corners are rounded; there is no scrim and nothing underneath is dimmed, so the newest message and the composer stay reachable below it. Closing: click any row, press Esc, or use the ✕ in the upper-right corner; the "curtain" round button in the panel's header is the other way in. **It is not a second list** — the curtain is the panel itself moved into that container, so paging, search results, hover previews, the keyboard cursor and the reading position are all the same ones; switching from the panel to the curtain loses no state.
|
|
9
|
+
- **Wide typography inside the curtain**: each row becomes three parts — the `H1–H6` level badge on the left, a larger heading in the middle, and the opening of that section in small type on the right; the level filter lays itself out on one line. The magnifier pushes the search column in from the right (360px), the outline column gives way to the left, and results land in that right column.
|
|
10
|
+
- **A "jump to the end of this section" button on every row**: with the pointer on a heading row, a group header, a search result or a curtain row, a round button fades in at that row's right end (always mounted, only its opacity changes, so nothing is pushed around or reflowed) — clicking it jumps to the end of that section's content: a heading row lands just before the next heading of the same or a higher level, and a group header lands at the very bottom of the whole turn (the end of the model's last reply). Every hover highlight stops 32px short of the row's right edge, leaving a constant 8px to the round button, so a long heading never runs into it.
|
|
11
|
+
- **Cross-session search**: the search-scope button now has three steps: title → full text → sessions. The third uses the host's session full-text index to search the message bodies of **other sessions** (bodies only; the fuzzy switch does not apply to it, and the host returns at most 20 hits); clicking a result switches to that session and keeps looking for the same keyword there. Only sessions that can be opened right now are listed — archived ones, subagent sessions and sessions no longer in the list are skipped, with the number of skipped hits reported underneath, and a host without the full-text index enabled says so instead of failing silently.
|
|
12
|
+
- **A remembered reading position per session** (on by default in the settings card): reopening a session returns to the turn you were last reading. The position is stored in this browser only, and only resumes within half an hour (anything older opens at the newest turn). The record carries its seq, so that turn is paged back in even when it is no longer in the conversation window; when it genuinely cannot be reached (the host says there is no older history) the record is dropped silently, with no banner.
|
|
13
|
+
- **Keyboard navigation**: ↑/↓ move a visible keyboard cursor through the outline (an inset outline plus a light fill, deliberately distinct from the reading position's blue box), Enter activates the current row (jump / load an unloaded turn / switch session), Home / End go to either end, and Esc collapses the panel (Esc inside the search box closes the search first). After clicking anywhere in the panel (an input excepted) ↑/↓ work straight away — no need to Tab in first — and the cursor's position is announced to screen readers.
|
|
14
|
+
- **Questions only**: a speech-bubble button in the header folds the outline down to each turn's time and the first line of your own prompt, which makes "what did I actually ask" easy to find among long replies. The switch cross-fades, and while it is on the level filter is disabled (there are no heading rows); turning it off restores the previous level selection.
|
|
15
|
+
|
|
16
|
+
### Changed
|
|
17
|
+
- **The collapsed edge handle now slides into the edge**: expanding it fades the handle out first and slides the panel in afterwards (no longer both at once), and collapsing slides the handle back behind the edge line, clipped by it, instead of vanishing out of nowhere.
|
|
18
|
+
|
|
19
|
+
### Fixed
|
|
20
|
+
- **No longer covering other plugins' overlays**: the panel and the handles used to lift themselves above almost everything with a flat `z-index: 500`, which measurably covered community plugins' own popovers (the context plugin's cards sit at 200, for instance). They now move into the one gap in the application's stacking order — edge handle 12, docked panel 14, curtain 16, hover preview 18: above the conversation content (and it has to be above the transcript width grip at 8, or that 40px-wide transparent grab column steals the pointer along the panel's edge), but below everything that calls itself an overlay in the host or in a plugin (layout overlays at 20, better-sidebar at 25, cordis at 30, host popovers from 100 up).
|
|
21
|
+
|
|
22
|
+
## [0.6.3] - 2026-09-15
|
|
23
|
+
|
|
24
|
+
### Fixed
|
|
25
|
+
- **The configuration card's expand/collapse chevron did not match the host's arrows**: it was a text character (⌄), thinner than the host's 14×14 SVG chevron icon, and the glyph's ink is not centred inside its 20px line box — the rotation turned around the box centre, so the glyph swung aside instead of flipping in place. It is now the host's own 14×14 SVG chevron (an inline SVG whose path is byte-identical to the icon the host uses, with the class on the `<svg>` itself — the same structure as the host's plugin card), so expanding and collapsing flip it around the icon's own centre.
|
|
26
|
+
|
|
5
27
|
## [0.6.2] - 2026-09-15
|
|
6
28
|
|
|
7
29
|
### Added
|
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,28 @@
|
|
|
2
2
|
|
|
3
3
|
**dsh-quick-toc** 的重要变更都记录在这里。英文版见 [CHANGELOG.en.md](CHANGELOG.en.md)。
|
|
4
4
|
|
|
5
|
+
## [0.7.0] - 2026-09-19
|
|
6
|
+
|
|
7
|
+
### 新增
|
|
8
|
+
- **全屏「幕布」大纲**:对话顶边「对话 / 轨迹 / 上下文」标签条里嵌了一枚液滴把手(静止半透明、悬停变实,底边压在标签条下沿的分割线上),点它,大纲以整幅宽度从标签条下面落下来——高度取对话区剩余的 82%(240px 起、最多 760px),上沿贴齐标签条、下沿圆角,没有遮罩也不压暗底下的对话,收起后最新一条消息与输入区仍够得着。收起方式:点任意条目、按 Esc、或点右上角的 ✕;面板标题栏右侧的「幕布」圆钮是另一个入口。**幕布不是第二份列表**——它就是把面板本体搬进这个容器,所以滚动翻页、搜索结果、悬停预览、键盘光标、阅读位置全是一套,从面板切过去不会丢状态。
|
|
9
|
+
- **幕布里的宽版排版**:一行三段——最左 `H1–H6` 层级徽标、中间是更大的标题、右侧小字是该节正文的开头;层级筛选在幕布上铺成一行。点放大镜,搜索栏从右侧推进来(360px),大纲列随之向左让位,搜索结果落在右栏。
|
|
10
|
+
- **每行末尾的「跳到本节末尾」按钮**:指针停在标题行 / 组头 / 搜索结果 / 幕布条目上时,该行右端渐显一枚圆形按钮(常驻挂载、只切透明度,不占位也不重排),点它跳到这一节内容的结束处——标题行落到下一个同级或更高级标题之前;组头落到整轮对话的最末尾(模型最后一条回复的底部)。所有悬停加深框都在距行右缘 32px 处收住,与圆形按钮恒定留 8px,长标题也不会和它贴在一起。
|
|
11
|
+
- **跨会话检索**:搜索范围按钮变成三档:标题 → 全文 → 会话。第三档用宿主的会话全文索引搜**其他会话**的消息正文(只搜正文,模糊开关对它不生效;宿主一次最多返回 20 条),点结果直接切到那个会话,并用同一个关键词继续在本会话内查找。只列当前打得开的会话——已归档、子会话、不在会话列表里的会被略过,并在下方如实报出略过条数;宿主没开启全文索引时直接说明,不会静默失败。
|
|
12
|
+
- **记住每会话阅读位置**(设置卡片里默认开):重新打开一个会话回到上次读到的那一轮;位置只存在这台浏览器里,且半小时内读过才恢复(更久以前就直接开在最新处)。记录带 seq,所以那一轮即使已经不在对话窗口里也会自动翻页加载过去;确实翻不回来(宿主说没有更早的历史)就静默丢弃这条记录,不弹任何提示。
|
|
13
|
+
- **键盘导航**:↑/↓ 在大纲里移动一枚可见的键盘光标(inset 描边 + 淡填充,与「正在阅读」的蓝框刻意区分),Enter 激活当前行(跳转 / 加载未加载回合 / 切会话),Home / End 到首尾,Esc 收起面板(搜索框里的 Esc 先关搜索)。点过面板任意位置(输入框除外)之后就能直接按 ↑/↓,不必先 Tab 进来;光标位置通过屏幕阅读器播报。
|
|
14
|
+
- **只看提问**:标题栏的语音气泡按钮把大纲折起来,每轮只留时间与你的提问首行,在一堆长回复里找自己说过什么更快;切换是渐隐渐显,进入后层级筛选禁用(那时没有标题行),退出即恢复原来的层级选择。
|
|
15
|
+
|
|
16
|
+
### 变更
|
|
17
|
+
- **收起后的边缘把手改成「收进边里」**:点击展开时把手先淡出、面板随后滑进来(不再同时动);点击收起时把手被边线裁切着滑回边里,不再是凭空消失。
|
|
18
|
+
|
|
19
|
+
### 修复
|
|
20
|
+
- **不再压住其他插件的浮层**:面板与把手原先用一个扁平的 `z-index: 500` 把自己抬到几乎所有东西之上,实测会盖住社区插件自己的弹层(例如上下文插件的卡片在 200)。现在改为钻进应用层叠序里唯一空着的一段——边缘把手 12、停靠面板 14、幕布 16、悬停预览卡 18:仍在对话内容之上(也必须在转写宽度把手 8 之上,否则那把 40px 宽的透明抓取列会在面板边缘把指针抢走),但在所有「自称浮层」的宿主组件与插件之下(布局浮层 20、better-sidebar 25、cordis 30、宿主弹层 100 起)。
|
|
21
|
+
|
|
22
|
+
## [0.6.3] - 2026-09-15
|
|
23
|
+
|
|
24
|
+
### 修复
|
|
25
|
+
- **配置卡片的展开/收起箭头与宿主界面的箭头不一致**:箭头原先是一个文本字符(⌄),比宿主 14×14 的 SVG 箭头图标更细;而且字符的墨迹在 20px 行盒里并不居中,旋转绕的是盒子中心,转起来字符就被甩向一旁,看起来不像绕自身翻转。现在换成与宿主一致的 14×14 SVG 箭头图标(内联 SVG,路径与宿主所用图标逐字节一致,类名直接挂在 `<svg>` 上——与宿主插件卡片相同的做法),展开/收起时绕图标自身中心原地翻转。
|
|
26
|
+
|
|
5
27
|
## [0.6.2] - 2026-09-15
|
|
6
28
|
|
|
7
29
|
### 新增
|
package/README.en.md
CHANGED
|
@@ -2,15 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
> **English** | [中文](README.md)
|
|
4
4
|
|
|
5
|
-
A conversation TOC plugin for [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) (DSH): it turns the Markdown headings (H1–H6) of AI replies into a navigable outline panel
|
|
5
|
+
A conversation TOC plugin for [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) (DSH): it turns the Markdown headings (H1–H6) of AI replies into a navigable outline — the same list as a side panel or as a full-width curtain — grouped by conversation turn and covering the whole session (including turns that are not loaded yet), with title/full-text/cross-session search, hover previews, several ways to jump (a heading, a turn header, the end of a section), and a reading position that both follows and is remembered.
|
|
6
6
|
|
|
7
7
|
## Features
|
|
8
8
|
|
|
9
9
|
- **Turn-grouped outline** — each user message plus its following AI replies form one group; the group header shows the turn's time and a first-line preview, and clicking it jumps to the start of that turn's model reply
|
|
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
|
+
- **A full-width curtain** — the droplet handle inside the tab strip along the top of the conversation (or the "curtain" round button in the panel's header) lays the outline out across the full width and drops it down: no scrim, nothing dimmed, larger type and looser rows, three parts per row (level badge / heading / the section's opening), and the search column sliding in from the right; click a row, press Esc or use the ✕ to close. It shares the one list with the docked panel, so the scroll position, the search and the keyboard cursor all carry over
|
|
13
|
+
- **Jump to the end of a section** — hover a heading row, a group header or a result row and a round button fades in at its right end; a group header's button jumps to the end of the whole turn
|
|
14
|
+
- **Cross-session search** — the third scope, "sessions", searches the message bodies of other sessions through the host's full-text index; clicking a hit switches to that session and keeps looking there, and archived / subagent / delisted sessions are skipped with a count
|
|
15
|
+
- **Questions only** — one click folds the outline down to each turn's time and the first line of your prompt
|
|
16
|
+
- **A remembered reading position** — reopening a session returns to the turn you were last reading (within half an hour; the card can switch it off)
|
|
17
|
+
- **Keyboard navigation** — ↑/↓ move the cursor, Enter jumps, Home / End go to either end, Esc collapses; the cursor's position is announced to screen readers
|
|
12
18
|
- **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, 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
|
|
19
|
+
- **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, the remembered reading position, 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
20
|
- **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
21
|
- **Row subtitles** — under each heading, the first sentence of that section, so identically-titled headings can be told apart
|
|
16
22
|
- **Hover previews** — hovering a heading row shows the section's opening, the turn time and the heading path
|
|
@@ -34,7 +40,8 @@ A conversation TOC plugin for [DeepSeek Harness](https://github.com/deepseek-ai/
|
|
|
34
40
|
|
|
35
41
|
| Plugin | Supported DSH |
|
|
36
42
|
| --- | --- |
|
|
37
|
-
| **0.
|
|
43
|
+
| **0.7.x** (latest, 0.7.0) | 0.1.5-rc.1, 0.1.5-rc.2 |
|
|
44
|
+
| 0.6.x (0.6.3) | 0.1.5-rc.1, 0.1.5-rc.2 |
|
|
38
45
|
| 0.5.x (0.5.1) | 0.1.5-rc.1, 0.1.5-rc.2 |
|
|
39
46
|
| 0.4.x (0.4.1) | 0.1.5-rc.1, 0.1.5-rc.2 |
|
|
40
47
|
| 0.3.x (0.3.3) | 0.1.5-rc.1 |
|
|
@@ -42,7 +49,7 @@ A conversation TOC plugin for [DeepSeek Harness](https://github.com/deepseek-ai/
|
|
|
42
49
|
|
|
43
50
|
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).
|
|
44
51
|
|
|
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.
|
|
52
|
+
`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.7.0 was tested on **0.1.5-rc.2** (the full-width curtain and its droplet handle, the jump-to-section-end buttons, cross-session search, keyboard navigation, the questions-only view and the remembered reading position were each exercised in a real browser; the panel scale, a dragged size reaching storage and coming back, and the collapsed handle's position had been measured before that); on **0.1.5-rc.1** the plugin's loading and client-module delivery were tested for real (the host boots without errors, `--dump-config` carries the quick-toc entry, the combined client bundle URL lists `dsh-quick-toc/client.js`, and the bytes it serves contain this release's curtain handle, jump-to-section-end and reading-position markers). 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, and the client `sessions.search` that 0.7.0's cross-session search calls — 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, and the package that carries `search`, `dsh-api-session-controller`, is byte-identical down to the same limits: at most 20 hits per search, 240 code points per snippet), 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`.
|
|
46
53
|
|
|
47
54
|
## Install
|
|
48
55
|
|
|
@@ -64,7 +71,7 @@ Or from a local folder:
|
|
|
64
71
|
dsh plugin --profile web add <path-to-the-plugin-folder>
|
|
65
72
|
```
|
|
66
73
|
|
|
67
|
-
After installing, restart DSH and open the Web UI. The panel starts collapsed
|
|
74
|
+
After installing, restart DSH and open the Web UI. The panel starts collapsed: click the edge handle next to the conversation to expand the panel, or click the droplet handle in the tab strip along the top to drop the outline down across the full width.
|
|
68
75
|
|
|
69
76
|
## Usage
|
|
70
77
|
|
|
@@ -75,9 +82,14 @@ After installing, restart DSH and open the Web UI. The panel starts collapsed; c
|
|
|
75
82
|
- **Moving and docking**: drag the top bar to move, ◀ / ▶ to switch sides
|
|
76
83
|
- **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)
|
|
77
84
|
- **Loading older turns**: scroll up inside the outline (it both expands the index and loads older conversation)
|
|
85
|
+
- **The curtain**: click the droplet handle in the tab strip along the top of the conversation (or the "curtain" round button in the panel's header) for the full-width outline; click any row, press Esc or use the ✕ to close
|
|
86
|
+
- **Jump to the end of a section**: hover a heading row, a group header or a result row and click the round button at its right end
|
|
87
|
+
- **Cross-session search**: click the scope button beside the search box twice to reach "sessions" and search other sessions through the host's full-text index; clicking a hit switches to that session and keeps looking there
|
|
88
|
+
- **Keyboard**: with the panel open, ↑/↓ move the cursor, Enter jumps, Home / End go to either end and Esc collapses; inside the search box ↑/↓ step through the matches
|
|
89
|
+
- **Questions only**: the speech-bubble button in the header folds the outline down to each turn's time and the first line of your prompt
|
|
78
90
|
- **Back to the newest row**: after paging far up, click the floating button in the list's lower-right corner
|
|
79
91
|
- **Reading position**: scroll the conversation and the turn you are reading is boxed in blue; the outline follows
|
|
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
|
|
92
|
+
- **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, the remembered reading position 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
|
|
81
93
|
|
|
82
94
|
## Diagnostics
|
|
83
95
|
|
|
@@ -98,7 +110,8 @@ A missing `turnOutline` means the host has no such projection, and the staged `j
|
|
|
98
110
|
- 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.
|
|
99
111
|
- 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.
|
|
100
112
|
- 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`).
|
|
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
|
|
113
|
+
- 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, remembered reading 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 nine 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).
|
|
114
|
+
- The curtain and the docked panel **share one list DOM**: the curtain only moves the panel itself into a full-width container that drops from the lower edge of the tab strip (in curtain mode the panel swaps to a different geometry — relative positioning, 100% width and height, no panel scale), and that container stays mounted as a zero-size pass-through while the curtain is up, so opening or closing it never rebuilds the list or loses the scroll position. Cross-session search goes through the client `ctx.get("sessions")` service's `search(query, signal)` (the host's session full-text index, at most 20 hits per search); each session's reading position lives in this browser (`dsh-quick-toc.readPos.v1`, valid for half an hour).
|
|
102
115
|
- 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.
|
|
103
116
|
- 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
|
|
104
117
|
|
package/README.md
CHANGED
|
@@ -2,15 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
> [English](README.en.md) | **中文**
|
|
4
4
|
|
|
5
|
-
**DeepSeek Harness(DSH)对话大纲插件**:把 AI 回复中的 Markdown 标题(H1–H6
|
|
5
|
+
**DeepSeek Harness(DSH)对话大纲插件**:把 AI 回复中的 Markdown 标题(H1–H6)提取成可导航的大纲——侧边面板与全屏幕布两种大纲视图,按对话回合分组、覆盖整段会话(含尚未加载进窗口的回合),支持标题/全文/跨会话三档检索、悬停预览、多种跳转(点标题、点组头、跳到本节末尾),阅读位置自动跟随并可记住。
|
|
6
6
|
|
|
7
7
|
## 功能
|
|
8
8
|
|
|
9
9
|
- **按回合分组** —— 每条用户消息 + 其后续 AI 回复为一组,组头显示回合时间与首行预览,点击跳到该回合模型回答的开头
|
|
10
10
|
- **覆盖整段会话** —— 未加载进对话窗口的回合也在列表里(带「未加载」标记与预览);点击即加载该回合并跳过去
|
|
11
11
|
- **失败回合的报错** —— 请求超时 / 上游报错这类没有回复的回合显示 `请求失败` 与报错原文,点击跳到对话中的报错位置
|
|
12
|
+
- **全屏「幕布」** —— 对话顶边标签条里的液滴把手(或面板标题栏的「幕布」圆钮)把大纲铺成整幅宽度落下:没有遮罩、不压暗对话,字号与行距都放大,每行三段(层级徽标 / 标题 / 该节正文开头),搜索栏从右侧推进来;点条目、Esc 或 ✕ 收起。它与停靠面板共用同一份列表,滚动位置、搜索、键盘光标全部延续
|
|
13
|
+
- **跳到本节末尾** —— 悬停标题行 / 组头 / 结果行,右端渐显一枚圆钮,点击跳到该节内容结束处;组头这颗跳到整轮对话的末尾
|
|
14
|
+
- **跨会话检索** —— 搜索范围第三档「会话」用宿主的全文索引搜其他会话的消息正文,点结果切过去并继续查找;已归档 / 子会话 / 不在列表里的会话会被略过并计数
|
|
15
|
+
- **只看提问** —— 一键把大纲折成「每轮只留时间与你的提问首行」
|
|
16
|
+
- **记住阅读位置** —— 重新打开会话回到上次读到的那一轮(半小时内有效;可在设置里关掉)
|
|
17
|
+
- **键盘导航** —— ↑/↓ 移动光标、Enter 跳转、Home / End 到首尾、Esc 收起;光标位置有屏幕阅读器播报
|
|
12
18
|
- **中英双语** —— 界面语言可设为跟随宿主、中文或 English;中文时间戳用 `昨天` / `前天`,英文昨天用 `yesterday`、更早用 `YY-MM-DD HH:MM` 日期
|
|
13
|
-
- **插件配置卡片** —— 设置 → 插件 →
|
|
19
|
+
- **插件配置卡片** —— 设置 → 插件 → 插件配置里的「对话大纲」卡片:语言、默认停靠边缘、显示的标题层级、收起把手的位置、记住阅读位置、模糊搜索、悬停预览与诊断开关;改过的字段标「已自定义」并可单独重置(改回默认值时标记自动消失),卡片与面板实时同步
|
|
14
20
|
- **回合时间带日期** —— 昨天 `昨天 15:04`、前天 `前天 15:04`、更早 `25-09-11 15:04`,跨天的会话里时间不再重影
|
|
15
21
|
- **标题行副标题** —— 每行标题下方显示该节正文的第一句,同名标题一眼可辨
|
|
16
22
|
- **悬停预览** —— 悬停标题行显示该节开头、回合时间与层级路径
|
|
@@ -34,7 +40,8 @@
|
|
|
34
40
|
|
|
35
41
|
| 插件版本 | 支持的 DSH 版本 |
|
|
36
42
|
| --- | --- |
|
|
37
|
-
| **0.
|
|
43
|
+
| **0.7.x**(最新,0.7.0) | 0.1.5-rc.1、0.1.5-rc.2 |
|
|
44
|
+
| 0.6.x(0.6.3) | 0.1.5-rc.1、0.1.5-rc.2 |
|
|
38
45
|
| 0.5.x(0.5.1) | 0.1.5-rc.1、0.1.5-rc.2 |
|
|
39
46
|
| 0.4.x(0.4.1) | 0.1.5-rc.1、0.1.5-rc.2 |
|
|
40
47
|
| 0.3.x(0.3.3) | 0.1.5-rc.1 |
|
|
@@ -42,7 +49,7 @@
|
|
|
42
49
|
|
|
43
50
|
每个大版本只列该系列最新的一个补丁版本(新功能引入的缺陷都在其后的补丁里修掉了,所以同一个大版本内直接用最新补丁即可;旧补丁仍可继续用,插件不破坏既有接口)。
|
|
44
51
|
|
|
45
|
-
`engines.dsh` 下限为 **0.1.5-rc.1**(`>=`,该版本起插件改用会话级槽位注入的宿主接口)。0.
|
|
52
|
+
`engines.dsh` 下限为 **0.1.5-rc.1**(`>=`,该版本起插件改用会话级槽位注入的宿主接口)。0.7.0 在 **0.1.5-rc.2** 上实测通过(全屏幕布与液滴把手、跳到本节末尾、跨会话检索、键盘导航、只看提问、记住阅读位置都在真实浏览器里逐项跑过;面板缩放、尺寸的落盘与读回、收起把手的位置等既有能力此前已实测);**0.1.5-rc.1** 上实测了插件加载与客户端模块下发(宿主启动无报错、`--dump-config` 里有 quick-toc 条目、客户端组合包 URL 里列出 `dsh-quick-toc/client.js`,取回的下发内容包含本版新增的幕布把手、跳到本节末尾与阅读位置等标记),它依赖的宿主接口——`turnOutline` 投影、会话级槽位的 `useProjection`、客户端 `sessions` 服务与 `loadThrough` 跳转加载器(0.5.0 起)、失败回合所用的 `turn-error` 节点(0.5.1 起)、以及 0.6.0 新增的宿主 `settings` 服务(`installSection`)、客户端 `settingsScope` 与 `settings.plugin.item` 配置卡片槽位、以及 0.7.0 跨会话检索所用的客户端 `sessions.search`——在 0.1.5-rc.1 与 0.1.5-rc.2 的安装包中逐个核对存在(这些宿主包的代码在两版之间逐字节相同,`dsh-client-ui-chat` 仅差一条与本插件无关的 CSS 声明;`search` 所在的 `dsh-api-session-controller` 两版逐字节相同,含「一次最多 20 条、片段上限 240 字符」的同一套上限),因此两版都声明兼容。更早或更新的 DSH 版本未经验证,不作声明;在更早的 DSH 上可安装的最新插件版本是 **0.3.2**。安装或更新时,DSH 市场会依据 `package.json` 中的 `engines.dsh`、`dsh.compatibility.dshReleases` 与 `peerDependencies` 做宿主兼容预检。
|
|
46
53
|
|
|
47
54
|
## 安装
|
|
48
55
|
|
|
@@ -64,7 +71,7 @@ dsh plugin --profile web add github:LyaxZ/dsh-quick-toc
|
|
|
64
71
|
dsh plugin --profile web add <插件目录路径>
|
|
65
72
|
```
|
|
66
73
|
|
|
67
|
-
安装后重启 DSH 并打开 Web UI
|
|
74
|
+
安装后重启 DSH 并打开 Web UI。面板默认收起:点对话区边缘的把手展开面板,或点对话顶边标签条里的液滴把手直接把大纲铺成整幅宽度落下。
|
|
68
75
|
|
|
69
76
|
## 使用
|
|
70
77
|
|
|
@@ -75,9 +82,14 @@ dsh plugin --profile web add <插件目录路径>
|
|
|
75
82
|
- **移动与停靠**:拖顶部横条移动,◀ / ▶ 切换左右停靠
|
|
76
83
|
- **调整大小**:拖右边缘、下边缘或右下角(没有上限,最窄到 120px;面板过窄时顶栏可横向滚动)
|
|
77
84
|
- **加载更早**:在大纲中向上滚动(既展开索引,也加载更早的对话)
|
|
85
|
+
- **幕布**:点对话顶边标签条里的液滴把手(或面板标题栏的「幕布」圆钮)展开全屏大纲;点任意条目、按 Esc 或点右上角的 ✕ 收起
|
|
86
|
+
- **跳到本节末尾**:悬停标题行 / 组头 / 结果行,点右端出现的圆钮
|
|
87
|
+
- **跨会话检索**:搜索框右侧的范围按钮点两下切到「会话」,用宿主的全文索引搜其他会话;点结果切到那个会话并继续查找
|
|
88
|
+
- **键盘**:面板打开后 ↑/↓ 移动光标、Enter 跳转、Home / End 到首尾、Esc 收起;搜索框里 ↑/↓ 在命中之间切换
|
|
89
|
+
- **只看提问**:标题栏的语音气泡按钮把大纲折成每轮的时间 + 你的提问首行
|
|
78
90
|
- **回到底部**:翻远了之后点列表右下角的浮动按钮回到最新一条
|
|
79
91
|
- **阅读位置**:滚动对话,正在阅读的回合会以蓝框标出;大纲会自动跟随
|
|
80
|
-
- **设置**:在 **设置 → 插件 → 插件配置** 里展开「对话大纲」卡片,可改语言、默认停靠边缘、面板缩放(50%–200% 滑块,5% 一档)、收起把手的位置(0%–100% 滑块,1% 一档;0% 在最下、100% 在最上,默认 50%
|
|
92
|
+
- **设置**:在 **设置 → 插件 → 插件配置** 里展开「对话大纲」卡片,可改语言、默认停靠边缘、面板缩放(50%–200% 滑块,5% 一档)、收起把手的位置(0%–100% 滑块,1% 一档;0% 在最下、100% 在最上,默认 50% 居中)、显示的标题层级、记住阅读位置与模糊/悬停/诊断开关;改过的字段可单独重置(改回默认值时标记自动消失)。卡片与面板实时同步,不需要刷新;偏好保存在 DSH 的设置里,跟随配置走
|
|
81
93
|
|
|
82
94
|
## 诊断
|
|
83
95
|
|
|
@@ -98,7 +110,8 @@ dsh plugin --profile web add <插件目录路径>
|
|
|
98
110
|
- 「未加载回合」能力依赖宿主的两样东西:`turnOutline` 投影(整段会话的回合索引,每条含 `turn/start` 的 seq)与会话跳转加载器(客户端 `sessions` 服务的 `binding(sessionId).session.loadThrough(seq)`,通过客户端 ctx 的 `ctx.get("sessions")` 免声明查找取得)。两者各自独立降级:没有投影时只列已加载回合,没有加载器时未加载条目只展示、不跳转,面板其余功能不受影响。
|
|
99
111
|
- 失败回合的报错行读的是宿主的 `turn-error` 会话节点(宿主在 `turn/end` 的原因为 `error` 时发布,含 `message` 与可选的 `code`);宿主不提供该节点时只是不显示这一行,其余功能不受影响。
|
|
100
112
|
- 界面文字来自 `lib/client.js` 顶部的一张字符串表(`DICTS`,中英各一份),语言设置决定用哪一份:`跟随宿主` 时优先问宿主的翻译函数(`ctx.locale.bind("dsh-quick-toc")`,注册的表就来自 `DICTS`),拿不到才回退到内置表。中英两份表的键必须对齐(仅 `time.beforeYesterday`(前天)是中文独有——英文对更早的时间直接用日期;`time.yesterday` 两语言都有,英文作 `yesterday`)。
|
|
101
|
-
- 偏好存储分两层,由一个模块级 store 统一读出:宿主设置文档(`ctx.settingsScope.bind({ namespace: "dsh-quick-toc" })
|
|
113
|
+
- 偏好存储分两层,由一个模块级 store 统一读出:宿主设置文档(`ctx.settingsScope.bind({ namespace: "dsh-quick-toc" })`,语言/停靠边/层级/缩放/把手位置/记住阅读位置/模糊/悬停/诊断九项,回环页面上是权威层)与 `localStorage`(镜像 + 顶边距/宽度/高度三项的正式存储——它们描述"这一块屏幕",按浏览器保存)。写入按字段路由:宿主字段走 `scope.mutate`(本地同步折叠、宿主应答后对账),其余写 `localStorage`;写入的值若正好是该字段的默认值,则改为把用户层里的这一项删掉(等同于"未自定义")。非回环页面 DSH 将设置标记为只读,此时这九项偏好退回本地镜像,行为与 0.5.x 一致;0.5.x 留下的本地值会在宿主层首次应答时导入一次(仅当用户层为空)。
|
|
114
|
+
- 幕布与停靠面板**共用同一份列表 DOM**:幕布只是把面板本体搬进一个从标签条下沿落下的整宽容器(面板在幕布态换一套几何:相对定位、宽高 100%、不套用面板缩放),容器本身常驻挂载、收起时是一个 0×0 的直通盒,所以开关幕布不会重建列表、也不会丢掉滚动位置。跨会话检索走客户端 `ctx.get("sessions")` 的 `search(query, signal)`(走宿主的会话全文索引,一次最多 20 条);每个会话的阅读位置存在浏览器本地(`dsh-quick-toc.readPos.v1`,半小时内有效)。
|
|
102
115
|
- 插件配置卡片注册进 `settings.plugin.item` 槽(`key` 为插件命名空间;该槽按宿主实际提供的命名空间派发,宿主半未加载时卡片自然不出现,面板不受影响);卡片与面板共享上面那个 store,因此两边实时互通。
|
|
103
116
|
- 修改 `lib/client.js` 后刷新页面即可看到变化(客户端模块按内容哈希发版,DSH 的客户端 HMR 也会推送重载);改 `lib/index.js`(宿主半)需重启 DSH
|
|
104
117
|
|