Introduction¶
In DeepSeek Harness (DSH) Web conversations, mathematical formulas are usually rendered by KaTeX. The formulas seen on the page are not necessarily suitable for direct copying; if the original LaTeX source text is needed, it requires additional processing. Blackspace2/dsh-math-copy addresses this scenario by providing a lightweight and accessible copy interaction for already rendered mathematical formulas.
What is this¶
Blackspace2/dsh-math-copy is a plugin for the DeepSeek Harness Web client, maintained by Blackspace2, licensed under MIT. It adds copy actions to KaTeX mathematical formulas in DSH conversations, helping users obtain the original LaTeX.
Core Features¶
The plugin automatically identifies DSH rendered inline formulas, display formulas, and KaTeX error formulas, and provides the following interactions:
- When the mouse hovers or the keyboard focuses, the formula floats slightly, and a soft edge shadow is displayed.
- A left-click on the formula copies it directly as
$$...$$. - A right-click on the formula opens a menu to choose copying as
$...$,$$...$$, or LaTeX block command\[...\]. - After successful copying, a translucent
Copied ✓hint appears above the formula. - Supports keyboard operations:
Enter/Spaceto copy, Menu key orShift+F10to open the format menu, arrow keys to select, andEscapeto close. - Supports newly added formulas after streaming output in the conversation and fully cleans up events and DOM when the plugin is uninstalled / HMR.
Installation and Activation¶
DSH plugin management commands invoke pnpm. Before installation, ensure pnpm is available:
corepack enable
pnpm --version
Then install the plugin from GitHub:
npx --yes @deepseek-ai/dsh@0.1.0-rc.6 plugin --profile web add "github:Blackspace2/dsh-math-copy"
After installation, run the Web client in the directory you wish to use as the DSH workspace:
dsh web
Then force refresh http://127.0.0.1:3080 in your browser.
If the source code is modified, rebuild is required:
corepack pnpm run build
The installation command references the GitHub repository Blackspace2/dsh-math-copy, and the uninstall command uses the plugin name math-copy:
dsh plugin --profile web remove math-copy
Typical Usage¶
-
Left-click the formula, or press
Enter/Spaceafter focusing, to copy as$$original LaTeX$$. -
Right-click the formula, or press the menu key /
Shift+F10, to open the copy format menu. -
Use
↑/↓inside the menu to switch formats. -
Press
Escapeto close the format menu.
Applicable Scenarios and Notes¶
This plugin is suitable for users or developers who handle mathematical formulas in DSH Web conversations and wish to directly copy LaTeX source text.
Notes:
- Currently targets DeepSeek Harness
0.1.0-rc.6Web client. package.jsonrequires Node.js>=20, andpackageManagerspecifiespnpm@11.21.0.- The plugin only depends on stable client module handover protocols and KaTeX standard DOM, not on DSH internal React component implementations.
- DSH itself is responsible for Markdown mathematical syntax recognition and KaTeX rendering; this plugin reads the original LaTeX from KaTeX’s
application/x-texMIME type, not guessing from visual text. - If the modern Clipboard API is unavailable due to permissions, the plugin will attempt to use the
document.execCommand('copy')compatible path within the same user gesture. - The plugin runs with the permissions of the current DSH process; source code and license should be checked before installation.