diff --git a/doc/api/openapi/openapi_v2.yaml b/doc/api/openapi/openapi_v2.yaml index dbb22dcf97b3f0f019c7623978aeadbdccffdcc4..bf2692e5987412b18112410f8a44f0eef0ee2c5d 100644 --- a/doc/api/openapi/openapi_v2.yaml +++ b/doc/api/openapi/openapi_v2.yaml @@ -48633,10 +48633,9 @@ definitions: description: Only allow to merge if all threads are resolved enabled_foundational_flows: type: array - description: IDs of enabled foundational flows + description: References of enabled foundational flows items: - type: integer - format: int32 + type: string description: Update a group. Available only for users who can administrate groups. API_Entities_GroupDetail: type: object diff --git a/ee/app/assets/javascripts/ai/settings/components/ai_common_settings_form.vue b/ee/app/assets/javascripts/ai/settings/components/ai_common_settings_form.vue index f28ae7b1edebd98576a7092e82cdf523e650be93..9a024f2793760becefc01c8d3d69dbafb4a4b108 100644 --- a/ee/app/assets/javascripts/ai/settings/components/ai_common_settings_form.vue +++ b/ee/app/assets/javascripts/ai/settings/components/ai_common_settings_form.vue @@ -172,8 +172,8 @@ export default { return this.availability === AVAILABILITY_OPTIONS.NEVER_ON; }, hasSelectedFlowIdsChanged() { - const current = (this.localSelectedFlowIds || []).slice().sort((a, b) => a - b); - const initial = (this.selectedFoundationalFlowIds || []).slice().sort((a, b) => a - b); + const current = (this.localSelectedFlowIds || []).slice().sort(); + const initial = (this.selectedFoundationalFlowIds || []).slice().sort(); return JSON.stringify(current) !== JSON.stringify(initial); }, diff --git a/ee/app/assets/javascripts/ai/settings/components/foundational_flow_selector.vue b/ee/app/assets/javascripts/ai/settings/components/foundational_flow_selector.vue index 81457ebd9793eb06562b87970191583905ec3bc8..2c840e20fa98914848e08bdb1e3f4fe0016effb2 100644 --- a/ee/app/assets/javascripts/ai/settings/components/foundational_flow_selector.vue +++ b/ee/app/assets/javascripts/ai/settings/components/foundational_flow_selector.vue @@ -20,13 +20,13 @@ export default { }, emits: ['input'], methods: { - isFlowSelected(catalogItemId) { - return this.value.includes(catalogItemId); + isFlowSelected(reference) { + return this.value.includes(reference); }, - toggleFlow(catalogItemId, checked) { + toggleFlow(reference, checked) { const newSelection = checked - ? [...this.value, catalogItemId] - : this.value.filter((id) => id !== catalogItemId); + ? [...this.value, reference] + : this.value.filter((ref) => ref !== reference); this.$emit('input', newSelection); }, @@ -38,11 +38,11 @@ export default {