Add chat_disabled_reason to Duo chat panel data

What does this MR do and why?

Prerequisite for solving: #578218 (closed)

This MR adds chat_disabled_reason to the data passed from the backend to the Duo chat panel frontend component. This enables the frontend to display appropriate disabled states when GitLab Duo is turned off at the project or group level.

Context: When the "Use AI-native features in this project" setting is toggled off in Project Studio, the UI currently doesn't properly reflect the disabled state. This is the backend preparation that passes the necessary data to the frontend.

The chat_disabled_reason field returns:

  • Empty string when chat is enabled
  • "project" when chat is disabled at the project level
  • "group" when chat is disabled at the group level

This leverages the existing TanukiBot.chat_disabled_reason method which already handles the authorization logic.

Merge request reports

Loading