dsh-codinput 0.2.0 → 0.3.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 +17 -0
- package/README.en.md +4 -2
- package/README.md +4 -2
- package/lib/client.js +36 -26
- package/package.json +1 -1
- package/src/client/components/Toolbar.tsx +24 -6
- package/src/client/components/VoiceActivity.tsx +172 -0
- package/src/client/host-types.ts +18 -0
- package/src/client/i18n.ts +21 -0
- package/src/client/services.ts +5 -0
- package/src/client/styles.ts +10 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,23 @@
|
|
|
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.0] — 2026-10-02
|
|
6
|
+
|
|
7
|
+
官方桌面版语音输入同步:原生输入框有语音按钮时,Codinput 在一模一样的位置渲染一模一样的按钮。
|
|
8
|
+
|
|
9
|
+
### 新增
|
|
10
|
+
|
|
11
|
+
- **语音输入按钮同步(官方桌面版兼容)**:官方桌面版(Electron,`0.2.0-rc.2` 起)的输入框带语音输入按钮。Codinput 开启时在完全相同的位置(工具行右侧、模型选择器与发送钮之间)渲染**同一个官方语音组件**——`conversation.input.activity` 槽位条目原样渲染:麦克风触发钮、录音波形、转写、未就绪引导弹窗与中英文案全部是官方代码,官方后续更新自动跟随。录音展开时工具行行为也与官方一致(左侧工具与模型控件让位、capture 行接管整行、发送钮保留)。
|
|
12
|
+
|
|
13
|
+
### 说明
|
|
14
|
+
|
|
15
|
+
- **检测即兼容**:宿主未挂载语音插件(web 端各版本、桌面版语音插件关闭)时该槽位无条目,Codinput 同样不渲染按钮——与原生输入框行为一致;条目出现/消失经槽位订阅实时跟随(设置里开关语音插件即时生效)。按钮文案走官方 `voice-input` 词典(听写 / 开始录音 / 识别中… 等),不自备译文。
|
|
16
|
+
- **桌面版实测(Electron `0.2.0-rc.2`)**:授权麦克风 → 录音(波形)→ 停止 → 官方转写链路端到端通过;本地模型首次唤醒可能报「Unable to decode audio data」,重试即成功(官方输入框同样如此)。展开态布局、Escape/失焦取消、转写空结果与失败反馈均与官方一致。
|
|
17
|
+
- **web 宿主回归**:`0.1.7-rc.2` 实测无语音插件时按钮不渲染、工具行无任何变化,既往功能不受影响。
|
|
18
|
+
- 宿主兼容其余不变:`0.1.7-rc.2`(next)实测通过,`0.1.5-rc.2` / `0.1.6-alpha.2` 沿用既往结论;升级宿主后建议按 [TESTING.md](./TESTING.md) 冒烟。
|
|
19
|
+
|
|
20
|
+
[0.3.0]: https://github.com/Witherwithwinter/DSH-Codinput/compare/v0.2.0...v0.3.0
|
|
21
|
+
|
|
5
22
|
## [0.2.0] — 2026-09-29
|
|
6
23
|
|
|
7
24
|
品牌换新 + 一批交互补全:图片原图预览、发送/停止、侧栏 `/codinput` 退出与自动启用,以及输入卡片与数据行对官方布局的逐值对齐。
|
package/README.en.md
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
<p align="center"><a href="./README.md">中文</a> | English</p>
|
|
16
16
|
|
|
17
|
-
<p align="center">
|
|
17
|
+
<p align="center">An editor-style input panel, right where the DeepSeek Harness chat composer used to be.</p>
|
|
18
18
|
|
|
19
19
|

|
|
20
20
|
|
|
@@ -48,6 +48,7 @@
|
|
|
48
48
|
- **`/` `@`**: 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
49
|
- **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
50
|
- **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).
|
|
51
|
+
- **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
52
|
- **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
53
|
- **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
54
|
|
|
@@ -94,7 +95,7 @@ To pin a version or maintain the profile by hand, the manual equivalent of **Met
|
|
|
94
95
|
```jsonc
|
|
95
96
|
{
|
|
96
97
|
"dependencies": {
|
|
97
|
-
"dsh-codinput": "^0.
|
|
98
|
+
"dsh-codinput": "^0.3.0" // for local development: "link:/abs/path/to/DSH-Codinput"
|
|
98
99
|
},
|
|
99
100
|
"dsh": {
|
|
100
101
|
"profile": {
|
|
@@ -117,6 +118,7 @@ The host publishes **rc** builds on npm (`latest` is the current stable rc, `nex
|
|
|
117
118
|
|
|
118
119
|
| Host version | Status |
|
|
119
120
|
| --- | --- |
|
|
121
|
+
| 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
122
|
| `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
123
|
| `0.1.5-rc.2` | ✅ Verified on a real instance |
|
|
122
124
|
| `0.1.6-alpha.2` | ✅ Current development baseline; every feature verified end to end |
|
package/README.md
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
<p align="center">中文 | <a href="./README.en.md">English</a></p>
|
|
16
16
|
|
|
17
|
-
<p align="center">把 DeepSeek Harness
|
|
17
|
+
<p align="center">把 DeepSeek Harness 的聊天输入框,换成编辑器式的输入面板。</p>
|
|
18
18
|
|
|
19
19
|

|
|
20
20
|
|
|
@@ -48,6 +48,7 @@
|
|
|
48
48
|
- **`/` `@` 触发管线**:完全走官方链路(track → 官方 menu store → 逐项复刻的 MenuView),候选菜单、钻取、crumbs、骨架屏与官方逐一对齐;`/codinput` 按字典序排入指令节首,其余保持官方使用序。
|
|
49
49
|
- **模型与权限**:模型与思考强度读官方共享目录(与 `/model` 同一状态源);权限为官方三预设,含完全权限的风险确认模态。
|
|
50
50
|
- **附件**:slash「添加 · 文件」、**粘贴图片**、**拖文件进卡片**三条路径;点图片缩略图弹**原图预览**(官方 ImageLightbox 同构);上传中/失败有状态芯片,失败可整卡重试。
|
|
51
|
+
- **语音输入同步(官方桌面版)**:官方桌面版的输入框带语音按钮时,Codinput 在一模一样的位置渲染**一模一样的按钮**——直接渲染官方语音组件本体(麦克风钮、录音波形、转写、未就绪引导与文案全部是官方代码);原生没有语音按钮的宿主(web 端各版本)同样不渲染。
|
|
51
52
|
- **性能与用量**:复刻官方 stats dock——轮次/步数 · tok/s、累计 tok · 缓存命中、上下文占用小圈,取数与格式化逐值同官方,均可点开详情面板;三形态都有。
|
|
52
53
|
- **设置**:设置 → Codinput——启用接管、行号、字体、发送/换行快捷键**任意组合录制**、默认视图;未启用时**打开右侧栏的 Codinput 标签即直接启用**。
|
|
53
54
|
|
|
@@ -94,7 +95,7 @@ dsh plugin --profile web add link:/abs/path/to/DSH-Codinput
|
|
|
94
95
|
```jsonc
|
|
95
96
|
{
|
|
96
97
|
"dependencies": {
|
|
97
|
-
"dsh-codinput": "^0.
|
|
98
|
+
"dsh-codinput": "^0.3.0" // 本地开发用 "link:/abs/path/to/DSH-Codinput"
|
|
98
99
|
},
|
|
99
100
|
"dsh": {
|
|
100
101
|
"profile": {
|
|
@@ -117,6 +118,7 @@ dsh plugin --profile web add link:/abs/path/to/DSH-Codinput
|
|
|
117
118
|
|
|
118
119
|
| 宿主版本 | 状态 |
|
|
119
120
|
| --- | --- |
|
|
121
|
+
| 桌面版(Electron,`0.2.0-rc.2`) | ✅ 实机实测通过(官方语音输入按钮同步——授权 → 录音 → 转写端到端验证;语音插件缺席或关闭时按钮自动隐藏) |
|
|
120
122
|
| `0.1.7-rc.2` | ✅ 实机实测通过(`next` 通道当前版本;候选菜单亚克力、上下文小圈挪位、dock 行布局即为此版对齐) |
|
|
121
123
|
| `0.1.5-rc.2` | ✅ 实机实测通过 |
|
|
122
124
|
| `0.1.6-alpha.2` | ✅ 开发基线,全部功能端到端实测通过 |
|