1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4286],{4286:(e,t,s)=>{s.r(t),s.d(t,{default:()=>v});var n=s(7876),r=s(4232),i=s(7328),a=s.n(i),l=s(8230),o=s.n(l),c=s(383),d=s(9926),m=s(8628),x=s(3884),h=s(1187),p=s(2572),g=s(3291),f=s(1174),u=s(9917),b=s(4463),w=s(8113);let j="GPT-OSS 120B \xb7 HELIX v1.8 live demo";function v(){let[e,t]=(0,r.useState)([]),[s,i]=(0,r.useState)(null),[l,v]=(0,r.useState)([]),[N,y]=(0,r.useState)(""),[_,k]=(0,r.useState)(!1),[S,E]=(0,r.useState)(!1),[A,D]=(0,r.useState)(.1),C=(0,r.useRef)(null),L=(0,r.useRef)(null),H=(0,r.useRef)(null),[T,I]=(0,r.useState)([]),[$,F]=(0,r.useState)(!1);(0,r.useEffect)(()=>{F(window.innerWidth<768);let e=()=>F(window.innerWidth<768);return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]),(0,r.useEffect)(()=>{let e=L.current;e&&e.scrollTo({top:e.scrollHeight,behavior:"smooth"})},[l,_]),(0,r.useEffect)(()=>{H.current&&(H.current.style.height="auto",H.current.style.height=Math.min(H.current.scrollHeight,200)+"px")},[N]);let X=async(e,n)=>{e&&"preventDefault"in e&&e.preventDefault();let r=("string"==typeof n?n:N).trim();if(!r||_)return;if(!s){let e={id:Date.now().toString(),title:r.slice(0,30)+(r.length>30?"...":""),messages:[],createdAt:new Date};t(t=>[e,...t]),i(e.id)}let a={id:Date.now().toString(),role:"user",content:r,timestamp:new Date};v(e=>[...e,a]),y(""),k(!0);try{let e="",n=0,i={},a=Date.now(),c=await fetch("/api/verificate/chat",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({message:r,history:l.slice(-10).map(e=>({role:e.role,content:e.content})),temperature:A,max_tokens:1024})});if(!(c.headers.get("content-type")||"").includes("application/json")){let e=await c.text();throw Error("Unexpected response (".concat(c.status,"): ").concat(e.slice(0,120)).concat(e.length>120?"â¦":""))}let d=await c.json();if(!c.ok){var o;throw Error((null==(o=d.error)?void 0:o.message)||d.error||"Failed to get response")}n=Date.now()-a,e=d.response||"",i={latency_ms:n,confidence:"number"==typeof d.confidence?d.confidence:void 0,confidence_band:d.confidence_band,uts_score:d.cortex_uts,entropy:d.cortex_entropy,steer_tokens:d.cortex_steer_tokens,steering_rate:d.steering_rate,tokens_per_second:d.tokens_per_second},d.model_used&&(i.model_used=d.model_used);let m={id:(Date.now()+1).toString(),role:"assistant",content:e,timestamp:new Date,telemetry:i};v(e=>[...e,m]),0===l.length&&t(e=>e.map(e=>e.id===s?{...e,title:r.slice(0,30)+(r.length>30?"...":"")}:e))}catch(t){let e={id:(Date.now()+1).toString(),role:"assistant",content:"I encountered an error: ".concat(t instanceof Error?t.message:"Unknown error",". Please try again."),timestamp:new Date};v(t=>[...t,e])}finally{k(!1)}};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(a(),{children:[(0,n.jsx)("title",{children:"Ask Verificate â live product assistant on HELIX"}),(0,n.jsx)("meta",{name:"description",content:"Ask Verificate's live assistant about HELIX model-calibrated inference, the Decision Transformer, and MCP ship-check. Running on GPT-OSS 120B via HELIX v1.8."})]}),S&&(0,n.jsx)("div",{className:"fixed inset-0 bg-black/50 z-10 md:hidden",onClick:()=>E(!1)}),(0,n.jsxs)("div",{className:"h-[100dvh] flex overflow-hidden bg-[#0a0a0f] text-white font-sans",children:[(0,n.jsxs)("div",{className:"".concat(S?"w-72":"w-0"," md:w-72 transition-all duration-300 bg-[#12121a] flex flex-col overflow-hidden absolute md:relative z-20 h-full md:h-auto border-r border-indigo-500/10"),children:[(0,n.jsx)("div",{className:"p-4",children:(0,n.jsxs)("button",{onClick:()=>{let e={id:Date.now().toString(),title:"New conversation",messages:[],createdAt:new Date};t(t=>[e,...t]),i(e.id),v([])},className:"w-full flex items-center gap-3 px-4 py-3 rounded-xl border border-indigo-500/20 hover:bg-indigo-500/10 hover:border-indigo-500/40 transition-all group",children:[(0,n.jsx)(c.A,{className:"w-5 h-5 text-indigo-400"}),(0,n.jsx)("span",{className:"text-sm font-medium",children:"New chat"})]})}),(0,n.jsx)("div",{className:"px-4 pb-4",children:(0,n.jsxs)("div",{className:"p-3 rounded-lg bg-white/5 border border-white/10",children:[(0,n.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,n.jsx)("span",{className:"text-xs text-white/50",children:"Temperature"}),(0,n.jsx)("span",{className:"text-xs font-mono text-indigo-400",children:A.toFixed(1)})]}),(0,n.jsx)("input",{type:"range",min:"0.1",max:"3.0",step:"0.1",value:A,onChange:e=>D(parseFloat(e.target.value)),className:"w-full h-1 bg-white/10 rounded-lg appearance-none cursor-pointer accent-indigo-500"}),(0,n.jsxs)("div",{className:"flex justify-between text-xs text-white/30 mt-1",children:[(0,n.jsx)("span",{children:"Precise"}),(0,n.jsx)("span",{children:"Creative"})]})]})}),(0,n.jsx)("div",{className:"flex-1 overflow-y-auto px-3",children:e.map(e=>(0,n.jsx)("button",{onClick:()=>{i(e.id),v(e.messages)},className:"w-full text-left px-4 py-3 rounded-xl mb-1 text-sm truncate hover:bg-white/5 transition-colors ".concat(s===e.id?"bg-indigo-500/10 border border-indigo-500/20":""),children:e.title},e.id))}),(0,n.jsx)("div",{className:"p-4 border-t border-white/5",children:(0,n.jsxs)(o(),{href:"/inference",prefetch:!1,className:"flex items-center gap-3 px-4 py-2 rounded-xl hover:bg-white/5 transition-colors text-sm text-white/60",children:[(0,n.jsx)(d.A,{className:"w-4 h-4"}),"Back to HELIX"]})})]}),(0,n.jsxs)("div",{className:"flex-1 flex flex-col",children:[(0,n.jsxs)("header",{className:"h-16 shrink-0 flex items-center px-4 border-b border-indigo-500/10 bg-[#0a0a0f]/80 backdrop-blur-lg",children:[(0,n.jsx)("button",{onClick:()=>E(!S),className:"p-2 hover:bg-white/5 rounded-lg transition-colors md:hidden",children:(0,n.jsx)(m.A,{className:"w-5 h-5"})}),(0,n.jsx)(o(),{href:"/",prefetch:!1,"aria-label":"Back to Verificate home",className:"flex items-center gap-2 px-2 py-1.5 rounded-lg hover:bg-white/5 transition-colors",children:(0,n.jsx)("img",{src:"/logos/Verificate Logo Green White.png",alt:"
1Verificate",className:"h-5 w-auto"})}),(0,n.jsx)("div",{className:"flex-1 flex justify-center",children:(0,n.jsxs)(o(),{href:"/inference",prefetch:!1,className:"flex items-center gap-3 rounded-lg px-2 py-1 hover:bg-white/5 transition-colors",children:[(0,n.jsx)("div",{className:"w-8 h-8 rounded-lg bg-gradient-to-br from-indigo-500 to-purple-600 flex items-center justify-center",children:(0,n.jsx)(x.A,{className:"w-4 h-4"})}),(0,n.jsxs)("div",{children:[(0,n.jsx)("span",{className:"font-bold",children:"HELIX"}),(0,n.jsx)("span",{className:"text-xs text-white/50 ml-2",children:"by Verificate"})]}),(0,n.jsxs)("div",{className:"hidden sm:flex items-center gap-2 text-xs text-white/50 ml-4",children:[(0,n.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-emerald-400 animate-pulse"}),(0,n.jsx)(h.A,{className:"w-3.5 h-3.5 text-emerald-400"}),(0,n.jsx)("span",{className:"text-emerald-400/90 font-medium",children:j})]})]})}),(0,n.jsxs)(o(),{href:"/inference",prefetch:!1,className:"hidden md:inline-flex items-center gap-1.5 text-sm text-white/55 hover:text-white transition-colors px-2 py-1.5",children:[(0,n.jsx)(d.A,{className:"w-4 h-4"})," Exit"]})]}),(0,n.jsx)("div",{ref:L,className:"flex-1 overflow-y-auto overscroll-contain",children:0===l.length?(0,n.jsxs)("div",{className:"min-h-full flex flex-col items-center justify-center px-6 py-10 text-center",children:[(0,n.jsx)("div",{className:"w-14 h-14 sm:w-16 sm:h-16 rounded-2xl bg-gradient-to-br from-indigo-500 to-purple-600 flex items-center justify-center mb-5",children:(0,n.jsx)(x.A,{className:"w-7 h-7 sm:w-8 sm:h-8"})}),(0,n.jsx)("h1",{className:"text-2xl sm:text-3xl font-bold mb-2 bg-gradient-to-r from-indigo-400 to-purple-400 bg-clip-text text-transparent",children:"Ask anything"}),(0,n.jsx)("p",{className:"text-white/50 max-w-md mb-6 text-sm sm:text-base leading-relaxed",children:"Running live on GPT-OSS 120B via HELIX v1.8 â with a calibrated confidence score on every answer, so you know when to trust it."})]}):(0,n.jsxs)("div",{className:"max-w-3xl mx-auto py-8 px-4",children:[l.map(e=>(0,n.jsx)("div",{className:"mb-8",children:(0,n.jsxs)("div",{className:"flex gap-4",children:[(0,n.jsx)("div",{className:"w-10 h-10 rounded-xl flex-shrink-0 flex items-center justify-center ".concat("user"===e.role?"bg-white/10":"bg-gradient-to-br from-indigo-500 to-purple-600"),children:"user"===e.role?(0,n.jsx)(p.A,{className:"w-5 h-5 text-white/70"}):(0,n.jsx)(x.A,{className:"w-5 h-5"})}),(0,n.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,n.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,n.jsx)("span",{className:"font-semibold text-sm",children:"user"===e.role?"You":"HELIX"}),"assistant"===e.role&&e.telemetry&&(0,n.jsxs)("div",{className:"flex items-center gap-2 text-xs text-white/40",children:["number"==typeof e.telemetry.confidence&&(0,n.jsxs)("span",{className:"flex items-center gap-1 px-2 py-0.5 rounded-full font-medium ".concat("High"===e.telemetry.confidence_band?"bg-emerald-500/10 text-emerald-400":"Medium"===e.telemetry.confidence_band?"bg-amber-500/10 text-amber-400":"Low"===e.telemetry.confidence_band?"bg-red-500/10 text-red-400":"bg-white/10 text-white/50"),title:"Calibrated confidence: ".concat(e.telemetry.confidence.toFixed(1),"/100 (").concat(e.telemetry.confidence_band||"n/a",")"),children:[(0,n.jsx)(g.A,{className:"w-3 h-3"}),Math.round(e.telemetry.confidence),"% confidence",e.telemetry.confidence_band?" \xb7 ".concat(e.telemetry.confidence_band):""]}),"number"!=typeof e.telemetry.confidence&&e.telemetry.uts_score&&(0,n.jsxs)("span",{className:"flex items-center gap-1 px-2 py-0.5 rounded-full bg-indigo-500/10 text-indigo-400",children:[(0,n.jsx)(f.A,{className:"w-3 h-3"}),"UTS ",e.telemetry.uts_score.toFixed(2)]}),void 0!==e.telemetry.steer_tokens&&e.telemetry.steer_tokens>0&&(0,n.jsxs)("span",{className:"flex items-center gap-1 px-2 py-0.5 rounded-full bg-purple-500/10 text-purple-400",children:[(0,n.jsx)(u.A,{className:"w-3 h-3"}),e.telemetry.steer_tokens," steered"]}),e.telemetry.latency_ms&&(0,n.jsxs)("span",{className:"font-mono",children:[e.telemetry.latency_ms,"ms"]}),e.telemetry.tokens_per_second&&(0,n.jsxs)("span",{className:"font-mono",children:[e.telemetry.tokens_per_second.toFixed(1)," tok/s"]})]})]}),(0,n.jsx)("div",{className:"text-white/80 leading-relaxed prose prose-invert prose-sm max-w-none prose-headings:text-white prose-headings:font-semibold prose-p:text-white/80 prose-p:my-2 prose-a:text-indigo-400 prose-a:no-underline hover:prose-a:underline prose-strong:text-white prose-strong:font-semibold prose-code:text-indigo-400 prose-code:bg-white/5 prose-code:px-1.5 prose-code:py-0.5 prose-code:rounded prose-code:font-mono prose-pre:bg-[#1E1E1E] prose-pre:border prose-pre:border-white/10 prose-pre:rounded-lg prose-ul:text-white/80 prose-ol:text-white/80 prose-li:text-white/80 prose-li:my-1 prose-blockquote:text-white/60 prose-blockquote:border-l-indigo-500/50 prose-hr:border-white/10",dangerouslySetInnerHTML:{__html:(e=>{let t=e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/```([\s\S]*?)```/g,(e,t)=>'<pre class="code-block"><code>'.concat(t.trim(),"</code></pre>")).replace(/`([^`]+)`/g,'<code class="inline-code">$1</code>').replace(/\[([^\]]+)\]\(([^)\s]+)\)/g,(e,t,s)=>{let n,r=(n=s,/^(https?:|mailto:)/i.test(n)||/^(\/(?![/\\])|#|\?|\.{1,2}\/)/.test(n)?n:null);if(!r)return t;let i=/^https?:/i.test(r);return'<a href="'.concat(r,'"').concat(i?' target="_blank" rel="noopener noreferrer"':"",' class="text-indigo-400 underline underline-offset-2 hover:text-indigo-300">').concat(t,"</a>")}).replace(/\*\*(.*?)\*\*/g,"<strong>$1</strong>").replace(/\*(.*?)\*/g,"<em>$1</em>").replace(/^### (.*)$/gm,"<h3>$1</h3>").replace(/^## (.*)$/gm,"<h2>$1</h2>").replace(/^# (.*)$/gm,"<h1>$1</h1>").replace(/^\s*[-*] (.*)$/gm,"⢠$1").replace(/\n{2,}/g,"</p><p>").replace(/\n/g,"<br/>");return"<p>".concat(t,"</p>")})(e.content)}})]})]})},e.id)),_&&(0,n.jsx)("div",{className:"mb-8",children:(0,n.jsxs)("div",{className:"flex gap-4",children:[(0,n.jsx)("div",{className:"w-10 h-10 rounded-xl bg-gradient-to-br from-indigo-500 to-purple-600 flex items-center justify-center flex-shrink-0",children:(0,n.jsx)(x.A,{className:"w-5 h-5"})}),(0,n.jsxs)("div",{className:"flex items-center gap-3",children:[(0,n.jsx)(b.A,{className:"w-5 h-5 text-indigo-400 animate-spin"}),(0,n.jsx)("span",{className:"text-white/50 text-sm",children:"HELIX is thinking..."})]})]})}),(0,n.jsx)("div",{ref:C})]})}),(0,n.jsx)("div",{className:"shrink-0 p-4 border-t border-indigo-500/10 bg-[#12121a]/50",children:(0,n.jsxs)("div",{className:"max-w-3xl mx-auto",children:[(0,n.jsx)("div",{className:"md:hidden mb-3",children:(0,n.jsxs)("div",{className:"p-3 rounded-lg bg-white/5 border border-white/10",children:[(0,n.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,n.jsx)("span",{className:"text-xs text-white/50",children:"Temperature"}),(0,n.jsx)("span",{className:"text-xs font-mono text-indigo-400",children:A.toFixed(1)})]}),(0,n.jsx)("input",{type:"range",min:"0.1",max:"3.0",step:"0.1",value:A,onChange:e=>D(parseFloat(e.target.value)),className:"w-full h-1 bg-white/10 rounded-lg appearance-none cursor-pointer accent-indigo-500"}),(0,n.jsxs)("div",{className:"flex justify-between text-xs text-white/30 mt-1",children:[(0,n.jsx)("span",{children:"Precise"}),(0,n.jsx)("span",{children:"Creative"})]})]})}),(0,n.jsxs)("form",{onSubmit:X,className:"relative",children:[(0,n.jsx)("textarea",{ref:H,value:N,onChange:e=>y(e.target.value),onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),X(e))},placeholder:"Ask about HELIX, the Decision Transformer, or MCPâ¦",rows:1,className:"w-full resize-none rounded-xl bg-[#12121a] border border-indigo-500/20 px-4 py-4 pr-14 text-white placeholder-white/30 focus:outline-none focus:border-indigo-500/50 focus:ring-1 focus:ring-indigo-500/30 transition-all",disabled:_}),(0,n.jsx)("button",{type:"submit",disabled:!N.trim()||_,className:"absolute right-3 bottom-3 p-2 rounded-lg bg-gradient-to-r from-indigo-500 to-purple-600 text-white disabled:opacity-50 disabled:cursor-not-allowed hover:shadow-lg hover:shadow-indigo-500/25 transition-all",children:_?(0,n.jsx)(b.A,{className:"w-5 h-5 animate-spin"}):(0,n.jsx)(w.A,{className:"w-5 h-5"})})]}),(0,n.jsxs)("p",{className:"text-center text-xs text-white/30 mt-3",children:["Verificate assistant \xb7 live on ",j," \xb7 creativity T=",A.toFixed(1)]})]})})]})]})]})}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.