@xuda.io/ai_module 1.1.5395 → 1.1.5397

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.
Files changed (2) hide show
  1. package/index.mjs +12 -11
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -4320,19 +4320,19 @@ const ai_chat_conversation = async function (req, job_id, headers) {
4320
4320
  return is_agent ? identity : triage_assistant + identity;
4321
4321
  };
4322
4322
  const get_agents = async function () {
4323
- if (typeof local_ai_agents === 'undefined') {
4324
- // no agents
4325
- local_ai_agents = [];
4326
- } else if (!local_ai_agents.length) {
4327
- // auto agent mode
4328
- const ai_agents_ret = await get_user_ai_agents(uid);
4329
- for (const doc of ai_agents_ret.docs) {
4330
- local_ai_agents.push(doc._id);
4331
- }
4332
- }
4333
-
4334
4323
  if (reference_type === 'ai_agents') {
4335
4324
  local_ai_agents.push(reference_id);
4325
+ } else {
4326
+ if (typeof local_ai_agents === 'undefined') {
4327
+ // no agents
4328
+ local_ai_agents = [];
4329
+ } else if (!local_ai_agents.length) {
4330
+ // auto agent mode
4331
+ const ai_agents_ret = await get_user_ai_agents(uid);
4332
+ for (const doc of ai_agents_ret.docs) {
4333
+ local_ai_agents.push(doc._id);
4334
+ }
4335
+ }
4336
4336
  }
4337
4337
  const list = [];
4338
4338
 
@@ -4520,6 +4520,7 @@ const ai_chat_conversation = async function (req, job_id, headers) {
4520
4520
  async execute(e, RunContext) {
4521
4521
  debugger;
4522
4522
  const { prompt, numGenerations } = e;
4523
+ emitToDashboard('stream_phase', 'Starting image tool');
4523
4524
  try {
4524
4525
  let imgTags = '';
4525
4526
  const images_arr = await create_and_upload_image_to_drive('workspace', 'Chat Images', agent_id, prompt, numGenerations, uid, account_profile_info.app_id, job_id, headers, null, null, account_profile_info);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.5395",
3
+ "version": "1.1.5397",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",