@e-llm-studio/requirement-ai 0.0.336 → 0.0.339

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 i=require("react/jsx-runtime"),t=require("react"),e=require("react-markdown"),n=require("rehype-raw"),o=require("lucide-react"),a=require("@mui/material"),l=require("./AiReasonMarkdownWrapper.module.css.js"),d=require("../../shared/ExpandableOl.js"),c=require("../citations/web-citation/WebCitationWithImageRenderer.js"),s=require("../citations/web-citation/WebCitationRenderer.js"),u=require("../citations/image-citation/ImageCitationRenderer.js"),r=require("../citations/file-citation/FileCitationRender.js"),m=require("../RequirementAIWrapper/RequirementAIWrapper.js"),v=require("../citations/stormee-citation/StormeeCitationRenderer.js"),p=require("../citations/audio-citation/WaveformCitationRenderer.js"),_=require("../citations/appmod-citation/AppmodCitationRenderer.js"),h=require("../citations/rca-citation/RCACitationRenderer.js"),f=require("../citations/readfile-citation/ReadFileCitationRenderer.js"),g=require("../citations/chat-citation/ChatCitationRenderer.js"),C=require("@e-llm-studio/citation"),b=require("../citations/big-enough/BigEnoughCitationRenderer.js"),j=require("./ScannedCitationRenderer.js"),x=require("../citations/gpt-web-citation/GptWebCitationRenderer.js");function y(i){return i&&"object"==typeof i&&"default"in i?i:{default:i}}var S=y(e),I=y(n);const M=["appmode_citation","appmode_citations","appmod_citation","appmod_citations","image_citation","image_citations","audio_citation","audio_citations","document_citation","document_citations","rca_citation","rca_citations","web_citation","web_citations","code_generated","chat_citation","readfile_citation","readfile_citations","gpt_citation","gpt_citations","big_enough_block","scanned_doc_citation","scanned_doc_citations"],k=(i,t,e)=>{const n=Number.isFinite(t)&&Number.isFinite(e);return[...i.map((i,o)=>{const a=o>=t&&o<=e;return{...i,highlighted_text:n?a?i.message:"":i.highlighted_text}})]};exports.AiReasonMarkdownWrapper=({label:e,message:n,isExpandableOrderedListEnabled:y,customStyles:w,citationStyles:q,customIcons:R,onSelectProceed:F,isDisableProceedButton:N,big_enough_block:D,aiReason:O})=>{const L=t.useRef(null),{citations:W,citationConfig:P,chatHistory:$,onFetchOnDemandCitation:A,chatCitationConfigs:T,gptCitationConfigs:E}=m.useRequirementAI(),H=async(i,t,e,n)=>{if(A)try{await A(i,t,e,n||"","reasoning")}catch(t){console.error(`[On-Demand Fetch Error] Failed to load citation ${i}:`,t)}},U=t.useMemo(()=>({h1:({node:t,...e})=>i.jsx("h1",{className:l.default.h1,style:null==w?void 0:w.h1,children:null==e?void 0:e.children}),h2:({node:t,...e})=>i.jsx("h2",{className:l.default.h2,style:null==w?void 0:w.h2,children:null==e?void 0:e.children}),h3:({node:t,...e})=>i.jsx("h2",{className:l.default.h3,style:null==w?void 0:w.h3,children:null==e?void 0:e.children}),b:({node:t,...e})=>i.jsx("b",{className:l.default.bold,style:null==w?void 0:w.b}),p:({node:t,...e})=>i.jsx("p",{...e,className:l.default.paragraph,style:null==w?void 0:w.p,children:null==e?void 0:e.children}),ol:({node:t,...n})=>y?i.jsx(d.default,{label:e,customStyles:null==w?void 0:w.expandOlStyle,onProceed:F,isProceedDisabled:N,aiReasoningCitation:W,citationStyles:q,customIcons:R,aiReason:O,children:null==n?void 0:n.children}):i.jsx("ol",{className:l.default.orderedList,style:null==w?void 0:w.ol,children:null==n?void 0:n.children}),ul:({node:t,...e})=>i.jsx("ul",{className:l.default.unorderedList,children:null==e?void 0:e.children}),a:({inline:e,children:d,node:m,...y})=>{var S,I,F,N,L,A,U,z,G,B,V,X,J,K,Q,Y,Z,ii,ti,ei,ni,oi,ai,li,di,ci,si,ui,ri;const mi="true"===(null==y?void 0:y.table),vi=`${null==y?void 0:y.href}`,[pi,_i=""]=vi.split("$"),[hi,fi=""]=_i.split("?"),gi=null==y?void 0:y.source,Ci=new URLSearchParams(vi.split("?")[1]).get("on_demand"),bi="string"==typeof Ci&&""!==Ci.trim()?Ci:null,ji="citation-fetch-strategy"in y&&"on-demand"===y["citation-fetch-strategy"],xi="appmode_citation"===pi||"appmode_citations"===pi?(null==W?void 0:W.appmod_citations)||[]:"image_citation"===pi||"image_citations"===pi?(null==W?void 0:W.image_citations)||[]:"audio_citation"===pi||"audio_citations"===pi?(null==W?void 0:W.audio_citations)||[]:"document_citation"===pi||"document_citations"===pi?(null==W?void 0:W.file_citations)||[]:"rca_citation"===pi||"rca_citations"===pi?(null==W?void 0:W.rca_citations)||[]:"web_citation"===pi||"web_citations"===pi?(null==W?void 0:W.web_citations)||[]:"code_generated"===pi?(null==W?void 0:W.code_generated)||[]:"readfile_citation"===pi||"readfile_citations"===pi?(null==W?void 0:W.readfile_citations)||[]:"gpt_citation"===pi||"gpt_citations"===pi?(null==W?void 0:W.gpt_citations)||[]:"scanned_doc_citation"===pi||"scanned_doc_citations"===pi?(null==W?void 0:W.scanned_doc_citations)||[]:"big_enough_block"===pi&&D||[];console.log("citation?.customMetadata?.value",xi,W);const yi=xi.find(i=>i.citation_number===decodeURIComponent(hi)),Si=M.includes(pi);if("big_enough_block"===pi&&yi)return i.jsx(b.default,{title:d,citation:yi,customStyles:null==q?void 0:q.bigEnoughCitation,customIcons:R});if("chat_citation"===pi){if(!$||0===$.length)return null;let t=0,e=$.length-1;if("all"!==hi){const[i,n]=hi.split("-").map(Number);t=Number.isFinite(i)?i:0,e=Number.isFinite(n)?n:t,t=t>0?t-1:t,e=e<$.length-1?e+1:e}return i.jsx(g.default,{customIcon:null==R?void 0:R.chatCitationIcon,title:d,chatHistory:k($,t,e),isTable:mi,chatCitationProps:null==T?void 0:T.chatCitationProps,onCitationClick:null==T?void 0:T.handleCitationClicked,customStyles:null==q?void 0:q.chatCitation,openInFullscreenOnClick:null==T?void 0:T.openInFullscreenOnClick})}if(("gpt_citation"===pi||"gpt_citations"===pi)&&yi)return(null===(S=null==yi?void 0:yi.customMetadata)||void 0===S?void 0:S.value)?i.jsx(x.default,{title:d,citation:yi,customStyles:null==q?void 0:q.webCitation,customIcons:R,content:n}):i.jsx(C.NonWebReasoningComponent,{item:{text:"",dataSource:null===(F=null===(I=yi.customMetadata)||void 0===I?void 0:I.data_sources)||void 0===F?void 0:F[0],trainingDataTitle:null===(L=null===(N=yi.customMetadata)||void 0===N?void 0:N.training_data_title)||void 0===L?void 0:L[0],paraphrase:null===(U=null===(A=yi.customMetadata)||void 0===A?void 0:A.paraphrase)||void 0===U?void 0:U[0]},headerTitle:(null==E?void 0:E.title)||"GPT - Gemini 2.5 Flash",iconsConfig:{ChevronDownIcon:o.ChevronDown,ChevronUpIcon:o.ChevronUp,MaximizeIcon:o.Maximize2,CloseIcon:o.X},...null==E?void 0:E.gptCitationProps});if("web_citation"===(null===(z=null==yi?void 0:yi.customMetadata)||void 0===z?void 0:z.type)||pi.includes("web_citation"))return(null===(G=null==yi?void 0:yi.customMetadata)||void 0===G?void 0:G.screenshot_url)||pi.includes("web_citation")&&bi?i.jsx(c.default,{title:d,citation:yi||{citation_number:hi,isLoading:!0},customStyles:null==q?void 0:q.webCitation,customIcons:R,fetchOnDemandCitation:()=>{H(hi,O,pi,gi)}}):i.jsx(s.default,{label:d,url:null===(B=null==yi?void 0:yi.customMetadata)||void 0===B?void 0:B.link,customStyles:null==q?void 0:q.webCitation,customIcons:R,fetchOnDemandCitation:()=>{H(hi,O,pi,gi)}});if("audio_transcript"===(null===(V=null==yi?void 0:yi.customMetadata)||void 0===V?void 0:V.type)||pi.includes("audio_citation"))return"stormee"===(null===(X=null==yi?void 0:yi.customMetadata)||void 0===X?void 0:X.audio_citation_mode)?i.jsx(t.Suspense,{fallback:i.jsx(i.Fragment,{}),children:i.jsx(v.default,{title:`${d}`,citation:yi,customStyles:null==q?void 0:q.stormeeCitation,customIcons:R})}):i.jsx(t.Suspense,{fallback:i.jsx(i.Fragment,{}),children:i.jsx(p.default,{title:`${d}`,citation:yi||{citation_number:hi},customStyles:null==q?void 0:q.waveformCitation,customIcons:R,fetchOnDemandCitation:()=>{H(hi,O,pi,gi)}})});if("scanned_doc_citations"===(null===(J=null==yi?void 0:yi.customMetadata)||void 0===J?void 0:J.type)||"scanned_doc_citation"===(null===(K=null==yi?void 0:yi.customMetadata)||void 0===K?void 0:K.type)||"scanned_doc_citation"===pi&&ji)return console.log("citation?.customMetadata?.value::1",yi),i.jsx(t.Suspense,{fallback:i.jsx(i.Fragment,{}),children:i.jsx(j.default,{title:d,citation:yi||{citation_number:hi,isLoading:!0},customIcons:R,customStyles:null==q?void 0:q.scannedDocumentCitation,pdfViewHeaderAction:null==P?void 0:P.pdfViewHeaderAction,fetchOnDemandCitation:()=>{H(hi,O,pi)}})});if("image_citation"===(null===(Q=null==yi?void 0:yi.customMetadata)||void 0===Q?void 0:Q.type)||pi.includes("image_citation"))return i.jsx(t.Suspense,{fallback:i.jsx(i.Fragment,{}),children:i.jsx(u.default,{title:`${d}`,citation:yi||{citation_number:hi,isLoading:!0},customIcons:R,customStyles:null==q?void 0:q.imageCitation,fetchOnDemandCitation:()=>{H(hi,O,pi,gi)}})});if("book_citation_doc"===(null===(Y=null==yi?void 0:yi.customMetadata)||void 0===Y?void 0:Y.type)||"book_citation_pdf"===(null==yi?void 0:yi.customMetadata.type)||pi.includes("document_citation"))return i.jsx(t.Suspense,{fallback:i.jsx(i.Fragment,{}),children:i.jsx(r.default,{title:`${d}`,citation:yi||{citation_number:hi,customMetadata:{type:"book_citation_pdf"}},customIcons:R,customStyles:null==q?void 0:q.fileCitation,fetchOnDemandCitation:()=>{H(hi,O,pi,gi)}})});if("app_mod_rag_question"===(null===(Z=null==yi?void 0:yi.customMetadata)||void 0===Z?void 0:Z.type)||pi.includes("appmode_citation"))return i.jsx(t.Suspense,{fallback:i.jsx(i.Fragment,{}),children:i.jsx(_.default,{title:`${d}`,citation:yi||{citation_number:hi,isLoading:!0},customIcons:R,customStyles:null==q?void 0:q.appModCitation,codeLinkConfig:null===(ii=null==P?void 0:P.appMod)||void 0===ii?void 0:ii.codeLinkConfig,isLoading:null===(ti=null==P?void 0:P.appMod)||void 0===ti?void 0:ti.isLoading,fetchOnDemandCitation:()=>{H(hi,O,pi,gi)}})});if("rca_citation"===(null===(ei=null==yi?void 0:yi.customMetadata)||void 0===ei?void 0:ei.type))return i.jsx(t.Suspense,{fallback:i.jsx(i.Fragment,{}),children:i.jsx(h.default,{title:`${d}`,citation:yi,customIcons:R,customStyles:null==q?void 0:q.rcaCitation})});if("readfile_citation"===(null===(ni=null==yi?void 0:yi.customMetadata)||void 0===ni?void 0:ni.type)||pi.includes("readfile_citation"))return i.jsx(t.Suspense,{fallback:i.jsx(i.Fragment,{}),children:i.jsx(f.default,{title:`${d}`,citation:yi||{citation_number:hi},customIcons:R,customStyles:null==q?void 0:q.readFileCitation,fileCallback:null===(oi=null==P?void 0:P.readFile)||void 0===oi?void 0:oi.fileCallback,editorConfig:null===(ai=null==P?void 0:P.readFile)||void 0===ai?void 0:ai.editorConfig,customColors:null===(li=null==P?void 0:P.readFile)||void 0===li?void 0:li.customColors,fetchOnDemandCitation:()=>{H(hi,O,pi)}})});if(Si&&!yi){const t=null!==(di=null==R?void 0:R.citationLoadingIcon)&&void 0!==di?di:i.jsx("span",{className:l.default.citationSpinner,style:null===(ci=null==q?void 0:q.loadingCitations)||void 0===ci?void 0:ci.citationSpinner});return i.jsx(a.Tooltip,{title:null!==(ui=null===(si=null==q?void 0:q.loadingCitations)||void 0===si?void 0:si.tooltipTitle)&&void 0!==ui?ui:`source ${pi.split("_")[0]} citations`,arrow:!0,children:i.jsxs("span",{className:l.default.citationSpinnerWrapper,style:null===(ri=null==q?void 0:q.loadingCitations)||void 0===ri?void 0:ri.citationSpinnerWrapper,children:[d,t]})})}return i.jsx("span",{...y,className:l.default.paragraph,style:null==w?void 0:w.p,children:null==y?void 0:y.children})},code:({inline:t,children:e,className:n,node:o,...a})=>/language-(\w+)/.exec(n||"")||(null==n?void 0:n.includes("language-"))?i.jsx("div",{children:i.jsx("code",{className:l.default.blockCode,children:e})}):i.jsx("code",{className:l.default.inlineCode,style:null==w?void 0:w.code,children:e}),learned:({children:t})=>i.jsx(i.Fragment,{children:i.jsx(a.Tooltip,{title:t,placement:"top",children:i.jsx(o.Info,{size:16,className:l.default.learnedIcon})})})}),[W,y,P,$,D]);return i.jsx("div",{ref:L,className:"w-full",children:i.jsx(S.default,{components:U,rehypePlugins:[I.default],children:n})})},exports.formatChatData=k;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var i=require("react/jsx-runtime"),t=require("react"),e=require("react-markdown"),n=require("rehype-raw"),o=require("lucide-react"),a=require("@mui/material"),l=require("./AiReasonMarkdownWrapper.module.css.js"),d=require("../../shared/ExpandableOl.js"),c=require("../citations/web-citation/WebCitationWithImageRenderer.js"),s=require("../citations/web-citation/WebCitationRenderer.js"),u=require("../citations/image-citation/ImageCitationRenderer.js"),r=require("../citations/file-citation/FileCitationRender.js"),m=require("../RequirementAIWrapper/RequirementAIWrapper.js"),v=require("../citations/stormee-citation/StormeeCitationRenderer.js"),p=require("../citations/audio-citation/WaveformCitationRenderer.js"),_=require("../citations/appmod-citation/AppmodCitationRenderer.js"),h=require("../citations/rca-citation/RCACitationRenderer.js"),f=require("../citations/readfile-citation/ReadFileCitationRenderer.js"),g=require("../citations/chat-citation/ChatCitationRenderer.js"),C=require("@e-llm-studio/citation"),b=require("../citations/big-enough/BigEnoughCitationRenderer.js"),j=require("./ScannedCitationRenderer.js"),x=require("../citations/gpt-web-citation/GptWebCitationRenderer.js");function y(i){return i&&"object"==typeof i&&"default"in i?i:{default:i}}var S=y(e),I=y(n);const M=["appmode_citation","appmode_citations","appmod_citation","appmod_citations","image_citation","image_citations","audio_citation","audio_citations","document_citation","document_citations","rca_citation","rca_citations","web_citation","web_citations","code_generated","chat_citation","readfile_citation","readfile_citations","gpt_citation","gpt_citations","big_enough_block","scanned_doc_citation","scanned_doc_citations"],k=(i,t,e)=>{const n=Number.isFinite(t)&&Number.isFinite(e);return[...i.map((i,o)=>{const a=o>=t&&o<=e;return{...i,highlighted_text:n?a?i.message:"":i.highlighted_text}})]};exports.AiReasonMarkdownWrapper=({label:e,message:n,isExpandableOrderedListEnabled:y,customStyles:w,citationStyles:q,customIcons:R,onSelectProceed:F,isDisableProceedButton:N,big_enough_block:D,aiReason:O})=>{const L=t.useRef(null),{citations:W,citationConfig:P,chatHistory:$,onFetchOnDemandCitation:A,chatCitationConfigs:T,gptCitationConfigs:E}=m.useRequirementAI(),H=async(i,t,e,n)=>{if(A)try{await A(i,t,e,n||"","reasoning")}catch(t){console.error(`[On-Demand Fetch Error] Failed to load citation ${i}:`,t)}},U=t.useMemo(()=>({h1:({node:t,...e})=>i.jsx("h1",{className:l.default.h1,style:null==w?void 0:w.h1,children:null==e?void 0:e.children}),h2:({node:t,...e})=>i.jsx("h2",{className:l.default.h2,style:null==w?void 0:w.h2,children:null==e?void 0:e.children}),h3:({node:t,...e})=>i.jsx("h2",{className:l.default.h3,style:null==w?void 0:w.h3,children:null==e?void 0:e.children}),b:({node:t,...e})=>i.jsx("b",{className:l.default.bold,style:null==w?void 0:w.b}),p:({node:t,...e})=>i.jsx("p",{...e,className:l.default.paragraph,style:null==w?void 0:w.p,children:null==e?void 0:e.children}),ol:({node:t,...n})=>y?i.jsx(d.default,{label:e,customStyles:null==w?void 0:w.expandOlStyle,onProceed:F,isProceedDisabled:N,aiReasoningCitation:W,citationStyles:q,customIcons:R,aiReason:O,children:null==n?void 0:n.children}):i.jsx("ol",{className:l.default.orderedList,style:null==w?void 0:w.ol,children:null==n?void 0:n.children}),ul:({node:t,...e})=>i.jsx("ul",{className:l.default.unorderedList,children:null==e?void 0:e.children}),a:({inline:e,children:d,node:m,...y})=>{var S,I,F,N,L,A,U,z,G,B,V,X,J,K,Q,Y,Z,ii,ti,ei,ni,oi,ai,li,di,ci,si,ui,ri;const mi="true"===(null==y?void 0:y.table),vi=`${null==y?void 0:y.href}`,[pi,_i=""]=vi.split("$"),[hi,fi=""]=_i.split("?"),gi=null==y?void 0:y.source;console.log("testing::props",y,null==y?void 0:y.id);const Ci=null==y?void 0:y.id,bi=new URLSearchParams(vi.split("?")[1]).get("on_demand"),ji="string"==typeof bi&&""!==bi.trim()?bi:null,xi="citation-fetch-strategy"in y&&"on-demand"===y["citation-fetch-strategy"],yi="appmode_citation"===pi||"appmode_citations"===pi?(null==W?void 0:W.appmod_citations)||[]:"image_citation"===pi||"image_citations"===pi?(null==W?void 0:W.image_citations)||[]:"audio_citation"===pi||"audio_citations"===pi?(null==W?void 0:W.audio_citations)||[]:"document_citation"===pi||"document_citations"===pi?(null==W?void 0:W.file_citations)||[]:"rca_citation"===pi||"rca_citations"===pi?(null==W?void 0:W.rca_citations)||[]:"web_citation"===pi||"web_citations"===pi?(null==W?void 0:W.web_citations)||[]:"code_generated"===pi?(null==W?void 0:W.code_generated)||[]:"readfile_citation"===pi||"readfile_citations"===pi?(null==W?void 0:W.readfile_citations)||[]:"gpt_citation"===pi||"gpt_citations"===pi?(null==W?void 0:W.gpt_citations)||[]:"scanned_doc_citation"===pi||"scanned_doc_citations"===pi?(null==W?void 0:W.scanned_doc_citations)||[]:"big_enough_block"===pi&&D||[];console.log("citation?.customMetadata?.value",yi,W);const Si=yi.find(i=>i.citation_number===decodeURIComponent(hi)),Ii=M.includes(pi);if("big_enough_block"===pi&&Si)return i.jsx(b.default,{title:d,citation:Si,customStyles:null==q?void 0:q.bigEnoughCitation,customIcons:R});if("chat_citation"===pi){if(!$||0===$.length)return null;let t=0,e=$.length-1;if("all"!==hi){const[i,n]=hi.split("-").map(Number);t=Number.isFinite(i)?i:0,e=Number.isFinite(n)?n:t,t=t>0?t-1:t,e=e<$.length-1?e+1:e}return i.jsx(g.default,{customIcon:null==R?void 0:R.chatCitationIcon,title:d,chatHistory:k($,t,e),isTable:mi,chatCitationProps:null==T?void 0:T.chatCitationProps,onCitationClick:null==T?void 0:T.handleCitationClicked,customStyles:null==q?void 0:q.chatCitation,openInFullscreenOnClick:null==T?void 0:T.openInFullscreenOnClick})}if(("gpt_citation"===pi||"gpt_citations"===pi)&&Si)return(null===(S=null==Si?void 0:Si.customMetadata)||void 0===S?void 0:S.value)?i.jsx(x.default,{title:d,citation:Si,customStyles:null==q?void 0:q.webCitation,customIcons:R,content:n}):i.jsx(C.NonWebReasoningComponent,{item:{text:"",dataSource:null===(F=null===(I=Si.customMetadata)||void 0===I?void 0:I.data_sources)||void 0===F?void 0:F[0],trainingDataTitle:null===(L=null===(N=Si.customMetadata)||void 0===N?void 0:N.training_data_title)||void 0===L?void 0:L[0],paraphrase:null===(U=null===(A=Si.customMetadata)||void 0===A?void 0:A.paraphrase)||void 0===U?void 0:U[0]},headerTitle:(null==E?void 0:E.title)||"GPT - Gemini 2.5 Flash",iconsConfig:{ChevronDownIcon:o.ChevronDown,ChevronUpIcon:o.ChevronUp,MaximizeIcon:o.Maximize2,CloseIcon:o.X},...null==E?void 0:E.gptCitationProps});if("web_citation"===(null===(z=null==Si?void 0:Si.customMetadata)||void 0===z?void 0:z.type)||pi.includes("web_citation"))return(null===(G=null==Si?void 0:Si.customMetadata)||void 0===G?void 0:G.screenshot_url)||pi.includes("web_citation")&&ji?i.jsx(c.default,{title:d,citation:Si||{citation_number:hi,isLoading:!0},customStyles:null==q?void 0:q.webCitation,customIcons:R,fetchOnDemandCitation:()=>{H(hi,O,pi,gi)}}):i.jsx(s.default,{label:d,url:null===(B=null==Si?void 0:Si.customMetadata)||void 0===B?void 0:B.link,customStyles:null==q?void 0:q.webCitation,customIcons:R,fetchOnDemandCitation:()=>{H(hi,O,pi,gi)}});if("audio_transcript"===(null===(V=null==Si?void 0:Si.customMetadata)||void 0===V?void 0:V.type)||pi.includes("audio_citation"))return"stormee"===(null===(X=null==Si?void 0:Si.customMetadata)||void 0===X?void 0:X.audio_citation_mode)?i.jsx(t.Suspense,{fallback:i.jsx(i.Fragment,{}),children:i.jsx(v.default,{title:`${d}`,citation:Si,customStyles:null==q?void 0:q.stormeeCitation,customIcons:R})}):i.jsx(t.Suspense,{fallback:i.jsx(i.Fragment,{}),children:i.jsx(p.default,{title:`${d}`,citation:Si||{citation_number:hi},customStyles:null==q?void 0:q.waveformCitation,customIcons:R,fetchOnDemandCitation:()=>{H(hi,O,pi,gi)}})});if("scanned_doc_citations"===(null===(J=null==Si?void 0:Si.customMetadata)||void 0===J?void 0:J.type)||"scanned_doc_citation"===(null===(K=null==Si?void 0:Si.customMetadata)||void 0===K?void 0:K.type)||"scanned_doc_citation"===pi&&xi)return console.log("citation?.customMetadata?.value::1",Si),i.jsx(t.Suspense,{fallback:i.jsx(i.Fragment,{}),children:i.jsx(j.default,{title:d,citation:Si||{citation_number:hi,isLoading:!0},customIcons:R,customStyles:null==q?void 0:q.scannedDocumentCitation,pdfViewHeaderAction:null==P?void 0:P.pdfViewHeaderAction,fetchOnDemandCitation:()=>{H(Ci,O,pi)}})});if("image_citation"===(null===(Q=null==Si?void 0:Si.customMetadata)||void 0===Q?void 0:Q.type)||pi.includes("image_citation"))return i.jsx(t.Suspense,{fallback:i.jsx(i.Fragment,{}),children:i.jsx(u.default,{title:`${d}`,citation:Si||{citation_number:hi,isLoading:!0},customIcons:R,customStyles:null==q?void 0:q.imageCitation,fetchOnDemandCitation:()=>{H(hi,O,pi,gi)}})});if("book_citation_doc"===(null===(Y=null==Si?void 0:Si.customMetadata)||void 0===Y?void 0:Y.type)||"book_citation_pdf"===(null==Si?void 0:Si.customMetadata.type)||pi.includes("document_citation"))return i.jsx(t.Suspense,{fallback:i.jsx(i.Fragment,{}),children:i.jsx(r.default,{title:`${d}`,citation:Si||{citation_number:hi,customMetadata:{type:"book_citation_pdf"}},customIcons:R,customStyles:null==q?void 0:q.fileCitation,fetchOnDemandCitation:()=>{H(hi,O,pi,gi)}})});if("app_mod_rag_question"===(null===(Z=null==Si?void 0:Si.customMetadata)||void 0===Z?void 0:Z.type)||pi.includes("appmode_citation"))return i.jsx(t.Suspense,{fallback:i.jsx(i.Fragment,{}),children:i.jsx(_.default,{title:`${d}`,citation:Si||{citation_number:hi,isLoading:!0},customIcons:R,customStyles:null==q?void 0:q.appModCitation,codeLinkConfig:null===(ii=null==P?void 0:P.appMod)||void 0===ii?void 0:ii.codeLinkConfig,isLoading:null===(ti=null==P?void 0:P.appMod)||void 0===ti?void 0:ti.isLoading,fetchOnDemandCitation:()=>{H(hi,O,pi,gi)}})});if("rca_citation"===(null===(ei=null==Si?void 0:Si.customMetadata)||void 0===ei?void 0:ei.type))return i.jsx(t.Suspense,{fallback:i.jsx(i.Fragment,{}),children:i.jsx(h.default,{title:`${d}`,citation:Si,customIcons:R,customStyles:null==q?void 0:q.rcaCitation})});if("readfile_citation"===(null===(ni=null==Si?void 0:Si.customMetadata)||void 0===ni?void 0:ni.type)||pi.includes("readfile_citation"))return i.jsx(t.Suspense,{fallback:i.jsx(i.Fragment,{}),children:i.jsx(f.default,{title:`${d}`,citation:Si||{citation_number:hi},customIcons:R,customStyles:null==q?void 0:q.readFileCitation,fileCallback:null===(oi=null==P?void 0:P.readFile)||void 0===oi?void 0:oi.fileCallback,editorConfig:null===(ai=null==P?void 0:P.readFile)||void 0===ai?void 0:ai.editorConfig,customColors:null===(li=null==P?void 0:P.readFile)||void 0===li?void 0:li.customColors,fetchOnDemandCitation:()=>{H(hi,O,pi)}})});if(Ii&&!Si){const t=null!==(di=null==R?void 0:R.citationLoadingIcon)&&void 0!==di?di:i.jsx("span",{className:l.default.citationSpinner,style:null===(ci=null==q?void 0:q.loadingCitations)||void 0===ci?void 0:ci.citationSpinner});return i.jsx(a.Tooltip,{title:null!==(ui=null===(si=null==q?void 0:q.loadingCitations)||void 0===si?void 0:si.tooltipTitle)&&void 0!==ui?ui:`source ${pi.split("_")[0]} citations`,arrow:!0,children:i.jsxs("span",{className:l.default.citationSpinnerWrapper,style:null===(ri=null==q?void 0:q.loadingCitations)||void 0===ri?void 0:ri.citationSpinnerWrapper,children:[d,t]})})}return i.jsx("span",{...y,className:l.default.paragraph,style:null==w?void 0:w.p,children:null==y?void 0:y.children})},code:({inline:t,children:e,className:n,node:o,...a})=>/language-(\w+)/.exec(n||"")||(null==n?void 0:n.includes("language-"))?i.jsx("div",{children:i.jsx("code",{className:l.default.blockCode,children:e})}):i.jsx("code",{className:l.default.inlineCode,style:null==w?void 0:w.code,children:e}),learned:({children:t})=>i.jsx(i.Fragment,{children:i.jsx(a.Tooltip,{title:t,placement:"top",children:i.jsx(o.Info,{size:16,className:l.default.learnedIcon})})})}),[W,y,P,$,D]);return i.jsx("div",{ref:L,className:"w-full",children:i.jsx(S.default,{components:U,rehypePlugins:[I.default],children:n})})},exports.formatChatData=k;
2
2
  //# sourceMappingURL=AiReasonMarkdownWrapper.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),o=require("react"),i=require("../../icons/BigEnoughIcon.js"),n=require("../ai-reasoning/AiReasoningCitationContent.js"),l=require("../RequirementAIWrapper/RequirementAIWrapper.js"),s=require("./BigEnoughPanel.module.css.js");exports.BigEnoughPanel=({customIcons:r,customStyles:t,currentUserStory:c,panelStyles:a,showPanel:u=!1})=>{var d,v,g,_,p,h;l.useRequirementAI();const[y,m]=o.useState(!!u),f=o.useRef(null);return e.jsxs("div",{onClick:e=>e.stopPropagation(),children:[!u&&e.jsx("button",{ref:f,className:s.default.developerEffortButton,style:null==a?void 0:a.buttonStyle,onClick:e=>{e.stopPropagation(),m(e=>!e)},children:e.jsx(i.default,{color:null==a?void 0:a.iconColor,size:null==a?void 0:a.iconSize})}),y&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:null===s.default||void 0===s.default?void 0:s.default.backdrop,style:u?null==a?void 0:a.showPanelBackdropStyles:null==a?void 0:a.backdropStyle,onClick:e=>{e.stopPropagation(),m(!1)},onWheel:e=>e.stopPropagation()}),e.jsxs("div",{className:`${s.default.dropdown} ${u?s.default.showPanelDropdown:""}`,style:{...null==a?void 0:a.dropdownStyle,...u?null==a?void 0:a.showPanelDropdownStyle:{}},children:[e.jsx(n.default,{cognitiveDecisionHeaders:{mainHeader:`Feature Implementation Score - ${(null==c?void 0:c.big_enough)||0}`},big_enough_block:null===(d=c.big_enough_decision_factors)||void 0===d?void 0:d.big_enough_block,aiReason:{relevance_score:(null===(v=null==c?void 0:c.big_enough_decision_factors)||void 0===v?void 0:v.relevance_score)||0,reason:(null===(g=null==c?void 0:c.big_enough_decision_factors)||void 0===g?void 0:g.score_reason)||"",gap:(null===(_=null==c?void 0:c.big_enough_decision_factors)||void 0===_?void 0:_.gap)||"",id:"big-enough-cd"},customIcons:r,customStyles:t}),(null==c?void 0:c.technicality_score)&&e.jsx(n.default,{cognitiveDecisionHeaders:{mainHeader:`Technicality Score - ${(null==c?void 0:c.technicality_score.score)||0}`},scenario:"technicality_score",aiReason:{relevance_score:Number((null===(p=null==c?void 0:c.technicality_score)||void 0===p?void 0:p.relevance_score)||-1),reason:(null==c?void 0:c.technicality_score.reasoning)||"",gap:(null===(h=null==c?void 0:c.technicality_score)||void 0===h?void 0:h.gap)||"",id:"big-enough-cd"},customIcons:r,customStyles:t})]})]})]})};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),o=require("react"),i=require("../../icons/BigEnoughIcon.js"),n=require("../ai-reasoning/AiReasoningCitationContent.js"),l=require("../RequirementAIWrapper/RequirementAIWrapper.js"),s=require("./BigEnoughPanel.module.css.js");exports.BigEnoughPanel=({customIcons:r,customStyles:t,currentUserStory:c,panelStyles:a,showPanel:u=!1})=>{var d,v,g,_,h,p;l.useRequirementAI();const[m,y]=o.useState(!!u),f=o.useRef(null);return e.jsxs("div",{onClick:e=>e.stopPropagation(),children:[!u&&e.jsx("button",{ref:f,className:s.default.developerEffortButton,style:null==a?void 0:a.buttonStyle,onClick:e=>{e.stopPropagation(),y(e=>!e)},children:e.jsx(i.default,{color:null==a?void 0:a.iconColor,size:null==a?void 0:a.iconSize})}),m&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:null===s.default||void 0===s.default?void 0:s.default.backdrop,style:u?null==a?void 0:a.showPanelBackdropStyles:null==a?void 0:a.backdropStyle,onClick:e=>{e.stopPropagation(),y(!1)},onWheel:e=>e.stopPropagation()}),e.jsx("div",{className:`${s.default.dropdown} ${u?s.default.showPanelDropdown:""}`,style:{...null==a?void 0:a.dropdownStyle,...u?null==a?void 0:a.showPanelDropdownStyle:{}},children:e.jsxs("div",{className:s.default.scoreContent,children:[e.jsx(n.default,{cognitiveDecisionHeaders:{mainHeader:`Feature Implementation Score - ${(null==c?void 0:c.big_enough)||0}`},big_enough_block:null===(d=c.big_enough_decision_factors)||void 0===d?void 0:d.big_enough_block,aiReason:{relevance_score:(null===(v=null==c?void 0:c.big_enough_decision_factors)||void 0===v?void 0:v.relevance_score)||0,reason:(null===(g=null==c?void 0:c.big_enough_decision_factors)||void 0===g?void 0:g.score_reason)||"",gap:(null===(_=null==c?void 0:c.big_enough_decision_factors)||void 0===_?void 0:_.gap)||"",id:"big-enough-cd"},customIcons:r,customStyles:t}),(null==c?void 0:c.technicality_score)&&e.jsx(n.default,{cognitiveDecisionHeaders:{mainHeader:`Technicality Score - ${(null==c?void 0:c.technicality_score.score)||0}`},scenario:"technicality_score",aiReason:{relevance_score:Number((null===(h=null==c?void 0:c.technicality_score)||void 0===h?void 0:h.relevance_score)||-1),reason:(null==c?void 0:c.technicality_score.reasoning)||"",gap:(null===(p=null==c?void 0:c.technicality_score)||void 0===p?void 0:p.gap)||"",id:"big-enough-cd"},customIcons:r,customStyles:t})]})})]})]})};
2
2
  //# sourceMappingURL=BigEnoughPanel.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});!function(){if("undefined"==typeof document)return;const e=document.createElement("style");e.type="text/css";const o=window.__CSP_NONCE__||document.querySelector('meta[name="csp-nonce"]')?.content;o&&e.setAttribute("nonce",o),e.appendChild(document.createTextNode(".BigEnoughPanel-module_developerEffortButton__KLQ-Z{background-color:#fff;border:1px solid #d1d5db;border-radius:.3rem;box-shadow:0 1px 2px #0000000d;cursor:pointer;margin-right:3px;padding:.4rem .8rem}.BigEnoughPanel-module_backdrop__J0KVD{height:100vh;inset:0;position:absolute;width:100vw;z-index:40}.BigEnoughPanel-module_dropdown__mlBHL.BigEnoughPanel-module_showPanelDropdown__qz6dk{max-height:70vh;overflow-y:scroll;top:10px}.BigEnoughPanel-module_dropdown__mlBHL{background-color:#fff;border:1px solid #e5e7eb;border-radius:8px;left:20px;margin-top:1.25rem;position:absolute;top:100%;width:91.666667%;z-index:40}"));const n=document.head||document.getElementsByTagName("head")[0]||document.documentElement;n&&n.appendChild(e)}(),exports.default={developerEffortButton:"BigEnoughPanel-module_developerEffortButton__KLQ-Z",backdrop:"BigEnoughPanel-module_backdrop__J0KVD",dropdown:"BigEnoughPanel-module_dropdown__mlBHL",showPanelDropdown:"BigEnoughPanel-module_showPanelDropdown__qz6dk"};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});!function(){if("undefined"==typeof document)return;const e=document.createElement("style");e.type="text/css";const o=window.__CSP_NONCE__||document.querySelector('meta[name="csp-nonce"]')?.content;o&&e.setAttribute("nonce",o),e.appendChild(document.createTextNode(".BigEnoughPanel-module_developerEffortButton__KLQ-Z{background-color:#fff;border:1px solid #d1d5db;border-radius:.3rem;box-shadow:0 1px 2px #0000000d;cursor:pointer;margin-right:3px;padding:.4rem .8rem}.BigEnoughPanel-module_backdrop__J0KVD{height:100vh;inset:0;position:absolute;width:100vw;z-index:40}.BigEnoughPanel-module_dropdown__mlBHL.BigEnoughPanel-module_showPanelDropdown__qz6dk{max-height:70vh;overflow-y:scroll;top:10px}.BigEnoughPanel-module_dropdown__mlBHL{background-color:#fff;border:1px solid #e5e7eb;border-radius:8px;left:20px;margin-top:1.25rem;position:absolute;top:100%;width:91.666667%;z-index:40}.BigEnoughPanel-module_scoreContent__LF08L{max-height:70vh;overflow-x:hidden;overflow-y:auto;padding-right:4px}"));const n=document.head||document.getElementsByTagName("head")[0]||document.documentElement;n&&n.appendChild(e)}(),exports.default={developerEffortButton:"BigEnoughPanel-module_developerEffortButton__KLQ-Z",backdrop:"BigEnoughPanel-module_backdrop__J0KVD",dropdown:"BigEnoughPanel-module_dropdown__mlBHL",showPanelDropdown:"BigEnoughPanel-module_showPanelDropdown__qz6dk",scoreContent:"BigEnoughPanel-module_scoreContent__LF08L"};
2
2
  //# sourceMappingURL=BigEnoughPanel.module.css.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),l=require("showdown"),o=require("../RequirementAIWrapper/RequirementAIWrapper.js"),n=require("../../utils/userstory-approval-transform.utils.js"),r=require("../../utils/userstory-approval.utils.js"),a=require("../../hooks/useApprovalStatus.js"),i=require("./components/ContentSegment/ContentSegment.js"),s=require("./components/ApprovalBadge/ApprovalBadge.js"),d=require("./UserStoryApprovalScreen.module.css.js"),u=require("../../icons/CheckIcon.js"),c=require("../../icons/BookmarkIcon.js"),v=require("./components/ApprovalSidebar/ApprovalSidebar.js"),p=require("lucide-react"),S=require("./UserStoryApprovalContext.js"),h=require("../story-screen/BigEnoughPanel.js"),m=require("../../icons/BigEnoughIcon.js"),y=require("@mui/material"),f=require("../../utils/helpers.js"),g=require("../../utils/user-story.utils.js");function b(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var I=b(l);const x={showApproveAllButton:!0,allowEditing:!0,allowDeletion:!0,showSidebar:!1,containerHeight:"calc(100vh - 100px)",useFullWidth:!1},A={approveAll:"Approve All",approved:"Approved",approve:"Approve",correctMe:"Correct Me",delete:"Delete",save:"Save",cancel:"Cancel",savingArtifact:"Saving Artifact...",artifactSavedTitle:"Artifact Saved Successfully",artifactSavedMessage:"Your changes have been saved.",saveFailedTitle:"Failed to Save the Artifact",saveFailedMessage:"An error occurred while saving your changes.",emptyContentWarning:"Saving empty content is not allowed",unsavedChangesWarning:"Please save the updated changes to proceed with Approve All"},C=Object.assign(({artifactTitleIds:l,config:i={},callbacks:s={},labels:u={},isDisabled:c=!1,disabledReason:v="",children:p,classNames:h,selectedArtifactId:m})=>{var y;const{userStory:f,customStyles:g}=o.useRequirementAI(),b={...x,...i},I={...A,...u},[C,j]=t.useState([]),[w,E]=t.useState(""),[k,U]=t.useState(""),[N,q]=t.useState(!1),[T,B]=t.useState(!0),F=t.useRef(void 0),D=t.useCallback((e,t,l,o)=>{s.onShowNotification?s.onShowNotification(e,t,l,o):console.log(`[${e.toUpperCase()}] ${t}: ${l}`)},[s]),M=t.useCallback(e=>{s.onScrollToElement?s.onScrollToElement(e):(e.style.scrollMarginTop="20px",e.scrollIntoView({behavior:"smooth",block:"start"}))},[s]),R=t.useMemo(()=>{const e=C.findIndex(e=>e.artifactId===w);return e>=0?e:0},[C,w]),P=C[R];t.useEffect(()=>{F.current=P},[P]),t.useEffect(()=>{var e;if(!(null==f?void 0:f.length))return;null===(e=s.onInitialize)||void 0===e||e.call(s),1===f.length&&B(!1),f.length>0&&!w&&E(m||f[0].artifactId);const t=n.createUserStoriesForApproval(n.cloneUserStories(f));j(t)},[f,m]),t.useEffect(()=>{m&&m!==w&&E(m)},[m,w]),t.useEffect(()=>{if(!P)return;const e=r.getFirstNonApprovedSegmentId(P,"");U(e)},[null==P?void 0:P.artifactId]);const _=t.useCallback((e,t)=>{j(l=>{const o=[...l];if("APPROVED"===t.approval_status&&"APPROVED"!==l[e].approval_status){const e=r.getFirstUnapprovedStoryId(l,t.artifactId);e&&E(e)}return o[e]=t,o})},[]),z=t.useCallback(e=>{const t=F.current;if(!t)return;const l=r.getFirstNonApprovedSegmentId(t,e);"NA"!==l&&(U(""),setTimeout(()=>{U(l)},0))},[]);a.useApprovalStatus({userStoryForApproval:C,selectedUserStoryForApproval:P,userStoryIndex:R,callbacks:s,labels:I,onSaveUserStory:_});const O={height:b.containerHeight,...b.useFullWidth?{width:"100%",marginLeft:0,marginRight:0}:{width:"calc(100% + 40px)",marginLeft:"-20px",marginRight:"-20px"}},W={userStoryForApproval:C,setUserStoryForApproval:j,selectedStoryArtifactId:w,setSelectedStoryArtifactId:E,selectedUserStoryIndex:R,selectedUserStoryForApproval:P,currentContentId:k,setCurrentContentId:U,isEditingSegment:N,setIsEditingSegment:q,isSidebarExpanded:T,setIsSidebarExpanded:B,artifactTitleIds:l,config:b,labels:I,callbacks:s,isDisabled:c,disabledReason:v,handleSaveUserStory:_,handleUpdateContentId:z,showNotification:D,scrollToElement:M};return e.jsx(S.UserStoryApprovalScreenContext.Provider,{value:W,children:e.jsx("div",{className:`${d.default.container} ${(null==h?void 0:h.container)||""}`,style:{...O,...null===(y=null==g?void 0:g.approvalScreen)||void 0===y?void 0:y.wrapperContainer},children:p})})},{Sidebar:({Component:t,config:l,className:o})=>{const{isSidebarExpanded:n,selectedStoryArtifactId:r,setSelectedStoryArtifactId:a,userStoryForApproval:i,isEditingSegment:s,artifactTitleIds:d}=S.useUserStoryApprovalScreen();return t?e.jsx(t,{isSidebarExpanded:n,selectedStoryArtifactId:r,setSelectedStoryArtifactId:a,userStoryForApproval:i,isEditingAnUserStorySegment:s,artifactTitleIds:d}):e.jsx(v.ApprovalSidebar,{config:l,className:o})},SidebarToggle:({OpenIcon:t,CloseIcon:l,className:o=""})=>{const{isSidebarExpanded:n,setIsSidebarExpanded:r}=S.useUserStoryApprovalScreen(),a=t||p.SidebarOpenIcon,i=l||p.SidebarCloseIcon;return e.jsx("div",{className:`${d.default.sidebarToggleWrapper} ${o}`,children:e.jsx("button",{onClick:()=>r(e=>!e),className:d.default.sidebarToggleBtn,"aria-label":n?"Collapse sidebar":"Expand sidebar",type:"button",children:n?e.jsx(i,{}):e.jsx(a,{})})})},Content:({children:l,ButtonComponent:n,hideApproveAll:a=!1,pageTitle:i="Review Generated Requirements",showShareIcon:v=!1,handleDownloadUserStory:b,handleOpenSendDialog:x,pageDescription:A="This page displays automatically generated requirements for your project. Use this screen to review, refine, correct, or approve all generated requirements."})=>{var C,j,w,E,k,U,N,q,T,B,F,D,M,R,P,_,z,O,W,L,$,V,H,G,Y,J,K,Q,X,Z,ee;const{selectedUserStoryForApproval:te,selectedUserStoryIndex:le,artifactTitleIds:oe,labels:ne,config:re,isDisabled:ae,disabledReason:ie,isEditingSegment:se,handleSaveUserStory:de,setCurrentContentId:ue,showNotification:ce}=S.useUserStoryApprovalScreen(),{userStory:ve,setUserStory:pe}=o.useRequirementAI(),Se=ve[0],[he,me]=t.useState(null),ye=()=>{me(null)},fe=t.useRef(null),[ge,be]=t.useState(!1),{customStyles:Ie,customIcons:xe}=o.useRequirementAI(),Ae=null==Ie?void 0:Ie.userStoryCardStyles,[Ce,je]=t.useState(!1),we=t.useCallback(()=>{if(!te)return;if(se)return void ce("warn","Warning!",ne.unsavedChangesWarning,3e3);const e=r.approveAllSegments(te);de(le,e),ue("")},[te,le,se,ne,de,ue,ce]);if(!te)return null;const Ee=oe[le]||"",ke="APPROVED"===te.approval_status,Ue=ae?ie:"",Ne=null!=(null==te?void 0:te.big_enough)&&!Number.isNaN(te.big_enough)&&!!(null==te?void 0:te.big_enough_decision_factors);return e.jsxs("div",{className:d.default.content,style:{...null===(j=null===(C=null==Ie?void 0:Ie.approvalScreen)||void 0===C?void 0:C.content)||void 0===j?void 0:j.content},"data-lsc-ui-page-title":i,"data-lsc-ui-page-description":A,children:[e.jsxs("div",{className:d.default.header,style:{...null===(k=null===(E=null===(w=null==Ie?void 0:Ie.approvalScreen)||void 0===w?void 0:w.body)||void 0===E?void 0:E.contentSegment)||void 0===k?void 0:k.header},children:[e.jsxs("div",{className:d.default.headerLeft,style:{...null===(N=null===(U=null==Ie?void 0:Ie.approvalScreen)||void 0===U?void 0:U.content)||void 0===N?void 0:N.headerLeft},children:[e.jsxs("div",{className:d.default.headerMeta,style:{...null===(B=null===(T=null===(q=null==Ie?void 0:Ie.approvalScreen)||void 0===q?void 0:q.body)||void 0===T?void 0:T.contentSegment)||void 0===B?void 0:B.headerMeta},children:[e.jsx(c.BookmarkIcon,{size:16,color:(null===(M=null===(D=null===(F=null==Ie?void 0:Ie.approvalScreen)||void 0===F?void 0:F.body)||void 0===D?void 0:D.contentSegment)||void 0===M?void 0:M.bookMarkColor)||"#8C8C8C"}),e.jsx("h2",{className:d.default.headerArtifactId,style:{...null===(_=null===(P=null===(R=null==Ie?void 0:Ie.approvalScreen)||void 0===R?void 0:R.body)||void 0===P?void 0:P.contentSegment)||void 0===_?void 0:_.headerArtifactId},children:Ee})]}),e.jsx("p",{className:d.default.headerTitle,style:{...null===(W=null===(O=null===(z=null==Ie?void 0:Ie.approvalScreen)||void 0===z?void 0:z.body)||void 0===O?void 0:O.contentSegment)||void 0===W?void 0:W.headerTitle},children:null==te?void 0:te.title})]}),e.jsxs("div",{className:null===d.default||void 0===d.default?void 0:d.default.containerStyle,style:null===($=null===(L=null==Ie?void 0:Ie.approvalScreen)||void 0===L?void 0:L.BigEnoughStyles)||void 0===$?void 0:$.containerStyle,children:[Ne&&e.jsx("button",{className:d.default.developerEffortButton,style:null===(H=null===(V=null==Ie?void 0:Ie.approvalScreen)||void 0===V?void 0:V.BigEnoughStyles)||void 0===H?void 0:H.buttonStyle,onClick:()=>je(!Ce),children:e.jsx(m.default,{color:null===(Y=null===(G=null==Ie?void 0:Ie.approvalScreen)||void 0===G?void 0:G.BigEnoughStyles)||void 0===Y?void 0:Y.iconColor,size:null===(K=null===(J=null==Ie?void 0:Ie.approvalScreen)||void 0===J?void 0:J.BigEnoughStyles)||void 0===K?void 0:K.iconSize})}),v&&e.jsxs(e.Fragment,{children:[e.jsx("button",{className:d.default.iconButton,style:null==Ae?void 0:Ae.iconButton,onClick:e=>{me(e.currentTarget)},children:e.jsx(p.ExternalLink,{size:16})}),e.jsxs(y.Menu,{id:"user-story-share-menu",anchorEl:he,open:!!he,onClose:()=>me(null),style:null==Ae?void 0:Ae.userStoryShareMenu,children:[e.jsx(y.MenuItem,{style:null==Ae?void 0:Ae.userStoryMenuItem,onClick:async()=>{be(!0),b&&(await Promise.all([b("pdf"),b("doc")]),be(!1))},children:e.jsxs("div",{ref:fe,className:d.default.menuItemContent,style:null==Ae?void 0:Ae.menuItemContent,children:[e.jsx(p.Download,{size:16,color:null==Ae?void 0:Ae.menuIconColor}),e.jsx("p",{style:null==Ae?void 0:Ae.menuLabel,children:"Download"})]})}),e.jsx(y.MenuItem,{style:null==Ae?void 0:Ae.userStoryMenuItem,onClick:async()=>{let e=Se;e={...Se,value:`${g.replaceTitleSection(null==Se?void 0:Se.value,Se.title)}`},null==x||x(!0,[e],Se.artifactId),ye()},children:e.jsxs("div",{style:null==Ae?void 0:Ae.menuItemContent,className:d.default.menuItemContentPadded,children:[e.jsx(p.Share2,{size:16,color:null==Ae?void 0:Ae.menuIconColor}),e.jsx("p",{style:null==Ae?void 0:Ae.menuLabel,children:"Send"})]})}),e.jsx(y.MenuItem,{style:null==Ae?void 0:Ae.userStoryMenuItem,onClick:async()=>{const e=(new I.default.Converter).makeHtml(f.formatMarkdown(Se.value)||Se.value),t=function(e){const t=(new I.default.Converter).makeHtml(e),l=document.createElement("div");return l.innerHTML=t,l.textContent||l.innerText||""}(f.formatMarkdown(Se.value)||Se.value),l=new ClipboardItem({"text/plain":new Blob([t],{type:"text/plain"}),"text/html":new Blob([e],{type:"text/html"})});try{await navigator.clipboard.write([l]),console.log("Copied User Story")}catch(e){console.error("Failed to copy user story:",e)}finally{ye()}},children:e.jsxs("div",{style:null==Ae?void 0:Ae.menuItemContent,className:d.default.menuItemContentPadded,children:[e.jsx(p.Copy,{size:16,color:null==Ae?void 0:Ae.menuIconColor}),e.jsx("p",{style:null==Ae?void 0:Ae.menuLabel,children:"Copy"})]})})]})]}),!a&&re.showApproveAllButton&&e.jsx("div",{className:d.default.headerRight,children:ke?e.jsx(s.ApprovalBadge,{status:"APPROVED",label:ne.approved}):n?e.jsx(y.Tooltip,{title:Ue,children:e.jsx("span",{children:e.jsx(n,{type:"fill",onClick:we,isDisable:ae,className:d.default.approveAllButton,overrideStyles:!0,lscUIAgent:{id:"approve-all",lscUIType:"button",lscUILabel:ne.approveAll,lscUIDescription:"Clicks this button to approve all generated requirements on the page in a single action.",lscUIWhenToApply:"Apply when the user wants to accept all requirements without reviewing them individually, or when they say phrases like 'approve everything', 'finalize all', 'accept all', or 'this looks good, approve all'."},children:e.jsxs("div",{className:d.default.approveAllContent,children:[e.jsx(u.CheckIcon,{size:16,color:"white"}),e.jsx("span",{children:ne.approveAll})]})})})}):e.jsx(y.Tooltip,{title:Ue,children:e.jsx("span",{children:e.jsxs("button",{onClick:we,disabled:ae,className:d.default.approveAllButtonDefault,style:{...null===(X=null===(Q=null==Ie?void 0:Ie.approvalScreen)||void 0===Q?void 0:Q.content)||void 0===X?void 0:X.approveAllButtonDefault},children:[e.jsx(u.CheckIcon,{size:16,color:"white"}),e.jsx("span",{children:ne.approveAll})]})})})})]})]}),Ce&&Ne&&e.jsx("div",{className:d.default.bigEnoughWrapper,children:e.jsx(h.BigEnoughPanel,{customIcons:null==xe?void 0:xe.userStoryIcons,customStyles:null===(Z=null==Ie?void 0:Ie.approvalScreen)||void 0===Z?void 0:Z.aiReasoningCitaionStyles,currentUserStory:te,panelStyles:null===(ee=null==Ie?void 0:Ie.approvalScreen)||void 0===ee?void 0:ee.BigEnoughStyles,showPanel:Ce})}),l]})},Body:({children:l,EditorComponent:n,ViewerComponent:r,handleDownloadUserStory:a,handleOpenSendDialog:s,showShareIcon:u=!1})=>{var c,v,p;const{selectedUserStoryForApproval:h,selectedUserStoryIndex:m,artifactTitleIds:y,handleSaveUserStory:f}=S.useUserStoryApprovalScreen(),{customStyles:g}=o.useRequirementAI(),b=t.useCallback(e=>{f(m,e)},[m,f]),I=t.useCallback((e,t)=>{var l;if(!h)return;const o={...h,sub_features:null===(l=h.sub_features)||void 0===l?void 0:l.map((l,o)=>o===e?t:l)};f(m,o)},[h,m,f]),x=t.useCallback(e=>{var t;if(!h)return;const l={...h,sub_features:null===(t=h.sub_features)||void 0===t?void 0:t.filter((t,l)=>l!==e)};f(m,l)},[h,m,f]);if(!h)return null;const A=y[m]||"";return e.jsxs("div",{className:d.default.body,style:{...null===(v=null===(c=null==g?void 0:g.approvalScreen)||void 0===c?void 0:c.body)||void 0===v?void 0:v.container},children:[e.jsx(i.ContentSegment,{userStoryForApproval:h,artifactTitleId:A,onSaveMainStoryContent:b,EditorComponent:n,ViewerComponent:r}),null===(p=h.sub_features)||void 0===p?void 0:p.map((t,l)=>e.jsx(i.ContentSegment,{userStoryForApproval:t,artifactTitleId:`${A} - ${String.fromCharCode(65+l)}`,isSubFeature:!0,subFeatureIndex:l,onSaveSubFeature:I,onDeleteSubFeature:x,EditorComponent:n,ViewerComponent:r,handleDownloadUserStory:a,handleOpenSendDialog:s,showShareIcon:u},t.artifactId)),l]})}});exports.default=C;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),l=require("showdown"),o=require("../RequirementAIWrapper/RequirementAIWrapper.js"),r=require("../../utils/userstory-approval-transform.utils.js"),n=require("../../utils/userstory-approval.utils.js"),a=require("../../hooks/useApprovalStatus.js"),s=require("./components/ContentSegment/ContentSegment.js"),i=require("./components/ApprovalBadge/ApprovalBadge.js"),d=require("./UserStoryApprovalScreen.module.css.js"),u=require("../../icons/CheckIcon.js"),c=require("../../icons/BookmarkIcon.js"),p=require("./components/ApprovalSidebar/ApprovalSidebar.js"),v=require("lucide-react"),S=require("./UserStoryApprovalContext.js"),h=require("../story-screen/BigEnoughPanel.js"),m=require("@mui/material"),y=require("../../utils/helpers.js"),f=require("../../utils/user-story.utils.js");function g(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var b=g(l);const I={showApproveAllButton:!0,allowEditing:!0,allowDeletion:!0,showSidebar:!1,containerHeight:"calc(100vh - 100px)",useFullWidth:!1},x={approveAll:"Approve All",approved:"Approved",approve:"Approve",correctMe:"Correct Me",delete:"Delete",save:"Save",cancel:"Cancel",savingArtifact:"Saving Artifact...",artifactSavedTitle:"Artifact Saved Successfully",artifactSavedMessage:"Your changes have been saved.",saveFailedTitle:"Failed to Save the Artifact",saveFailedMessage:"An error occurred while saving your changes.",emptyContentWarning:"Saving empty content is not allowed",unsavedChangesWarning:"Please save the updated changes to proceed with Approve All"},A=Object.assign(({artifactTitleIds:l,config:s={},callbacks:i={},labels:u={},isDisabled:c=!1,disabledReason:p="",children:v,classNames:h,selectedArtifactId:m})=>{var y;const{userStory:f,customStyles:g}=o.useRequirementAI(),b={...I,...s},A={...x,...u},[C,j]=t.useState([]),[w,k]=t.useState(""),[U,E]=t.useState(""),[N,q]=t.useState(!1),[T,F]=t.useState(!0),D=t.useRef(void 0),M=t.useCallback((e,t,l,o)=>{i.onShowNotification?i.onShowNotification(e,t,l,o):console.log(`[${e.toUpperCase()}] ${t}: ${l}`)},[i]),B=t.useCallback(e=>{i.onScrollToElement?i.onScrollToElement(e):(e.style.scrollMarginTop="20px",e.scrollIntoView({behavior:"smooth",block:"start"}))},[i]),R=t.useMemo(()=>{const e=C.findIndex(e=>e.artifactId===w);return e>=0?e:0},[C,w]),P=C[R];t.useEffect(()=>{D.current=P},[P]),t.useEffect(()=>{var e;if(!(null==f?void 0:f.length))return;null===(e=i.onInitialize)||void 0===e||e.call(i),1===f.length&&F(!1),f.length>0&&!w&&k(m||f[0].artifactId);const t=r.createUserStoriesForApproval(r.cloneUserStories(f));j(t)},[f,m]),t.useEffect(()=>{m&&m!==w&&k(m)},[m,w]),t.useEffect(()=>{if(!P)return;const e=n.getFirstNonApprovedSegmentId(P,"");E(e)},[null==P?void 0:P.artifactId]);const _=t.useCallback((e,t)=>{j(l=>{const o=[...l];if("APPROVED"===t.approval_status&&"APPROVED"!==l[e].approval_status){const e=n.getFirstUnapprovedStoryId(l,t.artifactId);e&&k(e)}return o[e]=t,o})},[]),O=t.useCallback(e=>{const t=D.current;if(!t)return;const l=n.getFirstNonApprovedSegmentId(t,e);"NA"!==l&&(E(""),setTimeout(()=>{E(l)},0))},[]);a.useApprovalStatus({userStoryForApproval:C,selectedUserStoryForApproval:P,userStoryIndex:R,callbacks:i,labels:A,onSaveUserStory:_});const L={height:b.containerHeight,...b.useFullWidth?{width:"100%",marginLeft:0,marginRight:0}:{width:"calc(100% + 40px)",marginLeft:"-20px",marginRight:"-20px"}},W={userStoryForApproval:C,setUserStoryForApproval:j,selectedStoryArtifactId:w,setSelectedStoryArtifactId:k,selectedUserStoryIndex:R,selectedUserStoryForApproval:P,currentContentId:U,setCurrentContentId:E,isEditingSegment:N,setIsEditingSegment:q,isSidebarExpanded:T,setIsSidebarExpanded:F,artifactTitleIds:l,config:b,labels:A,callbacks:i,isDisabled:c,disabledReason:p,handleSaveUserStory:_,handleUpdateContentId:O,showNotification:M,scrollToElement:B};return e.jsx(S.UserStoryApprovalScreenContext.Provider,{value:W,children:e.jsx("div",{className:`${d.default.container} ${(null==h?void 0:h.container)||""}`,style:{...L,...null===(y=null==g?void 0:g.approvalScreen)||void 0===y?void 0:y.wrapperContainer},children:v})})},{Sidebar:({Component:t,config:l,className:o})=>{const{isSidebarExpanded:r,selectedStoryArtifactId:n,setSelectedStoryArtifactId:a,userStoryForApproval:s,isEditingSegment:i,artifactTitleIds:d}=S.useUserStoryApprovalScreen();return t?e.jsx(t,{isSidebarExpanded:r,selectedStoryArtifactId:n,setSelectedStoryArtifactId:a,userStoryForApproval:s,isEditingAnUserStorySegment:i,artifactTitleIds:d}):e.jsx(p.ApprovalSidebar,{config:l,className:o})},SidebarToggle:({OpenIcon:t,CloseIcon:l,className:o=""})=>{const{isSidebarExpanded:r,setIsSidebarExpanded:n}=S.useUserStoryApprovalScreen(),a=t||v.SidebarOpenIcon,s=l||v.SidebarCloseIcon;return e.jsx("div",{className:`${d.default.sidebarToggleWrapper} ${o}`,children:e.jsx("button",{onClick:()=>n(e=>!e),className:d.default.sidebarToggleBtn,"aria-label":r?"Collapse sidebar":"Expand sidebar",type:"button",children:r?e.jsx(s,{}):e.jsx(a,{})})})},Content:({children:l,ButtonComponent:r,hideApproveAll:a=!1,pageTitle:s="Review Generated Requirements",showShareIcon:p=!1,handleDownloadUserStory:g,handleOpenSendDialog:I,pageDescription:x="This page displays automatically generated requirements for your project. Use this screen to review, refine, correct, or approve all generated requirements."})=>{var A,C,j,w,k,U,E,N,q,T,F,D,M,B,R,P,_,O,L,W,$,z,V,H,G;const{selectedUserStoryForApproval:Y,selectedUserStoryIndex:J,artifactTitleIds:K,labels:Q,config:X,isDisabled:Z,disabledReason:ee,isEditingSegment:te,handleSaveUserStory:le,setCurrentContentId:oe,showNotification:re}=S.useUserStoryApprovalScreen(),{userStory:ne,setUserStory:ae}=o.useRequirementAI(),se=ne[0],[ie,de]=t.useState(null),ue=()=>{de(null)},ce=t.useRef(null),[pe,ve]=t.useState(!1),{customStyles:Se,customIcons:he}=o.useRequirementAI(),me=null==Se?void 0:Se.userStoryCardStyles,ye=t.useCallback(()=>{if(!Y)return;if(te)return void re("warn","Warning!",Q.unsavedChangesWarning,3e3);const e=n.approveAllSegments(Y);le(J,e),oe("")},[Y,J,te,Q,le,oe,re]);if(!Y)return null;const fe=K[J]||"",ge="APPROVED"===Y.approval_status,be=Z?ee:"",Ie=null!=(null==Y?void 0:Y.big_enough)&&!Number.isNaN(Y.big_enough)&&!!(null==Y?void 0:Y.big_enough_decision_factors);return e.jsxs("div",{className:d.default.content,style:{...null===(C=null===(A=null==Se?void 0:Se.approvalScreen)||void 0===A?void 0:A.content)||void 0===C?void 0:C.content},"data-lsc-ui-page-title":s,"data-lsc-ui-page-description":x,children:[e.jsxs("div",{className:d.default.header,style:{...null===(k=null===(w=null===(j=null==Se?void 0:Se.approvalScreen)||void 0===j?void 0:j.body)||void 0===w?void 0:w.contentSegment)||void 0===k?void 0:k.header},children:[e.jsxs("div",{className:d.default.headerLeft,style:{...null===(E=null===(U=null==Se?void 0:Se.approvalScreen)||void 0===U?void 0:U.content)||void 0===E?void 0:E.headerLeft},children:[e.jsxs("div",{className:d.default.headerMeta,style:{...null===(T=null===(q=null===(N=null==Se?void 0:Se.approvalScreen)||void 0===N?void 0:N.body)||void 0===q?void 0:q.contentSegment)||void 0===T?void 0:T.headerMeta},children:[e.jsx(c.BookmarkIcon,{size:16,color:(null===(M=null===(D=null===(F=null==Se?void 0:Se.approvalScreen)||void 0===F?void 0:F.body)||void 0===D?void 0:D.contentSegment)||void 0===M?void 0:M.bookMarkColor)||"#8C8C8C"}),e.jsx("h2",{className:d.default.headerArtifactId,style:{...null===(P=null===(R=null===(B=null==Se?void 0:Se.approvalScreen)||void 0===B?void 0:B.body)||void 0===R?void 0:R.contentSegment)||void 0===P?void 0:P.headerArtifactId},children:fe})]}),e.jsx("p",{className:d.default.headerTitle,style:{...null===(L=null===(O=null===(_=null==Se?void 0:Se.approvalScreen)||void 0===_?void 0:_.body)||void 0===O?void 0:O.contentSegment)||void 0===L?void 0:L.headerTitle},children:null==Y?void 0:Y.title})]}),e.jsxs("div",{className:null===d.default||void 0===d.default?void 0:d.default.containerStyle,style:null===($=null===(W=null==Se?void 0:Se.approvalScreen)||void 0===W?void 0:W.BigEnoughStyles)||void 0===$?void 0:$.containerStyle,children:[Ie&&e.jsx(h.BigEnoughPanel,{customIcons:null==he?void 0:he.userStoryIcons,customStyles:null===(z=null==Se?void 0:Se.approvalScreen)||void 0===z?void 0:z.aiReasoningCitaionStyles,currentUserStory:Y,panelStyles:null===(V=null==Se?void 0:Se.approvalScreen)||void 0===V?void 0:V.BigEnoughStyles}),p&&e.jsxs(e.Fragment,{children:[e.jsx("button",{className:d.default.iconButton,style:null==me?void 0:me.iconButton,onClick:e=>{de(e.currentTarget)},children:e.jsx(v.ExternalLink,{size:16})}),e.jsxs(m.Menu,{id:"user-story-share-menu",anchorEl:ie,open:!!ie,onClose:()=>de(null),style:null==me?void 0:me.userStoryShareMenu,children:[e.jsx(m.MenuItem,{style:null==me?void 0:me.userStoryMenuItem,onClick:async()=>{ve(!0),g&&(await Promise.all([g("pdf"),g("doc")]),ve(!1))},children:e.jsxs("div",{ref:ce,className:d.default.menuItemContent,style:null==me?void 0:me.menuItemContent,children:[e.jsx(v.Download,{size:16,color:null==me?void 0:me.menuIconColor}),e.jsx("p",{style:null==me?void 0:me.menuLabel,children:"Download"})]})}),e.jsx(m.MenuItem,{style:null==me?void 0:me.userStoryMenuItem,onClick:async()=>{let e=se;e={...se,value:`${f.replaceTitleSection(null==se?void 0:se.value,se.title)}`},null==I||I(!0,[e],se.artifactId),ue()},children:e.jsxs("div",{style:null==me?void 0:me.menuItemContent,className:d.default.menuItemContentPadded,children:[e.jsx(v.Share2,{size:16,color:null==me?void 0:me.menuIconColor}),e.jsx("p",{style:null==me?void 0:me.menuLabel,children:"Send"})]})}),e.jsx(m.MenuItem,{style:null==me?void 0:me.userStoryMenuItem,onClick:async()=>{const e=(new b.default.Converter).makeHtml(y.formatMarkdown(se.value)||se.value),t=function(e){const t=(new b.default.Converter).makeHtml(e),l=document.createElement("div");return l.innerHTML=t,l.textContent||l.innerText||""}(y.formatMarkdown(se.value)||se.value),l=new ClipboardItem({"text/plain":new Blob([t],{type:"text/plain"}),"text/html":new Blob([e],{type:"text/html"})});try{await navigator.clipboard.write([l]),console.log("Copied User Story")}catch(e){console.error("Failed to copy user story:",e)}finally{ue()}},children:e.jsxs("div",{style:null==me?void 0:me.menuItemContent,className:d.default.menuItemContentPadded,children:[e.jsx(v.Copy,{size:16,color:null==me?void 0:me.menuIconColor}),e.jsx("p",{style:null==me?void 0:me.menuLabel,children:"Copy"})]})})]})]}),!a&&X.showApproveAllButton&&e.jsx("div",{className:d.default.headerRight,children:ge?e.jsx(i.ApprovalBadge,{status:"APPROVED",label:Q.approved}):r?e.jsx(m.Tooltip,{title:be,children:e.jsx("span",{children:e.jsx(r,{type:"fill",onClick:ye,isDisable:Z,className:d.default.approveAllButton,overrideStyles:!0,lscUIAgent:{id:"approve-all",lscUIType:"button",lscUILabel:Q.approveAll,lscUIDescription:"Clicks this button to approve all generated requirements on the page in a single action.",lscUIWhenToApply:"Apply when the user wants to accept all requirements without reviewing them individually, or when they say phrases like 'approve everything', 'finalize all', 'accept all', or 'this looks good, approve all'."},children:e.jsxs("div",{className:d.default.approveAllContent,children:[e.jsx(u.CheckIcon,{size:16,color:"white"}),e.jsx("span",{children:Q.approveAll})]})})})}):e.jsx(m.Tooltip,{title:be,children:e.jsx("span",{children:e.jsxs("button",{onClick:ye,disabled:Z,className:d.default.approveAllButtonDefault,style:{...null===(G=null===(H=null==Se?void 0:Se.approvalScreen)||void 0===H?void 0:H.content)||void 0===G?void 0:G.approveAllButtonDefault},children:[e.jsx(u.CheckIcon,{size:16,color:"white"}),e.jsx("span",{children:Q.approveAll})]})})})})]})]}),l]})},Body:({children:l,EditorComponent:r,ViewerComponent:n,handleDownloadUserStory:a,handleOpenSendDialog:i,showShareIcon:u=!1})=>{var c,p,v;const{selectedUserStoryForApproval:h,selectedUserStoryIndex:m,artifactTitleIds:y,handleSaveUserStory:f}=S.useUserStoryApprovalScreen(),{customStyles:g}=o.useRequirementAI(),b=t.useCallback(e=>{f(m,e)},[m,f]),I=t.useCallback((e,t)=>{var l;if(!h)return;const o={...h,sub_features:null===(l=h.sub_features)||void 0===l?void 0:l.map((l,o)=>o===e?t:l)};f(m,o)},[h,m,f]),x=t.useCallback(e=>{var t;if(!h)return;const l={...h,sub_features:null===(t=h.sub_features)||void 0===t?void 0:t.filter((t,l)=>l!==e)};f(m,l)},[h,m,f]);if(!h)return null;const A=y[m]||"";return e.jsxs("div",{className:d.default.body,style:{...null===(p=null===(c=null==g?void 0:g.approvalScreen)||void 0===c?void 0:c.body)||void 0===p?void 0:p.container},children:[e.jsx(s.ContentSegment,{userStoryForApproval:h,artifactTitleId:A,onSaveMainStoryContent:b,EditorComponent:r,ViewerComponent:n}),null===(v=h.sub_features)||void 0===v?void 0:v.map((t,l)=>e.jsx(s.ContentSegment,{userStoryForApproval:t,artifactTitleId:`${A} - ${String.fromCharCode(65+l)}`,isSubFeature:!0,subFeatureIndex:l,onSaveSubFeature:I,onDeleteSubFeature:x,EditorComponent:r,ViewerComponent:n,handleDownloadUserStory:a,handleOpenSendDialog:i,showShareIcon:u},t.artifactId)),l]})}});exports.default=A;
2
2
  //# sourceMappingURL=UserStoryApprovalScreen.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("../utils/proccess-stream.utils.js");exports.useStreamContentHandler=function({setUserStory:i,setAiReasoning:o,setUserStoryCitations:n,onStreamingCompleted:s,isGraphQLCallInProgress:r,knowledgeBase:a,projectAnalyserSummary:l,dataSourceFiles:c,aiReasoning:u,setRedisValue:d,fetchCitationByBlock:p,isOnDemandCitation:_}){const[m,g]=e.useState({finalGap:"",finalRisk:"",status:"in-progress"}),f=e.useRef(new Set),b=e.useRef(new Set),v=e.useRef(null),h=e.useRef(null),y=e.useRef({gap_items_prompt:"",risk_items_prompt:""}),k=e.useRef(new Set);return e.useEffect(()=>{"complete"!==m.status||r||(console.log("streaming::userstory::onStreamingCompleted"),s(m.finalGap,m.finalRisk),f.current.clear(),b.current.clear(),v.current=null,h.current=null,y.current={gap_items_prompt:"",risk_items_prompt:""},k.current.clear(),g({finalGap:"",finalRisk:"",status:"in-progress"}))},[m,r]),{processStreamContent:function(e,s,r,m){try{console.log("streaming::userstory::completed",m,_),m&&_&&(console.log("streaming::userstory::completed::lib"),g({finalGap:"",finalRisk:"",status:"complete"}));const R=JSON.stringify(e);if(h.current===R)return;h.current=R;let N=[],S=[];e=e.map(e=>{var i;const r=`${(e={...e,subBlockNumber:null!==(i=e.subBlockNumber)&&void 0!==i?i:"1"}).storyNumber}-${e.blockNumber}-${e.subBlockNumber}`;if(k.current.has(r))return null;k.current.add(r);let{outputText:a,reasonings:l,gpt_citation:c,processedDescription:u}=t.processAIReasoningFromBlocks(e.value,e.blockNumber,e.storyNumber,e.description);n(e=>{var t;return c.length>0&&((null==e?void 0:e.gpt_citations)||(e.gpt_citations=[]),null===(t=e.gpt_citations)||void 0===t||t.push(...c)),{...e}}),N.push(...l),S.push([...l]);const d=l.filter(e=>e.on_demand).flatMap(e=>[...e.reason.matchAll(/<a[^>]*href="([^"]+)\?type=on_demand"/g),...e.gap.matchAll(/<a[^>]*href="([^"]+)\?type=on_demand"/g)].map(e=>{const[t,i]=e[1].split("$");return"book_citation_doc"!==t&&"book_citation_pdf"!==t&&"document_citation"!==t?null:{citation_number:i,customMetadata:{type:"document_citation"===t?"book_citation_pdf":t,file_name:"",fileType:"",gcs_upload_url:""}}}).filter(Boolean));d.length&&n(e=>{var t;return{...e,file_citations:[...null!==(t=e.file_citations)&&void 0!==t?t:[],...d]}});let m=`<STORY_NUMBER>${e.storyNumber}<BLOCK_NUMBER>${e.blockNumber}<SUB_BLOCK>${e.subBlockNumber}`;return _||f.current.has(m)||(!async function(e,t,i){var s,r;let a="",l="";try{const c=await p(e,i,t);o(e=>{var t;const i=[...e];return null===(t=c.response.ai_reasonings)||void 0===t||t.forEach(e=>{const t=i.findIndex(t=>t.id===e.id);-1!==t&&e.gap.length>0&&e.reason.length>0&&(i[t]={...e})}),i}),a=(null===(s=c.response)||void 0===s?void 0:s.gap_items_prompt)||"",l=(null===(r=c.response)||void 0===r?void 0:r.risk_items_prompt)||"",(a||l)&&(y.current={gap_items_prompt:a,risk_items_prompt:l}),n(e=>{var t,i,o,n,s,r,a,l,u,d,p,_,m,g;return{...e,appmod_citations:[...null!==(t=e.appmod_citations)&&void 0!==t?t:[],...null!==(i=c.response.appmod_citations)&&void 0!==i?i:[]],audio_citations:[...null!==(o=e.audio_citations)&&void 0!==o?o:[],...null!==(n=c.response.audio_citations)&&void 0!==n?n:[]],file_citations:[...null!==(s=e.file_citations)&&void 0!==s?s:[],...null!==(r=c.response.file_citations)&&void 0!==r?r:[]],image_citations:[...null!==(a=e.image_citations)&&void 0!==a?a:[],...null!==(l=c.response.image_citations)&&void 0!==l?l:[]],rca_citations:[...null!==(u=e.rca_citations)&&void 0!==u?u:[],...null!==(d=c.response.rca_citations)&&void 0!==d?d:[]],web_citations:[...null!==(p=e.web_citations)&&void 0!==p?p:[],...null!==(_=c.response.web_citations)&&void 0!==_?_:[]],readfile_citations:[...null!==(m=e.readfile_citations)&&void 0!==m?m:[],...null!==(g=c.response.readfile_citations)&&void 0!==g?g:[]]}})}catch(t){console.error("[liblogs] processCitationsByBlock error — story:%s block:%s",e.storyNumber,e.blockNumber,t)}finally{let t=`<STORY_NUMBER>${e.storyNumber}<BLOCK_NUMBER>${e.blockNumber}`;if(b.current.add(t),b.current.size===f.current.size){const e=a||y.current.gap_items_prompt,t=l||y.current.risk_items_prompt;g({finalGap:e,finalRisk:t,status:"complete"})}}}({...e,value:a,description:u},l,s),f.current.add(m)),{...e,value:a,description:u}}).filter(Boolean),N.forEach(e=>{o(t=>(t.find(t=>t.id===e.id)||t.push(e),[...t]))}),e.length>0&&e.map(({title:e,section:t,value:o,storyNumber:n,description:s,blockNumber:p,big_enough:_,big_enough_decision_factors:m,technicality_score:g,gapValue:f,confidenceScore:b,metadata:h},y)=>{i(i=>{var k,R,N,B,$,C,O,w;const E=i.findIndex(e=>e.storyNumber===n);if("intro"===t)console.log("testing::intro",g),-1===E?i.push({artifactId:`STORY-${n}-${p}`,title:e,value:o,description:s,storyNumber:n,sub_features:[],section:t,blockNumber:p,aiReasoning:S[y],big_enough:_,big_enough_decision_factors:m,technicality_score:g,gapValue:f,confidenceScore:b,metadata:h}):(i[E].value+=o,i[E].aiReasoning=i[E].aiReasoning||[],null===(R=null===(k=i[E])||void 0===k?void 0:k.aiReasoning)||void 0===R||R.push(...S[y]),i[E].big_enough=_,i[E].big_enough_decision_factors=m,i[E].technicality_score=g,i[E].gapValue=f,i[E].confidenceScore=b,i[E].metadata=h);else{i[E].sub_features||(i[E].sub_features=[]);const s=(null===(B=null===(N=i[E])||void 0===N?void 0:N.sub_features)||void 0===B?void 0:B.findIndex(e=>e.blockNumber===p))||-1;if(-1===s)null===(C=null===($=i[E])||void 0===$?void 0:$.sub_features)||void 0===C||C.push({artifactId:`STORY-${n}-${p}`,title:e,value:o,storyNumber:n,blockNumber:p,section:t,aiReasoning:S[y],big_enough:_,big_enough_decision_factors:m,technicality_score:g,gapValue:f,confidenceScore:b,metadata:h});else{let e=null===(w=null===(O=null==i?void 0:i[E])||void 0===O?void 0:O.sub_features)||void 0===w?void 0:w[s];e.value=(e.value||"")+o,e.aiReasoning=e.aiReasoning||[],e.aiReasoning.push(...S[y]),e.big_enough=_,e.big_enough_decision_factors=m,e.technicality_score=g,e.gapValue=f,e.confidenceScore=b,e.metadata=h}}const I=JSON.stringify(i);return v.current!==I&&(d({key:`streaming-redis-key-${r}`,value:{mmvf_list:i,knowledgeBase:a,projectAnalyserSummary:l,dataSources_files:c,ai_reasonings:u}}),v.current=I),[...i]})})}catch(e){console.error("Error in processing Stream Content",e)}}}};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("../utils/proccess-stream.utils.js");exports.useStreamContentHandler=function({setUserStory:i,setAiReasoning:o,setUserStoryCitations:n,onStreamingCompleted:s,isGraphQLCallInProgress:r,knowledgeBase:a,projectAnalyserSummary:l,dataSourceFiles:c,aiReasoning:u,setRedisValue:d,fetchCitationByBlock:p,isOnDemandCitation:_}){const[m,g]=e.useState({finalGap:"",finalRisk:"",status:"in-progress"}),f=e.useRef(new Set),b=e.useRef(new Set),v=e.useRef(null),h=e.useRef(null),y=e.useRef({gap_items_prompt:"",risk_items_prompt:""}),k=e.useRef(new Set);return e.useEffect(()=>{"complete"!==m.status||r||(console.log("streaming::userstory::onStreamingCompleted"),s(m.finalGap,m.finalRisk),f.current.clear(),b.current.clear(),v.current=null,h.current=null,y.current={gap_items_prompt:"",risk_items_prompt:""},k.current.clear(),g({finalGap:"",finalRisk:"",status:"in-progress"}))},[m,r]),{processStreamContent:function(e,s,r,m){try{console.log("streaming::userstory::completed",m,_),m&&_&&(console.log("streaming::userstory::completed::lib"),g({finalGap:"",finalRisk:"",status:"complete"}));const R=JSON.stringify(e);if(h.current===R)return;h.current=R;let N=[],S=[];e=e.map(e=>{var i;const r=`${(e={...e,subBlockNumber:null!==(i=e.subBlockNumber)&&void 0!==i?i:"1"}).storyNumber}-${e.blockNumber}-${e.subBlockNumber}`;if(k.current.has(r))return null;k.current.add(r);let{outputText:a,reasonings:l,gpt_citation:c,processedDescription:u}=t.processAIReasoningFromBlocks(e.value,e.blockNumber,e.storyNumber,e.description);n(e=>{var t;return c.length>0&&((null==e?void 0:e.gpt_citations)||(e.gpt_citations=[]),null===(t=e.gpt_citations)||void 0===t||t.push(...c)),{...e}}),N.push(...l),S.push([...l]);const d=l.filter(e=>e.on_demand).flatMap(e=>[...e.reason.matchAll(/<a[^>]*href="([^"]+)\?type=on_demand"/g),...e.gap.matchAll(/<a[^>]*href="([^"]+)\?type=on_demand"/g)].map(e=>{const[t,i]=e[1].split("$");return"book_citation_doc"!==t&&"book_citation_pdf"!==t&&"document_citation"!==t?null:{citation_number:i,customMetadata:{type:"document_citation"===t?"book_citation_pdf":t,file_name:"",fileType:"",gcs_upload_url:""}}}).filter(Boolean));d.length&&n(e=>{var t;return{...e,file_citations:[...null!==(t=e.file_citations)&&void 0!==t?t:[],...d]}});let m=`<STORY_NUMBER>${e.storyNumber}<BLOCK_NUMBER>${e.blockNumber}<SUB_BLOCK>${e.subBlockNumber}`;return _||f.current.has(m)||(!async function(e,t,i){var s,r;let a="",l="";try{const c=await p(e,i,t);o(e=>{var t;const i=[...e];return null===(t=c.response.ai_reasonings)||void 0===t||t.forEach(e=>{const t=i.findIndex(t=>t.id===e.id);-1!==t&&e.gap.length>0&&e.reason.length>0&&(i[t]={...e})}),i}),a=(null===(s=c.response)||void 0===s?void 0:s.gap_items_prompt)||"",l=(null===(r=c.response)||void 0===r?void 0:r.risk_items_prompt)||"",(a||l)&&(y.current={gap_items_prompt:a,risk_items_prompt:l}),n(e=>{var t,i,o,n,s,r,a,l,u,d,p,_,m,g;return{...e,appmod_citations:[...null!==(t=e.appmod_citations)&&void 0!==t?t:[],...null!==(i=c.response.appmod_citations)&&void 0!==i?i:[]],audio_citations:[...null!==(o=e.audio_citations)&&void 0!==o?o:[],...null!==(n=c.response.audio_citations)&&void 0!==n?n:[]],file_citations:[...null!==(s=e.file_citations)&&void 0!==s?s:[],...null!==(r=c.response.file_citations)&&void 0!==r?r:[]],image_citations:[...null!==(a=e.image_citations)&&void 0!==a?a:[],...null!==(l=c.response.image_citations)&&void 0!==l?l:[]],rca_citations:[...null!==(u=e.rca_citations)&&void 0!==u?u:[],...null!==(d=c.response.rca_citations)&&void 0!==d?d:[]],web_citations:[...null!==(p=e.web_citations)&&void 0!==p?p:[],...null!==(_=c.response.web_citations)&&void 0!==_?_:[]],readfile_citations:[...null!==(m=e.readfile_citations)&&void 0!==m?m:[],...null!==(g=c.response.readfile_citations)&&void 0!==g?g:[]]}})}catch(t){console.error("[liblogs] processCitationsByBlock error — story:%s block:%s",e.storyNumber,e.blockNumber,t)}finally{let t=`<STORY_NUMBER>${e.storyNumber}<BLOCK_NUMBER>${e.blockNumber}`;if(b.current.add(t),b.current.size===f.current.size){const e=a||y.current.gap_items_prompt,t=l||y.current.risk_items_prompt;g({finalGap:e,finalRisk:t,status:"complete"})}}}({...e,value:a,description:u},l,s),f.current.add(m)),{...e,value:a,description:u}}).filter(Boolean),N.forEach(e=>{o(t=>(t.find(t=>t.id===e.id)||t.push(e),[...t]))}),e.length>0&&e.map(({title:e,section:t,value:o,storyNumber:n,description:s,blockNumber:p,big_enough:_,big_enough_decision_factors:m,technicality_score:g,gapValue:f,confidenceScore:b,metadata:h},y)=>{i(i=>{var k,R,N,B,$,C,O,w;const E=i.findIndex(e=>e.storyNumber===n);if("intro"===t)-1===E?i.push({artifactId:`STORY-${n}-${p}`,title:e,value:o,description:s,storyNumber:n,sub_features:[],section:t,blockNumber:p,aiReasoning:S[y],big_enough:_,big_enough_decision_factors:m,technicality_score:g,gapValue:f,confidenceScore:b,metadata:h}):(i[E].value+=o,i[E].aiReasoning=i[E].aiReasoning||[],null===(R=null===(k=i[E])||void 0===k?void 0:k.aiReasoning)||void 0===R||R.push(...S[y]),i[E].big_enough=_,i[E].big_enough_decision_factors=m,i[E].technicality_score=g,i[E].gapValue=f,i[E].confidenceScore=b,i[E].metadata=h);else{i[E].sub_features||(i[E].sub_features=[]);const s=(null===(B=null===(N=i[E])||void 0===N?void 0:N.sub_features)||void 0===B?void 0:B.findIndex(e=>e.blockNumber===p))||-1;if(-1===s)null===(C=null===($=i[E])||void 0===$?void 0:$.sub_features)||void 0===C||C.push({artifactId:`STORY-${n}-${p}`,title:e,value:o,storyNumber:n,blockNumber:p,section:t,aiReasoning:S[y],big_enough:_,big_enough_decision_factors:m,technicality_score:g,gapValue:f,confidenceScore:b,metadata:h});else{let e=null===(w=null===(O=null==i?void 0:i[E])||void 0===O?void 0:O.sub_features)||void 0===w?void 0:w[s];e.value=(e.value||"")+o,e.aiReasoning=e.aiReasoning||[],e.aiReasoning.push(...S[y]),e.big_enough=_,e.big_enough_decision_factors=m,e.technicality_score=g,e.gapValue=f,e.confidenceScore=b,e.metadata=h}}const I=JSON.stringify(i);return v.current!==I&&(d({key:`streaming-redis-key-${r}`,value:{mmvf_list:i,knowledgeBase:a,projectAnalyserSummary:l,dataSources_files:c,ai_reasonings:u}}),v.current=I),[...i]})})}catch(e){console.error("Error in processing Stream Content",e)}}}};
2
2
  //# sourceMappingURL=useStreamContentHandler.js.map
@@ -1,2 +1,2 @@
1
- import{jsx as i,Fragment as t,jsxs as o}from"react/jsx-runtime";import{useRef as n,useMemo as e,Suspense as a}from"react";import l from"react-markdown";import c from"rehype-raw";import{ChevronDown as d,ChevronUp as s,Maximize2 as r,X as u,Info as m}from"lucide-react";import{Tooltip as v}from"@mui/material";import p from"./AiReasonMarkdownWrapper.module.css.js";import _ from"../../shared/ExpandableOl.js";import h from"../citations/web-citation/WebCitationWithImageRenderer.js";import f from"../citations/web-citation/WebCitationRenderer.js";import g from"../citations/image-citation/ImageCitationRenderer.js";import C from"../citations/file-citation/FileCitationRender.js";import{useRequirementAI as b}from"../RequirementAIWrapper/RequirementAIWrapper.js";import y from"../citations/stormee-citation/StormeeCitationRenderer.js";import I from"../citations/audio-citation/WaveformCitationRenderer.js";import k from"../citations/appmod-citation/AppmodCitationRenderer.js";import S from"../citations/rca-citation/RCACitationRenderer.js";import w from"../citations/readfile-citation/ReadFileCitationRenderer.js";import M from"../citations/chat-citation/ChatCitationRenderer.js";import{NonWebReasoningComponent as R}from"@e-llm-studio/citation";import N from"../citations/big-enough/BigEnoughCitationRenderer.js";import j from"./ScannedCitationRenderer.js";import F from"../citations/gpt-web-citation/GptWebCitationRenderer.js";const D=["appmode_citation","appmode_citations","appmod_citation","appmod_citations","image_citation","image_citations","audio_citation","audio_citations","document_citation","document_citations","rca_citation","rca_citations","web_citation","web_citations","code_generated","chat_citation","readfile_citation","readfile_citations","gpt_citation","gpt_citations","big_enough_block","scanned_doc_citation","scanned_doc_citations"],O=(i,t,o)=>{const n=Number.isFinite(t)&&Number.isFinite(o);return[...i.map((i,e)=>{const a=e>=t&&e<=o;return{...i,highlighted_text:n?a?i.message:"":i.highlighted_text}})]},L=({label:L,message:$,isExpandableOrderedListEnabled:x,customStyles:P,citationStyles:W,customIcons:A,onSelectProceed:E,isDisableProceedButton:T,big_enough_block:H,aiReason:q})=>{const G=n(null),{citations:U,citationConfig:z,chatHistory:B,onFetchOnDemandCitation:V,chatCitationConfigs:J,gptCitationConfigs:K}=b(),Q=async(i,t,o,n)=>{if(V)try{await V(i,t,o,n||"","reasoning")}catch(t){console.error(`[On-Demand Fetch Error] Failed to load citation ${i}:`,t)}},X=e(()=>({h1:({node:t,...o})=>i("h1",{className:p.h1,style:null==P?void 0:P.h1,children:null==o?void 0:o.children}),h2:({node:t,...o})=>i("h2",{className:p.h2,style:null==P?void 0:P.h2,children:null==o?void 0:o.children}),h3:({node:t,...o})=>i("h2",{className:p.h3,style:null==P?void 0:P.h3,children:null==o?void 0:o.children}),b:({node:t,...o})=>i("b",{className:p.bold,style:null==P?void 0:P.b}),p:({node:t,...o})=>i("p",{...o,className:p.paragraph,style:null==P?void 0:P.p,children:null==o?void 0:o.children}),ol:({node:t,...o})=>x?i(_,{label:L,customStyles:null==P?void 0:P.expandOlStyle,onProceed:E,isProceedDisabled:T,aiReasoningCitation:U,citationStyles:W,customIcons:A,aiReason:q,children:null==o?void 0:o.children}):i("ol",{className:p.orderedList,style:null==P?void 0:P.ol,children:null==o?void 0:o.children}),ul:({node:t,...o})=>i("ul",{className:p.unorderedList,children:null==o?void 0:o.children}),a:({inline:n,children:e,node:l,...c})=>{var m,_,b,L,x,E,T,G,V,X,Y,Z,ii,ti,oi,ni,ei,ai,li,ci,di,si,ri,ui,mi,vi,pi,_i,hi;const fi="true"===(null==c?void 0:c.table),gi=`${null==c?void 0:c.href}`,[Ci,bi=""]=gi.split("$"),[yi,Ii=""]=bi.split("?"),ki=null==c?void 0:c.source,Si=new URLSearchParams(gi.split("?")[1]).get("on_demand"),wi="string"==typeof Si&&""!==Si.trim()?Si:null,Mi="citation-fetch-strategy"in c&&"on-demand"===c["citation-fetch-strategy"],Ri="appmode_citation"===Ci||"appmode_citations"===Ci?(null==U?void 0:U.appmod_citations)||[]:"image_citation"===Ci||"image_citations"===Ci?(null==U?void 0:U.image_citations)||[]:"audio_citation"===Ci||"audio_citations"===Ci?(null==U?void 0:U.audio_citations)||[]:"document_citation"===Ci||"document_citations"===Ci?(null==U?void 0:U.file_citations)||[]:"rca_citation"===Ci||"rca_citations"===Ci?(null==U?void 0:U.rca_citations)||[]:"web_citation"===Ci||"web_citations"===Ci?(null==U?void 0:U.web_citations)||[]:"code_generated"===Ci?(null==U?void 0:U.code_generated)||[]:"readfile_citation"===Ci||"readfile_citations"===Ci?(null==U?void 0:U.readfile_citations)||[]:"gpt_citation"===Ci||"gpt_citations"===Ci?(null==U?void 0:U.gpt_citations)||[]:"scanned_doc_citation"===Ci||"scanned_doc_citations"===Ci?(null==U?void 0:U.scanned_doc_citations)||[]:"big_enough_block"===Ci&&H||[];console.log("citation?.customMetadata?.value",Ri,U);const Ni=Ri.find(i=>i.citation_number===decodeURIComponent(yi)),ji=D.includes(Ci);if("big_enough_block"===Ci&&Ni)return i(N,{title:e,citation:Ni,customStyles:null==W?void 0:W.bigEnoughCitation,customIcons:A});if("chat_citation"===Ci){if(!B||0===B.length)return null;let t=0,o=B.length-1;if("all"!==yi){const[i,n]=yi.split("-").map(Number);t=Number.isFinite(i)?i:0,o=Number.isFinite(n)?n:t,t=t>0?t-1:t,o=o<B.length-1?o+1:o}return i(M,{customIcon:null==A?void 0:A.chatCitationIcon,title:e,chatHistory:O(B,t,o),isTable:fi,chatCitationProps:null==J?void 0:J.chatCitationProps,onCitationClick:null==J?void 0:J.handleCitationClicked,customStyles:null==W?void 0:W.chatCitation,openInFullscreenOnClick:null==J?void 0:J.openInFullscreenOnClick})}if(("gpt_citation"===Ci||"gpt_citations"===Ci)&&Ni)return(null===(m=null==Ni?void 0:Ni.customMetadata)||void 0===m?void 0:m.value)?i(F,{title:e,citation:Ni,customStyles:null==W?void 0:W.webCitation,customIcons:A,content:$}):i(R,{item:{text:"",dataSource:null===(b=null===(_=Ni.customMetadata)||void 0===_?void 0:_.data_sources)||void 0===b?void 0:b[0],trainingDataTitle:null===(x=null===(L=Ni.customMetadata)||void 0===L?void 0:L.training_data_title)||void 0===x?void 0:x[0],paraphrase:null===(T=null===(E=Ni.customMetadata)||void 0===E?void 0:E.paraphrase)||void 0===T?void 0:T[0]},headerTitle:(null==K?void 0:K.title)||"GPT - Gemini 2.5 Flash",iconsConfig:{ChevronDownIcon:d,ChevronUpIcon:s,MaximizeIcon:r,CloseIcon:u},...null==K?void 0:K.gptCitationProps});if("web_citation"===(null===(G=null==Ni?void 0:Ni.customMetadata)||void 0===G?void 0:G.type)||Ci.includes("web_citation"))return(null===(V=null==Ni?void 0:Ni.customMetadata)||void 0===V?void 0:V.screenshot_url)||Ci.includes("web_citation")&&wi?i(h,{title:e,citation:Ni||{citation_number:yi,isLoading:!0},customStyles:null==W?void 0:W.webCitation,customIcons:A,fetchOnDemandCitation:()=>{Q(yi,q,Ci,ki)}}):i(f,{label:e,url:null===(X=null==Ni?void 0:Ni.customMetadata)||void 0===X?void 0:X.link,customStyles:null==W?void 0:W.webCitation,customIcons:A,fetchOnDemandCitation:()=>{Q(yi,q,Ci,ki)}});if("audio_transcript"===(null===(Y=null==Ni?void 0:Ni.customMetadata)||void 0===Y?void 0:Y.type)||Ci.includes("audio_citation"))return"stormee"===(null===(Z=null==Ni?void 0:Ni.customMetadata)||void 0===Z?void 0:Z.audio_citation_mode)?i(a,{fallback:i(t,{}),children:i(y,{title:`${e}`,citation:Ni,customStyles:null==W?void 0:W.stormeeCitation,customIcons:A})}):i(a,{fallback:i(t,{}),children:i(I,{title:`${e}`,citation:Ni||{citation_number:yi},customStyles:null==W?void 0:W.waveformCitation,customIcons:A,fetchOnDemandCitation:()=>{Q(yi,q,Ci,ki)}})});if("scanned_doc_citations"===(null===(ii=null==Ni?void 0:Ni.customMetadata)||void 0===ii?void 0:ii.type)||"scanned_doc_citation"===(null===(ti=null==Ni?void 0:Ni.customMetadata)||void 0===ti?void 0:ti.type)||"scanned_doc_citation"===Ci&&Mi)return console.log("citation?.customMetadata?.value::1",Ni),i(a,{fallback:i(t,{}),children:i(j,{title:e,citation:Ni||{citation_number:yi,isLoading:!0},customIcons:A,customStyles:null==W?void 0:W.scannedDocumentCitation,pdfViewHeaderAction:null==z?void 0:z.pdfViewHeaderAction,fetchOnDemandCitation:()=>{Q(yi,q,Ci)}})});if("image_citation"===(null===(oi=null==Ni?void 0:Ni.customMetadata)||void 0===oi?void 0:oi.type)||Ci.includes("image_citation"))return i(a,{fallback:i(t,{}),children:i(g,{title:`${e}`,citation:Ni||{citation_number:yi,isLoading:!0},customIcons:A,customStyles:null==W?void 0:W.imageCitation,fetchOnDemandCitation:()=>{Q(yi,q,Ci,ki)}})});if("book_citation_doc"===(null===(ni=null==Ni?void 0:Ni.customMetadata)||void 0===ni?void 0:ni.type)||"book_citation_pdf"===(null==Ni?void 0:Ni.customMetadata.type)||Ci.includes("document_citation"))return i(a,{fallback:i(t,{}),children:i(C,{title:`${e}`,citation:Ni||{citation_number:yi,customMetadata:{type:"book_citation_pdf"}},customIcons:A,customStyles:null==W?void 0:W.fileCitation,fetchOnDemandCitation:()=>{Q(yi,q,Ci,ki)}})});if("app_mod_rag_question"===(null===(ei=null==Ni?void 0:Ni.customMetadata)||void 0===ei?void 0:ei.type)||Ci.includes("appmode_citation"))return i(a,{fallback:i(t,{}),children:i(k,{title:`${e}`,citation:Ni||{citation_number:yi,isLoading:!0},customIcons:A,customStyles:null==W?void 0:W.appModCitation,codeLinkConfig:null===(ai=null==z?void 0:z.appMod)||void 0===ai?void 0:ai.codeLinkConfig,isLoading:null===(li=null==z?void 0:z.appMod)||void 0===li?void 0:li.isLoading,fetchOnDemandCitation:()=>{Q(yi,q,Ci,ki)}})});if("rca_citation"===(null===(ci=null==Ni?void 0:Ni.customMetadata)||void 0===ci?void 0:ci.type))return i(a,{fallback:i(t,{}),children:i(S,{title:`${e}`,citation:Ni,customIcons:A,customStyles:null==W?void 0:W.rcaCitation})});if("readfile_citation"===(null===(di=null==Ni?void 0:Ni.customMetadata)||void 0===di?void 0:di.type)||Ci.includes("readfile_citation"))return i(a,{fallback:i(t,{}),children:i(w,{title:`${e}`,citation:Ni||{citation_number:yi},customIcons:A,customStyles:null==W?void 0:W.readFileCitation,fileCallback:null===(si=null==z?void 0:z.readFile)||void 0===si?void 0:si.fileCallback,editorConfig:null===(ri=null==z?void 0:z.readFile)||void 0===ri?void 0:ri.editorConfig,customColors:null===(ui=null==z?void 0:z.readFile)||void 0===ui?void 0:ui.customColors,fetchOnDemandCitation:()=>{Q(yi,q,Ci)}})});if(ji&&!Ni){const t=null!==(mi=null==A?void 0:A.citationLoadingIcon)&&void 0!==mi?mi:i("span",{className:p.citationSpinner,style:null===(vi=null==W?void 0:W.loadingCitations)||void 0===vi?void 0:vi.citationSpinner});return i(v,{title:null!==(_i=null===(pi=null==W?void 0:W.loadingCitations)||void 0===pi?void 0:pi.tooltipTitle)&&void 0!==_i?_i:`source ${Ci.split("_")[0]} citations`,arrow:!0,children:o("span",{className:p.citationSpinnerWrapper,style:null===(hi=null==W?void 0:W.loadingCitations)||void 0===hi?void 0:hi.citationSpinnerWrapper,children:[e,t]})})}return i("span",{...c,className:p.paragraph,style:null==P?void 0:P.p,children:null==c?void 0:c.children})},code:({inline:t,children:o,className:n,node:e,...a})=>/language-(\w+)/.exec(n||"")||(null==n?void 0:n.includes("language-"))?i("div",{children:i("code",{className:p.blockCode,children:o})}):i("code",{className:p.inlineCode,style:null==P?void 0:P.code,children:o}),learned:({children:o})=>i(t,{children:i(v,{title:o,placement:"top",children:i(m,{size:16,className:p.learnedIcon})})})}),[U,x,z,B,H]);return i("div",{ref:G,className:"w-full",children:i(l,{components:X,rehypePlugins:[c],children:$})})};export{L as AiReasonMarkdownWrapper,O as formatChatData};
1
+ import{jsx as i,Fragment as t,jsxs as o}from"react/jsx-runtime";import{useRef as n,useMemo as e,Suspense as a}from"react";import l from"react-markdown";import c from"rehype-raw";import{ChevronDown as d,ChevronUp as s,Maximize2 as r,X as u,Info as m}from"lucide-react";import{Tooltip as v}from"@mui/material";import p from"./AiReasonMarkdownWrapper.module.css.js";import _ from"../../shared/ExpandableOl.js";import h from"../citations/web-citation/WebCitationWithImageRenderer.js";import f from"../citations/web-citation/WebCitationRenderer.js";import g from"../citations/image-citation/ImageCitationRenderer.js";import C from"../citations/file-citation/FileCitationRender.js";import{useRequirementAI as b}from"../RequirementAIWrapper/RequirementAIWrapper.js";import y from"../citations/stormee-citation/StormeeCitationRenderer.js";import I from"../citations/audio-citation/WaveformCitationRenderer.js";import k from"../citations/appmod-citation/AppmodCitationRenderer.js";import S from"../citations/rca-citation/RCACitationRenderer.js";import w from"../citations/readfile-citation/ReadFileCitationRenderer.js";import M from"../citations/chat-citation/ChatCitationRenderer.js";import{NonWebReasoningComponent as R}from"@e-llm-studio/citation";import N from"../citations/big-enough/BigEnoughCitationRenderer.js";import j from"./ScannedCitationRenderer.js";import F from"../citations/gpt-web-citation/GptWebCitationRenderer.js";const D=["appmode_citation","appmode_citations","appmod_citation","appmod_citations","image_citation","image_citations","audio_citation","audio_citations","document_citation","document_citations","rca_citation","rca_citations","web_citation","web_citations","code_generated","chat_citation","readfile_citation","readfile_citations","gpt_citation","gpt_citations","big_enough_block","scanned_doc_citation","scanned_doc_citations"],O=(i,t,o)=>{const n=Number.isFinite(t)&&Number.isFinite(o);return[...i.map((i,e)=>{const a=e>=t&&e<=o;return{...i,highlighted_text:n?a?i.message:"":i.highlighted_text}})]},L=({label:L,message:$,isExpandableOrderedListEnabled:x,customStyles:P,citationStyles:W,customIcons:A,onSelectProceed:E,isDisableProceedButton:T,big_enough_block:H,aiReason:q})=>{const G=n(null),{citations:U,citationConfig:z,chatHistory:B,onFetchOnDemandCitation:V,chatCitationConfigs:J,gptCitationConfigs:K}=b(),Q=async(i,t,o,n)=>{if(V)try{await V(i,t,o,n||"","reasoning")}catch(t){console.error(`[On-Demand Fetch Error] Failed to load citation ${i}:`,t)}},X=e(()=>({h1:({node:t,...o})=>i("h1",{className:p.h1,style:null==P?void 0:P.h1,children:null==o?void 0:o.children}),h2:({node:t,...o})=>i("h2",{className:p.h2,style:null==P?void 0:P.h2,children:null==o?void 0:o.children}),h3:({node:t,...o})=>i("h2",{className:p.h3,style:null==P?void 0:P.h3,children:null==o?void 0:o.children}),b:({node:t,...o})=>i("b",{className:p.bold,style:null==P?void 0:P.b}),p:({node:t,...o})=>i("p",{...o,className:p.paragraph,style:null==P?void 0:P.p,children:null==o?void 0:o.children}),ol:({node:t,...o})=>x?i(_,{label:L,customStyles:null==P?void 0:P.expandOlStyle,onProceed:E,isProceedDisabled:T,aiReasoningCitation:U,citationStyles:W,customIcons:A,aiReason:q,children:null==o?void 0:o.children}):i("ol",{className:p.orderedList,style:null==P?void 0:P.ol,children:null==o?void 0:o.children}),ul:({node:t,...o})=>i("ul",{className:p.unorderedList,children:null==o?void 0:o.children}),a:({inline:n,children:e,node:l,...c})=>{var m,_,b,L,x,E,T,G,V,X,Y,Z,ii,ti,oi,ni,ei,ai,li,ci,di,si,ri,ui,mi,vi,pi,_i,hi;const fi="true"===(null==c?void 0:c.table),gi=`${null==c?void 0:c.href}`,[Ci,bi=""]=gi.split("$"),[yi,Ii=""]=bi.split("?"),ki=null==c?void 0:c.source;console.log("testing::props",c,null==c?void 0:c.id);const Si=null==c?void 0:c.id,wi=new URLSearchParams(gi.split("?")[1]).get("on_demand"),Mi="string"==typeof wi&&""!==wi.trim()?wi:null,Ri="citation-fetch-strategy"in c&&"on-demand"===c["citation-fetch-strategy"],Ni="appmode_citation"===Ci||"appmode_citations"===Ci?(null==U?void 0:U.appmod_citations)||[]:"image_citation"===Ci||"image_citations"===Ci?(null==U?void 0:U.image_citations)||[]:"audio_citation"===Ci||"audio_citations"===Ci?(null==U?void 0:U.audio_citations)||[]:"document_citation"===Ci||"document_citations"===Ci?(null==U?void 0:U.file_citations)||[]:"rca_citation"===Ci||"rca_citations"===Ci?(null==U?void 0:U.rca_citations)||[]:"web_citation"===Ci||"web_citations"===Ci?(null==U?void 0:U.web_citations)||[]:"code_generated"===Ci?(null==U?void 0:U.code_generated)||[]:"readfile_citation"===Ci||"readfile_citations"===Ci?(null==U?void 0:U.readfile_citations)||[]:"gpt_citation"===Ci||"gpt_citations"===Ci?(null==U?void 0:U.gpt_citations)||[]:"scanned_doc_citation"===Ci||"scanned_doc_citations"===Ci?(null==U?void 0:U.scanned_doc_citations)||[]:"big_enough_block"===Ci&&H||[];console.log("citation?.customMetadata?.value",Ni,U);const ji=Ni.find(i=>i.citation_number===decodeURIComponent(yi)),Fi=D.includes(Ci);if("big_enough_block"===Ci&&ji)return i(N,{title:e,citation:ji,customStyles:null==W?void 0:W.bigEnoughCitation,customIcons:A});if("chat_citation"===Ci){if(!B||0===B.length)return null;let t=0,o=B.length-1;if("all"!==yi){const[i,n]=yi.split("-").map(Number);t=Number.isFinite(i)?i:0,o=Number.isFinite(n)?n:t,t=t>0?t-1:t,o=o<B.length-1?o+1:o}return i(M,{customIcon:null==A?void 0:A.chatCitationIcon,title:e,chatHistory:O(B,t,o),isTable:fi,chatCitationProps:null==J?void 0:J.chatCitationProps,onCitationClick:null==J?void 0:J.handleCitationClicked,customStyles:null==W?void 0:W.chatCitation,openInFullscreenOnClick:null==J?void 0:J.openInFullscreenOnClick})}if(("gpt_citation"===Ci||"gpt_citations"===Ci)&&ji)return(null===(m=null==ji?void 0:ji.customMetadata)||void 0===m?void 0:m.value)?i(F,{title:e,citation:ji,customStyles:null==W?void 0:W.webCitation,customIcons:A,content:$}):i(R,{item:{text:"",dataSource:null===(b=null===(_=ji.customMetadata)||void 0===_?void 0:_.data_sources)||void 0===b?void 0:b[0],trainingDataTitle:null===(x=null===(L=ji.customMetadata)||void 0===L?void 0:L.training_data_title)||void 0===x?void 0:x[0],paraphrase:null===(T=null===(E=ji.customMetadata)||void 0===E?void 0:E.paraphrase)||void 0===T?void 0:T[0]},headerTitle:(null==K?void 0:K.title)||"GPT - Gemini 2.5 Flash",iconsConfig:{ChevronDownIcon:d,ChevronUpIcon:s,MaximizeIcon:r,CloseIcon:u},...null==K?void 0:K.gptCitationProps});if("web_citation"===(null===(G=null==ji?void 0:ji.customMetadata)||void 0===G?void 0:G.type)||Ci.includes("web_citation"))return(null===(V=null==ji?void 0:ji.customMetadata)||void 0===V?void 0:V.screenshot_url)||Ci.includes("web_citation")&&Mi?i(h,{title:e,citation:ji||{citation_number:yi,isLoading:!0},customStyles:null==W?void 0:W.webCitation,customIcons:A,fetchOnDemandCitation:()=>{Q(yi,q,Ci,ki)}}):i(f,{label:e,url:null===(X=null==ji?void 0:ji.customMetadata)||void 0===X?void 0:X.link,customStyles:null==W?void 0:W.webCitation,customIcons:A,fetchOnDemandCitation:()=>{Q(yi,q,Ci,ki)}});if("audio_transcript"===(null===(Y=null==ji?void 0:ji.customMetadata)||void 0===Y?void 0:Y.type)||Ci.includes("audio_citation"))return"stormee"===(null===(Z=null==ji?void 0:ji.customMetadata)||void 0===Z?void 0:Z.audio_citation_mode)?i(a,{fallback:i(t,{}),children:i(y,{title:`${e}`,citation:ji,customStyles:null==W?void 0:W.stormeeCitation,customIcons:A})}):i(a,{fallback:i(t,{}),children:i(I,{title:`${e}`,citation:ji||{citation_number:yi},customStyles:null==W?void 0:W.waveformCitation,customIcons:A,fetchOnDemandCitation:()=>{Q(yi,q,Ci,ki)}})});if("scanned_doc_citations"===(null===(ii=null==ji?void 0:ji.customMetadata)||void 0===ii?void 0:ii.type)||"scanned_doc_citation"===(null===(ti=null==ji?void 0:ji.customMetadata)||void 0===ti?void 0:ti.type)||"scanned_doc_citation"===Ci&&Ri)return console.log("citation?.customMetadata?.value::1",ji),i(a,{fallback:i(t,{}),children:i(j,{title:e,citation:ji||{citation_number:yi,isLoading:!0},customIcons:A,customStyles:null==W?void 0:W.scannedDocumentCitation,pdfViewHeaderAction:null==z?void 0:z.pdfViewHeaderAction,fetchOnDemandCitation:()=>{Q(Si,q,Ci)}})});if("image_citation"===(null===(oi=null==ji?void 0:ji.customMetadata)||void 0===oi?void 0:oi.type)||Ci.includes("image_citation"))return i(a,{fallback:i(t,{}),children:i(g,{title:`${e}`,citation:ji||{citation_number:yi,isLoading:!0},customIcons:A,customStyles:null==W?void 0:W.imageCitation,fetchOnDemandCitation:()=>{Q(yi,q,Ci,ki)}})});if("book_citation_doc"===(null===(ni=null==ji?void 0:ji.customMetadata)||void 0===ni?void 0:ni.type)||"book_citation_pdf"===(null==ji?void 0:ji.customMetadata.type)||Ci.includes("document_citation"))return i(a,{fallback:i(t,{}),children:i(C,{title:`${e}`,citation:ji||{citation_number:yi,customMetadata:{type:"book_citation_pdf"}},customIcons:A,customStyles:null==W?void 0:W.fileCitation,fetchOnDemandCitation:()=>{Q(yi,q,Ci,ki)}})});if("app_mod_rag_question"===(null===(ei=null==ji?void 0:ji.customMetadata)||void 0===ei?void 0:ei.type)||Ci.includes("appmode_citation"))return i(a,{fallback:i(t,{}),children:i(k,{title:`${e}`,citation:ji||{citation_number:yi,isLoading:!0},customIcons:A,customStyles:null==W?void 0:W.appModCitation,codeLinkConfig:null===(ai=null==z?void 0:z.appMod)||void 0===ai?void 0:ai.codeLinkConfig,isLoading:null===(li=null==z?void 0:z.appMod)||void 0===li?void 0:li.isLoading,fetchOnDemandCitation:()=>{Q(yi,q,Ci,ki)}})});if("rca_citation"===(null===(ci=null==ji?void 0:ji.customMetadata)||void 0===ci?void 0:ci.type))return i(a,{fallback:i(t,{}),children:i(S,{title:`${e}`,citation:ji,customIcons:A,customStyles:null==W?void 0:W.rcaCitation})});if("readfile_citation"===(null===(di=null==ji?void 0:ji.customMetadata)||void 0===di?void 0:di.type)||Ci.includes("readfile_citation"))return i(a,{fallback:i(t,{}),children:i(w,{title:`${e}`,citation:ji||{citation_number:yi},customIcons:A,customStyles:null==W?void 0:W.readFileCitation,fileCallback:null===(si=null==z?void 0:z.readFile)||void 0===si?void 0:si.fileCallback,editorConfig:null===(ri=null==z?void 0:z.readFile)||void 0===ri?void 0:ri.editorConfig,customColors:null===(ui=null==z?void 0:z.readFile)||void 0===ui?void 0:ui.customColors,fetchOnDemandCitation:()=>{Q(yi,q,Ci)}})});if(Fi&&!ji){const t=null!==(mi=null==A?void 0:A.citationLoadingIcon)&&void 0!==mi?mi:i("span",{className:p.citationSpinner,style:null===(vi=null==W?void 0:W.loadingCitations)||void 0===vi?void 0:vi.citationSpinner});return i(v,{title:null!==(_i=null===(pi=null==W?void 0:W.loadingCitations)||void 0===pi?void 0:pi.tooltipTitle)&&void 0!==_i?_i:`source ${Ci.split("_")[0]} citations`,arrow:!0,children:o("span",{className:p.citationSpinnerWrapper,style:null===(hi=null==W?void 0:W.loadingCitations)||void 0===hi?void 0:hi.citationSpinnerWrapper,children:[e,t]})})}return i("span",{...c,className:p.paragraph,style:null==P?void 0:P.p,children:null==c?void 0:c.children})},code:({inline:t,children:o,className:n,node:e,...a})=>/language-(\w+)/.exec(n||"")||(null==n?void 0:n.includes("language-"))?i("div",{children:i("code",{className:p.blockCode,children:o})}):i("code",{className:p.inlineCode,style:null==P?void 0:P.code,children:o}),learned:({children:o})=>i(t,{children:i(v,{title:o,placement:"top",children:i(m,{size:16,className:p.learnedIcon})})})}),[U,x,z,B,H]);return i("div",{ref:G,className:"w-full",children:i(l,{components:X,rehypePlugins:[c],children:$})})};export{L as AiReasonMarkdownWrapper,O as formatChatData};
2
2
  //# sourceMappingURL=AiReasonMarkdownWrapper.js.map
@@ -1,2 +1,2 @@
1
- import{jsxs as o,jsx as e,Fragment as i}from"react/jsx-runtime";import{useState as n,useRef as l}from"react";import r from"../../icons/BigEnoughIcon.js";import c from"../ai-reasoning/AiReasoningCitationContent.js";import{useRequirementAI as s}from"../RequirementAIWrapper/RequirementAIWrapper.js";import t from"./BigEnoughPanel.module.css.js";const a=({customIcons:a,customStyles:d,currentUserStory:u,panelStyles:v,showPanel:g=!1})=>{var p,m,_,h,y,b;s();const[f,S]=n(!!g),P=l(null);return o("div",{onClick:o=>o.stopPropagation(),children:[!g&&e("button",{ref:P,className:t.developerEffortButton,style:null==v?void 0:v.buttonStyle,onClick:o=>{o.stopPropagation(),S(o=>!o)},children:e(r,{color:null==v?void 0:v.iconColor,size:null==v?void 0:v.iconSize})}),f&&o(i,{children:[e("div",{className:null==t?void 0:t.backdrop,style:g?null==v?void 0:v.showPanelBackdropStyles:null==v?void 0:v.backdropStyle,onClick:o=>{o.stopPropagation(),S(!1)},onWheel:o=>o.stopPropagation()}),o("div",{className:`${t.dropdown} ${g?t.showPanelDropdown:""}`,style:{...null==v?void 0:v.dropdownStyle,...g?null==v?void 0:v.showPanelDropdownStyle:{}},children:[e(c,{cognitiveDecisionHeaders:{mainHeader:`Feature Implementation Score - ${(null==u?void 0:u.big_enough)||0}`},big_enough_block:null===(p=u.big_enough_decision_factors)||void 0===p?void 0:p.big_enough_block,aiReason:{relevance_score:(null===(m=null==u?void 0:u.big_enough_decision_factors)||void 0===m?void 0:m.relevance_score)||0,reason:(null===(_=null==u?void 0:u.big_enough_decision_factors)||void 0===_?void 0:_.score_reason)||"",gap:(null===(h=null==u?void 0:u.big_enough_decision_factors)||void 0===h?void 0:h.gap)||"",id:"big-enough-cd"},customIcons:a,customStyles:d}),(null==u?void 0:u.technicality_score)&&e(c,{cognitiveDecisionHeaders:{mainHeader:`Technicality Score - ${(null==u?void 0:u.technicality_score.score)||0}`},scenario:"technicality_score",aiReason:{relevance_score:Number((null===(y=null==u?void 0:u.technicality_score)||void 0===y?void 0:y.relevance_score)||-1),reason:(null==u?void 0:u.technicality_score.reasoning)||"",gap:(null===(b=null==u?void 0:u.technicality_score)||void 0===b?void 0:b.gap)||"",id:"big-enough-cd"},customIcons:a,customStyles:d})]})]})]})};export{a as BigEnoughPanel};
1
+ import{jsxs as o,jsx as e,Fragment as i}from"react/jsx-runtime";import{useState as n,useRef as l}from"react";import c from"../../icons/BigEnoughIcon.js";import r from"../ai-reasoning/AiReasoningCitationContent.js";import{useRequirementAI as s}from"../RequirementAIWrapper/RequirementAIWrapper.js";import t from"./BigEnoughPanel.module.css.js";const a=({customIcons:a,customStyles:d,currentUserStory:u,panelStyles:v,showPanel:g=!1})=>{var p,m,h,_,y,b;s();const[f,S]=n(!!g),P=l(null);return o("div",{onClick:o=>o.stopPropagation(),children:[!g&&e("button",{ref:P,className:t.developerEffortButton,style:null==v?void 0:v.buttonStyle,onClick:o=>{o.stopPropagation(),S(o=>!o)},children:e(c,{color:null==v?void 0:v.iconColor,size:null==v?void 0:v.iconSize})}),f&&o(i,{children:[e("div",{className:null==t?void 0:t.backdrop,style:g?null==v?void 0:v.showPanelBackdropStyles:null==v?void 0:v.backdropStyle,onClick:o=>{o.stopPropagation(),S(!1)},onWheel:o=>o.stopPropagation()}),e("div",{className:`${t.dropdown} ${g?t.showPanelDropdown:""}`,style:{...null==v?void 0:v.dropdownStyle,...g?null==v?void 0:v.showPanelDropdownStyle:{}},children:o("div",{className:t.scoreContent,children:[e(r,{cognitiveDecisionHeaders:{mainHeader:`Feature Implementation Score - ${(null==u?void 0:u.big_enough)||0}`},big_enough_block:null===(p=u.big_enough_decision_factors)||void 0===p?void 0:p.big_enough_block,aiReason:{relevance_score:(null===(m=null==u?void 0:u.big_enough_decision_factors)||void 0===m?void 0:m.relevance_score)||0,reason:(null===(h=null==u?void 0:u.big_enough_decision_factors)||void 0===h?void 0:h.score_reason)||"",gap:(null===(_=null==u?void 0:u.big_enough_decision_factors)||void 0===_?void 0:_.gap)||"",id:"big-enough-cd"},customIcons:a,customStyles:d}),(null==u?void 0:u.technicality_score)&&e(r,{cognitiveDecisionHeaders:{mainHeader:`Technicality Score - ${(null==u?void 0:u.technicality_score.score)||0}`},scenario:"technicality_score",aiReason:{relevance_score:Number((null===(y=null==u?void 0:u.technicality_score)||void 0===y?void 0:y.relevance_score)||-1),reason:(null==u?void 0:u.technicality_score.reasoning)||"",gap:(null===(b=null==u?void 0:u.technicality_score)||void 0===b?void 0:b.gap)||"",id:"big-enough-cd"},customIcons:a,customStyles:d})]})})]})]})};export{a as BigEnoughPanel};
2
2
  //# sourceMappingURL=BigEnoughPanel.js.map
@@ -1,2 +1,2 @@
1
- var e={developerEffortButton:"BigEnoughPanel-module_developerEffortButton__KLQ-Z",backdrop:"BigEnoughPanel-module_backdrop__J0KVD",dropdown:"BigEnoughPanel-module_dropdown__mlBHL",showPanelDropdown:"BigEnoughPanel-module_showPanelDropdown__qz6dk"};!function(){if("undefined"==typeof document)return;const e=document.createElement("style");e.type="text/css";const o=window.__CSP_NONCE__||document.querySelector('meta[name="csp-nonce"]')?.content;o&&e.setAttribute("nonce",o),e.appendChild(document.createTextNode(".BigEnoughPanel-module_developerEffortButton__KLQ-Z{background-color:#fff;border:1px solid #d1d5db;border-radius:.3rem;box-shadow:0 1px 2px #0000000d;cursor:pointer;margin-right:3px;padding:.4rem .8rem}.BigEnoughPanel-module_backdrop__J0KVD{height:100vh;inset:0;position:absolute;width:100vw;z-index:40}.BigEnoughPanel-module_dropdown__mlBHL.BigEnoughPanel-module_showPanelDropdown__qz6dk{max-height:70vh;overflow-y:scroll;top:10px}.BigEnoughPanel-module_dropdown__mlBHL{background-color:#fff;border:1px solid #e5e7eb;border-radius:8px;left:20px;margin-top:1.25rem;position:absolute;top:100%;width:91.666667%;z-index:40}"));const n=document.head||document.getElementsByTagName("head")[0]||document.documentElement;n&&n.appendChild(e)}();export{e as default};
1
+ var e={developerEffortButton:"BigEnoughPanel-module_developerEffortButton__KLQ-Z",backdrop:"BigEnoughPanel-module_backdrop__J0KVD",dropdown:"BigEnoughPanel-module_dropdown__mlBHL",showPanelDropdown:"BigEnoughPanel-module_showPanelDropdown__qz6dk",scoreContent:"BigEnoughPanel-module_scoreContent__LF08L"};!function(){if("undefined"==typeof document)return;const e=document.createElement("style");e.type="text/css";const o=window.__CSP_NONCE__||document.querySelector('meta[name="csp-nonce"]')?.content;o&&e.setAttribute("nonce",o),e.appendChild(document.createTextNode(".BigEnoughPanel-module_developerEffortButton__KLQ-Z{background-color:#fff;border:1px solid #d1d5db;border-radius:.3rem;box-shadow:0 1px 2px #0000000d;cursor:pointer;margin-right:3px;padding:.4rem .8rem}.BigEnoughPanel-module_backdrop__J0KVD{height:100vh;inset:0;position:absolute;width:100vw;z-index:40}.BigEnoughPanel-module_dropdown__mlBHL.BigEnoughPanel-module_showPanelDropdown__qz6dk{max-height:70vh;overflow-y:scroll;top:10px}.BigEnoughPanel-module_dropdown__mlBHL{background-color:#fff;border:1px solid #e5e7eb;border-radius:8px;left:20px;margin-top:1.25rem;position:absolute;top:100%;width:91.666667%;z-index:40}.BigEnoughPanel-module_scoreContent__LF08L{max-height:70vh;overflow-x:hidden;overflow-y:auto;padding-right:4px}"));const n=document.head||document.getElementsByTagName("head")[0]||document.documentElement;n&&n.appendChild(e)}();export{e as default};
2
2
  //# sourceMappingURL=BigEnoughPanel.module.css.js.map
@@ -1,2 +1,2 @@
1
- import{jsx as e,jsxs as o,Fragment as t}from"react/jsx-runtime";import{useState as l,useRef as n,useCallback as r,useMemo as i,useEffect as a}from"react";import s from"showdown";import{useRequirementAI as d}from"../RequirementAIWrapper/RequirementAIWrapper.js";import{createUserStoriesForApproval as c,cloneUserStories as u}from"../../utils/userstory-approval-transform.utils.js";import{getFirstNonApprovedSegmentId as v,getFirstUnapprovedStoryId as p,approveAllSegments as m}from"../../utils/userstory-approval.utils.js";import{useApprovalStatus as h}from"../../hooks/useApprovalStatus.js";import{ContentSegment as S}from"./components/ContentSegment/ContentSegment.js";import{ApprovalBadge as y}from"./components/ApprovalBadge/ApprovalBadge.js";import g from"./UserStoryApprovalScreen.module.css.js";import{CheckIcon as f}from"../../icons/CheckIcon.js";import{BookmarkIcon as b}from"../../icons/BookmarkIcon.js";import{ApprovalSidebar as I}from"./components/ApprovalSidebar/ApprovalSidebar.js";import{ExternalLink as C,Download as A,Share2 as w,Copy as E,SidebarOpenIcon as N,SidebarCloseIcon as U}from"lucide-react";import{UserStoryApprovalScreenContext as x,useUserStoryApprovalScreen as T}from"./UserStoryApprovalContext.js";import{BigEnoughPanel as k}from"../story-screen/BigEnoughPanel.js";import B from"../../icons/BigEnoughIcon.js";import{Menu as D,MenuItem as F,Tooltip as j}from"@mui/material";import{formatMarkdown as P}from"../../utils/helpers.js";import{replaceTitleSection as R}from"../../utils/user-story.utils.js";const M={showApproveAllButton:!0,allowEditing:!0,allowDeletion:!0,showSidebar:!1,containerHeight:"calc(100vh - 100px)",useFullWidth:!1},_={approveAll:"Approve All",approved:"Approved",approve:"Approve",correctMe:"Correct Me",delete:"Delete",save:"Save",cancel:"Cancel",savingArtifact:"Saving Artifact...",artifactSavedTitle:"Artifact Saved Successfully",artifactSavedMessage:"Your changes have been saved.",saveFailedTitle:"Failed to Save the Artifact",saveFailedMessage:"An error occurred while saving your changes.",emptyContentWarning:"Saving empty content is not allowed",unsavedChangesWarning:"Please save the updated changes to proceed with Approve All"},z=Object.assign(({artifactTitleIds:o,config:t={},callbacks:s={},labels:m={},isDisabled:S=!1,disabledReason:y="",children:f,classNames:b,selectedArtifactId:I})=>{var C;const{userStory:A,customStyles:w}=d(),E={...M,...t},N={..._,...m},[U,T]=l([]),[k,B]=l(""),[D,F]=l(""),[j,P]=l(!1),[R,z]=l(!0),W=n(void 0),$=r((e,o,t,l)=>{s.onShowNotification?s.onShowNotification(e,o,t,l):console.log(`[${e.toUpperCase()}] ${o}: ${t}`)},[s]),L=r(e=>{s.onScrollToElement?s.onScrollToElement(e):(e.style.scrollMarginTop="20px",e.scrollIntoView({behavior:"smooth",block:"start"}))},[s]),O=i(()=>{const e=U.findIndex(e=>e.artifactId===k);return e>=0?e:0},[U,k]),V=U[O];a(()=>{W.current=V},[V]),a(()=>{var e;if(!(null==A?void 0:A.length))return;null===(e=s.onInitialize)||void 0===e||e.call(s),1===A.length&&z(!1),A.length>0&&!k&&B(I||A[0].artifactId);const o=c(u(A));T(o)},[A,I]),a(()=>{I&&I!==k&&B(I)},[I,k]),a(()=>{if(!V)return;const e=v(V,"");F(e)},[null==V?void 0:V.artifactId]);const q=r((e,o)=>{T(t=>{const l=[...t];if("APPROVED"===o.approval_status&&"APPROVED"!==t[e].approval_status){const e=p(t,o.artifactId);e&&B(e)}return l[e]=o,l})},[]),H=r(e=>{const o=W.current;if(!o)return;const t=v(o,e);"NA"!==t&&(F(""),setTimeout(()=>{F(t)},0))},[]);h({userStoryForApproval:U,selectedUserStoryForApproval:V,userStoryIndex:O,callbacks:s,labels:N,onSaveUserStory:q});const G={height:E.containerHeight,...E.useFullWidth?{width:"100%",marginLeft:0,marginRight:0}:{width:"calc(100% + 40px)",marginLeft:"-20px",marginRight:"-20px"}},Y={userStoryForApproval:U,setUserStoryForApproval:T,selectedStoryArtifactId:k,setSelectedStoryArtifactId:B,selectedUserStoryIndex:O,selectedUserStoryForApproval:V,currentContentId:D,setCurrentContentId:F,isEditingSegment:j,setIsEditingSegment:P,isSidebarExpanded:R,setIsSidebarExpanded:z,artifactTitleIds:o,config:E,labels:N,callbacks:s,isDisabled:S,disabledReason:y,handleSaveUserStory:q,handleUpdateContentId:H,showNotification:$,scrollToElement:L};return e(x.Provider,{value:Y,children:e("div",{className:`${g.container} ${(null==b?void 0:b.container)||""}`,style:{...G,...null===(C=null==w?void 0:w.approvalScreen)||void 0===C?void 0:C.wrapperContainer},children:f})})},{Sidebar:({Component:o,config:t,className:l})=>{const{isSidebarExpanded:n,selectedStoryArtifactId:r,setSelectedStoryArtifactId:i,userStoryForApproval:a,isEditingSegment:s,artifactTitleIds:d}=T();return o?e(o,{isSidebarExpanded:n,selectedStoryArtifactId:r,setSelectedStoryArtifactId:i,userStoryForApproval:a,isEditingAnUserStorySegment:s,artifactTitleIds:d}):e(I,{config:t,className:l})},SidebarToggle:({OpenIcon:o,CloseIcon:t,className:l=""})=>{const{isSidebarExpanded:n,setIsSidebarExpanded:r}=T(),i=o||N,a=t||U;return e("div",{className:`${g.sidebarToggleWrapper} ${l}`,children:e("button",{onClick:()=>r(e=>!e),className:g.sidebarToggleBtn,"aria-label":n?"Collapse sidebar":"Expand sidebar",type:"button",children:e(n?a:i,{})})})},Content:({children:i,ButtonComponent:a,hideApproveAll:c=!1,pageTitle:u="Review Generated Requirements",showShareIcon:v=!1,handleDownloadUserStory:p,handleOpenSendDialog:h,pageDescription:S="This page displays automatically generated requirements for your project. Use this screen to review, refine, correct, or approve all generated requirements."})=>{var I,N,U,x,M,_,z,W,$,L,O,V,q,H,G,Y,J,K,Q,X,Z,ee,oe,te,le,ne,re,ie,ae,se,de;const{selectedUserStoryForApproval:ce,selectedUserStoryIndex:ue,artifactTitleIds:ve,labels:pe,config:me,isDisabled:he,disabledReason:Se,isEditingSegment:ye,handleSaveUserStory:ge,setCurrentContentId:fe,showNotification:be}=T(),{userStory:Ie,setUserStory:Ce}=d(),Ae=Ie[0],[we,Ee]=l(null),Ne=()=>{Ee(null)},Ue=n(null),[xe,Te]=l(!1),{customStyles:ke,customIcons:Be}=d(),De=null==ke?void 0:ke.userStoryCardStyles,[Fe,je]=l(!1),Pe=r(()=>{if(!ce)return;if(ye)return void be("warn","Warning!",pe.unsavedChangesWarning,3e3);const e=m(ce);ge(ue,e),fe("")},[ce,ue,ye,pe,ge,fe,be]);if(!ce)return null;const Re=ve[ue]||"",Me="APPROVED"===ce.approval_status,_e=he?Se:"",ze=null!=(null==ce?void 0:ce.big_enough)&&!Number.isNaN(ce.big_enough)&&!!(null==ce?void 0:ce.big_enough_decision_factors);return o("div",{className:g.content,style:{...null===(N=null===(I=null==ke?void 0:ke.approvalScreen)||void 0===I?void 0:I.content)||void 0===N?void 0:N.content},"data-lsc-ui-page-title":u,"data-lsc-ui-page-description":S,children:[o("div",{className:g.header,style:{...null===(M=null===(x=null===(U=null==ke?void 0:ke.approvalScreen)||void 0===U?void 0:U.body)||void 0===x?void 0:x.contentSegment)||void 0===M?void 0:M.header},children:[o("div",{className:g.headerLeft,style:{...null===(z=null===(_=null==ke?void 0:ke.approvalScreen)||void 0===_?void 0:_.content)||void 0===z?void 0:z.headerLeft},children:[o("div",{className:g.headerMeta,style:{...null===(L=null===($=null===(W=null==ke?void 0:ke.approvalScreen)||void 0===W?void 0:W.body)||void 0===$?void 0:$.contentSegment)||void 0===L?void 0:L.headerMeta},children:[e(b,{size:16,color:(null===(q=null===(V=null===(O=null==ke?void 0:ke.approvalScreen)||void 0===O?void 0:O.body)||void 0===V?void 0:V.contentSegment)||void 0===q?void 0:q.bookMarkColor)||"#8C8C8C"}),e("h2",{className:g.headerArtifactId,style:{...null===(Y=null===(G=null===(H=null==ke?void 0:ke.approvalScreen)||void 0===H?void 0:H.body)||void 0===G?void 0:G.contentSegment)||void 0===Y?void 0:Y.headerArtifactId},children:Re})]}),e("p",{className:g.headerTitle,style:{...null===(Q=null===(K=null===(J=null==ke?void 0:ke.approvalScreen)||void 0===J?void 0:J.body)||void 0===K?void 0:K.contentSegment)||void 0===Q?void 0:Q.headerTitle},children:null==ce?void 0:ce.title})]}),o("div",{className:null==g?void 0:g.containerStyle,style:null===(Z=null===(X=null==ke?void 0:ke.approvalScreen)||void 0===X?void 0:X.BigEnoughStyles)||void 0===Z?void 0:Z.containerStyle,children:[ze&&e("button",{className:g.developerEffortButton,style:null===(oe=null===(ee=null==ke?void 0:ke.approvalScreen)||void 0===ee?void 0:ee.BigEnoughStyles)||void 0===oe?void 0:oe.buttonStyle,onClick:()=>je(!Fe),children:e(B,{color:null===(le=null===(te=null==ke?void 0:ke.approvalScreen)||void 0===te?void 0:te.BigEnoughStyles)||void 0===le?void 0:le.iconColor,size:null===(re=null===(ne=null==ke?void 0:ke.approvalScreen)||void 0===ne?void 0:ne.BigEnoughStyles)||void 0===re?void 0:re.iconSize})}),v&&o(t,{children:[e("button",{className:g.iconButton,style:null==De?void 0:De.iconButton,onClick:e=>{Ee(e.currentTarget)},children:e(C,{size:16})}),o(D,{id:"user-story-share-menu",anchorEl:we,open:!!we,onClose:()=>Ee(null),style:null==De?void 0:De.userStoryShareMenu,children:[e(F,{style:null==De?void 0:De.userStoryMenuItem,onClick:async()=>{Te(!0),p&&(await Promise.all([p("pdf"),p("doc")]),Te(!1))},children:o("div",{ref:Ue,className:g.menuItemContent,style:null==De?void 0:De.menuItemContent,children:[e(A,{size:16,color:null==De?void 0:De.menuIconColor}),e("p",{style:null==De?void 0:De.menuLabel,children:"Download"})]})}),e(F,{style:null==De?void 0:De.userStoryMenuItem,onClick:async()=>{let e=Ae;e={...Ae,value:`${R(null==Ae?void 0:Ae.value,Ae.title)}`},null==h||h(!0,[e],Ae.artifactId),Ne()},children:o("div",{style:null==De?void 0:De.menuItemContent,className:g.menuItemContentPadded,children:[e(w,{size:16,color:null==De?void 0:De.menuIconColor}),e("p",{style:null==De?void 0:De.menuLabel,children:"Send"})]})}),e(F,{style:null==De?void 0:De.userStoryMenuItem,onClick:async()=>{const e=(new s.Converter).makeHtml(P(Ae.value)||Ae.value),o=function(e){const o=(new s.Converter).makeHtml(e),t=document.createElement("div");return t.innerHTML=o,t.textContent||t.innerText||""}(P(Ae.value)||Ae.value),t=new ClipboardItem({"text/plain":new Blob([o],{type:"text/plain"}),"text/html":new Blob([e],{type:"text/html"})});try{await navigator.clipboard.write([t]),console.log("Copied User Story")}catch(e){console.error("Failed to copy user story:",e)}finally{Ne()}},children:o("div",{style:null==De?void 0:De.menuItemContent,className:g.menuItemContentPadded,children:[e(E,{size:16,color:null==De?void 0:De.menuIconColor}),e("p",{style:null==De?void 0:De.menuLabel,children:"Copy"})]})})]})]}),!c&&me.showApproveAllButton&&e("div",{className:g.headerRight,children:Me?e(y,{status:"APPROVED",label:pe.approved}):e(j,a?{title:_e,children:e("span",{children:e(a,{type:"fill",onClick:Pe,isDisable:he,className:g.approveAllButton,overrideStyles:!0,lscUIAgent:{id:"approve-all",lscUIType:"button",lscUILabel:pe.approveAll,lscUIDescription:"Clicks this button to approve all generated requirements on the page in a single action.",lscUIWhenToApply:"Apply when the user wants to accept all requirements without reviewing them individually, or when they say phrases like 'approve everything', 'finalize all', 'accept all', or 'this looks good, approve all'."},children:o("div",{className:g.approveAllContent,children:[e(f,{size:16,color:"white"}),e("span",{children:pe.approveAll})]})})})}:{title:_e,children:e("span",{children:o("button",{onClick:Pe,disabled:he,className:g.approveAllButtonDefault,style:{...null===(ae=null===(ie=null==ke?void 0:ke.approvalScreen)||void 0===ie?void 0:ie.content)||void 0===ae?void 0:ae.approveAllButtonDefault},children:[e(f,{size:16,color:"white"}),e("span",{children:pe.approveAll})]})})})})]})]}),Fe&&ze&&e("div",{className:g.bigEnoughWrapper,children:e(k,{customIcons:null==Be?void 0:Be.userStoryIcons,customStyles:null===(se=null==ke?void 0:ke.approvalScreen)||void 0===se?void 0:se.aiReasoningCitaionStyles,currentUserStory:ce,panelStyles:null===(de=null==ke?void 0:ke.approvalScreen)||void 0===de?void 0:de.BigEnoughStyles,showPanel:Fe})}),i]})},Body:({children:t,EditorComponent:l,ViewerComponent:n,handleDownloadUserStory:i,handleOpenSendDialog:a,showShareIcon:s=!1})=>{var c,u,v;const{selectedUserStoryForApproval:p,selectedUserStoryIndex:m,artifactTitleIds:h,handleSaveUserStory:y}=T(),{customStyles:f}=d(),b=r(e=>{y(m,e)},[m,y]),I=r((e,o)=>{var t;if(!p)return;const l={...p,sub_features:null===(t=p.sub_features)||void 0===t?void 0:t.map((t,l)=>l===e?o:t)};y(m,l)},[p,m,y]),C=r(e=>{var o;if(!p)return;const t={...p,sub_features:null===(o=p.sub_features)||void 0===o?void 0:o.filter((o,t)=>t!==e)};y(m,t)},[p,m,y]);if(!p)return null;const A=h[m]||"";return o("div",{className:g.body,style:{...null===(u=null===(c=null==f?void 0:f.approvalScreen)||void 0===c?void 0:c.body)||void 0===u?void 0:u.container},children:[e(S,{userStoryForApproval:p,artifactTitleId:A,onSaveMainStoryContent:b,EditorComponent:l,ViewerComponent:n}),null===(v=p.sub_features)||void 0===v?void 0:v.map((o,t)=>e(S,{userStoryForApproval:o,artifactTitleId:`${A} - ${String.fromCharCode(65+t)}`,isSubFeature:!0,subFeatureIndex:t,onSaveSubFeature:I,onDeleteSubFeature:C,EditorComponent:l,ViewerComponent:n,handleDownloadUserStory:i,handleOpenSendDialog:a,showShareIcon:s},o.artifactId)),t]})}});export{z as default};
1
+ import{jsx as e,jsxs as o,Fragment as t}from"react/jsx-runtime";import{useState as l,useRef as n,useCallback as r,useMemo as i,useEffect as a}from"react";import s from"showdown";import{useRequirementAI as d}from"../RequirementAIWrapper/RequirementAIWrapper.js";import{createUserStoriesForApproval as c,cloneUserStories as u}from"../../utils/userstory-approval-transform.utils.js";import{getFirstNonApprovedSegmentId as p,getFirstUnapprovedStoryId as v,approveAllSegments as m}from"../../utils/userstory-approval.utils.js";import{useApprovalStatus as h}from"../../hooks/useApprovalStatus.js";import{ContentSegment as S}from"./components/ContentSegment/ContentSegment.js";import{ApprovalBadge as y}from"./components/ApprovalBadge/ApprovalBadge.js";import g from"./UserStoryApprovalScreen.module.css.js";import{CheckIcon as f}from"../../icons/CheckIcon.js";import{BookmarkIcon as b}from"../../icons/BookmarkIcon.js";import{ApprovalSidebar as I}from"./components/ApprovalSidebar/ApprovalSidebar.js";import{ExternalLink as A,Download as C,Share2 as w,Copy as N,SidebarOpenIcon as U,SidebarCloseIcon as E}from"lucide-react";import{UserStoryApprovalScreenContext as x,useUserStoryApprovalScreen as T}from"./UserStoryApprovalContext.js";import{BigEnoughPanel as k}from"../story-screen/BigEnoughPanel.js";import{Menu as D,MenuItem as F,Tooltip as B}from"@mui/material";import{formatMarkdown as j}from"../../utils/helpers.js";import{replaceTitleSection as R}from"../../utils/user-story.utils.js";const M={showApproveAllButton:!0,allowEditing:!0,allowDeletion:!0,showSidebar:!1,containerHeight:"calc(100vh - 100px)",useFullWidth:!1},P={approveAll:"Approve All",approved:"Approved",approve:"Approve",correctMe:"Correct Me",delete:"Delete",save:"Save",cancel:"Cancel",savingArtifact:"Saving Artifact...",artifactSavedTitle:"Artifact Saved Successfully",artifactSavedMessage:"Your changes have been saved.",saveFailedTitle:"Failed to Save the Artifact",saveFailedMessage:"An error occurred while saving your changes.",emptyContentWarning:"Saving empty content is not allowed",unsavedChangesWarning:"Please save the updated changes to proceed with Approve All"},_=Object.assign(({artifactTitleIds:o,config:t={},callbacks:s={},labels:m={},isDisabled:S=!1,disabledReason:y="",children:f,classNames:b,selectedArtifactId:I})=>{var A;const{userStory:C,customStyles:w}=d(),N={...M,...t},U={...P,...m},[E,T]=l([]),[k,D]=l(""),[F,B]=l(""),[j,R]=l(!1),[_,W]=l(!0),$=n(void 0),z=r((e,o,t,l)=>{s.onShowNotification?s.onShowNotification(e,o,t,l):console.log(`[${e.toUpperCase()}] ${o}: ${t}`)},[s]),L=r(e=>{s.onScrollToElement?s.onScrollToElement(e):(e.style.scrollMarginTop="20px",e.scrollIntoView({behavior:"smooth",block:"start"}))},[s]),O=i(()=>{const e=E.findIndex(e=>e.artifactId===k);return e>=0?e:0},[E,k]),V=E[O];a(()=>{$.current=V},[V]),a(()=>{var e;if(!(null==C?void 0:C.length))return;null===(e=s.onInitialize)||void 0===e||e.call(s),1===C.length&&W(!1),C.length>0&&!k&&D(I||C[0].artifactId);const o=c(u(C));T(o)},[C,I]),a(()=>{I&&I!==k&&D(I)},[I,k]),a(()=>{if(!V)return;const e=p(V,"");B(e)},[null==V?void 0:V.artifactId]);const q=r((e,o)=>{T(t=>{const l=[...t];if("APPROVED"===o.approval_status&&"APPROVED"!==t[e].approval_status){const e=v(t,o.artifactId);e&&D(e)}return l[e]=o,l})},[]),H=r(e=>{const o=$.current;if(!o)return;const t=p(o,e);"NA"!==t&&(B(""),setTimeout(()=>{B(t)},0))},[]);h({userStoryForApproval:E,selectedUserStoryForApproval:V,userStoryIndex:O,callbacks:s,labels:U,onSaveUserStory:q});const G={height:N.containerHeight,...N.useFullWidth?{width:"100%",marginLeft:0,marginRight:0}:{width:"calc(100% + 40px)",marginLeft:"-20px",marginRight:"-20px"}},Y={userStoryForApproval:E,setUserStoryForApproval:T,selectedStoryArtifactId:k,setSelectedStoryArtifactId:D,selectedUserStoryIndex:O,selectedUserStoryForApproval:V,currentContentId:F,setCurrentContentId:B,isEditingSegment:j,setIsEditingSegment:R,isSidebarExpanded:_,setIsSidebarExpanded:W,artifactTitleIds:o,config:N,labels:U,callbacks:s,isDisabled:S,disabledReason:y,handleSaveUserStory:q,handleUpdateContentId:H,showNotification:z,scrollToElement:L};return e(x.Provider,{value:Y,children:e("div",{className:`${g.container} ${(null==b?void 0:b.container)||""}`,style:{...G,...null===(A=null==w?void 0:w.approvalScreen)||void 0===A?void 0:A.wrapperContainer},children:f})})},{Sidebar:({Component:o,config:t,className:l})=>{const{isSidebarExpanded:n,selectedStoryArtifactId:r,setSelectedStoryArtifactId:i,userStoryForApproval:a,isEditingSegment:s,artifactTitleIds:d}=T();return o?e(o,{isSidebarExpanded:n,selectedStoryArtifactId:r,setSelectedStoryArtifactId:i,userStoryForApproval:a,isEditingAnUserStorySegment:s,artifactTitleIds:d}):e(I,{config:t,className:l})},SidebarToggle:({OpenIcon:o,CloseIcon:t,className:l=""})=>{const{isSidebarExpanded:n,setIsSidebarExpanded:r}=T(),i=o||U,a=t||E;return e("div",{className:`${g.sidebarToggleWrapper} ${l}`,children:e("button",{onClick:()=>r(e=>!e),className:g.sidebarToggleBtn,"aria-label":n?"Collapse sidebar":"Expand sidebar",type:"button",children:e(n?a:i,{})})})},Content:({children:i,ButtonComponent:a,hideApproveAll:c=!1,pageTitle:u="Review Generated Requirements",showShareIcon:p=!1,handleDownloadUserStory:v,handleOpenSendDialog:h,pageDescription:S="This page displays automatically generated requirements for your project. Use this screen to review, refine, correct, or approve all generated requirements."})=>{var I,U,E,x,M,P,_,W,$,z,L,O,V,q,H,G,Y,J,K,Q,X,Z,ee,oe,te;const{selectedUserStoryForApproval:le,selectedUserStoryIndex:ne,artifactTitleIds:re,labels:ie,config:ae,isDisabled:se,disabledReason:de,isEditingSegment:ce,handleSaveUserStory:ue,setCurrentContentId:pe,showNotification:ve}=T(),{userStory:me,setUserStory:he}=d(),Se=me[0],[ye,ge]=l(null),fe=()=>{ge(null)},be=n(null),[Ie,Ae]=l(!1),{customStyles:Ce,customIcons:we}=d(),Ne=null==Ce?void 0:Ce.userStoryCardStyles,Ue=r(()=>{if(!le)return;if(ce)return void ve("warn","Warning!",ie.unsavedChangesWarning,3e3);const e=m(le);ue(ne,e),pe("")},[le,ne,ce,ie,ue,pe,ve]);if(!le)return null;const Ee=re[ne]||"",xe="APPROVED"===le.approval_status,Te=se?de:"",ke=null!=(null==le?void 0:le.big_enough)&&!Number.isNaN(le.big_enough)&&!!(null==le?void 0:le.big_enough_decision_factors);return o("div",{className:g.content,style:{...null===(U=null===(I=null==Ce?void 0:Ce.approvalScreen)||void 0===I?void 0:I.content)||void 0===U?void 0:U.content},"data-lsc-ui-page-title":u,"data-lsc-ui-page-description":S,children:[o("div",{className:g.header,style:{...null===(M=null===(x=null===(E=null==Ce?void 0:Ce.approvalScreen)||void 0===E?void 0:E.body)||void 0===x?void 0:x.contentSegment)||void 0===M?void 0:M.header},children:[o("div",{className:g.headerLeft,style:{...null===(_=null===(P=null==Ce?void 0:Ce.approvalScreen)||void 0===P?void 0:P.content)||void 0===_?void 0:_.headerLeft},children:[o("div",{className:g.headerMeta,style:{...null===(z=null===($=null===(W=null==Ce?void 0:Ce.approvalScreen)||void 0===W?void 0:W.body)||void 0===$?void 0:$.contentSegment)||void 0===z?void 0:z.headerMeta},children:[e(b,{size:16,color:(null===(V=null===(O=null===(L=null==Ce?void 0:Ce.approvalScreen)||void 0===L?void 0:L.body)||void 0===O?void 0:O.contentSegment)||void 0===V?void 0:V.bookMarkColor)||"#8C8C8C"}),e("h2",{className:g.headerArtifactId,style:{...null===(G=null===(H=null===(q=null==Ce?void 0:Ce.approvalScreen)||void 0===q?void 0:q.body)||void 0===H?void 0:H.contentSegment)||void 0===G?void 0:G.headerArtifactId},children:Ee})]}),e("p",{className:g.headerTitle,style:{...null===(K=null===(J=null===(Y=null==Ce?void 0:Ce.approvalScreen)||void 0===Y?void 0:Y.body)||void 0===J?void 0:J.contentSegment)||void 0===K?void 0:K.headerTitle},children:null==le?void 0:le.title})]}),o("div",{className:null==g?void 0:g.containerStyle,style:null===(X=null===(Q=null==Ce?void 0:Ce.approvalScreen)||void 0===Q?void 0:Q.BigEnoughStyles)||void 0===X?void 0:X.containerStyle,children:[ke&&e(k,{customIcons:null==we?void 0:we.userStoryIcons,customStyles:null===(Z=null==Ce?void 0:Ce.approvalScreen)||void 0===Z?void 0:Z.aiReasoningCitaionStyles,currentUserStory:le,panelStyles:null===(ee=null==Ce?void 0:Ce.approvalScreen)||void 0===ee?void 0:ee.BigEnoughStyles}),p&&o(t,{children:[e("button",{className:g.iconButton,style:null==Ne?void 0:Ne.iconButton,onClick:e=>{ge(e.currentTarget)},children:e(A,{size:16})}),o(D,{id:"user-story-share-menu",anchorEl:ye,open:!!ye,onClose:()=>ge(null),style:null==Ne?void 0:Ne.userStoryShareMenu,children:[e(F,{style:null==Ne?void 0:Ne.userStoryMenuItem,onClick:async()=>{Ae(!0),v&&(await Promise.all([v("pdf"),v("doc")]),Ae(!1))},children:o("div",{ref:be,className:g.menuItemContent,style:null==Ne?void 0:Ne.menuItemContent,children:[e(C,{size:16,color:null==Ne?void 0:Ne.menuIconColor}),e("p",{style:null==Ne?void 0:Ne.menuLabel,children:"Download"})]})}),e(F,{style:null==Ne?void 0:Ne.userStoryMenuItem,onClick:async()=>{let e=Se;e={...Se,value:`${R(null==Se?void 0:Se.value,Se.title)}`},null==h||h(!0,[e],Se.artifactId),fe()},children:o("div",{style:null==Ne?void 0:Ne.menuItemContent,className:g.menuItemContentPadded,children:[e(w,{size:16,color:null==Ne?void 0:Ne.menuIconColor}),e("p",{style:null==Ne?void 0:Ne.menuLabel,children:"Send"})]})}),e(F,{style:null==Ne?void 0:Ne.userStoryMenuItem,onClick:async()=>{const e=(new s.Converter).makeHtml(j(Se.value)||Se.value),o=function(e){const o=(new s.Converter).makeHtml(e),t=document.createElement("div");return t.innerHTML=o,t.textContent||t.innerText||""}(j(Se.value)||Se.value),t=new ClipboardItem({"text/plain":new Blob([o],{type:"text/plain"}),"text/html":new Blob([e],{type:"text/html"})});try{await navigator.clipboard.write([t]),console.log("Copied User Story")}catch(e){console.error("Failed to copy user story:",e)}finally{fe()}},children:o("div",{style:null==Ne?void 0:Ne.menuItemContent,className:g.menuItemContentPadded,children:[e(N,{size:16,color:null==Ne?void 0:Ne.menuIconColor}),e("p",{style:null==Ne?void 0:Ne.menuLabel,children:"Copy"})]})})]})]}),!c&&ae.showApproveAllButton&&e("div",{className:g.headerRight,children:xe?e(y,{status:"APPROVED",label:ie.approved}):e(B,a?{title:Te,children:e("span",{children:e(a,{type:"fill",onClick:Ue,isDisable:se,className:g.approveAllButton,overrideStyles:!0,lscUIAgent:{id:"approve-all",lscUIType:"button",lscUILabel:ie.approveAll,lscUIDescription:"Clicks this button to approve all generated requirements on the page in a single action.",lscUIWhenToApply:"Apply when the user wants to accept all requirements without reviewing them individually, or when they say phrases like 'approve everything', 'finalize all', 'accept all', or 'this looks good, approve all'."},children:o("div",{className:g.approveAllContent,children:[e(f,{size:16,color:"white"}),e("span",{children:ie.approveAll})]})})})}:{title:Te,children:e("span",{children:o("button",{onClick:Ue,disabled:se,className:g.approveAllButtonDefault,style:{...null===(te=null===(oe=null==Ce?void 0:Ce.approvalScreen)||void 0===oe?void 0:oe.content)||void 0===te?void 0:te.approveAllButtonDefault},children:[e(f,{size:16,color:"white"}),e("span",{children:ie.approveAll})]})})})})]})]}),i]})},Body:({children:t,EditorComponent:l,ViewerComponent:n,handleDownloadUserStory:i,handleOpenSendDialog:a,showShareIcon:s=!1})=>{var c,u,p;const{selectedUserStoryForApproval:v,selectedUserStoryIndex:m,artifactTitleIds:h,handleSaveUserStory:y}=T(),{customStyles:f}=d(),b=r(e=>{y(m,e)},[m,y]),I=r((e,o)=>{var t;if(!v)return;const l={...v,sub_features:null===(t=v.sub_features)||void 0===t?void 0:t.map((t,l)=>l===e?o:t)};y(m,l)},[v,m,y]),A=r(e=>{var o;if(!v)return;const t={...v,sub_features:null===(o=v.sub_features)||void 0===o?void 0:o.filter((o,t)=>t!==e)};y(m,t)},[v,m,y]);if(!v)return null;const C=h[m]||"";return o("div",{className:g.body,style:{...null===(u=null===(c=null==f?void 0:f.approvalScreen)||void 0===c?void 0:c.body)||void 0===u?void 0:u.container},children:[e(S,{userStoryForApproval:v,artifactTitleId:C,onSaveMainStoryContent:b,EditorComponent:l,ViewerComponent:n}),null===(p=v.sub_features)||void 0===p?void 0:p.map((o,t)=>e(S,{userStoryForApproval:o,artifactTitleId:`${C} - ${String.fromCharCode(65+t)}`,isSubFeature:!0,subFeatureIndex:t,onSaveSubFeature:I,onDeleteSubFeature:A,EditorComponent:l,ViewerComponent:n,handleDownloadUserStory:i,handleOpenSendDialog:a,showShareIcon:s},o.artifactId)),t]})}});export{_ as default};
2
2
  //# sourceMappingURL=UserStoryApprovalScreen.js.map
@@ -1,2 +1,2 @@
1
- import{useState as e,useRef as t,useEffect as i}from"react";import{processAIReasoningFromBlocks as o}from"../utils/proccess-stream.utils.js";function n({setUserStory:n,setAiReasoning:r,setUserStoryCitations:s,onStreamingCompleted:a,isGraphQLCallInProgress:l,knowledgeBase:c,projectAnalyserSummary:u,dataSourceFiles:d,aiReasoning:p,setRedisValue:_,fetchCitationByBlock:m,isOnDemandCitation:g}){const[f,b]=e({finalGap:"",finalRisk:"",status:"in-progress"}),v=t(new Set),h=t(new Set),y=t(null),k=t(null),N=t({gap_items_prompt:"",risk_items_prompt:""}),S=t(new Set);return i(()=>{"complete"!==f.status||l||(console.log("streaming::userstory::onStreamingCompleted"),a(f.finalGap,f.finalRisk),v.current.clear(),h.current.clear(),y.current=null,k.current=null,N.current={gap_items_prompt:"",risk_items_prompt:""},S.current.clear(),b({finalGap:"",finalRisk:"",status:"in-progress"}))},[f,l]),{processStreamContent:function(e,t,i,a){try{console.log("streaming::userstory::completed",a,g),a&&g&&(console.log("streaming::userstory::completed::lib"),b({finalGap:"",finalRisk:"",status:"complete"}));const l=JSON.stringify(e);if(k.current===l)return;k.current=l;let f=[],R=[];e=e.map(e=>{var i;const n=`${(e={...e,subBlockNumber:null!==(i=e.subBlockNumber)&&void 0!==i?i:"1"}).storyNumber}-${e.blockNumber}-${e.subBlockNumber}`;if(S.current.has(n))return null;S.current.add(n);let{outputText:a,reasonings:l,gpt_citation:c,processedDescription:u}=o(e.value,e.blockNumber,e.storyNumber,e.description);s(e=>{var t;return c.length>0&&((null==e?void 0:e.gpt_citations)||(e.gpt_citations=[]),null===(t=e.gpt_citations)||void 0===t||t.push(...c)),{...e}}),f.push(...l),R.push([...l]);const d=l.filter(e=>e.on_demand).flatMap(e=>[...e.reason.matchAll(/<a[^>]*href="([^"]+)\?type=on_demand"/g),...e.gap.matchAll(/<a[^>]*href="([^"]+)\?type=on_demand"/g)].map(e=>{const[t,i]=e[1].split("$");return"book_citation_doc"!==t&&"book_citation_pdf"!==t&&"document_citation"!==t?null:{citation_number:i,customMetadata:{type:"document_citation"===t?"book_citation_pdf":t,file_name:"",fileType:"",gcs_upload_url:""}}}).filter(Boolean));d.length&&s(e=>{var t;return{...e,file_citations:[...null!==(t=e.file_citations)&&void 0!==t?t:[],...d]}});let p=`<STORY_NUMBER>${e.storyNumber}<BLOCK_NUMBER>${e.blockNumber}<SUB_BLOCK>${e.subBlockNumber}`;return g||v.current.has(p)||(!async function(e,t,i){var o,n;let a="",l="";try{const c=await m(e,i,t);r(e=>{var t;const i=[...e];return null===(t=c.response.ai_reasonings)||void 0===t||t.forEach(e=>{const t=i.findIndex(t=>t.id===e.id);-1!==t&&e.gap.length>0&&e.reason.length>0&&(i[t]={...e})}),i}),a=(null===(o=c.response)||void 0===o?void 0:o.gap_items_prompt)||"",l=(null===(n=c.response)||void 0===n?void 0:n.risk_items_prompt)||"",(a||l)&&(N.current={gap_items_prompt:a,risk_items_prompt:l}),s(e=>{var t,i,o,n,r,s,a,l,u,d,p,_,m,g;return{...e,appmod_citations:[...null!==(t=e.appmod_citations)&&void 0!==t?t:[],...null!==(i=c.response.appmod_citations)&&void 0!==i?i:[]],audio_citations:[...null!==(o=e.audio_citations)&&void 0!==o?o:[],...null!==(n=c.response.audio_citations)&&void 0!==n?n:[]],file_citations:[...null!==(r=e.file_citations)&&void 0!==r?r:[],...null!==(s=c.response.file_citations)&&void 0!==s?s:[]],image_citations:[...null!==(a=e.image_citations)&&void 0!==a?a:[],...null!==(l=c.response.image_citations)&&void 0!==l?l:[]],rca_citations:[...null!==(u=e.rca_citations)&&void 0!==u?u:[],...null!==(d=c.response.rca_citations)&&void 0!==d?d:[]],web_citations:[...null!==(p=e.web_citations)&&void 0!==p?p:[],...null!==(_=c.response.web_citations)&&void 0!==_?_:[]],readfile_citations:[...null!==(m=e.readfile_citations)&&void 0!==m?m:[],...null!==(g=c.response.readfile_citations)&&void 0!==g?g:[]]}})}catch(t){console.error("[liblogs] processCitationsByBlock error — story:%s block:%s",e.storyNumber,e.blockNumber,t)}finally{let t=`<STORY_NUMBER>${e.storyNumber}<BLOCK_NUMBER>${e.blockNumber}`;if(h.current.add(t),h.current.size===v.current.size){const e=a||N.current.gap_items_prompt,t=l||N.current.risk_items_prompt;b({finalGap:e,finalRisk:t,status:"complete"})}}}({...e,value:a,description:u},l,t),v.current.add(p)),{...e,value:a,description:u}}).filter(Boolean),f.forEach(e=>{r(t=>(t.find(t=>t.id===e.id)||t.push(e),[...t]))}),e.length>0&&e.map(({title:e,section:t,value:o,storyNumber:r,description:s,blockNumber:a,big_enough:l,big_enough_decision_factors:m,technicality_score:g,gapValue:f,confidenceScore:b,metadata:v},h)=>{n(n=>{var k,N,S,B,$,C,O,w;const E=n.findIndex(e=>e.storyNumber===r);if("intro"===t)console.log("testing::intro",g),-1===E?n.push({artifactId:`STORY-${r}-${a}`,title:e,value:o,description:s,storyNumber:r,sub_features:[],section:t,blockNumber:a,aiReasoning:R[h],big_enough:l,big_enough_decision_factors:m,technicality_score:g,gapValue:f,confidenceScore:b,metadata:v}):(n[E].value+=o,n[E].aiReasoning=n[E].aiReasoning||[],null===(N=null===(k=n[E])||void 0===k?void 0:k.aiReasoning)||void 0===N||N.push(...R[h]),n[E].big_enough=l,n[E].big_enough_decision_factors=m,n[E].technicality_score=g,n[E].gapValue=f,n[E].confidenceScore=b,n[E].metadata=v);else{n[E].sub_features||(n[E].sub_features=[]);const i=(null===(B=null===(S=n[E])||void 0===S?void 0:S.sub_features)||void 0===B?void 0:B.findIndex(e=>e.blockNumber===a))||-1;if(-1===i)null===(C=null===($=n[E])||void 0===$?void 0:$.sub_features)||void 0===C||C.push({artifactId:`STORY-${r}-${a}`,title:e,value:o,storyNumber:r,blockNumber:a,section:t,aiReasoning:R[h],big_enough:l,big_enough_decision_factors:m,technicality_score:g,gapValue:f,confidenceScore:b,metadata:v});else{let e=null===(w=null===(O=null==n?void 0:n[E])||void 0===O?void 0:O.sub_features)||void 0===w?void 0:w[i];e.value=(e.value||"")+o,e.aiReasoning=e.aiReasoning||[],e.aiReasoning.push(...R[h]),e.big_enough=l,e.big_enough_decision_factors=m,e.technicality_score=g,e.gapValue=f,e.confidenceScore=b,e.metadata=v}}const U=JSON.stringify(n);return y.current!==U&&(_({key:`streaming-redis-key-${i}`,value:{mmvf_list:n,knowledgeBase:c,projectAnalyserSummary:u,dataSources_files:d,ai_reasonings:p}}),y.current=U),[...n]})})}catch(e){console.error("Error in processing Stream Content",e)}}}}export{n as useStreamContentHandler};
1
+ import{useState as e,useRef as t,useEffect as i}from"react";import{processAIReasoningFromBlocks as o}from"../utils/proccess-stream.utils.js";function n({setUserStory:n,setAiReasoning:r,setUserStoryCitations:s,onStreamingCompleted:a,isGraphQLCallInProgress:l,knowledgeBase:c,projectAnalyserSummary:u,dataSourceFiles:d,aiReasoning:p,setRedisValue:_,fetchCitationByBlock:m,isOnDemandCitation:g}){const[f,b]=e({finalGap:"",finalRisk:"",status:"in-progress"}),v=t(new Set),h=t(new Set),y=t(null),k=t(null),N=t({gap_items_prompt:"",risk_items_prompt:""}),S=t(new Set);return i(()=>{"complete"!==f.status||l||(console.log("streaming::userstory::onStreamingCompleted"),a(f.finalGap,f.finalRisk),v.current.clear(),h.current.clear(),y.current=null,k.current=null,N.current={gap_items_prompt:"",risk_items_prompt:""},S.current.clear(),b({finalGap:"",finalRisk:"",status:"in-progress"}))},[f,l]),{processStreamContent:function(e,t,i,a){try{console.log("streaming::userstory::completed",a,g),a&&g&&(console.log("streaming::userstory::completed::lib"),b({finalGap:"",finalRisk:"",status:"complete"}));const l=JSON.stringify(e);if(k.current===l)return;k.current=l;let f=[],R=[];e=e.map(e=>{var i;const n=`${(e={...e,subBlockNumber:null!==(i=e.subBlockNumber)&&void 0!==i?i:"1"}).storyNumber}-${e.blockNumber}-${e.subBlockNumber}`;if(S.current.has(n))return null;S.current.add(n);let{outputText:a,reasonings:l,gpt_citation:c,processedDescription:u}=o(e.value,e.blockNumber,e.storyNumber,e.description);s(e=>{var t;return c.length>0&&((null==e?void 0:e.gpt_citations)||(e.gpt_citations=[]),null===(t=e.gpt_citations)||void 0===t||t.push(...c)),{...e}}),f.push(...l),R.push([...l]);const d=l.filter(e=>e.on_demand).flatMap(e=>[...e.reason.matchAll(/<a[^>]*href="([^"]+)\?type=on_demand"/g),...e.gap.matchAll(/<a[^>]*href="([^"]+)\?type=on_demand"/g)].map(e=>{const[t,i]=e[1].split("$");return"book_citation_doc"!==t&&"book_citation_pdf"!==t&&"document_citation"!==t?null:{citation_number:i,customMetadata:{type:"document_citation"===t?"book_citation_pdf":t,file_name:"",fileType:"",gcs_upload_url:""}}}).filter(Boolean));d.length&&s(e=>{var t;return{...e,file_citations:[...null!==(t=e.file_citations)&&void 0!==t?t:[],...d]}});let p=`<STORY_NUMBER>${e.storyNumber}<BLOCK_NUMBER>${e.blockNumber}<SUB_BLOCK>${e.subBlockNumber}`;return g||v.current.has(p)||(!async function(e,t,i){var o,n;let a="",l="";try{const c=await m(e,i,t);r(e=>{var t;const i=[...e];return null===(t=c.response.ai_reasonings)||void 0===t||t.forEach(e=>{const t=i.findIndex(t=>t.id===e.id);-1!==t&&e.gap.length>0&&e.reason.length>0&&(i[t]={...e})}),i}),a=(null===(o=c.response)||void 0===o?void 0:o.gap_items_prompt)||"",l=(null===(n=c.response)||void 0===n?void 0:n.risk_items_prompt)||"",(a||l)&&(N.current={gap_items_prompt:a,risk_items_prompt:l}),s(e=>{var t,i,o,n,r,s,a,l,u,d,p,_,m,g;return{...e,appmod_citations:[...null!==(t=e.appmod_citations)&&void 0!==t?t:[],...null!==(i=c.response.appmod_citations)&&void 0!==i?i:[]],audio_citations:[...null!==(o=e.audio_citations)&&void 0!==o?o:[],...null!==(n=c.response.audio_citations)&&void 0!==n?n:[]],file_citations:[...null!==(r=e.file_citations)&&void 0!==r?r:[],...null!==(s=c.response.file_citations)&&void 0!==s?s:[]],image_citations:[...null!==(a=e.image_citations)&&void 0!==a?a:[],...null!==(l=c.response.image_citations)&&void 0!==l?l:[]],rca_citations:[...null!==(u=e.rca_citations)&&void 0!==u?u:[],...null!==(d=c.response.rca_citations)&&void 0!==d?d:[]],web_citations:[...null!==(p=e.web_citations)&&void 0!==p?p:[],...null!==(_=c.response.web_citations)&&void 0!==_?_:[]],readfile_citations:[...null!==(m=e.readfile_citations)&&void 0!==m?m:[],...null!==(g=c.response.readfile_citations)&&void 0!==g?g:[]]}})}catch(t){console.error("[liblogs] processCitationsByBlock error — story:%s block:%s",e.storyNumber,e.blockNumber,t)}finally{let t=`<STORY_NUMBER>${e.storyNumber}<BLOCK_NUMBER>${e.blockNumber}`;if(h.current.add(t),h.current.size===v.current.size){const e=a||N.current.gap_items_prompt,t=l||N.current.risk_items_prompt;b({finalGap:e,finalRisk:t,status:"complete"})}}}({...e,value:a,description:u},l,t),v.current.add(p)),{...e,value:a,description:u}}).filter(Boolean),f.forEach(e=>{r(t=>(t.find(t=>t.id===e.id)||t.push(e),[...t]))}),e.length>0&&e.map(({title:e,section:t,value:o,storyNumber:r,description:s,blockNumber:a,big_enough:l,big_enough_decision_factors:m,technicality_score:g,gapValue:f,confidenceScore:b,metadata:v},h)=>{n(n=>{var k,N,S,B,$,C,O,w;const E=n.findIndex(e=>e.storyNumber===r);if("intro"===t)-1===E?n.push({artifactId:`STORY-${r}-${a}`,title:e,value:o,description:s,storyNumber:r,sub_features:[],section:t,blockNumber:a,aiReasoning:R[h],big_enough:l,big_enough_decision_factors:m,technicality_score:g,gapValue:f,confidenceScore:b,metadata:v}):(n[E].value+=o,n[E].aiReasoning=n[E].aiReasoning||[],null===(N=null===(k=n[E])||void 0===k?void 0:k.aiReasoning)||void 0===N||N.push(...R[h]),n[E].big_enough=l,n[E].big_enough_decision_factors=m,n[E].technicality_score=g,n[E].gapValue=f,n[E].confidenceScore=b,n[E].metadata=v);else{n[E].sub_features||(n[E].sub_features=[]);const i=(null===(B=null===(S=n[E])||void 0===S?void 0:S.sub_features)||void 0===B?void 0:B.findIndex(e=>e.blockNumber===a))||-1;if(-1===i)null===(C=null===($=n[E])||void 0===$?void 0:$.sub_features)||void 0===C||C.push({artifactId:`STORY-${r}-${a}`,title:e,value:o,storyNumber:r,blockNumber:a,section:t,aiReasoning:R[h],big_enough:l,big_enough_decision_factors:m,technicality_score:g,gapValue:f,confidenceScore:b,metadata:v});else{let e=null===(w=null===(O=null==n?void 0:n[E])||void 0===O?void 0:O.sub_features)||void 0===w?void 0:w[i];e.value=(e.value||"")+o,e.aiReasoning=e.aiReasoning||[],e.aiReasoning.push(...R[h]),e.big_enough=l,e.big_enough_decision_factors=m,e.technicality_score=g,e.gapValue=f,e.confidenceScore=b,e.metadata=v}}const U=JSON.stringify(n);return y.current!==U&&(_({key:`streaming-redis-key-${i}`,value:{mmvf_list:n,knowledgeBase:c,projectAnalyserSummary:u,dataSources_files:d,ai_reasonings:p}}),y.current=U),[...n]})})}catch(e){console.error("Error in processing Stream Content",e)}}}}export{n as useStreamContentHandler};
2
2
  //# sourceMappingURL=useStreamContentHandler.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AiReasonMarkdownWrapper.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/RequirementAI/components/ai-reasoning/AiReasonMarkdownWrapper.tsx"],"names":[],"mappings":"AAqCA,OAAO,EACL,yBAAyB,EAEzB,cAAc,EACd,oBAAoB,EACpB,YAAY,EACb,MAAM,8BAA8B,CAAC;AAItC,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AA0DxF,eAAO,MAAM,cAAc,gBACZ,gBAAgB,EAAE,cACnB,MAAM,YACR,MAAM,KACf,gBAAgB,EAWlB,CAAC;AAEF,eAAO,MAAM,uBAAuB;;aAazB,MAAM;;;;;6BAKS,IAAI;;;;6CA0Z7B,CAAC"}
1
+ {"version":3,"file":"AiReasonMarkdownWrapper.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/RequirementAI/components/ai-reasoning/AiReasonMarkdownWrapper.tsx"],"names":[],"mappings":"AAqCA,OAAO,EACL,yBAAyB,EAEzB,cAAc,EACd,oBAAoB,EACpB,YAAY,EACb,MAAM,8BAA8B,CAAC;AAItC,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AA0DxF,eAAO,MAAM,cAAc,gBACZ,gBAAgB,EAAE,cACnB,MAAM,YACR,MAAM,KACf,gBAAgB,EAWlB,CAAC;AAEF,eAAO,MAAM,uBAAuB;;aAazB,MAAM;;;;;6BAKS,IAAI;;;;6CA4Z7B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"BigEnoughPanel.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/RequirementAI/components/story-screen/BigEnoughPanel.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AACzF,OAAO,EAA4B,uBAAuB,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAEjH,OAA6B,EAAE,0BAA0B,EAAoB,MAAM,8CAA8C,CAAC;AAIlI,eAAO,MAAM,cAAc;iBAEX,cAAc;kBACZ,uBAAuB;sBACpB,qBAAqB,GAAG,UAAU;;;6CAkGtD,CAAC"}
1
+ {"version":3,"file":"BigEnoughPanel.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/RequirementAI/components/story-screen/BigEnoughPanel.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AACzF,OAAO,EAA4B,uBAAuB,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAEjH,OAA6B,EAAE,0BAA0B,EAAoB,MAAM,8CAA8C,CAAC;AAIlI,eAAO,MAAM,cAAc;iBAEX,cAAc;kBACZ,uBAAuB;sBACpB,qBAAqB,GAAG,UAAU;;;6CAoGtD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"UserStoryApprovalScreen.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/RequirementAI/components/userstory-approval-screen/UserStoryApprovalScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAQN,MAAM,OAAO,CAAC;AAEf,OAAO,EAEL,6BAA6B,EAC7B,gCAAgC,EAChC,6BAA6B,EAC7B,iCAAiC,EAEjC,qBAAqB,EACrB,UAAU,EACX,MAAM,sCAAsC,CAAC;AA4E9C,UAAU,SAAS;IACjB;;;OAGG;IACH,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,4BAA4B;IAC5B,MAAM,CAAC,EAAE,6BAA6B,CAAC;IACvC,mEAAmE;IACnE,SAAS,CAAC,EAAE,gCAAgC,CAAC;IAC7C,8CAA8C;IAC9C,MAAM,CAAC,EAAE,OAAO,CAAC,6BAA6B,CAAC,CAAC;IAChD,4EAA4E;IAC5E,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,6DAA6D;IAC7D,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,0BAA0B;IAC1B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,yBAAyB;IACzB,UAAU,CAAC,EAAE,iCAAiC,CAAC;IAC/C,uDAAuD;IACvD,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AA6OD,UAAU,YAAY;IACpB;;;;OAIG;IACH,SAAS,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;IACrC;;;OAGG;IACH,MAAM,CAAC,EAAE,qBAAqB,CAAC;IAC/B,wBAAwB;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAkCD,UAAU,kBAAkB;IAC1B,mDAAmD;IACnD,QAAQ,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC/B,mDAAmD;IACnD,SAAS,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAChC,oCAAoC;IACpC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AA2BD,UAAU,YAAY;IACpB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,wDAAwD;IACxD,eAAe,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;IAC3C,6CAA6C;IAC7C,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,mCAAmC;IACnC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,yCAAyC;IACzC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,uBAAuB,CAAC,EAAE,CAAC,QAAQ,EAAE,KAAK,GAAG,KAAK,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACrE,oBAAoB,CAAC,EAAE,CACrB,eAAe,EAAE,OAAO,EACxB,eAAe,EAAE,UAAU,EAAE,EAC7B,UAAU,EAAE,MAAM,EAClB,kBAAkB,CAAC,EAAE,MAAM,EAAE,EAC7B,aAAa,CAAC,EAAE,OAAO,KACpB,IAAI,CAAC;IACV,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAqVD,UAAU,SAAS;IACjB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,eAAe,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;IAC3C,eAAe,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;IAC3C,uBAAuB,CAAC,EAAE,CAAC,QAAQ,EAAE,KAAK,GAAG,KAAK,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACrE,oBAAoB,CAAC,EAAE,CACrB,eAAe,EAAE,OAAO,EACxB,eAAe,EAAE,UAAU,EAAE,EAC7B,UAAU,EAAE,MAAM,EAClB,kBAAkB,CAAC,EAAE,MAAM,EAAE,EAC7B,aAAa,CAAC,EAAE,OAAO,KACpB,IAAI,CAAC;IACV,aAAa,CAAC,EAAC,OAAO,CAAC;CACxB;AAmGD,QAAA,MAAM,uBAAuB;;;;;CAK3B,CAAC;AAEH,eAAe,uBAAuB,CAAC"}
1
+ {"version":3,"file":"UserStoryApprovalScreen.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/RequirementAI/components/userstory-approval-screen/UserStoryApprovalScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAQN,MAAM,OAAO,CAAC;AAEf,OAAO,EAEL,6BAA6B,EAC7B,gCAAgC,EAChC,6BAA6B,EAC7B,iCAAiC,EAEjC,qBAAqB,EACrB,UAAU,EACX,MAAM,sCAAsC,CAAC;AA4E9C,UAAU,SAAS;IACjB;;;OAGG;IACH,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,4BAA4B;IAC5B,MAAM,CAAC,EAAE,6BAA6B,CAAC;IACvC,mEAAmE;IACnE,SAAS,CAAC,EAAE,gCAAgC,CAAC;IAC7C,8CAA8C;IAC9C,MAAM,CAAC,EAAE,OAAO,CAAC,6BAA6B,CAAC,CAAC;IAChD,4EAA4E;IAC5E,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,6DAA6D;IAC7D,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,0BAA0B;IAC1B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,yBAAyB;IACzB,UAAU,CAAC,EAAE,iCAAiC,CAAC;IAC/C,uDAAuD;IACvD,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AA6OD,UAAU,YAAY;IACpB;;;;OAIG;IACH,SAAS,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;IACrC;;;OAGG;IACH,MAAM,CAAC,EAAE,qBAAqB,CAAC;IAC/B,wBAAwB;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAkCD,UAAU,kBAAkB;IAC1B,mDAAmD;IACnD,QAAQ,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC/B,mDAAmD;IACnD,SAAS,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAChC,oCAAoC;IACpC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AA2BD,UAAU,YAAY;IACpB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,wDAAwD;IACxD,eAAe,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;IAC3C,6CAA6C;IAC7C,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,mCAAmC;IACnC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,yCAAyC;IACzC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,uBAAuB,CAAC,EAAE,CAAC,QAAQ,EAAE,KAAK,GAAG,KAAK,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACrE,oBAAoB,CAAC,EAAE,CACrB,eAAe,EAAE,OAAO,EACxB,eAAe,EAAE,UAAU,EAAE,EAC7B,UAAU,EAAE,MAAM,EAClB,kBAAkB,CAAC,EAAE,MAAM,EAAE,EAC7B,aAAa,CAAC,EAAE,OAAO,KACpB,IAAI,CAAC;IACV,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAqUD,UAAU,SAAS;IACjB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,eAAe,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;IAC3C,eAAe,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;IAC3C,uBAAuB,CAAC,EAAE,CAAC,QAAQ,EAAE,KAAK,GAAG,KAAK,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACrE,oBAAoB,CAAC,EAAE,CACrB,eAAe,EAAE,OAAO,EACxB,eAAe,EAAE,UAAU,EAAE,EAC7B,UAAU,EAAE,MAAM,EAClB,kBAAkB,CAAC,EAAE,MAAM,EAAE,EAC7B,aAAa,CAAC,EAAE,OAAO,KACpB,IAAI,CAAC;IACV,aAAa,CAAC,EAAC,OAAO,CAAC;CACxB;AAmGD,QAAA,MAAM,uBAAuB;;;;;CAK3B,CAAC;AAEH,eAAe,uBAAuB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"useStreamContentHandler.d.ts","sourceRoot":"","sources":["../../../../../../src/features/RequirementAI/hooks/useStreamContentHandler.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,wBAAwB,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAC7G,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AAEtE,OAAO,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAGrF,MAAM,MAAM,eAAe,GAAG;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,OAAO,GAAG,YAAY,CAAC;IAChC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,2BAA2B,CAAC,EAAE,wBAAwB,CAAC;IACvD,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;IACxC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAC,OAAO,CAAC,CAAC;CACrC,CAAC;AAEF,UAAU,MAAM;IACZ,aAAa,EAAE,CAAC,CAAC,EAAE,EAAE,GAAG,EAAE,KAAK,EAAE,EAAE,cAAc,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,GAAG,CAAC,CAAA;IACrE,YAAY,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC;IACjE,cAAc,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC;IACrE,qBAAqB,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,kBAAkB,CAAC,CAAC,CAAC;IAChF,oBAAoB,EAAE,CAAC,gBAAgB,CAAC,EAAE,MAAM,EAAE,iBAAiB,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/F,uBAAuB,EAAE,OAAO,CAAC;IACjC,aAAa,EAAE,GAAG,CAAC;IACnB,sBAAsB,EAAE,GAAG,CAAC;IAC5B,eAAe,EAAE;QACb,QAAQ,EAAE,MAAM,EAAE,CAAC;QACnB,KAAK,EAAE,MAAM,EAAE,CAAC;QAChB,gBAAgB,EAAE,MAAM,EAAE,CAAC;KAC9B,CAAC;IACF,WAAW,EAAE,YAAY,EAAE,CAAC;IAC5B,oBAAoB,EAAE,CAAC,KAAK,EAAE,eAAe,EAAE,QAAQ,EAAE,GAAG,EAAE,aAAa,EAAE,YAAY,EAAE,KAAK,OAAO,CAAC,oBAAoB,CAAC,CAAC;IAC9H,kBAAkB,CAAC,EAAE,OAAO,CAAA;CAC/B;AAED,wBAAgB,uBAAuB,CAAC,EAAE,YAAY,EAAE,cAAc,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,uBAAuB,EAAE,aAAa,EAAE,sBAAsB,EAAE,eAAe,EAAE,WAAW,EAAE,aAAa,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,EAAE,MAAM;sCAkFjQ,eAAe,EAAE,kBACZ,GAAG,mBACF,MAAM,8BACK,OAAO;EA4O1C"}
1
+ {"version":3,"file":"useStreamContentHandler.d.ts","sourceRoot":"","sources":["../../../../../../src/features/RequirementAI/hooks/useStreamContentHandler.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,wBAAwB,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAC7G,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AAEtE,OAAO,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAGrF,MAAM,MAAM,eAAe,GAAG;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,OAAO,GAAG,YAAY,CAAC;IAChC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,2BAA2B,CAAC,EAAE,wBAAwB,CAAC;IACvD,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;IACxC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAC,OAAO,CAAC,CAAC;CACrC,CAAC;AAEF,UAAU,MAAM;IACZ,aAAa,EAAE,CAAC,CAAC,EAAE,EAAE,GAAG,EAAE,KAAK,EAAE,EAAE,cAAc,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,GAAG,CAAC,CAAA;IACrE,YAAY,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC;IACjE,cAAc,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC;IACrE,qBAAqB,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,kBAAkB,CAAC,CAAC,CAAC;IAChF,oBAAoB,EAAE,CAAC,gBAAgB,CAAC,EAAE,MAAM,EAAE,iBAAiB,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/F,uBAAuB,EAAE,OAAO,CAAC;IACjC,aAAa,EAAE,GAAG,CAAC;IACnB,sBAAsB,EAAE,GAAG,CAAC;IAC5B,eAAe,EAAE;QACb,QAAQ,EAAE,MAAM,EAAE,CAAC;QACnB,KAAK,EAAE,MAAM,EAAE,CAAC;QAChB,gBAAgB,EAAE,MAAM,EAAE,CAAC;KAC9B,CAAC;IACF,WAAW,EAAE,YAAY,EAAE,CAAC;IAC5B,oBAAoB,EAAE,CAAC,KAAK,EAAE,eAAe,EAAE,QAAQ,EAAE,GAAG,EAAE,aAAa,EAAE,YAAY,EAAE,KAAK,OAAO,CAAC,oBAAoB,CAAC,CAAC;IAC9H,kBAAkB,CAAC,EAAE,OAAO,CAAA;CAC/B;AAED,wBAAgB,uBAAuB,CAAC,EAAE,YAAY,EAAE,cAAc,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,uBAAuB,EAAE,aAAa,EAAE,sBAAsB,EAAE,eAAe,EAAE,WAAW,EAAE,aAAa,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,EAAE,MAAM;sCAkFjQ,eAAe,EAAE,kBACZ,GAAG,mBACF,MAAM,8BACK,OAAO;EA0O1C"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@e-llm-studio/requirement-ai",
3
- "version": "0.0.336",
3
+ "version": "0.0.339",
4
4
  "author": "Saptyadeep Bhattacharjee",
5
5
  "description": "",
6
6
  "license": "MIT",