From 71e6798147002d2e18acd103ee27a7202bf50504 Mon Sep 17 00:00:00 2001 From: Lee Tickett Date: Tue, 19 Aug 2025 23:29:38 +0100 Subject: [PATCH 1/3] Connect test agent button to backend GraphQL mutation --- .../components/ai_catalog_agent_run_form.vue | 3 +- .../execute_ai_catalog_agent.mutation.graphql | 6 ++++ .../catalog/pages/ai_catalog_agents_run.vue | 36 ++++++++++++++++--- locale/gitlab.pot | 8 ++++- 4 files changed, 46 insertions(+), 7 deletions(-) create mode 100644 ee/app/assets/javascripts/ai/catalog/graphql/mutations/execute_ai_catalog_agent.mutation.graphql diff --git a/ee/app/assets/javascripts/ai/catalog/components/ai_catalog_agent_run_form.vue b/ee/app/assets/javascripts/ai/catalog/components/ai_catalog_agent_run_form.vue index a5ec6418d597cf..15597c1fb0900a 100644 --- a/ee/app/assets/javascripts/ai/catalog/components/ai_catalog_agent_run_form.vue +++ b/ee/app/assets/javascripts/ai/catalog/components/ai_catalog_agent_run_form.vue @@ -94,8 +94,7 @@ export default { icon="play" :loading="isSubmitting" > - - {{ s__('AICatalog|Run') }} (Coming soon) + {{ s__('AICatalog|Run') }} diff --git a/ee/app/assets/javascripts/ai/catalog/graphql/mutations/execute_ai_catalog_agent.mutation.graphql b/ee/app/assets/javascripts/ai/catalog/graphql/mutations/execute_ai_catalog_agent.mutation.graphql new file mode 100644 index 00000000000000..07824ac4b96742 --- /dev/null +++ b/ee/app/assets/javascripts/ai/catalog/graphql/mutations/execute_ai_catalog_agent.mutation.graphql @@ -0,0 +1,6 @@ +mutation createAiCatalogAgent($input: AiCatalogAgentExecuteInput!) { + aiCatalogAgentExecute(input: $input) { + errors + flowConfig + } +} diff --git a/ee/app/assets/javascripts/ai/catalog/pages/ai_catalog_agents_run.vue b/ee/app/assets/javascripts/ai/catalog/pages/ai_catalog_agents_run.vue index bf83a576e48e0b..6312b9ee822083 100644 --- a/ee/app/assets/javascripts/ai/catalog/pages/ai_catalog_agents_run.vue +++ b/ee/app/assets/javascripts/ai/catalog/pages/ai_catalog_agents_run.vue @@ -1,13 +1,19 @@