MCPcopy Index your code
hub / github.com/codedogQBY/ReadAny / updateThreadMemory

Function updateThreadMemory

packages/core/src/db/thread-queries.ts:94–107  ·  view source on GitHub ↗
(
  id: string,
  memorySummary: string,
  memoryMessageCount: number,
)

Source from the content-addressed store, hash-verified

92}
93
94export async function updateThreadMemory(
95 id: string,
96 memorySummary: string,
97 memoryMessageCount: number,
98): Promise<void> {
99 const database = await getDB();
100 const deviceId = await getDeviceId();
101 const syncVersion = await nextSyncVersion(database, "threads");
102 const updatedAt = await nextUpdatedAt(database, "threads", id);
103 await database.execute(
104 "UPDATE threads SET memory_summary = ?, memory_updated_at = ?, memory_message_count = ?, updated_at = ?, sync_version = ?, last_modified_by = ? WHERE id = ?",
105 [memorySummary, Date.now(), memoryMessageCount, updatedAt, syncVersion, deviceId, id],
106 );
107}
108
109export async function updateThreadTitle(id: string, title: string): Promise<void> {
110 const database = await getDB();

Callers 2

Calls 5

getDBFunction · 0.90
getDeviceIdFunction · 0.90
nextSyncVersionFunction · 0.90
nextUpdatedAtFunction · 0.90
executeMethod · 0.65

Tested by

no test coverage detected