Git-first file-tree sidebar for the DSH web GUI: VS Code-style indent guides, M/A/U/D/R git decorations, HEAD-vs-worktree diff preview, media preview, and drag-to-reference (files/folders/selected code with line numbers) — pure plugin.
Install
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:No-PRM/dsh-explorer#path:/dsh-plugins/dsh-explorer
Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).
README
dsh-explorer
Host half of the collapsible real-time file-tree sidebar for the dsh web GUI. Read-only JSON endpoints over the dsh web server — the browser client's only bridge to the local filesystem and git.
Endpoints
| Endpoint | Purpose |
|---|---|
GET /filetree/list?path=<absolute> |
List one directory level: { ok, path, entries: [{ name, kind, size, mtime, hidden }], truncated }. Directories-first, case-insensitive sort; dot-entries flagged hidden; bounded-concurrency stat pool (48 workers). |
GET /filetree/root |
The host process cwd ({ ok, cwd }). |
GET /filetree/read?path=<absolute> |
Read a file for preview: 512 KB cap (truncated), NUL-byte binary detection, UTF-8 content. |
GET /filetree/search?path=<absolute>&q=<query> |
Recursive basename search (bounded: 4000 scans / 200 results / depth 14; skips .git + node_modules). |
GET /filetree/raw?path=<absolute> |
Stream a file for media preview (image/*, video/*, audio/*, PDF): proper content-type, Accept-Ranges + Range support (206 partial content for video seeking). No size cap. |
GET /filetree/gitdiff?path=<absolute> |
HEAD vs working-tree content for the preview diff: { ok, git, base, current, same, binary } (512 KB cap, binary → empty). |
GET /filetree/gitstatus?path=<absolute> |
Git status for decorations: { ok, git, root, entries: [{ path, status, x, y }], truncated? }. Status letters A/M/D/R/C/U/T (I = ignored); repo root found via rev-parse --show-toplevel; ignored entries from a collapsed --ignored pass (fast even with huge ignored trees); 2 s TTL cache. Non-repo / git-missing → { git: false }. |
- Only absolute paths are accepted (relative paths get
400 invalid-path). - Broken symlinks / unreadable sub-entries degrade to a row instead of failing.
- One level per call — the browser renders the tree lazily.
- GUI-only read surface: nothing here reaches the model prompt.
- Zero runtime dependencies (node:fs, node:path, node:child_process only).
Install
Mounted as a cordis row in the web profile's cordis.patch.yml:
- insert:
- id: filetree
name: dsh-explorer
The package lives in ~/.dsh/profiles/web/node_modules/dsh-explorer
(resolution base of the profile).
Live-deploy note: host code changes do not hot-reload. To activate an edit without restarting the app, bump the package name (e.g. copy to
dsh-explorer-v1, update thename:above) — the fresh module id loads on the next patch re-apply. A restart also works.
Links
More in this category
zhu1090093659/dsh-web#packages/dsh-git-graph★ 8262
Git branch selector and Git graph for the dsh web GUI: switch branches and explore branch-lane and commit history from the conversation header.
Akimiya-z/codex-guard#dsh★ 138
Pre-submit pull-request hygiene checks inside DeepSeek Harness: scans the current diff for TODO leftovers, hardcoded secrets, and non-conventional commit subjects.
Cerbur/clutch-dsh#clutch-dsh-worktree★ 30
Adds a Worktree view to DSH Web UI that groups Sessions by Git worktree while keeping DSH as the source of truth.
lehhair/dsh-diff-viewer★ 26
PiUI-style diff viewer replacing the stock DiffBlock for write/edit tool calls.
PerryLink/dsh-github★ 22
Official-grade GitHub CI integration: a composite action.yml, a polling PR review bot with idempotent inline comments and a status-check gate, plus PR/issues tools with every write gated by human approval.
DamonKoy/dsh-web-ui#dsh-git-graph★ 21
Git branch selector and Git graph in the conversation header of the dsh web GUI.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.