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

Function handleMemoryUpdate

app/src/components/AgentCard/SensorPreviewPanel.tsx:739–748  ·  view source on GitHub ↗
(event: CustomEvent)

Source from the content-addressed store, hash-verified

737 // Listen for memory updates via custom events
738 useEffect(() => {
739 const handleMemoryUpdate = async (event: CustomEvent) => {
740 if (event.detail.agentId === agentId) {
741 try {
742 const memoryData = await getAgentMemory(agentId);
743 setMemory(memoryData || '');
744 } catch (error) {
745 console.error('Failed to reload memory:', error);
746 }
747 }
748 };
749
750 window.addEventListener('agent-memory-update', handleMemoryUpdate as any);
751 return () => {

Callers

nothing calls this directly

Calls 4

getAgentMemoryFunction · 0.90
getAgentImageMemoryFunction · 0.90
setMemoryFunction · 0.85
errorMethod · 0.80

Tested by

no test coverage detected