Preface¶
When developing agents in DSH, a common division of labor is: the main model handles tool invocation and file modification, while free-form long-context discussions are often better suited for the web version of DeepSeek. However, the web version itself lacks DSH’s tool and file permissions. Relying solely on the API makes long discussions consume quota; chatting only within the main session easily strains context limits and costs.
Below is an introduction to the community plugin dsh-webds-bridge (Maintainer: Sum556677). It opens the web version of DeepSeek in the DSH sidebar using the built-in browser, sends and receives messages via pure DOM automation, archives discussion progress as local memories by alias, and then injects them into the main session, allowing the local model to continue working with the context. Classified as “Memory,” the current npm version is 0.1.2, requiring DSH Desktop 0.2.1-rc.2 or higher (the README confirms it has been tested and works with 0.2.1-rc.2).
What is this¶
dsh-webds-bridge is a bridging plugin for a “Web-based plain-text discussion → Summary & Archive → Main Session Execution” workflow. It does not rely on private web interfaces or require an API Key; instead, it utilizes real web sessions within the sidebar <webview>.
The closed loop can be summarized as:
Web Plain-text Discussion → Summary & Archive (by alias, e.g., projects/alpha.md) → Main Session Executes with Progress
The plugin provides both Host and Client as a single npm package. During installation, it automatically inserts two loaders via a bundled cordis.patch.yml, so manual modification of cordis.patch.yml is generally unnecessary.
Core Features¶
Pure DOM Automation (Client)¶
Simulates interactions with the web version of DeepSeek within the sidebar browser:
- Launches the page via
ctx.sidebarRight.openTab('browser', …)and locateswebview[data-sidebar-browser-frame]in the DOM. - Uses
webview.executeJavaScriptto write input, dispatch events, and send messages; polls.ds-markdownto wait for the streaming reply to stabilize. - Restores fenced code blocks from the rendered DOM; estimates tokens by accumulating based on reply length. When the threshold is reached, it can trigger automatic continuation (Summary → New Chat → Handoff).
- When starting a new conversation, it implements multi-level click fallbacks for the “Start New Chat” button and confirms URL or message area changes within 5 seconds. If unsuccessful, it stops to avoid sending blindly.
Memory & Injection (Host)¶
- Save Memory: The summary is intelligently truncated to approximately 1800 characters and atomically written to
progress.md(or the corresponding.mdunderprojects/based on alias). Old content is archived tohistory/(keeping the last 20 files). - Dynamic Injection: Injects progress via
ctx.systemPrompt.context; changes toprogress.mdtake effect in the next assembly. - Execution Injection: Uses
ctx.sessionController.prompt()to deliver the progress as a user message to the current main session (RPCexecute).
Multi-Conversation Aliases¶
Use different aliases for different topics to avoid overwriting when switching web sessions. For example, the default alias progress corresponds to <root>/progress.md, while alias alpha corresponds to <root>/projects/alpha.md. Save and Execute always act on the same currently selected alias; the previous selection is stored in config.json under lastKey and restored upon restart. Aliases are validated via normalizeMemoryKey() to prevent path traversal.
Settings Page & Session Bar¶
The settings interface features a “DSH Web Bridge” panel on the left (showing login status, token estimation, open web, save/execute/continue, thresholds, and memory directory). The session title bar provides three buttons on the right: Save Memory | Execute | Continue, sharing the same logic as the settings page.
Storage Directory & Migration¶
The priority for the memory root directory is: DSH_WEBDS_MEMORY_DIR environment variable > memoryDir in config.json > default $DSH_HOME/dsh_memory. The pointer file is fixed at $DSH_HOME/dsh_memory/config.json. The panel supports migrating and switching or switching the directory only. During migration, it copies and verifies via size + SHA-256 checks, without deleting the source directory.
Installation & Activation¶
Please fully exit DSH before installation (Right-click the tray icon to exit), otherwise you may encounter EPERM: rename package.json. The official one-click installation command is:
dsh plugin --profile desktop add dsh-webds-bridge
If using a different profile, replace desktop with your profile name. To upgrade to the latest version:
dsh plugin --profile desktop add dsh-webds-bridge@latest
After installation, you must fully restart DSH from the system tray (the README notes that Ctrl+Shift+R is ineffective). Self-check: The settings should show “DSH Web Bridge”; the session title bar should show Save Memory | Execute | Continue. If not, you can run dsh plugin --profile desktop why dsh-webds-bridge to verify the installation, and check if dsh.profile.bundles in the profile’s package.json contains dsh-webds-bridge.
Typical Usage¶
- After restarting DSH, open the web version of DeepSeek in the sidebar and manually log in once (re-login is required after every process restart, see notes below).
- Engage in long-text discussions in the web version. When you need to save the state, click “Save Memory” in the settings page or title bar and select an alias (optionally
projects/topic). - Return to the main session and click “Execute” to inject the progress under the current alias as a user message, allowing the DSH main model to invoke tools with the context.
- If the token estimate approaches the threshold, use “Continue” or rely on the automatic continuation flow to avoid a single conversation becoming too long.
The panel allows adjusting the Token threshold, previewing existing memories, and changing or migrating the storage root directory.
Use Cases & Notes¶
Who it is for: Users who want to conduct long discussions on the web version of DeepSeek for free or at a low cost, while handing conclusions over to the DSH local model for execution; users who need to isolate multiple “discussion progress” records by topic to avoid overwriting.
Login State: You must log in to the web version in the sidebar every time DSH restarts. The reason is that DSH assigns a non-persistent, randomly generated UUID partition to the sidebar browser guest at each startup, so Cookies and localStorage cannot be reused across restarts. This is by design in DSH Desktop; the plugin’s README concludes that this cannot be bypassed without modifying the DSH core itself.
Permissions & Security: The plugin runs with the permissions of the current DSH process, and memory files are written to the configured root directory. Before installation, it is recommended to review the GitHub repository source code and MIT license to ensure the alias and directory configurations meet your security expectations.
Ecosystem Note: The DSH community plugin directory (such as the entry on SkillHub) is maintained by the community and has no official affiliation with DeepSeek / High-Flyer. The installation command should follow the README; do not construct github:owner/repo formats yourself based on the repository name.
Conclusion¶
dsh-webds-bridge connects the discussion capabilities of the web version of DeepSeek with DSH’s tool execution into a single chain: DOM automation, multi-alias memory, and operations via the settings page and title bar, all without requiring an API Key. If you are already using DSH 0.2.1-rc.2+, you can install it using the commands above and try it out after restarting from the tray.
- Directory Page: https://www.skillhub.cn/plugins/Sum556677/dsh-webds-bridge
- Source Code & Full Documentation: https://github.com/Sum556677/dsh-webds-bridge