@xuda.io/ai_module 1.1.3784 → 1.1.3786
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.mjs +4 -0
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -4436,11 +4436,15 @@ const ai_chat_conversation = async function (req, job_id, headers) {
|
|
|
4436
4436
|
try {
|
|
4437
4437
|
ai_agent_doc = await db_module.get_app_couch_doc_native(app_id, agent_id);
|
|
4438
4438
|
if (ai_agent_doc.studio_meta.shared_from_uid) {
|
|
4439
|
+
const reference_doc = _.cloneDeep(ai_agent_doc);
|
|
4439
4440
|
const app_id = await account_module.get_account_default_project_id(ai_agent_doc.studio_meta.shared_from_uid);
|
|
4440
4441
|
ai_agent_doc = await db_module.get_app_couch_doc_native(app_id, ai_agent_doc.studio_meta.share_item_id);
|
|
4442
|
+
ai_agent_doc.reference_doc = reference_doc;
|
|
4441
4443
|
} else if (ai_agent_doc.studio_meta.installed_from_uid) {
|
|
4444
|
+
const reference_doc = _.cloneDeep(ai_agent_doc);
|
|
4442
4445
|
const app_id = await account_module.get_account_default_project_id(ai_agent_doc.studio_meta.installed_from_uid);
|
|
4443
4446
|
ai_agent_doc = await db_module.get_app_couch_doc_native(app_id, ai_agent_doc.studio_meta.share_item_id);
|
|
4447
|
+
ai_agent_doc.reference_doc = reference_doc;
|
|
4444
4448
|
}
|
|
4445
4449
|
} catch (err) {
|
|
4446
4450
|
throw new Error(err.message);
|