Skip to content

Commit ecdc688

Browse files
committed
[bugfix]: remove redundant clear_thread_memory
1 parent af5e0bc commit ecdc688

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

backend/app/core/orchestration/agent_coordinator.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ async def _handle_clear_memory_request(self, message_data: Dict[str, Any]):
7272
"""Handle requests to clear thread memory"""
7373
try:
7474
memory_thread_id = message_data.get("memory_thread_id")
75-
user_id = message_data.get("user_id")
7675
cleanup_reason = message_data.get("cleanup_reason", "manual")
7776

7877
if not memory_thread_id:
@@ -81,16 +80,6 @@ async def _handle_clear_memory_request(self, message_data: Dict[str, Any]):
8180

8281
logger.info(f"Clearing memory for thread {memory_thread_id}, reason: {cleanup_reason}")
8382

84-
# Get current state before clearing
85-
current_state_data = await self.devrel_agent.get_thread_state(memory_thread_id)
86-
87-
if current_state_data:
88-
current_state = AgentState(**current_state_data)
89-
90-
# Store to database before clearing
91-
await store_summary_to_database(current_state)
92-
logger.info(f"Stored final summary to database for user {user_id}")
93-
9483
# Clear from InMemorySaver
9584
success = await self.devrel_agent.clear_thread_memory(memory_thread_id, force_clear=True)
9685

0 commit comments

Comments
 (0)