Improved memory prompt slightly
All checks were successful
Publish Library / Build NPM Project (push) Successful in 1m9s
Publish Library / Tag Version (push) Successful in 19s

This commit is contained in:
2026-07-30 16:00:03 -04:00
parent dda2d4c2a3
commit a7aec4ee29
3 changed files with 105 additions and 106 deletions

View File

@@ -430,7 +430,7 @@ ${currentBody}
}
const {backlinks} = extractMetadata(node.content);
node.description = update.description;
node.description = node.name !== 'Person/User' ? update.description : 'All information about the current user';
node.content = this.applyHeader(update.content, this.buildHeader(node, week, newLinks, backlinks));
const [e] = await this.llm.embedding(node.content);
if(e) node.embedding = e.embedding;
@@ -454,7 +454,7 @@ Rules:
When extracting facts, you MUST also decide the exact destination path:
- Use an existing node name if the facts clearly belong there
- All information primary about the user should go under "Personal/..." (e.g., Personal/Info, Personal/Todos)
- All information primary about the user should go under "People/User"
- When required, create a new path following collection/subject format (e.g., People/Sarah, Projects/Oxide)
- For journal entries, use "Journal"
@@ -470,8 +470,7 @@ ${this.listNodes(memories).filter(n => !n.name.includes('_temp_') && !n.name.inc
},
fn: (args: any) => {
const subject = args.destination.trim().toLowerCase() === 'journal'
? `Journal/${weekKey}`
: args.destination.trim();
? `Journal/${weekKey}` : args.destination.trim();
const facts = buckets.get(subject) ?? [];
facts.push(...dedupeFacts(String(args.facts).split(',')));
buckets.set(subject, facts);