refactor(chat): 简化日程状态提示逻辑

删除了在日程活动时间范围之外的冗余状态判断。现在,无论当前时间是否在活动时间段内,都会统一计算并展示活动的开始、结束、已进行和剩余时间,简化了代码逻辑并确保了信息展示的一致性。反正LLM自己会判断的,不需要咱操心那么多啦。
This commit is contained in:
minecraft1024a
2025-11-01 19:31:34 +08:00
committed by Windpicker-owo
parent 22c6475def
commit 612401cb2d
2 changed files with 5 additions and 8 deletions

View File

@@ -358,10 +358,10 @@ def _default_normal_response_parser(
api_response.tool_calls = []
for call in message_part.tool_calls:
try:
arguments = orjson.loads(repair_json(call.function.arguments))
arguments = orjson.loads(repair_json(call.function.arguments)) # type: ignore
if not isinstance(arguments, dict):
raise RespParseException(resp, "响应解析失败,工具调用参数无法解析为字典类型")
api_response.tool_calls.append(ToolCall(call.id, call.function.name, arguments))
api_response.tool_calls.append(ToolCall(call.id, call.function.name, arguments)) # type: ignore
except orjson.JSONDecodeError as e:
raise RespParseException(resp, "响应解析失败,无法解析工具调用参数") from e