Preface

DeepSeek Harness (DSH) adopts a plugin-based architecture. When developing agents or processing documents, developers usually need to read PDFs locally and quickly inject their content into the conversation context. Existing document viewing methods are often disconnected from DSH’s conversation flow. The dsh-book-reader plugin provides an embedded PDF reading and annotation solution, aiming to connect the reading process with the conversation and note-taking workflow and reduce manual copy-paste steps.

Plugin Positioning

This plugin is maintained by davidwellscn-maker and is currently in the initial MVP stage. It is built on the dsh-better-sidebar extension and integrates an open-source PDF rendering library to provide DSH with Web-based PDF reading and annotation capabilities. All core data is stored locally, and annotations can persist across sessions.

Core Features

  1. Embedded PDF Reader
    The plugin adds a “📚 Reading” tab to the sidebar. It is rendered with react-pdf-viewer and supports page navigation, zooming, and page number display. When any .pdf file is opened, the system automatically invokes this reader.

  2. Text Highlighting and Annotations
    After selecting text in a PDF, a floating action bar is displayed.

    • Highlight: Click the highlight button and choose to add annotation content. The annotation is displayed as a yellow highlight.
    • Delete: Click the highlighted area again to delete that annotation.
      Annotation data is persistently saved.
  3. Conversation Integration
    After selecting text, click the “📤 Send to Conversation” button, and the selected content is automatically appended to DSH’s input box. The system automatically attaches the current PDF’s file path and page reference to help locate the original text precisely in the conversation.

  4. Status Check
    A real-time status bar at the top of the tab displays the plugin loading status or route connectivity status.

Installation and Enablement

Installing this plugin requires the DSH Desktop environment. After installation, the application must be completely restarted to load the newly added Host-side routes.

dsh plugin --profile desktop add github:davidwellscn-maker/dsh-book-reader

After the installation command finishes, follow these steps to enable the plugin:
1. Quit DSH Desktop (shortcut ⌘Q).
2. Open DSH Desktop again.
3. Open any .pdf file. The “📚 Reading” tab appears in the sidebar.

Typical Usage

  1. Read a PDF: Open the target PDF file in DSH Desktop and click “📚 Reading” in the sidebar to switch the view.
  2. Add an annotation: Select a passage of important text in the PDF, click the “💛 Highlight” button that appears, enter the annotation content, and save it.
  3. Send to conversation: Select a passage of text and click “📤 Send to Conversation”. The cursor automatically jumps to the end of the input box, and the content already includes the file path and page number.

Notes

  • Dependencies: This plugin depends on the dsh-better-sidebar sidebar service.
  • Route Loading: Newly added Host-side routes take effect only after restarting DSH Desktop following installation.
  • Data Storage: Annotation data is saved in the .book-reader/annotations.json file under the book directory.
  • License: Licensed under the MIT License.

Links