refactor(memory): move file utility functions to shared module

This commit is contained in:
jinli.yl 2026-03-07 15:30:45 +08:00
parent 5e08aa48b8
commit d62c6a22a5
5 changed files with 9 additions and 3 deletions

View file

@ -6,7 +6,7 @@ from . import extension
from . import memory
from .reme import ReMe
__version__ = "0.3.0.6b1"
__version__ = "0.3.0.6b2"
__all__ = [
"config",

View file

@ -7,7 +7,7 @@ from typing import Optional
from agentscope.message import TextBlock
from agentscope.tool import ToolResponse
from .utils import DEFAULT_MAX_BYTES, read_file_safe, truncate_output
from ..utils import DEFAULT_MAX_BYTES, read_file_safe, truncate_output
class FileIO:

View file

@ -12,7 +12,7 @@ from pathlib import Path
from agentscope.message import TextBlock
from agentscope.tool import ToolResponse
from .utils import truncate_shell_output
from ..utils import truncate_shell_output
def _execute_subprocess_sync(

View file

@ -1,7 +1,13 @@
"""utils"""
from .as_msg_handler import AsMsgHandler
from .file_utils import truncate_output, truncate_shell_output, read_file_safe, DEFAULT_MAX_BYTES, DEFAULT_MAX_LINES
__all__ = [
"AsMsgHandler",
"truncate_output",
"truncate_shell_output",
"read_file_safe",
"DEFAULT_MAX_BYTES",
"DEFAULT_MAX_LINES",
]