MCPcopy Create free account
hub / github.com/adny-code/fastgrind / ui_command

Function ui_command

tools/fastgrind.py:2872–2883  ·  view source on GitHub ↗
(engine: FastgrindQueryEngine, path: Path, open_browser: bool = True, fallback_port: int = 0)

Source from the content-addressed store, hash-verified

2870
2871
2872def ui_command(engine: FastgrindQueryEngine, path: Path, open_browser: bool = True, fallback_port: int = 0) -> None:
2873 reason = desktop_ui_unavailable_reason()
2874 if reason:
2875 print(f"Python UI unavailable ({reason}). Falling back to html mode.")
2876 html_command(engine, port=fallback_port, open_browser=open_browser)
2877 return
2878
2879 try:
2880 FastgrindDesktopUI(engine, path).run()
2881 except Exception as exc:
2882 print(f"Python UI unavailable ({exc}). Falling back to html mode.")
2883 html_command(engine, port=fallback_port, open_browser=open_browser)
2884
2885
2886def export_json_command(engine: FastgrindQueryEngine, input_path: Path, output: str | None) -> None:

Callers 1

mainFunction · 0.85

Calls 4

html_commandFunction · 0.85
FastgrindDesktopUIClass · 0.85
runMethod · 0.80

Tested by

no test coverage detected