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

Function getAgentImageMemory

app/src/utils/agent_database.ts:321–335  ·  view source on GitHub ↗
(agentId: string)

Source from the content-addressed store, hash-verified

319
320// Get agent image memory
321export async function getAgentImageMemory(agentId: string): Promise<string[]> {
322 const db = await openDB();
323
324 return new Promise((resolve, reject) => {
325 const tx = db.transaction(IMAGE_MEMORY_STORE, 'readonly');
326 const store = tx.objectStore(IMAGE_MEMORY_STORE);
327 const request = store.get(agentId);
328
329 request.onsuccess = () => {
330 const result = request.result;
331 resolve(result ? result.images : []);
332 };
333 request.onerror = () => reject(request.error);
334 });
335}
336
337// Get all image memory entries
338export async function getAllImageMemories(): Promise<Array<{ id: string; images: string[] }>> {

Callers 6

loadImageMemoryFunction · 0.90
loadImagesFunction · 0.90
handleMemoryUpdateFunction · 0.90
pre-processor.tsFile · 0.90
executeJavaScriptFunction · 0.90
appendAgentImageMemoryFunction · 0.85

Calls 1

openDBFunction · 0.85

Tested by

no test coverage detected