Loading
Add alternative response pager integration for retry feature
Summary
Integrate alternative response paging with duo-ui components to allow users to navigate between different LLM response variants from retry attempts.
- Update
workflow_utils.jsto transformalternativesarray on messages - Add
transformAlternativesmethod to convert backend format - Track
selectedAlternativesstate in state manager - Pass
selectedAlternativesprop through view components - Handle
select-alternativeevent to update displayed variant - Add unit tests for alternatives transformation (8 new tests)
The selected alternative becomes the canonical response used for follow-up conversation context with the LLM.
Related MRs
- duo-ui rendering: duo-ui!581 (merged)
- Backend ai-assist: gitlab-org/modelops/applied-ml/code-suggestions/ai-assist!5801 (closed)
- Backend GitLab: !238143 (closed)
references:
- issue: Browse previous attempts after retry (#593010 - closed)
- epic: Manual Retry for Duo Chat Responses (gitlab-org#21289 - closed)
Test plan
- Unit tests pass for
transformAlternativesmethod - Unit tests pass for
transformChatMessageswith alternatives - Integration testing with duo-ui component
- E2E testing with backend alternatives support
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Changelog: added
Edited by Tomas Bulva