Repository navigation
Releases: adithyanraj03/dsh-cite-lens
Release list
dsh-cite-lens 0.3.1 — a citation opens the PDF again
dsh-cite-lens 0.3.1 — clicking a citation opens the PDF by itself again.
What was broken, and why
On the dsh 0.2 line, a citation worked only while the PDF happened to be open already. With no PDF open, clicking [main.pdf "…"] answered "Couldn't open main.pdf — no chat is open to resolve the path".
The cause is one field that moved. A cited path is usually relative (main.pdf, build/main.pdf), so the plugin has to turn it into a dsh-resource://file/session/<id>/… address — which needs the chat's session id. dsh 0.1.x kept that id in the sessions list snapshot as current; 0.2.x removed the field (the snapshot is now { ids, byId, phase, projectionsBySession }) and names the session on screen through ctx.sidebarRight.mounted instead. The plugin read only current, got undefined, and returned "can't address this". When the PDF was already open it used that open tab's address and never needed a chat at all — which is exactly the symptom you saw.
0.3.1 resolves the chat from three sources, in order: the old current (0.1.x), the on-screen session (0.2.x), and the last chat whose top bar rendered. Absolute paths never needed a chat and still do not.
Where you will see it
- A chat with no PDF open — click
[main.pdf p.7]or[main.pdf "exact words"]and the PDF opens in the Files tab at that page, with the words highlighted. - Older chats and history — the same, including chats whose session is not the one selected in the sidebar.
- Absolute paths (
[C:/papers/main.pdf p.3]) — unchanged; they resolve with no chat at all. - The failure message — when there really is no chat to resolve against, it now says "open a chat first, so the path can be resolved against its workspace" instead of the misleading "no chat is open".
Verified live: a citation clicked in a chat with zero PDF views open opened demo-paper.pdf, rendered page 1, and showed no error; 16 tests pass, including one that pins the three-source resolution against both dsh shapes.
Updating
dsh plugin --profile web update dsh-cite-lens --latestor, if the profile's lockfile pins the old version:
cd ~/.dsh/profiles/web && pnpm add dsh-cite-lens@0.3.1No settings change: /cite-links state and the last-opened PDF are untouched.
dsh-cite-lens 0.3.0 — icon, banners, Chinese README, dsh 0.2.x
dsh-cite-lens 0.3.0 — it now looks, and installs, like a plugin that belongs in dsh.
What changed, and why
It runs on the 0.2 line. The plugin was written against dsh 0.1.5-rc.2. Nothing about the PDF view was rewritten — the seams it uses (the keyed sidebar.right.tab.document seat, documentPreviews, conversation.input.for(scope), sidebarRight.openResource) are the same in both lines. Three things were outside the published contract and are now inside it:
- the preview registers with
priority: 'extension'(the external band that outranks the built-in PDF view) instead of'plugin', which only worked by accident; - it declares
binaryExtensions: ['pdf'], so a PDF is never offered a "view as text" fallback; dsh.client.injectnames the five client packages the browser half expects, andengines.dshnow sits inpackage.jsontoo, where the runtime's compatibility preflight reads it.
It has an icon. A duotone chain link — the citation-highlight amber #facc15 over the chip's blue — on an ink tile, drawn from the same glyph the plugin puts in the chat header, sized to read at 36px in Settings and 96px on a market tile.
It has a front page. Dark and light banners at the top of the README, and a full Chinese README (README.zh.md) with a language switch in both.
Where you will see it
- Settings → Plugins → Installed plugins — the Cite Lens tile now shows its own icon and the package description.
- The Files tab, any PDF — unchanged in use: Page / zoom / Fit, select text for Quote / Ask / Explain / Check this, click a citation to land on the highlighted words. The only visible difference is that a PDF no longer offers a plain-text view among its options.
- The GitHub README — banner on top, then the title, then
English | 中文. - The marketplace detail page, once listed — App-Store-style screenshots from
screenshots.json, which now ships in the tarball. dsh --profile web --dump-config— still exactly onedsh-cite-lensrow; the version reads0.3.0.
Updating
dsh plugin --profile web update dsh-cite-lens --latestIf the profile's lockfile pins the old version, name it explicitly:
cd ~/.dsh/profiles/web && pnpm add dsh-cite-lens@0.3.0Nothing to migrate: /cite-links state stays in ~/.dsh/storages/dsh-cite-lens.json, and the last-opened PDF stays in browser storage.
Full changelog: 15 tests pass; verified against dsh 0.2.1-rc.3 (PDF opens in the Cite Lens view, one page rendered, no console errors) and still compatible with 0.1.5-rc.2.