@xuda.io/ai_module 1.1.5253 → 1.1.5255

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 +18 -3
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -11032,7 +11032,7 @@ export const open_ai_alive_check = async function () {};
11032
11032
  // };
11033
11033
 
11034
11034
  export const get_chat_suggestions = async function (req) {
11035
- const { uid, conversation_item_id, no_of_suggestions = 3, ai_model = _conf.default_ai_model, context, exclude_agents = [] } = req;
11035
+ const { type = 'chat prompt', uid, conversation_item_id, no_of_suggestions = 3, ai_model = _conf.default_ai_model, context, exclude_agents = [] } = req;
11036
11036
  let { ai_agents = [] } = req;
11037
11037
 
11038
11038
  try {
@@ -11086,7 +11086,14 @@ export const get_chat_suggestions = async function (req) {
11086
11086
  }
11087
11087
  if (skip) continue;
11088
11088
 
11089
- list.push({ agent_id, agent_name: ai_agent_doc.properties.menuName, agent_category: ai_agent_doc.studio_meta.agent_category, agent_industry: ai_agent_doc.studio_meta.agent_industry, agent_instructions: ai_agent_doc?.agentConfig?.agent_instructions });
11089
+ list.push({
11090
+ agent_id,
11091
+ agent_name: ai_agent_doc.properties.menuName,
11092
+ agent_category: ai_agent_doc.studio_meta.agent_category,
11093
+ agent_industry: ai_agent_doc.studio_meta.agent_industry,
11094
+ agent_instructions: ai_agent_doc?.agentConfig?.agent_instructions,
11095
+ agent_user_guide: ai_agent_doc?.agentConfig?.agent_user_guide,
11096
+ });
11090
11097
  } catch (err) {
11091
11098
  throw new Error(err.message);
11092
11099
  }
@@ -11120,7 +11127,15 @@ export const get_chat_suggestions = async function (req) {
11120
11127
 
11121
11128
  Task: Select maximum ${no_of_suggestions} agents from the ## Agent List that are best suited to act upon or refine the current conversation state.
11122
11129
 
11130
+
11123
11131
  Selection Strategy:
11132
+ 1. Format Compatibility: Analyze the ## Output to Process. If it contains structured JSON, component definitions, or raw HTML, prioritize agents capable of transforming these formats (e.g., converting HTML/JSON to functional apps).
11133
+ 2. Workflow Continuity: Focus on the "Lifecycle" of the project. If a UI or content has been drafted, the logical next step is conversion to a production-ready format, styling, or deployment.
11134
+ 3. Explicit Intent: If the user’s original input was "make me a website" and the current state is a document definition, prioritize the agent that performs the final "Conversion" or "Building" step.
11135
+ 4. Contextual Relevance: Match the user's business profile (Digital Marketing & Web Development) with technical agents that automate development tasks.
11136
+
11137
+
11138
+
11124
11139
 
11125
11140
  Format Compatibility: Analyze the ## Prompt Response. If it contains code, data structures, or specific document types (like HTML), prioritize agents whose agent_instructions or agent_name or agent instructions involve processing, transforming, or styling that specific format.
11126
11141
 
@@ -11166,7 +11181,7 @@ export const get_chat_suggestions = async function (req) {
11166
11181
  return [];
11167
11182
  }
11168
11183
  };
11169
-
11184
+ debugger;
11170
11185
  const agents_docs = await get_agents();
11171
11186
  let suggestions = [];
11172
11187
  if (agents_docs.length) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.5253",
3
+ "version": "1.1.5255",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",