Spaces:
Sleeping
Sleeping
fixed issue with tool expander showing tick incorrectly
Browse files- web/src/App.tsx +5 -2
web/src/App.tsx
CHANGED
|
@@ -457,7 +457,7 @@ function App() {
|
|
| 457 |
const lines = output.trim().split('\n');
|
| 458 |
const lastLine = lines[lines.length - 1] || '';
|
| 459 |
|
| 460 |
-
// Success indicators on the last line
|
| 461 |
const hasFinalSuccess =
|
| 462 |
lastLine.includes('β
Classification stored') ||
|
| 463 |
lastLine.includes('β
Lean 4 code compiled successfully') ||
|
|
@@ -466,7 +466,8 @@ function App() {
|
|
| 466 |
lastLine.includes('β
Prolog code executed') ||
|
| 467 |
lastLine.includes('β
Found in Mathlib') ||
|
| 468 |
/β
.*completed/i.test(lastLine) ||
|
| 469 |
-
lastLine.includes('β
')
|
|
|
|
| 470 |
|
| 471 |
// Actual failure indicators (not status markers like "β Not needed")
|
| 472 |
const hasActualFailure =
|
|
@@ -474,6 +475,8 @@ function App() {
|
|
| 474 |
output.includes('β Python execution failed') ||
|
| 475 |
output.includes('β SymPy execution failed') ||
|
| 476 |
output.includes('β Lean 4 compilation failed') ||
|
|
|
|
|
|
|
| 477 |
output.includes('β Not found in Mathlib') ||
|
| 478 |
output.includes('Exit code: 0') === false && /Exit code: \d+/.test(output);
|
| 479 |
|
|
|
|
| 457 |
const lines = output.trim().split('\n');
|
| 458 |
const lastLine = lines[lines.length - 1] || '';
|
| 459 |
|
| 460 |
+
// Success indicators on the last line OR anywhere in full output
|
| 461 |
const hasFinalSuccess =
|
| 462 |
lastLine.includes('β
Classification stored') ||
|
| 463 |
lastLine.includes('β
Lean 4 code compiled successfully') ||
|
|
|
|
| 466 |
lastLine.includes('β
Prolog code executed') ||
|
| 467 |
lastLine.includes('β
Found in Mathlib') ||
|
| 468 |
/β
.*completed/i.test(lastLine) ||
|
| 469 |
+
lastLine.includes('β
') ||
|
| 470 |
+
output.includes('β
**Compilation Successful**'); // Lean 4 success (bold markdown)
|
| 471 |
|
| 472 |
// Actual failure indicators (not status markers like "β Not needed")
|
| 473 |
const hasActualFailure =
|
|
|
|
| 475 |
output.includes('β Python execution failed') ||
|
| 476 |
output.includes('β SymPy execution failed') ||
|
| 477 |
output.includes('β Lean 4 compilation failed') ||
|
| 478 |
+
output.includes('β **Compilation Failed**') || // Lean 4 failure (bold markdown)
|
| 479 |
+
output.includes('β Compilation Failed') || // Lean 4 failure (plain)
|
| 480 |
output.includes('β Not found in Mathlib') ||
|
| 481 |
output.includes('Exit code: 0') === false && /Exit code: \d+/.test(output);
|
| 482 |
|