[go: up one dir, main page]

Skip to content

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:

  1. Fix renderGFM method call in @gitlab/duo-ui fix(DuoChat): Fix renderGFM call in agentic mes... (duo-ui!314)
  2. 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
image image
image image

How to set up and validate locally

Work items

  1. Navigate to any project in your GDK.
  2. Edit or create a new issue.
  3. In the description box, add this code block (remove leading \)
\```glql
display: list
fields: title
limit: 10
query: state = opened
\```
  1. Save / create the issue and validate that GLQL renders as expected.

Duo Chat

Prerequisites

  1. Checkout this branch.
  2. Ensure you have the prerequisites set up for Duo agent platform.
  3. Follow this guide to enable AI gateway on your GDK.
  4. Follow the validation setup instructions in duo-ui!314.

Validation steps

  1. First create a test agent by navigating to the AI catalog at [GDK_HOST]/explore/ai-catalog
  2. Create a public agent called "GLQL test" with the following system prompt (remove the leading \) and click Enable 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.
  1. Navigate to your test project.
  2. Click on GitLab Duo Chat button in the top right corner to open the chat UI.
  3. Click on the toggle labelled Agentic mode (Beta) to enable agentic chat.
  4. In the top right corner click on the message bubble with a + icon and select your GLQL test agent.
  5. 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

Edited by Jiaan Louw

Merge request reports

Loading