* [misc] refactor to prevent js error.

This commit is contained in:
sunhao
2025-12-02 16:27:36 +08:00
parent 16ede384cb
commit 49116d9021
+1 -1
View File
@@ -326,7 +326,7 @@ function registerZentaoAIPlugin(lang)
data : {memory: {collections: ['$global']}},
});
plugin.defineCallback('onCreateChat', async function(chat, info)
plugin.defineCallback && plugin.defineCallback('onCreateChat', async function(chat, info)
{
if(info.isLocal || !info.userPrompt) return;
const zentaoMemories = {};