@e-llm-studio/requirement-ai 0.0.248 → 0.0.249

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),i=require("../utils/proccess-stream.utils.js");exports.useStreamContentHandler=function({setUserStory:t,setAiReasoning:o,setUserStoryCitations:n,onStreamingCompleted:r,isGraphQLCallInProgress:s,knowledgeBase:a,projectAnalyserSummary:u,dataSourceFiles:l,aiReasoning:c,setRedisValue:d,fetchCitationByBlock:_}){const p=e.useRef(new Set),m=e.useRef(new Set),g=e.useRef(null),b=e.useRef(null),v=e.useRef({gap_items_prompt:"",risk_items_prompt:""}),f=e.useRef(new Set);async function h(e,i,t){var a,u;let l="",c="";try{const r=await _(e,t,i);o(e=>{var i;const t=[...e];return null===(i=r.response.ai_reasonings)||void 0===i||i.forEach(e=>{const i=t.findIndex(i=>i.id===e.id);-1!==i&&e.gap.length>0&&e.reason.length>0&&(t[i]={...e})}),t}),l=(null===(a=r.response)||void 0===a?void 0:a.gap_items_prompt)||"",c=(null===(u=r.response)||void 0===u?void 0:u.risk_items_prompt)||"",(l||c)&&(v.current={gap_items_prompt:l,risk_items_prompt:c}),n(e=>{var i,t,o,n,s,a,u,l,c,d,_,p,m,g;return{...e,appmod_citations:[...null!==(i=e.appmod_citations)&&void 0!==i?i:[],...null!==(t=r.response.appmod_citations)&&void 0!==t?t:[]],audio_citations:[...null!==(o=e.audio_citations)&&void 0!==o?o:[],...null!==(n=r.response.audio_citations)&&void 0!==n?n:[]],file_citations:[...null!==(s=e.file_citations)&&void 0!==s?s:[],...null!==(a=r.response.file_citations)&&void 0!==a?a:[]],image_citations:[...null!==(u=e.image_citations)&&void 0!==u?u:[],...null!==(l=r.response.image_citations)&&void 0!==l?l:[]],rca_citations:[...null!==(c=e.rca_citations)&&void 0!==c?c:[],...null!==(d=r.response.rca_citations)&&void 0!==d?d:[]],web_citations:[...null!==(_=e.web_citations)&&void 0!==_?_:[],...null!==(p=r.response.web_citations)&&void 0!==p?p:[]],readfile_citations:[...null!==(m=e.readfile_citations)&&void 0!==m?m:[],...null!==(g=r.response.readfile_citations)&&void 0!==g?g:[]]}})}catch(i){console.error("[liblogs] processCitationsByBlock error — story:%s block:%s",e.storyNumber,e.blockNumber,i)}finally{let i=`<STORY_NUMBER>${e.storyNumber}<BLOCK_NUMBER>${e.blockNumber}`;if(m.current.add(i),m.current.size===p.current.size&&!s.current){const e=l||v.current.gap_items_prompt,i=c||v.current.risk_items_prompt;await r(e,i),p.current.clear(),m.current.clear(),g.current=null,b.current=null,v.current={gap_items_prompt:"",risk_items_prompt:""},f.current.clear()}}}return{processStreamContent:function(e,r,s){try{const _=JSON.stringify(e);if(b.current===_)return;b.current=_;let m=[],v=[];e=e.map(e=>{var t;const o=`${(e={...e,subBlockNumber:null!==(t=e.subBlockNumber)&&void 0!==t?t:"1"}).storyNumber}-${e.blockNumber}-${e.subBlockNumber}`;if(f.current.has(o))return null;f.current.add(o);let{outputText:s,reasonings:a,gpt_citation:u,processedDescription:l}=i.processAIReasoningFromBlocks(e.value,e.blockNumber,e.storyNumber,e.description);n(e=>{var i;return u.length>0&&((null==e?void 0:e.gpt_citations)||(e.gpt_citations=[]),null===(i=e.gpt_citations)||void 0===i||i.push(...u)),{...e}}),m.push(...a),v.push([...a]);let c=`<STORY_NUMBER>${e.storyNumber}<BLOCK_NUMBER>${e.blockNumber}<SUB_BLOCK>${e.subBlockNumber}`;return p.current.has(c)||(h({...e,value:s,description:l},a,r),p.current.add(c)),{...e,value:s,description:l}}).filter(Boolean),m.forEach(e=>{o(i=>(i.find(i=>i.id===e.id)||i.push(e),[...i]))}),e.length>0&&e.map(({title:e,section:i,value:o,storyNumber:n,description:r,blockNumber:_,big_enough:p,big_enough_decision_factors:m,gapValue:b,confidenceScore:f,metadata:h},N)=>{t(t=>{var y,k,R,S,B,$,C,w;const O=t.findIndex(e=>e.storyNumber===n);if("intro"===i)-1===O?t.push({artifactId:`STORY-${n}-${_}`,title:e,value:o,description:r,storyNumber:n,sub_features:[],section:i,blockNumber:_,aiReasoning:v[N],big_enough:p,big_enough_decision_factors:m,gapValue:b,confidenceScore:f,metadata:h}):(t[O].value+=o,t[O].aiReasoning=t[O].aiReasoning||[],null===(k=null===(y=t[O])||void 0===y?void 0:y.aiReasoning)||void 0===k||k.push(...v[N]),t[O].big_enough=p,t[O].big_enough_decision_factors=m,t[O].gapValue=b,t[O].confidenceScore=f,t[O].metadata=h);else{t[O].sub_features||(t[O].sub_features=[]);const r=(null===(S=null===(R=t[O])||void 0===R?void 0:R.sub_features)||void 0===S?void 0:S.findIndex(e=>e.blockNumber===_))||-1;if(-1===r)null===($=null===(B=t[O])||void 0===B?void 0:B.sub_features)||void 0===$||$.push({artifactId:`STORY-${n}-${_}`,title:e,value:o,storyNumber:n,blockNumber:_,section:i,aiReasoning:v[N],big_enough:p,big_enough_decision_factors:m,gapValue:b,confidenceScore:f,metadata:h});else{let e=null===(w=null===(C=null==t?void 0:t[O])||void 0===C?void 0:C.sub_features)||void 0===w?void 0:w[r];e.value=(e.value||"")+o,e.aiReasoning=e.aiReasoning||[],e.aiReasoning.push(...v[N]),e.big_enough=p,e.big_enough_decision_factors=m,e.gapValue=b,e.confidenceScore=f,e.metadata=h}}const E=JSON.stringify(t);return g.current!==E&&(d({key:`streaming-redis-key-${s}`,value:{mmvf_list:t,knowledgeBase:a,projectAnalyserSummary:u,dataSources_files:l,ai_reasonings:c}}),g.current=E),[...t]})})}catch(e){console.error("Error in processing Stream Content",e)}}}};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),i=require("../utils/proccess-stream.utils.js");exports.useStreamContentHandler=function({setUserStory:t,setAiReasoning:n,setUserStoryCitations:o,onStreamingCompleted:s,isGraphQLCallInProgress:r,knowledgeBase:a,projectAnalyserSummary:u,dataSourceFiles:l,aiReasoning:c,setRedisValue:d,fetchCitationByBlock:p}){const[_,m]=e.useState({finalGap:"",finalRisk:"",status:"in-progress"}),g=e.useRef(new Set),f=e.useRef(new Set),b=e.useRef(null),v=e.useRef(null),h=e.useRef({gap_items_prompt:"",risk_items_prompt:""}),k=e.useRef(new Set);return e.useEffect(()=>{"complete"!==_.status||r||(s(_.finalGap,_.finalRisk),g.current.clear(),f.current.clear(),b.current=null,v.current=null,h.current={gap_items_prompt:"",risk_items_prompt:""},k.current.clear(),m({finalGap:"",finalRisk:"",status:"in-progress"}))},[_,r]),{processStreamContent:function(e,s,r){try{const _=JSON.stringify(e);if(v.current===_)return;v.current=_;let R=[],N=[];e=e.map(e=>{var t;const r=`${(e={...e,subBlockNumber:null!==(t=e.subBlockNumber)&&void 0!==t?t:"1"}).storyNumber}-${e.blockNumber}-${e.subBlockNumber}`;if(k.current.has(r))return null;k.current.add(r);let{outputText:a,reasonings:u,gpt_citation:l,processedDescription:c}=i.processAIReasoningFromBlocks(e.value,e.blockNumber,e.storyNumber,e.description);o(e=>{var i;return l.length>0&&((null==e?void 0:e.gpt_citations)||(e.gpt_citations=[]),null===(i=e.gpt_citations)||void 0===i||i.push(...l)),{...e}}),R.push(...u),N.push([...u]);let d=`<STORY_NUMBER>${e.storyNumber}<BLOCK_NUMBER>${e.blockNumber}<SUB_BLOCK>${e.subBlockNumber}`;return g.current.has(d)||(!async function(e,i,t){var s,r;let a="",u="";try{const l=await p(e,t,i);n(e=>{var i;const t=[...e];return null===(i=l.response.ai_reasonings)||void 0===i||i.forEach(e=>{const i=t.findIndex(i=>i.id===e.id);-1!==i&&e.gap.length>0&&e.reason.length>0&&(t[i]={...e})}),t}),a=(null===(s=l.response)||void 0===s?void 0:s.gap_items_prompt)||"",u=(null===(r=l.response)||void 0===r?void 0:r.risk_items_prompt)||"",(a||u)&&(h.current={gap_items_prompt:a,risk_items_prompt:u}),o(e=>{var i,t,n,o,s,r,a,u,c,d,p,_,m,g;return{...e,appmod_citations:[...null!==(i=e.appmod_citations)&&void 0!==i?i:[],...null!==(t=l.response.appmod_citations)&&void 0!==t?t:[]],audio_citations:[...null!==(n=e.audio_citations)&&void 0!==n?n:[],...null!==(o=l.response.audio_citations)&&void 0!==o?o:[]],file_citations:[...null!==(s=e.file_citations)&&void 0!==s?s:[],...null!==(r=l.response.file_citations)&&void 0!==r?r:[]],image_citations:[...null!==(a=e.image_citations)&&void 0!==a?a:[],...null!==(u=l.response.image_citations)&&void 0!==u?u:[]],rca_citations:[...null!==(c=e.rca_citations)&&void 0!==c?c:[],...null!==(d=l.response.rca_citations)&&void 0!==d?d:[]],web_citations:[...null!==(p=e.web_citations)&&void 0!==p?p:[],...null!==(_=l.response.web_citations)&&void 0!==_?_:[]],readfile_citations:[...null!==(m=e.readfile_citations)&&void 0!==m?m:[],...null!==(g=l.response.readfile_citations)&&void 0!==g?g:[]]}})}catch(i){console.error("[liblogs] processCitationsByBlock error — story:%s block:%s",e.storyNumber,e.blockNumber,i)}finally{let i=`<STORY_NUMBER>${e.storyNumber}<BLOCK_NUMBER>${e.blockNumber}`;if(f.current.add(i),f.current.size===g.current.size){const e=a||h.current.gap_items_prompt,i=u||h.current.risk_items_prompt;m({finalGap:e,finalRisk:i,status:"complete"})}}}({...e,value:a,description:c},u,s),g.current.add(d)),{...e,value:a,description:c}}).filter(Boolean),R.forEach(e=>{n(i=>(i.find(i=>i.id===e.id)||i.push(e),[...i]))}),e.length>0&&e.map(({title:e,section:i,value:n,storyNumber:o,description:s,blockNumber:p,big_enough:_,big_enough_decision_factors:m,gapValue:g,confidenceScore:f,metadata:v},h)=>{t(t=>{var k,R,y,S,B,$,C,O;const w=t.findIndex(e=>e.storyNumber===o);if("intro"===i)-1===w?t.push({artifactId:`STORY-${o}-${p}`,title:e,value:n,description:s,storyNumber:o,sub_features:[],section:i,blockNumber:p,aiReasoning:N[h],big_enough:_,big_enough_decision_factors:m,gapValue:g,confidenceScore:f,metadata:v}):(t[w].value+=n,t[w].aiReasoning=t[w].aiReasoning||[],null===(R=null===(k=t[w])||void 0===k?void 0:k.aiReasoning)||void 0===R||R.push(...N[h]),t[w].big_enough=_,t[w].big_enough_decision_factors=m,t[w].gapValue=g,t[w].confidenceScore=f,t[w].metadata=v);else{t[w].sub_features||(t[w].sub_features=[]);const s=(null===(S=null===(y=t[w])||void 0===y?void 0:y.sub_features)||void 0===S?void 0:S.findIndex(e=>e.blockNumber===p))||-1;if(-1===s)null===($=null===(B=t[w])||void 0===B?void 0:B.sub_features)||void 0===$||$.push({artifactId:`STORY-${o}-${p}`,title:e,value:n,storyNumber:o,blockNumber:p,section:i,aiReasoning:N[h],big_enough:_,big_enough_decision_factors:m,gapValue:g,confidenceScore:f,metadata:v});else{let e=null===(O=null===(C=null==t?void 0:t[w])||void 0===C?void 0:C.sub_features)||void 0===O?void 0:O[s];e.value=(e.value||"")+n,e.aiReasoning=e.aiReasoning||[],e.aiReasoning.push(...N[h]),e.big_enough=_,e.big_enough_decision_factors=m,e.gapValue=g,e.confidenceScore=f,e.metadata=v}}const E=JSON.stringify(t);return b.current!==E&&(d({key:`streaming-redis-key-${r}`,value:{mmvf_list:t,knowledgeBase:a,projectAnalyserSummary:u,dataSources_files:l,ai_reasonings:c}}),b.current=E),[...t]})})}catch(e){console.error("Error in processing Stream Content",e)}}}};
2
2
  //# sourceMappingURL=useStreamContentHandler.js.map
@@ -1,2 +1,2 @@
1
- import{useRef as e}from"react";import{processAIReasoningFromBlocks as i}from"../utils/proccess-stream.utils.js";function t({setUserStory:t,setAiReasoning:o,setUserStoryCitations:n,onStreamingCompleted:r,isGraphQLCallInProgress:s,knowledgeBase:a,projectAnalyserSummary:u,dataSourceFiles:l,aiReasoning:c,setRedisValue:d,fetchCitationByBlock:p}){const _=e(new Set),m=e(new Set),g=e(null),b=e(null),v=e({gap_items_prompt:"",risk_items_prompt:""}),f=e(new Set);async function h(e,i,t){var a,u;let l="",c="";try{const r=await p(e,t,i);o(e=>{var i;const t=[...e];return null===(i=r.response.ai_reasonings)||void 0===i||i.forEach(e=>{const i=t.findIndex(i=>i.id===e.id);-1!==i&&e.gap.length>0&&e.reason.length>0&&(t[i]={...e})}),t}),l=(null===(a=r.response)||void 0===a?void 0:a.gap_items_prompt)||"",c=(null===(u=r.response)||void 0===u?void 0:u.risk_items_prompt)||"",(l||c)&&(v.current={gap_items_prompt:l,risk_items_prompt:c}),n(e=>{var i,t,o,n,s,a,u,l,c,d,p,_,m,g;return{...e,appmod_citations:[...null!==(i=e.appmod_citations)&&void 0!==i?i:[],...null!==(t=r.response.appmod_citations)&&void 0!==t?t:[]],audio_citations:[...null!==(o=e.audio_citations)&&void 0!==o?o:[],...null!==(n=r.response.audio_citations)&&void 0!==n?n:[]],file_citations:[...null!==(s=e.file_citations)&&void 0!==s?s:[],...null!==(a=r.response.file_citations)&&void 0!==a?a:[]],image_citations:[...null!==(u=e.image_citations)&&void 0!==u?u:[],...null!==(l=r.response.image_citations)&&void 0!==l?l:[]],rca_citations:[...null!==(c=e.rca_citations)&&void 0!==c?c:[],...null!==(d=r.response.rca_citations)&&void 0!==d?d:[]],web_citations:[...null!==(p=e.web_citations)&&void 0!==p?p:[],...null!==(_=r.response.web_citations)&&void 0!==_?_:[]],readfile_citations:[...null!==(m=e.readfile_citations)&&void 0!==m?m:[],...null!==(g=r.response.readfile_citations)&&void 0!==g?g:[]]}})}catch(i){console.error("[liblogs] processCitationsByBlock error — story:%s block:%s",e.storyNumber,e.blockNumber,i)}finally{let i=`<STORY_NUMBER>${e.storyNumber}<BLOCK_NUMBER>${e.blockNumber}`;if(m.current.add(i),m.current.size===_.current.size&&!s.current){const e=l||v.current.gap_items_prompt,i=c||v.current.risk_items_prompt;await r(e,i),_.current.clear(),m.current.clear(),g.current=null,b.current=null,v.current={gap_items_prompt:"",risk_items_prompt:""},f.current.clear()}}}return{processStreamContent:function(e,r,s){try{const p=JSON.stringify(e);if(b.current===p)return;b.current=p;let m=[],v=[];e=e.map(e=>{var t;const o=`${(e={...e,subBlockNumber:null!==(t=e.subBlockNumber)&&void 0!==t?t:"1"}).storyNumber}-${e.blockNumber}-${e.subBlockNumber}`;if(f.current.has(o))return null;f.current.add(o);let{outputText:s,reasonings:a,gpt_citation:u,processedDescription:l}=i(e.value,e.blockNumber,e.storyNumber,e.description);n(e=>{var i;return u.length>0&&((null==e?void 0:e.gpt_citations)||(e.gpt_citations=[]),null===(i=e.gpt_citations)||void 0===i||i.push(...u)),{...e}}),m.push(...a),v.push([...a]);let c=`<STORY_NUMBER>${e.storyNumber}<BLOCK_NUMBER>${e.blockNumber}<SUB_BLOCK>${e.subBlockNumber}`;return _.current.has(c)||(h({...e,value:s,description:l},a,r),_.current.add(c)),{...e,value:s,description:l}}).filter(Boolean),m.forEach(e=>{o(i=>(i.find(i=>i.id===e.id)||i.push(e),[...i]))}),e.length>0&&e.map(({title:e,section:i,value:o,storyNumber:n,description:r,blockNumber:p,big_enough:_,big_enough_decision_factors:m,gapValue:b,confidenceScore:f,metadata:h},N)=>{t(t=>{var y,k,S,B,R,$,w,C;const O=t.findIndex(e=>e.storyNumber===n);if("intro"===i)-1===O?t.push({artifactId:`STORY-${n}-${p}`,title:e,value:o,description:r,storyNumber:n,sub_features:[],section:i,blockNumber:p,aiReasoning:v[N],big_enough:_,big_enough_decision_factors:m,gapValue:b,confidenceScore:f,metadata:h}):(t[O].value+=o,t[O].aiReasoning=t[O].aiReasoning||[],null===(k=null===(y=t[O])||void 0===y?void 0:y.aiReasoning)||void 0===k||k.push(...v[N]),t[O].big_enough=_,t[O].big_enough_decision_factors=m,t[O].gapValue=b,t[O].confidenceScore=f,t[O].metadata=h);else{t[O].sub_features||(t[O].sub_features=[]);const r=(null===(B=null===(S=t[O])||void 0===S?void 0:S.sub_features)||void 0===B?void 0:B.findIndex(e=>e.blockNumber===p))||-1;if(-1===r)null===($=null===(R=t[O])||void 0===R?void 0:R.sub_features)||void 0===$||$.push({artifactId:`STORY-${n}-${p}`,title:e,value:o,storyNumber:n,blockNumber:p,section:i,aiReasoning:v[N],big_enough:_,big_enough_decision_factors:m,gapValue:b,confidenceScore:f,metadata:h});else{let e=null===(C=null===(w=null==t?void 0:t[O])||void 0===w?void 0:w.sub_features)||void 0===C?void 0:C[r];e.value=(e.value||"")+o,e.aiReasoning=e.aiReasoning||[],e.aiReasoning.push(...v[N]),e.big_enough=_,e.big_enough_decision_factors=m,e.gapValue=b,e.confidenceScore=f,e.metadata=h}}const E=JSON.stringify(t);return g.current!==E&&(d({key:`streaming-redis-key-${s}`,value:{mmvf_list:t,knowledgeBase:a,projectAnalyserSummary:u,dataSources_files:l,ai_reasonings:c}}),g.current=E),[...t]})})}catch(e){console.error("Error in processing Stream Content",e)}}}}export{t as useStreamContentHandler};
1
+ import{useState as e,useRef as i,useEffect as t}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}){const[g,b]=e({finalGap:"",finalRisk:"",status:"in-progress"}),f=i(new Set),v=i(new Set),h=i(null),k=i(null),N=i({gap_items_prompt:"",risk_items_prompt:""}),y=i(new Set);return t(()=>{"complete"!==g.status||l||(a(g.finalGap,g.finalRisk),f.current.clear(),v.current.clear(),h.current=null,k.current=null,N.current={gap_items_prompt:"",risk_items_prompt:""},y.current.clear(),b({finalGap:"",finalRisk:"",status:"in-progress"}))},[g,l]),{processStreamContent:function(e,i,t){try{const a=JSON.stringify(e);if(k.current===a)return;k.current=a;let l=[],g=[];e=e.map(e=>{var t;const n=`${(e={...e,subBlockNumber:null!==(t=e.subBlockNumber)&&void 0!==t?t:"1"}).storyNumber}-${e.blockNumber}-${e.subBlockNumber}`;if(y.current.has(n))return null;y.current.add(n);let{outputText:a,reasonings:u,gpt_citation:c,processedDescription:d}=o(e.value,e.blockNumber,e.storyNumber,e.description);s(e=>{var i;return c.length>0&&((null==e?void 0:e.gpt_citations)||(e.gpt_citations=[]),null===(i=e.gpt_citations)||void 0===i||i.push(...c)),{...e}}),l.push(...u),g.push([...u]);let p=`<STORY_NUMBER>${e.storyNumber}<BLOCK_NUMBER>${e.blockNumber}<SUB_BLOCK>${e.subBlockNumber}`;return f.current.has(p)||(!async function(e,i,t){var o,n;let a="",l="";try{const u=await m(e,t,i);r(e=>{var i;const t=[...e];return null===(i=u.response.ai_reasonings)||void 0===i||i.forEach(e=>{const i=t.findIndex(i=>i.id===e.id);-1!==i&&e.gap.length>0&&e.reason.length>0&&(t[i]={...e})}),t}),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 i,t,o,n,r,s,a,l,c,d,p,_,m,g;return{...e,appmod_citations:[...null!==(i=e.appmod_citations)&&void 0!==i?i:[],...null!==(t=u.response.appmod_citations)&&void 0!==t?t:[]],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(i){console.error("[liblogs] processCitationsByBlock error — story:%s block:%s",e.storyNumber,e.blockNumber,i)}finally{let i=`<STORY_NUMBER>${e.storyNumber}<BLOCK_NUMBER>${e.blockNumber}`;if(v.current.add(i),v.current.size===f.current.size){const e=a||N.current.gap_items_prompt,i=l||N.current.risk_items_prompt;b({finalGap:e,finalRisk:i,status:"complete"})}}}({...e,value:a,description:d},u,i),f.current.add(p)),{...e,value:a,description:d}}).filter(Boolean),l.forEach(e=>{r(i=>(i.find(i=>i.id===e.id)||i.push(e),[...i]))}),e.length>0&&e.map(({title:e,section:i,value:o,storyNumber:r,description:s,blockNumber:a,big_enough:l,big_enough_decision_factors:m,gapValue:b,confidenceScore:f,metadata:v},k)=>{n(n=>{var N,y,S,R,B,$,C,w;const O=n.findIndex(e=>e.storyNumber===r);if("intro"===i)-1===O?n.push({artifactId:`STORY-${r}-${a}`,title:e,value:o,description:s,storyNumber:r,sub_features:[],section:i,blockNumber:a,aiReasoning:g[k],big_enough:l,big_enough_decision_factors:m,gapValue:b,confidenceScore:f,metadata:v}):(n[O].value+=o,n[O].aiReasoning=n[O].aiReasoning||[],null===(y=null===(N=n[O])||void 0===N?void 0:N.aiReasoning)||void 0===y||y.push(...g[k]),n[O].big_enough=l,n[O].big_enough_decision_factors=m,n[O].gapValue=b,n[O].confidenceScore=f,n[O].metadata=v);else{n[O].sub_features||(n[O].sub_features=[]);const t=(null===(R=null===(S=n[O])||void 0===S?void 0:S.sub_features)||void 0===R?void 0:R.findIndex(e=>e.blockNumber===a))||-1;if(-1===t)null===($=null===(B=n[O])||void 0===B?void 0:B.sub_features)||void 0===$||$.push({artifactId:`STORY-${r}-${a}`,title:e,value:o,storyNumber:r,blockNumber:a,section:i,aiReasoning:g[k],big_enough:l,big_enough_decision_factors:m,gapValue:b,confidenceScore:f,metadata:v});else{let e=null===(w=null===(C=null==n?void 0:n[O])||void 0===C?void 0:C.sub_features)||void 0===w?void 0:w[t];e.value=(e.value||"")+o,e.aiReasoning=e.aiReasoning||[],e.aiReasoning.push(...g[k]),e.big_enough=l,e.big_enough_decision_factors=m,e.gapValue=b,e.confidenceScore=f,e.metadata=v}}const E=JSON.stringify(n);return h.current!==E&&(_({key:`streaming-redis-key-${t}`,value:{mmvf_list:n,knowledgeBase:u,projectAnalyserSummary:c,dataSources_files:d,ai_reasonings:p}}),h.current=E),[...n]})})}catch(e){console.error("Error in processing Stream Content",e)}}}}export{n as useStreamContentHandler};
2
2
  //# sourceMappingURL=useStreamContentHandler.js.map
@@ -23,7 +23,7 @@ interface IProps {
23
23
  setAiReasoning: React.Dispatch<React.SetStateAction<TAIReasoning[]>>;
24
24
  setUserStoryCitations: React.Dispatch<React.SetStateAction<UserStoryCitations>>;
25
25
  onStreamingCompleted: (gap_items_prompt?: string, risk_items_prompt?: string) => Promise<void>;
26
- isGraphQLCallInProgress: React.MutableRefObject<boolean>;
26
+ isGraphQLCallInProgress: boolean;
27
27
  knowledgeBase: any;
28
28
  projectAnalyserSummary: any;
29
29
  dataSourceFiles: {
@@ -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;AAErF,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,KAAK,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC;IACzD,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;CACjI;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,EAAE,MAAM;sCAuE7O,eAAe,EAAE,kBACZ,GAAG,mBACF,MAAM;EAkL9B"}
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;AAErF,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;CACjI;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,EAAE,MAAM;sCAgF7O,eAAe,EAAE,kBACZ,GAAG,mBACF,MAAM;EAkL9B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@e-llm-studio/requirement-ai",
3
- "version": "0.0.248",
3
+ "version": "0.0.249",
4
4
  "author": "Saptyadeep Bhattacharjee",
5
5
  "description": "",
6
6
  "license": "MIT",