@xuda.io/ai_module 1.1.5431 → 1.1.5432
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.
- package/index.mjs +5 -5
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -4189,7 +4189,7 @@ const ai_chat_conversation = async function (req, job_id, headers) {
|
|
|
4189
4189
|
let prompt_selected_suggestion;
|
|
4190
4190
|
|
|
4191
4191
|
const get_prompt_suggestions = async function () {
|
|
4192
|
-
emitToDashboard('stream_phase', 'Deep thinking...', { allow_skip: true });
|
|
4192
|
+
emitToDashboard('stream_phase', 'Deep thinking...', { allow_skip: true, update: true });
|
|
4193
4193
|
return new Promise(async (resolve, reject) => {
|
|
4194
4194
|
let interval = setInterval(async function () {
|
|
4195
4195
|
const job_info = await jobs_ms.get_job_info({ job_id });
|
|
@@ -4243,7 +4243,7 @@ const ai_chat_conversation = async function (req, job_id, headers) {
|
|
|
4243
4243
|
await db_module.save_app_couch_doc_native(account_profile_info.app_id, conversation_doc);
|
|
4244
4244
|
|
|
4245
4245
|
// await update_job('analyzing request');
|
|
4246
|
-
emitToDashboard('stream_phase', 'Analyzing request');
|
|
4246
|
+
emitToDashboard('stream_phase', 'Analyzing request', { update: true });
|
|
4247
4247
|
|
|
4248
4248
|
const init_agent_hooks = function (agent) {
|
|
4249
4249
|
agent.on('agent_start', (context, agent) => {
|
|
@@ -4262,7 +4262,7 @@ const ai_chat_conversation = async function (req, job_id, headers) {
|
|
|
4262
4262
|
agent.on('agent_tool_start', (context, tool, details) => {
|
|
4263
4263
|
debugger;
|
|
4264
4264
|
// emitToDashboard('agent_tool_start', tool.name);
|
|
4265
|
-
emitToDashboard('stream_phase', `Starting ${tool
|
|
4265
|
+
emitToDashboard('stream_phase', `Starting ${tool?.name?.replaceAll('_', '')} tool`, { update: true });
|
|
4266
4266
|
});
|
|
4267
4267
|
|
|
4268
4268
|
agent.on('agent_tool_end', (context, tool, result, details) => {
|
|
@@ -4826,13 +4826,13 @@ const ai_chat_conversation = async function (req, job_id, headers) {
|
|
|
4826
4826
|
let _agent = [];
|
|
4827
4827
|
|
|
4828
4828
|
// await update_job('preparing tools');
|
|
4829
|
-
emitToDashboard('stream_phase', 'Preparing tools');
|
|
4829
|
+
emitToDashboard('stream_phase', 'Preparing tools', { update: true });
|
|
4830
4830
|
let agents = await get_agents();
|
|
4831
4831
|
|
|
4832
4832
|
/////////////
|
|
4833
4833
|
if (attachments?.length) {
|
|
4834
4834
|
// await update_job('analyzing attachments');
|
|
4835
|
-
emitToDashboard('stream_phase', 'Analyzing attachments');
|
|
4835
|
+
emitToDashboard('stream_phase', 'Analyzing attachments', { update: true });
|
|
4836
4836
|
await attachment_handler(uid, app_id, conversation_id, attachments, account_profile_info);
|
|
4837
4837
|
}
|
|
4838
4838
|
////////////
|