Preface¶
When processing code in DSH Web sessions, it is often necessary to view file structures, git diffs, and commit history simultaneously, while also referencing a file path into an input box. If you do not want to switch back and forth between external IDEs, terminals, and browsers, you need a plugin that can be pinned to the side of the session.
DSH plugin extensions can be understood under the philosophy of “Everything is a Plugin.” The plugin directory page can be viewed as an independent site or plugin listing, and should not be understood as the DeepSeek or HF official app store. Below is an introduction to pang123hui/dsh-workspace-sidebar.
Plugin Positioning¶
dsh-workspace-sidebar is a DSH Web plugin used to add a workspace sidebar on the right.
It primarily covers four categories of content:
- File tree
- Git diffs
- Commit history
@filereference
Maintained by pang123hui, license MIT, version 0.1.0.
Core Features¶
File Browsing¶
The file view supports directory tree lazy loading.
The following operations can be performed:
- View file
- Rename file
- Delete file
- Preview Markdown
- Preview code highlight
File renaming and deletion are triggered via the “⋯” menu on the file line.
The file view has an auto-refresh mechanism: the refresh interval is 2s, and it uses a single in-flight request strategy to avoid multiple refresh requests overlapping.
Git Diff¶
The plugin provides a list of changed git files.
Status meanings are:
M: ModifiedD: DeletedU: New
When multiple statuses appear for the same file, the priority is:
M > D > U
After clicking a changed file, you can view the diff for that file.
The diff view also has an auto-refresh mechanism: the refresh interval is 4s, and it uses a single in-flight request strategy.
Commit History¶
Commit history uses git log --graph to display the commit tree.
The usage is:
- Click a commit.
- Expand the files changed by that commit.
- Click a file to view the diff for that commit.
@File Reference¶
When hovering over a file line, the “@” button appears.
After clicking the “@” button, it appends the @relative_path to the input box.
Suitable for quickly referencing files in the current project during a conversation.
Sidebar Interaction¶
The sidebar docks on the right side of the workspace, can be dragged to adjust the width, and pushes the session area to the left.
Installation & Enablement¶
Install from GitHub¶
First, add the plugin from GitHub using the following command:
dsh plugin --profile web add github:pang123hui/dsh-workspace-sidebar
After installation, you need to restart dsh web. You can stop it in the terminal with Ctrl+C and run it again, then perform a hard refresh in the browser.
Install from npm¶
The npm installation command is provided in the README:
dsh plugin --profile web add dsh-workspace-sidebar
This command is marked as for use after release in the README. This article does not use it as a currently confirmed available installation source.
Manual Installation¶
If you are not using the dsh plugin command, you can install manually.
Step 1: Link the plugin package to:
~/.dsh/profiles/node_modules/dsh-workspace-sidebar
Step 2: Add the following to ~/.dsh/profiles/web/cordis.patch.yml:
- insert:
- id: workspace-sidebar
name: 'dsh-workspace-sidebar'
How Changes Take Effect¶
If the change is on the client side, a hard browser refresh is sufficient.
If the change is on the host side, you need to restart dsh web.
Typical Usage¶
Below is a set of reproducible usage paths.
- Install the plugin:
dsh plugin --profile web add github:pang123hui/dsh-workspace-sidebar
- Restart DSH Web:
dsh web
-
Perform a hard refresh on the page in the browser.
-
Open the workspace sidebar on the right.
-
In the file view, expand the directory tree and click a file to view Markdown or code preview.
-
Hover over a file line and click the “@” button to append
@relative_pathto the input box. -
Switch to the diff view to view the
M,D,Ufile list. -
Click a file to view the diff.
-
Switch to commit history, click a commit to expand changed files, and click a file to view the diff for that commit.
Suitable Scenarios & Notes¶
Who is it for¶
If you use DSH Web sessions and want to complete the following directly in the browser, this plugin might be suitable for you:
- Browse project files
- Rename or delete files
- View Markdown and code previews
- View git changes
- View the diff of a specific file
- View commit history
- View file changes in a specific commit
- Append
@relative_pathto the input box
Permissions & Security Risks¶
The write operations of this plugin have bypassed the DSH shell sandbox.
Specifically includes:
- File deletion uses Node fs inside the host process
- File renaming uses Node fs inside the host process
- Git operations are executed via
sandboxPolicy: danger-full-access
Therefore, it is no longer restricted by the session workspace. Any directory might be deletable, editable, staggable, and commit-able.
It is recommended to check the source code and confirm the license and usage before installation.
ACL Limits¶
File system-level ACL denials cannot be bypassed.
For example, on the Windows layer, if a directory is explicitly locked for writing by an external tool, such as via:
icacls ... /deny
resulting in a write denial, administrator privileges are required to remove the corresponding DENY.
Read-only browsing is not affected by ACL write denials.
Dependency Constraints¶
The plugin’s peerDependencies include:
@deepseek-ai/cordis ^4.0.1
@deepseek-ai/dsh-client-runtime ^0.1.0-rc.7
react ^18.2.0
Links¶
GitHub:
https://github.com/pang123hui/dsh-workspace-sidebar
Directory page listing:
https://www.skillhub.cn/plugins/pang123hui/dsh-workspace-sidebar
Note: This directory page URL did not appear directly in the scraped materials referenced in this draft, and is only listed here as a plugin clue.