@langwatch/server 3.1.0-beta.21 → 3.1.0-beta.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/langevals/evaluators/topic_clustering/langevals_topic_clustering/__init__.py +36 -0
- package/langevals/evaluators/topic_clustering/langevals_topic_clustering/_logger.py +165 -0
- package/langevals/evaluators/topic_clustering/langevals_topic_clustering/batch_clustering.py +153 -0
- package/langevals/evaluators/topic_clustering/langevals_topic_clustering/build_response.py +77 -0
- package/langevals/evaluators/topic_clustering/langevals_topic_clustering/constants.py +7 -0
- package/langevals/evaluators/topic_clustering/langevals_topic_clustering/incremental_clustering.py +325 -0
- package/langevals/evaluators/topic_clustering/langevals_topic_clustering/topic_naming.py +432 -0
- package/langevals/evaluators/topic_clustering/langevals_topic_clustering/types.py +42 -0
- package/langevals/evaluators/topic_clustering/langevals_topic_clustering/utils.py +191 -0
- package/langevals/evaluators/topic_clustering/pyproject.toml +52 -0
- package/langevals/evaluators/topic_clustering/tests/test_topic_clustering.py +239 -0
- package/langevals/evaluators/topic_clustering/tests/test_topic_clustering_integration.py +97 -0
- package/langevals/evaluators/topic_clustering/tests/test_topic_naming.py +72 -0
- package/langevals/langevals/pytest_plugins/pass_rate_plugin.py +7 -1
- package/langevals/langevals/server.py +28 -0
- package/langevals/pyproject.toml +3 -0
- package/langevals/uv.lock +119 -20
- package/langwatch/dist/client/assets/{AnnotationsTable-BDAkYaz6.js → AnnotationsTable-uS_9SQ-g.js} +2 -2
- package/langwatch/dist/client/assets/{BatchEvaluationSummary-DMaQM_VB.js → BatchEvaluationSummary-DtFd8yKJ.js} +2 -2
- package/langwatch/dist/client/assets/{BudgetEditDrawer-CHaqmdIl.js → BudgetEditDrawer-CHEPz0hH.js} +2 -2
- package/langwatch/dist/client/assets/{ChartCard-D14PUg_d.js → ChartCard-s5fMPo7b.js} +2 -2
- package/langwatch/dist/client/assets/{ChatWindow-CRDnlP-Q.js → ChatWindow-C0XSteVJ.js} +2 -2
- package/langwatch/dist/client/assets/ChatWindow-DFEmNXQL.js +1 -0
- package/langwatch/dist/client/assets/{ConfirmDialog-CXIhncvW.js → ConfirmDialog-M94yLNvP.js} +2 -2
- package/langwatch/dist/client/assets/{ContactSalesBlock-CijLBwRC.js → ContactSalesBlock-CnnuZ8iI.js} +2 -2
- package/langwatch/dist/client/assets/{DSPyExperiment-B1YOL2m8.js → DSPyExperiment-CMA6lrlx.js} +2 -2
- package/langwatch/dist/client/assets/{FilterDisplay-BB0xWrLn.js → FilterDisplay-0S3NqCkq.js} +2 -2
- package/langwatch/dist/client/assets/{FormatMoney-w9vr_h0X.js → FormatMoney-CCygtAHg.js} +2 -2
- package/langwatch/dist/client/assets/{FoundryDrawer-CdJDXtpz.js → FoundryDrawer-B35xZ26C.js} +2 -2
- package/langwatch/dist/client/assets/{GatewayErrorPanel-DvE9U2dS.js → GatewayErrorPanel-BsaYQEie.js} +2 -2
- package/langwatch/dist/client/assets/{GatewayLayout-lv1p_6B5.js → GatewayLayout-LvwwrwMf.js} +2 -2
- package/langwatch/dist/client/assets/{GraphsLayout-BJ68J9e-.js → GraphsLayout-DJ-HI9N1.js} +2 -2
- package/langwatch/dist/client/assets/{GroupBindingInputRow-DebZBCnD.js → GroupBindingInputRow-CV-fBkX9.js} +2 -2
- package/langwatch/dist/client/assets/{MessagesTable-B6lYde-x.js → MessagesTable-9taaKCOZ.js} +2 -2
- package/langwatch/dist/client/assets/{NavigationFooter-CiOVzDUh.js → NavigationFooter-Dzvauw3l.js} +2 -2
- package/langwatch/dist/client/assets/{NoDataInfoBlock-quSW_MRm.js → NoDataInfoBlock-CLKl_wlX.js} +2 -2
- package/langwatch/dist/client/assets/{OpsPageShell-DJ1WlI6-.js → OpsPageShell-C_mTziRS.js} +2 -2
- package/langwatch/dist/client/assets/{OptimizationStudio-BlozXjcN.js → OptimizationStudio-D2zpsmJj.js} +8 -12
- package/langwatch/dist/client/assets/{PreconditionsField-BOfcWvmZ.js → PreconditionsField-WXB8kcTK.js} +2 -2
- package/langwatch/dist/client/assets/{SettingsLayout-CLCGxMAe.js → SettingsLayout--1gdEuhv.js} +2 -2
- package/langwatch/dist/client/assets/{SubscriptionPage-J8b2Zaj6.js → SubscriptionPage-B0ox_4kM.js} +2 -2
- package/langwatch/dist/client/assets/{VirtualKeySecretReveal-DR1VDLy7.js → VirtualKeySecretReveal-CRbI1dKQ.js} +2 -2
- package/langwatch/dist/client/assets/{WithPermissionGuard-DD8uo3UK.js → WithPermissionGuard-B4Jo8E5-.js} +2 -2
- package/langwatch/dist/client/assets/{__...path__-BZVaIayJ.js → __...path__-BF2zkD84.js} +2 -2
- package/langwatch/dist/client/assets/{_experiment_-B1aT-wS3.js → _experiment_-D02aoVQk.js} +2 -2
- package/langwatch/dist/client/assets/{_id_-oI_eq-I_.js → _id_-Ch8YmTiM.js} +2 -2
- package/langwatch/dist/client/assets/{_id_-DAqPuO73.js → _id_-D6ZvwHpH.js} +2 -2
- package/langwatch/dist/client/assets/{_id_-DUngklVb.js → _id_-DOC1ZkBm.js} +2 -2
- package/langwatch/dist/client/assets/{_id_-jFDAfbob.js → _id_-DfWwW6_N.js} +2 -2
- package/langwatch/dist/client/assets/{_id_-BKBrWGG0.js → _id_-DxUo4W7J.js} +2 -2
- package/langwatch/dist/client/assets/_not-found-DDh108-i.js +1 -0
- package/langwatch/dist/client/assets/{_project_-Bt1tayHB.js → _project_-_UUt5Ar9.js} +2 -2
- package/langwatch/dist/client/assets/{_runId_-CfvnDt5H.js → _runId_-Dimwzp48.js} +2 -2
- package/langwatch/dist/client/assets/_slug_-BMvKBwS_.js +2 -0
- package/langwatch/dist/client/assets/{_slug_-DZAdl0QS.js → _slug_-CE6VoDSC.js} +2 -2
- package/langwatch/dist/client/assets/{_slug_-DmoWXjKT.js → _slug_-OiOLG1Mv.js} +2 -2
- package/langwatch/dist/client/assets/{_team_-DL_wKSWK.js → _team_-DKvmwO_5.js} +2 -2
- package/langwatch/dist/client/assets/{_workflow_-DcMXLPUe.js → _workflow_-FkilKiB-.js} +3 -3
- package/langwatch/dist/client/assets/{_workflow_-NI9bac7d.js → _workflow_-gJZppg3h.js} +2 -2
- package/langwatch/dist/client/assets/{access-audit-CFwNwusI.js → access-audit-xcUVYMMT.js} +2 -2
- package/langwatch/dist/client/assets/{agents-Di4XRwcn.js → agents-D32g91cu.js} +2 -2
- package/langwatch/dist/client/assets/{all-C273mlDB.js → all-vnREzDZj.js} +2 -2
- package/langwatch/dist/client/assets/{analytics-CEAcSf6B.js → analytics-DP6Y4Feh.js} +2 -2
- package/langwatch/dist/client/assets/{annotation-scores-CHfn4LQp.js → annotation-scores-CjD4CEB6.js} +2 -2
- package/langwatch/dist/client/assets/{annotations-CHZQrha6.js → annotations-1rVXiDRQ.js} +2 -2
- package/langwatch/dist/client/assets/{api-keys-BT7HExHM.js → api-keys-BJpKyuaz.js} +2 -2
- package/langwatch/dist/client/assets/{audit-log-BGk-51Dt.js → audit-log-BdUdZjxp.js} +2 -2
- package/langwatch/dist/client/assets/{authentication-DvwXfkp-.js → authentication-8mQB00CC.js} +2 -2
- package/langwatch/dist/client/assets/{authorize-tXpHrWyw.js → authorize-BpUueMNW.js} +2 -2
- package/langwatch/dist/client/assets/{authorize-CRu9xlpU.js → authorize-CbNBtmxW.js} +2 -2
- package/langwatch/dist/client/assets/{automations-CjDvz9Ak.js → automations-34KMkRxd.js} +2 -2
- package/langwatch/dist/client/assets/{billing-plans-FUqEPN62.js → billing-plans-BUQp08MI.js} +2 -2
- package/langwatch/dist/client/assets/{budgets-BV6_RHrs.js → budgets-CdelE8Hv.js} +2 -2
- package/langwatch/dist/client/assets/{cache-rules-CtYA79E_.js → cache-rules-D2m1QlNJ.js} +2 -2
- package/langwatch/dist/client/assets/choose-C0LdeUiH.js +2 -0
- package/langwatch/dist/client/assets/{command-bar-CaJygoez.js → command-bar-DUK45yin.js} +7 -9
- package/langwatch/dist/client/assets/custom-hBq2K4FJ.js +1 -0
- package/langwatch/dist/client/assets/{datasets-vLWpH84_.js → datasets-ErNNhmjg.js} +2 -2
- package/langwatch/dist/client/assets/{dejaview-DwVR3RGg.js → dejaview-BaD4_v90.js} +2 -2
- package/langwatch/dist/client/assets/{dist-SwV3YZv3.js → dist-Cds4Mqhj.js} +4 -6
- package/langwatch/dist/client/assets/{edit-CyxsmQmW.js → edit-DpT8ejBV.js} +2 -2
- package/langwatch/dist/client/assets/{evaluations-BfgeZMph.js → evaluations-BdQ2Dm2r.js} +2 -2
- package/langwatch/dist/client/assets/{evaluations-HSQIMvbX.js → evaluations-C90I4VAr.js} +2 -2
- package/langwatch/dist/client/assets/{evaluators-DLHVvnrh.js → evaluators-ig_ugRLt.js} +2 -2
- package/langwatch/dist/client/assets/{foundry-Ckq0WjPU.js → foundry-B-X_80pD.js} +2 -2
- package/langwatch/dist/client/assets/{gateway-CDSYPZ6w.js → gateway-CS_mtJx-.js} +2 -2
- package/langwatch/dist/client/assets/{groups-CCCRUqPj.js → groups-Bp90ChP3.js} +2 -2
- package/langwatch/dist/client/assets/{index-Bm6z2fM9.js → index-TNQ6uyis.js} +4 -4
- package/langwatch/dist/client/assets/{license-CHOarGWr.js → license-CgnlvyuI.js} +2 -2
- package/langwatch/dist/client/assets/{me-CBya_vXs.js → me-DEqhm_KC.js} +2 -2
- package/langwatch/dist/client/assets/{members-lIFLh-rh.js → members-CUJANDtH.js} +2 -2
- package/langwatch/dist/client/assets/{messages-CG9j8Dz8.js → messages-fQBfCjvp.js} +2 -2
- package/langwatch/dist/client/assets/{metrics-C9pzeaI6.js → metrics-DeIxebpD.js} +2 -2
- package/langwatch/dist/client/assets/{model-costs-Bc5uqjkl.js → model-costs-C1RbgK--.js} +2 -2
- package/langwatch/dist/client/assets/{model-providers-B5UjRgS_.js → model-providers-Pv3ML_-t.js} +2 -2
- package/langwatch/dist/client/assets/{my-queue-BkEfiWyR.js → my-queue-BLre2NMr.js} +2 -2
- package/langwatch/dist/client/assets/{ops-Cc-g-CMn.js → ops-CCw-FJaT.js} +2 -2
- package/langwatch/dist/client/assets/{organization-features-CoIKKHkQ.js → organization-features-rqg-75mI.js} +2 -2
- package/langwatch/dist/client/assets/{organizations-DWcQUTzi.js → organizations-DjCzIHVx.js} +2 -2
- package/langwatch/dist/client/assets/{persistence-CTQ44vGL.js → persistence-BPvHS0F6.js} +2 -2
- package/langwatch/dist/client/assets/{plans-Dq3eFg5K.js → plans-Ch2Ol-Fd.js} +2 -2
- package/langwatch/dist/client/assets/{projections-CTNj1QBM.js → projections-it4FOVjm.js} +2 -2
- package/langwatch/dist/client/assets/{projects-BxM7C87h.js → projects-CjWZFLfn.js} +2 -2
- package/langwatch/dist/client/assets/{prompts-DhXnJT6e.js → prompts-DilmFH_s.js} +2 -2
- package/langwatch/dist/client/assets/{providers-DW7VWdqq.js → providers-tlLT_lTF.js} +2 -2
- package/langwatch/dist/client/assets/{reports-D3QFKhNP.js → reports-vlrcTrLs.js} +2 -2
- package/langwatch/dist/client/assets/{roles-B_0t5DWA.js → roles-DNgi-NQ9.js} +2 -2
- package/langwatch/dist/client/assets/{scenarios-BX3XslU0.js → scenarios-BmG_wDkR.js} +2 -2
- package/langwatch/dist/client/assets/{scim-DDsLO39r.js → scim-BKr1_FHt.js} +2 -2
- package/langwatch/dist/client/assets/{secrets-BvEGwDCy.js → secrets-CU8ocTGv.js} +2 -2
- package/langwatch/dist/client/assets/{settings-9giNiAQQ.js → settings-CDzdoYVK.js} +2 -2
- package/langwatch/dist/client/assets/{setup-HxXKoVKG.js → setup-nEvn2rjN.js} +2 -2
- package/langwatch/dist/client/assets/{subscription-DhyswDze.js → subscription-BPNl_6jF.js} +3 -3
- package/langwatch/dist/client/assets/{subscriptions-Dyyau22a.js → subscriptions-D0G-OE5C.js} +2 -2
- package/langwatch/dist/client/assets/{teams-DRmeAxzf.js → teams-DThgDQvB.js} +2 -2
- package/langwatch/dist/client/assets/{textOverflowHeuristic-JibhpzDV.js → textOverflowHeuristic-DTC8-Ffx.js} +2 -2
- package/langwatch/dist/client/assets/{topic-clustering-Bllfw5rZ.js → topic-clustering-BR2Mbpao.js} +2 -2
- package/langwatch/dist/client/assets/{topics-CpiGYxqb.js → topics-CI8GoNqp.js} +2 -2
- package/langwatch/dist/client/assets/{traceExecutor-CiHXJB0V.js → traceExecutor-CDUGyUaw.js} +2 -2
- package/langwatch/dist/client/assets/{usage-BnsstwBY.js → usage-B4mR7ut_.js} +2 -2
- package/langwatch/dist/client/assets/{usage-CoyGtJoI.js → usage-C8fbffYi.js} +2 -2
- package/langwatch/dist/client/assets/{useAdminResource-SPC5iBHM.js → useAdminResource-SmnnHro6.js} +2 -2
- package/langwatch/dist/client/assets/{useAnnotationQueues-2DKZTC7r.js → useAnnotationQueues-CA6Vk--V.js} +2 -2
- package/langwatch/dist/client/assets/{useAvailableEvaluators-HndTl2LV.js → useAvailableEvaluators-hmbmcRQr.js} +2 -2
- package/langwatch/dist/client/assets/{useDeleteDatasetConfirmation-BgWN6Qqb.js → useDeleteDatasetConfirmation-BCK_zUUe.js} +2 -2
- package/langwatch/dist/client/assets/{useWorkflowStore-e1wFCvo2.js → useWorkflowStore-QUJ3J8X9.js} +2 -2
- package/langwatch/dist/client/assets/{users-C6wjliCC.js → users-CfhanCfR.js} +2 -2
- package/langwatch/dist/client/assets/{users-tF6ZKeV1.js → users-HjuN3o6k.js} +2 -2
- package/langwatch/dist/client/assets/{virtual-keys-BL-65S0B.js → virtual-keys-Bj-MhW66.js} +2 -2
- package/langwatch/dist/client/assets/{wizard-faGkpZDT.js → wizard-dRWCVVx6.js} +2 -2
- package/langwatch/dist/client/assets/{workbench-Oj0s_YR-.js → workbench-CuixH3G1.js} +2 -2
- package/langwatch/dist/client/assets/{workflows-Cu9k-Twu.js → workflows-BT6m4Yu9.js} +2 -2
- package/langwatch/dist/client/index.html +3 -3
- package/langwatch/scripts/seed-dogfood-password.ts +163 -0
- package/langwatch/src/app/api/workflows/post_event/__tests__/post-event-evaluator.integration.test.ts +458 -0
- package/langwatch/src/app/api/workflows/post_event/__tests__/post-event-routing.test.ts +180 -0
- package/langwatch/src/app/api/workflows/post_event/__tests__/post-event.integration.test.ts +274 -0
- package/langwatch/src/app/api/workflows/post_event/post-event.ts +29 -1
- package/langwatch/src/components/agents/AgentCodeEditorDrawer.tsx +4 -5
- package/langwatch/src/components/agents/__tests__/AgentCodeEditorDrawer.integration.test.tsx +40 -0
- package/langwatch/src/components/evaluations/wizard/hooks/evaluation-wizard-store/slices/factories/__tests__/code-execution-node.factory.unit.test.ts +47 -0
- package/langwatch/src/components/evaluations/wizard/hooks/evaluation-wizard-store/slices/factories/code-execution-node.factory.ts +2 -4
- package/langwatch/src/components/experiments/BatchEvaluationV2/BatchEvaluationV2EvaluationResults.tsx +6 -1
- package/langwatch/src/optimization_studio/__tests__/registry.test.ts +29 -1
- package/langwatch/src/optimization_studio/components/Optimize.tsx +17 -3
- package/langwatch/src/optimization_studio/components/properties/AgentPropertiesPanel.tsx +4 -5
- package/langwatch/src/optimization_studio/hooks/workflowStoreCore.ts +17 -6
- package/langwatch/src/optimization_studio/hooks/workflowStoreCore.unit.test.ts +42 -0
- package/langwatch/src/optimization_studio/registry.ts +2 -4
- package/langwatch/src/optimization_studio/server/lambda/index.ts +12 -2
- package/langwatch/src/server/api/routers/workflows.ts +18 -0
- package/langwatch/src/server/evaluations-v3/execution/workflowBuilder.ts +3 -2
- package/langwatch/src/server/evaluations-v3/services/__tests__/experiment-run.service.getRun-null.unit.test.ts +71 -0
- package/langwatch/src/server/evaluations-v3/services/experiment-run.service.ts +18 -9
- package/langwatch/src/server/modelProviders/utils.ts +11 -1
- package/langwatch/src/server/nlpgo/__tests__/nlpgoFetch.integration.test.ts +248 -0
- package/langwatch/src/server/nlpgo/nlpgoFetch.ts +142 -0
- package/langwatch/src/server/routes/__tests__/playground-proxy.integration.test.ts +242 -0
- package/langwatch/src/server/routes/playground.ts +11 -1
- package/langwatch/src/server/routes/workflows.ts +17 -0
- package/langwatch/src/server/topicClustering/topicClustering.ts +33 -8
- package/langwatch/src/server/workflows/runWorkflow.ts +10 -13
- package/langwatch_nlp/langwatch_nlp/topic_clustering/topic_naming.py +39 -32
- package/langwatch_nlp/scripts/entrypoint.sh +67 -0
- package/package.json +1 -1
- package/packages/server/dist/cli.cjs +67 -94
- package/langwatch/dist/client/assets/ChatWindow-DzB-tNlQ.js +0 -1
- package/langwatch/dist/client/assets/_not-found-PEUaWdF3.js +0 -1
- package/langwatch/dist/client/assets/_slug_-C-8AjsjC.js +0 -2
- package/langwatch/dist/client/assets/choose--PBky27o.js +0 -2
- package/langwatch/dist/client/assets/custom-CSiS1liN.js +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{$s as e,Fa as t,Gn as n,Jn as r,Kn as i,Qi as a,Qs as o,Ss as s,Xs as c,Ys as l,_s as u,bs as d,dn as f,mn as p,ps as m,un as h,vs as g,xs as _,ys as v}from"./command-bar-CaJygoez.js";import{j as y,n as b}from"./stack-oJ9iWdbl.js";import{t as x}from"./box-BsM8YLGl.js";import{r as S}from"./dialog.anatomy-hrluUh9u.js";import{i as C,n as w,o as T,r as E,s as D,t as O}from"./tabs-DwV1cIZB.js";import{t as k}from"./tooltip-AEm0YeiF.js";import{in as ee}from"./dist-SwV3YZv3.js";import{t as A}from"./heading-D90dlSnH.js";import{t as j}from"./text-CwTrMF8x.js";import{t as M}from"./h-stack-BKLDJ2vg.js";import{a as N,i as P,n as F,r as I,t as te}from"./alert-SnQmACl1.js";import{n as L,r as R,t as z}from"./card-CMtKVPVl.js";import{Pt as B}from"./lu-Bf6j_N19.js";import{t as V}from"./link-CwZhwOLq.js";import{t as H}from"./v-stack-EOPQ57OZ.js";import{s as U}from"./auth-client-D3UhxhQi.js";import{t as W}from"./useOrganizationTeamProject-DC0iozx2.js";import{t as G}from"./arrow-up-right-Cmmi1ap5.js";import{t as K}from"./WithPermissionGuard-DD8uo3UK.js";import{t as q}from"./GraphsLayout-BJ68J9e-.js";var J=y(),Y=()=>{let{filterParams:e,queryOpts:t}=a(),n=U.analytics.topUsedDocuments.useQuery(e,t);return n.isLoading?(0,J.jsx)(x,{children:`Loading...`}):n.error?(0,J.jsx)(x,{children:`An error occurred`}):(0,J.jsxs)(H,{align:`start`,gap:4,children:[(0,J.jsx)(j,{fontSize:``,paddingTop:4,fontWeight:600,children:`Top 10 most used documents`}),(0,J.jsxs)(_,{variant:`line`,padding:0,margin:0,children:[(0,J.jsx)(d,{children:(0,J.jsxs)(s,{children:[(0,J.jsx)(v,{paddingLeft:0,children:`Document ID`}),(0,J.jsx)(v,{children:`Snippet`}),(0,J.jsx)(v,{children:`Usage Count`})]})}),(0,J.jsxs)(u,{children:[n.data?.topDocuments.length===0&&(0,J.jsx)(s,{children:(0,J.jsx)(g,{colSpan:2,children:`No documents found`})}),n.data?.topDocuments.map(e=>(0,J.jsxs)(s,{children:[(0,J.jsx)(g,{paddingLeft:0,children:(0,J.jsx)(k,{content:e.documentId,children:(0,J.jsx)(j,{lineClamp:1,wordBreak:`break-all`,display:`block`,children:e.documentId})})}),(0,J.jsx)(g,{children:(0,J.jsx)(k,{content:e.content,children:(0,J.jsx)(j,{lineClamp:1,wordBreak:`break-all`,display:`block`,children:e.content?e.content.substring(0,255)+(e.content.length>255?`...`:``):``})})}),(0,J.jsx)(g,{children:e.count})]},e.documentId))]})]})]})},X=()=>{let{filterParams:e,queryOpts:t}=a(),n=U.analytics.topUsedDocuments.useQuery(e,t).data?.totalUniqueDocuments;return(0,J.jsx)(i,{current:n})},Z=1440,ne={graphId:`threadMetrics`,graphType:`summary`,series:[{name:`Threads count`,colorSet:`greenTones`,metric:`metadata.thread_id`,aggregation:`cardinality`},{name:`Avg messages per thread`,colorSet:`orangeTones`,metric:`metadata.trace_id`,aggregation:`cardinality`,pipeline:{field:`thread_id`,aggregation:`avg`}},{name:`Avg thread duration`,colorSet:`purpleTones`,metric:`threads.average_duration_per_thread`,aggregation:`avg`}],includePrevious:!1,timeScale:Z,height:300},re=(0,J.jsx)(o,{size:`sm`,paddingY:10,children:(0,J.jsx)(l,{children:(0,J.jsxs)(H,{textAlign:`center`,children:[(0,J.jsx)(e,{textStyle:`sm`,children:`No user data yet`}),(0,J.jsxs)(c,{textStyle:`xs`,children:[`Start tracking users to see metrics here.`,` `,(0,J.jsx)(`a`,{href:`https://langwatch.ai/docs/integration/metadata-and-labels`,target:`_blank`,rel:`noopener noreferrer`,style:{textDecoration:`underline`},children:`Learn how to set up`})]})]})})});function Q(){let e={graphId:`messagesCountGraph`,graphType:`line`,series:[{name:`Traces`,metric:`metadata.trace_id`,aggregation:`cardinality`,colorSet:r.metadata.trace_id.colorSet}],groupBy:void 0,includePrevious:!0,timeScale:Z},t={graphId:`threadsCountGraph`,graphType:`line`,series:[{name:`Threads`,metric:`metadata.thread_id`,aggregation:`cardinality`,colorSet:r.metadata.thread_id.colorSet}],groupBy:void 0,includePrevious:!0,timeScale:Z},i={graphId:`usersCountGraph`,graphType:`line`,series:[{name:`Users`,metric:`metadata.user_id`,aggregation:`cardinality`,colorSet:r.metadata.user_id.colorSet,noDataUrl:`https://langwatch.ai/docs/integration/metadata-and-labels`}],groupBy:void 0,includePrevious:!0,timeScale:Z};return(0,J.jsxs)(S,{width:`full`,templateColumns:[`minmax(350px, 1fr)`,`minmax(350px, 1fr)`,`minmax(350px, 1fr)`,`minmax(350px, 2fr) minmax(250px, 1fr)`],gap:6,children:[(0,J.jsx)(D,{children:(0,J.jsx)(R,{border:`1px solid`,borderColor:`border.emphasized`,children:(0,J.jsx)(z,{paddingTop:2,children:(0,J.jsxs)(C,{variant:`plain`,defaultValue:`messages`,children:[(0,J.jsxs)(E,{gap:8,children:[(0,J.jsx)(T,{value:`messages`,paddingX:0,paddingBottom:0,height:`fit-content`,children:(0,J.jsx)(n,{input:{...e,graphType:`summary`},titleProps:{textStyle:`sm`,color:`fg`}})}),(0,J.jsx)(T,{value:`threads`,paddingX:0,paddingBottom:0,height:`fit-content`,children:(0,J.jsx)(n,{input:{...t,graphType:`summary`},titleProps:{textStyle:`sm`,color:`fg`}})}),(0,J.jsx)(T,{value:`users`,paddingX:0,paddingBottom:0,height:`fit-content`,children:(0,J.jsx)(n,{input:{...i,graphType:`summary`},titleProps:{textStyle:`sm`,color:`fg`}})}),(0,J.jsx)(w,{mt:`-1.5px`,height:`4px`,bg:`orange.400`,borderRadius:`1px`,bottom:0})]}),(0,J.jsx)(O,{value:`messages`,children:(0,J.jsx)(n,{input:e})}),(0,J.jsx)(O,{value:`threads`,children:(0,J.jsx)(n,{input:t})}),(0,J.jsx)(O,{value:`users`,children:(0,J.jsx)(n,{input:i,emptyState:re})})]})})})}),(0,J.jsx)(D,{rowSpan:2,children:(0,J.jsxs)(R,{width:`100%`,height:`100%`,children:[(0,J.jsx)(L,{paddingBottom:4,children:(0,J.jsx)(A,{size:`sm`,children:`Top Topics`})}),(0,J.jsx)(z,{overflowY:`auto`,children:(0,J.jsx)(f,{showTitle:!1})})]})}),(0,J.jsx)(D,{children:(0,J.jsxs)(R,{overflow:`auto`,children:[(0,J.jsx)(L,{children:(0,J.jsx)(A,{size:`sm`,children:`Thread Metrics`})}),(0,J.jsx)(z,{children:(0,J.jsx)(n,{input:ne})})]})})]})}var ie=()=>{let{hasPermission:e,project:t}=W(),i={graphId:`llmSummary`,graphType:`summary`,series:[{name:`Mean Tokens per Message`,metric:`performance.total_tokens`,aggregation:`avg`,colorSet:r.performance.total_tokens.colorSet},...e(`cost:view`)?[{name:`Mean Cost per Message`,metric:`performance.total_cost`,aggregation:`avg`,colorSet:r.performance.total_cost.colorSet}]:[],{name:`90th Percentile Time to First Token`,metric:`performance.first_token`,aggregation:`p90`,colorSet:r.performance.first_token.colorSet},{name:`90th Percentile Completion Time`,metric:`performance.completion_time`,aggregation:`p90`,colorSet:r.performance.completion_time.colorSet}],groupBy:void 0,includePrevious:!1,timeScale:`full`};return(0,J.jsxs)(R,{children:[(0,J.jsx)(L,{children:(0,J.jsxs)(M,{gap:1,children:[(0,J.jsx)(A,{size:`sm`,children:`Summary`}),t?.slug&&(0,J.jsx)(k,{content:`View LLM Metrics`,children:(0,J.jsx)(V,{href:`/${t.slug}/analytics/metrics`,children:(0,J.jsx)(B,{"aria-label":`View LLM Metrics`,variant:`ghost`,size:`2xs`,color:`fg.subtle`,children:(0,J.jsx)(G,{size:14})})})})]})}),(0,J.jsx)(z,{children:(0,J.jsx)(n,{input:i})})]})},$=1440;function ae(){let{hasPermission:e,project:t}=W(),i={graphId:`llmCallsGraph`,graphType:`area`,series:[{name:`LLM Calls`,metric:`metadata.trace_id`,aggregation:`cardinality`,colorSet:`colors`}],groupBy:`metadata.model`,includePrevious:!1,timeScale:$},a={graphId:`totalCostGraph`,graphType:`line`,series:[{name:r.performance.total_cost.label,metric:`performance.total_cost`,aggregation:`sum`,colorSet:r.performance.total_cost.colorSet}],groupBy:void 0,includePrevious:!0,timeScale:$},o={graphId:`totalTokensSummary`,graphType:`summary`,series:[{name:`Tokens`,metric:`performance.total_tokens`,aggregation:`sum`,colorSet:r.performance.total_tokens.colorSet}],groupBy:void 0,includePrevious:!1,timeScale:`full`},s={graphId:`tokensGraph`,graphType:`stacked_bar`,series:[{name:r.performance.prompt_tokens.label,metric:`performance.prompt_tokens`,aggregation:`sum`,colorSet:r.performance.prompt_tokens.colorSet},{name:r.performance.completion_tokens.label,metric:`performance.completion_tokens`,aggregation:`sum`,colorSet:r.performance.completion_tokens.colorSet}],groupBy:void 0,includePrevious:!1,timeScale:$},c={graphId:`evaluationsSummary`,graphType:`summary`,series:[{name:`Evaluation execution count`,metric:`evaluations.evaluation_runs`,aggregation:`cardinality`,key:``,colorSet:`colors`}],groupBy:`evaluations.evaluation_passed`,includePrevious:!1,timeScale:`full`},l={graphId:`overviewErrorTrend`,graphType:`stacked_bar`,series:[{name:`Traces`,metric:`metadata.trace_id`,aggregation:`cardinality`,colorSet:`positiveNegativeNeutral`}],groupBy:`error.has_error`,includePrevious:!1,timeScale:$},u={graphId:`overviewLatencyTrend`,graphType:`line`,series:[{name:r.performance.completion_time.label,metric:`performance.completion_time`,aggregation:`median`,colorSet:r.performance.completion_time.colorSet},{name:r.performance.first_token.label,metric:`performance.first_token`,aggregation:`median`,colorSet:r.performance.first_token.colorSet}],groupBy:void 0,includePrevious:!1,timeScale:$};return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsxs)(M,{paddingTop:6,paddingBottom:2,children:[(0,J.jsx)(A,{as:`h2`,size:`md`,children:`LLM Metrics`}),(0,J.jsx)(k,{content:`View LLM Metrics dashboard`,children:(0,J.jsx)(V,{href:`/${t?.slug}/analytics/metrics`,children:(0,J.jsx)(B,{"aria-label":`View LLM Metrics`,variant:`ghost`,size:`xs`,color:`fg.subtle`,children:(0,J.jsx)(G,{size:14})})})})]}),(0,J.jsxs)(S,{width:`100%`,templateColumns:`1fr 0.5fr`,gap:6,children:[(0,J.jsx)(D,{colSpan:2,children:(0,J.jsx)(R,{children:(0,J.jsx)(z,{children:(0,J.jsxs)(C,{variant:`plain`,defaultValue:`llmCallsGraph`,children:[(0,J.jsxs)(E,{gap:12,children:[(0,J.jsx)(T,{value:`llmCallsGraph`,paddingX:0,paddingBottom:4,children:(0,J.jsx)(n,{input:{...i,graphType:`summary`,groupBy:void 0},titleProps:{textStyle:`sm`,color:`fg`}})}),e(`cost:view`)&&(0,J.jsx)(T,{value:`totalCostGraph`,paddingX:0,paddingBottom:4,children:(0,J.jsx)(n,{input:{...a,graphType:`summary`},titleProps:{textStyle:`sm`,color:`fg`}})}),(0,J.jsx)(T,{value:`tokensGraph`,paddingX:0,paddingBottom:4,children:(0,J.jsx)(n,{input:o,titleProps:{textStyle:`sm`,color:`fg`}})}),(0,J.jsx)(w,{mt:`-1.5px`,height:`4px`,bg:`orange.400`,borderRadius:`1px`,bottom:0})]}),(0,J.jsx)(O,{value:`llmCallsGraph`,children:(0,J.jsx)(n,{input:i})}),e(`cost:view`)&&(0,J.jsx)(O,{value:`totalCostGraph`,children:(0,J.jsx)(n,{input:a})}),(0,J.jsx)(O,{value:`tokensGraph`,children:(0,J.jsx)(n,{input:s})})]})})})}),(0,J.jsx)(D,{children:(0,J.jsx)(ie,{})}),(0,J.jsx)(D,{children:(0,J.jsxs)(R,{height:`full`,children:[(0,J.jsx)(L,{children:(0,J.jsxs)(M,{gap:1,children:[(0,J.jsx)(A,{size:`sm`,children:`Evaluations Summary`}),(0,J.jsx)(k,{content:`View Online Evaluations`,children:(0,J.jsx)(V,{href:`/${t?.slug}/analytics/evaluations`,children:(0,J.jsx)(B,{"aria-label":`View Evaluations`,variant:`ghost`,size:`2xs`,color:`fg.subtle`,children:(0,J.jsx)(G,{size:14})})})})]})}),(0,J.jsx)(z,{children:(0,J.jsx)(n,{input:{...c,graphType:`summary`}})})]})}),(0,J.jsx)(D,{children:(0,J.jsxs)(R,{height:`full`,children:[(0,J.jsx)(L,{children:(0,J.jsx)(A,{size:`sm`,children:`Error Trend`})}),(0,J.jsx)(z,{children:(0,J.jsx)(n,{input:l})})]})}),(0,J.jsx)(D,{children:(0,J.jsxs)(R,{height:`full`,children:[(0,J.jsx)(L,{children:(0,J.jsx)(A,{size:`sm`,children:`Latency Trend`})}),(0,J.jsx)(z,{children:(0,J.jsx)(n,{input:u})})]})})]})]})}function oe(){let{project:e}=W();return(0,J.jsxs)(q,{title:`Analytics`,children:[e&&!e.firstMessage&&(0,J.jsxs)(P,{status:`warning`,marginBottom:6,children:[(0,J.jsx)(I,{}),(0,J.jsxs)(te,{children:[(0,J.jsx)(N,{children:`No traces received yet`}),(0,J.jsxs)(F,{children:[(0,J.jsx)(j,{as:`span`,children:`Tracing is not integrated yet, so there's no data to display. Go to the `}),(0,J.jsx)(V,{textDecoration:`underline`,href:`/${e.slug}/messages`,children:`setup`}),(0,J.jsx)(j,{as:`span`,children:` page to get started.`})]})]})]}),(0,J.jsxs)(M,{align:`start`,width:`full`,gap:8,children:[(0,J.jsxs)(H,{align:`start`,width:`full`,children:[(0,J.jsx)(Q,{}),(0,J.jsx)(ae,{}),(0,J.jsx)(se,{}),e&&(0,J.jsx)(ce,{slug:e.slug})]}),(0,J.jsx)(h,{hideTopics:!0})]})]})}function se(){let{filterParams:e,queryOpts:t}=a(),n=U.analytics.topUsedDocuments.useQuery(e,t).data?.totalUniqueDocuments;return!n||n===0?null:(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(M,{width:`full`,align:`top`,children:(0,J.jsx)(A,{as:`h2`,size:`md`,paddingTop:6,paddingBottom:2,children:`Documents`})}),(0,J.jsx)(R,{width:`full`,children:(0,J.jsx)(z,{children:(0,J.jsxs)(C,{variant:`plain`,defaultValue:`total-documents`,children:[(0,J.jsxs)(E,{gap:12,children:[(0,J.jsx)(T,{value:`total-documents`,paddingX:0,paddingBottom:4,children:(0,J.jsxs)(H,{align:`start`,children:[(0,J.jsx)(j,{color:`fg`,children:`Total documents`}),(0,J.jsx)(x,{textStyle:`2xl`,color:`fg`,fontWeight:`bold`,children:(0,J.jsx)(X,{})})]})}),(0,J.jsx)(w,{mt:`-1.5px`,height:`4px`,bg:`orange.400`,borderRadius:`1px`,bottom:0})]}),(0,J.jsx)(O,{value:`total-documents`,children:(0,J.jsx)(Y,{})})]})})})]})}function ce({slug:e}){let{project:n}=W(),r=U.dashboards.getAll.useQuery({projectId:n?.id??``},{enabled:!!n?.id}),i=r.data??[];return i.length===0&&!r.isLoading?(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(A,{as:`h2`,size:`md`,paddingTop:6,paddingBottom:2,children:`Custom Dashboards`}),(0,J.jsx)(R,{borderStyle:`dashed`,children:(0,J.jsx)(z,{padding:5,children:(0,J.jsxs)(M,{gap:4,children:[(0,J.jsx)(x,{color:`fg.subtle`,children:(0,J.jsx)(m,{size:20})}),(0,J.jsxs)(H,{align:`start`,gap:1,flex:1,children:[(0,J.jsx)(j,{textStyle:`sm`,fontWeight:`500`,children:`Build your own dashboard`}),(0,J.jsx)(j,{textStyle:`xs`,color:`fg.muted`,children:`Drag and drop charts to track the metrics that matter most to your team.`})]}),(0,J.jsx)(V,{href:`/${e}/analytics/reports`,_hover:{textDecoration:`none`},children:(0,J.jsxs)(b,{size:`sm`,variant:`outline`,children:[(0,J.jsx)(t,{size:14}),` Create`]})})]})})})]}):i.length===0?null:(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(A,{as:`h2`,size:`md`,paddingTop:6,paddingBottom:2,children:`Custom Dashboards`}),(0,J.jsx)(S,{width:`full`,gap:3,gridTemplateColumns:`repeat(auto-fill, minmax(250px, 1fr))`,children:i.map(t=>(0,J.jsx)(V,{href:`/${e}/analytics/reports?dashboard=${t.id}`,_hover:{textDecoration:`none`},children:(0,J.jsx)(R,{width:`full`,cursor:`pointer`,borderColor:`border`,_hover:{borderColor:`orange.400`,shadow:`sm`},transition:`all 0.15s ease`,children:(0,J.jsx)(z,{paddingX:4,paddingY:3,children:(0,J.jsxs)(ee,{gap:3,alignItems:`center`,children:[(0,J.jsx)(x,{padding:2,borderRadius:`md`,bg:`orange.subtle`,color:`orange.fg`,children:(0,J.jsx)(m,{size:16})}),(0,J.jsxs)(H,{align:`start`,gap:0,flex:1,children:[(0,J.jsx)(j,{fontWeight:`500`,textStyle:`sm`,children:t.name}),(0,J.jsx)(j,{textStyle:`xs`,color:`fg.muted`,children:`Custom Dashboard`})]}),(0,J.jsx)(x,{color:`fg.subtle`,marginLeft:`auto`,children:(0,J.jsx)(G,{size:14})})]})})})},t.id))})]})}var le=K(`analytics:view`,{layoutComponent:p})(oe);export{le as default};
|
|
2
|
-
//# sourceMappingURL=analytics-
|
|
1
|
+
import{$s as e,Fa as t,Gn as n,Jn as r,Kn as i,Qi as a,Qs as o,Ss as s,Xs as c,Ys as l,_s as u,bs as d,dn as f,mn as p,ps as m,un as h,vs as g,xs as _,ys as v}from"./command-bar-DUK45yin.js";import{j as y,n as b}from"./stack-oJ9iWdbl.js";import{t as x}from"./box-BsM8YLGl.js";import{r as S}from"./dialog.anatomy-hrluUh9u.js";import{i as C,n as w,o as T,r as E,s as D,t as O}from"./tabs-DwV1cIZB.js";import{t as k}from"./tooltip-AEm0YeiF.js";import{in as ee}from"./dist-Cds4Mqhj.js";import{t as A}from"./heading-D90dlSnH.js";import{t as j}from"./text-CwTrMF8x.js";import{t as M}from"./h-stack-BKLDJ2vg.js";import{a as N,i as P,n as F,r as I,t as te}from"./alert-SnQmACl1.js";import{n as L,r as R,t as z}from"./card-CMtKVPVl.js";import{Pt as B}from"./lu-Bf6j_N19.js";import{t as V}from"./link-CwZhwOLq.js";import{t as H}from"./v-stack-EOPQ57OZ.js";import{s as U}from"./auth-client-D3UhxhQi.js";import{t as W}from"./useOrganizationTeamProject-DC0iozx2.js";import{t as G}from"./arrow-up-right-Cmmi1ap5.js";import{t as K}from"./WithPermissionGuard-B4Jo8E5-.js";import{t as q}from"./GraphsLayout-DJ-HI9N1.js";var J=y(),Y=()=>{let{filterParams:e,queryOpts:t}=a(),n=U.analytics.topUsedDocuments.useQuery(e,t);return n.isLoading?(0,J.jsx)(x,{children:`Loading...`}):n.error?(0,J.jsx)(x,{children:`An error occurred`}):(0,J.jsxs)(H,{align:`start`,gap:4,children:[(0,J.jsx)(j,{fontSize:``,paddingTop:4,fontWeight:600,children:`Top 10 most used documents`}),(0,J.jsxs)(_,{variant:`line`,padding:0,margin:0,children:[(0,J.jsx)(d,{children:(0,J.jsxs)(s,{children:[(0,J.jsx)(v,{paddingLeft:0,children:`Document ID`}),(0,J.jsx)(v,{children:`Snippet`}),(0,J.jsx)(v,{children:`Usage Count`})]})}),(0,J.jsxs)(u,{children:[n.data?.topDocuments.length===0&&(0,J.jsx)(s,{children:(0,J.jsx)(g,{colSpan:2,children:`No documents found`})}),n.data?.topDocuments.map(e=>(0,J.jsxs)(s,{children:[(0,J.jsx)(g,{paddingLeft:0,children:(0,J.jsx)(k,{content:e.documentId,children:(0,J.jsx)(j,{lineClamp:1,wordBreak:`break-all`,display:`block`,children:e.documentId})})}),(0,J.jsx)(g,{children:(0,J.jsx)(k,{content:e.content,children:(0,J.jsx)(j,{lineClamp:1,wordBreak:`break-all`,display:`block`,children:e.content?e.content.substring(0,255)+(e.content.length>255?`...`:``):``})})}),(0,J.jsx)(g,{children:e.count})]},e.documentId))]})]})]})},X=()=>{let{filterParams:e,queryOpts:t}=a(),n=U.analytics.topUsedDocuments.useQuery(e,t).data?.totalUniqueDocuments;return(0,J.jsx)(i,{current:n})},Z=1440,ne={graphId:`threadMetrics`,graphType:`summary`,series:[{name:`Threads count`,colorSet:`greenTones`,metric:`metadata.thread_id`,aggregation:`cardinality`},{name:`Avg messages per thread`,colorSet:`orangeTones`,metric:`metadata.trace_id`,aggregation:`cardinality`,pipeline:{field:`thread_id`,aggregation:`avg`}},{name:`Avg thread duration`,colorSet:`purpleTones`,metric:`threads.average_duration_per_thread`,aggregation:`avg`}],includePrevious:!1,timeScale:Z,height:300},re=(0,J.jsx)(o,{size:`sm`,paddingY:10,children:(0,J.jsx)(l,{children:(0,J.jsxs)(H,{textAlign:`center`,children:[(0,J.jsx)(e,{textStyle:`sm`,children:`No user data yet`}),(0,J.jsxs)(c,{textStyle:`xs`,children:[`Start tracking users to see metrics here.`,` `,(0,J.jsx)(`a`,{href:`https://langwatch.ai/docs/integration/metadata-and-labels`,target:`_blank`,rel:`noopener noreferrer`,style:{textDecoration:`underline`},children:`Learn how to set up`})]})]})})});function Q(){let e={graphId:`messagesCountGraph`,graphType:`line`,series:[{name:`Traces`,metric:`metadata.trace_id`,aggregation:`cardinality`,colorSet:r.metadata.trace_id.colorSet}],groupBy:void 0,includePrevious:!0,timeScale:Z},t={graphId:`threadsCountGraph`,graphType:`line`,series:[{name:`Threads`,metric:`metadata.thread_id`,aggregation:`cardinality`,colorSet:r.metadata.thread_id.colorSet}],groupBy:void 0,includePrevious:!0,timeScale:Z},i={graphId:`usersCountGraph`,graphType:`line`,series:[{name:`Users`,metric:`metadata.user_id`,aggregation:`cardinality`,colorSet:r.metadata.user_id.colorSet,noDataUrl:`https://langwatch.ai/docs/integration/metadata-and-labels`}],groupBy:void 0,includePrevious:!0,timeScale:Z};return(0,J.jsxs)(S,{width:`full`,templateColumns:[`minmax(350px, 1fr)`,`minmax(350px, 1fr)`,`minmax(350px, 1fr)`,`minmax(350px, 2fr) minmax(250px, 1fr)`],gap:6,children:[(0,J.jsx)(D,{children:(0,J.jsx)(R,{border:`1px solid`,borderColor:`border.emphasized`,children:(0,J.jsx)(z,{paddingTop:2,children:(0,J.jsxs)(C,{variant:`plain`,defaultValue:`messages`,children:[(0,J.jsxs)(E,{gap:8,children:[(0,J.jsx)(T,{value:`messages`,paddingX:0,paddingBottom:0,height:`fit-content`,children:(0,J.jsx)(n,{input:{...e,graphType:`summary`},titleProps:{textStyle:`sm`,color:`fg`}})}),(0,J.jsx)(T,{value:`threads`,paddingX:0,paddingBottom:0,height:`fit-content`,children:(0,J.jsx)(n,{input:{...t,graphType:`summary`},titleProps:{textStyle:`sm`,color:`fg`}})}),(0,J.jsx)(T,{value:`users`,paddingX:0,paddingBottom:0,height:`fit-content`,children:(0,J.jsx)(n,{input:{...i,graphType:`summary`},titleProps:{textStyle:`sm`,color:`fg`}})}),(0,J.jsx)(w,{mt:`-1.5px`,height:`4px`,bg:`orange.400`,borderRadius:`1px`,bottom:0})]}),(0,J.jsx)(O,{value:`messages`,children:(0,J.jsx)(n,{input:e})}),(0,J.jsx)(O,{value:`threads`,children:(0,J.jsx)(n,{input:t})}),(0,J.jsx)(O,{value:`users`,children:(0,J.jsx)(n,{input:i,emptyState:re})})]})})})}),(0,J.jsx)(D,{rowSpan:2,children:(0,J.jsxs)(R,{width:`100%`,height:`100%`,children:[(0,J.jsx)(L,{paddingBottom:4,children:(0,J.jsx)(A,{size:`sm`,children:`Top Topics`})}),(0,J.jsx)(z,{overflowY:`auto`,children:(0,J.jsx)(f,{showTitle:!1})})]})}),(0,J.jsx)(D,{children:(0,J.jsxs)(R,{overflow:`auto`,children:[(0,J.jsx)(L,{children:(0,J.jsx)(A,{size:`sm`,children:`Thread Metrics`})}),(0,J.jsx)(z,{children:(0,J.jsx)(n,{input:ne})})]})})]})}var ie=()=>{let{hasPermission:e,project:t}=W(),i={graphId:`llmSummary`,graphType:`summary`,series:[{name:`Mean Tokens per Message`,metric:`performance.total_tokens`,aggregation:`avg`,colorSet:r.performance.total_tokens.colorSet},...e(`cost:view`)?[{name:`Mean Cost per Message`,metric:`performance.total_cost`,aggregation:`avg`,colorSet:r.performance.total_cost.colorSet}]:[],{name:`90th Percentile Time to First Token`,metric:`performance.first_token`,aggregation:`p90`,colorSet:r.performance.first_token.colorSet},{name:`90th Percentile Completion Time`,metric:`performance.completion_time`,aggregation:`p90`,colorSet:r.performance.completion_time.colorSet}],groupBy:void 0,includePrevious:!1,timeScale:`full`};return(0,J.jsxs)(R,{children:[(0,J.jsx)(L,{children:(0,J.jsxs)(M,{gap:1,children:[(0,J.jsx)(A,{size:`sm`,children:`Summary`}),t?.slug&&(0,J.jsx)(k,{content:`View LLM Metrics`,children:(0,J.jsx)(V,{href:`/${t.slug}/analytics/metrics`,children:(0,J.jsx)(B,{"aria-label":`View LLM Metrics`,variant:`ghost`,size:`2xs`,color:`fg.subtle`,children:(0,J.jsx)(G,{size:14})})})})]})}),(0,J.jsx)(z,{children:(0,J.jsx)(n,{input:i})})]})},$=1440;function ae(){let{hasPermission:e,project:t}=W(),i={graphId:`llmCallsGraph`,graphType:`area`,series:[{name:`LLM Calls`,metric:`metadata.trace_id`,aggregation:`cardinality`,colorSet:`colors`}],groupBy:`metadata.model`,includePrevious:!1,timeScale:$},a={graphId:`totalCostGraph`,graphType:`line`,series:[{name:r.performance.total_cost.label,metric:`performance.total_cost`,aggregation:`sum`,colorSet:r.performance.total_cost.colorSet}],groupBy:void 0,includePrevious:!0,timeScale:$},o={graphId:`totalTokensSummary`,graphType:`summary`,series:[{name:`Tokens`,metric:`performance.total_tokens`,aggregation:`sum`,colorSet:r.performance.total_tokens.colorSet}],groupBy:void 0,includePrevious:!1,timeScale:`full`},s={graphId:`tokensGraph`,graphType:`stacked_bar`,series:[{name:r.performance.prompt_tokens.label,metric:`performance.prompt_tokens`,aggregation:`sum`,colorSet:r.performance.prompt_tokens.colorSet},{name:r.performance.completion_tokens.label,metric:`performance.completion_tokens`,aggregation:`sum`,colorSet:r.performance.completion_tokens.colorSet}],groupBy:void 0,includePrevious:!1,timeScale:$},c={graphId:`evaluationsSummary`,graphType:`summary`,series:[{name:`Evaluation execution count`,metric:`evaluations.evaluation_runs`,aggregation:`cardinality`,key:``,colorSet:`colors`}],groupBy:`evaluations.evaluation_passed`,includePrevious:!1,timeScale:`full`},l={graphId:`overviewErrorTrend`,graphType:`stacked_bar`,series:[{name:`Traces`,metric:`metadata.trace_id`,aggregation:`cardinality`,colorSet:`positiveNegativeNeutral`}],groupBy:`error.has_error`,includePrevious:!1,timeScale:$},u={graphId:`overviewLatencyTrend`,graphType:`line`,series:[{name:r.performance.completion_time.label,metric:`performance.completion_time`,aggregation:`median`,colorSet:r.performance.completion_time.colorSet},{name:r.performance.first_token.label,metric:`performance.first_token`,aggregation:`median`,colorSet:r.performance.first_token.colorSet}],groupBy:void 0,includePrevious:!1,timeScale:$};return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsxs)(M,{paddingTop:6,paddingBottom:2,children:[(0,J.jsx)(A,{as:`h2`,size:`md`,children:`LLM Metrics`}),(0,J.jsx)(k,{content:`View LLM Metrics dashboard`,children:(0,J.jsx)(V,{href:`/${t?.slug}/analytics/metrics`,children:(0,J.jsx)(B,{"aria-label":`View LLM Metrics`,variant:`ghost`,size:`xs`,color:`fg.subtle`,children:(0,J.jsx)(G,{size:14})})})})]}),(0,J.jsxs)(S,{width:`100%`,templateColumns:`1fr 0.5fr`,gap:6,children:[(0,J.jsx)(D,{colSpan:2,children:(0,J.jsx)(R,{children:(0,J.jsx)(z,{children:(0,J.jsxs)(C,{variant:`plain`,defaultValue:`llmCallsGraph`,children:[(0,J.jsxs)(E,{gap:12,children:[(0,J.jsx)(T,{value:`llmCallsGraph`,paddingX:0,paddingBottom:4,children:(0,J.jsx)(n,{input:{...i,graphType:`summary`,groupBy:void 0},titleProps:{textStyle:`sm`,color:`fg`}})}),e(`cost:view`)&&(0,J.jsx)(T,{value:`totalCostGraph`,paddingX:0,paddingBottom:4,children:(0,J.jsx)(n,{input:{...a,graphType:`summary`},titleProps:{textStyle:`sm`,color:`fg`}})}),(0,J.jsx)(T,{value:`tokensGraph`,paddingX:0,paddingBottom:4,children:(0,J.jsx)(n,{input:o,titleProps:{textStyle:`sm`,color:`fg`}})}),(0,J.jsx)(w,{mt:`-1.5px`,height:`4px`,bg:`orange.400`,borderRadius:`1px`,bottom:0})]}),(0,J.jsx)(O,{value:`llmCallsGraph`,children:(0,J.jsx)(n,{input:i})}),e(`cost:view`)&&(0,J.jsx)(O,{value:`totalCostGraph`,children:(0,J.jsx)(n,{input:a})}),(0,J.jsx)(O,{value:`tokensGraph`,children:(0,J.jsx)(n,{input:s})})]})})})}),(0,J.jsx)(D,{children:(0,J.jsx)(ie,{})}),(0,J.jsx)(D,{children:(0,J.jsxs)(R,{height:`full`,children:[(0,J.jsx)(L,{children:(0,J.jsxs)(M,{gap:1,children:[(0,J.jsx)(A,{size:`sm`,children:`Evaluations Summary`}),(0,J.jsx)(k,{content:`View Online Evaluations`,children:(0,J.jsx)(V,{href:`/${t?.slug}/analytics/evaluations`,children:(0,J.jsx)(B,{"aria-label":`View Evaluations`,variant:`ghost`,size:`2xs`,color:`fg.subtle`,children:(0,J.jsx)(G,{size:14})})})})]})}),(0,J.jsx)(z,{children:(0,J.jsx)(n,{input:{...c,graphType:`summary`}})})]})}),(0,J.jsx)(D,{children:(0,J.jsxs)(R,{height:`full`,children:[(0,J.jsx)(L,{children:(0,J.jsx)(A,{size:`sm`,children:`Error Trend`})}),(0,J.jsx)(z,{children:(0,J.jsx)(n,{input:l})})]})}),(0,J.jsx)(D,{children:(0,J.jsxs)(R,{height:`full`,children:[(0,J.jsx)(L,{children:(0,J.jsx)(A,{size:`sm`,children:`Latency Trend`})}),(0,J.jsx)(z,{children:(0,J.jsx)(n,{input:u})})]})})]})]})}function oe(){let{project:e}=W();return(0,J.jsxs)(q,{title:`Analytics`,children:[e&&!e.firstMessage&&(0,J.jsxs)(P,{status:`warning`,marginBottom:6,children:[(0,J.jsx)(I,{}),(0,J.jsxs)(te,{children:[(0,J.jsx)(N,{children:`No traces received yet`}),(0,J.jsxs)(F,{children:[(0,J.jsx)(j,{as:`span`,children:`Tracing is not integrated yet, so there's no data to display. Go to the `}),(0,J.jsx)(V,{textDecoration:`underline`,href:`/${e.slug}/messages`,children:`setup`}),(0,J.jsx)(j,{as:`span`,children:` page to get started.`})]})]})]}),(0,J.jsxs)(M,{align:`start`,width:`full`,gap:8,children:[(0,J.jsxs)(H,{align:`start`,width:`full`,children:[(0,J.jsx)(Q,{}),(0,J.jsx)(ae,{}),(0,J.jsx)(se,{}),e&&(0,J.jsx)(ce,{slug:e.slug})]}),(0,J.jsx)(h,{hideTopics:!0})]})]})}function se(){let{filterParams:e,queryOpts:t}=a(),n=U.analytics.topUsedDocuments.useQuery(e,t).data?.totalUniqueDocuments;return!n||n===0?null:(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(M,{width:`full`,align:`top`,children:(0,J.jsx)(A,{as:`h2`,size:`md`,paddingTop:6,paddingBottom:2,children:`Documents`})}),(0,J.jsx)(R,{width:`full`,children:(0,J.jsx)(z,{children:(0,J.jsxs)(C,{variant:`plain`,defaultValue:`total-documents`,children:[(0,J.jsxs)(E,{gap:12,children:[(0,J.jsx)(T,{value:`total-documents`,paddingX:0,paddingBottom:4,children:(0,J.jsxs)(H,{align:`start`,children:[(0,J.jsx)(j,{color:`fg`,children:`Total documents`}),(0,J.jsx)(x,{textStyle:`2xl`,color:`fg`,fontWeight:`bold`,children:(0,J.jsx)(X,{})})]})}),(0,J.jsx)(w,{mt:`-1.5px`,height:`4px`,bg:`orange.400`,borderRadius:`1px`,bottom:0})]}),(0,J.jsx)(O,{value:`total-documents`,children:(0,J.jsx)(Y,{})})]})})})]})}function ce({slug:e}){let{project:n}=W(),r=U.dashboards.getAll.useQuery({projectId:n?.id??``},{enabled:!!n?.id}),i=r.data??[];return i.length===0&&!r.isLoading?(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(A,{as:`h2`,size:`md`,paddingTop:6,paddingBottom:2,children:`Custom Dashboards`}),(0,J.jsx)(R,{borderStyle:`dashed`,children:(0,J.jsx)(z,{padding:5,children:(0,J.jsxs)(M,{gap:4,children:[(0,J.jsx)(x,{color:`fg.subtle`,children:(0,J.jsx)(m,{size:20})}),(0,J.jsxs)(H,{align:`start`,gap:1,flex:1,children:[(0,J.jsx)(j,{textStyle:`sm`,fontWeight:`500`,children:`Build your own dashboard`}),(0,J.jsx)(j,{textStyle:`xs`,color:`fg.muted`,children:`Drag and drop charts to track the metrics that matter most to your team.`})]}),(0,J.jsx)(V,{href:`/${e}/analytics/reports`,_hover:{textDecoration:`none`},children:(0,J.jsxs)(b,{size:`sm`,variant:`outline`,children:[(0,J.jsx)(t,{size:14}),` Create`]})})]})})})]}):i.length===0?null:(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(A,{as:`h2`,size:`md`,paddingTop:6,paddingBottom:2,children:`Custom Dashboards`}),(0,J.jsx)(S,{width:`full`,gap:3,gridTemplateColumns:`repeat(auto-fill, minmax(250px, 1fr))`,children:i.map(t=>(0,J.jsx)(V,{href:`/${e}/analytics/reports?dashboard=${t.id}`,_hover:{textDecoration:`none`},children:(0,J.jsx)(R,{width:`full`,cursor:`pointer`,borderColor:`border`,_hover:{borderColor:`orange.400`,shadow:`sm`},transition:`all 0.15s ease`,children:(0,J.jsx)(z,{paddingX:4,paddingY:3,children:(0,J.jsxs)(ee,{gap:3,alignItems:`center`,children:[(0,J.jsx)(x,{padding:2,borderRadius:`md`,bg:`orange.subtle`,color:`orange.fg`,children:(0,J.jsx)(m,{size:16})}),(0,J.jsxs)(H,{align:`start`,gap:0,flex:1,children:[(0,J.jsx)(j,{fontWeight:`500`,textStyle:`sm`,children:t.name}),(0,J.jsx)(j,{textStyle:`xs`,color:`fg.muted`,children:`Custom Dashboard`})]}),(0,J.jsx)(x,{color:`fg.subtle`,marginLeft:`auto`,children:(0,J.jsx)(G,{size:14})})]})})})},t.id))})]})}var le=K(`analytics:view`,{layoutComponent:p})(oe);export{le as default};
|
|
2
|
+
//# sourceMappingURL=analytics-DP6Y4Feh.js.map
|
package/langwatch/dist/client/assets/{annotation-scores-CHfn4LQp.js → annotation-scores-CjD4CEB6.js}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{s as e}from"./chunk-Bj-mKKzh.js";import{t}from"./react-C7JcuhbW.js";import{Go as n,Ss as r,Un as i,Uo as a,Xo as o,Xr as s,_s as c,bs as l,fa as u,ns as d,qi as f,r as p,vs as m,wi as h,xs as g,ys as _}from"./command-bar-
|
|
2
|
-
//# sourceMappingURL=annotation-scores-
|
|
1
|
+
import{s as e}from"./chunk-Bj-mKKzh.js";import{t}from"./react-C7JcuhbW.js";import{Go as n,Ss as r,Un as i,Uo as a,Xo as o,Xr as s,_s as c,bs as l,fa as u,ns as d,qi as f,r as p,vs as m,wi as h,xs as g,ys as _}from"./command-bar-DUK45yin.js";import{j as v,n as y}from"./stack-oJ9iWdbl.js";import{t as b}from"./box-BsM8YLGl.js";import{f as x}from"./LoadingScreen--vgXk5-2.js";import"./tooltip-AEm0YeiF.js";import{n as S}from"./toaster-C_DYALhL.js";import{Qt as C,an as w}from"./dist-Cds4Mqhj.js";import{t as T}from"./heading-D90dlSnH.js";import{t as E}from"./text-CwTrMF8x.js";import{t as D}from"./h-stack-BKLDJ2vg.js";import{t as O}from"./link-CwZhwOLq.js";import{t as k}from"./spacer-2LJJGbo8.js";import{t as A}from"./v-stack-EOPQ57OZ.js";import{m as j,s as M}from"./auth-client-D3UhxhQi.js";import{c as N,t as P}from"./useOrganizationTeamProject-DC0iozx2.js";import{t as F}from"./SettingsLayout--1gdEuhv.js";import{t as I}from"./WithPermissionGuard-B4Jo8E5-.js";import{t as L}from"./NoDataInfoBlock-CLKl_wlX.js";var R=N(),z=e(t()),B=v();function V(){let{project:e}=P(),{isLiteMember:t}=i(),v=!t,{openDrawer:w,drawerOpen:N,closeDrawer:I}=p(),V=M.annotationScore.getAll.useQuery({projectId:e?.id??``},{enabled:!!e}),H=M.annotationScore.toggle.useMutation(),W=N(`addOrEditAnnotationScore`),[G,K]=(0,z.useState)(!1),[q,J]=(0,z.useState)(null),Y=M.annotationScore.delete.useMutation();(0,z.useEffect)(()=>{V.refetch()},[W]);let X=(t,n)=>{H.mutate({scoreId:t,active:n,projectId:e?.id??``},{onSuccess:()=>{V.refetch()},onError:e=>{j(e)||S.create({title:`Update score`,type:`error`,description:`Failed to update score`,duration:6e3,meta:{closable:!0}})}})},Z=e=>{J(e),K(!0)};return(0,B.jsxs)(F,{children:[(0,B.jsxs)(A,{gap:6,width:`full`,align:`start`,children:[(0,B.jsxs)(D,{width:`full`,marginTop:2,children:[(0,B.jsx)(T,{as:`h2`,children:`Annotation Scoring`}),(0,B.jsx)(k,{}),v&&(0,B.jsxs)(s.HeaderButton,{onClick:()=>w(`addOrEditAnnotationScore`),children:[(0,B.jsx)(C,{}),` Add new score metric`]})]}),V.data&&V.data.length==0?(0,B.jsx)(L,{title:`No scoring setup yet`,description:`Add new scoring metrics for your annotations.`,docsInfo:(0,B.jsxs)(E,{children:[`To learn more about scores and how to use them, please visit our`,` `,(0,B.jsx)(O,{color:`orange.400`,href:`https://docs.langwatch.ai/features/annotations#annotation-scoring`,isExternal:!0,children:`documentation`}),`.`]}),icon:(0,B.jsx)(n,{})}):(0,B.jsxs)(g,{variant:`line`,width:`full`,children:[(0,B.jsx)(l,{children:(0,B.jsxs)(r,{children:[(0,B.jsx)(_,{children:`Name`}),(0,B.jsx)(_,{children:`Description`}),(0,B.jsx)(_,{children:`Score Type`}),(0,B.jsx)(_,{children:`Score Options`}),(0,B.jsx)(_,{children:`Enabled`}),v&&(0,B.jsx)(_,{children:`Actions`})]})}),(0,B.jsx)(c,{children:V.isLoading?(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(r,{children:(0,B.jsx)(m,{colSpan:v?6:5,children:(0,B.jsx)(x,{height:`20px`})})}),(0,B.jsx)(r,{children:(0,B.jsx)(m,{colSpan:v?6:5,children:(0,B.jsx)(x,{height:`20px`})})}),(0,B.jsx)(r,{children:(0,B.jsx)(m,{colSpan:v?6:5,children:(0,B.jsx)(x,{height:`20px`})})})]}):V.data?.map(e=>(0,B.jsxs)(r,{children:[(0,B.jsx)(m,{children:e.name}),(0,B.jsx)(m,{children:e.description}),(0,B.jsx)(m,{width:`20%`,children:(0,B.jsx)(E,{lineClamp:1,children:e.dataType===R.AnnotationScoreDataType.CHECKBOX?`Checkbox`:`Multiple choice`})}),(0,B.jsx)(m,{children:(0,B.jsx)(U,{options:Array.isArray(e.options)?e.options:[],dataType:e.dataType??``})}),(0,B.jsx)(m,{textAlign:`center`,children:(0,B.jsx)(u,{checked:e.active,disabled:!v,onCheckedChange:()=>{X(e.id,!e.active)}})}),v&&(0,B.jsx)(m,{children:(0,B.jsxs)(f.Root,{children:[(0,B.jsx)(f.Trigger,{asChild:!0,children:(0,B.jsx)(y,{variant:`ghost`,children:(0,B.jsx)(o,{})})}),(0,B.jsxs)(f.Content,{children:[(0,B.jsx)(f.Item,{value:`edit`,onClick:t=>{t.stopPropagation(),w(`addOrEditAnnotationScore`,{annotationScoreId:e.id,onClose:()=>I()})},children:(0,B.jsxs)(b,{display:`flex`,alignItems:`center`,gap:2,children:[(0,B.jsx)(d,{size:14}),`Edit`]})}),(0,B.jsx)(f.Item,{value:`delete`,onClick:t=>{t.stopPropagation(),Z(e.id)},children:(0,B.jsxs)(b,{display:`flex`,alignItems:`center`,gap:2,color:`red.600`,children:[(0,B.jsx)(a,{size:14}),`Delete`]})})]})]})})]},e.id))})]})]}),(0,B.jsx)(h,{open:G,onClose:()=>K(!1),onConfirm:()=>{q&&Y.mutate({scoreId:q,projectId:e?.id??``},{onSuccess:()=>{V.refetch(),S.create({title:`Delete score`,type:`success`,description:`Score deleted successfully`,duration:6e3,meta:{closable:!0}})},onError:e=>{j(e)||S.create({title:`Delete score`,type:`error`,description:`Failed to delete score`,duration:6e3,meta:{closable:!0}})}}),K(!1)}})]})}var H=I(`annotations:view`,{layoutComponent:F})(V),U=({options:e,dataType:t})=>(0,B.jsx)(B.Fragment,{children:(0,B.jsx)(D,{children:(0,B.jsx)(D,{flexWrap:`wrap`,gap:4,children:e.map(e=>(0,B.jsx)(w,{children:e.label},e.value))})})});export{H as default};
|
|
2
|
+
//# sourceMappingURL=annotation-scores-CjD4CEB6.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{mn as e}from"./command-bar-
|
|
2
|
-
//# sourceMappingURL=annotations-
|
|
1
|
+
import{mn as e}from"./command-bar-DUK45yin.js";import{j as t}from"./stack-oJ9iWdbl.js";import{t as n}from"./box-BsM8YLGl.js";import{n as r}from"./useAnnotationQueues-CA6Vk--V.js";import{t as i}from"./WithPermissionGuard-B4Jo8E5-.js";import{t as a}from"./AnnotationsTable-uS_9SQ-g.js";var o=t();function s(){return(0,o.jsx)(r,{children:(0,o.jsx)(n,{width:`full`,overflowX:`auto`,children:(0,o.jsx)(a,{showQueueAndUser:!0,heading:`Inbox`,noDataTitle:`Your inbox is empty`,noDataDescription:`Send messages to your annotation queue to get started.`})})})}var c=i(`annotations:view`,{layoutComponent:e})(s);export{c as default};
|
|
2
|
+
//# sourceMappingURL=annotations-1rVXiDRQ.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{s as e}from"./chunk-Bj-mKKzh.js";import{t}from"./react-C7JcuhbW.js";import{$a as n,Ca as r,Do as i,Fa as a,Ha as o,Ss as s,_s as c,bs as l,cc as u,gs as d,na as f,sc as p,vs as m,wa as h,xs as g,ys as _}from"./command-bar-
|
|
1
|
+
import{s as e}from"./chunk-Bj-mKKzh.js";import{t}from"./react-C7JcuhbW.js";import{$a as n,Ca as r,Do as i,Fa as a,Ha as o,Ss as s,_s as c,bs as l,cc as u,gs as d,na as f,sc as p,vs as m,wa as h,xs as g,ys as _}from"./command-bar-DUK45yin.js";import{j as v,n as y}from"./stack-oJ9iWdbl.js";import{t as b}from"./box-BsM8YLGl.js";import{i as x,o as S,r as C,t as w}from"./tabs-DwV1cIZB.js";import{n as T}from"./toaster-C_DYALhL.js";import{an as E,f as D}from"./dist-Cds4Mqhj.js";import{c as O,l as k}from"./terminal-CfM0q99k.js";import{t as A}from"./heading-D90dlSnH.js";import{t as j}from"./text-CwTrMF8x.js";import{t as M}from"./input-C7emsUCL.js";import{t as N}from"./h-stack-BKLDJ2vg.js";import{r as P,t as F}from"./card-CMtKVPVl.js";import{Pt as I}from"./lu-Bf6j_N19.js";import{t as L}from"./spacer-2LJJGbo8.js";import{t as R}from"./v-stack-EOPQ57OZ.js";import{s as z}from"./auth-client-D3UhxhQi.js";import{t as B}from"./usePublicEnv-1QvVAhAk.js";import{t as V}from"./useOrganizationTeamProject-DC0iozx2.js";import{r as H}from"./useRequiredSession-DE4JSglk.js";import{t as U}from"./SettingsLayout--1gdEuhv.js";var W=e(t()),G=[{label:`No expiration`,value:``},{label:`7 days`,value:`7`},{label:`30 days`,value:`30`},{label:`60 days`,value:`60`},{label:`90 days`,value:`90`},{label:`Custom...`,value:`custom`}],K=p({items:G});function q(e){return e.length<=8?`********`:`${e.slice(0,4)}${`*`.repeat(Math.min(e.length-8,32))}${e.slice(-4)}`}function J(e){return e.map(({key:e,value:t,mask:n})=>`${e}="${n?q(t):t}"`).join(`
|
|
2
2
|
`)}function Y(e){if(e.length===0)return`No permissions`;let t=e[0],n=t.scopeType===`ORGANIZATION`?`Org-wide`:t.scopeType===`TEAM`?`Team`:`Project`,r=e.length>1?` +${e.length-1} more`:``;return`${t.role} (${n})${r}`}var X=v();function Z({isOpen:e,isCreating:t,myBindings:n,onClose:r,onCreate:a}){let[o,s]=(0,W.useState)(``),[c,l]=(0,W.useState)(``),[u,p]=(0,W.useState)(``),[m,h]=(0,W.useState)(``),g=(0,W.useMemo)(()=>{let e=new Date;return e.setDate(e.getDate()+1),`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,`0`)}-${String(e.getDate()).padStart(2,`0`)}`},[]),_=()=>{s(``),l(``),p(``),h(``)};return(0,X.jsx)(i.Root,{placement:`end`,size:`md`,open:e,onOpenChange:({open:e})=>{e||(r(),_())},children:(0,X.jsxs)(i.Content,{children:[(0,X.jsxs)(i.Header,{children:[(0,X.jsx)(A,{size:`md`,children:`Create Personal Access Token`}),(0,X.jsx)(i.CloseTrigger,{})]}),(0,X.jsx)(i.Body,{children:(0,X.jsxs)(R,{gap:5,align:`start`,children:[(0,X.jsxs)(R,{gap:1,align:`start`,width:`full`,children:[(0,X.jsx)(j,{fontWeight:`600`,fontSize:`sm`,children:`Token Name`}),(0,X.jsx)(M,{placeholder:`e.g., CI Pipeline, Local Dev`,value:o,onChange:e=>s(e.target.value)})]}),(0,X.jsxs)(R,{gap:1,align:`start`,width:`full`,children:[(0,X.jsxs)(j,{fontWeight:`600`,fontSize:`sm`,children:[`Description`,` `,(0,X.jsx)(j,{as:`span`,color:`fg.muted`,fontWeight:`400`,children:`(optional)`})]}),(0,X.jsx)(d,{placeholder:`What is this token used for? (e.g., CI runs traces for the staging project)`,value:c,onChange:e=>l(e.target.value),maxLength:500,rows:3,resize:`vertical`})]}),(0,X.jsxs)(R,{gap:2,align:`start`,width:`full`,children:[(0,X.jsx)(j,{fontWeight:`600`,fontSize:`sm`,children:`Access`}),(0,X.jsxs)(b,{width:`full`,padding:3,borderWidth:`1px`,borderColor:`border`,borderRadius:`md`,background:`bg.muted`,children:[(0,X.jsxs)(j,{fontSize:`sm`,children:[`This token will inherit`,` `,(0,X.jsx)(j,{as:`span`,fontWeight:`600`,children:`your current permissions`}),` `,`in this organization:`]}),n.isLoading?(0,X.jsx)(j,{fontSize:`xs`,color:`fg.muted`,marginTop:2,children:`Loading your role bindings…`}):(n.data?.length??0)===0?(0,X.jsx)(j,{fontSize:`xs`,color:`fg.muted`,marginTop:2,children:`You have no role bindings in this organization yet.`}):(0,X.jsx)(R,{align:`stretch`,gap:1,marginTop:2,children:n.data.map(e=>{let t=e.scopeType===`ORGANIZATION`?`Org-wide`:e.scopeType===`TEAM`?`Team: ${e.scopeName??e.scopeId}`:`Project: ${e.scopeName??e.scopeId}`;return(0,X.jsxs)(N,{gap:2,fontSize:`xs`,children:[(0,X.jsx)(E,{size:`sm`,variant:`subtle`,children:e.role===`CUSTOM`?e.customRoleName??`Custom`:e.role}),(0,X.jsx)(j,{color:`fg.muted`,children:t})]},e.id)})}),(0,X.jsx)(j,{fontSize:`xs`,color:`fg.muted`,marginTop:3,children:`Your access acts as a ceiling — if your role is later reduced, the token loses those permissions automatically.`})]})]}),(0,X.jsxs)(R,{gap:1,align:`start`,width:`full`,children:[(0,X.jsx)(j,{fontWeight:`600`,fontSize:`sm`,children:`Expiration`}),(0,X.jsxs)(f.Root,{collection:K,value:[u],onValueChange:e=>{let t=e.value[0]??``;p(t),t!==`custom`&&h(``)},children:[(0,X.jsx)(f.Trigger,{width:`full`,background:`bg`,children:(0,X.jsx)(f.ValueText,{placeholder:`No expiration`})}),(0,X.jsx)(f.Content,{width:`300px`,paddingY:2,children:G.map(e=>(0,X.jsx)(f.Item,{item:e,children:e.label},e.value))})]}),u===`custom`&&(0,X.jsx)(M,{type:`date`,value:m,min:g,onChange:e=>h(e.target.value)})]})]})}),(0,X.jsx)(i.Footer,{children:(0,X.jsxs)(N,{width:`full`,justify:`end`,gap:2,children:[(0,X.jsx)(y,{variant:`outline`,onClick:r,children:`Cancel`}),(0,X.jsx)(y,{onClick:()=>{let e;if(u===`custom`&&m)e=new Date(m);else if(u&&u!==`custom`){let t=parseInt(u,10);e=new Date(Date.now()+t*24*60*60*1e3)}a({name:o,description:c,expiresAt:e})},disabled:t||!o.trim()||n.isLoading||(n.data?.length??0)===0,children:`Create Token`})]})})]})})}function Q({patId:e,isRevoking:t,onCancel:n,onConfirm:r}){return(0,X.jsx)(D.Root,{size:`lg`,open:!!e,onOpenChange:({open:e})=>{e||n()},children:(0,X.jsxs)(D.Content,{children:[(0,X.jsx)(D.Header,{children:(0,X.jsx)(D.Title,{children:`Revoke Token`})}),(0,X.jsx)(D.CloseTrigger,{}),(0,X.jsx)(D.Body,{paddingBottom:6,children:(0,X.jsxs)(R,{gap:4,align:`start`,children:[(0,X.jsx)(j,{children:`Are you sure you want to revoke this token? Any integration using it will stop working immediately.`}),(0,X.jsxs)(N,{width:`full`,justify:`end`,gap:2,children:[(0,X.jsx)(y,{variant:`outline`,onClick:n,children:`Cancel`}),(0,X.jsx)(y,{colorPalette:`red`,onClick:()=>e&&r(e),disabled:t,children:`Revoke`})]})]})})]})})}function $({label:e,display:t,copyValue:r,revealedDisplay:i,copyToastTitle:a,ariaLabel:o}){let[s,c]=(0,W.useState)(!1),l=!!i,u=s&&i?i:t;return(0,X.jsxs)(b,{position:`relative`,width:`full`,background:`bg.muted`,borderWidth:`1px`,borderColor:`border`,borderRadius:`md`,overflow:`hidden`,children:[(0,X.jsxs)(N,{paddingX:3,paddingY:1.5,borderBottomWidth:`1px`,borderColor:`border`,background:`bg.subtle`,children:[e&&(0,X.jsx)(E,{size:`sm`,variant:`subtle`,fontFamily:`monospace`,children:e}),(0,X.jsx)(L,{}),l&&(0,X.jsx)(I,{"aria-label":s?`Hide secret values`:`Show secret values`,size:`xs`,variant:`ghost`,onClick:()=>c(e=>!e),children:s?(0,X.jsx)(k,{size:14}):(0,X.jsx)(O,{size:14})}),(0,X.jsx)(I,{"aria-label":o??`Copy`,size:`xs`,variant:`ghost`,onClick:()=>{if(!navigator.clipboard){T.create({title:`Clipboard not available — copy manually`,type:`error`,duration:3e3,meta:{closable:!0}});return}navigator.clipboard.writeText(r).then(()=>{T.create({title:a??`Copied to clipboard`,type:`success`,duration:2e3,meta:{closable:!0}})})},children:(0,X.jsx)(n,{size:14})})]}),(0,X.jsx)(b,{as:`pre`,fontFamily:`monospace`,fontSize:`xs`,padding:3,overflow:`auto`,whiteSpace:`pre`,margin:0,children:u})]})}function ee({newToken:e,projectId:t,endpoint:n,onClose:r}){return(0,X.jsx)(D.Root,{size:`xl`,open:!!e,onOpenChange:({open:e})=>{e||r()},children:(0,X.jsxs)(D.Content,{children:[(0,X.jsx)(D.Header,{children:(0,X.jsx)(D.Title,{children:`Token Created`})}),(0,X.jsx)(D.CloseTrigger,{}),(0,X.jsx)(D.Body,{paddingBottom:6,children:(0,X.jsxs)(R,{gap:5,align:`stretch`,children:[(0,X.jsx)(j,{color:`orange.500`,fontWeight:`600`,children:`Copy this token now. You won't be able to see it again.`}),e&&(0,X.jsx)($,{label:`.env`,display:J([{key:`LANGWATCH_API_KEY`,value:e,mask:!0},{key:`LANGWATCH_PROJECT_ID`,value:t??`<your-project-id>`},{key:`LANGWATCH_ENDPOINT`,value:n}]),revealedDisplay:J([{key:`LANGWATCH_API_KEY`,value:e},{key:`LANGWATCH_PROJECT_ID`,value:t??`<your-project-id>`},{key:`LANGWATCH_ENDPOINT`,value:n}]),copyValue:J([{key:`LANGWATCH_API_KEY`,value:e},{key:`LANGWATCH_PROJECT_ID`,value:t??`<your-project-id>`},{key:`LANGWATCH_ENDPOINT`,value:n}]),copyToastTitle:`.env copied to clipboard`,ariaLabel:`Copy .env contents`}),(0,X.jsxs)(R,{gap:2,align:`stretch`,width:`full`,children:[(0,X.jsx)(j,{fontWeight:`600`,fontSize:`sm`,children:`How to use this token`}),(0,X.jsx)(j,{fontSize:`sm`,color:`fg.muted`,children:`Send the token on every request using one of the two options below. Both carry the project context LangWatch needs to route traces and enforce permissions.`})]}),(0,X.jsxs)(R,{gap:2,align:`stretch`,width:`full`,children:[(0,X.jsx)(j,{fontWeight:`600`,fontSize:`sm`,children:`Option 1 — Bearer token`}),(0,X.jsxs)(j,{fontSize:`sm`,color:`fg.muted`,children:[`Use the `,(0,X.jsx)(`code`,{children:`Authorization`}),` header plus`,` `,(0,X.jsx)(`code`,{children:`X-Project-Id`}),`:`]}),(0,X.jsx)($,{label:`http`,display:`Authorization: Bearer ${e?q(e):`pat-lw-...`}\nX-Project-Id: ${t??`<your-project-id>`}`,revealedDisplay:`Authorization: Bearer ${e??``}\nX-Project-Id: ${t??`<your-project-id>`}`,copyValue:`Authorization: Bearer ${e??``}\nX-Project-Id: ${t??`<your-project-id>`}`,copyToastTitle:`Bearer headers copied`,ariaLabel:`Copy Bearer headers`})]}),(0,X.jsxs)(R,{gap:2,align:`stretch`,width:`full`,children:[(0,X.jsx)(j,{fontWeight:`600`,fontSize:`sm`,children:`Option 2 — Basic Auth (SDK clients)`}),(0,X.jsxs)(j,{fontSize:`sm`,color:`fg.muted`,children:[`Encode the project ID and token as`,` `,(0,X.jsx)(`code`,{children:`base64(projectId:token)`}),`:`]}),(0,X.jsx)($,{label:`http`,display:`Authorization: Basic base64(${t??`<your-project-id>`}:pat-lw-...)`,revealedDisplay:e&&t?`Authorization: Basic ${btoa(`${t}:${e}`)}`:``,copyValue:e&&t?`Authorization: Basic ${btoa(`${t}:${e}`)}`:``,copyToastTitle:`Basic Auth header copied`,ariaLabel:`Copy Basic Auth header`})]})]})})]})})}function te({organizationId:e,projectId:t}){H();let n=B().data?.BASE_HOST??`https://app.langwatch.ai`,r=z.personalAccessToken.list.useQuery({organizationId:e}),i=z.personalAccessToken.myBindings.useQuery({organizationId:e}),d=z.personalAccessToken.create.useMutation(),f=z.personalAccessToken.revoke.useMutation(),p=z.useContext(),{open:v,onOpen:x,onClose:S}=u(),[C,w]=(0,W.useState)(null),[D,O]=(0,W.useState)(null),k=t=>{let n=(i.data??[]).map(e=>({role:e.role,customRoleId:e.customRoleId,scopeType:e.scopeType,scopeId:e.scopeId}));if(n.length===0){T.create({title:`No permissions to grant`,description:`You have no role bindings in this organization, so there is nothing to grant to a token.`,type:`error`,duration:5e3,meta:{closable:!0}});return}d.mutate({organizationId:e,name:t.name,description:t.description.trim()?t.description.trim():void 0,expiresAt:t.expiresAt,bindings:n},{onSuccess:e=>{w(e.token),p.personalAccessToken.list.invalidate()},onError:e=>{T.create({title:`Failed to create token`,description:e.message,type:`error`,duration:5e3,meta:{closable:!0}})}})},A=t=>{f.mutate({organizationId:e,patId:t},{onSuccess:()=>{O(null),T.create({title:`Token revoked`,type:`success`,duration:3e3,meta:{closable:!0}}),p.personalAccessToken.list.invalidate()},onError:e=>{T.create({title:`Failed to revoke token`,description:e.message,type:`error`,duration:5e3,meta:{closable:!0}})}})},M=(0,W.useMemo)(()=>r.data?.filter(e=>!e.revokedAt)??[],[r.data]);return(0,X.jsxs)(X.Fragment,{children:[(0,X.jsxs)(R,{gap:4,width:`full`,align:`start`,children:[(0,X.jsxs)(N,{width:`full`,children:[(0,X.jsx)(j,{fontSize:`sm`,color:`fg.muted`,children:`User-scoped tokens that authenticate API requests on your behalf. Shown once at creation — copy it immediately.`}),(0,X.jsx)(L,{}),(0,X.jsxs)(y,{size:`sm`,onClick:x,children:[(0,X.jsx)(a,{size:16}),`Create Token`]})]}),(0,X.jsx)(P,{width:`full`,overflow:`hidden`,children:(0,X.jsx)(F,{paddingY:0,paddingX:0,children:(0,X.jsxs)(g,{variant:`line`,size:`md`,width:`full`,children:[(0,X.jsx)(l,{children:(0,X.jsxs)(s,{children:[(0,X.jsx)(_,{children:`Name`}),(0,X.jsx)(_,{children:`Permissions`}),(0,X.jsx)(_,{children:`Expires`}),(0,X.jsx)(_,{children:`Created`}),(0,X.jsx)(_,{children:`Last Used`}),(0,X.jsx)(_,{width:`80px`})]})}),(0,X.jsxs)(c,{children:[M.length===0&&(0,X.jsx)(s,{children:(0,X.jsx)(m,{colSpan:6,children:(0,X.jsx)(j,{color:`fg.muted`,textAlign:`center`,paddingY:4,children:`No active tokens. Create one to get started.`})})}),M.map(e=>(0,X.jsxs)(s,{children:[(0,X.jsx)(m,{children:(0,X.jsxs)(N,{align:`start`,children:[(0,X.jsx)(b,{paddingTop:1,children:(0,X.jsx)(o,{size:14})}),(0,X.jsxs)(R,{align:`start`,gap:0,children:[(0,X.jsx)(j,{children:e.name}),e.description&&(0,X.jsx)(j,{fontSize:`xs`,color:`fg.muted`,children:e.description})]})]})}),(0,X.jsx)(m,{children:(0,X.jsx)(j,{fontSize:`sm`,color:`fg.muted`,children:Y(e.roleBindings)})}),(0,X.jsx)(m,{children:e.expiresAt?new Date(e.expiresAt)<new Date?(0,X.jsx)(E,{size:`sm`,colorPalette:`red`,children:`Expired`}):new Date(e.expiresAt).toLocaleDateString():(0,X.jsx)(E,{size:`sm`,colorPalette:`gray`,children:`Never`})}),(0,X.jsx)(m,{children:new Date(e.createdAt).toLocaleDateString()}),(0,X.jsx)(m,{children:e.lastUsedAt?new Date(e.lastUsedAt).toLocaleDateString():(0,X.jsx)(E,{size:`sm`,colorPalette:`gray`,children:`Never`})}),(0,X.jsx)(m,{children:(0,X.jsx)(y,{size:`xs`,variant:`ghost`,colorPalette:`red`,"aria-label":`Revoke token ${e.name}`,onClick:()=>O(e.id),children:(0,X.jsx)(h,{size:14,"aria-hidden":`true`})})})]},e.id))]})]})})})]}),(0,X.jsx)(Z,{isOpen:v&&!C,isCreating:d.isLoading,myBindings:i,onClose:S,onCreate:k}),(0,X.jsx)(ee,{newToken:C,projectId:t,endpoint:n,onClose:()=>{w(null),S()}}),(0,X.jsx)(Q,{patId:D,isRevoking:f.isLoading,onCancel:()=>O(null),onConfirm:A})]})}function ne(){let{project:e}=V(),t=B(),n=e?.apiKey??``,i=t.data?.BASE_HOST??`https://app.langwatch.ai`;return(0,X.jsxs)(R,{gap:4,width:`full`,align:`stretch`,children:[(0,X.jsx)(j,{fontSize:`sm`,color:`fg.muted`,children:`One shared key per project, used by the SDK and older integrations that send traces on behalf of the project rather than a user.`}),(0,X.jsxs)(N,{align:`start`,gap:2,padding:3,borderWidth:`1px`,borderColor:`orange.emphasized`,background:`orange.subtle`,borderRadius:`md`,children:[(0,X.jsx)(b,{color:`orange.fg`,paddingTop:.5,children:(0,X.jsx)(r,{size:16})}),(0,X.jsxs)(j,{fontSize:`sm`,color:`fg`,children:[`Prefer`,` `,(0,X.jsx)(j,{as:`span`,fontWeight:`600`,children:`Personal Access Tokens`}),` `,`for new integrations — they're scoped to a user, honor your role bindings, and can be revoked individually. Project API keys remain available for backwards compatibility.`]})]}),(0,X.jsx)($,{label:`.env`,display:J([{key:`LANGWATCH_API_KEY`,value:n,mask:!0},{key:`LANGWATCH_ENDPOINT`,value:i}]),revealedDisplay:J([{key:`LANGWATCH_API_KEY`,value:n},{key:`LANGWATCH_ENDPOINT`,value:i}]),copyValue:J([{key:`LANGWATCH_API_KEY`,value:n},{key:`LANGWATCH_ENDPOINT`,value:i}]),copyToastTitle:`.env copied to clipboard`,ariaLabel:`Copy .env contents`})]})}function re(){let{organization:e,project:t}=V();return e?(0,X.jsx)(U,{children:(0,X.jsxs)(R,{gap:4,width:`full`,maxWidth:`960px`,align:`stretch`,children:[(0,X.jsxs)(R,{gap:1,align:`start`,children:[(0,X.jsx)(A,{size:`lg`,children:`API Keys`}),(0,X.jsx)(j,{fontSize:`sm`,color:`fg.muted`,children:`Manage credentials used to authenticate with the LangWatch API.`})]}),(0,X.jsxs)(x,{variant:`line`,defaultValue:`pats`,children:[(0,X.jsxs)(C,{children:[(0,X.jsx)(S,{value:`pats`,color:`fg.muted`,_selected:{color:`fg`,fontWeight:`semibold`},children:`Personal Access Tokens`}),(0,X.jsxs)(S,{value:`project`,gap:2,color:`fg.muted`,_selected:{color:`fg`,fontWeight:`semibold`},children:[`Project API Key`,(0,X.jsx)(E,{size:`sm`,colorPalette:`yellow`,variant:`outline`,children:`Legacy`})]})]}),(0,X.jsx)(w,{value:`pats`,paddingTop:6,children:(0,X.jsx)(te,{organizationId:e.id,projectId:t?.id})}),(0,X.jsx)(w,{value:`project`,paddingTop:6,children:(0,X.jsx)(ne,{})})]})]})}):(0,X.jsx)(U,{})}export{re as default};
|
|
3
|
-
//# sourceMappingURL=api-keys-
|
|
3
|
+
//# sourceMappingURL=api-keys-BJpKyuaz.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{s as e}from"./chunk-Bj-mKKzh.js";import{t}from"./react-C7JcuhbW.js";import{$i as n,Aa as r,Lo as i,Ss as a,Xr as o,Zr as s,_s as c,bs as l,ea as u,hn as d,vs as f,xs as ee,ys as p}from"./command-bar-CaJygoez.js";import{j as m,r as h}from"./stack-oJ9iWdbl.js";import{t as te}from"./box-BsM8YLGl.js";import{an as g,i as _}from"./dist-SwV3YZv3.js";import{n as ne,r as re,t as ie}from"./native-select-B51i56CE.js";import{t as ae}from"./heading-D90dlSnH.js";import{t as v}from"./text-CwTrMF8x.js";import{r as oe}from"./code-FF_ibTVI.js";import{t as y}from"./input-C7emsUCL.js";import{t as b}from"./h-stack-BKLDJ2vg.js";import{a as x,i as S,n as C,r as w,t as T}from"./alert-SnQmACl1.js";import{t as se}from"./link-CwZhwOLq.js";import{t as ce}from"./spacer-2LJJGbo8.js";import{t as E}from"./v-stack-EOPQ57OZ.js";import{s as D}from"./auth-client-D3UhxhQi.js";import{r as le}from"./next-router-C6sliiV7.js";import{t as ue}from"./useOrganizationTeamProject-DC0iozx2.js";import{t as de}from"./download-X34ozaiD.js";import{n as fe,t as O}from"./SettingsLayout-CLCGxMAe.js";import{t as pe}from"./ContactSalesBlock-CijLBwRC.js";import{t as k}from"./WithPermissionGuard-DD8uo3UK.js";import{t as me}from"./NavigationFooter-CiOVzDUh.js";var he=e(s()),A=e(t()),j=m(),M=4096;function N(e){if(e==null)return``;let t=JSON.stringify(e);return t.length<=M?t:`${t.slice(0,M)}…[truncated ${t.length-M} chars]`}function P(){let{organization:e,project:t,organizations:s}=ue(),{isEnterprise:m,isLoading:k}=fe(),M=le(),{period:{startDate:P,endDate:F}}=u(30),I=(e,t)=>{if(!e)return t;let n=Number(e);return isNaN(n)?t:n},L=I(M.query.pageOffset,0),R=I(M.query.pageSize,25),[z,ge]=(0,A.useState)(M.query.userSearch??``),[B,_e]=(0,A.useState)(M.query.actionFilter??``),V=typeof M.query.targetKind==`string`?M.query.targetKind:``,H=typeof M.query.targetId==`string`?M.query.targetId:``,[U,ve]=(0,A.useState)(t?.id??null),[ye,W]=(0,A.useState)(!1),G=e?.id??``,K=D.useContext(),{data:be}=D.organization.getOrganizationWithMembersAndTheirTeams.useQuery({organizationId:G},{enabled:!!e}),q=z?be?.members.find(e=>{let t=z.toLowerCase(),n=e.user.name?.toLowerCase().includes(t)??!1,r=e.user.email?.toLowerCase().includes(t)??!1;return n||r})?.userId:void 0,{data:J,isLoading:xe}=D.organization.getAuditLogs.useQuery({organizationId:G,projectId:U??void 0,userId:q,pageOffset:L,pageSize:R,action:B||void 0,startDate:P.getTime(),endDate:F.getTime(),targetKind:V||void 0,targetId:H||void 0},{enabled:!!e&&m});if(!e||k)return(0,j.jsx)(O,{children:(0,j.jsx)(E,{align:`center`,justify:`center`,width:`full`,height:`200px`,children:(0,j.jsx)(h,{})})});if(!m)return(0,j.jsx)(O,{children:(0,j.jsxs)(E,{gap:6,width:`full`,align:`start`,children:[(0,j.jsxs)(S,{status:`info`,children:[(0,j.jsx)(w,{}),(0,j.jsxs)(T,{children:[(0,j.jsx)(x,{children:`Enterprise Feature`}),(0,j.jsx)(C,{children:`Organisation-wide audit logs — including AI Gateway events (virtual-key / budget / provider / cache-rule mutations) alongside logins, member changes, settings, RBAC, and billing — are available on Enterprise plans. Contact sales to upgrade.`})]})]}),(0,j.jsx)(te,{width:`full`,children:(0,j.jsx)(pe,{})})]})});let Y=e=>{M.push({pathname:M.pathname,query:{...M.query,...e,pageOffset:0}})},Se=e=>{ge(e),Y({userSearch:e})},Ce=e=>{_e(e),Y({actionFilter:e})},X=e=>{ve(e),Y({projectId:e??``})},we=()=>{let e=L+R;M.push({pathname:M.pathname,query:{...M.query,pageOffset:e.toString()}})},Te=()=>{if(L>0){let e=L-R;M.push({pathname:M.pathname,query:{...M.query,pageOffset:e.toString()}})}},Ee=e=>{M.push({pathname:M.pathname,query:{...M.query,pageSize:e.toString(),pageOffset:`0`}})},Z=J?.totalCount??0,Q=J?.auditLogs??[],De=async()=>{if(e){W(!0);try{let t=[],n=0,r=5e3,i=0,a={organizationId:e.id,projectId:U??void 0,userId:q,action:B||void 0,startDate:P.getTime(),endDate:F.getTime(),targetKind:V||void 0,targetId:H||void 0},o=await K.organization.getAuditLogs.fetch({...a,pageOffset:0,pageSize:r});for(t.push(...o.auditLogs??[]),i=o.totalCount,n=r;n<i;){let e=await K.organization.getAuditLogs.fetch({...a,pageOffset:n,pageSize:r});if(!e.auditLogs||e.auditLogs.length===0)break;t.push(...e.auditLogs),n+=r}let s=[`Timestamp`,`Source`,`User Name`,`User Email`,`Action`,`Target Kind`,`Target Id`,`Project`,`IP Address`,`User Agent`,`Error`,`Args`,`Before`,`After`],c=t.map(e=>[new Date(e.createdAt).toISOString(),e.source??`platform`,e.user?.name??``,e.user?.email??``,e.action,e.targetKind??``,e.targetId??``,e.project?.name??e.projectId??``,e.ipAddress??``,e.userAgent??``,e.error??``,N(e.args),N(e.before),N(e.after)]),l=he.default.unparse({fields:s,data:c}),u=window.URL.createObjectURL(new Blob([l])),d=document.createElement(`a`);d.href=u;let f=`audit_logs_${new Date().toISOString().split(`T`)[0]}.csv`;d.setAttribute(`download`,f),document.body.appendChild(d),d.click(),d.remove(),window.URL.revokeObjectURL(u)}catch(e){console.error(`Failed to export audit logs:`,e)}finally{W(!1)}}},Oe=()=>{let{targetKind:e,targetId:t,...n}=M.query;M.replace({pathname:M.pathname,query:n})},$=(()=>{if(!V||!H||!t?.slug)return null;let e={virtual_key:{path:`gateway/virtual-keys`,label:`Virtual key`},budget:{path:`gateway/budgets`,label:`Budget`}}[V];return e?{href:`/${t.slug}/${e.path}/${H}`,label:e.label}:null})();return(0,j.jsx)(O,{children:(0,j.jsxs)(E,{gap:6,width:`full`,align:`start`,children:[(0,j.jsxs)(b,{width:`full`,marginTop:2,children:[(0,j.jsxs)(E,{align:`start`,gap:1,children:[$&&(0,j.jsx)(se,{href:$.href,color:`fg.muted`,fontSize:`sm`,children:(0,j.jsxs)(b,{gap:1,children:[(0,j.jsx)(oe,{size:14}),` `,$.label]})}),(0,j.jsx)(ae,{as:`h2`,children:`Audit Log`}),(0,j.jsx)(v,{color:`fg.muted`,children:`View all audit logs for your organization. Filter by project, user, action type, or date range.`}),V&&H&&(0,j.jsxs)(g,{colorPalette:`orange`,variant:`surface`,gap:1,cursor:`pointer`,onClick:Oe,title:`Clear target filter`,children:[V,` = `,H.slice(0,24),`… ×`]})]}),(0,j.jsx)(ce,{}),s&&t&&(0,j.jsx)(d,{organizations:s,project:t})]}),(0,j.jsxs)(b,{gap:4,width:`full`,flexWrap:`wrap`,align:`end`,children:[(0,j.jsxs)(E,{align:`start`,gap:1,flex:`1`,minWidth:`200px`,maxWidth:`300px`,children:[(0,j.jsx)(v,{fontSize:`sm`,fontWeight:`medium`,color:`fg.muted`,children:`Search by User`}),(0,j.jsx)(_,{startElement:(0,j.jsx)(r,{size:16}),width:`full`,children:(0,j.jsx)(y,{placeholder:`Search by name or email...`,value:z,onChange:e=>Se(e.target.value),width:`full`})})]}),(0,j.jsxs)(E,{align:`start`,gap:1,flex:`1`,minWidth:`200px`,maxWidth:`300px`,children:[(0,j.jsx)(v,{fontSize:`sm`,fontWeight:`medium`,color:`fg.muted`,children:`Filter by Action`}),(0,j.jsx)(y,{placeholder:`Filter by action type...`,value:B,onChange:e=>Ce(e.target.value),width:`full`})]}),(0,j.jsxs)(E,{align:`start`,gap:1,flex:`1`,minWidth:`150px`,maxWidth:`200px`,children:[(0,j.jsx)(v,{fontSize:`sm`,fontWeight:`medium`,color:`fg.muted`,children:`Project`}),(0,j.jsxs)(re,{size:`sm`,width:`full`,children:[(0,j.jsxs)(ie,{value:U??`all`,onChange:e=>X(e.target.value===`all`?null:e.target.value),children:[(0,j.jsx)(`option`,{value:`all`,children:`All Projects`}),e.teams.flatMap(e=>e.projects).map(e=>(0,j.jsx)(`option`,{value:e.id,children:e.name},e.id))]}),(0,j.jsx)(ne,{})]})]}),(0,j.jsxs)(E,{align:`start`,gap:1,flex:`1`,minWidth:`200px`,maxWidth:`300px`,children:[(0,j.jsx)(v,{fontSize:`sm`,fontWeight:`medium`,color:`fg.muted`,children:`Select Date`}),(0,j.jsx)(n,{period:{startDate:P,endDate:F},setPeriod:(e,t)=>{M.push({pathname:M.pathname,query:{...M.query,startDate:e.toISOString(),endDate:t.toISOString(),pageOffset:0}})}})]}),(0,j.jsxs)(o.HeaderButton,{onClick:()=>void De(),disabled:ye,children:[(0,j.jsx)(de,{}),`Export CSV`]})]}),xe?(0,j.jsxs)(E,{padding:8,children:[(0,j.jsx)(h,{}),(0,j.jsx)(v,{children:`Loading audit logs...`})]}):Q.length===0?(0,j.jsx)(E,{padding:8,children:(0,j.jsx)(v,{color:`fg.muted`,children:`No audit logs found`})}):(0,j.jsxs)(j.Fragment,{children:[(0,j.jsxs)(ee,{variant:`line`,width:`full`,children:[(0,j.jsx)(l,{children:(0,j.jsxs)(a,{children:[(0,j.jsx)(p,{children:`Timestamp`}),(0,j.jsx)(p,{children:`Source`}),(0,j.jsx)(p,{children:`User`}),(0,j.jsx)(p,{children:`Action`}),(0,j.jsx)(p,{children:`Target`}),(0,j.jsx)(p,{children:`Project`}),(0,j.jsx)(p,{children:`IP Address`}),(0,j.jsx)(p,{children:`Error`})]})}),(0,j.jsx)(c,{children:Q.map(t=>(0,j.jsxs)(a,{children:[(0,j.jsx)(f,{children:(0,j.jsxs)(E,{align:`start`,gap:0,children:[(0,j.jsx)(v,{fontSize:`sm`,children:new Date(t.createdAt).toLocaleString()}),(0,j.jsx)(v,{fontSize:`xs`,color:`fg.muted`,children:i(new Date(t.createdAt),{addSuffix:!0})})]})}),(0,j.jsx)(f,{children:(0,j.jsx)(g,{size:`sm`,variant:`subtle`,colorPalette:t.source===`gateway`?`purple`:`gray`,children:t.source===`gateway`?`Gateway`:`Platform`})}),(0,j.jsx)(f,{children:t.user?(0,j.jsxs)(E,{align:`start`,gap:0,children:[(0,j.jsx)(v,{fontSize:`sm`,fontWeight:`medium`,children:t.user.name??`Unknown`}),(0,j.jsx)(v,{fontSize:`xs`,color:`fg.muted`,children:t.user.email})]}):(0,j.jsx)(v,{fontSize:`sm`,color:`fg.subtle`,children:`User not found`})}),(0,j.jsx)(f,{children:(0,j.jsx)(v,{fontSize:`sm`,fontFamily:`mono`,children:t.action})}),(0,j.jsx)(f,{children:t.targetKind&&t.targetId?(0,j.jsxs)(E,{align:`start`,gap:0,children:[(0,j.jsx)(v,{fontSize:`xs`,color:`fg.muted`,children:t.targetKind}),(0,j.jsxs)(v,{fontSize:`xs`,fontFamily:`mono`,children:[t.targetId.slice(0,16),`…`]})]}):(0,j.jsx)(v,{fontSize:`sm`,color:`fg.subtle`,children:`—`})}),(0,j.jsx)(f,{children:t.projectId?(0,j.jsx)(v,{fontSize:`sm`,children:e.teams.flatMap(e=>e.projects).find(e=>e.id===t.projectId)?.name??t.projectId}):(0,j.jsx)(v,{fontSize:`sm`,color:`fg.subtle`,children:`—`})}),(0,j.jsx)(f,{children:t.ipAddress?(0,j.jsx)(v,{fontSize:`sm`,fontFamily:`mono`,children:t.ipAddress}):(0,j.jsx)(v,{fontSize:`sm`,color:`fg.subtle`,children:`—`})}),(0,j.jsx)(f,{children:t.error?(0,j.jsx)(v,{fontSize:`sm`,color:`red.600`,children:t.error}):(0,j.jsx)(v,{fontSize:`sm`,color:`fg.subtle`,children:`—`})})]},t.id))})]}),Z>0&&(0,j.jsx)(me,{totalHits:Z,pageOffset:L,pageSize:R,nextPage:we,prevPage:Te,changePageSize:Ee})]})]})})}var F=k(`auditLog:view`,{layoutComponent:O})(P);export{F as default};
|
|
2
|
-
//# sourceMappingURL=audit-log-
|
|
1
|
+
import{s as e}from"./chunk-Bj-mKKzh.js";import{t}from"./react-C7JcuhbW.js";import{$i as n,Aa as r,Lo as i,Ss as a,Xr as o,Zr as s,_s as c,bs as l,ea as u,hn as d,vs as f,xs as ee,ys as p}from"./command-bar-DUK45yin.js";import{j as m,r as h}from"./stack-oJ9iWdbl.js";import{t as te}from"./box-BsM8YLGl.js";import{an as g,i as _}from"./dist-Cds4Mqhj.js";import{n as ne,r as re,t as ie}from"./native-select-B51i56CE.js";import{t as ae}from"./heading-D90dlSnH.js";import{t as v}from"./text-CwTrMF8x.js";import{r as oe}from"./code-FF_ibTVI.js";import{t as y}from"./input-C7emsUCL.js";import{t as b}from"./h-stack-BKLDJ2vg.js";import{a as x,i as S,n as C,r as w,t as T}from"./alert-SnQmACl1.js";import{t as se}from"./link-CwZhwOLq.js";import{t as ce}from"./spacer-2LJJGbo8.js";import{t as E}from"./v-stack-EOPQ57OZ.js";import{s as D}from"./auth-client-D3UhxhQi.js";import{r as le}from"./next-router-C6sliiV7.js";import{t as ue}from"./useOrganizationTeamProject-DC0iozx2.js";import{t as de}from"./download-X34ozaiD.js";import{n as fe,t as O}from"./SettingsLayout--1gdEuhv.js";import{t as pe}from"./ContactSalesBlock-CnnuZ8iI.js";import{t as k}from"./WithPermissionGuard-B4Jo8E5-.js";import{t as me}from"./NavigationFooter-Dzvauw3l.js";var he=e(s()),A=e(t()),j=m(),M=4096;function N(e){if(e==null)return``;let t=JSON.stringify(e);return t.length<=M?t:`${t.slice(0,M)}…[truncated ${t.length-M} chars]`}function P(){let{organization:e,project:t,organizations:s}=ue(),{isEnterprise:m,isLoading:k}=fe(),M=le(),{period:{startDate:P,endDate:F}}=u(30),I=(e,t)=>{if(!e)return t;let n=Number(e);return isNaN(n)?t:n},L=I(M.query.pageOffset,0),R=I(M.query.pageSize,25),[z,ge]=(0,A.useState)(M.query.userSearch??``),[B,_e]=(0,A.useState)(M.query.actionFilter??``),V=typeof M.query.targetKind==`string`?M.query.targetKind:``,H=typeof M.query.targetId==`string`?M.query.targetId:``,[U,ve]=(0,A.useState)(t?.id??null),[ye,W]=(0,A.useState)(!1),G=e?.id??``,K=D.useContext(),{data:be}=D.organization.getOrganizationWithMembersAndTheirTeams.useQuery({organizationId:G},{enabled:!!e}),q=z?be?.members.find(e=>{let t=z.toLowerCase(),n=e.user.name?.toLowerCase().includes(t)??!1,r=e.user.email?.toLowerCase().includes(t)??!1;return n||r})?.userId:void 0,{data:J,isLoading:xe}=D.organization.getAuditLogs.useQuery({organizationId:G,projectId:U??void 0,userId:q,pageOffset:L,pageSize:R,action:B||void 0,startDate:P.getTime(),endDate:F.getTime(),targetKind:V||void 0,targetId:H||void 0},{enabled:!!e&&m});if(!e||k)return(0,j.jsx)(O,{children:(0,j.jsx)(E,{align:`center`,justify:`center`,width:`full`,height:`200px`,children:(0,j.jsx)(h,{})})});if(!m)return(0,j.jsx)(O,{children:(0,j.jsxs)(E,{gap:6,width:`full`,align:`start`,children:[(0,j.jsxs)(S,{status:`info`,children:[(0,j.jsx)(w,{}),(0,j.jsxs)(T,{children:[(0,j.jsx)(x,{children:`Enterprise Feature`}),(0,j.jsx)(C,{children:`Organisation-wide audit logs — including AI Gateway events (virtual-key / budget / provider / cache-rule mutations) alongside logins, member changes, settings, RBAC, and billing — are available on Enterprise plans. Contact sales to upgrade.`})]})]}),(0,j.jsx)(te,{width:`full`,children:(0,j.jsx)(pe,{})})]})});let Y=e=>{M.push({pathname:M.pathname,query:{...M.query,...e,pageOffset:0}})},Se=e=>{ge(e),Y({userSearch:e})},Ce=e=>{_e(e),Y({actionFilter:e})},X=e=>{ve(e),Y({projectId:e??``})},we=()=>{let e=L+R;M.push({pathname:M.pathname,query:{...M.query,pageOffset:e.toString()}})},Te=()=>{if(L>0){let e=L-R;M.push({pathname:M.pathname,query:{...M.query,pageOffset:e.toString()}})}},Ee=e=>{M.push({pathname:M.pathname,query:{...M.query,pageSize:e.toString(),pageOffset:`0`}})},Z=J?.totalCount??0,Q=J?.auditLogs??[],De=async()=>{if(e){W(!0);try{let t=[],n=0,r=5e3,i=0,a={organizationId:e.id,projectId:U??void 0,userId:q,action:B||void 0,startDate:P.getTime(),endDate:F.getTime(),targetKind:V||void 0,targetId:H||void 0},o=await K.organization.getAuditLogs.fetch({...a,pageOffset:0,pageSize:r});for(t.push(...o.auditLogs??[]),i=o.totalCount,n=r;n<i;){let e=await K.organization.getAuditLogs.fetch({...a,pageOffset:n,pageSize:r});if(!e.auditLogs||e.auditLogs.length===0)break;t.push(...e.auditLogs),n+=r}let s=[`Timestamp`,`Source`,`User Name`,`User Email`,`Action`,`Target Kind`,`Target Id`,`Project`,`IP Address`,`User Agent`,`Error`,`Args`,`Before`,`After`],c=t.map(e=>[new Date(e.createdAt).toISOString(),e.source??`platform`,e.user?.name??``,e.user?.email??``,e.action,e.targetKind??``,e.targetId??``,e.project?.name??e.projectId??``,e.ipAddress??``,e.userAgent??``,e.error??``,N(e.args),N(e.before),N(e.after)]),l=he.default.unparse({fields:s,data:c}),u=window.URL.createObjectURL(new Blob([l])),d=document.createElement(`a`);d.href=u;let f=`audit_logs_${new Date().toISOString().split(`T`)[0]}.csv`;d.setAttribute(`download`,f),document.body.appendChild(d),d.click(),d.remove(),window.URL.revokeObjectURL(u)}catch(e){console.error(`Failed to export audit logs:`,e)}finally{W(!1)}}},Oe=()=>{let{targetKind:e,targetId:t,...n}=M.query;M.replace({pathname:M.pathname,query:n})},$=(()=>{if(!V||!H||!t?.slug)return null;let e={virtual_key:{path:`gateway/virtual-keys`,label:`Virtual key`},budget:{path:`gateway/budgets`,label:`Budget`}}[V];return e?{href:`/${t.slug}/${e.path}/${H}`,label:e.label}:null})();return(0,j.jsx)(O,{children:(0,j.jsxs)(E,{gap:6,width:`full`,align:`start`,children:[(0,j.jsxs)(b,{width:`full`,marginTop:2,children:[(0,j.jsxs)(E,{align:`start`,gap:1,children:[$&&(0,j.jsx)(se,{href:$.href,color:`fg.muted`,fontSize:`sm`,children:(0,j.jsxs)(b,{gap:1,children:[(0,j.jsx)(oe,{size:14}),` `,$.label]})}),(0,j.jsx)(ae,{as:`h2`,children:`Audit Log`}),(0,j.jsx)(v,{color:`fg.muted`,children:`View all audit logs for your organization. Filter by project, user, action type, or date range.`}),V&&H&&(0,j.jsxs)(g,{colorPalette:`orange`,variant:`surface`,gap:1,cursor:`pointer`,onClick:Oe,title:`Clear target filter`,children:[V,` = `,H.slice(0,24),`… ×`]})]}),(0,j.jsx)(ce,{}),s&&t&&(0,j.jsx)(d,{organizations:s,project:t})]}),(0,j.jsxs)(b,{gap:4,width:`full`,flexWrap:`wrap`,align:`end`,children:[(0,j.jsxs)(E,{align:`start`,gap:1,flex:`1`,minWidth:`200px`,maxWidth:`300px`,children:[(0,j.jsx)(v,{fontSize:`sm`,fontWeight:`medium`,color:`fg.muted`,children:`Search by User`}),(0,j.jsx)(_,{startElement:(0,j.jsx)(r,{size:16}),width:`full`,children:(0,j.jsx)(y,{placeholder:`Search by name or email...`,value:z,onChange:e=>Se(e.target.value),width:`full`})})]}),(0,j.jsxs)(E,{align:`start`,gap:1,flex:`1`,minWidth:`200px`,maxWidth:`300px`,children:[(0,j.jsx)(v,{fontSize:`sm`,fontWeight:`medium`,color:`fg.muted`,children:`Filter by Action`}),(0,j.jsx)(y,{placeholder:`Filter by action type...`,value:B,onChange:e=>Ce(e.target.value),width:`full`})]}),(0,j.jsxs)(E,{align:`start`,gap:1,flex:`1`,minWidth:`150px`,maxWidth:`200px`,children:[(0,j.jsx)(v,{fontSize:`sm`,fontWeight:`medium`,color:`fg.muted`,children:`Project`}),(0,j.jsxs)(re,{size:`sm`,width:`full`,children:[(0,j.jsxs)(ie,{value:U??`all`,onChange:e=>X(e.target.value===`all`?null:e.target.value),children:[(0,j.jsx)(`option`,{value:`all`,children:`All Projects`}),e.teams.flatMap(e=>e.projects).map(e=>(0,j.jsx)(`option`,{value:e.id,children:e.name},e.id))]}),(0,j.jsx)(ne,{})]})]}),(0,j.jsxs)(E,{align:`start`,gap:1,flex:`1`,minWidth:`200px`,maxWidth:`300px`,children:[(0,j.jsx)(v,{fontSize:`sm`,fontWeight:`medium`,color:`fg.muted`,children:`Select Date`}),(0,j.jsx)(n,{period:{startDate:P,endDate:F},setPeriod:(e,t)=>{M.push({pathname:M.pathname,query:{...M.query,startDate:e.toISOString(),endDate:t.toISOString(),pageOffset:0}})}})]}),(0,j.jsxs)(o.HeaderButton,{onClick:()=>void De(),disabled:ye,children:[(0,j.jsx)(de,{}),`Export CSV`]})]}),xe?(0,j.jsxs)(E,{padding:8,children:[(0,j.jsx)(h,{}),(0,j.jsx)(v,{children:`Loading audit logs...`})]}):Q.length===0?(0,j.jsx)(E,{padding:8,children:(0,j.jsx)(v,{color:`fg.muted`,children:`No audit logs found`})}):(0,j.jsxs)(j.Fragment,{children:[(0,j.jsxs)(ee,{variant:`line`,width:`full`,children:[(0,j.jsx)(l,{children:(0,j.jsxs)(a,{children:[(0,j.jsx)(p,{children:`Timestamp`}),(0,j.jsx)(p,{children:`Source`}),(0,j.jsx)(p,{children:`User`}),(0,j.jsx)(p,{children:`Action`}),(0,j.jsx)(p,{children:`Target`}),(0,j.jsx)(p,{children:`Project`}),(0,j.jsx)(p,{children:`IP Address`}),(0,j.jsx)(p,{children:`Error`})]})}),(0,j.jsx)(c,{children:Q.map(t=>(0,j.jsxs)(a,{children:[(0,j.jsx)(f,{children:(0,j.jsxs)(E,{align:`start`,gap:0,children:[(0,j.jsx)(v,{fontSize:`sm`,children:new Date(t.createdAt).toLocaleString()}),(0,j.jsx)(v,{fontSize:`xs`,color:`fg.muted`,children:i(new Date(t.createdAt),{addSuffix:!0})})]})}),(0,j.jsx)(f,{children:(0,j.jsx)(g,{size:`sm`,variant:`subtle`,colorPalette:t.source===`gateway`?`purple`:`gray`,children:t.source===`gateway`?`Gateway`:`Platform`})}),(0,j.jsx)(f,{children:t.user?(0,j.jsxs)(E,{align:`start`,gap:0,children:[(0,j.jsx)(v,{fontSize:`sm`,fontWeight:`medium`,children:t.user.name??`Unknown`}),(0,j.jsx)(v,{fontSize:`xs`,color:`fg.muted`,children:t.user.email})]}):(0,j.jsx)(v,{fontSize:`sm`,color:`fg.subtle`,children:`User not found`})}),(0,j.jsx)(f,{children:(0,j.jsx)(v,{fontSize:`sm`,fontFamily:`mono`,children:t.action})}),(0,j.jsx)(f,{children:t.targetKind&&t.targetId?(0,j.jsxs)(E,{align:`start`,gap:0,children:[(0,j.jsx)(v,{fontSize:`xs`,color:`fg.muted`,children:t.targetKind}),(0,j.jsxs)(v,{fontSize:`xs`,fontFamily:`mono`,children:[t.targetId.slice(0,16),`…`]})]}):(0,j.jsx)(v,{fontSize:`sm`,color:`fg.subtle`,children:`—`})}),(0,j.jsx)(f,{children:t.projectId?(0,j.jsx)(v,{fontSize:`sm`,children:e.teams.flatMap(e=>e.projects).find(e=>e.id===t.projectId)?.name??t.projectId}):(0,j.jsx)(v,{fontSize:`sm`,color:`fg.subtle`,children:`—`})}),(0,j.jsx)(f,{children:t.ipAddress?(0,j.jsx)(v,{fontSize:`sm`,fontFamily:`mono`,children:t.ipAddress}):(0,j.jsx)(v,{fontSize:`sm`,color:`fg.subtle`,children:`—`})}),(0,j.jsx)(f,{children:t.error?(0,j.jsx)(v,{fontSize:`sm`,color:`red.600`,children:t.error}):(0,j.jsx)(v,{fontSize:`sm`,color:`fg.subtle`,children:`—`})})]},t.id))})]}),Z>0&&(0,j.jsx)(me,{totalHits:Z,pageOffset:L,pageSize:R,nextPage:we,prevPage:Te,changePageSize:Ee})]})]})})}var F=k(`auditLog:view`,{layoutComponent:O})(P);export{F as default};
|
|
2
|
+
//# sourceMappingURL=audit-log-BdUdZjxp.js.map
|
package/langwatch/dist/client/assets/{authentication-DvwXfkp-.js → authentication-8mQB00CC.js}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{j as e,n as t,r as n}from"./stack-oJ9iWdbl.js";import{n as r}from"./toaster-C_DYALhL.js";import{K as i}from"./dist-
|
|
2
|
-
//# sourceMappingURL=authentication-
|
|
1
|
+
import{j as e,n as t,r as n}from"./stack-oJ9iWdbl.js";import{n as r}from"./toaster-C_DYALhL.js";import{K as i}from"./dist-Cds4Mqhj.js";import{t as a}from"./heading-D90dlSnH.js";import{t as o}from"./text-CwTrMF8x.js";import{a as s,r as c,t as l}from"./field-CnUiixMS.js";import{t as u}from"./input-C7emsUCL.js";import{t as d}from"./h-stack-BKLDJ2vg.js";import{Pt as f,jt as p,q as m}from"./lu-Bf6j_N19.js";import{t as h}from"./spacer-2LJJGbo8.js";import{t as g}from"./v-stack-EOPQ57OZ.js";import{a as _,n as v,s as y}from"./auth-client-D3UhxhQi.js";import{t as b}from"./usePublicEnv-1QvVAhAk.js";import{t as x}from"./useOrganizationTeamProject-DC0iozx2.js";import{D as S,j as C}from"./types-B5pOLKPA.js";import{s as w}from"./index.esm-X7lxUoP1.js";import{n as T,t as E}from"./HorizontalFormControl-BCD7-fcT.js";import{t as D}from"./SettingsLayout--1gdEuhv.js";var O=e(),k=(e,t)=>{if(e===`auth0`){let[e]=t.split(`|`);return({auth0:`Email/Password`,"google-oauth2":`Google`,windowslive:`Microsoft`,github:`GitHub`}[e??``]??i(e??`unknown`))+` (via auth0)`}return i(e)},A=S({currentPassword:C().min(1,`Current password is required`),newPassword:C().min(8,`Password must be at least 8 characters`),confirmPassword:C().min(8,`Password must be at least 8 characters`)}).refine(e=>e.newPassword===e.confirmPassword,{message:`Passwords don't match`,path:[`confirmPassword`]});function j(){let{data:e,isLoading:i}=y.user.getLinkedAccounts.useQuery({}),S=y.user.unlinkAccount.useMutation(),C=y.user.changePassword.useMutation(),{organization:j}=x(),{data:M}=_(),N=b(),P=N.data?.NEXTAUTH_PROVIDER,F=y.useContext(),{data:I}=y.user.getSsoStatus.useQuery({}),L=w({resolver:T(A),defaultValues:{currentPassword:``,newPassword:``,confirmPassword:``}}),R=!!j?.ssoProvider,z=I?.pendingSsoSetup??!1;if(!P)return null;let B=()=>{P&&(async()=>{let e=await v(P,{callbackUrl:window.location.href});e.error&&r.create({title:`Failed to link sign-in method`,description:e.error,type:`error`,meta:{closable:!0}})})()},V=async e=>{try{await S.mutateAsync({accountId:e}),await F.user.getLinkedAccounts.invalidate(),r.create({title:`Sign-in method removed`,type:`success`,meta:{closable:!0}})}catch(e){r.create({title:`Failed to remove sign-in method`,description:e instanceof Error?e.message:`Please try again`,type:`error`,meta:{closable:!0}})}};return(0,O.jsx)(D,{children:(0,O.jsxs)(g,{gap:6,width:`full`,align:`start`,children:[(0,O.jsxs)(g,{align:`start`,gap:1,children:[(0,O.jsx)(a,{as:`h2`,children:`Authentication Settings`}),(0,O.jsxs)(o,{children:[`(`,M?.user?.email,`)`]})]}),N.data?.NEXTAUTH_PROVIDER===`email`&&(0,O.jsx)(E,{label:`Change Password`,helper:(0,O.jsx)(o,{children:`Password must be at least 8 characters long.`}),children:(0,O.jsx)(`form`,{onSubmit:L.handleSubmit(async e=>{try{await C.mutateAsync({currentPassword:e.currentPassword,newPassword:e.newPassword}),r.create({title:`Password changed successfully`,type:`success`,meta:{closable:!0}}),L.reset()}catch(e){r.create({title:`Failed to change password`,description:e instanceof Error?e.message:`Please try again`,type:`error`,meta:{closable:!0}})}}),children:(0,O.jsxs)(g,{width:`full`,align:`stretch`,gap:4,marginTop:4,children:[(0,O.jsxs)(s,{invalid:!!L.formState.errors.currentPassword,children:[(0,O.jsx)(c,{children:`Current Password`}),(0,O.jsx)(u,{type:`password`,...L.register(`currentPassword`)}),L.formState.errors.currentPassword&&(0,O.jsx)(l,{children:L.formState.errors.currentPassword.message})]}),(0,O.jsxs)(s,{invalid:!!L.formState.errors.newPassword,children:[(0,O.jsx)(c,{children:`New Password`}),(0,O.jsx)(u,{type:`password`,...L.register(`newPassword`)}),L.formState.errors.newPassword&&(0,O.jsx)(l,{children:L.formState.errors.newPassword.message})]}),(0,O.jsxs)(s,{invalid:!!L.formState.errors.confirmPassword,children:[(0,O.jsx)(c,{children:`Confirm New Password`}),(0,O.jsx)(u,{type:`password`,...L.register(`confirmPassword`)}),L.formState.errors.confirmPassword&&(0,O.jsx)(l,{children:L.formState.errors.confirmPassword.message})]}),(0,O.jsx)(d,{width:`full`,justify:`end`,children:(0,O.jsx)(t,{type:`submit`,colorPalette:`orange`,disabled:C.isPending,loading:C.isPending,children:`Change Password`})})]})})}),N.data?.NEXTAUTH_PROVIDER&&N.data?.NEXTAUTH_PROVIDER!==`email`&&(0,O.jsx)(E,{label:`Linked Sign-in Methods`,helper:R?(0,O.jsxs)(o,{children:[`You are linked via your company's SSO provider.`,(0,O.jsx)(`br`,{}),`No additional sign-in methods can be linked.`]}):(0,O.jsxs)(o,{children:[`You can link additional sign-in methods to your account.`,(0,O.jsx)(`br`,{}),`All linked methods must use the same email address as your main account.`]}),children:i?(0,O.jsx)(n,{}):(0,O.jsxs)(g,{width:`full`,align:`end`,gap:6,marginTop:4,children:[(0,O.jsx)(g,{align:`start`,gap:1,children:e?.map(t=>(0,O.jsxs)(d,{width:`full`,children:[(0,O.jsx)(m,{}),(0,O.jsx)(o,{children:k(t.provider,t.providerAccountId)}),(0,O.jsx)(h,{}),e.length>1&&(0,O.jsx)(f,{"aria-label":`Remove sign-in method`,variant:`ghost`,size:`sm`,onClick:()=>void V(t.id),disabled:S.isLoading,children:(0,O.jsx)(p,{})})]},t.id))}),(0,O.jsx)(t,{onClick:B,colorPalette:`orange`,disabled:R&&!z,children:z?`Link SSO Sign-in Method`:`Link New Sign-in Method`})]})})]})})}export{j as default};
|
|
2
|
+
//# sourceMappingURL=authentication-8mQB00CC.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{hn as e,m as t,mn as n}from"./command-bar-
|
|
2
|
-
//# sourceMappingURL=authorize-
|
|
1
|
+
import{hn as e,m as t,mn as n}from"./command-bar-DUK45yin.js";import{j as r}from"./stack-oJ9iWdbl.js";import{t as i}from"./tracking-DbhAKeey.js";import{t as a}from"./heading-D90dlSnH.js";import{t as o}from"./text-CwTrMF8x.js";import{t as s}from"./h-stack-BKLDJ2vg.js";import{n as c,r as l,t as u}from"./card-CMtKVPVl.js";import{t as d}from"./container-Ccm3vB5X.js";import{t as f}from"./spacer-2LJJGbo8.js";import{t as p}from"./v-stack-EOPQ57OZ.js";import{t as m}from"./useOrganizationTeamProject-DC0iozx2.js";var h=r();function g(){let{organizations:t,project:r}=m();return(0,h.jsx)(n,{children:(0,h.jsx)(d,{maxWidth:`600px`,paddingTop:`200px`,children:(0,h.jsxs)(l,{children:[(0,h.jsx)(c,{children:(0,h.jsxs)(s,{width:`full`,align:`center`,children:[(0,h.jsx)(a,{as:`h1`,size:`md`,children:`Authorize`}),(0,h.jsx)(f,{}),t&&r&&(0,h.jsx)(e,{organizations:t,project:r})]})}),(0,h.jsx)(u,{children:(0,h.jsxs)(p,{align:`start`,gap:6,children:[(0,h.jsx)(o,{children:`Copy your LangWatch API key below and paste it into your command line or notebook to authorize it.`}),(0,h.jsx)(_,{})]})})]})})})}function _(){let{project:e}=m();return(0,h.jsx)(t,{value:e?.apiKey??``,label:`API key`,onClick:()=>i(`api_key_copy`,{project_id:e?.id})})}export{_ as APIKeyCopyInput,g as default};
|
|
2
|
+
//# sourceMappingURL=authorize-BpUueMNW.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{s as e}from"./chunk-Bj-mKKzh.js";import{t}from"./react-C7JcuhbW.js";import{hn as n,mn as r}from"./command-bar-
|
|
2
|
-
//# sourceMappingURL=authorize-
|
|
1
|
+
import{s as e}from"./chunk-Bj-mKKzh.js";import{t}from"./react-C7JcuhbW.js";import{hn as n,mn as r}from"./command-bar-DUK45yin.js";import{j as i,n as a}from"./stack-oJ9iWdbl.js";import{n as o}from"./toaster-C_DYALhL.js";import{t as s}from"./heading-D90dlSnH.js";import{t as c}from"./text-CwTrMF8x.js";import{t as l}from"./h-stack-BKLDJ2vg.js";import{n as u,r as d,t as f}from"./card-CMtKVPVl.js";import{t as p}from"./container-Ccm3vB5X.js";import{t as m}from"./spacer-2LJJGbo8.js";import{t as h}from"./v-stack-EOPQ57OZ.js";import{a as g}from"./auth-client-D3UhxhQi.js";import{r as _}from"./next-router-C6sliiV7.js";import{t as v}from"./useOrganizationTeamProject-DC0iozx2.js";var y=e(t()),b=i();function x(){let e=_(),{data:t,status:i}=g(),x={response_type:e.query.response_type??``,client_id:e.query.client_id??``,redirect_uri:e.query.redirect_uri??``,state:e.query.state??``,code_challenge:e.query.code_challenge??``,code_challenge_method:e.query.code_challenge_method??``,scope:e.query.scope??``},{organizations:S,project:C}=v(),[w,T]=(0,y.useState)(!1);if((0,y.useEffect)(()=>{if(i!==`loading`&&!t){let t=new URLSearchParams;for(let[e,n]of Object.entries(x))n&&t.set(e,n);let n=`/mcp/authorize?${t.toString()}`;e.replace(`/auth/signin?callbackUrl=${encodeURIComponent(n)}`)}},[t,i]),i===`loading`||!t)return null;let E=e=>{o.create({title:`Authorization failed`,description:e,type:`error`,meta:{closable:!0}}),T(!1)},D=async()=>{if(C){T(!0);try{let e=await fetch(`/api/mcp/authorize`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({projectId:C.id,redirect_uri:x.redirect_uri,state:x.state,code_challenge:x.code_challenge,code_challenge_method:x.code_challenge_method,client_id:x.client_id})}),t=await e.json();if(!e.ok){E(t.error??`Unknown error`);return}t.redirect?window.location.href=t.redirect:E(`No redirect URL received from server`)}catch(e){E(e instanceof Error?e.message:`Network error`)}}},O=()=>{if(x.redirect_uri){let t=new URL(x.redirect_uri);if(t.protocol===`javascript:`||t.protocol===`data:`||t.protocol===`vbscript:`){e.push(`/`);return}t.searchParams.set(`error`,`access_denied`),x.state&&t.searchParams.set(`state`,x.state),window.location.href=t.toString()}else e.push(`/`)},k=x.scope||`mcp:tools`;return(0,b.jsx)(r,{children:(0,b.jsx)(p,{maxWidth:`600px`,paddingTop:`200px`,children:(0,b.jsxs)(d,{children:[(0,b.jsx)(u,{children:(0,b.jsxs)(l,{width:`full`,align:`center`,children:[(0,b.jsx)(s,{as:`h1`,size:`md`,children:`Authorize MCP Connection`}),(0,b.jsx)(m,{}),S&&C&&(0,b.jsx)(n,{organizations:S,project:C})]})}),(0,b.jsx)(f,{children:(0,b.jsxs)(h,{align:`start`,gap:6,children:[(0,b.jsx)(c,{children:`Allow this application to access your LangWatch project tools and data?`}),(0,b.jsxs)(c,{fontSize:`sm`,color:`fg.muted`,children:[`Scopes: `,k]}),(0,b.jsxs)(l,{width:`full`,gap:2,children:[(0,b.jsx)(a,{colorScheme:`blue`,onClick:D,disabled:!C||w,loading:w,children:`Allow`}),(0,b.jsx)(a,{variant:`outline`,onClick:O,children:`Deny`})]})]})})]})})})}export{x as default};
|
|
2
|
+
//# sourceMappingURL=authorize-CbNBtmxW.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Do as e,Pr as t,Ss as n,Uo as r,Xo as i,_s as a,bs as o,cc as s,fa as c,fs as l,gs as u,hn as d,qi as f,r as p,rs as m,vs as h,x as g,xs as ee,ys as _}from"./command-bar-
|
|
2
|
-
//# sourceMappingURL=automations-
|
|
1
|
+
import{Do as e,Pr as t,Ss as n,Uo as r,Xo as i,_s as a,bs as o,cc as s,fa as c,fs as l,gs as u,hn as d,qi as f,r as p,rs as m,vs as h,x as g,xs as ee,ys as _}from"./command-bar-DUK45yin.js";import{j as v,n as y}from"./stack-oJ9iWdbl.js";import{t as b}from"./box-BsM8YLGl.js";import{t as x}from"./tooltip-AEm0YeiF.js";import{n as S}from"./toaster-C_DYALhL.js";import{r as C}from"./dist-Cds4Mqhj.js";import{n as w,r as T,t as E}from"./native-select-B51i56CE.js";import{t as D}from"./heading-D90dlSnH.js";import{t as O}from"./text-CwTrMF8x.js";import{t as k}from"./input-C7emsUCL.js";import{t as A}from"./h-stack-BKLDJ2vg.js";import{t as j}from"./container-Ccm3vB5X.js";import{t as M}from"./link-CwZhwOLq.js";import{t as N}from"./spacer-2LJJGbo8.js";import{t as P}from"./v-stack-EOPQ57OZ.js";import{s as F}from"./auth-client-D3UhxhQi.js";import{n as I,t as L}from"./FilterDisplay-0S3NqCkq.js";import{t as R}from"./useOrganizationTeamProject-DC0iozx2.js";import{D as z,b as B,j as V}from"./types-B5pOLKPA.js";import{s as H,t as U}from"./index.esm-X7lxUoP1.js";import{t as W}from"./SettingsLayout--1gdEuhv.js";import{t as G}from"./WithPermissionGuard-B4Jo8E5-.js";import{t as K}from"./NoDataInfoBlock-CLKl_wlX.js";var q=v();function J(){let{project:u,organizations:v}=R(),{open:C,onOpen:w,onClose:T}=s(),{openDrawer:E}=p(),k=F.automation.getTriggers.useQuery({projectId:u?.id??``},{enabled:!!u?.id}),z=F.dataset.getAll.useQuery({projectId:u?.id??``}),{setValue:B,...V}=H({defaultValues:{triggerId:``,customMessage:``,alertType:``,name:``}}),U=F.automation.toggleTrigger.useMutation(),G=F.automation.deleteById.useMutation(),J=(e,t)=>{U.mutate({triggerId:e,active:t,projectId:u?.id??``},{onSuccess:()=>{k.refetch()},onError:()=>{S.create({title:`Update automation`,type:`error`,description:`Failed to update automation`,meta:{closable:!0}})}})},Y=e=>e.datasetId?(0,q.jsx)(M,{href:`/${u?.slug}/datasets/${e.datasetId}`,children:z.data?.find(t=>t.id===e.datasetId)?.name}):``,Z=e=>{G.mutate({triggerId:e,projectId:u?.id??``},{onSuccess:()=>{S.create({title:`Delete automation`,type:`success`,description:`Automation deleted`,meta:{closable:!0}}),k.refetch()},onError:()=>{S.create({title:`Delete automation`,type:`error`,description:`Failed to delete automation`,meta:{closable:!0}})}})},Q=e=>{switch(e){case`SEND_SLACK_MESSAGE`:return`Slack`;case`SEND_EMAIL`:return`Email`;case`ADD_TO_DATASET`:return`Add to dataset`;case`ADD_TO_ANNOTATION_QUEUE`:return`Add to annotation queue`}},te=(e,t)=>{switch(e){case`SEND_SLACK_MESSAGE`:return(0,q.jsx)(x,{content:t.slackWebhook,children:(0,q.jsx)(O,{lineClamp:1,display:`block`,children:`Webhook`})});case`SEND_EMAIL`:return t.members?.join(`, `);case`ADD_TO_DATASET`:return Y(t)??``}},$=()=>{T(),k.refetch()},ne=({children:e,fontSize:t=`sm`})=>(0,q.jsxs)(A,{border:`1px solid lightgray`,borderRadius:`4px`,fontSize:t,width:`100%`,gap:2,paddingX:2,paddingY:1,children:[(0,q.jsx)(b,{color:`fg.muted`,children:(0,q.jsx)(I,{width:16,style:{minWidth:16}})}),e]}),re=({children:e})=>(0,q.jsx)(b,{padding:1,fontWeight:`500`,textTransform:`capitalize`,color:`fg.muted`,children:String(e).split(`.`).filter((e,t)=>t!==0||e.toLowerCase()===`evaluations`).join(` `).replace(`_`,` `)}),ie=({children:e})=>(0,q.jsx)(b,{padding:1,borderRightRadius:`md`,children:(0,q.jsx)(g,{lineClamp:1,expandable:!1,children:e})}),ae=e=>!e||e.length===0?null:(0,q.jsxs)(ne,{fontSize:`sm`,children:[(0,q.jsx)(re,{children:`Evaluations`}),(0,q.jsx)(ie,{children:e.map(e=>e?.name).join(`, `)})]});return(0,q.jsxs)(W,{children:[(0,q.jsxs)(j,{maxWidth:`1280px`,padding:4,children:[(0,q.jsxs)(A,{width:`full`,align:`top`,gap:6,paddingBottom:6,children:[(0,q.jsx)(D,{children:`Automations`}),(0,q.jsx)(N,{}),v&&u&&(0,q.jsx)(d,{organizations:v,project:u})]}),k.data&&k.data.length==0?(0,q.jsx)(K,{title:`No automations yet`,description:`Set up automations on your messages to get notified when certain conditions are met.`,docsInfo:(0,q.jsxs)(O,{children:[`To learn more about automations, please visit our`,` `,(0,q.jsx)(M,{color:`orange.400`,href:`https://docs.langwatch.ai/features/automations`,isExternal:!0,children:`documentation`}),`.`]}),icon:(0,q.jsx)(l,{})}):(0,q.jsxs)(P,{align:`stretch`,gap:4,children:[(0,q.jsx)(b,{border:`1px solid`,borderColor:`gray.200`,borderRadius:`lg`,overflow:`hidden`,children:(0,q.jsxs)(ee,{variant:`line`,width:`full`,children:[(0,q.jsx)(o,{children:(0,q.jsxs)(n,{children:[(0,q.jsx)(_,{children:`Name`}),(0,q.jsx)(_,{children:`Action`}),(0,q.jsx)(_,{children:`Destination`}),(0,q.jsx)(_,{children:`Filters`}),(0,q.jsx)(_,{whiteSpace:`nowrap`,children:`Last Triggered At`}),(0,q.jsx)(_,{children:`Active`}),(0,q.jsx)(_,{children:`Actions`})]})}),(0,q.jsx)(a,{children:k.isLoading?(0,q.jsx)(n,{children:(0,q.jsx)(h,{colSpan:5,children:`Loading...`})}):k.data?.map(e=>(0,q.jsxs)(n,{"data-trigger-id":e.id,children:[(0,q.jsx)(h,{children:e.name}),(0,q.jsx)(h,{children:Q(e.action)}),(0,q.jsx)(h,{children:te(e.action,e.actionParams)}),(0,q.jsx)(h,{maxWidth:`500px`,children:(0,q.jsxs)(P,{gap:2,children:[ae(e.checks?.filter(e=>!!e)??[]),e.filters&&typeof e.filters==`string`?(0,q.jsx)(L,{filters:e.filters,hasBorder:!0}):null]})}),(0,q.jsx)(h,{whiteSpace:`nowrap`,children:t(e.lastRunAt)}),(0,q.jsx)(h,{textAlign:`center`,children:(0,q.jsx)(c,{checked:e.active,onChange:()=>{J(e.id,!e.active)}})}),(0,q.jsx)(h,{children:(0,q.jsxs)(f.Root,{children:[(0,q.jsx)(f.Trigger,{asChild:!0,children:(0,q.jsx)(y,{variant:`ghost`,onClick:e=>{e.stopPropagation()},children:(0,q.jsx)(i,{})})}),(0,q.jsxs)(f.Content,{children:[e.action!=`ADD_TO_DATASET`&&(0,q.jsx)(f.Item,{value:`customize`,onClick:()=>{B(`triggerId`,e.id),B(`customMessage`,e.message??``),B(`alertType`,e.alertType??``),B(`name`,e.name??``),w()},children:(0,q.jsxs)(b,{display:`flex`,alignItems:`center`,gap:2,children:[(0,q.jsx)(m,{size:14}),`Customize Message`]})}),(0,q.jsx)(f.Item,{value:`edit`,onClick:t=>{t.stopPropagation(),E(`editAutomationFilter`,{automationId:e.id})},children:(0,q.jsxs)(b,{display:`flex`,alignItems:`center`,gap:2,children:[(0,q.jsx)(I,{size:14}),`Edit Filters`]})}),(0,q.jsx)(f.Item,{value:`delete`,onClick:t=>{t.stopPropagation(),Z(e.id)},children:(0,q.jsxs)(b,{display:`flex`,alignItems:`center`,gap:2,color:`red.600`,children:[(0,q.jsx)(r,{size:14}),`Delete`]})})]})]})})]},e.id))})]})}),(0,q.jsxs)(O,{fontSize:`sm`,color:`fg.muted`,children:[`Learn more about creating automations on our`,` `,(0,q.jsx)(M,{color:`orange.400`,href:`https://langwatch.ai/docs/features/automations#create-automations-based-on-langwatch-filters`,isExternal:!0,children:`docs`}),`.`]})]})]}),(0,q.jsx)(e.Root,{open:C,onOpenChange:({open:e})=>e?w():$(),size:`lg`,children:(0,q.jsxs)(e.Content,{children:[(0,q.jsx)(e.Header,{children:(0,q.jsx)(e.Title,{children:`Alert Message`})}),(0,q.jsx)(e.CloseTrigger,{}),(0,q.jsx)(e.Body,{children:(0,q.jsx)(X,{control:V.control,handleSubmit:V.handleSubmit,onClose:$})})]})})]})}var Y=G(`triggers:view`,{layoutComponent:W})(J);z({alertType:B([`CRITICAL`,`WARNING`,`INFO`,``]),customMessage:V().optional(),triggerId:V(),name:V().optional()});var X=({control:e,handleSubmit:t,onClose:n})=>{let r=F.automation.addCustomMessage.useMutation(),{project:i}=R();return(0,q.jsx)(`form`,{onSubmit:t(e=>{r.mutate({triggerId:e.triggerId,message:e.customMessage??``,alertType:e.alertType,projectId:i?.id??``,name:e.name??``},{onSuccess:()=>{S.create({title:`Custom message`,type:`success`,description:`Custom message added`,meta:{closable:!0}}),n()},onError:()=>{S.create({title:`Custom message`,type:`error`,description:`Failed to add custom message`,meta:{closable:!0}})}})}),children:(0,q.jsxs)(P,{gap:4,align:`start`,width:`full`,children:[(0,q.jsx)(O,{children:`Customize the notification message that will be sent when this automation activates. This will replace the default message.`}),(0,q.jsxs)(P,{width:`full`,align:`start`,children:[(0,q.jsx)(C,{children:`Title`}),(0,q.jsx)(U,{name:`name`,control:e,render:({field:e})=>(0,q.jsx)(k,{...e})})]}),(0,q.jsxs)(P,{width:`full`,align:`start`,children:[(0,q.jsx)(C,{children:`Alert Type`}),(0,q.jsx)(U,{name:`alertType`,control:e,render:({field:e})=>(0,q.jsxs)(T,{children:[(0,q.jsxs)(E,{...e,placeholder:`Select Alert Type`,children:[(0,q.jsx)(`option`,{value:`INFO`,children:`Info`}),(0,q.jsx)(`option`,{value:`WARNING`,children:`Warning`}),(0,q.jsx)(`option`,{value:`CRITICAL`,children:`Critical`})]}),(0,q.jsx)(w,{})]})})]}),(0,q.jsxs)(P,{width:`full`,align:`start`,children:[(0,q.jsx)(C,{children:`Alert Message`}),(0,q.jsx)(U,{name:`customMessage`,control:e,render:({field:e})=>(0,q.jsx)(u,{...e,placeholder:`Your message`})})]}),(0,q.jsxs)(A,{width:`full`,children:[(0,q.jsx)(N,{}),(0,q.jsx)(y,{type:`submit`,colorPalette:`orange`,children:`Save Automation`})]})]})})};export{Y as default};
|
|
2
|
+
//# sourceMappingURL=automations-34KMkRxd.js.map
|