dsh-at-file
FSMargoo/dsh-at-fileCodex 风格的 `@file` 文件引用,输入框里直接搜索并引用工作区文件。
在DeepSeek Harness Web GUI 中浏览工作区的目录/文件,并结合 Git 显示文件改动。
简体中文 | English
A DeepSeek Harness (dsh) Web GUI plugin — browse the session workspace directory tree, view file contents, and manage Git the VS Code way (stage / commit / pull / push / switch branches / discard changes / line-level diff), right inside the conversation view.
dsh-workspace-files adds a "Files" tab to the dsh Web GUI conversation view (conversation.view), alongside "Chat" and "Trajectory". It lets you:
cwd);M/A/D/R/?) on files and view diffs line by line;.) dimmed.git diff --no-index, so its added lines still show), with a line-number gutter that stays pinned during horizontal scroll.MM), with a change-count badge;Ctrl/⌘+Enter to commit;403.git binary, or a binary/untracked file each yields a well-formed response; the frontend hides the Git entry and falls back to plain browsing.dsh CLI) installed and runnable, with the web profile enabled.PATH; when absent, the plugin degrades to file browsing only.Download the tarball for the version you want from the GitHub Release, then install (web profile):
dsh plugin --profile web add ./dsh-workspace-files-0.1.2.tgz
Or install straight from GitHub:
dsh plugin --profile web add github:sqfcyily/dsh-workspace-files
After installing, reopen the dsh Web GUI and a "Files" tab appears at the top of the conversation view.
dsh plugin --profile web remove dsh-workspace-files
http://127.0.0.1:3080).Ctrl/⌘+Enter also works);The workspace root is taken from the current session's cwd (the session header dsh records). The plugin resolves it from the host by sessionId — no need to specify a path manually.
confine(root, target), ensuring the target stays within the session workspace root; otherwise 403 is returned. Every path argument in a Git operation is likewise bounded via confinedRelPaths.binary: true flag.GET; Git write operations (stage / unstage / discard / commit / pull / push / checkout / commit-message) use POST. There is no filesystem write / delete interface — writes are Git-only.execFile calling git directly (no shell, no string concatenation), with the working directory pinned to the session workspace root, to avoid command injection.git checkout -- and removes untracked files with git clean -fd; the frontend always shows a confirmation dialog first. Be aware it cannot be undone./api/workspace-files/session-root: resolves the session workspace root by sessionId (reads the cwd header from sessionPersistence)./api/workspace-files/list|read: directory listing, file read, path traversal returns 403./api/workspace-git/is-repo|status|diff: repo probe, status parsing (including the index/working-tree columns x/y), line-level diff for tracked/untracked files./api/workspace-git/branches|checkout|stage|unstage|discard|commit|pull|push|commit-message: branch listing/checkout, stage/unstage/discard, commit, pull, push, AI commit-message generation.is-repo returns false, and the frontend hides the Git entry./plugins/workspace-files/client.js and appears in the startup manifest.lib/ is the source:
lib/index.js host (Node) half — HTTP routes
lib/client.js browser (React) half — file-browser UI
cordis.patch.yml web profile patch (inserts the dual-face row)
package.json package manifest + dsh.bundle / dsh.client declarations
Pack an installable tarball:
npm pack
This produces dsh-workspace-files-<version>.tgz, the artifact consumed by dsh plugin add.
dsh-pluginMIT © 2026 sqfcy