@testver/testver 1.4.0 → 1.4.2
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.
- package/README.md +3 -1
- package/bin/testver.js +8 -5
- package/dist/index.js +1483 -1086
- package/dist/vendor/grpc.cjs +24914 -0
- package/package.json +9 -4
- package/src/ui/static/assets/{AIPanel-D09Ni3a4.js → AIPanel-B_R-CbrF.js} +2 -2
- package/src/ui/static/assets/{AIRecordPanel-DZtUZnRe.js → AIRecordPanel-BRQWIU5h.js} +3 -3
- package/src/ui/static/assets/{AIStreamUI-BsxKziYG.js → AIStreamUI-C3D989_6.js} +3 -3
- package/src/ui/static/assets/{AITestGenPage-Cg21-P1W.js → AITestGenPage-D3t2gPAA.js} +5 -5
- package/src/ui/static/assets/{APITestingPage-Cdc8EZz2.js → APITestingPage-Cmwkiiys.js} +1 -1
- package/src/ui/static/assets/{AboutPage-yJLCr2_q.js → AboutPage-CjEqKB-q.js} +1 -1
- package/src/ui/static/assets/AdvancedPage-4kAcpE8Y.js +3 -0
- package/src/ui/static/assets/{AnalyticsPage-gTPFsiLZ.js → AnalyticsPage-64mYNK2v.js} +1 -1
- package/src/ui/static/assets/{AuditLogPage-DE45E_PV.js → AuditLogPage-BQjOzQje.js} +1 -1
- package/src/ui/static/assets/{ChangesSummary-C-7oi_sx.js → ChangesSummary-CY_Vb27i.js} +2 -2
- package/src/ui/static/assets/{CodeMapPage-DgU6ZYBO.js → CodeMapPage-B1ezmnlE.js} +3 -3
- package/src/ui/static/assets/{ConfirmDialog-DNU3qoAP.js → ConfirmDialog-t7mpeeSN.js} +1 -1
- package/src/ui/static/assets/{CoveragePage-BpTjgcdV.js → CoveragePage-YMmCbiBk.js} +2 -2
- package/src/ui/static/assets/{CronBuilder-DsnX-vRr.js → CronBuilder-Nk-K-_8I.js} +1 -1
- package/src/ui/static/assets/Dashboard-BDVxO2V4.js +1 -0
- package/src/ui/static/assets/{DefectsPage-BtMNbq6Z.js → DefectsPage-l8yGeCyR.js} +1 -1
- package/src/ui/static/assets/{DiffViewer-DPglzjPH.js → DiffViewer-BIU09a_i.js} +1 -1
- package/src/ui/static/assets/{EmptyState-BH_aDO0P.js → EmptyState-D1T3JWUr.js} +1 -1
- package/src/ui/static/assets/{ExportButton-Ce_MxnM1.js → ExportButton-Dt5RhL-h.js} +1 -1
- package/src/ui/static/assets/{FileViewer-iYL0lxyY.js → FileViewer-CrKgh_cB.js} +5 -5
- package/src/ui/static/assets/{GitPage-CQqV8JBC.js → GitPage-_4nCEzkJ.js} +5 -5
- package/src/ui/static/assets/{ImportExportPage-DXk7Koaq.js → ImportExportPage-BcR7IQi9.js} +1 -1
- package/src/ui/static/assets/{JiraPushDialog-CqftoLh8.js → JiraPushDialog-C2sP4_4h.js} +1 -1
- package/src/ui/static/assets/KpiTile-inmeEsy3.js +1 -0
- package/src/ui/static/assets/{LiveExecutionView-BD0wE8sz.js → LiveExecutionView-D5BRe9jq.js} +1 -1
- package/src/ui/static/assets/{MediaModal-DiSINwmh.js → MediaModal-C5n6sHYi.js} +1 -1
- package/src/ui/static/assets/{MobileRunPicker-BNs2lZFf.js → MobileRunPicker-0h-N2c6d.js} +1 -1
- package/src/ui/static/assets/{MobileRunTarget-D2Nqcj10.js → MobileRunTarget-Bo_xekig.js} +1 -1
- package/src/ui/static/assets/{ModuleExplorer-BmkoQrHb.js → ModuleExplorer-VGcmK167.js} +1 -1
- package/src/ui/static/assets/{OutputPage-Dcsr7cmr.js → OutputPage-B_1nPPxE.js} +1 -1
- package/src/ui/static/assets/PipelinesPanel-PmmPu8pj.js +1 -0
- package/src/ui/static/assets/{ProfilePage-ByshrcwC.js → ProfilePage-y7tJNNFd.js} +1 -1
- package/src/ui/static/assets/{ProjectExplorer-B9B___ij.js → ProjectExplorer-DbfGhRq0.js} +1 -1
- package/src/ui/static/assets/{RemoteFileStrip-DbPnaZ-v.js → RemoteFileStrip-WuRKtx_h.js} +1 -1
- package/src/ui/static/assets/ReportCard-G52Q6-2i.js +2 -0
- package/src/ui/static/assets/ReportFullView-Bt8UFP2J.js +1 -0
- package/src/ui/static/assets/ReportsPage-DMtDi73Q.js +48 -0
- package/src/ui/static/assets/ResultsPage-BI9jpK2N.js +115 -0
- package/src/ui/static/assets/RunState-ifC4zi6M.js +1 -0
- package/src/ui/static/assets/{RunTargets-C7Vqd4TU.js → RunTargets-C7vpCbck.js} +1 -1
- package/src/ui/static/assets/{ScriptMappingPage-BrANeHv0.js → ScriptMappingPage-7vHuvhQw.js} +1 -1
- package/src/ui/static/assets/{SearchableDevicePicker-CFJ_DUAA.js → SearchableDevicePicker-BYxYJNWl.js} +1 -1
- package/src/ui/static/assets/{SettingsPage-BwOiebKG.js → SettingsPage-DSISg7r7.js} +1 -1
- package/src/ui/static/assets/SharedReportView-BOqKGJmR.js +1 -0
- package/src/ui/static/assets/{SourcesPage-C_QVQwiA.js → SourcesPage-CgqtYGBi.js} +1 -1
- package/src/ui/static/assets/TestExplorerPage-gYLhCD4d.js +7 -0
- package/src/ui/static/assets/{TestManagementPage-Ch4PthuU.js → TestManagementPage-wqYTKP7W.js} +2 -2
- package/src/ui/static/assets/TestPlansPage-DOKX9p6z.js +5 -0
- package/src/ui/static/assets/{TestverCreditsRing-CUsMGEe3.js → TestverCreditsRing-DpMzl3h7.js} +1 -1
- package/src/ui/static/assets/{UncommittedDiffViewer-B5HSURk8.js → UncommittedDiffViewer-BxS0zi-p.js} +1 -1
- package/src/ui/static/assets/{UserManagementPage-BjY3ftxf.js → UserManagementPage-B5d0uDU_.js} +2 -2
- package/src/ui/static/assets/{WorkflowsPage-BUu-LjZ8.js → WorkflowsPage-Bk0DFnFS.js} +17 -17
- package/src/ui/static/assets/{hiddenLlmProviders-setxgY_B.js → hiddenLlmProviders-CdhhNa5G.js} +1 -1
- package/src/ui/static/assets/index-BYVxKLrT.js +47 -0
- package/src/ui/static/assets/index-C2KJt7SI.css +1 -0
- package/src/ui/static/assets/reportMeta-AKcU_qwq.js +1 -0
- package/src/ui/static/assets/{useFeatureFlags-DqhngqgG.js → useFeatureFlags-DNkIctil.js} +1 -1
- package/src/ui/static/assets/{useJiraConnector-TM1Rfj1s.js → useJiraConnector-D5ysBBvz.js} +1 -1
- package/src/ui/static/assets/{useOwnership-eW6Egd7X.js → useOwnership-U0AfKBRo.js} +1 -1
- package/src/ui/static/assets/{useSuites-CvtMGakZ.js → useSuites-DyfN9HVv.js} +1 -1
- package/src/ui/static/assets/{useTestExplorer-HqvURJAc.js → useTestExplorer-DT8frjCK.js} +1 -1
- package/src/ui/static/assets/{useTestLifecycle-CL7-zz0Q.js → useTestLifecycle-OcwQaB1s.js} +1 -1
- package/src/ui/static/assets/{useTestManagement-ZTA1_VUm.js → useTestManagement-Xm4Bcx3u.js} +2 -2
- package/src/ui/static/assets/useTestResults-D5EwGIX9.js +1 -0
- package/src/ui/static/assets/{vendor-icons-B0wLOBoh.js → vendor-icons-BKPiFyYV.js} +1 -1
- package/src/ui/static/index.html +3 -3
- package/dist/py-agent/__pycache__/testver_appium.cpython-313.pyc +0 -0
- package/src/ui/static/assets/AdvancedPage-DB-6sJ6s.js +0 -3
- package/src/ui/static/assets/Dashboard-DRWbVyTb.js +0 -1
- package/src/ui/static/assets/PipelinesPanel-CMMXCSda.js +0 -1
- package/src/ui/static/assets/ReportCard-BbNfk85h.js +0 -2
- package/src/ui/static/assets/ReportFullView-Cg1rggho.js +0 -1
- package/src/ui/static/assets/ReportsPage-CFv3OAhe.js +0 -48
- package/src/ui/static/assets/ResultsPage-B4LwZH-R.js +0 -115
- package/src/ui/static/assets/SharedReportView-BAbW1WOs.js +0 -1
- package/src/ui/static/assets/TestExplorerPage-BRRWtwde.js +0 -7
- package/src/ui/static/assets/TestPlansPage-Bno2vpGd.js +0 -5
- package/src/ui/static/assets/index-B0klHYbO.css +0 -1
- package/src/ui/static/assets/index-DtBWNlVD.js +0 -47
- package/src/ui/static/assets/useTestResults-Bm-JyMhB.js +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import{r as h,b as ee,j as e}from"./vendor-react-CTbHBddL.js";import{u as te}from"./vendor-query-BrzmPFT3.js";import{
|
|
1
|
+
import{r as h,b as ee,j as e}from"./vendor-react-CTbHBddL.js";import{u as te}from"./vendor-query-BrzmPFT3.js";import{gp as re,a1 as H}from"./index-BYVxKLrT.js";import{af as se,X as ne,a0 as ae,_ as ie,aC as oe,ac as K,de as le,a as J,aa as de,bK as ce,F as xe,v as me,K as ue,g as pe}from"./vendor-icons-BKPiFyYV.js";function he({run:t,file:s,onClose:i}){const{data:n,isLoading:l,error:r}=te({queryKey:["explore-run-file",t,s],queryFn:()=>re(t,s),staleTime:3e4});h.useEffect(()=>{const a=c=>{c.key==="Escape"&&i()};return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[i]);const o=/\.(md|markdown)$/i.test(s);return ee.createPortal(e.jsxs("div",{className:"fixed inset-0 z-[80] flex items-center justify-center p-4","data-testid":"run-file-viewer",children:[e.jsx("div",{className:"absolute inset-0 bg-black/50 backdrop-blur-sm",onClick:i}),e.jsxs("div",{role:"dialog","aria-modal":"true","aria-label":`Exploration ${t} — ${s}`,className:"relative w-full max-w-3xl max-h-[85vh] flex flex-col rounded-2xl border border-gray-200 dark:border-white/10 bg-white dark:bg-surface-1 shadow-2xl",children:[e.jsxs("div",{className:"flex items-start gap-3 px-5 pt-4 pb-3 border-b border-gray-200 dark:border-white/5",children:[e.jsx("span",{className:"mt-0.5 rounded-lg bg-emerald-500/10 p-2 text-emerald-600 dark:text-emerald-400",children:e.jsx(se,{size:16})}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("h2",{className:"text-base font-semibold text-gray-900 dark:text-gray-100 break-all",children:s}),e.jsxs("p",{className:"text-[13px] text-gray-500 dark:text-gray-400 break-all",children:["Exploration run ",t," · read-only, credentials masked"]})]}),e.jsx("button",{type:"button",onClick:i,className:"p-1 rounded-md text-gray-400 hover:text-gray-700 dark:hover:text-gray-200",title:"Close","aria-label":"Close",children:e.jsx(ne,{size:16})})]}),e.jsxs("div",{className:"flex-1 overflow-y-auto px-5 py-4 text-[13px]",children:[l&&e.jsxs("div",{className:"flex items-center gap-2 text-gray-500",children:[e.jsx(ae,{size:14,className:"animate-spin"})," Reading the file…"]}),r&&e.jsxs("p",{className:"text-red-600 dark:text-red-400",children:["This file could not be opened: ",r.message]}),n&&(o?e.jsx("div",{className:"text-gray-800 dark:text-gray-200",children:e.jsx(Y,{text:n.content})}):e.jsx("pre",{className:"whitespace-pre-wrap break-words font-mono text-[12px] text-gray-800 dark:text-gray-200",children:n.content}))]})]})]}),document.body)}const A=/\[\[cite\|([^|\]]*)\|([^|\]]*)\|([^|\]]*)(?:\|([^\]]*))?\]\]/g,ge=/\[\[cite\\?\|[^\]]*\]\]/g;function fe(t){return t.replace(/\\(?=[|[\]])/g,"")}function Fe(t){return t.replace(ge,fe)}function W(t){const s=t.trim().toLowerCase();return s==="observed"||s==="reported"||s==="asserted"||s==="automated"||s==="stated"?s:"stated"}function _(t,s,i){return`${W(t)}|${s.trim()||i.trim()||"source"}`}function be(t){const s=new Map;for(const i of t.matchAll(A)){const n=i[1]||"",l=(i[2]||"").trim(),r=(i[3]||"").trim(),o=_(n,l,r);s.has(o)||s.set(o,{index:s.size+1,tier:W(n),ref:l||r||"source",detail:l?r:"",kind:(i[4]||"").trim()||void 0})}return[...s.values()]}function Oe(t){return t.replace(A,"").replace(/[ \t]+([.,;:!?])/g,"$1")}function C(t){return t.kind||X[t.tier]}function De(t){const s=be(t),i=new Map(s.map(r=>[_(r.tier,r.ref,""),r])),n=t.replace(A,(r,o,a,c)=>{const p=i.get(_(o,a.trim()||c.trim(),""));return p?` [${p.index}]`:""}).replace(/[ \t]+(\[\d+\])/g," $1");if(s.length===0)return n;const l=s.map(r=>`[${r.index}] ${C(r)} · ${r.ref}${r.detail?` — ${r.detail}`:""}`);return`${n}
|
|
2
2
|
|
|
3
3
|
Sources:
|
|
4
4
|
${l.join(`
|
|
5
5
|
`)}`}const M=h.createContext(null);function Be({citations:t,children:s}){const i=`src-${h.useId().replace(/[^a-zA-Z0-9_-]/g,"")}`,n=new Map(t.map(l=>[_(l.tier,l.ref,""),l]));return e.jsx(M.Provider,{value:{map:n,listId:i},children:s})}const Q={observed:"text-emerald-600 dark:text-emerald-400 border-emerald-500/30 bg-emerald-500/10",reported:"text-rose-600 dark:text-rose-400 border-rose-500/30 bg-rose-500/10",asserted:"text-blue-600 dark:text-blue-400 border-blue-500/30 bg-blue-500/10",automated:"text-violet-600 dark:text-violet-400 border-violet-500/30 bg-violet-500/10",stated:"text-amber-600 dark:text-amber-400 border-amber-500/30 bg-amber-500/10"},ye={observed:"Observed — the app was watched doing this",reported:"Reported — a tester logged this as a defect",asserted:"Asserted — a test case says so",automated:"Automated — a test in the repository checks this",stated:"Stated — written in a document"},X={observed:"Exploration",reported:"Defect",asserted:"Test case",automated:"Automated test",stated:"Document"},ke="relative -top-[3px] mx-[3px] inline-flex items-center justify-center min-w-[14px] h-[14px] px-[3px] rounded-[4px] border text-[9px] leading-none font-semibold tabular-nums align-baseline";function je(t,s){const i=document.getElementById(t);if(!i)return;i.open=!0;const n=document.getElementById(`${t}-${s}`);n==null||n.scrollIntoView({block:"nearest",behavior:"smooth"}),n==null||n.focus({preventScroll:!0})}function we({tier:t,refId:s,detail:i,kind:n}){const l=h.useContext(M),r=l==null?void 0:l.map.get(_(t,s,i)),o=W((r==null?void 0:r.tier)??t),a=(r==null?void 0:r.ref)??(s||i||"source"),c=r?String(r.index):a,p=(r==null?void 0:r.kind)||n||X[o],b=`${p} · ${a}
|
|
6
6
|
${ye[o]}${r!=null&&r.detail||i?`
|
|
7
|
-
${(r==null?void 0:r.detail)||i}`:""}`;return e.jsx("button",{type:"button",title:b,"aria-label":`Source ${c}: ${p} ${a}`,onClick:()=>{l&&r&&je(l.listId,r.index)},className:`${ke} cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-cyan-400/60 ${Q[o]}`,children:c})}function ve(t){var l;const s=t.ref.split(" · ")[0].trim();if(!s)return null;const i=(r,o)=>({kind:"page",href:`${r}?${new URLSearchParams(o).toString()}`});if(t.kind==="Defect register")return{kind:"page",href:"/defects"};if(t.kind==="Defect"||t.tier==="reported")return i("/defects",{defectId:s});if(t.kind==="Test run")return i("/results",{runId:s});if(t.tier==="asserted")return i("/test-cases",{tcId:s});if(t.kind==="Automation library")return{kind:"page",href:"/tests"};if(t.tier==="automated"&&t.kind==="Method"){const r=/^(.+?) · (.+):(\d+)$/.exec(t.ref.trim());if(!r)return null;const o=r[1].lastIndexOf("."),a=o>0?r[1].slice(0,o):"-",c=o>0?r[1].slice(o+1):r[1];return i("/code-map",{symbol:`${r[2]}::${a}::${c}::${r[3]}`,name:c})}if(t.tier==="automated"){const r=t.ref.indexOf(" :: ");return r<0?null:i("/tests",{file:t.ref.slice(0,r),test:t.ref.slice(r+4)})}if(t.tier==="stated"&&/^SRC-/i.test(s)){const r=t.kind==="Jira ticket"?"jira":t.kind==="Requirement"?"requirement":t.kind==="Note"?"nlp":"document";return i("/sources",{tab:r,sourceId:s})}if(t.tier==="stated"&&/^REQ-/i.test(s))return i("/coverage",{tab:"requirements",reqId:s});const n=(l=/\brun ([\w.-]+)/.exec(t.detail))==null?void 0:l[1];return t.tier==="observed"&&n&&/\.(md|markdown|txt|json)$/i.test(s)?{kind:"run-file",run:n,file:s}:null}function Ne(t,s){const i=t.split(" ").map(n=>n==="Jira"?n:n.toLowerCase()).join(" ");return`${s} ${s===1?i:`${i}s`}`}function
|
|
7
|
+
${(r==null?void 0:r.detail)||i}`:""}`;return e.jsx("button",{type:"button",title:b,"aria-label":`Source ${c}: ${p} ${a}`,onClick:()=>{l&&r&&je(l.listId,r.index)},className:`${ke} cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-cyan-400/60 ${Q[o]}`,children:c})}function ve(t){var l;const s=t.ref.split(" · ")[0].trim();if(!s)return null;const i=(r,o)=>({kind:"page",href:`${r}?${new URLSearchParams(o).toString()}`});if(t.kind==="Defect register")return{kind:"page",href:"/defects"};if(t.kind==="Defect"||t.tier==="reported")return i("/defects",{defectId:s});if(t.kind==="Test run")return i("/results",{runId:s});if(t.tier==="asserted")return i("/test-cases",{tcId:s});if(t.kind==="Automation library")return{kind:"page",href:"/tests"};if(t.tier==="automated"&&t.kind==="Method"){const r=/^(.+?) · (.+):(\d+)$/.exec(t.ref.trim());if(!r)return null;const o=r[1].lastIndexOf("."),a=o>0?r[1].slice(0,o):"-",c=o>0?r[1].slice(o+1):r[1];return i("/code-map",{symbol:`${r[2]}::${a}::${c}::${r[3]}`,name:c})}if(t.tier==="automated"){const r=t.ref.indexOf(" :: ");return r<0?null:i("/tests",{file:t.ref.slice(0,r),test:t.ref.slice(r+4)})}if(t.tier==="stated"&&/^SRC-/i.test(s)){const r=t.kind==="Jira ticket"?"jira":t.kind==="Requirement"?"requirement":t.kind==="Note"?"nlp":"document";return i("/sources",{tab:r,sourceId:s})}if(t.tier==="stated"&&/^REQ-/i.test(s))return i("/coverage",{tab:"requirements",reqId:s});const n=(l=/\brun ([\w.-]+)/.exec(t.detail))==null?void 0:l[1];return t.tier==="observed"&&n&&/\.(md|markdown|txt|json)$/i.test(s)?{kind:"run-file",run:n,file:s}:null}function Ne(t,s){const i=t.split(" ").map(n=>n==="Jira"?n:n.toLowerCase()).join(" ");return`${s} ${s===1?i:`${i}s`}`}function Ue({citations:t}){const s=h.useContext(M),[i,n]=h.useState(null);if(t.length===0)return null;const l=a=>{a.kind==="run-file"?n({run:a.run,file:a.file}):window.open(a.href,"_blank","noopener")},r=new Map;for(const a of t){const c=C(a);r.set(c,(r.get(c)??0)+1)}const o=[...r.entries()].map(([a,c])=>Ne(a,c)).join(" · ");return e.jsxs("details",{id:s==null?void 0:s.listId,className:"group mt-3.5 rounded-xl border border-black/[0.07] dark:border-white/[0.08] bg-black/[0.015] dark:bg-white/[0.02] overflow-hidden",children:[e.jsxs("summary",{className:"flex items-center gap-2 cursor-pointer select-none px-3.5 py-2.5 list-none [&::-webkit-details-marker]:hidden hover:bg-black/[0.02] dark:hover:bg-white/[0.02] transition-colors",children:[e.jsx("svg",{width:"11",height:"11",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",className:"text-gray-400 dark:text-gray-500 transition-transform duration-150 group-open:rotate-90 flex-shrink-0","aria-hidden":"true",children:e.jsx("path",{d:"m9 18 6-6-6-6"})}),e.jsx("span",{className:"text-[12px] font-semibold text-gray-700 dark:text-gray-300",children:"Sources"}),e.jsx("span",{className:"text-[11px] text-gray-500 dark:text-gray-500",children:o})]}),e.jsx("div",{className:"border-t border-black/[0.06] dark:border-white/[0.06]",children:t.map(a=>e.jsxs("div",{id:s?`${s.listId}-${a.index}`:void 0,tabIndex:-1,className:"flex items-start gap-2.5 px-3.5 py-2.5 border-b last:border-b-0 border-black/[0.04] dark:border-white/[0.04] focus:outline-none focus:bg-cyan-500/[0.06]",children:[e.jsx("span",{className:`mt-[1px] inline-flex items-center justify-center min-w-[16px] h-[16px] px-[3px] rounded-[4px] border text-[9.5px] leading-none font-semibold tabular-nums flex-shrink-0 ${Q[a.tier]}`,children:a.index}),e.jsxs("span",{className:"flex-1 min-w-0",children:[e.jsxs("span",{className:"block text-[12px] leading-snug",children:[e.jsx("span",{className:"font-semibold text-gray-700 dark:text-gray-300",children:C(a)}),a.ref!==C(a)&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-gray-400 dark:text-gray-600",children:" · "}),e.jsx("span",{className:"font-mono text-[11.5px] text-gray-800 dark:text-gray-200 break-all",children:a.ref})]})]}),a.detail&&e.jsx("span",{className:"block mt-0.5 text-[11px] leading-relaxed text-gray-500 dark:text-gray-500 break-words",children:a.detail})]}),(()=>{const c=ve(a);return c?e.jsxs("button",{type:"button",onClick:()=>l(c),title:c.kind==="run-file"?"Read this file of the exploration run":`Open ${C(a).toLowerCase()} ${a.ref.split(" · ")[0]} in a new tab`,"aria-label":`Open ${C(a)} ${a.ref}`,"data-testid":"source-open",className:"flex-shrink-0 inline-flex items-center gap-1 rounded-md px-1.5 py-0.5 text-[11px] font-medium text-cyan-700 dark:text-cyan-400 hover:bg-cyan-500/10 focus:outline-none focus-visible:ring-2 focus-visible:ring-cyan-400/60",children:["Open ",e.jsx(ie,{size:11})]}):null})()]},`${a.tier}|${a.ref}`))}),i&&e.jsx(he,{run:i.run,file:i.file,onClose:()=>n(null)})]})}function He(t){if(!t)return null;const s=[...t.matchAll(/(?:#{1,4}\s*)?(?:\*\*)?Attempt\s+(\d+)\s*(?:of|\/)\s*(\d+)(?:\*\*)?/gi)];if(s.length===0)return null;const i=s[s.length-1],n=parseInt(i[1],10),l=parseInt(i[2],10),r=t.lastIndexOf(i[0]),o=t.slice(r);return/\*\*Test Result:?\*\*\s*:?\s*PASS/i.test(o)||/\ball\s+\d+\s+(tests?\s+)?passed/i.test(o)||/test(s)?\s+(run\s+)?pass(ed)?/i.test(o)?{current:n,total:l,status:"pass"}:/\*\*Test Result:?\*\*\s*:?\s*FAIL/i.test(o)||/test(s)?\s+(still\s+)?fail(ed|ing)?/i.test(o)||/\d+\s+fail(ed|ing|ure)/i.test(o)?{current:n,total:l,status:"fail"}:{current:n,total:l,status:"running"}}function $e(t){return t==="read_file"?e.jsx(de,{size:12,className:"text-sky-400"}):t==="write_file"||t==="edit_file"||t==="find_replace"?e.jsx(ce,{size:12,className:"text-amber-400"}):t==="run_command"||t==="run_tests"?e.jsx(J,{size:12,className:"text-emerald-400"}):t==="create_directory"||t==="list_directory"?e.jsx(xe,{size:12,className:"text-purple-400"}):t==="glob_search"||t==="grep"?e.jsx(me,{size:12,className:"text-indigo-400"}):t.startsWith("browser_")?e.jsx(ue,{size:12,className:"text-pink-400"}):e.jsx(pe,{size:12,className:"text-gray-400"})}function Ce(t){return t==="start"?"text-sky-400":t==="complete"?"text-emerald-400":t==="error"?"text-red-400":t==="denied"?"text-amber-400":"text-gray-400"}function V(t){return t==="start"?"Running":t==="complete"?"Done":t==="error"?"Failed":t==="denied"?"Denied":t}function Ee({events:t,label:s}){const i=h.useRef(null);if(h.useEffect(()=>{i.current&&(i.current.scrollTop=i.current.scrollHeight)},[t]),t.length===0)return null;const n=[],l=new Map;for(const r of t)if(r.phase==="start")l.set(r.toolName+"-"+r.id,r),n.push(r);else if(r.phase==="complete"){const o=r.toolName+"-"+r.id,a=l.get(o);if(a){const c=n.indexOf(a);c>=0&&(n[c]={...a,phase:"complete",result:r.result})}else n.push(r)}else n.push(r);return e.jsxs("div",{className:"mb-3 space-y-0.5",children:[e.jsxs("div",{className:"flex items-center gap-1.5 mb-1",children:[e.jsx(J,{size:11,className:"text-gray-500"}),e.jsx("span",{className:"text-[10px] font-medium text-gray-500 uppercase tracking-wider",children:s||"Tool Activity"})]}),e.jsx("div",{ref:i,className:"max-h-[240px] overflow-y-auto rounded-lg bg-black/20 border border-white/5",children:n.map((r,o)=>e.jsxs("div",{className:"flex items-center gap-2 px-3 py-1.5 border-b border-white/[0.03] last:border-b-0 hover:bg-white/[0.02] transition-colors",children:[$e(r.toolName),e.jsxs("span",{className:"text-xs text-gray-300 font-mono truncate flex-1",children:[r.toolName,r.args&&e.jsx("span",{className:"text-gray-500 ml-1",children:r.args})]}),e.jsx("span",{className:`text-[10px] font-medium ${Ce(r.phase)}`,children:r.phase==="start"?e.jsxs("span",{className:"inline-flex items-center gap-1",children:[e.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-sky-400 animate-pulse"}),V(r.phase)]}):V(r.phase)})]},o))})]})}function Ke({permission:t,onRespond:s}){return e.jsxs("div",{className:"mb-3 rounded-xl border border-amber-500/30 bg-amber-500/5 p-4 animate-in fade-in",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[e.jsx(oe,{size:16,className:"text-amber-400"}),e.jsx("span",{className:"text-sm font-semibold text-amber-300",children:"Permission Required"})]}),e.jsxs("div",{className:"mb-3",children:[e.jsxs("p",{className:"text-sm text-gray-300",children:["AI wants to execute: ",e.jsx("span",{className:"font-mono text-amber-300",children:t.toolName})]}),t.args&&e.jsx("p",{className:"text-xs text-gray-500 font-mono mt-1 truncate",children:t.args})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("button",{onClick:()=>s(t.permissionId,!0),className:"flex items-center gap-1.5 px-4 py-2 rounded-lg bg-emerald-500/20 text-emerald-300 text-sm font-medium hover:bg-emerald-500/30 transition-colors border border-emerald-500/20",children:[e.jsx(K,{size:14}),"Allow"]}),e.jsxs("button",{onClick:()=>s(t.permissionId,!0,!0),className:"flex items-center gap-1.5 px-4 py-2 rounded-lg bg-sky-500/20 text-sky-300 text-sm font-medium hover:bg-sky-500/30 transition-colors border border-sky-500/20",children:[e.jsx(K,{size:14}),"Always Allow"]}),e.jsxs("button",{onClick:()=>s(t.permissionId,!1),className:"flex items-center gap-1.5 px-4 py-2 rounded-lg bg-red-500/20 text-red-300 text-sm font-medium hover:bg-red-500/30 transition-colors border border-red-500/20",children:[e.jsx(le,{size:14}),"Deny"]})]})]})}const Y=h.memo(function({text:s}){var z,F,O,D,B,U;const i=[];let n=s;const l=/EMAIL_PREVIEW_START\n([\s\S]*?)EMAIL_PREVIEW_END/g;let r;for(;(r=l.exec(s))!==null;){const u=r[1]||"",d=u.match(/^To:\s*(.+)/m),y=u.match(/^CC:\s*(.+)/m),k=u.match(/^From:\s*(.+)/m),j=u.match(/^Subject:\s*(.+)/m),w=u.match(/---BODY---\n([\s\S]*?)---END_BODY---/);i.push({to:((z=d==null?void 0:d[1])==null?void 0:z.trim())||"",cc:(F=y==null?void 0:y[1])==null?void 0:F.trim(),from:((O=k==null?void 0:k[1])==null?void 0:O.trim())||"",subject:((D=j==null?void 0:j[1])==null?void 0:D.trim())||"",body:((B=w==null?void 0:w[1])==null?void 0:B.trim())||""}),n=n.replace(r[0],`__EMAIL_PREVIEW_${i.length-1}__`)}const o=n.split(`
|
|
8
8
|
`),a=[];let c=!1,p="",b=[],m=[],x=0;const N=(u=!1)=>{if(b.length>0){const d=b.join(`
|
|
9
|
-
`);a.push(e.jsxs("div",{className:"my-2",children:[p&&e.jsxs("div",{className:"text-[10px] text-gray-500 bg-black/30 px-3 py-1 rounded-t-lg border border-b-0 border-white/5 font-mono flex items-center gap-2",children:[e.jsx("span",{children:p}),u&&e.jsx("span",{className:"text-[9px] text-gray-600 italic",children:"(streaming...)"})]}),e.jsx("pre",{className:`bg-black/30 border border-white/5 ${p?"rounded-b-lg":"rounded-lg"} p-3 text-xs text-gray-300 font-mono overflow-x-auto whitespace-pre-wrap max-h-[500px] overflow-y-auto`,children:d})]},x++)),b=[],p=""}},L=u=>{const d=[];return u.replace(/\[\[cite\\?\|[^\]]*\]\]/g,k=>(d.push(k.replace(/\\(?=[|[\]])/g,"")),`\0${d.length-1}\0`)).replace(/\\\|/g,"").replace(/^\|/,"").replace(/\|$/,"").split("|").map(k=>k.trim().replace(/\u0001/g,"|").replace(/\u0000(\d+)\u0000/g,(j,w)=>d[Number(w)]??""))},Z=u=>/^\|[\s:]*-{2,}[\s:]*(\|[\s:]*-{2,}[\s:]*)*\|?$/.test(u.trim()),I=()=>{if(m.length===0)return;const u=m.map(L);let d=null,y=[];m.length>=2&&Z(m[1])?(d=u[0],y=u.slice(2)):y=u,a.push(e.jsx(_e,{headers:d,rows:y},x++)),m=[]};for(const u of o){if(u.trimStart().startsWith("```")){I(),c?(c=!1,N()):(c=!0,p=u.trimStart().slice(3).trim());continue}if(c){b.push(u);continue}const d=u.trim();if(d.startsWith("|")){m.push(d);continue}if(I(),!d){a.push(e.jsx("div",{className:"h-2"},x++));continue}const y=d.match(/^__EMAIL_PREVIEW_(\d+)__$/);if(y){const $=parseInt(y[1],10),g=i[$];g&&a.push(e.jsxs("div",{className:"my-3 rounded-xl border border-blue-500/20 bg-blue-50/60 dark:bg-blue-500/5 overflow-hidden",children:[e.jsxs("div",{className:"flex items-center gap-2 px-4 py-2.5 bg-blue-500/10 border-b border-blue-500/10",children:[e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-blue-500 dark:text-blue-400 shrink-0",children:[e.jsx("rect",{width:"20",height:"16",x:"2",y:"4",rx:"2"}),e.jsx("path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7"})]}),e.jsx("span",{className:"text-sm font-semibold text-blue-700 dark:text-blue-300",children:"Email Preview"})]}),e.jsxs("div",{className:"px-4 py-3 space-y-1.5 border-b border-gray-200 dark:border-white/5",children:[e.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[e.jsx("span",{className:"text-gray-500 w-16 shrink-0",children:"To:"}),e.jsx("span",{className:"text-gray-800 dark:text-gray-200 font-medium",children:g.to})]}),g.cc&&e.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[e.jsx("span",{className:"text-gray-500 w-16 shrink-0",children:"CC:"}),e.jsx("span",{className:"text-gray-700 dark:text-gray-300",children:g.cc})]}),e.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[e.jsx("span",{className:"text-gray-500 w-16 shrink-0",children:"From:"}),e.jsx("span",{className:"text-gray-700 dark:text-gray-300",children:g.from})]}),e.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[e.jsx("span",{className:"text-gray-500 w-16 shrink-0",children:"Subject:"}),e.jsx("span",{className:"text-gray-900 dark:text-gray-100 font-medium",children:g.subject})]})]}),e.jsx("div",{className:"px-4 py-3 max-h-[300px] overflow-y-auto",children:e.jsx("div",{className:"text-xs text-gray-700 dark:text-gray-300 whitespace-pre-wrap leading-relaxed",children:g.body})}),e.jsx("div",{className:"px-4 py-2 bg-gray-50 dark:bg-white/[0.02] border-t border-gray-200 dark:border-white/5",children:e.jsx("span",{className:"text-[10px] text-gray-500 italic",children:"Confirm to send this email"})})]},x++));continue}const k=d.match(/((?:https?:\/\/[^\s/]+)?\/api\/documents\/download\/([^\s)\]"']+\.(?:png|svg|jpg|jpeg)))/);if(k){const $=U(k[1]),g=decodeURIComponent(k[2]||"").replace(/^\d+-/,"");a.push(e.jsxs("div",{className:"my-3 w-full max-w-[640px] rounded-xl border border-gray-200 dark:border-white/10 overflow-hidden bg-white dark:bg-black/20",children:[e.jsx("img",{src:$,alt:g,className:"w-full h-auto max-h-[500px] object-contain block",loading:"lazy"}),e.jsxs("div",{className:"flex items-center justify-between px-4 py-2 border-t border-gray-100 dark:border-white/5 bg-gray-50 dark:bg-white/[0.02]",children:[e.jsx("span",{className:"text-xs text-gray-600 dark:text-gray-400 truncate",children:g}),e.jsxs("button",{onClick:()=>{fetch($).then(E=>E.blob()).then(E=>{const T=URL.createObjectURL(E),v=document.createElement("a");v.href=T,v.download=g,document.body.appendChild(v),v.click(),document.body.removeChild(v),URL.revokeObjectURL(T)}).catch(()=>window.open($,"_blank"))},className:"flex items-center gap-1.5 px-2.5 py-1 rounded-lg bg-white dark:bg-white/5 border border-gray-200 dark:border-white/10 hover:bg-gray-100 dark:hover:bg-white/10 transition-colors text-xs text-gray-700 dark:text-gray-300 cursor-pointer",children:[e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),e.jsx("polyline",{points:"7 10 12 15 17 10"}),e.jsx("line",{x1:"12",y1:"15",x2:"12",y2:"3"})]}),"Save"]})]})]},x++));continue}const j=d.match(/\[([^\]]*)\]\(((?:https?:\/\/[^)\s/]+)?\/api\/documents\/download\/([^)]+))\)/),w=j?null:d.match(/((?:https?:\/\/[^\s/]+)?\/api\/documents\/download\/(\S+))/),S=j?{url:j[2],file:j[3]}:w?{url:w[1],file:w[2]}:null;if(S){const $=U(S.url||""),g=decodeURIComponent(S.file||"document").replace(/^\d+-/,""),E=((H=g.split(".").pop())==null?void 0:H.toLowerCase())||"",v={docx:{color:"text-blue-500",label:"Word Document"},doc:{color:"text-blue-500",label:"Word Document"},pdf:{color:"text-rose-500",label:"PDF Document"},xlsx:{color:"text-emerald-500",label:"Excel Spreadsheet"},xls:{color:"text-emerald-500",label:"Excel Spreadsheet"},csv:{color:"text-gray-500",label:"CSV File"}}[E]||{color:"text-gray-500",label:"Document"};a.push(e.jsxs("a",{href:$,download:g,className:"flex items-center gap-3 p-3 my-2 rounded-xl border border-gray-200 dark:border-white/10 bg-transparent hover:bg-gray-50 dark:hover:bg-white/[0.03] transition-colors cursor-pointer no-underline group",children:[e.jsx("div",{className:"w-11 h-11 rounded-lg flex items-center justify-center shrink-0",children:e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",className:v.color,children:[e.jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),e.jsx("polyline",{points:"14 2 14 8 20 8"})]})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("div",{className:"text-sm font-medium text-gray-800 dark:text-gray-200 truncate",children:g}),e.jsx("div",{className:"text-[11px] text-gray-500 dark:text-gray-400",children:v.label})]}),e.jsxs("div",{className:`flex items-center gap-1.5 px-3 py-1.5 rounded-lg border border-gray-200 dark:border-white/10 group-hover:bg-gray-100 dark:group-hover:bg-white/5 transition-colors shrink-0 ${v.color}`,children:[e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),e.jsx("polyline",{points:"7 10 12 15 17 10"}),e.jsx("line",{x1:"12",y1:"15",x2:"12",y2:"3"})]}),e.jsx("span",{className:"text-xs font-medium",children:"Download"})]})]},x++));continue}if(/^[-*_]{3,}$/.test(d)){a.push(e.jsx("hr",{className:"border-white/5 my-3"},x++));continue}if(d.startsWith("#### ")){a.push(e.jsx("h5",{className:"text-[13px] font-semibold text-gray-200 mt-2.5 mb-1",children:f(d.slice(5))},x++));continue}if(d.startsWith("### ")){a.push(e.jsx("h4",{className:"text-sm font-semibold text-gray-200 mt-3 mb-1",children:f(d.slice(4))},x++));continue}if(d.startsWith("## ")){a.push(e.jsx("h3",{className:"text-base font-semibold text-gray-100 mt-4 mb-1",children:f(d.slice(3))},x++));continue}if(d.startsWith("# ")){a.push(e.jsx("h2",{className:"text-lg font-bold text-gray-100 mt-4 mb-1.5",children:f(d.slice(2))},x++));continue}const R=d.match(/^(\d+)\.\s+(.+)/);if(R){a.push(e.jsxs("div",{className:"flex gap-2 text-sm text-gray-300 leading-relaxed ml-2",children:[e.jsxs("span",{className:"text-gray-500 flex-shrink-0 w-4 text-right",children:[R[1],"."]}),e.jsx("span",{children:f(R[2])})]},x++));continue}if(d.startsWith("- ")||d.startsWith("* ")){a.push(e.jsxs("div",{className:"flex gap-2 text-sm text-gray-300 leading-relaxed ml-2",children:[e.jsx("span",{className:"text-gray-500 flex-shrink-0",children:"•"}),e.jsx("span",{children:f(d.slice(2))})]},x++));continue}if(d.startsWith("**")){a.push(e.jsx("p",{className:"text-sm text-gray-200 mt-2",children:f(d)},x++));continue}a.push(e.jsx("p",{className:"text-sm text-gray-300 leading-relaxed",children:f(d)},x++))}return c&&N(!0),I(),e.jsx("div",{className:"space-y-0.5",children:a})});function _e({headers:t,rows:s,alignNumbers:i=!1}){const n=t?t.findIndex(Te):-1,l=o=>o===n?" text-center w-px whitespace-nowrap":"",r=o=>i&&/^[-+]?[\d,]+(\.\d+)?\s*(%|ms|s)?$/.test(o.trim());return e.jsx("div",{className:"my-2.5 rounded-[10px] border border-gray-200 dark:border-[#2c2d36] overflow-hidden","data-testid":"ai-table",children:e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full border-collapse text-[13px] text-gray-700 dark:text-gray-300 tabular-nums",children:[t&&e.jsx("thead",{children:e.jsx("tr",{children:t.map((o,a)=>e.jsx("th",{className:`bg-[#f7f8fa] dark:bg-[#22232a] border-b border-gray-200 dark:border-[#2c2d36] px-3.5 py-[9px] text-left text-[11.5px] font-semibold uppercase tracking-[0.05em] text-gray-500 dark:text-gray-400 whitespace-nowrap${l(a)}`,children:f(o,!0)},a))})}),e.jsxs("tbody",{children:[s.map((o,a)=>e.jsx("tr",{className:"group/row",children:o.map((c,p)=>{var b;return e.jsx("td",{className:`px-3.5 py-2.5 align-middle border-b border-[#eef0f3] dark:border-[#25262d] group-last/row:border-b-0 group-hover/row:bg-[#f5f7fa] dark:group-hover/row:bg-[#23242b]${p===0?" font-medium text-gray-800 dark:text-gray-200":""}${(b=G(c))!=null&&b.rest?" min-w-[13rem]":Le(c)}${l(p)}${r(c)?" text-right":""}`,children:Ae(c)},p)})},a)),s.length===0&&e.jsx("tr",{children:e.jsx("td",{colSpan:Math.max(1,(t==null?void 0:t.length)??1),className:"px-3.5 py-6 text-center text-gray-400 dark:text-gray-500",children:"No rows"})})]})]})})})}const P=/\[\[cite\|[^\]]*\]\]/g;function Le(t){const s=t.replace(P,"").replace(/[`*]/g,"").trim().length;return s<=18?" whitespace-nowrap":s>40?" min-w-[16rem]":""}const Ie=/^(passed|pass|failed|fail|error|skipped|blocked|flaky|open|in progress|resolved|closed|fixed|rejected)(\s*\((?:error|fixed)\))?(?:\s*[—–-]\s+([\s\S]+))?$/i,Se={passed:"ok",pass:"ok",resolved:"ok",closed:"ok",fixed:"ok",failed:"bad",fail:"bad",error:"bad",blocked:"bad",open:"bad",skipped:"warn",flaky:"warn","in progress":"warn",rejected:"neutral"},Re={bad:"text-red-700 bg-red-50 dark:text-red-400 dark:bg-red-500/[0.12]",ok:"text-emerald-700 bg-emerald-50 dark:text-emerald-400 dark:bg-emerald-500/[0.12]",warn:"text-amber-700 bg-amber-50 dark:text-amber-400 dark:bg-amber-500/[0.12]",neutral:"text-gray-600 bg-gray-100 dark:text-gray-300 dark:bg-white/[0.08]"};function G(t){const s=Ie.exec(t.replace(P,"").trim());return s?{label:`${s[1]}${s[2]??""}`.trim(),tone:Se[s[1].toLowerCase()]??"neutral",rest:(s[3]??"").trim()}:null}function Te(t){return/^sources?$/i.test((t??"").replace(/\*/g,"").trim())}function q(t){const s=t.split(/\s→\s/);return s.length===1?f(t,!0):s.map((i,n)=>e.jsxs("span",{children:[n>0&&e.jsx("span",{className:"px-1 text-[#9ca3af] dark:text-gray-500",children:"→"}),f(i,!0)]},n))}function Ae(t){const s=G(t);if(!s)return q(t);const i=(t.match(P)??[]).join(" ");return e.jsxs(e.Fragment,{children:[e.jsxs("span",{className:`inline-flex items-center gap-[5px] rounded-full px-2 py-0.5 text-[11.5px] font-semibold whitespace-nowrap ${Re[s.tone]}`,children:[e.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-current","aria-hidden":"true"}),s.label]}),i&&e.jsxs(e.Fragment,{children:[" ",f(i,!0)]}),s.rest&&e.jsx("span",{className:"mt-[3px] block text-[12px] text-gray-500 dark:text-gray-400",children:q(s.rest)})]})}function f(t,s=!1){const i=t.split(/(\*\*[^*]+\*\*|`[^`]+`|\[\[cite\|[^\]]*\]\]|\*[^\s*][^*\n]*[^\s*]\*|\*[^\s*]\*)/g);return i.length===1?t:e.jsx(e.Fragment,{children:i.map((n,l)=>{if(n.startsWith("[[cite|")){const r=/^\[\[cite\|([^|\]]*)\|([^|\]]*)\|([^|\]]*)(?:\|([^\]]*))?\]\]$/.exec(n);return r?e.jsx(we,{tier:r[1]||"",refId:(r[2]||"").trim(),detail:(r[3]||"").trim(),kind:(r[4]||"").trim()||void 0},l):null}return n.startsWith("**")&&n.endsWith("**")?e.jsx("strong",{className:"font-semibold text-gray-200",children:f(n.slice(2,-2),s)},l):n.startsWith("`[[cite|")&&n.endsWith("]]`")?e.jsx("span",{children:f(n.slice(1,-1),s)},l):n.startsWith("`")&&n.endsWith("`")?e.jsx("code",{className:s?"bg-gray-100 text-gray-700 dark:bg-white/[0.08] dark:text-gray-200 px-[5px] py-px rounded text-[0.86em] font-mono whitespace-nowrap":"bg-white/5 text-amber-300 px-1 py-0.5 rounded text-xs font-mono",children:n.slice(1,-1)},l):n.length>2&&n.startsWith("*")&&n.endsWith("*")?e.jsx("em",{className:"italic",children:f(n.slice(1,-1),s)},l):e.jsx("span",{children:n},l)})})}function Ve({state:t,panelRef:s,label:i,icon:n,emptyMessage:l}){const r=h.useRef(null),o=s??r,a=h.useRef(null),c=h.useRef(!0);h.useEffect(()=>{const m=o.current;if(!m)return;const x=()=>{const N=m.scrollHeight-m.scrollTop-m.clientHeight<32;c.current=N};return m.addEventListener("scroll",x,{passive:!0}),()=>m.removeEventListener("scroll",x)},[o]);const p=h.useRef(!0);h.useEffect(()=>{const m=()=>{const x=document.scrollingElement||document.documentElement;if(!x)return;const N=x.scrollHeight-x.scrollTop-x.clientHeight<120;p.current=N};return window.addEventListener("scroll",m,{passive:!0}),()=>window.removeEventListener("scroll",m)},[]),h.useEffect(()=>{const m=o.current,x=requestAnimationFrame(()=>{m&&c.current&&(m.scrollTop=m.scrollHeight),p.current&&a.current&&a.current.scrollIntoView({block:"end",behavior:"smooth"})});return()=>cancelAnimationFrame(x)},[t.content,t.toolEvents.length,t.status,o]);const b=(()=>{if(t.status!=="streaming"||t.content)return null;const m=t.toolEvents.filter(L=>L.phase==="start");if(m.length===0)return null;const x=m[m.length-1];return{read_file:"Reading file",write_file:"Writing file",edit_file:"Editing file",find_replace:"Editing file",run_command:"Running command",run_tests:"Running tests",glob_search:"Searching files",grep:"Searching code",create_directory:"Creating directory",list_directory:"Listing directory",browser_launch:"Launching browser",browser_navigate:"Navigating",browser_click:"Clicking element",browser_type:"Typing text",browser_inspect:"Inspecting page",browser_screenshot:"Taking screenshot",browser_get_text:"Reading page text"}[x.toolName]||`Running ${x.toolName}`})();return e.jsxs(e.Fragment,{children:[t.toolEvents.length>0&&e.jsx(Ee,{events:t.toolEvents,label:i==="AI Fix"?"Analysis Activity":"Implementation Activity"}),e.jsxs("div",{ref:o,className:"bg-surface-1 rounded-lg border border-white/5 p-4 max-h-[600px] overflow-y-auto",children:[t.status==="error"&&e.jsxs("div",{className:"text-sm text-red-400",children:[e.jsxs("p",{children:["Failed: ",t.error]}),e.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"If this mentions your AI provider or connection, check Settings → LLM and verify the provider is connected."})]}),t.content?e.jsx(Y,{text:t.content}):t.status==="streaming"?e.jsxs("div",{className:"flex items-center gap-2 text-sm text-gray-400",children:[e.jsx("div",{className:"w-4 h-4 border-2 border-purple-400 border-t-transparent rounded-full animate-spin"}),e.jsxs("div",{children:[e.jsx("span",{children:t.statusMessage||b||l}),t.toolEvents.length>0&&!b&&e.jsxs("span",{className:"text-gray-600 ml-1",children:["(",t.toolEvents.length," tools executed)"]})]})]}):null,t.status==="streaming"&&t.content&&e.jsx("span",{className:"inline-block w-2 h-4 bg-purple-400 animate-pulse ml-0.5 align-text-bottom"})]}),e.jsx("div",{ref:a,"aria-hidden":"true"})]})}export{Y as A,Be as C,Ke as P,He as S,Ve as a,_e as b,De as c,be as e,Ue as p,Oe as s,Fe as u};
|
|
9
|
+
`);a.push(e.jsxs("div",{className:"my-2",children:[p&&e.jsxs("div",{className:"text-[10px] text-gray-500 bg-black/30 px-3 py-1 rounded-t-lg border border-b-0 border-white/5 font-mono flex items-center gap-2",children:[e.jsx("span",{children:p}),u&&e.jsx("span",{className:"text-[9px] text-gray-600 italic",children:"(streaming...)"})]}),e.jsx("pre",{className:`bg-black/30 border border-white/5 ${p?"rounded-b-lg":"rounded-lg"} p-3 text-xs text-gray-300 font-mono overflow-x-auto whitespace-pre-wrap max-h-[500px] overflow-y-auto`,children:d})]},x++)),b=[],p=""}},I=u=>{const d=[];return u.replace(/\[\[cite\\?\|[^\]]*\]\]/g,k=>(d.push(k.replace(/\\(?=[|[\]])/g,"")),`\0${d.length-1}\0`)).replace(/\\\|/g,"").replace(/^\|/,"").replace(/\|$/,"").split("|").map(k=>k.trim().replace(/\u0001/g,"|").replace(/\u0000(\d+)\u0000/g,(j,w)=>d[Number(w)]??""))},Z=u=>/^\|[\s:]*-{2,}[\s:]*(\|[\s:]*-{2,}[\s:]*)*\|?$/.test(u.trim()),L=()=>{if(m.length===0)return;const u=m.map(I);let d=null,y=[];m.length>=2&&Z(m[1])?(d=u[0],y=u.slice(2)):y=u,a.push(e.jsx(_e,{headers:d,rows:y},x++)),m=[]};for(const u of o){if(u.trimStart().startsWith("```")){L(),c?(c=!1,N()):(c=!0,p=u.trimStart().slice(3).trim());continue}if(c){b.push(u);continue}const d=u.trim();if(d.startsWith("|")){m.push(d);continue}if(L(),!d){a.push(e.jsx("div",{className:"h-2"},x++));continue}const y=d.match(/^__EMAIL_PREVIEW_(\d+)__$/);if(y){const $=parseInt(y[1],10),g=i[$];g&&a.push(e.jsxs("div",{className:"my-3 rounded-xl border border-blue-500/20 bg-blue-50/60 dark:bg-blue-500/5 overflow-hidden",children:[e.jsxs("div",{className:"flex items-center gap-2 px-4 py-2.5 bg-blue-500/10 border-b border-blue-500/10",children:[e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-blue-500 dark:text-blue-400 shrink-0",children:[e.jsx("rect",{width:"20",height:"16",x:"2",y:"4",rx:"2"}),e.jsx("path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7"})]}),e.jsx("span",{className:"text-sm font-semibold text-blue-700 dark:text-blue-300",children:"Email Preview"})]}),e.jsxs("div",{className:"px-4 py-3 space-y-1.5 border-b border-gray-200 dark:border-white/5",children:[e.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[e.jsx("span",{className:"text-gray-500 w-16 shrink-0",children:"To:"}),e.jsx("span",{className:"text-gray-800 dark:text-gray-200 font-medium",children:g.to})]}),g.cc&&e.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[e.jsx("span",{className:"text-gray-500 w-16 shrink-0",children:"CC:"}),e.jsx("span",{className:"text-gray-700 dark:text-gray-300",children:g.cc})]}),e.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[e.jsx("span",{className:"text-gray-500 w-16 shrink-0",children:"From:"}),e.jsx("span",{className:"text-gray-700 dark:text-gray-300",children:g.from})]}),e.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[e.jsx("span",{className:"text-gray-500 w-16 shrink-0",children:"Subject:"}),e.jsx("span",{className:"text-gray-900 dark:text-gray-100 font-medium",children:g.subject})]})]}),e.jsx("div",{className:"px-4 py-3 max-h-[300px] overflow-y-auto",children:e.jsx("div",{className:"text-xs text-gray-700 dark:text-gray-300 whitespace-pre-wrap leading-relaxed",children:g.body})}),e.jsx("div",{className:"px-4 py-2 bg-gray-50 dark:bg-white/[0.02] border-t border-gray-200 dark:border-white/5",children:e.jsx("span",{className:"text-[10px] text-gray-500 italic",children:"Confirm to send this email"})})]},x++));continue}const k=d.match(/((?:https?:\/\/[^\s/]+)?\/api\/documents\/download\/([^\s)\]"']+\.(?:png|svg|jpg|jpeg)))/);if(k){const $=H(k[1]),g=decodeURIComponent(k[2]||"").replace(/^\d+-/,"");a.push(e.jsxs("div",{className:"my-3 w-full max-w-[640px] rounded-xl border border-gray-200 dark:border-white/10 overflow-hidden bg-white dark:bg-black/20",children:[e.jsx("img",{src:$,alt:g,className:"w-full h-auto max-h-[500px] object-contain block",loading:"lazy"}),e.jsxs("div",{className:"flex items-center justify-between px-4 py-2 border-t border-gray-100 dark:border-white/5 bg-gray-50 dark:bg-white/[0.02]",children:[e.jsx("span",{className:"text-xs text-gray-600 dark:text-gray-400 truncate",children:g}),e.jsxs("button",{onClick:()=>{fetch($).then(E=>E.blob()).then(E=>{const T=URL.createObjectURL(E),v=document.createElement("a");v.href=T,v.download=g,document.body.appendChild(v),v.click(),document.body.removeChild(v),URL.revokeObjectURL(T)}).catch(()=>window.open($,"_blank"))},className:"flex items-center gap-1.5 px-2.5 py-1 rounded-lg bg-white dark:bg-white/5 border border-gray-200 dark:border-white/10 hover:bg-gray-100 dark:hover:bg-white/10 transition-colors text-xs text-gray-700 dark:text-gray-300 cursor-pointer",children:[e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),e.jsx("polyline",{points:"7 10 12 15 17 10"}),e.jsx("line",{x1:"12",y1:"15",x2:"12",y2:"3"})]}),"Save"]})]})]},x++));continue}const j=d.match(/\[([^\]]*)\]\(((?:https?:\/\/[^)\s/]+)?\/api\/documents\/download\/([^)]+))\)/),w=j?null:d.match(/((?:https?:\/\/[^\s/]+)?\/api\/documents\/download\/(\S+))/),S=j?{url:j[2],file:j[3]}:w?{url:w[1],file:w[2]}:null;if(S){const $=H(S.url||""),g=decodeURIComponent(S.file||"document").replace(/^\d+-/,""),E=((U=g.split(".").pop())==null?void 0:U.toLowerCase())||"",v={docx:{color:"text-blue-500",label:"Word Document"},doc:{color:"text-blue-500",label:"Word Document"},pdf:{color:"text-rose-500",label:"PDF Document"},xlsx:{color:"text-emerald-500",label:"Excel Spreadsheet"},xls:{color:"text-emerald-500",label:"Excel Spreadsheet"},csv:{color:"text-gray-500",label:"CSV File"}}[E]||{color:"text-gray-500",label:"Document"};a.push(e.jsxs("a",{href:$,download:g,className:"flex items-center gap-3 p-3 my-2 rounded-xl border border-gray-200 dark:border-white/10 bg-transparent hover:bg-gray-50 dark:hover:bg-white/[0.03] transition-colors cursor-pointer no-underline group",children:[e.jsx("div",{className:"w-11 h-11 rounded-lg flex items-center justify-center shrink-0",children:e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",className:v.color,children:[e.jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),e.jsx("polyline",{points:"14 2 14 8 20 8"})]})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("div",{className:"text-sm font-medium text-gray-800 dark:text-gray-200 truncate",children:g}),e.jsx("div",{className:"text-[11px] text-gray-500 dark:text-gray-400",children:v.label})]}),e.jsxs("div",{className:`flex items-center gap-1.5 px-3 py-1.5 rounded-lg border border-gray-200 dark:border-white/10 group-hover:bg-gray-100 dark:group-hover:bg-white/5 transition-colors shrink-0 ${v.color}`,children:[e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),e.jsx("polyline",{points:"7 10 12 15 17 10"}),e.jsx("line",{x1:"12",y1:"15",x2:"12",y2:"3"})]}),e.jsx("span",{className:"text-xs font-medium",children:"Download"})]})]},x++));continue}if(/^[-*_]{3,}$/.test(d)){a.push(e.jsx("hr",{className:"border-white/5 my-3"},x++));continue}if(d.startsWith("#### ")){a.push(e.jsx("h5",{className:"text-[13px] font-semibold text-gray-200 mt-2.5 mb-1",children:f(d.slice(5))},x++));continue}if(d.startsWith("### ")){a.push(e.jsx("h4",{className:"text-sm font-semibold text-gray-200 mt-3 mb-1",children:f(d.slice(4))},x++));continue}if(d.startsWith("## ")){a.push(e.jsx("h3",{className:"text-base font-semibold text-gray-100 mt-4 mb-1",children:f(d.slice(3))},x++));continue}if(d.startsWith("# ")){a.push(e.jsx("h2",{className:"text-lg font-bold text-gray-100 mt-4 mb-1.5",children:f(d.slice(2))},x++));continue}const R=d.match(/^(\d+)\.\s+(.+)/);if(R){a.push(e.jsxs("div",{className:"flex gap-2 text-sm text-gray-300 leading-relaxed ml-2",children:[e.jsxs("span",{className:"text-gray-500 flex-shrink-0 w-4 text-right",children:[R[1],"."]}),e.jsx("span",{children:f(R[2])})]},x++));continue}if(d.startsWith("- ")||d.startsWith("* ")){a.push(e.jsxs("div",{className:"flex gap-2 text-sm text-gray-300 leading-relaxed ml-2",children:[e.jsx("span",{className:"text-gray-500 flex-shrink-0",children:"•"}),e.jsx("span",{children:f(d.slice(2))})]},x++));continue}if(d.startsWith("**")){a.push(e.jsx("p",{className:"text-sm text-gray-200 mt-2",children:f(d)},x++));continue}a.push(e.jsx("p",{className:"text-sm text-gray-300 leading-relaxed",children:f(d)},x++))}return c&&N(!0),L(),e.jsx("div",{className:"space-y-0.5",children:a})});function _e({headers:t,rows:s,alignNumbers:i=!1}){const n=t?t.findIndex(Te):-1,l=o=>o===n?" text-center w-px whitespace-nowrap":"",r=o=>i&&/^[-+]?[\d,]+(\.\d+)?\s*(%|ms|s)?$/.test(o.trim());return e.jsx("div",{className:"my-2.5 rounded-[10px] border border-gray-200 dark:border-[#2c2d36] overflow-hidden","data-testid":"ai-table",children:e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full border-collapse text-[13px] text-gray-700 dark:text-gray-300 tabular-nums",children:[t&&e.jsx("thead",{children:e.jsx("tr",{children:t.map((o,a)=>e.jsx("th",{className:`bg-[#f7f8fa] dark:bg-[#22232a] border-b border-gray-200 dark:border-[#2c2d36] px-3.5 py-[9px] text-left text-[11.5px] font-semibold uppercase tracking-[0.05em] text-gray-500 dark:text-gray-400 whitespace-nowrap${l(a)}`,children:f(o,!0)},a))})}),e.jsxs("tbody",{children:[s.map((o,a)=>e.jsx("tr",{className:"group/row",children:o.map((c,p)=>{var b;return e.jsx("td",{className:`px-3.5 py-2.5 align-middle border-b border-[#eef0f3] dark:border-[#25262d] group-last/row:border-b-0 group-hover/row:bg-[#f5f7fa] dark:group-hover/row:bg-[#23242b]${p===0?" font-medium text-gray-800 dark:text-gray-200":""}${(b=G(c))!=null&&b.rest?" min-w-[13rem]":Ie(c)}${l(p)}${r(c)?" text-right":""}`,children:Ae(c)},p)})},a)),s.length===0&&e.jsx("tr",{children:e.jsx("td",{colSpan:Math.max(1,(t==null?void 0:t.length)??1),className:"px-3.5 py-6 text-center text-gray-400 dark:text-gray-500",children:"No rows"})})]})]})})})}const P=/\[\[cite\|[^\]]*\]\]/g;function Ie(t){const s=t.replace(P,"").replace(/[`*]/g,"").trim().length;return s<=18?" whitespace-nowrap":s>40?" min-w-[16rem]":""}const Le=/^(passed|pass|failed|fail|error|skipped|blocked|flaky|open|in progress|resolved|closed|fixed|rejected)(\s*\((?:error|fixed)\))?(?:\s*[—–-]\s+([\s\S]+))?$/i,Se={passed:"ok",pass:"ok",resolved:"ok",closed:"ok",fixed:"ok",failed:"bad",fail:"bad",error:"bad",blocked:"bad",open:"bad",skipped:"warn",flaky:"warn","in progress":"warn",rejected:"neutral"},Re={bad:"text-red-700 bg-red-50 dark:text-red-400 dark:bg-red-500/[0.12]",ok:"text-emerald-700 bg-emerald-50 dark:text-emerald-400 dark:bg-emerald-500/[0.12]",warn:"text-amber-700 bg-amber-50 dark:text-amber-400 dark:bg-amber-500/[0.12]",neutral:"text-gray-600 bg-gray-100 dark:text-gray-300 dark:bg-white/[0.08]"};function G(t){const s=Le.exec(t.replace(P,"").trim());return s?{label:`${s[1]}${s[2]??""}`.trim(),tone:Se[s[1].toLowerCase()]??"neutral",rest:(s[3]??"").trim()}:null}function Te(t){return/^sources?$/i.test((t??"").replace(/\*/g,"").trim())}function q(t){const s=t.split(/\s→\s/);return s.length===1?f(t,!0):s.map((i,n)=>e.jsxs("span",{children:[n>0&&e.jsx("span",{className:"px-1 text-[#9ca3af] dark:text-gray-500",children:"→"}),f(i,!0)]},n))}function Ae(t){const s=G(t);if(!s)return q(t);const i=(t.match(P)??[]).join(" ");return e.jsxs(e.Fragment,{children:[e.jsxs("span",{className:`inline-flex items-center gap-[5px] rounded-full px-2 py-0.5 text-[11.5px] font-semibold whitespace-nowrap ${Re[s.tone]}`,children:[e.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-current","aria-hidden":"true"}),s.label]}),i&&e.jsxs(e.Fragment,{children:[" ",f(i,!0)]}),s.rest&&e.jsx("span",{className:"mt-[3px] block text-[12px] text-gray-500 dark:text-gray-400",children:q(s.rest)})]})}function f(t,s=!1){const i=t.split(/(\*\*[^*]+\*\*|`[^`]+`|\[\[cite\|[^\]]*\]\]|\*[^\s*][^*\n]*[^\s*]\*|\*[^\s*]\*)/g);return i.length===1?t:e.jsx(e.Fragment,{children:i.map((n,l)=>{if(n.startsWith("[[cite|")){const r=/^\[\[cite\|([^|\]]*)\|([^|\]]*)\|([^|\]]*)(?:\|([^\]]*))?\]\]$/.exec(n);return r?e.jsx(we,{tier:r[1]||"",refId:(r[2]||"").trim(),detail:(r[3]||"").trim(),kind:(r[4]||"").trim()||void 0},l):null}return n.startsWith("**")&&n.endsWith("**")?e.jsx("strong",{className:"font-semibold text-gray-200",children:f(n.slice(2,-2),s)},l):n.startsWith("`[[cite|")&&n.endsWith("]]`")?e.jsx("span",{children:f(n.slice(1,-1),s)},l):n.startsWith("`")&&n.endsWith("`")?e.jsx("code",{className:s?"bg-gray-100 text-gray-700 dark:bg-white/[0.08] dark:text-gray-200 px-[5px] py-px rounded text-[0.86em] font-mono whitespace-nowrap":"bg-white/5 text-amber-300 px-1 py-0.5 rounded text-xs font-mono",children:n.slice(1,-1)},l):n.length>2&&n.startsWith("*")&&n.endsWith("*")?e.jsx("em",{className:"italic",children:f(n.slice(1,-1),s)},l):e.jsx("span",{children:n},l)})})}function Ve({state:t,panelRef:s,label:i,icon:n,emptyMessage:l}){const r=h.useRef(null),o=s??r,a=h.useRef(null),c=h.useRef(!0);h.useEffect(()=>{const m=o.current;if(!m)return;const x=()=>{const N=m.scrollHeight-m.scrollTop-m.clientHeight<32;c.current=N};return m.addEventListener("scroll",x,{passive:!0}),()=>m.removeEventListener("scroll",x)},[o]);const p=h.useRef(!0);h.useEffect(()=>{const m=()=>{const x=document.scrollingElement||document.documentElement;if(!x)return;const N=x.scrollHeight-x.scrollTop-x.clientHeight<120;p.current=N};return window.addEventListener("scroll",m,{passive:!0}),()=>window.removeEventListener("scroll",m)},[]),h.useEffect(()=>{const m=o.current,x=requestAnimationFrame(()=>{m&&c.current&&(m.scrollTop=m.scrollHeight),p.current&&a.current&&a.current.scrollIntoView({block:"end",behavior:"smooth"})});return()=>cancelAnimationFrame(x)},[t.content,t.toolEvents.length,t.status,o]);const b=(()=>{if(t.status!=="streaming"||t.content)return null;const m=t.toolEvents.filter(I=>I.phase==="start");if(m.length===0)return null;const x=m[m.length-1];return{read_file:"Reading file",write_file:"Writing file",edit_file:"Editing file",find_replace:"Editing file",run_command:"Running command",run_tests:"Running tests",glob_search:"Searching files",grep:"Searching code",create_directory:"Creating directory",list_directory:"Listing directory",browser_launch:"Launching browser",browser_navigate:"Navigating",browser_click:"Clicking element",browser_type:"Typing text",browser_inspect:"Inspecting page",browser_screenshot:"Taking screenshot",browser_get_text:"Reading page text"}[x.toolName]||`Running ${x.toolName}`})();return e.jsxs(e.Fragment,{children:[t.toolEvents.length>0&&e.jsx(Ee,{events:t.toolEvents,label:i==="AI Fix"?"Analysis Activity":"Implementation Activity"}),e.jsxs("div",{ref:o,className:"bg-surface-1 rounded-lg border border-white/5 p-4 max-h-[600px] overflow-y-auto",children:[t.status==="error"&&e.jsxs("div",{className:"text-sm text-red-400",children:[e.jsxs("p",{children:["Failed: ",t.error]}),e.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"If this mentions your AI provider or connection, check Settings → LLM and verify the provider is connected."})]}),t.content?e.jsx(Y,{text:t.content}):t.status==="streaming"?e.jsxs("div",{className:"flex items-center gap-2 text-sm text-gray-400",children:[e.jsx("div",{className:"w-4 h-4 border-2 border-purple-400 border-t-transparent rounded-full animate-spin"}),e.jsxs("div",{children:[e.jsx("span",{children:t.statusMessage||b||l}),t.toolEvents.length>0&&!b&&e.jsxs("span",{className:"text-gray-600 ml-1",children:["(",t.toolEvents.length," tools executed)"]})]})]}):null,t.status==="streaming"&&t.content&&e.jsx("span",{className:"inline-block w-2 h-4 bg-purple-400 animate-pulse ml-0.5 align-text-bottom"})]}),e.jsx("div",{ref:a,"aria-hidden":"true"})]})}export{Y as A,Be as C,Ke as P,Ue as S,Ve as a,De as c,be as e,He as p,Oe as s,Fe as u};
|