Commit eba48f6
committed
fix(ui): Disable State and ER diagrams temporarily
**Problem:**
State and ER diagrams have rendering issues and cause confusion.
**Solution:**
1. Removed from system prompt (SystemPromptConfiguration.swift)
- Deleted 'stateDiagram' and 'erDiagram' from Mermaid types list
- LLMs will no longer be instructed to generate these types
2. Added parser guards (MermaidParser.swift)
- Return .unsupported for state/ER diagrams
- Log warning when encountered
- Prevents attempted rendering
**Impact:**
- Test file mermaid-test.json will now show diagrams #3 (class) then #5 (gantt) with #4 (state) hidden
- No more diagram numbering confusion
- No more cross-diagram contamination
**To Re-Enable:**
1. Fix rendering issues in StateDiagramRenderer.swift and ERDiagramRenderer.swift
2. Remove parser guards
3. Re-add to system prompt
**Files Modified:**
- Sources/ConfigurationSystem/SystemPromptConfiguration.swift (line 564)
- Sources/UserInterface/Chat/Mermaid/MermaidParser.swift (lines 22-26)
**Testing:**
✅ Build: PASS
⏳ User should no longer see State diagram (#4)
⏳ Class diagram should work correctly1 parent 58d1448 commit eba48f6
2 files changed
Lines changed: 7 additions & 3 deletions
File tree
- Sources
- ConfigurationSystem
- UserInterface/Chat/Mermaid
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
561 | 561 | | |
562 | 562 | | |
563 | 563 | | |
564 | | - | |
| 564 | + | |
565 | 565 | | |
566 | 566 | | |
567 | 567 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
24 | 26 | | |
25 | | - | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
26 | 30 | | |
27 | 31 | | |
28 | 32 | | |
| |||
0 commit comments