@e-llm-studio/instant-learning 0.0.232 → 0.0.233
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/IL-OTJ/_components/CriticalGaps.js +1 -1
- package/dist/cjs/features/IL-OTJ/_components/InputDataReasoningCard.js +1 -1
- package/dist/cjs/features/IL-OTJ/_components/MarkdownComponents/MarkdownElements.js +1 -1
- package/dist/cjs/features/IL-OTJ/_components/MarkdownComponents/MarkdownSelect.js +1 -1
- package/dist/cjs/features/IL-OTJ/helpers/message-rendering-utils.js +1 -1
- package/dist/features/IL-OTJ/_components/CriticalGaps.js +1 -1
- package/dist/features/IL-OTJ/_components/InputDataReasoningCard.js +1 -1
- package/dist/features/IL-OTJ/_components/MarkdownComponents/MarkdownElements.js +1 -1
- package/dist/features/IL-OTJ/_components/MarkdownComponents/MarkdownSelect.js +1 -1
- package/dist/features/IL-OTJ/helpers/message-rendering-utils.js +1 -1
- package/dist/types/src/features/IL-OTJ/_components/CriticalGaps.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/_components/InputDataReasoningCard.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/_components/MarkdownComponents/MarkdownElements.d.ts +1 -0
- package/dist/types/src/features/IL-OTJ/_components/MarkdownComponents/MarkdownElements.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/_components/MarkdownComponents/MarkdownSelect.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";function r(r){return r.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t")}function e(e){try{return JSON.parse(e)}catch(a){var n=e;return n=(n=(n=n.replace(/,\s*([}\]])/g,"$1")).replace(/<ai_reasoning>[\s\S]*?<\/ai_reasoning>/g,function(e){return r(e)})).replace(/<explaination[\s\S]*?<\/explaination>/g,function(e){return r(e)}),JSON.parse(n)}}Object.defineProperty(exports,"__esModule",{value:!0});exports.buildAiReasoning=function(r){if(!r)return null;var e={id:null==r?void 0:r.id,reason:null==r?void 0:r.reason,gap:null==r?void 0:r.gap,score:(null==r?void 0:r.relevance_score)||(null==r?void 0:r.score)};return!(e.id||e.reason||e.gap||null!=e.score&&""!==e.score)?null:e},exports.extractReasoningFromText=function(r){if(null==r)return{text:"",aiReasoning:null};var e="",n=(e="string"==typeof r?r:Array.isArray(r)?r.join(", "):"object"==typeof r?JSON.stringify(r):String(r)).match(/<ai_reasoning>([\s\S]*?)<\/ai_reasoning>/i),a=null,o=e;if(n){var t=n[1],i=function(r){var e=t.match(new RegExp("<".concat(r,">([\\s\\S]*?)<\\/").concat(r,">"),"i"));return e?e[1].replace(/\\n/g,"\n").trim():""};a={id:i("id"),reason:i("reason"),gap:i("gap"),score:i("relevance_score")||i("score")},o=e.replace(/<ai_reasoning>[\s\S]*?<\/ai_reasoning>/gi,"").trim()}return{text:o,aiReasoning:a}},exports.parseJsonBlocks=function(r){for(var n,a
|
|
1
|
+
"use strict";function r(r){return r.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t")}function e(e){try{return JSON.parse(e)}catch(a){var n=e;return n=(n=(n=n.replace(/,\s*([}\]])/g,"$1")).replace(/<ai_reasoning>[\s\S]*?<\/ai_reasoning>/g,function(e){return r(e)})).replace(/<explaination[\s\S]*?<\/explaination>/g,function(e){return r(e)}),JSON.parse(n)}}Object.defineProperty(exports,"__esModule",{value:!0});exports.buildAiReasoning=function(r){if(!r)return null;var e={id:null==r?void 0:r.id,reason:null==r?void 0:r.reason,gap:null==r?void 0:r.gap,score:(null==r?void 0:r.relevance_score)||(null==r?void 0:r.score)};return!(e.id||e.reason||e.gap||null!=e.score&&""!==e.score)?null:e},exports.extractReasoningFromText=function(r){if(null==r)return{text:"",aiReasoning:null};var e="",n=(e="string"==typeof r?r:Array.isArray(r)?r.join(", "):"object"==typeof r?JSON.stringify(r):String(r)).match(/<ai_reasoning>([\s\S]*?)<\/ai_reasoning>/i),a=null,o=e;if(n){var t=n[1],i=function(r){var e=t.match(new RegExp("<".concat(r,">([\\s\\S]*?)<\\/").concat(r,">"),"i"));return e?e[1].replace(/\\n/g,"\n").trim():""};a={id:i("id"),reason:i("reason"),gap:i("gap"),score:i("relevance_score")||i("score")},o=e.replace(/<ai_reasoning>[\s\S]*?<\/ai_reasoning>/gi,"").trim()}return{text:o,aiReasoning:a}},exports.parseJsonBlocks=function(r){for(var n,a=/<!--\s*```json\s+property="([^"]+)"\s*([\s\S]*?)```\s*-->/gi,o=[];null!==(n=a.exec(r));){var t=n[0],i=n[1],s=n[2].trim();try{var c=e(s);o.push({property:i,data:c,rawMatch:t})}catch(r){console.warn('Failed to parse JSON for property="'.concat(i,'":'),r),console.warn("👉 Raw JSON string:",s),console.warn("👉 Error:"),console.warn(r),o.push({property:i,data:null,rawMatch:t})}}return o},exports.safeParse=e,exports.sanitizeBlock=r;
|
|
2
2
|
//# sourceMappingURL=message-rendering-utils.js.map
|