Introduction¶
When DeepSeek Harness (DSH) handles long conversations, it relies on context compression to manage the context window. This may cause important constraints, code snippets, or formulas to be discarded during compression. highlightpin is a plugin designed for this purpose. It allows users to pin selected source text and ensures that this content is not lost during context compression. Instead, it is reinserted when needed.
Plugin Overview¶
highlightpin is a DSH plugin developed by maintainer sbearbug. It provides a three-level source text pinning mechanism, supports surviving context compression, and can be managed through a command-line interface.
Installation¶
Install using the npm published version:
dsh plugin --profile desktop add dsh-highlightpin@0.1.2
Or install directly from the GitHub source:
dsh plugin --profile desktop add 'https://codeload.github.com/sbearbug/dsh-highlightpin/tar.gz/v0.1.2'
After installing or upgrading, you must fully exit and restart DSH, then refresh the page to load the new version.
Features¶
- Three-level source text pinning: Provides
pin,resident, andhighlightpinning levels. - Survives context compression: Pinned text is reinserted when needed, even after the context has been compressed.
- Command-line interface: Supports managing pinned content via the CLI.
- Formula and code support: Stores TeX source text and preserves code indentation and line breaks.
- Configurable limits: Character limits can be configured for each level.
Usage¶
Select a text passage in the conversation (it must be within a single message), and click the pin icon at the top to pin it. You can switch levels, check the budget, or unpin it via the details panel.
The main CLI commands are as follows:
- /hlpin list: Lists all pinned items and their usage.
- /hlpin last: Pins the full text of the most recent assistant reply.
- /hlpin show <n>: Displays the full text of a specific pinned item.
- /hlpin drop <n>: Unpins an item.
- /hlpin level <n> pin|resident|highlight: Changes the pinning level of an item.
Configuration¶
The plugin supports adjusting parameters via a JSON configuration file. The default configuration is as follows:
{ "maxPinChars": 16000, "maxResidentChars": 6000, "maxHighlightChars": 2000, "holdSubagents": false }
Character counts are calculated in UTF-16 units.
Limitations¶
- The selection must be within a single message.
- Streaming messages, reasoning content, and tool output are not supported.
- Pinned items belong only to the current session and are not inherited by forked sessions.
- The HTTP API accepts JSON only from local pages.
- Items exceeding the budget are rejected rather than truncated.