swipe、右键菜单

This commit is contained in:
2026-05-05 21:51:34 +08:00
parent 44df56c8d2
commit f843a74715
19 changed files with 1319 additions and 57 deletions

View File

@@ -49,7 +49,9 @@ async def websocket_chat_endpoint(
try:
while True:
# 1. 接收前端消息
print(f"[WebSocket] ⏳ 等待接收消息...")
data = await websocket.receive_text()
print(f"[WebSocket] ✅ 收到消息,长度: {len(data)}")
request_data = json.loads(data)
# ✅ 检查是否是取消任务的请求

View File

@@ -199,7 +199,6 @@ class ChatService:
tags = []
try:
from backend.core.config import settings
character_file = settings.CHARACTERS_PATH / role_name / "character.json"
if character_file.exists():
with open(character_file, 'r', encoding='utf-8') as f: