json-object-editor 0.10.624 → 0.10.632
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/CHANGELOG.md +15 -0
- package/_www/ai-widget-test.html +367 -0
- package/_www/mcp-export.html +5 -5
- package/_www/mcp-prompt.html +1 -1
- package/_www/mcp-test.html +14 -5
- package/css/joe-styles.css +11 -3
- package/css/joe.css +12 -4
- package/css/joe.min.css +1 -1
- package/docs/joe_agent_custom_gpt_instructions_v_3.md +132 -0
- package/dummy +10 -0
- package/img/svgs/ai_assistant.svg +1 -0
- package/img/svgs/ai_assistant_white.svg +1 -0
- package/js/JsonObjectEditor.jquery.craydent.js +34 -3
- package/js/joe-ai.js +784 -52
- package/js/joe.js +35 -4
- package/js/joe.min.js +1 -1
- package/package.json +1 -1
- package/readme.md +17 -10
- package/server/apps/aihub.js +97 -0
- package/server/fields/core.js +4 -1
- package/server/modules/MCP.js +263 -26
- package/server/modules/Server.js +1 -46
- package/server/plugins/auth.js +34 -30
- package/server/plugins/chatgpt-assistants.js +70 -35
- package/server/plugins/chatgpt.js +560 -44
- package/server/schemas/ai_assistant.js +149 -1
- package/server/schemas/ai_conversation.js +14 -1
- package/server/schemas/ai_widget_conversation.js +133 -14
- package/server/schemas/project.js +27 -3
- package/server/schemas/task.js +1 -0
package/js/joe.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* --------------------------------------------------------
|
|
2
2
|
*
|
|
3
|
-
* json-object-editor - v0.10.
|
|
3
|
+
* json-object-editor - v0.10.632
|
|
4
4
|
* Created by: Corey Hadden
|
|
5
5
|
*
|
|
6
6
|
* -------------------------------------------------------- */
|
|
@@ -572,8 +572,11 @@ function JsonObjectEditor(specs){
|
|
|
572
572
|
window.onkeydown = function (e) {
|
|
573
573
|
var code = e.keyCode
|
|
574
574
|
var nonBackElements = ['input','select','textarea'];
|
|
575
|
-
var isInputElement = nonBackElements.indexOf(e.target.tagName.toLowerCase()) != -1;
|
|
576
|
-
var isEditable =
|
|
575
|
+
var isInputElement = nonBackElements.indexOf((e.target && e.target.tagName && e.target.tagName.toLowerCase()) || '') != -1;
|
|
576
|
+
var isEditable =
|
|
577
|
+
e.target.isContentEditable ||
|
|
578
|
+
$(e.target).closest('joe-ai-chatbox').length ||
|
|
579
|
+
$(e.target).closest('joe-ai-widget').length;
|
|
577
580
|
|
|
578
581
|
if (code == 8) {//BACKBUTTON PRESSED
|
|
579
582
|
if(isInputElement || isEditable){
|
|
@@ -3488,6 +3491,25 @@ this.renderHTMLContent = function(specs){
|
|
|
3488
3491
|
break;
|
|
3489
3492
|
}
|
|
3490
3493
|
|
|
3494
|
+
// AI autofill helper button: when a field has an `ai` config and the
|
|
3495
|
+
// global `_joe.Ai.populateField` helper is available, render a small
|
|
3496
|
+
// inline button that triggers the autofill flow for this field.
|
|
3497
|
+
if (prop.ai) {
|
|
3498
|
+
try{
|
|
3499
|
+
var aiLabel = self.propAsFuncOrValue(prop.ai.label) || 'AI';
|
|
3500
|
+
var fieldName = prop.name || '';
|
|
3501
|
+
html +=
|
|
3502
|
+
'<button type="button" class="joe-ai-autofill-button joe-iconed-button joe-button" ' +
|
|
3503
|
+
'onclick="if(window._joe && _joe.Ai && _joe.Ai.populateField){_joe.Ai.populateField(\''+fieldName+'\');}" ' +
|
|
3504
|
+
'title="Let AI suggest a value for this field">'+
|
|
3505
|
+
aiLabel+
|
|
3506
|
+
'</button>'
|
|
3507
|
+
+'<div class="clear"></div>';
|
|
3508
|
+
}catch(_e){
|
|
3509
|
+
// fail silently if something about the ai config is invalid
|
|
3510
|
+
}
|
|
3511
|
+
}
|
|
3512
|
+
|
|
3491
3513
|
//_bmResponse(joeFieldBenchmarker,'Joe rendered '+(prop.name||"a field"));
|
|
3492
3514
|
//logit('Joe rendered '+(prop.name||"a field")+' in '+joeFieldBenchmarker.stop()+' seconds');
|
|
3493
3515
|
return html;
|
|
@@ -9932,7 +9954,16 @@ logit(intent)
|
|
|
9932
9954
|
|
|
9933
9955
|
return html;
|
|
9934
9956
|
},
|
|
9935
|
-
|
|
9957
|
+
userBar:function(userid,cssclass,dataset,nameprop){
|
|
9958
|
+
var user = _joe.Data[dataset || 'user'].where({_id:userid})[0] || false;
|
|
9959
|
+
if(!user){
|
|
9960
|
+
return '';
|
|
9961
|
+
}
|
|
9962
|
+
var name = user[nameprop || 'name'] || user.fullname || user.name;
|
|
9963
|
+
return '<joe-user-bar title="'+ name+'" style="background-color:'+user.color+'" class="joe-initials '+css+'">'
|
|
9964
|
+
+name
|
|
9965
|
+
+'</joe-user-bar>';
|
|
9966
|
+
},
|
|
9936
9967
|
}
|
|
9937
9968
|
},
|
|
9938
9969
|
handleUpdate:function(payload){
|