2.6 KiB
2.6 KiB
Implementation Plan: Markdown Support & Syntax Highlighting
Phase 1: Markdown Integration & Setup
- Task: Research and configure
imgui_markdownwithin the existingimgui-bundleenvironment.- Identify required font assets for Markdown (bold, italic, headers).
- Create a
MarkdownRendererwrapper class insrc/markdown_helper.pyto manage styling and callbacks (links, etc.).
- Task: Implement basic Markdown rendering in a test panel.
- Verify that bold, italic, and headers render correctly using the defined theme fonts.
- Task: Conductor - User Manual Verification 'Phase 1: Markdown Integration' (Protocol in workflow.md)
Phase 2: Syntax Highlighting Implementation
- Task: Implement syntax highlighting for PowerShell, Python, and JSON/TOML.
- Research
imgui-bundle's recommended approach for syntax highlighting (e.g., usingImGuiColorTextEditor specialized Markdown callbacks). - Define language-specific color palettes that match the "Professional" theme.
- Research
- Task: Implement the language resolution logic.
- Create a utility to extract language tags from code blocks and resolve file extensions.
- Implement cheap heuristic for common code patterns (e.g., matching
def,if $,{ ").
- Task: Conductor - User Manual Verification 'Phase 2: Syntax Highlighting' (Protocol in workflow.md)
Phase 3: GUI Integration (Read-Only Views)
- Task: Integrate Markdown rendering into the Discussion History.
- Replace
imgui.text_wrappedin_render_discussion_panelwith theMarkdownRenderer. - Ensure that code blocks within AI messages are correctly highlighted.
- Replace
- Task: Integrate syntax highlighting into the Comms Log.
- Update
_render_comms_history_panelto render JSON/TOML payloads with highlighting.
- Update
- Task: Integrate syntax highlighting into the Operations/Tooling panels.
- Ensure PowerShell scripts and tool results are rendered with highlighting.
- Task: Conductor - User Manual Verification 'Phase 3: GUI Integration' (Protocol in workflow.md)
Phase 4: Refinement & Final Polish
- Task: Refine performance for large logs.
- Implement incremental rendering or caching for rendered Markdown blocks to maintain high FPS. (Hybrid renderer with TextEditor caching implemented).
- Task: Implement clickable links.
- Handle link callbacks to open external URLs in the browser or local files in the configured text editor.
- Task: Conduct a final visual audit across all read-only views.
- Task: Conductor - User Manual Verification 'Phase 4: Final Polish' (Protocol in workflow.md)