@xuda.io/ai_module 1.1.5145 → 1.1.5146

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 -2
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -10976,8 +10976,10 @@ export const get_chat_suggestions = async function (uid, ai_agents, conversation
10976
10976
  };
10977
10977
 
10978
10978
  const agents_docs = await get_agents();
10979
- const suggestions = await get_suggestions();
10980
-
10979
+ let suggestions = [];
10980
+ if (agents_docs.length) {
10981
+ suggestions = await get_suggestions();
10982
+ }
10981
10983
  return { code: 44, data: suggestions };
10982
10984
  } catch (err) {
10983
10985
  return { code: -44, data: err.message || String(err) };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.5145",
3
+ "version": "1.1.5146",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",