Spaces:
Sleeping
Sleeping
fix build error
Browse files- web/src/App.tsx +2 -3
- web/src/mathjax-config.ts +1 -1
web/src/App.tsx
CHANGED
|
@@ -8,8 +8,7 @@ import './App.css';
|
|
| 8 |
import {
|
| 9 |
mathJaxConfig,
|
| 10 |
preprocessMathContent,
|
| 11 |
-
hasMathContent
|
| 12 |
-
extractMathExpressions
|
| 13 |
} from './mathjax-config';
|
| 14 |
|
| 15 |
|
|
@@ -346,7 +345,7 @@ function App() {
|
|
| 346 |
const [isLoading, setIsLoading] = useState(false);
|
| 347 |
const [responseComplete, setResponseComplete] = useState(false);
|
| 348 |
const [statusMessage, setStatusMessage] = useState('');
|
| 349 |
-
const [showMathPreview
|
| 350 |
const messagesEndRef = useRef<HTMLDivElement>(null);
|
| 351 |
const messagesContainerRef = useRef<HTMLDivElement>(null);
|
| 352 |
const abortControllerRef = useRef<AbortController | null>(null);
|
|
|
|
| 8 |
import {
|
| 9 |
mathJaxConfig,
|
| 10 |
preprocessMathContent,
|
| 11 |
+
hasMathContent
|
|
|
|
| 12 |
} from './mathjax-config';
|
| 13 |
|
| 14 |
|
|
|
|
| 345 |
const [isLoading, setIsLoading] = useState(false);
|
| 346 |
const [responseComplete, setResponseComplete] = useState(false);
|
| 347 |
const [statusMessage, setStatusMessage] = useState('');
|
| 348 |
+
const [showMathPreview] = useState(true);
|
| 349 |
const messagesEndRef = useRef<HTMLDivElement>(null);
|
| 350 |
const messagesContainerRef = useRef<HTMLDivElement>(null);
|
| 351 |
const abortControllerRef = useRef<AbortController | null>(null);
|
web/src/mathjax-config.ts
CHANGED
|
@@ -152,7 +152,7 @@ export function preprocessMathContent(content: string): string {
|
|
| 152 |
// MathJax needs $$ on separate lines for multi-line display math
|
| 153 |
processed = processed.replace(
|
| 154 |
/\$\$([\s\S]*?)\$\$/g,
|
| 155 |
-
(
|
| 156 |
const trimmed = math.trim();
|
| 157 |
// If math contains newlines and isn't already wrapped, ensure clean formatting
|
| 158 |
if (trimmed.includes('\n')) {
|
|
|
|
| 152 |
// MathJax needs $$ on separate lines for multi-line display math
|
| 153 |
processed = processed.replace(
|
| 154 |
/\$\$([\s\S]*?)\$\$/g,
|
| 155 |
+
(_match, math) => {
|
| 156 |
const trimmed = math.trim();
|
| 157 |
// If math contains newlines and isn't already wrapped, ensure clean formatting
|
| 158 |
if (trimmed.includes('\n')) {
|