MCPcopy Index your code
hub / github.com/AstrBotDevs/AstrBot / workspace_root

Function workspace_root

astrbot/core/tools/computer_tools/util.py:14–17  ·  view source on GitHub ↗

Root directory for relative paths in local runtime

(umo: str)

Source from the content-addressed store, hash-verified

12
13
14def workspace_root(umo: str) -> Path:
15 """Root directory for relative paths in local runtime"""
16 normalized_umo = normalize_umo_for_workspace(umo)
17 return (Path(get_astrbot_workspaces_path()) / normalized_umo).resolve(strict=False)
18
19
20def is_local_runtime(context: ContextWrapper[AstrAgentContext]) -> bool:

Callers 4

_file_send_allowed_rootsFunction · 0.90
callMethod · 0.85
callMethod · 0.85

Calls 2

Tested by

no test coverage detected