NEXTINDIE/DeepSeek-Harness-for-VS-Code

DeepSeek Harness for VS Code

DeepSeek Harness for VS Code: @dsh chat participant, sidebar & standalone chat, plan mode, goals, subagents, turn-level Git rollback, workspaces/jobs/settings panels, 13-language UI.

待分类aideepseekdeepseek-harness

DeepSeek Harness for VS Code (dsh-vscode)

Before using this extension: start the DeepSeek Harness server from your terminal first — the extension connects to it inside VS Code.

npx @deepseek-ai/dsh web

中文版 | Publisher: Jager · Latest: 0.13.63

Use DeepSeek Harness (dsh) directly in VS Code, alongside ChatGPT / Copilot: the built-in @dsh chat participant, secondary sidebar / standalone chat windows, workspaces / jobs / trajectory / settings panels, turn-level Git rollback, and a multi-language UI (简体中文 / 繁體中文 / English / 日本語 / 한국어 / Deutsch / Français / Español / Português / ไทย / Bahasa Indonesia / Türkçe / Русский / العربية — follows the VS Code display language or switch manually).

DeepSeek Harness for VS Code

Features

  • Built-in chat participant @dsh: type @ in the native Chat panel (Ctrl+Alt+I); streamed replies with tool calls and approval buttons; slash commands /new, /session <ID>, /preset <name>.
  • Secondary sidebar tab: container appears in the Secondary Side Bar on VS Code ≥ 1.106 (falls back to the Activity Bar on older versions).
  • Standalone chat window: DSH: Open Standalone Chat Window.
  • Modern chat UI: large rounded input box, pill toolbar (thinking depth / model / preset / permission), and a context meter ring at the top-right of the input box, right of the preset pill (web parity: click for "context used", the ~used / window reading, and the system-prompt / tool-definition / conversation breakdown with colour-coded bar segments and per-category token counts). Below the input box sit two session statistic pills (web parity): 4 turns 285 steps · 267 tok/s (click for session statistics — LLM time, tool time, average TTFT, output TPS) and 71M tok · 99.6% cache hit (click for token usage — exact total, cache hit, uncached input, cache read/write, output).
  • Context-limit warnings stay in the conversation (issue #19): the context ring turns amber at 75% and red at 90% (its panel then offers a one-click Compact context), and sending while the next request would cross 90% of the window adds an in-conversation card with the projected reading plus Compact context / Switch model. If a turn still fails — the provider refuses with a context-length error, or the model ends the turn with an error or at its output ceiling — the reason is written into the conversation at that point instead of only flashing in a toast, so a model with a smaller window (MiniMax and other pi-ai routes) never fails silently.
  • Per-message actions (minimal line icons): copy (double-rectangle icon) / branch (forked line icon; menu: counter-clockwise arrow "Rewind here" · forked icon "Branch from here" · up-left fold "Branch and rewind earlier" · up-left arrow "Back to main") / thumbs up/down (line icons; native messageFeedback with click-again-to-revoke, /feedback command fallback for older sessions) / message header shows model · thinking time · per-step tokens.
  • Turn footer stats (web parity): a Usage 25.8K tok pill (click for provider/model, cache hit rate, uncached input, cache read/write, output with reasoning share), a Ran for 5m 57s pill (click for total turn time, output TPS, time to first token), and the local clock of the closing message at the row's right end (HH:mm, M/D HH:mm for earlier days, Y-M-D HH:mm for other years). While the session is running, an earlier turn's action row and stats stay hidden and fade in on hover (only the settled latest turn shows them) — the web's data-actions-reveal behaviour.
  • Step timeline (web ToolRow / ThinkRow parity): thinking and tool calls render as one-line process rows on a left rail — 思考 • <first line> (expanded while it streams, collapsed once thinking ends, manual toggles preserved) and Read/Write/Pwsh/Grep • <human summary> with a status dot, a running sweep animation, and the full arguments/result (plus image results) behind a click; rows appear live as each event arrives, each run of rows ends with a web-style summary line (1 command · read 1 file · searched 2 times) that folds or unfolds that run when clicked, and the activity line above the composer names the running action (tool title + summary) rather than a generic label. Long JSON no longer floods the row.
  • Deliverable file cards (web present parity): files the model delivers appear as cards at the turn tail — file name + description, an Open button (opens the file, or the HEAD→worktree diff for tracked files) and a ⋯ menu with "Open with default app" and "Reveal in File Explorer".
  • Turn-level Git rollback (↩ button on each assistant turn + branch-menu entries): the DSH server-side plugin dsh-git-rollback snapshots the workspace's git state (tracked + untracked files) at every turn start into hidden refs (refs/dsh/checkpoints/<sid>, zero pollution of your branch history) and records them under .dsh/rollback; the button restores the workspace to the state before that turn. Commands /rollback [N], /redo, /checkpoints work in both the web command panel and the VS Code chat (rollback is non-destructive: the pre-rollback state is saved first, /redo restores it, ignored files are never touched). Each message's ⋯/branch menu also offers "Undo this turn's file changes" (preview-and-confirm review dialog, reverses only the files that turn changed — your own commits and HEAD stay untouched), "View checkpoints", and "Undo this turn's changes and branch from here". The web chat gets the same Copilot-style turn dividers and a floating restore dialog out of the box (plugin web half, served via the DSH client-modules pipeline).

Undo turn's changes review dialog

Message actions with undo / checkpoints / branch

  • Collapsible reasoning (hidden by default) and per-turn tool summary ("Called N tools this turn").
  • Deliverables box: files produced each turn listed at the end of the conversation, click to open.
  • Session management: ⋯ menu with fork / rename (pre-filled title) / archive.
  • Goals: progress card + 🎯 chip with edit / complete / clear.
  • Timed (asynchronous) questions (DSH 0.2.0+): a question that carries a wait budget shows a live countdown pill on its card; when the wait expires the agent carries on and the card stays answerable ("wait ended · you can still answer later"), with the late reply delivered as a follow-up message in the same session.
  • To-do panel (web TodoPanel parity, docked above the composer): checklist icon + "To-dos" + a per-status summary that only lists non-zero counts ("2 completed · 1 in progress · 1 pending"), collapsible list with the web's three status glyphs (green check ring / spinning gradient ring / dashed ring).
  • Plan mode: 📝 chip appears after /plan, click to exit.
  • Attachments: auto-attach the active editor file (follows editor switches) + add file/folder (separate pickers); context is injected into the model but displayed collapsed.
  • Subagents: status chips with recent-reply preview.
  • Skills: available skills listed in the / menu (official skill.list).
  • .claude / .codex / GitHub Copilot directories: CLAUDE.md / AGENTS.md auto-loaded by the DSH core; .claude/commands, .claude/skills, .codex/skills (SKILL.md), .github/copilot-instructions.md, .github/instructions, .github/agents and .github/prompts are listed in the / menu and insertable.
  • Permissions: read-only / workspace-write / full-access switch (official /permission command).
  • Cross-project sessions: per-folder @dsh sessions; multi-root follows the active editor; dsh.participantSessionMode: global to share one session.
  • Workspace browser (📁 button, web Workspaces parity): sessions grouped by workspace; add / rename / delete / reorder workspaces; per-group session ordering and archive; session content search (instant title matches + server content search with local fallback when the index is disabled); rows show waiting-for-approval / plan-review / question / running states.
  • Background jobs panel (⚙️ button): bash / pwsh / subagent jobs for the current session with status, timings, and detail, live from session/jobs frames.
  • Automation tasks panel (⏰ button, host-side schedule/*, DSH 0.1.7+): every retained reminder with its rule text, next scheduled time and countdown, enabled / ended status, search and status filter; open a task for its instruction, frequency, time zone, linked session (jump straight to it), last delivery and its delivery records (newest-first with paging) and delete it after an inline confirmation. The catalog refreshes itself from the host's schedule/changed event; when the host has the schedule plugin disabled (the 0.1.7 default) the panel says so instead of erroring.
  • Automation tasks panel (⏰ button, host-side schedule/*, DSH 0.1.7+): every retained reminder with its rule text, next scheduled time and countdown, enabled / ended status, search and status filter; open a task for its instruction, frequency, time zone, linked session (jump straight to it), last delivery and its delivery records (newest-first with paging) and delete it after an inline confirmation. The catalog refreshes itself from the host's schedule/changed event; when the host has the schedule plugin disabled (the 0.1.7 default) the panel says so instead of erroring.
  • Trajectory view (🧭 button, web Trajectory parity): turn-aware event ledger (seq · time · type · summary · token usage), click to expand the full event JSON, type filter. The header toolbar is all line icons (workspace / background jobs / automation tasks / trajectory / settings / subagent catalog) drawn at 15px; the Cordis plugin button keeps its 🧩 emoji, and the Activity Bar / Secondary Side Bar container and the chat view use a line-robot mark (media/robot.svg, masked to the theme icon colour by VS Code) in the theme's icon colour.
  • Settings panel (⚙️ button, web Settings parity): general settings (schema-driven forms for every namespace, restart badges, per-namespace reset), models & providers (provider route directory + model catalog + endpoint model discovery), credential management (API key set/clear), agent preset authoring on hosts that still expose it — DSH 0.1.7 removed the preset authoring endpoints, so the copy / open-directory / delete buttons only appear when settings/canOpenAgentPresetDirectory reports support and presets are otherwise read-only composition text.

Settings panel

  • Subagent conversations: click a subagent chip to open its transcript; continuable children accept prompts (subagent.prompt) and interrupts (subagent.interrupt).
  • Image attachments: 🖼️ add images (official image content-block channel), in both sending and history playback.
  • Queued-message actions: queued messages can be edited / removed / steered (official session.updateQueue).
  • Goal creation: the 🎯 chip creates a goal when none exists (goal.create with objective and round cap).
  • One-click commit messages: the ✨ button in the Source Control title bar (DSH: Generate Commit Message) reads the staged/unstaged git diff and generates a Conventional Commits-style message in a disposable session (archived immediately, never shown in the session list) with a lightweight model (default: the flash keyword matched against the DSH model catalog + low effort; configurable via dsh.commitModel / dsh.commitReasoningEffort), writing the result into the SCM input box and auto-cancelling on timeout or when the model requests extra interaction. The model switch is temporary — your default model and thinking depth are captured first and restored when generation ends, and the throwaway session is archived only after the answer arrives (DSH 0.1.7 blocks turns on archived sessions).
  • i18n: Simplified Chinese / Traditional Chinese / English / Japanese / Korean / German / French / Spanish / Portuguese / Thai / Indonesian / Turkish / Russian / Arabic — follows the VS Code display language, or switch in place via dsh.language / the 🌐 section of the settings panel.

Install

cd <this folder>
npm install
npm run package          # outputs Releases/dsh-vscode-<version>.vsix

VS Code → Extensions → … → Install from VSIX → pick the file in Releases\ → reload.

Prerequisites: VS Code ≥ 1.90 (built-in chat ≥ 1.95; secondary sidebar container ≥ 1.106); DSH CLI or npx fallback; model credentials configured (same as dsh web).

Usage highlights

  • The send shortcut is configurable, in place: Settings → ⌨️ Sending & input (or dsh.sendKey in settings.json) picks Enter (default), Ctrl+Enter or Shift+Enter to send — the other combination inserts a newline. The pill on the composer hint line always shows the active binding and switches it on click. While running the send button (paper-plane line icon) becomes stop (square line icon), typing turns it back into send (queued send).
  • ↑ / ↓ recall your previous inputs (like a shell, feature request issue #20): press ↑ with the caret at the start of the first line (or in a one-line input) to walk back through everything you have sent, ↓ to walk forward, and ↓ past the newest entry restores whatever you were typing before you started browsing (Esc does the same). Editing a recalled entry keeps your edit instead of overwriting it, arrow keys still move the caret inside multi-line text, and the history survives hiding or reloading the view.
  • / button (bottom-left): command menu (plan / compact / goal / feedback / permission / skills / .claude). Most entries insert the command into the input (press Enter to run); Compact context runs /compact straight away and the conversation shows a live compaction row — a sweep while compacting, then "Compacted N history items (~T tokens)" with the summary expandable, and the compacted range collapses into that row (the same row appears for automatic compaction).
  • + button next to it: add file / add folder; the blue chip is the auto-attached active file.
  • Message actions: click the forked-line icon to open the branch/rewind menu — counter-clockwise arrow "Rewind here", forked icon "Branch from here", up-left fold "Branch and rewind earlier", plus "Undo this turn's file changes" / "View checkpoints" when the git-rollback plugin is active; branch sessions also show the up-left arrow "Back to main". The counter-clockwise arrow on each assistant turn (when the DSH server-side plugin is active) restores the workspace to the state before that turn.
  • Session ⋯ menu: fork / rename / copy session ID / archive; preset pill at the top-right (new sessions only); thinking / model pills at the bottom-right.
  • DSH 0.2.1 support: the composer hint line shows a working-directory pill once the agent switches the session directory with the new working_directory tool (click it to reveal the folder); the switch also appears in the transcript as a one-line notice instead of a user bubble. Pending timed questions survive a view reload or session switch (restored from the host's userQuestions projection), the background-jobs panel is fed by the new job/registered / job/settled events (status, exit code and duration), and a host that grants this connection only limited access is reported instead of failing calls with a raw denial code. The bundled dsh-git-rollback plugin declares engines.dsh, an icon and 15 locale entries, so DSH's plugin manager lists it as compatible with its localized title/description.
  • Source Control title bar: the ✨ button generates a Conventional Commits message from the current diff and fills the SCM input box (a picker appears when several repositories are open).
  • Context menus: selection → DSH: Send Selection to @dsh; file → DSH: Ask @dsh About This File.

Configuration

KeyDefaultDescription
dsh.urlhttp://127.0.0.1:3080DSH web server URL
dsh.autoStarttrueOn VS Code startup, start dsh web if the server is not running
dsh.commanddshStart command; falls back to npx
dsh.autoStartTimeoutSec60Auto-start timeout (seconds)
dsh.participantSessionModeper-workspace@dsh session scope: per-project / global
dsh.openPanelOnStartupfalseOpen the standalone window on startup
dsh.defaultReasoningEffort""Default thinking depth for new sessions (off/high/max, model-dependent)
dsh.commitModeldeepseek-v4-flashModel used to generate commit messages (resolved from the DSH model catalog; falls back to the session's current model)
dsh.commitReasoningEffortlowReasoning effort for commit messages (low = no thinking on DeepSeek models, fastest)
dsh.languageautoUI language: auto / zh-cn / zh-tw / en / ja / ko / de / fr / es / pt / th / id / tr / ru / ar
dsh.installRollbackPlugintrueAuto-install the turn-level Git rollback server plugin into the DSH web profile (enables /rollback, /redo, /checkpoints)

Turn-level Git rollback setup

  • Automatic (default): the extension ships the dsh-git-rollback server plugin (host + web client halves) and installs it into your DSH web profile (~/.dsh/profiles/web) on activation (idempotent, version-tracked). If your DSH server was already running, the extension offers a one-click restart when it detects the plugin is not loaded yet. The web client half is picked up automatically by the DSH client-modules pipeline on the next server start — no manual setup.
  • Manual (web GUI users / other profiles): from the terminal, dsh plugin --profile web add dsh-git-rollback (published on npm), then restart dsh web.
  • Requirements: a Git repository as the session workspace; snapshots are taken at every turn start (turn/start) and survive server restarts via .dsh/rollback records + hidden refs (refs/dsh/checkpoints/<sessionId>). Disable the auto-install with dsh.installRollbackPlugin: false.

Troubleshooting

  • "This session is already in use" / session/writer-held: a DSH session can only be written by one instance at a time. Quit the other instance that has it attached (the desktop app, another dsh web, or a second VS Code window driving the same server), or simply switch to another session in VS Code — then the notice bar above the composer disappears and model switching, renaming and sending work again.

  • Nothing appears → reload the window; run DSH: Show Diagnostics; check the extension runtime state for validation errors.

  • "No registered data provider" → run DSH: Repair Chat View (Reset View Locations) or Restart Extension Host.

  • Service worker error in the webview → VS Code 1.100.x platform bug: update VS Code or clear %APPDATA%\Code\Service Worker\CacheStorage.

  • "agent preset is fixed" → started sessions cannot switch presets; the preset pill only shows for new sessions.

  • Not connected → run DSH: Start Server; check dsh.url.

  • Server version: this build targets DSH 0.1.5-rc.1 and negotiates the changed attachment parameter names, so a 0.1.2-rc.1 server keeps working (commands, subagent prompts, streaming); upgrading the server to 0.1.5 additionally brings live streaming frames, V3 session logs, and the context breakdown projection.

  • Server does not auto-start → the extension retries every 15 s and connects as soon as the server is up; see the [server] log in the "DeepSeek Harness" output channel. If the error mentions 0xC0000142/EPERM, VS Code was launched from a DSH session or a restricted terminal (child process creation blocked) — launch VS Code normally, or set that session's permission to danger-full-access.

Development

npm install
npm run typecheck
npm run build
npm run package     # → Releases/
  • Host: src/extension.ts, src/dsh/* (API client, server manager, session store, chat participant, project-session mapping, commit message generation).
  • UI: src/webview/{channel,panel,window,ui}.ts + media/chat.css; icon media/icon.png.
  • i18n: package.nls.json + package.nls.zh-cn/zh-tw/ja/ko/de/fr/es/pt/th/id/tr/ar.json, l10n/bundle.l10n.json + bundle.l10n.zh-cn/zh-tw/ja/ko/de/fr/es/pt/th/id/tr/ar.json, the EN_TEXT dictionary in ui.ts + src/webview/texts/*.json.
  • Server plugins: source lives under plugins/<name>/ (all new DSH server plugins go there); npm run build compiles them and syncs the bundle into resources/<name>/ via tools/sync-plugins.mjs for packaging into the vsix. Unit tests: cd plugins/<name> && npm test.

DeepSeek Harness for VS Code (dsh-vscode)

使用前请先启动 DSH Web 服务:先在命令行中执行以下命令,安装并启动 dsh web,之后才能在 VS Code 中使用本插件。

npx @deepseek-ai/dsh web

English version | 发布者:Jager · 最新版本:0.13.63

在 VS Code 中直接使用 DeepSeek Harness(dsh),与 ChatGPT / Copilot 一样融入 VS Code 聊天体系:内置聊天参与者 @dsh、辅助侧栏 / 独立聊天窗口、工作区 / 后台任务 / 轨迹 / 设置面板、回合级 Git 回退,以及多语言界面(简体中文 / 繁體中文 / English / 日本語 / 한국어 / Deutsch / Français / Español / Português / ไทย / Bahasa Indonesia / Türkçe / Русский / العربية,跟随 VS Code 显示语言或手动切换)。

功能总览

  • 内置聊天参与者 @dsh:VS Code 原生 Chat 面板(Ctrl+Alt+I)输入 @ 选择 dsh;助手回复流式渲染,含工具调用与审批按钮;支持 /new、/session <ID>、/preset <名> 斜杠命令。
  • 辅助侧栏子 tab:VS Code ≥ 1.106 时容器直接出现在辅助侧栏(与 ChatGPT 等并列);旧版本自动回退到活动栏图标。
  • 独立聊天窗口:编辑器区 WebviewPanel,命令 DSH: 打开独立聊天窗口。
  • 现代聊天界面:大号圆角输入框、胶囊工具栏(思考深度 / 模型 / 预设 / 权限),以及输入框右上角、预设胶囊右侧的上下文进度环(与网页端一致:点击展开「上下文已用」读数 ~已用 / 上限,以及 系统提示词 / 工具定义 / 对话消息 三段彩色构成与各自 token 数)。输入框下方是两枚会话统计胶囊(与网页端一致):4 轮 285 步 · 267 tok/s(点击展开 会话统计:模型用时 · 工具调用用时 · 首 token 平均 TTFT · 输出速度 TPS)与 71M tok · 缓存命中 99.6%(点击展开 Token 用量:精确总量 · 缓存命中 · 未缓存输入 · 缓存读取/写入 · 输出)。
  • 上下文超限提示留在对话里(issue #19):进度环在 75% 转琥珀、90% 转红(此时面板内提供一键压缩上下文);当本次输入预计让上下文越过窗口 90% 时,发送前会在对话里落一张卡片,给出预计读数与压缩上下文 / 切换模型两个动作。若回合仍然失败 —— 提供方以上下文超限报错、回合以 error 结束、或达到输出上限 —— 原因都会写在该回合的对话位置,而不再只闪一条浮动提示;使用窗口较小的模型(MiniMax 等 pi-ai 路由)不会再「悄无声息地失败」。
  • 消息操作条(每条回答下方,简约线条图标):复制(双层矩形图标)/ 分支(分叉线条图标,点击展开菜单:逆时针箭头"回退到此处" · 分叉图标"从此处新建分支" · 左上折线"分支并回退到更早位置" · 左上箭头"回到主线")/ 点赞、点踩(拇指线条图标;0.1.7 起走原生 messageFeedback,再点一次即撤销,旧会话回退到 /feedback 命令)/ 消息头显示模型名 · 思考耗时 · 本步 token 消耗。
  • 回合尾统计(与网页端一致):用量 25.8K tok 胶囊(点击展开 提供方/模型 · 缓存命中率 · 未缓存输入 · 缓存读取/写入 · 输出(含推理占比))、用时 5分57秒 胶囊(点击展开 本轮总用时 · 输出速度 TPS · 首 token 用时 TTFT),最右侧显示收尾消息的本地时间(当天 HH:mm,更早 M月D日 HH:mm,跨年 Y年M月D日 HH:mm)。会话运行中,历史回合的操作条与统计默认隐藏、悬停该条消息才淡入(网页端 data-actions-reveal 同款),只有已结束的最新回合常显。
  • 过程时间线(与网页端 ToolRow / ThinkRow 一致):思考与工具调用渲染为左侧导轨上的一行——思考 • <首行摘要>(流式期间展开,思考结束自动收起,手动开合会被保留)与 读取 / 写入 / Pwsh / Grep • <人类可读摘要>(状态点 + 运行中扫光),点击展开完整参数/结果(含图片结果);不再把整段 JSON 铺在行上。过程行随事件实时出现,每段末尾附一行网页端同款汇总(「执行了 1 条命令 · 读取了 1 个文件 · 搜索了 2 次」),点击即可折叠/展开该段;输入框上方的活动行同时说明当前动作(工具标题 + 摘要),不再是笼统的「执行工具…」。
  • 交付文件卡(与网页端 present 一致):模型交付的文件在回合尾渲染为卡片——文件名 + 描述、打开 按钮(已跟踪文件直接打开 HEAD→工作区 diff)与 ⋯ 菜单(用默认应用打开 / 在资源管理器中显示)。
  • 回合级 Git 回退(每条助手回答上的 ↩ 按钮 + 「分支/回退」菜单项):DSH 服务端插件 dsh-git-rollback 在每个回合开始时把工作区 git 状态(含未跟踪文件)快照到隐藏引用(refs/dsh/checkpoints/<sid>,用户分支历史零污染)并记录在 .dsh/rollback;点击按钮即可把工作区恢复到该回合之前的状态。/rollback [N]、/redo、/checkpoints 命令在 web 命令面板与 VS Code 聊天面板通用——回退非破坏性(先存保存点,/redo 可恢复,ignored 文件永不触碰)。每条消息的 ⋯/分支菜单另提供 「撤销本回合改动」(先预览后确认的审核弹窗,只反向应用该回合自身产生的文件改动——你自己的提交与 HEAD 完全不受影响)、「查看检查点」 与「撤销本回合变更并从此处新建分支」。网页端