96 Commits

Author SHA1 Message Date
Bingxi Zhao (Frank)
4c1e000d85 release: v1.7.3
Prepare v1.7.3 notes for reading and book editing, expanded provider and
agent connections, learning records, model streams, and desktop upgrades.

Sync README prose and 11 translations, archive older release notes, and
update the package version. Resolve release lint/type blockers with explicit
parser and capability contracts, compatible Book call forwarding, accurate
auth task types, and quoted SQLite schema identifiers. Cover positional Book
calls and quoted legacy columns; align KB seed tests with visible retrieval
failure reporting. Keep HTTP fixtures independent of host proxies and translate
new Portuguese UI copy.

Release notes: assets/releases/ver1-7-3.md
2026-11-16 02:17:36 +08:00
Bingxi Zhao (Frank)
8ecf2da95f fix(parsing): validate uploads against available parser formats
Fixes #2338
2026-11-15 01:20:52 +08:00
Bingxi Zhao (Frank)
ea517d2c59 fix(import): use locale hints for ambiguous legacy text encodings
Local dev repairs for #2132, #2133.

Turkish UI prefers Windows-1254 after UTF-8; strict explicit encoding is available for mixed legacy collections. Tested both upload bytes and file reads, short Turkish strings, GBK, GB18030 and Windows-1252. Encoding and memory suite: 398 passed.
2026-11-15 00:50:30 +08:00
Bingxi Zhao (Frank)
92a26ae3cc fix(storage): isolate attachment writes and settle document parsing
Local dev repairs for #2244, #2245, #2255, #2426, #2453. Regression checks cover reported symptoms and compatibility boundaries.
2026-11-15 00:44:09 +08:00
Bingxi Zhao (Frank)
3ef9ee8886 Merge PR #2513: fix: pick the JSON fence when a code snippet fence comes first
Prefer explicit JSON fences over unlabeled examples, ignore other language fences, and cover both precedence and embedded JSON preservation.
2026-11-14 23:07:03 +08:00
Bingxi Zhao (Frank)
21e9878b59 Merge PR #2556: fix: sync and index MDX documentation in knowledge bases 2026-11-14 22:57:42 +08:00
Bingxi Zhao (Frank)
795ae960ae Merge PR #2680: fix(utils): preserve whitespace in concatenated BibTeX values 2026-11-14 22:49:41 +08:00
yunyv
f6db991695 fix(utils): preserve whitespace in concatenated BibTeX values 2026-11-13 13:00:03 -07:00
mpichini1
64000f8046 fix: reload cached configuration when modification time decreases 2026-11-13 19:36:27 +01:00
markxu
fdae1dfdf0 fix: sync and index MDX documentation in knowledge bases
GitHub source sync kept only .md and .markdown, so a docs glob of *.mdx
reported success with zero files and left raw/ empty. Re-index then failed
because no supported source files were present. Treat .mdx as text next to
Markdown in the sync filter, the knowledge-base file router, and the chat
attachment list that mirrors it.

Fixes #2552
2026-11-09 14:09:57 +00:00
Mohammad Hijjawi
e27aa512df fix: pick the JSON fence when a code snippet fence comes first
parse_json_response extracted only the first fenced block, so a reply
that shows a code snippet (for example a ```python block) before the
fenced JSON payload lost the payload: it returned a list literal from the
snippet or the fallback. Prefer the first fenced block that holds a JSON
object or array, and keep the first block otherwise.
2026-11-07 10:41:08 +00:00
Bingxi Zhao (Frank)
ebcebd4723 Unify migration locks and plugin environments, and cover compatibility boundaries 2026-11-06 02:04:52 +08:00
Bingxi Zhao (Frank)
b49cdbc38e Merge #2311 from rudycelekli 2026-11-06 01:56:22 +08:00
Rudy Celekli
f930c5ece8 fix(ingestion): separate EPUB table cells during text extraction
td/th were missing from _EPUB_BLOCK_TAGS, and nothing else emits a
separator between table cells. Both EPUB text renderers (_epub_render_text
and the _EpubHTMLTextParser fallback) only break on block tags, so they
relied on source whitespace between cells. Commercially produced EPUBs
often ship minified, whitespace-free XHTML, where a row like
<tr><td>Revenue</td><td>100</td><td>Q1</td></tr> extracts as the single
glued token "Revenue100Q1" — unreadable data fed to the model.

Add td and th to _EPUB_BLOCK_TAGS so each cell is separated, the same way
li/dd/dt already are. One constant fixes both renderers.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-11-01 09:35:37 -05:00
RRFZ
4ffda7aa2e fix(archive): skip zip members that differ only in case on Windows and macOS
On a case-insensitive filesystem, week2/readme.md flattens onto the
README.md that week1/README.md already wrote in the same call. Since
members are created with "xb", that raised FileExistsError and the
upload router rejected the whole archive with a 400 naming the server
path. Before "xb", the later member silently replaced the earlier one.

Treat it like any other flattening collision: when the destination is
the same file as a member this call already wrote, skip it as a
duplicate. A pre-existing file with a case-only name match is still
refused, and case-sensitive filesystems keep both names as before.
2026-10-31 20:37:51 -04:00
Bingxi Zhao (Frank)
32e992b139 Merge commit '92f0b68db074f013d3aab4482c1ed5bd8dec8a83' into codex/validate-reviewed-integration 2026-10-31 18:53:15 +08:00
Bingxi Zhao (Frank)
64ad8598de Merge commit 'cc9a60237bcc7e4213f574081824c49c92569ed8' into codex/validate-reviewed-integration 2026-10-31 18:53:15 +08:00
Bingxi Zhao (Frank)
862fa3cb97 Merge commit '0fb3d74495eb4063177df3286bd4de0aab2e76bf' into codex/validate-reviewed-integration 2026-10-31 18:52:54 +08:00
Bingxi Zhao (Frank)
92f0b68db0 Merge dev while preserving both BibTeX parser regressions 2026-10-31 18:26:27 +08:00
Bingxi Zhao
f756f371e7 Merge pull request #2157 from jayhemnani9910/bibtex-author-names
fix: format BibTeX names with Jr parts and braced "and"
2026-10-31 18:08:07 +08:00
Bingxi Zhao (Frank)
cc9a60237b Merge remote-tracking branch 'origin/dev' into codex/land-2163
# Conflicts:
#	deeptutor/utils/document_extractor.py
2026-10-31 17:25:30 +08:00
Bingxi Zhao (Frank)
92488f5a63 fix(docx): retain grouping for sums of delimited math terms 2026-10-31 17:18:09 +08:00
Bingxi Zhao (Frank)
0fb3d74495 fix(archive): close partial files before cleanup on every failure 2026-10-31 17:17:26 +08:00
Bingxi Zhao
10dace6fdb Merge pull request #2236 from rudycelekli/fix/pptx-presentation-slide-order-20261031
fix(documents): follow PPTX presentation slide order in fallbacks
2026-10-31 17:02:04 +08:00
Bingxi Zhao
3f3cff69c6 Merge pull request #2199 from rudycelekli/codex/fix-pptx-fallback-pictures-20261030
fix(documents): retain picture shapes in PPTX fallback
2026-10-31 16:49:39 +08:00
Bingxi Zhao
662c94b903 Merge pull request #2237 from rudycelekli/fix/xlsx-sparse-cell-columns-20261031
fix(documents): preserve sparse XLSX cell columns in fallback
2026-10-31 16:49:11 +08:00
Bingxi Zhao
5d7049869f Merge pull request #2227 from rudycelekli/fix/bibtex-delimiter-scope-20261030
fix(utils): keep interval punctuation inside BibTeX values
2026-10-31 16:47:15 +08:00
Bingxi Zhao (Frank)
9cbdb75e6d fix(docx): preserve nested scripts and empty math delimiters 2026-10-31 16:45:03 +08:00
Bingxi Zhao (Frank)
77addee410 fix(archive): preserve pre-existing files on extraction failure 2026-10-31 16:40:20 +08:00
Rudy Celekli
eea3b870aa fix(documents): preserve sparse XLSX cell columns in fallback
Use worksheet cell coordinates to retain missing leading and interior cells. Bound padding to Excel columns A through XFD and keep sequential fallback for missing or malformed references.

AI-assisted: implemented and validated with OpenAI Codex; real saved openpyxl workbooks provide independent row oracles.
2026-10-31 01:43:08 -04:00
Rudy Celekli
75776a7bbc fix(documents): respect empty PPTX presentation metadata
Keep valid empty presentation lists empty even if orphan slide parts remain. Only missing or unreadable metadata permits filename fallback; external relationships stay excluded.
2026-10-31 01:41:09 -04:00
Rudy Celekli
0628c03240 fix(documents): follow PPTX presentation slide order in fallbacks
Resolve presentation slide IDs through their relationships instead of sorting part filenames. Share ordering across both OOXML extraction paths and preserve metadata-free extraction.

AI-assisted: implemented and validated with OpenAI Codex; actual generated decks checked against python-pptx.
2026-10-31 01:39:12 -04:00
Rudy Celekli
d7e621ad5f fix(utils): finish UTF-8 characters at text probe boundaries
Use an incremental UTF-8 decoder to complete only a code point split by the 8192-byte sample while still rejecting invalid bytes and incomplete input at EOF.

AI-assisted: implementation and regression tests prepared and validated with OpenAI Codex. Maintainer review is pending.
2026-10-30 23:30:41 -04:00
Rudy Celekli
4a1163b71f fix(utils): keep interval punctuation inside BibTeX values
Count parentheses as outer entry delimiters only for parenthesized entries and outside braced field values, so half-open intervals do not discard valid references.

AI-assisted: implementation and regression tests prepared and validated with OpenAI Codex. Maintainer review is pending.
2026-10-30 23:19:23 -04:00
RRFZ
3378906b03 docs(knowledge): clarify which files a rejected zip removes
Only the files the call wrote are removed; files already in target_dir
are not touched.
2026-10-30 18:28:18 -04:00
RRFZ
5a344d3133 fix(knowledge): remove extracted members when a zip upload is rejected
safe_extract_zip writes members one by one into the KB raw/ directory.
When a later member tripped a zip-bomb guard or failed its CRC check, the
upload was rejected with HTTP 400 but every member written before it, and
for a CRC failure the corrupt member itself, stayed on disk.

Delete the files this call wrote before the error propagates, and drop a
member's partial output when it fails mid-read.
2026-10-30 16:10:42 -04:00
Rudy Celekli
e0ad3bba56 fix(documents): retain picture shapes in PPTX fallback 2026-10-30 07:55:43 -04:00
朱鸿儒
47e39c40ca fix(docx): preserve OMML across fallback paths 2026-10-30 10:50:12 +08:00
朱鸿儒
e51c25f726 fix(docx): preserve native OMML equation structure 2026-10-30 10:41:28 +08:00
Jay Hemnani
aee4ac8dd3 fix: keep BibTeX quoted values that contain a braced quote
In a quoted BibTeX value a double quote is written inside braces, as in
title = "The {"}Quoted{"} Paper". The converter ended the value at the
first quote, so the title became "The" and the entry lost its remaining
fields. Only end a quoted value at a quote outside braces.
2026-10-29 13:44:32 +05:30
Jay Hemnani
9a2f1dd074 fix: format BibTeX names with Jr parts and braced "and"
Authors were split on every " and " after braces were removed, so a
braced corporate name such as {Food and Agriculture Organization} became
two people, and "King, Jr., Martin Luther" came out as "Jr., Martin Luther
King". Split names and name parts only outside braces, and order the
three-part "Last, Jr, First" form as "First Last Jr".
2026-10-29 13:44:32 +05:30
Bingxi Zhao (Frank)
fbab59acbf feat: modularize installation and enforce feature dependency boundaries 2026-10-28 01:02:29 +08:00
Fancie-Personal
e7c909ec94 perf(documents): bound an inlined raster's long edge before admission
Chat attachments base64-inline every harvested image into one provider
request, and the byte budgets did not bound what a *page-sized* raster costs
there: a scanned A4 page arrives at ~2900x4032 (~600 KB), so a seven-page scan
rode along as ~4.2 MB of body / ~5.6 MB encoded even though the model is served
a raster scaled toward ~1.5k on the long edge anyway.

Fit a candidate to MAX_INLINE_IMAGE_EDGE (1600) before the byte budgets weigh
it, so the budgets measure what will actually ship. An image already within the
bound keeps its bytes and its format; re-encoding is reserved for rasters past
it, at the same jpg_quality (82) the reading viewport's whole-page render
already uses. Every failure path returns the original bytes, and a pixel count
past MAX_INLINE_FIT_PIXELS is refused before Pillow allocates for it.

The reading-area ingest keeps source resolution (max_inline_edge=0) because
those images are written to disk for the reader pane. The PPTX and DOCX
ingests were still on the chat-attachment budget by default, so they now pass
the reading budget like the PDF ingest already did.
2026-10-18 23:36:28 +08:00
Mohammad Hijjawi
d16481a77c fix: decode escaped emoji in ask_user cards as real characters (#1780)
decode_escaped_unicode_for_display repairs double-encoded \uXXXX runs
(#973) with the unicode_escape codec, which turns a surrogate-pair escape
for an emoji into two lone surrogates instead of one emoji. The
result cannot be encoded as UTF-8, so an ask_user card or mastery question
whose escaped text contains an emoji fails when the event is persisted to
SQLite or sent over the WebSocket.

Decode each run as a JSON string instead, matching the web decoder's
JSON.parse, and leave runs with an unpaired surrogate escaped.
2026-10-07 20:21:09 +08:00
Bingxi Zhao
891493b7b1 Merge pull request #1686 from evan188199-tech/codex/fix/epub-toc-anchors
fix(reading): preserve EPUB outline anchors (#1673)
2026-10-04 14:20:41 +08:00
XZH
95e913a787 fix(reading): preserve EPUB outline anchors 2026-10-01 17:26:44 -07:00
Mohammad Hijjawi
ec79b40996 fix: keep BibTeX entries with accented author names
_scan_entry treated every double quote as the start of a quoted value,
even inside a braced one. An accent such as {\"u} in
author = {M{\"u}ller, Hans} therefore opened a "quoted" run that swallowed
the entry's closing brace, and the whole entry was silently dropped from
the converted bibliography. Only treat a double quote as a delimiter at
the entry's top level, as BibTeX does.
2026-09-28 13:53:27 +01:00
Bingxi Zhao (Frank)
a053fecf6e release: v1.6.11
The interface ships in French and Ukrainian alongside English and
Chinese, and /language pins a reply language for one conversation.
Immersive reading organizes collections as colored folders, adds a
fullscreen learning mode, and turns Explain / Translate / Guide me on a
selection into ordinary messages in the reading chat; "Quiz me on this
page" runs one quiz turn without changing the conversation's mode, which
retires the reading-openers endpoint and its task model. Images embedded
in DOCX, PPTX and PDF are extracted in place and reach vision models.

Office files preview as paged PDFs through LibreOffice (now in the Docker
image), falling back to the in-browser renderers without it. Web sources
re-sync on a durable schedule, linked folders sync on demand, .bib files
index, and a zotero_search tool queries Zotero. Settings gains Learning
progress and credential-free presets; admins import users from CSV;
split deployments can hand a session to a public device. Grok CLI joins
the subagents, Unifically the providers, ChatGPT exports the importers.

Gate cleanup: mypy/bandit findings in the new launcher, audio-overview,
web-source, reading-store and textbook modules; the task-model copy test
follows the retired reading_openers kind.

See assets/releases/ver1-6-11.md for the full notes, and the README
Releases row plus its eleven translations.
2026-09-24 09:59:56 +08:00
Bingxi Zhao (Frank)
8880529c65 Merge PR batch with local follow-up fixes
Preserve precise learner KB route guards, combine UI and response language domains, carry normalized EPUB extraction, and regenerate frontend contracts.

Update locale fallback coverage for the completed Ukrainian translation bundle.
2026-09-23 12:01:14 +08:00
Bingxi Zhao (Frank)
55e96e429e style: satisfy repository lint and format gates 2026-09-23 11:28:41 +08:00