Foreword¶
In the official DeepSeek Harness (DSH) desktop, the “Start” page on the right sidebar already provides entries for workspace file browsing and the browser. However, if you want to directly edit text or preview Markdown within the same session context, you often need to switch to an external editor. The community plugin dsh-bianji (package name bianji) adds a dedicated Editor entry to the official desktop sidebar: a file tree on the left and a Monaco editing area on the right, with read/write access limited to the current session’s workspace, and reusing the official fs and sandbox policies. The following describes what it is, what it can do, and how to install and enable it.
What Is This¶
dsh-bianji is maintained by yueyexiayu and is classified as a client-side plugin. The README positions it as a workspace file editor for the DeepSeek Harness official desktop client: it communicates with the Host via connection.fetch, does not rely on webServer, and does not use the dsh plugin --profile desktop CLI plugin workflow.
Compared with the official dsh-client-ui-sidebar-files: the official component provides the workspaceFiles.list/changes file tree, but lacks Monaco, write capability, and a CAS auto-save interface; its read also allows paths outside the workspace. This plugin retains a standalone kind: bianji, the interface name is unified as “Editor” (编辑器), it does not override the official files, and the boundaries and draft/conflict mechanisms are implemented by the plugin itself.
The current package.json version is 0.1.1. The project documentation emphasizes deep adaptation for personal use as a reference for ideas, and encourages not copying it directly.
Core Features¶
After successful installation, an Editor entry appears on the “Start” page in the right sidebar, alongside “Workspace Files” and “Browser”.
Editing and Browsing
- Left side: file tree within the current session’s workspace (
cwd). - Right side: Monaco editor; if Monaco fails to load, it falls back to a text box with line numbers.
- Supports Markdown preview; the preview outputs only escaped restricted tags and HTTP(S) links, without executing raw HTML.
Saving and Versioning
- Auto-save; each file is scheduled independently. If you continue typing during the save process, the latest draft is preserved, and after a successful save, saving continues with the new version.
- Read returns a version number; save uses
replaceIfVersion. If the file has been externally modified, replaced, or deleted, saving with the old version will conflict, and deleted files will not be recreated. - On conflict, auto-save for that file is paused, and local edits are preserved. You can first “Copy Local Content”, then “Reload” the on-disk version (reloading requires confirmation to discard unsaved content).
- If saving fails, closing the tab will not discard the draft; unsaved or conflicting drafts are retained in client memory by session, and can be recovered when returning after switching sessions or closing the sidebar. After completely exiting the application, refreshing the client, or deactivating the plugin, in-memory drafts are not retained.
Integration with Chat
- Right-click: Add to chat, copy path, open in Finder.
- Dragging a file to the chat input box inserts an
@reference.
History Sessions and Permissions
- Read/write access is limited to within the current session’s workspace
cwd. - Live Agent takes precedence; when no Agent is available, it performs a read-only parse of attached / persisted history via the official
sessionController.inspect(sessionId, signal), without calling the Agent’s create/resume, and without changing the model, events, or session ownership. - History saving follows the official
sandboxPolicy.resolve({ session }); cold history is constructed as an unpublished snapshot through the officialsessions.prepare, allowing the official sandboxMode projection to replay permissions.
Text and Paths
- Only supports strict UTF-8 text; non-UTF-8, binary, and oversized files will be explicitly rejected.
- POSIX (including macOS) paths preserve
\in filenames and do not treat them as directory separators;processPath()verifies the actual target, rejecting reproduced symlink replacement escapes (not kernel-level atomic path isolation).
Error Semantics
Missing sessionId / absolute cwd returns 400, unknown session returns 404, missing check service returns 503, persistence read or corruption errors return 500; errors are not disguised as an empty workspace. Saving is rejected when security policies or prepare services are missing.
The plugin does not include an installer, account, or credentials. Version protection shares the same instance and write lock with the official AI file tools, but there is still a brief window of contention with other editors between version checking and atomic replacement, so it should not be understood as an absolute guarantee against arbitrary external writes.
Installation and Activation¶
Copy the plugin to $DSH_HOME/plugins/bianji (the default $DSH_HOME is ~/.dsh), and write the following to $DSH_HOME/profiles/desktop/cordis.patch.yml:
- insert:
- id: bianji
name: ../../plugins/bianji/lib/index.js
Completely exit DeepSeek Harness (macOS: ⌘Q) and then reopen it. Expand the right sidebar, and Editor will appear under “Start”.
Typical Usage¶
- Start the official DSH desktop and complete the installation and restart described above.
- Open or create a session with a workspace
cwd. - Click Editor on the right “Start” page, and select a UTF-8 text file from the left tree to edit it; you can enable Markdown preview when needed.
- Rely on auto-save, or watch for conflict prompts: when a file has been changed externally, follow the on-screen instructions to copy local content or confirm and reload.
- When you need to hand a file to the model: right-click “Add to chat”, or drag it to the input box to generate an
@reference.
Editing shortcuts are limited to the editing area; file drag-and-drop references are limited to the chat input area. If a directory or file request fails, an error will be displayed with a retry option.
Use Cases and Notes¶
Who It’s For
- Users who mainly develop in the DSH official desktop and want to edit code or Markdown within the same session workspace without frequently switching to an external IDE.
- Scenarios that need alignment with the official session sandbox, history permissions, and
fsversion writes.
Things to Note Before Use
- The plugin runs with the permissions of the current DSH process; before installing, you should read the GitHub source code and the repository license yourself to confirm that its security and boundary descriptions are acceptable.
- The README specifies that it is for the official desktop (
connection.fetch); if your environment is not this form, please first check whether the Host version and the plugin documentation match. The material has been regression-verified on a read-only unpacked reference of DSH 0.2.1-alpha.2, which does not mean that behavior is consistent across all versions. - Only UTF-8 text; encodings such as GBK, binary files, and large files will be rejected.
- Before exiting the application, please copy or complete the save of any in-memory drafts that have not yet been written to disk.
The DSH ecosystem emphasizes “everything is a plugin”; the SkillHub directory page is a community site and has no official affiliation with DeepSeek / High-Flyer.
Conclusion¶
dsh-bianji complements the official desktop sidebar with “in-session workspace text editing”: file tree, Monaco, preview, auto-save, version conflicts, and @reference all in one, strictly limited to cwd and reusing the official sandbox and fs. If you need to directly edit repository files within Harness, you can enable it by copying the directory according to the README and patching the desktop profile.
- Directory page: https://www.skillhub.cn/plugins/yueyexiayu/dsh-bianji
- GitHub: https://github.com/yueyexiayu/dsh-bianji