Introduction¶
DeepSeek Harness (DSH) adopts a plugin-based architecture, aiming to solve development pain points in specific scenarios through modular components. During development, frequently switching windows to check file contents or compare code diffs usually affects efficiency. fdtree aims to solve this problem. It embeds a file directory tree and a real-time Diff view into the DSH interface, providing an always-visible, non-floating file browsing experience.
Core Features¶
1. Four-Column Layout and Multi-Tab Support¶
The interface uses a four-column layout (native sidebar | chat area | file content | file tree), always occupying its column and not floating. The content column is collapsed by default, showing only the file tree. Multiple tabs can be opened, and file content and Diff are integrated into a single view, eliminating frequent context switching.
2. Real-Time Red/Green Diff Display¶
The Diff view displays deleted lines (red), added lines (green), line numbers, and statistics (+N -N). It supports syntax highlighting for 22 languages (including JS/TS, Python, JSON, Markdown, etc.).
3. Smart Mode Switching¶
The plugin automatically switches modes based on the workspace environment:
* Git Mode: Automatically detects whether the workspace is located inside a Git repository (including parent directories). Once enabled, it compares against HEAD and displays changes, untracked files, and deletions in real time. Differences automatically reset to zero after git commit.
* Baseline Mode: Non-repository directories automatically use Baseline Mode and compare against the snapshot taken when opened. It supports the “📌 Set Baseline” feature.
4. Auxiliary Features¶
- Terminal Integration: Right-clicking a directory tree node can pop up a context menu, open a terminal on the host system, and automatically position to the target location. It supports one-click
cdto the selected directory (supports Windows PowerShell/cmd, macOS Terminal.app, and Linux desktop terminals). - Performance Optimization: Optimized for large files;
FsVersionchange detection avoids repeated disk reads.
Installation and Enablement¶
Install it in the DSH web profile on the target machine:
# 方式一:通过 Git 仓库地址安装
dsh plugin --profile web add "https://github.com/musclePatrickStar/fdtree.git"
# 方式二:通过 SSH 安装(注意必须使用 git+ssh:// 完整格式)
dsh plugin --profile web add "git+ssh://git@github.com/musclePatrickStar/fdtree.git"
# 方式三:通过本地路径安装
dsh plugin --profile web add "file:/path/to/fdtree"
Update the plugin:
# 拉取最新提交并重新解析安装(git 依赖按提交哈希锁定,必须 update 才会升级)
dsh plugin --profile web update fdtree
Uninstall the plugin:
dsh plugin --profile web remove fdtree
Security and Restrictions¶
- No External Network Requests: The client only communicates with the local DSH web server through same-origin
fetch('/fdtree/rpc')and does not connect to any external domain; no telemetry, no reporting. - Read-Only Workspace: The plugin only reads files inside the current session workspace (with path boundary checks). Git commands run locally only and are subject to DSH sandbox policies, and never execute
fetch/pull/push. - Session Isolation: Before a session is bound, all RPCs are rejected (
NO_SESSION), and no paths or file contents are exposed. - Terminal Functionality: It is triggered only when the user explicitly right-clicks, and the target directory is restricted to the workspace.
- Data Localization: All content is rendered and displayed in your own browser and is not sent to any server.
- Trust Model: Installation means trust and is equivalent to executing the plugin author’s code.
Conclusion¶
fdtree provides a lightweight file browsing and Diff tool. Through a true embedded layout and smart mode switching, it optimizes the development experience in DSH. For developers who frequently need to check file structures and code changes, this plugin can effectively reduce the cost of switching interfaces.
- GitHub Repository: https://github.com/musclePatrickStar/fdtree
- Plugin Directory: https://www.skillhub.cn/plugins/musclePatrickStar/fdtree