@langwatch/server 3.6.0 → 3.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/feature-map.json +1279 -0
- package/langwatch/dist/client/assets/AddAnnotationQueueDrawer-C2BpUHmD.js +2 -0
- package/langwatch/dist/client/assets/AddDatasetRecordDrawer-MGG9OkL5.js +6 -0
- package/langwatch/dist/client/assets/AddOrEditAnnotationScore-DT7Wwgex.js +2 -0
- package/langwatch/dist/client/assets/AddOrEditAnnotationScoreDrawer-B_bvSihT.js +2 -0
- package/langwatch/dist/client/assets/AddOrEditDatasetDrawer-DTTe34qt.js +3 -0
- package/langwatch/dist/client/assets/AddParticipants-Cu80BF8F.js +2 -0
- package/langwatch/dist/client/assets/AgentHistoryDrawer-Dv3a7Uw1.js +2 -0
- package/langwatch/dist/client/assets/AgentHttpEditorDrawer-BsTydMou.js +5 -0
- package/langwatch/dist/client/assets/AgentListDrawer-CkuGaFHx.js +2 -0
- package/langwatch/dist/client/assets/AgentTypeSelectorDrawer-K0PUyG8U.js +2 -0
- package/langwatch/dist/client/assets/AgentWorkflowEditorDrawer-CMHvyQPV.js +2 -0
- package/langwatch/dist/client/assets/AgentWorkflowTargetEditorDrawer-B18KFX98.js +2 -0
- package/langwatch/dist/client/assets/AiGatewayLayout-DL7at8rW.js +2 -0
- package/langwatch/dist/client/assets/AnnotationsTable-CrX2ZAvY.js +2 -0
- package/langwatch/dist/client/assets/AreaChart-BYqCBYVe.js +2 -0
- package/langwatch/dist/client/assets/AutomationDrawer-gr9nl_bx.js +112 -0
- package/langwatch/dist/client/assets/BatchEvaluationSummary-DJGlsFFE.js +2 -0
- package/langwatch/dist/client/assets/BudgetEditDrawer-DA_Za9Jh.js +2 -0
- package/langwatch/dist/client/assets/CartesianChart-BvVgDMpj.js +54 -0
- package/langwatch/dist/client/assets/CascadeArchiveDialog-CRcsYqD3.js +2 -0
- package/langwatch/dist/client/assets/ChartCard-C-6jgIhJ.js +2 -0
- package/langwatch/dist/client/assets/ChartTooltip-DDBarZKG.js +4 -0
- package/langwatch/dist/client/assets/ChatWindow-DgNy40Dm.js +5 -0
- package/langwatch/dist/client/assets/CodeEvaluatorEditorDrawer-N8k4omh5.js +9 -0
- package/langwatch/dist/client/assets/CodexCodingDefaultsAsk-B-0KIS0U.js +2 -0
- package/langwatch/dist/client/assets/ColorfulBlockIcons-DntRdsrM.js +6 -0
- package/langwatch/dist/client/assets/ColumnTypeIcon-DHpZtj81.js +2 -0
- package/langwatch/dist/client/assets/ConfirmDialog-Bv_GbZtR.js +2 -0
- package/langwatch/dist/client/assets/ContactSalesBlock-BKfDeTTe.js +2 -0
- package/langwatch/dist/client/assets/Conversation-BLw2XAh1.js +2 -0
- package/langwatch/dist/client/assets/CopyInput-D4OHtSik.js +2 -0
- package/langwatch/dist/client/assets/CopyableInputWithPrefix-CqmK9rdo.js +2 -0
- package/langwatch/dist/client/assets/CreateProjectDrawer-z3akmVmk.js +2 -0
- package/langwatch/dist/client/assets/CreateTeamDrawer-Cq0VeHPU.js +2 -0
- package/langwatch/dist/client/assets/CustomGraph-D1JcOEDG.js +2 -0
- package/langwatch/dist/client/assets/DashboardLayout-cHFbN-Gk.js +6 -0
- package/langwatch/dist/client/assets/DashboardNameDrawer-Gox6uoUt.js +2 -0
- package/langwatch/dist/client/assets/DataPrivacyRuleDrawer-jE8I0jR2.js +2 -0
- package/langwatch/dist/client/assets/DatasetEditorTable-DKIy0xQj.js +2 -0
- package/langwatch/dist/client/assets/DatasetPickerList-DxrvRALJ.js +2 -0
- package/langwatch/dist/client/assets/DatasetPreviewTable-BtNFthdy.js +2 -0
- package/langwatch/dist/client/assets/DatasetSelector-DnwaHRnP.js +2 -0
- package/langwatch/dist/client/assets/DefaultModelOverrideDrawer-CdUN3LnJ.js +2 -0
- package/langwatch/dist/client/assets/DeleteConfirmationDialog-DuCAmpDY.js +2 -0
- package/langwatch/dist/client/assets/DocsLinks-CIoxiusp.js +2 -0
- package/langwatch/dist/client/assets/DynamicZodForm-g1UNpH1b.js +2 -0
- package/langwatch/dist/client/assets/EditAutomationFilterDrawer-BTKzOnMx.js +3 -0
- package/langwatch/dist/client/assets/EditModelProviderDrawer-CRJeagvH.js +4 -0
- package/langwatch/dist/client/assets/EditProjectDrawer-B6CJf6nC.js +2 -0
- package/langwatch/dist/client/assets/EmojiPickerModal-DT_Uj7SU.js +3 -0
- package/langwatch/dist/client/assets/EnterpriseLockedSurface-BjKgoqAx.js +2 -0
- package/langwatch/dist/client/assets/EvaluatorApiUsageDialog-BnIwWX8t.js +107 -0
- package/langwatch/dist/client/assets/EvaluatorCategorySelectorDrawer-BMpitetN.js +2 -0
- package/langwatch/dist/client/assets/EvaluatorEditorDrawer-8SJeJRen.js +2 -0
- package/langwatch/dist/client/assets/EvaluatorEditorShared-BJefmSxm.js +43 -0
- package/langwatch/dist/client/assets/EvaluatorHistoryDrawer-D9r7pDt9.js +2 -0
- package/langwatch/dist/client/assets/EvaluatorListDrawer-J_BFDGv3.js +2 -0
- package/langwatch/dist/client/assets/EvaluatorMappingsSection-DZFvYqNu.js +2 -0
- package/langwatch/dist/client/assets/EvaluatorSelection-DLWkQLtb.js +2 -0
- package/langwatch/dist/client/assets/EvaluatorSelectionBox-CPndz_g-.js +2 -0
- package/langwatch/dist/client/assets/EvaluatorTypeSelectorContent-B1g5DjJ7.js +2 -0
- package/langwatch/dist/client/assets/EvaluatorTypeSelectorDrawer-KKfZF0P-.js +2 -0
- package/langwatch/dist/client/assets/ExecutionState-Dh8lIhIP.js +2 -0
- package/langwatch/dist/client/assets/ExternalImage-As_YKOAz.js +34 -0
- package/langwatch/dist/client/assets/FeatureFlagsDrawer-ClPIMzIj.js +2 -0
- package/langwatch/dist/client/assets/FieldInfoTooltip-s2rM7SM0.js +2 -0
- package/langwatch/dist/client/assets/FieldsFilters-DePzLbr2.js +2 -0
- package/langwatch/dist/client/assets/FilterDisplay-ClLW19sO.js +2 -0
- package/langwatch/dist/client/assets/FilterSidebar-_ppaUjTr.js +2 -0
- package/langwatch/dist/client/assets/FormatMoney-CGjDIju_.js +2 -0
- package/langwatch/dist/client/assets/FoundryDrawer-DGKNXqmH.js +2 -0
- package/langwatch/dist/client/assets/FullLogo-itaa7fj-.js +2 -0
- package/langwatch/dist/client/assets/GovernanceLayout-DO9JArUM.js +2 -0
- package/langwatch/dist/client/assets/GraphsLayout-CjPYn5X3.js +2 -0
- package/langwatch/dist/client/assets/GroupBindingInputRow-zL2daQIU.js +2 -0
- package/langwatch/dist/client/assets/GuardrailsDrawer-Cf49144Z.js +91 -0
- package/langwatch/dist/client/assets/History-Cyg2gtXB.js +17 -0
- package/langwatch/dist/client/assets/HorizontalFormControl-COLSSPyK.js +2 -0
- package/langwatch/dist/client/assets/HoverableBigText-BLoq2yxD.js +2 -0
- package/langwatch/dist/client/assets/InstallCliCard-DvH3ygIs.js +2 -0
- package/langwatch/dist/client/assets/IntegratePaneShell-DmBxXblY.js +8 -0
- package/langwatch/dist/client/assets/InviteMemberDrawer-BPyf9yg9.js +2 -0
- package/langwatch/dist/client/assets/LLMModelCostDrawer-Ddduogw2.js +2 -0
- package/langwatch/dist/client/assets/LangyContextTarget-C6xwYVGg.js +2 -0
- package/langwatch/dist/client/assets/LegacyTracesDeprecationBanner-BYKcrVD_.js +2 -0
- package/langwatch/dist/client/assets/Legend-DoNXU8yt.js +6 -0
- package/langwatch/dist/client/assets/Line-DVmhil3S.js +2 -0
- package/langwatch/dist/client/assets/LineChart-JT5Tcp_D.js +2 -0
- package/langwatch/dist/client/assets/ListTable-sDgRCJ9e.js +2 -0
- package/langwatch/dist/client/assets/LoadingScreen-XWYCoKBN.js +2 -0
- package/langwatch/dist/client/assets/Markdown-CjWZDaeK.js +3 -0
- package/langwatch/dist/client/assets/MenuLink-CCPiKN-n.js +2 -0
- package/langwatch/dist/client/assets/MessageCard-CbSQoH1U.js +2 -0
- package/langwatch/dist/client/assets/MetadataTag-B1XwJcdK.js +5 -0
- package/langwatch/dist/client/assets/ModelProviderCustomModelInput-DKgydORR.js +2 -0
- package/langwatch/dist/client/assets/ModelProviderScreen-CoHgPhxe.js +2 -0
- package/langwatch/dist/client/assets/ModelSelector-dbR6V8hR.js +2 -0
- package/langwatch/dist/client/assets/MyLayout-BCFIoFGU.js +2 -0
- package/langwatch/dist/client/assets/NavigationFooter-BV-y1Ccf.js +2 -0
- package/langwatch/dist/client/assets/NewWorkflowForm-DgYkTq45.js +2 -0
- package/langwatch/dist/client/assets/NoDataInfoBlock-CqSD7i-D.js +2 -0
- package/langwatch/dist/client/assets/OnboardingContainer-jXD3w576.js +2 -0
- package/langwatch/dist/client/assets/OnlineEvaluationDrawer-3RfgPXAt.js +2 -0
- package/langwatch/dist/client/assets/OpsPageShell-BOi49ML9.js +2 -0
- package/langwatch/dist/client/assets/OttlEditor-7MOJI6SZ.js +3 -0
- package/langwatch/dist/client/assets/OverflownText-DITOBs56.js +2 -0
- package/langwatch/dist/client/assets/ProjectAvatar-BOH7ULC-.js +2 -0
- package/langwatch/dist/client/assets/ProjectLangyLayout-D6uI0rgc.js +82 -0
- package/langwatch/dist/client/assets/PromptEditorDrawer-CawpMwv2.js +2 -0
- package/langwatch/dist/client/assets/PromptListDrawer-mJuEu6sl.js +2 -0
- package/langwatch/dist/client/assets/PropertySectionTitle-DM-QD_X7.js +37 -0
- package/langwatch/dist/client/assets/ProviderModelSelector-bu_UnJgn.js +2 -0
- package/langwatch/dist/client/assets/ProviderScopeChips-DAith1M3.js +2 -0
- package/langwatch/dist/client/assets/PushToCopiesDialog-ZhJKOmpB.js +2 -0
- package/langwatch/dist/client/assets/RandomColorAvatar-D4Pjdi5E.js +2 -0
- package/langwatch/dist/client/assets/ReferenceDot-BNL3mb_4.js +2 -0
- package/langwatch/dist/client/assets/RenderInputOutput-B6SIoJEE.js +261 -0
- package/langwatch/dist/client/assets/ScenarioFormDrawer-BreFWAEL.js +2 -0
- package/langwatch/dist/client/assets/ScenarioInputMappingSection-BO7xuz3Q.js +2 -0
- package/langwatch/dist/client/assets/ScenarioRunDetailDrawer-B7tqZUtg.js +3 -0
- package/langwatch/dist/client/assets/ScopeChipPicker-DW0UYA9z.js +2 -0
- package/langwatch/dist/client/assets/SearchInput-Q-TBf_3C.js +2 -0
- package/langwatch/dist/client/assets/SectionNavigationLayout-DELi2l8C.js +2 -0
- package/langwatch/dist/client/assets/SelectDatasetDrawer-z00GrHUJ.js +2 -0
- package/langwatch/dist/client/assets/SelectionActionBar-CmpsxKus.js +2 -0
- package/langwatch/dist/client/assets/SeriesFilterDrawer-DBl29Nft.js +2 -0
- package/langwatch/dist/client/assets/SettingsLayout-TFI-annu.js +2 -0
- package/langwatch/dist/client/assets/SetupWithAgentButton-ChiBWonD.js +4 -0
- package/langwatch/dist/client/assets/ShikiCommandBox-CvJJv-UK.js +5 -0
- package/langwatch/dist/client/assets/SpanDetails-Bf9G4Q7r.js +3 -0
- package/langwatch/dist/client/assets/SubscriptionPage-DojUae0-.js +2 -0
- package/langwatch/dist/client/assets/SuiteFormDrawer-BkSwohnS.js +2 -0
- package/langwatch/dist/client/assets/TabButton-IdHwwJvZ.js +3 -0
- package/langwatch/dist/client/assets/TableCell-BOc9hDdP.js +2 -0
- package/langwatch/dist/client/assets/TargetTypeSelectorDrawer-BkACL4B0.js +2 -0
- package/langwatch/dist/client/assets/TeamForm-CoGCbaXE.js +2 -0
- package/langwatch/dist/client/assets/TeamUserRoleField-DaCIsPr0.js +2 -0
- package/langwatch/dist/client/assets/TraceDetails-D_HPr1ii.js +9 -0
- package/langwatch/dist/client/assets/TraceDetailsDrawer-CFMdgFO6.js +2 -0
- package/langwatch/dist/client/assets/TraceIdPeek-DmsxeUlT.js +2 -0
- package/langwatch/dist/client/assets/TracesMapping-qL9_JqHU.js +2 -0
- package/langwatch/dist/client/assets/UpgradeModal-DaVSEBO2.js +92 -0
- package/langwatch/dist/client/assets/UpgradeModalContent-DUimbawj.js +2 -0
- package/langwatch/dist/client/assets/UploadCSVDrawer-2fH0dmmN.js +3 -0
- package/langwatch/dist/client/assets/VariablesSection-BOZytTct.js +2 -0
- package/langwatch/dist/client/assets/VersionBadge-BNwXa8K1.js +2 -0
- package/langwatch/dist/client/assets/ViaClaudeDesktopScreen-BvCK6x4i.js +1161 -0
- package/langwatch/dist/client/assets/ViewAutomationDrawer-CBoDRCfF.js +2 -0
- package/langwatch/dist/client/assets/VirtualKeySecretReveal-z9OhRCRq.js +54 -0
- package/langwatch/dist/client/assets/WelcomeLayout-veH9XP9n.js +2 -0
- package/langwatch/dist/client/assets/WithFeatureFlagGuard-D09SSCsN.js +2 -0
- package/langwatch/dist/client/assets/WithPermissionGuard-BBKTBlhW.js +2 -0
- package/langwatch/dist/client/assets/WorkflowCard-CUUg0Jb9.js +2 -0
- package/langwatch/dist/client/assets/WorkflowSelectorForEvaluatorDrawer-DQPMmz5y.js +2 -0
- package/langwatch/dist/client/assets/_...path_-Dl2wM_Co.js +2 -0
- package/langwatch/dist/client/assets/_Uint8Array-CVdXk-9j.js +2 -0
- package/langwatch/dist/client/assets/__...path__-dvuiwbR8.js +22 -0
- package/langwatch/dist/client/assets/_baseAssignValue-D1riHssy.js +2 -0
- package/langwatch/dist/client/assets/_baseClone-Btuu3kUN.js +2 -0
- package/langwatch/dist/client/assets/_baseEach-D42E_cYN.js +2 -0
- package/langwatch/dist/client/assets/_baseFor-DjY96g6R.js +2 -0
- package/langwatch/dist/client/assets/_experiment_-C41VDj2_.js +2 -0
- package/langwatch/dist/client/assets/_id_-6sd4MNOz.js +2 -0
- package/langwatch/dist/client/assets/_id_-7yHuXZsv.js +2 -0
- package/langwatch/dist/client/assets/_id_-BiJsS6cZ.js +2 -0
- package/langwatch/dist/client/assets/_id_-BxNfkyzv.js +2 -0
- package/langwatch/dist/client/assets/_id_-DjvwAa9I.js +2 -0
- package/langwatch/dist/client/assets/_id_-Dv1Ha5td.js +2 -0
- package/langwatch/dist/client/assets/_id_-qIAmzXj9.js +2 -0
- package/langwatch/dist/client/assets/_project_-WrF4swO9.js +8 -0
- package/langwatch/dist/client/assets/_runId_-uzKEhtNe.js +7 -0
- package/langwatch/dist/client/assets/_shell-CBKyngpn.js +2 -0
- package/langwatch/dist/client/assets/_slug_-B7rGjVou.js +17 -0
- package/langwatch/dist/client/assets/_slug_-BM065qSQ.js +2 -0
- package/langwatch/dist/client/assets/_slug_-DTN4hRRD.js +2 -0
- package/langwatch/dist/client/assets/_team_-DFCS7cLC.js +2 -0
- package/langwatch/dist/client/assets/_workflow_-Dm-v5D1q.js +25 -0
- package/langwatch/dist/client/assets/_workflow_-Od6Ld1fG.js +3 -0
- package/langwatch/dist/client/assets/accept-DfhUN0Qn.js +2 -0
- package/langwatch/dist/client/assets/activity-ikjk_AlK.js +1 -0
- package/langwatch/dist/client/assets/agents-BbtJ377u.js +2 -0
- package/langwatch/dist/client/assets/alerts-ikjk_AlK.js +1 -0
- package/langwatch/dist/client/assets/all-Ba9m0fkb.js +2 -0
- package/langwatch/dist/client/assets/analytics-BfdI38ZC.js +2 -0
- package/langwatch/dist/client/assets/annotation-scores-BY75kcBF.js +2 -0
- package/langwatch/dist/client/assets/annotations-DIwdkHHY.js +2 -0
- package/langwatch/dist/client/assets/anomaly-rules-BmEX38RD.js +2 -0
- package/langwatch/dist/client/assets/api-keys-BPifPObL.js +4 -0
- package/langwatch/dist/client/assets/asaplangy-BjnuNv4L.js +5 -0
- package/langwatch/dist/client/assets/audit-log-2z_Ec4XU.js +2 -0
- package/langwatch/dist/client/assets/auth-BJm09Odd.js +2 -0
- package/langwatch/dist/client/assets/authentication-D4a-VSlX.js +2 -0
- package/langwatch/dist/client/assets/authorize-BBjJ2zjw.js +2 -0
- package/langwatch/dist/client/assets/authorize-CHqAf3Jd.js +2 -0
- package/langwatch/dist/client/assets/automations-Bds5nLI_.js +2 -0
- package/langwatch/dist/client/assets/automations-ikjk_AlK.js +1 -0
- package/langwatch/dist/client/assets/billing-plans-K7xawVCS.js +2 -0
- package/langwatch/dist/client/assets/blank-DsMQ71pJ.js +2 -0
- package/langwatch/dist/client/assets/blobs-Dc7nKnmO.js +2 -0
- package/langwatch/dist/client/assets/blockDiagram-677ZJIJ3-57B2W0rq.js +133 -0
- package/langwatch/dist/client/assets/budgets-dKK-wYyg.js +3 -0
- package/langwatch/dist/client/assets/bug-reports-BxCDdVoL.js +2 -0
- package/langwatch/dist/client/assets/cache-rules-Ds14kJAt.js +2 -0
- package/langwatch/dist/client/assets/choose-X7Hyqyyu.js +2 -0
- package/langwatch/dist/client/assets/chunk-EX3LRPZG-DF3ACR9i.js +232 -0
- package/langwatch/dist/client/assets/chunk-FWX5IMBZ-CIlmcu0O.js +3 -0
- package/langwatch/dist/client/assets/chunk-PUDLZKDR-Dj_zAVVr.js +157 -0
- package/langwatch/dist/client/assets/chunk-RYQCIY6F-CjWAFgxP.js +2 -0
- package/langwatch/dist/client/assets/chunk-V7JOEXUC-BgVcuIhi.js +207 -0
- package/langwatch/dist/client/assets/classDiagram-OUVF2IWQ-Cw7PXCaC.js +2 -0
- package/langwatch/dist/client/assets/classDiagram-v2-EOCWNBFH-Cw7PXCaC.js +2 -0
- package/langwatch/dist/client/assets/codeAgentConfig-B0NzDmlQ.js +7 -0
- package/langwatch/dist/client/assets/codingDefaultSync-ebaLPfnN.js +2 -0
- package/langwatch/dist/client/assets/configure-CrbOTC5S.js +4 -0
- package/langwatch/dist/client/assets/custom-D8Emd7w-.js +12 -0
- package/langwatch/dist/client/assets/custom_evaluator-BtYta_Dj.js +31 -0
- package/langwatch/dist/client/assets/dagre-ClO7SEns.js +2 -0
- package/langwatch/dist/client/assets/dagre-VKFMJZFB-evqDS8UW.js +5 -0
- package/langwatch/dist/client/assets/data-privacy-GCArtTFq.js +2 -0
- package/langwatch/dist/client/assets/data-retention-BtLi9M98.js +2 -0
- package/langwatch/dist/client/assets/datasets-DeNG9KNJ.js +2 -0
- package/langwatch/dist/client/assets/debounce-r-8TPIqh.js +2 -0
- package/langwatch/dist/client/assets/defaultModelState-ByR0bEhZ.js +2 -0
- package/langwatch/dist/client/assets/dejaview-BF8VqQGI.js +2 -0
- package/langwatch/dist/client/assets/departments-D2L92_Qa.js +2 -0
- package/langwatch/dist/client/assets/devices-C8e0So_K.js +2 -0
- package/langwatch/dist/client/assets/dist-B1XMO10X.js +6 -0
- package/langwatch/dist/client/assets/drawerFromUrl-BZIwwDLm.js +2 -0
- package/langwatch/dist/client/assets/edit-pIB-bQM_.js +62 -0
- package/langwatch/dist/client/assets/email-suppressions-Bq0lhfwG.js +2 -0
- package/langwatch/dist/client/assets/erDiagram-Q63AITRT-BqEHcyA0.js +86 -0
- package/langwatch/dist/client/assets/error-2TTx9xpE.js +2 -0
- package/langwatch/dist/client/assets/evaluations-0Nc6rWP8.js +2 -0
- package/langwatch/dist/client/assets/evaluations-DHmE-YCm.js +2 -0
- package/langwatch/dist/client/assets/evaluators-DKbY-ajr.js +146 -0
- package/langwatch/dist/client/assets/evaluators-v4CDfsOE.js +2 -0
- package/langwatch/dist/client/assets/experiments-BRN0rGL9.js +1 -0
- package/langwatch/dist/client/assets/external-link-CtHzR85H.js +2 -0
- package/langwatch/dist/client/assets/feature-flags-BDyiuat4.js +2 -0
- package/langwatch/dist/client/assets/fetchSSE-GcVBzE9n.js +3 -0
- package/langwatch/dist/client/assets/fieldset-CIGh0Uxg.js +2 -0
- package/langwatch/dist/client/assets/flowDiagram-23GEKE2U-BOl-6oqO.js +1 -0
- package/langwatch/dist/client/assets/forgot-password-DjvudMXW.js +2 -0
- package/langwatch/dist/client/assets/formatMoney-ByqR-Rrd.js +2 -0
- package/langwatch/dist/client/assets/foundry-Co_CpgKb.js +477 -0
- package/langwatch/dist/client/assets/gateway-B0y3Tz7G.js +2 -0
- package/langwatch/dist/client/assets/getEvaluator-pJF3ehUx.js +2 -0
- package/langwatch/dist/client/assets/getRadiusAndStrokeWidthFromDot-Bbj-WQTj.js +2 -0
- package/langwatch/dist/client/assets/governance-BtuwwuRw.js +2 -0
- package/langwatch/dist/client/assets/graphlib-CwcejmA1.js +2 -0
- package/langwatch/dist/client/assets/groups-DTVa4dcS.js +2 -0
- package/langwatch/dist/client/assets/guardrails-BnCJsF0m.js +2 -0
- package/langwatch/dist/client/assets/http-BIG04f8c.js +7 -0
- package/langwatch/dist/client/assets/identifierUtils-B1LGnOD5.js +2 -0
- package/langwatch/dist/client/assets/immer-BdlOHsfO.js +14 -0
- package/langwatch/dist/client/assets/index-DtiounXP.js +68 -0
- package/langwatch/dist/client/assets/ingestion-source-detail-hmCupOG1.js +19 -0
- package/langwatch/dist/client/assets/ingestion-sources-sv7eDiMD.js +12 -0
- package/langwatch/dist/client/assets/integrations-CM7dYrOG.js +2 -0
- package/langwatch/dist/client/assets/isArrayLikeObject-6lUBvOUd.js +2 -0
- package/langwatch/dist/client/assets/isSymbol-n0ARt1yC.js +2 -0
- package/langwatch/dist/client/assets/langyHomeSuggestions-Oyh_vavj.js +2 -0
- package/langwatch/dist/client/assets/latestAliases-D_86OOcA.js +2 -0
- package/langwatch/dist/client/assets/license-CYtxniam.js +2 -0
- package/langwatch/dist/client/assets/loadModelCatalog-31-xT4W4.js +2 -0
- package/langwatch/dist/client/assets/map-BCpZm9Sc.js +2 -0
- package/langwatch/dist/client/assets/mappingValidation-DPNnGAuO.js +2 -0
- package/langwatch/dist/client/assets/me-1nxAV6zO.js +2 -0
- package/langwatch/dist/client/assets/me-wWuZrajs.js +7 -0
- package/langwatch/dist/client/assets/members-Bau-5CPK.js +2 -0
- package/langwatch/dist/client/assets/mermaid.core-oQEgcWXd.js +12 -0
- package/langwatch/dist/client/assets/messages-kTp5NaSm.js +2 -0
- package/langwatch/dist/client/assets/metrics-Cpovzjg4.js +2 -0
- package/langwatch/dist/client/assets/mindmap-definition-LN4V7U3C-OcYZSGuC.js +97 -0
- package/langwatch/dist/client/assets/model-costs-DiRpmy-H.js +2 -0
- package/langwatch/dist/client/assets/model-providers-DRq5Q7er.js +2 -0
- package/langwatch/dist/client/assets/modelProviderHelpers-STUAbD02.js +2 -0
- package/langwatch/dist/client/assets/my-queue-veenWZWf.js +2 -0
- package/langwatch/dist/client/assets/normalizeComparison-CDNTbMdZ.js +2 -0
- package/langwatch/dist/client/assets/not-found-Nu1odKyD.js +2 -0
- package/langwatch/dist/client/assets/now-BQGidI_5.js +2 -0
- package/langwatch/dist/client/assets/onboarding-BWJ038z8.js +2 -0
- package/langwatch/dist/client/assets/online-evaluations-k-WwH1ML.js +2 -0
- package/langwatch/dist/client/assets/ops-D9am3MEi.js +2 -0
- package/langwatch/dist/client/assets/organizations-CMTT_97U.js +2 -0
- package/langwatch/dist/client/assets/pages-D5p_o0LC.js +2 -0
- package/langwatch/dist/client/assets/persistence-jLMreGhL.js +2 -0
- package/langwatch/dist/client/assets/plans-v8LBcXa9.js +2 -0
- package/langwatch/dist/client/assets/product-CAja-R4_.js +2 -0
- package/langwatch/dist/client/assets/project-DbS0dYGR.js +2 -0
- package/langwatch/dist/client/assets/projections-B4mXJEvc.js +2 -0
- package/langwatch/dist/client/assets/projects-DnYaZW6w.js +2 -0
- package/langwatch/dist/client/assets/promptHandle-CQ_zUeRB.js +2 -0
- package/langwatch/dist/client/assets/prompts-BAxWZhm5.js +8 -0
- package/langwatch/dist/client/assets/radio-group-y_PtCP6q.js +2 -0
- package/langwatch/dist/client/assets/registry-KCPOxhx0.js +2 -0
- package/langwatch/dist/client/assets/reports-B_Y4pHYs.js +2 -0
- package/langwatch/dist/client/assets/request-bU99z82H.js +2 -0
- package/langwatch/dist/client/assets/requirementDiagram-TGXJPOKE-BYId9zaF.js +85 -0
- package/langwatch/dist/client/assets/reset-password-zMr6-23y.js +2 -0
- package/langwatch/dist/client/assets/role-bindings-BvPzAUj1.js +2 -0
- package/langwatch/dist/client/assets/roles-CjwqOKoo.js +2 -0
- package/langwatch/dist/client/assets/routing-policies-C7yjQJuY.js +5 -0
- package/langwatch/dist/client/assets/scenarios-CdrzuCtM.js +2 -0
- package/langwatch/dist/client/assets/scheduler-CfXVwiOa.js +2 -0
- package/langwatch/dist/client/assets/schedules-ikjk_AlK.js +1 -0
- package/langwatch/dist/client/assets/scim-CGJ8MwNu.js +2 -0
- package/langwatch/dist/client/assets/secrets-DZef0jTb.js +2 -0
- package/langwatch/dist/client/assets/segment-group-EW0AyNd-.js +2 -0
- package/langwatch/dist/client/assets/segmented-control-SS4Yq_Ti.js +2 -0
- package/langwatch/dist/client/assets/select-C5JAM7Gf.js +2 -0
- package/langwatch/dist/client/assets/send-TZcuPW9Z.js +2 -0
- package/langwatch/dist/client/assets/sequenceView-vubFe0e7.js +5 -0
- package/langwatch/dist/client/assets/seriesOptions-0YtTiTzZ.js +1011 -0
- package/langwatch/dist/client/assets/settings-CfAtn_PH.js +2 -0
- package/langwatch/dist/client/assets/setup-In6OXn3a.js +2 -0
- package/langwatch/dist/client/assets/shikiAdapter-lZp3oxvk.js +3 -0
- package/langwatch/dist/client/assets/signin-CMU_rlgk.js +2 -0
- package/langwatch/dist/client/assets/signup-CYKtIfrB.js +2 -0
- package/langwatch/dist/client/assets/stateDiagram-2N3HPSRC-CKO-9021.js +2 -0
- package/langwatch/dist/client/assets/stateDiagram-v2-6OUMAXLB-BnXuBsJr.js +2 -0
- package/langwatch/dist/client/assets/subscription-CBiotOK9.js +3 -0
- package/langwatch/dist/client/assets/subscriptions-D55paZaw.js +2 -0
- package/langwatch/dist/client/assets/suggestionUI-KPD1is36.js +106 -0
- package/langwatch/dist/client/assets/swimlanes-5IMT3BWC-B0ptAIsf.js +3 -0
- package/langwatch/dist/client/assets/swimlanesDiagram-G3AALYLV-DzqdWH4x.js +9 -0
- package/langwatch/dist/client/assets/switch-BOt3Np6s.js +2 -0
- package/langwatch/dist/client/assets/switch-BnyTlP1L.js +2 -0
- package/langwatch/dist/client/assets/tabs-D8PJtlU3.js +2 -0
- package/langwatch/dist/client/assets/teams-CE3UCC84.js +2 -0
- package/langwatch/dist/client/assets/teams-CxmVu0zp.js +2 -0
- package/langwatch/dist/client/assets/tool-catalog-DTTKCxyF.js +7 -0
- package/langwatch/dist/client/assets/toolIcons-n2K5OHKw.js +2 -0
- package/langwatch/dist/client/assets/tooltip-CYWvZEOf.js +2 -0
- package/langwatch/dist/client/assets/topic-clustering-C37AbBFy.js +2 -0
- package/langwatch/dist/client/assets/topics-rviNSdYR.js +2 -0
- package/langwatch/dist/client/assets/traceExecutor-DQlsNg6N.js +55 -0
- package/langwatch/dist/client/assets/traces-DnlS2lMP.js +289 -0
- package/langwatch/dist/client/assets/tracesMapping-DJvqZsfB.js +3 -0
- package/langwatch/dist/client/assets/tracking-6s9dX1_R.js +2 -0
- package/langwatch/dist/client/assets/types-BeNupKna.js +2 -0
- package/langwatch/dist/client/assets/types-ChBnYRcc.js +2 -0
- package/langwatch/dist/client/assets/types-DXVP3BA7.js +2 -0
- package/langwatch/dist/client/assets/types-atzk7phf.js +2 -0
- package/langwatch/dist/client/assets/unsubscribe-uUCCImkQ.js +2 -0
- package/langwatch/dist/client/assets/usage-DBjFOkD3.js +2 -0
- package/langwatch/dist/client/assets/usage-De8DbhVE.js +2 -0
- package/langwatch/dist/client/assets/use-breakpoint-BdbDgj6J.js +2 -0
- package/langwatch/dist/client/assets/use-generic-onboarding-flow-CQjNkSYf.js +2 -0
- package/langwatch/dist/client/assets/useActivePlan-DZotDN7k.js +2 -0
- package/langwatch/dist/client/assets/useAllPromptsForProject-yZtsv1kJ.js +2 -0
- package/langwatch/dist/client/assets/useAnnotationQueues-BJ8Vb6SZ.js +2 -0
- package/langwatch/dist/client/assets/useAvailableEvaluators-C6cl3TSs.js +2 -0
- package/langwatch/dist/client/assets/useCyclingVerb-CMPh6fkl.js +2 -0
- package/langwatch/dist/client/assets/useDepartmentColumn-C4l1_4BR.js +2 -0
- package/langwatch/dist/client/assets/useEvaluationsV3Store-CMnxA8pt.js +2 -0
- package/langwatch/dist/client/assets/useExportTraces-DzTqFSlc.js +2 -0
- package/langwatch/dist/client/assets/useFeatureFlag-CKFU9lsX.js +2 -0
- package/langwatch/dist/client/assets/useInviteActions-CNRL7usw.js +2 -0
- package/langwatch/dist/client/assets/useLicenseEnforcement-BIiCopDI.js +2 -0
- package/langwatch/dist/client/assets/useLiteMemberGuard-ChV0lUs4.js +43 -0
- package/langwatch/dist/client/assets/usePersonalContext-D-HsFKQo.js +2 -0
- package/langwatch/dist/client/assets/useProjectSpanNames-BKMm-yLN.js +2 -0
- package/langwatch/dist/client/assets/useProjectsForCopy-BPGjhWUl.js +2 -0
- package/langwatch/dist/client/assets/useRunViaApiTabs-BGv2kygX.js +50 -0
- package/langwatch/dist/client/assets/useSavedViews-DH6Poufh.js +2 -0
- package/langwatch/dist/client/assets/useShowLangy-DvcJ7z1U.js +2 -0
- package/langwatch/dist/client/assets/useSimulationUpdateListener-CcqEq03v.js +2 -0
- package/langwatch/dist/client/assets/useTargetName-CByKsdU-.js +2 -0
- package/langwatch/dist/client/assets/useTargetNameMap-C8kjUxhY.js +2 -0
- package/langwatch/dist/client/assets/useTraceDetailsDrawer-BgcNOady.js +2 -0
- package/langwatch/dist/client/assets/useTraceUpdateListener-D5UNLNbd.js +2 -0
- package/langwatch/dist/client/assets/useUrlScopeFilter-D0HZ-mkj.js +2 -0
- package/langwatch/dist/client/assets/useWorkflowStore-CVvg8K0Q.js +8 -0
- package/langwatch/dist/client/assets/users-802bPAIG.js +2 -0
- package/langwatch/dist/client/assets/users-CWkRn-Tl.js +2 -0
- package/langwatch/dist/client/assets/users-DhJ0ZUHi.js +2 -0
- package/langwatch/dist/client/assets/v3-D65ySaeM.js +2 -0
- package/langwatch/dist/client/assets/variables-BpyyIkKh.js +396 -0
- package/langwatch/dist/client/assets/viewStore-Bq2Jqc8R.js +2 -0
- package/langwatch/dist/client/assets/virtual-keys-Cbeg9TQU.js +2 -0
- package/langwatch/dist/client/assets/welcome-Bh4D-qW7.js +16 -0
- package/langwatch/dist/client/assets/wizard-spBSxei8.js +2 -0
- package/langwatch/dist/client/assets/workbench-Bid7wYk7.js +2 -0
- package/langwatch/dist/client/assets/workflows-1TodsGOO.js +3 -0
- package/langwatch/dist/client/assets/wrap-noqflF_F.js +2 -0
- package/langwatch/dist/client/index.html +1 -1
- package/langwatch/package.json +1 -1
- package/langwatch/packages/api/README.md +283 -0
- package/langwatch/packages/api/node_modules/.bin/tsc +21 -0
- package/langwatch/packages/api/node_modules/.bin/tsserver +21 -0
- package/langwatch/packages/api/node_modules/.bin/vitest +21 -0
- package/langwatch/packages/api/package.json +39 -0
- package/langwatch/packages/api/src/__tests__/builder.unit.test.ts +1135 -0
- package/langwatch/packages/api/src/__tests__/errorLogging.integration.test.ts +130 -0
- package/langwatch/packages/api/src/__tests__/errors.unit.test.ts +331 -0
- package/langwatch/packages/api/src/__tests__/sse.unit.test.ts +247 -0
- package/langwatch/packages/api/src/__tests__/versioning.unit.test.ts +379 -0
- package/langwatch/packages/api/src/builder.ts +163 -0
- package/langwatch/packages/api/src/errors.ts +255 -0
- package/langwatch/packages/api/src/index.ts +41 -0
- package/langwatch/packages/api/src/middleware.ts +227 -0
- package/langwatch/packages/api/src/pipeline.ts +254 -0
- package/langwatch/packages/api/src/response.ts +38 -0
- package/langwatch/packages/api/src/route-mounting.ts +140 -0
- package/langwatch/packages/api/src/sse.ts +179 -0
- package/langwatch/packages/api/src/types.ts +217 -0
- package/langwatch/packages/api/src/version-builder.ts +131 -0
- package/langwatch/packages/api/src/versioning.ts +221 -0
- package/langwatch/packages/api/tsconfig.json +16 -0
- package/langwatch/packages/api/vitest.config.ts +8 -0
- package/langwatch/packages/automations/README.md +17 -0
- package/langwatch/packages/automations/node_modules/.bin/liquid +21 -0
- package/langwatch/packages/automations/node_modules/.bin/liquidjs +21 -0
- package/langwatch/packages/automations/node_modules/.bin/marked +21 -0
- package/langwatch/packages/automations/node_modules/.bin/tsc +21 -0
- package/langwatch/packages/automations/node_modules/.bin/tsserver +21 -0
- package/langwatch/packages/automations/node_modules/.bin/vitest +21 -0
- package/langwatch/packages/automations/package.json +43 -0
- package/langwatch/packages/automations/src/cadences.ts +50 -0
- package/langwatch/packages/automations/src/enums.ts +24 -0
- package/langwatch/packages/automations/src/index.ts +26 -0
- package/langwatch/packages/automations/src/providers/__tests__/webhook.unit.test.ts +147 -0
- package/langwatch/packages/automations/src/providers/annotationQueue.ts +26 -0
- package/langwatch/packages/automations/src/providers/dataset.ts +43 -0
- package/langwatch/packages/automations/src/providers/email.ts +36 -0
- package/langwatch/packages/automations/src/providers/slack.ts +96 -0
- package/langwatch/packages/automations/src/providers/types.ts +84 -0
- package/langwatch/packages/automations/src/providers/webhook.ts +137 -0
- package/langwatch/packages/automations/src/templating/__tests__/alertDefaultsRender.unit.test.ts +133 -0
- package/langwatch/packages/automations/src/templating/__tests__/blockKitAllowlist.unit.test.ts +723 -0
- package/langwatch/packages/automations/src/templating/__tests__/engine.unit.test.ts +106 -0
- package/langwatch/packages/automations/src/templating/__tests__/exampleContext.unit.test.ts +39 -0
- package/langwatch/packages/automations/src/templating/__tests__/fixtures.ts +42 -0
- package/langwatch/packages/automations/src/templating/__tests__/graphAlertTemplateContext.unit.test.ts +260 -0
- package/langwatch/packages/automations/src/templating/__tests__/markdown.unit.test.ts +71 -0
- package/langwatch/packages/automations/src/templating/__tests__/renderEmail.unit.test.ts +183 -0
- package/langwatch/packages/automations/src/templating/__tests__/renderSlack.unit.test.ts +233 -0
- package/langwatch/packages/automations/src/templating/__tests__/renderWebhookBody.unit.test.ts +145 -0
- package/langwatch/packages/automations/src/templating/__tests__/reportDefaultsRender.unit.test.ts +148 -0
- package/langwatch/packages/automations/src/templating/__tests__/templateContext.unit.test.ts +137 -0
- package/langwatch/packages/automations/src/templating/__tests__/validate.unit.test.ts +28 -0
- package/langwatch/packages/automations/src/templating/banner.ts +29 -0
- package/langwatch/packages/automations/src/templating/blockKitAllowlist.ts +662 -0
- package/langwatch/packages/automations/src/templating/defaults.ts +400 -0
- package/langwatch/packages/automations/src/templating/emailLayout.ts +59 -0
- package/langwatch/packages/automations/src/templating/engine.ts +255 -0
- package/langwatch/packages/automations/src/templating/exampleContext.ts +171 -0
- package/langwatch/packages/automations/src/templating/markdown.ts +61 -0
- package/langwatch/packages/automations/src/templating/renderEmail.ts +112 -0
- package/langwatch/packages/automations/src/templating/renderSlack.ts +184 -0
- package/langwatch/packages/automations/src/templating/renderWebhookBody.ts +105 -0
- package/langwatch/packages/automations/src/templating/renderWithFallback.ts +54 -0
- package/langwatch/packages/automations/src/templating/templateContext.ts +812 -0
- package/langwatch/packages/automations/src/templating/validate.ts +24 -0
- package/langwatch/packages/automations/tsconfig.json +18 -0
- package/langwatch/packages/automations/vitest.config.ts +8 -0
- package/langwatch/packages/observability/README.md +86 -0
- package/langwatch/packages/observability/node_modules/.bin/esbuild +18 -0
- package/langwatch/packages/observability/node_modules/.bin/pino +21 -0
- package/langwatch/packages/observability/node_modules/.bin/pino-pretty +21 -0
- package/langwatch/packages/observability/node_modules/.bin/tsc +21 -0
- package/langwatch/packages/observability/node_modules/.bin/tsserver +21 -0
- package/langwatch/packages/observability/node_modules/.bin/vitest +21 -0
- package/langwatch/packages/observability/package.json +44 -0
- package/langwatch/packages/observability/src/__tests__/browserSafety.unit.test.ts +14 -0
- package/langwatch/packages/observability/src/__tests__/context.unit.test.ts +228 -0
- package/langwatch/packages/observability/src/__tests__/logger.unit.test.ts +227 -0
- package/langwatch/packages/observability/src/__tests__/requestLogging.unit.test.ts +252 -0
- package/langwatch/packages/observability/src/__tests__/runtimeSafety.unit.test.ts +96 -0
- package/langwatch/packages/observability/src/__tests__/traceContext.unit.test.ts +108 -0
- package/langwatch/packages/observability/src/constants.ts +46 -0
- package/langwatch/packages/observability/src/context/core.ts +124 -0
- package/langwatch/packages/observability/src/context/index.ts +19 -0
- package/langwatch/packages/observability/src/context/logging.ts +24 -0
- package/langwatch/packages/observability/src/index.ts +32 -0
- package/langwatch/packages/observability/src/logger.ts +280 -0
- package/langwatch/packages/observability/src/request/requestLogging.ts +131 -0
- package/langwatch/packages/observability/src/trace/traceContext.ts +56 -0
- package/langwatch/packages/observability/tsconfig.json +16 -0
- package/langwatch/packages/observability/vitest.config.ts +8 -0
- package/langwatch/packages/react-rum/node_modules/.bin/tsc +21 -0
- package/langwatch/packages/react-rum/node_modules/.bin/tsserver +21 -0
- package/langwatch/packages/react-rum/node_modules/.bin/vitest +21 -0
- package/langwatch/packages/react-rum/package.json +43 -0
- package/langwatch/packages/react-rum/src/browserTracing.ts +130 -0
- package/langwatch/packages/react-rum/src/constants.ts +67 -0
- package/langwatch/packages/react-rum/src/index.ts +34 -0
- package/langwatch/packages/react-rum/src/navigation.test.ts +188 -0
- package/langwatch/packages/react-rum/src/navigation.ts +189 -0
- package/langwatch/packages/react-rum/src/navigationContextManager.ts +71 -0
- package/langwatch/packages/react-rum/src/sampling.test.ts +182 -0
- package/langwatch/packages/react-rum/src/sampling.ts +124 -0
- package/langwatch/packages/react-rum/src/session.test.ts +85 -0
- package/langwatch/packages/react-rum/src/session.ts +62 -0
- package/langwatch/packages/react-rum/src/sessionSpanProcessor.ts +34 -0
- package/langwatch/packages/react-rum/tsconfig.json +18 -0
- package/langwatch/packages/react-rum/vitest.config.ts +8 -0
- package/langwatch/packages/redaction/node_modules/.bin/tsc +21 -0
- package/langwatch/packages/redaction/node_modules/.bin/tsserver +21 -0
- package/langwatch/packages/redaction/node_modules/.bin/vitest +21 -0
- package/langwatch/packages/redaction/package.json +29 -0
- package/langwatch/packages/redaction/src/__tests__/secrets.unit.test.ts +226 -0
- package/langwatch/packages/redaction/src/__tests__/sessionReport.unit.test.ts +239 -0
- package/langwatch/packages/redaction/src/index.ts +29 -0
- package/langwatch/packages/redaction/src/markers.ts +101 -0
- package/langwatch/packages/redaction/src/secrets.ts +286 -0
- package/langwatch/packages/redaction/src/sessionReport.ts +356 -0
- package/langwatch/packages/redaction/tsconfig.json +18 -0
- package/langwatch/packages/ssrf/node_modules/.bin/tsc +21 -0
- package/langwatch/packages/ssrf/node_modules/.bin/tsserver +21 -0
- package/langwatch/packages/ssrf/node_modules/.bin/vitest +21 -0
- package/langwatch/packages/ssrf/package.json +29 -0
- package/langwatch/packages/ssrf/src/index.test.ts +72 -0
- package/langwatch/packages/ssrf/src/index.ts +320 -0
- package/langwatch/packages/ssrf/tsconfig.json +18 -0
- package/langwatch/packages/ssrf/vitest.config.ts +8 -0
- package/langwatch/scripts/__tests__/bug-report-discovery.unit.test.ts +37 -0
- package/langwatch/scripts/build-mcp-server.sh +15 -0
- package/langwatch/scripts/generate-langy-skills.ts +10 -0
- package/langwatch/scripts/update-matrix-provider-keys.ts +1 -1
- package/langwatch/src/components/EditModelProviderDrawer.tsx +7 -1
- package/langwatch/src/components/settings/ModelProviderCredentialsSection.tsx +13 -21
- package/langwatch/src/components/settings/ModelProviderForm.tsx +32 -3
- package/langwatch/src/components/settings/__tests__/ModelProviderForm.credential-preservation.integration.test.tsx +277 -0
- package/langwatch/src/components/settings/__tests__/ModelProviderForm.credential-requiredness.integration.test.tsx +260 -0
- package/langwatch/src/components/settings/__tests__/modelProviderDrawerHarness.tsx +152 -0
- package/langwatch/src/features/onboarding/components/sections/model-provider/ModelProviderSetup.tsx +7 -3
- package/langwatch/src/hooks/__tests__/useProviderFormSubmit.integration.test.tsx +7 -1
- package/langwatch/src/hooks/useModelProviderApiKeyValidation.ts +25 -4
- package/langwatch/src/hooks/useModelProviderFields.ts +45 -37
- package/langwatch/src/hooks/useModelProviderForm.ts +2 -0
- package/langwatch/src/hooks/useProviderFormSubmit.ts +27 -19
- package/langwatch/src/hooks/useRequiredCredentialKeys.ts +38 -0
- package/langwatch/src/pages/settings/__tests__/model-providers.no-project.integration.test.tsx +508 -0
- package/langwatch/src/pages/settings/model-providers.tsx +19 -97
- package/langwatch/src/server/api/routers/__tests__/prepareEnvKeys.unit.test.ts +56 -0
- package/langwatch/src/server/api/routers/modelProviders.ts +146 -15
- package/langwatch/src/server/api/routers/modelProviders.utils.ts +1 -10
- package/langwatch/src/server/app-layer/traces/__tests__/audio-model-cost.unit.test.ts +133 -0
- package/langwatch/src/server/app-layer/traces/canonicalisation/extractors/_constants.ts +6 -0
- package/langwatch/src/server/app-layer/traces/model-cost-matching.ts +17 -1
- package/langwatch/src/server/app-layer/traces/repositories/__tests__/span-storage.clickhouse.repository.unit.test.ts +6 -0
- package/langwatch/src/server/app-layer/traces/repositories/span-storage.clickhouse.repository.ts +6 -0
- package/langwatch/src/server/gateway/__tests__/config.materialiser.integration.test.ts +132 -3
- package/langwatch/src/server/gateway/config.materialiser.ts +11 -9
- package/langwatch/src/server/modelProviders/__tests__/modelProvider.credentialPreservation.integration.test.ts +206 -0
- package/langwatch/src/server/modelProviders/__tests__/modelProvider.deleteScope.integration.test.ts +0 -4
- package/langwatch/src/server/modelProviders/__tests__/modelProvider.noProject.integration.test.ts +748 -0
- package/langwatch/src/server/modelProviders/__tests__/modelProvider.repository.integration.test.ts +3 -3
- package/langwatch/src/server/modelProviders/__tests__/modelProvider.repository.unit.test.ts +7 -8
- package/langwatch/src/server/modelProviders/__tests__/modelProvider.service.extraHeaders.unit.test.ts +0 -5
- package/langwatch/src/server/modelProviders/__tests__/modelProvider.service.unit.test.ts +5 -1
- package/langwatch/src/server/modelProviders/__tests__/registry.unit.test.ts +31 -0
- package/langwatch/src/server/modelProviders/llmModelCost.tsx +20 -2
- package/langwatch/src/server/modelProviders/llmModels.json +736 -209
- package/langwatch/src/server/modelProviders/llmModels.overlay.json +149 -2
- package/langwatch/src/server/modelProviders/llmModels.types.ts +9 -2
- package/langwatch/src/server/modelProviders/modelProvider.repository.ts +10 -12
- package/langwatch/src/server/modelProviders/modelProvider.service.ts +142 -34
- package/langwatch/src/server/modelProviders/registry.ts +45 -15
- package/langwatch/src/server/tracer/collector/cost.ts +15 -2
- package/langwatch/src/utils/__tests__/modelProviderCredentialRules.unit.test.ts +259 -0
- package/langwatch/src/utils/__tests__/modelProviderHelpers.unit.test.ts +12 -0
- package/langwatch/src/utils/modelProviderHelpers.ts +207 -16
- package/package.json +5 -1
- package/packages/handled-error/node_modules/.bin/tsc +21 -0
- package/packages/handled-error/node_modules/.bin/tsserver +21 -0
- package/packages/handled-error/node_modules/.bin/vitest +21 -0
- package/packages/handled-error/package.json +31 -0
- package/packages/handled-error/src/handled-error.test.ts +305 -0
- package/packages/handled-error/src/handled-error.ts +431 -0
- package/packages/handled-error/src/index.ts +16 -0
- package/packages/handled-error/tsconfig.json +22 -0
- package/packages/langy/node_modules/.bin/tsc +21 -0
- package/packages/langy/node_modules/.bin/tsserver +21 -0
- package/packages/langy/node_modules/.bin/vitest +21 -0
- package/packages/langy/package.json +40 -0
- package/packages/langy/src/cards/cliJson.ts +95 -0
- package/packages/langy/src/cards/cliJson.unit.test.ts +80 -0
- package/packages/langy/src/cards/created-resource.unit.test.ts +137 -0
- package/packages/langy/src/cards/derived-safe.ts +265 -0
- package/packages/langy/src/cards/derived-safe.unit.test.ts +283 -0
- package/packages/langy/src/cards/digest.ts +247 -0
- package/packages/langy/src/cards/digest.unit.test.ts +230 -0
- package/packages/langy/src/cards/handled-error.ts +697 -0
- package/packages/langy/src/cards/handled-error.unit.test.ts +795 -0
- package/packages/langy/src/cards/index.ts +51 -0
- package/packages/langy/src/cards/primitives.ts +113 -0
- package/packages/langy/src/cards/promotion.unit.test.ts +253 -0
- package/packages/langy/src/cards/registry.ts +450 -0
- package/packages/langy/src/cards/registry.unit.test.ts +141 -0
- package/packages/langy/src/cards/schemas.ts +561 -0
- package/packages/langy/src/cards/tool-result.ts +151 -0
- package/packages/langy/src/cards/tool-result.unit.test.ts +37 -0
- package/packages/langy/src/constants.ts +253 -0
- package/packages/langy/src/event-sourcing/contracts/cursor.ts +46 -0
- package/packages/langy/src/event-sourcing/contracts/cursor.unit.test.ts +66 -0
- package/packages/langy/src/event-sourcing/contracts/events.ts +345 -0
- package/packages/langy/src/event-sourcing/contracts/turnWire.ts +81 -0
- package/packages/langy/src/event-sourcing/folds/conversationFold.ts +413 -0
- package/packages/langy/src/event-sourcing/folds/messageMap.ts +71 -0
- package/packages/langy/src/event-sourcing/folds/turnFold.ts +372 -0
- package/packages/langy/src/event-sourcing/folds/turnFold.unit.test.ts +217 -0
- package/packages/langy/src/event-sourcing/turnPhase.ts +124 -0
- package/packages/langy/src/event-sourcing/turnPhase.unit.test.ts +110 -0
- package/packages/langy/src/event-sourcing/turnProjection.ts +120 -0
- package/packages/langy/src/event-sourcing/turnProjection.unit.test.ts +207 -0
- package/packages/langy/src/index.ts +16 -0
- package/packages/langy/src/inline-channel/choices.ts +136 -0
- package/packages/langy/src/inline-channel/choices.unit.test.ts +213 -0
- package/packages/langy/src/inline-channel/fence.ts +125 -0
- package/packages/langy/src/inline-channel/fence.unit.test.ts +112 -0
- package/packages/langy/src/inline-channel/parts.ts +85 -0
- package/packages/langy/src/inline-channel/parts.unit.test.ts +100 -0
- package/packages/langy/src/inline-channel/preview.ts +68 -0
- package/packages/langy/src/inline-channel/preview.unit.test.ts +116 -0
- package/packages/langy/src/inline-channel/salvage.ts +260 -0
- package/packages/langy/src/inline-channel/salvage.unit.test.ts +135 -0
- package/packages/langy/src/json.ts +47 -0
- package/packages/langy/tsconfig.json +22 -0
- package/packages/server/dist/cli.cjs +11045 -10616
- package/python-sdk/src/langwatch/openai.py +107 -28
- package/skills/.env.example +1 -0
- package/skills/.release-please-shim +1 -0
- package/skills/CHANGELOG.md +158 -0
- package/skills/README.md +99 -0
- package/skills/_compiled/README.md +43 -0
- package/skills/_compiled/generate.sh +31 -0
- package/skills/_compiled/native/agent-best-practices/SKILL.md +91 -0
- package/skills/_compiled/native/agent-improve/SKILL.md +133 -0
- package/skills/_compiled/native/agent-performance/SKILL.md +125 -0
- package/skills/_compiled/native/datasets/SKILL.md +437 -0
- package/skills/_compiled/native/debug-instrumentation/SKILL.md +104 -0
- package/skills/_compiled/native/debug-with-langwatch/SKILL.md +109 -0
- package/skills/_compiled/native/eval-triage/SKILL.md +87 -0
- package/skills/_compiled/native/evaluate-multimodal/SKILL.md +121 -0
- package/skills/_compiled/native/evaluations/SKILL.md +58 -0
- package/skills/_compiled/native/experiments/SKILL.md +191 -0
- package/skills/_compiled/native/generate-rag-dataset/SKILL.md +123 -0
- package/skills/_compiled/native/github/SKILL.md +107 -0
- package/skills/_compiled/native/level-up/SKILL.md +149 -0
- package/skills/_compiled/native/online-evaluations/SKILL.md +179 -0
- package/skills/_compiled/native/prompts/SKILL.md +187 -0
- package/skills/_compiled/native/scenarios/SKILL.md +924 -0
- package/skills/_compiled/native/setup-lw/SKILL.md +82 -0
- package/skills/_compiled/native/test-cli-usability/SKILL.md +109 -0
- package/skills/_compiled/native/test-compliance/SKILL.md +160 -0
- package/skills/_compiled/native/tracing/SKILL.md +115 -0
- package/skills/_compiler/compile.ts +181 -0
- package/skills/_compiler/native.ts +74 -0
- package/skills/_lib/feature-skills.ts +66 -0
- package/skills/_lib/frontmatter.ts +21 -0
- package/skills/_lib/mdx-inline.ts +148 -0
- package/skills/_publish/sync.ts +73 -0
- package/skills/_shared/api-key-setup.mdx +1 -0
- package/skills/_shared/cli-install.mdx +1 -0
- package/skills/_shared/cli-setup.mdx +15 -0
- package/skills/_shared/consultant-mode.mdx +9 -0
- package/skills/_shared/plan-limits.mdx +8 -0
- package/skills/_shared/projects-and-api-keys.mdx +13 -0
- package/skills/_tests/README.md +47 -0
- package/skills/_tests/agent-best-practices.scenario.test.ts +79 -0
- package/skills/_tests/agent-improve.scenario.test.ts +90 -0
- package/skills/_tests/agent-performance.scenario.test.ts +110 -0
- package/skills/_tests/claude-code-adapter.test.ts +70 -0
- package/skills/_tests/cli-auth.scenario.test.ts +171 -0
- package/skills/_tests/cli-comprehensive.scenario.test.ts +171 -0
- package/skills/_tests/cli-crud.scenario.test.ts +245 -0
- package/skills/_tests/cli-gateway-coding-agents.scenario.test.ts +597 -0
- package/skills/_tests/cli-gateway.scenario.test.ts +254 -0
- package/skills/_tests/cli-projects-api-keys.scenario.test.ts +182 -0
- package/skills/_tests/cli-suites.scenario.test.ts +234 -0
- package/skills/_tests/datasets.scenario.test.ts +586 -0
- package/skills/_tests/docs-skills-pages.test.ts +206 -0
- package/skills/_tests/evaluation-skill-boundaries.test.ts +84 -0
- package/skills/_tests/experiments-faithfulness.scenario.test.ts +80 -0
- package/skills/_tests/experiments-python-langgraph.scenario.test.ts +80 -0
- package/skills/_tests/experiments-python-openai.scenario.test.ts +110 -0
- package/skills/_tests/experiments-rag.scenario.test.ts +88 -0
- package/skills/_tests/experiments-typescript-vercel.scenario.test.ts +80 -0
- package/skills/_tests/fixtures/cli-prompts/python-with-prompts/main.py +24 -0
- package/skills/_tests/fixtures/python-agno/main.py +14 -0
- package/skills/_tests/fixtures/python-google-adk/main.py +28 -0
- package/skills/_tests/fixtures/python-health-agent/main.py +32 -0
- package/skills/_tests/fixtures/python-langgraph/main.py +35 -0
- package/skills/_tests/fixtures/python-openai/main.py +36 -0
- package/skills/_tests/fixtures/python-rag-agent/main.py +53 -0
- package/skills/_tests/fixtures/typescript-mastra/index.ts +11 -0
- package/skills/_tests/fixtures/typescript-vercel/index.ts +16 -0
- package/skills/_tests/fixtures/typescript-voice/index.ts +18 -0
- package/skills/_tests/helpers/claude-code-adapter.ts +387 -0
- package/skills/_tests/helpers/experiments-scenario.ts +197 -0
- package/skills/_tests/helpers/judge-model.ts +12 -0
- package/skills/_tests/level-up.scenario.test.ts +236 -0
- package/skills/_tests/native-skills.test.ts +191 -0
- package/skills/_tests/online-evaluations.scenario.test.ts +257 -0
- package/skills/_tests/prompts-cli.scenario.test.ts +330 -0
- package/skills/_tests/prompts.scenario.test.ts +434 -0
- package/skills/_tests/publish-sync.test.ts +119 -0
- package/skills/_tests/recipes.scenario.test.ts +343 -0
- package/skills/_tests/scenarios.scenario.test.ts +884 -0
- package/skills/_tests/tracing.scenario.test.ts +472 -0
- package/skills/_tests/voice-factories.test.ts +60 -0
- package/skills/agent-improve/SKILL.mdx +100 -0
- package/skills/agent-performance/SKILL.mdx +102 -0
- package/skills/datasets/SKILL.mdx +416 -0
- package/skills/evaluations/SKILL.mdx +57 -0
- package/skills/experiments/SKILL.mdx +155 -0
- package/skills/github/SKILL.mdx +107 -0
- package/skills/initial-prompt.md +66 -0
- package/skills/level-up/SKILL.mdx +112 -0
- package/skills/online-evaluations/SKILL.mdx +150 -0
- package/skills/package.json +53 -0
- package/skills/pnpm-lock.yaml +4862 -0
- package/skills/pnpm-workspace.yaml +2 -0
- package/skills/prompts/SKILL.mdx +151 -0
- package/skills/recipes/README.md +30 -0
- package/skills/recipes/agent-best-practices/SKILL.mdx +84 -0
- package/skills/recipes/debug-instrumentation/SKILL.mdx +88 -0
- package/skills/recipes/debug-with-langwatch/SKILL.mdx +97 -0
- package/skills/recipes/eval-triage/SKILL.mdx +75 -0
- package/skills/recipes/evaluate-multimodal/SKILL.mdx +110 -0
- package/skills/recipes/generate-rag-dataset/SKILL.mdx +105 -0
- package/skills/recipes/setup-lw/SKILL.mdx +71 -0
- package/skills/recipes/test-cli-usability/SKILL.mdx +106 -0
- package/skills/recipes/test-compliance/SKILL.mdx +149 -0
- package/skills/scenarios/SKILL.mdx +874 -0
- package/skills/tracing/SKILL.mdx +88 -0
- package/skills/tsconfig.json +15 -0
- package/skills/version.txt +1 -0
- package/skills/vitest.config.ts +7 -0
- package/langwatch/dist/client/assets/AddAnnotationQueueDrawer-BQSucfOX.js +0 -2
- package/langwatch/dist/client/assets/AddDatasetRecordDrawer-DAsTHYTP.js +0 -6
- package/langwatch/dist/client/assets/AddOrEditAnnotationScore-B5Ck48cm.js +0 -2
- package/langwatch/dist/client/assets/AddOrEditAnnotationScoreDrawer-C8HFvayF.js +0 -2
- package/langwatch/dist/client/assets/AddOrEditDatasetDrawer-BRzya-3u.js +0 -3
- package/langwatch/dist/client/assets/AddParticipants-DGPUGXt7.js +0 -2
- package/langwatch/dist/client/assets/AgentHistoryDrawer-D13d_z7X.js +0 -2
- package/langwatch/dist/client/assets/AgentHttpEditorDrawer-CuT-fXSu.js +0 -5
- package/langwatch/dist/client/assets/AgentListDrawer-CWtvhmue.js +0 -2
- package/langwatch/dist/client/assets/AgentTypeSelectorDrawer-BRHSlvwQ.js +0 -2
- package/langwatch/dist/client/assets/AgentWorkflowEditorDrawer-CylJD3xL.js +0 -2
- package/langwatch/dist/client/assets/AgentWorkflowTargetEditorDrawer-CaoZTrdq.js +0 -2
- package/langwatch/dist/client/assets/AiGatewayLayout-B5Q-EfZV.js +0 -2
- package/langwatch/dist/client/assets/AnnotationsTable-DoO83AX9.js +0 -2
- package/langwatch/dist/client/assets/AreaChart-CXmFZ9PN.js +0 -2
- package/langwatch/dist/client/assets/AutomationDrawer-Bv4nX8y6.js +0 -112
- package/langwatch/dist/client/assets/BatchEvaluationSummary-uqdSLrh7.js +0 -2
- package/langwatch/dist/client/assets/BudgetEditDrawer-CGUdeHXR.js +0 -2
- package/langwatch/dist/client/assets/CartesianChart-D35vYym3.js +0 -54
- package/langwatch/dist/client/assets/CascadeArchiveDialog-DSo9Fwed.js +0 -2
- package/langwatch/dist/client/assets/ChartCard-DgQ4fTGc.js +0 -2
- package/langwatch/dist/client/assets/ChartTooltip-Cf8ESsQ9.js +0 -4
- package/langwatch/dist/client/assets/ChatWindow-DplHBlw_.js +0 -5
- package/langwatch/dist/client/assets/CodeEvaluatorEditorDrawer-CPxNogVm.js +0 -9
- package/langwatch/dist/client/assets/CodexCodingDefaultsAsk-BdUx3xAP.js +0 -2
- package/langwatch/dist/client/assets/ColorfulBlockIcons-CUrsa--K.js +0 -6
- package/langwatch/dist/client/assets/ColumnTypeIcon-DNzTCt_2.js +0 -2
- package/langwatch/dist/client/assets/ConfirmDialog-DTpkLGhm.js +0 -2
- package/langwatch/dist/client/assets/ContactSalesBlock-BaXLliHv.js +0 -2
- package/langwatch/dist/client/assets/Conversation-DZIYz2Vp.js +0 -2
- package/langwatch/dist/client/assets/CopyInput-Csb1U32e.js +0 -2
- package/langwatch/dist/client/assets/CopyableInputWithPrefix-C3PRtdkW.js +0 -2
- package/langwatch/dist/client/assets/CreateProjectDrawer-32NvkFfD.js +0 -2
- package/langwatch/dist/client/assets/CreateTeamDrawer-DtGf5dkO.js +0 -2
- package/langwatch/dist/client/assets/CustomGraph-C3a1gzo6.js +0 -2
- package/langwatch/dist/client/assets/DashboardLayout-RHGL-98_.js +0 -6
- package/langwatch/dist/client/assets/DashboardNameDrawer-DD8bwnCt.js +0 -2
- package/langwatch/dist/client/assets/DataPrivacyRuleDrawer-DiY-VkTs.js +0 -2
- package/langwatch/dist/client/assets/DatasetEditorTable-CwI345qA.js +0 -2
- package/langwatch/dist/client/assets/DatasetPickerList-CpHDt0t8.js +0 -2
- package/langwatch/dist/client/assets/DatasetPreviewTable-v8OUUAB3.js +0 -2
- package/langwatch/dist/client/assets/DatasetSelector-isPOzukH.js +0 -2
- package/langwatch/dist/client/assets/DefaultModelOverrideDrawer-BI7NSI6A.js +0 -2
- package/langwatch/dist/client/assets/DeleteConfirmationDialog-7K0S0Qdq.js +0 -2
- package/langwatch/dist/client/assets/DocsLinks-NNRxMwQU.js +0 -2
- package/langwatch/dist/client/assets/DynamicZodForm-3XwhQhOl.js +0 -2
- package/langwatch/dist/client/assets/EditAutomationFilterDrawer-MYW_WiO2.js +0 -3
- package/langwatch/dist/client/assets/EditModelProviderDrawer-Isp2BSHG.js +0 -4
- package/langwatch/dist/client/assets/EditProjectDrawer-Dj2lYKdO.js +0 -2
- package/langwatch/dist/client/assets/EmojiPickerModal-DdZxZuTV.js +0 -3
- package/langwatch/dist/client/assets/EnterpriseLockedSurface-CxLn8Im_.js +0 -2
- package/langwatch/dist/client/assets/EvaluatorApiUsageDialog-DIFGzOw4.js +0 -107
- package/langwatch/dist/client/assets/EvaluatorCategorySelectorDrawer-Cm114u5E.js +0 -2
- package/langwatch/dist/client/assets/EvaluatorEditorDrawer-aCxccvFM.js +0 -2
- package/langwatch/dist/client/assets/EvaluatorEditorShared-DiLlkD4v.js +0 -43
- package/langwatch/dist/client/assets/EvaluatorHistoryDrawer-Bv3sLSRP.js +0 -2
- package/langwatch/dist/client/assets/EvaluatorListDrawer-eUbPJehC.js +0 -2
- package/langwatch/dist/client/assets/EvaluatorMappingsSection-DvSTsuT8.js +0 -2
- package/langwatch/dist/client/assets/EvaluatorSelection-Bi_Ud8sy.js +0 -2
- package/langwatch/dist/client/assets/EvaluatorSelectionBox-v8iA4p4D.js +0 -2
- package/langwatch/dist/client/assets/EvaluatorTypeSelectorContent-DlwvjPGU.js +0 -2
- package/langwatch/dist/client/assets/EvaluatorTypeSelectorDrawer-ul5Ud4lG.js +0 -2
- package/langwatch/dist/client/assets/ExecutionState-DKBVAVTm.js +0 -2
- package/langwatch/dist/client/assets/ExternalImage-DbtOSrKl.js +0 -34
- package/langwatch/dist/client/assets/FeatureFlagsDrawer-YiildcJp.js +0 -2
- package/langwatch/dist/client/assets/FieldInfoTooltip-CXhYVsTQ.js +0 -2
- package/langwatch/dist/client/assets/FieldsFilters-CrGJyKXz.js +0 -2
- package/langwatch/dist/client/assets/FilterDisplay-BT6B5ZoZ.js +0 -2
- package/langwatch/dist/client/assets/FilterSidebar-0UgGuTeu.js +0 -2
- package/langwatch/dist/client/assets/FormatMoney-CEzwUDkl.js +0 -2
- package/langwatch/dist/client/assets/FoundryDrawer-BIy5SFvr.js +0 -2
- package/langwatch/dist/client/assets/FullLogo-EwD3nY0N.js +0 -2
- package/langwatch/dist/client/assets/GovernanceLayout-COAapH9g.js +0 -2
- package/langwatch/dist/client/assets/GraphsLayout-ygWQTw_g.js +0 -2
- package/langwatch/dist/client/assets/GroupBindingInputRow-DF_WY6iQ.js +0 -2
- package/langwatch/dist/client/assets/GuardrailsDrawer-BIq6RhSh.js +0 -91
- package/langwatch/dist/client/assets/History-V1jF0Epn.js +0 -17
- package/langwatch/dist/client/assets/HorizontalFormControl-CLz9xuFM.js +0 -2
- package/langwatch/dist/client/assets/HoverableBigText-CxXucdYS.js +0 -2
- package/langwatch/dist/client/assets/InstallCliCard-SGRlvABl.js +0 -2
- package/langwatch/dist/client/assets/IntegratePaneShell--xX7Q_FZ.js +0 -8
- package/langwatch/dist/client/assets/InviteMemberDrawer-BgkE2My_.js +0 -2
- package/langwatch/dist/client/assets/LLMModelCostDrawer-Be2PXHIC.js +0 -2
- package/langwatch/dist/client/assets/LangyContextTarget-DUSindiC.js +0 -2
- package/langwatch/dist/client/assets/LegacyTracesDeprecationBanner-C1PAs5gE.js +0 -2
- package/langwatch/dist/client/assets/Legend-UkJ5OBun.js +0 -6
- package/langwatch/dist/client/assets/Line-Bq29STZQ.js +0 -2
- package/langwatch/dist/client/assets/LineChart-DjFD6yv4.js +0 -2
- package/langwatch/dist/client/assets/ListTable-CSs4ttpJ.js +0 -2
- package/langwatch/dist/client/assets/LoadingScreen-D0JSh0Q2.js +0 -2
- package/langwatch/dist/client/assets/Markdown-Dm0jXfOR.js +0 -3
- package/langwatch/dist/client/assets/MenuLink-CCRiOtxz.js +0 -2
- package/langwatch/dist/client/assets/MessageCard-DqgrJCJ6.js +0 -2
- package/langwatch/dist/client/assets/MetadataTag-W5I0CKzN.js +0 -5
- package/langwatch/dist/client/assets/ModelProviderCustomModelInput-XgGjvYky.js +0 -2
- package/langwatch/dist/client/assets/ModelProviderScreen-BtASYmAL.js +0 -2
- package/langwatch/dist/client/assets/ModelSelector-BBb1wHS_.js +0 -2
- package/langwatch/dist/client/assets/MyLayout-DX7ntheK.js +0 -2
- package/langwatch/dist/client/assets/NavigationFooter-CJaT-F50.js +0 -2
- package/langwatch/dist/client/assets/NewWorkflowForm-BrvVQJNY.js +0 -2
- package/langwatch/dist/client/assets/NoDataInfoBlock-B3c1WwDO.js +0 -2
- package/langwatch/dist/client/assets/OnboardingContainer-DRrQV_9c.js +0 -2
- package/langwatch/dist/client/assets/OnlineEvaluationDrawer-DHbPXgEV.js +0 -2
- package/langwatch/dist/client/assets/OpsPageShell-BamkwuvB.js +0 -2
- package/langwatch/dist/client/assets/OttlEditor-BhsdMVM9.js +0 -3
- package/langwatch/dist/client/assets/OverflownText-DhbWrtC6.js +0 -2
- package/langwatch/dist/client/assets/ProjectAvatar--gOpUll9.js +0 -2
- package/langwatch/dist/client/assets/ProjectLangyLayout-C7WNak1h.js +0 -82
- package/langwatch/dist/client/assets/PromptEditorDrawer-k_dFbREL.js +0 -2
- package/langwatch/dist/client/assets/PromptListDrawer-B-C4Cl6I.js +0 -2
- package/langwatch/dist/client/assets/PropertySectionTitle-CK67qoQ9.js +0 -37
- package/langwatch/dist/client/assets/ProviderModelSelector-Cm89XYO8.js +0 -2
- package/langwatch/dist/client/assets/ProviderScopeChips-S0Ctqbwg.js +0 -2
- package/langwatch/dist/client/assets/PushToCopiesDialog-C3eBpZ9F.js +0 -2
- package/langwatch/dist/client/assets/RandomColorAvatar-CTya_4BQ.js +0 -2
- package/langwatch/dist/client/assets/ReferenceDot-St9tkyoA.js +0 -2
- package/langwatch/dist/client/assets/RenderInputOutput-DOVNZVJ2.js +0 -261
- package/langwatch/dist/client/assets/ScenarioFormDrawer-9224CX_d.js +0 -2
- package/langwatch/dist/client/assets/ScenarioInputMappingSection-Sqtj3HwL.js +0 -2
- package/langwatch/dist/client/assets/ScenarioRunDetailDrawer-fzMzXl1A.js +0 -3
- package/langwatch/dist/client/assets/ScopeChipPicker-B6r27G3S.js +0 -2
- package/langwatch/dist/client/assets/SearchInput-C_AroTij.js +0 -2
- package/langwatch/dist/client/assets/SectionNavigationLayout-DNvKM1pq.js +0 -2
- package/langwatch/dist/client/assets/SelectDatasetDrawer-CeZvw0Rl.js +0 -2
- package/langwatch/dist/client/assets/SelectionActionBar-5j-e3Y3p.js +0 -2
- package/langwatch/dist/client/assets/SeriesFilterDrawer-C2Io5BkG.js +0 -2
- package/langwatch/dist/client/assets/SettingsLayout-CYtjUobV.js +0 -2
- package/langwatch/dist/client/assets/SetupWithAgentButton-BKWI-UTU.js +0 -4
- package/langwatch/dist/client/assets/ShikiCommandBox-D_TBnZxW.js +0 -5
- package/langwatch/dist/client/assets/SpanDetails-xl9OjARI.js +0 -3
- package/langwatch/dist/client/assets/SubscriptionPage-85dxt08g.js +0 -2
- package/langwatch/dist/client/assets/SuiteFormDrawer-BYdeRl8R.js +0 -2
- package/langwatch/dist/client/assets/TabButton-BY-_E4cy.js +0 -3
- package/langwatch/dist/client/assets/TableCell-B6fYjFy7.js +0 -2
- package/langwatch/dist/client/assets/TargetTypeSelectorDrawer-CTaJP17t.js +0 -2
- package/langwatch/dist/client/assets/TeamForm-DQIdGXFE.js +0 -2
- package/langwatch/dist/client/assets/TeamUserRoleField-UXHlsd5l.js +0 -2
- package/langwatch/dist/client/assets/TraceDetails-Bm1Ufstq.js +0 -9
- package/langwatch/dist/client/assets/TraceDetailsDrawer-BlZH_mba.js +0 -2
- package/langwatch/dist/client/assets/TraceIdPeek-By6CFB9R.js +0 -2
- package/langwatch/dist/client/assets/TracesMapping-QHyuw6AD.js +0 -2
- package/langwatch/dist/client/assets/UpgradeModal-BmLw5ONS.js +0 -92
- package/langwatch/dist/client/assets/UpgradeModalContent-C_lXaZaj.js +0 -2
- package/langwatch/dist/client/assets/UploadCSVDrawer-BKntPqbk.js +0 -3
- package/langwatch/dist/client/assets/VariablesSection-DnkttoMe.js +0 -2
- package/langwatch/dist/client/assets/VersionBadge-8Mh0h6z8.js +0 -2
- package/langwatch/dist/client/assets/ViaClaudeDesktopScreen-fQIOpGM1.js +0 -1161
- package/langwatch/dist/client/assets/ViewAutomationDrawer-CPoifrwV.js +0 -2
- package/langwatch/dist/client/assets/VirtualKeySecretReveal-CKCq8oBA.js +0 -54
- package/langwatch/dist/client/assets/WelcomeLayout-B_rw1HA0.js +0 -2
- package/langwatch/dist/client/assets/WithFeatureFlagGuard-DwfApI3b.js +0 -2
- package/langwatch/dist/client/assets/WithPermissionGuard-BP1dFkpM.js +0 -2
- package/langwatch/dist/client/assets/WorkflowCard-B_SYXPpi.js +0 -2
- package/langwatch/dist/client/assets/WorkflowSelectorForEvaluatorDrawer-D_fcHR54.js +0 -2
- package/langwatch/dist/client/assets/_...path_-Ipy6q2Lm.js +0 -2
- package/langwatch/dist/client/assets/_Uint8Array-B8b3z1r6.js +0 -2
- package/langwatch/dist/client/assets/__...path__-3xWAWxQ-.js +0 -22
- package/langwatch/dist/client/assets/_baseAssignValue-D7YNnh37.js +0 -2
- package/langwatch/dist/client/assets/_baseClone-o3pPcmbM.js +0 -2
- package/langwatch/dist/client/assets/_baseEach-CJ0DbEY4.js +0 -2
- package/langwatch/dist/client/assets/_baseFor-C04Mk-th.js +0 -2
- package/langwatch/dist/client/assets/_experiment_-DYMW8ia6.js +0 -2
- package/langwatch/dist/client/assets/_id_-B8SzykYR.js +0 -2
- package/langwatch/dist/client/assets/_id_-BT8l3_4N.js +0 -2
- package/langwatch/dist/client/assets/_id_-BTgcDKRo.js +0 -2
- package/langwatch/dist/client/assets/_id_-BrxUqiAK.js +0 -2
- package/langwatch/dist/client/assets/_id_-Cke69ccV.js +0 -2
- package/langwatch/dist/client/assets/_id_-CxtJm9qq.js +0 -2
- package/langwatch/dist/client/assets/_id_-DGNS0pL2.js +0 -2
- package/langwatch/dist/client/assets/_project_-CPYgRSe0.js +0 -8
- package/langwatch/dist/client/assets/_runId_-CnJnzVCf.js +0 -7
- package/langwatch/dist/client/assets/_shell-JRkk6wPs.js +0 -2
- package/langwatch/dist/client/assets/_slug_-D3cx1Thv.js +0 -17
- package/langwatch/dist/client/assets/_slug_-Dx0M4BvX.js +0 -2
- package/langwatch/dist/client/assets/_slug_-cRMpdOOA.js +0 -2
- package/langwatch/dist/client/assets/_team_-BW8SVrk-.js +0 -2
- package/langwatch/dist/client/assets/_workflow_-C35QPIPs.js +0 -25
- package/langwatch/dist/client/assets/_workflow_-DowL6naf.js +0 -3
- package/langwatch/dist/client/assets/accept-D3cDvj0y.js +0 -2
- package/langwatch/dist/client/assets/activity-CrGqZpWa.js +0 -1
- package/langwatch/dist/client/assets/agents-BNeoLDoj.js +0 -2
- package/langwatch/dist/client/assets/alerts-CrGqZpWa.js +0 -1
- package/langwatch/dist/client/assets/all-BHRNPEIX.js +0 -2
- package/langwatch/dist/client/assets/analytics-CZuaBlXL.js +0 -2
- package/langwatch/dist/client/assets/annotation-scores-CeAaT6zF.js +0 -2
- package/langwatch/dist/client/assets/annotations-CpkTmTvn.js +0 -2
- package/langwatch/dist/client/assets/anomaly-rules-BOLIh6OR.js +0 -2
- package/langwatch/dist/client/assets/api-keys-mK1aqQaM.js +0 -4
- package/langwatch/dist/client/assets/asaplangy-D_DeMaDk.js +0 -5
- package/langwatch/dist/client/assets/audit-log-CL6iYEbl.js +0 -2
- package/langwatch/dist/client/assets/auth-DWhhuKxO.js +0 -2
- package/langwatch/dist/client/assets/authentication-CvPvvVW6.js +0 -2
- package/langwatch/dist/client/assets/authorize-C1bDXq-Z.js +0 -2
- package/langwatch/dist/client/assets/authorize-xZkU_nXs.js +0 -2
- package/langwatch/dist/client/assets/automations-ChfL33YS.js +0 -2
- package/langwatch/dist/client/assets/automations-CrGqZpWa.js +0 -1
- package/langwatch/dist/client/assets/billing-plans-CXxmUM3Y.js +0 -2
- package/langwatch/dist/client/assets/blank-DFMnaDEJ.js +0 -2
- package/langwatch/dist/client/assets/blobs-D-pozzQX.js +0 -2
- package/langwatch/dist/client/assets/blockDiagram-677ZJIJ3--iqoZYgE.js +0 -133
- package/langwatch/dist/client/assets/budgets-BAJ1tdYz.js +0 -3
- package/langwatch/dist/client/assets/bug-reports-DOqvPuTB.js +0 -2
- package/langwatch/dist/client/assets/cache-rules-DbITxirX.js +0 -2
- package/langwatch/dist/client/assets/choose-BSGQGAYS.js +0 -2
- package/langwatch/dist/client/assets/chunk-EX3LRPZG-B7fiWf8z.js +0 -232
- package/langwatch/dist/client/assets/chunk-FWX5IMBZ-CiS2XotT.js +0 -3
- package/langwatch/dist/client/assets/chunk-PUDLZKDR-_aske-8B.js +0 -157
- package/langwatch/dist/client/assets/chunk-RYQCIY6F-Bzb9D1UT.js +0 -2
- package/langwatch/dist/client/assets/chunk-V7JOEXUC-BNxgutMB.js +0 -207
- package/langwatch/dist/client/assets/classDiagram-OUVF2IWQ-GwNDfT24.js +0 -2
- package/langwatch/dist/client/assets/classDiagram-v2-EOCWNBFH-GwNDfT24.js +0 -2
- package/langwatch/dist/client/assets/codeAgentConfig-DWx3pMLC.js +0 -7
- package/langwatch/dist/client/assets/codingDefaultSync-C9Lev3y1.js +0 -2
- package/langwatch/dist/client/assets/configure-Coe_YM3c.js +0 -4
- package/langwatch/dist/client/assets/custom-Dpn85JW8.js +0 -12
- package/langwatch/dist/client/assets/custom_evaluator-DGAwXo2Z.js +0 -31
- package/langwatch/dist/client/assets/dagre-D7MBpcKV.js +0 -2
- package/langwatch/dist/client/assets/dagre-VKFMJZFB-COHUH3Np.js +0 -5
- package/langwatch/dist/client/assets/data-privacy-CtKFJ8SN.js +0 -2
- package/langwatch/dist/client/assets/data-retention-e5nryGvV.js +0 -2
- package/langwatch/dist/client/assets/datasets-JEoBpoYL.js +0 -2
- package/langwatch/dist/client/assets/debounce-KKoMEqvq.js +0 -2
- package/langwatch/dist/client/assets/defaultModelState-C4_m_XBI.js +0 -2
- package/langwatch/dist/client/assets/dejaview-BV4oU0up.js +0 -2
- package/langwatch/dist/client/assets/departments-BjNbKZtW.js +0 -2
- package/langwatch/dist/client/assets/devices-CaLokczo.js +0 -2
- package/langwatch/dist/client/assets/dist-BToT9Gni.js +0 -6
- package/langwatch/dist/client/assets/drawerFromUrl-Cpd3NvN0.js +0 -2
- package/langwatch/dist/client/assets/edit-BW6g7_XC.js +0 -62
- package/langwatch/dist/client/assets/email-suppressions-DYhLkUjt.js +0 -2
- package/langwatch/dist/client/assets/erDiagram-Q63AITRT-CBcweIHJ.js +0 -86
- package/langwatch/dist/client/assets/error-CmmaHju0.js +0 -2
- package/langwatch/dist/client/assets/evaluations-BX71jpba.js +0 -2
- package/langwatch/dist/client/assets/evaluations-C82dwzqH.js +0 -2
- package/langwatch/dist/client/assets/evaluators-CKOs_qOx.js +0 -146
- package/langwatch/dist/client/assets/evaluators-Cnp4esT5.js +0 -2
- package/langwatch/dist/client/assets/experiments-CzhcDWnc.js +0 -1
- package/langwatch/dist/client/assets/external-link-BzETHrAG.js +0 -2
- package/langwatch/dist/client/assets/feature-flags-Cl5NHQrK.js +0 -2
- package/langwatch/dist/client/assets/fetchSSE-DWKCnoHV.js +0 -3
- package/langwatch/dist/client/assets/fieldset-CE_IDQSv.js +0 -2
- package/langwatch/dist/client/assets/flowDiagram-23GEKE2U-B2EV4X5b.js +0 -1
- package/langwatch/dist/client/assets/forgot-password-Bdtjps2K.js +0 -2
- package/langwatch/dist/client/assets/formatMoney-CI_YqDED.js +0 -2
- package/langwatch/dist/client/assets/foundry-DdJynGEa.js +0 -477
- package/langwatch/dist/client/assets/gateway-BvjtD98W.js +0 -2
- package/langwatch/dist/client/assets/getEvaluator-OH0w_5fd.js +0 -2
- package/langwatch/dist/client/assets/getRadiusAndStrokeWidthFromDot-BB5SvhT3.js +0 -2
- package/langwatch/dist/client/assets/governance-DUSWlZID.js +0 -2
- package/langwatch/dist/client/assets/graphlib-Dn160vFe.js +0 -2
- package/langwatch/dist/client/assets/groups--YQRJnbz.js +0 -2
- package/langwatch/dist/client/assets/guardrails-_Jb3oZg3.js +0 -2
- package/langwatch/dist/client/assets/http-7YWbWWla.js +0 -7
- package/langwatch/dist/client/assets/identifierUtils-BuQJ50Jl.js +0 -2
- package/langwatch/dist/client/assets/immer-tl_oI9yy.js +0 -14
- package/langwatch/dist/client/assets/index-CUhcyBp3.js +0 -68
- package/langwatch/dist/client/assets/ingestion-source-detail-E-alCDhM.js +0 -19
- package/langwatch/dist/client/assets/ingestion-sources-APi2TUL6.js +0 -12
- package/langwatch/dist/client/assets/integrations-osNA42lv.js +0 -2
- package/langwatch/dist/client/assets/isArrayLikeObject-CJZEoMj_.js +0 -2
- package/langwatch/dist/client/assets/isSymbol-IFJb2-6T.js +0 -2
- package/langwatch/dist/client/assets/langyHomeSuggestions-B0_Fr3Q2.js +0 -2
- package/langwatch/dist/client/assets/latestAliases-BG98QtLZ.js +0 -2
- package/langwatch/dist/client/assets/license-Dbjlsvq9.js +0 -2
- package/langwatch/dist/client/assets/loadModelCatalog-CtqlQvVB.js +0 -2
- package/langwatch/dist/client/assets/map-DH6XyRvi.js +0 -2
- package/langwatch/dist/client/assets/mappingValidation-oCsaOwz3.js +0 -2
- package/langwatch/dist/client/assets/me-Bqm1rCwb.js +0 -2
- package/langwatch/dist/client/assets/me-BxYTDdYk.js +0 -7
- package/langwatch/dist/client/assets/members-C-RYfdOt.js +0 -2
- package/langwatch/dist/client/assets/mermaid.core-CIOVe75m.js +0 -12
- package/langwatch/dist/client/assets/messages-DSB9EzQc.js +0 -2
- package/langwatch/dist/client/assets/metrics-C_DWHPhN.js +0 -2
- package/langwatch/dist/client/assets/mindmap-definition-LN4V7U3C-D9FhjenJ.js +0 -97
- package/langwatch/dist/client/assets/model-costs-DHTDEPq7.js +0 -2
- package/langwatch/dist/client/assets/model-providers-B5lYdYGB.js +0 -2
- package/langwatch/dist/client/assets/modelProviderHelpers-DDoNJl7J.js +0 -2
- package/langwatch/dist/client/assets/my-queue-DBUdNObC.js +0 -2
- package/langwatch/dist/client/assets/normalizeComparison-CCZ-bOPv.js +0 -2
- package/langwatch/dist/client/assets/not-found-1cA6pijP.js +0 -2
- package/langwatch/dist/client/assets/now-Sx_cFlpx.js +0 -2
- package/langwatch/dist/client/assets/onboarding-Brb1FAS4.js +0 -2
- package/langwatch/dist/client/assets/online-evaluations-Di78dvHe.js +0 -2
- package/langwatch/dist/client/assets/ops-BDrWqQb1.js +0 -2
- package/langwatch/dist/client/assets/organizations-I7_fQcGq.js +0 -2
- package/langwatch/dist/client/assets/pages-BowufdCe.js +0 -2
- package/langwatch/dist/client/assets/persistence-ChzYQRy2.js +0 -2
- package/langwatch/dist/client/assets/plans-DUiB6dWS.js +0 -2
- package/langwatch/dist/client/assets/product-CLC45PiC.js +0 -2
- package/langwatch/dist/client/assets/project-CO0U6_JZ.js +0 -2
- package/langwatch/dist/client/assets/projections-yljzVGg_.js +0 -2
- package/langwatch/dist/client/assets/projects-DbpxS5ex.js +0 -2
- package/langwatch/dist/client/assets/promptHandle-BwdZsauS.js +0 -2
- package/langwatch/dist/client/assets/prompts-DUxsvuSh.js +0 -8
- package/langwatch/dist/client/assets/radio-group-DJFHT54R.js +0 -2
- package/langwatch/dist/client/assets/registry-C3oFDiqP.js +0 -2
- package/langwatch/dist/client/assets/reports-BQKkyGFY.js +0 -2
- package/langwatch/dist/client/assets/request-CmAXw9Uw.js +0 -2
- package/langwatch/dist/client/assets/requirementDiagram-TGXJPOKE-D1dMWBTG.js +0 -85
- package/langwatch/dist/client/assets/reset-password-CTK4_mwV.js +0 -2
- package/langwatch/dist/client/assets/role-bindings-C6ZsuMgm.js +0 -2
- package/langwatch/dist/client/assets/roles-BCVxn7jA.js +0 -2
- package/langwatch/dist/client/assets/routing-policies-CRBbtcKU.js +0 -5
- package/langwatch/dist/client/assets/scenarios-t3nGDwOk.js +0 -2
- package/langwatch/dist/client/assets/scheduler-BLbmBCjU.js +0 -2
- package/langwatch/dist/client/assets/schedules-CrGqZpWa.js +0 -1
- package/langwatch/dist/client/assets/scim-Db5_4cCw.js +0 -2
- package/langwatch/dist/client/assets/secrets-w56NYZDd.js +0 -2
- package/langwatch/dist/client/assets/segment-group-BZ45xnHN.js +0 -2
- package/langwatch/dist/client/assets/segmented-control-DD0HLoke.js +0 -2
- package/langwatch/dist/client/assets/select-BVcV39WT.js +0 -2
- package/langwatch/dist/client/assets/send-C4QAmSdY.js +0 -2
- package/langwatch/dist/client/assets/sequenceView-BjWvujkI.js +0 -5
- package/langwatch/dist/client/assets/seriesOptions-BYBEdexs.js +0 -1011
- package/langwatch/dist/client/assets/settings-BLUJDHk_.js +0 -2
- package/langwatch/dist/client/assets/setup-DZUDYG7y.js +0 -2
- package/langwatch/dist/client/assets/shikiAdapter-S_u9TjIh.js +0 -3
- package/langwatch/dist/client/assets/signin-DIBdy2xA.js +0 -2
- package/langwatch/dist/client/assets/signup-CNRmYZe8.js +0 -2
- package/langwatch/dist/client/assets/stateDiagram-2N3HPSRC-CvKHJ3lm.js +0 -2
- package/langwatch/dist/client/assets/stateDiagram-v2-6OUMAXLB-DAiJnxt-.js +0 -2
- package/langwatch/dist/client/assets/subscription-DCXG9i3Z.js +0 -3
- package/langwatch/dist/client/assets/subscriptions-vembyNSC.js +0 -2
- package/langwatch/dist/client/assets/suggestionUI-CKer7JjV.js +0 -106
- package/langwatch/dist/client/assets/swimlanes-5IMT3BWC-BSx4-zBB.js +0 -3
- package/langwatch/dist/client/assets/swimlanesDiagram-G3AALYLV-CiuP6lw7.js +0 -9
- package/langwatch/dist/client/assets/switch-COTwlCOb.js +0 -2
- package/langwatch/dist/client/assets/switch-vUOdjiD1.js +0 -2
- package/langwatch/dist/client/assets/tabs-DdHsJkYS.js +0 -2
- package/langwatch/dist/client/assets/teams-CNWyUErs.js +0 -2
- package/langwatch/dist/client/assets/teams-DfkeiBlG.js +0 -2
- package/langwatch/dist/client/assets/tool-catalog-Fz2CTXGX.js +0 -7
- package/langwatch/dist/client/assets/toolIcons-8yYANIzS.js +0 -2
- package/langwatch/dist/client/assets/tooltip-Croc0I6e.js +0 -2
- package/langwatch/dist/client/assets/topic-clustering-BUhCtd-n.js +0 -2
- package/langwatch/dist/client/assets/topics-DTHKQBbG.js +0 -2
- package/langwatch/dist/client/assets/traceExecutor-apa7WEzU.js +0 -55
- package/langwatch/dist/client/assets/traces-DHbPO8-r.js +0 -289
- package/langwatch/dist/client/assets/tracesMapping-AU2q390i.js +0 -3
- package/langwatch/dist/client/assets/tracking-2cJI_Hu7.js +0 -2
- package/langwatch/dist/client/assets/types-CQ-IJ_jx.js +0 -2
- package/langwatch/dist/client/assets/types-DV4H6wK9.js +0 -2
- package/langwatch/dist/client/assets/types-PSz4yYPE.js +0 -2
- package/langwatch/dist/client/assets/types-Qc1U0Lzq.js +0 -2
- package/langwatch/dist/client/assets/unsubscribe-B7-aB2wW.js +0 -2
- package/langwatch/dist/client/assets/usage-B56MHHfN.js +0 -2
- package/langwatch/dist/client/assets/usage-BrFpMBrn.js +0 -2
- package/langwatch/dist/client/assets/use-breakpoint-BTtibx4n.js +0 -2
- package/langwatch/dist/client/assets/use-generic-onboarding-flow-eiutgTpm.js +0 -2
- package/langwatch/dist/client/assets/useActivePlan-DZDUm8JK.js +0 -2
- package/langwatch/dist/client/assets/useAllPromptsForProject-BY-Cnuhg.js +0 -2
- package/langwatch/dist/client/assets/useAnnotationQueues-BWrpwDYN.js +0 -2
- package/langwatch/dist/client/assets/useAvailableEvaluators-D7TbKINw.js +0 -2
- package/langwatch/dist/client/assets/useCyclingVerb-Bp3m8dQc.js +0 -2
- package/langwatch/dist/client/assets/useDepartmentColumn-DTsM9Nhy.js +0 -2
- package/langwatch/dist/client/assets/useEvaluationsV3Store-KPEU27UA.js +0 -2
- package/langwatch/dist/client/assets/useExportTraces-DK-tRqPq.js +0 -2
- package/langwatch/dist/client/assets/useFeatureFlag-D9ikgDaE.js +0 -2
- package/langwatch/dist/client/assets/useInviteActions-DyYvQrlw.js +0 -2
- package/langwatch/dist/client/assets/useLicenseEnforcement-DRk7-NQ0.js +0 -2
- package/langwatch/dist/client/assets/useLiteMemberGuard-klZnweA7.js +0 -43
- package/langwatch/dist/client/assets/usePersonalContext-CrhmQYta.js +0 -2
- package/langwatch/dist/client/assets/useProjectSpanNames-w6NW0Ct5.js +0 -2
- package/langwatch/dist/client/assets/useProjectsForCopy-DxbxCEv5.js +0 -2
- package/langwatch/dist/client/assets/useRunViaApiTabs-WzgJSfv2.js +0 -50
- package/langwatch/dist/client/assets/useSavedViews-CNmeuzC3.js +0 -2
- package/langwatch/dist/client/assets/useShowLangy-BvJ39ifH.js +0 -2
- package/langwatch/dist/client/assets/useSimulationUpdateListener-Bu7hXXtv.js +0 -2
- package/langwatch/dist/client/assets/useTargetName-VjbhYyp5.js +0 -2
- package/langwatch/dist/client/assets/useTargetNameMap-CB8rbgsw.js +0 -2
- package/langwatch/dist/client/assets/useTraceDetailsDrawer-BQRQYAwh.js +0 -2
- package/langwatch/dist/client/assets/useTraceUpdateListener-DvzIDKvr.js +0 -2
- package/langwatch/dist/client/assets/useUrlScopeFilter-u6ryUPSP.js +0 -2
- package/langwatch/dist/client/assets/useWorkflowStore-PvyqdAIQ.js +0 -8
- package/langwatch/dist/client/assets/users-B6_uecCc.js +0 -2
- package/langwatch/dist/client/assets/users-BKSIVGOV.js +0 -2
- package/langwatch/dist/client/assets/users-Cvlw527b.js +0 -2
- package/langwatch/dist/client/assets/v3-D_vxEDZB.js +0 -2
- package/langwatch/dist/client/assets/variables-fv0lgY95.js +0 -396
- package/langwatch/dist/client/assets/viewStore-149qmWlN.js +0 -2
- package/langwatch/dist/client/assets/virtual-keys-BrPMP91L.js +0 -2
- package/langwatch/dist/client/assets/welcome-CvpidJSe.js +0 -16
- package/langwatch/dist/client/assets/wizard-D3LrFT3o.js +0 -2
- package/langwatch/dist/client/assets/workbench-YhI9hb4n.js +0 -2
- package/langwatch/dist/client/assets/workflows-D66JEP8o.js +0 -3
- package/langwatch/dist/client/assets/wrap-C4rzJqks.js +0 -2
- package/langwatch/src/pages/settings/__tests__/model-providers.first-project.integration.test.tsx +0 -426
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{t}from"./react-BUD3sqOU.js";import{r as n}from"./portal-FJIui2Z2.js";import{t as r}from"./jsx-runtime-CFwixLRt.js";import{t as i}from"./box-Ck5lef6C.js";import{t as a}from"./text-A3qvcMyN.js";import{cn as o}from"./useLiteMemberGuard-klZnweA7.js";import{t as s}from"./h-stack-CMPhqSp5.js";import{t as c}from"./spacer-CbmCSsJg.js";import{q as l}from"./immer-tl_oI9yy.js";import{t as u}from"./v-stack-ClAMS101.js";import{Qt as d}from"./lu-DlSq9Be4.js";import{V as f,_ as p,b as m,ni as h,v as g,y as _}from"./index-CUhcyBp3.js";var v=e(t()),y=r();function b(e){return e===!0?`on`:e===!1?`off`:`default`}function x(e){if(e===void 0)return!0;if(e===!0)return!1}function S(e){let t=e;return t?t.tagName===`INPUT`||t.tagName===`TEXTAREA`||t.isContentEditable:!1}function C(){let{closeDrawer:e}=f(),t=_(),r=Object.keys(t).length,[i,l]=(0,v.useState)(0),C=(0,v.useRef)(i);C.current=i;let T=(0,v.useRef)(t);return T.current=t,(0,v.useEffect)(()=>{let e=e=>{if(S(e.target)||e.ctrlKey||e.metaKey||e.altKey)return;let t=m[C.current];switch(e.key){case`j`:case`ArrowDown`:e.preventDefault(),l(e=>Math.min(e+1,m.length-1));return;case`k`:case`ArrowUp`:e.preventDefault(),l(e=>Math.max(e-1,0));return;case` `:case`Enter`:if(!t)return;e.preventDefault(),g(t,x(T.current[t]));return;case`1`:if(!t)return;e.preventDefault(),g(t,!0);return;case`0`:if(!t)return;e.preventDefault(),g(t,!1);return;case`c`:case`Backspace`:if(!t)return;e.preventDefault(),g(t,void 0);return}};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[]),(0,y.jsx)(o.Root,{open:!0,placement:`end`,size:`md`,onOpenChange:()=>e(),children:(0,y.jsxs)(o.Content,{bg:`bg`,children:[(0,y.jsxs)(o.Header,{children:[(0,y.jsxs)(s,{width:`full`,children:[(0,y.jsx)(h,{size:`md`,children:`Feature Flags (Dev)`}),(0,y.jsx)(c,{}),(0,y.jsxs)(n,{size:`xs`,variant:`ghost`,onClick:p,disabled:r===0,children:[(0,y.jsx)(d,{size:12}),`Clear all`]})]}),(0,y.jsx)(o.CloseTrigger,{})]}),(0,y.jsx)(o.Body,{children:(0,y.jsxs)(u,{align:`stretch`,gap:4,children:[(0,y.jsx)(a,{textStyle:`xs`,color:`fg.muted`,children:`Overrides are stored in this browser only and force the flag value for every consumer in the current tab. Clear an override to fall back to the server-resolved value.`}),(0,y.jsx)(u,{align:`stretch`,gap:3,children:m.map((e,n)=>(0,y.jsx)(w,{flag:e,state:b(t[e]),selected:n===i,onSelect:()=>l(n)},e))}),(0,y.jsx)(E,{})]})})]})})}function w({flag:e,state:t,selected:n,onSelect:r}){let o=(0,v.useRef)(null);return(0,v.useEffect)(()=>{n&&o.current&&o.current.scrollIntoView({block:`nearest`})},[n]),(0,y.jsx)(i,{ref:o,borderWidth:`1px`,borderColor:n?`blue.solid`:`border`,borderRadius:`md`,paddingX:3,paddingY:2.5,onMouseEnter:r,bg:n?`blue.subtle`:void 0,transition:`background 0.12s ease, border-color 0.12s ease`,children:(0,y.jsxs)(u,{align:`stretch`,gap:2,children:[(0,y.jsxs)(s,{gap:2,children:[(0,y.jsx)(a,{fontFamily:`mono`,textStyle:`xs`,truncate:!0,children:e}),(0,y.jsx)(c,{}),(0,y.jsx)(a,{textStyle:`2xs`,color:t==="default"?`fg.muted`:`fg`,fontWeight:t==="default"?`normal`:`600`,textTransform:`uppercase`,letterSpacing:`0.06em`,children:t==="default"?`Server`:`Forced ${t}`})]}),(0,y.jsxs)(s,{gap:1,children:[(0,y.jsx)(T,{label:`On`,active:t===`on`,onClick:()=>g(e,!0)}),(0,y.jsx)(T,{label:`Off`,active:t===`off`,onClick:()=>g(e,!1)}),(0,y.jsx)(T,{label:`Default`,active:t==="default",onClick:()=>g(e,void 0)})]})]})})}function T({label:e,active:t,onClick:r}){return(0,y.jsx)(n,{size:`xs`,flex:1,variant:t?`solid`:`outline`,colorPalette:t?`orange`:`gray`,onClick:r,children:e})}function E(){return(0,y.jsxs)(s,{gap:3,flexWrap:`wrap`,paddingTop:2,borderTopWidth:`1px`,borderTopColor:`border`,color:`fg.muted`,textStyle:`2xs`,children:[(0,y.jsxs)(s,{gap:1,children:[(0,y.jsx)(l,{children:`↑`}),(0,y.jsx)(l,{children:`↓`}),(0,y.jsx)(a,{children:`navigate`})]}),(0,y.jsxs)(s,{gap:1,children:[(0,y.jsx)(l,{children:`Space`}),(0,y.jsx)(a,{children:`cycle`})]}),(0,y.jsxs)(s,{gap:1,children:[(0,y.jsx)(l,{children:`1`}),(0,y.jsx)(a,{children:`on`})]}),(0,y.jsxs)(s,{gap:1,children:[(0,y.jsx)(l,{children:`0`}),(0,y.jsx)(a,{children:`off`})]}),(0,y.jsxs)(s,{gap:1,children:[(0,y.jsx)(l,{children:`c`}),(0,y.jsx)(a,{children:`clear`})]}),(0,y.jsxs)(s,{gap:1,children:[(0,y.jsx)(l,{children:`Esc`}),(0,y.jsx)(a,{children:`close`})]})]})}export{C as FeatureFlagsDrawer};
|
|
2
|
-
//# sourceMappingURL=FeatureFlagsDrawer-YiildcJp.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{t}from"./react-BUD3sqOU.js";import{t as n}from"./jsx-runtime-CFwixLRt.js";import{t as r}from"./text-A3qvcMyN.js";import{Ct as i}from"./useLiteMemberGuard-klZnweA7.js";import{t as a}from"./info-CtYT35g4.js";import{t as o}from"./external-link-BzETHrAG.js";import{t as s}from"./icon-button-Ce2kwA7j.js";import{t as c}from"./h-stack-CMPhqSp5.js";import{t as l}from"./v-stack-ClAMS101.js";import{t as u}from"./index-CUhcyBp3.js";var d=e(t()),f=n(),p=`https://langwatch.ai/docs`;function m(e){return/^https?:\/\//i.test(e)?e:e.startsWith(`/`)?`${p}${e}`:`${p}/${e}`}var h=150;function g({description:e,docHref:t,docLabel:n=`Read more`,testId:p,trigger:g=`click`}){let _=t?m(t):void 0,v=_?/^https?:\/\//i.test(_):!1,y=g===`hover`,[b,x]=(0,d.useState)(!1),S=(0,d.useRef)(void 0),C=(0,d.useRef)(!1),w=(0,d.useCallback)(()=>{S.current&&clearTimeout(S.current),S.current=void 0},[]),T=(0,d.useCallback)(()=>{w(),x(!0)},[w]),E=(0,d.useCallback)(()=>{w(),S.current=setTimeout(()=>x(!1),h)},[w]);return(0,d.useEffect)(()=>w,[w]),(0,f.jsxs)(i.Root,{...y?{open:b,onOpenChange:e=>{!e.open&&C.current||x(e.open)},autoFocus:!1}:{},positioning:{placement:`right-start`,...y&&{gutter:8}},children:[(0,f.jsx)(i.Trigger,{asChild:!0,children:(0,f.jsx)(s,{"aria-label":`More info`,"data-testid":p,size:`xs`,variant:`ghost`,color:`fg.muted`,marginLeft:1,minWidth:`auto`,height:`auto`,padding:0,...y?{onMouseEnter:()=>{C.current=!0,T()},onMouseLeave:()=>{C.current=!1,E()}}:{},children:(0,f.jsx)(a,{size:14})})}),(0,f.jsxs)(i.Content,{maxWidth:`sm`,...y?{onMouseEnter:w,onMouseLeave:E}:{},children:[(0,f.jsx)(i.Arrow,{children:(0,f.jsx)(i.ArrowTip,{})}),(0,f.jsx)(i.Body,{children:(0,f.jsxs)(l,{align:`stretch`,gap:2,children:[(0,f.jsx)(r,{fontSize:`sm`,children:e}),_&&(0,f.jsx)(u,{href:_,color:`orange.600`,fontSize:`xs`,fontWeight:`medium`,isExternal:v,children:(0,f.jsxs)(c,{gap:1,display:`inline-flex`,children:[(0,f.jsx)(r,{as:`span`,children:n}),v&&(0,f.jsx)(o,{size:10})]})})]})})]})]})}export{g as t};
|
|
2
|
-
//# sourceMappingURL=FieldInfoTooltip-CXhYVsTQ.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{t}from"./react-BUD3sqOU.js";import{r as n}from"./portal-FJIui2Z2.js";import{t as r}from"./jsx-runtime-CFwixLRt.js";import{t as i}from"./box-Ck5lef6C.js";import{t as a}from"./skeleton-YwQIu7Tp.js";import{t as o}from"./text-A3qvcMyN.js";import{Ct as s,Sn as c,b as l,lr as u,vn as d,yn as f}from"./useLiteMemberGuard-klZnweA7.js";import{t as p}from"./tooltip-Croc0I6e.js";import{D as m,I as h}from"./ExternalImage-DbtOSrKl.js";import{n as g}from"./external-link-BzETHrAG.js";import{a as _}from"./field-Dz4Xmo3X.js";import{t as v}from"./h-stack-CMPhqSp5.js";import{t as y}from"./spacer-CbmCSsJg.js";import{i as b,r as x}from"./tag-CfNrl1Dd.js";import{E as S,rt as C}from"./immer-tl_oI9yy.js";import{t as w}from"./v-stack-ClAMS101.js";import{t as T}from"./user-C80vbw4g.js";import{n as E}from"./api-BK6L1im2.js";import{t as D}from"./x-BuQcGzF-.js";import{kn as O}from"./lu-DlSq9Be4.js";import{Ar as k,Nt as A,On as j,Rt as M,Un as N,V as P,Yn as F,ni as I,yt as L}from"./index-CUhcyBp3.js";import{i as R,n as z,r as B}from"./useSavedViews-CNmeuzC3.js";import{t as V}from"./registry-sEX6vtsn.js";import{t as H}from"./OverflownText-DhbWrtC6.js";import{t as U}from"./input-group-D5-60Bl4.js";var W=e(f()),G=e(t()),K=r();function q(){let{saveView:e}=z(),[t,r]=(0,G.useState)(!1),[i,a]=(0,G.useState)(``),[o,s]=(0,G.useState)(`project`),c=(0,G.useRef)(null),l=(0,G.useCallback)(()=>{a(``),s(`project`),r(!0),setTimeout(()=>c.current?.focus(),50)},[]),u=(0,G.useCallback)(()=>{let t=i.trim();t&&(e(t,o),r(!1),a(``))},[i,o,e]),d=(0,G.useCallback)(e=>{e.key===`Enter`&&u()},[u]);return(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(n,{size:`xs`,variant:`outline`,onClick:l,"data-testid":`save-as-view-button`,children:`Save as view`}),(0,K.jsx)(L.Root,{open:t,onOpenChange:e=>r(e.open),size:`sm`,children:(0,K.jsxs)(L.Content,{bg:`bg`,children:[(0,K.jsx)(L.Header,{children:(0,K.jsx)(L.Title,{children:`Save as view`})}),(0,K.jsx)(L.Body,{children:(0,K.jsx)(k,{ref:c,placeholder:`View name...`,value:i,onChange:e=>a(e.target.value.slice(0,50)),onKeyDown:d,"data-testid":`save-view-name-input`})}),(0,K.jsx)(L.Footer,{children:(0,K.jsxs)(v,{width:`full`,justify:`space-between`,children:[(0,K.jsx)(J,{scope:o,onScopeChange:s}),(0,K.jsxs)(v,{gap:2,children:[(0,K.jsx)(n,{variant:`ghost`,onClick:()=>{r(!1),a(``)},children:`Cancel`}),(0,K.jsx)(n,{colorPalette:`blue`,onClick:u,disabled:!i.trim(),children:`Save`})]})]})}),(0,K.jsx)(L.CloseTrigger,{})]})})]})}function J({scope:e,onScopeChange:t}){return(0,K.jsxs)(h.Root,{children:[(0,K.jsx)(h.Trigger,{asChild:!0,children:(0,K.jsxs)(n,{variant:`outline`,size:`sm`,px:2,children:[e===`project`?(0,K.jsx)(N,{size:14}):(0,K.jsx)(T,{size:14}),(0,K.jsx)(o,{children:e===`project`?`Project`:`Myself`}),(0,K.jsx)(C,{size:12})]})}),(0,K.jsxs)(h.Content,{portalled:!1,children:[(0,K.jsxs)(h.Item,{value:`myself`,onClick:()=>t(`myself`),children:[(0,K.jsx)(T,{size:14}),`Myself`,e===`myself`&&(0,K.jsx)(g,{size:14})]}),(0,K.jsxs)(h.Item,{value:`project`,onClick:()=>t(`project`),children:[(0,K.jsx)(N,{size:14}),`Project`,e===`project`&&(0,K.jsx)(g,{size:14})]})]})]})}function Y({hideTriggerButton:e=!1}){let{nonEmptyFilters:t,setFilters:r,filterParams:i}=B(),{openDrawer:a}=P(),{project:o,hasPermission:s}=M(),c=Object.keys(t).length>0;return(0,K.jsx)(X,{filters:t,setFilters:e=>r(R(e)),negated:!!i.negateFilters,actionButton:(0,K.jsxs)(v,{gap:1,children:[c&&(0,K.jsx)(q,{}),s(`triggers:manage`)&&!e&&(0,K.jsx)(p,{content:`Create a filter to add an automation.`,children:(0,K.jsxs)(n,{size:`xs`,variant:`outline`,onClick:()=>a(`automation`,void 0),disabled:!c,children:[(0,K.jsx)(O,{}),`Add Automation`]})})]})})}function X({filters:e,setFilters:t,actionButton:n,negated:r=!1}){let i=[`traces.origin`,`traces.name`,`metadata.prompt_ids`,`spans.type`,`spans.model`,`metadata.labels`,`evaluations.passed`,`evaluations.score`,`evaluations.label`,`events.event_type`,`events.metrics.value`,`metadata.user_id`,`metadata.thread_id`,`metadata.customer_id`,`metadata.value`,`evaluations.state`,`traces.error`,`annotations.hasAnnotation`].map(e=>[e,V[e]]);return(0,K.jsxs)(w,{align:`start`,width:`300px`,gap:4,children:[(0,K.jsxs)(v,{width:`full`,children:[(0,K.jsx)(I,{fontSize:`sm`,children:`Filters`}),(0,K.jsx)(y,{}),n]}),(0,K.jsx)(w,{gap:3,width:`full`,children:i.map(([n,i])=>(0,K.jsx)(Q,{filterId:n,filter:i,filters:e,setFilters:t,negated:r},n))})]})}var Z=[`evaluations.passed`,`traces.origin`,`traces.error`,`annotations.hasAnnotation`,`evaluations.state`];function Q({filterId:e,filter:t,filters:r,setFilters:a,negated:l=!1}){let d=A(`gray.400`),f=(0,G.useCallback)((e,t)=>{a({...r,[e]:t})},[a,r]),m=G.useRef(null),[h,g]=j(``,300);(0,G.useEffect)(()=>()=>{g.cancel()},[g]);let[S,C]=(0,G.useState)(``),{open:w,setOpen:T}=u(),E=r?.[e]??[],[O,M]=(0,G.useState)(-1),[N,P]=(0,G.useState)(!1),[I,L]=(0,G.useState)(0),R=G.useRef(null);(0,G.useEffect)(()=>{w||(M(-1),P(!1),g(``),C(``),m.current&&(m.current.value=``))},[w]);let z=Array.isArray(E)?E:Object.keys(E),B=t.type!==`numeric`&&!Z.includes(e),V=(0,G.useCallback)(e=>{e.key===`ArrowDown`?(e.preventDefault(),P(!0),M(e=>Math.min(e+1,I-1))):e.key===`ArrowUp`?(e.preventDefault(),P(!0),M(e=>Math.max(e-1,0))):e.key===`Enter`?(e.preventDefault(),R.current?.()):e.key===`Escape`&&(e.preventDefault(),T(!1))},[I,T]);return(0,K.jsx)(_,{children:(0,K.jsxs)(s.Root,{positioning:{placement:`bottom`},open:w,onOpenChange:({open:e})=>T(e),children:[(0,K.jsx)(s.Trigger,{asChild:!0,children:(0,K.jsx)(n,{variant:`subtle`,backgroundColor:z.length>0&&l?`red.subtle`:z.length>0?`blue.subtle`:`bg.muted`,size:`sm`,width:`100%`,fontWeight:`normal`,children:(0,K.jsxs)(v,{width:`full`,gap:1,children:[(0,K.jsxs)(o,{color:z.length>0&&l?`red.fg`:z.length>0?`blue.fg`:`fg.muted`,fontWeight:`500`,paddingRight:4,children:[z.length>0&&l?`NOT `:``,t.name]}),z.length>0?(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(o,{lineClamp:1,children:z.join(`, `)}),(0,K.jsx)(y,{}),z.length>1&&(0,K.jsx)(b,{justifyContent:`center`,display:`flex`,flexShrink:0,colorPalette:l?`red`:`blue`,children:(0,K.jsx)(x,{children:z.length})}),(0,K.jsx)(p,{content:`Clear ${t.name.toLowerCase()} filter`,children:(0,K.jsx)(n,{as:i,role:`button`,variant:`ghost`,width:`fit-content`,display:`flex`,onClick:t=>{t.stopPropagation(),f(e,[])},children:(0,K.jsx)(D,{})})})]}):(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(o,{color:`fg.subtle`,children:`Any`}),(0,K.jsx)(y,{})]}),(0,K.jsx)(c,{})]})})}),(0,K.jsxs)(s.Content,{padding:0,children:[(0,K.jsx)(i,{position:`sticky`,top:0,zIndex:`1`,borderBottom:`1px solid`,borderColor:`border`,children:(0,K.jsx)(U,{width:`full`,startElement:(0,K.jsx)(F,{size:14,color:d}),startElementProps:{paddingStart:`4px`},paddingY:1,paddingX:2,children:(0,K.jsx)(k,{variant:`plain`,size:`sm`,placeholder:`Search...`,ref:m,onChange:e=>{g(e.target.value),C(e.target.value),M(-1)},onKeyDown:V})})}),(0,K.jsx)(s.Body,{paddingY:1,paddingX:0,children:w&&(0,K.jsx)($,{query:h,immediateQuery:S,current:E,keysAhead:[...t.requiresKey?[t.requiresKey.filter]:[],...t.requiresSubkey?[t.requiresSubkey.filter]:[],e],paddingX:4,setFilter:f,allowCustomValue:B,highlightedIndex:O,onHighlightChange:M,isKeyboardNav:N,onKeyboardNavChange:P,onOptionCountChange:L,selectHighlightedRef:R})})]})]})})}function $({query:e,immediateQuery:t,current:n,keysAhead:r,keysBefore:i=[],paddingX:a=0,setFilter:o,allowCustomValue:s=!1,highlightedIndex:c,onHighlightChange:u,isKeyboardNav:d,onKeyboardNavChange:f,onOptionCountChange:p,selectHighlightedRef:m}){let h=r[0];if(!h)return console.warn(`NestedListSelection called with empty keysAhead`),null;let g=n;return i.forEach(e=>{Array.isArray(g)||(g=g[e]??[])}),Array.isArray(g)||(g=Object.keys(g)),(0,K.jsx)(ee,{filterId:h,query:e,immediateQuery:t,currentValues:g,keys:i,onChange:e=>{let t=r[r.length-1];if(r.length===1&&i.length==0){o(t,e);return}let a=Array.isArray(n)?{}:l(n),s=a;i.slice(0,r.length+i.length-2).forEach(e=>{let t=s[e];t&&(Array.isArray(t)?(s[e]={},s=s[e]):s=t)});let c=i[i.length-1];if(r.length===1)s[c]=e;else{for(let t of Object.keys(s))e.includes(t)||delete s[t];for(let t of e)s[t]||(s[t]=[]);c&&Object.keys(s).length===0&&(s[c]=[])}o(t,a)},...r.length>1?{nested:e=>(0,K.jsx)($,{query:``,immediateQuery:``,current:n,keysAhead:r.slice(1),keysBefore:[...i,e],setFilter:o})}:{},paddingX:a,allowCustomValue:s,highlightedIndex:c,onHighlightChange:u,isKeyboardNav:d,onKeyboardNavChange:f,onOptionCountChange:p,selectHighlightedRef:m})}function ee({filterId:e,query:t,immediateQuery:n,keys:r,currentValues:s,onChange:c,nested:l,paddingX:u=0,allowCustomValue:d=!1,highlightedIndex:f=-1,onHighlightChange:p,isKeyboardNav:h=!1,onKeyboardNavChange:g,onOptionCountChange:_,selectHighlightedRef:b}){let x=V[e],{filterParams:C,queryOpts:T}=B(),D=E.analytics.dataForFilter.useQuery({...C,field:e,key:r?.[0],subkey:r?.[1]},{refetchOnMount:!1,refetchOnWindowFocus:!1,keepPreviousData:!0,enabled:T.enabled}),O=(0,G.useMemo)(()=>{let e=(e,t)=>e.count>t.count?-1:1;return t?D.data?.options.filter(e=>e.label.toLowerCase().includes(t.toLowerCase())).toSorted(e):D.data?.options.toSorted(e)},[D.data?.options,t]),k=(n??t).trim(),A=(0,G.useMemo)(()=>!k||!O?!0:O.some(e=>e.label.toLowerCase()===k.toLowerCase()),[O,k]),j=d&&k&&!A,M=(O?.length??0)+ +!!j;(0,G.useEffect)(()=>{_?.(M)},[M,_]);let N=G.useRef(null),P=S({count:O?.length??0,getScrollElement:()=>N.current,estimateSize:()=>36,gap:0,overscan:5}),F=O&&O.length===0,I=(0,G.useCallback)(()=>{k&&(s.includes(k)?c(s.filter(e=>e!==k)):c([...s,k]))},[k,s,c]),L=(0,G.useCallback)(e=>{if(e<0)return;if(j&&e===(O?.length??0)){I();return}let t=O?.[e];if(!t)return;let n=t.field.toString();s.includes(n)?c(s.filter(e=>e!==n)):c([...s,n])},[O,j,s,c,I]);(0,G.useEffect)(()=>(b&&(b.current=()=>L(f)),()=>{b&&(b.current=null)}),[b,L,f]);let R=(0,G.useCallback)(e=>{f!==e&&(g?.(!1),p?.(e))},[f,g,p]);if(x.type===`numeric`&&r?.[0]==`thumbs_up_down`&&r?.[1]==`vote`)return(0,K.jsx)(ne,{currentValues:s,onChange:c});if(x.type===`numeric`)return(0,K.jsx)(te,{filterData:D,currentValues:s,onChange:c});let z=O?.length??0;return(0,K.jsx)(i,{width:`full`,paddingY:1,maxHeight:`280px`,overflowY:`auto`,paddingX:2,ref:N,children:(0,K.jsxs)(w,{width:`full`,align:`start`,gap:0,height:D.isLoading||F?`auto`:`${P.getTotalSize()+(j?36:0)}px`,position:`relative`,children:[P.getVirtualItems().map(e=>{let{field:t,label:n,count:r}=O?.[e.index]??{field:``,label:``,count:0},a=``,u=n.match(/^\[(.*)\] (.*)/);u&&(n=u[2]??``,a=u[1]??``);let d=e.index===f;return(0,K.jsxs)(w,{width:`full`,gap:0,position:`absolute`,top:0,left:0,transform:`translateY(${e.start}px)`,"data-index":e.index,ref:P.measureElement,children:[(0,K.jsxs)(v,{width:`full`,cursor:`pointer`,background:d?`bg.muted`:void 0,borderRadius:`md`,paddingX:2,onMouseMove:()=>R(e.index),onClick:()=>{s.includes(t.toString())?c(s.filter(e=>e.toString()!==t.toString())):c([...s,t])},children:[(0,K.jsx)(m,{width:`full`,paddingY:2,gap:2,size:`sm`,checked:s.includes(t.toString()),children:(0,K.jsxs)(w,{width:`full`,align:`start`,gap:0,children:[a&&(0,K.jsx)(H,{fontSize:`xs`,color:`fg.muted`,lineClamp:1,wordBreak:`break-all`,children:a}),(0,K.jsx)(H,{fontSize:`sm`,lineClamp:1,wordBreak:`break-all`,children:n===``?`<empty>`:n})]})}),(0,K.jsx)(y,{}),r!==void 0&&(0,K.jsx)(o,{fontSize:`12px`,color:`fg.subtle`,children:r})]}),(0,K.jsx)(i,{width:`full`,paddingLeft:4,children:l&&s.includes(t)&&l(t)})]},t)}),j&&(0,K.jsx)(v,{width:`full`,position:`absolute`,top:0,left:0,transform:`translateY(${P.getTotalSize()}px)`,cursor:`pointer`,background:f===z?`bg.muted`:void 0,borderRadius:`md`,paddingX:2,onMouseMove:()=>R(z),onClick:I,children:(0,K.jsx)(m,{width:`full`,paddingY:2,gap:2,size:`sm`,checked:s.includes(k),children:(0,K.jsx)(H,{fontSize:`sm`,lineClamp:1,wordBreak:`break-all`,children:k})})}),F&&(0,K.jsx)(o,{fontSize:`sm`,paddingX:1,paddingY:2,children:`No values yet — filters fill in as traces arrive.`}),D.isLoading&&Array.from({length:r&&r.length>0?2:5}).map((e,t)=>(0,K.jsx)(v,{width:`full`,paddingX:2,children:(0,K.jsx)(m,{checked:!1,paddingY:2,gap:2,size:`sm`,width:`full`,onChange:()=>void 0,children:(0,K.jsx)(a,{height:`14px`,width:`100px`})})},t))]})})}function te({filterData:e,currentValues:t,onChange:n}){let r=+(0,W.default)(+(e.data?.options.find(e=>e.label===`min`)?.field??0)).format(`0.[0]`),i=+(0,W.default)(+(e.data?.options.find(e=>e.label===`max`)?.field??0)).format(`0.[0]`);isNaN(r)&&(r=0),isNaN(i)&&(i=1),r===i&&r===0&&(r=0,i=1),r===i&&r!==0&&(r=0);let a=G.useRef(!1);return(0,G.useEffect)(()=>{!e.data||a.current||(a.current=!0,t.length!==2&&n([r.toString(),i.toString()]))},[!!e.data]),(0,K.jsxs)(w,{width:`full`,gap:2,paddingX:3,paddingY:3,children:[(0,K.jsx)(d.Root,{width:`full`,min:r,max:i,step:.1,value:t&&t.length==2?t.map((e,t)=>{let n=+e;return isNaN(n)?t===0?r:i:n}):[r,i],onValueChange:e=>{n(e.value.map(e=>e.toString()))},colorPalette:`orange`,children:(0,K.jsxs)(d.Control,{children:[(0,K.jsx)(d.Track,{children:(0,K.jsx)(d.Range,{})}),(0,K.jsx)(d.Thumb,{index:0,cursor:`grab`,children:(0,K.jsx)(d.HiddenInput,{})}),(0,K.jsx)(d.Thumb,{index:1,cursor:`grab`,children:(0,K.jsx)(d.HiddenInput,{})})]})}),(0,K.jsxs)(v,{width:`full`,gap:2,children:[(0,K.jsx)(k,{width:`full`,paddingX:2,textAlign:`center`,size:`sm`,value:t[0],onChange:e=>{n([e.target.value,t[1]??i.toString()])}}),(0,K.jsx)(o,{color:`fg.subtle`,fontSize:`xs`,flexShrink:0,children:`to`}),(0,K.jsx)(k,{width:`full`,paddingX:2,textAlign:`center`,size:`sm`,value:t[1],onChange:e=>{n([t[0]??r.toString(),e.target.value])}})]})]})}function ne({currentValues:e,onChange:t}){let n=e[0]?+e[0]:void 0,r=e[1]?+e[1]:void 0;return(0,K.jsx)(w,{width:`full`,align:`start`,gap:0,paddingY:1,paddingX:2,maxHeight:`280px`,overflowY:`auto`,children:[{field:-1,label:`negative`},{field:1,label:`positive`}].map(({field:e,label:i})=>{let a=!!(n&&r&&n<=e&&r>=e);return(0,K.jsx)(v,{width:`full`,paddingX:1,cursor:`pointer`,children:(0,K.jsx)(m,{width:`full`,paddingY:`4px`,gap:2,size:`sm`,checked:a,onClick:i=>{if(i.stopPropagation(),!a)t([(n&&n<e?n:e).toString(),(r&&r>e?r:e).toString()]);else{let i=e===-1?1:-1;t((n??0)===e&&(r??0)===e?[]:[i.toString(),i.toString()])}},children:(0,K.jsx)(o,{fontSize:`sm`,children:i})})},e)})})}export{Y as n,X as t};
|
|
2
|
-
//# sourceMappingURL=FieldsFilters-CrGJyKXz.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{t}from"./react-BUD3sqOU.js";import{t as n}from"./jsx-runtime-CFwixLRt.js";import{t as r}from"./box-Ck5lef6C.js";import{t as i}from"./h-stack-CMPhqSp5.js";import{n as a}from"./info-Bii0i81f.js";import{n as o}from"./HoverableBigText-CxXucdYS.js";var s=e(t()),c=e(a());function l(){return l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l.apply(this,arguments)}function u(e,t){if(e==null)return{};var n=d(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function d(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var f=(0,s.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=e.size,a=i===void 0?24:i,o=u(e,[`color`,`size`]);return s.createElement(`svg`,l({ref:t,xmlns:`http://www.w3.org/2000/svg`,width:a,height:a,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},o),s.createElement(`polygon`,{points:`22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3`}))});f.propTypes={color:c.default.string,size:c.default.oneOfType([c.default.string,c.default.number])},f.displayName=`Filter`;var p=n(),m=({children:e,fontSize:t=`sm`,hasBorder:n=!1})=>(0,p.jsxs)(i,{fontSize:t,width:`100%`,gap:2,paddingX:2,paddingY:1,border:n?`1px solid lightgray`:`none`,borderRadius:`md`,children:[(0,p.jsx)(r,{color:`fg.subtle`,children:(0,p.jsx)(f,{width:16,style:{minWidth:16}})}),e]}),h=({children:e})=>(0,p.jsx)(r,{padding:1,fontWeight:`500`,textTransform:`capitalize`,color:`fg.subtle`,children:String(e).split(`.`).filter((e,t)=>t!==0||e.toLowerCase()===`evaluations`).join(` `).replace(`_`,` `)}),g=({children:e})=>(0,p.jsx)(r,{padding:1,borderRightRadius:`md`,children:(0,p.jsx)(o,{lineClamp:1,expandable:!1,children:e})}),_=({filters:e,hasBorder:t=!1})=>(0,p.jsx)(p.Fragment,{children:(e=>{let n=typeof e==`string`?JSON.parse(e):e,r=[];for(let[e,i]of Object.entries(n))if(Array.isArray(i))r.push((0,p.jsxs)(m,{hasBorder:t,children:[(0,p.jsx)(h,{children:e}),(0,p.jsx)(g,{children:i.join(`, `)})]},e));else if(typeof i==`object`&&i){let n=[];for(let[e,t]of Object.entries(i))if(Array.isArray(t))n.push(`${e}: ${t.join(`, `)}`);else if(typeof t==`object`&&t)for(let[r,i]of Object.entries(t))Array.isArray(i)&&n.push(`${e} → ${r}: ${i.join(`, `)}`);else n.push(`${e}: ${String(t)}`);r.push((0,p.jsxs)(m,{hasBorder:t,children:[(0,p.jsx)(h,{children:e}),(0,p.jsx)(g,{children:n.join(`; `)})]},e))}else r.push((0,p.jsxs)(m,{fontSize:`xs`,hasBorder:t,children:[(0,p.jsx)(h,{children:e}),(0,p.jsx)(g,{children:String(i)})]},e));return r})(e)});export{f as n,_ as t};
|
|
2
|
-
//# sourceMappingURL=FilterDisplay-BT6B5ZoZ.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{t}from"./react-BUD3sqOU.js";import{r as n}from"./portal-FJIui2Z2.js";import{t as r}from"./jsx-runtime-CFwixLRt.js";import{t as i}from"./box-Ck5lef6C.js";import{t as a}from"./skeleton-YwQIu7Tp.js";import{t as o}from"./text-A3qvcMyN.js";import{t as s}from"./tooltip-Croc0I6e.js";import{D as c}from"./ExternalImage-DbtOSrKl.js";import{a as l,i as u,n as d,t as f}from"./empty-state-Al7XUd1I.js";import{t as p}from"./h-stack-CMPhqSp5.js";import{t as m}from"./v-stack-ClAMS101.js";import{r as h}from"./next-router-Bn5Y8Iek.js";import{n as g}from"./api-BK6L1im2.js";import{t as _}from"./x-BuQcGzF-.js";import{tt as v}from"./lu-DlSq9Be4.js";import{G as y,W as b,ni as x}from"./index-CUhcyBp3.js";import{i as S,r as C}from"./useSavedViews-CNmeuzC3.js";import{t as w}from"./OverflownText-DhbWrtC6.js";import{n as T}from"./FieldsFilters-CrGJyKXz.js";import{t as E}from"./Delayed-BLJqM_CK.js";var D=e(t()),O=e(y()),k=r();function A({count:e,size:t=14}){let{filterCount:n}=C(),r=e??n;return(0,k.jsxs)(i,{position:`relative`,display:`inline-flex`,children:[r>0&&(0,k.jsx)(i,{width:`12px`,height:`12px`,borderRadius:`12px`,background:`red.500`,position:`absolute`,top:`-4px`,right:`-4px`,fontSize:`8px`,color:`white`,lineHeight:`12px`,textAlign:`center`,children:r}),(0,k.jsx)(v,{size:t})]})}var j=e=>{let t=S(e),n=Object.keys(t).length;return{nonEmptyFilters:t,filterCount:n,hasAnyFilters:n>0}},M=({defaultShowFilters:e}={defaultShowFilters:!1})=>{let t=h(),{filterParams:n,filterCount:r,hasAnyFilters:i,clearFilters:a,setNegateFilters:o}=C();return{showFilters:typeof t.query.show_filters==`string`?t.query.show_filters===`true`:e,setShowFilters:n=>{let r=t.asPath.split(`?`)[0]??t.asPath,i=t.asPath.split(`?`)[1]??``,a=O.default.parse(i.replaceAll(`%2C`,`,`),b),o=n?e?void 0:`true`:e?`false`:void 0,s={...a};o===void 0?delete s.show_filters:s.show_filters=o;let c=O.default.stringify(s,{allowDots:!0,arrayFormat:`comma`,allowEmptyArrays:!0}),l=new Set((t.pathname.match(/\[(\w+)\]/g)??[]).map(e=>e.slice(1,-1))),u=Object.fromEntries(Object.entries(t.query).filter(([e])=>l.has(e))),d=O.default.parse(c,b);t.push({pathname:t.pathname,query:{...u,...d}},c?`${r}?${c}`:r,{shallow:!0,scroll:!1})},filterCount:r,hasAnyFilters:i,filterParams:n,clearFilters:a,setNegateFilters:o}};function N({defaultShowFilters:e=!1}){let{showFilters:t,setShowFilters:n,filterParams:r,clearFilters:i,setNegateFilters:a}=M({defaultShowFilters:e});return(0,k.jsx)(P,{toggled:t,onClick:()=>n(!t),filters:r.filters,onClear:i,negateFiltersToggled:r.negateFilters,setNegateFilters:a,children:`Filters`})}function P({toggled:e,onClick:t,filters:r,onClear:a,children:c,negateFiltersToggled:l,setNegateFilters:u}){let{filterCount:d,hasAnyFilters:f}=j(r);return(0,k.jsxs)(p,{gap:2,children:[(0,k.jsx)(n,{size:`sm`,variant:`outline`,backgroundColor:e?`bg.muted`:void 0,onClick:t,minWidth:`fit-content`,paddingRight:f?1:void 0,children:(0,k.jsxs)(p,{gap:0,children:[(0,k.jsx)(A,{count:d}),(0,k.jsx)(o,{paddingLeft:2,children:c}),f&&a&&(0,k.jsx)(s,{content:`Clear all filters`,positioning:{gutter:0},children:(0,k.jsx)(n,{as:i,role:`button`,variant:`plain`,width:`fit-content`,minWidth:0,display:`flex`,onClick:e=>{e.stopPropagation(),a?.()},paddingX:2,children:(0,k.jsx)(_,{width:12,style:{minWidth:`12px`}})})})]})}),u&&(0,k.jsx)(s,{content:`Negate filters`,positioning:{gutter:0},children:(0,k.jsxs)(n,{variant:`plain`,width:`fit-content`,minWidth:0,backgroundColor:l?`bg.muted`:void 0,onClick:e=>{e.stopPropagation(),u(!l)},children:[(0,k.jsx)(`span`,{style:{fontSize:`20px`,marginTop:`-4px`},children:`¬`}),` `,`Negate Filters`]})})]})}function F({showTitle:e=!0}){let t=h(),[n,r]=(0,D.useState)([]),[i,s]=(0,D.useState)([]),{filterParams:_,queryOpts:v}=C();(0,D.useEffect)(()=>{let e=t.query.topics;r(e?Array.isArray(e)?e:e.split(`,`):[])},[t.query.topics]),(0,D.useEffect)(()=>{let e=t.query.subtopics;s(e?Array.isArray(e)?e:e.split(`,`):[])},[t.query.subtopics]);let y=g.traces.getTopicCounts.useQuery({..._,filters:{..._.filters,"topics.topics":[],"topics.subtopics":[]}},{...v,keepPreviousData:!0}),b=(e,a)=>{let o=a?[...n,e]:n.filter(t=>t!==e),c=i;if(!a){let t=y.data?.subtopicCounts.filter(t=>t.parentId===e);t&&(c=i.filter(e=>!t.map(e=>e.id).includes(e)))}r(o),s(c);let l=o.length>0?o.join(`,`):void 0,u=c.length>0?c.join(`,`):void 0;t.push({query:{...t.query,topics:l,subtopics:u}},void 0,{shallow:!0})},S=(e,n)=>{let r=n?[...i,e]:i.filter(t=>t!==e),a=r.length>0?r.join(`,`):void 0;s(r),t.push({query:{...t.query,subtopics:a}},void 0,{shallow:!0})},T=(0,D.useRef)(null),[O,A]=(0,D.useState)(void 0);return(0,D.useEffect)(()=>{if(T.current&&y.data){let e=T.current.clientHeight;A(t=>e>(t??0)?e:t)}},[y.data]),(0,k.jsxs)(m,{align:`start`,width:`full`,gap:4,ref:T,minHeight:O?`${O}px`:void 0,children:[e&&(0,k.jsx)(x,{fontSize:`sm`,as:`h2`,children:`Topics`}),(0,k.jsx)(m,{width:`full`,gap:4,align:`start`,children:y.isLoading?(0,k.jsxs)(E,{children:[(0,k.jsx)(a,{width:`full`,height:`20px`}),(0,k.jsx)(a,{width:`full`,height:`20px`}),(0,k.jsx)(a,{width:`full`,height:`20px`})]}):y.data?y.data.topicCounts.length>0?y.data.topicCounts.toSorted((e,t)=>e.name>t.name?1:-1).toSorted((e,t)=>e.count>t.count?-1:1).map(e=>(0,k.jsxs)(D.Fragment,{children:[(0,k.jsxs)(p,{gap:1,width:`full`,paddingX:2,cursor:`pointer`,fontWeight:n.includes(e.id)?`500`:`normal`,children:[(0,k.jsx)(c,{borderColor:`border.emphasized`,gap:3,flexGrow:1,checked:n.includes(e.id),onChange:t=>b(e.id,t.target.checked),size:`sm`,children:(0,k.jsx)(w,{lineClamp:1,wordBreak:`break-all`,maxWidth:`300px`,children:e.name})}),(0,k.jsx)(o,{color:`fg.muted`,fontSize:`12px`,whiteSpace:`nowrap`,children:e.count})]}),n.includes(e.id)&&y.data.subtopicCounts.toSorted((e,t)=>e.name>t.name?1:-1).toSorted((e,t)=>e.count>t.count?-1:1).filter(t=>t.parentId===e.id).map(e=>(0,k.jsxs)(p,{gap:1,width:`full`,paddingX:2,paddingLeft:8,cursor:`pointer`,fontWeight:`normal`,children:[(0,k.jsx)(c,{borderColor:`border.emphasized`,gap:3,flexGrow:1,checked:i.includes(e.id),onChange:t=>S(e.id,t.target.checked),children:(0,k.jsx)(w,{lineClamp:1,wordBreak:`break-all`,maxWidth:`300px`,children:e.name})}),(0,k.jsx)(o,{color:`fg.muted`,fontSize:`12px`,whiteSpace:`nowrap`,children:e.count})]},e.id))]},e.id)):(0,k.jsx)(u,{size:`sm`,children:(0,k.jsx)(f,{children:(0,k.jsxs)(m,{textAlign:`center`,children:[(0,k.jsx)(l,{textStyle:`sm`,children:`No topics found`}),(0,k.jsxs)(d,{textStyle:`xs`,children:[`Topics are assigned automatically after enough messages are collected.`,` `]})]})})}):(0,k.jsx)(u,{size:`sm`,children:(0,k.jsx)(f,{children:(0,k.jsx)(l,{textStyle:`sm`,children:`No topics found`})})})})]})}var I=D.memo(function({defaultShowFilters:e=!1,hideTopics:t=!1}){let{showFilters:n}=M({defaultShowFilters:e});return n&&(0,k.jsxs)(m,{align:`start`,minWidth:`380`,maxWidth:`380`,gap:4,paddingTop:2,paddingBottom:`58px`,children:[!t&&(0,k.jsx)(F,{}),(0,k.jsx)(T,{})]})});export{M as a,P as i,F as n,A as o,N as r,I as t};
|
|
2
|
-
//# sourceMappingURL=FilterSidebar-0UgGuTeu.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./jsx-runtime-CFwixLRt.js";import{t}from"./text-A3qvcMyN.js";import{t as n}from"./tooltip-Croc0I6e.js";import{t as r}from"./formatMoney-CI_YqDED.js";var i=e(),a=({amount:e,currency:a,format:o=`$0.00[00]`,tooltip:s})=>{let c=r({amount:e,currency:a},o);return(0,i.jsx)(n,{content:s??(c.startsWith(`<`)?e:``),children:(0,i.jsx)(t,{as:`span`,whiteSpace:`nowrap`,children:c})})};export{a as t};
|
|
2
|
-
//# sourceMappingURL=FormatMoney-CEzwUDkl.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{t}from"./react-BUD3sqOU.js";import{r as n}from"./portal-FJIui2Z2.js";import{n as r}from"./IsolatedErrorBoundary-OupgoYEt.js";import{t as i}from"./jsx-runtime-CFwixLRt.js";import{t as a}from"./box-Ck5lef6C.js";import{t as o}from"./text-A3qvcMyN.js";import{cn as s}from"./useLiteMemberGuard-klZnweA7.js";import{T as c}from"./fetchSSE-DWKCnoHV.js";import{t as l}from"./h-stack-CMPhqSp5.js";import{t as u}from"./spacer-CbmCSsJg.js";import{t as d}from"./v-stack-ClAMS101.js";import{a as f,i as p,l as m,n as h,r as g,t as _}from"./traceExecutor-apa7WEzU.js";import{$n as v,Ar as y,Rt as b,V as x,ni as S}from"./index-CUhcyBp3.js";var C=e(t()),w=i();function T(){let{project:e}=b(),{closeDrawer:t}=x(),i=h(e=>e.selectedApiKey)??e?.apiKey,T=f(e=>e.trace),k=f(e=>e.setTrace),A=f(e=>e.resetTrace),j=f(e=>e.selectedSpanId),M=f(e=>e.selectSpan),N=f(e=>e.updateSpan),{running:P,setRunning:F,addLogEntry:I,updateLogEntry:L}=p(),{builtIn:R}=g(),[z,B]=(0,C.useState)(!T.spans.length),[V,H]=(0,C.useState)(null),[U,W]=(0,C.useState)(!1),G=(0,C.useRef)(null);(0,C.useEffect)(()=>{function e(e){e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement||((e.metaKey||e.ctrlKey)&&e.key===`Enter`&&(e.preventDefault(),G.current?.click()),e.key===`r`&&!e.metaKey&&!e.ctrlKey&&(e.preventDefault(),A()))}return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[A]);async function K(){if(P||!i)return;F(!0);let t=`log-${Date.now()}`;I({id:t,traceId:t,timestamp:Date.now(),status:`pending`});let n=_({apiKey:i,endpoint:window.location.origin,projectId:e?.id,resourceAttributes:T.resourceAttributes});try{let e=await n.executeTrace(T);L(t,{status:`success`,traceId:e}),H(e),W(!1)}catch(e){L(t,{status:`error`,error:e instanceof Error?e.message:`Failed`})}finally{F(!1)}}let q=T.spans,J=j?D(q,j):null;return(0,w.jsx)(s.Root,{open:!0,placement:`end`,size:`md`,onOpenChange:()=>t(),children:(0,w.jsxs)(s.Content,{bg:`bg`,children:[(0,w.jsxs)(s.Header,{children:[(0,w.jsxs)(l,{width:`full`,children:[(0,w.jsx)(S,{size:`md`,children:`The Foundry`}),(0,w.jsx)(u,{}),(0,w.jsx)(n,{size:`xs`,variant:`ghost`,onClick:A,children:(0,w.jsx)(r,{size:14})})]}),(0,w.jsx)(s.CloseTrigger,{})]}),(0,w.jsx)(s.Body,{padding:0,children:(0,w.jsx)(d,{align:`stretch`,gap:0,h:`full`,children:z?(0,w.jsxs)(d,{align:`stretch`,gap:1,p:4,flex:1,overflow:`auto`,children:[(0,w.jsx)(o,{fontSize:`sm`,fontWeight:`semibold`,mb:2,children:`Pick a preset to start`}),R.slice(0,8).map(e=>(0,w.jsxs)(c,{as:`button`,align:`center`,justify:`space-between`,rounded:`md`,border:`1px solid`,borderColor:`border`,px:3,py:2,_hover:{bg:`bg.subtle`},onClick:()=>{k(structuredClone(e.config)),B(!1)},children:[(0,w.jsxs)(d,{align:`start`,gap:0,children:[(0,w.jsx)(o,{fontSize:`sm`,fontWeight:`medium`,children:e.name}),(0,w.jsx)(o,{fontSize:`xs`,color:`fg.muted`,lineClamp:1,children:e.description})]}),(0,w.jsxs)(o,{fontSize:`xs`,color:`fg.muted`,children:[O(e.config.spans),` spans`]})]},e.id))]}):(0,w.jsxs)(w.Fragment,{children:[(0,w.jsxs)(a,{flex:1,overflow:`auto`,p:3,children:[(0,w.jsxs)(l,{justify:`space-between`,mb:2,children:[(0,w.jsxs)(o,{fontSize:`xs`,fontWeight:`medium`,textTransform:`uppercase`,color:`fg.muted`,children:[`Spans (`,O(q),`)`]}),(0,w.jsx)(n,{size:`2xs`,variant:`ghost`,onClick:()=>B(!0),children:`Change preset`})]}),q.map(e=>(0,w.jsx)(E,{span:e,depth:0,selectedId:j,onSelect:M},e.id)),J&&(0,w.jsxs)(a,{mt:3,p:3,rounded:`md`,border:`1px solid`,borderColor:`border`,bg:`bg.subtle`,children:[(0,w.jsxs)(o,{fontSize:`xs`,fontWeight:`medium`,color:`fg.muted`,mb:2,children:[m[J.type],` `,J.name]}),J.type===`llm`&&J.llm?.messages?.map((e,t)=>(0,w.jsxs)(a,{mb:1,children:[(0,w.jsx)(o,{fontSize:`10px`,color:`fg.muted`,mb:.5,children:e.role}),(0,w.jsx)(y,{size:`sm`,fontSize:`xs`,value:e.content,onChange:e=>{let n=[...J.llm?.messages??[]];n[t]={...n[t],content:e.target.value},N(J.id,{llm:{...J.llm,messages:n}})}})]},t)),J.type!==`llm`&&(0,w.jsx)(y,{size:`sm`,fontSize:`xs`,placeholder:`Input...`,value:J.input?.type===`text`?J.input.value:``,onChange:e=>N(J.id,{input:{type:`text`,value:e.target.value}})})]})]}),(0,w.jsxs)(a,{p:3,borderTop:`1px solid`,borderColor:`border`,bg:`bg.subtle`,children:[(0,w.jsxs)(l,{gap:2,children:[(0,w.jsxs)(n,{ref:G,flex:1,size:`sm`,colorPalette:`orange`,onClick:K,disabled:P||!i,loading:P,loadingText:`Sending...`,children:[(0,w.jsx)(v,{size:14}),` Send Trace`]}),(0,w.jsx)(n,{size:`sm`,variant:`outline`,onClick:A,title:`Reset (R)`,children:(0,w.jsx)(r,{size:14})})]}),V&&(0,w.jsxs)(a,{as:`button`,mt:2,w:`full`,rounded:`md`,bg:U?`green.950/30`:`bg.emphasized`,px:3,py:2,cursor:`pointer`,transition:`background 0.15s`,_hover:{bg:U?`green.950/30`:`bg.muted`},_active:{bg:`green.950/40`},onClick:()=>{navigator.clipboard.writeText(V),W(!0),setTimeout(()=>W(!1),2e3)},children:[(0,w.jsx)(o,{fontSize:`xs`,color:U?`green.400`:`fg.default`,fontWeight:`medium`,mb:.5,children:U?`Trace ID copied!`:`Trace sent — click to copy ID`}),(0,w.jsx)(o,{fontSize:`11px`,fontFamily:`mono`,color:`fg.muted`,truncate:!0,children:V})]}),(0,w.jsx)(o,{fontSize:`10px`,color:`fg.muted`,mt:1,textAlign:`center`,children:`⌘Enter to send · R to reset`})]})]})})})]})})}function E({span:e,depth:t,selectedId:n,onSelect:r}){let i=n===e.id;return(0,w.jsxs)(w.Fragment,{children:[(0,w.jsxs)(c,{align:`center`,gap:1,pl:`${t*12+4}px`,pr:1,py:.5,rounded:`sm`,cursor:`pointer`,fontSize:`xs`,bg:i?`orange.500/10`:`transparent`,color:i?`orange.400`:`fg.default`,_hover:{bg:i?`orange.500/10`:`bg.subtle`},onClick:()=>r(e.id),children:[(0,w.jsx)(o,{flexShrink:0,children:m[e.type]}),(0,w.jsx)(o,{truncate:!0,children:e.name}),(0,w.jsxs)(o,{flexShrink:0,fontSize:`10px`,color:`fg.muted`,children:[e.durationMs,`ms`]})]}),e.children.map(e=>(0,w.jsx)(E,{span:e,depth:t+1,selectedId:n,onSelect:r},e.id))]})}function D(e,t){for(let n of e){if(n.id===t)return n;let e=D(n.children,t);if(e)return e}}function O(e){return e.reduce((e,t)=>e+1+O(t.children),0)}export{T as FoundryDrawer};
|
|
2
|
-
//# sourceMappingURL=FoundryDrawer-BIy5SFvr.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./jsx-runtime-CFwixLRt.js";import{jt as t}from"./index-CUhcyBp3.js";var n=e();function r({width:e=155,height:r=38,forceColorMode:i}){let{colorMode:a}=t();return(i??a)===`dark`?(0,n.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:e,height:r,fill:`none`,viewBox:`0 0 155 38`,children:[(0,n.jsx)(`mask`,{id:`mask0_684_76230`,width:`155`,height:`38`,x:`0`,y:`0`,maskUnits:`userSpaceOnUse`,style:{maskType:`luminance`},children:(0,n.jsx)(`path`,{fill:`#fff`,d:`M0 0h155v37.8H0z`})}),(0,n.jsxs)(`g`,{mask:`url(#mask0_684_76230)`,children:[(0,n.jsx)(`path`,{fill:`#F1F5F9`,d:`M3 10.43v17.19a.6.6 0 0 0 .3.52l9.957 5.748a.6.6 0 0 0 .6 0l11.51-6.644a.6.6 0 0 0 .3-.52V9.533a.6.6 0 0 0-.3-.52l-3.666-2.115a.6.6 0 0 0-.6 0l-1.723.995v-1.99a.6.6 0 0 0-.3-.52L15.41 3.266a.6.6 0 0 0-.6 0L11.269 5.31a.6.6 0 0 0-.3.52v4.463l-.216.125v-.296a.6.6 0 0 0-.3-.52l-3.01-1.74a.6.6 0 0 0-.6 0L3.301 9.91a.6.6 0 0 0-.3.52zm.9.519 2.412 1.39v4.637l.003.018.006.039a.3.3 0 0 0 .026.077c.003.005.002.01.006.016q.004.006.01.01a.3.3 0 0 0 .072.075c.01.008.016.019.027.025l3.28 1.896c.004.002.01 0 .014.003a.3.3 0 0 0 .135.036q.074-.002.135-.035.015-.01.031-.021a.3.3 0 0 0 .077-.076c.005-.008.013-.01.018-.018q.003-.008.006-.017.012-.027.018-.056.009-.03.012-.06c0-.005.004-.01.004-.017v-4.29l3.066 1.77v16.498l-9.358-5.4zm20.567-1.417-2.94 1.699-3.066-1.771.466-.27L21.4 7.762zm-6.29-3.63-2.942 1.697-3.066-1.77 2.941-1.7 3.066 1.773zm-8.626 4.22-2.94 1.699-2.41-1.391 2.94-1.7zm6.022 2.784 1.987-1.145v2.512c0 .012.006.023.008.036a.23.23 0 0 0 .037.112q.013.024.031.046.021.023.046.04.013.015.028.026l3.216 1.855-3.528 2.037v-4.29q-.001-.01-.003-.018a.3.3 0 0 0-.03-.115c-.004-.006-.003-.012-.007-.017q-.006-.009-.012-.013a.3.3 0 0 0-.085-.086c-.005-.003-.008-.01-.013-.012zM18.16 9.98l3.067 1.77v4.119l-3.067-1.77zm-7.669 4.082 2.942-1.7 3.065 1.772-2.942 1.697zm-.9 4.29-2.38-1.375 2.38-1.374zm.86-6.721 1.116-.644 1.526.88-2.642 1.525zm1.416-5.282 3.067 1.77v4.117l-3.066-1.77zM38.804 9.997v14.09h7.034V26.8h-9.976V9.997zm12.392 17.102c-2.414 0-3.885-1.402-3.885-3.54 0-2.092 1.517-3.402 4.207-3.609l3.402-.253v-.253c0-1.54-.92-2.16-2.345-2.16-1.655 0-2.575.69-2.575 1.885h-2.39c0-2.46 2.023-4.069 5.103-4.069 3.057 0 4.942 1.655 4.942 4.804V26.8h-2.46l-.206-1.678c-.483 1.172-2.023 1.977-3.793 1.977m.92-2.115c1.723 0 2.827-1.034 2.827-2.781v-.598l-2.368.184c-1.747.16-2.414.736-2.414 1.655 0 1.034.69 1.54 1.954 1.54M63.213 26.8H60.41V15.445h2.597l.23 1.47c.713-1.148 2.092-1.815 3.632-1.815 2.85 0 4.322 1.77 4.322 4.712V26.8h-2.805v-6.321c0-1.908-.942-2.828-2.39-2.828-1.724 0-2.782 1.196-2.782 3.035zm10.088-5.93c0-3.31 2.161-5.793 5.402-5.793 1.701 0 3.034.713 3.7 1.93l.162-1.562h2.597v10.78c0 3.793-2.275 6.16-5.953 6.16-3.264 0-5.494-1.861-5.839-4.895h2.805c.183 1.47 1.31 2.344 3.034 2.344 1.93 0 3.172-1.218 3.172-3.103v-1.885c-.713 1.058-2.115 1.724-3.747 1.724-3.218 0-5.333-2.413-5.333-5.7m2.828-.07c0 1.909 1.218 3.334 3.057 3.334 1.93 0 3.126-1.357 3.126-3.333 0-1.931-1.172-3.264-3.126-3.264-1.862 0-3.057 1.402-3.057 3.264`}),(0,n.jsx)(`path`,{fill:`#CAD5E2`,d:`M91.165 26.8 86.154 9.997h3.057l2.667 8.873c.252.92.505 1.862.758 3.333.276-1.494.529-2.368.828-3.333l2.643-8.873h3.241l2.598 8.873c.275.942.528 1.908.804 3.333.322-1.563.552-2.46.805-3.31l2.712-8.896h2.988L104.152 26.8h-2.85l-3.586-12.229L94.061 26.8zm21.56.299c-2.414 0-3.885-1.402-3.885-3.54 0-2.092 1.517-3.402 4.207-3.609l3.402-.253v-.253c0-1.54-.92-2.16-2.345-2.16-1.655 0-2.574.69-2.574 1.885h-2.391c0-2.46 2.023-4.069 5.103-4.069 3.057 0 4.942 1.655 4.942 4.804V26.8h-2.46l-.206-1.678c-.483 1.172-2.023 1.977-3.793 1.977m.919-2.115c1.724 0 2.828-1.034 2.828-2.781v-.598l-2.368.184c-1.747.16-2.414.736-2.414 1.655 0 1.034.69 1.54 1.954 1.54m12 1.816h-2.805v-9.01h-2.184v-2.345h2.184v-3.54h2.805v3.54h2.206v2.344h-2.206zm3.171-5.7c0-3.518 2.321-6 5.677-6 3.104 0 5.218 1.724 5.517 4.46h-2.804c-.322-1.288-1.264-1.954-2.598-1.954-1.793 0-2.988 1.356-2.988 3.493 0 2.138 1.103 3.471 2.896 3.471 1.403 0 2.391-.69 2.69-1.93h2.827c-.345 2.643-2.551 4.459-5.517 4.459-3.448 0-5.7-2.39-5.7-6m16.109 5.7h-2.805V9.698h2.828v7.218c.712-1.103 2.046-1.816 3.678-1.816 2.804 0 4.275 1.77 4.275 4.712V26.8h-2.804v-6.321c0-1.908-.943-2.828-2.368-2.828-1.77 0-2.804 1.242-2.804 2.943z`})]})]}):(0,n.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:e,height:r,fill:`none`,viewBox:`0 0 155 38`,children:[(0,n.jsx)(`path`,{fill:`#1D293D`,d:`M38.804 9.997v14.09h7.034V26.8h-9.976V9.997zm12.392 17.102c-2.414 0-3.885-1.402-3.885-3.54 0-2.092 1.517-3.402 4.207-3.609l3.402-.253v-.253c0-1.54-.92-2.16-2.345-2.16-1.655 0-2.575.69-2.575 1.885h-2.39c0-2.46 2.023-4.069 5.103-4.069 3.057 0 4.942 1.655 4.942 4.804V26.8h-2.46l-.206-1.678c-.483 1.172-2.023 1.977-3.793 1.977m.92-2.115c1.723 0 2.827-1.034 2.827-2.781v-.598l-2.368.184c-1.747.16-2.414.736-2.414 1.655 0 1.034.69 1.54 1.954 1.54M63.213 26.8H60.41V15.445h2.597l.23 1.47c.713-1.148 2.092-1.815 3.632-1.815 2.85 0 4.322 1.77 4.322 4.712V26.8h-2.805v-6.321c0-1.908-.942-2.828-2.39-2.828-1.724 0-2.782 1.196-2.782 3.035zm10.088-5.93c0-3.31 2.161-5.793 5.402-5.793 1.701 0 3.034.713 3.7 1.93l.162-1.562h2.597v10.78c0 3.793-2.275 6.16-5.953 6.16-3.264 0-5.494-1.861-5.839-4.895h2.805c.183 1.47 1.31 2.344 3.034 2.344 1.93 0 3.172-1.218 3.172-3.103v-1.885c-.713 1.058-2.115 1.724-3.747 1.724-3.218 0-5.333-2.413-5.333-5.7m2.828-.07c0 1.909 1.218 3.334 3.057 3.334 1.93 0 3.126-1.357 3.126-3.333 0-1.931-1.172-3.264-3.126-3.264-1.862 0-3.057 1.402-3.057 3.264`}),(0,n.jsx)(`path`,{fill:`#314158`,d:`M91.165 26.8 86.154 9.997h3.057l2.667 8.873c.252.92.505 1.862.758 3.333.276-1.494.529-2.368.828-3.333l2.643-8.873h3.241l2.598 8.873c.275.942.528 1.908.804 3.333.322-1.563.552-2.46.805-3.31l2.712-8.896h2.988L104.152 26.8h-2.85l-3.586-12.229L94.061 26.8zm21.56.299c-2.414 0-3.885-1.402-3.885-3.54 0-2.092 1.517-3.402 4.207-3.609l3.402-.253v-.253c0-1.54-.92-2.16-2.345-2.16-1.655 0-2.574.69-2.574 1.885h-2.391c0-2.46 2.023-4.069 5.103-4.069 3.057 0 4.942 1.655 4.942 4.804V26.8h-2.46l-.206-1.678c-.483 1.172-2.023 1.977-3.793 1.977m.919-2.115c1.724 0 2.828-1.034 2.828-2.781v-.598l-2.368.184c-1.747.16-2.414.736-2.414 1.655 0 1.034.69 1.54 1.954 1.54m12 1.816h-2.805v-9.01h-2.184v-2.345h2.184v-3.54h2.805v3.54h2.206v2.344h-2.206zm3.171-5.7c0-3.518 2.321-6 5.677-6 3.104 0 5.218 1.724 5.517 4.46h-2.804c-.322-1.288-1.264-1.954-2.598-1.954-1.793 0-2.988 1.356-2.988 3.493 0 2.138 1.103 3.471 2.896 3.471 1.403 0 2.391-.69 2.69-1.93h2.827c-.345 2.643-2.551 4.459-5.517 4.459-3.448 0-5.7-2.39-5.7-6m16.109 5.7h-2.805V9.698h2.828v7.218c.712-1.103 2.046-1.816 3.678-1.816 2.804 0 4.275 1.77 4.275 4.712V26.8h-2.804v-6.321c0-1.908-.943-2.828-2.368-2.828-1.77 0-2.804 1.242-2.804 2.943z`}),(0,n.jsx)(`path`,{fill:`#fff`,d:`M3 10.198V27.28c0 .213.115.41.303.517l10.044 5.71a.61.61 0 0 0 .605 0l11.612-6.6a.6.6 0 0 0 .302-.516V9.306a.59.59 0 0 0-.302-.516l-3.7-2.102a.61.61 0 0 0-.604 0l-1.74.99V5.7a.59.59 0 0 0-.302-.517L15.519 3.08a.62.62 0 0 0-.605 0l-3.573 2.032a.6.6 0 0 0-.302.516v4.435l-.218.124v-.293a.59.59 0 0 0-.303-.517L7.482 7.65a.62.62 0 0 0-.605 0L3.303 9.682a.6.6 0 0 0-.303.516`}),(0,n.jsx)(`path`,{fill:`#1D293D`,d:`M3 10.198V27.28c0 .213.115.41.303.517l10.044 5.71a.61.61 0 0 0 .605 0l11.612-6.6a.6.6 0 0 0 .302-.516V9.306a.59.59 0 0 0-.302-.516l-3.7-2.102a.61.61 0 0 0-.604 0l-1.74.99V5.7a.59.59 0 0 0-.302-.517L15.519 3.08a.62.62 0 0 0-.605 0l-3.573 2.032a.6.6 0 0 0-.302.516v4.435l-.218.124v-.293a.59.59 0 0 0-.303-.517L7.482 7.65a.62.62 0 0 0-.605 0L3.303 9.682a.6.6 0 0 0-.303.516m.908.516 2.432 1.382v4.607q.001.009.004.017 0 .02.006.039a.3.3 0 0 0 .026.076c.003.006.002.012.006.017q.004.005.01.01.03.045.073.075c.01.007.016.017.027.024l3.309 1.883q.007.003.014.004c.041.02.086.036.136.036a.3.3 0 0 0 .136-.035q.015-.01.031-.021a.3.3 0 0 0 .079-.076c.004-.007.012-.01.017-.017q.003-.01.006-.017c.01-.018.013-.037.019-.056q.008-.03.012-.06c0-.005.004-.01.004-.016v-4.263l3.093 1.758v16.393l-9.44-5.366zm20.747-1.408-2.965 1.688-3.094-1.76.47-.267 2.496-1.42zM18.31 5.7l-2.967 1.687-3.093-1.758 2.967-1.689zm-8.7 4.195L6.643 11.58l-2.432-1.382L7.18 8.51zm6.075 2.765 2.005-1.139v2.497c0 .012.006.023.007.035q.003.06.037.111.015.024.032.047.022.022.046.04c.011.008.017.018.029.025l3.244 1.844-3.559 2.023v-4.263q-.001-.008-.003-.017a.3.3 0 0 0-.031-.115q-.003-.009-.006-.017l-.013-.013a.3.3 0 0 0-.085-.084q-.007-.008-.014-.012zm2.61-2.908 3.093 1.76v4.091l-3.093-1.758zm-7.737 4.056 2.968-1.689 3.092 1.76-2.967 1.687zM9.65 18.07l-2.4-1.367 2.4-1.365zm.868-6.678 1.126-.64 1.539.874-2.665 1.516zm1.429-5.248 3.093 1.758v4.091l-3.093-1.758z`})]})}export{r as t};
|
|
2
|
-
//# sourceMappingURL=FullLogo-EwD3nY0N.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import"./rolldown-runtime-DAXXjFlN.js";import{t as e}from"./react-BUD3sqOU.js";import{t}from"./jsx-runtime-CFwixLRt.js";import{t as n}from"./box-Ck5lef6C.js";import{t as r}from"./text-A3qvcMyN.js";import{K as i}from"./ExternalImage-DbtOSrKl.js";import{t as a}from"./createLucideIcon-WbxVGt4j.js";import{n as o}from"./close-button-RGOW3hmk.js";import{t as s}from"./route-DgQcHlMl.js";import{t as c}from"./SectionNavigationLayout-DNvKM1pq.js";var l=a(`plug-zap`,[[`path`,{d:`M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z`,key:`goz73y`}],[`path`,{d:`m2 22 3-3`,key:`19mgm9`}],[`path`,{d:`M7.5 13.5 10 11`,key:`7xgeeb`}],[`path`,{d:`M10.5 16.5 13 14`,key:`10btkg`}],[`path`,{d:`m18 3-4 4h6l-4 4`,key:`16psg9`}]]),u=a(`package-open`,[[`path`,{d:`M12 22v-9`,key:`x3hkom`}],[`path`,{d:`M15.17 2.21a1.67 1.67 0 0 1 1.63 0L21 4.57a1.93 1.93 0 0 1 0 3.36L8.82 14.79a1.655 1.655 0 0 1-1.64 0L3 12.43a1.93 1.93 0 0 1 0-3.36z`,key:`2ntwy6`}],[`path`,{d:`M20 13v3.87a2.06 2.06 0 0 1-1.11 1.83l-6 3.08a1.93 1.93 0 0 1-1.78 0l-6-3.08A2.06 2.06 0 0 1 4 16.87V13`,key:`1pmm1c`}],[`path`,{d:`M21 12.43a1.93 1.93 0 0 0 0-3.36L8.83 2.2a1.64 1.64 0 0 0-1.63 0L3 4.57a1.93 1.93 0 0 0 0 3.36l12.18 6.86a1.636 1.636 0 0 0 1.63 0z`,key:`12ttoo`}]]),d=a(`wallet`,[[`path`,{d:`M19 7V4a1 1 0 0 0-1-1H5a2 2 0 0 0 0 4h15a1 1 0 0 1 1 1v4h-3a2 2 0 0 0 0 4h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1`,key:`18etb6`}],[`path`,{d:`M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4`,key:`xoc0q4`}]]);e();var f=t();function p({children:e,pageTitle:t}){return(0,f.jsx)(c,{sectionLabel:`AI Governance`,orgScope:!0,pageTitle:t,navigationItems:[{label:`Overview`,href:`/governance`,icon:(0,f.jsx)(i,{size:14})},{label:`Ingestion Sources`,href:`/settings/governance/ingestion-sources`,includePath:`/settings/governance/ingestion-sources`,icon:(0,f.jsx)(l,{size:14})},{label:`Anomaly Rules`,href:`/settings/governance/anomaly-rules`,includePath:`/settings/governance/anomaly-rules`,icon:(0,f.jsx)(o,{size:14})},{label:`Routing Policies`,href:`/settings/routing-policies`,includePath:`/settings/routing-policies`,icon:(0,f.jsx)(s,{size:14})},{label:`Tool Catalog`,href:`/settings/governance/tool-catalog`,includePath:`/settings/governance/tool-catalog`,icon:(0,f.jsx)(u,{size:14})},{label:`Departments`,href:`/settings/governance/departments`,includePath:`/settings/governance/departments`,icon:(0,f.jsx)(d,{size:14})}],sidebarFooter:(0,f.jsx)(n,{paddingX:3,paddingTop:4,children:(0,f.jsx)(r,{fontSize:`xs`,color:`fg.subtle`,lineHeight:`1.5`,children:`Sub-pages above are admin-config surfaces under Settings. This Overview is the daily-use home, plus a few lightweight org-policy toggles at the bottom.`})}),children:e})}export{u as n,p as t};
|
|
2
|
-
//# sourceMappingURL=GovernanceLayout-COAapH9g.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{t}from"./react-BUD3sqOU.js";import{i as n,r}from"./portal-FJIui2Z2.js";import{t as i}from"./jsx-runtime-CFwixLRt.js";import{t as a}from"./box-Ck5lef6C.js";import{An as o}from"./useLiteMemberGuard-klZnweA7.js";import{t as s}from"./tooltip-Croc0I6e.js";import{n as c}from"./toaster-CRP22oRW.js";import{G as l,I as u,l as d}from"./ExternalImage-DbtOSrKl.js";import{r as f}from"./UpgradeModal-BmLw5ONS.js";import{t as p}from"./container-CAygaZzW.js";import{t as m}from"./h-stack-CMPhqSp5.js";import{t as h}from"./spacer-CbmCSsJg.js";import{t as g}from"./v-stack-ClAMS101.js";import{t as _}from"./pen-Gmq_Uwcw.js";import{t as v}from"./DashboardLayout-RHGL-98_.js";import{t as y}from"./arrow-down-Y7gGW9pp.js";import{t as b}from"./arrow-up-DVKoLGAx.js";import{r as x}from"./next-router-Bn5Y8Iek.js";import{n as S}from"./api-BK6L1im2.js";import{xt as C}from"./lu-DlSq9Be4.js";import{Ar as w,Qn as T,Rt as E,V as D}from"./index-CUhcyBp3.js";import{a as O,o as k}from"./useSavedViews-CNmeuzC3.js";import{t as A}from"./MenuLink-CCRiOtxz.js";import{t as j}from"./SmallLabel-BUZxxHop.js";import{a as M,r as N}from"./FilterSidebar-0UgGuTeu.js";var P=e(t()),F=i();function I({projectSlug:e}){let t=x(),{project:i}=E(),s=i?.id??``,f=t.query.dashboard,{openDrawer:p}=D(),m=S.useContext(),[h,g]=(0,P.useState)(null),[v,C]=(0,P.useState)(``),[O,k]=(0,P.useState)(null),j=(0,P.useRef)(null),M=S.dashboards.getAll.useQuery({projectId:s},{enabled:!!s}),N=S.dashboards.rename.useMutation(),I=S.dashboards.delete.useMutation(),L=S.dashboards.reorderDashboards.useMutation(),R=M.data??[];(0,P.useEffect)(()=>{h&&j.current&&(j.current.focus(),j.current.select())},[h]);let z=()=>{p(`dashboardName`)},B=(e,t)=>{g(e),C(t)},V=()=>{h&&v.trim()&&N.mutate({projectId:s,dashboardId:h,name:v.trim()},{onSuccess:()=>{M.refetch()},onError:()=>{c.create({title:`Error renaming dashboard`,type:`error`,duration:3e3,meta:{closable:!0}})}}),g(null),C(``)},H=(e,t)=>{let n=R.findIndex(t=>t.id===e);if(n===-1)return;let r=t===`up`?n-1:n+1;if(r<0||r>=R.length)return;let i=[...R],a=i[n];i[n]=i[r],i[r]=a,L.mutate({projectId:s,dashboardIds:i.map(e=>e.id)},{onSuccess:()=>{M.refetch()},onError:()=>{c.create({title:`Error reordering dashboards`,type:`error`,duration:3e3,meta:{closable:!0}})}})},U=(e,t)=>{if(e.preventDefault(),e.stopPropagation(),R.length<=1){c.create({title:`Cannot delete the last dashboard`,type:`warning`,duration:3e3,meta:{closable:!0}});return}k(t)};if(M.isLoading)return(0,F.jsx)(a,{paddingX:6,paddingY:2,children:(0,F.jsx)(n,{size:`sm`})});let W=f;return(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(d,{open:!!O,onOpenChange:e=>{e||k(null)},title:`Delete dashboard`,message:`Are you sure you want to delete this dashboard? All graphs on this dashboard will be deleted.`,confirmLabel:`Delete`,tone:`danger`,loading:I.isLoading,onConfirm:()=>{if(!O)return;let n=O;I.mutate({projectId:s,dashboardId:n},{onSuccess:()=>{if(M.refetch(),m.licenseEnforcement.checkLimit.invalidate(),f===n){let r=R.filter(e=>e.id!==n);r[0]&&t.push(`/${e}/analytics/reports?dashboard=${r[0].id}`)}},onError:()=>{c.create({title:`Error deleting dashboard`,type:`error`,duration:3e3,meta:{closable:!0}})},onSettled:()=>k(null)})}}),R.map((t,n)=>{let r=W===t.id,i=h===t.id,s=n>0,c=n<R.length-1;return(0,F.jsx)(a,{position:`relative`,width:`full`,borderRadius:`lg`,_hover:{background:`bg.muted`,"& .menu-btn":{opacity:1}},children:i?(0,F.jsx)(w,{ref:j,size:`xs`,value:v,onChange:e=>C(e.target.value),onBlur:V,onKeyDown:e=>{e.key===`Enter`&&V(),e.key===`Escape`&&(g(null),C(``))},marginLeft:4,marginRight:2,marginY:1,fontSize:`14px`}):(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(A,{href:`/${e}/analytics/reports?dashboard=${t.id}`,isSelected:r,children:t.name}),(0,F.jsxs)(u.Root,{children:[(0,F.jsx)(u.Trigger,{asChild:!0,children:(0,F.jsx)(a,{as:`button`,className:`menu-btn`,position:`absolute`,right:1,top:`50%`,transform:`translateY(-50%)`,opacity:0,transition:`opacity 0.2s`,padding:1,cursor:`pointer`,color:`fg.muted`,_hover:{color:`fg.default`},children:(0,F.jsx)(o,{size:14})})}),(0,F.jsxs)(u.Content,{children:[(0,F.jsxs)(u.Item,{value:`rename`,onClick:()=>B(t.id,t.name),children:[(0,F.jsx)(_,{size:14}),` Rename`]}),s&&(0,F.jsxs)(u.Item,{value:`move-up`,onClick:()=>H(t.id,`up`),children:[(0,F.jsx)(b,{size:14}),` Move Up`]}),c&&(0,F.jsxs)(u.Item,{value:`move-down`,onClick:()=>H(t.id,`down`),children:[(0,F.jsx)(y,{size:14}),` Move Down`]}),R.length>1&&(0,F.jsxs)(u.Item,{value:`delete`,color:`red.600`,onClick:e=>U(e,t.id),children:[(0,F.jsx)(l,{size:14}),` Delete`]})]})]})]})},t.id)}),(0,F.jsxs)(r,{size:`sm`,width:`full`,variant:`ghost`,onClick:z,children:[(0,F.jsx)(T,{size:14}),` Add Dashboard`]})]})}function L({title:e,isEditable:t,onTitleSave:n,extraHeaderButtons:r}){let i=x(),{project:o}=E(),[c,l]=(0,P.useState)(!1),[u,d]=(0,P.useState)(``),p=(0,P.useRef)(null),{period:{startDate:g,endDate:v},mode:y,setPeriod:b,setRelativePeriod:S}=k();(0,P.useEffect)(()=>{c&&p.current&&(p.current.focus(),p.current.select())},[c]);let T=()=>{t&&(d(e),l(!0))},D=()=>{u.trim()&&u!==e&&n?.(u.trim()),l(!1),d(``)};return(0,F.jsxs)(f.Header,{children:[c?(0,F.jsx)(w,{ref:p,value:u,onChange:e=>d(e.target.value),onBlur:D,onKeyDown:e=>{e.key===`Enter`&&D(),e.key===`Escape`&&(l(!1),d(``))},fontSize:`md`,fontWeight:`500`,variant:`flushed`,width:`auto`,minWidth:`200px`}):(0,F.jsxs)(m,{cursor:t?`pointer`:`default`,onClick:T,_hover:t?{"& .edit-icon":{opacity:1}}:void 0,children:[(0,F.jsx)(f.Heading,{children:e}),t&&(0,F.jsx)(a,{className:`edit-icon`,opacity:0,transition:`opacity 0.2s`,color:`fg.subtle`,paddingTop:1,children:(0,F.jsx)(_,{size:16})})]}),(0,F.jsx)(h,{}),(0,F.jsxs)(m,{gap:2,children:[(0,F.jsx)(N,{}),(0,F.jsx)(O,{period:{startDate:g,endDate:v},mode:y,setPeriod:b,setRelativePeriod:S}),(0,F.jsx)(s,{content:`Show traces behind those metrics`,children:(0,F.jsxs)(f.HeaderButton,{variant:`ghost`,onClick:()=>{i.push(`/${o?.slug}/traces#all-traces?from=${g.getTime()}&to=${v.getTime()}`)},children:[(0,F.jsx)(C,{}),`Show Traces`]})}),r]})]})}function R({children:e,title:t,analyticsHeaderProps:n,extraHeaderButtons:r}){let{project:i}=E(),{showFilters:a}=M();return(0,F.jsxs)(v,{children:[(0,F.jsx)(L,{title:t,...n,extraHeaderButtons:r}),(0,F.jsxs)(m,{align:`start`,width:`full`,minHeight:`full`,children:[(0,F.jsxs)(g,{align:`start`,paddingX:2,paddingY:4,textStyle:`sm`,minWidth:`180px`,position:`sticky`,top:0,alignSelf:`start`,gap:1,children:[(0,F.jsx)(A,{href:`/${i?.slug}/analytics`,children:`Overview`}),(0,F.jsxs)(g,{align:`start`,width:`full`,gap:1,children:[(0,F.jsx)(j,{paddingX:4,paddingTop:4,paddingBottom:2,color:`fg`,textStyle:`xs`,children:`Engagement`}),(0,F.jsx)(A,{href:`/${i?.slug}/analytics/users`,children:`Users`}),(0,F.jsx)(A,{href:`/${i?.slug}/analytics/topics`,children:`Topics`})]}),(0,F.jsxs)(g,{align:`start`,width:`full`,gap:1,children:[(0,F.jsx)(j,{paddingX:4,paddingTop:4,paddingBottom:2,color:`fg`,textStyle:`xs`,children:`Observability`}),(0,F.jsx)(A,{href:`/${i?.slug}/analytics/metrics`,children:`LLM Metrics`}),(0,F.jsx)(A,{href:`/${i?.slug}/analytics/evaluations`,children:`Online Evaluations`})]}),(0,F.jsxs)(g,{align:`start`,width:`full`,gap:1,children:[(0,F.jsx)(j,{paddingX:4,paddingTop:4,paddingBottom:2,color:`fg`,textStyle:`xs`,children:`Custom`}),i?.slug&&(0,F.jsx)(I,{projectSlug:i.slug})]})]}),(0,F.jsx)(p,{maxWidth:a?`1612`:`1200`,padding:4,paddingBottom:16,children:e})]})]})}export{R as t};
|
|
2
|
-
//# sourceMappingURL=GraphsLayout-ygWQTw_g.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{t}from"./react-BUD3sqOU.js";import{r as n}from"./portal-FJIui2Z2.js";import{t as r}from"./jsx-runtime-CFwixLRt.js";import{t as i}from"./box-Ck5lef6C.js";import{t as a}from"./text-A3qvcMyN.js";import{s as o,t as s}from"./select-BVcV39WT.js";import{n as c}from"./info-CtYT35g4.js";import"./toaster-CRP22oRW.js";import{t as l}from"./h-stack-CMPhqSp5.js";import{n as u}from"./api-BK6L1im2.js";import{Ar as d,En as f,Rt as p,Yn as m}from"./index-CUhcyBp3.js";import{t as h}from"./input-group-D5-60Bl4.js";var g=f(),_=e(t()),v=r();function y(e){return e===g.RoleBindingScopeType.ORGANIZATION?`🏢`:e===g.RoleBindingScopeType.TEAM?`👥`:`📁`}function b(e){return e===`ADMIN`?`red`:e===`MEMBER`?`blue`:`gray`}function x({scimSource:e}){return e?(0,v.jsx)(c,{colorPalette:`blue`,children:e.toUpperCase()}):(0,v.jsx)(c,{colorPalette:`gray`,children:`Manual`})}var S=[{label:`Organization`,value:g.RoleBindingScopeType.ORGANIZATION},{label:`Team`,value:g.RoleBindingScopeType.TEAM},{label:`Project`,value:g.RoleBindingScopeType.PROJECT}],C=o({items:S}),ee=[{label:`Admin`,value:`ADMIN`,customRoleId:void 0},{label:`Member`,value:`MEMBER`,customRoleId:void 0},{label:`Viewer`,value:`VIEWER`,customRoleId:void 0}],w=(0,_.forwardRef)(function({organizationId:e,onAdd:t,buttonLabel:r=`Add`,isPending:c=!1},f){let[y,b]=(0,_.useState)(g.RoleBindingScopeType.TEAM),[x,w]=(0,_.useState)(``),[T,E]=(0,_.useState)(`MEMBER`),[D,O]=(0,_.useState)(void 0),[k,A]=(0,_.useState)(``),[j,M]=(0,_.useState)(``),[N,P]=(0,_.useState)(``),[F,I]=(0,_.useState)(``),[L,R]=(0,_.useState)(!1),{organization:z}=p(),B=u.team.getTeamsWithMembers.useQuery({organizationId:e}),V=u.role.getAll.useQuery({organizationId:e}),H=(0,_.useMemo)(()=>[...ee,...(V.data??[]).map(e=>({label:e.name,value:`CUSTOM:${e.id}`,customRoleId:e.id}))],[V.data]),U=(0,_.useMemo)(()=>o({items:H}),[H]),W=(0,_.useMemo)(()=>(B.data??[]).map(e=>({label:e.name,value:e.id})),[B.data]),G=(0,_.useMemo)(()=>k?W.filter(e=>e.label.toLowerCase().includes(k.toLowerCase())):W,[W,k]),K=(0,_.useMemo)(()=>o({items:G}),[G]),q=(0,_.useMemo)(()=>(B.data??[]).filter(e=>e.projects.length>0).map(e=>({label:e.name,value:e.id})),[B.data]),J=(0,_.useMemo)(()=>N?q.filter(e=>e.label.toLowerCase().includes(N.toLowerCase())):q,[q,N]),te=(0,_.useMemo)(()=>o({items:J}),[J]),Y=(0,_.useMemo)(()=>(B.data??[]).find(e=>e.id===j)?.projects.map(e=>({label:e.name,value:e.id}))??[],[B.data,j]),X=(0,_.useMemo)(()=>F?Y.filter(e=>e.label.toLowerCase().includes(F.toLowerCase())):Y,[Y,F]),ne=(0,_.useMemo)(()=>o({items:X}),[X]);function re(){if(y===g.RoleBindingScopeType.ORGANIZATION)return z?.name??`Organization`;if(y===g.RoleBindingScopeType.TEAM)return W.find(e=>e.value===x)?.label;if(y===g.RoleBindingScopeType.PROJECT)return Y.find(e=>e.value===x)?.label}let Z=L&&(x!==``||y===g.RoleBindingScopeType.ORGANIZATION);function Q(){let t=D,n=t?V.data?.find(e=>e.id===t)?.name:void 0;return{roleValue:T,role:t?`CUSTOM`:T,customRoleId:t,customRoleName:n,scopeType:y,scopeId:y===g.RoleBindingScopeType.ORGANIZATION?e:x,scopeName:re()}}function $(){w(``),M(``),P(``),R(!1)}function ie(){Z&&(t(Q()),$())}return(0,_.useImperativeHandle)(f,()=>({flush(){if(!Z)return null;let e=Q();return $(),e}})),(0,v.jsxs)(l,{gap:2,mt:2,flexWrap:`wrap`,children:[(0,v.jsxs)(s.Root,{collection:U,value:[T],onValueChange:e=>{let t=e.value[0]??`MEMBER`;t.startsWith(`CUSTOM:`)?(E(t),O(t.slice(7))):(E(t),O(void 0)),R(!0)},size:`sm`,width:`160px`,children:[(0,v.jsx)(s.Trigger,{children:(0,v.jsx)(s.ValueText,{placeholder:`Role...`})}),(0,v.jsx)(s.Content,{children:H.map(e=>(0,v.jsx)(s.Item,{item:e,children:e.label},e.value))})]}),(0,v.jsx)(a,{fontSize:`sm`,color:`fg.muted`,children:`on`}),(0,v.jsxs)(s.Root,{collection:C,value:[y],onValueChange:e=>{b(e.value[0]??g.RoleBindingScopeType.TEAM),w(``),A(``),M(``),P(``),I(``),R(!0)},size:`sm`,width:`130px`,children:[(0,v.jsx)(s.Trigger,{children:(0,v.jsx)(s.ValueText,{})}),(0,v.jsx)(s.Content,{children:S.map(e=>(0,v.jsx)(s.Item,{item:e,children:e.label},e.value))})]}),y===g.RoleBindingScopeType.TEAM&&(0,v.jsxs)(s.Root,{collection:K,value:x?[x]:[],onValueChange:e=>{w(e.value[0]??``),R(!0)},size:`sm`,width:`160px`,children:[(0,v.jsx)(s.Trigger,{children:(0,v.jsx)(s.ValueText,{placeholder:`Select team...`})}),(0,v.jsxs)(s.Content,{children:[(0,v.jsx)(i,{position:`sticky`,top:0,zIndex:1,bg:`bg`,pb:1,children:(0,v.jsx)(h,{startElement:(0,v.jsx)(m,{size:14}),startOffset:`2px`,width:`full`,children:(0,v.jsx)(d,{size:`sm`,placeholder:`Search teams...`,value:k,onChange:e=>A(e.target.value),onKeyDown:e=>e.stopPropagation()})})}),G.map(e=>(0,v.jsx)(s.Item,{item:e,children:e.label},e.value))]})]}),y===g.RoleBindingScopeType.ORGANIZATION&&(0,v.jsx)(a,{fontSize:`sm`,color:`fg.muted`,minWidth:`160px`,children:`(whole organization)`}),y===g.RoleBindingScopeType.PROJECT&&(0,v.jsxs)(v.Fragment,{children:[(0,v.jsxs)(s.Root,{collection:te,value:j?[j]:[],onValueChange:e=>{M(e.value[0]??``),w(``),I(``)},size:`sm`,width:`160px`,children:[(0,v.jsx)(s.Trigger,{children:(0,v.jsx)(s.ValueText,{placeholder:`Select team...`})}),(0,v.jsxs)(s.Content,{children:[(0,v.jsx)(i,{position:`sticky`,top:0,zIndex:1,bg:`bg`,pb:1,children:(0,v.jsx)(h,{startElement:(0,v.jsx)(m,{size:14}),startOffset:`2px`,width:`full`,children:(0,v.jsx)(d,{size:`sm`,placeholder:`Search teams...`,value:N,onChange:e=>P(e.target.value),onKeyDown:e=>e.stopPropagation()})})}),J.map(e=>(0,v.jsx)(s.Item,{item:e,children:e.label},e.value))]})]}),j&&(0,v.jsxs)(s.Root,{collection:ne,value:x?[x]:[],onValueChange:e=>{w(e.value[0]??``),R(!0)},size:`sm`,width:`160px`,children:[(0,v.jsx)(s.Trigger,{children:(0,v.jsx)(s.ValueText,{placeholder:`Select project...`})}),(0,v.jsxs)(s.Content,{children:[(0,v.jsx)(i,{position:`sticky`,top:0,zIndex:1,bg:`bg`,pb:1,children:(0,v.jsx)(h,{startElement:(0,v.jsx)(m,{size:14}),startOffset:`2px`,width:`full`,children:(0,v.jsx)(d,{size:`sm`,placeholder:`Search projects...`,value:F,onChange:e=>I(e.target.value),onKeyDown:e=>e.stopPropagation()})})}),X.map(e=>(0,v.jsx)(s.Item,{item:e,children:e.label},e.value))]})]})]}),(0,v.jsx)(n,{size:`sm`,colorPalette:Z?`blue`:void 0,disabled:!Z,loading:c,onClick:ie,children:r})]})});export{y as i,x as n,b as r,w as t};
|
|
2
|
-
//# sourceMappingURL=GroupBindingInputRow-DF_WY6iQ.js.map
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{t}from"./react-BUD3sqOU.js";import{r as n}from"./portal-FJIui2Z2.js";import{t as r}from"./jsx-runtime-CFwixLRt.js";import{t as i}from"./box-Ck5lef6C.js";import{t as a}from"./text-A3qvcMyN.js";import{cn as o}from"./useLiteMemberGuard-klZnweA7.js";import{i as s}from"./ExternalImage-DbtOSrKl.js";import{t as c}from"./external-link-BzETHrAG.js";import{n as l,r as u,t as d}from"./native-select-Bj4m9rSh.js";import{t as f}from"./v-stack-ClAMS101.js";import{Or as p,Rt as m,V as h,ni as g,z as _}from"./index-CUhcyBp3.js";import{t as v}from"./HorizontalFormControl-CLz9xuFM.js";import{t as y}from"./EvaluatorSelectionBox-v8iA4p4D.js";var b=e(t()),x=r(),S=null,C=()=>{S=null};function w(e){let{closeDrawer:t,openDrawer:r,goBack:C}=h(),{project:w}=m(),T=e.onClose??t,E=e.open!==!1&&e.open!==void 0,[D,O]=(0,b.useState)(()=>S?.selectedEvaluator??null),[k,A]=(0,b.useState)(()=>S?.activeLanguage??`python-async`),j=(0,b.useRef)(E);(0,b.useEffect)(()=>{!j.current&&E&&!S&&(O(null),A(`python-async`)),j.current=E},[E]),(0,b.useEffect)(()=>{E&&(S={selectedEvaluator:D,activeLanguage:k})},[E,D,k]);let M=(0,b.useCallback)(()=>{S=null,T()},[T]),N=(0,b.useCallback)(()=>{_(`evaluatorList`,{onSelect:e=>{O(e),S={selectedEvaluator:e,activeLanguage:k},C()}}),r(`evaluatorList`,{})},[r,k,C]),P=D?.slug??`your-evaluator-slug`,F=D?.name??`My Guardrail`,I=`import langwatch
|
|
2
|
-
|
|
3
|
-
# Uses LANGWATCH_API_KEY environment variable
|
|
4
|
-
|
|
5
|
-
async def llm_step(user_input: str):
|
|
6
|
-
# ... your existing code
|
|
7
|
-
|
|
8
|
-
guardrail = await langwatch.evaluation.async_evaluate(
|
|
9
|
-
"${P}",
|
|
10
|
-
data={
|
|
11
|
-
"input": user_input
|
|
12
|
-
},
|
|
13
|
-
name="${F}",
|
|
14
|
-
as_guardrail=True,
|
|
15
|
-
)
|
|
16
|
-
|
|
17
|
-
if not guardrail.passed:
|
|
18
|
-
# handle the guardrail here
|
|
19
|
-
return "I'm sorry, I can't do that."
|
|
20
|
-
|
|
21
|
-
# ... continue with your LLM call`,L=`import langwatch
|
|
22
|
-
|
|
23
|
-
# Uses LANGWATCH_API_KEY environment variable
|
|
24
|
-
|
|
25
|
-
def llm_step(user_input: str):
|
|
26
|
-
# ... your existing code
|
|
27
|
-
|
|
28
|
-
guardrail = langwatch.evaluation.evaluate(
|
|
29
|
-
"${P}",
|
|
30
|
-
data={
|
|
31
|
-
"input": user_input
|
|
32
|
-
},
|
|
33
|
-
name="${F}",
|
|
34
|
-
as_guardrail=True,
|
|
35
|
-
)
|
|
36
|
-
|
|
37
|
-
if not guardrail.passed:
|
|
38
|
-
# handle the guardrail here
|
|
39
|
-
return "I'm sorry, I can't do that."
|
|
40
|
-
|
|
41
|
-
# ... continue with your LLM call`,R=`import { LangWatch } from "langwatch";
|
|
42
|
-
|
|
43
|
-
// Uses LANGWATCH_API_KEY environment variable
|
|
44
|
-
const langwatch = new LangWatch();
|
|
45
|
-
|
|
46
|
-
async function llmStep(message: string): Promise<string> {
|
|
47
|
-
// ... your existing code
|
|
48
|
-
|
|
49
|
-
// call the guardrail
|
|
50
|
-
const guardrail = await langwatch.evaluations.evaluate(
|
|
51
|
-
"${P}",
|
|
52
|
-
{
|
|
53
|
-
data: {
|
|
54
|
-
input: message
|
|
55
|
-
},
|
|
56
|
-
name: "${F}",
|
|
57
|
-
asGuardrail: true,
|
|
58
|
-
}
|
|
59
|
-
);
|
|
60
|
-
|
|
61
|
-
if (!guardrail.passed) {
|
|
62
|
-
// handle the guardrail here
|
|
63
|
-
return "I'm sorry, I can't do that.";
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
// ... continue with your LLM call
|
|
67
|
-
}`,z=`# Set your API key
|
|
68
|
-
API_KEY="$LANGWATCH_API_KEY"
|
|
69
|
-
|
|
70
|
-
# Use curl to send the POST request
|
|
71
|
-
curl -X POST "https://app.langwatch.ai/api/evaluations/${P}/evaluate" \\
|
|
72
|
-
-H "X-Auth-Token: $API_KEY" \\
|
|
73
|
-
-H "Content-Type: application/json" \\
|
|
74
|
-
-d @- <<EOF
|
|
75
|
-
{
|
|
76
|
-
"name": "${F}",
|
|
77
|
-
"data": {
|
|
78
|
-
"input": "input content"
|
|
79
|
-
},
|
|
80
|
-
"as_guardrail": true
|
|
81
|
-
}
|
|
82
|
-
EOF
|
|
83
|
-
|
|
84
|
-
# Response:
|
|
85
|
-
# {
|
|
86
|
-
# "status": "processed",
|
|
87
|
-
# "passed": true,
|
|
88
|
-
# "score": 1,
|
|
89
|
-
# "details": "possible explanation"
|
|
90
|
-
# }`;return(0,x.jsx)(o.Root,{open:E,onOpenChange:({open:e})=>!e&&M(),size:`lg`,children:(0,x.jsxs)(o.Content,{bg:`bg`,children:[(0,x.jsx)(o.CloseTrigger,{}),(0,x.jsx)(o.Header,{children:(0,x.jsx)(g,{size:`md`,children:`New Guardrail`})}),(0,x.jsx)(o.Body,{children:(0,x.jsxs)(f,{gap:0,align:`stretch`,children:[(0,x.jsx)(v,{label:`Evaluator`,helper:`Select an evaluator to use as a guardrail`,children:(0,x.jsx)(y,{selectedEvaluator:D,onSelectClick:N,placeholder:`Select Evaluator`,showSlug:!0})}),D&&(0,x.jsx)(v,{label:`Integration Code`,helper:`Use the code below to integrate this guardrail into your application`,direction:`vertical`,align:`start`,labelProps:{paddingLeft:0},children:(0,x.jsxs)(f,{align:`stretch`,gap:4,width:`full`,children:[(0,x.jsxs)(u,{width:`170px`,children:[(0,x.jsxs)(d,{value:k,onChange:e=>A(e.target.value),children:[(0,x.jsx)(`option`,{value:`python-async`,children:`Python (async)`}),(0,x.jsx)(`option`,{value:`python`,children:`Python`}),(0,x.jsx)(`option`,{value:`typescript`,children:`TypeScript`}),(0,x.jsx)(`option`,{value:`bash`,children:`cURL`})]}),(0,x.jsx)(l,{})]}),(0,x.jsx)(i,{borderRadius:`md`,overflow:`hidden`,width:`full`,children:(0,x.jsx)(s,{code:(()=>{switch(k){case`python-async`:return I;case`python`:return L;case`typescript`:return R;case`bash`:return z;default:return I}})(),language:(()=>{switch(k){case`python-async`:case`python`:return`python`;case`typescript`:return`typescript`;case`bash`:return`bash`;default:return`python`}})(),style:{padding:`16px`,width:`100%`}})}),(0,x.jsxs)(a,{fontSize:`sm`,color:`gray.600`,children:[`Set the `,(0,x.jsx)(`code`,{children:`LANGWATCH_API_KEY`}),` environment variable with your API key.`,` `,(0,x.jsxs)(p,{href:`/settings/api-keys`,color:`blue.500`,display:`inline-flex`,alignItems:`center`,gap:1,children:[`Find your API key `,(0,x.jsx)(c,{size:12})]})]}),(0,x.jsxs)(a,{fontSize:`sm`,color:`gray.600`,children:[`Learn more about running guardrails in our`,` `,(0,x.jsxs)(p,{href:`https://langwatch.ai/docs/evaluations/guardrails/overview`,color:`blue.500`,display:`inline-flex`,alignItems:`center`,gap:1,target:`_blank`,children:[`documentation `,(0,x.jsx)(c,{size:12})]})]})]})})]})}),(0,x.jsx)(o.Footer,{children:(0,x.jsx)(n,{variant:`outline`,onClick:M,children:`Close`})})]})})}export{w as GuardrailsDrawer,C as clearGuardrailsDrawerState};
|
|
91
|
-
//# sourceMappingURL=GuardrailsDrawer-BIq6RhSh.js.map
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{t}from"./react-BUD3sqOU.js";import{i as n,r,t as i}from"./portal-FJIui2Z2.js";import{t as a}from"./jsx-runtime-CFwixLRt.js";import{t as o}from"./box-Ck5lef6C.js";import{r as s,t as c}from"./skeleton-YwQIu7Tp.js";import{t as l}from"./text-A3qvcMyN.js";import{Ct as u,Dt as d,Et as f,Ot as p,Tt as m,W as h,in as g,kt as _,lr as v,t as y,yn as b}from"./useLiteMemberGuard-klZnweA7.js";import{n as x}from"./info-CtYT35g4.js";import{t as S}from"./tooltip-Croc0I6e.js";import{n as C}from"./toaster-CRP22oRW.js";import{D as w,n as T,nt as E,t as D}from"./ExternalImage-DbtOSrKl.js";import{i as O,l as k,o as A}from"./external-link-BzETHrAG.js";import{t as j}from"./icon-CkSWK_vf.js";import{_ as M,at as ee,h as N,it as P,ot as te,r as ne,v as re}from"./UpgradeModal-BmLw5ONS.js";import{i as ie,r as F}from"./alert-C5hocQt_.js";import{r as ae,t as oe}from"./card-54_vstoB.js";import{t as I}from"./icon-button-Ce2kwA7j.js";import{a as L,r as R}from"./field-Dz4Xmo3X.js";import{t as z}from"./h-stack-CMPhqSp5.js";import{t as B}from"./spacer-CbmCSsJg.js";import{i as V,r as H}from"./tag-CfNrl1Dd.js";import{E as U}from"./immer-tl_oI9yy.js";import{t as W}from"./v-stack-ClAMS101.js";import{t as G}from"./columns-3-CC21vLnl.js";import{t as K}from"./git-compare-C3SExbco.js";import{t as q}from"./swords-MQM0cQ6F.js";import{r as se}from"./next-router-Bn5Y8Iek.js";import{n as J}from"./api-BK6L1im2.js";import{t as ce}from"./bar-chart-2-Dfx5UwSl.js";import{t as le}from"./ColorfulBlockIcons-CUrsa--K.js";import{t as ue}from"./download-CyGwCZjE.js";import{t as de}from"./external-link-CoqqfbzU.js";import{C as fe,F as pe,L as me,O as he,R as ge,V as _e,b as ve,bn as ye,et as be,k as xe,xt as Se}from"./lu-DlSq9Be4.js";import{Ar as Ce,At as we,Dn as Te,En as Ee,Er as De,Rt as Oe,V as ke,Vn as Ae,ni as je,t as Me,w as Ne}from"./index-CUhcyBp3.js";import{c as Pe,n as Fe,s as Ie}from"./index.esm-C0ipNBTK.js";import{B as Le,J as Re,d as ze,g as Be,on as Ve,u as He}from"./CartesianChart-D35vYym3.js";import{i as Ue,n as We,r as Ge,t as Y}from"./lib-epD9Y2nV.js";import{t as Ke}from"./ColumnTypeIcon-DNzTCt_2.js";import{t as qe}from"./textOverflowHeuristic-DaM4Vgve.js";import{t as Je}from"./input-group-D5-60Bl4.js";import{t as Ye}from"./SmallLabel-BUZxxHop.js";import{i as Xe,n as Ze}from"./ModelSelector-BBb1wHS_.js";import{t as Qe}from"./History-B85gwpxC.js";import{t as $e}from"./TraceIdPeek-By6CFB9R.js";import{t as et}from"./papaparse.min-cQwnxGCG.js";import{i as tt}from"./normalizeComparison-CCZ-bOPv.js";import{t as nt}from"./variantDisambiguation-Cqxyafug.js";import{a as rt,i as it,n as at,o as ot,t as st}from"./MetricStatsTooltip-Bcj5Xgjp.js";import{n as ct,r as lt,s as ut,t as dt}from"./ChartTooltip-Cf8ESsQ9.js";import{a as ft,n as pt,r as mt}from"./useWorkflowStore-PvyqdAIQ.js";import{n as ht,r as gt,t as _t}from"./PassRateIndicator-BR-3K00K.js";import{t as vt}from"./formatTargetOutput-CobR8BbJ.js";var X=e(t()),yt=Ee(),Z=a(),bt=({inputs:e})=>(0,Z.jsxs)(W,{align:`stretch`,gap:1,padding:2,maxWidth:`300px`,children:[(0,Z.jsx)(l,{fontSize:`12px`,fontWeight:`semibold`,color:`fg`,marginBottom:1,children:`Evaluator Inputs`}),(0,Z.jsx)(o,{fontSize:`11px`,fontFamily:`mono`,color:`fg.muted`,whiteSpace:`pre-wrap`,wordBreak:`break-word`,maxHeight:`250px`,overflow:`auto`,children:JSON.stringify(e,null,2)})]});function xt({name:e,result:t,statusOverride:r,inputs:i,children:a}){let c=re(t),u=r??c.status,{score:d,label:f,details:p}=c,m=N[u],h=i&&Object.keys(i).length>0,{isOpen:g,handleMouseEnter:_,handleMouseLeave:v}=gt(150),y=()=>u===`pending`?null:u===`running`?(0,Z.jsx)(n,{size:`xs`,color:`fg.muted`}):u===`error`?(0,Z.jsx)(j,{as:pe,color:m,boxSize:`12px`}):d===void 0?f?(0,Z.jsx)(l,{fontSize:`10px`,fontWeight:`medium`,maxWidth:`60px`,truncate:!0,children:f}):null:(0,Z.jsx)(l,{fontSize:`10px`,fontWeight:`semibold`,children:d.toFixed(2)}),b=u===`pending`?(0,Z.jsx)(l,{fontSize:`12px`,children:`Pending`}):(0,Z.jsxs)(W,{align:`stretch`,gap:1,padding:2,children:[d!==void 0&&(0,Z.jsxs)(z,{justify:`space-between`,gap:4,children:[(0,Z.jsx)(l,{fontSize:`12px`,color:`fg.muted`,children:`Score:`}),(0,Z.jsx)(l,{fontSize:`12px`,fontWeight:`semibold`,color:`fg`,children:d.toFixed(2)})]}),f&&(0,Z.jsxs)(z,{justify:`space-between`,gap:4,children:[(0,Z.jsx)(l,{fontSize:`12px`,color:`fg.muted`,children:`Label:`}),(0,Z.jsx)(l,{fontSize:`12px`,fontWeight:`semibold`,color:`fg`,children:f})]}),(0,Z.jsxs)(z,{justify:`space-between`,gap:4,children:[(0,Z.jsx)(l,{fontSize:`12px`,color:`fg.muted`,children:`Status:`}),(0,Z.jsx)(l,{fontSize:`12px`,fontWeight:`semibold`,color:m,children:M(u)})]}),p&&(0,Z.jsxs)(o,{marginTop:1,children:[(0,Z.jsx)(l,{fontSize:`12px`,color:`fg.subtle`,marginBottom:.5,children:`Details:`}),(0,Z.jsx)(l,{fontSize:`12px`,color:`fg.muted`,whiteSpace:`pre-wrap`,maxHeight:`200px`,overflow:`auto`,children:p})]}),h&&(0,Z.jsx)(S,{content:(0,Z.jsx)(bt,{inputs:i}),positioning:{placement:`right`},openDelay:100,closeOnScroll:!1,interactive:!0,children:(0,Z.jsxs)(z,{justify:`space-between`,cursor:`pointer`,_hover:{bg:`bg.muted`},marginX:-2,paddingX:2,paddingY:1,borderRadius:`md`,marginTop:1,children:[(0,Z.jsx)(l,{fontSize:`12px`,color:`fg.muted`,children:`Data`}),(0,Z.jsx)(j,{as:fe,boxSize:3,color:`fg.subtle`})]})})]}),x=(0,Z.jsxs)(z,{gap:1.5,paddingX:2,paddingY:1,borderRadius:`md`,borderWidth:`1px`,borderColor:`border`,bg:`bg.panel`,fontSize:`11px`,fontWeight:`medium`,cursor:`default`,onMouseEnter:h?_:void 0,onMouseLeave:h?v:void 0,children:[u===`running`?(0,Z.jsx)(o,{flexShrink:0,children:(0,Z.jsx)(n,{size:`xs`,color:`fg.muted`,marginBottom:`-2px`})}):(0,Z.jsx)(s,{size:`10px`,bg:m,flexShrink:0}),(0,Z.jsx)(l,{children:e}),u!==`running`&&y(),a]});return h?(0,Z.jsx)(S,{content:b,contentProps:{onMouseEnter:_,onMouseLeave:v},positioning:{placement:`top`},open:g,closeOnScroll:!1,interactive:!0,children:x}):(0,Z.jsx)(S,{content:b,positioning:{placement:`top`},openDelay:200,closeDelay:200,closeOnScroll:!1,interactive:!0,children:x})}var St=1e4,Ct=120;function wt({targetOutput:e,getEvaluatorResult:t,suppressedEvaluatorIds:n}){let{openDrawer:a}=ke(),[s,c]=(0,X.useState)(!1),[u,d]=(0,X.useState)(!1),f=(0,X.useRef)(null),[p,m]=(0,X.useState)({top:0,left:0,width:0}),h=(0,X.useCallback)(()=>{e.traceId&&(c(!1),a(`traceDetails`,{traceId:e.traceId}))},[e.traceId,a]),g=(0,X.useCallback)(()=>{if(f.current){let e=f.current.getBoundingClientRect(),t=f.current.closest(`td`)?.getBoundingClientRect().width??e.width,n=Math.max(e.width,t)+24,r=window.innerWidth,i=e.left-12;i+n>r-32&&(i=r-n-32),m({top:e.top,left:i,width:n})}c(!0)},[]),_=(0,X.useCallback)(()=>{c(!1)},[]),v=(0,X.useCallback)(()=>{y&&(navigator.clipboard.writeText(y),d(!0),setTimeout(()=>d(!1),2e3))},[]),y=vt(e.output),b=y.length>St,x=b?y.slice(0,St):y,C=qe(y),w=t=>{if(e.error){let n=(0,Z.jsxs)(z,{gap:2,p:2,bg:`red.subtle`,borderRadius:`md`,color:`red.fg`,fontSize:`13px`,cursor:t?void 0:`pointer`,onClick:t?void 0:g,"data-testid":`error-output-${e.targetId}`,children:[(0,Z.jsx)(o,{flexShrink:0,children:(0,Z.jsx)(he,{size:16})}),(0,Z.jsx)(l,{lineClamp:t?void 0:2,children:e.error})]});return t?n:(0,Z.jsx)(S,{content:(0,Z.jsx)(l,{fontSize:`13px`,whiteSpace:`pre-wrap`,wordBreak:`break-word`,"data-testid":`error-tooltip-${e.targetId}`,children:e.error}),positioning:{placement:`top`},openDelay:100,contentProps:{maxWidth:`480px`},children:n})}return x?t?(0,Z.jsx)(o,{flex:1,overflowY:`auto`,minHeight:0,children:(0,Z.jsxs)(l,{fontSize:`13px`,whiteSpace:`pre-wrap`,wordBreak:`break-word`,children:[x,b&&(0,Z.jsx)(o,{as:`span`,color:`fg.subtle`,fontSize:`11px`,marginLeft:1,children:`(truncated)`})]})}):(0,Z.jsxs)(o,{position:`relative`,children:[(0,Z.jsx)(o,{maxHeight:`${Ct}px`,overflow:`hidden`,cursor:C?`pointer`:void 0,onClick:C?g:void 0,children:(0,Z.jsxs)(l,{fontSize:`13px`,whiteSpace:`pre-wrap`,wordBreak:`break-word`,children:[x,b&&(0,Z.jsx)(o,{as:`span`,color:`fg.subtle`,fontSize:`11px`,marginLeft:1,children:`(truncated)`})]})}),C&&(0,Z.jsx)(o,{position:`absolute`,bottom:0,left:`-12px`,right:`-12px`,height:`40px`,cursor:`pointer`,onClick:g,className:`cell-fade-overlay`,css:{background:`linear-gradient(to bottom, transparent, var(--chakra-colors-bg-panel))`,"tr:hover &":{background:`linear-gradient(to bottom, transparent, var(--chakra-colors-bg-muted))`}}})]}):(0,Z.jsx)(l,{fontSize:`13px`,color:`fg.subtle`,children:`No output`})},T=()=>{let t=n?e.evaluatorResults.filter(e=>!n.has(e.evaluatorId)):e.evaluatorResults;return t.length===0?null:(0,Z.jsx)(z,{flexWrap:`wrap`,gap:1.5,children:t.map(e=>{let t={status:e.status,score:e.score,passed:e.passed,label:e.label,details:e.details};return(0,Z.jsx)(xt,{name:e.evaluatorName,result:t,inputs:e.inputs},e.evaluatorId)})})},E=t=>(0,Z.jsxs)(z,{position:`absolute`,top:-1,right:-1,gap:.5,zIndex:1,className:t?void 0:`cell-action-btn`,opacity:+!!t,transition:`opacity 0.15s`,bg:`bg.subtle/90`,borderRadius:`md`,px:.5,children:[e.duration!==null&&(0,Z.jsx)(S,{content:`Latency: ${rt(e.duration)}`,positioning:{placement:`top`},openDelay:100,children:(0,Z.jsx)(l,{fontSize:`11px`,color:`fg.muted`,whiteSpace:`nowrap`,px:1,"data-testid":`latency-${e.targetId}`,children:rt(e.duration)})}),e.traceId&&(0,Z.jsx)(S,{content:`View trace`,positioning:{placement:`top`},openDelay:100,children:(0,Z.jsx)(r,{size:`xs`,variant:`ghost`,_hover:{bg:`bg.emphasized`},onClick:h,"data-testid":`trace-link-${e.targetId}`,children:(0,Z.jsx)(Se,{})})}),e.traceId&&(0,Z.jsx)($e,{traceId:e.traceId}),y&&(0,Z.jsx)(S,{content:u?`Copied!`:`Copy to clipboard`,positioning:{placement:`top`},openDelay:100,children:(0,Z.jsx)(r,{size:`xs`,variant:`ghost`,_hover:{bg:`bg.emphasized`},onClick:e=>{e.stopPropagation(),v()},"data-testid":`copy-output-${e.targetId}`,children:u?(0,Z.jsx)(ve,{}):(0,Z.jsx)(_e,{})})})]});return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(W,{ref:f,position:`relative`,align:`stretch`,gap:2,css:{"&:hover .cell-action-btn":{opacity:1}},children:[E(!1),w(!1),T()]}),s&&(0,Z.jsxs)(i,{children:[(0,Z.jsx)(o,{position:`fixed`,inset:0,zIndex:1e3,onClick:_,"data-testid":`expanded-cell-backdrop`}),(0,Z.jsx)(o,{position:`fixed`,top:`${p.top-12}px`,left:`${p.left}px`,width:`${Math.max(p.width,250)}px`,maxHeight:`calc(100vh - ${p.top-12}px - 32px)`,overflowY:`auto`,bg:`bg.panel/75`,backdropFilter:`blur(8px)`,borderRadius:`md`,boxShadow:`0 0 0 2px var(--chakra-colors-border-emphasized), 0 4px 12px rgba(0,0,0,0.15)`,zIndex:1001,display:`flex`,flexDirection:`column`,p:3,css:{animation:`scale-in 0.15s ease-out`},children:(0,Z.jsxs)(W,{align:`stretch`,gap:2,height:`100%`,position:`relative`,children:[E(!0),w(!0),T()]})})]})]})}var Tt=({values:e,inline:t=!1})=>e.length===0?(0,Z.jsx)(l,{fontSize:`13px`,color:`fg.subtle`,children:`-`}):e.length===1&&e[0]?(0,Z.jsx)(Z.Fragment,{children:e[0].value}):(0,Z.jsx)(t?z:W,{align:t?`center`:`stretch`,gap:t?4:2,width:`100%`,children:e.map((e,n)=>(0,Z.jsxs)(z,{gap:2,width:`100%`,align:`start`,paddingY:n>0?2:0,borderTop:!t&&n>0?`1px dashed`:void 0,borderColor:`border`,children:[(0,Z.jsx)(s,{size:`8px`,bg:e.color,flexShrink:0,marginTop:`6px`}),(0,Z.jsx)(o,{flex:1,minWidth:0,children:e.value})]},e.runId))}),Et=1e4,Dt=180,Ot=e=>e==null?``:typeof e==`object`?JSON.stringify(e,null,2):String(e);function kt({value:e,columnName:t=`dataset`}){let[n,a]=(0,X.useState)(!1),[s,c]=(0,X.useState)(!1),u=(0,X.useRef)(null),[d,f]=(0,X.useState)({top:0,left:0,width:0}),p=Ot(e),m=qe(p),h=(0,X.useCallback)(()=>{if(u.current){let e=u.current.getBoundingClientRect(),t=u.current.closest(`td`)?.getBoundingClientRect().width??e.width,n=Math.max(e.width,t)+24,r=window.innerWidth,i=e.left-12;i+n>r-32&&(i=r-n-32),f({top:e.top,left:i,width:n})}a(!0)},[]),g=(0,X.useCallback)(()=>{a(!1)},[]),_=(0,X.useCallback)(()=>{navigator.clipboard.writeText(p),c(!0),setTimeout(()=>c(!1),2e3)},[p]),v=p.length>Et,y=v?p.slice(0,Et):p;if(!p)return(0,Z.jsx)(l,{fontSize:`13px`,color:`fg.subtle`,children:`-`});let b=e=>e?(0,Z.jsx)(o,{flex:1,overflowY:`auto`,minHeight:0,children:(0,Z.jsxs)(l,{fontSize:`13px`,whiteSpace:`pre-wrap`,wordBreak:`break-word`,children:[y,v&&(0,Z.jsx)(o,{as:`span`,color:`fg.subtle`,fontSize:`11px`,marginLeft:1,children:`(truncated)`})]})}):(0,Z.jsxs)(o,{position:`relative`,children:[(0,Z.jsx)(o,{maxHeight:`${Dt}px`,overflow:`hidden`,cursor:m?`pointer`:void 0,onClick:m?h:void 0,children:(0,Z.jsxs)(l,{fontSize:`13px`,whiteSpace:`pre-wrap`,wordBreak:`break-word`,children:[y,v&&(0,Z.jsx)(o,{as:`span`,color:`fg.subtle`,fontSize:`11px`,marginLeft:1,children:`(truncated)`})]})}),m&&(0,Z.jsx)(o,{position:`absolute`,bottom:0,left:`-12px`,right:`-12px`,height:`40px`,cursor:`pointer`,onClick:h,className:`cell-fade-overlay`,css:{background:`linear-gradient(to bottom, transparent, var(--chakra-colors-bg-panel))`,"tr:hover &":{background:`linear-gradient(to bottom, transparent, var(--chakra-colors-bg-muted))`}}})]}),x=e=>(0,Z.jsx)(z,{position:`absolute`,top:-1,right:-1,gap:.5,zIndex:1,className:e?void 0:`cell-action-btn`,opacity:+!!e,transition:`opacity 0.15s`,bg:`bg.subtle/90`,borderRadius:`md`,px:.5,children:(0,Z.jsx)(S,{content:s?`Copied!`:`Copy to clipboard`,positioning:{placement:`top`},openDelay:100,children:(0,Z.jsx)(r,{size:`xs`,variant:`ghost`,_hover:{bg:`bg.emphasized`},onClick:e=>{e.stopPropagation(),_()},"data-testid":`copy-${t}`,children:s?(0,Z.jsx)(ve,{}):(0,Z.jsx)(_e,{})})})});return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(o,{ref:u,position:`relative`,css:{"&:hover .cell-action-btn":{opacity:1}},children:(0,Z.jsxs)(W,{align:`stretch`,height:`100%`,gap:0,children:[x(!1),b(!1)]})}),n&&(0,Z.jsxs)(i,{children:[(0,Z.jsx)(o,{position:`fixed`,inset:0,zIndex:1e3,onClick:g,"data-testid":`expanded-${t}-backdrop`}),(0,Z.jsx)(o,{position:`fixed`,top:`${d.top-12}px`,left:`${d.left}px`,width:`${Math.max(d.width,250)}px`,maxHeight:`calc(100vh - ${d.top-12}px - 32px)`,overflowY:`auto`,bg:`bg.panel/75`,backdropFilter:`blur(8px)`,borderRadius:`md`,boxShadow:`0 0 0 2px var(--chakra-colors-border-emphasized), 0 4px 12px rgba(0,0,0,0.15)`,zIndex:1001,display:`flex`,flexDirection:`column`,p:3,css:{animation:`scale-in 0.15s ease-out`},children:(0,Z.jsxs)(W,{align:`stretch`,gap:0,height:`100%`,position:`relative`,children:[x(!0),b(!0)]})})]})]})}var At=({rows:e=5,columns:t=3})=>(0,Z.jsx)(o,{overflowX:`auto`,width:`full`,css:{"& table":{width:`100%`,borderCollapse:`collapse`},"& th":{borderBottom:`1px solid var(--chakra-colors-gray-200)`,padding:`8px 12px`,textAlign:`left`},"& td":{borderBottom:`1px solid var(--chakra-colors-gray-100)`,padding:`12px`}},children:(0,Z.jsxs)(`table`,{children:[(0,Z.jsx)(`thead`,{children:(0,Z.jsxs)(`tr`,{children:[(0,Z.jsx)(`th`,{style:{width:`32px`}}),Array.from({length:t}).map((e,t)=>(0,Z.jsx)(`th`,{children:(0,Z.jsx)(c,{height:`16px`,width:`${60+t*20}px`})},t))]})}),(0,Z.jsx)(`tbody`,{children:Array.from({length:e}).map((e,n)=>(0,Z.jsxs)(`tr`,{children:[(0,Z.jsx)(`td`,{style:{width:`32px`},children:(0,Z.jsx)(c,{height:`14px`,width:`16px`})}),Array.from({length:t}).map((e,t)=>(0,Z.jsx)(`td`,{children:(0,Z.jsx)(c,{height:`16px`})},t))]},n))})]})}),jt=({rows:e=5,columns:t=3,withCard:n=!1})=>n?(0,Z.jsx)(ae,{width:`100%`,overflow:`hidden`,children:(0,Z.jsx)(oe,{padding:0,children:(0,Z.jsx)(At,{rows:e,columns:t})})}):(0,Z.jsx)(At,{rows:e,columns:t}),Mt=(e,t,n=0)=>40+e*210+t*300+n*240,Nt=e=>({"& table":{width:`100%`,minWidth:`${e}px`,borderCollapse:`collapse`},"& th":{position:`sticky`,top:0,background:`var(--chakra-colors-bg-panel)`,borderBottom:`1px solid var(--chakra-colors-border)`,padding:`8px 12px`,textAlign:`left`,fontSize:`12px`,fontWeight:`600`,color:`var(--chakra-colors-fg-muted)`,whiteSpace:`nowrap`,zIndex:1},"& td":{borderBottom:`1px solid var(--chakra-colors-border-muted)`,padding:`12px`,verticalAlign:`top`,fontSize:`13px`},"& td:first-of-type":{minWidth:`40px`,width:`40px`},"& tr:hover td":{background:`var(--chakra-colors-bg-muted)`},"& td:hover .cell-action-btn":{opacity:1}}),Pt=e=>{if(e==null)return`string`;if(typeof e==`boolean`)return`boolean`;if(typeof e==`number`)return`number`;if(typeof e==`object`)return Array.isArray(e)&&e.length>0&&typeof e[0]==`object`&&e[0]!==null&&`role`in e[0]?`chat_messages`:`json`;if(typeof e==`string`){let t=e.trim();if(t===``)return`string`;if(T(t))return`image`;if(t===`true`||t===`false`)return`boolean`;if(/^-?\d+(\.\d+)?$/.test(t))return`number`}return`string`},Ft=Ge(),It=(e,t)=>{let n=[],r=new Map,i=new Map;for(let t of e)if(t.data){for(let e of t.data.datasetColumns)r.has(e.name)||r.set(e.name,e);for(let e of t.data.targetColumns)i.has(e.id)||i.set(e.id,e)}n.push(Ft.display({id:`rowNumber`,header:``,size:32,cell:({row:e})=>(0,Z.jsx)(l,{fontSize:`12px`,color:`fg.muted`,textAlign:`right`,paddingRight:1,children:e.original.index+1})}));for(let[i,a]of r)t.has(i)||n.push(Ft.accessor(e=>e.datasetEntries,{id:`dataset_${i}`,header:()=>(0,Z.jsxs)(z,{gap:1,children:[(0,Z.jsx)(Ke,{type:`string`}),(0,Z.jsx)(l,{fontSize:`13px`,fontWeight:`medium`,children:i})]}),size:210,minSize:150,cell:({row:t})=>{let n=e.filter(e=>e.data!==null).map(e=>{let n=t.original.datasetEntries[e.runId]?.[i];return{runId:e.runId,color:e.color,value:(0,Z.jsx)(kt,{value:n,columnName:i})}});return new Set(n.map(e=>{let n=t.original.datasetEntries[e.runId];return JSON.stringify(n?.[i])})).size===1&&n[0]?n[0].value:(0,Z.jsx)(Tt,{values:n})}}));for(let[t,r]of i)n.push(Ft.accessor(e=>e.targetsByRun,{id:`target_${t}`,header:()=>(0,Z.jsx)(l,{fontSize:`13px`,fontWeight:`medium`,children:r.name}),size:300,minSize:200,cell:({row:n})=>(0,Z.jsx)(Tt,{values:e.filter(e=>e.data!==null).map(e=>{let r=n.original.targetsByRun[e.runId]?.[t];return{runId:e.runId,color:e.color,isLoading:e.isLoading,value:r?(0,Z.jsx)(wt,{targetOutput:r}):(0,Z.jsx)(l,{fontSize:`13px`,color:`fg.subtle`,children:`-`})}})})}));return n},Lt=e=>{let t=Math.max(0,...e.filter(e=>e.data!==null).map(e=>e.data.rows.length)),n=[];for(let r=0;r<t;r++){let t={},i={},a={};for(let n of e){if(!n.data)continue;a[n.runId]=n.color;let e=n.data.rows[r];e&&(t[n.runId]=e.datasetEntry,i[n.runId]=e.targets)}n.push({index:r,datasetEntries:t,targetsByRun:i,runColors:a})}return n};function Rt({comparisonData:e,isLoading:t,hiddenColumns:n=new Set,disableVirtualization:r=!1}){let i=(0,X.useMemo)(()=>It(e,n),[e,n]),a=(0,X.useMemo)(()=>Lt(e),[e]),s=We({data:a,columns:i,getCoreRowModel:(0,X.useMemo)(()=>Ue(),[])}),[c,u]=(0,X.useState)(null),d=(0,X.useCallback)(e=>{u(e)},[]),f=a.length,p=U({count:f,getScrollElement:(0,X.useCallback)(()=>c,[c]),estimateSize:(0,X.useCallback)(()=>180,[]),overscan:5,enabled:!!c,measureElement:typeof window<`u`?e=>e?.getBoundingClientRect().height??180:void 0});if(t)return(0,Z.jsx)(jt,{});if(a.length===0)return(0,Z.jsx)(o,{padding:6,textAlign:`center`,children:(0,Z.jsx)(l,{color:`fg.muted`,children:`No results to display`})});let m=e.find(e=>e.data!==null),h=Nt(Mt(m?.data?.datasetColumns.filter(e=>!n.has(e.name)).length??0,m?.data?.targetColumns.length??0)),g=p.getVirtualItems(),_=p.getTotalSize(),v=s.getRowModel().rows,y=s.getAllColumns().length,b=g.length>0?g[0]?.start??0:0,x=g.length>0?_-(g[g.length-1]?.end??0):0;return(0,Z.jsx)(o,{ref:d,overflowX:`auto`,overflowY:`auto`,width:`100%`,height:`100%`,css:h,children:(0,Z.jsxs)(`table`,{children:[(0,Z.jsx)(`thead`,{children:s.getHeaderGroups().map(e=>(0,Z.jsx)(`tr`,{children:e.headers.map(e=>(0,Z.jsx)(`th`,{style:{width:e.getSize()},children:e.isPlaceholder?null:Y(e.column.columnDef.header,e.getContext())},e.id))},e.id))}),(0,Z.jsx)(`tbody`,{children:r?v.map(e=>(0,Z.jsx)(`tr`,{"data-index":e.index,children:e.getVisibleCells().map(e=>(0,Z.jsx)(`td`,{style:{width:e.column.getSize()},children:Y(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,Z.jsxs)(Z.Fragment,{children:[b>0&&(0,Z.jsx)(`tr`,{children:(0,Z.jsx)(`td`,{style:{height:`${b}px`,padding:0},colSpan:y})}),g.map(e=>{let t=v[e.index];return t?(0,Z.jsx)(`tr`,{"data-index":e.index,ref:p.measureElement,children:t.getVisibleCells().map(e=>(0,Z.jsx)(`td`,{style:{width:e.column.getSize()},children:Y(e.column.columnDef.cell,e.getContext())},e.id))},t.id):null}),x>0&&(0,Z.jsx)(`tr`,{children:(0,Z.jsx)(`td`,{style:{height:`${x}px`,padding:0},colSpan:y})})]})})]})})}var zt=140,Bt=(e,t)=>{if(t.winnerId===null)return{label:`Tie`,colorPalette:`gray`};let n=e.variants.find(e=>e.id===t.winnerId);return{label:n?.name??t.winnerId,colorPalette:n?`green`:`gray`}};function Vt({column:e,verdict:t,targetColors:n}){let r=(0,X.useRef)(null),[a,s]=(0,X.useState)(!1),[c,u]=(0,X.useState)({top:0,left:0,width:0}),d=(0,X.useCallback)(()=>{if(r.current){let e=r.current.getBoundingClientRect(),t=r.current.closest(`td`)?.getBoundingClientRect().width??e.width,n=Math.max(e.width,t)+24,i=window.innerWidth,a=e.left-12;a+n>i-32&&(a=i-n-32),u({top:e.top,left:a,width:n})}s(!0)},[]),f=(0,X.useCallback)(()=>s(!1),[]);if(!t)return(0,Z.jsx)(l,{fontSize:`13px`,color:`fg.subtle`,"data-testid":`comparison-winner-none`,children:`-`});let p=t.winnerId===null,m=Bt(e,t),h=t.reasoning?.trim(),g=t.winnerOutput?.trim(),_=t.winnerId?n?.[t.winnerId]:void 0,v=(0,Z.jsxs)(x,{colorPalette:m.colorPalette,size:`sm`,variant:`subtle`,"data-testid":`comparison-winner-badge-${t.winnerId??`tie`}`,children:[_&&(0,Z.jsx)(o,{width:`8px`,height:`8px`,borderRadius:`sm`,bg:_,flexShrink:0}),p?`Tie`:`Winner: ${m.label}`]}),y=(g?.length??0)+(h?.length??0),b=qe(`${g??``}\n\n${h??``}`)||y>400,S=e=>(0,Z.jsxs)(W,{align:`start`,gap:2,children:[(0,Z.jsx)(z,{gap:1.5,children:v}),g&&(0,Z.jsx)(o,{borderLeftWidth:`3px`,borderLeftColor:_??(p?`gray.subtle`:`green.subtle`),paddingLeft:2,paddingY:1,maxWidth:`100%`,children:(0,Z.jsx)(l,{fontSize:`12px`,color:`fg`,whiteSpace:`pre-wrap`,wordBreak:`break-word`,"data-testid":`comparison-winner-output`,children:g})}),h&&(0,Z.jsx)(l,{fontSize:`12px`,color:`fg.muted`,whiteSpace:`pre-wrap`,wordBreak:`break-word`,"data-testid":`comparison-winner-reasoning`,children:h}),e&&(0,Z.jsx)(l,{fontSize:`11px`,color:`fg.subtle`,alignSelf:`end`,children:`click outside to close`})]});return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(W,{ref:r,position:`relative`,align:`stretch`,gap:0,children:[(0,Z.jsx)(o,{maxHeight:`${zt}px`,overflow:`hidden`,cursor:b?`pointer`:`default`,onClick:b?d:void 0,children:S(!1)}),b&&(0,Z.jsx)(o,{position:`absolute`,bottom:0,left:`-12px`,right:`-12px`,height:`40px`,cursor:`pointer`,onClick:d,className:`cell-fade-overlay`,"data-testid":`comparison-winner-expand`,css:{background:`linear-gradient(to bottom, transparent, var(--chakra-colors-bg-panel))`,"tr:hover &":{background:`linear-gradient(to bottom, transparent, var(--chakra-colors-bg-muted))`}}})]}),a&&(0,Z.jsxs)(i,{children:[(0,Z.jsx)(o,{position:`fixed`,inset:0,zIndex:1e3,onClick:f,"data-testid":`comparison-winner-backdrop`}),(0,Z.jsx)(o,{position:`fixed`,top:`${c.top-12}px`,left:`${c.left}px`,width:`${Math.max(c.width,280)}px`,maxHeight:`calc(100vh - ${c.top-12}px - 32px)`,overflowY:`auto`,bg:`bg.panel/75`,backdropFilter:`blur(8px)`,borderRadius:`md`,boxShadow:`0 0 0 2px var(--chakra-colors-border-emphasized), 0 4px 12px rgba(0,0,0,0.15)`,zIndex:1001,padding:3,css:{animation:`scale-in 0.15s ease-out`},children:S(!0)})]})]})}var Ht=e=>e===null?`-`:`${Math.round(e)}%`,Ut=({aggregates:e})=>(0,Z.jsxs)(W,{align:`stretch`,gap:0,fontSize:`12px`,minWidth:`230px`,color:`fg`,children:[(0,Z.jsxs)(W,{align:`stretch`,gap:2,padding:2,children:[(0,Z.jsxs)(z,{justify:`space-between`,children:[(0,Z.jsx)(l,{color:`fg.muted`,children:`Rows`}),(0,Z.jsxs)(l,{fontWeight:`medium`,children:[e.completedRows,`/`,e.totalRows,e.errorRows>0&&(0,Z.jsxs)(l,{as:`span`,color:`red.300`,marginLeft:1,children:[`(`,e.errorRows,` `,e.errorRows===1?`error`:`errors`,`)`]})]})]}),e.overallPassRate!==null&&(0,Z.jsxs)(z,{justify:`space-between`,children:[(0,Z.jsx)(l,{color:`fg.muted`,children:`Pass Rate`}),(0,Z.jsxs)(z,{gap:1.5,children:[(0,Z.jsx)(_t,{passRate:e.overallPassRate}),(0,Z.jsx)(l,{fontWeight:`medium`,color:ht(e.overallPassRate),children:Ht(e.overallPassRate)})]})]}),e.overallAverageScore!==null&&(0,Z.jsxs)(z,{justify:`space-between`,children:[(0,Z.jsx)(l,{color:`fg.muted`,children:`Avg Score`}),(0,Z.jsx)(l,{fontWeight:`medium`,children:ot(e.overallAverageScore)})]}),e.latencyStats&&(0,Z.jsx)(S,{content:(0,Z.jsx)(at,{stats:e.latencyStats}),positioning:{placement:`right`},openDelay:100,interactive:!0,children:(0,Z.jsxs)(z,{justify:`space-between`,cursor:`pointer`,_hover:{bg:`bg.muted`},marginX:-2,paddingX:2,paddingY:.5,borderRadius:`md`,children:[(0,Z.jsx)(l,{color:`fg.muted`,children:`Avg Latency`}),(0,Z.jsxs)(z,{gap:1,children:[(0,Z.jsx)(j,{as:me,color:`fg.muted`,boxSize:3}),(0,Z.jsx)(l,{fontWeight:`medium`,children:rt(e.averageLatency)}),(0,Z.jsx)(j,{as:fe,boxSize:3,color:`fg.subtle`})]})]})}),e.costStats&&(0,Z.jsx)(S,{content:(0,Z.jsx)(st,{stats:e.costStats}),positioning:{placement:`right`},openDelay:100,interactive:!0,children:(0,Z.jsxs)(z,{justify:`space-between`,cursor:`pointer`,_hover:{bg:`bg.muted`},marginX:-2,paddingX:2,paddingY:.5,borderRadius:`md`,children:[(0,Z.jsx)(l,{color:`fg.muted`,children:`Total Cost`}),(0,Z.jsxs)(z,{gap:1,children:[(0,Z.jsx)(l,{fontWeight:`medium`,children:it(e.totalCost)}),(0,Z.jsx)(j,{as:fe,boxSize:3,color:`fg.subtle`})]})]})}),e.totalDuration!==null&&(0,Z.jsxs)(z,{justify:`space-between`,children:[(0,Z.jsx)(l,{color:`fg.muted`,children:`Execution Time`}),(0,Z.jsx)(l,{fontWeight:`medium`,children:rt(e.totalDuration)})]})]}),e.evaluators.length>0&&(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(o,{borderTopWidth:`1px`,borderColor:`border.emphasized`}),(0,Z.jsxs)(W,{align:`stretch`,gap:2,padding:2,children:[(0,Z.jsx)(l,{color:`fg`,fontWeight:`semibold`,children:`Evaluators`}),e.evaluators.map(e=>(0,Z.jsxs)(z,{justify:`space-between`,children:[(0,Z.jsx)(l,{color:`fg.muted`,truncate:!0,maxWidth:`150px`,children:e.evaluatorName}),(0,Z.jsxs)(z,{gap:2,children:[e.passRate!==null&&(0,Z.jsxs)(z,{gap:1,children:[(0,Z.jsx)(_t,{passRate:e.passRate,size:`8px`}),(0,Z.jsx)(l,{fontSize:`11px`,color:ht(e.passRate),children:Ht(e.passRate)})]}),e.averageScore!==null&&(0,Z.jsx)(l,{fontSize:`11px`,color:`fg.muted`,children:ot(e.averageScore)}),e.errors>0&&(0,Z.jsxs)(l,{fontSize:`11px`,color:`red.300`,children:[e.errors,` `,e.errors===1?`error`:`errors`]})]})]},e.evaluatorId))]})]})]}),Wt=(0,X.memo)(function({aggregates:e}){let t=e.completedRows>0||e.errorRows>0||e.totalCost!==null,{isOpen:n,handleMouseEnter:r,handleMouseLeave:i}=gt(150);return t?(0,Z.jsx)(S,{content:(0,Z.jsx)(Ut,{aggregates:e}),contentProps:{padding:0,onMouseEnter:r,onMouseLeave:i},positioning:{placement:`bottom`},open:n,interactive:!0,children:(0,Z.jsxs)(z,{gap:2,fontSize:`11px`,color:`fg.muted`,paddingX:2,paddingY:.5,borderRadius:`lg`,border:`1px solid`,borderColor:`border`,cursor:`default`,_hover:{borderColor:`border.emphasized`,bg:`bg.muted`},"data-testid":`target-summary-badge`,onMouseEnter:r,onMouseLeave:i,children:[(e.overallPassRate!==null||e.overallAverageScore!==null)&&(0,Z.jsx)(l,{fontWeight:`600`,children:`Score`}),e.overallPassRate!==null&&(0,Z.jsxs)(z,{gap:1,children:[(0,Z.jsx)(_t,{passRate:e.overallPassRate}),(0,Z.jsx)(l,{color:ht(e.overallPassRate),fontWeight:`medium`,children:Ht(e.overallPassRate)})]}),e.overallAverageScore!==null&&(0,Z.jsxs)(z,{gap:1,children:[(0,Z.jsx)(ye,{}),(0,Z.jsx)(l,{color:`fg.muted`,children:ot(e.overallAverageScore)})]}),e.averageLatency!==null&&(0,Z.jsxs)(z,{gap:1,children:[(0,Z.jsx)(me,{size:12}),(0,Z.jsx)(l,{fontWeight:`medium`,children:rt(e.averageLatency)})]}),e.totalCost!==null&&e.overallPassRate===null&&e.overallAverageScore===null&&(0,Z.jsx)(z,{gap:1,children:(0,Z.jsx)(l,{color:`fg.muted`,children:it(e.totalCost)})}),e.errorRows>0&&(0,Z.jsxs)(l,{color:`red.500`,fontWeight:`medium`,children:[e.errorRows,` `,e.errorRows===1?`error`:`errors`]})]})}):null}),Gt=(0,X.memo)(function({target:e,aggregates:t,colorIndicator:n}){return(0,Z.jsxs)(z,{gap:2,width:`full`,children:[(0,Z.jsxs)(z,{gap:2,flex:1,minWidth:0,children:[n&&(0,Z.jsx)(o,{width:`10px`,height:`10px`,borderRadius:`sm`,bg:n,flexShrink:0}),(0,Z.jsx)(le,{color:e.type===`prompt`?`green.emphasized`:e.type===`agent`?`cyan.emphasized`:e.type===`evaluator`?`green.emphasized`:`gray.emphasized`,size:`xs`,icon:e.type===`prompt`?(0,Z.jsx)(be,{size:12}):e.type===`agent`?(0,Z.jsx)(ge,{size:12}):e.type===`evaluator`?(0,Z.jsx)(xe,{size:12}):(0,Z.jsx)(be,{size:12})}),(0,Z.jsx)(l,{fontSize:`13px`,fontWeight:`medium`,truncate:!0,children:e.name})]}),t&&(0,Z.jsx)(Wt,{aggregates:t})]})}),Kt=(e,t)=>{if(e.length===0)return 0;let n=t/100*(e.length-1),r=Math.floor(n),i=Math.ceil(n);return r===i?e[r]:e[r]+(e[i]-e[r])*(n-r)},qt=e=>{if(e.length===0)return null;let t=[...e].sort((e,t)=>e-t),n=e.reduce((e,t)=>e+t,0);return{min:t[0],max:t[t.length-1],avg:n/e.length,median:Kt(t,50),p75:Kt(t,75),p90:Kt(t,90),p95:Kt(t,95),p99:Kt(t,99),total:n,count:e.length}},Jt=(e,t)=>{let n=e.id,r=0,i=0,a=[],o=[],s=new Map;for(let e of t){let t=e.targets[n];if(!t)continue;let c=t.output!==null,l=!!t.error,u=t.evaluatorResults.length>0;(c||l||u)&&r++,l&&i++,t.cost!==null&&a.push(t.cost),t.duration!==null&&o.push(t.duration);for(let e of t.evaluatorResults){let t=s.get(e.evaluatorId);t||(t={name:e.evaluatorName,total:0,passed:0,failed:0,errors:0,scoreSum:0,scoreCount:0,passFailCount:0},s.set(e.evaluatorId,t)),t.total++,e.status===`error`?t.errors++:e.passed===!0?(t.passed++,t.passFailCount++):e.passed===!1&&(t.failed++,t.passFailCount++),e.score!==null&&e.score!==void 0&&(t.scoreSum+=e.score,t.scoreCount++)}}let c=qt(o),l=qt(a),u=Array.from(s.entries()).map(([e,t])=>({evaluatorId:e,evaluatorName:t.name,total:t.total,passed:t.passed,failed:t.failed,errors:t.errors,passRate:t.passFailCount>0?t.passed/t.passFailCount*100:null,averageScore:t.scoreCount>0?t.scoreSum/t.scoreCount:null})),d=u.reduce((e,t)=>e+t.passed+t.failed,0),f=u.reduce((e,t)=>e+t.passed,0),p=d>0?f/d*100:null,m=u.filter(e=>e.averageScore!==null),h=m.length>0?m.reduce((e,t)=>e+(t.averageScore??0),0)/m.length:null;return{targetId:n,completedRows:r,totalRows:t.length,errorRows:i,evaluators:u,overallPassRate:p,overallAverageScore:h,averageCost:l?.avg??null,totalCost:l?.total??null,averageLatency:c?.avg??null,totalDuration:c?.total??null,latencyStats:c,costStats:l}},Yt=e=>{let t=new Map;for(let n of e.targetColumns)t.set(n.id,Jt(n,e.rows));return t},Xt=Ge(),Zt=(e,t,n,r,i,a,o)=>{let s=new Set(n.map(e=>e.evaluatorId)),c=[];c.push(Xt.display({id:`rowNumber`,header:``,size:32,cell:({row:e})=>(0,Z.jsx)(l,{fontSize:`12px`,color:`fg.muted`,textAlign:`right`,paddingRight:1,children:e.index+1})}));for(let t of e){if(a.has(t.name))continue;let e=`string`;for(let n of i){let r=n.datasetEntry[t.name];if(r!=null){e=Pt(r);break}}c.push(Xt.accessor(e=>e.datasetEntry[t.name],{id:`dataset_${t.name}`,header:()=>(0,Z.jsxs)(z,{gap:1,children:[(0,Z.jsx)(Ke,{type:e}),(0,Z.jsx)(l,{fontSize:`13px`,fontWeight:`medium`,children:t.name})]}),size:210,minSize:150,cell:({getValue:e})=>{let n=e();if(typeof n==`string`){let e=T(n);if(e)return(0,Z.jsx)(D,{src:e,minWidth:`24px`,minHeight:`24px`,maxHeight:`80px`,maxWidth:`100%`,expandable:!0})}return(0,Z.jsx)(kt,{value:n,columnName:t.name})}}))}let u=new Map(n.map(e=>[e.evaluatorId,e]));for(let e of t){let t=r.get(e.id)??null,n=o?.[e.id],i=u.get(e.id);c.push(Xt.accessor(t=>t.targets[e.id],{id:`target_${e.id}`,header:()=>(0,Z.jsx)(Gt,{target:e,aggregates:t,colorIndicator:n}),size:300,minSize:200,cell:({getValue:e,row:t})=>{let n=e();return i?(0,Z.jsx)(Vt,{column:i,verdict:i.verdictsByRow[t.original.index],targetColors:o}):n?(0,Z.jsx)(wt,{targetOutput:n,suppressedEvaluatorIds:s}):(0,Z.jsx)(l,{fontSize:`13px`,color:`fg.subtle`,children:`-`})}}))}for(let e of Qt(n,t))c.push(Xt.display({id:`comparison_${e.evaluatorId}`,header:()=>(0,Z.jsxs)(z,{gap:1.5,children:[(0,Z.jsx)(q,{size:14}),(0,Z.jsx)(l,{fontSize:`12px`,fontWeight:`600`,children:e.name})]}),size:240,minSize:200,cell:({row:t})=>(0,Z.jsx)(Vt,{column:e,verdict:e.verdictsByRow[t.original.index],targetColors:o})}));return c},Qt=(e,t)=>{let n=new Set(t.map(e=>e.id));return e.filter(e=>!n.has(e.evaluatorId))};function $t({data:e,isLoading:t,hiddenColumns:n=new Set,targetColors:r={},disableVirtualization:i=!1}){let a=Object.keys(r).length>0,s=(0,X.useMemo)(()=>e?Yt(e):new Map,[e]),c=(0,X.useMemo)(()=>e?Zt(e.datasetColumns,e.targetColumns,e.comparisonColumns??[],s,e.rows,n,a?r:void 0):[],[e,s,n,a,r]),u=(0,X.useMemo)(()=>Ue(),[]),d=We({data:e?.rows??[],columns:c,getCoreRowModel:u}),[f,p]=(0,X.useState)(null),m=(0,X.useCallback)(e=>{p(e)},[]),h=U({count:e?.rows?.length??0,getScrollElement:(0,X.useCallback)(()=>f,[f]),estimateSize:(0,X.useCallback)(()=>180,[]),overscan:10,enabled:!!f,measureElement:typeof window<`u`?e=>e?.getBoundingClientRect().height??180:void 0});if(t)return(0,Z.jsx)(jt,{});if(!e||e.rows.length===0)return(0,Z.jsx)(o,{padding:6,textAlign:`center`,children:(0,Z.jsx)(l,{color:`fg.muted`,children:`No results to display`})});let g=e.datasetColumns.filter(e=>!n.has(e.name)).length,_=e.targetColumns.length,v=Qt(e.comparisonColumns??[],e.targetColumns).length,y=Nt(Mt(g,_,v)),b=h.getVirtualItems(),x=h.getTotalSize(),S=d.getRowModel().rows,C=d.getAllColumns().length,w=b.length>0?b[0]?.start??0:0,T=b.length>0?x-(b[b.length-1]?.end??0):0;return(0,Z.jsx)(o,{ref:m,overflowX:`auto`,overflowY:`auto`,width:`100%`,height:`100%`,css:y,children:(0,Z.jsxs)(`table`,{children:[(0,Z.jsx)(`thead`,{children:d.getHeaderGroups().map(e=>(0,Z.jsx)(`tr`,{children:e.headers.map(e=>(0,Z.jsx)(`th`,{style:{width:`${e.getSize()}px`},children:e.isPlaceholder?null:Y(e.column.columnDef.header,e.getContext())},e.id))},e.id))}),(0,Z.jsx)(`tbody`,{children:i?S.map(e=>(0,Z.jsx)(`tr`,{"data-index":e.index,children:e.getVisibleCells().map(e=>(0,Z.jsx)(`td`,{style:{width:e.column.getSize()},children:Y(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,Z.jsxs)(Z.Fragment,{children:[w>0&&(0,Z.jsx)(`tr`,{children:(0,Z.jsx)(`td`,{style:{height:`${w}px`,padding:0},colSpan:C})}),b.map(e=>{let t=S[e.index];return t?(0,Z.jsx)(`tr`,{"data-index":e.index,ref:h.measureElement,children:t.getVisibleCells().map(e=>(0,Z.jsx)(`td`,{style:{width:e.column.getSize()},children:Y(e.column.columnDef.cell,e.getContext())},e.id))},t.id):null}),T>0&&(0,Z.jsx)(`tr`,{children:(0,Z.jsx)(`td`,{style:{height:`${T}px`,padding:0},colSpan:C})})]})})]})})}var en=new Set([`id`,`_id`,`ID`,`Id`]),tn=({datasetColumns:e,hiddenColumns:t,onToggle:n})=>(0,Z.jsxs)(p,{children:[(0,Z.jsx)(_,{asChild:!0,children:(0,Z.jsxs)(r,{size:`sm`,variant:`outline`,"aria-label":`Toggle column visibility`,children:[(0,Z.jsx)(G,{size:16}),`Columns`]})}),(0,Z.jsxs)(d,{width:`200px`,children:[(0,Z.jsx)(m,{}),(0,Z.jsx)(f,{children:e.map(e=>(0,Z.jsx)(z,{paddingY:1,children:(0,Z.jsx)(w,{checked:!t.has(e.name),onCheckedChange:()=>n(e.name),children:(0,Z.jsx)(l,{fontSize:`sm`,children:e.name})})},e.name))})]})]});function nn({data:e,isLoading:t,hiddenColumns:n=new Set,comparisonData:r,targetColors:i={},disableVirtualization:a=!1}){return r&&r.length>1?(0,Z.jsx)(Rt,{comparisonData:r,isLoading:t,hiddenColumns:n,disableVirtualization:a}):(0,Z.jsx)($t,{data:e,isLoading:t,hiddenColumns:n,targetColors:i,disableVirtualization:a})}var rn=` · `;function an({commitMessage:e,runId:t,index:n}){return e||(t?`Run #${n+1}${rn}${t}`:`Run #${n+1}`)}function on({commitMessage:e,runId:t,index:n}){return e?(0,Z.jsx)(Z.Fragment,{children:e}):(0,Z.jsxs)(l,{as:`span`,children:[`Run #${n+1}`,(0,Z.jsx)(l,{as:`span`,color:`fg.muted`,title:t,children:`${rn}${t}`})]})}var sn=300*1e3,cn=e=>!!((e.finishedAt??e.stoppedAt)||e.updatedAt&&Date.now()-e.updatedAt>3e5),ln=e=>e.finishedAt??e.stoppedAt?!1:e.updatedAt?Date.now()-e.updatedAt>sn:!1,un=(e,t=!1)=>{if(e.averagePassed!==void 0&&e.averagePassed!==null){let n=Math.round(e.averagePassed*100);return t?`${n}%`:`${n}% passed`}if(e.averageScore!==void 0&&e.averageScore!==null){let n=e.averageScore.toFixed(2);return t?n:`avg ${n}`}return`-`};function dn({runs:e,selectedRunId:t,onSelectRun:i,isLoading:a,error:s,size:u=`md`,compareMode:d=!1,onToggleCompareMode:f,selectedRunIds:p=[],onToggleRunSelection:m,onEnterCompareWithRuns:h,runColors:_={}}){let v=e.length>=2,{sortedRuns:y,chronologicalIndexMap:b}=(0,X.useMemo)(()=>{let t=[...e].sort((e,t)=>t.timestamps.createdAt-e.timestamps.createdAt),n=[...e].sort((e,t)=>e.timestamps.createdAt-t.timestamps.createdAt),r=new Map;return n.forEach((e,t)=>void r.set(e.runId,t)),{sortedRuns:t,chronologicalIndexMap:r}},[e]),x=(e,n)=>{n.shiftKey&&(n.preventDefault(),window.getSelection()?.removeAllRanges()),d&&m?m(e):n.shiftKey&&t&&h&&e!==t?h(t,e):i(e)};return(0,Z.jsxs)(W,{align:`stretch`,paddingY:2,fontSize:`14px`,minWidth:u===`sm`?`220px`:`260px`,maxWidth:u===`sm`?`220px`:`260px`,height:`full`,gap:0,overflowY:`auto`,children:[(0,Z.jsxs)(z,{paddingX:3,paddingBottom:2,justify:`space-between`,align:`center`,children:[(0,Z.jsx)(l,{fontSize:`sm`,fontWeight:`semibold`,color:`fg`,children:`Experiment Runs`}),f&&(d?(0,Z.jsxs)(r,{size:`xs`,variant:`outline`,onClick:f,"data-testid":`exit-compare-button`,children:[(0,Z.jsx)(Ae,{size:14}),`Exit`]}):(0,Z.jsx)(S,{content:v?`Compare runs (or Shift+click another run)`:`Need at least 2 runs to compare`,positioning:{placement:`right`},children:(0,Z.jsxs)(r,{size:`xs`,variant:`outline`,onClick:f,disabled:!v,"data-testid":`compare-button`,children:[(0,Z.jsx)(K,{size:14}),`Compare`]})}))]}),a&&(0,Z.jsx)(W,{gap:.5,align:`stretch`,paddingX:2,children:Array.from({length:6}).map((e,t)=>(0,Z.jsx)(z,{paddingX:2,paddingY:2,gap:2,children:(0,Z.jsxs)(W,{align:`start`,gap:1,flex:1,minWidth:0,children:[(0,Z.jsxs)(z,{gap:1,width:`100%`,children:[(0,Z.jsx)(c,{width:`10px`,height:`10px`,borderRadius:`sm`}),(0,Z.jsx)(c,{height:`13px`,width:`calc(100% - 14px)`})]}),(0,Z.jsx)(c,{height:`12px`,width:`full`})]})},t))}),s&&(0,Z.jsx)(o,{paddingX:2,children:(0,Z.jsxs)(ie,{status:`error`,children:[(0,Z.jsx)(F,{}),s]})}),!a&&!s&&e.length===0&&(0,Z.jsx)(l,{paddingX:3,paddingY:4,color:`fg.muted`,fontSize:`sm`,children:`No runs yet`}),(0,Z.jsx)(W,{gap:.5,align:`stretch`,paddingX:2,children:!a&&!s&&y.map(e=>{let r=t===e.runId,i=cn(e.timestamps);(e.summary.datasetCost??0)+(e.summary.evaluationsCost??0);let a=b.get(e.runId)??0,s=an({commitMessage:e.workflowVersion?.commitMessage,runId:e.runId,index:a}),c=[];Object.values(e.summary.evaluations).slice(0,2).forEach(e=>{let t=un(e,!0);t!==`-`&&c.push(t)});let u=p.includes(e.runId),f=ln(e.timestamps),h=e.timestamps.stoppedAt?`red.400`:f?`orange.400`:_[e.runId]??g(`colors`,e.runId).color;return(0,Z.jsxs)(z,{paddingX:2,paddingY:2,cursor:`pointer`,role:`button`,bg:d&&u||r?`blue.subtle`:`transparent`,color:d&&u||r?`blue.fg`:`fg`,borderRadius:`md`,_hover:{bg:d&&u||r?`blue.muted`:`bg.muted`},onClick:t=>x(e.runId,t),gap:2,"data-testid":`run-item-${e.runId}`,children:[d&&m&&(0,Z.jsxs)(k,{size:`sm`,checked:u,onCheckedChange:()=>m(e.runId),onClick:e=>e.stopPropagation(),"data-testid":`run-checkbox-${e.runId}`,children:[(0,Z.jsx)(A,{}),(0,Z.jsx)(O,{})]}),(0,Z.jsxs)(W,{align:`start`,gap:0,flex:1,minWidth:0,children:[(0,Z.jsxs)(z,{gap:1,width:`100%`,children:[(0,Z.jsx)(S,{content:s,positioning:{placement:`top`},openDelay:500,children:(0,Z.jsxs)(z,{gap:1,flex:1,minWidth:0,width:`100%`,children:[(0,Z.jsx)(o,{width:`10px`,height:`10px`,borderRadius:`sm`,bg:h,flexShrink:0}),(0,Z.jsx)(l,{fontSize:`13px`,fontWeight:`medium`,lineClamp:1,wordBreak:`break-all`,flex:1,minWidth:0,children:(0,Z.jsx)(on,{commitMessage:e.workflowVersion?.commitMessage,runId:e.runId,index:a})})]})}),e.workflowVersion?.version&&(0,Z.jsxs)(l,{fontSize:`10px`,fontWeight:`600`,color:`fg.muted`,flexShrink:0,children:[`v`,e.workflowVersion.version]}),!i&&(0,Z.jsx)(n,{size:`xs`,color:`blue.500`,flexShrink:0})]}),(0,Z.jsxs)(l,{color:`fg.muted`,fontSize:`12px`,children:[e.timestamps.createdAt?Ne(e.timestamps.createdAt):`...`,e.timestamps.stoppedAt&&` · stopped`,f&&` · interrupted`]})]})]},e.runId)})})]})}var fn=3,pn=14,mn=16,hn=-35,gn=72,_n=25,vn=200,yn=150,Q=(e,t=pn)=>e.length<=t?e:e.slice(0,t-1)+`…`,bn=e=>{let t=e>=fn;return{angle:t?hn:0,textAnchor:t?`end`:`middle`,height:t?gn:_n,maxLabelLength:t?mn:pn}},xn=e=>e>=fn?vn:yn,Sn=[`#22C55E`,`#8B5CF6`,`#0EA5E9`,`#F59E0B`,`#EC4899`,`#14B8A6`,`#6366F1`,`#84CC16`],Cn=`#94A3B8`;function wn({column:e,chartHeight:t,targetColors:n}){let r=Object.values(e.verdictsByRow),i=new Map,a=0;for(let e of r){if(e.winnerId===null){a+=1;continue}i.set(e.winnerId,(i.get(e.winnerId)??0)+1)}let s=bn(e.variants.length+1),c=e=>Q(e,s.maxLabelLength),u=nt(e.variants.map(e=>c(e.name))),d=nt(e.variants.map(e=>e.name)),f=[...e.variants.map((e,t)=>({key:e.id??`variant-${t}`,name:u[t]??c(e.name),fullName:d[t]??e.name,wins:e.id?i.get(e.id)??0:0,color:(e.id?n?.[e.id]:void 0)??Sn[t%Sn.length]})),{key:`tie`,name:`Tie`,fullName:`Tie`,wins:a,color:Cn}],p=Math.max(1,...f.map(e=>e.wins));return(0,Z.jsxs)(o,{minWidth:`280px`,width:`280px`,flexShrink:0,bg:`bg.subtle`,border:`1px solid`,borderColor:`border`,borderRadius:`md`,padding:3,paddingBottom:1,"data-testid":`chart-comparison-${e.evaluatorId}`,children:[(0,Z.jsxs)(l,{fontSize:`xs`,fontWeight:`medium`,marginBottom:2,lineClamp:1,title:`${e.name} — win rate`,children:[e.name,` — win rate`]}),(0,Z.jsx)(Ve,{width:`100%`,height:t,children:(0,Z.jsxs)(ct,{data:f,margin:{left:10,right:10},children:[(0,Z.jsx)(Be,{horizontal:!0,vertical:!1,stroke:`var(--chakra-colors-border)`,strokeDasharray:`0`}),(0,Z.jsx)(ze,{dataKey:`name`,interval:0,axisLine:!1,tickLine:!1,angle:s.angle,textAnchor:s.textAnchor,height:s.height,style:{fontSize:`11px`},tick:{fill:`var(--chakra-colors-fg-muted)`}}),(0,Z.jsx)(He,{allowDecimals:!1,domain:[0,p],style:{fontSize:`11px`},tick:{fill:`var(--chakra-colors-fg-muted)`},width:22}),(0,Z.jsx)(Re,{cursor:{fill:`var(--chakra-colors-bg-muted)`},contentStyle:{background:`var(--chakra-colors-bg-panel)`,border:`1px solid var(--chakra-colors-border)`,borderRadius:6,fontSize:12},formatter:e=>[`${e}`,`Wins`],labelFormatter:(e,t)=>t?.[0]?.payload?.fullName??e}),(0,Z.jsxs)(lt,{dataKey:`wins`,name:`Wins`,radius:[4,4,0,0],children:[(0,Z.jsx)(Le,{dataKey:`wins`,position:`top`,style:{fontSize:11,fill:`var(--chakra-colors-fg)`}}),f.map(e=>(0,Z.jsx)(ut,{fill:e.color},e.key))]})]})})]})}var $=[`#3b82f6`,`#dd6b20`,`#38a169`,`#d53f8c`,`#805ad5`,`#e53e3e`,`#319795`,`#718096`],Tn=({projectId:e,experimentId:t,runIds:n,enabled:r=!0,refetchInterval:i=!1,runColorMap:a={}})=>{let o=[J.experiments.getExperimentBatchEvaluationRun.useQuery({projectId:e,experimentId:t,runId:n[0]??``},{enabled:r&&!!n[0],refetchInterval:i}),J.experiments.getExperimentBatchEvaluationRun.useQuery({projectId:e,experimentId:t,runId:n[1]??``},{enabled:r&&!!n[1],refetchInterval:i}),J.experiments.getExperimentBatchEvaluationRun.useQuery({projectId:e,experimentId:t,runId:n[2]??``},{enabled:r&&!!n[2],refetchInterval:i}),J.experiments.getExperimentBatchEvaluationRun.useQuery({projectId:e,experimentId:t,runId:n[3]??``},{enabled:r&&!!n[3],refetchInterval:i}),J.experiments.getExperimentBatchEvaluationRun.useQuery({projectId:e,experimentId:t,runId:n[4]??``},{enabled:r&&!!n[4],refetchInterval:i}),J.experiments.getExperimentBatchEvaluationRun.useQuery({projectId:e,experimentId:t,runId:n[5]??``},{enabled:r&&!!n[5],refetchInterval:i}),J.experiments.getExperimentBatchEvaluationRun.useQuery({projectId:e,experimentId:t,runId:n[6]??``},{enabled:r&&!!n[6],refetchInterval:i}),J.experiments.getExperimentBatchEvaluationRun.useQuery({projectId:e,experimentId:t,runId:n[7]??``},{enabled:r&&!!n[7],refetchInterval:i})],s=(0,X.useMemo)(()=>n.slice(0,8).map((e,t)=>({runId:e,color:a[e]??$[t%$.length],data:o[t]?.data??null,isLoading:o[t]?.isLoading??!1,error:o[t]?.error??null})),[n,o,a]);return{runs:s,isLoading:s.some(e=>e.isLoading),isAllLoaded:s.every(e=>!e.isLoading&&e.data!==null),hasError:s.some(e=>e.error!==null)}},En=e=>e===0?`$0`:e<1e-4?`$${e.toExponential(2)}`:`$${e.toFixed(4).replace(/\.?0+$/,``)}`,Dn=e=>e<1?`${e.toFixed(2)}ms`:e<1e3?`${Math.round(e)}ms`:`${(e/1e3).toFixed(2)}s`,On=(e,t,n=35,r=80)=>{if(e.length===0)return n;let i=Math.max(...e.map(e=>t(e).length))*7+12;return Math.max(n,Math.min(r,i))},kn=(e,t)=>{let n=0,r=0,i=0,a={};for(let o of e){let e=o.targets[t];if(e){e.cost&&(n+=e.cost),e.duration&&(r+=e.duration,i++);for(let t of e.evaluatorResults){a[t.evaluatorId]||(a[t.evaluatorId]={scores:[],passed:0,failed:0,total:0,name:t.evaluatorName});let e=a[t.evaluatorId];e.total++,t.score!==null&&t.score!==void 0&&e.scores.push(t.score),t.passed===!0?e.passed++:t.passed===!1&&e.failed++}}}let o=i>0?r/i:0,s={},c={},l={};for(let[e,t]of Object.entries(a))l[e]=t.name,t.scores.length>0&&(s[e]=t.scores.reduce((e,t)=>e+t,0)/t.scores.length),t.passed+t.failed>0&&(c[e]=t.passed/(t.passed+t.failed));return{totalCost:n,avgLatency:o,avgScores:s,passRates:c,evaluatorNames:l}},An=e=>{let t=0,n=0,r=0,i={};for(let a of e.rows)for(let[,e]of Object.entries(a.targets)){e.cost&&(t+=e.cost),e.duration&&(n+=e.duration,r++);for(let t of e.evaluatorResults){i[t.evaluatorId]||(i[t.evaluatorId]={scores:[],passed:0,failed:0,total:0,name:t.evaluatorName});let e=i[t.evaluatorId];e.total++,t.score!==null&&t.score!==void 0&&e.scores.push(t.score),t.passed===!0?e.passed++:t.passed===!1&&e.failed++}}let a=r>0?n/r:0,o={},s={},c={};for(let[e,t]of Object.entries(i))c[e]=t.name,t.scores.length>0&&(o[e]=t.scores.reduce((e,t)=>e+t,0)/t.scores.length),t.passed+t.failed>0&&(s[e]=t.passed/(t.passed+t.failed));return{totalCost:t,avgLatency:a,avgScores:o,passRates:s,evaluatorNames:c}},jn=({comparisonData:e,isVisible:t,onVisibilityChange:n,defaultVisible:a,promptNames:s={},visibleMetrics:c,onVisibleMetricsChange:u,xAxisOption:d,onXAxisOptionChange:f,onTargetColorsChange:p,comparisonColumns:m})=>{let h=(0,X.useMemo)(()=>new Set((m??[]).map(e=>e.evaluatorId)),[m]),[g,_]=(0,X.useState)((0,X.useMemo)(()=>a===void 0?(e[0]?.data?.targetColumns.length??0)>=2:a,[e,a])),v=t??g,y=(0,X.useMemo)(()=>{if(e.length>=2)return`runs`;let t=e[0]?.data?.targetColumns??[],n=t.some(e=>e.type!==`evaluator`&&!e.id.startsWith(`_eval_`));return t.length>=2&&n?`target`:`runs`},[e]),[b,x]=(0,X.useState)(y),S=d??b,C=e=>{f?f(e):x(e)};(0,X.useEffect)(()=>{C(y)},[y]);let[w,T]=(0,X.useState)(()=>new Set([`cost`,`latency`])),[E,D]=(0,X.useState)(!1),[O,k]=(0,X.useState)(!1),A=(0,X.useRef)(null),j=(0,X.useRef)(null),[M,ee]=(0,X.useState)(null),[N,P]=(0,X.useState)(null),te=()=>{ee(A.current?.getBoundingClientRect()??null),D(!0)},ne=()=>{P(j.current?.getBoundingClientRect()??null),k(!0)},re=()=>{D(!1),A.current?.focus()},ie=()=>{k(!1),j.current?.focus()},F=c??w,ae=e=>{u?u(e):T(e)},oe=e=>{let t=new Set(F);t.has(e)?t.delete(e):t.add(e),ae(t)},I=(0,X.useMemo)(()=>e.filter(e=>e.data!==null).map(e=>({runId:e.runId,runName:e.runName,color:e.color,createdAt:e.data.createdAt,metrics:An(e.data),metadata:e.data.targetColumns[0]?.metadata??{},targetColumns:e.data.targetColumns,rows:e.data.rows})).sort((e,t)=>e.createdAt-t.createdAt),[e]),L=(0,X.useMemo)(()=>{let e={},t=new Set,n=0;for(let r of I)for(let i of r.targetColumns)t.has(i.id)||(t.add(i.id),e[i.id]=$[n%$.length],n++);return e},[I]),R=(0,X.useRef)(null);(0,X.useEffect)(()=>{if(!p)return;let e=v&&S===`target`?L:{},t=R.current;JSON.stringify(t??{})!==JSON.stringify(e)&&(R.current=e,p(e))},[v,S,L,p]);let B=(0,X.useMemo)(()=>{if(S===`runs`)return I.map(e=>({name:e.runName,color:e.color,cost:e.metrics.totalCost,latency:e.metrics.avgLatency,...Object.fromEntries(Object.entries(e.metrics.avgScores).map(([e,t])=>[`score_${e}`,t])),...Object.fromEntries(Object.entries(e.metrics.passRates).map(([e,t])=>[`pass_${e}`,t]))}));if(S===`target`){let e=new Map;for(let t of I)for(let n of t.targetColumns){if(h.has(n.id))continue;let r=kn(t.rows,n.id),i=e.get(n.id)??{name:n.name,costs:[],latencies:[],scores:{},passRates:{}};i.costs.push(r.totalCost),r.avgLatency>0&&i.latencies.push(r.avgLatency);for(let[e,t]of Object.entries(r.avgScores))i.scores[e]||(i.scores[e]=[]),i.scores[e].push(t);for(let[e,t]of Object.entries(r.passRates))i.passRates[e]||(i.passRates[e]=[]),i.passRates[e].push(t);e.set(n.id,i)}return Array.from(e.entries()).map(([e,t],n)=>({name:t.name,color:L[e]??$[n%$.length],cost:t.costs.reduce((e,t)=>e+t,0)/(t.costs.length||1),latency:t.latencies.reduce((e,t)=>e+t,0)/(t.latencies.length||1),...Object.fromEntries(Object.entries(t.scores).map(([e,t])=>[`score_${e}`,t.reduce((e,t)=>e+t,0)/t.length])),...Object.fromEntries(Object.entries(t.passRates).map(([e,t])=>[`pass_${e}`,t.reduce((e,t)=>e+t,0)/t.length]))}))}let e=new Map,t=e=>{if(S===`model`)return e.model?e.model:e.metadata?.model?String(e.metadata.model):void 0;if(S===`prompt`){if(!e.promptId){if(e.metadata?.prompt_id){let t=e.promptVersion??e.metadata?.version;return t==null?String(e.metadata.prompt_id):`${e.metadata.prompt_id}::v${t}`}return}let t=e.promptVersion;return t==null?e.promptId:`${e.promptId}::v${t}`}if(e.metadata?.[S]!==void 0)return String(e.metadata[S])},n=(e,t)=>{if(S===`prompt`){let[n,r]=e.split(`::`),i=s[n??``]??t.name??n??e;return r?`${i} (${r})`:i}return e};for(let r of I)for(let i of r.targetColumns){let a=t(i);if(!a)continue;let o=kn(r.rows,i.id),s=e.get(a)??{displayName:n(a,i),costs:[],latencies:[],scores:{},passRates:{}};s.costs.push(o.totalCost),o.avgLatency>0&&s.latencies.push(o.avgLatency);for(let[e,t]of Object.entries(o.avgScores))s.scores[e]||(s.scores[e]=[]),s.scores[e].push(t);for(let[e,t]of Object.entries(o.passRates))s.passRates[e]||(s.passRates[e]=[]),s.passRates[e].push(t);e.set(a,s)}return Array.from(e.entries()).map(([e,t],n)=>({name:t.displayName,color:$[n%$.length],cost:t.costs.reduce((e,t)=>e+t,0)/(t.costs.length||1),latency:t.latencies.reduce((e,t)=>e+t,0)/(t.latencies.length||1),...Object.fromEntries(Object.entries(t.scores).map(([e,t])=>[`score_${e}`,t.reduce((e,t)=>e+t,0)/t.length])),...Object.fromEntries(Object.entries(t.passRates).map(([e,t])=>[`pass_${e}`,t.reduce((e,t)=>e+t,0)/t.length]))}))},[I,S,s,h]),V=(0,X.useMemo)(()=>{let e=B.map(e=>e.cost??0),t=B.map(e=>e.latency??0);return{cost:On(e,En),latency:On(t,Dn)}},[B]),H=bn(B.length),U=xn(Math.max(B.length,...(m??[]).map(e=>e.variants.length+1))),G=(0,X.useMemo)(()=>{let e=[],t=new Set;for(let n of I)for(let r of Object.keys(n.metrics.avgScores))h.has(r)||t.has(r)||(t.add(r),e.push({id:r,name:n.metrics.evaluatorNames[r]??r}));return e},[I,h]),K=(0,X.useMemo)(()=>{let e=[],t=new Set;for(let n of I)for(let r of Object.keys(n.metrics.passRates))t.has(r)||(t.add(r),e.push({id:r,name:n.metrics.evaluatorNames[r]??r}));return e},[I]),q=(0,X.useMemo)(()=>{let e=[{id:`cost`,name:`Total Cost`,type:`cost`},{id:`latency`,name:`Avg Latency`,type:`latency`}];for(let t of G)e.push({id:`score_${t.id}`,name:`${t.name} (Score)`,type:`score`,evaluatorId:t.id});for(let t of K)e.push({id:`pass_${t.id}`,name:`${t.name} (Pass Rate)`,type:`passRate`,evaluatorId:t.id});for(let t of m??[])e.push({id:`comparison_${t.evaluatorId}`,name:`${t.name} (Win Rate)`,type:`comparison`,evaluatorId:t.evaluatorId});return e},[G,K,m]);(0,X.useEffect)(()=>{q.length>0&&w.size<=2&&T(new Set(q.map(e=>e.id)))},[q]);let se=(0,X.useMemo)(()=>{let e=[{value:`runs`,label:`Runs`}];(I[0]?.targetColumns?.length??0)>=2&&e.push({value:`target`,label:`Target`});let t=!1,n=!1,r=new Set;for(let e of I)for(let i of e.targetColumns)if(i.model&&(t=!0),i.promptId&&(n=!0),i.metadata)for(let e of Object.keys(i.metadata))e===`model`?t=!0:e===`prompt_id`||e===`prompt`?n=!0:e!==`version`&&r.add(e);t&&e.push({value:`model`,label:`Model`}),n&&e.push({value:`prompt`,label:`Prompt`});for(let t of r)e.push({value:t,label:t});return e},[I]),J=I[0]?.targetColumns?.length??0;return e.length>=2||J>=2?v&&(0,Z.jsx)(W,{width:`100%`,align:`stretch`,gap:4,marginBottom:4,flexShrink:0,children:(0,Z.jsxs)(W,{width:`100%`,align:`stretch`,gap:2,children:[(0,Z.jsxs)(z,{wrap:`wrap`,gap:2,paddingX:2,children:[se.length>0&&(0,Z.jsxs)(o,{"data-testid":`xaxis-selector`,children:[(0,Z.jsxs)(r,{ref:j,size:`xs`,variant:`outline`,onClick:()=>O?k(!1):ne(),"data-testid":`group-by-button`,"aria-haspopup":`menu`,"aria-expanded":O,children:[`Group by:`,` `,se.find(e=>e.value===S)?.label??`Runs`]}),O&&N&&(0,Z.jsxs)(i,{children:[(0,Z.jsx)(o,{position:`fixed`,inset:0,zIndex:1e3,onClick:()=>k(!1),"data-testid":`group-by-backdrop`}),(0,Z.jsx)(o,{position:`fixed`,top:`${N.bottom+4}px`,left:`${N.left}px`,bg:`bg.panel`,border:`1px solid`,borderColor:`border`,borderRadius:`md`,boxShadow:`md`,zIndex:1001,minWidth:`150px`,padding:2,style:{maxHeight:`calc(100vh - ${N.bottom+16}px)`,overflowY:`auto`},"data-testid":`group-by-dropdown`,role:`menu`,tabIndex:-1,onKeyDown:e=>{e.key===`Escape`&&(e.preventDefault(),ie())},children:(0,Z.jsx)(W,{align:`stretch`,gap:1,children:se.map(e=>(0,Z.jsx)(z,{padding:1,borderRadius:`sm`,cursor:`pointer`,bg:S===e.value?`blue.subtle`:`transparent`,_hover:{bg:S===e.value?`blue.muted`:`bg.subtle`},onClick:()=>{C(e.value),k(!1)},onKeyDown:t=>{(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),C(e.value),k(!1))},role:`menuitem`,tabIndex:0,"data-testid":`xaxis-option-${e.value}`,children:(0,Z.jsx)(l,{fontSize:`sm`,fontWeight:S===e.value?`medium`:`normal`,color:S===e.value?`blue.fg`:`inherit`,children:e.label})},e.value))})})]})]}),(0,Z.jsxs)(o,{children:[(0,Z.jsxs)(r,{ref:A,size:`xs`,variant:`outline`,onClick:()=>E?D(!1):te(),"data-testid":`metrics-selector-button`,"aria-haspopup":`menu`,"aria-expanded":E,children:[`Metrics (`,F.size,`/`,q.length,`)`]}),E&&M&&(0,Z.jsxs)(i,{children:[(0,Z.jsx)(o,{position:`fixed`,inset:0,zIndex:1e3,onClick:()=>D(!1),"data-testid":`metrics-backdrop`}),(0,Z.jsx)(o,{position:`fixed`,top:`${M.bottom+4}px`,left:`${M.right}px`,transform:`translateX(-100%)`,bg:`bg.panel`,border:`1px solid`,borderColor:`border`,borderRadius:`md`,boxShadow:`md`,zIndex:1001,minWidth:`200px`,padding:2,style:{maxHeight:`calc(100vh - ${M.bottom+16}px)`,overflowY:`auto`},"data-testid":`metrics-dropdown`,role:`menu`,tabIndex:-1,onKeyDown:e=>{e.key===`Escape`&&(e.preventDefault(),re())},children:(0,Z.jsx)(W,{align:`stretch`,gap:1,children:q.map(e=>(0,Z.jsxs)(z,{padding:1,borderRadius:`sm`,cursor:`pointer`,_hover:{bg:`bg.subtle`},onClick:()=>oe(e.id),onKeyDown:t=>{(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),oe(e.id))},role:`menuitem`,tabIndex:0,"aria-checked":F.has(e.id),children:[(0,Z.jsx)(o,{width:`16px`,height:`16px`,minWidth:`16px`,minHeight:`16px`,flexShrink:0,border:`1px solid`,borderColor:`border.emphasized`,borderRadius:`sm`,bg:F.has(e.id)?`blue.500`:`transparent`,display:`flex`,alignItems:`center`,justifyContent:`center`,children:F.has(e.id)&&(0,Z.jsx)(l,{color:`white`,fontSize:`xs`,fontWeight:`bold`,children:`✓`})}),(0,Z.jsx)(l,{fontSize:`sm`,whiteSpace:`nowrap`,children:e.name})]},e.id))})})]})]})]}),(0,Z.jsxs)(z,{overflowX:`auto`,gap:4,align:`stretch`,paddingX:2,paddingBottom:2,"data-testid":`charts-container`,children:[F.has(`cost`)&&(0,Z.jsxs)(o,{minWidth:`280px`,width:`280px`,flexShrink:0,bg:`bg.subtle`,border:`1px solid`,borderColor:`border`,borderRadius:`md`,padding:3,paddingBottom:1,"data-testid":`chart-cost`,children:[(0,Z.jsx)(l,{fontSize:`xs`,fontWeight:`medium`,marginBottom:2,lineClamp:1,title:`Total Cost`,children:`Total Cost`}),(0,Z.jsx)(Ve,{width:`100%`,height:U,children:(0,Z.jsxs)(ct,{data:B,margin:{left:10,right:10},children:[(0,Z.jsx)(Be,{horizontal:!0,vertical:!1,stroke:`var(--chakra-colors-border)`,strokeDasharray:`0`}),(0,Z.jsx)(ze,{dataKey:`name`,style:{fontSize:`11px`},axisLine:!1,tickLine:!1,angle:H.angle,textAnchor:H.textAnchor,height:H.height,tickFormatter:e=>Q(String(e),H.maxLabelLength)}),(0,Z.jsx)(He,{style:{fontSize:`11px`},width:V.cost,tickFormatter:e=>En(e),axisLine:!1,tickLine:!1}),(0,Z.jsx)(Re,{content:(0,Z.jsx)(dt,{}),formatter:e=>En(e),cursor:{fill:`currentColor`,fillOpacity:.1}}),(0,Z.jsx)(lt,{dataKey:`cost`,name:`Cost`,children:B.map((e,t)=>(0,Z.jsx)(ut,{fill:e.color??$[t%$.length]},`cell-${t}`))})]})})]}),F.has(`latency`)&&(0,Z.jsxs)(o,{minWidth:`280px`,width:`280px`,flexShrink:0,bg:`bg.subtle`,border:`1px solid`,borderColor:`border`,borderRadius:`md`,padding:3,paddingBottom:1,"data-testid":`chart-latency`,children:[(0,Z.jsx)(l,{fontSize:`xs`,fontWeight:`medium`,marginBottom:2,lineClamp:1,title:`Avg Latency`,children:`Avg Latency`}),(0,Z.jsx)(Ve,{width:`100%`,height:U,children:(0,Z.jsxs)(ct,{data:B,margin:{left:10,right:10},children:[(0,Z.jsx)(Be,{horizontal:!0,vertical:!1,stroke:`var(--chakra-colors-border)`,strokeDasharray:`0`}),(0,Z.jsx)(ze,{dataKey:`name`,style:{fontSize:`11px`},axisLine:!1,tickLine:!1,angle:H.angle,textAnchor:H.textAnchor,height:H.height,tickFormatter:e=>Q(String(e),H.maxLabelLength)}),(0,Z.jsx)(He,{style:{fontSize:`11px`},width:V.latency,tickFormatter:e=>Dn(e),axisLine:!1,tickLine:!1}),(0,Z.jsx)(Re,{content:(0,Z.jsx)(dt,{}),formatter:e=>Dn(e),cursor:{fill:`currentColor`,fillOpacity:.1}}),(0,Z.jsx)(lt,{dataKey:`latency`,name:`Latency`,children:B.map((e,t)=>(0,Z.jsx)(ut,{fill:e.color??$[t%$.length]},`cell-${t}`))})]})})]}),G.map(e=>F.has(`score_${e.id}`)&&(0,Z.jsxs)(o,{minWidth:`280px`,width:`280px`,flexShrink:0,bg:`bg.subtle`,border:`1px solid`,borderColor:`border`,borderRadius:`md`,padding:3,paddingBottom:1,"data-testid":`chart-score-${e.id}`,children:[(0,Z.jsxs)(l,{fontSize:`xs`,fontWeight:`medium`,marginBottom:2,lineClamp:1,title:`${e.name} (Score)`,children:[e.name,` (Score)`]}),(0,Z.jsx)(Ve,{width:`100%`,height:U,children:(0,Z.jsxs)(ct,{data:B,margin:{left:10,right:10},children:[(0,Z.jsx)(Be,{horizontal:!0,vertical:!1,stroke:`var(--chakra-colors-border)`,strokeDasharray:`0`}),(0,Z.jsx)(ze,{dataKey:`name`,style:{fontSize:`11px`},axisLine:!1,tickLine:!1,angle:H.angle,textAnchor:H.textAnchor,height:H.height,tickFormatter:e=>Q(String(e),H.maxLabelLength)}),(0,Z.jsx)(He,{style:{fontSize:`11px`},width:40,domain:[0,1],axisLine:!1,tickLine:!1}),(0,Z.jsx)(Re,{content:(0,Z.jsx)(dt,{}),formatter:e=>e.toFixed(2),cursor:{fill:`currentColor`,fillOpacity:.1}}),(0,Z.jsx)(lt,{dataKey:`score_${e.id}`,children:B.map((e,t)=>(0,Z.jsx)(ut,{fill:e.color??$[t%$.length]},`cell-${t}`))})]})})]},`score-${e.id}`)),m?.map(e=>F.has(`comparison_${e.evaluatorId}`)&&(0,Z.jsx)(wn,{column:e,chartHeight:U,targetColors:L},`comparison-${e.evaluatorId}`)),K.map(e=>F.has(`pass_${e.id}`)&&(0,Z.jsxs)(o,{minWidth:`280px`,width:`280px`,flexShrink:0,bg:`bg.subtle`,border:`1px solid`,borderColor:`border`,borderRadius:`md`,padding:3,paddingBottom:1,"data-testid":`chart-pass-${e.id}`,children:[(0,Z.jsxs)(l,{fontSize:`xs`,fontWeight:`medium`,marginBottom:2,lineClamp:1,title:`${e.name} (Pass Rate)`,children:[e.name,` (Pass Rate)`]}),(0,Z.jsx)(Ve,{width:`100%`,height:U,children:(0,Z.jsxs)(ct,{data:B,margin:{left:10,right:10},children:[(0,Z.jsx)(Be,{horizontal:!0,vertical:!1,stroke:`var(--chakra-colors-border)`,strokeDasharray:`0`}),(0,Z.jsx)(ze,{dataKey:`name`,style:{fontSize:`11px`},axisLine:!1,tickLine:!1,angle:H.angle,textAnchor:H.textAnchor,height:H.height,tickFormatter:e=>Q(String(e),H.maxLabelLength)}),(0,Z.jsx)(He,{style:{fontSize:`11px`},width:40,domain:[0,1],tickFormatter:e=>`${Math.round(e*100)}%`,axisLine:!1,tickLine:!1}),(0,Z.jsx)(Re,{content:(0,Z.jsx)(dt,{}),cursor:{fill:`currentColor`,fillOpacity:.1},formatter:e=>`${Math.round(e*100)}%`}),(0,Z.jsx)(lt,{dataKey:`pass_${e.id}`,children:B.map((e,t)=>(0,Z.jsx)(ut,{fill:e.color??$[t%$.length]},`cell-${t}`))})]})})]},`pass-${e.id}`))]})]})}):null},Mn=e(b()),Nn=e(et()),Pn=e=>e==null?``:typeof e==`object`?JSON.stringify(e):String(e),Fn=e=>e==null?``:(0,Mn.default)(e).format(`0.[0000]`),In=e=>e==null?``:e?`true`:`false`,Ln=e=>{let t=[];t.push(`index`);for(let n of e.datasetColumns)t.push(n.name);for(let n of e.targetColumns){if(n.model&&t.push(`${n.name}_model`),n.promptId&&(t.push(`${n.name}_prompt_id`),t.push(`${n.name}_prompt_version`)),n.metadata)for(let e of Object.keys(n.metadata))t.push(`${n.name}_${e}`);for(let e of n.outputFields)t.push(`${n.name}_${e}`);n.outputFields.length===0&&t.push(`${n.name}_output`),t.push(`${n.name}_cost`),t.push(`${n.name}_duration_ms`),t.push(`${n.name}_error`),t.push(`${n.name}_trace_id`);let r=new Set;for(let t of e.rows){let e=t.targets[n.id];if(e)for(let t of e.evaluatorResults)r.add(t.evaluatorId)}for(let i of r){let r=e.evaluatorNames[i]??i;t.push(`${n.name}_${r}_score`),t.push(`${n.name}_${r}_passed`),t.push(`${n.name}_${r}_label`),t.push(`${n.name}_${r}_details`),t.push(`${n.name}_${r}_cost`),t.push(`${n.name}_${r}_duration_ms`)}}return t.map(e=>e.toLowerCase().replace(/\s+/g,`_`))},Rn=(e,t)=>{let n=[];n.push(String(e.index));for(let r of t.datasetColumns)n.push(Pn(e.datasetEntry[r.name]));for(let r of t.targetColumns){let i=e.targets[r.id];if(r.model&&n.push(r.model),r.promptId&&(n.push(r.promptId),n.push(r.promptVersion==null?``:String(r.promptVersion))),r.metadata)for(let e of Object.keys(r.metadata))n.push(Pn(r.metadata[e]));if(r.outputFields.length>0)for(let e of r.outputFields){let t=i?.output;n.push(Pn(t?.[e]))}else n.push(Pn(i?.output));n.push(Fn(i?.cost)),n.push(Fn(i?.duration)),n.push(i?.error??``),n.push(i?.traceId??``);let a=new Set;for(let e of t.rows){let t=e.targets[r.id];if(t)for(let e of t.evaluatorResults)a.add(e.evaluatorId)}for(let e of a){let t=i?.evaluatorResults.find(t=>t.evaluatorId===e);if(!t){n.push(``,``,``,``,``,``);continue}if(t.status===`error`){n.push(`Error`,``,``,t.details??``,``,``);continue}if(t.status===`skipped`){n.push(`Skipped`,``,``,t.details??``,``,``);continue}n.push(Fn(t.score)),n.push(In(t.passed)),n.push(t.label??``),n.push(t.details??``),n.push(Fn(t.cost)),n.push(Fn(t.duration))}}return n},zn=e=>({headers:Ln(e),rows:e.rows.map(t=>Rn(t,e))}),Bn=e=>{let{headers:t,rows:n}=zn(e);return Nn.default.unparse({fields:t,data:n})},Vn=(e,t)=>{let n=Bn(e),r=new Blob([n],{type:`text/csv;charset=utf-8;`}),i=window.URL.createObjectURL(r),a=`${new Date(e.createdAt).toISOString().split(`T`)[0]}_${t}_${e.runId}.csv`,o=document.createElement(`a`);o.href=i,o.setAttribute(`download`,a),document.body.appendChild(o),o.click(),o.remove(),window.URL.revokeObjectURL(i)},Hn=e=>{let{experimentId:t,runId:n,dataset:r,evaluations:i,targets:a,timestamps:o,progress:s,total:c}=e,l=new Set;for(let e of r)for(let t of Object.keys(e.entry??{}))l.add(t);let u=Array.from(l).map(e=>({name:e,hasImages:Xn(r,e)})),d=[],f=r.some(e=>e.error&&!e.targetId);if(a&&a.length>0)d=a.map(e=>({id:e.id,name:e.name,type:e.type===`custom`?`custom`:e.type,promptId:e.promptId,promptVersion:e.promptVersion,agentId:e.agentId,evaluatorId:e.evaluatorId,model:e.model,metadata:e.metadata,outputFields:Kn(r,e.id)}));else{let e=Yn(r);if(Object.keys(e).length>0)d=Object.entries(e).map(([e,t])=>({id:e||`output`,name:e===`end`||e===``?`Output`:e,type:`legacy`,outputFields:Array.from(t)}));else if(i.length>0){let e=new Map;for(let t of i)e.has(t.evaluator)||e.set(t.evaluator,t.name??t.evaluator);d=Array.from(e.entries()).map(([e,t])=>({id:`_eval_${e}`,name:t,type:`legacy`,outputFields:qn(i,e)}))}else f&&(d=[{id:`_default`,name:`Output`,type:`custom`,outputFields:[]}])}let p=new Map;for(let e of i){let t=e.targetId?`${e.targetId}:${e.evaluator}`:e.evaluator;p.has(t)||p.set(t,e.name??e.evaluator)}let m=new Map;for(let e of r)(!m.has(e.index)||!e.targetId)&&m.set(e.index,e);let h=new Map;for(let e of i){let t=`${e.index}:${e.targetId??``}`,n=h.get(t)??[];n.push(e),h.set(t,n)}let g=new Map;for(let e of r){let t=`${e.index}:${e.targetId??``}`;g.set(t,e)}let _=r.length>0?Math.max(...r.map(e=>e.index))+1:0,v=[];for(let e=0;e<_;e++){let t=m.get(e),n=t?.entry??{},r={};for(let n of d){let i=n.id,o=a&&a.length>0?g.get(`${e}:${i}`)??t:t,s=null;if(i.startsWith(`_eval_`)){let t=i.slice(6);s=Jn(h.get(`${e}:`)??[],t)}else if(o?.predicted)if(a&&a.length>0)s=o.predicted;else{let e=o.predicted;if(i===`output`||i===`end`||i===``){let t=Object.values(e).some(e=>typeof e==`object`&&!!e&&!Array.isArray(e));s=t&&i in e?e[i]:t?e.end??e:e}else i in e&&(s=e[i])}let c;if(i.startsWith(`_eval_`)){let t=i.slice(6);c=(h.get(`${e}:`)??[]).filter(e=>e.evaluator===t)}else c=h.get(`${e}:${i}`)??(a&&a.length>0?[]:h.get(`${e}:`)??[]);let l=c.map(e=>({evaluatorId:e.evaluator,evaluatorName:e.name??e.evaluator,status:e.status,score:e.score,passed:e.passed,label:e.label,details:e.details,cost:e.cost,duration:e.duration,inputs:e.inputs??void 0}));r[i]={targetId:i,output:s,cost:o?.cost??null,duration:o?.duration??null,error:o?.error??null,traceId:o?.traceId??null,evaluatorResults:l}}v.push({index:e,datasetEntry:n,targets:r})}return{runId:n,experimentId:t,projectId:e.projectId,createdAt:o.createdAt,finishedAt:o.finishedAt,stoppedAt:o.stoppedAt,progress:s,total:c,datasetColumns:u,targetColumns:d,evaluatorIds:Array.from(p.keys()),evaluatorNames:Object.fromEntries(p),comparisonColumns:Gn(i,d,v),rows:v}},Un=e=>{if(e==null)return null;if(typeof e==`string`)return e;if(typeof e!=`object`)return String(e);let t=e;for(let e=0;e<3&&!(!t||typeof t!=`object`);e++){let e=t,n=e.output??e.answer;if(typeof n==`string`)return n;if(n==null)break;t=n}try{return JSON.stringify(e)}catch{return null}},Wn=e=>{let t=e.candidates;return Array.isArray(t)?t.map(e=>e&&typeof e==`object`?e.id:void 0).filter(e=>typeof e==`string`):[e.candidate_a_id,e.candidate_b_id].filter(e=>typeof e==`string`)},Gn=(e,t,n)=>{let r=new Map(t.map(e=>[e.id,e.name])),i=new Map;for(let e of t)i.set(e.id,e.id),e.name&&i.set(e.name,e.id),e.promptId&&i.set(e.promptId,e.id);let a=e=>i.get(e),o=new Set(t.filter(e=>e.type===`evaluator`).map(e=>e.id)),s=e=>e===`A`||e===`B`||e===`tie`,c=e=>e===`A`||e===`B`,l=e=>[e.evaluator??``,e.name??``].map(e=>e.toLowerCase()).some(e=>e.includes(`pairwise`)||e.includes(`select_best`)||e.includes(`comparison`)),u=new Map;for(let t of e){if(t.status!==`processed`)continue;let e=o.has(t.evaluator),n=typeof t.label==`string`&&t.label.length>0;if(!n&&!l(t)&&!e)continue;let i=t.label??``;if(n&&!s(i)&&!a(i)&&!l(t)&&!e)continue;let d=t.name?`${t.evaluator}::${t.name}`:t.evaluator,f=u.get(d);f||(f={evaluatorId:t.evaluator,name:t.name??r.get(t.evaluator)??t.evaluator,candidateIds:[],winningLabels:[],sawSlotLabels:!1,verdicts:[]},u.set(d,f));for(let e of Wn(t.inputs??{})){let t=a(e)??e;f.candidateIds.includes(t)||f.candidateIds.push(t)}if(n){if(c(i))f.sawSlotLabels=!0;else if(!s(i)){let e=a(i)??i;f.winningLabels.includes(e)||f.winningLabels.push(e)}f.verdicts.push({rowIndex:t.index,rawLabel:i,reasoning:t.details??null})}}let d=[];for(let e of u.values()){let i=[...e.candidateIds];for(let t of e.winningLabels)i.includes(t)||i.push(t);i.length===0&&e.sawSlotLabels&&i.push(...t.slice(0,2).map(e=>e.id));let o=i.map((e,t)=>({id:e,name:r.get(e)??e??`Variant ${t+1}`}));for(;e.sawSlotLabels&&o.length<2;)o.push({id:null,name:`Variant ${String.fromCharCode(65+o.length)}`});let s={};for(let{rowIndex:t,rawLabel:r,reasoning:i}of e.verdicts){let e;if(r===`tie`)e=null;else{let t=tt({label:r,variants:o.map(e=>e.id??``)});e=t===``||t===`A`||t===`B`?null:a(t)??t}let c=e?n[t]?.targets[e]:void 0;s[t]={rowIndex:t,winnerId:e,reasoning:i,winnerOutput:c?Un(c.output):null}}d.push({evaluatorId:e.evaluatorId,name:e.name,variants:o,verdictsByRow:s})}return d},Kn=(e,t)=>{let n=new Set;for(let r of e)if(r.targetId===t&&r.predicted)for(let e of Object.keys(r.predicted))n.add(e);return Array.from(n)},qn=(e,t)=>{let n=new Set;for(let r of e){let e=r.inputs;if(r.evaluator===t&&e)for(let t of Object.keys(e))n.add(t)}return n.size===0&&n.add(`data`),Array.from(n)},Jn=(e,t)=>{for(let n of e){if(n.evaluator!==t)continue;let e=n.inputs;if(!e)continue;let r=Object.keys(e);if(r.length===1){let t=r[0];if(t===`output`||t===`response`||t===`generated`||t===`answer`||t===`prediction`)return{output:e[t]}}if(r.length>0)return e}return null},Yn=e=>{let t={},n=e.find(e=>e.predicted)?.predicted;if(!n)return t;if(Object.values(n).every(e=>typeof e==`object`&&!!e&&!Array.isArray(e))){for(let n of e)if(n.predicted){for(let[e,r]of Object.entries(n.predicted))if(typeof r==`object`&&r&&!Array.isArray(r)){t[e]||(t[e]=new Set);for(let n of Object.keys(r))t[e].add(n)}}}else{t.end=new Set;for(let n of e)if(n.predicted)for(let e of Object.keys(n.predicted))t.end.add(e)}return t},Xn=(e,t)=>{let n=e.slice(0,10);for(let e of n){let n=e.entry?.[t];if(typeof n==`string`&&Zn(n))return!0}return!1},Zn=e=>typeof e==`string`?/\.(jpg|jpeg|png|gif|webp|svg|bmp)(\?.*)?$/i.test(e)||e.startsWith(`data:image/`)||e.includes(`/images/`)||e.includes(`cloudinary`)||e.includes(`imgur`):!1,Qn=({runIds:e,currentRunId:t,initialCompareRunIds:n,onSelectionChange:r})=>{let[i,a]=(0,X.useState)(()=>(n?.length??0)>=2),[o,s]=(0,X.useState)(()=>n??[]),c=e.length>=2;return(0,X.useEffect)(()=>{r?.(i,o)},[i,o,r]),{compareMode:i,selectedRunIds:o,toggleCompareMode:(0,X.useCallback)(()=>{a(n=>{if(n)return s([]),!1;{let n=t?e.indexOf(t):0,r=[e[n]??e[0],e[n+1]??e[n-1]??e[1]].filter(e=>!!e),i=[...new Set(r)];return s(i.length>=2?i:e.slice(0,2)),!0}})},[t,e]),toggleRunSelection:(0,X.useCallback)(e=>{s(t=>t.includes(e)?t.length<=1?(a(!1),[]):t.filter(t=>t!==e):[...t,e])},[]),canDeselectRun:(0,X.useCallback)(e=>o.includes(e)?o.length>1:!1,[o]),canCompare:c,enterCompareWithRuns:(0,X.useCallback)((e,t)=>{a(!0),s([e,t])},[])}},$n=3e3;function er({project:e,experiment:t,size:n=`md`,selectedRunId:i,onSelectRunId:a}){let{isLiteMember:s}=y(),[u,d]=(0,X.useState)(!1),[f,p]=(0,X.useState)(null),[m,h]=(0,X.useState)(()=>new Set(en)),g=(0,X.useCallback)(e=>{h(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},[]),_=J.experiments.getExperimentBatchEvaluationRuns.useQuery({projectId:e?.id??``,experimentId:t?.id??``},{enabled:!!e&&!!t,refetchInterval:u?3e3:1e4}),v=se(),b=typeof v.query.runId==`string`?v.query.runId:void 0,x=i??b??_.data?.runs[0]?.runId,S=(0,X.useCallback)(e=>{a?a(e):v.replace({pathname:v.pathname,query:{...v.query,runId:e}},void 0,{shallow:!0})},[a,v]),C=(0,X.useMemo)(()=>_.data?.runs.find(e=>e.runId===x),[_.data?.runs,x]),w=(0,X.useMemo)(()=>C?cn(C.timestamps):!1,[C]);(0,X.useEffect)(()=>{w&&f===null?p(Date.now()):w||p(null)},[w,f]),(0,X.useEffect)(()=>{p(null)},[x]),(0,X.useEffect)(()=>{if(f===null)return;let e=$n-(Date.now()-f);if(e<=0)return;let t=setTimeout(()=>{p(-1)},e);return()=>clearTimeout(t)},[f]);let T=w&&f!==null&&f>0&&Date.now()-f<$n;(0,X.useEffect)(()=>{let e=_.data?.runs.some(e=>!cn(e.timestamps));d(!!e)},[_.data?.runs]);let E=!w||T?1e3:!1,D=J.experiments.getExperimentBatchEvaluationRun.useQuery({projectId:e?.id??``,experimentId:t?.id??``,runId:x??``},{enabled:!!e&&!!t&&!!x,refetchInterval:E}),O=(0,X.useMemo)(()=>D.data?Hn(D.data):null,[D.data]),k=(0,X.useMemo)(()=>_.data?.runs?_.data.runs.map(e=>({runId:e.runId,workflowVersion:e.workflowVersion,timestamps:e.timestamps,progress:e.progress,total:e.total,summary:{datasetCost:e.summary.datasetCost,evaluationsCost:e.summary.evaluationsCost,evaluations:Object.fromEntries(Object.entries(e.summary.evaluations).map(([e,t])=>[e,{name:t.name,averageScore:t.averageScore,averagePassed:t.averagePassed}]))}})):[],[_.data?.runs]),A=(0,X.useMemo)(()=>k.map(e=>e.runId),[k]),j=(0,X.useMemo)(()=>{let e={};return[...k].sort((e,t)=>e.timestamps.createdAt-t.timestamps.createdAt).forEach((t,n)=>{e[t.runId]=an({commitMessage:t.workflowVersion?.commitMessage,runId:t.runId,index:n})}),e},[k]),M=(0,X.useMemo)(()=>{let e=v.query.compare;if(typeof e==`string`)return e.split(`,`).filter(Boolean);if(Array.isArray(e))return e.filter(e=>typeof e==`string`)},[v.query.compare]),ee=(0,X.useCallback)((e,t)=>{if(a)return;let n={...v.query};e&&t.length>=2?(n.compare=t.join(`,`),delete n.runId):!e&&t.length===0&&delete n.compare,v.query.compare!==n.compare&&v.replace({pathname:v.pathname,query:n},void 0,{shallow:!0})},[a,v]),N=(0,X.useMemo)(()=>{let e={};return A.forEach((t,n)=>{e[t]=$[n%$.length]}),e},[A]),{compareMode:P,selectedRunIds:te,toggleCompareMode:re,toggleRunSelection:I,enterCompareWithRuns:L}=Qn({runIds:A,currentRunId:x,initialCompareRunIds:M,onSelectionChange:ee}),R=Tn({projectId:e?.id??``,experimentId:t?.id??``,runIds:te,enabled:P&&te.length>0,runColorMap:N}),V=(0,X.useMemo)(()=>P?R.runs.map(e=>({runId:e.runId,runName:j[e.runId]??e.runId,color:e.color,data:e.data?Hn(e.data):null,isLoading:e.isLoading})):null,[P,R.runs,j]),H=O?.targetColumns.length??0,U=P&&(V?.length??0)>=2||H>=2,[G,K]=(0,X.useState)(U);(0,X.useEffect)(()=>{U&&!G&&K(!0)},[U]);let q=(0,X.useMemo)(()=>P||!O||H<2?null:[{runId:O.runId,runName:j[O.runId]??O.runId,color:N[O.runId]??$[0],data:O,isLoading:!1}],[P,O,H,N,j]),le=P?V:q,[fe,pe]=(0,X.useState)({}),me=N,he=k.find(e=>e.runId===x),ge=(0,X.useCallback)(()=>{!O||!t||Vn(O,t.name??t.slug)},[O,t]),_e=!!O&&O.rows.length>0;return _.error?(0,Z.jsxs)(ie,{status:`error`,children:[(0,Z.jsx)(F,{}),`Error loading experiment runs`]}):(0,Z.jsxs)(z,{align:`stretch`,width:`full`,height:`full`,gap:0,overflow:`hidden`,children:[(0,Z.jsx)(o,{flexShrink:0,children:(0,Z.jsx)(dn,{runs:k,selectedRunId:x,onSelectRun:S,isLoading:_.isLoading,size:n,compareMode:P,onToggleCompareMode:re,selectedRunIds:te,onToggleRunSelection:I,onEnterCompareWithRuns:L,runColors:me})}),(0,Z.jsxs)(W,{flex:1,minWidth:0,height:`full`,gap:0,align:`stretch`,overflow:`auto`,children:[(0,Z.jsxs)(ne.Header,{paddingX:2,withBorder:!1,flexShrink:0,children:[(0,Z.jsxs)(z,{gap:1,minWidth:0,overflow:`hidden`,flexShrink:1,children:[(0,Z.jsx)(je,{whiteSpace:`nowrap`,flexShrink:0,children:t?t.name??t.slug:(0,Z.jsx)(c,{width:`200px`,height:`28px`})}),t&&he&&(0,Z.jsxs)(l,{textStyle:`xs`,color:`fg.muted`,whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`,flexShrink:1,minWidth:0,children:[`// `,he.runId]})]}),(0,Z.jsx)(B,{}),U&&(0,Z.jsxs)(r,{size:`sm`,variant:G?`solid`:`outline`,onClick:()=>K(!G),"data-testid":`toggle-charts-button`,children:[(0,Z.jsx)(ce,{size:16}),`Charts`]}),O&&O.datasetColumns.length>0&&(0,Z.jsx)(tn,{datasetColumns:O.datasetColumns,hiddenColumns:m,onToggle:g}),!s&&(0,Z.jsxs)(r,{size:`sm`,variant:`outline`,onClick:ge,disabled:!_e,children:[(0,Z.jsx)(ue,{size:16}),` Export to CSV`]}),t?.workflowId&&(0,Z.jsx)(Me,{target:`_blank`,href:`/${e?.slug}/studio/${t?.workflowId}`,asChild:!0,children:(0,Z.jsxs)(r,{size:`sm`,variant:`outline`,textDecoration:`none`,children:[(0,Z.jsx)(de,{size:16}),` Open Workflow`]})}),t?.type===yt.ExperimentType.EVALUATIONS_V3&&(0,Z.jsx)(Me,{href:`/${e?.slug}/experiments/workbench/${t?.slug}`,asChild:!0,children:(0,Z.jsxs)(r,{size:`sm`,variant:`outline`,textDecoration:`none`,children:[(0,Z.jsx)(de,{size:16}),` Open Experiment`]})})]}),U&&le&&le.length>0&&(0,Z.jsx)(jn,{comparisonData:le,isVisible:G,onVisibilityChange:K,onTargetColorsChange:pe,comparisonColumns:O?.comparisonColumns}),_.isLoading?(0,Z.jsx)(o,{flex:1,minHeight:`300px`,overflow:`auto`,paddingX:2,paddingBottom:2,children:(0,Z.jsx)(jt,{withCard:!0})}):k.length===0?(0,Z.jsx)(l,{padding:4,children:`Waiting for results...`}):(0,Z.jsx)(o,{flex:1,minHeight:`300px`,paddingX:2,paddingBottom:2,children:(0,Z.jsx)(ae,{width:`100%`,height:`100%`,overflow:`hidden`,children:(0,Z.jsx)(oe,{padding:0,height:`100%`,children:(0,Z.jsx)(nn,{data:O,isLoading:D.isLoading&&!P,hiddenColumns:m,onToggleColumn:g,comparisonData:V,targetColors:fe})})})})]})]})}var tr=(e,t)=>{if(e.finishedAt)return e.finishedAt;if(e.stoppedAt)return e.stoppedAt},nr=e=>e.averagePassed!==void 0&&e.averagePassed!==null?`${(0,Mn.default)(e.averagePassed).format(`0.[0]%`)} pass${e.averageScore!==void 0&&e.averageScore!==null&&e.averageScore!==e.averagePassed?` (${(0,Mn.default)(e.averageScore).format(`0.0[0]`)} avg)`:``}`:e.averageScore!==void 0&&e.averageScore!==null?(0,Mn.default)(e.averageScore).format(`0.[00]`):`-`;function rr({run:e,showProgress:t=!1,onStop:n,actions:i}){let[a,s]=(0,X.useState)(Date.now()),c=(0,X.useMemo)(()=>tr(e.timestamps,a),[e.timestamps,a]),u=Math.max(e.timestamps.createdAt?(c??a)-e.timestamps.createdAt:0,0);(0,X.useEffect)(()=>{if(c)return;let e=setInterval(()=>{s(Date.now())},1e3);return()=>clearInterval(e)},[c]);let d=(e.summary.datasetCost??0)+(e.summary.evaluationsCost??0),f=e.progress??0,p=e.total??0,m=p>0?f/p*100:0;return(0,Z.jsxs)(W,{width:`full`,background:`bg.surface`,gap:0,position:`sticky`,left:0,bottom:0,borderTop:`1px solid`,borderColor:`border`,overflowX:`auto`,overflowY:`hidden`,flexShrink:0,children:[(0,Z.jsxs)(z,{width:`100%`,paddingY:4,paddingX:6,gap:5,children:[Object.entries(e.summary.evaluations).map(([e,t])=>(0,Z.jsxs)(z,{gap:5,children:[(0,Z.jsxs)(W,{align:`start`,gap:1,children:[(0,Z.jsx)(l,{fontWeight:`500`,fontSize:`14px`,lineClamp:2,children:t.name}),(0,Z.jsx)(l,{fontSize:`14px`,children:nr(t)})]}),(0,Z.jsx)(E,{orientation:`vertical`,height:`48px`})]},e)),(0,Z.jsxs)(W,{align:`start`,gap:1,children:[(0,Z.jsx)(l,{fontWeight:`500`,fontSize:`14px`,children:`Total Cost`}),(0,Z.jsx)(S,{content:(0,Z.jsxs)(W,{align:`start`,gap:0,children:[(0,Z.jsxs)(l,{fontSize:`12px`,children:[`Target cost: `,it(e.summary.datasetCost??null)]}),(0,Z.jsxs)(l,{fontSize:`12px`,children:[`Evaluation cost:`,` `,it(e.summary.evaluationsCost??null)]})]}),positioning:{placement:`top`},children:(0,Z.jsx)(l,{fontSize:`14px`,children:it(d)})})]}),(0,Z.jsx)(E,{orientation:`vertical`,height:`48px`}),(0,Z.jsxs)(W,{align:`start`,gap:1,children:[(0,Z.jsx)(l,{fontWeight:`500`,fontSize:`14px`,children:`Runtime`}),(0,Z.jsx)(l,{fontSize:`14px`,children:(0,Mn.default)(u/1e3).format(`00:00:00`)})]}),(e.timestamps.stoppedAt!=null||i!=null)&&(0,Z.jsx)(B,{}),e.timestamps.stoppedAt&&(0,Z.jsxs)(z,{children:[(0,Z.jsx)(o,{width:`12px`,height:`12px`,background:`red.500`,borderRadius:`full`}),(0,Z.jsx)(l,{children:`Stopped`})]}),i]}),t&&!c&&(0,Z.jsxs)(z,{width:`full`,padding:3,borderTop:`1px solid`,borderColor:`border`,gap:2,children:[(0,Z.jsx)(l,{whiteSpace:`nowrap`,marginTop:`-1px`,paddingX:2,children:`Running`}),(0,Z.jsx)(o,{flex:1,children:(0,Z.jsx)(ee,{value:m,size:`sm`,colorPalette:`blue`,children:(0,Z.jsx)(te,{children:(0,Z.jsx)(P,{})})})}),(0,Z.jsxs)(l,{fontSize:`12px`,color:`fg.muted`,whiteSpace:`nowrap`,children:[f,`/`,p]}),n&&(0,Z.jsx)(r,{colorPalette:`red`,size:`sm`,onClick:n,marginLeft:2,children:`Stop`})]})]})}var ir=({size:e=24,color:t=`blue.400`})=>{let n=we(t);return(0,Z.jsx)(`div`,{children:(0,Z.jsxs)(`svg`,{width:e,height:e,viewBox:`0 0 24 24`,children:[(0,Z.jsx)(`path`,{style:{animation:`sparkleSmall1 0.9s infinite ease-in-out 0.3s`,transformOrigin:`75% 25%`},fill:n,d:`M19 9 l 1.25-2.75 L23 5 l-2.75-1.25 L19 1 l-1.25 2.75 L15 5 l2.75 1.25 z`}),(0,Z.jsx)(`path`,{style:{animation:`sparkleLarge 0.9s infinite ease-in-out`,transformOrigin:`40% 50%`},fill:n,d:`M11.5 9.5 L9 4 6.5 9.5 1 12l5.5 2.5L9 20l2.5-5.5L17 12 z`}),(0,Z.jsx)(`path`,{style:{animation:`sparkleSmall2 0.9s infinite ease-in-out 0.6s`,transformOrigin:`75% 75%`},fill:n,d:`M19 15 l-1.25 2.75 L15 19 l2.75 1.25 L19 23 l1.25-2.75 L23 19 l-2.75-1.25 z`}),(0,Z.jsx)(`style`,{children:`
|
|
2
|
-
@keyframes sparkleLarge {
|
|
3
|
-
0%, 100% { transform: scale(0.8); opacity: 0.9; }
|
|
4
|
-
50% { transform: scale(1.2); opacity: 1; } /* Subtle pulse */
|
|
5
|
-
}
|
|
6
|
-
@keyframes sparkleSmall1 {
|
|
7
|
-
0%, 100% { transform: scale(0.8); opacity: 0.8; }
|
|
8
|
-
50% { transform: scale(1.2); opacity: 1; } /* Slightly larger pulse */
|
|
9
|
-
}
|
|
10
|
-
@keyframes sparkleSmall2 {
|
|
11
|
-
0%, 100% { transform: scale(0.8); opacity: 0.8; }
|
|
12
|
-
50% { transform: scale(1.2); opacity: 1; } /* Slightly larger pulse */
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
/* Keyframes are defined above, animations applied inline */
|
|
16
|
-
`})]})})},ar=()=>{let{checkCanCommitNewVersion:e}=pt(({checkCanCommitNewVersion:e})=>({checkCanCommitNewVersion:e}));return e()?(0,Z.jsx)(sr,{}):(0,Z.jsx)(or,{})};function or(){let{project:e}=Oe(),{currentVersion:t}=dr({project:e}),n=t?.autoSaved?{version:t?.parent?.version,commitMessage:t?.parent?.commitMessage}:{version:t?.version,commitMessage:t?.commitMessage};return(0,Z.jsxs)(z,{width:`full`,children:[(0,Z.jsxs)(W,{align:`start`,children:[(0,Z.jsx)(Ye,{color:`fg.muted`,children:`Version`}),(0,Z.jsx)(l,{width:`74px`,children:n.version})]}),(0,Z.jsxs)(W,{align:`start`,width:`full`,children:[(0,Z.jsx)(Ye,{color:`fg.muted`,children:`Description`}),(0,Z.jsx)(l,{children:n.commitMessage})]})]})}function sr({canSaveOverride:e}={}){let t=Pe(),{project:n}=Oe(),{checkCanCommitNewVersion:r,getWorkflow:i}=pt(({checkCanCommitNewVersion:e,getWorkflow:t})=>({checkCanCommitNewVersion:e,getWorkflow:t})),a=e??r(),{previousVersion:o,nextVersion:s}=dr({project:n,form:t}),c=J.modelProvider.getResolvedDefault.useQuery({projectId:n?.id??``,featureKey:`workflows.commit_message`},{enabled:!!n?.id}),{modelOption:l}=Xe(Ze,c.data?.model??``,`chat`),u=l?.isDisabled??!1,d=c.data!=null&&!u,f=J.workflow.generateCommitMessage.useMutation(),p=(0,X.useRef)(!1),m=(0,X.useRef)(!1),h=(0,X.useCallback)((e,r,i)=>{!d&&!i?.force||f.mutate({projectId:n?.id??``,prevDsl:e,newDsl:r},{onSuccess:e=>{e&&!p.current&&t.setValue(`commitMessage`,e,{shouldDirty:!0,shouldValidate:!0})}})},[t,f,n?.id,d]),g=Te((e,t)=>{h(e,t)},500,{leading:!0,trailing:!1});(0,X.useEffect)(()=>{if(a&&o?.dsl&&!m.current){if(!c.isFetched)return;m.current=!0,p.current=!1,t.setValue(`commitMessage`,``,{shouldDirty:!0}),d&&setTimeout(()=>{g(o.dsl,i())},0)}else a&&!o&&t.setValue(`commitMessage`,`First version`,{shouldDirty:!0,shouldValidate:!0})},[a,o?.dsl,c.isFetched,d]);let _=t.formState.submitCount>0;return(0,Z.jsxs)(z,{width:`full`,children:[(0,Z.jsx)(L,{width:`fit-content`,invalid:_&&!!t.formState.errors.version,children:(0,Z.jsxs)(W,{align:`start`,children:[(0,Z.jsx)(R,{as:Ye,color:`fg.muted`,children:`Version`}),(0,Z.jsx)(Ce,{...t.register(`version`,{required:!0,pattern:/^\d+(\.\d+)?$/}),placeholder:s,maxWidth:`60px`,pattern:`\\d+(\\.\\d+)?`,readOnly:!0})]})}),(0,Z.jsx)(L,{width:`full`,invalid:_&&!!t.formState.errors.commitMessage,children:(0,Z.jsxs)(W,{align:`start`,width:`full`,children:[(0,Z.jsx)(R,{as:Ye,color:`fg.muted`,children:`Description`}),(0,Z.jsx)(Je,{width:`full`,endElement:f.isLoading?(0,Z.jsx)(ir,{}):a&&c.isFetched&&o?.dsl?(0,Z.jsx)(I,{size:`xs`,variant:`ghost`,color:`blue.400`,"aria-label":`Generate description`,"data-testid":`generate-commit-message-button`,onClick:()=>{p.current=!1,h(o.dsl,i(),{force:!0})},children:(0,Z.jsx)(De,{size:16})}):void 0,children:(0,Z.jsx)(Ce,{...t.register(`commitMessage`,{required:!0,onChange:()=>{p.current=!0}}),placeholder:f.isLoading?`Generating...`:`What changes have you made?`,width:`full`,disabled:!a})})]})})]})}function cr(){let{open:e,onToggle:t,onClose:n,setOpen:i}=v();return(0,Z.jsxs)(u.Root,{open:e,onOpenChange:({open:e})=>i(e),children:[(0,Z.jsx)(u.Trigger,{asChild:!0,children:(0,Z.jsx)(r,{variant:`ghost`,color:`fg.subtle`,size:`xs`,onClick:t,children:(0,Z.jsx)(Qe,{size:16})})}),e&&(0,Z.jsx)(lr,{onClose:n})]})}function lr({onClose:e}){let{project:t}=Oe(),{workflowId:n,getWorkflow:i,setWorkflow:a,setAutosavedWorkflow:o,setLastCommittedWorkflow:s,setCurrentVersionId:c}=pt(({workflow_id:e,getWorkflow:t,setWorkflow:n,setAutosavedWorkflow:r,setLastCommittedWorkflow:i,setCurrentVersionId:a})=>({workflowId:e,getWorkflow:t,setWorkflow:n,setAutosavedWorkflow:r,setLastCommittedWorkflow:i,setCurrentVersionId:a})),d=Ie({defaultValues:{version:``,commitMessage:``}}),{versions:f,currentVersion:p,hasChanges:m,canSaveNewVersion:g,nextVersion:_}=dr({project:t,form:d}),v=J.workflow.commitVersion.useMutation(),y=J.workflow.restoreVersion.useMutation(),b=({version:e,commitMessage:r})=>{!t||!n||v.mutate({projectId:t.id,workflowId:n,commitMessage:r,dsl:mt({...i(),version:e})},{onSuccess:()=>{C.create({title:`Saved version ${e}`,type:`success`,duration:5e3,meta:{closable:!0}}),a({version:e}),s(i()),f.refetch()},onError:()=>{C.create({title:`Error saving version`,type:`error`,duration:5e3,meta:{closable:!0}})}})},x=(0,X.useCallback)(async r=>{if(!t||!n)return;if(p?.autoSaved){if(!confirm(`Autosaved changes might be lost. Continue?`))return}else if(m&&!confirm(`Unsaved changes will be lost. Continue?`))return;let i=await y.mutateAsync({projectId:t.id,versionId:r});o(void 0);let l=i.dsl;s(l),c(i.id),a({...l,nodes:(l.nodes??[]).map(e=>({...e,selected:!1}))}),e()},[t,n,p?.autoSaved,m,y,a,o,s,c,e]);return(0,Z.jsxs)(u.Content,{width:`500px`,children:[(0,Z.jsx)(u.Arrow,{}),(0,Z.jsx)(u.Header,{fontWeight:600,children:`Workflow Versions`}),(0,Z.jsx)(u.CloseTrigger,{}),(0,Z.jsxs)(u.Body,{padding:0,children:[(0,Z.jsx)(Fe,{...d,children:(0,Z.jsx)(`form`,{onSubmit:d.handleSubmit(b),style:{width:`100%`,padding:`20px`},children:(0,Z.jsxs)(W,{align:`start`,width:`full`,children:[(0,Z.jsx)(sr,{canSaveOverride:g}),(0,Z.jsx)(S,{content:g?``:`No changes to save`,positioning:{placement:`top`},children:(0,Z.jsx)(r,{type:`submit`,alignSelf:`end`,colorPalette:`orange`,size:`sm`,loading:v.isLoading,disabled:!g,children:`Save new version`})})]})})}),(0,Z.jsx)(E,{}),(0,Z.jsxs)(W,{align:`start`,width:`full`,padding:5,maxHeight:`350px`,overflowY:`auto`,children:[(0,Z.jsx)(l,{fontWeight:600,fontSize:`16px`,paddingTop:2,children:`Previous Versions`}),f.data?.map(e=>(0,Z.jsxs)(W,{width:`full`,align:`start`,paddingBottom:2,children:[(0,Z.jsx)(E,{marginBottom:2}),(0,Z.jsxs)(z,{width:`full`,gap:3,children:[(0,Z.jsx)(ur,{version:e,minWidth:`48px`}),(0,Z.jsxs)(W,{align:`start`,width:`full`,gap:1,children:[(0,Z.jsxs)(z,{children:[(0,Z.jsx)(l,{fontWeight:600,fontSize:`13px`,lineClamp:1,children:e.commitMessage}),e.isCurrentVersion&&(0,Z.jsx)(V,{colorPalette:`green`,size:`sm`,paddingX:2,children:(0,Z.jsx)(H,{children:`current`})})]}),(0,Z.jsxs)(z,{fontSize:`12px`,children:[(0,Z.jsx)(h,{size:`2xs`,backgroundColor:`orange.400`,color:`white`,width:`16px`,height:`16px`,name:e.author?.name??``,image:e.author?.image}),e.author?.name]})]}),!e.isCurrentVersion&&(0,Z.jsx)(S,{content:`Restore this version`,positioning:{placement:`top`},children:(0,Z.jsx)(r,{variant:`ghost`,onClick:()=>void x(e.id),loading:y.isLoading,children:(0,Z.jsx)(Qe,{size:24})})})]})]},e.id))]})]})]})}var ur=({version:e,children:t,...n})=>(0,Z.jsxs)(o,{backgroundColor:e?.autoSaved?`orange.50`:`orange.100`,paddingY:3,paddingX:2,borderRadius:4,fontWeight:600,fontSize:`13px`,color:`fg.muted`,whiteSpace:`nowrap`,textAlign:`center`,minWidth:`0px`,height:`44px`,...n,children:[e?.autoSaved?` `:e?.version,t]}),dr=({project:e,form:t,allowSaveIfAutoSaveIsCurrentButNotLatest:n=!0})=>{let{workflowId:r,getWorkflow:i,autosavedWorkflow:a}=pt(({workflow_id:e,version:t,getWorkflow:n,autosavedWorkflow:r})=>({workflowId:e,version:t,getWorkflow:n,autosavedWorkflow:r})),o=J.workflow.getVersions.useQuery({projectId:e?.id??``,workflowId:r??``,returnDSL:`previousVersion`},{enabled:!!e?.id&&!!r}),s=o.data?.find(e=>e.isCurrentVersion),c=o.data?.find(e=>e.isPreviousVersion),l=o.data?.find(e=>e.isLatestVersion),u=a?ft(i(),a,!1):!1,d=u||!!l?.autoSaved||n&&!!s?.autoSaved,[f]=l?.version.split(`.`)??[`0`],p=(0,X.useMemo)(()=>l?.autoSaved?l.version:`${parseInt(f??`0`)+1}`,[l?.autoSaved,l?.version,f]),m=(0,X.useMemo)(()=>d?{id:``,version:p,commitMessage:``}:s?.autoSaved?{id:s?.parent?.id,version:s?.parent?.version,commitMessage:s?.parent?.commitMessage}:{id:s?.id,version:s?.version,commitMessage:s?.commitMessage},[d,s?.autoSaved,s?.commitMessage,s?.id,s?.parent?.commitMessage,s?.parent?.id,s?.parent?.version,s?.version,p]);return(0,X.useEffect)(()=>{t&&t.setValue(`version`,p)},[p,t]),{versions:o,currentVersion:s,previousVersion:c,latestVersion:l,hasChanges:u,canSaveNewVersion:d,nextVersion:p,versionToBeEvaluated:m}};export{rr as a,dn as c,ar as i,an as l,ur as n,er as o,dr as r,Hn as s,cr as t,nn as u};
|
|
17
|
-
//# sourceMappingURL=History-V1jF0Epn.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{t}from"./react-BUD3sqOU.js";import{t as n}from"./jsx-runtime-CFwixLRt.js";import{t as r}from"./box-Ck5lef6C.js";import{t as i}from"./text-A3qvcMyN.js";import{t as a}from"./tooltip-Croc0I6e.js";import{a as o,n as s,r as c}from"./field-Dz4Xmo3X.js";import{t as l}from"./h-stack-CMPhqSp5.js";import{t as u}from"./spacer-CbmCSsJg.js";import{t as d}from"./v-stack-ClAMS101.js";import{t as f}from"./info-Bii0i81f.js";var p=e(t()),m=n();function h(e){let t=[];function n(e){if(!(!e||typeof e!=`object`)){if(e&&typeof e==`object`&&`message`in e&&typeof e.message==`string`){t.push(e.message);return}Array.isArray(e)?e.forEach(e=>{n(e)}):Object.values(e).forEach(e=>{n(e)})}}return n(e),t}function g({error:e}){if((0,p.isValidElement)(e))return(0,m.jsx)(m.Fragment,{children:e});if(e==null)return null;if(typeof e==`string`||typeof e==`number`)return(0,m.jsx)(i,{fontSize:`13px`,color:`fg.error`,children:e});let t=h(e);return t.length===0?null:(0,m.jsx)(d,{align:`start`,gap:1,children:t.map((e,t)=>(0,m.jsx)(i,{fontSize:`13px`,color:`fg.error`,children:e},t))})}function _({label:e,helper:t,tooltip:n,invalid:i,children:p,minWidth:h,inputWidth:_,align:v,direction:y=`horizontal`,size:b=`md`,error:x,labelProps:S,...C}){return(0,m.jsx)(o,{borderBottomWidth:`1px`,paddingY:5,invalid:i,_last:{border:`none`},...b===`sm`&&{paddingY:0,border:`none`},...C,children:(0,m.jsxs)(l,{width:`full`,flexDirection:y===`horizontal`?[`column`,`column`,`row`]:`column`,align:v,gap:y===`horizontal`?4:2,children:[(0,m.jsxs)(d,{align:`start`,gap:b===`sm`?0:1,width:`full`,minWidth:h,children:[(0,m.jsx)(c,{margin:0,...b===`sm`&&{fontSize:`12px`,textTransform:`uppercase`,color:`gray.500`,fontWeight:`bold`},...y===`vertical`&&{paddingLeft:2,width:`full`},...S,children:(0,m.jsxs)(l,{gap:2,width:`full`,children:[e,n&&(0,m.jsx)(a,{content:n,positioning:{placement:`top`},children:(0,m.jsx)(f,{size:14})})]})}),(0,m.jsx)(s,{margin:0,fontSize:`13px`,children:t})]}),y===`horizontal`&&(0,m.jsx)(u,{}),(0,m.jsx)(r,{minWidth:y===`vertical`?`full`:[`full`,`full`,_??`50%`],children:p}),(0,m.jsx)(g,{error:x})]})})}export{g as n,_ as t};
|
|
2
|
-
//# sourceMappingURL=HorizontalFormControl-CLz9xuFM.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{t}from"./react-BUD3sqOU.js";import{t as n}from"./jsx-runtime-CFwixLRt.js";import{t as r}from"./box-Ck5lef6C.js";import{t as i}from"./text-A3qvcMyN.js";import{t as a}from"./tooltip-Croc0I6e.js";import{t as o}from"./h-stack-CMPhqSp5.js";import{t as s}from"./v-stack-ClAMS101.js";import{yt as c}from"./index-CUhcyBp3.js";import{t as l}from"./Markdown-Dm0jXfOR.js";import{t as u}from"./switch-vUOdjiD1.js";import{t as d}from"./RenderInputOutput-DOVNZVJ2.js";var f=e(t()),p=e=>{if(typeof e!=`string`||!e.trim().startsWith(`{`)&&!e.trim().startsWith(`[`))return!1;try{return JSON.parse(e),!0}catch{return!1}},m=n();function h({open:e,onOpenChange:t,textExpanded:n}){let[a,s]=(0,f.useState)(!0);return(0,m.jsx)(c.Root,{open:e,onOpenChange:({open:e})=>t(e),size:`5xl`,children:(0,m.jsxs)(c.Content,{bg:`bg`,children:[(0,m.jsx)(c.Header,{background:`bg.muted`,padding:3,borderRadius:`12px 12px 0 0`,fontSize:`14px`,children:(0,m.jsxs)(o,{children:[(0,m.jsx)(u,{size:`sm`,checked:a,onCheckedChange:()=>s(!a)}),(0,m.jsx)(i,{children:`Formatted`})]})}),(0,m.jsx)(c.CloseTrigger,{}),(0,m.jsx)(c.Body,{paddingY:6,paddingX:8,overflow:`auto`,maxHeight:`calc(100vh - 200px)`,children:e&&n&&a?p(n)?(0,m.jsx)(d,{value:n,showTools:`copy-only`}):(0,m.jsx)(l,{children:typeof n==`string`?n.replace(/(\n+)\\(\n+)/g,`$1$2`):JSON.stringify(n,null,2)}):n?(0,m.jsx)(r,{whiteSpace:`pre-wrap`,fontFamily:`mono`,children:n}):null})]})})}function g({children:e,expandedVersion:t,expandable:n=!0,...o}){let c=(0,f.useRef)(null),[l,u]=(0,f.useState)(!1),[d,p]=(0,f.useState)(void 0),g=t??e;return setTimeout(()=>{u(c.current?Math.abs(c.current.offsetWidth-c.current.scrollWidth)>2||Math.abs(c.current.offsetHeight-c.current.scrollHeight)>2:!1)},100),(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(a,{disabled:!l,content:(0,m.jsxs)(s,{padding:0,gap:0,width:`full`,display:`block`,children:[n&&(0,m.jsx)(i,{textAlign:`center`,background:`black`,width:`calc(100% + 16px)`,marginLeft:`-8px`,marginTop:`-4px`,color:`yellow.400`,children:`click anywhere to expand`}),(0,m.jsxs)(r,{whiteSpace:`pre-wrap`,children:[(0,m.jsx)(`center`,{}),typeof g==`string`?g.slice(0,2e3)+(g.length>2e3?`...`:``):g]})]}),children:(0,m.jsx)(r,{ref:c,width:`full`,height:`full`,whiteSpace:`normal`,lineClamp:7,...o,...l&&n&&{onClick:e=>{e.stopPropagation(),p(g)}},children:e})}),(0,m.jsx)(h,{open:!!d,onOpenChange:e=>p(e?g:void 0),textExpanded:d})]})}export{g as n,p as r,h as t};
|
|
2
|
-
//# sourceMappingURL=HoverableBigText-CxXucdYS.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{t}from"./react-BUD3sqOU.js";import{r as n}from"./portal-FJIui2Z2.js";import{t as r}from"./jsx-runtime-CFwixLRt.js";import{t as i}from"./box-Ck5lef6C.js";import{t as a}from"./text-A3qvcMyN.js";import{ir as o}from"./useLiteMemberGuard-klZnweA7.js";import{q as s}from"./ExternalImage-DbtOSrKl.js";import{n as c,t as l}from"./external-link-BzETHrAG.js";import{t as u}from"./icon-button-Ce2kwA7j.js";import{t as d}from"./h-stack-CMPhqSp5.js";import{t as f}from"./v-stack-ClAMS101.js";import{t as p}from"./usePublicEnv-CATGNgPr.js";import{Kn as m,ni as h,t as g}from"./index-CUhcyBp3.js";import{t as _}from"./docsUrl-AJ4sHLyi.js";var v=e(t()),y=r();function b({heading:e=`Install the LangWatch CLI`,subline:t="One-time setup. After installing, run `langwatch login` to authenticate this device."}={}){let r=p(),s=!!r.data?.IS_SAAS,c=r.data?.BASE_HOST??`https://app.langwatch.ai`,u=s?`langwatch login`:`langwatch login --endpoint ${c}`;return(0,y.jsx)(i,{borderWidth:`1px`,borderColor:`border.muted`,borderRadius:`md`,padding:5,backgroundColor:`bg`,boxShadow:`sm`,width:`full`,children:(0,y.jsxs)(f,{align:`stretch`,gap:4,children:[(0,y.jsxs)(d,{gap:2,children:[(0,y.jsx)(i,{color:`fg.muted`,children:(0,y.jsx)(m,{size:18})}),(0,y.jsx)(h,{as:`h3`,size:`sm`,children:e})]}),(0,y.jsx)(a,{fontSize:`sm`,color:`fg.muted`,children:t}),(0,y.jsxs)(a,{fontSize:`xs`,color:`fg.muted`,children:[`Requires Node.js 18 or newer (the `,(0,y.jsx)(o,{fontSize:`xs`,children:`npm`}),` `,`command ships with it). Get it at`,` `,(0,y.jsx)(o,{fontSize:`xs`,children:`nodejs.org`}),`.`]}),(0,y.jsx)(x,{label:`1. Install`,command:`npm install -g langwatch`,ariaLabel:`Copy install command`}),(0,y.jsx)(x,{label:`2. Authenticate`,command:u,ariaLabel:`Copy login command`}),!s&&(0,y.jsxs)(a,{fontSize:`xs`,color:`fg.muted`,children:[`Self-hosted detected. The login flag targets`,` `,(0,y.jsx)(o,{fontSize:`xs`,children:c}),`; the endpoint is persisted after that first login, so subsequent commands don't need it.`]}),(0,y.jsxs)(d,{gap:2,children:[(0,y.jsx)(n,{size:`xs`,variant:`outline`,asChild:!0,children:(0,y.jsxs)(g,{href:_(`/integration/cli#install`),isExternal:!0,gap:1,children:[`Install guide `,(0,y.jsx)(l,{size:12})]})}),(0,y.jsx)(n,{size:`xs`,variant:`ghost`,asChild:!0,children:(0,y.jsxs)(g,{href:_(`/integration/cli`),isExternal:!0,gap:1,children:[`CLI reference `,(0,y.jsx)(l,{size:12})]})})]})]})})}function x({label:e,command:t,ariaLabel:n}){let[r,i]=(0,v.useState)(!1);return(0,y.jsxs)(f,{align:`stretch`,gap:1,children:[(0,y.jsx)(a,{fontSize:`xs`,fontWeight:`semibold`,color:`fg.muted`,children:e}),(0,y.jsxs)(d,{gap:2,padding:2,borderWidth:`1px`,borderColor:`border.muted`,borderRadius:`sm`,backgroundColor:`bg.subtle`,children:[(0,y.jsx)(a,{as:`span`,fontFamily:`mono`,fontSize:`sm`,color:`fg.muted`,userSelect:`none`,flexShrink:0,"aria-hidden":`true`,children:`$`}),(0,y.jsx)(o,{flex:1,minWidth:0,backgroundColor:`transparent`,fontSize:`sm`,overflowX:`auto`,whiteSpace:`nowrap`,children:t}),(0,y.jsx)(u,{size:`xs`,variant:`ghost`,"aria-label":r?`Copied`:n,onClick:()=>{navigator.clipboard.writeText(t),i(!0),setTimeout(()=>i(!1),1500)},children:r?(0,y.jsx)(c,{size:14}):(0,y.jsx)(s,{size:14})})]})]})}export{b as t};
|
|
2
|
-
//# sourceMappingURL=InstallCliCard-SGRlvABl.js.map
|