dsh-multi-folder: Secondary Working Directories for DSH

Introduction

In the usage of DSH (DeepSeek Harness), the Agent is typically constrained to running within a single working directory. When handling multiple projects or folders within the same session, frequently switching working directories or adjusting permission configurations increases operational complexity.

The dsh-multi-folder plugin introduces the concept of secondary working directories to the DSH project. It allows the Agent to keep the main workspace unchanged while accessing configured secondary directories via the @ syntax, and obtains read, write, and execute permissions for these directories under the workspace-write mode.

Plugin Overview

Maintained by HelloQingTao and based on the early work of AngelosZou/dsh-multi-folder (MIT License), this plugin extends the file system capabilities of DSH, enabling the Agent to manipulate multiple auxiliary directories just like the main directory.

Core Capabilities

  • Menu Integration: Displays a “Multi-folder” entry in the Composer’s + menu. Clicking it opens a native directory browser (or falls back to a plugin-drawn directory browser if native is unavailable) or directly performs add/remove operations.
  • File Referencing: Typing @ in the input box lists files in secondary directories. Selected paths are absolute, allowing the Agent to read them directly. Supports drilling down in the directory list using the Tab key.
  • Permissions & Redirection: Under workspace-write mode, the Agent has full read, write, and execute permissions for secondary directories. Tools such as write, edit, pwsh, and bash automatically redirect context to the corresponding secondary directory.
  • Cross-window Synchronization: Configurations are stored in host-level shared storage. Modifying configurations in another window or directly editing the JSON file takes effect in the current window on the next read without needing to restart the backend.

Installation and Activation

Installing this plugin requires the following prerequisites:
* Node.js version >= 20
* DSH version >= 0.1.7

Execute the following command to install:

dsh plugin --profile web add @zfgcta/dsh-multi-folder

After installation, you must restart the DSH backend to load the plugin and refresh the browser page.

Typical Usage

Command Line Management

You can manage secondary directories via the command line tool:

/multi-folder list
/multi-folder add "D:\path\to\repo"
/multi-folder remove "D:\path\to\repo"
/multi-folder set "D:\a" "D:\b"

Interactive Referencing

Type @ in the input box, and the system will display secondary directories as independent groups. Pressing the Tab key after selecting a directory allows you to browse subdirectories.

Notes

  • Runtime Conflict: This plugin shares the runtime namespace with AngelosZou/dsh-multi-folder; do not install both simultaneously.
  • Windows ACL Limitation: In a Windows environment, if a process tree has only one writable root directory, commands remaining in the main workspace cannot create files in secondary directories. In such cases, the plugin will prompt in the tool results that the workdir parameter (pointing to an absolute path) must be passed.
  • Configuration Activation: Configuration changes take effect at message or tool call boundaries without interrupting the current session.

Summary

By introducing secondary working directories, dsh-multi-folder resolves the file operation limitations of the DSH Agent in multi-project scenarios within a single session. It provides intuitive menu integration and a command-line interface, and handles permission and path redirection details, making it suitable for developers who need to manage multiple codebases within the same environment.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye