From a44eb2c8a591e99a55cf356cf0d1980c1494c5aa Mon Sep 17 00:00:00 2001 From: Shivam Mishra Date: Tue, 8 Jul 2025 20:26:53 +0530 Subject: [PATCH] feat: use feature flag --- config/features.yml | 3 +++ enterprise/app/models/copilot_message.rb | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/config/features.yml b/config/features.yml index 5171b1c01..276208433 100644 --- a/config/features.yml +++ b/config/features.yml @@ -176,3 +176,6 @@ - name: notion_integration display_name: Notion Integration enabled: false +- name: agents_next + display_name: Use AIAgents SDK + enabled: false diff --git a/enterprise/app/models/copilot_message.rb b/enterprise/app/models/copilot_message.rb index 69e0b3a24..8db074073 100644 --- a/enterprise/app/models/copilot_message.rb +++ b/enterprise/app/models/copilot_message.rb @@ -38,7 +38,7 @@ class CopilotMessage < ApplicationRecord end def enqueue_response_job(conversation_id, user_id) - if ENV['USE_AGENTS'] == 'true' + if account.feature_enabled?('agents_next') # Use the new AI Agents SDK implementation Captain::Copilot::AgentsResponseJob.perform_later( copilot_thread_id: copilot_thread.id,