fix: hide Duo Chat features when disabled for a project
Original MR content below:
Description
Ensures that all Duo slash-command features are hidden when Duo is disabled for a given project.
Related Issues
issue: #1360 (closed)
How has this been tested?
- Create a personal project (e.g.
https://gitlab.com/tristan.read/mock-token-server
) - Check out the project locally.
- Open graphql explorer: https://gitlab.com/-/graphql-explorer
- Disable AI features with the a mutation, e.g:
mutation toggle_duo {
projectSettingsUpdate(input:{
fullPath: "tristan.read/mock-token-server",
duoFeaturesEnabled: true
})
{
errors
projectSettings {
duoFeaturesEnabled
}
}
}
- Run the test extension host using the changes in this branch.
- Open the repo you created above in the test extension host.
- Select some code and look for the Duo actions in the dropdown, such as "Explain selected code" .
Expected Behavior: The action should not be present.
Optional extra: Test with a non-project workspace (aka not a git repository) and confirm AI actions appear there.
Screenshots (if appropriate)
before | after |
---|---|
What CHANGELOG entry will this MR create?
-
fix:
Bug fix fixes - a user-facing issue in production - included in changelog -
feature:
New feature - a user-facing change which adds functionality - included in changelog -
BREAKING CHANGE:
(fix or feature that would cause existing functionality to change) - should bump major version, mentioned in the changelog -
None - other non-user-facing changes