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.js to transform alternatives array on messages
  • Add transformAlternatives method to convert backend format
  • Track selectedAlternatives state in state manager
  • Pass selectedAlternatives prop through view components
  • Handle select-alternative event 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.

references:

Test plan

  • Unit tests pass for transformAlternatives method
  • Unit tests pass for transformChatMessages with 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

Merge request reports

Loading
Loading