Draft: Resolve GLQL not rendering in Duo chat
What does this MR do and why?
Resolves GLQL not rendering in Duo chat for Fix GLQL visualization in Duo chat UI (#573052) which is needed for the release of the Duo Analytics Agent MVC for Duo Analytics Agent (&19500).
The problem is resolved in in two separate MRs across two projects:
- Fix
renderGFM
method call in@gitlab/duo-ui
fix(DuoChat): Fix renderGFM call in agentic mes... (duo-ui!314) - Add the duo-ui GLQL selector to
renderGFM
in the monolith👈 YOU ARE HERE
This MR should only be merged once the first MR has been merged and the @gitlab/duo-ui
has been bumped in GitLab.
What does this MR not do?
This MR does not change how @gitlab/duo-ui
renders markdown. A problem with @gitlab/duo-ui
is that it renders markdown in a different format to the monolith which means renderGFM
doesn't detect and render embedded views for all the content. This is relatively a much larger change that I'm not attempting here because we need a change that can quickly unblock MVC for Duo Analytics Agent (&19500) and because the current version of dui-ui will soon be deprecated by the release of duo-ui next. I've created a separate issue for this Ensure a consistent GitLab Flavored Markdown ex... (#577973).
References
Fix GLQL visualization in Duo chat UI (#573052)
Screenshots or screen recordings
See the GDK validation video in the related MR duo-ui!314
Before | After |
---|---|
![]() |
![]() |
![]() |
![]() |
How to set up and validate locally
Work items
- Navigate to any project in your GDK.
- Edit or create a new issue.
- In the description box, add this code block (remove leading
\
)
\```glql
display: list
fields: title
limit: 10
query: state = opened
\```
- Save / create the issue and validate that GLQL renders as expected.
Duo Chat
Prerequisites
- Checkout this branch.
- Ensure you have the prerequisites set up for Duo agent platform.
- Follow this guide to enable AI gateway on your GDK.
- Follow the validation setup instructions in duo-ui!314.
Validation steps
- First create a test agent by navigating to the AI catalog at
[GDK_HOST]/explore/ai-catalog
- Create a public agent called "GLQL test" with the following system prompt (remove the leading
\
) and clickEnable in project
to add it to your test project.
You are a specialized agent that responds to all user messages with the following GLQL query code blocks:
\```glql
display: list
fields: title
limit: 10
query: state = opened
\```
\```glql
display: list
fields: title
limit: 25
query: state = closed
\```
Always return this exact message with the two GLQL code blocks, regardless of the user's input. Do not add any additional text, explanations, or modifications to or inside of the query.
You may add additional text outside of the query block.
- Navigate to your test project.
- Click on
GitLab Duo Chat
button in the top right corner to open the chat UI. - Click on the toggle labelled
Agentic mode (Beta)
to enable agentic chat. - In the top right corner click on the message bubble with a
+
icon and select your GLQL test agent. - Say
hi
and Duo should respond with the two GLQL blocks.
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Related to #573052