删掉回放的五个转发、重复的空格快捷键与重复的等待循环。

回放调用点直接走 replay_ctl,场景工具的路径引导收敛到 _paths,panel_snapshot
复用 panel_check 的 _wait_for,report_from 收成模块私有的 _report_from。
This commit is contained in:
ykcheungab
2026-10-07 12:25:48 +08:00
parent 86996694b4
commit b1cd37148c
14 changed files with 72 additions and 68 deletions
+5 -7
View File
@@ -25,13 +25,11 @@ import json
import sys
from pathlib import Path
# Tests load this tool by file location, so add our own directory to the path.
if str(Path(__file__).resolve().parent) not in sys.path:
sys.path.insert(0, str(Path(__file__).resolve().parent))
def _bootstrap_paths() -> None:
here = Path(__file__).resolve()
repo = here.parents[2]
for path in (repo / "apps" / "studio" / "src", repo / "shared" / "src"):
if path.is_dir() and str(path) not in sys.path:
sys.path.insert(0, str(path))
from _paths import bootstrap_paths # noqa: E402
def _legacy_report(args) -> tuple[int, dict]:
@@ -308,7 +306,7 @@ def main(argv: list[str] | None = None) -> int:
parser.add_argument("--json", action="store_true", help="machine-readable output")
args = parser.parse_args(argv)
_bootstrap_paths()
bootstrap_paths()
if args.legacy_dir is not None:
if args.map is None:
print("--legacy-dir also needs --map", file=sys.stderr)