Introduction¶
In DSH Web use cases, managing local papers and data files often requires frequent switching among browsers, document readers, and spreadsheet applications. dsh-paperpanel aims to address this pain point by turning PDF, Word, and Markdown documents on the local disk, as well as CSV/Excel data tables, into a unified library management interface similar to Zotero.
Plugin Introduction¶
This plugin is maintained by Floatingfur and is categorized under “Memory”. It provides a floating drawer on the right side of DSH Web through shell.overlay for browsing, reading, and editing files. Its core value lies in deeply integrating the local file system with DSH Web’s reading experience.
Core Features¶
Library Panel and Import¶
The plugin displays a floating drawer on the right side without occupying DSH’s built-in details slot. The panel includes a file list and type filters (All / Papers / Data / Notes). It supports importing an entire folder or a single file. Duplicate file names are automatically suffixed with a timestamp. After importing, click Refresh.
Centered Reading¶
Double-click a PDF, Word, TXT, or MD file to open a reading window in the center of the screen. It supports zooming (zoom in / zoom out / reset) and switching between black and white backgrounds. PDFs are rendered with pdf.js, supporting multiple pages and text selection. Word documents are rendered with docx-preview, preserving formatting. Legacy .doc files prompt users to resave them as .docx.
Text Selection to Notes and Notes Management¶
Select text in the reading window and click “Add Note” to append the quoted content to the notes. Each readable item corresponds to a same-named .notes.md file. The notes panel is located to the right of the reading window and can be edited and saved at any time.
Spreadsheet Workbench¶
Editing of CSV, TSV, and Excel (.xlsx/.xls) files is supported. Cells are editable, and saving automatically generates a .bak backup file. It supports sorting, search, pagination, chart generation (ECharts), and column statistics. When data rows exceed 2,000 rows, rows automatically become read-only.
AI Integration¶
It provides the paperpanel_read tool interface, allowing file paths to be sent to the DSH Agent for explanation or summarization.
Offline Operation¶
Front-end libraries are inlined at build time, no bundler is required, and client.js is a single-file CommonJS module that can operate fully offline.
Installation and Enablement¶
Use the official installation command to add the plugin:
dsh plugin --profile web add dsh-paperpanel
After installation, restart dsh web. A “Library” drawer will appear on the right side.
Configuration and Development¶
Configure Data Directory¶
Set config.libraryRoots in cordis.patch.yml to specify the scan root directory. Place files in these directories, then click Refresh or Import in the drawer.
Local Development Commands¶
After modifying the client source code, rebuild it:
npm run build:client
The script that starts DSH automatically cleans up old instances occupying port 3080:
powershell -File scripts\start-dsh.ps1
Notes¶
- Slot usage: The plugin does not use the
detailsslot; instead, it usesshell.overlay. - Session dependency: On the desktop side, input actions (such as adding notes) are disabled when there is no active session.
- Data safety: Before saving a spreadsheet, the original file is automatically backed up as
.bak. - Scan exclusion:
.notes.mdfiles do not appear in scan results. - Compatibility:
dsh.engines.dshis not declared, so it is compatible across versions.
Download and Feedback¶
Plugin directory: https://www.skillhub.cn/plugins/Floatingfur/dsh-paperpanel
Source repository: https://github.com/Floatingfur/dsh-paperpanel