refactor: update chat session management to use singleton pattern and enhance validation in chat agent

This commit is contained in:
grillazz
2026-07-14 11:41:15 +02:00
parent 16a2e4e325
commit 251aef0ec4
4 changed files with 121 additions and 14 deletions
+1 -1
View File
@@ -100,7 +100,7 @@ async def chat_websocket(websocket: WebSocket) -> None:
await websocket.accept()
agent: ChatAgent = websocket.app.chat_agent
session_manager: ChatSessionManager = websocket.app.chat_sessions
session_manager: ChatSessionManager = ChatSessionManager()
session = await session_manager.create()
await websocket.send_json(Connected(session_id=session.id).model_dump(mode="json"))