dsh-code 0.1.0 → 0.2.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 CHANGED
@@ -7,9 +7,14 @@ A Claude-Code-style interactive terminal (TUI) bundle for [DeepSeek Harness](htt
7
7
  ## What you get
8
8
 
9
9
  - DeepSeek-blue banner: the whale wordmark rasterized half-block from the exact FishLogo path, in a compact content-hugging header
10
- - Live transcript streamed from the durable session log: user prompts, streaming assistant text, compact tool-call rows with running/done/error marks, todo snapshots
10
+ - Live transcript streamed from the durable session log: user prompts, streaming assistant text, compact tool-call and slash-command rows with running/done/error marks, todo snapshots
11
+ - **Tool approval y/n bar**: when the agent asks for permission (a sandbox escalation, a hook's `ask` decision), an amber bar shows the reason plus the paired command line; `y` allows once, `n` rejects
12
+ - **`/model` panel**: list every provider route the live `llm` registry advertises, switch the session's model for the next step; a resumed session restores its own last model
13
+ - **Session resume**: `--resume <id|prefix>` continues a persisted session, `--continue` picks the newest one for the working directory; the full transcript replays from the log and appends to the same durable session
14
+ - **Slash-command passthrough**: every command registered in the shared `ctx.commands` registry (the same surface the web composer dispatches) is executable from the terminal, with a completion menu on `/`; user-invocable skills join the same menu (marked `skill`), and an unknown `/name` falls through to the prompt so the host's skill injection picks it up
15
+ - **Todo panel**: the live todo list renders inline with done/active/pending counts and three-state markers, cleared at each fresh turn (mirroring the web TodoPanel)
16
+ - Input with history (↑/↓), cursor editing (←/→, Ctrl+A/E/U), Tab completion for slash commands and skills; submitting while the agent runs steers the live turn (consumed at the next step boundary), `Esc` or Ctrl+C interrupts it, Ctrl+C on an empty idle input exits, Ctrl+D refuses to exit mid-turn
11
17
  - A blended status line: Claude-Code-style identity facts (model, working directory, git branch, session) beside the web composer's figures (turns/steps, llm and tool wall time, cache hit, token totals)
12
- - `/help`, `/clear`, `/quit` local commands; Ctrl+C/Ctrl+D quits after flushing the session
13
18
 
14
19
  ## Install
15
20
 
@@ -24,7 +29,10 @@ dsh plugin --profile cli add file:C:/path/to/dsh-code # local checkout
24
29
  Then:
25
30
 
26
31
  ```sh
27
- dsh --profile cli
32
+ dsh --profile cli # fresh session
33
+ dsh --profile cli --continue # resume the newest session in this directory
34
+ dsh --profile cli --resume abc123 # resume by session id or unique prefix
35
+ dsh --profile cli --session my-id # fresh session under an explicit id
28
36
  ```
29
37
 
30
38
  Set `DEEPSEEK_API_KEY` in your environment (or a `.env` in the launch directory or `$DSH_HOME`).
package/README.zh.md CHANGED
@@ -7,9 +7,14 @@
7
7
  ## 功能
8
8
 
9
9
  - DeepSeek 蓝横幅:鲸鱼字标由官方 FishLogo 精确路径半块栅格化,头部贴内容宽度、紧凑不占满
10
- - 实时会话流:直接从持久会话日志投影——用户输入、流式助手文本、紧凑工具调用行(运行/完成/出错标记)、todo 快照
10
+ - 实时会话流:直接从持久会话日志投影——用户输入、流式助手文本、紧凑工具调用/斜杠命令行(运行/完成/出错标记)、todo 快照
11
+ - **工具审批 y/n 条**:agent 请求许可时(sandbox 升级、hook 的 ask 决策),琥珀色审批条显示原因与配对命令行;`y` 允许一次、`n` 拒绝
12
+ - **`/model` 面板**:列出 `llm` 注册表的全部 provider 路由,为下一步切换会话模型;恢复的会话自动还原其上次的模型
13
+ - **会话恢复**:`--resume <id|前缀>` 续接持久会话,`--continue` 取当前目录最新一个;完整转录从日志重放,续写同一持久会话
14
+ - **斜杠命令透传**:共享 `ctx.commands` 注册表(Web 作曲栏同一分发面)里的命令都可在终端执行,`/` 弹出补全菜单;用户可调用技能也进同一菜单(标注 `skill`),未知 `/name` 回退为普通提示词、由 host 的技能注入接管
15
+ - **todo 面板**:实时 todo 列表内联渲染,含 done/active/pending 计数与三态标记,每个新 turn 清空(对齐 Web TodoPanel)
16
+ - 输入组件:历史(↑/↓)、光标编辑(←/→、Ctrl+A/E/U)、斜杠命令与技能 Tab 补全;运行中提交即 steering(下一个 step 边界消费),`Esc` 或 Ctrl+C 中断本轮,Ctrl+C 在空闲空输入时退出,Ctrl+D 运行中拒绝退出
11
17
  - 融合型状态栏:Claude Code 式身份信息(模型、工作目录、git 分支、会话)+ Web 作曲栏指标(轮数/步数、llm 与 tool 累计时长、缓存命中、token 总量)
12
- - 本地命令 `/help`、`/clear`、`/quit`;Ctrl+C/Ctrl+D 退出前先 flush 会话
13
18
 
14
19
  ## 安装
15
20
 
@@ -24,7 +29,10 @@ dsh plugin --profile cli add file:C:/path/to/dsh-code # 本地目录
24
29
  然后:
25
30
 
26
31
  ```sh
27
- dsh --profile cli
32
+ dsh --profile cli # 全新会话
33
+ dsh --profile cli --continue # 恢复本目录最新的会话
34
+ dsh --profile cli --resume abc123 # 按会话 id 或唯一前缀恢复
35
+ dsh --profile cli --session my-id # 以显式 id 建新会话
28
36
  ```
29
37
 
30
38
  在环境变量(或启动目录 / `$DSH_HOME` 的 `.env`)里设置 `DEEPSEEK_API_KEY`。
package/cordis.patch.yml CHANGED
@@ -1,8 +1,11 @@
1
- # The dsh-tui bundle patch: the interactive terminal app over dsh-base.
2
- # It mounts no Host, HTTP server, or browser plugin. The runner creates one
3
- # Agent through the core registry, renders the live session stream as an
4
- # Ink TUI (DeepSeek blue, whale wordmark), and folds submitted prompts back
5
- # into the same durable session until the user quits.
1
+ # The dsh-code bundle patch: the interactive terminal app over dsh-base.
2
+ # It mounts no Host, HTTP server, or browser plugin. An ordinary provider
3
+ # plugin injects `cmdlineArgs`, parses this app's flags (`--resume`, `--continue`,
4
+ # `--session`) and its --help, then the runner creates (or resumes) one Agent
5
+ # through the core registry, renders the live session stream as an Ink TUI
6
+ # (DeepSeek blue, whale wordmark), answers approval asks with a y/n bar,
7
+ # dispatches slash commands through the shared registry, and folds submitted
8
+ # prompts back into the same durable session until the user quits.
6
9
 
7
10
  - id: system-prompt
8
11
  config:
@@ -24,5 +27,13 @@
24
27
  - id: code-runtime
25
28
  name: '@deepseek-ai/dsh-code-runtime-worker-thread'
26
29
 
30
+ - id: tui-startup
31
+ name: 'dsh-code/startup'
32
+
33
+ # Reads its startup through lazy config, which waits for the tuiStartup
34
+ # provider the row above publishes from the parsed command line.
27
35
  - id: tui-runner
28
36
  name: 'dsh-code'
37
+ inject: [tuiStartup]
38
+ config:
39
+ startup: !!js ctx.tuiStartup.startup