dsh-sidenote 0.3.4 → 0.4.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 +14 -16
- package/lib/client.js +940 -208
- package/lib/index.js +180 -2
- package/lib/types/client/annotate/send.d.ts +11 -0
- package/lib/types/client/chat/cards.d.ts +3 -3
- package/lib/types/client/host/contracts.d.ts +75 -2
- package/lib/types/client/host/labels.d.ts +13 -0
- package/lib/types/client/index.d.ts +6 -5
- package/lib/types/client/locales.d.ts +10 -0
- package/lib/types/client/reflow.d.ts +6 -0
- package/lib/types/client/sidechat/lifecycle.d.ts +10 -2
- package/lib/types/client/sidechat/metaStore.d.ts +73 -0
- package/lib/types/client/sidechat/native-tab.d.ts +32 -0
- package/lib/types/client/sidechat/native.d.ts +15 -0
- package/lib/types/client/sidechat/open.d.ts +17 -6
- package/lib/types/index.d.ts +36 -5
- package/lib/types/trust-fence.d.ts +24 -0
- package/package.json +28 -4
- package/src/client/annotate/send.ts +126 -27
- package/src/client/chat/ToolCard.tsx +8 -8
- package/src/client/chat/cards.ts +3 -3
- package/src/client/host/contracts.ts +81 -1
- package/src/client/host/labels.ts +16 -0
- package/src/client/index.tsx +12 -6
- package/src/client/locales.ts +20 -0
- package/src/client/reflow.ts +52 -0
- package/src/client/sidechat/SideChatPanel.tsx +18 -7
- package/src/client/sidechat/index.tsx +54 -35
- package/src/client/sidechat/lifecycle.ts +49 -7
- package/src/client/sidechat/metaStore.ts +197 -0
- package/src/client/sidechat/native-tab.tsx +249 -0
- package/src/client/sidechat/native.ts +39 -1
- package/src/client/sidechat/notify.ts +29 -8
- package/src/client/sidechat/open.ts +161 -24
- package/src/client/sidechat/referenceSource.ts +41 -7
- package/src/client/sidechat/sidechat.module.css +11 -0
- package/src/client/sidechat/slash.ts +18 -6
- package/src/index.ts +194 -6
- package/src/trust-fence.ts +84 -0
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
<a href="https://www.npmjs.com/package/dsh-sidenote"><img src="https://img.shields.io/npm/v/dsh-sidenote" alt="npm version"></a>
|
|
11
11
|
<a href="https://github.com/g-yixuan/dsh-sidenote/actions/workflows/ci.yml"><img src="https://github.com/g-yixuan/dsh-sidenote/actions/workflows/ci.yml/badge.svg" alt="CI"></a>
|
|
12
12
|
<a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue" alt="MIT license"></a>
|
|
13
|
-
<img src="https://img.shields.io/badge/peer-
|
|
13
|
+
<img src="https://img.shields.io/badge/peer-none-informational" alt="no required peer dependencies">
|
|
14
14
|
</p>
|
|
15
15
|
|
|
16
16
|
<p align="center">
|
|
@@ -21,13 +21,11 @@
|
|
|
21
21
|
|
|
22
22
|
## 安装
|
|
23
23
|
|
|
24
|
-
前置:已装 [dsh-better-sidebar](https://github.com/omdsh-dev/DSH-better-sidebar)(硬依赖)。
|
|
25
|
-
|
|
26
24
|
```bash
|
|
27
25
|
dsh plugin --profile web add dsh-sidenote
|
|
28
26
|
```
|
|
29
27
|
|
|
30
|
-
|
|
28
|
+
**一步直装,无前置依赖。** 装完顶栏点「侧边」,或直接划选任意回复文本。
|
|
31
29
|
|
|
32
30
|
本地开发挂载:`dsh plugin --profile web add link:<本仓库路径>`(client 改动热重载,host 改动需重启 `dsh web`)。
|
|
33
31
|
|
|
@@ -42,6 +40,13 @@ dsh plugin --profile web add dsh-sidenote
|
|
|
42
40
|
|
|
43
41
|

|
|
44
42
|
|
|
43
|
+
## 回流主线——侧边结论不烂在支线
|
|
44
|
+
|
|
45
|
+
- 侧边结论一键「回流到主会话」:**问答成对**(结论 + 它回答的问题)收为受控 chip 挂在主输入框上方,随下一条消息发给主线;`@` 也可直接引用侧边聊天;
|
|
46
|
+
- 「保存为正式会话」转正进会话列表;`/side` 弹层重开最近关闭。
|
|
47
|
+
|
|
48
|
+

|
|
49
|
+
|
|
45
50
|
## 划选注释——把「这句有问题」变成模型的上下文
|
|
46
51
|
|
|
47
52
|
- 划选 assistant 回复 → 浮层 → 注解编辑器,右缘编号角标锚定原文;
|
|
@@ -52,12 +57,6 @@ dsh plugin --profile web add dsh-sidenote
|
|
|
52
57
|
|---|---|
|
|
53
58
|
|  |  |
|
|
54
59
|
|
|
55
|
-
## 回流主线——侧边结论不烂在支线
|
|
56
|
-
|
|
57
|
-
- 侧边结论一键「回流到主会话」:**问答成对**(结论 + 它回答的问题)收为受控 chip 挂在主输入框上方,随下一条消息发给主线;`@` 也可直接引用侧边聊天;
|
|
58
|
-
- 「保存为正式会话」转正进会话列表;`/side` 弹层重开最近关闭。
|
|
59
|
-
|
|
60
|
-

|
|
61
60
|
|
|
62
61
|
<details>
|
|
63
62
|
<summary><b>更多截图</b></summary>
|
|
@@ -74,15 +73,14 @@ dsh plugin --profile web add dsh-sidenote
|
|
|
74
73
|
|
|
75
74
|
## 兼容性
|
|
76
75
|
|
|
77
|
-
| DSH | dsh-better-sidebar |
|
|
76
|
+
| DSH | dsh-better-sidebar | 行为 |
|
|
78
77
|
|---|---|---|
|
|
79
|
-
| 0.1.
|
|
80
|
-
| 0.1.2-rc.x |
|
|
81
|
-
| 0.1.5-rc.x | ≥ 0.19.0 | ✅ 沙箱实测(见下) |
|
|
78
|
+
| ≥ 0.1.5-rc.1 | 任意(无需安装) | **直连 DSH 原生右侧边栏** |
|
|
79
|
+
| ≤ 0.1.2-rc.x | ≤ 0.18.x(必需) | legacy 布局承载 |
|
|
82
80
|
|
|
83
|
-
|
|
81
|
+
宿主面缺席时插件按能力降级(不崩页面);与 dsh-better-sidebar 天然共存(各自注册、互不依赖)。
|
|
84
82
|
|
|
85
|
-
|
|
83
|
+
**单实例语义(直连腿)**:受宿主「page kind 每 pane 单实例」规则约束——同一会话同时只开一个侧边聊天(再次打开/新建 = 聚焦既有 tab;关闭后可经 /side 重开恢复原会话)。多开诉求可用原生侧栏的分栏(每 pane 一个),多实例将随宿主 `multiple` 能力(0.1.6)恢复。
|
|
86
84
|
|
|
87
85
|
## 设计要点
|
|
88
86
|
|