@xuda.io/ai_module 1.1.5164 → 1.1.5166

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 +5 -2
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -4081,7 +4081,10 @@ const ai_chat_conversation = async function (req, job_id, headers) {
4081
4081
  direction: 'out',
4082
4082
  role: 'user',
4083
4083
  };
4084
- const out_conversation_item_save_ret = await db_module.save_app_couch_doc(account_profile_info.app_id, out_conversation_item_obj);
4084
+ let out_conversation_item_save_ret = await db_module.save_app_couch_doc(account_profile_info.app_id, out_conversation_item_obj);
4085
+ if (!conversation_item_id) {
4086
+ out_conversation_item_save_ret = await db_module.save_app_couch_doc(account_profile_info.app_id, out_conversation_item_obj);
4087
+ }
4085
4088
 
4086
4089
  // const { account_profile_info } = conversation_doc;
4087
4090
  const emitToDashboard = (type, content) => {
@@ -10940,7 +10943,7 @@ export const get_chat_suggestions = async function (req) {
10940
10943
 
10941
10944
  const get_suggestions = async function () {
10942
10945
  const AgentItemSchema = z.object({
10943
- type: z.string().describe('constant always "agent"'),
10946
+ type: z.literal('agent').describe('Constant identifier, always "agent"'),
10944
10947
  agent_id: z.string().describe('The unique identifier for the agent'),
10945
10948
  short_action: z.string().describe('A brief, 2-4 word call to action'),
10946
10949
  agent_description: z.string().describe("A professional description of the agent's capabilities"),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.5164",
3
+ "version": "1.1.5166",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",