mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #2972] [CLOSED] [GUI] Add shared source-preserving chat math core #4372
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#4372
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/2972
Author: @CC-David-CC
Created: 10/17/2026
Status: ❌ Closed
Base:
main← Head:feat/web-math-core-minimal📝 Commits (1)
0abb109web: add shared source-preserving math core📊 Changes
7 files changed (+183 additions, -4 deletions)
View changed files
➕
docs/WEB_MATH_INTERFACE.md(+16 -0)📝
serve/server.py(+18 -0)📝
serve/web/app.css(+8 -0)📝
serve/web/app.js(+18 -4)📝
serve/web/index.html(+4 -0)➕
serve/web/math-adapter.js(+6 -0)➕
serve/web/math.js(+113 -0)📄 Description
Problem and result
Chat equations currently remain plain text. Add an opt-in shared parser and renderer interface while preserving original text through streaming, copy, export, history and API requests.
Related discussion
Related: #1829. Renderer follow-ups: #2974 (KaTeX) and #2975 (MathJax).
Approach
Keep rendering disabled by default. Recognize complete math outside code and Markdown links, bound rendering work, and fall back to source when rendering is unavailable. This core includes a placeholder adapter; renderer implementations remain separate.
Validation
Passed:
90767252f; tested head0abb10979. Range-diff confirms the original patches are unchanged;git diff --check upstream/mainpassed.python test_browser.py <checkout>. Renderer screenshots inspected where applicable.Failed:
Not run:
Limits
The placeholder adapter does not typeset equations. This targets the Python-served web chat; a renderer follow-up is needed for visual math.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.