恢复可用性

This commit is contained in:
UnCLAS-Prommer
2025-08-18 11:16:28 +08:00
parent 3481234d2b
commit 5e26414839
13 changed files with 181 additions and 61 deletions

View File

@@ -71,7 +71,8 @@ class ActionModifier:
limit=min(int(global_config.chat.max_context_size * 0.33), 10),
)
# TODO: 修复!
temp_msg_list_before_now_half = [msg.__dict__ for msg in message_list_before_now_half]
from src.common.data_models import temporarily_transform_class_to_dict
temp_msg_list_before_now_half = [temporarily_transform_class_to_dict(msg) for msg in message_list_before_now_half]
chat_content = build_readable_messages(
temp_msg_list_before_now_half,
replace_bot_name=True,

View File

@@ -281,7 +281,8 @@ class ActionPlanner:
limit=int(global_config.chat.max_context_size * 0.6),
)
# TODO: 修复!
temp_msg_list_before_now = [msg.__dict__ for msg in message_list_before_now]
from src.common.data_models import temporarily_transform_class_to_dict
temp_msg_list_before_now = [temporarily_transform_class_to_dict(msg) for msg in message_list_before_now]
chat_content_block, message_id_list = build_readable_messages_with_id(
messages=temp_msg_list_before_now,
timestamp_mode="normal_no_YMD",