优化决策后时间戳更新逻辑,确保新消息判断的准确性
This commit is contained in:
@@ -257,6 +257,9 @@ class ActionPlanner:
|
||||
"is_parallel": is_parallel,
|
||||
}
|
||||
|
||||
# 只有在成功完成决策后才更新已读时间戳,确保新消息判断的准确性
|
||||
self.last_obs_time_mark = time.time()
|
||||
|
||||
return (
|
||||
{
|
||||
"action_result": action_result,
|
||||
@@ -301,7 +304,7 @@ class ActionPlanner:
|
||||
|
||||
actions_before_now_block = f"你刚刚选择并执行过的action是:\n{actions_before_now_block}"
|
||||
|
||||
self.last_obs_time_mark = time.time()
|
||||
# 注意:不在这里更新last_obs_time_mark,应该在plan成功后再更新,避免异常情况下错误更新时间戳
|
||||
|
||||
if mode == ChatMode.FOCUS:
|
||||
mentioned_bonus = ""
|
||||
|
||||
Reference in New Issue
Block a user