(agentId: string, images: string[])
| 355 | |
| 356 | // Update agent image memory (replaces entire array) |
| 357 | export async function updateAgentImageMemory(agentId: string, images: string[]): Promise<void> { |
| 358 | const db = await openDB(); |
| 359 | |
| 360 | const tx = db.transaction(IMAGE_MEMORY_STORE, 'readwrite'); |
| 361 | const store = tx.objectStore(IMAGE_MEMORY_STORE); |
| 362 | |
| 363 | await new Promise<void>((resolve, reject) => { |
| 364 | const request = store.put({ |
| 365 | id: agentId, |
| 366 | images |
| 367 | }); |
| 368 | request.onsuccess = () => resolve(); |
| 369 | request.onerror = () => reject(request.error); |
| 370 | }); |
| 371 | dispatchMemoryUpdate(agentId); |
| 372 | } |
| 373 | |
| 374 | // Append images to agent's image memory |
| 375 | export async function appendAgentImageMemory(agentId: string, images: string[]): Promise<void> { |
no test coverage detected