Preface¶
When running agents in DSH, model responses typically go through APIs or local engines and are billed by token. If you are accustomed to the free web-based chat on chat.deepseek.com and want to import a specific turn from the web into a workspace session, or feed an agent’s output back into the web to continue the conversation, the usual method is copy-pasting. Furthermore, the web site prohibits embedding via <iframe> on arbitrary pages.
The following introduces the community plugin dsh-client-ui-webchat (maintainer: sbbbx): it opens a native panel within the DSH desktop main interface, embedding the official web chat. Through the toolbar, it enables previewable and editable two-way transfer between “Web Turns” and “Agent Sessions,” without needing to write separate model code for the panel.
What is this¶
dsh-client-ui-webchat is a Client UI Plugin within the DSH ecosystem (npm package name dsh-client-ui-webchat, current version 0.6.1, MIT License). The Host side index.js is an empty implementation; all logic resides in client.js: sidebar entry, main panel, persistent webview, and capabilities such as “Takeaway / Feed back / Copy / Refresh”.
The core problem it solves is: under the constraint that iframe embedding is not allowed, it legally embeds chat.deepseek.com within the desktop client, allowing content to be transferred to and from the web and DSH agent sessions.
Why an embedded browser instead of an iframe¶
The response headers from chat.deepseek.com include Content-Security-Policy: frame-ancestors 'none'. A standard <iframe> will be rejected by the browser in any host.
The DSH desktop main window enables webviewTag and manages embedded browsing contexts via a lease protocol (about:blank#<lease> and partition validation). The plugin only functions when attached to this desktop framework; the web-based GUI lacks window.dshDesktop.browser, so the plugin automatically remains hidden. Therefore, this plugin is only applicable to the DSH Desktop.
Core Features¶
After installation, a “Web Version” entry appears on the left. The panel loads the DeepSeek web interface and uses the web’s own sessions. It involves no extra model code and does not consume DSH-side API quota (conversations within the panel follow the web interface; “Takeaway” consumes agent billing normally when sending content to an agent session).
The toolbar contains four operations (corresponding to the README):
| Button | Function | Consumes Agent Quota? |
|---|---|---|
| Takeaway | Select a web response turn -> Editable preview -> Select workspace and session -> Send as user message | Yes |
| Feed back | Select a DSH response turn -> Select target web conversation -> Fill into input box (does not auto-send) | No |
| Copy | Write the same text to the clipboard | No |
| Refresh | Rebuild the embedded web page; login state is preserved | No |
Takeaway: The preview contains three dropdowns: “Web Turn”, “Workspace”, and “Session”; defaults to the last turn. Switching turns re-fetches the body and the preceding question for that turn; edited content is not retained across turns. The first session option is “+ New Session”; selecting it creates a new Session in that workspace before sending. After sending, it automatically switches to the target session.
Feed back: The preview contains “DSH Response” (latest 20 items, newest first) and “Web Conversation” (read from web sidebar links; the latter is hidden if there is only one conversation). Switching web conversations triggers a navigation first, waits approximately 1.6 seconds, then fills the input box.
The preview step is a deliberate design choice: text scraped from the DOM may contain noise. Feeding it directly would count that noise and tokens towards the agent cost.
Installation and Activation¶
Execute in the DSH environment (command from the project README):
dsh plugin add dsh-client-ui-webchat
To install from GitHub source, use the URL command in the same format:
dsh plugin add https://github.com/sbbbx/dsh-client-ui-webchat
Once installed, the “Web Version” entry will appear on the left, ready for use.
Version Constraints: In package.json, dsh.engines.dsh is set to ^0.2.1-rc.2; the README states that both DSH and the desktop shell were tested at 0.2.1-rc.2. If the version is out of range, installation will be rejected rather than crashing after installation. peerDependencies include @deepseek-ai/dsh@^0.2.1-rc.2 and react@^18.2.0.
The plugin runs with the permissions of the current DSH process; it is recommended to review the GitHub repository source code and MIT license before installing.
Typical Usage¶
- Open the plugin panel in the desktop client and complete login on the web side (see “Re-login required at every startup” below).
- After completing a round of conversation in the web interface, click Takeaway: confirm the turn and text in the preview, select the workspace and session (or “+ New Session”), and send it to the agent.
- After receiving a response in the agent session, click Feed back: select the DSH response and the target web conversation, confirm the content filled into the input box, and click send manually in the web interface.
- If the page is blank, frozen, or the preview is abnormal, use Refresh to rebuild the embedded page; use Copy when plain text is needed.
If the web interface uses a virtual list, only turns already rendered in the DOM will appear in the “Takeaway” dropdown; for earlier turns, you must scroll up in the web interface first. “Takeaway” and “Copy” will refuse operation while a response is still being generated (if the body changes between two samples within 450ms); you must wait for generation to finish.
Use Cases and Notes¶
Suitable for: Developers who work primarily in the DSH Desktop, wish to reuse the free web chat, and need to bridge the web with agent workspace sessions.
Boundaries and Dependencies (from README “Known Boundaries”):
- Re-login to the web interface is required every time DSH starts: the partition is a random in-memory session allocated per workspace (
dsh-sidebar-browser-*, nopersist:), which becomes invalid upon exiting the app. This is consistent with the official sidebar browser behavior, and the plugin cannot bypass it. - Depends on DSH internal interfaces: the
mainslotslots.register,window.dshDesktop.browserlease bridge,remote.session.promptand session event structures, webview resizing, etc. The plugin needs to be updated following upstream changes. The maintainer follows a convention of incrementing the minor version for private interface changes during the0.xphase, and the patch version for copy or minor fixes. - DOM scraping is best-effort; web class names may change with builds. If it fails, manual pasting is available.
- Does not recognize the web “Stop generating” button (class name changes with builds); “Takeaway” and “Copy” are disabled during generation.
The DSH community plugin directory is maintained by an independent site and has no official affiliation with DeepSeek / High-Flyer. This article describes a community-contributed client plugin, not an official app store entry.
Reference Links¶
- Plugin Directory Page: https://www.skillhub.cn/plugins/sbbbx/dsh-client-ui-webchat
- Source Code and Documentation: https://github.com/sbbbx/dsh-client-ui-webchat
- npm: https://www.npmjs.com/package/dsh-client-ui-webchat