Bring external triggers to agentic
What does this MR do?
resolves: https://gitlab.com/groups/gitlab-org/-/epics/18683
This MR adds Agentic mode support to external Duo Chat triggers, ensuring these triggers respect the user's current chat mode preference.
Problem
Currently, external trigger buttons (like "Root Cause Analysis", "Explain Vulnerability", "View Summary", and "Explain Code") always force users into Classic mode, even if they're actively working in Agentic mode. This creates a jarring experience where:
- Users lose their mode preference
- The chat interface switches unexpectedly
- Users must manually switch back to Agentic mode after each trigger
Solution
The changes in this MR make sure that it:
- Respects the user's current chat mode (Classic or Agentic)
- Accepts an optional agenticPrompt parameter - a natural language prompt to use in Agentic mode
All external triggers now support both modes.
- Code Explanation → "explain this code"
- Vulnerability Explanation → "explain this vulnerability and provide insights about potential solutions"
- Summarize Comments → "summarize the comments on this issue"
- Root Cause Analysis → "troubleshoot this broken pipeline"
Demos
| root cause analysis | 
|---|
| root_cause_analysis_demo | 
| explain this code | 
|---|
| explain_this_code_demo | 
| explain vuln | 
|---|
| explain_vuln_demo | 
| view summary | 
|---|
| view_summary_demo | 
Edited  by Jannik Lehmann