DeepSeek Harness (DSH) follows the “Everything Is a Plugin” philosophy and aims to extend functionality through a pluggable approach. dsh-greater-clarity is a Web client plugin that primarily addresses messy session information, difficulty in quickly locating history, and disorganized exported content. It provides four core entry points in the session header to help developers manage conversation context more efficiently.
Core Features¶
1. Global Collapse and Expansion¶
Provides a toggle in the session header to control the display of the AI’s “thinking chain” and “tool calls”.
* Collapsed state: only the final response text for each turn is retained.
* Expanded state: shows the complete reasoning process and tool call records.
* The toggle state is persisted.
2. History Quick-Locate Panel¶
Clicking the “History” button in the session header opens a quick-locate panel directly below the button.
* Function: supports searching and clicking to jump; after jumping, the view is positioned to the first line of that input.
* Display: each record has a “Turn N” badge.
* Tip: if the session has earlier history that has not been fully loaded, the top of the panel shows a “History Not Fully Loaded” notice.
3. Conversation Export¶
Provides one-click export of the current session as Markdown.
* Generation method: Uses a “client-side direct generation” strategy, directly generating from the in-browser session snapshot for extremely fast responses. If the snapshot is abnormal, it automatically falls back to the server-side path.
* Content filtering:
* Only user input text and AI final response text are exported.
* Attachment files are referenced by file name.
* Code blocks, tables, lists, and other structures are preserved.
* Text escaping:
* User input: strictly escaped (backslashes, entity encoding, line-start markers) to prevent Markdown structure injection and raw HTML injection.
* AI response: kept as-is without escaping.
* File name rules:
* Format: timestamp_session-title.md (or incomplete-history-conversation_timestamp_session-title.md).
* Timestamp format is dot-separated date (e.g., 2026.9.15).
4. Settings and Avatar Management¶
Configure plugin behavior through the settings dialog.
* Avatar display: avatar shown to the left of AI responses, with a turn label below.
* Avatar customization: supports uploading a custom avatar, adjusting size (16–128px), or controlling visibility.
* Path whitelist: uploaded avatar file path must be located under $DSH_HOME/greater-clarity/; external paths silently fall back.
Installation¶
Install to the Web Profile via the DSH CLI:
dsh plugin --profile web add github:Baisbt/dsh-GreaterClarity-plugin
Usage¶
- Export conversation: click the “Export” button in the session header; the browser will automatically download a neatly formatted Markdown file.
- Quick locate: click the “History” button, enter a keyword in the popup panel to search, or click a list item to jump to the corresponding historical input.
- Adjust settings: click the “Settings” button, upload a local image as the AI avatar, or adjust the display state of the export button.
Settings and Data Persistence¶
The plugin stores its data in the host directory:
* Settings file: $DSH_HOME/greater-clarity/settings.json
* Avatar file: $DSH_HOME/greater-clarity/avatar.<ext>
The plugin provides three uninstall/disable granularities:
* Temporary disable: turn off the “Enable GreaterClarity” toggle in the settings dialog; it remains disabled after refresh.
* Soft uninstall: click “Uninstall Plugin…” at the bottom of the settings dialog; this clears the $DSH_HOME/greater-clarity/ directory and writes a marker file, taking effect across restarts.
* Full removal: run dsh plugin --profile web remove @dsh-external/dsh-greater-clarity to remove the plugin from the Profile composition.
Known Limitations¶
- Export path limitation: Due to browser security restrictions, exported files are only saved to the default download directory and cannot be saved to a custom path.
- Dependency contract: The plugin depends on DSH’s current stable contract, including
webServer,slots,sessionQuery, DOM attributes (such asdata-chat-flow-kind,data-variant="think"), and props injected by Buttons. Regression validation is required after DSH upgrades. - Escaping side effects: After user input is strictly escaped, the exported document source contains sequences such as
\-,\*, and entities such as<, but this does not affect rendered display. - Snapshot dependence: Client-side direct generation depends on the
chat.order/chat.nodesstructure. If a DSH upgrade changes the snapshot structure, regression fixes are required. - Avatar path:
avatarPathin settings only accepts images inside the$DSH_HOME/greater-clarity/directory. - File name semantics: Only under the client-side direct generation path, if the history is not fully loaded, the file name includes the “incomplete-history-conversation” prefix; the server-side fallback path does not include this prefix.
- Concurrency model: Within a single page, load/save requests use a sequence guard, and only the latest response is accepted; multiple browser tabs use a “last-write-wins” strategy.
Build and Directory Structure¶
The plugin uses an ESM architecture and is divided into Host (server-side logic) and Client (browser UI).
Directory Structure¶
dsh-GreaterClarity-plugin/
├── src/
│ ├── index.ts # HOST:webServer 路由 + 设置持久化
│ ├── pure/ # 双端共享纯函数(转义、导出构建、文件名净化)
│ └── client/ # CLIENT:样式、DOM 层装卸、面板组件
├── cordis.patch.yml # 插件挂载声明
└── scripts/build.sh # 构建脚本
Build Commands¶
# 构建 Host
bash scripts/build.sh
# 打包 Client
npm run build:client
Ecosystem Background¶
This plugin is maintained by community developer Baisbt. The official DSH plugin catalog is located on skillhub.cn, with no official affiliation with DeepSeek or High-Flyer.