dsh-code 1.0.0 → 1.0.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/README.en.md CHANGED
@@ -1,265 +1,278 @@
1
- # DSH-Code
2
-
3
- English | [中文](README.md)
4
-
5
- <p align="center"><img src="docs/pictures/1.png" width="95%" alt="DSH-Code terminal with slash-command completion"></p>
6
-
7
- <p align="center"><img alt="Typing SVG" src="https://readme-typing-svg.herokuapp.com?font=JetBrains+Mono&amp;weight=500&amp;size=22&amp;duration=4000&amp;pause=700&amp;color=4176E6&amp;center=true&amp;vCenter=true&amp;width=680&amp;lines=DeepSeek+Harness+Code;DSH+%E5%86%85%E6%A0%B8%E7%9A%84%E7%BB%88%E7%AB%AF%E7%BC%96%E7%A0%81%E7%95%8C%E9%9D%A2"></p>
8
- <p align="center">
9
- <a href="https://github.com/deepseek-ai/deepseek-harness"><img alt="DeepSeek Harness" src="https://img.shields.io/badge/DeepSeek-Harness-4176E6?style=for-the-badge&amp;logo=deepseek&amp;logoColor=white&amp;labelColor=1c1917"></a>
10
- <a href="https://www.npmjs.com/package/@deepseek-ai/dsh"><img alt="dsh version" src="https://img.shields.io/badge/dsh-0.1.0--rc.8-4176E6?style=for-the-badge&amp;logo=deepseek&amp;logoColor=white&amp;labelColor=1c1917"></a>
11
- <a href="https://github.com/UNLINEARITY/dsh-code/stargazers"><img alt="GitHub stars" src="https://img.shields.io/github/stars/UNLINEARITY/dsh-code?label=Stars&amp;style=for-the-badge&amp;logo=github&amp;logoColor=white&amp;color=4176E6&amp;labelColor=1c1917"></a>
12
- <a href="https://www.npmjs.com/package/dsh-code"><img alt="npm version" src="https://img.shields.io/npm/v/dsh-code?label=npm&amp;style=for-the-badge&amp;logo=npm&amp;color=cb3837&amp;labelColor=1c1917"></a>
13
- <a href="https://github.com/UNLINEARITY/dsh-code/blob/main/LICENSE"><img alt="License" src="https://img.shields.io/github/license/UNLINEARITY/dsh-code?label=License&amp;style=for-the-badge&amp;logo=opensourceinitiative&amp;color=4176E6&amp;labelColor=1c1917"></a>
14
- </p>
15
-
16
- **DSH-Code is a terminal coding interface for [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) (`dsh`).** It runs as an out-of-tree bundle over the official `@deepseek-ai/dsh-base` and uses the same Agent, Session, tool, command, skill, permission, sandbox, compaction, and plugin services as the Harness Web UI.
17
-
18
- DSH-Code does not implement a separate agent loop. It adds a coding-focused TUI to the DSH runtime, drawing on the session handling of [Codex CLI](https://github.com/openai/codex) and the terminal interaction patterns of [Claude Code](https://code.claude.com/docs/en/overview).
19
-
20
- ---
21
-
22
- ## 1. Overview
23
-
24
- DeepSeek Harness treats models, tools, storage, policies, and interfaces as plugins registered through Cordis. Durable session events record the conversation and runtime state needed for replay.
25
-
26
- DSH-Code keeps that structure and adds a terminal workflow for coding tasks.
27
-
28
- | Reference | Used in DSH-Code |
29
- | --- | --- |
30
- | **DeepSeek Harness** | Plugin composition, scoped services, Agent Presets, durable sessions, tools, skills, policies, sandboxing, and delegation |
31
- | **Codex CLI** | Session navigation, bounded overlays, history inspection, stable bottom layout, and resize handling |
32
- | **Claude Code** | Slash-command discovery, thinking folds, approvals, questions, and turn steering |
33
-
34
- The interface follows familiar terminal conventions, while runtime behavior continues to come from DSH services and configuration.
35
-
36
- ## 2. Quick start
37
-
38
- Requires Node `^22.19 || >=24` and the preview `dsh` CLI (current line: `@deepseek-ai/dsh@0.1.0-rc.8`). `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.
39
-
40
- ### 1. Install or update
41
-
42
- First install and updates use the same commands:
43
-
44
- ```sh
45
- npm install -g @deepseek-ai/dsh@0.1.0-rc.8 dsh-code@1.0.0
46
- npm install -g pnpm
47
- dsh plugin --profile cli add dsh-code@1.0.0
48
- ```
49
-
50
- > Note: pnpm ignores packages published less than 24 hours ago, so pin `dsh-code@1.0.0` on the release day; the version can be omitted afterwards. npm installs are not affected.
51
- >
52
- > Version alignment: dsh-code 1.0.x builds against the dsh `0.1.0-rc.8` plugin line (all peer dependencies are `^0.1.0-rc.8`). Keep the global dsh CLI and dsh-code on the same release line so the host and the plugin stay aligned.
53
-
54
- ### DSH-Code wrapper
55
-
56
- DSH-Code is a terminal wrapper over DeepSeek Harness. It does not replace Harness services for Agent, sessions, models, tools, approvals, or persistence; the `cli` profile composes those services with the terminal bundle. `deepseek` and `dsh-code` are convenience aliases for `dsh --profile cli`.
57
-
58
- ### 2. launching
59
-
60
- Available launch commands:
61
-
62
- ```sh
63
- deepseek
64
- dsh --profile cli
65
- dsh-code
66
- ```
67
-
68
- `dsh --profile cli`, `deepseek`, and `dsh-code` are parallel launch commands. `deepseek` and `dsh-code` are global aliases for `dsh --profile cli`; all following arguments are forwarded, for example `deepseek --resume abc123`.
69
-
70
- > DeepSeek Harness is currently a developer preview and may introduce compatibility-breaking changes. DSH-Code tracks that evolving plugin surface.
71
-
72
- For installation, native-module, and plugin-loading issues, see the [troubleshooting guide](docs/problems.md).
73
-
74
- ## 3. Terminal interaction
75
-
76
- ### Basics
77
-
78
- DSH-Code keeps one Ink owner for the lifetime of the process. `/new` and `/resume` replace the active Agent, not the terminal itself. If a switch is requested while the Agent is busy, it waits for the turn to finish; the newest request wins, and a failed target leaves the current session untouched.
79
-
80
- Dynamic content is deliberately bounded. Streaming output, thinking, approvals, questions, `/help`, `/model`, `/mode`, `/resume`, `/plugin`, and Ctrl+O all share terminal-aware viewport rules. The composer remains immediately above the status line. After a resize, the screen is redrawn from the stored transcript once the new width settles.
81
-
82
- Use `/mode` before the first turn to inspect or select the session's Agent Preset.
83
-
84
- <p align="center"><img src="docs/pictures/2.png" width="95%" alt="Per-session Agent Preset picker"></p>
85
-
86
- Use `/resume` to search persisted sessions without restarting the TUI.
87
-
88
- <p align="center"><img src="docs/pictures/3.png" width="95%" alt="Searchable session resume picker"></p>
89
-
90
- ### Common commands
91
-
92
- ```sh
93
- dsh --profile cli # start a fresh standard session
94
- dsh --profile cli --mode code # start with an Agent Preset
95
- dsh --profile cli --continue # resume the newest session for this directory
96
- dsh --profile cli --resume abc123 # resume by id or unique prefix
97
- dsh --profile cli --session my-id # start a fresh session with an explicit id
98
- deepseek setup # mount the current release in the cli profile
99
- deepseek doctor # check Node, DSH, profile, and composition
100
- deepseek completion powershell # generate shell completion
101
- deepseek update # check available versions only
102
- deepseek update --apply # explicitly update the global install
103
- ```
104
-
105
- Inside the TUI:
106
-
107
- | Action | Purpose |
108
- | --- | --- |
109
- | `/new [preset]` | Create and enter another session without restarting the terminal |
110
- | `/resume [id\|prefix]` | Search root sessions or all conversations; filter by cwd, order, and density |
111
- | `/fork [event-seq]` | Create a resumable ordinary fork from a completed turn containing the event |
112
- | `/mode [preset]` | Inspect or select the blank session's Agent composition |
113
- | `/model` | Switch among live-registry models; press `a` to manage providers, then `Tab` to edit URL, models, and windows |
114
- | `/plugin [query]` | Inspect loader entries, enabled state, module identity, and fiber phase |
115
- | `/diff [--staged\|ref]` | Inspect the complete Git diff by file; left/right switches files |
116
- | `/review [--staged\|ref]` | Submit a bounded code review after switching to `read-only` permissions |
117
- | `/copy` | Copy the latest complete assistant response |
118
- | `/permission <name>` | Change the permission preset; Shift+Tab cycles presets |
119
- | `/help` | Browse local commands, Harness commands, skills, and key bindings |
120
- | `Ctrl+O` | Open the exclusive history detail view; switch entries and scroll all content |
121
- | `Ctrl+R` | Fold or reveal model reasoning |
122
- | `@` | Mention workspace files or bounded snapshots of persisted sessions |
123
- | `Esc` / `Ctrl+C` | Close the topmost surface or interrupt the active turn |
124
-
125
- Press `a` in `/model` to manage providers; press `Tab` on a provider to edit its endpoint URL, explicit model allow-list, and per-model context/output windows. Typed API keys stay masked and are handed directly to Harness persistence. Keys supplied by the launch environment are read-only and cannot be overwritten or removed in the TUI.
126
-
127
- ## 4. Features
128
-
129
- ### 1. Agent and extensions
130
-
131
- - Per-session Agent Presets for tools, prompt sections, skills, compaction, plan mode, and delegation
132
- - Live slash-command and skill discovery from shared Harness registries
133
- - Read-only Cordis loader diagnostics through `/plugin`
134
- - Model routing through the live LLM registry, restored per persisted session; `/model` can add or rotate keys, remove writable keys, delete user-added provider profiles, and set an endpoint, explicit model allow-list, and token windows
135
- - Plans, goals, todos, permissions, sandbox state, subagents, and runtime steering
136
-
137
- ### 2. Sessions and context
138
-
139
- - `/new`, `/resume`, `/fork`, `--continue`, and explicit session identifiers without remounting Ink
140
- - Codex-style searchable resume panel with root/all-conversation, cwd, order, and density filters
141
- - Bare launches defer session creation until your first real input; quitting early leaves nothing behind
142
- - Global input recall: Up/Down walks past prompts across sessions, and `/history` searches and fills the composer
143
- - Lazy title snapshots and explicitly loaded, fully scrollable transcripts
144
- - Read-only subagent conversation inspection and bounded `@` session references
145
- - Initial prompts and repeated `--image`; Harness persists image bytes in its attachment store and records content-addressed references in session events
146
- - Markdown export, persistent titles, context occupancy, cache, token, TTFT, and timing metrics
147
-
148
- ### 3. Approvals and interaction
149
-
150
- - One-shot tool approval bar for sandbox escalation and hook `ask` decisions
151
- - Structured `ask_user_question` and plan-review menus with multi-select and custom answers
152
- - Turn steering at the next step boundary plus explicit interruption semantics
153
- - Independent Agent mode, plan state, permission preset, goal, and sandbox indicators
154
-
155
- ### 4. Terminal rendering
156
-
157
- - Append-only settled transcript with bounded mutable streaming output
158
- - Folded thinking, terminal Markdown, compact tool summaries, and full structured details
159
- - Two-row status bar with mode and context on the second row, a blue context-occupancy meter, and all-blue accents
160
- - 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
161
- - Replies align with the input cursor, and the welcome header shows the installed version with the bilingual slogan “Into the Unknown 探索未至之境”
162
- - Ctrl+O exclusive history inspection with entry navigation and complete vertical scrolling
163
- - Width-safe CJK/control-character handling, compact-terminal degradation, and debounced resize replay
164
- - Stable bottom order: content or panel → notice → composer → status
165
-
166
- #### DeepSeek model-switch animations
167
-
168
- 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.
169
-
170
- | Style | Flash | DeepSeek |
171
- | --- | --- | --- |
172
- | Wave | One blue crest sweeps left to right, 1.2s | Two offset crests, 1.5s |
173
- | Aurora | Two blue light bands drift sinusoidally, 1.5s | Three differently hued bands, 1.8s |
174
- | Pulse | One ring expands from the composer center, 1.1s | Two sequential expanding rings, 1.45s |
175
-
176
- 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.
177
-
178
- ## 5. How DSH-Code integrates with DSH
179
-
180
- ### 1. Runtime composition
181
-
182
- DSH-Code reads the live Harness registries instead of maintaining separate copies. Model adapters, tool providers, skill sources, commands, permission policies, persistence backends, sandboxes, and subagent providers can be added or replaced through DSH composition.
183
-
184
- `/plugin` provides a read-only view of the current Cordis loader state.
185
-
186
- ### 2. Session-scoped Agent Presets
187
-
188
- The Host owns shared infrastructure—registries, persistence, session queries, permissions, and sandbox policy—while each session receives an isolated Agent scope composed from an **Agent Preset**:
189
-
190
- - `standard` the full general-purpose coding agent
191
- - `code` — Code Mode / PTC-oriented multi-operation workflows
192
- - `minimal` only persistent shell access and `str_replace_editor`
193
- - `cordis` — the full agent plus runtime inspection and preset-authoring guidance
194
- - user presets your own tools, prompt sections, skills, compaction, plan mode, and subagent behavior
195
-
196
- Use `/mode` before the first turn or start directly with `--mode <preset>`. The selected preset is written to the session and restored on resume.
197
-
198
- ### 3. Session history and replay
199
-
200
- Prompts, streamed chunks, tool calls and results, model choices, plan state, permissions, titles, and preset selections are projected from durable Session events. Resume, export, history inspection, context accounting, and terminal replay use the same record.
201
-
202
- React state is limited to temporary interface details such as the input draft, cursor, open panel, selection, and scroll position.
203
-
204
- ```text
205
- dsh profile
206
- └─ Host plane: registries · persistence · query · permissions · sandbox
207
- ├─ Agent session A + preset code
208
- ├─ Agent session B + preset minimal
209
- └─ DSH-Code TUI
210
- durable events pure projection → append-only transcript
211
- └→ bounded panels → composer → status
212
- ```
213
-
214
- ## 6. Development
215
-
216
- ```sh
217
- pnpm install
218
- pnpm test
219
- pnpm typecheck
220
- pnpm build
221
- pnpm run gen:whale # regenerate src/whale-glyph.ts from the vendored logo path
222
- ```
223
-
224
- The whale glyph is generated from the DeepSeek FishLogo geometry vendored in `scripts/fish-logo.ts` (source: DeepSeek Harness, MIT).
225
-
226
- ### 1. Source development installation
227
-
228
- For a local checkout:
229
-
230
- ```sh
231
- dsh plugin --profile cli add file:C:/path/to/dsh-code
232
- ```
233
-
234
- GitHub installation is available for source development:
235
-
236
- ```sh
237
- dsh plugin --profile cli add github:unlinearity/dsh-code
238
- ```
239
-
240
- The Git package builds during installation. If pnpm asks for an `allowBuilds` entry, copy the complete entry it prints into `~/.dsh/profiles/cli/pnpm-workspace.yaml`, then run the command again. The key includes the Git URL and commit, so do not replace it with only `dsh-code`.
241
-
242
- ### 2. Uninstall
243
-
244
- ```sh
245
- dsh plugin --profile cli remove dsh-code # unmount the plugin from the cli profile
246
- npm uninstall -g dsh-code # remove the global package and the deepseek / dsh-code commands
247
- ```
248
-
249
- Both steps are required for a full removal: the first only unmounts the profile — the `deepseek` command still exists afterwards and reports "the cli profile does not mount dsh-code yet" — while the second removes the global npm package and its launch aliases. Uninstalling does not touch `@deepseek-ai/dsh` itself or persisted session data.
250
-
251
- ### 3. References
252
-
253
- - Runtime services, events, plugin scopes, and persistence follow **DeepSeek Harness**.
254
- - Session navigation, popup sizing, scrollback, bottom-pane layout, and resize behavior refer to **Codex CLI**.
255
- - Slash discovery, turn steering, thinking folds, approvals, and question flows refer to **Claude Code**.
256
-
257
- DSH-Code is an independent MIT-licensed community project and is not affiliated with OpenAI or Anthropic.
258
-
259
- Communities:
260
- - [Linux DO](https://linux.do/): Learn AI, head to L Station!
261
- - [Deepseek harness](https://www.deepseek.com/harness): DSH official website.
262
-
263
- ## License
264
-
265
- [MIT](LICENSE). The vendored FishLogo geometry is from DeepSeek Harness (MIT).
1
+ # DSH-Code
2
+
3
+ English | [中文](README.md)
4
+
5
+ <p align="center"><img src="docs/pictures/dsh-1.png" width="95%" alt="DSH-Code welcome screen and model status"></p>
6
+
7
+ <p align="center"><img alt="Typing SVG" src="https://readme-typing-svg.herokuapp.com?font=JetBrains+Mono&amp;weight=500&amp;size=22&amp;duration=4000&amp;pause=700&amp;color=4176E6&amp;center=true&amp;vCenter=true&amp;width=680&amp;lines=DeepSeek+Harness+Code;Terminal+Coding+Interface+for+the+DSH+Core"></p>
8
+ <p align="center">
9
+ <a href="https://github.com/deepseek-ai/deepseek-harness"><img alt="DeepSeek Harness" src="https://img.shields.io/badge/DeepSeek-Harness-4176E6?style=for-the-badge&amp;logo=deepseek&amp;logoColor=white&amp;labelColor=1c1917"></a>
10
+ <a href="https://www.npmjs.com/package/@deepseek-ai/dsh"><img alt="dsh version" src="https://img.shields.io/badge/dsh-0.1.1--rc.2-4176E6?style=for-the-badge&amp;logo=deepseek&amp;logoColor=white&amp;labelColor=1c1917"></a>
11
+ <a href="https://github.com/UNLINEARITY/dsh-code/stargazers"><img alt="GitHub stars" src="https://img.shields.io/github/stars/UNLINEARITY/dsh-code?label=Stars&amp;style=for-the-badge&amp;logo=github&amp;logoColor=white&amp;color=4176E6&amp;labelColor=1c1917"></a>
12
+ <a href="https://www.npmjs.com/package/dsh-code"><img alt="npm version" src="https://img.shields.io/npm/v/dsh-code?label=npm&amp;style=for-the-badge&amp;logo=npm&amp;color=cb3837&amp;labelColor=1c1917"></a>
13
+ <a href="https://github.com/UNLINEARITY/dsh-code/blob/main/LICENSE"><img alt="License" src="https://img.shields.io/github/license/UNLINEARITY/dsh-code?label=License&amp;style=for-the-badge&amp;logo=opensourceinitiative&amp;color=4176E6&amp;labelColor=1c1917"></a>
14
+ </p>
15
+
16
+ ---
17
+
18
+ ## 1. Project overview
19
+
20
+ **DSH-Code is a terminal coding interface for [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) (`dsh`).** It is composed as an out-of-tree bundle on top of the official `@deepseek-ai/dsh-base` and uses the same Agent, Session, tool, command, skill, permission, sandbox, context-compaction, and plugin services as the Harness Web UI.
21
+
22
+ DeepSeek Harness registers models, tools, storage, policies, and interfaces as plugins through Cordis. Durable session events record the information required to restore conversations and runtime state. DSH-Code preserves that architecture while adding a terminal workflow suited to coding tasks. The interface follows terminal conventions familiar to developers, while runtime behavior remains governed by DSH services and configuration.
23
+
24
+ ## 2. Quick start
25
+
26
+ Requires Node `^22.19 || >=24` and the preview `dsh` CLI (current release line: `@deepseek-ai/dsh@0.1.1-rc.2`). You can still enter the TUI, browse sessions, and use non-model features without configuring a model; press `a` in `/model` to manage API keys, OAuth, and device-code sign-in.
27
+
28
+ ### 1. Install and update
29
+
30
+ Use the same commands for the initial installation and subsequent updates:
31
+
32
+ ```sh
33
+ npm install -g @deepseek-ai/dsh@0.1.1-rc.2 dsh-code@1.0.1
34
+ npm install -g pnpm
35
+ dsh plugin --profile cli add dsh-code@1.0.1
36
+ ```
37
+
38
+ > Note: pnpm ignores packages published less than 24 hours ago, so use the exact version `dsh-code@1.0.1` on release day; the version may be omitted after 24 hours. npm installation is not affected.
39
+ >
40
+ > Version alignment: dsh-code 1.0.1 targets dsh `0.1.1-rc.2`, with every Harness dependency pinned exactly to `0.1.1-rc.2`. Keep the global dsh CLI and dsh-code aligned instead of mixing release candidates. rc.2 removes the old DeepSeek setting `maxRequestImageBytes`.
41
+
42
+ ### 2. Launch commands
43
+
44
+ Available launch commands:
45
+
46
+ ```sh
47
+ dsh --profile cli
48
+ deepseek
49
+ dsh-code
50
+ ```
51
+
52
+ `dsh --profile cli`, `deepseek`, and `dsh-code` are equivalent launch commands. `deepseek` and `dsh-code` are global aliases for `dsh --profile cli`, and all additional arguments are forwarded unchanged, for example `deepseek --resume abc123`.
53
+
54
+ > DeepSeek Harness is still a developer preview and may introduce compatibility-breaking changes. DSH-Code will continue to track the evolution of its plugin interfaces.
55
+
56
+ For installation, native-module, and plugin-loading issues, see [Troubleshooting](docs/problems.md).
57
+
58
+ ## 3. Core features and usage
59
+
60
+ DSH-Code brings DSH Agents, models, tools, and durable sessions directly into the terminal, covering the complete workflow from writing code to reviewing changes.
61
+
62
+ ### 1. Session management
63
+
64
+ - Create sessions with `/new`, or restore existing sessions with `/resume` and `--continue`
65
+ - Create a new work branch from a historical point with `/fork` while preserving the original session
66
+ - Search history by current directory, update time, and session scope
67
+ - Recall input history with Up/Down, or search previous prompts with `/history`
68
+ - Use persistent titles, Markdown export, context occupancy, token, cache, TTFT, and elapsed-time metrics
69
+ - Restore the session's Agent Preset and model selection when resuming it
70
+
71
+ <p align="center"><img src="docs/pictures/dsh-3.png" width="95%" alt="Searchable session resume picker"></p>
72
+
73
+ <p align="center"><img src="docs/pictures/dsh-4.png" width="95%" alt="Searchable prompt-history picker"></p>
74
+
75
+ ### 2. Agents, models, and extensions
76
+
77
+ - Select an independent Agent Preset for each session to compose tools, prompt sections, skills, context compaction, plan mode, and subagent capabilities
78
+ - Use `/mode` to select `standard`, `code`, `minimal`, `cordis`, or a user-defined Preset
79
+ - Use `/model` to switch models and manage providers, API keys, OAuth/device-code sign-in, endpoints, available models, and context windows
80
+ - In the `/model` provider list, Enter manages a manual API key, `l` starts sign-in, and `o` logs out after confirmation
81
+ - Automatically load commands and skills available in DSH; use `/help` to find them and `/plugin` to inspect extension status
82
+ - Use plans, goals, todos, permissions, sandboxes, subagents, and additional instructions while a task is running
83
+
84
+ <p align="center"><img src="docs/pictures/dsh-2.png" width="95%" alt="Per-session Agent Preset picker"></p>
85
+
86
+ ### 3. Model-switch animations
87
+
88
+ The composer plays Wave, Aurora, or Pulse when the model or reasoning effort changes under the following conditions:
89
+
90
+ | Scenario | Trigger | Animation text | Effect tier |
91
+ | --- | --- | --- | --- |
92
+ | Official DeepSeek model | Switch to the model, or change its reasoning effort | `deepseek` | Flash uses the single-band tier; other DeepSeek models use the multi-band tier |
93
+ | Other models | After changing the model or reasoning effort, the effective effort is strictly above `high` | `Into the Unknown` | Uses the same multi-band tier as non-Flash DeepSeek models |
94
+
95
+ Levels above `high` include `xhigh`, `x-high`, `very-high`, `max`, `maximum`, and `ultra`. For non-DeepSeek models, `high`, `medium`, `low`, and `off` do not trigger an animation.
96
+
97
+ | Style | Flash | Other DeepSeek / `Into the Unknown` |
98
+ | --- | --- | --- |
99
+ | Wave | One blue crest sweeps from left to right, about 1.2 seconds | Two offset blue crests sweep across in sequence with trailing `· ✦ ✧` sparkles, about 1.5 seconds |
100
+ | Aurora | Two blue light bands drift across one another, about 1.5 seconds | Three differently hued light bands drift across one another, about 1.8 seconds |
101
+ | Pulse | One ring expands outward from the center of the composer, about 1.1 seconds | Two rings expand outward in sequence, about 1.45 seconds |
102
+
103
+ ### 4. Coding workflow
104
+
105
+ - Use `@` to reference workspace files or existing sessions; selecting PNG, JPEG, WebP, or GIF files attaches the real image automatically
106
+ - Attach images through the initial prompt, repeated `--image` arguments, or by dragging one or more images into the terminal
107
+ - Inspect changes by file with `/diff`, and start a read-only code review with `/review`
108
+ - Copy the latest complete response with `/copy`, and inspect full history and tool details with Ctrl+O
109
+ - Handle tool approvals, structured questions, plan reviews, multiple selections, and custom answers
110
+ - Control what the Agent may do with permission Presets and sandboxes; add instructions or interrupt while a task is running
111
+
112
+ ### 5. Commands and key bindings
113
+
114
+ Start the TUI:
115
+
116
+ ```sh
117
+ dsh --profile cli # create a standard session
118
+ dsh --profile cli --mode code # start with the specified Agent Preset
119
+ dsh --profile cli --continue # resume the latest session for the current directory
120
+ dsh --profile cli --resume abc123 # resume by id or unique prefix
121
+ dsh --profile cli --session my-id # create a session with an explicit id
122
+ ```
123
+
124
+ The following built-in commands are available inside the TUI. Additional Harness commands and user skills depend on the active profile and installed packages; use `/help` for the complete current list.
125
+
126
+ #### Sessions and history
127
+
128
+ | Command | Purpose |
129
+ | --- | --- |
130
+ | `/new [preset]` | Create a session, optionally selecting an Agent Preset |
131
+ | `/resume [id\|prefix]` | Search for or restore an existing session |
132
+ | `/resume cancel` | Cancel a pending session switch |
133
+ | `/fork [event-seq]` | Create a session branch from the latest completed turn or a specified event position |
134
+ | `/delete [id\|prefix]` | Delete a session and its subagent sessions |
135
+ | `/title <text>` | Change the current session title |
136
+ | `/export [path]` | Export the current session as Markdown |
137
+ | `/history` | Search and reuse previously submitted prompts |
138
+ | `/clear` | Clear the current terminal display without deleting the durable session |
139
+
140
+ #### Agents, models, and permissions
141
+
142
+ | Command | Purpose |
143
+ | --- | --- |
144
+ | `/mode [preset]` | Inspect or select the current session's Agent Preset |
145
+ | `/model` | Switch models and manage providers, API keys, browser sign-in, endpoints, and available models |
146
+ | `/effort` | Adjust the current model's reasoning effort |
147
+ | `/permission [preset]` | Inspect or switch the permission Preset |
148
+ | `/subagent` | Select the model used when a subagent performs a task |
149
+
150
+ #### Coding, tasks, and background work
151
+
152
+ | Command | Purpose |
153
+ | --- | --- |
154
+ | `/diff [--staged\|ref]` | Inspect the working-tree, staged, or specified-ref Git diff by file |
155
+ | `/review [--staged\|ref]` | Review Git changes with read-only permissions |
156
+ | `/todos` | View the complete todo list for the current session |
157
+ | `/agents` | View subagent sessions created by the current session |
158
+ | `/jobs` | View background jobs and their runtime status |
159
+ | `/copy` | Copy the latest complete assistant response |
160
+
161
+ #### Extensions, display, and exit
162
+
163
+ | Command | Purpose |
164
+ | --- | --- |
165
+ | `/plugin [query]` | Inspect loaded extensions and their status |
166
+ | `/statusline` | Select the items displayed in the status bar |
167
+ | `/theme` | Switch the terminal color theme |
168
+ | `/help` | View key bindings, built-in commands, Harness commands, and user skills |
169
+ | `/quit` | Exit DSH-Code |
170
+
171
+ #### Input and key bindings
172
+
173
+ | Action | Purpose |
174
+ | --- | --- |
175
+ | `Enter` | Submit the current input |
176
+ | `Up` / `Down` | Recall the previous or next input-history entry |
177
+ | `Tab` | Complete commands, skills, or `@` references |
178
+ | `@` | Reference workspace files or existing sessions; image files are sent as attachments |
179
+ | `Ctrl+O` | Inspect full history and tool details |
180
+ | `Ctrl+R` | Fold or expand model reasoning |
181
+ | `Shift+Tab` | Cycle through permission Presets |
182
+ | `Delete` | Cancel the newest queued message when the composer is empty |
183
+ | `Ctrl+K` | Delete from the cursor to the end of the line |
184
+ | `Ctrl+U` | Clear the current input line |
185
+ | `Ctrl+A` / `Ctrl+E` | Move to the beginning or end of the current line |
186
+ | `Esc` | Close the current menu or interrupt the running turn |
187
+ | `Ctrl+C` | Cancel a task, clear the input, or exit, depending on the current state |
188
+ | `Ctrl+D` | Exit DSH-Code |
189
+
190
+ ## 4. How DSH-Code integrates with DSH
191
+
192
+ ### 1. Runtime composition
193
+
194
+ DSH-Code reads the live Harness registries instead of maintaining a separate local copy. Model adapters, tool providers, skill sources, commands, permission policies, persistence backends, sandboxes, and subagent providers can all be added or replaced through DSH composition.
195
+
196
+ `/plugin` provides a read-only view of the current Cordis loader state.
197
+
198
+ ### 2. Session-scoped Agent Presets
199
+
200
+ The Host owns the shared infrastructure—registries, persistence, session queries, permissions, and sandbox policies—while each session receives an isolated Agent scope composed by an **Agent Preset**:
201
+
202
+ - `standard` a full-featured general-purpose coding Agent
203
+ - `code` — multi-operation workflows designed for Code Mode / PTC
204
+ - `minimal` — only a persistent shell and `str_replace_editor`
205
+ - `cordis` — the full Agent plus runtime inspection and Preset-authoring guidance
206
+ - user Presets custom tools, prompt sections, skills, context compaction, plan mode, and subagent behavior
207
+
208
+ Use `/mode` before the first turn, or start directly with `--mode <preset>`. The selected Preset is written to the session and restored when the session resumes.
209
+
210
+ ### 3. Session history and recovery
211
+
212
+ Prompts, streaming chunks, tool calls and results, model selections, plan state, permissions, titles, and Preset selections are all projected from durable Session events. Session recovery, export, history inspection, context metrics, and terminal replay use the same record.
213
+
214
+ React state stores only temporary interface details such as the input draft, cursor, active panel, selection, and scroll position.
215
+
216
+ ```text
217
+ dsh profile
218
+ └─ Host plane: registries · persistence · queries · permissions · sandbox
219
+ ├─ Agent session A + preset code
220
+ ├─ Agent session B + preset minimal
221
+ └─ DSH-Code TUI
222
+ durable events → pure projection → append-only transcript
223
+ └→ bounded panels → composer → status bar
224
+ ```
225
+
226
+ ## 5. Development
227
+
228
+ ```sh
229
+ pnpm install
230
+ pnpm test
231
+ pnpm typecheck
232
+ pnpm build
233
+ pnpm run gen:whale # regenerate src/whale-glyph.ts from the vendored logo path
234
+ ```
235
+
236
+ The whale glyph is generated from the DeepSeek FishLogo geometry vendored in `scripts/fish-logo.ts` (source: DeepSeek Harness, MIT).
237
+
238
+ ### 1. Source development installation
239
+
240
+ For a local checkout:
241
+
242
+ ```sh
243
+ dsh plugin --profile cli add file:C:/path/to/dsh-code
244
+ ```
245
+
246
+ GitHub installation is available for source development:
247
+
248
+ ```sh
249
+ dsh plugin --profile cli add github:unlinearity/dsh-code
250
+ ```
251
+
252
+ The Git package builds during installation. If pnpm asks for an `allowBuilds` entry, copy the complete entry it prints into `~/.dsh/profiles/cli/pnpm-workspace.yaml`, then run the command again. The key contains the Git URL and commit, so it cannot be replaced with only `dsh-code`.
253
+
254
+ ### 2. Uninstall
255
+
256
+ ```sh
257
+ dsh plugin --profile cli remove dsh-code # unmount the plugin from the cli profile
258
+ npm uninstall -g dsh-code # remove the global package and the deepseek / dsh-code commands
259
+ ```
260
+
261
+ Both commands are required for a complete uninstall. The first only removes the profile mount, so the `deepseek` command still exists and reports "the cli profile does not mount dsh-code yet". The second removes the global npm package and its launch aliases. Uninstalling does not affect `@deepseek-ai/dsh` itself or any persisted session data.
262
+
263
+ ### 3. References
264
+
265
+ - Runtime services, events, plugin scopes, and the persistence model follow **DeepSeek Harness**.
266
+ - Session navigation, overlay sizing, scrollback, bottom layout, and resize handling refer to **Codex CLI**.
267
+ - Slash-command discovery, turn steering, reasoning folds, approvals, and question flows refer to **Claude Code**.
268
+
269
+ DSH-Code is an independent MIT-licensed community project and is not affiliated with OpenAI or Anthropic.
270
+
271
+ Communities:
272
+
273
+ - [Linux DO](https://linux.do/): Learn AI at L Station!
274
+ - [DeepSeek Harness](https://www.deepseek.com/harness): the official DSH website
275
+
276
+ ## License
277
+
278
+ [MIT](LICENSE). The vendored FishLogo geometry comes from DeepSeek Harness (MIT).