dsh-sidenote 0.4.2 → 0.4.4
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 -2
- package/cordis.patch.yml +4 -3
- package/lib/client.js +1960 -1266
- package/lib/types/client/locales.d.ts +8 -1
- package/lib/types/client/protocol.d.ts +9 -0
- package/lib/types/client/sidechat/composer.d.ts +13 -2
- package/lib/types/client/sidechat/identity.d.ts +25 -0
- package/lib/types/client/sidechat/lifecycle.d.ts +57 -2
- package/lib/types/client/sidechat/metaStore.d.ts +14 -1
- package/lib/types/client/sidechat/model.d.ts +17 -1
- package/lib/types/client/sidechat/native-tab.d.ts +3 -1
- package/lib/types/client/sidechat/open.d.ts +6 -1
- package/lib/types/client/sidechat/recentClosed.d.ts +2 -0
- package/lib/types/client/sidechat/referenceSource.d.ts +2 -0
- package/lib/types/client/sidechat/rows.d.ts +10 -0
- package/lib/types/client/sidechat/slash.d.ts +2 -1
- package/lib/types/client/sidechat/snapshot.d.ts +43 -0
- package/package.json +2 -2
- package/src/client/annotate/overlay.tsx +2 -1
- package/src/client/locales.ts +16 -2
- package/src/client/protocol.ts +15 -0
- package/src/client/reflow.ts +2 -1
- package/src/client/sidechat/SideChatPanel.tsx +45 -6
- package/src/client/sidechat/composer.ts +20 -5
- package/src/client/sidechat/identity.ts +86 -0
- package/src/client/sidechat/index.tsx +1 -0
- package/src/client/sidechat/lifecycle.ts +366 -13
- package/src/client/sidechat/metaStore.ts +20 -2
- package/src/client/sidechat/model.ts +23 -2
- package/src/client/sidechat/native-tab.tsx +7 -4
- package/src/client/sidechat/notify.ts +13 -4
- package/src/client/sidechat/open.ts +14 -6
- package/src/client/sidechat/recentClosed.ts +2 -0
- package/src/client/sidechat/referenceSource.ts +60 -44
- package/src/client/sidechat/rows.tsx +58 -4
- package/src/client/sidechat/sidechat.module.css +17 -0
- package/src/client/sidechat/slash.ts +16 -5
- package/src/client/sidechat/snapshot.ts +141 -0
package/README.md
CHANGED
|
@@ -33,7 +33,7 @@ dsh plugin --profile web add dsh-sidenote
|
|
|
33
33
|
|
|
34
34
|
从当前主会话 **fork**(全量历史快照,不压缩)出独立侧边会话,在右侧栏多轮对话:
|
|
35
35
|
|
|
36
|
-
- 顶栏「侧边」按钮 /
|
|
36
|
+
- 顶栏「侧边」按钮 / 右侧栏 guide / 斜杠命令 `/side` 三个入口;
|
|
37
37
|
- 与主对话**同一套渲染材质**:工具卡、思考预览、任务卡、模型/权限切换、`@` 引用、图片附件;
|
|
38
38
|
- 审批/提问**在面板内直接答复**,不用跳回主视图;跑完有 toast 通知;
|
|
39
39
|
- 继承历史默认折叠成指示卡;折叠态/滚动位置刷新不丢;`Alt+J` 主↔侧切焦点。
|
|
@@ -93,12 +93,38 @@ dsh plugin --profile web add dsh-sidenote
|
|
|
93
93
|
| 命令 | 说明 |
|
|
94
94
|
|---|---|
|
|
95
95
|
| `pnpm typecheck` | tsc --noEmit |
|
|
96
|
-
| `pnpm test` | vitest 单测(
|
|
96
|
+
| `pnpm test` | vitest 单测(222 例) |
|
|
97
97
|
| `pnpm build` | 类型声明 + tsdown(host ESM + client CJS bundle,纯度门) |
|
|
98
98
|
| `pnpm test:mount` | 挂载冒烟:真实 `dsh web` + 伪造会话日志 + Playwright 十条 journey lane(`BS_VERSION`/`DSH_CMD` 切版本矩阵) |
|
|
99
99
|
|
|
100
100
|
问题与建议欢迎 [Issue](https://github.com/g-yixuan/dsh-sidenote/issues)。
|
|
101
101
|
|
|
102
|
+
## 发版
|
|
103
|
+
|
|
104
|
+
发布走 [npm Trusted Publishing](https://docs.npmjs.com/trusted-publishers)(OIDC):**不需要 npm token,不需要 OTP,本地不需要登录 npm**。`.github/workflows/release.yml` 拿 GitHub Actions 的 OIDC 身份直接换发布权限,并附 SLSA provenance。
|
|
105
|
+
|
|
106
|
+
> **触发条件是「发布一个 GitHub Release」,不是推 tag。**
|
|
107
|
+
> 只 `git push --tags` 不会发布任何东西——tag 会静静躺在那里。
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
# 1. 改 package.json 的 version,提交
|
|
111
|
+
git commit -am "release: vX.Y.Z——<摘要>"
|
|
112
|
+
|
|
113
|
+
# 2. 打 tag 并推送(这一步还没有发布)
|
|
114
|
+
git tag vX.Y.Z && git push origin main --tags
|
|
115
|
+
|
|
116
|
+
# 3. 创建 GitHub Release —— 这一步才真正触发发布
|
|
117
|
+
gh release create vX.Y.Z --title "vX.Y.Z — <标题>" --notes-file <notes.md>
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
workflow 随后自动跑 build → typecheck → test → `pnpm publish --provenance`,并校验 tag 与 `package.json` 版本一致(不一致直接失败)。
|
|
121
|
+
|
|
122
|
+
几个已知的坑:
|
|
123
|
+
|
|
124
|
+
- **registry 有复制延迟**:workflow 显示 `✅ Published` 后,`npm view` 仍可能有 1–5 分钟看到旧版本(Fastly `max-age=300`)。以 workflow 日志为准,不要据此判断失败而重试。
|
|
125
|
+
- **别去折腾 npm token**:npm 正在[系统性废止 bypass-2FA 的 granular token](https://github.blog/changelog/2026-07-31-restricting-npm-bypass-2fa-granular-access-tokens/)。本仓库不依赖任何 token,发布失败请先看 workflow 日志,而不是 token 配置。
|
|
126
|
+
- **CI 的 `plugin-mount` lane 失败不阻塞发版**:那是独立 workflow,Release 流程只跑单测,不跑 e2e。
|
|
127
|
+
|
|
102
128
|
## License
|
|
103
129
|
|
|
104
130
|
MIT
|
package/cordis.patch.yml
CHANGED
|
@@ -8,9 +8,10 @@
|
|
|
8
8
|
# — appends this single `insert` (one plugin row) to the bundle stack. No
|
|
9
9
|
# manual profile edits.
|
|
10
10
|
#
|
|
11
|
-
# dsh-
|
|
12
|
-
#
|
|
13
|
-
#
|
|
11
|
+
# dsh-better-sidebar is an OPTIONAL peer (see peerDependenciesMeta), not a hard
|
|
12
|
+
# dependency: the native leg registers straight against the host's
|
|
13
|
+
# `sidebarRightTabs` service and works on a host with no better-sidebar at all.
|
|
14
|
+
# The frozen legacy leg registers only when better-sidebar >=0.12.0 shows up.
|
|
14
15
|
- insert:
|
|
15
16
|
- id: side-chat
|
|
16
17
|
name: 'dsh-sidenote'
|