@pi-unipi/memory 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.ts +10 -0
  2. package/package.json +1 -1
package/index.ts CHANGED
@@ -103,6 +103,7 @@ export default function (pi: ExtensionAPI) {
103
103
  { id: "projectCount", label: "Project Memories", show: true },
104
104
  { id: "totalCount", label: "Total Memories", show: true },
105
105
  { id: "projects", label: "Projects", show: true },
106
+ { id: "recent", label: "Recent Memories", show: true },
106
107
  ],
107
108
  },
108
109
  dataProvider: async () => {
@@ -111,6 +112,7 @@ export default function (pi: ExtensionAPI) {
111
112
  projectCount: { value: "0" },
112
113
  totalCount: { value: "0" },
113
114
  projects: { value: "none" },
115
+ recent: { value: "none" },
114
116
  };
115
117
  }
116
118
 
@@ -118,6 +120,10 @@ export default function (pi: ExtensionAPI) {
118
120
  const allMemories = listAllProjects();
119
121
  const uniqueProjects = [...new Set(allMemories.map((m) => m.project))];
120
122
 
123
+ // Get 3 most recent memories (sorted by updated DESC in listAll)
124
+ const recentMemories = projectMemories.slice(0, 3);
125
+ const recentList = recentMemories.map(m => m.title).join("\n");
126
+
121
127
  return {
122
128
  projectCount: { value: String(projectMemories.length) },
123
129
  totalCount: { value: String(allMemories.length) },
@@ -125,6 +131,10 @@ export default function (pi: ExtensionAPI) {
125
131
  value: uniqueProjects.length.toString(),
126
132
  detail: uniqueProjects.slice(0, 5).join(", ") + (uniqueProjects.length > 5 ? ` +${uniqueProjects.length - 5} more` : ""),
127
133
  },
134
+ recent: {
135
+ value: recentMemories.length > 0 ? recentMemories[0].title : "none",
136
+ detail: recentMemories.length > 1 ? recentMemories.slice(1).map(m => m.title).join("\n") : undefined,
137
+ },
128
138
  };
129
139
  },
130
140
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-unipi/memory",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Persistent cross-session memory with vector search for Pi coding agent",
5
5
  "type": "module",
6
6
  "license": "MIT",