Introduction¶
When developing long-conversation applications with DeepSeek Harness (DSH), a common scenario is: discussing deployment first, then modifying the interface, and later returning to deployment issues. If all history is retained every round, the context will quickly expand, increasing costs and potentially hitting context window limits; if everything is discarded, the model may not be able to answer coherently when the topic switches back to old content.
dsh-jev-context solves this problem: at the beginning of each conversation round, it utilizes the JEV model to evaluate the relevance of historical segments to the current request, collapsing temporarily irrelevant content and recovering it from the original logs when the topic returns.
Plugin Introduction¶
dsh-jev-context is a plugin that provides context trimming and recall capabilities for DeepSeek Harness. Through JEV relevance scoring, it automatically determines which historical segments to retain and records the retention/collapsing status and token changes for each round. This plugin is maintained by YIRC99 and follows the MIT license.
Core Features¶
This plugin mainly provides the following capabilities:
* Trim by Relevance: Replaces low-relevance historical segments with omission markers based on JEV scores, thereby shortening the context.
* Old Topic Recall: When a collapsed segment becomes relevant again, it is recovered from the original session logs.
* Visualization Panel: Provides a panel at the bottom of the Web interface sidebar, recording the decision, retention/collapse status, and context token changes for each round.
* Protect Recent Content: By default, retains the most recent 1 segment which does not participate in scoring.
* Fault Tolerance: If the judgment fails (e.g., Key not configured or request timeout), the plugin skips this selection without blocking the conversation.
Installation and Activation¶
Installation requires obtaining the source code, building it, and then adding it to the DSH profile.
- Clone Source Code and Build
git clone https://github.com/YIRC99/dsh-jev-context.git
cd dsh-jev-context
pnpm install
pnpm build
- Add Plugin
Replace the built local directory path in the command below:
dsh plugin --profile web add file:/absolute/path/to/dsh-jev-context
After installation, restart the `dsh web` service.
- Configuration
Open “JEV Config” at the bottom of the sidebar, fill in your JEV / TypeSafe API Key, and save.
Usage¶
- Ensure that “JEV Config” at the bottom of the sidebar is enabled and the Key has been saved.
- Send a new request in a conversation with existing history.
- The plugin will perform a relevance judgment at the start of this conversation round.
- Switch back to the panel at the bottom of the sidebar to view which segments were retained or collapsed, and the changes in context tokens.
Notes¶
- API Key Dependency: The plugin requires you to provide a JEV / TypeSafe API Key yourself.
- Local Installation Updates: Local installation is a directory copy; changes in the source code will not automatically take effect. To update the code, you need to rebuild it and remove and re-add the plugin from the profile.
- Toggle Behavior: Turning off the plugin switch does not automatically restore previously collapsed segments; it only stops subsequent trimming judgments.
- Recall Limitations: The plugin’s judgment relies on summary extraction from historical segments. If key information is not included in the summary, it may be incorrectly collapsed.
Ecosystem Background¶
DeepSeek Harness’s philosophy is “Everything is a plugin”. dsh-jev-context is a community plugin. Community directories (such as SkillHub) are independent sites and have no official affiliation with DeepSeek or High-Flyer.
References¶
- GitHub: https://github.com/YIRC99/dsh-jev-context
- Community Directory: https://www.skillhub.cn/plugins/YIRC99/dsh-jev-context