mirror of
https://github.com/block/buzz.git
synced 2026-11-06 01:11:33 +00:00
chore(sidebar): trace observer bridge agent statuses
Co-authored-by: Taylor Ho <taylorkmho@gmail.com> Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
This commit is contained in:
parent
4a1892a651
commit
f79514bd93
@@ -151,6 +151,16 @@ function pillDiagEvent(event: RelayEvent) {
|
||||
};
|
||||
}
|
||||
|
||||
function pillDiagBridgeAgents(
|
||||
agents: readonly Pick<ManagedAgent, "pubkey" | "status">[],
|
||||
) {
|
||||
return agents.map((agent) => ({
|
||||
pubkey: normalizePubkey(agent.pubkey),
|
||||
status: agent.status,
|
||||
startsObserver: agent.status === "running" || agent.status === "deployed",
|
||||
}));
|
||||
}
|
||||
|
||||
function notifyListeners() {
|
||||
for (const listener of listeners) {
|
||||
listener();
|
||||
@@ -499,6 +509,12 @@ export function useManagedAgentObserverBridge(
|
||||
[agents],
|
||||
);
|
||||
|
||||
pillDiagLog("bridge render", {
|
||||
subscriptionId,
|
||||
hasActiveAgent,
|
||||
agents: pillDiagBridgeAgents(agents),
|
||||
});
|
||||
|
||||
const agentPubkeys = React.useMemo(
|
||||
() => agents.map((agent) => agent.pubkey),
|
||||
[agents],
|
||||
|
||||
Reference in New Issue
Block a user