Add aiCatalogAgentUpdate mutation
What does this MR do and why?
This adds a aiCatalogAgentUpdate mutation to update an agent version.
In this iteration, we just update the single version that was created in the create mutation. In a future iteration we will add extra logic around creating releases.
How to set up and validate locally
Enable the global_ai_catalog flag:
Feature.enable(:global_ai_catalog)
Create a new agent if one doesn't already exist:
Visit http://gdk.test:3000/-/graphql-explorer and use the following mutation:
mutation {
aiCatalogAgentCreate(input: {
name: "name"
description: "A pirate doing a sum"
projectId: "gid://gitlab/Project/1000000"
public: true,
systemPrompt: "123123"
userPrompt: "asdasd"
}) {
errors
item {
id
}
}
}
Now, update the agent through the new migration added in this MR. Replace <GLOBAL_ID>, with the Global ID of an agent.
mutation {
aiCatalogAgentUpdate(input:
{
id: "<GLOBAL_ID>",
name: "New name",
description: "New description",
public: true,
userPrompt: "New user prompt",
systemPrompt: "New system prompt"
}
) {
errors
item {
name
description
public
versions {
nodes {
...on AiCatalogAgentVersion {
userPrompt
systemPrompt
}
}
}
}
}
}
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Related to #553290 (closed)
Edited by Luke Duncalfe