arize-phoenix 11.25.0__py3-none-any.whl → 11.26.0__py3-none-any.whl

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.

Potentially problematic release.


This version of arize-phoenix might be problematic. Click here for more details.

@@ -1,4 +1,4 @@
1
- import{U as g,j as o,c_ as f,eD as h,eE as v,eF as y,l as r,cl as x,eG as a,r as z,o as w,eH as P}from"./vendor-RdRDaQiR.js";import{r as k,s as S}from"./vendor-arizeai-DsYDNOqt.js";import{L,g as C,r as R,h as j,i as E,F as I,j as D,P as A,k as F,M as t,l as T,D as G,n as M,E as _,o as O,p as N,q as V,s as q,t as d,v as U,w as W,x as B,y as $,z as H,B as K,C as Y,G as J,H as Q,I as X,J as Z,K as oo,N as ao,O as lo,Q as ro,U as co,V as go,W as m,X as p,Y as eo,Z as bo,_ as no,$ as io,a0 as so,a1 as to,a2 as mo,a3 as po,a4 as uo,a5 as fo,a6 as ho,a7 as vo,a8 as yo,a9 as xo,aa as zo,ab as wo,ac as Po,ad as ko,ae as So,af as Lo,ag as Co,ah as Ro,ai as jo,aj as Eo,ak as Io,al as Do,am as Ao,an as Fo,ao as To,ap as Go,aq as Mo,ar as _o,as as Oo,at as No,au as Vo,av as qo,aw as Uo,ax as Wo,ay as n,az as Bo,aA as $o,aB as Ho,aC as Ko,aD as Yo,aE as Jo}from"./pages-Dz3WExiG.js";import{fR as Qo,cY as Xo,U as Zo,fS as oa,fT as aa,fU as la}from"./components-Dpf_EwE7.js";import"./vendor-three-BLWp5bic.js";import"./vendor-codemirror-BzJDUbEx.js";import"./vendor-shiki-BAcocHFl.js";import"./vendor-recharts-BTHn5Y2R.js";(function(){const b=document.createElement("link").relList;if(b&&b.supports&&b.supports("modulepreload"))return;for(const c of document.querySelectorAll('link[rel="modulepreload"]'))s(c);new MutationObserver(c=>{for(const e of c)if(e.type==="childList")for(const i of e.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&s(i)}).observe(document,{childList:!0,subtree:!0});function u(c){const e={};return c.integrity&&(e.integrity=c.integrity),c.referrerPolicy&&(e.referrerPolicy=c.referrerPolicy),c.crossOrigin==="use-credentials"?e.credentials="include":c.crossOrigin==="anonymous"?e.credentials="omit":e.credentials="same-origin",e}function s(c){if(c.ep)return;c.ep=!0;const e=u(c);fetch(c.href,e)}})();const ra=g`
1
+ import{U as g,j as o,c_ as f,eD as h,eE as v,eF as y,l as r,cl as x,eG as a,r as z,o as w,eH as P}from"./vendor-RdRDaQiR.js";import{r as k,s as S}from"./vendor-arizeai-DsYDNOqt.js";import{L,g as C,r as R,h as j,i as E,F as I,j as D,P as A,k as F,M as t,l as T,D as G,n as M,E as _,o as O,p as N,q as V,s as q,t as d,v as U,w as W,x as B,y as $,z as H,B as K,C as Y,G as J,H as Q,I as X,J as Z,K as oo,N as ao,O as lo,Q as ro,U as co,V as go,W as m,X as p,Y as eo,Z as bo,_ as no,$ as io,a0 as so,a1 as to,a2 as mo,a3 as po,a4 as uo,a5 as fo,a6 as ho,a7 as vo,a8 as yo,a9 as xo,aa as zo,ab as wo,ac as Po,ad as ko,ae as So,af as Lo,ag as Co,ah as Ro,ai as jo,aj as Eo,ak as Io,al as Do,am as Ao,an as Fo,ao as To,ap as Go,aq as Mo,ar as _o,as as Oo,at as No,au as Vo,av as qo,aw as Uo,ax as Wo,ay as n,az as Bo,aA as $o,aB as Ho,aC as Ko,aD as Yo,aE as Jo}from"./pages-D19Jzk-2.js";import{fR as Qo,cY as Xo,U as Zo,fS as oa,fT as aa,fU as la}from"./components-BC-SDWO9.js";import"./vendor-three-BLWp5bic.js";import"./vendor-codemirror-BzJDUbEx.js";import"./vendor-shiki-BAcocHFl.js";import"./vendor-recharts-BTHn5Y2R.js";(function(){const b=document.createElement("link").relList;if(b&&b.supports&&b.supports("modulepreload"))return;for(const c of document.querySelectorAll('link[rel="modulepreload"]'))s(c);new MutationObserver(c=>{for(const e of c)if(e.type==="childList")for(const i of e.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&s(i)}).observe(document,{childList:!0,subtree:!0});function u(c){const e={};return c.integrity&&(e.integrity=c.integrity),c.referrerPolicy&&(e.referrerPolicy=c.referrerPolicy),c.crossOrigin==="use-credentials"?e.credentials="include":c.crossOrigin==="anonymous"?e.credentials="omit":e.credentials="same-origin",e}function s(c){if(c.ep)return;c.ep=!0;const e=u(c);fetch(c.href,e)}})();const ra=g`
2
2
  :root,
3
3
  .ac-theme {
4
4
  --ac-global-dimension-scale-factor: 1;
@@ -1,4 +1,4 @@
1
- import{K as te,D as be,bG as Ne,I as pn,B as ir,bH as Sn,J as Ot,P as rr,bI as vn,M as Dl,E as ys,H as fs,bJ as nt,bK as at,bL as Rt,N as Na,O as ct,r as y,j as e,u as ut,o as P,l as o,ar as Z,b5 as Me,b6 as Tn,b8 as Ve,b9 as Y,az as Kn,a6 as W,bM as nn,q as Ge,au as on,bN as Bi,ay as G,a7 as oe,a8 as xe,b4 as Da,U as T,a4 as ae,$ as Se,bO as mt,bP as hf,bQ as kf,bR as bf,bF as rn,av as _l,bS as io,aA as hs,aw as ks,ax as bs,bT as Sf,bU as or,bV as Qt,bW as vf,bX as we,aZ as Jt,bY as an,bZ as Cf,Q as Ff,ba as qn,b_ as Tf,bc as Kf,b$ as Pf,Z as ro,bl as Ke,bp as wl,c0 as Un,bk as Xe,bj as la,c1 as dn,R as ka,m as Ss,W as xf,a5 as cl,V as oo,bh as vs,aY as ul,X as If,c2 as Lf,c3 as xi,c4 as Ii,c5 as Ul,aR as Bt,t as gt,c6 as Df,ah as qt,c7 as _f,c8 as so,c9 as wf,ca as Ef,cb as Af,cc as Rf,cd as Mf,ce as Vf,cf as zf,cg as Nf,ch as $f,ci as qa,T as jf,cj as Of,g as Cs,ck as Qf,b2 as Zt,cl as Fs,cm as Ts,cn as Bf,co as qf,cp as Uf,cq as Hf,cr as Gf,n as Wf,cs as Jf,aS as Zf}from"./vendor-RdRDaQiR.js";import{k as Za,T as sr,l as Xf,g as Ks,P as Ps,h as yl,i as pt,a as El,_ as fl,j as Xt,m as Yf,n as dr,D as eh,A as nh,o as xs,u as ah,p as lh,q as co}from"./vendor-arizeai-DsYDNOqt.js";import{s as th,l as ih,j as cr,a as fn,i as ur,b as rh,c as oh,d as fa,e as ba,f as Is,D as Ls,g as Oa,h as Fl,C as Mt,k as sh,m as Qe,T as On,n as dh,o as mr,p as uo,q as ch,r as mo,t as uh,u as mh,v as gh,P as yt,w as ph,G as Ua,_ as b,x as C,y as gr,z as A,I as D,E as Xa,A as le,B as ee,F as hn,H,J as ue,K as me,L as ye,M as fe,N as F,O as ge,Q as X,R as Ds,S as _s,U as De,V as _e,W as Fe,X as ce,Y as go,Z as po,$ as Pa,a0 as gn,a1 as ea,a2 as kn,a3 as bn,a4 as An,a5 as Sa,a6 as ft,a7 as yn,a8 as _n,a9 as Ya,aa as Oe,ab as Ue,ac as je,ad as re,ae as he,af as Wn,ag as ht,ah as ws,ai as sn,aj as Es,ak as un,al as $e,am as pr,an as _a,ao as As,ap as Rs,aq as In,ar as de,as as Ce,at as Ln,au as lt,av as ke,aw as We,ax as yh,ay as fh,az as Ms,aA as qi,aB as yr,aC as Yt,aD as hh,aE as kh,aF as Ui,aG as xt,aH as Vs,aI as Le,aJ as qe,aK as ml,aL as ma,aM as il,aN as bh,aO as Sh,aP as zs,aQ as Ie,aR as Ns,aS as yo,aT as tt,aU as wn,aV as va,aW as cn,aX as vh,aY as kt,aZ as gl,a_ as ta,a$ as Yn,b0 as Fn,b1 as Pn,b2 as oa,b3 as Vn,b4 as zn,b5 as Nn,b6 as ei,b7 as en,b8 as na,b9 as ni,ba as Ch,bb as Fh,bc as Th,bd as Kh,be as Ph,bf as Al,bg as Fa,bh as wa,bi as $s,bj as js,bk as xh,bl as Ih,bm as Lh,bn as Dh,bo as Dn,bp as aa,bq as _h,br as ua,bs as wh,bt as Os,bu as fr,bv as el,bw as hr,bx as kr,by as Eh,bz as Qs,bA as Ah,bB as Rh,bC as Mh,bD as Vh,bE as zh,bF as Nh,bG as $h,bH as jh,bI as Oh,bJ as Qh,bK as it,bL as Bh,bM as ai,bN as li,bO as Ee,bP as Hi,bQ as Ae,bR as Re,bS as Qn,bT as qh,bU as Uh,bV as Hh,bW as Hn,bX as Gh,bY as Wh,bZ as Jh,b_ as ti,b$ as ii,c0 as Bs,c1 as Zh,c2 as Xh,c3 as Yh,c4 as ek,c5 as nk,c6 as bt,c7 as ak,c8 as qs,c9 as ri,ca as ia,cb as lk,cc as tk,cd as ik,ce as xa,cf as Us,cg as En,ch as mn,ci as rk,cj as Rl,ck as St,cl as hl,cm as Hs,cn as ra,co as br,cp as ol,cq as ok,cr as sl,cs as sk,ct as Ml,cu as Sr,cv as oi,cw as si,cx as di,cy as Gi,cz as ci,cA as Gs,cB as ui,cC as vr,cD as dk,cE as Ws,cF as Js,cG as fo,cH as ho,cI as ck,cJ as rt,cK as Wi,cL as mi,cM as Il,cN as uk,cO as mk,cP as Vl,cQ as gk,cR as pk,cS as ot,cT as Zs,cU as yk,cV as Xs,cW as zl,cX as gi,cY as Jn,cZ as fk,c_ as hk,c$ as Gn,d0 as Ca,d1 as Ha,d2 as Nl,d3 as Ys,d4 as Cr,d5 as kk,d6 as bk,d7 as Sk,d8 as ed,d9 as vk,da as Ck,db as Fk,dc as Tk,dd as Kl,de as Fr,df as nd,dg as ad,dh as ld,di as Ll,dj as Cn,dk as td,dl as id,dm as Ji,dn as Kk,dp as Pk,dq as xk,dr as Tr,ds as Ik,dt as Lk,du as Dk,dv as pi,dw as _k,dx as rd,dy as wk,dz as Ek,dA as Ak,dB as Rk,dC as Mk,dD as Vk,dE as zk,dF as Nk,dG as $k,dH as Vt,dI as yi,dJ as ko,dK as jk,dL as od,dM as Kr,dN as sd,dO as Ta,dP as Ea,dQ as Pr,dR as dd,dS as cd,dT as bo,dU as So,dV as Ok,dW as Qk,dX as pe,dY as fi,dZ as $l,d_ as ud,d$ as jl,e0 as Ol,e1 as md,e2 as gd,e3 as Bk,e4 as qk,e5 as xr,e6 as Uk,e7 as Hk,e8 as Gk,e9 as Wk,ea as Jk,eb as Qa,ec as pd,ed as yd,ee as Zk,ef as Xk,eg as vo,eh as Yk,ei as e0,ej as n0,ek as a0,el as l0,em as t0,en as fd,eo as i0,ep as r0,eq as o0,er as s0,es as d0,et as He,eu as hd,ev as Tl,ew as Aa,ex as c0,ey as u0,ez as Ir,eA as hi,eB as ga,eC as Ut,eD as kd,eE as m0,eF as g0,eG as p0,eH as bd,eI as Sd,eJ as y0,eK as f0,eL as h0,eM as ki,eN as Zi,eO as vd,eP as Lr,eQ as Dr,eR as Cd,eS as k0,eT as Co,eU as b0,eV as Zn,eW as Ka,eX as Ra,eY as vt,eZ as S0,e_ as zt,e$ as v0,f0 as C0,f1 as F0,f2 as T0,f3 as _r,f4 as Ht,f5 as K0,f6 as P0,f7 as Fo,f8 as Fd,f9 as x0,fa as wr,fb as Er,fc as I0,fd as Pl,fe as L0,ff as D0,fg as Ar,fh as st,fi as _0,fj as w0,fk as E0,fl as A0,fm as R0,fn as M0,fo as Td,fp as Ql,fq as V0,fr as z0,fs as N0,ft as $0,fu as j0,fv as O0,fw as Q0,fx as B0,fy as q0,fz as U0,fA as H0,fB as G0,fC as Li,fD as W0,fE as J0,fF as To,fG as Ko,fH as Z0,fI as X0,fJ as Y0,fK as eb,fL as Kd,fM as nb,fN as ab,fO as lb,fP as Po,fQ as xo}from"./components-Dpf_EwE7.js";import{m as nl,n as al,j as tb,E as Pd,R as ll,k as Rr,d as ib,p as Ct,q as xd}from"./vendor-codemirror-BzJDUbEx.js";import{P as Id,C as Ld,T as Je,a as Dd,R as Ze,X as ln,Y as Be,b as tn,B as ze,c as Rn,d as kl,A as dt,e as _d,L as wd,f as Xn,g as $n,h as rb}from"./vendor-recharts-BTHn5Y2R.js";const ob=4,sb="Unable to parse span input messages, expected messages which include a role and content.",db="Unable to parse span output messages, expected messages which include a role and content.",cb="Unable to parse span output expected output.value to be present.",ub="Unable to parse span attributes, attributes must be valid JSON.",mb="Unable to parse model config, expected llm.model_name to be present.",gb="Unable to parse model config, expected llm.invocation_parameters JSON string to be present.",pb="Unable to parse invocation parameters response_format, expected llm.invocation_parameters.response_format to be a well formed json object or undefined.",yb="Unable to parse tools, expected tools to be an array of valid tools.",fb="Unable to parse prompt template variables, expected prompt template variables to be a valid JSON object string.",Io={AZURE_OPENAI:[],ANTHROPIC:["claude"],OPENAI:["gpt","o1"],GOOGLE:["gemini"],DEEPSEEK:["deepseek"],XAI:["grok"],OLLAMA:[],AWS:["nova","titan"]},Ba="TOOL_CHOICE",xl="tool_choice",ha="RESPONSE_FORMAT",pa="response_format",hb=[Ba,ha],kb=te({tool_call:te({id:be().optional(),function:te({name:be(),arguments:be()}).partial()}).partial()}).partial(),Ed=te({[Ne.message]:te({[Sn.role]:be(),[Sn.content]:ir([be(),pn(Ot(be(),rr()))]).default(""),[Sn.contents]:pn(te({message_content:Ot(be())})).optional(),[Sn.tool_calls]:pn(kb).optional(),[Sn.tool_call_id]:be().optional()})}),bb=te({[Ne.llm]:te({[vn.input_messages]:pn(Ed)})}),Sb=te({[Ne.llm]:te({[vn.output_messages]:pn(Ed)})}),vb=te({[Ne.output]:te({value:be()})}),Ad=th()(Dl(["user","ai","system","tool"])),Cb=te({id:ys(),role:Ad,content:be().optional(),toolCallId:be().optional(),toolCalls:pn(ih).optional()}),Fb=pn(Cb),Rd=fs(()=>Ot(cr)),Tb=Rd,Md=be().transform((n,a)=>{const{json:l}=fn(n);if(!ur(l))return a.addIssue({code:nt.custom,message:"The invocation parameters must be a valid JSON object"}),at;const{success:t,data:i}=Tb.safeParse(l);return t?i:(a.addIssue({code:nt.custom,message:"The invocation parameters must be a valid JSON object"}),at)}).default("{}"),Kb=te({[Ne.llm]:te({[vn.provider]:be().optional(),[vn.model_name]:be()})}),Vd=te({[Ne.llm]:te({[vn.invocation_parameters]:Md})}),Pb=te({[Ne.llm]:te({[vn.invocation_parameters]:Md.pipe(te({response_format:Rd.optional()}))})}),zd=te({url:te({full:be(),path:be().optional()})}),xb=be().transform((n,a)=>{const{json:l}=fn(n);return l==null||!ur(l)?(a.addIssue({code:nt.custom,message:"The tool JSON schema must be a valid JSON object"}),at):l}).transform((n,a)=>{const{data:l,success:t}=rh.safeParse(n);return t?l:(a.addIssue({code:nt.custom,message:"The tool JSON schema must be a valid tool schema"}),at)}),Ib=te({[Ne.llm]:te({[vn.tools]:pn(te({[Ne.tool]:te({[Rt.json_schema]:xb})}).optional()).optional()}).optional()}).optional(),Lb=fs(()=>te({type:Na("json_schema"),json_schema:te({name:be().describe("The name of the schema"),schema:oh.describe("The schema itself in JSON schema format"),strict:Na(!0).describe("The schema must be strict")})})),Db=ct(Lb,{removeAdditionalStrategy:"passthrough"}),_b=be().transform((n,a)=>{const{json:l}=fn(n);return fa(l)?Object.entries(l).reduce((i,[r,s])=>{if(typeof s=="string")i[r]=s;else{const{json:d}=ba(s);d!=null&&(i[r]=d)}return i},{}):(a.addIssue({code:nt.custom,message:"The prompt template variables must be a valid JSON object"}),at)}),wb=te({[Ne.llm]:te({[vn.prompt_template]:te({variables:_b}).optional()}).optional()}).optional();function Nd(n){return Ad.safeParse(n).success}function $a(n){const a=n.toLowerCase();if(Nd(a))return a;for(const[l,t]of Object.entries(Mt))if(t.includes(a))return l;return sh}function Eb({toolCalls:n,provider:a}){if(n!=null)return n.map(({tool_call:l})=>{var i,r,s,d;if(l==null)return null;let t={};if(((i=l.function)==null?void 0:i.arguments)!=null){const{json:c}=fn(l.function.arguments);fa(c)&&(t=c)}switch(a){case"OPENAI":case"AZURE_OPENAI":case"DEEPSEEK":case"XAI":case"AWS":case"OLLAMA":return{id:l.id??"",type:"function",function:{name:((r=l.function)==null?void 0:r.name)??"",arguments:t}};case"ANTHROPIC":return{id:l.id??"",type:"tool_use",name:((s=l.function)==null?void 0:s.name)??"",input:t};case"GOOGLE":return{id:l.id??"",function:{name:((d=l.function)==null?void 0:d.name)??"",arguments:t}};default:Qe()}}).filter(l=>l!=null)}function $d({messages:n,provider:a}){return n.map(({message:l})=>{var t,i;return{id:Oa(),role:l.tool_call_id!=null?$a("tool"):$a(l.role),content:Array.isArray(l.contents)?((i=(t=l.contents.find(r=>r.message_content.type==="text"))==null?void 0:t.message_content)==null?void 0:i.text)??void 0:typeof l.content=="string"?l.content:void 0,toolCalls:Eb({provider:a,toolCalls:l.tool_calls}),toolCallId:l.tool_call_id}})}function Ab({provider:n,parsedAttributes:a}){var t;const l=bb.safeParse(a);if(!l.success)return{messageParsingErrors:[sb],messages:null};if(n==="ANTHROPIC"){const{success:i,data:r}=Vd.safeParse(a);if(i){const s=l.data.llm.input_messages,d=(t=r.llm.invocation_parameters)==null?void 0:t.system;typeof d=="string"&&d&&(!s||s[0].message.role!=="system")&&l.data.llm.input_messages.unshift({message:{role:"system",content:d}})}}return{messageParsingErrors:[],messages:$d({provider:n,messages:l.data.llm.input_messages})}}function Rb({provider:n,parsedAttributes:a}){const l=[],t=Sb.safeParse(a);if(t.success)return{output:$d({provider:n,messages:t.data.llm.output_messages}),outputParsingErrors:l};l.push(db);const i=vb.safeParse(a);return i.success?{output:i.data.output.value,outputParsingErrors:l}:(l.push(cb),{output:void 0,outputParsingErrors:l})}function jd(n){if(n==null)return null;switch(n.toLowerCase()){case"openai":return"OPENAI";case"anthropic":return"ANTHROPIC";case"aws":return"AWS";case"google":return"GOOGLE";case"azure":return"AZURE_OPENAI";default:return null}}function Mb(n){for(const a of Object.keys(Io))if(Io[a].some(t=>n.includes(t)))return a;return Ls}function Vb(n){const{success:a,data:l}=Kb.safeParse(n);if(a){const t=jd(l.llm.provider)||Mb(l.llm.model_name),{baseUrl:i}=Nb(n),r=t==="AZURE_OPENAI"?zb(n):{deploymentName:null,apiVersion:null,endpoint:null},s=t==="AZURE_OPENAI"&&r.deploymentName?r.deploymentName:l.llm.model_name;return{modelConfig:{...Object.fromEntries(Object.entries({baseUrl:i,endpoint:r.endpoint,apiVersion:r.apiVersion}).filter(([d,c])=>c!==null)),modelName:s,provider:t,invocationParameters:[],supportedInvocationParameters:[]},parsingErrors:[]}}return{modelConfig:null,parsingErrors:[mb]}}function zb(n){var m;const{success:a,data:l}=d1.safeParse(n),t=a&&typeof((m=l==null?void 0:l.metadata)==null?void 0:m.ls_model_name)=="string"&&l.metadata.ls_model_name.trim()?l.metadata.ls_model_name.trim():null,{success:i,data:r}=zd.safeParse(n),{endpoint:s,apiVersion:d,deploymentName:c}=i?c1(r.url.full):{endpoint:null,apiVersion:null,deploymentName:null};return{deploymentName:c??t,apiVersion:d,endpoint:s}}function Nb(n){const{success:a,data:l}=zd.safeParse(n);if(a)try{let i=new URL(l.url.full);if(l.url.path)try{i=new URL(l.url.full.split(l.url.path)[0])}catch{}return{baseUrl:`${i.origin}${i.pathname}`}}catch{}return{baseUrl:null}}function $b(n,a=[]){const{success:l,data:t}=Vd.safeParse(n),i=[];return l||i.push(gb),{invocationParameters:Wb((t==null?void 0:t.llm.invocation_parameters)??{},a),parsingErrors:i}}function jb(n){const{success:a,data:l}=Pb.safeParse(n);return a?{responseFormat:l.llm.invocation_parameters.response_format,parsingErrors:[]}:{responseFormat:void 0,parsingErrors:[pb]}}function Ob(n){var a;return(((a=n==null?void 0:n.llm)==null?void 0:a.tools)??[]).map(l=>(l==null?void 0:l.tool)==null?null:{id:Fl(),definition:l.tool.json_schema}).filter(l=>l!=null)}function Qb(n){var t;const{data:a,success:l}=Ib.safeParse(n);return l?((t=a==null?void 0:a.llm)==null?void 0:t.tools)==null?{tools:null,parsingErrors:[]}:{tools:Ob(a),parsingErrors:[]}:{tools:null,parsingErrors:[yb]}}function Bb(n){var t;const{success:a,data:l}=wb.safeParse(n);return a?((t=l==null?void 0:l.llm)==null?void 0:t.prompt_template)==null?{variables:null,parsingErrors:[]}:{variables:l.llm.prompt_template.variables,parsingErrors:[]}:{variables:null,parsingErrors:[fb]}}function qb(n){const{instance:a,instanceMessages:l}=Is(),t={...a,template:{__type:"chat",messages:Object.values(l)}},{json:i,parseError:r}=fn(n.attributes);if(r)return{playgroundInstance:{...t,spanId:(n==null?void 0:n.id)??null},parsingErrors:[ub]};const s=n.invocationParameters,d=Vb(i);let{modelConfig:c}=d;const{parsingErrors:m}=d,{messages:p,messageParsingErrors:g}=Ab({provider:(c==null?void 0:c.provider)??t.model.provider,parsedAttributes:i}),{output:u,outputParsingErrors:f}=Rb({provider:(c==null?void 0:c.provider)??t.model.provider,parsedAttributes:i}),{invocationParameters:h,parsingErrors:k}=$b(i,s),{variables:S,parsingErrors:v}=Bb(i),{parsingErrors:K}=jb(i);c=c!=null?{...c,invocationParameters:K.length>0?h.filter(_=>_.invocationName!==pa&&_.canonicalName!==ha):h}:null;const{tools:I,parsingErrors:L}=Qb(i),z=p==null?void 0:p.map(_=>({..._,content:_.role==="tool"?Mr(_.content):_.content}));return{playgroundInstance:{...t,model:c??t.model,template:z!=null?{__type:"chat",messages:z}:t.template,output:u,spanId:n.id,tools:I??t.tools},playgroundInput:S!=null?{variablesValueCache:S}:void 0,parsingErrors:[...g,...f,...m,...L,...k,...K,...v]}}const Ub=n=>Fb.safeParse(n).success,Od=({instance:n,templateFormat:a})=>{if(a==On.NONE)return[];const l=new Set,t=n.template.__type,i=dh(a);switch(t){case"chat":{n.template.messages.forEach(r=>{(r.content==null?[]:i.extractVariables(r.content)).forEach(d=>{l.add(d)})});break}case"text_completion":{i.extractVariables(n.template.prompt).forEach(s=>{l.add(s)});break}default:Qe()}return Array.from(l)},Hb=({instances:n,templateFormat:a})=>a==On.NONE?[]:Array.from(new Set(n.flatMap(l=>Od({instance:l,templateFormat:a})))),Qd=({instances:n,templateFormat:a,input:l})=>{if(a==On.NONE)return{variablesMap:{},variableKeys:[]};const t=Hb({instances:n,templateFormat:a}),i=l.variablesValueCache??{};return{variablesMap:t.reduce((s,d)=>(s[d]=i[d]||"",s),{}),variableKeys:t}};function Ga(n,a){return n.invocationName===a.invocationName||n.canonicalName!=null&&a.canonicalName!=null&&n.canonicalName===a.canonicalName}const Gb=(n,a)=>n.filter(l=>a.some(t=>Ga(t,l))).map(l=>{var t;return{...l,invocationName:((t=a.find(i=>Ga(i,l)))==null?void 0:t.invocationName)??l.invocationName}}),Bl=n=>n.replace(/_([a-z])/g,(a,l)=>l.toUpperCase()),Wb=(n,a)=>Object.entries(n).map(([l,t])=>{const i=a.find(r=>r.canonicalName&&r.canonicalName.toLowerCase()===l.toLowerCase()||r.invocationName&&r.invocationName.toLowerCase()===l.toLowerCase());return i==null||i.invocationInputField==null||i.invocationName==null?null:{canonicalName:i.canonicalName,invocationName:i.invocationName,[Bl(i.invocationInputField)]:t}}).filter(l=>l!=null),Bd=n=>{const{provider:a,validatedToolDefinition:l}=gh(n.definition);switch(a){case"OPENAI":case"AZURE_OPENAI":return l.function.name;case"ANTHROPIC":return l.name;case"AWS":return l.toolSpec.name;case"UNKNOWN":return null;default:Qe()}},Jb=({provider:n,toolNumber:a})=>{switch(n){case"OPENAI":case"DEEPSEEK":case"XAI":case"OLLAMA":case"AZURE_OPENAI":return{id:Fl(),definition:mo(a)};case"ANTHROPIC":return{id:Fl(),definition:mh(a)};case"AWS":return{id:Fl(),definition:uh(a)};case"GOOGLE":return{id:Fl(),definition:mo(a)};default:Qe()}},Zb=n=>{switch(n){case"OPENAI":case"AZURE_OPENAI":case"DEEPSEEK":case"XAI":case"AWS":case"OLLAMA":return uo();case"ANTHROPIC":return ch();case"GOOGLE":return uo();default:Qe()}};function Xb(n){return{content:n.content,role:Yb(n.role),toolCalls:n.toolCalls,toolCallId:n.toolCallId}}function Yb(n){switch(n){case"system":return"SYSTEM";case"user":return"USER";case"tool":return"TOOL";case"ai":return"AI";default:Qe()}}const qd=n=>n.filter(a=>!(a.valueFloat!==null&&typeof a.valueFloat=="number"&&isNaN(a.valueFloat))),Ud=({playgroundStore:n,instanceId:a,credentials:l})=>{var u;const{instances:t,allInstanceMessages:i}=n.getState(),r=t.find(f=>f.id===a);if(!r)throw new Error(`No instance found for id ${a}`);if(r.template.__type!=="chat")throw new Error("We only support chat templates for now");const s=r.template.messageIds.map(f=>i[f]).filter(f=>f!=null),d=r.model.supportedInvocationParameters;let c=qd(r.model.invocationParameters);const m=mr({toolChoice:r.toolChoice,targetProvider:r.model.provider});r.tools.length>0?(c=c.filter(f=>f.invocationName!==xl&&f.canonicalName!==Ba),c.push({canonicalName:Ba,invocationName:xl,valueJson:m})):c=c.filter(f=>f.invocationName!==xl&&f.canonicalName!==Ba),c=d.length?Gb(c,d):c;const p=r.model.provider==="AZURE_OPENAI"?{endpoint:r.model.endpoint,apiVersion:r.model.apiVersion}:{},g=r.model.provider==="AWS"?{region:r.model.region}:{};return{messages:s.map(Xb),model:{providerKey:r.model.provider,name:r.model.modelName||"",baseUrl:r.model.baseUrl,...p,...g},invocationParameters:Gd(c,r.model.provider,r.model.modelName),tools:r.tools.length?r.tools.map(f=>f.definition):void 0,credentials:e1(l,r.model.provider),promptName:(u=r.prompt)==null?void 0:u.name}},bi=(n,a)=>{if(n.template.__type==="chat"){const{messageIds:l,...t}=n.template;return{...n,template:{...t,messages:n.template.messageIds.map(i=>a[i])}}}return n};function e1(n,a){const l=n[a],t=yt[a];return l?t.length===0?[]:t.map(i=>({envVarName:i.envVarName,value:l[i.envVarName]??""})):[]}const n1=({playgroundStore:n,instanceId:a,credentials:l})=>{const t=Ud({playgroundStore:n,instanceId:a,credentials:l}),{instances:i,templateFormat:r,input:s,allInstanceMessages:d}=n.getState(),c=i.map(p=>bi(p,d)),{variablesMap:m}=Qd({instances:c,input:s,templateFormat:r});return{...t,template:{variables:m,format:r}}},Lo=({playgroundStore:n,instanceId:a,credentials:l,datasetId:t})=>({...Ud({playgroundStore:n,instanceId:a,credentials:l}),templateFormat:n.getState().templateFormat,datasetId:t});function Mr(n){if(typeof n=="string"){const a=n.startsWith('"{')||n.startsWith('"[')||n.startsWith('"\\"');try{if(a){const t=JSON.parse(n),i=typeof t=="string"?JSON.parse(t):t;return JSON.stringify(i,null,2)}}catch{}if(/^\s*[0-9{[]|true|false|null/.test(n))return n}return JSON.stringify(n,null,2)}function Hd(n,a){return a.filter(l=>l.required).every(l=>n.some(t=>Ga(t,l)))}const a1=n=>{for(const[a,l]of Object.entries(n))if(a.endsWith("DefaultValue")&&l!=null)return n[a]};function n3(n,a){const l=new Map(n.map(t=>[t.invocationName,t]));return a.forEach(t=>{var c;const i=t.invocationName,r=a1(t),s=Bl(t.invocationInputField||"");if(!t.invocationName||!t.invocationInputField||!i||r==null||((c=l.get(i))==null?void 0:c[s])!=null)return;const d={canonicalName:t.canonicalName,invocationName:t.invocationName,[s]:r};l.set(i,d)}),Array.from(l.values())}const l1=te({type:Na("enabled")}).passthrough(),t1=te({type:Dl(["any","tool"])}).passthrough(),i1=(n,a)=>{if(!a)return n;const l=n.some(t=>t.canonicalName==="ANTHROPIC_EXTENDED_THINKING"&&t.valueJson&&l1.safeParse(t.valueJson).success);return n.filter(t=>{if(t.canonicalName==="ANTHROPIC_EXTENDED_THINKING"&&!t.valueJson)return!1;if(l){if(t.canonicalName==="TEMPERATURE"||t.canonicalName==="TOP_P")return!1;if(t.canonicalName===Ba)return!t1.safeParse(t.valueJson).success}return!0})},r1=["frequency_penalty","presence_penalty"],o1=n=>n.filter(l=>l.invocationName&&r1.includes(l.invocationName)?!(l.valueFloat==0||l.valueInt==0):!0),Gd=(n,a,l)=>{const t=o1(n);return a==="ANTHROPIC"?i1(t,l):t},s1=/(?:^|\/)deployments\/([^/]+)(?:\/?|$)/,d1=te({metadata:te({ls_model_name:be().optional()}).optional()}).passthrough();function c1(n){try{const a=new URL(n),l=a.origin.trim(),t=a.searchParams.get("api-version"),i=t&&t.trim()?t.trim():null,s=(a.pathname||"").toString().match(s1),d=s&&s[1]?s[1].trim():null;return{endpoint:l,apiVersion:i,deploymentName:d}}catch{return{endpoint:null,apiVersion:null,deploymentName:null}}}const Wd=y.createContext(null);function a3({children:n,...a}){const[l]=y.useState(()=>ph(a));return e(Wd.Provider,{value:l,children:n})}function pl(n,a){const l=y.useContext(Wd);if(!l)throw new Error("Missing CredentialsContext.Provider in the tree");return ut(l,n,a)}const Jd=y.createContext(null);function u1(){const n=y.useContext(Jd);if(n===null)throw new Error("useFunctionality must be used within a FunctionalityProvider");return n}function l3(n){return e(Jd.Provider,{value:{authenticationEnabled:window.Config.authenticationEnabled},children:n.children})}const Zd={argumentDefinitions:[],kind:"Fragment",metadata:null,name:"GenerativeProvidersCard_data",selections:[{alias:null,args:null,concreteType:"GenerativeProvider",kind:"LinkedField",name:"modelProviders",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"key",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"dependenciesInstalled",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"dependencies",storageKey:null},{alias:null,args:null,concreteType:"GenerativeProviderCredentialConfig",kind:"LinkedField",name:"credentialRequirements",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"envVarName",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"isRequired",storageKey:null}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"credentialsSet",storageKey:null}],storageKey:null}],type:"Query",abstractKey:null};Zd.hash="4062531cfa3f77e541172a44101f5331";function m1({query:n}){const a=pl(d=>d),l=P.useFragment(Zd,n),t=y.useMemo(()=>[...l.modelProviders],[l]),i=y.useMemo(()=>[{header:"Name",accessorKey:"name",cell:({row:d})=>o(b,{direction:"row",alignItems:"center",gap:"size-100",children:[e(Ua,{provider:d.original.key,height:18}),d.original.name]})},{header:"Environment Variables",accessorKey:"apiKeyEnvVar",cell:({row:d})=>{const c=yt[d.original.key],m=(c==null?void 0:c.map(p=>p.envVarName).join(", "))||d.original.credentialRequirements.map(p=>p.envVarName).join(", ")||"--";return e(C,{children:m})}},{header:"configuration",accessorKey:"credentialsSet",cell:({row:d})=>{if(!d.original.dependenciesInstalled)return e(C,{color:"warning",children:"missing dependencies"});const c=d.original.credentialRequirements;if(!gr(d.original.key))return e(C,{color:"warning",children:"unknown provider key"});const m=a[d.original.key];return c.every(({envVarName:g,isRequired:u})=>(m==null?void 0:m[g])!==void 0||!u)?e(C,{color:"success",children:"local"}):d.original.credentialsSet?e(C,{color:"success",children:"configured on the server"}):e(C,{color:"text-700",children:"not configured"})}},{header:"",accessorKey:"id",cell:({row:d})=>e(b,{direction:"row",justifyContent:"end",gap:"size-100",width:"100%",children:o(Z,{children:[e(A,{size:"S",leadingVisual:e(D,{svg:e(Xa,{})})}),e(le,{children:e(ee,{size:"M",children:e(g1,{provider:d.original})})})]})})}],[a]),r=Me({columns:i,data:t,getCoreRowModel:Ve(),getSortedRowModel:Tn()}),s=r.getRowModel().rows;return e(H,{title:"AI Providers",children:o("table",{css:hn,children:[e("thead",{children:r.getHeaderGroups().map(d=>e("tr",{children:d.headers.map(c=>e("th",{colSpan:c.colSpan,children:c.isPlaceholder?null:e("div",{children:Y(c.column.columnDef.header,c.getContext())})},c.id))},d.id))}),e("tbody",{children:s.map(d=>e("tr",{children:d.getVisibleCells().map(c=>e("td",{children:Y(c.column.columnDef.cell,c.getContext())},c.id))},d.id))})]})})}function g1({provider:n}){return e(X,{children:o(ge,{children:[o(ue,{children:[o(me,{children:["Configure ",n.name," Credentials"]}),e(ye,{children:e(fe,{slot:"close"})})]}),o(F,{padding:"size-200",children:[e(F,{paddingBottom:"size-100",children:o(C,{size:"XS",children:["Set the credentials for the ",n.name," API. These credentials will be stored entirely in your browser and will only be sent to the server during API requests."]})}),o(Kn,{children:[e(p1,{provider:n.key}),e(F,{paddingTop:"size-200",children:o(b,{direction:"row",justifyContent:"end",gap:"size-100",children:[e(A,{variant:"default",size:"S",slot:"close",children:"Cancel"}),e(A,{variant:"primary",size:"S",slot:"close",children:"Save Credentials"})]})})]})]})]})})}function p1({provider:n}){const a=pl(i=>i.setCredential),l=yt[n],t=pl(i=>i[n]);return e(b,{direction:"column",gap:"size-100",children:l.map(i=>o(_s,{isRequired:i.isRequired,onChange:r=>{a({provider:n,envVarName:i.envVarName,value:r})},value:(t==null?void 0:t[i.envVarName])??void 0,children:[e(W,{children:i.envVarName}),e(Ds,{})]},i.envVarName))})}function t3(){const n=nn();return Ge(n),e(m1,{query:n})}const Xd={fragment:{argumentDefinitions:[],kind:"Fragment",metadata:null,name:"settingsAIProvidersPageLoaderQuery",selections:[{args:null,kind:"FragmentSpread",name:"GenerativeProvidersCard_data"}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[],kind:"Operation",name:"settingsAIProvidersPageLoaderQuery",selections:[{alias:null,args:null,concreteType:"GenerativeProvider",kind:"LinkedField",name:"modelProviders",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"key",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"dependenciesInstalled",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"dependencies",storageKey:null},{alias:null,args:null,concreteType:"GenerativeProviderCredentialConfig",kind:"LinkedField",name:"credentialRequirements",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"envVarName",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"isRequired",storageKey:null}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"credentialsSet",storageKey:null}],storageKey:null}]},params:{cacheID:"1238ea27e05b70fd2c203ab4be6a1209",id:null,metadata:{},name:"settingsAIProvidersPageLoaderQuery",operationKind:"query",text:`query settingsAIProvidersPageLoaderQuery {
1
+ import{K as te,D as be,bG as Ne,I as pn,B as ir,bH as Sn,J as Ot,P as rr,bI as vn,M as Dl,E as ys,H as fs,bJ as nt,bK as at,bL as Rt,N as Na,O as ct,r as y,j as e,u as ut,o as P,l as o,ar as Z,b5 as Me,b6 as Tn,b8 as Ve,b9 as Y,az as Kn,a6 as W,bM as nn,q as Ge,au as on,bN as Bi,ay as G,a7 as oe,a8 as xe,b4 as Da,U as T,a4 as ae,$ as Se,bO as mt,bP as hf,bQ as kf,bR as bf,bF as rn,av as _l,bS as io,aA as hs,aw as ks,ax as bs,bT as Sf,bU as or,bV as Qt,bW as vf,bX as we,aZ as Jt,bY as an,bZ as Cf,Q as Ff,ba as qn,b_ as Tf,bc as Kf,b$ as Pf,Z as ro,bl as Ke,bp as wl,c0 as Un,bk as Xe,bj as la,c1 as dn,R as ka,m as Ss,W as xf,a5 as cl,V as oo,bh as vs,aY as ul,X as If,c2 as Lf,c3 as xi,c4 as Ii,c5 as Ul,aR as Bt,t as gt,c6 as Df,ah as qt,c7 as _f,c8 as so,c9 as wf,ca as Ef,cb as Af,cc as Rf,cd as Mf,ce as Vf,cf as zf,cg as Nf,ch as $f,ci as qa,T as jf,cj as Of,g as Cs,ck as Qf,b2 as Zt,cl as Fs,cm as Ts,cn as Bf,co as qf,cp as Uf,cq as Hf,cr as Gf,n as Wf,cs as Jf,aS as Zf}from"./vendor-RdRDaQiR.js";import{k as Za,T as sr,l as Xf,g as Ks,P as Ps,h as yl,i as pt,a as El,_ as fl,j as Xt,m as Yf,n as dr,D as eh,A as nh,o as xs,u as ah,p as lh,q as co}from"./vendor-arizeai-DsYDNOqt.js";import{s as th,l as ih,j as cr,a as fn,i as ur,b as rh,c as oh,d as fa,e as ba,f as Is,D as Ls,g as Oa,h as Fl,C as Mt,k as sh,m as Qe,T as On,n as dh,o as mr,p as uo,q as ch,r as mo,t as uh,u as mh,v as gh,P as yt,w as ph,G as Ua,_ as b,x as C,y as gr,z as A,I as D,E as Xa,A as le,B as ee,F as hn,H,J as ue,K as me,L as ye,M as fe,N as F,O as ge,Q as X,R as Ds,S as _s,U as De,V as _e,W as Fe,X as ce,Y as go,Z as po,$ as Pa,a0 as gn,a1 as ea,a2 as kn,a3 as bn,a4 as An,a5 as Sa,a6 as ft,a7 as yn,a8 as _n,a9 as Ya,aa as Oe,ab as Ue,ac as je,ad as re,ae as he,af as Wn,ag as ht,ah as ws,ai as sn,aj as Es,ak as un,al as $e,am as pr,an as _a,ao as As,ap as Rs,aq as In,ar as de,as as Ce,at as Ln,au as lt,av as ke,aw as We,ax as yh,ay as fh,az as Ms,aA as qi,aB as yr,aC as Yt,aD as hh,aE as kh,aF as Ui,aG as xt,aH as Vs,aI as Le,aJ as qe,aK as ml,aL as ma,aM as il,aN as bh,aO as Sh,aP as zs,aQ as Ie,aR as Ns,aS as yo,aT as tt,aU as wn,aV as va,aW as cn,aX as vh,aY as kt,aZ as gl,a_ as ta,a$ as Yn,b0 as Fn,b1 as Pn,b2 as oa,b3 as Vn,b4 as zn,b5 as Nn,b6 as ei,b7 as en,b8 as na,b9 as ni,ba as Ch,bb as Fh,bc as Th,bd as Kh,be as Ph,bf as Al,bg as Fa,bh as wa,bi as $s,bj as js,bk as xh,bl as Ih,bm as Lh,bn as Dh,bo as Dn,bp as aa,bq as _h,br as ua,bs as wh,bt as Os,bu as fr,bv as el,bw as hr,bx as kr,by as Eh,bz as Qs,bA as Ah,bB as Rh,bC as Mh,bD as Vh,bE as zh,bF as Nh,bG as $h,bH as jh,bI as Oh,bJ as Qh,bK as it,bL as Bh,bM as ai,bN as li,bO as Ee,bP as Hi,bQ as Ae,bR as Re,bS as Qn,bT as qh,bU as Uh,bV as Hh,bW as Hn,bX as Gh,bY as Wh,bZ as Jh,b_ as ti,b$ as ii,c0 as Bs,c1 as Zh,c2 as Xh,c3 as Yh,c4 as ek,c5 as nk,c6 as bt,c7 as ak,c8 as qs,c9 as ri,ca as ia,cb as lk,cc as tk,cd as ik,ce as xa,cf as Us,cg as En,ch as mn,ci as rk,cj as Rl,ck as St,cl as hl,cm as Hs,cn as ra,co as br,cp as ol,cq as ok,cr as sl,cs as sk,ct as Ml,cu as Sr,cv as oi,cw as si,cx as di,cy as Gi,cz as ci,cA as Gs,cB as ui,cC as vr,cD as dk,cE as Ws,cF as Js,cG as fo,cH as ho,cI as ck,cJ as rt,cK as Wi,cL as mi,cM as Il,cN as uk,cO as mk,cP as Vl,cQ as gk,cR as pk,cS as ot,cT as Zs,cU as yk,cV as Xs,cW as zl,cX as gi,cY as Jn,cZ as fk,c_ as hk,c$ as Gn,d0 as Ca,d1 as Ha,d2 as Nl,d3 as Ys,d4 as Cr,d5 as kk,d6 as bk,d7 as Sk,d8 as ed,d9 as vk,da as Ck,db as Fk,dc as Tk,dd as Kl,de as Fr,df as nd,dg as ad,dh as ld,di as Ll,dj as Cn,dk as td,dl as id,dm as Ji,dn as Kk,dp as Pk,dq as xk,dr as Tr,ds as Ik,dt as Lk,du as Dk,dv as pi,dw as _k,dx as rd,dy as wk,dz as Ek,dA as Ak,dB as Rk,dC as Mk,dD as Vk,dE as zk,dF as Nk,dG as $k,dH as Vt,dI as yi,dJ as ko,dK as jk,dL as od,dM as Kr,dN as sd,dO as Ta,dP as Ea,dQ as Pr,dR as dd,dS as cd,dT as bo,dU as So,dV as Ok,dW as Qk,dX as pe,dY as fi,dZ as $l,d_ as ud,d$ as jl,e0 as Ol,e1 as md,e2 as gd,e3 as Bk,e4 as qk,e5 as xr,e6 as Uk,e7 as Hk,e8 as Gk,e9 as Wk,ea as Jk,eb as Qa,ec as pd,ed as yd,ee as Zk,ef as Xk,eg as vo,eh as Yk,ei as e0,ej as n0,ek as a0,el as l0,em as t0,en as fd,eo as i0,ep as r0,eq as o0,er as s0,es as d0,et as He,eu as hd,ev as Tl,ew as Aa,ex as c0,ey as u0,ez as Ir,eA as hi,eB as ga,eC as Ut,eD as kd,eE as m0,eF as g0,eG as p0,eH as bd,eI as Sd,eJ as y0,eK as f0,eL as h0,eM as ki,eN as Zi,eO as vd,eP as Lr,eQ as Dr,eR as Cd,eS as k0,eT as Co,eU as b0,eV as Zn,eW as Ka,eX as Ra,eY as vt,eZ as S0,e_ as zt,e$ as v0,f0 as C0,f1 as F0,f2 as T0,f3 as _r,f4 as Ht,f5 as K0,f6 as P0,f7 as Fo,f8 as Fd,f9 as x0,fa as wr,fb as Er,fc as I0,fd as Pl,fe as L0,ff as D0,fg as Ar,fh as st,fi as _0,fj as w0,fk as E0,fl as A0,fm as R0,fn as M0,fo as Td,fp as Ql,fq as V0,fr as z0,fs as N0,ft as $0,fu as j0,fv as O0,fw as Q0,fx as B0,fy as q0,fz as U0,fA as H0,fB as G0,fC as Li,fD as W0,fE as J0,fF as To,fG as Ko,fH as Z0,fI as X0,fJ as Y0,fK as eb,fL as Kd,fM as nb,fN as ab,fO as lb,fP as Po,fQ as xo}from"./components-BC-SDWO9.js";import{m as nl,n as al,j as tb,E as Pd,R as ll,k as Rr,d as ib,p as Ct,q as xd}from"./vendor-codemirror-BzJDUbEx.js";import{P as Id,C as Ld,T as Je,a as Dd,R as Ze,X as ln,Y as Be,b as tn,B as ze,c as Rn,d as kl,A as dt,e as _d,L as wd,f as Xn,g as $n,h as rb}from"./vendor-recharts-BTHn5Y2R.js";const ob=4,sb="Unable to parse span input messages, expected messages which include a role and content.",db="Unable to parse span output messages, expected messages which include a role and content.",cb="Unable to parse span output expected output.value to be present.",ub="Unable to parse span attributes, attributes must be valid JSON.",mb="Unable to parse model config, expected llm.model_name to be present.",gb="Unable to parse model config, expected llm.invocation_parameters JSON string to be present.",pb="Unable to parse invocation parameters response_format, expected llm.invocation_parameters.response_format to be a well formed json object or undefined.",yb="Unable to parse tools, expected tools to be an array of valid tools.",fb="Unable to parse prompt template variables, expected prompt template variables to be a valid JSON object string.",Io={AZURE_OPENAI:[],ANTHROPIC:["claude"],OPENAI:["gpt","o1"],GOOGLE:["gemini"],DEEPSEEK:["deepseek"],XAI:["grok"],OLLAMA:[],AWS:["nova","titan"]},Ba="TOOL_CHOICE",xl="tool_choice",ha="RESPONSE_FORMAT",pa="response_format",hb=[Ba,ha],kb=te({tool_call:te({id:be().optional(),function:te({name:be(),arguments:be()}).partial()}).partial()}).partial(),Ed=te({[Ne.message]:te({[Sn.role]:be(),[Sn.content]:ir([be(),pn(Ot(be(),rr()))]).default(""),[Sn.contents]:pn(te({message_content:Ot(be())})).optional(),[Sn.tool_calls]:pn(kb).optional(),[Sn.tool_call_id]:be().optional()})}),bb=te({[Ne.llm]:te({[vn.input_messages]:pn(Ed)})}),Sb=te({[Ne.llm]:te({[vn.output_messages]:pn(Ed)})}),vb=te({[Ne.output]:te({value:be()})}),Ad=th()(Dl(["user","ai","system","tool"])),Cb=te({id:ys(),role:Ad,content:be().optional(),toolCallId:be().optional(),toolCalls:pn(ih).optional()}),Fb=pn(Cb),Rd=fs(()=>Ot(cr)),Tb=Rd,Md=be().transform((n,a)=>{const{json:l}=fn(n);if(!ur(l))return a.addIssue({code:nt.custom,message:"The invocation parameters must be a valid JSON object"}),at;const{success:t,data:i}=Tb.safeParse(l);return t?i:(a.addIssue({code:nt.custom,message:"The invocation parameters must be a valid JSON object"}),at)}).default("{}"),Kb=te({[Ne.llm]:te({[vn.provider]:be().optional(),[vn.model_name]:be()})}),Vd=te({[Ne.llm]:te({[vn.invocation_parameters]:Md})}),Pb=te({[Ne.llm]:te({[vn.invocation_parameters]:Md.pipe(te({response_format:Rd.optional()}))})}),zd=te({url:te({full:be(),path:be().optional()})}),xb=be().transform((n,a)=>{const{json:l}=fn(n);return l==null||!ur(l)?(a.addIssue({code:nt.custom,message:"The tool JSON schema must be a valid JSON object"}),at):l}).transform((n,a)=>{const{data:l,success:t}=rh.safeParse(n);return t?l:(a.addIssue({code:nt.custom,message:"The tool JSON schema must be a valid tool schema"}),at)}),Ib=te({[Ne.llm]:te({[vn.tools]:pn(te({[Ne.tool]:te({[Rt.json_schema]:xb})}).optional()).optional()}).optional()}).optional(),Lb=fs(()=>te({type:Na("json_schema"),json_schema:te({name:be().describe("The name of the schema"),schema:oh.describe("The schema itself in JSON schema format"),strict:Na(!0).describe("The schema must be strict")})})),Db=ct(Lb,{removeAdditionalStrategy:"passthrough"}),_b=be().transform((n,a)=>{const{json:l}=fn(n);return fa(l)?Object.entries(l).reduce((i,[r,s])=>{if(typeof s=="string")i[r]=s;else{const{json:d}=ba(s);d!=null&&(i[r]=d)}return i},{}):(a.addIssue({code:nt.custom,message:"The prompt template variables must be a valid JSON object"}),at)}),wb=te({[Ne.llm]:te({[vn.prompt_template]:te({variables:_b}).optional()}).optional()}).optional();function Nd(n){return Ad.safeParse(n).success}function $a(n){const a=n.toLowerCase();if(Nd(a))return a;for(const[l,t]of Object.entries(Mt))if(t.includes(a))return l;return sh}function Eb({toolCalls:n,provider:a}){if(n!=null)return n.map(({tool_call:l})=>{var i,r,s,d;if(l==null)return null;let t={};if(((i=l.function)==null?void 0:i.arguments)!=null){const{json:c}=fn(l.function.arguments);fa(c)&&(t=c)}switch(a){case"OPENAI":case"AZURE_OPENAI":case"DEEPSEEK":case"XAI":case"AWS":case"OLLAMA":return{id:l.id??"",type:"function",function:{name:((r=l.function)==null?void 0:r.name)??"",arguments:t}};case"ANTHROPIC":return{id:l.id??"",type:"tool_use",name:((s=l.function)==null?void 0:s.name)??"",input:t};case"GOOGLE":return{id:l.id??"",function:{name:((d=l.function)==null?void 0:d.name)??"",arguments:t}};default:Qe()}}).filter(l=>l!=null)}function $d({messages:n,provider:a}){return n.map(({message:l})=>{var t,i;return{id:Oa(),role:l.tool_call_id!=null?$a("tool"):$a(l.role),content:Array.isArray(l.contents)?((i=(t=l.contents.find(r=>r.message_content.type==="text"))==null?void 0:t.message_content)==null?void 0:i.text)??void 0:typeof l.content=="string"?l.content:void 0,toolCalls:Eb({provider:a,toolCalls:l.tool_calls}),toolCallId:l.tool_call_id}})}function Ab({provider:n,parsedAttributes:a}){var t;const l=bb.safeParse(a);if(!l.success)return{messageParsingErrors:[sb],messages:null};if(n==="ANTHROPIC"){const{success:i,data:r}=Vd.safeParse(a);if(i){const s=l.data.llm.input_messages,d=(t=r.llm.invocation_parameters)==null?void 0:t.system;typeof d=="string"&&d&&(!s||s[0].message.role!=="system")&&l.data.llm.input_messages.unshift({message:{role:"system",content:d}})}}return{messageParsingErrors:[],messages:$d({provider:n,messages:l.data.llm.input_messages})}}function Rb({provider:n,parsedAttributes:a}){const l=[],t=Sb.safeParse(a);if(t.success)return{output:$d({provider:n,messages:t.data.llm.output_messages}),outputParsingErrors:l};l.push(db);const i=vb.safeParse(a);return i.success?{output:i.data.output.value,outputParsingErrors:l}:(l.push(cb),{output:void 0,outputParsingErrors:l})}function jd(n){if(n==null)return null;switch(n.toLowerCase()){case"openai":return"OPENAI";case"anthropic":return"ANTHROPIC";case"aws":return"AWS";case"google":return"GOOGLE";case"azure":return"AZURE_OPENAI";default:return null}}function Mb(n){for(const a of Object.keys(Io))if(Io[a].some(t=>n.includes(t)))return a;return Ls}function Vb(n){const{success:a,data:l}=Kb.safeParse(n);if(a){const t=jd(l.llm.provider)||Mb(l.llm.model_name),{baseUrl:i}=Nb(n),r=t==="AZURE_OPENAI"?zb(n):{deploymentName:null,apiVersion:null,endpoint:null},s=t==="AZURE_OPENAI"&&r.deploymentName?r.deploymentName:l.llm.model_name;return{modelConfig:{...Object.fromEntries(Object.entries({baseUrl:i,endpoint:r.endpoint,apiVersion:r.apiVersion}).filter(([d,c])=>c!==null)),modelName:s,provider:t,invocationParameters:[],supportedInvocationParameters:[]},parsingErrors:[]}}return{modelConfig:null,parsingErrors:[mb]}}function zb(n){var m;const{success:a,data:l}=d1.safeParse(n),t=a&&typeof((m=l==null?void 0:l.metadata)==null?void 0:m.ls_model_name)=="string"&&l.metadata.ls_model_name.trim()?l.metadata.ls_model_name.trim():null,{success:i,data:r}=zd.safeParse(n),{endpoint:s,apiVersion:d,deploymentName:c}=i?c1(r.url.full):{endpoint:null,apiVersion:null,deploymentName:null};return{deploymentName:c??t,apiVersion:d,endpoint:s}}function Nb(n){const{success:a,data:l}=zd.safeParse(n);if(a)try{let i=new URL(l.url.full);if(l.url.path)try{i=new URL(l.url.full.split(l.url.path)[0])}catch{}return{baseUrl:`${i.origin}${i.pathname}`}}catch{}return{baseUrl:null}}function $b(n,a=[]){const{success:l,data:t}=Vd.safeParse(n),i=[];return l||i.push(gb),{invocationParameters:Wb((t==null?void 0:t.llm.invocation_parameters)??{},a),parsingErrors:i}}function jb(n){const{success:a,data:l}=Pb.safeParse(n);return a?{responseFormat:l.llm.invocation_parameters.response_format,parsingErrors:[]}:{responseFormat:void 0,parsingErrors:[pb]}}function Ob(n){var a;return(((a=n==null?void 0:n.llm)==null?void 0:a.tools)??[]).map(l=>(l==null?void 0:l.tool)==null?null:{id:Fl(),definition:l.tool.json_schema}).filter(l=>l!=null)}function Qb(n){var t;const{data:a,success:l}=Ib.safeParse(n);return l?((t=a==null?void 0:a.llm)==null?void 0:t.tools)==null?{tools:null,parsingErrors:[]}:{tools:Ob(a),parsingErrors:[]}:{tools:null,parsingErrors:[yb]}}function Bb(n){var t;const{success:a,data:l}=wb.safeParse(n);return a?((t=l==null?void 0:l.llm)==null?void 0:t.prompt_template)==null?{variables:null,parsingErrors:[]}:{variables:l.llm.prompt_template.variables,parsingErrors:[]}:{variables:null,parsingErrors:[fb]}}function qb(n){const{instance:a,instanceMessages:l}=Is(),t={...a,template:{__type:"chat",messages:Object.values(l)}},{json:i,parseError:r}=fn(n.attributes);if(r)return{playgroundInstance:{...t,spanId:(n==null?void 0:n.id)??null},parsingErrors:[ub]};const s=n.invocationParameters,d=Vb(i);let{modelConfig:c}=d;const{parsingErrors:m}=d,{messages:p,messageParsingErrors:g}=Ab({provider:(c==null?void 0:c.provider)??t.model.provider,parsedAttributes:i}),{output:u,outputParsingErrors:f}=Rb({provider:(c==null?void 0:c.provider)??t.model.provider,parsedAttributes:i}),{invocationParameters:h,parsingErrors:k}=$b(i,s),{variables:S,parsingErrors:v}=Bb(i),{parsingErrors:K}=jb(i);c=c!=null?{...c,invocationParameters:K.length>0?h.filter(_=>_.invocationName!==pa&&_.canonicalName!==ha):h}:null;const{tools:I,parsingErrors:L}=Qb(i),z=p==null?void 0:p.map(_=>({..._,content:_.role==="tool"?Mr(_.content):_.content}));return{playgroundInstance:{...t,model:c??t.model,template:z!=null?{__type:"chat",messages:z}:t.template,output:u,spanId:n.id,tools:I??t.tools},playgroundInput:S!=null?{variablesValueCache:S}:void 0,parsingErrors:[...g,...f,...m,...L,...k,...K,...v]}}const Ub=n=>Fb.safeParse(n).success,Od=({instance:n,templateFormat:a})=>{if(a==On.NONE)return[];const l=new Set,t=n.template.__type,i=dh(a);switch(t){case"chat":{n.template.messages.forEach(r=>{(r.content==null?[]:i.extractVariables(r.content)).forEach(d=>{l.add(d)})});break}case"text_completion":{i.extractVariables(n.template.prompt).forEach(s=>{l.add(s)});break}default:Qe()}return Array.from(l)},Hb=({instances:n,templateFormat:a})=>a==On.NONE?[]:Array.from(new Set(n.flatMap(l=>Od({instance:l,templateFormat:a})))),Qd=({instances:n,templateFormat:a,input:l})=>{if(a==On.NONE)return{variablesMap:{},variableKeys:[]};const t=Hb({instances:n,templateFormat:a}),i=l.variablesValueCache??{};return{variablesMap:t.reduce((s,d)=>(s[d]=i[d]||"",s),{}),variableKeys:t}};function Ga(n,a){return n.invocationName===a.invocationName||n.canonicalName!=null&&a.canonicalName!=null&&n.canonicalName===a.canonicalName}const Gb=(n,a)=>n.filter(l=>a.some(t=>Ga(t,l))).map(l=>{var t;return{...l,invocationName:((t=a.find(i=>Ga(i,l)))==null?void 0:t.invocationName)??l.invocationName}}),Bl=n=>n.replace(/_([a-z])/g,(a,l)=>l.toUpperCase()),Wb=(n,a)=>Object.entries(n).map(([l,t])=>{const i=a.find(r=>r.canonicalName&&r.canonicalName.toLowerCase()===l.toLowerCase()||r.invocationName&&r.invocationName.toLowerCase()===l.toLowerCase());return i==null||i.invocationInputField==null||i.invocationName==null?null:{canonicalName:i.canonicalName,invocationName:i.invocationName,[Bl(i.invocationInputField)]:t}}).filter(l=>l!=null),Bd=n=>{const{provider:a,validatedToolDefinition:l}=gh(n.definition);switch(a){case"OPENAI":case"AZURE_OPENAI":return l.function.name;case"ANTHROPIC":return l.name;case"AWS":return l.toolSpec.name;case"UNKNOWN":return null;default:Qe()}},Jb=({provider:n,toolNumber:a})=>{switch(n){case"OPENAI":case"DEEPSEEK":case"XAI":case"OLLAMA":case"AZURE_OPENAI":return{id:Fl(),definition:mo(a)};case"ANTHROPIC":return{id:Fl(),definition:mh(a)};case"AWS":return{id:Fl(),definition:uh(a)};case"GOOGLE":return{id:Fl(),definition:mo(a)};default:Qe()}},Zb=n=>{switch(n){case"OPENAI":case"AZURE_OPENAI":case"DEEPSEEK":case"XAI":case"AWS":case"OLLAMA":return uo();case"ANTHROPIC":return ch();case"GOOGLE":return uo();default:Qe()}};function Xb(n){return{content:n.content,role:Yb(n.role),toolCalls:n.toolCalls,toolCallId:n.toolCallId}}function Yb(n){switch(n){case"system":return"SYSTEM";case"user":return"USER";case"tool":return"TOOL";case"ai":return"AI";default:Qe()}}const qd=n=>n.filter(a=>!(a.valueFloat!==null&&typeof a.valueFloat=="number"&&isNaN(a.valueFloat))),Ud=({playgroundStore:n,instanceId:a,credentials:l})=>{var u;const{instances:t,allInstanceMessages:i}=n.getState(),r=t.find(f=>f.id===a);if(!r)throw new Error(`No instance found for id ${a}`);if(r.template.__type!=="chat")throw new Error("We only support chat templates for now");const s=r.template.messageIds.map(f=>i[f]).filter(f=>f!=null),d=r.model.supportedInvocationParameters;let c=qd(r.model.invocationParameters);const m=mr({toolChoice:r.toolChoice,targetProvider:r.model.provider});r.tools.length>0?(c=c.filter(f=>f.invocationName!==xl&&f.canonicalName!==Ba),c.push({canonicalName:Ba,invocationName:xl,valueJson:m})):c=c.filter(f=>f.invocationName!==xl&&f.canonicalName!==Ba),c=d.length?Gb(c,d):c;const p=r.model.provider==="AZURE_OPENAI"?{endpoint:r.model.endpoint,apiVersion:r.model.apiVersion}:{},g=r.model.provider==="AWS"?{region:r.model.region}:{};return{messages:s.map(Xb),model:{providerKey:r.model.provider,name:r.model.modelName||"",baseUrl:r.model.baseUrl,...p,...g},invocationParameters:Gd(c,r.model.provider,r.model.modelName),tools:r.tools.length?r.tools.map(f=>f.definition):void 0,credentials:e1(l,r.model.provider),promptName:(u=r.prompt)==null?void 0:u.name}},bi=(n,a)=>{if(n.template.__type==="chat"){const{messageIds:l,...t}=n.template;return{...n,template:{...t,messages:n.template.messageIds.map(i=>a[i])}}}return n};function e1(n,a){const l=n[a],t=yt[a];return l?t.length===0?[]:t.map(i=>({envVarName:i.envVarName,value:l[i.envVarName]??""})):[]}const n1=({playgroundStore:n,instanceId:a,credentials:l})=>{const t=Ud({playgroundStore:n,instanceId:a,credentials:l}),{instances:i,templateFormat:r,input:s,allInstanceMessages:d}=n.getState(),c=i.map(p=>bi(p,d)),{variablesMap:m}=Qd({instances:c,input:s,templateFormat:r});return{...t,template:{variables:m,format:r}}},Lo=({playgroundStore:n,instanceId:a,credentials:l,datasetId:t})=>({...Ud({playgroundStore:n,instanceId:a,credentials:l}),templateFormat:n.getState().templateFormat,datasetId:t});function Mr(n){if(typeof n=="string"){const a=n.startsWith('"{')||n.startsWith('"[')||n.startsWith('"\\"');try{if(a){const t=JSON.parse(n),i=typeof t=="string"?JSON.parse(t):t;return JSON.stringify(i,null,2)}}catch{}if(/^\s*[0-9{[]|true|false|null/.test(n))return n}return JSON.stringify(n,null,2)}function Hd(n,a){return a.filter(l=>l.required).every(l=>n.some(t=>Ga(t,l)))}const a1=n=>{for(const[a,l]of Object.entries(n))if(a.endsWith("DefaultValue")&&l!=null)return n[a]};function n3(n,a){const l=new Map(n.map(t=>[t.invocationName,t]));return a.forEach(t=>{var c;const i=t.invocationName,r=a1(t),s=Bl(t.invocationInputField||"");if(!t.invocationName||!t.invocationInputField||!i||r==null||((c=l.get(i))==null?void 0:c[s])!=null)return;const d={canonicalName:t.canonicalName,invocationName:t.invocationName,[s]:r};l.set(i,d)}),Array.from(l.values())}const l1=te({type:Na("enabled")}).passthrough(),t1=te({type:Dl(["any","tool"])}).passthrough(),i1=(n,a)=>{if(!a)return n;const l=n.some(t=>t.canonicalName==="ANTHROPIC_EXTENDED_THINKING"&&t.valueJson&&l1.safeParse(t.valueJson).success);return n.filter(t=>{if(t.canonicalName==="ANTHROPIC_EXTENDED_THINKING"&&!t.valueJson)return!1;if(l){if(t.canonicalName==="TEMPERATURE"||t.canonicalName==="TOP_P")return!1;if(t.canonicalName===Ba)return!t1.safeParse(t.valueJson).success}return!0})},r1=["frequency_penalty","presence_penalty"],o1=n=>n.filter(l=>l.invocationName&&r1.includes(l.invocationName)?!(l.valueFloat==0||l.valueInt==0):!0),Gd=(n,a,l)=>{const t=o1(n);return a==="ANTHROPIC"?i1(t,l):t},s1=/(?:^|\/)deployments\/([^/]+)(?:\/?|$)/,d1=te({metadata:te({ls_model_name:be().optional()}).optional()}).passthrough();function c1(n){try{const a=new URL(n),l=a.origin.trim(),t=a.searchParams.get("api-version"),i=t&&t.trim()?t.trim():null,s=(a.pathname||"").toString().match(s1),d=s&&s[1]?s[1].trim():null;return{endpoint:l,apiVersion:i,deploymentName:d}}catch{return{endpoint:null,apiVersion:null,deploymentName:null}}}const Wd=y.createContext(null);function a3({children:n,...a}){const[l]=y.useState(()=>ph(a));return e(Wd.Provider,{value:l,children:n})}function pl(n,a){const l=y.useContext(Wd);if(!l)throw new Error("Missing CredentialsContext.Provider in the tree");return ut(l,n,a)}const Jd=y.createContext(null);function u1(){const n=y.useContext(Jd);if(n===null)throw new Error("useFunctionality must be used within a FunctionalityProvider");return n}function l3(n){return e(Jd.Provider,{value:{authenticationEnabled:window.Config.authenticationEnabled},children:n.children})}const Zd={argumentDefinitions:[],kind:"Fragment",metadata:null,name:"GenerativeProvidersCard_data",selections:[{alias:null,args:null,concreteType:"GenerativeProvider",kind:"LinkedField",name:"modelProviders",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"key",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"dependenciesInstalled",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"dependencies",storageKey:null},{alias:null,args:null,concreteType:"GenerativeProviderCredentialConfig",kind:"LinkedField",name:"credentialRequirements",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"envVarName",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"isRequired",storageKey:null}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"credentialsSet",storageKey:null}],storageKey:null}],type:"Query",abstractKey:null};Zd.hash="4062531cfa3f77e541172a44101f5331";function m1({query:n}){const a=pl(d=>d),l=P.useFragment(Zd,n),t=y.useMemo(()=>[...l.modelProviders],[l]),i=y.useMemo(()=>[{header:"Name",accessorKey:"name",cell:({row:d})=>o(b,{direction:"row",alignItems:"center",gap:"size-100",children:[e(Ua,{provider:d.original.key,height:18}),d.original.name]})},{header:"Environment Variables",accessorKey:"apiKeyEnvVar",cell:({row:d})=>{const c=yt[d.original.key],m=(c==null?void 0:c.map(p=>p.envVarName).join(", "))||d.original.credentialRequirements.map(p=>p.envVarName).join(", ")||"--";return e(C,{children:m})}},{header:"configuration",accessorKey:"credentialsSet",cell:({row:d})=>{if(!d.original.dependenciesInstalled)return e(C,{color:"warning",children:"missing dependencies"});const c=d.original.credentialRequirements;if(!gr(d.original.key))return e(C,{color:"warning",children:"unknown provider key"});const m=a[d.original.key];return c.every(({envVarName:g,isRequired:u})=>(m==null?void 0:m[g])!==void 0||!u)?e(C,{color:"success",children:"local"}):d.original.credentialsSet?e(C,{color:"success",children:"configured on the server"}):e(C,{color:"text-700",children:"not configured"})}},{header:"",accessorKey:"id",cell:({row:d})=>e(b,{direction:"row",justifyContent:"end",gap:"size-100",width:"100%",children:o(Z,{children:[e(A,{size:"S",leadingVisual:e(D,{svg:e(Xa,{})})}),e(le,{children:e(ee,{size:"M",children:e(g1,{provider:d.original})})})]})})}],[a]),r=Me({columns:i,data:t,getCoreRowModel:Ve(),getSortedRowModel:Tn()}),s=r.getRowModel().rows;return e(H,{title:"AI Providers",children:o("table",{css:hn,children:[e("thead",{children:r.getHeaderGroups().map(d=>e("tr",{children:d.headers.map(c=>e("th",{colSpan:c.colSpan,children:c.isPlaceholder?null:e("div",{children:Y(c.column.columnDef.header,c.getContext())})},c.id))},d.id))}),e("tbody",{children:s.map(d=>e("tr",{children:d.getVisibleCells().map(c=>e("td",{children:Y(c.column.columnDef.cell,c.getContext())},c.id))},d.id))})]})})}function g1({provider:n}){return e(X,{children:o(ge,{children:[o(ue,{children:[o(me,{children:["Configure ",n.name," Credentials"]}),e(ye,{children:e(fe,{slot:"close"})})]}),o(F,{padding:"size-200",children:[e(F,{paddingBottom:"size-100",children:o(C,{size:"XS",children:["Set the credentials for the ",n.name," API. These credentials will be stored entirely in your browser and will only be sent to the server during API requests."]})}),o(Kn,{children:[e(p1,{provider:n.key}),e(F,{paddingTop:"size-200",children:o(b,{direction:"row",justifyContent:"end",gap:"size-100",children:[e(A,{variant:"default",size:"S",slot:"close",children:"Cancel"}),e(A,{variant:"primary",size:"S",slot:"close",children:"Save Credentials"})]})})]})]})]})})}function p1({provider:n}){const a=pl(i=>i.setCredential),l=yt[n],t=pl(i=>i[n]);return e(b,{direction:"column",gap:"size-100",children:l.map(i=>o(_s,{isRequired:i.isRequired,onChange:r=>{a({provider:n,envVarName:i.envVarName,value:r})},value:(t==null?void 0:t[i.envVarName])??void 0,children:[e(W,{children:i.envVarName}),e(Ds,{})]},i.envVarName))})}function t3(){const n=nn();return Ge(n),e(m1,{query:n})}const Xd={fragment:{argumentDefinitions:[],kind:"Fragment",metadata:null,name:"settingsAIProvidersPageLoaderQuery",selections:[{args:null,kind:"FragmentSpread",name:"GenerativeProvidersCard_data"}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[],kind:"Operation",name:"settingsAIProvidersPageLoaderQuery",selections:[{alias:null,args:null,concreteType:"GenerativeProvider",kind:"LinkedField",name:"modelProviders",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"key",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"dependenciesInstalled",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"dependencies",storageKey:null},{alias:null,args:null,concreteType:"GenerativeProviderCredentialConfig",kind:"LinkedField",name:"credentialRequirements",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"envVarName",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"isRequired",storageKey:null}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"credentialsSet",storageKey:null}],storageKey:null}]},params:{cacheID:"1238ea27e05b70fd2c203ab4be6a1209",id:null,metadata:{},name:"settingsAIProvidersPageLoaderQuery",operationKind:"query",text:`query settingsAIProvidersPageLoaderQuery {
2
2
  ...GenerativeProvidersCard_data
3
3
  }
4
4
 
@@ -1547,7 +1547,7 @@ fragment SpansTable_spans on Project {
1547
1547
  }
1548
1548
  id
1549
1549
  }
1550
- `}}}();iu.hash="6c31b031cf07047b2f02307de192ee3c";const ru=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"id"},{defaultValue:null,kind:"LocalArgument",name:"timeRange"}],a=[{kind:"Variable",name:"id",variableName:"id"}],l={alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},t={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},i={alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},r=[{kind:"Literal",name:"first",value:30},{kind:"Literal",name:"rootSpansOnly",value:!0},{kind:"Literal",name:"sort",value:{col:"startTime",dir:"desc"}},{kind:"Variable",name:"timeRange",variableName:"timeRange"}],s={alias:null,args:null,kind:"ScalarField",name:"spanKind",storageKey:null},d={alias:null,args:null,kind:"ScalarField",name:"startTime",storageKey:null},c={alias:null,args:null,kind:"ScalarField",name:"latencyMs",storageKey:null},m={alias:null,args:null,kind:"ScalarField",name:"parentId",storageKey:null},p=[{alias:"value",args:null,kind:"ScalarField",name:"truncatedValue",storageKey:null}],g={alias:null,args:null,concreteType:"SpanIOValue",kind:"LinkedField",name:"input",plural:!1,selections:p,storageKey:null},u={alias:null,args:null,concreteType:"SpanIOValue",kind:"LinkedField",name:"output",plural:!1,selections:p,storageKey:null},f={alias:null,args:null,kind:"ScalarField",name:"spanId",storageKey:null},h={alias:null,args:null,kind:"ScalarField",name:"traceId",storageKey:null},k={alias:null,args:null,kind:"ScalarField",name:"label",storageKey:null},S={alias:null,args:null,kind:"ScalarField",name:"score",storageKey:null},v={alias:null,args:null,concreteType:"SpanAnnotation",kind:"LinkedField",name:"spanAnnotations",plural:!0,selections:[t,i,k,S,{alias:null,args:null,kind:"ScalarField",name:"annotatorKind",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"createdAt",storageKey:null},{alias:null,args:null,concreteType:"User",kind:"LinkedField",name:"user",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"username",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"profilePictureUrl",storageKey:null},t],storageKey:null}],storageKey:null},K={alias:null,args:null,concreteType:"AnnotationSummary",kind:"LinkedField",name:"spanAnnotationSummaries",plural:!0,selections:[{alias:null,args:null,concreteType:"LabelFraction",kind:"LinkedField",name:"labelFractions",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"fraction",storageKey:null},k],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"meanScore",storageKey:null},i],storageKey:null},I={alias:null,args:null,concreteType:"Project",kind:"LinkedField",name:"project",plural:!1,selections:[t,{alias:null,args:null,concreteType:"AnnotationConfigConnection",kind:"LinkedField",name:"annotationConfigs",plural:!1,selections:[{alias:null,args:null,concreteType:"AnnotationConfigEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:null,args:null,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[l,{kind:"InlineFragment",selections:[{alias:null,args:null,kind:"ScalarField",name:"annotationType",storageKey:null}],type:"AnnotationConfigBase",abstractKey:"__isAnnotationConfigBase"},{kind:"InlineFragment",selections:[t,i,{alias:null,args:null,kind:"ScalarField",name:"optimizationDirection",storageKey:null},{alias:null,args:null,concreteType:"CategoricalAnnotationValue",kind:"LinkedField",name:"values",plural:!0,selections:[k,S],storageKey:null}],type:"CategoricalAnnotationConfig",abstractKey:null},{kind:"InlineFragment",selections:[t],type:"Node",abstractKey:"__isNode"}],storageKey:null}],storageKey:null}],storageKey:null}],storageKey:null},L={alias:null,args:null,concreteType:"DocumentRetrievalMetrics",kind:"LinkedField",name:"documentRetrievalMetrics",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"evaluationName",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"ndcg",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"precision",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"hit",storageKey:null}],storageKey:null};return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"ProjectPageQueriesTracesQuery",selections:[{alias:"project",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{args:null,kind:"FragmentSpread",name:"TracesTable_spans"}],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"ProjectPageQueriesTracesQuery",selections:[{alias:"project",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[l,t,{kind:"InlineFragment",selections:[i,{alias:null,args:null,kind:"ScalarField",name:"spanAnnotationNames",storageKey:null},{alias:"rootSpans",args:r,concreteType:"SpanConnection",kind:"LinkedField",name:"spans",plural:!1,selections:[{alias:null,args:null,concreteType:"SpanEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"rootSpan",args:null,concreteType:"Span",kind:"LinkedField",name:"node",plural:!1,selections:[t,s,i,{alias:null,args:null,kind:"ScalarField",name:"metadata",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"statusCode",storageKey:null},d,c,{alias:null,args:null,kind:"ScalarField",name:"cumulativeTokenCountTotal",storageKey:null},m,g,u,f,{alias:null,args:null,concreteType:"Trace",kind:"LinkedField",name:"trace",plural:!1,selections:[t,h,{alias:null,args:null,kind:"ScalarField",name:"numSpans",storageKey:null},{alias:null,args:null,concreteType:"SpanCostSummary",kind:"LinkedField",name:"costSummary",plural:!1,selections:[{alias:null,args:null,concreteType:"CostBreakdown",kind:"LinkedField",name:"total",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"cost",storageKey:null}],storageKey:null}],storageKey:null}],storageKey:null},v,K,I,L,{alias:null,args:[{kind:"Literal",name:"first",value:50}],concreteType:"SpanConnection",kind:"LinkedField",name:"descendants",plural:!1,selections:[{alias:null,args:null,concreteType:"SpanEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:null,args:null,concreteType:"Span",kind:"LinkedField",name:"node",plural:!1,selections:[t,s,i,{alias:"statusCode",args:null,kind:"ScalarField",name:"propagatedStatusCode",storageKey:null},d,c,m,{alias:"cumulativeTokenCountTotal",args:null,kind:"ScalarField",name:"tokenCountTotal",storageKey:null},g,u,f,{alias:null,args:null,concreteType:"Trace",kind:"LinkedField",name:"trace",plural:!1,selections:[t,h],storageKey:null},v,I,K,L],storageKey:null}],storageKey:null}],storageKey:"descendants(first:50)"}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"cursor",storageKey:null},{alias:null,args:null,concreteType:"Span",kind:"LinkedField",name:"node",plural:!1,selections:[l,t],storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"PageInfo",kind:"LinkedField",name:"pageInfo",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"endCursor",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"hasNextPage",storageKey:null}],storageKey:null}],storageKey:null},{alias:"rootSpans",args:r,filters:["sort","rootSpansOnly","filterCondition","timeRange"],handle:"connection",key:"TracesTable_rootSpans",kind:"LinkedHandle",name:"spans"}],type:"Project",abstractKey:null}],storageKey:null}]},params:{cacheID:"39bcac09eddd27e9899b2c89d44d7ae8",id:null,metadata:{},name:"ProjectPageQueriesTracesQuery",operationKind:"query",text:`query ProjectPageQueriesTracesQuery(
1550
+ `}}}();iu.hash="6c31b031cf07047b2f02307de192ee3c";const ru=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"id"},{defaultValue:null,kind:"LocalArgument",name:"timeRange"}],a=[{kind:"Variable",name:"id",variableName:"id"}],l={alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},t={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},i={alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},r=[{kind:"Literal",name:"first",value:30},{kind:"Literal",name:"rootSpansOnly",value:!0},{kind:"Literal",name:"sort",value:{col:"startTime",dir:"desc"}},{kind:"Variable",name:"timeRange",variableName:"timeRange"}],s={alias:null,args:null,kind:"ScalarField",name:"spanKind",storageKey:null},d={alias:null,args:null,kind:"ScalarField",name:"startTime",storageKey:null},c={alias:null,args:null,kind:"ScalarField",name:"endTime",storageKey:null},m={alias:null,args:null,kind:"ScalarField",name:"latencyMs",storageKey:null},p={alias:null,args:null,kind:"ScalarField",name:"parentId",storageKey:null},g=[{alias:"value",args:null,kind:"ScalarField",name:"truncatedValue",storageKey:null}],u={alias:null,args:null,concreteType:"SpanIOValue",kind:"LinkedField",name:"input",plural:!1,selections:g,storageKey:null},f={alias:null,args:null,concreteType:"SpanIOValue",kind:"LinkedField",name:"output",plural:!1,selections:g,storageKey:null},h={alias:null,args:null,kind:"ScalarField",name:"spanId",storageKey:null},k={alias:null,args:null,kind:"ScalarField",name:"traceId",storageKey:null},S={alias:null,args:null,kind:"ScalarField",name:"label",storageKey:null},v={alias:null,args:null,kind:"ScalarField",name:"score",storageKey:null},K={alias:null,args:null,concreteType:"SpanAnnotation",kind:"LinkedField",name:"spanAnnotations",plural:!0,selections:[t,i,S,v,{alias:null,args:null,kind:"ScalarField",name:"annotatorKind",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"createdAt",storageKey:null},{alias:null,args:null,concreteType:"User",kind:"LinkedField",name:"user",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"username",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"profilePictureUrl",storageKey:null},t],storageKey:null}],storageKey:null},I={alias:null,args:null,concreteType:"AnnotationSummary",kind:"LinkedField",name:"spanAnnotationSummaries",plural:!0,selections:[{alias:null,args:null,concreteType:"LabelFraction",kind:"LinkedField",name:"labelFractions",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"fraction",storageKey:null},S],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"meanScore",storageKey:null},i],storageKey:null},L={alias:null,args:null,concreteType:"Project",kind:"LinkedField",name:"project",plural:!1,selections:[t,{alias:null,args:null,concreteType:"AnnotationConfigConnection",kind:"LinkedField",name:"annotationConfigs",plural:!1,selections:[{alias:null,args:null,concreteType:"AnnotationConfigEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:null,args:null,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[l,{kind:"InlineFragment",selections:[{alias:null,args:null,kind:"ScalarField",name:"annotationType",storageKey:null}],type:"AnnotationConfigBase",abstractKey:"__isAnnotationConfigBase"},{kind:"InlineFragment",selections:[t,i,{alias:null,args:null,kind:"ScalarField",name:"optimizationDirection",storageKey:null},{alias:null,args:null,concreteType:"CategoricalAnnotationValue",kind:"LinkedField",name:"values",plural:!0,selections:[S,v],storageKey:null}],type:"CategoricalAnnotationConfig",abstractKey:null},{kind:"InlineFragment",selections:[t],type:"Node",abstractKey:"__isNode"}],storageKey:null}],storageKey:null}],storageKey:null}],storageKey:null},z={alias:null,args:null,concreteType:"DocumentRetrievalMetrics",kind:"LinkedField",name:"documentRetrievalMetrics",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"evaluationName",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"ndcg",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"precision",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"hit",storageKey:null}],storageKey:null};return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"ProjectPageQueriesTracesQuery",selections:[{alias:"project",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{args:null,kind:"FragmentSpread",name:"TracesTable_spans"}],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"ProjectPageQueriesTracesQuery",selections:[{alias:"project",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[l,t,{kind:"InlineFragment",selections:[i,{alias:null,args:null,kind:"ScalarField",name:"spanAnnotationNames",storageKey:null},{alias:"rootSpans",args:r,concreteType:"SpanConnection",kind:"LinkedField",name:"spans",plural:!1,selections:[{alias:null,args:null,concreteType:"SpanEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"rootSpan",args:null,concreteType:"Span",kind:"LinkedField",name:"node",plural:!1,selections:[t,s,i,{alias:null,args:null,kind:"ScalarField",name:"metadata",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"statusCode",storageKey:null},d,c,m,{alias:null,args:null,kind:"ScalarField",name:"cumulativeTokenCountTotal",storageKey:null},p,u,f,h,{alias:null,args:null,concreteType:"Trace",kind:"LinkedField",name:"trace",plural:!1,selections:[t,k,{alias:null,args:null,kind:"ScalarField",name:"numSpans",storageKey:null},{alias:null,args:null,concreteType:"SpanCostSummary",kind:"LinkedField",name:"costSummary",plural:!1,selections:[{alias:null,args:null,concreteType:"CostBreakdown",kind:"LinkedField",name:"total",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"cost",storageKey:null}],storageKey:null}],storageKey:null}],storageKey:null},K,I,L,z,{alias:null,args:[{kind:"Literal",name:"first",value:50}],concreteType:"SpanConnection",kind:"LinkedField",name:"descendants",plural:!1,selections:[{alias:null,args:null,concreteType:"SpanEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:null,args:null,concreteType:"Span",kind:"LinkedField",name:"node",plural:!1,selections:[t,s,i,{alias:"statusCode",args:null,kind:"ScalarField",name:"propagatedStatusCode",storageKey:null},d,c,m,p,{alias:"cumulativeTokenCountTotal",args:null,kind:"ScalarField",name:"tokenCountTotal",storageKey:null},u,f,h,{alias:null,args:null,concreteType:"Trace",kind:"LinkedField",name:"trace",plural:!1,selections:[t,k],storageKey:null},K,L,I,z],storageKey:null}],storageKey:null}],storageKey:"descendants(first:50)"}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"cursor",storageKey:null},{alias:null,args:null,concreteType:"Span",kind:"LinkedField",name:"node",plural:!1,selections:[l,t],storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"PageInfo",kind:"LinkedField",name:"pageInfo",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"endCursor",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"hasNextPage",storageKey:null}],storageKey:null}],storageKey:null},{alias:"rootSpans",args:r,filters:["sort","rootSpansOnly","filterCondition","timeRange"],handle:"connection",key:"TracesTable_rootSpans",kind:"LinkedHandle",name:"spans"}],type:"Project",abstractKey:null}],storageKey:null}]},params:{cacheID:"c2d7db78ed889ec5545108b0bdb6cc8a",id:null,metadata:{},name:"ProjectPageQueriesTracesQuery",operationKind:"query",text:`query ProjectPageQueriesTracesQuery(
1551
1551
  $id: ID!
1552
1552
  $timeRange: TimeRange!
1553
1553
  ) {
@@ -1629,6 +1629,7 @@ fragment TracesTable_spans on Project {
1629
1629
  metadata
1630
1630
  statusCode
1631
1631
  startTime
1632
+ endTime
1632
1633
  latencyMs
1633
1634
  cumulativeTokenCountTotal
1634
1635
  parentId
@@ -1680,6 +1681,7 @@ fragment TracesTable_spans on Project {
1680
1681
  name
1681
1682
  statusCode: propagatedStatusCode
1682
1683
  startTime
1684
+ endTime
1683
1685
  latencyMs
1684
1686
  parentId
1685
1687
  cumulativeTokenCountTotal: tokenCountTotal
@@ -2707,7 +2709,7 @@ fragment PlaygroundDatasetExamplesTableFragment on Dataset {
2707
2709
  justify-content: flex-start;
2708
2710
  align-items: flex-end;
2709
2711
  gap: var(--ac-global-dimension-static-size-100);
2710
- `,children:(m=l.annotations)==null?void 0:m.edges.map(p=>e("li",{children:e(ft,{annotation:p.annotation})},p.annotation.id))})]})]})})})]})})]})]})})}function Yv({startTime:n,endTime:a}){const l=y.useMemo(()=>{let t=null;return n&&a&&(t=new Date(a).getTime()-new Date(n).getTime()),t},[n,a]);return l===null?null:e(mn,{latencyMs:l})}function eC({error:n}){return o(b,{direction:"row",gap:"size-50",alignItems:"center",children:[e(D,{svg:e(br,{}),color:"danger"}),e(C,{color:"danger",children:n})]})}const $o={backgroundColor:"light",borderColor:"light",collapsible:!0},im=function(){var n={defaultValue:null,kind:"LocalArgument",name:"id"},a={defaultValue:null,kind:"LocalArgument",name:"traceId"},l=[{kind:"Variable",name:"id",variableName:"id"}],t=[{kind:"Variable",name:"traceId",variableName:"traceId"}],i={alias:null,args:null,kind:"ScalarField",name:"projectSessionId",storageKey:null},r={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},s={alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},d={alias:null,args:null,kind:"ScalarField",name:"latencyMs",storageKey:null},c={alias:null,args:[{kind:"Literal",name:"first",value:1e3}],concreteType:"SpanConnection",kind:"LinkedField",name:"spans",plural:!1,selections:[{alias:null,args:null,concreteType:"SpanEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"span",args:null,concreteType:"Span",kind:"LinkedField",name:"node",plural:!1,selections:[r,{alias:null,args:null,kind:"ScalarField",name:"spanId",storageKey:null},s,{alias:null,args:null,kind:"ScalarField",name:"spanKind",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"statusCode",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"startTime",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"parentId",storageKey:null},d,{alias:null,args:null,kind:"ScalarField",name:"tokenCountTotal",storageKey:null},{alias:null,args:null,concreteType:"AnnotationSummary",kind:"LinkedField",name:"spanAnnotationSummaries",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"labels",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"count",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"labelCount",storageKey:null},{alias:null,args:null,concreteType:"LabelFraction",kind:"LinkedField",name:"labelFractions",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"fraction",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"label",storageKey:null}],storageKey:null},s,{alias:null,args:null,kind:"ScalarField",name:"scoreCount",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"meanScore",storageKey:null}],storageKey:null}],storageKey:null}],storageKey:null}],storageKey:"spans(first:1000)"},m=[{alias:null,args:null,kind:"ScalarField",name:"cost",storageKey:null}],p={alias:null,args:null,concreteType:"SpanCostSummary",kind:"LinkedField",name:"costSummary",plural:!1,selections:[{alias:null,args:null,concreteType:"CostBreakdown",kind:"LinkedField",name:"prompt",plural:!1,selections:m,storageKey:null},{alias:null,args:null,concreteType:"CostBreakdown",kind:"LinkedField",name:"completion",plural:!1,selections:m,storageKey:null},{alias:null,args:null,concreteType:"CostBreakdown",kind:"LinkedField",name:"total",plural:!1,selections:m,storageKey:null}],storageKey:null};return{fragment:{argumentDefinitions:[n,a],kind:"Fragment",metadata:null,name:"TraceDetailsQuery",selections:[{alias:"project",args:l,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{kind:"InlineFragment",selections:[{alias:null,args:t,concreteType:"Trace",kind:"LinkedField",name:"trace",plural:!1,selections:[i,c,d,p],storageKey:null}],type:"Project",abstractKey:null}],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[a,n],kind:"Operation",name:"TraceDetailsQuery",selections:[{alias:"project",args:l,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},{kind:"InlineFragment",selections:[{alias:null,args:t,concreteType:"Trace",kind:"LinkedField",name:"trace",plural:!1,selections:[i,c,d,p,r],storageKey:null}],type:"Project",abstractKey:null},r],storageKey:null}]},params:{cacheID:"11ead68138be33327972520ed0a0ea09",id:null,metadata:{},name:"TraceDetailsQuery",operationKind:"query",text:`query TraceDetailsQuery(
2712
+ `,children:(m=l.annotations)==null?void 0:m.edges.map(p=>e("li",{children:e(ft,{annotation:p.annotation})},p.annotation.id))})]})]})})})]})})]})]})})}function Yv({startTime:n,endTime:a}){const l=y.useMemo(()=>{let t=null;return n&&a&&(t=new Date(a).getTime()-new Date(n).getTime()),t},[n,a]);return l===null?null:e(mn,{latencyMs:l})}function eC({error:n}){return o(b,{direction:"row",gap:"size-50",alignItems:"center",children:[e(D,{svg:e(br,{}),color:"danger"}),e(C,{color:"danger",children:n})]})}const $o={backgroundColor:"light",borderColor:"light",collapsible:!0},im=function(){var n={defaultValue:null,kind:"LocalArgument",name:"id"},a={defaultValue:null,kind:"LocalArgument",name:"traceId"},l=[{kind:"Variable",name:"id",variableName:"id"}],t=[{kind:"Variable",name:"traceId",variableName:"traceId"}],i={alias:null,args:null,kind:"ScalarField",name:"projectSessionId",storageKey:null},r={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},s={alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},d={alias:null,args:null,kind:"ScalarField",name:"latencyMs",storageKey:null},c={alias:null,args:[{kind:"Literal",name:"first",value:1e3}],concreteType:"SpanConnection",kind:"LinkedField",name:"spans",plural:!1,selections:[{alias:null,args:null,concreteType:"SpanEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"span",args:null,concreteType:"Span",kind:"LinkedField",name:"node",plural:!1,selections:[r,{alias:null,args:null,kind:"ScalarField",name:"spanId",storageKey:null},s,{alias:null,args:null,kind:"ScalarField",name:"spanKind",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"statusCode",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"startTime",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"endTime",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"parentId",storageKey:null},d,{alias:null,args:null,kind:"ScalarField",name:"tokenCountTotal",storageKey:null},{alias:null,args:null,concreteType:"AnnotationSummary",kind:"LinkedField",name:"spanAnnotationSummaries",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"labels",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"count",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"labelCount",storageKey:null},{alias:null,args:null,concreteType:"LabelFraction",kind:"LinkedField",name:"labelFractions",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"fraction",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"label",storageKey:null}],storageKey:null},s,{alias:null,args:null,kind:"ScalarField",name:"scoreCount",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"meanScore",storageKey:null}],storageKey:null}],storageKey:null}],storageKey:null}],storageKey:"spans(first:1000)"},m=[{alias:null,args:null,kind:"ScalarField",name:"cost",storageKey:null}],p={alias:null,args:null,concreteType:"SpanCostSummary",kind:"LinkedField",name:"costSummary",plural:!1,selections:[{alias:null,args:null,concreteType:"CostBreakdown",kind:"LinkedField",name:"prompt",plural:!1,selections:m,storageKey:null},{alias:null,args:null,concreteType:"CostBreakdown",kind:"LinkedField",name:"completion",plural:!1,selections:m,storageKey:null},{alias:null,args:null,concreteType:"CostBreakdown",kind:"LinkedField",name:"total",plural:!1,selections:m,storageKey:null}],storageKey:null};return{fragment:{argumentDefinitions:[n,a],kind:"Fragment",metadata:null,name:"TraceDetailsQuery",selections:[{alias:"project",args:l,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{kind:"InlineFragment",selections:[{alias:null,args:t,concreteType:"Trace",kind:"LinkedField",name:"trace",plural:!1,selections:[i,c,d,p],storageKey:null}],type:"Project",abstractKey:null}],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[a,n],kind:"Operation",name:"TraceDetailsQuery",selections:[{alias:"project",args:l,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},{kind:"InlineFragment",selections:[{alias:null,args:t,concreteType:"Trace",kind:"LinkedField",name:"trace",plural:!1,selections:[i,c,d,p,r],storageKey:null}],type:"Project",abstractKey:null},r],storageKey:null}]},params:{cacheID:"089ffdcef4b089c649e95d5414a9a904",id:null,metadata:{},name:"TraceDetailsQuery",operationKind:"query",text:`query TraceDetailsQuery(
2711
2713
  $traceId: ID!
2712
2714
  $id: ID!
2713
2715
  ) {
@@ -2725,6 +2727,7 @@ fragment PlaygroundDatasetExamplesTableFragment on Dataset {
2725
2727
  spanKind
2726
2728
  statusCode
2727
2729
  startTime
2730
+ endTime
2728
2731
  parentId
2729
2732
  latencyMs
2730
2733
  tokenCountTotal
@@ -2761,7 +2764,7 @@ fragment PlaygroundDatasetExamplesTableFragment on Dataset {
2761
2764
  id
2762
2765
  }
2763
2766
  }
2764
- `}}}();im.hash="2c97785cc9a789cbebe59a993e72529d";const rm=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"id"}],a=[{kind:"Variable",name:"id",variableName:"id"}],l={alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},t={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},i={alias:null,args:null,kind:"ScalarField",name:"spanId",storageKey:null},r={alias:null,args:null,concreteType:"Trace",kind:"LinkedField",name:"trace",plural:!1,selections:[t,{alias:null,args:null,kind:"ScalarField",name:"traceId",storageKey:null}],storageKey:null},s={alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},d={alias:null,args:null,kind:"ScalarField",name:"spanKind",storageKey:null},c={alias:"statusCode",args:null,kind:"ScalarField",name:"propagatedStatusCode",storageKey:null},m={alias:null,args:null,kind:"ScalarField",name:"statusMessage",storageKey:null},p={alias:null,args:null,kind:"ScalarField",name:"startTime",storageKey:null},g={alias:null,args:null,kind:"ScalarField",name:"parentId",storageKey:null},u={alias:null,args:null,kind:"ScalarField",name:"latencyMs",storageKey:null},f={alias:null,args:null,kind:"ScalarField",name:"tokenCountTotal",storageKey:null},h={alias:null,args:null,kind:"ScalarField",name:"endTime",storageKey:null},k=[{alias:null,args:null,kind:"ScalarField",name:"value",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"mimeType",storageKey:null}],S={alias:null,args:null,concreteType:"SpanIOValue",kind:"LinkedField",name:"input",plural:!1,selections:k,storageKey:null},v={alias:null,args:null,concreteType:"SpanIOValue",kind:"LinkedField",name:"output",plural:!1,selections:k,storageKey:null},K={alias:null,args:null,kind:"ScalarField",name:"attributes",storageKey:null},I={alias:null,args:null,concreteType:"SpanEvent",kind:"LinkedField",name:"events",plural:!0,selections:[s,{alias:null,args:null,kind:"ScalarField",name:"message",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"timestamp",storageKey:null}],storageKey:null},L={alias:null,args:null,concreteType:"DocumentRetrievalMetrics",kind:"LinkedField",name:"documentRetrievalMetrics",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"evaluationName",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"ndcg",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"precision",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"hit",storageKey:null}],storageKey:null},z={alias:null,args:null,kind:"ScalarField",name:"label",storageKey:null},_={alias:null,args:null,kind:"ScalarField",name:"score",storageKey:null},V={alias:null,args:null,kind:"ScalarField",name:"explanation",storageKey:null},x={alias:null,args:null,concreteType:"DocumentEvaluation",kind:"LinkedField",name:"documentEvaluations",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"documentPosition",storageKey:null},s,z,_,V],storageKey:null},E={kind:"InlineFragment",selections:[t],type:"Node",abstractKey:"__isNode"},R={alias:null,args:null,kind:"ScalarField",name:"annotationType",storageKey:null},M={alias:null,args:null,kind:"ScalarField",name:"description",storageKey:null},$={alias:null,args:null,concreteType:"CategoricalAnnotationValue",kind:"LinkedField",name:"values",plural:!0,selections:[z,_],storageKey:null},O={alias:null,args:null,kind:"ScalarField",name:"optimizationDirection",storageKey:null},N={kind:"InlineFragment",selections:[{alias:null,args:null,kind:"ScalarField",name:"lowerBound",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"upperBound",storageKey:null},O],type:"ContinuousAnnotationConfig",abstractKey:null},q={kind:"InlineFragment",selections:[s],type:"FreeformAnnotationConfig",abstractKey:null};return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"SpanDetailsQuery",selections:[{alias:"span",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[l,{kind:"InlineFragment",selections:[t,i,r,s,d,c,m,p,g,u,f,h,S,v,K,{kind:"RequiredField",field:I,action:"THROW"},L,x,{alias:null,args:null,concreteType:"SpanAnnotation",kind:"LinkedField",name:"spanAnnotations",plural:!0,selections:[t,s],storageKey:null},{args:null,kind:"FragmentSpread",name:"SpanHeader_span"},{args:null,kind:"FragmentSpread",name:"SpanFeedback_annotations"},{args:null,kind:"FragmentSpread",name:"SpanAside_span"}],type:"Span",abstractKey:null}],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"SpanDetailsQuery",selections:[{alias:"span",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[l,t,{kind:"InlineFragment",selections:[i,r,s,d,c,m,p,g,u,f,h,S,v,K,I,L,x,{alias:null,args:null,concreteType:"SpanAnnotation",kind:"LinkedField",name:"spanAnnotations",plural:!0,selections:[t,s,z,_,V,{alias:null,args:null,kind:"ScalarField",name:"metadata",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"annotatorKind",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"identifier",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"source",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"createdAt",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"updatedAt",storageKey:null},{alias:null,args:null,concreteType:"User",kind:"LinkedField",name:"user",plural:!1,selections:[t,{alias:null,args:null,kind:"ScalarField",name:"username",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"profilePictureUrl",storageKey:null}],storageKey:null}],storageKey:null},{alias:"code",args:null,kind:"ScalarField",name:"statusCode",storageKey:null},{alias:null,args:null,concreteType:"SpanCostSummary",kind:"LinkedField",name:"costSummary",plural:!1,selections:[{alias:null,args:null,concreteType:"CostBreakdown",kind:"LinkedField",name:"total",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"cost",storageKey:null}],storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"Project",kind:"LinkedField",name:"project",plural:!1,selections:[t,{alias:null,args:null,concreteType:"AnnotationConfigConnection",kind:"LinkedField",name:"annotationConfigs",plural:!1,selections:[{alias:null,args:null,concreteType:"AnnotationConfigEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:null,args:null,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[l,E,{kind:"InlineFragment",selections:[s,R,M],type:"AnnotationConfigBase",abstractKey:"__isAnnotationConfigBase"},{kind:"InlineFragment",selections:[$,t,s,O],type:"CategoricalAnnotationConfig",abstractKey:null},N,q],storageKey:null}],storageKey:null},{alias:"configs",args:null,concreteType:"AnnotationConfigEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"config",args:null,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[l,E,{kind:"InlineFragment",selections:[s,M,R],type:"AnnotationConfigBase",abstractKey:"__isAnnotationConfigBase"},{kind:"InlineFragment",selections:[$],type:"CategoricalAnnotationConfig",abstractKey:null},N,q],storageKey:null}],storageKey:null}],storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"AnnotationSummary",kind:"LinkedField",name:"spanAnnotationSummaries",plural:!0,selections:[{alias:null,args:null,concreteType:"LabelFraction",kind:"LinkedField",name:"labelFractions",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"fraction",storageKey:null},z],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"meanScore",storageKey:null},s],storageKey:null}],type:"Span",abstractKey:null}],storageKey:null}]},params:{cacheID:"78ec23fb5e2d379bbb6b37072a90d653",id:null,metadata:{},name:"SpanDetailsQuery",operationKind:"query",text:`query SpanDetailsQuery(
2767
+ `}}}();im.hash="3d7d90516f3e1c3d7653361d9fd8f21e";const rm=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"id"}],a=[{kind:"Variable",name:"id",variableName:"id"}],l={alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},t={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},i={alias:null,args:null,kind:"ScalarField",name:"spanId",storageKey:null},r={alias:null,args:null,concreteType:"Trace",kind:"LinkedField",name:"trace",plural:!1,selections:[t,{alias:null,args:null,kind:"ScalarField",name:"traceId",storageKey:null}],storageKey:null},s={alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},d={alias:null,args:null,kind:"ScalarField",name:"spanKind",storageKey:null},c={alias:"statusCode",args:null,kind:"ScalarField",name:"propagatedStatusCode",storageKey:null},m={alias:null,args:null,kind:"ScalarField",name:"statusMessage",storageKey:null},p={alias:null,args:null,kind:"ScalarField",name:"startTime",storageKey:null},g={alias:null,args:null,kind:"ScalarField",name:"parentId",storageKey:null},u={alias:null,args:null,kind:"ScalarField",name:"latencyMs",storageKey:null},f={alias:null,args:null,kind:"ScalarField",name:"tokenCountTotal",storageKey:null},h={alias:null,args:null,kind:"ScalarField",name:"endTime",storageKey:null},k=[{alias:null,args:null,kind:"ScalarField",name:"value",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"mimeType",storageKey:null}],S={alias:null,args:null,concreteType:"SpanIOValue",kind:"LinkedField",name:"input",plural:!1,selections:k,storageKey:null},v={alias:null,args:null,concreteType:"SpanIOValue",kind:"LinkedField",name:"output",plural:!1,selections:k,storageKey:null},K={alias:null,args:null,kind:"ScalarField",name:"attributes",storageKey:null},I={alias:null,args:null,concreteType:"SpanEvent",kind:"LinkedField",name:"events",plural:!0,selections:[s,{alias:null,args:null,kind:"ScalarField",name:"message",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"timestamp",storageKey:null}],storageKey:null},L={alias:null,args:null,concreteType:"DocumentRetrievalMetrics",kind:"LinkedField",name:"documentRetrievalMetrics",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"evaluationName",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"ndcg",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"precision",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"hit",storageKey:null}],storageKey:null},z={alias:null,args:null,kind:"ScalarField",name:"label",storageKey:null},_={alias:null,args:null,kind:"ScalarField",name:"score",storageKey:null},V={alias:null,args:null,kind:"ScalarField",name:"explanation",storageKey:null},x={alias:null,args:null,concreteType:"DocumentEvaluation",kind:"LinkedField",name:"documentEvaluations",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"documentPosition",storageKey:null},s,z,_,V],storageKey:null},E={kind:"InlineFragment",selections:[t],type:"Node",abstractKey:"__isNode"},R={alias:null,args:null,kind:"ScalarField",name:"annotationType",storageKey:null},M={alias:null,args:null,kind:"ScalarField",name:"description",storageKey:null},$={alias:null,args:null,concreteType:"CategoricalAnnotationValue",kind:"LinkedField",name:"values",plural:!0,selections:[z,_],storageKey:null},O={alias:null,args:null,kind:"ScalarField",name:"optimizationDirection",storageKey:null},N={kind:"InlineFragment",selections:[{alias:null,args:null,kind:"ScalarField",name:"lowerBound",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"upperBound",storageKey:null},O],type:"ContinuousAnnotationConfig",abstractKey:null},q={kind:"InlineFragment",selections:[s],type:"FreeformAnnotationConfig",abstractKey:null};return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"SpanDetailsQuery",selections:[{alias:"span",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[l,{kind:"InlineFragment",selections:[t,i,r,s,d,c,m,p,g,u,f,h,S,v,K,{kind:"RequiredField",field:I,action:"THROW"},L,x,{alias:null,args:null,concreteType:"SpanAnnotation",kind:"LinkedField",name:"spanAnnotations",plural:!0,selections:[t,s],storageKey:null},{args:null,kind:"FragmentSpread",name:"SpanHeader_span"},{args:null,kind:"FragmentSpread",name:"SpanFeedback_annotations"},{args:null,kind:"FragmentSpread",name:"SpanAside_span"}],type:"Span",abstractKey:null}],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"SpanDetailsQuery",selections:[{alias:"span",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[l,t,{kind:"InlineFragment",selections:[i,r,s,d,c,m,p,g,u,f,h,S,v,K,I,L,x,{alias:null,args:null,concreteType:"SpanAnnotation",kind:"LinkedField",name:"spanAnnotations",plural:!0,selections:[t,s,z,_,V,{alias:null,args:null,kind:"ScalarField",name:"metadata",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"annotatorKind",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"identifier",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"source",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"createdAt",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"updatedAt",storageKey:null},{alias:null,args:null,concreteType:"User",kind:"LinkedField",name:"user",plural:!1,selections:[t,{alias:null,args:null,kind:"ScalarField",name:"username",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"profilePictureUrl",storageKey:null}],storageKey:null}],storageKey:null},{alias:"code",args:null,kind:"ScalarField",name:"statusCode",storageKey:null},{alias:null,args:null,concreteType:"SpanCostSummary",kind:"LinkedField",name:"costSummary",plural:!1,selections:[{alias:null,args:null,concreteType:"CostBreakdown",kind:"LinkedField",name:"total",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"cost",storageKey:null}],storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"Project",kind:"LinkedField",name:"project",plural:!1,selections:[t,{alias:null,args:null,concreteType:"AnnotationConfigConnection",kind:"LinkedField",name:"annotationConfigs",plural:!1,selections:[{alias:null,args:null,concreteType:"AnnotationConfigEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:null,args:null,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[l,E,{kind:"InlineFragment",selections:[s,R,M],type:"AnnotationConfigBase",abstractKey:"__isAnnotationConfigBase"},{kind:"InlineFragment",selections:[$,t,s,O],type:"CategoricalAnnotationConfig",abstractKey:null},N,q],storageKey:null}],storageKey:null},{alias:"configs",args:null,concreteType:"AnnotationConfigEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"config",args:null,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[l,E,{kind:"InlineFragment",selections:[s,M,R],type:"AnnotationConfigBase",abstractKey:"__isAnnotationConfigBase"},{kind:"InlineFragment",selections:[$],type:"CategoricalAnnotationConfig",abstractKey:null},N,q],storageKey:null}],storageKey:null}],storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"AnnotationSummary",kind:"LinkedField",name:"spanAnnotationSummaries",plural:!0,selections:[{alias:null,args:null,concreteType:"LabelFraction",kind:"LinkedField",name:"labelFractions",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"fraction",storageKey:null},z],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"meanScore",storageKey:null},s],storageKey:null}],type:"Span",abstractKey:null}],storageKey:null}]},params:{cacheID:"78ec23fb5e2d379bbb6b37072a90d653",id:null,metadata:{},name:"SpanDetailsQuery",operationKind:"query",text:`query SpanDetailsQuery(
2765
2768
  $id: ID!
2766
2769
  ) {
2767
2770
  span: node(id: $id) {
@@ -6148,7 +6151,7 @@ fragment TransferTracesButton_projects_1oCkZB on Query {
6148
6151
  `,onSelectionChange:m=>{if(m==="all")return;const p=m.keys().next().value;typeof p=="string"&&a(p)},children:m=>e(cl,{id:m.id,isDisabled:m.id===l,children:m.name},m.id)})]})}function Ip(n){const{projectId:a}=an(),{setFetchKey:l}=tl();Ge(a);const t=Ke(),i=Fe(),r=_e(),[s,d]=y.useState(!1),[c,m]=y.useState(!1),[p,g]=y.useState(!1),{selectedSpans:u,onClearSelection:f}=n,h=y.useMemo(()=>[...new Set(u.map(V=>V.traceId))],[u]),[k,S]=P.useMutation(Sp),[v,K]=P.useMutation(bp),I=u.length!==1,L=y.useCallback(V=>{k({variables:{input:{datasetId:V,spanIds:u.map(x=>x.id)}},onCompleted:()=>{i({title:"Examples added to dataset",message:`${u.length} example${I?"s have":" has"} been added to the dataset.`,action:{text:"View dataset",onClick:()=>{t(`/datasets/${V}/examples`)}}}),f()},onError:x=>{const E=je(x);r({title:"An error occurred",message:`Failed to add spans to dataset: ${(E==null?void 0:E[0])??x.message}`})}})},[k,u,i,I,f,t,r]),z=y.useCallback(()=>{v({variables:{traceIds:h},onCompleted:()=>{i({title:"Traces deleted",message:`${h.length} trace${h.length!==1?"s have":" has"} been deleted.`}),f()},onError:V=>{const x=je(V);r({title:"An error occurred",message:`Failed to delete traces: ${(x==null?void 0:x[0])??V.message}`})}})},[v,h,i,f,r]),_=()=>{g(!0)};return e(Dr,{children:o(Lr,{children:[o(Zi,{"aria-label":"Span selection",children:[e(wn,{size:"M",onPress:f,"aria-label":"Clear selection",children:e(D,{svg:e(Ll,{})})}),e(F,{paddingEnd:"size-100",children:e(C,{children:`${u.length} span${I?"s":""} selected`})})]}),o(Zi,{"aria-label":"Span selection actions",children:[o(Z,{isOpen:c,onOpenChange:V=>{m(V)},children:[e(A,{variant:"primary",size:"M",leadingVisual:e(D,{svg:e(ea,{})}),onPress:()=>{m(!0)},isDisabled:S,children:S?"Adding...":"Add to Dataset"}),e(Fn,{placement:"top end",children:e(y.Suspense,{children:e(N2,{onDatasetSelected:V=>{L(V),m(!1)},onCreateNewDataset:()=>{m(!1),d(!0)}})})})]}),e(j2,{traceIds:h,currentProjectId:a,onSuccess:({projectName:V})=>{i({title:"Transfer Success",message:`The traces have been moved to project: ${V}`}),f(),l(`trace-transfer-${Date.now()}`)},onError:V=>{r({title:"Transfer Failed",message:`Failed to transfer due to error: ${V.message}`})}}),e(Z,{isOpen:s,onOpenChange:d,children:e(le,{children:e(ee,{children:e(X,{children:o(ge,{children:[o(ue,{children:[e(me,{children:"New Dataset"}),e(ye,{children:e(A,{variant:"default",size:"S",onPress:()=>{d(!1)},leadingVisual:e(D,{svg:e(Ll,{})})})})]}),e(vd,{onDatasetCreateError:V=>{const x=je(V);r({title:"Dataset creation failed",message:`Failed to create dataset: ${(x==null?void 0:x[0])??V.message}`})},onDatasetCreated:V=>{d(!1),i({title:"Dataset created",message:`${V.name} has been successfully created.`}),m(!0)}})]})})})})}),e(A,{size:"M","aria-label":"Delete Traces",isDisabled:K,onPress:_,variant:"danger",leadingVisual:e(D,{svg:e(gn,{})})}),e(Z,{isOpen:p,onOpenChange:g,children:e(le,{children:e(ee,{children:e(X,{children:o(ge,{children:[e(ue,{children:e(me,{children:"Delete Traces"})}),e(F,{padding:"size-200",children:e(C,{color:"danger",children:"Are you sure you want to delete the selected spans and their traces?"})}),e(F,{paddingEnd:"size-200",paddingTop:"size-100",paddingBottom:"size-100",borderTopColor:"light",borderTopWidth:"thin",children:o(b,{direction:"row",justifyContent:"end",gap:"size-100",children:[e(A,{variant:"default",onPress:()=>{g(!1)},children:"Cancel"}),e(A,{variant:"danger",onPress:()=>{z(),g(!1)},children:"Delete Traces"})]})})]})})})})})]})]})})}const Lp="annotations",lr="-",Dp={col:"startTime",dir:"desc"};function _p(n){let a=null,l=null;if(n.id&&n.id.startsWith(Lp)){const[,t,i]=n.id.split(lr);l={attr:t,name:i}}else a=n.id;return{col:a,evalResultKey:l,dir:n.desc?"desc":"asc"}}function Wt(n,a){return`${Lp}${lr}${a}${lr}${n}`.replace(/[^a-zA-Z0-9]/g,"-")}const wt=Nr,B2={minSize:100};function q2(n){return n==="root"||n==="all"}const wp=({table:n,hasNext:a,onLoadNext:l,isLoadingNext:t})=>{const i=Ke(),[r]=dn(),{traceId:s}=an(),d=r.get(Mn);return o("tbody",{children:[n.getRowModel().rows.map(c=>{const m=d===c.original.id||!d&&c.original.trace.traceId===s;return e("tr",{"data-selected":m,onClick:()=>i(`${c.original.trace.traceId}?${Mn}=${c.original.id}`),children:c.getVisibleCells().map(p=>{const g=`--col-${p.column.id}-size`;return e("td",{style:{width:`calc(var(${g}) * 1px)`,maxWidth:`calc(var(${g}) * 1px)`,textWrap:"nowrap",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:Y(p.column.columnDef.cell,p.getContext())},p.id)})},c.id)}),a?e(Cd,{onLoadMore:l,isLoadingNext:t},"load-more"):null]})},U2=ka.memo(wp,(n,a)=>n.table.options.data===a.table.options.data);function H2(n){const{fetchKey:a}=tl(),l=y.useRef(null),t=y.useRef(!0),[i,r]=y.useState({}),[s,d]=y.useState([]),[c,m]=y.useState(""),[p,g]=y.useState(!0),u=xn(w=>w.columnVisibility),{data:f,loadNext:h,hasNext:k,isLoadingNext:S,refetch:v}=P.usePaginationFragment(dp,n.project),K=Xr(),I=K==null?void 0:K.setTraceSequence;y.useEffect(()=>{if(I)return I(f.spans.edges.map(({span:w})=>({traceId:w.trace.traceId,spanId:w.id}))),()=>{I([])}},[f.spans.edges,I]);const L=xn(w=>w.annotationColumnVisibility),z=y.useMemo(()=>Object.keys(L).filter(w=>L[w]),[L]),_=y.useMemo(()=>f.spans.edges.map(({span:j})=>j),[f]),V=z.map(w=>({header:w,columns:[{header:"labels",accessorKey:Wt(w,"label"),cell:({row:j})=>{const U=j.original.spanAnnotationSummaries.find(se=>se.name===w);return U?e(km,{name:w,labelFractions:U.labelFractions}):null}},{header:"mean score",accessorKey:Wt(w,"score"),cell:({row:j})=>{const U=j.original.spanAnnotationSummaries.find(se=>se.name===w);return U?e(ci,{value:U.meanScore,fallback:null}):null}}]})),x=[{header:()=>o(b,{direction:"row",gap:"size-50",children:[e("span",{children:"annotations"}),o(pt,{children:[e(re,{level:3,weight:"heavy",children:"Annotations"}),e(yl,{children:"Evaluations and human annotations logged via the API or set via the UI."})]})]}),id:"annotations",accessorKey:"spanAnnotations",enableSorting:!1,cell:({row:w})=>o(b,{direction:"row",gap:"size-50",wrap:"wrap",children:[e(mi,{span:w.original,showFilterActions:!0}),w.original.documentRetrievalMetrics.map(j=>o(ae,{children:[e(Bn,{name:j.evaluationName,metric:"ndcg",score:j.ndcg},"ndcg"),e(Bn,{name:j.evaluationName,metric:"precision",score:j.precision},"precision"),e(Bn,{name:j.evaluationName,metric:"hit",score:j.hit},"hit")]}))]})},...V],E=[{id:"select",maxSize:10,header:({table:w})=>e(Sa,{checked:w.getIsAllRowsSelected(),indeterminate:w.getIsSomeRowsSelected(),onChange:w.getToggleAllRowsSelectedHandler()}),cell:({row:w})=>e(Sa,{checked:w.getIsSelected(),disabled:!w.getCanSelect(),indeterminate:w.getIsSomeSelected(),onChange:w.getToggleSelectedHandler()})},{header:"status",accessorKey:"statusCode",maxSize:30,enableSorting:!1,cell:({getValue:w})=>{const j=w();return e(b,{direction:"row",gap:"size-50",alignItems:"center",children:e(oi,{statusCode:j})})}},{header:"kind",accessorKey:"spanKind",maxSize:100,enableSorting:!1,cell:({getValue:w})=>e(Sr,{spanKind:w()})},{header:"name",accessorKey:"name",enableSorting:!1,cell:({getValue:w,row:j})=>{const U=j.original,{traceId:se}=U.trace;return e(sn,{to:`${se}?${Mn}=${U.id}`,children:w()})}},{header:"input",accessorKey:"input.value",cell:un,enableSorting:!1},{header:"output",accessorKey:"output.value",cell:un,enableSorting:!1},{header:"metadata",accessorKey:"metadata",cell:({row:w})=>e(up,{metadata:w.original.metadata}),enableSorting:!1},...x,{header:"start time",accessorKey:"startTime",cell:$e},{header:"latency",accessorKey:"latencyMs",cell:({getValue:w})=>{const j=w();return j===null||typeof j!="number"?null:e(mn,{latencyMs:j})}},{header:p?"cumulative tokens":"total tokens",accessorKey:p?"cumulativeTokenCountTotal":"tokenCountTotal",cell:({row:w,getValue:j})=>{if(j()===null)return"--";const se=w.original,Va=p?se.cumulativeTokenCountTotal:se.tokenCountTotal;return p?e(od,{tokenCountTotal:Va||0,nodeId:se.id}):e(si,{tokenCountTotal:Va||0,nodeId:se.id})}},{header:p?"cumulative cost":"total cost",accessorKey:p?"trace.costSummary.total.cost":"costSummary.total.cost",id:p?"cumulativeTokenCostTotal":"tokenCostTotal",cell:({row:w,getValue:j})=>{const U=j();if(U===null||typeof U!="number")return"--";const se=w.original;return p?e(Kr,{totalCost:U,nodeId:se.trace.id,size:"S"}):e(di,{totalCost:U,spanNodeId:se.id,size:"S"})}}];y.useEffect(()=>{if(t.current===!0){t.current=!1;return}y.startTransition(()=>{const w=s[0];v({sort:w?_p(w):Dp,after:null,first:wt,filterCondition:c,rootSpansOnly:p},{fetchPolicy:"store-and-network"})})},[s,v,c,a,p]);const R=y.useCallback(w=>{if(w){const{scrollHeight:j,scrollTop:U,clientHeight:se}=w;j-U-se<300&&!S&&k&&h(wt)}},[k,S,h]),M=xn(w=>w.setColumnSizing),$=xn(w=>w.columnSizing),O=Me({columns:E,data:_,state:{sorting:s,columnVisibility:u,rowSelection:i,columnSizing:$},defaultColumn:B2,columnResizeMode:"onChange",manualSorting:!0,enableRowSelection:!0,onRowSelectionChange:r,onSortingChange:d,onColumnSizingChange:M,getCoreRowModel:Ve(),getSortedRowModel:Tn()}),N=O.getRowModel().rows,q=O.getSelectedRowModel().rows,ne=q.map(w=>({id:w.original.id,traceId:w.original.trace.id})),ve=y.useCallback(()=>{r({})},[r]),Q=N.length===0,J=O.getAllColumns().filter(w=>w.columns.length===0),{columnSizingInfo:ie,columnSizing:Pe}=O.getState(),Te=O.getFlatHeaders,Ma=J.length,[ca]=y.useMemo(()=>{const w=Te(),j={};for(let U=0;U<w.length;U++){const se=w[U];j[`--header-${se.id}-size`]=se.getSize(),j[`--col-${se.column.id}-size`]=se.column.getSize()}return[j]},[Te,ie,Pe,Ma]);return o("div",{css:no,children:[e(F,{paddingTop:"size-100",paddingBottom:"size-100",paddingStart:"size-200",paddingEnd:"size-200",borderBottomColor:"grey-300",borderBottomWidth:"thin",flex:"none",children:o(b,{direction:"row",gap:"size-100",width:"100%",alignItems:"center",children:[e(kp,{onValidCondition:m}),o(pi,{"aria-label":"Toggle between root and all spans",selectionMode:"single",selectedKeys:[p?"root":"all"],onSelectionChange:w=>{if(w.size===0)return;const j=w.keys().next().value;if(q2(j))g(j==="root");else throw new Error(`Unknown root span filter selection: ${j}`)},children:[e(na,{"aria-label":"root spans",id:"root",children:"Root Spans"}),e(na,{"aria-label":"all spans",id:"all",children:"All"})]}),e(pp,{columns:J,query:f}),e(D2,{})]})}),e("div",{css:T`
6149
6152
  flex: 1 1 auto;
6150
6153
  overflow: auto;
6151
- `,onScroll:w=>R(w.target),ref:l,children:o("table",{css:Fa,style:{...ca,width:O.getTotalSize(),minWidth:"100%"},children:[e("thead",{children:O.getHeaderGroups().map(w=>e("tr",{children:w.headers.map(j=>e("th",{colSpan:j.colSpan,style:{width:`calc(var(--header-${j.id}-size) * 1px)`},children:j.isPlaceholder?null:o(ae,{children:[o("div",{className:j.column.getCanSort()?"sort":"",onClick:j.column.getToggleSortingHandler(),style:{left:j.getStart(),width:j.getSize()},children:[e(yn,{maxWidth:"100%",children:Y(j.column.columnDef.header,j.getContext())}),j.column.getIsSorted()?e(D,{className:"sort-icon",svg:j.column.getIsSorted()==="asc"?e(kn,{}):e(bn,{})}):null]}),e("div",{onMouseDown:j.getResizeHandler(),onTouchStart:j.getResizeHandler(),className:`resizer ${j.column.getIsResizing()?"isResizing":""}`})]})},j.id))},w.id))}),Q&&!k?e(mp,{projectName:f.name}):ie.isResizingColumn?e(U2,{table:O,hasNext:k,onLoadNext:()=>h(wt),isLoadingNext:S}):e(wp,{table:O,hasNext:k,onLoadNext:()=>h(wt),isLoadingNext:S})]})}),q.length?e(Ip,{selectedSpans:ne,onClearSelection:ve}):null]})}function G2({queryReference:n}){const a=P.usePreloadedQuery(su,n);return e(H2,{project:a.project})}const G3=()=>{const{spansQueryReference:n}=Si();return n?e(ao,{children:o(_m,{children:[e(Jr,{children:e(y.Suspense,{fallback:e(he,{}),children:e(G2,{queryReference:n})})}),e(y.Suspense,{children:e(we,{})})]})}):null},Ep=function(){var n={defaultValue:null,kind:"LocalArgument",name:"after"},a={defaultValue:null,kind:"LocalArgument",name:"filterCondition"},l={defaultValue:30,kind:"LocalArgument",name:"first"},t={defaultValue:null,kind:"LocalArgument",name:"id"},i={defaultValue:{col:"startTime",dir:"desc"},kind:"LocalArgument",name:"sort"},r={defaultValue:null,kind:"LocalArgument",name:"timeRange"},s=[{kind:"Variable",name:"id",variableName:"id"}],d={kind:"Variable",name:"after",variableName:"after"},c={kind:"Variable",name:"filterCondition",variableName:"filterCondition"},m={kind:"Variable",name:"first",variableName:"first"},p={kind:"Variable",name:"sort",variableName:"sort"},g={alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},u={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},f={alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},h=[d,c,m,{kind:"Literal",name:"rootSpansOnly",value:!0},p,{kind:"Variable",name:"timeRange",variableName:"timeRange"}],k={alias:null,args:null,kind:"ScalarField",name:"spanKind",storageKey:null},S={alias:null,args:null,kind:"ScalarField",name:"startTime",storageKey:null},v={alias:null,args:null,kind:"ScalarField",name:"latencyMs",storageKey:null},K={alias:null,args:null,kind:"ScalarField",name:"parentId",storageKey:null},I=[{alias:"value",args:null,kind:"ScalarField",name:"truncatedValue",storageKey:null}],L={alias:null,args:null,concreteType:"SpanIOValue",kind:"LinkedField",name:"input",plural:!1,selections:I,storageKey:null},z={alias:null,args:null,concreteType:"SpanIOValue",kind:"LinkedField",name:"output",plural:!1,selections:I,storageKey:null},_={alias:null,args:null,kind:"ScalarField",name:"spanId",storageKey:null},V={alias:null,args:null,kind:"ScalarField",name:"traceId",storageKey:null},x={alias:null,args:null,kind:"ScalarField",name:"label",storageKey:null},E={alias:null,args:null,kind:"ScalarField",name:"score",storageKey:null},R={alias:null,args:null,concreteType:"SpanAnnotation",kind:"LinkedField",name:"spanAnnotations",plural:!0,selections:[u,f,x,E,{alias:null,args:null,kind:"ScalarField",name:"annotatorKind",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"createdAt",storageKey:null},{alias:null,args:null,concreteType:"User",kind:"LinkedField",name:"user",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"username",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"profilePictureUrl",storageKey:null},u],storageKey:null}],storageKey:null},M={alias:null,args:null,concreteType:"AnnotationSummary",kind:"LinkedField",name:"spanAnnotationSummaries",plural:!0,selections:[{alias:null,args:null,concreteType:"LabelFraction",kind:"LinkedField",name:"labelFractions",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"fraction",storageKey:null},x],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"meanScore",storageKey:null},f],storageKey:null},$={alias:null,args:null,concreteType:"Project",kind:"LinkedField",name:"project",plural:!1,selections:[u,{alias:null,args:null,concreteType:"AnnotationConfigConnection",kind:"LinkedField",name:"annotationConfigs",plural:!1,selections:[{alias:null,args:null,concreteType:"AnnotationConfigEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:null,args:null,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[g,{kind:"InlineFragment",selections:[{alias:null,args:null,kind:"ScalarField",name:"annotationType",storageKey:null}],type:"AnnotationConfigBase",abstractKey:"__isAnnotationConfigBase"},{kind:"InlineFragment",selections:[u,f,{alias:null,args:null,kind:"ScalarField",name:"optimizationDirection",storageKey:null},{alias:null,args:null,concreteType:"CategoricalAnnotationValue",kind:"LinkedField",name:"values",plural:!0,selections:[x,E],storageKey:null}],type:"CategoricalAnnotationConfig",abstractKey:null},{kind:"InlineFragment",selections:[u],type:"Node",abstractKey:"__isNode"}],storageKey:null}],storageKey:null}],storageKey:null}],storageKey:null},O={alias:null,args:null,concreteType:"DocumentRetrievalMetrics",kind:"LinkedField",name:"documentRetrievalMetrics",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"evaluationName",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"ndcg",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"precision",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"hit",storageKey:null}],storageKey:null};return{fragment:{argumentDefinitions:[n,a,l,t,i,r],kind:"Fragment",metadata:null,name:"TracesTableQuery",selections:[{alias:null,args:s,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{args:[d,c,m,p],kind:"FragmentSpread",name:"TracesTable_spans"}],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[n,a,l,i,r,t],kind:"Operation",name:"TracesTableQuery",selections:[{alias:null,args:s,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[g,u,{kind:"InlineFragment",selections:[f,{alias:null,args:null,kind:"ScalarField",name:"spanAnnotationNames",storageKey:null},{alias:"rootSpans",args:h,concreteType:"SpanConnection",kind:"LinkedField",name:"spans",plural:!1,selections:[{alias:null,args:null,concreteType:"SpanEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"rootSpan",args:null,concreteType:"Span",kind:"LinkedField",name:"node",plural:!1,selections:[u,k,f,{alias:null,args:null,kind:"ScalarField",name:"metadata",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"statusCode",storageKey:null},S,v,{alias:null,args:null,kind:"ScalarField",name:"cumulativeTokenCountTotal",storageKey:null},K,L,z,_,{alias:null,args:null,concreteType:"Trace",kind:"LinkedField",name:"trace",plural:!1,selections:[u,V,{alias:null,args:null,kind:"ScalarField",name:"numSpans",storageKey:null},{alias:null,args:null,concreteType:"SpanCostSummary",kind:"LinkedField",name:"costSummary",plural:!1,selections:[{alias:null,args:null,concreteType:"CostBreakdown",kind:"LinkedField",name:"total",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"cost",storageKey:null}],storageKey:null}],storageKey:null}],storageKey:null},R,M,$,O,{alias:null,args:[{kind:"Literal",name:"first",value:50}],concreteType:"SpanConnection",kind:"LinkedField",name:"descendants",plural:!1,selections:[{alias:null,args:null,concreteType:"SpanEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:null,args:null,concreteType:"Span",kind:"LinkedField",name:"node",plural:!1,selections:[u,k,f,{alias:"statusCode",args:null,kind:"ScalarField",name:"propagatedStatusCode",storageKey:null},S,v,K,{alias:"cumulativeTokenCountTotal",args:null,kind:"ScalarField",name:"tokenCountTotal",storageKey:null},L,z,_,{alias:null,args:null,concreteType:"Trace",kind:"LinkedField",name:"trace",plural:!1,selections:[u,V],storageKey:null},R,$,M,O],storageKey:null}],storageKey:null}],storageKey:"descendants(first:50)"}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"cursor",storageKey:null},{alias:null,args:null,concreteType:"Span",kind:"LinkedField",name:"node",plural:!1,selections:[g,u],storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"PageInfo",kind:"LinkedField",name:"pageInfo",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"endCursor",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"hasNextPage",storageKey:null}],storageKey:null}],storageKey:null},{alias:"rootSpans",args:h,filters:["sort","rootSpansOnly","filterCondition","timeRange"],handle:"connection",key:"TracesTable_rootSpans",kind:"LinkedHandle",name:"spans"}],type:"Project",abstractKey:null}],storageKey:null}]},params:{cacheID:"422bbc4ee6cd6a8c1b859da55e370cb0",id:null,metadata:{},name:"TracesTableQuery",operationKind:"query",text:`query TracesTableQuery(
6154
+ `,onScroll:w=>R(w.target),ref:l,children:o("table",{css:Fa,style:{...ca,width:O.getTotalSize(),minWidth:"100%"},children:[e("thead",{children:O.getHeaderGroups().map(w=>e("tr",{children:w.headers.map(j=>e("th",{colSpan:j.colSpan,style:{width:`calc(var(--header-${j.id}-size) * 1px)`},children:j.isPlaceholder?null:o(ae,{children:[o("div",{className:j.column.getCanSort()?"sort":"",onClick:j.column.getToggleSortingHandler(),style:{left:j.getStart(),width:j.getSize()},children:[e(yn,{maxWidth:"100%",children:Y(j.column.columnDef.header,j.getContext())}),j.column.getIsSorted()?e(D,{className:"sort-icon",svg:j.column.getIsSorted()==="asc"?e(kn,{}):e(bn,{})}):null]}),e("div",{onMouseDown:j.getResizeHandler(),onTouchStart:j.getResizeHandler(),className:`resizer ${j.column.getIsResizing()?"isResizing":""}`})]})},j.id))},w.id))}),Q&&!k?e(mp,{projectName:f.name}):ie.isResizingColumn?e(U2,{table:O,hasNext:k,onLoadNext:()=>h(wt),isLoadingNext:S}):e(wp,{table:O,hasNext:k,onLoadNext:()=>h(wt),isLoadingNext:S})]})}),q.length?e(Ip,{selectedSpans:ne,onClearSelection:ve}):null]})}function G2({queryReference:n}){const a=P.usePreloadedQuery(su,n);return e(H2,{project:a.project})}const G3=()=>{const{spansQueryReference:n}=Si();return n?e(ao,{children:o(_m,{children:[e(Jr,{children:e(y.Suspense,{fallback:e(he,{}),children:e(G2,{queryReference:n})})}),e(y.Suspense,{children:e(we,{})})]})}):null},Ep=function(){var n={defaultValue:null,kind:"LocalArgument",name:"after"},a={defaultValue:null,kind:"LocalArgument",name:"filterCondition"},l={defaultValue:30,kind:"LocalArgument",name:"first"},t={defaultValue:null,kind:"LocalArgument",name:"id"},i={defaultValue:{col:"startTime",dir:"desc"},kind:"LocalArgument",name:"sort"},r={defaultValue:null,kind:"LocalArgument",name:"timeRange"},s=[{kind:"Variable",name:"id",variableName:"id"}],d={kind:"Variable",name:"after",variableName:"after"},c={kind:"Variable",name:"filterCondition",variableName:"filterCondition"},m={kind:"Variable",name:"first",variableName:"first"},p={kind:"Variable",name:"sort",variableName:"sort"},g={alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},u={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},f={alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},h=[d,c,m,{kind:"Literal",name:"rootSpansOnly",value:!0},p,{kind:"Variable",name:"timeRange",variableName:"timeRange"}],k={alias:null,args:null,kind:"ScalarField",name:"spanKind",storageKey:null},S={alias:null,args:null,kind:"ScalarField",name:"startTime",storageKey:null},v={alias:null,args:null,kind:"ScalarField",name:"endTime",storageKey:null},K={alias:null,args:null,kind:"ScalarField",name:"latencyMs",storageKey:null},I={alias:null,args:null,kind:"ScalarField",name:"parentId",storageKey:null},L=[{alias:"value",args:null,kind:"ScalarField",name:"truncatedValue",storageKey:null}],z={alias:null,args:null,concreteType:"SpanIOValue",kind:"LinkedField",name:"input",plural:!1,selections:L,storageKey:null},_={alias:null,args:null,concreteType:"SpanIOValue",kind:"LinkedField",name:"output",plural:!1,selections:L,storageKey:null},V={alias:null,args:null,kind:"ScalarField",name:"spanId",storageKey:null},x={alias:null,args:null,kind:"ScalarField",name:"traceId",storageKey:null},E={alias:null,args:null,kind:"ScalarField",name:"label",storageKey:null},R={alias:null,args:null,kind:"ScalarField",name:"score",storageKey:null},M={alias:null,args:null,concreteType:"SpanAnnotation",kind:"LinkedField",name:"spanAnnotations",plural:!0,selections:[u,f,E,R,{alias:null,args:null,kind:"ScalarField",name:"annotatorKind",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"createdAt",storageKey:null},{alias:null,args:null,concreteType:"User",kind:"LinkedField",name:"user",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"username",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"profilePictureUrl",storageKey:null},u],storageKey:null}],storageKey:null},$={alias:null,args:null,concreteType:"AnnotationSummary",kind:"LinkedField",name:"spanAnnotationSummaries",plural:!0,selections:[{alias:null,args:null,concreteType:"LabelFraction",kind:"LinkedField",name:"labelFractions",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"fraction",storageKey:null},E],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"meanScore",storageKey:null},f],storageKey:null},O={alias:null,args:null,concreteType:"Project",kind:"LinkedField",name:"project",plural:!1,selections:[u,{alias:null,args:null,concreteType:"AnnotationConfigConnection",kind:"LinkedField",name:"annotationConfigs",plural:!1,selections:[{alias:null,args:null,concreteType:"AnnotationConfigEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:null,args:null,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[g,{kind:"InlineFragment",selections:[{alias:null,args:null,kind:"ScalarField",name:"annotationType",storageKey:null}],type:"AnnotationConfigBase",abstractKey:"__isAnnotationConfigBase"},{kind:"InlineFragment",selections:[u,f,{alias:null,args:null,kind:"ScalarField",name:"optimizationDirection",storageKey:null},{alias:null,args:null,concreteType:"CategoricalAnnotationValue",kind:"LinkedField",name:"values",plural:!0,selections:[E,R],storageKey:null}],type:"CategoricalAnnotationConfig",abstractKey:null},{kind:"InlineFragment",selections:[u],type:"Node",abstractKey:"__isNode"}],storageKey:null}],storageKey:null}],storageKey:null}],storageKey:null},N={alias:null,args:null,concreteType:"DocumentRetrievalMetrics",kind:"LinkedField",name:"documentRetrievalMetrics",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"evaluationName",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"ndcg",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"precision",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"hit",storageKey:null}],storageKey:null};return{fragment:{argumentDefinitions:[n,a,l,t,i,r],kind:"Fragment",metadata:null,name:"TracesTableQuery",selections:[{alias:null,args:s,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{args:[d,c,m,p],kind:"FragmentSpread",name:"TracesTable_spans"}],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[n,a,l,i,r,t],kind:"Operation",name:"TracesTableQuery",selections:[{alias:null,args:s,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[g,u,{kind:"InlineFragment",selections:[f,{alias:null,args:null,kind:"ScalarField",name:"spanAnnotationNames",storageKey:null},{alias:"rootSpans",args:h,concreteType:"SpanConnection",kind:"LinkedField",name:"spans",plural:!1,selections:[{alias:null,args:null,concreteType:"SpanEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"rootSpan",args:null,concreteType:"Span",kind:"LinkedField",name:"node",plural:!1,selections:[u,k,f,{alias:null,args:null,kind:"ScalarField",name:"metadata",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"statusCode",storageKey:null},S,v,K,{alias:null,args:null,kind:"ScalarField",name:"cumulativeTokenCountTotal",storageKey:null},I,z,_,V,{alias:null,args:null,concreteType:"Trace",kind:"LinkedField",name:"trace",plural:!1,selections:[u,x,{alias:null,args:null,kind:"ScalarField",name:"numSpans",storageKey:null},{alias:null,args:null,concreteType:"SpanCostSummary",kind:"LinkedField",name:"costSummary",plural:!1,selections:[{alias:null,args:null,concreteType:"CostBreakdown",kind:"LinkedField",name:"total",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"cost",storageKey:null}],storageKey:null}],storageKey:null}],storageKey:null},M,$,O,N,{alias:null,args:[{kind:"Literal",name:"first",value:50}],concreteType:"SpanConnection",kind:"LinkedField",name:"descendants",plural:!1,selections:[{alias:null,args:null,concreteType:"SpanEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:null,args:null,concreteType:"Span",kind:"LinkedField",name:"node",plural:!1,selections:[u,k,f,{alias:"statusCode",args:null,kind:"ScalarField",name:"propagatedStatusCode",storageKey:null},S,v,K,I,{alias:"cumulativeTokenCountTotal",args:null,kind:"ScalarField",name:"tokenCountTotal",storageKey:null},z,_,V,{alias:null,args:null,concreteType:"Trace",kind:"LinkedField",name:"trace",plural:!1,selections:[u,x],storageKey:null},M,O,$,N],storageKey:null}],storageKey:null}],storageKey:"descendants(first:50)"}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"cursor",storageKey:null},{alias:null,args:null,concreteType:"Span",kind:"LinkedField",name:"node",plural:!1,selections:[g,u],storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"PageInfo",kind:"LinkedField",name:"pageInfo",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"endCursor",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"hasNextPage",storageKey:null}],storageKey:null}],storageKey:null},{alias:"rootSpans",args:h,filters:["sort","rootSpansOnly","filterCondition","timeRange"],handle:"connection",key:"TracesTable_rootSpans",kind:"LinkedHandle",name:"spans"}],type:"Project",abstractKey:null}],storageKey:null}]},params:{cacheID:"d30684c52189e88dab2fb3e08b4e4ada",id:null,metadata:{},name:"TracesTableQuery",operationKind:"query",text:`query TracesTableQuery(
6152
6155
  $after: String = null
6153
6156
  $filterCondition: String = null
6154
6157
  $first: Int = 30
@@ -6234,6 +6237,7 @@ fragment TracesTable_spans_1XEuU on Project {
6234
6237
  metadata
6235
6238
  statusCode
6236
6239
  startTime
6240
+ endTime
6237
6241
  latencyMs
6238
6242
  cumulativeTokenCountTotal
6239
6243
  parentId
@@ -6285,6 +6289,7 @@ fragment TracesTable_spans_1XEuU on Project {
6285
6289
  name
6286
6290
  statusCode: propagatedStatusCode
6287
6291
  startTime
6292
+ endTime
6288
6293
  latencyMs
6289
6294
  parentId
6290
6295
  cumulativeTokenCountTotal: tokenCountTotal
@@ -6332,7 +6337,7 @@ fragment TracesTable_spans_1XEuU on Project {
6332
6337
  }
6333
6338
  id
6334
6339
  }
6335
- `}}}();Ep.hash="7b9464214c3fa9d8f90ea19e580855b6";const Ap=function(){var n=["rootSpans"],a={alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},l={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},t={alias:null,args:null,kind:"ScalarField",name:"spanKind",storageKey:null},i={alias:null,args:null,kind:"ScalarField",name:"startTime",storageKey:null},r={alias:null,args:null,kind:"ScalarField",name:"latencyMs",storageKey:null},s={alias:null,args:null,kind:"ScalarField",name:"parentId",storageKey:null},d=[{alias:"value",args:null,kind:"ScalarField",name:"truncatedValue",storageKey:null}],c={alias:null,args:null,concreteType:"SpanIOValue",kind:"LinkedField",name:"input",plural:!1,selections:d,storageKey:null},m={alias:null,args:null,concreteType:"SpanIOValue",kind:"LinkedField",name:"output",plural:!1,selections:d,storageKey:null},p={alias:null,args:null,kind:"ScalarField",name:"spanId",storageKey:null},g={alias:null,args:null,kind:"ScalarField",name:"traceId",storageKey:null},u={alias:null,args:null,kind:"ScalarField",name:"label",storageKey:null},f={alias:null,args:null,concreteType:"SpanAnnotation",kind:"LinkedField",name:"spanAnnotations",plural:!0,selections:[l,a,u,{alias:null,args:null,kind:"ScalarField",name:"score",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"annotatorKind",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"createdAt",storageKey:null}],storageKey:null},h={args:null,kind:"FragmentSpread",name:"AnnotationSummaryGroup"},k={alias:null,args:null,concreteType:"DocumentRetrievalMetrics",kind:"LinkedField",name:"documentRetrievalMetrics",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"evaluationName",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"ndcg",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"precision",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"hit",storageKey:null}],storageKey:null};return{argumentDefinitions:[{defaultValue:null,kind:"LocalArgument",name:"after"},{defaultValue:null,kind:"LocalArgument",name:"filterCondition"},{defaultValue:30,kind:"LocalArgument",name:"first"},{defaultValue:{col:"startTime",dir:"desc"},kind:"LocalArgument",name:"sort"},{kind:"RootArgument",name:"timeRange"}],kind:"Fragment",metadata:{connection:[{count:"first",cursor:"after",direction:"forward",path:n}],refetch:{connection:{forward:{count:"first",cursor:"after"},backward:null,path:n},fragmentPathInResult:["node"],operation:Ep,identifierInfo:{identifierField:"id",identifierQueryVariableName:"id"}}},name:"TracesTable_spans",selections:[a,{args:null,kind:"FragmentSpread",name:"SpanColumnSelector_annotations"},{alias:"rootSpans",args:[{kind:"Variable",name:"filterCondition",variableName:"filterCondition"},{kind:"Literal",name:"rootSpansOnly",value:!0},{kind:"Variable",name:"sort",variableName:"sort"},{kind:"Variable",name:"timeRange",variableName:"timeRange"}],concreteType:"SpanConnection",kind:"LinkedField",name:"__TracesTable_rootSpans_connection",plural:!1,selections:[{alias:null,args:null,concreteType:"SpanEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"rootSpan",args:null,concreteType:"Span",kind:"LinkedField",name:"node",plural:!1,selections:[l,t,a,{alias:null,args:null,kind:"ScalarField",name:"metadata",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"statusCode",storageKey:null},i,r,{alias:null,args:null,kind:"ScalarField",name:"cumulativeTokenCountTotal",storageKey:null},s,c,m,p,{alias:null,args:null,concreteType:"Trace",kind:"LinkedField",name:"trace",plural:!1,selections:[l,g,{alias:null,args:null,kind:"ScalarField",name:"numSpans",storageKey:null},{alias:null,args:null,concreteType:"SpanCostSummary",kind:"LinkedField",name:"costSummary",plural:!1,selections:[{alias:null,args:null,concreteType:"CostBreakdown",kind:"LinkedField",name:"total",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"cost",storageKey:null}],storageKey:null}],storageKey:null}],storageKey:null},f,{alias:null,args:null,concreteType:"AnnotationSummary",kind:"LinkedField",name:"spanAnnotationSummaries",plural:!0,selections:[{alias:null,args:null,concreteType:"LabelFraction",kind:"LinkedField",name:"labelFractions",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"fraction",storageKey:null},u],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"meanScore",storageKey:null},a],storageKey:null},h,k,{alias:null,args:[{kind:"Literal",name:"first",value:50}],concreteType:"SpanConnection",kind:"LinkedField",name:"descendants",plural:!1,selections:[{alias:null,args:null,concreteType:"SpanEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:null,args:null,concreteType:"Span",kind:"LinkedField",name:"node",plural:!1,selections:[l,t,a,{alias:"statusCode",args:null,kind:"ScalarField",name:"propagatedStatusCode",storageKey:null},i,r,s,{alias:"cumulativeTokenCountTotal",args:null,kind:"ScalarField",name:"tokenCountTotal",storageKey:null},c,m,p,{alias:null,args:null,concreteType:"Trace",kind:"LinkedField",name:"trace",plural:!1,selections:[l,g],storageKey:null},f,h,k,{args:null,kind:"FragmentSpread",name:"TraceHeaderRootSpanAnnotationsFragment"}],storageKey:null}],storageKey:null}],storageKey:"descendants(first:50)"}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"cursor",storageKey:null},{alias:null,args:null,concreteType:"Span",kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null}],storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"PageInfo",kind:"LinkedField",name:"pageInfo",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"endCursor",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"hasNextPage",storageKey:null}],storageKey:null}],storageKey:null},l],type:"Project",abstractKey:null}}();Ap.hash="7b9464214c3fa9d8f90ea19e580855b6";const is=Nr,W2=50,Rp=({table:n})=>{const a=Ke(),{traceId:l}=an();return e("tbody",{children:n.getRowModel().rows.map(t=>{const i=t.original.trace.traceId===l;return e("tr",{onClick:()=>a(`${t.original.trace.traceId}`),"data-is-additional-row":t.original.__additionalRow,"data-selected":i,css:T(X2),children:t.getVisibleCells().map(r=>{const s=`--col-${r.column.id}-size`;return e("td",{style:{width:`calc(var(${s}) * 1px)`,maxWidth:`calc(var(${s}) * 1px)`,textWrap:"nowrap",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:Y(r.column.columnDef.cell,r.getContext())},r.id)})},t.id)})})},J2=ka.memo(Rp,(n,a)=>n.table.options.data===a.table.options.data),Z2=({row:n})=>n.original.__additionalRow?null:e(up,{metadata:n.original.metadata}),X2=T`
6340
+ `}}}();Ep.hash="b2ce5da0dab3a8061fce34751c19df14";const Ap=function(){var n=["rootSpans"],a={alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},l={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},t={alias:null,args:null,kind:"ScalarField",name:"spanKind",storageKey:null},i={alias:null,args:null,kind:"ScalarField",name:"startTime",storageKey:null},r={alias:null,args:null,kind:"ScalarField",name:"endTime",storageKey:null},s={alias:null,args:null,kind:"ScalarField",name:"latencyMs",storageKey:null},d={alias:null,args:null,kind:"ScalarField",name:"parentId",storageKey:null},c=[{alias:"value",args:null,kind:"ScalarField",name:"truncatedValue",storageKey:null}],m={alias:null,args:null,concreteType:"SpanIOValue",kind:"LinkedField",name:"input",plural:!1,selections:c,storageKey:null},p={alias:null,args:null,concreteType:"SpanIOValue",kind:"LinkedField",name:"output",plural:!1,selections:c,storageKey:null},g={alias:null,args:null,kind:"ScalarField",name:"spanId",storageKey:null},u={alias:null,args:null,kind:"ScalarField",name:"traceId",storageKey:null},f={alias:null,args:null,kind:"ScalarField",name:"label",storageKey:null},h={alias:null,args:null,concreteType:"SpanAnnotation",kind:"LinkedField",name:"spanAnnotations",plural:!0,selections:[l,a,f,{alias:null,args:null,kind:"ScalarField",name:"score",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"annotatorKind",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"createdAt",storageKey:null}],storageKey:null},k={args:null,kind:"FragmentSpread",name:"AnnotationSummaryGroup"},S={alias:null,args:null,concreteType:"DocumentRetrievalMetrics",kind:"LinkedField",name:"documentRetrievalMetrics",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"evaluationName",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"ndcg",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"precision",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"hit",storageKey:null}],storageKey:null};return{argumentDefinitions:[{defaultValue:null,kind:"LocalArgument",name:"after"},{defaultValue:null,kind:"LocalArgument",name:"filterCondition"},{defaultValue:30,kind:"LocalArgument",name:"first"},{defaultValue:{col:"startTime",dir:"desc"},kind:"LocalArgument",name:"sort"},{kind:"RootArgument",name:"timeRange"}],kind:"Fragment",metadata:{connection:[{count:"first",cursor:"after",direction:"forward",path:n}],refetch:{connection:{forward:{count:"first",cursor:"after"},backward:null,path:n},fragmentPathInResult:["node"],operation:Ep,identifierInfo:{identifierField:"id",identifierQueryVariableName:"id"}}},name:"TracesTable_spans",selections:[a,{args:null,kind:"FragmentSpread",name:"SpanColumnSelector_annotations"},{alias:"rootSpans",args:[{kind:"Variable",name:"filterCondition",variableName:"filterCondition"},{kind:"Literal",name:"rootSpansOnly",value:!0},{kind:"Variable",name:"sort",variableName:"sort"},{kind:"Variable",name:"timeRange",variableName:"timeRange"}],concreteType:"SpanConnection",kind:"LinkedField",name:"__TracesTable_rootSpans_connection",plural:!1,selections:[{alias:null,args:null,concreteType:"SpanEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"rootSpan",args:null,concreteType:"Span",kind:"LinkedField",name:"node",plural:!1,selections:[l,t,a,{alias:null,args:null,kind:"ScalarField",name:"metadata",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"statusCode",storageKey:null},i,r,s,{alias:null,args:null,kind:"ScalarField",name:"cumulativeTokenCountTotal",storageKey:null},d,m,p,g,{alias:null,args:null,concreteType:"Trace",kind:"LinkedField",name:"trace",plural:!1,selections:[l,u,{alias:null,args:null,kind:"ScalarField",name:"numSpans",storageKey:null},{alias:null,args:null,concreteType:"SpanCostSummary",kind:"LinkedField",name:"costSummary",plural:!1,selections:[{alias:null,args:null,concreteType:"CostBreakdown",kind:"LinkedField",name:"total",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"cost",storageKey:null}],storageKey:null}],storageKey:null}],storageKey:null},h,{alias:null,args:null,concreteType:"AnnotationSummary",kind:"LinkedField",name:"spanAnnotationSummaries",plural:!0,selections:[{alias:null,args:null,concreteType:"LabelFraction",kind:"LinkedField",name:"labelFractions",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"fraction",storageKey:null},f],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"meanScore",storageKey:null},a],storageKey:null},k,S,{alias:null,args:[{kind:"Literal",name:"first",value:50}],concreteType:"SpanConnection",kind:"LinkedField",name:"descendants",plural:!1,selections:[{alias:null,args:null,concreteType:"SpanEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:null,args:null,concreteType:"Span",kind:"LinkedField",name:"node",plural:!1,selections:[l,t,a,{alias:"statusCode",args:null,kind:"ScalarField",name:"propagatedStatusCode",storageKey:null},i,r,s,d,{alias:"cumulativeTokenCountTotal",args:null,kind:"ScalarField",name:"tokenCountTotal",storageKey:null},m,p,g,{alias:null,args:null,concreteType:"Trace",kind:"LinkedField",name:"trace",plural:!1,selections:[l,u],storageKey:null},h,k,S,{args:null,kind:"FragmentSpread",name:"TraceHeaderRootSpanAnnotationsFragment"}],storageKey:null}],storageKey:null}],storageKey:"descendants(first:50)"}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"cursor",storageKey:null},{alias:null,args:null,concreteType:"Span",kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null}],storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"PageInfo",kind:"LinkedField",name:"pageInfo",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"endCursor",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"hasNextPage",storageKey:null}],storageKey:null}],storageKey:null},l],type:"Project",abstractKey:null}}();Ap.hash="b2ce5da0dab3a8061fce34751c19df14";const is=Nr,W2=50,Rp=({table:n})=>{const a=Ke(),{traceId:l}=an();return e("tbody",{children:n.getRowModel().rows.map(t=>{const i=t.original.trace.traceId===l;return e("tr",{onClick:()=>a(`${t.original.trace.traceId}`),"data-is-additional-row":t.original.__additionalRow,"data-selected":i,css:T(X2),children:t.getVisibleCells().map(r=>{const s=`--col-${r.column.id}-size`;return e("td",{style:{width:`calc(var(${s}) * 1px)`,maxWidth:`calc(var(${s}) * 1px)`,textWrap:"nowrap",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:Y(r.column.columnDef.cell,r.getContext())},r.id)})},t.id)})})},J2=ka.memo(Rp,(n,a)=>n.table.options.data===a.table.options.data),Z2=({row:n})=>n.original.__additionalRow?null:e(up,{metadata:n.original.metadata}),X2=T`
6336
6341
  &[data-is-additional-row="true"] {
6337
6342
  box-shadow: inset 0 -10px 20px var(--ac-global-color-grey-100);
6338
6343
  }
phoenix/version.py CHANGED
@@ -1 +1 @@
1
- __version__ = "11.25.0"
1
+ __version__ = "11.26.0"