6 Commits

Author SHA1 Message Date
LaiYongqiang
c446acade0 fix(web): pass cMapUrl so CID fonts are not dropped
Released builds ship only public/pdfjs/wasm and pass just wasmUrl to
getDocument, so PDF.js cannot translate any font that depends on a
predefined CMap. Those fonts (Adobe-GB1/Japan1/Korea1, i.e. most CJK
documents) are then dropped entirely: no glyphs are painted and no text
items are produced, so headings disappear while their line height stays
reserved, and the affected runs cannot be selected, copied or searched.

Copy pdfjs-dist/cmaps next to the decoder assets, expose pdfjsCMapUrl()
and pass cMapUrl + cMapPacked.

Refs #2055
2026-10-26 16:24:32 +08:00
Bingxi Zhao (Frank)
1299ddb4c0 docs(reader): clarify PDF.js legacy worker compatibility 2026-09-23 10:41:49 +08:00
wumajiehechuan-lab
172cae8aa2 fix(web): load the polyfilled PDF.js build so older engines can render
pdfjs-dist ships two builds. The default one is neither transpiled nor
polyfilled: it targets the newest engines and calls recent ECMAScript methods
such as `Map.prototype.getOrInsertComputed` (ES2026; Chrome/Edge 145+,
Firefox 144+) straight off the platform. On any slightly older engine --
including a browser or embedded webview only a few months behind -- the worker
throws

  this._requestsByChunk.getOrInsertComputed is not a function

and the document never renders, silently, because the failure happens inside
the worker where the main thread cannot see it.

Take both the library and its worker from the `legacy` bundle, which carries
core-js and patches those methods in. The two must come from the same bundle,
or PDF.js aborts with an API/Worker version mismatch. The extra weight is paid
only by users who actually open a PDF, since this module loads dynamically.
Pin the choice with a test so it is not "optimised" back.
2026-09-14 20:25:39 -07:00
evan188199-tech
791c8d28db fix(reading): package PDF.js decoder assets (#1305)
Co-authored-by: XZH <cto@xzh.ai>
2026-09-10 23:41:36 +08:00
Bingxi Zhao (Frank)
31bf66b5e1 release: v1.5.15
Self-hostable PageIndex, a fileable question bank, and third-party plugins.

- PageIndex: adds PageIndex OSS as its own knowledge-base type, bound to
  the base's local library and driven by the configured LLM rather than a
  PageIndex API key. Retrieval moves off the built-in MCP server (removed)
  onto a workflow-owned reading loop that walks the document tree.
- Question bank: addEntryToCategory shipped in v1.3.6 and was never called
  from the frontend, so categories could be created but never filled. The
  quiz card now uses the shared CategoryMenu, the page is rebuilt around
  search / batch selection / an unfiled inbox, and a new question_bank tool
  lets the tutor file questions instead of misrouting them to write_note.
- Plugins: deeptutor.plugins was imported behind a try/except but the
  module never existed — implemented, plus a deeptutor.loop_capabilities
  group so third-party packages can register chat-loop capabilities.
  Builtins win on name collisions; broken entry points are skipped.
- Parsing: remote Apache Tika engine (TIKA_SERVER_URL), with no local
  package and no model download.
- LightRAG: the three indexing knobs from #877 get inputs under their own
  Indexing divider; unsupported keywords are dropped with a warning.
- Knowledge bases: uploads take a destination folder, same-named documents
  from different subtrees stop dropping one another, and linked folders
  keep their source-relative structure — closing #866.
- Book: a learning-capture inbox with an explicit status lifecycle, and
  drift warnings scoped to the KB documents that actually changed.
- Whisper: /whisper moves out of the primary nav into Learning Space →
  More Projects, credited to its contributor; the room needs its own
  capability package. The reusable half is CAPABILITY_COMPLETE forwarding
  of a capability-declared body and its declared extras.
- README: a Collaborate badge beside the Docs badge, in all twelve
  languages.
- Lint: nosec B608 on four false-positive question-bank queries (literal
  fragments only, every value bound), and three mypy fixes.

Release notes: assets/releases/ver1-5-15.md
2026-08-20 14:15:53 +08:00
Bingxi Zhao (Frank)
7c6bcfaef7 release: v1.5.14
Immersive Reading, self-configuration, and a two-way IMA library.

- Immersive Reading: a new capability that opens a document beside the
  thread. New reading engine (PDF pages / slides / page-sized sections),
  five reading tools, a deterministic locate pre-pass that grounds the
  turn without a second LLM call, /api/v1/reading, and a reader pane with
  selection, highlights, notes, and export to an annotated PDF or Markdown.
- Setup capability: inspect the install, apply a setting, install a
  parsing engine, or request a credential from a chat turn. New settings
  spec table; a candidate value is probed before it is committed, and API
  keys never enter the model's context.
- Tencent IMA: pipeline split into transport/envelope/models/sources/
  notes/media/inventory, an additive capability with five tools, and
  connected libraries that can finally be enumerated (bounded listings
  are reported as a lower bound).
- Retrieval: supports_rag_retrieval() replaces is_connected_kb() for the
  "can I sweep this?" question, so linked / lightrag_server / ima sources
  stop being silently dropped from every book.
- Notebooks: their own console at /notebook, per-notebook locks and atomic
  writes, copy / move / export routes, damaged files surfaced instead of
  dropped, and renaming a record no longer clears its knowledge-base link.
- Settings persistence: one lock and one atomic replace shared by every
  writer of interface.json; the PUT endpoints stop writing the
  defaults-merged view back to disk.

Release notes: assets/releases/ver1-5-14.md
2026-08-19 17:34:52 +08:00