mirror of
https://github.com/CopilotKit/CopilotKit.git
synced 2026-09-14 16:26:20 +08:00
8a651db6d9
useAgent() returns per-thread clones that are not in the agent registry. The inspector only subscribed to registry agents via onAgentsChanged, so it never received events from clones — resulting in an empty event panel. Add onAgentRunStarted subscriber event that fires before connectAgent() and runAgent(), passing the actual agent instance (which may be a clone). The inspector subscribes to that agent, matching the existing StateManager pattern (subscribeAgentToStateManager).