In the development and debugging of DSH Web, viewing the file tree and file contents directly from the workspace is a common operation. This plugin provides DSH Web with an integrated file browser: it displays the workspace file tree in a left-side drawer and provides a draggable preview panel on the right, making it convenient for developers to quickly browse and inspect files.
What Is It¶
dsh-file-explorer is a client-side plugin maintained by wolfsonliu. It adds file browsing capabilities to DSH Web, primarily addressing the need to inspect workspace file structures directly from the web interface.
Installation and Enablement¶
Run the following command in the terminal to install the plugin:
dsh plugin --profile web add github:wolfsonliu/dsh-file-explorer
After installation is complete, start DSH Web to use it.
Core Features¶
-
Floating Entry
There is a floating “Files” button on the left edge of the page. By default, it is collapsed into a small handle so that it does not interrupt the main workspace. Click it to expand or toggle the file drawer. -
Left-Side Drawer and File Tree
The drawer occupies the full height on the left side of the page, and its title bar includes a close button. Inside, it displays the file tree structure of the current session workspace, with support for searching, sorting (by name, size, or modified time), and toggling the display of hidden files. -
File Preview
After clicking a file, a draggable and resizable preview panel appears on the right. The plugin has built-in support for the following file types:
* Text
* Markdown
* Images
* CSV
* Binary files (displayed as a hex dump) -
Extensible Viewers
Custom viewers can be registered usingregisterViewerto support additional file types. -
File Operations
After selecting a file or directory in the file tree, it supports renaming, moving, copying, and deleting. -
Keyboard Shortcut
UseCtrl/Cmd+Shift+Eto quickly toggle the visibility of the file drawer. -
Row Menu Selection
In the file tree row menu (usually “···”), select “Open with…” to specify a viewer for a particular file.
Typical Usage¶
-
Open the File Drawer
Click the “Files” button on the left edge of the page, or press the shortcutCtrl/Cmd+Shift+E. The file tree will slide out from the left side. -
Switch Viewers
Select “Open with…” from the title bar of the preview panel or from the file tree row menu to switch the viewer used for the current file. This helps handle multiple file types. -
Extend Preview Capabilities
If you need to view more file types, you can install additional viewer plugins. The plugin will automatically register them into the file browser viaregisterViewer.
Notes¶
-
Preview Size Limits
The plugin imposes limits on preview file size to prevent memory exhaustion:
* Text files up to 2 MiB
* Image files up to 10 MiB
* Binary files up to 64 KiB -
Binary Detection
The plugin detects whether a file is binary by scanning for NUL bytes. -
Path Restrictions
All file operation paths must be within the current workspace. Paths outside this scope will be rejected. -
Hidden Files
Hidden files (files beginning with a dot) are not displayed by default, but they can be enabled through the UI settings.
Conclusion¶
dsh-file-explorer simplifies workspace file management in DSH Web by providing native file tree browsing and extensible preview capabilities. For developers who frequently inspect code, configuration, or data, this plugin improves local debugging efficiency.