dsh-overleaf v0.3.7
dsh-overleaf v0.3.7
Selection AI (new) + compile/PDF rendering fix
0.3.7 — Selection AI: ask the agent about (or safely modify) Overleaf selections
- Assist panel gains a Selection AI tab: select text in the CodeMirror editor, then either ask a question (answered in the conversation) or request a modification.
- Modify flow: the agent writes the clean replacement to
dsh-overleaf-insert.md, the panel polls for a stable revision, shows it in an editable review box, and only after you click Replace original selection does the bridge mutate the editor. - Replacement safety: the bridge captures native CM5/CM6 ranges with a stable anchor token and verifies exact source text + surrounding context + editor attachment before mutating; it refuses on any doc/file change since capture and snapshots the doc before the edit (existing rollback lane). Prompt construction delimits selection text as untrusted data.
- Bridge/parent message validation strengthened (event.source checked both ways); i18n ZH/EN parity asserted in smoke.
0.3.6 — Clicking Recompile now renders the PDF (user-content host split + CORS) [unreleased until now]
- Overleaf serves output files (PDFs, logs) from a second host (
compiles.overleafusercontent.com/zone/c) announced inol-compilesUserContentDomain/ compile JSONpdfDownloadDomain; the frontend builds cross-origin absolute URLs for pdf.js, which were CORS-blocked inside the embedded view (the CDN sends noAccess-Control-Allow-Origin). The same-origin proxy 404s on those paths via the main origin. - Proxy now learns the user-content origin (HTML meta + compile JSON hints:
pdfDownloadDomain/outputUrlPrefix/downloadURL, most-specific prefix wins) and forwards zone-prefixed paths there with the stored credential; the bridge re-roots absolute URLs on that host back under/overleaf-proxy. - Live smoke gained zone-routing 206 regression with credential check; offline smoke gained hint-extraction assertions.
Upgrade
dsh plugin --profile web add github:gychen-NJU/dsh-overleaf
(already installed? remove first, re-add, restart the web service, then hard-refresh with Ctrl+F5)