@axiom-lattice/react-sdk 5.0.0 → 6.0.0
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/dist/{AgentDetailSideApp-TIU7UQZH.mjs → AgentDetailSideApp-QZPV7MNB.mjs} +6 -6
- package/dist/{AgentGovernanceWorkbench-CWFRVPS5.mjs → AgentGovernanceWorkbench-25C3AKQI.mjs} +7 -7
- package/dist/{MessageGraph-XRSLD6VY.mjs → MessageGraph-JX6Y3VFH.mjs} +2 -2
- package/dist/{ReactChart-IW27RELF.mjs → ReactChart-LYUXL5M6.mjs} +2 -2
- package/dist/{TasksSideApp-5UTBVBIW.mjs → TasksSideApp-TWDLVB4D.mjs} +3 -3
- package/dist/{TeamWorkspace-WZ7EHM3X.mjs → TeamWorkspace-FGFAUD5Z.mjs} +2 -2
- package/dist/{TopologyRuntimeView-77JCSNTK.mjs → TopologyRuntimeView-O3VL4A7R.mjs} +3 -3
- package/dist/{WorkflowAutomationView-AVGN2L6Y.mjs → WorkflowAutomationView-D4YMZLRJ.mjs} +5 -5
- package/dist/{chunk-NE5RWDYD.mjs → chunk-3ZEMSWAC.mjs} +2 -2
- package/dist/{chunk-MFFUZVR5.mjs → chunk-466FV4VM.mjs} +2 -2
- package/dist/{chunk-CLCJX35D.mjs → chunk-6BWBE7MR.mjs} +6 -6
- package/dist/{chunk-QLFWQ4HR.mjs → chunk-7JDWJZ5M.mjs} +11 -11
- package/dist/{chunk-VQT22AKU.mjs → chunk-JJIGSAPR.mjs} +127 -220
- package/dist/chunk-JJIGSAPR.mjs.map +1 -0
- package/dist/{chunk-GJTDVFBS.mjs → chunk-QABSNIMF.mjs} +2 -2
- package/dist/{chunk-VLQM75ZM.mjs → chunk-UZWBRDTU.mjs} +4 -4
- package/dist/{embed-page-AgentDetailSideApp-XCP4LY7Y.js → embed-page-AgentDetailSideApp-JYVZKSUU.js} +1 -1
- package/dist/embed-page-AgentGovernanceWorkbench-SD2EHW2B.js +1 -0
- package/dist/{embed-page-MessageGraph-D77CYFAG.js → embed-page-MessageGraph-GLQXKAVC.js} +1 -1
- package/dist/{embed-page-ReactChart-TBDJOTZ5.js → embed-page-ReactChart-74MHCE2K.js} +1 -1
- package/dist/{embed-page-TasksSideApp-BVCIAE24.js → embed-page-TasksSideApp-DA4LUTMD.js} +1 -1
- package/dist/{embed-page-TeamWorkspace-JFEKNVFP.js → embed-page-TeamWorkspace-DUB3L6V6.js} +1 -1
- package/dist/{embed-page-TopologyRuntimeView-42TN76MK.js → embed-page-TopologyRuntimeView-NFBHAICN.js} +1 -1
- package/dist/{embed-page-WorkflowAutomationView-JLP4UHPP.js → embed-page-WorkflowAutomationView-43YGTXGF.js} +1 -1
- package/dist/{embed-page-chunk-K2U3JD67.js → embed-page-chunk-BVSC3MSO.js} +1 -1
- package/dist/{embed-page-chunk-5NJ3O2GK.js → embed-page-chunk-C4ZV4IXK.js} +2 -2
- package/dist/{embed-page-chunk-I3OONX3N.js → embed-page-chunk-DWIBLGBW.js} +1 -1
- package/dist/{embed-page-chunk-H64UEFHS.js → embed-page-chunk-GKHIPXZ2.js} +1 -1
- package/dist/{embed-page-chunk-YYDZ6ZBV.js → embed-page-chunk-P477ZTUO.js} +5 -5
- package/dist/{embed-page-chunk-GUSAII2D.js → embed-page-chunk-UHH575CK.js} +1 -1
- package/dist/embed-page.js +1 -1
- package/dist/index.d.mts +17 -20
- package/dist/index.d.ts +17 -20
- package/dist/index.js +467 -694
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +89 -219
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-VQT22AKU.mjs.map +0 -1
- package/dist/embed-page-AgentGovernanceWorkbench-BBDKEIBI.js +0 -5
- /package/dist/{AgentDetailSideApp-TIU7UQZH.mjs.map → AgentDetailSideApp-QZPV7MNB.mjs.map} +0 -0
- /package/dist/{AgentGovernanceWorkbench-CWFRVPS5.mjs.map → AgentGovernanceWorkbench-25C3AKQI.mjs.map} +0 -0
- /package/dist/{MessageGraph-XRSLD6VY.mjs.map → MessageGraph-JX6Y3VFH.mjs.map} +0 -0
- /package/dist/{ReactChart-IW27RELF.mjs.map → ReactChart-LYUXL5M6.mjs.map} +0 -0
- /package/dist/{TasksSideApp-5UTBVBIW.mjs.map → TasksSideApp-TWDLVB4D.mjs.map} +0 -0
- /package/dist/{TeamWorkspace-WZ7EHM3X.mjs.map → TeamWorkspace-FGFAUD5Z.mjs.map} +0 -0
- /package/dist/{TopologyRuntimeView-77JCSNTK.mjs.map → TopologyRuntimeView-O3VL4A7R.mjs.map} +0 -0
- /package/dist/{WorkflowAutomationView-AVGN2L6Y.mjs.map → WorkflowAutomationView-D4YMZLRJ.mjs.map} +0 -0
- /package/dist/{chunk-NE5RWDYD.mjs.map → chunk-3ZEMSWAC.mjs.map} +0 -0
- /package/dist/{chunk-MFFUZVR5.mjs.map → chunk-466FV4VM.mjs.map} +0 -0
- /package/dist/{chunk-CLCJX35D.mjs.map → chunk-6BWBE7MR.mjs.map} +0 -0
- /package/dist/{chunk-QLFWQ4HR.mjs.map → chunk-7JDWJZ5M.mjs.map} +0 -0
- /package/dist/{chunk-GJTDVFBS.mjs.map → chunk-QABSNIMF.mjs.map} +0 -0
- /package/dist/{chunk-VLQM75ZM.mjs.map → chunk-UZWBRDTU.mjs.map} +0 -0
|
@@ -4367,7 +4367,7 @@ ${ie}`.trim()),it.success(c("common.copied"))},[c]),ne=(0,ra.useCallback)(async
|
|
|
4367
4367
|
display: flex;
|
|
4368
4368
|
align-items: center;
|
|
4369
4369
|
gap: 16px;
|
|
4370
|
-
`})),vz={running:{color:"processing",labelKey:"eval.status.running"},completed:{color:"success",labelKey:"eval.status.completed"},failed:{color:"error",labelKey:"eval.status.failed"},aborted:{color:"warning",labelKey:"eval.status.aborted"}},Lw=({initial:e})=>{let t=re(),{styles:r,cx:o}=xz(),{token:a}=zr.useToken(),{projects:n}=t4(),[i,s]=(0,hi.useState)(e?.projectId??""),[l,c]=(0,hi.useState)(e?.page??"dashboard"),[u,f]=(0,hi.useState)(e?.suiteId??""),[m,d]=(0,hi.useState)(e?.runId??"");hi.default.useEffect(()=>{!i&&n.length>0&&s(n[0].id)},[n,i]);let{suites:x}=Il(i),{runs:h,start:g,remove:v}=Hu(i),{workspaceId:C,projectId:b}=Jr(),[T,R]=(0,hi.useState)(!1),[z,F]=(0,hi.useState)(null),E=_=>({workspaceId:C||void 0,projectId:_||b||void 0}),U=()=>R(!0),D=(0,hi.useMemo)(()=>{let _=x.reduce(($,Y)=>$+(Y.caseCount??0),0),j=h[0],H=j?.totalCases>0?Math.round(j.passedCases/j.totalCases*100):null;return{totalCases:_,passRate:H,suiteCount:x.length,runCount:h.length}},[x,h]),L=(_,j,H)=>{c(_),j!==void 0&&f(j),H!==void 0&&d(H)};hi.default.useEffect(()=>{e&&(e.projectId!==void 0&&s(e.projectId),e.page!==void 0&&c(e.page),e.suiteId!==void 0&&f(e.suiteId),e.runId!==void 0&&d(e.runId))},[e?.projectId,e?.page,e?.suiteId,e?.runId]);let S=l==="suite"&&!u||l==="run"&&!m?"dashboard":l,P=({icon:_,bg:j,label:H,value:$})=>(0,Ze.jsx)(Er,{className:r.statCard,styles:{body:{padding:0}},size:"small",children:(0,Ze.jsxs)("div",{className:r.statInner,children:[(0,Ze.jsx)("div",{className:r.statIcon,style:{background:j},children:_}),(0,Ze.jsxs)("div",{children:[(0,Ze.jsx)("div",{className:r.statValue,children:$}),(0,Ze.jsx)("div",{className:r.statLabel,children:H})]})]})});if(S==="dashboard")return(0,Ze.jsxs)("div",{className:r.shell,children:[(0,Ze.jsxs)("div",{className:r.topBar,children:[(0,Ze.jsxs)("div",{className:r.topLeft,children:[(0,Ze.jsx)("div",{className:r.pageIcon,children:(0,Ze.jsx)(On,{size:20,color:a.colorPrimary})}),(0,Ze.jsx)("span",{className:r.pageTitle,children:t("eval.dashboard.title")})]}),(0,Ze.jsxs)("div",{className:r.topRight,children:[(0,Ze.jsx)(ya,{menu:{items:n.map(_=>({key:_.id,label:(0,Ze.jsxs)("div",{children:[(0,Ze.jsx)("div",{children:_.name}),(0,Ze.jsx)(gs,{type:"secondary",style:{fontSize:11},children:_.targetServerConfig?.base_url||"\u2014"})]}),onClick:()=>s(_.id)}))},children:(0,Ze.jsxs)("div",{className:r.projectBtn,children:[(0,Ze.jsx)("div",{className:r.projectDot}),(0,Ze.jsxs)("div",{style:{textAlign:"left"},children:[(0,Ze.jsx)("div",{style:{lineHeight:1.3},children:n.find(_=>_.id===i)?.name||t("eval.dashboard.selectProject")}),(0,Ze.jsx)(gs,{type:"secondary",style:{fontSize:11},children:n.find(_=>_.id===i)?.targetServerConfig?.base_url||""})]}),(0,Ze.jsx)(Pi,{size:14})]})}),(0,Ze.jsx)(he,{type:"primary",icon:(0,Ze.jsx)(Ns,{size:16}),onClick:()=>L("suites"),children:t("eval.dashboard.goToSuites")})]})]}),(0,Ze.jsxs)("div",{className:r.body,children:[(0,Ze.jsxs)(ou,{gutter:[16,16],className:r.statRow,children:[(0,Ze.jsx)(cl,{span:6,children:(0,Ze.jsx)(P,{icon:(0,Ze.jsx)(On,{size:22,color:a.colorPrimary}),bg:`${a.colorPrimary}14`,label:t("eval.suites.title"),value:D.suiteCount})}),(0,Ze.jsx)(cl,{span:6,children:(0,Ze.jsx)(P,{icon:(0,Ze.jsx)(Mi,{size:22,color:a.colorSuccess}),bg:`${a.colorSuccess}14`,label:t("eval.cases.title"),value:D.totalCases})}),(0,Ze.jsx)(cl,{span:6,children:(0,Ze.jsx)(P,{icon:(0,Ze.jsx)(pf,{size:22,color:a.colorInfo}),bg:`${a.colorInfo}14`,label:t("eval.dashboard.totalRuns"),value:D.runCount})}),(0,Ze.jsx)(cl,{span:6,children:(0,Ze.jsx)(P,{icon:D.passRate!==null&&D.passRate>=80?(0,Ze.jsx)(li,{size:22,color:a.colorSuccess}):(0,Ze.jsx)(ls,{size:22,color:a.colorWarning}),bg:D.passRate!==null?`${a.colorSuccess}14`:`${a.colorFill}`,label:t("eval.dashboard.latestPassRate"),value:D.passRate!==null?`${D.passRate}%`:t("eval.dashboard.notAvailable")})})]}),(0,Ze.jsxs)("div",{className:r.section,children:[(0,Ze.jsxs)("div",{className:r.sectionHead,children:[(0,Ze.jsxs)("h3",{className:r.sectionTitle,children:[(0,Ze.jsx)(On,{size:16}),t("eval.dashboard.suitesSection")]}),(0,Ze.jsxs)(he,{size:"small",type:"text",onClick:()=>L("suites"),children:[t("eval.dashboard.viewAll")," ",(0,Ze.jsx)(Jm,{size:14,style:{marginLeft:4}})]})]}),(0,Ze.jsx)(Tw,{projectId:i,onSelectSuite:(_,j)=>L("suite",j)})]}),(0,Ze.jsxs)("div",{className:r.section,children:[(0,Ze.jsx)("div",{className:r.sectionHead,children:(0,Ze.jsxs)("h3",{className:r.sectionTitle,children:[(0,Ze.jsx)(pf,{size:16}),t("eval.recentRuns.title")]})}),(0,Ze.jsx)(Er,{styles:{body:{padding:0}},size:"small",children:h.length===0?(0,Ze.jsx)("div",{style:{padding:40,textAlign:"center"},children:(0,Ze.jsx)(gs,{type:"secondary",children:t("eval.dashboard.noRuns")})}):h.slice(0,5).map(_=>{let j=vz[_.status],H=_.createdAt?new Date(_.createdAt):null,$=_.completedAt?new Date(_.completedAt):null,Y=H&&$?$.getTime()-H.getTime():null,G=_.totalCases>0?Math.round(_.passedCases/_.totalCases*100):null,ne=B=>{let Q=J=>String(J).padStart(2,"0");return`${B.getFullYear()}-${Q(B.getMonth()+1)}-${Q(B.getDate())} ${Q(B.getHours())}:${Q(B.getMinutes())}`},N=B=>B<1e3?`${B}ms`:B<6e4?`${(B/1e3).toFixed(1)}s`:`${Math.floor(B/6e4)}m ${Math.round(B%6e4/1e3)}s`,O=_.id?.slice(0,8);return(0,Ze.jsxs)("div",{className:r.runRow,onClick:()=>L("run",void 0,_.id),children:[(0,Ze.jsxs)("div",{className:r.runRowLeft,children:[(0,Ze.jsx)(gs,{code:!0,style:{fontSize:12,marginRight:8},children:O}),H&&(0,Ze.jsxs)(gs,{type:"secondary",style:{fontSize:12,minWidth:120},children:[(0,Ze.jsx)(fu,{size:11,style:{marginRight:3,verticalAlign:"middle"}}),ne(H)]}),(0,Ze.jsxs)(gs,{style:{fontSize:13},children:[(0,Ze.jsx)(gs,{type:"success",children:_.passedCases}),(0,Ze.jsxs)(gs,{type:"secondary",children:[" ",t("eval.run.passed")," "]}),(0,Ze.jsx)(gs,{type:"danger",children:_.failedCases}),(0,Ze.jsxs)(gs,{type:"secondary",children:[" ",t("eval.run.failed")]})]}),G!==null&&(0,Ze.jsxs)(Pt,{color:G>=80?"success":G>=50?"warning":"error",children:[G,"%"]}),_.envProjectId&&(0,Ze.jsx)(Pt,{icon:(0,Ze.jsx)(gu,{size:11}),color:"blue",style:{marginRight:0},children:_.envProjectId})]}),(0,Ze.jsxs)("div",{className:r.runRowRight,style:{gap:16},children:[Y!==null&&(0,Ze.jsx)(gs,{type:"secondary",style:{fontSize:12},children:N(Y)}),(0,Ze.jsx)(Pt,{color:j?.color??"default",style:{margin:0},children:j?t(j.labelKey):_.status}),(0,Ze.jsx)(gs,{strong:!0,style:{fontSize:15,minWidth:40,textAlign:"right"},children:typeof _.avgScore=="number"?_.avgScore.toFixed(1):"\u2014"}),(0,Ze.jsx)(Bn,{title:t("eval.run.deleteTitle"),description:t("eval.run.deleteDescription"),onConfirm:async B=>{B?.stopPropagation(),await v(_.id),it.success(t("eval.run.deleted"))},onCancel:B=>B?.stopPropagation(),okText:t("common.delete"),okButtonProps:{danger:!0},children:(0,Ze.jsx)(he,{type:"text",size:"small",danger:!0,icon:(0,Ze.jsx)($n,{size:14}),onClick:B=>B.stopPropagation()})})]})]},_.id)})})]})]})]});let A=()=>{let[_,j]=(0,hi.useState)(!1),[H,$]=(0,hi.useState)(""),{create:Y}=Il(i),G=async()=>{H.trim()&&(await Y(i,{name:H.trim()}),$(""),j(!1))};return(0,Ze.jsxs)("div",{className:r.shell,children:[(0,Ze.jsxs)("div",{className:r.topBar,children:[(0,Ze.jsxs)("div",{className:r.topLeft,children:[(0,Ze.jsx)("button",{className:r.breadcrumb,onClick:()=>L("dashboard"),children:t("eval.dashboard.breadcrumb")}),(0,Ze.jsx)("span",{className:r.breadcrumbSep,children:"/"}),(0,Ze.jsx)("span",{className:r.pageTitle,children:t("eval.suites.title")})]}),(0,Ze.jsxs)("div",{className:r.topRight,children:[(0,Ze.jsx)(he,{icon:(0,Ze.jsx)(Ns,{size:16}),onClick:()=>j(!_),children:t("eval.suite.newSuite")}),(0,Ze.jsx)(he,{type:"primary",icon:(0,Ze.jsx)(Ns,{size:16}),onClick:U,children:t("eval.suite.runAll")})]})]}),_&&(0,Ze.jsxs)("div",{style:{padding:"12px 28px",borderBottom:`1px solid ${a.colorBorderSecondary}`,display:"flex",gap:8},children:[(0,Ze.jsx)("input",{type:"text",placeholder:t("eval.suite.namePlaceholder"),value:H,onChange:ne=>$(ne.target.value),onKeyDown:ne=>ne.key==="Enter"&&G(),autoFocus:!0,style:{width:260,padding:"6px 12px",border:`1px solid ${a.colorBorder}`,borderRadius:a.borderRadius,fontSize:14,outline:"none"}}),(0,Ze.jsx)(he,{type:"primary",size:"small",onClick:G,children:t("common.create")}),(0,Ze.jsx)(he,{size:"small",onClick:()=>j(!1),children:t("common.cancel")})]}),(0,Ze.jsx)("div",{className:r.body,children:(0,Ze.jsx)(Tw,{projectId:i,onSelectSuite:(ne,N)=>L("suite",N)})}),(0,Ze.jsx)(x0,{open:T,onClose:()=>R(!1),onRun:async ne=>{let N=await g(i,ne);N?.run_id&&L("run",void 0,N.run_id)}})]})};return S==="suites"?(0,Ze.jsx)(A,{}):S==="suite"&&u?(0,Ze.jsx)(ZA,{projectId:i,suiteId:u,onBack:()=>L("suites"),onRun:_=>L("run",void 0,_)}):S==="run"&&m?(0,Ze.jsx)(e4,{runId:m,onBack:()=>L("dashboard")}):null};var S0=I(le());var C0=I(le());var r4=I(le());var o4=I(V()),{Text:Lbe}=Ce;var a4=I(V()),{Text:Obe}=Ce;var Pw=I(le());var Aw=I(V()),{Text:Kbe,Paragraph:Xbe}=Ce;var Mw=I(V()),{Text:s2e}=Ce;var Nw=I(le());var n4=I(V()),{Text:f2e}=Ce;var Ew=I(le());var k0=I(le());var i4=I(le());var s4=I(V()),{Text:S2e}=Ce;var Fw=I(V()),{Text:F2e}=Ce;var $0=I(le());var T0=I(V()),bz=({defaultWorkspaceId:e,defaultProjectId:t,children:r})=>{let o=Zt("__GLOBAL__");return(0,T0.jsx)(ob,{workspaceId:e,projectId:t,client:o,children:r})},I0=({children:e,defaultProjectId:t,defaultWorkspaceId:r})=>{let{config:{baseURL:o}}=Et();return(0,T0.jsx)(US,{config:{baseURL:o,apiKey:"",assistantId:"__GLOBAL__",transport:"sse"},children:(0,T0.jsx)(bz,{defaultWorkspaceId:r,defaultProjectId:t,children:e})})},z2e=I0;var _w=I(V()),Bw=()=>{let{toolsVisible:e,toggleTools:t}=Ir(),r=re();return(0,_w.jsx)(qf,{ariaLabel:r("chat.file.toggleDirectory"),icon:(0,_w.jsx)(Ai,{size:16}),onClick:t,pressed:e})};var R0=I(le());var Xf=I(V()),wz=(0,R0.lazy)(()=>import("./embed-page-TasksSideApp-BVCIAE24.js").then(e=>({default:e.TasksSideApp}))),Dw=()=>{let{openSideApp:e,sideAppVisible:t,sideAppSelectedCard:r}=Ir(),o=re(),a=t&&r?.component_key==="tasks_side_app_pin",n=()=>{a||e({component_key:"tasks_side_app_pin",message:o("tasks.title"),data:{component:(0,Xf.jsx)(R0.Suspense,{fallback:(0,Xf.jsx)(Ct,{style:{display:"block",margin:"auto"}}),children:(0,Xf.jsx)(wz,{showProjectFilter:!1})})}})};return(0,Xf.jsx)(qf,{ariaLabel:o("tasks.button.open"),icon:(0,Xf.jsx)(ml,{size:16}),onClick:n})};var L0=I(le());var Wa=I(le());var bn=I(V()),{ErrorBoundary:Cz}=po,Sz=({message:e,renderContent:t,autoLoadRightPanel:r})=>{let o=(0,Wa.useRef)(null),[a,n]=(0,Wa.useState)(!1),[i,s]=(0,Wa.useState)(!1);return(0,Wa.useEffect)(()=>{let c=new IntersectionObserver(([u])=>{let f=u.isIntersecting;n(f),f&&!i&&s(!0)},{threshold:.1});return o.current&&c.observe(o.current),()=>{o.current&&c.unobserve(o.current)}},[i]),(0,Wa.useEffect)(()=>{r?.()},[]),(0,bn.jsx)(Cz,{children:(0,bn.jsx)("div",{ref:o,style:{width:"100%"},children:a||i?t(e):(()=>{let c=(e.tool_calls?.length??0)*140,u=e.content?Math.min(100,e.content.length/5)+c:100+c;return(0,bn.jsx)("div",{style:{height:`${u}px`,minHeight:"50px"}})})()})})},l4=(0,Wa.memo)(({items:e,role:t,className:r})=>(0,bn.jsx)(t0.List,{autoScroll:!0,items:e,role:t,className:r},"messages"));l4.displayName="MemoizedBubbleList";var c4=({messages:e,className:t,isLoading:r=!1})=>{let{styles:o}=id(),a=qt(),n=(0,Wa.useDeferredValue)(e),i=r?n:e,s=(0,Wa.useRef)(i?.length??0);(0,Wa.useEffect)(()=>{i?.length&&(s.current=i?.length)},[i?.length]);let l=(0,Wa.useCallback)(f=>{let{content:m}=f;try{let h=JSON.parse(m);if(h.action&&h.message)return(0,bn.jsx)(Qt,{content:h.message})}catch{}let d=f.tool_calls?.map(h=>{try{return`\`\`\`tool_call
|
|
4370
|
+
`})),vz={running:{color:"processing",labelKey:"eval.status.running"},completed:{color:"success",labelKey:"eval.status.completed"},failed:{color:"error",labelKey:"eval.status.failed"},aborted:{color:"warning",labelKey:"eval.status.aborted"}},Lw=({initial:e})=>{let t=re(),{styles:r,cx:o}=xz(),{token:a}=zr.useToken(),{projects:n}=t4(),[i,s]=(0,hi.useState)(e?.projectId??""),[l,c]=(0,hi.useState)(e?.page??"dashboard"),[u,f]=(0,hi.useState)(e?.suiteId??""),[m,d]=(0,hi.useState)(e?.runId??"");hi.default.useEffect(()=>{!i&&n.length>0&&s(n[0].id)},[n,i]);let{suites:x}=Il(i),{runs:h,start:g,remove:v}=Hu(i),{workspaceId:C,projectId:b}=Jr(),[T,R]=(0,hi.useState)(!1),[z,F]=(0,hi.useState)(null),E=_=>({workspaceId:C||void 0,projectId:_||b||void 0}),U=()=>R(!0),D=(0,hi.useMemo)(()=>{let _=x.reduce(($,Y)=>$+(Y.caseCount??0),0),j=h[0],H=j?.totalCases>0?Math.round(j.passedCases/j.totalCases*100):null;return{totalCases:_,passRate:H,suiteCount:x.length,runCount:h.length}},[x,h]),L=(_,j,H)=>{c(_),j!==void 0&&f(j),H!==void 0&&d(H)};hi.default.useEffect(()=>{e&&(e.projectId!==void 0&&s(e.projectId),e.page!==void 0&&c(e.page),e.suiteId!==void 0&&f(e.suiteId),e.runId!==void 0&&d(e.runId))},[e?.projectId,e?.page,e?.suiteId,e?.runId]);let S=l==="suite"&&!u||l==="run"&&!m?"dashboard":l,P=({icon:_,bg:j,label:H,value:$})=>(0,Ze.jsx)(Er,{className:r.statCard,styles:{body:{padding:0}},size:"small",children:(0,Ze.jsxs)("div",{className:r.statInner,children:[(0,Ze.jsx)("div",{className:r.statIcon,style:{background:j},children:_}),(0,Ze.jsxs)("div",{children:[(0,Ze.jsx)("div",{className:r.statValue,children:$}),(0,Ze.jsx)("div",{className:r.statLabel,children:H})]})]})});if(S==="dashboard")return(0,Ze.jsxs)("div",{className:r.shell,children:[(0,Ze.jsxs)("div",{className:r.topBar,children:[(0,Ze.jsxs)("div",{className:r.topLeft,children:[(0,Ze.jsx)("div",{className:r.pageIcon,children:(0,Ze.jsx)(On,{size:20,color:a.colorPrimary})}),(0,Ze.jsx)("span",{className:r.pageTitle,children:t("eval.dashboard.title")})]}),(0,Ze.jsxs)("div",{className:r.topRight,children:[(0,Ze.jsx)(ya,{menu:{items:n.map(_=>({key:_.id,label:(0,Ze.jsxs)("div",{children:[(0,Ze.jsx)("div",{children:_.name}),(0,Ze.jsx)(gs,{type:"secondary",style:{fontSize:11},children:_.targetServerConfig?.base_url||"\u2014"})]}),onClick:()=>s(_.id)}))},children:(0,Ze.jsxs)("div",{className:r.projectBtn,children:[(0,Ze.jsx)("div",{className:r.projectDot}),(0,Ze.jsxs)("div",{style:{textAlign:"left"},children:[(0,Ze.jsx)("div",{style:{lineHeight:1.3},children:n.find(_=>_.id===i)?.name||t("eval.dashboard.selectProject")}),(0,Ze.jsx)(gs,{type:"secondary",style:{fontSize:11},children:n.find(_=>_.id===i)?.targetServerConfig?.base_url||""})]}),(0,Ze.jsx)(Pi,{size:14})]})}),(0,Ze.jsx)(he,{type:"primary",icon:(0,Ze.jsx)(Ns,{size:16}),onClick:()=>L("suites"),children:t("eval.dashboard.goToSuites")})]})]}),(0,Ze.jsxs)("div",{className:r.body,children:[(0,Ze.jsxs)(ou,{gutter:[16,16],className:r.statRow,children:[(0,Ze.jsx)(cl,{span:6,children:(0,Ze.jsx)(P,{icon:(0,Ze.jsx)(On,{size:22,color:a.colorPrimary}),bg:`${a.colorPrimary}14`,label:t("eval.suites.title"),value:D.suiteCount})}),(0,Ze.jsx)(cl,{span:6,children:(0,Ze.jsx)(P,{icon:(0,Ze.jsx)(Mi,{size:22,color:a.colorSuccess}),bg:`${a.colorSuccess}14`,label:t("eval.cases.title"),value:D.totalCases})}),(0,Ze.jsx)(cl,{span:6,children:(0,Ze.jsx)(P,{icon:(0,Ze.jsx)(pf,{size:22,color:a.colorInfo}),bg:`${a.colorInfo}14`,label:t("eval.dashboard.totalRuns"),value:D.runCount})}),(0,Ze.jsx)(cl,{span:6,children:(0,Ze.jsx)(P,{icon:D.passRate!==null&&D.passRate>=80?(0,Ze.jsx)(li,{size:22,color:a.colorSuccess}):(0,Ze.jsx)(ls,{size:22,color:a.colorWarning}),bg:D.passRate!==null?`${a.colorSuccess}14`:`${a.colorFill}`,label:t("eval.dashboard.latestPassRate"),value:D.passRate!==null?`${D.passRate}%`:t("eval.dashboard.notAvailable")})})]}),(0,Ze.jsxs)("div",{className:r.section,children:[(0,Ze.jsxs)("div",{className:r.sectionHead,children:[(0,Ze.jsxs)("h3",{className:r.sectionTitle,children:[(0,Ze.jsx)(On,{size:16}),t("eval.dashboard.suitesSection")]}),(0,Ze.jsxs)(he,{size:"small",type:"text",onClick:()=>L("suites"),children:[t("eval.dashboard.viewAll")," ",(0,Ze.jsx)(Jm,{size:14,style:{marginLeft:4}})]})]}),(0,Ze.jsx)(Tw,{projectId:i,onSelectSuite:(_,j)=>L("suite",j)})]}),(0,Ze.jsxs)("div",{className:r.section,children:[(0,Ze.jsx)("div",{className:r.sectionHead,children:(0,Ze.jsxs)("h3",{className:r.sectionTitle,children:[(0,Ze.jsx)(pf,{size:16}),t("eval.recentRuns.title")]})}),(0,Ze.jsx)(Er,{styles:{body:{padding:0}},size:"small",children:h.length===0?(0,Ze.jsx)("div",{style:{padding:40,textAlign:"center"},children:(0,Ze.jsx)(gs,{type:"secondary",children:t("eval.dashboard.noRuns")})}):h.slice(0,5).map(_=>{let j=vz[_.status],H=_.createdAt?new Date(_.createdAt):null,$=_.completedAt?new Date(_.completedAt):null,Y=H&&$?$.getTime()-H.getTime():null,G=_.totalCases>0?Math.round(_.passedCases/_.totalCases*100):null,ne=B=>{let Q=J=>String(J).padStart(2,"0");return`${B.getFullYear()}-${Q(B.getMonth()+1)}-${Q(B.getDate())} ${Q(B.getHours())}:${Q(B.getMinutes())}`},N=B=>B<1e3?`${B}ms`:B<6e4?`${(B/1e3).toFixed(1)}s`:`${Math.floor(B/6e4)}m ${Math.round(B%6e4/1e3)}s`,O=_.id?.slice(0,8);return(0,Ze.jsxs)("div",{className:r.runRow,onClick:()=>L("run",void 0,_.id),children:[(0,Ze.jsxs)("div",{className:r.runRowLeft,children:[(0,Ze.jsx)(gs,{code:!0,style:{fontSize:12,marginRight:8},children:O}),H&&(0,Ze.jsxs)(gs,{type:"secondary",style:{fontSize:12,minWidth:120},children:[(0,Ze.jsx)(fu,{size:11,style:{marginRight:3,verticalAlign:"middle"}}),ne(H)]}),(0,Ze.jsxs)(gs,{style:{fontSize:13},children:[(0,Ze.jsx)(gs,{type:"success",children:_.passedCases}),(0,Ze.jsxs)(gs,{type:"secondary",children:[" ",t("eval.run.passed")," "]}),(0,Ze.jsx)(gs,{type:"danger",children:_.failedCases}),(0,Ze.jsxs)(gs,{type:"secondary",children:[" ",t("eval.run.failed")]})]}),G!==null&&(0,Ze.jsxs)(Pt,{color:G>=80?"success":G>=50?"warning":"error",children:[G,"%"]}),_.envProjectId&&(0,Ze.jsx)(Pt,{icon:(0,Ze.jsx)(gu,{size:11}),color:"blue",style:{marginRight:0},children:_.envProjectId})]}),(0,Ze.jsxs)("div",{className:r.runRowRight,style:{gap:16},children:[Y!==null&&(0,Ze.jsx)(gs,{type:"secondary",style:{fontSize:12},children:N(Y)}),(0,Ze.jsx)(Pt,{color:j?.color??"default",style:{margin:0},children:j?t(j.labelKey):_.status}),(0,Ze.jsx)(gs,{strong:!0,style:{fontSize:15,minWidth:40,textAlign:"right"},children:typeof _.avgScore=="number"?_.avgScore.toFixed(1):"\u2014"}),(0,Ze.jsx)(Bn,{title:t("eval.run.deleteTitle"),description:t("eval.run.deleteDescription"),onConfirm:async B=>{B?.stopPropagation(),await v(_.id),it.success(t("eval.run.deleted"))},onCancel:B=>B?.stopPropagation(),okText:t("common.delete"),okButtonProps:{danger:!0},children:(0,Ze.jsx)(he,{type:"text",size:"small",danger:!0,icon:(0,Ze.jsx)($n,{size:14}),onClick:B=>B.stopPropagation()})})]})]},_.id)})})]})]})]});let A=()=>{let[_,j]=(0,hi.useState)(!1),[H,$]=(0,hi.useState)(""),{create:Y}=Il(i),G=async()=>{H.trim()&&(await Y(i,{name:H.trim()}),$(""),j(!1))};return(0,Ze.jsxs)("div",{className:r.shell,children:[(0,Ze.jsxs)("div",{className:r.topBar,children:[(0,Ze.jsxs)("div",{className:r.topLeft,children:[(0,Ze.jsx)("button",{className:r.breadcrumb,onClick:()=>L("dashboard"),children:t("eval.dashboard.breadcrumb")}),(0,Ze.jsx)("span",{className:r.breadcrumbSep,children:"/"}),(0,Ze.jsx)("span",{className:r.pageTitle,children:t("eval.suites.title")})]}),(0,Ze.jsxs)("div",{className:r.topRight,children:[(0,Ze.jsx)(he,{icon:(0,Ze.jsx)(Ns,{size:16}),onClick:()=>j(!_),children:t("eval.suite.newSuite")}),(0,Ze.jsx)(he,{type:"primary",icon:(0,Ze.jsx)(Ns,{size:16}),onClick:U,children:t("eval.suite.runAll")})]})]}),_&&(0,Ze.jsxs)("div",{style:{padding:"12px 28px",borderBottom:`1px solid ${a.colorBorderSecondary}`,display:"flex",gap:8},children:[(0,Ze.jsx)("input",{type:"text",placeholder:t("eval.suite.namePlaceholder"),value:H,onChange:ne=>$(ne.target.value),onKeyDown:ne=>ne.key==="Enter"&&G(),autoFocus:!0,style:{width:260,padding:"6px 12px",border:`1px solid ${a.colorBorder}`,borderRadius:a.borderRadius,fontSize:14,outline:"none"}}),(0,Ze.jsx)(he,{type:"primary",size:"small",onClick:G,children:t("common.create")}),(0,Ze.jsx)(he,{size:"small",onClick:()=>j(!1),children:t("common.cancel")})]}),(0,Ze.jsx)("div",{className:r.body,children:(0,Ze.jsx)(Tw,{projectId:i,onSelectSuite:(ne,N)=>L("suite",N)})}),(0,Ze.jsx)(x0,{open:T,onClose:()=>R(!1),onRun:async ne=>{let N=await g(i,ne);N?.run_id&&L("run",void 0,N.run_id)}})]})};return S==="suites"?(0,Ze.jsx)(A,{}):S==="suite"&&u?(0,Ze.jsx)(ZA,{projectId:i,suiteId:u,onBack:()=>L("suites"),onRun:_=>L("run",void 0,_)}):S==="run"&&m?(0,Ze.jsx)(e4,{runId:m,onBack:()=>L("dashboard")}):null};var S0=I(le());var C0=I(le());var r4=I(le());var o4=I(V()),{Text:Lbe}=Ce;var a4=I(V()),{Text:Obe}=Ce;var Pw=I(le());var Aw=I(V()),{Text:Kbe,Paragraph:Xbe}=Ce;var Mw=I(V()),{Text:s2e}=Ce;var Nw=I(le());var n4=I(V()),{Text:f2e}=Ce;var Ew=I(le());var k0=I(le());var i4=I(le());var s4=I(V()),{Text:S2e}=Ce;var Fw=I(V()),{Text:F2e}=Ce;var $0=I(le());var T0=I(V()),bz=({defaultWorkspaceId:e,defaultProjectId:t,children:r})=>{let o=Zt("__GLOBAL__");return(0,T0.jsx)(ob,{workspaceId:e,projectId:t,client:o,children:r})},I0=({children:e,defaultProjectId:t,defaultWorkspaceId:r})=>{let{config:{baseURL:o}}=Et();return(0,T0.jsx)(US,{config:{baseURL:o,apiKey:"",assistantId:"__GLOBAL__",transport:"sse"},children:(0,T0.jsx)(bz,{defaultWorkspaceId:r,defaultProjectId:t,children:e})})},z2e=I0;var _w=I(V()),Bw=()=>{let{toolsVisible:e,toggleTools:t}=Ir(),r=re();return(0,_w.jsx)(qf,{ariaLabel:r("chat.file.toggleDirectory"),icon:(0,_w.jsx)(Ai,{size:16}),onClick:t,pressed:e})};var R0=I(le());var Xf=I(V()),wz=(0,R0.lazy)(()=>import("./embed-page-TasksSideApp-DA4LUTMD.js").then(e=>({default:e.TasksSideApp}))),Dw=()=>{let{openSideApp:e,sideAppVisible:t,sideAppSelectedCard:r}=Ir(),o=re(),a=t&&r?.component_key==="tasks_side_app_pin",n=()=>{a||e({component_key:"tasks_side_app_pin",message:o("tasks.title"),data:{component:(0,Xf.jsx)(R0.Suspense,{fallback:(0,Xf.jsx)(Ct,{style:{display:"block",margin:"auto"}}),children:(0,Xf.jsx)(wz,{showProjectFilter:!1})})}})};return(0,Xf.jsx)(qf,{ariaLabel:o("tasks.button.open"),icon:(0,Xf.jsx)(ml,{size:16}),onClick:n})};var L0=I(le());var Wa=I(le());var bn=I(V()),{ErrorBoundary:Cz}=po,Sz=({message:e,renderContent:t,autoLoadRightPanel:r})=>{let o=(0,Wa.useRef)(null),[a,n]=(0,Wa.useState)(!1),[i,s]=(0,Wa.useState)(!1);return(0,Wa.useEffect)(()=>{let c=new IntersectionObserver(([u])=>{let f=u.isIntersecting;n(f),f&&!i&&s(!0)},{threshold:.1});return o.current&&c.observe(o.current),()=>{o.current&&c.unobserve(o.current)}},[i]),(0,Wa.useEffect)(()=>{r?.()},[]),(0,bn.jsx)(Cz,{children:(0,bn.jsx)("div",{ref:o,style:{width:"100%"},children:a||i?t(e):(()=>{let c=(e.tool_calls?.length??0)*140,u=e.content?Math.min(100,e.content.length/5)+c:100+c;return(0,bn.jsx)("div",{style:{height:`${u}px`,minHeight:"50px"}})})()})})},l4=(0,Wa.memo)(({items:e,role:t,className:r})=>(0,bn.jsx)(t0.List,{autoScroll:!0,items:e,role:t,className:r},"messages"));l4.displayName="MemoizedBubbleList";var c4=({messages:e,className:t,isLoading:r=!1})=>{let{styles:o}=id(),a=qt(),n=(0,Wa.useDeferredValue)(e),i=r?n:e,s=(0,Wa.useRef)(i?.length??0);(0,Wa.useEffect)(()=>{i?.length&&(s.current=i?.length)},[i?.length]);let l=(0,Wa.useCallback)(f=>{let{content:m}=f;try{let h=JSON.parse(m);if(h.action&&h.message)return(0,bn.jsx)(Qt,{content:h.message})}catch{}let d=f.tool_calls?.map(h=>{try{return`\`\`\`tool_call
|
|
4371
4371
|
${JSON.stringify(h,(g,v)=>typeof v=="bigint"?v.toString():v)}
|
|
4372
4372
|
\`\`\``}catch(g){return console.error("[MessageList] Failed to serialize tool_call:",g,h),"```tool_call\n[Unable to serialize tool call]\n```"}})||[],x=[m,...d].join(`
|
|
4373
4373
|
`);return(0,bn.jsx)(Ye,{direction:"vertical",style:{width:"100%"},children:(0,bn.jsx)(Qt,{content:x})})},[]),c=(0,Wa.useMemo)(()=>i.map((f,m)=>({key:f.id||`message-${m}`,role:f.role,typing:!1,content:(0,bn.jsx)(Sz,{message:f,renderContent:l,autoLoadRightPanel:()=>{let{content:d,role:x}=f,h=s.current>1&&s.current+1===e.length;if(m===e.length-1&&h&&x==="ai")try{let g=d?.match(/```([\w_]*)\n({.*?}|[^`]*)\n```/m),v=g?.[1],C=g?.[2],b=C?JSON.parse(C):{};if(v){let T=Os(v);T?.side_app_view?a({component_key:v,data:b}):T?.action&&T.action(b)}}catch(g){console.error(g)}}})})),[e,l]),u={ai:{placement:"start",typing:!1,variant:"filled",styles:{content:{background:"transparent",padding:0}}},human:{placement:"end",variant:"filled",styles:{content:{background:"linear-gradient(1777deg, rgba(153, 164, 255, 0.38), rgb(231 243 248 / 38%) 27%)"}}}};return c.length===0?r?(0,bn.jsxs)("div",{style:{flex:1,display:"flex",alignItems:"center",justifyContent:"center"},children:[(0,bn.jsx)("style",{children:`
|
|
@@ -4375,7 +4375,7 @@ ${JSON.stringify(h,(g,v)=>typeof v=="bigint"?v.toString():v)}
|
|
|
4375
4375
|
0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
|
|
4376
4376
|
30% { transform: translateY(-6px); opacity: 1; }
|
|
4377
4377
|
}
|
|
4378
|
-
`}),(0,bn.jsx)("div",{style:{display:"flex",gap:6,padding:"12px 20px"},children:[0,1,2].map(f=>(0,bn.jsx)("div",{style:{width:8,height:8,borderRadius:"50%",background:"linear-gradient(135deg, #6366f1, #a855f7)",animation:"msg-typing 1.2s ease-in-out infinite",animationDelay:`${f*.2}s`}},f))})]}):(0,bn.jsx)("div",{style:{flex:1}}):(0,bn.jsx)(l4,{items:c,role:u,className:o.messages||t})};var Wu=I(V()),kz=L0.default.lazy(()=>import("./embed-page-MessageGraph-
|
|
4378
|
+
`}),(0,bn.jsx)("div",{style:{display:"flex",gap:6,padding:"12px 20px"},children:[0,1,2].map(f=>(0,bn.jsx)("div",{style:{width:8,height:8,borderRadius:"50%",background:"linear-gradient(135deg, #6366f1, #a855f7)",animation:"msg-typing 1.2s ease-in-out infinite",animationDelay:`${f*.2}s`}},f))})]}):(0,bn.jsx)("div",{style:{flex:1}}):(0,bn.jsx)(l4,{items:c,role:u,className:o.messages||t})};var Wu=I(V()),kz=L0.default.lazy(()=>import("./embed-page-MessageGraph-GLQXKAVC.js").then(e=>({default:e.MessageGraph}))),Ow=({messages:e,isLoading:t,viewMode:r,className:o,onJumpToMessage:a})=>r==="graph"?(0,Wu.jsx)(L0.Suspense,{fallback:(0,Wu.jsx)("div",{style:{flex:1,display:"flex",alignItems:"center",justifyContent:"center"},children:(0,Wu.jsx)(Ct,{})}),children:(0,Wu.jsx)("div",{style:{height:"100%",minHeight:0,width:"100%"},children:(0,Wu.jsx)(kz,{messages:e,isLoading:t,onJumpToMessage:a})})}):(0,Wu.jsx)(c4,{messages:e,isLoading:t,className:o});var dwe={human:{width:420,height:220},ai:{width:440,height:360},tool:{width:380,height:320},agent:{width:380,height:320},summary:{width:260,height:96}},Tz={understand:"chat.trace.phase.understand",act:"chat.trace.phase.act",delegate:"chat.trace.phase.delegate",answer:"chat.trace.phase.answer"},Iz={understand:"Understand & plan",act:"Execute",delegate:"Delegate",answer:"Answer"};function u4(e,t){return t?t(Tz[e]):Iz[e]}function d4(e){return e.role==="ai"}function Rz(e,t){let r=[];for(let o of e){let a=r[r.length-1];a&&a.kind===o.data.phase?a.nodeIds.push(o.id):r.push({id:`phase:${r.length}:${o.data.phase}`,kind:o.data.phase,title:u4(o.data.phase,t),nodeIds:[o.id]})}return r}function uwe(e,t={}){let r=t.isLoading===!0,o=t.t,a=[],n=[],i=[...e].reverse().find(d4),s=e[e.length-1],l=[],c=!1,u=(f,m)=>{for(let d of l)n.push({id:`${m}:${d}->${f}`,from:d,to:f,kind:m})};for(let f of e){if(f.role==="human"){let T=`human:${f.id}`;a.push({id:T,data:{kind:"human",status:"success",phase:"understand",messageId:f.id,label:o?o("chat.trace.node.human"):"User",content:f.content}}),u(T,"sequence"),l=[T],c=!1;continue}if(!d4(f))continue;let m=f.tool_calls??[],d=f===i&&m.length===0,x=m.some(T=>T.name==="task")?"delegate":m.length>0?"act":d?"answer":"understand",h=m.some(T=>T.response===void 0),g=r&&f===s,v=g?"running":h&&!g?"error":"success",C=`ai:${f.id}`;a.push({id:C,data:{kind:"ai",status:v,phase:x,messageId:f.id,label:u4(x,o),content:f.content,isAnswer:d}}),u(C,c?"result":"sequence");let b=[];for(let T of m){let R=`tool:${T.id}`,z=T.response!==void 0?"success":g?"running":"error";a.push({id:R,data:{kind:T.name==="task"?"agent":"tool",status:z,phase:x,messageId:f.id,aiId:C,label:T.name,toolCall:T,parallelGroupId:C,parallelCount:m.length}}),n.push({id:`invoke:${C}->${R}`,from:C,to:R,kind:"invoke"}),b.push(R)}b.length>0?(l=b,c=!0):(l=[C],c=!1)}return{nodes:a,edges:n,phases:Rz(a,o)}}function pwe(e,t,r){if(t<1||e.phases.length<=t)return e;let o=e.phases.slice(-t),a=e.phases.slice(0,-t),n=new Set(a.flatMap(d=>d.nodeIds)),i=new Set(o.flatMap(d=>d.nodeIds)),s=`summary:${a[0].id}`,c=[{id:s,data:{kind:"summary",status:"success",phase:a[0].kind,messageId:s,label:r?r("chat.trace.summary.steps",{count:n.size}):`${n.size} steps`}},...e.nodes.filter(d=>!n.has(d.id))],u=e.edges.filter(d=>!n.has(d.from)&&!n.has(d.to)).map(d=>({...d})),f=new Set;for(let d of e.edges)n.has(d.from)&&i.has(d.to)&&!f.has(d.to)&&(f.add(d.to),u.push({id:`${d.kind}:${s}->${d.to}`,from:s,to:d.to,kind:d.kind}));let m={id:`phase:summary:${a[0].id}`,kind:a[0].kind,title:r?r("chat.trace.phase.earlier"):"Earlier",nodeIds:[s]};return{nodes:c,edges:u,phases:[m,...o]}}function p4(e,t){return e!==void 0?e:t===!0}var nr=I(le());var Vu=I(V()),{Panel:Lz}=Zo,Pz=/^```([\w_]+)\n([\s\S]*?)\n```$/;function Az(e){if(typeof e!="string")return;let t=Pz.exec(e.trim());if(t)try{let r=JSON.parse(t[2]);return typeof r=="object"&&r!==null&&!Array.isArray(r)?{key:t[1],data:r}:void 0}catch{return}}var Mz=Re(({token:e,css:t})=>({card:t`
|
|
4379
4379
|
max-width: 1200px;
|
|
4380
4380
|
margin: 8px 20px;
|
|
4381
4381
|
background: ${e.colorPrimaryBg};
|
|
@@ -5252,7 +5252,7 @@ ${e}
|
|
|
5252
5252
|
overflow: auto;
|
|
5253
5253
|
min-height: 0;
|
|
5254
5254
|
background: ${e.colorBgContainer};
|
|
5255
|
-
`}));var vh=({fileUrl:e,fileName:t="",downloadUrl:r,showHeader:o=!0})=>{let{styles:a}=ej(),n=re(),[i,s]=(0,Bd.useState)(""),[l,c]=(0,Bd.useState)(!0),[u,f]=(0,Bd.useState)(null),m=(0,Bd.useMemo)(()=>Fd(t),[t]);if((0,Bd.useEffect)(()=>{m==="markdown"||m==="text"?(c(!0),f(null),fetch(e).then(d=>{if(!d.ok)throw new Error(n("genui.file.loadFailedStatus",{status:d.status}));return d.text()}).then(d=>{s(d),c(!1)}).catch(d=>{f(d.message),c(!1)})):c(!1)},[e,m,n]),l)return(0,Qr.jsx)("div",{className:a.loading,children:(0,Qr.jsx)(Ct,{size:"large",tip:n("common.loading")})});if(u)return(0,Qr.jsx)("div",{className:a.error,children:(0,Qr.jsx)(po,{message:n("genui.file.loadFailed"),description:u,type:"error",showIcon:!0})});switch(m){case"markdown":case"text":return(0,Qr.jsx)("div",{className:a.container,children:(0,Qr.jsx)(rv,{content:i,fileName:t,downloadUrl:r})});case"image":return(0,Qr.jsx)("div",{className:a.container,children:(0,Qr.jsx)("div",{className:a.contentWrapper,children:(0,Qr.jsx)("div",{className:a.imageContainer,children:(0,Qr.jsx)("img",{src:e,alt:t,className:a.image})})})});case"pdf":case"iframe":return(0,Qr.jsx)("div",{className:a.container,children:(0,Qr.jsx)("div",{className:a.pdfContainer,children:(0,Qr.jsx)("iframe",{src:e,title:t,className:a.pdfIframe})})});case"audio":return(0,Qr.jsx)("div",{className:a.container,children:(0,Qr.jsx)("div",{className:a.mediaContainer,children:(0,Qr.jsxs)("audio",{controls:!0,className:a.media,children:[(0,Qr.jsx)("source",{src:e}),n("genui.file.audioUnsupported")]})})});case"video":return(0,Qr.jsx)("div",{className:a.container,children:(0,Qr.jsx)("div",{className:a.mediaContainer,children:(0,Qr.jsxs)("video",{controls:!0,className:a.media,children:[(0,Qr.jsx)("source",{src:e}),n("genui.file.videoUnsupported")]})})});default:return(0,Qr.jsx)("div",{className:a.container,children:(0,Qr.jsxs)("div",{className:a.downloadContainer,children:[(0,Qr.jsx)(Bc,{className:a.fileIcon}),(0,Qr.jsx)("span",{className:a.fileName,children:t||n("genui.file.unknown")}),(0,Qr.jsx)(he,{type:"primary",href:r||e,download:t,children:n("genui.file.downloadFile")})]})})}};var HM=I(V()),bC=e=>typeof e=="object"&&e!==null&&!Array.isArray(e)?e:void 0,bh=({data:e})=>{let t=$p(e);if(!t)return null;let r=bC(e);return(0,HM.jsx)(lm,{uiRef:t,ui:bC(r?.ui),toolInput:bC(r?.toolInput),toolResult:r?.toolResult})};var VM=I(V());var GM=I(le());var KM=I(V()),{Text:OIe}=Ce;var aj=I(le());var wC=I(le());var XM=I(V()),{Text:WIe}=Ce;var oj=I(le());var rj=I(le());var CC=I(V());var SC=I(V()),{Dragger:tRe}=_c,{Text:rRe,Title:oRe}=Ce;var YM=I(V()),{Title:pRe,Text:fRe}=Ce;var Ao=I(V()),JM=[{id:"personal_assistant",type:"route",name:"Personal Assistant",nameKey:"chatMenu.workspace.personalAssistant",icon:(0,Ao.jsx)(Li,{size:20}),order:-10},{id:"workspace_projects",type:"route",name:"Projects",nameKey:"chatMenu.workspace.projects",icon:(0,Ao.jsx)(Ai,{size:20}),order:0},{id:"metrics",builtin:"metrics",type:"route",name:"Metrics",nameKey:"chatMenu.workspace.metrics",icon:(0,Ao.jsx)(uu,{size:20}),order:10,group:"DataSource"},{id:"database",builtin:"database",type:"route",name:"Database",nameKey:"chatMenu.workspace.database",icon:(0,Ao.jsx)(As,{size:20}),order:20,group:"DataSource"},{id:"connections",builtin:"connections",type:"route",name:"Plugins",nameKey:"chatMenu.workspace.plugins",icon:(0,Ao.jsx)(cf,{size:20}),order:21},{id:"model-providers",type:"route",name:"Model Providers",nameKey:"chatMenu.workspace.modelProviders",icon:(0,Ao.jsx)(Qm,{size:20}),order:48,group:"Settings"},{id:"topology-runtimes",type:"route",name:"Runtime",nameKey:"chatMenu.workspace.runtime",icon:(0,Ao.jsx)(nf,{size:20}),order:26,group:"Process"},{id:"topology-inbox",type:"route",name:"Inbox",nameKey:"chatMenu.workspace.inbox",icon:(0,Ao.jsx)(ig,{size:20}),order:27,group:"Process"},{id:"workflows",type:"route",name:"Automations",nameKey:"chatMenu.workspace.automations",icon:(0,Ao.jsx)(df,{size:20}),order:25,group:"Process"},{id:"shares",type:"route",name:"Shares",nameKey:"chatMenu.workspace.shares",icon:(0,Ao.jsx)(df,{size:20}),order:55,group:"Settings"},{id:"workspace_migration",type:"route",name:"Migration",nameKey:"chatMenu.workspace.migration",icon:(0,Ao.jsx)(Ym,{size:20}),order:56,group:"Settings"},{id:"eval",type:"route",name:"Eval",nameKey:"chatMenu.workspace.eval",icon:(0,Ao.jsx)(On,{size:20}),order:28,group:"Process"},{id:"assistants",builtin:"assistants",type:"route",name:"Agents",nameKey:"chatMenu.workspace.assistants",icon:(0,Ao.jsx)(Li,{size:20}),order:30,group:"Settings"},{id:"skills",builtin:"skills",type:"route",name:"Skills",nameKey:"chatMenu.workspace.skills",icon:(0,Ao.jsx)(vg,{size:20}),order:35,group:"Settings"},{id:"collections",type:"route",name:"Collections",nameKey:"chatMenu.workspace.collections",icon:(0,Ao.jsx)(Hc,{size:20}),order:29,group:"Knowledge"},{id:"mcp",builtin:"mcp",type:"route",name:"MCP",nameKey:"chatMenu.workspace.mcp",icon:(0,Ao.jsx)(cf,{size:20}),order:40,group:"Settings"},{id:"a2a-keys",type:"route",name:"API Keys",nameKey:"chatMenu.workspace.apiKeys",icon:(0,Ao.jsx)(sg,{size:20}),order:45,group:"Settings"},{id:"open-audit",type:"route",name:"Audit Log",nameKey:"chatMenu.workspace.auditLog",icon:(0,Ao.jsx)(nf,{size:20}),order:47,group:"Settings"},{id:"capability-bundles",type:"route",name:"Runtime Profiles",nameKey:"chatMenu.workspace.runtimeProfiles",icon:(0,Ao.jsx)(hg,{size:20}),order:46,group:"Settings"},{id:"tools",builtin:"tools",type:"route",name:"Tools",nameKey:"chatMenu.workspace.tools",icon:(0,Ao.jsx)(xg,{size:20}),order:50,group:"Settings"},{id:"tasks",type:"route",name:"Tasks",nameKey:"chatMenu.workspace.tasks",icon:(0,Ao.jsx)(ml,{size:20}),order:100}];var NLe=(0,qi.lazy)(()=>import("./embed-page-AgentGovernanceWorkbench-BBDKEIBI.js").then(e=>({default:e.AgentGovernanceWorkbench}))),ELe=(0,qi.lazy)(()=>import("./embed-page-TopologyRuntimeView-42TN76MK.js").then(e=>({default:e.TopologyRuntimeView}))),FLe=(0,qi.lazy)(()=>import("./embed-page-WorkflowAutomationView-JLP4UHPP.js").then(e=>({default:e.WorkflowAutomationView}))),_Le=(0,qi.lazy)(()=>import("./embed-page-TasksSideApp-BVCIAE24.js").then(e=>({default:e.TasksSideApp}))),BLe=(0,qi.lazy)(()=>import("./embed-page-AgentDetailSideApp-XCP4LY7Y.js").then(e=>({default:e.AgentDetailSideApp})));var Rn=I(V());function nj(e){let{contentType:t,assistantId:r,contentConfig:o,workspaceId:a,projectId:n}=e;return t==="agent"?{agentId:r,workspaceId:a||void 0,projectId:n||void 0}:{...o,workspaceId:a||void 0,projectId:n||void 0}}function ov(e){return typeof e=="string"?e:""}function ij(e,t,r){return ov(e.workspaceId)===ov(t)&&ov(e.projectId)===ov(r)}async function sj(e,t,r){let{contentType:o,assistantId:a,contentConfig:n,isMatch:i,workspaceId:s,projectId:l}=t;if(!(o==="agent"?!!a:!!n)||!r)return{isPinned:!1,pinnedId:null};let u=await e("/api/menu-items?menuTarget=workspace");if(u.success&&u.data?.records){let f=i??(d=>o==="agent"&&d.agentId===a),m=u.data.records.find(d=>{let x=d.contentConfig??{};return d.contentType===o&&ij(x,s,l)&&f(x)});if(m)return{isPinned:!0,pinnedId:m.id}}return{isPinned:!1,pinnedId:null}}async function lj(e,t,r){let{contentType:o,name:a,group:n}=t,i=nj(t),s={menuTarget:"workspace",contentType:o,contentConfig:i,group:n?.trim()||void 0,name:a.trim(),sortOrder:0},l=await e("/api/menu-items",s);if(!l.success)throw new Error(l.message||(r?r("chat.pin.pinFailed"):"Failed to pin"));return{id:l.data.id}}async function cj(e,t,r){let o=await e(`/api/menu-items/${t}`);if(!o.success)throw new Error(o.message||(r?r("chat.pin.unpinFailed"):"Failed to unpin"))}function u0(){let e=zo.default.useContext(ui),{config:t}=Et(),{post:r,get:o,del:a}=Bt(),n=re(),i=t.enableCustomMenu??!1,s=e?.workspaceId,l=e?.projectId,c=(0,zo.useCallback)(async m=>sj(o,{...m,workspaceId:s,projectId:l},i),[o,i,s,l]),u=(0,zo.useCallback)(async m=>lj(r,{...m,workspaceId:s,projectId:l},n),[r,s,l,n]),f=(0,zo.useCallback)(async m=>cj(a,m,n),[a,n]);return{check:c,pin:u,unpin:f,enableCustomMenu:i,get:o}}function ZM(e){let t=new Set;for(let r of e)r.group?.trim()&&t.add(r.group.trim());return Array.from(t).sort()}function iw(){let{config:e}=Et(),t=zo.default.useMemo(()=>ZM(JM),[]),r=zo.default.useMemo(()=>ZM(e.workspaceMenuItems??[]),[e.workspaceMenuItems]);return zo.default.useMemo(()=>Array.from(new Set([...t,...r])).sort(),[t,r])}async function sw(e){let t=await e("/api/menu-items?menuTarget=workspace");if(t.success&&t.data?.records){let r=new Set;for(let o of t.data.records)o.group?.trim()&&r.add(o.group.trim());return Array.from(r).sort()}return[]}var dj={display:"flex",flexDirection:"column",gap:12},uh=({assistantId:e,contentType:t="agent",contentConfig:r,isMatch:o,size:a="small",label:n,block:i,defaultName:s})=>{let l=re(),{check:c,pin:u,unpin:f,enableCustomMenu:m,get:d}=u0(),[x,h]=(0,zo.useState)(!1),[g,v]=(0,zo.useState)(""),[C,b]=(0,zo.useState)(s??""),[T,R]=(0,zo.useState)(!1),[z,F]=(0,zo.useState)(!1),[E,U]=(0,zo.useState)(null),[D,L]=(0,zo.useState)(!0),S=iw(),[P,A]=(0,zo.useState)(S);(0,zo.useEffect)(()=>{A(S)},[S]),(0,zo.useEffect)(()=>{x&&sw(d).then(G=>{A(Array.from(new Set([...S,...G])).sort())})},[x]);let _=t==="agent"?!!e:!!r,j=(0,zo.useCallback)(async()=>{if(!_||!m){L(!1);return}L(!0);try{let G=await c({contentType:t,assistantId:e,contentConfig:r,isMatch:o});F(G.isPinned),U(G.pinnedId)}catch{}finally{L(!1)}},[_,m,c,t,e,r,o]);if((0,zo.useEffect)(()=>{j()},[j]),!_||!m)return null;let H=async()=>{if(!C.trim()){it.warning(l("chat.pin.enterName"));return}R(!0);try{await u({contentType:t,assistantId:e,contentConfig:r,isMatch:o,name:C.trim(),group:g.trim()||void 0}),it.success(l("chat.pin.pinned")),window.dispatchEvent(new CustomEvent("menu:refresh")),h(!1),v(""),b(s??""),j()}catch(G){it.error(G.message||l("chat.pin.pinFailed"))}finally{R(!1)}},$=async()=>{if(E){R(!0);try{await f(E),it.success(l("chat.pin.unpinned")),window.dispatchEvent(new CustomEvent("menu:refresh")),F(!1),U(null)}catch(G){it.error(G.message||l("chat.pin.unpinFailed"))}finally{R(!1)}}},Y=()=>{z?$():h(!0)};return(0,Rn.jsxs)(Rn.Fragment,{children:[(0,Rn.jsx)(yt,{title:l(z?"chat.pin.unpin":"chat.pin.pin"),children:n?(0,Rn.jsx)(he,{type:"text",size:a,block:i,icon:z?(0,Rn.jsx)(zn,{size:14,fill:"currentColor"}):(0,Rn.jsx)(zn,{size:14}),onClick:Y,loading:D||T&&z,children:n}):(0,Rn.jsx)(he,{type:"text",size:a,block:i,icon:z?(0,Rn.jsx)(zn,{size:14,fill:"currentColor"}):(0,Rn.jsx)(zn,{size:14}),onClick:Y,loading:D||T&&z})}),(0,Rn.jsx)(Yt,{title:l("chat.pin.pinTitle"),open:x,onOk:H,onCancel:()=>h(!1),confirmLoading:T,okText:l("chat.pin.pin"),children:(0,Rn.jsxs)("div",{style:dj,children:[(0,Rn.jsx)(Nt,{placeholder:l("chat.pin.namePlaceholder"),value:C,onChange:G=>b(G.target.value)}),(0,Rn.jsx)(ly,{placeholder:l("chat.pin.groupPlaceholder"),value:g,options:P.map(G=>({value:G})),onChange:G=>v(G),filterOption:(G,ne)=>ne?.value?.toUpperCase().includes(G.toUpperCase())??!1})]})})]})};var rp=I(V());function TC(e,t,r,o){return{...e,toolInput:t,toolResult:r,...o?{ui:o}:{}}}var av=({uiRef:e,toolInput:t,toolResult:r,ui:o})=>{let a=qt(),n=re(),i=typeof e.title=="string"&&e.title.trim()!==""?e.title:void 0,s=()=>{a({component_key:"mcp_app",data:TC(e,t,r,o),message:i})},l=kC.default.useMemo(()=>e.kind==="plugin"?{kind:"plugin",pluginType:e.pluginType,resource:e.resource,displayMode:e.displayMode,...e.title?{title:e.title}:{},...t?{toolInput:t}:{},...r!==void 0?{toolResult:r}:{},...o?{ui:o}:{}}:{kind:"mcp",serverKey:e.serverKey,resourceUri:e.resourceUri,displayMode:e.displayMode,...e.title?{title:e.title}:{},...t?{toolInput:t}:{},...r!==void 0?{toolResult:r}:{},...o?{ui:o}:{}},[e,t,r,o]),c=kC.default.useCallback(u=>e.kind==="plugin"?u.kind==="plugin"&&u.pluginType===e.pluginType&&u.resource===e.resource:u.kind==="mcp"&&u.serverKey===e.serverKey&&u.resourceUri===e.resourceUri,[e]);return(0,rp.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:i?"space-between":"flex-end",gap:8,padding:"2px 8px 2px 0"},children:[i&&(0,rp.jsx)(Ce.Text,{strong:!0,style:{fontSize:13},children:i}),(0,rp.jsx)(uh,{contentType:"mcpApp",contentConfig:l,isMatch:c,defaultName:i??n("mcpapp.fallbackTitle"),size:"small"}),(0,rp.jsx)(he,{type:"text",size:"small",icon:(0,rp.jsx)(fy,{}),onClick:s,title:n("mcpapp.openInSideApp")})]})};function op(e){if(typeof e=="string")return e;if(Array.isArray(e))return e.map(t=>{if(typeof t=="string")return t;if(t!==null&&typeof t=="object"){let r=t.text;if(typeof r=="string")return r}return""}).filter(t=>t.length>0).join(`
|
|
5255
|
+
`}));var vh=({fileUrl:e,fileName:t="",downloadUrl:r,showHeader:o=!0})=>{let{styles:a}=ej(),n=re(),[i,s]=(0,Bd.useState)(""),[l,c]=(0,Bd.useState)(!0),[u,f]=(0,Bd.useState)(null),m=(0,Bd.useMemo)(()=>Fd(t),[t]);if((0,Bd.useEffect)(()=>{m==="markdown"||m==="text"?(c(!0),f(null),fetch(e).then(d=>{if(!d.ok)throw new Error(n("genui.file.loadFailedStatus",{status:d.status}));return d.text()}).then(d=>{s(d),c(!1)}).catch(d=>{f(d.message),c(!1)})):c(!1)},[e,m,n]),l)return(0,Qr.jsx)("div",{className:a.loading,children:(0,Qr.jsx)(Ct,{size:"large",tip:n("common.loading")})});if(u)return(0,Qr.jsx)("div",{className:a.error,children:(0,Qr.jsx)(po,{message:n("genui.file.loadFailed"),description:u,type:"error",showIcon:!0})});switch(m){case"markdown":case"text":return(0,Qr.jsx)("div",{className:a.container,children:(0,Qr.jsx)(rv,{content:i,fileName:t,downloadUrl:r})});case"image":return(0,Qr.jsx)("div",{className:a.container,children:(0,Qr.jsx)("div",{className:a.contentWrapper,children:(0,Qr.jsx)("div",{className:a.imageContainer,children:(0,Qr.jsx)("img",{src:e,alt:t,className:a.image})})})});case"pdf":case"iframe":return(0,Qr.jsx)("div",{className:a.container,children:(0,Qr.jsx)("div",{className:a.pdfContainer,children:(0,Qr.jsx)("iframe",{src:e,title:t,className:a.pdfIframe})})});case"audio":return(0,Qr.jsx)("div",{className:a.container,children:(0,Qr.jsx)("div",{className:a.mediaContainer,children:(0,Qr.jsxs)("audio",{controls:!0,className:a.media,children:[(0,Qr.jsx)("source",{src:e}),n("genui.file.audioUnsupported")]})})});case"video":return(0,Qr.jsx)("div",{className:a.container,children:(0,Qr.jsx)("div",{className:a.mediaContainer,children:(0,Qr.jsxs)("video",{controls:!0,className:a.media,children:[(0,Qr.jsx)("source",{src:e}),n("genui.file.videoUnsupported")]})})});default:return(0,Qr.jsx)("div",{className:a.container,children:(0,Qr.jsxs)("div",{className:a.downloadContainer,children:[(0,Qr.jsx)(Bc,{className:a.fileIcon}),(0,Qr.jsx)("span",{className:a.fileName,children:t||n("genui.file.unknown")}),(0,Qr.jsx)(he,{type:"primary",href:r||e,download:t,children:n("genui.file.downloadFile")})]})})}};var HM=I(V()),bC=e=>typeof e=="object"&&e!==null&&!Array.isArray(e)?e:void 0,bh=({data:e})=>{let t=$p(e);if(!t)return null;let r=bC(e);return(0,HM.jsx)(lm,{uiRef:t,ui:bC(r?.ui),toolInput:bC(r?.toolInput),toolResult:r?.toolResult})};var VM=I(V());var GM=I(le());var KM=I(V()),{Text:OIe}=Ce;var aj=I(le());var wC=I(le());var XM=I(V()),{Text:WIe}=Ce;var oj=I(le());var rj=I(le());var CC=I(V());var SC=I(V()),{Dragger:tRe}=_c,{Text:rRe,Title:oRe}=Ce;var YM=I(V()),{Title:pRe,Text:fRe}=Ce;var Ao=I(V()),JM=[{id:"personal_assistant",type:"route",name:"Personal Assistant",nameKey:"chatMenu.workspace.personalAssistant",icon:(0,Ao.jsx)(Li,{size:20}),order:-10},{id:"workspace_projects",type:"route",name:"Projects",nameKey:"chatMenu.workspace.projects",icon:(0,Ao.jsx)(Ai,{size:20}),order:0},{id:"metrics",builtin:"metrics",type:"route",name:"Metrics",nameKey:"chatMenu.workspace.metrics",icon:(0,Ao.jsx)(uu,{size:20}),order:10,group:"DataSource"},{id:"database",builtin:"database",type:"route",name:"Database",nameKey:"chatMenu.workspace.database",icon:(0,Ao.jsx)(As,{size:20}),order:20,group:"DataSource"},{id:"connections",builtin:"connections",type:"route",name:"Plugins",nameKey:"chatMenu.workspace.plugins",icon:(0,Ao.jsx)(cf,{size:20}),order:21},{id:"model-providers",type:"route",name:"Model Providers",nameKey:"chatMenu.workspace.modelProviders",icon:(0,Ao.jsx)(Qm,{size:20}),order:48,group:"Settings"},{id:"topology-runtimes",type:"route",name:"Runtime",nameKey:"chatMenu.workspace.runtime",icon:(0,Ao.jsx)(nf,{size:20}),order:26,group:"Process"},{id:"topology-inbox",type:"route",name:"Inbox",nameKey:"chatMenu.workspace.inbox",icon:(0,Ao.jsx)(ig,{size:20}),order:27,group:"Process"},{id:"workflows",type:"route",name:"Automations",nameKey:"chatMenu.workspace.automations",icon:(0,Ao.jsx)(df,{size:20}),order:25,group:"Process"},{id:"shares",type:"route",name:"Shares",nameKey:"chatMenu.workspace.shares",icon:(0,Ao.jsx)(df,{size:20}),order:55,group:"Settings"},{id:"workspace_migration",type:"route",name:"Migration",nameKey:"chatMenu.workspace.migration",icon:(0,Ao.jsx)(Ym,{size:20}),order:56,group:"Settings"},{id:"eval",type:"route",name:"Eval",nameKey:"chatMenu.workspace.eval",icon:(0,Ao.jsx)(On,{size:20}),order:28,group:"Process"},{id:"assistants",builtin:"assistants",type:"route",name:"Agents",nameKey:"chatMenu.workspace.assistants",icon:(0,Ao.jsx)(Li,{size:20}),order:30,group:"Settings"},{id:"skills",builtin:"skills",type:"route",name:"Skills",nameKey:"chatMenu.workspace.skills",icon:(0,Ao.jsx)(vg,{size:20}),order:35,group:"Settings"},{id:"collections",type:"route",name:"Collections",nameKey:"chatMenu.workspace.collections",icon:(0,Ao.jsx)(Hc,{size:20}),order:29,group:"Knowledge"},{id:"mcp",builtin:"mcp",type:"route",name:"MCP",nameKey:"chatMenu.workspace.mcp",icon:(0,Ao.jsx)(cf,{size:20}),order:40,group:"Settings"},{id:"a2a-keys",type:"route",name:"API Keys",nameKey:"chatMenu.workspace.apiKeys",icon:(0,Ao.jsx)(sg,{size:20}),order:45,group:"Settings"},{id:"open-audit",type:"route",name:"Audit Log",nameKey:"chatMenu.workspace.auditLog",icon:(0,Ao.jsx)(nf,{size:20}),order:47,group:"Settings"},{id:"capability-bundles",type:"route",name:"Runtime Profiles",nameKey:"chatMenu.workspace.runtimeProfiles",icon:(0,Ao.jsx)(hg,{size:20}),order:46,group:"Settings"},{id:"tools",builtin:"tools",type:"route",name:"Tools",nameKey:"chatMenu.workspace.tools",icon:(0,Ao.jsx)(xg,{size:20}),order:50,group:"Settings"},{id:"tasks",type:"route",name:"Tasks",nameKey:"chatMenu.workspace.tasks",icon:(0,Ao.jsx)(ml,{size:20}),order:100}];var NLe=(0,qi.lazy)(()=>import("./embed-page-AgentGovernanceWorkbench-SD2EHW2B.js").then(e=>({default:e.AgentGovernanceWorkbench}))),ELe=(0,qi.lazy)(()=>import("./embed-page-TopologyRuntimeView-NFBHAICN.js").then(e=>({default:e.TopologyRuntimeView}))),FLe=(0,qi.lazy)(()=>import("./embed-page-WorkflowAutomationView-43YGTXGF.js").then(e=>({default:e.WorkflowAutomationView}))),_Le=(0,qi.lazy)(()=>import("./embed-page-TasksSideApp-DA4LUTMD.js").then(e=>({default:e.TasksSideApp}))),BLe=(0,qi.lazy)(()=>import("./embed-page-AgentDetailSideApp-JYVZKSUU.js").then(e=>({default:e.AgentDetailSideApp})));var Rn=I(V());function nj(e){let{contentType:t,assistantId:r,contentConfig:o,workspaceId:a,projectId:n}=e;return t==="agent"?{agentId:r,workspaceId:a||void 0,projectId:n||void 0}:{...o,workspaceId:a||void 0,projectId:n||void 0}}function ov(e){return typeof e=="string"?e:""}function ij(e,t,r){return ov(e.workspaceId)===ov(t)&&ov(e.projectId)===ov(r)}async function sj(e,t,r){let{contentType:o,assistantId:a,contentConfig:n,isMatch:i,workspaceId:s,projectId:l}=t;if(!(o==="agent"?!!a:!!n)||!r)return{isPinned:!1,pinnedId:null};let u=await e("/api/menu-items?menuTarget=workspace");if(u.success&&u.data?.records){let f=i??(d=>o==="agent"&&d.agentId===a),m=u.data.records.find(d=>{let x=d.contentConfig??{};return d.contentType===o&&ij(x,s,l)&&f(x)});if(m)return{isPinned:!0,pinnedId:m.id}}return{isPinned:!1,pinnedId:null}}async function lj(e,t,r){let{contentType:o,name:a,group:n}=t,i=nj(t),s={menuTarget:"workspace",contentType:o,contentConfig:i,group:n?.trim()||void 0,name:a.trim(),sortOrder:0},l=await e("/api/menu-items",s);if(!l.success)throw new Error(l.message||(r?r("chat.pin.pinFailed"):"Failed to pin"));return{id:l.data.id}}async function cj(e,t,r){let o=await e(`/api/menu-items/${t}`);if(!o.success)throw new Error(o.message||(r?r("chat.pin.unpinFailed"):"Failed to unpin"))}function u0(){let e=zo.default.useContext(ui),{config:t}=Et(),{post:r,get:o,del:a}=Bt(),n=re(),i=t.enableCustomMenu??!1,s=e?.workspaceId,l=e?.projectId,c=(0,zo.useCallback)(async m=>sj(o,{...m,workspaceId:s,projectId:l},i),[o,i,s,l]),u=(0,zo.useCallback)(async m=>lj(r,{...m,workspaceId:s,projectId:l},n),[r,s,l,n]),f=(0,zo.useCallback)(async m=>cj(a,m,n),[a,n]);return{check:c,pin:u,unpin:f,enableCustomMenu:i,get:o}}function ZM(e){let t=new Set;for(let r of e)r.group?.trim()&&t.add(r.group.trim());return Array.from(t).sort()}function iw(){let{config:e}=Et(),t=zo.default.useMemo(()=>ZM(JM),[]),r=zo.default.useMemo(()=>ZM(e.workspaceMenuItems??[]),[e.workspaceMenuItems]);return zo.default.useMemo(()=>Array.from(new Set([...t,...r])).sort(),[t,r])}async function sw(e){let t=await e("/api/menu-items?menuTarget=workspace");if(t.success&&t.data?.records){let r=new Set;for(let o of t.data.records)o.group?.trim()&&r.add(o.group.trim());return Array.from(r).sort()}return[]}var dj={display:"flex",flexDirection:"column",gap:12},uh=({assistantId:e,contentType:t="agent",contentConfig:r,isMatch:o,size:a="small",label:n,block:i,defaultName:s})=>{let l=re(),{check:c,pin:u,unpin:f,enableCustomMenu:m,get:d}=u0(),[x,h]=(0,zo.useState)(!1),[g,v]=(0,zo.useState)(""),[C,b]=(0,zo.useState)(s??""),[T,R]=(0,zo.useState)(!1),[z,F]=(0,zo.useState)(!1),[E,U]=(0,zo.useState)(null),[D,L]=(0,zo.useState)(!0),S=iw(),[P,A]=(0,zo.useState)(S);(0,zo.useEffect)(()=>{A(S)},[S]),(0,zo.useEffect)(()=>{x&&sw(d).then(G=>{A(Array.from(new Set([...S,...G])).sort())})},[x]);let _=t==="agent"?!!e:!!r,j=(0,zo.useCallback)(async()=>{if(!_||!m){L(!1);return}L(!0);try{let G=await c({contentType:t,assistantId:e,contentConfig:r,isMatch:o});F(G.isPinned),U(G.pinnedId)}catch{}finally{L(!1)}},[_,m,c,t,e,r,o]);if((0,zo.useEffect)(()=>{j()},[j]),!_||!m)return null;let H=async()=>{if(!C.trim()){it.warning(l("chat.pin.enterName"));return}R(!0);try{await u({contentType:t,assistantId:e,contentConfig:r,isMatch:o,name:C.trim(),group:g.trim()||void 0}),it.success(l("chat.pin.pinned")),window.dispatchEvent(new CustomEvent("menu:refresh")),h(!1),v(""),b(s??""),j()}catch(G){it.error(G.message||l("chat.pin.pinFailed"))}finally{R(!1)}},$=async()=>{if(E){R(!0);try{await f(E),it.success(l("chat.pin.unpinned")),window.dispatchEvent(new CustomEvent("menu:refresh")),F(!1),U(null)}catch(G){it.error(G.message||l("chat.pin.unpinFailed"))}finally{R(!1)}}},Y=()=>{z?$():h(!0)};return(0,Rn.jsxs)(Rn.Fragment,{children:[(0,Rn.jsx)(yt,{title:l(z?"chat.pin.unpin":"chat.pin.pin"),children:n?(0,Rn.jsx)(he,{type:"text",size:a,block:i,icon:z?(0,Rn.jsx)(zn,{size:14,fill:"currentColor"}):(0,Rn.jsx)(zn,{size:14}),onClick:Y,loading:D||T&&z,children:n}):(0,Rn.jsx)(he,{type:"text",size:a,block:i,icon:z?(0,Rn.jsx)(zn,{size:14,fill:"currentColor"}):(0,Rn.jsx)(zn,{size:14}),onClick:Y,loading:D||T&&z})}),(0,Rn.jsx)(Yt,{title:l("chat.pin.pinTitle"),open:x,onOk:H,onCancel:()=>h(!1),confirmLoading:T,okText:l("chat.pin.pin"),children:(0,Rn.jsxs)("div",{style:dj,children:[(0,Rn.jsx)(Nt,{placeholder:l("chat.pin.namePlaceholder"),value:C,onChange:G=>b(G.target.value)}),(0,Rn.jsx)(ly,{placeholder:l("chat.pin.groupPlaceholder"),value:g,options:P.map(G=>({value:G})),onChange:G=>v(G),filterOption:(G,ne)=>ne?.value?.toUpperCase().includes(G.toUpperCase())??!1})]})})]})};var rp=I(V());function TC(e,t,r,o){return{...e,toolInput:t,toolResult:r,...o?{ui:o}:{}}}var av=({uiRef:e,toolInput:t,toolResult:r,ui:o})=>{let a=qt(),n=re(),i=typeof e.title=="string"&&e.title.trim()!==""?e.title:void 0,s=()=>{a({component_key:"mcp_app",data:TC(e,t,r,o),message:i})},l=kC.default.useMemo(()=>e.kind==="plugin"?{kind:"plugin",pluginType:e.pluginType,resource:e.resource,displayMode:e.displayMode,...e.title?{title:e.title}:{},...t?{toolInput:t}:{},...r!==void 0?{toolResult:r}:{},...o?{ui:o}:{}}:{kind:"mcp",serverKey:e.serverKey,resourceUri:e.resourceUri,displayMode:e.displayMode,...e.title?{title:e.title}:{},...t?{toolInput:t}:{},...r!==void 0?{toolResult:r}:{},...o?{ui:o}:{}},[e,t,r,o]),c=kC.default.useCallback(u=>e.kind==="plugin"?u.kind==="plugin"&&u.pluginType===e.pluginType&&u.resource===e.resource:u.kind==="mcp"&&u.serverKey===e.serverKey&&u.resourceUri===e.resourceUri,[e]);return(0,rp.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:i?"space-between":"flex-end",gap:8,padding:"2px 8px 2px 0"},children:[i&&(0,rp.jsx)(Ce.Text,{strong:!0,style:{fontSize:13},children:i}),(0,rp.jsx)(uh,{contentType:"mcpApp",contentConfig:l,isMatch:c,defaultName:i??n("mcpapp.fallbackTitle"),size:"small"}),(0,rp.jsx)(he,{type:"text",size:"small",icon:(0,rp.jsx)(fy,{}),onClick:s,title:n("mcpapp.openInSideApp")})]})};function op(e){if(typeof e=="string")return e;if(Array.isArray(e))return e.map(t=>{if(typeof t=="string")return t;if(t!==null&&typeof t=="object"){let r=t.text;if(typeof r=="string")return r}return""}).filter(t=>t.length>0).join(`
|
|
5256
5256
|
|
|
5257
5257
|
`);if(e!==null&&typeof e=="object"){let t=e.text;if(typeof t=="string")return t;try{let r=JSON.stringify(e);return typeof r=="string"?r:""}catch{return""}}return""}var QM=/```mcp_app\s*\n([\s\S]*?)```/;function nv(e){let t=op(e);if(!t)return null;let r=QM.exec(t);if(!r)return null;try{return $p(JSON.parse(r[1].trim()))}catch{return null}}function iv(e){let t=op(e);return t?t.replace(QM,"").trim():""}var wh=I(V()),uj="/mcp-apps/sandbox.html",pj=120,fj=1200,mj=320;function gj(e){let t=e.config?.baseURL;if(!t)return null;try{return new URL(t,window.location.origin).origin}catch{return null}}function hj(){return typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}var yj=e=>typeof e=="object"&&e!==null;function xj(e){let t=/^data:([^;,]*);base64,(.*)$/.exec(e);return t?{mimeType:t[1]||void 0,data:t[2]}:null}function vj(e){if(e.type==="image_url"){let t=yj(e.image_url)&&typeof e.image_url.url=="string"?e.image_url.url:"",r=t?xj(t):null;return r?{type:"image",data:r.data,mimeType:r.mimeType??"application/octet-stream"}:null}if(e.type==="image"||e.type==="audio"){let t=typeof e.mime_type=="string"?e.mime_type:typeof e.mimeType=="string"?e.mimeType:"application/octet-stream";return{type:e.type,data:e.data,mimeType:t}}return e.type==="resource"?{type:"resource",resource:e.resource}:e.type==="text"?{type:"text",text:e.text}:e}function bj(e,t,r){let o=r?.structuredContent!==void 0?r.structuredContent:t.kind==="mcp"?t.structuredContent:void 0,a=o!==void 0?{structuredContent:o}:{},n=r?.meta!==void 0?{_meta:r.meta}:{};if(e!==null&&typeof e=="object"&&!Array.isArray(e)&&"content"in e)return{...e,...a,...n};let i=[],s=iv(op(e));s&&i.push({type:"text",text:s});for(let l of r?.contentBlocks??[]){let c=vj(l);c&&i.push(c)}return i.length===0&&i.push({type:"text",text:""}),{content:i,...a,...n}}var lm=({uiRef:e,toolName:t,toolInput:r,toolResult:o,ui:a,onError:n})=>{let i=Mf(),s=i?.state.assistantId??"",l=Zt(s),{openSideApp:c}=Ir(),u=re(),f=(0,wi.useRef)(null),m=(0,wi.useRef)(null),[d,x]=(0,wi.useState)(null),[h,g]=(0,wi.useState)(mj),[v,C]=(0,wi.useState)(null),b=(0,wi.useMemo)(()=>gj(l),[l]),T=(0,wi.useRef)({client:l,uiRef:e,toolName:t,toolInput:r,toolResult:o,ui:a,thread:i,openSideApp:c,onError:n});return(0,wi.useEffect)(()=>{T.current={client:l,uiRef:e,toolName:t,toolInput:r,toolResult:o,ui:a,thread:i,openSideApp:c,onError:n}}),(0,wi.useEffect)(()=>{if(!b)return;let R=f.current;if(!R)return;let z=S=>{R.contentWindow?.postMessage(S,b)},F={rpc:(S,P)=>T.current.client.mcpApps.rpc(T.current.uiRef,S,P),openLink:S=>{window.open(S,"_blank","noopener,noreferrer")},sendMessage:async S=>{let P=T.current.thread?.sendMessage;P&&await P({input:{message:S}})},requestDisplayMode:async S=>{if(S!=="fullscreen"||!T.current.openSideApp)return"inline";try{let P={component_key:"mcp_app",data:TC(T.current.uiRef,T.current.toolInput,T.current.toolResult,T.current.ui),message:T.current.uiRef.title};return T.current.openSideApp(P),"fullscreen"}catch{return"inline"}},downloadFile:()=>{},onInitialized:()=>{z({jsonrpc:"2.0",method:"ui/notifications/tool-input",params:{arguments:T.current.toolInput??{}}}),z({jsonrpc:"2.0",method:"ui/notifications/tool-result",params:bj(T.current.toolResult,T.current.uiRef,T.current.ui)})},toolName:T.current.toolName,theme:hj(),locale:typeof navigator<"u"?navigator.language:void 0},E=new _x(F),U=!1,D=!1,L=async S=>{if(S.origin!==b||S.source!==R.contentWindow)return;let P=S.data;if(!P||typeof P!="object")return;if(!U){if(P.method!=="ui/notifications/sandbox-proxy-ready")return;U=!0;try{let _=await T.current.client.mcpApps.getResource(T.current.uiRef);if(D)return;z({jsonrpc:"2.0",method:"ui/notifications/sandbox-resource-ready",params:{html:_.html,csp:_.cspPolicy}})}catch(_){let j=_ instanceof Error?_:new Error(u("mcpapp.resourceLoadFailed"));C(j.message),T.current.onError?.(j)}return}if(P.method==="ui/notifications/size-changed"){let _=Number(P.params?.height);Number.isFinite(_)&&g(Math.min(fj,Math.max(pj,_)));return}let A=await E.handle(P);P.id!==void 0&&z(A)};return window.addEventListener("message",L),()=>{D=!0,window.removeEventListener("message",L)}},[b,u]),(0,wi.useEffect)(()=>{let R=m.current;if(!R||typeof ResizeObserver>"u")return;let z=R.closest(".ant-bubble")??R,F=new ResizeObserver(U=>{for(let D of U){let L=D.contentRect.width;L>0&&x(L)}});F.observe(z);let E=z.getBoundingClientRect().width;return E>0&&x(E),()=>F.disconnect()},[b,v]),b?v?(0,wh.jsx)(Ce.Text,{type:"secondary",children:u("mcpapp.failedToLoad",{error:v})}):(0,wh.jsx)("div",{ref:m,children:(0,wh.jsx)("iframe",{ref:f,title:e.title??u("mcpapp.fallbackTitle"),sandbox:"allow-scripts allow-same-origin",src:`${b}${uj}`,style:{width:d&&d>0?`${d}px`:"100%",height:h,border:0,display:"block"},onError:()=>n?.(new Error("MCP app failed to load"))})}):(0,wh.jsx)(Ce.Text,{type:"secondary",children:u("mcpapp.unavailable")})};var sv=I(V());function wj(e){return e.startsWith("data:")}function Cj(e){if(e.type==="image_url"){let a=e.image_url;return typeof a=="object"&&a!==null&&typeof a.url=="string"&&wj(a.url)?a.url:null}let t=typeof e.source_type=="string"?e.source_type:void 0;if(t!==void 0&&t!=="base64")return null;let r=typeof e.data=="string"?e.data:"";return!r||r.startsWith("http")?null:`data:${typeof e.mime_type=="string"?e.mime_type:typeof e.mimeType=="string"?e.mimeType:"application/octet-stream"};base64,${r}`}var e3=({ui:e})=>{let t=re(),r=(e?.contentBlocks??[]).filter(o=>o.type==="image"||o.type==="image_url"||o.type==="audio").map(o=>{let a=Cj(o);return a?{block:o,src:a}:null}).filter(o=>o!==null);return r.length===0?null:(0,sv.jsx)("div",{style:{marginTop:8,display:"flex",flexDirection:"column",gap:8},children:r.map(({block:o,src:a},n)=>o.type==="image"||o.type==="image_url"?(0,sv.jsx)("img",{src:a,alt:t("mcpapp.toolResultAlt"),style:{maxWidth:"100%"}},n):(0,sv.jsx)("audio",{controls:!0,src:a},n))})};var pc=I(le());var _r=I(V()),{Text:t3}=Ce,r3=e=>typeof e=="object"&&e!==null&&!Array.isArray(e)?e:void 0;function IC(e,t){if(e!=="manage_plugin")return null;let r=r3(t);if(r?.action!=="test")return null;let o=r3(r.target);if(o?.kind!=="tool")return null;let a=typeof r.type=="string"?r.type:"",n=typeof o.name=="string"?o.name:"";if(a===""||n==="")return null;let i=typeof o.connectionKey=="string"?o.connectionKey:void 0;return{pluginType:a,toolName:n,input:o.input,...i?{connectionKey:i}:{}}}function o3(e){if(typeof e=="string"){let t=e.trim();if(t==="")return"";try{return JSON.stringify(JSON.parse(t),null,2)}catch{return e}}try{return JSON.stringify(e??null,null,2)}catch{return String(e)}}var Sj=Re(({css:e,token:t})=>({card:e`
|
|
5258
5258
|
max-width: 100%;
|
|
@@ -6607,7 +6607,7 @@ svg { height:100%}
|
|
|
6607
6607
|
font-size: 12px;
|
|
6608
6608
|
`,metadata:t`
|
|
6609
6609
|
margin-top: ${e.marginXS}px;
|
|
6610
|
-
`})),vN=({data:e})=>{let{styles:t}=hU(),r=re(),{query:o,collection:a,results:n}=e??{};return!n||n.length===0?null:(0,Bl.jsx)("div",{className:t.container,children:(0,Bl.jsxs)(Er,{size:"small",title:r("genui.search.query",{query:o||""}),children:[a&&(0,Bl.jsx)(xN,{type:"secondary",style:{fontSize:12},children:r("genui.search.collection",{collection:a})}),n.map((i,s)=>(0,Bl.jsxs)(Er,{size:"small",className:t.resultCard,children:[(0,Bl.jsx)(gU,{ellipsis:{rows:3,expandable:!0,symbol:r("genui.search.more")},style:{marginBottom:4},children:i.content}),(0,Bl.jsxs)(Ye,{wrap:!0,className:t.metadata,children:[i.score!==void 0&&(0,Bl.jsx)(xN,{className:t.score,children:r("genui.search.score",{score:i.score.toFixed(4)})}),i.metadata&&Object.entries(i.metadata).filter(([l])=>!l.startsWith("_")).map(([l,c])=>(0,Bl.jsxs)(Pt,{children:[l,": ",String(c)]},l))]})]},s))]})})};var kh=I(V()),KC=e=>typeof e=="object"&&e!==null&&!Array.isArray(e)?e:void 0,bN=({data:e,component_key:t})=>{let r=$p(e);if(!r)return null;let o=KC(e);return(0,kh.jsxs)("div",{children:[(0,kh.jsx)(av,{uiRef:r,ui:KC(o?.ui),toolInput:KC(o?.toolInput),toolResult:o?.toolResult}),(0,kh.jsx)(bh,{data:e,component_key:t})]})};var cp=I(V()),yU=(0,mm.lazy)(()=>import("./embed-page-TasksSideApp-
|
|
6610
|
+
`})),vN=({data:e})=>{let{styles:t}=hU(),r=re(),{query:o,collection:a,results:n}=e??{};return!n||n.length===0?null:(0,Bl.jsx)("div",{className:t.container,children:(0,Bl.jsxs)(Er,{size:"small",title:r("genui.search.query",{query:o||""}),children:[a&&(0,Bl.jsx)(xN,{type:"secondary",style:{fontSize:12},children:r("genui.search.collection",{collection:a})}),n.map((i,s)=>(0,Bl.jsxs)(Er,{size:"small",className:t.resultCard,children:[(0,Bl.jsx)(gU,{ellipsis:{rows:3,expandable:!0,symbol:r("genui.search.more")},style:{marginBottom:4},children:i.content}),(0,Bl.jsxs)(Ye,{wrap:!0,className:t.metadata,children:[i.score!==void 0&&(0,Bl.jsx)(xN,{className:t.score,children:r("genui.search.score",{score:i.score.toFixed(4)})}),i.metadata&&Object.entries(i.metadata).filter(([l])=>!l.startsWith("_")).map(([l,c])=>(0,Bl.jsxs)(Pt,{children:[l,": ",String(c)]},l))]})]},s))]})})};var kh=I(V()),KC=e=>typeof e=="object"&&e!==null&&!Array.isArray(e)?e:void 0,bN=({data:e,component_key:t})=>{let r=$p(e);if(!r)return null;let o=KC(e);return(0,kh.jsxs)("div",{children:[(0,kh.jsx)(av,{uiRef:r,ui:KC(o?.ui),toolInput:KC(o?.toolInput),toolResult:o?.toolResult}),(0,kh.jsx)(bh,{data:e,component_key:t})]})};var cp=I(V()),yU=(0,mm.lazy)(()=>import("./embed-page-TasksSideApp-DA4LUTMD.js").then(e=>({default:e.TasksSideApp}))),xU=(0,mm.lazy)(()=>import("./embed-page-TeamWorkspace-DUB3L6V6.js").then(e=>({default:e.TeamWorkspace}))),Cv={action_show_attachments_uploader:{card_view:()=>null,action:e=>{console.log(e)}},generic_data_table:{card_view:oc,side_app_view:PR},confirm:{card_view:CR},clarify:{card_view:TR},task_review:{card_view:LR},tool_call:{card_view:n3},manage_eval:{card_view:l3,side_app_view:uv},run_eval:{card_view:g3,side_app_view:uv},read_eval:{card_view:h3,side_app_view:uv},manage_task:{card_view:w3,side_app_view:({data:e})=>(0,cp.jsx)(mm.Suspense,{fallback:(0,cp.jsx)(Ct,{style:{display:"block",margin:"auto"}}),children:(0,cp.jsx)(yU,{initialTask:e?.task})})},tool_card:{card_view:Nx},todo_list:{card_view:Gu},write_todos:{card_view:S3},internet_search:{card_view:V3},write_file:{card_view:A3},edit_file:{card_view:j3},file_explorer:{card_view:()=>null,side_app_view:T3},attachments:{card_view:hv,side_app_view:xv},file_content_diff_view:{card_view:OC,side_app_view:OC},task:{card_view:H3,side_app_view:W3},schedule_viewer:{card_view:()=>null,side_app_view:J3},browser_viewer:{card_view:Z3,side_app_view:xv},execute_code:{card_view:Q3},create_team:{card_view:eN},team_workspace:{card_view:()=>null,side_app_view:e=>(0,cp.jsx)(mm.Suspense,{fallback:(0,cp.jsx)(Ct,{style:{display:"block",margin:"auto"}}),children:(0,cp.jsx)(xU,{...e})})},task_board:{card_view:HC,side_app_view:HC},mailbox:{card_view:lN,side_app_view:pN},show_widget:{card_view:gN,side_app_view:yN},search_collection_result:{card_view:vN},mcp_app:{card_view:bN,side_app_view:bh}};var Os=e=>e&&Cv[e]?Cv[e]:null,p0=(e,t)=>(console.log("regsiterElement",e,t),Cv[e]=t,t);var dp=I(le());var xo=I(V()),vU=Re(({token:e,css:t})=>({container:t`
|
|
6611
6611
|
margin: 16px 0;
|
|
6612
6612
|
border: 1px solid ${e.colorBorderSecondary};
|
|
6613
6613
|
border-radius: ${e.borderRadius}px;
|
|
@@ -6636,7 +6636,7 @@ svg { height:100%}
|
|
|
6636
6636
|
background: ${e.colorBgContainer};
|
|
6637
6637
|
`,error:t`
|
|
6638
6638
|
padding: 24px;
|
|
6639
|
-
`}));function bU(e){let t="";if(typeof e=="string"?t=e.trim():Array.isArray(e)&&(t=e.join("").trim()),!t)return{};if(t.startsWith("{"))try{return JSON.parse(t)}catch{return{path:t}}return t.startsWith("http://")||t.startsWith("https://")?{url:t}:{path:t}}function wU(e){switch(Fd(e)){case"markdown":case"text":return(0,xo.jsx)(Dn,{});case"image":return(0,xo.jsx)(su,{});case"pdf":return(0,xo.jsx)(Kl,{});case"audio":return(0,xo.jsx)(_k,{});case"video":return(0,xo.jsx)(vy,{});default:{let r=e.split(".").pop()?.toLowerCase();return["doc","docx"].includes(r||"")?(0,xo.jsx)(Hp,{}):["xls","xlsx","csv"].includes(r||"")?(0,xo.jsx)(qp,{}):["zip","rar","7z","tar","gz"].includes(r||"")?(0,xo.jsx)(Wp,{}):(0,xo.jsx)(Bc,{})}}}var wN=({children:e})=>{let{styles:t}=vU(),{config:r}=Et(),{threadId:o,assistantId:a}=us()??{},n=re(),[i,s]=(0,dp.useState)(!1),l=(0,dp.useMemo)(()=>bU(e),[e]),c=(0,dp.useMemo)(()=>l.url?l.url:!l.path||!r?.baseURL||!a||!o?null:`${r.baseURL}/api/assistants/${a}/threads/${o}/sandbox/downloadfile?path=${encodeURIComponent(l.path)}`,[l,r?.baseURL,a,o]),u=(0,dp.useMemo)(()=>{if(l.title)return l.title;if(l.path)return l.path.split("/").pop()||l.path;if(l.url)try{return new URL(l.url).pathname.split("/").pop()||l.url}catch{return l.url}return n("genui.embed.defaultTitle")},[l,n]),f=(0,dp.useMemo)(()=>{let d=l.path||l.url||"";return wU(d)},[l]);if(!c)return(0,xo.jsx)("div",{className:t.error,children:(0,xo.jsx)(po,{message:n("genui.embed.invalidConfig"),description:n("genui.embed.invalidConfigHint"),type:"warning",showIcon:!0})});let m=(0,xo.jsx)("div",{className:t.content,children:(0,xo.jsx)(vh,{fileUrl:c,fileName:u})});return l.collapsed?(0,xo.jsx)(Zo,{size:"small",defaultActiveKey:["1"],items:[{key:"1",label:(0,xo.jsxs)("span",{style:{display:"flex",alignItems:"center",gap:8},children:[(0,xo.jsx)("span",{children:f}),(0,xo.jsx)("span",{children:u})]}),children:m}]}):(0,xo.jsxs)("div",{className:t.container,children:[(0,xo.jsxs)("div",{className:t.header,children:[(0,xo.jsx)("span",{className:t.headerIcon,children:f}),(0,xo.jsx)("span",{className:t.headerTitle,children:u}),(0,xo.jsx)(he,{type:"text",size:"small",icon:(0,xo.jsx)(Ls,{}),onClick:()=>s(!0),children:n("genui.share.action")})]}),m,i&&(0,xo.jsx)(Vf,{open:i,filePath:l.path??"",assistantId:a??void 0,fileName:u,onClose:()=>s(!1)})]})};var Ia=I(V()),CU=(0,Dl.lazy)(()=>import("./embed-page-mermaid-R7ZBUE3D.js")),SU=(0,Dl.lazy)(()=>import("./embed-page-ReactInfographic-5P36JLSX.js").then(e=>({default:e.ReactInfographic}))),kU=(0,Dl.lazy)(()=>import("./embed-page-ReactChart-
|
|
6639
|
+
`}));function bU(e){let t="";if(typeof e=="string"?t=e.trim():Array.isArray(e)&&(t=e.join("").trim()),!t)return{};if(t.startsWith("{"))try{return JSON.parse(t)}catch{return{path:t}}return t.startsWith("http://")||t.startsWith("https://")?{url:t}:{path:t}}function wU(e){switch(Fd(e)){case"markdown":case"text":return(0,xo.jsx)(Dn,{});case"image":return(0,xo.jsx)(su,{});case"pdf":return(0,xo.jsx)(Kl,{});case"audio":return(0,xo.jsx)(_k,{});case"video":return(0,xo.jsx)(vy,{});default:{let r=e.split(".").pop()?.toLowerCase();return["doc","docx"].includes(r||"")?(0,xo.jsx)(Hp,{}):["xls","xlsx","csv"].includes(r||"")?(0,xo.jsx)(qp,{}):["zip","rar","7z","tar","gz"].includes(r||"")?(0,xo.jsx)(Wp,{}):(0,xo.jsx)(Bc,{})}}}var wN=({children:e})=>{let{styles:t}=vU(),{config:r}=Et(),{threadId:o,assistantId:a}=us()??{},n=re(),[i,s]=(0,dp.useState)(!1),l=(0,dp.useMemo)(()=>bU(e),[e]),c=(0,dp.useMemo)(()=>l.url?l.url:!l.path||!r?.baseURL||!a||!o?null:`${r.baseURL}/api/assistants/${a}/threads/${o}/sandbox/downloadfile?path=${encodeURIComponent(l.path)}`,[l,r?.baseURL,a,o]),u=(0,dp.useMemo)(()=>{if(l.title)return l.title;if(l.path)return l.path.split("/").pop()||l.path;if(l.url)try{return new URL(l.url).pathname.split("/").pop()||l.url}catch{return l.url}return n("genui.embed.defaultTitle")},[l,n]),f=(0,dp.useMemo)(()=>{let d=l.path||l.url||"";return wU(d)},[l]);if(!c)return(0,xo.jsx)("div",{className:t.error,children:(0,xo.jsx)(po,{message:n("genui.embed.invalidConfig"),description:n("genui.embed.invalidConfigHint"),type:"warning",showIcon:!0})});let m=(0,xo.jsx)("div",{className:t.content,children:(0,xo.jsx)(vh,{fileUrl:c,fileName:u})});return l.collapsed?(0,xo.jsx)(Zo,{size:"small",defaultActiveKey:["1"],items:[{key:"1",label:(0,xo.jsxs)("span",{style:{display:"flex",alignItems:"center",gap:8},children:[(0,xo.jsx)("span",{children:f}),(0,xo.jsx)("span",{children:u})]}),children:m}]}):(0,xo.jsxs)("div",{className:t.container,children:[(0,xo.jsxs)("div",{className:t.header,children:[(0,xo.jsx)("span",{className:t.headerIcon,children:f}),(0,xo.jsx)("span",{className:t.headerTitle,children:u}),(0,xo.jsx)(he,{type:"text",size:"small",icon:(0,xo.jsx)(Ls,{}),onClick:()=>s(!0),children:n("genui.share.action")})]}),m,i&&(0,xo.jsx)(Vf,{open:i,filePath:l.path??"",assistantId:a??void 0,fileName:u,onClose:()=>s(!1)})]})};var Ia=I(V()),CU=(0,Dl.lazy)(()=>import("./embed-page-mermaid-R7ZBUE3D.js")),SU=(0,Dl.lazy)(()=>import("./embed-page-ReactInfographic-5P36JLSX.js").then(e=>({default:e.ReactInfographic}))),kU=(0,Dl.lazy)(()=>import("./embed-page-ReactChart-74MHCE2K.js").then(e=>({default:e.ReactChart})));function Th(){let e=re();return(0,Ia.jsx)("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",minHeight:200,color:"rgba(0, 0, 0, 0.45)",fontSize:13},children:e("common.loading")})}var CN=e=>{let{className:t,children:r}=e,o=t?.match(/language-(\w+)/)?.[1]||"",a;if(typeof r=="string"&&(a=r),Array.isArray(r)&&(a=r.join("")),o){let n=Os(o)?.card_view;if(n){let i;try{i=JSON.parse(a)}catch{}return o==="task_review"?(0,Ia.jsx)(n,{component_key:o,data:i,interactive:!1}):(0,Ia.jsx)(n,{component_key:o,data:i})}switch(o){case"infographic":return(0,Ia.jsx)(Dl.Suspense,{fallback:(0,Ia.jsx)(Th,{}),children:(0,Ia.jsx)(SU,{children:r})});case"mermaid":return(0,Ia.jsx)(Dl.Suspense,{fallback:(0,Ia.jsx)(Th,{}),children:(0,Ia.jsx)(CU,{children:r})});case"chart":return(0,Ia.jsx)(Dl.Suspense,{fallback:(0,Ia.jsx)(Th,{}),children:(0,Ia.jsx)(kU,{children:r})});case"embed":return(0,Ia.jsx)(wN,{children:r});default:return(0,Ia.jsx)(Dl.Suspense,{fallback:(0,Ia.jsx)(Th,{}),children:(0,Ia.jsx)(U2,{lang:o,children:r})})}}return(0,Ia.jsx)(Dl.Suspense,{fallback:(0,Ia.jsx)(Th,{}),children:(0,Ia.jsx)(U2,{lang:o,children:r})})};var XC=I(V()),Sv=e=>t=>{if(!t)return null;let{className:r,children:o}=t,a;if(typeof o=="string"?a=o:Array.isArray(o)&&(a=o.join("")),!a)return(0,XC.jsx)(e,{component_key:r,data:void 0});let n;try{n=JSON.parse(a)}catch{n=a}return(0,XC.jsx)(e,{component_key:r,data:n})};var kv=I(le());var gm=I(V()),SN=({data:e})=>{if(!e)return null;if(!qM(e))return(0,gm.jsx)(gm.Fragment,{children:e});let t=qt(),{threadId:r,assistantId:o}=us()??{},{config:a}=Et(),n=re(),i=(0,kv.useMemo)(()=>!a?.baseURL||!o||!r?null:`${a.baseURL}/api/assistants/${o}/threads/${r}/sandbox/downloadfile`,[a?.baseURL,o,r]),s=(0,kv.useCallback)(l=>{if(!i)return;let c=new URLSearchParams({path:l}),u=`${i}?${c.toString()}`,f=l.split("/").pop()??l,m=n("genui.attachment.preview",{name:f});t({component_key:"attachments",data:{file_id:l,message:m,full_url:u,download_url:u},message:m})},[i,t,n]);return i?(0,gm.jsx)(he,{type:"link",size:"small",onClick:()=>s(e),children:e}):(0,gm.jsx)("span",{children:e})};var hm=I(le());var YC=I(V()),TU=/\/api\/web-apps\/[^/]+\/runtime$/,kN=({data:e})=>{if(e==null)return null;let t=typeof e=="string"?e:String(e??"");if(t.length===0)return null;let r=qt(),{threadId:o,assistantId:a}=us()??{},{config:n}=Et(),i=(0,hm.useContext)(ui),s=re(),l=(0,hm.useMemo)(()=>{if(i?.workspaceId&&i?.projectId){let m=i.getFileViewUrl(t,a||void 0),d=i.getFileDownloadUrl(t,a||void 0);if(m&&d)return{fullUrl:m,downloadUrl:d}}if(!n?.baseURL)return null;let u=new URLSearchParams({path:t});if(TU.test(n.baseURL)){let m=n.baseURL.replace(/\/$/,"");return{fullUrl:`${m}/files/viewfile?${u.toString()}`,downloadUrl:`${m}/files/downloadfile?${u.toString()}`}}if(!a||!o)return null;let f=`${n.baseURL}/api/assistants/${a}/threads/${o}/sandbox/downloadfile?${u.toString()}`;return{fullUrl:f,downloadUrl:f}},[i,n?.baseURL,a,o,t]),c=(0,hm.useCallback)(()=>{if(!l)return;let u=s("genui.attachment.preview",{name:t.split("/").pop()??t});r({component_key:"attachments",data:{file_id:t,message:u,full_url:l.fullUrl,download_url:l.downloadUrl},message:u})},[l,t,r,s]);return l?(0,YC.jsx)(he,{type:"link",size:"small",onClick:c,children:t}):(0,YC.jsx)("span",{children:t})};var TN=I(le());var RN=I(V()),IU=e=>{if(!e||!e.children)return null;let t=[],r=[],o=e.children.find(n=>n.name==="thead"),a=e.children.find(n=>n.name==="tbody");if(o&&o.children){let n=o.children.find(i=>i.name==="tr");n&&n.children&&n.children.forEach(i=>{if(i.name==="th"&&i.children){let s=i.children.map(l=>l.type==="text"?l.data:l.children?l.children.map(c=>c.type==="text"?c.data:"").join(""):"").join("").trim();t.push(s)}})}if(a&&a.children&&a.children.forEach(n=>{if(n.name==="tr"&&n.children){let i={},s=0;n.children.forEach(l=>{if(l.name==="td"&&s<t.length){let c=l.children.map(f=>f.type==="text"?f.data:f.children?f.children.map(m=>m.type==="text"?m.data:"").join(""):"").join("").trim(),u=t[s]||`col_${s}`;i[u]=c,s++}}),Object.keys(i).length>0&&r.push(i)}}),t.length===0&&r.length>0){let n=r[0];return{headers:Object.keys(n),dataSource:r}}return{headers:t,dataSource:r}},IN=e=>{let{domNode:t}=e,r=(0,TN.useMemo)(()=>IU(t),[t]);return!r||r.dataSource.length===0?null:(0,RN.jsx)(oc,{component_key:"markdown_table",data:{dataSource:r.dataSource,message:""},interactive:!0,default_open_in_side_app:!0})};var RU=Sv(oc),LU=Sv(SN),PU=Sv(kN),LN={code:CN,file:LU,filelink:PU,genericdatatable:RU,table:IN};var JC="\uE000",AU=new Set(["code","codespan","html","table","def","hr","link","image","autolink","url","escape"]),MN="[A-Za-z0-9_.\\-~\\u4e00-\\u9fff]",MU=new RegExp(`^${MN}$`),PN=["project","agent","root"];function AN(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function NU(e){return Array.isArray(e.items)&&e.items.length>0?e.items:Array.isArray(e.tokens)&&e.tokens.length>0?e.tokens:null}function NN(e,t,r,o){let a=r.start;for(let n of t){let i=n.raw??"";if(i.length===0)continue;let s=e.indexOf(i,a);if(s<r.start||s+i.length>r.end){o.push({start:a,end:r.end});return}if(AU.has(n.type))o.push({start:s,end:s+i.length});else{let l=NU(n);l&&NN(e,l,{start:s,end:s+i.length},o)}a=s+i.length}}function EN(e,t){if(typeof e!="string"||e.length===0||e.includes(JC))return e;let r=(t?.volumes&&t.volumes.length>0?t.volumes:PN).map(h=>h.replace(/^\/+|\/+$/g,"")).filter(h=>h.length>0).map(AN);r.length===0&&(r=PN.map(AN));let o;try{o=gI(e)}catch{return e}let a=[];NN(e,o,{start:0,end:e.length},a);let n=[],i="",s=0;for(let h of a)i+=e.slice(s,h.start)+JC,n.push(e.slice(h.start,h.end)),s=h.end;i+=e.slice(s);let l=new RegExp(`(?<![A-Za-z0-9_:/.])/(?:${r.join("|")})(?:/${MN}+)+`,"g"),c="",u=0,f=!1,m;for(;(m=l.exec(i))!==null;){let h=i[l.lastIndex];if(h!==void 0&&MU.test(h))continue;let g=m[0].replace(/\.+$/,"");g!==m[0]&&!g.includes("/")||(c+=i.slice(u,m.index),c+=`<filelink>${g}</filelink>`,u=l.lastIndex,f=!0)}if(!f)return e;c+=i.slice(u);let d=c.split(JC),x="";for(let h=0;h<d.length;h+=1)x+=d[h],h<n.length&&(x+=n[h]);return x}var up=I(V()),EU=LN,FU=Re(({token:e,css:t})=>({markdownContainer:t`
|
|
6640
6640
|
white-space: normal;
|
|
6641
6641
|
|
|
6642
6642
|
h1,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_a as M,ab as N,bb as S,eb as z,fb as w,k as $,m as L,ra as D}from"./embed-page-chunk-
|
|
1
|
+
import{_a as M,ab as N,bb as S,eb as z,fb as w,k as $,m as L,ra as D}from"./embed-page-chunk-P477ZTUO.js";import{r as v}from"./embed-page-chunk-2PFKLMTR.js";import{a as B}from"./embed-page-chunk-QV7QAJ4N.js";import{Fa as P,La as R,Z as C,va as O}from"./embed-page-chunk-MHGVD4EV.js";import{a as Y}from"./embed-page-chunk-R5QL57JJ.js";import{f as I}from"./embed-page-chunk-QBTAJ2YI.js";var f=I(Y());function q(t,o){if(t.parentId&&t.parentId!==t.id&&o.has(t.parentId))return t.parentId;for(let c of t.dependencies??[])if(c!==t.id&&o.has(c))return c}function A(t,o){let u=o?.hideCompleted??!1?t.filter(e=>!w(e.status)):t,g=new Map(u.map(e=>[e.id,e])),p=new Map;for(let e of u)p.set(e.id,q(e,g));let l=new Set;for(let e of p.keys()){if(l.has(e))continue;let n=new Map,d=e,y=0;for(;d!==void 0&&!l.has(d)&&!n.has(d);)n.set(d,y),y+=1,d=p.get(d);if(d!==void 0&&n.has(d)){let h=n.get(d);for(let[x,s]of n)s>=h&&l.add(x)}}for(let e of l)p.set(e,void 0);let m=new Map;for(let e of u)m.set(e.id,[]);for(let e of u){let n=p.get(e.id);n!==void 0&&m.get(n).push(e.id)}let r=e=>({task:g.get(e),children:(m.get(e)??[]).map(r)});return u.filter(e=>p.get(e.id)===void 0).map(e=>r(e.id))}var i=I(B()),{Text:E}=R,J=16,K=3,Q=D(({css:t,token:o})=>({root:t`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
height: 100%;
|
package/dist/embed-page.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{b as h}from"./embed-page-chunk-
|
|
1
|
+
import{b as h}from"./embed-page-chunk-DWIBLGBW.js";import"./embed-page-chunk-P477ZTUO.js";import"./embed-page-chunk-2PFKLMTR.js";import{a as E}from"./embed-page-chunk-QV7QAJ4N.js";import"./embed-page-chunk-VW3NF5NT.js";import"./embed-page-chunk-QULNM5O2.js";import{a as b}from"./embed-page-chunk-MHGVD4EV.js";import"./embed-page-chunk-R5QL57JJ.js";import"./embed-page-chunk-QOWM3LMZ.js";import"./embed-page-chunk-EUOOO2LS.js";import"./embed-page-chunk-5JDQ456X.js";import{b as f}from"./embed-page-chunk-HYPA2PHA.js";import{c as z,f as l}from"./embed-page-chunk-QBTAJ2YI.js";var x=z(m=>{"use strict";var y=b();m.createRoot=y.createRoot,m.hydrateRoot=y.hydrateRoot;var te});var T=l(x()),M=l(b());var w="axiom-web-app-embed";var _=["axiom:hello","axiom:identity","axiom:send","axiom:config"];function R(e,t){return{source:w,version:1,type:e,payload:t}}var B=6,H=40,Q=500;function q(e){if(typeof e!="object"||e===null||Array.isArray(e))return!1;let t=e,n=Object.keys(t);return n.length!==2||!n.includes("label")||!n.includes("text")?!1:typeof t.label=="string"&&t.label.length>=1&&t.label.length<=H&&typeof t.text=="string"&&t.text.length>=1&&t.text.length<=Q}function G(e){if(!Array.isArray(e))return[];let t=[];for(let n of e){if(t.length>=B)break;q(n)&&t.push({label:n.label,text:n.text})}return t}function C(e){if(typeof e!="object"||e===null)return null;let t=e,n={};if(typeof t.welcome=="string"&&t.welcome.length>0&&(n.welcome=t.welcome),Array.isArray(t.quicks)){let a=G(t.quicks);(a.length>0||t.quicks.length===0)&&(n.quicks=a)}return n.welcome===void 0&&n.quicks===void 0?null:n}function A(e,t){if(typeof e!="object"||e===null)return null;let n=e;return n.source!==w||n.version!==1||typeof n.type!="string"||!t.includes(n.type)?null:{type:n.type,payload:n.payload}}var r=l(E()),S=/^[A-Za-z0-9._:@-]{1,128}$/,v="axiom-embed-root",k="axiom-embed-style",P=32768,j=`
|
|
2
2
|
html, body, #${v} { height: 100%; margin: 0; }
|
|
3
3
|
.axiom-embed-fill { height: 100% !important; min-height: 0 !important; }
|
|
4
4
|
.axiom-embed-card { display: flex; align-items: center; justify-content: center; height: 100%; margin: 0; font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; font-size: 14px; color: #64748b; padding: 24px; box-sizing: border-box; text-align: center; }
|
package/dist/index.d.mts
CHANGED
|
@@ -7068,29 +7068,9 @@ interface AgentGraphData {
|
|
|
7068
7068
|
}
|
|
7069
7069
|
type DetailTab = "graph" | "overview" | "configuration" | "playground" | "eval" | "web-apps";
|
|
7070
7070
|
|
|
7071
|
-
interface AgentCardStatsData {
|
|
7072
|
-
id: string;
|
|
7073
|
-
threadCount: number;
|
|
7074
|
-
last7d: number;
|
|
7075
|
-
last30d: number;
|
|
7076
|
-
lastActive: string | null;
|
|
7077
|
-
daily7d: number[];
|
|
7078
|
-
daily30d: number[];
|
|
7079
|
-
evalScore: number | null;
|
|
7080
|
-
evalPassRate: number | null;
|
|
7081
|
-
evalRuns: number;
|
|
7082
|
-
evalTrend: number[];
|
|
7083
|
-
}
|
|
7084
|
-
declare const AgentCardStats: React__default.FC<{
|
|
7085
|
-
stats?: AgentCardStatsData | null;
|
|
7086
|
-
}>;
|
|
7087
|
-
|
|
7088
7071
|
interface AgentListProps {
|
|
7089
7072
|
items: AgentListItem[];
|
|
7090
7073
|
assistants?: Assistant[];
|
|
7091
|
-
stats?: Record<string, AgentCardStatsData>;
|
|
7092
|
-
/** When the server-side stats cache expires (ISO) — shown as a refresh hint. */
|
|
7093
|
-
statsExpiresAt?: string | null;
|
|
7094
7074
|
loading: boolean;
|
|
7095
7075
|
onItemClick: (id: string) => void;
|
|
7096
7076
|
onOpenPlayground: (id: string) => void;
|
|
@@ -7194,6 +7174,23 @@ interface EvalQualityData {
|
|
|
7194
7174
|
}
|
|
7195
7175
|
declare const AgentOverview: React__default.FC<AgentOverviewProps>;
|
|
7196
7176
|
|
|
7177
|
+
interface AgentCardStatsData {
|
|
7178
|
+
id: string;
|
|
7179
|
+
threadCount: number;
|
|
7180
|
+
last7d: number;
|
|
7181
|
+
last30d: number;
|
|
7182
|
+
lastActive: string | null;
|
|
7183
|
+
daily7d: number[];
|
|
7184
|
+
daily30d: number[];
|
|
7185
|
+
evalScore: number | null;
|
|
7186
|
+
evalPassRate: number | null;
|
|
7187
|
+
evalRuns: number;
|
|
7188
|
+
evalTrend: number[];
|
|
7189
|
+
}
|
|
7190
|
+
declare const AgentCardStats: React__default.FC<{
|
|
7191
|
+
stats?: AgentCardStatsData | null;
|
|
7192
|
+
}>;
|
|
7193
|
+
|
|
7197
7194
|
/** Translator threaded from the render site (module-level builders must not call `useT`). */
|
|
7198
7195
|
type Translate = (key: TranslationKey) => string;
|
|
7199
7196
|
type ConfigNodeType = "agent" | "tool" | "capability" | "subagent" | "skill" | "model" | "eval";
|
package/dist/index.d.ts
CHANGED
|
@@ -7068,29 +7068,9 @@ interface AgentGraphData {
|
|
|
7068
7068
|
}
|
|
7069
7069
|
type DetailTab = "graph" | "overview" | "configuration" | "playground" | "eval" | "web-apps";
|
|
7070
7070
|
|
|
7071
|
-
interface AgentCardStatsData {
|
|
7072
|
-
id: string;
|
|
7073
|
-
threadCount: number;
|
|
7074
|
-
last7d: number;
|
|
7075
|
-
last30d: number;
|
|
7076
|
-
lastActive: string | null;
|
|
7077
|
-
daily7d: number[];
|
|
7078
|
-
daily30d: number[];
|
|
7079
|
-
evalScore: number | null;
|
|
7080
|
-
evalPassRate: number | null;
|
|
7081
|
-
evalRuns: number;
|
|
7082
|
-
evalTrend: number[];
|
|
7083
|
-
}
|
|
7084
|
-
declare const AgentCardStats: React__default.FC<{
|
|
7085
|
-
stats?: AgentCardStatsData | null;
|
|
7086
|
-
}>;
|
|
7087
|
-
|
|
7088
7071
|
interface AgentListProps {
|
|
7089
7072
|
items: AgentListItem[];
|
|
7090
7073
|
assistants?: Assistant[];
|
|
7091
|
-
stats?: Record<string, AgentCardStatsData>;
|
|
7092
|
-
/** When the server-side stats cache expires (ISO) — shown as a refresh hint. */
|
|
7093
|
-
statsExpiresAt?: string | null;
|
|
7094
7074
|
loading: boolean;
|
|
7095
7075
|
onItemClick: (id: string) => void;
|
|
7096
7076
|
onOpenPlayground: (id: string) => void;
|
|
@@ -7194,6 +7174,23 @@ interface EvalQualityData {
|
|
|
7194
7174
|
}
|
|
7195
7175
|
declare const AgentOverview: React__default.FC<AgentOverviewProps>;
|
|
7196
7176
|
|
|
7177
|
+
interface AgentCardStatsData {
|
|
7178
|
+
id: string;
|
|
7179
|
+
threadCount: number;
|
|
7180
|
+
last7d: number;
|
|
7181
|
+
last30d: number;
|
|
7182
|
+
lastActive: string | null;
|
|
7183
|
+
daily7d: number[];
|
|
7184
|
+
daily30d: number[];
|
|
7185
|
+
evalScore: number | null;
|
|
7186
|
+
evalPassRate: number | null;
|
|
7187
|
+
evalRuns: number;
|
|
7188
|
+
evalTrend: number[];
|
|
7189
|
+
}
|
|
7190
|
+
declare const AgentCardStats: React__default.FC<{
|
|
7191
|
+
stats?: AgentCardStatsData | null;
|
|
7192
|
+
}>;
|
|
7193
|
+
|
|
7197
7194
|
/** Translator threaded from the render site (module-level builders must not call `useT`). */
|
|
7198
7195
|
type Translate = (key: TranslationKey) => string;
|
|
7199
7196
|
type ConfigNodeType = "agent" | "tool" | "capability" | "subagent" | "skill" | "model" | "eval";
|