Introduction¶
In DeepSeek Harness (DSH), the Markdown rendering pipeline for model responses is mature—tables, code highlighting, TeX formulas, and block-level structures all display correctly. However, the user prompt bubble has always followed a separate rendering path and can only display plain text. This leads to: lists, bold, code blocks, and blockquotes written in user input appearing inconsistently compared to model responses; references like @file, /skill, @session showing up as plain text with no interactivity; and the quote-text button and preview functionality being unavailable. Users need their prompts to render in the same format as assistant responses so that the experience aligns with their mental model.
Plugin Scope¶
@local/dsh-enhanced-prompt is a DSH plugin maintained by hluica, categorized under “Fun Reskin.” It allows user prompt bubbles to use the exact same GFM rendering pipeline as model responses, while preserving reference chips and the quote-text preview functionality. The plugin itself provides no configuration options—it takes effect upon activation, and the built-in renderer takes over when it is uninstalled.
Core Features¶
Unified Markdown Rendering¶
Markdown elements in user prompts are rendered using the same rules as model responses:
- Headings (
#), lists (-), bold (**) - Fenced code blocks (syntax highlighting + copy button)
- TeX formulas (
$...$,$$...$$) - Block-level structure (paragraphs, separated by blank lines)
The rendering component is MarkdownText, shared with model responses.
Reference Chips and Preview¶
@file,/skill, and@sessionreferences render as chips; the@filechip is wired up and clickable to open.- When text is selected, the official “Quote Text” button appears, allowing the selection to be inserted into the composer.
> Quotelines render as the officialQuotePreviewcompact preview, showing full text on hover.- Quote previews display at the block position, preserving the
\n\nbefore and after the quote to avoid merging blocks on either side of the quote (such as lists, tables, or code fences).
Bubble Width and Copy¶
- Bubble width matches the model output area.
- The copy button copies the raw Markdown source text.
How It Works¶
The plugin takes over the user / steering nodes of conversation.chat.node, uses uiConversation.userText.createEvaluator() (the same rules as the built-in renderer) to resolve {id, start, end} nodes, replaces non-text intervals with private-use area sentinels, assembles a single Markdown source, then passes it to MarkdownText for a single render pass. Afterwards, in the rendered output, the sentinels are swapped back to real ReferenceChip or QuotePreview components. This ensures chips can be placed inside <li><p>, and lists, ordered numbering, code fences, and text-indent are all determined by a single parse.
Installation and Activation¶
The plugin must be wired into a profile to take effect within the application. In ~/.dsh/profiles/desktop/package.json:
- Add the following to
dependencies:
"@local/dsh-enhanced-prompt": "link:/Users/hanluica/Documents/deepseek-harness/local-plugins/dsh-enhanced-prompt"
- Add the following to the
dsh.profile.bundlesarray:
"@local/dsh-enhanced-prompt"
- Run
pnpm installin the profile directory.
The load entry is provided by the insert directive in the plugin’s bundled cordis.patch.yml; the bundle mechanism applies it automatically—no manual editing of the profile patch is needed.
Host restart is required: The profile’s bundle list is synthesized when the Host starts up and cannot be retried in-process. Restart the Host and then refresh the GUI.
Dependencies and Build¶
The plugin targets DSH 0.2.2-rc.1 and later (this review and merge were verified against 0.2.2-rc.3). In package.json:
peerDependencies["@deepseek-ai/dsh"]is^0.2.2-rc.1dsh.client.injectdeclares both@deepseek-ai/dsh-client-ui-conversationand@deepseek-ai/dsh-client-ui-primitives
The Host half adopts a “zero-import” design: index.js only exports ENTRY_ID and an empty apply(); its purpose is to give the Loader entry a mountable module. Therefore, the plugin ships without node_modules/ and has no dependency lock.
Commands¶
| Command | Purpose |
|---|---|
npm run verify |
Checks file invariants, manifest contracts, node --check, Host half zero-import and ENTRY_ID, and runs npm test |
npm test |
test/lifecycle.test.mjs: Client half lifecycle and rendering regression (64 checks, no application required) |
npm run build |
Removes macOS junk files and any node_modules/, then runs verify |
npm run clean |
Deletes node_modules/ (if present) and .cache/ |
Known Behaviors and Limitations¶
- Single line breaks are collapsed (standard Markdown semantics: soft break = space), consistent with model responses.
- Only applies to finalized messages; the optimistic echo bubble at the moment of submission does not pass through the chat node and is still rendered by the built-in component.
- Queue previews and
/goalcommand bubbles are not affected (they use the sharedconversation.user.text, which this plugin does not take over). - Quote previews display at the block position and do not merge blocks on either side of the quote.
> …inside code fences still degrades to raw text (quote rules run before Markdown parsing; when a sentinel lands insidepre/code, the original token is restored).- The “Quote Text” button is owned by the official plugin; this plugin only provides the integration surface (
data-text-interaction-source). Selection detection, button copy, Session writability restrictions, and composer insertion are handled bydsh-message-quotes. - Chips inside code fences degrade to raw text (the parser is unaware of fence boundaries; when a sentinel lands inside
pre/code, the original token is restored). /skillchips are currently not clickable (chat node owner props do not provideopenSkill).@session/folder/commandchips remain non-interactive—consistent with the built-in renderer.- Upgrade risk: The plugin takes over the entire chat node rendering. Any change to
MarkdownTextprops,conversation.user.textnode shape, or theuiConversationservice will affect it.uiConversationdoes not appear in the public service catalog and is an unlisted API. If rendering throws, the slot error boundary silently abdicates (only a singleslot entry crashed in ...line is left in the browser console), and the UI falls back to the built-in plain text. - Stacking with the “User CSS” plugin is expected behavior; if that plugin writes rules like
div[class*="markdown"] > p { … }, it will hit the Markdown container inside user bubbles—this is precisely the prerequisite fortext-indentto take effect. To differentiate, you can use this plugin’s.dep-bubbleclass name instead.
Applicable Scenarios and Cautions¶
This plugin is suitable for scenarios that require unified Markdown rendering between user prompts and model responses, particularly conversations involving code, tables, formulas, quotes, and interactive references. The plugin runs with the current DSH process permissions; review the source code and license before installation.
Summary¶
@local/dsh-enhanced-prompt brings user prompt bubbles onto the same Markdown rendering pipeline as model responses, unifying the presentation of lists, code, formulas, reference chips, and quote previews, while maintaining compatibility with the official renderer. The plugin provides no configuration options—it takes effect immediately upon activation, and the built-in renderer takes over upon uninstallation. For more details and source code, see the plugin directory page and the GitHub repository.