From 2b2e4bd8e402a4f27ebd1e8a2c6e119e16787c19 Mon Sep 17 00:00:00 2001 From: Shivam Mishra Date: Tue, 8 Jul 2025 20:23:07 +0530 Subject: [PATCH] chore: add todo --- .../app/services/captain/copilot/agents_chat_service.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/enterprise/app/services/captain/copilot/agents_chat_service.rb b/enterprise/app/services/captain/copilot/agents_chat_service.rb index 8a5f5bf22..17dbc3823 100644 --- a/enterprise/app/services/captain/copilot/agents_chat_service.rb +++ b/enterprise/app/services/captain/copilot/agents_chat_service.rb @@ -161,6 +161,9 @@ module Captain end def load_persisted_state(context) + # TODO: Replace Redis with copilot_thread model for production + # Add a 'agent_state' jsonb column to copilot_threads table + # This will provide better persistence, querying, and data integrity redis_key = "copilot_state:#{@copilot_thread.id}" begin @@ -177,6 +180,9 @@ module Captain end def persist_state(context) + # TODO: Replace Redis with copilot_thread model for production + # Store agent state in copilot_thread.agent_state jsonb column + # This will provide better persistence, querying, and data integrity redis_key = "copilot_state:#{@copilot_thread.id}" begin