Originally created by: rifkybujana
Originally owned by: rifkybujana
Implement Markdown Compiler for User and Bot Chat Bubbles
Description:
We need to implement a Markdown compiler to handle basic formatting (bold, italics, code blocks, etc.) for the user and bot chat bubbles. The goal is to allow messages in the chat bubbles to support Markdown syntax and render the formatted text appropriately.
Tasks:
- Research and choose a lightweight Markdown parsing library compatible with C++.
- Ensure the library integrates well with ImGui and the existing project.
- The library should support basic Markdown features (bold, italics, code, links).
- Integrate the chosen Markdown compiler with the chat system.
- Ensure user and bot messages are passed through the Markdown compiler.
- Render the output with the correct formatting in the chat bubbles (e.g., bold text, italic text, code blocks).
- Update chat bubble rendering logic to handle Markdown-specific elements.
- Modify the existing ImGui-based chat bubble to display formatted text.
- Ensure correct spacing, text wrapping, and alignment of formatted content.
- Add unit tests to verify that Markdown is correctly rendered in various scenarios:
- Test bold, italic, and code block rendering.
- Ensure multiline messages with Markdown are handled correctly.
- Update documentation:
- Add instructions for using Markdown syntax in chat messages.
- Describe which Markdown features are supported and any limitations.
- Perform testing on all platforms (Linux, macOS, Windows) to ensure consistent Markdown rendering in chat bubbles.
Acceptance Criteria:
- User and bot messages can include Markdown, and the chat bubbles will render the text with proper formatting.
- The implementation should not affect performance or cause any visual glitches in the chat interface.
- The chat bubbles should support text wrapping and multiline Markdown content.
- The documentation is updated with Markdown usage instructions.
Additional Context:
- The project currently uses ImGui for chat rendering. The Markdown compiler should work seamlessly with ImGui text rendering without requiring major changes to the layout.
- Some Markdown elements (e.g., images, tables) might not be needed at this time and can be excluded.
Originally posted by: rifkybujana
reference:
imgui_markdown
problem:
Originally posted by: rifkybujana
focusing on 7 components for now: