mirror of
https://github.com/HKUDS/nanobot.git
synced 2026-06-26 04:34:13 +00:00
refactor(loop): drop redundant Any typing in /new snapshot
This commit is contained in:
parent
c1b5e8c8d2
commit
df022febaf
@ -6,7 +6,7 @@ import json
|
|||||||
import json_repair
|
import json_repair
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
import re
|
import re
|
||||||
from typing import Any, Awaitable, Callable
|
from typing import Awaitable, Callable
|
||||||
|
|
||||||
from loguru import logger
|
from loguru import logger
|
||||||
|
|
||||||
@ -343,7 +343,7 @@ class AgentLoop:
|
|||||||
cmd = msg.content.strip().lower()
|
cmd = msg.content.strip().lower()
|
||||||
if cmd == "/new":
|
if cmd == "/new":
|
||||||
lock = self._get_consolidation_lock(session.key)
|
lock = self._get_consolidation_lock(session.key)
|
||||||
messages_to_archive: list[dict[str, Any]] = []
|
messages_to_archive = []
|
||||||
try:
|
try:
|
||||||
async with lock:
|
async with lock:
|
||||||
messages_to_archive = session.messages[session.last_consolidated :].copy()
|
messages_to_archive = session.messages[session.last_consolidated :].copy()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user