[eric] apps: auto hard-reload the app card when a turn installed deps (soft reload can't see new packages)

This commit is contained in:
ciregenz
2026-07-07 01:31:35 -07:00
parent 08d5bd3cc6
commit 953fddc99e
5 changed files with 81 additions and 1 deletions
@@ -103,6 +103,14 @@ async def post_tool_hook(ctx: HookContext, input_data: dict, tool_use_id, contex
outputs_runtime_manager.reset_render_state_for_workspace(session.id)
except Exception:
pass
if installed_pkg:
# Tell the app card this turn changed deps so its turn-finish reload restarts Vite; a soft webview reload can't pick up newly installed packages.
try:
await ws_manager.send_to_session(session.id, "agent:app_deps_changed", {
"session_id": session.id,
})
except Exception:
pass
elif wrote_files:
if file_path:
try: