@e-llm-studio/requirement-ai 0.0.299 → 0.0.301

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("lucide-react"),e=require("react"),n=require("../../../../CitationRenderer/CitationRenderer.js"),o=require("./AppmodCitationContent.js"),a=require("./AppModCitationContent.module.css.js"),r=require("@mui/material");exports.default=({title:l,citation:s,customStyles:c,customIcons:d,codeLinkConfig:u,isLoading:p=!1,isOpen:g,fetchOnDemandCitation:m})=>{const[C,x]=e.useState(!1),h=void 0!==g,f=h?!!g:C,b=e.useCallback(()=>{h||x(i=>!i)},[h]),j=(null==d?void 0:d.appModCitationIcon)||i.jsx(t.SparkleIcon,{className:"inline align-super mb-1 ml-1",style:{width:"12px",height:"12px"}}),v=l+"⁠";return i.jsx(n.default,{inLineCitation:!0,citationTitle:v,citationIcon:i.jsx(i.Fragment,{}),citationId:`appmod-ai-${s.citation_number}`,citationComponent:s.isLoading&&m?i.jsxs("div",{className:a.default.citationLoader,style:{...null==c?void 0:c.loadingCitation},children:["Loading Citation",i.jsx(r.CircularProgress,{style:{color:"#4c4c4c",width:"20px",height:"20px",...null==c?void 0:c.loadingCitationCircularProgress}})]}):i.jsx(o.default,{citation:s,customStyles:c,customIcons:d,codeLinkConfig:u,isLoading:p,shouldAutoScroll:f}),additionalCallbackForPillButton:()=>{s.isLoading&&m&&(null==m||m())},isOpen:f,onToggle:b,chevronDownComponent:j,chevronUpComponent:j,styles:{pillButton:{fontSize:"13px",margin:"0px",padding:"0px 4px",color:"#3b82f6",cursor:"pointer",verticalAlign:"baseline",whiteSpace:"normal",wordBreak:"break-all",display:"inline-flex",alignItems:"unset",background:"transparent",border:"none",...null==c?void 0:c.pill},citationContent:{width:"100%",background:"transparent",minHeight:"10px",height:"fit-content"}}})};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var i=require("react/jsx-runtime"),t=require("lucide-react"),e=require("react"),n=require("../../../../CitationRenderer/CitationRenderer.js"),o=require("./AppmodCitationContent.js"),a=require("./AppModCitationContent.module.css.js"),r=require("@mui/material");exports.default=({title:l,citation:s,customStyles:c,customIcons:d,codeLinkConfig:u,isLoading:p=!1,isOpen:m,fetchOnDemandCitation:g})=>{const[C,x]=e.useState(!1),h=void 0!==m,f=h?!!m:C,v=e.useCallback(()=>{h||x(i=>!i)},[h]),b=(null==d?void 0:d.appModCitationIcon)||i.jsx(t.SparkleIcon,{className:"inline align-super mb-1 ml-1",style:{width:"12px",height:"12px"}}),j=l+"⁠";return i.jsx(n.default,{inLineCitation:!0,citationTitle:j,citationIcon:i.jsx(i.Fragment,{}),citationId:`appmod-ai-${null==s?void 0:s.citation_number}`,citationComponent:!s&&g?i.jsxs("div",{className:a.default.citationLoader,style:{...null==c?void 0:c.loadingCitation},children:["Loading Citation",i.jsx(r.CircularProgress,{style:{color:"#4c4c4c",width:"20px",height:"20px",...null==c?void 0:c.loadingCitationCircularProgress}})]}):i.jsx(o.default,{citation:s,customStyles:c,customIcons:d,codeLinkConfig:u,isLoading:p,shouldAutoScroll:f}),additionalCallbackForPillButton:()=>{!s&&g&&(null==g||g())},isOpen:f,onToggle:v,chevronDownComponent:b,chevronUpComponent:b,styles:{pillButton:{fontSize:"13px",margin:"0px",padding:"0px 4px",color:"#3b82f6",cursor:"pointer",verticalAlign:"baseline",whiteSpace:"normal",wordBreak:"break-all",display:"inline-flex",alignItems:"unset",background:"transparent",border:"none",...null==c?void 0:c.pill},citationContent:{width:"100%",background:"transparent",minHeight:"10px",height:"fit-content"}}})};
2
2
  //# sourceMappingURL=AppmodCitationRenderer.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var i=require("react");exports.useOnDemandCitation=function({baseCitations:t,requestId:n,user:o,bucketName:e,fetchOnDemandCitation:a}){const l=null!=t?t:{},u=i.useRef(l),[c,d]=i.useState(l);i.useEffect(()=>{d(i=>{var n,o;return{...t,file_citations:i.file_citations&&i.file_citations.length>0?i.file_citations:null!==(n=null==t?void 0:t.file_citations)&&void 0!==n?n:[],audio_citations:i.audio_citations&&i.audio_citations.length>0?i.audio_citations:null!==(o=null==t?void 0:t.audio_citations)&&void 0!==o?o:[]}})},[t]),i.useEffect(()=>{u.current=c},[c]);const s=i.useCallback((i,t)=>{var n,o,e,a,l,u,c,d,s,r,v,_,m,f,b,g,h,p,w,C;let y=null===(c=null===(u=null===(l=null===(a=null===(e=null===(o=null===(n=null==i?void 0:i.result)||void 0===n?void 0:n.citations)||void 0===o?void 0:o[0])||void 0===e?void 0:e.citations)||void 0===a?void 0:a[0])||void 0===l?void 0:l.customMetaData)||void 0===u?void 0:u.value)||void 0===c?void 0:c[0];if("audio_citation"===t||"audio_citations"===t)y=null===(s=null===(d=null==i?void 0:i.result)||void 0===d?void 0:d.citations)||void 0===s?void 0:s[0];else if(t.includes("image_citation"))y=null===(v=null===(r=null==i?void 0:i.result)||void 0===r?void 0:r.citations)||void 0===v?void 0:v[0];else if(t.includes("web_citation")){const t=null===(h=null===(g=null===(b=null===(f=null===(m=null===(_=null==i?void 0:i.result)||void 0===_?void 0:_.citations)||void 0===m?void 0:m[0])||void 0===f?void 0:f.segments)||void 0===b?void 0:b[0])||void 0===g?void 0:g.urls)||void 0===h?void 0:h[0];y={citation_number:null===(C=null===(w=null===(p=null==i?void 0:i.result)||void 0===p?void 0:p.citations)||void 0===w?void 0:w[0])||void 0===C?void 0:C.citation_number,customMetadata:{screenshot_url:null==t?void 0:t.gcs_url,relevance_score:100,link:null==t?void 0:t.highlight_url,type:"web_citation"}}}return y},[]),r=i.useCallback((i,t,n)=>{d(o=>{const e="audio_citation"===t||"audio_citations"===t?"audio_citations":t.includes("image_citation")?"image_citations":t.includes("web_citation")?"web_citations":"file_citations",a=o[e]||[],l=a.findIndex(t=>String(t.citation_number)===i),u={...n,citation_number:i},c=l>=0?a.map((i,t)=>t===l?{...i,...u}:i):[...a,u];return{...o,[e]:c}})},[]);return{fetchOnDemandCitationHandler:i.useCallback((i,t,l,u,c)=>{const d=String(i);return new Promise((v,_)=>{(async()=>{var m,f,b,g,h,p,w,C,y,k;try{const _=null!==(m=null==o?void 0:o.accessToken)&&void 0!==m?m:"";if(!_)throw new Error("No auth token available for on-demand citation fetch");const N=Number(i);if(Number.isNaN(N))throw new Error(`Invalid citation number: ${i}`);const x=null!==(f=sessionStorage.getItem("projectId"))&&void 0!==f?f:"",I=u?[`${e}/projects/${x}/${u}`]:[],O="explanation"===c?null!==(b=null==t?void 0:t.explanation)&&void 0!==b?b:"":null!==(g=null==t?void 0:t.reason)&&void 0!==g?g:"",$=JSON.stringify({userName:null!==(h=null==o?void 0:o.name)&&void 0!==h?h:`${null!==(p=null==o?void 0:o.firstname)&&void 0!==p?p:""} ${null!==(w=null==o?void 0:o.lastname)&&void 0!==w?w:""}`.trim(),userEmailId:null!==(C=null==o?void 0:o.email)&&void 0!==C?C:""}),q=[{reason:O,title:"",description:"explanation"===c?null!==(y=null==t?void 0:t.explanation)&&void 0!==y?y:"":null!==(k=null==t?void 0:t.reason)&&void 0!==k?k:""}],D=function(i){switch(i){case"artifact_chunks":case"scanned_doc_citations":return"scanned_doc_citation";case"rai_artifact_citation":return"rai_artifact_citation";case"document_citations":return"file_citation";case"audio_citations":return"requirement_ai_audio_citation";case"web_citations":return"web_citation";case"image_citations":return"requirement_ai_image_citation";default:return i}}(l);console.log("[useOnDemandCitation] fetching citation",{key:d,citationType:l,requestCitationType:D,requestId:n,files:I});const E=await a(n,D,N,O,_,q,I,$,u),S=s(E,l);S||console.error(`Failed to resolve on-demand citation ${d}`),S&&r(d,l,S),v(S)}catch(i){console.error("[useOnDemandCitation] error for citation",d,i),_(i)}})()})},[n,o]),libraryCitationsRef:u,libraryCitations:c}};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var i=require("react");exports.useOnDemandCitation=function({baseCitations:t,requestId:n,user:o,bucketName:e,fetchOnDemandCitation:l}){const a=null!=t?t:{},u=i.useRef(a),[d,c]=i.useState(a);i.useEffect(()=>{c(i=>{var n,o;return{...t,file_citations:i.file_citations&&i.file_citations.length>0?i.file_citations:null!==(n=null==t?void 0:t.file_citations)&&void 0!==n?n:[],audio_citations:i.audio_citations&&i.audio_citations.length>0?i.audio_citations:null!==(o=null==t?void 0:t.audio_citations)&&void 0!==o?o:[]}})},[t]),i.useEffect(()=>{u.current=d},[d]);const s=i.useCallback((i,t)=>{var n,o,e,l,a,u,d,c,s,r,v,_,f,m,b,g,h,p,C,w,y,k;let x=null===(d=null===(u=null===(a=null===(l=null===(e=null===(o=null===(n=null==i?void 0:i.result)||void 0===n?void 0:n.citations)||void 0===o?void 0:o[0])||void 0===e?void 0:e.citations)||void 0===l?void 0:l[0])||void 0===a?void 0:a.customMetaData)||void 0===u?void 0:u.value)||void 0===d?void 0:d[0];if("audio_citation"===t||"audio_citations"===t)x=null===(s=null===(c=null==i?void 0:i.result)||void 0===c?void 0:c.citations)||void 0===s?void 0:s[0];else if("readfile_citations"===t||"readfile_citation"===t)x=null===(v=null===(r=null==i?void 0:i.result)||void 0===r?void 0:r.citations)||void 0===v?void 0:v[0];else if(t.includes("image_citation"))x=null===(f=null===(_=null==i?void 0:i.result)||void 0===_?void 0:_.citations)||void 0===f?void 0:f[0];else if(t.includes("web_citation")){const t=null===(C=null===(p=null===(h=null===(g=null===(b=null===(m=null==i?void 0:i.result)||void 0===m?void 0:m.citations)||void 0===b?void 0:b[0])||void 0===g?void 0:g.segments)||void 0===h?void 0:h[0])||void 0===p?void 0:p.urls)||void 0===C?void 0:C[0];x={citation_number:null===(k=null===(y=null===(w=null==i?void 0:i.result)||void 0===w?void 0:w.citations)||void 0===y?void 0:y[0])||void 0===k?void 0:k.citation_number,customMetadata:{screenshot_url:null==t?void 0:t.gcs_url,relevance_score:100,link:null==t?void 0:t.highlight_url,type:"web_citation"}}}return x},[]),r=i.useCallback((i,t,n)=>{c(o=>{const e="audio_citation"===t||"audio_citations"===t?"audio_citations":t.includes("image_citation")?"image_citations":"readfile_citations"===t||"readfile_citation"===t?"readfile_citations":t.includes("web_citation")?"web_citations":"file_citations",l=o[e]||[],a=l.findIndex(t=>String(t.citation_number)===i),u={...n,citation_number:i},d=a>=0?l.map((i,t)=>t===a?{...i,...u}:i):[...l,u];return{...o,[e]:d}})},[]);return{fetchOnDemandCitationHandler:i.useCallback((i,t,a,u,d)=>{const c=String(i);return new Promise((v,_)=>{(async()=>{var f,m,b,g,h,p,C,w,y,k;try{const _=null!==(f=null==o?void 0:o.accessToken)&&void 0!==f?f:"";if(!_)throw new Error("No auth token available for on-demand citation fetch");const x=null!==(m=sessionStorage.getItem("projectId"))&&void 0!==m?m:"",O=u?[`${e}/projects/${x}/${u}`]:[],q="explanation"===d?null!==(b=null==t?void 0:t.explanation)&&void 0!==b?b:"":null!==(g=null==t?void 0:t.reason)&&void 0!==g?g:"",D=JSON.stringify({userName:null!==(h=null==o?void 0:o.name)&&void 0!==h?h:`${null!==(p=null==o?void 0:o.firstname)&&void 0!==p?p:""} ${null!==(C=null==o?void 0:o.lastname)&&void 0!==C?C:""}`.trim(),userEmailId:null!==(w=null==o?void 0:o.email)&&void 0!==w?w:""}),I=[{reason:q,title:"",description:"explanation"===d?null!==(y=null==t?void 0:t.explanation)&&void 0!==y?y:"":null!==(k=null==t?void 0:t.reason)&&void 0!==k?k:""}],$=function(i){switch(i){case"artifact_chunks":case"scanned_doc_citations":return"scanned_doc_citation";case"rai_artifact_citation":return"rai_artifact_citation";case"document_citations":return"file_citation";case"audio_citations":return"requirement_ai_audio_citation";case"web_citations":return"web_citation";case"image_citations":return"requirement_ai_image_citation";default:return i}}(a);console.log("[useOnDemandCitation] fetching citation",{key:c,citationType:a,requestCitationType:$,requestId:n,files:O});const S=await l(n,$,i,q,_,I,O,D,u),E=s(S,a);E||console.error(`Failed to resolve on-demand citation ${c}`),E&&r(c,a,E),v(E)}catch(i){console.error("[useOnDemandCitation] error for citation",c,i),_(i)}})()})},[n,o]),libraryCitationsRef:u,libraryCitations:d}};
2
2
  //# sourceMappingURL=useOnDemandCitation.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:u,aiReasoning:c,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),k=e.useRef({gap_items_prompt:"",risk_items_prompt:""}),y=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,k.current={gap_items_prompt:"",risk_items_prompt:""},y.current.clear(),g({finalGap:"",finalRisk:"",status:"in-progress"}))},[m,r]),console.log("testing::isGraphQLCallInProgress",m,r),{processStreamContent:function(e,s,r,m){try{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(y.current.has(r))return null;y.current.add(r);let{outputText:a,reasonings:l,gpt_citation:u,processedDescription:c}=t.processAIReasoningFromBlocks(e.value,e.blockNumber,e.storyNumber,e.description);n(e=>{var t;return u.length>0&&((null==e?void 0:e.gpt_citations)||(e.gpt_citations=[]),null===(t=e.gpt_citations)||void 0===t||t.push(...u)),{...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 u=await p(e,i,t);o(e=>{var t;const i=[...e];return null===(t=u.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=u.response)||void 0===s?void 0:s.gap_items_prompt)||"",l=(null===(r=u.response)||void 0===r?void 0:r.risk_items_prompt)||"",(a||l)&&(k.current={gap_items_prompt:a,risk_items_prompt:l}),n(e=>{var t,i,o,n,s,r,a,l,c,d,p,_,m,g;return{...e,appmod_citations:[...null!==(t=e.appmod_citations)&&void 0!==t?t:[],...null!==(i=u.response.appmod_citations)&&void 0!==i?i:[]],audio_citations:[...null!==(o=e.audio_citations)&&void 0!==o?o:[],...null!==(n=u.response.audio_citations)&&void 0!==n?n:[]],file_citations:[...null!==(s=e.file_citations)&&void 0!==s?s:[],...null!==(r=u.response.file_citations)&&void 0!==r?r:[]],image_citations:[...null!==(a=e.image_citations)&&void 0!==a?a:[],...null!==(l=u.response.image_citations)&&void 0!==l?l:[]],rca_citations:[...null!==(c=e.rca_citations)&&void 0!==c?c:[],...null!==(d=u.response.rca_citations)&&void 0!==d?d:[]],web_citations:[...null!==(p=e.web_citations)&&void 0!==p?p:[],...null!==(_=u.response.web_citations)&&void 0!==_?_:[]],readfile_citations:[...null!==(m=e.readfile_citations)&&void 0!==m?m:[],...null!==(g=u.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||k.current.gap_items_prompt,t=l||k.current.risk_items_prompt;g({finalGap:e,finalRisk:t,status:"complete"})}}}({...e,value:a,description:c},l,s),f.current.add(m)),{...e,value:a,description:c}}).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,gapValue:g,confidenceScore:f,metadata:b},h)=>{i(i=>{var k,y,R,N,B,C,$,O;const w=i.findIndex(e=>e.storyNumber===n);if("intro"===t)-1===w?i.push({artifactId:`STORY-${n}-${p}`,title:e,value:o,description:s,storyNumber:n,sub_features:[],section:t,blockNumber:p,aiReasoning:S[h],big_enough:_,big_enough_decision_factors:m,gapValue:g,confidenceScore:f,metadata:b}):(i[w].value+=o,i[w].aiReasoning=i[w].aiReasoning||[],null===(y=null===(k=i[w])||void 0===k?void 0:k.aiReasoning)||void 0===y||y.push(...S[h]),i[w].big_enough=_,i[w].big_enough_decision_factors=m,i[w].gapValue=g,i[w].confidenceScore=f,i[w].metadata=b);else{i[w].sub_features||(i[w].sub_features=[]);const s=(null===(N=null===(R=i[w])||void 0===R?void 0:R.sub_features)||void 0===N?void 0:N.findIndex(e=>e.blockNumber===p))||-1;if(-1===s)null===(C=null===(B=i[w])||void 0===B?void 0:B.sub_features)||void 0===C||C.push({artifactId:`STORY-${n}-${p}`,title:e,value:o,storyNumber:n,blockNumber:p,section:t,aiReasoning:S[h],big_enough:_,big_enough_decision_factors:m,gapValue:g,confidenceScore:f,metadata:b});else{let e=null===(O=null===($=null==i?void 0:i[w])||void 0===$?void 0:$.sub_features)||void 0===O?void 0:O[s];e.value=(e.value||"")+o,e.aiReasoning=e.aiReasoning||[],e.aiReasoning.push(...S[h]),e.big_enough=_,e.big_enough_decision_factors=m,e.gapValue=g,e.confidenceScore=f,e.metadata=b}}const E=JSON.stringify(i);return v.current!==E&&(d({key:`streaming-redis-key-${r}`,value:{mmvf_list:i,knowledgeBase:a,projectAnalyserSummary:l,dataSources_files:u,ai_reasonings:c}}),v.current=E),[...i]})}),m&&_&&(console.log("streaming::userstory::completed::lib"),g({finalGap:"",finalRisk:"",status:"complete"}))}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:u,aiReasoning:c,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),k=e.useRef({gap_items_prompt:"",risk_items_prompt:""}),y=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,k.current={gap_items_prompt:"",risk_items_prompt:""},y.current.clear(),g({finalGap:"",finalRisk:"",status:"in-progress"}))},[m,r]),{processStreamContent:function(e,s,r,m){try{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(y.current.has(r))return null;y.current.add(r);let{outputText:a,reasonings:l,gpt_citation:u,processedDescription:c}=t.processAIReasoningFromBlocks(e.value,e.blockNumber,e.storyNumber,e.description);n(e=>{var t;return u.length>0&&((null==e?void 0:e.gpt_citations)||(e.gpt_citations=[]),null===(t=e.gpt_citations)||void 0===t||t.push(...u)),{...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 u=await p(e,i,t);o(e=>{var t;const i=[...e];return null===(t=u.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=u.response)||void 0===s?void 0:s.gap_items_prompt)||"",l=(null===(r=u.response)||void 0===r?void 0:r.risk_items_prompt)||"",(a||l)&&(k.current={gap_items_prompt:a,risk_items_prompt:l}),n(e=>{var t,i,o,n,s,r,a,l,c,d,p,_,m,g;return{...e,appmod_citations:[...null!==(t=e.appmod_citations)&&void 0!==t?t:[],...null!==(i=u.response.appmod_citations)&&void 0!==i?i:[]],audio_citations:[...null!==(o=e.audio_citations)&&void 0!==o?o:[],...null!==(n=u.response.audio_citations)&&void 0!==n?n:[]],file_citations:[...null!==(s=e.file_citations)&&void 0!==s?s:[],...null!==(r=u.response.file_citations)&&void 0!==r?r:[]],image_citations:[...null!==(a=e.image_citations)&&void 0!==a?a:[],...null!==(l=u.response.image_citations)&&void 0!==l?l:[]],rca_citations:[...null!==(c=e.rca_citations)&&void 0!==c?c:[],...null!==(d=u.response.rca_citations)&&void 0!==d?d:[]],web_citations:[...null!==(p=e.web_citations)&&void 0!==p?p:[],...null!==(_=u.response.web_citations)&&void 0!==_?_:[]],readfile_citations:[...null!==(m=e.readfile_citations)&&void 0!==m?m:[],...null!==(g=u.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||k.current.gap_items_prompt,t=l||k.current.risk_items_prompt;g({finalGap:e,finalRisk:t,status:"complete"})}}}({...e,value:a,description:c},l,s),f.current.add(m)),{...e,value:a,description:c}}).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,gapValue:g,confidenceScore:f,metadata:b},h)=>{i(i=>{var k,y,R,N,B,$,C,O;const w=i.findIndex(e=>e.storyNumber===n);if("intro"===t)-1===w?i.push({artifactId:`STORY-${n}-${p}`,title:e,value:o,description:s,storyNumber:n,sub_features:[],section:t,blockNumber:p,aiReasoning:S[h],big_enough:_,big_enough_decision_factors:m,gapValue:g,confidenceScore:f,metadata:b}):(i[w].value+=o,i[w].aiReasoning=i[w].aiReasoning||[],null===(y=null===(k=i[w])||void 0===k?void 0:k.aiReasoning)||void 0===y||y.push(...S[h]),i[w].big_enough=_,i[w].big_enough_decision_factors=m,i[w].gapValue=g,i[w].confidenceScore=f,i[w].metadata=b);else{i[w].sub_features||(i[w].sub_features=[]);const s=(null===(N=null===(R=i[w])||void 0===R?void 0:R.sub_features)||void 0===N?void 0:N.findIndex(e=>e.blockNumber===p))||-1;if(-1===s)null===($=null===(B=i[w])||void 0===B?void 0:B.sub_features)||void 0===$||$.push({artifactId:`STORY-${n}-${p}`,title:e,value:o,storyNumber:n,blockNumber:p,section:t,aiReasoning:S[h],big_enough:_,big_enough_decision_factors:m,gapValue:g,confidenceScore:f,metadata:b});else{let e=null===(O=null===(C=null==i?void 0:i[w])||void 0===C?void 0:C.sub_features)||void 0===O?void 0:O[s];e.value=(e.value||"")+o,e.aiReasoning=e.aiReasoning||[],e.aiReasoning.push(...S[h]),e.big_enough=_,e.big_enough_decision_factors=m,e.gapValue=g,e.confidenceScore=f,e.metadata=b}}const E=JSON.stringify(i);return v.current!==E&&(d({key:`streaming-redis-key-${r}`,value:{mmvf_list:i,knowledgeBase:a,projectAnalyserSummary:l,dataSources_files:u,ai_reasonings:c}}),v.current=E),[...i]})}),console.log("streaming::userstory::completed",m,_),m&&_&&(console.log("streaming::userstory::completed::lib"),g({finalGap:"",finalRisk:"",status:"complete"}))}catch(e){console.error("Error in processing Stream Content",e)}}}};
2
2
  //# sourceMappingURL=useStreamContentHandler.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),l=require("react"),t=require("lucide-react"),s=require("./ExpandableOl.module.css.js"),n=require("./ReqAiCitationRenderer.js");exports.default=({label:i,children:o,onProceed:r,isProceedDisabled:d,defaultVisibleItems:a=2,customStyles:c,citationStyles:u,customIcons:p,aiReason:h})=>{const[m,y]=l.useState(!1),v=l.useCallback(t=>{var s,i,o;if(!l.isValidElement(t))return t;const r=t;return"a"===(null===(s=null==r?void 0:r.type)||void 0===s?void 0:s.name)?e.jsx(n.default,{href:r.props.href,citationStyles:u,customIcons:p,aiReason:h,source:null===(i=r.props)||void 0===i?void 0:i.source,children:r.props.children}):(null===(o=r.props)||void 0===o?void 0:o.children)?l.cloneElement(r,{children:l.Children.map(r.props.children,v)}):r},[u,p]),x=l.useMemo(()=>l.Children.toArray(o).map(e=>v(e)),[o,v]),j=l.Children.toArray(o).length>a,b=l.useMemo(()=>m?x:x.slice(0,2),[m,x]);return e.jsxs(e.Fragment,{children:[e.jsx("ol",{className:s.default.list,style:null==c?void 0:c.listStyle,children:b.map((t,n)=>{const i=n===b.length-1;return l.isValidElement(t)?i&&j?l.cloneElement(t,{style:{...t.props.style,...null==c?void 0:c.itemStyle},children:e.jsxs(e.Fragment,{children:[e.jsx("span",{style:null==c?void 0:c.itemTextStyle,children:t.props.children}),!m&&e.jsx("button",{type:"button",onClick:()=>y(!0),className:s.default.toggleButton,style:null==c?void 0:c.moreButton,children:"show more"}),m&&e.jsx("button",{type:"button",onClick:()=>y(!1),className:s.default.toggleButton,style:null==c?void 0:c.toggleButton,children:"see less"})]})}):l.cloneElement(t,{style:{...t.props.style,...null==c?void 0:c.itemStyle},children:e.jsx("span",{style:null==c?void 0:c.itemTextStyle,children:t.props.children})}):e.jsx("li",{style:null==c?void 0:c.itemStyle,children:e.jsx("span",{style:null==c?void 0:c.itemTextStyle,children:t})},n)})}),r&&e.jsx("div",{className:s.default.proceedContainer,children:e.jsxs("button",{type:"button",disabled:d,onClick:e=>{e.stopPropagation(),d||r()},className:`${s.default.proceedButton} ${d?s.default.proceedDisabled:s.default.proceedEnabled}`,style:d?null==c?void 0:c.disableProceedStyle:null==c?void 0:c.enableProceedStyle,children:[e.jsx("span",{children:null!=i?i:""}),e.jsx(t.ArrowRight,{size:15,strokeWidth:1.5})]})})]})};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),l=require("react"),t=require("lucide-react"),s=require("./ExpandableOl.module.css.js"),n=require("./ReqAiCitationRenderer.js");exports.default=({label:o,children:i,onProceed:r,isProceedDisabled:d,defaultVisibleItems:a=2,customStyles:c,citationStyles:u,customIcons:p,aiReason:h})=>{const[m,y]=l.useState(!1),v=l.useCallback(t=>{var s,o,i;if(!l.isValidElement(t))return t;const r=t;return"a"===(null===(s=null==r?void 0:r.type)||void 0===s?void 0:s.name)?e.jsx(n.default,{href:r.props.href,citationStyles:u,customIcons:p,aiReason:h,source:null===(o=r.props)||void 0===o?void 0:o.source,children:r.props.children}):(null===(i=r.props)||void 0===i?void 0:i.children)?l.cloneElement(r,{children:l.Children.map(r.props.children,v)}):r},[u,p]),x=l.useMemo(()=>l.Children.toArray(i).map(e=>v(e)),[i,v]),j=l.Children.toArray(i).length>a,b=l.useMemo(()=>m?x:x.slice(0,2),[m,x]);return e.jsxs(e.Fragment,{children:[e.jsx("ol",{className:s.default.list,style:null==c?void 0:c.listStyle,children:b.map((t,n)=>{const o=n===b.length-1;return l.isValidElement(t)?o&&j?l.cloneElement(t,{style:{...t.props.style,...null==c?void 0:c.itemStyle},children:e.jsxs(e.Fragment,{children:[e.jsx("span",{style:null==c?void 0:c.itemTextStyle,children:t.props.children}),!m&&e.jsx("button",{type:"button",onClick:e=>{e.stopPropagation(),y(!0)},className:s.default.toggleButton,style:null==c?void 0:c.moreButton,children:"show more"}),m&&e.jsx("button",{type:"button",onClick:e=>{e.stopPropagation(),y(!1)},className:s.default.toggleButton,style:null==c?void 0:c.toggleButton,children:"see less"})]})}):l.cloneElement(t,{style:{...t.props.style,...null==c?void 0:c.itemStyle},children:e.jsx("span",{style:null==c?void 0:c.itemTextStyle,children:t.props.children})}):e.jsx("li",{style:null==c?void 0:c.itemStyle,children:e.jsx("span",{style:null==c?void 0:c.itemTextStyle,children:t})},n)})}),r&&e.jsx("div",{className:s.default.proceedContainer,children:e.jsxs("button",{type:"button",disabled:d,onClick:e=>{e.stopPropagation(),d||r()},className:`${s.default.proceedButton} ${d?s.default.proceedDisabled:s.default.proceedEnabled}`,style:d?null==c?void 0:c.disableProceedStyle:null==c?void 0:c.enableProceedStyle,children:[e.jsx("span",{children:null!=o?o:""}),e.jsx(t.ArrowRight,{size:15,strokeWidth:1.5})]})})]})};
2
2
  //# sourceMappingURL=ExpandableOl.js.map
@@ -1,2 +1,2 @@
1
- import{jsx as i,Fragment as t,jsxs as o}from"react/jsx-runtime";import{SparkleIcon as n}from"lucide-react";import{useState as e,useCallback as a}from"react";import r from"../../../../CitationRenderer/CitationRenderer.js";import l from"./AppmodCitationContent.js";import c from"./AppModCitationContent.module.css.js";import{CircularProgress as s}from"@mui/material";const d=({title:d,citation:p,customStyles:m,customIcons:u,codeLinkConfig:g,isLoading:C=!1,isOpen:h,fetchOnDemandCitation:f})=>{const[x,b]=e(!1),v=void 0!==h,L=v?!!h:x,k=a(()=>{v||b(i=>!i)},[v]),y=(null==u?void 0:u.appModCitationIcon)||i(n,{className:"inline align-super mb-1 ml-1",style:{width:"12px",height:"12px"}});return i(r,{inLineCitation:!0,citationTitle:d+"⁠",citationIcon:i(t,{}),citationId:`appmod-ai-${p.citation_number}`,citationComponent:p.isLoading&&f?o("div",{className:c.citationLoader,style:{...null==m?void 0:m.loadingCitation},children:["Loading Citation",i(s,{style:{color:"#4c4c4c",width:"20px",height:"20px",...null==m?void 0:m.loadingCitationCircularProgress}})]}):i(l,{citation:p,customStyles:m,customIcons:u,codeLinkConfig:g,isLoading:C,shouldAutoScroll:L}),additionalCallbackForPillButton:()=>{p.isLoading&&f&&(null==f||f())},isOpen:L,onToggle:k,chevronDownComponent:y,chevronUpComponent:y,styles:{pillButton:{fontSize:"13px",margin:"0px",padding:"0px 4px",color:"#3b82f6",cursor:"pointer",verticalAlign:"baseline",whiteSpace:"normal",wordBreak:"break-all",display:"inline-flex",alignItems:"unset",background:"transparent",border:"none",...null==m?void 0:m.pill},citationContent:{width:"100%",background:"transparent",minHeight:"10px",height:"fit-content"}}})};export{d as default};
1
+ import{jsx as i,Fragment as t,jsxs as o}from"react/jsx-runtime";import{SparkleIcon as n}from"lucide-react";import{useState as e,useCallback as a}from"react";import l from"../../../../CitationRenderer/CitationRenderer.js";import r from"./AppmodCitationContent.js";import c from"./AppModCitationContent.module.css.js";import{CircularProgress as s}from"@mui/material";const d=({title:d,citation:p,customStyles:m,customIcons:u,codeLinkConfig:g,isLoading:C=!1,isOpen:h,fetchOnDemandCitation:f})=>{const[x,v]=e(!1),b=void 0!==h,k=b?!!h:x,y=a(()=>{b||v(i=>!i)},[b]),L=(null==u?void 0:u.appModCitationIcon)||i(n,{className:"inline align-super mb-1 ml-1",style:{width:"12px",height:"12px"}});return i(l,{inLineCitation:!0,citationTitle:d+"⁠",citationIcon:i(t,{}),citationId:`appmod-ai-${null==p?void 0:p.citation_number}`,citationComponent:!p&&f?o("div",{className:c.citationLoader,style:{...null==m?void 0:m.loadingCitation},children:["Loading Citation",i(s,{style:{color:"#4c4c4c",width:"20px",height:"20px",...null==m?void 0:m.loadingCitationCircularProgress}})]}):i(r,{citation:p,customStyles:m,customIcons:u,codeLinkConfig:g,isLoading:C,shouldAutoScroll:k}),additionalCallbackForPillButton:()=>{!p&&f&&(null==f||f())},isOpen:k,onToggle:y,chevronDownComponent:L,chevronUpComponent:L,styles:{pillButton:{fontSize:"13px",margin:"0px",padding:"0px 4px",color:"#3b82f6",cursor:"pointer",verticalAlign:"baseline",whiteSpace:"normal",wordBreak:"break-all",display:"inline-flex",alignItems:"unset",background:"transparent",border:"none",...null==m?void 0:m.pill},citationContent:{width:"100%",background:"transparent",minHeight:"10px",height:"fit-content"}}})};export{d as default};
2
2
  //# sourceMappingURL=AppmodCitationRenderer.js.map
@@ -1,2 +1,2 @@
1
- import{useRef as i,useState as t,useEffect as n,useCallback as o}from"react";function e({baseCitations:e,requestId:l,user:a,bucketName:u,fetchOnDemandCitation:d}){const c=null!=e?e:{},r=i(c),[s,v]=t(c);n(()=>{v(i=>{var t,n;return{...e,file_citations:i.file_citations&&i.file_citations.length>0?i.file_citations:null!==(t=null==e?void 0:e.file_citations)&&void 0!==t?t:[],audio_citations:i.audio_citations&&i.audio_citations.length>0?i.audio_citations:null!==(n=null==e?void 0:e.audio_citations)&&void 0!==n?n:[]}})},[e]),n(()=>{r.current=s},[s]);const _=o((i,t)=>{var n,o,e,l,a,u,d,c,r,s,v,_,m,f,b,g,h,p,w,y;let C=null===(d=null===(u=null===(a=null===(l=null===(e=null===(o=null===(n=null==i?void 0:i.result)||void 0===n?void 0:n.citations)||void 0===o?void 0:o[0])||void 0===e?void 0:e.citations)||void 0===l?void 0:l[0])||void 0===a?void 0:a.customMetaData)||void 0===u?void 0:u.value)||void 0===d?void 0:d[0];if("audio_citation"===t||"audio_citations"===t)C=null===(r=null===(c=null==i?void 0:i.result)||void 0===c?void 0:c.citations)||void 0===r?void 0:r[0];else if(t.includes("image_citation"))C=null===(v=null===(s=null==i?void 0:i.result)||void 0===s?void 0:s.citations)||void 0===v?void 0:v[0];else if(t.includes("web_citation")){const t=null===(h=null===(g=null===(b=null===(f=null===(m=null===(_=null==i?void 0:i.result)||void 0===_?void 0:_.citations)||void 0===m?void 0:m[0])||void 0===f?void 0:f.segments)||void 0===b?void 0:b[0])||void 0===g?void 0:g.urls)||void 0===h?void 0:h[0];C={citation_number:null===(y=null===(w=null===(p=null==i?void 0:i.result)||void 0===p?void 0:p.citations)||void 0===w?void 0:w[0])||void 0===y?void 0:y.citation_number,customMetadata:{screenshot_url:null==t?void 0:t.gcs_url,relevance_score:100,link:null==t?void 0:t.highlight_url,type:"web_citation"}}}return C},[]),m=o((i,t,n)=>{v(o=>{const e="audio_citation"===t||"audio_citations"===t?"audio_citations":t.includes("image_citation")?"image_citations":t.includes("web_citation")?"web_citations":"file_citations",l=o[e]||[],a=l.findIndex(t=>String(t.citation_number)===i),u={...n,citation_number:i},d=a>=0?l.map((i,t)=>t===a?{...i,...u}:i):[...l,u];return{...o,[e]:d}})},[]);return{fetchOnDemandCitationHandler:o((i,t,n,o,e)=>{const c=String(i);return new Promise((r,s)=>{(async()=>{var v,f,b,g,h,p,w,y,C,N;try{const s=null!==(v=null==a?void 0:a.accessToken)&&void 0!==v?v:"";if(!s)throw new Error("No auth token available for on-demand citation fetch");const I=Number(i);if(Number.isNaN(I))throw new Error(`Invalid citation number: ${i}`);const $=null!==(f=sessionStorage.getItem("projectId"))&&void 0!==f?f:"",k=o?[`${u}/projects/${$}/${o}`]:[],x="explanation"===e?null!==(b=null==t?void 0:t.explanation)&&void 0!==b?b:"":null!==(g=null==t?void 0:t.reason)&&void 0!==g?g:"",q=JSON.stringify({userName:null!==(h=null==a?void 0:a.name)&&void 0!==h?h:`${null!==(p=null==a?void 0:a.firstname)&&void 0!==p?p:""} ${null!==(w=null==a?void 0:a.lastname)&&void 0!==w?w:""}`.trim(),userEmailId:null!==(y=null==a?void 0:a.email)&&void 0!==y?y:""}),D=[{reason:x,title:"",description:"explanation"===e?null!==(C=null==t?void 0:t.explanation)&&void 0!==C?C:"":null!==(N=null==t?void 0:t.reason)&&void 0!==N?N:""}],O=function(i){switch(i){case"artifact_chunks":case"scanned_doc_citations":return"scanned_doc_citation";case"rai_artifact_citation":return"rai_artifact_citation";case"document_citations":return"file_citation";case"audio_citations":return"requirement_ai_audio_citation";case"web_citations":return"web_citation";case"image_citations":return"requirement_ai_image_citation";default:return i}}(n);console.log("[useOnDemandCitation] fetching citation",{key:c,citationType:n,requestCitationType:O,requestId:l,files:k});const S=await d(l,O,I,x,s,D,k,q,o),E=_(S,n);E||console.error(`Failed to resolve on-demand citation ${c}`),E&&m(c,n,E),r(E)}catch(i){console.error("[useOnDemandCitation] error for citation",c,i),s(i)}})()})},[l,a]),libraryCitationsRef:r,libraryCitations:s}}export{e as useOnDemandCitation};
1
+ import{useRef as i,useState as t,useEffect as n,useCallback as o}from"react";function l({baseCitations:l,requestId:e,user:a,bucketName:d,fetchOnDemandCitation:u}){const c=null!=l?l:{},r=i(c),[s,v]=t(c);n(()=>{v(i=>{var t,n;return{...l,file_citations:i.file_citations&&i.file_citations.length>0?i.file_citations:null!==(t=null==l?void 0:l.file_citations)&&void 0!==t?t:[],audio_citations:i.audio_citations&&i.audio_citations.length>0?i.audio_citations:null!==(n=null==l?void 0:l.audio_citations)&&void 0!==n?n:[]}})},[l]),n(()=>{r.current=s},[s]);const _=o((i,t)=>{var n,o,l,e,a,d,u,c,r,s,v,_,f,m,g,b,h,p,w,y,C,k;let x=null===(u=null===(d=null===(a=null===(e=null===(l=null===(o=null===(n=null==i?void 0:i.result)||void 0===n?void 0:n.citations)||void 0===o?void 0:o[0])||void 0===l?void 0:l.citations)||void 0===e?void 0:e[0])||void 0===a?void 0:a.customMetaData)||void 0===d?void 0:d.value)||void 0===u?void 0:u[0];if("audio_citation"===t||"audio_citations"===t)x=null===(r=null===(c=null==i?void 0:i.result)||void 0===c?void 0:c.citations)||void 0===r?void 0:r[0];else if("readfile_citations"===t||"readfile_citation"===t)x=null===(v=null===(s=null==i?void 0:i.result)||void 0===s?void 0:s.citations)||void 0===v?void 0:v[0];else if(t.includes("image_citation"))x=null===(f=null===(_=null==i?void 0:i.result)||void 0===_?void 0:_.citations)||void 0===f?void 0:f[0];else if(t.includes("web_citation")){const t=null===(w=null===(p=null===(h=null===(b=null===(g=null===(m=null==i?void 0:i.result)||void 0===m?void 0:m.citations)||void 0===g?void 0:g[0])||void 0===b?void 0:b.segments)||void 0===h?void 0:h[0])||void 0===p?void 0:p.urls)||void 0===w?void 0:w[0];x={citation_number:null===(k=null===(C=null===(y=null==i?void 0:i.result)||void 0===y?void 0:y.citations)||void 0===C?void 0:C[0])||void 0===k?void 0:k.citation_number,customMetadata:{screenshot_url:null==t?void 0:t.gcs_url,relevance_score:100,link:null==t?void 0:t.highlight_url,type:"web_citation"}}}return x},[]),f=o((i,t,n)=>{v(o=>{const l="audio_citation"===t||"audio_citations"===t?"audio_citations":t.includes("image_citation")?"image_citations":"readfile_citations"===t||"readfile_citation"===t?"readfile_citations":t.includes("web_citation")?"web_citations":"file_citations",e=o[l]||[],a=e.findIndex(t=>String(t.citation_number)===i),d={...n,citation_number:i},u=a>=0?e.map((i,t)=>t===a?{...i,...d}:i):[...e,d];return{...o,[l]:u}})},[]);return{fetchOnDemandCitationHandler:o((i,t,n,o,l)=>{const c=String(i);return new Promise((r,s)=>{(async()=>{var v,m,g,b,h,p,w,y,C,k;try{const s=null!==(v=null==a?void 0:a.accessToken)&&void 0!==v?v:"";if(!s)throw new Error("No auth token available for on-demand citation fetch");const x=null!==(m=sessionStorage.getItem("projectId"))&&void 0!==m?m:"",I=o?[`${d}/projects/${x}/${o}`]:[],$="explanation"===l?null!==(g=null==t?void 0:t.explanation)&&void 0!==g?g:"":null!==(b=null==t?void 0:t.reason)&&void 0!==b?b:"",q=JSON.stringify({userName:null!==(h=null==a?void 0:a.name)&&void 0!==h?h:`${null!==(p=null==a?void 0:a.firstname)&&void 0!==p?p:""} ${null!==(w=null==a?void 0:a.lastname)&&void 0!==w?w:""}`.trim(),userEmailId:null!==(y=null==a?void 0:a.email)&&void 0!==y?y:""}),D=[{reason:$,title:"",description:"explanation"===l?null!==(C=null==t?void 0:t.explanation)&&void 0!==C?C:"":null!==(k=null==t?void 0:t.reason)&&void 0!==k?k:""}],O=function(i){switch(i){case"artifact_chunks":case"scanned_doc_citations":return"scanned_doc_citation";case"rai_artifact_citation":return"rai_artifact_citation";case"document_citations":return"file_citation";case"audio_citations":return"requirement_ai_audio_citation";case"web_citations":return"web_citation";case"image_citations":return"requirement_ai_image_citation";default:return i}}(n);console.log("[useOnDemandCitation] fetching citation",{key:c,citationType:n,requestCitationType:O,requestId:e,files:I});const N=await u(e,O,i,$,s,D,I,q,o),S=_(N,n);S||console.error(`Failed to resolve on-demand citation ${c}`),S&&f(c,n,S),r(S)}catch(i){console.error("[useOnDemandCitation] error for citation",c,i),s(i)}})()})},[e,a]),libraryCitationsRef:r,libraryCitations:s}}export{l as useOnDemandCitation};
2
2
  //# sourceMappingURL=useOnDemandCitation.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:u,projectAnalyserSummary:c,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),k=t(null),y=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(),k.current=null,y.current=null,N.current={gap_items_prompt:"",risk_items_prompt:""},S.current.clear(),b({finalGap:"",finalRisk:"",status:"in-progress"}))},[f,l]),console.log("testing::isGraphQLCallInProgress",f,l),{processStreamContent:function(e,t,i,a){try{const l=JSON.stringify(e);if(y.current===l)return;y.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:u,processedDescription:c}=o(e.value,e.blockNumber,e.storyNumber,e.description);s(e=>{var t;return u.length>0&&((null==e?void 0:e.gpt_citations)||(e.gpt_citations=[]),null===(t=e.gpt_citations)||void 0===t||t.push(...u)),{...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 u=await m(e,i,t);r(e=>{var t;const i=[...e];return null===(t=u.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=u.response)||void 0===o?void 0:o.gap_items_prompt)||"",l=(null===(n=u.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,c,d,p,_,m,g;return{...e,appmod_citations:[...null!==(t=e.appmod_citations)&&void 0!==t?t:[],...null!==(i=u.response.appmod_citations)&&void 0!==i?i:[]],audio_citations:[...null!==(o=e.audio_citations)&&void 0!==o?o:[],...null!==(n=u.response.audio_citations)&&void 0!==n?n:[]],file_citations:[...null!==(r=e.file_citations)&&void 0!==r?r:[],...null!==(s=u.response.file_citations)&&void 0!==s?s:[]],image_citations:[...null!==(a=e.image_citations)&&void 0!==a?a:[],...null!==(l=u.response.image_citations)&&void 0!==l?l:[]],rca_citations:[...null!==(c=e.rca_citations)&&void 0!==c?c:[],...null!==(d=u.response.rca_citations)&&void 0!==d?d:[]],web_citations:[...null!==(p=e.web_citations)&&void 0!==p?p:[],...null!==(_=u.response.web_citations)&&void 0!==_?_:[]],readfile_citations:[...null!==(m=e.readfile_citations)&&void 0!==m?m:[],...null!==(g=u.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:c},l,t),v.current.add(p)),{...e,value:a,description:c}}).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,gapValue:g,confidenceScore:f,metadata:b},v)=>{n(n=>{var h,y,N,S,B,$,C,O;const w=n.findIndex(e=>e.storyNumber===r);if("intro"===t)-1===w?n.push({artifactId:`STORY-${r}-${a}`,title:e,value:o,description:s,storyNumber:r,sub_features:[],section:t,blockNumber:a,aiReasoning:R[v],big_enough:l,big_enough_decision_factors:m,gapValue:g,confidenceScore:f,metadata:b}):(n[w].value+=o,n[w].aiReasoning=n[w].aiReasoning||[],null===(y=null===(h=n[w])||void 0===h?void 0:h.aiReasoning)||void 0===y||y.push(...R[v]),n[w].big_enough=l,n[w].big_enough_decision_factors=m,n[w].gapValue=g,n[w].confidenceScore=f,n[w].metadata=b);else{n[w].sub_features||(n[w].sub_features=[]);const i=(null===(S=null===(N=n[w])||void 0===N?void 0:N.sub_features)||void 0===S?void 0:S.findIndex(e=>e.blockNumber===a))||-1;if(-1===i)null===($=null===(B=n[w])||void 0===B?void 0:B.sub_features)||void 0===$||$.push({artifactId:`STORY-${r}-${a}`,title:e,value:o,storyNumber:r,blockNumber:a,section:t,aiReasoning:R[v],big_enough:l,big_enough_decision_factors:m,gapValue:g,confidenceScore:f,metadata:b});else{let e=null===(O=null===(C=null==n?void 0:n[w])||void 0===C?void 0:C.sub_features)||void 0===O?void 0:O[i];e.value=(e.value||"")+o,e.aiReasoning=e.aiReasoning||[],e.aiReasoning.push(...R[v]),e.big_enough=l,e.big_enough_decision_factors=m,e.gapValue=g,e.confidenceScore=f,e.metadata=b}}const E=JSON.stringify(n);return k.current!==E&&(_({key:`streaming-redis-key-${i}`,value:{mmvf_list:n,knowledgeBase:u,projectAnalyserSummary:c,dataSources_files:d,ai_reasonings:p}}),k.current=E),[...n]})}),a&&g&&(console.log("streaming::userstory::completed::lib"),b({finalGap:"",finalRisk:"",status:"complete"}))}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:u,projectAnalyserSummary:c,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),k=t(null),y=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(),k.current=null,y.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{const l=JSON.stringify(e);if(y.current===l)return;y.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:u,processedDescription:c}=o(e.value,e.blockNumber,e.storyNumber,e.description);s(e=>{var t;return u.length>0&&((null==e?void 0:e.gpt_citations)||(e.gpt_citations=[]),null===(t=e.gpt_citations)||void 0===t||t.push(...u)),{...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 u=await m(e,i,t);r(e=>{var t;const i=[...e];return null===(t=u.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=u.response)||void 0===o?void 0:o.gap_items_prompt)||"",l=(null===(n=u.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,c,d,p,_,m,g;return{...e,appmod_citations:[...null!==(t=e.appmod_citations)&&void 0!==t?t:[],...null!==(i=u.response.appmod_citations)&&void 0!==i?i:[]],audio_citations:[...null!==(o=e.audio_citations)&&void 0!==o?o:[],...null!==(n=u.response.audio_citations)&&void 0!==n?n:[]],file_citations:[...null!==(r=e.file_citations)&&void 0!==r?r:[],...null!==(s=u.response.file_citations)&&void 0!==s?s:[]],image_citations:[...null!==(a=e.image_citations)&&void 0!==a?a:[],...null!==(l=u.response.image_citations)&&void 0!==l?l:[]],rca_citations:[...null!==(c=e.rca_citations)&&void 0!==c?c:[],...null!==(d=u.response.rca_citations)&&void 0!==d?d:[]],web_citations:[...null!==(p=e.web_citations)&&void 0!==p?p:[],...null!==(_=u.response.web_citations)&&void 0!==_?_:[]],readfile_citations:[...null!==(m=e.readfile_citations)&&void 0!==m?m:[],...null!==(g=u.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:c},l,t),v.current.add(p)),{...e,value:a,description:c}}).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,gapValue:g,confidenceScore:f,metadata:b},v)=>{n(n=>{var h,y,N,S,B,$,C,O;const w=n.findIndex(e=>e.storyNumber===r);if("intro"===t)-1===w?n.push({artifactId:`STORY-${r}-${a}`,title:e,value:o,description:s,storyNumber:r,sub_features:[],section:t,blockNumber:a,aiReasoning:R[v],big_enough:l,big_enough_decision_factors:m,gapValue:g,confidenceScore:f,metadata:b}):(n[w].value+=o,n[w].aiReasoning=n[w].aiReasoning||[],null===(y=null===(h=n[w])||void 0===h?void 0:h.aiReasoning)||void 0===y||y.push(...R[v]),n[w].big_enough=l,n[w].big_enough_decision_factors=m,n[w].gapValue=g,n[w].confidenceScore=f,n[w].metadata=b);else{n[w].sub_features||(n[w].sub_features=[]);const i=(null===(S=null===(N=n[w])||void 0===N?void 0:N.sub_features)||void 0===S?void 0:S.findIndex(e=>e.blockNumber===a))||-1;if(-1===i)null===($=null===(B=n[w])||void 0===B?void 0:B.sub_features)||void 0===$||$.push({artifactId:`STORY-${r}-${a}`,title:e,value:o,storyNumber:r,blockNumber:a,section:t,aiReasoning:R[v],big_enough:l,big_enough_decision_factors:m,gapValue:g,confidenceScore:f,metadata:b});else{let e=null===(O=null===(C=null==n?void 0:n[w])||void 0===C?void 0:C.sub_features)||void 0===O?void 0:O[i];e.value=(e.value||"")+o,e.aiReasoning=e.aiReasoning||[],e.aiReasoning.push(...R[v]),e.big_enough=l,e.big_enough_decision_factors=m,e.gapValue=g,e.confidenceScore=f,e.metadata=b}}const E=JSON.stringify(n);return k.current!==E&&(_({key:`streaming-redis-key-${i}`,value:{mmvf_list:n,knowledgeBase:u,projectAnalyserSummary:c,dataSources_files:d,ai_reasonings:p}}),k.current=E),[...n]})}),console.log("streaming::userstory::completed",a,g),a&&g&&(console.log("streaming::userstory::completed::lib"),b({finalGap:"",finalRisk:"",status:"complete"}))}catch(e){console.error("Error in processing Stream Content",e)}}}}export{n as useStreamContentHandler};
2
2
  //# sourceMappingURL=useStreamContentHandler.js.map
@@ -1,2 +1,2 @@
1
- import{jsx as e,jsxs as l,Fragment as t}from"react/jsx-runtime";import{useState as o,useCallback as n,isValidElement as i,cloneElement as r,Children as s,useMemo as d}from"react";import{ArrowRight as c}from"lucide-react";import a from"./ExpandableOl.module.css.js";import p from"./ReqAiCitationRenderer.js";const u=({label:u,children:m,onProceed:y,isProceedDisabled:h,defaultVisibleItems:v=2,customStyles:b,citationStyles:S,customIcons:f,aiReason:g})=>{const[x,B]=o(!1),C=n(l=>{var t,o,n;if(!i(l))return l;const d=l;return"a"===(null===(t=null==d?void 0:d.type)||void 0===t?void 0:t.name)?e(p,{href:d.props.href,citationStyles:S,customIcons:f,aiReason:g,source:null===(o=d.props)||void 0===o?void 0:o.source,children:d.props.children}):(null===(n=d.props)||void 0===n?void 0:n.children)?r(d,{children:s.map(d.props.children,C)}):d},[S,f]),N=d(()=>s.toArray(m).map(e=>C(e)),[m,C]),P=s.toArray(m).length>v,k=d(()=>x?N:N.slice(0,2),[x,N]);return l(t,{children:[e("ol",{className:a.list,style:null==b?void 0:b.listStyle,children:k.map((o,n)=>{const s=n===k.length-1;return i(o)?r(o,s&&P?{style:{...o.props.style,...null==b?void 0:b.itemStyle},children:l(t,{children:[e("span",{style:null==b?void 0:b.itemTextStyle,children:o.props.children}),!x&&e("button",{type:"button",onClick:()=>B(!0),className:a.toggleButton,style:null==b?void 0:b.moreButton,children:"show more"}),x&&e("button",{type:"button",onClick:()=>B(!1),className:a.toggleButton,style:null==b?void 0:b.toggleButton,children:"see less"})]})}:{style:{...o.props.style,...null==b?void 0:b.itemStyle},children:e("span",{style:null==b?void 0:b.itemTextStyle,children:o.props.children})}):e("li",{style:null==b?void 0:b.itemStyle,children:e("span",{style:null==b?void 0:b.itemTextStyle,children:o})},n)})}),y&&e("div",{className:a.proceedContainer,children:l("button",{type:"button",disabled:h,onClick:e=>{e.stopPropagation(),h||y()},className:`${a.proceedButton} ${h?a.proceedDisabled:a.proceedEnabled}`,style:h?null==b?void 0:b.disableProceedStyle:null==b?void 0:b.enableProceedStyle,children:[e("span",{children:null!=u?u:""}),e(c,{size:15,strokeWidth:1.5})]})})]})};export{u as default};
1
+ import{jsx as e,jsxs as l,Fragment as t}from"react/jsx-runtime";import{useState as o,useCallback as n,isValidElement as i,cloneElement as r,Children as s,useMemo as d}from"react";import{ArrowRight as c}from"lucide-react";import a from"./ExpandableOl.module.css.js";import p from"./ReqAiCitationRenderer.js";const u=({label:u,children:m,onProceed:y,isProceedDisabled:h,defaultVisibleItems:v=2,customStyles:b,citationStyles:S,customIcons:g,aiReason:f})=>{const[P,x]=o(!1),B=n(l=>{var t,o,n;if(!i(l))return l;const d=l;return"a"===(null===(t=null==d?void 0:d.type)||void 0===t?void 0:t.name)?e(p,{href:d.props.href,citationStyles:S,customIcons:g,aiReason:f,source:null===(o=d.props)||void 0===o?void 0:o.source,children:d.props.children}):(null===(n=d.props)||void 0===n?void 0:n.children)?r(d,{children:s.map(d.props.children,B)}):d},[S,g]),C=d(()=>s.toArray(m).map(e=>B(e)),[m,B]),N=s.toArray(m).length>v,k=d(()=>P?C:C.slice(0,2),[P,C]);return l(t,{children:[e("ol",{className:a.list,style:null==b?void 0:b.listStyle,children:k.map((o,n)=>{const s=n===k.length-1;return i(o)?r(o,s&&N?{style:{...o.props.style,...null==b?void 0:b.itemStyle},children:l(t,{children:[e("span",{style:null==b?void 0:b.itemTextStyle,children:o.props.children}),!P&&e("button",{type:"button",onClick:e=>{e.stopPropagation(),x(!0)},className:a.toggleButton,style:null==b?void 0:b.moreButton,children:"show more"}),P&&e("button",{type:"button",onClick:e=>{e.stopPropagation(),x(!1)},className:a.toggleButton,style:null==b?void 0:b.toggleButton,children:"see less"})]})}:{style:{...o.props.style,...null==b?void 0:b.itemStyle},children:e("span",{style:null==b?void 0:b.itemTextStyle,children:o.props.children})}):e("li",{style:null==b?void 0:b.itemStyle,children:e("span",{style:null==b?void 0:b.itemTextStyle,children:o})},n)})}),y&&e("div",{className:a.proceedContainer,children:l("button",{type:"button",disabled:h,onClick:e=>{e.stopPropagation(),h||y()},className:`${a.proceedButton} ${h?a.proceedDisabled:a.proceedEnabled}`,style:h?null==b?void 0:b.disableProceedStyle:null==b?void 0:b.enableProceedStyle,children:[e("span",{children:null!=u?u:""}),e(c,{size:15,strokeWidth:1.5})]})})]})};export{u as default};
2
2
  //# sourceMappingURL=ExpandableOl.js.map
@@ -10,7 +10,7 @@ interface useOnDemandCitationParams {
10
10
  /** Authenticated user — provides accessToken and user details for the reqai metadata. */
11
11
  user: User | null;
12
12
  bucketName: string;
13
- fetchOnDemandCitation(requestId: string, citationType: string, citationNumber: number, llmFormattedResponse: string, token: string, mmvf_list?: {
13
+ fetchOnDemandCitation(requestId: string, citationType: string, citationNumber: string, llmFormattedResponse: string, token: string, mmvf_list?: {
14
14
  reason: string;
15
15
  title: string;
16
16
  description: string;
@@ -1 +1 @@
1
- {"version":3,"file":"useOnDemandCitation.d.ts","sourceRoot":"","sources":["../../../../../../src/features/RequirementAI/hooks/useOnDemandCitation.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAMzD,UAAU,yBAAyB;IACjC,2FAA2F;IAC3F,aAAa,EAAE,kBAAkB,GAAG,IAAI,CAAC;IACzC,wFAAwF;IACxF,SAAS,EAAE,MAAM,CAAC;IAClB,yFAAyF;IACzF,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,qBAAqB,CAAC,SAAS,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,oBAAoB,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE;QAC9I,MAAM,EAAE,MAAM,CAAC;QACf,KAAK,EAAE,MAAM,CAAC;QACd,WAAW,EAAE,MAAM,CAAC;KACrB,EAAE,GAAG,SAAS,EAAE,KAAK,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,EAAE,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC,GAAG,CAAC,CAAA;CAC9H;AAgCD;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CAAC,EAClC,aAAa,EACb,SAAS,EACT,IAAI,EACJ,UAAU,EACV,qBAAqB,EACtB,EAAE,yBAAyB;+CAsFV,MAAM,gBACJ,YAAY,gBACZ,MAAM,WACX,MAAM,oBACG,aAAa,GAAG,WAAW,KAC5C,QAAQ,GAAG,CAAC;;;EA0FlB"}
1
+ {"version":3,"file":"useOnDemandCitation.d.ts","sourceRoot":"","sources":["../../../../../../src/features/RequirementAI/hooks/useOnDemandCitation.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAMzD,UAAU,yBAAyB;IACjC,2FAA2F;IAC3F,aAAa,EAAE,kBAAkB,GAAG,IAAI,CAAC;IACzC,wFAAwF;IACxF,SAAS,EAAE,MAAM,CAAC;IAClB,yFAAyF;IACzF,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,qBAAqB,CAAC,SAAS,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,oBAAoB,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE;QAC9I,MAAM,EAAE,MAAM,CAAC;QACf,KAAK,EAAE,MAAM,CAAC;QACd,WAAW,EAAE,MAAM,CAAC;KACrB,EAAE,GAAG,SAAS,EAAE,KAAK,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,EAAE,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC,GAAG,CAAC,CAAA;CAC9H;AAgCD;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CAAC,EAClC,aAAa,EACb,SAAS,EACT,IAAI,EACJ,UAAU,EACV,qBAAqB,EACtB,EAAE,yBAAyB;+CA2FV,MAAM,gBACJ,YAAY,gBACZ,MAAM,WACX,MAAM,oBACG,aAAa,GAAG,WAAW,KAC5C,QAAQ,GAAG,CAAC;;;EA0FlB"}
@@ -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,UAAU,EAAE,MAAM,mCAAmC,CAAC;AACzF,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,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;EAqO1C"}
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,UAAU,EAAE,MAAM,mCAAmC,CAAC;AACzF,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,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;EAuO1C"}
@@ -1 +1 @@
1
- {"version":3,"file":"ExpandableOl.d.ts","sourceRoot":"","sources":["../../../../../../src/features/RequirementAI/shared/ExpandableOl.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAoD,SAAS,EAAwB,MAAM,OAAO,CAAC;AAG1G,OAAO,EAAE,yBAAyB,EAAE,sBAAsB,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAE5H,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAE9C,UAAU,iBAAiB;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,YAAY,CAAC,EAAE,sBAAsB,CAAC;IACtC,cAAc,CAAC,EAAE,yBAAyB,CAAC;IAC3C,WAAW,CAAC,EAAE,cAAc,CAAC;IAC7B,mBAAmB,CAAC,EAAE,kBAAkB,CAAC;IACzC,QAAQ,EAAE,YAAY,CAAC;CACxB;AAED,QAAA,MAAM,YAAY,gIAWf,iBAAiB,4CA6InB,CAAC;AAEF,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"ExpandableOl.d.ts","sourceRoot":"","sources":["../../../../../../src/features/RequirementAI/shared/ExpandableOl.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAoD,SAAS,EAAwB,MAAM,OAAO,CAAC;AAG1G,OAAO,EAAE,yBAAyB,EAAE,sBAAsB,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAE5H,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAE9C,UAAU,iBAAiB;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,YAAY,CAAC,EAAE,sBAAsB,CAAC;IACtC,cAAc,CAAC,EAAE,yBAAyB,CAAC;IAC3C,WAAW,CAAC,EAAE,cAAc,CAAC;IAC7B,mBAAmB,CAAC,EAAE,kBAAkB,CAAC;IACzC,QAAQ,EAAE,YAAY,CAAC;CACxB;AAED,QAAA,MAAM,YAAY,gIAWf,iBAAiB,4CAiJnB,CAAC;AAEF,eAAe,YAAY,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@e-llm-studio/requirement-ai",
3
- "version": "0.0.299",
3
+ "version": "0.0.301",
4
4
  "author": "Saptyadeep Bhattacharjee",
5
5
  "description": "",
6
6
  "license": "MIT",