在 DeepSeek Harness (DSH) 的开发与调试流程中,智能体生成的代码往往散落在文件系统的各个角落,且通常只能在聊天窗口中看到指令摘要。开发者通常需要手动在编辑器中对比文件内容与输出记录,这在处理大量变更或需要精细回滚时效率较低。dsh-workspace-studio 旨在解决这一问题,它将 DSH Web UI 转换为一个具备代码浏览、差异审查和 Trae 风格块级部分撤回能力的轻量级工作区。

是什么

这是一款 DeepSeek Harness 插件,由 houlain 维护。它提供工作区文件浏览、代码查看、会话级变更审查以及基于块(hunk)的局部撤回功能。插件在 Windows 平台上经过验证,采用 MIT 许可证。

核心功能

  1. 工作区文件浏览器:支持可折叠的文件树,内置忽略规则过滤构建噪音(如 node_modules, dist 等)。包含变更的文件夹会自动展开并显示计数徽章,修改的文件带有标记。
  2. 代码查看器:点击文件即可查看内容,显示行号。
  3. 变更审查:以 Git 风格的差异展示 Agent 的 write / edit 操作,支持行级块(hunks)展示,并通过 SSE 实时更新变更状态。
  4. 块级部分撤回与接受:支持针对单个变更块进行“撤回此块”或“认可”操作。被认可的块不再显示或标记,撤回操作受冲突保护机制约束。
  5. 会话级变更跟踪:每个会话独立记录变更记录,只显示当前会话内的变更。

安装与启用

使用官方提供的命令安装插件:

dsh plugin --profile web add github:houlain/dsh-workspace-studio

安装完成后,重启 dsh web 并打开一个新的会话。

典型用法

  1. 在 Web UI 打开会话,切换到“Studio”标签页(位于“Chat”旁)。
  2. 左侧面板显示工作区文件树:
    • 点击文件可在右上角查看内容,在右下角查看变更面板。
    • 文件夹可折叠,包含变更的文件夹会自动展开。
  3. 在变更面板中,每个变更块提供“撤回此块”或“认可”按钮。
  4. 使用“撤回全部修改”可将文件恢复至该会话初始状态(删除新建的文件),或使用“清空”移除变更记录。
  5. “Studio”标签页的徽标会实时显示仍有待处理变更的文件数量。

注意事项

  • 平台限制:插件仅在 Windows 上经过验证,Linux/macOS 未测试。路径处理、Shell 行为及沙盒交互可能存在差异,非 Windows 系统使用需谨慎。
  • 数据范围:变更跟踪仅针对 Agent 调用的 write / edit 工具,用户在编辑器中直接修改的文件不会被记录。
  • 隐私与安全:无遥测、分析或外部网络调用,所有路由均为同源。不读取或存储凭证、API 密钥或环境变量。
  • 容量限制:为了防止内存溢出,单文件最大记录 100 次操作,快照大小限制为 120KB。超过限制的操作仅记录元数据,不可撤回。

总结

dsh-workspace-studio 通过将文件系统状态与聊天上下文结合,提供了类似 Trae 的精细代码审查体验,提升了 DSH 的调试与审查效率。更多细节与源码可参考插件目录或 GitHub 仓库。

In the development and debugging workflow of DeepSeek Harness (DSH), code generated by agents is often scattered across various parts of the file system, and instructions are usually only visible as summaries in the chat window. Developers typically have to manually compare file contents with output logs in an editor, which is inefficient when handling large numbers of changes or performing fine-grained rollbacks. dsh-workspace-studio aims to address this issue. It transforms the DSH Web UI into a lightweight workspace with code browsing, diff review, and Trae-style hunk-level partial rollback capabilities.

What It Is

This is a DeepSeek Harness plugin maintained by houlain. It provides workspace file browsing, code viewing, session-level change review, and hunk-based partial rollback. The plugin has been validated on Windows and is released under the MIT License.

Core Features

  1. Workspace File Browser: Supports a collapsible file tree and built-in ignore rules to filter build noise (such as node_modules and dist). Folders containing changes are automatically expanded and show a count badge, while modified files are marked.
  2. Code Viewer: Click a file to view its content, with line numbers displayed.
  3. Change Review: Displays agent write / edit operations in Git-style diffs, supports hunk-level display, and updates change status in real time via SSE.
  4. Hunk-Level Partial Rollback and Approval: Supports “Revert this hunk” or “Approve” actions for individual change hunks. Approved hunks are no longer displayed or marked, and rollback actions are constrained by a conflict-protection mechanism.
  5. Session-Level Change Tracking: Each session independently records changes and only displays changes within the current session.

Installation and Enablement

Install the plugin using the officially provided command:

dsh plugin --profile web add github:houlain/dsh-workspace-studio

After installation, restart dsh web and open a new session.

Typical Usage

  1. Open a session in the Web UI and switch to the “Studio” tab (next to “Chat”).
  2. The left panel displays the workspace file tree:
    • Click a file to view its content in the upper-right corner and the change panel in the lower-right corner.
    • Folders can be collapsed, and folders containing changes are automatically expanded.
  3. In the change panel, each change hunk provides “Revert this hunk” or “Approve” buttons.
  4. Use “Revert all changes” to restore a file to its initial state in the session (deleting newly created files), or use “Clear” to remove change records.
  5. The badge on the “Studio” tab displays the number of files with pending changes in real time.

Notes

  • Platform Limitation: The plugin has only been validated on Windows and has not been tested on Linux/macOS. Path handling, Shell behavior, and sandbox interactions may differ, so use it cautiously on non-Windows systems.
  • Data Scope: Change tracking only covers write / edit tool calls made by the agent. Files modified directly by users in an editor are not recorded.
  • Privacy and Security: There is no telemetry, analytics, or external network calls; all routes are same-origin. Credentials, API keys, and environment variables are not read or stored.
  • Capacity Limits: To prevent memory overflow, each file records at most 100 operations, and snapshot size is limited to 120KB. Operations exceeding the limit are recorded as metadata only and cannot be reverted.

Summary

dsh-workspace-studio combines file system state with chat context to provide a Trae-like fine-grained code review experience, improving the debugging and review efficiency of DSH. More details and source code can be found in the plugin directory or GitHub repository.