Fix GLQL visualization in Duo chat UI
Problem to solve
Given a GLQL query, Duo should be able to render the result in the chat UI. The problem to solve is that GitLab flavoured markdown (GFM) is broken in Duo UI chat.
The renderGFM
function can't render mermaid charts or GLQL in Duo UI (@gitlab/duo-ui
) because LLM messages are streamed and Duo UI calls renderGFM
before a message has finished streaming and with incomplete code, causing errors.
Example
Duo responds with a partial code block as it's streaming and GFM throws and error for the invalid GLQL.
display: table
fields: title, type,
Proposal
Update the behaviour so that GFM only renders markdown in Duo messages that has finished streaming.
Related
POC work item with discussions https://gitlab.com/gitlab-org/gitlab/-/work_items/570284+
Implementation plan
Work with the AI teams on a more thorough solution that solves GFM rendering in @gitlab/duo-ui
.