Skip to content

Separate loading states for data fetching and LLM communication

What does this MR do and why?

Introduces isWaitingOnPrompt loading state for LLM communication in the Duo Agentic Chat component.

This MR adds a dedicated loading state to track WebSocket/LLM operations (e.g., waiting for AI response), enabling the UI to display contextually appropriate indicators when the agent is "thinking" or processing.

Previously, the component relied on a single Vuex loading state for all operations, making it impossible to differentiate between different types of loading scenarios in the UI.

Changes:

  • Add isWaitingOnPrompt as a component-local data property
  • Remove dependency on Vuex loading state and setLoading action
  • Update loading state management for WebSocket/LLM operations:
    • onSendChatPrompt and onMessageReceived use isWaitingOnPrompt
    • Cleanup operations reset the state
  • Update template to pass isWaitingOnPrompt to WebAgenticDuoChat component
  • Update all tests to verify component local state instead of Vuex actions

This change simplifies the component architecture by removing unnecessary Vuex dependencies. The current thinking indicator continues working as before. A follow-up MR will introduce isLoading for data fetching operations and add a skeleton loading indicator.

The MR is split into two commits: the first adds the new logic, and the second cleans up the unused Vuex state.

query: author = "tbulva" AND type = MergeRequest AND myReaction = "dancing_pikachu"
fields: title, state
title: Loading state MRs 
display: table
sort: createdAt asc

References

Issue: #578698

Screenshots or screen recordings

no visual change

How to set up and validate locally

  1. Change this provides is that when clicking on chats in history is now NOT showing the thinking message

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.

Edited by Tomas Bulva

Merge request reports

Loading