json-object-editor 0.10.668 → 0.10.671
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/TESTING_PHASE1_PROGRESS.md +216 -0
- package/_www/ai-jobs.html +218 -0
- package/_www/ai-widget-test.html +1 -0
- package/_www/intent-operator.html +387 -0
- package/_www/mcp-nav.js +22 -12
- package/_www/mcp-test.html +287 -287
- package/capp/capp.css +3 -2
- package/css/joe-ai.css +71 -0
- package/css/joe.css +1 -1
- package/docs/JOE_AI_Overview.md +219 -250
- package/docs/protocol_report_template.html +479 -0
- package/docs/protocol_report_template.js +563 -0
- package/docs/schema_summary_guidelines.md +42 -3
- package/js/JsonObjectEditor.jquery.craydent.js +22 -3
- package/js/joe-ai.js +3220 -2301
- package/js/joe.js +23 -4
- package/js/joe.min.js +1 -1
- package/package.json +1 -1
- package/pages/template.html +2 -0
- package/server/app-config.js +1 -1
- package/server/fields/core.js +16 -2
- package/server/init.js +9 -1
- package/server/modules/AiJobs.js +412 -0
- package/server/modules/MCP.js +1481 -1368
- package/server/modules/Server.js +9 -0
- package/server/plugins/chatgpt.js +2332 -2113
- package/server/plugins/intent-operator.js +704 -0
- package/server/schemas/ai_prompt.js +9 -2
- package/server/schemas/report.js +1 -1
- package/server/schemas/task.js +1 -0
- package/web-components/field-jobs-container.js +224 -0
|
@@ -3344,6 +3344,10 @@ this.renderHTMLContent = function(specs){
|
|
|
3344
3344
|
|
|
3345
3345
|
//if(prop.width){
|
|
3346
3346
|
//close field container
|
|
3347
|
+
// Add field-jobs-container if queryJobs is true
|
|
3348
|
+
if (prop.queryJobs && self.current && self.current.object && self.current.object._id) {
|
|
3349
|
+
html += '<field-jobs-container data-object-id="' + self.current.object._id + '" data-field-name="' + prop.name + '"></field-jobs-container>';
|
|
3350
|
+
}
|
|
3347
3351
|
html+='</joe-field-container>';
|
|
3348
3352
|
// }
|
|
3349
3353
|
|
|
@@ -3555,13 +3559,28 @@ this.renderHTMLContent = function(specs){
|
|
|
3555
3559
|
try{
|
|
3556
3560
|
var aiLabel = self.propAsFuncOrValue(prop.ai.label) || 'AI';
|
|
3557
3561
|
var fieldName = prop.name || '';
|
|
3562
|
+
var obj = self.current && self.current.object || {};
|
|
3563
|
+
var objectId = obj._id || '';
|
|
3564
|
+
// Generate progress token using centralized function
|
|
3565
|
+
var progressToken = '';
|
|
3566
|
+
if (objectId && fieldName && window._joe && _joe.Ai && _joe.Ai.generateProgressToken) {
|
|
3567
|
+
progressToken = _joe.Ai.generateProgressToken(objectId, fieldName);
|
|
3568
|
+
}
|
|
3558
3569
|
html +=
|
|
3559
|
-
'<button
|
|
3570
|
+
'<joe-button class="joe-button joe-ai-button joe-ai-autofill-button joe-iconed-button" ' +
|
|
3571
|
+
'data-progress-token="' + progressToken + '" ' +
|
|
3572
|
+
'data-original-text="' + aiLabel.replace(/"/g, '"') + '" ' +
|
|
3573
|
+
'data-field-name="' + fieldName + '" ' +
|
|
3574
|
+
'data-object-id="' + objectId + '" ' +
|
|
3560
3575
|
'onclick="if(window._joe && _joe.Ai && _joe.Ai.populateField){_joe.Ai.populateField(\''+fieldName+'\');}" ' +
|
|
3561
3576
|
'title="Let AI suggest a value for this field">'+
|
|
3562
3577
|
aiLabel+
|
|
3563
|
-
'</button>'
|
|
3564
|
-
|
|
3578
|
+
'</joe-button>';
|
|
3579
|
+
if (progressToken) {
|
|
3580
|
+
html += '<div class="joe-ai-progress" data-for-token="' + progressToken + '" style="font-size:12px; color:#666; margin-top:4px; min-height:16px;"></div>';
|
|
3581
|
+
html += '<div class="joe-ai-jobs" data-for-token="' + progressToken + '" style="margin-top:4px;"></div>';
|
|
3582
|
+
}
|
|
3583
|
+
html += '<div class="clear"></div>';
|
|
3565
3584
|
}catch(_e){
|
|
3566
3585
|
// fail silently if something about the ai config is invalid
|
|
3567
3586
|
}
|