(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[631],{2719:(e,s,t)=>{Promise.resolve().then(t.bind(t,4517))},4517:(e,s,t)=>{"use strict";t.r(s),t.d(s,{default:()=>r});var a=t(5155),l=t(2115);let r=function(){let[e,s]=(0,l.useState)([{id:"trace-1",trace_output:"ass: Hi, how can I help you?",trace_input:"use: I want to know more about your product."},{id:"trace-2",trace_output:"ass: Sure! What would you like to know?",trace_input:"use: Pricing and features."},{id:"trace-3",trace_output:"ass: sadasdnsow?",trace_input:"use: asdasdsads."}]),t=t=>{s(e.slice(0,t))},[r,n]=(0,l.useState)(""),o=()=>{r.trim()&&(s([...e,{id:"trace-".concat(e.length+1),trace_input:"User: ".concat(r),trace_output:"Assistant: ..."}]),n(""))};return(0,a.jsxs)("div",{className:"bg-slate-900 min-h-screen w-full flex flex-col",children:[(0,a.jsx)("div",{className:"flex-1 min-h-0",children:(0,a.jsx)("div",{className:"flex flex-col gap-6 h-full overflow-y-auto p-4",children:e.length>0?e.map((s,l)=>(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsxs)("div",{className:"flex items-center mb-1",children:[(0,a.jsxs)("button",{className:"text-xs text-slate-500 hover:text-slate-300 font-mono underline underline-offset-2 cursor-pointer transition-colors",title:"Click to log full trace details",onClick:()=>console.log(s),children:["Trace ID: ",s.id]}),(0,a.jsx)("button",{className:"ml-2 px-2 py-0.5 bg-red-500 text-white rounded text-xs hover:bg-red-700",onClick:()=>t(l),title:"Remove this and all below",children:"\xd7"})]}),(0,a.jsx)("div",{className:"flex justify-end",children:(0,a.jsxs)("div",{className:"bg-slate-800 px-4 py-2 rounded-lg max-w-2xl text-sm font-mono text-left shadow-sm border border-slate-700",children:[(0,a.jsx)("span",{className:"block text-slate-400 text-xs mb-1",children:"Input"}),(0,a.jsx)("span",{className:"whitespace-pre-line break-words",children:s.trace_input||"N/A"})]})}),(0,a.jsx)("div",{className:"flex",children:(0,a.jsxs)("div",{className:"bg-slate-700 px-4 py-2 rounded-lg max-w-2xl text-sm font-mono text-right shadow-sm border border-slate-600",children:[(0,a.jsx)("span",{className:"block text-slate-400 text-xs mb-1",children:"Output"}),(0,a.jsx)("span",{className:"whitespace-pre-line break-words",children:s.trace_output||"N/A"})]})}),(0,a.jsx)("div",{className:"flex justify-center mt-2"}),l!==e.length-1&&(0,a.jsx)("div",{className:"border-t border-dashed border-slate-800 my-2"})]},s.id)):(0,a.jsx)("div",{className:"flex items-center justify-center h-full w-full",children:(0,a.jsx)("span",{className:"text-slate-400",children:"No traces available for this session."})})})}),(0,a.jsxs)("div",{className:"flex gap-2 p-4 border-t border-slate-800 bg-slate-900",children:[(0,a.jsx)("input",{className:"flex-1 px-3 py-2 border border-slate-700 rounded shadow-sm focus:outline-none focus:ring bg-slate-800 text-white font-mono",type:"text",value:r,onChange:e=>n(e.target.value),placeholder:"Type your message...",onKeyDown:e=>{"Enter"===e.key&&o()}}),(0,a.jsx)("button",{className:"px-4 py-2 bg-blue-600 text-white rounded hover:bg-blue-700",onClick:o,children:"Send"})]})]})}}},e=>{var s=s=>e(e.s=s);e.O(0,[441,684,358],()=>s(2719)),_N_E=e.O()}]);