@chatcode/cco-better-sidebar 0.18.0-alpha.4 → 0.18.0-rc.3
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 +5 -4
- package/README_EN.md +5 -4
- package/cordis.patch.yml +6 -5
- package/lib/client-editor.js +11116 -700
- package/lib/client-mermaid.js +10689 -276
- package/lib/client-registry.js +2256 -1650
- package/lib/client-terminal.js +262 -262
- package/lib/client.js +2255 -1649
- package/lib/index.js +63 -42
- package/lib/types/client/builtins/tabs.d.ts +9 -0
- package/lib/types/client/icons.d.ts +26 -8
- package/lib/types/client/service.d.ts +1 -1
- package/lib/types/config.d.ts +4 -3
- package/lib/types/context-types.d.ts +12 -14
- package/lib/types/prefs-shared.d.ts +1 -1
- package/lib/types/pty-deps.d.ts +1 -1
- package/lib/types/ui-tweaks/index.d.ts +2 -3
- package/package.json +2 -2
- package/src/client/BrowserView.tsx +1 -1
- package/src/client/DiffTab.tsx +1 -1
- package/src/client/EditorHost.tsx +1 -1
- package/src/client/FileTree.tsx +10 -5
- package/src/client/FreeWindow.tsx +2 -1
- package/src/client/GitView.tsx +7 -3
- package/src/client/SideCardSection.tsx +2 -8
- package/src/client/Sidebar.tsx +2 -2
- package/src/client/TabBar.tsx +2 -4
- package/src/client/TextEditor.tsx +2 -1
- package/src/client/TreePanel.tsx +1 -2
- package/src/client/UsageHeatmapSection.tsx +1 -1
- package/src/client/builtins/tabs.tsx +9 -2
- package/src/client/builtins/viewers.tsx +2 -1
- package/src/client/icons.tsx +57 -4
- package/src/client/intercept.tsx +1 -1
- package/src/client/md-toc.tsx +1 -1
- package/src/client/mermaid.tsx +2 -1
- package/src/client/open-with-settings.tsx +1 -1
- package/src/client/service.ts +1 -1
- package/src/client/ui-tweaks/branding.tsx +2 -2
- package/src/config.ts +22 -2
- package/src/context-types.ts +5 -15
- package/src/index.ts +22 -20
- package/src/prefs-shared.ts +1 -1
- package/src/pty-deps.ts +2 -2
- package/src/ui-tweaks/config.ts +1 -1
- package/src/ui-tweaks/index.ts +7 -13
package/README.md
CHANGED
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
- **📌 固定终端**:右键终端 Tab 可「固定到工作区 / 固定到全局」——固定后切换会话不消失,在 TabBar 内联呈现(跨会话虚拟 Tab,点击就地激活,PTY 按 home 会话 id+tab 直连宿主 PTY,无需切回宿主会话);Agent 终端被 reconcile 移除时豁免保留
|
|
51
51
|
- **🔁 会话隔离**:布局 / Tab / 面板按会话持久化,陈旧状态自动净化
|
|
52
52
|
- **⚙️ 声明式设置**:设置页「侧边卡片」逐项独立开关,二级设置经齿轮弹窗
|
|
53
|
-
- **🎛️ 界面调整(已合并 dsh-ui-tweaks)**:消息/代码字号与行距、Claude 风格表格、GitBar、归档与 MCP 管理、`/init
|
|
53
|
+
- **🎛️ 界面调整(已合并 dsh-ui-tweaks)**:消息/代码字号与行距、Claude 风格表格、GitBar、归档与 MCP 管理、`/init`、鲸鱼工作指示、任务通知和精确缓存命中率均由本插件直接提供;在 DSH 0.1.7 中与侧边卡片设置一起由 `better-sidebar` 配置表单实时管理
|
|
54
54
|
- **⚡ 按需加载**:启动只拉 ~325KB 核心,终端 / 编辑器 / Mermaid 图表等重依赖用到才按需拉取([设计文档](docs/plans/2026-08-12-lazy-chunks-design.md))
|
|
55
55
|
- **🌏 多语言**:界面文案跟随 ChatCode CLI 语言(zh / en)实时切换;安装 `@huanlin/dsh-plugin-better-locale` 后支持日语(ja)等第三语言覆盖(见下方「🌏 第三语言覆盖」)
|
|
56
56
|
- **🆕 版本更新日志**:升级后首次打开 Web 端时展示后台配置的当前版本 Markdown 更新内容;跨多个版本升级也只展示当前版本的一条日志
|
|
@@ -74,7 +74,7 @@ chatcode-cli plugin --profile web add @chatcode/cco-better-sidebar@latest #
|
|
|
74
74
|
|
|
75
75
|
装完**硬刷新浏览器**(Cmd/Ctrl+Shift+R)即可看到侧边栏(ChatCode CLI 对 client 改动热加载,无需重启;仅 host 半更新时需要重启)。
|
|
76
76
|
|
|
77
|
-
> 从独立 `dsh-ui-tweaks` 迁移时,请先从 profile 的 bundle/patch 中移除旧插件挂载,只保留 `dsh-better-sidebar`。两者同时挂载会重复注册
|
|
77
|
+
> 从独立 `dsh-ui-tweaks` 迁移时,请先从 profile 的 bundle/patch 中移除旧插件挂载,只保留 `dsh-better-sidebar`。两者同时挂载会重复注册 `/_dsh/ui-tweaks/*` 路由;DSH 0.1.7 的旧设置导入器会把原 `dsh-better-sidebar` 与 `ui-tweaks` 分区合并进 `better-sidebar` 配置条目。
|
|
78
78
|
|
|
79
79
|
**方式二:让 ChatCode CLI 自己装**——把下面这段提示词发给任意一个 ChatCode CLI 会话:
|
|
80
80
|
|
|
@@ -107,9 +107,10 @@ chatcode-cli plugin --profile web add @chatcode/cco-better-sidebar@latest
|
|
|
107
107
|
| 报 `minimum release age` / 版本不足 24h | 装的版本发布不足 24 小时。等 24h 或重跑一次(pnpm 会自动补 `minimumReleaseAgeExclude`)。 |
|
|
108
108
|
| 报「找不到 profile 目录」 | 先跑一次 `chatcode-cli web`,让它初始化 `~/.chatcode-cli/profiles/web`。 |
|
|
109
109
|
| 页面出现**两个侧边栏** | 双挂载。旧的手动挂载行:`~/.chatcode-cli/profiles/web/cordis.patch.yml` 还留着 `- insert: ... better-sidebar ...`,删掉那段(同 id 重复挂载 loader 会直接报 `duplicate loader entry id`)。聚合包(如 `@linxin666/dsh-web-ui-all`)以**不同 id** 挂载本包时,0.13.x 起插件自身 bundle patch 会自动退让(检测到已有启用中的同包名挂载就不挂自己),无需手动处理;若仍双挂载,先确认聚合包的 bundle 顺序在 `dsh-better-sidebar` 之前。 |
|
|
110
|
-
| 启动时报
|
|
110
|
+
| 启动时报 `/_dsh/ui-tweaks` 路由重复 | profile 中仍挂载着独立的 `dsh-ui-tweaks`。移除该旧插件行/旧 bundle,只保留 `dsh-better-sidebar`;升级 DSH 0.1.7 时旧设置会导入 `better-sidebar` 配置条目。 |
|
|
111
|
+
| macOS 报 `posix_spawnp failed` / Windows 打开终端卡住 | `0.18.0-rc.3` 起与主程序固定使用 `node-pty@1.2.0-beta.15`:Mac 安装包携带可执行的 `spawn-helper`,普通用户无需修改 root 安装文件;Windows 在 ConPTY 输出线程就绪后再连接。更新侧边栏依赖并重启 Web 服务。 |
|
|
111
112
|
| Windows 下终端无法使用 | `node-pty` 依赖预编译二进制;若当前 Node 版本没有对应产物,需装编译工具链(VS Build Tools)。主流 Node 版本一般已有预编译。 |
|
|
112
|
-
| 终端提示「node-pty 加载失败」 | `node-pty` 安装缺失/损坏(如 pnpm 拦截了构建脚本)。终端横幅会给出修复命令:复制到 ChatCode CLI 所在环境的终端/cmd 执行(在 `~/.chatcode-cli/profiles/web` 下 `pnpm approve-builds --all && pnpm rebuild node-pty`),完成后重启 ChatCode CLI 并点重试。插件与 ChatCode CLI 核心使用同一 `node-pty
|
|
113
|
+
| 终端提示「node-pty 加载失败」 | `node-pty` 安装缺失/损坏(如 pnpm 拦截了构建脚本)。终端横幅会给出修复命令:复制到 ChatCode CLI 所在环境的终端/cmd 执行(在 `~/.chatcode-cli/profiles/web` 下 `pnpm approve-builds --all && pnpm rebuild node-pty`),完成后重启 ChatCode CLI 并点重试。插件与 ChatCode CLI 核心使用同一 `node-pty@1.2.0-beta.15`,修复后两者同步恢复。 |
|
|
113
114
|
| 提示 `chatcode-cli: command not found` | 先安装 ChatCode CLI;或直接用 `npx -y --package @chatcode/chatcode-cli chatcode-cli plugin --profile web add @chatcode/cco-better-sidebar@latest`。旧 `dsh` 命令仅作为隐藏兼容别名。 |
|
|
114
115
|
|
|
115
116
|
</details>
|
package/README_EN.md
CHANGED
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
- **📌 Pinned Terminals**: right-click a terminal tab to "Pin to Workspace / Pin Globally" — pinned terminals survive session switches and surface inline in the TabBar as virtual tabs (click activates in-place, PTY connects directly to the home session's PTY via WS, no session jump needed); agent terminals exempted from reconcile removal
|
|
51
51
|
- **🔁 Session Isolation**: layout / tabs / panels persisted per session, stale state auto-purged
|
|
52
52
|
- **⚙️ Declarative Settings**: per-item toggles in the "Side Cards" settings section, secondary settings via the gear dialog
|
|
53
|
-
- **🎛️ UI Tweaks (dsh-ui-tweaks merged)**: message/code sizing and spacing, Claude-style tables, GitBar, archive and MCP managers, `/init`, whale activity indicator, task notifications, and precise cache-hit percentages now ship in this plugin; the
|
|
53
|
+
- **🎛️ UI Tweaks (dsh-ui-tweaks merged)**: message/code sizing and spacing, Claude-style tables, GitBar, archive and MCP managers, `/init`, whale activity indicator, task notifications, and precise cache-hit percentages now ship in this plugin; on DSH 0.1.7 they are live fields in the shared `better-sidebar` entry form
|
|
54
54
|
- **⚡ On-demand Loading**: only ~325KB core at startup; heavy deps (terminal / editor / mermaid diagrams) load on demand ([design](docs/plans/2026-08-12-lazy-chunks-design.md))
|
|
55
55
|
- **🌏 i18n**: UI text follows ChatCode CLI's language (zh / en) with live switching; with the optional `@huanlin/dsh-plugin-better-locale` peer, 19 third-language overlays (ja / de / fr / …) are available
|
|
56
56
|
- **🆕 Release notes**: on the first Web launch after an upgrade, shows the backend-configured Markdown note for the current version only; skipped versions are never merged
|
|
@@ -74,7 +74,7 @@ chatcode-cli plugin --profile web add @chatcode/cco-better-sidebar@latest # re
|
|
|
74
74
|
|
|
75
75
|
Then **hard-refresh the browser** (Cmd/Ctrl+Shift+R) to see the sidebar (ChatCode CLI hot-reloads client changes; only host-half updates need a restart).
|
|
76
76
|
|
|
77
|
-
> When migrating from the standalone `dsh-ui-tweaks`, remove its old bundle/patch mount and keep only `dsh-better-sidebar`. Mounting both duplicates the
|
|
77
|
+
> When migrating from the standalone `dsh-ui-tweaks`, remove its old bundle/patch mount and keep only `dsh-better-sidebar`. Mounting both duplicates the `/_dsh/ui-tweaks/*` routes. DSH 0.1.7's legacy-settings importer merges the old `dsh-better-sidebar` and `ui-tweaks` sections into the `better-sidebar` entry.
|
|
78
78
|
|
|
79
79
|
**Or let ChatCode CLI install it for you** — paste this prompt into any ChatCode CLI session:
|
|
80
80
|
|
|
@@ -107,9 +107,10 @@ or bump the version in `~/.chatcode-cli/profiles/web/package.json` (e.g. `"^0.16
|
|
|
107
107
|
| `minimum release age` / version `< 24h` | The release is younger than 24 hours. Wait, or re-run once (pnpm auto-adds `minimumReleaseAgeExclude`). |
|
|
108
108
|
| "profile directory not found" | Run `chatcode-cli web` once so it initializes `~/.chatcode-cli/profiles/web`. |
|
|
109
109
|
| Two sidebars on the page | Double-mount. Old hand-written line: `~/.chatcode-cli/profiles/web/cordis.patch.yml` still has `- insert: ... better-sidebar ...` — delete it (a same-id duplicate mount makes the loader fail loudly with `duplicate loader entry id`). When an aggregate bundle (e.g. `@linxin666/dsh-web-ui-all`) mounts this package under a **different** id, the plugin's own bundle patch backs off automatically since 0.13.x (it detects an already-enabled mount of the same package name and does not mount itself) — no manual fix needed; if it still double-mounts, make sure the aggregate bundle precedes `dsh-better-sidebar` in `dsh.profile.bundles`. |
|
|
110
|
-
| Duplicate
|
|
110
|
+
| Duplicate `/_dsh/ui-tweaks` route at startup | The profile still mounts the standalone `dsh-ui-tweaks`. Remove that old plugin row/bundle and keep `dsh-better-sidebar`; on a DSH 0.1.7 upgrade the legacy settings are imported into the `better-sidebar` entry. |
|
|
111
|
+
| macOS reports `posix_spawnp failed` / Windows terminal hangs on opening | From `0.18.0-rc.3`, the sidebar pins the core's `node-pty@1.2.0-beta.15`: the Mac package ships an executable `spawn-helper`, so normal users need not modify root-owned installation files; Windows waits for the ConPTY output worker before connecting. Update the sidebar dependency and restart the Web server. |
|
|
111
112
|
| Terminal fails on Windows | `node-pty` relies on prebuilt binaries; if none match your Node version, install a build toolchain (VS Build Tools). Mainstream Node versions are usually covered. |
|
|
112
|
-
| Terminal shows "node-pty failed to load" | The `node-pty` install is missing or broken (e.g. pnpm skipped its build script). The terminal banner shows a repair command — copy it into a terminal/cmd on the ChatCode CLI machine and run it (in `~/.chatcode-cli/profiles/web`: `pnpm approve-builds --all && pnpm rebuild node-pty`), then restart ChatCode CLI and click Retry. The plugin and ChatCode CLI core share the same `node-pty
|
|
113
|
+
| Terminal shows "node-pty failed to load" | The `node-pty` install is missing or broken (e.g. pnpm skipped its build script). The terminal banner shows a repair command — copy it into a terminal/cmd on the ChatCode CLI machine and run it (in `~/.chatcode-cli/profiles/web`: `pnpm approve-builds --all && pnpm rebuild node-pty`), then restart ChatCode CLI and click Retry. The plugin and ChatCode CLI core share the same `node-pty@1.2.0-beta.15`, so the repair restores both. |
|
|
113
114
|
| `chatcode-cli: command not found` | Install ChatCode CLI first, or run `npx -y --package @chatcode/chatcode-cli chatcode-cli plugin --profile web add @chatcode/cco-better-sidebar@latest`. The old `dsh` command remains a hidden compatibility alias. |
|
|
114
115
|
|
|
115
116
|
</details>
|
package/cordis.patch.yml
CHANGED
|
@@ -11,11 +11,12 @@
|
|
|
11
11
|
# plugin row) exactly like the manual cordis.patch.yml mount line used
|
|
12
12
|
# before. No profile file edits needed — one command installs and mounts.
|
|
13
13
|
#
|
|
14
|
-
# This package now embeds dsh-ui-tweaks
|
|
15
|
-
# `
|
|
16
|
-
#
|
|
17
|
-
#
|
|
18
|
-
#
|
|
14
|
+
# This package now embeds dsh-ui-tweaks. On DSH 0.1.7 its live fields belong to
|
|
15
|
+
# the `better-sidebar` Loader entry form, while the established
|
|
16
|
+
# `/_dsh/ui-tweaks/*` routes remain unchanged. Remove any standalone
|
|
17
|
+
# `dsh-ui-tweaks` row/bundle before mounting this package; keeping both would
|
|
18
|
+
# still register the same routes twice. The DSH legacy-settings importer maps
|
|
19
|
+
# the old `dsh-better-sidebar` and `ui-tweaks` sections into this entry.
|
|
19
20
|
#
|
|
20
21
|
# If the profile still carries the old manual mount line in its own
|
|
21
22
|
# cordis.patch.yml, remove it before switching to the bundle channel to
|