MCPcopy Create free account
hub / github.com/Roy3838/Observer / onLog

Function onLog

app/src/utils/tutorialFlow.ts:51–62  ·  view source on GitHub ↗
(entry: LogEntry)

Source from the content-addressed store, hash-verified

49
50// Listeners run after the tool has already finished; errors here must never reach it.
51const onLog = (entry: LogEntry) => {
52 try {
53 const { phase, agentId } = snapshot;
54 if (phase !== 'monitoring' || entry.source !== agentId) return;
55 const d = entry.details;
56 if (d?.logType !== 'tool-success') return;
57 if (NOTIFY_TOOLS.has(d?.content?.tool)) {
58 clearFallback();
59 set({ phase: 'notified' });
60 }
61 } catch { /* observer only */ }
62};
63
64const wire = () => {
65 if (wired) return;

Callers

nothing calls this directly

Calls 2

clearFallbackFunction · 0.85
setFunction · 0.70

Tested by

no test coverage detected