@xuda.io/ai_module 1.1.5593 → 1.1.5595

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 +34 -29
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -4355,22 +4355,27 @@ export const submit_chat_conversation = async function (req, job_id, headers) {
4355
4355
  }
4356
4356
 
4357
4357
  case 'ai_chats': {
4358
+ ret = await ai_chat_conversation(req, job_id, headers);
4358
4359
  break;
4359
4360
  }
4360
4361
 
4361
4362
  case 'apps': {
4363
+ ret = await chat_studio(req, job_id, headers);
4362
4364
  break;
4363
4365
  }
4364
4366
 
4365
4367
  case 'ai_agent': {
4368
+ ret = await ai_chat_conversation(req, job_id, headers);
4366
4369
  break;
4367
4370
  }
4368
4371
 
4369
4372
  case 'studio': {
4373
+ ret = await chat_studio(req, job_id, headers);
4370
4374
  break;
4371
4375
  }
4372
4376
 
4373
4377
  case 'dashboard': {
4378
+ // ??
4374
4379
  break;
4375
4380
  }
4376
4381
 
@@ -4379,40 +4384,40 @@ export const submit_chat_conversation = async function (req, job_id, headers) {
4379
4384
  break;
4380
4385
  }
4381
4386
 
4382
- if (route_to_studio) {
4383
- ret = await chat_studio(req, job_id, headers);
4384
- } else if (conversation_doc.reference_type === 'contacts') {
4385
- req._thread_reentry = Date.now() - conversation_doc.date_created_ts > 60000;
4387
+ // if (route_to_studio) {
4388
+ // ret = await chat_studio(req, job_id, headers);
4389
+ // } else if (conversation_doc.reference_type === 'contacts') {
4390
+ // req._thread_reentry = Date.now() - conversation_doc.date_created_ts > 60000;
4386
4391
 
4387
- account_msa.ts_contact(uid, conversation_doc.reference_id);
4392
+ // account_msa.ts_contact(uid, conversation_doc.reference_id);
4388
4393
 
4389
- switch (conversation_doc.conversation_type) {
4390
- case 'note': {
4391
- ret = await chat_note(req, job_id, headers);
4392
- break;
4393
- }
4394
- case 'ai_chat': {
4395
- ret = await ai_chat_conversation(req, job_id, headers);
4396
- break;
4397
- }
4394
+ // switch (conversation_doc.conversation_type) {
4395
+ // case 'note': {
4396
+ // ret = await chat_note(req, job_id, headers);
4397
+ // break;
4398
+ // }
4399
+ // case 'ai_chat': {
4400
+ // ret = await ai_chat_conversation(req, job_id, headers);
4401
+ // break;
4402
+ // }
4398
4403
 
4399
- case 'email': {
4400
- ret = await chat_email(req, job_id, headers);
4401
- break;
4402
- }
4404
+ // case 'email': {
4405
+ // ret = await chat_email(req, job_id, headers);
4406
+ // break;
4407
+ // }
4403
4408
 
4404
- case 'chat': {
4405
- ret = await contact_chat_conversation(req, job_id, headers);
4406
- break;
4407
- }
4409
+ // case 'chat': {
4410
+ // ret = await contact_chat_conversation(req, job_id, headers);
4411
+ // break;
4412
+ // }
4408
4413
 
4409
- default:
4410
- ret = { code: -44, data: 'invalid conversation_type ' + conversation_doc.conversation_type };
4411
- break;
4412
- }
4413
- } else {
4414
- ret = await ai_chat_conversation(req, job_id, headers);
4415
- }
4414
+ // default:
4415
+ // ret = { code: -44, data: 'invalid conversation_type ' + conversation_doc.conversation_type };
4416
+ // break;
4417
+ // }
4418
+ // } else {
4419
+ // ret = await ai_chat_conversation(req, job_id, headers);
4420
+ // }
4416
4421
 
4417
4422
  if (ret.code > -1) {
4418
4423
  let conversation_doc = await db_module.get_app_couch_doc_native(account_profile_info.app_id, conversation_id);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.5593",
3
+ "version": "1.1.5595",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",