Before submitting your bug report
Relevant environment info
- OS: Linux x64 (VS Code Server)
- Continue version: 1.2.22
- IDE version: 1.123.0
Description
Summary
The Continue GUI renderer uses KaTeX but does not load the mhchem contrib extension. As a result, \ce{} and \pu{} commands crash the renderer and cause the response to stop rendering mid-output.
Expected behavior
\ce{H2O}, \ce{Fe^{2+}}, and similar chemical equation syntax should render correctly.
Current behavior
Any response containing \ce{...} or \pu{...} causes the KaTeX parser to throw and the entire message block stops rendering.
Proposed fix
Add a single import in the GUI bundle before KaTeX is first used:
import 'katex/contrib/mhchem';
This is the standard way to enable mhchem — it monkey-patches the katex module globally and requires no API changes. The katex package already ships with this contrib file, so no new dependency is needed.
Use case
Users writing chemistry or physics notes (university level) rely on \ce{} for chemical equations. Without mhchem, they are forced to use \mathrm{H_2O} workarounds that produce inferior typesetting — no automatic spacing around arrows, no charge notation, no state symbols.
References
To reproduce
No response
Log output
Before submitting your bug report
Relevant environment info
Description
Summary
The Continue GUI renderer uses KaTeX but does not load the
mhchemcontrib extension. As a result,\ce{}and\pu{}commands crash the renderer and cause the response to stop rendering mid-output.Expected behavior
\ce{H2O},\ce{Fe^{2+}}, and similar chemical equation syntax should render correctly.Current behavior
Any response containing
\ce{...}or\pu{...}causes the KaTeX parser to throw and the entire message block stops rendering.Proposed fix
Add a single import in the GUI bundle before KaTeX is first used:
This is the standard way to enable mhchem — it monkey-patches the katex module globally and requires no API changes. The
katexpackage already ships with this contrib file, so no new dependency is needed.Use case
Users writing chemistry or physics notes (university level) rely on
\ce{}for chemical equations. Without mhchem, they are forced to use\mathrm{H_2O}workarounds that produce inferior typesetting — no automatic spacing around arrows, no charge notation, no state symbols.References
To reproduce
No response
Log output