Files
heicode-mananger/heicode/controller
chenchenandClaude Opus 4.8 6dbfc98552 fix(agent): refresh live status from AM in the agent LIST endpoint
GET /api/heicode/agents previously returned only the stored status, so a
freshly-deployed agent stayed "Pending"/"启动中" forever — the desktop client
polling the list never saw it go "running", and the web list only updated when
the user opened the detail panel (which polls /agents/{id}/status and was the
only path that refreshed from AM).

Now the list refreshes every non-terminal (non-"stopped") agent's live status
from AM before responding, concurrently under an 8s deadline. Per-user agents
are capped (≤8) so the fan-out is bounded and the list never hangs on a slow
AM. refreshAgentStatus now takes context.Context (callers pass the request ctx).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-08 15:47:10 +08:00
..