mirror of
https://github.com/chaitin/MonkeyCode.git
synced 2026-11-30 16:47:16 +08:00
Review-driven batch on top of the math feature: - Ask-card custom answer: scroll the card above the keyboard on input focus (inverted-list scrollToIndex, viewPosition 0). - Inline math boundaries: closing-$ guard switched to a negated class so bold-wrapped/operator-adjacent formulas (**$E=mc^2$**, $a$-$b$) and han-adjacent Chinese phrasing render; CJK/full-width punctuation excluded from $-content to kill currency false positives. - Clamp MathJax output size (rule-bomb guard), reject empty $$ blocks, clamp throttle elapsed against clock steps, and gate O(n^2) slicing in the inline tokenizer behind a first-char check. - Streaming perf: stable body root key + content-hash node keys keep top-level formulas mounted across re-parses; TeX->SVG and parsed-AST LRU caches; memoized markdown style object. - Android: scale inline formulas into the fixed line box and drop the baseline shift (CustomLineHeightSpan overlaps oversized inline views). - handleSend snapshots the disconnect() return so throttled tail chunks are archived; effect cleanup also disconnects the newRound client; failPendingToolCalls replaces message objects so memoized tool cards observe the status flip. - Swap @babel/plugin-transform-dynamic-import to the ^7 line (the ^8 line is Babel-8/ESM-only and breaks installs and jest on older Node).