@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{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{t as o}from"./skeleton-YwQIu7Tp.js";import{t as s}from"./text-A3qvcMyN.js";import{Sn as c,in as l,lr as u,yn as d}from"./useLiteMemberGuard-klZnweA7.js";import{t as f}from"./tooltip-Croc0I6e.js";import{$ as p,Q as m,X as h,Y as g,Z as _,et as v,nt as y}from"./ExternalImage-DbtOSrKl.js";import{t as b}from"./icon-CkSWK_vf.js";import{a as x,i as S,n as C,r as w}from"./alert-C5hocQt_.js";import{n as ee,r as T,t as E}from"./card-54_vstoB.js";import{t as te}from"./container-CAygaZzW.js";import{a as ne}from"./field-Dz4Xmo3X.js";import{t as D}from"./h-stack-CMPhqSp5.js";import{t as O}from"./spacer-CbmCSsJg.js";import{i as re,o as k,r as ie,t as A}from"./tabs-DdHsJkYS.js";import{t as j}from"./v-stack-ClAMS101.js";import{t as M}from"./DashboardLayout-RHGL-98_.js";import{r as N}from"./next-router-Bn5Y8Iek.js";import{d as ae,n as P}from"./api-BK6L1im2.js";import{i as oe}from"./ColorfulBlockIcons-CUrsa--K.js";import{t as F}from"./chevron-up-CPgU5aFA.js";import{t as se}from"./download-CyGwCZjE.js";import{At as I,En as ce,Mr as le,Rt as ue,ni as L,t as R,w as de,yt as z}from"./index-CUhcyBp3.js";import{i as B}from"./stringCasing-Cx6SsTTf.js";import{J as V,K as H,d as fe,g as pe,on as U,u as me}from"./CartesianChart-D35vYym3.js";import{t as he}from"./switch-vUOdjiD1.js";import{t as W}from"./RenderInputOutput-DOVNZVJ2.js";import{t as G}from"./MetadataTag-W5I0CKzN.js";import{t as ge}from"./papaparse.min-cQwnxGCG.js";import{t as _e}from"./ChartTooltip-Cf8ESsQ9.js";import{t as K}from"./ReferenceDot-St9tkyoA.js";import{t as ve}from"./Line-Bq29STZQ.js";import{t as ye}from"./LineChart-DjFD6yv4.js";import{t as q}from"./formatMoney-CI_YqDED.js";import{t as be}from"./FormatMoney-CEzwUDkl.js";import{l as xe,n as J,o as Se}from"./History-V1jF0Epn.js";var Y=ce(),X=e(d()),Ce=e(ge()),Z=i();function we({project:e,experiment:t}){let n=P.batchRecord.getAllByexperimentSlug.useQuery({projectId:e.id??``,experimentSlug:t.slug??``}),i=()=>{let e=[`Dataset`,`Evaluation`,`Input`,`Output`,`Expected Output`,`Passed`,`Status`,`Details`,`Score`,`Label`,`Cost`,`Created at`],r=[];n.data?.forEach(e=>{let t=e?.data?.input,n=e?.data?.output,i=e?.data?.expected_output;r.push([e.datasetSlug,e.evaluation,t,n,i,e.passed?`True`:`False`,e.status,e.details,e.score,e.label??``,e.cost,new Date(e.createdAt).toLocaleString()])});let i=Ce.default.unparse({fields:e,data:r}),a=window.URL.createObjectURL(new Blob([i])),o=document.createElement(`a`);o.href=a;let s=`${t?.slug}.csv`;o.setAttribute(`download`,s),document.body.appendChild(o),o.click(),o.remove()},c=n.data?.reduce((e,t)=>e+t.cost,0),l=n.data?.reduce((e,t)=>!e||new Date(t.createdAt)<new Date(e.createdAt)?t:e,void 0),u=n.data?.reduce((e,t)=>!e||new Date(t.createdAt)>new Date(e.createdAt)?t:e,void 0),d=u&&l?new Date(u.createdAt).getTime()-new Date(l.createdAt).getTime():0,y=n.data?.reduce((e,t)=>(e[t.evaluation]||(e[t.evaluation]={all:[],processed:[],error:[],skipped:[],unknown:[]}),e[t.evaluation].all.push(t),e[t.evaluation][t.status===`processed`?`processed`:t.status===`error`?`error`:t.status===`skipped`?`skipped`:`unknown`].push(t),e),{}),x=Object.fromEntries(Object.entries(y??{}).map(([e,t])=>[e,t.processed.some(e=>e.score)?`score`:`passed`])),S=Object.fromEntries(Object.entries(y??{}).map(([e,t])=>x[e]===`score`?[e,t.processed.reduce((e,t)=>e+t.score,0)/t.processed.length]:[e,t.processed.filter(e=>e.passed).length/t.processed.length]));return(0,Z.jsxs)(a,{background:`bg.surface`,width:`full`,height:`full`,paddingTop:14,children:[(0,Z.jsx)(te,{maxW:`calc(100vw - 200px)`,children:(0,Z.jsxs)(D,{width:`full`,verticalAlign:`middle`,paddingBottom:6,children:[(0,Z.jsxs)(j,{align:`start`,children:[(0,Z.jsx)(L,{as:`h1`,size:`lg`,children:t.name??t.slug}),(0,Z.jsxs)(s,{children:[`Dataset: `,n.data?.[0]?.dataset.name??``]})]}),(0,Z.jsx)(O,{}),(0,Z.jsxs)(r,{colorPalette:`black`,minWidth:`fit-content`,variant:`ghost`,onClick:()=>n.data&&i(),children:[`Download Results CSV`,` `,(0,Z.jsx)(b,{marginLeft:2,children:(0,Z.jsx)(se,{})})]})]})}),(0,Z.jsxs)(D,{align:`center`,alignItems:`stretch`,justify:`center`,background:`gray.50`,padding:6,gap:6,children:[Object.entries(S).map(([e,t])=>(0,Z.jsx)(T,{children:(0,Z.jsx)(E,{children:(0,Z.jsxs)(j,{align:`start`,justify:`center`,height:`full`,gap:2,children:[(0,Z.jsx)(s,{color:`fg`,fontSize:`15px`,fontWeight:`500`,children:e}),(0,Z.jsxs)(D,{align:`end`,color:t<.5?`red.500`:`green.500`,children:[(0,Z.jsx)(s,{fontSize:`26px`,fontWeight:`300`,children:typeof t==`number`?(0,X.default)(t).format(x[e]===`score`?`0.00`:`0%`):t}),(0,Z.jsx)(s,{fontSize:`13px`,fontWeight:`500`,marginBottom:`4px`,opacity:.8,children:x[e]===`score`?`avg score`:`pass rate`})]}),(0,Z.jsxs)(D,{fontSize:`11px`,textTransform:`uppercase`,fontWeight:`600`,color:`fg.muted`,children:[y?.[e]?.skipped.length&&(0,Z.jsxs)(s,{children:[(0,Z.jsx)(a,{display:`inline-block`,background:`yellow.400`,borderRadius:`100%`,width:2,height:2,marginRight:1}),y?.[e]?.skipped.length,` `,`skipped`]}),y?.[e]?.error.length&&(0,Z.jsxs)(s,{children:[(0,Z.jsx)(a,{display:`inline-block`,background:`red.400`,borderRadius:`100%`,width:2,height:2,marginRight:1}),y?.[e]?.error.length,` error`]})]})]})})},e)),(0,Z.jsx)(T,{children:(0,Z.jsx)(E,{children:(0,Z.jsxs)(j,{align:`start`,justify:`center`,height:`full`,gap:2,children:[(0,Z.jsx)(s,{color:`fg`,fontSize:`15px`,fontWeight:`500`,children:`Evaluations Cost`}),(0,Z.jsx)(s,{fontSize:`26px`,fontWeight:`300`,children:c?q({amount:c,currency:`USD`}):`-`})]})})}),(0,Z.jsx)(T,{children:(0,Z.jsx)(E,{children:(0,Z.jsxs)(j,{align:`start`,justify:`center`,height:`full`,gap:2,children:[(0,Z.jsx)(s,{color:`fg`,fontSize:`15px`,fontWeight:`500`,children:`Runtime`}),(0,Z.jsx)(s,{fontSize:`26px`,fontWeight:`300`,children:d?(0,X.default)(d/1e3).format(`00:00:00`):`-`})]})})})]}),(0,Z.jsx)(a,{width:`full`,paddingBottom:12,display:`flex`,justifyContent:`center`,overflowX:`auto`,paddingX:6,children:(0,Z.jsx)(j,{align:`start`,minWidth:`0`,children:n.isLoading?(0,Z.jsx)(a,{children:(0,Z.jsx)(p,{variant:`line`,borderWidth:`1px`,borderColor:`border`,children:(0,Z.jsx)(g,{children:Array.from({length:3}).map((e,t)=>(0,Z.jsx)(v,{children:Array.from({length:4}).map((e,t)=>(0,Z.jsx)(h,{children:(0,Z.jsx)(o,{height:`20px`})},t))},t))})})}):n.data&&n.data.length==0?(0,Z.jsx)(s,{children:`No data found`}):Object.entries(y??{}).map(([e,t])=>{let n=t.all.some(e=>e.data?.expected_output),r=t.all.some(e=>e.details);return(0,Z.jsxs)(j,{align:`start`,gap:8,paddingTop:12,children:[(0,Z.jsx)(L,{as:`h2`,size:`md`,children:e}),(0,Z.jsx)(a,{children:(0,Z.jsxs)(p,{variant:`line`,borderWidth:`1px`,borderColor:`border`,children:[(0,Z.jsx)(m,{children:(0,Z.jsxs)(v,{children:[(0,Z.jsx)(_,{children:`Input`}),(0,Z.jsx)(_,{children:`Output`}),n&&(0,Z.jsx)(_,{children:`Expected Output`}),(0,Z.jsx)(_,{children:`Status`}),(0,Z.jsx)(_,{minWidth:120,textAlign:`center`,children:x[e]===`score`?`Score`:`Passed`}),r&&(0,Z.jsx)(_,{children:`Details`}),(0,Z.jsx)(_,{children:`Cost`}),(0,Z.jsx)(_,{children:`Created`})]})}),(0,Z.jsx)(g,{children:t.all.map((t,i)=>{let a=t?.data?.input??``,o=t?.data?.output??``,c=t?.data?.expected_output??``;return(0,Z.jsxs)(v,{children:[(0,Z.jsx)(h,{children:(0,Z.jsx)(f,{content:a,children:(0,Z.jsx)(s,{lineClamp:2,display:`block`,maxWidth:230,children:a})})}),(0,Z.jsx)(h,{children:(0,Z.jsx)(f,{content:o,children:(0,Z.jsx)(s,{lineClamp:2,display:`block`,maxWidth:230,children:o})})}),n&&(0,Z.jsx)(h,{children:(0,Z.jsx)(f,{content:c,children:(0,Z.jsx)(s,{lineClamp:2,display:`block`,maxWidth:230,children:c})})}),(0,Z.jsx)(h,{color:t.status===`skipped`?`yellow.700`:t.status===`error`?`red.700`:void 0,children:t.status}),t.status===`processed`?(0,Z.jsx)(h,{textAlign:`center`,fontWeight:`500`,color:x[e]===`score`?t.score<.5?`red.500`:`green.500`:t.passed?`green.500`:`red.500`,children:x[e]===`score`?(0,X.default)(t.score).format(`0.00`):t.passed?`True`:`False`}):(0,Z.jsx)(h,{textAlign:`center`,children:`-`}),r&&(0,Z.jsx)(h,{maxWidth:300,color:t.status===`skipped`?`yellow.700`:t.status===`error`?`red.700`:void 0,children:(0,Z.jsx)(f,{content:t.details,children:(0,Z.jsx)(s,{lineClamp:1,wordBreak:`break-all`,display:`block`,children:t.details})})}),(0,Z.jsx)(h,{children:t.cost?q({amount:t.cost,currency:`USD`}):`-`}),(0,Z.jsx)(h,{children:new Date(t.createdAt).toLocaleString()})]},i)})})]})})]},e)})})})]})}var Q=e(t());function Te({fill:e=`#5865f2`}){return(0,Z.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 127.14 96.36`,width:`32`,height:`32`,children:(0,Z.jsx)(`path`,{fill:e,d:`M107.7 8.07A105.15 105.15 0 0081.47 0a72.06 72.06 0 00-3.36 6.83 97.68 97.68 0 00-29.11 0A72.37 72.37 0 0045.64 0a105.89 105.89 0 00-26.25 8.09C2.79 32.65-1.71 56.6.54 80.21a105.73 105.73 0 0032.17 16.15 77.7 77.7 0 006.89-11.11 68.42 68.42 0 01-10.85-5.18c.91-.66 1.8-1.34 2.66-2a75.57 75.57 0 0064.32 0c.87.71 1.76 1.39 2.66 2a68.68 68.68 0 01-10.87 5.19 77 77 0 006.89 11.1 105.25 105.25 0 0032.19-16.14c2.64-27.38-4.51-51.11-18.9-72.15zM42.45 65.69C36.18 65.69 31 60 31 53s5-12.74 11.43-12.74S54 46 53.89 53s-5.05 12.69-11.44 12.69zm42.24 0C78.41 65.69 73.25 60 73.25 53s5-12.74 11.44-12.74S96.23 46 96.12 53s-5.04 12.69-11.43 12.69z`})})}function Ee(){return(0,Z.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 98 96`,width:`32`,height:`32`,children:(0,Z.jsx)(`path`,{fill:`currentColor`,fillRule:`evenodd`,d:`M48.854 0C21.839 0 0 22 0 49.217c0 21.756 13.993 40.172 33.405 46.69 2.427.49 3.316-1.059 3.316-2.362 0-1.141-.08-5.052-.08-9.127-13.59 2.934-16.42-5.867-16.42-5.867-2.184-5.704-5.42-7.17-5.42-7.17-4.448-3.015.324-3.015.324-3.015 4.934.326 7.523 5.052 7.523 5.052 4.367 7.496 11.404 5.378 14.235 4.074.404-3.178 1.699-5.378 3.074-6.6-10.839-1.141-22.243-5.378-22.243-24.283 0-5.378 1.94-9.778 5.014-13.2-.485-1.222-2.184-6.275.486-13.038 0 0 4.125-1.304 13.426 5.052a46.97 46.97 0 0112.214-1.63c4.125 0 8.33.571 12.213 1.63 9.302-6.356 13.427-5.052 13.427-5.052 2.67 6.763.97 11.816.485 13.038 3.155 3.422 5.015 7.822 5.015 13.2 0 18.905-11.404 23.06-22.324 24.283 1.78 1.548 3.316 4.481 3.316 9.126 0 6.6-.08 11.897-.08 13.526 0 1.304.89 2.853 3.316 2.364 19.412-6.52 33.405-24.935 33.405-46.691C97.707 22 75.788 0 48.854 0z`,clipRule:`evenodd`})})}function De(){let{open:e,onOpen:t,setOpen:n}=u();return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(z.Root,{open:e,onOpenChange:({open:e})=>n(e),children:(0,Z.jsxs)(z.Content,{bg:`bg`,children:[(0,Z.jsx)(z.Header,{children:(0,Z.jsx)(z.Title,{children:`Feedback on LangWatch`})}),(0,Z.jsx)(z.CloseTrigger,{}),(0,Z.jsx)(z.Body,{children:(0,Z.jsxs)(j,{align:`start`,paddingBottom:4,children:[(0,Z.jsx)(s,{paddingBottom:4,children:`Join our Discord community or open a Github Issue for any issues, questions or ideas.`}),(0,Z.jsx)(R,{href:`https://discord.gg/kT4PhDS2gH`,isExternal:!0,children:(0,Z.jsxs)(r,{variant:`plain`,children:[(0,Z.jsx)(Te,{}),` Discord`]})}),(0,Z.jsx)(R,{href:`https://github.com/langwatch/langwatch`,isExternal:!0,children:(0,Z.jsxs)(r,{variant:`plain`,children:[(0,Z.jsx)(Ee,{}),` Github`]})})]})})]})}),(0,Z.jsx)(r,{variant:`plain`,onClick:t,fontWeight:`normal`,color:`fg`,children:`Give Feedback`})]})}function Oe({project:e,experiment:t}){let{dspyRuns:n,selectedRuns:r,setSelectedRuns:i,highlightedRun:c,setHighlightedRun:l,selectedPoint:u,setSelectedPoint:d,dspyRunsPlusIncoming:f,stepToDisplay:p,optimizerNames:m,labelNames:h,runsById:g}=$({project:e,experiment:t});return(0,Z.jsxs)(D,{align:`start`,width:`full`,height:`full`,gap:0,children:[(0,Z.jsx)(ke,{dspyRuns:n,selectedRuns:r,setSelectedRuns:i,setHighlightedRun:l,dspyRunsPlusIncoming:f}),(0,Z.jsxs)(a,{width:`calc(100vw - 391px)`,height:`full`,position:`relative`,children:[(0,Z.jsxs)(j,{align:`start`,width:`100%`,maxWidth:`1200px`,height:`full`,gap:8,padding:6,children:[(0,Z.jsxs)(D,{width:`full`,align:`end`,children:[(0,Z.jsx)(L,{as:`h1`,size:`lg`,children:t.name??t.slug}),(0,Z.jsx)(O,{}),(0,Z.jsx)(De,{})]}),n.isLoading?(0,Z.jsx)(o,{width:`100%`,height:`30px`}):n.error?(0,Z.jsxs)(S,{children:[(0,Z.jsx)(w,{}),`Error loading experiment runs`]}):n.data?.length===0?(0,Z.jsx)(s,{children:`Waiting for the first completed step to arrive...`}):n.data&&(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(T,{width:`100%`,children:[(0,Z.jsx)(ee,{children:(0,Z.jsx)(L,{as:`h2`,size:`md`,children:m.length==1?m[0]:m.length>1?`Multiple Optimizers`:`Waiting for the first completed step to arrive...`})}),(0,Z.jsx)(E,{children:(0,Z.jsx)(Me,{dspyRuns:n.data,selectedPoint:u,setSelectedPoint:d,highlightedRun:c,selectedRuns:r,stepToDisplay:p,labelNames:h})})]}),p&&(!c||c===p.run_id)&&(0,Z.jsx)(T,{width:`100%`,children:(0,Z.jsx)(E,{padding:0,children:(0,Z.jsx)(Ae,{project:e,experiment:t,dspyStepSummary:p,workflowVersion:g?.[p.run_id]?.workflow_version})})})]})]}),g&&r?.length===1&&(0,Z.jsx)(Ne,{project:e,experiment:t,run:g[r[0]]})]})]})}var $=({project:e,experiment:t,selectedRuns:n,setSelectedRuns:r,incomingRunIds:i=[]})=>{let a=P.experiments.getExperimentDSPyRuns.useQuery({projectId:e.id,experimentSlug:t.slug},{refetchInterval:3e3,refetchOnMount:!1}),o=N(),[s,c]=(0,Q.useState)(null),l=(0,Q.useMemo)(()=>{let e=n??(typeof o.query.runIds==`string`?o.query.runIds.split(`,`):null);return(!e||e.length===0)&&(e=a.data?.[0]?.runId?[a.data[0].runId]:[]),e},[a.data,o.query.runIds,n]),u=(0,Q.useCallback)(e=>{if(r)r(e);else{let t={...o.query,runIds:e.join(`,`)};t.runIds||delete t.runIds,o.push({query:t})}},[o,r]),[d,f]=(0,Q.useState)(null);(0,Q.useEffect)(()=>{d&&!l.includes(d.runId)&&f(null)},[l]);let p=a.data&&l?a.data.filter(e=>l.includes(e.runId)):a.data,m=p?.[0];(0,Q.useEffect)(()=>{if(!m||d!==null)return;let e=m.steps[m.steps.length-1];e&&f({runId:m.runId,index:e.index})},[m,d]);let h=(0,Q.useMemo)(()=>a.data?.reduce((e,t)=>(e[t.runId]=t,e),{}),[a.data]),g=a.data&&(d&&h?.[d.runId])?.steps.find(e=>e.index===d.index),_=Array.from(new Set(p?.flatMap(e=>e.steps.map(e=>e.optimizer.name))??[])),v=Array.from(new Set(p?.flatMap(e=>e.steps.map(e=>e.label))??[])),y=Array.from(new Set([...l,...i])).filter(e=>!a.data?.some(t=>t.runId===e));return{dspyRuns:a,selectedRuns:l,setSelectedRuns:u,highlightedRun:s,setHighlightedRun:c,dspyRunsPlusIncoming:y.length>0?[{runId:y[0]},...a.data??[]]:a.data,stepToDisplay:g,optimizerNames:_,labelNames:v,selectedPoint:d,setSelectedPoint:f,runsById:h}};function ke({dspyRuns:e,selectedRuns:t,setSelectedRuns:r,setHighlightedRun:i,dspyRunsPlusIncoming:c,size:u=`md`,incomingRunIds:d=[]}){let f=c?.some(e=>e.workflow_version),p=(0,Q.useMemo)(()=>new Map((e.data??[]).map((e,t)=>[e.runId,t])),[e.data]);return(0,Z.jsxs)(j,{align:`start`,background:`bg.surface`,paddingY:u===`sm`?0:4,borderRightWidth:`1px`,borderColor:`border.emphasized`,fontSize:`14px`,minWidth:u===`sm`?`250px`:`300px`,maxWidth:u===`sm`?`250px`:`300px`,height:`full`,gap:0,overflowY:`auto`,children:[u!==`sm`&&(0,Z.jsx)(L,{as:`h2`,size:`md`,paddingX:6,paddingY:4,children:`DSPy Optimizer Runs`}),e.isLoading?(0,Z.jsx)(Z.Fragment,{children:Array.from({length:3}).map((e,t)=>(0,Z.jsx)(D,{paddingX:6,paddingY:2,width:`100%`,children:(0,Z.jsx)(o,{width:`100%`,height:`30px`})},t))}):e.error?(0,Z.jsxs)(S,{children:[(0,Z.jsx)(w,{}),`Error loading experiment runs`]}):e.data?.length===0?(0,Z.jsx)(s,{paddingX:6,paddingY:4,children:`Waiting for runs...`}):c?.slice(0,21).map(c=>{let m=c.steps?.map(e=>e.llm_calls_summary.total_cost).reduce((e,t)=>e+t,0),h=xe({commitMessage:c.workflow_version?.commitMessage,index:p.get(c.runId)??0});return(0,Z.jsx)(D,{paddingX:u===`sm`?2:6,paddingY:u===`sm`?2:4,width:`100%`,cursor:`pointer`,role:`button`,opacity:!t||t.includes(c.runId)?1:.5,background:t?.includes(c.runId)?`gray.200`:`none`,_hover:{background:t?.includes(c.runId)?`gray.200`:`gray.100`},onClick:e=>{e.stopPropagation(),e.preventDefault();let n=e.shiftKey;n&&document.getSelection()?.removeAllRanges(),r?.(t?.includes(c.runId)?t.filter(e=>e!==c.runId):n?[...t??[],c.runId]:[c.runId]),i(null)},gap:3,children:e.data?.find(e=>e.runId===c.runId)?(0,Z.jsxs)(Z.Fragment,{children:[c.workflow_version?(0,Z.jsx)(J,{version:c.workflow_version,minWidth:f?`48px`:`0`}):(0,Z.jsx)(a,{width:`24px`,height:`24px`,minWidth:`24px`,minHeight:`24px`,background:`gray.300`,borderRadius:`100%`,backgroundColor:l(`colors`,c.runId).color}),(0,Z.jsxs)(j,{width:`full`,align:`start`,gap:0,paddingRight:2,children:[(0,Z.jsxs)(D,{width:`full`,children:[c.workflow_version&&(0,Z.jsx)(a,{width:`12px`,height:`12px`,minWidth:`12px`,minHeight:`12px`,background:`gray.300`,borderRadius:`100%`,backgroundColor:l(`colors`,c.runId).color}),(0,Z.jsx)(s,{fontSize:u===`sm`?`13px`:`14px`,children:h}),(d??[]).includes(c.runId)&&(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(O,{}),(0,Z.jsx)(n,{size:`xs`})]})]}),(0,Z.jsxs)(D,{color:`fg.subtle`,fontSize:u===`sm`?`12px`:`13px`,children:[(0,Z.jsx)(s,{children:c.created_at?de(c.created_at,`yyyy-MM-dd HH:mm`,5):`Waiting for steps...`}),m&&(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(s,{children:`·`}),(0,Z.jsx)(s,{children:q({amount:m,currency:`USD`},`$0.00[0]`)})]})]})]})]}):(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(J,{minWidth:f?`48px`:`0`}),(0,Z.jsxs)(j,{align:`start`,gap:2,width:`100%`,paddingRight:2,children:[(0,Z.jsxs)(D,{width:`100%`,children:[(0,Z.jsx)(o,{height:`12px`,background:`gray.400`,flexGrow:1}),(0,Z.jsx)(n,{size:`xs`,flexShrink:0})]}),(0,Z.jsx)(o,{width:`100%`,height:`12px`,background:`gray.400`})]})]})},c?.runId??`new`)})]})}var Ae=Q.memo(function({project:e,experiment:t,dspyStepSummary:n,workflowVersion:r,size:i=`md`}){let c=P.experiments.getExperimentDSPyStep.useQuery({projectId:e.id,experimentSlug:t.slug,runId:n?.run_id??``,index:n?.index??``},{enabled:!!n}),[u,d]=(0,Q.useState)(0),[f,b]=(0,Q.useState)(!1),x=c.data?.examples.some(e=>e.trace),C=r?.commitMessage??n.run_id;return(0,Z.jsxs)(j,{width:`full`,height:`full`,gap:0,minWidth:`0`,children:[i!==`sm`&&(0,Z.jsxs)(D,{width:`full`,gap:8,padding:4,children:[(0,Z.jsxs)(D,{gap:3,children:[r?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(J,{version:r}),(0,Z.jsx)(a,{width:`18px`,height:`18px`,background:`gray.300`,borderRadius:`100%`,backgroundColor:l(`colors`,n.run_id).color})]}):(0,Z.jsx)(a,{width:`24px`,height:`24px`,borderRadius:`100%`,background:l(`colors`,n.run_id).color}),(0,Z.jsxs)(L,{as:`h2`,size:`md`,marginTop:`-1px`,children:[C,` (step `,n.index,`)`]})]}),(0,Z.jsx)(O,{}),(0,Z.jsxs)(D,{children:[(0,Z.jsx)(G,{label:`Step Cost`,value:q({amount:n.llm_calls_summary.total_cost,currency:`USD`},`$0.00[00]`)}),(0,Z.jsx)(G,{label:`Step Tokens`,value:(0,X.default)(n.llm_calls_summary.total_tokens).format(`0a`)}),(0,Z.jsx)(G,{label:n.label===`score`?`Step `+B(n.label):B(n.label),value:(0,X.default)(n.score).format(`0.[00]`)})]})]}),(0,Z.jsxs)(re,{value:u.toString(),onValueChange:e=>d(parseInt(e.value)),size:i,width:`full`,height:`full`,display:`flex`,flexDirection:`column`,minWidth:`0`,colorPalette:`blue`,children:[(0,Z.jsxs)(ie,{position:`relative`,overflowX:`auto`,overflowY:`hidden`,whiteSpace:`nowrap`,children:[i===`sm`&&(0,Z.jsx)(le,{minHeight:`31px`,marginBottom:`-2px`,paddingX:4,fontWeight:500,color:`fg.muted`,background:`gray.100`,children:(0,Z.jsxs)(s,{children:[`Step `,n.index]})}),u===0&&i!==`sm`&&(0,Z.jsx)(a,{position:`absolute`,top:0,right:4,children:(0,Z.jsxs)(D,{children:[(0,Z.jsx)(s,{children:`Raw`}),(0,Z.jsx)(ne,{children:(0,Z.jsx)(he,{checked:f,onCheckedChange:()=>b(!f)})})]})}),(0,Z.jsxs)(k,{value:`0`,children:[`Predictors`,` `,c.data&&`(${c.data.predictors.length})`]}),(0,Z.jsxs)(k,{value:`1`,children:[`Evaluations`,` `,c.data&&`(${c.data.examples.length})`]}),(0,Z.jsxs)(k,{value:`2`,children:[`LLM Calls `,c.data&&`(${c.data.llm_calls.length})`]}),i===`sm`&&(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(O,{}),(0,Z.jsxs)(D,{paddingX:4,color:`fg.muted`,fontSize:`12px`,textTransform:`uppercase`,children:[(0,Z.jsxs)(s,{children:[`Step Cost:`,` `,q({amount:n.llm_calls_summary.total_cost,currency:`USD`},`$0.00[00]`)]}),(0,Z.jsx)(y,{orientation:`vertical`}),(0,Z.jsxs)(s,{children:[`Step Tokens:`,` `,(0,X.default)(n.llm_calls_summary.total_tokens).format(`0a`)]}),(0,Z.jsx)(y,{orientation:`vertical`}),(0,Z.jsxs)(s,{children:[n.label===`score`?`Step `+n.label:n.label,`: `,(0,X.default)(n.score).format(`0.[00]`)]})]})]})]}),(0,Z.jsx)(A,{value:`0`,width:`full`,height:`full`,minWidth:`0`,overflowX:`auto`,display:`flex`,padding:0,paddingTop:f?4:0,children:c.isLoading?(0,Z.jsx)(o,{width:`100%`,height:`30px`}):c.error?(0,Z.jsxs)(S,{children:[(0,Z.jsx)(w,{}),`Error loading step data`]}):c.data&&f?(0,Z.jsx)(W,{value:JSON.stringify(c.data?.predictors),collapseStringsAfterLength:140}):c.data?(0,Z.jsxs)(p,{height:`fit-content`,size:i===`sm`?`xs`:`sm`,variant:`grid`,children:[(0,Z.jsx)(m,{children:(0,Z.jsxs)(v,{children:[(0,Z.jsx)(_,{minWidth:`15px`,maxWidth:`15px`,paddingY:3}),(0,Z.jsx)(_,{width:`10%`,paddingY:3,children:`Name`}),(0,Z.jsx)(_,{width:`25%`,paddingY:3,children:`Instructions`}),(0,Z.jsx)(_,{width:`25%`,paddingY:3,children:`Signature`}),(0,Z.jsx)(_,{width:`40%`,paddingY:3,children:`Demonstrations`})]})}),(0,Z.jsx)(g,{children:c.isLoading?Array.from({length:3}).map((e,t)=>(0,Z.jsxs)(v,{children:[(0,Z.jsx)(h,{background:`gray.50`,children:`\xA0`}),(0,Z.jsx)(h,{children:(0,Z.jsx)(o,{width:`100%`,height:`30px`})}),(0,Z.jsx)(h,{children:(0,Z.jsx)(o,{width:`100%`,height:`30px`})}),(0,Z.jsx)(h,{children:(0,Z.jsx)(o,{width:`100%`,height:`30px`})}),(0,Z.jsx)(h,{children:(0,Z.jsx)(o,{width:`100%`,height:`30px`})})]},t)):c.error?(0,Z.jsx)(v,{children:(0,Z.jsx)(h,{colSpan:5,color:`red.600`,children:`Error loading step data`})}):c.data.predictors.length===0?(0,Z.jsx)(v,{children:(0,Z.jsx)(h,{colSpan:5,children:`No entries`})}):c.data?c.data.predictors.map(({name:e,predictor:t},n)=>{let r=t?.extended_signature??t?.signature;return(0,Z.jsxs)(v,{children:[(0,Z.jsx)(h,{background:`gray.50`,textAlign:`center`,children:n+1}),(0,Z.jsx)(h,{children:e}),(0,Z.jsx)(h,{whiteSpace:`pre-wrap`,children:r?.instructions??`-`}),(0,Z.jsx)(h,{children:(0,Z.jsx)(je,{signature:r})}),(0,Z.jsx)(h,{children:t?.demos?(0,Z.jsx)(W,{value:JSON.stringify(t.demos.map(e=>e._store?e._store:e)),collapseStringsAfterLength:140,shouldCollapse:e=>e.type===`array`,displayObjectSize:!0}):`-`})]},n)}):null})]}):null}),(0,Z.jsx)(A,{value:`1`,width:`full`,height:`full`,minWidth:`0`,overflowX:`auto`,display:`flex`,padding:0,children:u===1&&(0,Z.jsxs)(p,{height:`fit-content`,size:i===`sm`?`xs`:`sm`,variant:`grid`,children:[(0,Z.jsx)(m,{children:(0,Z.jsxs)(v,{children:[(0,Z.jsx)(_,{minWidth:`15px`,maxWidth:`15px`,paddingY:3}),(0,Z.jsx)(_,{width:`30%`,paddingY:3,children:`Example`}),(0,Z.jsx)(_,{width:`50%`,paddingY:3,children:`Prediction`}),(0,Z.jsx)(_,{width:`20%`,paddingY:3,children:`Score`}),x&&(0,Z.jsx)(_,{minWidth:`200px`,paddingY:3,children:`Trace`})]})}),(0,Z.jsx)(g,{children:c.isLoading?Array.from({length:3}).map((e,t)=>(0,Z.jsxs)(v,{children:[(0,Z.jsx)(h,{background:`gray.50`,children:`\xA0`}),(0,Z.jsx)(h,{children:(0,Z.jsx)(o,{width:`100%`,height:`30px`})}),(0,Z.jsx)(h,{children:(0,Z.jsx)(o,{width:`100%`,height:`30px`})}),(0,Z.jsx)(h,{children:(0,Z.jsx)(o,{width:`100%`,height:`30px`})})]},t)):c.error?(0,Z.jsx)(v,{children:(0,Z.jsx)(h,{colSpan:4,color:`red.600`,children:`Error loading step data`})}):c.data.examples.length===0?(0,Z.jsx)(v,{children:(0,Z.jsx)(h,{colSpan:4,children:`No entries`})}):c.data?c.data.examples.map((e,t)=>(0,Z.jsxs)(v,{children:[(0,Z.jsx)(h,{background:`gray.50`,textAlign:`center`,children:t+1}),(0,Z.jsx)(h,{children:(0,Z.jsx)(W,{value:JSON.stringify(e.example),collapseStringsAfterLength:140})}),(0,Z.jsx)(h,{children:(0,Z.jsx)(W,{value:JSON.stringify(e.pred),collapseStringsAfterLength:140})}),(0,Z.jsx)(h,{children:e.score}),x&&(0,Z.jsx)(h,{children:(0,Z.jsx)(W,{value:JSON.stringify(e.trace),collapseStringsAfterLength:140,collapsed:!0})})]},t)):null})]})}),(0,Z.jsx)(A,{value:`2`,width:`full`,height:`full`,minWidth:`0`,overflowX:`auto`,display:`flex`,padding:0,children:(0,Z.jsxs)(p,{height:`fit-content`,size:i===`sm`?`xs`:`sm`,variant:`grid`,children:[(0,Z.jsx)(m,{children:(0,Z.jsxs)(v,{children:[(0,Z.jsx)(_,{minWidth:`15px`,maxWidth:`15px`,paddingY:3}),(0,Z.jsx)(_,{width:`20%`,paddingY:3,children:`Model`}),(0,Z.jsx)(_,{width:`25%`,paddingY:3,children:`Messages`}),(0,Z.jsx)(_,{width:`45%`,paddingY:3,children:`Response`}),(0,Z.jsx)(_,{width:`10%`,paddingY:3,children:`Cost`})]})}),(0,Z.jsx)(g,{children:c.isLoading?Array.from({length:3}).map((e,t)=>(0,Z.jsxs)(v,{children:[(0,Z.jsx)(h,{background:`gray.50`,children:`\xA0`}),(0,Z.jsx)(h,{children:(0,Z.jsx)(o,{width:`100%`,height:`30px`})}),(0,Z.jsx)(h,{children:(0,Z.jsx)(o,{width:`100%`,height:`30px`})}),(0,Z.jsx)(h,{children:(0,Z.jsx)(o,{width:`100%`,height:`30px`})}),(0,Z.jsx)(h,{children:(0,Z.jsx)(o,{width:`100%`,height:`30px`})})]},t)):c.error?(0,Z.jsx)(v,{children:(0,Z.jsx)(h,{colSpan:6,color:`red.600`,children:`Error loading step data`})}):c.data.llm_calls.length===0?(0,Z.jsx)(v,{children:(0,Z.jsx)(h,{colSpan:6,children:`No entries`})}):c.data?c.data.llm_calls.map((e,t)=>{let n=e.response?.choices?.[0]?.message?.content??e.response?.output;return(0,Z.jsxs)(v,{children:[(0,Z.jsx)(h,{background:`gray.50`,textAlign:`center`,children:t+1}),(0,Z.jsx)(h,{children:e.model}),(0,Z.jsx)(h,{children:(0,Z.jsx)(W,{value:JSON.stringify(e.response?.prompt??e.response?.messages),collapseStringsAfterLength:140,collapsed:!0})}),(0,Z.jsx)(h,{children:n||(0,Z.jsx)(W,{value:JSON.stringify(e.response),collapseStringsAfterLength:140,collapsed:!0})}),(0,Z.jsx)(h,{children:e.cost?q({amount:e.cost,currency:`USD`},`$0.00[0000]`):e.response.cached?(0,Z.jsxs)(D,{align:`start`,children:[(0,Z.jsx)(s,{children:`$0.00`}),(0,Z.jsx)(s,{color:`fg.subtle`,children:`(cached)`})]}):`-`})]},t)}):null})]})})]})]})},(e,t)=>e.project.id===t.project.id&&e.experiment.slug===t.experiment.slug&&e.dspyStepSummary?.run_id===t.dspyStepSummary?.run_id&&e.dspyStepSummary?.index===t.dspyStepSummary?.index);function je({signature:e}){let[t,n]=(0,Q.useState)(!1);return(0,Z.jsxs)(j,{children:[(0,Z.jsx)(D,{children:(0,Z.jsxs)(r,{size:`sm`,fontSize:`14px`,fontWeight:`normal`,variant:`ghost`,onClick:()=>n(!t),children:[e?.signature??`-`,t?(0,Z.jsx)(F,{width:`12px`}):(0,Z.jsx)(c,{width:`12px`})]})}),t&&e?.fields?(0,Z.jsx)(W,{value:JSON.stringify(Object.fromEntries(Object.entries(e.fields).map(([e,t])=>[e,Object.fromEntries(Object.entries(t).filter(([e])=>e!==`__class__`))]))),collapseStringsAfterLength:140,collapsed:!1}):null]})}function Me({dspyRuns:e,selectedPoint:t,setSelectedPoint:n,highlightedRun:r,selectedRuns:i,stepToDisplay:o,labelNames:s}){let c=e=>!i&&!r||!!r&&r===e||!r&&!!i&&i.includes(e),u=e.reduce((e,t)=>(c(t.runId)&&t.steps.forEach(n=>{e[n.index]={...e[n.index]??{},index:n.index,[t.runId]:n.score,[`${t.runId}_label`]:n.label,[`${t.runId}_version`]:t.workflow_version?.version}}),e),{}),d=Object.values(u).sort((e,t)=>{let n=e.index.split(`.`).map(Number),r=t.index.split(`.`).map(Number);for(let e=0;e<3;e++){let t=n[e]??0,i=r[e]??0;if(t<i)return-1;if(t>i)return 1}return 0}),f=e=>{let[t,n]=l(`colors`,e).color.split(`.`);return I(!t||!n?`gray.300`:`${t}.${n}`)},[p,m]=(0,Q.useState)(null),h=i?.[0],g=(0,Q.useMemo)(()=>d.reduce((e,t)=>{let n=t[h??``];return n===void 0?e:n>e.score?{score:n,index:t.index}:e},{score:-1/0,index:``}),[d,h]);return(0,Z.jsxs)(a,{width:`100%`,position:`relative`,children:[d.length===0&&(0,Z.jsxs)(a,{position:`absolute`,top:`50%`,left:`50%`,transform:`translate(-50%, -50%)`,children:[`It can take up to 5 minutes for the first steps to arrive,`,(0,Z.jsx)(`br`,{}),`check the logs for progress meanwhile`]}),(0,Z.jsx)(U,{height:300,children:(0,Z.jsxs)(ye,{data:d,margin:{top:28,right:30,left:20,bottom:15},style:{cursor:p?`pointer`:`default`},onClick:()=>{p&&(p.runId!==t?.runId||p.index!==t?.index)?n(p):n(null)},onMouseMove:e=>{if(e.isTooltipActive&&e.activeIndex!==void 0){let t=d[e.activeIndex]?.runId,n=e.activeLabel;m(t&&n!==void 0?{runId:t.toString(),index:n.toString()}:null)}else m(null)},children:[(0,Z.jsx)(pe,{strokeDasharray:`3 3`}),(0,Z.jsx)(fe,{dataKey:`index`,name:`Step`,label:{value:`Step`,position:`insideBottomRight`,offset:-10}}),(0,Z.jsx)(me,{type:`number`,name:s.length==1?s[0]:`Score`,label:{value:s.length==1?s[0]:`Score`,angle:-90,position:`insideLeft`,offset:-5,style:{textAnchor:`middle`}}}),(0,Z.jsx)(V,{content:(0,Z.jsx)(_e,{}),labelFormatter:e=>`Step ${e}`,formatter:(e,t,n)=>{let r=n.payload[`${t}_label`],i=n.payload[`${t}_version`];return[(0,X.default)(e).format(`0.[00]`),[i?`[${i}]`:t,r].filter(e=>e).join(` `)]}}),g.index&&(0,Z.jsx)(K,{x:g.index,y:g.score,r:8,fill:`gold`,stroke:`none`,children:(0,Z.jsx)(H,{value:`Best`,position:`top`,offset:10,fill:I(`gray.700`),fontSize:`12px`})}),e.map(({runId:e})=>c(e)?(0,Z.jsx)(ve,{type:`monotone`,dataKey:e,stroke:f(e),name:e,dot:{r:5,fill:f(e)},isAnimationActive:!1},e):null),o&&(!r||r===o.run_id)&&(0,Z.jsx)(K,{x:o.index,y:u[o.index]?.[o.run_id],stroke:f(o.run_id),fill:f(o.run_id)})]})})]})}function Ne({project:e,experiment:t,run:n,onApply:i,onViewLogs:a}){let{selectedPoint:o}=$({project:e,experiment:t}),{totalCost:c,bestScore:l,bestScoreStepSummary:u,bestScoreLabel:d}=(0,Q.useMemo)(()=>{let e=n?.steps?.map(e=>e.llm_calls_summary.total_cost).reduce((e,t)=>e+t,0),t=n?.steps?.map(e=>e.score).reduce((e,t)=>t>e?t:e,0),r=n?.steps?.find(e=>e.score===t);return{totalCost:e,bestScore:t,bestScoreStepSummary:r,bestScoreLabel:r?.label}},[n]),f=P.experiments.getExperimentDSPyStep.useQuery({projectId:e.id,experimentSlug:t.slug,runId:u?.run_id??``,index:u?.index??``},{enabled:!!u&&!!i}),p=P.experiments.getExperimentDSPyStep.useQuery({projectId:e.id,experimentSlug:t.slug,runId:o?.runId??``,index:o?.index??``},{enabled:!!o}),m=e=>{let t=e.map(e=>({id:e.name,instructions:e.predictor.extended_signature?.instructions??e.predictor.signature?.instructions,fields:Object.entries(e.predictor.signature?.fields??{}).map(([e,t])=>({identifier:e,field_type:t.field_type??`input`,prefix:t.prefix,desc:t.desc})),demonstrations:e.predictor.demos?.map(e=>e._store??e).filter(Boolean)}));i&&i(t)};return(0,Z.jsxs)(D,{position:`sticky`,left:0,bottom:0,width:`100%`,background:`bg.surface`,borderTop:`1px solid`,borderColor:`border`,paddingY:4,paddingX:6,gap:5,children:[(0,Z.jsxs)(j,{align:`start`,gap:1,children:[(0,Z.jsx)(s,{fontWeight:`500`,lineClamp:1,children:!d||d===`score`?`Best Score`:B(d)}),(0,Z.jsx)(s,{lineClamp:1,whiteSpace:`nowrap`,children:(0,X.default)(l).format(`0.[00]`)})]}),(0,Z.jsx)(y,{orientation:`vertical`,height:`48px`}),(0,Z.jsxs)(j,{align:`start`,gap:1,children:[(0,Z.jsx)(s,{fontWeight:`500`,lineClamp:1,children:`Total Cost`}),(0,Z.jsx)(s,{lineClamp:1,whiteSpace:`nowrap`,children:n&&c?(0,Z.jsx)(be,{amount:c,currency:`USD`,format:`$0.00[00]`}):`-`})]}),(0,Z.jsx)(O,{}),a&&(0,Z.jsx)(r,{size:`sm`,onClick:a,variant:`ghost`,children:`View Logs`}),o&&i&&(0,Z.jsx)(r,{size:`md`,variant:`ghost`,onClick:()=>{!o||!p.data||m(p.data.predictors)},children:`Apply Selected Step`}),f.data&&i&&(0,Z.jsxs)(r,{size:`md`,colorPalette:`green`,onClick:()=>{f.data&&m(f.data.predictors)},children:[(0,Z.jsx)(oe,{}),` Apply Best Optimization`]})]})}function Pe(){let e=N(),{project:t}=ue(),{experiment:n}=e.query,r=P.experiments.getExperimentBySlugOrId.useQuery({projectId:t?.id??``,experimentSlug:n},{enabled:!!t&&typeof n==`string`}),i=ae(r.error),o=r.isError&&!i;return i?(0,Z.jsx)(M,{children:(0,Z.jsx)(a,{padding:6,children:(0,Z.jsxs)(S,{status:`warning`,children:[(0,Z.jsx)(w,{}),(0,Z.jsx)(x,{children:`Experiment not found`}),(0,Z.jsx)(C,{children:`The experiment you're looking for doesn't exist or you don't have access to it.`})]})})}):o?(0,Z.jsx)(M,{children:(0,Z.jsx)(a,{padding:6,children:(0,Z.jsxs)(S,{status:`error`,children:[(0,Z.jsx)(w,{}),(0,Z.jsx)(x,{children:`Failed to load experiment`}),(0,Z.jsx)(C,{children:r.error?.message??`An unexpected error occurred while loading the experiment.`})]})})}):(0,Z.jsx)(M,{children:t&&r.data?.type===Y.ExperimentType.DSPY?(0,Z.jsx)(Oe,{project:t,experiment:r.data}):t&&r.data?.type===Y.ExperimentType.BATCH_EVALUATION?(0,Z.jsx)(we,{project:t,experiment:r.data}):!t||r.data===void 0||r.data.type===Y.ExperimentType.BATCH_EVALUATION_V2||r.data.type===Y.ExperimentType.EVALUATIONS_V3?(0,Z.jsx)(Se,{project:t,experiment:r.data}):(0,Z.jsx)(a,{padding:6,children:(0,Z.jsxs)(S,{status:`warning`,children:[(0,Z.jsx)(w,{}),(0,Z.jsx)(x,{children:`Unknown experiment type`}),(0,Z.jsxs)(C,{children:[`This experiment has an unrecognized type: `,r.data.type]})]})})})}export{Pe as default};
|
|
2
|
-
//# sourceMappingURL=_experiment_-DYMW8ia6.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{i as t}from"./portal-FJIui2Z2.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{Nn as a,on as o,yn as s}from"./useLiteMemberGuard-klZnweA7.js";import{t as c}from"./h-stack-CMPhqSp5.js";import{t as l}from"./v-stack-ClAMS101.js";import{t as u}from"./GovernanceLayout-COAapH9g.js";import{r as d}from"./next-router-Bn5Y8Iek.js";import{n as f}from"./api-BK6L1im2.js";import{Rt as p,ni as m,t as h}from"./index-CUhcyBp3.js";import{t as g}from"./WithFeatureFlagGuard-DwfApI3b.js";import{t as _}from"./WithPermissionGuard-BP1dFkpM.js";var v=e(s()),y=n(),b=e=>e===0?`$0.00`:(0,v.default)(e).format(`$0,0.00`),x=e=>{if(!e)return`—`;let t=typeof e==`string`?new Date(e):e;if(Number.isNaN(t.getTime()))return`—`;let n=Date.now()-t.getTime();if(n<0)return`just now`;let r=Math.floor(n/1e3);if(r<60)return`${r}s ago`;let i=Math.floor(r/60);if(i<60)return`${i}m ago`;let a=Math.floor(i/60);return a<24?`${a}h ago`:`${Math.floor(a/24)}d ago`};function S(){let e=d(),n=typeof e.query.id==`string`?e.query.id:null,{organization:s,organizations:g}=p({redirectToOnboarding:!1}),_=s?.id??``,S=g?.flatMap(e=>e.teams??[]).find(e=>e.id===n)?.projects?.[0]?.slug??null,w=f.activityMonitor.spendByTeam.useQuery({organizationId:_,windowDays:30,limit:500},{enabled:!!_,refetchOnWindowFocus:!1}),T=(w.data??[]).find(e=>e.teamId===n);return(0,y.jsx)(u,{pageTitle:T?`${T.teamName} · AI Governance · LangWatch`:`Team · AI Governance · LangWatch`,children:(0,y.jsxs)(l,{align:`stretch`,gap:4,width:`full`,maxW:`container.xl`,children:[(0,y.jsxs)(l,{align:`start`,gap:1,children:[(0,y.jsxs)(i,{fontSize:`xs`,color:`fg.muted`,children:[(0,y.jsx)(h,{href:`/settings/governance`,color:`blue.600`,children:`← AI Governance`}),` `,`·`,` `,(0,y.jsx)(h,{href:`/settings/governance/teams`,color:`blue.600`,children:`All teams`})]}),(0,y.jsxs)(c,{gap:2,children:[(0,y.jsx)(r,{width:`14px`,height:`14px`,borderRadius:`full`,backgroundColor:T?o(T.teamName):`fg.muted`}),(0,y.jsx)(m,{size:`md`,children:T?.teamName??`Team not found`})]})]}),w.isLoading?(0,y.jsx)(t,{}):T?(0,y.jsxs)(y.Fragment,{children:[(0,y.jsxs)(a,{columns:{base:1,md:4},gap:3,children:[(0,y.jsx)(C,{label:`Spend (30 d)`,value:b(T.spendUsd)}),(0,y.jsx)(C,{label:`Requests`,value:(0,v.default)(T.requestCount).format(`0,0`)}),(0,y.jsx)(C,{label:`Last active`,value:x(T.lastActivityIso)}),(0,y.jsx)(C,{label:`Sources`,value:`${T.sourceCount} ${T.sourceCount===1?`source`:`sources`}`})]}),(0,y.jsxs)(r,{borderWidth:`1px`,borderColor:`border.muted`,borderRadius:`md`,padding:4,children:[(0,y.jsx)(i,{fontSize:`sm`,fontWeight:`medium`,marginBottom:1,children:`Detail metrics`}),(0,y.jsx)(i,{fontSize:`xs`,color:`fg.muted`,marginBottom:3,children:`Per-day spend, per-user breakdown, and model mix for this team will land here in a follow-up.`}),S&&(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(h,{href:`/${S}/traces`,color:`blue.600`,fontSize:`sm`,fontWeight:`medium`,children:`View this team's workspace traces →`}),(0,y.jsx)(i,{fontSize:`xs`,color:`fg.subtle`,marginTop:1,marginBottom:3,children:`The trace explorer opens with the team's data. A 'Viewing as admin' banner stays present + the access is logged to /settings/audit-log.`})]}),(0,y.jsx)(h,{href:`/settings/governance`,color:`blue.600`,fontSize:`sm`,fontWeight:`medium`,children:`See this team in the bird's-eye chart →`}),(0,y.jsxs)(i,{fontSize:`xs`,color:`fg.subtle`,marginTop:1,children:[`The chart's `,`'By Team'`,` toggle exercises the same data through one orthogonal lens until the dedicated drilldown ships.`]})]})]}):(0,y.jsx)(r,{borderWidth:`1px`,borderColor:`border.muted`,borderRadius:`md`,padding:5,children:(0,y.jsx)(i,{fontSize:`sm`,color:`fg.muted`,children:`No spend data for this team in the last 30 days. The team may not have any associated ingestion sources reporting activity yet.`})})]})})}function C({label:e,value:t}){return(0,y.jsxs)(r,{borderWidth:`1px`,borderColor:`border.muted`,borderRadius:`md`,padding:3,children:[(0,y.jsx)(i,{fontSize:`xs`,fontWeight:`semibold`,color:`fg.muted`,textTransform:`uppercase`,letterSpacing:`wider`,children:e}),(0,y.jsx)(m,{as:`span`,size:`sm`,marginTop:1,children:t})]})}var w=g(`release_ui_ai_governance_enabled`,{bypassOnboardingRedirect:!0})(_(`organization:manage`,{bypassOnboardingRedirect:!0})(S));export{w as default};
|
|
2
|
-
//# sourceMappingURL=_id_-B8SzykYR.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{t as o}from"./text-A3qvcMyN.js";import{n as s}from"./toaster-CRP22oRW.js";import{a as c,i as l,n as u,r as d,t as f}from"./alert-C5hocQt_.js";import{l as p}from"./parseHeaderColumns-I6A9jUhX.js";import{t as m}from"./DashboardLayout-RHGL-98_.js";import{r as h}from"./next-router-Bn5Y8Iek.js";import{n as g}from"./api-BK6L1im2.js";import{Rt as _,pr as v}from"./index-CUhcyBp3.js";import{t as y}from"./DatasetEditorTable-CwI345qA.js";var b=e(t()),x=i();function S(){let e=h(),t=e.query.id,{project:i,hasPermission:S}=_(),[C,w]=(0,b.useState)(!1),T=g.dataset.getById.useQuery({projectId:i?.id??``,datasetId:t},{enabled:!!i&&!!t,refetchInterval:e=>e?.status===`processing`||e?.status===`uploading`?3e3:!1}),E=T.data?.status,D=T.isSuccess&&T.data==null,O=T.isSuccess&&T.data!=null&&(E===`ready`||E==null),k=()=>{e.push({pathname:`/${i?.slug}/experiments/workbench`,query:{datasetId:t}})},A=async()=>{if(i){w(!0);try{await p({projectId:i.id,datasetId:t}),await T.refetch()}catch(e){s.create({title:`Could not retry`,description:e instanceof Error?e.message:`Please try again in a moment.`,type:`error`,meta:{closable:!0}})}finally{w(!1)}}};return(0,x.jsx)(m,{children:(0,x.jsxs)(a,{width:`full`,paddingX:6,paddingY:6,children:[(E===`uploading`||E===`processing`)&&(0,x.jsxs)(l,{status:`info`,marginBottom:4,children:[(0,x.jsx)(d,{children:(0,x.jsx)(n,{size:`sm`})}),(0,x.jsx)(f,{children:(0,x.jsx)(c,{children:`Preparing your dataset, this can take a few minutes`})})]}),E===`failed`&&(0,x.jsxs)(l,{status:`error`,marginBottom:4,children:[(0,x.jsx)(d,{}),(0,x.jsxs)(f,{children:[(0,x.jsx)(c,{children:`We could not prepare your dataset`}),(0,x.jsx)(u,{children:T.data?.statusError??`Something went wrong while processing your file. You can retry.`})]}),(0,x.jsx)(r,{size:`sm`,colorPalette:`red`,variant:`outline`,loading:C,onClick:()=>void A(),children:`Retry`})]}),D&&(0,x.jsx)(o,{color:`fg.muted`,children:`This dataset is no longer available.`}),O?(0,x.jsx)(y,{datasetId:t,readEnabled:O,floatingSelectionBar:!0,headerActions:S(`evaluations:manage`)?(0,x.jsxs)(r,{size:`sm`,colorPalette:`blue`,"data-testid":`run-experiment-from-dataset`,onClick:k,children:[(0,x.jsx)(v,{size:14}),` Run experiment`]}):void 0}):E!==`failed`&&!D&&(0,x.jsx)(o,{color:`fg.muted`,children:`Your dataset will appear here once it is ready.`})]})})}export{S as default};
|
|
2
|
-
//# sourceMappingURL=_id_-BT8l3_4N.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./jsx-runtime-CFwixLRt.js";import{t}from"./box-Ck5lef6C.js";import{t as n}from"./text-A3qvcMyN.js";import{t as r}from"./v-stack-ClAMS101.js";import{r as i}from"./next-router-Bn5Y8Iek.js";import{n as a}from"./api-BK6L1im2.js";import{Rt as o}from"./index-CUhcyBp3.js";import s from"./custom-Dpn85JW8.js";var c=e();function l(){let e=i().query.id,{project:l}=o(),u=a.graphs.getById.useQuery({projectId:l?.id??``,id:e??``},{enabled:!!l?.id&&!!e,retry:!1}),d=u.data?.graph,f=u.data?.name,p=u.data?.alert,m=p!=null&&p.type!=null&&(p.action===`SEND_EMAIL`||p.action===`SEND_SLACK_MESSAGE`)?p:void 0;return u.error?(0,c.jsxs)(r,{align:`start`,p:8,gap:2,children:[(0,c.jsx)(n,{fontSize:`xl`,fontWeight:`bold`,children:`Graph not found`}),(0,c.jsx)(n,{color:`gray.600`,children:`The graph you are looking for does not exist or you do not have access to it.`})]}):u.isLoading?(0,c.jsx)(t,{p:8,children:`Loading…`}):d?(0,c.jsx)(s,{customId:e,graph:d,name:f??``,filters:u.data?.filters,alert:m}):null}export{l as default};
|
|
2
|
-
//# sourceMappingURL=_id_-BTgcDKRo.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{i as t}from"./portal-FJIui2Z2.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{Nn as a,on as o,yn as s}from"./useLiteMemberGuard-klZnweA7.js";import{t as c}from"./h-stack-CMPhqSp5.js";import{t as l}from"./v-stack-ClAMS101.js";import{t as u}from"./GovernanceLayout-COAapH9g.js";import{r as d}from"./next-router-Bn5Y8Iek.js";import{n as f}from"./api-BK6L1im2.js";import{Rt as p,ni as m,t as h}from"./index-CUhcyBp3.js";import{t as g}from"./WithFeatureFlagGuard-DwfApI3b.js";import{t as _}from"./WithPermissionGuard-BP1dFkpM.js";var v=e(s()),y=n(),b=e=>e===0?`$0.00`:(0,v.default)(e).format(`$0,0.00`),x=e=>{if(!e)return`—`;let t=typeof e==`string`?new Date(e):e;if(Number.isNaN(t.getTime()))return`—`;let n=Date.now()-t.getTime();if(n<0)return`just now`;let r=Math.floor(n/1e3);if(r<60)return`${r}s ago`;let i=Math.floor(r/60);if(i<60)return`${i}m ago`;let a=Math.floor(i/60);return a<24?`${a}h ago`:`${Math.floor(a/24)}d ago`};function S(){let e=d(),n=typeof e.query.id==`string`?decodeURIComponent(e.query.id):null,{organization:s}=p({redirectToOnboarding:!1}),g=s?.id??``,_=f.activityMonitor.spendByUser.useQuery({organizationId:g,windowDays:30,limit:500},{enabled:!!g,refetchOnWindowFocus:!1}),S=f.governance.resolveActorPersonalProject.useQuery({organizationId:g,actor:n??``},{enabled:!!g&&!!n,refetchOnWindowFocus:!1}).data,w=(_.data??[]).find(e=>e.actor===n);return(0,y.jsx)(u,{pageTitle:w?`${w.actor} · AI Governance · LangWatch`:`User · AI Governance · LangWatch`,children:(0,y.jsxs)(l,{align:`stretch`,gap:4,width:`full`,maxW:`container.xl`,children:[(0,y.jsxs)(l,{align:`start`,gap:1,children:[(0,y.jsxs)(i,{fontSize:`xs`,color:`fg.muted`,children:[(0,y.jsx)(h,{href:`/settings/governance`,color:`blue.600`,children:`← AI Governance`}),` `,`·`,` `,(0,y.jsx)(h,{href:`/settings/governance/users`,color:`blue.600`,children:`All users`})]}),(0,y.jsxs)(c,{gap:2,children:[(0,y.jsx)(r,{width:`14px`,height:`14px`,borderRadius:`full`,backgroundColor:n?o(n):`fg.muted`}),(0,y.jsx)(m,{size:`md`,children:w?.actor??n??`User not found`})]})]}),_.isLoading?(0,y.jsx)(t,{}):w?(0,y.jsxs)(y.Fragment,{children:[(0,y.jsxs)(a,{columns:{base:1,md:4},gap:3,children:[(0,y.jsx)(C,{label:`Spend (30 d)`,value:b(w.spendUsd)}),(0,y.jsx)(C,{label:`Requests`,value:(0,v.default)(w.requests).format(`0,0`)}),(0,y.jsx)(C,{label:`Last active`,value:x(w.lastActivityIso)}),(0,y.jsx)(C,{label:`Most-used`,value:w.mostUsedTarget??`—`})]}),(0,y.jsxs)(r,{borderWidth:`1px`,borderColor:`border.muted`,borderRadius:`md`,padding:4,children:[(0,y.jsx)(i,{fontSize:`sm`,fontWeight:`medium`,marginBottom:1,children:`Detail metrics`}),(0,y.jsx)(i,{fontSize:`xs`,color:`fg.muted`,marginBottom:3,children:`Per-day spend trend and per-model breakdown for this user will land here in a follow-up.`}),S&&(0,y.jsxs)(y.Fragment,{children:[(0,y.jsxs)(h,{href:`/${S.projectSlug}/traces`,color:`blue.600`,fontSize:`sm`,fontWeight:`medium`,children:[`View `,S.displayName,`'s personal workspace →`]}),(0,y.jsx)(i,{fontSize:`xs`,color:`fg.subtle`,marginTop:1,marginBottom:3,children:`Opens their trace explorer with a 'Viewing as admin' banner. Each access is recorded at /settings/audit-log.`})]}),(0,y.jsx)(h,{href:`/settings/governance`,color:`blue.600`,fontSize:`sm`,fontWeight:`medium`,children:`See this user in the bird's-eye chart →`}),(0,y.jsxs)(i,{fontSize:`xs`,color:`fg.subtle`,marginTop:1,children:[`The chart's `,`'By User'`,` toggle exercises the same data through one orthogonal lens until the dedicated drilldown ships.`]})]})]}):(0,y.jsx)(r,{borderWidth:`1px`,borderColor:`border.muted`,borderRadius:`md`,padding:5,children:(0,y.jsx)(i,{fontSize:`sm`,color:`fg.muted`,children:`No spend data for this user in the last 30 days.`})})]})})}function C({label:e,value:t}){return(0,y.jsxs)(r,{borderWidth:`1px`,borderColor:`border.muted`,borderRadius:`md`,padding:3,children:[(0,y.jsx)(i,{fontSize:`xs`,fontWeight:`semibold`,color:`fg.muted`,textTransform:`uppercase`,letterSpacing:`wider`,children:e}),(0,y.jsx)(m,{as:`span`,size:`sm`,marginTop:1,children:t})]})}var w=g(`release_ui_ai_governance_enabled`,{bypassOnboardingRedirect:!0})(_(`organization:manage`,{bypassOnboardingRedirect:!0})(S));export{w as default};
|
|
2
|
-
//# sourceMappingURL=_id_-BrxUqiAK.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}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{R as o,k as s,rt as c,s as l,z as u}from"./UpgradeModal-BmLw5ONS.js";import{i as d,n as f,r as p,t as m}from"./alert-C5hocQt_.js";import{t as h}from"./DashboardLayout-RHGL-98_.js";import{r as g}from"./next-router-Bn5Y8Iek.js";import{n as _}from"./api-BK6L1im2.js";import{Mr as v}from"./index-CUhcyBp3.js";var y=e(t()),b=r(),x=()=>void 0;function S(){let e=u(),t=c(e=>e.selectedSpanId),n=e?.header??null,r=e?.spanTree??[],o=(0,y.useMemo)(()=>t?r.find(e=>e.spanId===t)??null:null,[t,r]);return n?(0,b.jsxs)(i,{flex:1,minHeight:0,width:`full`,display:`flex`,flexDirection:`column`,overflow:`hidden`,position:`relative`,children:[e?.isSpanDetailTruncated&&(0,b.jsx)(i,{paddingX:4,paddingTop:3,children:(0,b.jsxs)(d,{status:`info`,size:`sm`,variant:`subtle`,width:`full`,children:[(0,b.jsx)(p,{}),(0,b.jsx)(m,{children:(0,b.jsxs)(f,{fontSize:`sm`,children:[`This is a large trace. The timeline below is complete, but step-by-step detail is only shown for the first`,` `,e.spansFull.length.toLocaleString(),` steps.`]})})]})}),(0,b.jsx)(l,{traceId:n.traceId,trace:n,spanTree:r,selectedSpan:o,isLoading:!1,isSpansLoading:!1,onClose:x,readOnly:!0})]}):(0,b.jsx)(v,{flex:1,padding:8,children:(0,b.jsx)(a,{color:`fg.muted`,children:`This trace could not be loaded.`})})}function C(){let e=g(),t=typeof e.query.id==`string`?e.query.id:``,r=_.sharedTrace.get.useQuery({token:t},{enabled:!!t,staleTime:1/0,retry:!1,refetchOnMount:!1,refetchOnWindowFocus:!1,refetchOnReconnect:!1});return r.isError?(0,b.jsx)(v,{height:`100vh`,padding:8,children:(0,b.jsx)(a,{color:`fg.muted`,children:r.error instanceof Error?r.error.message:`This share link is not available.`})}):r.isSuccess?(0,b.jsx)(h,{publicPage:!0,children:(0,b.jsx)(o,{value:r.data,children:(0,b.jsx)(s,{traceId:r.data.header.traceId,isReadOnly:!0,children:(0,b.jsx)(S,{})})})}):(0,b.jsx)(v,{height:`100vh`,padding:8,children:(0,b.jsx)(n,{size:`lg`})})}export{C as default};
|
|
2
|
-
//# sourceMappingURL=_id_-Cke69ccV.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{t as o}from"./text-A3qvcMyN.js";import{ir as s}from"./useLiteMemberGuard-klZnweA7.js";import{n as c}from"./info-CtYT35g4.js";import{t as l}from"./tooltip-Croc0I6e.js";import{n as u}from"./toaster-CRP22oRW.js";import{$ as d,D as f,G as p,Q as m,X as h,Y as g,Z as _,et as v,l as y,nt as b}from"./ExternalImage-DbtOSrKl.js";import{r as x}from"./UpgradeModal-BmLw5ONS.js";import{t as S}from"./h-stack-CMPhqSp5.js";import{t as C}from"./spacer-CbmCSsJg.js";import{t as w}from"./v-stack-ClAMS101.js";import{t as T}from"./AiGatewayLayout-B5Q-EfZV.js";import{t as ee}from"./arrow-left-BWMkb3Ih.js";import{t as te}from"./file-clock-CPAePLdZ.js";import{r as ne}from"./next-router-Bn5Y8Iek.js";import{n as E}from"./api-BK6L1im2.js";import{Rt as re,Zn as ie,ni as D,nr as ae,t as O,w as k}from"./index-CUhcyBp3.js";import{t as A}from"./WithPermissionGuard-BP1dFkpM.js";import{J as j,d as M,g as N,on as P,u as F}from"./CartesianChart-D35vYym3.js";import{t as oe}from"./FieldInfoTooltip-CXhYVsTQ.js";import{t as se}from"./ProviderScopeChips-S0Ctqbwg.js";import{n as I,t as L}from"./AreaChart-CXmFZ9PN.js";import{d as ce,f as le,l as ue,n as de,r as fe,t as pe,u as me}from"./VirtualKeySecretReveal-CKCq8oBA.js";var R=e(t()),z=i(),B=[`PRE`,`POST`,`STREAM_CHUNK`],V={PRE:{wire:`pre`,label:`Pre-request`,hint:`Runs on the inbound prompt before it reaches the provider.`},POST:{wire:`post`,label:`Post-response`,hint:`Runs on the full completion before it returns to the caller.`},STREAM_CHUNK:{wire:`stream_chunk`,label:`Stream chunk`,hint:`Runs on each streamed chunk as it passes through.`}};function H(e){let t=new Set;for(let n of e)for(let e of n.guardrailIds)t.add(e);return t}function he({organizationId:e,vkId:t,projectId:i,projectSlug:s,attachments:l,canAttach:d,onSaved:p}){let m=(0,R.useMemo)(()=>H(l),[l]),[h,g]=(0,R.useState)(m);(0,R.useEffect)(()=>{g(new Set(m))},[m]);let _=E.gatewayGuardrails.list.useQuery({projectId:i??``},{enabled:!!i}),v=E.virtualKeys.update.useMutation({onSuccess:()=>{u.create({title:`Guardrails updated`,type:`success`}),p()},onError:e=>{u.create({title:e.message.includes(`missing_perm`)?`You don't have permission to attach guardrails in this project`:e.message,type:`error`})}});if(!i)return(0,z.jsx)(U,{children:(0,z.jsx)(o,{fontSize:`sm`,color:`fg.muted`,children:`Guardrails are project-scoped. Scope this key to a single project to attach the project's guardrails.`})});if(_.isLoading)return(0,z.jsx)(U,{children:(0,z.jsx)(n,{size:`sm`})});let y=_.data??[];if(y.length===0)return(0,z.jsx)(U,{children:(0,z.jsxs)(o,{fontSize:`sm`,color:`fg.muted`,children:[`No guardrails defined in this project yet.`,` `,s?(0,z.jsx)(O,{href:`/settings/gateway/guardrails`,color:`blue.500`,fontWeight:`medium`,children:`Create one`}):`Create one from the Guardrails admin page`,` `,`to attach it here.`]})});let b=B.map(e=>({dir:e,meta:V[e],rows:y.filter(t=>t.direction===e)})).filter(e=>e.rows.length>0),x=h.size!==m.size||[...h].some(e=>!m.has(e)),C=e=>{g(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})};return(0,z.jsx)(U,{children:(0,z.jsxs)(w,{align:`stretch`,gap:4,children:[b.map(({dir:e,meta:t,rows:n})=>(0,z.jsxs)(a,{children:[(0,z.jsxs)(S,{gap:2,mb:1,children:[(0,z.jsx)(o,{fontSize:`xs`,fontWeight:`semibold`,color:`fg.muted`,children:t.label}),(0,z.jsx)(o,{fontSize:`xs`,color:`fg.subtle`,children:t.hint})]}),(0,z.jsx)(w,{align:`stretch`,gap:1.5,children:n.map(e=>(0,z.jsx)(f,{checked:h.has(e.id),disabled:!d,onCheckedChange:()=>C(e.id),children:(0,z.jsxs)(S,{gap:2,children:[(0,z.jsx)(o,{fontSize:`sm`,children:e.name}),e.failureMode===`FAIL_CLOSED`?(0,z.jsx)(c,{size:`sm`,colorPalette:`red`,variant:`subtle`,children:`fail closed`}):(0,z.jsx)(c,{size:`sm`,colorPalette:`gray`,variant:`subtle`,children:`fail open`})]})},e.id))})]},e)),!d&&(0,z.jsx)(o,{fontSize:`xs`,color:`fg.subtle`,children:`You need the gatewayGuardrails:attach permission in this project to change attachments.`}),(0,z.jsx)(S,{justifyContent:`flex-end`,children:(0,z.jsx)(r,{size:`sm`,colorPalette:`blue`,disabled:!d||!x,loading:v.isPending,onClick:()=>{let n=new Map;for(let e of y){if(!h.has(e.id))continue;let t=V[e.direction].wire,r=n.get(t)??[];r.push(e.id),n.set(t,r)}let r=[...n.entries()].map(([e,t])=>({direction:e,guardrailIds:t})).filter(e=>e.guardrailIds.length>0);v.mutate({organizationId:e,id:t,config:{guardrailAttachments:r}})},children:`Save guardrails`})})]})})}function U({children:e}){return(0,z.jsxs)(a,{children:[(0,z.jsx)(o,{fontSize:`sm`,fontWeight:`semibold`,mb:2,children:`Guardrails`}),(0,z.jsx)(b,{mb:3}),e]})}function W(){let{organization:e,project:t,hasPermission:i}=re(),d=ne(),f=typeof d.query.id==`string`?d.query.id:``,m=e?.id??``,h=E.virtualKeys.get.useQuery({organizationId:m,id:f},{enabled:!!m&&!!f}),g=E.modelProvider.listAllForOrganizationForFrontend.useQuery({organizationId:m},{enabled:!!m}),_=(0,R.useMemo)(()=>e?.teams?.map(e=>({id:e.id,name:e.name}))??[],[e?.teams]),v=(0,R.useMemo)(()=>e?.teams?.flatMap(e=>e.projects.map(t=>({id:t.id,name:`${t.name} · ${e.name}`,teamId:e.id})))??[],[e?.teams]),b=(0,R.useMemo)(()=>{let t=new Map;for(let n of e?.teams??[])t.set(n.id,n.name);return t},[e?.teams]),D=(0,R.useMemo)(()=>{let t=new Map;for(let n of e?.teams??[])for(let e of n.projects)t.set(e.id,e.name);return t},[e?.teams]),A=(0,R.useMemo)(()=>{let e=new Date;return{fromDate:new Date(e.getTime()-720*60*60*1e3).toISOString(),toDate:e.toISOString()}},[]),j=E.gatewayUsage.summaryForVirtualKey.useQuery({projectId:t?.id??``,virtualKeyId:f,fromDate:A.fromDate,toDate:A.toDate},{enabled:!!t?.id&&!!f}),M=E.useContext(),N=E.virtualKeys.rotate.useMutation({onSuccess:()=>M.virtualKeys.get.invalidate({organizationId:m,id:f})}),P=E.virtualKeys.revoke.useMutation({onSuccess:()=>M.virtualKeys.get.invalidate({organizationId:m,id:f})}),[F,I]=(0,R.useState)(!1),[L,B]=(0,R.useState)(!1),[V,H]=(0,R.useState)(!1),[U,W]=(0,R.useState)(null),[q,J]=(0,R.useState)(null),Y=i(`virtualKeys:update`),X=i(`virtualKeys:rotate`),ve=i(`gatewayGuardrails:attach`),Z=h.data,ye=(0,R.useMemo)(()=>le({scopes:Z?.scopes??[],providers:g.data?.providers??[],availableProjects:v,organizationId:m}),[Z?.scopes,g.data?.providers,v,m]),Q=q??ye??`gpt-5-mini`,$=(0,R.useMemo)(()=>{let t=(Z?.scopes??[]).filter(e=>e.scopeType===`PROJECT`);if(t.length!==1)return null;let n=t[0].scopeId;for(let t of e?.teams??[]){let e=t.projects.find(e=>e.id===n);if(e)return{id:e.id,slug:e.slug}}return{id:n,slug:null}},[Z?.scopes,e?.teams]),be=(0,R.useMemo)(()=>Z?.config?.guardrailAttachments??[],[Z?.config]);return(0,z.jsxs)(T,{children:[(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(x.Header,{children:[(0,z.jsx)(S,{children:(0,z.jsx)(O,{href:`/settings/gateway/virtual-keys`,color:`fg.muted`,fontSize:`sm`,children:(0,z.jsxs)(S,{gap:1,children:[(0,z.jsx)(ee,{size:14}),` Virtual Keys`]})})}),(0,z.jsx)(x.Heading,{children:Z?.name??`Virtual key`}),(0,z.jsx)(C,{}),Z&&(0,z.jsxs)(S,{children:[(0,z.jsx)(O,{href:`/settings/audit-log?targetKind=virtual_key&targetId=${Z.id}`,children:(0,z.jsxs)(r,{variant:`outline`,size:`sm`,children:[(0,z.jsx)(te,{size:14}),` Audit history`]})}),Z.status===`active`&&Y&&(0,z.jsxs)(r,{variant:`outline`,size:`sm`,onClick:()=>I(!0),children:[(0,z.jsx)(ae,{size:14}),` Edit`]}),Z.status===`active`&&X&&(0,z.jsxs)(r,{variant:`outline`,size:`sm`,onClick:()=>B(!0),children:[(0,z.jsx)(ie,{size:14}),` Rotate`]}),Z.status===`active`&&Y&&(0,z.jsxs)(r,{colorPalette:`red`,variant:`outline`,size:`sm`,onClick:()=>H(!0),children:[(0,z.jsx)(p,{size:14}),` Revoke`]})]})]}),(0,z.jsx)(a,{padding:6,width:`full`,maxWidth:`1600px`,marginX:`auto`,children:h.isLoading?(0,z.jsx)(n,{}):Z?(0,z.jsxs)(w,{align:`stretch`,gap:6,maxWidth:`900px`,children:[(0,z.jsxs)(G,{title:`Identity`,children:[(0,z.jsx)(K,{label:`Prefix`,children:(0,z.jsxs)(S,{gap:1,children:[(0,z.jsxs)(s,{fontSize:`xs`,children:[Z.displayPrefix,`…`]}),(0,z.jsx)(oe,{description:`First chars of the secret. The full secret is shown only once at create or rotate — if it's lost, rotate the key to mint a fresh one.`})]})}),(0,z.jsx)(K,{label:`Status`,children:(0,z.jsx)(c,{colorPalette:Z.status===`active`?`green`:`red`,children:Z.status})}),Z.description&&(0,z.jsx)(K,{label:`Description`,children:(0,z.jsx)(o,{fontSize:`sm`,children:Z.description})})]}),(0,z.jsxs)(G,{title:`Activity`,children:[(0,z.jsx)(K,{label:`Last used`,children:Z.lastUsedAt?(0,z.jsx)(l,{content:new Date(Z.lastUsedAt).toLocaleString(),children:(0,z.jsx)(o,{fontSize:`sm`,color:`fg.muted`,children:k(new Date(Z.lastUsedAt).getTime())})}):(0,z.jsx)(o,{fontSize:`sm`,color:`fg.muted`,children:`never`})}),(0,z.jsx)(K,{label:`Created`,children:(0,z.jsx)(l,{content:new Date(Z.createdAt).toLocaleString(),children:(0,z.jsx)(o,{fontSize:`sm`,color:`fg.muted`,children:k(new Date(Z.createdAt).getTime())})})}),(0,z.jsx)(K,{label:`Revision`,children:(0,z.jsx)(o,{fontSize:`sm`,color:`fg.muted`,children:Z.revision})})]}),(0,z.jsx)(G,{title:`How to use`,children:(0,z.jsx)(de,{model:Q})}),(0,z.jsx)(G,{title:`Scope & routing`,children:(0,z.jsxs)(w,{align:`stretch`,gap:3,children:[(0,z.jsx)(se,{scopes:(Z.scopes??[]).map(t=>({scopeType:t.scopeType,scopeId:t.scopeId,name:t.scopeType===`ORGANIZATION`?e?.name:t.scopeType===`TEAM`?b.get(t.scopeId):D.get(t.scopeId)})),principal:Z.principalUserId&&Z.principalUser?{name:Z.principalUser.name,email:Z.principalUser.email}:void 0}),(0,z.jsxs)(S,{children:[(0,z.jsx)(o,{fontSize:`sm`,color:`fg.muted`,children:`Routing policy:`}),Z.routingPolicyId?(0,z.jsx)(s,{fontSize:`xs`,children:Z.routingPolicyId}):(0,z.jsx)(o,{fontSize:`sm`,color:`fg.muted`,children:`default cascade — all eligible providers in priority order`})]}),(0,z.jsx)(ce,{scopes:Z.scopes??[],organizationId:m,organizationName:e?.name,availableTeams:_,availableProjects:v,isLoading:g.isLoading,providers:g.data?.providers??[]}),(0,z.jsxs)(a,{children:[(0,z.jsxs)(S,{mb:1.5,alignItems:`center`,gap:2,justifyContent:`space-between`,children:[(0,z.jsx)(o,{fontSize:`xs`,fontWeight:`semibold`,color:`fg.muted`,children:`Eligible model providers`}),(0,z.jsx)(ue,{scopes:Z.scopes??[]})]}),(0,z.jsx)(me,{scopes:Z.scopes??[],organizationId:m,organizationName:e?.name,availableTeams:_,availableProjects:v,isLoading:g.isLoading,providers:g.data?.providers??[],selectedModel:Q,onSelectProviderModel:J})]})]})}),(0,z.jsx)(he,{organizationId:m,vkId:Z.id,projectId:$?.id??null,projectSlug:$?.slug??null,attachments:be,canAttach:ve,onSaved:()=>void h.refetch()}),(0,z.jsx)(_e,{config:Z.config}),(0,z.jsx)(ge,{data:j.data??null})]}):(0,z.jsx)(o,{color:`fg.muted`,children:`Virtual key not found.`})})]}),m&&Z&&(0,z.jsx)(fe,{organizationId:m,vk:F?Z:null,onOpenChange:e=>{e||I(!1)},onSaved:()=>{I(!1),h.refetch()}}),(0,z.jsx)(y,{open:L,onOpenChange:B,title:`Rotate ${Z?.name??`virtual key`}?`,message:`A fresh secret will be minted and shown once. The current secret keeps working for 24h (grace window) so clients can roll over.`,confirmLabel:`Rotate secret`,tone:`warning`,loading:N.isPending,onConfirm:async()=>{if(!(!Z||!m))try{let e=await N.mutateAsync({organizationId:m,id:Z.id});W({name:Z.name,secret:e.secret}),B(!1)}catch(e){u.create({title:e instanceof Error?e.message:`Failed to rotate key`,type:`error`})}}}),(0,z.jsx)(y,{open:V,onOpenChange:H,title:`Revoke ${Z?.name??`virtual key`}?`,message:`Clients using this key start receiving 401s within ~60 seconds. This cannot be undone — revoked keys are never reactivated.`,confirmLabel:`Revoke key`,tone:`danger`,loading:P.isPending,onConfirm:async()=>{if(!(!Z||!m))try{await P.mutateAsync({organizationId:m,id:Z.id}),H(!1)}catch(e){u.create({title:e instanceof Error?e.message:`Failed to revoke key`,type:`error`})}}}),(0,z.jsx)(pe,{open:!!U,onClose:()=>W(null),keyName:U?.name??``,secret:U?.secret??``,model:Q,kind:`rotate`})]})}function G({title:e,children:t}){return(0,z.jsxs)(a,{children:[(0,z.jsx)(D,{size:`sm`,mb:2,children:e}),(0,z.jsx)(b,{mb:3}),(0,z.jsx)(w,{align:`stretch`,gap:2,children:t})]})}function K({label:e,children:t}){return(0,z.jsxs)(S,{gap:4,align:`flex-start`,children:[(0,z.jsx)(o,{fontSize:`sm`,color:`fg.muted`,minWidth:`140px`,children:e}),t]})}function ge({data:e}){if(!e)return(0,z.jsx)(G,{title:`Usage (last 30 days)`,children:(0,z.jsx)(n,{size:`sm`})});if(e.totalRequests===0)return(0,z.jsx)(G,{title:`Usage (last 30 days)`,children:(0,z.jsx)(o,{fontSize:`sm`,color:`fg.muted`,children:`No usage in the last 30 days. Send a request through this virtual key and it'll show up here.`})});let t=e.byDay.map(e=>({day:e.day,spendUsd:Number(e.totalUsd),requests:e.requests}));return(0,z.jsx)(G,{title:`Usage (last 30 days)`,children:(0,z.jsxs)(w,{align:`stretch`,gap:4,children:[(0,z.jsxs)(S,{gap:6,wrap:`wrap`,children:[(0,z.jsx)(q,{label:`Total spend`,value:`$${Number(e.totalUsd).toFixed(2)}`}),(0,z.jsx)(q,{label:`Requests`,value:e.totalRequests.toLocaleString()}),(0,z.jsx)(q,{label:`Avg $/request`,value:J(e.avgUsdPerRequest)}),e.blockedRequests>0&&(0,z.jsx)(q,{label:`Blocked`,value:e.blockedRequests.toLocaleString(),tone:`red`})]}),t.length>=2&&(0,z.jsx)(a,{borderWidth:`1px`,borderColor:`border.subtle`,borderRadius:`lg`,padding:3,height:`180px`,children:(0,z.jsx)(P,{width:`100%`,height:`100%`,children:(0,z.jsxs)(L,{data:t,margin:{top:8,right:8,bottom:0,left:0},children:[(0,z.jsx)(`defs`,{children:(0,z.jsxs)(`linearGradient`,{id:`vkSpendFill`,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[(0,z.jsx)(`stop`,{offset:`0%`,stopColor:`#f97316`,stopOpacity:.35}),(0,z.jsx)(`stop`,{offset:`100%`,stopColor:`#f97316`,stopOpacity:0})]})}),(0,z.jsx)(N,{strokeDasharray:`3 3`,stroke:`#e2e8f0`,vertical:!1}),(0,z.jsx)(M,{dataKey:`day`,tick:{fontSize:11,fill:`#64748b`},tickFormatter:e=>e.slice(5),minTickGap:24}),(0,z.jsx)(F,{tick:{fontSize:11,fill:`#64748b`},tickFormatter:e=>`$${e.toFixed(2)}`,width:56}),(0,z.jsx)(j,{formatter:(e,t)=>t===`spendUsd`?[`$${Number(e).toFixed(4)}`,`Spend`]:[e,t],labelFormatter:e=>String(e??``),contentStyle:{fontSize:12}}),(0,z.jsx)(I,{type:`monotone`,dataKey:`spendUsd`,stroke:`#f97316`,strokeWidth:2,fill:`url(#vkSpendFill)`})]})})}),e.byModel.length>0&&(0,z.jsxs)(w,{align:`stretch`,gap:1,children:[(0,z.jsx)(o,{fontSize:`xs`,fontWeight:`semibold`,color:`fg.muted`,children:`Spend by model`}),(0,z.jsx)(S,{gap:2,flexWrap:`wrap`,children:e.byModel.map(e=>(0,z.jsxs)(c,{variant:`outline`,fontSize:`2xs`,children:[e.model,` · $`,Number(e.totalUsd).toFixed(2),` · `,e.requests]},e.model))})]}),e.recentDebits.length>0&&(0,z.jsxs)(w,{align:`stretch`,gap:1,children:[(0,z.jsx)(o,{fontSize:`xs`,fontWeight:`semibold`,color:`fg.muted`,children:`Recent activity`}),(0,z.jsxs)(d,{size:`sm`,variant:`line`,children:[(0,z.jsx)(m,{children:(0,z.jsxs)(v,{children:[(0,z.jsx)(_,{children:`When`}),(0,z.jsx)(_,{children:`Model`}),(0,z.jsx)(_,{children:`Tokens`}),(0,z.jsx)(_,{children:`Amount`}),(0,z.jsx)(_,{children:`Latency`})]})}),(0,z.jsx)(g,{children:e.recentDebits.slice(0,10).map(e=>(0,z.jsxs)(v,{children:[(0,z.jsx)(h,{children:(0,z.jsx)(l,{content:new Date(e.occurredAt).toLocaleString(),children:(0,z.jsx)(o,{fontSize:`xs`,color:`fg.muted`,children:k(new Date(e.occurredAt).getTime())})})}),(0,z.jsx)(h,{children:(0,z.jsx)(s,{fontSize:`xs`,children:e.model})}),(0,z.jsx)(h,{children:(0,z.jsxs)(o,{fontSize:`xs`,color:`fg.muted`,children:[e.tokensInput.toLocaleString(),` →`,` `,e.tokensOutput.toLocaleString()]})}),(0,z.jsx)(h,{children:(0,z.jsx)(o,{fontSize:`xs`,children:Y(e.amountUsd)})}),(0,z.jsx)(h,{children:(0,z.jsx)(o,{fontSize:`xs`,color:`fg.muted`,children:e.durationMs===null?`—`:`${e.durationMs}ms`})})]},e.id))})]})]})]})})}function q({label:e,value:t,tone:n}){return(0,z.jsxs)(w,{align:`start`,gap:0,children:[(0,z.jsx)(o,{fontSize:`2xs`,color:`fg.muted`,textTransform:`uppercase`,children:e}),(0,z.jsx)(o,{fontSize:`xl`,fontWeight:`semibold`,color:n===`red`?`red.600`:void 0,children:t})]})}function J(e){let t=typeof e==`number`?e:Number(e);return Number.isFinite(t)?t>=1?`$${t.toFixed(4)}`:t>=.01?`$${t.toFixed(5)}`:`$${t.toFixed(6)}`:`—`}function Y(e){let t=typeof e==`number`?e:Number(e);return Number.isFinite(t)?t>=1?`$${t.toFixed(4)}`:t>=.01?`$${t.toFixed(5)}`:`$${t.toFixed(6)}`:`—`}function _e({config:e}){if(!e)return null;let t=e.metadata?.tags??[],n=e.cache?.mode??`respect`,r=e.rateLimits?.rpm??null,i=e.rateLimits?.rpd??null,a=Object.keys(e.modelAliases??{}).length,l=[`tools`,`mcp`,`urls`,`models`].reduce((t,n)=>t+((e.policyRules?.[n])?.deny?.length??0),0),u=(e.guardrails?.pre?.length??0)+(e.guardrails?.post?.length??0)+(e.guardrails?.streamChunk?.length??0),d=n===`force`?`orange`:n===`disable`?`red`:`green`;return(0,z.jsxs)(G,{title:`Configuration`,children:[t.length>0&&(0,z.jsx)(K,{label:`Tags`,children:(0,z.jsx)(S,{gap:1,flexWrap:`wrap`,children:t.map(e=>(0,z.jsx)(c,{variant:`subtle`,colorPalette:`gray`,fontSize:`2xs`,children:e},e))})}),(0,z.jsx)(K,{label:`Cache mode`,children:(0,z.jsxs)(S,{gap:1,children:[(0,z.jsx)(c,{colorPalette:d,children:n}),n===`force`&&(0,z.jsxs)(o,{fontSize:`xs`,color:`fg.muted`,children:[`ttl `,e.cache?.ttlS??3600,`s`]})]})}),(0,z.jsx)(K,{label:`Rate limits`,children:(0,z.jsxs)(S,{gap:1,flexWrap:`wrap`,children:[(0,z.jsxs)(c,{variant:`outline`,fontSize:`2xs`,children:[`rpm `,r??`∞`]}),(0,z.jsxs)(c,{variant:`outline`,fontSize:`2xs`,children:[`rpd `,i??`∞`]})]})}),(0,z.jsx)(K,{label:`Model aliases`,children:a===0?(0,z.jsx)(o,{fontSize:`sm`,color:`fg.muted`,children:`—`}):(0,z.jsxs)(w,{align:`start`,gap:1,children:[Object.entries(e.modelAliases??{}).slice(0,5).map(([e,t])=>(0,z.jsxs)(S,{gap:1,fontSize:`xs`,children:[(0,z.jsx)(s,{fontSize:`xs`,children:e}),(0,z.jsx)(o,{color:`fg.muted`,children:`→`}),(0,z.jsx)(s,{fontSize:`xs`,children:t})]},e)),a>5&&(0,z.jsxs)(o,{fontSize:`xs`,color:`fg.muted`,children:[`+ `,a-5,` more (see Edit drawer)`]})]})}),(0,z.jsx)(K,{label:`Policy rules`,children:l===0?(0,z.jsx)(o,{fontSize:`sm`,color:`fg.muted`,children:`—`}):(0,z.jsx)(w,{align:`start`,gap:1,children:[`tools`,`mcp`,`urls`,`models`].map(t=>{let n=e.policyRules?.[t]?.deny??[];return n.length===0?null:(0,z.jsxs)(S,{gap:1,flexWrap:`wrap`,fontSize:`xs`,children:[(0,z.jsxs)(o,{fontWeight:`medium`,minWidth:`48px`,children:[t,`:`]}),n.slice(0,4).map(e=>(0,z.jsx)(s,{fontSize:`2xs`,colorPalette:`red`,children:e},e)),n.length>4&&(0,z.jsxs)(o,{color:`fg.muted`,children:[`+ `,n.length-4,` more`]})]},t)})})}),(0,z.jsx)(K,{label:`Guardrails`,children:(0,z.jsx)(o,{fontSize:`sm`,color:u>0?void 0:`fg.muted`,children:u>0?`${u} monitor${u>1?`s`:``} attached (pre/post/stream_chunk)`:`—`})})]})}var X=A(`virtualKeys:view`,{layoutComponent:T})(W);export{X as default};
|
|
2
|
-
//# sourceMappingURL=_id_-CxtJm9qq.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{t as o}from"./text-A3qvcMyN.js";import{ir as s}from"./useLiteMemberGuard-klZnweA7.js";import{n as c}from"./info-CtYT35g4.js";import{t as l}from"./tooltip-Croc0I6e.js";import{n as u}from"./toaster-CRP22oRW.js";import{$ as d,Q as f,X as p,Y as m,Z as h,et as g,l as ee,nt as _}from"./ExternalImage-DbtOSrKl.js";import{at as te,it as ne,ot as v,r as y}from"./UpgradeModal-BmLw5ONS.js";import{a as b,i as x,n as S,r as C,t as w}from"./alert-C5hocQt_.js";import{a as T,i as E,n as D,r as re,t as ie}from"./empty-state-Al7XUd1I.js";import{t as O}from"./h-stack-CMPhqSp5.js";import{t as k}from"./spacer-CbmCSsJg.js";import{t as A}from"./v-stack-ClAMS101.js";import{t as j}from"./createLucideIcon-WbxVGt4j.js";import{t as M}from"./AiGatewayLayout-B5Q-EfZV.js";import{t as ae}from"./archive-By2KlORp.js";import{t as oe}from"./arrow-left-BWMkb3Ih.js";import{t as se}from"./file-clock-CPAePLdZ.js";import{r as ce}from"./next-router-Bn5Y8Iek.js";import{n as N}from"./api-BK6L1im2.js";import{Rt as le,ni as P,nr as ue,t as F,w as I}from"./index-CUhcyBp3.js";import{t as L}from"./WithPermissionGuard-BP1dFkpM.js";import{t as R}from"./formatBudgetUsd-BYb25IkY.js";import{t as z}from"./BudgetEditDrawer-CGUdeHXR.js";var B=j(`receipt`,[[`path`,{d:`M12 17V7`,key:`pyj7ub`}],[`path`,{d:`M16 8h-6a2 2 0 0 0 0 4h4a2 2 0 0 1 0 4H8`,key:`1elt7d`}],[`path`,{d:`M4 3a1 1 0 0 1 1-1 1.3 1.3 0 0 1 .7.2l.933.6a1.3 1.3 0 0 0 1.4 0l.934-.6a1.3 1.3 0 0 1 1.4 0l.933.6a1.3 1.3 0 0 0 1.4 0l.933-.6a1.3 1.3 0 0 1 1.4 0l.934.6a1.3 1.3 0 0 0 1.4 0l.933-.6A1.3 1.3 0 0 1 19 2a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1 1.3 1.3 0 0 1-.7-.2l-.933-.6a1.3 1.3 0 0 0-1.4 0l-.934.6a1.3 1.3 0 0 1-1.4 0l-.933-.6a1.3 1.3 0 0 0-1.4 0l-.933.6a1.3 1.3 0 0 1-1.4 0l-.934-.6a1.3 1.3 0 0 0-1.4 0l-.933.6a1.3 1.3 0 0 1-.7.2 1 1 0 0 1-1-1z`,key:`ycz6yz`}]]),V=e(t()),H=i();function U(){let{organization:e,project:t,hasPermission:i}=le(),_=ce(),j=typeof _.query.id==`string`?_.query.id:``,P=N.gatewayBudgets.get.useQuery({organizationId:e?.id??``,id:j},{enabled:!!e?.id&&!!j}),L=N.useContext(),U=N.gatewayBudgets.archive.useMutation({onSuccess:async()=>{e?.id&&(await L.gatewayBudgets.list.invalidate({organizationId:e.id}),await L.gatewayBudgets.get.invalidate({organizationId:e.id,id:j}))}}),[K,q]=(0,V.useState)(!1),[me,J]=(0,V.useState)(!1),he=i(`gatewayBudgets:update`),ge=i(`gatewayBudgets:delete`),Y=P.data,_e=async()=>{if(!(!Y||!e))try{await U.mutateAsync({organizationId:e.id,id:Y.id}),J(!1)}catch(e){u.create({title:e instanceof Error?e.message:`Failed to archive`,type:`error`})}},X=Y?Number.parseFloat(Y.spentUsd):0,Z=Y?Number.parseFloat(Y.limitUsd):0,Q=Z>0?Math.min(100,X/Z*100):0,$=!!Y?.archivedAt;return(0,H.jsxs)(M,{children:[(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(y.Header,{children:[(0,H.jsx)(O,{children:(0,H.jsx)(F,{href:`/settings/gateway/budgets`,color:`fg.muted`,fontSize:`sm`,children:(0,H.jsxs)(O,{gap:1,children:[(0,H.jsx)(oe,{size:14}),` Budgets`]})})}),(0,H.jsxs)(y.Heading,{children:[Y?.name??`Budget`,$&&(0,H.jsx)(c,{colorPalette:`gray`,ml:2,children:`archived`})]}),(0,H.jsx)(k,{}),Y&&(0,H.jsxs)(O,{children:[(0,H.jsx)(F,{href:`/settings/audit-log?targetKind=budget&targetId=${Y.id}`,children:(0,H.jsxs)(r,{variant:`outline`,size:`sm`,children:[(0,H.jsx)(se,{size:14}),` Audit history`]})}),!$&&he&&(0,H.jsxs)(r,{variant:`outline`,size:`sm`,onClick:()=>q(!0),children:[(0,H.jsx)(ue,{size:14}),` Edit`]}),!$&&ge&&(0,H.jsxs)(r,{colorPalette:`red`,variant:`outline`,size:`sm`,onClick:()=>J(!0),children:[(0,H.jsx)(ae,{size:14}),` Archive`]})]})]}),(0,H.jsx)(a,{padding:6,width:`full`,maxWidth:`1600px`,marginX:`auto`,children:P.isLoading?(0,H.jsx)(n,{}):Y?(0,H.jsxs)(A,{align:`stretch`,gap:6,maxWidth:`960px`,children:[!Y.spendAvailable&&(0,H.jsxs)(x,{status:`warning`,"data-testid":`budget-spend-unavailable`,children:[(0,H.jsx)(C,{}),(0,H.jsxs)(w,{children:[(0,H.jsx)(b,{children:`Spend figures are unavailable`}),(0,H.jsx)(S,{children:`Spend cannot be totalled right now, so this budget is not stopping or warning about anything.`})]})]}),Y.unreachableByAnyKey&&(0,H.jsxs)(x,{status:`warning`,"data-testid":`budget-unreachable-alert`,children:[(0,H.jsx)(C,{}),(0,H.jsxs)(w,{children:[(0,H.jsx)(b,{children:`No key sends traffic here`}),(0,H.jsx)(S,{children:`Traffic is attributed to the project a key is scoped to. No active key is scoped so that its traffic reaches this budget, so it will stay at zero and never stop a request.`})]})]}),(0,H.jsx)(W,{title:`Utilization`,children:(0,H.jsxs)(A,{align:`stretch`,gap:2,children:[Y.spendAvailable?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(O,{children:[(0,H.jsx)(o,{fontWeight:`medium`,fontSize:`2xl`,children:R(X)}),(0,H.jsxs)(o,{color:`fg.muted`,children:[`/ `,R(Z)]}),(0,H.jsx)(k,{}),(0,H.jsxs)(c,{colorPalette:Q>=100?`red`:Q>=80?`orange`:`green`,children:[Q.toFixed(1),`% used`]})]}),(0,H.jsx)(te,{value:Q,size:`sm`,colorPalette:Q>=100?`red`:Q>=80?`orange`:`green`,children:(0,H.jsx)(v,{children:(0,H.jsx)(ne,{})})})]}):(0,H.jsxs)(O,{children:[(0,H.jsx)(o,{fontWeight:`medium`,fontSize:`2xl`,color:`fg.muted`,children:`Unavailable`}),(0,H.jsxs)(o,{color:`fg.muted`,children:[`/ `,R(Z)]})]}),(0,H.jsxs)(O,{fontSize:`xs`,color:`fg.muted`,children:[(0,H.jsxs)(o,{children:[`Window: `,(0,H.jsx)(`strong`,{children:Y.window.toLowerCase()})]}),(0,H.jsx)(o,{children:`·`}),(0,H.jsxs)(o,{children:[`Resets:`,` `,(0,H.jsx)(`strong`,{children:Y.window===`TOTAL`?`never`:(0,H.jsx)(l,{content:new Date(Y.resetsAt).toLocaleString(),children:(0,H.jsx)(`span`,{children:I(new Date(Y.resetsAt).getTime())})})})]}),(0,H.jsx)(o,{children:`·`}),(0,H.jsxs)(o,{children:[`On breach:`,` `,(0,H.jsx)(`strong`,{children:Y.onBreach.toLowerCase()})]})]})]})}),(0,H.jsxs)(W,{title:`Identity`,children:[(0,H.jsx)(G,{label:`ID`,children:(0,H.jsx)(s,{fontSize:`xs`,children:Y.id})}),Y.description&&(0,H.jsx)(G,{label:`Description`,children:(0,H.jsx)(o,{fontSize:`sm`,children:Y.description})}),(0,H.jsx)(G,{label:`Scope`,children:(0,H.jsx)(de,{target:Y.scopeTarget,projectSlug:t?.slug??null})}),(0,H.jsx)(G,{label:`Created`,children:(0,H.jsx)(l,{content:new Date(Y.createdAt).toLocaleString(),children:(0,H.jsx)(o,{fontSize:`sm`,color:`fg.muted`,children:I(new Date(Y.createdAt).getTime())})})}),Y.lastResetAt&&(0,H.jsx)(G,{label:`Last reset`,children:(0,H.jsx)(l,{content:new Date(Y.lastResetAt).toLocaleString(),children:(0,H.jsx)(o,{fontSize:`sm`,color:`fg.muted`,children:I(new Date(Y.lastResetAt).getTime())})})}),Y.timezone&&(0,H.jsx)(G,{label:`Timezone`,children:(0,H.jsx)(s,{fontSize:`xs`,children:Y.timezone})})]}),(0,H.jsxs)(W,{title:`Recent activity`,children:[Y.recentLedger.length===0?(0,H.jsx)(E,{size:`sm`,children:(0,H.jsxs)(ie,{children:[(0,H.jsx)(re,{children:(0,H.jsx)(B,{size:24})}),(0,H.jsx)(T,{children:`No usage yet`}),(0,H.jsx)(D,{children:`Activity shows up here after the first completed request against a virtual key in this scope.`})]})}):(0,H.jsxs)(d,{size:`sm`,children:[(0,H.jsx)(f,{children:(0,H.jsxs)(g,{children:[(0,H.jsx)(h,{children:`When`}),(0,H.jsx)(h,{children:`Virtual key`}),(0,H.jsx)(h,{children:`Model`}),(0,H.jsx)(h,{children:`Amount`}),(0,H.jsx)(h,{children:`Status`})]})}),(0,H.jsx)(m,{children:Y.recentLedger.map(e=>(0,H.jsxs)(g,{children:[(0,H.jsx)(p,{children:(0,H.jsx)(l,{content:new Date(e.occurredAt).toLocaleString(),children:(0,H.jsx)(o,{fontSize:`xs`,color:`fg.muted`,children:I(new Date(e.occurredAt).getTime())})})}),(0,H.jsx)(p,{children:(0,H.jsx)(F,{href:`/settings/gateway/virtual-keys/${e.virtualKeyId}`,color:`orange.600`,children:(0,H.jsx)(o,{fontSize:`sm`,children:e.virtualKeyName})})}),(0,H.jsx)(p,{children:(0,H.jsx)(s,{fontSize:`xs`,children:e.model})}),(0,H.jsx)(p,{children:pe(e.amountUsd)}),(0,H.jsx)(p,{children:(0,H.jsx)(fe,{status:e.status})})]},e.id))})]}),(0,H.jsx)(o,{fontSize:`xs`,color:`fg.muted`,mt:1,children:`Most recent 20 requests. See Usage for aggregates over the full history.`})]})]}):(0,H.jsx)(o,{color:`fg.muted`,children:`Budget not found.`})})]}),(0,H.jsx)(z,{budget:K&&Y?Y:null,onOpenChange:e=>{e||q(!1)},onSaved:()=>{q(!1),P.refetch()}}),(0,H.jsx)(ee,{open:me,onOpenChange:J,title:`Archive ${Y?.name??`budget`}?`,message:`Debits against this budget stop counting. The historical ledger is preserved but new requests route as if the budget didn't exist.`,confirmLabel:`Archive`,tone:`warning`,loading:U.isPending,onConfirm:_e})]})}function W({title:e,children:t}){return(0,H.jsxs)(a,{children:[(0,H.jsx)(P,{size:`sm`,mb:2,children:e}),(0,H.jsx)(_,{mb:3}),(0,H.jsx)(A,{align:`stretch`,gap:2,children:t})]})}function G({label:e,children:t}){return(0,H.jsxs)(O,{gap:4,align:`flex-start`,children:[(0,H.jsx)(o,{fontSize:`sm`,color:`fg.muted`,minWidth:`140px`,children:e}),t]})}function de({target:e,projectSlug:t}){let n=e.kind.toLowerCase().replace(`_`,` `),r=e.kind===`VIRTUAL_KEY`?`/settings/gateway/virtual-keys/${e.id}`:null;return(0,H.jsxs)(O,{gap:2,align:`baseline`,children:[(0,H.jsx)(c,{colorPalette:`gray`,children:n}),r?(0,H.jsx)(F,{href:r,color:`orange.600`,children:(0,H.jsx)(o,{fontSize:`sm`,fontWeight:`medium`,children:e.name})}):(0,H.jsx)(o,{fontSize:`sm`,fontWeight:`medium`,children:e.name}),e.secondary&&(0,H.jsx)(s,{fontSize:`xs`,color:`fg.muted`,children:e.secondary})]})}function fe({status:e}){return(0,H.jsx)(c,{colorPalette:e===`SUCCESS`?`green`:e===`BLOCKED_BY_GUARDRAIL`?`red`:e===`PROVIDER_ERROR`?`orange`:`gray`,children:e.toLowerCase()})}function pe(e){let t=typeof e==`number`?e:Number(e);return Number.isFinite(t)?t>=1?`$${t.toFixed(4)}`:t>=.01?`$${t.toFixed(5)}`:`$${t.toFixed(6)}`:`—`}var K=L(`gatewayBudgets:view`,{layoutComponent:M})(U);export{K as default};
|
|
2
|
-
//# sourceMappingURL=_id_-DGNS0pL2.js.map
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{t}from"./react-BUD3sqOU.js";import{en 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{t as o}from"./skeleton-YwQIu7Tp.js";import{t as s}from"./text-A3qvcMyN.js";import{M as c,nr as l,rr as u,tr as d}from"./useLiteMemberGuard-klZnweA7.js";import"./tooltip-Croc0I6e.js";import{n as f}from"./toaster-CRP22oRW.js";import{I as p}from"./ExternalImage-DbtOSrKl.js";import{r as m}from"./external-link-BzETHrAG.js";import{t as h}from"./icon-CkSWK_vf.js";import{at as g,it as _,ot as v}from"./UpgradeModal-BmLw5ONS.js";import{r as y,t as b}from"./card-54_vstoB.js";import{t as x}from"./icon-button-Ce2kwA7j.js";import{t as S}from"./container-CAygaZzW.js";import{t as C}from"./h-stack-CMPhqSp5.js";import{t as w}from"./spacer-CbmCSsJg.js";import{rt as T}from"./immer-tl_oI9yy.js";import{t as E}from"./v-stack-ClAMS101.js";import{t as D}from"./DashboardLayout-RHGL-98_.js";import{i as ee,o as O,r as k,t as te}from"./langyHomeSuggestions-B0_Fr3Q2.js";import{r as A}from"./next-router-Bn5Y8Iek.js";import{n as j}from"./api-BK6L1im2.js";import{a as M,t as N}from"./CustomGraph-C3a1gzo6.js";import{c as P}from"./auth-client-4OIM4EvK.js";import{C as F,Dt as I,F as L,G as ne,N as re,S as R,Tn as z,W as B,X as ie,Zt as ae,b as V,c as oe,cn as H,dn as se,dt as U,en as W,g as ce,i as le,kn as ue,kt as de,l as fe,mn as pe,n as me,o as he,ot as ge,qt as _e,wn as ve}from"./lu-DlSq9Be4.js";import{D as ye,E as be,Er as xe,In as Se,Mn as Ce,Mt as we,Or as Te,Rt as G,Y as K,_t as Ee,h as De,it as Oe,k as ke,kr as Ae,m as je,n as Me,ni as Ne,t as Pe,vt as Fe,w as Ie}from"./index-CUhcyBp3.js";import{l as Le,r as Re,t as q,u as ze}from"./react-FE7US63s.js";import{n as Be}from"./useFeatureFlag-D9ikgDaE.js";import{o as Ve}from"./useSavedViews-CNmeuzC3.js";import{t as He}from"./formatMilliseconds-P4cwJ3go.js";import{a as Ue,n as We}from"./asaplangy-D_DeMaDk.js";import{n as Ge,t as Ke}from"./useShowLangy-BvJ39ifH.js";import{t as qe}from"./formatMoney-CI_YqDED.js";import{t as Je}from"./getSafeReturnToPath-DhtoOW7y.js";import{t as Ye}from"./mesh-gradient-DbHQhAbD.js";var J=e(t(),1);function Xe(e){let t=(0,J.useRef)(0),{isStatic:n}=(0,J.useContext)(Re);(0,J.useEffect)(()=>{if(n)return;let r=({timestamp:n,delta:r})=>{t.current||=n,e(n-t.current,r)};return ze.update(r,!0),()=>Le(r)},[e])}var Y=i(),Ze=`var(--langy-font-serif, "Sentient", "Charter", "Source Serif Pro", Georgia, serif)`;function Qe({cells:e,title:t=`Traces overview`,rangeLabel:r,dashboardsHref:i,isLoading:a=!1,refreshing:c=!1,bare:l=!1}){let u=A();if(e.length===0&&!a)return null;let d=(0,Y.jsxs)(E,{align:`stretch`,gap:l?3.5:5,children:[(0,Y.jsxs)(C,{justify:`space-between`,align:`baseline`,gap:3,wrap:`wrap`,children:[(0,Y.jsxs)(C,{gap:2.5,align:`baseline`,children:[l?(0,Y.jsxs)(s,{fontFamily:`mono`,fontSize:`10px`,fontWeight:`500`,letterSpacing:`0.03em`,textTransform:`uppercase`,color:`fg.muted`,children:[t,r?` · ${r}`:null]}):(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(s,{fontFamily:Ze,fontSize:`18px`,fontWeight:`500`,letterSpacing:`-0.01em`,color:`fg`,children:t}),r?(0,Y.jsx)(s,{fontFamily:`mono`,fontSize:`11px`,letterSpacing:`0.02em`,color:`fg.subtle`,children:r}):null]}),c||a?(0,Y.jsx)(q.span,{"aria-hidden":!0,animate:{opacity:[.25,1,.25]},transition:{duration:1.4,repeat:1/0,ease:`easeInOut`},style:{display:`inline-block`,width:`6px`,height:`6px`,borderRadius:`9999px`,background:`#ED8926`}}):null]}),i?(0,Y.jsx)(n.a,{href:i,onClick:e=>{i&&(e.preventDefault(),u.push(i))},fontFamily:`mono`,fontSize:`12px`,color:`orange.fg`,whiteSpace:`nowrap`,borderBottomWidth:`1px`,borderColor:`transparent`,paddingBottom:`1px`,cursor:`pointer`,transition:`border-color 130ms ease`,_hover:{borderColor:`orange.fg`},children:`Agent analytics →`}):null]}),(0,Y.jsx)(m,{templateColumns:{base:`repeat(2, 1fr)`,md:`repeat(3, 1fr)`,lg:`repeat(auto-fit, minmax(150px, 1fr))`},columnGap:6,rowGap:5,children:e.length===0&&a?Array.from({length:6},(e,t)=>(0,Y.jsxs)(E,{align:`start`,gap:2.5,children:[(0,Y.jsx)(o,{height:`11px`,width:`72px`}),(0,Y.jsx)(o,{height:`24px`,width:`88px`})]},t)):e.map(e=>(0,Y.jsx)(tt,{cell:e},e.label))})]});return l?d:(0,Y.jsx)(We,{padding:{base:4,md:5},children:d})}var $e=900,et=5e3;function tt({cell:e}){let t=Fe(),n=(0,J.useRef)(e.value),r=(0,J.useRef)(0),[i,o]=(0,J.useState)(0);(0,J.useEffect)(()=>{if(n.current===e.value)return;n.current=e.value;let t=Date.now();t-r.current<et||(r.current=t,o(e=>e+1))},[e.value]);let c=e.tone===`vanity`,l=e.tone===`good`?`green.solid`:e.tone===`bad`?`red.solid`:void 0,u=e.tone===`good`?`green.fg`:e.tone===`bad`?`red.fg`:`fg`;return(0,Y.jsxs)(E,{align:`start`,gap:2.5,children:[(0,Y.jsxs)(C,{gap:1.5,align:`center`,children:[l?(0,Y.jsx)(a,{width:`6px`,height:`6px`,borderRadius:`full`,background:l,flexShrink:0}):null,(0,Y.jsx)(s,{fontFamily:`mono`,fontSize:`11.5px`,letterSpacing:`0.02em`,color:`fg.muted`,children:e.label})]}),(0,Y.jsxs)(C,{gap:1.5,align:`baseline`,children:[(0,Y.jsx)(q.span,{style:{display:`inline-block`},animate:i>0&&!t?{scale:[1,1.045,1],textShadow:[`0 0 0px rgba(237, 137, 38, 0)`,`0 0 16px rgba(237, 137, 38, 0.55)`,`0 0 0px rgba(237, 137, 38, 0)`]}:void 0,transition:{duration:$e/1e3,ease:`easeOut`},children:(0,Y.jsx)(s,{fontFamily:`mono`,fontSize:c?`20px`:`26px`,fontWeight:c?`400`:`500`,letterSpacing:`-0.02em`,lineHeight:`1`,fontVariantNumeric:`tabular-nums`,color:u,children:e.value})},i),e.delta?(0,Y.jsxs)(s,{fontFamily:`mono`,fontSize:`11px`,fontWeight:`600`,fontVariantNumeric:`tabular-nums`,whiteSpace:`nowrap`,color:e.deltaTone===`bad`?`red.fg`:e.deltaTone===`good`?`green.fg`:`fg.muted`,children:[e.delta.startsWith(`+`)?`▲`:`▼`,` `,e.delta]}):null]})]})}var nt=`var(--langy-font-serif, "Sentient", "Charter", "Source Serif Pro", Georgia, serif)`,rt=e=>`/${e}/traces`,it=`How do I send my first trace to LangWatch? Walk me through the quickest integration for my stack.`,at=[{phrase:`Generate a dataset`,href:e=>`/${e}/datasets`,ask:`Help me generate my first dataset, what can I build it from, and what makes a good one?`},{phrase:`Run an experiment`,href:e=>`/${e}/experiments`,ask:`How do I run my first experiment here, what should I evaluate first?`},{phrase:`Create a simulation`,href:e=>`/${e}/simulations`,ask:`Help me create my first agent simulation.`}],ot=55,st=28,ct=2400,lt=400;function ut(){let e=Fe(),t=A(),{project:r}=G(),i=K(e=>e.askLangy),a=Oe(),[o,c]=(0,J.useState)({index:0,length:0,deleting:!1});(0,J.useEffect)(()=>{if(e)return;let t=at[o.index%at.length].phrase,n,r;o.deleting?o.length>0?(n=st,r={...o,length:o.length-1}):(n=lt,r={index:(o.index+1)%at.length,length:0,deleting:!1}):o.length<t.length?(n=ot,r={...o,length:o.length+1}):(n=ct,r={...o,deleting:!0});let i=setTimeout(()=>c(r),n);return()=>clearTimeout(i)},[o,e]);let l=at[o.index%at.length],u=e?l.phrase:l.phrase.slice(0,o.length),d=e=>e.button===0&&!e.metaKey&&!e.ctrlKey&&!e.shiftKey&&!e.altKey;return(0,Y.jsxs)(n.div,{children:[(0,Y.jsx)(s,{fontFamily:nt,fontWeight:`400`,fontSize:{base:`16px`,md:`18px`},lineHeight:`1.3`,letterSpacing:`-0.01em`,color:`fg`,maxWidth:`60ch`,children:`Your project is quiet. Send a trace and the watch begins.`}),(0,Y.jsxs)(C,{gap:2.5,marginTop:3,wrap:`wrap`,align:`center`,children:[(0,Y.jsxs)(n.a,{href:r?rt(r.slug):void 0,onClick:e=>{!r||!d(e)||(e.preventDefault(),t.push(rt(r.slug)))},"aria-label":`Send your first trace`,display:`inline-flex`,alignItems:`center`,gap:1.5,fontFamily:`mono`,fontSize:`12.5px`,fontWeight:`600`,whiteSpace:`nowrap`,color:`white`,background:`orange.solid`,borderRadius:`8px`,paddingX:3.5,paddingY:`7px`,cursor:`pointer`,boxShadow:`0 1px 2px rgba(0,0,0,0.12)`,transition:`opacity 130ms ease, transform 130ms ease`,_hover:{opacity:.92,transform:`translateY(-1px)`},_active:{transform:`translateY(0)`},children:[(0,Y.jsx)(ue,{size:13}),`Send your first trace`,(0,Y.jsx)(le,{size:13})]}),a?(0,Y.jsx)(dt,{label:`Walk me through it`,ariaLabel:`Ask Langy how to send your first trace`,onClick:()=>i(it)}):null]}),(0,Y.jsxs)(C,{gap:1.5,marginTop:3.5,align:`baseline`,wrap:`wrap`,children:[(0,Y.jsx)(s,{fontFamily:`mono`,fontSize:`12px`,color:`fg.muted`,children:`Or`}),(0,Y.jsx)(n.button,{type:`button`,onClick:()=>{a?i(l.ask):r&&t.push(l.href(r.slug))},"aria-label":a?`Ask Langy: ${l.phrase}`:`Learn more: ${l.phrase}`,fontFamily:`mono`,fontSize:`12px`,color:`orange.fg`,cursor:`pointer`,textAlign:`left`,borderBottomWidth:`1px`,borderBottomStyle:`dashed`,borderColor:`orange.emphasized`,transition:`border-color 130ms ease`,_hover:{borderColor:`orange.fg`},children:u}),e?null:(0,Y.jsx)(q.span,{"aria-hidden":!0,animate:{opacity:[1,1,0,0]},transition:{duration:1,repeat:1/0,ease:`linear`},style:{display:`inline-block`,marginLeft:`1px`},children:`▍`}),(0,Y.jsx)(n.a,{href:r?l.href(r.slug):void 0,onClick:e=>{!r||!d(e)||(e.preventDefault(),t.push(l.href(r.slug)))},fontFamily:`mono`,fontSize:`12px`,color:`fg.muted`,cursor:`pointer`,whiteSpace:`nowrap`,marginLeft:1,borderBottomWidth:`1px`,borderColor:`transparent`,transition:`color 130ms ease, border-color 130ms ease`,_hover:{color:`fg`,borderColor:`fg.muted`},children:`Learn more →`}),a?(0,Y.jsx)(dt,{label:`Do it with Langy`,onClick:()=>i(l.ask)}):null]})]})}function dt({label:e,ariaLabel:t,onClick:r}){return(0,Y.jsxs)(n.button,{type:`button`,onClick:r,"aria-label":t,display:`inline-flex`,alignItems:`center`,gap:1,fontFamily:`mono`,fontSize:`12px`,color:`orange.fg`,cursor:`pointer`,whiteSpace:`nowrap`,borderBottomWidth:`1px`,borderColor:`transparent`,transition:`border-color 130ms ease`,_hover:{borderColor:`orange.fg`},children:[(0,Y.jsx)(xe,{size:12}),e]})}var ft=`var(--langy-font-serif, "Sentient", "Charter", "Source Serif Pro", Georgia, serif)`,pt={pass:`green.solid`,regression:`red.solid`,fail:`red.solid`},mt={pass:`green.fg`,regression:`red.fg`,fail:`red.fg`},ht={error:`red.solid`,attention:`#c98a2f`,steady:`green.solid`},gt={down:`red.fg`,up:`#c98a2f`,ok:`green.fg`};function _t({data:e,onAsk:t,onInvestigateReceipt:r,onAskSubmit:i,onFeedback:o,status:l}){return(0,Y.jsx)(We,{accent:!0,fill:!0,borderRadius:`14px`,padding:{base:4,md:4},children:(0,Y.jsxs)(E,{align:`stretch`,gap:3,flex:1,minHeight:0,children:[(0,Y.jsxs)(C,{justify:`space-between`,align:`center`,gap:3,wrap:`wrap`,children:[(0,Y.jsxs)(s,{fontFamily:`mono`,fontSize:`11px`,fontWeight:`500`,letterSpacing:`0.04em`,textTransform:`uppercase`,color:`orange.fg`,children:[`Agentic signals · `,e.since]}),e.loop?(0,Y.jsx)(s,{fontFamily:`mono`,fontSize:`11.5px`,color:`fg.muted`,children:e.loop}):null]}),e.quiet?(0,Y.jsx)(ut,{}):(0,Y.jsx)(s,{fontFamily:ft,fontWeight:`400`,fontSize:{base:`16px`,md:`18px`},lineHeight:`1.3`,letterSpacing:`-0.01em`,color:`fg`,children:e.headline}),e.receipts&&e.receipts.length>0?(0,Y.jsxs)(E,{align:`stretch`,gap:2,children:[e.receiptsLabel?(0,Y.jsxs)(C,{justify:`space-between`,align:`center`,gap:3,children:[(0,Y.jsx)(s,{fontFamily:`mono`,fontSize:`10px`,fontWeight:`500`,letterSpacing:`0.03em`,textTransform:`uppercase`,color:`fg.muted`,children:e.receiptsLabel}),o?(0,Y.jsx)(n.button,{type:`button`,onClick:o,fontFamily:`mono`,fontSize:`10.5px`,color:`fg.subtle`,cursor:`pointer`,transition:`color 130ms ease`,_hover:{color:`fg.muted`},children:`Missing a signal? Tell us`}):null]}):null,(0,Y.jsx)(E,{align:`stretch`,gap:`1px`,background:`border.muted`,borderWidth:`1px`,borderColor:`border.muted`,borderRadius:`10px`,overflow:`hidden`,children:e.receipts.map(e=>(0,Y.jsx)(vt,{receipt:e,onInvestigate:r},e.id))})]}):null,e.pills&&e.pills.length>0?(0,Y.jsx)(C,{gap:2,wrap:`wrap`,children:e.pills.map(e=>(0,Y.jsx)(c,{value:e.label,maxValueWidth:`none`},e.label))}):null,e.bars&&e.bars.length>0?(0,Y.jsxs)(E,{align:`stretch`,gap:2,children:[e.scenariosLabel?(0,Y.jsx)(s,{fontFamily:`mono`,fontSize:`10px`,fontWeight:`500`,letterSpacing:`0.03em`,textTransform:`uppercase`,color:`fg.muted`,children:e.scenariosLabel}):null,e.bars.map(e=>(0,Y.jsx)(yt,{bar:e},e.id)),e.barsMore?(0,Y.jsx)(s,{fontFamily:`mono`,fontSize:`12px`,color:`fg.muted`,children:e.barsMore}):null]}):null,e.judge?(0,Y.jsxs)(C,{justify:`space-between`,align:`center`,gap:3,wrap:`wrap`,paddingX:3,paddingY:2,borderWidth:`1px`,borderColor:`border.emphasized`,borderRadius:`10px`,background:`bg.panel`,children:[(0,Y.jsxs)(s,{fontFamily:`mono`,fontSize:`12px`,color:`fg.muted`,children:[`JudgeAgent ·`,` `,(0,Y.jsxs)(s,{as:`span`,color:`green.fg`,children:[e.judge.pass,` pass`]}),e.judge.regressions>0?(0,Y.jsxs)(Y.Fragment,{children:[` · `,(0,Y.jsxs)(s,{as:`span`,color:`red.fg`,children:[e.judge.regressions,` failing`]})]}):null]}),e.judge.note?(0,Y.jsx)(s,{fontFamily:`mono`,fontSize:`10px`,fontWeight:`500`,letterSpacing:`0.03em`,textTransform:`uppercase`,color:`fg.muted`,children:e.judge.note}):null]}):null,e.draftedPr?(0,Y.jsxs)(C,{gap:3,align:`center`,padding:3,borderWidth:`1px`,borderColor:`border.emphasized`,borderRadius:`10px`,background:`bg.panel`,children:[(0,Y.jsx)(a,{color:`orange.fg`,flexShrink:0,children:(0,Y.jsx)(O,{size:15})}),(0,Y.jsxs)(E,{align:`start`,gap:.5,flex:1,minWidth:0,children:[(0,Y.jsx)(s,{fontFamily:`mono`,fontSize:`13px`,color:`fg`,lineClamp:1,children:e.draftedPr.title}),(0,Y.jsxs)(s,{fontFamily:`mono`,fontSize:`12px`,color:`fg.muted`,children:[e.draftedPr.meta,e.draftedPr.added==null?null:(0,Y.jsxs)(Y.Fragment,{children:[` · `,(0,Y.jsxs)(s,{as:`span`,color:`green.fg`,children:[`+`,e.draftedPr.added]}),` `,(0,Y.jsxs)(s,{as:`span`,color:`red.fg`,children:[`−`,e.draftedPr.removed??0]})]})]})]}),(0,Y.jsx)(bt,{label:`Review`,href:e.draftedPr.href,solid:!0})]}):null,l?(0,Y.jsxs)(E,{align:`stretch`,gap:3,paddingTop:1,children:[(0,Y.jsx)(a,{borderTopWidth:`1px`,borderColor:`border.muted`}),l]}):null,t||i&&e.suggestions?.length||e.sessionHref?(0,Y.jsxs)(C,{justify:`space-between`,align:`center`,gap:3,wrap:`wrap`,marginTop:`auto`,paddingTop:2,children:[(0,Y.jsxs)(C,{gap:2,wrap:`wrap`,align:`center`,minWidth:0,children:[t?(0,Y.jsxs)(n.button,{type:`button`,onClick:t,display:`inline-flex`,alignItems:`center`,gap:2,fontFamily:`mono`,fontSize:`12.5px`,color:`fg.muted`,cursor:`pointer`,_hover:{color:`fg`},transition:`color 130ms ease`,children:[`Investigate`,(0,Y.jsx)(a,{as:`kbd`,borderWidth:`1px`,borderColor:`border.emphasized`,borderRadius:`6px`,paddingX:`6px`,paddingY:`1px`,fontSize:`10.5px`,color:`fg.subtle`,children:`⌘I`})]}):null,i?e.suggestions?.map(e=>(0,Y.jsx)(n.button,{type:`button`,onClick:()=>i(e),fontFamily:`mono`,fontSize:`11.5px`,color:`fg.muted`,borderWidth:`1px`,borderColor:`border.muted`,borderRadius:`full`,paddingX:2.5,paddingY:`3px`,cursor:`pointer`,whiteSpace:`nowrap`,transition:`color 130ms ease, border-color 130ms ease`,_hover:{color:`orange.fg`,borderColor:`orange.emphasized`},children:e},e)):null]}),e.sessionHref?(0,Y.jsx)(bt,{label:`Open session`,href:e.sessionHref}):null]}):null]})})}function vt({receipt:e,onInvestigate:t}){let r=A(),i=e.link?.href,o=i?/^https?:\/\//.test(i):!1,c=e.subject??`this signal`,l=e=>{!i||o||(e.preventDefault(),r.push(i))};return(0,Y.jsxs)(a,{position:`relative`,background:`bg.surface`,transition:`background 130ms ease`,_hover:i?{background:`bg.muted`}:void 0,css:{"&:hover .receipt-chevron":{opacity:1,transform:`translateX(0)`}},children:[i?(0,Y.jsx)(n.a,{href:i,...o?{target:`_blank`,rel:`noreferrer`}:{},onClick:l,"aria-label":`Open traces for ${c}`,position:`absolute`,inset:0,zIndex:0,_focusVisible:{outline:`2px solid`,outlineColor:`orange.focusRing`,outlineOffset:`-2px`}}):null,(0,Y.jsxs)(C,{position:`relative`,zIndex:1,pointerEvents:i?`none`:void 0,gap:2.5,align:`center`,paddingX:3,paddingY:2.5,children:[(0,Y.jsx)(a,{width:`7px`,height:`7px`,borderRadius:`full`,flexShrink:0,alignSelf:`center`,marginTop:`-1px`,background:ht[e.severity]}),(0,Y.jsxs)(s,{fontSize:`13px`,color:`fg.muted`,flex:1,minWidth:0,lineHeight:`1.5`,children:[e.subject?(0,Y.jsxs)(s,{as:`span`,fontFamily:`mono`,fontSize:`12.5px`,fontWeight:`600`,color:`fg`,children:[e.subject,` `]}):null,e.detail]}),(0,Y.jsxs)(C,{gap:2.5,flexShrink:0,align:`center`,children:[e.metric?(0,Y.jsx)(s,{fontFamily:`mono`,fontSize:`12px`,whiteSpace:`nowrap`,color:gt[e.metric.tone],fontVariantNumeric:`tabular-nums`,children:e.metric.text}):null,i?(0,Y.jsx)(s,{className:`receipt-chevron`,as:`span`,color:`fg.muted`,fontFamily:`mono`,fontSize:`11px`,whiteSpace:`nowrap`,textDecoration:`underline`,textUnderlineOffset:`3px`,textDecorationColor:`border.emphasized`,opacity:0,transform:`translateX(-3px)`,transition:`opacity 130ms ease, transform 130ms ease`,"aria-hidden":!0,children:e.link?.label??`Open traces`}):null,e.context&&t?(0,Y.jsx)(a,{pointerEvents:`auto`,children:(0,Y.jsxs)(n.button,{type:`button`,"aria-label":`Investigate ${c} in Langy`,display:`inline-flex`,alignItems:`center`,gap:1,fontFamily:`mono`,fontSize:`11px`,color:`orange.fg`,borderWidth:`1px`,borderColor:`orange.emphasized`,borderRadius:`7px`,paddingX:2,paddingY:`3px`,cursor:`pointer`,transition:`border-color 130ms ease, background 130ms ease`,_hover:{borderColor:`orange.fg`,background:`bg.panel`},onClick:n=>{n.stopPropagation(),t(e)},children:[(0,Y.jsx)(xe,{size:11}),`Investigate`]})}):null]})]})]})}function yt({bar:e}){return(0,Y.jsxs)(C,{gap:{base:2.5,md:3.5},align:`center`,display:`grid`,gridTemplateColumns:{base:`1fr`,md:`minmax(0, 200px) 1fr 92px`},children:[(0,Y.jsx)(s,{fontFamily:`mono`,fontSize:`12px`,color:`fg.muted`,lineClamp:1,minWidth:0,children:e.label}),(0,Y.jsx)(a,{height:`8px`,borderRadius:`5px`,background:`langy.barTrack`,overflow:`hidden`,children:(0,Y.jsx)(a,{height:`full`,width:`${Math.max(4,Math.min(100,e.fillPct))}%`,borderRadius:`6px`,background:pt[e.status]})}),(0,Y.jsx)(s,{fontFamily:`mono`,fontSize:`12px`,textAlign:{base:`left`,md:`right`},color:mt[e.status],fontVariantNumeric:`tabular-nums`,children:e.statLabel})]})}function bt({label:e,href:t,solid:r=!1}){let i=A(),a=/^https?:\/\//.test(t)?{href:t,target:`_blank`,rel:`noreferrer`}:{href:t,onClick:e=>{e.preventDefault(),i.push(t)}};return r?(0,Y.jsxs)(n.a,{...a,flexShrink:0,fontFamily:`mono`,fontSize:`12.5px`,whiteSpace:`nowrap`,cursor:`pointer`,color:`fg`,borderWidth:`1px`,borderColor:`border.emphasized`,borderRadius:`9px`,paddingX:3.5,paddingY:`7px`,background:`bg.emphasized`,transition:`border-color 130ms ease, color 130ms ease`,_hover:{borderColor:`orange.emphasized`,color:`orange.fg`},children:[e,` →`]}):(0,Y.jsxs)(n.a,{...a,flexShrink:0,fontFamily:`mono`,fontSize:`12.5px`,whiteSpace:`nowrap`,cursor:`pointer`,color:`orange.fg`,borderBottomWidth:`1px`,borderColor:`transparent`,paddingBottom:`1px`,transition:`border-color 130ms ease`,_hover:{borderColor:`orange.fg`},children:[e,` →`]})}function xt(e,t){let n=e.aggregation===`terms`?`cardinality`:e.aggregation;return e.pipeline?`${t}/${e.metric}/${n}/${e.pipeline.field}/${e.pipeline.aggregation}`:e.key?`${t}/${e.metric}/${n}/${e.key}`:`${t}/${e.metric}/${n}`}var St=4,Ct=2,wt=1.5,Tt=2,Et=2,Dt=1.25,Ot=250;function kt(e){return e.trim().replace(/\b[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}\b/gi,`<id>`).replace(/\b(?:req|run|trace|span|job|task)_[a-z0-9_-]{8,}\b/gi,`<id>`).replace(/\b[0-9a-f]{16,}\b/gi,`<id>`).replace(/\b\d{4}-\d{2}-\d{2}t\d{2}:\d{2}:\d{2}(?:\.\d+)?z\b/gi,`<time>`).replace(/\b\d{6,}\b/g,`<number>`).replace(/\s+/g,` `).toLowerCase()}function At(e,t=92){let n=e.trim().replace(/\s+/g,` `);return n.length<=t?n:`${n.slice(0,t-1)}…`}function jt(e){let t=new Map;for(let n of e){if(!n.value.trim()||n.count<=0)continue;let e=kt(n.value);if(!e)continue;let r=t.get(e);r?(r.count+=n.count,r.values.push(n.value.trim().replace(/\s+/g,` `))):t.set(e,{key:e,values:[n.value.trim().replace(/\s+/g,` `)],count:n.count})}return[...t.values()].sort((e,t)=>t.count-e.count)}function Mt(e){return`"${e.replace(/\\/g,`\\\\`).replace(/"/g,`\\"`)}"`}function Nt(e,t){if(e)return`/${e}/traces#all-traces?${new URLSearchParams({q:t,preset:`30d`}).toString()}`}function Pt({id:e,label:t,query:n,meta:r}){return{context:{id:n,label:t,query:n,...r?{meta:{receiptId:e,...r}}:{}},link:{label:`Open traces`,href:Nt(void 0,n)??`#`}}}function Ft(e,t){return!e.link||!e.context?e:{...e,link:{...e.link,href:Nt(t,e.context.query)??`#`}}}function It(e){let t=jt(e.currentErrorShapes??[]),n=jt(e.previousErrorShapes??[]),r=new Map(n.map(e=>[e.key,e.count])),i=e.previousErrorShapes!==void 0,a=e.previousErrorShapesComplete===!0,o=[];for(let n of t.slice(0,Ct)){let t=r.get(n.key)??0,s=a&&t===0,c=t>0&&n.count>=t+Tt&&n.count/t>=wt,l=n.count>=Et,u=s?`new`:c?`regressed`:l?`repeated`:`observed`,d=At(n.values[0]),f=n.values.map(e=>`errorMessage:${Mt(e)}`),p=f.length===1?f[0]:`(${f.join(` OR `)})`,m=`${u===`observed`?`Error`:`${u} error shape`}: ${d}`,h=Pt({id:`error-shape:${n.key}`,label:m,query:p,meta:{kind:`error-shape`,status:u,count:n.count,...i?{previousCount:t}:{}}});o.push({priority:s?0:c?1:l?4:6,receipt:Ft({id:`error-shape:${n.key}`,severity:`error`,subject:s?`New error shape`:c?`Error shape regressed`:l?`Repeated error shape`:`Error shape observed`,detail:`“${d}” on ${n.count} ${n.count===1?`trace`:`traces`}.`,metric:c?{text:`${n.count} vs ${t}`,tone:`up`}:void 0,...h,askPrompt:`Investigate the ${u} error shape “${d}” across the matching traces. Show the shared evidence and do not claim a root cause unless the traces prove it.`},e.slug)})}let s=[...e.sharedTraceNames??[]].filter(e=>e.value.trim()&&e.count>=Et).sort((e,t)=>t.count-e.count)[0];if(s){let t=At(s.value,60),n=`status:error AND traceName:${Mt(t)}`,r=Pt({id:`shared-trace-name:${kt(t)}`,label:`Shared error signal: ${t}`,query:n,meta:{kind:`shared-signal`,signal:`trace-name`,count:s.count}});o.push({priority:2,receipt:Ft({id:`shared-trace-name:${kt(t)}`,severity:`attention`,subject:`Shared error signal`,detail:`${s.count} errored traces share “${t}”. Correlation, not a confirmed cause.`,...r,askPrompt:`Investigate why ${s.count} errored traces share the trace name “${t}”. Treat it as a correlation, not a confirmed cause, and cite the supporting traces.`},e.slug)})}let c=e.p50Latency,l=e.previousP50Latency;if(c!==void 0&&c>0&&l!==void 0&&l>0){let t=c/l,n=c-l;if(t>=Dt&&n>=Ot){let n=Math.round((t-1)*100),r=`duration:>${Math.round(c)}`,i=Pt({id:`latency-regression`,label:`Latency regression: p50 ${He(c)}`,query:r,meta:{kind:`latency-regression`,currentMs:c,previousMs:l}});o.push({priority:3,receipt:Ft({id:`latency-regression`,severity:`attention`,subject:`Latency regressed`,detail:`p50 is ${n}% slower than the prior 30 days.`,metric:{text:He(c),tone:`up`},...i,askPrompt:`Explain the ${n}% p50 latency regression versus the prior 30 days. Compare the matching slow traces and separate evidence from hypotheses.`},e.slug)})}}if(!o.some(({receipt:e})=>e.id.startsWith(`error-shape:`))&&(e.errorTraces??0)>0){let t=e.errorTraces,n=Pt({id:`errors-unclassified`,label:`${t} errored traces need triage`,query:`status:error`,meta:{kind:`errors-unclassified`,count:t}});o.push({priority:5,receipt:Ft({id:`errors-unclassified`,severity:`error`,subject:`${t} errored ${t===1?`trace`:`traces`}`,detail:`This read cannot prove a shared error shape or cause yet; start with the matching traces.`,...n,askPrompt:`Triage the errored traces in this briefing. Cluster only what the trace evidence supports and say explicitly when a shared cause cannot be proven.`},e.slug)})}return o.sort((e,t)=>e.priority-t.priority).slice(0,St).map(({receipt:e})=>e)}var X=(e,t,n,r)=>({id:e,label:t,status:n,fillPct:r,statLabel:n===`pass`?`pass`:`failing`}),Lt=[{label:`p50 latency`,value:`4.3s`,tone:`vanity`},{label:`Cost / 24h`,value:`$0.0257`,tone:`vanity`},{label:`Traces · threads`,value:`15 · 5`,tone:`vanity`}],Rt={none:{label:`No scenarios`,headline:`Here's where you left off, and what's moved since.`,cells:[]},empty:{label:`Brand-new`,headline:`Your project is quiet. Send a trace and I'll start watching for what changes.`,cells:[]},traces:{label:`Traces, no scenarios`,headline:`50 traces since yesterday. A couple worth a look, the rest healthy.`,cells:[{label:`Traces`,value:`50`,tone:`neutral`},{label:`Errors`,value:`2`,tone:`bad`},{label:`Crash-free`,value:`5 days`,tone:`good`},{label:`p50 latency`,value:`8.4s`,tone:`vanity`},{label:`Cost / 24h`,value:`$0.166`,tone:`vanity`},{label:`Tokens`,value:`252.7k`,tone:`vanity`}]},passing:{label:`All passing`,headline:`All 32 scenarios passing. Nothing needs you right now.`,pills:[{label:`3 scenario sets`}],scenariosLabel:`Last run · 32 concurrent`,bars:[X(`a`,`refund · within policy`,`pass`,98),X(`b`,`refund · outside policy`,`pass`,96),X(`c`,`partial refund · negotiation`,`pass`,94)],judge:{pass:32,regressions:0,note:`rubric audited`},sessionHref:`#`,cells:[{label:`Pass rate`,value:`100%`,tone:`good`,link:`#`},{label:`Regressions`,value:`0`,tone:`good`},{label:`Failing evals`,value:`0`,tone:`good`},...Lt]},mixed:{label:`Mostly passing`,headline:`28 of 32 scenarios passing. A few need a look.`,pills:[{label:`simulator · UserSimulatorAgent`},{label:`32 scenarios · DE / FR / NL`},{label:`rubric · 4 criteria`}],scenariosLabel:`Last run · 32 concurrent · 6 to 9 turns each`,bars:[X(`a`,`refund · within policy`,`pass`,97),X(`b`,`refund · outside policy`,`pass`,94),X(`c`,`angry escalation (DE)`,`fail`,100),X(`d`,`partial refund · negotiation`,`pass`,92)],judge:{pass:28,regressions:4,note:`rubric audited`},sessionHref:`#`,cells:[{label:`Pass rate`,value:`87.5%`,tone:`good`,link:`#`},{label:`Regressions`,value:`4`,tone:`bad`},{label:`Failing evals`,value:`4`,tone:`bad`},...Lt]},failing:{label:`Several failing`,headline:`5 of 18 scenarios failing after the latest deploy.`,pills:[{label:`2 scenario sets`}],scenariosLabel:`Last run · 18 concurrent`,bars:[X(`a`,`checkout · happy path`,`pass`,95),X(`b`,`checkout · declined card`,`fail`,100),X(`c`,`address · ambiguous`,`fail`,100),X(`d`,`refund · partial`,`pass`,90)],judge:{pass:13,regressions:5,note:`rubric audited`},sessionHref:`#`,cells:[{label:`Pass rate`,value:`72%`,tone:`bad`,link:`#`},{label:`Regressions`,value:`5`,tone:`bad`},{label:`Failing evals`,value:`5`,tone:`bad`},...Lt]}},zt=(e,t)=>({link:{label:`Open traces`,href:`#${encodeURIComponent(e)}`},context:{id:e,label:t,query:e},askPrompt:`Investigate ${t}. Separate evidence from hypotheses.`}),Bt={none:void 0,errors:[{id:`errors`,severity:`error`,subject:`New error shape`,detail:`“Provider rate limit” on 4 traces.`,metric:{text:`new`,tone:`up`},...zt(`errorMessage:"Provider rate limit"`,`New error shape: Provider rate limit`)}],latency:[{id:`latency-regression`,severity:`attention`,subject:`Latency regressed`,detail:`p50 is 38% slower than the prior 30 days.`,metric:{text:`8.4s`,tone:`up`},...zt(`duration:>8400`,`Latency regression: p50 8.4s`)}],shared:[{id:`shared-refund-agent`,severity:`attention`,subject:`Shared error signal`,detail:`6 errored traces share “refund-agent”. Correlation, not a confirmed cause.`,...zt(`status:error AND traceName:"refund-agent"`,`Shared error signal: refund-agent`)}],repeated:[{id:`repeated-timeout`,severity:`error`,subject:`Repeated error shape`,detail:`“Upstream request timed out” on 7 traces.`,...zt(`errorMessage:"Upstream request timed out"`,`Repeated error shape: Upstream request timed out`)}],full:[{id:`errors`,severity:`error`,subject:`New error shape`,detail:`“Provider rate limit” on 4 traces.`,metric:{text:`new`,tone:`up`},...zt(`errorMessage:"Provider rate limit"`,`New error shape: Provider rate limit`)},{id:`shared-refund-agent`,severity:`attention`,subject:`Shared error signal`,detail:`6 errored traces share “refund-agent”. Correlation, not a confirmed cause.`,...zt(`status:error AND traceName:"refund-agent"`,`Shared error signal: refund-agent`)},{id:`latency-regression`,severity:`attention`,subject:`Latency regressed`,detail:`p50 is 38% slower than the prior 30 days.`,metric:{text:`8.4s`,tone:`up`},...zt(`duration:>8400`,`Latency regression: p50 8.4s`)}]},Vt={title:`fix: tighten refund-policy prompt for DE escalations`,meta:`drafted by Langy · 4 failing scenarios attached`,added:12,removed:4,href:`#`},Ht={none:void 0,empty:void 0,traces:`"what are my slowest traces?"`,passing:`"anything worth watching this week?"`,mixed:`"why did DE start failing?"`,failing:`"which checkout scenarios broke?"`},Ut=[`mixed`,`failing`,`traces`,`passing`,`none`,`empty`],Wt=[`full`,`errors`,`latency`,`shared`,`repeated`,`none`];function Gt(){let e=[];for(let t of Ut){let n=Rt[t];for(let r of Wt){let i=Bt[r];if(!((t===`none`||t===`empty`)&&r!==`none`&&t===`empty`))for(let a of[!0,!1]){if(a&&t!==`mixed`&&t!==`failing`)continue;let o=`${t}_${r}${a?`_pr`:``}`,s=[n.label];r!==`none`&&s.push(`+ ${r}`),a&&s.push(`+ fix`),e.push({key:o,group:n.label,label:s.join(` `),data:{since:`since yesterday`,loop:n.bars?`median goal to PR · 14 min`:void 0,headline:n.headline,quiet:t===`empty`,receiptsLabel:i?`Needs a look`:void 0,receipts:i,pills:n.pills,scenariosLabel:n.scenariosLabel,bars:n.bars,barsMore:t===`mixed`?`28 more. Faithfulness on angry escalation (DE) dropped 0.91 to 0.62 after this morning's prompt change.`:void 0,judge:n.judge,draftedPr:a?Vt:void 0,askHint:Ht[t],sessionHref:n.sessionHref},statusCells:n.cells})}}}return e}var Kt=Gt();function qt(e){return Kt.find(t=>t.key===e)}var Jt=`langwatch:dev:briefing-mock`,Yt=()=>!1,Xt=new Set;function Zt(){if(typeof window>`u`||!Yt())return null;try{let e=localStorage.getItem(Jt);return e&&qt(e)?e:null}catch{return null}}function Qt(e){if(!(typeof window>`u`)){try{e===null?localStorage.removeItem(Jt):localStorage.setItem(Jt,e)}catch{}Xt.forEach(e=>e())}}function $t(){let[e,t]=(0,J.useState)(null);return(0,J.useEffect)(()=>{t(Zt());let e=()=>t(Zt());return Xt.add(e),window.addEventListener(`storage`,e),()=>{Xt.delete(e),window.removeEventListener(`storage`,e)}},[]),e}var en=4,tn=6e4,nn=3e4,rn=10*6e4,an=It;function on({buckets:e,series:t,metric:n,aggregation:r}){if(!e)return;let i=t.findIndex(e=>e.metric===n&&e.aggregation===r);if(i<0)return;let a=xt(t[i],i),o=0,s=!1;for(let t of e){let e=t[a];typeof e==`number`&&(o+=e,s=!0)}return s?o:void 0}function sn({buckets:e,series:t,groupBy:n,metric:r,aggregation:i}){if(!e)return;let a=t.findIndex(e=>e.metric===r&&e.aggregation===i);if(a<0)return;let o=xt(t[a],a),s=new Map,c=!1;for(let t of e){let e=t[n];if(!(!e||typeof e!=`object`)){c=!0;for(let[t,n]of Object.entries(e)){let e=n[o];typeof e==`number`&&s.set(t,(s.get(t)??0)+e)}}}if(c)return[...s.entries()].map(([e,t])=>({value:e,count:t})).sort((e,t)=>t.count-e.count)}function cn(){let{project:e,hasPermission:t}=G(),n=t(`cost:view`),r=t(`analytics:view`),i=t(`traces:view`),a=$t(),o=j.scenarios.getExternalSetSummaries.useQuery({projectId:e?.id??``},{enabled:!!e?.id&&!a,staleTime:tn,cacheTime:rn,refetchInterval:nn,keepPreviousData:!0}),s=j.home.getRecentItems.useQuery({projectId:e?.id??``,limit:12},{enabled:!!e?.id&&!a,staleTime:tn,cacheTime:rn,keepPreviousData:!0}),c=(0,J.useMemo)(()=>{let e=Date.now();return{startDate:e-720*60*60*1e3,endDate:e,timeZone:Intl.DateTimeFormat().resolvedOptions().timeZone}},[]),l=(0,J.useMemo)(()=>{let e=[{metric:`metadata.trace_id`,aggregation:`cardinality`},{metric:`metadata.thread_id`,aggregation:`cardinality`},{metric:`metadata.user_id`,aggregation:`cardinality`},{metric:`performance.total_tokens`,aggregation:`sum`}];return n&&e.push({metric:`performance.total_cost`,aggregation:`sum`}),e.push({metric:`performance.completion_time`,aggregation:`median`}),e},[n]),u=j.analytics.getTimeseries.useQuery({projectId:e?.id??``,startDate:c.startDate,endDate:c.endDate,filters:{},timeZone:c.timeZone,timeScale:`full`,series:l},{enabled:!!e?.id&&!a&&r,staleTime:tn,cacheTime:rn,refetchInterval:nn,keepPreviousData:!0}),d=(0,J.useMemo)(()=>[{metric:`metadata.trace_id`,aggregation:`cardinality`}],[]),f=j.analytics.getTimeseries.useQuery({projectId:e?.id??``,startDate:c.startDate,endDate:c.endDate,filters:{"traces.error":[`true`]},timeZone:c.timeZone,timeScale:`full`,series:d,groupBy:`traces.trace_name`},{enabled:!!e?.id&&!a&&r,staleTime:tn,cacheTime:rn,refetchInterval:nn,keepPreviousData:!0}),p=j.tracesV2.facetValues.useQuery({projectId:e?.id??``,timeRange:{from:c.startDate,to:c.endDate},facetKey:`errorMessage`,limit:50,offset:0},{enabled:!!e?.id&&!a&&i,staleTime:tn,cacheTime:rn,refetchInterval:nn,keepPreviousData:!0}),m=j.tracesV2.facetValues.useQuery({projectId:e?.id??``,timeRange:{from:c.startDate-(c.endDate-c.startDate),to:c.startDate},facetKey:`errorMessage`,limit:50,offset:0},{enabled:!!e?.id&&!a&&i,staleTime:tn,cacheTime:rn,keepPreviousData:!0});return(0,J.useMemo)(()=>{if(a){let e=qt(a);if(e)return{data:e.data,statusCells:e.statusCells,recentItems:[],isLoading:!1,isAnalyticsLoading:!1,isRefreshing:!1}}let t=e?.slug,c=o.data??[],h=s.data??[],g=o.isLoading&&!o.data,_=r&&u.isLoading&&!u.data,v=r&&f.isLoading&&!f.data||i&&(p.isLoading&&!p.data||m.isLoading&&!m.data),y=!g&&!_&&!v&&(o.isFetching||s.isFetching||u.isFetching||f.isFetching||p.isFetching||m.isFetching),b=c.reduce((e,t)=>({passed:e.passed+t.passedCount,failed:e.failed+t.failedCount,total:e.total+t.totalCount}),{passed:0,failed:0,total:0}),x=b.total>0,S=s.data?.length??0,C=u.data?.currentPeriod,w=(e,t)=>on({buckets:C,series:l,metric:e,aggregation:t}),T=w(`metadata.trace_id`,`cardinality`),E=w(`metadata.thread_id`,`cardinality`),D=w(`metadata.user_id`,`cardinality`),ee=w(`performance.total_tokens`,`sum`),O=n?w(`performance.total_cost`,`sum`):void 0,k=w(`performance.completion_time`,`median`),te=T!==void 0&&T>0,A=(e,t)=>on({buckets:u.data?.previousPeriod,series:l,metric:e,aggregation:t}),j=A(`performance.completion_time`,`median`),M=n?A(`performance.total_cost`,`sum`):void 0,N=A(`metadata.trace_id`,`cardinality`),P=A(`metadata.user_id`,`cardinality`),F=A(`performance.total_tokens`,`sum`),I=(e,t)=>{if(e===void 0||t===void 0||t<=0)return;let n=(e-t)/t*100;if(!Number.isFinite(n)||Math.abs(n)<.5)return;let r=Math.abs(n)>=10?Math.round(Math.abs(n)):Math.round(Math.abs(n)*10)/10;return`${n>0?`+`:`−`}${r}%`},L=e=>e===void 0?void 0:e.startsWith(`+`)?`bad`:`good`,ne=sn({buckets:f.data?.currentPeriod,series:d,groupBy:`traces.trace_name`,metric:`metadata.trace_id`,aggregation:`cardinality`}),re=ne?.reduce((e,t)=>e+t.count,0),R=an({slug:t,currentErrorShapes:p.data?.values,previousErrorShapes:m.data?.values,previousErrorShapesComplete:m.data?m.data.totalDistinct<=m.data.values.length:void 0,sharedTraceNames:ne,errorTraces:re,p50Latency:k,previousP50Latency:j}),z,B=!1;R.length>0?z=`${R.length} ${R.length===1?`signal needs`:`signals need`} attention. Changed errors and repeated evidence are prioritized first.`:v||_?z=`Comparing error shapes and latency with the prior 30 days…`:x&&b.failed>0?z=`${b.passed} of ${b.total} scenarios passing. ${b.failed} need a look.`:x?z=`No supported error or latency change is asking for attention. Recent scenarios are passing.`:te?z=r||i?`No supported error or latency change is asking for attention right now.`:`Trace activity is available, but this view cannot compare errors or latency with your current access.`:S>0?z=`Here's where you left off, and what's moved since.`:(z=`Your project is quiet. Send a trace and I'll start watching for what changes.`,B=!0);let ie=[...c].sort((e,t)=>(t.lastRunTimestamp??0)-(e.lastRunTimestamp??0)).slice(0,en).map(e=>{let t=e.failedCount>0;return{id:e.scenarioSetId,label:e.scenarioSetId,status:t?`fail`:`pass`,fillPct:e.totalCount>0?e.passedCount/e.totalCount*100:0,statLabel:`${e.passedCount}/${e.totalCount} pass`}}),ae=x?[{label:`Pass rate`,value:`${Math.round(b.passed/b.total*100)}%`,tone:b.failed>0?`bad`:`good`,link:t?`/${t}/simulations`:void 0},{label:`Passing`,value:String(b.passed),tone:`neutral`},{label:`Failing`,value:String(b.failed),tone:b.failed>0?`bad`:`good`},{label:`Scenario sets`,value:String(c.length),tone:`vanity`}]:[],V=[];if(k!==void 0&&k>0){let e=I(k,j)??void 0;V.push({label:`p50 latency`,value:He(k),tone:`vanity`,delta:e,deltaTone:L(e)})}if(O!==void 0&&O>0){let e=I(O,M)??void 0;V.push({label:`Cost / 24h`,value:qe({amount:O,currency:`USD`}),tone:`vanity`,delta:e,deltaTone:L(e)})}T!==void 0&&T>0&&V.push({label:`Traces · threads`,value:`${Math.round(T)} · ${Math.round(E??0)}`,tone:`vanity`,delta:I(T,N)??void 0,deltaTone:`neutral`}),D!==void 0&&D>0&&V.push({label:`Users`,value:String(Math.round(D)),tone:`vanity`,delta:I(D,P)??void 0,deltaTone:`neutral`}),ee!==void 0&&ee>0&&V.push({label:`Total tokens`,value:new Intl.NumberFormat(`en`,{notation:`compact`,maximumFractionDigits:1}).format(ee),tone:`vanity`,delta:I(ee,F)??void 0,deltaTone:`neutral`});let oe=[...ae,...V];return{data:{since:x?`since yesterday`:te?`last 30 days`:`last 24 hours`,headline:z,quiet:B,receiptsLabel:R.length>0?`Anomalies`:void 0,receipts:R.length>0?R:void 0,pills:x?[{label:`${c.length} scenario ${c.length===1?`set`:`sets`}`}]:void 0,scenariosLabel:x?`Recent scenario runs`:void 0,bars:ie.length>0?ie:void 0,judge:x?{pass:b.passed,regressions:b.failed,note:`across ${c.length} ${c.length===1?`set`:`sets`}`}:void 0,askHint:x?`"what changed this week?"`:te?`"what changed in my errors?"`:void 0,suggestions:[...R.length>0?[`What changed in my errors?`]:[],...k!==void 0&&k>0?[`Why is p50 latency ${He(k)}?`]:[],...x&&b.failed>0?[`Why are ${b.failed} scenarios failing?`]:[],...O!==void 0&&O>0?[`Where is my cost going?`]:[]].slice(0,3),sessionHref:x&&t?`/${t}/simulations`:void 0},statusCells:oe,recentItems:h,isLoading:g,isAnalyticsLoading:_,isRefreshing:y}},[a,e?.slug,o.data,o.isLoading,o.isFetching,s.data,s.isLoading,s.isFetching,u.data,u.isLoading,u.isFetching,f.data,f.isLoading,f.isFetching,p.data,p.isLoading,p.isFetching,m.data,m.isLoading,m.isFetching,d,l,r,n,i])}function ln(){let{data:e,statusCells:t,isLoading:n,isAnalyticsLoading:r,isRefreshing:i}=cn(),{project:a}=G(),o=Ge(),s=Oe(),c=K(e=>e.openPanel),l=K(e=>e.askLangy),u=K(e=>e.attachContext),d=K(e=>e.setDraft);return!n&&!e?null:n||!e?(0,Y.jsx)(un,{}):(0,Y.jsx)(_t,{data:e,onAsk:o?c:void 0,onAskSubmit:s?t=>{l(t);for(let t of e?.receipts??[])t.context&&u({type:`filter`,id:t.context.id,label:t.context.label,meta:{query:t.context.query,severity:t.severity,...t.context.meta??{}}})}:void 0,onFeedback:o?()=>{d(`Feedback on the anomalies feed: the signal I'm missing is `),c()}:void 0,onInvestigateReceipt:s?e=>{if(!e.context)return;let t=e.subject??e.context.label;l(e.askPrompt??`Investigate the "${t}" signal — what changed, what's the likely cause, and what should I look at first?`),u({type:`filter`,id:e.context.id,label:e.context.label,meta:{query:e.context.query,severity:e.severity,...e.context.meta??{}}})}:void 0,status:(0,Y.jsx)(Qe,{bare:!0,cells:t,rangeLabel:`Last 30 days`,isLoading:r,refreshing:i,dashboardsHref:a?`/${a.slug}/analytics`:void 0})})}function un(){return(0,Y.jsx)(We,{accent:!0,fill:!0,borderRadius:`14px`,padding:{base:4,md:4},children:(0,Y.jsxs)(E,{align:`stretch`,gap:3,flex:1,minHeight:0,children:[(0,Y.jsx)(s,{fontFamily:`mono`,fontSize:`11px`,fontWeight:`500`,letterSpacing:`0.04em`,textTransform:`uppercase`,color:`orange.fg`,opacity:.7,children:`Agentic signals`}),(0,Y.jsxs)(E,{align:`stretch`,gap:2,children:[(0,Y.jsx)(o,{height:`18px`,width:{base:`92%`,md:`72%`}}),(0,Y.jsx)(o,{height:`18px`,width:{base:`68%`,md:`44%`}})]}),(0,Y.jsx)(E,{align:`stretch`,gap:`1px`,background:`border.muted`,borderWidth:`1px`,borderColor:`border.muted`,borderRadius:`10px`,overflow:`hidden`,children:[0,1].map(e=>(0,Y.jsxs)(C,{gap:2.5,align:`center`,paddingX:3,paddingY:2.5,background:`bg.surface`,children:[(0,Y.jsx)(o,{width:`7px`,height:`7px`,borderRadius:`full`}),(0,Y.jsx)(o,{height:`12px`,flex:1,width:e===0?`70%`:`56%`}),(0,Y.jsx)(o,{height:`12px`,width:`34px`})]},e))}),(0,Y.jsxs)(E,{align:`stretch`,gap:3,paddingTop:1,children:[(0,Y.jsx)(a,{borderTopWidth:`1px`,borderColor:`border.muted`}),(0,Y.jsx)(o,{height:`10px`,width:`164px`}),(0,Y.jsx)(C,{gap:6,children:[0,1,2].map(e=>(0,Y.jsxs)(E,{align:`start`,gap:2.5,children:[(0,Y.jsx)(o,{height:`11px`,width:`72px`}),(0,Y.jsx)(o,{height:`24px`,width:`88px`})]},e))})]}),(0,Y.jsxs)(C,{marginTop:`auto`,justify:`space-between`,gap:3,children:[(0,Y.jsx)(o,{height:`13px`,width:`96px`}),(0,Y.jsx)(o,{height:`13px`,width:`72px`})]})]})})}function dn(e){return(0,Y.jsx)(y,{bg:`bg.surface/50`,backdropBlur:`md`,borderWidth:`1px`,borderColor:`border`,borderRadius:`14px`,boxShadow:`none`,_hover:{boxShadow:`0px 2px 4px 0px rgba(0, 0, 0, 0.08)`},...e,children:(0,Y.jsx)(b,{padding:0,gap:2,children:e.children})})}function fn({title:e,qualifier:t,children:n}){return(0,Y.jsxs)(C,{width:`full`,gap:2.5,align:`center`,wrap:`wrap`,children:[(0,Y.jsx)(Ne,{as:`h2`,fontWeight:`600`,fontSize:`15px`,letterSpacing:`-0.01em`,color:`fg`,lineHeight:`1.3`,children:e}),t?(0,Y.jsx)(s,{fontFamily:`mono`,fontSize:`11px`,color:`fg.muted`,borderWidth:`1px`,borderColor:`border.muted`,borderRadius:`full`,paddingX:2,whiteSpace:`nowrap`,children:t}):null,n?(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(w,{}),n]}):null]})}var pn={createProject:V,syncFirstMessage:I,inviteTeamMembers:ve,setupModelProviders:U,createPrompt:W,createSimulation:_e,setupEvaluation:ge,createWorkflow:z,createDataset:B},mn=e=>{switch(e){case`createProject`:return(0,Y.jsx)(V,{size:12});case`syncFirstMessage`:return(0,Y.jsx)(I,{size:12});case`inviteTeamMembers`:return(0,Y.jsx)(ve,{size:12});case`setupModelProviders`:return(0,Y.jsx)(U,{size:12});case`createPrompt`:return(0,Y.jsx)(W,{size:12});case`createWorkflow`:return(0,Y.jsx)(z,{size:12});case`createSimulation`:return(0,Y.jsx)(_e,{size:12});case`setupEvaluation`:return(0,Y.jsx)(ge,{size:12});case`createDataset`:return(0,Y.jsx)(B,{size:12});default:return(0,Y.jsx)(V,{size:12})}},hn=(e,t)=>[{key:`createProject`,title:`Create your new project`,href:`/settings/teams`,complete:!0},{key:`syncFirstMessage`,title:`Sync your first message`,href:`/${t}/traces`,complete:e.firstMessage},{key:`inviteTeamMembers`,title:`Invite team members`,href:`/settings/members`,complete:(e.teamMembers??0)>1},{key:`setupModelProviders`,title:`Setup your model providers`,href:`/settings/model-providers`,complete:(e.modelProviders??0)>0},{key:`createPrompt`,title:`Create your first versioned prompt`,href:`/${t}/prompts`,complete:(e.prompts??0)>0},{key:`createSimulation`,title:`Create your first agent simulation`,href:`/${t}/simulations`,complete:(e.simulations??0)>0},{key:`setupEvaluation`,title:`Set up your first online evaluation`,href:`/${t}/online-evaluations`,complete:(e.onlineEvaluations??0)>0},{key:`createWorkflow`,title:`Create your first workflow`,href:`/${t}/workflows`,complete:(e.workflows??0)>0},{key:`createDataset`,title:`Create a dataset from the messages`,href:`/${t}/datasets`,complete:(e.datasets??0)>0}],gn=e=>{let t=e.filter(e=>e.complete).length;return Math.round(t/e.length*100)};function _n({step:e,onClick:t}){return(0,Y.jsxs)(C,{gap:2,paddingY:1,paddingX:1,borderRadius:`md`,cursor:e.complete?`default`:`pointer`,onClick:e.complete?void 0:t,_hover:e.complete?{}:{background:`bg.muted`},transition:`all 0.15s`,children:[(0,Y.jsx)(a,{padding:1,borderRadius:`full`,background:e.complete?`green.subtle`:`bg.muted`,color:e.complete?`green.solid`:`fg.muted`,children:e.complete?(0,Y.jsx)(V,{size:10}):mn(e.key)}),(0,Y.jsx)(s,{fontSize:`13px`,color:e.complete?`fg.muted`:`fg`,textDecoration:e.complete?`line-through`:`none`,children:e.title})]})}function vn(){let e=A(),{project:t}=G(),{emit:n}=Ce(),{data:r,isLoading:i}=j.integrationsChecks.getCheckStatus.useQuery({projectId:t?.id??``},{enabled:!!t?.id});if((0,J.useEffect)(()=>{if(i||!r||!t?.id)return;let e=hn(r,t.slug),a=e.filter(e=>e.complete),o=gn(e);n(`viewed`,`onboarding_progress`,{project_id:t.id,completion_percentage:o,completed_tasks_count:a.length,total_tasks_count:e.length,all_complete:o===100,has_first_message:r.firstMessage,has_team_members:(r.teamMembers??0)>1,has_model_providers:(r.modelProviders??0)>0,has_prompts:(r.prompts??0)>0,has_simulations:(r.simulations??0)>0,has_online_evaluations:(r.onlineEvaluations??0)>0,has_workflows:(r.workflows??0)>0,has_datasets:(r.datasets??0)>0,count_team_members:r.teamMembers??0,count_model_providers:r.modelProviders??0,count_prompts:r.prompts??0,count_simulations:r.simulations??0,count_online_evaluations:r.onlineEvaluations??0,count_workflows:r.workflows??0,count_datasets:r.datasets??0})},[i]),i||!r||!t)return null;let o=hn(r,t.slug),s=gn(o);if(s===100)return null;let c=r=>{n(`clicked`,`onboarding_step`,{project_id:t.id,step_key:r.key,step_title:r.title,step_complete:r.complete}),e.push(r.href)},l=[];for(let e=0;e<o.length;e+=3)l.push(o.slice(e,e+3));return(0,Y.jsxs)(dn,{cursor:`default`,width:`full`,padding:4,gap:3,_hover:{boxShadow:`xs`},children:[(0,Y.jsx)(fn,{title:`Get started with LangWatch`,qualifier:`${s}% done`,children:(0,Y.jsx)(a,{width:`80px`,children:(0,Y.jsx)(g,{value:s,colorPalette:`orange`,size:`sm`,children:(0,Y.jsx)(v,{borderRadius:`full`,children:(0,Y.jsx)(_,{})})})})}),(0,Y.jsx)(m,{templateColumns:{base:`1fr`,md:`repeat(${l.length}, 1fr)`},gap:2,width:`full`,children:l.map((e,t)=>(0,Y.jsx)(E,{align:`stretch`,gap:0,children:e.map(e=>(0,Y.jsx)(_n,{step:e,onClick:()=>c(e)},e.key))},t))})]})}function yn(){let e=A(),{project:t}=G(),[n,r]=(0,J.useState)(!0),{data:i}=j.integrationsChecks.getCheckStatus.useQuery({projectId:t?.id??``},{enabled:!!t?.id});if(!t||!i)return null;let o=hn(i,t.slug),c=o.filter(e=>e.complete).length,f=gn(o);if(f===100)return null;let p=o.filter(e=>!e.complete);return(0,Y.jsx)(a,{width:`full`,children:(0,Y.jsx)(l,{open:n,onOpenChange:e=>r(e.open),children:(0,Y.jsxs)(a,{borderWidth:`1px`,borderColor:`border.muted`,borderRadius:`14px`,background:`bg.surface`,overflow:`hidden`,children:[(0,Y.jsx)(u,{asChild:!0,children:(0,Y.jsxs)(C,{as:`button`,width:`full`,gap:3,paddingX:4,paddingY:2.5,cursor:`pointer`,_hover:{background:`bg.muted`},transition:`background 130ms ease`,children:[(0,Y.jsx)(a,{width:`96px`,height:`5px`,borderRadius:`full`,background:`border.emphasized`,overflow:`hidden`,flexShrink:0,children:(0,Y.jsx)(a,{height:`full`,width:`${f}%`,background:`orange.solid`})}),(0,Y.jsxs)(s,{fontFamily:`mono`,fontSize:`12.5px`,color:`fg.muted`,children:[`Setup · `,c,` of `,o.length,` done`]}),(0,Y.jsx)(s,{marginLeft:`auto`,fontFamily:`mono`,fontSize:`12.5px`,color:`orange.fg`,children:n?`Hide`:`Finish setup`}),(0,Y.jsx)(a,{color:`fg.subtle`,transform:n?`rotate(180deg)`:void 0,transition:`transform 150ms ease`,children:(0,Y.jsx)(T,{size:14})})]})}),(0,Y.jsx)(d,{children:(0,Y.jsxs)(E,{align:`stretch`,gap:0,paddingX:2,paddingTop:1.5,paddingBottom:2,borderTopWidth:`1px`,borderColor:`border.muted`,children:[(0,Y.jsx)(m,{templateColumns:`1fr`,columnGap:2,children:p.map(t=>(0,Y.jsx)(bn,{stepKey:t.key,title:t.title,onOpen:()=>void e.push(t.href)},t.key))}),c>0?(0,Y.jsxs)(C,{gap:2,paddingX:2,paddingY:1.5,color:`fg.subtle`,children:[(0,Y.jsx)(V,{size:12}),(0,Y.jsxs)(s,{fontSize:`12px`,children:[c,` already done`]})]}):null]})})]})})})}function bn({stepKey:e,title:t,onOpen:r}){let i=pn[e];return(0,Y.jsxs)(n.button,{type:`button`,onClick:r,position:`relative`,display:`flex`,alignItems:`center`,gap:3,width:`full`,textAlign:`left`,paddingX:2.5,paddingY:`7px`,borderRadius:`8px`,cursor:`pointer`,transition:`background 130ms ease`,_hover:{background:`bg.subtle`},css:{"&:hover .step-check":{borderColor:`var(--chakra-colors-fg-muted)`,color:`var(--chakra-colors-fg)`}},children:[(0,Y.jsx)(a,{className:`step-check`,position:`relative`,flexShrink:0,width:`20px`,height:`20px`,borderRadius:`full`,borderWidth:`1px`,borderColor:`border.emphasized`,display:`grid`,placeItems:`center`,color:`fg.subtle`,transition:`border-color 130ms ease, color 130ms ease`,children:(0,Y.jsx)(i,{size:11})}),(0,Y.jsx)(s,{position:`relative`,fontSize:`13px`,color:`fg`,flex:1,children:t})]})}function xn(){let e=$t();return Yt()?(0,Y.jsxs)(n.select,{value:e??``,onChange:e=>{Qt(e.target.value||null)},"aria-label":`Preview briefing data (dev only)`,fontFamily:`mono`,fontSize:`11px`,color:`fg.muted`,borderWidth:`1px`,borderColor:`border.muted`,borderRadius:`lg`,background:`bg.panel/60`,backdropFilter:`blur(8px)`,paddingX:2,paddingY:1.5,maxWidth:`220px`,cursor:`pointer`,_hover:{color:`fg`,borderColor:`border.emphasized`},children:[(0,Y.jsx)(`option`,{value:``,children:`Live data`}),Kt.map(e=>(0,Y.jsx)(`option`,{value:e.key,children:e.label},e.key))]}):null}var Sn=[{icon:ae,family:`orange`,title:`Quickstart`,blurb:`Set sail — send your first trace`,href:`https://docs.langwatch.ai/integration/overview`},{icon:se,family:`blue`,title:`SDK guides`,blurb:`Chart the course — Python & TypeScript`,href:`https://docs.langwatch.ai/integration/python/guide`},{icon:ie,family:`purple`,title:`Evaluations`,blurb:`Face the Cyclops — judge every answer`,href:`https://docs.langwatch.ai/evaluations/online-evaluation/overview`},{icon:oe,family:`green`,title:`Datasets`,blurb:`Stock the ship — sets from real traffic`,href:`https://docs.langwatch.ai/datasets/overview`},{icon:re,family:`red`,title:`Videos`,blurb:`Hear the Sirens — watch and learn`,href:`https://www.youtube.com/@LangWatch/videos`},{icon:W,family:`teal`,title:`All docs`,blurb:`The full epic, unabridged`,href:`https://docs.langwatch.ai`}];function Cn(){return(0,Y.jsx)(dn,{cursor:`default`,padding:4,height:`full`,width:`full`,children:(0,Y.jsxs)(E,{align:`stretch`,gap:3,width:`full`,children:[(0,Y.jsx)(fn,{title:`Docs and guides`}),(0,Y.jsx)(m,{templateColumns:{base:`1fr`,sm:`1fr 1fr`},gap:1,children:Sn.map(e=>(0,Y.jsx)(wn,{guide:e},e.title))})]})})}function wn({guide:e}){let t=e.icon;return(0,Y.jsxs)(C,{as:`a`,href:e.href,target:`_blank`,rel:`noreferrer`,gap:2.5,align:`center`,paddingX:2.5,paddingY:2,borderRadius:`10px`,cursor:`pointer`,transition:`background 130ms ease`,_hover:{background:`bg.muted`},css:{"&:hover .guide-arrow":{opacity:1,transform:`translate(0, 0)`}},children:[(0,Y.jsx)(a,{flexShrink:0,padding:1.5,borderRadius:`md`,background:`bg.muted`,color:`${e.family}.solid`,display:`grid`,placeItems:`center`,children:(0,Y.jsx)(t,{size:14})}),(0,Y.jsxs)(E,{align:`start`,gap:0,flex:1,minWidth:0,children:[(0,Y.jsx)(s,{fontSize:`13px`,color:`fg`,lineHeight:`1.3`,children:e.title}),(0,Y.jsx)(s,{fontSize:`11.5px`,color:`fg.muted`,lineClamp:1,children:e.blurb})]}),(0,Y.jsx)(a,{className:`guide-arrow`,color:`fg.subtle`,opacity:0,transform:`translate(-2px, 2px)`,transition:`opacity 130ms ease, transform 130ms ease`,"aria-hidden":!0,children:(0,Y.jsx)(he,{size:14})})]})}var Tn=[{key:`empty`,label:`New project (no data)`},{key:`populated`,label:`Project with data`},{key:`read-only`,label:`Read-only access`},{key:`morph`,label:`Mid-send (held)`},{key:`docked`,label:`Panel docked`},{key:`floating`,label:`Panel floating`},{key:`after-turn`,label:`After the first turn`},{key:`reduced-motion`,label:`Reduced motion`},{key:`stalled`,label:`Stalled turn`},{key:`chart-strip`,label:`Figures: strip (chart on click)`},{key:`chart-trend`,label:`Figures: strip + trend`},{key:`chart-full`,label:`Figures: full chart`}],En=`strip`;function Dn(e){switch(e){case`chart-trend`:return`trend`;case`chart-full`:return`full`;case`chart-strip`:return`strip`;default:return En}}var On=`langwatch:dev:home-state`,kn=()=>!1,An=e=>Tn.some(t=>t.key===e),jn=new Set;function Mn(){if(typeof window>`u`||!kn())return null;try{let e=localStorage.getItem(On);return e&&An(e)?e:null}catch{return null}}function Nn(e){if(!(typeof window>`u`||!kn())){try{e===null?localStorage.removeItem(On):localStorage.setItem(On,e)}catch{}jn.forEach(e=>e())}}function Pn(){let[e,t]=(0,J.useState)(null);return(0,J.useEffect)(()=>{if(!kn())return;t(Mn());let e=()=>t(Mn());return jn.add(e),window.addEventListener(`storage`,e),()=>{jn.delete(e),window.removeEventListener(`storage`,e)}},[]),e}function Fn(){let e=Pn();return kn()?(0,Y.jsxs)(n.select,{value:e??``,onChange:e=>{Nn(e.target.value||null)},"aria-label":`Preview home state (dev only)`,fontFamily:`mono`,fontSize:`11px`,color:`fg.muted`,borderWidth:`1px`,borderColor:`border.muted`,borderRadius:`lg`,background:`bg.panel/60`,backdropFilter:`blur(8px)`,paddingX:2,paddingY:1.5,maxWidth:`220px`,cursor:`pointer`,_hover:{color:`fg`,borderColor:`border.emphasized`},children:[(0,Y.jsx)(`option`,{value:``,children:`Live home`}),Tn.map(e=>(0,Y.jsx)(`option`,{value:e.key,children:e.label},e.key))]}):null}var In=[`⌘K opens the command bar — everything is four keystrokes away.`,`⌘I asks Langy. It has read your traces, and it has opinions.`,`p50 is a feeling. p99 is the truth.`,`An eval you didn't write is a bug you scheduled.`,`Every trace tells a story. Some of them are horror.`,`Temperature 0 is a personality too.`,`Name your scenarios well — future you is a stranger.`,`The dashboard is calm. Suspiciously calm.`];function Ln(){let e=Fe(),[t,r]=(0,J.useState)(()=>Math.floor(Math.random()*In.length));return(0,Y.jsx)(dn,{cursor:`default`,padding:4,height:`full`,width:`full`,children:(0,Y.jsxs)(E,{align:`stretch`,gap:2,width:`full`,height:`full`,children:[(0,Y.jsxs)(C,{justify:`space-between`,align:`center`,gap:3,children:[(0,Y.jsx)(s,{fontFamily:`mono`,fontSize:`10.5px`,letterSpacing:`0.1em`,textTransform:`uppercase`,color:`fg.subtle`,children:`Fortune`}),(0,Y.jsx)(n.button,{type:`button`,onClick:()=>r(e=>{if(In.length<2)return e;let t=e;for(;t===e;)t=Math.floor(Math.random()*In.length);return t}),"aria-label":`Another fortune`,display:`grid`,placeItems:`center`,color:`fg.subtle`,cursor:`pointer`,borderRadius:`md`,padding:1,transition:`color 130ms ease, background 130ms ease`,_hover:{color:`fg`,background:`bg.muted`},children:(0,Y.jsx)(q.span,{initial:e?!1:{rotate:-120,scale:.7},animate:{rotate:0,scale:1},transition:{type:`spring`,stiffness:320,damping:16},style:{display:`grid`,placeItems:`center`},children:(0,Y.jsx)(ne,{size:13})},t)})]}),(0,Y.jsx)(q.div,{initial:e?!1:{opacity:0,y:6,filter:`blur(4px)`},animate:{opacity:1,y:0,filter:`blur(0px)`},transition:{duration:.35,ease:`easeOut`},children:(0,Y.jsx)(s,{fontFamily:`mono`,fontSize:`12px`,color:`fg.muted`,lineHeight:`1.6`,children:In[t]})},t)]})})}var Rn=[`#f56b1a`,`#ffb380`,`#6e57d2`],zn=[`#a8480d`,`#f56b1a`,`#5b41c2`],Bn=`langy-homebar-mark-grad`;function Vn(){return(0,Y.jsxs)(a,{display:`inline-flex`,alignItems:`center`,children:[(0,Y.jsx)(`svg`,{width:`0`,height:`0`,"aria-hidden":!0,style:{position:`absolute`,pointerEvents:`none`},children:(0,Y.jsx)(`defs`,{children:(0,Y.jsxs)(`linearGradient`,{id:Bn,x1:`0%`,y1:`100%`,x2:`100%`,y2:`0%`,children:[(0,Y.jsx)(`stop`,{offset:`0%`,stopColor:`var(--chakra-colors-fg-muted)`}),(0,Y.jsx)(`stop`,{offset:`100%`,stopColor:`var(--chakra-colors-fg-muted)`})]})})}),(0,Y.jsx)(ke,{size:14,gradientId:Bn})]})}var Hn={id:`langy-ships-the-fix`,storagePrefix:`langwatch:langy-home-banner-dismissed:v1:`,colorsLight:[`#f56b1a`,`#ffb380`,`#6e57d2`,`#fff7ed`],colorsDark:[`#a8480d`,`#f56b1a`,`#5b41c2`,`#140b06`],mesh:{distortion:.9,swirl:.7,scale:1.15,offsetX:-.12,offsetY:.16,rotation:42},iconNode:(0,Y.jsx)(Vn,{}),heading:`Langy can ship the fix, not just find it`,badge:`New`,subtitle:(0,Y.jsx)(Y.Fragment,{children:`Ask about a failing trace and Langy digs through your data, explains what broke, and opens a pull request with the change.`}),ctaLabel:`Ask Langy to investigate`,legacyCtaColor:`orange.700`,posthogEvent:`langy_banner_click`,navigate:({askLangy:e})=>e?.(`Investigate the most important problem in this project from the last 24 hours, explain what changed, and show me the affected traces.`)},Un=9e3,Wn=750,Gn=Wn/1e3,Kn=[.42,0,.58,1],qn=.32,Jn=1500,Yn=1500,Xn=28,Zn=[{id:`automations`,storagePrefix:`langwatch:automations-home-banner-dismissed:v1:`,colorsLight:[`#b45309`,`#ea580c`,`#e11d48`,`#fff7ed`],colorsDark:[`#7c2d12`,`#9a3412`,`#881337`,`#1a0f0a`],mesh:{distortion:.92,swirl:.5,scale:1.25,offsetX:-.22,offsetY:.14,rotation:68},Icon:ue,heading:`React the moment it matters`,badge:`New`,subtitle:(0,Y.jsxs)(Y.Fragment,{children:[`React to traces, alert on metrics, or get reports of anything.`,(0,Y.jsx)(`br`,{}),`Delivered to Slack or email, on the schedule you choose.`]}),ctaLabel:`Explore automations`,legacyCtaColor:`orange.700`,posthogEvent:`automations_banner_click`,navigate:({router:e,projectSlug:t})=>void e.push(`/${t}/automations`)},{id:`voice-agents`,storagePrefix:`langwatch:voice-agents-home-banner-dismissed:v1:`,colorsLight:[`#0f766e`,`#06b6d4`,`#6366f1`,`#ecfeff`],colorsDark:[`#134e4a`,`#0e7490`,`#312e81`,`#0a1424`],mesh:{distortion:.85,swirl:.62,scale:1.2,offsetX:.2,offsetY:-.18,rotation:108},Icon:de,heading:`Voice agent simulations are here`,badge:`New`,subtitle:(0,Y.jsx)(Y.Fragment,{children:`Real voices, real audio, plain-English judges. Works with ElevenLabs, OpenAI Realtime, Vapi, and more.`}),ctaLabel:`Try voice agent testing`,legacyCtaColor:`teal.700`,posthogEvent:`voice_agents_banner_click`,navigate:()=>window.open(`https://langwatch.ai/scenario/voice/getting-started`,`_blank`,`noopener,noreferrer`)}];function Qn(e,{includeLangy:t}){return(0,J.useMemo)(()=>t?[Hn,...Zn]:Zn,[t])}var $n=e=>Math.max(0,Math.min(1,e)),Z=(e,t,n)=>e+(t-e)*n,er=e=>e<.5?2*e*e:1-(-2*e+2)**2/2;function tr(e){let t=e.replace(`#`,``),n=t.length===3?t.split(``).map(e=>e+e).join(``):t,r=parseInt(n,16);return[r>>16&255,r>>8&255,r&255]}function nr(e){return`#`+e.map(e=>Math.round(Math.max(0,Math.min(255,e))).toString(16).padStart(2,`0`)).join(``)}function rr(e,t,n){let r=tr(e),i=tr(t);return nr([Z(r[0],i[0],n),Z(r[1],i[1],n),Z(r[2],i[2],n)])}function ir(e,t,n){return e.map((e,r)=>rr(e,t[r]??e,n))}function ar(e,t,n){return{distortion:Z(e.distortion,t.distortion,n),swirl:Z(e.swirl,t.swirl,n),scale:Z(e.scale,t.scale,n),offsetX:Z(e.offsetX,t.offsetX,n),offsetY:Z(e.offsetY,t.offsetY,n),rotation:Z(e.rotation,t.rotation,n)}}function or({variant:e=`briefing`,children:t}){let{project:i}=G({redirectToOnboarding:!1,redirectToProjectOnboarding:!1}),o=i?.id,c=i?.slug,l=A(),u=Fe(),d=we(!1,!0),f=Qn(o,{includeLangy:e===`lantern`}),p=K(e=>e.askLangy),[m,g]=(0,J.useState)(!1),[_,v]=(0,J.useState)(0);(0,J.useEffect)(()=>{g(!0)},[]);let y=f,b=y.length>0?_%y.length:0,S=y[b],w=(0,J.useMemo)(()=>S?d?S.colorsDark:S.colorsLight:[],[S,d]),T=S?.mesh,[D,O]=(0,J.useState)(w),[k,te]=(0,J.useState)(T??Zn[0].mesh),[j,M]=(0,J.useState)(!1),N=u||j,P=ee(0),F=(0,J.useRef)(!1),I=(0,J.useRef)(0),L=(0,J.useRef)(y.length),ne=(0,J.useRef)(u),re=(0,J.useRef)(N),R=(0,J.useRef)(w),z=(0,J.useRef)(T),B=(0,J.useRef)(D),ie=(0,J.useRef)(k),ae=(0,J.useRef)(null),V=(0,J.useRef)({start:null,frames:0,done:!1});if(L.current=y.length,ne.current=u,re.current=N,R.current=w,z.current=T,(0,J.useEffect)(()=>{if(S){if(N){ae.current=null,B.current=w,T&&(ie.current=T),O(w),T&&te(T),P.set(0);return}ae.current={from:B.current.length?B.current:w,fromMesh:ie.current,start:null},P.set(0),I.current=0}},[S?.id,d,N]),Xe((t,n)=>{if(L.current===0)return;let r=n/1e3,i=V.current;if(!i.done&&!re.current&&t>=Jn)if(i.start===null)i.start=t;else{i.frames++;let e=t-i.start;e>=Yn&&(i.done=!0,i.frames/e*1e3<Xn&&M(!0))}let a=+((e===`lantern`||!F.current)&&!ne.current&&L.current>1);if(I.current+=(a-I.current)*(1-Math.exp(-r/qn)),L.current>1){let e=P.get()+n/Un*I.current;e>=1?(P.set(0),v(e=>e+1)):P.set(e)}let o=ae.current;if(o&&!re.current){o.start===null&&(o.start=t);let e=$n((t-o.start)/Wn),n=er(e),r=R.current,i=z.current??o.fromMesh,a=r.length?ir(o.from,r,n):o.from,s=ar(o.fromMesh,i,n);B.current=a,ie.current=s,O(a),te(s),e>=1&&(ae.current=null)}}),!m||!o||e!==`lantern`&&(y.length===0||!S))return null;let oe=e=>{Se.capture(e.posthogEvent,{surface:`home_banner`,projectId:o}),e.navigate({router:l,projectSlug:c,askLangy:p})},H=D.length?D:w,se=H.length>=3?H:d?zn:Rn,U=y.length>1,W=e=>{v((e+y.length)%y.length),P.set(0)},ce=N?{duration:0}:{duration:Gn,ease:Kn};return e===`lantern`?(0,Y.jsxs)(a,{position:`relative`,width:`full`,onMouseEnter:()=>F.current=!0,onMouseLeave:()=>F.current=!1,children:[(0,Y.jsx)(a,{"aria-hidden":!0,position:`absolute`,insetInline:{base:`-8%`,md:`-14%`},insetBlock:{base:`-30%`,md:`-45%`},pointerEvents:`none`,opacity:{base:.3,_dark:.45},filter:{base:`blur(15px)`,_dark:`blur(5px)`},css:{maskImage:`radial-gradient(58% 62% at 50% 46%, #000 12%, transparent 72%)`,WebkitMaskImage:`radial-gradient(58% 62% at 50% 46%, #000 12%, transparent 72%)`},children:j?(0,Y.jsx)(a,{position:`absolute`,inset:0,style:{background:`linear-gradient(120deg, ${se[0]}, ${se[1]} 45%, ${se[2]})`}}):(0,Y.jsx)(a,{position:`absolute`,inset:0,children:(0,Y.jsx)(Ye,{colors:se,distortion:k.distortion,swirl:k.swirl,offsetX:k.offsetX,offsetY:k.offsetY,rotation:k.rotation,grainMixer:.12,grainOverlay:.12,speed:u?0:S?.speed??.45,scale:k.scale,style:{width:`100%`,height:`100%`}})})}),(0,Y.jsx)(a,{"aria-hidden":!0,position:`absolute`,insetInline:{base:`-8%`,md:`-14%`},insetBlock:{base:`-30%`,md:`-45%`},pointerEvents:`none`,display:{base:`block`,_dark:`none`},background:`radial-gradient(62% 64% at 50% 28%, var(--chakra-colors-bg) 0%, var(--chakra-colors-bg) 52%, transparent 78%)`}),(0,Y.jsxs)(E,{position:`relative`,zIndex:1,align:`center`,gap:9,paddingX:{base:4,md:5},paddingY:{base:8,md:12},children:[t,(0,Y.jsx)(E,{gap:1,children:S?(0,Y.jsxs)(E,{gap:`7px`,width:`min(520px, 100%)`,align:`stretch`,children:[(0,Y.jsxs)(n.button,{type:`button`,onClick:()=>oe(S),"aria-label":S.ctaLabel,display:`flex`,alignItems:`center`,gap:2.5,width:`full`,minHeight:`20px`,background:`transparent`,borderWidth:0,padding:0,cursor:`pointer`,textAlign:`left`,css:{"&:hover .langy-ticker-arrow":{transform:`translateX(3px)`,color:`var(--chakra-colors-orange-fg)`}},children:[(0,Y.jsx)(a,{flexShrink:0,color:`fg.muted`,display:`grid`,children:S.iconNode??(S.Icon?(0,Y.jsx)(S.Icon,{size:14}):null)}),S.badge?(0,Y.jsx)(n.span,{flexShrink:0,fontSize:`11px`,fontWeight:`600`,color:{base:`orange.700`,_dark:`orange.fg`},children:S.badge}):null,(0,Y.jsx)(s,{fontSize:`12.5px`,color:`fg.muted`,truncate:!0,minWidth:0,flex:`1`,children:S.heading}),(0,Y.jsx)(n.span,{className:`langy-ticker-arrow`,"aria-hidden":!0,flexShrink:0,color:`fg.subtle`,fontSize:`12px`,lineHeight:`1`,transition:`transform 130ms ease, color 130ms ease`,children:`→`})]}),U?(0,Y.jsx)(C,{gap:`5px`,width:`full`,height:`16px`,marginTop:`-7px`,marginBottom:`-7px`,children:y.map((e,t)=>(0,Y.jsx)(a,{as:`button`,"aria-label":`Show announcement ${t+1} of ${y.length}`,"aria-current":t===b?`true`:void 0,onClick:()=>W(t),flex:`1`,height:`full`,display:`flex`,alignItems:`center`,background:`transparent`,cursor:`pointer`,css:{"&:hover .langy-ticker-segment":{background:`var(--chakra-colors-fg-muted)`}},children:(0,Y.jsx)(a,{className:`langy-ticker-segment`,width:`full`,height:`2px`,borderRadius:`full`,overflow:`hidden`,background:t===b?`fg.muted/40`:`fg.muted/15`,transition:`background 200ms ease`,css:{"--ticker-accent":`var(--chakra-colors-orange-700)`,_dark:{"--ticker-accent":`var(--chakra-colors-orange-fg)`}},children:t===b?(0,Y.jsx)(q.div,{style:{height:`100%`,background:`var(--ticker-accent)`,scaleX:P,transformOrigin:`left`}}):null})},t))}):null]}):null})]})]}):S?e===`legacy`?(0,Y.jsxs)(a,{position:`relative`,width:`full`,borderRadius:`xl`,overflow:`hidden`,color:`white`,boxShadow:`0 1px 2px rgba(0,0,0,0.06), 0 8px 24px rgba(0,0,0,0.18)`,minHeight:{base:`160px`,md:`172px`},onMouseEnter:()=>F.current=!0,onMouseLeave:()=>F.current=!1,"data-banner-variant":`legacy`,children:[(0,Y.jsx)(a,{position:`absolute`,inset:0,pointerEvents:`none`,style:{background:`linear-gradient(120deg, ${H[0]??`#333`}, ${H[1]??H[0]??`#333`} 45%, ${H[2]??H[0]??`#333`})`}}),j?null:(0,Y.jsx)(a,{position:`absolute`,inset:0,pointerEvents:`none`,children:(0,Y.jsx)(Ye,{colors:H,distortion:k.distortion,swirl:k.swirl,offsetX:k.offsetX,offsetY:k.offsetY,rotation:k.rotation,grainMixer:.15,grainOverlay:.18,speed:u?0:.45,scale:k.scale,style:{width:`100%`,height:`100%`}})}),(0,Y.jsx)(a,{position:`absolute`,inset:0,pointerEvents:`none`,backgroundImage:`linear-gradient(120deg, rgba(0,0,0,0.25) 0%, rgba(0,0,0,0.05) 55%, rgba(0,0,0,0) 100%)`}),(0,Y.jsx)(a,{display:`grid`,position:`relative`,zIndex:1,width:`full`,children:y.map(e=>{let t=e.id===S.id;return(0,Y.jsx)(q.div,{inert:!t,initial:!1,animate:{opacity:+!!t,y:t?0:8},transition:ce,style:{gridArea:`1 / 1`,zIndex:+!!t,pointerEvents:t?`auto`:`none`,willChange:`opacity, transform`},children:(0,Y.jsxs)(C,{align:`center`,gap:{base:4,md:6},paddingLeft:{base:5,md:7},paddingRight:{base:5,md:7},paddingY:{base:5,md:6},width:`full`,height:`full`,children:[(0,Y.jsx)(a,{flexShrink:0,display:`flex`,alignItems:`center`,justifyContent:`center`,boxSize:`44px`,borderRadius:`full`,bg:`white/20`,boxShadow:`inset 0 0 0 1px rgba(255,255,255,0.35)`,children:e.Icon?(0,Y.jsx)(h,{as:e.Icon,boxSize:5,color:`white`}):e.iconNode}),(0,Y.jsxs)(E,{align:`start`,gap:1.5,flex:1,minWidth:0,children:[(0,Y.jsxs)(C,{gap:2,minWidth:0,children:[(0,Y.jsx)(Ne,{as:`h2`,size:`md`,fontWeight:`600`,color:`white/95`,letterSpacing:`-0.01em`,lineHeight:1.25,children:e.heading}),e.badge?(0,Y.jsx)(a,{paddingX:2,paddingY:`2px`,borderRadius:`full`,bg:`white/30`,flexShrink:0,children:(0,Y.jsx)(s,{textStyle:`2xs`,fontWeight:`700`,color:`white`,letterSpacing:`0.08em`,textTransform:`uppercase`,lineHeight:1.2,children:e.badge})}):null]}),(0,Y.jsx)(s,{textStyle:`sm`,color:`white/80`,lineHeight:1.6,maxWidth:{base:`full`,md:`560px`},children:e.subtitle}),(0,Y.jsx)(C,{gap:2,marginTop:1.5,children:(0,Y.jsxs)(r,{size:`sm`,bg:`white`,color:e.legacyCtaColor,fontWeight:`600`,paddingX:4,boxShadow:`0 1px 2px rgba(0,0,0,0.12)`,_hover:{bg:`white/90`,transform:`translateY(-1px)`},_active:{bg:`white/80`,transform:`translateY(0)`},transition:`background-color 0.12s ease, transform 0.12s ease`,onClick:()=>oe(e),"aria-label":e.ctaLabel,children:[e.ctaLabel,(0,Y.jsx)(h,{as:le,boxSize:3.5,marginLeft:1})]})})]})]})},e.id)})}),U?(0,Y.jsx)(a,{position:`absolute`,bottom:2.5,right:3,zIndex:2,children:(0,Y.jsxs)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,"aria-hidden":!0,children:[(0,Y.jsx)(`circle`,{cx:`12`,cy:`12`,r:`9`,fill:`none`,stroke:`rgba(255,255,255,0.28)`,strokeWidth:`2.5`}),(0,Y.jsx)(`g`,{transform:`rotate(-90 12 12)`,children:(0,Y.jsx)(q.circle,{cx:`12`,cy:`12`,r:`9`,fill:`none`,stroke:`white`,strokeWidth:`2.5`,strokeLinecap:`round`,style:{pathLength:P}})})]})}):null,U?(0,Y.jsx)(C,{gap:2,justify:`center`,position:`absolute`,bottom:3,left:0,right:0,zIndex:2,children:y.map((e,t)=>(0,Y.jsx)(a,{as:`button`,"aria-label":`Show announcement ${t+1} of ${y.length}`,onClick:()=>v(t),width:t===b?`18px`:`7px`,height:`7px`,borderRadius:`full`,bg:t===b?`white`:`whiteAlpha.500`,transition:`width 0.2s ease, background-color 0.2s ease`,cursor:`pointer`,_hover:{bg:t===b?`white`:`whiteAlpha.700`}},e.id))}):null]}):(0,Y.jsx)(a,{position:`relative`,width:`full`,isolation:`isolate`,children:(0,Y.jsxs)(a,{position:`relative`,width:`full`,borderRadius:`14px`,borderWidth:`1px`,borderColor:`border.muted`,background:`bg.surface`,overflow:`hidden`,onMouseEnter:()=>F.current=!0,onMouseLeave:()=>F.current=!1,children:[(0,Y.jsx)(a,{"aria-hidden":!0,position:`absolute`,inset:0,borderRadius:`inherit`,pointerEvents:`none`,zIndex:2,opacity:.45,style:{boxShadow:[`inset 0 10px 18px -14px ${H[0]??`#333`}`,`inset 0 -10px 18px -14px ${H[2]??H[0]??`#333`}`,`inset 10px 0 18px -14px ${H[1]??H[0]??`#333`}`,`inset -10px 0 18px -14px ${H[1]??H[0]??`#333`}`].join(`, `)}}),(0,Y.jsxs)(a,{position:`absolute`,inset:0,pointerEvents:`none`,opacity:{base:.09,_dark:.14},children:[(0,Y.jsx)(a,{position:`absolute`,inset:0,style:{background:`linear-gradient(120deg, ${H[0]??`#333`}, ${H[1]??H[0]??`#333`} 45%, ${H[2]??H[0]??`#333`})`}}),j?null:(0,Y.jsx)(a,{position:`absolute`,inset:0,children:(0,Y.jsx)(Ye,{colors:H,distortion:k.distortion,swirl:k.swirl,offsetX:k.offsetX,offsetY:k.offsetY,rotation:k.rotation,grainMixer:.12,grainOverlay:.12,speed:u?0:S.speed??.45,scale:k.scale,style:{width:`100%`,height:`100%`}})})]}),(0,Y.jsxs)(C,{position:`relative`,zIndex:1,align:`center`,gap:{base:3,md:4},paddingX:{base:4,md:5},paddingTop:4,paddingBottom:U?`22px`:4,width:`full`,height:`full`,children:[(0,Y.jsxs)(a,{position:`relative`,flexShrink:0,boxSize:`44px`,borderRadius:`11px`,overflow:`hidden`,boxShadow:`inset 0 0 0 1px rgba(255,255,255,0.14)`,children:[(0,Y.jsx)(a,{position:`absolute`,inset:0,pointerEvents:`none`,style:{background:`linear-gradient(120deg, ${H[0]??`#333`}, ${H[1]??H[0]??`#333`} 45%, ${H[2]??H[0]??`#333`})`}}),(0,Y.jsx)(a,{display:`grid`,position:`relative`,width:`full`,height:`full`,children:y.map(e=>(0,Y.jsx)(q.div,{initial:!1,animate:{opacity:+(e.id===S.id)},transition:ce,style:{gridArea:`1 / 1`,display:`grid`,placeItems:`center`},children:e.iconNode??(e.Icon?(0,Y.jsx)(h,{as:e.Icon,boxSize:5,color:`white`}):null)},e.id))})]}),(0,Y.jsx)(a,{display:`grid`,flex:1,minWidth:0,children:y.map(e=>{let t=e.id===S.id;return(0,Y.jsx)(q.div,{inert:!t,initial:!1,animate:{opacity:+!!t,y:t?0:6},transition:ce,style:{gridArea:`1 / 1`,zIndex:+!!t,pointerEvents:t?`auto`:`none`,willChange:`opacity, transform`},children:(0,Y.jsxs)(E,{align:`start`,gap:1,width:`full`,minWidth:0,children:[(0,Y.jsxs)(C,{gap:2,minWidth:0,children:[(0,Y.jsx)(Ne,{as:`h2`,fontFamily:Ue,fontWeight:`500`,fontSize:`15px`,letterSpacing:`-0.01em`,lineHeight:1.3,color:`fg`,children:e.heading}),e.badge?(0,Y.jsx)(a,{paddingX:`7px`,borderRadius:`full`,borderWidth:`1px`,borderColor:`orange.emphasized`,flexShrink:0,children:(0,Y.jsx)(s,{fontFamily:`mono`,fontSize:`9.5px`,fontWeight:`600`,color:`orange.fg`,letterSpacing:`0.08em`,textTransform:`uppercase`,lineHeight:1.6,children:e.badge})}):null]}),(0,Y.jsx)(s,{fontSize:`12.5px`,color:`fg.muted`,lineHeight:1.5,children:e.subtitle}),e.extra?(0,Y.jsx)(a,{width:`full`,minWidth:0,children:e.extra}):null,(0,Y.jsxs)(n.button,{type:`button`,onClick:()=>oe(e),"aria-label":e.ctaLabel,flexShrink:0,display:`inline-flex`,alignItems:`center`,gap:1,marginTop:1.5,fontFamily:`mono`,fontSize:`11.5px`,whiteSpace:`nowrap`,cursor:`pointer`,color:`orange.fg`,borderWidth:`1px`,borderColor:`orange.emphasized`,borderRadius:`8px`,paddingX:2.5,paddingY:`4px`,background:`orange.subtle`,transition:`background-color 130ms ease, border-color 130ms ease`,_hover:{background:`orange.muted`,borderColor:`orange.solid`},children:[e.ctaLabel,e.showCtaKbd?(0,Y.jsx)(Ae,{fontSize:`0.6875rem`,children:je()?`⌘I`:`Ctrl+I`}):(0,Y.jsx)(h,{as:le,boxSize:3.5})]})]})},e.id)})})]}),U?(0,Y.jsx)(a,{position:`absolute`,bottom:2,right:2.5,zIndex:2,children:(0,Y.jsxs)(`svg`,{width:`20`,height:`20`,viewBox:`0 0 24 24`,"aria-hidden":!0,children:[(0,Y.jsx)(`circle`,{cx:`12`,cy:`12`,r:`9`,fill:`none`,stroke:`var(--chakra-colors-border-emphasized)`,strokeWidth:`2.5`}),(0,Y.jsx)(`g`,{transform:`rotate(-90 12 12)`,children:(0,Y.jsx)(q.circle,{cx:`12`,cy:`12`,r:`9`,fill:`none`,stroke:`var(--chakra-colors-fg-muted)`,strokeWidth:`2.5`,strokeLinecap:`round`,style:{pathLength:P}})})]})}):null,U?(0,Y.jsxs)(C,{gap:1,justify:`center`,position:`absolute`,bottom:`0px`,left:0,right:0,zIndex:2,children:[(0,Y.jsx)(x,{size:`2xs`,variant:`ghost`,"aria-label":`Previous announcement`,onClick:()=>W(b-1),children:(0,Y.jsx)(me,{})}),(0,Y.jsx)(C,{gap:0,children:y.map((e,t)=>(0,Y.jsx)(a,{as:`button`,"aria-label":`Show announcement ${t+1} of ${y.length}`,"aria-current":t===b?`true`:void 0,onClick:()=>W(t),display:`flex`,alignItems:`center`,justifyContent:`center`,paddingX:`6px`,paddingY:`8px`,cursor:`pointer`,css:{"&:hover .banner-dot":{background:`var(--chakra-colors-fg-muted)`}},children:(0,Y.jsx)(a,{className:`banner-dot`,width:t===b?`16px`:`6px`,height:`6px`,borderRadius:`full`,background:t===b?`fg.muted`:`border.emphasized`,transition:`width 0.2s ease, background-color 0.2s ease`})},e.id))}),(0,Y.jsx)(x,{size:`2xs`,variant:`ghost`,"aria-label":`Next announcement`,onClick:()=>W(b+1),children:(0,Y.jsx)(le,{})})]}):null,U?(0,Y.jsx)(a,{position:`absolute`,bottom:0,left:0,right:0,height:`2px`,background:`border.muted`,zIndex:1,pointerEvents:`none`,children:(0,Y.jsx)(q.div,{style:{height:`100%`,background:`var(--chakra-colors-fg-muted)`,scaleX:P,transformOrigin:`left`}})}):null]})}):null}var sr=`https://docs.langwatch.ai/integration/overview`,cr=`Instrument this codebase with LangWatch so I can see my agent's traces.
|
|
2
|
-
|
|
3
|
-
Read the integration guide at ${sr} and pick the SDK that matches this project. Then:
|
|
4
|
-
1. Add the dependency and initialise it where the app starts.
|
|
5
|
-
2. Read the API key from the environment, never hardcode it.
|
|
6
|
-
3. Instrument the main agent or LLM call path so a request produces one trace.
|
|
7
|
-
4. Tell me what you changed and how to verify a trace arrives.`;function lr({onAskLangy:e,prominent:t=!1}={}){return(0,Y.jsxs)(p.Root,{positioning:{placement:`bottom-end`,gutter:6},children:[(0,Y.jsx)(p.Trigger,{asChild:!0,children:(0,Y.jsxs)(n.button,{type:`button`,"aria-haspopup":`menu`,display:`inline-flex`,alignItems:`center`,gap:2,whiteSpace:`nowrap`,borderWidth:`1px`,borderColor:t?`orange.emphasized`:`border.emphasized`,borderRadius:`full`,background:t?`orange.subtle`:`bg.muted`,paddingLeft:t?4:3,paddingRight:`4px`,paddingY:t?`5px`:`3px`,boxShadow:t?`xs`:`2xs`,cursor:`pointer`,transition:`border-color 130ms ease, background 130ms ease`,_hover:{borderColor:t?`orange.solid`:`border.emphasized`,background:t?`orange.muted`:`bg.emphasized`},children:[(0,Y.jsx)(n.span,{fontSize:t?`13px`:`12px`,fontWeight:t?`medium`:void 0,color:t?`orange.fg`:`fg`,children:t?`Send your first trace`:`Onboard your agent`}),(0,Y.jsx)(C,{gap:`3px`,children:[{Glyph:fe,color:`fg.muted`},{Glyph:pe,color:`fg.muted`},{Glyph:H,color:`orange.fg`}].map(({Glyph:e,color:t},n)=>(0,Y.jsx)(a,{boxSize:`18px`,borderRadius:`5px`,background:`bg.surface`,borderWidth:`1px`,borderColor:`border.muted`,display:`grid`,placeItems:`center`,color:t,children:(0,Y.jsx)(e,{size:10})},n))}),(0,Y.jsx)(a,{"aria-hidden":!0,display:`grid`,color:`fg.subtle`,paddingRight:`3px`,flexShrink:0,children:(0,Y.jsx)(R,{size:13})})]})}),(0,Y.jsxs)(p.Content,{minWidth:`280px`,padding:1,children:[e?(0,Y.jsx)(p.Item,{value:`ask-langy`,paddingY:2,onClick:()=>e(`Walk me through sending my first trace to this project. Ask me what my agent is built with, then give me the exact steps.`),children:(0,Y.jsx)(ur,{icon:H,accent:!0,label:`Walk me through it`,hint:`Langy asks what you are building, then gives you the steps`})}):null,(0,Y.jsx)(p.Item,{value:`copy-prompt`,paddingY:2,onClick:()=>{navigator.clipboard?.writeText(cr).then(()=>f.create({type:`success`,title:`Prompt copied — paste it to your coding agent`}),()=>f.create({type:`error`,title:`Couldn't copy the prompt`}))},children:(0,Y.jsx)(ur,{icon:pe,label:`Copy a prompt for your coding agent`,hint:`Paste it into Claude Code, Cursor, or whatever you use`})}),(0,Y.jsx)(p.Item,{value:`docs`,paddingY:2,asChild:!0,children:(0,Y.jsx)(n.a,{href:sr,target:`_blank`,rel:`noreferrer`,children:(0,Y.jsx)(ur,{icon:fe,label:`Read the integration guide`,hint:`Every SDK, and what each one instruments`})})})]})]})}function ur({icon:e,label:t,hint:n,accent:r=!1}){return(0,Y.jsxs)(C,{gap:2.5,width:`full`,align:`start`,children:[(0,Y.jsx)(a,{color:r?`orange.fg`:`fg.subtle`,display:`grid`,paddingTop:`2px`,children:(0,Y.jsx)(e,{size:13})}),(0,Y.jsxs)(a,{minWidth:0,flex:1,children:[(0,Y.jsx)(s,{textStyle:`xs`,fontWeight:`medium`,children:t}),(0,Y.jsx)(s,{textStyle:`2xs`,color:`fg.subtle`,lineClamp:2,children:n})]})]})}var dr=e=>{if(!e||!e.trim())return null;let t=e.trim();return t.includes(`@`)?null:t.split(` `)[0]??null},fr=e=>e<12?`morning`:e<18?`afternoon`:`evening`,pr={morning:{named:`Good morning, `,anonymous:`Good morning`},afternoon:{named:`Good afternoon, `,anonymous:`Good afternoon`},evening:{named:`Good evening, `,anonymous:`Good evening`}},mr=({timeOfDay:e,name:t})=>{let{named:n,anonymous:r}=pr[e];return t?`${n}${t}`:r};function hr(){let[e,t]=(0,J.useState)(`morning`);return(0,J.useEffect)(()=>{t(fr(new Date().getHours()))},[]),e}function gr(){let{data:e}=P(),t=dr(e?.user?.name);return(0,Y.jsx)(Ne,{as:`h1`,fontFamily:Ue,fontWeight:`500`,fontSize:`26px`,letterSpacing:`-0.01em`,lineHeight:`1.2`,children:mr({timeOfDay:hr(),name:t})})}var _r=`680px`,vr=`26px`;function yr(){let e=Pn(),{registerInlinePalette:t}=Ee(),n=Oe(),r=e===`read-only`?!1:n,i=k(),o=e===`empty`?!0:e===`populated`?!1:i.isNewProject,c=e===`empty`||e===`populated`||!i.isLoading,l=c&&o,u=c?te({reach:e===`empty`?{hasTraces:!1,hasEvaluations:!1,hasExperiments:!1}:e===`populated`?{hasTraces:!0,hasEvaluations:!0,hasExperiments:!0}:i}):[],d=K(e=>e.askLangy),[f,p]=(0,J.useState)(``),[m,h]=(0,J.useState)(!1),g=(0,J.useRef)(null),_=(0,J.useRef)(null),v=(0,J.useCallback)(()=>{g.current?.focus(),g.current?.select()},[]);(0,J.useEffect)(()=>t(v),[t,v]);let y=(0,J.useCallback)(()=>{window.setTimeout(()=>{_.current?.contains(document.activeElement)||h(!1)},0)},[]),b=(0,J.useCallback)(()=>{p(``),h(!1),g.current?.blur()},[]);return(0,Y.jsxs)(E,{align:`center`,gap:{base:5,md:6},width:`full`,children:[(0,Y.jsx)(a,{className:`langy-home-greeting`,children:(0,Y.jsx)(gr,{})}),(0,Y.jsxs)(E,{align:`center`,gap:3,width:`full`,maxWidth:_r,children:[(0,Y.jsx)(a,{ref:_,width:`full`,position:`relative`,background:`bg.panel/60`,borderWidth:`1px`,borderColor:m?{base:`border.emphasized`,_dark:`border`}:{base:`border`,_dark:`border.muted`},borderRadius:`16px`,boxShadow:m?`0 2px 8px rgba(20, 20, 23, 0.08), 0 24px 70px -20px rgba(20, 20, 23, 0.35)`:`0 1px 2px rgba(20, 20, 23, 0.04), 0 12px 30px -22px rgba(20, 20, 23, 0.5)`,transition:`border-color 130ms ease, box-shadow 130ms ease`,onKeyDown:e=>{e.key===`Escape`&&b()},children:(0,Y.jsx)(De,{surface:`inline`,active:m,query:f,setQuery:p,onDone:b,inputRef:g,onFocus:()=>h(!0),onBlur:y,placeholder:r?o?`Ask Langy how to get started, or search`:`Ask Langy, search, or jump to anything`:`Search, or jump to anything`})}),(0,Y.jsxs)(E,{width:`full`,gap:2.5,align:`center`,children:[l?(0,Y.jsx)(lr,{prominent:!0,onAskLangy:r?d:void 0}):null,(0,Y.jsx)(a,{width:`full`,minHeight:vr,display:`flex`,alignItems:`center`,justifyContent:`center`,children:(0,Y.jsx)(C,{gap:2,flexWrap:`wrap`,justify:`center`,children:r?u.map(e=>(0,Y.jsx)(br,{icon:(0,Y.jsx)(e.icon,{size:12}),label:e.label,onClick:()=>d(e.prompt)},e.label)):null})}),!l&&c?(0,Y.jsx)(lr,{onAskLangy:r?d:void 0}):null]}),r?null:(0,Y.jsx)(s,{fontSize:`12px`,color:`fg.subtle`,textAlign:`center`,children:`You can read Langy conversations here. To start one, ask whoever manages your account for access.`})]})]})}function br({icon:e,label:t,onClick:r}){return(0,Y.jsxs)(n.button,{type:`button`,onClick:r,display:`inline-flex`,alignItems:`center`,gap:1.5,fontSize:`12px`,color:`fg.muted`,background:`bg.panel/90`,borderWidth:`1px`,borderColor:`border.muted`,borderRadius:`full`,paddingX:3,paddingY:`4px`,cursor:`pointer`,whiteSpace:`nowrap`,transition:`color 130ms ease, border-color 130ms ease, background 130ms ease`,_hover:{color:`orange.fg`,borderColor:`orange.emphasized`,background:`bg.panel`},children:[(0,Y.jsx)(n.span,{display:`grid`,color:`fg.subtle`,children:e}),t]})}function xr({trailing:e}){return(0,Y.jsx)(E,{width:`full`,align:`stretch`,gap:3,paddingTop:4,borderTopWidth:`1px`,borderTopColor:`border.muted`,children:(0,Y.jsxs)(C,{gap:2,flexWrap:`wrap`,fontFamily:`mono`,fontSize:`10.5px`,children:[(0,Y.jsxs)(Sr,{children:[`LangWatch © `,new Date().getFullYear()]}),(0,Y.jsx)(Q,{}),(0,Y.jsx)($,{href:`https://docs.langwatch.ai/integration/python/guide`,children:`Python SDK`}),(0,Y.jsx)(Q,{}),(0,Y.jsx)($,{href:`https://docs.langwatch.ai/integration/typescript/guide`,children:`TypeScript SDK`}),(0,Y.jsx)(Q,{}),(0,Y.jsx)($,{href:`https://docs.langwatch.ai/integration/go/guide`,children:`Go SDK`}),(0,Y.jsx)(Q,{}),(0,Y.jsx)($,{href:`https://scenario.langwatch.ai`,children:`Scenario`}),(0,Y.jsx)(Q,{}),(0,Y.jsx)($,{href:`https://docs.langwatch.ai/integration/rest-api`,children:`REST API`}),(0,Y.jsx)(Q,{}),(0,Y.jsx)($,{href:`https://github.com/langwatch/langwatch`,children:`GitHub`}),(0,Y.jsx)(Q,{}),(0,Y.jsx)($,{href:`https://status.langwatch.ai`,children:`Status`}),(0,Y.jsx)(Q,{}),(0,Y.jsx)($,{href:`https://langwatch.ai/legal`,children:`Legal`}),(0,Y.jsx)(w,{}),e]})})}function Sr({children:e}){return(0,Y.jsx)(s,{as:`span`,fontFamily:`mono`,fontSize:`10.5px`,color:`fg.subtle`,children:e})}function Q(){return(0,Y.jsx)(s,{as:`span`,color:`fg.subtle`,"aria-hidden":!0,children:`·`})}function $({href:e,children:t}){return(0,Y.jsx)(Pe,{href:e,isExternal:!0,fontFamily:`mono`,fontSize:`10.5px`,color:`fg.subtle`,_hover:{color:`orange.500`},children:t})}var Cr=e=>{let t=ye[e],n=t?be[t]:null;return n?(0,Y.jsx)(h,{as:n.icon,width:`14px`,height:`14px`,display:`block`}):(0,Y.jsx)(h,{as:be.home.icon,width:`14px`,height:`14px`,display:`block`})},wr=e=>{let t=ye[e],n=(t?be[t]:null)?.label??`Item`;return n.endsWith(`s`)?n.slice(0,-1):n},Tr=8;function Er({item:e}){let t=Ie(e.updatedAt.getTime());return(0,Y.jsx)(Te,{asChild:!0,_hover:{textDecoration:`none`},width:`full`,display:`block`,children:(0,Y.jsx)(Me,{href:e.href,children:(0,Y.jsxs)(C,{gap:2.5,align:`center`,paddingX:2.5,paddingY:`7px`,borderRadius:`10px`,transition:`background 130ms ease`,_hover:{background:`bg.muted`},children:[(0,Y.jsx)(a,{flexShrink:0,padding:1.5,borderRadius:`md`,background:`bg.muted`,color:`fg.muted`,display:`grid`,placeItems:`center`,children:Cr(e.type)}),(0,Y.jsx)(s,{fontSize:`13px`,color:`fg`,flex:1,minWidth:0,lineClamp:1,title:e.name,children:e.name}),(0,Y.jsx)(s,{fontFamily:`mono`,fontSize:`11px`,color:`fg.subtle`,flexShrink:0,children:wr(e.type)}),t?(0,Y.jsx)(s,{fontFamily:`mono`,fontSize:`11px`,color:`fg.subtle`,flexShrink:0,minWidth:`56px`,textAlign:`right`,children:t}):null]})})})}function Dr(){return(0,Y.jsx)(dn,{cursor:`default`,padding:2,children:(0,Y.jsx)(E,{align:`stretch`,gap:1,width:`full`,children:Array.from({length:4}).map((e,t)=>(0,Y.jsxs)(C,{gap:2.5,paddingX:2.5,paddingY:`7px`,children:[(0,Y.jsx)(o,{width:`28px`,height:`28px`,borderRadius:`md`}),(0,Y.jsx)(o,{height:`13px`,flex:1,maxWidth:`45%`}),(0,Y.jsx)(o,{height:`11px`,width:`56px`})]},t))})})}function Or({priorityTypes:e}={}){let{project:t}=G(),{data:n,isLoading:r,error:i,refetch:o}=j.home.getRecentItems.useQuery({projectId:t?.id??``,limit:12},{enabled:!!t?.id,staleTime:6e4,cacheTime:10*6e4,keepPreviousData:!0}),c=n&&e?.length?[...n.filter(t=>e.includes(t.type)),...n.filter(t=>!e.includes(t.type))]:n;return!r&&!i&&c?.length===0?null:(0,Y.jsxs)(E,{align:`stretch`,gap:3,width:`full`,children:[(0,Y.jsx)(fn,{title:`Jump right back`}),r&&!!t?.id&&(0,Y.jsx)(Dr,{}),i&&(0,Y.jsx)(dn,{cursor:`default`,padding:6,children:(0,Y.jsxs)(E,{gap:2,width:`full`,children:[(0,Y.jsx)(a,{color:`red.500`,children:(0,Y.jsx)(L,{size:24})}),(0,Y.jsx)(s,{fontSize:`sm`,color:`fg.muted`,children:`Failed to load recent items`}),(0,Y.jsx)(s,{fontSize:`xs`,color:`blue.500`,cursor:`pointer`,_hover:{textDecoration:`underline`},onClick:()=>void o(),children:`Retry`})]})}),!r&&!i&&c&&c.length>0&&(0,Y.jsx)(dn,{cursor:`default`,padding:2,children:(0,Y.jsx)(E,{align:`stretch`,gap:.5,width:`full`,children:c.slice(0,Tr).map(e=>(0,Y.jsx)(Er,{item:e},`${e.type}-${e.id}`))})})]})}var kr=[{label:`Connect tracing`,description:`See your first live trace`,path:`traces`},{label:`Create a prompt`,description:`Version and test a prompt`,path:`prompts`},{label:`Run a simulation`,description:`Test an agent journey`,path:`simulations`}];function Ar({projectSlug:e}){return(0,Y.jsxs)(E,{align:`stretch`,gap:3,paddingY:3,width:`full`,children:[(0,Y.jsxs)(C,{align:{base:`start`,md:`center`},justify:`space-between`,flexDirection:{base:`column`,md:`row`},gap:1,children:[(0,Y.jsx)(s,{fontSize:`sm`,fontWeight:`medium`,color:`fg`,children:`Nothing here yet — pick a quick start`}),(0,Y.jsx)(s,{fontSize:`xs`,color:`fg.muted`,children:`These are good first ways to explore LangWatch.`})]}),(0,Y.jsx)(m,{templateColumns:{base:`1fr`,sm:`repeat(3, minmax(0, 1fr))`},gap:2,children:kr.map(t=>(0,Y.jsx)(Pe,{href:`/${e}/${t.path}`,display:`block`,borderWidth:`1px`,borderColor:`border.muted`,borderRadius:`lg`,paddingX:3,paddingY:2.5,color:`fg`,textDecoration:`none`,transition:`border-color 130ms ease, background 130ms ease`,_hover:{borderColor:`orange.emphasized`,background:`bg.subtle`,textDecoration:`none`},children:(0,Y.jsxs)(C,{justify:`space-between`,gap:2,children:[(0,Y.jsxs)(E,{align:`start`,gap:0,minWidth:0,children:[(0,Y.jsx)(s,{fontSize:`xs`,fontWeight:`semibold`,children:t.label}),(0,Y.jsx)(s,{fontSize:`2xs`,color:`fg.muted`,lineClamp:1,children:t.description})]}),(0,Y.jsx)(le,{size:13,"aria-hidden":!0})]})},t.path))})]})}var jr=4,Mr={key:`30d`,label:`Last 30 days`},Nr=160;function Pr({variant:e=`full`}){let{project:t,hasPermission:r}=G(),i=r(`cost:view`),{daysDifference:o,setRelativePeriod:c}=Ve(),[l,u]=(0,J.useState)(!1),d=e!==`full`,f=o===1?`Last day`:`Last ${o} days`,p=o===1?`the last day`:`the last ${o} days`,m=o>=jr,h=m&&(e===`trend`||e===`strip`&&l),g={graphId:`tracesOverview`,graphType:`summary`,series:[{name:`Traces`,metric:`metadata.trace_id`,aggregation:`cardinality`,colorSet:M.metadata.trace_id.colorSet},{name:`Threads`,metric:`metadata.thread_id`,aggregation:`cardinality`,colorSet:M.metadata.thread_id.colorSet},{name:`Users`,metric:`metadata.user_id`,aggregation:`cardinality`,colorSet:M.metadata.user_id.colorSet},{name:`Total Tokens`,metric:`performance.total_tokens`,aggregation:`sum`,colorSet:M.performance.total_tokens.colorSet},...i?[{name:`LLM Cost`,metric:`performance.total_cost`,aggregation:`sum`,colorSet:M.performance.total_cost.colorSet}]:[],{name:`Mean Completion Time`,metric:`performance.completion_time`,aggregation:`avg`,colorSet:M.performance.completion_time.colorSet}],includePrevious:!0,timeScale:`full`};return t?(0,Y.jsxs)(dn,{width:`full`,padding:4,_hover:{boxShadow:`2xs`},children:[(0,Y.jsx)(fn,{title:`Traces overview`,qualifier:f,children:(0,Y.jsx)(C,{gap:2,align:`center`,children:(0,Y.jsxs)(Pe,{href:`/${t.slug}/analytics`,fontSize:`xs`,color:`fg.muted`,_hover:{color:`orange.500`},children:[`View dashboards `,(0,Y.jsx)(le,{size:12})]})})}),(0,Y.jsx)(N,{input:g,emptyState:(0,Y.jsx)(Ar,{projectSlug:t.slug})}),d?(0,Y.jsxs)(C,{gap:3,flexWrap:`wrap`,width:`full`,align:`center`,children:[(0,Y.jsx)(s,{fontSize:`xs`,color:`fg.subtle`,children:`Each figure is compared with the period before it.`}),(0,Y.jsx)(w,{}),m?e===`strip`?(0,Y.jsxs)(n.button,{type:`button`,onClick:()=>u(e=>!e),"aria-expanded":l,display:`inline-flex`,alignItems:`center`,gap:1,fontSize:`xs`,color:`fg.muted`,background:`transparent`,borderWidth:0,cursor:`pointer`,_hover:{color:`fg`},children:[l?(0,Y.jsx)(R,{size:12}):(0,Y.jsx)(F,{size:12}),l?`Hide the trend`:`Show the trend over ${p}`]}):null:(0,Y.jsxs)(n.button,{type:`button`,onClick:()=>c(Mr.key),fontSize:`xs`,color:`fg.muted`,background:`transparent`,borderWidth:0,cursor:`pointer`,textDecoration:`underline`,textUnderlineOffset:`3px`,_hover:{color:`orange.fg`},children:[`See `,Mr.label.toLowerCase()]})]}):null,h?(0,Y.jsx)(a,{width:`full`,children:(0,Y.jsx)(N,{input:{...g,graphType:`line`,timeScale:1,includePrevious:!1,height:Nr},titleProps:{fontSize:`xs`,color:`fg.muted`}})}):null]}):null}var Fr=`release_ui_home_signal_focused_enabled`;function Ir(){let{project:e,organization:t,isLoading:n}=G({redirectToOnboarding:!1,redirectToProjectOnboarding:!1}),{enabled:r,isLoading:i}=Be(Fr,{projectId:e?.id,organizationId:t?.id,enabled:!!e});return{show:r,isResolving:n||!!e&&i}}function Lr({showSignalFocusedHome:e,showLangy:t,signalFocusedResolving:n=!1,langyResolving:r=!1}){return n?`undecided`:e?`signal-focused`:r?`undecided`:t?`langy`:`classic`}function Rr(){let e=Ir(),t=Ke();return Lr({showSignalFocusedHome:e.show,showLangy:t.show,signalFocusedResolving:e.isResolving,langyResolving:t.isResolving})}function zr(){let e=Rr();return(0,Y.jsx)(D,{children:(0,Y.jsx)(a,{width:`full`,position:`relative`,overflowX:`clip`,children:(0,Y.jsx)(S,{maxW:`7xl`,padding:5,position:`relative`,zIndex:1,children:(0,Y.jsxs)(E,{gap:4,width:`full`,align:`start`,children:[(0,Y.jsxs)(C,{width:`full`,align:`center`,gap:2,position:`relative`,zIndex:2,children:[e===`langy`?null:(0,Y.jsx)(gr,{}),(0,Y.jsx)(w,{}),(0,Y.jsx)(Br,{})]}),e===`undecided`?(0,Y.jsx)(Vr,{}):e===`signal-focused`?(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(ln,{}),(0,Y.jsxs)(m,{templateColumns:{base:`1fr`,lg:`1fr 1fr`},gap:4,width:`full`,alignItems:`stretch`,children:[(0,Y.jsxs)(E,{gap:4,align:`stretch`,minWidth:0,children:[(0,Y.jsx)(or,{}),(0,Y.jsx)(a,{flex:`1`,display:`flex`,minHeight:`120px`,children:(0,Y.jsx)(Cn,{})})]}),(0,Y.jsxs)(E,{gap:4,align:`stretch`,minWidth:0,children:[(0,Y.jsx)(yn,{}),(0,Y.jsx)(a,{flex:`1`,display:`flex`,minHeight:`100px`,children:(0,Y.jsx)(Ln,{})})]})]}),(0,Y.jsx)(Or,{})]}):e===`langy`?(0,Y.jsx)(Hr,{}):(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(or,{variant:`legacy`}),(0,Y.jsx)(Pr,{}),(0,Y.jsx)(Or,{}),(0,Y.jsx)(vn,{})]}),(0,Y.jsx)(xr,{trailing:(0,Y.jsxs)(C,{gap:2,children:[(0,Y.jsx)(xn,{}),(0,Y.jsx)(Fn,{})]})})]})})})})}function Br(){let{organization:e}=G({redirectToOnboarding:!1,redirectToProjectOnboarding:!1});return j.plan.getActivePlan.useQuery({organizationId:e?.id??``},{enabled:!!e,refetchOnWindowFocus:!1,refetchOnMount:!1}).data?.free===!0?(0,Y.jsxs)(C,{gap:2.5,align:`center`,children:[(0,Y.jsx)(n.span,{fontSize:`12px`,color:`fg.subtle`,whiteSpace:`nowrap`,display:{base:`none`,md:`inline`},children:`Considering LangWatch for your team?`}),(0,Y.jsxs)(n.a,{href:`https://langwatch.ai/get-a-demo`,target:`_blank`,rel:`noreferrer`,display:`inline-flex`,alignItems:`center`,gap:1.5,fontFamily:`mono`,fontSize:`11.5px`,whiteSpace:`nowrap`,color:`fg.muted`,borderWidth:`1px`,borderColor:`border.muted`,borderRadius:`full`,paddingX:2.5,paddingY:`4px`,transition:`color 130ms ease, border-color 130ms ease`,_hover:{color:`orange.fg`,borderColor:`orange.emphasized`},children:[(0,Y.jsx)(ce,{size:12}),`Request a demo`]})]}):null}function Vr(){return(0,Y.jsxs)(E,{gap:4,width:`full`,align:`stretch`,"aria-busy":`true`,"aria-label":`Loading your home`,children:[(0,Y.jsx)(o,{height:`180px`,borderRadius:`xl`}),(0,Y.jsx)(o,{height:`96px`,borderRadius:`lg`}),(0,Y.jsxs)(m,{templateColumns:{base:`1fr`,lg:`1fr 1fr`},gap:4,children:[(0,Y.jsx)(o,{height:`120px`,borderRadius:`lg`}),(0,Y.jsx)(o,{height:`120px`,borderRadius:`lg`})]})]})}function Hr(){let{isNewProject:e}=k(),t=Pn();return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(or,{variant:`lantern`,children:(0,Y.jsx)(yr,{})}),t===`empty`||t!==`populated`&&e?(0,Y.jsx)(vn,{}):(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(Pr,{variant:Dn(t)}),(0,Y.jsx)(Or,{}),(0,Y.jsx)(vn,{})]}),(0,Y.jsx)(Cn,{})]})}function Ur(){return(0,Y.jsx)(Wr,{})}function Wr(){let e=A(),t=e.query.return_to,n=Je(t),r=!!(n&&typeof window<`u`);return(0,J.useEffect)(()=>{r&&n&&e.push(n)},[e,n,r]),r?null:(0,Y.jsx)(zr,{})}export{Ur as default};
|
|
8
|
-
//# sourceMappingURL=_project_-CPYgRSe0.js.map
|
|
@@ -1,7 +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{t as o}from"./text-A3qvcMyN.js";import{Nn as s}from"./useLiteMemberGuard-klZnweA7.js";import{n as c}from"./info-CtYT35g4.js";import{at as l,it as u,ot as d,r as f}from"./UpgradeModal-BmLw5ONS.js";import{r as p,t as m}from"./card-54_vstoB.js";import{t as h}from"./h-stack-CMPhqSp5.js";import{n as g,r as _,t as v}from"./stat-BuRz-g3X.js";import{i as y,n as b,r as x,t as S}from"./ReplayStateBadge-C_aPNnCs.js";import{t as C}from"./v-stack-ClAMS101.js";import{t as w}from"./DashboardLayout-RHGL-98_.js";import{t as T}from"./arrow-left-BWMkb3Ih.js";import{r as E}from"./next-router-Bn5Y8Iek.js";import{n as D}from"./api-BK6L1im2.js";import{Mr as O,g as k,t as A}from"./index-CUhcyBp3.js";import{r as j}from"./formatters-BDO3Inyr.js";import{t as M}from"./OpsPageShell-BamkwuvB.js";import{i as N,t as P}from"./parseActiveProjections-BYVfzdkq.js";var F=e(t()),I=i();function L(){let e=(...e)=>{let t=``,n=0;for(let[r,i]of e)r>n&&(t+=` `.repeat(r-n)),t+=i,n=r+i.length;return t},t=`/|═=`,n=`=═|\\`,r=`· · · ·`,i=e=>`─`.repeat(e);return[[e([5,`O`],[13,r],[33,`O`]),e([4,`/|\\`],[32,`/|\\`]),e([4,`/ \\`],[32,`/ \\`])],[e([5,`O`],[33,`O`]),e([4,`/|\\`],[18,`°`],[32,`/|\\`]),e([4,`/ \\`],[32,`/ \\`])],[e([5,`O`],[33,`O`]),e([4,t],[13,r],[32,`/|\\`]),e([4,`/ \\`],[32,`/ \\`])],[e([5,`O`],[33,`O`]),e([4,t],[8,i(11)+`▶`],[32,`/|\\`]),e([4,`/ \\`],[15,`pew!`],[32,`/ \\`])],[e([5,`O`],[32,`*`],[33,`O`]),e([4,t],[8,`· · · · ·`],[32,`/|\\`]),e([4,`/ \\`],[32,`/ \\`])],[e([5,`O`],[32,`\\O`]),e([4,t],[8,`· · ·`],[33,`|`]),e([4,`/ \\`],[32,`/ \\`])],[e([5,`O`],[33,`O`]),e([4,`/|\\`],[13,r],[31,n]),e([4,`/ \\`],[32,`/ \\`])],[e([5,`O`],[33,`O`]),e([4,`/|\\`],[7,`◀`+i(11)],[31,n]),e([4,`/ \\`],[20,`!wep`],[32,`/ \\`])],[e([6,`*`],[5,`O`],[33,`O`]),e([4,`/|\\`],[7,`· · · · ·`],[31,n]),e([4,`/ \\`],[32,`/ \\`])],[e([5,`O/`],[33,`O`]),e([5,`|`],[7,`· · ·`],[31,n]),e([4,`/ \\`],[32,`/ \\`])],[e([5,`O`],[19,`·`],[33,`O`]),e([4,t],[13,r],[31,n]),e([4,`/ \\`],[32,`/ \\`])],[e([5,`O`],[33,`O`]),e([4,t],[8,i(4)+`▶`],[18,`✶`],[20,`◀`+i(4)],[31,n]),e([4,`/ \\`],[13,`pew! !wep`],[32,`/ \\`])],[e([5,`O`],[15,`\\`],[17,`*`],[19,`|`],[21,`*`],[23,`/`],[33,`O`]),e([4,t],[13,i(2)],[16,`★`],[18,`★`],[20,`★`],[23,i(2)],[31,n]),e([4,`/ \\`],[15,`/`],[17,`*`],[19,`|`],[21,`*`],[23,`\\`],[32,`/ \\`])],[e([5,`O`],[12,`~ ~ ~ ~ ~`],[33,`O`]),e([4,`/|\\`],[11,`~ ~ ~ ~ ~ ~`],[32,`/|\\`]),e([4,`/ \\`],[12,`~ ~ ~ ~ ~`],[32,`/ \\`])]]}var R=L();function z(e,t){if(e===`replay`){let e=[3,4,5,6,7,8,9,10,11];return R[e[Math.floor(t/3)%e.length]]}if(e===`write`){let e=[11,12,12,13,13];return R[e[Math.floor(t/3)%e.length]]}if(e===`drain`){let e=[0,0,1,0,0];return R[e[Math.floor(t/4)%e.length]]}if(e===`cutoff`){let e=[0,2,6,10];return R[e[Math.floor(t/4)%e.length]]}return R[0]}function B({phase:e}){let[t,n]=(0,F.useState)(0),r=(0,F.useRef)(t);return r.current=t,(0,F.useEffect)(()=>{let e=setInterval(()=>{n(e=>e+1)},200);return()=>clearInterval(e)},[]),(0,I.jsx)(a,{fontFamily:`mono`,fontSize:`14px`,lineHeight:`1.3`,whiteSpace:`pre`,textAlign:`center`,color:`orange.400`,userSelect:`none`,children:z(e,t).map((e,t)=>(0,I.jsx)(a,{children:e},t))})}var V=`
|
|
2
|
-
@keyframes meshPulse {
|
|
3
|
-
0%, 100% { background-position: 0% 50%; }
|
|
4
|
-
50% { background-position: 100% 50%; }
|
|
5
|
-
}
|
|
6
|
-
`;function H({runId:e}){let t=b(),i=D.ops.getReplayRun.useQuery({runId:e},{refetchInterval:!1}),s=D.ops.cancelReplay.useMutation({onSuccess:()=>{t.refetch()}}),{hasAccess:c}=k(),l=t.data,u=i.data,d=l?.runId===e&&l.state!==`idle`,f=d&&l?.state===`running`,p=S(d?l?.state??`idle`:u?.state??`idle`),m=d&&l&&l.aggregatesTotal>0?Math.round(l.aggregatesProcessed/l.aggregatesTotal*100):0,g=f?{background:`linear-gradient(135deg, rgba(251,146,60,0.05) 0%, rgba(251,146,60,0.12) 25%, rgba(234,88,12,0.08) 50%, rgba(251,146,60,0.12) 75%, rgba(251,146,60,0.05) 100%)`,backgroundSize:`200% 200%`,animation:`meshPulse 4s ease infinite`}:{},_=t.isLoading||i.isLoading,v=d||u;return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`style`,{children:V}),(0,I.jsxs)(a,{style:g,borderRadius:`lg`,padding:4,children:[(0,I.jsx)(h,{marginBottom:4,children:(0,I.jsx)(A,{href:`/ops/projections`,_hover:{textDecoration:`none`},children:(0,I.jsxs)(h,{gap:1,color:`fg.muted`,_hover:{color:`fg`},children:[(0,I.jsx)(T,{size:14}),(0,I.jsx)(o,{textStyle:`xs`,children:`Back to Projections`})]})})}),_&&(0,I.jsx)(O,{paddingY:20,children:(0,I.jsx)(n,{size:`lg`})}),!_&&!v&&(0,I.jsx)(O,{paddingY:20,children:(0,I.jsxs)(C,{gap:2,children:[(0,I.jsx)(o,{textStyle:`sm`,color:`fg.muted`,children:`No replay found for this run ID.`}),(0,I.jsx)(A,{href:`/ops/projections`,children:(0,I.jsx)(r,{size:`sm`,variant:`outline`,children:`Back to Projections`})})]})}),v&&d&&l&&(0,I.jsx)(U,{status:l,stateColor:p,progressPercent:m,isRunning:!!f,hasAccess:c,cancelMutation:s}),v&&!d&&u&&(0,I.jsx)(W,{entry:u,stateColor:p})]})]})}function U({status:e,stateColor:t,progressPercent:n,isRunning:i,hasAccess:f,cancelMutation:b}){let S=(0,F.useMemo)(()=>{if(!e.startedAt||!e.eventsProcessed)return null;let t=((e.completedAt?new Date(e.completedAt).getTime():Date.now())-new Date(e.startedAt).getTime())/1e3;return t<1?null:Math.round(e.eventsProcessed/t)},[e.startedAt,e.completedAt,e.eventsProcessed]),w=(0,F.useMemo)(()=>P(e.currentProjection),[e.currentProjection]),T=(0,F.useMemo)(()=>new Set(w),[w]);return(0,I.jsxs)(C,{align:`stretch`,gap:4,children:[(0,I.jsx)(N,{currentPhase:e.currentPhase,completedState:i?null:e.state}),(0,I.jsxs)(s,{columns:4,gap:1,children:[(0,I.jsxs)(g,{children:[(0,I.jsx)(v,{children:`Aggregates`}),(0,I.jsxs)(_,{textStyle:`lg`,children:[e.aggregatesProcessed,e.aggregatesTotal>0&&` / ${e.aggregatesTotal}`]})]}),(0,I.jsxs)(g,{children:[(0,I.jsx)(v,{children:`Events`}),(0,I.jsx)(_,{textStyle:`lg`,children:e.eventsProcessed.toLocaleString()})]}),(0,I.jsxs)(g,{children:[(0,I.jsx)(v,{children:`Rate`}),(0,I.jsx)(_,{textStyle:`lg`,children:S===null?`—`:`${S.toLocaleString()}/s`})]}),(0,I.jsxs)(g,{children:[(0,I.jsx)(v,{children:`Elapsed`}),(0,I.jsx)(_,{textStyle:`lg`,children:e.startedAt?j(e.startedAt,e.completedAt):`—`})]})]}),i&&e.aggregatesTotal>0&&(0,I.jsxs)(C,{align:`stretch`,gap:1,children:[(0,I.jsx)(l,{size:`sm`,value:n,colorPalette:`orange`,children:(0,I.jsx)(d,{children:(0,I.jsx)(u,{})})}),(0,I.jsxs)(o,{textStyle:`xs`,color:`fg.muted`,textAlign:`end`,children:[n,`%`]})]}),(0,I.jsx)(p,{children:(0,I.jsx)(m,{padding:4,children:(0,I.jsxs)(C,{align:`stretch`,gap:3,children:[(0,I.jsxs)(h,{justify:`space-between`,children:[(0,I.jsxs)(h,{gap:2,children:[(0,I.jsx)(y,{colorPalette:t,children:(0,I.jsx)(x,{})}),(0,I.jsxs)(o,{textStyle:`sm`,fontWeight:`semibold`,children:[`Replay`,` `,e.state===`running`?`in progress`:e.state]}),w.length>0&&i&&(0,I.jsx)(c,{size:`sm`,variant:`subtle`,children:w.length===1?w[0]:`${w.length} projections`})]}),i&&f&&(0,I.jsx)(r,{size:`xs`,colorPalette:`red`,variant:`outline`,loading:b.isPending,onClick:()=>b.mutate(),children:`Cancel Replay`})]}),e.description&&(0,I.jsx)(o,{textStyle:`xs`,color:`fg.muted`,children:e.description}),e.state===`failed`&&e.error&&(0,I.jsx)(a,{bg:`red.subtle`,padding:3,borderRadius:`md`,children:(0,I.jsx)(o,{textStyle:`xs`,color:`red.500`,children:e.error})}),e.startedAt&&e.userName&&(0,I.jsxs)(o,{textStyle:`xs`,color:`fg.muted`,children:[`Started by `,e.userName]}),(0,I.jsx)(h,{gap:2,flexWrap:`wrap`,children:e.projectionNames.map(e=>(0,I.jsx)(c,{size:`sm`,variant:i&&T.has(e)?`solid`:`subtle`,colorPalette:i&&T.has(e)?`orange`:`gray`,children:e},e))}),i&&(0,I.jsx)(O,{overflow:`hidden`,maxHeight:`60px`,children:(0,I.jsx)(a,{transform:`scale(0.75)`,transformOrigin:`center`,children:(0,I.jsx)(B,{phase:e.currentPhase})})})]})})})]})}function W({entry:e,stateColor:t}){return(0,I.jsxs)(C,{align:`stretch`,gap:4,children:[(0,I.jsx)(N,{currentPhase:null,completedState:e.state}),(0,I.jsx)(p,{children:(0,I.jsx)(m,{padding:4,children:(0,I.jsxs)(C,{align:`stretch`,gap:3,children:[(0,I.jsxs)(h,{gap:2,children:[(0,I.jsx)(y,{colorPalette:t,children:(0,I.jsx)(x,{})}),(0,I.jsxs)(o,{textStyle:`sm`,fontWeight:`semibold`,children:[`Replay `,e.state]})]}),e.description&&(0,I.jsx)(o,{textStyle:`xs`,color:`fg.muted`,children:e.description}),(0,I.jsxs)(h,{gap:4,flexWrap:`wrap`,children:[(0,I.jsxs)(o,{textStyle:`xs`,color:`fg.muted`,children:[e.aggregatesProcessed.toLocaleString(),` aggregates`]}),(0,I.jsxs)(o,{textStyle:`xs`,color:`fg.muted`,children:[e.eventsProcessed.toLocaleString(),` events`]}),(0,I.jsxs)(o,{textStyle:`xs`,color:`fg.muted`,children:[`Duration: `,j(e.startedAt,e.completedAt)]}),e.completedAt&&(0,I.jsxs)(o,{textStyle:`xs`,color:`fg.muted`,children:[e.state===`completed`?`Completed`:`Ended`,` at`,` `,new Date(e.completedAt).toLocaleString()]}),e.userName&&(0,I.jsxs)(o,{textStyle:`xs`,color:`fg.muted`,children:[`Started by `,e.userName]})]}),e.state===`failed`&&e.error&&(0,I.jsxs)(a,{bg:`red.subtle`,padding:3,borderRadius:`md`,borderWidth:`1px`,borderColor:`red.200`,children:[(0,I.jsx)(o,{textStyle:`xs`,fontWeight:`medium`,color:`red.500`,marginBottom:1,children:`Error`}),(0,I.jsx)(o,{textStyle:`xs`,color:`red.500`,whiteSpace:`pre-wrap`,wordBreak:`break-word`,children:e.error})]}),(0,I.jsx)(h,{gap:2,flexWrap:`wrap`,children:e.projectionNames.map(e=>(0,I.jsx)(c,{size:`sm`,variant:`subtle`,children:e},e))}),e.tenantIds.length>0&&(0,I.jsxs)(C,{align:`stretch`,gap:1,children:[(0,I.jsx)(o,{textStyle:`xs`,color:`fg.muted`,children:`Tenants`}),(0,I.jsx)(h,{gap:1,flexWrap:`wrap`,children:e.tenantIds.map(e=>(0,I.jsx)(c,{size:`xs`,variant:`outline`,children:e},e))})]})]})})})]})}function G(){let e=E().query.runId;return(0,I.jsx)(M,{children:(0,I.jsxs)(w,{children:[(0,I.jsx)(f.Header,{children:(0,I.jsx)(f.Heading,{children:`Replay Progress`})}),(0,I.jsx)(f.Container,{children:(0,I.jsx)(H,{runId:e})})]})})}export{G as default};
|
|
7
|
-
//# sourceMappingURL=_runId_-CnJnzVCf.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{t as o}from"./text-A3qvcMyN.js";import{r as s}from"./UpgradeModal-BmLw5ONS.js";import{r as c,t as l}from"./card-54_vstoB.js";import{t as u}from"./h-stack-CMPhqSp5.js";import{t as d}from"./spacer-CbmCSsJg.js";import{nt as f}from"./immer-tl_oI9yy.js";import{t as p}from"./v-stack-ClAMS101.js";import{t as m}from"./chevron-left-BxUyhBNT.js";import{r as h}from"./next-router-Bn5Y8Iek.js";import{n as g}from"./api-BK6L1im2.js";import{Mr as _,Qn as v,ni as y}from"./index-CUhcyBp3.js";import{t as b}from"./SettingsLayout-CYtjUobV.js";import{t as x}from"./SearchInput-C_AroTij.js";var S=i();function C({title:e,searchValue:t,onSearchChange:r,searchPlaceholder:i=`Search`,pagination:f,isLoading:m,isFetching:h,error:g,onCreate:_,createLabel:b=`Create`,children:C}){return(0,S.jsxs)(p,{gap:6,width:`full`,align:`start`,children:[(0,S.jsxs)(u,{width:`full`,children:[(0,S.jsx)(y,{children:e}),(0,S.jsx)(d,{}),_&&(0,S.jsxs)(s.HeaderButton,{onClick:_,children:[(0,S.jsx)(v,{size:20}),b]})]}),(0,S.jsx)(x,{value:t,onChange:e=>r(e.target.value),placeholder:i,width:`full`,maxWidth:`480px`}),(0,S.jsx)(c,{width:`full`,overflow:`hidden`,children:(0,S.jsx)(l,{paddingY:0,paddingX:0,children:g?(0,S.jsx)(a,{paddingY:10,paddingX:4,children:(0,S.jsx)(o,{color:`red.500`,fontSize:`sm`,children:g.message})}):m?(0,S.jsx)(a,{paddingY:10,textAlign:`center`,children:(0,S.jsx)(n,{size:`md`})}):(0,S.jsxs)(a,{position:`relative`,width:`full`,overflow:`auto`,children:[h&&(0,S.jsx)(a,{position:`absolute`,top:2,right:2,zIndex:1,color:`fg.muted`,children:(0,S.jsx)(n,{size:`xs`})}),C]})})}),f&&f.total>0&&(0,S.jsx)(w,{...f})]})}function w({page:e,perPage:t,total:n,onPageChange:i}){let a=Math.max(1,Math.ceil(n/t)),s=e>1,c=e<a;return(0,S.jsxs)(u,{width:`full`,justify:`end`,gap:4,children:[(0,S.jsxs)(o,{fontSize:`sm`,color:`fg.muted`,children:[n===0?0:(e-1)*t+1,`–`,Math.min(n,e*t),` of `,n]}),(0,S.jsxs)(u,{gap:1,children:[(0,S.jsx)(r,{size:`sm`,variant:`outline`,disabled:!s,onClick:()=>i(e-1),children:(0,S.jsx)(m,{size:14})}),(0,S.jsx)(r,{size:`sm`,variant:`outline`,disabled:!c,onClick:()=>i(e+1),children:(0,S.jsx)(f,{size:14})})]})]})}function T({children:e}){return(0,S.jsx)(o,{color:`fg.muted`,fontSize:`sm`,children:e??`—`})}function E(e){if(!e)return`—`;let t=typeof e==`string`?new Date(e):e;return Number.isNaN(t.getTime())?`—`:t.toLocaleDateString()}function D(e){if(!e)return`—`;let t=typeof e==`string`?new Date(e):e;return Number.isNaN(t.getTime())?`—`:`${t.toLocaleDateString()} ${t.toLocaleTimeString()}`}function O(e){if(!e)return null;let t=e.split(`-`).map(Number);if(t.length!==3||t.some(e=>Number.isNaN(e)))return null;let[n,r,i]=t;return new Date(n,r-1,i,12,0,0,0).toISOString()}var k=e(t());function A({children:e}){let t=h(),r=g.user.isAdmin.useQuery({},{retry:!1,refetchOnWindowFocus:!1}),i=r.data?.isAdmin===!0,a=r.isSuccess&&!i||r.isError;return(0,k.useEffect)(()=>{a&&t.push(`/`)},[a,t]),i?(0,S.jsx)(b,{children:e}):(0,S.jsx)(b,{children:(0,S.jsx)(_,{paddingY:20,children:(0,S.jsxs)(p,{gap:3,children:[!a&&(0,S.jsx)(n,{size:`lg`}),(0,S.jsx)(o,{color:`fg.muted`,fontSize:`sm`,children:a?`Access denied`:`Loading Backoffice…`})]})})})}export{E as a,O as i,C as n,D as o,T as r,A as t};
|
|
2
|
-
//# sourceMappingURL=_shell-JRkk6wPs.js.map
|