dsh-float-reader:在 DSH Web UI 上叠一层 TXT/EPUB 浮窗阅读器

Introduction

When practicing with smart agents in DeepSeek Harness (DSH), it is often necessary to refer to a reference book, specification, or lengthy notes. Placing the reader and the dialogue page side-by-side leaves the window vulnerable to being squeezed by the chat stream; simply putting the e-book in another browser tab requires constantly switching focus between the input box and the document. The community plugin dsh-float-reader (maintained by tianluyao328) addresses a different need: hanging a draggable, resizable reading window above the Web UI dialogue area. It supports TXT / EPUB, does not replace the built-in DSH interface, and only occupies the shell.overlay and sidebar.footer.action plugin slots.

The following describes the plugin’s positioning, capabilities, installation, and operation based on its GitHub README and package.json (current version 2.1.1, license MIT).

What is it

dsh-float-reader is a client plugin for the DeepSeek Harness Web UI: a transparent (or near-transparent) reading window floating above the dialogue window, capable of reading TXT / EPUB, displaying title hierarchy, bold text, and body images. It supports dragging, scaling, and clicking outside to collapse into a horizontal bar. The directory is categorized as “Client”; the same entry can be found in the SkillHub Plugin Directory (community site, no official affiliation with DeepSeek or Fanghui).

The plugin runs on the browser side with the current DSH process permissions; it is recommended to review the repository source code and license before installing.

Core Features

Book Formats and Parsing

  • TXT / EPUB: Self-implemented ZIP decompression (DecompressionStream('deflate-raw')), no third-party dependencies; only extracts the body text, automatically skipping title pages and blank pages.
  • Chapters: Prioritizes chapter names from nav.xhtml / toc.ncx, otherwise falls back to <h1>.
  • Progress: Remembers based on “Chapter number + percentage within chapter”; progress is not lost when changing font size, scaling, or collapsing and expanding.

Rich Text and Images

  • Supports title hierarchy, bold, italic, underline, lists, blockquotes, horizontal rules, tables, <pre>; inline styles retain only weight, italic, underline, font size, and alignment.
  • Body images adapt to width and are limited to a height of 180px; click to view full screen, click again or press Esc to close.

Window Interaction and Ghost Mode

  • Drag the title bar to move; drag the bottom-right corner to resize (minimum approx 240×170).
  • Clicking anywhere outside the window collapses it into a horizontal bar of approx 30px, keeping the position unchanged; single click on the bar to expand.
  • Pressing Esc twice consecutively directly hides the window.
  • Ghost Mode: The top bar, bottom bar, progress line, and scrollbar are not rendered, keeping only the body text and the top-right switch (approx 20px) which can also serve as a drag handle.

Theme

Follows DSH’s --dsw-alias-* design tokens; light and dark themes switch automatically. Text has a slight shadow, remaining readable even over code blocks.

Installation and Enablement

Requires DSH >= 0.2.0-rc.1 (package.json has engines.dsh as >=0.2.0-rc.1 <0.3.0-0; Node >= 20 is used for local development and testing).

The official README provides the following installation steps:

git clone https://github.com/tianluyao328/dsh-float-reader.git
dsh plugin --profile <你的 profile> add ./dsh-float-reader

Refresh the page after installation. The entry point is the small book icon above the settings button at the bottom of the sidebar; the first installation automatically pops up the reading window once.

Typical Usage

Action Effect
Drag top narrow strip Move window (drag small button in top-right in Ghost Mode)
Drag bottom-right corner Resize
Click anywhere outside window Collapse into bar
Click bar Expand
Press Esc twice Hide
Drag .txt / .epub to window Open book
Bottom toolbar Change book, jump chapters, font size ±, click-through lock
Click body image View full screen

Drag local e-books to the floating window to start reading; continue the dialogue in the composer below while reading. The plugin does not modify the DSH input box height (the composer is a host component, and the config only contains busyEnter, with no interface to modify dimensions).

Applicable Scenarios and Known Boundaries

Who is it for: Developers and users who need to compare long texts, technical books, or EPUB materials within the Harness dialogue page without leaving the current Web UI.

Note:

  • Does not modify composer size: The reading window floats above the dialogue area, and the input box layout is still controlled by the DSH core.
  • Does not restore original EPUB layout: Does not load the book’s CSS / fonts, only retains structural semantics to avoid conflicts with DSH themes.
  • DRM: Books where the body text is encrypted in META-INF/encryption.xml cannot be opened; books with only encrypted fonts work normally.
  • Images: Stored in memory via blob URL and released when switching books.

For the development side, the book-core data layer in client.js can be parsed and validated in Node, for example:

node test/epub-check.mjs ~/Downloads

Conclusion

dsh-float-reader adds a collapsible, stealthy TXT/EPUB floating window to the DSH Web UI, running parallel to the dialogue without replacing the native interface. For further information, visit the SkillHub directory page and the GitHub repository.

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

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

Xiaoye