@e-llm-studio/requirement-ai 0.0.355 → 0.0.356

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.
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),i=require("react"),l=require("lucide-react"),o=require("./CustomChatCrRedirection.module.css.js"),t=require("../ai-reasoning/AiReasoningCitationContent.js"),n=require("../../icons/CognitiveDecision.js"),r=require("@mui/material");exports.CustomChatCrRedirection=function({isDefaultOpen:a,processItemId:s,isCompleted:d,mode:c,msg:u,type:v,id:p,aiReason:g,text:f,headerText:h,decisionStrength:m,statusUi:x,panelRef:j,onHandleSend:y,onRedirectClick:C,gapType:D,isGenerating:b=!1,customStyles:I,customIcons:N,cognitiveDecisionHeaders:S,metaData:T}){const[R,k]=i.useState(a),q=(null==N?void 0:N.highConfidence)||e.jsx(n.default,{}),B=()=>{b||null==C||C({type:v,id:p,aiReason:g,msg:u,meta:{headerText:h,decisionStrength:m,text:f}})},W=()=>{"cra"===c?null==y||y(`Discuss ambiguities on ${f}`,p,T):null==y||y(`Deep Dive into ${D} ${h}: ${f}`,p,T)};return e.jsxs("div",{className:[o.default.outerWrapper,b?o.default.outerWrapperDisabled:""].join(" "),style:{...null==I?void 0:I.redirectionOuterWrapper,...b?null==I?void 0:I.redirectionOuterWrapperDisabled:{}},children:[e.jsxs("div",{className:[o.default.card,b?o.default.cardDisabled:o.default.cardInteractive].join(" "),style:{...null==I?void 0:I.redirectionCard,...b?null==I?void 0:I.redirectionCardDisabled:null==I?void 0:I.redirectionCardInteractive},children:[e.jsxs("div",{className:o.default.leftSide,style:null==I?void 0:I.redirectionLeftSide,children:[e.jsx(r.Tooltip,{title:h+" "+f,placement:"top",slotProps:{tooltip:{sx:{...null==I?void 0:I.headerTooltip}}},children:e.jsxs("span",{className:o.default.textBlock,style:null==I?void 0:I.redirectionTextBlock,children:[h&&e.jsxs("span",{className:o.default.headerText,style:null==I?void 0:I.redirectionHeaderText,children:[h,f?" ":""]}),f]})}),e.jsxs("span",{onClick:e=>{e.stopPropagation(),b||k(!R)},className:[o.default.reasoningToggle,b?o.default.reasoningToggleDisabled:o.default.reasoningToggleActive].join(" "),style:{...null==I?void 0:I.reasoningToggle,...b?null==I?void 0:I.reasoningToggleDisabled:null==I?void 0:I.reasoningToggleActive},children:[q,R?e.jsx(l.ChevronUp,{className:o.default.chevronIcon,style:null==I?void 0:I.chevronIcon}):e.jsx(l.ChevronDown,{className:o.default.chevronIcon,style:null==I?void 0:I.chevronIcon})]})]}),d?e.jsx("div",{className:o.default.completeTickWrapper,style:null==I?void 0:I.completeTickWrapper,children:e.jsx(l.Check,{color:(null==I?void 0:I.checkColor)||"green"})}):e.jsxs(e.Fragment,{children:["risk-gap"===c&&e.jsxs("div",{className:o.default.rightSide,style:null==I?void 0:I.redirectionRightSide,children:[e.jsx("button",{disabled:b,className:[o.default.fixButton,b?o.default.fixButtonDisabled:""].join(" "),style:{...null==I?void 0:I.redirectionFixButton,...b?null==I?void 0:I.fixButtonDisabled:{}},onClick:e=>{e.stopPropagation(),b||W()},children:"Fix"}),e.jsx(l.SquareArrowOutUpRight,{onClick:b?void 0:B,size:18,className:[b?o.default.redirectIconDisabled:o.default.redirectIcon].join(" "),style:{...b?null==I?void 0:I.redirectIconDisabled:null==I?void 0:I.redirectIcon}})]}),"cra"===c&&!a&&e.jsx("div",{className:o.default.rightSide,style:null==I?void 0:I.redirectionRightSide,children:s===p?e.jsx("div",{className:o.default.loaderWrapper,style:null==I?void 0:I.loaderWrapper,children:e.jsx(l.Loader2,{size:16,className:o.default.loaderIcon,color:"grey",style:{animation:"spin 1s linear infinite",...null==I?void 0:I.loaderIcon}})}):e.jsx("button",{className:[o.default.clarifyButton].join(" "),style:{color:b?"grey":"",...null==I?void 0:I.redirectionClarifyButton},disabled:b,onClick:e=>{e.stopPropagation(),W()},children:"Clarify"})}),"cra"===c&&g.highlight&&g.path&&e.jsx(l.SquareArrowOutUpRight,{onClick:b?void 0:B,size:18,className:[b?o.default.redirectIconDisabled:o.default.redirectIcon].join(" "),style:{...b?null==I?void 0:I.redirectIconDisabled:null==I?void 0:I.redirectIcon}})]})]}),R&&e.jsx(t.default,{label:"cra"===c?"Clarify":"Select this option",aiReason:{id:"1",reason:(null==g?void 0:g.Reasoning)||"",gap:(null==g?void 0:g.Gap)||"",relevance_score:Number(null==g?void 0:g.Confidence_score),explanation:(null==g?void 0:g.explanation)||""},onSelectProceed:W,customStyles:null==I?void 0:I.aiReasoningStyles,customIcons:N,cognitiveDecisionHeaders:S})]})};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),i=require("react"),l=require("lucide-react"),o=require("./CustomChatCrRedirection.module.css.js"),t=require("../ai-reasoning/AiReasoningCitationContent.js"),n=require("../../icons/CognitiveDecision.js"),r=require("@mui/material");exports.CustomChatCrRedirection=function({isDefaultOpen:a,processItemId:s,isCompleted:d,mode:c,msg:u,type:v,id:p,aiReason:g,text:f,headerText:h,decisionStrength:m,statusUi:x,panelRef:j,onHandleSend:y,onRedirectClick:C,gapType:D,isGenerating:b=!1,customStyles:I,customIcons:N,cognitiveDecisionHeaders:S,metaData:T}){const[R,k]=i.useState(a),q=(null==N?void 0:N.highConfidence)||e.jsx(n.default,{}),B=()=>{b||null==C||C({type:v,id:p,aiReason:g,msg:u,meta:{headerText:h,decisionStrength:m,text:f}})},W=()=>{"cra"===c?null==y||y(`Discuss ambiguities on ${f}`,p,T):null==y||y(`Deep Dive into ${D} ${h}: ${f}`,p,T)};return e.jsxs("div",{className:[o.default.outerWrapper,b?o.default.outerWrapperDisabled:""].join(" "),style:{...null==I?void 0:I.redirectionOuterWrapper,...b?null==I?void 0:I.redirectionOuterWrapperDisabled:{}},children:[e.jsxs("div",{className:[o.default.card,b?o.default.cardDisabled:o.default.cardInteractive].join(" "),style:{...null==I?void 0:I.redirectionCard,...b?null==I?void 0:I.redirectionCardDisabled:null==I?void 0:I.redirectionCardInteractive},children:[e.jsxs("div",{className:o.default.leftSide,style:null==I?void 0:I.redirectionLeftSide,children:[e.jsx(r.Tooltip,{title:h+" "+f,placement:"top",slotProps:{tooltip:{sx:{...null==I?void 0:I.headerTooltip}}},children:e.jsxs("span",{className:o.default.textBlock,style:null==I?void 0:I.redirectionTextBlock,children:[h&&e.jsxs("span",{className:o.default.headerText,style:null==I?void 0:I.redirectionHeaderText,children:[h,f?" ":""]}),f]})}),e.jsxs("span",{onClick:e=>{e.stopPropagation(),b||k(!R)},className:[o.default.reasoningToggle,b?o.default.reasoningToggleDisabled:o.default.reasoningToggleActive].join(" "),style:{...null==I?void 0:I.reasoningToggle,...b?null==I?void 0:I.reasoningToggleDisabled:null==I?void 0:I.reasoningToggleActive},children:[q,R?e.jsx(l.ChevronUp,{className:o.default.chevronIcon,style:null==I?void 0:I.chevronIcon}):e.jsx(l.ChevronDown,{className:o.default.chevronIcon,style:null==I?void 0:I.chevronIcon})]})]}),d?e.jsx("div",{className:o.default.completeTickWrapper,style:null==I?void 0:I.completeTickWrapper,children:e.jsx(l.Check,{color:(null==I?void 0:I.checkColor)||"green"})}):e.jsxs(e.Fragment,{children:["risk-gap"===c&&e.jsxs("div",{className:o.default.rightSide,style:null==I?void 0:I.redirectionRightSide,children:[e.jsx("button",{disabled:b,className:[o.default.fixButton,b?o.default.fixButtonDisabled:""].join(" "),style:{...null==I?void 0:I.redirectionFixButton,...b?null==I?void 0:I.fixButtonDisabled:{}},onClick:e=>{e.stopPropagation(),b||W()},children:"Fix"}),e.jsx(l.SquareArrowOutUpRight,{onClick:b?void 0:B,size:18,className:[b?o.default.redirectIconDisabled:o.default.redirectIcon].join(" "),style:{...b?null==I?void 0:I.redirectIconDisabled:null==I?void 0:I.redirectIcon}})]}),"cra"===c&&!a&&e.jsx("div",{className:o.default.rightSide,style:null==I?void 0:I.redirectionRightSide,children:s===p?e.jsx("div",{className:o.default.loaderWrapper,style:null==I?void 0:I.loaderWrapper,children:e.jsx(l.Loader2,{size:16,className:o.default.loaderIcon,color:"grey",style:{animation:"spin 1s linear infinite",...null==I?void 0:I.loaderIcon}})}):e.jsx("button",{className:[o.default.clarifyButton].join(" "),style:{color:b?"grey":"",...null==I?void 0:I.redirectionClarifyButton},disabled:b,onClick:e=>{e.stopPropagation(),W()},children:"Clarify"})}),"cra"===c&&(null==g?void 0:g.highlight)&&(null==g?void 0:g.path)&&e.jsx(l.SquareArrowOutUpRight,{onClick:b?void 0:B,size:18,className:[b?o.default.redirectIconDisabled:o.default.redirectIcon].join(" "),style:{...b?null==I?void 0:I.redirectIconDisabled:null==I?void 0:I.redirectIcon}})]})]}),R&&e.jsx(t.default,{label:"cra"===c?"Clarify":"Select this option",aiReason:{id:"1",reason:(null==g?void 0:g.Reasoning)||"",gap:(null==g?void 0:g.Gap)||"",relevance_score:Number(null==g?void 0:g.Confidence_score),explanation:(null==g?void 0:g.explanation)||""},onSelectProceed:W,customStyles:null==I?void 0:I.aiReasoningStyles,customIcons:N,cognitiveDecisionHeaders:S})]})};
2
2
  //# sourceMappingURL=CustomChatCrRedirection.js.map
@@ -1,2 +1,2 @@
1
- import{jsx as e,jsxs as i,Fragment as o}from"react/jsx-runtime";import{useState as l}from"react";import{ChevronUp as n,ChevronDown as r,Check as t,SquareArrowOutUpRight as a,Loader2 as s}from"lucide-react";import d from"./CustomChatCrRedirection.module.css.js";import c from"../ai-reasoning/AiReasoningCitationContent.js";import u from"../../icons/CognitiveDecision.js";import{Tooltip as p}from"@mui/material";function m({isDefaultOpen:m,processItemId:v,isCompleted:g,mode:h,msg:y,type:f,id:C,aiReason:D,text:b,headerText:x,decisionStrength:I,statusUi:N,panelRef:T,onHandleSend:S,onRedirectClick:k,gapType:j,isGenerating:R=!1,customStyles:B,customIcons:W,cognitiveDecisionHeaders:P,metaData:H}){const[$,z]=l(m),A=(null==W?void 0:W.highConfidence)||e(u,{}),O=()=>{R||null==k||k({type:f,id:C,aiReason:D,msg:y,meta:{headerText:x,decisionStrength:I,text:b}})},F=()=>{"cra"===h?null==S||S(`Discuss ambiguities on ${b}`,C,H):null==S||S(`Deep Dive into ${j} ${x}: ${b}`,C,H)};return i("div",{className:[d.outerWrapper,R?d.outerWrapperDisabled:""].join(" "),style:{...null==B?void 0:B.redirectionOuterWrapper,...R?null==B?void 0:B.redirectionOuterWrapperDisabled:{}},children:[i("div",{className:[d.card,R?d.cardDisabled:d.cardInteractive].join(" "),style:{...null==B?void 0:B.redirectionCard,...R?null==B?void 0:B.redirectionCardDisabled:null==B?void 0:B.redirectionCardInteractive},children:[i("div",{className:d.leftSide,style:null==B?void 0:B.redirectionLeftSide,children:[e(p,{title:x+" "+b,placement:"top",slotProps:{tooltip:{sx:{...null==B?void 0:B.headerTooltip}}},children:i("span",{className:d.textBlock,style:null==B?void 0:B.redirectionTextBlock,children:[x&&i("span",{className:d.headerText,style:null==B?void 0:B.redirectionHeaderText,children:[x,b?" ":""]}),b]})}),i("span",{onClick:e=>{e.stopPropagation(),R||z(!$)},className:[d.reasoningToggle,R?d.reasoningToggleDisabled:d.reasoningToggleActive].join(" "),style:{...null==B?void 0:B.reasoningToggle,...R?null==B?void 0:B.reasoningToggleDisabled:null==B?void 0:B.reasoningToggleActive},children:[A,e($?n:r,{className:d.chevronIcon,style:null==B?void 0:B.chevronIcon})]})]}),g?e("div",{className:d.completeTickWrapper,style:null==B?void 0:B.completeTickWrapper,children:e(t,{color:(null==B?void 0:B.checkColor)||"green"})}):i(o,{children:["risk-gap"===h&&i("div",{className:d.rightSide,style:null==B?void 0:B.redirectionRightSide,children:[e("button",{disabled:R,className:[d.fixButton,R?d.fixButtonDisabled:""].join(" "),style:{...null==B?void 0:B.redirectionFixButton,...R?null==B?void 0:B.fixButtonDisabled:{}},onClick:e=>{e.stopPropagation(),R||F()},children:"Fix"}),e(a,{onClick:R?void 0:O,size:18,className:[R?d.redirectIconDisabled:d.redirectIcon].join(" "),style:{...R?null==B?void 0:B.redirectIconDisabled:null==B?void 0:B.redirectIcon}})]}),"cra"===h&&!m&&e("div",{className:d.rightSide,style:null==B?void 0:B.redirectionRightSide,children:v===C?e("div",{className:d.loaderWrapper,style:null==B?void 0:B.loaderWrapper,children:e(s,{size:16,className:d.loaderIcon,color:"grey",style:{animation:"spin 1s linear infinite",...null==B?void 0:B.loaderIcon}})}):e("button",{className:[d.clarifyButton].join(" "),style:{color:R?"grey":"",...null==B?void 0:B.redirectionClarifyButton},disabled:R,onClick:e=>{e.stopPropagation(),F()},children:"Clarify"})}),"cra"===h&&D.highlight&&D.path&&e(a,{onClick:R?void 0:O,size:18,className:[R?d.redirectIconDisabled:d.redirectIcon].join(" "),style:{...R?null==B?void 0:B.redirectIconDisabled:null==B?void 0:B.redirectIcon}})]})]}),$&&e(c,{label:"cra"===h?"Clarify":"Select this option",aiReason:{id:"1",reason:(null==D?void 0:D.Reasoning)||"",gap:(null==D?void 0:D.Gap)||"",relevance_score:Number(null==D?void 0:D.Confidence_score),explanation:(null==D?void 0:D.explanation)||""},onSelectProceed:F,customStyles:null==B?void 0:B.aiReasoningStyles,customIcons:W,cognitiveDecisionHeaders:P})]})}export{m as CustomChatCrRedirection};
1
+ import{jsx as e,jsxs as i,Fragment as o}from"react/jsx-runtime";import{useState as l}from"react";import{ChevronUp as n,ChevronDown as r,Check as t,SquareArrowOutUpRight as a,Loader2 as d}from"lucide-react";import s from"./CustomChatCrRedirection.module.css.js";import c from"../ai-reasoning/AiReasoningCitationContent.js";import u from"../../icons/CognitiveDecision.js";import{Tooltip as p}from"@mui/material";function v({isDefaultOpen:v,processItemId:m,isCompleted:g,mode:h,msg:y,type:f,id:C,aiReason:D,text:b,headerText:x,decisionStrength:I,statusUi:N,panelRef:T,onHandleSend:S,onRedirectClick:k,gapType:j,isGenerating:R=!1,customStyles:B,customIcons:W,cognitiveDecisionHeaders:P,metaData:H}){const[$,z]=l(v),A=(null==W?void 0:W.highConfidence)||e(u,{}),O=()=>{R||null==k||k({type:f,id:C,aiReason:D,msg:y,meta:{headerText:x,decisionStrength:I,text:b}})},F=()=>{"cra"===h?null==S||S(`Discuss ambiguities on ${b}`,C,H):null==S||S(`Deep Dive into ${j} ${x}: ${b}`,C,H)};return i("div",{className:[s.outerWrapper,R?s.outerWrapperDisabled:""].join(" "),style:{...null==B?void 0:B.redirectionOuterWrapper,...R?null==B?void 0:B.redirectionOuterWrapperDisabled:{}},children:[i("div",{className:[s.card,R?s.cardDisabled:s.cardInteractive].join(" "),style:{...null==B?void 0:B.redirectionCard,...R?null==B?void 0:B.redirectionCardDisabled:null==B?void 0:B.redirectionCardInteractive},children:[i("div",{className:s.leftSide,style:null==B?void 0:B.redirectionLeftSide,children:[e(p,{title:x+" "+b,placement:"top",slotProps:{tooltip:{sx:{...null==B?void 0:B.headerTooltip}}},children:i("span",{className:s.textBlock,style:null==B?void 0:B.redirectionTextBlock,children:[x&&i("span",{className:s.headerText,style:null==B?void 0:B.redirectionHeaderText,children:[x,b?" ":""]}),b]})}),i("span",{onClick:e=>{e.stopPropagation(),R||z(!$)},className:[s.reasoningToggle,R?s.reasoningToggleDisabled:s.reasoningToggleActive].join(" "),style:{...null==B?void 0:B.reasoningToggle,...R?null==B?void 0:B.reasoningToggleDisabled:null==B?void 0:B.reasoningToggleActive},children:[A,e($?n:r,{className:s.chevronIcon,style:null==B?void 0:B.chevronIcon})]})]}),g?e("div",{className:s.completeTickWrapper,style:null==B?void 0:B.completeTickWrapper,children:e(t,{color:(null==B?void 0:B.checkColor)||"green"})}):i(o,{children:["risk-gap"===h&&i("div",{className:s.rightSide,style:null==B?void 0:B.redirectionRightSide,children:[e("button",{disabled:R,className:[s.fixButton,R?s.fixButtonDisabled:""].join(" "),style:{...null==B?void 0:B.redirectionFixButton,...R?null==B?void 0:B.fixButtonDisabled:{}},onClick:e=>{e.stopPropagation(),R||F()},children:"Fix"}),e(a,{onClick:R?void 0:O,size:18,className:[R?s.redirectIconDisabled:s.redirectIcon].join(" "),style:{...R?null==B?void 0:B.redirectIconDisabled:null==B?void 0:B.redirectIcon}})]}),"cra"===h&&!v&&e("div",{className:s.rightSide,style:null==B?void 0:B.redirectionRightSide,children:m===C?e("div",{className:s.loaderWrapper,style:null==B?void 0:B.loaderWrapper,children:e(d,{size:16,className:s.loaderIcon,color:"grey",style:{animation:"spin 1s linear infinite",...null==B?void 0:B.loaderIcon}})}):e("button",{className:[s.clarifyButton].join(" "),style:{color:R?"grey":"",...null==B?void 0:B.redirectionClarifyButton},disabled:R,onClick:e=>{e.stopPropagation(),F()},children:"Clarify"})}),"cra"===h&&(null==D?void 0:D.highlight)&&(null==D?void 0:D.path)&&e(a,{onClick:R?void 0:O,size:18,className:[R?s.redirectIconDisabled:s.redirectIcon].join(" "),style:{...R?null==B?void 0:B.redirectIconDisabled:null==B?void 0:B.redirectIcon}})]})]}),$&&e(c,{label:"cra"===h?"Clarify":"Select this option",aiReason:{id:"1",reason:(null==D?void 0:D.Reasoning)||"",gap:(null==D?void 0:D.Gap)||"",relevance_score:Number(null==D?void 0:D.Confidence_score),explanation:(null==D?void 0:D.explanation)||""},onSelectProceed:F,customStyles:null==B?void 0:B.aiReasoningStyles,customIcons:W,cognitiveDecisionHeaders:P})]})}export{v as CustomChatCrRedirection};
2
2
  //# sourceMappingURL=CustomChatCrRedirection.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@e-llm-studio/requirement-ai",
3
- "version": "0.0.355",
3
+ "version": "0.0.356",
4
4
  "author": "Saptyadeep Bhattacharjee",
5
5
  "description": "",
6
6
  "license": "MIT",