dsh-selection-annotations 0.0.0-stage → 2.1.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/CHANGELOG.md +166 -0
- package/LICENSE +21 -0
- package/README.md +161 -3
- package/README.zh-CN.md +161 -0
- package/client.js +11136 -0
- package/cordis.patch.yml +3 -0
- package/icon.svg +7 -0
- package/lib/annotations-db.js +1157 -0
- package/lib/index.js +1304 -0
- package/package.json +74 -6
- package/scripts/build.mjs +37 -0
- package/scripts/check-build.mjs +10 -0
- package/src/core/annotation-clipboard.js +93 -0
- package/src/core/annotation-utils.js +27 -0
- package/src/core/cards.js +502 -0
- package/src/core/config.js +91 -0
- package/src/core/constants.js +34 -0
- package/src/core/draft-codec.js +77 -0
- package/src/core/draft-store.js +85 -0
- package/src/core/hidden-payload.js +73 -0
- package/src/core/image-codec.js +111 -0
- package/src/core/jump-icon.js +25 -0
- package/src/core/locale.js +59 -0
- package/src/core/log.js +19 -0
- package/src/core/markdown.js +80 -0
- package/src/core/messages.js +311 -0
- package/src/core/note-tone.js +77 -0
- package/src/core/panel-render.js +315 -0
- package/src/core/payload.js +191 -0
- package/src/core/preview-bridge.js +216 -0
- package/src/core/remote-sync.js +206 -0
- package/src/core/scroll-trace.js +177 -0
- package/src/core/sent-store.js +148 -0
- package/src/core/session.js +60 -0
- package/src/core/settings.js +168 -0
- package/src/core/side-tab-state.js +30 -0
- package/src/core/source-capture.js +530 -0
- package/src/core/source-locate.js +220 -0
- package/src/core/source-resolve.js +89 -0
- package/src/core/styles.js +590 -0
- package/src/core/turn-anchor.js +54 -0
- package/src/core/util.js +55 -0
- package/src/core/uuid.js +23 -0
- package/src/core/web-picker.js +426 -0
- package/src/entry.js +22 -0
- package/src/plugin.js +8706 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 2.1.0(2026-11-23)
|
|
4
|
+
|
|
5
|
+
首次发布到 npm。2.0.0 没有单独发布过,其内容一并包含在这里;本节另记 2.0.0 之后的新东西。
|
|
6
|
+
|
|
7
|
+
### 能力
|
|
8
|
+
|
|
9
|
+
- **已发送批注的答复区**:点开已发送条目,备注下方直接显示模型对这一条的答复——结论胶囊与「答复」标题并排,理由按 markdown 渲染文字,不搬答复卡的底色与垫片;「接下来」用竖排标签;备注与答复之间与引文一样有一条虚线。没答复过的条目不出现这块区域。
|
|
10
|
+
- **发送闸**:有批注时,发送前先把这一批写进本机库并读回核对条数,核对不过就不发消息,弹出提示且批注与附件留在输入框,重试沿用同一批号。宁可让你再点一次,也不让消息带着丢失的批注出门。
|
|
11
|
+
- **已撤回标记**:会话回退后,受影响的已发送批注标「已撤回」并压暗,数据保留不删。
|
|
12
|
+
- **接手后的只读面板**:拖动过或改过尺寸的面板不再因鼠标离开而收起,点别处也不再关闭,只由 Esc 或打开另一条批注收起;但鼠标扫到别的批注时仍会换过去。
|
|
13
|
+
- **面板内滚动归面板**:滚轮压在面板标题、按钮或图片条上时只滚面板内容,不再带动背后的会话。
|
|
14
|
+
- **工具条 1 秒去抖跟随**:工具条已露出后,停手一秒才滑到新位置(220 毫秒),拖选途中仍按 220 毫秒让开;首次出现瞬间到位。
|
|
15
|
+
- **在途批次以最新提交为准**:批次已入库但还没挂到消息上(轮次为空)时,重复提交会用新的条目内容覆盖;一旦挂上消息,恢复只补空值,不再改写已发送的内容。
|
|
16
|
+
- **README 重写**:中文与英文各一份,从日常用法写到源码与宿主接口,并给出数据落盘位置、调试方法与已知限制。
|
|
17
|
+
|
|
18
|
+
### 修复
|
|
19
|
+
|
|
20
|
+
- 只读面板里滚动滚轮时面板看起来「跳位」——实为滚轮被路由给下层会话,面板是固定在屏幕上的。
|
|
21
|
+
- 承担接手状态与「指针在弹层上」的判断合并成同一个提前返回,导致接手后悬停无法切换到其他批注。
|
|
22
|
+
|
|
23
|
+
### 说明
|
|
24
|
+
|
|
25
|
+
- 需要 Node ≥ 22.13(`node:sqlite`)。插件代码改动需完全重启 DSH;只刷新页面不重载插件。
|
|
26
|
+
- 批注库按设备各存一份:别的设备上发出的批注,回到本机看不到已发送卡片。把库跟会话走仍在计划中。
|
|
27
|
+
|
|
28
|
+
## 2.0.0(未单独发布,内容并入 2.1.0)
|
|
29
|
+
|
|
30
|
+
批注的存储与身份换了底座:台账从「一个会话一个 JSON 文件」改为 SQLite 单库按条写入,批注条目改用 UUID 作为唯一权威键,答复可以跨会话写入;同时批注恢复「独立注入 + 并入正文」两条通道,已发送卡与答复区的渲染改为只在数据变化时进行。升级后第一次打开某个会话时自动迁移旧记录,旧文件保留不删。
|
|
31
|
+
|
|
32
|
+
### 破坏性改动
|
|
33
|
+
|
|
34
|
+
- **存储改为 SQLite**:`$DSH_HOME/selection-annotations/annotations.db`(WAL 模式)。表为 `sessions` / `batches` / `entries` / `drafts`;批次与条目按条写入,不再整表覆盖。旧的 `sessions/<会话 id>.json` 在该会话第一次被访问时于事务中导入,`batch_seq` 按原 `savedAt` 排序;迁移后原文件仍留着,可随时对照。读接口 `GET /selection-annotations/session/<id>` 仍返回旧形状,老客户端不会坏。
|
|
35
|
+
- **批注 UUID 成为唯一权威键**:条目在捕获时生成 UUID,随批注数据块下发给模型,答复按 UUID 定向写回(`PATCH /selection-annotations/entry/<uuid>`),序号、轮次、卡锚点降为仅供阅读与展示。答复允许跨会话写入,宿主只校验「条目存在」与「尚未答复」。
|
|
36
|
+
- **`annotation_replies` 工具参数改为 `uuid` 必填**:`index` 与 `cardKey` 从模型侧入口移除。回执按真实写入结果报数,跳过原因分为七类;此前的回执照入参计数,跨会话时会虚报成功。
|
|
37
|
+
- **批注恢复两条通道**:仍把批注 JSON 并入原用户消息末尾(自动审查按用户指令读取的那一份),并额外发一条独立的批注消息。同一份内容会进上下文两次,token 消耗随之增加。
|
|
38
|
+
- **默认批注指令改写**:`怎么答` 改为按顶层 `uuid` 指定条目,`index` 降为仅供阅读;已保存过自定义指令的用户不受影响。
|
|
39
|
+
|
|
40
|
+
### 能力
|
|
41
|
+
|
|
42
|
+
- **答复区不再被并进「已调用工具」折叠块**:按该轮最后一个过程成员定位轮次后逐层上溯到最外层过程块之外插入;本轮只有工具调用、没有正文时也不会被折叠收纳。
|
|
43
|
+
- **排队消息真正发出前不出卡**:等待态气泡(`data-pending-steering` / `data-submission-echo`)不参与记账,卡片等消息入库后再出现。
|
|
44
|
+
- **渲染由数据驱动**:已发送卡与答复区只在「批注数据变了」或「有卡片在等消息行落位」时重建;页面其它变化只更新高亮层,不再连带重排卡片、也不读写滚动位置。
|
|
45
|
+
|
|
46
|
+
### 修复
|
|
47
|
+
|
|
48
|
+
- 悬停预览只在最先命中的那条批注上弹出;重叠时改取最上层,掠过别的划线会切换目标。
|
|
49
|
+
- 批注弹层的悬停判定被同名的 `scheduleHoverClose` 静默覆盖而整体失效。
|
|
50
|
+
- 重绘把旧滚动位置写回,导致进会话一两秒后视野被拽回旧轮次。
|
|
51
|
+
- 在批注卡片与答复区里划选时重绘照跑,选区起点被夹到容器开头、松手后选区消失。
|
|
52
|
+
- 宿主拉回台账时 `isSentItem` 未导入,历史轮次的已发送卡与答复区整块不显示。
|
|
53
|
+
|
|
54
|
+
### 说明
|
|
55
|
+
|
|
56
|
+
- 需要 Node ≥ 22.13(`node:sqlite`)。宿主改动需重载插件生效。
|
|
57
|
+
- 升级前发出的批注依赖旧文件迁移;迁移只在会话首次访问时发生一次,之后新增记录直接进库。
|
|
58
|
+
|
|
59
|
+
## 1.3.0(未发布)
|
|
60
|
+
|
|
61
|
+
批注编辑与界面跟随 DSH。
|
|
62
|
+
|
|
63
|
+
### 能力
|
|
64
|
+
|
|
65
|
+
- **选区工具条拆成两段**:「批注反馈」与「批注采纳」共用一块浮起背景,中间竖线分隔;右键菜单同样给出「为划选部分批注反馈」「为划选部分批注采纳」两个入口。
|
|
66
|
+
- **采纳预填是原子块**:备注框改成可编辑区域,采纳句作为不可拆分的 token 插入,一次退格或选中即可整块删除;手打前缀按 Tab 补全。写入设置页的预填文本,默认「意见采纳。」,可修改、可恢复默认。
|
|
67
|
+
- **采纳着色**:批注正文包含采纳句时,划线段背景、总览批注正文、已发送批注正文、答复引用块与编辑框正文转绿,其余保持黄色。
|
|
68
|
+
- **字号跟随 DSH**:批注界面所有字号按 DSH 的内容字号增量缩放,`Ctrl+/-` 或设置里的字号变化会同时影响按钮、卡头、引文、正文、标签与面板。
|
|
69
|
+
- **浮层与弹层贴选区**:工具条横向跟随划线松手点、纵向贴选区下沿;批注弹层同样横向跟随落点、优先放在选区下方,放不下才翻到上方;浮层底色改用与批注总览同档的面板底色与阴影。
|
|
70
|
+
|
|
71
|
+
### 修复
|
|
72
|
+
|
|
73
|
+
- **批注被自动审查当作用户指令**:宿主不再单独追加一条 `source.kind: 'annotation'` 的 JSON 消息,而是摘下附件后把 JSON 作为额外文本块并入原用户消息(`source.kind` 保持 `'user'`,另记 `annotation: { version, count }` 供回合结束检查识别)。这样 `@deepseek-ai/dsh-experimental-auto-review` 会按 `user-instruction` 读取引用、批注正文与出处,中等风险操作的授权不再需要用户手动补一句。客户端给用户气泡注册一条 UserText 规则,只把末尾的 JSON 段显示为空,模型内容与落盘内容不受影响;复制该条消息时仍会带上 JSON。
|
|
74
|
+
|
|
75
|
+
## 1.2.0(未发布)
|
|
76
|
+
|
|
77
|
+
让批注在「发出去之后」也留得住:未提交的草稿不再因为切会话而丢失,已提交的批注可以在对话历史里回看。
|
|
78
|
+
|
|
79
|
+
### 能力
|
|
80
|
+
|
|
81
|
+
- **未提交批注按会话保存**:切换会话、刷新页面或插件重载后,上一会话里还没发出去的批注会原样恢复(引文、批注文字、出处),并重新挂上批注附件。草稿按会话最多保留 24 个,单会话最多 200 条。
|
|
82
|
+
- **已提交批注可在对话历史里回看**:随消息发出的批注会在对应用户消息行下方留一张「已发送的批注 ×N」卡片,点开能看到每条的引文与批注文字。纯批注消息(没有正文)从此也有了可读的用户侧内容。
|
|
83
|
+
- **批注可以带图**:批注弹层里粘贴或拖入图片(每条最多 4 张、单张不超过 8 MB),图片作为普通图片附件随消息发出,批注 JSON 里用 `images[].order` 标注它在本次消息图片里的 1 基顺序。
|
|
84
|
+
- **图片会压缩**:默认按 80% 质量重编码成 JPEG,最短边不超过 100 像素的图保持原样;透明区域先填白再编码。压缩没变小就保留原文件。质量、阈值与开关在批注面板底部的「图片设置」里改。
|
|
85
|
+
- **图片随草稿持久化**:草稿里的图片改为存压缩后的 data URL,刷新页面或切换会话后能恢复成可发送的文件。草稿超过 3.5 MB 预算时,从最旧的批注开始丢图片,文字永远保留。
|
|
86
|
+
- **总览里能看到图**:批注面板每条批注下方显示缩略图。
|
|
87
|
+
- **悬停预览**:鼠标在已批注的原文上停留 500ms 会打开该条编辑框;没有点击或输入就移开时自动保存并关闭,进过交互则保持打开。
|
|
88
|
+
- **点框外算确认**:编辑批注时点到框外不再丢弃已输入内容,按保存处理;Esc 仍是取消。输入框高度跟随内容行数,手动拖过高度之后不再自动调整。
|
|
89
|
+
- **图片可放大**:弹层与总览里的缩略图点一下就打开全屏查看,点任意处或 Esc 关闭。
|
|
90
|
+
- **弹层淡入淡出**:弹层改用 `opacity` / `visibility` 过渡,120ms。
|
|
91
|
+
- **悬停与空批注的围栏**:只有悬停打开的弹层才会在鼠标移开后自动关闭,主动点开的不受影响;点框外时,新划出来但没写文字也没加图的批注直接丢弃(显式点「保存」仍可保留空批注做纯原文标记)。
|
|
92
|
+
- **会话记录落盘**:草稿与已提交台账写到 `$DSH_HOME/selection-annotations/sessions/<sessionId>.json`,宿主注册一个只服务本机的读写路由;客户端 600ms 防抖同步,写失败退回 localStorage。换到 Web 端、或清掉站点数据,批注记录都还在。
|
|
93
|
+
- **修复发送后草稿残留**:批注随消息发出后同步清掉本地草稿,刷新页面不会让已发出的批注「复活」。
|
|
94
|
+
- **逐条答复**:模型处理完一批批注后必须调用 `annotation_replies` 工具提交逐条答复(编号、采纳/部分采纳/不采纳/需要澄清、理由、下一步),宿主把答复写进会话记录文件;同一消息行下方除了「已发送的批注」,还会出现「批注答复 ×N」卡片,每条先引批注原文与批注文字,再给判定与理由。
|
|
95
|
+
- **批注指令可改**:批注随消息发给模型的说明文字(instruction)可以在插件详情页的「批注指令」里编辑,一键恢复默认;删掉「必须调用 annotation_replies」那句会让逐条答复失效。
|
|
96
|
+
- **总览面板**:高度按按钮上下可用空间自适应,窗口缩放时跟随;每条批注拆成「引用」与「批注」两个视觉块,引用超过三行折叠、点击展开。
|
|
97
|
+
- **总览里能拖动排序**:面板内拖动批注可调整顺序,编号随顺序重排;拖到列表末尾的空白处即排到最后。
|
|
98
|
+
- **拖动有手柄**:每条批注左侧显示拖拽手柄(⠿),按住即可拖动;拖动时整行半透明,落点上方显示插入线。
|
|
99
|
+
- **面板自动贴底**:手动拖高「批注指令」输入框等导致面板变高时,面板向上生长、底边保持不动。
|
|
100
|
+
- **编辑窗在前层**:从总览里点「编辑」弹出的编辑窗浮在总览面板之上,编辑时面板不会被点关。
|
|
101
|
+
- **面板开合动画**:总览面板用与划线批注弹层相同的 `opacity` / `transform` 过渡(180ms);展开或收起底部设置时,面板底边保持不动,内容向上生长。
|
|
102
|
+
|
|
103
|
+
### 说明
|
|
104
|
+
|
|
105
|
+
- 历史卡片依赖本机记录(localStorage,按会话与消息锚点键索引),只覆盖升级后提交的批注。升级之前发出的批注仍只有附件卡片 —— 文本附件的字节没有客户端读取通道,无法回溯。
|
|
106
|
+
- 未提交草稿与已提交台账都在 localStorage 不可用时安静降级为仅内存,不影响批注本身。
|
|
107
|
+
|
|
108
|
+
### 测试
|
|
109
|
+
|
|
110
|
+
- 78 项。
|
|
111
|
+
|
|
112
|
+
### 维护
|
|
113
|
+
|
|
114
|
+
- 客户端源码拆到 `src/`(按职责分文件),`npm run build` 拼成 DSH 加载所需的单文件 `client.js`;`npm test` 会先校验两者一致,直接改 `client.js` 会被拦下。
|
|
115
|
+
- `annotation_replies` 拿不到 `tools` 服务时改为打印告警并说明原因:此前是静默返回,「工具没注册上」在日志里完全不可见,只能靠翻内核源码定位。缺该服务时插件其它接缝照常注册,插件不会整体失效。
|
|
116
|
+
|
|
117
|
+
## 1.1.0
|
|
118
|
+
|
|
119
|
+
位置从「预览渲染坐标」升级为「**文件原文坐标**」,Markdown 预览因此也有了行号;同时修掉三个只在真机上才暴露的客户端兼容问题。
|
|
120
|
+
|
|
121
|
+
### 能力
|
|
122
|
+
|
|
123
|
+
- **位置按原文计算**:保存批注时经 `ctx.remote.workspaceFiles.read` 读源文件,在其中定位引文,行号与字符区间都折算回原文坐标。Markdown 预览因此也有行号,字符偏移也能直接拿去比对文件。负载新增 `source.textOrigin` 标明口径:`"source"` = 文件原文的字符偏移,`"rendered"` = 预览渲染后正文的偏移(读不到原文、或引文跨了行内 Markdown 标记时退回后者)。
|
|
124
|
+
- 插件重载后,输入框里遗留的 `批注.json` 孤儿附件会**按文件名**被认领摘掉 —— 运行时在提交结算失败时会把它 restore 回输入态,而内存里的守卫表撑不过一次重载。
|
|
125
|
+
|
|
126
|
+
### 修复
|
|
127
|
+
|
|
128
|
+
- **读原文一直失败**:客户端上下文只把 `inject` 里声明过的 remote 命名空间挂到 `ctx.remote` 上。此前只声明了 `'remote'`、没声明 `'remote.workspaceFiles'`,取该命名空间会**直接抛错**(不是返回 `undefined`)。现在两个都声明,写法与官方 `dsh-client-ui-sidebar-documentpreview` 一致。
|
|
129
|
+
- **批注创建曾被位置精修阻断**:精修是异步的,可一旦它抛错就会跳过整条创建流程。现在改为「**先创建批注、后异步精修**」,精修的任何失败都只降级为渲染坐标,绝不影响批注本身。
|
|
130
|
+
- **客户端半边沙箱没有 `console.warn`**(只有 `log` 与 `error`),调用会抛;而抛在 `catch` 里会把「已处理的失败」变成「未处理的拒绝」。日志现在统一走不外抛的包装。
|
|
131
|
+
- 同一条消息上挂了两份内容完全相同的批注块时只算一份,不再让同一批批注被回复两遍。
|
|
132
|
+
- 代码预览的字符区间此前取自渲染正文,而换行符不在 `textContent` 里,多行选区会与文件偏移错位;改按原文计算后此问题一并消失。
|
|
133
|
+
|
|
134
|
+
### 测试
|
|
135
|
+
|
|
136
|
+
- 44 项。
|
|
137
|
+
|
|
138
|
+
## 1.0.0
|
|
139
|
+
|
|
140
|
+
首个公开发布。
|
|
141
|
+
|
|
142
|
+
### 能力
|
|
143
|
+
|
|
144
|
+
- 在助手回复、用户消息、工作区文件预览里选中文字即可建立批注,批注文字可留空(仅标记原文)。
|
|
145
|
+
- 原文淡黄色高亮 + 编号角标;滚动或重渲染后按字符区间与引文上下文重建锚点。
|
|
146
|
+
- **点编号角标直接修改该条批注**(改批注文字 / 删除),列表面板里也有同样入口。
|
|
147
|
+
- 位置信息结构化:`charStart`/`charEnd` 半开区间;文件来源另带 1 基 `lineStart`/`lineEnd` 与工作区相对路径。
|
|
148
|
+
- 触发按钮位于发送按钮旁的 `conversation.input.right`;管理面板是脱离文档流的悬浮层,不影响输入框布局。
|
|
149
|
+
|
|
150
|
+
### 交付方式
|
|
151
|
+
|
|
152
|
+
- 批注集合包成一个 `File`(`批注.json`),经运行时自己的 `createDrafts` + 输入外壳的 `addFiles` 挂进草稿 —— 与拖拽/粘贴附件同一条链路,且在 `status === ready` 之后才挂上。
|
|
153
|
+
- 宿主半边在 `agent/pre-step` 把该附件块从模型可见内容里摘掉,紧随其后追加一条**独立的 user 消息**,正文即那份 JSON。消息正文全程不被改动。
|
|
154
|
+
- 负载为自描述 JSON:`kind` / `version` / `instruction` / `count` / `annotations[]`;宿主按 `kind` **按内容认领**,不依赖文件名。
|
|
155
|
+
- 附件随消息交出后批注自动清空,不会黏到下一条消息。
|
|
156
|
+
|
|
157
|
+
### 说明
|
|
158
|
+
|
|
159
|
+
- 零依赖:宿主半边只用 `node:crypto` 与 `node:fs/promises`,客户端半边只用模块表里的 `react`。这是刻意的 —— `link:` 安装的插件无法解析 `@deepseek-ai/*`,任何静态导入都会让宿主半边加载失败。
|
|
160
|
+
- 测试 32 例,覆盖宿主半边的摘块/认领/合并/配置分支,以及客户端半边从批注到附件挂载、发送后清空的整条数据通路(含锚点重建与字符区间捕获)。
|
|
161
|
+
|
|
162
|
+
### 已知限制
|
|
163
|
+
|
|
164
|
+
- 批注的原文与出处不能编辑,只能改批注文字或删掉重批。
|
|
165
|
+
- Markdown 预览没有行号(代码预览用 `.line` 序号,纯文本预览用 `data-textpreview-line`)。**此限制已在 1.1.0 解除。**
|
|
166
|
+
- 锚点依赖 DSH 的语义 `data-*` 属性;对话消息只带字符区间、不带行号。
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 U2A5F
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,161 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
# Selection Annotations
|
|
2
|
+
|
|
3
|
+
**English** · [简体中文](README.zh-CN.md)
|
|
4
|
+
|
|
5
|
+
Select a passage in the conversation, write what you think about it, and it travels with your next message. The model's answers come back one by one, attached to the exact spot you pointed at.
|
|
6
|
+
|
|
7
|
+
You no longer have to write "change the second sentence in the third paragraph above". Select it instead.
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Install
|
|
12
|
+
|
|
13
|
+
Install it from DSH → Settings → Plugins. If you can reach npm, use the package name `dsh-selection-annotations`; if not, install from the local folder instead.
|
|
14
|
+
|
|
15
|
+
Then **quit DSH completely** — including the tray icon — and start it again. Reloading the page is not enough; plugin code loads at startup.
|
|
16
|
+
|
|
17
|
+
## Three steps to start
|
|
18
|
+
|
|
19
|
+
1. Drag-select a passage of the assistant's answer.
|
|
20
|
+
2. A row of buttons appears under the selection. Click **Annotate**.
|
|
21
|
+
3. Write what you mean, for example "recompute these numbers with 12 months".
|
|
22
|
+
|
|
23
|
+
Then select the next spot, or just send. Your own text is left untouched; the annotations are extra context that rides along with the message.
|
|
24
|
+
|
|
25
|
+
## Things you will run into
|
|
26
|
+
|
|
27
|
+
### The toolbar waits a beat
|
|
28
|
+
|
|
29
|
+
Under the selection you get reject, accept, annotate and copy. The toolbar follows your selection horizontally, but only after you hold still for a second — it does not chase the pointer while you are still dragging, so it never covers the words you are trying to select.
|
|
30
|
+
|
|
31
|
+
### Clicking outside saves
|
|
32
|
+
|
|
33
|
+
Clicking outside the note box saves it; Esc throws it away. A fresh annotation with no text and no image is dropped when you click outside, so you never end up with empty rows.
|
|
34
|
+
|
|
35
|
+
Hover an already-annotated passage for half a second and its editor opens; move away and it saves and closes.
|
|
36
|
+
|
|
37
|
+
Once you have **dragged the box or resized it by the corner**, it stops closing on its own: clicking elsewhere no longer dismisses it either. At that point only Esc, or opening another annotation, closes it — you placed it yourself, and it should not wander off. It still gives way when you hover a different annotation.
|
|
38
|
+
|
|
39
|
+
Scrolling the wheel inside the box scrolls the box only; the conversation behind it stays put.
|
|
40
|
+
|
|
41
|
+
### Overview
|
|
42
|
+
|
|
43
|
+
A small "Annotations N" pill sits next to the composer. It opens every annotation in the session: source, quote, your note, thumbnails. Drag the rows to reorder, hover to edit or delete, clear all at the bottom. The last line is the plugin version — quote it when you report a problem.
|
|
44
|
+
|
|
45
|
+
### What you already sent
|
|
46
|
+
|
|
47
|
+
Each turn has a card listing what you marked for it. When a conversation is rewound, the affected entries are marked as withdrawn and dimmed. That is only a marker; nothing is deleted.
|
|
48
|
+
|
|
49
|
+
### How it answered
|
|
50
|
+
|
|
51
|
+
Open any entry in that card and the reply for that specific note sits under your note: the verdict, the reasoning, and what comes next. The reasoning is rendered as Markdown, so lists and code blocks show up properly.
|
|
52
|
+
|
|
53
|
+
Reply cards also appear under that turn's "Completed" section. Collapsing "Completed" only folds the body of a reply card; the title stays out. A card you collapsed yourself is never popped open again because its parent expanded.
|
|
54
|
+
|
|
55
|
+
### Images
|
|
56
|
+
|
|
57
|
+
Paste or drop images straight into the note box. Up to 4 per annotation, 8 MB each, compressed to JPEG by default; images whose shorter edge is under 100 px are left alone. Click a thumbnail for full screen, click anywhere or press Esc to leave.
|
|
58
|
+
|
|
59
|
+
Images live with the draft in the browser, so a reload or a session switch keeps them. When a draft grows too large the oldest images go first and the text stays.
|
|
60
|
+
|
|
61
|
+
### Settings
|
|
62
|
+
|
|
63
|
+
Under Settings → Plugins → Selection Annotations there are three things: image compression and quality, the instruction shown to the model, and the wording inserted by the accept / reject buttons.
|
|
64
|
+
|
|
65
|
+
## Where the data lives
|
|
66
|
+
|
|
67
|
+
| What | Where |
|
|
68
|
+
| --- | --- |
|
|
69
|
+
| Drafts not yet sent | `localStorage`: `dsh-selection-annotations:draft:<session id>` — up to 24 sessions, 200 items, ~3.5 MB |
|
|
70
|
+
| Records of what was sent | `localStorage`: `dsh-selection-annotations:sent:<session id>` — 120 entries and 2 MB per session |
|
|
71
|
+
| Batches, entries, replies | `$DSH_HOME/selection-annotations/annotations.db` (SQLite, WAL; tables `sessions`, `batches`, `entries`, `drafts`) |
|
|
72
|
+
| Annotation images | The session attachment folder, stored with the message |
|
|
73
|
+
| Diagnostics | `$DSH_HOME/selection-annotations/scroll-trace.log`, last 2000 lines |
|
|
74
|
+
| Plugin settings | A few `localStorage` keys |
|
|
75
|
+
|
|
76
|
+
The plugin makes no outbound requests; data stays on this machine and inside the current session, and the host-side write endpoints accept loopback only. Annotations do become part of your message, so the model reads them — that is the point.
|
|
77
|
+
|
|
78
|
+
## What happens when you press send
|
|
79
|
+
|
|
80
|
+
1. You select and write; the content is stored in the browser first (draft).
|
|
81
|
+
2. On send, the plugin writes the batch into the local database and reads it back to check the count.
|
|
82
|
+
3. If the count does not match, nothing is sent. A toast explains it, the notes and attachments stay in the composer, and you can retry — the retry reuses the same batch id, so nothing is duplicated.
|
|
83
|
+
4. Only then does the message go out, with the annotations as a machine-readable block inside it.
|
|
84
|
+
5. The model reads them and files one reply per annotation; replies land in the local database.
|
|
85
|
+
6. The UI polls for new replies every 6 seconds and renders reply cards.
|
|
86
|
+
|
|
87
|
+
Step 3 can feel like a nuisance. It costs you one extra press, and it buys you the guarantee that a message never leaves with its annotations lost.
|
|
88
|
+
|
|
89
|
+
## Other machines and upgrades
|
|
90
|
+
|
|
91
|
+
- After an upgrade, fully quit DSH and start it again.
|
|
92
|
+
- Node ≥ 22.13 is required (built-in `node:sqlite`).
|
|
93
|
+
- The plugin is inserted into the active profile through `cordis.patch.yml` (`insert`, id `selection-annotations`); DSH itself is not patched.
|
|
94
|
+
- The host option `config.maxPayloadBytes` caps one annotation's payload at 512 KB by default; larger ones are rejected.
|
|
95
|
+
- To stop the scroll diagnostics, run `window.__dshSelectionAnnotations.traceScroll(false)` in the console.
|
|
96
|
+
- Reply polling interval is `REPLY_POLL_MS` in `src/core/config.js`, 6000 ms by default.
|
|
97
|
+
|
|
98
|
+
## If you want to change the code
|
|
99
|
+
|
|
100
|
+
Browser code lives in `src/` and is bundled into the single file `client.js` that DSH loads.
|
|
101
|
+
|
|
102
|
+
| Path | Responsibility |
|
|
103
|
+
| --- | --- |
|
|
104
|
+
| `src/entry.js` | DSH loader entry |
|
|
105
|
+
| `src/plugin.js` | composition root: injected deps, slots, lifecycle, UI |
|
|
106
|
+
| `src/core/` | modules by concern: session, drafts, ledger, sync, anchors, cards, popover, styles, copy… |
|
|
107
|
+
| `lib/index.js` | the host half: claims the annotation attachment, folds the block into the user message, stores replies, defines the tool |
|
|
108
|
+
| `lib/annotations-db.js` | SQLite access layer |
|
|
109
|
+
| `scripts/build.mjs` | esbuild bundling |
|
|
110
|
+
| `scripts/check-build.mjs` | verifies `client.js` matches the sources |
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
npm install # esbuild is the only dev dependency
|
|
114
|
+
npm run build # regenerate client.js
|
|
115
|
+
npm run check:build # verify the bundle matches the sources
|
|
116
|
+
npm test # build check + all tests
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
`client.js` is generated; do not hand-edit it. React is supplied by DSH and treated as external.
|
|
120
|
+
|
|
121
|
+
### Host routes
|
|
122
|
+
|
|
123
|
+
All of them accept loopback requests only (Host must be `127.0.0.1`, `localhost` or `[::1]`):
|
|
124
|
+
|
|
125
|
+
| Route | Purpose |
|
|
126
|
+
| --- | --- |
|
|
127
|
+
| `GET /selection-annotations/session/<session id>` | read the whole snapshot, old shapes included |
|
|
128
|
+
| `PUT` / `POST` on the same path | write the whole snapshot |
|
|
129
|
+
| `POST /selection-annotations/session/<session id>/batch` | create one batch, idempotent by batch id |
|
|
130
|
+
| `PATCH /selection-annotations/entry/<uuid>` | write one entry's reply |
|
|
131
|
+
| `PATCH /selection-annotations/batch/<batch_uuid>` | backfill that batch's turn and anchor |
|
|
132
|
+
| `POST /selection-annotations/debug/trace` | append diagnostics |
|
|
133
|
+
|
|
134
|
+
### When something breaks
|
|
135
|
+
|
|
136
|
+
The diagnostics log is one JSON object per line, carrying `session` and `build`. The send gate leaves three kinds of records: `gate-post` (started writing), `gate-done` (write and check result), `gate-block` (why it was blocked). A failed batch write leaves `batch-post` / `batch-done` and marks the card unsynced. To find out which build the page loaded, read the build stamp at the bottom of the overview panel.
|
|
137
|
+
|
|
138
|
+
## What it cannot do yet
|
|
139
|
+
|
|
140
|
+
- Anchoring relies on DSH's private DOM structure; a major DSH upgrade may need adaptation.
|
|
141
|
+
- Text inside iframes and canvases cannot be selected for annotation.
|
|
142
|
+
- When history is virtualised, card placement follows what DSH actually renders.
|
|
143
|
+
- The annotation database is per device. A conversation can be shared across devices, but annotations sent from another device do not show a sent card here. Moving the database with the session is planned.
|
|
144
|
+
- Where the English interface and the Chinese one disagree, the Chinese one wins.
|
|
145
|
+
|
|
146
|
+
## Reporting problems
|
|
147
|
+
|
|
148
|
+
This plugin is sharpened by real use, so issues are welcome. Please include:
|
|
149
|
+
|
|
150
|
+
1. The plugin version (build stamp at the bottom of the overview panel) and the DSH version.
|
|
151
|
+
2. What you did, what you expected, what actually happened.
|
|
152
|
+
3. A reproduction, as small as you can make it.
|
|
153
|
+
4. The few dozen `scroll-trace.log` lines around the failure.
|
|
154
|
+
|
|
155
|
+
Remove private conversation content before pasting logs.
|
|
156
|
+
|
|
157
|
+
## About this repository
|
|
158
|
+
|
|
159
|
+
A fork of [2A5F/dsh-selection-annotations](https://github.com/2A5F/dsh-selection-annotations) 1.1.0. Storage, anchoring and UI were rewritten for our own workflow since then: annotations in SQLite, replies addressed by UUID, sent-history review, the reply area, the send gate, withdrawal markers and more. Upstream's later 2.x line went a different way, so features do not map one to one.
|
|
160
|
+
|
|
161
|
+
MIT — see [LICENSE](LICENSE).
|
package/README.zh-CN.md
ADDED
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
# 划词批注
|
|
2
|
+
|
|
3
|
+
[English](README.md) · **简体中文**
|
|
4
|
+
|
|
5
|
+
在对话里选中一段文字,写下你的意见,它跟着下一条消息一起交给 AI;AI 的答复会按条回到你指过的那个位置。
|
|
6
|
+
|
|
7
|
+
「把上面第三段那句话改一下」这种话不用再写了。你把它划出来就行。
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## 先装上
|
|
12
|
+
|
|
13
|
+
在 DSH 的「设置 → 插件」里装。能访问 npm 的直接填包名 `dsh-selection-annotations`;访问不了就从本地目录装,指到仓库所在的文件夹。
|
|
14
|
+
|
|
15
|
+
装完**完全退出 DSH**(托盘里的图标也退掉)再打开。光刷新网页不行,插件代码是启动时加载的。
|
|
16
|
+
|
|
17
|
+
## 上手三步
|
|
18
|
+
|
|
19
|
+
1. 在 AI 的回答上拖选一段话。
|
|
20
|
+
2. 选区下面会冒出一排按钮,点「批注」。
|
|
21
|
+
3. 在弹出的框里写你想说的,比如「这里的数字按 12 个月重算」。
|
|
22
|
+
|
|
23
|
+
写完可以接着划下一处,也可以直接发送。你的正文不会被改动,批注是跟着消息一起送过去的附加信息。
|
|
24
|
+
|
|
25
|
+
## 用起来会遇到的事
|
|
26
|
+
|
|
27
|
+
### 工具条会慢一拍
|
|
28
|
+
|
|
29
|
+
划完松手,工具条出现在选区下方,上面有否决、采纳、批注、复制。它横向跟着选区走,但会等你停手一秒才滑过去——拖动过程中它不追着你跑,免得挡住你想选的字。
|
|
30
|
+
|
|
31
|
+
### 点外面就是保存
|
|
32
|
+
|
|
33
|
+
批注框点外面等于保存,按 Esc 是放弃。新划出来、一个字没写也没加图的批注,点外面会直接丢掉,不会留下空条目。
|
|
34
|
+
|
|
35
|
+
鼠标在已经批注过的原文上停半秒,会自动打开那条的编辑框;移开就保存关闭。
|
|
36
|
+
|
|
37
|
+
如果你**拖动过这个框,或者拉过它的边角**,它就不再自己关掉了,点别处也不会消失。这会儿只有 Esc、或者点开另一条批注能把它收起来——位置是你亲手摆的,它不该突然跑了。鼠标扫到别的批注时,它还是会让位给新的那条。
|
|
38
|
+
|
|
39
|
+
在框里滚轮往下翻,只滚框里的内容,背后的对话不会跟着一起跑。
|
|
40
|
+
|
|
41
|
+
### 总览
|
|
42
|
+
|
|
43
|
+
输入框旁边有个「批注 N」的小胶囊,点开是当前所有批注:出处、原文、你写的字、缩略图都在。上下拖可以调顺序,鼠标移上去能编辑或删除,底下还有清空。最下面一行是插件版本号,遇到问题报给我时带上它。
|
|
44
|
+
|
|
45
|
+
### 已经发出去的批注
|
|
46
|
+
|
|
47
|
+
每一轮对话上方有一张卡片,列着这一轮你标了什么。会话被回退时会受影响的那几条会标上「已撤回」并变淡——只是标记,数据没有删。
|
|
48
|
+
|
|
49
|
+
### 它怎么答的
|
|
50
|
+
|
|
51
|
+
点开那张卡片里的任意一条,备注下面就是 AI 对这条的答复:结论、理由、以及接下来打算怎么办。理由按 Markdown 显示,该有的列表和代码块都能看见。
|
|
52
|
+
|
|
53
|
+
答复卡也在一轮的「已完成」下方,收起「已完成」时答复卡只折叠正文,标题留在外面;你自己收起过的卡不会因为展开父级又被弹开。
|
|
54
|
+
|
|
55
|
+
### 图
|
|
56
|
+
|
|
57
|
+
批注框里可以直接粘图或者拖图进去,一条最多 4 张、单张 8 MB。默认压成 JPEG,最短边不到 100 像素的保持原样。点缩略图能全屏看,点任意处或 Esc 退出。
|
|
58
|
+
|
|
59
|
+
图跟着草稿存在浏览器里,刷新页面、切会话都还在;草稿太大了会先丢最旧的图,文字留着。
|
|
60
|
+
|
|
61
|
+
### 设置
|
|
62
|
+
|
|
63
|
+
「设置 → 插件 → 划词批注」里能改三样:图片是否压缩与压缩质量、给 AI 看的批注说明、采纳与否决自动填进去的那几个字。
|
|
64
|
+
|
|
65
|
+
## 数据在哪
|
|
66
|
+
|
|
67
|
+
| 内容 | 位置 |
|
|
68
|
+
| --- | --- |
|
|
69
|
+
| 还没发出去的草稿 | 浏览器 `localStorage` 的 `dsh-selection-annotations:draft:<会话 id>`,最多留 24 个会话、200 条、约 3.5 MB |
|
|
70
|
+
| 发出去的记录 | 浏览器 `localStorage` 的 `dsh-selection-annotations:sent:<会话 id>`,每个会话 120 条、2 MB |
|
|
71
|
+
| 批次、条目、答复 | `$DSH_HOME/selection-annotations/annotations.db`(SQLite,WAL;表 `sessions`、`batches`、`entries`、`drafts`) |
|
|
72
|
+
| 批注图片 | 会话附件目录,跟消息一起存 |
|
|
73
|
+
| 诊断日志 | `$DSH_HOME/selection-annotations/scroll-trace.log`,只留最近 2000 行 |
|
|
74
|
+
| 插件设置 | 浏览器的几个 `localStorage` 键 |
|
|
75
|
+
|
|
76
|
+
插件不往外面发任何请求,数据只在本机和当前会话里流转;宿主那边的写入接口只认本机回环地址。批注会作为你消息的一部分进入上下文,AI 能读到——这本来就是它的用途。
|
|
77
|
+
|
|
78
|
+
## 发送那一刻发生了什么
|
|
79
|
+
|
|
80
|
+
1. 你划词写备注,内容先存在浏览器里(草稿)。
|
|
81
|
+
2. 点发送时,插件先把这一批写进本机数据库,再读回来核对条数。
|
|
82
|
+
3. 核对不上就不发消息,弹一句提示,批注和附件留在输入框里,你重试就行——重试沿用同一个批号,不会重复。
|
|
83
|
+
4. 核对通过才真正发送,批注作为一段机器可读的数据跟着消息走。
|
|
84
|
+
5. AI 看完按条写答复,答复落到本机库。
|
|
85
|
+
6. 界面每 6 秒拉一次新答复,渲染成答复卡。
|
|
86
|
+
|
|
87
|
+
第 3 步有时候显得烦,但它的代价是一句话的等待,换来的是「消息发出去、批注却丢了」这种事不会发生。
|
|
88
|
+
|
|
89
|
+
## 装到别的机器、升级
|
|
90
|
+
|
|
91
|
+
- 升级后同样要完全退出 DSH 再启动。
|
|
92
|
+
- 需要 Node ≥ 22.13,用的是内置的 `node:sqlite`。
|
|
93
|
+
- 插件通过 `cordis.patch.yml` 插进当前 profile(`insert` 一条 id 为 `selection-annotations`),不改 DSH 本体。
|
|
94
|
+
- 宿主参数 `config.maxPayloadBytes` 控制单条批注的负载上限,默认 512 KB,超了会被拒。
|
|
95
|
+
- 调试打点可以在控制台执行 `window.__dshSelectionAnnotations.traceScroll(false)` 关掉。
|
|
96
|
+
- 答复轮询间隔是 `src/core/config.js` 里的 `REPLY_POLL_MS`,默认 6000 毫秒。
|
|
97
|
+
|
|
98
|
+
## 要改代码的话
|
|
99
|
+
|
|
100
|
+
浏览器侧源码在 `src/`,构建成单文件 `client.js`——DSH 只加载这一个文件。
|
|
101
|
+
|
|
102
|
+
| 路径 | 干什么的 |
|
|
103
|
+
| --- | --- |
|
|
104
|
+
| `src/entry.js` | DSH loader 入口 |
|
|
105
|
+
| `src/plugin.js` | 组合根:注入依赖、注册槽位、生命周期、界面 |
|
|
106
|
+
| `src/core/` | 按职责拆的模块:会话、草稿、台账、同步、锚点、卡片、弹层、样式、文案…… |
|
|
107
|
+
| `lib/index.js` | 宿主那半边:认领批注附件、把数据块并进用户消息、存答复、定义工具 |
|
|
108
|
+
| `lib/annotations-db.js` | SQLite 存取层 |
|
|
109
|
+
| `scripts/build.mjs` | esbuild 打包 |
|
|
110
|
+
| `scripts/check-build.mjs` | 校验 `client.js` 和源码是否一致 |
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
npm install # 开发依赖只有 esbuild
|
|
114
|
+
npm run build # 生成 client.js
|
|
115
|
+
npm run check:build # 校验构建产物与源码一致
|
|
116
|
+
npm test # 构建校验 + 全部测试
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
`client.js` 是生成物,别手改。React 由 DSH 提供,打包时按 external 处理。
|
|
120
|
+
|
|
121
|
+
### 宿主接口
|
|
122
|
+
|
|
123
|
+
都只接受本机回环请求(Host 必须是 `127.0.0.1`、`localhost` 或 `[::1]`):
|
|
124
|
+
|
|
125
|
+
| 路由 | 作用 |
|
|
126
|
+
| --- | --- |
|
|
127
|
+
| `GET /selection-annotations/session/<会话 id>` | 读整份快照,旧形状也认 |
|
|
128
|
+
| `PUT` / `POST` 同一路径 | 写整份快照 |
|
|
129
|
+
| `POST /selection-annotations/session/<会话 id>/batch` | 新建一批批注,按批号幂等 |
|
|
130
|
+
| `PATCH /selection-annotations/entry/<uuid>` | 写某一条的答复 |
|
|
131
|
+
| `PATCH /selection-annotations/batch/<batch_uuid>` | 回填这一批的轮次和锚点 |
|
|
132
|
+
| `POST /selection-annotations/debug/trace` | 追加诊断日志 |
|
|
133
|
+
|
|
134
|
+
### 出问题怎么查
|
|
135
|
+
|
|
136
|
+
诊断日志一行一个 JSON,带 `session` 和 `build` 字段。发送闸会留三类记录:`gate-post`(开始入库)、`gate-done`(入库与核对结果)、`gate-block`(为什么拦);批次写失败会留 `batch-post` / `batch-done`,界面上标「未同步」。想知道页面跑的是哪一版,看总览面板底部的构建标记。
|
|
137
|
+
|
|
138
|
+
## 现在还做不到
|
|
139
|
+
|
|
140
|
+
- 定位靠 DSH 私有的 DOM 结构,DSH 大版本升级后可能要适配。
|
|
141
|
+
- iframe 和 canvas 里的文字划不了。
|
|
142
|
+
- 历史轮次被虚拟化时,卡片位置以 DSH 实际渲染的为准。
|
|
143
|
+
- 批注库按设备各存一份。会话可以跨设备共享,但在别的设备上发的批注,回到本机看不到「已发送」卡片。让库跟着会话走是后面要做的事。
|
|
144
|
+
- 英文界面如果和中文对不上,以中文为准。
|
|
145
|
+
|
|
146
|
+
## 碰到问题
|
|
147
|
+
|
|
148
|
+
这个插件是靠真实用法一点点磨出来的,欢迎开 issue,请带上:
|
|
149
|
+
|
|
150
|
+
1. 插件版本(总览面板底部的构建标记)和 DSH 版本。
|
|
151
|
+
2. 你做了什么、希望看到什么、实际看到什么。
|
|
152
|
+
3. 能复现的话,步骤写得越小越好。
|
|
153
|
+
4. 出事时间前后的几十行 `scroll-trace.log`。
|
|
154
|
+
|
|
155
|
+
贴日志前先把对话里的私人内容去掉。
|
|
156
|
+
|
|
157
|
+
## 关于这个仓库
|
|
158
|
+
|
|
159
|
+
fork 自 [2A5F/dsh-selection-annotations](https://github.com/2A5F/dsh-selection-annotations) 的 1.1.0。之后按我们自己的用法重写了存储、定位和界面:批注落 SQLite、按 UUID 定向答复、已发送回看、答复区、发送闸、撤回标记等等。上游后来的 2.x 走了另一个方向,两边的功能不一一对应。
|
|
160
|
+
|
|
161
|
+
MIT,见 [LICENSE](LICENSE)。
|