use queue to allow send vscode_ws when it is none

This commit is contained in:
Cai
2025-11-03 13:51:15 +08:00
parent 6c38e9067d
commit ce88ae645e
8 changed files with 220 additions and 413 deletions

View File

@@ -14,6 +14,9 @@ from ..services.user_service import get_or_load_current_user
class VSCodeNamespace(Namespace):
def on_login(self,data):
ex = current_app.extensions
print("VSCode client connected")
@@ -25,8 +28,7 @@ class VSCodeNamespace(Namespace):
print(f"User {user_uuid} connected with path: {path}")
join_room(user_uuid, namespace='/vscode')
chatmanager = ex['user_uuid2chatmanager'][user_uuid]
chatmanager.vscode_ws=self
chatmanager.set_vscode_ws(self)
def on_load_chapter(self, data):