mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-06-14 09:11:54 +00:00
fix(tui): scope TUI launch install and fix stale hints/test
- Add --workspace ui-tui to the TUI launch npm install, the one call site missed by the prior commit. Without scoping it ran from PROJECT_ROOT and still resolved apps/desktop via the apps/* glob. - Update the two manual-recovery hints in _build_web_ui (npm install failure and build failure paths) to use the scoped form `npm install --workspace web && npm run build -w web` so users following the hint don't accidentally trigger a desktop rebuild. - Update the stale test assertion in test_cmd_update.py to expect --workspace web in the _build_web_ui npm ci call, which was previously unreachable through the if-guard and left the workspace- scoping change from the prior commit unverified.
This commit is contained in:
parent
1c0437dfc5
commit
0416f852f2
2 changed files with 6 additions and 4 deletions
|
|
@ -1570,7 +1570,9 @@ def _make_tui_argv(tui_dir: Path, tui_dev: bool) -> tuple[list[str], Path]:
|
|||
if not os.environ.get("HERMES_QUIET"):
|
||||
print("Installing TUI dependencies…")
|
||||
npm_cwd = _workspace_root(tui_dir)
|
||||
npm_workspace_args: tuple[str, ...] = ()
|
||||
# --workspace ui-tui avoids resolving apps/desktop (Electron + node-pty).
|
||||
# See #38772.
|
||||
npm_workspace_args: tuple[str, ...] = ("--workspace", "ui-tui")
|
||||
if termux_startup:
|
||||
npm_cwd, npm_workspace_args = _termux_workspace_install_context(
|
||||
tui_dir,
|
||||
|
|
@ -7109,7 +7111,7 @@ def _build_web_ui(web_dir: Path, *, fatal: bool = False) -> bool:
|
|||
)
|
||||
_relay(r1)
|
||||
if fatal:
|
||||
_say(" Run manually: cd web && npm install && npm run build")
|
||||
_say(" Run manually: npm install --workspace web && npm run build -w web")
|
||||
return False
|
||||
# First attempt — stream output via idle-timeout helper (issue #33788).
|
||||
# capture_output=True on a long Vite build looks identical to a hang;
|
||||
|
|
@ -7151,7 +7153,7 @@ def _build_web_ui(web_dir: Path, *, fatal: bool = False) -> bool:
|
|||
)
|
||||
_relay(r2)
|
||||
if fatal:
|
||||
_say(" Run manually: cd web && npm install && npm run build")
|
||||
_say(" Run manually: npm install --workspace web && npm run build -w web")
|
||||
return False
|
||||
_say(" ✓ Web UI built")
|
||||
return True
|
||||
|
|
|
|||
|
|
@ -272,7 +272,7 @@ class TestCmdUpdateBranchFallback:
|
|||
# The web/ install runs from the workspace root when the root
|
||||
# lockfile exists (npm workspaces hoist node_modules upward).
|
||||
assert npm_calls[2:] == [
|
||||
(["/usr/bin/npm", "ci", "--silent"], PROJECT_ROOT),
|
||||
(["/usr/bin/npm", "ci", "--silent", "--workspace", "web"], PROJECT_ROOT),
|
||||
]
|
||||
|
||||
# The web UI build itself went through the streaming helper.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue