dsh-codinput 0.2.0 → 0.3.1

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 CHANGED
@@ -2,6 +2,43 @@
2
2
 
3
3
  本项目遵循 [Keep a Changelog](https://keepachangelog.com/zh-CN/1.1.0/) 与 [语义化版本](https://semver.org/lang/zh-CN/)。
4
4
 
5
+ ## [0.3.1] — 2026-10-11
6
+
7
+ 编辑 + 预览分屏同步滚动;README 展示图与品牌视觉更新;第三方归属补全。
8
+
9
+ ### 新增
10
+
11
+ - **分屏同步滚动**:编辑 + 预览分屏时两栏按滚动比例互随(两侧内容高度不同,按比例映射);只保留编辑栏一个滚动条,预览栏藏起滚动条但滚轮仍可反向带动编辑器;进入分屏、草稿更新或切换会话后,预览按编辑器当前比例自动对齐。同时修复分屏内容过高时两栏都出不了滚动条的布局缺陷(grid 隐式行随内容撑高、不受 `max-height` 钳制——两栏改 `minmax(0,1fr)` + `min-height:0`)。
12
+
13
+ ### 变更
14
+
15
+ - **README 展示图更新为桌面版实拍四图**(普通 / 编辑+预览分屏 / 悬浮 / 侧栏,2×2 布局),并改用**无损 webp**(体积约为原 PNG 的 1/4,像素级无损);英文 README 与中文共用同一套配图(`assets/en/` 移除);DSH 兼容徽章更新为 `0.2.0-rc.2+`(展示图摄于桌面版 `0.2.0-rc.2`)。
16
+ - **品牌图标重上色**:描边由紫蓝 `#4632DE` 换为 DeepSeek 鲸鱼蓝 `#3964FE`(README 头图、`icon.svg` / `icon.png` 同步,PNG 重渲染仍为 320×320 透明底)。
17
+ - **第三方归属补全**:内置依赖(CodeMirror 6、marked、DOMPurify)的版权行与许可声明集中进 [NOTICE](./NOTICE)——压缩产物不留许可注释,NOTICE 随 npm 包分发,覆盖源码与包两种安装路径。
18
+
19
+ ### 说明
20
+
21
+ - 宿主兼容不变:桌面版(Electron,`0.2.0-rc.2`)与 `0.1.7-rc.2`(next)实测通过,`0.1.5-rc.2` / `0.1.6-alpha.2` 沿用既往结论;升级宿主后建议按 [TESTING.md](./TESTING.md) 冒烟。
22
+
23
+ [0.3.1]: https://github.com/Witherwithwinter/DSH-Codinput/compare/v0.3.0...v0.3.1
24
+
25
+ ## [0.3.0] — 2026-10-02
26
+
27
+ 官方桌面版语音输入同步:原生输入框有语音按钮时,Codinput 在一模一样的位置渲染一模一样的按钮。
28
+
29
+ ### 新增
30
+
31
+ - **语音输入按钮同步(官方桌面版兼容)**:官方桌面版(Electron,`0.2.0-rc.2` 起)的输入框带语音输入按钮。Codinput 开启时在完全相同的位置(工具行右侧、模型选择器与发送钮之间)渲染**同一个官方语音组件**——`conversation.input.activity` 槽位条目原样渲染:麦克风触发钮、录音波形、转写、未就绪引导弹窗与中英文案全部是官方代码,官方后续更新自动跟随。录音展开时工具行行为也与官方一致(左侧工具与模型控件让位、capture 行接管整行、发送钮保留)。
32
+
33
+ ### 说明
34
+
35
+ - **检测即兼容**:宿主未挂载语音插件(web 端各版本、桌面版语音插件关闭)时该槽位无条目,Codinput 同样不渲染按钮——与原生输入框行为一致;条目出现/消失经槽位订阅实时跟随(设置里开关语音插件即时生效)。按钮文案走官方 `voice-input` 词典(听写 / 开始录音 / 识别中… 等),不自备译文。
36
+ - **桌面版实测(Electron `0.2.0-rc.2`)**:授权麦克风 → 录音(波形)→ 停止 → 官方转写链路端到端通过;本地模型首次唤醒可能报「Unable to decode audio data」,重试即成功(官方输入框同样如此)。展开态布局、Escape/失焦取消、转写空结果与失败反馈均与官方一致。
37
+ - **web 宿主回归**:`0.1.7-rc.2` 实测无语音插件时按钮不渲染、工具行无任何变化,既往功能不受影响。
38
+ - 宿主兼容其余不变:`0.1.7-rc.2`(next)实测通过,`0.1.5-rc.2` / `0.1.6-alpha.2` 沿用既往结论;升级宿主后建议按 [TESTING.md](./TESTING.md) 冒烟。
39
+
40
+ [0.3.0]: https://github.com/Witherwithwinter/DSH-Codinput/compare/v0.2.0...v0.3.0
41
+
5
42
  ## [0.2.0] — 2026-09-29
6
43
 
7
44
  品牌换新 + 一批交互补全:图片原图预览、发送/停止、侧栏 `/codinput` 退出与自动启用,以及输入卡片与数据行对官方布局的逐值对齐。
package/NOTICE CHANGED
@@ -16,3 +16,22 @@ Portions of this project replicate DeepSeek Harness (`@deepseek-ai/dsh`, MIT
16
16
  License, Copyright (c) 2026 DeepSeek), as detailed above. They are used under
17
17
  the MIT license, and the original copyright and permission notice are retained
18
18
  alongside this repository's LICENSE file.
19
+
20
+ 内置第三方依赖的版权与许可声明 / Bundled third-party dependencies
21
+ =====================================================================
22
+
23
+ 发布产物 `lib/client.js` 内置以下第三方库(压缩构建剥离了许可注释,故在此
24
+ 集中保留其版权行;许可全文见各上游仓库 / npm 包):
25
+
26
+ - CodeMirror 6(@codemirror/state / view / language / commands)
27
+ MIT License
28
+ Copyright (C) 2018-2021 by Marijn Haverbeke <marijn@haverbeke.berlin> and others
29
+
30
+ - marked
31
+ MIT License
32
+ Copyright (c) 2018+, MarkedJS (https://github.com/markedjs/)
33
+ Copyright (c) 2011-2018, Christopher Jeffrey (https://github.com/chjj/)
34
+
35
+ - DOMPurify
36
+ (MPL-2.0 OR Apache-2.0) 双许可,本项目按 Apache-2.0 条款使用
37
+ Copyright (c) Cure53 and contributors (https://cure53.de/)
package/README.en.md CHANGED
@@ -6,7 +6,7 @@
6
6
 
7
7
  <p align="center">
8
8
  <a href="https://www.npmjs.com/package/dsh-codinput"><img src="https://img.shields.io/npm/v/dsh-codinput" alt="npm Version" /></a>
9
- <a href="https://github.com/deepseek-ai/deepseek-harness"><img src="https://img.shields.io/badge/DSH-0.1.5--rc.2%2B-blue" alt="DSH Version" /></a>
9
+ <a href="https://github.com/deepseek-ai/deepseek-harness"><img src="https://img.shields.io/badge/DSH-0.2.0--rc.2%2B-blue" alt="DSH Version" /></a>
10
10
  <a href="https://www.npmjs.com/package/dsh-codinput"><img src="https://img.shields.io/npm/dm/dsh-codinput" alt="Downloads" /></a>
11
11
  <a href="https://github.com/Witherwithwinter/DSH-Codinput/stargazers"><img src="https://img.shields.io/github/stars/Witherwithwinter/DSH-Codinput" alt="GitHub Stars" /></a>
12
12
  <a href="./LICENSE"><img src="https://img.shields.io/github/license/Witherwithwinter/DSH-Codinput" alt="License" /></a>
@@ -14,25 +14,19 @@
14
14
 
15
15
  <p align="center"><a href="./README.md">中文</a> | English</p>
16
16
 
17
- <p align="center">A real code editor, right where the DeepSeek Harness chat composer used to be.</p>
18
-
19
- ![Default mode](./assets/en/preview-normal.png)
17
+ <p align="center">An editor-style input panel, right where the DeepSeek Harness chat composer used to be.</p>
20
18
 
21
19
  <table>
22
20
  <tr>
23
- <td width="50%"><img src="./assets/en/preview-split.png" alt="Edit + preview split" /><br /><sub>Edit + preview split (exactly half and half)</sub></td>
24
- <td width="50%"><img src="./assets/en/preview-float.png" alt="Floating mode" /><br /><sub>Floating mode (draggable, resizable from all 8 edges/corners)</sub></td>
21
+ <td width="50%"><img src="./assets/preview-normal.webp" alt="Default mode" /><br /><sub>Default mode (takes over the original composer slot)</sub></td>
22
+ <td width="50%"><img src="./assets/preview-split.webp" alt="Edit + preview split" /><br /><sub>Edit + preview split (exactly half and half)</sub></td>
25
23
  </tr>
26
24
  <tr>
27
- <td width="50%"><img src="./assets/en/preview-side.png" alt="Sidebar tab mode" /><br /><sub>Sidebar tab mode (full-height, VS Code panel style)</sub></td>
28
- <td width="50%"><img src="./assets/en/preview-ball-detail.png" alt="Recall ball" /><br /><sub>The recall ball shown when the sidebar is collapsed (close-up)</sub></td>
25
+ <td width="50%"><img src="./assets/preview-float.webp" alt="Floating mode" /><br /><sub>Floating mode (draggable, resizable from all 8 edges/corners)</sub></td>
26
+ <td width="50%"><img src="./assets/preview-side.webp" alt="Sidebar tab mode" /><br /><sub>Sidebar tab mode (full-height, VS Code panel style)</sub></td>
29
27
  </tr>
30
28
  </table>
31
29
 
32
- <p align="center">
33
- <sub>Every string goes through the host locale service, so the UI follows the host language setting (中文 / English) — the screenshots above are the English UI, the Chinese ones live in the <a href="./README.md">中文 README</a></sub>
34
- </p>
35
-
36
30
  ## Features
37
31
 
38
32
  **Three modes, one instance** — the input surface exists in exactly one of three states at any moment, and never coexists with the official composer:
@@ -48,6 +42,7 @@
48
42
  - **`/` `@`**: entirely the official trigger pipeline (track → official menu store → a faithful MenuView replica): candidate menu, drill-down, crumbs and skeletons match the official UI; `/codinput` slots into the head of the commands section alphabetically; everything else keeps the official usage order.
49
43
  - **Model & reasoning effort**: read from the official shared directory (the same state source as `/model`). **Permissions**: the three official presets plus the RiskConfirmation modal for full access.
50
44
  - **Attachments**: slash Add · File (the takeover surface binds the shell's file-picker contract, so the entry keeps working while Codinput owns the composer), **paste images directly**, or **drop files onto the card** (clicking an image thumbnail opens the original-image lightbox, an ImageLightbox replica; the rail is a faithful replica of the official one: 64×64 image thumbnails, file cards with type glyph/name/size, upload spinner, progress bar, retry on failure).
45
+ - **Voice input sync (official desktop app)**: when the official desktop composer ships a voice button, Codinput renders **the very same button in the very same place** — it renders the official voice component itself (mic trigger, recording waveform, transcription, setup prompt and all copy are official code); hosts without the native voice button (all web channels) render none.
51
46
  - **Performance & usage**: a replica of the official stats dock — turns/steps · tok/s, total tok · cache hit, plus the context-usage dial — with value-for-value parity in data and formatting, each opening a detail panel; available in all three modes.
52
47
  - **Settings**: Settings → Codinput (takeover on/off, line numbers, font, **fully custom send / line-break shortcuts** via a recorder, default view); with the takeover off, **opening the Codinput tab in the right sidebar enables it directly**.
53
48
 
@@ -94,7 +89,7 @@ To pin a version or maintain the profile by hand, the manual equivalent of **Met
94
89
  ```jsonc
95
90
  {
96
91
  "dependencies": {
97
- "dsh-codinput": "^0.1.1" // for local development: "link:/abs/path/to/DSH-Codinput"
92
+ "dsh-codinput": "^0.3.0" // for local development: "link:/abs/path/to/DSH-Codinput"
98
93
  },
99
94
  "dsh": {
100
95
  "profile": {
@@ -117,6 +112,7 @@ The host publishes **rc** builds on npm (`latest` is the current stable rc, `nex
117
112
 
118
113
  | Host version | Status |
119
114
  | --- | --- |
115
+ | Desktop app (Electron, `0.2.0-rc.2`) | ✅ Verified on a real instance (official voice-input button synced — mic permission → recording → transcription verified end to end; the button hides itself when the voice plugin is absent or off) |
120
116
  | `0.1.7-rc.2` | ✅ Verified on a real instance (current `next`; the acrylic candidate menu, the relocated context meter and the dock row layout are aligned to this build) |
121
117
  | `0.1.5-rc.2` | ✅ Verified on a real instance |
122
118
  | `0.1.6-alpha.2` | ✅ Current development baseline; every feature verified end to end |
@@ -165,7 +161,7 @@ npm run typecheck
165
161
 
166
162
  Parts of this project **replicate DeepSeek Harness** (`@deepseek-ai/dsh`, MIT License, Copyright (c) 2026 DeepSeek): several SVG icon paths (the permission shield set, plus, paperclip, close, arrow-up, the generic file glyph, …) and CSS values for the composer card, the attachment rail and the original-image lightbox. They are used under the MIT license; the original copyright and permission notice are retained in [NOTICE](./NOTICE) alongside [LICENSE](./LICENSE).
167
163
 
168
- Bundled third-party dependencies: CodeMirror 6 (MIT), marked (MIT), DOMPurify (Apache-2.0 / MPL-2.0 dual licensed).
164
+ Bundled third-party dependencies: CodeMirror 6 (MIT), marked (MIT), DOMPurify (Apache-2.0 / MPL-2.0 dual licensed, used under Apache-2.0) — the minified bundle strips license comments, so their copyright and license notices are retained in [NOTICE](./NOTICE).
169
165
 
170
166
  ## License
171
167
 
package/README.md CHANGED
@@ -6,7 +6,7 @@
6
6
 
7
7
  <p align="center">
8
8
  <a href="https://www.npmjs.com/package/dsh-codinput"><img src="https://img.shields.io/npm/v/dsh-codinput" alt="npm Version" /></a>
9
- <a href="https://github.com/deepseek-ai/deepseek-harness"><img src="https://img.shields.io/badge/DSH-0.1.5--rc.2%2B-blue" alt="DSH Version" /></a>
9
+ <a href="https://github.com/deepseek-ai/deepseek-harness"><img src="https://img.shields.io/badge/DSH-0.2.0--rc.2%2B-blue" alt="DSH Version" /></a>
10
10
  <a href="https://www.npmjs.com/package/dsh-codinput"><img src="https://img.shields.io/npm/dm/dsh-codinput" alt="Downloads" /></a>
11
11
  <a href="https://github.com/Witherwithwinter/DSH-Codinput/stargazers"><img src="https://img.shields.io/github/stars/Witherwithwinter/DSH-Codinput" alt="GitHub Stars" /></a>
12
12
  <a href="./LICENSE"><img src="https://img.shields.io/github/license/Witherwithwinter/DSH-Codinput" alt="License" /></a>
@@ -14,25 +14,19 @@
14
14
 
15
15
  <p align="center">中文 | <a href="./README.en.md">English</a></p>
16
16
 
17
- <p align="center">把 DeepSeek Harness 的聊天输入框,换成一个真正的代码编辑器。</p>
18
-
19
- ![普通模式](./assets/preview-normal.png)
17
+ <p align="center">把 DeepSeek Harness 的聊天输入框,换成编辑器式的输入面板。</p>
20
18
 
21
19
  <table>
22
20
  <tr>
23
- <td width="50%"><img src="./assets/preview-split.png" alt="编辑 + 预览分屏" /><br /><sub>编辑 + 预览分屏(严格对半)</sub></td>
24
- <td width="50%"><img src="./assets/preview-float.png" alt="悬浮模式" /><br /><sub>悬浮模式(可拖动位置、八向缩放)</sub></td>
21
+ <td width="50%"><img src="./assets/preview-normal.webp" alt="普通模式" /><br /><sub>普通模式(接管原输入位)</sub></td>
22
+ <td width="50%"><img src="./assets/preview-split.webp" alt="编辑 + 预览分屏" /><br /><sub>编辑 + 预览分屏(严格对半)</sub></td>
25
23
  </tr>
26
24
  <tr>
27
- <td width="50%"><img src="./assets/preview-side.png" alt="侧栏标签模式" /><br /><sub>侧栏标签模式(VS Code 面板式全高)</sub></td>
28
- <td width="50%"><img src="./assets/preview-ball-detail.png" alt="右上角小球" /><br /><sub>侧栏收起时的唤出小球(特写)</sub></td>
25
+ <td width="50%"><img src="./assets/preview-float.webp" alt="悬浮模式" /><br /><sub>悬浮模式(可拖动位置、八向缩放)</sub></td>
26
+ <td width="50%"><img src="./assets/preview-side.webp" alt="侧栏标签模式" /><br /><sub>侧栏标签模式(VS Code 面板式全高)</sub></td>
29
27
  </tr>
30
28
  </table>
31
29
 
32
- <p align="center">
33
- <sub>界面语言跟随宿主设置(中文 / English)—— 文案全部走宿主 locale 服务,上图为中文界面;英文界面见 <a href="./README.en.md">English README</a></sub>
34
- </p>
35
-
36
30
  ## 特性
37
31
 
38
32
  **三态单实例**——输入入口只有三种形态,任一时刻恰好一个,绝不与官方输入框共存:
@@ -48,6 +42,7 @@
48
42
  - **`/` `@` 触发管线**:完全走官方链路(track → 官方 menu store → 逐项复刻的 MenuView),候选菜单、钻取、crumbs、骨架屏与官方逐一对齐;`/codinput` 按字典序排入指令节首,其余保持官方使用序。
49
43
  - **模型与权限**:模型与思考强度读官方共享目录(与 `/model` 同一状态源);权限为官方三预设,含完全权限的风险确认模态。
50
44
  - **附件**:slash「添加 · 文件」、**粘贴图片**、**拖文件进卡片**三条路径;点图片缩略图弹**原图预览**(官方 ImageLightbox 同构);上传中/失败有状态芯片,失败可整卡重试。
45
+ - **语音输入同步(官方桌面版)**:官方桌面版的输入框带语音按钮时,Codinput 在一模一样的位置渲染**一模一样的按钮**——直接渲染官方语音组件本体(麦克风钮、录音波形、转写、未就绪引导与文案全部是官方代码);原生没有语音按钮的宿主(web 端各版本)同样不渲染。
51
46
  - **性能与用量**:复刻官方 stats dock——轮次/步数 · tok/s、累计 tok · 缓存命中、上下文占用小圈,取数与格式化逐值同官方,均可点开详情面板;三形态都有。
52
47
  - **设置**:设置 → Codinput——启用接管、行号、字体、发送/换行快捷键**任意组合录制**、默认视图;未启用时**打开右侧栏的 Codinput 标签即直接启用**。
53
48
 
@@ -94,7 +89,7 @@ dsh plugin --profile web add link:/abs/path/to/DSH-Codinput
94
89
  ```jsonc
95
90
  {
96
91
  "dependencies": {
97
- "dsh-codinput": "^0.1.1" // 本地开发用 "link:/abs/path/to/DSH-Codinput"
92
+ "dsh-codinput": "^0.3.0" // 本地开发用 "link:/abs/path/to/DSH-Codinput"
98
93
  },
99
94
  "dsh": {
100
95
  "profile": {
@@ -117,6 +112,7 @@ dsh plugin --profile web add link:/abs/path/to/DSH-Codinput
117
112
 
118
113
  | 宿主版本 | 状态 |
119
114
  | --- | --- |
115
+ | 桌面版(Electron,`0.2.0-rc.2`) | ✅ 实机实测通过(官方语音输入按钮同步——授权 → 录音 → 转写端到端验证;语音插件缺席或关闭时按钮自动隐藏) |
120
116
  | `0.1.7-rc.2` | ✅ 实机实测通过(`next` 通道当前版本;候选菜单亚克力、上下文小圈挪位、dock 行布局即为此版对齐) |
121
117
  | `0.1.5-rc.2` | ✅ 实机实测通过 |
122
118
  | `0.1.6-alpha.2` | ✅ 开发基线,全部功能端到端实测通过 |
@@ -163,7 +159,7 @@ npm run typecheck
163
159
 
164
160
  本项目的部分视觉素材与样式取值**复刻自 DeepSeek Harness**(`@deepseek-ai/dsh`,MIT License,Copyright (c) 2026 DeepSeek),包括若干 SVG 图标路径(权限盾牌系列、plus / paperclip / close / arrow-up 等)与输入框卡片、原图预览层的 CSS 取值。依 MIT 许可使用,原始版权与许可声明见仓库根目录 [NOTICE](./NOTICE) 与 [LICENSE](./LICENSE)。
165
161
 
166
- 内置第三方依赖:CodeMirror 6(MIT)、marked(MIT)、DOMPurify(Apache-2.0 / MPL-2.0 双许可)。
162
+ 内置第三方依赖:CodeMirror 6(MIT)、marked(MIT)、DOMPurify(Apache-2.0 / MPL-2.0 双许可,按 Apache-2.0 使用)——压缩产物不保留许可注释,其版权与许可声明集中保留在 [NOTICE](./NOTICE)。
167
163
 
168
164
  ## 许可
169
165
 
package/assets/icon.png CHANGED
Binary file
package/assets/icon.svg CHANGED
@@ -1,4 +1,4 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" width="320" height="320" viewBox="0 0 320 320" fill="none" stroke="#4632de" stroke-width="6.5" stroke-linecap="round" stroke-linejoin="round">
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="320" height="320" viewBox="0 0 320 320" fill="none" stroke="#3964FE" stroke-width="6.5" stroke-linecap="round" stroke-linejoin="round">
2
2
  <!-- 左尖括号:发卡弯 + 内腿悬停收笔 + 底部小钩 -->
3
3
  <path d="M 99 204 Q 93 215 86 205 L 35 148 L 88 87 Q 96 79 104 86 L 52 147 L 84 181" />
4
4
  <!-- 右尖括号:闭合环带 -->
Binary file
Binary file
Binary file
Binary file