Files
wurangyu 1e39b6da88 feat: sap-cli skill v2.1.0 — self-contained distributable package
- assets/: sap-cli source (v2.1.0, 26 commands, 16 object types)
- references/: tool constraints + error handling (self-contained)
- scripts/setup.py: one-click install/config/verify
- SKILL.md: full command reference + dual-platform install guide
- VERSION: 2.1.0

Built from D:/Codespace/sap-cli via scripts/pack_skill.py
2026-06-13 20:52:24 +08:00

51 lines
1.4 KiB
Python
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
"""格式化输出工具函数。"""
from __future__ import annotations
def print_separator(char: str = "=", width: int = 60) -> None:
"""打印分隔线。"""
print(char * width)
def print_header(title: str) -> None:
"""打印带标题的分隔头部。"""
print_separator()
print(f" {title}")
print_separator()
def print_source_preview(source: str, max_lines: int = 20) -> None:
"""打印源代码预览。"""
lines = source.splitlines()
print(f" ┌─── 源代码 (前 {max_lines} 行) ──────────────────────")
for i, line in enumerate(lines[:max_lines], 1):
print(f" │ {i:4d} | {line}")
if len(lines) > max_lines:
print(f" │ ... 省略剩余 {len(lines) - max_lines} 行 ...")
print(f" └────────────────────────────────────────────")
def print_success(msg: str) -> None:
"""打印成功信息。"""
print(f" ✓ {msg}")
def print_error(msg: str) -> None:
"""打印错误信息。"""
print(f" ✗ {msg}")
def print_info(msg: str) -> None:
"""打印信息提示。"""
print(f" {msg}")
def print_warning(msg: str) -> None:
"""打印警告信息。"""
print(f" ⚠ {msg}")
def print_step(msg: str) -> None:
"""打印步骤信息。"""
print(f" → {msg}")