arize-phoenix 4.36.0__py3-none-any.whl → 5.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of arize-phoenix might be problematic. Click here for more details.
- {arize_phoenix-4.36.0.dist-info → arize_phoenix-5.1.0.dist-info}/METADATA +10 -12
- {arize_phoenix-4.36.0.dist-info → arize_phoenix-5.1.0.dist-info}/RECORD +69 -60
- phoenix/__init__.py +86 -0
- phoenix/auth.py +275 -14
- phoenix/config.py +277 -25
- phoenix/db/enums.py +20 -0
- phoenix/db/facilitator.py +112 -0
- phoenix/db/migrations/versions/cd164e83824f_users_and_tokens.py +157 -0
- phoenix/db/models.py +145 -60
- phoenix/experiments/evaluators/code_evaluators.py +9 -3
- phoenix/experiments/functions.py +1 -4
- phoenix/server/api/README.md +28 -0
- phoenix/server/api/auth.py +32 -0
- phoenix/server/api/context.py +50 -2
- phoenix/server/api/dataloaders/__init__.py +4 -0
- phoenix/server/api/dataloaders/user_roles.py +30 -0
- phoenix/server/api/dataloaders/users.py +33 -0
- phoenix/server/api/exceptions.py +7 -0
- phoenix/server/api/mutations/__init__.py +0 -2
- phoenix/server/api/mutations/api_key_mutations.py +104 -86
- phoenix/server/api/mutations/dataset_mutations.py +8 -8
- phoenix/server/api/mutations/experiment_mutations.py +2 -2
- phoenix/server/api/mutations/export_events_mutations.py +3 -3
- phoenix/server/api/mutations/project_mutations.py +3 -3
- phoenix/server/api/mutations/span_annotations_mutations.py +4 -4
- phoenix/server/api/mutations/trace_annotations_mutations.py +4 -4
- phoenix/server/api/mutations/user_mutations.py +282 -42
- phoenix/server/api/openapi/schema.py +2 -2
- phoenix/server/api/queries.py +48 -39
- phoenix/server/api/routers/__init__.py +11 -0
- phoenix/server/api/routers/auth.py +284 -0
- phoenix/server/api/routers/embeddings.py +26 -0
- phoenix/server/api/routers/oauth2.py +456 -0
- phoenix/server/api/routers/v1/__init__.py +38 -16
- phoenix/server/api/types/ApiKey.py +11 -0
- phoenix/server/api/types/AuthMethod.py +9 -0
- phoenix/server/api/types/User.py +48 -4
- phoenix/server/api/types/UserApiKey.py +35 -1
- phoenix/server/api/types/UserRole.py +7 -0
- phoenix/server/app.py +103 -31
- phoenix/server/bearer_auth.py +161 -0
- phoenix/server/email/__init__.py +0 -0
- phoenix/server/email/sender.py +26 -0
- phoenix/server/email/templates/__init__.py +0 -0
- phoenix/server/email/templates/password_reset.html +19 -0
- phoenix/server/email/types.py +11 -0
- phoenix/server/grpc_server.py +6 -0
- phoenix/server/jwt_store.py +504 -0
- phoenix/server/main.py +40 -9
- phoenix/server/oauth2.py +51 -0
- phoenix/server/prometheus.py +20 -0
- phoenix/server/rate_limiters.py +191 -0
- phoenix/server/static/.vite/manifest.json +31 -31
- phoenix/server/static/assets/{components-Dte7_KRd.js → components-REunxTt6.js} +348 -286
- phoenix/server/static/assets/index-DAPJxlCw.js +101 -0
- phoenix/server/static/assets/{pages-CnTvEGEN.js → pages-1VrMk2pW.js} +559 -291
- phoenix/server/static/assets/{vendor-BC3OPQuM.js → vendor-B5IC0ivG.js} +5 -5
- phoenix/server/static/assets/{vendor-arizeai-NjB3cZzD.js → vendor-arizeai-aFbT4kl1.js} +2 -2
- phoenix/server/static/assets/{vendor-codemirror-gE_JCOgX.js → vendor-codemirror-BEGorXSV.js} +1 -1
- phoenix/server/static/assets/{vendor-recharts-BXLYwcXF.js → vendor-recharts-6nUU7gU_.js} +1 -1
- phoenix/server/templates/index.html +1 -0
- phoenix/server/types.py +157 -1
- phoenix/session/client.py +7 -2
- phoenix/trace/fixtures.py +24 -0
- phoenix/utilities/client.py +16 -0
- phoenix/version.py +1 -1
- phoenix/db/migrations/future_versions/README.md +0 -4
- phoenix/db/migrations/future_versions/cd164e83824f_users_and_tokens.py +0 -293
- phoenix/db/migrations/versions/.gitignore +0 -1
- phoenix/server/api/mutations/auth.py +0 -18
- phoenix/server/api/mutations/auth_mutations.py +0 -65
- phoenix/server/static/assets/index-fq1-hCK4.js +0 -100
- phoenix/trace/langchain/__init__.py +0 -3
- phoenix/trace/langchain/instrumentor.py +0 -34
- phoenix/trace/llama_index/__init__.py +0 -3
- phoenix/trace/llama_index/callback.py +0 -102
- phoenix/trace/openai/__init__.py +0 -3
- phoenix/trace/openai/instrumentor.py +0 -30
- {arize_phoenix-4.36.0.dist-info → arize_phoenix-5.1.0.dist-info}/WHEEL +0 -0
- {arize_phoenix-4.36.0.dist-info → arize_phoenix-5.1.0.dist-info}/licenses/IP_NOTICE +0 -0
- {arize_phoenix-4.36.0.dist-info → arize_phoenix-5.1.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,4 +1,33 @@
|
|
|
1
|
-
import{r as
|
|
1
|
+
import{r as m,j as e,ae as ss,v as s,H as j,R as Ce,w as C,af as De,y as ee,b as T,ag as xn,ah as Ye,$ as W,ai as ta,B as me,D as ge,G as H,F as wn,o as Fl,aj as Ge,ak as re,al as We,am as os,I as Va,an as An,a4 as Fe,a5 as q,a6 as ds,ao as fe,ap as sn,aq as cs,ar as Sa,as as va,at as Ca,au as zn,av as Ie,aw as oa,n as za,a as us,ax as ms,ay as gs,aa as ps,ab as ys,az as fs,c as hs,d as ks,aA as bs,x as Ss}from"./vendor-B5IC0ivG.js";import{C as U,d as F,K as Jn,D as G,c as h,I as E,a as L,J as $a,G as Se,H as B,M as un,N as he,O as vs,m as Qa,Q as Zn,P as hn,S as Oe,i as Kl,j as te,q as Pn,r as _n,v as oe,b as K,o as xl,U as Ne,L as Bn,V as Dl,e as M,t as Y,W as Tl,X as Il,Y as Cs,Z as Fs,h as In,w as Xn,T as Le,k as Z,B as da,s as ve,$ as z,a0 as Ll,E as ca,f as Hn,a1 as Oa,a2 as Ks,z as ua,u as xs,a3 as Ds,R as nl,n as Ts}from"./vendor-arizeai-aFbT4kl1.js";import{N as Is,T as Ls,L as ue,u as de,B as ws,a as on,D as As,G as Ps,b as _s,c as Es,S as Rs,R as Ke,d as Pe,e as je,f as ja,P as wl,g as Al,M as al,h as ll,i as Yn,j as Ms,k as Ns,l as Q,m as Pl,n as xe,o as ma,p as En,q as _l,r as Rn,s as Mn,t as El,v as qe,w as Ve,C as ce,x as ga,y as en,z as qa,A as Ue,E as Rl,F as Vs,H as zs,I as $s,J as Qs,K as Os,O as js,Q as ze,U as se,V as qs,W as Us,X as Ml,Y as Bs,Z as Hs,_ as tl,$ as Gs,a0 as Ws,a1 as Js,a2 as Zs,a3 as Xs,a4 as Ys,a5 as Nl,a6 as kn,a7 as eo,a8 as no,a9 as ao,aa as lo,ab as to,ac as pn,ad as Ua,ae as Vl,af as Dn,ag as _a,ah as Fn,ai as _e,aj as io,ak as ro,al as ie,am as zl,an as pa,ao as we,ap as Ba,aq as bn,ar as ne,as as Be,at as so,au as Ha,av as Re,aw as Me,ax as yn,ay as Ga,az as $l,aA as oo,aB as Ql,aC as Te,aD as $e,aE as ea,aF as co,aG as na,aH as ya,aI as Ol,aJ as jl,aK as uo,aL as ql,aM as Ul,aN as Bl,aO as Nn,aP as Je,aQ as He,aR as ke,aS as mo,aT as il,aU as Hl,aV as go,aW as po,aX as yo,aY as fo,aZ as ho,a_ as Tn,a$ as cn,b0 as Ea,b1 as Sn,b2 as Gl,b3 as ko,b4 as mn,b5 as bo,b6 as fa,b7 as So,b8 as Wa,b9 as vo,ba as Ja,bb as Wl,bc as Jl,bd as Co,be as Ra,bf as Zl,bg as Fo,bh as Ko,bi as ia,bj as xo,bk as Xl,bl as Yl,bm as Do,bn as To}from"./components-REunxTt6.js";import{R as nn,C as aa,X as an,Y as Ae,a as ln,T as tn,B as Ln,A as Gn,b as et,c as Za,L as nt,d as Io,P as Lo,e as wo,f as Ao}from"./vendor-recharts-6nUU7gU_.js";import{p as Xa,R as ha,n as ka,j as Po,E as _o,k as Eo,c as Ro}from"./vendor-codemirror-BEGorXSV.js";const at="arize-phoenix-feature-flags",Fa={playground:!1};function Mo(){const n=localStorage.getItem(at);if(!n)return Fa;try{const a=JSON.parse(n);return Object.assign({},Fa,a)}catch{return Fa}}const lt=m.createContext(null);function tt(){const n=Ce.useContext(lt);if(n===null)throw new Error("useFeatureFlags must be used within a FeatureFlagsProvider");return n}function No(n){const{featureFlags:a}=tt();return a[n]}function Mg(n){const[a,l]=m.useState(Mo()),t=i=>{localStorage.setItem(at,JSON.stringify(i)),l(i)};return e(lt.Provider,{value:{featureFlags:a,setFeatureFlags:t},children:e(Vo,{children:n.children})})}function Vo(n){const{children:a}=n,{featureFlags:l,setFeatureFlags:t}=tt(),[i,r]=m.useState(!1);return ss("ctrl+shift+f",()=>r(!0)),s(j,{children:[a,e(G,{type:"modal",isDismissable:!0,onDismiss:()=>r(!1),children:i&&e(U,{title:"Feature Flags",children:e(F,{height:"size-1000",padding:"size-100",children:Object.keys(l).map(o=>e(Jn,{isSelected:l[o],onChange:u=>t({...l,[o]:u}),children:o},o))})})})]})}const it=m.createContext(null);function zo(){const n=m.useContext(it);if(n===null)throw new Error("useFunctionality must be used within a FunctionalityProvider");return n}function Ng(n){return e(it.Provider,{value:{authenticationEnabled:window.Config.authenticationEnabled},children:n.children})}const $o=C`
|
|
2
|
+
display: flex;
|
|
3
|
+
direction: row;
|
|
4
|
+
height: 100vh;
|
|
5
|
+
overflow: hidden;
|
|
6
|
+
`,Qo=C`
|
|
7
|
+
display: flex;
|
|
8
|
+
flex-direction: column;
|
|
9
|
+
flex: 1 1 auto;
|
|
10
|
+
height: 100%;
|
|
11
|
+
overflow: hidden;
|
|
12
|
+
padding-left: var(--px-nav-collapsed-width);
|
|
13
|
+
`,Oo=C`
|
|
14
|
+
flex: 1 1 auto;
|
|
15
|
+
display: flex;
|
|
16
|
+
flex-direction: column;
|
|
17
|
+
height: 100%;
|
|
18
|
+
overflow: hidden;
|
|
19
|
+
`,jo=C`
|
|
20
|
+
display: flex;
|
|
21
|
+
flex-direction: column;
|
|
22
|
+
margin: 0;
|
|
23
|
+
list-style: none;
|
|
24
|
+
gap: var(--ac-global-dimension-size-50);
|
|
25
|
+
padding-inline-start: 0;
|
|
26
|
+
`,qo=C`
|
|
27
|
+
display: flex;
|
|
28
|
+
flex-direction: column;
|
|
29
|
+
gap: var(--ac-global-dimension-size-50);
|
|
30
|
+
`;function Vg(){return s("div",{css:$o,"data-testid":"layout",children:[e(Uo,{}),s("div",{css:Qo,children:[e(Ls,{children:e(Is,{})}),e("div",{"data-testid":"content",css:Oo,children:e(m.Suspense,{fallback:e(ue,{}),children:e(De,{})})})]})]})}function Uo(){const n=m.useMemo(()=>window.Config.hasInferences,[]),a=de(),{authenticationEnabled:l}=zo(),t=ee(),i=m.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=No("playground");return s(Rs,{children:[e(ws,{}),s(h,{direction:"column",justifyContent:"space-between",flex:"1 1 auto",children:[s("ul",{css:qo,children:[n&&e("li",{children:e(on,{to:"/model",text:"Model",icon:e(E,{svg:e(L.CubeOutline,{})})})}),e("li",{children:e(on,{to:"/projects",text:"Projects",icon:e(E,{svg:e(L.GridOutline,{})})})}),e("li",{children:e(on,{to:"/datasets",text:"Datasets",icon:e(E,{svg:e(L.DatabaseOutline,{})})})}),r&&e("li",{children:e(on,{to:"/playground",text:"Playground",icon:e(E,{svg:e(L.PlayCircleOutline,{})})})}),e("li",{children:e(on,{to:"/apis",text:"APIs",icon:e(E,{svg:e(L.Code,{})})})})]}),s("ul",{css:jo,children:[e("li",{children:e(on,{to:"/settings",text:"Settings",icon:e(E,{svg:e(L.SettingsOutline,{})})})}),e("li",{children:e(As,{})}),e("li",{children:e(Ps,{})}),e("li",{children:e(_s,{})}),l&&s(j,{children:[e("li",{children:e(on,{to:"/profile",text:"Profile",icon:e(E,{svg:e(L.PersonOutline,{})})})}),e("li",{children:e(Es,{text:"Log Out",icon:e(E,{svg:e(L.LogOut,{})}),onClick:i})})]})]})]})]})}const rt=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 {
|
|
2
31
|
functionality {
|
|
3
32
|
modelInferences
|
|
4
33
|
}
|
|
@@ -11,7 +40,7 @@ import{r as u,j as e,b as T,aa as ea,v as s,w as C,ab as Ke,ac as je,$ as J,ad a
|
|
|
11
40
|
}
|
|
12
41
|
}
|
|
13
42
|
}
|
|
14
|
-
`}}}();
|
|
43
|
+
`}}}();rt.hash="a4bbc4917b3217b8254d68ec7c76dbdd";async function zg(n){var l;const a=await T.fetchQuery(Ke,rt,{}).toPromise();if(a!=null&&a.functionality.modelInferences)return xn("/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 xn("/projects");if(t===1&&i!=null)return xn(`/projects/${i}`);const r=a==null?void 0:a.projects.edges[0].project.id;return xn(`/projects/${r}`)}else throw new Error("No functionality available")}const st=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"},u={alias:null,args:null,kind:"ScalarField",name:"cursor",storageKey:null},d=[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null}],p={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},u,{alias:null,args:null,concreteType:"Dimension",kind:"LinkedField",name:"node",plural:!1,selections:d,storageKey:null}],storageKey:null},p],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},u,{alias:null,args:null,concreteType:"EmbeddingDimension",kind:"LinkedField",name:"node",plural:!1,selections:d,storageKey:null}],storageKey:null},p],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(
|
|
15
44
|
$startTime: DateTime!
|
|
16
45
|
$endTime: DateTime!
|
|
17
46
|
) {
|
|
@@ -69,9 +98,9 @@ fragment ModelSchemaTable_dimensions_3uKjWt on Query {
|
|
|
69
98
|
}
|
|
70
99
|
}
|
|
71
100
|
}
|
|
72
|
-
`}}}();
|
|
101
|
+
`}}}();st.hash="b612239336c7638df42037315b00f635";function $g(n){const{referenceInferences:a}=Pe(),{timeRange:l}=je(),t=T.useLazyLoadQuery(st,{startTime:l.start.toISOString(),endTime:l.end.toISOString()});return s("main",{children:[s(ja,{children:[e(wl,{}),a?e(Al,{inferencesRole:"reference",timeRange:{start:new Date(a.startTime),end:new Date(a.endTime)}}):null]}),e("section",{css:C`
|
|
73
102
|
margin: var(--px-spacing-lg);
|
|
74
|
-
`,children:e(
|
|
103
|
+
`,children:e($a,{title:"Model Schema",variant:"compact",bodyStyle:{padding:0},children:s(Se,{children:[e(B,{name:"All",children:s(un,{children:[e(he,{title:"Embeddings",id:"embeddings",children:e(al,{model:t})}),e(he,{title:"Dimensions",id:"dimensions",children:e(ll,{model:t})})]})},"all"),e(B,{name:"Embeddings",children:e(al,{model:t})},"embeddings"),e(B,{name:"Dimensions",children:e(ll,{model:t})},"dimensions")]})})}),e(De,{})]})}const ot={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 {
|
|
75
104
|
model {
|
|
76
105
|
...MetricSelector_dimensions
|
|
77
106
|
}
|
|
@@ -88,7 +117,7 @@ fragment MetricSelector_dimensions on Model {
|
|
|
88
117
|
}
|
|
89
118
|
}
|
|
90
119
|
}
|
|
91
|
-
`}};
|
|
120
|
+
`}};ot.hash="374499f7f8ce6919e4a0a4ecbe380c52";const dt=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"},u={defaultValue:null,kind:"LocalArgument",name:"minDist"},d={defaultValue:null,kind:"LocalArgument",name:"nNeighbors"},p={defaultValue:null,kind:"LocalArgument",name:"nSamples"},f={defaultValue:null,kind:"LocalArgument",name:"performanceMetric"},c={defaultValue:null,kind:"LocalArgument",name:"timeRange"},g=[{kind:"Variable",name:"id",variableName:"id"}],y={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},k={alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},b={alias:null,args:null,kind:"ScalarField",name:"x",storageKey:null},v={alias:null,args:null,kind:"ScalarField",name:"y",storageKey:null},S=[y,{alias:null,args:null,kind:"ScalarField",name:"eventId",storageKey:null},{alias:null,args:null,concreteType:null,kind:"LinkedField",name:"coordinates",plural:!1,selections:[k,{kind:"InlineFragment",selections:[b,v,{alias:null,args:null,kind:"ScalarField",name:"z",storageKey:null}],type:"Point3D",abstractKey:null},{kind:"InlineFragment",selections:[b,v],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}],I={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:S,storageKey:null},{alias:null,args:null,concreteType:"UMAPPoint",kind:"LinkedField",name:"referenceData",plural:!0,selections:S,storageKey:null},{alias:null,args:null,concreteType:"UMAPPoint",kind:"LinkedField",name:"corpusData",plural:!0,selections:S,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,u,d,p,f,c],kind:"Fragment",metadata:null,name:"EmbeddingPageUMAPQuery",selections:[{alias:"embedding",args:g,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[I],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[r,c,u,d,p,o,n,a,t,l,i,f],kind:"Operation",name:"EmbeddingPageUMAPQuery",selections:[{alias:"embedding",args:g,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[k,I,{kind:"TypeDiscriminator",abstractKey:"__isNode"},y],storageKey:null}]},params:{cacheID:"d30210c52f86b9d9a7ac958f866aa93e",id:null,metadata:{},name:"EmbeddingPageUMAPQuery",operationKind:"query",text:`query EmbeddingPageUMAPQuery(
|
|
92
121
|
$id: GlobalID!
|
|
93
122
|
$timeRange: TimeRange!
|
|
94
123
|
$minDist: Float!
|
|
@@ -212,7 +241,7 @@ fragment MetricSelector_dimensions on Model {
|
|
|
212
241
|
id
|
|
213
242
|
}
|
|
214
243
|
}
|
|
215
|
-
`}}}();
|
|
244
|
+
`}}}();dt.hash="f1ee7ce02317f1c3fe96b77af405095f";function Bo(){const{theme:n}=Yn();return m.useMemo(()=>n==="light"?Ms:Ns,[n])}function Ho(){const{embeddingDimensionId:n}=Ye();if(!n)throw new Error("Missing embeddingDimensionId in URL params");return n}const ct={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 gn(n){const a=ct[n];return a!=null?a.shortName:n}function Ka(n){const a=ct[n];return a&&a.definition!=null&&a.definition||null}function vn(n){return`${n.column}:${n.dir}`}function Go(){const{referenceInferences:n}=Pe(),a=!!n,l=Q(d=>d.clusterSort),t=Q(d=>d.setClusterSort),[i,r]=m.useState(!1),o=m.useMemo(()=>{const d=[];return a&&d.push({label:"Most drift",value:vn({column:"driftRatio",dir:"desc"})}),[...d,{label:"Largest clusters",value:vn({column:"size",dir:"desc"})},{label:"Smallest clusters",value:vn({column:"size",dir:"asc"})},{label:"Highest metric value",value:vn({column:"primaryMetricValue",dir:"desc"})},{label:"Lowest metric value",value:vn({column:"primaryMetricValue",dir:"asc"})}]},[a]),u=vn(l);return e("div",{css:d=>C`
|
|
216
245
|
.ac-action-button {
|
|
217
246
|
background: none;
|
|
218
247
|
border: none;
|
|
@@ -225,7 +254,7 @@ fragment MetricSelector_dimensions on Model {
|
|
|
225
254
|
color: var(--ac-global-text-color-900);
|
|
226
255
|
}
|
|
227
256
|
}
|
|
228
|
-
`,children:s(
|
|
257
|
+
`,children:s(hn,{placement:"bottom right","aria-label":"Sort clusters by",isOpen:i,onOpenChange:d=>r(d),children:[s(vs,{children:["Sort",e("span",{"aria-hidden":!0,"data-testid":"dropdown-caret",css:C`
|
|
229
258
|
margin-left: var(--px-spacing-sm);
|
|
230
259
|
border-bottom-color: #0000;
|
|
231
260
|
border-left-color: #0000;
|
|
@@ -237,14 +266,14 @@ fragment MetricSelector_dimensions on Model {
|
|
|
237
266
|
height: 0;
|
|
238
267
|
vertical-align: middle;
|
|
239
268
|
width: 0;
|
|
240
|
-
`})]}),e(
|
|
269
|
+
`})]}),e(Qa,{children:e(Zn,{style:{width:200},selectedKeys:[u],selectionMode:"single",items:o,onSelectionChange:d=>{if(d instanceof Set&&d.size>0){const[p]=d.values(),[f,c]=p.split(":");t({column:f,dir:c})}r(!1)},children:d=>e(W,{children:d.label},d.value)})})]})})}const ut=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(
|
|
241
270
|
$clusters: [ClusterInput!]!
|
|
242
271
|
) {
|
|
243
272
|
exportClusters(clusters: $clusters) {
|
|
244
273
|
fileName
|
|
245
274
|
}
|
|
246
275
|
}
|
|
247
|
-
`}}}();
|
|
276
|
+
`}}}();ut.hash="b5ff2517dbb0d19a1b24dea1796a3576";function Wo(){const n=Q(r=>r.clusters),{notifyError:a,notifySuccess:l}=Pl(),[t,i]=T.useMutation(ut);return e(Oe,{align:"end",buttonSize:"compact",icon:i?e(E,{svg:e(L.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:u}=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=${u}`,"_self")}}})},onError:o=>{a({title:"Failed to export clusters",message:`Failed to export clusters: ${o.message}`})}});break}},children:s(W,{children:[e(E,{svg:e(L.Download,{})}),"Export clusters"]},"export_cluster")})}const mt={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};mt.hash="55d03de16503d7af254c17cef7d18ee0";const Kn=":";function Jo(n){return["drift","performance","dataQuality","retrieval"].includes(n)}function $n(n){const{type:a,metric:l}=n;switch(a){case"drift":return`${a}${Kn}${l}`;case"retrieval":return`${a}${Kn}${l}`;case"performance":return`${a}${Kn}${l}`;case"dataQuality":{const{name:t}=n.dimension;return`${a}${Kn}${l}${Kn}${t}`}default:xe()}}function Zo({metricKey:n,dimensions:a}){const[l,t,i]=n.split(Kn);if(!Jo(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:xe()}}const Xo=s(_n,{variant:"info",children:[e(te,{level:4,children:"Analysis Metric"}),s(Pn,{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 Yo({model:n}){const[,a]=m.useTransition(),l=T.useFragment(mt,n),{referenceInferences:t,corpusInferences:i}=Pe(),r=!!t,o=!!i,u=Q(y=>y.metric),d=Q(y=>y.loading),p=Q(y=>y.setMetric),f=l.numericDimensions.edges.map(y=>y.node),c=f.length>0,g=m.useCallback(y=>{const k=Zo({metricKey:y,dimensions:f});a(()=>{p(k)})},[p,f,a]);return s(Kl,{label:"metric",labelExtra:Xo,selectedKey:u?$n(u):void 0,onSelectionChange:g,placeholder:"Select a metric...",isDisabled:d,children:[r?e(ta,{title:"Drift",children:e(W,{children:"Euclidean Distance"},$n({type:"drift",metric:"euclideanDistance"}))}):null,o?e(ta,{title:"Retrieval",children:e(W,{children:"Query Distance"},$n({type:"retrieval",metric:"queryDistance"}))}):null,e(ta,{title:"Performance",children:e(W,{children:"Accuracy Score"},$n({type:"performance",metric:"accuracyScore"}))}),c?e(ta,{title:"Data Quality",children:f.map(y=>e(W,{children:`${y.name} avg`},$n({type:"dataQuality",metric:"average",dimension:y})))}):null]})}const gt=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"},u={defaultValue:null,kind:"LocalArgument",name:"metricGranularity"},d={defaultValue:null,kind:"LocalArgument",name:"performanceMetric"},p={defaultValue:null,kind:"LocalArgument",name:"timeRange"},f=[{kind:"Variable",name:"id",variableName:"embeddingDimensionId"}],c={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},g={kind:"Variable",name:"granularity",variableName:"metricGranularity"},y={kind:"Variable",name:"timeRange",variableName:"timeRange"},k=[g,{kind:"Literal",name:"metric",value:"euclideanDistance"},y],b=[{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}],v={kind:"InlineFragment",selections:[{condition:"fetchDrift",kind:"Condition",passingValue:!0,selections:[{alias:"euclideanDistanceTimeSeries",args:k,concreteType:"DriftTimeSeries",kind:"LinkedField",name:"driftTimeSeries",plural:!1,selections:b,storageKey:null}]},{condition:"fetchQueryDistance",kind:"Condition",passingValue:!0,selections:[{alias:null,args:k,concreteType:"DriftTimeSeries",kind:"LinkedField",name:"retrievalMetricTimeSeries",plural:!1,selections:b,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:b,storageKey:null}],type:"EmbeddingDimension",abstractKey:null},S=[{kind:"Variable",name:"id",variableName:"dimensionId"}],w={kind:"InlineFragment",selections:[{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:[g,{kind:"Literal",name:"metric",value:"mean"},y],concreteType:"DataQualityTimeSeries",kind:"LinkedField",name:"dataQualityTimeSeries",plural:!1,selections:b,storageKey:null}],type:"Dimension",abstractKey:null},I={alias:null,args:null,concreteType:"Model",kind:"LinkedField",name:"model",plural:!1,selections:[{condition:"fetchPerformance",kind:"Condition",passingValue:!0,selections:[{alias:null,args:[g,{fields:[{kind:"Variable",name:"metric",variableName:"performanceMetric"}],kind:"ObjectValue",name:"metric"},y],concreteType:"PerformanceTimeSeries",kind:"LinkedField",name:"performanceTimeSeries",plural:!1,selections:b,storageKey:null}]}],storageKey:null},P={alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null};return{fragment:{argumentDefinitions:[n,a,l,t,i,r,o,u,d,p],kind:"Fragment",metadata:null,name:"MetricTimeSeriesQuery",selections:[{alias:"embedding",args:f,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[c,v],storageKey:null},{condition:"fetchDataQuality",kind:"Condition",passingValue:!0,selections:[{alias:"dimension",args:S,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[w],storageKey:null}]},I],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[l,p,u,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:[P,c,v],storageKey:null},{condition:"fetchDataQuality",kind:"Condition",passingValue:!0,selections:[{alias:"dimension",args:S,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[P,w,{kind:"TypeDiscriminator",abstractKey:"__isNode"},c],storageKey:null}]},I]},params:{cacheID:"a68a8204bf7fdd13e6915b338d4b5497",id:null,metadata:{},name:"MetricTimeSeriesQuery",operationKind:"query",text:`query MetricTimeSeriesQuery(
|
|
248
277
|
$embeddingDimensionId: GlobalID!
|
|
249
278
|
$timeRange: TimeRange!
|
|
250
279
|
$metricGranularity: Granularity!
|
|
@@ -303,7 +332,7 @@ fragment MetricSelector_dimensions on Model {
|
|
|
303
332
|
}
|
|
304
333
|
}
|
|
305
334
|
}
|
|
306
|
-
`}}}();
|
|
335
|
+
`}}}();gt.hash="f31abad2141a5a1c461ef2a598ffa4f3";const rl=new Intl.NumberFormat([],{maximumFractionDigits:2}),pt=()=>{const n=qe(),a=n.blue400,l=n.gray500;return{color:a,barColor:l}};function ed({active:n,payload:a,label:l}){var r,o,u;const{color:t,barColor:i}=pt();if(n&&a&&a.length){const d=((r=a[1])==null?void 0:r.value)??null,p=((o=a[0])==null?void 0:o.value)??null,f=typeof d=="number"?rl.format(d):"--",c=typeof p=="number"?rl.format(p):"--";return s(en,{children:[e(K,{weight:"heavy",textSize:"medium",children:`${Ve(new Date(l))}`}),e(ce,{color:t,name:((u=a[1])==null?void 0:u.payload.metricName)??"Metric",value:f}),e(ce,{color:i,shape:"square",name:"Count",value:c}),e(ga,{}),s("div",{css:C`
|
|
307
336
|
display: flex;
|
|
308
337
|
flex-direction: row;
|
|
309
338
|
align-items: center;
|
|
@@ -311,7 +340,7 @@ fragment MetricSelector_dimensions on Model {
|
|
|
311
340
|
gap: var(--px-spacing-sm);
|
|
312
341
|
|
|
313
342
|
margin-top: var(--px-spacing-sm);
|
|
314
|
-
`,children:[e(
|
|
343
|
+
`,children:[e(E,{svg:e(xl,{})}),e("span",{children:"Click to view the point cloud at this time"})]})]})}return null}function nd(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:xe()}}function ad(n){if(n)switch(n.type){case"drift":return gn(n.metric);case"performance":return gn(n.metric);case"dataQuality":return`${n.dimension.name} avg`;case"retrieval":return gn(n.metric);default:xe()}else return"Count"}function ld(n){switch(n.type){case"drift":return Ka(n.metric);case"performance":return Ka(n.metric);case"dataQuality":return null;case"retrieval":return Ka(n.metric);default:xe()}}function td({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}=je(),{selectedTimestamp:u,setSelectedTimestamp:d}=ma(),p=En(o),f=T.useLazyLoadQuery(gt,{embeddingDimensionId:n,timeRange:{start:o.start.toISOString(),end:o.end.toISOString()},metricGranularity:_l(o),countGranularity:p,fetchDrift:l,fetchQueryDistance:t,fetchDataQuality:i,fetchPerformance:r,dimensionId:a.type==="dataQuality"?a.dimension.id:n,performanceMetric:a.type==="performance"?a.metric:"accuracyScore"}),c=Rn({samplingIntervalMinutes:p.samplingIntervalMinutes}),g=m.useCallback(x=>{const{activePayload:D}=x;if(D!=null&&D.length>0){const R=D[0].payload;d(new Date(R.timestamp))}},[d]),y=id({data:f,metric:a}),b=rd(f).reduce((x,D)=>(x[D.timestamp]=D.value,x),{})??{},v=y.map(x=>{const D=b[x.timestamp];return{...x,traffic:D,timestamp:new Date(x.timestamp).getTime()}}),S=ad(a),w=ld(a),{color:I,barColor:P}=pt();return s("section",{css:C`
|
|
315
344
|
width: 100%;
|
|
316
345
|
height: 100%;
|
|
317
346
|
display: flex;
|
|
@@ -331,7 +360,7 @@ fragment MetricSelector_dimensions on Model {
|
|
|
331
360
|
width: 100%;
|
|
332
361
|
overflow: hidden;
|
|
333
362
|
}
|
|
334
|
-
`,children:[s(te,{level:3,children:[
|
|
363
|
+
`,children:[s(te,{level:3,children:[nd(a),w!=null?s(_n,{children:[e(te,{level:4,children:S}),e(Pn,{children:w})]}):null]}),e("div",{children:e(nn,{width:"100%",height:"100%",children:s(aa,{data:v,margin:{top:25,right:18,left:18,bottom:10},onClick:g,children:[s("defs",{children:[s("linearGradient",{id:"colorUv",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})]}),s("linearGradient",{id:"barColor",x1:"0",y1:"0",x2:"0",y2:"1",children:[e("stop",{offset:"5%",stopColor:P,stopOpacity:.3}),e("stop",{offset:"95%",stopColor:P,stopOpacity:0})]})]}),e(an,{...Mn,tickFormatter:x=>c(new Date(x)),style:{fill:"var(--ac-global-text-color-700)"}}),e(Ae,{stroke:oe.colors.gray200,label:{value:S,angle:-90,position:"insideLeft",style:{textAnchor:"middle",fill:"var(--ac-global-text-color-900)"}},style:{fill:"var(--ac-global-text-color-700)"}}),e(Ae,{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(ln,{strokeDasharray:"4 4",stroke:oe.colors.gray200,strokeOpacity:.5}),e(tn,{content:e(ed,{})}),e(Ln,{yAxisId:"right",dataKey:"traffic",fill:"url(#barColor)",spacing:5}),e(Gn,{type:"monotone",dataKey:"value",stroke:I,fillOpacity:1,fill:"url(#colorUv)"}),u!=null?e(et,{...El,x:u.getTime()}):null]})})})]})}function id({data:n,metric:a}){var l,t,i,r,o,u;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:gn(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:gn(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(p=>({metricName:`${d} avg`,...p}))}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:gn(a.metric),...d}));if(((u=n.embedding.trafficTimeSeries)==null?void 0:u.data)!=null)return n.embedding.trafficTimeSeries.data.map(d=>({metricName:"Count",...d}))}return[]}function rd(n){var a;return((a=n.embedding.trafficTimeSeries)==null?void 0:a.data)!=null?[...n.embedding.trafficTimeSeries.data]:[]}const yt=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(
|
|
335
364
|
$primaryEventIds: [ID!]!
|
|
336
365
|
$referenceEventIds: [ID!]!
|
|
337
366
|
$corpusEventIds: [ID!]!
|
|
@@ -411,7 +440,7 @@ fragment MetricSelector_dimensions on Model {
|
|
|
411
440
|
}
|
|
412
441
|
}
|
|
413
442
|
}
|
|
414
|
-
`}}}();
|
|
443
|
+
`}}}();yt.hash="4bd627481610322f2acbcf73dfbfaadc";const sl=C`
|
|
415
444
|
margin: var(--px-spacing-lg);
|
|
416
445
|
display: flex;
|
|
417
446
|
flex-direction: column;
|
|
@@ -429,7 +458,7 @@ fragment MetricSelector_dimensions on Model {
|
|
|
429
458
|
margin-inline-start: 0;
|
|
430
459
|
}
|
|
431
460
|
}
|
|
432
|
-
`;function
|
|
461
|
+
`;function Qn(n){return e("div",{css:C`
|
|
433
462
|
max-height: 200px;
|
|
434
463
|
overflow-y: auto;
|
|
435
464
|
`,children:e("pre",{css:C`
|
|
@@ -437,57 +466,57 @@ fragment MetricSelector_dimensions on Model {
|
|
|
437
466
|
color: var(--ac-global-text-color-900);
|
|
438
467
|
white-space: normal;
|
|
439
468
|
margin: 0;
|
|
440
|
-
`,children:n.children})})}function
|
|
469
|
+
`,children:n.children})})}function sd({event:n}){const a=n.retrievedDocuments&&n.retrievedDocuments.length>0,l=!n.id.includes("CORPUS");return s("section",{css:C`
|
|
441
470
|
height: 100%;
|
|
442
471
|
overflow-y: auto;
|
|
443
|
-
`,children:[e(
|
|
472
|
+
`,children:[e(ud,{event:n}),s(un,{children:[l?e(he,{id:"prediction",title:"Prediction Details",children:s("dl",{css:sl,children:[n.predictionId!=null&&s("div",{children:[e("dt",{children:"Prediction ID"}),e("dd",{css:C`
|
|
444
473
|
display: flex;
|
|
445
474
|
align-items: center;
|
|
446
|
-
`,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(
|
|
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(he,{id:"document",title:"Document Details",children:e("dl",{css:sl,children:n.predictionId!=null&&s("div",{children:[e("dt",{children:"Document ID"}),e("dd",{css:C`
|
|
447
476
|
display: flex;
|
|
448
477
|
align-items: center;
|
|
449
|
-
`,children:n.predictionId})]})})}),e(
|
|
478
|
+
`,children:n.predictionId})]})})}),e(he,{id:"dimensions",title:"Dimensions",children:e(dd,{dimensions:n.dimensions})}),a&&e(he,{id:"retrievals",title:"Retrieved Documents",titleExtra:e(Ne,{variant:"light",children:n.retrievedDocuments.length}),children:e("ul",{css:C`
|
|
450
479
|
padding: var(--px-spacing-med);
|
|
451
480
|
li + li {
|
|
452
481
|
margin-top: var(--px-spacing-med);
|
|
453
482
|
}
|
|
454
|
-
`,children:n.retrievedDocuments.map(t=>e("li",{children:e(
|
|
483
|
+
`,children:n.retrievedDocuments.map(t=>e("li",{children:e(od,{document:t})},t.id))})})]})]})}function od({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(E,{svg:e(L.FileOutline,{})}),s(te,{level:4,children:["document ",n.id]})]}),typeof n.relevance=="number"&&e(Bn,{color:"blue",children:`relevance ${qa(n.relevance)}`})]})}),e("pre",{css:C`
|
|
455
484
|
padding: var(--px-spacing-lg);
|
|
456
485
|
white-space: normal;
|
|
457
486
|
margin: 0;
|
|
458
|
-
`,children:n.text})]})})}function
|
|
487
|
+
`,children:n.text})]})})}function dd({dimensions:n}){const a=m.useMemo(()=>n.map(i=>({name:i.dimension.name,type:i.dimension.type,value:i.value??"--"})),[n]),l=m.useMemo(()=>[{header:()=>"Name",accessorKey:"name"},{header:()=>"Type",accessorKey:"type"},{header:()=>"Value",accessorKey:"value"}],[]),t=me({columns:l,data:a,getCoreRowModel:ge()});return s("table",{css:Ue,children:[e("thead",{children:t.getHeaderGroups().map(i=>e("tr",{children:i.headers.map(r=>e("th",{colSpan:r.colSpan,children:r.isPlaceholder?null:e("div",{children:H(r.column.columnDef.header,r.getContext())})},r.id))},i.id))}),t.getCoreRowModel().rows.length?e("tbody",{children:t.getRowModel().rows.map(i=>e("tr",{children:i.getVisibleCells().map(r=>e("td",{children:H(r.column.columnDef.cell,r.getContext())},r.id))},i.id))}):e(md,{})]})}function cd({dataUrl:n}){const a=Vs(n),l=zs(n);return a?e("video",{src:n,controls:!0,css:C`
|
|
459
488
|
width: 100%;
|
|
460
489
|
height: 500px;
|
|
461
490
|
background-color: black;
|
|
462
491
|
`}):l?e("audio",{src:n,controls:!0,autoPlay:!0}):e("img",{src:n,alt:"event image",width:"100%",height:"200px",css:C`
|
|
463
492
|
object-fit: contain;
|
|
464
493
|
background-color: black;
|
|
465
|
-
`})}function
|
|
494
|
+
`})}function ud({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(cd,{dataUrl:a}),l&&e(un,{children:e(he,{id:"raw",title:"Raw Data",children:e(Qn,{children:l})})})]}):i?r=e(un,{children:e(he,{id:"document",title:"Document",children:e(Qn,{children:i})})}):t?r=s(un,{children:[e(he,{id:"prompt",title:"Prompt",children:e(Qn,{children:t.prompt})}),e(he,{id:"response",title:"Response",children:e(Qn,{children:t.response})})]}):n.rawData&&n.rawData&&n.rawData,r}function md(){return e("tbody",{className:"is-empty",children:e("tr",{children:e("td",{colSpan:100,css:n=>C`
|
|
466
495
|
text-align: center;
|
|
467
496
|
padding: ${n.spacing.margin24}px ${n.spacing.margin24}px !important;
|
|
468
|
-
`,children:e(
|
|
497
|
+
`,children:e(Rl,{graphicKey:"documents",message:"This embedding has no associated dimensions"})})})})}const ft=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 {
|
|
469
498
|
model {
|
|
470
499
|
exportedFiles {
|
|
471
500
|
fileName
|
|
472
501
|
}
|
|
473
502
|
}
|
|
474
503
|
}
|
|
475
|
-
`}}}();
|
|
504
|
+
`}}}();ft.hash="7e6db431afe21f137e54505645c787f4";const ht=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(
|
|
476
505
|
$eventIds: [ID!]!
|
|
477
506
|
) {
|
|
478
507
|
exportEvents(eventIds: $eventIds) {
|
|
479
508
|
fileName
|
|
480
509
|
}
|
|
481
510
|
}
|
|
482
|
-
`}}}();
|
|
511
|
+
`}}}();ht.hash="8b0d6962e2034d4c148d1b9919111d2f";const gd=`import phoenix as px
|
|
483
512
|
|
|
484
513
|
exports = px.active_session().exports
|
|
485
514
|
dataframe = exports[-1]
|
|
486
|
-
dataframe`,
|
|
515
|
+
dataframe`,pd=C`
|
|
487
516
|
.cm-content {
|
|
488
517
|
padding: var(--ac-global-dimension-static-size-100);
|
|
489
518
|
}
|
|
490
|
-
`;function
|
|
519
|
+
`;function yd({value:n}){const{theme:a}=Yn(),l=a==="light"?void 0:ka;return e(ha,{value:n,basicSetup:!1,extensions:[Xa()],editable:!1,theme:l,css:pd})}function fd(){const n=Q(o=>o.selectedEventIds),[a,l]=T.useMutation(ht),[t,i]=m.useState(null),r=m.useCallback(()=>{a({variables:{eventIds:[...n]},onCompleted:o=>{i(o.exportEvents)}})},[a,n]);return s(j,{children:[e(M,{variant:"default",size:"compact",icon:e(E,{svg:e(Dl,{})}),"aria-label":"Export selection / cluster",loading:l,onClick:r,children:l?"Exporting":"Export"}),e(G,{type:"slideOver",isDismissable:!0,onDismiss:()=>i(null),children:t!=null&&s(U,{title:"Cluster Exports",size:"M",children:[e(Y,{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`
|
|
491
520
|
display: flex;
|
|
492
521
|
flex-direction: column;
|
|
493
522
|
justify-content: space-between;
|
|
@@ -497,15 +526,15 @@ dataframe`,ho=C`
|
|
|
497
526
|
`,children:[e("p",{css:C`
|
|
498
527
|
margin: 0;
|
|
499
528
|
flex: 1 1 auto;
|
|
500
|
-
`,children:"You can retrieve your export in your notebook via"}),e(
|
|
529
|
+
`,children:"You can retrieve your export in your notebook via"}),e(F,{borderColor:"light",borderWidth:"thin",borderRadius:"medium",children:e(yd,{value:gd})})]}),e(un,{children:e(he,{id:"all-exports",title:"Latest Exports",children:e(m.Suspense,{fallback:e(ue,{}),children:e(hd,{})})})})]})})]})}function hd(){const n=T.useLazyLoadQuery(ft,{},{fetchPolicy:"network-only"});return e(Il,{children:n.model.exportedFiles.map((a,l)=>e(Tl,{children:s("div",{css:C`
|
|
501
530
|
display: flex;
|
|
502
531
|
flex-direction: row;
|
|
503
532
|
justify-content: space-between;
|
|
504
533
|
align-items: center;
|
|
505
|
-
`,children:[a.fileName,e(
|
|
534
|
+
`,children:[a.fileName,e(M,{size:"compact","aria-label":"Download",variant:"default",icon:e(E,{svg:e(Dl,{})}),onClick:()=>{window.open(`/exports?filename=${a.fileName}`,"_self")}})]})},l))})}function kd(n){const{getInferencesNameByRole:a}=Pe(),{events:l,onItemSelected:t}=n,i=Q(p=>p.eventIdToDataMap),r=Q(p=>p.eventIdToGroup),o=Q(p=>p.pointGroupColors),u=Q(p=>p.selectionGridSize),d=Q(p=>p.setHoveredEventId);return e("div",{css:C`
|
|
506
535
|
flex: 1 1 auto;
|
|
507
536
|
overflow-y: auto;
|
|
508
|
-
`,"data-testid":"grid-view-scroll-container",children:e("ul",{"data-grid-size":
|
|
537
|
+
`,"data-testid":"grid-view-scroll-container",children:e("ul",{"data-grid-size":u,css:C`
|
|
509
538
|
&[data-grid-size="small"] {
|
|
510
539
|
--grid-item-min-width: 100px;
|
|
511
540
|
--grid-item-height: 100px;
|
|
@@ -531,7 +560,7 @@ dataframe`,ho=C`
|
|
|
531
560
|
min-width: var(--grid-item-min-width);
|
|
532
561
|
height: var(--grid-item-height);
|
|
533
562
|
}
|
|
534
|
-
`,children:l.map((
|
|
563
|
+
`,children:l.map((p,f)=>{const c=i.get(p.id),{rawData:g=null,linkToData:y=null}=(c==null?void 0:c.embeddingMetadata)??{},{predictionLabel:k=null,actualLabel:b=null}=(c==null?void 0:c.eventMetadata)??{},v=$s(p.id),S=a(v),w=r[p.id],I=o[w];return e("li",{children:e(Qs,{rawData:g,linkToData:y,inferencesName:S,group:w,onClick:()=>{t(p.id)},onMouseOver:()=>{d(p.id)},onMouseOut:()=>{d(null)},color:I,size:u,predictionLabel:k,actualLabel:b,promptAndResponse:p.promptAndResponse,documentText:p.documentText,autoPlay:!1})},f)})})})}function bd({data:n,onPointSelected:a}){const{primaryInferences:l,referenceInferences:t}=Pe(),i=Q(f=>f.metric),[r,o]=m.useState([]),{columns:u,tableData:d}=m.useMemo(()=>{const f=n.filter(I=>I.id.includes("CORPUS")===!1);let c=!1,g=!1,y=!1,k=!1,b=!1;n.forEach(I=>{I.linkToData&&(c=!0),I.rawData&&(g=!0),(I.prompt||I.response)&&(y=!0),I.predictionLabel&&(k=!0),I.actualLabel&&(b=!0)});const v=[];t&&v.push({header:"Inference Set",accessorKey:"id",size:50,cell:({getValue:I})=>e(Sd,{id:I(),primaryInferencesName:l.name,referenceInferencesName:(t==null?void 0:t.name)??"reference"})}),c&&v.push({header:"Link",accessorKey:"linkToData",cell:({getValue:I})=>{const P=I();if(typeof P=="string"){const x=P.split("/").pop();return e(ze,{href:P,children:x})}return null}}),y?(v.push({header:"Prompt",accessorKey:"prompt",cell:se,size:200}),v.push({header:"Response",accessorKey:"response",cell:se,size:200})):g&&v.push({header:"Raw Data",accessorKey:"rawData"}),k&&v.push({header:"Prediction Label",accessorKey:"predictionLabel",size:50}),b&&v.push({header:"Actual Label",accessorKey:"actualLabel",size:50});const S=[];if(i&&i.type==="dataQuality"){const I=i.dimension.name;S.push({header:i.dimension.name,accessorKey:"metric",cell:Os,sortingFn:"basic"}),f.forEach(P=>{var D;const x=(D=P.dimensions.find(R=>R.dimension.name===I))==null?void 0:D.value;P.metric=x!=null?Number(x):null})}return{columns:[...v,...S,{header:"",id:"view-details",size:50,cell:({row:I})=>e(js,{"aria-label":"view point details",onClick:()=>{a(I.original.id)},children:"view details"})}],tableData:f}},[n,a,l,t,i]),p=me({columns:u,data:d,state:{sorting:r},getCoreRowModel:ge(),onSortingChange:o,getSortedRowModel:wn()});return s("table",{css:Ue,children:[e("thead",{children:p.getHeaderGroups().map(f=>e("tr",{children:f.headers.map(c=>s("th",{children:[c.isPlaceholder?null:s("div",{className:c.column.getCanSort()?"cursor-pointer":"",onClick:c.column.getToggleSortingHandler(),children:[H(c.column.columnDef.header,c.getContext()),c.column.getIsSorted()?e(E,{className:"sort-icon",svg:c.column.getIsSorted()==="asc"?e(L.ArrowDownFilled,{}):e(L.ArrowUpFilled,{})}):null]}),e("div",{onMouseDown:c.getResizeHandler(),onTouchStart:c.getResizeHandler(),className:`resizer ${c.column.getIsResizing()?"isResizing":""}`,style:{transform:c.column.getIsResizing()?`translateX(${p.getState().columnSizingInfo.deltaOffset}px)`:""}})]},c.id))},f.id))}),e("tbody",{children:p.getRowModel().rows.map(f=>e("tr",{children:f.getVisibleCells().map(c=>e("td",{style:{width:c.column.getSize()},children:H(c.column.columnDef.cell,c.getContext())},c.id))},f.id))})]})}function Sd({id:n,primaryInferencesName:a,referenceInferencesName:l}){const t=n.includes("PRIMARY"),i=Bo();return s(h,{direction:"row",gap:"size-100",alignItems:"center",children:[e(Us,{shape:qs.circle,color:i[t?0:1]}),t?a:l]})}const vd=C`
|
|
535
564
|
width: 100%;
|
|
536
565
|
height: 100%;
|
|
537
566
|
position: relative;
|
|
@@ -561,37 +590,37 @@ dataframe`,ho=C`
|
|
|
561
590
|
}
|
|
562
591
|
}
|
|
563
592
|
}
|
|
564
|
-
`;function
|
|
593
|
+
`;function Cd({event:n,relevance:a}){return{id:n.eventMetadata.predictionId||"unknown id",text:n.documentText??"empty document",relevance:a}}function Fd(){const n=Q(x=>x.selectedEventIds),a=Q(x=>x.setSelectedEventIds),l=Q(x=>x.setSelectedClusterId),t=Q(x=>x.selectionDisplay),[i,r]=Ce.useState(null),{primaryEventIds:o,referenceEventIds:u,corpusEventIds:d}=m.useMemo(()=>{const x=[],D=[],R=[];return n.forEach(_=>{_.includes("PRIMARY")?x.push(_):_.includes("CORPUS")?R.push(_):D.push(_)}),{primaryEventIds:x,referenceEventIds:D,corpusEventIds:R}},[n]),p=T.useLazyLoadQuery(yt,{primaryEventIds:[...o],referenceEventIds:[...u],corpusEventIds:[...d]}),f=m.useMemo(()=>{var _,O,X,le,pe,ye;const x=((O=(_=p.model)==null?void 0:_.primaryInferences)==null?void 0:O.events)??[],D=((le=(X=p.model)==null?void 0:X.referenceInferences)==null?void 0:le.events)??[],R=((ye=(pe=p.model)==null?void 0:pe.corpusInferences)==null?void 0:ye.events)??[];return[...x,...D,...R]},[p]),c=()=>{a(new Set),l(null)},g=Q(x=>x.eventIdToDataMap),y=Q(x=>x.pointData),k=Q(x=>x.selectionSearchText),b=m.useMemo(()=>f.map(x=>{var _,O,X,le,pe,ye,N;const D=g.get(x.id),R=[];return y!=null&&(D==null?void 0:D.retrievals)!=null&&D.retrievals.forEach(({documentId:V,relevance:A})=>{const $=y[V];$!=null&&R.push(Cd({event:$,relevance:A}))}),{id:x.id,predictionId:((_=x.eventMetadata)==null?void 0:_.predictionId)??null,actualLabel:((O=x.eventMetadata)==null?void 0:O.actualLabel)??null,actualScore:((X=x.eventMetadata)==null?void 0:X.actualScore)??null,predictionLabel:((le=x.eventMetadata)==null?void 0:le.predictionLabel)??null,predictionScore:((pe=x.eventMetadata)==null?void 0:pe.predictionScore)??null,rawData:(D==null?void 0:D.embeddingMetadata.rawData)??null,linkToData:(D==null?void 0:D.embeddingMetadata.linkToData)??null,dimensions:x.dimensions,prompt:((ye=x.promptAndResponse)==null?void 0:ye.prompt)??null,response:((N=x.promptAndResponse)==null?void 0:N.response)??null,retrievedDocuments:R,documentText:x.documentText??null}}),[f,g,y]),v=m.useMemo(()=>{if(k){const x=k.toLowerCase();return b.filter(D=>{var R,_,O,X;return D.id.includes(x)||((R=D.documentText)==null?void 0:R.toLowerCase().includes(x))||((_=D.predictionId)==null?void 0:_.includes(x))||((O=D.prompt)==null?void 0:O.toLowerCase().includes(x))||((X=D.response)==null?void 0:X.toLowerCase().includes(x))})}return b},[b,k]),S=m.useMemo(()=>{if(k){const x=k.toLowerCase();return f.filter(D=>{var R,_,O,X,le,pe,ye;return D.id.includes(x)||((R=D.documentText)==null?void 0:R.toLowerCase().includes(x))||((O=(_=D.eventMetadata)==null?void 0:_.predictionId)==null?void 0:O.includes(x))||((le=(X=D.promptAndResponse)==null?void 0:X.prompt)==null?void 0:le.toLowerCase().includes(x))||((ye=(pe=D.promptAndResponse)==null?void 0:pe.response)==null?void 0:ye.toLowerCase().includes(x))})}return f},[f,k]),w=m.useMemo(()=>i?b.find(D=>D.id===i)??null:null,[b,i]),I=f.length,P=S.length;return s("section",{css:vd,children:[s("div",{role:"toolbar",css:C`
|
|
565
594
|
position: absolute;
|
|
566
595
|
top: var(--px-spacing-med);
|
|
567
596
|
right: var(--px-spacing-lg);
|
|
568
597
|
display: flex;
|
|
569
598
|
flex-direction: row-reverse;
|
|
570
599
|
gap: var(--px-spacing-med);
|
|
571
|
-
`,children:[e(
|
|
600
|
+
`,children:[e(M,{variant:"default",size:"compact",icon:e(E,{svg:e(Cs,{})}),"aria-label":"Clear selection",onClick:c}),e(fd,{})]}),e(Se,{children:s(B,{name:"Selection",children:[e(Kd,{numSelectedEvents:I,numMatchingEvents:P,searchText:k}),t===Ml.list?e("div",{css:C`
|
|
572
601
|
flex: 1 1 auto;
|
|
573
602
|
overflow-y: auto;
|
|
574
|
-
`,children:e(
|
|
603
|
+
`,children:e(bd,{data:v,onPointSelected:r})}):e(kd,{events:S,onItemSelected:r})]})}),e(G,{type:"slideOver",isDismissable:!0,onDismiss:()=>r(null),children:w&&e(U,{title:"Embedding Details",size:"L",children:e(sd,{event:w})})})]})}function Kd({numSelectedEvents:n,numMatchingEvents:a,searchText:l}){const t=Q(p=>p.selectionDisplay),i=Q(p=>p.setSelectionDisplay),r=Q(p=>p.selectionGridSize),o=Q(p=>p.setSelectionGridSize),u=Q(p=>p.setSelectionSearchText),d=m.useMemo(()=>l?`${a}/${n} match "${l}"`:`${n} selected`,[n,a,l]);return e(ja,{extra:s("div",{css:C`
|
|
575
604
|
display: flex;
|
|
576
605
|
flex-direction: row;
|
|
577
606
|
gap: var(--px-spacing-med);
|
|
578
|
-
`,children:[e(
|
|
607
|
+
`,children:[e(Fs,{placeholder:"Search by text or ID",onChange:p=>{u(p)}}),t===Ml.gallery&&e(Bs,{size:r,onChange:o}),e(Hs,{mode:t,onChange:p=>{i(p)}})]}),children:e(K,{children:d})})}const kt=dt;function Qg(){const{referenceInferences:n,corpusInferences:a}=Pe(),{timeRange:l}=je(),t=m.useMemo(()=>{let i={};return a!=null?i=Js():n!=null?i=Zs():i=Xs(),i={...i,umapParameters:{...window.Config.UMAP}},i},[a,n]);return e(Nl,{initialTimestamp:l.end,children:e(Ys,{...t,children:e(xd,{})})})}function xd(){const n=Ho(),{primaryInferences:a,referenceInferences:l}=Pe(),t=Q(S=>S.umapParameters),i=Q(S=>S.getHDSCANParameters),r=Q(S=>S.getMetric),o=Q(S=>S.reset),u=Q(S=>S.setLoading),[d,p]=m.useState(!0),[f,c,g]=T.useQueryLoader(kt),{selectedTimestamp:y}=ma(),k=m.useMemo(()=>y??new Date(a.endTime),[y,a.endTime]),b=m.useMemo(()=>({start:Fl(k,2).toISOString(),end:k.toISOString()}),[k]),v=T.useLazyLoadQuery(ot,{});return m.useEffect(()=>{o(),u(!0);const S=r();return c({id:n,timeRange:b,...t,...i(),fetchDataQualityMetric:S.type==="dataQuality",fetchPerformanceMetric:S.type==="performance",dataQualityMetricColumnName:S.type==="dataQuality"?S.dimension.name:null,performanceMetric:S.type==="performance"?S.metric:"accuracyScore"},{fetchPolicy:"network-only"}),()=>{g()}},[u,o,n,c,g,t,i,r,b]),s("main",{css:C`
|
|
579
608
|
flex: 1 1 auto;
|
|
580
609
|
display: flex;
|
|
581
610
|
flex-direction: column;
|
|
582
611
|
overflow: hidden;
|
|
583
|
-
`,children:[e(
|
|
612
|
+
`,children:[e(_d,{}),s(ja,{extra:s(h,{direction:"row",justifyContent:"center",alignItems:"center",gap:"size-100",children:[e(Jn,{onChange:S=>{p(S)},defaultSelected:!0,labelPlacement:"start",children:"Show Timeseries"}),e(Wo,{})]}),children:[e(wl,{}),l?e(Al,{inferencesRole:"reference",timeRange:{start:new Date(l.startTime),end:new Date(l.endTime)}}):null,e(Yo,{model:v.model})]}),s(Ge,{direction:"vertical",children:[d?s(j,{children:[e(re,{defaultSize:20,collapsible:!0,order:1,children:e(m.Suspense,{fallback:e(ue,{}),children:e(td,{embeddingDimensionId:n})})}),e(We,{css:kn})]}):null,e(re,{order:2,children:e("div",{css:C`
|
|
584
613
|
width: 100%;
|
|
585
614
|
height: 100%;
|
|
586
615
|
position: relative;
|
|
587
|
-
`,children:e(
|
|
616
|
+
`,children:e(m.Suspense,{fallback:e(eo,{}),children:f?e(Td,{queryReference:f}):null})})})]})]})}function Dd(n){if(n.__typename!=="Point3D")throw new Error(`Expected Point3D but got ${n.__typename} for coordinates`);return[n.x,n.y,n.z]}function Td({queryReference:n}){const a=T.usePreloadedQuery(kt,n),l=m.useMemo(()=>{var p,f;return((f=(p=a.embedding)==null?void 0:p.UMAPPoints)==null?void 0:f.data)??[]},[a]),t=m.useMemo(()=>{var p,f;return((f=(p=a.embedding)==null?void 0:p.UMAPPoints)==null?void 0:f.referenceData)??[]},[a]),i=m.useMemo(()=>{var p,f;return((f=(p=a.embedding)==null?void 0:p.UMAPPoints)==null?void 0:f.corpusData)??[]},[a]),r=m.useMemo(()=>{var p,f;return((f=(p=a.embedding)==null?void 0:p.UMAPPoints)==null?void 0:f.contextRetrievals)??[]},[a]),o=m.useMemo(()=>[...l,...t,...i].map(f=>({...f,position:Dd(f.coordinates),metaData:{id:f.eventId}})),[t,l,i]),u=Q(p=>p.setInitialData),d=Q(p=>p.setClusters);return os(()=>{var f,c;const p=((c=(f=a.embedding)==null?void 0:f.UMAPPoints)==null?void 0:c.clusters)||[];u({points:o,clusters:p,retrievals:r})},[o,n,r,u,d]),e("div",{css:C`
|
|
588
617
|
flex: 1 1 auto;
|
|
589
618
|
display: flex;
|
|
590
619
|
flex-direction: row;
|
|
591
620
|
align-items: stretch;
|
|
592
621
|
width: 100%;
|
|
593
622
|
height: 100%;
|
|
594
|
-
`,"data-testid":"point-cloud-display",children:s(
|
|
623
|
+
`,"data-testid":"point-cloud-display",children:s(Ge,{direction:"horizontal",children:[e(re,{id:"embedding-left",defaultSize:15,maxSize:30,minSize:10,collapsible:!0,children:s(Ge,{autoSaveId:"embedding-controls-vertical",direction:"vertical",children:[e(re,{css:C`
|
|
595
624
|
display: flex;
|
|
596
625
|
flex-direction: column;
|
|
597
626
|
.ac-tabs {
|
|
@@ -612,7 +641,7 @@ dataframe`,ho=C`
|
|
|
612
641
|
}
|
|
613
642
|
}
|
|
614
643
|
}
|
|
615
|
-
`,children:e(
|
|
644
|
+
`,children:e(Ad,{})}),e(We,{css:kn}),e(re,{css:C`
|
|
616
645
|
.ac-tabs {
|
|
617
646
|
height: 100%;
|
|
618
647
|
overflow: hidden;
|
|
@@ -621,27 +650,27 @@ dataframe`,ho=C`
|
|
|
621
650
|
overflow-y: auto;
|
|
622
651
|
}
|
|
623
652
|
}
|
|
624
|
-
`,children:s(
|
|
653
|
+
`,children:s(Se,{children:[e(B,{name:"Display",children:e(no,{})}),e(B,{name:"Hyperparameters",children:e(ao,{})})]})})]})}),e(We,{css:lo}),e(re,{children:s("div",{css:C`
|
|
625
654
|
position: relative;
|
|
626
655
|
width: 100%;
|
|
627
656
|
height: 100%;
|
|
628
|
-
`,children:[e(
|
|
657
|
+
`,children:[e(Id,{}),e(to,{})]})})]})})}function Id(){return Q(a=>a.selectedEventIds).size===0?null:e("div",{css:C`
|
|
629
658
|
position: absolute;
|
|
630
659
|
top: 0;
|
|
631
660
|
left: 0;
|
|
632
661
|
bottom: 0;
|
|
633
662
|
right: 0;
|
|
634
|
-
`,"data-testid":"selection-panel",children:s(
|
|
663
|
+
`,"data-testid":"selection-panel",children:s(Ge,{direction:"vertical",children:[e(re,{}),e(We,{css:kn,style:{zIndex:1}}),e(re,{id:"embedding-point-selection",defaultSize:40,minSize:20,order:2,style:{zIndex:1},children:e(Ld,{children:e(m.Suspense,{fallback:e(ue,{}),children:e(Fd,{})})})})]})})}function Ld(n){return e("div",{css:C`
|
|
635
664
|
background-color: var(--ac-global-color-grey-75);
|
|
636
665
|
width: 100%;
|
|
637
666
|
height: 100%;
|
|
638
|
-
`,children:n.children})}const
|
|
667
|
+
`,children:n.children})}const wd=1,Ad=Ce.memo(function(){const{referenceInferences:a}=Pe(),l=Q(c=>c.clusters),t=Q(c=>c.selectedClusterId),i=Q(c=>c.metric),r=Q(c=>c.setSelectedClusterId),o=Q(c=>c.setSelectedEventIds),u=Q(c=>c.setHighlightedClusterId),d=Q(c=>c.setClusterColorMode),p=a==null||i.type==="drift",f=m.useCallback(c=>{d(c===wd?tl.highlight:tl.default)},[d]);return s(Se,{onChange:f,children:[e(B,{name:"Clusters",extra:e(Ne,{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(Go,{})})}),e(F,{flex:"1 1 auto",overflow:"auto",children:e("ul",{css:c=>C`
|
|
639
668
|
flex: 1 1 auto;
|
|
640
669
|
display: flex;
|
|
641
670
|
flex-direction: column;
|
|
642
|
-
gap: ${
|
|
643
|
-
margin: ${
|
|
644
|
-
`,children:l.map(
|
|
671
|
+
gap: ${c.spacing.margin8}px;
|
|
672
|
+
margin: ${c.spacing.margin8}px;
|
|
673
|
+
`,children:l.map(c=>e("li",{children:e(Gs,{clusterId:c.id,numPoints:c.eventIds.length,isSelected:t===c.id,driftRatio:c.driftRatio,primaryToCorpusRatio:c.primaryToCorpusRatio,primaryMetricValue:c.primaryMetricValue,referenceMetricValue:c.referenceMetricValue,metricName:Pd(i),hideReference:p,onClick:()=>{t!==c.id?(r(c.id),o(new Set(c.eventIds))):(r(null),o(new Set))},onMouseEnter:()=>{u(c.id)},onMouseLeave:()=>{u(null)}})},c.id))})})]})}),e(B,{name:"Configuration",children:e(F,{overflow:"auto",height:"100%",children:e(Ws,{})})})]})});function Pd(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:xe()}break}case"performance":return gn(l);case"retrieval":{switch(l){case"queryDistance":return"% Query";default:xe()}break}default:xe()}}function _d(){const{notifyError:n}=Pl(),a=Q(t=>t.errorMessage),l=Q(t=>t.setErrorMessage);return m.useEffect(()=>{a!==null&&n({title:"An error occurred",message:a,action:{text:"Dismiss",onClick:()=>{l(null)}}})},[a,n,l]),null}const bt=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(
|
|
645
674
|
$id: GlobalID!
|
|
646
675
|
) {
|
|
647
676
|
embedding: node(id: $id) {
|
|
@@ -654,7 +683,7 @@ dataframe`,ho=C`
|
|
|
654
683
|
id
|
|
655
684
|
}
|
|
656
685
|
}
|
|
657
|
-
`}}}();
|
|
686
|
+
`}}}();bt.hash="c049e57d92943f64b5e751e0daa89dc8";async function Og(n){const{embeddingDimensionId:a}=n.params;return T.fetchQuery(Ke,bt,{id:a}).toPromise()}const St=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],u=[{kind:"Variable",name:"hasReference",variableName:"hasReference"},r],d={alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},p=[{alias:null,args:null,kind:"ScalarField",name:"primaryValue",storageKey:null}],f={kind:"Literal",name:"metric",value:"cardinality"},c={kind:"Literal",name:"metric",value:"percentEmpty"},g={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:u,kind:"FragmentSpread",name:"DimensionCardinalityStats_dimension"},{args:u,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:p,storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"DatasetValues",kind:"LinkedField",name:"totalCounts",plural:!1,selections:p,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:[c,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:[g,f],kind:"ScalarField",name:"dataQualityMetric",storageKey:'dataQualityMetric(inferencesRole:"reference",metric:"cardinality")'},{alias:"referencePercentEmpty",args:[g,c],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(
|
|
658
687
|
$dimensionId: GlobalID!
|
|
659
688
|
$timeRange: TimeRange!
|
|
660
689
|
$hasReference: Boolean!
|
|
@@ -735,7 +764,7 @@ fragment DimensionSegmentsBarChart_dimension_3E0ZE6 on Dimension {
|
|
|
735
764
|
}
|
|
736
765
|
}
|
|
737
766
|
}
|
|
738
|
-
`}}}();
|
|
767
|
+
`}}}();St.hash="d194bfd656408e8ba7cb427ddc80fc85";const vt=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}}();vt.hash="8b4edef350e4df49e799afa70ca34918";function Ed(n){const a=T.useFragment(vt,n.dimension);return s(j,{children:[e(K,{elementType:"h3",textSize:"small",color:"text-700",children:"Cardinality"}),e(K,{textSize:"xlarge",children:pn(a.cardinality)}),a.referenceCardinality!=null&&e(K,{textSize:"medium",color:"designationPurple",children:pn(a.referenceCardinality)})]})}const Ct=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(
|
|
739
768
|
$dimensionId: GlobalID!
|
|
740
769
|
$timeRange: TimeRange!
|
|
741
770
|
$granularity: Granularity!
|
|
@@ -753,7 +782,7 @@ fragment DimensionSegmentsBarChart_dimension_3E0ZE6 on Dimension {
|
|
|
753
782
|
}
|
|
754
783
|
}
|
|
755
784
|
}
|
|
756
|
-
`}}}();
|
|
785
|
+
`}}}();Ct.hash="88ce04bb2022d5e2bc75c663abd7e5de";const la={top:25,right:18,left:18,bottom:5},Rd=new Intl.NumberFormat([],{maximumFractionDigits:2}),Ft=()=>{const{gray300:n}=qe();return{color:n}};function Md({active:n,payload:a,label:l}){var i;const{color:t}=Ft();if(n&&a&&a.length){const r=((i=a[0])==null?void 0:i.value)??null,o=typeof r=="number"?Rd.format(r):"--";return s(en,{children:[e(K,{weight:"heavy",textSize:"medium",children:`${Ve(new Date(l))}`}),e(ce,{color:t,name:"Cardinality",value:o}),e(ga,{})]})}return null}function Nd({dimensionId:n}){var u;const{timeRange:a}=je(),l=En(a),t=T.useLazyLoadQuery(Ct,{dimensionId:n,timeRange:{start:a.start.toISOString(),end:a.end.toISOString()},granularity:l}),{color:i}=Ft(),r=((u=t.dimension.cardinalityTimeSeries)==null?void 0:u.data.map(d=>({timestamp:new Date(d.timestamp).valueOf(),value:d.value})))||[],o=Rn({samplingIntervalMinutes:l.samplingIntervalMinutes});return e(nn,{width:"100%",height:"100%",children:s(aa,{data:r,margin:la,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(an,{...Mn,tickFormatter:d=>o(new Date(d))}),e(Ae,{stroke:oe.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(ln,{strokeDasharray:"4 4",stroke:oe.colors.gray200,strokeOpacity:.5}),e(tn,{content:e(Md,{})}),e(Gn,{type:"monotone",dataKey:"value",stroke:i,fillOpacity:1,fill:"url(#cardinalityColorUv)"})]})})}const Kt={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};Kt.hash="6dccac51f3fb0853276677c692af5a43";function Vd(n){const l=T.useFragment(Kt,n.dimension).count??0;return s(j,{children:[e(K,{elementType:"h3",textSize:"small",color:"text-700",children:"Total Count"}),e(K,{textSize:"xlarge",children:pn(l)})]})}const xt=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(
|
|
757
786
|
$dimensionId: GlobalID!
|
|
758
787
|
$timeRange: TimeRange!
|
|
759
788
|
$countGranularity: Granularity!
|
|
@@ -771,7 +800,7 @@ fragment DimensionSegmentsBarChart_dimension_3E0ZE6 on Dimension {
|
|
|
771
800
|
}
|
|
772
801
|
}
|
|
773
802
|
}
|
|
774
|
-
`}}}();
|
|
803
|
+
`}}}();xt.hash="9677ef7c6b298554824fe3fd3904c7aa";const zd=new Intl.NumberFormat([],{maximumFractionDigits:2}),Dt=()=>{const{gray300:n}=qe();return{barColor:n}};function $d({active:n,payload:a,label:l}){var i;const{barColor:t}=Dt();if(n&&a&&a.length){const r=((i=a[0])==null?void 0:i.value)??null,o=typeof r=="number"?zd.format(r):"--";return s(en,{children:[e(K,{weight:"heavy",textSize:"medium",children:`${Ve(new Date(l))}`}),e(ce,{color:t,shape:"square",name:"Count",value:o})]})}return null}function Qd({dimensionId:n}){var d;const{timeRange:a}=je(),l=En(a),r=(((d=T.useLazyLoadQuery(xt,{dimensionId:n,timeRange:{start:a.start.toISOString(),end:a.end.toISOString()},countGranularity:l}).embedding.trafficTimeSeries)==null?void 0:d.data)||[]).map(p=>({...p,timestamp:new Date(p.timestamp).valueOf()})),o=Rn({samplingIntervalMinutes:l.samplingIntervalMinutes}),{barColor:u}=Dt();return e(nn,{width:"100%",height:"100%",children:s(Za,{data:r,margin:la,syncId:"dimensionDetails",children:[e("defs",{children:s("linearGradient",{id:"countBarColor",x1:"0",y1:"0",x2:"0",y2:"1",children:[e("stop",{offset:"5%",stopColor:u,stopOpacity:1}),e("stop",{offset:"95%",stopColor:u,stopOpacity:.5})]})}),e(an,{...Mn,tickFormatter:p=>o(new Date(p))}),e(Ae,{stroke:oe.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(ln,{strokeDasharray:"4 4",stroke:oe.colors.gray200,strokeOpacity:.5}),e(tn,{...Ua,content:e($d,{})}),e(Ln,{dataKey:"value",fill:"url(#countBarColor)",spacing:5})]})})}const Tt=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},u=[{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:u,storageKey:null},p={alias:null,args:null,concreteType:"DatasetValues",kind:"LinkedField",name:"totalCounts",plural:!1,selections:u,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},p],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},p],storageKey:null}],type:"Dimension",abstractKey:null}],storageKey:null}]},params:{cacheID:"7d11d88f419003f5ee8cd9d11312e427",id:null,metadata:{},name:"DimensionDriftBreakdownSegmentBarChartQuery",operationKind:"query",text:`query DimensionDriftBreakdownSegmentBarChartQuery(
|
|
775
804
|
$dimensionId: GlobalID!
|
|
776
805
|
$timeRange: TimeRange!
|
|
777
806
|
) {
|
|
@@ -811,7 +840,7 @@ fragment DimensionSegmentsBarChart_dimension_3E0ZE6 on Dimension {
|
|
|
811
840
|
}
|
|
812
841
|
}
|
|
813
842
|
}
|
|
814
|
-
`}}}();
|
|
843
|
+
`}}}();Tt.hash="6bb76e3cce4ee28c333e485b3aa2dffd";const ol=Va(".2f"),It=()=>{const{primary:n,reference:a}=qe();return{primaryBarColor:n,referenceBarColor:a}};function Od({active:n,payload:a,label:l}){var r,o,u,d,p,f;const{primaryBarColor:t,referenceBarColor:i}=It();if(n&&a&&a.length){const c=(o=(r=a[0])==null?void 0:r.payload)==null?void 0:o.primaryName,g=(u=a[0])==null?void 0:u.value,y=(p=(d=a[0])==null?void 0:d.payload)==null?void 0:p.referenceName,k=(f=a[1])==null?void 0:f.value;return s(en,{children:[e(K,{elementType:"h3",textSize:"medium",weight:"heavy",children:l}),e(ce,{color:t,shape:"square",name:c,value:g!=null?`${ol(g)}%`:"--"}),e(ce,{color:i,shape:"square",name:y,value:k!=null?`${ol(k)}%`:"--"})]})}return null}function jd(n){var g,y,k,b,v;const{primaryInferences:a,referenceInferences:l}=Pe(),t=a.name,i=(l==null?void 0:l.name)||"reference",{selectedTimestamp:r}=ma(),o=m.useMemo(()=>r??new Date(a.endTime),[r,a.endTime]),u=m.useMemo(()=>({start:Fl(o,2).toISOString(),end:o.toISOString()}),[o]),d=T.useLazyLoadQuery(Tt,{dimensionId:n.dimensionId,timeRange:u}),p=m.useMemo(()=>{var P,x,D,R,_;const S=((P=d.dimension.segmentsComparison)==null?void 0:P.segments)??[],w=((D=(x=d.dimension.segmentsComparison)==null?void 0:x.totalCounts)==null?void 0:D.primaryValue)??0,I=((_=(R=d.dimension.segmentsComparison)==null?void 0:R.totalCounts)==null?void 0:_.referenceValue)??0;return S.map(O=>{var V,A;const X=((V=O.counts)==null?void 0:V.primaryValue)??0,le=((A=O.counts)==null?void 0:A.referenceValue)??0,pe=Vl(O.bin),ye=X/w*100,N=le/I*100;return{name:pe,primaryName:t,referenceName:i,primaryPercent:ye,referencePercent:N}})},[(g=d.dimension.segmentsComparison)==null?void 0:g.segments,(k=(y=d.dimension.segmentsComparison)==null?void 0:y.totalCounts)==null?void 0:k.primaryValue,(v=(b=d.dimension.segmentsComparison)==null?void 0:b.totalCounts)==null?void 0:v.referenceValue,t,i]),{primaryBarColor:f,referenceBarColor:c}=It();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 ${Ve(new Date(u.end))}`})}),e(F,{flex:!0,children:e(nn,{children:s(Za,{data:p,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:c,stopOpacity:1}),e("stop",{offset:"95%",stopColor:c,stopOpacity:.5})]})]}),e(an,{dataKey:"name",style:{fill:"var(--ac-global-text-color-700)"}}),e(Ae,{stroke:oe.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(ln,{strokeDasharray:"4 4",stroke:oe.colors.gray200,strokeOpacity:.5}),e(tn,{...Ua,content:e(Od,{})}),e(Ln,{dataKey:"primaryPercent",fill:"url(#dimensionPrimarySegmentsBarColor)"}),e(Ln,{dataKey:"referencePercent",fill:"url(#dimensionReferenceSegmentsBarColor)"})]})})})]})}const Lt={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};Lt.hash="f8a9fb08a14f63906e38bc247d50b189";const qd=s(_n,{variant:"info",placement:"top end",children:[e(te,{weight:"heavy",level:4,children:"Population Stability Index"}),e(Pn,{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(ze,{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 Ud(n){const a=T.useFragment(Lt,n.dimension);return s(j,{children:[s(h,{direction:"row",alignItems:"center",gap:"size-25",children:[e(K,{elementType:"h3",textSize:"small",color:"text-700",children:"PSI"}),qd]}),e(K,{textSize:"xlarge",children:Dn(a.psi)})]})}const wt=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"},u=[{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:u,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:u,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(
|
|
815
844
|
$dimensionId: GlobalID!
|
|
816
845
|
$timeRange: TimeRange!
|
|
817
846
|
$driftGranularity: Granularity!
|
|
@@ -836,7 +865,7 @@ fragment DimensionSegmentsBarChart_dimension_3E0ZE6 on Dimension {
|
|
|
836
865
|
}
|
|
837
866
|
}
|
|
838
867
|
}
|
|
839
|
-
`}}}();
|
|
868
|
+
`}}}();wt.hash="6312b58dbb252b17efdf08d44dd58630";const At=()=>{const{orange300:n,gray300:a}=qe();return{color:n,barColor:a}};function Bd({active:n,payload:a,label:l}){var i;const{color:t}=At();if(n&&a&&a.length){const r=((i=a[1])==null?void 0:i.value)??null;return s(en,{children:[e(K,{weight:"heavy",textSize:"medium",children:`${Ve(new Date(l))}`}),e(ce,{color:t,name:"PSI",value:Dn(r)}),e(ga,{}),s("div",{css:C`
|
|
840
869
|
display: flex;
|
|
841
870
|
flex-direction: row;
|
|
842
871
|
align-items: center;
|
|
@@ -844,7 +873,7 @@ fragment DimensionSegmentsBarChart_dimension_3E0ZE6 on Dimension {
|
|
|
844
873
|
gap: var(--px-spacing-sm);
|
|
845
874
|
|
|
846
875
|
margin-top: var(--px-spacing-sm);
|
|
847
|
-
`,children:[e(
|
|
876
|
+
`,children:[e(E,{svg:e(xl,{})}),e("span",{children:"Click to view details"})]})]})}return null}function Hd({dimensionId:n}){var y,k;const{timeRange:a}=je(),{selectedTimestamp:l,setSelectedTimestamp:t}=ma(),i=En(a),r=T.useLazyLoadQuery(wt,{dimensionId:n,timeRange:{start:a.start.toISOString(),end:a.end.toISOString()},driftGranularity:_l(a),countGranularity:i}),o=((y=r.embedding.driftTimeSeries)==null?void 0:y.data)||[],u=((k=r.embedding.trafficTimeSeries)==null?void 0:k.data.reduce((b,v)=>(b[v.timestamp]=v.value,b),{}))??{},d=o.map(b=>{const v=u[b.timestamp];return{...b,traffic:v,timestamp:new Date(b.timestamp).valueOf()}}),p=Rn({samplingIntervalMinutes:i.samplingIntervalMinutes}),f=m.useCallback(b=>{const{activePayload:v}=b;if(v!=null&&v.length>0){const S=v[0].payload;t(new Date(S.timestamp))}},[t]),{color:c,barColor:g}=At();return e(nn,{width:"100%",height:"100%",children:s(aa,{data:d,margin:la,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:c,stopOpacity:.8}),e("stop",{offset:"95%",stopColor:c,stopOpacity:0})]}),s("linearGradient",{id:"barColor",x1:"0",y1:"0",x2:"0",y2:"1",children:[e("stop",{offset:"5%",stopColor:g,stopOpacity:.8}),e("stop",{offset:"95%",stopColor:g,stopOpacity:0})]})]}),e(an,{...Mn,tickFormatter:b=>p(new Date(b))}),e(Ae,{stroke:oe.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(Ae,{yAxisId:"right",orientation:"right",tick:!1,tickLine:!1,width:0}),e(ln,{strokeDasharray:"4 4",stroke:oe.colors.gray200,strokeOpacity:.5}),e(tn,{content:e(Bd,{})}),e(Ln,{yAxisId:"right",dataKey:"traffic",fill:"url(#barColor)",spacing:5}),e(Gn,{type:"monotone",dataKey:"value",stroke:c,fillOpacity:1,fill:"url(#dimensionDriftColorUv)"}),l!=null?e(et,{...El,x:l.getTime()}):null]})})}const Pt=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}}();Pt.hash="1e10d0449d6607d9292f355548c41c78";function Gd(n){const a=T.useFragment(Pt,n.dimension);return s(j,{children:[e(K,{elementType:"h3",textSize:"small",color:"text-700",children:"% Empty"}),e(K,{textSize:"xlarge",children:_a(a.percentEmpty)}),a.referencePercentEmpty!=null&&e(K,{textSize:"medium",color:"designationPurple",children:_a(a.referencePercentEmpty)})]})}const _t=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(
|
|
848
877
|
$dimensionId: GlobalID!
|
|
849
878
|
$timeRange: TimeRange!
|
|
850
879
|
$granularity: Granularity!
|
|
@@ -862,7 +891,7 @@ fragment DimensionSegmentsBarChart_dimension_3E0ZE6 on Dimension {
|
|
|
862
891
|
}
|
|
863
892
|
}
|
|
864
893
|
}
|
|
865
|
-
`}}}();
|
|
894
|
+
`}}}();_t.hash="1e843d6c8dbe05b389b24188c6bdb394";const Wd=new Intl.NumberFormat([],{maximumFractionDigits:2}),Et=()=>{const{gray100:n}=qe();return{color:n}};function Jd({active:n,payload:a,label:l}){var i;const{color:t}=Et();if(n&&a&&a.length){const r=((i=a[0])==null?void 0:i.value)??null,o=typeof r=="number"?Wd.format(r):"--";return s(en,{children:[e(K,{weight:"heavy",textSize:"medium",children:`${Ve(new Date(l))}`}),e(ce,{color:t,name:"% Empty",value:o})]})}return null}function Zd({dimensionId:n}){var u;const{timeRange:a}=je(),l=En(a),i=((u=T.useLazyLoadQuery(_t,{dimensionId:n,timeRange:{start:a.start.toISOString(),end:a.end.toISOString()},granularity:l}).embedding.percentEmptyTimeSeries)==null?void 0:u.data.map(d=>({timestamp:new Date(d.timestamp).valueOf(),value:d.value})))||[],r=Rn({samplingIntervalMinutes:l.samplingIntervalMinutes}),{color:o}=Et();return e(nn,{width:"100%",height:"100%",children:s(aa,{data:i,margin:la,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(an,{...Mn,tickFormatter:d=>r(new Date(d))}),e(Ae,{stroke:oe.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(ln,{strokeDasharray:"4 4",stroke:oe.colors.gray200,strokeOpacity:.5}),e(tn,{content:e(Jd,{})}),e(nt,{type:"monotone",dataKey:"value",stroke:o,fillOpacity:1,fill:"url(#percentEmptyColorUv)"})]})})}const Rt=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}}();Rt.hash="c306c8eafb1d34be464d3a658d5f94a7";function Xd(n){const a=T.useFragment(Rt,n.dimension);return e("ul",{css:C`
|
|
866
895
|
display: flex;
|
|
867
896
|
flex-direction: column;
|
|
868
897
|
gap: var(--px-spacing-sm);
|
|
@@ -870,7 +899,7 @@ fragment DimensionSegmentsBarChart_dimension_3E0ZE6 on Dimension {
|
|
|
870
899
|
display: flex;
|
|
871
900
|
flex-direction: column;
|
|
872
901
|
align-items: flex-end;
|
|
873
|
-
`,children:[e(
|
|
902
|
+
`,children:[e(K,{elementType:"h3",textSize:"xsmall",color:"text-700",children:l}),e(K,{textSize:"medium","data-raw":t,children:qa(t)})]},l)})})}const Mt=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"},u=[{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:u,storageKey:null},{alias:"p75TimeSeries",args:[r,{kind:"Literal",name:"metric",value:"p75"},o],concreteType:"DataQualityTimeSeries",kind:"LinkedField",name:"dataQualityTimeSeries",plural:!1,selections:u,storageKey:null},{alias:"p50TimeSeries",args:[r,{kind:"Literal",name:"metric",value:"p50"},o],concreteType:"DataQualityTimeSeries",kind:"LinkedField",name:"dataQualityTimeSeries",plural:!1,selections:u,storageKey:null},{alias:"p25TimeSeries",args:[r,{kind:"Literal",name:"metric",value:"p25"},o],concreteType:"DataQualityTimeSeries",kind:"LinkedField",name:"dataQualityTimeSeries",plural:!1,selections:u,storageKey:null},{alias:"p01TimeSeries",args:[r,{kind:"Literal",name:"metric",value:"p01"},o],concreteType:"DataQualityTimeSeries",kind:"LinkedField",name:"dataQualityTimeSeries",plural:!1,selections:u,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(
|
|
874
903
|
$dimensionId: GlobalID!
|
|
875
904
|
$timeRange: TimeRange!
|
|
876
905
|
$granularity: Granularity!
|
|
@@ -912,14 +941,14 @@ fragment DimensionSegmentsBarChart_dimension_3E0ZE6 on Dimension {
|
|
|
912
941
|
}
|
|
913
942
|
}
|
|
914
943
|
}
|
|
915
|
-
`}}}();
|
|
944
|
+
`}}}();Mt.hash="134f0dad0e0ecc7863dfbb0f437d829b";const Yd=Va("~s");var Nt=(n=>(n.p99_p01="p99_p01",n.p75_p25="p75_p25",n.p50="p50",n))(Nt||{});const ec=new Intl.NumberFormat([],{maximumFractionDigits:2});function On(n){return typeof n=="number"?ec.format(n):"--"}const Vt=()=>{const n=qe();return{outerColor:n.gray500,innerColor:n.gray300,lineColor:n.default}};function nc({active:n,payload:a,label:l}){const{outerColor:t,innerColor:i,lineColor:r}=Vt();if(n&&a&&a.length){const o=a[0].payload;return s(en,{children:[e(K,{weight:"heavy",textSize:"medium",children:`${Ve(new Date(l))}`}),e(ce,{color:t,name:"p99",value:On(o.p99_p01[0])}),e(ce,{color:i,name:"p75",value:On(o.p75_p25[0])}),e(ce,{color:r,name:"p50",value:On(o.p50)}),e(ce,{color:i,name:"p25",value:On(o.p75_p25[1])}),e(ce,{color:t,name:"p01",value:On(o.p99_p01[1])})]})}return null}function ac({dimensionId:n}){var I,P,x,D,R;const{timeRange:a}=je(),l=En(a),t=T.useLazyLoadQuery(Mt,{dimensionId:n,timeRange:{start:a.start.toISOString(),end:a.end.toISOString()},granularity:l}),i=((I=t.dimension.p99TimeSeries)==null?void 0:I.data.map(_=>_))||[],r=((P=t.dimension.p01TimeSeries)==null?void 0:P.data.map(_=>_))||[],o=((x=t.dimension.p75TimeSeries)==null?void 0:x.data.map(_=>_))||[],u=((D=t.dimension.p25TimeSeries)==null?void 0:D.data.map(_=>_))||[],d=((R=t.dimension.p50TimeSeries)==null?void 0:R.data.map(_=>_))||[],p=i.map((_,O)=>({timestamp:new Date(_.timestamp).valueOf(),p99_p01:[_.value,r[O].value],p75_p25:[o[O].value,u[O].value],p50:d[O].value})),f=Rn({samplingIntervalMinutes:l.samplingIntervalMinutes}),[c,g]=m.useState(Object.keys(Nt).reduce((_,O)=>(_[O]=!1,_),{})),y=_=>{c[_.dataKey]||g({...c})},k=()=>{g({...c})},b=_=>{g({...c,[String(_.dataKey)]:!c[_.dataKey]})},{outerColor:v,innerColor:S,lineColor:w}=Vt();return e(nn,{width:"100%",height:"100%",children:s(aa,{data:p,margin:la,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:v,stopOpacity:.7}),e("stop",{offset:"50%",stopColor:v,stopOpacity:.3}),e("stop",{offset:"90%",stopColor:v,stopOpacity:.7})]}),s("linearGradient",{id:"p75_p25ColorUV",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})]})]}),e(an,{...Mn,tickFormatter:_=>f(new Date(_))}),e(Ae,{stroke:oe.colors.gray200,label:{value:"Value",angle:-90,position:"insideLeft",style:{textAnchor:"middle",fill:"var(--ac-global-text-color-900)"}},tickFormatter:_=>Yd(_),style:{fill:"var(--ac-global-text-color-700)"}}),e(ln,{strokeDasharray:"4 4",stroke:oe.colors.gray200,strokeOpacity:.5}),e(tn,{content:e(nc,{})}),e(Io,{onClick:b,onMouseOver:y,onMouseOut:k}),e(Gn,{type:"monotone",dataKey:"p99_p01",name:"p99 - p01",fillOpacity:1,fill:"url(#p99_p01ColorUV)",stroke:v,hide:c.p99_p01===!0}),e(Gn,{type:"monotone",dataKey:"p75_p25",name:"p75 - p25",fillOpacity:1,stroke:S,fill:"url(#p75_p25ColorUV)",hide:c.p75_p25===!0}),e(nt,{type:"monotone",dataKey:"p50",stroke:w,hide:c.p50===!0})]})})}const zt=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}}();zt.hash="8cef9841e9a5bd7d0d50acb5db9028b0";const lc=Va(".2f"),$t=()=>{const{primary:n}=qe();return{color:n}};function tc({active:n,payload:a,label:l}){var i;const{color:t}=$t();if(n&&a&&a.length){const r=(i=a[0])==null?void 0:i.value;return e(en,{children:e(ce,{color:t,shape:"square",name:l,value:r!=null?`${lc(r)}%`:"--"})})}return null}function ic(n){const a=T.useFragment(zt,n.dimension),l=m.useMemo(()=>{var o,u,d;const i=((o=a.segmentsComparison)==null?void 0:o.segments)??[],r=((d=(u=a.segmentsComparison)==null?void 0:u.totalCounts)==null?void 0:d.primaryValue)??0;return i.map(p=>{var y;const f=((y=p.counts)==null?void 0:y.primaryValue)??0,c=Vl(p.bin),g=f/r*100;return{name:c,percent:g}})},[a]),{color:t}=$t();return e(nn,{children:s(Za,{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(an,{dataKey:"name",style:{fill:"var(--ac-global-text-color-700)"}}),e(Ae,{stroke:oe.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(ln,{strokeDasharray:"4 4",stroke:oe.colors.gray200,strokeOpacity:.5}),e(tn,{...Ua,content:e(tc,{})}),e(Ln,{dataKey:"percent",fill:"url(#dimensionSegmentsBarColor)",spacing:15})]})})}function jg(){const{dimensionId:n}=Ye(),{timeRange:a}=je(),l=An(),{referenceInferences:t}=Pe(),i=t!==null,r=i,o=l.dimension.shape!=="continuous",u=l.dimension.dataType==="numeric",d=ee(),p=T.useLazyLoadQuery(St,{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(Nl,{initialTimestamp:new Date(a.end),children:e(G,{type:"slideOver",isDismissable:!0,onDismiss:()=>d(-1),children:e(U,{size:"L",title:l.dimension.name,children:e("main",{css:C`
|
|
916
945
|
padding: var(--px-spacing-med);
|
|
917
946
|
display: flex;
|
|
918
947
|
flex-direction: column;
|
|
919
948
|
min-height: 400px;
|
|
920
949
|
overflow-y: auto;
|
|
921
950
|
height: 100%;
|
|
922
|
-
`,children:e(
|
|
951
|
+
`,children:e(m.Suspense,{fallback:e(ue,{}),children:s(h,{direction:"column",gap:"size-100",children:[e(F,{borderColor:"dark",borderRadius:"medium",borderWidth:"thin",height:"size-1600",children:e(ic,{dimension:p.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(Qd,{dimensionId:n}),e(Fn,{children:e(Vd,{dimension:p.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(Hd,{dimensionId:n})}),e(Fn,{children:e(Ud,{dimension:p.dimension})})]})}),e(F,{height:"size-1600",width:"100%",borderTopColor:"dark",borderTopWidth:"thin",children:e(m.Suspense,{fallback:e(ue,{}),children:e(jd,{dimensionId:n})})})]})}):null,u?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(ac,{dimensionId:n})}),e(Fn,{children:e(Xd,{dimension:p.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(Nd,{dimensionId:n})}),e(Fn,{children:e(Ed,{dimension:p.dimension})})]})}):null,e(F,{borderColor:"dark",borderRadius:"medium",borderWidth:"thin",height:"size-1600",children:s(h,{direction:"row",alignItems:"stretch",height:"100%",children:[e(Zd,{dimensionId:n}),e(Fn,{children:e(Gd,{dimension:p.dimension})})]})})]})})})})})})}const Qt=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(
|
|
923
952
|
$id: GlobalID!
|
|
924
953
|
) {
|
|
925
954
|
dimension: node(id: $id) {
|
|
@@ -934,7 +963,7 @@ fragment DimensionSegmentsBarChart_dimension_3E0ZE6 on Dimension {
|
|
|
934
963
|
id
|
|
935
964
|
}
|
|
936
965
|
}
|
|
937
|
-
`}}}();
|
|
966
|
+
`}}}();Qt.hash="5a662d77e69d2e9bb4eb2af4cad6b722";async function qg(n){const{dimensionId:a}=n.params;return T.fetchQuery(Ke,Qt,{id:a}).toPromise()}const Ot=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(
|
|
938
967
|
$traceId: ID!
|
|
939
968
|
$id: GlobalID!
|
|
940
969
|
) {
|
|
@@ -974,7 +1003,7 @@ fragment DimensionSegmentsBarChart_dimension_3E0ZE6 on Dimension {
|
|
|
974
1003
|
id
|
|
975
1004
|
}
|
|
976
1005
|
}
|
|
977
|
-
`}}}();
|
|
1006
|
+
`}}}();Ot.hash="8b568616f23f7d349cac5a31807463fb";const jt=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},u={alias:"statusCode",args:null,kind:"ScalarField",name:"propagatedStatusCode",storageKey:null},d={alias:null,args:null,kind:"ScalarField",name:"statusMessage",storageKey:null},p={alias:null,args:null,kind:"ScalarField",name:"startTime",storageKey:null},f={alias:null,args:null,kind:"ScalarField",name:"parentId",storageKey:null},c={alias:null,args:null,kind:"ScalarField",name:"latencyMs",storageKey:null},g={alias:null,args:null,kind:"ScalarField",name:"tokenCountTotal",storageKey:null},y={alias:null,args:null,kind:"ScalarField",name:"tokenCountPrompt",storageKey:null},k={alias:null,args:null,kind:"ScalarField",name:"tokenCountCompletion",storageKey:null},b=[{alias:null,args:null,kind:"ScalarField",name:"value",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"mimeType",storageKey:null}],v={alias:null,args:null,concreteType:"SpanIOValue",kind:"LinkedField",name:"input",plural:!1,selections:b,storageKey:null},S={alias:null,args:null,concreteType:"SpanIOValue",kind:"LinkedField",name:"output",plural:!1,selections:b,storageKey:null},w={alias:null,args:null,kind:"ScalarField",name:"attributes",storageKey:null},I={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},P={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},D={alias:null,args:null,kind:"ScalarField",name:"score",storageKey:null},R={alias:null,args:null,kind:"ScalarField",name:"explanation",storageKey:null},_={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,D,R],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,u,d,p,f,c,g,y,k,v,S,w,{kind:"RequiredField",field:I,action:"THROW",path:"span.events"},P,_,{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,u,d,p,f,c,g,y,k,v,S,w,I,P,_,{alias:null,args:null,concreteType:"SpanAnnotation",kind:"LinkedField",name:"spanAnnotations",plural:!0,selections:[r,x,D,R,{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(
|
|
978
1007
|
$spanId: GlobalID!
|
|
979
1008
|
) {
|
|
980
1009
|
span: node(id: $spanId) {
|
|
@@ -1059,7 +1088,7 @@ fragment SpanFeedback_annotations on Span {
|
|
|
1059
1088
|
annotatorKind
|
|
1060
1089
|
}
|
|
1061
1090
|
}
|
|
1062
|
-
`}}}();
|
|
1091
|
+
`}}}();jt.hash="eaf52d9b37b1f5a29cae360a05b7c975";const xa=C`
|
|
1063
1092
|
display: flex;
|
|
1064
1093
|
align-items: center;
|
|
1065
1094
|
.ac-text {
|
|
@@ -1069,7 +1098,7 @@ fragment SpanFeedback_annotations on Span {
|
|
|
1069
1098
|
overflow: hidden;
|
|
1070
1099
|
text-overflow: ellipsis;
|
|
1071
1100
|
}
|
|
1072
|
-
`;function
|
|
1101
|
+
`;function be(n){const{name:a,metric:l,k:t,score:i}=n,r=typeof t=="number"?`${l}@${t}`:l,o=m.useMemo(()=>l==="hit"?i?"true":"false":typeof i=="number"&&_e(i)||"--",[i,l]);return s(Le,{delay:500,offset:3,children:[e(In,{children:e("div",{css:io,children:s(h,{direction:"row",gap:"size-100",alignItems:"center",children:[e(ro,{color:"var(--ac-global-color-seafoam-1000)"}),a?e("div",{css:xa,children:e(K,{weight:"heavy",textSize:"small",color:"inherit",children:a})}):null,e("div",{css:xa,children:e(K,{textSize:"small",color:"inherit",children:r})}),e("div",{css:xa,children:e(K,{textSize:"small",children:o})})]})})}),e(Xn,{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 qt=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(
|
|
1073
1102
|
$projectId: GlobalID!
|
|
1074
1103
|
$spanId: GlobalID!
|
|
1075
1104
|
) {
|
|
@@ -1092,7 +1121,7 @@ fragment SpanFeedback_annotations on Span {
|
|
|
1092
1121
|
}
|
|
1093
1122
|
}
|
|
1094
1123
|
}
|
|
1095
|
-
`}}}();
|
|
1124
|
+
`}}}();qt.hash="09b2ee5f96c0192a5618ae6c04c321ae";const Ut=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"}],u=[{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:u,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:u,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(
|
|
1096
1125
|
$spanId: GlobalID!
|
|
1097
1126
|
$annotationId: GlobalID!
|
|
1098
1127
|
$name: String!
|
|
@@ -1125,7 +1154,7 @@ fragment EditSpanAnnotationsDialog_spanAnnotations on Span {
|
|
|
1125
1154
|
explanation
|
|
1126
1155
|
}
|
|
1127
1156
|
}
|
|
1128
|
-
`}}}();
|
|
1157
|
+
`}}}();Ut.hash="46647cda8c9874c89d8a4034bf82fe14";const Bt=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(
|
|
1129
1158
|
$id: GlobalID!
|
|
1130
1159
|
) {
|
|
1131
1160
|
node(id: $id) {
|
|
@@ -1147,7 +1176,7 @@ fragment EditSpanAnnotationsDialog_spanAnnotations on Span {
|
|
|
1147
1176
|
explanation
|
|
1148
1177
|
}
|
|
1149
1178
|
}
|
|
1150
|
-
`}}}();
|
|
1179
|
+
`}}}();Bt.hash="07aedb847a2af03a77823f0afc0c98d4";const Ht=function(){var n={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null};return{argumentDefinitions:[],kind:"Fragment",metadata:{refetch:{connection:null,fragmentPathInResult:["node"],operation:Bt,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}}();Ht.hash="07aedb847a2af03a77823f0afc0c98d4";const Gt=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(
|
|
1151
1180
|
$spanId: GlobalID!
|
|
1152
1181
|
) {
|
|
1153
1182
|
span: node(id: $spanId) {
|
|
@@ -1170,7 +1199,7 @@ fragment EditSpanAnnotationsDialog_spanAnnotations on Span {
|
|
|
1170
1199
|
explanation
|
|
1171
1200
|
}
|
|
1172
1201
|
}
|
|
1173
|
-
`}}}();
|
|
1202
|
+
`}}}();Gt.hash="36093f4285a168993ec87fd6aac82365";const Wt=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(
|
|
1174
1203
|
$input: CreateSpanAnnotationInput!
|
|
1175
1204
|
$spanId: GlobalID!
|
|
1176
1205
|
) {
|
|
@@ -1199,10 +1228,10 @@ fragment EditSpanAnnotationsDialog_spanAnnotations on Span {
|
|
|
1199
1228
|
explanation
|
|
1200
1229
|
}
|
|
1201
1230
|
}
|
|
1202
|
-
`}}}();
|
|
1231
|
+
`}}}();Wt.hash="ded0a7a64a2706f6ec472a63c1c57eca";const rc=C`
|
|
1203
1232
|
color: var(--ac-global-text-color-900);
|
|
1204
1233
|
font-size: 12px;
|
|
1205
|
-
`;function
|
|
1234
|
+
`;function Jt(n){const{initialData:a,isReadOnly:l,onSubmit:t,isSubmitting:i=!1}=n,{control:r,handleSubmit:o,formState:{isDirty:u,isValid:d},setError:p,reset:f}=Fe({defaultValues:a,disabled:l}),c=m.useCallback(y=>{const k=!y.label,b=y.score===""||y.score==null;if(k&&b){p("label",{type:"manual",message:"Label or score is required"}),p("score",{type:"manual",message:"Label or score is required"});return}const v={...y,score:y.score!=null?parseFloat(y.score.toString()):null};t&&t(v),f(v)},[t,p,f]),g=l;return s(ve,{onSubmit:o(c),children:[e(F,{padding:"size-200",children:s(h,{direction:"column",gap:"size-100",children:[s("div",{css:C`
|
|
1206
1235
|
display: flex;
|
|
1207
1236
|
flex-direction: row;
|
|
1208
1237
|
width: 100%;
|
|
@@ -1214,7 +1243,7 @@ fragment EditSpanAnnotationsDialog_spanAnnotations on Span {
|
|
|
1214
1243
|
.ac-textfield {
|
|
1215
1244
|
min-width: 0;
|
|
1216
1245
|
}
|
|
1217
|
-
`,children:[e(
|
|
1246
|
+
`,children:[e(q,{name:"label",control:r,render:({field:{onChange:y,onBlur:k,value:b},fieldState:{invalid:v,error:S}})=>e(Z,{label:"Label",placeholder:"e.x. good, bad",description:"A categorical label like 'good' or 'bad'",isReadOnly:l,errorMessage:S==null?void 0:S.message,validationState:v?"invalid":"valid",onChange:y,onBlur:k,value:(b==null?void 0:b.toString())||""})}),e(q,{name:"score",control:r,render:({field:{onChange:y,onBlur:k,value:b},fieldState:{invalid:v,error:S}})=>e(Z,{label:"Score",type:"number",placeholder:"e.x. 0.8",description:"A numeric grade",errorMessage:S==null?void 0:S.message,isReadOnly:l,validationState:v?"invalid":"valid",onChange:y,onBlur:k,value:(b==null?void 0:b.toString())||""})})]}),s("details",{open:!g,css:rc,children:[e("summary",{children:"Annotation Details"}),e(F,{paddingTop:"size-50",children:e(q,{name:"explanation",control:r,render:({field:{onChange:y,onBlur:k,value:b},fieldState:{invalid:v,error:S}})=>e(da,{label:"Explanation",height:70,isReadOnly:l,description:"Why this score or label was given",errorMessage:S==null?void 0:S.message,validationState:v?"invalid":"valid",onChange:y,onBlur:k,value:(b==null?void 0:b.toString())||""})})})]})]})}),e(j,{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:u?"primary":"default",type:"submit",size:"compact",disabled:!d||!u||i,children:i?"Saving...":"Save"})})})})]})}function sc(n){const{annotationName:a,spanNodeId:l,onCreated:t}=n,[i,r]=T.useMutation(Wt);return e(Jt,{initialData:{name:a},isSubmitting:r,onSubmit:u=>{i({variables:{input:{spanId:l,annotatorKind:"HUMAN",...u},spanId:l},onCompleted:()=>{t()}})}})}const Zt=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(
|
|
1218
1247
|
$annotationId: GlobalID!
|
|
1219
1248
|
$spanId: GlobalID!
|
|
1220
1249
|
) {
|
|
@@ -1243,15 +1272,15 @@ fragment EditSpanAnnotationsDialog_spanAnnotations on Span {
|
|
|
1243
1272
|
explanation
|
|
1244
1273
|
}
|
|
1245
1274
|
}
|
|
1246
|
-
`}}}();
|
|
1275
|
+
`}}}();Zt.hash="a898fcb037b08cb626daaf3d385588ce";function oc(n){const{onDelete:a,isDisabled:l=!1}=n;return e("div",{onClick:t=>{t.preventDefault(),t.stopPropagation()},children:e(Oe,{align:"end",buttonSize:"compact",isDisabled:l,onAction:t=>{switch(t){case"deleteAnnotation":a();break}},children:e(W,{children:s(h,{direction:"row",gap:"size-75",justifyContent:"start",alignItems:"center",children:[e(E,{svg:e(L.TrashOutline,{})}),e(K,{children:"Delete"})]})},"deleteAnnotation")})})}function dc(n){const{annotationId:a,spanNodeId:l,annotationName:t,onSpanAnnotationActionSuccess:i,onSpanAnnotationActionError:r}=n,[o,u]=m.useState(null),[d,p]=T.useMutation(Zt),f=m.useCallback(()=>{m.startTransition(()=>{d({variables:{annotationId:a,spanId:l},onCompleted:()=>{i({title:"Annotation Deleted",message:`Annotation ${t} has been deleted.`})},onError:g=>{r(g)}})})},[d,a,l,i,t,r]),c=m.useCallback(()=>{u(s(U,{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(),u(null)},children:"Delete Annotation"})})})]}))},[f,t]);return s("div",{children:[e(oc,{onDelete:c,isDisabled:p}),e(G,{type:"modal",isDismissable:!0,onDismiss:()=>u(null),children:o})]})}function cc(n){const{projectId:a,spanNodeId:l}=n,[t,i]=m.useState(null),r=ie();return e(U,{title:"Annotate",size:"M",isDismissable:!0,extra:e(uc,{projectId:a,spanNodeId:l,disabled:t!==null,onAnnotationNameSelect:i}),children:s("div",{css:C`
|
|
1247
1276
|
height: 100%;
|
|
1248
1277
|
overflow-y: auto;
|
|
1249
1278
|
padding: var(--ac-global-dimension-size-200);
|
|
1250
|
-
`,children:[t&&e(
|
|
1279
|
+
`,children:[t&&e(F,{paddingBottom:"size-200",children:e(yc,{spanNodeId:l,name:t,onDelete:()=>{i(null)},onCreated:()=>{i(null),r({title:"New Span Annotation",message:`Annotation ${t} has been created.`})}})}),e(m.Suspense,{children:e(gc,{...n})})]})})}function uc(n){const{projectId:a,disabled:l=!1,spanNodeId:t,onAnnotationNameSelect:i}=n,[r,o]=m.useState(!1);return s(hn,{placement:"bottom end",crossOffset:300,isOpen:r,onOpenChange:u=>{o(u)},children:[e(M,{variant:"default",disabled:l,size:"compact",icon:e(E,{svg:e(L.PlusCircleOutline,{})}),onClick:()=>{o(!0)},children:"New"}),e(mc,{projectId:a,spanNodeId:t,onAnnotationNameSelect:u=>{i(u),o(!1)}})]})}function mc(n){const{projectId:a,spanNodeId:l,onAnnotationNameSelect:t}=n;return e(z,{title:"New Annotation",backgroundColor:"light",borderColor:"light",variant:"compact",bodyStyle:{padding:0},children:e(m.Suspense,{children:e(hc,{projectId:a,spanId:l,onAnnotationNameSelect:t})})})}function gc(n){const a=T.useLazyLoadQuery(Gt,{spanId:n.spanNodeId},{fetchPolicy:"store-and-network"});return e(pc,{span:a.span})}function pc(n){const{span:a}=n,[l]=T.useRefetchableFragment(Ht,a),t=l.spanAnnotations||[],i=t.length>0;return s("div",{children:[!i&&e(Rl,{graphicKey:"documents",message:"No annotations for this span"}),e("ul",{css:C`
|
|
1251
1280
|
display: flex;
|
|
1252
1281
|
flex-direction: column;
|
|
1253
1282
|
gap: var(--ac-global-dimension-size-200);
|
|
1254
|
-
`,children:t.map((r,o)=>e("li",{children:e(
|
|
1283
|
+
`,children:t.map((r,o)=>e("li",{children:e(fc,{annotation:r,spanNodeId:l.id})},`${o}_${r.name}`))})]})}function yc(n){const{spanNodeId:a,name:l,onDelete:t,onCreated:i}=n;return s(z,{variant:"compact",title:l,borderColor:"orange-900",extra:s(h,{direction:"row",alignItems:"center",gap:"size-100",children:[e(Xt,{kind:"HUMAN"}),e(M,{variant:"default",size:"compact",isDisabled:!0,"aria-label":"delete annotation",icon:e(E,{svg:e(L.CloseOutline,{})}),onClick:t})]}),bodyStyle:{padding:0},children:[e(Y,{variant:"info",banner:!0,children:"Fill out the fields below and click save to create a new annotation."}),e(sc,{annotationName:l,spanNodeId:a,onCreated:i})]})}function fc(n){const{annotation:a,spanNodeId:l}=n,[t,i]=m.useState(null),r=ie(),[o,u]=T.useMutation(Ut),d=m.useCallback(p=>{m.startTransition(()=>{o({variables:{annotationId:a.id,spanId:l,...p},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(z,{variant:"compact",title:a.name,titleExtra:a.label||typeof a.score=="number"&&_e(a.score)||null,collapsible:!0,bodyStyle:{padding:0},extra:s(h,{gap:"size-100",alignItems:"center",children:[e(Xt,{kind:a.annotatorKind}),e(dc,{annotationId:a.id,spanNodeId:l,annotationName:a.name,onSpanAnnotationActionSuccess:p=>{r(p)},onSpanAnnotationActionError:p=>{i(p)}})]}),children:[t&&e(Y,{variant:"danger",banner:!0,children:t.message}),e(Jt,{initialData:a,isReadOnly:a.annotatorKind==="LLM",isSubmitting:u,onSubmit:p=>{d(p)}})]})}function Xt(n){const{kind:a}=n;return e(Bn,{color:a==="HUMAN"?"blue-900":"orange-900",children:a})}function hc(n){const{projectId:a,spanId:l,onAnnotationNameSelect:t}=n,i=T.useLazyLoadQuery(qt,{projectId:a,spanId:l}),[r,o]=m.useState(""),u=m.useMemo(()=>{var f,c;return((c=(f=i==null?void 0:i.span)==null?void 0:f.spanAnnotations)==null?void 0:c.map(g=>g.name))||[]},[i.span.spanAnnotations]),d=m.useMemo(()=>(i.project.spanAnnotationNames||[]).filter(c=>!u.includes(c)),[i.project.spanAnnotationNames,u]),p=d.length>0;return s(j,{children:[e(F,{padding:"size-200",children:s(h,{direction:"row",gap:"size-100",alignItems:"end",children:[e(Z,{label:"Annotation Name",value:r,placeholder:"e.x. correctness",onChange:f=>{o(f)}}),e(M,{variant:"primary",onClick:()=>{t(r)},children:"Create"})]})}),p&&s(j,{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(Zn,{selectionMode:"single",onSelectionChange:f=>{if(f==="all"||f.size===0)return;const g=f.values().next().value;o(g||"")},disabledKeys:u,children:d.map(f=>e(W,{children:f},f))})]})]})}function kc(n){const{spanNodeId:a,projectId:l}=n,[t,i]=m.useState(null);return s(j,{children:[e(M,{variant:"default",icon:e(E,{svg:e(L.EditOutline,{})}),onClick:()=>i(e(cc,{spanNodeId:a,projectId:l})),children:"Annotate"}),e(G,{type:"slideOver",isDismissable:!0,onDismiss:()=>i(null),children:t})]})}const Yt=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(
|
|
1255
1284
|
$id: GlobalID!
|
|
1256
1285
|
) {
|
|
1257
1286
|
node(id: $id) {
|
|
@@ -1278,22 +1307,22 @@ fragment SpanAside_span on Span {
|
|
|
1278
1307
|
score
|
|
1279
1308
|
}
|
|
1280
1309
|
}
|
|
1281
|
-
`}}}();
|
|
1310
|
+
`}}}();Yt.hash="cb5cab60889623d77ad0c96c98b3f8ac";const ei=function(){var n={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null};return{argumentDefinitions:[],kind:"Fragment",metadata:{refetch:{connection:null,fragmentPathInResult:["node"],operation:Yt,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}}();ei.hash="cb5cab60889623d77ad0c96c98b3f8ac";const bc=C`
|
|
1282
1311
|
display: flex;
|
|
1283
1312
|
padding-top: var(--ac-global-dimension-size-50);
|
|
1284
1313
|
flex-direction: column;
|
|
1285
1314
|
gap: var(--ac-global-dimension-size-100);
|
|
1286
1315
|
align-items: flex-start;
|
|
1287
|
-
`;function
|
|
1316
|
+
`;function Sc(n){const[a]=T.useRefetchableFragment(ei,n.span),{startTime:l,endTime:t,code:i,tokenCountCompletion:r,tokenCountPrompt:o,tokenCountTotal:u}=a,d=m.useMemo(()=>new Date(l),[l]),p=m.useMemo(()=>t?new Date(t):null,[t]),f=m.useMemo(()=>p?p.getTime()-d.getTime():null,[p,d]),c=zl(i),g=a.spanAnnotations,y=g.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(Cn,{label:"Status",children:s(h,{direction:"row",gap:"size-50",alignItems:"center",children:[e(pa,{statusCode:i}),e(K,{textSize:"xlarge",color:c,children:i})]})}),e(Cn,{label:"Start Time",children:e(K,{textSize:"xlarge",children:Ve(d)})}),p&&e(Cn,{label:"End Time",children:e(K,{textSize:"xlarge",children:Ve(p)})}),e(Cn,{label:"Latency",children:e(K,{textSize:"xlarge",children:typeof f=="number"?e(we,{latencyMs:f,textSize:"xlarge"}):"--"})}),u?e(Cn,{label:"Total Tokens",children:e(Ba,{tokenCountTotal:u,tokenCountPrompt:o??0,tokenCountCompletion:r??0,textSize:"xlarge"})},"tokens"):null,y&&e(Cn,{label:"Feedback",children:e("ul",{css:bc,children:g.map(k=>e("li",{children:e(bn,{annotation:k,annotationDisplayPreference:"label"})},k.id))})})]})})}function Cn({label:n,children:a}){return s(h,{direction:"column",children:[e(K,{elementType:"h3",textSize:"medium",color:"text-700",children:n}),a]})}function vc(n){const{spanId:a,traceId:l}=n;return e("div",{css:C`
|
|
1288
1317
|
button.ac-dropdown-button {
|
|
1289
1318
|
min-width: 50px;
|
|
1290
1319
|
.ac-dropdown-button__text {
|
|
1291
1320
|
padding-right: 10px;
|
|
1292
1321
|
}
|
|
1293
1322
|
}
|
|
1294
|
-
`,children:s(
|
|
1323
|
+
`,children:s(hn,{placement:"bottom right",children:[e(Ll,{addonBefore:e(E,{svg:e(L.Code,{})}),children:"Code"}),e(Qa,{children:e(F,{padding:"size-200",children:s(ve,{children:[s(h,{direction:"row",gap:"size-100",alignItems:"end",children:[e(Z,{label:"Span ID",isReadOnly:!0,value:a}),e(ne,{text:a,size:"normal"})]}),s(h,{direction:"row",gap:"size-100",alignItems:"end",children:[e(Z,{label:"Trace ID",isReadOnly:!0,value:l}),e(ne,{text:l,size:"normal"})]})]})})})]})})}const ni={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};ni.hash="6199ecd4f0143cffbaa2fe5e19a8739c";function Cc(){const[n,a]=m.useState(null);return s(F,{padding:"size-200",children:[s(h,{direction:"column",gap:"size-100",alignItems:"center",children:[e(ca,{graphicKey:"documents"}),e(K,{children:"No annotations for this span"}),e(M,{variant:"default",size:"compact",onClick:()=>{a(e(U,{title:"Span Annotations",isDismissable:!0,children:s(F,{padding:"size-200",children:[e("p",{css:C`
|
|
1295
1324
|
margin: 0 0 var(--ac-global-dimension-size-100) 0;
|
|
1296
|
-
`,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(ze,{href:"https://docs.arize.com/phoenix/tracing/concepts-tracing/how-to-evaluate-traces",children:"View annotation documentation"})]})}))},icon:e(E,{svg:e(L.Edit2Outline,{})}),children:"How to Annotate"})]}),e(G,{onDismiss:()=>a(null),isDismissable:!0,children:n})]})}const Fc=[{header:"name",accessorKey:"name",size:100},{header:"label",accessorKey:"label",size:100},{header:"score",accessorKey:"score",size:100},{header:"explanation",accessorKey:"explanation",cell:so,size:400}];function dl({annotations:n}){const a=m.useMemo(()=>[...n],[n]),l=me({columns:Fc,data:a,getCoreRowModel:ge()}),i=l.getRowModel().rows.length===0;return s("table",{css:Ue,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(j,{children:H(o.column.columnDef.header,o.getContext())})},o.id))},r.id))}),i?e(Be,{}):e("tbody",{children:l.getRowModel().rows.map(r=>e("tr",{children:r.getVisibleCells().map(o=>e("td",{style:{width:o.column.getSize()},children:H(o.column.columnDef.cell,o.getContext())},o.id))},r.id))})]})}function Kc({span:n}){const a=T.useFragment(ni,n),l=m.useMemo(()=>a.spanAnnotations.filter(r=>r.annotatorKind==="HUMAN"),[a.spanAnnotations]),t=m.useMemo(()=>a.spanAnnotations.filter(r=>r.annotatorKind==="LLM"),[a.spanAnnotations]);return a.spanAnnotations.length>0?s(un,{children:[e(he,{id:"evaluations",title:"Evaluations",children:e(dl,{annotations:t})}),e(he,{id:"human",title:"Human Annotations",children:e(dl,{annotations:l})})]}):e(Cc,{})}function xc(n){return n==="__REDACTED__"}const Dc=C`
|
|
1297
1326
|
position: relative;
|
|
1298
1327
|
overflow: hidden;
|
|
1299
1328
|
width: 200px;
|
|
@@ -1332,7 +1361,7 @@ fragment SpanAside_span on Span {
|
|
|
1332
1361
|
object-fit: cover;
|
|
1333
1362
|
}
|
|
1334
1363
|
}
|
|
1335
|
-
`;function
|
|
1364
|
+
`;function Tc(n){const[a,l]=m.useState(!1);let t;const i=xc(n.url);return i?t=e(Ic,{}):t=e("img",{src:n.url}),s("div",{className:ds({"is-expanded":a}),css:Dc,children:[!i&&e(M,{variant:"default",size:"compact",onClick:()=>l(!a),icon:e(E,{svg:a?e(L.CollapseOutline,{}):e(L.ExpandOutline,{})}),"aria-label":"Expand / Collapse Image"}),t]})}const Ic=()=>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)"})]}),ai=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(
|
|
1336
1365
|
$input: AddExamplesToDatasetInput!
|
|
1337
1366
|
) {
|
|
1338
1367
|
addExamplesToDataset(input: $input) {
|
|
@@ -1341,7 +1370,7 @@ fragment SpanAside_span on Span {
|
|
|
1341
1370
|
}
|
|
1342
1371
|
}
|
|
1343
1372
|
}
|
|
1344
|
-
`}}}();
|
|
1373
|
+
`}}}();ai.hash="75120065d239f28304e9dd91fc34bec9";const li=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(
|
|
1345
1374
|
$spanId: GlobalID!
|
|
1346
1375
|
) {
|
|
1347
1376
|
span: node(id: $spanId) {
|
|
@@ -1369,7 +1398,7 @@ fragment DatasetPicker__datasets on Query {
|
|
|
1369
1398
|
}
|
|
1370
1399
|
}
|
|
1371
1400
|
}
|
|
1372
|
-
`}}}();
|
|
1401
|
+
`}}}();li.hash="5afd1a4eede339492f5473ed17b770b3";const ti={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 {
|
|
1373
1402
|
...DatasetPicker__datasets
|
|
1374
1403
|
}
|
|
1375
1404
|
|
|
@@ -1383,7 +1412,7 @@ fragment DatasetPicker__datasets on Query {
|
|
|
1383
1412
|
}
|
|
1384
1413
|
}
|
|
1385
1414
|
}
|
|
1386
|
-
`}};
|
|
1415
|
+
`}};ti.hash="03d88d1706089bb63edcd44d04563cbc";const ii={argumentDefinitions:[],kind:"Fragment",metadata:{refetch:{connection:null,fragmentPathInResult:[],operation:ti}},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};ii.hash="03d88d1706089bb63edcd44d04563cbc";function Lc(n){const[a,l]=T.useRefetchableFragment(ii,n.query);return s(h,{direction:"row",gap:"size-100",alignItems:"end",children:[e(Kl,{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(W,{children:t.name},t.id))}),e(wc,{onDatasetCreated:()=>{m.startTransition(()=>{l({},{fetchPolicy:"store-and-network"})})}})]})}function wc({onDatasetCreated:n}){const[a,l]=m.useState(null),[t,i]=m.useState(!1),r=ie();return s(hn,{placement:"bottom right",isOpen:t,onOpenChange:o=>{l(null),i(o)},children:[e(M,{variant:"default",icon:e(E,{svg:e(L.PlusCircleOutline,{})}),"aria-label":"Create a new dataset"}),e(z,{title:"Create New Dataset",bodyStyle:{padding:0},variant:"compact",borderColor:"light",backgroundColor:"light",children:s(F,{width:"500px",children:[a?e(Y,{variant:"danger",children:a}):null,e(Ha,{onDatasetCreateError:o=>l(o.message),onDatasetCreated:({id:o,name:u})=>{l(null),i(!1),r({title:"Dataset Created",message:`Dataset "${u}" created successfully`}),n(o)}})]})})]})}const Da={backgroundColor:"light",borderColor:"light",collapsible:!0,bodyStyle:{padding:0}};function Ac({spanId:n,onCompleted:a}){const[l,t]=m.useState(null),i=T.useLazyLoadQuery(li,{spanId:n},{fetchPolicy:"store-and-network"}),{span:{revision:r}}=i,[o,u]=T.useMutation(ai),{control:d,setError:p,handleSubmit:f,formState:{isValid:c}}=Fe({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:""}}),g=m.useCallback(y=>{if(t(null),!Re(y==null?void 0:y.input))return p("input",{message:"Input must be a valid JSON object"});if(!Re(y==null?void 0:y.output))return p("output",{message:"Output must be a valid JSON object"});if(!Re(y==null?void 0:y.metadata))return p("metadata",{message:"Metadata must be a valid JSON object"});if(!(y!=null&&y.datasetId))return p("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:k=>{t(k.message)}})},[o,p,n,a]);return e(U,{size:"fullscreen",title:"Add Example to Dataset",extra:e(M,{variant:"primary",size:"compact",disabled:!c||u,loading:u,onClick:f(g),icon:e(E,{svg:e(L.PlusCircleOutline,{})}),children:"Add Example"}),children:e("div",{css:C`
|
|
1387
1416
|
overflow-y: auto;
|
|
1388
1417
|
padding: var(--ac-global-dimension-size-400);
|
|
1389
1418
|
/* Make widths configurable */
|
|
@@ -1394,7 +1423,7 @@ fragment DatasetPicker__datasets on Query {
|
|
|
1394
1423
|
width: 100%;
|
|
1395
1424
|
}
|
|
1396
1425
|
}
|
|
1397
|
-
`,children:e(h,{direction:"row",justifyContent:"center",children: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(Y,{variant:"danger",children:l}):null,e(q,{control:d,name:"datasetId",render:({field:{onChange:y,onBlur:k},fieldState:{invalid:b,error:v}})=>e(Lc,{onSelectionChange:y,onBlur:k,validationState:b?"invalid":"valid",errorMessage:v==null?void 0:v.message,query:i})}),e(q,{control:d,name:"input",render:({field:{onChange:y,onBlur:k,value:b},fieldState:{invalid:v,error:S}})=>s(z,{title:"Input",subTitle:"The input to the LLM, retriever, program, etc.",...Da,children:[v?e(Y,{variant:"danger",banner:!0,children:S==null?void 0:S.message}):null,e(Me,{value:b,onChange:y,onBlur:k})]})}),e(q,{control:d,name:"output",render:({field:{onChange:y,onBlur:k,value:b},fieldState:{invalid:v,error:S}})=>s(z,{title:"Output",subTitle:"The output of the LLM or program to be used as an expected output",...Da,backgroundColor:"green-100",borderColor:"green-700",children:[v?e(Y,{variant:"danger",banner:!0,children:S==null?void 0:S.message}):null,e(Me,{value:b,onChange:y,onBlur:k})]})}),e(q,{control:d,name:"metadata",render:({field:{onChange:y,onBlur:k,value:b},fieldState:{invalid:v,error:S}})=>s(z,{title:"Metadata",subTitle:"All data from the span to use during experimentation or evaluation",...Da,children:[v?e(Y,{variant:"danger",banner:!0,children:S==null?void 0:S.message}):null,e(Me,{value:b,onChange:y,onBlur:k})]})})]})})})})})}const Pc=n=>m.useMemo(()=>{try{return{json:JSON.parse(n)}}catch(a){return{json:null,parseError:a}}},[n]),_c=n=>n.events.some(a=>a.name==="exception"),ae={backgroundColor:"light",borderColor:"light",variant:"compact",collapsible:!0};function Ec({spanNodeId:n,projectId:a}){const{span:l}=T.useLazyLoadQuery(jt,{spanId:n});if(l.__typename!=="Span")throw new Error("Expected a span, but got a different type"+l.__typename);const t=m.useMemo(()=>_c(l),[l]),i=yn(o=>o.showSpanAside),r=yn(o=>o.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(Ga,{spanKind:l.spanKind}),e(K,{children:l.name})]}),s(h,{flex:"none",direction:"row",alignItems:"center",gap:"size-100",children:[e(vc,{traceId:l.context.traceId,spanId:l.context.spanId}),e(Nc,{span:l}),e(kc,{spanNodeId:l.id,projectId:a}),s(Le,{placement:"top",offset:5,children:[e(M,{variant:"default","aria-label":"Toggle showing span details",onClick:()=>{r(!i)},icon:e(E,{svg:i?e(L.SlideIn,{}):e(L.SlideOut,{})})}),e(Hn,{children:i?"Hide Span Details":"Show Span Details"})]})]})]})}),s(Se,{children:[e(B,{name:"Info",children:s(h,{direction:"row",height:"100%",children:[e(Mc,{children:e($l,{children:e(Vc,{span:l})})}),i?e(Sc,{span:l}):null]})}),e(B,{name:"Feedback",extra:e(Ne,{variant:"light",children:l.spanAnnotations.length}),children:o=>o?e(Kc,{span:l}):null}),e(B,{name:"Attributes",title:"Attributes",children:e(F,{padding:"size-200",children:e(z,{title:"All Attributes",...ae,titleExtra:oi,extra:e(ne,{text:l.attributes}),bodyStyle:{padding:0},children:e(Ze,{children:l.attributes})})})}),e(B,{name:"Events",extra:e(Ne,{variant:t?"danger":"light",children:l.events.length}),children:e(nu,{events:l.events})})]})]})}const Rc=C`
|
|
1398
1427
|
flex: 1 1 auto;
|
|
1399
1428
|
overflow-y: auto;
|
|
1400
1429
|
// Overflow fails to take into account padding
|
|
@@ -1403,62 +1432,62 @@ fragment DatasetPicker__datasets on Query {
|
|
|
1403
1432
|
display: block;
|
|
1404
1433
|
height: var(--ac-global-dimension-static-size-400);
|
|
1405
1434
|
}
|
|
1406
|
-
`;function
|
|
1435
|
+
`;function Mc({children:n}){return e("div",{css:Rc,"data-testid":"span-info-wrap",children:n})}function Nc({span:n}){const[a,l]=m.useState(null),t=ie(),i=ee(),r=m.useCallback(()=>{l(e(Ac,{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(j,{children:[e(M,{variant:"default",icon:e(E,{svg:e(L.DatabaseOutline,{})}),onClick:r,children:"Add to Dataset"}),e(m.Suspense,{children:e(G,{type:"slideOver",isDismissable:!0,onDismiss:()=>l(null),children:a})})]})}function Vc({span:n}){const{spanKind:a,attributes:l}=n,{json:t,parseError:i}=Pc(l),r=m.useMemo(()=>n.statusMessage?e(Y,{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(Y,{variant:"warning",title:"Un-parsable attributes",children:`Failed to parse span attributes. ${i instanceof Error?i.message:""}`}),e(z,{...ae,title:"Attributes",children:e(F,{padding:"size-100",children:l})})]})});let o;switch(a){case"llm":{o=e(zc,{span:n,spanAttributes:t});break}case"retriever":{o=e($c,{span:n,spanAttributes:t});break}case"reranker":{o=e(Qc,{span:n,spanAttributes:t});break}case"embedding":{o=e(Oc,{span:n,spanAttributes:t});break}case"tool":{o=e(jc,{span:n,spanAttributes:t});break}default:o=e(ri,{span:n})}return e(F,{padding:"size-200",children:s(h,{direction:"column",gap:"size-200",children:[r,o,t!=null&&t.metadata?e(z,{...ae,title:"Metadata",children:e(Ze,{children:JSON.stringify(t.metadata)})}):null]})})}function zc(n){const{spanAttributes:a,span:l}=n,{input:t,output:i}=l,r=m.useMemo(()=>a[fe.llm]||null,[a]),o=m.useMemo(()=>{if(r==null)return null;const R=r[sn.model_name];return typeof R=="string"?R:null},[r]),u=m.useMemo(()=>{var R;return r==null?[]:((R=r[sn.input_messages])==null?void 0:R.map(_=>_[fe.message]).filter(Boolean))||[]},[r]),d=m.useMemo(()=>{if(r==null)return[];const R=r[sn.tools];return Array.isArray(R)?R==null?void 0:R.map(O=>O[fe.tool]).filter(Boolean):[]},[r]),p=m.useMemo(()=>d.reduce((R,_)=>(_!=null&&_.json_schema&&R.push(_.json_schema),R),[]),[d]),f=m.useMemo(()=>{var R;return r==null?[]:((R=r[sn.output_messages])==null?void 0:R.map(_=>_[fe.message]).filter(Boolean))||[]},[r]),c=m.useMemo(()=>{if(r==null)return[];const R=r[sn.prompts];return oo(R)?R:[]},[r]),g=m.useMemo(()=>{if(r==null)return null;const R=r[sn.prompt_template];return R??null},[r]),y=m.useMemo(()=>r==null?"{}":r[sn.invocation_parameters]||"{}",[r]),k=m.useMemo(()=>o==null?null:s(h,{direction:"row",gap:"size-100",alignItems:"center",children:[e(Ql,{spanKind:"llm"}),e(K,{textSize:"large",weight:"heavy",children:o})]}),[o]),b=t!=null&&t.value!=null,v=u.length>0,S=p.length>0,w=i!=null&&i.value!=null,I=f.length>0,P=c.length>0,x=Object.keys(JSON.parse(y)).length>0,D=g!=null;return s(h,{direction:"column",gap:"size-200",children:[e(z,{collapsible:!0,backgroundColor:"light",borderColor:"light",bodyStyle:{padding:0},titleSeparator:!1,variant:"compact",title:k,children:s(Se,{children:[v?e(B,{name:"Input Messages",hidden:!v,children:e(cl,{messages:u})}):null,S?e(B,{name:"Tools",hidden:!S,children:e(Hc,{toolSchemas:p})}):null,b?e(B,{name:"Input",hidden:!b,children:e(F,{padding:"size-200",children:e(Te,{children:e(z,{...ae,title:"LLM Input",extra:s(h,{direction:"row",gap:"size-100",children:[e($e,{}),e(ne,{text:t.value})]}),children:e(Qe,{...t})})})})}):null,D?e(B,{name:"Prompt Template",hidden:!D,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(ra,{text:g.template,children:[e(K,{color:"text-700",fontStyle:"italic",children:"prompt template"}),e(si,{children:g.template})]})}),e(F,{borderRadius:"medium",borderColor:"light",backgroundColor:"light",borderWidth:"thin",padding:"size-200",children:s(ra,{text:JSON.stringify(g.variables),children:[e(K,{color:"text-700",fontStyle:"italic",children:"template variables"}),e(Ze,{children:JSON.stringify(g.variables)})]})})]})})}):null,e(B,{name:"Prompts",hidden:!P,children:e(Gc,{prompts:c})}),e(B,{name:"Invocation Params",hidden:!x,children:e(ra,{text:y,padding:"size-100",children:e(Ze,{children:y})})})]})}),w||I?e($a,{...ae,children:s(Se,{children:[I?e(B,{name:"Output Messages",hidden:!I,children:e(cl,{messages:f})}):null,w?e(B,{name:"Output",hidden:!w,children:e(F,{padding:"size-200",children:e(Te,{children:e(z,{...ae,title:"LLM Output",extra:s(h,{direction:"row",gap:"size-100",children:[e($e,{}),e(ne,{text:i.value})]}),children:e(Qe,{...i})})})})}):null]})}):null]})}function $c(n){const{spanAttributes:a,span:l}=n,{input:t}=l,i=m.useMemo(()=>a[fe.retrieval]||null,[a]),r=m.useMemo(()=>{var f;return i==null?[]:((f=i[cs.documents])==null?void 0:f.map(c=>c[fe.document]).filter(Boolean))||[]},[i]),o=m.useMemo(()=>l.documentEvaluations.reduce((c,g)=>{const y=g.documentPosition,k=c[y]||[];return{...c,[y]:[...k,g]}},{}),[l.documentEvaluations]),u=t!=null&&t.value!=null,d=r.length>0,p=l.documentRetrievalMetrics.length>0;return s(h,{direction:"column",gap:"size-200",children:[u?e(Te,{children:e(z,{title:"Input",...ae,extra:s(h,{direction:"row",gap:"size-100",children:[e($e,{}),e(ne,{text:t.value})]}),children:e(Qe,{...t})})}):null,d?e(Te,{children:e(z,{title:"Documents",...ae,titleExtra:p&&e(h,{direction:"row",alignItems:"center",gap:"size-100",children:l.documentRetrievalMetrics.map(f=>s(j,{children:[e(be,{name:f.evaluationName,metric:"ndcg",score:f.ndcg},"ndcg"),e(be,{name:f.evaluationName,metric:"precision",score:f.precision},"precision"),e(be,{name:f.evaluationName,metric:"hit",score:f.hit},"hit")]}))}),extra:e($e,{}),children:e("ul",{css:C`
|
|
1407
1436
|
display: flex;
|
|
1408
1437
|
flex-direction: column;
|
|
1409
1438
|
gap: var(--ac-global-dimension-static-size-200);
|
|
1410
|
-
`,children:r.map((f,
|
|
1439
|
+
`,children:r.map((f,c)=>e("li",{children:e(Ma,{document:f,documentEvaluations:o[c],borderColor:"seafoam-700",backgroundColor:"seafoam-100",labelColor:"seafoam-1000"})},c))})})}):null]})}function Qc(n){const{spanAttributes:a}=n,l=m.useMemo(()=>a[fe.reranker]||null,[a]),t=m.useMemo(()=>l==null?null:l[Sa.query]||null,[l]),i=m.useMemo(()=>{var d;return l==null?[]:((d=l[Sa.input_documents])==null?void 0:d.map(p=>p[fe.document]).filter(Boolean))||[]},[l]),r=m.useMemo(()=>{var d;return l==null?[]:((d=l[Sa.output_documents])==null?void 0:d.map(p=>p[fe.document]).filter(Boolean))||[]},[l]),o=i.length,u=r.length;return s(h,{direction:"column",gap:"size-200",children:[e(Te,{children:t&&e(z,{title:"Query",...ae,children:e(ea,{children:t})})}),e(z,{title:"Input Documents",titleExtra:e(Ne,{variant:"light",children:o}),...ae,defaultOpen:!1,bodyStyle:{padding:0},children:e("ul",{css:C`
|
|
1411
1440
|
padding: var(--ac-global-dimension-static-size-200);
|
|
1412
1441
|
display: flex;
|
|
1413
1442
|
flex-direction: column;
|
|
1414
1443
|
gap: var(--ac-global-dimension-static-size-200);
|
|
1415
|
-
`,children:i.map((d,
|
|
1444
|
+
`,children:i.map((d,p)=>e("li",{children:e(Ma,{document:d,borderColor:"seafoam-700",backgroundColor:"seafoam-100",labelColor:"seafoam-1000"})},p))})}),e(z,{title:"Output Documents",titleExtra:e(Ne,{variant:"light",children:u}),...ae,bodyStyle:{padding:0},children:e("ul",{css:C`
|
|
1416
1445
|
padding: var(--ac-global-dimension-static-size-200);
|
|
1417
1446
|
display: flex;
|
|
1418
1447
|
flex-direction: column;
|
|
1419
1448
|
gap: var(--ac-global-dimension-static-size-200);
|
|
1420
|
-
`,children:r.map((d,
|
|
1449
|
+
`,children:r.map((d,p)=>e("li",{children:e(Ma,{document:d,borderColor:"celery-700",backgroundColor:"celery-100",labelColor:"celery-1000"})},p))})})]})}function Oc(n){const{spanAttributes:a}=n,l=m.useMemo(()=>a[fe.embedding]||null,[a]),t=m.useMemo(()=>{var o;return l==null?[]:((o=l[va.embeddings])==null?void 0:o.map(u=>u[fe.embedding]).filter(Boolean))||[]},[l]),i=t.length>0,r=l==null?void 0:l[va.model_name];return e(h,{direction:"column",gap:"size-200",children:i?e(z,{title:"Embeddings"+(typeof r=="string"?`: ${r}`:""),...ae,children:e("ul",{css:C`
|
|
1421
1450
|
display: flex;
|
|
1422
1451
|
flex-direction: column;
|
|
1423
1452
|
gap: var(--ac-global-dimension-static-size-200);
|
|
1424
|
-
`,children:t.map((o,
|
|
1453
|
+
`,children:t.map((o,u)=>e("li",{children:e(Te,{children:e(z,{...ae,backgroundColor:"purple-100",borderColor:"purple-700",title:"Embedded Text",children:e(ea,{children:o[va.text]||""})})})},u))})}):e(ri,{span:n.span})})}function jc(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",u=(t==null?void 0:t.mimeType)==="text",d=(i==null?void 0:i.mimeType)==="text",p=m.useMemo(()=>l[fe.tool]||{},[l]),f=Object.keys(p).length>0,c=p[Ca.name],g=p[Ca.description],y=p[Ca.parameters];return!r&&!o&&!f?null:s(h,{direction:"column",gap:"size-200",children:[r?e(Te,{children:e(z,{title:"Input",...ae,extra:s(h,{direction:"row",gap:"size-100",children:[u?e($e,{}):null,e(ne,{text:t.value})]}),children:e(Qe,{...t})})}):null,o?e(Te,{children:e(z,{title:"Output",...ae,backgroundColor:"green-100",borderColor:"green-700",extra:s(h,{direction:"row",gap:"size-100",children:[d?e($e,{}):null,e(ne,{text:i.value})]}),children:e(Qe,{...i})})}):null,f?e(z,{title:"Tool"+(typeof c=="string"?`: ${c}`:""),...ae,children:s(h,{direction:"column",children:[g!=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:g})]})}):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(Ze,{children:JSON.stringify(y)})]})}):null]})}):null]})}const qc=["irrelevant","unrelated"];function Ma({document:n,documentEvaluations:a,backgroundColor:l,borderColor:t,labelColor:i}){const r=n[zn.metadata],o=a&&a.length,u=n[zn.content];return e(z,{...ae,backgroundColor:l,borderColor:t,bodyStyle:{padding:0},title:s(h,{direction:"row",gap:"size-50",alignItems:"center",children:[e(E,{svg:e(L.FileOutline,{})}),s(te,{level:4,children:["document ",n[zn.id]]})]}),extra:typeof n[zn.score]=="number"&&e(Bn,{color:i,children:`score ${qa(n[zn.score])}`}),children:s(h,{direction:"column",children:[u&&e(F,{padding:"size-200",children:e(ea,{children:u})}),r&&e(j,{children:e(F,{borderColor:t,borderTopWidth:"thin",children:e(Ze,{children:JSON.stringify(r)})})}),o&&e(F,{borderColor:t,borderTopWidth:"thin",padding:"size-200",children:s(h,{direction:"column",gap:"size-100",children:[e(te,{level:3,weight:"heavy",children:"Evaluations"}),e("ul",{children:a.map((d,p)=>{const f=d.label&&qc.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(Bn,{color:f,shape:"badge",children:d.label}),typeof d.score=="number"&&e(Bn,{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:_e(d.score)})]})})]}),typeof d.explanation&&e("p",{css:C`
|
|
1425
1454
|
margin-top: var(
|
|
1426
1455
|
--ac-global-dimension-static-size-100
|
|
1427
1456
|
);
|
|
1428
1457
|
margin-bottom: 0;
|
|
1429
|
-
`,children:d.explanation})]})})},
|
|
1458
|
+
`,children:d.explanation})]})})},p)})})]})})]})})}function Uc({message:n}){var u;const a=n[Ie.content],l=n[Ie.contents],t=((u=n[Ie.tool_calls])==null?void 0:u.map(d=>d[fe.tool_call]).filter(Boolean))||[],i=n[Ie.function_call_arguments_json]&&n[Ie.function_call_name],r=n[Ie.role]||"unknown",o=m.useMemo(()=>r==="user"?{backgroundColor:"grey-100",borderColor:"grey-500"}:r==="assistant"?{backgroundColor:"blue-100",borderColor:"blue-700"}:r==="system"?{backgroundColor:"indigo-100",borderColor:"indigo-700"}:["function","tool"].includes(r)?{backgroundColor:"yellow-100",borderColor:"yellow-700"}:{backgroundColor:"grey-100",borderColor:"grey-700"},[r]);return e(Te,{children:s(z,{...ae,...o,title:r+(n[Ie.name]?`: ${n[Ie.name]}`:""),extra:s(h,{direction:"row",gap:"size-100",children:[e($e,{}),e(ne,{text:a||JSON.stringify(n)})]}),children:[e($l,{children:l?e(Jc,{messageContents:l}):null}),s(h,{direction:"column",alignItems:"start",children:[a?e(ea,{children:a}):null,t.length>0?t.map((d,p)=>{var f,c;return s("pre",{css:C`
|
|
1430
1459
|
text-wrap: wrap;
|
|
1431
1460
|
margin: var(--ac-global-dimension-static-size-100) 0;
|
|
1432
|
-
`,children:[(f=d==null?void 0:d.function)==null?void 0:f.name,"(",JSON.stringify(JSON.parse((
|
|
1461
|
+
`,children:[(f=d==null?void 0:d.function)==null?void 0:f.name,"(",JSON.stringify(JSON.parse((c=d==null?void 0:d.function)==null?void 0:c.arguments),null,2),")"]},p)}):null,i?s("pre",{css:C`
|
|
1433
1462
|
text-wrap: wrap;
|
|
1434
1463
|
margin: var(--ac-global-dimension-static-size-100) 0;
|
|
1435
|
-
`,children:[n[
|
|
1464
|
+
`,children:[n[Ie.function_call_name],"(",JSON.stringify(JSON.parse(n[Ie.function_call_arguments_json]),null,2),")"]}):null]})]})})}function Bc({toolSchema:n,index:a}){return e(z,{title:s(h,{direction:"row",gap:"size-100",alignItems:"center",children:[e(Ql,{spanKind:"tool"}),e(K,{textSize:"large",weight:"heavy",children:"Tool"})]}),titleExtra:s(Ne,{variant:"light",children:["#",a+1]}),...ae,backgroundColor:"yellow-100",borderColor:"yellow-700",bodyStyle:{padding:0},extra:e(ne,{text:n}),children:e(Qe,{value:n,mimeType:"json"})})}function cl({messages:n}){return e("ul",{css:C`
|
|
1436
1465
|
display: flex;
|
|
1437
1466
|
flex-direction: column;
|
|
1438
1467
|
gap: var(--ac-global-dimension-static-size-100);
|
|
1439
1468
|
padding: var(--ac-global-dimension-static-size-200);
|
|
1440
|
-
`,children:n.map((a,l)=>e("li",{children:e(
|
|
1469
|
+
`,children:n.map((a,l)=>e("li",{children:e(Uc,{message:a})},l))})}function Hc({toolSchemas:n}){return e("ul",{css:C`
|
|
1441
1470
|
display: flex;
|
|
1442
1471
|
flex-direction: column;
|
|
1443
1472
|
gap: var(--ac-global-dimension-static-size-100);
|
|
1444
1473
|
padding: var(--ac-global-dimension-static-size-200);
|
|
1445
|
-
`,children:n.map((a,l)=>e("li",{children:e(
|
|
1474
|
+
`,children:n.map((a,l)=>e("li",{children:e(Bc,{toolSchema:a,index:l})},l))})}function Gc({prompts:n}){return e("ul",{"data-testid":"llm-prompts-list",css:C`
|
|
1446
1475
|
padding: var(--ac-global-dimension-size-200);
|
|
1447
1476
|
display: flex;
|
|
1448
1477
|
flex-direction: column;
|
|
1449
1478
|
gap: var(--ac-global-dimension-size-100);
|
|
1450
|
-
`,children:n.map((a,l)=>e("li",{children:e(
|
|
1479
|
+
`,children:n.map((a,l)=>e("li",{children:e(F,{backgroundColor:"gray-600",borderColor:"gray-400",borderWidth:"thin",borderRadius:"medium",padding:"size-100",children:e(ra,{text:a,children:e(Qe,{value:a,mimeType:"text"})})})},l))})}const Wc=C`
|
|
1451
1480
|
display: flex;
|
|
1452
1481
|
flex-direction: row;
|
|
1453
1482
|
gap: var(--ac-global-dimension-size-200);
|
|
1454
1483
|
flex-wrap: wrap;
|
|
1455
|
-
`;function
|
|
1484
|
+
`;function Jc({messageContents:n}){return e("ul",{css:Wc,"data-testid":"message-content-list",children:n.map((a,l)=>e(Xc,{messageContentAttribute:a},l))})}const Zc=C`
|
|
1456
1485
|
flex: 1 1 100%;
|
|
1457
|
-
`;function
|
|
1486
|
+
`;function Xc({messageContentAttribute:n}){var r;const{message_content:a}=n,l=a==null?void 0:a.text,t=a==null?void 0:a.image,i=(r=t==null?void 0:t.image)==null?void 0:r.url;return s("li",{css:l?Zc:null,children:[l?e("pre",{css:C`
|
|
1458
1487
|
white-space: pre-wrap;
|
|
1459
1488
|
padding: 0;
|
|
1460
1489
|
margin: 0;
|
|
1461
|
-
`,children:l}):null,i?e(
|
|
1490
|
+
`,children:l}):null,i?e(Tc,{url:i}):null]})}function ri({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(Te,{children:e(z,{title:"Input",...ae,extra:s(h,{direction:"row",gap:"size-100",children:[i?e($e,{}):null,e(ne,{text:a.value})]}),children:e(Qe,{...a})})}):null,l&&l.value!=null?e(Te,{children:e(z,{title:"Output",...ae,backgroundColor:"green-100",borderColor:"green-700",extra:s(h,{direction:"row",gap:"size-100",children:[r?e($e,{}):null,e(ne,{text:l.value})]}),children:e(Qe,{...l})})}):null,t?e(z,{title:"All Attributes",titleExtra:oi,...ae,bodyStyle:{padding:0},extra:e(ne,{text:n.attributes}),children:e(Ze,{children:n.attributes})}):null]})}const Yc=C`
|
|
1462
1491
|
.cm-content {
|
|
1463
1492
|
padding: var(--ac-global-dimension-static-size-200) 0;
|
|
1464
1493
|
}
|
|
@@ -1466,7 +1495,7 @@ fragment DatasetPicker__datasets on Query {
|
|
|
1466
1495
|
.cm-gutters {
|
|
1467
1496
|
background-color: transparent;
|
|
1468
1497
|
}
|
|
1469
|
-
`;function
|
|
1498
|
+
`;function ra({text:n,children:a,padding:l}){const t=l?`var(--ac-global-dimension-${l})`:"0";return s("div",{css:C`
|
|
1470
1499
|
position: relative;
|
|
1471
1500
|
.copy-to-clipboard-button {
|
|
1472
1501
|
transition: opacity 0.2s ease-in-out;
|
|
@@ -1479,10 +1508,10 @@ fragment DatasetPicker__datasets on Query {
|
|
|
1479
1508
|
&:hover .copy-to-clipboard-button {
|
|
1480
1509
|
opacity: 1;
|
|
1481
1510
|
}
|
|
1482
|
-
`,children:[e(
|
|
1511
|
+
`,children:[e(ne,{text:n}),a]})}function Ze({children:n}){const{theme:a}=Yn(),l=a==="light"?void 0:ka,{value:t,mimeType:i}=m.useMemo(()=>{try{return{value:JSON.stringify(JSON.parse(n),null,2),mimeType:"json"}}catch{return{value:n,mimeType:"text"}}},[n]);return i==="json"?e(ha,{value:t,basicSetup:{lineNumbers:!0,foldGutter:!0,bracketMatching:!0,syntaxHighlighting:!0,highlightActiveLine:!1,highlightActiveLineGutter:!1},extensions:[Po(),_o.lineWrapping],editable:!1,theme:l,css:Yc}):e(si,{children:t})}function si({children:n}){return e("pre",{css:C`
|
|
1483
1512
|
white-space: pre-wrap;
|
|
1484
1513
|
padding: 0;
|
|
1485
|
-
`,children:n})}function
|
|
1514
|
+
`,children:n})}function Qe({value:n,mimeType:a}){let l;switch(a){case"json":l=e(Ze,{children:n});break;case"text":l=e(ea,{children:n});break;default:xe()}return l}function eu({text:n}){return s(h,{direction:"column",alignItems:"center",flex:"1 1 auto",height:"size-2400",justifyContent:"center",gap:"size-100",children:[e(ca,{graphicKey:"documents"}),e(K,{children:n})]})}function nu({events:n}){return n.length===0?e(eu,{text:"No events"}):e(Il,{children:n.map((a,l)=>{const t=a.name==="exception";return e(Tl,{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`
|
|
1486
1515
|
&[data-event-type="exception"] {
|
|
1487
1516
|
--px-event-icon-color: ${i.colors.statusDanger};
|
|
1488
1517
|
}
|
|
@@ -1492,15 +1521,15 @@ fragment DatasetPicker__datasets on Query {
|
|
|
1492
1521
|
.ac-icon-wrap {
|
|
1493
1522
|
color: var(--px-event-icon-color);
|
|
1494
1523
|
}
|
|
1495
|
-
`,children:e(
|
|
1524
|
+
`,children:e(E,{svg:t?e(L.AlertTriangleOutline,{}):e(L.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 oi=e(h,{alignItems:"center",justifyContent:"center",children:e(F,{marginStart:"size-100",children:s(_n,{children:[e(te,{weight:"heavy",level:4,children:"Span Attributes"}),e(Pn,{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(ze,{href:"https://github.com/Arize-ai/openinference/blob/main/spec/semantic_conventions.md",children:"Semantic Conventions"})})]})})}),ul="selectedSpanNodeId";function au(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 di(n){const{traceId:a,projectId:l}=n,[t,i]=oa(),r=T.useLazyLoadQuery(Ot,{traceId:a,id:l},{fetchPolicy:"store-and-network"}),o=m.useMemo(()=>{var c;return(((c=r.project.trace)==null?void 0:c.spans.edges)||[]).map(g=>g.span)},[r]),d=t.get(ul)??o[0].id,p=m.useMemo(()=>au(o),[o]);return m.useEffect(()=>()=>{i(f=>(f.delete("spanNodeId"),f),{replace:!0})},[]),s("main",{css:C`
|
|
1496
1525
|
flex: 1 1 auto;
|
|
1497
1526
|
overflow: hidden;
|
|
1498
1527
|
display: flex;
|
|
1499
1528
|
flex-direction: column;
|
|
1500
|
-
`,children:[e(
|
|
1529
|
+
`,children:[e(lu,{rootSpan:p}),s(Ge,{direction:"horizontal",autoSaveId:"trace-panel-group",css:C`
|
|
1501
1530
|
flex: 1 1 auto;
|
|
1502
1531
|
overflow: hidden;
|
|
1503
|
-
`,children:[e(
|
|
1532
|
+
`,children:[e(re,{defaultSize:30,minSize:10,maxSize:70,children:e(iu,{children:e(co,{spans:o,selectedSpanNodeId:d,onSpanClick:f=>{i(c=>(c.set(ul,f.id),c),{replace:!0})}})})}),e(We,{css:kn}),e(re,{children:e(tu,{children:d?e(m.Suspense,{fallback:e(ue,{}),children:e(Ec,{spanNodeId:d,projectId:l})}):null})})]})]})}function lu({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(pa,{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(na,{annotation:o,children:e(bn,{annotation:o,annotationDisplayPreference:"label"})},o.name))})]}):null]})})}function tu({children:n}){return e("div",{"data-testid":"scrolling-tabs-wrapper",css:C`
|
|
1504
1533
|
height: 100%;
|
|
1505
1534
|
overflow: hidden;
|
|
1506
1535
|
.ac-tabs {
|
|
@@ -1520,10 +1549,10 @@ fragment DatasetPicker__datasets on Query {
|
|
|
1520
1549
|
}
|
|
1521
1550
|
}
|
|
1522
1551
|
}
|
|
1523
|
-
`,children:n})}function
|
|
1552
|
+
`,children:n})}function iu({children:n}){return e("div",{"data-testid":"scrolling-panel-content",css:C`
|
|
1524
1553
|
height: 100%;
|
|
1525
1554
|
overflow-y: auto;
|
|
1526
|
-
`,children:n})}function
|
|
1555
|
+
`,children:n})}function Ug(){const{traceId:n,projectId:a}=Ye(),l=ee();return e(G,{type:"slideOver",isDismissable:!0,onDismiss:()=>l(`/projects/${a}`),children:e(U,{size:"fullscreen",title:"Trace Details",children:e(di,{traceId:n,projectId:a})})})}const ci=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],u={alias:null,args:null,kind:"ScalarField",name:"spanKind",storageKey:null},d={alias:"statusCode",args:null,kind:"ScalarField",name:"propagatedStatusCode",storageKey:null},p={alias:null,args:null,kind:"ScalarField",name:"startTime",storageKey:null},f={alias:null,args:null,kind:"ScalarField",name:"latencyMs",storageKey:null},c={alias:null,args:null,kind:"ScalarField",name:"parentId",storageKey:null},g=[{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},k={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},b={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},v=[{alias:null,args:null,kind:"ScalarField",name:"value",storageKey:null}],S=[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,u,i,{alias:null,args:null,kind:"ScalarField",name:"metadata",storageKey:null},d,p,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},c,{alias:null,args:null,concreteType:"SpanIOValue",kind:"LinkedField",name:"input",plural:!1,selections:g,storageKey:null},{alias:null,args:null,concreteType:"SpanIOValue",kind:"LinkedField",name:"output",plural:!1,selections:g,storageKey:null},y,k,b,{alias:null,args:null,concreteType:"Span",kind:"LinkedField",name:"descendants",plural:!0,selections:[t,u,i,d,p,f,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:v,storageKey:null},{alias:null,args:null,concreteType:"SpanIOValue",kind:"LinkedField",name:"output",plural:!1,selections:v,storageKey:null},y,k,b],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:S,kind:"ScalarField",name:"traceCount",storageKey:null},{alias:null,args:S,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(
|
|
1527
1556
|
$id: GlobalID!
|
|
1528
1557
|
$timeRange: TimeRange!
|
|
1529
1558
|
) {
|
|
@@ -1642,7 +1671,7 @@ fragment TracesTable_spans on Project {
|
|
|
1642
1671
|
}
|
|
1643
1672
|
id
|
|
1644
1673
|
}
|
|
1645
|
-
`}}}();
|
|
1674
|
+
`}}}();ci.hash="e2d168c52b9c1b5fd5543286f4d2786c";const ui=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"id"},{defaultValue:null,kind:"LocalArgument",name:"timeRange"}],a=[{kind:"Variable",name:"id",variableName:"id"}],l={alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},t={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},i={alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},r=[{kind:"Literal",name:"first",value:50},{kind:"Literal",name:"sort",value:{col:"startTime",dir:"desc"}},{kind:"Variable",name:"timeRange",variableName:"timeRange"}],o=[{alias:"value",args:null,kind:"ScalarField",name:"truncatedValue",storageKey:null}];return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"ProjectPageSpansQuery",selections:[{alias:"project",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{args:null,kind:"FragmentSpread",name:"SpansTable_spans"}],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"ProjectPageSpansQuery",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:null,args:r,concreteType:"SpanConnection",kind:"LinkedField",name:"spans",plural:!1,selections:[{alias:null,args:null,concreteType:"SpanEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"span",args:null,concreteType:"Span",kind:"LinkedField",name:"node",plural:!1,selections:[t,{alias:null,args:null,kind:"ScalarField",name:"spanKind",storageKey:null},i,{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:o,storageKey:null},{alias:null,args:null,concreteType:"SpanIOValue",kind:"LinkedField",name:"output",plural:!1,selections:o,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},{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:[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:null,args:r,filters:["sort","filterCondition","timeRange"],handle:"connection",key:"SpansTable_spans",kind:"LinkedHandle",name:"spans"}],type:"Project",abstractKey:null}],storageKey:null}]},params:{cacheID:"09e4f18ba3f2a63560f542088a4329ff",id:null,metadata:{},name:"ProjectPageSpansQuery",operationKind:"query",text:`query ProjectPageSpansQuery(
|
|
1646
1675
|
$id: GlobalID!
|
|
1647
1676
|
$timeRange: TimeRange!
|
|
1648
1677
|
) {
|
|
@@ -1709,7 +1738,7 @@ fragment SpansTable_spans on Project {
|
|
|
1709
1738
|
}
|
|
1710
1739
|
id
|
|
1711
1740
|
}
|
|
1712
|
-
`}}}();
|
|
1741
|
+
`}}}();ui.hash="18fe45fad1c124d8c29cdcabf463a213";const mi=function(){var n={defaultValue:null,kind:"LocalArgument",name:"id"},a={defaultValue:null,kind:"LocalArgument",name:"timeRange"},l=[{kind:"Variable",name:"id",variableName:"id"}],t={kind:"Variable",name:"timeRange",variableName:"timeRange"},i=[t];return{fragment:{argumentDefinitions:[n,a],kind:"Fragment",metadata:null,name:"ProjectPageHeaderQuery",selections:[{alias:null,args:l,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{args:null,kind:"FragmentSpread",name:"ProjectPageHeader_stats"}],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[a,n],kind:"Operation",name:"ProjectPageHeaderQuery",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"},{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{kind:"InlineFragment",selections:[{alias:null,args:i,kind:"ScalarField",name:"traceCount",storageKey:null},{alias:null,args:i,kind:"ScalarField",name:"tokenCountTotal",storageKey:null},{alias:"latencyMsP50",args:[{kind:"Literal",name:"probability",value:.5},t],kind:"ScalarField",name:"latencyMsQuantile",storageKey:null},{alias:"latencyMsP99",args:[{kind:"Literal",name:"probability",value:.99},t],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}],type:"Project",abstractKey:null}],storageKey:null}]},params:{cacheID:"264a748e3bb636d71fb6b75523a612fe",id:null,metadata:{},name:"ProjectPageHeaderQuery",operationKind:"query",text:`query ProjectPageHeaderQuery(
|
|
1713
1742
|
$timeRange: TimeRange
|
|
1714
1743
|
$id: GlobalID!
|
|
1715
1744
|
) {
|
|
@@ -1730,7 +1759,7 @@ fragment ProjectPageHeader_stats on Project {
|
|
|
1730
1759
|
documentEvaluationNames
|
|
1731
1760
|
id
|
|
1732
1761
|
}
|
|
1733
|
-
`}}}();
|
|
1762
|
+
`}}}();mi.hash="dcce9d160db90e2b5c51eef9971101a4";const gi=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:mi,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}}();gi.hash="dcce9d160db90e2b5c51eef9971101a4";const pi=m.createContext(null);function Vn(){const n=Ce.useContext(pi);if(n===null)throw new Error("useStreamState must be used within a StreamStateProvider");return n}function ru({initialFetchKey:n="initial",children:a}){const l=yn(u=>u.traceStreamingEnabled),t=yn(u=>u.setTraceStreamingEnabled),[i,r]=m.useState(n),o=m.useCallback(u=>{m.startTransition(()=>{r(u)})},[r]);return e(pi.Provider,{value:{isStreaming:l,setIsStreaming:t,fetchKey:i,setFetchKey:o},children:a})}const yi=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(
|
|
1734
1763
|
$annotationName: String!
|
|
1735
1764
|
$timeRange: TimeRange!
|
|
1736
1765
|
$id: GlobalID!
|
|
@@ -1753,7 +1782,7 @@ fragment AnnotationSummaryValueFragment_4BTVrq on Project {
|
|
|
1753
1782
|
}
|
|
1754
1783
|
id
|
|
1755
1784
|
}
|
|
1756
|
-
`}}}();
|
|
1785
|
+
`}}}();yi.hash="0a8e190e4d87acc87c161366f330e3af";const fi={argumentDefinitions:[{defaultValue:null,kind:"LocalArgument",name:"annotationName"},{defaultValue:null,kind:"LocalArgument",name:"timeRange"}],kind:"Fragment",metadata:{refetch:{connection:null,fragmentPathInResult:["node"],operation:yi,identifierInfo:{identifierField:"id",identifierQueryVariableName:"id"}}},name:"AnnotationSummaryValueFragment",selections:[{alias:null,args:[{kind:"Variable",name:"annotationName",variableName:"annotationName"},{kind:"Variable",name:"timeRange",variableName:"timeRange"}],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},{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null}],type:"Project",abstractKey:null};fi.hash="0a8e190e4d87acc87c161366f330e3af";const hi=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:"AnnotationSummaryQuery",selections:[{alias:"project",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:[a,n,l],kind:"Operation",name:"AnnotationSummaryQuery",selections:[{alias:"project",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:"88dfad5d25db7e03286a789f3ba37c75",id:null,metadata:{},name:"AnnotationSummaryQuery",operationKind:"query",text:`query AnnotationSummaryQuery(
|
|
1757
1786
|
$id: GlobalID!
|
|
1758
1787
|
$annotationName: String!
|
|
1759
1788
|
$timeRange: TimeRange!
|
|
@@ -1776,7 +1805,7 @@ fragment AnnotationSummaryValueFragment_4BTVrq on Project {
|
|
|
1776
1805
|
}
|
|
1777
1806
|
id
|
|
1778
1807
|
}
|
|
1779
|
-
`}}}();
|
|
1808
|
+
`}}}();hi.hash="6a15ba35fe9e1e35aa4c517ab6309a2b";function su({annotationName:n}){const{projectId:a}=Ye(),{timeRange:l}=ya(),t=T.useLazyLoadQuery(hi,{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(m.Suspense,{fallback:e(K,{textSize:"xlarge",children:"--"}),children:e(ou,{annotationName:n,project:t.project})})]})}function ou(n){var y,k;const{project:a,annotationName:l}=n,{fetchKey:t}=Vn(),[i,r]=T.useRefetchableFragment(fi,a);m.useEffect(()=>{m.startTransition(()=>{r({},{fetchPolicy:"store-and-network"})})},[t,r]);const o=qe(),d=[Ol(l),o.default,o.gray600,o.gray400,o.gray200],p=(y=i==null?void 0:i.spanAnnotationSummary)==null?void 0:y.meanScore,f=(k=i==null?void 0:i.spanAnnotationSummary)==null?void 0:k.labelFractions,c=typeof p=="number",g=Array.isArray(f)&&f.length>0;return!c&&!g?e(K,{textSize:"xlarge",children:"--"}):s(Le,{delay:0,placement:"bottom",children:[e(In,{children:s(h,{direction:"row",alignItems:"center",gap:"size-50",children:[g?e(Lo,{width:24,height:24,children:e(wo,{data:f,dataKey:"fraction",nameKey:"label",cx:"50%",cy:"50%",innerRadius:8,outerRadius:11,strokeWidth:0,stroke:"transparent",children:f.map((b,v)=>e(Ao,{fill:d[v%d.length]},`cell-${v}`))})}):null,e(K,{textSize:"xlarge",children:c?_e(p):"--"})]})}),e(Xn,{children:e(F,{width:"size-2400",children:s(h,{direction:"column",gap:"size-50",children:[g&&e("ul",{children:f.map((b,v)=>e("li",{children:e(ce,{color:d[v%d.length],name:b.label,shape:"square",value:jl(b.fraction*100)})},b.label))}),g&&c?e(ga,{}):null,c?s(h,{direction:"row",justifyContent:"space-between",children:[e(K,{children:"mean"}),e(K,{children:_e(p)})]}):null]})})})]})}const ki=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(
|
|
1780
1809
|
$evaluationName: String!
|
|
1781
1810
|
$timeRange: TimeRange!
|
|
1782
1811
|
$id: GlobalID!
|
|
@@ -1798,7 +1827,7 @@ fragment DocumentEvaluationSummaryValueFragment_1dJL9N on Project {
|
|
|
1798
1827
|
}
|
|
1799
1828
|
id
|
|
1800
1829
|
}
|
|
1801
|
-
`}}}();
|
|
1830
|
+
`}}}();ki.hash="15d0652aa260c80f62acec943f615d93";const bi={argumentDefinitions:[{defaultValue:null,kind:"LocalArgument",name:"evaluationName"},{defaultValue:null,kind:"LocalArgument",name:"timeRange"}],kind:"Fragment",metadata:{refetch:{connection:null,fragmentPathInResult:["node"],operation:ki,identifierInfo:{identifierField:"id",identifierQueryVariableName:"id"}}},name:"DocumentEvaluationSummaryValueFragment",selections:[{alias:null,args:[{kind:"Variable",name:"evaluationName",variableName:"evaluationName"},{kind:"Variable",name:"timeRange",variableName:"timeRange"}],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},{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null}],type:"Project",abstractKey:null};bi.hash="15d0652aa260c80f62acec943f615d93";const Si=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"evaluationName"},{defaultValue:null,kind:"LocalArgument",name:"id"},{defaultValue:null,kind:"LocalArgument",name:"timeRange"}],a=[{kind:"Variable",name:"id",variableName:"id"}],l=[{kind:"Variable",name:"evaluationName",variableName:"evaluationName"},{kind:"Variable",name:"timeRange",variableName:"timeRange"}];return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"DocumentEvaluationSummaryQuery",selections:[{alias:"project",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{args:l,kind:"FragmentSpread",name:"DocumentEvaluationSummaryValueFragment"}],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"DocumentEvaluationSummaryQuery",selections:[{alias:"project",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:l,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:"3ebd1cf66ef8f31c995ec6aae6505e94",id:null,metadata:{},name:"DocumentEvaluationSummaryQuery",operationKind:"query",text:`query DocumentEvaluationSummaryQuery(
|
|
1802
1831
|
$evaluationName: String!
|
|
1803
1832
|
$id: GlobalID!
|
|
1804
1833
|
$timeRange: TimeRange!
|
|
@@ -1820,7 +1849,7 @@ fragment DocumentEvaluationSummaryValueFragment_1dJL9N on Project {
|
|
|
1820
1849
|
}
|
|
1821
1850
|
id
|
|
1822
1851
|
}
|
|
1823
|
-
`}}}();
|
|
1852
|
+
`}}}();Si.hash="4d50474ffa9b9e4a68d07f6e0777c144";function du({evaluationName:n}){const{projectId:a}=Ye(),{timeRange:l}=ya(),t=T.useLazyLoadQuery(Si,{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(m.Suspense,{fallback:e(K,{textSize:"xlarge",children:"--"}),children:e(cu,{evaluationName:n,project:t==null?void 0:t.project})})]})}function cu(n){var p,f,c,g;const{project:a}=n,{fetchKey:l}=Vn(),[t,i]=T.useRefetchableFragment(bi,a);m.useEffect(()=>{m.startTransition(()=>{i({},{fetchPolicy:"store-and-network"})})},[l,i]);const r=(p=t==null?void 0:t.documentEvaluationSummary)==null?void 0:p.averageNdcg,o=(f=t==null?void 0:t.documentEvaluationSummary)==null?void 0:f.averagePrecision,u=(c=t==null?void 0:t.documentEvaluationSummary)==null?void 0:c.hitRate,d=(g=t==null?void 0:t.documentEvaluationSummary)==null?void 0:g.meanReciprocalRank;return s(Le,{delay:0,placement:"bottom",children:[e(In,{children:e(h,{direction:"row",alignItems:"center",gap:"size-50",height:"28px",children:s(j,{children:[e(be,{metric:"ndcg",score:r},"ndcg"),e(be,{metric:"precision",score:o},"precision"),e(be,{metric:"hit rate",score:u},"hit")]})})}),e(Xn,{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"?_e(r):"--"})]}),s(h,{justifyContent:"space-between",children:[e(K,{children:"average precision"}),e(K,{children:typeof o=="number"?_e(o):"--"})]}),s(h,{justifyContent:"space-between",children:[e(K,{children:"mean reciprocal rank"}),e(K,{children:typeof d=="number"?_e(d):"--"})]}),s(h,{justifyContent:"space-between",children:[e(K,{children:"hit rate"}),e(K,{children:typeof u=="number"?_e(u):"--"})]})]})})})]})}function uu(n){const{extra:a}=n,{fetchKey:l}=Vn(),[t,i]=T.useRefetchableFragment(gi,n.project);m.useEffect(()=>{m.startTransition(()=>{i({},{fetchPolicy:"store-and-network"})})},[l,i]);const r=t==null?void 0:t.latencyMsP50,o=t==null?void 0:t.latencyMsP99,u=t==null?void 0:t.tokenCountTotal,d=t==null?void 0:t.spanAnnotationNames,p=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`
|
|
1824
1853
|
overflow-x: auto;
|
|
1825
1854
|
overflow-y: hidden;
|
|
1826
1855
|
flex: 1 1 auto;
|
|
@@ -1856,7 +1885,7 @@ fragment DocumentEvaluationSummaryValueFragment_1dJL9N on Project {
|
|
|
1856
1885
|
left center,
|
|
1857
1886
|
right center;
|
|
1858
1887
|
background-attachment: local, local, scroll, scroll;
|
|
1859
|
-
`,children:s(h,{direction:"row",gap:"size-400",alignItems:"center",children:[s(h,{direction:"column",flex:"none",children:[e(
|
|
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:pn(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:pn(u)})]}),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(su,{annotationName:f},f)),p.map(f=>e(du,{evaluationName:f},`document-${f}`))]})}),e(F,{flex:"none",paddingStart:"size-100",children:a})]})})}const vi=m.createContext(null);function Ci(){const n=m.useContext(vi);if(n===null)throw new Error("useSpanFilterCondition must be used within a SpanFilterConditionProvider");return n}function ml(n){const[a,l]=m.useState(""),t=m.useCallback(r=>{m.startTransition(()=>{l(r)})},[]),i=m.useCallback(r=>{m.startTransition(()=>{a.length>0?l(a+" and "+r):l(r)})},[a]);return e(vi.Provider,{value:{filterCondition:a,setFilterCondition:t,appendFilterCondition:i},children:n.children})}const Fi=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"}],u={kind:"Variable",name:"after",variableName:"after"},d={kind:"Variable",name:"filterCondition",variableName:"filterCondition"},p={kind:"Variable",name:"first",variableName:"first"},f={kind:"Variable",name:"sort",variableName:"sort"},c={alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},g={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},y={alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},k=[u,d,p,f,{kind:"Variable",name:"timeRange",variableName:"timeRange"}],b=[{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:[u,d,p,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:[c,{kind:"TypeDiscriminator",abstractKey:"__isNode"},g,{kind:"InlineFragment",selections:[y,{alias:null,args:null,kind:"ScalarField",name:"spanAnnotationNames",storageKey:null},{alias:null,args:k,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:[g,{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:b,storageKey:null},{alias:null,args:null,concreteType:"SpanIOValue",kind:"LinkedField",name:"output",plural:!1,selections:b,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:[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:null},{alias:null,args:k,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(
|
|
1860
1889
|
$after: String = null
|
|
1861
1890
|
$filterCondition: String = null
|
|
1862
1891
|
$first: Int = 50
|
|
@@ -1927,14 +1956,14 @@ fragment SpansTable_spans_1XEuU on Project {
|
|
|
1927
1956
|
}
|
|
1928
1957
|
id
|
|
1929
1958
|
}
|
|
1930
|
-
`}}}();
|
|
1959
|
+
`}}}();Fi.hash="4827989f55b1c0bd269253b6bc977439";const Ki=function(){var n=["spans"],a={alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},l={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},t=[{alias:"value",args:null,kind:"ScalarField",name:"truncatedValue",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:Fi,identifierInfo:{identifierField:"id",identifierQueryVariableName:"id"}}},name:"SpansTable_spans",selections:[a,{args:null,kind:"FragmentSpread",name:"SpanColumnSelector_annotations"},{alias:"spans",args:[{kind:"Variable",name:"filterCondition",variableName:"filterCondition"},{kind:"Variable",name:"sort",variableName:"sort"},{kind:"Variable",name:"timeRange",variableName:"timeRange"}],concreteType:"SpanConnection",kind:"LinkedField",name:"__SpansTable_spans_connection",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:[l,{alias:null,args:null,kind:"ScalarField",name:"spanKind",storageKey:null},a,{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:t,storageKey:null},{alias:null,args:null,concreteType:"SpanIOValue",kind:"LinkedField",name:"output",plural:!1,selections:t,storageKey:null},{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},{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:[{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}}();Ki.hash="4827989f55b1c0bd269253b6bc977439";const xi=m.createContext(null);function mu({children:n,...a}){const l=m.useRef();return l.current||(l.current=uo(a)),e(xi.Provider,{value:l.current,children:n})}function Xe(n,a){const l=Ce.useContext(xi);if(!l)throw new Error("Missing TracingContext.Provider in the tree");return za(l,n,a)}function Di(n){const{appendFilterCondition:a}=Ci(),{annotation:l}=n,{name:t,label:i,score:r}=l,o=m.useMemo(()=>{const u=[];return i!=null&&(u.push({filterName:"Match label",filterCondition:`annotations['${t}'].label == "${i}"`}),u.push({filterName:"Exclude label",filterCondition:`annotations['${t}'].label != "${i}"`})),typeof r=="number"&&(u.push({filterName:"Greater than score",filterCondition:`annotations['${t}'].score > ${r}`}),u.push({filterName:"Less than score",filterCondition:`annotations['${t}'].score < ${r}`}),u.push({filterName:"Equals score",filterCondition:`annotations['${t}'].score == ${r}`})),u},[t,i,r]);return s(F,{borderStartWidth:"thin",borderColor:"dark",paddingStart:"size-200",paddingEnd:"size-100",marginStart:"size-200",width:300,children:[e(K,{textSize:"large",weight:"heavy",children:"Filters"}),e("ul",{css:C`
|
|
1931
1960
|
display: flex;
|
|
1932
1961
|
flex-direction: row;
|
|
1933
1962
|
gap: var(--ac-global-dimension-size-100);
|
|
1934
1963
|
color: var(--ac-global-color-primary);
|
|
1935
1964
|
padding: var(--ac-global-dimension-size-100) 0;
|
|
1936
1965
|
flex-wrap: wrap;
|
|
1937
|
-
`,children:o.map(
|
|
1966
|
+
`,children:o.map(u=>e("li",{children:e(gu,{onClick:()=>{a(u.filterCondition)},children:u.filterName})},u.filterName))})]})}function gu({onClick:n,children:a}){return e("button",{onClick:l=>{l.preventDefault(),l.stopPropagation(),n()},className:"button--reset",css:C`
|
|
1938
1967
|
color: var(--ac-global-text-color-900);
|
|
1939
1968
|
border: 1px solid var(--ac-global-color-gray-200);
|
|
1940
1969
|
border-radius: 4px;
|
|
@@ -1945,10 +1974,10 @@ fragment SpansTable_spans_1XEuU on Project {
|
|
|
1945
1974
|
&:hover {
|
|
1946
1975
|
background-color: var(--ac-global-color-gray-300);
|
|
1947
1976
|
}
|
|
1948
|
-
`,children:a})}function
|
|
1977
|
+
`,children:a})}function pu({projectName:n}){const[a,l]=m.useState("Python");return e(U,{title:"Send Traces to this Project",size:"L",children:s(F,{padding:"size-400",overflow:"auto",children:[e(F,{paddingBottom:"size-100",children:e(ql,{language:a,onChange:l})}),a==="Python"?e(Ul,{projectName:n}):e(Bl,{projectName:n})]})})}function Ti({projectName:n}){const[a,l]=m.useState(null),t=()=>{l(e(pu,{projectName:n}))};return s("tbody",{className:"is-empty",children:[e("tr",{children:e("td",{colSpan:100,css:i=>C`
|
|
1949
1978
|
text-align: center;
|
|
1950
1979
|
padding: ${i.spacing.margin24}px ${i.spacing.margin24}px !important;
|
|
1951
|
-
`,children:s(h,{direction:"column",gap:"size-200",alignItems:"center",children:["No traces found for this project",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(E,{svg:e(L.PlayCircleOutline,{})}),onClick:t,children:"Get Started"})]})})}),e(G,{onDismiss:()=>l(null),isDismissable:!0,type:"slideOver",children:a})]})}const Ii={argumentDefinitions:[],kind:"Fragment",metadata:null,name:"SpanColumnSelector_annotations",selections:[{alias:null,args:null,kind:"ScalarField",name:"spanAnnotationNames",storageKey:null}],type:"Project",abstractKey:null};Ii.hash="ad01e6897ad1ea779eb346d85783b8b4";const yu=["spanKind","name"];function Li(n){return e(Oa,{menu:e(fu,{...n}),triggerProps:{placement:"bottom end"},children:s(h,{direction:"row",alignItems:"center",gap:"size-100",children:[e(E,{svg:e(L.Column,{})}),"Columns"]})})}const sa=C`
|
|
1952
1981
|
padding: var(--ac-global-dimension-static-size-50)
|
|
1953
1982
|
var(--ac-global-dimension-static-size-100);
|
|
1954
1983
|
label {
|
|
@@ -1956,10 +1985,10 @@ fragment SpansTable_spans_1XEuU on Project {
|
|
|
1956
1985
|
align-items: center;
|
|
1957
1986
|
gap: var(--ac-global-dimension-static-size-100);
|
|
1958
1987
|
}
|
|
1959
|
-
`;function
|
|
1988
|
+
`;function fu(n){const{columns:a}=n,l=Xe(d=>d.columnVisibility),t=Xe(d=>d.setColumnVisibility),i=m.useMemo(()=>a.filter(d=>!yu.includes(d.id)),[a]),r=m.useMemo(()=>i.every(d=>{const p=l[d.id];return p??!0}),[i,l]),o=m.useCallback(d=>{const{name:p,checked:f}=d.target;t({...l,[p]:f})},[l,t]),u=m.useCallback(d=>{const{checked:p}=d.target,f=i.reduce((c,g)=>({...c,[g.id]:p}),{});t(f)},[i,t]);return e("div",{css:C`
|
|
1960
1989
|
overflow-y: auto;
|
|
1961
1990
|
max-height: calc(100vh - 200px);
|
|
1962
|
-
`,children:s(
|
|
1991
|
+
`,children:s(F,{paddingTop:"size-50",paddingBottom:"size-50",children:[e(F,{borderBottomColor:"dark",borderBottomWidth:"thin",paddingBottom:"size-50",children:e("div",{css:sa,children:s("label",{children:[e("input",{type:"checkbox",name:"toggle-all",checked:r,onChange:u}),"span columns"]})})}),e("ul",{children:i.map(d=>{const p=l[d.id],f=p??!0,c=typeof d.columnDef.header=="string"?d.columnDef.header:d.id;return e("li",{css:sa,children:s("label",{children:[e("input",{type:"checkbox",name:d.id,checked:f,onChange:o}),c]})},d.id)})}),e(hu,{...n})]})})}function hu({query:n}){const a=T.useFragment(Ii,n),l=Xe(o=>o.annotationColumnVisibility),t=Xe(o=>o.setAnnotationColumnVisibility),i=m.useMemo(()=>a.spanAnnotationNames.every(o=>l[o]||!1),[a.spanAnnotationNames,l]),r=m.useCallback(()=>{const o=a.spanAnnotationNames.reduce((u,d)=>({...u,[d]:!i}),{});t(o)},[a.spanAnnotationNames,t,i]);return s("section",{children:[e(F,{paddingTop:"size-50",paddingBottom:"size-50",borderColor:"dark",borderTopWidth:"thin",borderBottomWidth:"thin",children:e("div",{css:sa,children:s("label",{children:[e("input",{type:"checkbox",name:"toggle-evaluations-all",checked:i,onChange:r}),"feedback"]})})}),e("ul",{children:a.spanAnnotationNames.map(o=>{const u=l[o]??!1;return e("li",{css:sa,children:s("label",{children:[e("input",{type:"checkbox",name:o,checked:u,onChange:()=>{t({...l,[o]:!u})}}),o]})},o)})})]})}const wi=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"condition"},{defaultValue:null,kind:"LocalArgument",name:"id"}],a=[{kind:"Variable",name:"id",variableName:"id"}],l={kind:"InlineFragment",selections:[{alias:null,args:[{kind:"Variable",name:"condition",variableName:"condition"}],concreteType:"ValidationResult",kind:"LinkedField",name:"validateSpanFilterCondition",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"isValid",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"errorMessage",storageKey:null}],storageKey:null}],type:"Project",abstractKey:null};return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"SpanFilterConditionFieldValidationQuery",selections:[{alias:"project",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[l],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"SpanFilterConditionFieldValidationQuery",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,{kind:"TypeDiscriminator",abstractKey:"__isNode"},{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null}],storageKey:null}]},params:{cacheID:"29583e7ec666cef832dc7effb9e75678",id:null,metadata:{},name:"SpanFilterConditionFieldValidationQuery",operationKind:"query",text:`query SpanFilterConditionFieldValidationQuery(
|
|
1963
1992
|
$condition: String!
|
|
1964
1993
|
$id: GlobalID!
|
|
1965
1994
|
) {
|
|
@@ -1975,7 +2004,7 @@ fragment SpansTable_spans_1XEuU on Project {
|
|
|
1975
2004
|
id
|
|
1976
2005
|
}
|
|
1977
2006
|
}
|
|
1978
|
-
`}}}();
|
|
2007
|
+
`}}}();wi.hash="22836f192038b0c40201d3b25aad65b4";const Ai=C`
|
|
1979
2008
|
flex: 1 1 auto;
|
|
1980
2009
|
.cm-content {
|
|
1981
2010
|
padding: var(--ac-global-dimension-static-size-100) 0;
|
|
@@ -1989,7 +2018,7 @@ fragment SpansTable_spans_1XEuU on Project {
|
|
|
1989
2018
|
.cm-selectionLayer .cm-selectionBackground {
|
|
1990
2019
|
background: var(--ac-global-color-cyan-400) !important;
|
|
1991
2020
|
}
|
|
1992
|
-
`,
|
|
2021
|
+
`,Pi=C`
|
|
1993
2022
|
border-width: var(--ac-global-border-size-thin);
|
|
1994
2023
|
border-style: solid;
|
|
1995
2024
|
border-color: var(--ac-global-input-field-border-color);
|
|
@@ -2006,19 +2035,19 @@ fragment SpansTable_spans_1XEuU on Project {
|
|
|
2006
2035
|
border-color: var(--ac-global-color-danger);
|
|
2007
2036
|
}
|
|
2008
2037
|
box-sizing: border-box;
|
|
2009
|
-
`;function
|
|
2038
|
+
`;function ku(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 bu(n,a){if(!n)return{isValid:!0,errorMessage:null};const l=await us.fetchQuery(Ke,wi,{condition:n,id:a}).toPromise();if(!l)throw new Error("Filter condition validation is null");return l.project.validateSpanFilterCondition}const Su=[Eo.of([{key:"Enter",run:n=>!0}]),Xa(),Ro({override:[ku]})];function _i(n){const{onValidCondition:a,placeholder:l="filter condition (e.x. span_kind == 'LLM')"}=n,[t,i]=m.useState(!1),[r,o]=m.useState(""),{filterCondition:u,setFilterCondition:d,appendFilterCondition:p}=Ci(),f=m.useDeferredValue(u),{theme:c}=Yn(),g=c==="dark"?ka:void 0,{projectId:y}=Ye();m.useEffect(()=>{bu(f,y).then(v=>{v!=null&&v.isValid?(o(""),m.startTransition(()=>{a(f)})):o((v==null?void 0:v.errorMessage)??"Invalid filter condition")})},[a,f,y]);const k=r!=="",b=u!=="";return s("div",{"data-is-focused":t,"data-is-invalid":k,className:"span-filter-condition-field",css:Pi,children:[s(h,{direction:"row",children:[e(Ks,{children:e(E,{svg:e(L.Search,{})})}),e(ha,{css:Ai,indentWithTab:!1,basicSetup:{lineNumbers:!1,foldGutter:!1,bracketMatching:!0,syntaxHighlighting:!0,highlightActiveLine:!1,highlightActiveLineGutter:!1,defaultKeymap:!1},onFocus:()=>i(!0),onBlur:()=>i(!1),value:u,onChange:d,height:"36px",width:"100%",theme:g,placeholder:l,extensions:Su}),e("button",{css:C`
|
|
2010
2039
|
margin-right: var(--ac-global-dimension-static-size-100);
|
|
2011
2040
|
color: var(--ac-global-text-color-700);
|
|
2012
|
-
visibility: ${
|
|
2013
|
-
`,onClick:()=>d(""),className:"button--reset",children:e(
|
|
2041
|
+
visibility: ${b?"visible":"hidden"};
|
|
2042
|
+
`,onClick:()=>d(""),className:"button--reset",children:e(E,{svg:e(L.CloseCircleOutline,{})})}),s(hn,{placement:"bottom right",children:[e(In,{children:e("button",{css:C`
|
|
2014
2043
|
color: var(--ac-global-text-color-700);
|
|
2015
2044
|
background-color: var(--ac-global-color-grey-400);
|
|
2016
2045
|
padding-left: var(--ac-global-dimension-static-size-100);
|
|
2017
2046
|
padding-right: var(--ac-global-dimension-static-size-100);
|
|
2018
2047
|
height: 100%;
|
|
2019
|
-
`,className:"button--reset",children:e(
|
|
2048
|
+
`,className:"button--reset",children:e(E,{svg:e(L.PlusCircleOutline,{})})})}),e(vu,{onAddFilterConditionSnippet:p})]})]}),s(Le,{isOpen:k&&t,placement:"bottom",children:[e(In,{children:e("div",{})}),e(Xn,{children:r!=""?e(K,{color:"danger",children:r}):e(K,{color:"success",children:"Valid Expression"})})]})]})}function vu(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(ve,{children:[e(dn,{label:"filter by kind",initialSnippet:"span_kind == 'LLM'",onAddFilterConditionSnippet:a},"kind"),e(dn,{label:"filter by token count",initialSnippet:"cumulative_token_count.total > 1000",onAddFilterConditionSnippet:a},"token_count"),e(dn,{label:"filter by annotation label",initialSnippet:"annotations['Hallucination'].label == 'hallucinated'",onAddFilterConditionSnippet:a},"annotation_label"),e(dn,{label:"filter by evaluation label",initialSnippet:"evals['Hallucination'].label == 'hallucinated'",onAddFilterConditionSnippet:a},"eval_label"),e(dn,{label:"filter by evaluation score",initialSnippet:"evals['Hallucination'].score < 1",onAddFilterConditionSnippet:a},"eval_score"),e(dn,{label:"filter by metadata",initialSnippet:"metadata['topic'] == 'agent'",onAddFilterConditionSnippet:a},"metadata"),e(dn,{label:"filter by substring",initialSnippet:"'agent' in input.value",onAddFilterConditionSnippet:a},"substring")]})})}function dn(n){const{initialSnippet:a,onAddFilterConditionSnippet:l}=n,[t,i]=m.useState(a),{theme:r}=Yn(),o=r==="light"?void 0:ka;return e(ua,{label:n.label,children:s(h,{direction:"row",width:"100%",gap:"size-100",children:[e("div",{css:C(Pi,C`
|
|
2020
2049
|
flex: 1 1 auto;
|
|
2021
|
-
`),children:e(
|
|
2050
|
+
`),children:e(ha,{value:t,basicSetup:{lineNumbers:!1,foldGutter:!1,bracketMatching:!0,syntaxHighlighting:!0,highlightActiveLine:!1,highlightActiveLineGutter:!1},extensions:[Xa()],editable:!0,onChange:i,theme:o,css:Ai})}),e(M,{title:"Add to filter condition",variant:"default",onClick:()=>l(t),icon:e(E,{svg:e(L.PlusCircleOutline,{})})})]})})}const Ei=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(
|
|
2022
2051
|
$input: AddSpansToDatasetInput!
|
|
2023
2052
|
) {
|
|
2024
2053
|
addSpansToDataset(input: $input) {
|
|
@@ -2027,7 +2056,7 @@ fragment SpansTable_spans_1XEuU on Project {
|
|
|
2027
2056
|
}
|
|
2028
2057
|
}
|
|
2029
2058
|
}
|
|
2030
|
-
`}}}();
|
|
2059
|
+
`}}}();Ei.hash="5e3aef907285081a06c0e0360045e865";const Ri={fragment:{argumentDefinitions:[],kind:"Fragment",metadata:null,name:"DatasetSelectorPopoverContentDatasetsQuery",selections:[{args:null,kind:"FragmentSpread",name:"DatasetSelectorPopoverContent_datasets"}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[],kind:"Operation",name:"DatasetSelectorPopoverContentDatasetsQuery",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:"6d459b61a36b99979f025742892941f9",id:null,metadata:{},name:"DatasetSelectorPopoverContentDatasetsQuery",operationKind:"query",text:`query DatasetSelectorPopoverContentDatasetsQuery {
|
|
2031
2060
|
...DatasetSelectorPopoverContent_datasets
|
|
2032
2061
|
}
|
|
2033
2062
|
|
|
@@ -2041,7 +2070,7 @@ fragment DatasetSelectorPopoverContent_datasets on Query {
|
|
|
2041
2070
|
}
|
|
2042
2071
|
}
|
|
2043
2072
|
}
|
|
2044
|
-
`}};
|
|
2073
|
+
`}};Ri.hash="40d5267ad0ec2335a73ff2a4d05bbed1";const Mi={argumentDefinitions:[],kind:"Fragment",metadata:{refetch:{connection:null,fragmentPathInResult:[],operation:Ri}},name:"DatasetSelectorPopoverContent_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};Mi.hash="40d5267ad0ec2335a73ff2a4d05bbed1";const Ni={fragment:{argumentDefinitions:[],kind:"Fragment",metadata:null,name:"DatasetSelectorPopoverContentQuery",selections:[{args:null,kind:"FragmentSpread",name:"DatasetSelectorPopoverContent_datasets"}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[],kind:"Operation",name:"DatasetSelectorPopoverContentQuery",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:"5fb28a402f330dd235295da21efea58b",id:null,metadata:{},name:"DatasetSelectorPopoverContentQuery",operationKind:"query",text:`query DatasetSelectorPopoverContentQuery {
|
|
2045
2074
|
...DatasetSelectorPopoverContent_datasets
|
|
2046
2075
|
}
|
|
2047
2076
|
|
|
@@ -2055,15 +2084,15 @@ fragment DatasetSelectorPopoverContent_datasets on Query {
|
|
|
2055
2084
|
}
|
|
2056
2085
|
}
|
|
2057
2086
|
}
|
|
2058
|
-
`}};
|
|
2087
|
+
`}};Ni.hash="7cd8a13144d97d2b5294f2a09c9e1351";function Cu(n){const{onCreateNewDataset:a,onDatasetSelected:l}=n,[t,i]=m.useState(""),r=T.useLazyLoadQuery(Ni,{},{fetchPolicy:"network-only"});return s(z,{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(Z,{type:"search",placeholder:"Search datasets",addonBefore:e(E,{svg:e(L.Search,{})}),onChange:o=>{i(o)}})}),e(F,{borderTopWidth:"thin",borderColor:"light",children:e("div",{css:C`
|
|
2059
2088
|
height: 400px;
|
|
2060
2089
|
overflow-y: auto;
|
|
2061
|
-
`,children:e(
|
|
2090
|
+
`,children:e(Fu,{query:r,search:t,onDatasetSelected:l})})})]})}function Fu(n){const{search:a,onDatasetSelected:l}=n,[t]=T.useRefetchableFragment(Mi,n.query),i=m.useMemo(()=>{let o=t.datasets.edges.map(u=>u.dataset);return a&&(o=o.filter(u=>u.name.toLowerCase().includes(a.toLowerCase()))),o},[a,t]);return i.length===0?e(h,{direction:"column",justifyContent:"center",alignItems:"center",flex:"1 1 auto",children:e(K,{children:"No datasets found"})}):e(Zn,{selectionMode:"single",onSelectionChange:o=>{if(typeof o=="object"){const u=Array.from(o);l(u[0])}},children:i.map(o=>e(W,{children:o.name},o.id))})}function Vi(n){const a=ee(),[l,t]=m.useState(null),i=ie(),r=de(),[o,u]=m.useState(!1),{selectedSpans:d,onClearSelection:p}=n,[f,c]=T.useMutation(Ei),g=d.length!==1,y=m.useCallback(k=>{f({variables:{input:{datasetId:k,spanIds:d.map(b=>b.id)}},onCompleted:()=>{i({title:"Examples added to dataset",message:`${d.length} example${g?"s":""} have been added to the dataset.`,action:{text:"View dataset",onClick:()=>{a(`/datasets/${k}/examples`)}}}),p()},onError:b=>{r({title:"An error occurred",message:`Failed to add spans to dataset: ${b.message}`})}})},[f,d,i,g,p,a,r]);return s("div",{css:C`
|
|
2062
2091
|
position: absolute;
|
|
2063
2092
|
bottom: var(--ac-global-dimension-size-400);
|
|
2064
2093
|
left: 50%;
|
|
2065
2094
|
transform: translateX(-50%);
|
|
2066
|
-
`,children:[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${g?"s":""} selected`}),s(h,{direction:"row",gap:"size-100",children:[e(M,{variant:"default",size:"compact",onClick:p,children:"Cancel"}),s(hn,{placement:"top end",crossOffset:300,isOpen:o,onOpenChange:k=>{u(k)},children:[e(M,{variant:"primary",size:"compact",icon:e(E,{svg:e(L.DatabaseOutline,{})}),loading:c,disabled:c,children:c?"Adding to dataset":"Add to dataset"}),e(m.Suspense,{children:e(Cu,{onDatasetSelected:k=>{y(k),u(!1)},onCreateNewDataset:()=>{u(!1),t(e(U,{title:"New Dataset",isDismissable:!0,onDismiss:()=>t(null),children:e(Ha,{onDatasetCreateError:()=>{r({title:"Dataset creation failed",message:"Failed to create dataset."})},onDatasetCreated:k=>{t(null),i({title:"Dataset created",message:`${k.name} has been successfully created.`}),u(!0)}})}))}})})]})]})]})}),e(G,{onDismiss:()=>{t(null)},children:l})]})}const zi=C`
|
|
2067
2096
|
display: flex;
|
|
2068
2097
|
flex-direction: column;
|
|
2069
2098
|
flex: 1 1 auto;
|
|
@@ -2076,10 +2105,10 @@ fragment DatasetSelectorPopoverContent_datasets on Query {
|
|
|
2076
2105
|
.ac-dropdown-button {
|
|
2077
2106
|
min-width: var(--ac-global-dimension-static-size-300);
|
|
2078
2107
|
}
|
|
2079
|
-
`,
|
|
2108
|
+
`,Wn="annotations",Ee=":",$i={col:"startTime",dir:"desc"};function Qi(n){let a=null,l=null;if(n.id&&n.id.startsWith(Wn)){const[,t,i]=n.id.split(Ee);l={attr:t,name:i}}else a=n.id;return{col:a,evalResultKey:l,dir:n.desc?"desc":"asc"}}const gl=50;function Ku(n){const{fetchKey:a}=Vn(),l=m.useRef(null),[t,i]=m.useState({}),[r,o]=m.useState([]),[u,d]=m.useState(""),p=Xe(N=>N.columnVisibility),f=ee(),{data:c,loadNext:g,hasNext:y,isLoadingNext:k,refetch:b}=T.usePaginationFragment(Ki,n.project),v=Xe(N=>N.annotationColumnVisibility),S=m.useMemo(()=>Object.keys(v).filter(N=>v[N]),[v]),w=m.useMemo(()=>c.spans.edges.map(({span:V})=>V),[c]),I=S.map(N=>({header:N,columns:[{header:"label",accessorKey:`${Wn}${Ee}label${Ee}${N}`,cell:({row:V})=>{const A=V.original.spanAnnotations.find($=>$.name===N);return A?A.label:null}},{header:"score",accessorKey:`${Wn}${Ee}score${Ee}${N}`,cell:({row:V})=>{const A=V.original.spanAnnotations.find($=>$.name===N);return A?A.score:null}}]})),P=[{header:()=>s(h,{direction:"row",gap:"size-50",children:[e("span",{children:"feedback"}),s(_n,{children:[e(te,{level:3,weight:"heavy",children:"Feedback"}),e(Pn,{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(V=>e(na,{annotation:V,layout:"horizontal",width:"500px",extra:e(Di,{annotation:V}),children:e(bn,{annotation:V,annotationDisplayPreference:"label"})},V.name)),N.original.documentRetrievalMetrics.map(V=>s(j,{children:[e(be,{name:V.evaluationName,metric:"ndcg",score:V.ndcg},"ndcg"),e(be,{name:V.evaluationName,metric:"precision",score:V.precision},"precision"),e(be,{name:V.evaluationName,metric:"hit",score:V.hit},"hit")]}))]})},...I],x=[{id:"select",maxSize:10,header:({table:N})=>e(Je,{checked:N.getIsAllRowsSelected(),indeterminate:N.getIsSomeRowsSelected(),onChange:N.getToggleAllRowsSelectedHandler()}),cell:({row:N})=>e(Je,{checked:N.getIsSelected(),disabled:!N.getCanSelect(),indeterminate:N.getIsSomeSelected(),onChange:N.getToggleSelectedHandler()})},{header:"kind",accessorKey:"spanKind",maxSize:100,enableSorting:!1,cell:({getValue:N})=>e(Ga,{spanKind:N()})},{header:"name",accessorKey:"name",enableSorting:!1,cell:({getValue:N,row:V})=>{const A=V.original,{traceId:$}=A.context;return e(He,{to:`traces/${$}?selectedSpanNodeId=${A.id}`,children:N()})}},{header:"input",accessorKey:"input.value",cell:se,enableSorting:!1},{header:"output",accessorKey:"output.value",cell:se,enableSorting:!1},{header:"metadata",accessorKey:"metadata",cell:se,enableSorting:!1},...P,{header:"start time",accessorKey:"startTime",cell:ke},{header:"latency",accessorKey:"latencyMs",cell:({getValue:N})=>{const V=N();return V===null||typeof V!="number"?null:e(we,{latencyMs:V})}},{header:"total tokens",accessorKey:"tokenCountTotal",cell:({row:N,getValue:V})=>{const A=V();return A===null?"--":e(Ba,{tokenCountTotal:A,tokenCountPrompt:N.original.tokenCountPrompt||0,tokenCountCompletion:N.original.tokenCountCompletion||0})}},{header:"status",accessorKey:"statusCode",enableSorting:!1,cell:({getValue:N})=>e(pa,{statusCode:N()})}];m.useEffect(()=>{const N=r[0];m.startTransition(()=>{b({sort:N?Qi(N):$i,after:null,first:gl,filterCondition:u},{fetchPolicy:"store-and-network"})})},[r,b,u,a]);const D=m.useCallback(N=>{if(N){const{scrollHeight:V,scrollTop:A,clientHeight:$}=N;V-A-$<300&&!k&&y&&g(gl)}},[y,k,g]),R=me({columns:x,data:w,state:{sorting:r,columnVisibility:p,rowSelection:t},manualSorting:!0,enableRowSelection:!0,onRowSelectionChange:i,onSortingChange:o,getCoreRowModel:ge(),getSortedRowModel:wn()}),_=R.getRowModel().rows,O=R.getSelectedRowModel().rows,X=O.map(N=>N.original),le=m.useCallback(()=>{i({})},[i]),pe=_.length===0,ye=R.getAllColumns().filter(N=>N.columns.length===0);return s("div",{css:zi,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(_i,{onValidCondition:d}),e(Li,{columns:ye,query:c})]})}),e("div",{css:C`
|
|
2080
2109
|
flex: 1 1 auto;
|
|
2081
2110
|
overflow: auto;
|
|
2082
|
-
`,onScroll:
|
|
2111
|
+
`,onScroll:N=>D(N.target),ref:l,children:s("table",{css:Nn,children:[e("thead",{children:R.getHeaderGroups().map(N=>e("tr",{children:N.headers.map(V=>e("th",{colSpan:V.colSpan,children:V.isPlaceholder?null:s("div",{className:V.column.getCanSort()?"cursor-pointer":"",onClick:V.column.getToggleSortingHandler(),style:{left:V.getStart(),width:V.getSize()},children:[H(V.column.columnDef.header,V.getContext()),V.column.getIsSorted()?e(E,{className:"sort-icon",svg:V.column.getIsSorted()==="asc"?e(L.ArrowUpFilled,{}):e(L.ArrowDownFilled,{})}):null]})},V.id))},N.id))}),pe?e(Ti,{projectName:c.name}):e("tbody",{children:_.map(N=>e("tr",{onClick:()=>f(`traces/${N.original.context.traceId}?selectedSpanNodeId=${N.original.id}`),children:N.getVisibleCells().map(V=>e("td",{children:H(V.column.columnDef.cell,V.getContext())},V.id))},N.id))})]})}),O.length?e(Vi,{selectedSpans:X,onClearSelection:le}):null]})}const Oi=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(
|
|
2083
2112
|
$id: GlobalID!
|
|
2084
2113
|
) {
|
|
2085
2114
|
node(id: $id) {
|
|
@@ -2094,7 +2123,7 @@ fragment StreamToggle_data on Project {
|
|
|
2094
2123
|
streamingLastUpdatedAt
|
|
2095
2124
|
id
|
|
2096
2125
|
}
|
|
2097
|
-
`}}}();
|
|
2126
|
+
`}}}();Oi.hash="30a8f0bcf1aa6021b2c9a47866f5dc49";const ji={argumentDefinitions:[],kind:"Fragment",metadata:{refetch:{connection:null,fragmentPathInResult:["node"],operation:Oi,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};ji.hash="30a8f0bcf1aa6021b2c9a47866f5dc49";function qi(n,a){const l=m.useRef(null);m.useEffect(()=>{l.current=n},[n]),m.useEffect(()=>{function t(){l.current&&l.current()}if(typeof a=="number"){const i=setInterval(t,a);return()=>clearInterval(i)}},[a])}const xu=2e3;function Du(n){const{isStreaming:a,setIsStreaming:l,setFetchKey:t}=Vn(),[i,r]=T.useRefetchableFragment(ji,n.project),o=m.useRef(i.streamingLastUpdatedAt),u=m.useCallback(()=>{a&&m.startTransition(()=>{r({},{fetchPolicy:"store-and-network"})})},[a,r]),d=i.streamingLastUpdatedAt;return m.useEffect(()=>{d!=null&&(o.current==null||o.current<d)&&(o.current=d,t(`fetch-traces-${d}`))},[t,d]),qi(u,xu),e(Jn,{labelPlacement:"start",isSelected:a,onChange:()=>{l(!a)},children:"Stream"})}const Ui=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"}],u={kind:"Variable",name:"after",variableName:"after"},d={kind:"Variable",name:"filterCondition",variableName:"filterCondition"},p={kind:"Variable",name:"first",variableName:"first"},f={kind:"Variable",name:"sort",variableName:"sort"},c={alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},g={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},y={alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},k=[u,d,p,{kind:"Literal",name:"rootSpansOnly",value:!0},f,{kind:"Variable",name:"timeRange",variableName:"timeRange"}],b={alias:null,args:null,kind:"ScalarField",name:"spanKind",storageKey:null},v={alias:"statusCode",args:null,kind:"ScalarField",name:"propagatedStatusCode",storageKey:null},S={alias:null,args:null,kind:"ScalarField",name:"startTime",storageKey:null},w={alias:null,args:null,kind:"ScalarField",name:"latencyMs",storageKey:null},I={alias:null,args:null,kind:"ScalarField",name:"parentId",storageKey:null},P=[{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},D={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},R={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},_=[{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:[u,d,p,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:[c,{kind:"TypeDiscriminator",abstractKey:"__isNode"},g,{kind:"InlineFragment",selections:[y,{alias:null,args:null,kind:"ScalarField",name:"spanAnnotationNames",storageKey:null},{alias:"rootSpans",args:k,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:[g,b,y,{alias:null,args:null,kind:"ScalarField",name:"metadata",storageKey:null},v,S,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},I,{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},x,D,R,{alias:null,args:null,concreteType:"Span",kind:"LinkedField",name:"descendants",plural:!0,selections:[g,b,y,v,S,w,I,{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:_,storageKey:null},{alias:null,args:null,concreteType:"SpanIOValue",kind:"LinkedField",name:"output",plural:!1,selections:_,storageKey:null},x,D,R],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:[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:null},{alias:"rootSpans",args:k,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(
|
|
2098
2127
|
$after: String = null
|
|
2099
2128
|
$filterCondition: String = null
|
|
2100
2129
|
$first: Int = 50
|
|
@@ -2200,16 +2229,16 @@ fragment TracesTable_spans_1XEuU on Project {
|
|
|
2200
2229
|
}
|
|
2201
2230
|
id
|
|
2202
2231
|
}
|
|
2203
|
-
`}}}();
|
|
2232
|
+
`}}}();Ui.hash="69e77ceeea7371be4ec13fc702225150";const Bi=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},u={alias:null,args:null,kind:"ScalarField",name:"parentId",storageKey:null},d=[{alias:"value",args:null,kind:"ScalarField",name:"truncatedValue",storageKey:null}],p={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},c={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},g=[{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:Ui,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},u,{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},p,f,c,{alias:null,args:null,concreteType:"Span",kind:"LinkedField",name:"descendants",plural:!0,selections:[l,t,a,i,r,o,u,{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:g,storageKey:null},{alias:null,args:null,concreteType:"SpanIOValue",kind:"LinkedField",name:"output",plural:!1,selections:g,storageKey:null},p,f,c],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}}();Bi.hash="69e77ceeea7371be4ec13fc702225150";const pl=50;function Hi(n){const a=[];for(const l of n){const t={...l.span,children:Hi(l.children)};a.push(t)}return a}function Tu(n){const a=m.useRef(null),[l,t]=m.useState({}),[i,r]=m.useState([]),[o,u]=m.useState(""),d=ee(),{fetchKey:p}=Vn(),{data:f,loadNext:c,hasNext:g,isLoadingNext:y,refetch:k}=T.usePaginationFragment(Bi,n.project),b=Xe(A=>A.annotationColumnVisibility),v=m.useMemo(()=>Object.keys(b).filter(A=>b[A]),[b]),S=m.useMemo(()=>f.rootSpans.edges.map(({rootSpan:$})=>{const J=mo([$,...$.descendants]),[rn]=Hi(J);return rn}),[f]),w=v.map(A=>({header:A,columns:[{header:"label",accessorKey:`${Wn}${Ee}label${Ee}${A}`,cell:({row:$})=>{const J=$.original.spanAnnotations.find(rn=>rn.name===A);return J?J.label:null}},{header:"score",accessorKey:`${Wn}${Ee}score${Ee}${A}`,cell:({row:$})=>{const J=$.original.spanAnnotations.find(rn=>rn.name===A);return J?J.score:null}}]})),I=[{header:()=>s(h,{direction:"row",gap:"size-50",children:[e("span",{children:"feedback"}),s(_n,{children:[e(te,{level:3,weight:"heavy",children:"Feedback"}),e(Pn,{children:"Feedback includes evaluations and human annotations logged via the API or set via the UI."})]})]}),accessorKey:"spanAnnotations",enableSorting:!1,cell:({row:A})=>{const $=A.original.spanAnnotations.length===0&&A.original.documentRetrievalMetrics.length===0;return s(h,{direction:"row",gap:"size-50",wrap:"wrap",children:[A.original.spanAnnotations.map(J=>e(na,{annotation:J,layout:"horizontal",width:"500px",extra:e(Di,{annotation:J}),children:e(bn,{annotation:J,annotationDisplayPreference:"label"})},J.name)),A.original.documentRetrievalMetrics.map(J=>s(m.Fragment,{children:[e(be,{name:J.evaluationName,metric:"ndcg",score:J.ndcg},"ndcg"),e(be,{name:J.evaluationName,metric:"precision",score:J.precision},"precision"),e(be,{name:J.evaluationName,metric:"hit",score:J.hit},"hit")]},"doc-evals")),$?"--":null]})}},...w],P=[{id:"select",maxSize:10,header:({table:A})=>e(Je,{checked:A.getIsAllRowsSelected(),indeterminate:A.getIsSomeRowsSelected(),onChange:A.getToggleAllRowsSelectedHandler()}),cell:({row:A})=>e(Je,{checked:A.getIsSelected(),disabled:!A.getCanSelect(),indeterminate:A.getIsSomeSelected(),onChange:A.getToggleSelectedHandler()})},{header:()=>s(h,{gap:"size-50",direction:"row",alignItems:"center",children:[e(il,{isExpanded:O.getIsAllRowsExpanded(),onClick:O.getToggleAllRowsExpandedHandler(),"aria-label":"Expand all rows"}),"kind"]}),enableSorting:!1,accessorKey:"spanKind",maxSize:100,cell:A=>e("div",{css:C`
|
|
2204
2233
|
// Since rows are flattened by default,
|
|
2205
2234
|
// we can use the row.depth property
|
|
2206
2235
|
// and paddingLeft to visually indicate the depth
|
|
2207
2236
|
// of the row
|
|
2208
|
-
padding-left: ${
|
|
2209
|
-
`,children:s(h,{gap:"size-50",children:[
|
|
2237
|
+
padding-left: ${A.row.depth*2}rem;
|
|
2238
|
+
`,children:s(h,{gap:"size-50",children:[A.row.getCanExpand()?e(il,{isExpanded:A.row.getIsExpanded(),onClick:A.row.getToggleExpandedHandler(),"aria-label":"Expand row"}):null,e(Ga,{spanKind:A.getValue()})]})})},{header:"name",accessorKey:"name",enableSorting:!1,cell:({getValue:A,row:$})=>{const{traceId:J}=$.original.context;return e(He,{to:`traces/${J}?selectedSpanNodeId=${$.original.id}`,children:A()})}},{header:"input",accessorKey:"input.value",enableSorting:!1,cell:se},{header:"output",accessorKey:"output.value",enableSorting:!1,cell:se},{header:"metadata",accessorKey:"metadata",enableSorting:!1,cell:se},...I,{header:"start time",accessorKey:"startTime",cell:ke},{header:"latency",accessorKey:"latencyMs",cell:({getValue:A})=>{const $=A();return $===null||typeof $!="number"?null:e(we,{latencyMs:$})}},{header:"total tokens",minSize:80,accessorKey:"cumulativeTokenCountTotal",cell:({row:A,getValue:$})=>{const J=$();return J===null?"--":e(Ba,{tokenCountTotal:J,tokenCountPrompt:A.original.cumulativeTokenCountPrompt||0,tokenCountCompletion:A.original.cumulativeTokenCountCompletion||0})}},{header:"status",accessorKey:"statusCode",enableSorting:!1,cell:({getValue:A})=>e(pa,{statusCode:A()})}];m.useEffect(()=>{const A=i[0];m.startTransition(()=>{k({sort:A?Qi(A):$i,after:null,first:pl,filterCondition:o},{fetchPolicy:"store-and-network"})})},[i,k,o,p]);const x=Ce.useCallback(A=>{if(A){const{scrollHeight:$,scrollTop:J,clientHeight:rn}=A;$-J-rn<300&&!y&&g&&c(pl)}},[g,y,c]),[D,R]=m.useState({}),_=Xe(A=>A.columnVisibility),O=me({columns:P,data:S,onExpandedChange:R,manualSorting:!0,getSubRows:A=>A.children,state:{sorting:i,expanded:D,columnVisibility:_,rowSelection:l},onRowSelectionChange:t,enableSubRowSelection:!1,onSortingChange:r,getCoreRowModel:ge(),getSortedRowModel:wn(),getExpandedRowModel:ms(),getRowId:A=>A.id}),X=O.getRowModel().rows,le=O.getSelectedRowModel().flatRows,pe=le.map(A=>A.original),ye=m.useCallback(()=>{t({})},[t]),N=X.length===0,V=O.getAllColumns().filter(A=>A.columns.length===0);return s("div",{css:zi,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(_i,{onValidCondition:u}),e(Li,{columns:V,query:f})]})}),e("div",{css:C`
|
|
2210
2239
|
flex: 1 1 auto;
|
|
2211
2240
|
overflow: auto;
|
|
2212
|
-
`,onScroll:
|
|
2241
|
+
`,onScroll:A=>x(A.target),ref:a,children:s("table",{css:Nn,children:[e("thead",{children:O.getHeaderGroups().map(A=>e("tr",{children:A.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:[H($.column.columnDef.header,$.getContext()),$.column.getIsSorted()?e(E,{className:"sort-icon",svg:$.column.getIsSorted()==="asc"?e(L.ArrowUpFilled,{}):e(L.ArrowDownFilled,{})}):null]})},$.id))},A.id))}),N?e(Ti,{projectName:f.name}):e("tbody",{children:X.map(A=>e("tr",{onClick:()=>d(`traces/${A.original.context.traceId}`),children:A.getVisibleCells().map($=>e("td",{children:H($.column.columnDef.cell,$.getContext())},$.id))},A.id))})]})}),le.length?e(Vi,{selectedSpans:pe,onClearSelection:ye}):null]})}const Iu=C`
|
|
2213
2242
|
flex: 1 1 auto;
|
|
2214
2243
|
display: flex;
|
|
2215
2244
|
flex-direction: column;
|
|
@@ -2235,7 +2264,7 @@ fragment TracesTable_spans_1XEuU on Project {
|
|
|
2235
2264
|
}
|
|
2236
2265
|
}
|
|
2237
2266
|
}
|
|
2238
|
-
`;function
|
|
2267
|
+
`;function Bg(){const{projectId:n}=Ye(),{timeRange:a}=ya();return e(m.Suspense,{fallback:e(ue,{}),children:e(Lu,{projectId:n,timeRange:a})})}const Gi=ui;function Lu({projectId:n,timeRange:a}){const l=m.useMemo(()=>({start:a.start.toISOString(),end:a.end.toISOString()}),[a]),t=T.useLazyLoadQuery(ci,{id:n,timeRange:l},{fetchPolicy:"store-and-network"}),[i,r,o]=T.useQueryLoader(Gi),u=m.useCallback(d=>{d===1?r({id:n,timeRange:l}):o()},[o,r,n,l]);return s("main",{css:Iu,children:[e(uu,{project:t.project,extra:s(h,{direction:"row",alignItems:"center",gap:"size-100",children:[e(Du,{project:t.project}),e(Hl,{})]})}),s(Se,{onChange:u,children:[e(B,{name:"Traces",children:({isSelected:d})=>d&&e(ml,{children:e(m.Suspense,{children:e(Tu,{project:t.project})})})}),e(B,{name:"Spans",title:"Spans",children:({isSelected:d})=>d&&i&&e(ml,{children:e(m.Suspense,{fallback:e(ue,{}),children:e(wu,{queryReference:i})})})})]}),e(m.Suspense,{children:e(De,{})})]})}function wu({queryReference:n}){const a=T.usePreloadedQuery(Gi,n);return e(Ku,{project:a.project})}const Wi=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(
|
|
2239
2268
|
$id: GlobalID!
|
|
2240
2269
|
) {
|
|
2241
2270
|
project: node(id: $id) {
|
|
@@ -2246,36 +2275,7 @@ fragment TracesTable_spans_1XEuU on Project {
|
|
|
2246
2275
|
}
|
|
2247
2276
|
}
|
|
2248
2277
|
}
|
|
2249
|
-
`}}}();
|
|
2250
|
-
display: flex;
|
|
2251
|
-
direction: row;
|
|
2252
|
-
height: 100vh;
|
|
2253
|
-
overflow: hidden;
|
|
2254
|
-
`,Pc=C`
|
|
2255
|
-
display: flex;
|
|
2256
|
-
flex-direction: column;
|
|
2257
|
-
flex: 1 1 auto;
|
|
2258
|
-
height: 100%;
|
|
2259
|
-
overflow: hidden;
|
|
2260
|
-
padding-left: var(--px-nav-collapsed-width);
|
|
2261
|
-
`,Mc=C`
|
|
2262
|
-
flex: 1 1 auto;
|
|
2263
|
-
display: flex;
|
|
2264
|
-
flex-direction: column;
|
|
2265
|
-
height: 100%;
|
|
2266
|
-
overflow: hidden;
|
|
2267
|
-
`,Nc=C`
|
|
2268
|
-
display: flex;
|
|
2269
|
-
flex-direction: column;
|
|
2270
|
-
margin: 0;
|
|
2271
|
-
list-style: none;
|
|
2272
|
-
gap: var(--ac-global-dimension-size-50);
|
|
2273
|
-
padding-inline-start: 0;
|
|
2274
|
-
`,Vc=C`
|
|
2275
|
-
display: flex;
|
|
2276
|
-
flex-direction: column;
|
|
2277
|
-
gap: var(--ac-global-dimension-size-50);
|
|
2278
|
-
`;function Am(){return s("div",{css:Rc,"data-testid":"layout",children:[e($c,{}),s("div",{css:Pc,children:[e(bs,{children:e(ks,{})}),e("div",{"data-testid":"content",css:Mc,children:e(u.Suspense,{fallback:e(se,{}),children:e(Ke,{})})})]})]})}function $c(){const n=u.useMemo(()=>window.Config.hasInferences,[]),{authenticationEnabled:a}=$l();return s(Ks,{children:[e(Ss,{}),s(h,{direction:"column",justifyContent:"space-between",flex:"1 1 auto",children:[s("ul",{css:Vc,children:[n&&e("li",{children:e(fn,{to:"/model",text:"Model",icon:e(P,{svg:e(E.CubeOutline,{})})})}),e("li",{children:e(fn,{to:"/projects",text:"Projects",icon:e(P,{svg:e(E.GridOutline,{})})})}),e("li",{children:e(fn,{to:"/datasets",text:"Datasets",icon:e(P,{svg:e(E.DatabaseOutline,{})})})}),e("li",{children:e(fn,{to:"/apis",text:"APIs",icon:e(P,{svg:e(E.Code,{})})})})]}),s("ul",{css:Nc,children:[e("li",{children:e(fn,{to:"/settings",text:"Settings",icon:e(P,{svg:e(E.SettingsOutline,{})})})}),e("li",{children:e(vs,{})}),e("li",{children:e(Cs,{})}),e("li",{children:e(Fs,{})}),a&&e("li",{children:e(fn,{to:"/profile",text:"Profile",icon:e(P,{svg:e(E.PersonOutline,{})})})})]})]})]})}function Em(){const n=Pr(),a=u.useMemo(()=>n instanceof Error&&n.message==="Failed to fetch"?e(zc,{}):e(Qc,{error:n}),[n]);return e("main",{css:C`
|
|
2278
|
+
`}}}();Wi.hash="3d31e323c06df38ec2eaa6f3adb55e79";async function Hg(n){const{projectId:a}=n.params;return await T.fetchQuery(Ke,Wi,{id:a}).toPromise()}function Gg(){const n=gs(),a=m.useMemo(()=>n instanceof Error&&n.message==="Failed to fetch"?e(Au,{}):e(Pu,{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
|
|
2291
|
+
`,children:a})})}function Au(){return s(j,{children:[s(h,{direction:"column",width:"100%",alignItems:"center",children:[e(ca,{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 Pu({error:n}){return s(j,{children:[s(h,{direction:"column",width:"100%",alignItems:"center",children:[e(ca,{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,19 +2298,19 @@ 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(ze,{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(ze,{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;
|
|
2311
2311
|
overflow-y: auto;
|
|
2312
2312
|
max-height: 500px;
|
|
2313
|
-
`,children:n instanceof Error?n.message:null})]})]})}const
|
|
2313
|
+
`,children:n instanceof Error?n.message:null})]})]})}const Ji=function(){var n=[{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"startTime",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"endTime",storageKey:null}],a=[{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:n,storageKey:null},{alias:null,args:null,concreteType:"Inferences",kind:"LinkedField",name:"referenceInferences",plural:!1,selections:n,storageKey:null},{alias:null,args:null,concreteType:"Inferences",kind:"LinkedField",name:"corpusInferences",plural:!1,selections:n,storageKey:null}],storageKey:null}];return{fragment:{argumentDefinitions:[],kind:"Fragment",metadata:null,name:"ModelRootQuery",selections:a,type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[],kind:"Operation",name:"ModelRootQuery",selections:a},params:{cacheID:"c3baccc5527002697b40a06eef432a4d",id:null,metadata:{},name:"ModelRootQuery",operationKind:"query",text:`query ModelRootQuery {
|
|
2314
2314
|
model {
|
|
2315
2315
|
primaryInferences {
|
|
2316
2316
|
name
|
|
@@ -2329,7 +2329,7 @@ fragment TracesTable_spans_1XEuU on Project {
|
|
|
2329
2329
|
}
|
|
2330
2330
|
}
|
|
2331
2331
|
}
|
|
2332
|
-
`}}}();
|
|
2332
|
+
`}}}();Ji.hash="b73d8f3f532a0c6f88863f3c6dd5734f";const _u=Ji;function Wg(){const n=T.useLazyLoadQuery(_u,{}),{model:{primaryInferences:a,referenceInferences:l,corpusInferences:t}}=n;return e(po,{primaryInferences:a,referenceInferences:l??null,corpusInferences:t??null,children:e(go,{timeRangeBounds:{start:new Date(a.startTime),end:new Date(a.endTime)},children:e(De,{})})})}function Jg(){return e(mu,{children:e(ru,{children:e(De,{})})})}function Zg(){return e(yo,{children:e(De,{})})}const Zi=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
|
|
@@ -2361,7 +2361,7 @@ fragment ProjectsPageProjectsFragment_2HEEH6 on Query {
|
|
|
2361
2361
|
}
|
|
2362
2362
|
}
|
|
2363
2363
|
}
|
|
2364
|
-
`}}}();
|
|
2364
|
+
`}}}();Zi.hash="56c501357948255461a24411fb6b5847";const Xi=function(){var n=["projects"],a={kind:"Variable",name:"timeRange",variableName:"timeRange"},l=[a];return{argumentDefinitions:[{defaultValue:null,kind:"LocalArgument",name:"after"},{defaultValue:50,kind:"LocalArgument",name:"first"},{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:[],operation:Zi}},name:"ProjectsPageProjectsFragment",selections:[{alias:"projects",args:null,concreteType:"ProjectConnection",kind:"LinkedField",name:"__ProjectsPage_projects_connection",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:l,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},a],kind:"ScalarField",name:"latencyMsQuantile",storageKey:null},{alias:null,args:l,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}],type:"Query",abstractKey:null}}();Xi.hash="56c501357948255461a24411fb6b5847";const Yi=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"timeRange"}],a=[{kind:"Literal",name:"first",value:50}],l={kind:"Variable",name:"timeRange",variableName:"timeRange"},t=[l];return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"ProjectsPageQuery",selections:[{args:null,kind:"FragmentSpread",name:"ProjectsPageProjectsFragment"}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"ProjectsPageQuery",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:"projects(first:50)"},{alias:null,args:a,filters:null,handle:"connection",key:"ProjectsPage_projects",kind:"LinkedHandle",name:"projects"}]},params:{cacheID:"35a420462b10b0f0158d042fd39bfabb",id:null,metadata:{},name:"ProjectsPageQuery",operationKind:"query",text:`query ProjectsPageQuery(
|
|
2365
2365
|
$timeRange: TimeRange!
|
|
2366
2366
|
) {
|
|
2367
2367
|
...ProjectsPageProjectsFragment
|
|
@@ -2391,40 +2391,40 @@ fragment ProjectsPageProjectsFragment on Query {
|
|
|
2391
2391
|
}
|
|
2392
2392
|
}
|
|
2393
2393
|
}
|
|
2394
|
-
`}}}();
|
|
2394
|
+
`}}}();Yi.hash="c28f5ced0b3ec4b3b8277d0aac29de2d";const Eu="https://docs.arize.com/phoenix/tracing/how-to-tracing/setup-tracing";function Ru(){const[n,a]=m.useState(null);return s("div",{children:[e(M,{variant:"default",icon:e(E,{svg:e(L.GridOutline,{})}),onClick:()=>{a(e(Mu,{}))},children:"New Project"}),e(G,{isDismissable:!0,type:"slideOver",onDismiss:()=>a(null),children:n})]})}function Mu(){const[n,a]=m.useState("Python");return e(U,{title:"Create a New Project",size:"L",children:s(F,{padding:"size-400",overflow:"auto",children:[e(F,{paddingBottom:"size-200",children:e(ql,{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(ze,{href:Eu,children:"documentation"})," ","for a complete guide."]})}),n==="Python"?e(Ul,{}):e(Bl,{})]})})}const er=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) {
|
|
2398
2398
|
__typename
|
|
2399
2399
|
}
|
|
2400
2400
|
}
|
|
2401
|
-
`}}}();
|
|
2401
|
+
`}}}();er.hash="c43eec4d6b882468c611dd9ebf3b095e";const nr=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"projectId"}],a=[{alias:null,args:[{kind:"Variable",name:"id",variableName:"projectId"}],concreteType:"Query",kind:"LinkedField",name:"deleteProject",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null}],storageKey:null}];return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"ProjectActionMenuDeleteMutation",selections:a,type:"Mutation",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"ProjectActionMenuDeleteMutation",selections:a},params:{cacheID:"8b00ab3aaef4c5fb3de24f7295d38499",id:null,metadata:{},name:"ProjectActionMenuDeleteMutation",operationKind:"mutation",text:`mutation ProjectActionMenuDeleteMutation(
|
|
2402
2402
|
$projectId: GlobalID!
|
|
2403
2403
|
) {
|
|
2404
2404
|
deleteProject(id: $projectId) {
|
|
2405
2405
|
__typename
|
|
2406
2406
|
}
|
|
2407
2407
|
}
|
|
2408
|
-
`}}}();
|
|
2408
|
+
`}}}();nr.hash="3bf82e90b3f2d3485b4efb954e30b2cf";const ar=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:"RemoveProjectDataFormMutation",selections:a,type:"Mutation",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"RemoveProjectDataFormMutation",selections:a},params:{cacheID:"1b27a3f7535c3f3943b0f2248d1505a6",id:null,metadata:{},name:"RemoveProjectDataFormMutation",operationKind:"mutation",text:`mutation RemoveProjectDataFormMutation(
|
|
2409
2409
|
$input: ClearProjectInput!
|
|
2410
2410
|
) {
|
|
2411
2411
|
clearProject(input: $input) {
|
|
2412
2412
|
__typename
|
|
2413
2413
|
}
|
|
2414
2414
|
}
|
|
2415
|
-
`}}}();
|
|
2415
|
+
`}}}();ar.hash="212501fe2d6367ec1503bd7a00c1730f";function Nu(n){const{projectId:a}=n,l=m.useRef(null),[t,i]=T.useMutation(ar),{control:r,handleSubmit:o,setError:u,formState:{isValid:d}}=Fe({defaultValues:{endDate:new Date(Date.now()-fo).toISOString().slice(0,16)}}),p=m.useCallback(f=>{const c=ps(f.endDate);if(!ys(c))return u("endDate",{message:"Date is not in a valid format"});t({variables:{input:{id:a,endTime:new Date(c).toISOString()}},onCompleted:()=>{n.onComplete()},onError:g=>{alert("Failed to clear project traces: "+g)}})},[t,a,n,u]);return s("form",{onSubmit:o(p),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(q,{name:"endDate",control:r,rules:{required:"field is required"},render:({field:{name:f,onChange:c,onBlur:g,value:y},fieldState:{invalid:k,error:b}})=>e(Z,{label:"End Date",type:"datetime-local",name:f,description:"The date up to which you want to remove data",errorMessage:b==null?void 0:b.message,validationState:k?"invalid":"valid",onChange:c,onBlur:g,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 Vu({projectId:n,projectName:a,onProjectDelete:l,onProjectClear:t,onProjectRemoveData:i}){const[r,o]=m.useState(null),u=a!=="default",[d]=T.useMutation(nr),[p]=T.useMutation(er),f=m.useCallback(()=>{m.startTransition(()=>{d({variables:{projectId:n}}),l()})},[d,n,l]),c=m.useCallback(()=>{m.startTransition(()=>{p({variables:{input:{id:n}},onCompleted:()=>{t()},onError:b=>{alert("Failed to clear project: "+b)}})})},[p,n,t]),g=m.useCallback(()=>{o(s(U,{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=m.useCallback(()=>{o(s(U,{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:()=>{c(),o(null)},children:"Clear"})})})]}))},[c,a]),k=m.useCallback(()=>{o(e(U,{size:"M",title:"Remove Data",children:e(Nu,{projectId:n,onComplete:()=>{i(),o(null)}})}))},[i,n]);return s("div",{onClick:b=>{b.preventDefault(),b.stopPropagation()},children:[s(Oe,{buttonVariant:"quiet",align:"end",onAction:b=>{switch(b){case"deleteProject":return g();case"clearProject":return y();case"removeProjectData":return k()}},disabledKeys:u?[]:["deleteProject"],children:[e(W,{textValue:"Clear Traces",children:s(h,{direction:"row",gap:"size-75",justifyContent:"start",alignItems:"center",children:[e(E,{svg:e(L.Refresh,{})}),e(K,{children:"Clear Data"})]})},"clearProject"),e(W,{textValue:"Remove Data",children:s(h,{direction:"row",gap:"size-75",justifyContent:"start",alignItems:"center",children:[e(E,{svg:e(L.CloseCircleOutline,{})}),e(K,{children:"Remove Data"})]})},"removeProjectData"),u?e(W,{children:s(h,{direction:"row",gap:"size-75",justifyContent:"start",alignItems:"center",children:[e(E,{svg:e(L.TrashOutline,{})}),e(K,{children:"Delete"})]})},"deleteProject"):null]}),e(G,{type:"modal",isDismissable:!0,onDismiss:()=>o(null),children:r})]})}function zu(){const n=yn(l=>l.projectsAutoRefreshEnabled),a=yn(l=>l.setProjectAutoRefreshEnabled);return e(Jn,{labelPlacement:"start",isSelected:n,onChange:()=>{a(!n)},children:"Auto-Refresh"})}const $u=1e4,Qu=50;function Xg(){const{timeRange:n}=ya();return e(m.Suspense,{fallback:e(ue,{}),children:e(Ou,{timeRange:n})})}function Ou({timeRange:n}){const a=yn(S=>S.projectsAutoRefreshEnabled),[l,t]=xs(),i=m.useMemo(()=>({start:n.start.toISOString(),end:n.end.toISOString()}),[n]),r=T.useLazyLoadQuery(Yi,{timeRange:i}),{data:o,loadNext:u,hasNext:d,isLoadingNext:p,refetch:f}=T.usePaginationFragment(Xi,r),c=o.projects.edges.map(S=>S.project),g=m.useRef(null),y=m.useCallback(S=>{if(S){const{scrollHeight:w,scrollTop:I,clientHeight:P}=S;w-I-P<300&&!p&&d&&u(Qu)}},[d,p,u]);qi(()=>{m.startTransition(()=>{f({},{fetchPolicy:"store-and-network"})})},a?$u:null);const k=m.useCallback(S=>{m.startTransition(()=>{f({},{fetchPolicy:"store-and-network"}),l({variant:"success",title:"Project Deleted",message:`Project ${S} has been deleted.`})})},[l,f]),b=m.useCallback(S=>{m.startTransition(()=>{f({},{fetchPolicy:"store-and-network"}),l({variant:"success",title:"Project Cleared",message:`Project ${S} has been cleared of traces.`})})},[l,f]),v=m.useCallback(S=>{m.startTransition(()=>{f({},{fetchPolicy:"store-and-network"}),l({variant:"success",title:"Project Data Removed",message:`Old data from project ${S} 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:S=>y(S.target),ref:
|
|
2420
|
+
`,onScroll:S=>y(S.target),ref:g,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(zu,{}),e(Ru,{}),e(Hl,{})]})}),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);
|
|
2424
2424
|
flex-wrap: wrap;
|
|
2425
|
-
`,children:
|
|
2425
|
+
`,children:c.map(S=>e("li",{children:e(He,{to:`/projects/${S.id}`,css:C`
|
|
2426
2426
|
text-decoration: none;
|
|
2427
|
-
`,children:e(
|
|
2427
|
+
`,children:e(qu,{project:S,onProjectDelete:()=>k(S.name),onProjectClear:()=>b(S.name),onProjectRemoveData:()=>v(S.name)})})},S.id))})}),t]})}function ju({gradientStartColor:n,gradientEndColor:a}){return e("div",{css:C`
|
|
2428
2428
|
border-radius: 50%;
|
|
2429
2429
|
width: 32px;
|
|
2430
2430
|
height: 32px;
|
|
@@ -2434,7 +2434,7 @@ fragment ProjectsPageProjectsFragment on Query {
|
|
|
2434
2434
|
${a} 84.38%
|
|
2435
2435
|
);
|
|
2436
2436
|
flex-shrink: 0;
|
|
2437
|
-
`})}function
|
|
2437
|
+
`})}function qu({project:n,onProjectDelete:a,onProjectClear:l,onProjectRemoveData:t}){const{endTime:i,traceCount:r,tokenCountTotal:o,latencyMsP50:u,gradientStartColor:d,gradientEndColor:p}=n,f=m.useMemo(()=>i?`Last updated ${fs(new Date(i),new Date,{addSuffix:!0})}`:"No traces uploaded yet.",[i]);return s("div",{css:C`
|
|
2438
2438
|
padding: var(--ac-global-dimension-size-200);
|
|
2439
2439
|
border: 1px solid var(--ac-global-color-grey-400);
|
|
2440
2440
|
background-color: var(--ac-global-color-grey-100);
|
|
@@ -2448,11 +2448,11 @@ fragment ProjectsPageProjectsFragment on Query {
|
|
|
2448
2448
|
display: flex;
|
|
2449
2449
|
flex-direction: column;
|
|
2450
2450
|
justify-content: space-between;
|
|
2451
|
-
`,children:[s(h,{direction:"row",justifyContent:"space-between",alignItems:"start",children:[s(h,{direction:"row",gap:"size-100",alignItems:"center",minWidth:0,children:[e(
|
|
2451
|
+
`,children:[s(h,{direction:"row",justifyContent:"space-between",alignItems:"start",children:[s(h,{direction:"row",gap:"size-100",alignItems:"center",minWidth:0,children:[e(ju,{gradientStartColor:d,gradientEndColor:p}),s(h,{direction:"column",minWidth:0,children:[e(te,{level:2,css:C`
|
|
2452
2452
|
overflow: hidden;
|
|
2453
2453
|
white-space: nowrap;
|
|
2454
2454
|
text-overflow: ellipsis;
|
|
2455
|
-
`,children:n.name}),e(
|
|
2455
|
+
`,children:n.name}),e(K,{color:"text-700",textSize:"small",fontStyle:"italic",children:f})]})]}),e(Vu,{projectId:n.id,projectName:n.name,onProjectDelete:a,onProjectClear:l,onProjectRemoveData:t})]}),s(h,{direction:"row",justifyContent:"space-between",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:pn(r)})]}),s(h,{direction:"column",flex:"none",children:[e(K,{elementType:"h3",textSize:"medium",color:"text-700",children:"Total Tokens"}),e(K,{textSize:"xlarge",children:pn(o)})]}),s(h,{direction:"column",flex:"none",children:[e(K,{elementType:"h3",textSize:"medium",color:"text-700",children:"Latency P50"}),u!=null?e(we,{latencyMs:u,textSize:"xlarge"}):e(K,{textSize:"xlarge",children:"--"})]})]})]})}const lr=function(){var n=[{kind:"Literal",name:"first",value:100},{kind:"Literal",name:"sort",value:{col:"createdAt",dir:"desc"}}];return{fragment:{argumentDefinitions:[],kind:"Fragment",metadata:null,name:"DatasetsPageQuery",selections:[{args:null,kind:"FragmentSpread",name:"DatasetsTable_datasets"}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[],kind:"Operation",name:"DatasetsPageQuery",selections:[{alias:null,args:n,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:'datasets(first:100,sort:{"col":"createdAt","dir":"desc"})'},{alias:null,args:n,filters:["sort"],handle:"connection",key:"DatasetsTable_datasets",kind:"LinkedHandle",name:"datasets"}]},params:{cacheID:"695b221e981c4795492d79faa7d007e4",id:null,metadata:{},name:"DatasetsPageQuery",operationKind:"query",text:`query DatasetsPageQuery {
|
|
2456
2456
|
...DatasetsTable_datasets
|
|
2457
2457
|
}
|
|
2458
2458
|
|
|
@@ -2477,13 +2477,13 @@ fragment DatasetsTable_datasets on Query {
|
|
|
2477
2477
|
}
|
|
2478
2478
|
}
|
|
2479
2479
|
}
|
|
2480
|
-
`}}}();
|
|
2481
|
-
`);return a.length>0?a[0].split(",").map(l=>l.trim()):[]}function
|
|
2480
|
+
`}}}();lr.hash="985853a7939f44c0cefdd1a91472c67e";function Uu(n){const a=n.split(`
|
|
2481
|
+
`);return a.length>0?a[0].split(",").map(l=>l.trim()):[]}function Bu(n){const{onDatasetCreated:a,onDatasetCreateError:l}=n,[t,i]=m.useState([]),{control:r,handleSubmit:o,resetField:u,formState:{isDirty:d,isValid:p}}=Fe({defaultValues:{name:"Dataset "+new Date().toISOString(),input_keys:[],output_keys:[],metadata_keys:[],description:"",metadata:{}}}),f=m.useCallback(c=>{const g=new FormData;return g.append("file",c.file[0]),g.append("name",c.name),g.append("description",c.description),g.append("metadata",JSON.stringify(c.metadata)),c.input_keys.forEach(y=>{g.append("input_keys[]",y)}),c.output_keys.forEach(y=>{g.append("output_keys[]",y)}),c.metadata_keys.forEach(y=>{g.append("metadata_keys[]",y)}),fetch("/v1/datasets/upload?sync=true",{method:"POST",body:g}).then(y=>{if(!y.ok)throw l(new Error(y.statusText||"Failed to create dataset"));return y.json()}).then(y=>{a({name:c.name,id:y.data.dataset_id})})},[l,a]);return s(ve,{onSubmit:o(f),children:[s("div",{css:C`
|
|
2482
2482
|
padding: var(--ac-global-dimension-size-200);
|
|
2483
2483
|
.ac-dropdown-button {
|
|
2484
2484
|
width: 100%;
|
|
2485
2485
|
}
|
|
2486
|
-
`,children:[e(
|
|
2486
|
+
`,children:[e(q,{name:"name",control:r,rules:{required:"field is required"},render:({field:{onChange:c,onBlur:g,value:y},fieldState:{invalid:k,error:b}})=>e(Z,{label:"Dataset Name",description:"The name of the dataset",errorMessage:b==null?void 0:b.message,validationState:k?"invalid":"valid",onChange:c,onBlur:g,value:y.toString()})}),e(q,{name:"description",control:r,render:({field:{onChange:c,onBlur:g,value:y},fieldState:{invalid:k,error:b}})=>e(da,{label:"description",placeholder:"Description of the dataset",isRequired:!1,height:100,errorMessage:b==null?void 0:b.message,validationState:k?"invalid":"valid",onChange:c,onBlur:g,value:y.toString()})}),e(q,{control:r,name:"file",rules:{required:"CSV file is required"},render:({field:{value:c,onChange:g,...y},fieldState:{invalid:k,error:b}})=>e(ua,{label:"CSV file",validationState:k?"invalid":"valid",errorMessage:b==null?void 0:b.message,children:e("input",{...y,onChange:v=>{var w;g(v.target.files),u("input_keys"),u("output_keys"),u("metadata_keys");const S=(w=v.target.files)==null?void 0:w[0];if(S){const I=new FileReader;I.onload=function(P){if(!P.target)return;const x=P.target.result,D=Uu(x);i(D)},I.readAsText(S)}},type:"file",id:"file",accept:".csv"})})}),e(q,{name:"input_keys",control:r,rules:{required:"field is required"},render:({field:{value:c,onChange:g},fieldState:{invalid:y,error:k}})=>e(Ta,{label:"input keys",validationState:y?"invalid":"valid",description:"the columns to use as input",columns:t,selectedColumns:c,onChange:g,errorMessage:k==null?void 0:k.message})}),e(q,{name:"output_keys",control:r,render:({field:{value:c,onChange:g},fieldState:{invalid:y,error:k}})=>e(Ta,{label:"output keys",validationState:y?"invalid":"valid",description:"the columns to use as output",columns:t,selectedColumns:c,onChange:g,errorMessage:k==null?void 0:k.message})}),e(q,{name:"metadata_keys",control:r,render:({field:{value:c,onChange:g},fieldState:{invalid:y,error:k}})=>e(Ta,{label:"metadata keys",validationState:y?"invalid":"valid",description:"the columns to use as metadata",columns:t,selectedColumns:c,onChange:g,errorMessage:k==null?void 0:k.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:!p,variant:d?"primary":"default",size:"compact",loading:!1,children:"Create Dataset"})})})]})}function Ta(n){const{columns:a,selectedColumns:l,onChange:t,label:i,validationState:r,description:o,errorMessage:u,...d}=n,p=a.length===0,f=m.useMemo(()=>p?"No columns to select":l.length>0?`${l.join(", ")}`:"No columns selected",[l,p]);return e(ua,{label:i,isDisabled:p,validationState:r,description:o,errorMessage:u,children:e(Oa,{isDisabled:p,...d,menu:e(Zn,{selectionMode:"multiple",onSelectionChange:c=>{t(Array.from(c))},selectedKeys:new Set(l),children:a.map(c=>e(W,{children:c},c))}),triggerProps:{placement:"bottom end"},children:f})})}const tr=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}
|
|
@@ -2512,17 +2512,17 @@ fragment DatasetsTable_datasets_dWkdd on Query {
|
|
|
2512
2512
|
}
|
|
2513
2513
|
}
|
|
2514
2514
|
}
|
|
2515
|
-
`}}}();
|
|
2515
|
+
`}}}();tr.hash="fa378bc7ec26f5e877e6cf90e5ee553d";const ir=function(){var n=["datasets"];return{argumentDefinitions:[{defaultValue:null,kind:"LocalArgument",name:"after"},{defaultValue:100,kind:"LocalArgument",name:"first"},{defaultValue:{col:"createdAt",dir:"desc"},kind:"LocalArgument",name:"sort"}],kind:"Fragment",metadata:{connection:[{count:"first",cursor:"after",direction:"forward",path:n}],refetch:{connection:{forward:{count:"first",cursor:"after"},backward:null,path:n},fragmentPathInResult:[],operation:tr}},name:"DatasetsTable_datasets",selections:[{alias:"datasets",args:[{kind:"Variable",name:"sort",variableName:"sort"}],concreteType:"DatasetConnection",kind:"LinkedField",name:"__DatasetsTable_datasets_connection",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}],type:"Query",abstractKey:null}}();ir.hash="fa378bc7ec26f5e877e6cf90e5ee553d";const rr=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"datasetId"}],a=[{alias:null,args:[{fields:[{kind:"Variable",name:"datasetId",variableName:"datasetId"}],kind:"ObjectValue",name:"input"}],concreteType:"DatasetMutationPayload",kind:"LinkedField",name:"deleteDataset",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null}],storageKey:null}];return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"DeleteDatasetDialogMutation",selections:a,type:"Mutation",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"DeleteDatasetDialogMutation",selections:a},params:{cacheID:"3d32b97acd630dd7dbc9c85a632a1d49",id:null,metadata:{},name:"DeleteDatasetDialogMutation",operationKind:"mutation",text:`mutation DeleteDatasetDialogMutation(
|
|
2516
2516
|
$datasetId: GlobalID!
|
|
2517
2517
|
) {
|
|
2518
2518
|
deleteDataset(input: {datasetId: $datasetId}) {
|
|
2519
2519
|
__typename
|
|
2520
2520
|
}
|
|
2521
2521
|
}
|
|
2522
|
-
`}}}();
|
|
2522
|
+
`}}}();rr.hash="7066cca7015a7e344b77862b0bdab21c";function Hu({datasetId:n,datasetName:a,onDatasetDelete:l,onDatasetDeleteError:t}){const[i,r]=T.useMutation(rr),o=m.useCallback(()=>{m.startTransition(()=>{i({variables:{datasetId:n},onCompleted:()=>{l()},onError:u=>{t(u)}})})},[i,n,l,t]);return s(U,{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 Gu({datasetName:n,datasetId:a,datasetDescription:l,datasetMetadata:t,onDatasetEdited:i,onDatasetEditError:r}){return e(U,{title:"Edit Dataset",size:"M",children:e(ho,{datasetName:n,datasetId:a,datasetDescription:l,datasetMetadata:t,onDatasetEdited:i,onDatasetEditError:r})})}function Wu(n){const{datasetId:a,datasetName:l,datasetDescription:t,datasetMetadata:i,onDatasetDelete:r,onDatasetDeleteError:o,onDatasetEdit:u,onDatasetEditError:d}=n,[p,f]=m.useState(null),c=m.useCallback(()=>{f(e(Hu,{datasetId:a,datasetName:l,onDatasetDelete:()=>{r(),f(null)},onDatasetDeleteError:o}))},[a,l,r,o]),g=m.useCallback(()=>{f(e(Gu,{datasetId:a,datasetName:l,datasetDescription:t,datasetMetadata:i,onDatasetEdited:()=>{u(),f(null)},onDatasetEditError:d}))},[t,a,i,l,u,d]);return s("div",{onClick:y=>{y.preventDefault(),y.stopPropagation()},children:[s(Oe,{align:"end",buttonSize:"compact",onAction:y=>{switch(y){case"deleteDataset":c();break;case"editDataset":g();break}},children:[e(W,{children:s(h,{direction:"row",gap:"size-75",justifyContent:"start",alignItems:"center",children:[e(E,{svg:e(L.TrashOutline,{})}),e(K,{children:"Delete"})]})},"deleteDataset"),e(W,{children:s(h,{direction:"row",gap:"size-75",justifyContent:"start",alignItems:"center",children:[e(E,{svg:e(L.Edit2Outline,{})}),e(K,{children:"Edit"})]})},"editDataset")]}),e(G,{type:"modal",isDismissable:!0,onDismiss:()=>f(null),children:p})]})}const yl=100;function Ju(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 Zu(n){const[a,l]=m.useState([]),t=m.useRef(null),i=ee(),r=ie(),o=de(),{data:u,loadNext:d,hasNext:p,isLoadingNext:f,refetch:c}=T.usePaginationFragment(ir,n.query),g=m.useMemo(()=>u.datasets.edges.map(S=>S.node),[u]),y=Ce.useCallback(S=>{if(S){const{scrollHeight:w,scrollTop:I,clientHeight:P}=S;w-I-P<300&&!f&&p&&d(yl)}},[p,f,d]),k=me({columns:[{header:"name",accessorKey:"name",cell:({row:S})=>{const I=S.original.experimentCount>0?`${S.original.id}/experiments`:`${S.original.id}/examples`;return e(He,{to:I,children:S.original.name})}},{header:"description",accessorKey:"description",enableSorting:!1},{header:"created at",accessorKey:"createdAt",cell:ke},{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:Tn},{header:"",id:"actions",enableSorting:!1,size:10,cell:({row:S})=>e(Wu,{datasetId:S.original.id,datasetName:S.original.name,datasetDescription:S.original.description,datasetMetadata:S.original.metadata,onDatasetEdit:()=>{r({title:"Dataset updated",message:`${S.original.name} has been successfully updated.`}),c({},{fetchPolicy:"store-and-network"})},onDatasetEditError:w=>{o({title:"Dataset update failed",message:w.message})},onDatasetDelete:()=>{r({title:"Dataset deleted",message:`${S.original.name} has been successfully deleted.`}),c({},{fetchPolicy:"store-and-network"})},onDatasetDeleteError:w=>{o({title:"Dataset deletion failed",message:w.message})}})}],data:g,state:{sorting:a},getCoreRowModel:ge(),getSortedRowModel:wn(),onSortingChange:l,manualSorting:!0});m.useEffect(()=>{const S=a[0];m.startTransition(()=>{c({sort:S?Ju(S):{col:"createdAt",dir:"desc"},after:null,first:yl},{fetchPolicy:"store-and-network"})})},[a,c]);const b=k.getRowModel().rows,v=b.length===0;return e("div",{css:C`
|
|
2523
2523
|
flex: 1 1 auto;
|
|
2524
2524
|
overflow: auto;
|
|
2525
|
-
`,onScroll:S=>y(S.target),ref:t,children:s("table",{css:
|
|
2525
|
+
`,onScroll:S=>y(S.target),ref:t,children:s("table",{css:Nn,children:[e("thead",{children:k.getHeaderGroups().map(S=>e("tr",{children:S.headers.map(w=>{var I;return e("th",{colSpan:w.colSpan,children:w.isPlaceholder?null:s("div",{className:w.column.getCanSort()?"cursor-pointer":"",onClick:w.column.getToggleSortingHandler(),style:{textAlign:(I=w.column.columnDef.meta)==null?void 0:I.textAlign},children:[H(w.column.columnDef.header,w.getContext()),w.column.getIsSorted()?e(E,{className:"sort-icon",svg:w.column.getIsSorted()==="asc"?e(L.ArrowUpFilled,{}):e(L.ArrowDownFilled,{})}):null]})},w.id)})},S.id))}),v?e(Be,{}):e("tbody",{children:b.map(S=>e("tr",{onClick:()=>{const I=S.original.experimentCount>0?`${S.original.id}/experiments`:`${S.original.id}/examples`;i(I)},children:S.getVisibleCells().map(w=>{var I;return e("td",{align:(I=w.column.columnDef.meta)==null?void 0:I.textAlign,children:H(w.column.columnDef.cell,w.getContext())},w.id)})},S.id))})]})})}function Yg(){return e(m.Suspense,{fallback:e(ue,{}),children:e(Xu,{})})}function Xu(){const[n,a]=m.useState(0),l=T.useLazyLoadQuery(lr,{},{fetchKey:n,fetchPolicy:"store-and-network"}),t=m.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(te,{level:1,children:"Datasets"}),e(Yu,{onDatasetCreated:t})]})}),e(Zu,{query:l})]})}function Yu({onDatasetCreated:n}){const a=ee(),l=ie(),t=de(),[i,r]=m.useState(null),o=()=>{r(e(U,{size:"S",title:"New Dataset",children:e(Ha,{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})}})}))},u=()=>{r(e(U,{size:"M",title:"New Dataset from CSV",children:e(Bu,{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(j,{children:[s(Oe,{buttonText:"Create Dataset",align:"end",icon:e(E,{svg:e(L.DatabaseOutline,{})}),onAction:d=>{switch(d){case"newDataset":o();break;case"datasetFromCSV":u();break}},children:[e(W,{children:"New Dataset"},"newDataset"),e(W,{children:"Dataset from CSV"},"datasetFromCSV")]}),e(G,{type:"modal",isDismissable:!0,onDismiss:()=>r(null),children:i})]})}const sr=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) {
|
|
@@ -2541,17 +2541,17 @@ fragment DatasetsTable_datasets_dWkdd on Query {
|
|
|
2541
2541
|
}
|
|
2542
2542
|
}
|
|
2543
2543
|
}
|
|
2544
|
-
`}}}();
|
|
2544
|
+
`}}}();sr.hash="a1349b92d8b0c745f5e8039c55b048c7";const em=n=>{const a=(l,t)=>({...n,isRefreshingLatestVersion:!1,refreshLatestVersion:async()=>{const i=t();l({isRefreshingLatestVersion:!0});const r=await nm({datasetId:i.datasetId});l({latestVersion:r,isRefreshingLatestVersion:!1})}});return hs()(ks(a))};async function nm({datasetId:n}){var i;const a=await T.fetchQuery(Ke,sr,{datasetId:n}).toPromise(),l=(i=a==null?void 0:a.dataset.latestVersions)==null?void 0:i.edges;return l&&l.length&&l[0].version||null}const or=m.createContext(null);function am({children:n,...a}){const l=m.useRef();return l.current||(l.current=em(a)),e(or.Provider,{value:l.current,children:n})}function fn(n,a){const l=m.useContext(or);if(!l)throw new Error("Missing DatasetContext.Provider in the tree");return za(l,n,a)}const dr=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,kind:"ScalarField",name:"__typename",storageKey:null}],storageKey:null}];return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"AddDatasetExampleDialogMutation",selections:a,type:"Mutation",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"AddDatasetExampleDialogMutation",selections:a},params:{cacheID:"718cf02ccb39b279132822bf503e51e6",id:null,metadata:{},name:"AddDatasetExampleDialogMutation",operationKind:"mutation",text:`mutation AddDatasetExampleDialogMutation(
|
|
2545
2545
|
$input: AddExamplesToDatasetInput!
|
|
2546
2546
|
) {
|
|
2547
2547
|
addExamplesToDataset(input: $input) {
|
|
2548
2548
|
__typename
|
|
2549
2549
|
}
|
|
2550
2550
|
}
|
|
2551
|
-
`}}}();
|
|
2551
|
+
`}}}();dr.hash="8d99470f590cd5d28701fa6e3c0330e6";const Ia={backgroundColor:"light",borderColor:"light",collapsible:!0,bodyStyle:{padding:0}};function lm(n){const{datasetId:a,onCompleted:l}=n,[t,i]=m.useState(null),[r,o]=T.useMutation(dr),{control:u,setError:d,handleSubmit:p,formState:{isValid:f}}=Fe({defaultValues:{input:"{}",output:"{}",metadata:"{}"}}),c=m.useCallback(g=>{if(i(null),!Re(g==null?void 0:g.input))return d("input",{message:"Input must be a valid JSON object"});if(!Re(g==null?void 0:g.output))return d("output",{message:"Output must be a valid JSON object"});if(!Re(g==null?void 0:g.metadata))return d("metadata",{message:"Metadata must be a valid JSON object"});r({variables:{input:{datasetId:a,examples:[{input:JSON.parse(g.input),output:JSON.parse(g.output),metadata:JSON.parse(g.metadata)}],datasetVersionDescription:g.description}},onCompleted:()=>{l()},onError:y=>{i(y.message)}})},[r,a,d,l]);return s(U,{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(
|
|
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(Y,{variant:"danger",children:t}):null,e(q,{control:u,name:"input",render:({field:{onChange:g,onBlur:y,value:k},fieldState:{invalid:b,error:v}})=>s(z,{title:"Input",subTitle:"The input to the LLM, retriever, program, etc.",...Ia,children:[b?e(Y,{variant:"danger",banner:!0,children:v==null?void 0:v.message}):null,e(Me,{value:k,onChange:g,onBlur:y})]})}),e(q,{control:u,name:"output",render:({field:{onChange:g,onBlur:y,value:k},fieldState:{invalid:b,error:v}})=>s(z,{title:"Output",subTitle:"The output of the LLM or program to be used as an expected output",...Ia,backgroundColor:"green-100",borderColor:"green-700",children:[b?e(Y,{variant:"danger",banner:!0,children:v==null?void 0:v.message}):null,e(Me,{value:k,onChange:g,onBlur:y})]})}),e(q,{control:u,name:"metadata",render:({field:{onChange:g,onBlur:y,value:k},fieldState:{invalid:b,error:v}})=>s(z,{title:"Metadata",subTitle:"All data from the span to use during experimentation or evaluation",...Ia,children:[b?e(Y,{variant:"danger",banner:!0,children:v==null?void 0:v.message}):null,e(Me,{value:k,onChange:g,onBlur:y})]})}),e(q,{control:u,name:"description",render:({field:{onChange:g,onBlur:y,value:k},fieldState:{invalid:b,error:v}})=>e(da,{label:"Version Description",value:k,onChange:g,onBlur:y,errorMessage:v==null?void 0:v.message,validationState:b?"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:p(c),children:"Add Example"})})})]})}function tm(n){const{datasetId:a,onAddExampleCompleted:l}=n,[t,i]=m.useState(null),r=m.useCallback(()=>{i(e(lm,{datasetId:a,onCompleted:()=>{l(),i(null)}}))},[a,l]);return s(j,{children:[e(M,{icon:e(E,{svg:e(L.PlusCircleOutline,{})}),size:"compact",variant:"default",onClick:r,children:"Add Example"}),e(G,{isDismissable:!0,onDismiss:()=>{i(null)},children:t})]})}function im(){const n=fn(i=>i.datasetId),a=fn(i=>i.latestVersion);let l=`${Ea}/v1/datasets/${n}/examples`;a&&(l+=`?version-id=${a.id}`);const t=m.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,12 +2561,12 @@ 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(
|
|
2564
|
+
`,children:s(hn,{placement:"bottom right",children:[e(Ll,{addonBefore:e(E,{svg:e(L.Code,{})}),children:"Code"}),e(Qa,{children:s("section",{css:C`
|
|
2565
2565
|
width: 500px;
|
|
2566
2566
|
.ac-field {
|
|
2567
2567
|
flex: 1 1 auto;
|
|
2568
2568
|
}
|
|
2569
|
-
`,children:[e(
|
|
2569
|
+
`,children:[e(F,{padding:"size-200",children:s(ve,{children:[s(h,{direction:"row",gap:"size-100",alignItems:"end",width:"100%",children:[e(Z,{label:"Dataset ID",isReadOnly:!0,value:n}),e(ne,{text:n,size:"normal"})]}),s(h,{direction:"row",gap:"size-100",alignItems:"end",children:[e(Z,{label:"Version ID",isReadOnly:!0,value:(a==null?void 0:a.id)||"No Versions",validationState:a?"valid":"invalid"}),e(ne,{text:(a==null?void 0:a.id)||"No Versions",disabled:!a,size:"normal"})]})]})}),s(Se,{children:[e(B,{name:"Python",children:e(F,{margin:"size-200",borderColor:"light",borderWidth:"thin",borderRadius:"small",children:e(cn,{value:t})})}),e(B,{name:"REST",children:e(F,{padding:"size-200",children:e(ve,{children:s(h,{direction:"row",gap:"size-100",alignItems:"end",children:[e(Z,{label:"URL",isReadOnly:!0,value:l}),e(ne,{text:l,size:"normal"})]})})})})]})]})})]})})}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={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:"DatasetHistoryDialogQuery",selections:[{alias:"dataset",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{kind:"InlineFragment",selections:[l,{args:null,kind:"FragmentSpread",name:"DatasetHistoryTable_versions"}],type:"Dataset",abstractKey:null}],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"DatasetHistoryDialogQuery",selections:[{alias:"dataset",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[t,{kind:"TypeDiscriminator",abstractKey:"__isNode"},l,{kind:"InlineFragment",selections:[{alias:null,args:i,concreteType:"DatasetVersionConnection",kind:"LinkedField",name:"versions",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:[l,{alias:null,args:null,kind:"ScalarField",name:"description",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"createdAt",storageKey:null},t],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:"versions(first:100)"},{alias:null,args:i,filters:null,handle:"connection",key:"DatasetHistoryTable_versions",kind:"LinkedHandle",name:"versions"}],type:"Dataset",abstractKey:null}],storageKey:null}]},params:{cacheID:"df94b4e72c0187fd0fd1c8416af19354",id:null,metadata:{},name:"DatasetHistoryDialogQuery",operationKind:"query",text:`query DatasetHistoryDialogQuery(
|
|
2570
2570
|
$datasetId: GlobalID!
|
|
2571
2571
|
) {
|
|
2572
2572
|
dataset: node(id: $datasetId) {
|
|
@@ -2598,7 +2598,7 @@ fragment DatasetHistoryTable_versions on Dataset {
|
|
|
2598
2598
|
}
|
|
2599
2599
|
id
|
|
2600
2600
|
}
|
|
2601
|
-
`}}}();
|
|
2601
|
+
`}}}();cr.hash="7215c18bda690418c5ecbcb3131a288e";const ur=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};return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"DatasetHistoryTableVersionsQuery",selections:[{alias:null,args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{args:l,kind:"FragmentSpread",name:"DatasetHistoryTable_versions"}],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"DatasetHistoryTableVersionsQuery",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:"DatasetVersionConnection",kind:"LinkedField",name:"versions",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:[i,{alias:null,args:null,kind:"ScalarField",name:"description",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"createdAt",storageKey:null},t],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:l,filters:null,handle:"connection",key:"DatasetHistoryTable_versions",kind:"LinkedHandle",name:"versions"}],type:"Dataset",abstractKey:null}],storageKey:null}]},params:{cacheID:"e8e3a05b4e86c8eaeea98172405fdc7e",id:null,metadata:{},name:"DatasetHistoryTableVersionsQuery",operationKind:"query",text:`query DatasetHistoryTableVersionsQuery(
|
|
2602
2602
|
$after: String = null
|
|
2603
2603
|
$first: Int = 100
|
|
2604
2604
|
$id: GlobalID!
|
|
@@ -2629,31 +2629,33 @@ fragment DatasetHistoryTable_versions_2HEEH6 on Dataset {
|
|
|
2629
2629
|
}
|
|
2630
2630
|
id
|
|
2631
2631
|
}
|
|
2632
|
-
`}}}();
|
|
2632
|
+
`}}}();ur.hash="37e453bc58759a1e89bc5862c460de6b";const mr=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:ur,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}}();mr.hash="37e453bc58759a1e89bc5862c460de6b";const rm=100;function sm(n){const a=m.useRef(null),{data:l,loadNext:t,hasNext:i,isLoadingNext:r}=T.usePaginationFragment(mr,n.dataset),o=m.useMemo(()=>l.versions.edges.map(c=>c.node),[l]),u=Ce.useCallback(c=>{if(c){const{scrollHeight:g,scrollTop:y,clientHeight:k}=c;g-y-k<300&&!r&&i&&t(rm)}},[i,r,t]),d=me({columns:[{header:"version ID",accessorKey:"id"},{header:"description",accessorKey:"description"},{header:"created at",accessorKey:"createdAt",cell:ke}],data:o,getCoreRowModel:ge(),getSortedRowModel:wn()}),p=d.getRowModel().rows,f=p.length===0;return e("div",{css:C`
|
|
2633
2633
|
flex: 1 1 auto;
|
|
2634
2634
|
overflow: auto;
|
|
2635
|
-
`,onScroll:
|
|
2635
|
+
`,onScroll:c=>u(c.target),ref:a,children:s("table",{css:Ue,children:[e("thead",{children:d.getHeaderGroups().map(c=>e("tr",{children:c.headers.map(g=>e("th",{colSpan:g.colSpan,children:g.isPlaceholder?null:s("div",{className:g.column.getCanSort()?"cursor-pointer":"",onClick:g.column.getToggleSortingHandler(),style:{left:g.getStart(),width:g.getSize()},children:[H(g.column.columnDef.header,g.getContext()),g.column.getIsSorted()?e(E,{className:"sort-icon",svg:g.column.getIsSorted()==="asc"?e(L.ArrowUpFilled,{}):e(L.ArrowDownFilled,{})}):null]})},g.id))},c.id))}),f?e(Be,{}):e("tbody",{children:p.map(c=>e("tr",{children:c.getVisibleCells().map(g=>e("td",{children:H(g.column.columnDef.cell,g.getContext())},g.id))},c.id))})]})})}function om(n){const{datasetId:a}=n,l=T.useLazyLoadQuery(cr,{datasetId:a});return e(U,{size:"L",title:"Dataset History",children:e("div",{css:C`
|
|
2636
2636
|
height: 500px;
|
|
2637
|
-
`,children:e(
|
|
2637
|
+
`,children:e(sm,{dataset:l.dataset})})})}function dm(n){const{datasetId:a}=n,[l,t]=m.useState(null);return s(j,{children:[s(Le,{children:[e(M,{variant:"default",icon:e(E,{svg:e(L.ClockOutline,{})}),"aria-label":"Version History",onClick:()=>{t(e(om,{datasetId:a}))}}),e(Hn,{children:"Dataset Version History"})]}),e(m.Suspense,{fallback:null,children:e(G,{type:"modal",isDismissable:!0,onDismiss:()=>{t(null)},children:l})})]})}const cm=`pip install arize-phoenix>=${window.Config.platformVersion}`;function um({isAuthEnabled:n}){let a=`import os
|
|
2638
2638
|
# Set the phoenix collector endpoint. Commonly http://localhost:6060
|
|
2639
|
-
os.environ["PHOENIX_COLLECTOR_ENDPOINT"] = "<your-phoenix-url>"
|
|
2639
|
+
os.environ["PHOENIX_COLLECTOR_ENDPOINT"] = "<your-phoenix-url>"`;return n&&(a+=`
|
|
2640
|
+
# Configure access
|
|
2641
|
+
os.environ["PHOENIX_API_KEY"] = "<your-api-key>"`),a}const mm=`from phoenix.experiments.types import Example
|
|
2640
2642
|
# Define your task
|
|
2641
2643
|
# Typically should be an LLM call or a call to your application
|
|
2642
2644
|
def my_task(example: Example) -> str:
|
|
2643
2645
|
# This is just an example of how to return a JSON serializable value
|
|
2644
|
-
return f"Hello {example.input["person"]}"`,
|
|
2646
|
+
return f"Hello {example.input["person"]}"`,gm=`# Define an evaluator. This just an example.
|
|
2645
2647
|
def exact_match(input, output) -> float:
|
|
2646
2648
|
return 1.0 if output is f"Hello {input}" else 0.0
|
|
2647
2649
|
|
|
2648
2650
|
# Store the evaluators for later use
|
|
2649
|
-
evaluators = [exact_match]`,
|
|
2651
|
+
evaluators = [exact_match]`,pm=`# Run an experiment
|
|
2650
2652
|
from phoenix.experiments import run_experiment
|
|
2651
2653
|
|
|
2652
|
-
experiment = run_experiment(dataset, my_task, evaluators=evaluators)`;function
|
|
2654
|
+
experiment = run_experiment(dataset, my_task, evaluators=evaluators)`;function gr(){const[n,a]=m.useState(null),l=m.useCallback(()=>{a(e(U,{title:"Run Experiment",size:"XL",children:e(ym,{})}))},[]);return s(j,{children:[e(M,{size:"compact",variant:"default",icon:e(E,{svg:e(L.ExperimentOutline,{})}),onClick:l,children:"Run Experiment"}),e(G,{isDismissable:!0,type:"slideOver",onDismiss:()=>{a(null)},children:n})]})}function ym(){const n=fn(i=>i.datasetName),a=fn(i=>i.latestVersion),l=window.Config.authenticationEnabled,t=m.useMemo(()=>`import phoenix as px
|
|
2653
2655
|
# Initialize a phoenix client
|
|
2654
2656
|
client = px.Client()
|
|
2655
2657
|
# Get the current dataset version. You can omit the version for the latest.
|
|
2656
|
-
dataset = client.get_dataset(name="${n}"${a?`, version_id="${a.id}"`:""})`,[n,a]);return s(
|
|
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(Sn,{children:e(cn,{value:cm})}),e(F,{paddingTop:"size-100",paddingBottom:"size-100",children:e(K,{children:"Point to a running instance of Phoenix"})}),e(Sn,{children:e(cn,{value:um({isAuthEnabled:l})})}),e(ko,{children:e(F,{paddingBottom:"size-100",paddingTop:"size-100",children:e(Gl,{fallback:s(K,{children:["Your personal API keys can be created and managed on your"," ",e(ze,{href:"/profile",children:"Profile"})]}),children:s(K,{children:["System API keys can be created and managed in"," ",e(ze,{href:"/settings",children:"Settings"})]})})})}),e(F,{paddingTop:"size-100",paddingBottom:"size-100",children:e(K,{children:"Pull down this dataset"})}),e(Sn,{children:e(cn,{value:t})}),e(F,{paddingTop:"size-100",paddingBottom:"size-100",children:e(K,{children:"Define your task"})}),e(Sn,{children:e(cn,{value:mm})}),e(F,{paddingTop:"size-100",paddingBottom:"size-100",children:e(K,{children:"Define evaluators"})}),e(Sn,{children:e(cn,{value:gm})}),e(F,{paddingTop:"size-100",paddingBottom:"size-100",children:e(K,{children:"Run an experiment"})}),e(Sn,{children:e(cn,{value:pm})})]})}function ep(){const n=An(),a=m.useMemo(()=>{const l=n.dataset.latestVersions;return l!=null&&l.edges&&l.edges.length?l.edges[0].version:null},[n]);return e(am,{datasetId:n.dataset.id,datasetName:n.dataset.name,latestVersion:a,children:e(m.Suspense,{fallback:e(ue,{}),children:e(hm,{dataset:n.dataset})})})}const fm=C`
|
|
2657
2659
|
flex: 1 1 auto;
|
|
2658
2660
|
display: flex;
|
|
2659
2661
|
flex-direction: column;
|
|
@@ -2679,7 +2681,7 @@ dataset = client.get_dataset(name="${n}"${a?`, version_id="${a.id}"`:""})`,[n,a]
|
|
|
2679
2681
|
}
|
|
2680
2682
|
}
|
|
2681
2683
|
}
|
|
2682
|
-
`;function
|
|
2684
|
+
`;function hm({dataset:n}){const a=n.id,l=fn(d=>d.refreshLatestVersion),t=ie(),i=ee(),r=m.useCallback(d=>{d===0?i(`/datasets/${a}/experiments`):d===1&&i(`/datasets/${a}/examples`)},[i,a]),u=bs().pathname.includes("examples")?1:0;return s("main",{css:fm,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(Oe,{align:"end",icon:e(E,{svg:e(L.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(W,{children:"Download CSV"},"csv"),e(W,{children:"Download OpenAI Fine-Tuning JSONL"},"openai-ft"),e(W,{children:"Download OpenAI Evals JSONL"},"openai-evals")]}),e(dm,{datasetId:n.id}),e(im,{}),e(gr,{}),e(tm,{datasetId:n.id,onAddExampleCompleted:()=>{t({title:"Example added",message:"The example has been added successfully and the version has been updated."}),l()}})]})]})}),s(Se,{onChange:r,defaultIndex:u,children:[e(B,{name:"Experiments",extra:e(Ne,{children:n.experimentCount}),children:e(m.Suspense,{children:e(De,{})})}),e(B,{name:"Examples",extra:e(Ne,{children:n.exampleCount}),children:e(m.Suspense,{children:e(De,{})})})]})]})}const pr=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(
|
|
2683
2685
|
$id: GlobalID!
|
|
2684
2686
|
) {
|
|
2685
2687
|
dataset: node(id: $id) {
|
|
@@ -2703,7 +2705,7 @@ dataset = client.get_dataset(name="${n}"${a?`, version_id="${a.id}"`:""})`,[n,a]
|
|
|
2703
2705
|
}
|
|
2704
2706
|
}
|
|
2705
2707
|
}
|
|
2706
|
-
`}}}();
|
|
2708
|
+
`}}}();pr.hash="469da2debdebd608c88a6ef83c2540aa";async function np(n){const{datasetId:a}=n.params;return await T.fetchQuery(Ke,pr,{id:a}).toPromise()}const yr=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},u={alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},d=[{kind:"Literal",name:"first",value:100}],p={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:[u,{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,p,{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},p],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:[u],storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"PageInfo",kind:"LinkedField",name:"pageInfo",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"endCursor",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"hasNextPage",storageKey:null}],storageKey:null}],storageKey:"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(
|
|
2707
2709
|
$exampleId: GlobalID!
|
|
2708
2710
|
) {
|
|
2709
2711
|
example: node(id: $exampleId) {
|
|
@@ -2773,14 +2775,14 @@ fragment ExampleExperimentRunsTableFragment on DatasetExample {
|
|
|
2773
2775
|
}
|
|
2774
2776
|
id
|
|
2775
2777
|
}
|
|
2776
|
-
`}}}();
|
|
2778
|
+
`}}}();yr.hash="65b1c049bacc1ef8739c61af32a9414c";const fr=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"input"}],a=[{alias:null,args:[{kind:"Variable",name:"input",variableName:"input"}],concreteType:"DatasetMutationPayload",kind:"LinkedField",name:"patchDatasetExamples",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null}],storageKey:null}];return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"EditExampleDialogMutation",selections:a,type:"Mutation",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"EditExampleDialogMutation",selections:a},params:{cacheID:"7217082d3d3796ecb60481d17133c351",id:null,metadata:{},name:"EditExampleDialogMutation",operationKind:"mutation",text:`mutation EditExampleDialogMutation(
|
|
2777
2779
|
$input: PatchDatasetExamplesInput!
|
|
2778
2780
|
) {
|
|
2779
2781
|
patchDatasetExamples(input: $input) {
|
|
2780
2782
|
__typename
|
|
2781
2783
|
}
|
|
2782
2784
|
}
|
|
2783
|
-
`}}}();
|
|
2785
|
+
`}}}();fr.hash="a5e0e601ed24ffaa37a99ba358f960d3";const La={backgroundColor:"light",borderColor:"light",collapsible:!0,bodyStyle:{padding:0}};function km(n){const{exampleId:a,onCompleted:l}=n,[t,i]=m.useState(null),[r,o]=T.useMutation(fr),{control:u,setError:d,handleSubmit:p,formState:{isValid:f}}=Fe({defaultValues:n.currentRevision}),c=m.useCallback(g=>{if(i(null),!Re(g==null?void 0:g.input))return d("input",{message:"Input must be a valid JSON object"});if(!Re(g==null?void 0:g.output))return d("output",{message:"Output must be a valid JSON object"});if(!Re(g==null?void 0:g.metadata))return d("metadata",{message:"Metadata must be a valid JSON object"});r({variables:{input:{patches:[{exampleId:a,input:JSON.parse(g.input),output:JSON.parse(g.output),metadata:JSON.parse(g.metadata)}],versionDescription:g.description}},onCompleted:()=>{l()},onError:y=>{i(y.message)}})},[r,a,d,l]);return e(U,{size:"fullscreen",title:`Edit Example: ${a}`,extra:e(M,{variant:"primary",size:"compact",disabled:!f||o,loading:o,onClick:p(c),children:"Save Changes"}),children:e("div",{css:C`
|
|
2784
2786
|
overflow-y: auto;
|
|
2785
2787
|
padding: var(--ac-global-dimension-size-400);
|
|
2786
2788
|
/* Make widths configurable */
|
|
@@ -2791,7 +2793,7 @@ fragment ExampleExperimentRunsTableFragment on DatasetExample {
|
|
|
2791
2793
|
width: 100%;
|
|
2792
2794
|
}
|
|
2793
2795
|
}
|
|
2794
|
-
`,children:e(h,{direction:"row",justifyContent:"center",children: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(Y,{variant:"danger",children:t}):null,e(q,{control:u,name:"input",render:({field:{onChange:g,onBlur:y,value:k},fieldState:{invalid:b,error:v}})=>s(z,{title:"Input",subTitle:"The input to the LLM, retriever, program, etc.",...La,children:[b?e(Y,{variant:"danger",banner:!0,children:v==null?void 0:v.message}):null,e(Me,{value:k,onChange:g,onBlur:y})]})}),e(q,{control:u,name:"output",render:({field:{onChange:g,onBlur:y,value:k},fieldState:{invalid:b,error:v}})=>s(z,{title:"Output",subTitle:"The output of the LLM or program to be used as an expected output",...La,backgroundColor:"green-100",borderColor:"green-700",children:[b?e(Y,{variant:"danger",banner:!0,children:v==null?void 0:v.message}):null,e(Me,{value:k,onChange:g,onBlur:y})]})}),e(q,{control:u,name:"metadata",render:({field:{onChange:g,onBlur:y,value:k},fieldState:{invalid:b,error:v}})=>s(z,{title:"Metadata",subTitle:"All data from the span to use during experimentation or evaluation",...La,children:[b?e(Y,{variant:"danger",banner:!0,children:v==null?void 0:v.message}):null,e(Me,{value:k,onChange:g,onBlur:y})]})}),e(q,{control:u,name:"description",render:({field:{onChange:g,onBlur:y,value:k},fieldState:{invalid:b,error:v}})=>e(da,{label:"Revision Description",value:k,onChange:g,onBlur:y,errorMessage:v==null?void 0:v.message,validationState:b?"invalid":"valid",placeholder:"A description of the changes made in this revision. Will be displayed in the version history.",height:100})})]})})})})})}function bm(n){const{onCompleted:a,...l}=n,[t,i]=m.useState(null);return s(j,{children:[e(M,{variant:"default",size:"compact",icon:e(E,{svg:e(L.EditOutline,{})}),onClick:()=>i(e(km,{...l,onCompleted:()=>{i(null),a()}})),children:"Edit Example"}),e(G,{type:"slideOver",isDismissable:!0,onDismiss:()=>i(null),children:t})]})}const hr=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(
|
|
2795
2797
|
$after: String = null
|
|
2796
2798
|
$first: Int = 100
|
|
2797
2799
|
$id: GlobalID!
|
|
@@ -2846,22 +2848,22 @@ fragment ExampleExperimentRunsTableFragment_2HEEH6 on DatasetExample {
|
|
|
2846
2848
|
}
|
|
2847
2849
|
id
|
|
2848
2850
|
}
|
|
2849
|
-
`}}}();
|
|
2851
|
+
`}}}();hr.hash="6ca0f938b309407e8c184a1c13d1c52d";const kr=function(){var n=["experimentRuns"],a={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},l={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{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:hr,identifierInfo:{identifierField:"id",identifierQueryVariableName:"id"}}},name:"ExampleExperimentRunsTableFragment",selections:[{alias:"experimentRuns",args:null,concreteType:"ExperimentRunConnection",kind:"LinkedField",name:"__ExampleExperimentRunsTable_experimentRuns_connection",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:[a,{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},l,{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:[a,{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},l],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:[{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},a],type:"DatasetExample",abstractKey:null}}();kr.hash="6ca0f938b309407e8c184a1c13d1c52d";const Sm=100;function vm(){return e("tbody",{className:"is-empty",children:e("tr",{children:e("td",{colSpan:100,css:n=>C`
|
|
2850
2852
|
text-align: center;
|
|
2851
2853
|
padding: ${n.spacing.margin24}px ${n.spacing.margin24}px !important;
|
|
2852
|
-
`,children:"No experiments have been run for this example."})})})}const
|
|
2854
|
+
`,children:"No experiments have been run for this example."})})})}const Cm=C`
|
|
2853
2855
|
display: flex;
|
|
2854
2856
|
flex-direction: row;
|
|
2855
2857
|
align-items: center;
|
|
2856
2858
|
color: var(--ac-global-color-primary);
|
|
2857
2859
|
gap: var(--ac-global-dimension-size-50);
|
|
2858
|
-
`;function
|
|
2860
|
+
`;function Fm({example:n}){const a=m.useRef(null),l=ee(),{data:t,loadNext:i,hasNext:r,isLoadingNext:o}=T.usePaginationFragment(kr,n),u=m.useMemo(()=>t.experimentRuns.edges.map(y=>{let k=null;return y.run.startTime&&y.run.endTime&&(k=new Date(y.run.endTime).getTime()-new Date(y.run.startTime).getTime()),{...y.run,output:JSON.stringify(y.run.output),latencyMs:k}}),[t]),p=me({columns:[{header:"start time",accessorKey:"startTime",cell:ke},{header:"output",accessorKey:"output",cell:y=>{var b;const k=(b=y.row.original)==null?void 0:b.error;return k!==null?e(K,{color:"danger",children:k}):e(se,{...y})}},{header:"latency",accessorKey:"latencyMs",cell:({getValue:y})=>{const k=y();return k===null||typeof k!="number"?"--":e(we,{latencyMs:k})}},{header:"evaluations",accessorKey:"annotations",cell:({row:y})=>e(h,{direction:"row",gap:"size-50",wrap:"wrap",children:y.original.annotations.edges.map((k,b)=>{const v=k.annotation;return e(na,{annotation:v,extra:v.trace&&e(F,{paddingTop:"size-100",children:s("div",{css:Cm,children:[e(E,{svg:e(L.InfoOutline,{})}),e("span",{children:"Click to view evaluator trace"})]})}),children:e(bn,{annotation:v,onClick:()=>{v.trace&&l(`/projects/${v.trace.projectId}/traces/${v.trace.traceId}`)}},b)},b)})})},{id:"actions",cell:({row:y})=>{const k=y.original.trace;if(k)return e(M,{variant:"default",size:"compact",icon:e(E,{svg:e(L.Trace,{})}),onClick:()=>{l(`/projects/${k.projectId}/traces/${k.traceId}`)},"aria-label":"view trace"})}}],data:u,getCoreRowModel:ge()}),f=p.getRowModel().rows,c=f.length===0,g=m.useCallback(y=>{if(y){const{scrollHeight:k,scrollTop:b,clientHeight:v}=y;k-b-v<300&&!o&&r&&i(Sm)}},[r,o,i]);return e("div",{css:C`
|
|
2859
2861
|
flex: 1 1 auto;
|
|
2860
2862
|
overflow: auto;
|
|
2861
|
-
`,ref:a,onScroll:y=>
|
|
2863
|
+
`,ref:a,onScroll:y=>g(y.target),children:s("table",{css:Nn,children:[e("thead",{children:p.getHeaderGroups().map(y=>e("tr",{children:y.headers.map(k=>e("th",{children:e("div",{children:H(k.column.columnDef.header,k.getContext())})},k.id))},y.id))}),c?e(vm,{}):e("tbody",{children:f.map(y=>e("tr",{children:y.getVisibleCells().map(k=>e("td",{children:H(k.column.columnDef.cell,k.getContext())},k.id))},y.id))})]})})}function br({exampleId:n,onDismiss:a}){const[l,t]=m.useState(0),i=T.useLazyLoadQuery(yr,{exampleId:n},{fetchKey:l,fetchPolicy:"store-and-network"}),r=m.useMemo(()=>{const g=i.example.latestRevision;return{input:JSON.stringify(g==null?void 0:g.input,null,2),output:JSON.stringify(g==null?void 0:g.output,null,2),metadata:JSON.stringify(g==null?void 0:g.metadata,null,2)}},[i]),o=m.useMemo(()=>{const g=i.example.span;return g?{id:g.id,traceId:g.context.traceId,projectId:g.project.id}:null},[i]),{input:u,output:d,metadata:p}=r,f=ee(),c=ie();return e(G,{type:"slideOver",isDismissable:!0,onDismiss:a,children:e(U,{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(bm,{exampleId:n,currentRevision:r,onCompleted:()=>{c({title:"Example updated",message:`Example ${n} has been updated.`}),t(g=>g+1)}})]}),children:s(Ge,{direction:"vertical",autoSaveId:"example-panel-group",children:[e(re,{defaultSize:200,children:e("div",{css:C`
|
|
2862
2864
|
overflow-y: auto;
|
|
2863
2865
|
height: 100%;
|
|
2864
|
-
`,children:e(h,{direction:"row",justifyContent:"center",children:e(
|
|
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(z,{title:"Input",...wa,extra:e(ne,{text:u}),children:e(mn,{value:u})}),e(z,{title:"Output",...wa,extra:e(ne,{text:d}),children:e(mn,{value:d})}),e(z,{title:"Metadata",...wa,extra:e(ne,{text:p}),children:e(mn,{value:p})})]})})})})}),e(We,{css:kn}),e(re,{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(te,{level:3,children:"Experiment Runs"})}),e(Fm,{example:i.example})]})})]})})})}const wa={backgroundColor:"light",borderColor:"light",variant:"compact",collapsible:!0,bodyStyle:{padding:0}};function ap(){const{exampleId:n,datasetId:a}=Ye(),l=ee();return e(br,{exampleId:n,onDismiss:()=>{l(`/datasets/${a}/examples`)}})}const Sr=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(
|
|
2865
2867
|
$id: GlobalID!
|
|
2866
2868
|
) {
|
|
2867
2869
|
dataset: node(id: $id) {
|
|
@@ -2894,7 +2896,7 @@ fragment ExamplesTableFragment on Dataset {
|
|
|
2894
2896
|
}
|
|
2895
2897
|
id
|
|
2896
2898
|
}
|
|
2897
|
-
`}}}();
|
|
2899
|
+
`}}}();Sr.hash="6406bbf43a2e850b384ba9573d8e69de";async function lp(n){const{datasetId:a}=n.params;return await T.fetchQuery(Ke,Sr,{id:a}).toPromise()}const vr=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(
|
|
2898
2900
|
$after: String = null
|
|
2899
2901
|
$datasetVersionId: GlobalID
|
|
2900
2902
|
$first: Int = 100
|
|
@@ -2931,7 +2933,7 @@ fragment ExamplesTableFragment_4a6F8Z on Dataset {
|
|
|
2931
2933
|
}
|
|
2932
2934
|
id
|
|
2933
2935
|
}
|
|
2934
|
-
`}}}();
|
|
2936
|
+
`}}}();vr.hash="e04e697cdb44ab2dd115f4562211f6a4";const Cr=function(){var n=["examples"],a={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null};return{argumentDefinitions:[{defaultValue:null,kind:"LocalArgument",name:"after"},{defaultValue:null,kind:"LocalArgument",name:"datasetVersionId"},{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:vr,identifierInfo:{identifierField:"id",identifierQueryVariableName:"id"}}},name:"ExamplesTableFragment",selections:[{alias:"examples",args:[{kind:"Variable",name:"datasetVersionId",variableName:"datasetVersionId"}],concreteType:"DatasetExampleConnection",kind:"LinkedField",name:"__ExamplesTable_examples_connection",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:[a,{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:[{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},a],type:"Dataset",abstractKey:null}}();Cr.hash="e04e697cdb44ab2dd115f4562211f6a4";const Fr=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"input"}],a=[{alias:null,args:[{kind:"Variable",name:"input",variableName:"input"}],concreteType:"DatasetMutationPayload",kind:"LinkedField",name:"deleteDatasetExamples",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:"ExampleSelectionToolbarDeleteExamplesMutation",selections:a,type:"Mutation",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"ExampleSelectionToolbarDeleteExamplesMutation",selections:a},params:{cacheID:"b63159f3c325b9af3dc469692f9329e5",id:null,metadata:{},name:"ExampleSelectionToolbarDeleteExamplesMutation",operationKind:"mutation",text:`mutation ExampleSelectionToolbarDeleteExamplesMutation(
|
|
2935
2937
|
$input: DeleteDatasetExamplesInput!
|
|
2936
2938
|
) {
|
|
2937
2939
|
deleteDatasetExamples(input: $input) {
|
|
@@ -2940,15 +2942,15 @@ fragment ExamplesTableFragment_4a6F8Z on Dataset {
|
|
|
2940
2942
|
}
|
|
2941
2943
|
}
|
|
2942
2944
|
}
|
|
2943
|
-
`}}}();
|
|
2945
|
+
`}}}();Fr.hash="455bf9e5dc4b9cc655095dc829ef7e12";function Km(n){const a=fn(y=>y.refreshLatestVersion),{selectedExamples:l,onExamplesDeleted:t,onClearSelection:i}=n,[r,o]=m.useState(null),u=ie(),d=de(),[p,f]=T.useMutation(Fr),c=l.length!==1,g=m.useCallback(()=>{p({variables:{input:{exampleIds:l.map(y=>y.id)}},onCompleted:()=>{u({title:"Examples Deleted",message:`${l.length} example${c?"s":""} have been deleted.`}),t(),i(),a()},onError:y=>{d({title:"An error occurred",message:`Failed to delete examples: ${y.message}`})}})},[p,l,u,c,t,i,a,d]);return s("div",{css:C`
|
|
2944
2946
|
position: absolute;
|
|
2945
2947
|
bottom: var(--ac-global-dimension-size-400);
|
|
2946
2948
|
left: 50%;
|
|
2947
2949
|
transform: translateX(-50%);
|
|
2948
|
-
`,children:[e(
|
|
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${c?"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(E,{svg:e(L.TrashOutline,{})}),loading:f,disabled:f,onClick:g,children:f?"Deleting...":"Delete Example"+(c?"s":"")})]})]})}),e(G,{onDismiss:()=>{o(null)},children:r})]})}const xm=100;function Dm({dataset:n}){const a=fn(P=>P.latestVersion),l=m.useRef(null),[t,i]=Ce.useState({}),{data:r,loadNext:o,hasNext:u,isLoadingNext:d,refetch:p}=T.usePaginationFragment(Cr,n);m.useEffect(()=>{m.startTransition(()=>{p({datasetVersionId:(a==null?void 0:a.id)||null},{fetchPolicy:"store-and-network"})})},[a,p]);const f=m.useMemo(()=>r.examples.edges.map(P=>{const x=P.example,D=x.revision;return{id:x.id,input:D.input,output:D.output,metadata:D.metadata}}),[r]),g=me({columns:[{id:"select",header:({table:P})=>e(Je,{checked:P.getIsAllRowsSelected(),indeterminate:P.getIsSomeRowsSelected(),onChange:P.getToggleAllRowsSelectedHandler()}),cell:({row:P})=>e(Je,{checked:P.getIsSelected(),disabled:!P.getCanSelect(),indeterminate:P.getIsSomeSelected(),onChange:P.getToggleSelectedHandler()})},{header:"example id",accessorKey:"id",cell:({getValue:P,row:x})=>{const D=x.original.id;return e(He,{to:`${D}`,children:P()})}},{header:"input",accessorKey:"input",cell:Tn},{header:"output",accessorKey:"output",cell:Tn},{header:"metadata",accessorKey:"metadata",cell:Tn}],data:f,state:{rowSelection:t},onRowSelectionChange:i,getCoreRowModel:ge()}),y=g.getRowModel().rows,k=y.length===0,b=g.getSelectedRowModel().rows,v=b.map(P=>P.original),S=m.useCallback(()=>{i({})},[i]),w=m.useCallback(P=>{if(P){const{scrollHeight:x,scrollTop:D,clientHeight:R}=P;x-D-R<300&&!d&&u&&o(xm)}},[u,d,o]),I=ee();return s("div",{css:C`
|
|
2949
2951
|
flex: 1 1 auto;
|
|
2950
2952
|
overflow: auto;
|
|
2951
|
-
`,ref:l,onScroll:
|
|
2953
|
+
`,ref:l,onScroll:P=>w(P.target),children:[s("table",{css:Nn,children:[e("thead",{children:g.getHeaderGroups().map(P=>e("tr",{children:P.headers.map(x=>e("th",{children:e("div",{children:H(x.column.columnDef.header,x.getContext())})},x.id))},P.id))}),k?e(Be,{}):e("tbody",{children:y.map(P=>e("tr",{onClick:()=>{I(`${P.original.id}`)},children:P.getVisibleCells().map(x=>e("td",{children:H(x.column.columnDef.cell,x.getContext())},x.id))},P.id))})]}),b.length?e(Km,{selectedExamples:v,onClearSelection:S,onExamplesDeleted:()=>{p({},{fetchPolicy:"store-and-network"})}}):null]})}function tp(){const n=An();return s(j,{children:[e(Dm,{dataset:n.dataset})," ",e(m.Suspense,{children:e(De,{})})]})}const Kr=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(
|
|
2952
2954
|
$id: GlobalID!
|
|
2953
2955
|
) {
|
|
2954
2956
|
dataset: node(id: $id) {
|
|
@@ -2998,7 +3000,7 @@ fragment ExperimentsTableFragment on Dataset {
|
|
|
2998
3000
|
}
|
|
2999
3001
|
id
|
|
3000
3002
|
}
|
|
3001
|
-
`}}}();
|
|
3003
|
+
`}}}();Kr.hash="1461484d9e1232cbb99e1251edabbec3";async function ip(n){const{datasetId:a}=n.params;return await T.fetchQuery(Ke,Kr,{id:a}).toPromise()}const xr=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(
|
|
3002
3004
|
$after: String = null
|
|
3003
3005
|
$first: Int = 100
|
|
3004
3006
|
$id: GlobalID!
|
|
@@ -3049,19 +3051,19 @@ fragment ExperimentsTableFragment_2HEEH6 on Dataset {
|
|
|
3049
3051
|
}
|
|
3050
3052
|
id
|
|
3051
3053
|
}
|
|
3052
|
-
`}}}();
|
|
3054
|
+
`}}}();xr.hash="c7c7580fe40888ceb86a1701fe4eedf4";const Dr=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:xr,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}}();Dr.hash="c7c7580fe40888ceb86a1701fe4eedf4";function Tm({getValue:n}){const a=n(),l=a!==null?a*100:null,t=m.useMemo(()=>{if(l!==null)return l>=80?"red-1100":l>0?"orange-1100":"green-1100"},[l]);return e(K,{color:t,children:_a(l)})}const Tr=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(
|
|
3053
3055
|
$input: DeleteExperimentsInput!
|
|
3054
3056
|
) {
|
|
3055
3057
|
deleteExperiments(input: $input) {
|
|
3056
3058
|
__typename
|
|
3057
3059
|
}
|
|
3058
3060
|
}
|
|
3059
|
-
`}}}();
|
|
3061
|
+
`}}}();Tr.hash="4ab310746eb51c6a3fcb799d2c972762";function Im(n){const a=ee(),[l,t]=m.useState(null),[i,r]=T.useMutation(Tr),{datasetId:o,selectedExperiments:u,onClearSelection:d,onExperimentsDeleted:p}=n,f=u.length!==1,c=ie(),g=de(),y=m.useCallback(()=>{i({variables:{input:{experimentIds:u.map(b=>b.id)}},onCompleted:()=>{c({title:"Examples Deleted",message:`${u.length} experiment${f?"s":""} have been deleted.`}),p(),d()},onError:b=>{g({title:"An error occurred",message:`Failed to delete examples: ${b.message}`})}})},[i,f,g,c,d,p,u]),k=m.useCallback(()=>{t(s(U,{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`
|
|
3060
3062
|
position: absolute;
|
|
3061
3063
|
bottom: var(--ac-global-dimension-size-400);
|
|
3062
3064
|
left: 50%;
|
|
3063
3065
|
transform: translateX(-50%);
|
|
3064
|
-
`,children:[e(
|
|
3066
|
+
`,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",gap:"size-100",children:[e(K,{children:`${u.length} experiment${f?"s":""} selected`}),s(h,{direction:"row",gap:"size-100",children:[e(M,{variant:"default",size:"compact",onClick:d,children:"Cancel"}),e(M,{variant:"danger",size:"compact",icon:e(E,{svg:e(L.TrashOutline,{})}),loading:r,disabled:r,onClick:k,children:r?"Deleting...":"Delete"}),e(M,{variant:"primary",size:"compact",onClick:()=>{a(`/datasets/${o}/compare?${u.map(b=>`experimentId=${b.id}`).join("&")}`)},icon:e(E,{svg:e(L.ArrowCompareOutline,{})}),children:"Compare Experiments"})]})]})}),e(G,{onDismiss:()=>{t(null)},children:l})]})}const Lm=100;function wm(){return e("tbody",{className:"is-empty",children:e("tr",{children:s("td",{colSpan:100,css:C`
|
|
3065
3067
|
text-align: center;
|
|
3066
3068
|
padding: var(--ac-global-dimension-size-400) !important;
|
|
3067
3069
|
.ac-button {
|
|
@@ -3069,20 +3071,20 @@ fragment ExperimentsTableFragment_2HEEH6 on Dataset {
|
|
|
3069
3071
|
margin-left: auto;
|
|
3070
3072
|
margin-right: auto;
|
|
3071
3073
|
}
|
|
3072
|
-
`,children:["No experiments for this dataset. To see how to run experiments on a dataset, check out the documentation.",e(
|
|
3074
|
+
`,children:["No experiments for this dataset. To see how to run experiments on a dataset, check out the documentation.",e(gr,{})]})})})}function Am({dataset:n}){const a=m.useRef(null),[l,t]=m.useState({}),{data:i,loadNext:r,hasNext:o,isLoadingNext:u,refetch:d}=T.usePaginationFragment(Dr,n),p=m.useMemo(()=>i.experiments.edges.map(x=>{const D=x.experiment.annotationSummaries.reduce((R,_)=>(R[_.annotationName]=_,R),{});return{...x.experiment,annotationSummaryMap:D}}),[i]),f=[{id:"select",header:({table:x})=>e(Je,{checked:x.getIsAllRowsSelected(),indeterminate:x.getIsSomeRowsSelected(),onChange:x.getToggleAllRowsSelectedHandler()}),cell:({row:x})=>e(Je,{checked:x.getIsSelected(),disabled:!x.getCanSelect(),indeterminate:x.getIsSomeSelected(),onChange:x.getToggleSelectedHandler()})},{header:"name",accessorKey:"name",minSize:200,cell:({getValue:x,row:D})=>{const R=D.original.id,_=D.original.sequenceNumber;return s(h,{direction:"row",gap:"size-100",children:[e(fa,{sequenceNumber:_}),e(He,{to:`/datasets/${n.id}/compare?experimentId=${R}`,children:x()})]})}},{header:"description",accessorKey:"description",minSize:300,cell:se},{header:"created at",accessorKey:"createdAt",cell:ke}],c=i.experimentAnnotationSummaries.map(x=>{const{annotationName:D,minScore:R,maxScore:_}=x;return{header:()=>s(h,{direction:"row",gap:"size-100",wrap:!0,alignItems:"center",justifyContent:"end",children:[e(K,{children:D}),e(bo,{annotationName:D})]}),id:`annotation-${D}`,meta:{textAlign:"right"},cell:({row:O})=>{const X=O.original.annotationSummaryMap[D];return!X||X.meanScore==null?e("span",{css:C`
|
|
3073
3075
|
float: right;
|
|
3074
|
-
`,children:"--"}):e(
|
|
3076
|
+
`,children:"--"}):e(Pm,{annotationName:D,value:X.meanScore,min:R,max:_})}}}),g=[{header:"run count",accessorKey:"runCount",meta:{textAlign:"right"},cell:So},{header:"avg latency",accessorKey:"averageRunLatencyMs",meta:{textAlign:"right"},cell:({getValue:x})=>{const D=x();return D===null||typeof D!="number"?"--":e(we,{latencyMs:D})}},{header:"error rate",accessorKey:"errorRate",meta:{textAlign:"right"},cell:Tm},{header:"metadata",accessorKey:"metadata",minSize:200,cell:Tn},{id:"actions",cell:({row:x})=>{const D=x.original.project,R=x.original.metadata;return e(_m,{projectId:(D==null?void 0:D.id)||null,experimentId:x.original.id,metadata:R})}}],y=me({columns:[...f,...c,...g],data:p,getCoreRowModel:ge(),state:{rowSelection:l},onRowSelectionChange:t}),k=y.getRowModel().rows,b=y.getSelectedRowModel().rows,v=b.map(x=>x.original),S=m.useCallback(()=>{t({})},[t]),w=k.length===0,I=m.useCallback(x=>{if(x){const{scrollHeight:D,scrollTop:R,clientHeight:_}=x;D-R-_<300&&!u&&o&&r(Lm)}},[o,u,r]),P=ee();return s("div",{css:C`
|
|
3075
3077
|
flex: 1 1 auto;
|
|
3076
3078
|
overflow: auto;
|
|
3077
3079
|
width: table.getTotalSize();
|
|
3078
|
-
`,ref:a,onScroll:
|
|
3080
|
+
`,ref:a,onScroll:x=>I(x.target),children:[s("table",{css:Nn,children:[e("thead",{children:y.getHeaderGroups().map(x=>e("tr",{children:x.headers.map(D=>{var R,_;return e("th",{align:(_=(R=D.column.columnDef)==null?void 0:R.meta)==null?void 0:_.textAlign,children:e("div",{children:H(D.column.columnDef.header,D.getContext())})},D.id)})},x.id))}),w?e(wm,{}):e("tbody",{children:k.map(x=>e("tr",{onClick:()=>{P(`/datasets/${n.id}/compare?experimentId=${x.original.id}`)},children:x.getVisibleCells().map(D=>e("td",{children:H(D.column.columnDef.cell,D.getContext())},D.id))},x.id))})]}),b.length?e(Im,{datasetId:n.id,selectedExperiments:v,onClearSelection:S,onExperimentsDeleted:()=>{d({},{fetchPolicy:"store-and-network"})}}):null]})}function Pm({annotationName:n,value:a,min:l,max:t}){const i=Ol(n),r=m.useMemo(()=>{const o=typeof l=="number"?l:0,u=typeof t=="number"?t:1;if(o===u&&u===a)return 100;const d=u-o||1;return(a-o)/d*100},[a,l,t]);return s(Le,{children:[e(In,{children:s("div",{css:C`
|
|
3079
3081
|
float: right;
|
|
3080
3082
|
--mod-barloader-fill-color: ${i};
|
|
3081
3083
|
display: flex;
|
|
3082
3084
|
flex-direction: row;
|
|
3083
3085
|
align-items: center;
|
|
3084
3086
|
gap: var(--ac-global-dimension-size-100);
|
|
3085
|
-
`,children:[
|
|
3087
|
+
`,children:[Dn(a),e(Ds,{width:"40px",value:r,"aria-label":"where the mean score lands between overall min max"})]})}),e(Xn,{children:s(F,{width:"size-2400",children:[e(te,{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:Dn(a)})]}),s(h,{justifyContent:"space-between",children:[e(K,{weight:"heavy",textSize:"small",children:"All Experiments Min"}),e(K,{textSize:"small",children:Dn(l)})]}),s(h,{justifyContent:"space-between",children:[e(K,{weight:"heavy",textSize:"small",children:"All Experiments Max"}),e(K,{textSize:"small",children:Dn(t)})]}),s(h,{justifyContent:"space-between",children:[e(K,{weight:"heavy",textSize:"small",children:"Mean Score Percentile"}),e(K,{textSize:"small",children:jl(r)})]})]})]})})]})}function _m(n){const{projectId:a}=n,l=ee(),[t,i]=m.useState(null),r=ie();return s("div",{onClick:o=>{o.preventDefault(),o.stopPropagation()},children:[s(Oe,{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(U,{title:"Metadata",onDismiss:()=>i(null),children:e(mn,{value:JSON.stringify(n.metadata,null,2)})}));break}case"COPY_EXPERIMENT_ID":{Ss(n.experimentId),r({title:"Copied",message:"The experiment ID has been copied to your clipboard"});break}default:xe()}},children:[e(W,{children:s(h,{direction:"row",gap:"size-75",justifyContent:"start",alignItems:"center",children:[e(E,{svg:e(L.Trace,{})}),e(K,{children:"View run traces"})]})},"GO_TO_EXPERIMENT_RUN_TRACES"),e(W,{children:s(h,{direction:"row",gap:"size-75",justifyContent:"start",alignItems:"center",children:[e(E,{svg:e(L.InfoOutline,{})}),e(K,{children:"View metadata"})]})},"VIEW_METADATA"),e(W,{children:s(h,{direction:"row",gap:"size-75",justifyContent:"start",alignItems:"center",children:[e(E,{svg:e(L.ClipboardCopy,{})}),e(K,{children:"Copy experiment ID"})]})},"COPY_EXPERIMENT_ID")]}),e(G,{type:"modal",isDismissable:!0,onDismiss:()=>{i(null)},children:t})]})}function rp(){const n=An();return s(j,{children:[e(Am,{dataset:n.dataset}),e(m.Suspense,{children:e(De,{})})]})}const Ir=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"}],u={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,u],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,u],storageKey:null}]},params:{cacheID:"97e80c617426f75b81affa68e276b3d8",id:null,metadata:{},name:"ExperimentCompareTableQuery",operationKind:"query",text:`query ExperimentCompareTableQuery(
|
|
3086
3088
|
$experimentIds: [GlobalID!]!
|
|
3087
3089
|
$datasetId: GlobalID!
|
|
3088
3090
|
) {
|
|
@@ -3140,7 +3142,7 @@ fragment ExperimentsTableFragment_2HEEH6 on Dataset {
|
|
|
3140
3142
|
}
|
|
3141
3143
|
}
|
|
3142
3144
|
}
|
|
3143
|
-
`}}}();
|
|
3145
|
+
`}}}();Ir.hash="e6132b301f6d80be7f5c5b0653e25178";const Aa={backgroundColor:"light",borderColor:"light",variant:"compact",collapsible:!0,bodyStyle:{padding:0}},Em=C`
|
|
3144
3146
|
flex: 1 1 auto;
|
|
3145
3147
|
overflow: auto;
|
|
3146
3148
|
// Make sure the table fills up the remaining space
|
|
@@ -3150,7 +3152,7 @@ fragment ExperimentsTableFragment_2HEEH6 on Dataset {
|
|
|
3150
3152
|
vertical-align: top;
|
|
3151
3153
|
}
|
|
3152
3154
|
}
|
|
3153
|
-
`,
|
|
3155
|
+
`,Lr=C`
|
|
3154
3156
|
position: relative;
|
|
3155
3157
|
min-height: 75px;
|
|
3156
3158
|
.controls {
|
|
@@ -3167,32 +3169,32 @@ fragment ExperimentsTableFragment_2HEEH6 on Dataset {
|
|
|
3167
3169
|
border-color: var(--ac-global-color-primary);
|
|
3168
3170
|
}
|
|
3169
3171
|
}
|
|
3170
|
-
`,
|
|
3172
|
+
`,wr=C`
|
|
3171
3173
|
position: absolute;
|
|
3172
3174
|
top: -23px;
|
|
3173
3175
|
right: 0px;
|
|
3174
3176
|
display: flex;
|
|
3175
3177
|
flex-direction: row;
|
|
3176
3178
|
gap: var(--ac-global-dimension-static-size-100);
|
|
3177
|
-
`,
|
|
3179
|
+
`,Rm=C`
|
|
3178
3180
|
display: flex;
|
|
3179
3181
|
flex-direction: row;
|
|
3180
3182
|
align-items: center;
|
|
3181
3183
|
color: var(--ac-global-color-primary);
|
|
3182
3184
|
gap: var(--ac-global-dimension-size-50);
|
|
3183
|
-
`;function
|
|
3185
|
+
`;function Mm(n){const{datasetId:a,experimentIds:l,displayFullText:t}=n,i=T.useLazyLoadQuery(Ir,{experimentIds:l,datasetId:a}),r=m.useMemo(()=>{var v,S;return((S=(v=i.dataset)==null?void 0:v.experiments)==null?void 0:S.edges.reduce((w,I)=>(w[I.experiment.id]={...I.experiment},w),{}))||{}},[i]),o=m.useMemo(()=>i.comparisons.map(v=>{const S=v.runComparisonItems.reduce((w,I)=>(w[I.experimentId]=I,w),{});return{...v,id:v.example.id,input:v.example.revision.input,referenceOutput:v.example.revision.referenceOutput,runComparisonMap:S}}),[i]),[u,d]=m.useState(null),p=m.useMemo(()=>[{header:"input",accessorKey:"input",minWidth:500,cell:({row:v})=>s("div",{css:Lr,children:[e(Ya,{children:e(Wa,{json:v.original.input,disableTitle:!0,space:t?2:0})}),e("div",{className:"controls",css:wr,children:s(Le,{children:[e(M,{variant:"default",size:"compact","aria-label":"View example details",icon:e(E,{svg:e(L.ExpandOutline,{})}),onClick:()=>{m.startTransition(()=>{d(e(m.Suspense,{children:e(br,{exampleId:v.original.example.id,onDismiss:()=>{d(null)}})}))})}}),e(Hn,{children:"View Example"})]})})]})},{header:"reference output",accessorKey:"referenceOutput",minWidth:500,cell:t?Qm:Tn}],[t]),f=m.useMemo(()=>l.map(v=>({header:()=>{var I,P;const S=(I=r[v])==null?void 0:I.name,w=((P=r[v])==null?void 0:P.sequenceNumber)||0;return s(h,{direction:"row",gap:"size-100",wrap:!0,children:[e(fa,{sequenceNumber:w}),e(K,{children:S})]})},accessorKey:v,minSize:500,cell:({row:S})=>{var O,X;const w=S.original.runComparisonMap[v],I=(w==null?void 0:w.runs.length)||0;if(I===0)return e(fl,{});if(I>1)return e(K,{color:"warning",children:`${I} runs`});const P=w==null?void 0:w.runs[0];let x=null;const D=(O=P==null?void 0:P.trace)==null?void 0:O.traceId,R=(X=P==null?void 0:P.trace)==null?void 0:X.projectId;D&&R&&(x=s(Le,{children:[e(M,{variant:"default",className:"trace-button",size:"compact","aria-label":"View run trace",icon:e(E,{svg:e(L.Trace,{})}),onClick:le=>{le.preventDefault(),le.stopPropagation(),m.startTransition(()=>{d(e(Er,{traceId:D,projectId:R,title:"Experiment Run Trace"}))})}}),e(Hn,{children:"View Trace"})]}));const _=s(j,{children:[s(Le,{children:[e(M,{variant:"default",className:"expand-button",size:"compact","aria-label":"View example run details",icon:e(E,{svg:e(L.ExpandOutline,{})}),onClick:le=>{le.preventDefault(),le.stopPropagation(),m.startTransition(()=>{d(e(Om,{selectedExample:S.original,datasetId:a,experimentInfoById:r}))})}}),e(Hn,{children:"View run details"})]}),x]});return P?e($m,{controls:_,children:e(zm,{...P,displayFullText:t,setDialog:d})}):e(fl,{})}})),[l,r,a,t]),c=m.useMemo(()=>[...p,...f,{id:"tail",minSize:500}],[p,f]),g=me({columns:c,data:o,getCoreRowModel:ge(),columnResizeMode:"onChange"}),y=Ce.useMemo(()=>{const v=g.getFlatHeaders(),S={};for(let w=0;w<v.length;w++){const I=v[w];S[`--header-${I.id}-size`]=I.getSize(),S[`--col-${I.column.id}-size`]=I.column.getSize()}return S},[g.getState().columnSizingInfo,g.getState().columnSizing]),b=g.getRowModel().rows.length===0;return s("div",{css:Em,children:[s("table",{css:v=>C(Ue(v),vo),style:{...y,width:g.getTotalSize(),minWidth:"100%"},children:[e("thead",{children:g.getHeaderGroups().map(v=>e("tr",{children:v.headers.map(S=>s("th",{style:{width:`calc(var(--header-${S==null?void 0:S.id}-size) * 1px)`},children:[e("div",{children:H(S.column.columnDef.header,S.getContext())}),e("div",{onMouseDown:S.getResizeHandler(),onTouchStart:S.getResizeHandler(),className:`resizer ${S.column.getIsResizing()?"isResizing":""}`})]},S.id))},v.id))}),b?e(Be,{}):g.getState().columnSizingInfo.isResizingColumn?e(Nm,{table:g}):e(Ar,{table:g})]}),e(G,{isDismissable:!0,type:"slideOver",onDismiss:()=>{d(null)},children:u})]})}function Ar({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:H(l.column.columnDef.cell,l.getContext())},l.id))},a.id))})}const Nm=Ce.memo(Ar,(n,a)=>n.table.options.data===a.table.options.data);function Vm(n){const{datasetId:a,exampleId:l}=n,t=ee();return e("div",{onClick:i=>{i.preventDefault(),i.stopPropagation()},children:e(Oe,{buttonSize:"compact",align:"end",onAction:i=>{switch(i){case"gotoExample":return t(`/datasets/${a}/examples/${l}`);default:xe()}},children:e(W,{children:s(h,{direction:"row",gap:"size-75",justifyContent:"start",alignItems:"center",children:[e(E,{svg:e(L.ExternalLinkOutline,{})}),e(K,{children:"Go to example"})]})},"gotoExample")})})}function zm(n){const{output:a,error:l,startTime:t,endTime:i,annotations:r,displayFullText:o,setDialog:u}=n;if(l)return e(Pr,{error:l});const d=r!=null&&r.edges.length?r.edges.map(p=>p.annotation):[];return s(h,{direction:"column",gap:"size-100",height:"100%",justifyContent:"space-between",children:[e(Ya,{children:e(Wa,{json:a,disableTitle:!0,space:o?2:0})}),s("ul",{css:C`
|
|
3184
3186
|
display: flex;
|
|
3185
3187
|
flex-direction: row;
|
|
3186
3188
|
gap: var(--ac-global-dimension-static-size-100);
|
|
3187
3189
|
align-items: center;
|
|
3188
3190
|
flex-wrap: wrap;
|
|
3189
|
-
`,children:[e("li",{children:e(
|
|
3191
|
+
`,children:[e("li",{children:e(_r,{startTime:t,endTime:i})},"run-latency"),d.map(p=>e("li",{children:e(na,{annotation:p,extra:p.trace&&e(F,{paddingTop:"size-100",children:s("div",{css:Rm,children:[e(E,{svg:e(L.InfoOutline,{})}),e("span",{children:"Click to view evaluator trace"})]})}),children:e(bn,{annotation:p,onClick:()=>{const f=p.trace;f&&m.startTransition(()=>{u(e(Er,{traceId:f.traceId,projectId:f.projectId,title:`Evaluator Trace: ${p.name}`}))})}})})},p.id))]})]})}function $m(n){return s("div",{css:Lr,children:[n.children,e("div",{css:wr,className:"controls",children:n.controls})]})}function Pr({error:n}){return s(h,{direction:"row",gap:"size-50",alignItems:"center",children:[e(E,{svg:e(L.AlertCircleOutline,{}),color:"danger"}),e(K,{color:"danger",children:n})]})}function _r({startTime:n,endTime:a}){const l=m.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 fl(){return s(h,{direction:"row",gap:"size-50",children:[e(E,{svg:e(L.MinusCircleOutline,{}),color:"grey-800"}),e(K,{color:"text-700",children:"not run"})]})}function Qm({getValue:n}){const a=n();return e(Ya,{children:e(Wa,{json:a,space:2})})}function Ya({children:n}){return e("div",{css:C`
|
|
3190
3192
|
max-height: 300px;
|
|
3191
3193
|
overflow-y: auto;
|
|
3192
|
-
`,children:n})}function
|
|
3194
|
+
`,children:n})}function Om({selectedExample:n,datasetId:a,experimentInfoById:l}){return e(U,{title:`Comparing Experiments for Example: ${n.id}`,size:"fullscreen",extra:e(Vm,{datasetId:a,exampleId:n.id}),children:s(Ge,{direction:"vertical",autoSaveId:"example-compare-panel-group",children:[e(re,{defaultSize:100,children:e("div",{css:C`
|
|
3193
3195
|
overflow-y: auto;
|
|
3194
3196
|
height: 100%;
|
|
3195
|
-
`,children:e(
|
|
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(z,{title:"Input",...Aa,bodyStyle:{padding:0,maxHeight:"300px",overflowY:"auto"},extra:e(ne,{text:JSON.stringify(n.input)}),children:e(mn,{value:JSON.stringify(n.input,null,2)})})}),e(F,{width:"50%",children:e(z,{title:"Reference Output",...Aa,extra:e(ne,{text:JSON.stringify(n.input)}),bodyStyle:{padding:0,maxHeight:"300px",overflowY:"auto"},children:e(mn,{value:JSON.stringify(n.referenceOutput,null,2)})})})]})})})}),e(We,{css:kn}),e(re,{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(te,{level:2,children:"Experiments"})}),e("div",{css:C`
|
|
3196
3198
|
overflow-y: auto;
|
|
3197
3199
|
height: 100%;
|
|
3198
3200
|
padding: var(--ac-global-dimension-static-size-200);
|
|
@@ -3200,7 +3202,7 @@ fragment ExperimentsTableFragment_2HEEH6 on Dataset {
|
|
|
3200
3202
|
display: flex;
|
|
3201
3203
|
flex-direction: column;
|
|
3202
3204
|
gap: var(--ac-global-dimension-static-size-200);
|
|
3203
|
-
`,children:n.runComparisonItems.map(t=>{const i=l[t.experimentId];return e("li",{children:e(z,{...
|
|
3205
|
+
`,children:n.runComparisonItems.map(t=>{const i=l[t.experimentId];return e("li",{children:e(z,{...Aa,title:i==null?void 0:i.name,titleExtra:e(fa,{sequenceNumber:(i==null?void 0:i.sequenceNumber)||0}),children:e("ul",{children:t.runs.map((r,o)=>{var u;return e("li",{children:s(h,{direction:"row",children:[e(F,{flex:!0,children:r.error?e(F,{padding:"size-200",children:e(Pr,{error:r.error})}):e(mn,{value:JSON.stringify(r.output,null,2)})}),s(Fn,{width:"size-3000",children:[e(_r,{startTime:r.startTime,endTime:r.endTime}),e("ul",{css:C`
|
|
3204
3206
|
margin-top: var(
|
|
3205
3207
|
--ac-global-dimension-static-size-100
|
|
3206
3208
|
);
|
|
@@ -3211,12 +3213,12 @@ fragment ExperimentsTableFragment_2HEEH6 on Dataset {
|
|
|
3211
3213
|
gap: var(
|
|
3212
3214
|
--ac-global-dimension-static-size-100
|
|
3213
3215
|
);
|
|
3214
|
-
`,children:(
|
|
3216
|
+
`,children:(u=r.annotations)==null?void 0:u.edges.map(d=>e("li",{children:e(bn,{annotation:d.annotation})},d.annotation.id))})]})]})},o)})})})},t.experimentId)})})})]})})]})})}function Er({traceId:n,projectId:a,title:l}){const t=ee();return e(U,{title:l,size:"fullscreen",extra:e(M,{variant:"default",onClick:()=>t(`/projects/${a}/traces/${n}`),children:"View Trace in Project"}),children:e(di,{traceId:n,projectId:a})})}const Rr={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};Rr.hash="1aa376b1e9425f49268ac231dc2c0412";function jm(n){const{dataset:a,selectedExperimentIds:l,onChange:t,label:i,validationState:r,description:o,errorMessage:u,...d}=n,p=T.useFragment(Rr,a),f=m.useMemo(()=>p.experiments.edges.map(y=>y.experiment),[p]),c=f.length===0,g=m.useMemo(()=>{if(c)return"No experiments";const y=l.length;return y>0?`${y} experiment${y>1?"s":""}`:"No experiments selected"},[l,c]);return e(ua,{label:i,isDisabled:c,validationState:r,description:o,errorMessage:u,children:e(Oa,{isDisabled:c,...d,menu:e(Zn,{selectionMode:"multiple",onSelectionChange:y=>{t(Array.from(y))},selectedKeys:new Set(l),children:f.map(y=>e(W,{textValue:y.name,children:s(h,{direction:"column",gap:"size-50",children:[s(h,{direction:"row",gap:"size-100",children:[e(fa,{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:g})})}function sp(){const n=An(),[a,l]=m.useState(!1),[t,i]=oa(),r=t.getAll("experimentId"),o=r.length>0;return s("main",{css:C`
|
|
3215
3217
|
height: 100%;
|
|
3216
3218
|
display: flex;
|
|
3217
3219
|
flex-direction: column;
|
|
3218
3220
|
overflow: hidden;
|
|
3219
|
-
`,children:[e(
|
|
3221
|
+
`,children:[e(F,{padding:"size-200",borderBottomColor:"dark",borderBottomWidth:"thin",flex:"none",children:s(h,{direction:"column",gap:"size-100",children:[e(te,{level:1,children:"Compare Experiments"}),s(h,{direction:"row",justifyContent:"space-between",alignItems:"end",children:[e(jm,{dataset:n.dataset,selectedExperimentIds:r,label:"experiments",onChange:u=>{m.startTransition(()=>{t.delete("experimentId"),u.forEach(d=>{t.append("experimentId",d)}),i(t)})}}),e(Jn,{onChange:u=>{l(u)},defaultSelected:!1,labelPlacement:"start",children:"Full Text"})]})]})}),o?e(m.Suspense,{fallback:e(ue,{}),children:e(Mm,{datasetId:n.dataset.id,experimentIds:r,displayFullText:a})}):e(F,{padding:"size-200",children:e(Y,{variant:"info",title:"No Experiment Selected",children:"Please select one or more experiments."})})]})}const Mr=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(
|
|
3220
3222
|
$id: GlobalID!
|
|
3221
3223
|
) {
|
|
3222
3224
|
dataset: node(id: $id) {
|
|
@@ -3242,9 +3244,20 @@ fragment ExperimentMultiSelector__experiments on Dataset {
|
|
|
3242
3244
|
}
|
|
3243
3245
|
}
|
|
3244
3246
|
}
|
|
3245
|
-
`}}}();
|
|
3246
|
-
|
|
3247
|
-
|
|
3247
|
+
`}}}();Mr.hash="fa02088830fd16688f0f2fba9a0009eb";async function op(n){const{datasetId:a}=n.params;return await T.fetchQuery(Ke,Mr,{id:a}).toPromise()}const Nr=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
|
+
$name: String!
|
|
3249
|
+
$description: String = null
|
|
3250
|
+
$expiresAt: DateTime = null
|
|
3251
|
+
) {
|
|
3252
|
+
createSystemApiKey(input: {name: $name, description: $description, expiresAt: $expiresAt}) {
|
|
3253
|
+
jwt
|
|
3254
|
+
query {
|
|
3255
|
+
...SystemAPIKeysTableFragment
|
|
3256
|
+
}
|
|
3257
|
+
apiKey {
|
|
3258
|
+
id
|
|
3259
|
+
}
|
|
3260
|
+
}
|
|
3248
3261
|
}
|
|
3249
3262
|
|
|
3250
3263
|
fragment SystemAPIKeysTableFragment on Query {
|
|
@@ -3256,9 +3269,13 @@ fragment SystemAPIKeysTableFragment on Query {
|
|
|
3256
3269
|
expiresAt
|
|
3257
3270
|
}
|
|
3258
3271
|
}
|
|
3272
|
+
`}}}();Nr.hash="a6f84fa9e14f363d2e7317d3d6507590";const Vr=function(){var n={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},a={alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},l={alias:null,args:null,kind:"ScalarField",name:"description",storageKey:null},t={alias:null,args:null,kind:"ScalarField",name:"createdAt",storageKey:null},i={alias:null,args:null,kind:"ScalarField",name:"expiresAt",storageKey:null};return{fragment:{argumentDefinitions:[],kind:"Fragment",metadata:null,name:"APIKeysCardQuery",selections:[{args:null,kind:"FragmentSpread",name:"SystemAPIKeysTableFragment"},{args:null,kind:"FragmentSpread",name:"UserAPIKeysTableFragment"}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[],kind:"Operation",name:"APIKeysCardQuery",selections:[{alias:null,args:null,concreteType:"SystemApiKey",kind:"LinkedField",name:"systemApiKeys",plural:!0,selections:[n,a,l,t,i],storageKey:null},{alias:null,args:null,concreteType:"UserApiKey",kind:"LinkedField",name:"userApiKeys",plural:!0,selections:[n,a,l,t,i,{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}]},params:{cacheID:"a8cfba9eaaac34bc497efaacbff45c05",id:null,metadata:{},name:"APIKeysCardQuery",operationKind:"query",text:`query APIKeysCardQuery {
|
|
3273
|
+
...SystemAPIKeysTableFragment
|
|
3274
|
+
...UserAPIKeysTableFragment
|
|
3275
|
+
}
|
|
3259
3276
|
|
|
3260
|
-
fragment
|
|
3261
|
-
|
|
3277
|
+
fragment SystemAPIKeysTableFragment on Query {
|
|
3278
|
+
systemApiKeys {
|
|
3262
3279
|
id
|
|
3263
3280
|
name
|
|
3264
3281
|
description
|
|
@@ -3266,40 +3283,28 @@ fragment UserAPIKeysTableFragment on Query {
|
|
|
3266
3283
|
expiresAt
|
|
3267
3284
|
}
|
|
3268
3285
|
}
|
|
3269
|
-
`}}}();hr.hash="ad967afd45af0d5976982c70eaadb330";const kr=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:"CreateSystemAPIKeyDialogMutation",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:"CreateSystemAPIKeyDialogMutation",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:"e162ef32e40e2920bbdb388bedd83989",id:null,metadata:{},name:"CreateSystemAPIKeyDialogMutation",operationKind:"mutation",text:`mutation CreateSystemAPIKeyDialogMutation(
|
|
3270
|
-
$name: String!
|
|
3271
|
-
$description: String = null
|
|
3272
|
-
$expiresAt: DateTime = null
|
|
3273
|
-
) {
|
|
3274
|
-
createSystemApiKey(input: {name: $name, description: $description, expiresAt: $expiresAt}) {
|
|
3275
|
-
jwt
|
|
3276
|
-
query {
|
|
3277
|
-
...SystemAPIKeysTableFragment
|
|
3278
|
-
}
|
|
3279
|
-
apiKey {
|
|
3280
|
-
id
|
|
3281
|
-
}
|
|
3282
|
-
}
|
|
3283
|
-
}
|
|
3284
3286
|
|
|
3285
|
-
fragment
|
|
3286
|
-
|
|
3287
|
+
fragment UserAPIKeysTableFragment on Query {
|
|
3288
|
+
userApiKeys {
|
|
3287
3289
|
id
|
|
3288
3290
|
name
|
|
3289
3291
|
description
|
|
3290
3292
|
createdAt
|
|
3291
3293
|
expiresAt
|
|
3294
|
+
user {
|
|
3295
|
+
email
|
|
3296
|
+
}
|
|
3292
3297
|
}
|
|
3293
3298
|
}
|
|
3294
|
-
`}}}();
|
|
3299
|
+
`}}}();Vr.hash="ad967afd45af0d5976982c70eaadb330";const zr=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"input"}],a=[{alias:null,args:[{kind:"Variable",name:"input",variableName:"input"}],concreteType:"DeleteApiKeyMutationPayload",kind:"LinkedField",name:"deleteSystemApiKey",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:"SystemAPIKeysTableDeleteAPIKeyMutation",selections:a,type:"Mutation",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"SystemAPIKeysTableDeleteAPIKeyMutation",selections:a},params:{cacheID:"a8c45c42b5becca8efa65334285a2f97",id:null,metadata:{},name:"SystemAPIKeysTableDeleteAPIKeyMutation",operationKind:"mutation",text:`mutation SystemAPIKeysTableDeleteAPIKeyMutation(
|
|
3295
3300
|
$input: DeleteApiKeyInput!
|
|
3296
3301
|
) {
|
|
3297
3302
|
deleteSystemApiKey(input: $input) {
|
|
3298
3303
|
__typename
|
|
3299
|
-
|
|
3304
|
+
apiKeyId
|
|
3300
3305
|
}
|
|
3301
3306
|
}
|
|
3302
|
-
`}}}();
|
|
3307
|
+
`}}}();zr.hash="55ab8200b5bfda0aa73594ad5cfce96f";const $r={fragment:{argumentDefinitions:[],kind:"Fragment",metadata:null,name:"SystemAPIKeysTableQuery",selections:[{args:null,kind:"FragmentSpread",name:"SystemAPIKeysTableFragment"}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[],kind:"Operation",name:"SystemAPIKeysTableQuery",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}]},params:{cacheID:"94e06b8cd5879701a5d73bee083ad614",id:null,metadata:{},name:"SystemAPIKeysTableQuery",operationKind:"query",text:`query SystemAPIKeysTableQuery {
|
|
3303
3308
|
...SystemAPIKeysTableFragment
|
|
3304
3309
|
}
|
|
3305
3310
|
|
|
@@ -3312,7 +3317,15 @@ fragment SystemAPIKeysTableFragment on Query {
|
|
|
3312
3317
|
expiresAt
|
|
3313
3318
|
}
|
|
3314
3319
|
}
|
|
3315
|
-
`}}
|
|
3320
|
+
`}};$r.hash="de0fc04de739f0adfcbdeaff28b16265";const Qr={argumentDefinitions:[],kind:"Fragment",metadata:{refetch:{connection:null,fragmentPathInResult:[],operation:$r}},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};Qr.hash="de0fc04de739f0adfcbdeaff28b16265";function qm({query:n}){const[a,l]=T.useRefetchableFragment(Qr,n),t=de(),i=ie(),[r]=T.useMutation(zr),o=m.useCallback(g=>{r({variables:{input:{id:g}},onCompleted:()=>{i({title:"System key deleted",message:"The system key has been deleted and is no longer active."}),m.startTransition(()=>{l({},{fetchPolicy:"network-only"})})},onError:y=>{t({title:"Error deleting system key",message:y.message})}})},[r,t,i,l]),u=m.useMemo(()=>[...a.systemApiKeys],[a]),d=m.useMemo(()=>[{header:"Name",accessorKey:"name"},{header:"Description",accessorKey:"description",cell:se},{header:"Created At",accessorKey:"createdAt",cell:ke},{header:"Expires At",accessorKey:"expiresAt",cell:ke},{header:"",accessorKey:"id",size:10,cell:({row:y})=>e(h,{direction:"row",justifyContent:"end",width:"100%",children:e(Ja,{handleDelete:()=>{o(y.original.id)}})}),meta:{textAlign:"right"}}],[o]),p=me({columns:d,data:u,getCoreRowModel:ge()}),f=p.getRowModel().rows,c=p.getRowModel().rows.length===0;return s("table",{css:Ue,children:[e("thead",{children:p.getHeaderGroups().map(g=>e("tr",{children:g.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:[H(y.column.columnDef.header,y.getContext()),y.column.getIsSorted()?e(E,{className:"sort-icon",svg:y.column.getIsSorted()==="asc"?e(L.ArrowUpFilled,{}):e(L.ArrowDownFilled,{})}):null]})},y.id))},g.id))}),c?e(Be,{message:"No Keys"}):e("tbody",{children:f.map(g=>e("tr",{children:g.getVisibleCells().map(y=>e("td",{children:H(y.column.columnDef.cell,y.getContext())},y.id))},g.id))})]})}const Or=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
|
+
$input: DeleteApiKeyInput!
|
|
3322
|
+
) {
|
|
3323
|
+
deleteUserApiKey(input: $input) {
|
|
3324
|
+
__typename
|
|
3325
|
+
apiKeyId
|
|
3326
|
+
}
|
|
3327
|
+
}
|
|
3328
|
+
`}}}();Or.hash="9b1d898d1d9858016bed85000ce3906e";const jr={fragment:{argumentDefinitions:[],kind:"Fragment",metadata:null,name:"UserAPIKeysTableQuery",selections:[{args:null,kind:"FragmentSpread",name:"UserAPIKeysTableFragment"}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[],kind:"Operation",name:"UserAPIKeysTableQuery",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}]},params:{cacheID:"e70d413b072841dff8565a332590a549",id:null,metadata:{},name:"UserAPIKeysTableQuery",operationKind:"query",text:`query UserAPIKeysTableQuery {
|
|
3316
3329
|
...UserAPIKeysTableFragment
|
|
3317
3330
|
}
|
|
3318
3331
|
|
|
@@ -3323,14 +3336,12 @@ fragment UserAPIKeysTableFragment on Query {
|
|
|
3323
3336
|
description
|
|
3324
3337
|
createdAt
|
|
3325
3338
|
expiresAt
|
|
3339
|
+
user {
|
|
3340
|
+
email
|
|
3341
|
+
}
|
|
3326
3342
|
}
|
|
3327
3343
|
}
|
|
3328
|
-
`}};
|
|
3329
|
-
padding: var(--ac-global-dimension-size-200);
|
|
3330
|
-
.ac-field {
|
|
3331
|
-
width: 100%;
|
|
3332
|
-
}
|
|
3333
|
-
`,children:s(h,{direction:"row",gap:"size-100",alignItems:"end",children:[e(le,{label:"API Key",isReadOnly:!0,value:a,minWidth:"100%"}),e(X,{text:a,size:"normal"})]})})]})}const xr={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:"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,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:"475e4a6a89583e17246b7f9fe5b0cb84",id:null,metadata:{},name:"UsersCardQuery",operationKind:"query",text:`query UsersCardQuery {
|
|
3344
|
+
`}};jr.hash="c2b3a579bcb0ba915523ecb35cae3b44";const qr={argumentDefinitions:[],kind:"Fragment",metadata:{refetch:{connection:null,fragmentPathInResult:[],operation:jr}},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};qr.hash="c2b3a579bcb0ba915523ecb35cae3b44";const hl=70;function Um({query:n}){const[a,l]=T.useRefetchableFragment(qr,n),t=de(),i=ie(),[r]=T.useMutation(Or),o=m.useCallback(g=>{r({variables:{input:{id:g}},onCompleted:()=>{i({title:"User key deleted",message:"The user key has been deleted and is no longer active."}),m.startTransition(()=>{l({},{fetchPolicy:"network-only"})})},onError:y=>{t({title:"Error deleting user key",message:y.message})}})},[r,t,i,l]),u=m.useMemo(()=>[...a.userApiKeys],[a]),d=m.useMemo(()=>[{header:"Name",accessorKey:"name",size:100,cell:se},{header:"Description",accessorKey:"description",cell:se},{header:"Created At",accessorKey:"createdAt",size:hl,cell:ke},{header:"Expires At",accessorKey:"expiresAt",size:hl,cell:ke},{header:"User",size:120,accessorKey:"user.email",cell:se},{header:"",accessorKey:"id",size:10,cell:({row:y})=>e(h,{direction:"row",justifyContent:"end",width:"100%",children:e(Ja,{handleDelete:()=>{o(y.original.id)}})}),meta:{textAlign:"right"}}],[o]),p=me({columns:d,data:u,getCoreRowModel:ge()}),f=p.getRowModel().rows,c=p.getRowModel().rows.length===0;return s("table",{css:Ue,children:[e("thead",{children:p.getHeaderGroups().map(g=>e("tr",{children:g.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:[H(y.column.columnDef.header,y.getContext()),y.column.getIsSorted()?e(E,{className:"sort-icon",svg:y.column.getIsSorted()==="asc"?e(L.ArrowUpFilled,{}):e(L.ArrowDownFilled,{})}):null]})},y.id))},g.id))}),c?e(Be,{message:"No Keys"}):e("tbody",{children:f.map(g=>e("tr",{children:g.getVisibleCells().map(y=>e("td",{children:H(y.column.columnDef.cell,y.getContext())},y.id))},g.id))})]})}function Bm(){const n=T.useLazyLoadQuery(Vr,{},{fetchPolicy:"network-only"});return s(Se,{children:[e(B,{title:"System Keys",name:"System Keys",children:e(qm,{query:n})}),e(B,{title:"User Keys",name:"User Keys",children:e(Um,{query:n})})]})}function Hm(){const[n,a]=m.useState(null),l=de(),t=d=>{a(e(Wl,{jwt:d}))},[i,r]=T.useMutation(Nr),o=m.useCallback(d=>{i({variables:{...d,expiresAt:d.expiresAt||null},onCompleted:p=>{t(p.createSystemApiKey.jwt)},onError:p=>{l({title:"Error creating system key",message:p.message})}})},[i,l]),u=()=>{a(e(Jl,{onSubmit:o,isCommitting:r,defaultName:"System"}))};return s("div",{children:[e($a,{title:"API Keys",variant:"compact",extra:e(M,{variant:"default",size:"compact",icon:e(E,{svg:e(L.PlusCircleOutline,{})}),onClick:u,children:"System Key"}),children:e(m.Suspense,{fallback:e(F,{padding:"size-100",children:e(ue,{})}),children:e(Bm,{})})}),e(G,{onDismiss:()=>{a(null)},children:n})]})}const Ur={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 {
|
|
3334
3345
|
...UsersTable_users
|
|
3335
3346
|
}
|
|
3336
3347
|
|
|
@@ -3338,9 +3349,12 @@ fragment UsersTable_users on Query {
|
|
|
3338
3349
|
users {
|
|
3339
3350
|
edges {
|
|
3340
3351
|
user: node {
|
|
3352
|
+
id
|
|
3341
3353
|
email
|
|
3342
3354
|
username
|
|
3343
3355
|
createdAt
|
|
3356
|
+
authMethod
|
|
3357
|
+
profilePictureUrl
|
|
3344
3358
|
role {
|
|
3345
3359
|
name
|
|
3346
3360
|
}
|
|
@@ -3348,7 +3362,7 @@ fragment UsersTable_users on Query {
|
|
|
3348
3362
|
}
|
|
3349
3363
|
}
|
|
3350
3364
|
}
|
|
3351
|
-
`}};
|
|
3365
|
+
`}};Ur.hash="2b3e260c950dd1a6a1a6883ff6fb78c4";const Br=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"input"}],a=[{alias:null,args:[{kind:"Variable",name:"input",variableName:"input"}],concreteType:"UserMutationPayload",kind:"LinkedField",name:"createUser",plural:!1,selections:[{alias:null,args:null,concreteType:"User",kind:"LinkedField",name:"user",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}],storageKey:null}];return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"NewUserDialogMutation",selections:a,type:"Mutation",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"NewUserDialogMutation",selections:a},params:{cacheID:"a9bf3794a5355d9d0e0a3acebe7f3809",id:null,metadata:{},name:"NewUserDialogMutation",operationKind:"mutation",text:`mutation NewUserDialogMutation(
|
|
3352
3366
|
$input: CreateUserInput!
|
|
3353
3367
|
) {
|
|
3354
3368
|
createUser(input: $input) {
|
|
@@ -3358,9 +3372,58 @@ fragment UsersTable_users on Query {
|
|
|
3358
3372
|
}
|
|
3359
3373
|
}
|
|
3360
3374
|
}
|
|
3361
|
-
`}}}();
|
|
3375
|
+
`}}}();Br.hash="97d1aefa41e8831e57b6bb0d1a078a7c";function Gm({onNewUserCreated:n,onNewUserCreationError:a,onDismiss:l}){const[t,i]=T.useMutation(Br),r=m.useCallback(o=>{t({variables:{input:{email:o.email,username:o.username,password:o.password,role:o.role}},onCompleted:u=>{n(u.createUser.user.email)},onError:u=>{a(u)}})},[t,n,a]);return e(G,{onDismiss:l,isDismissable:!0,type:"modal",isKeyboardDismissDisabled:!0,children:e(U,{title:"Add user",children:e(Co,{onSubmit:r,isSubmitting:i})})})}const Hr={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
|
+
...UsersTable_users
|
|
3377
|
+
}
|
|
3378
|
+
|
|
3379
|
+
fragment UsersTable_users on Query {
|
|
3380
|
+
users {
|
|
3381
|
+
edges {
|
|
3382
|
+
user: node {
|
|
3383
|
+
id
|
|
3384
|
+
email
|
|
3385
|
+
username
|
|
3386
|
+
createdAt
|
|
3387
|
+
authMethod
|
|
3388
|
+
profilePictureUrl
|
|
3389
|
+
role {
|
|
3390
|
+
name
|
|
3391
|
+
}
|
|
3392
|
+
}
|
|
3393
|
+
}
|
|
3394
|
+
}
|
|
3395
|
+
}
|
|
3396
|
+
`}};Hr.hash="acd5e44c43deb927fea733697593c97d";const Gr={argumentDefinitions:[],kind:"Fragment",metadata:{refetch:{connection:null,fragmentPathInResult:[],operation:Hr}},name:"UsersTable_users",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}],type:"Query",abstractKey:null};Gr.hash="acd5e44c43deb927fea733697593c97d";const Wr=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"input"}],a=[{alias:null,args:[{kind:"Variable",name:"input",variableName:"input"}],kind:"ScalarField",name:"deleteUsers",storageKey:null}];return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"DeleteUserDialogMutation",selections:a,type:"Mutation",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"DeleteUserDialogMutation",selections:a},params:{cacheID:"00d3d0f3855e92e529bc446d0f426123",id:null,metadata:{},name:"DeleteUserDialogMutation",operationKind:"mutation",text:`mutation DeleteUserDialogMutation(
|
|
3397
|
+
$input: DeleteUsersInput!
|
|
3398
|
+
) {
|
|
3399
|
+
deleteUsers(input: $input)
|
|
3400
|
+
}
|
|
3401
|
+
`}}}();Wr.hash="a718ceab0ec0a7d461f6cd5e5b178a1f";function Wm({userId:n,onDeleted:a,onClose:l}){const[t,i]=T.useMutation(Wr),r=ie(),o=de(),u=m.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(U,{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:()=>{u()},disabled:i,children:"Delete user"})]})})]})}const Jr=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
|
+
$input: PatchUserInput!
|
|
3403
|
+
) {
|
|
3404
|
+
patchUser(input: $input) {
|
|
3405
|
+
__typename
|
|
3406
|
+
}
|
|
3407
|
+
}
|
|
3408
|
+
`}}}();Jr.hash="85b22da61ec094c28e97db2759622b69";const jn=4;function Jm({userId:n,onClose:a}){const l=de(),t=ie(),[i,r]=T.useMutation(Jr),{control:o,handleSubmit:u,formState:{isDirty:d}}=Fe({defaultValues:{newPassword:"",confirmPassword:""}}),p=m.useCallback(f=>{i({variables:{input:{userId:n,newPassword:f.newPassword}},onCompleted:()=>{t({title:"Password reset",message:"Users password has been reset."}),a()},onError:c=>{l({title:"Failed to reset password",message:c.message})}})},[i,l,t,a,n]);return e(U,{title:"Reset Password",isDismissable:!0,onDismiss:a,children:e(ve,{children:s(F,{padding:"size-200",children:[e(q,{name:"newPassword",control:o,rules:{required:"Password is required",minLength:{value:jn,message:`Password must be at least ${jn} characters`}},render:({field:{name:f,onChange:c,onBlur:g,value:y},fieldState:{invalid:k,error:b}})=>e(Z,{label:"New Password",type:"password",isRequired:!0,description:`Password must be at least ${jn} characters`,name:f,errorMessage:b==null?void 0:b.message,validationState:k?"invalid":"valid",onChange:c,onBlur:g,defaultValue:y})}),e(q,{name:"confirmPassword",control:o,rules:{required:"Password is required",minLength:{value:jn,message:`Password must be at least ${jn} characters`},validate:(f,c)=>f===c.newPassword||"Passwords do not match"},render:({field:{name:f,onChange:c,onBlur:g,value:y},fieldState:{invalid:k,error:b}})=>e(Z,{label:"Confirm Password",isRequired:!0,type:"password",description:"Confirm the new password",name:f,errorMessage:b==null?void 0:b.message,validationState:k?"invalid":"valid",onChange:c,onBlur:g,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:u(p),children:r?"Resetting...":"Reset Password"})})})]})})})}function Zm(n){return n==="LOCAL"}function Xm(n){const{userId:a,onUserDeleted:l,authMethod:t}=n,[i,r]=m.useState(null),o=m.useCallback(()=>{r(e(Wm,{userId:a,onClose:()=>r(null),onDeleted:()=>{l(),r(null)}}))},[a,l]),u=m.useCallback(()=>{r(e(Jm,{userId:a,onClose:()=>r(null)}))},[a]),d=m.useMemo(()=>{const p=e(W,{children:s(h,{direction:"row",gap:"size-75",justifyContent:"start",alignItems:"center",children:[e(E,{svg:e(L.TrashOutline,{})}),e(K,{children:"Delete"})]})},"deleteUser"),f=e(W,{children:s(h,{direction:"row",gap:"size-75",justifyContent:"start",alignItems:"center",children:[e(E,{svg:e(L.Refresh,{})}),e(K,{children:"Reset Password"})]})},"resetPassword"),c=[p];return Zm(t)&&c.push(f),c},[t]);return s("div",{onClick:p=>{p.preventDefault(),p.stopPropagation()},children:[e(Oe,{align:"end","aria-label":"User Actions",buttonSize:"compact",onAction:p=>{switch(p){case"deleteUser":o();break;case"resetPassword":u();break}},children:d}),e(G,{type:"modal",isDismissable:!0,onDismiss:()=>r(null),children:i})]})}const Zr=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
|
+
$input: PatchUserInput!
|
|
3410
|
+
) {
|
|
3411
|
+
patchUser(input: $input) {
|
|
3412
|
+
__typename
|
|
3413
|
+
}
|
|
3414
|
+
}
|
|
3415
|
+
`}}}();Zr.hash="468eff05b42e39b55f9aa5b9a7d2c483";function Ym({userId:n,email:a,currentRole:l,newRole:t,onRoleChanged:i,onClose:r}){const[o,u]=T.useMutation(Zr),d=ie(),p=de(),f=m.useCallback(()=>{o({variables:{input:{userId:n,newRole:t}},onCompleted:()=>{d({title:"Role Changed",message:"Users role has been changed."}),i(),r()},onError:c=>{p({title:"Failed to delete user",message:c.message})}})},[o,t,p,d,r,i,n]);return s(U,{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:Ra(l)})," to"," ",e("b",{children:Ra(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:u,children:"Change role"})]})})]})}const eg=55,ng=C`
|
|
3416
|
+
text-decoration: none;
|
|
3417
|
+
color: var(--ac-global-color-grey-600);
|
|
3418
|
+
font-size: 12px;
|
|
3419
|
+
&:hover {
|
|
3420
|
+
text-decoration: underline;
|
|
3421
|
+
}
|
|
3422
|
+
`,ag=C`
|
|
3423
|
+
height: ${eg}px;
|
|
3424
|
+
`,kl=n=>n.email==="admin@localhost"||n.username==="admin";function lg({query:n}){const[a,l]=m.useState(null),[t,i]=T.useRefetchableFragment(Gr,n),r=m.useMemo(()=>t.users.edges.map(({user:c})=>({id:c.id,email:c.email,username:c.username,profilePictureUrl:c.profilePictureUrl,createdAt:c.createdAt,role:c.role.name,authMethod:c.authMethod})),[t]),o=m.useCallback(()=>{m.startTransition(()=>{i({},{fetchPolicy:"network-only"})})},[i]),u=m.useMemo(()=>[{header:"user",accessorKey:"username",cell:({row:c})=>s(h,{direction:"row",gap:"size-50",alignItems:"center",children:[e(Zl,{name:c.original.username,profilePictureUrl:c.original.profilePictureUrl,size:20}),e("span",{children:c.original.username}),e("a",{href:`mailto:${c.original.email}`,css:ng,children:c.original.email})]})},{header:"method",accessorKey:"authMethod",size:10,cell:({row:c})=>c.original.authMethod.toLowerCase()},{header:"role",accessorKey:"role",cell:({row:c})=>kl(c.original)?Ra(c.original.role):e(Ko,{includeLabel:!1,onChange:g=>{g!==c.original.role&&l(e(Ym,{onClose:()=>l(null),onRoleChanged:o,currentRole:c.original.role,newRole:g,email:c.original.email,userId:c.original.id}))},role:Fo(c.original.role)?c.original.role:void 0})},{header:"created at",accessorKey:"createdAt",cell:ke},{header:"",accessorKey:"id",size:10,cell:({row:c})=>kl(c.original)?null:e(h,{direction:"row",justifyContent:"end",width:"100%",children:e(Xm,{userId:c.original.id,onUserDeleted:o,authMethod:c.original.authMethod})}),meta:{textAlign:"right"}}],[o]),d=me({columns:u,data:r,getCoreRowModel:ge(),getSortedRowModel:wn()}),p=d.getRowModel().rows,f=d.getRowModel().rows.length===0;return s("table",{css:Ue,children:[e("thead",{children:d.getHeaderGroups().map(c=>e("tr",{children:c.headers.map(g=>e("th",{colSpan:g.colSpan,children:g.isPlaceholder?null:s("div",{className:g.column.getCanSort()?"cursor-pointer":"",onClick:g.column.getToggleSortingHandler(),style:{left:g.getStart(),width:g.getSize()},children:[H(g.column.columnDef.header,g.getContext()),g.column.getIsSorted()?e(E,{className:"sort-icon",svg:g.column.getIsSorted()==="asc"?e(L.ArrowUpFilled,{}):e(L.ArrowDownFilled,{})}):null]})},g.id))},c.id))}),f?e(Be,{}):e("tbody",{children:p.map(c=>e("tr",{css:ag,children:c.getVisibleCells().map(g=>e("td",{children:H(g.column.columnDef.cell,g.getContext())},g.id))},c.id))}),e(G,{onDismiss:()=>l(null),isDismissable:!0,type:"modal",children:a})]})}function tg(){const[n,a]=m.useState(0),[l,t]=m.useState(null),i=ie(),r=de(),o=T.useLazyLoadQuery(Ur,{},{fetchKey:n,fetchPolicy:"store-and-network"});return s(z,{title:"Users",variant:"compact",bodyStyle:{padding:0,overflowX:"auto"},extra:e(M,{onClick:()=>{t(e(Gm,{onDismiss:()=>{t(null)},onNewUserCreated:u=>{t(null),i({title:"User added",message:`User ${u} has been added.`}),a(d=>d+1)},onNewUserCreationError:u=>{r({title:"Error adding user",message:u.message})}}))},variant:"default",size:"compact",icon:e(E,{svg:e(L.PlusCircleOutline,{})}),children:"Add User"}),children:[e(m.Suspense,{fallback:e(F,{padding:"size-200",children:e(ue,{})}),children:e(lg,{query:o})}),e(G,{onDismiss:()=>{t(null)},children:l})]})}const ig=C`
|
|
3362
3425
|
overflow-y: auto;
|
|
3363
|
-
`,
|
|
3426
|
+
`,rg=C`
|
|
3364
3427
|
padding: var(--ac-global-dimension-size-400);
|
|
3365
3428
|
max-width: 1000px;
|
|
3366
3429
|
min-width: 500px;
|
|
@@ -3368,12 +3431,12 @@ fragment UsersTable_users on Query {
|
|
|
3368
3431
|
width: 100%;
|
|
3369
3432
|
margin-left: auto;
|
|
3370
3433
|
margin-right: auto;
|
|
3371
|
-
`,
|
|
3434
|
+
`,sg=C`
|
|
3372
3435
|
.ac-field {
|
|
3373
3436
|
// Hacky solution to make the text fields fill the remaining space
|
|
3374
3437
|
width: calc(100% - var(--ac-global-dimension-size-600));
|
|
3375
3438
|
}
|
|
3376
|
-
`;function
|
|
3439
|
+
`;function dp(){return e("main",{css:ig,children:e("div",{css:rg,children:s(h,{direction:"column",gap:"size-200",width:"100%",children:[e(z,{title:"Platform Settings",variant:"compact",children:s("form",{css:sg,children:[s(h,{direction:"row",gap:"size-100",alignItems:"end",children:[e(Z,{label:"Hostname",value:Ea,isReadOnly:!0,description:"Connect to Phoenix over HTTP"}),e(Pa,{text:Ea})]}),s(h,{direction:"row",gap:"size-100",alignItems:"end",children:[e(Z,{label:"Platform Version",isReadOnly:!0,value:ia,description:"The version of the Phoenix server"}),e(Pa,{text:ia})]}),s(h,{direction:"row",gap:"size-100",alignItems:"end",children:[e(Z,{label:"Python Version",isReadOnly:!0,value:`pip install 'arize-phoenix==${ia}'`,description:"The version of the Python client library to use to connect to this Phoenix"}),e(Pa,{text:ia})]})]})}),e(Gl,{children:s(j,{children:[e(Hm,{}),e(tg,{})]})})]})})})}function Pa(n){return e(F,{paddingBottom:"19px",children:e(ne,{text:n.text,size:"normal"})})}const bl=window.Config.basename,Sl={width:"100%",height:"100%",border:"none",backgroundColor:"white"};function cp(){return s("div",{css:C`
|
|
3377
3440
|
display: flex;
|
|
3378
3441
|
flex-direction: column;
|
|
3379
3442
|
flex: 1 1 auto;
|
|
@@ -3386,19 +3449,7 @@ fragment UsersTable_users on Query {
|
|
|
3386
3449
|
flex: 1 1 auto;
|
|
3387
3450
|
height: 100%;
|
|
3388
3451
|
}
|
|
3389
|
-
`,children:[e(Y,{variant:"info",banner:!0,icon:e(
|
|
3390
|
-
$email: String!
|
|
3391
|
-
$password: String!
|
|
3392
|
-
) {
|
|
3393
|
-
login(input: {email: $email, password: $password})
|
|
3394
|
-
}
|
|
3395
|
-
`}}}();Ir.hash="88ab683f7b6bd5c87e77fe2751da8d4c";function um(){const n=ae(),[a,l]=u.useState(null),[t,i]=T.useMutation(Ir),r=u.useCallback(d=>{l(null),t({variables:d,onCompleted:()=>{n("/")},onError:()=>{l("Invalid Login")}})},[t,n]),{control:o,handleSubmit:c}=qe({defaultValues:{email:"",password:""}});return s(H,{children:[a?s(x,{paddingBottom:"size-100",children:[e(Y,{variant:"danger",children:a})," "]}):null,s(mn,{children:[e(G,{name:"email",control:o,render:({field:{onChange:d,value:m}})=>e(le,{label:"Email",name:"email",isRequired:!0,type:"email",onChange:d,value:m,placeholder:"your email address"})}),e(G,{name:"password",control:o,render:({field:{onChange:d,value:m}})=>e(le,{label:"Password",name:"password",type:"password",isRequired:!0,onChange:d,value:m,placeholder:"your password"})}),e("div",{css:C`
|
|
3396
|
-
margin-top: var(--ac-global-dimension-size-400);
|
|
3397
|
-
margin-bottom: var(--ac-global-dimension-size-50);
|
|
3398
|
-
button {
|
|
3399
|
-
width: 100%;
|
|
3400
|
-
}
|
|
3401
|
-
`,children:e(N,{variant:"primary",loading:i,onClick:c(r),children:"Login"})})]})]})}function mm(){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"})})]})]})}function Wm(){return s("main",{css:C`
|
|
3452
|
+
`,children:[e(Y,{variant:"info",banner:!0,icon:e(E,{svg:e(L.InfoFilled,{})}),children:"These APIs are under active development and are subject to change."}),s(Se,{children:[e(B,{name:"REST",children:({isSelected:n})=>n&&e("iframe",{src:`${bl}/docs`,style:Sl})}),e(B,{name:"GraphQL",children:({isSelected:n})=>n&&e("iframe",{src:`${bl}/graphql`,style:Sl})})]})]})}function ba({children:n}){return s("main",{css:C`
|
|
3402
3453
|
padding-top: 200px;
|
|
3403
3454
|
width: 100%;
|
|
3404
3455
|
height: 100vh;
|
|
@@ -3412,7 +3463,7 @@ fragment UsersTable_users on Query {
|
|
|
3412
3463
|
flex-direction: column;
|
|
3413
3464
|
justify-content: space-between;
|
|
3414
3465
|
box-sizing: border-box;
|
|
3415
|
-
`,children:[
|
|
3466
|
+
`,children:[e(F,{borderColor:"light",borderWidth:"thin",width:"size-5000",padding:"size-400",backgroundColor:"dark",marginStart:"auto",marginEnd:"auto",borderRadius:"medium",children:n}),s("footer",{css:C`
|
|
3416
3467
|
display: flex;
|
|
3417
3468
|
justify-content: center;
|
|
3418
3469
|
padding: var(--ac-global-dimension-size-400);
|
|
@@ -3426,12 +3477,193 @@ fragment UsersTable_users on Query {
|
|
|
3426
3477
|
text-decoration: underline;
|
|
3427
3478
|
}
|
|
3428
3479
|
}
|
|
3429
|
-
`,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}`})]})]})}const
|
|
3430
|
-
|
|
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 og(n){const a=ee(),{initialError:l,onSubmit:t}=n,[i,r]=m.useState(l),[o,u]=m.useState(!1),d=m.useCallback(async c=>{t==null||t(),r(null),u(!0);try{const y=await fetch("/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(c)});if(!y.ok){const k=y.status===429?"Too many requests. Please try again later.":"Invalid login";r(k);return}}catch{r("Invalid login");return}finally{u(()=>!1)}const g=xo();a(g)},[a,t,r]),{control:p,handleSubmit:f}=Fe({defaultValues:{email:"",password:""}});return s(j,{children:[i?s(F,{paddingBottom:"size-100",children:[e(Y,{variant:"danger",children:i})," "]}):null,s(ve,{children:[e(q,{name:"email",control:p,render:({field:{onChange:c,value:g}})=>e(Z,{label:"Email",name:"email",isRequired:!0,type:"email",onChange:c,value:g,placeholder:"your email address"})}),s("div",{css:C`
|
|
3481
|
+
position: relative;
|
|
3482
|
+
a {
|
|
3483
|
+
position: absolute;
|
|
3484
|
+
float: right;
|
|
3485
|
+
right: 0;
|
|
3486
|
+
top: var(--ac-global-dimension-size-50);
|
|
3487
|
+
font-size: 12px;
|
|
3488
|
+
}
|
|
3489
|
+
`,children:[e(q,{name:"password",control:p,render:({field:{onChange:c,value:g}})=>e(Z,{label:"Password",name:"password",type:"password",isRequired:!0,onChange:c,value:g,placeholder:"your password",onKeyDown:y=>{y.key==="Enter"&&f(d)()}})}),e(He,{to:"/forgot-password",children:"Forgot your password?"})]}),e("div",{css:C`
|
|
3490
|
+
margin-top: var(--ac-global-dimension-size-200);
|
|
3491
|
+
margin-bottom: var(--ac-global-dimension-size-50);
|
|
3492
|
+
button {
|
|
3493
|
+
width: 100%;
|
|
3494
|
+
}
|
|
3495
|
+
`,children:e(M,{variant:"primary",loading:o,onClick:f(d),children:"Login"})})]})]})}const dg=C`
|
|
3496
|
+
button {
|
|
3497
|
+
width: 100%;
|
|
3498
|
+
}
|
|
3499
|
+
i {
|
|
3500
|
+
display: block;
|
|
3501
|
+
width: 20px;
|
|
3502
|
+
height: 20px;
|
|
3503
|
+
padding-right: var(--ac-global-dimension-size-50);
|
|
3504
|
+
}
|
|
3505
|
+
&[data-provider^="aws"],
|
|
3506
|
+
&[data-provider^="google"] {
|
|
3507
|
+
button {
|
|
3508
|
+
background-color: white;
|
|
3509
|
+
color: black;
|
|
3510
|
+
&:hover {
|
|
3511
|
+
background-color: #ececec !important;
|
|
3512
|
+
}
|
|
3513
|
+
}
|
|
3514
|
+
}
|
|
3515
|
+
`;function cg({idpName:n,idpDisplayName:a,returnUrl:l}){return e("form",{action:`/oauth2/${n}/login${l?`?returnUrl=${l}`:""}`,method:"post",css:dg,"data-provider":n,children:s(M,{variant:"default",type:"submit",icon:e(ug,{idpName:n}),children:["Login with ",a]})})}function ug({idpName:n}){return n==="github"||n==="google"||n==="microsoft_entra_id"||n.startsWith("aws")?e("i",{children:e("div",{css:C`
|
|
3516
|
+
display: inline-block;
|
|
3517
|
+
width: 20px;
|
|
3518
|
+
height: 20px;
|
|
3519
|
+
position: relative;
|
|
3520
|
+
background-size: contain;
|
|
3521
|
+
background-repeat: no-repeat;
|
|
3522
|
+
background-position: 50%;
|
|
3523
|
+
&[data-provider^="github"] {
|
|
3524
|
+
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg width='20' height='20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10 0C4.477 0 0 4.36 0 9.74c0 4.304 2.865 7.955 6.839 9.243.5.09.682-.211.682-.47 0-.23-.008-.843-.013-1.656-2.782.588-3.369-1.306-3.369-1.306-.454-1.125-1.11-1.425-1.11-1.425-.908-.604.069-.592.069-.592 1.003.069 1.531 1.004 1.531 1.004.892 1.488 2.341 1.059 2.91.81.092-.63.35-1.06.636-1.303-2.22-.245-4.555-1.081-4.555-4.814 0-1.063.39-1.933 1.029-2.613-.103-.247-.446-1.238.098-2.578 0 0 .84-.262 2.75.998A9.818 9.818 0 0 1 10 4.71c.85.004 1.705.112 2.504.328 1.909-1.26 2.747-.998 2.747-.998.546 1.34.203 2.331.1 2.578.64.68 1.028 1.55 1.028 2.613 0 3.742-2.339 4.566-4.566 4.807.359.3.678.895.678 1.804 0 1.301-.012 2.352-.012 2.671 0 .261.18.564.688.47C17.137 17.69 20 14.042 20 9.74 20 4.36 15.522 0 10 0z' fill='%23161514' fill-rule='evenodd'/%3E%3C/svg%3E");
|
|
3525
|
+
}
|
|
3526
|
+
|
|
3527
|
+
&[data-provider^="google"] {
|
|
3528
|
+
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 48 48'%3E%3Cdefs%3E%3Cpath id='a' d='M44.5 20H24v8.5h11.8C34.7 33.9 30.1 37 24 37c-7.2 0-13-5.8-13-13s5.8-13 13-13c3.1 0 5.9 1.1 8.1 2.9l6.4-6.4C34.6 4.1 29.6 2 24 2 11.8 2 2 11.8 2 24s9.8 22 22 22c11 0 21-8 21-22 0-1.3-.2-2.7-.5-4z'/%3E%3C/defs%3E%3CclipPath id='b'%3E%3Cuse xlink:href='%23a' overflow='visible'/%3E%3C/clipPath%3E%3Cpath clip-path='url(%23b)' fill='%23FBBC05' d='M0 37V11l17 13z'/%3E%3Cpath clip-path='url(%23b)' fill='%23EA4335' d='M0 11l17 13 7-6.1L48 14V0H0z'/%3E%3Cpath clip-path='url(%23b)' fill='%2334A853' d='M0 37l30-23 7.9 1L48 0v48H0z'/%3E%3Cpath clip-path='url(%23b)' fill='%234285F4' d='M48 48L17 24l-4-3 35-10z'/%3E%3C/svg%3E");
|
|
3529
|
+
}
|
|
3530
|
+
&[data-provider^="microsoft"] {
|
|
3531
|
+
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='21' height='21'%3E%3Cpath fill='%23f25022' d='M1 1h9v9H1z'/%3E%3Cpath fill='%2300a4ef' d='M1 11h9v9H1z'/%3E%3Cpath fill='%237fba00' d='M11 1h9v9h-9z'/%3E%3Cpath fill='%23ffb900' d='M11 11h9v9h-9z'/%3E%3C/svg%3E");
|
|
3532
|
+
}
|
|
3533
|
+
&[data-provider^="aws"] {
|
|
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
|
+
}
|
|
3536
|
+
`,"data-provider":n})}):null}function el(){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 mg=C`
|
|
3537
|
+
text-align: center;
|
|
3538
|
+
margin-top: var(--ac-global-dimension-size-200);
|
|
3539
|
+
margin-bottom: var(--ac-global-dimension-size-200);
|
|
3540
|
+
color: var(--ac-global-text-color-700);
|
|
3541
|
+
`,gg=C`
|
|
3542
|
+
display: flex;
|
|
3543
|
+
flex-direction: column;
|
|
3544
|
+
gap: var(--ac-global-dimension-size-100);
|
|
3545
|
+
flex-wrap: wrap;
|
|
3546
|
+
justify-content: center;
|
|
3547
|
+
`;function up(){const n=window.Config.oAuth2Idps,a=n.length>0,[l,t]=oa(),i=l.get("returnUrl"),r=l.get("message");return s(ba,{children:[e(h,{direction:"column",gap:"size-200",alignItems:"center",children:e(F,{paddingBottom:"size-200",children:e(el,{})})}),r&&e(F,{paddingBottom:"size-100",children:e(Y,{variant:"success",children:r})}),e(og,{initialError:l.get("error"),onSubmit:()=>{t(o=>{const u=new URLSearchParams(o);return u.delete("message"),u.delete("error"),u})}}),a&&s(j,{children:[e("div",{css:mg,children:"or"}),e("ul",{css:gg,children:n.map(o=>e("li",{children:e(cg,{idpName:o.name,idpDisplayName:o.displayName,returnUrl:i},o.name)},o.name))})]})]})}const Xr=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
|
+
$input: PatchViewerInput!
|
|
3549
|
+
) {
|
|
3550
|
+
patchViewer(input: $input) {
|
|
3551
|
+
__typename
|
|
3552
|
+
}
|
|
3553
|
+
}
|
|
3554
|
+
`}}}();Xr.hash="f8f5c30b0e00c17cdda7557c73c3c2d3";const qn=4;function pg(){const n=ee(),a=de(),[l,t]=T.useMutation(Xr),{control:i,handleSubmit:r}=Fe({defaultValues:{currentPassword:"",newPassword:"",confirmPassword:""}}),o=m.useCallback(u=>{l({variables:{input:{currentPassword:u.currentPassword,newPassword:u.newPassword}},onCompleted:()=>{const d=Xl({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(ve,{onSubmit:r(o),children:[e(q,{name:"currentPassword",control:i,rules:{required:"the current is required"},render:({field:{name:u,onChange:d,onBlur:p,value:f},fieldState:{invalid:c,error:g}})=>e(Z,{label:"Old Password",type:"password",name:u,isRequired:!0,description:"The current password",errorMessage:g==null?void 0:g.message,validationState:c?"invalid":"valid",onChange:d,onBlur:p,value:f})}),e(q,{name:"newPassword",control:i,rules:{required:"Password is required",minLength:{value:qn,message:`Password must be at least ${qn} characters`},validate:(u,d)=>u!==d.currentPassword||"New password must be different"},render:({field:{name:u,onChange:d,onBlur:p,value:f},fieldState:{invalid:c,error:g}})=>e(Z,{label:"New Password",type:"password",isRequired:!0,description:`Password must be at least ${qn} characters`,name:u,errorMessage:g==null?void 0:g.message,validationState:c?"invalid":"valid",onChange:d,onBlur:p,defaultValue:f})}),e(q,{name:"confirmPassword",control:i,rules:{required:"Password is required",minLength:{value:qn,message:`Password must be at least ${qn} characters`},validate:(u,d)=>u===d.newPassword||"Passwords do not match"},render:({field:{name:u,onChange:d,onBlur:p,value:f},fieldState:{invalid:c,error:g}})=>e(Z,{label:"Confirm Password",isRequired:!0,type:"password",description:"Confirm the new password",name:u,errorMessage:g==null?void 0:g.message,validationState:c?"invalid":"valid",onChange:d,onBlur:p,defaultValue:f})}),e(F,{paddingTop:"size-200",children:s("div",{css:C`
|
|
3555
|
+
display: flex;
|
|
3556
|
+
flex-direction: row;
|
|
3557
|
+
gap: var(--ac-global-dimension-size-200);
|
|
3558
|
+
& > * {
|
|
3559
|
+
width: 50%;
|
|
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 mp(){return s(ba,{children:[e(h,{direction:"column",gap:"size-200",alignItems:"center",children:e(F,{paddingBottom:"size-200",children:e(el,{})})}),e(pg,{})]})}const Un=4,yg="An error occurred. Please try resetting again.";function fg({resetToken:n}){const a=ee(),[l,t]=m.useState(null),[i,r]=m.useState(!1),o=m.useCallback(async({resetToken:f,newPassword:c})=>{t(null),r(!0);try{const g=await fetch("/auth/password-reset",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({token:f,password:c})});if(!g.ok){const y=await g.text();t(y);return}}catch{t(yg);return}finally{r(()=>!1)}a(`/login?message=${encodeURIComponent("Password has been reset.")}`)},[t,a]),{control:u,handleSubmit:d,formState:{isDirty:p}}=Fe({defaultValues:{resetToken:n,newPassword:"",confirmPassword:""}});return s(j,{children:[l?e(F,{paddingBottom:"size-100",children:e(Y,{variant:"danger",children:l})}):null,s(ve,{onSubmit:d(o),children:[e(q,{name:"newPassword",control:u,rules:{required:"Password is required",minLength:{value:Un,message:`Password must be at least ${Un} characters`}},render:({field:{name:f,onChange:c,onBlur:g,value:y},fieldState:{invalid:k,error:b}})=>e(Z,{label:"New Password",type:"password",isRequired:!0,description:`Password must be at least ${Un} characters`,name:f,errorMessage:b==null?void 0:b.message,validationState:k?"invalid":"valid",onChange:c,onBlur:g,defaultValue:y})}),e(q,{name:"confirmPassword",control:u,rules:{required:"Password is required",minLength:{value:Un,message:`Password must be at least ${Un} characters`},validate:(f,c)=>f===c.newPassword||"Passwords do not match"},render:({field:{name:f,onChange:c,onBlur:g,value:y},fieldState:{invalid:k,error:b}})=>e(Z,{label:"Confirm Password",isRequired:!0,type:"password",description:"Confirm the new password",name:f,errorMessage:b==null?void 0:b.message,validationState:k?"invalid":"valid",onChange:c,onBlur:g,defaultValue:y})}),e("div",{css:C`
|
|
3562
|
+
margin-top: var(--ac-global-dimension-size-200);
|
|
3563
|
+
margin-bottom: var(--ac-global-dimension-size-50);
|
|
3564
|
+
button {
|
|
3565
|
+
width: 100%;
|
|
3566
|
+
}
|
|
3567
|
+
`,children:e(M,{variant:p?"primary":"default",type:"submit",disabled:i,children:i?"Resetting...":"Reset Password"})})]})]})}function gp(){const n=ee(),[a]=oa(),l=a.get("token");return l?s(ba,{children:[e(h,{direction:"column",gap:"size-200",alignItems:"center",children:e(F,{paddingBottom:"size-200",children:e(el,{})})}),e(fg,{resetToken:l}),e(F,{paddingTop:"size-200",children:e(h,{direction:"column",alignItems:"center",justifyContent:"center",children:e(He,{to:"/login",children:"Back to Login"})})})]}):(n("/login"),null)}const Yr=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
|
+
viewer {
|
|
3569
|
+
id
|
|
3570
|
+
email
|
|
3571
|
+
}
|
|
3572
|
+
}
|
|
3573
|
+
`}}}();Yr.hash="ccd75708c3ba7c1b283f7858dfa8d20e";async function pp(){const n=await T.fetchQuery(Ke,Yr,{}).toPromise();return n!=null&&n.viewer?n:xn("/login")}function hg({onResetSent:n}){const[a,l]=m.useState(null),[t,i]=m.useState(!1),r=m.useCallback(async d=>{l(null),i(!0);try{const p=await fetch("/auth/password-reset-email",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(d)});if(!p.ok){const f=await p.text();l(f);return}n()}finally{i(()=>!1)}},[n,l]),{control:o,handleSubmit:u}=Fe({defaultValues:{email:""}});return s(j,{children:[a?e(F,{paddingBottom:"size-100",children:e(Y,{variant:"danger",children:a})}):null,s(ve,{onSubmit:u(r),children:[e(q,{name:"email",control:o,render:({field:{onChange:d,value:p}})=>e(Z,{label:"Email",name:"email",isRequired:!0,type:"email",onChange:d,value:p,placeholder:"your email address",description:"Enter the email address associated with your account."})}),e("div",{css:C`
|
|
3574
|
+
margin-top: var(--ac-global-dimension-size-200);
|
|
3575
|
+
margin-bottom: var(--ac-global-dimension-size-50);
|
|
3576
|
+
button {
|
|
3577
|
+
width: 100%;
|
|
3578
|
+
}
|
|
3579
|
+
`,children:e(M,{variant:"primary",type:"submit",loading:t,children:"Send"})})]})]})}function yp(){const[n,a]=m.useState(!1),l=n?s(h,{direction:"column",alignItems:"center",justifyContent:"center",gap:"size-100",children:[e(te,{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(j,{children:[s(h,{direction:"column",alignItems:"center",justifyContent:"center",gap:"size-100",children:[e(te,{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(hg,{onResetSent:()=>a(!0)})]});return e(ba,{children:s("div",{css:C`
|
|
3581
|
+
& a {
|
|
3582
|
+
text-align: center;
|
|
3583
|
+
width: 100%;
|
|
3584
|
+
display: block;
|
|
3585
|
+
text-align: center;
|
|
3586
|
+
padding-top: var(--ac-global-dimension-size-200);
|
|
3587
|
+
}
|
|
3588
|
+
`,children:[l,e(h,{direction:"column",alignItems:"center",justifyContent:"center",gap:"size-200",children:e(He,{to:"/login",children:"Back to Login"})})]})})}const es=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"input"}],a=[{kind:"Variable",name:"input",variableName:"input"}],l={alias:null,args:null,kind:"ScalarField",name:"jwt",storageKey:null},t={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null};return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"ViewerAPIKeysCreateUserAPIKeyMutation",selections:[{alias:null,args:a,concreteType:"CreateUserApiKeyMutationPayload",kind:"LinkedField",name:"createUserApiKey",plural:!1,selections:[l,{alias:null,args:null,concreteType:"UserApiKey",kind:"LinkedField",name:"apiKey",plural:!1,selections:[t,{alias:null,args:null,concreteType:"User",kind:"LinkedField",name:"user",plural:!1,selections:[{args:null,kind:"FragmentSpread",name:"APIKeysTableFragment"}],storageKey:null}],storageKey:null}],storageKey:null}],type:"Mutation",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"ViewerAPIKeysCreateUserAPIKeyMutation",selections:[{alias:null,args:a,concreteType:"CreateUserApiKeyMutationPayload",kind:"LinkedField",name:"createUserApiKey",plural:!1,selections:[l,{alias:null,args:null,concreteType:"UserApiKey",kind:"LinkedField",name:"apiKey",plural:!1,selections:[t,{alias:null,args:null,concreteType:"User",kind:"LinkedField",name:"user",plural:!1,selections:[{alias:null,args:null,concreteType:"UserApiKey",kind:"LinkedField",name:"apiKeys",plural:!0,selections:[t,{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},t],storageKey:null}],storageKey:null}],storageKey:null}]},params:{cacheID:"572bf0f64678128defccf833e6a5d4ce",id:null,metadata:{},name:"ViewerAPIKeysCreateUserAPIKeyMutation",operationKind:"mutation",text:`mutation ViewerAPIKeysCreateUserAPIKeyMutation(
|
|
3589
|
+
$input: CreateUserApiKeyInput!
|
|
3590
|
+
) {
|
|
3591
|
+
createUserApiKey(input: $input) {
|
|
3592
|
+
jwt
|
|
3593
|
+
apiKey {
|
|
3594
|
+
id
|
|
3595
|
+
user {
|
|
3596
|
+
...APIKeysTableFragment
|
|
3597
|
+
}
|
|
3598
|
+
}
|
|
3599
|
+
}
|
|
3600
|
+
}
|
|
3601
|
+
|
|
3602
|
+
fragment APIKeysTableFragment on User {
|
|
3603
|
+
apiKeys {
|
|
3604
|
+
id
|
|
3605
|
+
name
|
|
3606
|
+
description
|
|
3607
|
+
createdAt
|
|
3608
|
+
expiresAt
|
|
3609
|
+
}
|
|
3610
|
+
id
|
|
3431
3611
|
}
|
|
3432
|
-
`}}}();
|
|
3612
|
+
`}}}();es.hash="28061ae008e197468be6fd5f2775ccb0";const ns=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"input"}],a=[{kind:"Variable",name:"input",variableName:"input"}],l={alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},t={alias:null,args:null,kind:"ScalarField",name:"apiKeyId",storageKey:null};return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"APIKeysTableDeleteAPIKeyMutation",selections:[{alias:null,args:a,concreteType:"DeleteApiKeyMutationPayload",kind:"LinkedField",name:"deleteUserApiKey",plural:!1,selections:[l,t,{alias:null,args:null,concreteType:"Query",kind:"LinkedField",name:"query",plural:!1,selections:[{args:null,kind:"FragmentSpread",name:"UserAPIKeysTableFragment"}],storageKey:null}],storageKey:null}],type:"Mutation",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"APIKeysTableDeleteAPIKeyMutation",selections:[{alias:null,args:a,concreteType:"DeleteApiKeyMutationPayload",kind:"LinkedField",name:"deleteUserApiKey",plural:!1,selections:[l,t,{alias:null,args:null,concreteType:"Query",kind:"LinkedField",name:"query",plural:!1,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}],storageKey:null}],storageKey:null}]},params:{cacheID:"f28a00e7a6eb2e18b1f8b31c8231c2b7",id:null,metadata:{},name:"APIKeysTableDeleteAPIKeyMutation",operationKind:"mutation",text:`mutation APIKeysTableDeleteAPIKeyMutation(
|
|
3613
|
+
$input: DeleteApiKeyInput!
|
|
3614
|
+
) {
|
|
3615
|
+
deleteUserApiKey(input: $input) {
|
|
3616
|
+
__typename
|
|
3617
|
+
apiKeyId
|
|
3618
|
+
query {
|
|
3619
|
+
...UserAPIKeysTableFragment
|
|
3620
|
+
}
|
|
3621
|
+
}
|
|
3622
|
+
}
|
|
3623
|
+
|
|
3624
|
+
fragment UserAPIKeysTableFragment on Query {
|
|
3625
|
+
userApiKeys {
|
|
3626
|
+
id
|
|
3627
|
+
name
|
|
3628
|
+
description
|
|
3629
|
+
createdAt
|
|
3630
|
+
expiresAt
|
|
3631
|
+
user {
|
|
3632
|
+
email
|
|
3633
|
+
}
|
|
3634
|
+
}
|
|
3635
|
+
}
|
|
3636
|
+
`}}}();ns.hash="3a505d9d13944798a57fc873ddf0992d";const as=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:"APIKeysTableQuery",selections:[{alias:null,args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{args:null,kind:"FragmentSpread",name:"APIKeysTableFragment"}],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"APIKeysTableQuery",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:"UserApiKey",kind:"LinkedField",name:"apiKeys",plural:!0,selections:[l,{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:"User",abstractKey:null}],storageKey:null}]},params:{cacheID:"e677b5974fa137ac3a26acde353767d8",id:null,metadata:{},name:"APIKeysTableQuery",operationKind:"query",text:`query APIKeysTableQuery(
|
|
3637
|
+
$id: GlobalID!
|
|
3638
|
+
) {
|
|
3639
|
+
node(id: $id) {
|
|
3640
|
+
__typename
|
|
3641
|
+
...APIKeysTableFragment
|
|
3642
|
+
__isNode: __typename
|
|
3643
|
+
id
|
|
3644
|
+
}
|
|
3645
|
+
}
|
|
3646
|
+
|
|
3647
|
+
fragment APIKeysTableFragment on User {
|
|
3648
|
+
apiKeys {
|
|
3649
|
+
id
|
|
3650
|
+
name
|
|
3651
|
+
description
|
|
3652
|
+
createdAt
|
|
3653
|
+
expiresAt
|
|
3654
|
+
}
|
|
3655
|
+
id
|
|
3656
|
+
}
|
|
3657
|
+
`}}}();as.hash="6c32098d55e4cba859dcec73f3ccd28c";const ls=function(){var n={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null};return{argumentDefinitions:[],kind:"Fragment",metadata:{refetch:{connection:null,fragmentPathInResult:["node"],operation:as,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}}();ls.hash="6c32098d55e4cba859dcec73f3ccd28c";const vl=70;function kg({query:n}){const[a,l]=T.useRefetchableFragment(ls,n),t=ie(),[i]=T.useMutation(ns),r=m.useCallback(c=>{i({variables:{input:{id:c}},onCompleted:()=>{t({title:"API key deleted",message:"The key has been deleted and is no longer active."}),m.startTransition(()=>{l({},{fetchPolicy:"network-only"})})}})},[i,t,l]),o=m.useMemo(()=>[...a.apiKeys],[a]),u=m.useMemo(()=>[{header:"Name",accessorKey:"name",size:100,cell:se},{header:"Description",accessorKey:"description",cell:se},{header:"Created At",accessorKey:"createdAt",size:vl,cell:ke},{header:"Expires At",accessorKey:"expiresAt",size:vl,cell:ke},{header:"",accessorKey:"id",size:10,cell:({row:g})=>e(h,{direction:"row",justifyContent:"end",width:"100%",children:e(Ja,{handleDelete:()=>{r(g.original.id)}})}),meta:{textAlign:"right"}}],[r]),d=me({columns:u,data:o,getCoreRowModel:ge()}),p=d.getRowModel().rows,f=d.getRowModel().rows.length===0;return s("table",{css:Ue,children:[e("thead",{children:d.getHeaderGroups().map(c=>e("tr",{children:c.headers.map(g=>e("th",{colSpan:g.colSpan,children:g.isPlaceholder?null:s("div",{className:g.column.getCanSort()?"cursor-pointer":"",onClick:g.column.getToggleSortingHandler(),style:{left:g.getStart(),width:g.getSize()},children:[H(g.column.columnDef.header,g.getContext()),g.column.getIsSorted()?e(E,{className:"sort-icon",svg:g.column.getIsSorted()==="asc"?e(L.ArrowUpFilled,{}):e(L.ArrowDownFilled,{})}):null]})},g.id))},c.id))}),f?e(Be,{message:"No Keys"}):e("tbody",{children:p.map(c=>e("tr",{children:c.getVisibleCells().map(g=>e("td",{children:H(g.column.columnDef.cell,g.getContext())},g.id))},c.id))})]})}function bg({viewer:n}){const[a,l]=m.useState(null),t=de(),[i,r]=T.useMutation(es),o=m.useCallback(u=>{i({variables:{input:{...u,expiresAt:u.expiresAt||null}},onCompleted:d=>{l(e(Wl,{jwt:d.createUserApiKey.jwt}))},onError:d=>{t({title:"Error creating API key",message:d.message})}})},[i,t]);return s(z,{title:"API Keys",variant:"compact",bodyStyle:{padding:0},extra:e(M,{variant:"default",size:"compact",icon:e(E,{svg:e(L.PlusCircleOutline,{})}),onClick:()=>l(e(Jl,{onSubmit:o,isCommitting:r})),children:"New Key"}),children:[e(kg,{query:n}),e(G,{onDismiss:()=>{l(null)},children:a})]})}const ts=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
|
+
$input: PatchViewerInput!
|
|
3659
|
+
) {
|
|
3660
|
+
patchViewer(input: $input) {
|
|
3661
|
+
__typename
|
|
3662
|
+
}
|
|
3663
|
+
}
|
|
3664
|
+
`}}}();ts.hash="4a11ca65151d84fe95f636763c91dc68";function Sg(){const{viewer:n,refetchViewer:a}=Yl(),l=de(),t=ie(),[i,r]=T.useMutation(ts),o=ee(),{control:u,handleSubmit:d,formState:{isDirty:p},reset:f}=Fe({defaultValues:{username:(n==null?void 0:n.username)||""}}),c=m.useCallback(g=>{i({variables:{input:{newUsername:g.username}},onCompleted:()=>{t({title:"Profile updated",message:"Your profile has been updated"}),f({username:g.username}),a()},onError:y=>{l({title:"Failed update profile",message:y.message})}})},[i,t,f,a,l]);return n?s(z,{title:"Profile",variant:"compact",bodyStyle:{padding:0},extra: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(Zl,{name:n.username||n.email,profilePictureUrl:n.profilePictureUrl}),s(h,{direction:"column",gap:"size-50",children:[e(te,{level:2,weight:"heavy",children:n.username||n.email}),e(K,{children:n.role.name.toLocaleLowerCase()})]})]})}),e(F,{children:s(ve,{onSubmit:d(c),children:[s(F,{padding:"size-200",children:[e(Z,{label:"Email",value:n.email,isReadOnly:!0}),e(q,{name:"username",control:u,rules:{required:"A username is required as it needs to be unique"},render:({field:{name:g,onChange:y,onBlur:k,value:b},fieldState:{invalid:v,error:S}})=>e(Z,{label:"Username",isRequired:!0,description:"A unique username",name:g,errorMessage:S==null?void 0:S.message,validationState:v?"invalid":"valid",onChange:y,onBlur:k,defaultValue:b})})]}),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:p?"primary":"default",size:"compact",disabled:!p,onClick:()=>{d(c)()},children:r?"Saving...":"Save"})})})]})})]}):null}const vg=C`
|
|
3433
3665
|
overflow-y: auto;
|
|
3434
|
-
`,
|
|
3666
|
+
`,Cg=C`
|
|
3435
3667
|
padding: var(--ac-global-dimension-size-400);
|
|
3436
3668
|
max-width: 800px;
|
|
3437
3669
|
min-width: 500px;
|
|
@@ -3439,4 +3671,40 @@ fragment UsersTable_users on Query {
|
|
|
3439
3671
|
width: 100%;
|
|
3440
3672
|
margin-left: auto;
|
|
3441
3673
|
margin-right: auto;
|
|
3442
|
-
`;function
|
|
3674
|
+
`;function fp(){const{viewer:n}=Yl();return n?e("main",{css:vg,children:e("div",{css:Cg,children:s(h,{direction:"column",gap:"size-200",children:[e(Sg,{}),e(bg,{viewer:n})]})})}):null}const is=m.createContext(null);function Fg({children:n,...a}){const l=m.useRef();return l.current||(l.current=Do(a)),e(is.Provider,{value:l.current,children:n})}function Na(n,a){const l=Ce.useContext(is);if(!l)throw new Error("Missing PlaygroundContext.Provider in the tree");return za(l,n,a)}function Kg(){return e(z,{title:"Input",collapsible:!0,variant:"compact",children:"Input goes here"})}function xg(n){return n==="chat"||n==="text_completion"}function Dg(){const n=Na(l=>l.operationType),a=Na(l=>l.setOperationType);return s(Ts,{value:n,variant:"inline-button",onChange:l=>{xg(l)&&a(l)},children:[e(nl,{label:"Chat",value:"chat",children:"Chat"}),e(nl,{label:"Completion",value:"text_completion",children:"Completion"})]})}function Tg(){return e(z,{title:"Output",collapsible:!0,variant:"compact",children:"Output goes here"})}function Ig(){const n=Na(a=>a.operationType);return e(z,{title:"Template",collapsible:!0,variant:"compact",children:n==="chat"?e("div",{children:"Chat Template goes here"}):e("div",{children:"Completion Template goes here"})})}function Lg(){return e(z,{title:"Tools",collapsible:!0,variant:"compact",children:"Tools go here"})}const Cl=C`
|
|
3675
|
+
padding: var(--ac-global-dimension-size-200);
|
|
3676
|
+
overflow: auto;
|
|
3677
|
+
display: flex;
|
|
3678
|
+
flex-direction: column;
|
|
3679
|
+
gap: var(--ac-global-dimension-size-200);
|
|
3680
|
+
`;function wg(){return s(Fg,{children:[e(F,{borderBottomColor:"dark",borderBottomWidth:"thin",padding:"size-200",children:s(h,{direction:"row",justifyContent:"space-between",children:[e(F,{children:s(h,{direction:"row",gap:"size-200",alignItems:"center",children:[e(te,{level:1,children:"Playground"}),e(Dg,{})]})}),e(M,{variant:"default",children:"API Keys"})]})}),s(Ge,{direction:"horizontal",children:[s(re,{defaultSize:50,order:1,css:Cl,children:[e(Ig,{}),e(Lg,{})]}),e(We,{css:kn}),s(re,{defaultSize:50,order:2,css:Cl,children:[e(Kg,{}),e(Tg,{})]})]})]})}function hp(){return e(wg,{})}function kp(){const n=An();return e(To,{query:n,children:e(De,{})})}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,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:"60c31f9b6cb4ed2cbdfcfe1c11255556",id:null,metadata:{},name:"authenticatedRootLoaderQuery",operationKind:"query",text:`query authenticatedRootLoaderQuery {
|
|
3681
|
+
...ViewerContext_viewer
|
|
3682
|
+
viewer {
|
|
3683
|
+
passwordNeedsReset
|
|
3684
|
+
}
|
|
3685
|
+
}
|
|
3686
|
+
|
|
3687
|
+
fragment APIKeysTableFragment on User {
|
|
3688
|
+
apiKeys {
|
|
3689
|
+
id
|
|
3690
|
+
name
|
|
3691
|
+
description
|
|
3692
|
+
createdAt
|
|
3693
|
+
expiresAt
|
|
3694
|
+
}
|
|
3695
|
+
id
|
|
3696
|
+
}
|
|
3697
|
+
|
|
3698
|
+
fragment ViewerContext_viewer on Query {
|
|
3699
|
+
viewer {
|
|
3700
|
+
id
|
|
3701
|
+
username
|
|
3702
|
+
email
|
|
3703
|
+
profilePictureUrl
|
|
3704
|
+
role {
|
|
3705
|
+
name
|
|
3706
|
+
}
|
|
3707
|
+
...APIKeysTableFragment
|
|
3708
|
+
}
|
|
3709
|
+
}
|
|
3710
|
+
`}}}();rs.hash="d30a68846023740517243e9394be73a8";async function bp(){var a;const n=await T.fetchQuery(Ke,rs,{}).toPromise();if((a=n==null?void 0:n.viewer)!=null&&a.passwordNeedsReset){const l=Xl({path:"/reset-password"});return xn(l)}return n}export{kp as A,cp as B,Ng as C,jg as D,Gg as E,yp as F,Mg as G,up as L,Wg as M,fp as P,mp as R,dp as S,Jg as T,gp as a,bp as b,Vg as c,$g as d,qg as e,Qg as f,Og as g,zg as h,Zg as i,Xg as j,Bg as k,Ug as l,Yg as m,np as n,ep as o,Hg as p,rp as q,pp as r,ip as s,tp as t,Bo as u,lp as v,ap as w,op as x,sp as y,hp as z};
|