Preface¶
The DeepSeek Harness (DSH) desktop version and the Web client share parts of the application infrastructure. When assembling the system-prompt, sections such as app:web-surface and harness:source are inherited: the window may be described as a “Web GUI,” and ASAR virtual paths may be written as “checked-out directories on disk.” If the model interprets the environment as a Web browser or a local source tree, it is prone to making judgments regarding diagnosis, UI refreshes, and update paths that do not align with actual Electron desktop behavior.
dsh-desktop-context is a community-maintained host-only plugin (maintainer lc69282940, MIT License). It leverages the system-prompt/assemble waterfall supported by DSH to replace known fixed templates within the real desktop system-prompt assembly process, rather than merely appending a reminder to the conversation. The current release version is 0.1.0, validated via isolated integration testing on Windows Desktop DSH 0.2.0-rc.2; it requires Node 24+ at runtime. The plugin has no UI, no HTTP endpoints, and does not modify application archives or replace core services.
What is this¶
| Item | Description |
|---|---|
| Name | dsh-desktop-context |
| Repository | lc69282940/dsh-desktop-context |
| Directory Page | SkillHub Plugin Page |
| Category | Client |
| Positioning | Corrects Web environment descriptions inherited by the desktop client, preserving tools, runtime policies, model variables, personas, and other irrelevant sections |
Activation Conditions: Effective only when the real process entry point is identified as dsh-desktop-host; having a profile named “desktop” or setting DSH_WEB_URL alone is insufficient to prove a desktop host. Pure Web/CLI processes are unaffected. If a complete deliberate complete prompt exists later in the waterfall, that complete prompt takes precedence, and the plugin will not forcibly inject additional instructions.
Core Features¶
The following describes the environmental semantics the plugin supplements to the model after replacing templates (editable source text can be found in prompts/desktop-surface.md within the repository; host paths and transport-related facts are derived at runtime, rather than copied from paths on the developer’s machine).
-
Interface and Transport
“This app/page/GUI” in a desktop scenario typically refers to the existing Electron window, not an Edge/Chrome tab; loopback transport URLs should not be interpreted as “please open a browser.” -
ASAR and Images
Members inside ASAR are virtual paths; extracting images does not guarantee consistency with the current packaging, and editing images will not change the already packaged application code. -
Refresh and Tasks
Refreshing the renderer may interrupt agents/jobs; persistent state needs to be saved and restarted at idle points. It is not advisable to refresh during the repair process. -
Update Path Distinction
Profile reconciliation, distributed client packages, source builds, and host module caches are distinct update paths and should not be conflated. -
Evidence First
Prioritize evidence from real native windows, configurations, logs, and current contracts, rather than assumptions or idealized DOM testing. -
Trajectory Related
Before diagnosing a missing Trajectory label, check the code-work-view preferences first to avoid misjudging it as a missing plugin.
The plugin will not replace unknown future templates or custom text with the same name that is literally inconsistent with verified templates; it also does not guarantee that the model will follow the provided instructions—it only corrects the supply of content, not the model’s behavior.
Installation and Activation¶
Please wait for the current task to finish before installing. The plugin runs with the permissions of the current DSH process; you should review the source code and the MIT license yourself before installing.
Method 1: Within the Desktop Application
In the installed Desktop app → Plugins → Add plugin, fill in the absolute path of dsh-desktop-context-0.1.0.tgz (you may also point to the extracted package directory if necessary). Please place local package files in a stable path, as the profile may retain this path as a file dependency.
Method 2: Desktop’s Built-in dsh Command
After enabling the dsh included in the Desktop installation package via the native menu’s command management, execute the following in PowerShell (replace the path with the absolute path to your tgz):
dsh plugin --profile desktop add "<absolute-path-to-dsh-desktop-context-0.1.0.tgz>"
Note: An dsh installed separately via npm that is unrelated to Electron may not be able to manage the desktop reserved profile. You should use the bundled command or the native plugin manager, rather than starting a separate Web/Vite service. Installation requires no compilation or lifecycle scripts; supported installers will enable both the bundle and the corresponding host line.
Once enabled, corrections will participate in normal prompt assembly thereafter (including standard new sessions and sub-sessions); historical prompts already sent will not be rewritten. If the host requires a restart to load the plugin, please perform this at an idle point—the plugin itself will not reload or restart it for you.
For local development, if the package name is the same, back up the old file at an idle point and uninstall the old copy before installing the archive; do not mount two copies simultaneously.
Diagnostics and Uninstallation¶
The default diagnostics directory is $DSH_HOME/diagnostics/dsh-desktop-context/; if DSH home is not explicitly set, .dsh under the user directory is used. Installed packages may be read-only.
events.jsonl: Appends activation/assembly records containing only metadata, deduplicating assembly states that have not changed; there is no rotation by total file size, so you can clean up old diagnostics yourself at idle points.last-assembly.json: Reports the sanitized template status and fingerprint metadata, excluding the prompt body or private paths.
Full file paths can be specified via environment variables:
DSH_DESKTOP_CONTEXT_DIAGNOSTICSDSH_DESKTOP_CONTEXT_EVIDENCE
Assembly events only indicate that the hook ran; agentContextPresent only means the agent field was provided, it cannot prove that a provider request was initiated or that system messages were persisted, and a complete prompt may still override subsequent results. Please independently verify the final output when a distinction is needed.
Uninstallation: Remove it in the Desktop plugin management, or execute:
dsh plugin --profile desktop remove dsh-desktop-context
Uninstallation removes the hook, and subsequent steps revert to the official default prompt assembly; it does not delete sessions, nor does it roll back saved profile settings (the plugin itself does not modify these settings either). If future official builds have corrected similar wording, you should re-evaluate whether this plugin is still needed after upgrading DSH.
Use Cases and Notes¶
Who is it for
- Users employing agents on Windows Desktop DSH 0.2.0-rc.2 who want the environment descriptions in the system-prompt to be consistent with the Electron desktop, reducing misjudgments caused by “interpreting the environment as a Web browser or local source tree.”
- Those who require auditable assembly-side corrections (including diagnostic JSONL) rather than relying on verbal corrections in the conversation.
Scope and Non-Goals
- Cross-platform path parsing has unit tests; no native acceptance claims are made for macOS/Linux desktops.
- Peer dependencies
@deepseek-ai/cordis,@deepseek-ai/dsh-system-prompt, and@deepseek-ai/dsh-web-appare optional in the package; exact DSH version ranges need to be re-validated with future releases. - 0.1.0 Release Notes: Validated against Windows Desktop 0.2.0-rc.2 in isolated integration tests, but not reinstalled into a live desktop environment in this release cycle.
The DSH ecosystem emphasizes “everything is a plugin”; SkillHub is a community directory and has no official affiliation with DeepSeek / High-Flyer.
Conclusion¶
dsh-desktop-context replaces known templates inherited from the Web surface along the desktop host’s real system-prompt assembly chain, writing facts about Electron windows, ASAR virtual paths, refresh risks, and update paths into the environmental description supplied to the model. If you are debugging agent behavior on Desktop DSH and suspect that the environment section is misleading the model, you can install the 0.1.0 package via the paths above at an idle point and use the diagnostics directory or environment variables to verify whether the hook participated in the assembly.
- Directory Page: https://www.skillhub.cn/plugins/lc69282940/dsh-desktop-context
- GitHub: https://github.com/lc69282940/dsh-desktop-context