refactor: use unified get_media_dir() to get media path
This commit is contained in:
@@ -10,6 +10,7 @@ from typing import Any
|
||||
from loguru import logger
|
||||
|
||||
from nanobot.agent.tools.base import Tool
|
||||
from nanobot.config.paths import get_media_dir
|
||||
|
||||
|
||||
class ExecTool(Tool):
|
||||
@@ -184,9 +185,7 @@ class ExecTool(Tool):
|
||||
except Exception:
|
||||
continue
|
||||
|
||||
from nanobot.config.paths import get_runtime_subdir
|
||||
media_path = get_runtime_subdir("media").resolve()
|
||||
|
||||
media_path = get_media_dir().resolve()
|
||||
if (p.is_absolute()
|
||||
and cwd_path not in p.parents
|
||||
and p != cwd_path
|
||||
|
||||
Reference in New Issue
Block a user