ready
This commit is contained in:
11
Html/app.py
11
Html/app.py
@@ -14,8 +14,8 @@ sys.path.insert(0, current_dir)
|
|||||||
from AlgoriAgent.projects.algoriAgent.agent_manager import AgentManager
|
from AlgoriAgent.projects.algoriAgent.agent_manager import AgentManager
|
||||||
|
|
||||||
app = Flask(__name__)
|
app = Flask(__name__)
|
||||||
socketio = SocketIO(app, cors_allowed_origins="*",ping_timeout=60, ping_interval=5)
|
# socketio = SocketIO(app, cors_allowed_origins="*",ping_timeout=60, ping_interval=5)
|
||||||
# socketio = SocketIO(app, cors_allowed_origins="http://localhost:9888") # 设置跨域支持
|
socketio = SocketIO(app, cors_allowed_origins="http://localhost:9888") # 设置跨域支持
|
||||||
import logging
|
import logging
|
||||||
app.secret_key = 'cakebaker'
|
app.secret_key = 'cakebaker'
|
||||||
app.logger.setLevel(logging.DEBUG)
|
app.logger.setLevel(logging.DEBUG)
|
||||||
@@ -35,10 +35,11 @@ uuid2user_id = {}
|
|||||||
user_id2uuid = {}
|
user_id2uuid = {}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# 定义命名空间:用于和 VSCode 插件交流
|
# 定义命名空间:用于和 VSCode 插件交流
|
||||||
class VSCodeNamespace(Namespace):
|
class VSCodeNamespace(Namespace):
|
||||||
def on_connect(self):
|
def on_login(self,data):
|
||||||
print("VSCode client connected")
|
print(f"New login from VSCode client: {data}")
|
||||||
|
|
||||||
def on_message(self, data):
|
def on_message(self, data):
|
||||||
print(f"Received from VSCode client: {data}")
|
print(f"Received from VSCode client: {data}")
|
||||||
@@ -239,5 +240,5 @@ socketio.on_namespace(AgentNamespace('/agent'))
|
|||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
socketio.run(app, host='localhost', port=5500, debug=True)
|
socketio.run(app, host='0.0.0.0', port=5500, debug=True)
|
||||||
|
|
||||||
|
|||||||
@@ -3,4 +3,4 @@ array = list(map(int, input().split()))
|
|||||||
q = int(input())
|
q = int(input())
|
||||||
while q!=0:
|
while q!=0:
|
||||||
q-=1
|
q-=1
|
||||||
1
|
|
||||||
Reference in New Issue
Block a user