feat: use feature flag

This commit is contained in:
Shivam Mishra
2025-07-08 20:26:53 +05:30
parent 2b2e4bd8e4
commit a44eb2c8a5
2 changed files with 4 additions and 1 deletions
+3
View File
@@ -176,3 +176,6 @@
- name: notion_integration
display_name: Notion Integration
enabled: false
- name: agents_next
display_name: Use AIAgents SDK
enabled: false
+1 -1
View File
@@ -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,