File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11{
22 "name" : " opencode-supermemory" ,
3- "version" : " 0.1.2 " ,
3+ "version" : " 0.1.3 " ,
44 "description" : " OpenCode plugin that gives coding agents persistent memory using Supermemory" ,
55 "type" : " module" ,
66 "main" : " dist/index.js" ,
Original file line number Diff line number Diff line change @@ -391,18 +391,15 @@ export const SupermemoryPlugin: Plugin = async (ctx: PluginInput) => {
391391 }
392392
393393 const scope = args . scope || "project" ;
394- const containerTag =
395- scope === "user" ? tags . user : tags . project ;
396394
397- const result = await supermemoryClient . forgetMemory (
398- containerTag ,
395+ const result = await supermemoryClient . deleteMemory (
399396 args . memoryId
400397 ) ;
401398
402399 if ( ! result ) {
403400 return JSON . stringify ( {
404401 success : false ,
405- error : "Failed to forget memory" ,
402+ error : "Failed to delete memory" ,
406403 } ) ;
407404 }
408405
Original file line number Diff line number Diff line change @@ -98,17 +98,15 @@ export class SupermemoryClient {
9898 }
9999 }
100100
101- async forgetMemory ( containerTag : string , memoryId ? : string ) {
101+ async deleteMemory ( memoryId : string ) {
102102 try {
103- return await withTimeout (
104- this . getClient ( ) . memories . forget ( {
105- containerTag,
106- id : memoryId ,
107- } ) ,
103+ await withTimeout (
104+ this . getClient ( ) . memories . delete ( memoryId ) ,
108105 TIMEOUT_MS
109106 ) ;
107+ return { success : true } ;
110108 } catch ( error ) {
111- console . error ( "Supermemory: forget memory failed" , error ) ;
109+ console . error ( "Supermemory: delete memory failed" , error ) ;
112110 return null ;
113111 }
114112 }
You can’t perform that action at this time.
0 commit comments