Repository navigation
Commit 205a06e
authored
refactor(ui): adopt Astryx 0.6.2 components.math for Markdown math (#5543)
* chore(deps): bump @astryxdesign/* from 0.6.1 to 0.6.2
0.6.2 adds an opt-in Markdown math renderer (components.math), a TextInput
IME fix for CJK input, ChatToolCalls a11y announcements, and a localized
Spinner label.
Upstream reworked Markdown.js parse plumbing for the math option
(mathParseOptions / hasMathRenderer cache reset), so the settledText /
transformSource patch hunks were re-applied by hand onto the new shape;
all other patched files were byte-identical between 0.6.1 and 0.6.2.
Generated-by: Devin
* refactor(ui): render Markdown math through upstream components.math
Replace the private-use TOKEN transport with Astryx 0.6.2's official
math pipeline: components.math renders parsed math nodes through the
same KaTeX configuration, and transformSource now translates the host
delimiters into upstream grammar instead of smuggling tokens past the
parser.
\(…\) inline math is emitted as `$…$` guarded by zero-width spaces so
adjacent digits or dollars cannot trip upstream's currency checks, and
`\[…\]`/`$$…$$` emit `$$` lines that repeat the enclosing quote/list
margin so containers still own them. Bare `$` outside code and link
destinations is escaped, preserving the "shell variables and currency
stay literal" contract that upstream's bare-$ pairing would otherwise
break. Display math on a table-row line degrades to an inline span so
`$$` lines never split a row.
The regenerated patch adds one upstream fix: trimStreamingArtifacts'
unclosed-marker scans ([, *, ~~) now skip completed inline math spans;
previously a last-line formula containing those characters was trimmed
or auto-closed as Markdown.
Generated-by: Devin1 parent 8dfc68d commit 205a06e
19 files changed
Lines changed: 683 additions & 212 deletions
File tree
- apps/desktop
- resources/licenses/npm
- src/renderer/astryx-theme
- docs
- packages/ui
- src
- __tests__
- stories
- patches
- scripts
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
253 | 253 | | |
254 | 254 | | |
255 | 255 | | |
256 | | - | |
| 256 | + | |
257 | 257 | | |
258 | | - | |
| 258 | + | |
259 | 259 | | |
260 | 260 | | |
261 | 261 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | | - | |
77 | | - | |
| 76 | + | |
| 77 | + | |
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
677 | 677 | | |
678 | 678 | | |
679 | 679 | | |
680 | | - | |
| 680 | + | |
681 | 681 | | |
682 | 682 | | |
683 | 683 | | |
| |||
707 | 707 | | |
708 | 708 | | |
709 | 709 | | |
710 | | - | |
| 710 | + | |
711 | 711 | | |
712 | 712 | | |
713 | 713 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
114 | | - | |
115 | | - | |
| 114 | + | |
| 115 | + | |
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| |||
0 commit comments