* [misc] Update reference handling in registerZentaoAIPlugin to support fallback attributes for object title, type, and ID.

This commit is contained in:
sunhao
2025-12-08 15:43:42 +08:00
parent 4ef67cb21a
commit 2ee83ed110
+1 -1
View File
@@ -429,7 +429,7 @@ function registerZentaoAIPlugin(lang)
newPropms.push(item.content);
if(refKeys.has(item.key)) return;
const itemAttrs = item.attrs || {};
newRefs.push({key: item.key, name: itemAttrs.objectTitle, type: itemAttrs.objectType, id: itemAttrs.objectID})
newRefs.push({key: item.key, name: itemAttrs.objectTitle || item.knowledgeTitle, type: itemAttrs.objectType || 'knowledge', id: itemAttrs.objectID || item.knowledgeID})
refKeys.add(item.key);
});
info.chat.$local.ztChunks = ztChunks;