Remove activeThread concept from duo agentic chat component
What does this MR do and why?
This code change simplifies how the AI chat system manages conversation workflows by removing the concept of "active threads" and consolidating it with "workflow IDs".
Previously, the system tracked both a workflow ID (numeric) and an active thread ID (GraphQL format) separately, which created unnecessary complexity and potential inconsistencies. Now it only uses the workflow ID in GraphQL format throughout the entire system.
The main improvements include:
- Removing duplicate thread tracking logic and utility functions
- Simplifying data storage to only save the workflow ID instead of both workflow and thread IDs
- Converting workflow IDs to the proper GraphQL format when needed, rather than maintaining separate formats
- Streamlining the workflow creation process by removing thread-specific parameters
- Updating all references to use the single workflow ID consistently
This refactoring makes the codebase cleaner and reduces the chance of bugs caused by managing two similar but different identifiers for the same conversation. The functionality remains the same for users - they can still have multiple chat conversations and switch between them - but the underlying code is now simpler and more maintainable.
References
I'm simplifying the state of the Duo Agentic Chat component to make implementing a fix for Investigate `$workflowId error` showing up in t... (#571445 - closed) a bit easier.
Screenshots or screen recordings
This change doesn't introduce visual changes.
How to set up and validate locally
This change is a refactoring and it doesn't change the behavior of agentic chat.
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.