memory isolation fix

This commit is contained in:
Storme-bit
2026-04-19 01:02:52 -07:00
parent ed57a0331a
commit 56355d232b
7 changed files with 23 additions and 13 deletions

View File

@@ -64,7 +64,7 @@ async function embedEntity(entity) {
return data.embedding;
}
async function extractAndStoreEntities(userMessage, aiResponse) {
async function extractAndStoreEntities(userMessage, aiResponse, projectId=null) {
console.log('[entities] Extraction triggered')
try {
// Fetch existing entities to guide the model toward consistent name/type pairs
@@ -109,6 +109,7 @@ async function extractAndStoreEntities(userMessage, aiResponse) {
name: entity.name,
type: entity.type,
notes: entity.notes,
projectId: projectId ?? null,
}))
.catch(err => {
console.warn(`[entities] Failed to embed entity "${entity.name}":`, err.message);