hyyzero/dsh-deeptutor-study: DeepSeek Harness Study Mode

Introduction

DeepSeek Harness (DSH) is an “everything is a plugin” agent development framework. When using DSH for assisted learning, the existing conversation mode is often not systematic enough: there’s no knowledge base retrieval, no question generation and grading, and no wrong-answer notebook or review mechanism. The plugin hyyzero/dsh-deeptutor-study integrates DeepTutor’s learning capabilities into DSH: it provides a study mode preset, three sidebar pages, and a set of interaction protocols, turning conversations into a structured, reviewable, and accumulating learning process.

What It Is

This is a plugin that transforms DeepTutor into a DSH study mode. It is maintained by hyyzero and SKADI03 under the MIT license. The plugin achieves a locally enhanced learning experience by invoking DeepTutor’s CLI, reading its configuration and knowledge base directories, and bypassing FastAPI’s BookEngine: empty library creation, folder management, a review page, session summaries into the knowledge base, and a polished wrong-answer notebook.

The core value is adding a complete set of learning actions and tools to DSH’s conversation interface: explanations, question generation, diagram drawing, book writing, wrong-answer review, knowledge base management, and selection-based questioning.

Core Features

Learning Actions

After loading the “Study Mode” preset, DSH gains a set of deeptutor_* tools along with an interaction protocol: study-related requests first present an action menu, and parameters are selected via options.

Action Description
Explanation Step-by-step derivation of a single concept, optionally grounded in knowledge base source text
Question Generation Generates multiple-choice questions; scored locally upon submission
Learning Path Breaks a domain into ordered phases
Research Multi-source retrieval followed by a report with citations
Drawing Function plots, data structure diagrams, concept relationship graphs; process-oriented topics can generate step-by-step playable web pages
Book Writing Proposes a chapter outline first, generates pages after confirmation, then exports as Markdown
Wrong-Answer Review Groups wrong answers by knowledge point; redone within the page

Wrong-Answer Notebook

Automatically collected after grading, with knowledge-point tags and the original options. Answer directly on the page; correct answers are automatically marked as mastered and removed from the review queue. Spaced repetition: correct answers extend the interval (1/3/7/21 days); incorrect answers reset to 1 day. Data is stored in the workspace’s .dsh-study/wrong-answers.json.

Knowledge Base Management

Lists all knowledge bases with document count, indexed chunk count, embedding model, and default library marker. When creating a new one, specify the name and document directory; indexing runs in the background with progress and logs displayed. Creating an empty library registers a folder and establishes a record—add documents, then click Index. Supports folder selection and statistics, recovery from the recycle bin after deletion, renaming, deletion, and setting as default. Expand to view documents within a library; text-based files can be previewed inline, others open with the system default program.

Review

Select a knowledge base and review in the order: “Explanation → Question → Grading.” Wrong answers after grading are written to the wrong-answer notebook. Optionally run in a new session; the prompt is also copied to the clipboard.

Session Summary to Knowledge Base

Reads recent session content, generates a summary, and writes it into the knowledge base. Implementation is in scripts/digest.py and the skill kb-digest.

Feature Panel

The “Features” button to the right of the input box centrally displays all toggles and running status.

Selection-Based Questioning

Select any passage in a reply, and an “I Have a Question” button appears to the right of the selection.

Write your question and click “Add to Queue” to accumulate multiple questions, then send them all at once; each is numbered and combined into a single message. You can also click “Standalone Answer”: a bypass session is opened, the answer appears in a floating card without interrupting the current conversation; closing the card automatically archives the session. Queued entries are isolated per session—switching away hides them, switching back restores them as they were. Queued passages are highlighted in amber; standalone-answered passages are highlighted in indigo; the two do not conflict.

Answers in the floating card are rendered as Markdown; dsh-ui interactive cards in replies are collapsed into a single-line prompt.

The scope is toggled in “Features → Selection-Based Questioning,” in the same panel as “Use New Conversation for Review”:

Option Behavior
Study mode only “I Have a Question” appears only when the current session uses the study preset
All sessions Available in any session

The panel footer displays “Current session: Study Mode / Unrecognized.” It reads the session projection agentPreset; if unavailable, it defaults to “All sessions” to prevent the feature from silently failing.

Usage order:

  1. Select a passage → click “I Have a Question”
  2. Write question → click “Add to Queue” (or press Enter)
  3. For multiple questions, repeat steps 1–2
  4. In the “Pending Questions” bar at the bottom right, click “Send All”

If you only want to ask about one spot and don’t want to occupy the current conversation, just click “Standalone Answer.”

Installation & Activation

Two installation methods:

# Method 1: Install from GitHub
dsh plugin add github:hyyzero/dsh-deeptutor-study
# Method 2: Use the install script at the repo root (installs packages, copies skills, writes env vars)
powershell -ExecutionPolicy Bypass -File .\install.ps1

The desktop CLI may refuse to manage profiles directly; in that case, use the “Package name or custom install source” input field in the Harness UI.

After restarting DSH:

  1. A new “Knowledge Base Management” entry appears in the left sidebar, with the learning environment status shown at the top
  2. Click “Prepare Learning Environment”—the first download is approximately 500 MB (Python dependencies and embedding model), taking a few minutes
  3. Install skills: powershell -File <plugin directory>/scripts/install-skills.ps1
  4. Restart DSH again and select “Study Mode” when creating a new session

The runtime environment is installed under the plugin directory’s runtime/ and models/ folders; deleting the plugin directory completes uninstallation.

Environment Requirements

  • DSH Desktop edition (Web edition unverified)
  • Windows (install scripts are PowerShell; file opening relies on explorer.exe)
  • DeepSeek credentials: the plugin reads the API key from DSH’s saved credentials
  • Python 3.11 or later

Model & Credentials

DeepSeek does not provide an embedding API, so knowledge base retrieval uses a local model:

  • Model: BAAI/bge-small-zh-v1.5, 512 dimensions, ~95 MB, downloaded via hf-mirror
  • Service: scripts/embed_server.py, providing an OpenAI-compatible /v1/embeddings endpoint, default port 8787
  • The endpoint must end exactly with /embeddings; DeepTutor does not perform path concatenation

Without the embedding model installed, explanations, question generation, drawing, and the wrong-answer notebook remain available, but knowledge base features are disabled.

Data Files

Path Content
.dsh-study/wrong-answers.json Wrong-answer notebook, schema v2
.dsh-study/env.json Runtime path pointers, written on plugin startup
books/<book name>.md Exported books
viz/<topic>.html Generated interactive animations
Browser localStorage Selection-based questioning queue (dsh-ask:stage:v2) and scope (dsh-study:ask-scope)

.dsh-study/env.json is maintained by the plugin and records the plugin root directory, Python interpreter, script, and template locations; skills and agents use it to locate scripts. The plugin rewrites this file on each startup.

Troubleshooting

Symptom Cause Fix
Clicking “Prepare Learning Environment” has no response Host route not registered Restart DSH; check logs for connection service unavailable
Library creation returns 502 Local embedding requests routed through system proxy Plugin has injected NO_PROXY=127.0.0.1,localhost
Library creation reports WinError 5 Parser subprocess has insufficient temp directory permissions Point TMP/TEMP to a regular directory and retry
Indexing throws PermissionError Directory owner differs from current user Run icacls <directory> /grant "Users:(OI)(CI)(M)" /T
Preset shows “Failed to load” Current DSH version is missing an official plugin Follow the specific error on the settings page and set disabled: true on the relevant line

Use Cases & Notes

Suited for users who need structured learning, knowledge base organization, and a wrong-answer notebook with a review mechanism. The plugin runs with the current dsh process permissions; review the source code and license before installing.

DeepTutor is pinned to version 1.7.2. BookEngine is an internal module; version upgrades may change paths.

The plugin invokes DeepTutor (Apache-2.0) and does not bundle its source code; the tool layer depends on dsh-deeptutor (MIT).

Conclusion

Through the study mode preset and sidebar pages, conversations become a structured, reviewable, and accumulating learning process. Ideal for users who need systematic learning, knowledge base organization, and wrong-answer management.

Directory page: https://www.skillhub.cn/plugins/hyyzero/dsh-deeptutor-study
GitHub: https://github.com/hyyzero/dsh-deeptutor-study

羽毛球分组比赛记分
小程序二维码

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

Xiaoye