@xuda.io/ai_module 1.1.3774 → 1.1.3776
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 +5 -1
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -4438,6 +4438,9 @@ const ai_chat_conversation = async function (req, job_id, headers) {
|
|
|
4438
4438
|
if (ai_agent_doc.studio_meta.shared_from_uid) {
|
|
4439
4439
|
const app_id = await account_module.get_account_default_project_id(ai_agent_doc.studio_meta.shared_from_uid);
|
|
4440
4440
|
ai_agent_doc = await db_module.get_app_couch_doc_native(app_id, ai_agent_doc.studio_meta.share_item_id);
|
|
4441
|
+
} else if (ai_agent_doc.studio_meta.installed_from_uid) {
|
|
4442
|
+
const app_id = await account_module.get_account_default_project_id(ai_agent_doc.studio_meta.installed_from_uid);
|
|
4443
|
+
ai_agent_doc = await db_module.get_app_couch_doc_native(app_id, ai_agent_doc.studio_meta.share_item_id);
|
|
4441
4444
|
}
|
|
4442
4445
|
} catch (err) {
|
|
4443
4446
|
throw new Error(err.message);
|
|
@@ -4758,7 +4761,8 @@ const ai_chat_conversation = async function (req, job_id, headers) {
|
|
|
4758
4761
|
if (!val.method) {
|
|
4759
4762
|
throw new Error('undefined method');
|
|
4760
4763
|
}
|
|
4761
|
-
const tool = await get_plugin_tool(app_id, uid, val.plugin_id, val.method, {});
|
|
4764
|
+
// const tool = await get_plugin_tool(app_id, uid, val.plugin_id, val.method, {});
|
|
4765
|
+
const tool = await get_plugin_tool(ai_agent_doc?.studio_meta?.shared_from_app_id || ai_agent_doc?.studio_meta?.installed_from_app_id || app_id, ai_agent_doc.uid, val.plugin_id, val.method, {});
|
|
4762
4766
|
tools.push(tool);
|
|
4763
4767
|
break;
|
|
4764
4768
|
}
|