arize-phoenix 5.4.0__py3-none-any.whl → 5.5.1__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.
- arize_phoenix-5.5.1.dist-info/METADATA +262 -0
- {arize_phoenix-5.4.0.dist-info → arize_phoenix-5.5.1.dist-info}/RECORD +13 -13
- phoenix/server/api/subscriptions.py +227 -94
- phoenix/server/static/.vite/manifest.json +14 -14
- phoenix/server/static/assets/{components-8zh9kCOG.js → components-mVBxvljU.js} +2 -2
- phoenix/server/static/assets/{index-Ci93KI-L.js → index-BHfTZ6x_.js} +1 -1
- phoenix/server/static/assets/{pages-CFNU-U_5.js → pages-aAez_Ntk.js} +173 -173
- phoenix/server/static/assets/{vendor-arizeai-uC2sozJ6.js → vendor-arizeai-DRZuoyuF.js} +26 -26
- phoenix/version.py +1 -1
- arize_phoenix-5.4.0.dist-info/METADATA +0 -202
- {arize_phoenix-5.4.0.dist-info → arize_phoenix-5.5.1.dist-info}/WHEEL +0 -0
- {arize_phoenix-5.4.0.dist-info → arize_phoenix-5.5.1.dist-info}/entry_points.txt +0 -0
- {arize_phoenix-5.4.0.dist-info → arize_phoenix-5.5.1.dist-info}/licenses/IP_NOTICE +0 -0
- {arize_phoenix-5.4.0.dist-info → arize_phoenix-5.5.1.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as u,j as e,R as Ke,n as ya,ak as Ms,l as s,I as
|
|
1
|
+
import{r as u,j as e,R as Ke,n as ya,ak as Ms,l as s,I as U,x as C,al as Pe,z as Y,t as D,am as Pn,an as ln,$ as B,ao as ca,D as he,E as ke,H as Z,G as Rn,g as Ml,ap as Xe,aq as ue,ar as Ye,as as Ns,J as Ga,at as Cn,au as se,av as ve,a5 as Ie,a6 as G,a7 as Vs,aw as _e,ax as zs,ay as La,az as Pa,aA as wa,aB as Un,aC as fa,o as $s,aD as Os,aE as Qs,ab as js,ac as qs,aF as Us,p as Bs,q as Hs,aG as Gs,y as Ws,aH as O,aI as Js,aJ as Zs,aK as ml,aL as Xs,aM as Ys,aN as eo,aO as no,aP as ao,aQ as lo,aR as to,aS as io}from"./vendor-6IcPAw_j.js";import{C as H,d as F,K as Mn,D as W,c as h,I as P,a as I,J as Wa,G as Te,H as J,M as Ee,N as de,O as ro,m as ha,Q as na,P as tn,S as Be,i as Nn,j as re,q as Fn,r as Vn,v as ge,b as K,o as Nl,U as Me,L as Xn,V as Vl,e as M,t as ne,W as zl,X as $l,Y as so,Z as oo,h as kn,w as aa,T as Le,k as X,B as ka,s as ye,$ as V,a0 as Ja,E as ba,f as An,a1 as Za,a2 as co,z as la,u as uo,a3 as mo,R as ga,n as Ol}from"./vendor-arizeai-DRZuoyuF.js";import{c as go,N as po,T as yo,L as fe,u as ce,B as fo,a as mn,D as ho,G as ko,b as bo,d as So,S as vo,R as xe,e as Ve,f as He,g as Xa,P as Ql,h as jl,M as gl,i as pl,j as zn,k as Co,l as Fo,m as Q,n as ql,o as Ce,p as Sa,q as $n,r as Ul,s as On,t as Qn,v as Bl,w as Ge,x as Qe,C as pe,y as va,z as rn,A as Ya,E as We,F as Hl,H as Ko,I as xo,J as Do,K as To,O as Io,Q as Lo,U as je,V as me,W as Po,X as wo,Y as Gl,Z as Ao,_ as _o,$ as yl,a0 as Eo,a1 as Ro,a2 as Mo,a3 as No,a4 as Vo,a5 as zo,a6 as Wl,a7 as Kn,a8 as $o,a9 as Oo,aa as Qo,ab as jo,ac as qo,ad as bn,ae as el,af as Jl,ag as wn,ah as Qa,ai as In,aj as ze,ak as Uo,al as Bo,am as oe,an as Zl,ao as Ca,ap as we,aq as Fa,ar as xn,as as le,at as Je,au as Ho,av as nl,aw as Oe,ax as Re,ay as Sn,az as al,aA as Xl,aB as ll,aC as Go,aD as Yl,aE as Ae,aF as qe,aG as ta,aH as Wo,aI as ia,aJ as Ka,aK as et,aL as nt,aM as Jo,aN as at,aO as lt,aP as tt,aQ as jn,aR as en,aS as Ze,aT as Fe,aU as Zo,aV as fl,aW as it,aX as Xo,aY as Yo,aZ as ed,a_ as nd,a$ as ad,b0 as _n,b1 as pn,b2 as ja,b3 as yn,b4 as rt,b5 as ld,b6 as fn,b7 as td,b8 as xa,b9 as id,ba as tl,bb as rd,bc as il,bd as st,be as ot,bf as sd,bg as qa,bh as dt,bi as od,bj as dd,bk as ua,bl as cd,bm as ct,bn as ut,bo as ud,bp as mt,bq as md,br as Da,bs as gd,bt as pd,bu as yd,bv as fd,bw as gt,bx as hd,by as kd,bz as bd,bA as Sd,bB as vd,bC as Cd,bD as Fd,bE as hl,bF as Kd}from"./components-mVBxvljU.js";import{R as sn,C as ra,X as on,Y as Ne,a as dn,T as cn,B as En,A as Yn,b as pt,c as rl,L as yt,d as xd,P as Dd,e as Td,f as Id}from"./vendor-recharts-DwrexFA4.js";import{p as sl,R as sa,n as oa,j as Ld,E as ft,m as Pd,o as wd,g as Ad}from"./vendor-codemirror-DVE2_WBr.js";const ht=u.createContext(null);function Ey({children:n,...a}){const[l]=u.useState(()=>go(a));return e(ht.Provider,{value:l,children:n})}function Ua(n,a){const l=Ke.useContext(ht);if(!l)throw new Error("Missing CredentialsContext.Provider in the tree");return ya(l,n,a)}const kt="arize-phoenix-feature-flags",Aa={playground:!1,playgroundNonStreaming:!1,playgroundWithDatasets:!1};function _d(){const n=localStorage.getItem(kt);if(!n)return Aa;try{const a=JSON.parse(n);return Object.assign({},Aa,a)}catch{return Aa}}const bt=u.createContext(null);function St(){const n=Ke.useContext(bt);if(n===null)throw new Error("useFeatureFlags must be used within a FeatureFlagsProvider");return n}function Ta(n){const{featureFlags:a}=St();return a[n]}function Ry(n){const[a,l]=u.useState(_d()),t=i=>{localStorage.setItem(kt,JSON.stringify(i)),l(i)};return e(bt.Provider,{value:{featureFlags:a,setFeatureFlags:t},children:e(Ed,{children:n.children})})}function Ed(n){const{children:a}=n,{featureFlags:l,setFeatureFlags:t}=St(),[i,r]=u.useState(!1);return Ms("ctrl+shift+f",()=>r(!0)),s(U,{children:[a,e(W,{type:"modal",isDismissable:!0,onDismiss:()=>r(!1),children:i&&e(H,{title:"Feature Flags",children:e(F,{height:"size-1000",padding:"size-100",children:Object.keys(l).map(o=>e(Mn,{isSelected:l[o],onChange:c=>t({...l,[o]:c}),children:o},o))})})})]})}const vt=u.createContext(null);function Rd(){const n=u.useContext(vt);if(n===null)throw new Error("useFunctionality must be used within a FunctionalityProvider");return n}function My(n){return e(vt.Provider,{value:{authenticationEnabled:window.Config.authenticationEnabled},children:n.children})}const Md=C`
|
|
2
2
|
display: flex;
|
|
3
3
|
direction: row;
|
|
4
4
|
height: 100vh;
|
|
@@ -27,7 +27,7 @@ import{r as u,j as e,R as Ke,n as ya,ak as Ms,l as s,I as q,x as C,al as Pe,z as
|
|
|
27
27
|
display: flex;
|
|
28
28
|
flex-direction: column;
|
|
29
29
|
gap: var(--ac-global-dimension-size-50);
|
|
30
|
-
`;function
|
|
30
|
+
`;function Ny(){return s("div",{css:Md,"data-testid":"layout",children:[e(Od,{}),s("div",{css:Nd,children:[e(yo,{children:e(po,{})}),e("div",{"data-testid":"content",css:Vd,children:e(u.Suspense,{fallback:e(fe,{}),children:e(Pe,{})})})]})]})}function Od(){const n=u.useMemo(()=>window.Config.hasInferences,[]),a=ce(),{authenticationEnabled:l}=Rd(),t=Y(),i=u.useCallback(async()=>{const o=await fetch("/auth/logout",{method:"POST"});if(o.ok){t("/login");return}a({title:"Logout Failed",message:"Failed to log out: "+o.statusText})},[t,a]),r=Ta("playground");return s(vo,{children:[e(fo,{}),s(h,{direction:"column",justifyContent:"space-between",flex:"1 1 auto",children:[s("ul",{css:$d,children:[n&&e("li",{children:e(mn,{to:"/model",text:"Model",icon:e(P,{svg:e(I.CubeOutline,{})})})}),e("li",{children:e(mn,{to:"/projects",text:"Projects",icon:e(P,{svg:e(I.GridOutline,{})})})}),e("li",{children:e(mn,{to:"/datasets",text:"Datasets",icon:e(P,{svg:e(I.DatabaseOutline,{})})})}),r&&e("li",{children:e(mn,{to:"/playground",text:"Playground",icon:e(P,{svg:e(I.PlayCircleOutline,{})})})}),e("li",{children:e(mn,{to:"/apis",text:"APIs",icon:e(P,{svg:e(I.Code,{})})})})]}),s("ul",{css:zd,children:[e("li",{children:e(mn,{to:"/settings",text:"Settings",icon:e(P,{svg:e(I.SettingsOutline,{})})})}),e("li",{children:e(ho,{})}),e("li",{children:e(ko,{})}),e("li",{children:e(bo,{})}),l&&s(U,{children:[e("li",{children:e(mn,{to:"/profile",text:"Profile",icon:e(P,{svg:e(I.PersonOutline,{})})})}),e("li",{children:e(So,{text:"Log Out",icon:e(P,{svg:e(I.LogOut,{})}),onClick:i})})]})]})]})]})}const Ct=function(){var n=[{alias:null,args:null,concreteType:"Functionality",kind:"LinkedField",name:"functionality",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"modelInferences",storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"ProjectConnection",kind:"LinkedField",name:"projects",plural:!1,selections:[{alias:null,args:null,concreteType:"ProjectEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"project",args:null,concreteType:"Project",kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"endTime",storageKey:null}],storageKey:null}],storageKey:null}],storageKey:null}];return{fragment:{argumentDefinitions:[],kind:"Fragment",metadata:null,name:"homeLoaderQuery",selections:n,type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[],kind:"Operation",name:"homeLoaderQuery",selections:n},params:{cacheID:"6926e4e720b443f7b7252b60271944e6",id:null,metadata:{},name:"homeLoaderQuery",operationKind:"query",text:`query homeLoaderQuery {
|
|
31
31
|
functionality {
|
|
32
32
|
modelInferences
|
|
33
33
|
}
|
|
@@ -40,7 +40,7 @@ import{r as u,j as e,R as Ke,n as ya,ak as Ms,l as s,I as q,x as C,al as Pe,z as
|
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
|
-
`}}}();
|
|
43
|
+
`}}}();Ct.hash="a4bbc4917b3217b8254d68ec7c76dbdd";async function Vy(n){var l;const a=await D.fetchQuery(xe,Ct,{}).toPromise();if(a!=null&&a.functionality.modelInferences)return Pn("/model");if((l=a==null?void 0:a.projects.edges)!=null&&l.length){let t=0,i=null;for(const{project:o}of a.projects.edges)o.endTime!=null&&(t++,i=o.id);if(t>1)return Pn("/projects");if(t===1&&i!=null)return Pn(`/projects/${i}`);const r=a==null?void 0:a.projects.edges[0].project.id;return Pn(`/projects/${r}`)}else throw new Error("No functionality available")}const Ft=function(){var n={defaultValue:null,kind:"LocalArgument",name:"endTime"},a={defaultValue:null,kind:"LocalArgument",name:"startTime"},l=[{kind:"Variable",name:"endTime",variableName:"endTime"},{kind:"Variable",name:"startTime",variableName:"startTime"}],t=[{kind:"Literal",name:"first",value:50}],i={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},r={alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},o={fields:[{kind:"Variable",name:"end",variableName:"endTime"},{kind:"Variable",name:"start",variableName:"startTime"}],kind:"ObjectValue",name:"timeRange"},c={alias:null,args:null,kind:"ScalarField",name:"cursor",storageKey:null},d=[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null}],g={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};return{fragment:{argumentDefinitions:[n,a],kind:"Fragment",metadata:null,name:"ModelPageQuery",selections:[{args:l,kind:"FragmentSpread",name:"ModelSchemaTable_dimensions"},{args:l,kind:"FragmentSpread",name:"ModelEmbeddingsTable_embeddingDimensions"}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[a,n],kind:"Operation",name:"ModelPageQuery",selections:[{alias:null,args:null,concreteType:"Model",kind:"LinkedField",name:"model",plural:!1,selections:[{alias:null,args:t,concreteType:"DimensionConnection",kind:"LinkedField",name:"dimensions",plural:!1,selections:[{alias:null,args:null,concreteType:"DimensionEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"dimension",args:null,concreteType:"Dimension",kind:"LinkedField",name:"node",plural:!1,selections:[i,r,{alias:null,args:null,kind:"ScalarField",name:"type",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"dataType",storageKey:null},{alias:"cardinality",args:[{kind:"Literal",name:"metric",value:"cardinality"},o],kind:"ScalarField",name:"dataQualityMetric",storageKey:null},{alias:"percentEmpty",args:[{kind:"Literal",name:"metric",value:"percentEmpty"},o],kind:"ScalarField",name:"dataQualityMetric",storageKey:null},{alias:"min",args:[{kind:"Literal",name:"metric",value:"min"},o],kind:"ScalarField",name:"dataQualityMetric",storageKey:null},{alias:"mean",args:[{kind:"Literal",name:"metric",value:"mean"},o],kind:"ScalarField",name:"dataQualityMetric",storageKey:null},{alias:"max",args:[{kind:"Literal",name:"metric",value:"max"},o],kind:"ScalarField",name:"dataQualityMetric",storageKey:null},{alias:"psi",args:[{kind:"Literal",name:"metric",value:"psi"},o],kind:"ScalarField",name:"driftMetric",storageKey:null}],storageKey:null},c,{alias:null,args:null,concreteType:"Dimension",kind:"LinkedField",name:"node",plural:!1,selections:d,storageKey:null}],storageKey:null},g],storageKey:"dimensions(first:50)"},{alias:null,args:t,filters:null,handle:"connection",key:"ModelSchemaTable_dimensions",kind:"LinkedHandle",name:"dimensions"},{alias:null,args:t,concreteType:"EmbeddingDimensionConnection",kind:"LinkedField",name:"embeddingDimensions",plural:!1,selections:[{alias:null,args:null,concreteType:"EmbeddingDimensionEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"embedding",args:null,concreteType:"EmbeddingDimension",kind:"LinkedField",name:"node",plural:!1,selections:[i,r,{alias:"euclideanDistance",args:[{kind:"Literal",name:"metric",value:"euclideanDistance"},o],kind:"ScalarField",name:"driftMetric",storageKey:null}],storageKey:null},c,{alias:null,args:null,concreteType:"EmbeddingDimension",kind:"LinkedField",name:"node",plural:!1,selections:d,storageKey:null}],storageKey:null},g],storageKey:"embeddingDimensions(first:50)"},{alias:null,args:t,filters:null,handle:"connection",key:"ModelEmbeddingsTable_embeddingDimensions",kind:"LinkedHandle",name:"embeddingDimensions"}],storageKey:null}]},params:{cacheID:"18059ac8df6b3c15d5e4bc04ca2c9877",id:null,metadata:{},name:"ModelPageQuery",operationKind:"query",text:`query ModelPageQuery(
|
|
44
44
|
$startTime: DateTime!
|
|
45
45
|
$endTime: DateTime!
|
|
46
46
|
) {
|
|
@@ -98,9 +98,9 @@ fragment ModelSchemaTable_dimensions_3uKjWt on Query {
|
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
100
|
}
|
|
101
|
-
`}}}();
|
|
101
|
+
`}}}();Ft.hash="b612239336c7638df42037315b00f635";function zy(n){const{referenceInferences:a}=Ve(),{timeRange:l}=He(),t=D.useLazyLoadQuery(Ft,{startTime:l.start.toISOString(),endTime:l.end.toISOString()});return s("main",{children:[s(Xa,{children:[e(Ql,{}),a?e(jl,{inferencesRole:"reference",timeRange:{start:new Date(a.startTime),end:new Date(a.endTime)}}):null]}),e("section",{css:C`
|
|
102
102
|
margin: var(--px-spacing-lg);
|
|
103
|
-
`,children:e(
|
|
103
|
+
`,children:e(Wa,{title:"Model Schema",variant:"compact",bodyStyle:{padding:0},children:s(Te,{children:[e(J,{name:"All",children:s(Ee,{children:[e(de,{title:"Embeddings",id:"embeddings",children:e(gl,{model:t})}),e(de,{title:"Dimensions",id:"dimensions",children:e(pl,{model:t})})]})},"all"),e(J,{name:"Embeddings",children:e(gl,{model:t})},"embeddings"),e(J,{name:"Dimensions",children:e(pl,{model:t})},"dimensions")]})})}),e(Pe,{})]})}const Kt={fragment:{argumentDefinitions:[],kind:"Fragment",metadata:null,name:"EmbeddingPageModelQuery",selections:[{alias:null,args:null,concreteType:"Model",kind:"LinkedField",name:"model",plural:!1,selections:[{args:null,kind:"FragmentSpread",name:"MetricSelector_dimensions"}],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[],kind:"Operation",name:"EmbeddingPageModelQuery",selections:[{alias:null,args:null,concreteType:"Model",kind:"LinkedField",name:"model",plural:!1,selections:[{alias:"numericDimensions",args:[{kind:"Literal",name:"include",value:{dataTypes:["numeric"]}}],concreteType:"DimensionConnection",kind:"LinkedField",name:"dimensions",plural:!1,selections:[{alias:null,args:null,concreteType:"DimensionEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:null,args:null,concreteType:"Dimension",kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"type",storageKey:null}],storageKey:null}],storageKey:null}],storageKey:'dimensions(include:{"dataTypes":["numeric"]})'}],storageKey:null}]},params:{cacheID:"4ccf476dd862525b059197daccd0d4d9",id:null,metadata:{},name:"EmbeddingPageModelQuery",operationKind:"query",text:`query EmbeddingPageModelQuery {
|
|
104
104
|
model {
|
|
105
105
|
...MetricSelector_dimensions
|
|
106
106
|
}
|
|
@@ -117,7 +117,7 @@ fragment MetricSelector_dimensions on Model {
|
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
|
-
`}};
|
|
120
|
+
`}};Kt.hash="374499f7f8ce6919e4a0a4ecbe380c52";const xt=function(){var n={defaultValue:null,kind:"LocalArgument",name:"clusterMinSamples"},a={defaultValue:null,kind:"LocalArgument",name:"clusterSelectionEpsilon"},l={defaultValue:null,kind:"LocalArgument",name:"dataQualityMetricColumnName"},t={defaultValue:null,kind:"LocalArgument",name:"fetchDataQualityMetric"},i={defaultValue:null,kind:"LocalArgument",name:"fetchPerformanceMetric"},r={defaultValue:null,kind:"LocalArgument",name:"id"},o={defaultValue:null,kind:"LocalArgument",name:"minClusterSize"},c={defaultValue:null,kind:"LocalArgument",name:"minDist"},d={defaultValue:null,kind:"LocalArgument",name:"nNeighbors"},g={defaultValue:null,kind:"LocalArgument",name:"nSamples"},f={defaultValue:null,kind:"LocalArgument",name:"performanceMetric"},m={defaultValue:null,kind:"LocalArgument",name:"timeRange"},p=[{kind:"Variable",name:"id",variableName:"id"}],y={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},b={alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},k={alias:null,args:null,kind:"ScalarField",name:"x",storageKey:null},S={alias:null,args:null,kind:"ScalarField",name:"y",storageKey:null},v=[y,{alias:null,args:null,kind:"ScalarField",name:"eventId",storageKey:null},{alias:null,args:null,concreteType:null,kind:"LinkedField",name:"coordinates",plural:!1,selections:[b,{kind:"InlineFragment",selections:[k,S,{alias:null,args:null,kind:"ScalarField",name:"z",storageKey:null}],type:"Point3D",abstractKey:null},{kind:"InlineFragment",selections:[k,S],type:"Point2D",abstractKey:null}],storageKey:null},{alias:null,args:null,concreteType:"EmbeddingMetadata",kind:"LinkedField",name:"embeddingMetadata",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"linkToData",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"rawData",storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"EventMetadata",kind:"LinkedField",name:"eventMetadata",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"predictionId",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"predictionLabel",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"actualLabel",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"predictionScore",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"actualScore",storageKey:null}],storageKey:null}],w=[{alias:null,args:null,kind:"ScalarField",name:"primaryValue",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"referenceValue",storageKey:null}],L={kind:"InlineFragment",selections:[{alias:null,args:[{kind:"Variable",name:"clusterMinSamples",variableName:"clusterMinSamples"},{kind:"Variable",name:"clusterSelectionEpsilon",variableName:"clusterSelectionEpsilon"},{kind:"Variable",name:"minClusterSize",variableName:"minClusterSize"},{kind:"Variable",name:"minDist",variableName:"minDist"},{kind:"Variable",name:"nNeighbors",variableName:"nNeighbors"},{kind:"Variable",name:"nSamples",variableName:"nSamples"},{kind:"Variable",name:"timeRange",variableName:"timeRange"}],concreteType:"UMAPPoints",kind:"LinkedField",name:"UMAPPoints",plural:!1,selections:[{alias:null,args:null,concreteType:"UMAPPoint",kind:"LinkedField",name:"data",plural:!0,selections:v,storageKey:null},{alias:null,args:null,concreteType:"UMAPPoint",kind:"LinkedField",name:"referenceData",plural:!0,selections:v,storageKey:null},{alias:null,args:null,concreteType:"UMAPPoint",kind:"LinkedField",name:"corpusData",plural:!0,selections:v,storageKey:null},{alias:null,args:null,concreteType:"Cluster",kind:"LinkedField",name:"clusters",plural:!0,selections:[y,{alias:null,args:null,kind:"ScalarField",name:"eventIds",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"driftRatio",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"primaryToCorpusRatio",storageKey:null},{condition:"fetchDataQualityMetric",kind:"Condition",passingValue:!0,selections:[{alias:null,args:[{fields:[{kind:"Variable",name:"columnName",variableName:"dataQualityMetricColumnName"},{kind:"Literal",name:"metric",value:"mean"}],kind:"ObjectValue",name:"metric"}],concreteType:"DatasetValues",kind:"LinkedField",name:"dataQualityMetric",plural:!1,selections:w,storageKey:null}]},{condition:"fetchPerformanceMetric",kind:"Condition",passingValue:!0,selections:[{alias:null,args:[{fields:[{kind:"Variable",name:"metric",variableName:"performanceMetric"}],kind:"ObjectValue",name:"metric"}],concreteType:"DatasetValues",kind:"LinkedField",name:"performanceMetric",plural:!1,selections:w,storageKey:null}]}],storageKey:null},{alias:null,args:null,concreteType:"Retrieval",kind:"LinkedField",name:"contextRetrievals",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"queryId",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"documentId",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"relevance",storageKey:null}],storageKey:null}],storageKey:null}],type:"EmbeddingDimension",abstractKey:null};return{fragment:{argumentDefinitions:[n,a,l,t,i,r,o,c,d,g,f,m],kind:"Fragment",metadata:null,name:"EmbeddingPageUMAPQuery",selections:[{alias:"embedding",args:p,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[L],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[r,m,c,d,g,o,n,a,t,l,i,f],kind:"Operation",name:"EmbeddingPageUMAPQuery",selections:[{alias:"embedding",args:p,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[b,L,{kind:"TypeDiscriminator",abstractKey:"__isNode"},y],storageKey:null}]},params:{cacheID:"d30210c52f86b9d9a7ac958f866aa93e",id:null,metadata:{},name:"EmbeddingPageUMAPQuery",operationKind:"query",text:`query EmbeddingPageUMAPQuery(
|
|
121
121
|
$id: GlobalID!
|
|
122
122
|
$timeRange: TimeRange!
|
|
123
123
|
$minDist: Float!
|
|
@@ -241,7 +241,7 @@ fragment MetricSelector_dimensions on Model {
|
|
|
241
241
|
id
|
|
242
242
|
}
|
|
243
243
|
}
|
|
244
|
-
`}}}();
|
|
244
|
+
`}}}();xt.hash="f1ee7ce02317f1c3fe96b77af405095f";function Qd(){const{theme:n}=zn();return u.useMemo(()=>n==="light"?Co:Fo,[n])}function jd(){const{embeddingDimensionId:n}=ln();if(!n)throw new Error("Missing embeddingDimensionId in URL params");return n}const Dt={euclideanDistance:{name:"Euclidean Distance",shortName:"Euc. Distance",definition:"Euclidean distance over time captures how much your primary inferences's embeddings are drifting from the reference data. Euclidean distance of the embeddings is calculated by taking the centroid of the embedding vectors for each inferences and calculating the distance between the two centroids."},queryDistance:{name:"Query Distance",shortName:"Query Distance",definition:"The query distance is the euclidean distance of the centroid of queries from the centroid of the corpus."},accuracyScore:{name:"Accuracy Score",shortName:"Accuracy",definition:"Accuracy classification score. In multi-label classification, this function computes subset accuracy: the set of labels predicted for a sample must exactly match the corresponding set of labels in the ground truth."}};function hn(n){const a=Dt[n];return a!=null?a.shortName:n}function _a(n){const a=Dt[n];return a&&a.definition!=null&&a.definition||null}function Dn(n){return`${n.column}:${n.dir}`}function qd(){const{referenceInferences:n}=Ve(),a=!!n,l=Q(d=>d.clusterSort),t=Q(d=>d.setClusterSort),[i,r]=u.useState(!1),o=u.useMemo(()=>{const d=[];return a&&d.push({label:"Most drift",value:Dn({column:"driftRatio",dir:"desc"})}),[...d,{label:"Largest clusters",value:Dn({column:"size",dir:"desc"})},{label:"Smallest clusters",value:Dn({column:"size",dir:"asc"})},{label:"Highest metric value",value:Dn({column:"primaryMetricValue",dir:"desc"})},{label:"Lowest metric value",value:Dn({column:"primaryMetricValue",dir:"asc"})}]},[a]),c=Dn(l);return e("div",{css:d=>C`
|
|
245
245
|
.ac-action-button {
|
|
246
246
|
background: none;
|
|
247
247
|
border: none;
|
|
@@ -266,14 +266,14 @@ fragment MetricSelector_dimensions on Model {
|
|
|
266
266
|
height: 0;
|
|
267
267
|
vertical-align: middle;
|
|
268
268
|
width: 0;
|
|
269
|
-
`})]}),e(ha,{children:e(na,{style:{width:200},selectedKeys:[c],selectionMode:"single",items:o,onSelectionChange:d=>{if(d instanceof Set&&d.size>0){const[g]=d.values(),[f,m]=g.split(":");t({column:f,dir:m})}r(!1)},children:d=>e(
|
|
269
|
+
`})]}),e(ha,{children:e(na,{style:{width:200},selectedKeys:[c],selectionMode:"single",items:o,onSelectionChange:d=>{if(d instanceof Set&&d.size>0){const[g]=d.values(),[f,m]=g.split(":");t({column:f,dir:m})}r(!1)},children:d=>e(B,{children:d.label},d.value)})})]})})}const Tt=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"clusters"}],a=[{alias:null,args:[{kind:"Variable",name:"clusters",variableName:"clusters"}],concreteType:"ExportedFile",kind:"LinkedField",name:"exportClusters",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"fileName",storageKey:null}],storageKey:null}];return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"EmbeddingActionMenuExportClustersMutation",selections:a,type:"Mutation",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"EmbeddingActionMenuExportClustersMutation",selections:a},params:{cacheID:"1bef6586fcb3d6eb7034204fbe49633c",id:null,metadata:{},name:"EmbeddingActionMenuExportClustersMutation",operationKind:"mutation",text:`mutation EmbeddingActionMenuExportClustersMutation(
|
|
270
270
|
$clusters: [ClusterInput!]!
|
|
271
271
|
) {
|
|
272
272
|
exportClusters(clusters: $clusters) {
|
|
273
273
|
fileName
|
|
274
274
|
}
|
|
275
275
|
}
|
|
276
|
-
`}}}();
|
|
276
|
+
`}}}();Tt.hash="b5ff2517dbb0d19a1b24dea1796a3576";function Ud(){const n=Q(r=>r.clusters),{notifyError:a,notifySuccess:l}=ql(),[t,i]=D.useMutation(Tt);return e(Be,{align:"end",buttonSize:"compact",icon:i?e(P,{svg:e(I.LoadingOutline,{})}):null,onAction:r=>{switch(r){case"export_cluster":t({variables:{clusters:n.map(o=>({eventIds:o.eventIds,id:o.id}))},onCompleted:o=>{const{fileName:c}=o.exportClusters;l({title:"Clusters Exported",message:"dataframe is available via px.active_session().exports or can be downloaded by clicking below",action:{text:"Download",onClick:()=>{window.open(`/exports?filename=${c}`,"_self")}}})},onError:o=>{a({title:"Failed to export clusters",message:`Failed to export clusters: ${o.message}`})}});break}},children:s(B,{children:[e(P,{svg:e(I.Download,{})}),"Export clusters"]},"export_cluster")})}const It={argumentDefinitions:[],kind:"Fragment",metadata:null,name:"MetricSelector_dimensions",selections:[{alias:"numericDimensions",args:[{kind:"Literal",name:"include",value:{dataTypes:["numeric"]}}],concreteType:"DimensionConnection",kind:"LinkedField",name:"dimensions",plural:!1,selections:[{alias:null,args:null,concreteType:"DimensionEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:null,args:null,concreteType:"Dimension",kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"type",storageKey:null}],storageKey:null}],storageKey:null}],storageKey:'dimensions(include:{"dataTypes":["numeric"]})'}],type:"Model",abstractKey:null};It.hash="55d03de16503d7af254c17cef7d18ee0";const Ln=":";function Bd(n){return["drift","performance","dataQuality","retrieval"].includes(n)}function Bn(n){const{type:a,metric:l}=n;switch(a){case"drift":return`${a}${Ln}${l}`;case"retrieval":return`${a}${Ln}${l}`;case"performance":return`${a}${Ln}${l}`;case"dataQuality":{const{name:t}=n.dimension;return`${a}${Ln}${l}${Ln}${t}`}default:Ce()}}function Hd({metricKey:n,dimensions:a}){const[l,t,i]=n.split(Ln);if(!Bd(l))throw new Error(`Invalid metric type: ${l}`);switch(l){case"drift":return{type:l,metric:t};case"retrieval":return{type:l,metric:t};case"performance":return{type:l,metric:t};case"dataQuality":{const r=a.find(o=>o.name===i);if(!r)throw new Error(`Invalid dimension name: ${i}`);return{type:l,metric:t,dimension:r}}default:Ce()}}const Gd=s(Vn,{variant:"info",children:[e(re,{level:4,children:"Analysis Metric"}),s(Fn,{children:[e("p",{children:"Select a metric to drive the analysis of your embeddings."}),e("p",{children:"To analyze the the drift between your two inferencess, select a drift metric and the UI will highlight areas of high drift."}),e("p",{children:"To analyze the quality of your embeddings, select a dimension data quality metric by which to analyze the point cloud. The UI will highlight areas where the data quality is degrading."})]})]});function Wd({model:n}){const[,a]=u.useTransition(),l=D.useFragment(It,n),{referenceInferences:t,corpusInferences:i}=Ve(),r=!!t,o=!!i,c=Q(y=>y.metric),d=Q(y=>y.loading),g=Q(y=>y.setMetric),f=l.numericDimensions.edges.map(y=>y.node),m=f.length>0,p=u.useCallback(y=>{const b=Hd({metricKey:y,dimensions:f});a(()=>{g(b)})},[g,f,a]);return s(Nn,{label:"metric",labelExtra:Gd,selectedKey:c?Bn(c):void 0,onSelectionChange:p,placeholder:"Select a metric...",isDisabled:d,children:[r?e(ca,{title:"Drift",children:e(B,{children:"Euclidean Distance"},Bn({type:"drift",metric:"euclideanDistance"}))}):null,o?e(ca,{title:"Retrieval",children:e(B,{children:"Query Distance"},Bn({type:"retrieval",metric:"queryDistance"}))}):null,e(ca,{title:"Performance",children:e(B,{children:"Accuracy Score"},Bn({type:"performance",metric:"accuracyScore"}))}),m?e(ca,{title:"Data Quality",children:f.map(y=>e(B,{children:`${y.name} avg`},Bn({type:"dataQuality",metric:"average",dimension:y})))}):null]})}const Lt=function(){var n={defaultValue:null,kind:"LocalArgument",name:"countGranularity"},a={defaultValue:null,kind:"LocalArgument",name:"dimensionId"},l={defaultValue:null,kind:"LocalArgument",name:"embeddingDimensionId"},t={defaultValue:null,kind:"LocalArgument",name:"fetchDataQuality"},i={defaultValue:null,kind:"LocalArgument",name:"fetchDrift"},r={defaultValue:null,kind:"LocalArgument",name:"fetchPerformance"},o={defaultValue:null,kind:"LocalArgument",name:"fetchQueryDistance"},c={defaultValue:null,kind:"LocalArgument",name:"metricGranularity"},d={defaultValue:null,kind:"LocalArgument",name:"performanceMetric"},g={defaultValue:null,kind:"LocalArgument",name:"timeRange"},f=[{kind:"Variable",name:"id",variableName:"embeddingDimensionId"}],m={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},p={kind:"Variable",name:"granularity",variableName:"metricGranularity"},y={kind:"Variable",name:"timeRange",variableName:"timeRange"},b=[p,{kind:"Literal",name:"metric",value:"euclideanDistance"},y],k=[{alias:null,args:null,concreteType:"TimeSeriesDataPoint",kind:"LinkedField",name:"data",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"timestamp",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"value",storageKey:null}],storageKey:null}],S={kind:"InlineFragment",selections:[{condition:"fetchDrift",kind:"Condition",passingValue:!0,selections:[{alias:"euclideanDistanceTimeSeries",args:b,concreteType:"DriftTimeSeries",kind:"LinkedField",name:"driftTimeSeries",plural:!1,selections:k,storageKey:null}]},{condition:"fetchQueryDistance",kind:"Condition",passingValue:!0,selections:[{alias:null,args:b,concreteType:"DriftTimeSeries",kind:"LinkedField",name:"retrievalMetricTimeSeries",plural:!1,selections:k,storageKey:null}]},{alias:"trafficTimeSeries",args:[{kind:"Variable",name:"granularity",variableName:"countGranularity"},{kind:"Literal",name:"metric",value:"count"},y],concreteType:"DataQualityTimeSeries",kind:"LinkedField",name:"dataQualityTimeSeries",plural:!1,selections:k,storageKey:null}],type:"EmbeddingDimension",abstractKey:null},v=[{kind:"Variable",name:"id",variableName:"dimensionId"}],w={kind:"InlineFragment",selections:[{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:[p,{kind:"Literal",name:"metric",value:"mean"},y],concreteType:"DataQualityTimeSeries",kind:"LinkedField",name:"dataQualityTimeSeries",plural:!1,selections:k,storageKey:null}],type:"Dimension",abstractKey:null},L={alias:null,args:null,concreteType:"Model",kind:"LinkedField",name:"model",plural:!1,selections:[{condition:"fetchPerformance",kind:"Condition",passingValue:!0,selections:[{alias:null,args:[p,{fields:[{kind:"Variable",name:"metric",variableName:"performanceMetric"}],kind:"ObjectValue",name:"metric"},y],concreteType:"PerformanceTimeSeries",kind:"LinkedField",name:"performanceTimeSeries",plural:!1,selections:k,storageKey:null}]}],storageKey:null},A={alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null};return{fragment:{argumentDefinitions:[n,a,l,t,i,r,o,c,d,g],kind:"Fragment",metadata:null,name:"MetricTimeSeriesQuery",selections:[{alias:"embedding",args:f,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[m,S],storageKey:null},{condition:"fetchDataQuality",kind:"Condition",passingValue:!0,selections:[{alias:"dimension",args:v,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[w],storageKey:null}]},L],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[l,g,c,n,i,o,t,a,r,d],kind:"Operation",name:"MetricTimeSeriesQuery",selections:[{alias:"embedding",args:f,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[A,m,S],storageKey:null},{condition:"fetchDataQuality",kind:"Condition",passingValue:!0,selections:[{alias:"dimension",args:v,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[A,w,{kind:"TypeDiscriminator",abstractKey:"__isNode"},m],storageKey:null}]},L]},params:{cacheID:"a68a8204bf7fdd13e6915b338d4b5497",id:null,metadata:{},name:"MetricTimeSeriesQuery",operationKind:"query",text:`query MetricTimeSeriesQuery(
|
|
277
277
|
$embeddingDimensionId: GlobalID!
|
|
278
278
|
$timeRange: TimeRange!
|
|
279
279
|
$metricGranularity: Granularity!
|
|
@@ -332,7 +332,7 @@ fragment MetricSelector_dimensions on Model {
|
|
|
332
332
|
}
|
|
333
333
|
}
|
|
334
334
|
}
|
|
335
|
-
`}}}();
|
|
335
|
+
`}}}();Lt.hash="f31abad2141a5a1c461ef2a598ffa4f3";const kl=new Intl.NumberFormat([],{maximumFractionDigits:2}),Pt=()=>{const n=Ge(),a=n.blue400,l=n.gray500;return{color:a,barColor:l}};function Jd({active:n,payload:a,label:l}){var r,o,c;const{color:t,barColor:i}=Pt();if(n&&a&&a.length){const d=((r=a[1])==null?void 0:r.value)??null,g=((o=a[0])==null?void 0:o.value)??null,f=typeof d=="number"?kl.format(d):"--",m=typeof g=="number"?kl.format(g):"--";return s(rn,{children:[e(K,{weight:"heavy",textSize:"medium",children:`${Qe(new Date(l))}`}),e(pe,{color:t,name:((c=a[1])==null?void 0:c.payload.metricName)??"Metric",value:f}),e(pe,{color:i,shape:"square",name:"Count",value:m}),e(va,{}),s("div",{css:C`
|
|
336
336
|
display: flex;
|
|
337
337
|
flex-direction: row;
|
|
338
338
|
align-items: center;
|
|
@@ -340,7 +340,7 @@ fragment MetricSelector_dimensions on Model {
|
|
|
340
340
|
gap: var(--px-spacing-sm);
|
|
341
341
|
|
|
342
342
|
margin-top: var(--px-spacing-sm);
|
|
343
|
-
`,children:[e(P,{svg:e(
|
|
343
|
+
`,children:[e(P,{svg:e(Nl,{})}),e("span",{children:"Click to view the point cloud at this time"})]})]})}return null}function Zd(n){switch(n.type){case"drift":return"Embedding Drift";case"performance":return"Model Performance";case"dataQuality":return"Data Quality";case"retrieval":return"Query Distance";default:Ce()}}function Xd(n){if(n)switch(n.type){case"drift":return hn(n.metric);case"performance":return hn(n.metric);case"dataQuality":return`${n.dimension.name} avg`;case"retrieval":return hn(n.metric);default:Ce()}else return"Count"}function Yd(n){switch(n.type){case"drift":return _a(n.metric);case"performance":return _a(n.metric);case"dataQuality":return null;case"retrieval":return _a(n.metric);default:Ce()}}function ec({embeddingDimensionId:n}){const a=Q(x=>x.metric),l=a.type==="drift",t=a.type==="retrieval",i=a.type==="dataQuality",r=a.type==="performance",{timeRange:o}=He(),{selectedTimestamp:c,setSelectedTimestamp:d}=Sa(),g=$n(o),f=D.useLazyLoadQuery(Lt,{embeddingDimensionId:n,timeRange:{start:o.start.toISOString(),end:o.end.toISOString()},metricGranularity:Ul(o),countGranularity:g,fetchDrift:l,fetchQueryDistance:t,fetchDataQuality:i,fetchPerformance:r,dimensionId:a.type==="dataQuality"?a.dimension.id:n,performanceMetric:a.type==="performance"?a.metric:"accuracyScore"}),m=On({samplingIntervalMinutes:g.samplingIntervalMinutes}),p=u.useCallback(x=>{const{activePayload:T}=x;if(T!=null&&T.length>0){const E=T[0].payload;d(new Date(E.timestamp))}},[d]),y=nc({data:f,metric:a}),k=ac(f).reduce((x,T)=>(x[T.timestamp]=T.value,x),{})??{},S=y.map(x=>{const T=k[x.timestamp];return{...x,traffic:T,timestamp:new Date(x.timestamp).getTime()}}),v=Xd(a),w=Yd(a),{color:L,barColor:A}=Pt();return s("section",{css:C`
|
|
344
344
|
width: 100%;
|
|
345
345
|
height: 100%;
|
|
346
346
|
display: flex;
|
|
@@ -360,7 +360,7 @@ fragment MetricSelector_dimensions on Model {
|
|
|
360
360
|
width: 100%;
|
|
361
361
|
overflow: hidden;
|
|
362
362
|
}
|
|
363
|
-
`,children:[s(re,{level:3,children:[Zd(a),w!=null?s(
|
|
363
|
+
`,children:[s(re,{level:3,children:[Zd(a),w!=null?s(Vn,{children:[e(re,{level:4,children:v}),e(Fn,{children:w})]}):null]}),e("div",{children:e(sn,{width:"100%",height:"100%",children:s(ra,{data:S,margin:{top:25,right:18,left:18,bottom:10},onClick:p,children:[s("defs",{children:[s("linearGradient",{id:"colorUv",x1:"0",y1:"0",x2:"0",y2:"1",children:[e("stop",{offset:"5%",stopColor:L,stopOpacity:.8}),e("stop",{offset:"95%",stopColor:L,stopOpacity:0})]}),s("linearGradient",{id:"barColor",x1:"0",y1:"0",x2:"0",y2:"1",children:[e("stop",{offset:"5%",stopColor:A,stopOpacity:.3}),e("stop",{offset:"95%",stopColor:A,stopOpacity:0})]})]}),e(on,{...Qn,tickFormatter:x=>m(new Date(x)),style:{fill:"var(--ac-global-text-color-700)"}}),e(Ne,{stroke:ge.colors.gray200,label:{value:v,angle:-90,position:"insideLeft",style:{textAnchor:"middle",fill:"var(--ac-global-text-color-900)"}},style:{fill:"var(--ac-global-text-color-700)"}}),e(Ne,{yAxisId:"right",orientation:"right",label:{value:"Count",angle:90,position:"insideRight",style:{textAnchor:"middle",fill:"var(--ac-global-text-color-900)"}},style:{fill:"var(--ac-global-text-color-700)"}}),e(dn,{strokeDasharray:"4 4",stroke:ge.colors.gray200,strokeOpacity:.5}),e(cn,{content:e(Jd,{})}),e(En,{yAxisId:"right",dataKey:"traffic",fill:"url(#barColor)",spacing:5}),e(Yn,{type:"monotone",dataKey:"value",stroke:L,fillOpacity:1,fill:"url(#colorUv)"}),c!=null?e(pt,{...Bl,x:c.getTime()}):null]})})})]})}function nc({data:n,metric:a}){var l,t,i,r,o,c;if(((l=n.embedding.euclideanDistanceTimeSeries)==null?void 0:l.data)!=null&&n.embedding.euclideanDistanceTimeSeries.data.length>0)return n.embedding.euclideanDistanceTimeSeries.data.map(d=>({metricName:hn(a.metric),...d}));if(((t=n.embedding.retrievalMetricTimeSeries)==null?void 0:t.data)!=null&&n.embedding.retrievalMetricTimeSeries.data.length>0)return n.embedding.retrievalMetricTimeSeries.data.map(d=>({metricName:hn(a.metric),...d}));if(n.dimension&&((r=(i=n.dimension)==null?void 0:i.dataQualityTimeSeries)==null?void 0:r.data)!=null&&n.dimension.dataQualityTimeSeries.data.length>0){const d=n.dimension.name||"unknown";return n.dimension.dataQualityTimeSeries.data.map(g=>({metricName:`${d} avg`,...g}))}else{if(n.model&&((o=n.model.performanceTimeSeries)==null?void 0:o.data)!=null&&n.model.performanceTimeSeries.data.length>0)return n.model.performanceTimeSeries.data.map(d=>({metricName:hn(a.metric),...d}));if(((c=n.embedding.trafficTimeSeries)==null?void 0:c.data)!=null)return n.embedding.trafficTimeSeries.data.map(d=>({metricName:"Count",...d}))}return[]}function ac(n){var a;return((a=n.embedding.trafficTimeSeries)==null?void 0:a.data)!=null?[...n.embedding.trafficTimeSeries.data]:[]}const wt=function(){var n={defaultValue:null,kind:"LocalArgument",name:"corpusEventIds"},a={defaultValue:null,kind:"LocalArgument",name:"primaryEventIds"},l={defaultValue:null,kind:"LocalArgument",name:"referenceEventIds"},t=[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{alias:null,args:null,concreteType:"DimensionWithValue",kind:"LinkedField",name:"dimensions",plural:!0,selections:[{alias:null,args:null,concreteType:"Dimension",kind:"LinkedField",name:"dimension",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"type",storageKey:null}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"value",storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"EventMetadata",kind:"LinkedField",name:"eventMetadata",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"predictionId",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"predictionLabel",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"predictionScore",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"actualLabel",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"actualScore",storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"PromptResponse",kind:"LinkedField",name:"promptAndResponse",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"prompt",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"response",storageKey:null}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"documentText",storageKey:null}],i=[{alias:null,args:null,concreteType:"Model",kind:"LinkedField",name:"model",plural:!1,selections:[{alias:null,args:null,concreteType:"Inferences",kind:"LinkedField",name:"primaryInferences",plural:!1,selections:[{alias:null,args:[{kind:"Variable",name:"eventIds",variableName:"primaryEventIds"}],concreteType:"Event",kind:"LinkedField",name:"events",plural:!0,selections:t,storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"Inferences",kind:"LinkedField",name:"referenceInferences",plural:!1,selections:[{alias:null,args:[{kind:"Variable",name:"eventIds",variableName:"referenceEventIds"}],concreteType:"Event",kind:"LinkedField",name:"events",plural:!0,selections:t,storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"Inferences",kind:"LinkedField",name:"corpusInferences",plural:!1,selections:[{alias:null,args:[{kind:"Variable",name:"eventIds",variableName:"corpusEventIds"}],concreteType:"Event",kind:"LinkedField",name:"events",plural:!0,selections:t,storageKey:null}],storageKey:null}],storageKey:null}];return{fragment:{argumentDefinitions:[n,a,l],kind:"Fragment",metadata:null,name:"PointSelectionPanelContentQuery",selections:i,type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[a,l,n],kind:"Operation",name:"PointSelectionPanelContentQuery",selections:i},params:{cacheID:"8b48064eba35d0d6c8dc834c2f7795c0",id:null,metadata:{},name:"PointSelectionPanelContentQuery",operationKind:"query",text:`query PointSelectionPanelContentQuery(
|
|
364
364
|
$primaryEventIds: [ID!]!
|
|
365
365
|
$referenceEventIds: [ID!]!
|
|
366
366
|
$corpusEventIds: [ID!]!
|
|
@@ -440,7 +440,7 @@ fragment MetricSelector_dimensions on Model {
|
|
|
440
440
|
}
|
|
441
441
|
}
|
|
442
442
|
}
|
|
443
|
-
`}}}();
|
|
443
|
+
`}}}();wt.hash="4bd627481610322f2acbcf73dfbfaadc";const bl=C`
|
|
444
444
|
margin: var(--px-spacing-lg);
|
|
445
445
|
display: flex;
|
|
446
446
|
flex-direction: column;
|
|
@@ -458,7 +458,7 @@ fragment MetricSelector_dimensions on Model {
|
|
|
458
458
|
margin-inline-start: 0;
|
|
459
459
|
}
|
|
460
460
|
}
|
|
461
|
-
`;function
|
|
461
|
+
`;function Hn(n){return e("div",{css:C`
|
|
462
462
|
max-height: 200px;
|
|
463
463
|
overflow-y: auto;
|
|
464
464
|
`,children:e("pre",{css:C`
|
|
@@ -469,10 +469,10 @@ fragment MetricSelector_dimensions on Model {
|
|
|
469
469
|
`,children:n.children})})}function lc({event:n}){const a=n.retrievedDocuments&&n.retrievedDocuments.length>0,l=!n.id.includes("CORPUS");return s("section",{css:C`
|
|
470
470
|
height: 100%;
|
|
471
471
|
overflow-y: auto;
|
|
472
|
-
`,children:[e(sc,{event:n}),s(Ee,{children:[l?e(de,{id:"prediction",title:"Prediction Details",children:s("dl",{css:
|
|
472
|
+
`,children:[e(sc,{event:n}),s(Ee,{children:[l?e(de,{id:"prediction",title:"Prediction Details",children:s("dl",{css:bl,children:[n.predictionId!=null&&s("div",{children:[e("dt",{children:"Prediction ID"}),e("dd",{css:C`
|
|
473
473
|
display: flex;
|
|
474
474
|
align-items: center;
|
|
475
|
-
`,children:n.predictionId})]}),n.predictionLabel!=null&&s("div",{children:[e("dt",{children:"Prediction Label"}),e("dd",{children:n.predictionLabel})]}),n.predictionScore!=null&&s("div",{children:[e("dt",{children:"Prediction Score"}),e("dd",{children:n.predictionScore})]}),n.actualLabel!=null&&s("div",{children:[e("dt",{children:"Actual Label"}),e("dd",{children:n.actualLabel})]}),n.actualScore!=null&&s("div",{children:[e("dt",{children:"Actual Score"}),e("dd",{children:n.actualScore})]})]})}):e(de,{id:"document",title:"Document Details",children:e("dl",{css:
|
|
475
|
+
`,children:n.predictionId})]}),n.predictionLabel!=null&&s("div",{children:[e("dt",{children:"Prediction Label"}),e("dd",{children:n.predictionLabel})]}),n.predictionScore!=null&&s("div",{children:[e("dt",{children:"Prediction Score"}),e("dd",{children:n.predictionScore})]}),n.actualLabel!=null&&s("div",{children:[e("dt",{children:"Actual Label"}),e("dd",{children:n.actualLabel})]}),n.actualScore!=null&&s("div",{children:[e("dt",{children:"Actual Score"}),e("dd",{children:n.actualScore})]})]})}):e(de,{id:"document",title:"Document Details",children:e("dl",{css:bl,children:n.predictionId!=null&&s("div",{children:[e("dt",{children:"Document ID"}),e("dd",{css:C`
|
|
476
476
|
display: flex;
|
|
477
477
|
align-items: center;
|
|
478
478
|
`,children:n.predictionId})]})})}),e(de,{id:"dimensions",title:"Dimensions",children:e(ic,{dimensions:n.dimensions})}),a&&e(de,{id:"retrievals",title:"Retrieved Documents",titleExtra:e(Me,{variant:"light",children:n.retrievedDocuments.length}),children:e("ul",{css:C`
|
|
@@ -480,7 +480,7 @@ fragment MetricSelector_dimensions on Model {
|
|
|
480
480
|
li + li {
|
|
481
481
|
margin-top: var(--px-spacing-med);
|
|
482
482
|
}
|
|
483
|
-
`,children:n.retrievedDocuments.map(t=>e("li",{children:e(tc,{document:t})},t.id))})})]})]})}function tc({document:n}){return e(F,{borderRadius:"medium",backgroundColor:"light",children:s(h,{direction:"column",children:[e(F,{width:"100%",borderBottomWidth:"thin",borderBottomColor:"dark",children:s(h,{direction:"row",justifyContent:"space-between",margin:"size-100",alignItems:"center",children:[s(h,{direction:"row",gap:"size-50",alignItems:"center",children:[e(P,{svg:e(I.FileOutline,{})}),s(re,{level:4,children:["document ",n.id]})]}),typeof n.relevance=="number"&&e(
|
|
483
|
+
`,children:n.retrievedDocuments.map(t=>e("li",{children:e(tc,{document:t})},t.id))})})]})]})}function tc({document:n}){return e(F,{borderRadius:"medium",backgroundColor:"light",children:s(h,{direction:"column",children:[e(F,{width:"100%",borderBottomWidth:"thin",borderBottomColor:"dark",children:s(h,{direction:"row",justifyContent:"space-between",margin:"size-100",alignItems:"center",children:[s(h,{direction:"row",gap:"size-50",alignItems:"center",children:[e(P,{svg:e(I.FileOutline,{})}),s(re,{level:4,children:["document ",n.id]})]}),typeof n.relevance=="number"&&e(Xn,{color:"blue",children:`relevance ${Ya(n.relevance)}`})]})}),e("pre",{css:C`
|
|
484
484
|
padding: var(--px-spacing-lg);
|
|
485
485
|
white-space: normal;
|
|
486
486
|
margin: 0;
|
|
@@ -491,24 +491,24 @@ fragment MetricSelector_dimensions on Model {
|
|
|
491
491
|
`}):l?e("audio",{src:n,controls:!0,autoPlay:!0}):e("img",{src:n,alt:"event image",width:"100%",height:"200px",css:C`
|
|
492
492
|
object-fit: contain;
|
|
493
493
|
background-color: black;
|
|
494
|
-
`})}function sc({event:n}){const a=n.linkToData||void 0,l=n.rawData,t=n.prompt||n.response?{prompt:n.prompt,response:n.response}:null,i=n.documentText;let r=null;return a?r=s(h,{direction:"column",children:[e(rc,{dataUrl:a}),l&&e(Ee,{children:e(de,{id:"raw",title:"Raw Data",children:e(
|
|
494
|
+
`})}function sc({event:n}){const a=n.linkToData||void 0,l=n.rawData,t=n.prompt||n.response?{prompt:n.prompt,response:n.response}:null,i=n.documentText;let r=null;return a?r=s(h,{direction:"column",children:[e(rc,{dataUrl:a}),l&&e(Ee,{children:e(de,{id:"raw",title:"Raw Data",children:e(Hn,{children:l})})})]}):i?r=e(Ee,{children:e(de,{id:"document",title:"Document",children:e(Hn,{children:i})})}):t?r=s(Ee,{children:[e(de,{id:"prompt",title:"Prompt",children:e(Hn,{children:t.prompt})}),e(de,{id:"response",title:"Response",children:e(Hn,{children:t.response})})]}):n.rawData&&n.rawData&&n.rawData,r}function oc(){return e("tbody",{className:"is-empty",children:e("tr",{children:e("td",{colSpan:100,css:n=>C`
|
|
495
495
|
text-align: center;
|
|
496
496
|
padding: ${n.spacing.margin24}px ${n.spacing.margin24}px !important;
|
|
497
|
-
`,children:e(
|
|
497
|
+
`,children:e(Hl,{graphicKey:"documents",message:"This embedding has no associated dimensions"})})})})}const At=function(){var n=[{alias:null,args:null,concreteType:"Model",kind:"LinkedField",name:"model",plural:!1,selections:[{alias:null,args:null,concreteType:"ExportedFile",kind:"LinkedField",name:"exportedFiles",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"fileName",storageKey:null}],storageKey:null}],storageKey:null}];return{fragment:{argumentDefinitions:[],kind:"Fragment",metadata:null,name:"ExportSelectionButtonExportsQuery",selections:n,type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[],kind:"Operation",name:"ExportSelectionButtonExportsQuery",selections:n},params:{cacheID:"2f7e3554305121746dc799b6a8d120da",id:null,metadata:{},name:"ExportSelectionButtonExportsQuery",operationKind:"query",text:`query ExportSelectionButtonExportsQuery {
|
|
498
498
|
model {
|
|
499
499
|
exportedFiles {
|
|
500
500
|
fileName
|
|
501
501
|
}
|
|
502
502
|
}
|
|
503
503
|
}
|
|
504
|
-
`}}}();
|
|
504
|
+
`}}}();At.hash="7e6db431afe21f137e54505645c787f4";const _t=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"eventIds"}],a=[{alias:null,args:[{kind:"Variable",name:"eventIds",variableName:"eventIds"}],concreteType:"ExportedFile",kind:"LinkedField",name:"exportEvents",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"fileName",storageKey:null}],storageKey:null}];return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"ExportSelectionButtonMutation",selections:a,type:"Mutation",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"ExportSelectionButtonMutation",selections:a},params:{cacheID:"d370df04ca30a5059288c7aa298239a8",id:null,metadata:{},name:"ExportSelectionButtonMutation",operationKind:"mutation",text:`mutation ExportSelectionButtonMutation(
|
|
505
505
|
$eventIds: [ID!]!
|
|
506
506
|
) {
|
|
507
507
|
exportEvents(eventIds: $eventIds) {
|
|
508
508
|
fileName
|
|
509
509
|
}
|
|
510
510
|
}
|
|
511
|
-
`}}}();
|
|
511
|
+
`}}}();_t.hash="8b0d6962e2034d4c148d1b9919111d2f";const dc=`import phoenix as px
|
|
512
512
|
|
|
513
513
|
exports = px.active_session().exports
|
|
514
514
|
dataframe = exports[-1]
|
|
@@ -516,7 +516,7 @@ dataframe`,cc=C`
|
|
|
516
516
|
.cm-content {
|
|
517
517
|
padding: var(--ac-global-dimension-static-size-100);
|
|
518
518
|
}
|
|
519
|
-
`;function uc({value:n}){const{theme:a}=
|
|
519
|
+
`;function uc({value:n}){const{theme:a}=zn(),l=a==="light"?void 0:oa;return e(sa,{value:n,basicSetup:!1,extensions:[sl()],editable:!1,theme:l,css:cc})}function mc(){const n=Q(o=>o.selectedEventIds),[a,l]=D.useMutation(_t),[t,i]=u.useState(null),r=u.useCallback(()=>{a({variables:{eventIds:[...n]},onCompleted:o=>{i(o.exportEvents)}})},[a,n]);return s(U,{children:[e(M,{variant:"default",size:"compact",icon:e(P,{svg:e(Vl,{})}),"aria-label":"Export selection / cluster",loading:l,onClick:r,children:l?"Exporting":"Export"}),e(W,{type:"slideOver",isDismissable:!0,onDismiss:()=>i(null),children:t!=null&&s(H,{title:"Cluster Exports",size:"M",children:[e(ne,{variant:"success",banner:!0,title:"Export succeeded",extra:e(M,{variant:"success",size:"compact",onClick:()=>{window.open(`/exports?filename=${t.fileName}`,"_self")},children:"Download"})}),s("div",{css:C`
|
|
520
520
|
display: flex;
|
|
521
521
|
flex-direction: column;
|
|
522
522
|
justify-content: space-between;
|
|
@@ -526,12 +526,12 @@ dataframe`,cc=C`
|
|
|
526
526
|
`,children:[e("p",{css:C`
|
|
527
527
|
margin: 0;
|
|
528
528
|
flex: 1 1 auto;
|
|
529
|
-
`,children:"You can retrieve your export in your notebook via"}),e(F,{borderColor:"light",borderWidth:"thin",borderRadius:"medium",children:e(uc,{value:dc})})]}),e(Ee,{children:e(de,{id:"all-exports",title:"Latest Exports",children:e(u.Suspense,{fallback:e(fe,{}),children:e(gc,{})})})})]})})]})}function gc(){const n=D.useLazyLoadQuery(
|
|
529
|
+
`,children:"You can retrieve your export in your notebook via"}),e(F,{borderColor:"light",borderWidth:"thin",borderRadius:"medium",children:e(uc,{value:dc})})]}),e(Ee,{children:e(de,{id:"all-exports",title:"Latest Exports",children:e(u.Suspense,{fallback:e(fe,{}),children:e(gc,{})})})})]})})]})}function gc(){const n=D.useLazyLoadQuery(At,{},{fetchPolicy:"network-only"});return e($l,{children:n.model.exportedFiles.map((a,l)=>e(zl,{children:s("div",{css:C`
|
|
530
530
|
display: flex;
|
|
531
531
|
flex-direction: row;
|
|
532
532
|
justify-content: space-between;
|
|
533
533
|
align-items: center;
|
|
534
|
-
`,children:[a.fileName,e(M,{size:"compact","aria-label":"Download",variant:"default",icon:e(P,{svg:e(
|
|
534
|
+
`,children:[a.fileName,e(M,{size:"compact","aria-label":"Download",variant:"default",icon:e(P,{svg:e(Vl,{})}),onClick:()=>{window.open(`/exports?filename=${a.fileName}`,"_self")}})]})},l))})}function pc(n){const{getInferencesNameByRole:a}=Ve(),{events:l,onItemSelected:t}=n,i=Q(g=>g.eventIdToDataMap),r=Q(g=>g.eventIdToGroup),o=Q(g=>g.pointGroupColors),c=Q(g=>g.selectionGridSize),d=Q(g=>g.setHoveredEventId);return e("div",{css:C`
|
|
535
535
|
flex: 1 1 auto;
|
|
536
536
|
overflow-y: auto;
|
|
537
537
|
`,"data-testid":"grid-view-scroll-container",children:e("ul",{"data-grid-size":c,css:C`
|
|
@@ -560,7 +560,7 @@ dataframe`,cc=C`
|
|
|
560
560
|
min-width: var(--grid-item-min-width);
|
|
561
561
|
height: var(--grid-item-height);
|
|
562
562
|
}
|
|
563
|
-
`,children:l.map((g,f)=>{const m=i.get(g.id),{rawData:p=null,linkToData:y=null}=(m==null?void 0:m.embeddingMetadata)??{},{predictionLabel:b=null,actualLabel:k=null}=(m==null?void 0:m.eventMetadata)??{},S=Do(g.id),v=a(S),w=r[g.id],L=o[w];return e("li",{children:e(To,{rawData:p,linkToData:y,inferencesName:v,group:w,onClick:()=>{t(g.id)},onMouseOver:()=>{d(g.id)},onMouseOut:()=>{d(null)},color:L,size:c,predictionLabel:b,actualLabel:k,promptAndResponse:g.promptAndResponse,documentText:g.documentText,autoPlay:!1})},f)})})})}function yc({data:n,onPointSelected:a}){const{primaryInferences:l,referenceInferences:t}=
|
|
563
|
+
`,children:l.map((g,f)=>{const m=i.get(g.id),{rawData:p=null,linkToData:y=null}=(m==null?void 0:m.embeddingMetadata)??{},{predictionLabel:b=null,actualLabel:k=null}=(m==null?void 0:m.eventMetadata)??{},S=Do(g.id),v=a(S),w=r[g.id],L=o[w];return e("li",{children:e(To,{rawData:p,linkToData:y,inferencesName:v,group:w,onClick:()=>{t(g.id)},onMouseOver:()=>{d(g.id)},onMouseOut:()=>{d(null)},color:L,size:c,predictionLabel:b,actualLabel:k,promptAndResponse:g.promptAndResponse,documentText:g.documentText,autoPlay:!1})},f)})})})}function yc({data:n,onPointSelected:a}){const{primaryInferences:l,referenceInferences:t}=Ve(),i=Q(f=>f.metric),[r,o]=u.useState([]),{columns:c,tableData:d}=u.useMemo(()=>{const f=n.filter(L=>L.id.includes("CORPUS")===!1);let m=!1,p=!1,y=!1,b=!1,k=!1;n.forEach(L=>{L.linkToData&&(m=!0),L.rawData&&(p=!0),(L.prompt||L.response)&&(y=!0),L.predictionLabel&&(b=!0),L.actualLabel&&(k=!0)});const S=[];t&&S.push({header:"Inference Set",accessorKey:"id",size:50,cell:({getValue:L})=>e(fc,{id:L(),primaryInferencesName:l.name,referenceInferencesName:(t==null?void 0:t.name)??"reference"})}),m&&S.push({header:"Link",accessorKey:"linkToData",cell:({getValue:L})=>{const A=L();if(typeof A=="string"){const x=A.split("/").pop();return e(je,{href:A,children:x})}return null}}),y?(S.push({header:"Prompt",accessorKey:"prompt",cell:me,size:200}),S.push({header:"Response",accessorKey:"response",cell:me,size:200})):p&&S.push({header:"Raw Data",accessorKey:"rawData"}),b&&S.push({header:"Prediction Label",accessorKey:"predictionLabel",size:50}),k&&S.push({header:"Actual Label",accessorKey:"actualLabel",size:50});const v=[];if(i&&i.type==="dataQuality"){const L=i.dimension.name;v.push({header:i.dimension.name,accessorKey:"metric",cell:Io,sortingFn:"basic"}),f.forEach(A=>{var T;const x=(T=A.dimensions.find(E=>E.dimension.name===L))==null?void 0:T.value;A.metric=x!=null?Number(x):null})}return{columns:[...S,...v,{header:"",id:"view-details",size:50,cell:({row:L})=>e(Lo,{"aria-label":"view point details",onClick:()=>{a(L.original.id)},children:"view details"})}],tableData:f}},[n,a,l,t,i]),g=he({columns:c,data:d,state:{sorting:r},getCoreRowModel:ke(),onSortingChange:o,getSortedRowModel:Rn()});return s("table",{css:We,children:[e("thead",{children:g.getHeaderGroups().map(f=>e("tr",{children:f.headers.map(m=>s("th",{children:[m.isPlaceholder?null:s("div",{className:m.column.getCanSort()?"cursor-pointer":"",onClick:m.column.getToggleSortingHandler(),children:[Z(m.column.columnDef.header,m.getContext()),m.column.getIsSorted()?e(P,{className:"sort-icon",svg:m.column.getIsSorted()==="asc"?e(I.ArrowDownFilled,{}):e(I.ArrowUpFilled,{})}):null]}),e("div",{onMouseDown:m.getResizeHandler(),onTouchStart:m.getResizeHandler(),className:`resizer ${m.column.getIsResizing()?"isResizing":""}`,style:{transform:m.column.getIsResizing()?`translateX(${g.getState().columnSizingInfo.deltaOffset}px)`:""}})]},m.id))},f.id))}),e("tbody",{children:g.getRowModel().rows.map(f=>e("tr",{children:f.getVisibleCells().map(m=>e("td",{style:{width:m.column.getSize()},children:Z(m.column.columnDef.cell,m.getContext())},m.id))},f.id))})]})}function fc({id:n,primaryInferencesName:a,referenceInferencesName:l}){const t=n.includes("PRIMARY"),i=Qd();return s(h,{direction:"row",gap:"size-100",alignItems:"center",children:[e(wo,{shape:Po.circle,color:i[t?0:1]}),t?a:l]})}const hc=C`
|
|
564
564
|
width: 100%;
|
|
565
565
|
height: 100%;
|
|
566
566
|
position: relative;
|
|
@@ -590,30 +590,30 @@ dataframe`,cc=C`
|
|
|
590
590
|
}
|
|
591
591
|
}
|
|
592
592
|
}
|
|
593
|
-
`;function kc({event:n,relevance:a}){return{id:n.eventMetadata.predictionId||"unknown id",text:n.documentText??"empty document",relevance:a}}function bc(){const n=Q(x=>x.selectedEventIds),a=Q(x=>x.setSelectedEventIds),l=Q(x=>x.setSelectedClusterId),t=Q(x=>x.selectionDisplay),[i,r]=Ke.useState(null),{primaryEventIds:o,referenceEventIds:c,corpusEventIds:d}=u.useMemo(()=>{const x=[],T=[],E=[];return n.forEach(R=>{R.includes("PRIMARY")?x.push(R):R.includes("CORPUS")?E.push(R):T.push(R)}),{primaryEventIds:x,referenceEventIds:T,corpusEventIds:E}},[n]),g=D.useLazyLoadQuery(
|
|
593
|
+
`;function kc({event:n,relevance:a}){return{id:n.eventMetadata.predictionId||"unknown id",text:n.documentText??"empty document",relevance:a}}function bc(){const n=Q(x=>x.selectedEventIds),a=Q(x=>x.setSelectedEventIds),l=Q(x=>x.setSelectedClusterId),t=Q(x=>x.selectionDisplay),[i,r]=Ke.useState(null),{primaryEventIds:o,referenceEventIds:c,corpusEventIds:d}=u.useMemo(()=>{const x=[],T=[],E=[];return n.forEach(R=>{R.includes("PRIMARY")?x.push(R):R.includes("CORPUS")?E.push(R):T.push(R)}),{primaryEventIds:x,referenceEventIds:T,corpusEventIds:E}},[n]),g=D.useLazyLoadQuery(wt,{primaryEventIds:[...o],referenceEventIds:[...c],corpusEventIds:[...d]}),f=u.useMemo(()=>{var R,j,ae,ie,be,Se;const x=((j=(R=g.model)==null?void 0:R.primaryInferences)==null?void 0:j.events)??[],T=((ie=(ae=g.model)==null?void 0:ae.referenceInferences)==null?void 0:ie.events)??[],E=((Se=(be=g.model)==null?void 0:be.corpusInferences)==null?void 0:Se.events)??[];return[...x,...T,...E]},[g]),m=()=>{a(new Set),l(null)},p=Q(x=>x.eventIdToDataMap),y=Q(x=>x.pointData),b=Q(x=>x.selectionSearchText),k=u.useMemo(()=>f.map(x=>{var R,j,ae,ie,be,Se,N;const T=p.get(x.id),E=[];return y!=null&&(T==null?void 0:T.retrievals)!=null&&T.retrievals.forEach(({documentId:z,relevance:_})=>{const $=y[z];$!=null&&E.push(kc({event:$,relevance:_}))}),{id:x.id,predictionId:((R=x.eventMetadata)==null?void 0:R.predictionId)??null,actualLabel:((j=x.eventMetadata)==null?void 0:j.actualLabel)??null,actualScore:((ae=x.eventMetadata)==null?void 0:ae.actualScore)??null,predictionLabel:((ie=x.eventMetadata)==null?void 0:ie.predictionLabel)??null,predictionScore:((be=x.eventMetadata)==null?void 0:be.predictionScore)??null,rawData:(T==null?void 0:T.embeddingMetadata.rawData)??null,linkToData:(T==null?void 0:T.embeddingMetadata.linkToData)??null,dimensions:x.dimensions,prompt:((Se=x.promptAndResponse)==null?void 0:Se.prompt)??null,response:((N=x.promptAndResponse)==null?void 0:N.response)??null,retrievedDocuments:E,documentText:x.documentText??null}}),[f,p,y]),S=u.useMemo(()=>{if(b){const x=b.toLowerCase();return k.filter(T=>{var E,R,j,ae;return T.id.includes(x)||((E=T.documentText)==null?void 0:E.toLowerCase().includes(x))||((R=T.predictionId)==null?void 0:R.includes(x))||((j=T.prompt)==null?void 0:j.toLowerCase().includes(x))||((ae=T.response)==null?void 0:ae.toLowerCase().includes(x))})}return k},[k,b]),v=u.useMemo(()=>{if(b){const x=b.toLowerCase();return f.filter(T=>{var E,R,j,ae,ie,be,Se;return T.id.includes(x)||((E=T.documentText)==null?void 0:E.toLowerCase().includes(x))||((j=(R=T.eventMetadata)==null?void 0:R.predictionId)==null?void 0:j.includes(x))||((ie=(ae=T.promptAndResponse)==null?void 0:ae.prompt)==null?void 0:ie.toLowerCase().includes(x))||((Se=(be=T.promptAndResponse)==null?void 0:be.response)==null?void 0:Se.toLowerCase().includes(x))})}return f},[f,b]),w=u.useMemo(()=>i?k.find(T=>T.id===i)??null:null,[k,i]),L=f.length,A=v.length;return s("section",{css:hc,children:[s("div",{role:"toolbar",css:C`
|
|
594
594
|
position: absolute;
|
|
595
595
|
top: var(--px-spacing-med);
|
|
596
596
|
right: var(--px-spacing-lg);
|
|
597
597
|
display: flex;
|
|
598
598
|
flex-direction: row-reverse;
|
|
599
599
|
gap: var(--px-spacing-med);
|
|
600
|
-
`,children:[e(M,{variant:"default",size:"compact",icon:e(P,{svg:e(so,{})}),"aria-label":"Clear selection",onClick:m}),e(mc,{})]}),e(Te,{children:s(J,{name:"Selection",children:[e(Sc,{numSelectedEvents:L,numMatchingEvents:A,searchText:b}),t===
|
|
600
|
+
`,children:[e(M,{variant:"default",size:"compact",icon:e(P,{svg:e(so,{})}),"aria-label":"Clear selection",onClick:m}),e(mc,{})]}),e(Te,{children:s(J,{name:"Selection",children:[e(Sc,{numSelectedEvents:L,numMatchingEvents:A,searchText:b}),t===Gl.list?e("div",{css:C`
|
|
601
601
|
flex: 1 1 auto;
|
|
602
602
|
overflow-y: auto;
|
|
603
|
-
`,children:e(yc,{data:S,onPointSelected:r})}):e(pc,{events:v,onItemSelected:r})]})}),e(W,{type:"slideOver",isDismissable:!0,onDismiss:()=>r(null),children:w&&e(
|
|
603
|
+
`,children:e(yc,{data:S,onPointSelected:r})}):e(pc,{events:v,onItemSelected:r})]})}),e(W,{type:"slideOver",isDismissable:!0,onDismiss:()=>r(null),children:w&&e(H,{title:"Embedding Details",size:"L",children:e(lc,{event:w})})})]})}function Sc({numSelectedEvents:n,numMatchingEvents:a,searchText:l}){const t=Q(g=>g.selectionDisplay),i=Q(g=>g.setSelectionDisplay),r=Q(g=>g.selectionGridSize),o=Q(g=>g.setSelectionGridSize),c=Q(g=>g.setSelectionSearchText),d=u.useMemo(()=>l?`${a}/${n} match "${l}"`:`${n} selected`,[n,a,l]);return e(Xa,{extra:s("div",{css:C`
|
|
604
604
|
display: flex;
|
|
605
605
|
flex-direction: row;
|
|
606
606
|
gap: var(--px-spacing-med);
|
|
607
|
-
`,children:[e(oo,{placeholder:"Search by text or ID",onChange:g=>{c(g)}}),t===
|
|
607
|
+
`,children:[e(oo,{placeholder:"Search by text or ID",onChange:g=>{c(g)}}),t===Gl.gallery&&e(Ao,{size:r,onChange:o}),e(_o,{mode:t,onChange:g=>{i(g)}})]}),children:e(K,{children:d})})}const Et=xt;function $y(){const{referenceInferences:n,corpusInferences:a}=Ve(),{timeRange:l}=He(),t=u.useMemo(()=>{let i={};return a!=null?i=Mo():n!=null?i=No():i=Vo(),i={...i,umapParameters:{...window.Config.UMAP}},i},[a,n]);return e(Wl,{initialTimestamp:l.end,children:e(zo,{...t,children:e(vc,{})})})}function vc(){const n=jd(),{primaryInferences:a,referenceInferences:l}=Ve(),t=Q(v=>v.umapParameters),i=Q(v=>v.getHDSCANParameters),r=Q(v=>v.getMetric),o=Q(v=>v.reset),c=Q(v=>v.setLoading),[d,g]=u.useState(!0),[f,m,p]=D.useQueryLoader(Et),{selectedTimestamp:y}=Sa(),b=u.useMemo(()=>y??new Date(a.endTime),[y,a.endTime]),k=u.useMemo(()=>({start:Ml(b,2).toISOString(),end:b.toISOString()}),[b]),S=D.useLazyLoadQuery(Kt,{});return u.useEffect(()=>{o(),c(!0);const v=r();return m({id:n,timeRange:k,...t,...i(),fetchDataQualityMetric:v.type==="dataQuality",fetchPerformanceMetric:v.type==="performance",dataQualityMetricColumnName:v.type==="dataQuality"?v.dimension.name:null,performanceMetric:v.type==="performance"?v.metric:"accuracyScore"},{fetchPolicy:"network-only"}),()=>{p()}},[c,o,n,m,p,t,i,r,k]),s("main",{css:C`
|
|
608
608
|
flex: 1 1 auto;
|
|
609
609
|
display: flex;
|
|
610
610
|
flex-direction: column;
|
|
611
611
|
overflow: hidden;
|
|
612
|
-
`,children:[e(Lc,{}),s(
|
|
612
|
+
`,children:[e(Lc,{}),s(Xa,{extra:s(h,{direction:"row",justifyContent:"center",alignItems:"center",gap:"size-100",children:[e(Mn,{onChange:v=>{g(v)},defaultSelected:!0,labelPlacement:"start",children:"Show Timeseries"}),e(Ud,{})]}),children:[e(Ql,{}),l?e(jl,{inferencesRole:"reference",timeRange:{start:new Date(l.startTime),end:new Date(l.endTime)}}):null,e(Wd,{model:S.model})]}),s(Xe,{direction:"vertical",children:[d?s(U,{children:[e(ue,{defaultSize:20,collapsible:!0,order:1,children:e(u.Suspense,{fallback:e(fe,{}),children:e(ec,{embeddingDimensionId:n})})}),e(Ye,{css:Kn})]}):null,e(ue,{order:2,children:e("div",{css:C`
|
|
613
613
|
width: 100%;
|
|
614
614
|
height: 100%;
|
|
615
615
|
position: relative;
|
|
616
|
-
`,children:e(u.Suspense,{fallback:e($o,{}),children:f?e(Fc,{queryReference:f}):null})})})]})]})}function Cc(n){if(n.__typename!=="Point3D")throw new Error(`Expected Point3D but got ${n.__typename} for coordinates`);return[n.x,n.y,n.z]}function Fc({queryReference:n}){const a=D.usePreloadedQuery(
|
|
616
|
+
`,children:e(u.Suspense,{fallback:e($o,{}),children:f?e(Fc,{queryReference:f}):null})})})]})]})}function Cc(n){if(n.__typename!=="Point3D")throw new Error(`Expected Point3D but got ${n.__typename} for coordinates`);return[n.x,n.y,n.z]}function Fc({queryReference:n}){const a=D.usePreloadedQuery(Et,n),l=u.useMemo(()=>{var g,f;return((f=(g=a.embedding)==null?void 0:g.UMAPPoints)==null?void 0:f.data)??[]},[a]),t=u.useMemo(()=>{var g,f;return((f=(g=a.embedding)==null?void 0:g.UMAPPoints)==null?void 0:f.referenceData)??[]},[a]),i=u.useMemo(()=>{var g,f;return((f=(g=a.embedding)==null?void 0:g.UMAPPoints)==null?void 0:f.corpusData)??[]},[a]),r=u.useMemo(()=>{var g,f;return((f=(g=a.embedding)==null?void 0:g.UMAPPoints)==null?void 0:f.contextRetrievals)??[]},[a]),o=u.useMemo(()=>[...l,...t,...i].map(f=>({...f,position:Cc(f.coordinates),metaData:{id:f.eventId}})),[t,l,i]),c=Q(g=>g.setInitialData),d=Q(g=>g.setClusters);return Ns(()=>{var f,m;const g=((m=(f=a.embedding)==null?void 0:f.UMAPPoints)==null?void 0:m.clusters)||[];c({points:o,clusters:g,retrievals:r})},[o,n,r,c,d]),e("div",{css:C`
|
|
617
617
|
flex: 1 1 auto;
|
|
618
618
|
display: flex;
|
|
619
619
|
flex-direction: row;
|
|
@@ -664,13 +664,13 @@ dataframe`,cc=C`
|
|
|
664
664
|
background-color: var(--ac-global-color-grey-75);
|
|
665
665
|
width: 100%;
|
|
666
666
|
height: 100%;
|
|
667
|
-
`,children:n.children})}const Dc=1,Tc=Ke.memo(function(){const{referenceInferences:a}=
|
|
667
|
+
`,children:n.children})}const Dc=1,Tc=Ke.memo(function(){const{referenceInferences:a}=Ve(),l=Q(m=>m.clusters),t=Q(m=>m.selectedClusterId),i=Q(m=>m.metric),r=Q(m=>m.setSelectedClusterId),o=Q(m=>m.setSelectedEventIds),c=Q(m=>m.setHighlightedClusterId),d=Q(m=>m.setClusterColorMode),g=a==null||i.type==="drift",f=u.useCallback(m=>{d(m===Dc?yl.highlight:yl.default)},[d]);return s(Te,{onChange:f,children:[e(J,{name:"Clusters",extra:e(Me,{children:l.length}),children:s(h,{direction:"column",height:"100%",children:[e(F,{borderBottomColor:"dark",borderBottomWidth:"thin",backgroundColor:"dark",flex:"none",padding:"size-50",children:e(h,{direction:"row",justifyContent:"end",children:e(qd,{})})}),e(F,{flex:"1 1 auto",overflow:"auto",children:e("ul",{css:m=>C`
|
|
668
668
|
flex: 1 1 auto;
|
|
669
669
|
display: flex;
|
|
670
670
|
flex-direction: column;
|
|
671
671
|
gap: ${m.spacing.margin8}px;
|
|
672
672
|
margin: ${m.spacing.margin8}px;
|
|
673
|
-
`,children:l.map(m=>e("li",{children:e(Eo,{clusterId:m.id,numPoints:m.eventIds.length,isSelected:t===m.id,driftRatio:m.driftRatio,primaryToCorpusRatio:m.primaryToCorpusRatio,primaryMetricValue:m.primaryMetricValue,referenceMetricValue:m.referenceMetricValue,metricName:Ic(i),hideReference:g,onClick:()=>{t!==m.id?(r(m.id),o(new Set(m.eventIds))):(r(null),o(new Set))},onMouseEnter:()=>{c(m.id)},onMouseLeave:()=>{c(null)}})},m.id))})})]})}),e(J,{name:"Configuration",children:e(F,{overflow:"auto",height:"100%",children:e(Ro,{})})})]})});function Ic(n){const{type:a,metric:l}=n;switch(a){case"dataQuality":return`${n.dimension.name} avg`;case"drift":{switch(l){case"euclideanDistance":return"Cluster Drift";default:Ce()}break}case"performance":return hn(l);case"retrieval":{switch(l){case"queryDistance":return"% Query";default:Ce()}break}default:Ce()}}function Lc(){const{notifyError:n}=
|
|
673
|
+
`,children:l.map(m=>e("li",{children:e(Eo,{clusterId:m.id,numPoints:m.eventIds.length,isSelected:t===m.id,driftRatio:m.driftRatio,primaryToCorpusRatio:m.primaryToCorpusRatio,primaryMetricValue:m.primaryMetricValue,referenceMetricValue:m.referenceMetricValue,metricName:Ic(i),hideReference:g,onClick:()=>{t!==m.id?(r(m.id),o(new Set(m.eventIds))):(r(null),o(new Set))},onMouseEnter:()=>{c(m.id)},onMouseLeave:()=>{c(null)}})},m.id))})})]})}),e(J,{name:"Configuration",children:e(F,{overflow:"auto",height:"100%",children:e(Ro,{})})})]})});function Ic(n){const{type:a,metric:l}=n;switch(a){case"dataQuality":return`${n.dimension.name} avg`;case"drift":{switch(l){case"euclideanDistance":return"Cluster Drift";default:Ce()}break}case"performance":return hn(l);case"retrieval":{switch(l){case"queryDistance":return"% Query";default:Ce()}break}default:Ce()}}function Lc(){const{notifyError:n}=ql(),a=Q(t=>t.errorMessage),l=Q(t=>t.setErrorMessage);return u.useEffect(()=>{a!==null&&n({title:"An error occurred",message:a,action:{text:"Dismiss",onClick:()=>{l(null)}}})},[a,n,l]),null}const Rt=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"id"}],a=[{kind:"Variable",name:"id",variableName:"id"}],l={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},t={alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null};return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"embeddingLoaderQuery",selections:[{alias:"embedding",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{kind:"InlineFragment",selections:[l,t],type:"EmbeddingDimension",abstractKey:null}],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"embeddingLoaderQuery",selections:[{alias:"embedding",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},{kind:"TypeDiscriminator",abstractKey:"__isNode"},l,{kind:"InlineFragment",selections:[t],type:"EmbeddingDimension",abstractKey:null}],storageKey:null}]},params:{cacheID:"cff0ac130f1ef79784f7bef4161ac60d",id:null,metadata:{},name:"embeddingLoaderQuery",operationKind:"query",text:`query embeddingLoaderQuery(
|
|
674
674
|
$id: GlobalID!
|
|
675
675
|
) {
|
|
676
676
|
embedding: node(id: $id) {
|
|
@@ -683,7 +683,7 @@ dataframe`,cc=C`
|
|
|
683
683
|
id
|
|
684
684
|
}
|
|
685
685
|
}
|
|
686
|
-
`}}}();
|
|
686
|
+
`}}}();Rt.hash="c049e57d92943f64b5e751e0daa89dc8";async function Oy(n){const{embeddingDimensionId:a}=n.params;return D.fetchQuery(xe,Rt,{id:a}).toPromise()}const Mt=function(){var n={defaultValue:null,kind:"LocalArgument",name:"dimensionId"},a={defaultValue:null,kind:"LocalArgument",name:"hasReference"},l={defaultValue:null,kind:"LocalArgument",name:"timeRange"},t=[{kind:"Variable",name:"id",variableName:"dimensionId"}],i={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},r={kind:"Variable",name:"timeRange",variableName:"timeRange"},o=[r],c=[{kind:"Variable",name:"hasReference",variableName:"hasReference"},r],d={alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},g=[{alias:null,args:null,kind:"ScalarField",name:"primaryValue",storageKey:null}],f={kind:"Literal",name:"metric",value:"cardinality"},m={kind:"Literal",name:"metric",value:"percentEmpty"},p={kind:"Literal",name:"inferencesRole",value:"reference"};return{fragment:{argumentDefinitions:[n,a,l],kind:"Fragment",metadata:null,name:"DimensionPageQuery",selections:[{alias:"dimension",args:t,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{kind:"InlineFragment",selections:[i,{args:o,kind:"FragmentSpread",name:"DimensionSegmentsBarChart_dimension"},{args:o,kind:"FragmentSpread",name:"DimensionCountStats_dimension"},{args:o,kind:"FragmentSpread",name:"DimensionDriftStats_dimension"},{args:c,kind:"FragmentSpread",name:"DimensionCardinalityStats_dimension"},{args:c,kind:"FragmentSpread",name:"DimensionPercentEmptyStats_dimension"},{args:o,kind:"FragmentSpread",name:"DimensionQuantilesStats_dimension"}],type:"Dimension",abstractKey:null}],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[n,l,a],kind:"Operation",name:"DimensionPageQuery",selections:[{alias:"dimension",args:t,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[d,{kind:"TypeDiscriminator",abstractKey:"__isNode"},i,{kind:"InlineFragment",selections:[{alias:null,args:[{kind:"Variable",name:"primaryTimeRange",variableName:"timeRange"}],concreteType:"Segments",kind:"LinkedField",name:"segmentsComparison",plural:!1,selections:[{alias:null,args:null,concreteType:"Segment",kind:"LinkedField",name:"segments",plural:!0,selections:[{alias:null,args:null,concreteType:null,kind:"LinkedField",name:"bin",plural:!1,selections:[d,{kind:"InlineFragment",selections:[{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null}],type:"NominalBin",abstractKey:null},{kind:"InlineFragment",selections:[{alias:null,args:null,concreteType:"NumericRange",kind:"LinkedField",name:"range",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"start",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"end",storageKey:null}],storageKey:null}],type:"IntervalBin",abstractKey:null}],storageKey:null},{alias:null,args:null,concreteType:"DatasetValues",kind:"LinkedField",name:"counts",plural:!1,selections:g,storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"DatasetValues",kind:"LinkedField",name:"totalCounts",plural:!1,selections:g,storageKey:null}],storageKey:null},{alias:"count",args:[{kind:"Literal",name:"metric",value:"count"},r],kind:"ScalarField",name:"dataQualityMetric",storageKey:null},{alias:"psi",args:[{kind:"Literal",name:"metric",value:"psi"},r],kind:"ScalarField",name:"driftMetric",storageKey:null},{alias:"cardinality",args:[f,r],kind:"ScalarField",name:"dataQualityMetric",storageKey:null},{alias:"percentEmpty",args:[m,r],kind:"ScalarField",name:"dataQualityMetric",storageKey:null},{alias:"p99",args:[{kind:"Literal",name:"metric",value:"p99"},r],kind:"ScalarField",name:"dataQualityMetric",storageKey:null},{alias:"p75",args:[{kind:"Literal",name:"metric",value:"p75"},r],kind:"ScalarField",name:"dataQualityMetric",storageKey:null},{alias:"p50",args:[{kind:"Literal",name:"metric",value:"p50"},r],kind:"ScalarField",name:"dataQualityMetric",storageKey:null},{alias:"p25",args:[{kind:"Literal",name:"metric",value:"p25"},r],kind:"ScalarField",name:"dataQualityMetric",storageKey:null},{alias:"p1",args:[{kind:"Literal",name:"metric",value:"p01"},r],kind:"ScalarField",name:"dataQualityMetric",storageKey:null},{condition:"hasReference",kind:"Condition",passingValue:!0,selections:[{alias:"referenceCardinality",args:[p,f],kind:"ScalarField",name:"dataQualityMetric",storageKey:'dataQualityMetric(inferencesRole:"reference",metric:"cardinality")'},{alias:"referencePercentEmpty",args:[p,m],kind:"ScalarField",name:"dataQualityMetric",storageKey:'dataQualityMetric(inferencesRole:"reference",metric:"percentEmpty")'}]}],type:"Dimension",abstractKey:null}],storageKey:null}]},params:{cacheID:"2ad937e56d4647309b9d78ac11f57265",id:null,metadata:{},name:"DimensionPageQuery",operationKind:"query",text:`query DimensionPageQuery(
|
|
687
687
|
$dimensionId: GlobalID!
|
|
688
688
|
$timeRange: TimeRange!
|
|
689
689
|
$hasReference: Boolean!
|
|
@@ -764,7 +764,7 @@ fragment DimensionSegmentsBarChart_dimension_3E0ZE6 on Dimension {
|
|
|
764
764
|
}
|
|
765
765
|
}
|
|
766
766
|
}
|
|
767
|
-
`}}}();
|
|
767
|
+
`}}}();Mt.hash="d194bfd656408e8ba7cb427ddc80fc85";const Nt=function(){var n={kind:"Literal",name:"metric",value:"cardinality"};return{argumentDefinitions:[{defaultValue:null,kind:"LocalArgument",name:"hasReference"},{defaultValue:null,kind:"LocalArgument",name:"timeRange"}],kind:"Fragment",metadata:null,name:"DimensionCardinalityStats_dimension",selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{alias:"cardinality",args:[n,{kind:"Variable",name:"timeRange",variableName:"timeRange"}],kind:"ScalarField",name:"dataQualityMetric",storageKey:null},{condition:"hasReference",kind:"Condition",passingValue:!0,selections:[{alias:"referenceCardinality",args:[{kind:"Literal",name:"inferencesRole",value:"reference"},n],kind:"ScalarField",name:"dataQualityMetric",storageKey:'dataQualityMetric(inferencesRole:"reference",metric:"cardinality")'}]}],type:"Dimension",abstractKey:null}}();Nt.hash="8b4edef350e4df49e799afa70ca34918";function Pc(n){const a=D.useFragment(Nt,n.dimension);return s(U,{children:[e(K,{elementType:"h3",textSize:"small",color:"text-700",children:"Cardinality"}),e(K,{textSize:"xlarge",children:bn(a.cardinality)}),a.referenceCardinality!=null&&e(K,{textSize:"medium",color:"designationPurple",children:bn(a.referenceCardinality)})]})}const Vt=function(){var n={defaultValue:null,kind:"LocalArgument",name:"dimensionId"},a={defaultValue:null,kind:"LocalArgument",name:"granularity"},l={defaultValue:null,kind:"LocalArgument",name:"timeRange"},t=[{kind:"Variable",name:"id",variableName:"dimensionId"}],i={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},r={kind:"InlineFragment",selections:[{alias:"cardinalityTimeSeries",args:[{kind:"Variable",name:"granularity",variableName:"granularity"},{kind:"Literal",name:"metric",value:"cardinality"},{kind:"Variable",name:"timeRange",variableName:"timeRange"}],concreteType:"DataQualityTimeSeries",kind:"LinkedField",name:"dataQualityTimeSeries",plural:!1,selections:[{alias:null,args:null,concreteType:"TimeSeriesDataPoint",kind:"LinkedField",name:"data",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"timestamp",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"value",storageKey:null}],storageKey:null}],storageKey:null}],type:"Dimension",abstractKey:null};return{fragment:{argumentDefinitions:[n,a,l],kind:"Fragment",metadata:null,name:"DimensionCardinalityTimeSeriesQuery",selections:[{alias:"dimension",args:t,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[i,r],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[n,l,a],kind:"Operation",name:"DimensionCardinalityTimeSeriesQuery",selections:[{alias:"dimension",args:t,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},i,r],storageKey:null}]},params:{cacheID:"f53e5ac5e0bfd6a0a6c50b761223a617",id:null,metadata:{},name:"DimensionCardinalityTimeSeriesQuery",operationKind:"query",text:`query DimensionCardinalityTimeSeriesQuery(
|
|
768
768
|
$dimensionId: GlobalID!
|
|
769
769
|
$timeRange: TimeRange!
|
|
770
770
|
$granularity: Granularity!
|
|
@@ -782,7 +782,7 @@ fragment DimensionSegmentsBarChart_dimension_3E0ZE6 on Dimension {
|
|
|
782
782
|
}
|
|
783
783
|
}
|
|
784
784
|
}
|
|
785
|
-
`}}}();
|
|
785
|
+
`}}}();Vt.hash="88ce04bb2022d5e2bc75c663abd7e5de";const da={top:25,right:18,left:18,bottom:5},wc=new Intl.NumberFormat([],{maximumFractionDigits:2}),zt=()=>{const{gray300:n}=Ge();return{color:n}};function Ac({active:n,payload:a,label:l}){var i;const{color:t}=zt();if(n&&a&&a.length){const r=((i=a[0])==null?void 0:i.value)??null,o=typeof r=="number"?wc.format(r):"--";return s(rn,{children:[e(K,{weight:"heavy",textSize:"medium",children:`${Qe(new Date(l))}`}),e(pe,{color:t,name:"Cardinality",value:o}),e(va,{})]})}return null}function _c({dimensionId:n}){var c;const{timeRange:a}=He(),l=$n(a),t=D.useLazyLoadQuery(Vt,{dimensionId:n,timeRange:{start:a.start.toISOString(),end:a.end.toISOString()},granularity:l}),{color:i}=zt(),r=((c=t.dimension.cardinalityTimeSeries)==null?void 0:c.data.map(d=>({timestamp:new Date(d.timestamp).valueOf(),value:d.value})))||[],o=On({samplingIntervalMinutes:l.samplingIntervalMinutes});return e(sn,{width:"100%",height:"100%",children:s(ra,{data:r,margin:da,syncId:"dimensionDetails",children:[e("defs",{children:s("linearGradient",{id:"cardinalityColorUv",x1:"0",y1:"0",x2:"0",y2:"1",children:[e("stop",{offset:"5%",stopColor:i,stopOpacity:.8}),e("stop",{offset:"95%",stopColor:i,stopOpacity:0})]})}),e(on,{...Qn,tickFormatter:d=>o(new Date(d))}),e(Ne,{stroke:ge.colors.gray200,label:{value:"Cardinality",angle:-90,position:"insideLeft",style:{textAnchor:"middle",fill:"var(--ac-global-text-color-900)"}},style:{fill:"var(--ac-global-text-color-700)"}}),e(dn,{strokeDasharray:"4 4",stroke:ge.colors.gray200,strokeOpacity:.5}),e(cn,{content:e(Ac,{})}),e(Yn,{type:"monotone",dataKey:"value",stroke:i,fillOpacity:1,fill:"url(#cardinalityColorUv)"})]})})}const $t={argumentDefinitions:[{defaultValue:null,kind:"LocalArgument",name:"timeRange"}],kind:"Fragment",metadata:null,name:"DimensionCountStats_dimension",selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{alias:"count",args:[{kind:"Literal",name:"metric",value:"count"},{kind:"Variable",name:"timeRange",variableName:"timeRange"}],kind:"ScalarField",name:"dataQualityMetric",storageKey:null}],type:"Dimension",abstractKey:null};$t.hash="6dccac51f3fb0853276677c692af5a43";function Ec(n){const l=D.useFragment($t,n.dimension).count??0;return s(U,{children:[e(K,{elementType:"h3",textSize:"small",color:"text-700",children:"Total Count"}),e(K,{textSize:"xlarge",children:bn(l)})]})}const Ot=function(){var n={defaultValue:null,kind:"LocalArgument",name:"countGranularity"},a={defaultValue:null,kind:"LocalArgument",name:"dimensionId"},l={defaultValue:null,kind:"LocalArgument",name:"timeRange"},t=[{kind:"Variable",name:"id",variableName:"dimensionId"}],i={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},r={kind:"InlineFragment",selections:[{alias:"trafficTimeSeries",args:[{kind:"Variable",name:"granularity",variableName:"countGranularity"},{kind:"Literal",name:"metric",value:"count"},{kind:"Variable",name:"timeRange",variableName:"timeRange"}],concreteType:"DataQualityTimeSeries",kind:"LinkedField",name:"dataQualityTimeSeries",plural:!1,selections:[{alias:null,args:null,concreteType:"TimeSeriesDataPoint",kind:"LinkedField",name:"data",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"timestamp",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"value",storageKey:null}],storageKey:null}],storageKey:null}],type:"Dimension",abstractKey:null};return{fragment:{argumentDefinitions:[n,a,l],kind:"Fragment",metadata:null,name:"DimensionCountTimeSeriesQuery",selections:[{alias:"embedding",args:t,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[i,r],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[a,l,n],kind:"Operation",name:"DimensionCountTimeSeriesQuery",selections:[{alias:"embedding",args:t,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},i,r],storageKey:null}]},params:{cacheID:"1f9eff6d8d453148844edae32b844df7",id:null,metadata:{},name:"DimensionCountTimeSeriesQuery",operationKind:"query",text:`query DimensionCountTimeSeriesQuery(
|
|
786
786
|
$dimensionId: GlobalID!
|
|
787
787
|
$timeRange: TimeRange!
|
|
788
788
|
$countGranularity: Granularity!
|
|
@@ -800,7 +800,7 @@ fragment DimensionSegmentsBarChart_dimension_3E0ZE6 on Dimension {
|
|
|
800
800
|
}
|
|
801
801
|
}
|
|
802
802
|
}
|
|
803
|
-
`}}}()
|
|
803
|
+
`}}}();Ot.hash="9677ef7c6b298554824fe3fd3904c7aa";const Rc=new Intl.NumberFormat([],{maximumFractionDigits:2}),Qt=()=>{const{gray300:n}=Ge();return{barColor:n}};function Mc({active:n,payload:a,label:l}){var i;const{barColor:t}=Qt();if(n&&a&&a.length){const r=((i=a[0])==null?void 0:i.value)??null,o=typeof r=="number"?Rc.format(r):"--";return s(rn,{children:[e(K,{weight:"heavy",textSize:"medium",children:`${Qe(new Date(l))}`}),e(pe,{color:t,shape:"square",name:"Count",value:o})]})}return null}function Nc({dimensionId:n}){var d;const{timeRange:a}=He(),l=$n(a),r=(((d=D.useLazyLoadQuery(Ot,{dimensionId:n,timeRange:{start:a.start.toISOString(),end:a.end.toISOString()},countGranularity:l}).embedding.trafficTimeSeries)==null?void 0:d.data)||[]).map(g=>({...g,timestamp:new Date(g.timestamp).valueOf()})),o=On({samplingIntervalMinutes:l.samplingIntervalMinutes}),{barColor:c}=Qt();return e(sn,{width:"100%",height:"100%",children:s(rl,{data:r,margin:da,syncId:"dimensionDetails",children:[e("defs",{children:s("linearGradient",{id:"countBarColor",x1:"0",y1:"0",x2:"0",y2:"1",children:[e("stop",{offset:"5%",stopColor:c,stopOpacity:1}),e("stop",{offset:"95%",stopColor:c,stopOpacity:.5})]})}),e(on,{...Qn,tickFormatter:g=>o(new Date(g))}),e(Ne,{stroke:ge.colors.gray200,label:{value:"Count",angle:-90,position:"insideLeft",style:{textAnchor:"middle",fill:"var(--ac-global-text-color-900)"}},style:{fill:"var(--ac-global-text-color-700)"}}),e(dn,{strokeDasharray:"4 4",stroke:ge.colors.gray200,strokeOpacity:.5}),e(cn,{...el,content:e(Mc,{})}),e(En,{dataKey:"value",fill:"url(#countBarColor)",spacing:5})]})})}const jt=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"dimensionId"},{defaultValue:null,kind:"LocalArgument",name:"timeRange"}],a=[{kind:"Variable",name:"id",variableName:"dimensionId"}],l={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},t=[{kind:"Variable",name:"primaryTimeRange",variableName:"timeRange"}],i={alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},r={alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},o={alias:null,args:null,concreteType:"NumericRange",kind:"LinkedField",name:"range",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"start",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"end",storageKey:null}],storageKey:null},c=[{alias:null,args:null,kind:"ScalarField",name:"primaryValue",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"referenceValue",storageKey:null}],d={alias:null,args:null,concreteType:"DatasetValues",kind:"LinkedField",name:"counts",plural:!1,selections:c,storageKey:null},g={alias:null,args:null,concreteType:"DatasetValues",kind:"LinkedField",name:"totalCounts",plural:!1,selections:c,storageKey:null};return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"DimensionDriftBreakdownSegmentBarChartQuery",selections:[{alias:"dimension",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[l,{kind:"InlineFragment",selections:[{kind:"RequiredField",field:{alias:null,args:t,concreteType:"Segments",kind:"LinkedField",name:"segmentsComparison",plural:!1,selections:[{alias:null,args:null,concreteType:"Segment",kind:"LinkedField",name:"segments",plural:!0,selections:[{alias:null,args:null,concreteType:null,kind:"LinkedField",name:"bin",plural:!1,selections:[{kind:"InlineFragment",selections:[i,r],type:"NominalBin",abstractKey:null},{kind:"InlineFragment",selections:[i,o],type:"IntervalBin",abstractKey:null},{kind:"InlineFragment",selections:[i],type:"MissingValueBin",abstractKey:null}],storageKey:null},d],storageKey:null},g],storageKey:null},action:"THROW",path:"dimension.segmentsComparison"}],type:"Dimension",abstractKey:null}],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"DimensionDriftBreakdownSegmentBarChartQuery",selections:[{alias:"dimension",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[i,l,{kind:"InlineFragment",selections:[{alias:null,args:t,concreteType:"Segments",kind:"LinkedField",name:"segmentsComparison",plural:!1,selections:[{alias:null,args:null,concreteType:"Segment",kind:"LinkedField",name:"segments",plural:!0,selections:[{alias:null,args:null,concreteType:null,kind:"LinkedField",name:"bin",plural:!1,selections:[i,{kind:"InlineFragment",selections:[r],type:"NominalBin",abstractKey:null},{kind:"InlineFragment",selections:[o],type:"IntervalBin",abstractKey:null}],storageKey:null},d],storageKey:null},g],storageKey:null}],type:"Dimension",abstractKey:null}],storageKey:null}]},params:{cacheID:"7d11d88f419003f5ee8cd9d11312e427",id:null,metadata:{},name:"DimensionDriftBreakdownSegmentBarChartQuery",operationKind:"query",text:`query DimensionDriftBreakdownSegmentBarChartQuery(
|
|
804
804
|
$dimensionId: GlobalID!
|
|
805
805
|
$timeRange: TimeRange!
|
|
806
806
|
) {
|
|
@@ -840,7 +840,7 @@ fragment DimensionSegmentsBarChart_dimension_3E0ZE6 on Dimension {
|
|
|
840
840
|
}
|
|
841
841
|
}
|
|
842
842
|
}
|
|
843
|
-
`}}}();
|
|
843
|
+
`}}}();jt.hash="6bb76e3cce4ee28c333e485b3aa2dffd";const Sl=Ga(".2f"),qt=()=>{const{primary:n,reference:a}=Ge();return{primaryBarColor:n,referenceBarColor:a}};function Vc({active:n,payload:a,label:l}){var r,o,c,d,g,f;const{primaryBarColor:t,referenceBarColor:i}=qt();if(n&&a&&a.length){const m=(o=(r=a[0])==null?void 0:r.payload)==null?void 0:o.primaryName,p=(c=a[0])==null?void 0:c.value,y=(g=(d=a[0])==null?void 0:d.payload)==null?void 0:g.referenceName,b=(f=a[1])==null?void 0:f.value;return s(rn,{children:[e(K,{elementType:"h3",textSize:"medium",weight:"heavy",children:l}),e(pe,{color:t,shape:"square",name:m,value:p!=null?`${Sl(p)}%`:"--"}),e(pe,{color:i,shape:"square",name:y,value:b!=null?`${Sl(b)}%`:"--"})]})}return null}function zc(n){var p,y,b,k,S;const{primaryInferences:a,referenceInferences:l}=Ve(),t=a.name,i=(l==null?void 0:l.name)||"reference",{selectedTimestamp:r}=Sa(),o=u.useMemo(()=>r??new Date(a.endTime),[r,a.endTime]),c=u.useMemo(()=>({start:Ml(o,2).toISOString(),end:o.toISOString()}),[o]),d=D.useLazyLoadQuery(jt,{dimensionId:n.dimensionId,timeRange:c}),g=u.useMemo(()=>{var A,x,T,E,R;const v=((A=d.dimension.segmentsComparison)==null?void 0:A.segments)??[],w=((T=(x=d.dimension.segmentsComparison)==null?void 0:x.totalCounts)==null?void 0:T.primaryValue)??0,L=((R=(E=d.dimension.segmentsComparison)==null?void 0:E.totalCounts)==null?void 0:R.referenceValue)??0;return v.map(j=>{var z,_;const ae=((z=j.counts)==null?void 0:z.primaryValue)??0,ie=((_=j.counts)==null?void 0:_.referenceValue)??0,be=Jl(j.bin),Se=ae/w*100,N=ie/L*100;return{name:be,primaryName:t,referenceName:i,primaryPercent:Se,referencePercent:N}})},[(p=d.dimension.segmentsComparison)==null?void 0:p.segments,(b=(y=d.dimension.segmentsComparison)==null?void 0:y.totalCounts)==null?void 0:b.primaryValue,(S=(k=d.dimension.segmentsComparison)==null?void 0:k.totalCounts)==null?void 0:S.referenceValue,t,i]),{primaryBarColor:f,referenceBarColor:m}=qt();return s(h,{direction:"column",height:"100%",children:[e(F,{flex:"none",paddingTop:"size-100",paddingStart:"size-200",children:e(K,{elementType:"h3",textSize:"medium",color:"text-700",children:`Distribution comparison at ${Qe(new Date(c.end))}`})}),e(F,{flex:!0,children:e(sn,{children:s(rl,{data:g,margin:{top:15,right:18,left:18,bottom:5},children:[s("defs",{children:[s("linearGradient",{id:"dimensionPrimarySegmentsBarColor",x1:"0",y1:"0",x2:"0",y2:"1",children:[e("stop",{offset:"5%",stopColor:f,stopOpacity:1}),e("stop",{offset:"95%",stopColor:f,stopOpacity:.5})]}),s("linearGradient",{id:"dimensionReferenceSegmentsBarColor",x1:"0",y1:"0",x2:"0",y2:"1",children:[e("stop",{offset:"5%",stopColor:m,stopOpacity:1}),e("stop",{offset:"95%",stopColor:m,stopOpacity:.5})]})]}),e(on,{dataKey:"name",style:{fill:"var(--ac-global-text-color-700)"}}),e(Ne,{stroke:ge.colors.gray200,label:{value:"Percent",angle:-90,position:"insideLeft",style:{textAnchor:"middle",fill:"var(--ac-global-text-color-900)"}},style:{fill:"var(--ac-global-text-color-700)"}}),e(dn,{strokeDasharray:"4 4",stroke:ge.colors.gray200,strokeOpacity:.5}),e(cn,{...el,content:e(Vc,{})}),e(En,{dataKey:"primaryPercent",fill:"url(#dimensionPrimarySegmentsBarColor)"}),e(En,{dataKey:"referencePercent",fill:"url(#dimensionReferenceSegmentsBarColor)"})]})})})]})}const Ut={argumentDefinitions:[{defaultValue:null,kind:"LocalArgument",name:"timeRange"}],kind:"Fragment",metadata:null,name:"DimensionDriftStats_dimension",selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{alias:"psi",args:[{kind:"Literal",name:"metric",value:"psi"},{kind:"Variable",name:"timeRange",variableName:"timeRange"}],kind:"ScalarField",name:"driftMetric",storageKey:null}],type:"Dimension",abstractKey:null};Ut.hash="f8a9fb08a14f63906e38bc247d50b189";const $c=s(Vn,{variant:"info",placement:"top end",children:[e(re,{weight:"heavy",level:4,children:"Population Stability Index"}),e(Fn,{children:e(K,{children:"PSI is a symmetric metric that measures the relative entropy, or difference in information represented by two distributions. It can be thought of as measuring the distance between two data distributions showing how different the two distributions are from each other."})}),e("footer",{children:e(je,{href:"https://arize.com/blog-course/population-stability-index-psi/#:~:text=Population%20Stability%20Index%20(PSI)%20Overview,distributions%20are%20from%20each%20other.",children:"Learn more"})})]});function Oc(n){const a=D.useFragment(Ut,n.dimension);return s(U,{children:[s(h,{direction:"row",alignItems:"center",gap:"size-25",children:[e(K,{elementType:"h3",textSize:"small",color:"text-700",children:"PSI"}),$c]}),e(K,{textSize:"xlarge",children:wn(a.psi)})]})}const Bt=function(){var n={defaultValue:null,kind:"LocalArgument",name:"countGranularity"},a={defaultValue:null,kind:"LocalArgument",name:"dimensionId"},l={defaultValue:null,kind:"LocalArgument",name:"driftGranularity"},t={defaultValue:null,kind:"LocalArgument",name:"timeRange"},i=[{kind:"Variable",name:"id",variableName:"dimensionId"}],r={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},o={kind:"Variable",name:"timeRange",variableName:"timeRange"},c=[{alias:null,args:null,concreteType:"TimeSeriesDataPoint",kind:"LinkedField",name:"data",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"timestamp",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"value",storageKey:null}],storageKey:null}],d={kind:"InlineFragment",selections:[{alias:null,args:[{kind:"Variable",name:"granularity",variableName:"driftGranularity"},{kind:"Literal",name:"metric",value:"psi"},o],concreteType:"DriftTimeSeries",kind:"LinkedField",name:"driftTimeSeries",plural:!1,selections:c,storageKey:null},{alias:"trafficTimeSeries",args:[{kind:"Variable",name:"granularity",variableName:"countGranularity"},{kind:"Literal",name:"metric",value:"count"},o],concreteType:"DataQualityTimeSeries",kind:"LinkedField",name:"dataQualityTimeSeries",plural:!1,selections:c,storageKey:null}],type:"Dimension",abstractKey:null};return{fragment:{argumentDefinitions:[n,a,l,t],kind:"Fragment",metadata:null,name:"DimensionDriftTimeSeriesQuery",selections:[{alias:"embedding",args:i,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[r,d],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[a,t,l,n],kind:"Operation",name:"DimensionDriftTimeSeriesQuery",selections:[{alias:"embedding",args:i,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},r,d],storageKey:null}]},params:{cacheID:"af2d25e28675891b3c8a6bc75027f731",id:null,metadata:{},name:"DimensionDriftTimeSeriesQuery",operationKind:"query",text:`query DimensionDriftTimeSeriesQuery(
|
|
844
844
|
$dimensionId: GlobalID!
|
|
845
845
|
$timeRange: TimeRange!
|
|
846
846
|
$driftGranularity: Granularity!
|
|
@@ -865,7 +865,7 @@ fragment DimensionSegmentsBarChart_dimension_3E0ZE6 on Dimension {
|
|
|
865
865
|
}
|
|
866
866
|
}
|
|
867
867
|
}
|
|
868
|
-
`}}}();
|
|
868
|
+
`}}}();Bt.hash="6312b58dbb252b17efdf08d44dd58630";const Ht=()=>{const{orange300:n,gray300:a}=Ge();return{color:n,barColor:a}};function Qc({active:n,payload:a,label:l}){var i;const{color:t}=Ht();if(n&&a&&a.length){const r=((i=a[1])==null?void 0:i.value)??null;return s(rn,{children:[e(K,{weight:"heavy",textSize:"medium",children:`${Qe(new Date(l))}`}),e(pe,{color:t,name:"PSI",value:wn(r)}),e(va,{}),s("div",{css:C`
|
|
869
869
|
display: flex;
|
|
870
870
|
flex-direction: row;
|
|
871
871
|
align-items: center;
|
|
@@ -873,7 +873,7 @@ fragment DimensionSegmentsBarChart_dimension_3E0ZE6 on Dimension {
|
|
|
873
873
|
gap: var(--px-spacing-sm);
|
|
874
874
|
|
|
875
875
|
margin-top: var(--px-spacing-sm);
|
|
876
|
-
`,children:[e(P,{svg:e(
|
|
876
|
+
`,children:[e(P,{svg:e(Nl,{})}),e("span",{children:"Click to view details"})]})]})}return null}function jc({dimensionId:n}){var y,b;const{timeRange:a}=He(),{selectedTimestamp:l,setSelectedTimestamp:t}=Sa(),i=$n(a),r=D.useLazyLoadQuery(Bt,{dimensionId:n,timeRange:{start:a.start.toISOString(),end:a.end.toISOString()},driftGranularity:Ul(a),countGranularity:i}),o=((y=r.embedding.driftTimeSeries)==null?void 0:y.data)||[],c=((b=r.embedding.trafficTimeSeries)==null?void 0:b.data.reduce((k,S)=>(k[S.timestamp]=S.value,k),{}))??{},d=o.map(k=>{const S=c[k.timestamp];return{...k,traffic:S,timestamp:new Date(k.timestamp).valueOf()}}),g=On({samplingIntervalMinutes:i.samplingIntervalMinutes}),f=u.useCallback(k=>{const{activePayload:S}=k;if(S!=null&&S.length>0){const v=S[0].payload;t(new Date(v.timestamp))}},[t]),{color:m,barColor:p}=Ht();return e(sn,{width:"100%",height:"100%",children:s(ra,{data:d,margin:da,onClick:f,syncId:"dimensionDetails",children:[s("defs",{children:[s("linearGradient",{id:"dimensionDriftColorUv",x1:"0",y1:"0",x2:"0",y2:"1",children:[e("stop",{offset:"5%",stopColor:m,stopOpacity:.8}),e("stop",{offset:"95%",stopColor:m,stopOpacity:0})]}),s("linearGradient",{id:"barColor",x1:"0",y1:"0",x2:"0",y2:"1",children:[e("stop",{offset:"5%",stopColor:p,stopOpacity:.8}),e("stop",{offset:"95%",stopColor:p,stopOpacity:0})]})]}),e(on,{...Qn,tickFormatter:k=>g(new Date(k))}),e(Ne,{stroke:ge.colors.gray200,label:{value:"PSI",angle:-90,position:"insideLeft",style:{textAnchor:"middle",fill:"var(--ac-global-text-color-900)"}},style:{fill:"var(--ac-global-text-color-700)"}}),e(Ne,{yAxisId:"right",orientation:"right",tick:!1,tickLine:!1,width:0}),e(dn,{strokeDasharray:"4 4",stroke:ge.colors.gray200,strokeOpacity:.5}),e(cn,{content:e(Qc,{})}),e(En,{yAxisId:"right",dataKey:"traffic",fill:"url(#barColor)",spacing:5}),e(Yn,{type:"monotone",dataKey:"value",stroke:m,fillOpacity:1,fill:"url(#dimensionDriftColorUv)"}),l!=null?e(pt,{...Bl,x:l.getTime()}):null]})})}const Gt=function(){var n={kind:"Literal",name:"metric",value:"percentEmpty"};return{argumentDefinitions:[{defaultValue:null,kind:"LocalArgument",name:"hasReference"},{defaultValue:null,kind:"LocalArgument",name:"timeRange"}],kind:"Fragment",metadata:null,name:"DimensionPercentEmptyStats_dimension",selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{alias:"percentEmpty",args:[n,{kind:"Variable",name:"timeRange",variableName:"timeRange"}],kind:"ScalarField",name:"dataQualityMetric",storageKey:null},{condition:"hasReference",kind:"Condition",passingValue:!0,selections:[{alias:"referencePercentEmpty",args:[{kind:"Literal",name:"inferencesRole",value:"reference"},n],kind:"ScalarField",name:"dataQualityMetric",storageKey:'dataQualityMetric(inferencesRole:"reference",metric:"percentEmpty")'}]}],type:"Dimension",abstractKey:null}}();Gt.hash="1e10d0449d6607d9292f355548c41c78";function qc(n){const a=D.useFragment(Gt,n.dimension);return s(U,{children:[e(K,{elementType:"h3",textSize:"small",color:"text-700",children:"% Empty"}),e(K,{textSize:"xlarge",children:Qa(a.percentEmpty)}),a.referencePercentEmpty!=null&&e(K,{textSize:"medium",color:"designationPurple",children:Qa(a.referencePercentEmpty)})]})}const Wt=function(){var n={defaultValue:null,kind:"LocalArgument",name:"dimensionId"},a={defaultValue:null,kind:"LocalArgument",name:"granularity"},l={defaultValue:null,kind:"LocalArgument",name:"timeRange"},t=[{kind:"Variable",name:"id",variableName:"dimensionId"}],i={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},r={kind:"InlineFragment",selections:[{alias:"percentEmptyTimeSeries",args:[{kind:"Variable",name:"granularity",variableName:"granularity"},{kind:"Literal",name:"metric",value:"percentEmpty"},{kind:"Variable",name:"timeRange",variableName:"timeRange"}],concreteType:"DataQualityTimeSeries",kind:"LinkedField",name:"dataQualityTimeSeries",plural:!1,selections:[{alias:null,args:null,concreteType:"TimeSeriesDataPoint",kind:"LinkedField",name:"data",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"timestamp",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"value",storageKey:null}],storageKey:null}],storageKey:null}],type:"Dimension",abstractKey:null};return{fragment:{argumentDefinitions:[n,a,l],kind:"Fragment",metadata:null,name:"DimensionPercentEmptyTimeSeriesQuery",selections:[{alias:"embedding",args:t,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[i,r],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[n,l,a],kind:"Operation",name:"DimensionPercentEmptyTimeSeriesQuery",selections:[{alias:"embedding",args:t,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},i,r],storageKey:null}]},params:{cacheID:"9be05c72f19755036f4829777a96f97d",id:null,metadata:{},name:"DimensionPercentEmptyTimeSeriesQuery",operationKind:"query",text:`query DimensionPercentEmptyTimeSeriesQuery(
|
|
877
877
|
$dimensionId: GlobalID!
|
|
878
878
|
$timeRange: TimeRange!
|
|
879
879
|
$granularity: Granularity!
|
|
@@ -891,7 +891,7 @@ fragment DimensionSegmentsBarChart_dimension_3E0ZE6 on Dimension {
|
|
|
891
891
|
}
|
|
892
892
|
}
|
|
893
893
|
}
|
|
894
|
-
`}}}();
|
|
894
|
+
`}}}();Wt.hash="1e843d6c8dbe05b389b24188c6bdb394";const Uc=new Intl.NumberFormat([],{maximumFractionDigits:2}),Jt=()=>{const{gray100:n}=Ge();return{color:n}};function Bc({active:n,payload:a,label:l}){var i;const{color:t}=Jt();if(n&&a&&a.length){const r=((i=a[0])==null?void 0:i.value)??null,o=typeof r=="number"?Uc.format(r):"--";return s(rn,{children:[e(K,{weight:"heavy",textSize:"medium",children:`${Qe(new Date(l))}`}),e(pe,{color:t,name:"% Empty",value:o})]})}return null}function Hc({dimensionId:n}){var c;const{timeRange:a}=He(),l=$n(a),i=((c=D.useLazyLoadQuery(Wt,{dimensionId:n,timeRange:{start:a.start.toISOString(),end:a.end.toISOString()},granularity:l}).embedding.percentEmptyTimeSeries)==null?void 0:c.data.map(d=>({timestamp:new Date(d.timestamp).valueOf(),value:d.value})))||[],r=On({samplingIntervalMinutes:l.samplingIntervalMinutes}),{color:o}=Jt();return e(sn,{width:"100%",height:"100%",children:s(ra,{data:i,margin:da,syncId:"dimensionDetails",children:[e("defs",{children:s("linearGradient",{id:"percentEmptyColorUv",x1:"0",y1:"0",x2:"0",y2:"1",children:[e("stop",{offset:"5%",stopColor:o,stopOpacity:.8}),e("stop",{offset:"95%",stopColor:o,stopOpacity:0})]})}),e(on,{...Qn,tickFormatter:d=>r(new Date(d))}),e(Ne,{stroke:ge.colors.gray200,label:{value:"% Empty",angle:-90,position:"insideLeft",style:{textAnchor:"middle",fill:"var(--ac-global-text-color-900)"}},style:{fill:"var(--ac-global-text-color-700)"}}),e(dn,{strokeDasharray:"4 4",stroke:ge.colors.gray200,strokeOpacity:.5}),e(cn,{content:e(Bc,{})}),e(yt,{type:"monotone",dataKey:"value",stroke:o,fillOpacity:1,fill:"url(#percentEmptyColorUv)"})]})})}const Zt=function(){var n={kind:"Variable",name:"timeRange",variableName:"timeRange"};return{argumentDefinitions:[{defaultValue:null,kind:"LocalArgument",name:"timeRange"}],kind:"Fragment",metadata:null,name:"DimensionQuantilesStats_dimension",selections:[{alias:"p99",args:[{kind:"Literal",name:"metric",value:"p99"},n],kind:"ScalarField",name:"dataQualityMetric",storageKey:null},{alias:"p75",args:[{kind:"Literal",name:"metric",value:"p75"},n],kind:"ScalarField",name:"dataQualityMetric",storageKey:null},{alias:"p50",args:[{kind:"Literal",name:"metric",value:"p50"},n],kind:"ScalarField",name:"dataQualityMetric",storageKey:null},{alias:"p25",args:[{kind:"Literal",name:"metric",value:"p25"},n],kind:"ScalarField",name:"dataQualityMetric",storageKey:null},{alias:"p1",args:[{kind:"Literal",name:"metric",value:"p01"},n],kind:"ScalarField",name:"dataQualityMetric",storageKey:null}],type:"Dimension",abstractKey:null}}();Zt.hash="c306c8eafb1d34be464d3a658d5f94a7";function Gc(n){const a=D.useFragment(Zt,n.dimension);return e("ul",{css:C`
|
|
895
895
|
display: flex;
|
|
896
896
|
flex-direction: column;
|
|
897
897
|
gap: var(--px-spacing-sm);
|
|
@@ -899,7 +899,7 @@ fragment DimensionSegmentsBarChart_dimension_3E0ZE6 on Dimension {
|
|
|
899
899
|
display: flex;
|
|
900
900
|
flex-direction: column;
|
|
901
901
|
align-items: flex-end;
|
|
902
|
-
`,children:[e(K,{elementType:"h3",textSize:"xsmall",color:"text-700",children:l}),e(K,{textSize:"medium","data-raw":t,children:
|
|
902
|
+
`,children:[e(K,{elementType:"h3",textSize:"xsmall",color:"text-700",children:l}),e(K,{textSize:"medium","data-raw":t,children:Ya(t)})]},l)})})}const Xt=function(){var n={defaultValue:null,kind:"LocalArgument",name:"dimensionId"},a={defaultValue:null,kind:"LocalArgument",name:"granularity"},l={defaultValue:null,kind:"LocalArgument",name:"timeRange"},t=[{kind:"Variable",name:"id",variableName:"dimensionId"}],i={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},r={kind:"Variable",name:"granularity",variableName:"granularity"},o={kind:"Variable",name:"timeRange",variableName:"timeRange"},c=[{alias:null,args:null,concreteType:"TimeSeriesDataPoint",kind:"LinkedField",name:"data",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"timestamp",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"value",storageKey:null}],storageKey:null}],d={kind:"InlineFragment",selections:[{alias:"p99TimeSeries",args:[r,{kind:"Literal",name:"metric",value:"p99"},o],concreteType:"DataQualityTimeSeries",kind:"LinkedField",name:"dataQualityTimeSeries",plural:!1,selections:c,storageKey:null},{alias:"p75TimeSeries",args:[r,{kind:"Literal",name:"metric",value:"p75"},o],concreteType:"DataQualityTimeSeries",kind:"LinkedField",name:"dataQualityTimeSeries",plural:!1,selections:c,storageKey:null},{alias:"p50TimeSeries",args:[r,{kind:"Literal",name:"metric",value:"p50"},o],concreteType:"DataQualityTimeSeries",kind:"LinkedField",name:"dataQualityTimeSeries",plural:!1,selections:c,storageKey:null},{alias:"p25TimeSeries",args:[r,{kind:"Literal",name:"metric",value:"p25"},o],concreteType:"DataQualityTimeSeries",kind:"LinkedField",name:"dataQualityTimeSeries",plural:!1,selections:c,storageKey:null},{alias:"p01TimeSeries",args:[r,{kind:"Literal",name:"metric",value:"p01"},o],concreteType:"DataQualityTimeSeries",kind:"LinkedField",name:"dataQualityTimeSeries",plural:!1,selections:c,storageKey:null}],type:"Dimension",abstractKey:null};return{fragment:{argumentDefinitions:[n,a,l],kind:"Fragment",metadata:null,name:"DimensionQuantilesTimeSeriesQuery",selections:[{alias:"dimension",args:t,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[i,d],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[n,l,a],kind:"Operation",name:"DimensionQuantilesTimeSeriesQuery",selections:[{alias:"dimension",args:t,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},i,d],storageKey:null}]},params:{cacheID:"0bb3d9faf9d7f0c2e27995120ae24e1c",id:null,metadata:{},name:"DimensionQuantilesTimeSeriesQuery",operationKind:"query",text:`query DimensionQuantilesTimeSeriesQuery(
|
|
903
903
|
$dimensionId: GlobalID!
|
|
904
904
|
$timeRange: TimeRange!
|
|
905
905
|
$granularity: Granularity!
|
|
@@ -941,14 +941,14 @@ fragment DimensionSegmentsBarChart_dimension_3E0ZE6 on Dimension {
|
|
|
941
941
|
}
|
|
942
942
|
}
|
|
943
943
|
}
|
|
944
|
-
`}}}();
|
|
944
|
+
`}}}();Xt.hash="134f0dad0e0ecc7863dfbb0f437d829b";const Wc=Ga("~s");var Yt=(n=>(n.p99_p01="p99_p01",n.p75_p25="p75_p25",n.p50="p50",n))(Yt||{});const Jc=new Intl.NumberFormat([],{maximumFractionDigits:2});function Gn(n){return typeof n=="number"?Jc.format(n):"--"}const ei=()=>{const n=Ge();return{outerColor:n.gray500,innerColor:n.gray300,lineColor:n.default}};function Zc({active:n,payload:a,label:l}){const{outerColor:t,innerColor:i,lineColor:r}=ei();if(n&&a&&a.length){const o=a[0].payload;return s(rn,{children:[e(K,{weight:"heavy",textSize:"medium",children:`${Qe(new Date(l))}`}),e(pe,{color:t,name:"p99",value:Gn(o.p99_p01[0])}),e(pe,{color:i,name:"p75",value:Gn(o.p75_p25[0])}),e(pe,{color:r,name:"p50",value:Gn(o.p50)}),e(pe,{color:i,name:"p25",value:Gn(o.p75_p25[1])}),e(pe,{color:t,name:"p01",value:Gn(o.p99_p01[1])})]})}return null}function Xc({dimensionId:n}){var L,A,x,T,E;const{timeRange:a}=He(),l=$n(a),t=D.useLazyLoadQuery(Xt,{dimensionId:n,timeRange:{start:a.start.toISOString(),end:a.end.toISOString()},granularity:l}),i=((L=t.dimension.p99TimeSeries)==null?void 0:L.data.map(R=>R))||[],r=((A=t.dimension.p01TimeSeries)==null?void 0:A.data.map(R=>R))||[],o=((x=t.dimension.p75TimeSeries)==null?void 0:x.data.map(R=>R))||[],c=((T=t.dimension.p25TimeSeries)==null?void 0:T.data.map(R=>R))||[],d=((E=t.dimension.p50TimeSeries)==null?void 0:E.data.map(R=>R))||[],g=i.map((R,j)=>({timestamp:new Date(R.timestamp).valueOf(),p99_p01:[R.value,r[j].value],p75_p25:[o[j].value,c[j].value],p50:d[j].value})),f=On({samplingIntervalMinutes:l.samplingIntervalMinutes}),[m,p]=u.useState(Object.keys(Yt).reduce((R,j)=>(R[j]=!1,R),{})),y=R=>{m[R.dataKey]||p({...m})},b=()=>{p({...m})},k=R=>{p({...m,[String(R.dataKey)]:!m[R.dataKey]})},{outerColor:S,innerColor:v,lineColor:w}=ei();return e(sn,{width:"100%",height:"100%",children:s(ra,{data:g,margin:da,syncId:"dimensionDetails",children:[s("defs",{children:[s("linearGradient",{id:"p99_p01ColorUV",x1:"0",y1:"0",x2:"0",y2:"1",children:[e("stop",{offset:"10%",stopColor:S,stopOpacity:.7}),e("stop",{offset:"50%",stopColor:S,stopOpacity:.3}),e("stop",{offset:"90%",stopColor:S,stopOpacity:.7})]}),s("linearGradient",{id:"p75_p25ColorUV",x1:"0",y1:"0",x2:"0",y2:"1",children:[e("stop",{offset:"10%",stopColor:v,stopOpacity:.7}),e("stop",{offset:"50%",stopColor:v,stopOpacity:.3}),e("stop",{offset:"90%",stopColor:v,stopOpacity:.7})]})]}),e(on,{...Qn,tickFormatter:R=>f(new Date(R))}),e(Ne,{stroke:ge.colors.gray200,label:{value:"Value",angle:-90,position:"insideLeft",style:{textAnchor:"middle",fill:"var(--ac-global-text-color-900)"}},tickFormatter:R=>Wc(R),style:{fill:"var(--ac-global-text-color-700)"}}),e(dn,{strokeDasharray:"4 4",stroke:ge.colors.gray200,strokeOpacity:.5}),e(cn,{content:e(Zc,{})}),e(xd,{onClick:k,onMouseOver:y,onMouseOut:b}),e(Yn,{type:"monotone",dataKey:"p99_p01",name:"p99 - p01",fillOpacity:1,fill:"url(#p99_p01ColorUV)",stroke:S,hide:m.p99_p01===!0}),e(Yn,{type:"monotone",dataKey:"p75_p25",name:"p75 - p25",fillOpacity:1,stroke:v,fill:"url(#p75_p25ColorUV)",hide:m.p75_p25===!0}),e(yt,{type:"monotone",dataKey:"p50",stroke:w,hide:m.p50===!0})]})})}const ni=function(){var n={alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},a=[{alias:null,args:null,kind:"ScalarField",name:"primaryValue",storageKey:null}];return{argumentDefinitions:[{defaultValue:null,kind:"LocalArgument",name:"timeRange"}],kind:"Fragment",metadata:null,name:"DimensionSegmentsBarChart_dimension",selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{alias:null,args:[{kind:"Variable",name:"primaryTimeRange",variableName:"timeRange"}],concreteType:"Segments",kind:"LinkedField",name:"segmentsComparison",plural:!1,selections:[{alias:null,args:null,concreteType:"Segment",kind:"LinkedField",name:"segments",plural:!0,selections:[{alias:null,args:null,concreteType:null,kind:"LinkedField",name:"bin",plural:!1,selections:[{kind:"InlineFragment",selections:[n,{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null}],type:"NominalBin",abstractKey:null},{kind:"InlineFragment",selections:[n,{alias:null,args:null,concreteType:"NumericRange",kind:"LinkedField",name:"range",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"start",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"end",storageKey:null}],storageKey:null}],type:"IntervalBin",abstractKey:null},{kind:"InlineFragment",selections:[n],type:"MissingValueBin",abstractKey:null}],storageKey:null},{alias:null,args:null,concreteType:"DatasetValues",kind:"LinkedField",name:"counts",plural:!1,selections:a,storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"DatasetValues",kind:"LinkedField",name:"totalCounts",plural:!1,selections:a,storageKey:null}],storageKey:null}],type:"Dimension",abstractKey:null}}();ni.hash="8cef9841e9a5bd7d0d50acb5db9028b0";const Yc=Ga(".2f"),ai=()=>{const{primary:n}=Ge();return{color:n}};function eu({active:n,payload:a,label:l}){var i;const{color:t}=ai();if(n&&a&&a.length){const r=(i=a[0])==null?void 0:i.value;return e(rn,{children:e(pe,{color:t,shape:"square",name:l,value:r!=null?`${Yc(r)}%`:"--"})})}return null}function nu(n){const a=D.useFragment(ni,n.dimension),l=u.useMemo(()=>{var o,c,d;const i=((o=a.segmentsComparison)==null?void 0:o.segments)??[],r=((d=(c=a.segmentsComparison)==null?void 0:c.totalCounts)==null?void 0:d.primaryValue)??0;return i.map(g=>{var y;const f=((y=g.counts)==null?void 0:y.primaryValue)??0,m=Jl(g.bin),p=f/r*100;return{name:m,percent:p}})},[a]),{color:t}=ai();return e(sn,{children:s(rl,{data:l,margin:{top:25,right:18,left:18,bottom:5},children:[e("defs",{children:s("linearGradient",{id:"dimensionSegmentsBarColor",x1:"0",y1:"0",x2:"0",y2:"1",children:[e("stop",{offset:"5%",stopColor:t,stopOpacity:1}),e("stop",{offset:"95%",stopColor:t,stopOpacity:.5})]})}),e(on,{dataKey:"name",style:{fill:"var(--ac-global-text-color-700)"}}),e(Ne,{stroke:ge.colors.gray200,label:{value:"% Volume",angle:-90,position:"insideLeft",style:{textAnchor:"middle",fill:"var(--ac-global-text-color-900)"}},style:{fill:"var(--ac-global-text-color-700)"}}),e(dn,{strokeDasharray:"4 4",stroke:ge.colors.gray200,strokeOpacity:.5}),e(cn,{...el,content:e(eu,{})}),e(En,{dataKey:"percent",fill:"url(#dimensionSegmentsBarColor)",spacing:15})]})})}function Qy(){const{dimensionId:n}=ln(),{timeRange:a}=He(),l=Cn(),{referenceInferences:t}=Ve(),i=t!==null,r=i,o=l.dimension.shape!=="continuous",c=l.dimension.dataType==="numeric",d=Y(),g=D.useLazyLoadQuery(Mt,{dimensionId:n,timeRange:{start:a.start.toISOString(),end:a.end.toISOString()},hasReference:i});if(!n)throw new Error("Dimension ID is required to display a dimension");return e(Wl,{initialTimestamp:new Date(a.end),children:e(W,{type:"slideOver",isDismissable:!0,onDismiss:()=>d(-1),children:e(H,{size:"L",title:l.dimension.name,children:e("main",{css:C`
|
|
945
945
|
padding: var(--px-spacing-med);
|
|
946
946
|
display: flex;
|
|
947
947
|
flex-direction: column;
|
|
948
948
|
min-height: 400px;
|
|
949
949
|
overflow-y: auto;
|
|
950
950
|
height: 100%;
|
|
951
|
-
`,children:e(u.Suspense,{fallback:e(fe,{}),children:s(h,{direction:"column",gap:"size-100",children:[e(F,{borderColor:"dark",borderRadius:"medium",borderWidth:"thin",height:"size-1600",children:e(nu,{dimension:g.dimension})}),e(F,{borderColor:"dark",borderRadius:"medium",borderWidth:"thin",height:"size-1600","data-testid":"dimension-count-time-series-view",children:s(h,{direction:"row",alignItems:"stretch",height:"100%",children:[e(Nc,{dimensionId:n}),e(In,{children:e(Ec,{dimension:g.dimension})})]})}),r?e(F,{borderColor:"dark",borderRadius:"medium",borderWidth:"thin",children:s(h,{direction:"column",alignItems:"stretch",children:[e(F,{width:"100%",height:"size-1600",children:s(h,{direction:"row",alignItems:"stretch",height:"100%",children:[e(F,{flex:!0,children:e(jc,{dimensionId:n})}),e(In,{children:e(Oc,{dimension:g.dimension})})]})}),e(F,{height:"size-1600",width:"100%",borderTopColor:"dark",borderTopWidth:"thin",children:e(u.Suspense,{fallback:e(fe,{}),children:e(zc,{dimensionId:n})})})]})}):null,c?e(F,{borderColor:"dark",borderRadius:"medium",borderWidth:"thin",height:"size-3000",children:s(h,{direction:"row",alignItems:"stretch",height:"100%",children:[e(F,{flex:!0,children:e(Xc,{dimensionId:n})}),e(In,{children:e(Gc,{dimension:g.dimension})})]})}):null,o?e(F,{borderColor:"dark",borderRadius:"medium",borderWidth:"thin",height:"size-1600",children:s(h,{direction:"row",alignItems:"stretch",height:"100%",children:[e(F,{flex:!0,children:e(_c,{dimensionId:n})}),e(In,{children:e(Pc,{dimension:g.dimension})})]})}):null,e(F,{borderColor:"dark",borderRadius:"medium",borderWidth:"thin",height:"size-1600",children:s(h,{direction:"row",alignItems:"stretch",height:"100%",children:[e(Hc,{dimensionId:n}),e(In,{children:e(qc,{dimension:g.dimension})})]})})]})})})})})})}const
|
|
951
|
+
`,children:e(u.Suspense,{fallback:e(fe,{}),children:s(h,{direction:"column",gap:"size-100",children:[e(F,{borderColor:"dark",borderRadius:"medium",borderWidth:"thin",height:"size-1600",children:e(nu,{dimension:g.dimension})}),e(F,{borderColor:"dark",borderRadius:"medium",borderWidth:"thin",height:"size-1600","data-testid":"dimension-count-time-series-view",children:s(h,{direction:"row",alignItems:"stretch",height:"100%",children:[e(Nc,{dimensionId:n}),e(In,{children:e(Ec,{dimension:g.dimension})})]})}),r?e(F,{borderColor:"dark",borderRadius:"medium",borderWidth:"thin",children:s(h,{direction:"column",alignItems:"stretch",children:[e(F,{width:"100%",height:"size-1600",children:s(h,{direction:"row",alignItems:"stretch",height:"100%",children:[e(F,{flex:!0,children:e(jc,{dimensionId:n})}),e(In,{children:e(Oc,{dimension:g.dimension})})]})}),e(F,{height:"size-1600",width:"100%",borderTopColor:"dark",borderTopWidth:"thin",children:e(u.Suspense,{fallback:e(fe,{}),children:e(zc,{dimensionId:n})})})]})}):null,c?e(F,{borderColor:"dark",borderRadius:"medium",borderWidth:"thin",height:"size-3000",children:s(h,{direction:"row",alignItems:"stretch",height:"100%",children:[e(F,{flex:!0,children:e(Xc,{dimensionId:n})}),e(In,{children:e(Gc,{dimension:g.dimension})})]})}):null,o?e(F,{borderColor:"dark",borderRadius:"medium",borderWidth:"thin",height:"size-1600",children:s(h,{direction:"row",alignItems:"stretch",height:"100%",children:[e(F,{flex:!0,children:e(_c,{dimensionId:n})}),e(In,{children:e(Pc,{dimension:g.dimension})})]})}):null,e(F,{borderColor:"dark",borderRadius:"medium",borderWidth:"thin",height:"size-1600",children:s(h,{direction:"row",alignItems:"stretch",height:"100%",children:[e(Hc,{dimensionId:n}),e(In,{children:e(qc,{dimension:g.dimension})})]})})]})})})})})})}const li=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"id"}],a=[{kind:"Variable",name:"id",variableName:"id"}],l={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},t={alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},i={alias:null,args:null,kind:"ScalarField",name:"dataType",storageKey:null},r={alias:null,args:null,kind:"ScalarField",name:"shape",storageKey:null};return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"dimensionLoaderQuery",selections:[{alias:"dimension",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{kind:"InlineFragment",selections:[l,t,i,r],type:"Dimension",abstractKey:null}],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"dimensionLoaderQuery",selections:[{alias:"dimension",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},{kind:"TypeDiscriminator",abstractKey:"__isNode"},l,{kind:"InlineFragment",selections:[t,i,r],type:"Dimension",abstractKey:null}],storageKey:null}]},params:{cacheID:"03a9aafe3f08a9d093b029ff4a9e3253",id:null,metadata:{},name:"dimensionLoaderQuery",operationKind:"query",text:`query dimensionLoaderQuery(
|
|
952
952
|
$id: GlobalID!
|
|
953
953
|
) {
|
|
954
954
|
dimension: node(id: $id) {
|
|
@@ -963,7 +963,7 @@ fragment DimensionSegmentsBarChart_dimension_3E0ZE6 on Dimension {
|
|
|
963
963
|
id
|
|
964
964
|
}
|
|
965
965
|
}
|
|
966
|
-
`}}}();
|
|
966
|
+
`}}}();li.hash="5a662d77e69d2e9bb4eb2af4cad6b722";async function jy(n){const{dimensionId:a}=n.params;return D.fetchQuery(xe,li,{id:a}).toPromise()}const ti=function(){var n={defaultValue:null,kind:"LocalArgument",name:"id"},a={defaultValue:null,kind:"LocalArgument",name:"traceId"},l=[{kind:"Variable",name:"id",variableName:"id"}],t={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},i={alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},r={kind:"InlineFragment",selections:[{alias:null,args:[{kind:"Variable",name:"traceId",variableName:"traceId"}],concreteType:"Trace",kind:"LinkedField",name:"trace",plural:!1,selections:[{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:[t,{alias:null,args:null,concreteType:"SpanContext",kind:"LinkedField",name:"context",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"spanId",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"traceId",storageKey:null}],storageKey:null},i,{alias:null,args:null,kind:"ScalarField",name:"spanKind",storageKey:null},{alias:"statusCode",args:null,kind:"ScalarField",name:"propagatedStatusCode",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"startTime",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"parentId",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"latencyMs",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"tokenCountTotal",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"tokenCountPrompt",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"tokenCountCompletion",storageKey:null},{alias:null,args:null,concreteType:"SpanAnnotation",kind:"LinkedField",name:"spanAnnotations",plural:!0,selections:[i,{alias:null,args:null,kind:"ScalarField",name:"label",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"score",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"annotatorKind",storageKey:null}],storageKey:null}],storageKey:null}],storageKey:null}],storageKey:"spans(first:1000)"}],storageKey:null}],type:"Project",abstractKey: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:[r],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},r,{kind:"TypeDiscriminator",abstractKey:"__isNode"},t],storageKey:null}]},params:{cacheID:"22103e9bb1f983529081ca93d60e76ef",id:null,metadata:{},name:"TraceDetailsQuery",operationKind:"query",text:`query TraceDetailsQuery(
|
|
967
967
|
$traceId: ID!
|
|
968
968
|
$id: GlobalID!
|
|
969
969
|
) {
|
|
@@ -1003,7 +1003,7 @@ fragment DimensionSegmentsBarChart_dimension_3E0ZE6 on Dimension {
|
|
|
1003
1003
|
id
|
|
1004
1004
|
}
|
|
1005
1005
|
}
|
|
1006
|
-
`}}}();
|
|
1006
|
+
`}}}();ti.hash="8b568616f23f7d349cac5a31807463fb";const ii=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"spanId"}],a=[{kind:"Variable",name:"id",variableName:"spanId"}],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,concreteType:"SpanContext",kind:"LinkedField",name:"context",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"spanId",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"traceId",storageKey:null}],storageKey:null},r={alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},o={alias:null,args:null,kind:"ScalarField",name:"spanKind",storageKey:null},c={alias:"statusCode",args:null,kind:"ScalarField",name:"propagatedStatusCode",storageKey:null},d={alias:null,args:null,kind:"ScalarField",name:"statusMessage",storageKey:null},g={alias:null,args:null,kind:"ScalarField",name:"startTime",storageKey:null},f={alias:null,args:null,kind:"ScalarField",name:"parentId",storageKey:null},m={alias:null,args:null,kind:"ScalarField",name:"latencyMs",storageKey:null},p={alias:null,args:null,kind:"ScalarField",name:"tokenCountTotal",storageKey:null},y={alias:null,args:null,kind:"ScalarField",name:"tokenCountPrompt",storageKey:null},b={alias:null,args:null,kind:"ScalarField",name:"tokenCountCompletion",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},w={alias:null,args:null,kind:"ScalarField",name:"attributes",storageKey:null},L={alias:null,args:null,concreteType:"SpanEvent",kind:"LinkedField",name:"events",plural:!0,selections:[r,{alias:null,args:null,kind:"ScalarField",name:"message",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"timestamp",storageKey:null}],storageKey:null},A={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},x={alias:null,args:null,kind:"ScalarField",name:"label",storageKey:null},T={alias:null,args:null,kind:"ScalarField",name:"score",storageKey:null},E={alias:null,args:null,kind:"ScalarField",name:"explanation",storageKey:null},R={alias:null,args:null,concreteType:"DocumentEvaluation",kind:"LinkedField",name:"documentEvaluations",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"documentPosition",storageKey:null},r,x,T,E],storageKey: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,o,c,d,g,f,m,p,y,b,S,v,w,{kind:"RequiredField",field:L,action:"THROW",path:"span.events"},A,R,{alias:null,args:null,concreteType:"SpanAnnotation",kind:"LinkedField",name:"spanAnnotations",plural:!0,selections:[r],storageKey:null},{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,{kind:"TypeDiscriminator",abstractKey:"__isNode"},t,{kind:"InlineFragment",selections:[i,r,o,c,d,g,f,m,p,y,b,S,v,w,L,A,R,{alias:null,args:null,concreteType:"SpanAnnotation",kind:"LinkedField",name:"spanAnnotations",plural:!0,selections:[r,x,T,E,{alias:null,args:null,kind:"ScalarField",name:"annotatorKind",storageKey:null},t],storageKey:null},{alias:"code",args:null,kind:"ScalarField",name:"statusCode",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"endTime",storageKey:null}],type:"Span",abstractKey:null}],storageKey:null}]},params:{cacheID:"b1a80a0108c40baebf6e64b811ca0202",id:null,metadata:{},name:"SpanDetailsQuery",operationKind:"query",text:`query SpanDetailsQuery(
|
|
1007
1007
|
$spanId: GlobalID!
|
|
1008
1008
|
) {
|
|
1009
1009
|
span: node(id: $spanId) {
|
|
@@ -1088,7 +1088,7 @@ fragment SpanFeedback_annotations on Span {
|
|
|
1088
1088
|
annotatorKind
|
|
1089
1089
|
}
|
|
1090
1090
|
}
|
|
1091
|
-
`}}}();
|
|
1091
|
+
`}}}();ii.hash="eaf52d9b37b1f5a29cae360a05b7c975";function ol(n){return u.useMemo(()=>n==="user"||n==="human"?{backgroundColor:"grey-100",borderColor:"grey-500"}:n==="assistant"||n==="ai"?{backgroundColor:"blue-100",borderColor:"blue-700"}:n==="system"?{backgroundColor:"indigo-100",borderColor:"indigo-700"}:["function","tool"].includes(n)?{backgroundColor:"yellow-100",borderColor:"yellow-700"}:{backgroundColor:"grey-100",borderColor:"grey-700"},[n])}function vl(n){return Array.isArray(n)&&n.every(a=>typeof a=="object"&&se.message in a&&au(a[se.message]))}function au(n){return typeof n=="object"&&n!==null&&ve.role in n}const Ea=C`
|
|
1092
1092
|
display: flex;
|
|
1093
1093
|
align-items: center;
|
|
1094
1094
|
.ac-text {
|
|
@@ -1098,7 +1098,7 @@ fragment SpanFeedback_annotations on Span {
|
|
|
1098
1098
|
overflow: hidden;
|
|
1099
1099
|
text-overflow: ellipsis;
|
|
1100
1100
|
}
|
|
1101
|
-
`;function De(n){const{name:a,metric:l,k:t,score:i}=n,r=typeof t=="number"?`${l}@${t}`:l,o=u.useMemo(()=>l==="hit"?i?"true":"false":typeof i=="number"
|
|
1101
|
+
`;function De(n){const{name:a,metric:l,k:t,score:i}=n,r=typeof t=="number"?`${l}@${t}`:l,o=u.useMemo(()=>l==="hit"?i?"true":"false":typeof i=="number"&&ze(i)||"--",[i,l]);return s(Le,{delay:500,offset:3,children:[e(kn,{children:e("div",{css:Uo,children:s(h,{direction:"row",gap:"size-100",alignItems:"center",children:[e(Bo,{color:"var(--ac-global-color-seafoam-1000)"}),a?e("div",{css:Ea,children:e(K,{weight:"heavy",textSize:"small",color:"inherit",children:a})}):null,e("div",{css:Ea,children:e(K,{textSize:"small",color:"inherit",children:r})}),e("div",{css:Ea,children:e(K,{textSize:"small",children:o})})]})})}),e(aa,{children:s(h,{direction:"row",gap:"size-100",children:[s(K,{weight:"heavy",color:"inherit",children:[a," ",r]}),e(K,{color:"inherit",children:o})]})})]})}const ri=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"projectId"},{defaultValue:null,kind:"LocalArgument",name:"spanId"}],a=[{kind:"Variable",name:"id",variableName:"projectId"}],l={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},t={kind:"InlineFragment",selections:[{alias:null,args:null,kind:"ScalarField",name:"spanAnnotationNames",storageKey:null}],type:"Project",abstractKey:null},i=[{kind:"Variable",name:"id",variableName:"spanId"}],r={kind:"InlineFragment",selections:[{alias:null,args:null,concreteType:"SpanAnnotation",kind:"LinkedField",name:"spanAnnotations",plural:!0,selections:[l,{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"annotatorKind",storageKey:null}],storageKey:null}],type:"Span",abstractKey:null},o={alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null};return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"EditSpanAnnotationsDialogNewAnnotationQuery",selections:[{alias:"project",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[l,t],storageKey:null},{alias:"span",args:i,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[l,r],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"EditSpanAnnotationsDialogNewAnnotationQuery",selections:[{alias:"project",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[o,l,t],storageKey:null},{alias:"span",args:i,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[o,l,r],storageKey:null}]},params:{cacheID:"4aa13fbe70360943615a8ff4d4b2a06f",id:null,metadata:{},name:"EditSpanAnnotationsDialogNewAnnotationQuery",operationKind:"query",text:`query EditSpanAnnotationsDialogNewAnnotationQuery(
|
|
1102
1102
|
$projectId: GlobalID!
|
|
1103
1103
|
$spanId: GlobalID!
|
|
1104
1104
|
) {
|
|
@@ -1121,7 +1121,7 @@ fragment SpanFeedback_annotations on Span {
|
|
|
1121
1121
|
}
|
|
1122
1122
|
}
|
|
1123
1123
|
}
|
|
1124
|
-
`}}}();
|
|
1124
|
+
`}}}();ri.hash="09b2ee5f96c0192a5618ae6c04c321ae";const si=function(){var n={defaultValue:null,kind:"LocalArgument",name:"annotationId"},a={defaultValue:null,kind:"LocalArgument",name:"explanation"},l={defaultValue:null,kind:"LocalArgument",name:"label"},t={defaultValue:null,kind:"LocalArgument",name:"name"},i={defaultValue:null,kind:"LocalArgument",name:"score"},r={defaultValue:null,kind:"LocalArgument",name:"spanId"},o=[{items:[{fields:[{kind:"Variable",name:"annotationId",variableName:"annotationId"},{kind:"Literal",name:"annotatorKind",value:"HUMAN"},{kind:"Variable",name:"explanation",variableName:"explanation"},{kind:"Variable",name:"label",variableName:"label"},{kind:"Variable",name:"name",variableName:"name"},{kind:"Variable",name:"score",variableName:"score"}],kind:"ObjectValue",name:"input.0"}],kind:"ListValue",name:"input"}],c=[{kind:"Variable",name:"id",variableName:"spanId"}],d={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null};return{fragment:{argumentDefinitions:[n,a,l,t,i,r],kind:"Fragment",metadata:null,name:"EditSpanAnnotationsDialogEditAnnotationMutation",selections:[{alias:null,args:o,concreteType:"SpanAnnotationMutationPayload",kind:"LinkedField",name:"patchSpanAnnotations",plural:!1,selections:[{alias:null,args:null,concreteType:"Query",kind:"LinkedField",name:"query",plural:!1,selections:[{alias:null,args:c,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{kind:"InlineFragment",selections:[{args:null,kind:"FragmentSpread",name:"EditSpanAnnotationsDialog_spanAnnotations"}],type:"Span",abstractKey:null}],storageKey:null}],storageKey:null}],storageKey:null}],type:"Mutation",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[r,n,t,l,i,a],kind:"Operation",name:"EditSpanAnnotationsDialogEditAnnotationMutation",selections:[{alias:null,args:o,concreteType:"SpanAnnotationMutationPayload",kind:"LinkedField",name:"patchSpanAnnotations",plural:!1,selections:[{alias:null,args:null,concreteType:"Query",kind:"LinkedField",name:"query",plural:!1,selections:[{alias:null,args:c,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},{kind:"TypeDiscriminator",abstractKey:"__isNode"},d,{kind:"InlineFragment",selections:[{alias:null,args:null,concreteType:"SpanAnnotation",kind:"LinkedField",name:"spanAnnotations",plural:!0,selections:[d,{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"annotatorKind",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"score",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"label",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"explanation",storageKey:null}],storageKey:null}],type:"Span",abstractKey:null}],storageKey:null}],storageKey:null}],storageKey:null}]},params:{cacheID:"8b7ea6d08a6f8f06744567701ccb5f34",id:null,metadata:{},name:"EditSpanAnnotationsDialogEditAnnotationMutation",operationKind:"mutation",text:`mutation EditSpanAnnotationsDialogEditAnnotationMutation(
|
|
1125
1125
|
$spanId: GlobalID!
|
|
1126
1126
|
$annotationId: GlobalID!
|
|
1127
1127
|
$name: String!
|
|
@@ -1154,7 +1154,7 @@ fragment EditSpanAnnotationsDialog_spanAnnotations on Span {
|
|
|
1154
1154
|
explanation
|
|
1155
1155
|
}
|
|
1156
1156
|
}
|
|
1157
|
-
`}}}();
|
|
1157
|
+
`}}}();si.hash="46647cda8c9874c89d8a4034bf82fe14";const oi=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"id"}],a=[{kind:"Variable",name:"id",variableName:"id"}],l={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null};return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"EditSpanAnnotationsDialogSpanAnnotationsQuery",selections:[{alias:null,args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{args:null,kind:"FragmentSpread",name:"EditSpanAnnotationsDialog_spanAnnotations"}],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"EditSpanAnnotationsDialogSpanAnnotationsQuery",selections:[{alias:null,args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},{kind:"TypeDiscriminator",abstractKey:"__isNode"},l,{kind:"InlineFragment",selections:[{alias:null,args:null,concreteType:"SpanAnnotation",kind:"LinkedField",name:"spanAnnotations",plural:!0,selections:[l,{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"annotatorKind",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"score",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"label",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"explanation",storageKey:null}],storageKey:null}],type:"Span",abstractKey:null}],storageKey:null}]},params:{cacheID:"8649eb1dd42a29a0d38b9a1538490de4",id:null,metadata:{},name:"EditSpanAnnotationsDialogSpanAnnotationsQuery",operationKind:"query",text:`query EditSpanAnnotationsDialogSpanAnnotationsQuery(
|
|
1158
1158
|
$id: GlobalID!
|
|
1159
1159
|
) {
|
|
1160
1160
|
node(id: $id) {
|
|
@@ -1176,7 +1176,7 @@ fragment EditSpanAnnotationsDialog_spanAnnotations on Span {
|
|
|
1176
1176
|
explanation
|
|
1177
1177
|
}
|
|
1178
1178
|
}
|
|
1179
|
-
`}}}();
|
|
1179
|
+
`}}}();oi.hash="07aedb847a2af03a77823f0afc0c98d4";const di=function(){var n={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null};return{argumentDefinitions:[],kind:"Fragment",metadata:{refetch:{connection:null,fragmentPathInResult:["node"],operation:oi,identifierInfo:{identifierField:"id",identifierQueryVariableName:"id"}}},name:"EditSpanAnnotationsDialog_spanAnnotations",selections:[n,{alias:null,args:null,concreteType:"SpanAnnotation",kind:"LinkedField",name:"spanAnnotations",plural:!0,selections:[n,{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"annotatorKind",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"score",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"label",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"explanation",storageKey:null}],storageKey:null}],type:"Span",abstractKey:null}}();di.hash="07aedb847a2af03a77823f0afc0c98d4";const ci=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"spanId"}],a=[{kind:"Variable",name:"id",variableName:"spanId"}],l={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null};return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"EditSpanAnnotationsDialogQuery",selections:[{alias:"span",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[l,{kind:"InlineFragment",selections:[{args:null,kind:"FragmentSpread",name:"EditSpanAnnotationsDialog_spanAnnotations"}],type:"Span",abstractKey:null}],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"EditSpanAnnotationsDialogQuery",selections:[{alias:"span",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},l,{kind:"InlineFragment",selections:[{alias:null,args:null,concreteType:"SpanAnnotation",kind:"LinkedField",name:"spanAnnotations",plural:!0,selections:[l,{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"annotatorKind",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"score",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"label",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"explanation",storageKey:null}],storageKey:null}],type:"Span",abstractKey:null}],storageKey:null}]},params:{cacheID:"532b3c148c3bf1411b8820714c68f4e3",id:null,metadata:{},name:"EditSpanAnnotationsDialogQuery",operationKind:"query",text:`query EditSpanAnnotationsDialogQuery(
|
|
1180
1180
|
$spanId: GlobalID!
|
|
1181
1181
|
) {
|
|
1182
1182
|
span: node(id: $spanId) {
|
|
@@ -1199,7 +1199,7 @@ fragment EditSpanAnnotationsDialog_spanAnnotations on Span {
|
|
|
1199
1199
|
explanation
|
|
1200
1200
|
}
|
|
1201
1201
|
}
|
|
1202
|
-
`}}}();
|
|
1202
|
+
`}}}();ci.hash="36093f4285a168993ec87fd6aac82365";const ui=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"input"},{defaultValue:null,kind:"LocalArgument",name:"spanId"}],a=[{items:[{kind:"Variable",name:"input.0",variableName:"input"}],kind:"ListValue",name:"input"}],l=[{kind:"Variable",name:"id",variableName:"spanId"}],t={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null};return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"NewSpanAnnotationFormMutation",selections:[{alias:null,args:a,concreteType:"SpanAnnotationMutationPayload",kind:"LinkedField",name:"createSpanAnnotations",plural:!1,selections:[{alias:null,args:null,concreteType:"Query",kind:"LinkedField",name:"query",plural:!1,selections:[{alias:null,args:l,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{kind:"InlineFragment",selections:[{args:null,kind:"FragmentSpread",name:"EditSpanAnnotationsDialog_spanAnnotations"}],type:"Span",abstractKey:null}],storageKey:null}],storageKey:null}],storageKey:null}],type:"Mutation",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"NewSpanAnnotationFormMutation",selections:[{alias:null,args:a,concreteType:"SpanAnnotationMutationPayload",kind:"LinkedField",name:"createSpanAnnotations",plural:!1,selections:[{alias:null,args:null,concreteType:"Query",kind:"LinkedField",name:"query",plural:!1,selections:[{alias:null,args:l,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},{kind:"TypeDiscriminator",abstractKey:"__isNode"},t,{kind:"InlineFragment",selections:[{alias:null,args:null,concreteType:"SpanAnnotation",kind:"LinkedField",name:"spanAnnotations",plural:!0,selections:[t,{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"annotatorKind",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"score",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"label",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"explanation",storageKey:null}],storageKey:null}],type:"Span",abstractKey:null}],storageKey:null}],storageKey:null}],storageKey:null}]},params:{cacheID:"d6f016f4dfb0c142854c3ecd840b09f5",id:null,metadata:{},name:"NewSpanAnnotationFormMutation",operationKind:"mutation",text:`mutation NewSpanAnnotationFormMutation(
|
|
1203
1203
|
$input: CreateSpanAnnotationInput!
|
|
1204
1204
|
$spanId: GlobalID!
|
|
1205
1205
|
) {
|
|
@@ -1228,10 +1228,10 @@ fragment EditSpanAnnotationsDialog_spanAnnotations on Span {
|
|
|
1228
1228
|
explanation
|
|
1229
1229
|
}
|
|
1230
1230
|
}
|
|
1231
|
-
`}}}();
|
|
1231
|
+
`}}}();ui.hash="ded0a7a64a2706f6ec472a63c1c57eca";const lu=C`
|
|
1232
1232
|
color: var(--ac-global-text-color-900);
|
|
1233
1233
|
font-size: 12px;
|
|
1234
|
-
`;function
|
|
1234
|
+
`;function mi(n){const{initialData:a,isReadOnly:l,onSubmit:t,isSubmitting:i=!1}=n,{control:r,handleSubmit:o,formState:{isDirty:c,isValid:d},setError:g,reset:f}=Ie({defaultValues:a,disabled:l}),m=u.useCallback(y=>{const b=!y.label,k=y.score===""||y.score==null;if(b&&k){g("label",{type:"manual",message:"Label or score is required"}),g("score",{type:"manual",message:"Label or score is required"});return}const S={...y,score:y.score!=null?parseFloat(y.score.toString()):null};t&&t(S),f(S)},[t,g,f]),p=l;return s(ye,{onSubmit:o(m),children:[e(F,{padding:"size-200",children:s(h,{direction:"column",gap:"size-100",children:[s("div",{css:C`
|
|
1235
1235
|
display: flex;
|
|
1236
1236
|
flex-direction: row;
|
|
1237
1237
|
width: 100%;
|
|
@@ -1243,7 +1243,7 @@ fragment EditSpanAnnotationsDialog_spanAnnotations on Span {
|
|
|
1243
1243
|
.ac-textfield {
|
|
1244
1244
|
min-width: 0;
|
|
1245
1245
|
}
|
|
1246
|
-
`,children:[e(
|
|
1246
|
+
`,children:[e(G,{name:"label",control:r,render:({field:{onChange:y,onBlur:b,value:k},fieldState:{invalid:S,error:v}})=>e(X,{label:"Label",placeholder:"e.x. good, bad",description:"A categorical label like 'good' or 'bad'",isReadOnly:l,errorMessage:v==null?void 0:v.message,validationState:S?"invalid":"valid",onChange:y,onBlur:b,value:(k==null?void 0:k.toString())||""})}),e(G,{name:"score",control:r,render:({field:{onChange:y,onBlur:b,value:k},fieldState:{invalid:S,error:v}})=>e(X,{label:"Score",type:"number",placeholder:"e.x. 0.8",description:"A numeric grade",errorMessage:v==null?void 0:v.message,isReadOnly:l,validationState:S?"invalid":"valid",onChange:y,onBlur:b,value:(k==null?void 0:k.toString())||""})})]}),s("details",{open:!p,css:lu,children:[e("summary",{children:"Annotation Details"}),e(F,{paddingTop:"size-50",children:e(G,{name:"explanation",control:r,render:({field:{onChange:y,onBlur:b,value:k},fieldState:{invalid:S,error:v}})=>e(ka,{label:"Explanation",height:70,isReadOnly:l,description:"Why this score or label was given",errorMessage:v==null?void 0:v.message,validationState:S?"invalid":"valid",onChange:y,onBlur:b,value:(k==null?void 0:k.toString())||""})})})]})]})}),e(U,{children:l?null:e(F,{paddingTop:"size-100",paddingBottom:"size-100",paddingEnd:"size-200",paddingStart:"size-200",borderTopWidth:"thin",borderColor:"dark",children:e(h,{direction:"row",justifyContent:"end",children:e(M,{variant:c?"primary":"default",type:"submit",size:"compact",disabled:!d||!c||i,children:i?"Saving...":"Save"})})})})]})}function tu(n){const{annotationName:a,spanNodeId:l,onCreated:t}=n,[i,r]=D.useMutation(ui);return e(mi,{initialData:{name:a},isSubmitting:r,onSubmit:c=>{i({variables:{input:{spanId:l,annotatorKind:"HUMAN",...c},spanId:l},onCompleted:()=>{t()}})}})}const gi=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"annotationId"},{defaultValue:null,kind:"LocalArgument",name:"spanId"}],a=[{fields:[{items:[{kind:"Variable",name:"annotationIds.0",variableName:"annotationId"}],kind:"ListValue",name:"annotationIds"}],kind:"ObjectValue",name:"input"}],l=[{kind:"Variable",name:"id",variableName:"spanId"}],t={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null};return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"SpanAnnotationActionMenuDeleteMutation",selections:[{alias:null,args:a,concreteType:"SpanAnnotationMutationPayload",kind:"LinkedField",name:"deleteSpanAnnotations",plural:!1,selections:[{alias:null,args:null,concreteType:"Query",kind:"LinkedField",name:"query",plural:!1,selections:[{alias:null,args:l,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{kind:"InlineFragment",selections:[{args:null,kind:"FragmentSpread",name:"EditSpanAnnotationsDialog_spanAnnotations"}],type:"Span",abstractKey:null}],storageKey:null}],storageKey:null}],storageKey:null}],type:"Mutation",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"SpanAnnotationActionMenuDeleteMutation",selections:[{alias:null,args:a,concreteType:"SpanAnnotationMutationPayload",kind:"LinkedField",name:"deleteSpanAnnotations",plural:!1,selections:[{alias:null,args:null,concreteType:"Query",kind:"LinkedField",name:"query",plural:!1,selections:[{alias:null,args:l,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},{kind:"TypeDiscriminator",abstractKey:"__isNode"},t,{kind:"InlineFragment",selections:[{alias:null,args:null,concreteType:"SpanAnnotation",kind:"LinkedField",name:"spanAnnotations",plural:!0,selections:[t,{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"annotatorKind",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"score",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"label",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"explanation",storageKey:null}],storageKey:null}],type:"Span",abstractKey:null}],storageKey:null}],storageKey:null}],storageKey:null}]},params:{cacheID:"422687a283120080277d2649c1b9f6ee",id:null,metadata:{},name:"SpanAnnotationActionMenuDeleteMutation",operationKind:"mutation",text:`mutation SpanAnnotationActionMenuDeleteMutation(
|
|
1247
1247
|
$annotationId: GlobalID!
|
|
1248
1248
|
$spanId: GlobalID!
|
|
1249
1249
|
) {
|
|
@@ -1272,15 +1272,15 @@ fragment EditSpanAnnotationsDialog_spanAnnotations on Span {
|
|
|
1272
1272
|
explanation
|
|
1273
1273
|
}
|
|
1274
1274
|
}
|
|
1275
|
-
`}}}();
|
|
1275
|
+
`}}}();gi.hash="a898fcb037b08cb626daaf3d385588ce";function iu(n){const{onDelete:a,isDisabled:l=!1}=n;return e("div",{onClick:t=>{t.preventDefault(),t.stopPropagation()},children:e(Be,{align:"end",buttonSize:"compact",isDisabled:l,onAction:t=>{switch(t){case"deleteAnnotation":a();break}},children:e(B,{children:s(h,{direction:"row",gap:"size-75",justifyContent:"start",alignItems:"center",children:[e(P,{svg:e(I.TrashOutline,{})}),e(K,{children:"Delete"})]})},"deleteAnnotation")})})}function ru(n){const{annotationId:a,spanNodeId:l,annotationName:t,onSpanAnnotationActionSuccess:i,onSpanAnnotationActionError:r}=n,[o,c]=u.useState(null),[d,g]=D.useMutation(gi),f=u.useCallback(()=>{u.startTransition(()=>{d({variables:{annotationId:a,spanId:l},onCompleted:()=>{i({title:"Annotation Deleted",message:`Annotation ${t} has been deleted.`})},onError:p=>{r(p)}})})},[d,a,l,i,t,r]),m=u.useCallback(()=>{c(s(H,{size:"S",title:"Delete Annotation",children:[e(F,{padding:"size-200",children:e(K,{color:"danger",children:`Are you sure you want to delete annotation ${t}? This cannot be undone.`})}),e(F,{paddingEnd:"size-200",paddingTop:"size-100",paddingBottom:"size-100",borderTopColor:"light",borderTopWidth:"thin",children:e(h,{direction:"row",justifyContent:"end",children:e(M,{variant:"danger",onClick:()=>{f(),c(null)},children:"Delete Annotation"})})})]}))},[f,t]);return s("div",{children:[e(iu,{onDelete:m,isDisabled:g}),e(W,{type:"modal",isDismissable:!0,onDismiss:()=>c(null),children:o})]})}function su(n){const{projectId:a,spanNodeId:l}=n,[t,i]=u.useState(null),r=oe();return e(H,{title:"Annotate",size:"M",isDismissable:!0,extra:e(ou,{projectId:a,spanNodeId:l,disabled:t!==null,onAnnotationNameSelect:i}),children:s("div",{css:C`
|
|
1276
1276
|
height: 100%;
|
|
1277
1277
|
overflow-y: auto;
|
|
1278
1278
|
padding: var(--ac-global-dimension-size-200);
|
|
1279
|
-
`,children:[t&&e(F,{paddingBottom:"size-200",children:e(mu,{spanNodeId:l,name:t,onDelete:()=>{i(null)},onCreated:()=>{i(null),r({title:"New Span Annotation",message:`Annotation ${t} has been created.`})}})}),e(u.Suspense,{children:e(cu,{...n})})]})})}function ou(n){const{projectId:a,disabled:l=!1,spanNodeId:t,onAnnotationNameSelect:i}=n,[r,o]=u.useState(!1);return s(tn,{placement:"bottom end",crossOffset:300,isOpen:r,onOpenChange:c=>{o(c)},children:[e(M,{variant:"default",disabled:l,size:"compact",icon:e(P,{svg:e(I.PlusCircleOutline,{})}),onClick:()=>{o(!0)},children:"New"}),e(du,{projectId:a,spanNodeId:t,onAnnotationNameSelect:c=>{i(c),o(!1)}})]})}function du(n){const{projectId:a,spanNodeId:l,onAnnotationNameSelect:t}=n;return e(V,{title:"New Annotation",backgroundColor:"light",borderColor:"light",variant:"compact",bodyStyle:{padding:0},children:e(u.Suspense,{children:e(pu,{projectId:a,spanId:l,onAnnotationNameSelect:t})})})}function cu(n){const a=D.useLazyLoadQuery(
|
|
1279
|
+
`,children:[t&&e(F,{paddingBottom:"size-200",children:e(mu,{spanNodeId:l,name:t,onDelete:()=>{i(null)},onCreated:()=>{i(null),r({title:"New Span Annotation",message:`Annotation ${t} has been created.`})}})}),e(u.Suspense,{children:e(cu,{...n})})]})})}function ou(n){const{projectId:a,disabled:l=!1,spanNodeId:t,onAnnotationNameSelect:i}=n,[r,o]=u.useState(!1);return s(tn,{placement:"bottom end",crossOffset:300,isOpen:r,onOpenChange:c=>{o(c)},children:[e(M,{variant:"default",disabled:l,size:"compact",icon:e(P,{svg:e(I.PlusCircleOutline,{})}),onClick:()=>{o(!0)},children:"New"}),e(du,{projectId:a,spanNodeId:t,onAnnotationNameSelect:c=>{i(c),o(!1)}})]})}function du(n){const{projectId:a,spanNodeId:l,onAnnotationNameSelect:t}=n;return e(V,{title:"New Annotation",backgroundColor:"light",borderColor:"light",variant:"compact",bodyStyle:{padding:0},children:e(u.Suspense,{children:e(pu,{projectId:a,spanId:l,onAnnotationNameSelect:t})})})}function cu(n){const a=D.useLazyLoadQuery(ci,{spanId:n.spanNodeId},{fetchPolicy:"store-and-network"});return e(uu,{span:a.span})}function uu(n){const{span:a}=n,[l]=D.useRefetchableFragment(di,a),t=l.spanAnnotations||[],i=t.length>0;return s("div",{children:[!i&&e(Hl,{graphicKey:"documents",message:"No annotations for this span"}),e("ul",{css:C`
|
|
1280
1280
|
display: flex;
|
|
1281
1281
|
flex-direction: column;
|
|
1282
1282
|
gap: var(--ac-global-dimension-size-200);
|
|
1283
|
-
`,children:t.map((r,o)=>e("li",{children:e(gu,{annotation:r,spanNodeId:l.id})},`${o}_${r.name}`))})]})}function mu(n){const{spanNodeId:a,name:l,onDelete:t,onCreated:i}=n;return s(V,{variant:"compact",title:l,borderColor:"orange-900",extra:s(h,{direction:"row",alignItems:"center",gap:"size-100",children:[e(
|
|
1283
|
+
`,children:t.map((r,o)=>e("li",{children:e(gu,{annotation:r,spanNodeId:l.id})},`${o}_${r.name}`))})]})}function mu(n){const{spanNodeId:a,name:l,onDelete:t,onCreated:i}=n;return s(V,{variant:"compact",title:l,borderColor:"orange-900",extra:s(h,{direction:"row",alignItems:"center",gap:"size-100",children:[e(pi,{kind:"HUMAN"}),e(M,{variant:"default",size:"compact",isDisabled:!0,"aria-label":"delete annotation",icon:e(P,{svg:e(I.CloseOutline,{})}),onClick:t})]}),bodyStyle:{padding:0},children:[e(ne,{variant:"info",banner:!0,children:"Fill out the fields below and click save to create a new annotation."}),e(tu,{annotationName:l,spanNodeId:a,onCreated:i})]})}function gu(n){const{annotation:a,spanNodeId:l}=n,[t,i]=u.useState(null),r=oe(),[o,c]=D.useMutation(si),d=u.useCallback(g=>{u.startTransition(()=>{o({variables:{annotationId:a.id,spanId:l,...g},onCompleted:()=>{r({title:"Annotation Updated",message:`Annotation ${a.name} has been updated.`})},onError:f=>{i(f)}})})},[a.id,a.name,o,r,l]);return s(V,{variant:"compact",title:a.name,titleExtra:a.label||typeof a.score=="number"&&ze(a.score)||null,collapsible:!0,bodyStyle:{padding:0},extra:s(h,{gap:"size-100",alignItems:"center",children:[e(pi,{kind:a.annotatorKind}),e(ru,{annotationId:a.id,spanNodeId:l,annotationName:a.name,onSpanAnnotationActionSuccess:g=>{r(g)},onSpanAnnotationActionError:g=>{i(g)}})]}),children:[t&&e(ne,{variant:"danger",banner:!0,children:t.message}),e(mi,{initialData:a,isReadOnly:a.annotatorKind==="LLM",isSubmitting:c,onSubmit:g=>{d(g)}})]})}function pi(n){const{kind:a}=n;return e(Xn,{color:a==="HUMAN"?"blue-900":"orange-900",children:a})}function pu(n){const{projectId:a,spanId:l,onAnnotationNameSelect:t}=n,i=D.useLazyLoadQuery(ri,{projectId:a,spanId:l}),[r,o]=u.useState(""),c=u.useMemo(()=>{var f,m;return((m=(f=i==null?void 0:i.span)==null?void 0:f.spanAnnotations)==null?void 0:m.map(p=>p.name))||[]},[i.span.spanAnnotations]),d=u.useMemo(()=>(i.project.spanAnnotationNames||[]).filter(m=>!c.includes(m)),[i.project.spanAnnotationNames,c]),g=d.length>0;return s(U,{children:[e(F,{padding:"size-200",children:s(h,{direction:"row",gap:"size-100",alignItems:"end",children:[e(X,{label:"Annotation Name",value:r,placeholder:"e.x. correctness",onChange:f=>{o(f)}}),e(M,{variant:"primary",onClick:()=>{t(r)},children:"Create"})]})}),g&&s(U,{children:[e(F,{borderTopWidth:"thin",borderBottomWidth:"thin",borderColor:"light",paddingStart:"size-200",paddingTop:"size-100",paddingBottom:"size-100",backgroundColor:"grey-300",children:e("label",{children:"select from existing"})}),e(na,{selectionMode:"single",onSelectionChange:f=>{if(f==="all"||f.size===0)return;const p=f.values().next().value;o(p||"")},disabledKeys:c,children:d.map(f=>e(B,{children:f},f))})]})]})}function yu(n){const{spanNodeId:a,projectId:l}=n,[t,i]=u.useState(null);return s(U,{children:[e(M,{variant:"default",icon:e(P,{svg:e(I.EditOutline,{})}),onClick:()=>i(e(su,{spanNodeId:a,projectId:l})),children:"Annotate"}),e(W,{type:"slideOver",isDismissable:!0,onDismiss:()=>i(null),children:t})]})}const yi=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"id"}],a=[{kind:"Variable",name:"id",variableName:"id"}],l={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null};return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"SpanAsideSpanQuery",selections:[{alias:null,args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{args:null,kind:"FragmentSpread",name:"SpanAside_span"}],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"SpanAsideSpanQuery",selections:[{alias:null,args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},{kind:"TypeDiscriminator",abstractKey:"__isNode"},l,{kind:"InlineFragment",selections:[{alias:"code",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:"tokenCountTotal",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"tokenCountPrompt",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"tokenCountCompletion",storageKey:null},{alias:null,args:null,concreteType:"SpanAnnotation",kind:"LinkedField",name:"spanAnnotations",plural:!0,selections:[l,{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"label",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"annotatorKind",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"score",storageKey:null}],storageKey:null}],type:"Span",abstractKey:null}],storageKey:null}]},params:{cacheID:"878027b90513af8f947e6aa408450057",id:null,metadata:{},name:"SpanAsideSpanQuery",operationKind:"query",text:`query SpanAsideSpanQuery(
|
|
1284
1284
|
$id: GlobalID!
|
|
1285
1285
|
) {
|
|
1286
1286
|
node(id: $id) {
|
|
@@ -1307,22 +1307,22 @@ fragment SpanAside_span on Span {
|
|
|
1307
1307
|
score
|
|
1308
1308
|
}
|
|
1309
1309
|
}
|
|
1310
|
-
`}}}();
|
|
1310
|
+
`}}}();yi.hash="cb5cab60889623d77ad0c96c98b3f8ac";const fi=function(){var n={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null};return{argumentDefinitions:[],kind:"Fragment",metadata:{refetch:{connection:null,fragmentPathInResult:["node"],operation:yi,identifierInfo:{identifierField:"id",identifierQueryVariableName:"id"}}},name:"SpanAside_span",selections:[n,{alias:"code",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:"tokenCountTotal",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"tokenCountPrompt",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"tokenCountCompletion",storageKey:null},{alias:null,args:null,concreteType:"SpanAnnotation",kind:"LinkedField",name:"spanAnnotations",plural:!0,selections:[n,{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"label",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"annotatorKind",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"score",storageKey:null}],storageKey:null}],type:"Span",abstractKey:null}}();fi.hash="cb5cab60889623d77ad0c96c98b3f8ac";const fu=C`
|
|
1311
1311
|
display: flex;
|
|
1312
1312
|
padding-top: var(--ac-global-dimension-size-50);
|
|
1313
1313
|
flex-direction: column;
|
|
1314
1314
|
gap: var(--ac-global-dimension-size-100);
|
|
1315
1315
|
align-items: flex-start;
|
|
1316
|
-
`;function hu(n){const[a]=D.useRefetchableFragment(
|
|
1316
|
+
`;function hu(n){const[a]=D.useRefetchableFragment(fi,n.span),{startTime:l,endTime:t,code:i,tokenCountCompletion:r,tokenCountPrompt:o,tokenCountTotal:c}=a,d=u.useMemo(()=>new Date(l),[l]),g=u.useMemo(()=>t?new Date(t):null,[t]),f=u.useMemo(()=>g?g.getTime()-d.getTime():null,[g,d]),m=Zl(i),p=a.spanAnnotations,y=p.length>0;return e(F,{padding:"size-200",borderColor:"dark",backgroundColor:"dark",borderLeftWidth:"thin",width:"230px",flex:"none",minHeight:"100%",children:s(h,{direction:"column",gap:"size-200",children:[e(Tn,{label:"Status",children:s(h,{direction:"row",gap:"size-50",alignItems:"center",children:[e(Ca,{statusCode:i}),e(K,{textSize:"xlarge",color:m,children:i})]})}),e(Tn,{label:"Start Time",children:e(K,{textSize:"xlarge",children:Qe(d)})}),g&&e(Tn,{label:"End Time",children:e(K,{textSize:"xlarge",children:Qe(g)})}),e(Tn,{label:"Latency",children:e(K,{textSize:"xlarge",children:typeof f=="number"?e(we,{latencyMs:f,textSize:"xlarge"}):"--"})}),c?e(Tn,{label:"Total Tokens",children:e(Fa,{tokenCountTotal:c,tokenCountPrompt:o??0,tokenCountCompletion:r??0,textSize:"xlarge"})},"tokens"):null,y&&e(Tn,{label:"Feedback",children:e("ul",{css:fu,children:p.map(b=>e("li",{children:e(xn,{annotation:b,annotationDisplayPreference:"label"})},b.id))})})]})})}function Tn({label:n,children:a}){return s(h,{direction:"column",children:[e(K,{elementType:"h3",textSize:"medium",color:"text-700",children:n}),a]})}function ku(n){const{spanId:a,traceId:l}=n;return e("div",{css:C`
|
|
1317
1317
|
button.ac-dropdown-button {
|
|
1318
1318
|
min-width: 50px;
|
|
1319
1319
|
.ac-dropdown-button__text {
|
|
1320
1320
|
padding-right: 10px;
|
|
1321
1321
|
}
|
|
1322
1322
|
}
|
|
1323
|
-
`,children:s(tn,{placement:"bottom right",children:[e(
|
|
1323
|
+
`,children:s(tn,{placement:"bottom right",children:[e(Ja,{addonBefore:e(P,{svg:e(I.Code,{})}),children:"Code"}),e(ha,{children:e(F,{padding:"size-200",children:s(ye,{children:[s(h,{direction:"row",gap:"size-100",alignItems:"end",children:[e(X,{label:"Span ID",isReadOnly:!0,value:a}),e(le,{text:a,size:"default"})]}),s(h,{direction:"row",gap:"size-100",alignItems:"end",children:[e(X,{label:"Trace ID",isReadOnly:!0,value:l}),e(le,{text:l,size:"default"})]})]})})})]})})}const hi={argumentDefinitions:[],kind:"Fragment",metadata:null,name:"SpanFeedback_annotations",selections:[{alias:null,args:null,concreteType:"SpanAnnotation",kind:"LinkedField",name:"spanAnnotations",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"label",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"score",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"explanation",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"annotatorKind",storageKey:null}],storageKey:null}],type:"Span",abstractKey:null};hi.hash="6199ecd4f0143cffbaa2fe5e19a8739c";function bu(){const[n,a]=u.useState(null);return s(F,{padding:"size-200",children:[s(h,{direction:"column",gap:"size-100",alignItems:"center",children:[e(ba,{graphicKey:"documents"}),e(K,{children:"No annotations for this span"}),e(M,{variant:"default",size:"compact",onClick:()=>{a(e(H,{title:"Span Annotations",isDismissable:!0,children:s(F,{padding:"size-200",children:[e("p",{css:C`
|
|
1324
1324
|
margin: 0 0 var(--ac-global-dimension-size-100) 0;
|
|
1325
|
-
`,children:"Annotations are pivotal for tracking and improving the performance of your application. Phoenix allows for both LLM and HUMAN annotations."}),e(
|
|
1325
|
+
`,children:"Annotations are pivotal for tracking and improving the performance of your application. Phoenix allows for both LLM and HUMAN annotations."}),e(je,{href:"https://docs.arize.com/phoenix/tracing/concepts-tracing/how-to-evaluate-traces",children:"View annotation documentation"})]})}))},icon:e(P,{svg:e(I.Edit2Outline,{})}),children:"How to Annotate"})]}),e(W,{onDismiss:()=>a(null),isDismissable:!0,children:n})]})}const Su=[{header:"name",accessorKey:"name",size:100},{header:"label",accessorKey:"label",size:100},{header:"score",accessorKey:"score",size:100},{header:"explanation",accessorKey:"explanation",cell:Ho,size:400}];function Cl({annotations:n}){const a=u.useMemo(()=>[...n],[n]),l=he({columns:Su,data:a,getCoreRowModel:ke()}),i=l.getRowModel().rows.length===0;return s("table",{css:We,children:[e("thead",{children:l.getHeaderGroups().map(r=>e("tr",{children:r.headers.map(o=>e("th",{colSpan:o.colSpan,children:o.isPlaceholder?null:e(U,{children:Z(o.column.columnDef.header,o.getContext())})},o.id))},r.id))}),i?e(Je,{}):e("tbody",{children:l.getRowModel().rows.map(r=>e("tr",{children:r.getVisibleCells().map(o=>e("td",{style:{width:o.column.getSize()},children:Z(o.column.columnDef.cell,o.getContext())},o.id))},r.id))})]})}function vu({span:n}){const a=D.useFragment(hi,n),l=u.useMemo(()=>a.spanAnnotations.filter(r=>r.annotatorKind==="HUMAN"),[a.spanAnnotations]),t=u.useMemo(()=>a.spanAnnotations.filter(r=>r.annotatorKind==="LLM"),[a.spanAnnotations]);return a.spanAnnotations.length>0?s(Ee,{children:[e(de,{id:"evaluations",title:"Evaluations",children:e(Cl,{annotations:t})}),e(de,{id:"human",title:"Human Annotations",children:e(Cl,{annotations:l})})]}):e(bu,{})}function Cu(n){return n==="__REDACTED__"}const Fu=C`
|
|
1326
1326
|
position: relative;
|
|
1327
1327
|
overflow: hidden;
|
|
1328
1328
|
width: 200px;
|
|
@@ -1361,7 +1361,7 @@ fragment SpanAside_span on Span {
|
|
|
1361
1361
|
object-fit: cover;
|
|
1362
1362
|
}
|
|
1363
1363
|
}
|
|
1364
|
-
`;function Ku(n){const[a,l]=u.useState(!1);let t;const i=Cu(n.url);return i?t=e(xu,{}):t=e("img",{src:n.url}),s("div",{className:Vs({"is-expanded":a}),css:Fu,children:[!i&&e(M,{variant:"default",size:"compact",onClick:()=>l(!a),icon:e(P,{svg:a?e(I.CollapseOutline,{}):e(I.ExpandOutline,{})}),"aria-label":"Expand / Collapse Image"}),t]})}const xu=()=>s("svg",{width:"130",height:"130",viewBox:"0 0 130 130",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e("rect",{x:"1.5",y:"1.5",width:"127",height:"127",rx:"6.5",strokeOpacity:"0.8",strokeWidth:"3"}),e("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M40 27.5H90C96.8917 27.5 102.5 33.1083 102.5 40V90C102.5 96.8917 96.8917 102.5 90 102.5H40C33.1083 102.5 27.5 96.8917 27.5 90V40C27.5 33.1083 33.1083 27.5 40 27.5ZM40 35.8333H90C92.3 35.8333 94.1667 37.7 94.1667 40V74.85L80.8208 63.4667C76.6958 59.9583 70.2417 59.9583 66.1542 63.4417L35.8333 88.7417V40C35.8333 37.7 37.7 35.8333 40 35.8333ZM54.5833 50.4167C54.5833 53.8667 51.7833 56.6667 48.3333 56.6667C44.8833 56.6667 42.0833 53.8667 42.0833 50.4167C42.0833 46.9667 44.8833 44.1667 48.3333 44.1667C51.7833 44.1667 54.5833 46.9667 54.5833 50.4167ZM42.3375 94.1667H90C92.3 94.1667 94.1667 92.3 94.1667 90V85.8083L75.4125 69.8083C74.4083 68.9458 72.55 68.9417 71.525 69.8125L42.3375 94.1667Z",fill:"var(--ac-global-color-grey-300)"})]}),
|
|
1364
|
+
`;function Ku(n){const[a,l]=u.useState(!1);let t;const i=Cu(n.url);return i?t=e(xu,{}):t=e("img",{src:n.url}),s("div",{className:Vs({"is-expanded":a}),css:Fu,children:[!i&&e(M,{variant:"default",size:"compact",onClick:()=>l(!a),icon:e(P,{svg:a?e(I.CollapseOutline,{}):e(I.ExpandOutline,{})}),"aria-label":"Expand / Collapse Image"}),t]})}const xu=()=>s("svg",{width:"130",height:"130",viewBox:"0 0 130 130",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e("rect",{x:"1.5",y:"1.5",width:"127",height:"127",rx:"6.5",strokeOpacity:"0.8",strokeWidth:"3"}),e("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M40 27.5H90C96.8917 27.5 102.5 33.1083 102.5 40V90C102.5 96.8917 96.8917 102.5 90 102.5H40C33.1083 102.5 27.5 96.8917 27.5 90V40C27.5 33.1083 33.1083 27.5 40 27.5ZM40 35.8333H90C92.3 35.8333 94.1667 37.7 94.1667 40V74.85L80.8208 63.4667C76.6958 59.9583 70.2417 59.9583 66.1542 63.4417L35.8333 88.7417V40C35.8333 37.7 37.7 35.8333 40 35.8333ZM54.5833 50.4167C54.5833 53.8667 51.7833 56.6667 48.3333 56.6667C44.8833 56.6667 42.0833 53.8667 42.0833 50.4167C42.0833 46.9667 44.8833 44.1667 48.3333 44.1667C51.7833 44.1667 54.5833 46.9667 54.5833 50.4167ZM42.3375 94.1667H90C92.3 94.1667 94.1667 92.3 94.1667 90V85.8083L75.4125 69.8083C74.4083 68.9458 72.55 68.9417 71.525 69.8125L42.3375 94.1667Z",fill:"var(--ac-global-color-grey-300)"})]}),ki=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"input"}],a=[{alias:null,args:[{kind:"Variable",name:"input",variableName:"input"}],concreteType:"DatasetMutationPayload",kind:"LinkedField",name:"addExamplesToDataset",plural:!1,selections:[{alias:null,args:null,concreteType:"Dataset",kind:"LinkedField",name:"dataset",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null}],storageKey:null}],storageKey:null}];return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"SpanToDatasetExampleDialogAddExampleToDatasetMutation",selections:a,type:"Mutation",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"SpanToDatasetExampleDialogAddExampleToDatasetMutation",selections:a},params:{cacheID:"d93c9d47668fc266ba09ecb14c2b72ae",id:null,metadata:{},name:"SpanToDatasetExampleDialogAddExampleToDatasetMutation",operationKind:"mutation",text:`mutation SpanToDatasetExampleDialogAddExampleToDatasetMutation(
|
|
1365
1365
|
$input: AddExamplesToDatasetInput!
|
|
1366
1366
|
) {
|
|
1367
1367
|
addExamplesToDataset(input: $input) {
|
|
@@ -1370,7 +1370,7 @@ fragment SpanAside_span on Span {
|
|
|
1370
1370
|
}
|
|
1371
1371
|
}
|
|
1372
1372
|
}
|
|
1373
|
-
`}}}();
|
|
1373
|
+
`}}}();ki.hash="75120065d239f28304e9dd91fc34bec9";const bi=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"spanId"}],a=[{kind:"Variable",name:"id",variableName:"spanId"}],l={kind:"InlineFragment",selections:[{alias:"revision",args:null,concreteType:"SpanAsExampleRevision",kind:"LinkedField",name:"asExampleRevision",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"input",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"output",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"metadata",storageKey:null}],storageKey:null}],type:"Span",abstractKey:null},t={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null};return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"SpanToDatasetExampleDialogQuery",selections:[{alias:"span",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[l],storageKey:null},{args:null,kind:"FragmentSpread",name:"DatasetPicker__datasets"}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"SpanToDatasetExampleDialogQuery",selections:[{alias:"span",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},l,{kind:"TypeDiscriminator",abstractKey:"__isNode"},t],storageKey:null},{alias:null,args:null,concreteType:"DatasetConnection",kind:"LinkedField",name:"datasets",plural:!1,selections:[{alias:null,args:null,concreteType:"DatasetEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"dataset",args:null,concreteType:"Dataset",kind:"LinkedField",name:"node",plural:!1,selections:[t,{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null}],storageKey:null}],storageKey:null}],storageKey:null}]},params:{cacheID:"340325aadd2b2d81cb509e6b6bee7f0b",id:null,metadata:{},name:"SpanToDatasetExampleDialogQuery",operationKind:"query",text:`query SpanToDatasetExampleDialogQuery(
|
|
1374
1374
|
$spanId: GlobalID!
|
|
1375
1375
|
) {
|
|
1376
1376
|
span: node(id: $spanId) {
|
|
@@ -1398,7 +1398,7 @@ fragment DatasetPicker__datasets on Query {
|
|
|
1398
1398
|
}
|
|
1399
1399
|
}
|
|
1400
1400
|
}
|
|
1401
|
-
`}}}();
|
|
1401
|
+
`}}}();bi.hash="5afd1a4eede339492f5473ed17b770b3";const Si={fragment:{argumentDefinitions:[],kind:"Fragment",metadata:null,name:"DatasetPickerRefetchQuery",selections:[{args:null,kind:"FragmentSpread",name:"DatasetPicker__datasets"}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[],kind:"Operation",name:"DatasetPickerRefetchQuery",selections:[{alias:null,args:null,concreteType:"DatasetConnection",kind:"LinkedField",name:"datasets",plural:!1,selections:[{alias:null,args:null,concreteType:"DatasetEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"dataset",args:null,concreteType:"Dataset",kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null}],storageKey:null}],storageKey:null}],storageKey:null}]},params:{cacheID:"38a431d0ba6fa8c12622a1cbb3d1e446",id:null,metadata:{},name:"DatasetPickerRefetchQuery",operationKind:"query",text:`query DatasetPickerRefetchQuery {
|
|
1402
1402
|
...DatasetPicker__datasets
|
|
1403
1403
|
}
|
|
1404
1404
|
|
|
@@ -1412,7 +1412,7 @@ fragment DatasetPicker__datasets on Query {
|
|
|
1412
1412
|
}
|
|
1413
1413
|
}
|
|
1414
1414
|
}
|
|
1415
|
-
`}};
|
|
1415
|
+
`}};Si.hash="03d88d1706089bb63edcd44d04563cbc";const vi={argumentDefinitions:[],kind:"Fragment",metadata:{refetch:{connection:null,fragmentPathInResult:[],operation:Si}},name:"DatasetPicker__datasets",selections:[{alias:null,args:null,concreteType:"DatasetConnection",kind:"LinkedField",name:"datasets",plural:!1,selections:[{alias:null,args:null,concreteType:"DatasetEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"dataset",args:null,concreteType:"Dataset",kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null}],storageKey:null}],storageKey:null}],storageKey:null}],type:"Query",abstractKey:null};vi.hash="03d88d1706089bb63edcd44d04563cbc";function Du(n){const[a,l]=D.useRefetchableFragment(vi,n.query);return s(h,{direction:"row",gap:"size-100",alignItems:"end",children:[e(Nn,{label:"dataset","data-testid":"dataset-picker",className:"dataset-picker",width:"100%","aria-label":"The dataset to add the example to",onSelectionChange:n.onSelectionChange,placeholder:"Select a dataset",onBlur:n.onBlur,isRequired:!0,validationState:n.validationState,errorMessage:n.errorMessage,children:a.datasets.edges.map(({dataset:t})=>e(B,{children:t.name},t.id))}),e(Tu,{onDatasetCreated:()=>{u.startTransition(()=>{l({},{fetchPolicy:"store-and-network"})})}})]})}function Tu({onDatasetCreated:n}){const[a,l]=u.useState(null),[t,i]=u.useState(!1),r=oe();return s(tn,{placement:"bottom right",isOpen:t,onOpenChange:o=>{l(null),i(o)},children:[e(M,{variant:"default",icon:e(P,{svg:e(I.PlusCircleOutline,{})}),"aria-label":"Create a new dataset"}),e(V,{title:"Create New Dataset",bodyStyle:{padding:0},variant:"compact",borderColor:"light",backgroundColor:"light",children:s(F,{width:"500px",children:[a?e(ne,{variant:"danger",children:a}):null,e(nl,{onDatasetCreateError:o=>l(o.message),onDatasetCreated:({id:o,name:c})=>{l(null),i(!1),r({title:"Dataset Created",message:`Dataset "${c}" created successfully`}),n(o)}})]})})]})}const Ra={backgroundColor:"light",borderColor:"light",collapsible:!0,bodyStyle:{padding:0}};function Iu({spanId:n,onCompleted:a}){const[l,t]=u.useState(null),i=D.useLazyLoadQuery(bi,{spanId:n},{fetchPolicy:"store-and-network"}),{span:{revision:r}}=i,[o,c]=D.useMutation(ki),{control:d,setError:g,handleSubmit:f,formState:{isValid:m}}=Ie({defaultValues:{input:JSON.stringify(r==null?void 0:r.input,null,2),output:JSON.stringify(r==null?void 0:r.output,null,2),metadata:JSON.stringify(r==null?void 0:r.metadata,null,2),datasetId:""}}),p=u.useCallback(y=>{if(t(null),!Oe(y==null?void 0:y.input))return g("input",{message:"Input must be a valid JSON object"});if(!Oe(y==null?void 0:y.output))return g("output",{message:"Output must be a valid JSON object"});if(!Oe(y==null?void 0:y.metadata))return g("metadata",{message:"Metadata must be a valid JSON object"});if(!(y!=null&&y.datasetId))return g("datasetId",{message:"Dataset is required"});o({variables:{input:{datasetId:y.datasetId,examples:[{input:JSON.parse(y.input),output:JSON.parse(y.output),metadata:JSON.parse(y.metadata),spanId:n}]}},onCompleted:()=>{a(y.datasetId)},onError:b=>{t(b.message)}})},[o,g,n,a]);return e(H,{size:"fullscreen",title:"Add Example to Dataset",extra:e(M,{variant:"primary",size:"compact",disabled:!m||c,loading:c,onClick:f(p),icon:e(P,{svg:e(I.PlusCircleOutline,{})}),children:"Add Example"}),children:e("div",{css:C`
|
|
1416
1416
|
overflow-y: auto;
|
|
1417
1417
|
padding: var(--ac-global-dimension-size-400);
|
|
1418
1418
|
/* Make widths configurable */
|
|
@@ -1423,7 +1423,7 @@ fragment DatasetPicker__datasets on Query {
|
|
|
1423
1423
|
width: 100%;
|
|
1424
1424
|
}
|
|
1425
1425
|
}
|
|
1426
|
-
`,children:e(h,{direction:"row",justifyContent:"center",children:e(F,{width:"900px",paddingStart:"auto",paddingEnd:"auto",children:s(h,{direction:"column",gap:"size-200",children:[l?e(
|
|
1426
|
+
`,children:e(h,{direction:"row",justifyContent:"center",children:e(F,{width:"900px",paddingStart:"auto",paddingEnd:"auto",children:s(h,{direction:"column",gap:"size-200",children:[l?e(ne,{variant:"danger",children:l}):null,e(G,{control:d,name:"datasetId",render:({field:{onChange:y,onBlur:b},fieldState:{invalid:k,error:S}})=>e(Du,{onSelectionChange:y,onBlur:b,validationState:k?"invalid":"valid",errorMessage:S==null?void 0:S.message,query:i})}),e(G,{control:d,name:"input",render:({field:{onChange:y,onBlur:b,value:k},fieldState:{invalid:S,error:v}})=>s(V,{title:"Input",subTitle:"The input to the LLM, retriever, program, etc.",...Ra,children:[S?e(ne,{variant:"danger",banner:!0,children:v==null?void 0:v.message}):null,e(Re,{value:k,onChange:y,onBlur:b})]})}),e(G,{control:d,name:"output",render:({field:{onChange:y,onBlur:b,value:k},fieldState:{invalid:S,error:v}})=>s(V,{title:"Output",subTitle:"The output of the LLM or program to be used as an expected output",...Ra,backgroundColor:"green-100",borderColor:"green-700",children:[S?e(ne,{variant:"danger",banner:!0,children:v==null?void 0:v.message}):null,e(Re,{value:k,onChange:y,onBlur:b})]})}),e(G,{control:d,name:"metadata",render:({field:{onChange:y,onBlur:b,value:k},fieldState:{invalid:S,error:v}})=>s(V,{title:"Metadata",subTitle:"All data from the span to use during experimentation or evaluation",...Ra,children:[S?e(ne,{variant:"danger",banner:!0,children:v==null?void 0:v.message}):null,e(Re,{value:k,onChange:y,onBlur:b})]})})]})})})})})}const Lu=n=>u.useMemo(()=>ll(n),[n]),Pu=n=>n.events.some(a=>a.name==="exception"),te={backgroundColor:"light",borderColor:"light",variant:"compact",collapsible:!0};function wu({spanNodeId:n,projectId:a}){const l=Ta("playground"),t=Y(),{span:i}=D.useLazyLoadQuery(ii,{spanId:n});if(i.__typename!=="Span")throw new Error("Expected a span, but got a different type"+i.__typename);const r=u.useMemo(()=>Pu(i),[i]),o=Sn(d=>d.showSpanAside),c=Sn(d=>d.setShowSpanAside);return s(h,{direction:"column",flex:"1 1 auto",height:"100%",children:[e(F,{paddingTop:"size-100",paddingBottom:"size-100",paddingStart:"size-150",paddingEnd:"size-200",flex:"none",children:s(h,{direction:"row",gap:"size-200",alignItems:"center",children:[s(h,{direction:"row",gap:"size-100",width:"100%",height:"100%",alignItems:"center",children:[e(al,{spanKind:i.spanKind}),e(K,{children:i.name})]}),s(h,{flex:"none",direction:"row",alignItems:"center",gap:"size-100",children:[l?e(M,{variant:"default",icon:e(P,{svg:e(I.PlayCircleOutline,{})}),disabled:i.spanKind!=="llm",onClick:()=>{t(`/playground/spans/${i.id}`)},children:"Playground"}):null,e(ku,{traceId:i.context.traceId,spanId:i.context.spanId}),e(Eu,{span:i}),e(yu,{spanNodeId:i.id,projectId:a}),s(Le,{placement:"top",offset:5,children:[e(M,{variant:"default","aria-label":"Toggle showing span details",onClick:()=>{c(!o)},icon:e(P,{svg:o?e(I.SlideIn,{}):e(I.SlideOut,{})})}),e(An,{children:o?"Hide Span Details":"Show Span Details"})]})]})]})}),s(Te,{children:[e(J,{name:"Info",children:s(h,{direction:"row",height:"100%",children:[e(_u,{children:e(Xl,{children:e(Ru,{span:i})})}),o?e(hu,{span:i}):null]})}),e(J,{name:"Feedback",extra:e(Me,{variant:"light",children:i.spanAnnotations.length}),children:d=>d?e(vu,{span:i}):null}),e(J,{name:"Attributes",title:"Attributes",children:e(F,{padding:"size-200",children:e(V,{title:"All Attributes",...te,titleExtra:Ki,extra:e(le,{text:i.attributes}),bodyStyle:{padding:0},children:e(nn,{children:i.attributes})})})}),e(J,{name:"Events",extra:e(Me,{variant:r?"danger":"light",children:i.events.length}),children:e(Xu,{events:i.events})})]})]})}const Au=C`
|
|
1427
1427
|
flex: 1 1 auto;
|
|
1428
1428
|
overflow-y: auto;
|
|
1429
1429
|
// Overflow fails to take into account padding
|
|
@@ -1432,36 +1432,36 @@ fragment DatasetPicker__datasets on Query {
|
|
|
1432
1432
|
display: block;
|
|
1433
1433
|
height: var(--ac-global-dimension-static-size-400);
|
|
1434
1434
|
}
|
|
1435
|
-
`;function _u({children:n}){return e("div",{css:Au,"data-testid":"span-info-wrap",children:n})}function Eu({span:n}){const[a,l]=u.useState(null),t=oe(),i=
|
|
1435
|
+
`;function _u({children:n}){return e("div",{css:Au,"data-testid":"span-info-wrap",children:n})}function Eu({span:n}){const[a,l]=u.useState(null),t=oe(),i=Y(),r=u.useCallback(()=>{l(e(Iu,{spanId:n.id,onCompleted:o=>{l(null),t({title:"Span Added to Dataset",message:"Successfully added span to dataset",action:{text:"View Dataset",onClick:()=>{i(`/datasets/${o}/examples`)}}})}}))},[n.id,t,i]);return s(U,{children:[e(M,{variant:"default",icon:e(P,{svg:e(I.DatabaseOutline,{})}),onClick:r,children:"Add to Dataset"}),e(u.Suspense,{children:e(W,{type:"slideOver",isDismissable:!0,onDismiss:()=>l(null),children:a})})]})}function Ru({span:n}){const{spanKind:a,attributes:l}=n,{json:t,parseError:i}=Lu(l),r=u.useMemo(()=>n.statusMessage?e(ne,{variant:"danger",title:"Status Description",children:n.statusMessage}):null,[n]);if(i||!t)return e(F,{padding:"size-200",children:s(h,{direction:"column",gap:"size-200",children:[r,e(ne,{variant:"warning",title:"Un-parsable attributes",children:`Failed to parse span attributes. ${i instanceof Error?i.message:""}`}),e(V,{...te,title:"Attributes",children:e(F,{padding:"size-100",children:l})})]})});let o;switch(a){case"llm":{o=e(Mu,{span:n,spanAttributes:t});break}case"retriever":{o=e(Nu,{span:n,spanAttributes:t});break}case"reranker":{o=e(Vu,{span:n,spanAttributes:t});break}case"embedding":{o=e(zu,{span:n,spanAttributes:t});break}case"tool":{o=e($u,{span:n,spanAttributes:t});break}default:o=e(Ci,{span:n})}return e(F,{padding:"size-200",children:s(h,{direction:"column",gap:"size-200",children:[r,o,t!=null&&t.metadata?e(V,{...te,title:"Metadata",children:e(nn,{children:JSON.stringify(t.metadata)})}):null]})})}function Mu(n){const{spanAttributes:a,span:l}=n,{input:t,output:i}=l,r=u.useMemo(()=>a[se.llm]||null,[a]),o=u.useMemo(()=>{if(r==null)return null;const E=r[_e.model_name];return typeof E=="string"?E:null},[r]),c=u.useMemo(()=>{if(r==null)return[];const E=r[_e.input_messages];return vl(E)?(E==null?void 0:E.map(R=>R[se.message]).filter(Boolean))||[]:[]},[r]),d=u.useMemo(()=>{if(r==null)return[];const E=r[_e.tools];return Array.isArray(E)?E==null?void 0:E.map(j=>j[se.tool]).filter(Boolean):[]},[r]),g=u.useMemo(()=>d.reduce((E,R)=>(R!=null&&R.json_schema&&E.push(R.json_schema),E),[]),[d]),f=u.useMemo(()=>{if(r==null)return[];const E=r[_e.output_messages];return vl(E)?E.map(R=>R[se.message]).filter(Boolean)||[]:[]},[r]),m=u.useMemo(()=>{if(r==null)return[];const E=r[_e.prompts];return Go(E)?E:[]},[r]),p=u.useMemo(()=>{if(r==null)return null;const E=r[_e.prompt_template];return E??null},[r]),y=u.useMemo(()=>r==null?"{}":r[_e.invocation_parameters]||"{}",[r]),b=u.useMemo(()=>o==null?null:s(h,{direction:"row",gap:"size-100",alignItems:"center",children:[e(Yl,{spanKind:"llm"}),e(K,{textSize:"large",weight:"heavy",children:o})]}),[o]),k=t!=null&&t.value!=null,S=c.length>0,v=g.length>0,w=i!=null&&i.value!=null,L=f.length>0,A=m.length>0,x=Object.keys(JSON.parse(y)).length>0,T=p!=null;return s(h,{direction:"column",gap:"size-200",children:[e(V,{collapsible:!0,backgroundColor:"light",borderColor:"light",bodyStyle:{padding:0},titleSeparator:!1,variant:"compact",title:b,children:s(Te,{children:[S?e(J,{name:"Input Messages",hidden:!S,children:e(Fl,{messages:c})}):null,v?e(J,{name:"Tools",hidden:!v,children:e(qu,{toolSchemas:g})}):null,k?e(J,{name:"Input",hidden:!k,children:e(F,{padding:"size-200",children:e(Ae,{children:e(V,{...te,title:"LLM Input",extra:s(h,{direction:"row",gap:"size-100",children:[e(qe,{}),e(le,{text:t.value})]}),children:e(Ue,{...t})})})})}):null,T?e(J,{name:"Prompt Template",hidden:!T,children:e(F,{padding:"size-200",children:s(h,{direction:"column",gap:"size-100",children:[e(F,{borderRadius:"medium",borderColor:"light",backgroundColor:"light",borderWidth:"thin",padding:"size-200",children:s(ma,{text:p.template,children:[e(K,{color:"text-700",fontStyle:"italic",children:"prompt template"}),e(Fi,{children:p.template})]})}),e(F,{borderRadius:"medium",borderColor:"light",backgroundColor:"light",borderWidth:"thin",padding:"size-200",children:s(ma,{text:JSON.stringify(p.variables),children:[e(K,{color:"text-700",fontStyle:"italic",children:"template variables"}),e(nn,{children:JSON.stringify(p.variables)})]})})]})})}):null,e(J,{name:"Prompts",hidden:!A,children:e(Uu,{prompts:m})}),e(J,{name:"Invocation Params",hidden:!x,children:e(ma,{text:y,padding:"size-100",children:e(nn,{children:y})})})]})}),w||L?e(Wa,{...te,children:s(Te,{children:[L?e(J,{name:"Output Messages",hidden:!L,children:e(Fl,{messages:f})}):null,w?e(J,{name:"Output",hidden:!w,children:e(F,{padding:"size-200",children:e(Ae,{children:e(V,{...te,title:"LLM Output",extra:s(h,{direction:"row",gap:"size-100",children:[e(qe,{}),e(le,{text:i.value})]}),children:e(Ue,{...i})})})})}):null]})}):null]})}function Nu(n){const{spanAttributes:a,span:l}=n,{input:t}=l,i=u.useMemo(()=>a[se.retrieval]||null,[a]),r=u.useMemo(()=>{var f;return i==null?[]:((f=i[zs.documents])==null?void 0:f.map(m=>m[se.document]).filter(Boolean))||[]},[i]),o=u.useMemo(()=>l.documentEvaluations.reduce((m,p)=>{const y=p.documentPosition,b=m[y]||[];return{...m,[y]:[...b,p]}},{}),[l.documentEvaluations]),c=t!=null&&t.value!=null,d=r.length>0,g=l.documentRetrievalMetrics.length>0;return s(h,{direction:"column",gap:"size-200",children:[c?e(Ae,{children:e(V,{title:"Input",...te,extra:s(h,{direction:"row",gap:"size-100",children:[e(qe,{}),e(le,{text:t.value})]}),children:e(Ue,{...t})})}):null,d?e(Ae,{children:e(V,{title:"Documents",...te,titleExtra:g&&e(h,{direction:"row",alignItems:"center",gap:"size-100",children:l.documentRetrievalMetrics.map(f=>s(U,{children:[e(De,{name:f.evaluationName,metric:"ndcg",score:f.ndcg},"ndcg"),e(De,{name:f.evaluationName,metric:"precision",score:f.precision},"precision"),e(De,{name:f.evaluationName,metric:"hit",score:f.hit},"hit")]}))}),extra:e(qe,{}),children:e("ul",{css:C`
|
|
1436
1436
|
display: flex;
|
|
1437
1437
|
flex-direction: column;
|
|
1438
1438
|
gap: var(--ac-global-dimension-static-size-200);
|
|
1439
|
-
`,children:r.map((f,m)=>e("li",{children:e(
|
|
1439
|
+
`,children:r.map((f,m)=>e("li",{children:e(Ba,{document:f,documentEvaluations:o[m],borderColor:"seafoam-700",backgroundColor:"seafoam-100",labelColor:"seafoam-1000"})},m))})})}):null]})}function Vu(n){const{spanAttributes:a}=n,l=u.useMemo(()=>a[se.reranker]||null,[a]),t=u.useMemo(()=>l==null?null:l[La.query]||null,[l]),i=u.useMemo(()=>{var d;return l==null?[]:((d=l[La.input_documents])==null?void 0:d.map(g=>g[se.document]).filter(Boolean))||[]},[l]),r=u.useMemo(()=>{var d;return l==null?[]:((d=l[La.output_documents])==null?void 0:d.map(g=>g[se.document]).filter(Boolean))||[]},[l]),o=i.length,c=r.length;return s(h,{direction:"column",gap:"size-200",children:[e(Ae,{children:t&&e(V,{title:"Query",...te,children:e(ta,{children:t})})}),e(V,{title:"Input Documents",titleExtra:e(Me,{variant:"light",children:o}),...te,defaultOpen:!1,bodyStyle:{padding:0},children:e("ul",{css:C`
|
|
1440
1440
|
padding: var(--ac-global-dimension-static-size-200);
|
|
1441
1441
|
display: flex;
|
|
1442
1442
|
flex-direction: column;
|
|
1443
1443
|
gap: var(--ac-global-dimension-static-size-200);
|
|
1444
|
-
`,children:i.map((d,g)=>e("li",{children:e(
|
|
1444
|
+
`,children:i.map((d,g)=>e("li",{children:e(Ba,{document:d,borderColor:"seafoam-700",backgroundColor:"seafoam-100",labelColor:"seafoam-1000"})},g))})}),e(V,{title:"Output Documents",titleExtra:e(Me,{variant:"light",children:c}),...te,bodyStyle:{padding:0},children:e("ul",{css:C`
|
|
1445
1445
|
padding: var(--ac-global-dimension-static-size-200);
|
|
1446
1446
|
display: flex;
|
|
1447
1447
|
flex-direction: column;
|
|
1448
1448
|
gap: var(--ac-global-dimension-static-size-200);
|
|
1449
|
-
`,children:r.map((d,g)=>e("li",{children:e(
|
|
1449
|
+
`,children:r.map((d,g)=>e("li",{children:e(Ba,{document:d,borderColor:"celery-700",backgroundColor:"celery-100",labelColor:"celery-1000"})},g))})})]})}function zu(n){const{spanAttributes:a}=n,l=u.useMemo(()=>a[se.embedding]||null,[a]),t=u.useMemo(()=>{var o;return l==null?[]:((o=l[Pa.embeddings])==null?void 0:o.map(c=>c[se.embedding]).filter(Boolean))||[]},[l]),i=t.length>0,r=l==null?void 0:l[Pa.model_name];return e(h,{direction:"column",gap:"size-200",children:i?e(V,{title:"Embeddings"+(typeof r=="string"?`: ${r}`:""),...te,children:e("ul",{css:C`
|
|
1450
1450
|
display: flex;
|
|
1451
1451
|
flex-direction: column;
|
|
1452
1452
|
gap: var(--ac-global-dimension-static-size-200);
|
|
1453
|
-
`,children:t.map((o,c)=>e("li",{children:e(Ae,{children:e(V,{...te,backgroundColor:"purple-100",borderColor:"purple-700",title:"Embedded Text",children:e(ta,{children:o[
|
|
1453
|
+
`,children:t.map((o,c)=>e("li",{children:e(Ae,{children:e(V,{...te,backgroundColor:"purple-100",borderColor:"purple-700",title:"Embedded Text",children:e(ta,{children:o[Pa.text]||""})})})},c))})}):e(Ci,{span:n.span})})}function $u(n){const{span:a,spanAttributes:l}=n,{input:t,output:i}=a,r=typeof(t==null?void 0:t.value)=="string",o=typeof(i==null?void 0:i.value)=="string",c=(t==null?void 0:t.mimeType)==="text",d=(i==null?void 0:i.mimeType)==="text",g=u.useMemo(()=>l[se.tool]||{},[l]),f=Object.keys(g).length>0,m=g[wa.name],p=g[wa.description],y=g[wa.parameters];return!r&&!o&&!f?null:s(h,{direction:"column",gap:"size-200",children:[r?e(Ae,{children:e(V,{title:"Input",...te,extra:s(h,{direction:"row",gap:"size-100",children:[c?e(qe,{}):null,e(le,{text:t.value})]}),children:e(Ue,{...t})})}):null,o?e(Ae,{children:e(V,{title:"Output",...te,backgroundColor:"green-100",borderColor:"green-700",extra:s(h,{direction:"row",gap:"size-100",children:[d?e(qe,{}):null,e(le,{text:i.value})]}),children:e(Ue,{...i})})}):null,f?e(V,{title:"Tool"+(typeof m=="string"?`: ${m}`:""),...te,children:s(h,{direction:"column",children:[p!=null?e(F,{paddingStart:"size-200",paddingEnd:"size-200",paddingTop:"size-100",paddingBottom:"size-100",borderBottomColor:"dark",borderBottomWidth:"thin",backgroundColor:"light",children:s(h,{direction:"column",alignItems:"start",gap:"size-50",children:[e(K,{color:"text-700",fontStyle:"italic",children:"Description"}),e(K,{children:p})]})}):null,y!=null?e(F,{paddingStart:"size-200",paddingEnd:"size-200",paddingTop:"size-100",paddingBottom:"size-100",borderBottomColor:"dark",borderBottomWidth:"thin",children:s(h,{direction:"column",alignItems:"start",width:"100%",children:[e(K,{color:"text-700",fontStyle:"italic",children:"Parameters"}),e(nn,{children:JSON.stringify(y)})]})}):null]})}):null]})}const Ou=["irrelevant","unrelated"];function Ba({document:n,documentEvaluations:a,backgroundColor:l,borderColor:t,labelColor:i}){const r=n[Un.metadata],o=a&&a.length,c=n[Un.content];return e(V,{...te,backgroundColor:l,borderColor:t,bodyStyle:{padding:0},title:s(h,{direction:"row",gap:"size-50",alignItems:"center",children:[e(P,{svg:e(I.FileOutline,{})}),s(re,{level:4,children:["document ",n[Un.id]]})]}),extra:typeof n[Un.score]=="number"&&e(Xn,{color:i,children:`score ${Ya(n[Un.score])}`}),children:s(h,{direction:"column",children:[c&&e(F,{padding:"size-200",children:e(ta,{children:c})}),r&&e(U,{children:e(F,{borderColor:t,borderTopWidth:"thin",children:e(nn,{children:JSON.stringify(r)})})}),o&&e(F,{borderColor:t,borderTopWidth:"thin",padding:"size-200",children:s(h,{direction:"column",gap:"size-100",children:[e(re,{level:3,weight:"heavy",children:"Evaluations"}),e("ul",{children:a.map((d,g)=>{const f=d.label&&Ou.includes(d.label)?"danger":i;return e("li",{children:e(F,{padding:"size-200",borderWidth:"thin",borderColor:t,borderRadius:"medium",children:s(h,{direction:"column",gap:"size-50",children:[s(h,{direction:"row",gap:"size-100",children:[e(K,{weight:"heavy",elementType:"h5",children:d.name}),d.label&&e(Xn,{color:f,shape:"badge",children:d.label}),typeof d.score=="number"&&e(Xn,{color:f,shape:"badge",children:s(h,{direction:"row",gap:"size-50",children:[e(K,{textSize:"xsmall",weight:"heavy",color:"inherit",children:"score"}),e(K,{textSize:"xsmall",children:ze(d.score)})]})})]}),typeof d.explanation&&e("p",{css:C`
|
|
1454
1454
|
margin-top: var(
|
|
1455
1455
|
--ac-global-dimension-static-size-100
|
|
1456
1456
|
);
|
|
1457
1457
|
margin-bottom: 0;
|
|
1458
|
-
`,children:d.explanation})]})})},g)})})]})})]})})}function Qu({message:n}){var c;const a=n[ve.content],l=n[ve.contents],t=((c=n[ve.tool_calls])==null?void 0:c.map(d=>d[se.tool_call]).filter(Boolean))||[],i=n[ve.function_call_arguments_json]&&n[ve.function_call_name],r=n[ve.role]||"unknown",o=
|
|
1458
|
+
`,children:d.explanation})]})})},g)})})]})})]})})}function Qu({message:n}){var c;const a=n[ve.content],l=n[ve.contents],t=((c=n[ve.tool_calls])==null?void 0:c.map(d=>d[se.tool_call]).filter(Boolean))||[],i=n[ve.function_call_arguments_json]&&n[ve.function_call_name],r=n[ve.role]||"unknown",o=ol(r);return e(Ae,{children:s(V,{...te,...o,title:r+(n[ve.name]?`: ${n[ve.name]}`:""),extra:s(h,{direction:"row",gap:"size-100",children:[e(qe,{}),e(le,{text:a||JSON.stringify(n)})]}),children:[e(Xl,{children:l?e(Hu,{messageContents:l}):null}),s(h,{direction:"column",alignItems:"start",children:[a?e(ta,{children:a}):null,t.length>0?t.map((d,g)=>{var f,m;return s("pre",{css:C`
|
|
1459
1459
|
text-wrap: wrap;
|
|
1460
1460
|
margin: var(--ac-global-dimension-static-size-100) 0;
|
|
1461
1461
|
`,children:[(f=d==null?void 0:d.function)==null?void 0:f.name,"(",JSON.stringify(JSON.parse((m=d==null?void 0:d.function)==null?void 0:m.arguments),null,2),")"]},g)}):null,i?s("pre",{css:C`
|
|
1462
1462
|
text-wrap: wrap;
|
|
1463
1463
|
margin: var(--ac-global-dimension-static-size-100) 0;
|
|
1464
|
-
`,children:[n[ve.function_call_name],"(",JSON.stringify(JSON.parse(n[ve.function_call_arguments_json]),null,2),")"]}):null]})]})})}function ju({toolSchema:n,index:a}){return e(V,{title:s(h,{direction:"row",gap:"size-100",alignItems:"center",children:[e(
|
|
1464
|
+
`,children:[n[ve.function_call_name],"(",JSON.stringify(JSON.parse(n[ve.function_call_arguments_json]),null,2),")"]}):null]})]})})}function ju({toolSchema:n,index:a}){return e(V,{title:s(h,{direction:"row",gap:"size-100",alignItems:"center",children:[e(Yl,{spanKind:"tool"}),e(K,{textSize:"large",weight:"heavy",children:"Tool"})]}),titleExtra:s(Me,{variant:"light",children:["#",a+1]}),...te,backgroundColor:"yellow-100",borderColor:"yellow-700",bodyStyle:{padding:0},extra:e(le,{text:n}),children:e(Ue,{value:n,mimeType:"json"})})}function Fl({messages:n}){return e("ul",{css:C`
|
|
1465
1465
|
display: flex;
|
|
1466
1466
|
flex-direction: column;
|
|
1467
1467
|
gap: var(--ac-global-dimension-static-size-100);
|
|
@@ -1487,7 +1487,7 @@ fragment DatasetPicker__datasets on Query {
|
|
|
1487
1487
|
white-space: pre-wrap;
|
|
1488
1488
|
padding: 0;
|
|
1489
1489
|
margin: 0;
|
|
1490
|
-
`,children:l}):null,i?e(Ku,{url:i}):null]})}function
|
|
1490
|
+
`,children:l}):null,i?e(Ku,{url:i}):null]})}function Ci({span:n}){const{input:a,output:l}=n,t=a==null&&l==null,i=(a==null?void 0:a.mimeType)==="text",r=(l==null?void 0:l.mimeType)==="text";return s(h,{direction:"column",gap:"size-200",children:[a&&a.value!=null?e(Ae,{children:e(V,{title:"Input",...te,extra:s(h,{direction:"row",gap:"size-100",children:[i?e(qe,{}):null,e(le,{text:a.value})]}),children:e(Ue,{...a})})}):null,l&&l.value!=null?e(Ae,{children:e(V,{title:"Output",...te,backgroundColor:"green-100",borderColor:"green-700",extra:s(h,{direction:"row",gap:"size-100",children:[r?e(qe,{}):null,e(le,{text:l.value})]}),children:e(Ue,{...l})})}):null,t?e(V,{title:"All Attributes",titleExtra:Ki,...te,bodyStyle:{padding:0},extra:e(le,{text:n.attributes}),children:e(nn,{children:n.attributes})}):null]})}const Ju=C`
|
|
1491
1491
|
.cm-content {
|
|
1492
1492
|
padding: var(--ac-global-dimension-static-size-200) 0;
|
|
1493
1493
|
}
|
|
@@ -1508,10 +1508,10 @@ fragment DatasetPicker__datasets on Query {
|
|
|
1508
1508
|
&:hover .copy-to-clipboard-button {
|
|
1509
1509
|
opacity: 1;
|
|
1510
1510
|
}
|
|
1511
|
-
`,children:[e(le,{text:n}),a]})}function nn({children:n}){const{theme:a}=
|
|
1511
|
+
`,children:[e(le,{text:n}),a]})}function nn({children:n}){const{theme:a}=zn(),l=a==="light"?void 0:oa,{value:t,mimeType:i}=u.useMemo(()=>{try{return{value:JSON.stringify(JSON.parse(n),null,2),mimeType:"json"}}catch{return{value:n,mimeType:"text"}}},[n]);return i==="json"?e(sa,{value:t,basicSetup:{lineNumbers:!0,foldGutter:!0,bracketMatching:!0,syntaxHighlighting:!0,highlightActiveLine:!1,highlightActiveLineGutter:!1},extensions:[Ld(),ft.lineWrapping],editable:!1,theme:l,css:Ju}):e(Fi,{children:t})}function Fi({children:n}){return e("pre",{css:C`
|
|
1512
1512
|
white-space: pre-wrap;
|
|
1513
1513
|
padding: 0;
|
|
1514
|
-
`,children:n})}function Ue({value:n,mimeType:a}){let l;switch(a){case"json":l=e(nn,{children:n});break;case"text":l=e(ta,{children:n});break;default:Ce()}return l}function Zu({text:n}){return s(h,{direction:"column",alignItems:"center",flex:"1 1 auto",height:"size-2400",justifyContent:"center",gap:"size-100",children:[e(ba,{graphicKey:"documents"}),e(K,{children:n})]})}function Xu({events:n}){return n.length===0?e(Zu,{text:"No events"}):e(
|
|
1514
|
+
`,children:n})}function Ue({value:n,mimeType:a}){let l;switch(a){case"json":l=e(nn,{children:n});break;case"text":l=e(ta,{children:n});break;default:Ce()}return l}function Zu({text:n}){return s(h,{direction:"column",alignItems:"center",flex:"1 1 auto",height:"size-2400",justifyContent:"center",gap:"size-100",children:[e(ba,{graphicKey:"documents"}),e(K,{children:n})]})}function Xu({events:n}){return n.length===0?e(Zu,{text:"No events"}):e($l,{children:n.map((a,l)=>{const t=a.name==="exception";return e(zl,{children:s(h,{direction:"row",alignItems:"center",gap:"size-100",children:[e(F,{flex:"none",children:e("div",{"data-event-type":t?"exception":"info",css:i=>C`
|
|
1515
1515
|
&[data-event-type="exception"] {
|
|
1516
1516
|
--px-event-icon-color: ${i.colors.statusDanger};
|
|
1517
1517
|
}
|
|
@@ -1521,7 +1521,7 @@ fragment DatasetPicker__datasets on Query {
|
|
|
1521
1521
|
.ac-icon-wrap {
|
|
1522
1522
|
color: var(--px-event-icon-color);
|
|
1523
1523
|
}
|
|
1524
|
-
`,children:e(P,{svg:t?e(I.AlertTriangleOutline,{}):e(I.InfoOutline,{})})})}),s(h,{direction:"column",gap:"size-25",flex:"1 1 auto",children:[e(K,{weight:"heavy",children:a.name}),e(K,{color:"text-700",children:a.message})]}),e(F,{children:e(K,{color:"text-700",children:new Date(a.timestamp).toLocaleString()})})]})},l)})})}const
|
|
1524
|
+
`,children:e(P,{svg:t?e(I.AlertTriangleOutline,{}):e(I.InfoOutline,{})})})}),s(h,{direction:"column",gap:"size-25",flex:"1 1 auto",children:[e(K,{weight:"heavy",children:a.name}),e(K,{color:"text-700",children:a.message})]}),e(F,{children:e(K,{color:"text-700",children:new Date(a.timestamp).toLocaleString()})})]})},l)})})}const Ki=e(h,{alignItems:"center",justifyContent:"center",children:e(F,{marginStart:"size-100",children:s(Vn,{children:[e(re,{weight:"heavy",level:4,children:"Span Attributes"}),e(Fn,{children:e(K,{children:"Attributes are key-value pairs that represent metadata associated with a span. For detailed descriptions of specific attributes, consult the semantic conventions section of the OpenInference tracing specification."})}),e("footer",{children:e(je,{href:"https://github.com/Arize-ai/openinference/blob/main/spec/semantic_conventions.md",children:"Semantic Conventions"})})]})})}),Kl="selectedSpanNodeId";function Yu(n){const a=n.find(i=>i.parentId==null);if(a)return a;const l=new Set(n.map(i=>i.context.spanId)),t=n.filter(i=>i.parentId!=null&&!l.has(i.parentId));return t.length===1?t[0]:null}function dl(n){const{traceId:a,projectId:l}=n,[t,i]=fa(),r=D.useLazyLoadQuery(ti,{traceId:a,id:l},{fetchPolicy:"store-and-network"}),o=u.useMemo(()=>{var m;return(((m=r.project.trace)==null?void 0:m.spans.edges)||[]).map(p=>p.span)},[r]),d=t.get(Kl)??o[0].id,g=u.useMemo(()=>Yu(o),[o]);return u.useEffect(()=>()=>{i(f=>(f.delete("spanNodeId"),f),{replace:!0})},[]),s("main",{css:C`
|
|
1525
1525
|
flex: 1 1 auto;
|
|
1526
1526
|
overflow: hidden;
|
|
1527
1527
|
display: flex;
|
|
@@ -1529,7 +1529,7 @@ fragment DatasetPicker__datasets on Query {
|
|
|
1529
1529
|
`,children:[e(em,{rootSpan:g}),s(Xe,{direction:"horizontal",autoSaveId:"trace-panel-group",css:C`
|
|
1530
1530
|
flex: 1 1 auto;
|
|
1531
1531
|
overflow: hidden;
|
|
1532
|
-
`,children:[e(ue,{defaultSize:30,minSize:10,maxSize:70,children:e(am,{children:e(Wo,{spans:o,selectedSpanNodeId:d,onSpanClick:f=>{i(m=>(m.set(
|
|
1532
|
+
`,children:[e(ue,{defaultSize:30,minSize:10,maxSize:70,children:e(am,{children:e(Wo,{spans:o,selectedSpanNodeId:d,onSpanClick:f=>{i(m=>(m.set(Kl,f.id),m),{replace:!0})}})})}),e(Ye,{css:Kn}),e(ue,{children:e(nm,{children:d?e(u.Suspense,{fallback:e(fe,{}),children:e(wu,{spanNodeId:d,projectId:l})}):null})})]})]})}function em({rootSpan:n}){const{latencyMs:a,statusCode:l,spanAnnotations:t}=n??{latencyMs:null,statusCode:"UNSET",spanAnnotations:[]},i=t.length>0,r=Zl(l);return e(F,{padding:"size-200",borderBottomWidth:"thin",borderBottomColor:"dark",children:s(h,{direction:"row",gap:"size-400",children:[s(h,{direction:"column",children:[e(K,{elementType:"h3",textSize:"medium",color:"text-700",children:"Trace Status"}),e(K,{textSize:"xlarge",children:s(h,{direction:"row",gap:"size-50",alignItems:"center",children:[e(Ca,{statusCode:l}),e(K,{textSize:"xlarge",color:r,children:l})]})})]}),s(h,{direction:"column",children:[e(K,{elementType:"h3",textSize:"medium",color:"text-700",children:"Latency"}),e(K,{textSize:"xlarge",children:typeof a=="number"?e(we,{latencyMs:a,textSize:"xlarge"}):"--"})]}),i?s(h,{direction:"column",gap:"size-50",children:[e(K,{elementType:"h3",textSize:"medium",color:"text-700",children:"Feedback"}),e(h,{direction:"row",gap:"size-50",children:t.map(o=>e(ia,{annotation:o,children:e(xn,{annotation:o,annotationDisplayPreference:"label"})},o.name))})]}):null]})})}function nm({children:n}){return e("div",{"data-testid":"scrolling-tabs-wrapper",css:C`
|
|
1533
1533
|
height: 100%;
|
|
1534
1534
|
overflow: hidden;
|
|
1535
1535
|
.ac-tabs {
|
|
@@ -1552,7 +1552,7 @@ fragment DatasetPicker__datasets on Query {
|
|
|
1552
1552
|
`,children:n})}function am({children:n}){return e("div",{"data-testid":"scrolling-panel-content",css:C`
|
|
1553
1553
|
height: 100%;
|
|
1554
1554
|
overflow-y: auto;
|
|
1555
|
-
`,children:n})}function
|
|
1555
|
+
`,children:n})}function qy(){const{traceId:n,projectId:a}=ln(),l=Y();return e(W,{type:"slideOver",isDismissable:!0,onDismiss:()=>l(`/projects/${a}`),children:e(H,{size:"fullscreen",title:"Trace Details",children:e(dl,{traceId:n,projectId:a})})})}const xi=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:"Variable",name:"timeRange",variableName:"timeRange"},o=[{kind:"Literal",name:"first",value:50},{kind:"Literal",name:"rootSpansOnly",value:!0},{kind:"Literal",name:"sort",value:{col:"startTime",dir:"desc"}},r],c={alias:null,args:null,kind:"ScalarField",name:"spanKind",storageKey:null},d={alias:"statusCode",args:null,kind:"ScalarField",name:"propagatedStatusCode",storageKey:null},g={alias:null,args:null,kind:"ScalarField",name:"startTime",storageKey:null},f={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}],y={alias:null,args:null,concreteType:"SpanContext",kind:"LinkedField",name:"context",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"spanId",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"traceId",storageKey:null}],storageKey:null},b={alias:null,args:null,concreteType:"SpanAnnotation",kind:"LinkedField",name:"spanAnnotations",plural:!0,selections:[i,{alias:null,args:null,kind:"ScalarField",name:"label",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"score",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"annotatorKind",storageKey:null}],storageKey:null},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},S=[{alias:null,args:null,kind:"ScalarField",name:"value",storageKey:null}],v=[r];return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"ProjectPageQuery",selections:[{alias:"project",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{args:null,kind:"FragmentSpread",name:"TracesTable_spans"},{args:null,kind:"FragmentSpread",name:"ProjectPageHeader_stats"},{args:null,kind:"FragmentSpread",name:"StreamToggle_data"}],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"ProjectPageQuery",selections:[{alias:"project",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[l,{kind:"TypeDiscriminator",abstractKey:"__isNode"},t,{kind:"InlineFragment",selections:[i,{alias:null,args:null,kind:"ScalarField",name:"spanAnnotationNames",storageKey:null},{alias:"rootSpans",args:o,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,c,i,{alias:null,args:null,kind:"ScalarField",name:"metadata",storageKey:null},d,g,f,{alias:null,args:null,kind:"ScalarField",name:"cumulativeTokenCountTotal",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"cumulativeTokenCountPrompt",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"cumulativeTokenCountCompletion",storageKey:null},m,{alias:null,args:null,concreteType:"SpanIOValue",kind:"LinkedField",name:"input",plural:!1,selections:p,storageKey:null},{alias:null,args:null,concreteType:"SpanIOValue",kind:"LinkedField",name:"output",plural:!1,selections:p,storageKey:null},y,b,k,{alias:null,args:null,concreteType:"Span",kind:"LinkedField",name:"descendants",plural:!0,selections:[t,c,i,d,g,f,m,{alias:"cumulativeTokenCountTotal",args:null,kind:"ScalarField",name:"tokenCountTotal",storageKey:null},{alias:"cumulativeTokenCountPrompt",args:null,kind:"ScalarField",name:"tokenCountPrompt",storageKey:null},{alias:"cumulativeTokenCountCompletion",args:null,kind:"ScalarField",name:"tokenCountCompletion",storageKey:null},{alias:null,args:null,concreteType:"SpanIOValue",kind:"LinkedField",name:"input",plural:!1,selections:S,storageKey:null},{alias:null,args:null,concreteType:"SpanIOValue",kind:"LinkedField",name:"output",plural:!1,selections:S,storageKey:null},y,b,k],storageKey:null}],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],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:o,filters:["sort","rootSpansOnly","filterCondition","timeRange"],handle:"connection",key:"TracesTable_rootSpans",kind:"LinkedHandle",name:"spans"},{alias:null,args:v,kind:"ScalarField",name:"traceCount",storageKey:null},{alias:null,args:v,kind:"ScalarField",name:"tokenCountTotal",storageKey:null},{alias:"latencyMsP50",args:[{kind:"Literal",name:"probability",value:.5},r],kind:"ScalarField",name:"latencyMsQuantile",storageKey:null},{alias:"latencyMsP99",args:[{kind:"Literal",name:"probability",value:.99},r],kind:"ScalarField",name:"latencyMsQuantile",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"documentEvaluationNames",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"streamingLastUpdatedAt",storageKey:null}],type:"Project",abstractKey:null}],storageKey:null}]},params:{cacheID:"43fee2b22bc4798639d2e1fbef09ce21",id:null,metadata:{},name:"ProjectPageQuery",operationKind:"query",text:`query ProjectPageQuery(
|
|
1556
1556
|
$id: GlobalID!
|
|
1557
1557
|
$timeRange: TimeRange!
|
|
1558
1558
|
) {
|
|
@@ -1759,7 +1759,7 @@ fragment ProjectPageHeader_stats on Project {
|
|
|
1759
1759
|
documentEvaluationNames
|
|
1760
1760
|
id
|
|
1761
1761
|
}
|
|
1762
|
-
`}}}();Ti.hash="dcce9d160db90e2b5c51eef9971101a4";const Ii=function(){var n={kind:"Variable",name:"timeRange",variableName:"timeRange"},a=[n];return{argumentDefinitions:[{kind:"RootArgument",name:"timeRange"}],kind:"Fragment",metadata:{refetch:{connection:null,fragmentPathInResult:["node"],operation:Ti,identifierInfo:{identifierField:"id",identifierQueryVariableName:"id"}}},name:"ProjectPageHeader_stats",selections:[{alias:null,args:a,kind:"ScalarField",name:"traceCount",storageKey:null},{alias:null,args:a,kind:"ScalarField",name:"tokenCountTotal",storageKey:null},{alias:"latencyMsP50",args:[{kind:"Literal",name:"probability",value:.5},n],kind:"ScalarField",name:"latencyMsQuantile",storageKey:null},{alias:"latencyMsP99",args:[{kind:"Literal",name:"probability",value:.99},n],kind:"ScalarField",name:"latencyMsQuantile",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"spanAnnotationNames",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"documentEvaluationNames",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null}],type:"Project",abstractKey:null}}();Ii.hash="dcce9d160db90e2b5c51eef9971101a4";const Li=u.createContext(null);function
|
|
1762
|
+
`}}}();Ti.hash="dcce9d160db90e2b5c51eef9971101a4";const Ii=function(){var n={kind:"Variable",name:"timeRange",variableName:"timeRange"},a=[n];return{argumentDefinitions:[{kind:"RootArgument",name:"timeRange"}],kind:"Fragment",metadata:{refetch:{connection:null,fragmentPathInResult:["node"],operation:Ti,identifierInfo:{identifierField:"id",identifierQueryVariableName:"id"}}},name:"ProjectPageHeader_stats",selections:[{alias:null,args:a,kind:"ScalarField",name:"traceCount",storageKey:null},{alias:null,args:a,kind:"ScalarField",name:"tokenCountTotal",storageKey:null},{alias:"latencyMsP50",args:[{kind:"Literal",name:"probability",value:.5},n],kind:"ScalarField",name:"latencyMsQuantile",storageKey:null},{alias:"latencyMsP99",args:[{kind:"Literal",name:"probability",value:.99},n],kind:"ScalarField",name:"latencyMsQuantile",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"spanAnnotationNames",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"documentEvaluationNames",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null}],type:"Project",abstractKey:null}}();Ii.hash="dcce9d160db90e2b5c51eef9971101a4";const Li=u.createContext(null);function qn(){const n=Ke.useContext(Li);if(n===null)throw new Error("useStreamState must be used within a StreamStateProvider");return n}function lm({initialFetchKey:n="initial",children:a}){const l=Sn(c=>c.traceStreamingEnabled),t=Sn(c=>c.setTraceStreamingEnabled),[i,r]=u.useState(n),o=u.useCallback(c=>{u.startTransition(()=>{r(c)})},[r]);return e(Li.Provider,{value:{isStreaming:l,setIsStreaming:t,fetchKey:i,setFetchKey:o},children:a})}const Pi=function(){var n={defaultValue:null,kind:"LocalArgument",name:"annotationName"},a={defaultValue:null,kind:"LocalArgument",name:"id"},l={defaultValue:null,kind:"LocalArgument",name:"timeRange"},t=[{kind:"Variable",name:"id",variableName:"id"}],i=[{kind:"Variable",name:"annotationName",variableName:"annotationName"},{kind:"Variable",name:"timeRange",variableName:"timeRange"}];return{fragment:{argumentDefinitions:[n,a,l],kind:"Fragment",metadata:null,name:"AnnotationSummaryValueQuery",selections:[{alias:null,args:t,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{args:i,kind:"FragmentSpread",name:"AnnotationSummaryValueFragment"}],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[n,l,a],kind:"Operation",name:"AnnotationSummaryValueQuery",selections:[{alias:null,args:t,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},{kind:"TypeDiscriminator",abstractKey:"__isNode"},{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{kind:"InlineFragment",selections:[{alias:null,args:i,concreteType:"AnnotationSummary",kind:"LinkedField",name:"spanAnnotationSummary",plural:!1,selections:[{alias:null,args:null,concreteType:"LabelFraction",kind:"LinkedField",name:"labelFractions",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"label",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"fraction",storageKey:null}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"meanScore",storageKey:null}],storageKey:null}],type:"Project",abstractKey:null}],storageKey:null}]},params:{cacheID:"bae90b7000aa37d37050070d8504b41c",id:null,metadata:{},name:"AnnotationSummaryValueQuery",operationKind:"query",text:`query AnnotationSummaryValueQuery(
|
|
1763
1763
|
$annotationName: String!
|
|
1764
1764
|
$timeRange: TimeRange!
|
|
1765
1765
|
$id: GlobalID!
|
|
@@ -1805,7 +1805,7 @@ fragment AnnotationSummaryValueFragment_4BTVrq on Project {
|
|
|
1805
1805
|
}
|
|
1806
1806
|
id
|
|
1807
1807
|
}
|
|
1808
|
-
`}}}();Ai.hash="6a15ba35fe9e1e35aa4c517ab6309a2b";function tm({annotationName:n}){const{projectId:a}=ln(),{timeRange:l}=Ka(),t=D.useLazyLoadQuery(Ai,{annotationName:n,id:a,timeRange:{start:l.start.toISOString(),end:l.end.toISOString()}});return s(h,{direction:"column",flex:"none",children:[e(K,{elementType:"h3",textSize:"medium",color:"text-700",children:n}),e(u.Suspense,{fallback:e(K,{textSize:"xlarge",children:"--"}),children:e(im,{annotationName:n,project:t.project})})]})}function im(n){var y,b;const{project:a,annotationName:l}=n,{fetchKey:t}=
|
|
1808
|
+
`}}}();Ai.hash="6a15ba35fe9e1e35aa4c517ab6309a2b";function tm({annotationName:n}){const{projectId:a}=ln(),{timeRange:l}=Ka(),t=D.useLazyLoadQuery(Ai,{annotationName:n,id:a,timeRange:{start:l.start.toISOString(),end:l.end.toISOString()}});return s(h,{direction:"column",flex:"none",children:[e(K,{elementType:"h3",textSize:"medium",color:"text-700",children:n}),e(u.Suspense,{fallback:e(K,{textSize:"xlarge",children:"--"}),children:e(im,{annotationName:n,project:t.project})})]})}function im(n){var y,b;const{project:a,annotationName:l}=n,{fetchKey:t}=qn(),[i,r]=D.useRefetchableFragment(wi,a);u.useEffect(()=>{u.startTransition(()=>{r({},{fetchPolicy:"store-and-network"})})},[t,r]);const o=Ge(),d=[et(l),o.default,o.gray600,o.gray400,o.gray200],g=(y=i==null?void 0:i.spanAnnotationSummary)==null?void 0:y.meanScore,f=(b=i==null?void 0:i.spanAnnotationSummary)==null?void 0:b.labelFractions,m=typeof g=="number",p=Array.isArray(f)&&f.length>0;return!m&&!p?e(K,{textSize:"xlarge",children:"--"}):s(Le,{delay:0,placement:"bottom",children:[e(kn,{children:s(h,{direction:"row",alignItems:"center",gap:"size-50",children:[p?e(Dd,{width:24,height:24,children:e(Td,{data:f,dataKey:"fraction",nameKey:"label",cx:"50%",cy:"50%",innerRadius:8,outerRadius:11,strokeWidth:0,stroke:"transparent",children:f.map((k,S)=>e(Id,{fill:d[S%d.length]},`cell-${S}`))})}):null,e(K,{textSize:"xlarge",children:m?ze(g):"--"})]})}),e(aa,{children:e(F,{width:"size-2400",children:s(h,{direction:"column",gap:"size-50",children:[p&&e("ul",{children:f.map((k,S)=>e("li",{children:e(pe,{color:d[S%d.length],name:k.label,shape:"square",value:nt(k.fraction*100)})},k.label))}),p&&m?e(va,{}):null,m?s(h,{direction:"row",justifyContent:"space-between",children:[e(K,{children:"mean"}),e(K,{children:ze(g)})]}):null]})})})]})}const _i=function(){var n={defaultValue:null,kind:"LocalArgument",name:"evaluationName"},a={defaultValue:null,kind:"LocalArgument",name:"id"},l={defaultValue:null,kind:"LocalArgument",name:"timeRange"},t=[{kind:"Variable",name:"id",variableName:"id"}],i=[{kind:"Variable",name:"evaluationName",variableName:"evaluationName"},{kind:"Variable",name:"timeRange",variableName:"timeRange"}];return{fragment:{argumentDefinitions:[n,a,l],kind:"Fragment",metadata:null,name:"DocumentEvaluationSummaryValueQuery",selections:[{alias:null,args:t,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{args:i,kind:"FragmentSpread",name:"DocumentEvaluationSummaryValueFragment"}],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[n,l,a],kind:"Operation",name:"DocumentEvaluationSummaryValueQuery",selections:[{alias:null,args:t,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},{kind:"TypeDiscriminator",abstractKey:"__isNode"},{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{kind:"InlineFragment",selections:[{alias:null,args:i,concreteType:"DocumentEvaluationSummary",kind:"LinkedField",name:"documentEvaluationSummary",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"averageNdcg",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"averagePrecision",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"meanReciprocalRank",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"hitRate",storageKey:null}],storageKey:null}],type:"Project",abstractKey:null}],storageKey:null}]},params:{cacheID:"60d7798d88e1408e6b6b0bebdc1716f5",id:null,metadata:{},name:"DocumentEvaluationSummaryValueQuery",operationKind:"query",text:`query DocumentEvaluationSummaryValueQuery(
|
|
1809
1809
|
$evaluationName: String!
|
|
1810
1810
|
$timeRange: TimeRange!
|
|
1811
1811
|
$id: GlobalID!
|
|
@@ -1849,7 +1849,7 @@ fragment DocumentEvaluationSummaryValueFragment_1dJL9N on Project {
|
|
|
1849
1849
|
}
|
|
1850
1850
|
id
|
|
1851
1851
|
}
|
|
1852
|
-
`}}}();Ri.hash="4d50474ffa9b9e4a68d07f6e0777c144";function rm({evaluationName:n}){const{projectId:a}=ln(),{timeRange:l}=Ka(),t=D.useLazyLoadQuery(Ri,{id:a,evaluationName:n,timeRange:{start:l.start.toISOString(),end:l.end.toISOString()}});return s(h,{direction:"column",flex:"none",children:[e(K,{elementType:"h3",textSize:"medium",color:"text-700",children:n}),e(u.Suspense,{fallback:e(K,{textSize:"xlarge",children:"--"}),children:e(sm,{evaluationName:n,project:t==null?void 0:t.project})})]})}function sm(n){var g,f,m,p;const{project:a}=n,{fetchKey:l}=
|
|
1852
|
+
`}}}();Ri.hash="4d50474ffa9b9e4a68d07f6e0777c144";function rm({evaluationName:n}){const{projectId:a}=ln(),{timeRange:l}=Ka(),t=D.useLazyLoadQuery(Ri,{id:a,evaluationName:n,timeRange:{start:l.start.toISOString(),end:l.end.toISOString()}});return s(h,{direction:"column",flex:"none",children:[e(K,{elementType:"h3",textSize:"medium",color:"text-700",children:n}),e(u.Suspense,{fallback:e(K,{textSize:"xlarge",children:"--"}),children:e(sm,{evaluationName:n,project:t==null?void 0:t.project})})]})}function sm(n){var g,f,m,p;const{project:a}=n,{fetchKey:l}=qn(),[t,i]=D.useRefetchableFragment(Ei,a);u.useEffect(()=>{u.startTransition(()=>{i({},{fetchPolicy:"store-and-network"})})},[l,i]);const r=(g=t==null?void 0:t.documentEvaluationSummary)==null?void 0:g.averageNdcg,o=(f=t==null?void 0:t.documentEvaluationSummary)==null?void 0:f.averagePrecision,c=(m=t==null?void 0:t.documentEvaluationSummary)==null?void 0:m.hitRate,d=(p=t==null?void 0:t.documentEvaluationSummary)==null?void 0:p.meanReciprocalRank;return s(Le,{delay:0,placement:"bottom",children:[e(kn,{children:e(h,{direction:"row",alignItems:"center",gap:"size-50",height:"28px",children:s(U,{children:[e(De,{metric:"ndcg",score:r},"ndcg"),e(De,{metric:"precision",score:o},"precision"),e(De,{metric:"hit rate",score:c},"hit")]})})}),e(aa,{children:e(F,{width:"size-2400",children:s(h,{direction:"column",children:[s(h,{justifyContent:"space-between",children:[e(K,{children:"average ndcg"}),e(K,{children:typeof r=="number"?ze(r):"--"})]}),s(h,{justifyContent:"space-between",children:[e(K,{children:"average precision"}),e(K,{children:typeof o=="number"?ze(o):"--"})]}),s(h,{justifyContent:"space-between",children:[e(K,{children:"mean reciprocal rank"}),e(K,{children:typeof d=="number"?ze(d):"--"})]}),s(h,{justifyContent:"space-between",children:[e(K,{children:"hit rate"}),e(K,{children:typeof c=="number"?ze(c):"--"})]})]})})})]})}function om(n){const{extra:a}=n,{fetchKey:l}=qn(),[t,i]=D.useRefetchableFragment(Ii,n.project);u.useEffect(()=>{u.startTransition(()=>{i({},{fetchPolicy:"store-and-network"})})},[l,i]);const r=t==null?void 0:t.latencyMsP50,o=t==null?void 0:t.latencyMsP99,c=t==null?void 0:t.tokenCountTotal,d=t==null?void 0:t.spanAnnotationNames,g=t==null?void 0:t.documentEvaluationNames;return e(F,{paddingStart:"size-200",paddingEnd:"size-200",paddingTop:"size-200",paddingBottom:"size-50",flex:"none",children:s(h,{direction:"row",justifyContent:"space-between",alignItems:"center",children:[e("div",{css:C`
|
|
1853
1853
|
overflow-x: auto;
|
|
1854
1854
|
overflow-y: hidden;
|
|
1855
1855
|
flex: 1 1 auto;
|
|
@@ -1885,7 +1885,7 @@ fragment DocumentEvaluationSummaryValueFragment_1dJL9N on Project {
|
|
|
1885
1885
|
left center,
|
|
1886
1886
|
right center;
|
|
1887
1887
|
background-attachment: local, local, scroll, scroll;
|
|
1888
|
-
`,children:s(h,{direction:"row",gap:"size-400",alignItems:"center",children:[s(h,{direction:"column",flex:"none",children:[e(K,{elementType:"h3",textSize:"medium",color:"text-700",children:"Total Traces"}),e(K,{textSize:"xlarge",children:bn(t==null?void 0:t.traceCount)})]}),s(h,{direction:"column",flex:"none",children:[e(K,{elementType:"h3",textSize:"medium",color:"text-700",children:"Total Tokens"}),e(K,{textSize:"xlarge",children:bn(c)})]}),s(h,{direction:"column",flex:"none",children:[e(K,{elementType:"h3",textSize:"medium",color:"text-700",children:"Latency P50"}),r!=null?e(we,{latencyMs:r,textSize:"xlarge"}):e(K,{textSize:"xlarge",children:"--"})]}),s(h,{direction:"column",flex:"none",children:[e(K,{elementType:"h3",textSize:"medium",color:"text-700",children:"Latency P99"}),o!=null?e(we,{latencyMs:o,textSize:"xlarge"}):e(K,{textSize:"xlarge",children:"--"})]}),d.map(f=>e(tm,{annotationName:f},f)),g.map(f=>e(rm,{evaluationName:f},`document-${f}`))]})}),e(F,{flex:"none",paddingStart:"size-100",children:a})]})})}const Mi=u.createContext(null);function Ni(){const n=u.useContext(Mi);if(n===null)throw new Error("useSpanFilterCondition must be used within a SpanFilterConditionProvider");return n}function
|
|
1888
|
+
`,children:s(h,{direction:"row",gap:"size-400",alignItems:"center",children:[s(h,{direction:"column",flex:"none",children:[e(K,{elementType:"h3",textSize:"medium",color:"text-700",children:"Total Traces"}),e(K,{textSize:"xlarge",children:bn(t==null?void 0:t.traceCount)})]}),s(h,{direction:"column",flex:"none",children:[e(K,{elementType:"h3",textSize:"medium",color:"text-700",children:"Total Tokens"}),e(K,{textSize:"xlarge",children:bn(c)})]}),s(h,{direction:"column",flex:"none",children:[e(K,{elementType:"h3",textSize:"medium",color:"text-700",children:"Latency P50"}),r!=null?e(we,{latencyMs:r,textSize:"xlarge"}):e(K,{textSize:"xlarge",children:"--"})]}),s(h,{direction:"column",flex:"none",children:[e(K,{elementType:"h3",textSize:"medium",color:"text-700",children:"Latency P99"}),o!=null?e(we,{latencyMs:o,textSize:"xlarge"}):e(K,{textSize:"xlarge",children:"--"})]}),d.map(f=>e(tm,{annotationName:f},f)),g.map(f=>e(rm,{evaluationName:f},`document-${f}`))]})}),e(F,{flex:"none",paddingStart:"size-100",children:a})]})})}const Mi=u.createContext(null);function Ni(){const n=u.useContext(Mi);if(n===null)throw new Error("useSpanFilterCondition must be used within a SpanFilterConditionProvider");return n}function xl(n){const[a,l]=u.useState(""),t=u.useCallback(r=>{u.startTransition(()=>{l(r)})},[]),i=u.useCallback(r=>{u.startTransition(()=>{a.length>0?l(a+" and "+r):l(r)})},[a]);return e(Mi.Provider,{value:{filterCondition:a,setFilterCondition:t,appendFilterCondition:i},children:n.children})}const Vi=function(){var n={defaultValue:null,kind:"LocalArgument",name:"after"},a={defaultValue:null,kind:"LocalArgument",name:"filterCondition"},l={defaultValue:50,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"},o=[{kind:"Variable",name:"id",variableName:"id"}],c={kind:"Variable",name:"after",variableName:"after"},d={kind:"Variable",name:"filterCondition",variableName:"filterCondition"},g={kind:"Variable",name:"first",variableName:"first"},f={kind:"Variable",name:"sort",variableName:"sort"},m={alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},p={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},y={alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},b=[c,d,g,f,{kind:"Variable",name:"timeRange",variableName:"timeRange"}],k=[{alias:"value",args:null,kind:"ScalarField",name:"truncatedValue",storageKey:null}];return{fragment:{argumentDefinitions:[n,a,l,t,i,r],kind:"Fragment",metadata:null,name:"SpansTableSpansQuery",selections:[{alias:null,args:o,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{args:[c,d,g,f],kind:"FragmentSpread",name:"SpansTable_spans"}],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[n,a,l,i,r,t],kind:"Operation",name:"SpansTableSpansQuery",selections:[{alias:null,args:o,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[m,{kind:"TypeDiscriminator",abstractKey:"__isNode"},p,{kind:"InlineFragment",selections:[y,{alias:null,args:null,kind:"ScalarField",name:"spanAnnotationNames",storageKey:null},{alias:null,args:b,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:[p,{alias:null,args:null,kind:"ScalarField",name:"spanKind",storageKey:null},y,{alias:null,args:null,kind:"ScalarField",name:"metadata",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:"latencyMs",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"tokenCountTotal",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"tokenCountPrompt",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"tokenCountCompletion",storageKey:null},{alias:null,args:null,concreteType:"SpanContext",kind:"LinkedField",name:"context",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"spanId",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"traceId",storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"SpanIOValue",kind:"LinkedField",name:"input",plural:!1,selections:k,storageKey:null},{alias:null,args:null,concreteType:"SpanIOValue",kind:"LinkedField",name:"output",plural:!1,selections:k,storageKey:null},{alias:null,args:null,concreteType:"SpanAnnotation",kind:"LinkedField",name:"spanAnnotations",plural:!0,selections:[y,{alias:null,args:null,kind:"ScalarField",name:"label",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"score",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"annotatorKind",storageKey:null}],storageKey:null},{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}],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:[m],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:null,args:b,filters:["sort","filterCondition","timeRange"],handle:"connection",key:"SpansTable_spans",kind:"LinkedHandle",name:"spans"}],type:"Project",abstractKey:null}],storageKey:null}]},params:{cacheID:"21dc6f490cf749c02bc20bcdb43c199c",id:null,metadata:{},name:"SpansTableSpansQuery",operationKind:"query",text:`query SpansTableSpansQuery(
|
|
1889
1889
|
$after: String = null
|
|
1890
1890
|
$filterCondition: String = null
|
|
1891
1891
|
$first: Int = 50
|
|
@@ -1974,10 +1974,10 @@ fragment SpansTable_spans_1XEuU on Project {
|
|
|
1974
1974
|
&:hover {
|
|
1975
1975
|
background-color: var(--ac-global-color-gray-300);
|
|
1976
1976
|
}
|
|
1977
|
-
`,children:a})}function um({projectName:n}){const[a,l]=u.useState("Python");return e(
|
|
1977
|
+
`,children:a})}function um({projectName:n}){const[a,l]=u.useState("Python");return e(H,{title:"Send Traces to this Project",size:"L",children:s(F,{padding:"size-400",overflow:"auto",children:[e(F,{paddingBottom:"size-100",children:e(at,{language:a,onChange:l})}),a==="Python"?e(lt,{projectName:n}):e(tt,{projectName:n})]})})}function Qi({projectName:n}){const[a,l]=u.useState(null),t=()=>{l(e(um,{projectName:n}))};return s("tbody",{className:"is-empty",children:[e("tr",{children:e("td",{colSpan:100,css:i=>C`
|
|
1978
1978
|
text-align: center;
|
|
1979
1979
|
padding: ${i.spacing.margin24}px ${i.spacing.margin24}px !important;
|
|
1980
|
-
`,children:s(h,{direction:"column",gap:"size-200",alignItems:"center",children:["No traces found for this project",e(M,{variant:"default",icon:e(P,{svg:e(I.PlayCircleOutline,{})}),onClick:t,children:"Get Started"})]})})}),e(W,{onDismiss:()=>l(null),isDismissable:!0,type:"slideOver",children:a})]})}const ji={argumentDefinitions:[],kind:"Fragment",metadata:null,name:"SpanColumnSelector_annotations",selections:[{alias:null,args:null,kind:"ScalarField",name:"spanAnnotationNames",storageKey:null}],type:"Project",abstractKey:null};ji.hash="ad01e6897ad1ea779eb346d85783b8b4";const mm=["spanKind","name"];function qi(n){return e(
|
|
1980
|
+
`,children:s(h,{direction:"column",gap:"size-200",alignItems:"center",children:["No traces found for this project",e(M,{variant:"default",icon:e(P,{svg:e(I.PlayCircleOutline,{})}),onClick:t,children:"Get Started"})]})})}),e(W,{onDismiss:()=>l(null),isDismissable:!0,type:"slideOver",children:a})]})}const ji={argumentDefinitions:[],kind:"Fragment",metadata:null,name:"SpanColumnSelector_annotations",selections:[{alias:null,args:null,kind:"ScalarField",name:"spanAnnotationNames",storageKey:null}],type:"Project",abstractKey:null};ji.hash="ad01e6897ad1ea779eb346d85783b8b4";const mm=["spanKind","name"];function qi(n){return e(Za,{menu:e(gm,{...n}),triggerProps:{placement:"bottom end"},children:s(h,{direction:"row",alignItems:"center",gap:"size-100",children:[e(P,{svg:e(I.Column,{})}),"Columns"]})})}const pa=C`
|
|
1981
1981
|
padding: var(--ac-global-dimension-static-size-50)
|
|
1982
1982
|
var(--ac-global-dimension-static-size-100);
|
|
1983
1983
|
label {
|
|
@@ -2035,7 +2035,7 @@ fragment SpansTable_spans_1XEuU on Project {
|
|
|
2035
2035
|
border-color: var(--ac-global-color-danger);
|
|
2036
2036
|
}
|
|
2037
2037
|
box-sizing: border-box;
|
|
2038
|
-
`;function ym(n){const a=n.matchBefore(/\w*/);return!a||a.from==a.to&&!n.explicit?null:{from:a.from,options:[{label:"span_kind",type:"variable",info:"The span variant: CHAIN, LLM, RETRIEVER, TOOL, etc."},{label:"status_code",type:"variable",info:"The span status: OK, UNSET, or ERROR"},{label:"input.value",type:"variable",info:"The input value of a span, typically a query"},{label:"output.value",type:"variable",info:"The output value of a span, typically a response"},{label:"name",type:"variable",info:"The name given to a span - e.x. OpenAI"},{label:"latency_ms",type:"variable",info:"Latency (i.e. duration) in milliseconds"},{label:"cumulative_token_count.prompt",type:"variable",info:"Sum of token count for prompt from self and all child spans"},{label:"cumulative_token_count.completion",type:"variable",info:"Sum of token count for completion from self and all child spans"},{label:"cumulative_token_count.total",type:"variable",info:"Sum of token count total (prompt + completion) from self and all child spans"},{label:"llm spans",type:"text",apply:"span_kind == 'LLM'",detail:"macro"},{label:"retriever spans",type:"text",apply:"span_kind == 'RETRIEVER'",detail:"macro"},{label:"search input",type:"text",apply:"'' in input.value",detail:"macro"},{label:"search output",type:"text",apply:"'' in output.value",detail:"macro"},{label:"status_code error",type:"text",apply:"status_code == 'ERROR'",detail:"macro"},{label:"Latency >= 10s",type:"text",apply:"latency_ms >= 10_000",detail:"macro"},{label:"Tokens >= 1,000",type:"text",apply:"llm.token_count.total >= 1_000",detail:"macro"},{label:"Hallucinations",type:"text",apply:"annotations['Hallucination'].label == 'hallucinated'",detail:"macro"},{label:"Annotations",type:"text",apply:"annotations['Hallucination'].label == 'hallucinated'",detail:"macro"},{label:"Metadata",type:"text",apply:"metadata['topic'] == 'agent'",detail:"macro"},{label:"Substring",type:"text",apply:"'agent' in input.value",detail:"macro"}]}}async function fm(n,a){if(!n)return{isValid:!0,errorMessage:null};const l=await $s.fetchQuery(xe,Ui,{condition:n,id:a}).toPromise();if(!l)throw new Error("Filter condition validation is null");return l.project.validateSpanFilterCondition}const hm=[Pd.of([{key:"Enter",run:n=>!0}]),
|
|
2038
|
+
`;function ym(n){const a=n.matchBefore(/\w*/);return!a||a.from==a.to&&!n.explicit?null:{from:a.from,options:[{label:"span_kind",type:"variable",info:"The span variant: CHAIN, LLM, RETRIEVER, TOOL, etc."},{label:"status_code",type:"variable",info:"The span status: OK, UNSET, or ERROR"},{label:"input.value",type:"variable",info:"The input value of a span, typically a query"},{label:"output.value",type:"variable",info:"The output value of a span, typically a response"},{label:"name",type:"variable",info:"The name given to a span - e.x. OpenAI"},{label:"latency_ms",type:"variable",info:"Latency (i.e. duration) in milliseconds"},{label:"cumulative_token_count.prompt",type:"variable",info:"Sum of token count for prompt from self and all child spans"},{label:"cumulative_token_count.completion",type:"variable",info:"Sum of token count for completion from self and all child spans"},{label:"cumulative_token_count.total",type:"variable",info:"Sum of token count total (prompt + completion) from self and all child spans"},{label:"llm spans",type:"text",apply:"span_kind == 'LLM'",detail:"macro"},{label:"retriever spans",type:"text",apply:"span_kind == 'RETRIEVER'",detail:"macro"},{label:"search input",type:"text",apply:"'' in input.value",detail:"macro"},{label:"search output",type:"text",apply:"'' in output.value",detail:"macro"},{label:"status_code error",type:"text",apply:"status_code == 'ERROR'",detail:"macro"},{label:"Latency >= 10s",type:"text",apply:"latency_ms >= 10_000",detail:"macro"},{label:"Tokens >= 1,000",type:"text",apply:"llm.token_count.total >= 1_000",detail:"macro"},{label:"Hallucinations",type:"text",apply:"annotations['Hallucination'].label == 'hallucinated'",detail:"macro"},{label:"Annotations",type:"text",apply:"annotations['Hallucination'].label == 'hallucinated'",detail:"macro"},{label:"Metadata",type:"text",apply:"metadata['topic'] == 'agent'",detail:"macro"},{label:"Substring",type:"text",apply:"'agent' in input.value",detail:"macro"}]}}async function fm(n,a){if(!n)return{isValid:!0,errorMessage:null};const l=await $s.fetchQuery(xe,Ui,{condition:n,id:a}).toPromise();if(!l)throw new Error("Filter condition validation is null");return l.project.validateSpanFilterCondition}const hm=[Pd.of([{key:"Enter",run:n=>!0}]),sl(),wd({override:[ym]})];function Gi(n){const{onValidCondition:a,placeholder:l="filter condition (e.x. span_kind == 'LLM')"}=n,[t,i]=u.useState(!1),[r,o]=u.useState(""),{filterCondition:c,setFilterCondition:d,appendFilterCondition:g}=Ni(),f=u.useDeferredValue(c),{theme:m}=zn(),p=m==="dark"?oa:void 0,{projectId:y}=ln();u.useEffect(()=>{fm(f,y).then(S=>{S!=null&&S.isValid?(o(""),u.startTransition(()=>{a(f)})):o((S==null?void 0:S.errorMessage)??"Invalid filter condition")})},[a,f,y]);const b=r!=="",k=c!=="";return s("div",{"data-is-focused":t,"data-is-invalid":b,className:"span-filter-condition-field",css:Hi,children:[s(h,{direction:"row",children:[e(co,{children:e(P,{svg:e(I.Search,{})})}),e(sa,{css:Bi,indentWithTab:!1,basicSetup:{lineNumbers:!1,foldGutter:!1,bracketMatching:!0,syntaxHighlighting:!0,highlightActiveLine:!1,highlightActiveLineGutter:!1,defaultKeymap:!1},onFocus:()=>i(!0),onBlur:()=>i(!1),value:c,onChange:d,height:"36px",width:"100%",theme:p,placeholder:l,extensions:hm}),e("button",{css:C`
|
|
2039
2039
|
margin-right: var(--ac-global-dimension-static-size-100);
|
|
2040
2040
|
color: var(--ac-global-text-color-700);
|
|
2041
2041
|
visibility: ${k?"visible":"hidden"};
|
|
@@ -2045,9 +2045,9 @@ fragment SpansTable_spans_1XEuU on Project {
|
|
|
2045
2045
|
padding-left: var(--ac-global-dimension-static-size-100);
|
|
2046
2046
|
padding-right: var(--ac-global-dimension-static-size-100);
|
|
2047
2047
|
height: 100%;
|
|
2048
|
-
`,className:"button--reset",children:e(P,{svg:e(I.PlusCircleOutline,{})})})}),e(km,{onAddFilterConditionSnippet:g})]})]}),s(Le,{isOpen:b&&t,placement:"bottom",children:[e(kn,{children:e("div",{})}),e(aa,{children:r!=""?e(K,{color:"danger",children:r}):e(K,{color:"success",children:"Valid Expression"})})]})]})}function km(n){const{onAddFilterConditionSnippet:a}=n;return e(F,{width:"500px",paddingTop:"size-200",paddingStart:"size-200",paddingEnd:"size-200",borderRadius:"medium",borderWidth:"thin",borderColor:"light",backgroundColor:"light",children:s(ye,{children:[e(gn,{label:"filter by kind",initialSnippet:"span_kind == 'LLM'",onAddFilterConditionSnippet:a},"kind"),e(gn,{label:"filter by token count",initialSnippet:"cumulative_token_count.total > 1000",onAddFilterConditionSnippet:a},"token_count"),e(gn,{label:"filter by annotation label",initialSnippet:"annotations['Hallucination'].label == 'hallucinated'",onAddFilterConditionSnippet:a},"annotation_label"),e(gn,{label:"filter by evaluation label",initialSnippet:"evals['Hallucination'].label == 'hallucinated'",onAddFilterConditionSnippet:a},"eval_label"),e(gn,{label:"filter by evaluation score",initialSnippet:"evals['Hallucination'].score < 1",onAddFilterConditionSnippet:a},"eval_score"),e(gn,{label:"filter by metadata",initialSnippet:"metadata['topic'] == 'agent'",onAddFilterConditionSnippet:a},"metadata"),e(gn,{label:"filter by substring",initialSnippet:"'agent' in input.value",onAddFilterConditionSnippet:a},"substring")]})})}function gn(n){const{initialSnippet:a,onAddFilterConditionSnippet:l}=n,[t,i]=u.useState(a),{theme:r}=
|
|
2048
|
+
`,className:"button--reset",children:e(P,{svg:e(I.PlusCircleOutline,{})})})}),e(km,{onAddFilterConditionSnippet:g})]})]}),s(Le,{isOpen:b&&t,placement:"bottom",children:[e(kn,{children:e("div",{})}),e(aa,{children:r!=""?e(K,{color:"danger",children:r}):e(K,{color:"success",children:"Valid Expression"})})]})]})}function km(n){const{onAddFilterConditionSnippet:a}=n;return e(F,{width:"500px",paddingTop:"size-200",paddingStart:"size-200",paddingEnd:"size-200",borderRadius:"medium",borderWidth:"thin",borderColor:"light",backgroundColor:"light",children:s(ye,{children:[e(gn,{label:"filter by kind",initialSnippet:"span_kind == 'LLM'",onAddFilterConditionSnippet:a},"kind"),e(gn,{label:"filter by token count",initialSnippet:"cumulative_token_count.total > 1000",onAddFilterConditionSnippet:a},"token_count"),e(gn,{label:"filter by annotation label",initialSnippet:"annotations['Hallucination'].label == 'hallucinated'",onAddFilterConditionSnippet:a},"annotation_label"),e(gn,{label:"filter by evaluation label",initialSnippet:"evals['Hallucination'].label == 'hallucinated'",onAddFilterConditionSnippet:a},"eval_label"),e(gn,{label:"filter by evaluation score",initialSnippet:"evals['Hallucination'].score < 1",onAddFilterConditionSnippet:a},"eval_score"),e(gn,{label:"filter by metadata",initialSnippet:"metadata['topic'] == 'agent'",onAddFilterConditionSnippet:a},"metadata"),e(gn,{label:"filter by substring",initialSnippet:"'agent' in input.value",onAddFilterConditionSnippet:a},"substring")]})})}function gn(n){const{initialSnippet:a,onAddFilterConditionSnippet:l}=n,[t,i]=u.useState(a),{theme:r}=zn(),o=r==="light"?void 0:oa;return e(la,{label:n.label,children:s(h,{direction:"row",width:"100%",gap:"size-100",children:[e("div",{css:C(Hi,C`
|
|
2049
2049
|
flex: 1 1 auto;
|
|
2050
|
-
`),children:e(sa,{value:t,basicSetup:{lineNumbers:!1,foldGutter:!1,bracketMatching:!0,syntaxHighlighting:!0,highlightActiveLine:!1,highlightActiveLineGutter:!1},extensions:[
|
|
2050
|
+
`),children:e(sa,{value:t,basicSetup:{lineNumbers:!1,foldGutter:!1,bracketMatching:!0,syntaxHighlighting:!0,highlightActiveLine:!1,highlightActiveLineGutter:!1},extensions:[sl()],editable:!0,onChange:i,theme:o,css:Bi})}),e(M,{title:"Add to filter condition",variant:"default",onClick:()=>l(t),icon:e(P,{svg:e(I.PlusCircleOutline,{})})})]})})}const Wi=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"input"}],a=[{alias:null,args:[{kind:"Variable",name:"input",variableName:"input"}],concreteType:"DatasetMutationPayload",kind:"LinkedField",name:"addSpansToDataset",plural:!1,selections:[{alias:null,args:null,concreteType:"Dataset",kind:"LinkedField",name:"dataset",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null}],storageKey:null}],storageKey:null}];return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"SpanSelectionToolbarAddSpansToDatasetMutation",selections:a,type:"Mutation",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"SpanSelectionToolbarAddSpansToDatasetMutation",selections:a},params:{cacheID:"1c694540190478b8fba8ef3c0cacf30c",id:null,metadata:{},name:"SpanSelectionToolbarAddSpansToDatasetMutation",operationKind:"mutation",text:`mutation SpanSelectionToolbarAddSpansToDatasetMutation(
|
|
2051
2051
|
$input: AddSpansToDatasetInput!
|
|
2052
2052
|
) {
|
|
2053
2053
|
addSpansToDataset(input: $input) {
|
|
@@ -2087,12 +2087,12 @@ fragment DatasetSelectorPopoverContent_datasets on Query {
|
|
|
2087
2087
|
`}};Xi.hash="7cd8a13144d97d2b5294f2a09c9e1351";function bm(n){const{onCreateNewDataset:a,onDatasetSelected:l}=n,[t,i]=u.useState(""),r=D.useLazyLoadQuery(Xi,{},{fetchPolicy:"network-only"});return s(V,{title:"Add to Dataset",variant:"compact",backgroundColor:"light",borderColor:"light",bodyStyle:{padding:0},extra:e(M,{variant:"default",size:"compact",onClick:a,children:"New Dataset"}),children:[e(F,{padding:"size-100",children:e(X,{type:"search",placeholder:"Search datasets",addonBefore:e(P,{svg:e(I.Search,{})}),onChange:o=>{i(o)}})}),e(F,{borderTopWidth:"thin",borderColor:"light",children:e("div",{css:C`
|
|
2088
2088
|
height: 400px;
|
|
2089
2089
|
overflow-y: auto;
|
|
2090
|
-
`,children:e(Sm,{query:r,search:t,onDatasetSelected:l})})})]})}function Sm(n){const{search:a,onDatasetSelected:l}=n,[t]=D.useRefetchableFragment(Zi,n.query),i=u.useMemo(()=>{let o=t.datasets.edges.map(c=>c.dataset);return a&&(o=o.filter(c=>c.name.toLowerCase().includes(a.toLowerCase()))),o},[a,t]);return i.length===0?e(F,{padding:"size-200",children:e(h,{direction:"column",justifyContent:"center",alignItems:"center",flex:"1 1 auto",children:e(K,{children:"No datasets found"})})}):e(na,{selectionMode:"single",onSelectionChange:o=>{if(typeof o=="object"){const c=Array.from(o);l(c[0])}},children:i.map(o=>e(
|
|
2090
|
+
`,children:e(Sm,{query:r,search:t,onDatasetSelected:l})})})]})}function Sm(n){const{search:a,onDatasetSelected:l}=n,[t]=D.useRefetchableFragment(Zi,n.query),i=u.useMemo(()=>{let o=t.datasets.edges.map(c=>c.dataset);return a&&(o=o.filter(c=>c.name.toLowerCase().includes(a.toLowerCase()))),o},[a,t]);return i.length===0?e(F,{padding:"size-200",children:e(h,{direction:"column",justifyContent:"center",alignItems:"center",flex:"1 1 auto",children:e(K,{children:"No datasets found"})})}):e(na,{selectionMode:"single",onSelectionChange:o=>{if(typeof o=="object"){const c=Array.from(o);l(c[0])}},children:i.map(o=>e(B,{children:o.name},o.id))})}function Yi(n){const a=Y(),[l,t]=u.useState(null),i=oe(),r=ce(),[o,c]=u.useState(!1),{selectedSpans:d,onClearSelection:g}=n,[f,m]=D.useMutation(Wi),p=d.length!==1,y=u.useCallback(b=>{f({variables:{input:{datasetId:b,spanIds:d.map(k=>k.id)}},onCompleted:()=>{i({title:"Examples added to dataset",message:`${d.length} example${p?"s":""} have been added to the dataset.`,action:{text:"View dataset",onClick:()=>{a(`/datasets/${b}/examples`)}}}),g()},onError:k=>{r({title:"An error occurred",message:`Failed to add spans to dataset: ${k.message}`})}})},[f,d,i,p,g,a,r]);return s("div",{css:C`
|
|
2091
2091
|
position: absolute;
|
|
2092
2092
|
bottom: var(--ac-global-dimension-size-400);
|
|
2093
2093
|
left: 50%;
|
|
2094
2094
|
transform: translateX(-50%);
|
|
2095
|
-
`,children:[e(F,{backgroundColor:"light",padding:"size-200",borderColor:"light",borderWidth:"thin",borderRadius:"medium",minWidth:"size-6000",children:s(h,{direction:"row",justifyContent:"space-between",alignItems:"center",children:[e(K,{children:`${d.length} span${p?"s":""} selected`}),s(h,{direction:"row",gap:"size-100",children:[e(M,{variant:"default",size:"compact",onClick:g,children:"Cancel"}),s(tn,{placement:"top end",crossOffset:300,isOpen:o,onOpenChange:b=>{c(b)},children:[e(M,{variant:"primary",size:"compact",icon:e(P,{svg:e(I.DatabaseOutline,{})}),loading:m,disabled:m,children:m?"Adding to dataset":"Add to dataset"}),e(u.Suspense,{children:e(bm,{onDatasetSelected:b=>{y(b),c(!1)},onCreateNewDataset:()=>{c(!1),t(e(
|
|
2095
|
+
`,children:[e(F,{backgroundColor:"light",padding:"size-200",borderColor:"light",borderWidth:"thin",borderRadius:"medium",minWidth:"size-6000",children:s(h,{direction:"row",justifyContent:"space-between",alignItems:"center",children:[e(K,{children:`${d.length} span${p?"s":""} selected`}),s(h,{direction:"row",gap:"size-100",children:[e(M,{variant:"default",size:"compact",onClick:g,children:"Cancel"}),s(tn,{placement:"top end",crossOffset:300,isOpen:o,onOpenChange:b=>{c(b)},children:[e(M,{variant:"primary",size:"compact",icon:e(P,{svg:e(I.DatabaseOutline,{})}),loading:m,disabled:m,children:m?"Adding to dataset":"Add to dataset"}),e(u.Suspense,{children:e(bm,{onDatasetSelected:b=>{y(b),c(!1)},onCreateNewDataset:()=>{c(!1),t(e(H,{title:"New Dataset",isDismissable:!0,onDismiss:()=>t(null),children:e(nl,{onDatasetCreateError:()=>{r({title:"Dataset creation failed",message:"Failed to create dataset."})},onDatasetCreated:b=>{t(null),i({title:"Dataset created",message:`${b.name} has been successfully created.`}),c(!0)}})}))}})})]})]})]})}),e(W,{onDismiss:()=>{t(null)},children:l})]})}const er=C`
|
|
2096
2096
|
display: flex;
|
|
2097
2097
|
flex-direction: column;
|
|
2098
2098
|
flex: 1 1 auto;
|
|
@@ -2105,10 +2105,10 @@ fragment DatasetSelectorPopoverContent_datasets on Query {
|
|
|
2105
2105
|
.ac-dropdown-button {
|
|
2106
2106
|
min-width: var(--ac-global-dimension-static-size-300);
|
|
2107
2107
|
}
|
|
2108
|
-
`,
|
|
2108
|
+
`,ea="annotations",$e=":",nr={col:"startTime",dir:"desc"};function ar(n){let a=null,l=null;if(n.id&&n.id.startsWith(ea)){const[,t,i]=n.id.split($e);l={attr:t,name:i}}else a=n.id;return{col:a,evalResultKey:l,dir:n.desc?"desc":"asc"}}const Dl=50;function vm(n){const{fetchKey:a}=qn(),l=u.useRef(null),[t,i]=u.useState({}),[r,o]=u.useState([]),[c,d]=u.useState(""),g=an(N=>N.columnVisibility),f=Y(),{data:m,loadNext:p,hasNext:y,isLoadingNext:b,refetch:k}=D.usePaginationFragment(zi,n.project),S=an(N=>N.annotationColumnVisibility),v=u.useMemo(()=>Object.keys(S).filter(N=>S[N]),[S]),w=u.useMemo(()=>m.spans.edges.map(({span:z})=>z),[m]),L=v.map(N=>({header:N,columns:[{header:"label",accessorKey:`${ea}${$e}label${$e}${N}`,cell:({row:z})=>{const _=z.original.spanAnnotations.find($=>$.name===N);return _?_.label:null}},{header:"score",accessorKey:`${ea}${$e}score${$e}${N}`,cell:({row:z})=>{const _=z.original.spanAnnotations.find($=>$.name===N);return _?_.score:null}}]})),A=[{header:()=>s(h,{direction:"row",gap:"size-50",children:[e("span",{children:"feedback"}),s(Vn,{children:[e(re,{level:3,weight:"heavy",children:"Feedback"}),e(Fn,{children:"Feedback includes evaluations and human annotations logged via the API or set via the UI."})]})]}),accessorKey:"spanAnnotations",enableSorting:!1,cell:({row:N})=>s(h,{direction:"row",gap:"size-50",wrap:"wrap",children:[N.original.spanAnnotations.map(z=>e(ia,{annotation:z,layout:"horizontal",width:"500px",extra:e(Oi,{annotation:z}),children:e(xn,{annotation:z,annotationDisplayPreference:"label"})},z.name)),N.original.documentRetrievalMetrics.map(z=>s(U,{children:[e(De,{name:z.evaluationName,metric:"ndcg",score:z.ndcg},"ndcg"),e(De,{name:z.evaluationName,metric:"precision",score:z.precision},"precision"),e(De,{name:z.evaluationName,metric:"hit",score:z.hit},"hit")]}))]})},...L],x=[{id:"select",maxSize:10,header:({table:N})=>e(en,{checked:N.getIsAllRowsSelected(),indeterminate:N.getIsSomeRowsSelected(),onChange:N.getToggleAllRowsSelectedHandler()}),cell:({row:N})=>e(en,{checked:N.getIsSelected(),disabled:!N.getCanSelect(),indeterminate:N.getIsSomeSelected(),onChange:N.getToggleSelectedHandler()})},{header:"kind",accessorKey:"spanKind",maxSize:100,enableSorting:!1,cell:({getValue:N})=>e(al,{spanKind:N()})},{header:"name",accessorKey:"name",enableSorting:!1,cell:({getValue:N,row:z})=>{const _=z.original,{traceId:$}=_.context;return e(Ze,{to:`traces/${$}?selectedSpanNodeId=${_.id}`,children:N()})}},{header:"input",accessorKey:"input.value",cell:me,enableSorting:!1},{header:"output",accessorKey:"output.value",cell:me,enableSorting:!1},{header:"metadata",accessorKey:"metadata",cell:me,enableSorting:!1},...A,{header:"start time",accessorKey:"startTime",cell:Fe},{header:"latency",accessorKey:"latencyMs",cell:({getValue:N})=>{const z=N();return z===null||typeof z!="number"?null:e(we,{latencyMs:z})}},{header:"total tokens",accessorKey:"tokenCountTotal",cell:({row:N,getValue:z})=>{const _=z();return _===null?"--":e(Fa,{tokenCountTotal:_,tokenCountPrompt:N.original.tokenCountPrompt||0,tokenCountCompletion:N.original.tokenCountCompletion||0})}},{header:"status",accessorKey:"statusCode",enableSorting:!1,cell:({getValue:N})=>e(Ca,{statusCode:N()})}];u.useEffect(()=>{const N=r[0];u.startTransition(()=>{k({sort:N?ar(N):nr,after:null,first:Dl,filterCondition:c},{fetchPolicy:"store-and-network"})})},[r,k,c,a]);const T=u.useCallback(N=>{if(N){const{scrollHeight:z,scrollTop:_,clientHeight:$}=N;z-_-$<300&&!b&&y&&p(Dl)}},[y,b,p]),E=he({columns:x,data:w,state:{sorting:r,columnVisibility:g,rowSelection:t},manualSorting:!0,enableRowSelection:!0,onRowSelectionChange:i,onSortingChange:o,getCoreRowModel:ke(),getSortedRowModel:Rn()}),R=E.getRowModel().rows,j=E.getSelectedRowModel().rows,ae=j.map(N=>N.original),ie=u.useCallback(()=>{i({})},[i]),be=R.length===0,Se=E.getAllColumns().filter(N=>N.columns.length===0);return s("div",{css:er,children:[e(F,{paddingTop:"size-100",paddingBottom:"size-100",paddingStart:"size-200",paddingEnd:"size-200",borderBottomColor:"grey-300",borderBottomWidth:"thin",flex:"none",children:s(h,{direction:"row",gap:"size-100",width:"100%",alignItems:"center",children:[e(Gi,{onValidCondition:d}),e(qi,{columns:Se,query:m})]})}),e("div",{css:C`
|
|
2109
2109
|
flex: 1 1 auto;
|
|
2110
2110
|
overflow: auto;
|
|
2111
|
-
`,onScroll:N=>T(N.target),ref:l,children:s("table",{css:
|
|
2111
|
+
`,onScroll:N=>T(N.target),ref:l,children:s("table",{css:jn,children:[e("thead",{children:E.getHeaderGroups().map(N=>e("tr",{children:N.headers.map(z=>e("th",{colSpan:z.colSpan,children:z.isPlaceholder?null:s("div",{className:z.column.getCanSort()?"cursor-pointer":"",onClick:z.column.getToggleSortingHandler(),style:{left:z.getStart(),width:z.getSize()},children:[Z(z.column.columnDef.header,z.getContext()),z.column.getIsSorted()?e(P,{className:"sort-icon",svg:z.column.getIsSorted()==="asc"?e(I.ArrowUpFilled,{}):e(I.ArrowDownFilled,{})}):null]})},z.id))},N.id))}),be?e(Qi,{projectName:m.name}):e("tbody",{children:R.map(N=>e("tr",{onClick:()=>f(`traces/${N.original.context.traceId}?selectedSpanNodeId=${N.original.id}`),children:N.getVisibleCells().map(z=>e("td",{children:Z(z.column.columnDef.cell,z.getContext())},z.id))},N.id))})]})}),j.length?e(Yi,{selectedSpans:ae,onClearSelection:ie}):null]})}const lr=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"id"}],a=[{kind:"Variable",name:"id",variableName:"id"}];return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"StreamToggleRefetchQuery",selections:[{alias:null,args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{args:null,kind:"FragmentSpread",name:"StreamToggle_data"}],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"StreamToggleRefetchQuery",selections:[{alias:null,args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},{kind:"TypeDiscriminator",abstractKey:"__isNode"},{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{kind:"InlineFragment",selections:[{alias:null,args:null,kind:"ScalarField",name:"streamingLastUpdatedAt",storageKey:null}],type:"Project",abstractKey:null}],storageKey:null}]},params:{cacheID:"4e136f41c0942f253822336dc0c5b291",id:null,metadata:{},name:"StreamToggleRefetchQuery",operationKind:"query",text:`query StreamToggleRefetchQuery(
|
|
2112
2112
|
$id: GlobalID!
|
|
2113
2113
|
) {
|
|
2114
2114
|
node(id: $id) {
|
|
@@ -2123,7 +2123,7 @@ fragment StreamToggle_data on Project {
|
|
|
2123
2123
|
streamingLastUpdatedAt
|
|
2124
2124
|
id
|
|
2125
2125
|
}
|
|
2126
|
-
`}}}();lr.hash="30a8f0bcf1aa6021b2c9a47866f5dc49";const tr={argumentDefinitions:[],kind:"Fragment",metadata:{refetch:{connection:null,fragmentPathInResult:["node"],operation:lr,identifierInfo:{identifierField:"id",identifierQueryVariableName:"id"}}},name:"StreamToggle_data",selections:[{alias:null,args:null,kind:"ScalarField",name:"streamingLastUpdatedAt",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null}],type:"Project",abstractKey:null};tr.hash="30a8f0bcf1aa6021b2c9a47866f5dc49";function ir(n,a){const l=u.useRef(null);u.useEffect(()=>{l.current=n},[n]),u.useEffect(()=>{function t(){l.current&&l.current()}if(typeof a=="number"){const i=setInterval(t,a);return()=>clearInterval(i)}},[a])}const Cm=2e3;function Fm(n){const{isStreaming:a,setIsStreaming:l,setFetchKey:t}=
|
|
2126
|
+
`}}}();lr.hash="30a8f0bcf1aa6021b2c9a47866f5dc49";const tr={argumentDefinitions:[],kind:"Fragment",metadata:{refetch:{connection:null,fragmentPathInResult:["node"],operation:lr,identifierInfo:{identifierField:"id",identifierQueryVariableName:"id"}}},name:"StreamToggle_data",selections:[{alias:null,args:null,kind:"ScalarField",name:"streamingLastUpdatedAt",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null}],type:"Project",abstractKey:null};tr.hash="30a8f0bcf1aa6021b2c9a47866f5dc49";function ir(n,a){const l=u.useRef(null);u.useEffect(()=>{l.current=n},[n]),u.useEffect(()=>{function t(){l.current&&l.current()}if(typeof a=="number"){const i=setInterval(t,a);return()=>clearInterval(i)}},[a])}const Cm=2e3;function Fm(n){const{isStreaming:a,setIsStreaming:l,setFetchKey:t}=qn(),[i,r]=D.useRefetchableFragment(tr,n.project),o=u.useRef(i.streamingLastUpdatedAt),c=u.useCallback(()=>{a&&u.startTransition(()=>{r({},{fetchPolicy:"store-and-network"})})},[a,r]),d=i.streamingLastUpdatedAt;return u.useEffect(()=>{d!=null&&(o.current==null||o.current<d)&&(o.current=d,t(`fetch-traces-${d}`))},[t,d]),ir(c,Cm),e(Mn,{labelPlacement:"start",isSelected:a,onChange:()=>{l(!a)},children:"Stream"})}const rr=function(){var n={defaultValue:null,kind:"LocalArgument",name:"after"},a={defaultValue:null,kind:"LocalArgument",name:"filterCondition"},l={defaultValue:50,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"},o=[{kind:"Variable",name:"id",variableName:"id"}],c={kind:"Variable",name:"after",variableName:"after"},d={kind:"Variable",name:"filterCondition",variableName:"filterCondition"},g={kind:"Variable",name:"first",variableName:"first"},f={kind:"Variable",name:"sort",variableName:"sort"},m={alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},p={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},y={alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},b=[c,d,g,{kind:"Literal",name:"rootSpansOnly",value:!0},f,{kind:"Variable",name:"timeRange",variableName:"timeRange"}],k={alias:null,args:null,kind:"ScalarField",name:"spanKind",storageKey:null},S={alias:"statusCode",args:null,kind:"ScalarField",name:"propagatedStatusCode",storageKey:null},v={alias:null,args:null,kind:"ScalarField",name:"startTime",storageKey:null},w={alias:null,args:null,kind:"ScalarField",name:"latencyMs",storageKey:null},L={alias:null,args:null,kind:"ScalarField",name:"parentId",storageKey:null},A=[{alias:"value",args:null,kind:"ScalarField",name:"truncatedValue",storageKey:null}],x={alias:null,args:null,concreteType:"SpanContext",kind:"LinkedField",name:"context",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"spanId",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"traceId",storageKey:null}],storageKey:null},T={alias:null,args:null,concreteType:"SpanAnnotation",kind:"LinkedField",name:"spanAnnotations",plural:!0,selections:[y,{alias:null,args:null,kind:"ScalarField",name:"label",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"score",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"annotatorKind",storageKey:null}],storageKey:null},E={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},R=[{alias:null,args:null,kind:"ScalarField",name:"value",storageKey:null}];return{fragment:{argumentDefinitions:[n,a,l,t,i,r],kind:"Fragment",metadata:null,name:"TracesTableQuery",selections:[{alias:null,args:o,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{args:[c,d,g,f],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:o,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[m,{kind:"TypeDiscriminator",abstractKey:"__isNode"},p,{kind:"InlineFragment",selections:[y,{alias:null,args:null,kind:"ScalarField",name:"spanAnnotationNames",storageKey:null},{alias:"rootSpans",args:b,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:[p,k,y,{alias:null,args:null,kind:"ScalarField",name:"metadata",storageKey:null},S,v,w,{alias:null,args:null,kind:"ScalarField",name:"cumulativeTokenCountTotal",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"cumulativeTokenCountPrompt",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"cumulativeTokenCountCompletion",storageKey:null},L,{alias:null,args:null,concreteType:"SpanIOValue",kind:"LinkedField",name:"input",plural:!1,selections:A,storageKey:null},{alias:null,args:null,concreteType:"SpanIOValue",kind:"LinkedField",name:"output",plural:!1,selections:A,storageKey:null},x,T,E,{alias:null,args:null,concreteType:"Span",kind:"LinkedField",name:"descendants",plural:!0,selections:[p,k,y,S,v,w,L,{alias:"cumulativeTokenCountTotal",args:null,kind:"ScalarField",name:"tokenCountTotal",storageKey:null},{alias:"cumulativeTokenCountPrompt",args:null,kind:"ScalarField",name:"tokenCountPrompt",storageKey:null},{alias:"cumulativeTokenCountCompletion",args:null,kind:"ScalarField",name:"tokenCountCompletion",storageKey:null},{alias:null,args:null,concreteType:"SpanIOValue",kind:"LinkedField",name:"input",plural:!1,selections:R,storageKey:null},{alias:null,args:null,concreteType:"SpanIOValue",kind:"LinkedField",name:"output",plural:!1,selections:R,storageKey:null},x,T,E],storageKey:null}],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:[m],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:b,filters:["sort","rootSpansOnly","filterCondition","timeRange"],handle:"connection",key:"TracesTable_rootSpans",kind:"LinkedHandle",name:"spans"}],type:"Project",abstractKey:null}],storageKey:null}]},params:{cacheID:"4e6571e93159d5ab4244d5cc4058a65a",id:null,metadata:{},name:"TracesTableQuery",operationKind:"query",text:`query TracesTableQuery(
|
|
2127
2127
|
$after: String = null
|
|
2128
2128
|
$filterCondition: String = null
|
|
2129
2129
|
$first: Int = 50
|
|
@@ -2229,16 +2229,16 @@ fragment TracesTable_spans_1XEuU on Project {
|
|
|
2229
2229
|
}
|
|
2230
2230
|
id
|
|
2231
2231
|
}
|
|
2232
|
-
`}}}();rr.hash="69e77ceeea7371be4ec13fc702225150";const sr=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:"statusCode",args:null,kind:"ScalarField",name:"propagatedStatusCode",storageKey:null},r={alias:null,args:null,kind:"ScalarField",name:"startTime",storageKey:null},o={alias:null,args:null,kind:"ScalarField",name:"latencyMs",storageKey:null},c={alias:null,args:null,kind:"ScalarField",name:"parentId",storageKey:null},d=[{alias:"value",args:null,kind:"ScalarField",name:"truncatedValue",storageKey:null}],g={alias:null,args:null,concreteType:"SpanContext",kind:"LinkedField",name:"context",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"spanId",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"traceId",storageKey:null}],storageKey:null},f={alias:null,args:null,concreteType:"SpanAnnotation",kind:"LinkedField",name:"spanAnnotations",plural:!0,selections:[a,{alias:null,args:null,kind:"ScalarField",name:"label",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"score",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"annotatorKind",storageKey:null}],storageKey:null},m={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},p=[{alias:null,args:null,kind:"ScalarField",name:"value",storageKey:null}];return{argumentDefinitions:[{defaultValue:null,kind:"LocalArgument",name:"after"},{defaultValue:null,kind:"LocalArgument",name:"filterCondition"},{defaultValue:50,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:rr,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},i,r,o,{alias:null,args:null,kind:"ScalarField",name:"cumulativeTokenCountTotal",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"cumulativeTokenCountPrompt",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"cumulativeTokenCountCompletion",storageKey:null},c,{alias:null,args:null,concreteType:"SpanIOValue",kind:"LinkedField",name:"input",plural:!1,selections:d,storageKey:null},{alias:null,args:null,concreteType:"SpanIOValue",kind:"LinkedField",name:"output",plural:!1,selections:d,storageKey:null},g,f,m,{alias:null,args:null,concreteType:"Span",kind:"LinkedField",name:"descendants",plural:!0,selections:[l,t,a,i,r,o,c,{alias:"cumulativeTokenCountTotal",args:null,kind:"ScalarField",name:"tokenCountTotal",storageKey:null},{alias:"cumulativeTokenCountPrompt",args:null,kind:"ScalarField",name:"tokenCountPrompt",storageKey:null},{alias:"cumulativeTokenCountCompletion",args:null,kind:"ScalarField",name:"tokenCountCompletion",storageKey:null},{alias:null,args:null,concreteType:"SpanIOValue",kind:"LinkedField",name:"input",plural:!1,selections:p,storageKey:null},{alias:null,args:null,concreteType:"SpanIOValue",kind:"LinkedField",name:"output",plural:!1,selections:p,storageKey:null},g,f,m],storageKey:null}],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}}();sr.hash="69e77ceeea7371be4ec13fc702225150";const
|
|
2232
|
+
`}}}();rr.hash="69e77ceeea7371be4ec13fc702225150";const sr=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:"statusCode",args:null,kind:"ScalarField",name:"propagatedStatusCode",storageKey:null},r={alias:null,args:null,kind:"ScalarField",name:"startTime",storageKey:null},o={alias:null,args:null,kind:"ScalarField",name:"latencyMs",storageKey:null},c={alias:null,args:null,kind:"ScalarField",name:"parentId",storageKey:null},d=[{alias:"value",args:null,kind:"ScalarField",name:"truncatedValue",storageKey:null}],g={alias:null,args:null,concreteType:"SpanContext",kind:"LinkedField",name:"context",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"spanId",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"traceId",storageKey:null}],storageKey:null},f={alias:null,args:null,concreteType:"SpanAnnotation",kind:"LinkedField",name:"spanAnnotations",plural:!0,selections:[a,{alias:null,args:null,kind:"ScalarField",name:"label",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"score",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"annotatorKind",storageKey:null}],storageKey:null},m={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},p=[{alias:null,args:null,kind:"ScalarField",name:"value",storageKey:null}];return{argumentDefinitions:[{defaultValue:null,kind:"LocalArgument",name:"after"},{defaultValue:null,kind:"LocalArgument",name:"filterCondition"},{defaultValue:50,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:rr,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},i,r,o,{alias:null,args:null,kind:"ScalarField",name:"cumulativeTokenCountTotal",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"cumulativeTokenCountPrompt",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"cumulativeTokenCountCompletion",storageKey:null},c,{alias:null,args:null,concreteType:"SpanIOValue",kind:"LinkedField",name:"input",plural:!1,selections:d,storageKey:null},{alias:null,args:null,concreteType:"SpanIOValue",kind:"LinkedField",name:"output",plural:!1,selections:d,storageKey:null},g,f,m,{alias:null,args:null,concreteType:"Span",kind:"LinkedField",name:"descendants",plural:!0,selections:[l,t,a,i,r,o,c,{alias:"cumulativeTokenCountTotal",args:null,kind:"ScalarField",name:"tokenCountTotal",storageKey:null},{alias:"cumulativeTokenCountPrompt",args:null,kind:"ScalarField",name:"tokenCountPrompt",storageKey:null},{alias:"cumulativeTokenCountCompletion",args:null,kind:"ScalarField",name:"tokenCountCompletion",storageKey:null},{alias:null,args:null,concreteType:"SpanIOValue",kind:"LinkedField",name:"input",plural:!1,selections:p,storageKey:null},{alias:null,args:null,concreteType:"SpanIOValue",kind:"LinkedField",name:"output",plural:!1,selections:p,storageKey:null},g,f,m],storageKey:null}],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}}();sr.hash="69e77ceeea7371be4ec13fc702225150";const Tl=50;function or(n){const a=[];for(const l of n){const t={...l.span,children:or(l.children)};a.push(t)}return a}function Km(n){const a=u.useRef(null),[l,t]=u.useState({}),[i,r]=u.useState([]),[o,c]=u.useState(""),d=Y(),{fetchKey:g}=qn(),{data:f,loadNext:m,hasNext:p,isLoadingNext:y,refetch:b}=D.usePaginationFragment(sr,n.project),k=an(_=>_.annotationColumnVisibility),S=u.useMemo(()=>Object.keys(k).filter(_=>k[_]),[k]),v=u.useMemo(()=>f.rootSpans.edges.map(({rootSpan:$})=>{const ee=Zo([$,...$.descendants]),[un]=or(ee);return un}),[f]),w=S.map(_=>({header:_,columns:[{header:"label",accessorKey:`${ea}${$e}label${$e}${_}`,cell:({row:$})=>{const ee=$.original.spanAnnotations.find(un=>un.name===_);return ee?ee.label:null}},{header:"score",accessorKey:`${ea}${$e}score${$e}${_}`,cell:({row:$})=>{const ee=$.original.spanAnnotations.find(un=>un.name===_);return ee?ee.score:null}}]})),L=[{header:()=>s(h,{direction:"row",gap:"size-50",children:[e("span",{children:"feedback"}),s(Vn,{children:[e(re,{level:3,weight:"heavy",children:"Feedback"}),e(Fn,{children:"Feedback includes evaluations and human annotations logged via the API or set via the UI."})]})]}),accessorKey:"spanAnnotations",enableSorting:!1,cell:({row:_})=>{const $=_.original.spanAnnotations.length===0&&_.original.documentRetrievalMetrics.length===0;return s(h,{direction:"row",gap:"size-50",wrap:"wrap",children:[_.original.spanAnnotations.map(ee=>e(ia,{annotation:ee,layout:"horizontal",width:"500px",extra:e(Oi,{annotation:ee}),children:e(xn,{annotation:ee,annotationDisplayPreference:"label"})},ee.name)),_.original.documentRetrievalMetrics.map(ee=>s(u.Fragment,{children:[e(De,{name:ee.evaluationName,metric:"ndcg",score:ee.ndcg},"ndcg"),e(De,{name:ee.evaluationName,metric:"precision",score:ee.precision},"precision"),e(De,{name:ee.evaluationName,metric:"hit",score:ee.hit},"hit")]},"doc-evals")),$?"--":null]})}},...w],A=[{id:"select",maxSize:10,header:({table:_})=>e(en,{checked:_.getIsAllRowsSelected(),indeterminate:_.getIsSomeRowsSelected(),onChange:_.getToggleAllRowsSelectedHandler()}),cell:({row:_})=>e(en,{checked:_.getIsSelected(),disabled:!_.getCanSelect(),indeterminate:_.getIsSomeSelected(),onChange:_.getToggleSelectedHandler()})},{header:()=>s(h,{gap:"size-50",direction:"row",alignItems:"center",children:[e(fl,{isExpanded:j.getIsAllRowsExpanded(),onClick:j.getToggleAllRowsExpandedHandler(),"aria-label":"Expand all rows"}),"kind"]}),enableSorting:!1,accessorKey:"spanKind",maxSize:100,cell:_=>e("div",{css:C`
|
|
2233
2233
|
// Since rows are flattened by default,
|
|
2234
2234
|
// we can use the row.depth property
|
|
2235
2235
|
// and paddingLeft to visually indicate the depth
|
|
2236
2236
|
// of the row
|
|
2237
2237
|
padding-left: ${_.row.depth*2}rem;
|
|
2238
|
-
`,children:s(h,{gap:"size-50",children:[_.row.getCanExpand()?e(
|
|
2238
|
+
`,children:s(h,{gap:"size-50",children:[_.row.getCanExpand()?e(fl,{isExpanded:_.row.getIsExpanded(),onClick:_.row.getToggleExpandedHandler(),"aria-label":"Expand row"}):null,e(al,{spanKind:_.getValue()})]})})},{header:"name",accessorKey:"name",enableSorting:!1,cell:({getValue:_,row:$})=>{const{traceId:ee}=$.original.context;return e(Ze,{to:`traces/${ee}?selectedSpanNodeId=${$.original.id}`,children:_()})}},{header:"input",accessorKey:"input.value",enableSorting:!1,cell:me},{header:"output",accessorKey:"output.value",enableSorting:!1,cell:me},{header:"metadata",accessorKey:"metadata",enableSorting:!1,cell:me},...L,{header:"start time",accessorKey:"startTime",cell:Fe},{header:"latency",accessorKey:"latencyMs",cell:({getValue:_})=>{const $=_();return $===null||typeof $!="number"?null:e(we,{latencyMs:$})}},{header:"total tokens",minSize:80,accessorKey:"cumulativeTokenCountTotal",cell:({row:_,getValue:$})=>{const ee=$();return ee===null?"--":e(Fa,{tokenCountTotal:ee,tokenCountPrompt:_.original.cumulativeTokenCountPrompt||0,tokenCountCompletion:_.original.cumulativeTokenCountCompletion||0})}},{header:"status",accessorKey:"statusCode",enableSorting:!1,cell:({getValue:_})=>e(Ca,{statusCode:_()})}];u.useEffect(()=>{const _=i[0];u.startTransition(()=>{b({sort:_?ar(_):nr,after:null,first:Tl,filterCondition:o},{fetchPolicy:"store-and-network"})})},[i,b,o,g]);const x=Ke.useCallback(_=>{if(_){const{scrollHeight:$,scrollTop:ee,clientHeight:un}=_;$-ee-un<300&&!y&&p&&m(Tl)}},[p,y,m]),[T,E]=u.useState({}),R=an(_=>_.columnVisibility),j=he({columns:A,data:v,onExpandedChange:E,manualSorting:!0,getSubRows:_=>_.children,state:{sorting:i,expanded:T,columnVisibility:R,rowSelection:l},onRowSelectionChange:t,enableSubRowSelection:!1,onSortingChange:r,getCoreRowModel:ke(),getSortedRowModel:Rn(),getExpandedRowModel:Os(),getRowId:_=>_.id}),ae=j.getRowModel().rows,ie=j.getSelectedRowModel().flatRows,be=ie.map(_=>_.original),Se=u.useCallback(()=>{t({})},[t]),N=ae.length===0,z=j.getAllColumns().filter(_=>_.columns.length===0);return s("div",{css:er,children:[e(F,{paddingTop:"size-100",paddingBottom:"size-100",paddingStart:"size-200",paddingEnd:"size-200",borderBottomColor:"grey-300",borderBottomWidth:"thin",flex:"none",children:s(h,{direction:"row",gap:"size-100",width:"100%",alignItems:"center",children:[e(Gi,{onValidCondition:c}),e(qi,{columns:z,query:f})]})}),e("div",{css:C`
|
|
2239
2239
|
flex: 1 1 auto;
|
|
2240
2240
|
overflow: auto;
|
|
2241
|
-
`,onScroll:_=>x(_.target),ref:a,children:s("table",{css:
|
|
2241
|
+
`,onScroll:_=>x(_.target),ref:a,children:s("table",{css:jn,children:[e("thead",{children:j.getHeaderGroups().map(_=>e("tr",{children:_.headers.map($=>e("th",{colSpan:$.colSpan,children:$.isPlaceholder?null:s("div",{"data-sortable":$.column.getCanSort(),className:$.column.getCanSort()?"cursor-pointer":"",onClick:$.column.getToggleSortingHandler(),style:{left:$.getStart(),width:$.getSize()},children:[Z($.column.columnDef.header,$.getContext()),$.column.getIsSorted()?e(P,{className:"sort-icon",svg:$.column.getIsSorted()==="asc"?e(I.ArrowUpFilled,{}):e(I.ArrowDownFilled,{})}):null]})},$.id))},_.id))}),N?e(Qi,{projectName:f.name}):e("tbody",{children:ae.map(_=>e("tr",{onClick:()=>d(`traces/${_.original.context.traceId}`),children:_.getVisibleCells().map($=>e("td",{children:Z($.column.columnDef.cell,$.getContext())},$.id))},_.id))})]})}),ie.length?e(Yi,{selectedSpans:be,onClearSelection:Se}):null]})}const xm=C`
|
|
2242
2242
|
flex: 1 1 auto;
|
|
2243
2243
|
display: flex;
|
|
2244
2244
|
flex-direction: column;
|
|
@@ -2264,7 +2264,7 @@ fragment TracesTable_spans_1XEuU on Project {
|
|
|
2264
2264
|
}
|
|
2265
2265
|
}
|
|
2266
2266
|
}
|
|
2267
|
-
`;function
|
|
2267
|
+
`;function Uy(){const{projectId:n}=ln(),{timeRange:a}=Ka();return e(u.Suspense,{fallback:e(fe,{}),children:e(Dm,{projectId:n,timeRange:a})})}const dr=Di;function Dm({projectId:n,timeRange:a}){const l=u.useMemo(()=>({start:a.start.toISOString(),end:a.end.toISOString()}),[a]),t=D.useLazyLoadQuery(xi,{id:n,timeRange:l},{fetchPolicy:"store-and-network"}),[i,r,o]=D.useQueryLoader(dr),c=u.useCallback(d=>{d===1?r({id:n,timeRange:l}):o()},[o,r,n,l]);return s("main",{css:xm,children:[e(om,{project:t.project,extra:s(h,{direction:"row",alignItems:"center",gap:"size-100",children:[e(Fm,{project:t.project}),e(it,{})]})}),s(Te,{onChange:c,children:[e(J,{name:"Traces",children:({isSelected:d})=>d&&e(xl,{children:e(u.Suspense,{children:e(Km,{project:t.project})})})}),e(J,{name:"Spans",title:"Spans",children:({isSelected:d})=>d&&i&&e(xl,{children:e(u.Suspense,{fallback:e(fe,{}),children:e(Tm,{queryReference:i})})})})]}),e(u.Suspense,{children:e(Pe,{})})]})}function Tm({queryReference:n}){const a=D.usePreloadedQuery(dr,n);return e(vm,{project:a.project})}const cr=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"id"}],a=[{kind:"Variable",name:"id",variableName:"id"}],l={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},t={kind:"InlineFragment",selections:[{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null}],type:"Project",abstractKey:null};return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"projectLoaderQuery",selections:[{alias:"project",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[l,t],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"projectLoaderQuery",selections:[{alias:"project",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},l,t],storageKey:null}]},params:{cacheID:"04c84b5bc2a01477851d347af75dcc11",id:null,metadata:{},name:"projectLoaderQuery",operationKind:"query",text:`query projectLoaderQuery(
|
|
2268
2268
|
$id: GlobalID!
|
|
2269
2269
|
) {
|
|
2270
2270
|
project: node(id: $id) {
|
|
@@ -2275,7 +2275,7 @@ fragment TracesTable_spans_1XEuU on Project {
|
|
|
2275
2275
|
}
|
|
2276
2276
|
}
|
|
2277
2277
|
}
|
|
2278
|
-
`}}}();cr.hash="3d31e323c06df38ec2eaa6f3adb55e79";async function
|
|
2278
|
+
`}}}();cr.hash="3d31e323c06df38ec2eaa6f3adb55e79";async function By(n){const{projectId:a}=n.params;return await D.fetchQuery(xe,cr,{id:a}).toPromise()}function Hy(){const n=Qs(),a=u.useMemo(()=>n instanceof Error&&n.message==="Failed to fetch"?e(Im,{}):e(Lm,{error:n}),[n]);return e("main",{css:C`
|
|
2279
2279
|
width: 100%;
|
|
2280
2280
|
height: 100%;
|
|
2281
2281
|
display: flex;
|
|
@@ -2288,7 +2288,7 @@ fragment TracesTable_spans_1XEuU on Project {
|
|
|
2288
2288
|
margin-top: 200px;
|
|
2289
2289
|
display: flex;
|
|
2290
2290
|
flex-direction: column;
|
|
2291
|
-
`,children:a})})}function Im(){return s(
|
|
2291
|
+
`,children:a})})}function Im(){return s(U,{children:[s(h,{direction:"column",width:"100%",alignItems:"center",children:[e(ba,{graphicKey:"not found"}),e("h1",{children:"Server disconnected"})]}),e("p",{children:"We are unable to reach the Phoenix server. Please ensure that Phoenix is running and try again."})]})}function Lm({error:n}){return s(U,{children:[s(h,{direction:"column",width:"100%",alignItems:"center",children:[e(ba,{graphicKey:"error"}),e("h1",{children:"Something went wrong"})]}),e("p",{children:"We strive to do our very best but 🐛 bugs happen. It would mean a lot to us if you could file a an issue. If you feel comfortable, please include the error details below in your issue. We will get back to you as soon as we can."}),e("p",{css:C`
|
|
2292
2292
|
display: flex;
|
|
2293
2293
|
flex-direction: row;
|
|
2294
2294
|
justify-content: flex-end;
|
|
@@ -2298,13 +2298,13 @@ fragment TracesTable_spans_1XEuU on Project {
|
|
|
2298
2298
|
flex-direction: row;
|
|
2299
2299
|
align-items: baseline;
|
|
2300
2300
|
gap: 0.2em;
|
|
2301
|
-
`,children:["💙 the",e(
|
|
2301
|
+
`,children:["💙 the",e(je,{href:"mailto:phoenix-devs@arize.com",children:"phoenix team"})]})}),s("div",{css:C`
|
|
2302
2302
|
display: flex;
|
|
2303
2303
|
flex-direction: row;
|
|
2304
2304
|
justify-content: flex-end;
|
|
2305
2305
|
align-items: center;
|
|
2306
2306
|
gap: var(--px-spacing-med);
|
|
2307
|
-
`,children:[e(
|
|
2307
|
+
`,children:[e(je,{href:"https://github.com/Arize-ai/phoenix/issues/new?assignees=&labels=bug&template=bug_report.md&title=%5BBUG%5D",children:"file an issue with us"}),e(M,{variant:"primary",size:"compact",onClick:()=>{window.location.href="/"},children:"Return Home"})]}),s("details",{open:!0,children:[e("summary",{children:"error details"}),e("pre",{css:C`
|
|
2308
2308
|
white-space: pre-wrap;
|
|
2309
2309
|
overflow-wrap: break-word;
|
|
2310
2310
|
overflow: hidden;
|
|
@@ -2329,7 +2329,7 @@ fragment TracesTable_spans_1XEuU on Project {
|
|
|
2329
2329
|
}
|
|
2330
2330
|
}
|
|
2331
2331
|
}
|
|
2332
|
-
`}}}();ur.hash="b73d8f3f532a0c6f88863f3c6dd5734f";const Pm=ur;function
|
|
2332
|
+
`}}}();ur.hash="b73d8f3f532a0c6f88863f3c6dd5734f";const Pm=ur;function Gy(){const n=D.useLazyLoadQuery(Pm,{}),{model:{primaryInferences:a,referenceInferences:l,corpusInferences:t}}=n;return e(Yo,{primaryInferences:a,referenceInferences:l??null,corpusInferences:t??null,children:e(Xo,{timeRangeBounds:{start:new Date(a.startTime),end:new Date(a.endTime)},children:e(Pe,{})})})}function Wy(){return e(dm,{children:e(lm,{children:e(Pe,{})})})}function Jy(){return e(ed,{children:e(Pe,{})})}const mr=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"after"},{defaultValue:50,kind:"LocalArgument",name:"first"},{defaultValue:null,kind:"LocalArgument",name:"timeRange"}],a=[{kind:"Variable",name:"after",variableName:"after"},{kind:"Variable",name:"first",variableName:"first"}],l={kind:"Variable",name:"timeRange",variableName:"timeRange"},t=[l];return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"ProjectsPageProjectsQuery",selections:[{args:a,kind:"FragmentSpread",name:"ProjectsPageProjectsFragment"}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"ProjectsPageProjectsQuery",selections:[{alias:null,args:a,concreteType:"ProjectConnection",kind:"LinkedField",name:"projects",plural:!1,selections:[{alias:null,args:null,concreteType:"ProjectEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"project",args:null,concreteType:"Project",kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"gradientStartColor",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"gradientEndColor",storageKey:null},{alias:null,args:t,kind:"ScalarField",name:"traceCount",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"endTime",storageKey:null},{alias:"latencyMsP50",args:[{kind:"Literal",name:"probability",value:.5},l],kind:"ScalarField",name:"latencyMsQuantile",storageKey:null},{alias:null,args:t,kind:"ScalarField",name:"tokenCountTotal",storageKey:null}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"cursor",storageKey:null},{alias:null,args:null,concreteType:"Project",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},{alias:null,args:a,filters:null,handle:"connection",key:"ProjectsPage_projects",kind:"LinkedHandle",name:"projects"}]},params:{cacheID:"ead527a5c3ddda0f6c906c99183edf06",id:null,metadata:{},name:"ProjectsPageProjectsQuery",operationKind:"query",text:`query ProjectsPageProjectsQuery(
|
|
2333
2333
|
$after: String = null
|
|
2334
2334
|
$first: Int = 50
|
|
2335
2335
|
$timeRange: TimeRange
|
|
@@ -2391,7 +2391,7 @@ fragment ProjectsPageProjectsFragment on Query {
|
|
|
2391
2391
|
}
|
|
2392
2392
|
}
|
|
2393
2393
|
}
|
|
2394
|
-
`}}}();pr.hash="c28f5ced0b3ec4b3b8277d0aac29de2d";const wm="https://docs.arize.com/phoenix/tracing/how-to-tracing/setup-tracing";function Am(){const[n,a]=u.useState(null);return s("div",{children:[e(M,{variant:"default",icon:e(P,{svg:e(I.GridOutline,{})}),onClick:()=>{a(e(_m,{}))},children:"New Project"}),e(W,{isDismissable:!0,type:"slideOver",onDismiss:()=>a(null),children:n})]})}function _m(){const[n,a]=u.useState("Python");return e(
|
|
2394
|
+
`}}}();pr.hash="c28f5ced0b3ec4b3b8277d0aac29de2d";const wm="https://docs.arize.com/phoenix/tracing/how-to-tracing/setup-tracing";function Am(){const[n,a]=u.useState(null);return s("div",{children:[e(M,{variant:"default",icon:e(P,{svg:e(I.GridOutline,{})}),onClick:()=>{a(e(_m,{}))},children:"New Project"}),e(W,{isDismissable:!0,type:"slideOver",onDismiss:()=>a(null),children:n})]})}function _m(){const[n,a]=u.useState("Python");return e(H,{title:"Create a New Project",size:"L",children:s(F,{padding:"size-400",overflow:"auto",children:[e(F,{paddingBottom:"size-200",children:e(at,{language:n,onChange:a})}),e(F,{paddingBottom:"size-100",children:s(K,{children:["Projects are created when you log your first trace via OpenTelemetry. See the"," ",e(je,{href:wm,children:"documentation"})," ","for a complete guide."]})}),n==="Python"?e(lt,{}):e(tt,{})]})})}const yr=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"input"}],a=[{alias:null,args:[{kind:"Variable",name:"input",variableName:"input"}],concreteType:"Query",kind:"LinkedField",name:"clearProject",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null}],storageKey:null}];return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"ProjectActionMenuClearMutation",selections:a,type:"Mutation",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"ProjectActionMenuClearMutation",selections:a},params:{cacheID:"63319b4e42b499db2447817f1dc821fb",id:null,metadata:{},name:"ProjectActionMenuClearMutation",operationKind:"mutation",text:`mutation ProjectActionMenuClearMutation(
|
|
2395
2395
|
$input: ClearProjectInput!
|
|
2396
2396
|
) {
|
|
2397
2397
|
clearProject(input: $input) {
|
|
@@ -2412,12 +2412,12 @@ fragment ProjectsPageProjectsFragment on Query {
|
|
|
2412
2412
|
__typename
|
|
2413
2413
|
}
|
|
2414
2414
|
}
|
|
2415
|
-
`}}}();hr.hash="212501fe2d6367ec1503bd7a00c1730f";function Em(n){const{projectId:a}=n,l=u.useRef(null),[t,i]=D.useMutation(hr),{control:r,handleSubmit:o,setError:c,formState:{isValid:d}}=Ie({defaultValues:{endDate:new Date(Date.now()-nd).toISOString().slice(0,16)}}),g=u.useCallback(f=>{const m=js(f.endDate);if(!qs(m))return c("endDate",{message:"Date is not in a valid format"});t({variables:{input:{id:a,endTime:new Date(m).toISOString()}},onCompleted:()=>{n.onComplete()},onError:p=>{alert("Failed to clear project traces: "+p)}})},[t,a,n,c]);return s("form",{onSubmit:o(g),ref:l,children:[s(F,{padding:"size-200",children:[e(K,{color:"danger",children:"You are about to remove all data before the following date. This cannot be undone."}),e(
|
|
2415
|
+
`}}}();hr.hash="212501fe2d6367ec1503bd7a00c1730f";function Em(n){const{projectId:a}=n,l=u.useRef(null),[t,i]=D.useMutation(hr),{control:r,handleSubmit:o,setError:c,formState:{isValid:d}}=Ie({defaultValues:{endDate:new Date(Date.now()-nd).toISOString().slice(0,16)}}),g=u.useCallback(f=>{const m=js(f.endDate);if(!qs(m))return c("endDate",{message:"Date is not in a valid format"});t({variables:{input:{id:a,endTime:new Date(m).toISOString()}},onCompleted:()=>{n.onComplete()},onError:p=>{alert("Failed to clear project traces: "+p)}})},[t,a,n,c]);return s("form",{onSubmit:o(g),ref:l,children:[s(F,{padding:"size-200",children:[e(K,{color:"danger",children:"You are about to remove all data before the following date. This cannot be undone."}),e(G,{name:"endDate",control:r,rules:{required:"field is required"},render:({field:{name:f,onChange:m,onBlur:p,value:y},fieldState:{invalid:b,error:k}})=>e(X,{label:"End Date",type:"datetime-local",name:f,description:"The date up to which you want to remove data",errorMessage:k==null?void 0:k.message,validationState:b?"invalid":"valid",onChange:m,onBlur:p,defaultValue:y})})]}),e(F,{paddingEnd:"size-200",paddingTop:"size-100",paddingBottom:"size-100",borderTopColor:"light",borderTopWidth:"thin",children:e(h,{direction:"row",justifyContent:"end",children:e(M,{type:"submit",variant:"danger",isDisabled:!d,size:"compact",loading:i,onClick:()=>{var f;(f=l.current)==null||f.requestSubmit()},children:i?"Removing...":"Remove Data"})})})]})}function Rm({projectId:n,projectName:a,onProjectDelete:l,onProjectClear:t,onProjectRemoveData:i}){const[r,o]=u.useState(null),c=a!=="default",[d]=D.useMutation(fr),[g]=D.useMutation(yr),f=u.useCallback(()=>{u.startTransition(()=>{d({variables:{projectId:n}}),l()})},[d,n,l]),m=u.useCallback(()=>{u.startTransition(()=>{g({variables:{input:{id:n}},onCompleted:()=>{t()},onError:k=>{alert("Failed to clear project: "+k)}})})},[g,n,t]),p=u.useCallback(()=>{o(s(H,{size:"S",title:"Delete Project",children:[e(F,{padding:"size-200",children:e(K,{color:"danger",children:`Are you sure you want to delete project ${a}? This cannot be undone.`})}),e(F,{paddingEnd:"size-200",paddingTop:"size-100",paddingBottom:"size-100",borderTopColor:"light",borderTopWidth:"thin",children:e(h,{direction:"row",justifyContent:"end",children:e(M,{variant:"danger",onClick:()=>{f(),o(null)},children:"Delete Project"})})})]}))},[f,a]),y=u.useCallback(()=>{o(s(H,{size:"S",title:"Clear Project",children:[e(F,{padding:"size-200",children:e(K,{color:"danger",children:`Are you sure you want to clear project ${a}? All traces and evaluations for this project will be deleted. This cannot be undone.`})}),e(F,{paddingEnd:"size-200",paddingTop:"size-100",paddingBottom:"size-100",borderTopColor:"light",borderTopWidth:"thin",children:e(h,{direction:"row",justifyContent:"end",children:e(M,{variant:"danger",onClick:()=>{m(),o(null)},children:"Clear"})})})]}))},[m,a]),b=u.useCallback(()=>{o(e(H,{size:"M",title:"Remove Data",children:e(Em,{projectId:n,onComplete:()=>{i(),o(null)}})}))},[i,n]);return s("div",{onClick:k=>{k.preventDefault(),k.stopPropagation()},children:[s(Be,{buttonVariant:"quiet",align:"end",onAction:k=>{switch(k){case"deleteProject":return p();case"clearProject":return y();case"removeProjectData":return b()}},disabledKeys:c?[]:["deleteProject"],children:[e(B,{textValue:"Clear Traces",children:s(h,{direction:"row",gap:"size-75",justifyContent:"start",alignItems:"center",children:[e(P,{svg:e(I.Refresh,{})}),e(K,{children:"Clear Data"})]})},"clearProject"),e(B,{textValue:"Remove Data",children:s(h,{direction:"row",gap:"size-75",justifyContent:"start",alignItems:"center",children:[e(P,{svg:e(I.CloseCircleOutline,{})}),e(K,{children:"Remove Data"})]})},"removeProjectData"),c?e(B,{children:s(h,{direction:"row",gap:"size-75",justifyContent:"start",alignItems:"center",children:[e(P,{svg:e(I.TrashOutline,{})}),e(K,{children:"Delete"})]})},"deleteProject"):null]}),e(W,{type:"modal",isDismissable:!0,onDismiss:()=>o(null),children:r})]})}function Mm(){const n=Sn(l=>l.projectsAutoRefreshEnabled),a=Sn(l=>l.setProjectAutoRefreshEnabled);return e(Mn,{labelPlacement:"start",isSelected:n,onChange:()=>{a(!n)},children:"Auto-Refresh"})}const Nm=1e4,Vm=50;function Zy(){const{timeRange:n}=Ka();return e(u.Suspense,{fallback:e(fe,{}),children:e(zm,{timeRange:n})})}function zm({timeRange:n}){const a=Sn(v=>v.projectsAutoRefreshEnabled),[l,t]=uo(),i=u.useMemo(()=>({start:n.start.toISOString(),end:n.end.toISOString()}),[n]),r=D.useLazyLoadQuery(pr,{timeRange:i}),{data:o,loadNext:c,hasNext:d,isLoadingNext:g,refetch:f}=D.usePaginationFragment(gr,r),m=o.projects.edges.map(v=>v.project),p=u.useRef(null),y=u.useCallback(v=>{if(v){const{scrollHeight:w,scrollTop:L,clientHeight:A}=v;w-L-A<300&&!g&&d&&c(Vm)}},[d,g,c]);ir(()=>{u.startTransition(()=>{f({},{fetchPolicy:"store-and-network"})})},a?Nm:null);const b=u.useCallback(v=>{u.startTransition(()=>{f({},{fetchPolicy:"store-and-network"}),l({variant:"success",title:"Project Deleted",message:`Project ${v} has been deleted.`})})},[l,f]),k=u.useCallback(v=>{u.startTransition(()=>{f({},{fetchPolicy:"store-and-network"}),l({variant:"success",title:"Project Cleared",message:`Project ${v} has been cleared of traces.`})})},[l,f]),S=u.useCallback(v=>{u.startTransition(()=>{f({},{fetchPolicy:"store-and-network"}),l({variant:"success",title:"Project Data Removed",message:`Old data from project ${v} have been removed.`})})},[l,f]);return s("div",{css:C`
|
|
2416
2416
|
flex: 1 1 auto;
|
|
2417
2417
|
overflow-y: auto;
|
|
2418
2418
|
overflow-x: hidden;
|
|
2419
2419
|
padding-bottom: var(--ac-global-dimension-size-750);
|
|
2420
|
-
`,onScroll:v=>y(v.target),ref:p,children:[e(F,{paddingStart:"size-200",paddingEnd:"size-200",paddingTop:"size-100",paddingBottom:"size-100",width:"100%",borderBottomColor:"grey-200",borderBottomWidth:"thin",children:s(h,{direction:"row",justifyContent:"end",alignItems:"center",gap:"size-100",children:[e(Mm,{}),e(Am,{}),e(
|
|
2420
|
+
`,onScroll:v=>y(v.target),ref:p,children:[e(F,{paddingStart:"size-200",paddingEnd:"size-200",paddingTop:"size-100",paddingBottom:"size-100",width:"100%",borderBottomColor:"grey-200",borderBottomWidth:"thin",children:s(h,{direction:"row",justifyContent:"end",alignItems:"center",gap:"size-100",children:[e(Mm,{}),e(Am,{}),e(it,{})]})}),e(F,{padding:"size-200",width:"100%",children:e("ul",{css:C`
|
|
2421
2421
|
display: flex;
|
|
2422
2422
|
flex-direction: row;
|
|
2423
2423
|
gap: var(--ac-global-dimension-size-200);
|
|
@@ -2483,7 +2483,7 @@ fragment DatasetsTable_datasets on Query {
|
|
|
2483
2483
|
.ac-dropdown-button {
|
|
2484
2484
|
width: 100%;
|
|
2485
2485
|
}
|
|
2486
|
-
`,children:[e(
|
|
2486
|
+
`,children:[e(G,{name:"name",control:r,rules:{required:"field is required"},render:({field:{onChange:m,onBlur:p,value:y},fieldState:{invalid:b,error:k}})=>e(X,{label:"Dataset Name",description:"The name of the dataset",errorMessage:k==null?void 0:k.message,validationState:b?"invalid":"valid",onChange:m,onBlur:p,value:y.toString()})}),e(G,{name:"description",control:r,render:({field:{onChange:m,onBlur:p,value:y},fieldState:{invalid:b,error:k}})=>e(ka,{label:"description",placeholder:"Description of the dataset",isRequired:!1,height:100,errorMessage:k==null?void 0:k.message,validationState:b?"invalid":"valid",onChange:m,onBlur:p,value:y.toString()})}),e(G,{control:r,name:"file",rules:{required:"CSV file is required"},render:({field:{value:m,onChange:p,...y},fieldState:{invalid:b,error:k}})=>e(la,{label:"CSV file",validationState:b?"invalid":"valid",errorMessage:k==null?void 0:k.message,children:e("input",{...y,onChange:S=>{var w;p(S.target.files),c("input_keys"),c("output_keys"),c("metadata_keys");const v=(w=S.target.files)==null?void 0:w[0];if(v){const L=new FileReader;L.onload=function(A){if(!A.target)return;const x=A.target.result,T=Qm(x);i(T)},L.readAsText(v)}},type:"file",id:"file",accept:".csv"})})}),e(G,{name:"input_keys",control:r,rules:{required:"field is required"},render:({field:{value:m,onChange:p},fieldState:{invalid:y,error:b}})=>e(Ma,{label:"input keys",validationState:y?"invalid":"valid",description:"the columns to use as input",columns:t,selectedColumns:m,onChange:p,errorMessage:b==null?void 0:b.message})}),e(G,{name:"output_keys",control:r,render:({field:{value:m,onChange:p},fieldState:{invalid:y,error:b}})=>e(Ma,{label:"output keys",validationState:y?"invalid":"valid",description:"the columns to use as output",columns:t,selectedColumns:m,onChange:p,errorMessage:b==null?void 0:b.message})}),e(G,{name:"metadata_keys",control:r,render:({field:{value:m,onChange:p},fieldState:{invalid:y,error:b}})=>e(Ma,{label:"metadata keys",validationState:y?"invalid":"valid",description:"the columns to use as metadata",columns:t,selectedColumns:m,onChange:p,errorMessage:b==null?void 0:b.message})})]}),e(F,{paddingEnd:"size-200",paddingTop:"size-100",paddingBottom:"size-100",borderTopColor:"light",borderTopWidth:"thin",children:e(h,{direction:"row",justifyContent:"end",children:e(M,{type:"submit",isDisabled:!g,variant:d?"primary":"default",size:"compact",loading:!1,children:"Create Dataset"})})})]})}function Ma(n){const{columns:a,selectedColumns:l,onChange:t,label:i,validationState:r,description:o,errorMessage:c,...d}=n,g=a.length===0,f=u.useMemo(()=>g?"No columns to select":l.length>0?`${l.join(", ")}`:"No columns selected",[l,g]);return e(la,{label:i,isDisabled:g,validationState:r,description:o,errorMessage:c,children:e(Za,{isDisabled:g,...d,menu:e(na,{selectionMode:"multiple",onSelectionChange:m=>{t(Array.from(m))},selectedKeys:new Set(l),children:a.map(m=>e(B,{children:m},m))}),triggerProps:{placement:"bottom end"},children:f})})}const br=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"after"},{defaultValue:100,kind:"LocalArgument",name:"first"},{defaultValue:{col:"createdAt",dir:"desc"},kind:"LocalArgument",name:"sort"}],a=[{kind:"Variable",name:"after",variableName:"after"},{kind:"Variable",name:"first",variableName:"first"},{kind:"Variable",name:"sort",variableName:"sort"}];return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"DatasetsTableDatasetsQuery",selections:[{args:a,kind:"FragmentSpread",name:"DatasetsTable_datasets"}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"DatasetsTableDatasetsQuery",selections:[{alias:null,args:a,concreteType:"DatasetConnection",kind:"LinkedField",name:"datasets",plural:!1,selections:[{alias:null,args:null,concreteType:"DatasetEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:null,args:null,concreteType:"Dataset",kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"description",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"metadata",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"createdAt",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"exampleCount",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"experimentCount",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"cursor",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:null,args:a,filters:["sort"],handle:"connection",key:"DatasetsTable_datasets",kind:"LinkedHandle",name:"datasets"}]},params:{cacheID:"5ac1688f54e51f9bb3247c83e23d98fb",id:null,metadata:{},name:"DatasetsTableDatasetsQuery",operationKind:"query",text:`query DatasetsTableDatasetsQuery(
|
|
2487
2487
|
$after: String = null
|
|
2488
2488
|
$first: Int = 100
|
|
2489
2489
|
$sort: DatasetSort = {col: createdAt, dir: desc}
|
|
@@ -2519,10 +2519,10 @@ fragment DatasetsTable_datasets_dWkdd on Query {
|
|
|
2519
2519
|
__typename
|
|
2520
2520
|
}
|
|
2521
2521
|
}
|
|
2522
|
-
`}}}();vr.hash="7066cca7015a7e344b77862b0bdab21c";function qm({datasetId:n,datasetName:a,onDatasetDelete:l,onDatasetDeleteError:t}){const[i,r]=D.useMutation(vr),o=u.useCallback(()=>{u.startTransition(()=>{i({variables:{datasetId:n},onCompleted:()=>{l()},onError:c=>{t(c)}})})},[i,n,l,t]);return s(
|
|
2522
|
+
`}}}();vr.hash="7066cca7015a7e344b77862b0bdab21c";function qm({datasetId:n,datasetName:a,onDatasetDelete:l,onDatasetDeleteError:t}){const[i,r]=D.useMutation(vr),o=u.useCallback(()=>{u.startTransition(()=>{i({variables:{datasetId:n},onCompleted:()=>{l()},onError:c=>{t(c)}})})},[i,n,l,t]);return s(H,{size:"S",title:"Delete Dataset",children:[e(F,{padding:"size-200",children:e(K,{color:"danger",children:`Are you sure you want to delete dataset ${a}? This will also delete all associated experiments and traces, and it cannot be undone.`})}),e(F,{paddingEnd:"size-200",paddingTop:"size-100",paddingBottom:"size-100",borderTopColor:"light",borderTopWidth:"thin",children:e(h,{direction:"row",justifyContent:"end",children:e(M,{variant:"danger",onClick:()=>{o()},disabled:r,loading:r,children:"Delete Dataset"})})})]})}function Um({datasetName:n,datasetId:a,datasetDescription:l,datasetMetadata:t,onDatasetEdited:i,onDatasetEditError:r}){return e(H,{title:"Edit Dataset",size:"M",children:e(ad,{datasetName:n,datasetId:a,datasetDescription:l,datasetMetadata:t,onDatasetEdited:i,onDatasetEditError:r})})}function Bm(n){const{datasetId:a,datasetName:l,datasetDescription:t,datasetMetadata:i,onDatasetDelete:r,onDatasetDeleteError:o,onDatasetEdit:c,onDatasetEditError:d}=n,[g,f]=u.useState(null),m=u.useCallback(()=>{f(e(qm,{datasetId:a,datasetName:l,onDatasetDelete:()=>{r(),f(null)},onDatasetDeleteError:o}))},[a,l,r,o]),p=u.useCallback(()=>{f(e(Um,{datasetId:a,datasetName:l,datasetDescription:t,datasetMetadata:i,onDatasetEdited:()=>{c(),f(null)},onDatasetEditError:d}))},[t,a,i,l,c,d]);return s("div",{onClick:y=>{y.preventDefault(),y.stopPropagation()},children:[s(Be,{align:"end",buttonSize:"compact",onAction:y=>{switch(y){case"deleteDataset":m();break;case"editDataset":p();break}},children:[e(B,{children:s(h,{direction:"row",gap:"size-75",justifyContent:"start",alignItems:"center",children:[e(P,{svg:e(I.TrashOutline,{})}),e(K,{children:"Delete"})]})},"deleteDataset"),e(B,{children:s(h,{direction:"row",gap:"size-75",justifyContent:"start",alignItems:"center",children:[e(P,{svg:e(I.Edit2Outline,{})}),e(K,{children:"Edit"})]})},"editDataset")]}),e(W,{type:"modal",isDismissable:!0,onDismiss:()=>f(null),children:g})]})}const Il=100;function Hm(n){const a=n.id;if(a!=="createdAt"&&a!=="name")throw new Error("Invalid sort column");return{col:a,dir:n.desc?"desc":"asc"}}function Gm(n){const[a,l]=u.useState([]),t=u.useRef(null),i=Y(),r=oe(),o=ce(),{data:c,loadNext:d,hasNext:g,isLoadingNext:f,refetch:m}=D.usePaginationFragment(Sr,n.query),p=u.useMemo(()=>c.datasets.edges.map(v=>v.node),[c]),y=Ke.useCallback(v=>{if(v){const{scrollHeight:w,scrollTop:L,clientHeight:A}=v;w-L-A<300&&!f&&g&&d(Il)}},[g,f,d]),b=he({columns:[{header:"name",accessorKey:"name",cell:({row:v})=>{const L=v.original.experimentCount>0?`${v.original.id}/experiments`:`${v.original.id}/examples`;return e(Ze,{to:L,children:v.original.name})}},{header:"description",accessorKey:"description",enableSorting:!1},{header:"created at",accessorKey:"createdAt",cell:Fe},{header:"example count",accessorKey:"exampleCount",enableSorting:!1,meta:{textAlign:"right"}},{header:"experiment count",accessorKey:"experimentCount",enableSorting:!1,meta:{textAlign:"right"}},{header:"metadata",accessorKey:"metadata",enableSorting:!1,cell:_n},{header:"",id:"actions",enableSorting:!1,size:10,cell:({row:v})=>e(Bm,{datasetId:v.original.id,datasetName:v.original.name,datasetDescription:v.original.description,datasetMetadata:v.original.metadata,onDatasetEdit:()=>{r({title:"Dataset updated",message:`${v.original.name} has been successfully updated.`}),m({},{fetchPolicy:"store-and-network"})},onDatasetEditError:w=>{o({title:"Dataset update failed",message:w.message})},onDatasetDelete:()=>{r({title:"Dataset deleted",message:`${v.original.name} has been successfully deleted.`}),m({},{fetchPolicy:"store-and-network"})},onDatasetDeleteError:w=>{o({title:"Dataset deletion failed",message:w.message})}})}],data:p,state:{sorting:a},getCoreRowModel:ke(),getSortedRowModel:Rn(),onSortingChange:l,manualSorting:!0});u.useEffect(()=>{const v=a[0];u.startTransition(()=>{m({sort:v?Hm(v):{col:"createdAt",dir:"desc"},after:null,first:Il},{fetchPolicy:"store-and-network"})})},[a,m]);const k=b.getRowModel().rows,S=k.length===0;return e("div",{css:C`
|
|
2523
2523
|
flex: 1 1 auto;
|
|
2524
2524
|
overflow: auto;
|
|
2525
|
-
`,onScroll:v=>y(v.target),ref:t,children:s("table",{css:
|
|
2525
|
+
`,onScroll:v=>y(v.target),ref:t,children:s("table",{css:jn,children:[e("thead",{children:b.getHeaderGroups().map(v=>e("tr",{children:v.headers.map(w=>{var L;return e("th",{colSpan:w.colSpan,children:w.isPlaceholder?null:s("div",{className:w.column.getCanSort()?"cursor-pointer":"",onClick:w.column.getToggleSortingHandler(),style:{textAlign:(L=w.column.columnDef.meta)==null?void 0:L.textAlign},children:[Z(w.column.columnDef.header,w.getContext()),w.column.getIsSorted()?e(P,{className:"sort-icon",svg:w.column.getIsSorted()==="asc"?e(I.ArrowUpFilled,{}):e(I.ArrowDownFilled,{})}):null]})},w.id)})},v.id))}),S?e(Je,{}):e("tbody",{children:k.map(v=>e("tr",{onClick:()=>{const L=v.original.experimentCount>0?`${v.original.id}/experiments`:`${v.original.id}/examples`;i(L)},children:v.getVisibleCells().map(w=>{var L;return e("td",{align:(L=w.column.columnDef.meta)==null?void 0:L.textAlign,children:Z(w.column.columnDef.cell,w.getContext())},w.id)})},v.id))})]})})}function Xy(){return e(u.Suspense,{fallback:e(fe,{}),children:e(Wm,{})})}function Wm(){const[n,a]=u.useState(0),l=D.useLazyLoadQuery(kr,{},{fetchKey:n,fetchPolicy:"store-and-network"}),t=u.useCallback(()=>{a(i=>i+1)},[a]);return s(h,{direction:"column",height:"100%",children:[e(F,{padding:"size-200",borderBottomWidth:"thin",borderBottomColor:"dark",flex:"none",children:s(h,{direction:"row",justifyContent:"space-between",children:[e(re,{level:1,children:"Datasets"}),e(Jm,{onDatasetCreated:t})]})}),e(Gm,{query:l})]})}function Jm({onDatasetCreated:n}){const a=Y(),l=oe(),t=ce(),[i,r]=u.useState(null),o=()=>{r(e(H,{size:"S",title:"New Dataset",children:e(nl,{onDatasetCreated:d=>{l({title:"Dataset created",message:`${d.name} has been successfully created.`,action:{text:"Go to Dataset",onClick:()=>{a(`/datasets/${d.id}`)}}}),r(null),n()},onDatasetCreateError:d=>{t({title:"Dataset creation failed",message:d.message})}})}))},c=()=>{r(e(H,{size:"M",title:"New Dataset from CSV",children:e(jm,{onDatasetCreated:d=>{l({title:"Dataset created",message:`${d.name} has been successfully created.`,action:{text:"Go to Dataset",onClick:()=>{a(`/datasets/${d.id}`)}}}),r(null),n()},onDatasetCreateError:d=>{t({title:"Dataset creation failed",message:d.message})}})}))};return s(U,{children:[s(Be,{buttonText:"Create Dataset",align:"end",icon:e(P,{svg:e(I.DatabaseOutline,{})}),onAction:d=>{switch(d){case"newDataset":o();break;case"datasetFromCSV":c();break}},children:[e(B,{children:"New Dataset"},"newDataset"),e(B,{children:"Dataset from CSV"},"datasetFromCSV")]}),e(W,{type:"modal",isDismissable:!0,onDismiss:()=>r(null),children:i})]})}const Cr=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"datasetId"}],a=[{kind:"Variable",name:"id",variableName:"datasetId"}],l={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},t={kind:"InlineFragment",selections:[{alias:"latestVersions",args:[{kind:"Literal",name:"first",value:1},{kind:"Literal",name:"sort",value:{col:"createdAt",dir:"desc"}}],concreteType:"DatasetVersionConnection",kind:"LinkedField",name:"versions",plural:!1,selections:[{alias:null,args:null,concreteType:"DatasetVersionEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"version",args:null,concreteType:"DatasetVersion",kind:"LinkedField",name:"node",plural:!1,selections:[l,{alias:null,args:null,kind:"ScalarField",name:"description",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"createdAt",storageKey:null}],storageKey:null}],storageKey:null}],storageKey:'versions(first:1,sort:{"col":"createdAt","dir":"desc"})'}],type:"Dataset",abstractKey:null};return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"datasetStore_latestVersionQuery",selections:[{alias:"dataset",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[l,t],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"datasetStore_latestVersionQuery",selections:[{alias:"dataset",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},l,t],storageKey:null}]},params:{cacheID:"d7075240e4dae8871997e57616c05302",id:null,metadata:{},name:"datasetStore_latestVersionQuery",operationKind:"query",text:`query datasetStore_latestVersionQuery(
|
|
2526
2526
|
$datasetId: GlobalID!
|
|
2527
2527
|
) {
|
|
2528
2528
|
dataset: node(id: $datasetId) {
|
|
@@ -2548,10 +2548,10 @@ fragment DatasetsTable_datasets_dWkdd on Query {
|
|
|
2548
2548
|
__typename
|
|
2549
2549
|
}
|
|
2550
2550
|
}
|
|
2551
|
-
`}}}();Kr.hash="8d99470f590cd5d28701fa6e3c0330e6";const
|
|
2551
|
+
`}}}();Kr.hash="8d99470f590cd5d28701fa6e3c0330e6";const Na={backgroundColor:"light",borderColor:"light",collapsible:!0,bodyStyle:{padding:0}};function eg(n){const{datasetId:a,onCompleted:l}=n,[t,i]=u.useState(null),[r,o]=D.useMutation(Kr),{control:c,setError:d,handleSubmit:g,formState:{isValid:f}}=Ie({defaultValues:{input:"{}",output:"{}",metadata:"{}"}}),m=u.useCallback(p=>{if(i(null),!Oe(p==null?void 0:p.input))return d("input",{message:"Input must be a valid JSON object"});if(!Oe(p==null?void 0:p.output))return d("output",{message:"Output must be a valid JSON object"});if(!Oe(p==null?void 0:p.metadata))return d("metadata",{message:"Metadata must be a valid JSON object"});r({variables:{input:{datasetId:a,examples:[{input:JSON.parse(p.input),output:JSON.parse(p.output),metadata:JSON.parse(p.metadata)}],datasetVersionDescription:p.description}},onCompleted:()=>{l()},onError:y=>{i(y.message)}})},[r,a,d,l]);return s(H,{size:"L",title:"Add Example",children:[e("div",{css:C`
|
|
2552
2552
|
overflow-y: auto;
|
|
2553
2553
|
padding: var(--ac-global-dimension-size-400);
|
|
2554
|
-
`,children:e(h,{direction:"row",justifyContent:"center",children:e(F,{width:"900px",paddingStart:"auto",paddingEnd:"auto",children:s(h,{direction:"column",gap:"size-200",children:[t?e(
|
|
2554
|
+
`,children:e(h,{direction:"row",justifyContent:"center",children:e(F,{width:"900px",paddingStart:"auto",paddingEnd:"auto",children:s(h,{direction:"column",gap:"size-200",children:[t?e(ne,{variant:"danger",children:t}):null,e(G,{control:c,name:"input",render:({field:{onChange:p,onBlur:y,value:b},fieldState:{invalid:k,error:S}})=>s(V,{title:"Input",subTitle:"The input to the LLM, retriever, program, etc.",...Na,children:[k?e(ne,{variant:"danger",banner:!0,children:S==null?void 0:S.message}):null,e(Re,{value:b,onChange:p,onBlur:y})]})}),e(G,{control:c,name:"output",render:({field:{onChange:p,onBlur:y,value:b},fieldState:{invalid:k,error:S}})=>s(V,{title:"Output",subTitle:"The output of the LLM or program to be used as an expected output",...Na,backgroundColor:"green-100",borderColor:"green-700",children:[k?e(ne,{variant:"danger",banner:!0,children:S==null?void 0:S.message}):null,e(Re,{value:b,onChange:p,onBlur:y})]})}),e(G,{control:c,name:"metadata",render:({field:{onChange:p,onBlur:y,value:b},fieldState:{invalid:k,error:S}})=>s(V,{title:"Metadata",subTitle:"All data from the span to use during experimentation or evaluation",...Na,children:[k?e(ne,{variant:"danger",banner:!0,children:S==null?void 0:S.message}):null,e(Re,{value:b,onChange:p,onBlur:y})]})}),e(G,{control:c,name:"description",render:({field:{onChange:p,onBlur:y,value:b},fieldState:{invalid:k,error:S}})=>e(ka,{label:"Version Description",value:b,onChange:p,onBlur:y,errorMessage:S==null?void 0:S.message,validationState:k?"invalid":"valid",placeholder:"A description of the changes made. Will be displayed in the version history.",height:100})})]})})})}),e(F,{padding:"size-200",borderTopColor:"light",borderTopWidth:"thin",children:e(h,{direction:"row",justifyContent:"end",gap:"size-100",children:e(M,{variant:"primary",size:"compact",disabled:!f||o,loading:o,onClick:g(m),children:"Add Example"})})})]})}function ng(n){const{datasetId:a,onAddExampleCompleted:l}=n,[t,i]=u.useState(null),r=u.useCallback(()=>{i(e(eg,{datasetId:a,onCompleted:()=>{l(),i(null)}}))},[a,l]);return s(U,{children:[e(M,{icon:e(P,{svg:e(I.PlusCircleOutline,{})}),size:"compact",variant:"default",onClick:r,children:"Add Example"}),e(W,{isDismissable:!0,onDismiss:()=>{i(null)},children:t})]})}function ag(){const n=vn(i=>i.datasetId),a=vn(i=>i.latestVersion);let l=`${ja}/v1/datasets/${n}/examples`;a&&(l+=`?version-id=${a.id}`);const t=u.useMemo(()=>`import phoenix as px
|
|
2555
2555
|
client = px.Client()
|
|
2556
2556
|
# Get the current dataset version
|
|
2557
2557
|
dataset = client.get_dataset(id="${n}"${a?`, version_id="${a.id}"`:""})`,[n,a]);return e("div",{css:C`
|
|
@@ -2561,7 +2561,7 @@ dataset = client.get_dataset(id="${n}"${a?`, version_id="${a.id}"`:""})`,[n,a]);
|
|
|
2561
2561
|
padding-right: 10px;
|
|
2562
2562
|
}
|
|
2563
2563
|
}
|
|
2564
|
-
`,children:s(tn,{placement:"bottom right",children:[e(
|
|
2564
|
+
`,children:s(tn,{placement:"bottom right",children:[e(Ja,{addonBefore:e(P,{svg:e(I.Code,{})}),children:"Code"}),e(ha,{children:s("section",{css:C`
|
|
2565
2565
|
width: 500px;
|
|
2566
2566
|
.ac-field {
|
|
2567
2567
|
flex: 1 1 auto;
|
|
@@ -2632,9 +2632,9 @@ fragment DatasetHistoryTable_versions_2HEEH6 on Dataset {
|
|
|
2632
2632
|
`}}}();Dr.hash="37e453bc58759a1e89bc5862c460de6b";const Tr=function(){var n=["versions"],a={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null};return{argumentDefinitions:[{defaultValue:null,kind:"LocalArgument",name:"after"},{defaultValue:100,kind:"LocalArgument",name:"first"}],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:Dr,identifierInfo:{identifierField:"id",identifierQueryVariableName:"id"}}},name:"DatasetHistoryTable_versions",selections:[{alias:"versions",args:null,concreteType:"DatasetVersionConnection",kind:"LinkedField",name:"__DatasetHistoryTable_versions_connection",plural:!1,selections:[{alias:null,args:null,concreteType:"DatasetVersionEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:null,args:null,concreteType:"DatasetVersion",kind:"LinkedField",name:"node",plural:!1,selections:[a,{alias:null,args:null,kind:"ScalarField",name:"description",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"createdAt",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"cursor",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},a],type:"Dataset",abstractKey:null}}();Tr.hash="37e453bc58759a1e89bc5862c460de6b";const lg=100;function tg(n){const a=u.useRef(null),{data:l,loadNext:t,hasNext:i,isLoadingNext:r}=D.usePaginationFragment(Tr,n.dataset),o=u.useMemo(()=>l.versions.edges.map(m=>m.node),[l]),c=Ke.useCallback(m=>{if(m){const{scrollHeight:p,scrollTop:y,clientHeight:b}=m;p-y-b<300&&!r&&i&&t(lg)}},[i,r,t]),d=he({columns:[{header:"version ID",accessorKey:"id"},{header:"description",accessorKey:"description"},{header:"created at",accessorKey:"createdAt",cell:Fe}],data:o,getCoreRowModel:ke(),getSortedRowModel:Rn()}),g=d.getRowModel().rows,f=g.length===0;return e("div",{css:C`
|
|
2633
2633
|
flex: 1 1 auto;
|
|
2634
2634
|
overflow: auto;
|
|
2635
|
-
`,onScroll:m=>c(m.target),ref:a,children:s("table",{css:We,children:[e("thead",{children:d.getHeaderGroups().map(m=>e("tr",{children:m.headers.map(p=>e("th",{colSpan:p.colSpan,children:p.isPlaceholder?null:s("div",{className:p.column.getCanSort()?"cursor-pointer":"",onClick:p.column.getToggleSortingHandler(),style:{left:p.getStart(),width:p.getSize()},children:[Z(p.column.columnDef.header,p.getContext()),p.column.getIsSorted()?e(P,{className:"sort-icon",svg:p.column.getIsSorted()==="asc"?e(I.ArrowUpFilled,{}):e(I.ArrowDownFilled,{})}):null]})},p.id))},m.id))}),f?e(Je,{}):e("tbody",{children:g.map(m=>e("tr",{children:m.getVisibleCells().map(p=>e("td",{children:Z(p.column.columnDef.cell,p.getContext())},p.id))},m.id))})]})})}function ig(n){const{datasetId:a}=n,l=D.useLazyLoadQuery(xr,{datasetId:a});return e(
|
|
2635
|
+
`,onScroll:m=>c(m.target),ref:a,children:s("table",{css:We,children:[e("thead",{children:d.getHeaderGroups().map(m=>e("tr",{children:m.headers.map(p=>e("th",{colSpan:p.colSpan,children:p.isPlaceholder?null:s("div",{className:p.column.getCanSort()?"cursor-pointer":"",onClick:p.column.getToggleSortingHandler(),style:{left:p.getStart(),width:p.getSize()},children:[Z(p.column.columnDef.header,p.getContext()),p.column.getIsSorted()?e(P,{className:"sort-icon",svg:p.column.getIsSorted()==="asc"?e(I.ArrowUpFilled,{}):e(I.ArrowDownFilled,{})}):null]})},p.id))},m.id))}),f?e(Je,{}):e("tbody",{children:g.map(m=>e("tr",{children:m.getVisibleCells().map(p=>e("td",{children:Z(p.column.columnDef.cell,p.getContext())},p.id))},m.id))})]})})}function ig(n){const{datasetId:a}=n,l=D.useLazyLoadQuery(xr,{datasetId:a});return e(H,{size:"L",title:"Dataset History",children:e("div",{css:C`
|
|
2636
2636
|
height: 500px;
|
|
2637
|
-
`,children:e(tg,{dataset:l.dataset})})})}function rg(n){const{datasetId:a}=n,[l,t]=u.useState(null);return s(
|
|
2637
|
+
`,children:e(tg,{dataset:l.dataset})})})}function rg(n){const{datasetId:a}=n,[l,t]=u.useState(null);return s(U,{children:[s(Le,{children:[e(M,{variant:"default",icon:e(P,{svg:e(I.ClockOutline,{})}),"aria-label":"Version History",onClick:()=>{t(e(ig,{datasetId:a}))}}),e(An,{children:"Dataset Version History"})]}),e(u.Suspense,{fallback:null,children:e(W,{type:"modal",isDismissable:!0,onDismiss:()=>{t(null)},children:l})})]})}const sg=`pip install arize-phoenix>=${window.Config.platformVersion}`;function og({isAuthEnabled:n}){let a=`import os
|
|
2638
2638
|
# Set the phoenix collector endpoint. Commonly http://localhost:6060
|
|
2639
2639
|
os.environ["PHOENIX_COLLECTOR_ENDPOINT"] = "<your-phoenix-url>"`;return n&&(a+=`
|
|
2640
2640
|
# Configure access
|
|
@@ -2651,11 +2651,11 @@ def exact_match(input, output) -> float:
|
|
|
2651
2651
|
evaluators = [exact_match]`,ug=`# Run an experiment
|
|
2652
2652
|
from phoenix.experiments import run_experiment
|
|
2653
2653
|
|
|
2654
|
-
experiment = run_experiment(dataset, my_task, evaluators=evaluators)`;function Ir(){const[n,a]=u.useState(null),l=u.useCallback(()=>{a(e(
|
|
2654
|
+
experiment = run_experiment(dataset, my_task, evaluators=evaluators)`;function Ir(){const[n,a]=u.useState(null),l=u.useCallback(()=>{a(e(H,{title:"Run Experiment",size:"XL",children:e(mg,{})}))},[]);return s(U,{children:[e(M,{size:"compact",variant:"default",icon:e(P,{svg:e(I.ExperimentOutline,{})}),onClick:l,children:"Run Experiment"}),e(W,{isDismissable:!0,type:"slideOver",onDismiss:()=>{a(null)},children:n})]})}function mg(){const n=vn(i=>i.datasetName),a=vn(i=>i.latestVersion),l=window.Config.authenticationEnabled,t=u.useMemo(()=>`import phoenix as px
|
|
2655
2655
|
# Initialize a phoenix client
|
|
2656
2656
|
client = px.Client()
|
|
2657
2657
|
# Get the current dataset version. You can omit the version for the latest.
|
|
2658
|
-
dataset = client.get_dataset(name="${n}"${a?`, version_id="${a.id}"`:""})`,[n,a]);return s(F,{padding:"size-400",overflow:"auto",children:[e(F,{paddingBottom:"size-100",children:e(K,{children:"Install Phoenix"})}),e(yn,{children:e(pn,{value:sg})}),e(F,{paddingTop:"size-100",paddingBottom:"size-100",children:e(K,{children:"Point to a running instance of Phoenix"})}),e(yn,{children:e(pn,{value:og({isAuthEnabled:l})})}),e(ld,{children:e(F,{paddingBottom:"size-100",paddingTop:"size-100",children:e(
|
|
2658
|
+
dataset = client.get_dataset(name="${n}"${a?`, version_id="${a.id}"`:""})`,[n,a]);return s(F,{padding:"size-400",overflow:"auto",children:[e(F,{paddingBottom:"size-100",children:e(K,{children:"Install Phoenix"})}),e(yn,{children:e(pn,{value:sg})}),e(F,{paddingTop:"size-100",paddingBottom:"size-100",children:e(K,{children:"Point to a running instance of Phoenix"})}),e(yn,{children:e(pn,{value:og({isAuthEnabled:l})})}),e(ld,{children:e(F,{paddingBottom:"size-100",paddingTop:"size-100",children:e(rt,{fallback:s(K,{children:["Your personal API keys can be created and managed on your"," ",e(je,{href:"/profile",children:"Profile"})]}),children:s(K,{children:["System API keys can be created and managed in"," ",e(je,{href:"/settings",children:"Settings"})]})})})}),e(F,{paddingTop:"size-100",paddingBottom:"size-100",children:e(K,{children:"Pull down this dataset"})}),e(yn,{children:e(pn,{value:t})}),e(F,{paddingTop:"size-100",paddingBottom:"size-100",children:e(K,{children:"Define your task"})}),e(yn,{children:e(pn,{value:dg})}),e(F,{paddingTop:"size-100",paddingBottom:"size-100",children:e(K,{children:"Define evaluators"})}),e(yn,{children:e(pn,{value:cg})}),e(F,{paddingTop:"size-100",paddingBottom:"size-100",children:e(K,{children:"Run an experiment"})}),e(yn,{children:e(pn,{value:ug})})]})}function Yy(){const n=Cn(),a=u.useMemo(()=>{const l=n.dataset.latestVersions;return l!=null&&l.edges&&l.edges.length?l.edges[0].version:null},[n]);return e(Ym,{datasetId:n.dataset.id,datasetName:n.dataset.name,latestVersion:a,children:e(u.Suspense,{fallback:e(fe,{}),children:e(pg,{dataset:n.dataset})})})}const gg=C`
|
|
2659
2659
|
flex: 1 1 auto;
|
|
2660
2660
|
display: flex;
|
|
2661
2661
|
flex-direction: column;
|
|
@@ -2681,7 +2681,7 @@ dataset = client.get_dataset(name="${n}"${a?`, version_id="${a.id}"`:""})`,[n,a]
|
|
|
2681
2681
|
}
|
|
2682
2682
|
}
|
|
2683
2683
|
}
|
|
2684
|
-
`;function pg({dataset:n}){const a=n.id,l=vn(d=>d.refreshLatestVersion),t=oe(),i=
|
|
2684
|
+
`;function pg({dataset:n}){const a=n.id,l=vn(d=>d.refreshLatestVersion),t=oe(),i=Y(),r=u.useCallback(d=>{d===0?i(`/datasets/${a}/experiments`):d===1&&i(`/datasets/${a}/examples`)},[i,a]),c=Gs().pathname.includes("examples")?1:0;return s("main",{css:gg,children:[e(F,{paddingStart:"size-200",paddingEnd:"size-200",paddingTop:"size-200",paddingBottom:"size-50",flex:"none",children:s(h,{direction:"row",justifyContent:"space-between",alignItems:"center",children:[e(h,{direction:"column",justifyContent:"space-between",children:e(h,{direction:"row",gap:"size-200",alignItems:"center",children:s(h,{direction:"column",children:[e(K,{elementType:"h1",textSize:"xlarge",weight:"heavy",children:n.name}),e(K,{color:"text-700",children:n.description||"--"})]})})}),s(h,{direction:"row",gap:"size-100",children:[s(Be,{align:"end",icon:e(P,{svg:e(I.DownloadOutline,{})}),onAction:d=>{switch(d){case"csv":window.open(`/v1/datasets/${n.id}/csv`,"_blank");break;case"openai-ft":window.open(`/v1/datasets/${n.id}/jsonl/openai_ft`,"_blank");break;case"openai-evals":window.open(`/v1/datasets/${n.id}/jsonl/openai_evals`,"_blank");break}},children:[e(B,{children:"Download CSV"},"csv"),e(B,{children:"Download OpenAI Fine-Tuning JSONL"},"openai-ft"),e(B,{children:"Download OpenAI Evals JSONL"},"openai-evals")]}),e(rg,{datasetId:n.id}),e(ag,{}),e(Ir,{}),e(ng,{datasetId:n.id,onAddExampleCompleted:()=>{t({title:"Example added",message:"The example has been added successfully and the version has been updated."}),l()}})]})]})}),s(Te,{onChange:r,defaultIndex:c,children:[e(J,{name:"Experiments",extra:e(Me,{children:n.experimentCount}),children:e(u.Suspense,{children:e(Pe,{})})}),e(J,{name:"Examples",extra:e(Me,{children:n.exampleCount}),children:e(u.Suspense,{children:e(Pe,{})})})]})]})}const Lr=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"id"}],a=[{kind:"Variable",name:"id",variableName:"id"}],l={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},t={alias:null,args:null,kind:"ScalarField",name:"description",storageKey:null},i={kind:"InlineFragment",selections:[{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},t,{alias:null,args:null,kind:"ScalarField",name:"exampleCount",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"experimentCount",storageKey:null},{alias:"latestVersions",args:[{kind:"Literal",name:"first",value:1},{kind:"Literal",name:"sort",value:{col:"createdAt",dir:"desc"}}],concreteType:"DatasetVersionConnection",kind:"LinkedField",name:"versions",plural:!1,selections:[{alias:null,args:null,concreteType:"DatasetVersionEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"version",args:null,concreteType:"DatasetVersion",kind:"LinkedField",name:"node",plural:!1,selections:[l,t,{alias:null,args:null,kind:"ScalarField",name:"createdAt",storageKey:null}],storageKey:null}],storageKey:null}],storageKey:'versions(first:1,sort:{"col":"createdAt","dir":"desc"})'}],type:"Dataset",abstractKey:null};return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"datasetLoaderQuery",selections:[{alias:"dataset",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[l,i],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"datasetLoaderQuery",selections:[{alias:"dataset",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},l,i],storageKey:null}]},params:{cacheID:"5b221627cf7e63f41fbec41027cc0951",id:null,metadata:{},name:"datasetLoaderQuery",operationKind:"query",text:`query datasetLoaderQuery(
|
|
2685
2685
|
$id: GlobalID!
|
|
2686
2686
|
) {
|
|
2687
2687
|
dataset: node(id: $id) {
|
|
@@ -2705,7 +2705,7 @@ dataset = client.get_dataset(name="${n}"${a?`, version_id="${a.id}"`:""})`,[n,a]
|
|
|
2705
2705
|
}
|
|
2706
2706
|
}
|
|
2707
2707
|
}
|
|
2708
|
-
`}}}();Lr.hash="469da2debdebd608c88a6ef83c2540aa";async function
|
|
2708
|
+
`}}}();Lr.hash="469da2debdebd608c88a6ef83c2540aa";async function ef(n){const{datasetId:a}=n.params;return await D.fetchQuery(xe,Lr,{id:a}).toPromise()}const Pr=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"exampleId"}],a=[{kind:"Variable",name:"id",variableName:"exampleId"}],l={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},t={alias:null,args:null,kind:"ScalarField",name:"output",storageKey:null},i={alias:"latestRevision",args:null,concreteType:"DatasetExampleRevision",kind:"LinkedField",name:"revision",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"input",storageKey:null},t,{alias:null,args:null,kind:"ScalarField",name:"metadata",storageKey:null}],storageKey:null},r={alias:null,args:null,kind:"ScalarField",name:"traceId",storageKey:null},o={alias:null,args:null,concreteType:"Span",kind:"LinkedField",name:"span",plural:!1,selections:[l,{alias:null,args:null,concreteType:"SpanContext",kind:"LinkedField",name:"context",plural:!1,selections:[r],storageKey:null},{alias:null,args:null,concreteType:"Project",kind:"LinkedField",name:"project",plural:!1,selections:[l],storageKey:null}],storageKey:null},c={alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},d=[{kind:"Literal",name:"first",value:100}],g={alias:null,args:null,concreteType:"Trace",kind:"LinkedField",name:"trace",plural:!1,selections:[r,{alias:null,args:null,kind:"ScalarField",name:"projectId",storageKey:null}],storageKey:null};return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"ExampleDetailsDialogQuery",selections:[{alias:"example",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{kind:"InlineFragment",selections:[l,i,o],type:"DatasetExample",abstractKey:null},{args:null,kind:"FragmentSpread",name:"ExampleExperimentRunsTableFragment"}],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"ExampleDetailsDialogQuery",selections:[{alias:"example",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[c,{kind:"TypeDiscriminator",abstractKey:"__isNode"},l,{kind:"InlineFragment",selections:[i,o,{alias:null,args:d,concreteType:"ExperimentRunConnection",kind:"LinkedField",name:"experimentRuns",plural:!1,selections:[{alias:null,args:null,concreteType:"ExperimentRunEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"run",args:null,concreteType:"ExperimentRun",kind:"LinkedField",name:"node",plural:!1,selections:[l,{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:"error",storageKey:null},t,g,{alias:null,args:null,concreteType:"ExperimentRunAnnotationConnection",kind:"LinkedField",name:"annotations",plural:!1,selections:[{alias:null,args:null,concreteType:"ExperimentRunAnnotationEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"annotation",args:null,concreteType:"ExperimentRunAnnotation",kind:"LinkedField",name:"node",plural:!1,selections:[l,{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"label",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"score",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"explanation",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"annotatorKind",storageKey:null},g],storageKey:null}],storageKey:null}],storageKey:null}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"cursor",storageKey:null},{alias:null,args:null,concreteType:"ExperimentRun",kind:"LinkedField",name:"node",plural:!1,selections:[c],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:"experimentRuns(first:100)"},{alias:null,args:d,filters:null,handle:"connection",key:"ExampleExperimentRunsTable_experimentRuns",kind:"LinkedHandle",name:"experimentRuns"}],type:"DatasetExample",abstractKey:null}],storageKey:null}]},params:{cacheID:"6fa23dc80c23ecdf48e57d139d76a721",id:null,metadata:{},name:"ExampleDetailsDialogQuery",operationKind:"query",text:`query ExampleDetailsDialogQuery(
|
|
2709
2709
|
$exampleId: GlobalID!
|
|
2710
2710
|
) {
|
|
2711
2711
|
example: node(id: $exampleId) {
|
|
@@ -2782,7 +2782,7 @@ fragment ExampleExperimentRunsTableFragment on DatasetExample {
|
|
|
2782
2782
|
__typename
|
|
2783
2783
|
}
|
|
2784
2784
|
}
|
|
2785
|
-
`}}}();wr.hash="a5e0e601ed24ffaa37a99ba358f960d3";const
|
|
2785
|
+
`}}}();wr.hash="a5e0e601ed24ffaa37a99ba358f960d3";const Va={backgroundColor:"light",borderColor:"light",collapsible:!0,bodyStyle:{padding:0}};function yg(n){const{exampleId:a,onCompleted:l}=n,[t,i]=u.useState(null),[r,o]=D.useMutation(wr),{control:c,setError:d,handleSubmit:g,formState:{isValid:f}}=Ie({defaultValues:n.currentRevision}),m=u.useCallback(p=>{if(i(null),!Oe(p==null?void 0:p.input))return d("input",{message:"Input must be a valid JSON object"});if(!Oe(p==null?void 0:p.output))return d("output",{message:"Output must be a valid JSON object"});if(!Oe(p==null?void 0:p.metadata))return d("metadata",{message:"Metadata must be a valid JSON object"});r({variables:{input:{patches:[{exampleId:a,input:JSON.parse(p.input),output:JSON.parse(p.output),metadata:JSON.parse(p.metadata)}],versionDescription:p.description}},onCompleted:()=>{l()},onError:y=>{i(y.message)}})},[r,a,d,l]);return e(H,{size:"fullscreen",title:`Edit Example: ${a}`,extra:e(M,{variant:"primary",size:"compact",disabled:!f||o,loading:o,onClick:g(m),children:"Save Changes"}),children:e("div",{css:C`
|
|
2786
2786
|
overflow-y: auto;
|
|
2787
2787
|
padding: var(--ac-global-dimension-size-400);
|
|
2788
2788
|
/* Make widths configurable */
|
|
@@ -2793,7 +2793,7 @@ fragment ExampleExperimentRunsTableFragment on DatasetExample {
|
|
|
2793
2793
|
width: 100%;
|
|
2794
2794
|
}
|
|
2795
2795
|
}
|
|
2796
|
-
`,children:e(h,{direction:"row",justifyContent:"center",children:e(F,{width:"900px",paddingStart:"auto",paddingEnd:"auto",children:s(h,{direction:"column",gap:"size-200",children:[t?e(
|
|
2796
|
+
`,children:e(h,{direction:"row",justifyContent:"center",children:e(F,{width:"900px",paddingStart:"auto",paddingEnd:"auto",children:s(h,{direction:"column",gap:"size-200",children:[t?e(ne,{variant:"danger",children:t}):null,e(G,{control:c,name:"input",render:({field:{onChange:p,onBlur:y,value:b},fieldState:{invalid:k,error:S}})=>s(V,{title:"Input",subTitle:"The input to the LLM, retriever, program, etc.",...Va,children:[k?e(ne,{variant:"danger",banner:!0,children:S==null?void 0:S.message}):null,e(Re,{value:b,onChange:p,onBlur:y})]})}),e(G,{control:c,name:"output",render:({field:{onChange:p,onBlur:y,value:b},fieldState:{invalid:k,error:S}})=>s(V,{title:"Output",subTitle:"The output of the LLM or program to be used as an expected output",...Va,backgroundColor:"green-100",borderColor:"green-700",children:[k?e(ne,{variant:"danger",banner:!0,children:S==null?void 0:S.message}):null,e(Re,{value:b,onChange:p,onBlur:y})]})}),e(G,{control:c,name:"metadata",render:({field:{onChange:p,onBlur:y,value:b},fieldState:{invalid:k,error:S}})=>s(V,{title:"Metadata",subTitle:"All data from the span to use during experimentation or evaluation",...Va,children:[k?e(ne,{variant:"danger",banner:!0,children:S==null?void 0:S.message}):null,e(Re,{value:b,onChange:p,onBlur:y})]})}),e(G,{control:c,name:"description",render:({field:{onChange:p,onBlur:y,value:b},fieldState:{invalid:k,error:S}})=>e(ka,{label:"Revision Description",value:b,onChange:p,onBlur:y,errorMessage:S==null?void 0:S.message,validationState:k?"invalid":"valid",placeholder:"A description of the changes made in this revision. Will be displayed in the version history.",height:100})})]})})})})})}function fg(n){const{onCompleted:a,...l}=n,[t,i]=u.useState(null);return s(U,{children:[e(M,{variant:"default",size:"compact",icon:e(P,{svg:e(I.EditOutline,{})}),onClick:()=>i(e(yg,{...l,onCompleted:()=>{i(null),a()}})),children:"Edit Example"}),e(W,{type:"slideOver",isDismissable:!0,onDismiss:()=>i(null),children:t})]})}const Ar=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"after"},{defaultValue:100,kind:"LocalArgument",name:"first"},{defaultValue:null,kind:"LocalArgument",name:"id"}],a=[{kind:"Variable",name:"id",variableName:"id"}],l=[{kind:"Variable",name:"after",variableName:"after"},{kind:"Variable",name:"first",variableName:"first"}],t={alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},i={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},r={alias:null,args:null,concreteType:"Trace",kind:"LinkedField",name:"trace",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"traceId",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"projectId",storageKey:null}],storageKey:null};return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"ExampleExperimentRunsTableQuery",selections:[{alias:null,args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{args:l,kind:"FragmentSpread",name:"ExampleExperimentRunsTableFragment"}],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"ExampleExperimentRunsTableQuery",selections:[{alias:null,args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[t,{kind:"TypeDiscriminator",abstractKey:"__isNode"},i,{kind:"InlineFragment",selections:[{alias:null,args:l,concreteType:"ExperimentRunConnection",kind:"LinkedField",name:"experimentRuns",plural:!1,selections:[{alias:null,args:null,concreteType:"ExperimentRunEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"run",args:null,concreteType:"ExperimentRun",kind:"LinkedField",name:"node",plural:!1,selections:[i,{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:"error",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"output",storageKey:null},r,{alias:null,args:null,concreteType:"ExperimentRunAnnotationConnection",kind:"LinkedField",name:"annotations",plural:!1,selections:[{alias:null,args:null,concreteType:"ExperimentRunAnnotationEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"annotation",args:null,concreteType:"ExperimentRunAnnotation",kind:"LinkedField",name:"node",plural:!1,selections:[i,{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"label",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"score",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"explanation",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"annotatorKind",storageKey:null},r],storageKey:null}],storageKey:null}],storageKey:null}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"cursor",storageKey:null},{alias:null,args:null,concreteType:"ExperimentRun",kind:"LinkedField",name:"node",plural:!1,selections:[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:null,args:l,filters:null,handle:"connection",key:"ExampleExperimentRunsTable_experimentRuns",kind:"LinkedHandle",name:"experimentRuns"}],type:"DatasetExample",abstractKey:null}],storageKey:null}]},params:{cacheID:"2ec7ead16e6df0877bc47db0ed7c7553",id:null,metadata:{},name:"ExampleExperimentRunsTableQuery",operationKind:"query",text:`query ExampleExperimentRunsTableQuery(
|
|
2797
2797
|
$after: String = null
|
|
2798
2798
|
$first: Int = 100
|
|
2799
2799
|
$id: GlobalID!
|
|
@@ -2857,13 +2857,13 @@ fragment ExampleExperimentRunsTableFragment_2HEEH6 on DatasetExample {
|
|
|
2857
2857
|
align-items: center;
|
|
2858
2858
|
color: var(--ac-global-color-primary);
|
|
2859
2859
|
gap: var(--ac-global-dimension-size-50);
|
|
2860
|
-
`;function Sg({example:n}){const a=u.useRef(null),l=
|
|
2860
|
+
`;function Sg({example:n}){const a=u.useRef(null),l=Y(),{data:t,loadNext:i,hasNext:r,isLoadingNext:o}=D.usePaginationFragment(_r,n),c=u.useMemo(()=>t.experimentRuns.edges.map(y=>{let b=null;return y.run.startTime&&y.run.endTime&&(b=new Date(y.run.endTime).getTime()-new Date(y.run.startTime).getTime()),{...y.run,output:JSON.stringify(y.run.output),latencyMs:b}}),[t]),g=he({columns:[{header:"start time",accessorKey:"startTime",cell:Fe},{header:"output",accessorKey:"output",cell:y=>{var k;const b=(k=y.row.original)==null?void 0:k.error;return b!==null?e(K,{color:"danger",children:b}):e(me,{...y})}},{header:"latency",accessorKey:"latencyMs",cell:({getValue:y})=>{const b=y();return b===null||typeof b!="number"?"--":e(we,{latencyMs:b})}},{header:"evaluations",accessorKey:"annotations",cell:({row:y})=>e(h,{direction:"row",gap:"size-50",wrap:"wrap",children:y.original.annotations.edges.map((b,k)=>{const S=b.annotation;return e(ia,{annotation:S,extra:S.trace&&e(F,{paddingTop:"size-100",children:s("div",{css:bg,children:[e(P,{svg:e(I.InfoOutline,{})}),e("span",{children:"Click to view evaluator trace"})]})}),children:e(xn,{annotation:S,onClick:()=>{S.trace&&l(`/projects/${S.trace.projectId}/traces/${S.trace.traceId}`)}},k)},k)})})},{id:"actions",cell:({row:y})=>{const b=y.original.trace;if(b)return e(M,{variant:"default",size:"compact",icon:e(P,{svg:e(I.Trace,{})}),onClick:()=>{l(`/projects/${b.projectId}/traces/${b.traceId}`)},"aria-label":"view trace"})}}],data:c,getCoreRowModel:ke()}),f=g.getRowModel().rows,m=f.length===0,p=u.useCallback(y=>{if(y){const{scrollHeight:b,scrollTop:k,clientHeight:S}=y;b-k-S<300&&!o&&r&&i(hg)}},[r,o,i]);return e("div",{css:C`
|
|
2861
2861
|
flex: 1 1 auto;
|
|
2862
2862
|
overflow: auto;
|
|
2863
|
-
`,ref:a,onScroll:y=>p(y.target),children:s("table",{css:
|
|
2863
|
+
`,ref:a,onScroll:y=>p(y.target),children:s("table",{css:jn,children:[e("thead",{children:g.getHeaderGroups().map(y=>e("tr",{children:y.headers.map(b=>e("th",{children:e("div",{children:Z(b.column.columnDef.header,b.getContext())})},b.id))},y.id))}),m?e(kg,{}):e("tbody",{children:f.map(y=>e("tr",{children:y.getVisibleCells().map(b=>e("td",{children:Z(b.column.columnDef.cell,b.getContext())},b.id))},y.id))})]})})}function Er({exampleId:n,onDismiss:a}){const[l,t]=u.useState(0),i=D.useLazyLoadQuery(Pr,{exampleId:n},{fetchKey:l,fetchPolicy:"store-and-network"}),r=u.useMemo(()=>{const p=i.example.latestRevision;return{input:JSON.stringify(p==null?void 0:p.input,null,2),output:JSON.stringify(p==null?void 0:p.output,null,2),metadata:JSON.stringify(p==null?void 0:p.metadata,null,2)}},[i]),o=u.useMemo(()=>{const p=i.example.span;return p?{id:p.id,traceId:p.context.traceId,projectId:p.project.id}:null},[i]),{input:c,output:d,metadata:g}=r,f=Y(),m=oe();return e(W,{type:"slideOver",isDismissable:!0,onDismiss:a,children:e(H,{size:"XL",title:`Example: ${n}`,extra:s(h,{direction:"row",gap:"size-100",children:[o?e(M,{variant:"default",size:"compact",onClick:()=>{f(`/projects/${o.projectId}/traces/${o.traceId}?selectedSpanNodeId=${o.id}`)},children:"View Source Span"}):null,e(fg,{exampleId:n,currentRevision:r,onCompleted:()=>{m({title:"Example updated",message:`Example ${n} has been updated.`}),t(p=>p+1)}})]}),children:s(Xe,{direction:"vertical",autoSaveId:"example-panel-group",children:[e(ue,{defaultSize:200,children:e("div",{css:C`
|
|
2864
2864
|
overflow-y: auto;
|
|
2865
2865
|
height: 100%;
|
|
2866
|
-
`,children:e(h,{direction:"row",justifyContent:"center",children:e(F,{width:"900px",paddingStart:"auto",paddingEnd:"auto",paddingTop:"size-200",paddingBottom:"size-200",children:s(h,{direction:"column",gap:"size-200",children:[e(V,{title:"Input",...
|
|
2866
|
+
`,children:e(h,{direction:"row",justifyContent:"center",children:e(F,{width:"900px",paddingStart:"auto",paddingEnd:"auto",paddingTop:"size-200",paddingBottom:"size-200",children:s(h,{direction:"column",gap:"size-200",children:[e(V,{title:"Input",...za,extra:e(le,{text:c}),children:e(fn,{value:c})}),e(V,{title:"Output",...za,extra:e(le,{text:d}),children:e(fn,{value:d})}),e(V,{title:"Metadata",...za,extra:e(le,{text:g}),children:e(fn,{value:g})})]})})})})}),e(Ye,{css:Kn}),e(ue,{defaultSize:100,children:s(h,{direction:"column",height:"100%",children:[e(F,{paddingStart:"size-200",paddingEnd:"size-200",paddingTop:"size-100",paddingBottom:"size-100",borderBottomColor:"dark",borderBottomWidth:"thin",flex:"none",children:e(re,{level:3,children:"Experiment Runs"})}),e(Sg,{example:i.example})]})})]})})})}const za={backgroundColor:"light",borderColor:"light",variant:"compact",collapsible:!0,bodyStyle:{padding:0}};function nf(){const{exampleId:n,datasetId:a}=ln(),l=Y();return e(Er,{exampleId:n,onDismiss:()=>{l(`/datasets/${a}/examples`)}})}const Rr=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"id"}],a=[{kind:"Variable",name:"id",variableName:"id"}],l={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},t={alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},i=[{kind:"Literal",name:"first",value:100}];return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"examplesLoaderQuery",selections:[{alias:"dataset",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[l,{args:null,kind:"FragmentSpread",name:"ExamplesTableFragment"}],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"examplesLoaderQuery",selections:[{alias:"dataset",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[t,l,{kind:"InlineFragment",selections:[{alias:null,args:i,concreteType:"DatasetExampleConnection",kind:"LinkedField",name:"examples",plural:!1,selections:[{alias:null,args:null,concreteType:"DatasetExampleEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"example",args:null,concreteType:"DatasetExample",kind:"LinkedField",name:"node",plural:!1,selections:[l,{alias:null,args:null,concreteType:"DatasetExampleRevision",kind:"LinkedField",name:"revision",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"input",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"output",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"metadata",storageKey:null}],storageKey:null}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"cursor",storageKey:null},{alias:null,args:null,concreteType:"DatasetExample",kind:"LinkedField",name:"node",plural:!1,selections:[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:"examples(first:100)"},{alias:null,args:i,filters:["datasetVersionId"],handle:"connection",key:"ExamplesTable_examples",kind:"LinkedHandle",name:"examples"}],type:"Dataset",abstractKey:null}],storageKey:null}]},params:{cacheID:"7e303fa9a3c09ccd6a3dc1f3dbb2afb3",id:null,metadata:{},name:"examplesLoaderQuery",operationKind:"query",text:`query examplesLoaderQuery(
|
|
2867
2867
|
$id: GlobalID!
|
|
2868
2868
|
) {
|
|
2869
2869
|
dataset: node(id: $id) {
|
|
@@ -2896,7 +2896,7 @@ fragment ExamplesTableFragment on Dataset {
|
|
|
2896
2896
|
}
|
|
2897
2897
|
id
|
|
2898
2898
|
}
|
|
2899
|
-
`}}}();Rr.hash="6406bbf43a2e850b384ba9573d8e69de";async function
|
|
2899
|
+
`}}}();Rr.hash="6406bbf43a2e850b384ba9573d8e69de";async function af(n){const{datasetId:a}=n.params;return await D.fetchQuery(xe,Rr,{id:a}).toPromise()}const Mr=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"after"},{defaultValue:null,kind:"LocalArgument",name:"datasetVersionId"},{defaultValue:100,kind:"LocalArgument",name:"first"},{defaultValue:null,kind:"LocalArgument",name:"id"}],a=[{kind:"Variable",name:"id",variableName:"id"}],l=[{kind:"Variable",name:"after",variableName:"after"},{kind:"Variable",name:"datasetVersionId",variableName:"datasetVersionId"},{kind:"Variable",name:"first",variableName:"first"}],t={alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},i={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null};return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"ExamplesTableQuery",selections:[{alias:null,args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{args:l,kind:"FragmentSpread",name:"ExamplesTableFragment"}],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"ExamplesTableQuery",selections:[{alias:null,args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[t,{kind:"TypeDiscriminator",abstractKey:"__isNode"},i,{kind:"InlineFragment",selections:[{alias:null,args:l,concreteType:"DatasetExampleConnection",kind:"LinkedField",name:"examples",plural:!1,selections:[{alias:null,args:null,concreteType:"DatasetExampleEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"example",args:null,concreteType:"DatasetExample",kind:"LinkedField",name:"node",plural:!1,selections:[i,{alias:null,args:null,concreteType:"DatasetExampleRevision",kind:"LinkedField",name:"revision",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"input",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"output",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"metadata",storageKey:null}],storageKey:null}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"cursor",storageKey:null},{alias:null,args:null,concreteType:"DatasetExample",kind:"LinkedField",name:"node",plural:!1,selections:[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:null,args:l,filters:["datasetVersionId"],handle:"connection",key:"ExamplesTable_examples",kind:"LinkedHandle",name:"examples"}],type:"Dataset",abstractKey:null}],storageKey:null}]},params:{cacheID:"ca59c018695d41ca01b5f9d453386886",id:null,metadata:{},name:"ExamplesTableQuery",operationKind:"query",text:`query ExamplesTableQuery(
|
|
2900
2900
|
$after: String = null
|
|
2901
2901
|
$datasetVersionId: GlobalID
|
|
2902
2902
|
$first: Int = 100
|
|
@@ -2947,10 +2947,10 @@ fragment ExamplesTableFragment_4a6F8Z on Dataset {
|
|
|
2947
2947
|
bottom: var(--ac-global-dimension-size-400);
|
|
2948
2948
|
left: 50%;
|
|
2949
2949
|
transform: translateX(-50%);
|
|
2950
|
-
`,children:[e(F,{backgroundColor:"light",padding:"size-200",borderColor:"light",borderWidth:"thin",borderRadius:"medium",minWidth:"size-6000",children:s(h,{direction:"row",justifyContent:"space-between",alignItems:"center",children:[e(K,{children:`${l.length} example${m?"s":""} selected`}),s(h,{direction:"row",gap:"size-100",children:[e(M,{variant:"default",size:"compact",onClick:i,children:"Cancel"}),e(M,{variant:"danger",size:"compact",icon:e(P,{svg:e(I.TrashOutline,{})}),loading:f,disabled:f,onClick:p,children:f?"Deleting...":"Delete Example"+(m?"s":"")})]})]})}),e(W,{onDismiss:()=>{o(null)},children:r})]})}const Cg=100;function Fg({dataset:n}){const a=vn(A=>A.latestVersion),l=u.useRef(null),[t,i]=Ke.useState({}),{data:r,loadNext:o,hasNext:c,isLoadingNext:d,refetch:g}=D.usePaginationFragment(Nr,n);u.useEffect(()=>{u.startTransition(()=>{g({datasetVersionId:(a==null?void 0:a.id)||null},{fetchPolicy:"store-and-network"})})},[a,g]);const f=u.useMemo(()=>r.examples.edges.map(A=>{const x=A.example,T=x.revision;return{id:x.id,input:T.input,output:T.output,metadata:T.metadata}}),[r]),p=he({columns:[{id:"select",header:({table:A})=>e(en,{checked:A.getIsAllRowsSelected(),indeterminate:A.getIsSomeRowsSelected(),onChange:A.getToggleAllRowsSelectedHandler()}),cell:({row:A})=>e(en,{checked:A.getIsSelected(),disabled:!A.getCanSelect(),indeterminate:A.getIsSomeSelected(),onChange:A.getToggleSelectedHandler()})},{header:"example id",accessorKey:"id",cell:({getValue:A,row:x})=>{const T=x.original.id;return e(Ze,{to:`${T}`,children:A()})}},{header:"input",accessorKey:"input",cell:_n},{header:"output",accessorKey:"output",cell:_n},{header:"metadata",accessorKey:"metadata",cell:_n}],data:f,state:{rowSelection:t},onRowSelectionChange:i,getCoreRowModel:ke()}),y=p.getRowModel().rows,b=y.length===0,k=p.getSelectedRowModel().rows,S=k.map(A=>A.original),v=u.useCallback(()=>{i({})},[i]),w=u.useCallback(A=>{if(A){const{scrollHeight:x,scrollTop:T,clientHeight:E}=A;x-T-E<300&&!d&&c&&o(Cg)}},[c,d,o]),L=
|
|
2950
|
+
`,children:[e(F,{backgroundColor:"light",padding:"size-200",borderColor:"light",borderWidth:"thin",borderRadius:"medium",minWidth:"size-6000",children:s(h,{direction:"row",justifyContent:"space-between",alignItems:"center",children:[e(K,{children:`${l.length} example${m?"s":""} selected`}),s(h,{direction:"row",gap:"size-100",children:[e(M,{variant:"default",size:"compact",onClick:i,children:"Cancel"}),e(M,{variant:"danger",size:"compact",icon:e(P,{svg:e(I.TrashOutline,{})}),loading:f,disabled:f,onClick:p,children:f?"Deleting...":"Delete Example"+(m?"s":"")})]})]})}),e(W,{onDismiss:()=>{o(null)},children:r})]})}const Cg=100;function Fg({dataset:n}){const a=vn(A=>A.latestVersion),l=u.useRef(null),[t,i]=Ke.useState({}),{data:r,loadNext:o,hasNext:c,isLoadingNext:d,refetch:g}=D.usePaginationFragment(Nr,n);u.useEffect(()=>{u.startTransition(()=>{g({datasetVersionId:(a==null?void 0:a.id)||null},{fetchPolicy:"store-and-network"})})},[a,g]);const f=u.useMemo(()=>r.examples.edges.map(A=>{const x=A.example,T=x.revision;return{id:x.id,input:T.input,output:T.output,metadata:T.metadata}}),[r]),p=he({columns:[{id:"select",header:({table:A})=>e(en,{checked:A.getIsAllRowsSelected(),indeterminate:A.getIsSomeRowsSelected(),onChange:A.getToggleAllRowsSelectedHandler()}),cell:({row:A})=>e(en,{checked:A.getIsSelected(),disabled:!A.getCanSelect(),indeterminate:A.getIsSomeSelected(),onChange:A.getToggleSelectedHandler()})},{header:"example id",accessorKey:"id",cell:({getValue:A,row:x})=>{const T=x.original.id;return e(Ze,{to:`${T}`,children:A()})}},{header:"input",accessorKey:"input",cell:_n},{header:"output",accessorKey:"output",cell:_n},{header:"metadata",accessorKey:"metadata",cell:_n}],data:f,state:{rowSelection:t},onRowSelectionChange:i,getCoreRowModel:ke()}),y=p.getRowModel().rows,b=y.length===0,k=p.getSelectedRowModel().rows,S=k.map(A=>A.original),v=u.useCallback(()=>{i({})},[i]),w=u.useCallback(A=>{if(A){const{scrollHeight:x,scrollTop:T,clientHeight:E}=A;x-T-E<300&&!d&&c&&o(Cg)}},[c,d,o]),L=Y();return s("div",{css:C`
|
|
2951
2951
|
flex: 1 1 auto;
|
|
2952
2952
|
overflow: auto;
|
|
2953
|
-
`,ref:l,onScroll:A=>w(A.target),children:[s("table",{css:
|
|
2953
|
+
`,ref:l,onScroll:A=>w(A.target),children:[s("table",{css:jn,children:[e("thead",{children:p.getHeaderGroups().map(A=>e("tr",{children:A.headers.map(x=>e("th",{children:e("div",{children:Z(x.column.columnDef.header,x.getContext())})},x.id))},A.id))}),b?e(Je,{}):e("tbody",{children:y.map(A=>e("tr",{onClick:()=>{L(`${A.original.id}`)},children:A.getVisibleCells().map(x=>e("td",{children:Z(x.column.columnDef.cell,x.getContext())},x.id))},A.id))})]}),k.length?e(vg,{selectedExamples:S,onClearSelection:v,onExamplesDeleted:()=>{g({},{fetchPolicy:"store-and-network"})}}):null]})}function lf(){const n=Cn();return s(U,{children:[e(Fg,{dataset:n.dataset})," ",e(u.Suspense,{children:e(Pe,{})})]})}const zr=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"id"}],a=[{kind:"Variable",name:"id",variableName:"id"}],l={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},t={alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},i={alias:null,args:null,kind:"ScalarField",name:"annotationName",storageKey:null},r=[{kind:"Literal",name:"first",value:100}];return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"experimentsLoaderQuery",selections:[{alias:"dataset",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[l,{kind:"InlineFragment",selections:[{args:null,kind:"FragmentSpread",name:"ExperimentsTableFragment"}],type:"Dataset",abstractKey:null}],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"experimentsLoaderQuery",selections:[{alias:"dataset",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[t,l,{kind:"InlineFragment",selections:[{alias:null,args:null,concreteType:"ExperimentAnnotationSummary",kind:"LinkedField",name:"experimentAnnotationSummaries",plural:!0,selections:[i,{alias:null,args:null,kind:"ScalarField",name:"minScore",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"maxScore",storageKey:null}],storageKey:null},{alias:null,args:r,concreteType:"ExperimentConnection",kind:"LinkedField",name:"experiments",plural:!1,selections:[{alias:null,args:null,concreteType:"ExperimentEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"experiment",args:null,concreteType:"Experiment",kind:"LinkedField",name:"node",plural:!1,selections:[l,{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"sequenceNumber",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"description",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"createdAt",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"metadata",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"errorRate",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"runCount",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"averageRunLatencyMs",storageKey:null},{alias:null,args:null,concreteType:"Project",kind:"LinkedField",name:"project",plural:!1,selections:[l],storageKey:null},{alias:null,args:null,concreteType:"ExperimentAnnotationSummary",kind:"LinkedField",name:"annotationSummaries",plural:!0,selections:[i,{alias:null,args:null,kind:"ScalarField",name:"meanScore",storageKey:null}],storageKey:null}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"cursor",storageKey:null},{alias:null,args:null,concreteType:"Experiment",kind:"LinkedField",name:"node",plural:!1,selections:[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:"experiments(first:100)"},{alias:null,args:r,filters:null,handle:"connection",key:"ExperimentsTable_experiments",kind:"LinkedHandle",name:"experiments"}],type:"Dataset",abstractKey:null}],storageKey:null}]},params:{cacheID:"91f92395f5df4858554b124deed3f47a",id:null,metadata:{},name:"experimentsLoaderQuery",operationKind:"query",text:`query experimentsLoaderQuery(
|
|
2954
2954
|
$id: GlobalID!
|
|
2955
2955
|
) {
|
|
2956
2956
|
dataset: node(id: $id) {
|
|
@@ -3000,7 +3000,7 @@ fragment ExperimentsTableFragment on Dataset {
|
|
|
3000
3000
|
}
|
|
3001
3001
|
id
|
|
3002
3002
|
}
|
|
3003
|
-
`}}}();zr.hash="1461484d9e1232cbb99e1251edabbec3";async function
|
|
3003
|
+
`}}}();zr.hash="1461484d9e1232cbb99e1251edabbec3";async function tf(n){const{datasetId:a}=n.params;return await D.fetchQuery(xe,zr,{id:a}).toPromise()}const $r=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"after"},{defaultValue:100,kind:"LocalArgument",name:"first"},{defaultValue:null,kind:"LocalArgument",name:"id"}],a=[{kind:"Variable",name:"id",variableName:"id"}],l=[{kind:"Variable",name:"after",variableName:"after"},{kind:"Variable",name:"first",variableName:"first"}],t={alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},i={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},r={alias:null,args:null,kind:"ScalarField",name:"annotationName",storageKey:null};return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"ExperimentsTableQuery",selections:[{alias:null,args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{args:l,kind:"FragmentSpread",name:"ExperimentsTableFragment"}],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"ExperimentsTableQuery",selections:[{alias:null,args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[t,{kind:"TypeDiscriminator",abstractKey:"__isNode"},i,{kind:"InlineFragment",selections:[{alias:null,args:null,concreteType:"ExperimentAnnotationSummary",kind:"LinkedField",name:"experimentAnnotationSummaries",plural:!0,selections:[r,{alias:null,args:null,kind:"ScalarField",name:"minScore",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"maxScore",storageKey:null}],storageKey:null},{alias:null,args:l,concreteType:"ExperimentConnection",kind:"LinkedField",name:"experiments",plural:!1,selections:[{alias:null,args:null,concreteType:"ExperimentEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"experiment",args:null,concreteType:"Experiment",kind:"LinkedField",name:"node",plural:!1,selections:[i,{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"sequenceNumber",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"description",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"createdAt",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"metadata",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"errorRate",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"runCount",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"averageRunLatencyMs",storageKey:null},{alias:null,args:null,concreteType:"Project",kind:"LinkedField",name:"project",plural:!1,selections:[i],storageKey:null},{alias:null,args:null,concreteType:"ExperimentAnnotationSummary",kind:"LinkedField",name:"annotationSummaries",plural:!0,selections:[r,{alias:null,args:null,kind:"ScalarField",name:"meanScore",storageKey:null}],storageKey:null}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"cursor",storageKey:null},{alias:null,args:null,concreteType:"Experiment",kind:"LinkedField",name:"node",plural:!1,selections:[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:null,args:l,filters:null,handle:"connection",key:"ExperimentsTable_experiments",kind:"LinkedHandle",name:"experiments"}],type:"Dataset",abstractKey:null}],storageKey:null}]},params:{cacheID:"1db5ce5523fa9a472c91d093b0e6160e",id:null,metadata:{},name:"ExperimentsTableQuery",operationKind:"query",text:`query ExperimentsTableQuery(
|
|
3004
3004
|
$after: String = null
|
|
3005
3005
|
$first: Int = 100
|
|
3006
3006
|
$id: GlobalID!
|
|
@@ -3051,14 +3051,14 @@ fragment ExperimentsTableFragment_2HEEH6 on Dataset {
|
|
|
3051
3051
|
}
|
|
3052
3052
|
id
|
|
3053
3053
|
}
|
|
3054
|
-
`}}}();$r.hash="c7c7580fe40888ceb86a1701fe4eedf4";const Or=function(){var n=["experiments"],a={alias:null,args:null,kind:"ScalarField",name:"annotationName",storageKey:null},l={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null};return{argumentDefinitions:[{defaultValue:null,kind:"LocalArgument",name:"after"},{defaultValue:100,kind:"LocalArgument",name:"first"}],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:$r,identifierInfo:{identifierField:"id",identifierQueryVariableName:"id"}}},name:"ExperimentsTableFragment",selections:[{alias:null,args:null,concreteType:"ExperimentAnnotationSummary",kind:"LinkedField",name:"experimentAnnotationSummaries",plural:!0,selections:[a,{alias:null,args:null,kind:"ScalarField",name:"minScore",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"maxScore",storageKey:null}],storageKey:null},{alias:"experiments",args:null,concreteType:"ExperimentConnection",kind:"LinkedField",name:"__ExperimentsTable_experiments_connection",plural:!1,selections:[{alias:null,args:null,concreteType:"ExperimentEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"experiment",args:null,concreteType:"Experiment",kind:"LinkedField",name:"node",plural:!1,selections:[l,{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"sequenceNumber",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"description",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"createdAt",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"metadata",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"errorRate",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"runCount",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"averageRunLatencyMs",storageKey:null},{alias:null,args:null,concreteType:"Project",kind:"LinkedField",name:"project",plural:!1,selections:[l],storageKey:null},{alias:null,args:null,concreteType:"ExperimentAnnotationSummary",kind:"LinkedField",name:"annotationSummaries",plural:!0,selections:[a,{alias:null,args:null,kind:"ScalarField",name:"meanScore",storageKey:null}],storageKey:null}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"cursor",storageKey:null},{alias:null,args:null,concreteType:"Experiment",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:"Dataset",abstractKey:null}}();Or.hash="c7c7580fe40888ceb86a1701fe4eedf4";function Kg({getValue:n}){const a=n(),l=a!==null?a*100:null,t=u.useMemo(()=>{if(l!==null)return l>=80?"red-1100":l>0?"orange-1100":"green-1100"},[l]);return e(K,{color:t,children:
|
|
3054
|
+
`}}}();$r.hash="c7c7580fe40888ceb86a1701fe4eedf4";const Or=function(){var n=["experiments"],a={alias:null,args:null,kind:"ScalarField",name:"annotationName",storageKey:null},l={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null};return{argumentDefinitions:[{defaultValue:null,kind:"LocalArgument",name:"after"},{defaultValue:100,kind:"LocalArgument",name:"first"}],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:$r,identifierInfo:{identifierField:"id",identifierQueryVariableName:"id"}}},name:"ExperimentsTableFragment",selections:[{alias:null,args:null,concreteType:"ExperimentAnnotationSummary",kind:"LinkedField",name:"experimentAnnotationSummaries",plural:!0,selections:[a,{alias:null,args:null,kind:"ScalarField",name:"minScore",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"maxScore",storageKey:null}],storageKey:null},{alias:"experiments",args:null,concreteType:"ExperimentConnection",kind:"LinkedField",name:"__ExperimentsTable_experiments_connection",plural:!1,selections:[{alias:null,args:null,concreteType:"ExperimentEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"experiment",args:null,concreteType:"Experiment",kind:"LinkedField",name:"node",plural:!1,selections:[l,{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"sequenceNumber",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"description",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"createdAt",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"metadata",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"errorRate",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"runCount",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"averageRunLatencyMs",storageKey:null},{alias:null,args:null,concreteType:"Project",kind:"LinkedField",name:"project",plural:!1,selections:[l],storageKey:null},{alias:null,args:null,concreteType:"ExperimentAnnotationSummary",kind:"LinkedField",name:"annotationSummaries",plural:!0,selections:[a,{alias:null,args:null,kind:"ScalarField",name:"meanScore",storageKey:null}],storageKey:null}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"cursor",storageKey:null},{alias:null,args:null,concreteType:"Experiment",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:"Dataset",abstractKey:null}}();Or.hash="c7c7580fe40888ceb86a1701fe4eedf4";function Kg({getValue:n}){const a=n(),l=a!==null?a*100:null,t=u.useMemo(()=>{if(l!==null)return l>=80?"red-1100":l>0?"orange-1100":"green-1100"},[l]);return e(K,{color:t,children:Qa(l)})}const Qr=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"input"}],a=[{alias:null,args:[{kind:"Variable",name:"input",variableName:"input"}],concreteType:"ExperimentMutationPayload",kind:"LinkedField",name:"deleteExperiments",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null}],storageKey:null}];return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"ExperimentSelectionToolbarDeleteExperimentsMutation",selections:a,type:"Mutation",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"ExperimentSelectionToolbarDeleteExperimentsMutation",selections:a},params:{cacheID:"3af24cbaf3208c0d5ad1cd9313dd3823",id:null,metadata:{},name:"ExperimentSelectionToolbarDeleteExperimentsMutation",operationKind:"mutation",text:`mutation ExperimentSelectionToolbarDeleteExperimentsMutation(
|
|
3055
3055
|
$input: DeleteExperimentsInput!
|
|
3056
3056
|
) {
|
|
3057
3057
|
deleteExperiments(input: $input) {
|
|
3058
3058
|
__typename
|
|
3059
3059
|
}
|
|
3060
3060
|
}
|
|
3061
|
-
`}}}();Qr.hash="4ab310746eb51c6a3fcb799d2c972762";function xg(n){const a=
|
|
3061
|
+
`}}}();Qr.hash="4ab310746eb51c6a3fcb799d2c972762";function xg(n){const a=Y(),[l,t]=u.useState(null),[i,r]=D.useMutation(Qr),{datasetId:o,selectedExperiments:c,onClearSelection:d,onExperimentsDeleted:g}=n,f=c.length!==1,m=oe(),p=ce(),y=u.useCallback(()=>{i({variables:{input:{experimentIds:c.map(k=>k.id)}},onCompleted:()=>{m({title:"Examples Deleted",message:`${c.length} experiment${f?"s":""} have been deleted.`}),g(),d()},onError:k=>{p({title:"An error occurred",message:`Failed to delete examples: ${k.message}`})}})},[i,f,p,m,d,g,c]),b=u.useCallback(()=>{t(s(H,{size:"S",title:"Delete Experiments",children:[e(F,{padding:"size-200",children:e(K,{color:"danger",children:"Are you sure you want to delete these experiments? This will also delete all associated annotations and traces, and it cannot be undone."})}),e(F,{paddingEnd:"size-200",paddingTop:"size-100",paddingBottom:"size-100",borderTopColor:"light",borderTopWidth:"thin",children:e(h,{direction:"row",justifyContent:"end",children:e(M,{variant:"danger",onClick:()=>{y(),t(null)},children:"Delete Experiments"})})})]}))},[y]);return s("div",{css:C`
|
|
3062
3062
|
position: absolute;
|
|
3063
3063
|
bottom: var(--ac-global-dimension-size-400);
|
|
3064
3064
|
left: 50%;
|
|
@@ -3073,18 +3073,18 @@ fragment ExperimentsTableFragment_2HEEH6 on Dataset {
|
|
|
3073
3073
|
}
|
|
3074
3074
|
`,children:["No experiments for this dataset. To see how to run experiments on a dataset, check out the documentation.",e(Ir,{})]})})})}function Ig({dataset:n}){const a=u.useRef(null),[l,t]=u.useState({}),{data:i,loadNext:r,hasNext:o,isLoadingNext:c,refetch:d}=D.usePaginationFragment(Or,n),g=u.useMemo(()=>i.experiments.edges.map(x=>{const T=x.experiment.annotationSummaries.reduce((E,R)=>(E[R.annotationName]=R,E),{});return{...x.experiment,annotationSummaryMap:T}}),[i.experiments.edges]),f=[{id:"select",header:({table:x})=>e(en,{checked:x.getIsAllRowsSelected(),indeterminate:x.getIsSomeRowsSelected(),onChange:x.getToggleAllRowsSelectedHandler()}),cell:({row:x})=>e(en,{checked:x.getIsSelected(),disabled:!x.getCanSelect(),indeterminate:x.getIsSomeSelected(),onChange:x.getToggleSelectedHandler()})},{header:"name",accessorKey:"name",minSize:200,cell:({getValue:x,row:T})=>{const E=T.original.id,R=T.original.sequenceNumber;return s(h,{direction:"row",gap:"size-100",children:[e(xa,{sequenceNumber:R}),e(Ze,{to:`/datasets/${n.id}/compare?experimentId=${E}`,children:x()})]})}},{header:"description",accessorKey:"description",minSize:300,cell:me},{header:"created at",accessorKey:"createdAt",cell:Fe}],m=i.experimentAnnotationSummaries.map(x=>{const{annotationName:T,minScore:E,maxScore:R}=x;return{header:()=>s(h,{direction:"row",gap:"size-100",wrap:!0,alignItems:"center",justifyContent:"end",children:[e(K,{children:T}),e(td,{annotationName:T})]}),id:`annotation-${T}`,meta:{textAlign:"right"},cell:({row:j})=>{const ae=j.original.annotationSummaryMap[T];return!ae||ae.meanScore==null?e("span",{css:C`
|
|
3075
3075
|
float: right;
|
|
3076
|
-
`,children:"--"}):e(Lg,{annotationName:T,value:ae.meanScore,min:E,max:R})}}}),p=[{header:"run count",accessorKey:"runCount",meta:{textAlign:"right"},cell:id},{header:"avg latency",accessorKey:"averageRunLatencyMs",meta:{textAlign:"right"},cell:({getValue:x})=>{const T=x();return T===null||typeof T!="number"?"--":e(we,{latencyMs:T})}},{header:"error rate",accessorKey:"errorRate",meta:{textAlign:"right"},cell:Kg},{header:"metadata",accessorKey:"metadata",minSize:200,cell:_n},{id:"actions",cell:({row:x})=>{const T=x.original.project,E=x.original.metadata;return e(Pg,{projectId:(T==null?void 0:T.id)||null,experimentId:x.original.id,metadata:E})}}],y=he({columns:[...f,...m,...p],data:g,getCoreRowModel:ke(),state:{rowSelection:l},onRowSelectionChange:t}),b=y.getRowModel().rows,k=y.getSelectedRowModel().rows,S=k.map(x=>x.original),v=u.useCallback(()=>{t({})},[t]),w=b.length===0,L=u.useCallback(x=>{if(x){const{scrollHeight:T,scrollTop:E,clientHeight:R}=x;T-E-R<300&&!c&&o&&r(Dg)}},[o,c,r]),A=
|
|
3076
|
+
`,children:"--"}):e(Lg,{annotationName:T,value:ae.meanScore,min:E,max:R})}}}),p=[{header:"run count",accessorKey:"runCount",meta:{textAlign:"right"},cell:id},{header:"avg latency",accessorKey:"averageRunLatencyMs",meta:{textAlign:"right"},cell:({getValue:x})=>{const T=x();return T===null||typeof T!="number"?"--":e(we,{latencyMs:T})}},{header:"error rate",accessorKey:"errorRate",meta:{textAlign:"right"},cell:Kg},{header:"metadata",accessorKey:"metadata",minSize:200,cell:_n},{id:"actions",cell:({row:x})=>{const T=x.original.project,E=x.original.metadata;return e(Pg,{projectId:(T==null?void 0:T.id)||null,experimentId:x.original.id,metadata:E})}}],y=he({columns:[...f,...m,...p],data:g,getCoreRowModel:ke(),state:{rowSelection:l},onRowSelectionChange:t}),b=y.getRowModel().rows,k=y.getSelectedRowModel().rows,S=k.map(x=>x.original),v=u.useCallback(()=>{t({})},[t]),w=b.length===0,L=u.useCallback(x=>{if(x){const{scrollHeight:T,scrollTop:E,clientHeight:R}=x;T-E-R<300&&!c&&o&&r(Dg)}},[o,c,r]),A=Y();return s("div",{css:C`
|
|
3077
3077
|
flex: 1 1 auto;
|
|
3078
3078
|
overflow: auto;
|
|
3079
3079
|
width: table.getTotalSize();
|
|
3080
|
-
`,ref:a,onScroll:x=>L(x.target),children:[s("table",{css:
|
|
3080
|
+
`,ref:a,onScroll:x=>L(x.target),children:[s("table",{css:jn,children:[e("thead",{children:y.getHeaderGroups().map(x=>e("tr",{children:x.headers.map(T=>{var E,R;return e("th",{align:(R=(E=T.column.columnDef)==null?void 0:E.meta)==null?void 0:R.textAlign,children:e("div",{children:Z(T.column.columnDef.header,T.getContext())})},T.id)})},x.id))}),w?e(Tg,{}):e("tbody",{children:b.map(x=>e("tr",{onClick:()=>{A(`/datasets/${n.id}/compare?experimentId=${x.original.id}`)},children:x.getVisibleCells().map(T=>e("td",{children:Z(T.column.columnDef.cell,T.getContext())},T.id))},x.id))})]}),k.length?e(xg,{datasetId:n.id,selectedExperiments:S,onClearSelection:v,onExperimentsDeleted:()=>{d({},{fetchPolicy:"store-and-network"})}}):null]})}function Lg({annotationName:n,value:a,min:l,max:t}){const i=et(n),r=u.useMemo(()=>{const o=typeof l=="number"?l:0,c=typeof t=="number"?t:1;if(o===c&&c===a)return 100;const d=c-o||1;return(a-o)/d*100},[a,l,t]);return s(Le,{children:[e(kn,{children:s("div",{css:C`
|
|
3081
3081
|
float: right;
|
|
3082
3082
|
--mod-barloader-fill-color: ${i};
|
|
3083
3083
|
display: flex;
|
|
3084
3084
|
flex-direction: row;
|
|
3085
3085
|
align-items: center;
|
|
3086
3086
|
gap: var(--ac-global-dimension-size-100);
|
|
3087
|
-
`,children:[wn(a),e(mo,{width:"40px",value:r,"aria-label":"where the mean score lands between overall min max"})]})}),e(aa,{children:s(F,{width:"size-2400",children:[e(re,{level:3,weight:"heavy",children:n}),s(h,{direction:"column",children:[s(h,{justifyContent:"space-between",children:[e(K,{weight:"heavy",textSize:"small",children:"Mean Score"}),e(K,{textSize:"small",children:wn(a)})]}),s(h,{justifyContent:"space-between",children:[e(K,{weight:"heavy",textSize:"small",children:"All Experiments Min"}),e(K,{textSize:"small",children:wn(l)})]}),s(h,{justifyContent:"space-between",children:[e(K,{weight:"heavy",textSize:"small",children:"All Experiments Max"}),e(K,{textSize:"small",children:wn(t)})]}),s(h,{justifyContent:"space-between",children:[e(K,{weight:"heavy",textSize:"small",children:"Mean Score Percentile"}),e(K,{textSize:"small",children:
|
|
3087
|
+
`,children:[wn(a),e(mo,{width:"40px",value:r,"aria-label":"where the mean score lands between overall min max"})]})}),e(aa,{children:s(F,{width:"size-2400",children:[e(re,{level:3,weight:"heavy",children:n}),s(h,{direction:"column",children:[s(h,{justifyContent:"space-between",children:[e(K,{weight:"heavy",textSize:"small",children:"Mean Score"}),e(K,{textSize:"small",children:wn(a)})]}),s(h,{justifyContent:"space-between",children:[e(K,{weight:"heavy",textSize:"small",children:"All Experiments Min"}),e(K,{textSize:"small",children:wn(l)})]}),s(h,{justifyContent:"space-between",children:[e(K,{weight:"heavy",textSize:"small",children:"All Experiments Max"}),e(K,{textSize:"small",children:wn(t)})]}),s(h,{justifyContent:"space-between",children:[e(K,{weight:"heavy",textSize:"small",children:"Mean Score Percentile"}),e(K,{textSize:"small",children:nt(r)})]})]})]})})]})}function Pg(n){const{projectId:a}=n,l=Y(),[t,i]=u.useState(null),r=oe();return s("div",{onClick:o=>{o.preventDefault(),o.stopPropagation()},children:[s(Be,{buttonSize:"compact",align:"end",disabledKeys:a?[]:["GO_TO_EXPERIMENT_RUN_TRACES"],onAction:o=>{switch(o){case"GO_TO_EXPERIMENT_RUN_TRACES":return l(`/projects/${a}`);case"VIEW_METADATA":{i(e(H,{title:"Metadata",onDismiss:()=>i(null),children:e(fn,{value:JSON.stringify(n.metadata,null,2)})}));break}case"COPY_EXPERIMENT_ID":{Ws(n.experimentId),r({title:"Copied",message:"The experiment ID has been copied to your clipboard"});break}default:Ce()}},children:[e(B,{children:s(h,{direction:"row",gap:"size-75",justifyContent:"start",alignItems:"center",children:[e(P,{svg:e(I.Trace,{})}),e(K,{children:"View run traces"})]})},"GO_TO_EXPERIMENT_RUN_TRACES"),e(B,{children:s(h,{direction:"row",gap:"size-75",justifyContent:"start",alignItems:"center",children:[e(P,{svg:e(I.InfoOutline,{})}),e(K,{children:"View metadata"})]})},"VIEW_METADATA"),e(B,{children:s(h,{direction:"row",gap:"size-75",justifyContent:"start",alignItems:"center",children:[e(P,{svg:e(I.ClipboardCopy,{})}),e(K,{children:"Copy experiment ID"})]})},"COPY_EXPERIMENT_ID")]}),e(W,{type:"modal",isDismissable:!0,onDismiss:()=>{i(null)},children:t})]})}function rf(){const n=Cn();return s(U,{children:[e(Ig,{dataset:n.dataset}),e(u.Suspense,{children:e(Pe,{})})]})}const jr=function(){var n={defaultValue:null,kind:"LocalArgument",name:"datasetId"},a={defaultValue:null,kind:"LocalArgument",name:"experimentIds"},l={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},t={alias:null,args:null,concreteType:"Trace",kind:"LinkedField",name:"trace",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"traceId",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"projectId",storageKey:null}],storageKey:null},i={alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},r={alias:"comparisons",args:[{kind:"Variable",name:"experimentIds",variableName:"experimentIds"}],concreteType:"ExperimentComparison",kind:"LinkedField",name:"compareExperiments",plural:!0,selections:[{alias:null,args:null,concreteType:"DatasetExample",kind:"LinkedField",name:"example",plural:!1,selections:[l,{alias:null,args:null,concreteType:"DatasetExampleRevision",kind:"LinkedField",name:"revision",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"input",storageKey:null},{alias:"referenceOutput",args:null,kind:"ScalarField",name:"output",storageKey:null}],storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"RunComparisonItem",kind:"LinkedField",name:"runComparisonItems",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"experimentId",storageKey:null},{alias:null,args:null,concreteType:"ExperimentRun",kind:"LinkedField",name:"runs",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"output",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"error",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"startTime",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"endTime",storageKey:null},t,{alias:null,args:null,concreteType:"ExperimentRunAnnotationConnection",kind:"LinkedField",name:"annotations",plural:!1,selections:[{alias:null,args:null,concreteType:"ExperimentRunAnnotationEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"annotation",args:null,concreteType:"ExperimentRunAnnotation",kind:"LinkedField",name:"node",plural:!1,selections:[l,i,{alias:null,args:null,kind:"ScalarField",name:"score",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"label",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"annotatorKind",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"explanation",storageKey:null},t],storageKey:null}],storageKey:null}],storageKey:null}],storageKey:null}],storageKey:null}],storageKey:null},o=[{kind:"Variable",name:"id",variableName:"datasetId"}],c={kind:"InlineFragment",selections:[{alias:null,args:null,concreteType:"ExperimentConnection",kind:"LinkedField",name:"experiments",plural:!1,selections:[{alias:null,args:null,concreteType:"ExperimentEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"experiment",args:null,concreteType:"Experiment",kind:"LinkedField",name:"node",plural:!1,selections:[l,i,{alias:null,args:null,kind:"ScalarField",name:"sequenceNumber",storageKey:null}],storageKey:null}],storageKey:null}],storageKey:null}],type:"Dataset",abstractKey:null};return{fragment:{argumentDefinitions:[n,a],kind:"Fragment",metadata:null,name:"ExperimentCompareTableQuery",selections:[r,{alias:"dataset",args:o,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[l,c],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[a,n],kind:"Operation",name:"ExperimentCompareTableQuery",selections:[r,{alias:"dataset",args:o,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},l,c],storageKey:null}]},params:{cacheID:"97e80c617426f75b81affa68e276b3d8",id:null,metadata:{},name:"ExperimentCompareTableQuery",operationKind:"query",text:`query ExperimentCompareTableQuery(
|
|
3088
3088
|
$experimentIds: [GlobalID!]!
|
|
3089
3089
|
$datasetId: GlobalID!
|
|
3090
3090
|
) {
|
|
@@ -3142,7 +3142,7 @@ fragment ExperimentsTableFragment_2HEEH6 on Dataset {
|
|
|
3142
3142
|
}
|
|
3143
3143
|
}
|
|
3144
3144
|
}
|
|
3145
|
-
`}}}();jr.hash="e6132b301f6d80be7f5c5b0653e25178";const
|
|
3145
|
+
`}}}();jr.hash="e6132b301f6d80be7f5c5b0653e25178";const $a={backgroundColor:"light",borderColor:"light",variant:"compact",collapsible:!0,bodyStyle:{padding:0}},wg=C`
|
|
3146
3146
|
flex: 1 1 auto;
|
|
3147
3147
|
overflow: auto;
|
|
3148
3148
|
// Make sure the table fills up the remaining space
|
|
@@ -3182,19 +3182,19 @@ fragment ExperimentsTableFragment_2HEEH6 on Dataset {
|
|
|
3182
3182
|
align-items: center;
|
|
3183
3183
|
color: var(--ac-global-color-primary);
|
|
3184
3184
|
gap: var(--ac-global-dimension-size-50);
|
|
3185
|
-
`;function _g(n){const{datasetId:a,experimentIds:l,displayFullText:t}=n,i=D.useLazyLoadQuery(jr,{experimentIds:l,datasetId:a}),r=u.useMemo(()=>{var S,v;return((v=(S=i.dataset)==null?void 0:S.experiments)==null?void 0:v.edges.reduce((w,L)=>(w[L.experiment.id]={...L.experiment},w),{}))||{}},[i]),o=u.useMemo(()=>i.comparisons.map(S=>{const v=S.runComparisonItems.reduce((w,L)=>(w[L.experimentId]=L,w),{});return{...S,id:S.example.id,input:S.example.revision.input,referenceOutput:S.example.revision.referenceOutput,runComparisonMap:v}}),[i]),[c,d]=u.useState(null),g=u.useMemo(()=>[{header:"input",accessorKey:"input",minWidth:500,cell:({row:S})=>s("div",{css:qr,children:[e(
|
|
3185
|
+
`;function _g(n){const{datasetId:a,experimentIds:l,displayFullText:t}=n,i=D.useLazyLoadQuery(jr,{experimentIds:l,datasetId:a}),r=u.useMemo(()=>{var S,v;return((v=(S=i.dataset)==null?void 0:S.experiments)==null?void 0:v.edges.reduce((w,L)=>(w[L.experiment.id]={...L.experiment},w),{}))||{}},[i]),o=u.useMemo(()=>i.comparisons.map(S=>{const v=S.runComparisonItems.reduce((w,L)=>(w[L.experimentId]=L,w),{});return{...S,id:S.example.id,input:S.example.revision.input,referenceOutput:S.example.revision.referenceOutput,runComparisonMap:v}}),[i]),[c,d]=u.useState(null),g=u.useMemo(()=>[{header:"input",accessorKey:"input",minWidth:500,cell:({row:S})=>s("div",{css:qr,children:[e(cl,{children:e(tl,{json:S.original.input,disableTitle:!0,space:t?2:0})}),e("div",{className:"controls",css:Ur,children:s(Le,{children:[e(M,{variant:"default",size:"compact","aria-label":"View example details",icon:e(P,{svg:e(I.ExpandOutline,{})}),onClick:()=>{u.startTransition(()=>{d(e(u.Suspense,{children:e(Er,{exampleId:S.original.example.id,onDismiss:()=>{d(null)}})}))})}}),e(An,{children:"View Example"})]})})]})},{header:"reference output",accessorKey:"referenceOutput",minWidth:500,cell:t?Vg:_n}],[t]),f=u.useMemo(()=>l.map(S=>({header:()=>{var L,A;const v=(L=r[S])==null?void 0:L.name,w=((A=r[S])==null?void 0:A.sequenceNumber)||0;return s(h,{direction:"row",gap:"size-100",wrap:!0,children:[e(xa,{sequenceNumber:w}),e(K,{children:v})]})},accessorKey:S,minSize:500,cell:({row:v})=>{var j,ae;const w=v.original.runComparisonMap[S],L=(w==null?void 0:w.runs.length)||0;if(L===0)return e(Ll,{});if(L>1)return e(K,{color:"warning",children:`${L} runs`});const A=w==null?void 0:w.runs[0];let x=null;const T=(j=A==null?void 0:A.trace)==null?void 0:j.traceId,E=(ae=A==null?void 0:A.trace)==null?void 0:ae.projectId;T&&E&&(x=s(Le,{children:[e(M,{variant:"default",className:"trace-button",size:"compact","aria-label":"View run trace",icon:e(P,{svg:e(I.Trace,{})}),onClick:ie=>{ie.preventDefault(),ie.stopPropagation(),u.startTransition(()=>{d(e(Wr,{traceId:T,projectId:E,title:"Experiment Run Trace"}))})}}),e(An,{children:"View Trace"})]}));const R=s(U,{children:[s(Le,{children:[e(M,{variant:"default",className:"expand-button",size:"compact","aria-label":"View example run details",icon:e(P,{svg:e(I.ExpandOutline,{})}),onClick:ie=>{ie.preventDefault(),ie.stopPropagation(),u.startTransition(()=>{d(e(zg,{selectedExample:v.original,datasetId:a,experimentInfoById:r}))})}}),e(An,{children:"View run details"})]}),x]});return A?e(Ng,{controls:R,children:e(Mg,{...A,displayFullText:t,setDialog:d})}):e(Ll,{})}})),[l,r,a,t]),m=u.useMemo(()=>[...g,...f,{id:"tail",minSize:500}],[g,f]),p=he({columns:m,data:o,getCoreRowModel:ke(),columnResizeMode:"onChange"}),y=Ke.useMemo(()=>{const S=p.getFlatHeaders(),v={};for(let w=0;w<S.length;w++){const L=S[w];v[`--header-${L.id}-size`]=L.getSize(),v[`--col-${L.column.id}-size`]=L.column.getSize()}return v},[p.getState().columnSizingInfo,p.getState().columnSizing]),k=p.getRowModel().rows.length===0;return s("div",{css:wg,children:[s("table",{css:S=>C(We(S),rd),style:{...y,width:p.getTotalSize(),minWidth:"100%"},children:[e("thead",{children:p.getHeaderGroups().map(S=>e("tr",{children:S.headers.map(v=>s("th",{style:{width:`calc(var(--header-${v==null?void 0:v.id}-size) * 1px)`},children:[e("div",{children:Z(v.column.columnDef.header,v.getContext())}),e("div",{onMouseDown:v.getResizeHandler(),onTouchStart:v.getResizeHandler(),className:`resizer ${v.column.getIsResizing()?"isResizing":""}`})]},v.id))},S.id))}),k?e(Je,{}):p.getState().columnSizingInfo.isResizingColumn?e(Eg,{table:p}):e(Br,{table:p})]}),e(W,{isDismissable:!0,type:"slideOver",onDismiss:()=>{d(null)},children:c})]})}function Br({table:n}){return e("tbody",{children:n.getRowModel().rows.map(a=>e("tr",{children:a.getVisibleCells().map(l=>e("td",{style:{width:`calc(var(--col-${l.column.id}-size) * 1px)`},children:Z(l.column.columnDef.cell,l.getContext())},l.id))},a.id))})}const Eg=Ke.memo(Br,(n,a)=>n.table.options.data===a.table.options.data);function Rg(n){const{datasetId:a,exampleId:l}=n,t=Y();return e("div",{onClick:i=>{i.preventDefault(),i.stopPropagation()},children:e(Be,{buttonSize:"compact",align:"end",onAction:i=>{switch(i){case"gotoExample":return t(`/datasets/${a}/examples/${l}`);default:Ce()}},children:e(B,{children:s(h,{direction:"row",gap:"size-75",justifyContent:"start",alignItems:"center",children:[e(P,{svg:e(I.ExternalLinkOutline,{})}),e(K,{children:"Go to example"})]})},"gotoExample")})})}function Mg(n){const{output:a,error:l,startTime:t,endTime:i,annotations:r,displayFullText:o,setDialog:c}=n;if(l)return e(Hr,{error:l});const d=r!=null&&r.edges.length?r.edges.map(g=>g.annotation):[];return s(h,{direction:"column",gap:"size-100",height:"100%",justifyContent:"space-between",children:[e(cl,{children:e(tl,{json:a,disableTitle:!0,space:o?2:0})}),s("ul",{css:C`
|
|
3186
3186
|
display: flex;
|
|
3187
3187
|
flex-direction: row;
|
|
3188
3188
|
gap: var(--ac-global-dimension-static-size-100);
|
|
3189
3189
|
align-items: center;
|
|
3190
3190
|
flex-wrap: wrap;
|
|
3191
|
-
`,children:[e("li",{children:e(Gr,{startTime:t,endTime:i})},"run-latency"),d.map(g=>e("li",{children:e(ia,{annotation:g,extra:g.trace&&e(F,{paddingTop:"size-100",children:s("div",{css:Ag,children:[e(P,{svg:e(I.InfoOutline,{})}),e("span",{children:"Click to view evaluator trace"})]})}),children:e(xn,{annotation:g,onClick:()=>{const f=g.trace;f&&u.startTransition(()=>{c(e(Wr,{traceId:f.traceId,projectId:f.projectId,title:`Evaluator Trace: ${g.name}`}))})}})})},g.id))]})]})}function Ng(n){return s("div",{css:qr,children:[n.children,e("div",{css:Ur,className:"controls",children:n.controls})]})}function Hr({error:n}){return s(h,{direction:"row",gap:"size-50",alignItems:"center",children:[e(P,{svg:e(I.AlertCircleOutline,{}),color:"danger"}),e(K,{color:"danger",children:n})]})}function Gr({startTime:n,endTime:a}){const l=u.useMemo(()=>{let t=null;return n&&a&&(t=new Date(a).getTime()-new Date(n).getTime()),t},[n,a]);return l===null?null:e(we,{latencyMs:l})}function
|
|
3191
|
+
`,children:[e("li",{children:e(Gr,{startTime:t,endTime:i})},"run-latency"),d.map(g=>e("li",{children:e(ia,{annotation:g,extra:g.trace&&e(F,{paddingTop:"size-100",children:s("div",{css:Ag,children:[e(P,{svg:e(I.InfoOutline,{})}),e("span",{children:"Click to view evaluator trace"})]})}),children:e(xn,{annotation:g,onClick:()=>{const f=g.trace;f&&u.startTransition(()=>{c(e(Wr,{traceId:f.traceId,projectId:f.projectId,title:`Evaluator Trace: ${g.name}`}))})}})})},g.id))]})]})}function Ng(n){return s("div",{css:qr,children:[n.children,e("div",{css:Ur,className:"controls",children:n.controls})]})}function Hr({error:n}){return s(h,{direction:"row",gap:"size-50",alignItems:"center",children:[e(P,{svg:e(I.AlertCircleOutline,{}),color:"danger"}),e(K,{color:"danger",children:n})]})}function Gr({startTime:n,endTime:a}){const l=u.useMemo(()=>{let t=null;return n&&a&&(t=new Date(a).getTime()-new Date(n).getTime()),t},[n,a]);return l===null?null:e(we,{latencyMs:l})}function Ll(){return s(h,{direction:"row",gap:"size-50",children:[e(P,{svg:e(I.MinusCircleOutline,{}),color:"grey-800"}),e(K,{color:"text-700",children:"not run"})]})}function Vg({getValue:n}){const a=n();return e(cl,{children:e(tl,{json:a,space:2})})}function cl({children:n}){return e("div",{css:C`
|
|
3192
3192
|
max-height: 300px;
|
|
3193
3193
|
overflow-y: auto;
|
|
3194
|
-
`,children:n})}function zg({selectedExample:n,datasetId:a,experimentInfoById:l}){return e(
|
|
3194
|
+
`,children:n})}function zg({selectedExample:n,datasetId:a,experimentInfoById:l}){return e(H,{title:`Comparing Experiments for Example: ${n.id}`,size:"fullscreen",extra:e(Rg,{datasetId:a,exampleId:n.id}),children:s(Xe,{direction:"vertical",autoSaveId:"example-compare-panel-group",children:[e(ue,{defaultSize:100,children:e("div",{css:C`
|
|
3195
3195
|
overflow-y: auto;
|
|
3196
3196
|
height: 100%;
|
|
3197
|
-
`,children:e(F,{overflow:"hidden",padding:"size-200",children:s(h,{direction:"row",gap:"size-200",flex:"1 1 auto",children:[e(F,{width:"50%",children:e(V,{title:"Input"
|
|
3197
|
+
`,children:e(F,{overflow:"hidden",padding:"size-200",children:s(h,{direction:"row",gap:"size-200",flex:"1 1 auto",children:[e(F,{width:"50%",children:e(V,{title:"Input",...$a,bodyStyle:{padding:0,maxHeight:"300px",overflowY:"auto"},extra:e(le,{text:JSON.stringify(n.input)}),children:e(fn,{value:JSON.stringify(n.input,null,2)})})}),e(F,{width:"50%",children:e(V,{title:"Reference Output",...$a,extra:e(le,{text:JSON.stringify(n.input)}),bodyStyle:{padding:0,maxHeight:"300px",overflowY:"auto"},children:e(fn,{value:JSON.stringify(n.referenceOutput,null,2)})})})]})})})}),e(Ye,{css:Kn}),e(ue,{defaultSize:200,children:s(h,{direction:"column",height:"100%",children:[e(F,{paddingStart:"size-200",paddingEnd:"size-200",paddingTop:"size-100",paddingBottom:"size-100",borderBottomColor:"dark",borderBottomWidth:"thin",flex:"none",children:e(re,{level:2,children:"Experiments"})}),e("div",{css:C`
|
|
3198
3198
|
overflow-y: auto;
|
|
3199
3199
|
height: 100%;
|
|
3200
3200
|
padding: var(--ac-global-dimension-static-size-200);
|
|
@@ -3202,7 +3202,7 @@ fragment ExperimentsTableFragment_2HEEH6 on Dataset {
|
|
|
3202
3202
|
display: flex;
|
|
3203
3203
|
flex-direction: column;
|
|
3204
3204
|
gap: var(--ac-global-dimension-static-size-200);
|
|
3205
|
-
`,children:n.runComparisonItems.map(t=>{const i=l[t.experimentId];return e("li",{children:e(V,{
|
|
3205
|
+
`,children:n.runComparisonItems.map(t=>{const i=l[t.experimentId];return e("li",{children:e(V,{...$a,title:i==null?void 0:i.name,titleExtra:e(xa,{sequenceNumber:(i==null?void 0:i.sequenceNumber)||0}),children:e("ul",{children:t.runs.map((r,o)=>{var c;return e("li",{children:s(h,{direction:"row",children:[e(F,{flex:!0,children:r.error?e(F,{padding:"size-200",children:e(Hr,{error:r.error})}):e(fn,{value:JSON.stringify(r.output,null,2)})}),s(In,{width:"size-3000",children:[e(Gr,{startTime:r.startTime,endTime:r.endTime}),e("ul",{css:C`
|
|
3206
3206
|
margin-top: var(
|
|
3207
3207
|
--ac-global-dimension-static-size-100
|
|
3208
3208
|
);
|
|
@@ -3213,12 +3213,12 @@ fragment ExperimentsTableFragment_2HEEH6 on Dataset {
|
|
|
3213
3213
|
gap: var(
|
|
3214
3214
|
--ac-global-dimension-static-size-100
|
|
3215
3215
|
);
|
|
3216
|
-
`,children:(c=r.annotations)==null?void 0:c.edges.map(d=>e("li",{children:e(xn,{annotation:d.annotation})},d.annotation.id))})]})]})},o)})})})},t.experimentId)})})})]})})]})})}function Wr({traceId:n,projectId:a,title:l}){const t=
|
|
3216
|
+
`,children:(c=r.annotations)==null?void 0:c.edges.map(d=>e("li",{children:e(xn,{annotation:d.annotation})},d.annotation.id))})]})]})},o)})})})},t.experimentId)})})})]})})]})})}function Wr({traceId:n,projectId:a,title:l}){const t=Y();return e(H,{title:l,size:"fullscreen",extra:e(M,{variant:"default",onClick:()=>t(`/projects/${a}/traces/${n}`),children:"View Trace in Project"}),children:e(dl,{traceId:n,projectId:a})})}const Jr={argumentDefinitions:[],kind:"Fragment",metadata:null,name:"ExperimentMultiSelector__experiments",selections:[{alias:null,args:null,concreteType:"ExperimentConnection",kind:"LinkedField",name:"experiments",plural:!1,selections:[{alias:null,args:null,concreteType:"ExperimentEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"experiment",args:null,concreteType:"Experiment",kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"sequenceNumber",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"createdAt",storageKey:null}],storageKey:null}],storageKey:null}],storageKey:null}],type:"Dataset",abstractKey:null};Jr.hash="1aa376b1e9425f49268ac231dc2c0412";function $g(n){const{dataset:a,selectedExperimentIds:l,onChange:t,label:i,validationState:r,description:o,errorMessage:c,...d}=n,g=D.useFragment(Jr,a),f=u.useMemo(()=>g.experiments.edges.map(y=>y.experiment),[g]),m=f.length===0,p=u.useMemo(()=>{if(m)return"No experiments";const y=l.length;return y>0?`${y} experiment${y>1?"s":""}`:"No experiments selected"},[l,m]);return e(la,{label:i,isDisabled:m,validationState:r,description:o,errorMessage:c,children:e(Za,{isDisabled:m,...d,menu:e(na,{selectionMode:"multiple",onSelectionChange:y=>{t(Array.from(y))},selectedKeys:new Set(l),children:f.map(y=>e(B,{textValue:y.name,children:s(h,{direction:"column",gap:"size-50",children:[s(h,{direction:"row",gap:"size-100",children:[e(xa,{sequenceNumber:y.sequenceNumber}),e(K,{children:y.name})]}),e(K,{textSize:"small",color:"text-700",children:new Date(y.createdAt).toLocaleString()})]})},y.id))}),triggerProps:{placement:"bottom start"},children:p})})}function sf(){const n=Cn(),[a,l]=u.useState(!1),[t,i]=fa(),r=t.getAll("experimentId"),o=r.length>0;return s("main",{css:C`
|
|
3217
3217
|
height: 100%;
|
|
3218
3218
|
display: flex;
|
|
3219
3219
|
flex-direction: column;
|
|
3220
3220
|
overflow: hidden;
|
|
3221
|
-
`,children:[e(F,{padding:"size-200",borderBottomColor:"dark",borderBottomWidth:"thin",flex:"none",children:s(h,{direction:"column",gap:"size-100",children:[e(re,{level:1,children:"Compare Experiments"}),s(h,{direction:"row",justifyContent:"space-between",alignItems:"end",children:[e($g,{dataset:n.dataset,selectedExperimentIds:r,label:"experiments",onChange:c=>{u.startTransition(()=>{t.delete("experimentId"),c.forEach(d=>{t.append("experimentId",d)}),i(t)})}}),e(
|
|
3221
|
+
`,children:[e(F,{padding:"size-200",borderBottomColor:"dark",borderBottomWidth:"thin",flex:"none",children:s(h,{direction:"column",gap:"size-100",children:[e(re,{level:1,children:"Compare Experiments"}),s(h,{direction:"row",justifyContent:"space-between",alignItems:"end",children:[e($g,{dataset:n.dataset,selectedExperimentIds:r,label:"experiments",onChange:c=>{u.startTransition(()=>{t.delete("experimentId"),c.forEach(d=>{t.append("experimentId",d)}),i(t)})}}),e(Mn,{onChange:c=>{l(c)},defaultSelected:!1,labelPlacement:"start",children:"Full Text"})]})]})}),o?e(u.Suspense,{fallback:e(fe,{}),children:e(_g,{datasetId:n.dataset.id,experimentIds:r,displayFullText:a})}):e(F,{padding:"size-200",children:e(ne,{variant:"info",title:"No Experiment Selected",children:"Please select one or more experiments."})})]})}const Zr=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"id"}],a=[{kind:"Variable",name:"id",variableName:"id"}],l={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},t={alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null};return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"experimentCompareLoaderQuery",selections:[{alias:"dataset",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[l,{kind:"InlineFragment",selections:[t,{args:null,kind:"FragmentSpread",name:"ExperimentMultiSelector__experiments"}],type:"Dataset",abstractKey:null}],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"experimentCompareLoaderQuery",selections:[{alias:"dataset",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},l,{kind:"InlineFragment",selections:[t,{alias:null,args:null,concreteType:"ExperimentConnection",kind:"LinkedField",name:"experiments",plural:!1,selections:[{alias:null,args:null,concreteType:"ExperimentEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"experiment",args:null,concreteType:"Experiment",kind:"LinkedField",name:"node",plural:!1,selections:[l,t,{alias:null,args:null,kind:"ScalarField",name:"sequenceNumber",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"createdAt",storageKey:null}],storageKey:null}],storageKey:null}],storageKey:null}],type:"Dataset",abstractKey:null}],storageKey:null}]},params:{cacheID:"7e89f99f940098a21985137aae870de7",id:null,metadata:{},name:"experimentCompareLoaderQuery",operationKind:"query",text:`query experimentCompareLoaderQuery(
|
|
3222
3222
|
$id: GlobalID!
|
|
3223
3223
|
) {
|
|
3224
3224
|
dataset: node(id: $id) {
|
|
@@ -3244,7 +3244,7 @@ fragment ExperimentMultiSelector__experiments on Dataset {
|
|
|
3244
3244
|
}
|
|
3245
3245
|
}
|
|
3246
3246
|
}
|
|
3247
|
-
`}}}();Zr.hash="fa02088830fd16688f0f2fba9a0009eb";async function
|
|
3247
|
+
`}}}();Zr.hash="fa02088830fd16688f0f2fba9a0009eb";async function of(n){const{datasetId:a}=n.params;return await D.fetchQuery(xe,Zr,{id:a}).toPromise()}const Xr=function(){var n={defaultValue:null,kind:"LocalArgument",name:"description"},a={defaultValue:null,kind:"LocalArgument",name:"expiresAt"},l={defaultValue:null,kind:"LocalArgument",name:"name"},t=[{fields:[{kind:"Variable",name:"description",variableName:"description"},{kind:"Variable",name:"expiresAt",variableName:"expiresAt"},{kind:"Variable",name:"name",variableName:"name"}],kind:"ObjectValue",name:"input"}],i={alias:null,args:null,kind:"ScalarField",name:"jwt",storageKey:null},r={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},o={alias:null,args:null,concreteType:"SystemApiKey",kind:"LinkedField",name:"apiKey",plural:!1,selections:[r],storageKey:null};return{fragment:{argumentDefinitions:[n,a,l],kind:"Fragment",metadata:null,name:"APIKeysCardCreateSystemAPIKeyMutation",selections:[{alias:null,args:t,concreteType:"CreateSystemApiKeyMutationPayload",kind:"LinkedField",name:"createSystemApiKey",plural:!1,selections:[i,{alias:null,args:null,concreteType:"Query",kind:"LinkedField",name:"query",plural:!1,selections:[{args:null,kind:"FragmentSpread",name:"SystemAPIKeysTableFragment"}],storageKey:null},o],storageKey:null}],type:"Mutation",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[l,n,a],kind:"Operation",name:"APIKeysCardCreateSystemAPIKeyMutation",selections:[{alias:null,args:t,concreteType:"CreateSystemApiKeyMutationPayload",kind:"LinkedField",name:"createSystemApiKey",plural:!1,selections:[i,{alias:null,args:null,concreteType:"Query",kind:"LinkedField",name:"query",plural:!1,selections:[{alias:null,args:null,concreteType:"SystemApiKey",kind:"LinkedField",name:"systemApiKeys",plural:!0,selections:[r,{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"description",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"createdAt",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"expiresAt",storageKey:null}],storageKey:null}],storageKey:null},o],storageKey:null}]},params:{cacheID:"799e8f0a627c6ae06e2a87c051d299d0",id:null,metadata:{},name:"APIKeysCardCreateSystemAPIKeyMutation",operationKind:"mutation",text:`mutation APIKeysCardCreateSystemAPIKeyMutation(
|
|
3248
3248
|
$name: String!
|
|
3249
3249
|
$description: String = null
|
|
3250
3250
|
$expiresAt: DateTime = null
|
|
@@ -3317,7 +3317,7 @@ fragment SystemAPIKeysTableFragment on Query {
|
|
|
3317
3317
|
expiresAt
|
|
3318
3318
|
}
|
|
3319
3319
|
}
|
|
3320
|
-
`}};ns.hash="de0fc04de739f0adfcbdeaff28b16265";const as={argumentDefinitions:[],kind:"Fragment",metadata:{refetch:{connection:null,fragmentPathInResult:[],operation:ns}},name:"SystemAPIKeysTableFragment",selections:[{alias:null,args:null,concreteType:"SystemApiKey",kind:"LinkedField",name:"systemApiKeys",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"description",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"createdAt",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"expiresAt",storageKey:null}],storageKey:null}],type:"Query",abstractKey:null};as.hash="de0fc04de739f0adfcbdeaff28b16265";function Og({query:n}){const[a,l]=D.useRefetchableFragment(as,n),t=ce(),i=oe(),[r]=D.useMutation(es),o=u.useCallback(p=>{r({variables:{input:{id:p}},onCompleted:()=>{i({title:"System key deleted",message:"The system key has been deleted and is no longer active."}),u.startTransition(()=>{l({},{fetchPolicy:"network-only"})})},onError:y=>{t({title:"Error deleting system key",message:y.message})}})},[r,t,i,l]),c=u.useMemo(()=>[...a.systemApiKeys],[a]),d=u.useMemo(()=>[{header:"Name",accessorKey:"name"},{header:"Description",accessorKey:"description",cell:me},{header:"Created At",accessorKey:"createdAt",cell:Fe},{header:"Expires At",accessorKey:"expiresAt",cell:Fe},{header:"",accessorKey:"id",size:10,cell:({row:y})=>e(h,{direction:"row",justifyContent:"end",width:"100%",children:e(
|
|
3320
|
+
`}};ns.hash="de0fc04de739f0adfcbdeaff28b16265";const as={argumentDefinitions:[],kind:"Fragment",metadata:{refetch:{connection:null,fragmentPathInResult:[],operation:ns}},name:"SystemAPIKeysTableFragment",selections:[{alias:null,args:null,concreteType:"SystemApiKey",kind:"LinkedField",name:"systemApiKeys",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"description",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"createdAt",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"expiresAt",storageKey:null}],storageKey:null}],type:"Query",abstractKey:null};as.hash="de0fc04de739f0adfcbdeaff28b16265";function Og({query:n}){const[a,l]=D.useRefetchableFragment(as,n),t=ce(),i=oe(),[r]=D.useMutation(es),o=u.useCallback(p=>{r({variables:{input:{id:p}},onCompleted:()=>{i({title:"System key deleted",message:"The system key has been deleted and is no longer active."}),u.startTransition(()=>{l({},{fetchPolicy:"network-only"})})},onError:y=>{t({title:"Error deleting system key",message:y.message})}})},[r,t,i,l]),c=u.useMemo(()=>[...a.systemApiKeys],[a]),d=u.useMemo(()=>[{header:"Name",accessorKey:"name"},{header:"Description",accessorKey:"description",cell:me},{header:"Created At",accessorKey:"createdAt",cell:Fe},{header:"Expires At",accessorKey:"expiresAt",cell:Fe},{header:"",accessorKey:"id",size:10,cell:({row:y})=>e(h,{direction:"row",justifyContent:"end",width:"100%",children:e(il,{handleDelete:()=>{o(y.original.id)}})}),meta:{textAlign:"right"}}],[o]),g=he({columns:d,data:c,getCoreRowModel:ke()}),f=g.getRowModel().rows,m=g.getRowModel().rows.length===0;return s("table",{css:We,children:[e("thead",{children:g.getHeaderGroups().map(p=>e("tr",{children:p.headers.map(y=>e("th",{colSpan:y.colSpan,children:y.isPlaceholder?null:s("div",{className:y.column.getCanSort()?"cursor-pointer":"",onClick:y.column.getToggleSortingHandler(),style:{left:y.getStart(),width:y.getSize()},children:[Z(y.column.columnDef.header,y.getContext()),y.column.getIsSorted()?e(P,{className:"sort-icon",svg:y.column.getIsSorted()==="asc"?e(I.ArrowUpFilled,{}):e(I.ArrowDownFilled,{})}):null]})},y.id))},p.id))}),m?e(Je,{message:"No Keys"}):e("tbody",{children:f.map(p=>e("tr",{children:p.getVisibleCells().map(y=>e("td",{children:Z(y.column.columnDef.cell,y.getContext())},y.id))},p.id))})]})}const ls=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"input"}],a=[{alias:null,args:[{kind:"Variable",name:"input",variableName:"input"}],concreteType:"DeleteApiKeyMutationPayload",kind:"LinkedField",name:"deleteUserApiKey",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"apiKeyId",storageKey:null}],storageKey:null}];return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"UserAPIKeysTableDeleteAPIKeyMutation",selections:a,type:"Mutation",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"UserAPIKeysTableDeleteAPIKeyMutation",selections:a},params:{cacheID:"d137498515ff43864f5525b3c1847376",id:null,metadata:{},name:"UserAPIKeysTableDeleteAPIKeyMutation",operationKind:"mutation",text:`mutation UserAPIKeysTableDeleteAPIKeyMutation(
|
|
3321
3321
|
$input: DeleteApiKeyInput!
|
|
3322
3322
|
) {
|
|
3323
3323
|
deleteUserApiKey(input: $input) {
|
|
@@ -3341,7 +3341,7 @@ fragment UserAPIKeysTableFragment on Query {
|
|
|
3341
3341
|
}
|
|
3342
3342
|
}
|
|
3343
3343
|
}
|
|
3344
|
-
`}};ts.hash="c2b3a579bcb0ba915523ecb35cae3b44";const is={argumentDefinitions:[],kind:"Fragment",metadata:{refetch:{connection:null,fragmentPathInResult:[],operation:ts}},name:"UserAPIKeysTableFragment",selections:[{alias:null,args:null,concreteType:"UserApiKey",kind:"LinkedField",name:"userApiKeys",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"description",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"createdAt",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"expiresAt",storageKey:null},{alias:null,args:null,concreteType:"User",kind:"LinkedField",name:"user",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"email",storageKey:null}],storageKey:null}],storageKey:null}],type:"Query",abstractKey:null};is.hash="c2b3a579bcb0ba915523ecb35cae3b44";const
|
|
3344
|
+
`}};ts.hash="c2b3a579bcb0ba915523ecb35cae3b44";const is={argumentDefinitions:[],kind:"Fragment",metadata:{refetch:{connection:null,fragmentPathInResult:[],operation:ts}},name:"UserAPIKeysTableFragment",selections:[{alias:null,args:null,concreteType:"UserApiKey",kind:"LinkedField",name:"userApiKeys",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"description",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"createdAt",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"expiresAt",storageKey:null},{alias:null,args:null,concreteType:"User",kind:"LinkedField",name:"user",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"email",storageKey:null}],storageKey:null}],storageKey:null}],type:"Query",abstractKey:null};is.hash="c2b3a579bcb0ba915523ecb35cae3b44";const Pl=70;function Qg({query:n}){const[a,l]=D.useRefetchableFragment(is,n),t=ce(),i=oe(),[r]=D.useMutation(ls),o=u.useCallback(p=>{r({variables:{input:{id:p}},onCompleted:()=>{i({title:"User key deleted",message:"The user key has been deleted and is no longer active."}),u.startTransition(()=>{l({},{fetchPolicy:"network-only"})})},onError:y=>{t({title:"Error deleting user key",message:y.message})}})},[r,t,i,l]),c=u.useMemo(()=>[...a.userApiKeys],[a]),d=u.useMemo(()=>[{header:"Name",accessorKey:"name",size:100,cell:me},{header:"Description",accessorKey:"description",cell:me},{header:"Created At",accessorKey:"createdAt",size:Pl,cell:Fe},{header:"Expires At",accessorKey:"expiresAt",size:Pl,cell:Fe},{header:"User",size:120,accessorKey:"user.email",cell:me},{header:"",accessorKey:"id",size:10,cell:({row:y})=>e(h,{direction:"row",justifyContent:"end",width:"100%",children:e(il,{handleDelete:()=>{o(y.original.id)}})}),meta:{textAlign:"right"}}],[o]),g=he({columns:d,data:c,getCoreRowModel:ke()}),f=g.getRowModel().rows,m=g.getRowModel().rows.length===0;return s("table",{css:We,children:[e("thead",{children:g.getHeaderGroups().map(p=>e("tr",{children:p.headers.map(y=>e("th",{colSpan:y.colSpan,children:y.isPlaceholder?null:s("div",{className:y.column.getCanSort()?"cursor-pointer":"",onClick:y.column.getToggleSortingHandler(),style:{left:y.getStart(),width:y.getSize()},children:[Z(y.column.columnDef.header,y.getContext()),y.column.getIsSorted()?e(P,{className:"sort-icon",svg:y.column.getIsSorted()==="asc"?e(I.ArrowUpFilled,{}):e(I.ArrowDownFilled,{})}):null]})},y.id))},p.id))}),m?e(Je,{message:"No Keys"}):e("tbody",{children:f.map(p=>e("tr",{children:p.getVisibleCells().map(y=>e("td",{children:Z(y.column.columnDef.cell,y.getContext())},y.id))},p.id))})]})}function jg(){const n=D.useLazyLoadQuery(Yr,{},{fetchPolicy:"network-only"});return s(Te,{children:[e(J,{title:"System Keys",name:"System Keys",children:e(Og,{query:n})}),e(J,{title:"User Keys",name:"User Keys",children:e(Qg,{query:n})})]})}function qg(){const[n,a]=u.useState(null),l=ce(),t=d=>{a(e(st,{jwt:d}))},[i,r]=D.useMutation(Xr),o=u.useCallback(d=>{i({variables:{...d,expiresAt:d.expiresAt||null},onCompleted:g=>{t(g.createSystemApiKey.jwt)},onError:g=>{l({title:"Error creating system key",message:g.message})}})},[i,l]),c=()=>{a(e(ot,{onSubmit:o,isCommitting:r,defaultName:"System"}))};return s("div",{children:[e(Wa,{title:"API Keys",variant:"compact",extra:e(M,{variant:"default",size:"compact",icon:e(P,{svg:e(I.PlusCircleOutline,{})}),onClick:c,children:"System Key"}),children:e(u.Suspense,{fallback:e(F,{padding:"size-100",children:e(fe,{})}),children:e(jg,{})})}),e(W,{onDismiss:()=>{a(null)},children:n})]})}const rs={fragment:{argumentDefinitions:[],kind:"Fragment",metadata:null,name:"UsersCardQuery",selections:[{args:null,kind:"FragmentSpread",name:"UsersTable_users"}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[],kind:"Operation",name:"UsersCardQuery",selections:[{alias:null,args:null,concreteType:"UserConnection",kind:"LinkedField",name:"users",plural:!1,selections:[{alias:null,args:null,concreteType:"UserEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"user",args:null,concreteType:"User",kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"email",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"username",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"createdAt",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"authMethod",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"profilePictureUrl",storageKey:null},{alias:null,args:null,concreteType:"UserRole",kind:"LinkedField",name:"role",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null}],storageKey:null}],storageKey:null}],storageKey:null}],storageKey:null}]},params:{cacheID:"926faf98cad4bc437a919677347e277c",id:null,metadata:{},name:"UsersCardQuery",operationKind:"query",text:`query UsersCardQuery {
|
|
3345
3345
|
...UsersTable_users
|
|
3346
3346
|
}
|
|
3347
3347
|
|
|
@@ -3372,7 +3372,7 @@ fragment UsersTable_users on Query {
|
|
|
3372
3372
|
}
|
|
3373
3373
|
}
|
|
3374
3374
|
}
|
|
3375
|
-
`}}}();ss.hash="97d1aefa41e8831e57b6bb0d1a078a7c";function Ug({onNewUserCreated:n,onNewUserCreationError:a,onDismiss:l}){const[t,i]=D.useMutation(ss),r=u.useCallback(o=>{t({variables:{input:{email:o.email,username:o.username,password:o.password,role:o.role}},onCompleted:c=>{n(c.createUser.user.email)},onError:c=>{a(c)}})},[t,n,a]);return e(W,{onDismiss:l,isDismissable:!0,type:"modal",isKeyboardDismissDisabled:!0,children:e(
|
|
3375
|
+
`}}}();ss.hash="97d1aefa41e8831e57b6bb0d1a078a7c";function Ug({onNewUserCreated:n,onNewUserCreationError:a,onDismiss:l}){const[t,i]=D.useMutation(ss),r=u.useCallback(o=>{t({variables:{input:{email:o.email,username:o.username,password:o.password,role:o.role}},onCompleted:c=>{n(c.createUser.user.email)},onError:c=>{a(c)}})},[t,n,a]);return e(W,{onDismiss:l,isDismissable:!0,type:"modal",isKeyboardDismissDisabled:!0,children:e(H,{title:"Add user",children:e(sd,{onSubmit:r,isSubmitting:i})})})}const os={fragment:{argumentDefinitions:[],kind:"Fragment",metadata:null,name:"UsersTableQuery",selections:[{args:null,kind:"FragmentSpread",name:"UsersTable_users"}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[],kind:"Operation",name:"UsersTableQuery",selections:[{alias:null,args:null,concreteType:"UserConnection",kind:"LinkedField",name:"users",plural:!1,selections:[{alias:null,args:null,concreteType:"UserEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"user",args:null,concreteType:"User",kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"email",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"username",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"createdAt",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"authMethod",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"profilePictureUrl",storageKey:null},{alias:null,args:null,concreteType:"UserRole",kind:"LinkedField",name:"role",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null}],storageKey:null}],storageKey:null}],storageKey:null}],storageKey:null}]},params:{cacheID:"d3f85064b63f026a47a8ef139638b933",id:null,metadata:{},name:"UsersTableQuery",operationKind:"query",text:`query UsersTableQuery {
|
|
3376
3376
|
...UsersTable_users
|
|
3377
3377
|
}
|
|
3378
3378
|
|
|
@@ -3398,21 +3398,21 @@ fragment UsersTable_users on Query {
|
|
|
3398
3398
|
) {
|
|
3399
3399
|
deleteUsers(input: $input)
|
|
3400
3400
|
}
|
|
3401
|
-
`}}}();cs.hash="a718ceab0ec0a7d461f6cd5e5b178a1f";function Bg({userId:n,onDeleted:a,onClose:l}){const[t,i]=D.useMutation(cs),r=oe(),o=ce(),c=u.useCallback(()=>{t({variables:{input:{userIds:[n]}},onCompleted:()=>{r({title:"User deleted",message:"User has been deleted."}),a(),l()},onError:d=>{o({title:"Failed to delete user",message:d.message})}})},[t,o,r,l,a,n]);return s(
|
|
3401
|
+
`}}}();cs.hash="a718ceab0ec0a7d461f6cd5e5b178a1f";function Bg({userId:n,onDeleted:a,onClose:l}){const[t,i]=D.useMutation(cs),r=oe(),o=ce(),c=u.useCallback(()=>{t({variables:{input:{userIds:[n]}},onCompleted:()=>{r({title:"User deleted",message:"User has been deleted."}),a(),l()},onError:d=>{o({title:"Failed to delete user",message:d.message})}})},[t,o,r,l,a,n]);return s(H,{title:"Delete User",isDismissable:!0,onDismiss:l,children:[e(F,{padding:"size-200",children:e(K,{color:"danger",children:"Are you sure you want to delete this user? This action cannot be undone."})}),e(F,{paddingEnd:"size-200",paddingTop:"size-100",paddingBottom:"size-100",borderTopColor:"light",borderTopWidth:"thin",children:s(h,{direction:"row",justifyContent:"end",gap:"size-100",children:[e(M,{variant:"default",onClick:l,children:"Cancel"}),e(M,{variant:"danger",onClick:()=>{c()},disabled:i,children:"Delete user"})]})})]})}const us=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"input"}],a=[{alias:null,args:[{kind:"Variable",name:"input",variableName:"input"}],concreteType:"UserMutationPayload",kind:"LinkedField",name:"patchUser",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null}],storageKey:null}];return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"ResetPasswordDialogMutation",selections:a,type:"Mutation",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"ResetPasswordDialogMutation",selections:a},params:{cacheID:"6ccff8dd53d97eeb41f656bcd2758da1",id:null,metadata:{},name:"ResetPasswordDialogMutation",operationKind:"mutation",text:`mutation ResetPasswordDialogMutation(
|
|
3402
3402
|
$input: PatchUserInput!
|
|
3403
3403
|
) {
|
|
3404
3404
|
patchUser(input: $input) {
|
|
3405
3405
|
__typename
|
|
3406
3406
|
}
|
|
3407
3407
|
}
|
|
3408
|
-
`}}}();us.hash="85b22da61ec094c28e97db2759622b69";const
|
|
3408
|
+
`}}}();us.hash="85b22da61ec094c28e97db2759622b69";const Wn=4;function Hg({userId:n,onClose:a}){const l=ce(),t=oe(),[i,r]=D.useMutation(us),{control:o,handleSubmit:c,formState:{isDirty:d}}=Ie({defaultValues:{newPassword:"",confirmPassword:""}}),g=u.useCallback(f=>{i({variables:{input:{userId:n,newPassword:f.newPassword}},onCompleted:()=>{t({title:"Password reset",message:"Users password has been reset."}),a()},onError:m=>{l({title:"Failed to reset password",message:m.message})}})},[i,l,t,a,n]);return e(H,{title:"Reset Password",isDismissable:!0,onDismiss:a,children:e(ye,{children:s(F,{padding:"size-200",children:[e(G,{name:"newPassword",control:o,rules:{required:"Password is required",minLength:{value:Wn,message:`Password must be at least ${Wn} characters`}},render:({field:{name:f,onChange:m,onBlur:p,value:y},fieldState:{invalid:b,error:k}})=>e(X,{label:"New Password",type:"password",isRequired:!0,description:`Password must be at least ${Wn} characters`,name:f,errorMessage:k==null?void 0:k.message,validationState:b?"invalid":"valid",onChange:m,onBlur:p,defaultValue:y})}),e(G,{name:"confirmPassword",control:o,rules:{required:"Password is required",minLength:{value:Wn,message:`Password must be at least ${Wn} characters`},validate:(f,m)=>f===m.newPassword||"Passwords do not match"},render:({field:{name:f,onChange:m,onBlur:p,value:y},fieldState:{invalid:b,error:k}})=>e(X,{label:"Confirm Password",isRequired:!0,type:"password",description:"Confirm the new password",name:f,errorMessage:k==null?void 0:k.message,validationState:b?"invalid":"valid",onChange:m,onBlur:p,defaultValue:y})}),e(F,{paddingTop:"size-200",children:e(h,{direction:"row",gap:"size-100",justifyContent:"end",children:e(M,{variant:d?"primary":"default",type:"submit",disabled:r,onClick:c(g),children:r?"Resetting...":"Reset Password"})})})]})})})}function Gg(n){return n==="LOCAL"}function Wg(n){const{userId:a,onUserDeleted:l,authMethod:t}=n,[i,r]=u.useState(null),o=u.useCallback(()=>{r(e(Bg,{userId:a,onClose:()=>r(null),onDeleted:()=>{l(),r(null)}}))},[a,l]),c=u.useCallback(()=>{r(e(Hg,{userId:a,onClose:()=>r(null)}))},[a]),d=u.useMemo(()=>{const g=e(B,{children:s(h,{direction:"row",gap:"size-75",justifyContent:"start",alignItems:"center",children:[e(P,{svg:e(I.TrashOutline,{})}),e(K,{children:"Delete"})]})},"deleteUser"),f=e(B,{children:s(h,{direction:"row",gap:"size-75",justifyContent:"start",alignItems:"center",children:[e(P,{svg:e(I.Refresh,{})}),e(K,{children:"Reset Password"})]})},"resetPassword"),m=[g];return Gg(t)&&m.push(f),m},[t]);return s("div",{onClick:g=>{g.preventDefault(),g.stopPropagation()},children:[e(Be,{align:"end","aria-label":"User Actions",buttonSize:"compact",onAction:g=>{switch(g){case"deleteUser":o();break;case"resetPassword":c();break}},children:d}),e(W,{type:"modal",isDismissable:!0,onDismiss:()=>r(null),children:i})]})}const ms=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"input"}],a=[{alias:null,args:[{kind:"Variable",name:"input",variableName:"input"}],concreteType:"UserMutationPayload",kind:"LinkedField",name:"patchUser",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null}],storageKey:null}];return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"UserRoleChangeDialogMutation",selections:a,type:"Mutation",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"UserRoleChangeDialogMutation",selections:a},params:{cacheID:"44e970c967f83a0b7a6bd1cbafc3a936",id:null,metadata:{},name:"UserRoleChangeDialogMutation",operationKind:"mutation",text:`mutation UserRoleChangeDialogMutation(
|
|
3409
3409
|
$input: PatchUserInput!
|
|
3410
3410
|
) {
|
|
3411
3411
|
patchUser(input: $input) {
|
|
3412
3412
|
__typename
|
|
3413
3413
|
}
|
|
3414
3414
|
}
|
|
3415
|
-
`}}}();ms.hash="468eff05b42e39b55f9aa5b9a7d2c483";function Jg({userId:n,email:a,currentRole:l,newRole:t,onRoleChanged:i,onClose:r}){const[o,c]=D.useMutation(ms),d=oe(),g=ce(),f=u.useCallback(()=>{o({variables:{input:{userId:n,newRole:t}},onCompleted:()=>{d({title:"Role Changed",message:"Users role has been changed."}),i(),r()},onError:m=>{g({title:"Failed to delete user",message:m.message})}})},[o,t,g,d,r,i,n]);return s(
|
|
3415
|
+
`}}}();ms.hash="468eff05b42e39b55f9aa5b9a7d2c483";function Jg({userId:n,email:a,currentRole:l,newRole:t,onRoleChanged:i,onClose:r}){const[o,c]=D.useMutation(ms),d=oe(),g=ce(),f=u.useCallback(()=>{o({variables:{input:{userId:n,newRole:t}},onCompleted:()=>{d({title:"Role Changed",message:"Users role has been changed."}),i(),r()},onError:m=>{g({title:"Failed to delete user",message:m.message})}})},[o,t,g,d,r,i,n]);return s(H,{title:"Confirm role change",children:[e(F,{padding:"size-200",children:s(K,{children:[`Are you sure you want to change the role for ${a} from `," ",e("b",{children:qa(l)})," to"," ",e("b",{children:qa(t)}),"?"]})}),e(F,{paddingEnd:"size-200",paddingTop:"size-100",paddingBottom:"size-100",borderTopColor:"light",borderTopWidth:"thin",children:s(h,{direction:"row",justifyContent:"end",gap:"size-100",children:[e(M,{variant:"default",onClick:r,children:"Cancel"}),e(M,{variant:"primary",onClick:()=>{f()},disabled:c,children:"Change role"})]})})]})}const Zg=55,Xg=C`
|
|
3416
3416
|
text-decoration: none;
|
|
3417
3417
|
color: var(--ac-global-color-grey-600);
|
|
3418
3418
|
font-size: 12px;
|
|
@@ -3421,7 +3421,7 @@ fragment UsersTable_users on Query {
|
|
|
3421
3421
|
}
|
|
3422
3422
|
`,Yg=C`
|
|
3423
3423
|
height: ${Zg}px;
|
|
3424
|
-
`,
|
|
3424
|
+
`,wl=n=>n.email==="admin@localhost"||n.username==="admin";function ep({query:n}){const[a,l]=u.useState(null),[t,i]=D.useRefetchableFragment(ds,n),r=u.useMemo(()=>t.users.edges.map(({user:m})=>({id:m.id,email:m.email,username:m.username,profilePictureUrl:m.profilePictureUrl,createdAt:m.createdAt,role:m.role.name,authMethod:m.authMethod})),[t]),o=u.useCallback(()=>{u.startTransition(()=>{i({},{fetchPolicy:"network-only"})})},[i]),c=u.useMemo(()=>[{header:"user",accessorKey:"username",cell:({row:m})=>s(h,{direction:"row",gap:"size-50",alignItems:"center",children:[e(dt,{name:m.original.username,profilePictureUrl:m.original.profilePictureUrl,size:20}),e("span",{children:m.original.username}),e("a",{href:`mailto:${m.original.email}`,css:Xg,children:m.original.email})]})},{header:"method",accessorKey:"authMethod",size:10,cell:({row:m})=>m.original.authMethod.toLowerCase()},{header:"role",accessorKey:"role",cell:({row:m})=>wl(m.original)?qa(m.original.role):e(dd,{includeLabel:!1,onChange:p=>{p!==m.original.role&&l(e(Jg,{onClose:()=>l(null),onRoleChanged:o,currentRole:m.original.role,newRole:p,email:m.original.email,userId:m.original.id}))},role:od(m.original.role)?m.original.role:void 0})},{header:"created at",accessorKey:"createdAt",cell:Fe},{header:"",accessorKey:"id",size:10,cell:({row:m})=>wl(m.original)?null:e(h,{direction:"row",justifyContent:"end",width:"100%",children:e(Wg,{userId:m.original.id,onUserDeleted:o,authMethod:m.original.authMethod})}),meta:{textAlign:"right"}}],[o]),d=he({columns:c,data:r,getCoreRowModel:ke(),getSortedRowModel:Rn()}),g=d.getRowModel().rows,f=d.getRowModel().rows.length===0;return s("table",{css:We,children:[e("thead",{children:d.getHeaderGroups().map(m=>e("tr",{children:m.headers.map(p=>e("th",{colSpan:p.colSpan,children:p.isPlaceholder?null:s("div",{className:p.column.getCanSort()?"cursor-pointer":"",onClick:p.column.getToggleSortingHandler(),style:{left:p.getStart(),width:p.getSize()},children:[Z(p.column.columnDef.header,p.getContext()),p.column.getIsSorted()?e(P,{className:"sort-icon",svg:p.column.getIsSorted()==="asc"?e(I.ArrowUpFilled,{}):e(I.ArrowDownFilled,{})}):null]})},p.id))},m.id))}),f?e(Je,{}):e("tbody",{children:g.map(m=>e("tr",{css:Yg,children:m.getVisibleCells().map(p=>e("td",{children:Z(p.column.columnDef.cell,p.getContext())},p.id))},m.id))}),e(W,{onDismiss:()=>l(null),isDismissable:!0,type:"modal",children:a})]})}function np(){const[n,a]=u.useState(0),[l,t]=u.useState(null),i=oe(),r=ce(),o=D.useLazyLoadQuery(rs,{},{fetchKey:n,fetchPolicy:"store-and-network"});return s(V,{title:"Users",variant:"compact",bodyStyle:{padding:0,overflowX:"auto"},extra:e(M,{onClick:()=>{t(e(Ug,{onDismiss:()=>{t(null)},onNewUserCreated:c=>{t(null),i({title:"User added",message:`User ${c} has been added.`}),a(d=>d+1)},onNewUserCreationError:c=>{r({title:"Error adding user",message:c.message})}}))},variant:"default",size:"compact",icon:e(P,{svg:e(I.PlusCircleOutline,{})}),children:"Add User"}),children:[e(u.Suspense,{fallback:e(F,{padding:"size-200",children:e(fe,{})}),children:e(ep,{query:o})}),e(W,{onDismiss:()=>{t(null)},children:l})]})}const ap=C`
|
|
3425
3425
|
overflow-y: auto;
|
|
3426
3426
|
`,lp=C`
|
|
3427
3427
|
padding: var(--ac-global-dimension-size-400);
|
|
@@ -3436,7 +3436,7 @@ fragment UsersTable_users on Query {
|
|
|
3436
3436
|
// Hacky solution to make the text fields fill the remaining space
|
|
3437
3437
|
width: calc(100% - var(--ac-global-dimension-size-600));
|
|
3438
3438
|
}
|
|
3439
|
-
`;function
|
|
3439
|
+
`;function df(){return e("main",{css:ap,children:e("div",{css:lp,children:s(h,{direction:"column",gap:"size-200",width:"100%",children:[e(V,{title:"Platform Settings",variant:"compact",children:s("form",{css:tp,children:[s(h,{direction:"row",gap:"size-100",alignItems:"end",children:[e(X,{label:"Hostname",value:ja,isReadOnly:!0,description:"Connect to Phoenix over HTTP"}),e(Oa,{text:ja})]}),s(h,{direction:"row",gap:"size-100",alignItems:"end",children:[e(X,{label:"Platform Version",isReadOnly:!0,value:ua,description:"The version of the Phoenix server"}),e(Oa,{text:ua})]}),s(h,{direction:"row",gap:"size-100",alignItems:"end",justifyContent:"center",children:[e(X,{label:"Python Version",isReadOnly:!0,value:`pip install 'arize-phoenix==${ua}'`,description:"The version of the Python client library to use to connect to this Phoenix"}),e(Oa,{text:ua})]})]})}),e(rt,{children:s(U,{children:[e(qg,{}),e(np,{})]})})]})})})}function Oa(n){return e(F,{paddingBottom:"19px",children:e(le,{text:n.text,size:"default"})})}const Al=window.Config.basename,_l={width:"100%",height:"100%",border:"none",backgroundColor:"white"};function cf(){return s("div",{css:C`
|
|
3440
3440
|
display: flex;
|
|
3441
3441
|
flex-direction: column;
|
|
3442
3442
|
flex: 1 1 auto;
|
|
@@ -3449,7 +3449,7 @@ fragment UsersTable_users on Query {
|
|
|
3449
3449
|
flex: 1 1 auto;
|
|
3450
3450
|
height: 100%;
|
|
3451
3451
|
}
|
|
3452
|
-
`,children:[e(
|
|
3452
|
+
`,children:[e(ne,{variant:"info",banner:!0,icon:e(P,{svg:e(I.InfoFilled,{})}),children:"These APIs are under active development and are subject to change."}),s(Te,{children:[e(J,{name:"REST",children:({isSelected:n})=>n&&e("iframe",{src:`${Al}/docs`,style:_l})}),e(J,{name:"GraphQL",children:({isSelected:n})=>n&&e("iframe",{src:`${Al}/graphql`,style:_l})})]})]})}function Ia({children:n}){return s("main",{css:C`
|
|
3453
3453
|
padding-top: 200px;
|
|
3454
3454
|
width: 100%;
|
|
3455
3455
|
height: 100vh;
|
|
@@ -3477,7 +3477,7 @@ fragment UsersTable_users on Query {
|
|
|
3477
3477
|
text-decoration: underline;
|
|
3478
3478
|
}
|
|
3479
3479
|
}
|
|
3480
|
-
`,children:[e("a",{href:"https://docs.arize.com/phoenix",children:"Documentation"}),"|",e("a",{href:"https://join.slack.com/t/arize-ai/shared_invite/zt-1px8dcmlf-fmThhDFD_V_48oU7ALan4Q",children:"Community"}),"|",e("a",{href:"https://twitter.com/ArizePhoenix",children:"Social"}),"|",e("a",{href:"https://github.com/Arize-ai/phoenix",children:"GitHub"}),"|",e("a",{href:"https://github.com/Arize-ai/phoenix/releases",children:`arize-phoenix v${window.Config.platformVersion}`})]})]})}function ip(n){const a=
|
|
3480
|
+
`,children:[e("a",{href:"https://docs.arize.com/phoenix",children:"Documentation"}),"|",e("a",{href:"https://join.slack.com/t/arize-ai/shared_invite/zt-1px8dcmlf-fmThhDFD_V_48oU7ALan4Q",children:"Community"}),"|",e("a",{href:"https://twitter.com/ArizePhoenix",children:"Social"}),"|",e("a",{href:"https://github.com/Arize-ai/phoenix",children:"GitHub"}),"|",e("a",{href:"https://github.com/Arize-ai/phoenix/releases",children:`arize-phoenix v${window.Config.platformVersion}`})]})]})}function ip(n){const a=Y(),{initialError:l,onSubmit:t}=n,[i,r]=u.useState(l),[o,c]=u.useState(!1),d=u.useCallback(async m=>{t==null||t(),r(null),c(!0);try{const y=await fetch("/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(m)});if(!y.ok){const b=y.status===429?"Too many requests. Please try again later.":"Invalid login";r(b);return}}catch{r("Invalid login");return}finally{c(()=>!1)}const p=cd();a(p)},[a,t,r]),{control:g,handleSubmit:f}=Ie({defaultValues:{email:"",password:""}});return s(U,{children:[i?s(F,{paddingBottom:"size-100",children:[e(ne,{variant:"danger",children:i})," "]}):null,s(ye,{children:[e(G,{name:"email",control:g,render:({field:{onChange:m,value:p}})=>e(X,{label:"Email",name:"email",isRequired:!0,type:"email",onChange:m,value:p,placeholder:"your email address"})}),s("div",{css:C`
|
|
3481
3481
|
position: relative;
|
|
3482
3482
|
a {
|
|
3483
3483
|
position: absolute;
|
|
@@ -3486,7 +3486,7 @@ fragment UsersTable_users on Query {
|
|
|
3486
3486
|
top: var(--ac-global-dimension-size-50);
|
|
3487
3487
|
font-size: 12px;
|
|
3488
3488
|
}
|
|
3489
|
-
`,children:[e(
|
|
3489
|
+
`,children:[e(G,{name:"password",control:g,render:({field:{onChange:m,value:p}})=>e(X,{label:"Password",name:"password",type:"password",isRequired:!0,onChange:m,value:p,placeholder:"your password",onKeyDown:y=>{y.key==="Enter"&&f(d)()}})}),e(Ze,{to:"/forgot-password",children:"Forgot your password?"})]}),e("div",{css:C`
|
|
3490
3490
|
margin-top: var(--ac-global-dimension-size-200);
|
|
3491
3491
|
margin-bottom: var(--ac-global-dimension-size-50);
|
|
3492
3492
|
button {
|
|
@@ -3533,7 +3533,7 @@ fragment UsersTable_users on Query {
|
|
|
3533
3533
|
&[data-provider^="aws"] {
|
|
3534
3534
|
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg width='400' height='334' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M236.578 94.824c-9.683.765-20.854 1.502-32.021 3.006-17.12 2.211-34.24 5.219-48.386 11.907-27.544 11.208-46.163 35.053-46.163 70.114 0 44.018 28.298 66.354 64.026 66.354 11.93 0 21.606-1.466 30.522-3.71 14.156-4.481 26.07-12.67 40.209-27.596 8.192 11.205 10.413 16.428 24.575 28.338 3.725 1.502 7.448 1.502 10.413-.742 8.932-7.458 24.561-20.873 32.773-28.33 3.71-3.012 2.955-7.463.739-11.204-8.198-10.435-16.381-19.401-16.381-39.506V96.324c0-28.359 2.214-54.453-18.614-73.822C261.147 6.815 234.34.86 213.5.86h-8.947c-37.965 2.247-78.169 18.635-87.122 65.629-1.462 5.955 3.012 8.198 5.989 8.962l41.677 5.224c4.471-.773 6.691-4.491 7.432-8.233 3.74-16.388 17.136-24.583 32.024-26.087h2.998c8.905 0 18.586 3.743 23.813 11.168 5.932 8.965 5.21 20.904 5.21 31.339v5.961h.004v.001zm0 43.278c0 17.162.723 30.571-8.195 45.461-5.208 10.437-14.141 17.154-23.827 19.4-1.481 0-3.698.766-5.947.766-16.371 0-26.077-12.673-26.077-31.334 0-23.856 14.159-35.056 32.023-40.277 9.687-2.241 20.86-2.982 32.021-2.982v8.966h.002z'/%3E%3Cpath d='M373.71 315.303c18.201-15.398 25.89-43.349 26.29-57.939v-2.44c0-3.255-.803-5.661-1.6-6.88-3.646-4.445-30.369-8.523-53.402-1.627-6.468 2.045-12.146 4.865-17.396 8.507-4.051 2.854-3.238 6.464.802 6.08 4.447-.823 10.126-1.208 16.594-2.048 14.159-1.18 30.742-1.592 34.784 3.662 5.642 6.87-6.468 36.868-11.749 49.838-1.593 4.065 2.03 5.696 5.677 2.847z' fill='%23FE9900'/%3E%3Cpath d='M2.008 257.364c52.17 47.404 120.925 75.775 197.791 75.775 47.725 0 102.727-13.381 145.199-38.899 5.676-3.27 11.316-6.912 16.565-10.952 7.286-5.25.817-13.38-6.463-10.147-3.229 1.215-6.873 2.857-10.103 4.066-46.539 18.248-95.441 26.76-140.762 26.76-72.008 0-141.56-19.87-197.786-52.684-5.259-2.822-8.907 2.428-4.441 6.081z' fill='%23FE9900'/%3E%3C/svg%3E");
|
|
3535
3535
|
}
|
|
3536
|
-
`,"data-provider":n})}):null}function dl(){return s("svg",{width:"253",height:"63",viewBox:"0 0 682 169",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[s("g",{clipPath:"url(#clip0_290_1904)",children:[e("path",{d:"M147.458 105.593C147.022 103.63 146.028 101.824 144.492 100.222C143.901 99.6064 143.244 99.0233 142.529 98.4978C142.184 98.2432 141.815 98.005 141.437 97.7669C140.969 97.4712 140.484 97.192 139.95 96.921C137.995 95.9191 136.328 94.909 134.866 93.825C134.274 93.3897 133.699 92.9299 133.157 92.4535C131.851 91.312 130.972 90.3348 130.315 89.3C130.102 88.9715 129.913 88.6102 129.732 88.2653C129.658 88.1175 129.543 87.9943 129.412 87.8957C129.173 87.7233 128.869 87.6494 128.565 87.6986C128.097 87.789 127.736 88.1667 127.678 88.6431C127.637 89.0126 127.637 89.4068 127.687 89.8092C127.719 90.0474 127.588 90.2773 127.366 90.3758C127.317 90.4005 127.259 90.4087 127.21 90.4169C126.898 90.4498 126.619 90.6222 126.438 90.885C126.257 91.1478 126.208 91.4681 126.282 91.7719C126.348 92.0347 126.438 92.2236 126.512 92.3714L126.578 92.5028C126.627 92.5931 126.676 92.6917 126.726 92.782C126.873 93.0612 127.021 93.3405 127.202 93.6033C127.547 94.1042 127.933 94.6052 128.393 95.1389C128.541 95.3114 128.565 95.5578 128.459 95.7549C128.352 95.952 128.13 96.0669 127.908 96.0341C125.321 95.681 122.996 95.0979 120.836 94.3013C120.59 94.211 120.335 94.1206 120.097 94.0221C118.158 93.2009 121.658 89.7189 123.259 87.247C130.282 76.4479 131.736 64.0802 131.794 51.5647C131.851 39.4681 130.545 27.5357 128.138 15.7593V15.7429C126.569 5.87173 125.239 2.168 124.401 0.796558C124.22 0.435219 124.023 0.205276 123.818 0.0985162C123.588 -0.0575166 123.465 0.0163937 123.465 0.0163937C123.013 0.0328182 122.495 0.435219 121.871 1.08399C119.251 3.83509 119.399 7.11178 120.122 10.5363C123.432 26.0903 125.921 41.7346 124.787 57.7157C124.007 68.7365 121.953 79.3468 114.248 87.9779C113.789 88.4952 113.287 88.9798 112.786 89.4725C112.211 90.0391 111.316 91.1396 110.651 90.6797C109.764 90.0638 110.552 88.7991 110.831 88.1421C115.341 77.5729 116.639 66.5275 115.949 55.1453C115.932 54.8825 115.908 54.6197 115.891 54.3569V54.3405C115.883 54.1269 115.858 53.9298 115.842 53.7245C115.727 52.2217 115.587 50.7189 115.398 49.2242C113.46 31.1655 111.127 29.9911 111.127 29.9911C110.971 29.8515 110.782 29.7448 110.528 29.6955C109.304 29.4409 108.638 30.5167 108.096 31.3297C105.648 34.9924 106.733 38.8932 107.521 42.753C110.289 56.2703 110.33 69.6645 105.583 82.8124C105.147 84.0113 104.63 85.1775 104.08 86.3272C103.496 87.5508 103.119 89.0783 101.131 88.4213C99.2662 87.8054 99.7918 86.3929 100.03 85.1036C100.654 81.8269 101.155 78.542 101.467 75.2489V75.2653C101.509 74.9368 101.525 74.6247 101.55 74.3127C101.599 73.746 101.632 73.1712 101.665 72.6045C101.689 72.1282 101.714 71.6601 101.739 71.2002C101.747 70.9621 101.763 70.7321 101.763 70.494C102.141 60.0562 100.383 55.3095 99.7179 53.9052C99.644 53.7328 99.5619 53.5767 99.4715 53.4371C98.7815 52.4024 97.6398 52.5256 96.6541 53.5028C94.8388 55.2931 93.8367 57.4118 94.2967 60.0808C95.6438 67.8496 94.8552 75.5445 93.4096 83.1983C93.2124 84.2249 92.7524 86.0973 90.5593 85.6127C89.0644 85.2842 88.7194 84.6437 88.6372 83.3461C88.6537 82.3689 88.6372 81.3916 88.6044 80.4144C88.6044 80.3897 88.6044 80.3651 88.6044 80.3405C88.6044 80.2009 88.588 80.0612 88.588 79.9299C88.588 79.8559 88.5797 79.7902 88.5715 79.7245C88.5058 78.3942 88.399 77.0556 88.2347 75.717C88.2183 75.5856 88.1937 75.4624 88.1773 75.331C87.3394 67.7921 86.247 67.0612 86.247 67.0612C85.5488 66.1497 84.4563 66.3057 83.5117 67.2419C81.6964 69.0322 80.7764 71.1427 81.1543 73.8199C81.4336 75.7745 81.3596 75.175 81.5568 76.8831C81.7128 77.7618 81.8771 79.3632 81.8935 79.8724C81.8525 80.324 81.7375 80.7182 81.4582 81.0139C80.53 82.0076 79.0351 80.9892 77.9015 80.5211C55.9209 71.4302 37.1108 58.6683 20.691 42.523C14.2513 35.945 3.25273 22.6329 3.25273 22.6329C2.84203 22.1566 2.33276 21.8856 1.55243 22.2223C0.114982 22.8383 0.156052 24.6778 0.0246278 26.2217C-0.23822 29.3177 1.42101 31.5597 3.21987 33.662C28.0179 62.5856 58.2783 83.3708 94.8059 93.7675L101.377 95.5085C101.451 95.5249 101.533 95.5496 101.607 95.566C101.624 95.566 101.632 95.566 101.64 95.5742L107.299 97.077L107.456 97.1181C107.267 97.1756 107.061 97.2167 106.839 97.2577C100.613 98.4895 88.2923 96.223 78.3944 93.9153C73.4988 92.8888 68.6854 91.6405 63.9788 90.1541C63.7653 90.0884 63.642 90.0556 63.642 90.0556C45.3577 84.2331 28.6093 74.7972 13.9556 60.4093C12.5674 59.0461 11.286 57.5761 10.0211 56.0897C8.86289 54.71 6.47262 51.8275 5.643 50.8338C5.55265 50.7024 5.45408 50.5875 5.35551 50.4807C5.10909 50.2261 4.80517 50.0619 4.36983 50.1604C3.3513 50.3986 3.05559 51.4498 2.86667 52.3367C2.1192 55.9008 3.25273 58.8983 5.65122 61.5755C20.6582 78.3942 39.4929 89.1358 60.6439 96.1819C72.6528 100.181 85.0067 102.612 97.6069 104.164C90.0911 106.595 82.3617 107.334 74.5667 107.137C59.4775 106.759 45.3248 103.138 32.0264 96.6746C27.1226 94.1535 22.5556 91.3449 21.3564 90.5894C20.6664 90.1213 19.9518 89.8338 19.2454 90.3758C17.9229 91.4024 18.8347 93.2009 19.2618 94.6051C20.075 97.307 21.956 99.1712 24.3956 100.46C46.0641 111.917 68.9401 116.499 93.2946 112.434C95.7588 112.023 98.0998 111.572 100.679 110.701C96.6048 114.224 91.89 116.524 86.9369 118.339C71.6835 123.915 56.5287 123.693 41.4314 119.915C36.5851 118.618 30.9668 116.507 30.9668 116.507C30.1536 116.154 29.3486 116.031 28.7243 116.926C27.6237 118.503 28.5847 120.145 29.5375 121.632C31.7882 125.138 36.1416 125.483 39.5832 126.674C40.7578 127.052 37.5544 129.187 36.5276 129.975C31.5335 133.794 26.6462 137.284 21.6767 140.98L18.424 143.378C17.8654 143.764 17.3726 144.199 17.6272 145.004C17.9229 145.915 18.8675 146.08 19.7875 146.268C23.3442 147.008 26.3833 145.825 29.1925 143.723C35.2134 139.214 41.3493 134.837 47.2387 130.156C49.4811 128.374 51.5182 128.522 54.582 129.31C46.9183 135.083 39.7475 140.495 32.5685 145.899C25.2827 151.376 17.9969 156.854 10.711 162.323L5.89764 165.888C5.82371 165.937 5.758 165.986 5.69229 166.044L5.61836 166.093C5.20766 166.421 4.90374 166.791 4.9941 167.267C5.19123 168.351 6.4644 168.622 7.50758 168.803C11.8117 169.542 14.4813 167.924 17.4219 165.715C32.1496 154.661 46.9266 143.682 61.5721 132.521C64.8577 130.016 68.2337 128.604 72.9731 129.138C68.9401 132.152 65.0631 135.051 61.2436 137.908L50.8611 145.587C50.7871 145.636 50.7132 145.694 50.6475 145.751C50.0972 146.186 49.7111 146.695 49.9247 147.451C50.3189 148.822 51.97 148.987 53.3745 149.2C55.9537 149.586 58.1387 148.675 60.1675 147.164C61.3339 146.293 62.5085 145.439 63.6831 144.593L79.5361 132.004C79.5361 132.004 83.2817 129.327 87.6187 126.871C88.0048 126.633 88.3908 126.387 88.7851 126.148C88.9494 126.075 89.3601 125.886 89.9843 125.59C90.4525 125.352 90.9207 125.114 91.3807 124.892C92.0625 124.547 92.851 124.128 93.7381 123.644C96.2927 122.584 103.611 119.168 109.657 112.73C112.532 110.512 116.581 107.613 119.735 106.217H119.752C119.99 106.111 120.228 106.012 120.458 105.93C120.458 105.93 120.475 105.93 120.483 105.922C120.639 105.864 120.787 105.815 120.935 105.766L121.337 105.61C122.479 105.289 124.335 105.166 124.582 107.679C124.623 108.295 124.615 108.927 124.541 109.593C124.491 110.093 124.393 110.627 124.319 111.054C124.245 111.465 124.417 111.876 124.746 112.122C124.795 112.163 124.853 112.196 124.91 112.22C125.346 112.434 125.871 112.335 126.2 111.974C126.323 111.834 126.446 111.703 126.569 111.572C128.122 109.937 129.699 108.804 131.375 108.114C133.822 107.104 136.303 107.096 138.94 108.106C140.197 108.582 141.379 109.239 142.554 110.102C143.055 110.471 143.556 110.882 144.057 111.334C144.353 111.605 144.648 111.9 144.911 112.163L144.952 112.204L145.166 112.418C145.166 112.418 145.248 112.491 145.289 112.524C145.536 112.705 145.856 112.779 146.168 112.713C146.529 112.631 146.825 112.376 146.957 112.032C146.981 111.966 147.006 111.9 147.031 111.834C147.778 109.617 147.934 107.581 147.499 105.593H147.458Z",fill:"url(#paint0_linear_290_1904)"}),e("path",{d:"M120.113 94.0303C120.195 94.0632 120.269 94.096 120.351 94.1207C120.269 94.0878 120.187 94.0632 120.113 94.0303Z",fill:"#FEDBB5"}),e("path",{d:"M111.283 87.1238C111.283 87.1238 111.267 87.1567 111.267 87.1731C111.267 87.1567 111.283 87.1402 111.283 87.1238Z",fill:"#FEDBB5"}),e("path",{d:"M123.383 87.1074C123.383 87.1074 123.358 87.1487 123.341 87.1652C123.358 87.1487 123.366 87.1239 123.383 87.1074Z",fill:"#FEDBB5"}),e("path",{d:"M104.104 86.3354C103.965 86.6229 103.841 86.9267 103.71 87.2142C103.85 86.9267 103.973 86.6229 104.104 86.3354Z",fill:"#FEDBB5"}),e("path",{d:"M89.0233 84.7422C89.0233 84.7422 89.0233 84.7505 89.0316 84.7588C89.0316 84.7588 89.0316 84.7505 89.0233 84.7422Z",fill:"#FEDBB5"}),e("path",{d:"M89.0644 84.7998C89.1876 84.964 89.3437 85.1118 89.5408 85.235C89.3437 85.1118 89.1876 84.9722 89.0644 84.7998ZM89.0644 84.7833C89.0644 84.7833 89.0644 84.7833 89.0644 84.7915C89.0644 84.7915 89.0644 84.7915 89.0644 84.7833ZM89.0562 84.7751C89.0562 84.7751 89.0562 84.7751 89.0562 84.7833C89.0562 84.7833 89.0562 84.7833 89.0562 84.7751ZM88.6947 83.3626C88.6947 83.3626 88.6947 83.3708 88.6947 83.379C88.6947 83.379 88.6947 83.3708 88.6947 83.3626ZM79.1665 81.0878C79.1665 81.0878 79.1829 81.0878 79.1829 81.096C79.6429 81.2931 80.1029 81.4492 80.53 81.4492C80.7107 81.4492 80.8832 81.4245 81.0393 81.3588C80.875 81.4245 80.7025 81.4492 80.53 81.4492C80.0947 81.4492 79.6265 81.2849 79.1665 81.0878ZM88.629 79.6507C88.629 79.6507 88.629 79.6507 88.629 79.6589C88.629 79.6589 88.629 79.6589 88.629 79.6507Z",fill:"#E5B4A6"}),e("path",{d:"M120.36 94.1206C120.36 94.1206 120.434 94.1535 120.475 94.1617C120.475 94.1617 120.401 94.1289 120.36 94.1206ZM110.273 89.8749C110.273 90.187 110.38 90.4662 110.684 90.6797C110.79 90.7536 110.905 90.7865 111.029 90.7865C111.209 90.7865 111.398 90.7126 111.595 90.5894C111.406 90.7126 111.218 90.7865 111.029 90.7865C110.905 90.7865 110.79 90.7536 110.684 90.6797C110.38 90.4744 110.273 90.187 110.273 89.8749ZM110.914 88.0189C110.914 88.0189 110.881 88.1011 110.864 88.1421C110.881 88.1011 110.897 88.06 110.914 88.0189ZM111.226 87.2798C111.127 87.5262 111.02 87.7726 110.914 88.0189C111.02 87.7726 111.119 87.5262 111.226 87.2798ZM111.267 87.1731C111.267 87.1731 111.234 87.2388 111.226 87.2798C111.242 87.247 111.259 87.2141 111.267 87.1731ZM123.341 87.1731C123.341 87.1731 123.341 87.1813 123.333 87.1895C123.333 87.1895 123.333 87.1813 123.341 87.1731ZM123.391 87.0992C123.391 87.0992 123.391 87.1074 123.382 87.1156C123.382 87.1156 123.382 87.1074 123.391 87.0992ZM111.308 87.0992C111.308 87.0992 111.3 87.132 111.291 87.1402C111.291 87.1238 111.3 87.1074 111.308 87.0992ZM99.8001 86.7707C99.8001 87.4769 100.079 88.0928 101.155 88.446C101.484 88.5527 101.771 88.602 102.026 88.602C102.93 88.602 103.365 87.9615 103.71 87.2306C103.357 87.9697 102.921 88.602 102.026 88.602C101.78 88.602 101.492 88.5527 101.155 88.446C100.088 88.0928 99.8001 87.4769 99.8001 86.7707ZM92.7689 84.9886C92.4486 85.4074 91.9722 85.7195 91.2575 85.7195C91.1836 85.7195 91.1097 85.7195 91.0358 85.7113C91.1097 85.7113 91.1836 85.7195 91.2575 85.7195C91.9722 85.7195 92.4486 85.4157 92.7689 84.9886ZM106.651 79.7081C106.651 79.7081 106.651 79.7081 106.642 79.7081C106.322 80.7511 105.985 81.8023 105.616 82.8452C105.993 81.8023 106.338 80.7593 106.659 79.7081M94.1571 79.1251C93.9846 80.2748 93.7875 81.4163 93.5739 82.566C93.7875 81.4245 93.9846 80.2748 94.1571 79.1251ZM122.191 73.6311C120.623 78.7884 118.175 83.65 114.29 88.0025C113.83 88.5199 113.329 89.0044 112.828 89.4972C113.329 89.0126 113.821 88.5199 114.29 88.0025C118.175 83.65 120.623 78.7884 122.2 73.6311",fill:"#E5B4A6"}),e("path",{opacity:"0.4",d:"M2.20136 22.0745C2.00423 22.0745 1.79066 22.1238 1.55246 22.2223C0.53392 22.6658 0.254644 23.7252 0.139648 24.8503C5.61017 32.0196 27.213 58.4548 61.1943 76.5875C61.1943 76.5875 94.4692 94.1453 127.933 96.0423C125.346 95.6892 123.021 95.1061 120.861 94.3095C120.729 94.2602 120.606 94.2192 120.475 94.1699C108.318 91.542 97.9519 88.2571 90.6168 85.6292C90.7565 85.662 90.8961 85.6784 91.0193 85.6949C90.8879 85.6867 90.7401 85.662 90.5922 85.6292C90.1486 85.5306 89.8037 85.4074 89.5408 85.2432C83.7417 83.1244 80.0454 81.4984 79.1583 81.096C78.7312 80.9153 78.3123 80.6936 77.9344 80.5376C55.9538 71.4466 37.1437 58.6848 20.7239 42.5395C14.2513 35.945 3.25275 22.633 3.25275 22.633C2.97348 22.3045 2.6367 22.0745 2.20136 22.0745Z",fill:"url(#paint1_linear_290_1904)"}),e("path",{opacity:"0.4",d:"M4.62448 50.1358C4.55056 50.1358 4.46842 50.144 4.37806 50.1687C3.35953 50.4068 3.06382 51.458 2.8749 52.3449C2.84204 52.5009 2.80919 52.6652 2.78455 52.8212C19.7711 75.832 42.5732 85.235 42.5732 85.235C65.3341 95.952 84.0128 98.12 95.3892 98.12C100.096 98.12 103.554 97.7505 105.533 97.463C104.63 97.5616 103.636 97.6109 102.568 97.6109C95.8984 97.6109 86.362 95.7795 78.4026 93.9235C73.5071 92.897 68.6937 91.6488 63.987 90.1623C63.7735 90.0966 63.6503 90.0638 63.6503 90.0638C45.3659 84.2413 28.6176 74.8054 13.9638 60.4175C12.5756 59.0543 11.2942 57.5843 10.0293 56.0979C8.87112 54.7182 6.48084 51.8357 5.65123 50.8421C5.56088 50.7107 5.46231 50.5957 5.36374 50.4889C5.16661 50.2836 4.9284 50.1358 4.62448 50.1358Z",fill:"url(#paint2_linear_290_1904)"}),e("path",{opacity:"0.4",d:"M20.0669 90.1049C19.7958 90.1049 19.5247 90.187 19.2537 90.4005C18.1037 91.2874 18.6458 92.7738 19.0812 94.0632C27.5991 99.2287 47.132 109.289 70.2626 109.289C79.0023 109.289 88.243 107.86 97.607 104.189C90.8469 106.382 83.9061 107.195 76.9077 107.195C76.1274 107.195 75.3471 107.186 74.5667 107.162C59.4776 106.784 45.3249 103.162 32.0264 96.6993C27.1227 94.1781 22.5557 91.3695 21.3565 90.614C20.9293 90.3266 20.5022 90.1049 20.0669 90.1049Z",fill:"url(#paint3_linear_290_1904)"}),e("path",{opacity:"0.4",d:"M99.1759 111.949C95.4632 114.791 91.2987 116.762 86.937 118.355C78.7559 121.344 70.5994 122.666 62.4675 122.666C55.4363 122.666 48.4298 121.681 41.4315 119.932C36.5852 118.634 30.9668 116.524 30.9668 116.524C30.6136 116.368 30.2604 116.261 29.9237 116.261C29.4883 116.261 29.0776 116.442 28.7326 116.951C28.2234 117.682 28.1577 118.429 28.3219 119.168C33.6939 121.665 45.2181 126.099 59.2723 126.099C71.4536 126.099 85.5406 122.765 99.1759 111.949Z",fill:"url(#paint4_linear_290_1904)"}),e("path",{opacity:"0.4",d:"M62.9356 129.368C49.7358 129.368 39.7557 126.699 38.4908 126.346C38.8604 126.452 39.2218 126.567 39.5833 126.69C40.7579 127.068 37.5544 129.203 36.5276 129.992C32.8396 132.817 29.2008 135.461 25.5537 138.138H36.7576C40.2897 135.527 43.8052 132.907 47.2387 130.172C48.5119 129.154 49.7275 128.768 51.0993 128.768C52.1342 128.768 53.2678 128.99 54.582 129.335C46.9184 135.108 39.7475 140.52 32.5685 145.924C28.3711 149.077 24.1738 152.231 19.9764 155.384H31.246C41.3821 147.804 51.51 140.216 61.5721 132.546C63.8967 130.78 66.2623 129.557 69.1208 129.179C67.0016 129.318 64.9316 129.376 62.9439 129.376L62.9356 129.368Z",fill:"url(#paint5_linear_290_1904)"}),e("path",{opacity:"0.4",d:"M60.5782 138.409H71.47L79.5115 132.02C79.5115 132.02 83.2571 129.343 87.5941 126.888C87.9801 126.649 88.3662 126.403 88.7605 126.165C88.9248 126.091 89.3354 125.902 89.9597 125.606C90.4279 125.368 90.8961 125.13 91.3561 124.908C92.0625 124.547 92.8921 124.112 93.8121 123.603C86.0499 126.855 78.0987 128.44 70.739 129.056C70.8375 129.056 70.9443 129.056 71.0429 129.056C71.6589 129.056 72.2996 129.088 72.965 129.162C68.9319 132.176 65.0549 135.075 61.2354 137.933L60.5782 138.418V138.409Z",fill:"url(#paint6_linear_290_1904)"}),e("path",{opacity:"0.4",d:"M88.6701 83.3544C88.6865 82.3771 88.6701 81.3999 88.6373 80.4226V80.3487C88.6373 80.2091 88.6208 80.0695 88.6208 79.9381L88.6044 79.7328C88.5633 78.9115 88.4976 78.0903 88.4237 77.2609C85.8281 76.1687 83.3803 74.7726 81.1215 73.1301C81.1379 73.3601 81.1461 73.59 81.179 73.8364C81.4582 75.7909 81.3843 75.1914 81.5814 76.8995C81.7375 77.7783 81.9018 79.3797 81.9182 79.8888C81.8771 80.3405 81.7621 80.7347 81.4829 81.0303C81.1954 81.3342 80.8586 81.4491 80.4972 81.4491C80.0619 81.4491 79.5937 81.2849 79.1337 81.0878C79.9961 81.4738 83.7007 83.108 89.5408 85.2432C88.9165 84.8572 88.7194 84.2742 88.6619 83.3626L88.6701 83.3544Z",fill:"url(#paint7_linear_290_1904)"}),e("path",{opacity:"0.4",d:"M131.022 64.885C128.59 68.2685 125.6 71.2331 122.175 73.6146C120.606 78.7719 118.158 83.6336 114.273 87.9861C113.813 88.5035 113.312 88.988 112.811 89.4807C112.326 89.9488 111.628 90.8029 111.02 90.8029C110.897 90.8029 110.782 90.77 110.675 90.6961C109.788 90.0802 110.577 88.8155 110.856 88.1585C112.31 84.7505 113.427 81.2931 114.257 77.7865C111.825 78.698 109.271 79.3386 106.634 79.6999C106.314 80.7429 105.977 81.794 105.607 82.837C105.172 84.036 104.655 85.2021 104.104 86.3518C103.62 87.3702 103.275 88.602 102.018 88.602C101.771 88.602 101.484 88.5527 101.147 88.446C99.2827 87.83 99.8084 86.4175 100.047 85.1282C100.367 83.4201 100.663 81.7119 100.909 79.9956C98.5927 79.9217 96.3256 79.626 94.1325 79.1168C93.9271 80.4883 93.6889 81.8515 93.4261 83.2148C93.2536 84.1263 92.8675 85.7113 91.2412 85.7113C91.044 85.7113 90.8305 85.6867 90.6005 85.6374C97.9356 88.2735 108.293 91.5584 120.458 94.1863C120.335 94.1371 120.22 94.096 120.105 94.0467C118.167 93.2255 121.666 89.7435 123.268 87.2716C127.777 80.3323 129.987 72.7523 131.005 64.8932L131.022 64.885Z",fill:"url(#paint8_linear_290_1904)"}),e("path",{opacity:"0.5",d:"M129.206 102.497C127.687 102.497 126.151 102.645 124.647 102.916C124.36 102.965 124.081 102.99 123.818 102.99C123.391 102.99 122.988 102.924 122.61 102.809C122.668 102.883 122.734 102.957 122.791 103.039C123.448 103.959 123.793 104.961 123.925 106.004C124.089 106.184 124.229 106.406 124.344 106.694C124.344 106.694 124.344 106.694 124.344 106.71C124.344 106.71 124.344 106.71 124.344 106.718C124.344 106.718 124.344 106.718 124.344 106.726C124.344 106.726 124.344 106.726 124.344 106.735C124.344 106.735 124.344 106.735 124.344 106.743C124.344 106.743 124.344 106.743 124.344 106.751C124.344 106.751 124.344 106.751 124.344 106.759C124.344 106.759 124.344 106.759 124.344 106.768V106.784C124.344 106.784 124.344 106.784 124.344 106.792C124.344 106.792 124.344 106.792 124.344 106.8C124.344 106.8 124.344 106.8 124.344 106.809C124.344 106.809 124.344 106.809 124.344 106.817C124.344 106.817 124.344 106.817 124.344 106.825C124.344 106.825 124.344 106.833 124.344 106.841C124.344 106.841 124.344 106.841 124.344 106.858C124.344 106.858 124.344 106.858 124.344 106.866C124.344 106.866 124.344 106.866 124.344 106.874C124.344 106.874 124.344 106.874 124.344 106.882C124.344 106.882 124.344 106.883 124.344 106.891C124.344 106.891 124.344 106.891 124.344 106.899C124.344 106.899 124.344 106.899 124.344 106.907C124.344 106.907 124.344 106.907 124.344 106.915C124.344 106.915 124.344 106.915 124.344 106.924C124.344 106.924 124.344 106.924 124.344 106.932C124.344 106.932 124.344 106.932 124.344 106.94C124.344 106.94 124.344 106.94 124.344 106.948C124.344 106.948 124.344 106.948 124.344 106.965C124.344 106.965 124.344 106.973 124.344 106.981C124.344 106.981 124.344 106.989 124.344 106.997V107.014C124.344 107.014 124.344 107.022 124.344 107.03C124.344 107.03 124.344 107.039 124.344 107.047C124.344 107.047 124.344 107.055 124.344 107.063C124.344 107.063 124.344 107.071 124.344 107.08C124.344 107.08 124.344 107.088 124.344 107.096C124.344 107.096 124.344 107.104 124.344 107.112C124.344 107.112 124.344 107.121 124.344 107.129C124.344 107.145 124.344 107.162 124.344 107.178C124.344 107.178 124.344 107.186 124.344 107.195C124.344 107.195 124.344 107.227 124.344 107.244C124.344 107.244 124.344 107.252 124.344 107.26V107.277C124.344 107.277 124.344 107.301 124.344 107.31C124.344 107.31 124.344 107.318 124.344 107.326V107.342V107.359C124.36 107.597 124.368 107.843 124.368 108.09C124.368 108.476 124.344 108.87 124.302 109.272C124.253 109.773 124.155 110.307 124.081 110.734C124.072 110.8 124.064 110.865 124.064 110.923C124.064 111.268 124.229 111.588 124.508 111.793L124.672 111.892C124.828 111.966 124.992 112.007 125.157 112.007C125.461 112.007 125.748 111.884 125.962 111.654C126.085 111.514 126.208 111.383 126.331 111.251C127.884 109.617 129.461 108.484 131.136 107.794C132.369 107.285 133.601 107.03 134.857 107.03C136.114 107.03 137.387 107.285 138.702 107.786C139.958 108.262 141.141 108.919 142.316 109.781C142.817 110.151 143.318 110.562 143.819 111.013C144.115 111.284 144.41 111.58 144.673 111.843L144.714 111.884L144.928 112.097L145.051 112.204C145.232 112.335 145.453 112.409 145.675 112.418C144.632 110.192 143.318 108.123 141.461 106.513C137.946 103.466 133.51 102.177 129.001 102.177",fill:"url(#paint9_linear_290_1904)"}),e("path",{opacity:"0.4",d:"M128.779 87.6905L128.582 87.7069C128.114 87.7972 127.752 88.175 127.695 88.6513C127.654 89.0208 127.654 89.415 127.703 89.8174C127.72 89.9488 127.687 90.072 127.629 90.1706C129.51 92.9627 133.584 97.9065 139.769 99.7789C139.769 99.7789 149.331 104.78 146.916 112.032L146.99 111.834C147.737 109.617 147.893 107.581 147.458 105.593C147.022 103.63 146.029 101.824 144.492 100.222C143.901 99.6064 143.244 99.0234 142.529 98.4978C142.184 98.2432 141.815 98.0051 141.437 97.7669C140.969 97.4713 140.484 97.192 139.95 96.921C137.995 95.9191 136.328 94.909 134.866 93.825C134.274 93.3898 133.699 92.9299 133.157 92.4536C131.851 91.3121 130.972 90.3348 130.315 89.3001C130.102 88.9716 129.913 88.6102 129.732 88.2653C129.658 88.1175 129.543 87.9943 129.412 87.8958C129.231 87.7562 129.001 87.6823 128.763 87.6823",fill:"url(#paint10_linear_290_1904)"}),e("path",{opacity:"0.5",d:"M116.647 107.893L118.586 106.768L126.734 95.8535C126.734 95.8535 122.274 95.0076 120.122 94.0303C120.122 94.0303 117.887 104.222 109.632 112.738L112.672 110.488C113.887 109.634 114.988 108.903 116.647 107.893Z",fill:"url(#paint11_linear_290_1904)"}),e("path",{d:"M209.416 49.9962H230.197C245.221 49.9962 252.104 57.7157 252.104 73.5818V81.4409C252.104 97.307 245.221 105.027 230.197 105.027H218.123V148.264H209.416V49.9962ZM230.197 97.0196C239.323 97.0196 243.397 92.9463 243.397 81.8598V73.0152C243.397 62.0682 239.323 57.8553 230.197 57.8553H218.123V97.0196H230.197Z",fill:"var(--ac-global-text-color-900)"}),e("path",{d:"M284.114 49.9962H292.821V93.0941H319.64V49.9962H328.346V148.256H319.64V100.953H292.821V148.256H284.114V49.9962Z",fill:"var(--ac-global-text-color-900)"}),e("path",{d:"M362.451 125.656V72.5963C362.451 57.0177 370.312 48.5919 384.497 48.5919C398.683 48.5919 406.544 57.0177 406.544 72.5963V125.656C406.544 141.234 398.683 149.66 384.497 149.66C370.312 149.66 362.451 141.234 362.451 125.656ZM397.829 126.214V72.0297C397.829 61.5016 393.056 56.451 384.489 56.451C375.922 56.451 371.15 61.5016 371.15 72.0297V126.214C371.15 136.742 375.922 141.653 384.489 141.653C393.056 141.653 397.829 136.742 397.829 126.214Z",fill:"var(--ac-global-text-color-900)"}),e("path",{d:"M440.796 49.9962H480.108V57.8553H449.503V93.0859H474.638V100.945H449.503V140.249H480.108V148.248H440.796V49.9962Z",fill:"var(--ac-global-text-color-900)"}),e("path",{d:"M511.56 49.9962H523.076L548.629 125.935V49.9962H556.769V148.256H547.504L519.56 64.458V148.256H511.56V49.9962Z",fill:"var(--ac-global-text-color-900)"}),e("path",{d:"M592.007 49.9962H600.714V148.256H592.007V49.9962Z",fill:"var(--ac-global-text-color-900)"}),e("path",{d:"M651.674 98.1447L632.437 49.9962H641.702L657.144 89.0209L672.726 49.9962H681.154L661.917 98.1447L681.992 148.256H672.726L656.438 106.989L640.01 148.256H631.591L651.666 98.1447H651.674Z",fill:"var(--ac-global-text-color-900)"})]}),s("defs",{children:[s("linearGradient",{id:"paint0_linear_290_1904",x1:"22.0956",y1:"10.3474",x2:"97.4433",y2:"140.879",gradientUnits:"userSpaceOnUse",children:[e("stop",{stopColor:"#14BAB6"}),e("stop",{offset:"0.5",stopColor:"#00ADEE"}),e("stop",{offset:"1",stopColor:"#0095C4"})]}),s("linearGradient",{id:"paint1_linear_290_1904",x1:"95.422",y1:"114.807",x2:"31.8741",y2:"4.70214",gradientUnits:"userSpaceOnUse",children:[e("stop",{stopColor:"#FDFDFE",stopOpacity:"0"}),e("stop",{offset:"0.11",stopColor:"#FDFDFE",stopOpacity:"0.17"}),e("stop",{offset:"0.3",stopColor:"#FDFDFE",stopOpacity:"0.42"}),e("stop",{offset:"0.47",stopColor:"#FDFDFE",stopOpacity:"0.63"}),e("stop",{offset:"0.64",stopColor:"#FDFDFE",stopOpacity:"0.79"}),e("stop",{offset:"0.78",stopColor:"#FDFDFE",stopOpacity:"0.9"}),e("stop",{offset:"0.91",stopColor:"#FDFDFE",stopOpacity:"0.97"}),e("stop",{offset:"1",stopColor:"#FDFDFE"})]}),s("linearGradient",{id:"paint2_linear_290_1904",x1:"76.6695",y1:"114.126",x2:"30.8746",y2:"34.7951",gradientUnits:"userSpaceOnUse",children:[e("stop",{stopColor:"#FDFDFE",stopOpacity:"0"}),e("stop",{offset:"0.11",stopColor:"#FDFDFE",stopOpacity:"0.17"}),e("stop",{offset:"0.3",stopColor:"#FDFDFE",stopOpacity:"0.42"}),e("stop",{offset:"0.47",stopColor:"#FDFDFE",stopOpacity:"0.63"}),e("stop",{offset:"0.64",stopColor:"#FDFDFE",stopOpacity:"0.79"}),e("stop",{offset:"0.78",stopColor:"#FDFDFE",stopOpacity:"0.9"}),e("stop",{offset:"0.91",stopColor:"#FDFDFE",stopOpacity:"0.97"}),e("stop",{offset:"1",stopColor:"#FDFDFE"})]}),s("linearGradient",{id:"paint3_linear_290_1904",x1:"70.3612",y1:"119.915",x2:"44.7991",y2:"75.6384",gradientUnits:"userSpaceOnUse",children:[e("stop",{stopColor:"#FDFDFE",stopOpacity:"0"}),e("stop",{offset:"0.11",stopColor:"#FDFDFE",stopOpacity:"0.17"}),e("stop",{offset:"0.3",stopColor:"#FDFDFE",stopOpacity:"0.42"}),e("stop",{offset:"0.47",stopColor:"#FDFDFE",stopOpacity:"0.63"}),e("stop",{offset:"0.64",stopColor:"#FDFDFE",stopOpacity:"0.79"}),e("stop",{offset:"0.78",stopColor:"#FDFDFE",stopOpacity:"0.9"}),e("stop",{offset:"0.91",stopColor:"#FDFDFE",stopOpacity:"0.97"}),e("stop",{offset:"1",stopColor:"#FDFDFE"})]}),s("linearGradient",{id:"paint4_linear_290_1904",x1:"71.4208",y1:"128.85",x2:"55.5071",y2:"101.279",gradientUnits:"userSpaceOnUse",children:[e("stop",{stopColor:"#FDFDFE",stopOpacity:"0"}),e("stop",{offset:"0.11",stopColor:"#FDFDFE",stopOpacity:"0.17"}),e("stop",{offset:"0.3",stopColor:"#FDFDFE",stopOpacity:"0.42"}),e("stop",{offset:"0.47",stopColor:"#FDFDFE",stopOpacity:"0.63"}),e("stop",{offset:"0.64",stopColor:"#FDFDFE",stopOpacity:"0.79"}),e("stop",{offset:"0.78",stopColor:"#FDFDFE",stopOpacity:"0.9"}),e("stop",{offset:"0.91",stopColor:"#FDFDFE",stopOpacity:"0.97"}),e("stop",{offset:"1",stopColor:"#FDFDFE"})]}),s("linearGradient",{id:"paint5_linear_290_1904",x1:"44.5363",y1:"126.346",x2:"44.5363",y2:"155.384",gradientUnits:"userSpaceOnUse",children:[e("stop",{stopColor:"#231F20"}),e("stop",{offset:"0.03",stopColor:"#231F20",stopOpacity:"0.9"}),e("stop",{offset:"0.22",stopColor:"#231F20",stopOpacity:"0.4"}),e("stop",{offset:"0.42",stopColor:"#231F20",stopOpacity:"0.1"}),e("stop",{offset:"0.65",stopColor:"#231F20",stopOpacity:"0"})]}),s("linearGradient",{id:"paint6_linear_290_1904",x1:"77.1952",y1:"123.603",x2:"77.1952",y2:"138.409",gradientUnits:"userSpaceOnUse",children:[e("stop",{stopColor:"#231F20"}),e("stop",{offset:"1",stopColor:"#231F20",stopOpacity:"0"})]}),s("linearGradient",{id:"paint7_linear_290_1904",x1:"84.3413",y1:"85.235",x2:"84.3413",y2:"73.1301",gradientUnits:"userSpaceOnUse",children:[e("stop",{stopColor:"#231F20"}),e("stop",{offset:"0.03",stopColor:"#231F20",stopOpacity:"0.95"}),e("stop",{offset:"0.51",stopColor:"#231F20",stopOpacity:"0.26"}),e("stop",{offset:"0.81",stopColor:"#231F20",stopOpacity:"0"})]}),s("linearGradient",{id:"paint8_linear_290_1904",x1:"110.815",y1:"94.1699",x2:"110.815",y2:"64.885",gradientUnits:"userSpaceOnUse",children:[e("stop",{stopColor:"#231F20"}),e("stop",{offset:"0.18",stopColor:"#231F20",stopOpacity:"0.48"}),e("stop",{offset:"0.38",stopColor:"#231F20",stopOpacity:"0.12"}),e("stop",{offset:"0.58",stopColor:"#231F20",stopOpacity:"0"})]}),s("linearGradient",{id:"paint9_linear_290_1904",x1:"138.077",y1:"117.246",x2:"127.969",y2:"99.7278",gradientUnits:"userSpaceOnUse",children:[e("stop",{stopColor:"#231F20"}),e("stop",{offset:"1",stopColor:"#231F20",stopOpacity:"0"})]}),s("linearGradient",{id:"paint10_linear_290_1904",x1:"146.226",y1:"112.434",x2:"131.084",y2:"86.1931",gradientUnits:"userSpaceOnUse",children:[e("stop",{stopColor:"#FDFDFE",stopOpacity:"0"}),e("stop",{offset:"0.11",stopColor:"#FDFDFE",stopOpacity:"0.17"}),e("stop",{offset:"0.3",stopColor:"#FDFDFE",stopOpacity:"0.42"}),e("stop",{offset:"0.47",stopColor:"#FDFDFE",stopOpacity:"0.63"}),e("stop",{offset:"0.64",stopColor:"#FDFDFE",stopOpacity:"0.79"}),e("stop",{offset:"0.78",stopColor:"#FDFDFE",stopOpacity:"0.9"}),e("stop",{offset:"0.91",stopColor:"#FDFDFE",stopOpacity:"0.97"}),e("stop",{offset:"1",stopColor:"#FDFDFE"})]}),s("linearGradient",{id:"paint11_linear_290_1904",x1:"106.889",y1:"107.999",x2:"128.941",y2:"95.2581",gradientUnits:"userSpaceOnUse",children:[e("stop",{stopColor:"#231F20"}),e("stop",{offset:"0.31",stopColor:"#231F20",stopOpacity:"0.5"}),e("stop",{offset:"0.67",stopColor:"#231F20",stopOpacity:"0.13"}),e("stop",{offset:"1",stopColor:"#231F20",stopOpacity:"0"})]}),e("clipPath",{id:"clip0_290_1904",children:e("rect",{width:"682",height:"169",fill:"white"})})]})]})}const dp=C`
|
|
3536
|
+
`,"data-provider":n})}):null}function ul(){return s("svg",{width:"253",height:"63",viewBox:"0 0 682 169",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[s("g",{clipPath:"url(#clip0_290_1904)",children:[e("path",{d:"M147.458 105.593C147.022 103.63 146.028 101.824 144.492 100.222C143.901 99.6064 143.244 99.0233 142.529 98.4978C142.184 98.2432 141.815 98.005 141.437 97.7669C140.969 97.4712 140.484 97.192 139.95 96.921C137.995 95.9191 136.328 94.909 134.866 93.825C134.274 93.3897 133.699 92.9299 133.157 92.4535C131.851 91.312 130.972 90.3348 130.315 89.3C130.102 88.9715 129.913 88.6102 129.732 88.2653C129.658 88.1175 129.543 87.9943 129.412 87.8957C129.173 87.7233 128.869 87.6494 128.565 87.6986C128.097 87.789 127.736 88.1667 127.678 88.6431C127.637 89.0126 127.637 89.4068 127.687 89.8092C127.719 90.0474 127.588 90.2773 127.366 90.3758C127.317 90.4005 127.259 90.4087 127.21 90.4169C126.898 90.4498 126.619 90.6222 126.438 90.885C126.257 91.1478 126.208 91.4681 126.282 91.7719C126.348 92.0347 126.438 92.2236 126.512 92.3714L126.578 92.5028C126.627 92.5931 126.676 92.6917 126.726 92.782C126.873 93.0612 127.021 93.3405 127.202 93.6033C127.547 94.1042 127.933 94.6052 128.393 95.1389C128.541 95.3114 128.565 95.5578 128.459 95.7549C128.352 95.952 128.13 96.0669 127.908 96.0341C125.321 95.681 122.996 95.0979 120.836 94.3013C120.59 94.211 120.335 94.1206 120.097 94.0221C118.158 93.2009 121.658 89.7189 123.259 87.247C130.282 76.4479 131.736 64.0802 131.794 51.5647C131.851 39.4681 130.545 27.5357 128.138 15.7593V15.7429C126.569 5.87173 125.239 2.168 124.401 0.796558C124.22 0.435219 124.023 0.205276 123.818 0.0985162C123.588 -0.0575166 123.465 0.0163937 123.465 0.0163937C123.013 0.0328182 122.495 0.435219 121.871 1.08399C119.251 3.83509 119.399 7.11178 120.122 10.5363C123.432 26.0903 125.921 41.7346 124.787 57.7157C124.007 68.7365 121.953 79.3468 114.248 87.9779C113.789 88.4952 113.287 88.9798 112.786 89.4725C112.211 90.0391 111.316 91.1396 110.651 90.6797C109.764 90.0638 110.552 88.7991 110.831 88.1421C115.341 77.5729 116.639 66.5275 115.949 55.1453C115.932 54.8825 115.908 54.6197 115.891 54.3569V54.3405C115.883 54.1269 115.858 53.9298 115.842 53.7245C115.727 52.2217 115.587 50.7189 115.398 49.2242C113.46 31.1655 111.127 29.9911 111.127 29.9911C110.971 29.8515 110.782 29.7448 110.528 29.6955C109.304 29.4409 108.638 30.5167 108.096 31.3297C105.648 34.9924 106.733 38.8932 107.521 42.753C110.289 56.2703 110.33 69.6645 105.583 82.8124C105.147 84.0113 104.63 85.1775 104.08 86.3272C103.496 87.5508 103.119 89.0783 101.131 88.4213C99.2662 87.8054 99.7918 86.3929 100.03 85.1036C100.654 81.8269 101.155 78.542 101.467 75.2489V75.2653C101.509 74.9368 101.525 74.6247 101.55 74.3127C101.599 73.746 101.632 73.1712 101.665 72.6045C101.689 72.1282 101.714 71.6601 101.739 71.2002C101.747 70.9621 101.763 70.7321 101.763 70.494C102.141 60.0562 100.383 55.3095 99.7179 53.9052C99.644 53.7328 99.5619 53.5767 99.4715 53.4371C98.7815 52.4024 97.6398 52.5256 96.6541 53.5028C94.8388 55.2931 93.8367 57.4118 94.2967 60.0808C95.6438 67.8496 94.8552 75.5445 93.4096 83.1983C93.2124 84.2249 92.7524 86.0973 90.5593 85.6127C89.0644 85.2842 88.7194 84.6437 88.6372 83.3461C88.6537 82.3689 88.6372 81.3916 88.6044 80.4144C88.6044 80.3897 88.6044 80.3651 88.6044 80.3405C88.6044 80.2009 88.588 80.0612 88.588 79.9299C88.588 79.8559 88.5797 79.7902 88.5715 79.7245C88.5058 78.3942 88.399 77.0556 88.2347 75.717C88.2183 75.5856 88.1937 75.4624 88.1773 75.331C87.3394 67.7921 86.247 67.0612 86.247 67.0612C85.5488 66.1497 84.4563 66.3057 83.5117 67.2419C81.6964 69.0322 80.7764 71.1427 81.1543 73.8199C81.4336 75.7745 81.3596 75.175 81.5568 76.8831C81.7128 77.7618 81.8771 79.3632 81.8935 79.8724C81.8525 80.324 81.7375 80.7182 81.4582 81.0139C80.53 82.0076 79.0351 80.9892 77.9015 80.5211C55.9209 71.4302 37.1108 58.6683 20.691 42.523C14.2513 35.945 3.25273 22.6329 3.25273 22.6329C2.84203 22.1566 2.33276 21.8856 1.55243 22.2223C0.114982 22.8383 0.156052 24.6778 0.0246278 26.2217C-0.23822 29.3177 1.42101 31.5597 3.21987 33.662C28.0179 62.5856 58.2783 83.3708 94.8059 93.7675L101.377 95.5085C101.451 95.5249 101.533 95.5496 101.607 95.566C101.624 95.566 101.632 95.566 101.64 95.5742L107.299 97.077L107.456 97.1181C107.267 97.1756 107.061 97.2167 106.839 97.2577C100.613 98.4895 88.2923 96.223 78.3944 93.9153C73.4988 92.8888 68.6854 91.6405 63.9788 90.1541C63.7653 90.0884 63.642 90.0556 63.642 90.0556C45.3577 84.2331 28.6093 74.7972 13.9556 60.4093C12.5674 59.0461 11.286 57.5761 10.0211 56.0897C8.86289 54.71 6.47262 51.8275 5.643 50.8338C5.55265 50.7024 5.45408 50.5875 5.35551 50.4807C5.10909 50.2261 4.80517 50.0619 4.36983 50.1604C3.3513 50.3986 3.05559 51.4498 2.86667 52.3367C2.1192 55.9008 3.25273 58.8983 5.65122 61.5755C20.6582 78.3942 39.4929 89.1358 60.6439 96.1819C72.6528 100.181 85.0067 102.612 97.6069 104.164C90.0911 106.595 82.3617 107.334 74.5667 107.137C59.4775 106.759 45.3248 103.138 32.0264 96.6746C27.1226 94.1535 22.5556 91.3449 21.3564 90.5894C20.6664 90.1213 19.9518 89.8338 19.2454 90.3758C17.9229 91.4024 18.8347 93.2009 19.2618 94.6051C20.075 97.307 21.956 99.1712 24.3956 100.46C46.0641 111.917 68.9401 116.499 93.2946 112.434C95.7588 112.023 98.0998 111.572 100.679 110.701C96.6048 114.224 91.89 116.524 86.9369 118.339C71.6835 123.915 56.5287 123.693 41.4314 119.915C36.5851 118.618 30.9668 116.507 30.9668 116.507C30.1536 116.154 29.3486 116.031 28.7243 116.926C27.6237 118.503 28.5847 120.145 29.5375 121.632C31.7882 125.138 36.1416 125.483 39.5832 126.674C40.7578 127.052 37.5544 129.187 36.5276 129.975C31.5335 133.794 26.6462 137.284 21.6767 140.98L18.424 143.378C17.8654 143.764 17.3726 144.199 17.6272 145.004C17.9229 145.915 18.8675 146.08 19.7875 146.268C23.3442 147.008 26.3833 145.825 29.1925 143.723C35.2134 139.214 41.3493 134.837 47.2387 130.156C49.4811 128.374 51.5182 128.522 54.582 129.31C46.9183 135.083 39.7475 140.495 32.5685 145.899C25.2827 151.376 17.9969 156.854 10.711 162.323L5.89764 165.888C5.82371 165.937 5.758 165.986 5.69229 166.044L5.61836 166.093C5.20766 166.421 4.90374 166.791 4.9941 167.267C5.19123 168.351 6.4644 168.622 7.50758 168.803C11.8117 169.542 14.4813 167.924 17.4219 165.715C32.1496 154.661 46.9266 143.682 61.5721 132.521C64.8577 130.016 68.2337 128.604 72.9731 129.138C68.9401 132.152 65.0631 135.051 61.2436 137.908L50.8611 145.587C50.7871 145.636 50.7132 145.694 50.6475 145.751C50.0972 146.186 49.7111 146.695 49.9247 147.451C50.3189 148.822 51.97 148.987 53.3745 149.2C55.9537 149.586 58.1387 148.675 60.1675 147.164C61.3339 146.293 62.5085 145.439 63.6831 144.593L79.5361 132.004C79.5361 132.004 83.2817 129.327 87.6187 126.871C88.0048 126.633 88.3908 126.387 88.7851 126.148C88.9494 126.075 89.3601 125.886 89.9843 125.59C90.4525 125.352 90.9207 125.114 91.3807 124.892C92.0625 124.547 92.851 124.128 93.7381 123.644C96.2927 122.584 103.611 119.168 109.657 112.73C112.532 110.512 116.581 107.613 119.735 106.217H119.752C119.99 106.111 120.228 106.012 120.458 105.93C120.458 105.93 120.475 105.93 120.483 105.922C120.639 105.864 120.787 105.815 120.935 105.766L121.337 105.61C122.479 105.289 124.335 105.166 124.582 107.679C124.623 108.295 124.615 108.927 124.541 109.593C124.491 110.093 124.393 110.627 124.319 111.054C124.245 111.465 124.417 111.876 124.746 112.122C124.795 112.163 124.853 112.196 124.91 112.22C125.346 112.434 125.871 112.335 126.2 111.974C126.323 111.834 126.446 111.703 126.569 111.572C128.122 109.937 129.699 108.804 131.375 108.114C133.822 107.104 136.303 107.096 138.94 108.106C140.197 108.582 141.379 109.239 142.554 110.102C143.055 110.471 143.556 110.882 144.057 111.334C144.353 111.605 144.648 111.9 144.911 112.163L144.952 112.204L145.166 112.418C145.166 112.418 145.248 112.491 145.289 112.524C145.536 112.705 145.856 112.779 146.168 112.713C146.529 112.631 146.825 112.376 146.957 112.032C146.981 111.966 147.006 111.9 147.031 111.834C147.778 109.617 147.934 107.581 147.499 105.593H147.458Z",fill:"url(#paint0_linear_290_1904)"}),e("path",{d:"M120.113 94.0303C120.195 94.0632 120.269 94.096 120.351 94.1207C120.269 94.0878 120.187 94.0632 120.113 94.0303Z",fill:"#FEDBB5"}),e("path",{d:"M111.283 87.1238C111.283 87.1238 111.267 87.1567 111.267 87.1731C111.267 87.1567 111.283 87.1402 111.283 87.1238Z",fill:"#FEDBB5"}),e("path",{d:"M123.383 87.1074C123.383 87.1074 123.358 87.1487 123.341 87.1652C123.358 87.1487 123.366 87.1239 123.383 87.1074Z",fill:"#FEDBB5"}),e("path",{d:"M104.104 86.3354C103.965 86.6229 103.841 86.9267 103.71 87.2142C103.85 86.9267 103.973 86.6229 104.104 86.3354Z",fill:"#FEDBB5"}),e("path",{d:"M89.0233 84.7422C89.0233 84.7422 89.0233 84.7505 89.0316 84.7588C89.0316 84.7588 89.0316 84.7505 89.0233 84.7422Z",fill:"#FEDBB5"}),e("path",{d:"M89.0644 84.7998C89.1876 84.964 89.3437 85.1118 89.5408 85.235C89.3437 85.1118 89.1876 84.9722 89.0644 84.7998ZM89.0644 84.7833C89.0644 84.7833 89.0644 84.7833 89.0644 84.7915C89.0644 84.7915 89.0644 84.7915 89.0644 84.7833ZM89.0562 84.7751C89.0562 84.7751 89.0562 84.7751 89.0562 84.7833C89.0562 84.7833 89.0562 84.7833 89.0562 84.7751ZM88.6947 83.3626C88.6947 83.3626 88.6947 83.3708 88.6947 83.379C88.6947 83.379 88.6947 83.3708 88.6947 83.3626ZM79.1665 81.0878C79.1665 81.0878 79.1829 81.0878 79.1829 81.096C79.6429 81.2931 80.1029 81.4492 80.53 81.4492C80.7107 81.4492 80.8832 81.4245 81.0393 81.3588C80.875 81.4245 80.7025 81.4492 80.53 81.4492C80.0947 81.4492 79.6265 81.2849 79.1665 81.0878ZM88.629 79.6507C88.629 79.6507 88.629 79.6507 88.629 79.6589C88.629 79.6589 88.629 79.6589 88.629 79.6507Z",fill:"#E5B4A6"}),e("path",{d:"M120.36 94.1206C120.36 94.1206 120.434 94.1535 120.475 94.1617C120.475 94.1617 120.401 94.1289 120.36 94.1206ZM110.273 89.8749C110.273 90.187 110.38 90.4662 110.684 90.6797C110.79 90.7536 110.905 90.7865 111.029 90.7865C111.209 90.7865 111.398 90.7126 111.595 90.5894C111.406 90.7126 111.218 90.7865 111.029 90.7865C110.905 90.7865 110.79 90.7536 110.684 90.6797C110.38 90.4744 110.273 90.187 110.273 89.8749ZM110.914 88.0189C110.914 88.0189 110.881 88.1011 110.864 88.1421C110.881 88.1011 110.897 88.06 110.914 88.0189ZM111.226 87.2798C111.127 87.5262 111.02 87.7726 110.914 88.0189C111.02 87.7726 111.119 87.5262 111.226 87.2798ZM111.267 87.1731C111.267 87.1731 111.234 87.2388 111.226 87.2798C111.242 87.247 111.259 87.2141 111.267 87.1731ZM123.341 87.1731C123.341 87.1731 123.341 87.1813 123.333 87.1895C123.333 87.1895 123.333 87.1813 123.341 87.1731ZM123.391 87.0992C123.391 87.0992 123.391 87.1074 123.382 87.1156C123.382 87.1156 123.382 87.1074 123.391 87.0992ZM111.308 87.0992C111.308 87.0992 111.3 87.132 111.291 87.1402C111.291 87.1238 111.3 87.1074 111.308 87.0992ZM99.8001 86.7707C99.8001 87.4769 100.079 88.0928 101.155 88.446C101.484 88.5527 101.771 88.602 102.026 88.602C102.93 88.602 103.365 87.9615 103.71 87.2306C103.357 87.9697 102.921 88.602 102.026 88.602C101.78 88.602 101.492 88.5527 101.155 88.446C100.088 88.0928 99.8001 87.4769 99.8001 86.7707ZM92.7689 84.9886C92.4486 85.4074 91.9722 85.7195 91.2575 85.7195C91.1836 85.7195 91.1097 85.7195 91.0358 85.7113C91.1097 85.7113 91.1836 85.7195 91.2575 85.7195C91.9722 85.7195 92.4486 85.4157 92.7689 84.9886ZM106.651 79.7081C106.651 79.7081 106.651 79.7081 106.642 79.7081C106.322 80.7511 105.985 81.8023 105.616 82.8452C105.993 81.8023 106.338 80.7593 106.659 79.7081M94.1571 79.1251C93.9846 80.2748 93.7875 81.4163 93.5739 82.566C93.7875 81.4245 93.9846 80.2748 94.1571 79.1251ZM122.191 73.6311C120.623 78.7884 118.175 83.65 114.29 88.0025C113.83 88.5199 113.329 89.0044 112.828 89.4972C113.329 89.0126 113.821 88.5199 114.29 88.0025C118.175 83.65 120.623 78.7884 122.2 73.6311",fill:"#E5B4A6"}),e("path",{opacity:"0.4",d:"M2.20136 22.0745C2.00423 22.0745 1.79066 22.1238 1.55246 22.2223C0.53392 22.6658 0.254644 23.7252 0.139648 24.8503C5.61017 32.0196 27.213 58.4548 61.1943 76.5875C61.1943 76.5875 94.4692 94.1453 127.933 96.0423C125.346 95.6892 123.021 95.1061 120.861 94.3095C120.729 94.2602 120.606 94.2192 120.475 94.1699C108.318 91.542 97.9519 88.2571 90.6168 85.6292C90.7565 85.662 90.8961 85.6784 91.0193 85.6949C90.8879 85.6867 90.7401 85.662 90.5922 85.6292C90.1486 85.5306 89.8037 85.4074 89.5408 85.2432C83.7417 83.1244 80.0454 81.4984 79.1583 81.096C78.7312 80.9153 78.3123 80.6936 77.9344 80.5376C55.9538 71.4466 37.1437 58.6848 20.7239 42.5395C14.2513 35.945 3.25275 22.633 3.25275 22.633C2.97348 22.3045 2.6367 22.0745 2.20136 22.0745Z",fill:"url(#paint1_linear_290_1904)"}),e("path",{opacity:"0.4",d:"M4.62448 50.1358C4.55056 50.1358 4.46842 50.144 4.37806 50.1687C3.35953 50.4068 3.06382 51.458 2.8749 52.3449C2.84204 52.5009 2.80919 52.6652 2.78455 52.8212C19.7711 75.832 42.5732 85.235 42.5732 85.235C65.3341 95.952 84.0128 98.12 95.3892 98.12C100.096 98.12 103.554 97.7505 105.533 97.463C104.63 97.5616 103.636 97.6109 102.568 97.6109C95.8984 97.6109 86.362 95.7795 78.4026 93.9235C73.5071 92.897 68.6937 91.6488 63.987 90.1623C63.7735 90.0966 63.6503 90.0638 63.6503 90.0638C45.3659 84.2413 28.6176 74.8054 13.9638 60.4175C12.5756 59.0543 11.2942 57.5843 10.0293 56.0979C8.87112 54.7182 6.48084 51.8357 5.65123 50.8421C5.56088 50.7107 5.46231 50.5957 5.36374 50.4889C5.16661 50.2836 4.9284 50.1358 4.62448 50.1358Z",fill:"url(#paint2_linear_290_1904)"}),e("path",{opacity:"0.4",d:"M20.0669 90.1049C19.7958 90.1049 19.5247 90.187 19.2537 90.4005C18.1037 91.2874 18.6458 92.7738 19.0812 94.0632C27.5991 99.2287 47.132 109.289 70.2626 109.289C79.0023 109.289 88.243 107.86 97.607 104.189C90.8469 106.382 83.9061 107.195 76.9077 107.195C76.1274 107.195 75.3471 107.186 74.5667 107.162C59.4776 106.784 45.3249 103.162 32.0264 96.6993C27.1227 94.1781 22.5557 91.3695 21.3565 90.614C20.9293 90.3266 20.5022 90.1049 20.0669 90.1049Z",fill:"url(#paint3_linear_290_1904)"}),e("path",{opacity:"0.4",d:"M99.1759 111.949C95.4632 114.791 91.2987 116.762 86.937 118.355C78.7559 121.344 70.5994 122.666 62.4675 122.666C55.4363 122.666 48.4298 121.681 41.4315 119.932C36.5852 118.634 30.9668 116.524 30.9668 116.524C30.6136 116.368 30.2604 116.261 29.9237 116.261C29.4883 116.261 29.0776 116.442 28.7326 116.951C28.2234 117.682 28.1577 118.429 28.3219 119.168C33.6939 121.665 45.2181 126.099 59.2723 126.099C71.4536 126.099 85.5406 122.765 99.1759 111.949Z",fill:"url(#paint4_linear_290_1904)"}),e("path",{opacity:"0.4",d:"M62.9356 129.368C49.7358 129.368 39.7557 126.699 38.4908 126.346C38.8604 126.452 39.2218 126.567 39.5833 126.69C40.7579 127.068 37.5544 129.203 36.5276 129.992C32.8396 132.817 29.2008 135.461 25.5537 138.138H36.7576C40.2897 135.527 43.8052 132.907 47.2387 130.172C48.5119 129.154 49.7275 128.768 51.0993 128.768C52.1342 128.768 53.2678 128.99 54.582 129.335C46.9184 135.108 39.7475 140.52 32.5685 145.924C28.3711 149.077 24.1738 152.231 19.9764 155.384H31.246C41.3821 147.804 51.51 140.216 61.5721 132.546C63.8967 130.78 66.2623 129.557 69.1208 129.179C67.0016 129.318 64.9316 129.376 62.9439 129.376L62.9356 129.368Z",fill:"url(#paint5_linear_290_1904)"}),e("path",{opacity:"0.4",d:"M60.5782 138.409H71.47L79.5115 132.02C79.5115 132.02 83.2571 129.343 87.5941 126.888C87.9801 126.649 88.3662 126.403 88.7605 126.165C88.9248 126.091 89.3354 125.902 89.9597 125.606C90.4279 125.368 90.8961 125.13 91.3561 124.908C92.0625 124.547 92.8921 124.112 93.8121 123.603C86.0499 126.855 78.0987 128.44 70.739 129.056C70.8375 129.056 70.9443 129.056 71.0429 129.056C71.6589 129.056 72.2996 129.088 72.965 129.162C68.9319 132.176 65.0549 135.075 61.2354 137.933L60.5782 138.418V138.409Z",fill:"url(#paint6_linear_290_1904)"}),e("path",{opacity:"0.4",d:"M88.6701 83.3544C88.6865 82.3771 88.6701 81.3999 88.6373 80.4226V80.3487C88.6373 80.2091 88.6208 80.0695 88.6208 79.9381L88.6044 79.7328C88.5633 78.9115 88.4976 78.0903 88.4237 77.2609C85.8281 76.1687 83.3803 74.7726 81.1215 73.1301C81.1379 73.3601 81.1461 73.59 81.179 73.8364C81.4582 75.7909 81.3843 75.1914 81.5814 76.8995C81.7375 77.7783 81.9018 79.3797 81.9182 79.8888C81.8771 80.3405 81.7621 80.7347 81.4829 81.0303C81.1954 81.3342 80.8586 81.4491 80.4972 81.4491C80.0619 81.4491 79.5937 81.2849 79.1337 81.0878C79.9961 81.4738 83.7007 83.108 89.5408 85.2432C88.9165 84.8572 88.7194 84.2742 88.6619 83.3626L88.6701 83.3544Z",fill:"url(#paint7_linear_290_1904)"}),e("path",{opacity:"0.4",d:"M131.022 64.885C128.59 68.2685 125.6 71.2331 122.175 73.6146C120.606 78.7719 118.158 83.6336 114.273 87.9861C113.813 88.5035 113.312 88.988 112.811 89.4807C112.326 89.9488 111.628 90.8029 111.02 90.8029C110.897 90.8029 110.782 90.77 110.675 90.6961C109.788 90.0802 110.577 88.8155 110.856 88.1585C112.31 84.7505 113.427 81.2931 114.257 77.7865C111.825 78.698 109.271 79.3386 106.634 79.6999C106.314 80.7429 105.977 81.794 105.607 82.837C105.172 84.036 104.655 85.2021 104.104 86.3518C103.62 87.3702 103.275 88.602 102.018 88.602C101.771 88.602 101.484 88.5527 101.147 88.446C99.2827 87.83 99.8084 86.4175 100.047 85.1282C100.367 83.4201 100.663 81.7119 100.909 79.9956C98.5927 79.9217 96.3256 79.626 94.1325 79.1168C93.9271 80.4883 93.6889 81.8515 93.4261 83.2148C93.2536 84.1263 92.8675 85.7113 91.2412 85.7113C91.044 85.7113 90.8305 85.6867 90.6005 85.6374C97.9356 88.2735 108.293 91.5584 120.458 94.1863C120.335 94.1371 120.22 94.096 120.105 94.0467C118.167 93.2255 121.666 89.7435 123.268 87.2716C127.777 80.3323 129.987 72.7523 131.005 64.8932L131.022 64.885Z",fill:"url(#paint8_linear_290_1904)"}),e("path",{opacity:"0.5",d:"M129.206 102.497C127.687 102.497 126.151 102.645 124.647 102.916C124.36 102.965 124.081 102.99 123.818 102.99C123.391 102.99 122.988 102.924 122.61 102.809C122.668 102.883 122.734 102.957 122.791 103.039C123.448 103.959 123.793 104.961 123.925 106.004C124.089 106.184 124.229 106.406 124.344 106.694C124.344 106.694 124.344 106.694 124.344 106.71C124.344 106.71 124.344 106.71 124.344 106.718C124.344 106.718 124.344 106.718 124.344 106.726C124.344 106.726 124.344 106.726 124.344 106.735C124.344 106.735 124.344 106.735 124.344 106.743C124.344 106.743 124.344 106.743 124.344 106.751C124.344 106.751 124.344 106.751 124.344 106.759C124.344 106.759 124.344 106.759 124.344 106.768V106.784C124.344 106.784 124.344 106.784 124.344 106.792C124.344 106.792 124.344 106.792 124.344 106.8C124.344 106.8 124.344 106.8 124.344 106.809C124.344 106.809 124.344 106.809 124.344 106.817C124.344 106.817 124.344 106.817 124.344 106.825C124.344 106.825 124.344 106.833 124.344 106.841C124.344 106.841 124.344 106.841 124.344 106.858C124.344 106.858 124.344 106.858 124.344 106.866C124.344 106.866 124.344 106.866 124.344 106.874C124.344 106.874 124.344 106.874 124.344 106.882C124.344 106.882 124.344 106.883 124.344 106.891C124.344 106.891 124.344 106.891 124.344 106.899C124.344 106.899 124.344 106.899 124.344 106.907C124.344 106.907 124.344 106.907 124.344 106.915C124.344 106.915 124.344 106.915 124.344 106.924C124.344 106.924 124.344 106.924 124.344 106.932C124.344 106.932 124.344 106.932 124.344 106.94C124.344 106.94 124.344 106.94 124.344 106.948C124.344 106.948 124.344 106.948 124.344 106.965C124.344 106.965 124.344 106.973 124.344 106.981C124.344 106.981 124.344 106.989 124.344 106.997V107.014C124.344 107.014 124.344 107.022 124.344 107.03C124.344 107.03 124.344 107.039 124.344 107.047C124.344 107.047 124.344 107.055 124.344 107.063C124.344 107.063 124.344 107.071 124.344 107.08C124.344 107.08 124.344 107.088 124.344 107.096C124.344 107.096 124.344 107.104 124.344 107.112C124.344 107.112 124.344 107.121 124.344 107.129C124.344 107.145 124.344 107.162 124.344 107.178C124.344 107.178 124.344 107.186 124.344 107.195C124.344 107.195 124.344 107.227 124.344 107.244C124.344 107.244 124.344 107.252 124.344 107.26V107.277C124.344 107.277 124.344 107.301 124.344 107.31C124.344 107.31 124.344 107.318 124.344 107.326V107.342V107.359C124.36 107.597 124.368 107.843 124.368 108.09C124.368 108.476 124.344 108.87 124.302 109.272C124.253 109.773 124.155 110.307 124.081 110.734C124.072 110.8 124.064 110.865 124.064 110.923C124.064 111.268 124.229 111.588 124.508 111.793L124.672 111.892C124.828 111.966 124.992 112.007 125.157 112.007C125.461 112.007 125.748 111.884 125.962 111.654C126.085 111.514 126.208 111.383 126.331 111.251C127.884 109.617 129.461 108.484 131.136 107.794C132.369 107.285 133.601 107.03 134.857 107.03C136.114 107.03 137.387 107.285 138.702 107.786C139.958 108.262 141.141 108.919 142.316 109.781C142.817 110.151 143.318 110.562 143.819 111.013C144.115 111.284 144.41 111.58 144.673 111.843L144.714 111.884L144.928 112.097L145.051 112.204C145.232 112.335 145.453 112.409 145.675 112.418C144.632 110.192 143.318 108.123 141.461 106.513C137.946 103.466 133.51 102.177 129.001 102.177",fill:"url(#paint9_linear_290_1904)"}),e("path",{opacity:"0.4",d:"M128.779 87.6905L128.582 87.7069C128.114 87.7972 127.752 88.175 127.695 88.6513C127.654 89.0208 127.654 89.415 127.703 89.8174C127.72 89.9488 127.687 90.072 127.629 90.1706C129.51 92.9627 133.584 97.9065 139.769 99.7789C139.769 99.7789 149.331 104.78 146.916 112.032L146.99 111.834C147.737 109.617 147.893 107.581 147.458 105.593C147.022 103.63 146.029 101.824 144.492 100.222C143.901 99.6064 143.244 99.0234 142.529 98.4978C142.184 98.2432 141.815 98.0051 141.437 97.7669C140.969 97.4713 140.484 97.192 139.95 96.921C137.995 95.9191 136.328 94.909 134.866 93.825C134.274 93.3898 133.699 92.9299 133.157 92.4536C131.851 91.3121 130.972 90.3348 130.315 89.3001C130.102 88.9716 129.913 88.6102 129.732 88.2653C129.658 88.1175 129.543 87.9943 129.412 87.8958C129.231 87.7562 129.001 87.6823 128.763 87.6823",fill:"url(#paint10_linear_290_1904)"}),e("path",{opacity:"0.5",d:"M116.647 107.893L118.586 106.768L126.734 95.8535C126.734 95.8535 122.274 95.0076 120.122 94.0303C120.122 94.0303 117.887 104.222 109.632 112.738L112.672 110.488C113.887 109.634 114.988 108.903 116.647 107.893Z",fill:"url(#paint11_linear_290_1904)"}),e("path",{d:"M209.416 49.9962H230.197C245.221 49.9962 252.104 57.7157 252.104 73.5818V81.4409C252.104 97.307 245.221 105.027 230.197 105.027H218.123V148.264H209.416V49.9962ZM230.197 97.0196C239.323 97.0196 243.397 92.9463 243.397 81.8598V73.0152C243.397 62.0682 239.323 57.8553 230.197 57.8553H218.123V97.0196H230.197Z",fill:"var(--ac-global-text-color-900)"}),e("path",{d:"M284.114 49.9962H292.821V93.0941H319.64V49.9962H328.346V148.256H319.64V100.953H292.821V148.256H284.114V49.9962Z",fill:"var(--ac-global-text-color-900)"}),e("path",{d:"M362.451 125.656V72.5963C362.451 57.0177 370.312 48.5919 384.497 48.5919C398.683 48.5919 406.544 57.0177 406.544 72.5963V125.656C406.544 141.234 398.683 149.66 384.497 149.66C370.312 149.66 362.451 141.234 362.451 125.656ZM397.829 126.214V72.0297C397.829 61.5016 393.056 56.451 384.489 56.451C375.922 56.451 371.15 61.5016 371.15 72.0297V126.214C371.15 136.742 375.922 141.653 384.489 141.653C393.056 141.653 397.829 136.742 397.829 126.214Z",fill:"var(--ac-global-text-color-900)"}),e("path",{d:"M440.796 49.9962H480.108V57.8553H449.503V93.0859H474.638V100.945H449.503V140.249H480.108V148.248H440.796V49.9962Z",fill:"var(--ac-global-text-color-900)"}),e("path",{d:"M511.56 49.9962H523.076L548.629 125.935V49.9962H556.769V148.256H547.504L519.56 64.458V148.256H511.56V49.9962Z",fill:"var(--ac-global-text-color-900)"}),e("path",{d:"M592.007 49.9962H600.714V148.256H592.007V49.9962Z",fill:"var(--ac-global-text-color-900)"}),e("path",{d:"M651.674 98.1447L632.437 49.9962H641.702L657.144 89.0209L672.726 49.9962H681.154L661.917 98.1447L681.992 148.256H672.726L656.438 106.989L640.01 148.256H631.591L651.666 98.1447H651.674Z",fill:"var(--ac-global-text-color-900)"})]}),s("defs",{children:[s("linearGradient",{id:"paint0_linear_290_1904",x1:"22.0956",y1:"10.3474",x2:"97.4433",y2:"140.879",gradientUnits:"userSpaceOnUse",children:[e("stop",{stopColor:"#14BAB6"}),e("stop",{offset:"0.5",stopColor:"#00ADEE"}),e("stop",{offset:"1",stopColor:"#0095C4"})]}),s("linearGradient",{id:"paint1_linear_290_1904",x1:"95.422",y1:"114.807",x2:"31.8741",y2:"4.70214",gradientUnits:"userSpaceOnUse",children:[e("stop",{stopColor:"#FDFDFE",stopOpacity:"0"}),e("stop",{offset:"0.11",stopColor:"#FDFDFE",stopOpacity:"0.17"}),e("stop",{offset:"0.3",stopColor:"#FDFDFE",stopOpacity:"0.42"}),e("stop",{offset:"0.47",stopColor:"#FDFDFE",stopOpacity:"0.63"}),e("stop",{offset:"0.64",stopColor:"#FDFDFE",stopOpacity:"0.79"}),e("stop",{offset:"0.78",stopColor:"#FDFDFE",stopOpacity:"0.9"}),e("stop",{offset:"0.91",stopColor:"#FDFDFE",stopOpacity:"0.97"}),e("stop",{offset:"1",stopColor:"#FDFDFE"})]}),s("linearGradient",{id:"paint2_linear_290_1904",x1:"76.6695",y1:"114.126",x2:"30.8746",y2:"34.7951",gradientUnits:"userSpaceOnUse",children:[e("stop",{stopColor:"#FDFDFE",stopOpacity:"0"}),e("stop",{offset:"0.11",stopColor:"#FDFDFE",stopOpacity:"0.17"}),e("stop",{offset:"0.3",stopColor:"#FDFDFE",stopOpacity:"0.42"}),e("stop",{offset:"0.47",stopColor:"#FDFDFE",stopOpacity:"0.63"}),e("stop",{offset:"0.64",stopColor:"#FDFDFE",stopOpacity:"0.79"}),e("stop",{offset:"0.78",stopColor:"#FDFDFE",stopOpacity:"0.9"}),e("stop",{offset:"0.91",stopColor:"#FDFDFE",stopOpacity:"0.97"}),e("stop",{offset:"1",stopColor:"#FDFDFE"})]}),s("linearGradient",{id:"paint3_linear_290_1904",x1:"70.3612",y1:"119.915",x2:"44.7991",y2:"75.6384",gradientUnits:"userSpaceOnUse",children:[e("stop",{stopColor:"#FDFDFE",stopOpacity:"0"}),e("stop",{offset:"0.11",stopColor:"#FDFDFE",stopOpacity:"0.17"}),e("stop",{offset:"0.3",stopColor:"#FDFDFE",stopOpacity:"0.42"}),e("stop",{offset:"0.47",stopColor:"#FDFDFE",stopOpacity:"0.63"}),e("stop",{offset:"0.64",stopColor:"#FDFDFE",stopOpacity:"0.79"}),e("stop",{offset:"0.78",stopColor:"#FDFDFE",stopOpacity:"0.9"}),e("stop",{offset:"0.91",stopColor:"#FDFDFE",stopOpacity:"0.97"}),e("stop",{offset:"1",stopColor:"#FDFDFE"})]}),s("linearGradient",{id:"paint4_linear_290_1904",x1:"71.4208",y1:"128.85",x2:"55.5071",y2:"101.279",gradientUnits:"userSpaceOnUse",children:[e("stop",{stopColor:"#FDFDFE",stopOpacity:"0"}),e("stop",{offset:"0.11",stopColor:"#FDFDFE",stopOpacity:"0.17"}),e("stop",{offset:"0.3",stopColor:"#FDFDFE",stopOpacity:"0.42"}),e("stop",{offset:"0.47",stopColor:"#FDFDFE",stopOpacity:"0.63"}),e("stop",{offset:"0.64",stopColor:"#FDFDFE",stopOpacity:"0.79"}),e("stop",{offset:"0.78",stopColor:"#FDFDFE",stopOpacity:"0.9"}),e("stop",{offset:"0.91",stopColor:"#FDFDFE",stopOpacity:"0.97"}),e("stop",{offset:"1",stopColor:"#FDFDFE"})]}),s("linearGradient",{id:"paint5_linear_290_1904",x1:"44.5363",y1:"126.346",x2:"44.5363",y2:"155.384",gradientUnits:"userSpaceOnUse",children:[e("stop",{stopColor:"#231F20"}),e("stop",{offset:"0.03",stopColor:"#231F20",stopOpacity:"0.9"}),e("stop",{offset:"0.22",stopColor:"#231F20",stopOpacity:"0.4"}),e("stop",{offset:"0.42",stopColor:"#231F20",stopOpacity:"0.1"}),e("stop",{offset:"0.65",stopColor:"#231F20",stopOpacity:"0"})]}),s("linearGradient",{id:"paint6_linear_290_1904",x1:"77.1952",y1:"123.603",x2:"77.1952",y2:"138.409",gradientUnits:"userSpaceOnUse",children:[e("stop",{stopColor:"#231F20"}),e("stop",{offset:"1",stopColor:"#231F20",stopOpacity:"0"})]}),s("linearGradient",{id:"paint7_linear_290_1904",x1:"84.3413",y1:"85.235",x2:"84.3413",y2:"73.1301",gradientUnits:"userSpaceOnUse",children:[e("stop",{stopColor:"#231F20"}),e("stop",{offset:"0.03",stopColor:"#231F20",stopOpacity:"0.95"}),e("stop",{offset:"0.51",stopColor:"#231F20",stopOpacity:"0.26"}),e("stop",{offset:"0.81",stopColor:"#231F20",stopOpacity:"0"})]}),s("linearGradient",{id:"paint8_linear_290_1904",x1:"110.815",y1:"94.1699",x2:"110.815",y2:"64.885",gradientUnits:"userSpaceOnUse",children:[e("stop",{stopColor:"#231F20"}),e("stop",{offset:"0.18",stopColor:"#231F20",stopOpacity:"0.48"}),e("stop",{offset:"0.38",stopColor:"#231F20",stopOpacity:"0.12"}),e("stop",{offset:"0.58",stopColor:"#231F20",stopOpacity:"0"})]}),s("linearGradient",{id:"paint9_linear_290_1904",x1:"138.077",y1:"117.246",x2:"127.969",y2:"99.7278",gradientUnits:"userSpaceOnUse",children:[e("stop",{stopColor:"#231F20"}),e("stop",{offset:"1",stopColor:"#231F20",stopOpacity:"0"})]}),s("linearGradient",{id:"paint10_linear_290_1904",x1:"146.226",y1:"112.434",x2:"131.084",y2:"86.1931",gradientUnits:"userSpaceOnUse",children:[e("stop",{stopColor:"#FDFDFE",stopOpacity:"0"}),e("stop",{offset:"0.11",stopColor:"#FDFDFE",stopOpacity:"0.17"}),e("stop",{offset:"0.3",stopColor:"#FDFDFE",stopOpacity:"0.42"}),e("stop",{offset:"0.47",stopColor:"#FDFDFE",stopOpacity:"0.63"}),e("stop",{offset:"0.64",stopColor:"#FDFDFE",stopOpacity:"0.79"}),e("stop",{offset:"0.78",stopColor:"#FDFDFE",stopOpacity:"0.9"}),e("stop",{offset:"0.91",stopColor:"#FDFDFE",stopOpacity:"0.97"}),e("stop",{offset:"1",stopColor:"#FDFDFE"})]}),s("linearGradient",{id:"paint11_linear_290_1904",x1:"106.889",y1:"107.999",x2:"128.941",y2:"95.2581",gradientUnits:"userSpaceOnUse",children:[e("stop",{stopColor:"#231F20"}),e("stop",{offset:"0.31",stopColor:"#231F20",stopOpacity:"0.5"}),e("stop",{offset:"0.67",stopColor:"#231F20",stopOpacity:"0.13"}),e("stop",{offset:"1",stopColor:"#231F20",stopOpacity:"0"})]}),e("clipPath",{id:"clip0_290_1904",children:e("rect",{width:"682",height:"169",fill:"white"})})]})]})}const dp=C`
|
|
3537
3537
|
text-align: center;
|
|
3538
3538
|
margin-top: var(--ac-global-dimension-size-200);
|
|
3539
3539
|
margin-bottom: var(--ac-global-dimension-size-200);
|
|
@@ -3544,40 +3544,40 @@ fragment UsersTable_users on Query {
|
|
|
3544
3544
|
gap: var(--ac-global-dimension-size-100);
|
|
3545
3545
|
flex-wrap: wrap;
|
|
3546
3546
|
justify-content: center;
|
|
3547
|
-
`;function
|
|
3547
|
+
`;function uf(){const n=window.Config.oAuth2Idps,a=n.length>0,[l,t]=fa(),i=l.get("returnUrl"),r=l.get("message");return s(Ia,{children:[e(h,{direction:"column",gap:"size-200",alignItems:"center",children:e(F,{paddingBottom:"size-200",children:e(ul,{})})}),r&&e(F,{paddingBottom:"size-100",children:e(ne,{variant:"success",children:r})}),e(ip,{initialError:l.get("error"),onSubmit:()=>{t(o=>{const c=new URLSearchParams(o);return c.delete("message"),c.delete("error"),c})}}),a&&s(U,{children:[e("div",{css:dp,children:"or"}),e("ul",{css:cp,children:n.map(o=>e("li",{children:e(sp,{idpName:o.name,idpDisplayName:o.displayName,returnUrl:i},o.name)},o.name))})]})]})}const gs=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"input"}],a=[{alias:null,args:[{kind:"Variable",name:"input",variableName:"input"}],concreteType:"UserMutationPayload",kind:"LinkedField",name:"patchViewer",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null}],storageKey:null}];return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"ResetPasswordFormMutation",selections:a,type:"Mutation",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"ResetPasswordFormMutation",selections:a},params:{cacheID:"d09af5e3a2a3d10f117373e25bef11e6",id:null,metadata:{},name:"ResetPasswordFormMutation",operationKind:"mutation",text:`mutation ResetPasswordFormMutation(
|
|
3548
3548
|
$input: PatchViewerInput!
|
|
3549
3549
|
) {
|
|
3550
3550
|
patchViewer(input: $input) {
|
|
3551
3551
|
__typename
|
|
3552
3552
|
}
|
|
3553
3553
|
}
|
|
3554
|
-
`}}}();gs.hash="f8f5c30b0e00c17cdda7557c73c3c2d3";const
|
|
3554
|
+
`}}}();gs.hash="f8f5c30b0e00c17cdda7557c73c3c2d3";const Jn=4;function up(){const n=Y(),a=ce(),[l,t]=D.useMutation(gs),{control:i,handleSubmit:r}=Ie({defaultValues:{currentPassword:"",newPassword:"",confirmPassword:""}}),o=u.useCallback(c=>{l({variables:{input:{currentPassword:c.currentPassword,newPassword:c.newPassword}},onCompleted:()=>{const d=ct({path:"/login",searchParams:{message:"Password has been reset."}});n(d)},onError:d=>{a({title:"Failed to reset password",message:d.message})}})},[l,n,a]);return s(ye,{onSubmit:r(o),children:[e(G,{name:"currentPassword",control:i,rules:{required:"the current is required"},render:({field:{name:c,onChange:d,onBlur:g,value:f},fieldState:{invalid:m,error:p}})=>e(X,{label:"Old Password",type:"password",name:c,isRequired:!0,description:"The current password",errorMessage:p==null?void 0:p.message,validationState:m?"invalid":"valid",onChange:d,onBlur:g,value:f})}),e(G,{name:"newPassword",control:i,rules:{required:"Password is required",minLength:{value:Jn,message:`Password must be at least ${Jn} characters`},validate:(c,d)=>c!==d.currentPassword||"New password must be different"},render:({field:{name:c,onChange:d,onBlur:g,value:f},fieldState:{invalid:m,error:p}})=>e(X,{label:"New Password",type:"password",isRequired:!0,description:`Password must be at least ${Jn} characters`,name:c,errorMessage:p==null?void 0:p.message,validationState:m?"invalid":"valid",onChange:d,onBlur:g,defaultValue:f})}),e(G,{name:"confirmPassword",control:i,rules:{required:"Password is required",minLength:{value:Jn,message:`Password must be at least ${Jn} characters`},validate:(c,d)=>c===d.newPassword||"Passwords do not match"},render:({field:{name:c,onChange:d,onBlur:g,value:f},fieldState:{invalid:m,error:p}})=>e(X,{label:"Confirm Password",isRequired:!0,type:"password",description:"Confirm the new password",name:c,errorMessage:p==null?void 0:p.message,validationState:m?"invalid":"valid",onChange:d,onBlur:g,defaultValue:f})}),e(F,{paddingTop:"size-200",children:s("div",{css:C`
|
|
3555
3555
|
display: flex;
|
|
3556
3556
|
flex-direction: row;
|
|
3557
3557
|
gap: var(--ac-global-dimension-size-200);
|
|
3558
3558
|
& > * {
|
|
3559
3559
|
width: 50%;
|
|
3560
3560
|
}
|
|
3561
|
-
`,children:[e(M,{variant:"default",onClick:()=>{n(-1)},children:"Cancel"}),e(M,{variant:"primary",type:"submit",disabled:t,children:t?"Resetting...":"Reset Password"})]})})]})}function
|
|
3561
|
+
`,children:[e(M,{variant:"default",onClick:()=>{n(-1)},children:"Cancel"}),e(M,{variant:"primary",type:"submit",disabled:t,children:t?"Resetting...":"Reset Password"})]})})]})}function mf(){return s(Ia,{children:[e(h,{direction:"column",gap:"size-200",alignItems:"center",children:e(F,{paddingBottom:"size-200",children:e(ul,{})})}),e(up,{})]})}const Zn=4,mp="An error occurred. Please try resetting again.";function gp({resetToken:n}){const a=Y(),[l,t]=u.useState(null),[i,r]=u.useState(!1),o=u.useCallback(async({resetToken:f,newPassword:m})=>{t(null),r(!0);try{const p=await fetch("/auth/password-reset",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({token:f,password:m})});if(!p.ok){const y=await p.text();t(y);return}}catch{t(mp);return}finally{r(()=>!1)}a(`/login?message=${encodeURIComponent("Password has been reset.")}`)},[t,a]),{control:c,handleSubmit:d,formState:{isDirty:g}}=Ie({defaultValues:{resetToken:n,newPassword:"",confirmPassword:""}});return s(U,{children:[l?e(F,{paddingBottom:"size-100",children:e(ne,{variant:"danger",children:l})}):null,s(ye,{onSubmit:d(o),children:[e(G,{name:"newPassword",control:c,rules:{required:"Password is required",minLength:{value:Zn,message:`Password must be at least ${Zn} characters`}},render:({field:{name:f,onChange:m,onBlur:p,value:y},fieldState:{invalid:b,error:k}})=>e(X,{label:"New Password",type:"password",isRequired:!0,description:`Password must be at least ${Zn} characters`,name:f,errorMessage:k==null?void 0:k.message,validationState:b?"invalid":"valid",onChange:m,onBlur:p,defaultValue:y})}),e(G,{name:"confirmPassword",control:c,rules:{required:"Password is required",minLength:{value:Zn,message:`Password must be at least ${Zn} characters`},validate:(f,m)=>f===m.newPassword||"Passwords do not match"},render:({field:{name:f,onChange:m,onBlur:p,value:y},fieldState:{invalid:b,error:k}})=>e(X,{label:"Confirm Password",isRequired:!0,type:"password",description:"Confirm the new password",name:f,errorMessage:k==null?void 0:k.message,validationState:b?"invalid":"valid",onChange:m,onBlur:p,defaultValue:y})}),e("div",{css:C`
|
|
3562
3562
|
margin-top: var(--ac-global-dimension-size-200);
|
|
3563
3563
|
margin-bottom: var(--ac-global-dimension-size-50);
|
|
3564
3564
|
button {
|
|
3565
3565
|
width: 100%;
|
|
3566
3566
|
}
|
|
3567
|
-
`,children:e(M,{variant:g?"primary":"default",type:"submit",disabled:i,children:i?"Resetting...":"Reset Password"})})]})]})}function
|
|
3567
|
+
`,children:e(M,{variant:g?"primary":"default",type:"submit",disabled:i,children:i?"Resetting...":"Reset Password"})})]})]})}function gf(){const n=Y(),[a]=fa(),l=a.get("token");return l?s(Ia,{children:[e(h,{direction:"column",gap:"size-200",alignItems:"center",children:e(F,{paddingBottom:"size-200",children:e(ul,{})})}),e(gp,{resetToken:l}),e(F,{paddingTop:"size-200",children:e(h,{direction:"column",alignItems:"center",justifyContent:"center",children:e(Ze,{to:"/login",children:"Back to Login"})})})]}):(n("/login"),null)}const ps=function(){var n=[{alias:null,args:null,concreteType:"User",kind:"LinkedField",name:"viewer",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"email",storageKey:null}],storageKey:null}];return{fragment:{argumentDefinitions:[],kind:"Fragment",metadata:null,name:"resetPasswordLoaderQuery",selections:n,type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[],kind:"Operation",name:"resetPasswordLoaderQuery",selections:n},params:{cacheID:"c97389cd896f3e1746d0adf67c759462",id:null,metadata:{},name:"resetPasswordLoaderQuery",operationKind:"query",text:`query resetPasswordLoaderQuery {
|
|
3568
3568
|
viewer {
|
|
3569
3569
|
id
|
|
3570
3570
|
email
|
|
3571
3571
|
}
|
|
3572
3572
|
}
|
|
3573
|
-
`}}}();ps.hash="ccd75708c3ba7c1b283f7858dfa8d20e";async function
|
|
3573
|
+
`}}}();ps.hash="ccd75708c3ba7c1b283f7858dfa8d20e";async function pf(){const n=await D.fetchQuery(xe,ps,{}).toPromise();return n!=null&&n.viewer?n:Pn("/login")}function pp({onResetSent:n}){const[a,l]=u.useState(null),[t,i]=u.useState(!1),r=u.useCallback(async d=>{l(null),i(!0);try{const g=await fetch("/auth/password-reset-email",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(d)});if(!g.ok){const f=await g.text();l(f);return}n()}finally{i(()=>!1)}},[n,l]),{control:o,handleSubmit:c}=Ie({defaultValues:{email:""}});return s(U,{children:[a?e(F,{paddingBottom:"size-100",children:e(ne,{variant:"danger",children:a})}):null,s(ye,{onSubmit:c(r),children:[e(G,{name:"email",control:o,render:({field:{onChange:d,value:g}})=>e(X,{label:"Email",name:"email",isRequired:!0,type:"email",onChange:d,value:g,placeholder:"your email address",description:"Enter the email address associated with your account."})}),e("div",{css:C`
|
|
3574
3574
|
margin-top: var(--ac-global-dimension-size-200);
|
|
3575
3575
|
margin-bottom: var(--ac-global-dimension-size-50);
|
|
3576
3576
|
button {
|
|
3577
3577
|
width: 100%;
|
|
3578
3578
|
}
|
|
3579
|
-
`,children:e(M,{variant:"primary",type:"submit",loading:t,children:"Send"})})]})]})}function
|
|
3580
|
-
a link to reset your password.`})]}),e(pp,{onResetSent:()=>a(!0)})]});return e(
|
|
3579
|
+
`,children:e(M,{variant:"primary",type:"submit",loading:t,children:"Send"})})]})]})}function yf(){const[n,a]=u.useState(!1),l=n?s(h,{direction:"column",alignItems:"center",justifyContent:"center",gap:"size-100",children:[e(re,{level:1,children:"Check your email"}),e("p",{children:"Thanks! If an account with that email address exists, we sent you a link to reset your password."})]}):s(U,{children:[s(h,{direction:"column",alignItems:"center",justifyContent:"center",gap:"size-100",children:[e(re,{level:1,children:"Forgot Password"}),e("p",{children:`Enter the email address associated with your account and we'll send you
|
|
3580
|
+
a link to reset your password.`})]}),e(pp,{onResetSent:()=>a(!0)})]});return e(Ia,{children:s("div",{css:C`
|
|
3581
3581
|
& a {
|
|
3582
3582
|
text-align: center;
|
|
3583
3583
|
width: 100%;
|
|
@@ -3654,14 +3654,14 @@ fragment APIKeysTableFragment on User {
|
|
|
3654
3654
|
}
|
|
3655
3655
|
id
|
|
3656
3656
|
}
|
|
3657
|
-
`}}}();hs.hash="6c32098d55e4cba859dcec73f3ccd28c";const ks=function(){var n={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null};return{argumentDefinitions:[],kind:"Fragment",metadata:{refetch:{connection:null,fragmentPathInResult:["node"],operation:hs,identifierInfo:{identifierField:"id",identifierQueryVariableName:"id"}}},name:"APIKeysTableFragment",selections:[{alias:null,args:null,concreteType:"UserApiKey",kind:"LinkedField",name:"apiKeys",plural:!0,selections:[n,{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"description",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"createdAt",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"expiresAt",storageKey:null}],storageKey:null},n],type:"User",abstractKey:null}}();ks.hash="6c32098d55e4cba859dcec73f3ccd28c";const
|
|
3657
|
+
`}}}();hs.hash="6c32098d55e4cba859dcec73f3ccd28c";const ks=function(){var n={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null};return{argumentDefinitions:[],kind:"Fragment",metadata:{refetch:{connection:null,fragmentPathInResult:["node"],operation:hs,identifierInfo:{identifierField:"id",identifierQueryVariableName:"id"}}},name:"APIKeysTableFragment",selections:[{alias:null,args:null,concreteType:"UserApiKey",kind:"LinkedField",name:"apiKeys",plural:!0,selections:[n,{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"description",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"createdAt",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"expiresAt",storageKey:null}],storageKey:null},n],type:"User",abstractKey:null}}();ks.hash="6c32098d55e4cba859dcec73f3ccd28c";const El=70;function yp({query:n}){const[a,l]=D.useRefetchableFragment(ks,n),t=oe(),[i]=D.useMutation(fs),r=u.useCallback(m=>{i({variables:{input:{id:m}},onCompleted:()=>{t({title:"API key deleted",message:"The key has been deleted and is no longer active."}),u.startTransition(()=>{l({},{fetchPolicy:"network-only"})})}})},[i,t,l]),o=u.useMemo(()=>[...a.apiKeys],[a]),c=u.useMemo(()=>[{header:"Name",accessorKey:"name",size:100,cell:me},{header:"Description",accessorKey:"description",cell:me},{header:"Created At",accessorKey:"createdAt",size:El,cell:Fe},{header:"Expires At",accessorKey:"expiresAt",size:El,cell:Fe},{header:"",accessorKey:"id",size:10,cell:({row:p})=>e(h,{direction:"row",justifyContent:"end",width:"100%",children:e(il,{handleDelete:()=>{r(p.original.id)}})}),meta:{textAlign:"right"}}],[r]),d=he({columns:c,data:o,getCoreRowModel:ke()}),g=d.getRowModel().rows,f=d.getRowModel().rows.length===0;return s("table",{css:We,children:[e("thead",{children:d.getHeaderGroups().map(m=>e("tr",{children:m.headers.map(p=>e("th",{colSpan:p.colSpan,children:p.isPlaceholder?null:s("div",{className:p.column.getCanSort()?"cursor-pointer":"",onClick:p.column.getToggleSortingHandler(),style:{left:p.getStart(),width:p.getSize()},children:[Z(p.column.columnDef.header,p.getContext()),p.column.getIsSorted()?e(P,{className:"sort-icon",svg:p.column.getIsSorted()==="asc"?e(I.ArrowUpFilled,{}):e(I.ArrowDownFilled,{})}):null]})},p.id))},m.id))}),f?e(Je,{message:"No Keys"}):e("tbody",{children:g.map(m=>e("tr",{children:m.getVisibleCells().map(p=>e("td",{children:Z(p.column.columnDef.cell,p.getContext())},p.id))},m.id))})]})}function fp({viewer:n}){const[a,l]=u.useState(null),t=ce(),[i,r]=D.useMutation(ys),o=u.useCallback(c=>{i({variables:{input:{...c,expiresAt:c.expiresAt||null}},onCompleted:d=>{l(e(st,{jwt:d.createUserApiKey.jwt}))},onError:d=>{t({title:"Error creating API key",message:d.message})}})},[i,t]);return s(V,{title:"API Keys",variant:"compact",bodyStyle:{padding:0},extra:e(M,{variant:"default",size:"compact",icon:e(P,{svg:e(I.PlusCircleOutline,{})}),onClick:()=>l(e(ot,{onSubmit:o,isCommitting:r})),children:"New Key"}),children:[e(yp,{query:n}),e(W,{onDismiss:()=>{l(null)},children:a})]})}const bs=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"input"}],a=[{alias:null,args:[{kind:"Variable",name:"input",variableName:"input"}],concreteType:"UserMutationPayload",kind:"LinkedField",name:"patchViewer",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null}],storageKey:null}];return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"ViewerProfileCardMutation",selections:a,type:"Mutation",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"ViewerProfileCardMutation",selections:a},params:{cacheID:"03f161df42c71b5924a8ee665e01cdce",id:null,metadata:{},name:"ViewerProfileCardMutation",operationKind:"mutation",text:`mutation ViewerProfileCardMutation(
|
|
3658
3658
|
$input: PatchViewerInput!
|
|
3659
3659
|
) {
|
|
3660
3660
|
patchViewer(input: $input) {
|
|
3661
3661
|
__typename
|
|
3662
3662
|
}
|
|
3663
3663
|
}
|
|
3664
|
-
`}}}();bs.hash="4a11ca65151d84fe95f636763c91dc68";function hp(){const{viewer:n,refetchViewer:a}=
|
|
3664
|
+
`}}}();bs.hash="4a11ca65151d84fe95f636763c91dc68";function hp(){const{viewer:n,refetchViewer:a}=ut(),l=ce(),t=oe(),[i,r]=D.useMutation(bs),o=Y(),{control:c,handleSubmit:d,formState:{isDirty:g},reset:f}=Ie({defaultValues:{username:(n==null?void 0:n.username)||""}}),m=u.useCallback(p=>{i({variables:{input:{newUsername:p.username}},onCompleted:()=>{t({title:"Profile updated",message:"Your profile has been updated"}),f({username:p.username}),a()},onError:y=>{l({title:"Failed update profile",message:y.message})}})},[i,t,f,a,l]);return n?s(V,{title:"Profile",variant:"compact",bodyStyle:{padding:0},extra:n.authMethod==="LOCAL"&&e(M,{variant:"default",size:"compact",onClick:()=>{o("/reset-password")},children:"Reset Password"}),children:[e(F,{paddingTop:"size-200",paddingStart:"size-200",paddingEnd:"size-200",children:s(h,{direction:"row",gap:"size-200",alignItems:"center",children:[e(dt,{name:n.username||n.email,profilePictureUrl:n.profilePictureUrl}),s(h,{direction:"column",gap:"size-50",children:[e(re,{level:2,weight:"heavy",children:n.username||n.email}),e(K,{children:n.role.name.toLocaleLowerCase()})]})]})}),e(F,{children:s(ye,{onSubmit:d(m),children:[s(F,{padding:"size-200",children:[e(X,{label:"Email",value:n.email,isReadOnly:!0}),e(G,{name:"username",control:c,rules:{required:"A username is required as it needs to be unique"},render:({field:{name:p,onChange:y,onBlur:b,value:k},fieldState:{invalid:S,error:v}})=>e(X,{label:"Username",isRequired:!0,description:"A unique username",name:p,errorMessage:v==null?void 0:v.message,validationState:S?"invalid":"valid",onChange:y,onBlur:b,defaultValue:k})})]}),e(F,{paddingTop:"size-100",paddingBottom:"size-100",paddingStart:"size-200",paddingEnd:"size-200",borderTopColor:"dark",borderTopWidth:"thin",children:e(h,{direction:"row",gap:"size-100",justifyContent:"end",children:e(M,{variant:g?"primary":"default",size:"compact",disabled:!g,onClick:()=>{d(m)()},children:r?"Saving...":"Save"})})})]})})]}):null}const kp=C`
|
|
3665
3665
|
overflow-y: auto;
|
|
3666
3666
|
`,bp=C`
|
|
3667
3667
|
padding: var(--ac-global-dimension-size-400);
|
|
@@ -3671,11 +3671,11 @@ fragment APIKeysTableFragment on User {
|
|
|
3671
3671
|
width: 100%;
|
|
3672
3672
|
margin-left: auto;
|
|
3673
3673
|
margin-right: auto;
|
|
3674
|
-
`;function
|
|
3674
|
+
`;function ff(){const{viewer:n}=ut();return n?e("main",{css:kp,children:e("div",{css:bp,children:s(h,{direction:"column",gap:"size-200",children:[e(hp,{}),e(fp,{viewer:n})]})})}):null}const Ss=u.createContext(null);function Sp({children:n,...a}){const[l]=u.useState(()=>ud(a));return e(Ss.Provider,{value:l,children:n})}function q(n,a){const l=Ke.useContext(Ss);if(!l)throw new Error("Missing PlaygroundContext.Provider in the tree");return ya(l,n,a)}const vp=4,Cp={user:["user","human"],ai:["assistant","bot","ai"],system:["system"],tool:["tool"]},Fp="Unable to parse span input messages, expected messages which include a role and content.",Kp="Unable to parse span output messages, expected messages which include a role and content.",xp="Unable to parse span output expected output.value to be present.",Dp="Unable to parse span attributes, attributes must be valid JSON.",Tp="Unable to parse model name, expected llm.model_name to be present.",Rl={AZURE_OPENAI:[],ANTHROPIC:["claude"],OPENAI:["gpt","o1"]},Ip={OPENAI:"OPENAI_API_KEY",ANTHROPIC:"ANTHROPIC_API_KEY",AZURE_OPENAI:"AZURE_OPENAI_API_KEY"};function Lp(){const n=q(t=>Array.from(new Set(t.instances.map(i=>i.model.provider)))),a=Ua(t=>t.setCredential),l=Ua(t=>t);return e("div",{css:C`
|
|
3675
3675
|
.ac-dropdown-button {
|
|
3676
3676
|
min-width: 0px;
|
|
3677
3677
|
}
|
|
3678
|
-
`,children:s(tn,{placement:"bottom",children:[e(
|
|
3678
|
+
`,children:s(tn,{placement:"bottom",children:[e(Ja,{size:"compact",children:"API Keys"}),e(ha,{children:e(F,{padding:"size-200",children:s(h,{direction:"column",gap:"size-100",children:[e(re,{level:2,weight:"heavy",children:"API Keys"}),e(K,{color:"text-700",children:"API keys are stored in your browser and used to communicate with their respective API's."}),e(ye,{children:n.map(t=>{const i=Ip[t];return e(X,{label:i,type:"password",isRequired:!0,onChange:r=>{a({provider:t,value:r})},value:l[t]},t)})})]})})})]})})}const Pp=O.object({function:O.object({name:O.string(),arguments:O.string()}).partial()}).partial(),vs=O.object({[se.message]:O.object({[ve.role]:O.string(),[ve.content]:O.string(),[ve.tool_calls]:O.array(Pp).optional()})}),wp=O.object({[se.llm]:O.object({[_e.input_messages]:O.array(vs)})}),Ap=O.object({[se.llm]:O.object({[_e.output_messages]:O.array(vs)})}),_p=O.object({[se.output]:O.object({value:O.string()})}),Cs=mt()(O.enum(["user","ai","system","tool"])),Ep=mt()(O.object({id:O.number(),role:Cs,content:O.string()})),Rp=O.array(Ep),Mp=O.object({[se.llm]:O.object({[_e.model_name]:O.string()})});function Fs(n){return Cs.safeParse(n).success}function Np(n){if(Fs(n))return n;for(const[a,l]of Object.entries(Cp))if(l.includes(n))return a;return pd}function Ks(n){return n.map(({message:a})=>({id:Da(),role:Np(a.role),content:a.content}))}function Vp(n){const a=wp.safeParse(n);return a.success?{messageParsingErrors:[],messages:Ks(a.data.llm.input_messages)}:{messageParsingErrors:[Fp],messages:null}}function zp(n){const a=[],l=Ap.safeParse(n);if(l.success)return{output:Ks(l.data.llm.output_messages),outputParsingErrors:a};a.push(Kp);const t=_p.safeParse(n);return t.success?{output:t.data.output.value,outputParsingErrors:a}:(a.push(xp),{output:void 0,outputParsingErrors:a})}function $p(n){for(const a of Object.keys(Rl))if(Rl[a].some(t=>n.includes(t)))return a;return gd}function Op(n){const{success:a,data:l}=Mp.safeParse(n);return a?{modelConfig:{modelName:l.llm.model_name,provider:$p(l.llm.model_name)},parsingErrors:[]}:{modelConfig:null,parsingErrors:[Tp]}}function Qp(n){const a=md(),{json:l,parseError:t}=ll(n.attributes);if(t)return{playgroundInstance:a,parsingErrors:[Dp]};const{messages:i,messageParsingErrors:r}=Vp(l),{output:o,outputParsingErrors:c}=zp(l),{modelConfig:d,parsingErrors:g}=Op(l);return{playgroundInstance:{...a,model:d??a.model,template:i!=null?{__type:"chat",messages:i}:a.template,output:o},parsingErrors:[...r,...c,...g]}}const jp=n=>Rp.safeParse(n).success,qp=({instances:n,templateLanguage:a})=>{const l=new Set,t=yd(a);return n.forEach(i=>{switch(i.template.__type){case"chat":{i.template.messages.forEach(o=>{(o.content==null?[]:t.extractVariables(o.content)).forEach(d=>{l.add(d)})});break}case"text_completion":{t.extractVariables(i.template.prompt).forEach(c=>{l.add(c)});break}default:Ce()}}),Array.from(l)},Up=()=>{const{instances:n,templateLanguage:a}=q(t=>({instances:t.instances,templateLanguage:t.templateLanguage}));return u.useMemo(()=>qp({instances:n,templateLanguage:a}),[n,a])},xs=()=>{const n=Up(),a=q(t=>fd(t.input)?t.input.variablesValueCache:{}),l=u.useMemo(()=>n.reduce((t,i)=>(t[i]=a[i]||"",t),{}),[n,a]);return{variableKeys:n,variablesMap:l}},Bp={lineNumbers:!1,highlightActiveLine:!1,foldGutter:!1,highlightActiveLineGutter:!1,bracketMatching:!1,syntaxHighlighting:!1},Hp=[ft.lineWrapping],Gp=({label:n,value:a,onChange:l})=>{const{theme:t}=zn();return e(la,{label:n,children:e(yn,{width:"100%",children:e(sa,{theme:t==="light"?Ad:oa,basicSetup:Bp,value:a,extensions:Hp,onChange:l})})})};function Wp(){const{variableKeys:n,variablesMap:a}=xs(),l=q(i=>i.setVariableValue),t=q(i=>i.templateLanguage);if(n.length===0){let i="";switch(t){case"F_STRING":{i="{input name}";break}case"MUSTACHE":{i="{{input name}}";break}default:Ce()}return e(F,{padding:"size-100",children:e(h,{direction:"column",justifyContent:"center",alignItems:"center",children:s(K,{color:"text-700",children:["Add variable inputs to your prompt using"," ",e(K,{color:"text-900",children:i})," within your prompt template."]})})})}return e(h,{direction:"column",gap:"size-200",width:"100%",children:n.map((i,r)=>e(Gp,{label:i,value:a[i],onChange:o=>l(i,o)},r))})}function Jp(){const n=q(l=>l.inputMode),a=q(l=>l.setInputMode);return s(Ol,{value:n,variant:"inline-button",size:"compact",onChange:l=>{(l==="manual"||l==="dataset")&&a(l)},children:[e(ga,{label:"manual",value:"manual",children:"Manual"}),e(ga,{label:"Dataset",value:"dataset",children:"Dataset"})]})}const Ds=function(){var n={defaultValue:null,kind:"LocalArgument",name:"apiKey"},a={defaultValue:null,kind:"LocalArgument",name:"invocationParameters"},l={defaultValue:null,kind:"LocalArgument",name:"messages"},t={defaultValue:null,kind:"LocalArgument",name:"model"},i={defaultValue:null,kind:"LocalArgument",name:"templateOptions"},r={defaultValue:null,kind:"LocalArgument",name:"tools"},o={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},c=[{alias:null,args:[{fields:[{kind:"Variable",name:"apiKey",variableName:"apiKey"},{kind:"Variable",name:"invocationParameters",variableName:"invocationParameters"},{kind:"Variable",name:"messages",variableName:"messages"},{kind:"Variable",name:"model",variableName:"model"},{kind:"Variable",name:"template",variableName:"templateOptions"},{kind:"Variable",name:"tools",variableName:"tools"}],kind:"ObjectValue",name:"input"}],concreteType:null,kind:"LinkedField",name:"chatCompletion",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},{kind:"InlineFragment",selections:[{alias:null,args:null,kind:"ScalarField",name:"content",storageKey:null}],type:"TextChunk",abstractKey:null},{kind:"InlineFragment",selections:[o,{alias:null,args:null,concreteType:"FunctionCallChunk",kind:"LinkedField",name:"function",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"arguments",storageKey:null}],storageKey:null}],type:"ToolCallChunk",abstractKey:null},{kind:"InlineFragment",selections:[{alias:null,args:null,concreteType:"Span",kind:"LinkedField",name:"span",plural:!1,selections:[o],storageKey:null}],type:"FinishedChatCompletion",abstractKey:null}],storageKey:null}];return{fragment:{argumentDefinitions:[n,a,l,t,i,r],kind:"Fragment",metadata:null,name:"PlaygroundOutputSubscription",selections:c,type:"Subscription",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[l,t,a,r,i,n],kind:"Operation",name:"PlaygroundOutputSubscription",selections:c},params:{cacheID:"54f42285c230d77abe27c047dc37e700",id:null,metadata:{},name:"PlaygroundOutputSubscription",operationKind:"subscription",text:`subscription PlaygroundOutputSubscription(
|
|
3679
3679
|
$messages: [ChatCompletionMessageInput!]!
|
|
3680
3680
|
$model: GenerativeModelInput!
|
|
3681
3681
|
$invocationParameters: InvocationParameters!
|
|
@@ -3723,10 +3723,10 @@ fragment APIKeysTableFragment on User {
|
|
|
3723
3723
|
}
|
|
3724
3724
|
}
|
|
3725
3725
|
}
|
|
3726
|
-
`}}}();Ts.hash="c89cb87e785645bbf42e3eadbacc4fc0";function Zp({
|
|
3726
|
+
`}}}();Ts.hash="c89cb87e785645bbf42e3eadbacc4fc0";function Zp({traceId:n,projectId:a,title:l}){const t=Y();return e(H,{title:l,size:"fullscreen",extra:e(M,{variant:"default",onClick:()=>t(`/projects/${a}/traces/${n}`),children:"View Trace in Project"}),children:e(dl,{traceId:n,projectId:a})})}function Xp({spanId:n}){const[a,l]=u.useState(null),t=D.useLazyLoadQuery(Ts,{spanId:n});if(!t.span||!t.span.project||!t.span.context)return null;const{project:i,context:{traceId:r}}=t.span;return s(F,{borderTopColor:"light",borderTopWidth:"thin",paddingStart:"size-200",paddingEnd:"size-200",paddingTop:"size-100",paddingBottom:"size-100",children:[s(h,{direction:"row",gap:"size-200",justifyContent:"space-between",children:[s(h,{direction:"row",gap:"size-100",alignItems:"center",children:[e(Fa,{tokenCountTotal:t.span.tokenCountTotal||0,tokenCountPrompt:t.span.tokenCountPrompt||0,tokenCountCompletion:t.span.tokenCountCompletion||0}),e(we,{latencyMs:t.span.latencyMs||0})]}),e(M,{size:"compact",variant:"default",icon:e(P,{svg:e(I.Trace,{})}),onClick:()=>{u.startTransition(()=>{l(e(u.Suspense,{children:e(Zp,{traceId:r,projectId:i.id,title:"Playground Trace"})}))})},children:"View Trace"})]}),e(W,{type:"slideOver",isDismissable:!0,onDismiss:()=>l(null),children:a})]})}function Yp({index:n,title:a}){return s(h,{direction:"row",gap:"size-100",alignItems:"center",children:[e(gt,{index:n}),e("span",{children:a})]})}function Ha({message:n}){const{role:a,content:l,toolCalls:t}=n,i=ol(a);return s(V,{title:a,...i,variant:"compact",children:[l!=null&&e(h,{direction:"column",alignItems:"start",children:l}),t&&t.length>0?t.map(r=>s("pre",{css:C`
|
|
3727
3727
|
text-wrap: wrap;
|
|
3728
3728
|
margin: var(--ac-global-dimension-static-size-100) 0;
|
|
3729
|
-
`,children:[r.function.name,"(",JSON.stringify(JSON.parse(r.function.arguments),null,2),")"]},r.id)):null]})}function
|
|
3729
|
+
`,children:[r.function.name,"(",JSON.stringify(JSON.parse(r.function.arguments),null,2),")"]},r.id)):null]})}function ey(n){const a=n.playgroundInstanceId,l=q(c=>c.instances.find(d=>d.id===a)),t=q(c=>c.instances.findIndex(d=>d.id===a));if(!l)throw new Error(`Playground instance ${a} not found`);const i=l.activeRunId,r=i!==null,o=u.useMemo(()=>r?e(ty,{playgroundInstanceId:a},i):jp(l.output)?l.output.map((d,g)=>e(Ha,{message:d},g)):typeof l.output=="string"?e(Ha,{message:{id:Da(),content:l.output,role:"ai"}}):"click run to see output",[r,l.output,a,i]);return s(V,{title:e(Yp,{index:t,title:"Output"}),collapsible:!0,variant:"compact",bodyStyle:{padding:0},children:[e(F,{padding:"size-200",children:o}),e(u.Suspense,{children:l.spanId?e(Xp,{spanId:l.spanId}):null})]})}function ny({params:n,runId:a,onNext:l,onCompleted:t,onFailed:i}){const r=u.useMemo(()=>({subscription:Ds,variables:n,onNext:o=>{o&&l(o)},onCompleted:()=>{t()},onError:o=>{i(o)}}),[a]);return D.useSubscription(r)}function ay(n){return{content:n.content,role:ly(n.role)}}function ly(n){switch(n){case"system":return"SYSTEM";case"user":return"USER";case"tool":return"TOOL";case"ai":return"AI";default:Ce()}}function ty(n){const a=q(k=>k.instances),l=Ua(k=>k),t=a.find(k=>k.id===n.playgroundInstanceId),i=q(k=>k.updateInstance),r=q(k=>k.templateLanguage),{variablesMap:o}=xs(),c=q(k=>k.markPlaygroundInstanceComplete),d=ce();if(!t)throw new Error("No instance found");if(typeof t.activeRunId!="number")throw new Error("No message found");if(t.template.__type!=="chat")throw new Error("We only support chat templates for now");const[g,f]=u.useState(void 0),[m,p]=u.useState([]),y=t.model.provider==="AZURE_OPENAI"?{endpoint:t.model.endpoint,apiVersion:t.model.apiVersion}:{},b={};return t.tools.length&&(b.toolChoice=t.toolChoice),ny({params:{messages:t.template.messages.map(ay),model:{providerKey:t.model.provider,name:t.model.modelName||"",...y},invocationParameters:b,templateOptions:{variables:o,language:r},tools:t.tools.length?t.tools.map(k=>k.definition):void 0,apiKey:l[t.model.provider]},runId:t.activeRunId,onNext:k=>{const S=k.chatCompletion;S.__typename==="TextChunk"?f(v=>(v||"")+S.content):S.__typename==="ToolCallChunk"?p(v=>{let w=!1;const L=v.map(A=>A.id===S.id?(w=!0,{...A,function:{...A.function,arguments:A.function.arguments+S.function.arguments}}):A);return w||L.push({id:S.id,function:{name:S.function.name,arguments:S.function.arguments}}),L}):S.__typename==="FinishedChatCompletion"&&i({instanceId:n.playgroundInstanceId,patch:{spanId:S.span.id}})},onCompleted:()=>{c(n.playgroundInstanceId)},onFailed:()=>{c(n.playgroundInstanceId),i({instanceId:n.playgroundInstanceId,patch:{activeRunId:null}}),d({title:"Failed to get output",message:"Please try again."})}}),!g&&(m.length===0||t.isRunning)?s(h,{direction:"row",gap:"size-100",alignItems:"center",children:[e(P,{svg:e(I.LoadingOutline,{})}),"Running..."]}):e(Ha,{message:{id:Da(),content:g,role:"ai",toolCalls:m}})}function iy(){const n=q(l=>l.runPlaygroundInstances),a=q(l=>l.instances.some(t=>t.isRunning));return e(M,{variant:"primary",disabled:a,icon:e(P,{svg:e(I.PlayCircleOutline,{})}),loading:a,size:"compact",onClick:()=>{n()},children:a?"Running...":"Run"})}function ry(){const n=q(l=>l.streaming),a=q(l=>l.setStreaming);return e(Mn,{labelPlacement:"start",isSelected:n,onChange:()=>{a(!n)},children:"Stream"})}const Is=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"providerKey"}],a=[{kind:"Variable",name:"providerKey",variableName:"providerKey"}],l={alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null};return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"ModelConfigButtonDialogQuery",selections:[{args:null,kind:"FragmentSpread",name:"ModelProviderPickerFragment"},{args:a,kind:"FragmentSpread",name:"ModelPickerFragment"}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"ModelConfigButtonDialogQuery",selections:[{alias:null,args:null,concreteType:"GenerativeProvider",kind:"LinkedField",name:"modelProviders",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"key",storageKey:null},l],storageKey:null},{alias:null,args:[{fields:a,kind:"ObjectValue",name:"input"}],concreteType:"GenerativeModel",kind:"LinkedField",name:"models",plural:!0,selections:[l],storageKey:null}]},params:{cacheID:"8e6ad232aae761280ca29a0571fe7c23",id:null,metadata:{},name:"ModelConfigButtonDialogQuery",operationKind:"query",text:`query ModelConfigButtonDialogQuery(
|
|
3730
3730
|
$providerKey: GenerativeProviderKey!
|
|
3731
3731
|
) {
|
|
3732
3732
|
...ModelProviderPickerFragment
|
|
@@ -3745,16 +3745,16 @@ fragment ModelProviderPickerFragment on Query {
|
|
|
3745
3745
|
name
|
|
3746
3746
|
}
|
|
3747
3747
|
}
|
|
3748
|
-
`}}}();Is.hash="c9b38e766093b2378047d22b01ef0fbf";const Ls={argumentDefinitions:[{defaultValue:"OPENAI",kind:"LocalArgument",name:"providerKey"}],kind:"Fragment",metadata:null,name:"ModelPickerFragment",selections:[{alias:null,args:[{fields:[{kind:"Variable",name:"providerKey",variableName:"providerKey"}],kind:"ObjectValue",name:"input"}],concreteType:"GenerativeModel",kind:"LinkedField",name:"models",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null}],storageKey:null}],type:"Query",abstractKey:null};Ls.hash="1e660ad77ce19db1c1bbe8698a661b4f";function
|
|
3748
|
+
`}}}();Is.hash="c9b38e766093b2378047d22b01ef0fbf";const Ls={argumentDefinitions:[{defaultValue:"OPENAI",kind:"LocalArgument",name:"providerKey"}],kind:"Fragment",metadata:null,name:"ModelPickerFragment",selections:[{alias:null,args:[{fields:[{kind:"Variable",name:"providerKey",variableName:"providerKey"}],kind:"ObjectValue",name:"input"}],concreteType:"GenerativeModel",kind:"LinkedField",name:"models",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null}],storageKey:null}],type:"Query",abstractKey:null};Ls.hash="1e660ad77ce19db1c1bbe8698a661b4f";function sy({query:n,onChange:a,...l}){const t=D.useFragment(Ls,n);return e(Nn,{label:"Model","data-testid":"model-picker",selectedKey:l.modelName??void 0,"aria-label":"model picker",placeholder:"Select a model",onSelectionChange:i=>{typeof i=="string"&&a(i)},width:"100%",...l,children:t.models.map(({name:i})=>e(B,{children:i},i))})}const Ps={argumentDefinitions:[],kind:"Fragment",metadata:null,name:"ModelProviderPickerFragment",selections:[{alias:null,args:null,concreteType:"GenerativeProvider",kind:"LinkedField",name:"modelProviders",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"key",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null}],storageKey:null}],type:"Query",abstractKey:null};Ps.hash="c83e86a2772127916f7387dca27b74ce";function oy(n){return n==="OPENAI"||n==="AZURE_OPENAI"||n==="ANTHROPIC"}function dy({onChange:n,query:a,...l}){const t=D.useFragment(Ps,a);return e(Nn,{label:"Provider","data-testid":"model-provider-picker",selectedKey:l.provider??void 0,"aria-label":"Model Provider",placeholder:"Select a provider",onSelectionChange:i=>{const r=i;oy(r)&&n(r)},width:"100%",...l,children:t.modelProviders.map(i=>e(B,{children:i.name},i.key))})}function cy({instance:n}){const a=q(t=>t.updateModel),l=u.useCallback(({configKey:t,value:i})=>{a({instanceId:n.id,model:{...n.model,[t]:i}})},[n.id,n.model,a]);return s(U,{children:[e(X,{label:"Deployment Name",value:n.model.modelName??"",onChange:t=>{l({configKey:"modelName",value:t})}}),e(X,{label:"Endpoint",value:n.model.endpoint??"",onChange:t=>{l({configKey:"endpoint",value:t})}}),e(Nn,{label:"API Version",selectedKey:n.model.apiVersion??void 0,"aria-label":"api version picker",placeholder:"Select an AzureOpenAi API Version",onSelectionChange:t=>{typeof t=="string"&&l({configKey:"apiVersion",value:t})},children:kd.map(t=>e(B,{children:t},t))})]})}function uy(n){const[a,l]=u.useState(null),t=q(i=>i.instances.find(r=>r.id===n.playgroundInstanceId));if(!t)throw new Error(`Playground instance ${n.playgroundInstanceId} not found`);return s(u.Fragment,{children:[e(M,{variant:"default",size:"compact",onClick:()=>{u.startTransition(()=>{l(e(H,{title:"Model Configuration",size:"M",children:e(u.Suspense,{children:e(my,{...n})})}))})},children:s(h,{direction:"row",gap:"size-100",alignItems:"center",children:[e(K,{weight:"heavy",children:hd[t.model.provider]}),e(K,{children:t.model.modelName||"--"})]})}),e(W,{type:"slideOver",isDismissable:!0,onDismiss:()=>{l(null)},children:a})]})}function my(n){const{playgroundInstanceId:a}=n,l=q(o=>o.updateModel),t=q(o=>o.instances.find(c=>c.id===a));if(!t)throw new Error(`Playground instance ${n.playgroundInstanceId} not found`);const i=D.useLazyLoadQuery(Is,{providerKey:t.model.provider}),r=u.useCallback(o=>{l({instanceId:a,model:{provider:t.model.provider,modelName:o}})},[t.model.provider,a,l]);return e(F,{padding:"size-200",children:s(ye,{children:[e(dy,{provider:t.model.provider,query:i,onChange:o=>{l({instanceId:a,model:{provider:o,modelName:null}})}}),t.model.provider==="AZURE_OPENAI"?e(cy,{instance:t}):e(sy,{modelName:t.model.modelName,provider:t.model.provider,query:i,onChange:r})]})})}const gy=C`
|
|
3749
3749
|
.ac-field-label {
|
|
3750
3750
|
display: none;
|
|
3751
3751
|
}
|
|
3752
|
-
`;function
|
|
3752
|
+
`;function py({role:n,includeLabel:a=!0,onChange:l}){return s(Nn,{selectedKey:n,css:a?void 0:gy,label:"Role","data-testid":"messages-role-picker","aria-label":"Role for the chat message",size:"compact",onSelectionChange:t=>{if(!Fs(t))throw new Error(`Invalid chat message role: ${t}`);l(t)},children:[e(B,{children:"System"},"system"),e(B,{children:"User"},"user"),e(B,{children:"AI"},"ai")]})}const ws=O.object({type:O.literal("function").describe("The type of the tool"),function:O.object({name:O.string().describe("The name of the function"),description:O.string().optional().describe("A description of the function"),parameters:O.object({type:O.literal("object"),properties:O.record(O.object({type:O.enum(["string","number","boolean","object","array","null","integer"]).describe("The type of the parameter"),description:O.string().optional().describe("A description of the parameter"),enum:O.array(O.string()).optional().describe("The allowed values")}).passthrough()).describe("A map of parameter names to their definitions"),required:O.array(O.string()).optional().describe("The required parameters"),additionalProperties:O.boolean().optional().describe("Whether or not additional properties are allowed in the schema"),strict:O.boolean().optional().describe("Whether or not the arguments should exactly match the function definition, only supported for OpenAI models")}).passthrough().describe("The parameters that the function accepts")}).passthrough().describe("The function definition")}).passthrough(),yy=Js(ws,{removeAdditionalStrategy:"passthrough"});function fy({playgroundInstanceId:n,tool:a,instanceTools:l}){var c;const t=q(d=>d.updateInstance),[i,r]=u.useState(JSON.stringify(a.definition,null,2)),o=u.useCallback(d=>{r(d);const{json:g}=ll(d);if(g==null)return;const{success:f}=ws.safeParse(g);f&&t({instanceId:n,patch:{tools:l.map(m=>m.id===a.id?{...m,definition:g}:m)}})},[l,n,a.id,t]);return e(V,{collapsible:!0,backgroundColor:"yellow-100",borderColor:"yellow-700",variant:"compact",title:((c=a.definition.function)==null?void 0:c.name)??"Tool",bodyStyle:{padding:0},extra:s(h,{direction:"row",gap:"size-100",children:[e(le,{text:i}),e(M,{"aria-label":"Delete tool",icon:e(P,{svg:e(I.TrashOutline,{})}),variant:"default",size:"compact",onClick:()=>{t({instanceId:n,patch:{tools:l.filter(d=>d.id!==a.id),toolChoice:void 0}})}})]}),children:e(Re,{value:i,onChange:o,jsonSchema:yy})},a.id)}function hy(n){const a=n.playgroundInstanceId,l=q(o=>o.instances.find(c=>c.id===n.playgroundInstanceId)),t=q(o=>o.updateInstance);if(l==null)throw new Error(`Playground instance ${a} not found`);const{tools:i}=l;if(i==null)throw new Error(`Playground instance ${a} does not have tools`);const r=u.useMemo(()=>i.map(o=>{var c;return(c=o.definition.function)==null?void 0:c.name}).filter(o=>o!=null),[i]);return e(Ee,{arrowPosition:"start",children:e(de,{id:"tools",title:"Tools",titleExtra:e(Me,{variant:"light",children:i.length}),children:e(F,{padding:"size-200",children:s(h,{direction:"column",gap:"size-200",children:[e(ye,{children:e(bd,{choice:l.toolChoice,onChange:o=>{t({instanceId:a,patch:{toolChoice:o}})},toolNames:r})}),i.map(o=>e(fy,{playgroundInstanceId:a,tool:o,instanceTools:l.tools},o.id))]})})})})}const As=1,ky=As+1;function by(n){const a=n.playgroundInstanceId,l=q(g=>g.templateLanguage),t=q(g=>g.instances),i=q(g=>g.updateInstance),r=t.find(g=>g.id===a);if(!r)throw new Error(`Playground instance ${a} not found`);const o=r.tools.length>0,{template:c}=r;if(c.__type!=="chat")throw new Error(`Invalid template type ${c.__type}`);const d=Zs(ml(io),ml(to,{coordinateGetter:lo}));return s(eo,{sensors:d,onDragEnd:({active:g,over:f})=>{if(!f||g.id===f.id)return;const m=c.messages.findIndex(b=>b.id===g.id),p=c.messages.findIndex(b=>b.id===f.id),y=Xs(c.messages,m,p);i({instanceId:a,patch:{template:{__type:"chat",messages:y}}})},children:[e(Ys,{items:c.messages,children:e("ul",{css:C`
|
|
3753
3753
|
display: flex;
|
|
3754
3754
|
flex-direction: column;
|
|
3755
3755
|
gap: var(--ac-global-dimension-size-200);
|
|
3756
3756
|
padding: var(--ac-global-dimension-size-200);
|
|
3757
|
-
`,children:c.messages.map((g,f)=>e(
|
|
3757
|
+
`,children:c.messages.map((g,f)=>e(Sy,{playgroundInstanceId:a,templateLanguage:l,template:c,message:g,index:f},g.id))})}),e(F,{paddingStart:"size-200",paddingEnd:"size-200",paddingTop:"size-100",paddingBottom:"size-100",borderColor:"dark",borderTopWidth:"thin",borderBottomWidth:o?"thin":void 0,children:s(h,{direction:"row",justifyContent:"end",gap:"size-100",children:[e(M,{variant:"default","aria-label":"add tool",size:"compact",icon:e(P,{svg:e(I.PlusOutline,{})}),onClick:()=>{i({instanceId:a,patch:{tools:[...r.tools,Sd(r.tools.length+1)]}})},children:"Tool"}),e(M,{variant:"default","aria-label":"add message",size:"compact",icon:e(P,{svg:e(I.PlusOutline,{})}),onClick:()=>{i({instanceId:a,patch:{template:{__type:"chat",messages:[...c.messages,{id:Da(),role:"user",content:""}]}}})},children:"Message"})]})}),o?e(hy,{...n}):null]})}function Sy({playgroundInstanceId:n,templateLanguage:a,template:l,message:t}){const i=q(b=>b.updateInstance),{attributes:r,listeners:o,setNodeRef:c,transform:d,transition:g,setActivatorNodeRef:f,isDragging:m}=no({id:t.id}),p=ol(t.role),y={transform:ao.Translate.toString(d),transition:g,zIndex:m?ky:As};return e("li",{ref:c,style:y,children:e(V,{collapsible:!0,variant:"compact",bodyStyle:{padding:0},...p,title:e(py,{includeLabel:!1,role:t.role,onChange:b=>{i({instanceId:n,patch:{template:{__type:"chat",messages:l.messages.map(k=>k.id===t.id?{...k,role:b}:k)}}})}}),extra:s(h,{direction:"row",gap:"size-100",children:[t.content!=null&&e(le,{text:t.content}),e(M,{"aria-label":"Delete message",icon:e(P,{svg:e(I.TrashOutline,{})}),variant:"default",size:"compact",onClick:()=>{i({instanceId:n,patch:{template:{__type:"chat",messages:l.messages.filter(b=>b.id!==t.id)}}})}}),e(vd,{ref:f,listeners:o,attributes:r})]}),children:e("div",{children:e(Cd,{height:"100%",value:t.content,"aria-label":"Message content",templateLanguage:a,onChange:b=>{i({instanceId:n,patch:{template:{__type:"chat",messages:l.messages.map(k=>k.id===t.id?{...k,content:b}:k)}}})}})})})})}function vy(n){const a=n.playgroundInstanceId,l=q(o=>o.instances),t=l.find(o=>o.id===a),i=l.findIndex(o=>o.id===a);if(!t)throw new Error(`Playground instance ${a} not found`);const{template:r}=t;return e(V,{title:s(h,{direction:"row",gap:"size-100",alignItems:"center",children:[e(gt,{index:i}),e("span",{children:"Prompt"})]}),collapsible:!0,variant:"compact",bodyStyle:{padding:0},extra:s(h,{direction:"row",gap:"size-100",children:[e(uy,{...n}),l.length>1?e(Cy,{...n}):null]}),children:r.__type==="chat"?e(by,{...n}):"Completion Template"})}function Cy(n){const a=q(l=>l.deleteInstance);return s(Le,{children:[e(kn,{children:e(M,{variant:"default",size:"compact",icon:e(P,{svg:e(I.TrashOutline,{})}),onClick:()=>{a(n.playgroundInstanceId)}})}),e(An,{children:e(Fn,{children:"Delete this instance of the playground"})})]})}function Fy(){const n=q(l=>l.templateLanguage),a=q(l=>l.setTemplateLanguage);return s(Ol,{value:n,variant:"inline-button","aria-label":"Template Language",size:"compact",onChange:l=>{Fd(l)&&a(l)},children:[e(ga,{label:"Mustache",value:hl.Mustache,children:"Mustache"}),e(ga,{label:"F-String",value:hl.FString,children:"F-String"})]})}function _s(n){const a=Ta("playgroundNonStreaming");return e(Sp,{...n,children:s(h,{direction:"column",height:"100%",children:[e(F,{borderBottomColor:"dark",borderBottomWidth:"thin",padding:"size-200",flex:"none",children:s(h,{direction:"row",justifyContent:"space-between",alignItems:"center",children:[e(re,{level:1,children:"Playground"}),s(h,{direction:"row",gap:"size-100",alignItems:"center",children:[a?e(ry,{}):null,e(Lp,{}),e(iy,{})]})]})}),e(Ty,{})]})})}function Ky(){const n=q(l=>l.addInstance),a=q(l=>l.instances.length);return e("div",{onClick:l=>{l.stopPropagation()},children:e(M,{variant:"default",size:"compact","aria-label":"add prompt",icon:e(P,{svg:e(I.PlusCircleOutline,{})}),disabled:a>=vp,onClick:()=>{n()},children:"Prompt"})})}const xy=C`
|
|
3758
3758
|
display: flex;
|
|
3759
3759
|
flex-direction: column;
|
|
3760
3760
|
height: 100%;
|
|
@@ -3782,12 +3782,12 @@ fragment ModelProviderPickerFragment on Query {
|
|
|
3782
3782
|
}
|
|
3783
3783
|
}
|
|
3784
3784
|
}
|
|
3785
|
-
`,
|
|
3785
|
+
`,Dy=C`
|
|
3786
3786
|
display: flex;
|
|
3787
3787
|
flex-direction: column;
|
|
3788
3788
|
height: 100%;
|
|
3789
3789
|
overflow: auto;
|
|
3790
|
-
`;function
|
|
3790
|
+
`;function Ty(){const n=Ta("playgroundWithDatasets"),a=q(i=>i.instances),t=a.length===1;return s(Xe,{direction:t?"horizontal":"vertical",autoSaveId:t?"playground-horizontal":"playground-vertical",children:[e(ue,{children:e("div",{css:xy,children:e(Ee,{arrowPosition:"start",size:"L",children:e(de,{title:"Prompts",id:"prompts",extra:s(h,{direction:"row",gap:"size-100",alignItems:"center",children:[e(Fy,{}),e(Ky,{})]}),children:e(F,{height:"100%",padding:"size-200",paddingBottom:"size-900",children:e(h,{direction:"row",gap:"size-200",children:a.map(i=>e(F,{flex:"1 1 0px",children:e(vy,{playgroundInstanceId:i.id},i.id)},i.id))})})})})})}),e(Ye,{css:Kn}),e(ue,{children:e("div",{css:Dy,children:s(Ee,{arrowPosition:"start",size:"L",children:[e(de,{title:"Inputs",id:"input",extra:n?e(Jp,{}):null,children:e(F,{padding:"size-200",children:e(Wp,{})})}),e(de,{title:"Output",id:"output",children:e(F,{padding:"size-200",height:"100%",children:e(h,{direction:"row",gap:"size-200",children:a.map((i,r)=>e(F,{flex:"1 1 0px",children:e(ey,{playgroundInstanceId:i.id},r)},r))})})})]})})})]})}function hf(){return e(_s,{})}function kf(){const n=Cn(),a=u.useMemo(()=>n.span.__typename==="Span"?n.span:null,[n.span]);if(!a)throw new Error("Span not found");const{playgroundInstance:l,parsingErrors:t}=u.useMemo(()=>Qp(a),[a]);return s(h,{direction:"column",height:"100%",children:[e(Iy,{span:a,parsingErrors:t}),e(_s,{instances:[l]})]})}function Iy({span:n,parsingErrors:a}){const l=Y(),t=a&&a.length>0,[i,r]=u.useState(!0),[o,c]=u.useState(t);return s(h,{direction:"column",gap:"size-50",children:[i&&e(ne,{variant:"info",title:"LLM Span Replay",banner:!0,dismissable:!0,onDismissClick:()=>{r(!1)},extra:e(M,{variant:"default",icon:e(P,{svg:e(I.ArrowBack,{})}),onClick:()=>{l(`/projects/${n.project.id}/traces/${n.context.traceId}?selectedSpanNodeId=${n.id}`)},children:"Back to Trace"}),children:`Replay and iterate on your LLM call from your ${n.project.name} project`}),o&&t&&e(ne,{variant:"warning",banner:!0,dismissable:!0,onDismissClick:()=>{c(!1)},title:"The following errors occurred when parsing span attributes:",children:e("ul",{children:a.map(d=>e("li",{children:d},d))})})]})}const Es=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"spanId"}],a=[{kind:"Variable",name:"id",variableName:"spanId"}],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,concreteType:"Project",kind:"LinkedField",name:"project",plural:!1,selections:[t,{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null}],storageKey:null},r={alias:null,args:null,concreteType:"SpanContext",kind:"LinkedField",name:"context",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"spanId",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"traceId",storageKey:null}],storageKey:null},o={alias:null,args:null,kind:"ScalarField",name:"attributes",storageKey:null};return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"spanPlaygroundPageLoaderQuery",selections:[{alias:"span",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[l,{kind:"InlineFragment",selections:[t,i,r,o],type:"Span",abstractKey:null}],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"spanPlaygroundPageLoaderQuery",selections:[{alias:"span",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[l,{kind:"TypeDiscriminator",abstractKey:"__isNode"},t,{kind:"InlineFragment",selections:[i,r,o],type:"Span",abstractKey:null}],storageKey:null}]},params:{cacheID:"d1df608d16a0a1d1451bcbac7dcfc853",id:null,metadata:{},name:"spanPlaygroundPageLoaderQuery",operationKind:"query",text:`query spanPlaygroundPageLoaderQuery(
|
|
3791
3791
|
$spanId: GlobalID!
|
|
3792
3792
|
) {
|
|
3793
3793
|
span: node(id: $spanId) {
|
|
@@ -3808,7 +3808,7 @@ fragment ModelProviderPickerFragment on Query {
|
|
|
3808
3808
|
id
|
|
3809
3809
|
}
|
|
3810
3810
|
}
|
|
3811
|
-
`}}}();Es.hash="d2fd0049ebec80d3b18827b327a91319";async function
|
|
3811
|
+
`}}}();Es.hash="d2fd0049ebec80d3b18827b327a91319";async function bf(n){const{spanId:a}=n.params;if(!a||typeof a!="string")throw new Error("Invalid spanId");return await D.fetchQuery(xe,Es,{spanId:a}).toPromise()}function Sf(){const n=Cn();return e(Kd,{query:n,children:e(Pe,{})})}const Rs=function(){var n={alias:null,args:null,kind:"ScalarField",name:"passwordNeedsReset",storageKey:null},a={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},l={alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null};return{fragment:{argumentDefinitions:[],kind:"Fragment",metadata:null,name:"authenticatedRootLoaderQuery",selections:[{args:null,kind:"FragmentSpread",name:"ViewerContext_viewer"},{alias:null,args:null,concreteType:"User",kind:"LinkedField",name:"viewer",plural:!1,selections:[n],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[],kind:"Operation",name:"authenticatedRootLoaderQuery",selections:[{alias:null,args:null,concreteType:"User",kind:"LinkedField",name:"viewer",plural:!1,selections:[a,{alias:null,args:null,kind:"ScalarField",name:"username",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"email",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"profilePictureUrl",storageKey:null},{alias:null,args:null,concreteType:"UserRole",kind:"LinkedField",name:"role",plural:!1,selections:[l],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"authMethod",storageKey:null},{alias:null,args:null,concreteType:"UserApiKey",kind:"LinkedField",name:"apiKeys",plural:!0,selections:[a,l,{alias:null,args:null,kind:"ScalarField",name:"description",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"createdAt",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"expiresAt",storageKey:null}],storageKey:null},n],storageKey:null}]},params:{cacheID:"d63c6184305079deb38a6f6235ba88e6",id:null,metadata:{},name:"authenticatedRootLoaderQuery",operationKind:"query",text:`query authenticatedRootLoaderQuery {
|
|
3812
3812
|
...ViewerContext_viewer
|
|
3813
3813
|
viewer {
|
|
3814
3814
|
passwordNeedsReset
|
|
@@ -3839,4 +3839,4 @@ fragment ViewerContext_viewer on Query {
|
|
|
3839
3839
|
...APIKeysTableFragment
|
|
3840
3840
|
}
|
|
3841
3841
|
}
|
|
3842
|
-
`}}}();Rs.hash="d30a68846023740517243e9394be73a8";async function
|
|
3842
|
+
`}}}();Rs.hash="d30a68846023740517243e9394be73a8";async function vf(){var a;const n=await D.fetchQuery(xe,Rs,{}).toPromise();if((a=n==null?void 0:n.viewer)!=null&&a.passwordNeedsReset){const l=ct({path:"/reset-password"});return Pn(l)}return n}export{Sf as A,bf as B,cf as C,Qy as D,Hy as E,yf as F,df as G,My as H,Ry as I,Ey as J,uf as L,Gy as M,ff as P,mf as R,kf as S,Wy as T,gf as a,vf as b,Ny as c,zy as d,jy as e,$y as f,Oy as g,Vy as h,Jy as i,Zy as j,Uy as k,qy as l,Xy as m,ef as n,Yy as o,By as p,rf as q,pf as r,tf as s,lf as t,Qd as u,af as v,nf as w,of as x,sf as y,hf as z};
|