@luziyang2026/dsh-question-nav 0.1.0 → 0.3.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/README.md +28 -18
- package/README.zh.md +24 -15
- package/lib/client.js +344 -72
- package/lib/client.js.map +1 -1
- package/lib/types/client/QuestionNavStrip.d.ts +5 -2
- package/lib/types/client/index.d.ts +10 -3
- package/lib/types/client/locales.d.ts +6 -0
- package/lib/types/core/history-index.d.ts +99 -0
- package/lib/types/core/load-all.d.ts +53 -0
- package/lib/types/core/nodes.d.ts +7 -0
- package/package.json +1 -1
- package/src/client/QuestionNavStrip.tsx +105 -9
- package/src/client/index.ts +53 -4
- package/src/client/locales.ts +6 -0
- package/src/client/question-nav.module.css +24 -0
- package/src/core/history-index.ts +176 -0
- package/src/core/nodes.ts +14 -0
package/README.md
CHANGED
|
@@ -10,47 +10,56 @@ It is an external plugin bundle with zero runtime dependencies — the browser
|
|
|
10
10
|
half (`lib/client.js`) externalizes everything to the DSH shell, so it adds
|
|
11
11
|
only a small bundle to the GUI at load time.
|
|
12
12
|
|
|
13
|
+
Package: **`@luziyang2026/dsh-question-nav`** ([npm][npm]).
|
|
14
|
+
|
|
13
15
|
## What it does
|
|
14
16
|
|
|
15
17
|
- **Left-edge dot minimap** (embedded, not reserving any width).
|
|
16
18
|
- **Vertically centered** in the conversation column.
|
|
17
19
|
- **One dot = one user question**, with a small count above the dot column.
|
|
20
|
+
- **Full history, no render-window expansion**: the index is built by paging
|
|
21
|
+
the raw `session.history` RPC (read-only), so every question in the session —
|
|
22
|
+
including ones still collapsed behind DSH's "load older" button — appears as
|
|
23
|
+
a dot without expanding the conversation's paged window (memory economy
|
|
24
|
+
preserved). While the index is building the count shows a "…"; if the safety
|
|
25
|
+
budget is exhausted a dimmed dashed dot above the oldest question offers
|
|
26
|
+
"load earlier" on click.
|
|
18
27
|
- **Hover**: the dot enlarges and an instant tooltip (portal-rendered, no
|
|
19
28
|
native-title delay) shows the question's **full text**.
|
|
20
|
-
- **Click**: jumps to that question
|
|
21
|
-
|
|
29
|
+
- **Click**: jumps to that question. Only then does the jump loop page the
|
|
30
|
+
window (`loadOlder()`) to bring that specific page into view — never the
|
|
31
|
+
whole history up front.
|
|
22
32
|
- Empty/left areas of the rail pass pointer events through to the conversation
|
|
23
33
|
(it never blocks the chat).
|
|
24
34
|
|
|
25
|
-
##
|
|
35
|
+
## Requirements
|
|
26
36
|
|
|
27
|
-
-
|
|
28
|
-
|
|
29
|
-
- `user` and `steering` user messages count as questions.
|
|
37
|
+
- DeepSeek Harness Web GUI (a runnable DSH profile; the `dsh` CLI).
|
|
38
|
+
- Node.js `>= 20` (matches the DSH SDK peer range).
|
|
30
39
|
|
|
31
|
-
## Install
|
|
40
|
+
## Install
|
|
32
41
|
|
|
33
|
-
|
|
34
|
-
profile as an installable [bundle][bundle].
|
|
42
|
+
Install the prebuilt package from npm and add it to a profile:
|
|
35
43
|
|
|
36
44
|
```sh
|
|
37
|
-
|
|
38
|
-
pnpm build # tsc declarations + tsdown client bundle -> lib/
|
|
45
|
+
dsh plugin --profile web add @luziyang2026/dsh-question-nav
|
|
39
46
|
```
|
|
40
47
|
|
|
41
|
-
|
|
48
|
+
Then restart the DSH Web GUI to load the new bundle.
|
|
42
49
|
|
|
43
|
-
|
|
44
|
-
dsh plugin --profile web add ./dsh-question-nav
|
|
45
|
-
```
|
|
50
|
+
### Build from source / develop locally
|
|
46
51
|
|
|
47
|
-
|
|
52
|
+
This repository is a standalone plugin project — build it, then add the
|
|
53
|
+
checkout to a profile as an installable [bundle][bundle]:
|
|
48
54
|
|
|
49
55
|
```sh
|
|
50
|
-
|
|
56
|
+
pnpm install # install devDependencies (DSH SDK peers, tsdown, vitest)
|
|
57
|
+
pnpm build # tsc declarations + tsdown client bundle -> lib/
|
|
51
58
|
```
|
|
52
59
|
|
|
53
|
-
|
|
60
|
+
```sh
|
|
61
|
+
dsh plugin --profile web add ./dsh-question-nav
|
|
62
|
+
```
|
|
54
63
|
|
|
55
64
|
## Development
|
|
56
65
|
|
|
@@ -73,4 +82,5 @@ module table.
|
|
|
73
82
|
BSD-3-Clause.
|
|
74
83
|
|
|
75
84
|
[dsh]: https://github.com/deepseek-harness/deepseek-harness
|
|
85
|
+
[npm]: https://www.npmjs.com/package/@luziyang2026/dsh-question-nav
|
|
76
86
|
[bundle]: https://github.com/deepseek-harness/deepseek-harness
|
package/README.zh.md
CHANGED
|
@@ -7,42 +7,50 @@
|
|
|
7
7
|
它是外部插件 bundle,**零运行时依赖** —— 浏览器半区(`lib/client.js`)把一切
|
|
8
8
|
外部化给 DSH 外壳,加载时只往 GUI 里加一个很小的 bundle。
|
|
9
9
|
|
|
10
|
+
包名:**`@luziyang2026/dsh-question-nav`**([npm][npm])。
|
|
11
|
+
|
|
10
12
|
## 功能
|
|
11
13
|
|
|
12
14
|
- **左缘圆点迷你地图**:内嵌,**不占任何宽度**。
|
|
13
15
|
- **垂直居中**在对话栏中。
|
|
14
16
|
- **一个圆点 = 一个用户提问**,圆点列上方有提问数量。
|
|
17
|
+
- **完整历史、不展开渲染窗口**:索引通过分页读取原始 `session.history`
|
|
18
|
+
RPC(只读)构建,所以会话里的每一个提问——包括仍被 DSH"加载更早"按钮
|
|
19
|
+
折叠隐藏的老提问——都会变成圆点,**不会**展开对话的分页窗口(保留 DSH
|
|
20
|
+
的内存经济性)。构建索引期间数量后显示 "…";若超过安全预算,最老提问
|
|
21
|
+
上方会出现一个虚线圆点,点击继续加载。
|
|
15
22
|
- **悬停**:圆点放大 + 即时提示框(portal 渲染,无原生 `title` 延迟)显示**全文**。
|
|
16
|
-
-
|
|
23
|
+
- **点击**:跳转到该提问;只有这时跳转循环才 `loadOlder()` 扩窗,把**那一页**
|
|
24
|
+
带进视图——绝不会一次性展开整个历史。
|
|
17
25
|
- 圆点列空白区域**点穿**到对话内容,不会挡住聊天。
|
|
18
26
|
|
|
19
|
-
##
|
|
27
|
+
## 环境要求
|
|
20
28
|
|
|
21
|
-
-
|
|
22
|
-
-
|
|
29
|
+
- DeepSeek Harness Web GUI(可运行的 DSH profile;需要 `dsh` CLI)。
|
|
30
|
+
- Node.js `>= 20`(与 DSH SDK peer 范围一致)。
|
|
23
31
|
|
|
24
|
-
##
|
|
32
|
+
## 安装
|
|
25
33
|
|
|
26
|
-
|
|
34
|
+
从 npm 装预构建包并加进 profile:
|
|
27
35
|
|
|
28
36
|
```sh
|
|
29
|
-
|
|
30
|
-
pnpm build # tsc 声明 + tsdown client bundle -> lib/
|
|
37
|
+
dsh plugin --profile web add @luziyang2026/dsh-question-nav
|
|
31
38
|
```
|
|
32
39
|
|
|
33
|
-
|
|
40
|
+
然后重启 DSH Web GUI 以加载新 bundle。
|
|
34
41
|
|
|
35
|
-
|
|
36
|
-
dsh plugin --profile web add ./dsh-question-nav
|
|
37
|
-
```
|
|
42
|
+
### 从源码构建 / 本地开发
|
|
38
43
|
|
|
39
|
-
|
|
44
|
+
本仓库是独立插件工程 —— 先构建,再作为可安装的 [bundle][bundle] 加进 profile:
|
|
40
45
|
|
|
41
46
|
```sh
|
|
42
|
-
|
|
47
|
+
pnpm install # 安装 devDependencies(DSH SDK peers、tsdown、vitest)
|
|
48
|
+
pnpm build # tsc 声明 + tsdown client bundle -> lib/
|
|
43
49
|
```
|
|
44
50
|
|
|
45
|
-
|
|
51
|
+
```sh
|
|
52
|
+
dsh plugin --profile web add ./dsh-question-nav
|
|
53
|
+
```
|
|
46
54
|
|
|
47
55
|
## 开发
|
|
48
56
|
|
|
@@ -64,4 +72,5 @@ externals 经加载器模块表解析。
|
|
|
64
72
|
BSD-3-Clause。
|
|
65
73
|
|
|
66
74
|
[dsh]: https://github.com/deepseek-harness/deepseek-harness
|
|
75
|
+
[npm]: https://www.npmjs.com/package/@luziyang2026/dsh-question-nav
|
|
67
76
|
[bundle]: https://github.com/deepseek-harness/deepseek-harness
|