Introduction

DSH extends capabilities through plugins. dsh-remote-workspace is a remote workspace plugin maintained by FYL1025. It targets a specific scenario: handling files, code, and commands on remote SSH servers within a DSH Web session, rather than relying solely on local files or opening a separate terminal.

What is this

FYL1025/dsh-remote-workspace is a DSH plugin positioned as “Remote Workspace for DSH”. It reuses local SSH connection methods, allowing the web interface to connect to one or more servers and opening a workspace panel next to the chat. The license is MIT.

Core Features

  • Multi-server connection management: Supports SSH aliases (the Host in ~/.ssh/config) or host/port/user modes, with the ability to switch at any time; connection configurations are saved in browser localStorage.
  • Connect / Disconnect: One-click verification and to maintain/release the active server connection status.
  • File tree browser: Lazy loading for expand/collapse, toggle hidden files, show icons by type, and support one-click copy path.
  • Code editor: Line numbers + syntax highlighting preview (keywords/strings/comments/numbers/decorators), editable and saveable back to the server.
  • Command executor: Run commands on the server; working directory follows the currently open file.
  • Dock / Float dual mode: Docked next to the chat; the chat area can be rearranged and the separator line dragged; or widened into a floating panel, max 1400px.
  • Direct session operation: Allow the agent to directly operate on server files within the chat.

Installation and Enablement

First, confirm the environment: Node.js ≥ 18, pnpm, and a DSH profile (usually web).

The plugin relies on local SSH passwordless login (key-based passwordless login). If not yet configured, complete the passwordless login based on host/port/user or SSH alias first to ensure you can connect to the target server with SSH later.

Installation command:

dsh plugin --profile web add git+ssh://git@github.com/FYL1025/dsh-remote-workspace.git

After installation, restart DSH and open Settings -> Remote Workspace.

Typical Usage

  1. Add the server (SSH alias or host/port/user) in Settings -> Remote Workspace and select it as the current connection.

  2. Click Connect to verify connectivity; after success, the button changes to Disconnect.

  3. Click Open Workspace Panel; the file browser appears next to the chat.

  4. Expand directories and click on files: use Preview to view syntax highlighting; use Edit to modify and click Save to write back to the server.

  5. Run commands in the command executor at the bottom, for example:

ls -la
python train.py
  1. Click Widen to widen into a floating panel and drag the edge to resize.

Applicable Scenarios and Notes

Suitable for people who need to frequently view remote text files, modify code, and run commands in a DSH session, especially scenarios where remote operations are desired to remain within the current DSH Web interface.

Notes before use:

  • The plugin reads text files ≤ 2MB; larger files need to be processed by the agent via chat.
  • Connection configurations (alias/host/port/user) are stored in browser localStorage; passwords or private keys are not stored.
  • The plugin runs ssh commands with the permissions of the current DSH process, using the danger-full-access strategy. This is equivalent to the user running ssh in the terminal themselves, but limited to commands initiated by this plugin.
  • Before installation, check the source code and license to confirm acceptance of its access model.
  • Restart DSH after installation.

Links

GitHub: https://github.com/FYL1025/dsh-remote-workspace

Plugin directory listing page (independent community directory listing, not verified in this material): https://www.skillhub.cn/plugins/FYL1025/dsh-remote-workspace