@xuda.io/ai_module 1.1.4530 → 1.1.4531

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 +4 -3
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -4409,7 +4409,6 @@ const chat_note = async function (req, job_id, headers) {
4409
4409
  };
4410
4410
 
4411
4411
  const chat_email = async function (req, job_id, headers) {
4412
- debugger;
4413
4412
  const { uid, email_id, perform_ai_execution = true, from_mailbox } = req;
4414
4413
  const account_profile_info = await account_module.get_active_account_profile_info(uid);
4415
4414
  let { prompt: body, conversation_doc, attachments = [], ai_agents } = req;
@@ -4451,8 +4450,10 @@ const chat_email = async function (req, job_id, headers) {
4451
4450
  if (!sent_email_result.success) {
4452
4451
  throw new Error('error sending email');
4453
4452
  }
4454
- //// attachments
4455
- ///
4453
+ let email_attachments = [];
4454
+ for (const attachment of attachments) {
4455
+ email_attachments.push(await save_drive_file_to_disk(attachment));
4456
+ }
4456
4457
  }
4457
4458
 
4458
4459
  if (perform_ai_execution) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.4530",
3
+ "version": "1.1.4531",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",