MCPcopy Index your code
hub / github.com/simstudioai/sim / seedMemoryRecord

Method seedMemoryRecord

apps/sim/executor/handlers/agent/memory.ts:226–246  ·  view source on GitHub ↗
(
    workspaceId: string,
    key: string,
    messages: Message[]
  )

Source from the content-addressed store, hash-verified

224 }
225
226 private async seedMemoryRecord(
227 workspaceId: string,
228 key: string,
229 messages: Message[]
230 ): Promise<void> {
231 const now = new Date()
232
233 const sanitizedMessages = messages.map((message) => this.sanitizeMessageForStorage(message))
234
235 await db
236 .insert(memory)
237 .values({
238 id: generateId(),
239 workspaceId,
240 key,
241 data: sanitizedMessages,
242 createdAt: now,
243 updatedAt: now,
244 })
245 .onConflictDoNothing()
246 }
247
248 private async appendMessage(workspaceId: string, key: string, message: Message): Promise<void> {
249 const now = new Date()

Callers 1

seedMemoryMethod · 0.95

Calls 2

generateIdFunction · 0.90

Tested by

no test coverage detected