code clean up pass

This commit is contained in:
Storme-bit
2026-04-26 05:19:31 -07:00
parent acda21317b
commit 785047a824
8 changed files with 26 additions and 31 deletions

View File

@@ -317,10 +317,7 @@ async function chatStream(externalId, userMessage, onChunk, options = {}) {
}
}
console.log("[orchestration] final streamed text length:", fullText.length);
if (fullText.trim()) {
console.log('[chat] tokenCount before save:', tokenCount);
await memory.createEpisode(session.id, userMessage, fullText, tokenCount, session.project_id ?? null);
const allEpisodes = await memory.getRecentEpisodes(session.id, 9999);
triggerSummary(session, allEpisodes);