@xuda.io/ai_module 1.1.5573 → 1.1.5575
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 +7 -2
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -4322,6 +4322,9 @@ ${conversation_history || `User (studio): ${prompt}`}
|
|
|
4322
4322
|
}
|
|
4323
4323
|
|
|
4324
4324
|
lines.push(save_result_to_studio ? `- Saved the generated docs into the current studio project.` : `- Returned the generated docs without saving them.`);
|
|
4325
|
+
if (studio_result?.livePreviewTests && !studio_result.livePreviewTests.skipped) {
|
|
4326
|
+
lines.push(`- Live-preview browser smoke test passed for ${studio_result.livePreviewTests.tested || 0} component${studio_result.livePreviewTests.tested === 1 ? '' : 's'}.`);
|
|
4327
|
+
}
|
|
4325
4328
|
|
|
4326
4329
|
if (docs.length) {
|
|
4327
4330
|
lines.push('', 'Created units');
|
|
@@ -4430,6 +4433,7 @@ ${conversation_history || `User (studio): ${prompt}`}
|
|
|
4430
4433
|
{
|
|
4431
4434
|
...req,
|
|
4432
4435
|
prompt: studio_prompt,
|
|
4436
|
+
user_prompt: prompt,
|
|
4433
4437
|
plan_mode: normalized_plan_mode,
|
|
4434
4438
|
target_app_id,
|
|
4435
4439
|
},
|
|
@@ -4438,6 +4442,7 @@ ${conversation_history || `User (studio): ${prompt}`}
|
|
|
4438
4442
|
conversation_id,
|
|
4439
4443
|
conversation_type: 'studio',
|
|
4440
4444
|
plan_mode: normalized_plan_mode,
|
|
4445
|
+
headers,
|
|
4441
4446
|
},
|
|
4442
4447
|
);
|
|
4443
4448
|
|
|
@@ -5844,7 +5849,6 @@ setTimeout(async () => {
|
|
|
5844
5849
|
|
|
5845
5850
|
const run_plugin = async function (app_id, uid, plugin_name, method, prop_data, dev = true, req = {}, testing = true, agent_info = {}) {
|
|
5846
5851
|
const db_module = await import(`${module_path}/db_module/index.mjs`);
|
|
5847
|
-
debugger;
|
|
5848
5852
|
const get_plugin_resource = function (plugin_name, plugin_resource) {
|
|
5849
5853
|
return new Promise(async (resolve, reject) => {
|
|
5850
5854
|
try {
|
|
@@ -5935,7 +5939,7 @@ const run_plugin = async function (app_id, uid, plugin_name, method, prop_data,
|
|
|
5935
5939
|
};
|
|
5936
5940
|
|
|
5937
5941
|
try {
|
|
5938
|
-
const script = new VMScript(`
|
|
5942
|
+
const script = new VMScript(`Promise.resolve().then(() => server_script.${method}(req,params,setup_doc,resolve,reject,env)).catch(reject);`, { filename: app_plugins_path, dirname: app_plugins_path });
|
|
5939
5943
|
let vm = new NodeVM({
|
|
5940
5944
|
require: {
|
|
5941
5945
|
external: true,
|
|
@@ -5949,6 +5953,7 @@ const run_plugin = async function (app_id, uid, plugin_name, method, prop_data,
|
|
|
5949
5953
|
});
|
|
5950
5954
|
} catch (err) {
|
|
5951
5955
|
console.error('Failed to execute script.', err);
|
|
5956
|
+
reject_local(err);
|
|
5952
5957
|
}
|
|
5953
5958
|
// };
|
|
5954
5959
|
});
|