INNER CODE UNIT · Python

_complete_build

CronusL-1141/AI-company · src/aiteam/api/app.py:36

def _complete_build(candidate: Path) -> bool:
    """index.html plus at least one JS bundle: a half-written build serves a blank page."""
    assets = candidate / "assets"
    return (candidate / "index.html").is_file() and assets.is_dir() and any(assets.glob("*.js"))


def pick_dashboard_dist(project_root: Path, plugin_root: str = "", cache_base: Path | None = None) -> Path | None:
    """The Dashboard build to serve, or None.

    1. ``$CLAUDE_PLUGIN_ROOT/dashboard-dist``: a marketplace install serves its own build.
    2. A source checkout has two builds: ``dashboard/dist`` (a local build, never
       tracked) and ``plugin/dashboard-dist`` (tracked, updated by every pull).
       Of the complete ones the newer ``index.html`` wins. Fixed order let a local
       build from days ago shadow the tracked one after an update, so the API
       kept serving the old interface (task e873e445).
    3. The marketplace cache.
    """
    if plugin_root:

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…