@e-llm-studio/requirement-ai 0.0.303 → 0.0.304

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),l=require("react"),n=require("react-markdown"),a=require("rehype-raw"),s=require("./AppModCitationContent.module.css.js"),d=require("./components/CodeLinkHandler.js"),r=require("./types.js"),i=require("../../../../RequirementAiCitations/AiReasoning/components/AIConfidenceDisplay.js"),t=require("./icons/SparkleIcon.js");function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c=o(n),u=o(a);const h=(l,n,a,i)=>{const t=(null==n?void 0:n.highlight)||r.DEFAULT_HIGHLIGHT_THEME,o=()=>l?{backgroundColor:t.background,color:t.text,padding:"2px 3px",borderRadius:"2px",boxDecorationBreak:"clone",WebkitBoxDecorationBreak:"clone"}:{},c=()=>({...o(),display:"inline"});return{h1:({children:a})=>{var d;return e.jsx("h1",{className:s.default.heading1,style:null===(d=null==n?void 0:n.markdown)||void 0===d?void 0:d.heading1,children:l?e.jsx("span",{style:o(),children:a}):a})},h2:({children:a})=>{var d;return e.jsx("h2",{className:s.default.heading2,style:null===(d=null==n?void 0:n.markdown)||void 0===d?void 0:d.heading2,children:l?e.jsx("span",{style:o(),children:a}):a})},h3:({children:a})=>{var d;return e.jsx("h3",{className:s.default.heading3,style:null===(d=null==n?void 0:n.markdown)||void 0===d?void 0:d.heading3,children:l?e.jsx("span",{style:o(),children:a}):a})},h4:({children:a})=>{var d;return e.jsx("h4",{className:s.default.heading4,style:null===(d=null==n?void 0:n.markdown)||void 0===d?void 0:d.heading4,children:l?e.jsx("span",{style:o(),children:a}):a})},h5:({children:a})=>{var d;return e.jsx("h5",{className:s.default.heading5,style:null===(d=null==n?void 0:n.markdown)||void 0===d?void 0:d.heading5,children:l?e.jsx("span",{style:o(),children:a}):a})},h6:({children:a})=>{var d;return e.jsx("h6",{className:s.default.heading6,style:null===(d=null==n?void 0:n.markdown)||void 0===d?void 0:d.heading6,children:l?e.jsx("span",{style:o(),children:a}):a})},p:({children:a})=>{var d;return e.jsx("p",{className:s.default.paragraph,style:null===(d=null==n?void 0:n.markdown)||void 0===d?void 0:d.paragraph,children:l?e.jsx("span",{style:c(),children:a}):a})},ol:({children:l})=>{var a;return e.jsx("ol",{className:s.default.orderedList,style:null===(a=null==n?void 0:n.markdown)||void 0===a?void 0:a.list,children:l})},ul:({children:l})=>{var a;return e.jsx("ul",{className:s.default.unorderedList,style:null===(a=null==n?void 0:n.markdown)||void 0===a?void 0:a.list,children:l})},li:({children:a})=>{var d;return e.jsx("li",{className:s.default.listItem,style:null===(d=null==n?void 0:n.markdown)||void 0===d?void 0:d.listItem,children:l?e.jsx("span",{style:c(),children:a}):a})},strong:({children:a})=>{var d;return e.jsx("strong",{className:s.default.strong,style:{...null===(d=null==n?void 0:n.markdown)||void 0===d?void 0:d.strong,...l?o():{}},children:a})},em:({children:a})=>{var d;return e.jsx("em",{className:s.default.emphasis,style:{...null===(d=null==n?void 0:n.markdown)||void 0===d?void 0:d.emphasis,...l?o():{}},children:a})},a:({children:s,href:r})=>e.jsx(d.default,{href:r,codeLinkConfig:i,isHighlighted:l,highlightTheme:t,customStyles:null==n?void 0:n.markdown,customIcon:null==a?void 0:a.appModCitationLinkIcon,children:s}),code:({children:a,className:d})=>{var r,i;const o=null==d?void 0:d.includes("language-"),c=l?{backgroundColor:t.codeBackground,color:t.codeText,border:`1px solid ${t.codeBorder}`}:{};return o?e.jsx("div",{children:e.jsx("code",{className:s.default.codeBlock,style:{...null===(i=null==n?void 0:n.markdown)||void 0===i?void 0:i.codeBlock,...c},children:a})}):e.jsx("code",{className:s.default.inlineCode,style:{...null===(r=null==n?void 0:n.markdown)||void 0===r?void 0:r.code,...c},children:a})},pre:({children:l})=>e.jsx("pre",{className:s.default.preBlock,children:l}),blockquote:({children:a})=>{var d;return e.jsx("blockquote",{className:s.default.blockquote,style:{...null===(d=null==n?void 0:n.markdown)||void 0===d?void 0:d.blockquote,...l?{borderColor:t.border}:{}},children:l?e.jsx("span",{style:c(),children:a}):a})},table:({children:a})=>{var d;return e.jsx("div",{className:s.default.tableWrapper,children:e.jsx("table",{className:s.default.table,style:{...null===(d=null==n?void 0:n.markdown)||void 0===d?void 0:d.table,...l?o():{}},children:a})})},thead:({children:l})=>e.jsx("thead",{className:s.default.tableHead,children:l}),tbody:({children:l})=>e.jsx("tbody",{className:s.default.tableBody,children:l}),tr:({children:n})=>e.jsx("tr",{className:s.default.tableRow,style:l?o():{},children:n}),th:({children:a})=>{var d;return e.jsx("th",{className:s.default.tableHeader,style:{...null===(d=null==n?void 0:n.markdown)||void 0===d?void 0:d.tableHeader,...l?o():{}},children:a})},td:({children:a})=>{var d;return e.jsx("td",{className:s.default.tableCell,style:{...null===(d=null==n?void 0:n.markdown)||void 0===d?void 0:d.tableCell,...l?o():{}},children:a})},details:({children:l})=>e.jsx("details",{className:s.default.details,children:l}),summary:({children:n})=>{const a=e=>{var l;return"string"==typeof e?e:Array.isArray(e)?e.map(a).join(""):(null===(l=null==e?void 0:e.props)||void 0===l?void 0:l.children)?a(e.props.children):""},d=a(n).replace(/:$/,"").trim();return e.jsx("summary",{className:s.default.summary,style:l?o():{},children:d})}}};exports.default=({citation:n,customStyles:a,customIcons:d,codeLinkConfig:r,isLoading:o=!1,shouldAutoScroll:m=!1})=>{var v,p;const x=l.useRef(null),f=l.useRef(null),y=n.description||"",j=n.customMetadata.question||"",g=n.customMetadata.highlighted_text,b=n.customMetadata.relevance_score,k=l.useMemo(()=>h(!1,a,d,r),[a,d,r]),N=l.useMemo(()=>h(!0,a,d,r),[a,d,r]);l.useEffect(()=>{if(!m||!(null==g?void 0:g.trim())||!(null==y?void 0:y.trim())||o)return;const e=f.current;if(!e)return;const l=()=>{e.scrollIntoView({behavior:"smooth",block:"center",inline:"nearest"})},n=window.requestAnimationFrame(()=>{l(),window.setTimeout(l,120)});return()=>{window.cancelAnimationFrame(n)}},[y,g,o,m]);const w=(null==d?void 0:d.appModCitationIcon)||e.jsx("div",{children:e.jsx(t.SparkleIcon,{className:s.default.headerIcon})});return e.jsxs("div",{ref:x,className:s.default.container,style:null==a?void 0:a.container,children:[e.jsxs("div",{className:s.default.header,style:null==a?void 0:a.header,children:[e.jsxs("div",{className:s.default.headerLeft,style:null==a?void 0:a.headerLeft,children:[e.jsx("span",{style:null==a?void 0:a.headerIcon,children:w}),e.jsx("span",{className:s.default.headerTitle,style:null==a?void 0:a.headerTitle,children:"AskMod Response"})]}),i.renderAIConfidenceDisplay(b,null==a?void 0:a.confidenceDisplay)]}),e.jsxs("div",{className:s.default.questionContainer,style:null==a?void 0:a.questionContainer,children:[e.jsx("p",{className:s.default.questionLabel,style:null==a?void 0:a.questionLabel,children:"Me"}),e.jsx("div",{className:s.default.questionText,style:null==a?void 0:a.questionText,children:j||"Ask question to get response"})]}),e.jsx("div",{className:s.default.answerIconRow,style:null==a?void 0:a.answerIconRow,children:e.jsxs("p",{className:s.default.assistantName,style:null==a?void 0:a.assistantName,children:["Askmod",e.jsx("span",{className:s.default.assistantNameInner,style:null==a?void 0:a.assistantNameInner,children:".AI"})]})}),e.jsx("div",{className:s.default.answerContainer,style:null==a?void 0:a.answerContainer,children:o?e.jsx("span",{className:s.default.loadingText,style:null===(v=null==a?void 0:a.loading)||void 0===v?void 0:v.text,children:"Generating..."}):y?((l,n)=>{const a=((e="")=>e.replace(/<details\b([^>]*)>/gi,(e,l)=>/\bopen\b/i.test(l)?"<details open>":"<details>").replace(/<summary\b[^>]*>\s*<codebasename>([^<]*)<\/codebasename>\s*<\/summary>/gi,(e,l)=>`<summary class="codebase-summary codebasename">From ${l.trim()} codebase</summary>`).replace(/<\/summary>/g,"</summary>\n").replace(/```codebasename\s*([\s\S]{0,2000}?)```/gi,(e,l)=>`<codebasename>${l.trim()}</codebasename>`).trim())(l.replace(/\\n/g,"\n"));if(n&&a.includes(n)){const l=a.indexOf(n),d=a.substring(0,l),r=a.substring(l,l+n.length),i=a.substring(l+n.length),t=!r.trim();return e.jsxs("div",{className:s.default.markdownContent,children:[d&&e.jsx(c.default,{rehypePlugins:[u.default],components:k,children:d}),r&&!t&&e.jsx("div",{ref:f,"data-appmod-highlight-anchor":"true",children:e.jsx(c.default,{rehypePlugins:[u.default],components:N,children:r})}),r&&t&&r,i&&e.jsx(c.default,{rehypePlugins:[u.default],components:k,children:i})]})}return e.jsx(c.default,{className:s.default.markdownContent,rehypePlugins:[u.default],components:k,children:a})})(y,g):e.jsx("span",{className:s.default.errorText,style:null===(p=null==a?void 0:a.error)||void 0===p?void 0:p.text,children:"Oops! Can't generate your response now."})})]})};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),l=require("react"),n=require("react-markdown"),d=require("rehype-raw"),s=require("./AppModCitationContent.module.css.js"),a=require("./components/CodeLinkHandler.js"),i=require("./types.js"),r=require("../../../../RequirementAiCitations/AiReasoning/components/AIConfidenceDisplay.js"),t=require("./icons/SparkleIcon.js");function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c=o(n),u=o(d);const h=(l,n,d,r)=>{const t=(null==n?void 0:n.highlight)||i.DEFAULT_HIGHLIGHT_THEME,o=()=>l?{backgroundColor:t.background,color:t.text,padding:"2px 3px",borderRadius:"2px",boxDecorationBreak:"clone",WebkitBoxDecorationBreak:"clone"}:{},c=()=>({...o(),display:"inline"});return{h1:({children:d})=>{var a;return e.jsx("h1",{className:s.default.heading1,style:null===(a=null==n?void 0:n.markdown)||void 0===a?void 0:a.heading1,children:l?e.jsx("span",{style:o(),children:d}):d})},h2:({children:d})=>{var a;return e.jsx("h2",{className:s.default.heading2,style:null===(a=null==n?void 0:n.markdown)||void 0===a?void 0:a.heading2,children:l?e.jsx("span",{style:o(),children:d}):d})},h3:({children:d})=>{var a;return e.jsx("h3",{className:s.default.heading3,style:null===(a=null==n?void 0:n.markdown)||void 0===a?void 0:a.heading3,children:l?e.jsx("span",{style:o(),children:d}):d})},h4:({children:d})=>{var a;return e.jsx("h4",{className:s.default.heading4,style:null===(a=null==n?void 0:n.markdown)||void 0===a?void 0:a.heading4,children:l?e.jsx("span",{style:o(),children:d}):d})},h5:({children:d})=>{var a;return e.jsx("h5",{className:s.default.heading5,style:null===(a=null==n?void 0:n.markdown)||void 0===a?void 0:a.heading5,children:l?e.jsx("span",{style:o(),children:d}):d})},h6:({children:d})=>{var a;return e.jsx("h6",{className:s.default.heading6,style:null===(a=null==n?void 0:n.markdown)||void 0===a?void 0:a.heading6,children:l?e.jsx("span",{style:o(),children:d}):d})},p:({children:d})=>{var a;return e.jsx("p",{className:s.default.paragraph,style:null===(a=null==n?void 0:n.markdown)||void 0===a?void 0:a.paragraph,children:l?e.jsx("span",{style:c(),children:d}):d})},ol:({children:l})=>{var d;return e.jsx("ol",{className:s.default.orderedList,style:null===(d=null==n?void 0:n.markdown)||void 0===d?void 0:d.list,children:l})},ul:({children:l})=>{var d;return e.jsx("ul",{className:s.default.unorderedList,style:null===(d=null==n?void 0:n.markdown)||void 0===d?void 0:d.list,children:l})},li:({children:d})=>{var a;return e.jsx("li",{className:s.default.listItem,style:null===(a=null==n?void 0:n.markdown)||void 0===a?void 0:a.listItem,children:l?e.jsx("span",{style:c(),children:d}):d})},strong:({children:d})=>{var a;return e.jsx("strong",{className:s.default.strong,style:{...null===(a=null==n?void 0:n.markdown)||void 0===a?void 0:a.strong,...l?o():{}},children:d})},em:({children:d})=>{var a;return e.jsx("em",{className:s.default.emphasis,style:{...null===(a=null==n?void 0:n.markdown)||void 0===a?void 0:a.emphasis,...l?o():{}},children:d})},a:({children:s,href:i})=>e.jsx(a.default,{href:i,codeLinkConfig:r,isHighlighted:l,highlightTheme:t,customStyles:null==n?void 0:n.markdown,customIcon:null==d?void 0:d.appModCitationLinkIcon,children:s}),code:({children:d,className:a})=>{var i,r;const o=null==a?void 0:a.includes("language-"),c=l?{backgroundColor:t.codeBackground,color:t.codeText,border:`1px solid ${t.codeBorder}`}:{};return o?e.jsx("div",{children:e.jsx("code",{className:s.default.codeBlock,style:{...null===(r=null==n?void 0:n.markdown)||void 0===r?void 0:r.codeBlock,...c},children:d})}):e.jsx("code",{className:s.default.inlineCode,style:{...null===(i=null==n?void 0:n.markdown)||void 0===i?void 0:i.code,...c},children:d})},pre:({children:l})=>e.jsx("pre",{className:s.default.preBlock,children:l}),blockquote:({children:d})=>{var a;return e.jsx("blockquote",{className:s.default.blockquote,style:{...null===(a=null==n?void 0:n.markdown)||void 0===a?void 0:a.blockquote,...l?{borderColor:t.border}:{}},children:l?e.jsx("span",{style:c(),children:d}):d})},table:({children:d})=>{var a;return e.jsx("div",{className:s.default.tableWrapper,children:e.jsx("table",{className:s.default.table,style:{...null===(a=null==n?void 0:n.markdown)||void 0===a?void 0:a.table,...l?o():{}},children:d})})},thead:({children:l})=>e.jsx("thead",{className:s.default.tableHead,children:l}),tbody:({children:l})=>e.jsx("tbody",{className:s.default.tableBody,children:l}),tr:({children:n})=>e.jsx("tr",{className:s.default.tableRow,style:l?o():{},children:n}),th:({children:d})=>{var a;return e.jsx("th",{className:s.default.tableHeader,style:{...null===(a=null==n?void 0:n.markdown)||void 0===a?void 0:a.tableHeader,...l?o():{}},children:d})},td:({children:d})=>{var a;return e.jsx("td",{className:s.default.tableCell,style:{...null===(a=null==n?void 0:n.markdown)||void 0===a?void 0:a.tableCell,...l?o():{}},children:d})},details:({children:l})=>e.jsx("details",{className:s.default.details,children:l}),summary:({children:n})=>{const d=e=>{var l;return"string"==typeof e?e:Array.isArray(e)?e.map(d).join(""):(null===(l=null==e?void 0:e.props)||void 0===l?void 0:l.children)?d(e.props.children):""},a=d(n).replace(/:$/,"").trim();return e.jsx("summary",{className:s.default.summary,style:l?o():{},children:a})}}};exports.default=({citation:n,customStyles:d,customIcons:a,codeLinkConfig:i,isLoading:o=!1,shouldAutoScroll:m=!1})=>{var v,p,f,x,y;const j=l.useRef(null),g=l.useRef(null),b="string"==typeof(null==n?void 0:n.description)?n.description.trim():"",k="string"==typeof(null===(v=null==n?void 0:n.customMetadata)||void 0===v?void 0:v.question)?n.customMetadata.question.trim():"",N="string"==typeof(null===(p=null==n?void 0:n.customMetadata)||void 0===p?void 0:p.highlighted_text)?n.customMetadata.highlighted_text.trim():"",w=null===(f=null==n?void 0:n.customMetadata)||void 0===f?void 0:f.relevance_score,q=l.useMemo(()=>h(!1,d,a,i),[d,a,i]),C=l.useMemo(()=>h(!0,d,a,i),[d,a,i]);l.useEffect(()=>{if(!m||!(null==N?void 0:N.trim())||!(null==b?void 0:b.trim())||o)return;const e=g.current;if(!e)return;const l=()=>{e.scrollIntoView({behavior:"smooth",block:"center",inline:"nearest"})},n=window.requestAnimationFrame(()=>{l(),window.setTimeout(l,120)});return()=>{window.cancelAnimationFrame(n)}},[b,N,o,m]);const I=(null==a?void 0:a.appModCitationIcon)||e.jsx("div",{children:e.jsx(t.SparkleIcon,{className:s.default.headerIcon})});return e.jsxs("div",{ref:j,className:s.default.container,style:null==d?void 0:d.container,children:[e.jsxs("div",{className:s.default.header,style:null==d?void 0:d.header,children:[e.jsxs("div",{className:s.default.headerLeft,style:null==d?void 0:d.headerLeft,children:[e.jsx("span",{style:null==d?void 0:d.headerIcon,children:I}),e.jsx("span",{className:s.default.headerTitle,style:null==d?void 0:d.headerTitle,children:"AskMod Response"})]}),r.renderAIConfidenceDisplay(w,null==d?void 0:d.confidenceDisplay)]}),e.jsxs("div",{className:s.default.questionContainer,style:null==d?void 0:d.questionContainer,children:[e.jsx("p",{className:s.default.questionLabel,style:null==d?void 0:d.questionLabel,children:"Me"}),e.jsx("div",{className:s.default.questionText,style:null==d?void 0:d.questionText,children:k||"Ask question to get response"})]}),e.jsx("div",{className:s.default.answerIconRow,style:null==d?void 0:d.answerIconRow,children:e.jsxs("p",{className:s.default.assistantName,style:null==d?void 0:d.assistantName,children:["Askmod",e.jsx("span",{className:s.default.assistantNameInner,style:null==d?void 0:d.assistantNameInner,children:".AI"})]})}),e.jsx("div",{className:s.default.answerContainer,style:null==d?void 0:d.answerContainer,children:o?e.jsx("span",{className:s.default.loadingText,style:null===(x=null==d?void 0:d.loading)||void 0===x?void 0:x.text,children:"Generating..."}):b?((l,n)=>{const d=((e="")=>e.replace(/<details\b([^>]*)>/gi,(e,l)=>/\bopen\b/i.test(l)?"<details open>":"<details>").replace(/<summary\b[^>]*>\s*<codebasename>([^<]*)<\/codebasename>\s*<\/summary>/gi,(e,l)=>`<summary class="codebase-summary codebasename">From ${l.trim()} codebase</summary>`).replace(/<\/summary>/g,"</summary>\n").replace(/```codebasename\s*([\s\S]{0,2000}?)```/gi,(e,l)=>`<codebasename>${l.trim()}</codebasename>`).trim())(null==l?void 0:l.replace(/\\n/g,"\n"));if(n&&d.includes(n)){const l=d.indexOf(n),a=d.substring(0,l),i=d.substring(l,l+n.length),r=d.substring(l+n.length),t=!i.trim();return e.jsxs("div",{className:s.default.markdownContent,children:[a&&e.jsx(c.default,{rehypePlugins:[u.default],components:q,children:a}),i&&!t&&e.jsx("div",{ref:g,"data-appmod-highlight-anchor":"true",children:e.jsx(c.default,{rehypePlugins:[u.default],components:C,children:i})}),i&&t&&i,r&&e.jsx(c.default,{rehypePlugins:[u.default],components:q,children:r})]})}return e.jsx(c.default,{className:s.default.markdownContent,rehypePlugins:[u.default],components:q,children:d})})(b,N):e.jsx("span",{className:s.default.errorText,style:null===(y=null==d?void 0:d.error)||void 0===y?void 0:y.text,children:"Oops! Can't generate your response now."})})]})};
2
2
  //# sourceMappingURL=AppmodCitationContent.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]),{processStreamContent:function(e,s,r,m){try{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(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,_)}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{console.log("processStreamContent::started",m);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]})}),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
- import{jsx as e,jsxs as l}from"react/jsx-runtime";import{useRef as n,useMemo as r,useEffect as i}from"react";import a from"react-markdown";import o from"rehype-raw";import d from"./AppModCitationContent.module.css.js";import s from"./components/CodeLinkHandler.js";import{DEFAULT_HIGHLIGHT_THEME as t}from"./types.js";import{renderAIConfidenceDisplay as c}from"../../../../RequirementAiCitations/AiReasoning/components/AIConfidenceDisplay.js";import{SparkleIcon as m}from"./icons/SparkleIcon.js";const h=(l,n,r,i)=>{const a=(null==n?void 0:n.highlight)||t,o=()=>l?{backgroundColor:a.background,color:a.text,padding:"2px 3px",borderRadius:"2px",boxDecorationBreak:"clone",WebkitBoxDecorationBreak:"clone"}:{},c=()=>({...o(),display:"inline"});return{h1:({children:r})=>{var i;return e("h1",{className:d.heading1,style:null===(i=null==n?void 0:n.markdown)||void 0===i?void 0:i.heading1,children:l?e("span",{style:o(),children:r}):r})},h2:({children:r})=>{var i;return e("h2",{className:d.heading2,style:null===(i=null==n?void 0:n.markdown)||void 0===i?void 0:i.heading2,children:l?e("span",{style:o(),children:r}):r})},h3:({children:r})=>{var i;return e("h3",{className:d.heading3,style:null===(i=null==n?void 0:n.markdown)||void 0===i?void 0:i.heading3,children:l?e("span",{style:o(),children:r}):r})},h4:({children:r})=>{var i;return e("h4",{className:d.heading4,style:null===(i=null==n?void 0:n.markdown)||void 0===i?void 0:i.heading4,children:l?e("span",{style:o(),children:r}):r})},h5:({children:r})=>{var i;return e("h5",{className:d.heading5,style:null===(i=null==n?void 0:n.markdown)||void 0===i?void 0:i.heading5,children:l?e("span",{style:o(),children:r}):r})},h6:({children:r})=>{var i;return e("h6",{className:d.heading6,style:null===(i=null==n?void 0:n.markdown)||void 0===i?void 0:i.heading6,children:l?e("span",{style:o(),children:r}):r})},p:({children:r})=>{var i;return e("p",{className:d.paragraph,style:null===(i=null==n?void 0:n.markdown)||void 0===i?void 0:i.paragraph,children:l?e("span",{style:c(),children:r}):r})},ol:({children:l})=>{var r;return e("ol",{className:d.orderedList,style:null===(r=null==n?void 0:n.markdown)||void 0===r?void 0:r.list,children:l})},ul:({children:l})=>{var r;return e("ul",{className:d.unorderedList,style:null===(r=null==n?void 0:n.markdown)||void 0===r?void 0:r.list,children:l})},li:({children:r})=>{var i;return e("li",{className:d.listItem,style:null===(i=null==n?void 0:n.markdown)||void 0===i?void 0:i.listItem,children:l?e("span",{style:c(),children:r}):r})},strong:({children:r})=>{var i;return e("strong",{className:d.strong,style:{...null===(i=null==n?void 0:n.markdown)||void 0===i?void 0:i.strong,...l?o():{}},children:r})},em:({children:r})=>{var i;return e("em",{className:d.emphasis,style:{...null===(i=null==n?void 0:n.markdown)||void 0===i?void 0:i.emphasis,...l?o():{}},children:r})},a:({children:o,href:d})=>e(s,{href:d,codeLinkConfig:i,isHighlighted:l,highlightTheme:a,customStyles:null==n?void 0:n.markdown,customIcon:null==r?void 0:r.appModCitationLinkIcon,children:o}),code:({children:r,className:i})=>{var o,s;const t=null==i?void 0:i.includes("language-"),c=l?{backgroundColor:a.codeBackground,color:a.codeText,border:`1px solid ${a.codeBorder}`}:{};return t?e("div",{children:e("code",{className:d.codeBlock,style:{...null===(s=null==n?void 0:n.markdown)||void 0===s?void 0:s.codeBlock,...c},children:r})}):e("code",{className:d.inlineCode,style:{...null===(o=null==n?void 0:n.markdown)||void 0===o?void 0:o.code,...c},children:r})},pre:({children:l})=>e("pre",{className:d.preBlock,children:l}),blockquote:({children:r})=>{var i;return e("blockquote",{className:d.blockquote,style:{...null===(i=null==n?void 0:n.markdown)||void 0===i?void 0:i.blockquote,...l?{borderColor:a.border}:{}},children:l?e("span",{style:c(),children:r}):r})},table:({children:r})=>{var i;return e("div",{className:d.tableWrapper,children:e("table",{className:d.table,style:{...null===(i=null==n?void 0:n.markdown)||void 0===i?void 0:i.table,...l?o():{}},children:r})})},thead:({children:l})=>e("thead",{className:d.tableHead,children:l}),tbody:({children:l})=>e("tbody",{className:d.tableBody,children:l}),tr:({children:n})=>e("tr",{className:d.tableRow,style:l?o():{},children:n}),th:({children:r})=>{var i;return e("th",{className:d.tableHeader,style:{...null===(i=null==n?void 0:n.markdown)||void 0===i?void 0:i.tableHeader,...l?o():{}},children:r})},td:({children:r})=>{var i;return e("td",{className:d.tableCell,style:{...null===(i=null==n?void 0:n.markdown)||void 0===i?void 0:i.tableCell,...l?o():{}},children:r})},details:({children:l})=>e("details",{className:d.details,children:l}),summary:({children:n})=>{const r=e=>{var l;return"string"==typeof e?e:Array.isArray(e)?e.map(r).join(""):(null===(l=null==e?void 0:e.props)||void 0===l?void 0:l.children)?r(e.props.children):""},i=r(n).replace(/:$/,"").trim();return e("summary",{className:d.summary,style:l?o():{},children:i})}}},u=({citation:s,customStyles:t,customIcons:u,codeLinkConfig:v,isLoading:p=!1,shouldAutoScroll:y=!1})=>{var g,b;const N=n(null),k=n(null),w=s.description||"",f=s.customMetadata.question||"",C=s.customMetadata.highlighted_text,x=s.customMetadata.relevance_score,I=r(()=>h(!1,t,u,v),[t,u,v]),q=r(()=>h(!0,t,u,v),[t,u,v]);i(()=>{if(!y||!(null==C?void 0:C.trim())||!(null==w?void 0:w.trim())||p)return;const e=k.current;if(!e)return;const l=()=>{e.scrollIntoView({behavior:"smooth",block:"center",inline:"nearest"})},n=window.requestAnimationFrame(()=>{l(),window.setTimeout(l,120)});return()=>{window.cancelAnimationFrame(n)}},[w,C,p,y]);const A=(null==u?void 0:u.appModCitationIcon)||e("div",{children:e(m,{className:d.headerIcon})});return l("div",{ref:N,className:d.container,style:null==t?void 0:t.container,children:[l("div",{className:d.header,style:null==t?void 0:t.header,children:[l("div",{className:d.headerLeft,style:null==t?void 0:t.headerLeft,children:[e("span",{style:null==t?void 0:t.headerIcon,children:A}),e("span",{className:d.headerTitle,style:null==t?void 0:t.headerTitle,children:"AskMod Response"})]}),c(x,null==t?void 0:t.confidenceDisplay)]}),l("div",{className:d.questionContainer,style:null==t?void 0:t.questionContainer,children:[e("p",{className:d.questionLabel,style:null==t?void 0:t.questionLabel,children:"Me"}),e("div",{className:d.questionText,style:null==t?void 0:t.questionText,children:f||"Ask question to get response"})]}),e("div",{className:d.answerIconRow,style:null==t?void 0:t.answerIconRow,children:l("p",{className:d.assistantName,style:null==t?void 0:t.assistantName,children:["Askmod",e("span",{className:d.assistantNameInner,style:null==t?void 0:t.assistantNameInner,children:".AI"})]})}),e("div",{className:d.answerContainer,style:null==t?void 0:t.answerContainer,children:p?e("span",{className:d.loadingText,style:null===(g=null==t?void 0:t.loading)||void 0===g?void 0:g.text,children:"Generating..."}):w?((n,r)=>{const i=((e="")=>e.replace(/<details\b([^>]*)>/gi,(e,l)=>/\bopen\b/i.test(l)?"<details open>":"<details>").replace(/<summary\b[^>]*>\s*<codebasename>([^<]*)<\/codebasename>\s*<\/summary>/gi,(e,l)=>`<summary class="codebase-summary codebasename">From ${l.trim()} codebase</summary>`).replace(/<\/summary>/g,"</summary>\n").replace(/```codebasename\s*([\s\S]{0,2000}?)```/gi,(e,l)=>`<codebasename>${l.trim()}</codebasename>`).trim())(n.replace(/\\n/g,"\n"));if(r&&i.includes(r)){const n=i.indexOf(r),s=i.substring(0,n),t=i.substring(n,n+r.length),c=i.substring(n+r.length),m=!t.trim();return l("div",{className:d.markdownContent,children:[s&&e(a,{rehypePlugins:[o],components:I,children:s}),t&&!m&&e("div",{ref:k,"data-appmod-highlight-anchor":"true",children:e(a,{rehypePlugins:[o],components:q,children:t})}),t&&m&&t,c&&e(a,{rehypePlugins:[o],components:I,children:c})]})}return e(a,{className:d.markdownContent,rehypePlugins:[o],components:I,children:i})})(w,C):e("span",{className:d.errorText,style:null===(b=null==t?void 0:t.error)||void 0===b?void 0:b.text,children:"Oops! Can't generate your response now."})})]})};export{u as default};
1
+ import{jsx as e,jsxs as l}from"react/jsx-runtime";import{useRef as n,useMemo as i,useEffect as r}from"react";import o from"react-markdown";import d from"rehype-raw";import a from"./AppModCitationContent.module.css.js";import s from"./components/CodeLinkHandler.js";import{DEFAULT_HIGHLIGHT_THEME as t}from"./types.js";import{renderAIConfidenceDisplay as c}from"../../../../RequirementAiCitations/AiReasoning/components/AIConfidenceDisplay.js";import{SparkleIcon as u}from"./icons/SparkleIcon.js";const m=(l,n,i,r)=>{const o=(null==n?void 0:n.highlight)||t,d=()=>l?{backgroundColor:o.background,color:o.text,padding:"2px 3px",borderRadius:"2px",boxDecorationBreak:"clone",WebkitBoxDecorationBreak:"clone"}:{},c=()=>({...d(),display:"inline"});return{h1:({children:i})=>{var r;return e("h1",{className:a.heading1,style:null===(r=null==n?void 0:n.markdown)||void 0===r?void 0:r.heading1,children:l?e("span",{style:d(),children:i}):i})},h2:({children:i})=>{var r;return e("h2",{className:a.heading2,style:null===(r=null==n?void 0:n.markdown)||void 0===r?void 0:r.heading2,children:l?e("span",{style:d(),children:i}):i})},h3:({children:i})=>{var r;return e("h3",{className:a.heading3,style:null===(r=null==n?void 0:n.markdown)||void 0===r?void 0:r.heading3,children:l?e("span",{style:d(),children:i}):i})},h4:({children:i})=>{var r;return e("h4",{className:a.heading4,style:null===(r=null==n?void 0:n.markdown)||void 0===r?void 0:r.heading4,children:l?e("span",{style:d(),children:i}):i})},h5:({children:i})=>{var r;return e("h5",{className:a.heading5,style:null===(r=null==n?void 0:n.markdown)||void 0===r?void 0:r.heading5,children:l?e("span",{style:d(),children:i}):i})},h6:({children:i})=>{var r;return e("h6",{className:a.heading6,style:null===(r=null==n?void 0:n.markdown)||void 0===r?void 0:r.heading6,children:l?e("span",{style:d(),children:i}):i})},p:({children:i})=>{var r;return e("p",{className:a.paragraph,style:null===(r=null==n?void 0:n.markdown)||void 0===r?void 0:r.paragraph,children:l?e("span",{style:c(),children:i}):i})},ol:({children:l})=>{var i;return e("ol",{className:a.orderedList,style:null===(i=null==n?void 0:n.markdown)||void 0===i?void 0:i.list,children:l})},ul:({children:l})=>{var i;return e("ul",{className:a.unorderedList,style:null===(i=null==n?void 0:n.markdown)||void 0===i?void 0:i.list,children:l})},li:({children:i})=>{var r;return e("li",{className:a.listItem,style:null===(r=null==n?void 0:n.markdown)||void 0===r?void 0:r.listItem,children:l?e("span",{style:c(),children:i}):i})},strong:({children:i})=>{var r;return e("strong",{className:a.strong,style:{...null===(r=null==n?void 0:n.markdown)||void 0===r?void 0:r.strong,...l?d():{}},children:i})},em:({children:i})=>{var r;return e("em",{className:a.emphasis,style:{...null===(r=null==n?void 0:n.markdown)||void 0===r?void 0:r.emphasis,...l?d():{}},children:i})},a:({children:d,href:a})=>e(s,{href:a,codeLinkConfig:r,isHighlighted:l,highlightTheme:o,customStyles:null==n?void 0:n.markdown,customIcon:null==i?void 0:i.appModCitationLinkIcon,children:d}),code:({children:i,className:r})=>{var d,s;const t=null==r?void 0:r.includes("language-"),c=l?{backgroundColor:o.codeBackground,color:o.codeText,border:`1px solid ${o.codeBorder}`}:{};return t?e("div",{children:e("code",{className:a.codeBlock,style:{...null===(s=null==n?void 0:n.markdown)||void 0===s?void 0:s.codeBlock,...c},children:i})}):e("code",{className:a.inlineCode,style:{...null===(d=null==n?void 0:n.markdown)||void 0===d?void 0:d.code,...c},children:i})},pre:({children:l})=>e("pre",{className:a.preBlock,children:l}),blockquote:({children:i})=>{var r;return e("blockquote",{className:a.blockquote,style:{...null===(r=null==n?void 0:n.markdown)||void 0===r?void 0:r.blockquote,...l?{borderColor:o.border}:{}},children:l?e("span",{style:c(),children:i}):i})},table:({children:i})=>{var r;return e("div",{className:a.tableWrapper,children:e("table",{className:a.table,style:{...null===(r=null==n?void 0:n.markdown)||void 0===r?void 0:r.table,...l?d():{}},children:i})})},thead:({children:l})=>e("thead",{className:a.tableHead,children:l}),tbody:({children:l})=>e("tbody",{className:a.tableBody,children:l}),tr:({children:n})=>e("tr",{className:a.tableRow,style:l?d():{},children:n}),th:({children:i})=>{var r;return e("th",{className:a.tableHeader,style:{...null===(r=null==n?void 0:n.markdown)||void 0===r?void 0:r.tableHeader,...l?d():{}},children:i})},td:({children:i})=>{var r;return e("td",{className:a.tableCell,style:{...null===(r=null==n?void 0:n.markdown)||void 0===r?void 0:r.tableCell,...l?d():{}},children:i})},details:({children:l})=>e("details",{className:a.details,children:l}),summary:({children:n})=>{const i=e=>{var l;return"string"==typeof e?e:Array.isArray(e)?e.map(i).join(""):(null===(l=null==e?void 0:e.props)||void 0===l?void 0:l.children)?i(e.props.children):""},r=i(n).replace(/:$/,"").trim();return e("summary",{className:a.summary,style:l?d():{},children:r})}}},h=({citation:s,customStyles:t,customIcons:h,codeLinkConfig:v,isLoading:p=!1,shouldAutoScroll:y=!1})=>{var g,b,N,k,w;const f=n(null),C=n(null),x="string"==typeof(null==s?void 0:s.description)?s.description.trim():"",I="string"==typeof(null===(g=null==s?void 0:s.customMetadata)||void 0===g?void 0:g.question)?s.customMetadata.question.trim():"",q="string"==typeof(null===(b=null==s?void 0:s.customMetadata)||void 0===b?void 0:b.highlighted_text)?s.customMetadata.highlighted_text.trim():"",A=null===(N=null==s?void 0:s.customMetadata)||void 0===N?void 0:N.relevance_score,L=i(()=>m(!1,t,h,v),[t,h,v]),M=i(()=>m(!0,t,h,v),[t,h,v]);r(()=>{if(!y||!(null==q?void 0:q.trim())||!(null==x?void 0:x.trim())||p)return;const e=C.current;if(!e)return;const l=()=>{e.scrollIntoView({behavior:"smooth",block:"center",inline:"nearest"})},n=window.requestAnimationFrame(()=>{l(),window.setTimeout(l,120)});return()=>{window.cancelAnimationFrame(n)}},[x,q,p,y]);const B=(null==h?void 0:h.appModCitationIcon)||e("div",{children:e(u,{className:a.headerIcon})});return l("div",{ref:f,className:a.container,style:null==t?void 0:t.container,children:[l("div",{className:a.header,style:null==t?void 0:t.header,children:[l("div",{className:a.headerLeft,style:null==t?void 0:t.headerLeft,children:[e("span",{style:null==t?void 0:t.headerIcon,children:B}),e("span",{className:a.headerTitle,style:null==t?void 0:t.headerTitle,children:"AskMod Response"})]}),c(A,null==t?void 0:t.confidenceDisplay)]}),l("div",{className:a.questionContainer,style:null==t?void 0:t.questionContainer,children:[e("p",{className:a.questionLabel,style:null==t?void 0:t.questionLabel,children:"Me"}),e("div",{className:a.questionText,style:null==t?void 0:t.questionText,children:I||"Ask question to get response"})]}),e("div",{className:a.answerIconRow,style:null==t?void 0:t.answerIconRow,children:l("p",{className:a.assistantName,style:null==t?void 0:t.assistantName,children:["Askmod",e("span",{className:a.assistantNameInner,style:null==t?void 0:t.assistantNameInner,children:".AI"})]})}),e("div",{className:a.answerContainer,style:null==t?void 0:t.answerContainer,children:p?e("span",{className:a.loadingText,style:null===(k=null==t?void 0:t.loading)||void 0===k?void 0:k.text,children:"Generating..."}):x?((n,i)=>{const r=((e="")=>e.replace(/<details\b([^>]*)>/gi,(e,l)=>/\bopen\b/i.test(l)?"<details open>":"<details>").replace(/<summary\b[^>]*>\s*<codebasename>([^<]*)<\/codebasename>\s*<\/summary>/gi,(e,l)=>`<summary class="codebase-summary codebasename">From ${l.trim()} codebase</summary>`).replace(/<\/summary>/g,"</summary>\n").replace(/```codebasename\s*([\s\S]{0,2000}?)```/gi,(e,l)=>`<codebasename>${l.trim()}</codebasename>`).trim())(null==n?void 0:n.replace(/\\n/g,"\n"));if(i&&r.includes(i)){const n=r.indexOf(i),s=r.substring(0,n),t=r.substring(n,n+i.length),c=r.substring(n+i.length),u=!t.trim();return l("div",{className:a.markdownContent,children:[s&&e(o,{rehypePlugins:[d],components:L,children:s}),t&&!u&&e("div",{ref:C,"data-appmod-highlight-anchor":"true",children:e(o,{rehypePlugins:[d],components:M,children:t})}),t&&u&&t,c&&e(o,{rehypePlugins:[d],components:L,children:c})]})}return e(o,{className:a.markdownContent,rehypePlugins:[d],components:L,children:r})})(x,q):e("span",{className:a.errorText,style:null===(w=null==t?void 0:t.error)||void 0===w?void 0:w.text,children:"Oops! Can't generate your response now."})})]})};export{h as default};
2
2
  //# sourceMappingURL=AppmodCitationContent.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]),{processStreamContent:function(e,t,i,a){try{a&&g&&(console.log("streaming::userstory::completed::lib"),b({finalGap:"",finalRisk:"",status:"complete"}));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)}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{console.log("processStreamContent::started",a);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 +1 @@
1
- {"version":3,"file":"AppmodCitationContent.d.ts","sourceRoot":"","sources":["../../../../../../../../src/features/RequirementAI/components/citations/appmod-citation/AppmodCitationContent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqC,MAAM,OAAO,CAAC;AAK1D,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EACL,wBAAwB,EACxB,cAAc,EACf,MAAM,iCAAiC,CAAC;AAEzC,OAAO,EACL,cAAc,EAEf,MAAM,SAAS,CAAC;AAIjB,UAAU,0BAA0B;IAClC,QAAQ,EAAE,YAAY,CAAC;IACvB,YAAY,CAAC,EAAE,wBAAwB,CAAC;IACxC,WAAW,CAAC,EAAE,cAAc,CAAC;IAC7B,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;AA8SD,QAAA,MAAM,qBAAqB,EAAE,KAAK,CAAC,EAAE,CAAC,0BAA0B,CAuM/D,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
1
+ {"version":3,"file":"AppmodCitationContent.d.ts","sourceRoot":"","sources":["../../../../../../../../src/features/RequirementAI/components/citations/appmod-citation/AppmodCitationContent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqC,MAAM,OAAO,CAAC;AAK1D,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EACL,wBAAwB,EACxB,cAAc,EACf,MAAM,iCAAiC,CAAC;AAEzC,OAAO,EACL,cAAc,EAEf,MAAM,SAAS,CAAC;AAIjB,UAAU,0BAA0B;IAClC,QAAQ,EAAE,YAAY,CAAC;IACvB,YAAY,CAAC,EAAE,wBAAwB,CAAC;IACxC,WAAW,CAAC,EAAE,cAAc,CAAC;IAC7B,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;AA8SD,QAAA,MAAM,qBAAqB,EAAE,KAAK,CAAC,EAAE,CAAC,0BAA0B,CAmN/D,CAAC;AAEF,eAAe,qBAAqB,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,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;EAsO1C"}
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;EAyO1C"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@e-llm-studio/requirement-ai",
3
- "version": "0.0.303",
3
+ "version": "0.0.304",
4
4
  "author": "Saptyadeep Bhattacharjee",
5
5
  "description": "",
6
6
  "license": "MIT",