Skip to content

Add agentVersionId to aiCompletionResponse trigger/subscription

From #436471 (comment 1771230592) and Custom Ai Agent Graphql endpoints (!143234 - merged)

Two findings from my work on connecting the GraphQl endpoints with the GlDuoChat component on the agents show page:

  1. All answers have Thought: \nHuman: prepended, "normal" Duo chat messages don't. For now I'll strip this off.
  2. For Duo chat we're subscribing to aiCompletionResponse which will be triggered in ee/app/graphql/ee/graphql_triggers.rb:18. Right now it doesn't support an agentVersionId parameter, so Duo chat and the agent chat receive the same updates. So we should include an agentVersionId parameter there and let the agent chat subscribe to the specific updates and Duo chat subscribe to all updates that don't have a agentVersionId.

Related to Adds Ai agents debug chat interface (!141698 - merged)

Edited by Marc Saleiko