DSH HUB
HomePlugin StorePlugin PacksCommunityRankingsResourcesPublish Guide
Plugin source
Back to catalog

hezy116 /

hezy116/dsh-paper-panel

Verified

This plugin has no description yet.

★ 0 Stars0 Forks0 IssuesN/A Community rating0 Confirmed installs
View on GitHub
READMESource: main@77af38cb

论文阅读 / Paper reader

A DeepSeek Harness plugin that adds a 论文阅读 entry to the left sidebar: a three-column panel with the paper library, a PDF reader, and a side panel for chat and notes.

Paper reader panel

What it does

  • Library — every PDF under libraryDir, grouped by folder. Import by arXiv id/link, by paper URL, by picking a file, or by dragging a PDF onto the library column. Create categories (+ in the sidebar header), drag a paper onto a folder — or use the row's ➜ action — to file it, rename papers and folders, delete to a trash folder and restore, and search the full text of the library (not just file names). Chats and notes follow a moved paper.
  • Reader — pdf.js continuous scroll with only visible pages rasterized, fit-width and 25–400% zoom (Ctrl+wheel anchors on the pointer), a real selectable text layer, and a page box: type a number and press Enter to jump.
  • Chat — every question is answered from the paper: full text when it fits the context budget, outline plus BM25-retrieved passages when it does not. The streamed answer shows reasoning, phase and token usage, can be stopped, and keeps a per-paper history. Copy any question or answer, and export the conversation as Markdown or JSON. A model picker in the chat bar switches between the DSH default and any number of saved profiles (provider + model + optional reasoning effort).
  • Notes — save the current selection with a page number and a Markdown comment (live preview), grouped by page, collapsed by default with an explicit 展开全文 / 收起 toggle, copyable, and editable in place. Clicking a note jumps to the page and highlights the passage; clicking anything else clears the highlight. The notes travel with every question as <notes>.
  • Chinese edition (optional bundle) — dsh-paper-panel-latex translates the arXiv LaTeX source and recompiles it with XeLaTeX, keeping the authors' layout, figures, formulas and citation links. It requires a local TeX installation, so it is a separate download; the core never imports it.

Two bundles

Directory Package Contents Needs
. dsh-paper-panel core panel nothing beyond DSH
latex/ dsh-paper-panel-latex Chinese edition backend MiKTeX or TeX Live with ctex, a Song font

The core publishes the paperReaderTranslation service lookup; the optional bundle provides it. Without the bundle the panel says 翻译扩展未安装:中文版需要 LaTeX… in place of the translate button.

Install

See docs/INSTALL.md for the local-directory, npm, and GitHub release paths, the requirements, and a troubleshooting table for every 无法翻译 reason.

Short version: Plugins → Add plugin → Local directory and choose this directory; then, optionally, add latex/ the same way. A restart loads a fresh Host module generation.

When is the translate button shown?

Only when all of these pass, so that a visible button really produces a Chinese edition:

  1. the paper's arXiv id is known (import metadata, link, file name, or an arXiv title search);
  2. xelatex exists and runs;
  3. ctex is installed;
  4. the e-print downloads and contains a main .tex;
  5. the untouched source has been compiled once with this machine's TeX (cached per paper; ~30–60 s the first time).

Any failure is shown as 无法翻译:<reason> with the full message and LaTeX log excerpts in the tooltip. Compile warnings of a finished edition appear as ⚠ n next to 原文 / 中文.

Configuration

The core row (see cordis.patch.yml):

Field Meaning
libraryDir Folder scanned for .pdf files. Empty means <home>/Documents/DSH Papers; the ⚙ dialog can point it elsewhere (stored in ~/.paper-reader/config.json), and this row wins over both.
provider / model Optional chat override; empty follows the chat-bar model picker and then the DSH default.
reasoningEffort Optional thinking effort; validated against the model, falling back to its default.

The latex row (latex/cordis.patch.yml):

Field Meaning
texPath Absolute path to xelatex when it is not on PATH.
cjkFont CJK body font family (default SimSun / 宋体). Bold is emboldened from that same face, because Song has no bold cut.
cjkBold / cjkBoldFactor Optional bold face name, or the synthetic emboldening amount (default 2).
cjkLinespread Leading ratio for the Chinese body (default 1.2; ctex's 1.3 makes the paper noticeably airier than the original).

Reader length policy, model profiles, the Chinese-edition font/leading and the notes-context budget are stored per library in .paper-reader/settings.json and edited from the ⚙ dialog. A font override in that dialog wins over the latex row, so typesetting can be retuned without editing YAML.

Development

npm install                      # uses package-lock.json
npm run build                    # regenerate the client bundle (client.js)
node scripts/package-check.mjs   # manifests, locales, icon, files, no core↔latex imports
node scripts/smoke.mjs           # client artifact + slot registration
node scripts/host-smoke.mjs      # routes, library, Range, path escape, no-extension reply
node scripts/models-smoke.mjs    # model profiles + /chat routing
node scripts/search-smoke.mjs    # full-text search
node scripts/folders-smoke.mjs   # categories, move + notes edit, home-relative label
node scripts/perf-smoke.mjs      # 120-page extraction/search and a 400-paper library scan
node scripts/capability-smoke.mjs        # trial compile gate + refusal reasons (needs TeX)
node scripts/compile-failure-smoke.mjs   # uncompilable source is reported, not attempted
node scripts/source-translate-smoke.mjs  # full pipeline: source → Chinese → PDF (needs TeX)

docs/STATUS.md lists every check and what still needs a real-browser pass; docs/DETAIL.md describes the architecture. docs/UNIMPLEMENTED.md is the single list of what is missing or unverified, including the roadmap items that are explicitly out of scope.

The first open against the default folder asks once where the library should live; the answer is remembered in ~/.paper-reader/config.json.

The client half is built with esbuild into client.js, which is committed so a local-directory install works without a build step.

Release

  1. Bump version in package.json (and latex/package.json), update CHANGELOG.md, commit.
  2. git tag v0.4.0 && git push --tags.
  3. .github/workflows/release.yml builds, validates, packs both bundles, and attaches the tarballs to the GitHub release. Set an NPM_TOKEN secret to also publish both packages to npm.
  4. Users then install from npm, from a release tarball, or by cloning the repo (see docs/INSTALL.md). The exact publishing steps — npm login, the GitHub tag, and the awesome-dsh-plugin listing the market reads — are in docs/PUBLISH.md.

CI (.github/workflows/ci.yml) builds the client bundle, runs the package checks and the pure-Node tests on every push, and runs the LaTeX end-to-end checks on pull requests when xelatex is available.

Known limitations

  • Labels a document class hard-codes in its own .sty/.cls (the CVPR template prints “Abstract” literally) stay English: style files are not translated.
  • The Chinese edition needs an arXiv LaTeX source; PDF-only submissions cannot be recompiled and are reported as such.
  • Full-text search extracts each PDF the first time it is searched.

License

MIT. See LICENSE.

—/ 5

No ratings yet

Verified DSH bundle

Commit 77af38cb43e5

Community comments

No comments yet. Be the first to write one.

DSH HUB

A community index for DSH plugins. Not an official GitHub or DeepSeek AI product.

CommunityResourcesAPIAbout