xrkh-better-sidebar 0.18.26 → 0.18.28
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/LICENSE +22 -22
- package/README.md +137 -119
- package/README_EN.md +122 -116
- package/lib/client-editor.js +404 -228
- package/lib/client-mermaid.js +367 -225
- package/lib/client-registry.js +1258 -566
- package/lib/client-terminal.js +386 -226
- package/lib/client.js +1258 -566
- package/lib/index.js +359 -8
- package/lib/types/client/TreePanel.d.ts +13 -2
- package/lib/types/client/api.d.ts +42 -1
- package/lib/types/client/editor-load.d.ts +27 -0
- package/lib/types/client/intercept.d.ts +7 -2
- package/lib/types/client/lang.d.ts +2 -0
- package/lib/types/client/locales.d.ts +3 -0
- package/lib/types/client/produced-files.d.ts +54 -10
- package/lib/types/client/service.d.ts +1 -1
- package/lib/types/client/tree-watch.d.ts +89 -0
- package/lib/types/fs-watch.d.ts +75 -0
- package/lib/types/map-bounded.d.ts +22 -0
- package/lib/types/wire.d.ts +24 -0
- package/package.json +190 -190
- package/scripts/install-xrkh.ps1 +15 -15
- package/scripts/install-xrkh.sh +12 -12
- package/src/agent-opens.ts +265 -265
- package/src/agent-pty.ts +527 -527
- package/src/browser-probe.ts +26 -26
- package/src/bundle-route.ts +129 -129
- package/src/client/BrowserView.tsx +298 -298
- package/src/client/DiffTab.tsx +115 -115
- package/src/client/EditorHost.tsx +636 -563
- package/src/client/FenceErrorNotice.tsx +40 -40
- package/src/client/FileTree.tsx +751 -707
- package/src/client/FreeWindow.tsx +337 -337
- package/src/client/MarkdownHtml.tsx +296 -296
- package/src/client/OrphanedTab.tsx +27 -27
- package/src/client/PdfView.tsx +110 -110
- package/src/client/RenderBoundary.tsx +49 -49
- package/src/client/SandboxStatusBar.tsx +60 -60
- package/src/client/SideCardSection.module.css +960 -960
- package/src/client/SideCardSection.tsx +1117 -1117
- package/src/client/Sidebar.tsx +1812 -1802
- package/src/client/SubagentView.module.css +547 -547
- package/src/client/SubagentView.tsx +894 -894
- package/src/client/TabBar.tsx +365 -365
- package/src/client/TerminalView.tsx +531 -531
- package/src/client/TextEditor.tsx +485 -485
- package/src/client/TreePanel.tsx +291 -279
- package/src/client/UploadOverlay.tsx +62 -62
- package/src/client/add-plugin-modal.tsx +199 -199
- package/src/client/api.ts +424 -364
- package/src/client/binary-download.tsx +23 -23
- package/src/client/breakpoints.ts +61 -61
- package/src/client/browser.ts +167 -167
- package/src/client/builtins/index.ts +37 -37
- package/src/client/builtins/tabs.tsx +346 -346
- package/src/client/builtins/viewers.tsx +151 -151
- package/src/client/changes/ChangesTab.tsx +204 -204
- package/src/client/changes/DiffPane.tsx +313 -313
- package/src/client/changes/GitLens.tsx +734 -734
- package/src/client/changes/SessionLens.tsx +102 -102
- package/src/client/changes/changes.module.css +399 -399
- package/src/client/changes/ops.ts +230 -230
- package/src/client/chunk-loader.ts +350 -350
- package/src/client/chunks/editor.tsx +9 -9
- package/src/client/chunks/mermaid.tsx +10 -10
- package/src/client/chunks/terminal.tsx +9 -9
- package/src/client/cm-themes.ts +129 -129
- package/src/client/conversation-draft.ts +65 -65
- package/src/client/css-modules.d.ts +5 -5
- package/src/client/desktop-env.ts +72 -72
- package/src/client/diff/DiffFiles.tsx +122 -122
- package/src/client/diff/DiffRows.tsx +271 -271
- package/src/client/diff/diff.module.css +86 -86
- package/src/client/diff/highlight.ts +383 -383
- package/src/client/diff/rows.ts +473 -473
- package/src/client/editor-load.ts +128 -92
- package/src/client/frame-batcher.ts +56 -56
- package/src/client/icons.tsx +175 -175
- package/src/client/image-types.ts +8 -8
- package/src/client/ime-guard.ts +47 -47
- package/src/client/index.tsx +390 -390
- package/src/client/intercept.tsx +215 -172
- package/src/client/lang.ts +247 -225
- package/src/client/layout-push.ts +40 -40
- package/src/client/layout.css +105 -105
- package/src/client/lazy-chunk.tsx +89 -89
- package/src/client/link-intercept.ts +73 -73
- package/src/client/locales-ar.ts +389 -382
- package/src/client/locales-de.ts +374 -367
- package/src/client/locales-fr.ts +381 -374
- package/src/client/locales-hi.ts +388 -381
- package/src/client/locales-id.ts +386 -379
- package/src/client/locales-it.ts +379 -372
- package/src/client/locales-ja.ts +388 -381
- package/src/client/locales-ko.ts +380 -373
- package/src/client/locales-nl.ts +386 -379
- package/src/client/locales-pl.ts +390 -383
- package/src/client/locales-pt.ts +371 -364
- package/src/client/locales-ru.ts +386 -379
- package/src/client/locales-sv.ts +371 -364
- package/src/client/locales-th.ts +388 -381
- package/src/client/locales-tr.ts +388 -381
- package/src/client/locales-vi.ts +388 -381
- package/src/client/locales-zh-HK.ts +403 -396
- package/src/client/locales-zh-MO.ts +403 -396
- package/src/client/locales-zh-TW.ts +403 -396
- package/src/client/locales.ts +887 -881
- package/src/client/markdown-html.ts +331 -331
- package/src/client/markdown-images.ts +137 -137
- package/src/client/markdown-labels.tsx +22 -22
- package/src/client/md-toc.tsx +127 -127
- package/src/client/mermaid-blocks.ts +110 -110
- package/src/client/mermaid-sanitize.ts +93 -93
- package/src/client/mermaid.tsx +406 -406
- package/src/client/open-when-sized.ts +43 -43
- package/src/client/open-with-settings.tsx +135 -135
- package/src/client/open-with.ts +221 -221
- package/src/client/openpath-intercept.ts +79 -79
- package/src/client/paths.ts +72 -72
- package/src/client/pdf-types.ts +4 -4
- package/src/client/pinned.ts +184 -184
- package/src/client/plugin-settings.ts +43 -43
- package/src/client/plugins-shared.ts +22 -22
- package/src/client/plugins-tabs.ts +7 -7
- package/src/client/plugins-viewers.ts +7 -7
- package/src/client/prefs.ts +219 -219
- package/src/client/produced-files.ts +258 -120
- package/src/client/selection-payload.ts +86 -86
- package/src/client/service.ts +1 -1
- package/src/client/settings-nav-icon.ts +45 -45
- package/src/client/shell-presets.ts +83 -83
- package/src/client/sidebar.module.css +2646 -2615
- package/src/client/split-pane.tsx +333 -333
- package/src/client/state.ts +1704 -1704
- package/src/client/subagent-detect.ts +137 -137
- package/src/client/subagent-jobs.ts +203 -203
- package/src/client/tab-content-memo.ts +55 -55
- package/src/client/terminal-font.ts +224 -224
- package/src/client/terminal-links.ts +194 -194
- package/src/client/terminal-paint.ts +16 -16
- package/src/client/theme.ts +110 -110
- package/src/client/titlebar-strip.ts +52 -52
- package/src/client/tree-watch.ts +311 -0
- package/src/client/upload.ts +187 -187
- package/src/client/wco.ts +120 -120
- package/src/config.ts +157 -157
- package/src/context-types.ts +577 -577
- package/src/fs-operations.ts +97 -97
- package/src/fs-search.ts +113 -113
- package/src/fs-tree.ts +158 -158
- package/src/fs-watch.ts +245 -0
- package/src/git.ts +446 -446
- package/src/html-route.ts +106 -106
- package/src/identity.ts +13 -13
- package/src/index.ts +1474 -1340
- package/src/invariant.ts +32 -32
- package/src/jobs-routes.ts +257 -257
- package/src/map-bounded.ts +41 -0
- package/src/open-external.ts +89 -89
- package/src/path-security.ts +81 -81
- package/src/prefs-shared.ts +313 -313
- package/src/pty-deps.ts +226 -226
- package/src/pty-manager.ts +376 -376
- package/src/side-label.ts +10 -10
- package/src/subagent-activity.ts +120 -120
- package/src/subagent-live-route.ts +93 -93
- package/src/tools.ts +482 -482
- package/src/trust-fence.ts +84 -84
- package/src/wire.ts +143 -99
package/LICENSE
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 xrkseek
|
|
4
|
-
Copyright (c) 2026 dsh-external
|
|
5
|
-
|
|
6
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
8
|
-
in the Software without restriction, including without limitation the rights
|
|
9
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
11
|
-
furnished to do so, subject to the following conditions:
|
|
12
|
-
|
|
13
|
-
The above copyright notice and this permission notice shall be included in all
|
|
14
|
-
copies or substantial portions of the Software.
|
|
15
|
-
|
|
16
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 xrkseek
|
|
4
|
+
Copyright (c) 2026 dsh-external
|
|
5
|
+
|
|
6
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
in the Software without restriction, including without limitation the rights
|
|
9
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
furnished to do so, subject to the following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be included in all
|
|
14
|
+
copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,119 +1,137 @@
|
|
|
1
|
-
# xrkh-better-sidebar
|
|
2
|
-
|
|
3
|
-
> **读者**:XRK-Harness 终端用户 · 集成者
|
|
4
|
-
|
|
5
|
-
XRK-Harness(`xrkh`)标准侧边栏插件:资源管理器 · 编辑器 · 终端 · Git · 浏览器等工作台,按会话隔离。
|
|
6
|
-
Host 侧 `/sidebar/*` 由产品 Host 原生挂载(`createSidebarPublicHandler`);本包提供 **client 半包**。`src/index.ts` 的 Cordis host 半包仅供非 XRKH 的 Cordis profile;**不要**在 XRKH 上再挂 host 抢同一前缀。
|
|
7
|
-
|
|
8
|
-
## 安装
|
|
9
|
-
|
|
10
|
-
前置:`xrkh web` 或 `npx @xrkseek/harness-cli web`,Node ≥ 26。建议 Host **≥ 0.3.4**。推荐从 **npmjs** 安装:
|
|
11
|
-
|
|
12
|
-
```bash
|
|
13
|
-
xrkh plugin add xrkh-better-sidebar@0.18.
|
|
14
|
-
xrkh restart
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
装完硬刷新浏览器(Ctrl+Shift+R)。
|
|
18
|
-
|
|
19
|
-
源码路径仍可用(非推荐):`git clone git@github.com:xrkseek/xrkh-better-sidebar.git` 后 `xrkh plugin add ./xrkh-better-sidebar`。
|
|
20
|
-
|
|
21
|
-
## 0.18.
|
|
22
|
-
|
|
23
|
-
-
|
|
24
|
-
-
|
|
25
|
-
-
|
|
26
|
-
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
-
|
|
36
|
-
-
|
|
37
|
-
-
|
|
38
|
-
|
|
39
|
-
## 0.18.
|
|
40
|
-
|
|
41
|
-
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
-
|
|
55
|
-
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
- `
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
-
|
|
74
|
-
-
|
|
75
|
-
|
|
76
|
-
## 0.18.
|
|
77
|
-
|
|
78
|
-
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
-
|
|
88
|
-
|
|
89
|
-
## 0.18.
|
|
90
|
-
|
|
91
|
-
-
|
|
92
|
-
-
|
|
93
|
-
|
|
94
|
-
## 0.18.
|
|
95
|
-
|
|
96
|
-
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
1
|
+
# xrkh-better-sidebar
|
|
2
|
+
|
|
3
|
+
> **读者**:XRK-Harness 终端用户 · 集成者
|
|
4
|
+
|
|
5
|
+
XRK-Harness(`xrkh`)标准侧边栏插件:资源管理器 · 编辑器 · 终端 · Git · 浏览器等工作台,按会话隔离。
|
|
6
|
+
Host 侧 `/sidebar/*` 由产品 Host 原生挂载(`createSidebarPublicHandler`);本包提供 **client 半包**。`src/index.ts` 的 Cordis host 半包仅供非 XRKH 的 Cordis profile;**不要**在 XRKH 上再挂 host 抢同一前缀。
|
|
7
|
+
|
|
8
|
+
## 安装
|
|
9
|
+
|
|
10
|
+
前置:`xrkh web` 或 `npx @xrkseek/harness-cli web`,Node ≥ 26。建议 Host **≥ 0.3.4**。推荐从 **npmjs** 安装:
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
xrkh plugin add xrkh-better-sidebar@0.18.28
|
|
14
|
+
xrkh restart
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
装完硬刷新浏览器(Ctrl+Shift+R)。
|
|
18
|
+
|
|
19
|
+
源码路径仍可用(非推荐):`git clone git@github.com:xrkseek/xrkh-better-sidebar.git` 后 `xrkh plugin add ./xrkh-better-sidebar`。
|
|
20
|
+
|
|
21
|
+
## 0.18.28
|
|
22
|
+
|
|
23
|
+
- 文件树增量自动刷新:AI 建/改/删文件后,已展开的树无感更新。Host 侧新增按 `sessionId` + 目录管理的非递归 `fs.watch` registry(per-subscriber 引用计数、单调 sequence + 有界 replay、watcher 失效自动重开),配 `fs.watch.sync`(只回「哪几层变了」+ 游标)与 `fs.tree.batch`(批量 listing + 可选 `statPaths`)
|
|
24
|
+
- 客户端共享 watch broker:同一会话/cwd 的文件树与多个编辑器合并成一份订阅与一轮请求;活动页 ~1.2s、隐藏页 ~6s、失败退避 4s;健康时每 20 轮全量 sweep,有不可监听目录时 5 轮
|
|
25
|
+
- 刷新语义:只替换真正变化的已加载层(`levelSignature` 比对,相同则跳过 setState),不显示 loading、不调 `refreshTick`、不物化未展开目录、不动展开/搜索/滚动/拖拽状态
|
|
26
|
+
- 打开中文件的外部修改:`mtimeMs` 贯穿 `fs.read` → 渲染 → baseline;内容 clean 时静默重载,dirty 时绝不覆盖草稿,显示「文件已被外部修改,草稿未覆盖」提示条与刷新按钮;无 baseline 的 viewer 不循环重载
|
|
27
|
+
- 修复:`fs.tree.batch` 的 listing/stat 回显改为调用方传入的原始路径(此前回显 Host 解析后的 realpath——symlink workspace root、Windows 大小写或分隔符规范化下,客户端的层级 key 与 stat 行会永久匹配不上,树看起来「不再刷新」)
|
|
28
|
+
- 点击卡顿(静态定位):`TreePanel` 加 memo 渲染边界、树回调 `useCallback` 稳定化、`FileTree` 单次 `setData` 批量提交(原为逐层提交)、CodeMirror 语言包按语言 key 缓存
|
|
29
|
+
- 测试环境:`vitest.config.ts` 加 `resolve.dedupe: ['react', 'react-dom']`(插件与宿主根各装一份 React,经 `client-ui-primitives` 跨界渲染时全部 UI 测试死于 `Invalid hook call`)
|
|
30
|
+
- i18n:19 个语言字典补齐 7 个漏键(`fileChangedOnDisk` / `laneModified` / `laneDeleted` / 四个 `viewer*`)
|
|
31
|
+
- 冗余清理:删除无消费者的 `onDegraded` 钩子、`mergeLevel` 导出与重复的 `messageOf`;`locales.spec.ts` 里测 0.18.0 已删除的 `attachBetterLocale` 覆盖层协议的残留一并清掉
|
|
32
|
+
|
|
33
|
+
## 0.18.27
|
|
34
|
+
|
|
35
|
+
- 对话尾部文件行:按「本次改动 / 本次删除 / 本次产出」三条 lane 渲染(此前只有一条「本次产出」,改动与删除被丢弃)
|
|
36
|
+
- 修复根因:接管 `conversation.chat.turnTail` 时只挑 `path`、丢掉 Turn 数据里的 `op`,等于把内核已有的 lane 压平;删除的 chip 置灰划线、不可点(文件已不存在)
|
|
37
|
+
- 无 `op` 的旧会话回落:`workspace/changes` 行数启发式(0 增有删 → 删除,0 删有增 → 产出,其余 → 改动)
|
|
38
|
+
|
|
39
|
+
## 0.18.26
|
|
40
|
+
|
|
41
|
+
- 终端:挂起唤醒后画布空白时 fit/refresh;网格仍死则 remount 并重挂 PTY;关闭 `allowTransparency` 减轻 GPU 挂起后整页空白
|
|
42
|
+
- Desktop:忽略塌缩的 `visualViewport` 当键盘 inset(避免布局推挤空白条与 `overflow: clip` 裁切面板)
|
|
43
|
+
- 偏好默认与 Host 对齐:`openByDefault` / `bottomPanelAutoTerminal` 默认关
|
|
44
|
+
- 布局:双写 `data-xrkh-sidebar-*` 与 `--xrkh-workbench-*`;存储键 `xrkh-sidebar:v1`(迁移旧 `dsh-sidebar:v1`)
|
|
45
|
+
|
|
46
|
+
## 0.18.21
|
|
47
|
+
|
|
48
|
+
- `openTab({ type: 'editor' })` 固定落到侧栏分栏(`splits`),不因 `activePane` 在底栏而撑开底部面板(避免聊天开文件先出空白底栏 / 自动终端)
|
|
49
|
+
|
|
50
|
+
## 0.18.20
|
|
51
|
+
|
|
52
|
+
- 拖拽分栏时合并 resize(一帧一次、跳过无变化),避免 Windows ConPTY 反复重打「版本」MOTD
|
|
53
|
+
- Host 短暂不可用(5xx / 空 1006)时软重连更久,不把已绘出的 MOTD 盖上致命横幅
|
|
54
|
+
- SSE 与 input/resize POST 不再共用 AbortController,关流时不误取消在途控制请求
|
|
55
|
+
- 载波仍同 0.18.19:页面同源 `xrk-app://app`(池隔离归 Desktop/Face,不在本插件翻)
|
|
56
|
+
|
|
57
|
+
## 0.18.19
|
|
58
|
+
|
|
59
|
+
- Desktop 终端:SSE/POST 回到页面同源 `xrk-app://app`(去掉会 `Failed to fetch` 的 `xrk-app://stream` 分裂与回退冗余)
|
|
60
|
+
|
|
61
|
+
## 0.18.18
|
|
62
|
+
|
|
63
|
+
- 轨图标:面板展开时贴齐 34px 页签条(`+3`),收起时仍对齐会话标题行(`+14`),不再下偏
|
|
64
|
+
- Desktop 终端:SSE 不再带 `Accept`;`stream` 主机打不开时曾回退 `app`(已由 0.18.19 去掉回退)
|
|
65
|
+
|
|
66
|
+
## 0.18.17
|
|
67
|
+
|
|
68
|
+
- 右侧面板顶距改为单一 `top`(`--dsh-title-bar-strip` → `--xrk-desktop-chrome-height`),去掉 `padding-top` 叠 chrome,修复 Desktop 页签上方空带
|
|
69
|
+
|
|
70
|
+
## 0.18.14
|
|
71
|
+
|
|
72
|
+
- `title-bar-compat`:`--dsh-title-bar-strip` 已含 Desktop chrome,不再叠加 `--xrk-desktop-chrome-height`(侧栏轨图标不再比标题栏矮一截)
|
|
73
|
+
- toggle cluster:与会话标题行垂直对齐(`+14px` · `align-items: center`)
|
|
74
|
+
- 启动期 panel/FAB 隐藏:去掉插件侧重复 CSS,统一由内核 `data-xrk-booting` 负责
|
|
75
|
+
|
|
76
|
+
## 0.18.12
|
|
77
|
+
|
|
78
|
+
- 启动 splash(`data-xrk-booting`):隐藏 panel-host / FAB,避免与 HARNESS 启动页叠层
|
|
79
|
+
- 会话头「Session log」:有 toggle cluster 时始终右缩,展开动画中不再被按钮挡住
|
|
80
|
+
- 动效:主题 token 冷启动回退 380ms / cubic-bezier,展开收起不再僵硬跳切
|
|
81
|
+
- Desktop chrome:右侧面板与 FAB 避开 `--xrk-desktop-chrome-height`
|
|
82
|
+
|
|
83
|
+
## 0.18.11
|
|
84
|
+
|
|
85
|
+
- 文件页:`openTab({ type: 'editor' })` 聚焦已种子的 files-home,不再并排冒出第二个「文件」标签
|
|
86
|
+
- `applyDedupe`:`dedupeKey` 返回 `undefined` 时仍按同 cohort 去重(与 pathless 编辑器一致)
|
|
87
|
+
- 底栏首次展开:若已有 UI 终端则跳过自动再开一个
|
|
88
|
+
|
|
89
|
+
## 0.18.10
|
|
90
|
+
|
|
91
|
+
- Desktop(`xrk-app://`):终端改走 Host HTTP SSE + POST(`/sidebar/api/pty/*`),不再对无 listen 的私有 Host 死循环 WebSocket 重连
|
|
92
|
+
- 无边框窗口:右侧面板留 2px 边缘,便于 Electron 命中缩放
|
|
93
|
+
|
|
94
|
+
## 0.18.9
|
|
95
|
+
|
|
96
|
+
- `openTab`:当前会话下任意打开(含仅 `type` 的 Files / +菜单)都会展开已折叠侧栏,调用方无需再自行 `togglePanel`
|
|
97
|
+
|
|
98
|
+
## 0.18.3
|
|
99
|
+
|
|
100
|
+
- Client fiber 注入 `layout`(与 `ui-sidebar` 同序):等 `ui-layout` 声明中心栏后再挂侧栏拦截,避免 Host ≥0.3.4 上 `conversation` slot 竞态
|
|
101
|
+
- `xrk.client.inject` 补 `@xrkseek/client-ui-layout`;文档 Host 基线改为 **≥ 0.3.4**
|
|
102
|
+
|
|
103
|
+
## 0.18.2
|
|
104
|
+
|
|
105
|
+
- Files 主页签随 locale;轻量媒体预览;默认打开侧栏
|
|
106
|
+
|
|
107
|
+
## 0.18.1
|
|
108
|
+
|
|
109
|
+
- `subagents.live`:兼容嵌套 `tool` 与旧版扁平 `tool` wire,避免子代理活动预览崩溃
|
|
110
|
+
- 与 Host 原生 `/sidebar/*`(嵌套 live 形状)对齐
|
|
111
|
+
|
|
112
|
+
## 0.18.0
|
|
113
|
+
|
|
114
|
+
- XRKH 原生:去掉第三方双轨(旧 manifest · better-locale · 旧安装脚本 · 市场目录)
|
|
115
|
+
- peer 仅 `@xrkseek/*` + React;工具类型走 `@xrkseek/xrk-tools` / `xrk-settings`
|
|
116
|
+
- 无 Side Chat;子代理走 Host Face + `subagents.live` / `jobs.*`
|
|
117
|
+
- 空 curated 插件目录(社区扩展不随包捆绑)
|
|
118
|
+
|
|
119
|
+
## 契约
|
|
120
|
+
|
|
121
|
+
| 项 | 说明 |
|
|
122
|
+
|----|------|
|
|
123
|
+
| npm | `xrkh-better-sidebar` |
|
|
124
|
+
| 仓库 | `xrkseek/xrkh-better-sidebar` |
|
|
125
|
+
| 形态 | **仅 client 半包**(`package.json` → `xrk.client` → `lib/client.js`) |
|
|
126
|
+
| 注入 | `client-runtime` · `client-locale` · `client-ui-slots` · `client-ui-layout` · `client-ui-conversation` · `client-modules` |
|
|
127
|
+
| Host | **产品 Host 拥有** `/sidebar/api` · `/sidebar/file|upload|html|bundle` · `/sidebar/ws/terminal` 等;本包不在 XRK 上挂 Cordis host 半包抢同一前缀 |
|
|
128
|
+
| 子代理 / 任务 | 走 Host Face + `/sidebar/api` 的 `subagents.live` · `jobs.*`(勿再实现 Side Chat) |
|
|
129
|
+
|
|
130
|
+
契约细则见 Harness 教科书 [community-plugins.md](https://github.com/xrkseek/XRK-harness/blob/main/docs/community-plugins.md)「侧栏插件契约」。
|
|
131
|
+
|
|
132
|
+
## 开发
|
|
133
|
+
|
|
134
|
+
```bash
|
|
135
|
+
pnpm install
|
|
136
|
+
pnpm bundle
|
|
137
|
+
```
|
package/README_EN.md
CHANGED
|
@@ -1,116 +1,122 @@
|
|
|
1
|
-
# xrkh-better-sidebar
|
|
2
|
-
|
|
3
|
-
> **Audience**: XRK-Harness end users · integrators
|
|
4
|
-
|
|
5
|
-
Standard sidebar plugin for XRK-Harness (`xrkh`): explorer · editor · terminal · git · browser, isolated per session.
|
|
6
|
-
Host mounts `/sidebar/*` natively (`createSidebarPublicHandler`); this package ships the **client** half. The Cordis host half in `src/index.ts` is only for non-XRKH Cordis profiles — **do not** mount it on XRKH against the same `/sidebar/*` prefix.
|
|
7
|
-
|
|
8
|
-
## Install
|
|
9
|
-
|
|
10
|
-
Requires `xrkh web` or `npx @xrkseek/harness-cli web`, Node ≥ 26. Prefer Host **≥ 0.3.4**. Install from **npmjs**:
|
|
11
|
-
|
|
12
|
-
```bash
|
|
13
|
-
xrkh plugin add xrkh-better-sidebar@0.18.
|
|
14
|
-
xrkh restart
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
Hard-refresh the browser after install (Ctrl+Shift+R).
|
|
18
|
-
|
|
19
|
-
Source path still works (not preferred): `git clone git@github.com:xrkseek/xrkh-better-sidebar.git` then `xrkh plugin add ./xrkh-better-sidebar`.
|
|
20
|
-
|
|
21
|
-
## 0.18.
|
|
22
|
-
|
|
23
|
-
-
|
|
24
|
-
-
|
|
25
|
-
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
-
|
|
57
|
-
|
|
58
|
-
## 0.18.
|
|
59
|
-
|
|
60
|
-
-
|
|
61
|
-
-
|
|
62
|
-
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
-
|
|
68
|
-
-
|
|
69
|
-
-
|
|
70
|
-
|
|
71
|
-
## 0.18.
|
|
72
|
-
|
|
73
|
-
-
|
|
74
|
-
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
-
|
|
98
|
-
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
1
|
+
# xrkh-better-sidebar
|
|
2
|
+
|
|
3
|
+
> **Audience**: XRK-Harness end users · integrators
|
|
4
|
+
|
|
5
|
+
Standard sidebar plugin for XRK-Harness (`xrkh`): explorer · editor · terminal · git · browser, isolated per session.
|
|
6
|
+
Host mounts `/sidebar/*` natively (`createSidebarPublicHandler`); this package ships the **client** half. The Cordis host half in `src/index.ts` is only for non-XRKH Cordis profiles — **do not** mount it on XRKH against the same `/sidebar/*` prefix.
|
|
7
|
+
|
|
8
|
+
## Install
|
|
9
|
+
|
|
10
|
+
Requires `xrkh web` or `npx @xrkseek/harness-cli web`, Node ≥ 26. Prefer Host **≥ 0.3.4**. Install from **npmjs**:
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
xrkh plugin add xrkh-better-sidebar@0.18.27
|
|
14
|
+
xrkh restart
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Hard-refresh the browser after install (Ctrl+Shift+R).
|
|
18
|
+
|
|
19
|
+
Source path still works (not preferred): `git clone git@github.com:xrkseek/xrkh-better-sidebar.git` then `xrkh plugin add ./xrkh-better-sidebar`.
|
|
20
|
+
|
|
21
|
+
## 0.18.27
|
|
22
|
+
|
|
23
|
+
- Conversation tail file rows: render three lanes (modified / deleted / created); before, one flat "Produced" row swallowed edits and deletions
|
|
24
|
+
- Root cause: the `conversation.chat.turnTail` takeover kept only `path` and dropped the Turn data's `op`, flattening the host's existing lanes; deleted chips render struck through and inert (the file is gone)
|
|
25
|
+
- Sessions without `op` fall back to the `workspace/changes` line-count heuristic (0 added + deletes → deleted, 0 deleted + adds → created, else modified)
|
|
26
|
+
|
|
27
|
+
## 0.18.26
|
|
28
|
+
|
|
29
|
+
- Terminal: after OS sleep/wake, fit/refresh a blank xterm canvas; remount + reattach PTY if the grid stays dead; disable `allowTransparency` to reduce GPU-sleep blanking
|
|
30
|
+
- Desktop: ignore collapsed `visualViewport` as a keyboard inset (stops a blank layout-push strip and panels clipped by `overflow: clip`)
|
|
31
|
+
- Pref defaults match Host: `openByDefault` / `bottomPanelAutoTerminal` off
|
|
32
|
+
- Layout: dual-write `data-xrkh-sidebar-*` and `--xrkh-workbench-*`; storage key `xrkh-sidebar:v1` (migrates legacy `dsh-sidebar:v1`)
|
|
33
|
+
|
|
34
|
+
## 0.18.21
|
|
35
|
+
|
|
36
|
+
- `openTab({ type: 'editor' })` always lands on the side split tree (`splits`), never expands the bottom panel because `activePane` is a bottom leaf (chat file-open no longer opens a blank bottom pane / auto-terminal)
|
|
37
|
+
|
|
38
|
+
## 0.18.20
|
|
39
|
+
|
|
40
|
+
- Coalesce split-drag resize to one frame / skip no-ops so Windows ConPTY does not reprint the version MOTD
|
|
41
|
+
- Soft-reconnect longer on transient Host loss (5xx / empty 1006) instead of covering a painted MOTD with a fatal banner
|
|
42
|
+
- Do not share AbortController between SSE and input/resize POST so tearing down the stream cannot cancel in-flight control
|
|
43
|
+
- Carrier unchanged from 0.18.19: page-origin `xrk-app://app` (pool isolation belongs in Desktop/Face, not this plugin)
|
|
44
|
+
|
|
45
|
+
## 0.18.19
|
|
46
|
+
|
|
47
|
+
- Desktop terminal: SSE/POST back on page-origin `xrk-app://app` (drop the `xrk-app://stream` split that failed with `Failed to fetch`)
|
|
48
|
+
|
|
49
|
+
## 0.18.18
|
|
50
|
+
|
|
51
|
+
- Rail toggles: `+3` inside the open 34px tab strip; `+14` when collapsed (conversation title row) — no more bottom drift
|
|
52
|
+
- Desktop terminal: omit SSE `Accept`; optional stream→app fallback (removed in 0.18.19)
|
|
53
|
+
|
|
54
|
+
## 0.18.17
|
|
55
|
+
|
|
56
|
+
- Right panel top inset is a single `top` chain (`--dsh-title-bar-strip` → `--xrk-desktop-chrome-height`); drop stacked `padding-top` that left an empty band above Desktop tabs
|
|
57
|
+
|
|
58
|
+
## 0.18.14
|
|
59
|
+
|
|
60
|
+
- `title-bar-compat`: `--dsh-title-bar-strip` already includes Desktop chrome — do not add `--xrk-desktop-chrome-height` again (rail toggles no longer sit a band lower than the tab icons)
|
|
61
|
+
- Toggle cluster: vertical align with the conversation title row (`+14px` · `align-items: center`)
|
|
62
|
+
- Boot-time panel/FAB hide: drop duplicate plugin CSS; kernel `data-xrk-booting` owns it
|
|
63
|
+
|
|
64
|
+
## 0.18.12
|
|
65
|
+
|
|
66
|
+
- Boot splash (`data-xrk-booting`): hide panel-host / FABs so they do not stack on the HARNESS splash
|
|
67
|
+
- Session-log capsule: always right-pad while the toggle cluster is mounted (including mid-open animation)
|
|
68
|
+
- Motion: cold-theme fallbacks (380ms / cubic-bezier) so expand/collapse never jumps
|
|
69
|
+
- Desktop chrome: right panel + FABs clear `--xrk-desktop-chrome-height`
|
|
70
|
+
|
|
71
|
+
## 0.18.11
|
|
72
|
+
|
|
73
|
+
- Files tab: `openTab({ type: 'editor' })` focuses the seeded files-home instead of minting a twin Files tab
|
|
74
|
+
- `applyDedupe`: still dedupes when `dedupeKey` returns `undefined` (pathless editor cohort)
|
|
75
|
+
- Bottom-panel first expand: skip auto-terminal when a UI terminal already exists
|
|
76
|
+
|
|
77
|
+
## 0.18.10
|
|
78
|
+
|
|
79
|
+
- Desktop (`xrk-app://`): terminal rides Host HTTP SSE + POST (`/sidebar/api/pty/*`) instead of looping WebSocket reconnects against a non-listening private Host
|
|
80
|
+
- Frameless window: right panel leaves a 2px edge so Electron can hit-test resize
|
|
81
|
+
|
|
82
|
+
## 0.18.9
|
|
83
|
+
|
|
84
|
+
- `openTab`: any open on the active session (including type-only Files / +menu) expands a collapsed side card — callers no longer need a separate `togglePanel`
|
|
85
|
+
|
|
86
|
+
## 0.18.3
|
|
87
|
+
|
|
88
|
+
- Client fiber injects `layout` (same order as `ui-sidebar`): wait until `ui-layout` declares the center column before sidebar interception — avoids a `conversation` slot race on Host ≥ 0.3.4
|
|
89
|
+
- `xrk.client.inject` adds `@xrkseek/client-ui-layout`; docs Host baseline **≥ 0.3.4**
|
|
90
|
+
|
|
91
|
+
## 0.18.2
|
|
92
|
+
|
|
93
|
+
- Files home tab follows locale; light media viewers; open by default
|
|
94
|
+
|
|
95
|
+
## 0.18.1
|
|
96
|
+
|
|
97
|
+
- `subagents.live`: accept nested `tool` and legacy flat `tool` wire so subagent activity previews do not crash
|
|
98
|
+
- Align with Host native `/sidebar/*` (nested live shape)
|
|
99
|
+
|
|
100
|
+
## 0.18.0
|
|
101
|
+
|
|
102
|
+
- XRKH-native: drop third-party dual-track (legacy manifest · better-locale · legacy install scripts · marketplace catalogs)
|
|
103
|
+
- Peers are `@xrkseek/*` + React only; tools/settings types via `@xrkseek/xrk-tools` / `xrk-settings`
|
|
104
|
+
- No Side Chat; subagents use Host Face + `subagents.live` / `jobs.*`
|
|
105
|
+
- Empty curated plugin catalogs (community entries are not bundled)
|
|
106
|
+
|
|
107
|
+
## Contract
|
|
108
|
+
|
|
109
|
+
| Item | Notes |
|
|
110
|
+
|------|--------|
|
|
111
|
+
| npm | `xrkh-better-sidebar` |
|
|
112
|
+
| Repo | `xrkseek/xrkh-better-sidebar` |
|
|
113
|
+
| Manifest | `package.json` → `xrk.client` (client half) |
|
|
114
|
+
| Inject | `client-runtime` · `locale` · `ui-slots` · `ui-layout` · `ui-conversation` · `modules` |
|
|
115
|
+
| Host | Native Host owns `/sidebar/api` · `/sidebar/bundle` · PTY — do not remount Cordis host half on XRKH |
|
|
116
|
+
|
|
117
|
+
## Develop
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
pnpm install
|
|
121
|
+
pnpm bundle
|
|
122
|
+
```
|