dsh-siyuan: Archive Harness conversations into Siyuan Note

Introduction

Developing within DeepSeek Harness often involves dialogues spanning thousands of words: architectural reasoning, error stacks, and tuning records all mixed together. Copying the entire segment into notes makes it difficult to find the truly useful conclusions a week later; yet, storing nothing means facing the same issues again.

Common practices involve manually selecting paragraphs to paste into note-taking tools or exporting the window and organizing later. The former is time-consuming, while the latter often results in formatting loss during pasting—formulas become plain text, and mermaid diagrams are reduced to raw code blocks.

The following introduces the community plugin dsh-siyuan (npm package name dsh-siyuan-sync, repository LuoX218/dsh-siyuan). It allows you to select synchronization granularity within Harness via the right-click menu or action bar, writing content as SiYuan block structures. It supports local queueing, preview editing, and optional AI summaries.

What is this

dsh-siyuan is published by the maintainer LuoX218 and categorized as “Memory” in the SkillHub directory. Its positioning is to select fragments worth keeping from Harness conversations and write them into SiYuan Note, leveraging notebooks, bidirectional links, and tags to organize them into a searchable knowledge base on the SiYuan side.

The plugin writes via the SiYuan Kernel API; the token is automatically read from the SiYuan configuration conf/conf.json (the README states that macOS, Windows, and Linux paths are adapted). The current package version is 1.0.2, license MIT, requiring Node >= 20. The package.json marks compatibility with DSH 0.2.1-rc.2.

Core Features

Three Synchronization Granularities

  • Single Message: Save only the current message.
  • Current Turn: The current round of Q&A.
  • Whole Window: All loaded conversations within the window.

The assistant message action bar features a “Save” icon; Shift + Click saves the entire window. The right-click menu also provides items such as “Sync this message to SiYuan,” “Sync current conversation,” and “Sync all conversations in the entire window” (while restoring native items like “Copy”).

Formatting and Layout

Markdown in the conversation maps to corresponding SiYuan block types. The compatibility table in the README includes: bold/italic/strikethrough, inline and block LaTeX (NodeMathInline / NodeMathBlock), mermaid (flowchart, sequence, state, gantt, pie, class, etc.), code blocks with language tags, tables, task lists, and nested lists. User and assistant content are distinguished by chat bubbles (blue for user, green for assistant).

Titles and body text can be modified in the preview panel before writing; configurable options include paragraph dividers, timestamps, chart color schemes, and automatic tags (e.g., #SolutionDesign#, #Troubleshooting#). Each segment can carry backlink information for the session, turn, and time; duplicate content can be flagged based on fingerprints to indicate if it has been saved.

Queue when SiYuan is Offline

When SiYuan is not running, content enters a local queue, probing approximately every 30 seconds; it automatically backfills once SiYuan is available. The settings panel allows viewing the queue, retrying single items, or batch writing. Failure reasons are categorized into offline, auth, missing, other, etc., with support for automatic backoff retries.

AI Summary (Whole Window)

When synchronizing the whole window, you can select “Ask whether to extract summary first” or “Save full text directly” in the settings. The summary uses the model selected in the current session; the prompt is customizable, defaulting to a built-in template if left blank. The README notes that a summary cannot be generated if no model is selected in the session.

Installation and Activation

The npm method is recommended, independent of Git. The machine must have pnpm installed; if prompted with pnpm was not found, execute first:

npm i -g pnpm

Install under the desktop profile:

dsh plugin --profile desktop add dsh-siyuan-sync

After installation, you must fully quit DSH and restart (Right-click the tray icon to quit; merely closing the window does not reload plugins). After restarting, dsh-siyuan should appear in Settings → Plugins → Third-party Plugins. Once enabled, synchronization-related menus will appear when right-clicking on conversation messages.

Update (npm):

dsh plugin --profile desktop add dsh-siyuan-sync@latest

The README also provides methods for cloning from GitHub and running install.sh / install.ps1, along with corresponding uninstall and update steps; other profiles can be specified using --profile <name> (Windows uses -Profile <name>).

Configuration entry: Settings → Plugins → Third-party Plugins → dsh-siyuan → Configure. The panel displays the SiYuan connection status and allows setting the target notebook, date format, append-to-same-day or create-new-document-every-time, preview before writing, duplicate detection, summary behavior, etc.; the lower half is for queue management.

Prerequisite: SiYuan must be running when writing.

Typical Usage

  1. Ensure SiYuan is started, and the target notebook name in the plugin settings fits your classification habits (it will be created automatically if it does not exist).
  2. In the Harness conversation, right-click the message you want to keep and select the granularity based on value: use “Sync this message” for a one-sentence conclusion, “Sync current conversation” for a Q&A pair, or “Sync all conversations in the entire window” for long reasoning processes.
  3. If “Preview before writing” is enabled, adjust the title and body in the panel and confirm to write.
  4. For whole-window synchronization with summaries enabled, follow the prompt to choose whether to generate a structured summary before saving both.

Habits suggested by the README include: creating notebooks by topic (e.g., “Architecture Decisions,” “Troubleshooting”), using summaries as an index for whole-window content, and using tags and bidirectional links to connect related notes.

Use Cases and Notes

Suitable for: Developers already using SiYuan who wish to move filtered solutions, pitfall records, and parameter conclusions from Harness into block notes while preserving formulas and mermaid diagrams.

Known Limitations (from README): SiYuan must be running for final writing; mind maps require manual conversion from lists on the SiYuan side, the plugin does not generate mind map blocks directly; layout settings only affect newly synchronized content; summaries depend on the model selected in the current session.

Security and Permissions: Third-party plugins run with the current DSH process and user permissions. Please read the repository source code and the MIT license before installation to assess if it meets your environment requirements. DeepSeek Harness adopts an “everything is a plugin” extension approach; SkillHub (Plugin Directory Page) is a community collection site and has no official affiliation with DeepSeek / High-Flyer.

Conclusion

dsh-siyuan solves the issues of “what to select to save” and “ensuring saved content is usable”: selectable granularity, format preservation via SiYuan blocks, and offline queuing plus preview editing reduce the probability of missed writes and dirty data. For installation instructions and configuration details, refer to the GitHub README.

  • Directory Page: https://www.skillhub.cn/plugins/LuoX218/dsh-siyuan
  • Repository: https://github.com/LuoX218/dsh-siyuan
羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye