chore: migrate config paths to XDG base directory and add hit_count tracking to api_cache
This commit is contained in:
@@ -68,6 +68,12 @@ class AgentCommunicationBus:
|
||||
)
|
||||
"""
|
||||
)
|
||||
|
||||
cursor.execute("PRAGMA table_info(agent_messages)")
|
||||
columns = [row[1] for row in cursor.fetchall()]
|
||||
if "read" not in columns:
|
||||
cursor.execute("ALTER TABLE agent_messages ADD COLUMN read INTEGER DEFAULT 0")
|
||||
|
||||
self.conn.commit()
|
||||
|
||||
def send_message(self, message: AgentMessage, session_id: Optional[str] = None):
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import json
|
||||
import time
|
||||
import uuid
|
||||
from dataclasses import dataclass, field
|
||||
@@ -169,7 +168,7 @@ Break down the task and delegate subtasks to appropriate agents. Coordinate thei
|
||||
|
||||
return results
|
||||
|
||||
def get_session_summary(self) -> str:
|
||||
def get_session_summary(self) -> Dict[str, Any]:
|
||||
summary = {
|
||||
"session_id": self.session_id,
|
||||
"active_agents": len(self.active_agents),
|
||||
@@ -183,7 +182,7 @@ Break down the task and delegate subtasks to appropriate agents. Coordinate thei
|
||||
for agent_id, agent in self.active_agents.items()
|
||||
],
|
||||
}
|
||||
return json.dumps(summary)
|
||||
return summary
|
||||
|
||||
def clear_session(self):
|
||||
self.active_agents.clear()
|
||||
|
||||
Reference in New Issue
Block a user