Introduction¶
When developing intelligent agents in the DeepSeek Harness (DSH) Web GUI environment, developers often need to inspect the file context within the current session workspace (cwd). The native interface lacks direct file tree browsing capabilities and usually requires relying on external terminals or file managers. The dsh-workspace-files-explorer plugin adds this feature to the DSH Web GUI by providing file tree browsing and preview capabilities through a floating panel.
Core Features¶
This plugin mainly includes the following features:
-
Floating Panel and Interaction
- The panel is registered in
shell.overlayand is docked in the top-right corner by default. - It supports dragging the title bar to move the panel and dragging the bottom-right corner to resize it (size range: 400-1400x280-900).
- It provides close and refresh buttons.
- A “Workspace Files” button is registered in the session title bar action area to toggle the panel visibility.
- The panel is registered in
-
File Tree Display
- Supports directory-first sorting and lazy-loading expansion.
- Hidden files (files starting with a dot) are displayed with reduced opacity.
- Displays file sizes.
- If a single directory contains more than 500 items, a truncation notice is shown, with a one-click refresh option provided.
-
Preview Capabilities
- Code Preview: Supports 30+ languages (such as JS/TS/Python/Go/Rust, etc.), with line numbers and lightweight syntax highlighting. The theme automatically adapts to the system light/dark mode. Very long files are truncated.
- Markdown Preview: Supports rendering headings, lists, tables, quotes, links, and code blocks. HTML is escaped before rendering, and links are allowed only with
http/httpsprotocols, withrel="noopener noreferrer"forced.
Installation and Enablement¶
It is recommended to use the installation method for a persistent experience.
dsh plugin --profile web add github:YZz-S/dsh-workspace-files-explorer
After installation, the plugin becomes effective automatically, and the “Workspace Files” button appears in the session title bar action area.
If a temporary test is needed, a dynamic loading method can also be used. In a DSH Web GUI session, call cordis_define, paste the content of host.js as code.host, paste the content of client.js as code.client, and then call cordis_run to activate it.
Notes¶
- Permissions and Security: The plugin only reads files and directory listings within the current session workspace. It does not initiate external network requests, does not write files, and does not collect telemetry data. All path access must pass validation via
fs.contains. HTML is escaped before rendering content to prevent XSS injection. - File Limits: Binary files or text files larger than 256 KB only show a notice and cannot be previewed. Syntax highlighting is a built-in lightweight implementation, not full semantic highlighting.
- Session Dependency: The panel follows the current session by default. When switching sessions, the workspace root directory is reset automatically.
- Dynamic Plugin Limitations: Dynamic plugins loaded via
cordis_defineonly exist within the current process. After restarting DSH, the definition command must be run again to use the plugin.
Summary¶
This plugin provides DSH Web developers with a lightweight and secure local file browsing solution. Through a floating panel and session binding, it allows rapid locating and previewing of files in the current context, assisting code debugging and agent development.
- GitHub: https://github.com/YZz-S/dsh-workspace-files-explorer
- DSH Plugin Directory: https://www.skillhub.cn/plugins/YZz-S/dsh-workspace-files-explorer