The native “Workspaces” functionality in the DSH Web left sidebar is fairly limited, making it difficult to meet requirements for fine-grained management of directory hierarchy and session environment isolation. The dsh-workspace-tree plugin rebuilds the left sidebar, turning “Workspaces” into a dual-mode file-system tree and achieving session environment isolation through strong directory binding.
Plugin Introduction¶
This is a client-side plugin maintained by liceses. Its core goal is strong directory binding—a session’s cwd is exactly the directory it belongs to, enabling true environment isolation. The plugin uses dual-mode rendering to cover both file-system browsing and session management.
Core Features¶
-
Dual modes
- Folder Mode: Displays the complete file-system directory tree; workspace nodes show session counts. Supports hover actions: create new session (automatically registers the workspace,
cwd= directory) and add as workspace. - Workspace Mode: Shows only workspace nodes, nested by directory hierarchy. Used to manage sessions (rename/fork/archive) and workspaces (rename/delete).
- Folder Mode: Displays the complete file-system directory tree; workspace nodes show session counts. Supports hover actions: create new session (automatically registers the workspace,
-
Search and filtering
- Provides a search box between the mode-switch button and “New Session”.
- Supports filtering by session title or folder name using case-insensitive substring matching.
- Workspace Mode: hides non-matching items and force-expands matched groups; Folder Mode: prunes the directory tree based on name matches or descendant sessions, and inline lists matching sessions under matched workspace nodes.
-
Interaction and state
- Drag-and-drop sorting: Supports drag-and-drop reordering.
- State pass-through: Session running states (e.g., green completed dot, running matrix animation, amber dot) are preserved.
- Memory: Expansion state and mode selection are both remembered via
localStorage.
Installation and Enablement¶
Install via the plugin command:
dsh plugin add .
Or inject at runtime using dsh-super-injector (no restart required):
dev_inject_plugin {"dir": "D:/developing/DSH-plugin/dsh-workspace-tree"}
Typical Usage¶
- Browse and create: In Folder Mode, hover over any directory and click “+ New Session”. The session’s
cwdwill be the current directory, and it will be automatically registered as a workspace. - Filter and manage: Enter a keyword in the search box to filter sessions or folders in real time. After clearing the search, the previous collapse/expand state is automatically restored.
- Session management: Switch to Workspace Mode to rename a session, fork it, or archive it. You can also rename or delete a workspace itself.
Compatibility and Notes¶
- Priority: Runs with
priority: -1, replacing the official browser (shadowing in ascending order, lowest rendering). - Conflict handling: Does not declare a
childrenslot to avoid conflicts with the officialsidebar.workspaces.directoryFlow. - Data residue: No residual data remains after uninstallation (zero persistence); the official browser will be automatically restored.
Conclusion¶
This plugin solves the problem of messy workspace management in DSH Web through a dual-mode tree structure. It is suitable for developers who need strict directory isolation and fine-grained session management. For more details, see the Plugin Directory or source code.