🤖 自动格式化代码 [skip ci]

This commit is contained in:
github-actions[bot]
2025-07-10 17:32:15 +00:00
parent 44abb71959
commit 3768fb22ad
7 changed files with 30 additions and 27 deletions

View File

@@ -11,7 +11,12 @@ from json_repair import repair_json
from src.chat.utils.utils import get_chat_type_and_target_info
from datetime import datetime
from src.chat.message_receive.chat_stream import get_chat_manager
from src.chat.utils.chat_message_builder import build_readable_actions, build_readable_messages, get_actions_by_timestamp_with_chat, get_raw_msg_before_timestamp_with_chat
from src.chat.utils.chat_message_builder import (
build_readable_actions,
build_readable_messages,
get_actions_by_timestamp_with_chat,
get_raw_msg_before_timestamp_with_chat,
)
import time
logger = get_logger("planner")
@@ -226,13 +231,13 @@ class ActionPlanner:
truncate=True,
show_actions=True,
)
actions_before_now = get_actions_by_timestamp_with_chat(
actions_before_now = get_actions_by_timestamp_with_chat(
chat_id=self.chat_id,
timestamp_end=time.time(),
limit=5,
)
actions_before_now_block = build_readable_actions(
actions=actions_before_now,
)

View File

@@ -78,7 +78,11 @@ def get_raw_msg_by_timestamp_with_chat_users(
def get_actions_by_timestamp_with_chat(
chat_id: str, timestamp_start: float = 0, timestamp_end: float = time.time(), limit: int = 0, limit_mode: str = "latest"
chat_id: str,
timestamp_start: float = 0,
timestamp_end: float = time.time(),
limit: int = 0,
limit_mode: str = "latest",
) -> List[Dict[str, Any]]:
"""获取在特定聊天从指定时间戳到指定时间戳的动作记录,按时间升序排序,返回动作记录列表"""
query = ActionRecords.select().where(