Skip to content

Commit 8019564

Browse files
authored
fix(plugin): add skills to autoRecall search scope (#1225)
Include viking://agent/skills in the autoRecall search alongside user memories and agent memories. Skills stored in OpenViking are now auto-injected into context when relevant to the query. Fixes #1089 Co-authored-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
1 parent 7f05828 commit 8019564

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

examples/claude-code-memory-plugin/scripts/auto-recall.mjs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,13 +222,15 @@ async function searchScope(query, targetUri, limit) {
222222
}
223223

224224
async function searchBothScopes(query, limit) {
225-
const [userMems, agentMems] = await Promise.all([
225+
const [userMems, agentMems, agentSkills] = await Promise.all([
226226
searchScope(query, "viking://user/memories", limit),
227227
searchScope(query, "viking://agent/memories", limit),
228+
searchScope(query, "viking://agent/skills", limit),
228229
]);
229230
log("search_complete", { scope: "user", rawCount: userMems.length, topScores: userMems.slice(0, 3).map(m => m.score) });
230231
log("search_complete", { scope: "agent", rawCount: agentMems.length, topScores: agentMems.slice(0, 3).map(m => m.score) });
231-
const all = [...userMems, ...agentMems];
232+
log("search_complete", { scope: "skills", rawCount: agentSkills.length, topScores: agentSkills.slice(0, 3).map(m => m.score) });
233+
const all = [...userMems, ...agentMems, ...agentSkills];
232234
const uriSet = new Set();
233235
return all.filter(m => {
234236
if (uriSet.has(m.uri)) return false;

0 commit comments

Comments
 (0)