@kefengwei/dsh-workbench
v0.1.1
Published
VSCode-style workbench for the DeepSeek Harness (dsh) web GUI: a resizable drawer with a workspace file tree, Monaco editor, global search & replace, Git source control, a persistent terminal, and C#/TypeScript LSP support.
Maintainers
Readme
dsh-workbench
A VSCode-style workbench for the DeepSeek Harness (dsh) web GUI: a resizable drawer with a workspace file tree, a Monaco editor, global search & replace, Git source control, and a persistent terminal — an in-browser VSCode-like experience that never leaves the chat view.
Features
- Drawer, not a tab — opens over the conversation from the session-header button; press
Escor click the backdrop to close. No session switch, no context loss. - Files explorer — workspace tree rooted at the current session's
cwd(root folder auto-expands), vscode-icons file/folder icons, type badges fallback,Ctrl+Pquick-open, disk-change polling with reload hint. - Monaco editor — multi-file tabs, dirty-dot indicator,
Ctrl+Ssave, themes, markdown preview (.mdopens straight into preview), syntax highlighting for ~90 languages. - Global search & replace — VSCode-style find/replace across the workspace: regex, whole word, case sensitivity, context lines,
files to include/exclude, per-file and replace-all with confirmation (Ctrl+Shift+F/Ctrl+Shift+H). - Git source control — VSCode SCM layout: branch switcher with sync counts, staged/changes groups with count badges, status letters, stage/unstage/discard, commit / commit & push / commit & sync, pull/push/sync, history with per-commit changed files, and right-side Monaco diff views (HEAD↔index, index↔worktree, commit↔parent) (
Ctrl+Shift+G). - Terminal — real shell via node-pty (PowerShell Core by default), tabs and side-by-side splits, font picker from installed fonts, survives drawer hide/show and session switches (`Ctrl+``).
- C# LSP — hover, go-to-definition and references via a lightweight LSP bridge (csharp-ls).
- Chat file links open in the drawer — clicking a path link in a
read/write/edittool card opens the file in the drawer instead of the OS default app. - State persists — open tabs, active file, tree expansion and drawer width survive drawer close/reopen (isolated per workspace).
Requirements
- DeepSeek Harness web profile (
dsh web), any recent version - Runtime network access to CDNs: Monaco (
cdn.jsdelivr.net→unpkg.com→registry.npmmirror.com, override withwindow.__DSH_MONACO_BASE__), xterm.js, and vscode-icons (cdn.jsdelivr.net) node-ptybuilds on install (prebuilt binaries for common platforms)- Optional language servers for hover / go-to-definition / find-references (everything else works without them):
LSP dependencies
Both servers are optional. The status dot in the drawer's status bar shows
idle / connecting / analyzing / ready / error for the combined LSP state;
install the server for a language and restart dsh to enable it.
C# — csharp-ls (resolved from ~/.dotnet/tools first, then PATH):
# requires the .NET SDK (https://dotnet.microsoft.com/download)
dotnet tool install --global csharp-ls
# verify:
csharp-ls --versionTypeScript / JavaScript — typescript-language-server (resolved from the
profile's node_modules first, then PATH). The host also pins
TSSERVER_PATH to a local or global typescript tree automatically:
# requires typescript 5.x — native TypeScript 7 ships no tsserver.js and
# will not work as the language server backend
npm install -g typescript-language-server "typescript@5"
# verify (Windows: use the .cmd entry, not the extensionless shim):
where typescript-language-serverWindows note: the host picks the first real binary from
whereoutput (.cmd/.exe), so the extensionless npm shim is skipped automatically. After a global install, restart dsh so itsPATHpicks the new binary up.
Install
The package is a dual-face dsh plugin: a host half (HTTP routes for files, git, terminal and LSP bridges) plus a browser half (the workbench UI).
# 1. install into the web profile's workspace
cd ~/.dsh/profiles/web # or %USERPROFILE%\.dsh\profiles\web on Windows
pnpm add @kefengwei/dsh-workbench
# 2. register the loader entry in the profile patch layer
# append to ~/.dsh/profiles/web/cordis.patch.yml:
#
# - insert:
# - id: workbench
# name: '@kefengwei/dsh-workbench'
# inject: [webServer]
# 3. restart dsh web, then Ctrl+Shift+R the pageThe session header gains a sidebar icon that toggles the drawer.
Development
npm install
npm run build # builds lib/client.js (browser half) + copies lib/index.js (host half)
npm run watch # rebuild on changeLayout of a published package:
lib/index.js host half — /monaco-fs, /monaco-git, /monaco-lsp, /monaco-term routes
lib/client.js browser half — the workbench UI (module-table factory bundle)
src/client.js source of the browser half
src/index.js source of the host half
src/lsp.js C# LSP client (host-side stdio bridge + browser-side providers)Host routes
All filesystem/git paths are confined to the session workspace root; paths escaping the root are rejected with 403.
| Area | Route | Purpose |
| --- | --- | --- |
| fs | /monaco-fs/root, /list, /read, /write, /search, /grep | workspace listing, read/write, quick-open, global search |
| git | /monaco-git/status, /diff, /stage, /unstage, /commit, /discard, /stage-all, /unstage-all, /discard-all, /pull, /push, /sync, /commit-push, /commit-sync, /branches, /checkout, /branch-create, /log, /log-files, /commit-diff, /show-file | VSCode-style source control |
| lsp | /monaco-lsp (WebSocket upgrade) | csharp-ls stdio bridge |
| term | /monaco-term (WebSocket upgrade) | node-pty bridge |
How the browser half registers
conversation.session.header.utilities— the drawer trigger button (right of "Session log")shell.overlay— the drawer surface- A capture-phase
clickinterceptor routes chat_fileLinkbuttons into the drawer
Uninstall
# remove the entry from ~/.dsh/profiles/web/cordis.patch.yml
cd ~/.dsh/profiles/web && pnpm remove @kefengwei/dsh-workbench
# restart dsh webLicense
MIT
