chore: archive tools/ui_inspector snapshot before migration removal.
Keep the last in-template copy on main so history can restore it; product continues in jiangchang-ui-recorder. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
20
tools/ui_inspector/storage/capture_reader.py
Normal file
20
tools/ui_inspector/storage/capture_reader.py
Normal file
@@ -0,0 +1,20 @@
|
||||
"""Stable capture reader used by diagnostics and downstream AI tooling."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import json
|
||||
from pathlib import Path
|
||||
from typing import Any
|
||||
|
||||
|
||||
def read_json(path: Path) -> dict[str, Any]:
|
||||
return json.loads(Path(path).read_text(encoding="utf-8"))
|
||||
|
||||
|
||||
def read_action_flow(flow_dir: Path) -> dict[str, Any]:
|
||||
return read_json(Path(flow_dir) / "action_flow.json")
|
||||
|
||||
|
||||
def read_element_catalog(flow_dir: Path) -> dict[str, Any]:
|
||||
return read_json(Path(flow_dir) / "element_catalog.json")
|
||||
|
||||
Reference in New Issue
Block a user