Skip to content

Trigger subscription message for user input

Jan Provaznik requested to merge jp-trigger-user-event into master

What does this MR do and why?

  • sends websocket message for user inputs (not only for AI responses)
  • exposes also role and timestamp fields for graphql subscription response

Send graphql subscription message also for user input questions.

Related to #413600 (closed) and https://gitlab.com/gitlab-org/gitlab/-/issues/412802

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After

How to set up and validate locally

  1. Open gitlab chat
  2. Enable ai_chat_emit_user_messages feature flag
  3. When a question is sent in chat's prompt, it also appears as a response (then later followed by real response). In developer console (under internet -> websocket) check that a message is broadcasted also for user's input (not only for AI responses)

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Jan Provaznik

Merge request reports