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

Function handleSave

app/src/components/MemoryManager.tsx:100–114  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

98 };
99
100 const handleSave = async () => {
101 try {
102 setError(null);
103 setIsSaving(true);
104 await updateAgentMemory(agentId, memory);
105 setSavedMemory(memory);
106 Logger.debug(agentId, `Memory saved (${memory.length} characters)`);
107 } catch (err) {
108 const errorMessage = err instanceof Error ? err.message : 'Unknown error';
109 setError(`Failed to save memory: ${errorMessage}`);
110 Logger.error(agentId, `Failed to save memory: ${errorMessage}`, err);
111 } finally {
112 setIsSaving(false);
113 }
114 };
115
116 const handleClear = async () => {
117 if (await confirm(`Are you sure you want to clear the text memory for agent "${agentName}"?`)) {

Callers

nothing calls this directly

Calls 3

updateAgentMemoryFunction · 0.90
errorMethod · 0.80
debugMethod · 0.45

Tested by

no test coverage detected