@e-llm-studio/instant-learning 0.0.73 → 0.0.75
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/dist/cjs/features/InstantLearning/_components/ConflictingLearningWarnCardDB.js +1 -1
- package/dist/cjs/features/WtaWnta/WtaWnta.js +1 -1
- package/dist/cjs/features/WtaWnta/_components/AgentDetailsForm.js +1 -1
- package/dist/cjs/features/WtaWnta/_components/SimilarConflictingCard.js +1 -1
- package/dist/cjs/hooks/useExistingPromptCheck.js +2 -0
- package/dist/cjs/hooks/useExistingPromptCheck.js.map +1 -0
- package/dist/features/InstantLearning/_components/ConflictingLearningWarnCardDB.js +1 -1
- package/dist/features/WtaWnta/WtaWnta.js +1 -1
- package/dist/features/WtaWnta/_components/AgentDetailsForm.js +1 -1
- package/dist/features/WtaWnta/_components/SimilarConflictingCard.js +1 -1
- package/dist/hooks/useExistingPromptCheck.js +2 -0
- package/dist/hooks/useExistingPromptCheck.js.map +1 -0
- package/dist/types/src/features/InstantLearning/_components/ConflictingLearningWarnCardDB.d.ts.map +1 -1
- package/dist/types/src/features/WtaWnta/WtaWnta.d.ts +3 -0
- package/dist/types/src/features/WtaWnta/WtaWnta.d.ts.map +1 -1
- package/dist/types/src/features/WtaWnta/_components/AgentDetailsForm.d.ts.map +1 -1
- package/dist/types/src/features/WtaWnta/_components/SimilarConflictingCard.d.ts +2 -0
- package/dist/types/src/features/WtaWnta/_components/SimilarConflictingCard.d.ts.map +1 -1
- package/dist/types/src/hooks/useExistingPromptCheck.d.ts +36 -0
- package/dist/types/src/hooks/useExistingPromptCheck.d.ts.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../node_modules/tslib/tslib.es6.mjs.js"),t=require("react");exports.default=function(n){var r=t.useState(!1),o=r[0],s=r[1],i=t.useState(null),c=i[0],a=i[1],l=t.useState(null),u=l[0],p=l[1];return{checkExistingPromptRules:function(t,r,o,i){return e.__awaiter(void 0,void 0,void 0,(function(){var c,l,u,m;return e.__generator(this,(function(e){switch(e.label){case 0:s(!0),p(null),a(null),c={mode:"PromptGenie",template_title:r,template_description:o,wta:t.wta.map((function(e){return e.text})).join(" OR "),wnta:t.wnta.map((function(e){return e.text})).join(" OR "),llm:i},console.log("Checking for existing DB conflicts (PromptGenie) with payload:",c),e.label=1;case 1:return e.trys.push([1,4,5,6]),[4,fetch("".concat(n,"/instant_learning/mode-wta-existing"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(c)})];case 2:if(!(l=e.sent()).ok)throw new Error("API Error: ".concat(l.statusText));return[4,l.json()];case 3:return(u=e.sent()).response?(console.log("DB check (PromptGenie) successful. Setting state with:",u.response),a(u.response)):(console.error("DB check (PromptGenie): API response object was missing."),a(null)),[3,6];case 4:return m=e.sent(),console.error("Failed to check for existing prompt rules:",m),p(m),[3,6];case 5:return s(!1),[7];case 6:return[2]}}))}))},isLoading:o,existingPromptConflicts:c,error:u,clearExistingPromptConflicts:function(){a(null)}}};
|
|
2
|
+
//# sourceMappingURL=useExistingPromptCheck.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useExistingPromptCheck.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|