@max-null/dsh-chat-rail 0.6.6 → 0.6.7

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.
Files changed (2) hide show
  1. package/README.md +3 -3
  2. package/package.json +93 -93
package/README.md CHANGED
@@ -41,7 +41,7 @@ This plugin belongs to the **`@max-null/*` family** — a set of plugins that to
41
41
  - **无 better-sidebar 也能用**:变量缺失时走 CSS fallback(垂直居中 + 视口右缘),纯 DSH 环境开箱即用。
42
42
  - **与 DSH 自带轮次导航协同**:DSH `0.1.2-alpha.1+` 自带 TurnNavigator(轮次导航竖轨)。安装本插件后自动隐藏官方竖轨(aria-label 双文案锚点,不依赖构建 hash),由本插件统一承担会话导航;未安装本插件时官方导航照常显示。设置卡片另提供**「使用官方轮次导航条(对比模式)」**开关,可随时切回官方竖轨对比(免重启生效)。
43
43
  - **深历史跳转(DSH `0.1.2-alpha.3+` 内核)**:会话历史按窗口分页加载(`hasMore`)时,点击跳转走官方 `loadThrough(seq)` 精确跳转装载器(200 条/页一次到位),替代旧版逐页 `loadOlder`(50 条/页)循环;旧内核无 `loadThrough` 时自动回退逐页循环。
44
- - 需要 DSH ≥ `0.1.0-rc.6`;随 SSiD v0.3.0(内核 `0.1.5-rc.2`)完整适配验证。
44
+ - **DSH 版本要求**:`>=0.1.7-rc.2 <0.3.0`,与 `peerDependencies` 一致。内核按 `semver.satisfies(运行时, 范围, { includePrerelease: true })` 逐个校验 `@deepseek-ai/dsh-*` peer——预发布版参与比较,caret 写法 `^0.1.7-rc.2` 的上界是 `0.2.0-0`,对 `0.2.0-rc.1` 判 false 会让插件**不被装载**,所以上界写成显式的 `<0.3.0`。
45
45
 
46
46
  ## 安装
47
47
 
@@ -67,14 +67,14 @@ dsh plugin --profile <name> add @max-null/dsh-chat-rail
67
67
  ### 收藏与快速填充
68
68
 
69
69
  - **消息操作按钮**:每条用户消息的复制按钮左侧新增两个按钮
70
- - **星 ★**:收藏/取消收藏该消息(收藏后变成黄色实心星);收藏状态按会话持久化(localStorage),刷新与重启后保留
70
+ - **星 ★**:收藏/取消收藏该消息(收藏后变成黄色实心星);收藏按会话持久化在 **host 文件**(`$DSH_HOME/chat-rail-favorites.json`,缺省 `~/.dsh/`),刷新与重启后保留——不走 localStorage(按 origin 隔离,端口一变就丢),旧 localStorage 数据只在首次加载时迁移一次
71
71
  - **加号 +**:一键把该消息**全文 + 附件**填入输入框(草稿设为消息全文,历史图片经官方附件通道回填入输入框)
72
72
  - **导航条联动**:收藏的消息指示条显示为**黄色**;展开态在标题前显示小星标
73
73
  - **只显示收藏**:过滤开关是导航面板的**通栏 header**(星标 + 文案 + 底部分隔线,折叠/展开同构、贴顶),点击点亮(黄色实心)后导航栏只显示已收藏的消息;再点恢复全部。列表在 header 之下独立滚动,开关不压住条目;无收藏时不显示该开关,过滤中取消最后一条收藏会自动退出过滤
74
74
 
75
75
  ## 架构
76
76
 
77
- - **host 半端**(`lib/index.mjs`):注册 `chatRail` 会话投影——从 session log 折叠用户消息锚点 `{ seq, time, text, id }`(排除插件/工具注入的上下文行)
77
+ - **host 半端**(`lib/index.mjs`):注册 `chatRail` 会话投影——从 session log 折叠用户消息锚点 `{ seq, time, text, hasImage, images, id }`(排除插件/工具注入的上下文行)
78
78
  - **client 半端**(`lib/client.js`):`conversation.input.dock` 槽注入,portal 渲染到 body;右缘实时测量会话列定位(ResizeObserver + 兜底采样),侧边栏 push 展开时跟随移动,空间不足时淡出
79
79
  - 数据源优先序:`chatRail` 投影 → 已加载聊天节点 → 后台 loadOlder 循环
80
80
 
package/package.json CHANGED
@@ -1,93 +1,93 @@
1
- {
2
- "name": "@max-null/dsh-chat-rail",
3
- "version": "0.6.6",
4
- "description": "画卷式消息导航栏:右侧竖条 hover 展开画卷,scroll-spy 高亮居中跟随,编号+时间+完整预览,锚定会话列右缘避让侧边栏,收藏过滤,tip 内嵌提问&回答直达",
5
- "type": "module",
6
- "main": "lib/index.mjs",
7
- "repository": {
8
- "type": "git",
9
- "url": "git+https://github.com/Max-Null/dsh-chat-rail.git"
10
- },
11
- "homepage": "https://github.com/Max-Null/dsh-chat-rail#readme",
12
- "bugs": {
13
- "url": "https://github.com/Max-Null/dsh-chat-rail/issues"
14
- },
15
- "exports": {
16
- ".": "./lib/index.mjs",
17
- "./client": "./lib/client.js",
18
- "./cordis.patch.yml": "./cordis.patch.yml",
19
- "./package.json": "./package.json"
20
- },
21
- "files": [
22
- "lib",
23
- "cordis.patch.yml",
24
- "README.md",
25
- "LICENSE",
26
- "docs/shots",
27
- "!docs/shots/rail-ssid-dev-*"
28
- ],
29
- "dsh": {
30
- "bundle": {
31
- "patch": "./cordis.patch.yml"
32
- },
33
- "client": {
34
- "inject": [
35
- "@deepseek-ai/dsh-client-runtime",
36
- "@deepseek-ai/dsh-client-locale",
37
- "@deepseek-ai/dsh-client-ui-slots",
38
- "@deepseek-ai/dsh-client-ui-conversation"
39
- ],
40
- "platform": "web"
41
- }
42
- },
43
- "scripts": {
44
- "build": "tsdown",
45
- "typecheck": "tsc --noEmit",
46
- "watch": "tsdown --watch",
47
- "test": "node --import tsx/esm --test tests/**/*.spec.ts"
48
- },
49
- "license": "MIT",
50
- "keywords": [
51
- "dsh",
52
- "dsh-plugin",
53
- "deepseek-harness",
54
- "ssid",
55
- "conversation",
56
- "navigation",
57
- "timeline",
58
- "rail"
59
- ],
60
- "dependencies": {
61
- "@deepseek-ai/schemastery": "^3.18.4"
62
- },
63
- "peerDependencies": {
64
- "@deepseek-ai/cordis": "^4.0.4",
65
- "@deepseek-ai/dsh-session-projection": "^0.1.7-rc.2",
66
- "@deepseek-ai/dsh-settings": "^0.1.7-rc.2",
67
- "react": "^18.2.0",
68
- "react-dom": "^18.2.0"
69
- },
70
- "devDependencies": {
71
- "@deepseek-ai/cordis": "^4.0.4",
72
- "@deepseek-ai/dsh-client-locale": "^0.1.7-rc.2",
73
- "@deepseek-ai/dsh-client-ui-conversation": "^0.1.7-rc.2",
74
- "@deepseek-ai/dsh-session": "^0.1.7-rc.2",
75
- "@deepseek-ai/dsh-session-projection": "^0.1.7-rc.2",
76
- "@deepseek-ai/dsh-settings": "^0.1.7-rc.2",
77
- "@types/node": "^22.0.0",
78
- "@types/react": "~18.3.1",
79
- "@types/react-dom": "^18.3.7",
80
- "cordis": "^4.0.0-rc.7",
81
- "playwright-core": "1.57.0",
82
- "react": "^18.2.0",
83
- "react-dom": "^18.2.0",
84
- "tsdown": "^0.22.2",
85
- "tsx": "^4.0.0",
86
- "typescript": "^5.6.0",
87
- "unrun": "^0.3.1",
88
- "@deepseek-ai/dsh-api-session-controller": "^0.1.7-rc.2",
89
- "@deepseek-ai/dsh-client-ui-plugin-manager": "^0.1.7-rc.2",
90
- "@deepseek-ai/dsh-client-ui-settings": "^0.1.7-rc.2",
91
- "@deepseek-ai/dsh-client-ui-renderer": "^0.1.7-rc.2"
92
- }
93
- }
1
+ {
2
+ "name": "@max-null/dsh-chat-rail",
3
+ "version": "0.6.7",
4
+ "description": "画卷式消息导航栏:右侧竖条 hover 展开画卷,scroll-spy 高亮居中跟随,编号+时间+完整预览,锚定会话列右缘避让侧边栏,收藏过滤,tip 内嵌提问&回答直达",
5
+ "type": "module",
6
+ "main": "lib/index.mjs",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/Max-Null/dsh-chat-rail.git"
10
+ },
11
+ "homepage": "https://github.com/Max-Null/dsh-chat-rail#readme",
12
+ "bugs": {
13
+ "url": "https://github.com/Max-Null/dsh-chat-rail/issues"
14
+ },
15
+ "exports": {
16
+ ".": "./lib/index.mjs",
17
+ "./client": "./lib/client.js",
18
+ "./cordis.patch.yml": "./cordis.patch.yml",
19
+ "./package.json": "./package.json"
20
+ },
21
+ "files": [
22
+ "lib",
23
+ "cordis.patch.yml",
24
+ "README.md",
25
+ "LICENSE",
26
+ "docs/shots",
27
+ "!docs/shots/rail-ssid-dev-*"
28
+ ],
29
+ "dsh": {
30
+ "bundle": {
31
+ "patch": "./cordis.patch.yml"
32
+ },
33
+ "client": {
34
+ "inject": [
35
+ "@deepseek-ai/dsh-client-runtime",
36
+ "@deepseek-ai/dsh-client-locale",
37
+ "@deepseek-ai/dsh-client-ui-slots",
38
+ "@deepseek-ai/dsh-client-ui-conversation"
39
+ ],
40
+ "platform": "web"
41
+ }
42
+ },
43
+ "scripts": {
44
+ "build": "tsdown",
45
+ "typecheck": "tsc --noEmit",
46
+ "watch": "tsdown --watch",
47
+ "test": "node --import tsx/esm --test tests/**/*.spec.ts"
48
+ },
49
+ "license": "MIT",
50
+ "keywords": [
51
+ "dsh",
52
+ "dsh-plugin",
53
+ "deepseek-harness",
54
+ "ssid",
55
+ "conversation",
56
+ "navigation",
57
+ "timeline",
58
+ "rail"
59
+ ],
60
+ "dependencies": {
61
+ "@deepseek-ai/schemastery": "^3.18.4"
62
+ },
63
+ "peerDependencies": {
64
+ "@deepseek-ai/cordis": "^4.0.4",
65
+ "@deepseek-ai/dsh-session-projection": ">=0.1.7-rc.2 <0.3.0",
66
+ "@deepseek-ai/dsh-settings": ">=0.1.7-rc.2 <0.3.0",
67
+ "react": "^18.2.0",
68
+ "react-dom": "^18.2.0"
69
+ },
70
+ "devDependencies": {
71
+ "@deepseek-ai/cordis": "^4.0.4",
72
+ "@deepseek-ai/dsh-client-locale": ">=0.1.7-rc.2 <0.3.0",
73
+ "@deepseek-ai/dsh-client-ui-conversation": ">=0.1.7-rc.2 <0.3.0",
74
+ "@deepseek-ai/dsh-session": ">=0.1.7-rc.2 <0.3.0",
75
+ "@deepseek-ai/dsh-session-projection": ">=0.1.7-rc.2 <0.3.0",
76
+ "@deepseek-ai/dsh-settings": ">=0.1.7-rc.2 <0.3.0",
77
+ "@types/node": "^22.0.0",
78
+ "@types/react": "~18.3.1",
79
+ "@types/react-dom": "^18.3.7",
80
+ "cordis": "^4.0.0-rc.7",
81
+ "playwright-core": "1.57.0",
82
+ "react": "^18.2.0",
83
+ "react-dom": "^18.2.0",
84
+ "tsdown": "^0.22.2",
85
+ "tsx": "^4.0.0",
86
+ "typescript": "^5.6.0",
87
+ "unrun": "^0.3.1",
88
+ "@deepseek-ai/dsh-api-session-controller": ">=0.1.7-rc.2 <0.3.0",
89
+ "@deepseek-ai/dsh-client-ui-plugin-manager": ">=0.1.7-rc.2 <0.3.0",
90
+ "@deepseek-ai/dsh-client-ui-settings": ">=0.1.7-rc.2 <0.3.0",
91
+ "@deepseek-ai/dsh-client-ui-renderer": ">=0.1.7-rc.2 <0.3.0"
92
+ }
93
+ }