Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ jobs:
- name: Install dsh CLI (pinned)
env:
NODE_OPTIONS: --max-old-space-size=4096
run: npm install -g @deepseek-ai/dsh@0.2.0-rc.2
run: npm install -g @deepseek-ai/dsh@0.2.1-alpha.5

# lib/ is gitignored; the tarball is produced from this build.
- name: Build and pack the npm tarball
Expand Down
6 changes: 3 additions & 3 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

本地:`pnpm build && pnpm pack && pnpm exec playwright install chromium && pnpm test:mount`。

- **钉版写精确版本号,绝不写 dist-tag**(`alpha` / `latest` / `next` 的指向与候选版经常不一致);默认与 CI 同为 `@deepseek-ai/dsh@0.2.0-rc.2`。
- **钉版写精确版本号,绝不写 dist-tag**(`alpha` / `latest` / `next` 的指向与候选版经常不一致);默认与 CI 同为 `@deepseek-ai/dsh@0.2.1-alpha.5`。
- 该步骤需要 `NODE_OPTIONS=--max-old-space-size=4096`(浮动的传递依赖会组出混合 peer 图 → ERESOLVE 后 OOM);**不要加 `--legacy-peer-deps`**(会跳掉 boot 必需的 peer,CLI 直接 `ERR_MODULE_NOT_FOUND`)。
- 本机 npm registry 是 npmmirror、对新预发布滞后:装不到时 `pnpm install --registry https://registry.npmjs.org`。
- Windows lane 跑 `pnpm test:windows`(`--maxWorkers=1`),`vitest.config.ts` 的 `testTimeout: 30_000` 与它配套。e2e spec 命名 `*.e2e.ts` + vitest `exclude` 双保险;**改 `exclude` 必须保留默认排除项**。
Expand All @@ -40,9 +40,9 @@

## 3. DSH 版本适配

- **当前基线 DSH 0.2.0-rc.2(v0.25.0 起)**。14 条 `@deepseek-ai/dsh-*` peer 一律写 `^<基线>` 浮动 caret 范围、**绝不钉精确版本**(只有 devDependencies 精确钉);精确版本、或没有预发布子句的范围会被宿主启动预检整行静默禁用。`tests/market-manifest.spec.ts` 钉住这条形状。
- **当前基线 DSH 0.2.1-alpha.5**。13 条 `@deepseek-ai/dsh-*` peer 一律写 `^<基线>` 浮动 caret 范围、**绝不钉精确版本**(只有 devDependencies 精确钉);精确版本、或没有预发布子句的范围会被宿主启动预检整行静默禁用。`tests/market-manifest.spec.ts` 钉住这条形状。(DSH 0.2.1 删除了 `@deepseek-ai/dsh-invariants` 包与全部 `./invariant` 子路径,invariant companion 入口随基线移除。)
- **caret 跨不过 minor**:`^0.1.7-rc.1` 对 `0.2.0-rc.1` 判定为 false → 整行 `disabled`、插件静默不加载。**抬基线必须同批抬 peer 下限。**
- 支持线(用户侧):0.2.0-rc.1 及更早(含 0.1.7 线)固定 v0.24.1;0.1.7 线的最后支持版是 **v0.22.1**(v0.23.0 从未发布到 npm)。按本仓库先例**不写运行时兼容层**。
- 支持线(用户侧):0.2.0-rc.2 及更早(含 0.2.0-rc.1、0.1.7 线)固定 v0.27.0;0.1.7 线的最后支持版是 **v0.22.1**(v0.23.0 从未发布到 npm)。按本仓库先例**不写运行时兼容层**。
- **抬基线动作清单**:① `pnpm peers check`,把失配的传递 peer 提升进 devDependencies;② 扫宿主包产物的**裸 import 差集**(`pnpm peers check` 看不到这类失败,0.1.7 线是 `zustand` / `immer`);③ 对消费的宿主包做类型面 diff(重点 `ui-primitives` / `dsh-session` / `sidebar-right`),确认导出只增不减;④ 复查会话格式版本、`SUBAGENT_DESCRIPTOR_VERSION`、web profile 的 inject 列表;⑤ 同批同步 CI 钉版、`scripts/e2e-common.sh`、**`scripts/install.sh`(随包发布、会直接给用户 npx 命令)** 与 README / 指南的版本行。
- **用户 profile 自己的 `overrides: '@deepseek-ai/dsh-*'` 要同批抬**,否则旧包遮蔽 bundle → 预检禁用 `config-editor` → `settings` 行永久 `pending`;先看宿主日志的 `disabling profile plugin row` 与 `pending (waiting for service: …)`。
- 动设置面 / sidechat / 原生 tab 之前,先读 [docs/host-contracts.md](docs/host-contracts.md)(原 §3.4 的 1–12 条按原编号都在那里)。
Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<a href="https://github.com/omdsh-dev/DSH-better-sidebar/actions/workflows/ci.yml"><img alt="CI" src="https://github.com/omdsh-dev/DSH-better-sidebar/actions/workflows/ci.yml/badge.svg" /></a>
<a href="https://github.com/omdsh-dev/DSH-better-sidebar/stargazers"><img alt="GitHub stars" src="https://img.shields.io/github/stars/omdsh-dev/DSH-better-sidebar" /></a>
<a href="https://opensource.org/licenses/MIT"><img alt="License: MIT" src="https://img.shields.io/badge/License-MIT-yellow.svg" /></a>
<a href="https://www.npmjs.com/package/@deepseek-ai/dsh?activeTab=versions"><img alt="Supported DSH versions: 0.2.0-rc.2+" src="https://img.shields.io/badge/DSH-0.2.0--rc.2%2B-4d6bfe" /></a>
<a href="https://www.npmjs.com/package/@deepseek-ai/dsh?activeTab=versions"><img alt="Supported DSH versions: 0.2.1-alpha.5+" src="https://img.shields.io/badge/DSH-0.2.1--alpha.5%2B-4d6bfe" /></a>
</div>

<div align="center">
Expand Down Expand Up @@ -38,14 +38,15 @@ Switch to **Git Graph** at the top of the Git panel for commit nodes, forks and
dsh plugin --profile web add dsh-better-sidebar@latest
```

Then **hard-refresh the browser** (Cmd/Ctrl+Shift+R). Requires DSH **0.2.0-rc.2+**.
Then **hard-refresh the browser** (Cmd/Ctrl+Shift+R). Requires DSH **0.2.1-alpha.5+**.

<details>
<summary><b>Pick the plugin version for your DSH version</b></summary>

| Your DSH version | Install command |
| --- | --- |
| **0.2.0-rc.2+** (incl. later stable) | `dsh plugin --profile web add dsh-better-sidebar@latest` |
| **0.2.1-alpha.5+** (incl. later stable) | `dsh plugin --profile web add dsh-better-sidebar@latest` |
| **0.2.0-rc.2** | `dsh plugin --profile web add dsh-better-sidebar@0.27.0` |
| **0.1.7-rc.1 ~ 0.1.7 stable** | `dsh plugin --profile web add dsh-better-sidebar@0.22.1` |
| 0.1.7-alpha.x | No compatible release — upgrade DSH to rc.1 first |
| 0.1.6 and earlier (incl. the 0.1.5 line) | `dsh plugin --profile web add dsh-better-sidebar@0.19.1` |
Expand Down
7 changes: 4 additions & 3 deletions README_ZH.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<a href="https://github.com/omdsh-dev/DSH-better-sidebar/actions/workflows/ci.yml"><img alt="CI" src="https://github.com/omdsh-dev/DSH-better-sidebar/actions/workflows/ci.yml/badge.svg" /></a>
<a href="https://github.com/omdsh-dev/DSH-better-sidebar/stargazers"><img alt="GitHub stars" src="https://img.shields.io/github/stars/omdsh-dev/DSH-better-sidebar" /></a>
<a href="https://opensource.org/licenses/MIT"><img alt="License: MIT" src="https://img.shields.io/badge/License-MIT-yellow.svg" /></a>
<a href="https://www.npmjs.com/package/@deepseek-ai/dsh?activeTab=versions"><img alt="支持的 DSH 版本:0.2.0-rc.2+" src="https://img.shields.io/badge/DSH-0.2.0--rc.2%2B-4d6bfe" /></a>
<a href="https://www.npmjs.com/package/@deepseek-ai/dsh?activeTab=versions"><img alt="支持的 DSH 版本:0.2.1-alpha.5+" src="https://img.shields.io/badge/DSH-0.2.1--alpha.5%2B-4d6bfe" /></a>
</div>

<div align="center">
Expand Down Expand Up @@ -38,14 +38,15 @@
dsh plugin --profile web add dsh-better-sidebar@latest
```

装完**硬刷新浏览器**(Cmd/Ctrl+Shift+R)即可。要求 DSH **0.2.0-rc.2+**。
装完**硬刷新浏览器**(Cmd/Ctrl+Shift+R)即可。要求 DSH **0.2.1-alpha.5+**。

<details>
<summary><b>按 DSH 版本选插件版本</b></summary>

| 你的 DSH 版本 | 安装命令 |
| --- | --- |
| **0.2.0-rc.2+**(含之后的正式版) | `dsh plugin --profile web add dsh-better-sidebar@latest` |
| **0.2.1-alpha.5+**(含之后的正式版) | `dsh plugin --profile web add dsh-better-sidebar@latest` |
| **0.2.0-rc.2** | `dsh plugin --profile web add dsh-better-sidebar@0.27.0` |
| **0.1.7-rc.1 ~ 0.1.7 正式版** | `dsh plugin --profile web add dsh-better-sidebar@0.22.1` |
| 0.1.7-alpha.x | 没有可装版本——先升级 DSH 到 rc.1 |
| 0.1.6 及更早(含 0.1.5 线) | `dsh plugin --profile web add dsh-better-sidebar@0.19.1` |
Expand Down
2 changes: 1 addition & 1 deletion docs/external-plugin-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

> 面向 **消费插件开发者**:如何让你的插件向 better-sidebar 注册新的侧边栏页面(tab)和文件类型预览器。
>
> 适用版本:**v0.4.0+**(`ctx.betterSidebar` 服务);声明式设置 **v0.4.1+**;text/number 设置行 **v0.11.0+**;badge/生命周期/定向打开/插件设置/版本探测 **v0.12.0+**;select 设置行(`settingSelect`)与外链认领(`urlTarget`)**v0.13.0+**;统一 `@deepseek-ai/cordis` 类型基底 **v0.15.2+**;路由前缀安全解析(`hostRouteUrl`)**v0.25.0+**。当前版本 **v0.27.0**(peer 下限 `^0.2.0-rc.2`,仅支持 DSH **0.2.0-rc.2+**;0.2.0-rc.1 请用 v0.24.1,0.1.7 线请用 v0.22.1——caret 范围跨 minor 不成立,`^0.1.7-rc.1` 会被 0.2.0 宿主的启动预检静默禁用)。**v0.19.0 移除了自绘右侧面板与自由窗口**(见 §0、§11);**自 v0.20.0 开发线起**(**注意:0.20.0 从未发布到 npm,这些变更全部落在 v0.21.1**)插件**移除了自带的终端**(宿主 0.1.6 的 `ui-sidebar-terminal` 取代,见 §4.4)、**移除了终端固定(pin)**,并在 0.1.7 上**把浏览器视图与只读文件预览整体让给宿主**(`ui-sidebar-browser` / `ui-sidebar-documentpreview`,见 §4.4、§5.4)、**收敛了外链接管**(见 §4.1)、**重写了设置接入面**(`SettingsForms`,见 §8.2)、**给文件树加了实时刷新**(见 §10);同时**删除了轮尾产物行接管**(DSH 0.1.6 把 `conversation.chat.turnTail` 从 chain 改成只能追加的 list,替换语义不复存在)。
> 适用版本:**v0.4.0+**(`ctx.betterSidebar` 服务);声明式设置 **v0.4.1+**;text/number 设置行 **v0.11.0+**;badge/生命周期/定向打开/插件设置/版本探测 **v0.12.0+**;select 设置行(`settingSelect`)与外链认领(`urlTarget`)**v0.13.0+**;统一 `@deepseek-ai/cordis` 类型基底 **v0.15.2+**;路由前缀安全解析(`hostRouteUrl`)**v0.25.0+**。当前版本 **v0.27.0**(peer 下限 `^0.2.1-alpha.5`,仅支持 DSH **0.2.1-alpha.5+**;0.2.0-rc.2 请用 v0.27.0,0.2.0-rc.1 请用 v0.24.1,0.1.7 线请用 v0.22.1——caret 范围跨 minor 不成立,`^0.2.0-rc.2` 会被 0.2.1 宿主的启动预检静默禁用)。**v0.19.0 移除了自绘右侧面板与自由窗口**(见 §0、§11);**自 v0.20.0 开发线起**(**注意:0.20.0 从未发布到 npm,这些变更全部落在 v0.21.1**)插件**移除了自带的终端**(宿主 0.1.6 的 `ui-sidebar-terminal` 取代,见 §4.4)、**移除了终端固定(pin)**,并在 0.1.7 上**把浏览器视图与只读文件预览整体让给宿主**(`ui-sidebar-browser` / `ui-sidebar-documentpreview`,见 §4.4、§5.4)、**收敛了外链接管**(见 §4.1)、**重写了设置接入面**(`SettingsForms`,见 §8.2)、**给文件树加了实时刷新**(见 §10);同时**删除了轮尾产物行接管**(DSH 0.1.6 把 `conversation.chat.turnTail` 从 chain 改成只能追加的 list,替换语义不复存在)。
> 权威代码:`src/client/service.ts`(服务实现)、`src/client/builtins/`(内置 6 tab + 3 viewer 参考实现)、`lib/types/client/service.d.ts`(类型声明)。
> 仓库开发规则(硬约束 / CI / 发版)见 [AGENTS.md](../AGENTS.md)。

Expand Down
2 changes: 1 addition & 1 deletion dsh.plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"main": "./lib/index.js",
"description": "更好用的右侧边栏——文件树、编辑器、文件变动、任务和侧边对话都收在这一栏里,每个会话互不干扰。暴露服务供其他插件注册侧边栏页面与文件预览器",
"engines": {
"dsh": ">=0.2.0-rc.2"
"dsh": ">=0.2.1-alpha.5"
},
"contributes": {
"tools": [],
Expand Down
99 changes: 47 additions & 52 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@
"types": "./lib/types/index.d.ts",
"default": "./lib/index.js"
},
"./invariant": {
"types": "./lib/types/invariant.d.ts",
"default": "./lib/invariant.js"
},
"./client": {
"types": "./lib/types/client/index.d.ts",
"default": "./lib/client.js"
Expand Down Expand Up @@ -59,7 +55,6 @@
},
"files": [
"lib/index.js",
"lib/invariant.js",
"lib/client.js",
"lib/client-registry.js",
"lib/client-editor.js",
Expand Down Expand Up @@ -95,21 +90,20 @@
},
"license": "MIT",
"peerDependencies": {
"@deepseek-ai/cordis": "^4.0.4",
"@deepseek-ai/dsh-agent": "^0.2.0-rc.2",
"@deepseek-ai/dsh-client-locale": "^0.2.0-rc.2",
"@deepseek-ai/dsh-client-ui-conversation": "^0.2.0-rc.2",
"@deepseek-ai/dsh-client-ui-primitives": "^0.2.0-rc.2",
"@deepseek-ai/dsh-client-ui-settings": "^0.2.0-rc.2",
"@deepseek-ai/dsh-client-ui-sidebar-right": "^0.2.0-rc.2",
"@deepseek-ai/dsh-client-ui-slots": "^0.2.0-rc.2",
"@deepseek-ai/dsh-host-webserver": "^0.2.0-rc.2",
"@deepseek-ai/dsh-invariants": "^0.2.0-rc.2",
"@deepseek-ai/dsh-llm": "^0.2.0-rc.2",
"@deepseek-ai/dsh-session": "^0.2.0-rc.2",
"@deepseek-ai/dsh-settings": "^0.2.0-rc.2",
"@deepseek-ai/dsh-subagent": "^0.2.0-rc.2",
"@deepseek-ai/dsh-tools": "^0.2.0-rc.2",
"@deepseek-ai/cordis": "~4.0.5-alpha.2",
"@deepseek-ai/dsh-agent": "^0.2.1-alpha.5",
"@deepseek-ai/dsh-client-locale": "^0.2.1-alpha.5",
"@deepseek-ai/dsh-client-ui-conversation": "^0.2.1-alpha.5",
"@deepseek-ai/dsh-client-ui-primitives": "^0.2.1-alpha.5",
"@deepseek-ai/dsh-client-ui-settings": "^0.2.1-alpha.5",
"@deepseek-ai/dsh-client-ui-sidebar-right": "^0.2.1-alpha.5",
"@deepseek-ai/dsh-client-ui-slots": "^0.2.1-alpha.5",
"@deepseek-ai/dsh-host-webserver": "^0.2.1-alpha.5",
"@deepseek-ai/dsh-llm": "^0.2.1-alpha.5",
"@deepseek-ai/dsh-session": "^0.2.1-alpha.5",
"@deepseek-ai/dsh-settings": "^0.2.1-alpha.5",
"@deepseek-ai/dsh-subagent": "^0.2.1-alpha.5",
"@deepseek-ai/dsh-tools": "^0.2.1-alpha.5",
"@huanlin/dsh-plugin-better-locale": "^0.1.0",
"react": "^18.2.0",
"react-dom": "^18.2.0"
Expand Down Expand Up @@ -144,7 +138,7 @@
"@codemirror/search": "^6.7.1",
"@codemirror/state": "^6.7.1",
"@codemirror/view": "^6.43.8",
"@deepseek-ai/schemastery": "^3.18.4",
"@deepseek-ai/schemastery": "~3.18.5-alpha.2",
"@formkit/auto-animate": "^0.10.0",
"@lezer/highlight": "^1.2.3",
"@xterm/addon-fit": "^0.11.0",
Expand All @@ -159,37 +153,36 @@
},
"devDependencies": {
"@cordisjs/plugin-loader": "^1.0.0-rc.5",
"@deepseek-ai/cordis": "4.0.4",
"@deepseek-ai/cordis-plugin-group": "1.0.4",
"@deepseek-ai/cordis-plugin-include": "1.0.9",
"@deepseek-ai/dsh-agent": "0.2.0-rc.2",
"@deepseek-ai/dsh-agent-loop": "0.2.0-rc.2",
"@deepseek-ai/dsh-attachment": "0.2.0-rc.2",
"@deepseek-ai/dsh-client-locale": "0.2.0-rc.2",
"@deepseek-ai/dsh-client-store": "0.2.0-rc.2",
"@deepseek-ai/dsh-client-ui-conversation": "0.2.0-rc.2",
"@deepseek-ai/dsh-client-ui-primitives": "0.2.0-rc.2",
"@deepseek-ai/dsh-client-ui-settings": "0.2.0-rc.2",
"@deepseek-ai/dsh-client-ui-sidebar-right": "0.2.0-rc.2",
"@deepseek-ai/dsh-client-ui-slots": "0.2.0-rc.2",
"@deepseek-ai/dsh-host-webserver": "0.2.0-rc.2",
"@deepseek-ai/dsh-invariants": "0.2.0-rc.2",
"@deepseek-ai/dsh-llm": "0.2.0-rc.2",
"@deepseek-ai/dsh-ptc-runtime": "0.2.0-rc.2",
"@deepseek-ai/dsh-sandbox": "0.2.0-rc.2",
"@deepseek-ai/dsh-sandbox-policy": "0.2.0-rc.2",
"@deepseek-ai/dsh-scope": "0.2.0-rc.2",
"@deepseek-ai/dsh-session": "0.2.0-rc.2",
"@deepseek-ai/dsh-session-persistence": "0.2.0-rc.2",
"@deepseek-ai/dsh-session-projection": "0.2.0-rc.2",
"@deepseek-ai/dsh-settings": "0.2.0-rc.2",
"@deepseek-ai/dsh-subagent": "0.2.0-rc.2",
"@deepseek-ai/dsh-system-prompt": "0.2.0-rc.2",
"@deepseek-ai/dsh-tools": "0.2.0-rc.2",
"@deepseek-ai/dsh-user-approval": "0.2.0-rc.2",
"@deepseek-ai/dsh-util-code-language": "0.2.0-rc.2",
"@deepseek-ai/dsh-util-time": "0.2.0-rc.2",
"@deepseek-ai/dsh-util-workspace-path": "0.2.0-rc.2",
"@deepseek-ai/cordis": "4.0.5-alpha.2",
"@deepseek-ai/cordis-plugin-group": "1.0.5-alpha.2",
"@deepseek-ai/cordis-plugin-include": "1.0.10-alpha.2",
"@deepseek-ai/dsh-agent": "0.2.1-alpha.5",
"@deepseek-ai/dsh-agent-loop": "0.2.1-alpha.5",
"@deepseek-ai/dsh-attachment": "0.2.1-alpha.5",
"@deepseek-ai/dsh-client-locale": "0.2.1-alpha.5",
"@deepseek-ai/dsh-client-store": "0.2.1-alpha.5",
"@deepseek-ai/dsh-client-ui-conversation": "0.2.1-alpha.5",
"@deepseek-ai/dsh-client-ui-primitives": "0.2.1-alpha.5",
"@deepseek-ai/dsh-client-ui-settings": "0.2.1-alpha.5",
"@deepseek-ai/dsh-client-ui-sidebar-right": "0.2.1-alpha.5",
"@deepseek-ai/dsh-client-ui-slots": "0.2.1-alpha.5",
"@deepseek-ai/dsh-host-webserver": "0.2.1-alpha.5",
"@deepseek-ai/dsh-llm": "0.2.1-alpha.5",
"@deepseek-ai/dsh-ptc-runtime": "0.2.1-alpha.5",
"@deepseek-ai/dsh-sandbox": "0.2.1-alpha.5",
"@deepseek-ai/dsh-sandbox-policy": "0.2.1-alpha.5",
"@deepseek-ai/dsh-scope": "0.2.1-alpha.5",
"@deepseek-ai/dsh-session": "0.2.1-alpha.5",
"@deepseek-ai/dsh-session-persistence": "0.2.1-alpha.5",
"@deepseek-ai/dsh-session-projection": "0.2.1-alpha.5",
"@deepseek-ai/dsh-settings": "0.2.1-alpha.5",
"@deepseek-ai/dsh-subagent": "0.2.1-alpha.5",
"@deepseek-ai/dsh-system-prompt": "0.2.1-alpha.5",
"@deepseek-ai/dsh-tools": "0.2.1-alpha.5",
"@deepseek-ai/dsh-user-approval": "0.2.1-alpha.5",
"@deepseek-ai/dsh-util-code-language": "0.2.1-alpha.5",
"@deepseek-ai/dsh-util-time": "0.2.1-alpha.5",
"@deepseek-ai/dsh-util-workspace-path": "0.2.1-alpha.5",
"@eslint/js": "^10.0.1",
"@huanlin/dsh-plugin-better-locale": "^0.1.0",
"@playwright/test": "^1.62.1",
Expand Down Expand Up @@ -221,6 +214,7 @@
"micromark-util-sanitize-uri": "^2.0.1",
"micromark-util-symbol": "^2.0.1",
"micromark-util-types": "^2.0.2",
"picomatch": "^4.0.3",
"react": "^18.2.0",
"react-dom": "18.2.0",
"shiki": "^4.3.1",
Expand All @@ -230,6 +224,7 @@
"typescript-eslint": "^8.69.0",
"unrun": "^0.2.39",
"vitest": "^4.1.8",
"zod": "^4.4.3",
"zustand": "~4.4.7"
},
"icon": "./icon.svg"
Expand Down
Loading
Loading