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

  1. 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.

  2. 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.

  3. 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)

  4. Extensible Viewers
    Custom viewers can be registered using registerViewer to support additional file types.

  5. File Operations
    After selecting a file or directory in the file tree, it supports renaming, moving, copying, and deleting.

  6. Keyboard Shortcut
    Use Ctrl / Cmd + Shift + E to quickly toggle the visibility of the file drawer.

  7. Row Menu Selection
    In the file tree row menu (usually “···”), select “Open with…” to specify a viewer for a particular file.

Typical Usage

  1. Open the File Drawer
    Click the “Files” button on the left edge of the page, or press the shortcut Ctrl / Cmd + Shift + E. The file tree will slide out from the left side.

  2. 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.

  3. 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 via registerViewer.

Notes

  1. 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

  2. Binary Detection
    The plugin detects whether a file is binary by scanning for NUL bytes.

  3. Path Restrictions
    All file operation paths must be within the current workspace. Paths outside this scope will be rejected.

  4. 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.