Add retry button to Duo Chat responses

What does this MR do and why?

  • Adds agentic_manual_retry_for_duo_chat_responses (gitlab_com_derisk, default off).
  • Wires @retry-message from duo-ui through DuoAgenticChatView to DuoAgenticChatStateManager, which resubmits the preceding user prompt.
  • Pushes the flag via gon_helper so it's available wherever Duo Agentic Chat mounts.

This MR is the frontend wire-up only — it resubmits the preceding user prompt as a fresh chat message. The duo-workflow-service has no idea the new submission is a retry, so behavior (history, credit consumption, checkpoint handling) is identical to a normal user submission.

Follow-up work (server-aware retry)

Server-aware retry is tracked in a separate MR to keep this one small:

  • !238116 — plumbs an isRetry boolean from the Vue retry handler through onSendChatPrompt / startWorkflow into the WebSocket startRequest payload sent to the duo-workflow-service.
  • ai-assist!5570 — the duo-workflow-service side that consumes startRequest.isRetry to swap the previous agent attempt rather than appending a new turn, per the retry semantics in epic &21289.

The feature flag agentic_manual_retry_for_duo_chat_responses remains off until all three (this MR, !238116, ai-assist!5570) are merged.

References

Screenshots or screen recordings

Before After
Screenshot_2026-05-28_at_16.20.03 Screenshot_2026-05-28_at_16.15.47
Screenshot_2026-05-28_at_16.16.52

How to set up and validate locally

  1. In rails console enable the feature flag
    Feature.enable(:agentic_manual_retry_for_duo_chat_responses)
  2. Write message to the chat, wait for response see the retry button

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 #587828

Edited by Tomas Bulva

Merge request reports

Loading