Commit Graph
84 Commits
Author SHA1 Message Date
ANIRUDDHA ADAKandAniruddha Adak f9c65f67a9 fix(electron-utils): block trailing-dot internal hostnames (#396)
* fix(electron-utils): block trailing-dot internal hostnames

DNS treats localhost. as localhost; strip trailing dots before the hostname gate.

* fix(electron-utils): prettier format trailing-dot guard

---------

Co-authored-by: Aniruddha Adak <aniruddhaadak80@users.noreply.github.com>
2026-09-15 15:47:53 +08:00
ANIRUDDHA ADAKandAniruddha Adak f994dd9c8c fix(i18n): use own-property check in format (#394)
in operator leaked prototype members like toString into UI strings.

Co-authored-by: Aniruddha Adak <aniruddhaadak80@users.noreply.github.com>
2026-09-15 15:47:40 +08:00
ANIRUDDHA ADAKandAniruddha Adak 72eeca5e41 fix(ai-provider): match vision guard case-insensitively (#393)
* fix(ai-provider): match vision guard case-insensitively

Uppercase DeepSeek ids bypassed the text-only guard and sent images to a text-only model.

* fix(ai-provider): prettier format vision guard

---------

Co-authored-by: Aniruddha Adak <aniruddhaadak80@users.noreply.github.com>
2026-09-15 15:47:28 +08:00
ANIRUDDHA ADAKandAniruddha Adak 0e83b97e6f fix(docx): balance single-quoted field char runs (#392)
TOKEN_RE only matched double-quoted fldCharType, so single-quoted fields unbalanced on save.

Co-authored-by: Aniruddha Adak <aniruddhaadak80@users.noreply.github.com>
2026-09-15 15:47:18 +08:00
ANIRUDDHA ADAKandAniruddha Adak 2c25b86402 fix(ai-provider): bound fixed-sampling match and guard missing model (#383)
Add trailing boundary so o10/o30/gpt-50 do not omit temperature. Guard opencode route against undefined model.

Co-authored-by: Aniruddha Adak <aniruddhaadak80@users.noreply.github.com>
2026-09-15 11:23:13 +08:00
William EchoandWilliam Echo 0d89426252 fix(pptx): validate schemas from checkout paths with spaces (#386)
Co-authored-by: William Echo <175406538+qinghuanandejiangshi@users.noreply.github.com>
2026-09-15 11:22:27 +08:00
ANIRUDDHA ADAKandAniruddha Adak 4c17dc0036 fix(docx): inline EQ fields with single-quoted fldCharType (#382)
FLD_CHAR_RE only matched double quotes, leaving single-quoted EQ fields as raw instrText.

Co-authored-by: Aniruddha Adak <aniruddhaadak80@users.noreply.github.com>
2026-09-15 11:22:01 +08:00
ANIRUDDHA ADAKandAniruddha Adak 92383a3ad1 fix(file-parse): keep pptx tab stops as tabs (#378)
Inline a:tab between runs was dropped, collapsing tab-separated columns to joined text. Emit tab character to preserve extraction fidelity.

Co-authored-by: Aniruddha Adak <aniruddhaadak80@users.noreply.github.com>
2026-09-15 11:20:56 +08:00
ANIRUDDHA ADAKandAniruddha Adak 69c1213c95 fix(pdf2docx): detect underscore leaders in hasDotLeaderRun (#377)
TOC_LINE_RE already handles underscores but hasDotLeaderRun only accepted dot and middle-dot, so underscore index pages never triggered leaderIndexPage path. Include underscore to match.

Co-authored-by: Aniruddha Adak <aniruddhaadak80@users.noreply.github.com>
2026-09-15 11:20:48 +08:00
ANIRUDDHA ADAKandAniruddha Adak 5ae4a8a555 fix(docx): read single-quoted checkbox glyph values (#381)
sdtCheckboxGlyphs only matched double-quoted w14:val, falling back to default glyphs for single-quoted producers.

Co-authored-by: Aniruddha Adak <aniruddhaadak80@users.noreply.github.com>
2026-09-15 11:20:39 +08:00
ANIRUDDHA ADAKandAniruddha Adak e35048ec71 fix(docx): read single-quoted protection hash salt spin sid (#376)
Some producers emit single-quoted XML attributes. edit/enforcement already handled both quote styles, but hash/salt/spin/sid and recommended only matched double quotes, dropping credentials and weakening protection verification.

Co-authored-by: Aniruddha Adak <aniruddhaadak80@users.noreply.github.com>
2026-09-15 11:20:29 +08:00
ANIRUDDHA ADAKandAniruddha Adak cbcd289e49 fix(docx): handle numeric char refs, NBSP edges and empty self-closing runs in field patch (#359)
* fix(docx): handle numeric char refs, NBSP edges and empty self-closing runs in field patch

* fix(docx): correct NBSP test expectation for trimmed fieldDisplay

* fix(docx): guard char-ref codepoints and assert NBSP on patched XML only

- decodeXmlText leaves out-of-range (>0x10FFFF) and surrogate (0xD800-0xDFFF) refs untouched instead of throwing RangeError; regression test covers &#99999999;, &#xFFFFFFFF; and surrogates.

NBSP edge test now asserts patched XML only (xml:space preserve + NBSP in <w:t>), dropping the fieldDisplay round-trip which normalizes edge whitespace regardless of xml:space.

---------

Co-authored-by: Aniruddha Adak <aniruddhaadak80@users.noreply.github.com>
2026-09-14 14:25:09 +08:00
ANIRUDDHA ADAKandAniruddha Adak 78f133c216 fix(ai-search): normalize media MIME type case-insensitively (#358)
* fix(ai-search): normalize media MIME type case-insensitively

* fix(sheets): satisfy exactOptionalPropertyTypes for LazyCellMatch rawValue

---------

Co-authored-by: Aniruddha Adak <aniruddhaadak80@users.noreply.github.com>
2026-09-14 10:55:55 +08:00
ANIRUDDHA ADAKandAniruddha Adak b8fe1b6b01 fix(docx): read single-quoted protection attributes (#355)
* fix(docx): read single-quoted protection attributes

* fix(sheets): satisfy exactOptionalPropertyTypes for LazyCellMatch rawValue

---------

Co-authored-by: Aniruddha Adak <aniruddhaadak80@users.noreply.github.com>
2026-09-14 10:55:18 +08:00
merrick-2002 e42da7c7c0 Sync snapshot (2026-09-13) (#361) 2026-09-14 07:03:41 +08:00
yiyuexiong 09df482a83 feat(docs): add Zotero citation integration (#332) 2026-09-14 06:19:25 +08:00
ANIRUDDHA ADAKandAniruddha Adak 05e3b493c2 fix(docx): split and patch on spaced and paired run-tab variants (#348)
Co-authored-by: Aniruddha Adak <aniruddhaadak80@users.noreply.github.com>
2026-09-13 23:35:40 +08:00
ANIRUDDHA ADAKandAniruddha Adak dfdd67ba93 fix(pdf2docx): detect underscore leaders and 4-digit leaderless pages (#347)
Co-authored-by: Aniruddha Adak <aniruddhaadak80@users.noreply.github.com>
2026-09-13 23:30:04 +08:00
ANIRUDDHA ADAKandAniruddha Adak 056ad9b8d2 fix(pptx): replace non-solid fills instead of duplicating on recolor (#346)
Co-authored-by: Aniruddha Adak <aniruddhaadak80@users.noreply.github.com>
2026-09-13 23:29:13 +08:00
ANIRUDDHA ADAKandAniruddha Adak 4fffe25428 fix(ai-provider): match fixed-sampling models case-insensitively on every route (#343)
Co-authored-by: Aniruddha Adak <aniruddhaadak80@users.noreply.github.com>
2026-09-13 23:28:43 +08:00
ANIRUDDHA ADAK fab0b343a5 fix(pdf2docx): count roman-numeral TOC leader lines (#329) 2026-09-13 17:41:58 +08:00
ANIRUDDHA ADAK ad0ff48252 fix(pptx): replace solidFill when recoloring preset and system runs (#326) 2026-09-13 17:35:37 +08:00
ANIRUDDHA ADAKandAniruddha Adak c5ff3ea4e1 fix(docx): preserve edge spaces in field patches (#320)
Co-authored-by: Aniruddha Adak <aniruddhaadak80@users.noreply.github.com>
2026-09-13 16:41:39 +08:00
ANIRUDDHA ADAKandAniruddha Adak 601ba438d7 fix(docx): decode numeric char refs in notes and text patches (#319)
Co-authored-by: Aniruddha Adak <aniruddhaadak80@users.noreply.github.com>
2026-09-13 16:41:14 +08:00
ANIRUDDHA ADAKandAniruddha Adak ae6c94df44 fix(docx): keep heavy leader for ptab stops (#318)
Co-authored-by: Aniruddha Adak <aniruddhaadak80@users.noreply.github.com>
2026-09-13 16:40:59 +08:00
ANIRUDDHA ADAKandAniruddha Adak b3374c19f2 fix(docx): respect off/none/case variants in TOC bold detection (#317)
Co-authored-by: Aniruddha Adak <aniruddhaadak80@users.noreply.github.com>
2026-09-13 16:40:43 +08:00
Thibault Jaigu de139a0615 feat(ai-provider): add Requesty as an OpenAI-compatible provider (#296) 2026-09-12 11:39:52 +08:00
ANIRUDDHA ADAK 474c8fcdc7 fix(electron-utils): validate fallback save dir instead of crashing later (#313) 2026-09-12 11:38:56 +08:00
ANIRUDDHA ADAK e6d5815d25 fix(docx-engine): read paired protection tags and on enforcement (#312) 2026-09-12 11:38:47 +08:00
ANIRUDDHA ADAK dad0cec0ec fix(pdf2docx): merge touching intervals at minGap boundary (#304) 2026-09-12 11:37:25 +08:00
ANIRUDDHA ADAK 0c6fa8fb35 fix(ai-provider): match JSON Content-Type case-insensitively (#303) 2026-09-12 11:37:16 +08:00
ANIRUDDHA ADAK d529a56f98 fix(i18n): require BCP-47 boundary in normalizeLang prefix match (#302) 2026-09-12 11:37:06 +08:00
merrick-2002andClaude Fable 5.1 628aff5090 test(font-metrics): fix eviction expectation and restore the unmapped-codepoint probe (#286)
evictOldestEntry frees one slot (size < max), so four entries capped at two
leave one. The NaN probe goes back to a supplementary-plane code point
instead of a raw U+FFFF literal.

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-10 19:05:51 +08:00
ANIRUDDHA ADAKandAniruddha Adak 1179ea77ec fix(font-metrics): evict oldest advance-cache entry instead of clearing (#281)
Co-authored-by: Aniruddha Adak <aniruddhaadak80@users.noreply.github.com>
2026-09-10 17:48:28 +08:00
konghaojie-k2andClaude 932eccb1c7 fix(slides): strip stale embedded-font subsets after text edits (#283)
Decks saved by WPS/PowerPoint with font embedding carry subsetted,
MicroType-Express-compressed EOT fonts we cannot re-generate (licensed
compressor). After any text edit the subsets no longer cover the new
glyphs; WPS honors the stale subset strictly and renders the missing
glyphs as invisible ("white") text, while the in-app system-font
fallback shows everything fine.

On save, once any slide has content edits (structureDirty or a dirty
element — including new slides from insert/duplicate), strip the
embedding: drop p:embeddedFontLst + embedTrueTypeFonts/saveSubsetFonts
from presentation.xml, the font rels, the ppt/fonts/*.fntdata parts and
the fntdata content-type. Viewers then fall back to system fonts.
No-edit saves stay byte-identical and keep the embedding.

Known limit: master/layout text edits write archive parts directly and
don't trigger the strip.

Co-authored-by: Claude <noreply@anthropic.com>
2026-09-10 17:23:42 +08:00
ANIRUDDHA ADAKandAniruddha Adak a5ed6f8cf0 fix(electron-utils): trim and normalize URLs in safeExternalUrl (#274)
Co-authored-by: Aniruddha Adak <aniruddhaadak80@users.noreply.github.com>
2026-09-10 11:50:40 +08:00
merrick-2002andGenOffice d24c964a3e Sync snapshot (2026-09-09) (#271)
- **New app: GenOffice HTML.** Open, edit and generate .html pages: a source pane with a sandboxed live preview, click-to-select elements with a floating toolbar and style panel, device-size preview, image tools and a present mode. AI generates whole pages from a brief with style directions and offers page-wide Restyle, Theme and Summarize. Export to Word runs locally through the built-in html2docx converter (native, editable OOXML; no print-to-PDF detour).
- **AI:** separate BYOK providers for web search, image generation and image/video analysis; new Codex App Server provider; Ask AI quotes the selected text and keeps it highlighted while it runs; custom AI panel text size; blocked requests retry through the Chromium network stack.
- **App:** global AutoSave setting shared by every editor; AI panel text size and chat spellcheck toggles (genoffice#249); Czech (cs) UI locale (genoffice#259); Save As defaults to the document's folder; PDF export no longer aborts on CJK file paths on Windows.
- **Docs:** Export as HTML; comments and replies edit in place from the comments pane; the caret can leave a trailing table (genoffice#266); spellcheck re-marks text as soon as it is re-enabled; AI edits are character-precise on partial selections; zoom keeps the scroll position; pasting a cell from Sheets takes the destination font.
- **Sheets:** Find no longer freezes on wide or streamed grids; Replace searches as you type; cached values of external-workbook formulas are kept instead of #ERROR! (genoffice#235); "number stored as text" is a warning, not an error (genoffice#236); paste repeats into the target range like Excel; filter criteria survive save/reopen; saves retry when Windows locks the file; many Excel-fidelity fixes for column widths, row heights, charts, slicers, number formats and CJK fonts.
- **Slides:** PDF export works for large presentations (genoffice#264); EMF/WMF picture fonts and East Asian theme fonts resolve correctly; decks with missing layouts or embedded styles still open; outline-only pie slices render.
- **PDF:** highlight and underline geometry aligns with the text; Shift+arrows extend the selection instead of paging.
- **Markdown:** Find and replace (Ctrl+F / Ctrl+H) (genoffice#253); mermaid code blocks render as diagrams (genoffice#263); better print quality.
- Thanks to community contributors @GoodScholar, @aniruddhaadak80 and @Sun8854, and to @hanyscz, @qgzln, @zyp997, @bisslot, @krakotay and @Ben03151 for the reports.

Co-authored-by: GenOffice <merrick-2002@users.noreply.github.com>
2026-09-09 18:19:13 +08:00
Sun8854andSun8854 d2fecab77a feat(ai-provider): add Codex app-server integration (#267)
Co-authored-by: Sun8854 <Sun8854@users.noreply.github.com>
2026-09-09 11:33:16 +08:00
ANIRUDDHA ADAKandAniruddha Adak dc09e0d29a fix(ai-provider): omit temperature for OpenAI o-series reasoning models (#261)
Co-authored-by: Aniruddha Adak <aniruddhaadak80@users.noreply.github.com>
2026-09-08 21:13:13 +08:00
ANIRUDDHA ADAKandAniruddha Adak bd46b03ee8 fix(electron-utils): skip drop files whose path resolution throws (#240)
* fix(electron-utils): skip drop files whose path resolution throws

* fix(electron-utils): extract throwing-resolver guard to satisfy lint

---------

Co-authored-by: Aniruddha Adak <aniruddhaadak80@users.noreply.github.com>
2026-09-07 11:10:10 +08:00
ANIRUDDHA ADAKandAniruddha Adak 83f2fa078f fix(ai-provider): trim model whitespace and remap padded retired ids (#232)
Co-authored-by: Aniruddha Adak <aniruddhaadak80@users.noreply.github.com>
2026-09-07 11:09:13 +08:00
ANIRUDDHA ADAKandAniruddha Adak 959df83061 fix(ai-provider): allow keyless custom endpoints for local models (#229)
* fix(ai-provider): allow keyless custom endpoints for local models

* fix(ai-provider): use fresh response for second header assertion

---------

Co-authored-by: Aniruddha Adak <aniruddhaadak80@users.noreply.github.com>
2026-09-07 11:08:41 +08:00
merrick-2002andGenOffice 69b4ce0560 Sync snapshot (2026-09-06) (#243)
- Docs: Word-style dark page, phased fast open for long documents, fonts embedded in the DOCX, spellcheck toggle, hyperlink editing, and ~80 Word fidelity fixes (CJK/JP metrics, header/footer, tables, anchored pictures)
- Sheets: hold formula recalculation while file data streams in, large-workbook scroll/load performance, combo charts, duplicate/unique conditional formatting by display text, RTL frozen-pane fix, workbooks whose ZIP entries carry a leading slash
- Slides: MTX-compressed embedded font support, CJK/Latin face selection and PowerPoint script fallbacks, theme colors kept on paragraph defaults and bullets, more reliable AI edits with a layout audit after each batch
- PDF: AI page ops, text block move/align, notes and markup editing, watermark and header/footer, form check boxes, metadata; the cloud Export as Word fallback is removed, conversion is always on-device
- AI: Gemini tool schema translation, OpenCode Zen/Go providers, markdown tables and code blocks in chat, current date in the system prompt
- Shell: Office-style ribbon collapse across all editors, native Windows ARM64 installer, BUILD_DIR override for packaging

Co-authored-by: GenOffice <merrick-2002@users.noreply.github.com>
2026-09-07 00:18:14 +08:00
ANIRUDDHA ADAKandAniruddha Adak 9439d3eae9 feat(docs): RTL-aware AI panel chrome and auto-direction messages (part of #13) (#202)
Co-authored-by: Aniruddha Adak <aniruddhaadak80@users.noreply.github.com>
2026-09-04 18:31:56 +08:00
ANIRUDDHA ADAKandAniruddha Adak 2910486203 feat(ai-search): add Tavily web search fallback via TAVILY_API_KEY (#194)
* feat(ai-search): add Tavily web search fallback via TAVILY_API_KEY

* style(ai-search): prettier-format Serper catch block

---------

Co-authored-by: Aniruddha Adak <aniruddhaadak80@users.noreply.github.com>
2026-09-04 18:30:58 +08:00
ANIRUDDHA ADAKandAniruddha Adak 4770d9ceb4 fix(ai-provider): keep default temperature for the Gemini 3 family (#193)
* fix(ai-provider): omit deprecated temperature on Gemini 3.6/3.7/3.5-lite

* style: wrap long geminiTurn call for prettier

* fix(ai-provider): keep default temperature for Gemini 3 family

Google strongly recommends the default temperature (1.0) for Gemini 3 since lower values may cause looping or degraded reasoning. Match the whole gemini-3 family instead of specific ids.

---------

Co-authored-by: Aniruddha Adak <aniruddhaadak80@users.noreply.github.com>
2026-09-04 18:24:02 +08:00
ANIRUDDHA ADAKandAniruddha Adak f30a3012bc fix(ai-provider): return ok:false on non-JSON 200 instead of throwing (#191)
Co-authored-by: Aniruddha Adak <aniruddhaadak80@users.noreply.github.com>
2026-09-04 12:23:00 +08:00
ANIRUDDHA ADAKandAniruddha Adak 2dab773410 fix(ai-provider): sanitize Gemini tool schemas for union types and refs (fixes #186) (#187)
* fix(ai-provider): sanitize Gemini tool schemas for union types and refs (fixes #186)

Gemini FunctionDeclarations use a restricted Schema where type must be
a single string (not an array) and items a single Schema, and $ref/definitions
are not understood. Docs insert_chart/edit_chart use type ['number','null']
and ['string','null'] for nullable values, which caused HTTP 400:
  Unknown name "type" at '...value.items': Proto field is not repeating,
  cannot start list.
because the proto's type field is not repeated.

- Add sanitizeGeminiSchema() that resolves $ref (paragraphs), collapses
  union types to single type + nullable: true, ensures items is single
  schema (tuple -> first), and strips definitions.
- Use it in geminiTurn via toGeminiParameters() so every tool's
  inputSchema is Gemini-compatible.

Fixes #186

* style: fix formatting for gemini sanitize helper

---------

Co-authored-by: Aniruddha Adak <aniruddhaadak80@users.noreply.github.com>
2026-09-04 12:22:26 +08:00
konghaojie-k2 f105f366e2 feat ai settings for the per-turn output token cap (#185)
Every app's AI IPC handler computed `request.maxTokens ?? 8192`, and no
renderer ever sends maxTokens — so the per-turn output budget was a
hardcoded 8192 that BYOK users could not change. For a reasoning model
that cap is shared with thinking: probed against api.deepseek.com/v1 with
max_tokens=3000, usage came back completion_tokens=3000 /
reasoning_tokens=3000 with zero content deltas and finish_reason=length,
i.e. the model never started answering. At the observed ~129 tok/s the
8192 default is exactly the ~60s "empty reply" users reported.

Thinking cannot simply be switched off for these models: registry.ts pins
the *direct* deepseek endpoint to non-thinking because its transcript
could not round-trip reasoning, while modelEchoesReasoning() documents
that DeepSeek V4 rejects tool turns unless the reasoning is echoed back.
So the honest lever is the budget, not the switch.

- AiSettings.maxOutputTokens (absent = default, so existing settings
  files keep behaving identically), clamped to [1024, 131072] when read
  and when typed: a hand-edited or mistyped value can never be forwarded
  to an endpoint verbatim.
- docs/sheets/slides main handlers resolve the cap through
  maxOutputTokensOf(settings); markdown and pdf share docs' ai:stream
  channel, so all six apps follow the setting from one place.
- Settings ▸ AI model: a numeric field (clamped on blur) labelled in all
  19 languages.
- sheets' aiSettingsInputSchema is .strict(), so it had to learn the key
  or saving settings would have started failing.
2026-09-03 14:58:48 +08:00
merrick-2002andGenOffice 9f971edafa Sync snapshot (2026-09-02) (#181)
- Docs: DOCX rendering and pagination fidelity (page borders, VML pictures, header/footer images, cross-page tables, anchored floats, character-unit indents, CJK typography)
- Docs: more reliable PDF export for huge documents; AI rewrites keep the replaced content's formatting
- Sheets: merge workbooks; Excel-standard keyboard shortcuts; PDF export with header/footer variants and pictures
- Sheets: rendering, conditional formatting, chart and formula fidelity fixes; right-to-left sheet support
- Slides: WordArt text warp, improved text layout and font substitution; AI table edits keep formatting

Co-authored-by: GenOffice <merrick-2002@users.noreply.github.com>
2026-09-03 00:12:17 +08:00