Add Duo Agent User Environment context support
What does this MR do and why?
References
This MR adds another "Duo Context" category. Currently you can include open tabs, dependencies, git information, issues, MRs as reference to your Duo (Agentic) Chat.
This MR adds agent_user_environment category. This context will contain any user-environment related info: OS, shell, etc., so that chat can provide more targeted scripts, commands.
Check this MR to see how agent_user_environment context (User Shell) is included in the Agentic Chat request
How to set up and validate locally
-
enable the feature flag
echo "Feature.enable(:duo_include_context_agent_user_environment)" | rails c -
run the following GraphQL query in the explorer http://gdk.test:3000/-/graphql-explorer
query getDuoAvailableFeatures { currentUser { duoChatAvailableFeatures } } -
and see the response, important is that
include_agent_user_environment_contextis present
{
"data": {
"currentUser": {
"duoChatAvailableFeatures": [
"include_file_context",
"include_snippet_context",
"include_user_rule_context",
"include_repository_context",
"include_agent_user_environment_context"
]
}
},
}
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyse changes to reduce risks in quality, performance, reliability, security, and maintainability.