Ruff Format

This commit is contained in:
DrSmoothl
2026-03-13 11:45:26 +08:00
parent 2a510312bc
commit a576313b22
70 changed files with 956 additions and 731 deletions

View File

@@ -1,5 +1,5 @@
from rich.traceback import install
from typing import Optional, List, TYPE_CHECKING, Tuple, Dict
from typing import Optional, List, TYPE_CHECKING
import asyncio
import time
@@ -14,7 +14,7 @@ from src.chat.message_receive.chat_manager import chat_manager
from src.bw_learner.expression_learner import ExpressionLearner
from src.bw_learner.jargon_miner import JargonMiner
from .heartFC_utils import CycleDetail, CycleActionInfo, CyclePlanInfo
from .heartFC_utils import CycleDetail
if TYPE_CHECKING:
from src.chat.message_receive.message import SessionMessage

View File

@@ -1,4 +1,4 @@
from typing import Optional, Dict
from typing import Dict
import traceback
@@ -9,6 +9,7 @@ from src.chat.heart_flow.heartFC_chat import HeartFChatting
logger = get_logger("heartflow")
# TODO: 恢复PFC现在暂时禁用
class HeartflowManager:
"""主心流协调器,负责初始化并协调聊天,控制聊天属性"""
@@ -17,7 +18,7 @@ class HeartflowManager:
# self.heartflow_chat_list: Dict[str, HeartFChatting | BrainChatting] = {}
self.heartflow_chat_list: Dict[str, HeartFChatting] = {}
async def get_or_create_heartflow_chat(self, session_id: str): # -> Optional[HeartFChatting | BrainChatting]:
async def get_or_create_heartflow_chat(self, session_id: str): # -> Optional[HeartFChatting | BrainChatting]:
"""获取或创建一个新的HeartFChatting实例"""
try:
if chat := self.heartflow_chat_list.get(session_id):