dsh-sidenote 0.1.0 → 0.2.0
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 +12 -4
- package/lib/client.js +1221 -319
- package/lib/types/client/annotate/anchor.d.ts +7 -0
- package/lib/types/client/annotate/bubble.d.ts +2 -0
- package/lib/types/client/annotate/chip.d.ts +3 -0
- package/lib/types/client/annotate/format.d.ts +55 -40
- package/lib/types/client/annotate/hint.d.ts +2 -0
- package/lib/types/client/annotate/index.d.ts +2 -1
- package/lib/types/client/annotate/model.d.ts +13 -6
- package/lib/types/client/annotate/selection.d.ts +18 -1
- package/lib/types/client/annotate/send.d.ts +28 -0
- package/lib/types/client/bridge.d.ts +5 -0
- package/lib/types/client/locales.d.ts +29 -0
- package/lib/types/client/reflow.d.ts +32 -0
- package/lib/types/client/sidechat/SideChatPanel.d.ts +4 -1
- package/lib/types/client/sidechat/header.d.ts +2 -0
- package/lib/types/client/sidechat/index.d.ts +2 -1
- package/lib/types/client/sidechat/model.d.ts +5 -3
- package/lib/types/client/sidechat/open.d.ts +12 -0
- package/lib/types/client/sidechat/slash.d.ts +4 -1
- package/package.json +2 -2
- package/src/client/annotate/anchor.ts +26 -0
- package/src/client/annotate/annotate.module.css +219 -0
- package/src/client/annotate/bubble.ts +109 -0
- package/src/client/annotate/chip.tsx +128 -37
- package/src/client/annotate/format.ts +120 -56
- package/src/client/annotate/hint.tsx +71 -0
- package/src/client/annotate/index.tsx +32 -19
- package/src/client/annotate/model.ts +106 -12
- package/src/client/annotate/overlay.tsx +163 -46
- package/src/client/annotate/selection.ts +2 -3
- package/src/client/annotate/send.ts +178 -0
- package/src/client/bridge.ts +5 -0
- package/src/client/index.tsx +6 -2
- package/src/client/locales.ts +73 -0
- package/src/client/reflow.ts +151 -0
- package/src/client/sidechat/SideChatPanel.tsx +86 -9
- package/src/client/sidechat/header.tsx +56 -0
- package/src/client/sidechat/index.tsx +9 -3
- package/src/client/sidechat/model.ts +24 -17
- package/src/client/sidechat/open.ts +35 -1
- package/src/client/sidechat/sidechat.module.css +78 -0
- package/src/client/sidechat/slash.ts +47 -35
- package/lib/types/client/annotate/draft.d.ts +0 -29
- package/src/client/annotate/draft.ts +0 -67
package/README.md
CHANGED
|
@@ -4,17 +4,20 @@ DSH(DeepSeek Harness)web 插件:Codex 风格的**侧边聊天**与**划选
|
|
|
4
4
|
|
|
5
5
|
[English](README_EN.md) · 中文
|
|
6
6
|
|
|
7
|
+
<video src="https://raw.githubusercontent.com/g-yixuan/dsh-sidenote/main/docs/assets/demo.mp4" controls muted loop playsinline width="100%"></video>
|
|
8
|
+
|
|
7
9
|
## 功能一览
|
|
8
10
|
|
|
9
11
|
### 💬 侧边聊天
|
|
10
12
|
|
|
11
13
|
从当前主会话 **fork**(全量历史快照)出独立的侧边会话,在右侧栏的「侧边」Tab 里多轮对话——主线思路不打断,支线问题随手开:
|
|
12
14
|
|
|
13
|
-
-
|
|
15
|
+
- 顶栏常驻「侧边」按钮、右侧栏 `+` 菜单、斜杠命令 `/side`(中文 `/侧边`)三个入口;
|
|
14
16
|
- fork 时刻带主会话完整上下文,之后两个会话各自独立演进;
|
|
15
17
|
- 多实例并存(「侧边」「侧边 2」…),各自独立关闭;
|
|
16
18
|
- 模型跟随主会话当前选择(fork 时同步);
|
|
17
|
-
- 持久化:刷新/重启后随布局恢复;不进左侧会话列表(归档隐藏);仅手动关闭 Tab
|
|
19
|
+
- 持久化:刷新/重启后随布局恢复;不进左侧会话列表(归档隐藏);仅手动关闭 Tab 从界面消失;
|
|
20
|
+
- **回流通道**:侧边结论一键「回流到主会话」——结论以受控上下文 chip 挂在主输入框上方,随下一条消息发给主线(Cursor 级能力,Codex 没有)。
|
|
18
21
|
|
|
19
22
|

|
|
20
23
|
|
|
@@ -22,14 +25,19 @@ DSH(DeepSeek Harness)web 插件:Codex 风格的**侧边聊天**与**划选
|
|
|
22
25
|
|
|
23
26
|
在 assistant 消息上划选文本,把「引用 + 你的注解」变成发送给模型的上下文:
|
|
24
27
|
|
|
25
|
-
- **添加到对话**:选中文本高亮 +
|
|
28
|
+
- **添加到对话**:选中文本高亮 + 右缘编号角标 + 注解编辑器(可空注解);主输入框上方出现「N 条注释」chip(可预览、可逐条移除);
|
|
26
29
|
- **在侧边聊天中提问**:注解编辑后引用 + 注解直接进入侧边聊天输入框;
|
|
27
|
-
-
|
|
30
|
+
- **草稿零污染**:注释是受控对象,不进输入框文本流;发送瞬间才序列化为结构化 XML 协议块(`<annotation>` 块,模型可读性最佳形态);
|
|
31
|
+
- **发送后留痕**:已发消息气泡收成「批注 ×N」标签可回看;原文角标转空心只读态;**刷新不丢**(按会话持久化,随点随恢复锚定)。
|
|
28
32
|
|
|
29
33
|
| 划选浮层 | 注解编辑器 | 角标 + 注释 chip |
|
|
30
34
|
|---|---|---|
|
|
31
35
|
|  |  |  |
|
|
32
36
|
|
|
37
|
+
| 发送后留痕(气泡收成标签) | 侧边回流 chip |
|
|
38
|
+
|---|---|
|
|
39
|
+
|  |  |
|
|
40
|
+
|
|
33
41
|
## 安装
|
|
34
42
|
|
|
35
43
|
前置:已安装 [dsh-better-sidebar](https://github.com/omdsh-dev/DSH-better-sidebar)(本插件的硬依赖)。
|