dsh-code 0.6.1 → 0.8.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.
Files changed (56) hide show
  1. package/README.en.md +20 -6
  2. package/README.md +20 -6
  3. package/lib/index.mjs +3952 -1315
  4. package/lib/startup.mjs +21 -9
  5. package/lib/theme-BEi4i_aN.mjs +624 -0
  6. package/lib/types/app.d.ts +108 -4
  7. package/lib/types/history.d.ts +15 -4
  8. package/lib/types/index.d.ts +49 -0
  9. package/lib/types/kernel-panels.d.ts +28 -0
  10. package/lib/types/mentions.d.ts +29 -12
  11. package/lib/types/models.d.ts +66 -0
  12. package/lib/types/permissions.d.ts +37 -0
  13. package/lib/types/presets.d.ts +2 -0
  14. package/lib/types/provider-settings.d.ts +144 -0
  15. package/lib/types/questions.d.ts +2 -0
  16. package/lib/types/render/animations.d.ts +177 -2
  17. package/lib/types/render/lines.d.ts +6 -0
  18. package/lib/types/render/markdown.d.ts +3 -3
  19. package/lib/types/render/projection.d.ts +123 -3
  20. package/lib/types/render/status.d.ts +35 -24
  21. package/lib/types/render/text.d.ts +14 -7
  22. package/lib/types/render/tool-detail.d.ts +3 -1
  23. package/lib/types/render/tool-preview.d.ts +4 -1
  24. package/lib/types/session-directory.d.ts +15 -0
  25. package/lib/types/startup.d.ts +12 -4
  26. package/lib/types/store.d.ts +13 -2
  27. package/lib/types/theme-panel.d.ts +24 -0
  28. package/lib/types/theme.d.ts +158 -2
  29. package/lib/types/version.d.ts +5 -0
  30. package/package.json +1 -1
  31. package/src/app.ts +1283 -206
  32. package/src/approval.ts +11 -2
  33. package/src/history.ts +20 -5
  34. package/src/index.ts +1207 -905
  35. package/src/kernel-panels.ts +518 -419
  36. package/src/mentions.ts +57 -27
  37. package/src/models.ts +200 -66
  38. package/src/permissions.ts +85 -0
  39. package/src/presets.ts +12 -0
  40. package/src/provider-settings.ts +520 -0
  41. package/src/questions.ts +15 -5
  42. package/src/render/animations.ts +373 -2
  43. package/src/render/lines.ts +21 -6
  44. package/src/render/markdown.ts +302 -4
  45. package/src/render/projection.ts +1419 -659
  46. package/src/render/status.ts +650 -603
  47. package/src/render/text.ts +28 -9
  48. package/src/render/tool-detail.ts +81 -40
  49. package/src/render/tool-preview.ts +18 -2
  50. package/src/session-directory.ts +44 -5
  51. package/src/skills.ts +8 -4
  52. package/src/startup.ts +119 -109
  53. package/src/store.ts +26 -8
  54. package/src/theme-panel.ts +72 -0
  55. package/src/theme.ts +206 -70
  56. package/src/version.ts +16 -0
package/README.en.md CHANGED
@@ -34,15 +34,15 @@ The interface follows familiar terminal conventions, while runtime behavior cont
34
34
 
35
35
  ## 2. Quick start
36
36
 
37
- Requires Node `^22.19 || >=24`, the preview `dsh` CLI, and `DEEPSEEK_API_KEY`.
37
+ Requires Node `^22.19 || >=24` and the preview `dsh` CLI. `DEEPSEEK_API_KEY` is not a startup prerequisite: the TUI, sessions, and non-model features remain available without it; press `a` in `/model` to add an API key through the Harness credentials service.
38
38
 
39
39
  ```sh
40
40
  npm install -g @deepseek-ai/dsh dsh-code
41
41
  npm install -g pnpm
42
- dsh plugin --profile cli add dsh-code@0.6.1
42
+ dsh plugin --profile cli add dsh-code@0.8.0
43
43
  ```
44
44
 
45
- > Note: pnpm ignores packages published less than 24 hours ago, so pin `dsh-code@0.6.1` on the release day; the version can be omitted afterwards. npm installs are not affected.
45
+ > Note: pnpm ignores packages published less than 24 hours ago, so pin `dsh-code@0.8.0` on the release day; the version can be omitted afterwards. npm installs are not affected.
46
46
 
47
47
  Available launch commands:
48
48
 
@@ -91,7 +91,7 @@ Inside the TUI:
91
91
  | `/new [preset]` | Create and enter another session without restarting the terminal |
92
92
  | `/resume [id\|prefix]` | Search root sessions or all conversations; filter by cwd, order, and density |
93
93
  | `/mode [preset]` | Inspect or select the blank session's Agent composition |
94
- | `/model` | Switch among models advertised by the live LLM registry |
94
+ | `/model` | Switch among models from the live LLM registry; press `a` to manage providers and API keys |
95
95
  | `/plugin [query]` | Inspect loader entries, enabled state, module identity, and fiber phase |
96
96
  | `/permission <name>` | Change the permission preset; Shift+Tab cycles presets |
97
97
  | `/help` | Browse local commands, Harness commands, skills, and key bindings |
@@ -100,6 +100,8 @@ Inside the TUI:
100
100
  | `@` | Mention workspace files or bounded snapshots of persisted sessions |
101
101
  | `Esc` / `Ctrl+C` | Close the topmost surface or interrupt the active turn |
102
102
 
103
+ The `/model` provider panel reads only credential configuration, source, and writability facts. Typed keys stay masked and are handed directly to Harness persistence. Keys supplied by the launch environment are shown as read-only and cannot be overwritten or removed in the TUI.
104
+
103
105
  ## 4. Features
104
106
 
105
107
  ### 1. Agent and extensions
@@ -107,7 +109,7 @@ Inside the TUI:
107
109
  - Per-session Agent Presets for tools, prompt sections, skills, compaction, plan mode, and delegation
108
110
  - Live slash-command and skill discovery from shared Harness registries
109
111
  - Read-only Cordis loader diagnostics through `/plugin`
110
- - Model routing through the live LLM registry, restored per persisted session
112
+ - Model routing through the live LLM registry, restored per persisted session; `/model` can add or rotate keys, remove writable keys, and delete user-added provider profiles
111
113
  - Plans, goals, todos, permissions, sandbox state, subagents, and runtime steering
112
114
 
113
115
  ### 2. Sessions and context
@@ -133,11 +135,23 @@ Inside the TUI:
133
135
  - Folded thinking, terminal Markdown, compact tool summaries, and full structured details
134
136
  - Two-row status bar with mode and context on the second row, a blue context-occupancy meter, and all-blue accents
135
137
  - Submissions while a turn runs appear immediately as ordinary prompt rows; Delete cancels the newest queued message, and busy states use the web StateDot chase animation
136
- - Replies align with the input cursor, and the welcome wordmark is brighter
138
+ - Replies align with the input cursor, and the welcome header shows the installed version with the bilingual slogan “Into the Unknown 探索未至之境”
137
139
  - Ctrl+O exclusive history inspection with entry navigation and complete vertical scrolling
138
140
  - Width-safe CJK/control-character handling, compact-terminal degradation, and debounced resize replay
139
141
  - Stable bottom order: content or panel → notice → composer → status
140
142
 
143
+ #### DeepSeek model-switch animations
144
+
145
+ Switching to a DeepSeek route, or changing reasoning effort on the same route, randomly plays Wave, Aurora, or Pulse across the composer without repeating the previous style. Flash models use the single-band tier; other DeepSeek models use the richer multi-band tier.
146
+
147
+ | Style | Flash | DeepSeek |
148
+ | --- | --- | --- |
149
+ | Wave | One blue crest sweeps left to right, 1.2s | Two offset crests, 1.5s |
150
+ | Aurora | Two blue light bands drift sinusoidally, 1.5s | Three differently hued bands, 1.8s |
151
+ | Pulse | One ring expands from the composer center, 1.1s | Two sequential expanding rings, 1.45s |
152
+
153
+ The animation runs locally in the composer at about 30 FPS. Its background and border return to rest afterward while the DeepSeek-tier prompt marker remains.
154
+
141
155
  ## 5. How DSH-Code integrates with DSH
142
156
 
143
157
  ### 1. Runtime composition
package/README.md CHANGED
@@ -34,15 +34,15 @@ DSH-Code 保留这套结构,并补充适合编码任务的终端工作流。
34
34
 
35
35
  ## 二、快速开始
36
36
 
37
- 需要 Node `^22.19 || >=24`、预览版 `dsh` CLI,以及 `DEEPSEEK_API_KEY`。
37
+ 需要 Node `^22.19 || >=24` 和预览版 `dsh` CLI。`DEEPSEEK_API_KEY` 不是启动前置条件:未配置时仍可进入 TUI、查看会话和使用非模型功能;在 `/model` 中按 `a` 可通过 Harness credentials 服务添加 API key。
38
38
 
39
39
  ```sh
40
40
  npm install -g @deepseek-ai/dsh dsh-code
41
41
  npm install -g pnpm
42
- dsh plugin --profile cli add dsh-code@0.6.1
42
+ dsh plugin --profile cli add dsh-code@0.8.0
43
43
  ```
44
44
 
45
- > 提示:pnpm 会忽略发布不足 24 小时的包,因此发布首日请使用精确版本 `dsh-code@0.6.1`;24 小时后可省略版本号。npm 安装不受此限制。
45
+ > 提示:pnpm 会忽略发布不足 24 小时的包,因此发布首日请使用精确版本 `dsh-code@0.8.0`;24 小时后可省略版本号。npm 安装不受此限制。
46
46
 
47
47
  可用的启动指令:
48
48
  ```sh
@@ -90,7 +90,7 @@ dsh --profile cli --session my-id # 使用指定 id 新建会话
90
90
  | `/new [preset]` | 不重启终端,创建并进入另一个会话 |
91
91
  | `/resume [id\|前缀]` | 搜索根会话或全部对话,并按 cwd、排序和密度筛选 |
92
92
  | `/mode [preset]` | 检查或选择空会话的 Agent 组合 |
93
- | `/model` | 在实时 LLM 注册表提供的模型间切换 |
93
+ | `/model` | 在实时 LLM 注册表提供的模型间切换;按 `a` 管理 provider 与 API key |
94
94
  | `/plugin [query]` | 检查 loader 条目、启用状态、模块身份和 fiber 阶段 |
95
95
  | `/permission <name>` | 切换权限预设;Shift+Tab 可循环切换 |
96
96
  | `/help` | 浏览本地命令、Harness 命令、技能和快捷键 |
@@ -99,6 +99,8 @@ dsh --profile cli --session my-id # 使用指定 id 新建会话
99
99
  | `@` | 引用工作区文件或持久会话的有界快照 |
100
100
  | `Esc` / `Ctrl+C` | 关闭最上层界面或中断当前 turn |
101
101
 
102
+ `/model` 的 provider 面板只读取 credential 的已配置状态、来源和可写性;输入内容始终遮蔽并直接交给 Harness 持久化。由启动环境提供的 key 会标记为只读,不能在 TUI 中覆盖或移除。
103
+
102
104
  ## 四、功能
103
105
 
104
106
  ### 1. Agent 与扩展
@@ -106,7 +108,7 @@ dsh --profile cli --session my-id # 使用指定 id 新建会话
106
108
  - 每会话 Agent Preset:组合工具、提示词、技能、上下文压缩、plan mode 与委派能力
107
109
  - 从共享 Harness 注册表实时发现斜杠命令和用户技能
108
110
  - 通过 `/plugin` 只读诊断 Cordis loader
109
- - 从实时 LLM 注册表路由模型,并按持久会话恢复选择
111
+ - 从实时 LLM 注册表路由模型,并按持久会话恢复选择;`/model` 可添加或轮换 key、移除可写 key,以及删除用户添加的 provider profile
110
112
  - 支持 plan、goal、todo、权限、sandbox、subagent 与运行中 steering
111
113
 
112
114
  ### 2. 会话与上下文
@@ -132,11 +134,23 @@ dsh --profile cli --session my-id # 使用指定 id 新建会话
132
134
  - 思考折叠、终端 Markdown、紧凑工具摘要与完整结构化详情
133
135
  - 双行状态栏:mode 与 context 在第二行,context 为蓝色进度条,全蓝强调
134
136
  - 运行中提交即时显示为普通提示词行,Delete 取消排队消息,busy 使用 web StateDot 八点追逐动画
135
- - 回复与输入框光标对齐,欢迎头字标提亮
137
+ - 回复与输入框光标对齐,欢迎头显示已安装版本与双语 slogan“Into the Unknown 探索未至之境”
136
138
  - Ctrl+O 独占历史检查,支持切换条目与完整纵向滚动
137
139
  - CJK/控制字符宽度安全、短终端主动降级、缩放防抖重放
138
140
  - 固定底部顺序:内容或面板 → notice → 输入框 → 状态栏
139
141
 
142
+ #### DeepSeek 模型切换动画
143
+
144
+ 切换到 DeepSeek 路由,或在同一路由切换 reasoning effort 时,输入框会随机播放 Wave、Aurora 或 Pulse;相邻两次不会重复同一种样式。Flash 模型使用单波段档位,其他 DeepSeek 模型使用更丰富的多波段档位。
145
+
146
+ | 样式 | Flash | DeepSeek |
147
+ | --- | --- | --- |
148
+ | Wave | 单个蓝色波峰从左向右扫过,1.2s | 两个错开的波峰,1.5s |
149
+ | Aurora | 两条蓝色光带正弦漂移,1.5s | 三条不同色调光带,1.8s |
150
+ | Pulse | 一个圆环从输入框中心扩散,1.1s | 两个先后扩散的圆环,1.45s |
151
+
152
+ 动画以约 30 FPS 在输入框局部运行;结束后背景和边框恢复静态,DeepSeek 档位提示符继续保留。
153
+
140
154
  ## 五、DSH-Code 如何接入 DSH
141
155
 
142
156
  ### 1. 运行时组合