MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / Observe

Function Observe

graph-ui/src/agents/agent-source.test.tsx:83–90  ·  view source on GitHub ↗
({ project }: { project: string })

Source from the content-addressed store, hash-verified

81 .mockImplementation(() => new Promise(() => undefined));
82 const observed: { project: string; events: number; hello: boolean; status: string }[] = [];
83 function Observe({ project }: { project: string }): null {
84 const current = useAgentStream({ on: true, project, fetch });
85 useLayoutEffect(() => {
86 observed.push({ project, events: current.state.events,
87 hello: current.status.hello !== undefined, status: current.status.state });
88 });
89 return null;
90 }
91 await act(async () => root.render(<Observe project="one" />));
92 expect(observed.at(-1)).toMatchObject({ project: 'one', events: 1, hello: true, status: 'connected' });
93 await act(async () => root.render(<Observe project="two" />));

Callers

nothing calls this directly

Calls 2

useAgentStreamFunction · 0.90
pushMethod · 0.45

Tested by

no test coverage detected