@@ -7,6 +7,7 @@ import { formatContextForPrompt } from "./services/context.js";
77import { getTags } from "./services/tags.js" ;
88import { stripPrivateContent , isFullyPrivate } from "./services/privacy.js" ;
99import { createCompactionHook , type CompactionContext } from "./services/compaction.js" ;
10+ import { generatePartId } from "./services/ids.js" ;
1011
1112import { isConfigured , CONFIG } from "./config.js" ;
1213import { log } from "./services/logger.js" ;
@@ -112,7 +113,7 @@ export const SupermemoryPlugin: Plugin = async (ctx: PluginInput) => {
112113 if ( detectMemoryKeyword ( userMessage ) ) {
113114 log ( "chat.message: memory keyword detected" ) ;
114115 const nudgePart : Part = {
115- id : `supermemory-nudge- ${ Date . now ( ) } ` ,
116+ id : generatePartId ( ) ,
116117 sessionID : input . sessionID ,
117118 messageID : output . message . id ,
118119 type : "text" ,
@@ -157,7 +158,7 @@ export const SupermemoryPlugin: Plugin = async (ctx: PluginInput) => {
157158
158159 if ( memoryContext ) {
159160 const contextPart : Part = {
160- id : `supermemory-context- ${ Date . now ( ) } ` ,
161+ id : generatePartId ( ) ,
161162 sessionID : input . sessionID ,
162163 messageID : output . message . id ,
163164 type : "text" ,
0 commit comments