Update Modules/Agent_Skills.py
Browse files- Modules/Agent_Skills.py +3 -11
Modules/Agent_Skills.py
CHANGED
|
@@ -87,16 +87,8 @@ def _get_skills_root() -> Path:
|
|
| 87 |
return Path(skills_root.strip()).resolve()
|
| 88 |
return Path(ROOT_DIR) / SKILLS_SUBDIR
|
| 89 |
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
"""Format byte size as human-readable string."""
|
| 93 |
-
units = ["B", "KB", "MB", "GB"]
|
| 94 |
-
size = float(num_bytes)
|
| 95 |
-
for unit in units:
|
| 96 |
-
if size < 1024.0:
|
| 97 |
-
return f"{size:.1f} {unit}"
|
| 98 |
-
size /= 1024.0
|
| 99 |
-
return f"{size:.1f} TB"
|
| 100 |
|
| 101 |
|
| 102 |
# ---------------------------------------------------------------------------
|
|
@@ -561,7 +553,7 @@ def _format_skill_info(info: dict) -> str:
|
|
| 561 |
|
| 562 |
def _format_resources_list(resources: dict) -> str:
|
| 563 |
"""Format resource listing as a visual filesystem tree with line connectors."""
|
| 564 |
-
from .
|
| 565 |
|
| 566 |
skill = resources["skill"]
|
| 567 |
lines = [
|
|
|
|
| 87 |
return Path(skills_root.strip()).resolve()
|
| 88 |
return Path(ROOT_DIR) / SKILLS_SUBDIR
|
| 89 |
|
| 90 |
+
# Import _fmt_size from shared utility instead of duplicating
|
| 91 |
+
from ._core import _fmt_size
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 92 |
|
| 93 |
|
| 94 |
# ---------------------------------------------------------------------------
|
|
|
|
| 553 |
|
| 554 |
def _format_resources_list(resources: dict) -> str:
|
| 555 |
"""Format resource listing as a visual filesystem tree with line connectors."""
|
| 556 |
+
from ._core import build_tree, render_tree
|
| 557 |
|
| 558 |
skill = resources["skill"]
|
| 559 |
lines = [
|