@xuda.io/ai_module 1.1.4541 → 1.1.4542

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 +2 -2
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -4411,7 +4411,7 @@ const chat_note = async function (req, job_id, headers) {
4411
4411
  };
4412
4412
 
4413
4413
  const chat_email = async function (req, job_id, headers) {
4414
- const { uid, email_id, perform_ai_execution = true, from_mailbox } = req;
4414
+ const { uid, email_id, perform_ai_execution = true, from_mailbox, _thread_reentry } = req;
4415
4415
  const account_profile_info = await account_module.get_active_account_profile_info(uid);
4416
4416
  let { prompt: body, conversation_doc, attachments = [], ai_agents } = req;
4417
4417
  try {
@@ -4438,7 +4438,7 @@ const chat_email = async function (req, job_id, headers) {
4438
4438
 
4439
4439
  // send an email by user invocation
4440
4440
  if (!from_mailbox) {
4441
- let subject = body;
4441
+ let subject = _thread_reentry ? '' : body;
4442
4442
  if (body.split(' ').length > 10) {
4443
4443
  const subject_ret = await submit_chat_gpt_prompt({ uid, prompt: `create title for the prompt return 5 words result maximum text only without options : ${body}`, model: 'gpt-5-nano', metadata: { conversation_id: conversation_doc._id, func: 'chat_email' }, account_profile_info });
4444
4444
  if (subject_ret.code < 0) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.4541",
3
+ "version": "1.1.4542",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",