Introduction

When using DeepSeek Harness (DSH), a common need is to continue a conversation by referencing the context of a previous session. DSH does not natively provide a standard reference mechanism, and manually entering titles or links is error-prone. The dsh-copy-session-ref plugin solves this problem by adding a “Copy Reference” entry to the session row menu and the hover card, generating the standard @[name](dsh-session:...) format.

Plugin Overview

  • Name: azazo1/dsh-copy-session-ref
  • Maintainer: azazo1
  • Function: Adds a copy-reference entry to the session row menu and hover card, generates a standardized mention format, and allows the referenced session context to be recalled after pasting it into the input box.
  • License: MIT

Core Features

Copy Entry

The plugin adds “Copy Reference” in two places:
1. Session row menu: Added to the ellipsis menu on a session row, after “Archive”.
2. Session hover card: In the card that expands on hover, the first line is “Copy Reference”.
* Note: This line is shown only for session rows that already have the first message.
* Clicking this line copies the standardized mention format rather than the session title, and it does not trigger the card’s own copy behavior.

Naming Rules

Before copying, the session title is processed according to configurable regex rules to generate the reference name. The default rules are applied in order:
1. \s+ (flags: gu) replaced with - (convert spaces to hyphens).
2. " (flags: gu) replaced with \" (escape double quotes).
3. ^([\s\S]*)$ (flags: u) replaced with "$1" (wrap with outer quotes).

Examples:
* raw title -> @["raw-title"]
* my "cool" title -> "my-\"cool\"-title"
* Empty title -> @""

Configuration Management

In DSH, go to Settings -> Plugins -> dsh-copy-session-ref:
* Supports adding/removing rules, reordering them, and enabling/disabling them.
* Regex patterns, flags, and replacement text can be modified.
* Form changes are staged; they are written to the profile’s patch layer only after saving, and unsaved edits are discarded when leaving the page.
* If the regex or flags are invalid, the form is marked in red and saving is blocked.

Install and Enable

Web

Install it in the Web profile:

dsh plugin --profile web add github:azazo1/dsh-copy-session-ref

Desktop

The desktop client does not support installation via the command-line argument --profile desktop; you must use the plugin manager inside the DSH application:
1. Enter the package name github:azazo1/dsh-copy-session-ref or a local directory in the plugin installation field.
2. After installation, restart the application and refresh the window (the scanning result of the Client metadata is cached in-process).

Engine Version Requirements

The plugin requires the DeepSeek Harness engine >=0.2.0-rc.1 and remains on the 0.2.x line (in devDependencies: >=0.2.0-rc.1 <0.3.0).

Typical Usage

  1. Install and restart the DSH application.
  2. Find the target session in the session list.
  3. Click “Copy Reference” in the session row or on the hover card.
  4. Paste the generated @[name](dsh-session:...) into a new message input box and send it.
  5. The model receives the mention and retrieves the context of the corresponding session.

Technical Details and Limitations

  • The plugin does not parse or clone the host DOM; session identity and menu open/close are provided by the framework.
  • Rules are applied in order, and $1 and $& are supported.
  • If the name contains ], the reference can be parsed, but the bubble will not collapse into a chip.
  • Rules perform only minimal escaping (\ and ]); double-quote handling is left to the default rules to avoid double escaping.

Conclusion

The plugin simplifies the process of recalling session context through a standardized mention format. The rules are configurable and can adapt to different naming conventions. For more details, see the GitHub repository.