Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 019501335d |
@@ -14,6 +14,16 @@ from typing import Any
|
||||
|
||||
DEFAULT_MAX_TOKENS = 8192
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Desktop mode
|
||||
# ---------------------------------------------------------------------------
|
||||
# Set by the Electron shell when it spawns `hive serve` so the runtime knows
|
||||
# it's hosted inside a desktop client rather than served standalone. Today
|
||||
# this only gates the frontend-build step in `hive serve` (the desktop ships
|
||||
# its own renderer), but it's also a useful hook for future single-user /
|
||||
# telemetry-off branching.
|
||||
DESKTOP_MODE: bool = bool(os.environ.get("HIVE_DESKTOP_MODE"))
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Hive home directory structure
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
@@ -92,7 +92,13 @@ def cmd_serve(args: argparse.Namespace) -> int:
|
||||
|
||||
from aiohttp import web
|
||||
|
||||
_build_frontend()
|
||||
from framework.config import DESKTOP_MODE
|
||||
|
||||
# Skip frontend build when running inside the desktop shell — Electron
|
||||
# ships its own renderer, and running `npm` from a packaged install
|
||||
# often fails (no toolchain on the user's machine).
|
||||
if not DESKTOP_MODE:
|
||||
_build_frontend()
|
||||
|
||||
from framework.observability import configure_logging
|
||||
from framework.server.app import create_app
|
||||
|
||||
Reference in New Issue
Block a user