UNLINEARITY/dsh-code ↗★ 43

dsh-code

DeepSeek Harness CLI core bundle: interactive coding terminal, durable sessions, and model management for dsh --profile cli

パッケージ
dsh-code
互換性
未検証
Harness ピア範囲
0.2.1-rc.4
Cordis ピア範囲
^4.0.5
バージョン
2.1.0
ライセンス
MIT
最終更新
2026/10/28

インストール

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:UNLINEARITY/dsh-code

ドキュメント

README 全文を読む ↗

3. Core features and usage

DSH-Code brings DSH Agents, models, tools, and durable sessions directly into the terminal, covering the complete workflow from writing code to reviewing changes.

1. Session management

  • Create sessions with /new, or restore existing sessions with /resume and --continue
  • Create a new work branch from a historical point with /fork while preserving the original session
  • Search history by current directory, update time, and session scope
  • Recall input history with Up/Down (typed slash commands included), or search previous prompts and commands with /history
  • Use persistent titles, Markdown export, context occupancy, token, cache, TTFT, and elapsed-time metrics; /usage reports the harness token meter's four disjoint buckets, the totals merged by model, and a per-turn breakdown
  • The status bar's in counts only uncached input, and cache shows both the cache-read volume and the hit share — together they are the billed prompt side
  • Restore the session's Agent Preset, model selection, and subagent list when resuming it; the welcome header shows both the dsh and dsh-code versions

Searchable session resume picker

Searchable prompt-history picker

2. Agents, models, and extensions

  • Select an independent Agent Preset for each session to compose tools, prompt sections, skills, context compaction, plan mode, and subagent capabilities
  • Use /mode to select standard, ptc, minimal, cordis, or a user-defined Preset (the legacy code id maps to ptc)
  • Use /model to switch models and manage providers, API keys, OAuth/device-code sign-in, endpoints, available models, and context windows
  • In the /model provider list, Enter manages a manual API key, l starts sign-in, and o logs out after confirmation
  • Automatically load commands and skills available in DSH; use /help to find them and /plugin to inspect extension status
  • Use plans, goals, todos, permissions, sandboxes, subagents, and additional instructions while a task is running

Per-session Agent Preset picker

3. Model-switch animations

The composer plays Wave, Aurora, or Pulse when the model or reasoning effort changes under the following conditions:

ScenarioTriggerAnimation textEffect tier
Official DeepSeek modelSwitch to the model, or change its reasoning effortdeepseekFlash uses the single-band tier; other DeepSeek models use the multi-band tier
Other modelsAfter changing the model or reasoning effort, the effective effort is strictly above highInto the UnknownUses the same multi-band tier as non-Flash DeepSeek models

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.

StyleFlashOther DeepSeek / Into the Unknown
WaveOne blue crest sweeps from left to right, about 1.2 secondsTwo offset blue crests sweep across in sequence with trailing · ✦ ✧ sparkles, about 1.5 seconds
AuroraTwo blue light bands drift across one another, about 1.5 secondsThree differently hued light bands drift across one another, about 1.8 seconds
PulseOne ring expands outward from the center of the composer, about 1.1 secondsTwo rings expand outward in sequence, about 1.45 seconds

/animation off disables purely decorative effects such as Wave/Pulse, animated theme flow, and rainbow bursts. The input cursor, streaming caret, busy chase, Thinking/Deep Diving shimmer, and Deep diving... clock remain live so an active turn never looks frozen.

4. Coding workflow

  • Use @ to reference workspace files or existing sessions; selecting PNG, JPEG, WebP, or GIF files attaches the real image automatically
  • Attach images through the initial prompt, repeated --image arguments, or by dragging one or more images into the terminal
  • Inspect changes by file with /diff, and start a read-only code review with /review (a range picker; diffs use full-row green/red)
  • run_code lists nested tool calls as they run; workflow runs list their member agents until they finish
  • Copy the latest complete response with /copy, and inspect history and full tool details with Ctrl+O; intermediate replies that contain reasoning but no final text do not occupy their own inspector entry
  • Handle tool approvals, structured questions, plan reviews, multiple selections, and custom answers
  • Control what the Agent may do with permission Presets and sandboxes; add instructions or interrupt while a task is running

5. Queued and steered messages

While a turn is running you can keep typing. There are two ways to send what you type:

  • Queue — it waits until the turn finishes and then runs as a new turn. Use it for "do this once you are done with that".
  • Steer — it reaches the model before the next step of the running turn, as part of that request. Use it when the work has gone the wrong way and you want it corrected now.

The difference is when the model sees it: a queued message is read once the turn has finished, a steered one before the turn makes its next move.

How to send each way:

  • Press Tab on an empty composer to switch between them. The prompt glyph (❯ / ↳), the placeholder text, and the notice shown on switching all say which one is selected. With text in the box, Tab still completes commands and references.
  • /queue opens the queue panel: press Enter on a message to send it as steering instead, e to edit its text (attachments are kept as they are), or d to remove it.
  • Press Delete on an empty composer to cancel the newest queued message.
  • Pressing Esc to cancel the turn keeps queued messages and sends them next, while steered messages are dropped with the turn.

Every prompt in the transcript is a full-width coloured row, and the colour says how it was sent: the theme's bright brand colour for an ordinary message, its warning colour for a queued one, and its third accent for a steered one, each labelled with "queued" or "steered". The colour is computed from the theme, so switching themes or rerolling rainbow changes it too.

A message counts as queued or steered only when a turn was already running at the moment you sent it. A message sent while idle is an ordinary one even if the composer is set to steer, because it starts a new turn straight away.

See Queued and steered messages for the queue behaviour, the order the upstream queues are read in, and the colour values per theme.

6. Commands and key bindings

Start the TUI:

dsh --profile cli                    # create a standard session
dsh --profile cli --mode ptc         # start with the specified Agent Preset (standard/minimal/cordis/ptc)
dsh --profile cli --continue         # resume the latest session for the current directory
dsh --profile cli --resume abc123    # resume by id or unique prefix
dsh --profile cli --session my-id    # create a session with an explicit id

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.

Sessions and history
CommandPurpose
/new [preset]Create a session, optionally selecting an Agent Preset
/resume [id|prefix]Search for or restore an existing session
/search [query]Full-text search across persisted sessions (Enter resumes the hit)
/resume cancelCancel a pending session switch
/fork [event-seq]Create a session branch from the latest completed turn or a specified event position
/delete [id|prefix]Delete a session and its subagent sessions
/title Change the current session title
/export [path]Export the current session as Markdown
/historySearch and reuse previously submitted prompts and slash commands
/clearClear the current terminal display without deleting the durable session
Agents, models, and permissions
CommandPurpose
/mode [preset]Inspect or select the current session's Agent Preset
/modelSwitch models and manage providers, API keys, browser sign-in, endpoints, and available models
/effortAdjust the current model's reasoning effort
/permission [preset]Inspect or switch the permission Preset
/subagentSelect the model used when a subagent performs a task
Coding, tasks, and background work
CommandPurpose
/diff [--staged|ref]Inspect the working-tree, staged, or specified-ref Git diff by file
/review [note]Bare /review opens a candidate picker (uncommitted changes / pick a branch / pick a commit / custom focus); any argument becomes a review note over the uncommitted diff (/review in Chinese). The diff is pasted into the current session under read-only permissions, and findings arrive with P0-P3 priorities and file anchors
/todosView the complete todo list for the current session
/queueSee the messages waiting for the next turn: enter sends one as steering instead, e edits its text, d removes it; ↑↓/PageUp/PageDown/g/G move
/usageSee this session's token usage: the four disjoint buckets (uncached input, cache write, cache read, output), the totals merged by model, and the per-turn breakdown
/agentsView subagent sessions created by the current session
/jobsView background jobs and their runtime status
/copyCopy the latest complete assistant response
Extensions, display, and exit
CommandPurpose
/plugin [query]Inspect loaded extensions and their status
/updateChecks npm for a newer version and confirms the upgrade
/statuslineSelect the items displayed in the status bar
/vscode-keysPass Ctrl+R through VS Code-family terminals (idempotent user-level keybindings.json write)
/themeSwitch colors: dark / light / prismatic / rainbow / auto
/rainbow [seed]Reroll or pin the rainbow theme seed; a bare /rainbow rolls a new seed and switches to rainbow
/language [en|zh]Switch the interface language, default English; model prompts and factual status values stay in English
/animationToggle decorative animations; input cursors and activity indicators stay live, /animation [on|off]
/helpView key bindings, built-in commands, Harness commands, and user skills
/quitExit DSH-Code
Input and key bindings
ActionPurpose
EnterSubmit the current input
Ctrl+J / Alt+EnterInsert a newline in the composer (with the enhanced keyboard protocol, Shift+Enter / Ctrl+Enter work too)
Up / DownRecall the previous or next input-history entry
TabComplete commands, skills, or @ references; on an empty composer, switch the next message between queue and steer
@Reference workspace files or existing sessions; image files are sent as attachments
Ctrl+OInspect history and full tool details; intermediate replies with reasoning but no final text do not occupy their own entry
Ctrl/Alt+RFold or expand model reasoning; run /vscode-keys first in VS Code-family terminals to pass Ctrl+R through
Shift+TabCycle permission Presets, and the plan station when /plan is available
DeleteCancel the newest queued message when the composer is empty (steering is not in the queue; press Esc to end the turn instead)
Ctrl+KDelete from the cursor to the end of the line
Ctrl+UClear the current input line
Ctrl+A / Ctrl+EMove to the beginning or end of the current line
EscClose the current menu or interrupt the running turn; queued messages are kept and sent next, steered ones are dropped with the turn
Ctrl+CCancel a task, clear the input, or exit, depending on the current state
Ctrl+DExit DSH-Code
Status indicators
IndicatorTrigger
✻ Deep diving...The turn is running while nothing is streaming (waiting for the first token, gaps during tool runs); an elapsed clock appears after 15 seconds
✻ Thinking…Model reasoning is streaming; collapsed into the shimmer marker by default, expand with Ctrl/Alt+R