decocms 4.572.0 → 4.574.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/dist/client/assets/{AlertCircle-kYtqXGU8.js → AlertCircle-Co3RPbIZ.js} +1 -1
- package/dist/client/assets/{AreaChart-DDNkWSZu.js → AreaChart-BvS2pAoE.js} +1 -1
- package/dist/client/assets/{ArrowLeft-B1m5qQi9.js → ArrowLeft-XBSBGQal.js} +1 -1
- package/dist/client/assets/{ArrowUp-DcYpepHk.js → ArrowUp-DLnkUu9S.js} +1 -1
- package/dist/client/assets/{CartesianChart-BfCEFz3y.js → CartesianChart-DOb1QHVF.js} +1 -1
- package/dist/client/assets/{CategoricalChart-Bp-vLaQf.js → CategoricalChart-BkeCXQf9.js} +1 -1
- package/dist/client/assets/{CheckCircle-B4NfGYxe.js → CheckCircle-kNwBDDVU.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-EqyUOMMk.js → ChevronSelectorVertical-Gg7YcxlH.js} +1 -1
- package/dist/client/assets/{ChevronUp-DRG0w_P4.js → ChevronUp-D1T3kSyr.js} +1 -1
- package/dist/client/assets/{CreditCard01-BLl0RgXC.js → CreditCard01-D65BAIaV.js} +1 -1
- package/dist/client/assets/{Globe04--FaZazgw.js → Globe04-D17A2x5l.js} +1 -1
- package/dist/client/assets/{Key01-D0Pq98hT.js → Key01-awxHKnoL.js} +1 -1
- package/dist/client/assets/{LinkBroken01-C9GtmpYY.js → LinkBroken01-loTkm0G5.js} +1 -1
- package/dist/client/assets/{Minus-eGpg4-RN.js → Minus-CYrsmoRb.js} +1 -1
- package/dist/client/assets/{Monitor01-Su614Ctg.js → Monitor01-DalIAdj7.js} +1 -1
- package/dist/client/assets/{Play-D_ph4pZ0.js → Play-C6Weq-wk.js} +1 -1
- package/dist/client/assets/{Plus-D8rFucQH.js → Plus-D7X8Q2-q.js} +1 -1
- package/dist/client/assets/{ReferenceLine-BsZk9TgE.js → ReferenceLine-HGyXAqMo.js} +1 -1
- package/dist/client/assets/{SearchMd-2MPq0KPN.js → SearchMd-e6xPeRPD.js} +1 -1
- package/dist/client/assets/{ShoppingBag01-DDCYsqx9.js → ShoppingBag01-zloi0TDl.js} +1 -1
- package/dist/client/assets/{Sun-Dvv08Urq.js → Sun-C1lyqton.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-D7HAXgYP.js → SwitchHorizontal01-elXb4-4d.js} +1 -1
- package/dist/client/assets/{Tool01-BTDYOKsB.js → Tool01-Bo2g-Ylw.js} +1 -1
- package/dist/client/assets/{Tooltip-CPoCGNVz.js → Tooltip-C2g-R1Ae.js} +1 -1
- package/dist/client/assets/{Trash01-CHCe7_6o.js → Trash01-C-PU5Hm-.js} +1 -1
- package/dist/client/assets/{Upload01-Q6ECKQXp.js → Upload01-NPnXKs-J.js} +1 -1
- package/dist/client/assets/{UserSquare-BJHrMhrM.js → UserSquare-Qd-FKVqK.js} +1 -1
- package/dist/client/assets/{Users01-DHfg9AEk.js → Users01-CTNixqdX.js} +1 -1
- package/dist/client/assets/{XClose-BDiB_Nvo.js → XClose-BuJ6u6eL.js} +1 -1
- package/dist/client/assets/{Zap-DpvU6Dp2.js → Zap-pmN7zSOE.js} +1 -1
- package/dist/client/assets/{access-gate-BjRwuLrP.js → access-gate-Bj4L1Bay.js} +1 -1
- package/dist/client/assets/{add-connection-dialog-Bh0vHlQ5.js → add-connection-dialog-BL3Uj9Py.js} +1 -1
- package/dist/client/assets/agent-app-C3J9IT10.js +1 -0
- package/dist/client/assets/agent-assets-CvnH7aBA.js +1 -0
- package/dist/client/assets/{agent-automation-C1Vdho1R.js → agent-automation-Bea1eB6T.js} +3 -3
- package/dist/client/assets/agent-automations-R-Eaz2To.js +1 -0
- package/dist/client/assets/agent-calendar-Cd8km6Ln.js +1 -0
- package/dist/client/assets/{agent-capabilities-C80Nj8dH.js → agent-capabilities-BGShibnD.js} +1 -1
- package/dist/client/assets/agent-connect-sources-BrM4y83H.js +1 -0
- package/dist/client/assets/agent-deck-DRKoTD-S.js +1 -0
- package/dist/client/assets/agent-e2e-BuKHozb1.js +1 -0
- package/dist/client/assets/agent-experiments-CgtwbbvZ.js +1 -0
- package/dist/client/assets/agent-file-wlYMcv_9.js +1 -0
- package/dist/client/assets/agent-hosting-BaITgwKU.js +1 -0
- package/dist/client/assets/{agent-icon-DqjTL3cE.js → agent-icon-CTbTFMnU.js} +1 -1
- package/dist/client/assets/agent-library-CC7Sh_px.js +1 -0
- package/dist/client/assets/agent-library-file-DB9_i_YI.js +1 -0
- package/dist/client/assets/agent-overview-BkJ7Az2Q.js +1 -0
- package/dist/client/assets/agent-releases-Dh0xH2nd.js +2 -0
- package/dist/client/assets/agent-settings-B8F88lFa.js +1 -0
- package/dist/client/assets/{agent-site-editor-gGRvmvu9.js → agent-site-editor-D_QBdAc9.js} +2 -2
- package/dist/client/assets/agent-site-editor-code-TQZ-nnUV.js +2 -0
- package/dist/client/assets/agent-site-editor-content-CAE4z8AF.js +1 -0
- package/dist/client/assets/agent-site-editor-preview-gLgYeQTA.js +1 -0
- package/dist/client/assets/{agent-view-guard-Bppi7Mra.js → agent-view-guard-CL3qLzE2.js} +1 -1
- package/dist/client/assets/agent-view-mJs78en_.js +1 -0
- package/dist/client/assets/{ai-providers-JXuyHqZ0.js → ai-providers-CKuZmBiu.js} +1 -1
- package/dist/client/assets/{alert-Cddl0pAs.js → alert-wYcDlQSf.js} +1 -1
- package/dist/client/assets/{analytics-sections-DFGgGKah.js → analytics-sections-BjzpdbBT.js} +1 -1
- package/dist/client/assets/api-keys-BtDMAyj2.js +1 -0
- package/dist/client/assets/{api-keys-CyRPnxt1.js → api-keys-am7hNPgd.js} +1 -1
- package/dist/client/assets/app-editor-D88RxUP1.js +1 -0
- package/dist/client/assets/{asset-utils-Cekn7DV3.js → asset-utils-C5mv1eiH.js} +1 -1
- package/dist/client/assets/{auth-qAWEiaXq.js → auth-CQxDIkM-.js} +1 -1
- package/dist/client/assets/{auth-catchall-BEu29rgq.js → auth-catchall-DX0dhfK_.js} +1 -1
- package/dist/client/assets/{auth-entry-C-rkFm2s.js → auth-entry-Bkznmv5L.js} +1 -1
- package/dist/client/assets/{auth-split-layout-E78PPbPV.js → auth-split-layout-BRZioxOZ.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-D7iMHNSW.js → authenticate-and-persist-oauth-o7XKLq_6.js} +1 -1
- package/dist/client/assets/{automation-list-row-guzwZg5A.js → automation-list-row-knBDKeRb.js} +1 -1
- package/dist/client/assets/{automation-runs-BHP_sOU-.js → automation-runs-CvC4BqLv.js} +1 -1
- package/dist/client/assets/{automations-BgweD4e5.js → automations-Ajx2woko.js} +1 -1
- package/dist/client/assets/{autosend-_WPHuuuS.js → autosend-B0POegpm.js} +1 -1
- package/dist/client/assets/{badge-DtxRsHGH.js → badge-BpzeYR5Z.js} +1 -1
- package/dist/client/assets/{block-document-CT7wSVO4.js → block-document-DIhkVhEf.js} +1 -1
- package/dist/client/assets/{blocks-preview-workspace-context-BoHWp5NJ.js → blocks-preview-workspace-context-BnkXYZX_.js} +1 -1
- package/dist/client/assets/{blocks-tab-states-2A_KUVRA.js → blocks-tab-states-BRjgrPty.js} +1 -1
- package/dist/client/assets/{blog-schema-DyhIMTKN.js → blog-schema-BdMdKJFM.js} +1 -1
- package/dist/client/assets/{buckets-B6SQeYKj.js → buckets-C62arTZK.js} +1 -1
- package/dist/client/assets/{build-improve-prompt-doc--GJGk9lj.js → build-improve-prompt-doc-DNVGwsoG.js} +1 -1
- package/dist/client/assets/{calendar-gF784tOB.js → calendar-SB5YBzj8.js} +1 -1
- package/dist/client/assets/{capability-load-error-gokttFVD.js → capability-load-error-BkOUGX51.js} +1 -1
- package/dist/client/assets/category-editor-CozNeVRI.js +1 -0
- package/dist/client/assets/{chart-2s7SvZtT.js → chart-D-gatwT8.js} +1 -1
- package/dist/client/assets/{chat-context-aSjAR9mm.js → chat-context-PvP_Q1CV.js} +6 -6
- package/dist/client/assets/{chat-draft-C4Ql1o7U.js → chat-draft-C714j1Wd.js} +1 -1
- package/dist/client/assets/{checkbox-CBfkrmis.js → checkbox-Bk98t4UK.js} +1 -1
- package/dist/client/assets/{choose-editor-DOrF20ax.js → choose-editor-DmqmkbHo.js} +1 -1
- package/dist/client/assets/{cli-auth-success-B188GHrd.js → cli-auth-success-D4NODEkN.js} +1 -1
- package/dist/client/assets/{client-icons-CGEm3mRa.js → client-icons-WHlOXnmn.js} +1 -1
- package/dist/client/assets/cms-settings-editor-kiB9O6al.js +1 -0
- package/dist/client/assets/{cms-store-drafts-CSMnfrKb.js → cms-store-drafts-DEGbfccc.js} +1 -1
- package/dist/client/assets/collapsible-C7N88_dp.js +1 -0
- package/dist/client/assets/collection-detail-a6oC0bB8.js +1 -0
- package/dist/client/assets/{collection-display-button-CiexA8e6.js → collection-display-button-Dl9vfdLR.js} +1 -1
- package/dist/client/assets/{collection-search-iHJVqUHB.js → collection-search-Din8SB5Y.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-Dw3f1ge7.js → collection-table-wrapper-BYDcFi4z.js} +1 -1
- package/dist/client/assets/{collection-tabs-Trcf-II9.js → collection-tabs-BJDa_4_F.js} +1 -1
- package/dist/client/assets/{combobox-DqTAA7CX.js → combobox-CVchGkTE.js} +1 -1
- package/dist/client/assets/{command-CtR4gjCr.js → command-DA2t4jTW.js} +1 -1
- package/dist/client/assets/{companion-mcps-section-CMxxXZB8.js → companion-mcps-section-BKP3xr1j.js} +1 -1
- package/dist/client/assets/{config-BpJVAl-p.js → config-B1mE6oOL.js} +1 -1
- package/dist/client/assets/{connect-DjUzAPce.js → connect-CAAYdS8d.js} +2 -2
- package/dist/client/assets/{connect-layout-atO8SWTe.js → connect-layout-DUesEwTl.js} +1 -1
- package/dist/client/assets/{connect-source-dialog-CpTTYi_l.js → connect-source-dialog-DQtWLoYH.js} +1 -1
- package/dist/client/assets/{connection-card-Dt4OQ0Zk.js → connection-card-CPhS4jEh.js} +1 -1
- package/dist/client/assets/{connection-detail-weWLbsDk.js → connection-detail-D0-sYPQS.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-KX0UMFtC.js → connection-form-helpers-CRMRmqMW.js} +1 -1
- package/dist/client/assets/{connection-CZHWvxVM.js → connection-giFDA0-u.js} +1 -1
- package/dist/client/assets/{connection-slug-BQwcAWfG.js → connection-slug-DTdYIX0A.js} +1 -1
- package/dist/client/assets/{connections-i22Te-Si.js → connections-D-1tH9cf.js} +1 -1
- package/dist/client/assets/{content-tab-CxWiT9yK.js → content-tab-DH5bq_bz.js} +3 -3
- package/dist/client/assets/context-DK_qXRQL.js +1 -0
- package/dist/client/assets/{context-menu-CmlGLO8r.js → context-menu-CsBFFEsr.js} +1 -1
- package/dist/client/assets/{context-shell-PkAxZmyt.js → context-shell-l0daBgQ1.js} +3 -3
- package/dist/client/assets/{core.esm-DkzVh4mV.js → core.esm-tIHbtjKb.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-_VIsUUpV.js → create-organization-dialog-Dy6I2vcX.js} +1 -1
- package/dist/client/assets/{device-hint-CdtW8Ayx.js → device-hint-DslC2w9a.js} +1 -1
- package/dist/client/assets/discover-DzzEIO43.js +1 -0
- package/dist/client/assets/{domain-settings-BuPEVvED.js → domain-settings-Dq_m7HYl.js} +1 -1
- package/dist/client/assets/{drawer-ChCkx76W.js → drawer-BYGTIOoj.js} +1 -1
- package/dist/client/assets/{editor-classes-BNXGx3Ep.js → editor-classes-LFKjNX_0.js} +1 -1
- package/dist/client/assets/{editor-BKO3Ouyu.js → editor-x1lgFdfy.js} +1 -1
- package/dist/client/assets/{empty-state-ajQCApN0.js → empty-state-CH3GYanB.js} +1 -1
- package/dist/client/assets/{empty-state-DiGOrU7G.js → empty-state-CtwVPMDf.js} +1 -1
- package/dist/client/assets/{experiments-tab-choice-BUQKBcCh.js → experiments-tab-choice-DMVM7f3S.js} +1 -1
- package/dist/client/assets/{extract-connection-data-CTb_9Cpr.js → extract-connection-data-hvaA6rrK.js} +1 -1
- package/dist/client/assets/{feature-gate-DReJia4Z.js → feature-gate-ru6FBLZU.js} +1 -1
- package/dist/client/assets/{feature-paywall-DbaCusI2.js → feature-paywall-eifo7eqe.js} +1 -1
- package/dist/client/assets/feedback-BqoIMOg7.js +1 -0
- package/dist/client/assets/file-explorer-Bgho9rLt.js +2 -0
- package/dist/client/assets/{file-preview-CO8Jx_5T.js → file-preview-BzUEEwEK.js} +1 -1
- package/dist/client/assets/{file-share-button-B1R4GS_L.js → file-share-button-CFBrVPAQ.js} +1 -1
- package/dist/client/assets/{file-type-icon-Bo3Nsgdh.js → file-type-icon-DM9o0Fkb.js} +1 -1
- package/dist/client/assets/{folder-icon-DHVgg162.js → folder-icon-DSGoR_x6.js} +1 -1
- package/dist/client/assets/{form-BhXakrt_.js → form-gd_hA5VT.js} +1 -1
- package/dist/client/assets/{general-BvxlAOrY.js → general-Cn8XvemK.js} +1 -1
- package/dist/client/assets/{github-icon-BBNizm_E.js → github-icon-BVy-v7gH.js} +1 -1
- package/dist/client/assets/home-C9onXt5U.js +1 -0
- package/dist/client/assets/{home-overview-6RI8kIqs.js → home-overview-DZBjDQoG.js} +1 -1
- package/dist/client/assets/{hosted-reconcile-C9_-UERm.js → hosted-reconcile-DNkBVm-1.js} +1 -1
- package/dist/client/assets/{icon-button-muPqJd-h.js → icon-button-Ze0c1pwp.js} +1 -1
- package/dist/client/assets/{index-Bcy7_FA1.js → index-B-T__H4R.js} +1 -1
- package/dist/client/assets/{index-B6_lV1vO.js → index-Bbmo8mh-.js} +1 -1
- package/dist/client/assets/{index-DhM4mrtt.js → index-Bgxp_wDH.js} +1 -1
- package/dist/client/assets/index-BkJtJQz4.css +1 -0
- package/dist/client/assets/{index-TupjNSVk.js → index-C3XZ4Hr3.js} +2 -2
- package/dist/client/assets/{index-BRwiTdyd.js → index-CQQpem-0.js} +1 -1
- package/dist/client/assets/{index-8ANyj4B7.js → index-CnOVjrIG.js} +1 -1
- package/dist/client/assets/{index-GYpV5EH9.js → index-D5i1_B2b.js} +1 -1
- package/dist/client/assets/{index-878qqrH2.js → index-D8y5KFA4.js} +1 -1
- package/dist/client/assets/index-DB454549.js +1 -0
- package/dist/client/assets/{index-CcqLnTyv.js → index-DEZ1imMJ.js} +41 -41
- package/dist/client/assets/{index-DCh3kkGn.js → index-DYgzDE_k.js} +1 -1
- package/dist/client/assets/{index-BlAiq0AL.js → index-DkhsKOTp.js} +1 -1
- package/dist/client/assets/{index-D146teOp.js → index-DsbWutG1.js} +1 -1
- package/dist/client/assets/index-Kbjjvu85.js +1 -0
- package/dist/client/assets/{index-n9xCS6Sf.js → index-_l1iac4T.js} +1 -1
- package/dist/client/assets/{index-QDvBZCSy.js → index-i75UpmlW.js} +1 -1
- package/dist/client/assets/{index-redirect-BUCPvmVN.js → index-redirect-BbZ_bzp6.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-uDA4YvYL.js → infiniteQueryObserver-C0Gb02df.js} +1 -1
- package/dist/client/assets/{infra-billing-Bql8vBuZ.js → infra-billing-BCVZN9OG.js} +1 -1
- package/dist/client/assets/{input-COtL628i.js → input-CxHdmxHa.js} +1 -1
- package/dist/client/assets/{input-BDAmWj4c.js → input-Dla4T1vA.js} +4 -4
- package/dist/client/assets/{integration-icon-ChQEBlMz.js → integration-icon-CFHOt7sY.js} +1 -1
- package/dist/client/assets/{jira-icon-CJhoZQuc.js → jira-icon-_AEc9Yhw.js} +1 -1
- package/dist/client/assets/{label-CsfAEF08.js → label-BEWDSeNl.js} +1 -1
- package/dist/client/assets/{layout-B-LTaCR7.js → layout--y8zVnrP.js} +1 -1
- package/dist/client/assets/legacy-admin-welcome-dialog-B223MrIf.js +1 -0
- package/dist/client/assets/{legacy-agents-deep-B3LnX3dE.js → legacy-agents-deep-PO1FuZ04.js} +1 -1
- package/dist/client/assets/{legacy-main-redirect-KlovZkVM.js → legacy-main-redirect-CLP7AoCb.js} +1 -1
- package/dist/client/assets/library-Cx1S-GVi.js +1 -0
- package/dist/client/assets/{library-tab-DdqY20-1.js → library-tab-CqMcp5u0.js} +1 -1
- package/dist/client/assets/login-BuRZE0OR.js +1 -0
- package/dist/client/assets/{markdown-CPuTm6Mv.js → markdown-Db8a3LUX.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-Cigj7X9N.js → mcp-app-renderer-C8G6NLBz.js} +1 -1
- package/dist/client/assets/{mcp-oauth-ChfuZkYU.js → mcp-oauth-BBT3ip6Z.js} +1 -1
- package/dist/client/assets/{mcp-oauth-BU_Qloaj.js → mcp-oauth-CHmbtYyN.js} +1 -1
- package/dist/client/assets/{members-BDBxWp17.js → members-CF1S2ayK.js} +1 -1
- package/dist/client/assets/{memory-B9jEAxkU.js → memory-Bk61fr1m.js} +2 -2
- package/dist/client/assets/mock-board-CYJBKLD5.js +10 -0
- package/dist/client/assets/{monaco-editor-XS1Vx7aB.js → monaco-editor-DTwBEUg_.js} +1 -1
- package/dist/client/assets/{monitoring-B3WSTrVO.js → monitoring-Cqe9DCsk.js} +2 -2
- package/dist/client/assets/{monitoring-stats-row-CuWemrnJ.js → monitoring-stats-row-GkTmJnnE.js} +1 -1
- package/dist/client/assets/{multi-select-C2R3RZPE.js → multi-select-GRYee_BH.js} +1 -1
- package/dist/client/assets/{mustache-ByRkTjky.js → mustache-DtDLolVD.js} +1 -1
- package/dist/client/assets/{named-rule-view-D9J5jfxv.js → named-rule-view-BNwXQD8T.js} +1 -1
- package/dist/client/assets/{new-project-dialog-C_1Rs0SG.js → new-project-dialog-Dfe2Pik9.js} +1 -1
- package/dist/client/assets/{oauth-callback-Du4CoqhX.js → oauth-callback-C9LKZChW.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-CGOatJwS.js → oauth-callback-ai-provider-C7LWQiJX.js} +1 -1
- package/dist/client/assets/{oauth-consent-DP5dM3Bl.js → oauth-consent-Dm4zOEtc.js} +1 -1
- package/dist/client/assets/{onboarding-CNJgq5g8.js → onboarding-xP-6CuuS.js} +1 -1
- package/dist/client/assets/{openai-conversation-RmvHRGWP.js → openai-conversation-BH1GqT3q.js} +2 -2
- package/dist/client/assets/{optimistic-project-sidebar-views-BF6tqK9w.js → optimistic-project-sidebar-views-BcV4r24I.js} +1 -1
- package/dist/client/assets/{order-monitor-day-Cs26_K8M.js → order-monitor-day-BrCrwZlv.js} +1 -1
- package/dist/client/assets/{organization-choice-Bntbf3d6.js → organization-choice-Bb3OozNa.js} +1 -1
- package/dist/client/assets/{orgs-CGfTnYKc.js → orgs-BwWx4Gpo.js} +1 -1
- package/dist/client/assets/{own-accounts-section-Dv_Ox_cI.js → own-accounts-section-CL57nUX5.js} +1 -1
- package/dist/client/assets/{pair-h0916MQd.js → pair-D5JEvK2M.js} +7 -7
- package/dist/client/assets/{parse-sections-BhaTg9vA.js → parse-sections-Ca4qHQSq.js} +3 -3
- package/dist/client/assets/{plan-ladder-BLc0_1i8.js → plan-ladder-DdqVPKf9.js} +1 -1
- package/dist/client/assets/plan-q4Vm_z4g.js +1 -0
- package/dist/client/assets/{plan-usage-card-DWVVT2WQ.js → plan-usage-card-397aTXRB.js} +2 -2
- package/dist/client/assets/{popover-BQnTqyWU.js → popover-DsvzKyw_.js} +1 -1
- package/dist/client/assets/post-calendar-CvHtHQHg.js +1 -0
- package/dist/client/assets/{post-editor-B1Q3Pcgn.js → post-editor-0bthmrQK.js} +2 -2
- package/dist/client/assets/{preview-content-DHz0okBk.js → preview-content-Bs_qZ8yA.js} +1 -1
- package/dist/client/assets/{preview-dialog-geLovY3F.js → preview-dialog-Bn3JJkpc.js} +1 -1
- package/dist/client/assets/{preview-panel-5qTld6rM.js → preview-panel-CX3l3cru.js} +1 -1
- package/dist/client/assets/{preview-tab-DTmM7FWc.js → preview-tab-C506bsNP.js} +3 -3
- package/dist/client/assets/{product-picker-dialog-CkKwZuBF.js → product-picker-dialog-DRJETx9Q.js} +1 -1
- package/dist/client/assets/{profile-DDg9c8sx.js → profile-BlRaDfot.js} +1 -1
- package/dist/client/assets/project-app-view-CKUZlcwf.js +1 -0
- package/dist/client/assets/{project-apps-sFKq8oaX.js → project-apps-B_xWF85u.js} +1 -1
- package/dist/client/assets/{project-icon-BlOLnUr2.js → project-icon-rrJh6PJx.js} +1 -1
- package/dist/client/assets/{project-index-C12cl71J.js → project-index-CoA3rtsT.js} +1 -1
- package/dist/client/assets/project-reports-bT7h-_SM.js +1 -0
- package/dist/client/assets/project-tasks-CqL0-1p3.js +1 -0
- package/dist/client/assets/{projects-APtBmhWY.js → projects-CM1tg94T.js} +1 -1
- package/dist/client/assets/{projects-empty-state-B_-RYmNY.js → projects-empty-state-llpcLXG9.js} +1 -1
- package/dist/client/assets/{prompts-rGT4H9HS.js → prompts-B0OAMamK.js} +1 -1
- package/dist/client/assets/record-editor-fYL_geiT.js +1 -0
- package/dist/client/assets/redirect-editor-CqeB0Mu0.js +1 -0
- package/dist/client/assets/reports-CtLMPNBD.js +1 -0
- package/dist/client/assets/{reports-B5SaRV3H.js → reports-Rgui-AzR.js} +1 -1
- package/dist/client/assets/{reports-onboarding-C3O3uPM5.js → reports-onboarding-Bb3vI6W8.js} +1 -1
- package/dist/client/assets/reports-tab-BaN84XaS.js +2 -0
- package/dist/client/assets/repositories-DR2_ORl-.js +1 -0
- package/dist/client/assets/{repositories-EzK0gp8T.js → repositories-OwZ7bC1j.js} +1 -1
- package/dist/client/assets/{repository-binding-CuR-5wbj.js → repository-binding-C0msapZZ.js} +1 -1
- package/dist/client/assets/{repository-picker-DEa_L5X-.js → repository-picker-BYFeDBpn.js} +1 -1
- package/dist/client/assets/{require-capability-s4T8ky9G.js → require-capability-cQiPB2TO.js} +1 -1
- package/dist/client/assets/{required-auth-layout-BnfTNype.js → required-auth-layout-DfUx9vzb.js} +1 -1
- package/dist/client/assets/{reset-password-DyQQJ8dn.js → reset-password-CwNbLDfo.js} +1 -1
- package/dist/client/assets/{resizable-G0IV9sBv.js → resizable-CHI5UJHW.js} +1 -1
- package/dist/client/assets/resolve-tab-icon-BWeUUKzK.js +1 -0
- package/dist/client/assets/review-settings-DUhDHWEg.js +1 -0
- package/dist/client/assets/{role-color-DsX-V5ks.js → role-color-DlPdNUQM.js} +1 -1
- package/dist/client/assets/{roles-Dx9qwbnQ.js → roles-ChXNdo9W.js} +1 -1
- package/dist/client/assets/route-8zXp8Zmg.js +1 -0
- package/dist/client/assets/route-DW6RzQLd.js +1 -0
- package/dist/client/assets/route-oGUs3Dt9.js +1 -0
- package/dist/client/assets/{sandbox-lifecycle-context-BbXRjeM5.js → sandbox-lifecycle-context-WXIR2CMZ.js} +1 -1
- package/dist/client/assets/{schema-D4ZSsKIV.js → schema-9jBUPMLq.js} +1 -1
- package/dist/client/assets/{schema-DyZV-W0g.js → schema-BFmIytlm.js} +1 -1
- package/dist/client/assets/{scroll-area-Dc2A2LkE.js → scroll-area-CQ_g6hBm.js} +1 -1
- package/dist/client/assets/search-input-Co3g-t6C.js +1 -0
- package/dist/client/assets/{search-toggle-B9QbSQeA.js → search-toggle-CO5TN956.js} +1 -1
- package/dist/client/assets/{secret-picker-DmxIms9y.js → secret-picker-VlsiGxPi.js} +1 -1
- package/dist/client/assets/{secrets-AGU75gav.js → secrets-DJboETC0.js} +1 -1
- package/dist/client/assets/{section-array-field-ClWKGp_4.js → section-array-field-CvmfLv3q.js} +1 -1
- package/dist/client/assets/{sections-BVT_1GZf.js → sections-C_Jmzzpn.js} +1 -1
- package/dist/client/assets/sections-editor-D1U5_lZq.js +1 -0
- package/dist/client/assets/{select-DQqbq83t.js → select-BJaUvbIR.js} +1 -1
- package/dist/client/assets/{select-model-DrY_3vXN.js → select-model-CftP-ks_.js} +1 -1
- package/dist/client/assets/{seo-editor-BlBhyBAl.js → seo-editor-B6UrHPko.js} +1 -1
- package/dist/client/assets/{separator-C0H8Yj6d.js → separator-BXKmXRi8.js} +1 -1
- package/dist/client/assets/settings-tab-CHBeACws.js +1 -0
- package/dist/client/assets/{sheet-B2jsXlHJ.js → sheet-D2hfPw7P.js} +1 -1
- package/dist/client/assets/shell-layout-BLRNx2fV.js +1 -0
- package/dist/client/assets/{site-draft-actions-CD85gRfI.js → site-draft-actions-5nXph2SS.js} +3 -3
- package/dist/client/assets/{site-draft-view-D0hJTk9N.js → site-draft-view-3CfqUHrV.js} +1 -1
- package/dist/client/assets/site-editor-BqlLTFw0.js +1 -0
- package/dist/client/assets/{site-editor-toast-CIOA7Zq3.js → site-editor-toast-Cgezu0A5.js} +1 -1
- package/dist/client/assets/skills-B_05tfLr.js +1 -0
- package/dist/client/assets/{slider-84yNNCUP.js → slider-C6h9g0cI.js} +1 -1
- package/dist/client/assets/{sortable.esm-BHALCXRV.js → sortable.esm-D2_ALuVf.js} +1 -1
- package/dist/client/assets/{sso-6pnL0iJa.js → sso-CtTl7KnN.js} +1 -1
- package/dist/client/assets/{suggestion-C3enCUG8.js → suggestion-C8VoNVDk.js} +2 -2
- package/dist/client/assets/super-agent-icon-B-73GF60.js +1 -0
- package/dist/client/assets/{switch-2cMTOO8e.js → switch-C53DVv3y.js} +1 -1
- package/dist/client/assets/{synced-repos-bmkfQV3e.js → synced-repos-Cqz-evGv.js} +1 -1
- package/dist/client/assets/{tab-icon-glyph-lzQzl_Ov.js → tab-icon-glyph-I3aa1qRZ.js} +1 -1
- package/dist/client/assets/{table-DvZCTg5z.js → table-DjgVXWdP.js} +1 -1
- package/dist/client/assets/{tabs-BzwzpfZ1.js → tabs-DtOFAaIp.js} +1 -1
- package/dist/client/assets/{task-board-DcTNURQy.js → task-board-D3wT6_aG.js} +1 -1
- package/dist/client/assets/{task-route-DfbZq1yE.js → task-route-DngvTiyh.js} +1 -1
- package/dist/client/assets/{task-status-CxLWWnTs.js → task-status-BfFZ6nf8.js} +1 -1
- package/dist/client/assets/taskboard-analytics-D-vAg9Px.js +1 -0
- package/dist/client/assets/{tasks-CzV2b6I-.js → tasks-BHa2qCWg.js} +3 -3
- package/dist/client/assets/tasks-adXvugV8.js +1 -0
- package/dist/client/assets/{textarea-CpPhDLVU.js → textarea-_jcGqOvl.js} +1 -1
- package/dist/client/assets/thread-analytics-DPDga_ap.js +1 -0
- package/dist/client/assets/{thread-intent-pegObLq9.js → thread-intent-DuI80508.js} +1 -1
- package/dist/client/assets/{thread-route-D5E5K-lU.js → thread-route-B-uAlF3E.js} +1 -1
- package/dist/client/assets/{thread-route-DORnlP1l.js → thread-route-Ci8rIker.js} +1 -1
- package/dist/client/assets/{thread-sheet-body-BFBUt-Sx.js → thread-sheet-body-BiNfUUQ_.js} +1 -1
- package/dist/client/assets/{time-range-picker-CO070soZ.js → time-range-picker-F9SEOG2b.js} +1 -1
- package/dist/client/assets/{toggle-group-D9bXIbAb.js → toggle-group-C6oiEKlf.js} +1 -1
- package/dist/client/assets/{tool-namespace-BQSaNq7N.js → tool-namespace-DdU5nhii.js} +1 -1
- package/dist/client/assets/{tool-set-selector-DM-ejAZy.js → tool-set-selector-2nfgy8us.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-CTRAa2ng.js → toolbar-icon-button-BmJKmAUK.js} +1 -1
- package/dist/client/assets/{tooltip-AKf-E49i.js → tooltip-Dam-ym8O.js} +1 -1
- package/dist/client/assets/{tooltipContext-C6xZbBgY.js → tooltipContext-PzKiic-J.js} +1 -1
- package/dist/client/assets/{track-ClB7tKVt.js → track-Dj7QHX2C.js} +1 -1
- package/dist/client/assets/{types-BQOtvCBo.js → types-gyofjZHf.js} +6 -6
- package/dist/client/assets/{url-slug-ihGFL5bo.js → url-slug-BMHzx0XY.js} +1 -1
- package/dist/client/assets/{usage-stats-CVX23WNU.js → usage-stats-C3KvQP9T.js} +1 -1
- package/dist/client/assets/{use-ai-providers-BrqJh5BT.js → use-ai-providers-DwpUgHpj.js} +1 -1
- package/dist/client/assets/{use-apply-named-rule-BVdRelp-.js → use-apply-named-rule-BnEs0jP7.js} +1 -1
- package/dist/client/assets/use-ask-in-chat-BIANNd7Z.js +1 -0
- package/dist/client/assets/{use-automations-B64sqUmg.js → use-automations-CyrAu8XA.js} +1 -1
- package/dist/client/assets/{use-autosave-CXs3BFTf.js → use-autosave-TV-hF63e.js} +1 -1
- package/dist/client/assets/use-blocks-v8-project-4PZwWSEO.js +1 -0
- package/dist/client/assets/{use-chat-layout-state-Be9vIJ9A.js → use-chat-layout-state-BG2-xqQp.js} +1 -1
- package/dist/client/assets/{use-cms-publish-actions-_yzMD1wJ.js → use-cms-publish-actions-CmQuU9AY.js} +5 -5
- package/dist/client/assets/{use-connect-companion-CB7F6AWc.js → use-connect-companion-CowVgnp9.js} +1 -1
- package/dist/client/assets/use-connection-BozgIoMu.js +1 -0
- package/dist/client/assets/{use-content-sync-D6gXnizV.js → use-content-sync-BBbOIir0.js} +1 -1
- package/dist/client/assets/{use-copy-CtSedmtg.js → use-copy-o0P-kroy.js} +1 -1
- package/dist/client/assets/{use-date-fns-locale-DQTvoMF-.js → use-date-fns-locale-bKU2Q73X.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-BLJ3k7wG.js → use-debounced-autosave-BmvZzlB_.js} +1 -1
- package/dist/client/assets/{use-debounced-value-CcMMD4Qy.js → use-debounced-value-yZdJ1f2K.js} +1 -1
- package/dist/client/assets/{use-deco-credits-C6qbWrOQ.js → use-deco-credits-Bjfx0bAt.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-Dc1L96mp.js → use-decopilot-events-C_C16-Ln.js} +1 -1
- package/dist/client/assets/{use-delete-connection-Cw1Qu4uu.js → use-delete-connection-B4rX1qgg.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-D9sSgOb1.js → use-deployment-admin-CS9K9Ea9.js} +1 -1
- package/dist/client/assets/{use-entitlements-BKF4jYfc.js → use-entitlements-DidlVdLU.js} +1 -1
- package/dist/client/assets/{use-fast-preview-draft-url-TUtYOptx.js → use-fast-preview-draft-url-KJzyk03O.js} +1 -1
- package/dist/client/assets/{use-file-configs-D7-mFpqA.js → use-file-configs-DhXDYO83.js} +1 -1
- package/dist/client/assets/{use-id-selection-JEuFRU8t.js → use-id-selection-BHXFVfAt.js} +1 -1
- package/dist/client/assets/{use-inbox-feed-RrCfNvIm.js → use-inbox-feed-CKkWXum7.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-Z_9MLZyx.js → use-infinite-scroll-CED9GMTE.js} +1 -1
- package/dist/client/assets/{use-join-requests-CANHKzNj.js → use-join-requests-DAuosANz.js} +1 -1
- package/dist/client/assets/use-main-panel-tabs-DfOwinBC.js +1 -0
- package/dist/client/assets/{use-mcp-auth-status-CMC6AisX.js → use-mcp-auth-status-Dls0bLQE.js} +1 -1
- package/dist/client/assets/{use-mcp-client-DvDomB9A.js → use-mcp-client-DJjkIlNp.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-CgDM8qHG.js → use-mcp-prompts-it9pO2QZ.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-mI5K7YKF.js → use-mcp-tools-wfurU0oX.js} +1 -1
- package/dist/client/assets/{use-mobile-BgN1E82d.js → use-mobile-CJITN8uI.js} +1 -1
- package/dist/client/assets/{use-move-blocks-CPMJkp5h.js → use-move-blocks-CC1C41-K.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-DmfSMV3R.js → use-navigate-to-agent-MlXDIBYX.js} +1 -1
- package/dist/client/assets/{use-org-fs-BWA2rFQC.js → use-org-fs-BH012Up0.js} +1 -1
- package/dist/client/assets/{use-org-repo-syncs-CTHMawzN.js → use-org-repo-syncs-jV2kVf-q.js} +1 -1
- package/dist/client/assets/{use-org-sso-CGB_T6WF.js → use-org-sso-Bo72RJ5p.js} +1 -1
- package/dist/client/assets/{use-organization-settings-sxurgilE.js → use-organization-settings-bWX185lw.js} +1 -1
- package/dist/client/assets/{use-project-native-view-presence-CwgTlxOv.js → use-project-native-view-presence-DhhbOsoh.js} +1 -1
- package/dist/client/assets/use-project-scope-pwqcjGo8.js +1 -0
- package/dist/client/assets/{use-recent-apps-DD97o_H1.js → use-recent-apps-Rr1jTj-T.js} +1 -1
- package/dist/client/assets/{use-reports-diagnostic-BA9L8p6c.js → use-reports-diagnostic-0n4ScjpC.js} +1 -1
- package/dist/client/assets/{use-sandbox-events-CdAdPYjL.js → use-sandbox-events-D1_GHzsF.js} +1 -1
- package/dist/client/assets/{use-secrets-rjK8WMv5.js → use-secrets-Dim43C3b.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-DcuAqWGB.js → use-section-preview-base-B6FS0lTt.js} +1 -1
- package/dist/client/assets/{use-sidebar-collapsed-B34u6RwD.js → use-sidebar-collapsed-DcAIYhdp.js} +1 -1
- package/dist/client/assets/{use-tags-0YxcWwJI.js → use-tags-6ljf50Kl.js} +1 -1
- package/dist/client/assets/{use-task-board-analytics-tpDvOzAs.js → use-task-board-analytics-5XuzJjLw.js} +1 -1
- package/dist/client/assets/{use-task-board-events-CGZxY00s.js → use-task-board-events-DnEp5edD.js} +1 -1
- package/dist/client/assets/{use-task-board-item-prs-B6YW8nsa.js → use-task-board-item-prs-CycVEDhs.js} +1 -1
- package/dist/client/assets/{use-task-board-items-BcL-6L6N.js → use-task-board-items-pvi4Vcv1.js} +1 -1
- package/dist/client/assets/{use-task-board-prompts-B9dDmO_e.js → use-task-board-prompts-CE5ytMaB.js} +1 -1
- package/dist/client/assets/{use-task-metadata-hgLXNv36.js → use-task-metadata-D4kXdUwO.js} +1 -1
- package/dist/client/assets/{use-thread-outputs-X5IsW797.js → use-thread-outputs-BPYn8k3d.js} +1 -1
- package/dist/client/assets/{use-voice-input-DmZaOhTZ.js → use-voice-input-BKZpbbiI.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-CtNfxLxq.js +1 -0
- package/dist/client/assets/{useQueries-BbhbAWNG.js → useQueries-B3iHMIbL.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-OzDVxqdl.js +1 -0
- package/dist/client/assets/{users-BNwLmtY6.js → users-7Hqe-w13.js} +1 -1
- package/dist/client/assets/{utils-KeMhVvdQ.js → utils-BbEfYi1l.js} +1 -1
- package/dist/client/assets/{variant-calendar-VCJbhkWd.js → variant-calendar-vayISj1w.js} +1 -1
- package/dist/client/assets/{variant-matcher-override-DLQRivi9.js → variant-matcher-override-ulDJ4YBu.js} +1 -1
- package/dist/client/assets/{view-header-cnfShdRT.js → view-header-y27ISHbd.js} +1 -1
- package/dist/client/assets/{virtual-mcp-YmAa-VVd.js → virtual-mcp-vRvxAZ15.js} +1 -1
- package/dist/client/assets/{watch-sse-pool-CYcZM1HP.js → watch-sse-pool-DhoYakYc.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/client/legacy-admin-welcome.webp +0 -0
- package/dist/server/server.js +528 -528
- package/package.json +1 -1
- package/dist/client/assets/agent-app-IWHPMxEK.js +0 -1
- package/dist/client/assets/agent-assets-BZWSLrfd.js +0 -1
- package/dist/client/assets/agent-automations-BOxoQlGs.js +0 -1
- package/dist/client/assets/agent-calendar-CdFd9RbD.js +0 -1
- package/dist/client/assets/agent-connect-sources-CEmlztKl.js +0 -1
- package/dist/client/assets/agent-deck-CtBABaGT.js +0 -1
- package/dist/client/assets/agent-e2e-CFF1rulz.js +0 -1
- package/dist/client/assets/agent-experiments-ui7FfvYG.js +0 -1
- package/dist/client/assets/agent-file-Cq3onOpE.js +0 -1
- package/dist/client/assets/agent-hosting-vCUxyXYf.js +0 -1
- package/dist/client/assets/agent-library-CrZB4N_E.js +0 -1
- package/dist/client/assets/agent-library-file-BOxLy0sn.js +0 -1
- package/dist/client/assets/agent-overview-BcgCBEmB.js +0 -1
- package/dist/client/assets/agent-releases-aYJGzx-T.js +0 -2
- package/dist/client/assets/agent-settings-CxJPBxUl.js +0 -1
- package/dist/client/assets/agent-site-editor-code-CLO4vASe.js +0 -2
- package/dist/client/assets/agent-site-editor-content-DwQjPdJR.js +0 -1
- package/dist/client/assets/agent-site-editor-preview-DVAXUJER.js +0 -1
- package/dist/client/assets/agent-view-BWBpZVUF.js +0 -1
- package/dist/client/assets/api-keys-G9chtY31.js +0 -1
- package/dist/client/assets/app-editor-XjHMyWR2.js +0 -1
- package/dist/client/assets/category-editor-DH5eEcV-.js +0 -1
- package/dist/client/assets/cms-settings-editor-CLowE0HB.js +0 -1
- package/dist/client/assets/collapsible-C6tkGF0M.js +0 -1
- package/dist/client/assets/collection-detail-EKABwIVL.js +0 -1
- package/dist/client/assets/context-BHoetvxj.js +0 -1
- package/dist/client/assets/discover-DylE9QvC.js +0 -1
- package/dist/client/assets/feedback-CVUSSdB5.js +0 -1
- package/dist/client/assets/file-explorer-CgN8XtEL.js +0 -2
- package/dist/client/assets/home-CppOBOPg.js +0 -1
- package/dist/client/assets/index-2LwpmkET.js +0 -1
- package/dist/client/assets/index-A822oipr.js +0 -1
- package/dist/client/assets/index-CKEKSTrk.css +0 -1
- package/dist/client/assets/library-B2C1_FfB.js +0 -1
- package/dist/client/assets/login-DRAz2Byx.js +0 -1
- package/dist/client/assets/mock-board-Bsls4MQk.js +0 -10
- package/dist/client/assets/plan-GL1imSbx.js +0 -1
- package/dist/client/assets/post-calendar-HNq1Smaq.js +0 -1
- package/dist/client/assets/project-app-view-BTrJDLFt.js +0 -1
- package/dist/client/assets/project-reports-AxUmLNIH.js +0 -1
- package/dist/client/assets/project-tasks-CAr2Cqy5.js +0 -1
- package/dist/client/assets/record-editor-Ci0iG6uP.js +0 -1
- package/dist/client/assets/redirect-editor-CMuoDESV.js +0 -1
- package/dist/client/assets/reports-D-qIr9kO.js +0 -1
- package/dist/client/assets/reports-tab-BU0ZPXc5.js +0 -2
- package/dist/client/assets/repositories-DcYP84R5.js +0 -1
- package/dist/client/assets/resolve-tab-icon-73RgcuQe.js +0 -1
- package/dist/client/assets/review-settings-CuOWj38_.js +0 -1
- package/dist/client/assets/route-BhRhH95H.js +0 -1
- package/dist/client/assets/route-CSMzYXoN.js +0 -1
- package/dist/client/assets/route-DyaXyBfS.js +0 -1
- package/dist/client/assets/search-input-DFXG_UYw.js +0 -1
- package/dist/client/assets/sections-editor-CYlxI1p5.js +0 -1
- package/dist/client/assets/settings-tab-DWTMFT0X.js +0 -1
- package/dist/client/assets/shell-layout-CBX9BtMX.js +0 -1
- package/dist/client/assets/site-editor-CWVoX5OY.js +0 -1
- package/dist/client/assets/skills-XkOrIlnS.js +0 -1
- package/dist/client/assets/taskboard-analytics-Cmr5hCm9.js +0 -1
- package/dist/client/assets/tasks-140YlmT4.js +0 -1
- package/dist/client/assets/thread-analytics-9huoP8m_.js +0 -1
- package/dist/client/assets/use-ask-in-chat-CtKzpyFU.js +0 -1
- package/dist/client/assets/use-blocks-v8-project-BPQNHFav.js +0 -1
- package/dist/client/assets/use-connection-CECJF8rf.js +0 -1
- package/dist/client/assets/use-main-panel-tabs-DA6Ypr8r.js +0 -1
- package/dist/client/assets/use-project-scope-Cb4T7-Pe.js +0 -1
- package/dist/client/assets/useInfiniteQuery-WRSkkanY.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-B1s2URZC.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c6 as Qt,c as q,b as ee,r as w,j as t,B,bx as qt,m as Pt,a5 as $t,D as et,v as tt,w as st,x as at,aT as ot,y as nt,t as X,bB as es,_ as ts,X as ss,Z as as,ap as os,an as ns,ao as is,Y as ze,b3 as rs,h as Le,aH as pt,aI as xt,aJ as gt,aK as ht,bj as jt,aL as yt,aM as bt,aN as vt,E as Ke,aE as ls,c7 as Ct,I as Nt,c8 as cs,aj as ds,aZ as Qe,n as Xe,f as ms}from"./index-CcqLnTyv.js";import{C as us}from"./index-8ANyj4B7.js";import{b as it,O as fs,a as ps,a3 as xs,m as St,at as gs,T as kt,au as hs,g as js,S as Me,av as Et,e as Ye}from"./agent-icon-DqjTL3cE.js";import{n as Tt}from"./ShoppingBag01-DDCYsqx9.js";import{t as rt}from"./ChevronUp-DRG0w_P4.js";import{e as ys}from"./UserSquare-BJHrMhrM.js";import{b as bs,e as lt,c as Ot,t as zt}from"./Tool01-BTDYOKsB.js";import{i as vs}from"./SearchMd-2MPq0KPN.js";import{B as Kt}from"./badge-DtxRsHGH.js";import{C as Ft}from"./checkbox-CBfkrmis.js";import{S as ct}from"./switch-2cMTOO8e.js";import{a as Mt,b as Rt,P as Lt}from"./popover-BQnTqyWU.js";import{C as Cs,e as wt,b as Ns,f as Ss,a as ks,c as Ts}from"./command-CtR4gjCr.js";import{g as ws,s as _s}from"./tool-namespace-BQSaNq7N.js";import{u as dt}from"./use-connection-CECJF8rf.js";import{u as Ds}from"./use-mcp-client-DvDomB9A.js";import{u as Is}from"./use-mcp-tools-mI5K7YKF.js";import{I as As}from"./integration-icon-ChQEBlMz.js";import{M as Ps}from"./select-model-DrY_3vXN.js";import{u as $s}from"./use-ai-providers-BrqJh5BT.js";import{U as Es,b as Os}from"./build-improve-prompt-doc--GJGk9lj.js";import{a as ve,c as zs,d as Ks}from"./use-automations-B64sqUmg.js";import{c as Fs,b as Ms,h as Rs,t as Ls}from"./chat-context-aSjAR9mm.js";import{b as Vs,C as Us,a as Ws}from"./collapsible-C6tkGF0M.js";import{c as Bs,T as Gs,a as Hs}from"./tooltip-AKf-E49i.js";import{g as Js}from"./shell-layout-CBX9BtMX.js";import{i as Vt}from"./ArrowLeft-B1m5qQi9.js";import{i as Xs}from"./ArrowUp-DcYpepHk.js";import{s as Ys}from"./Trash01-CHCe7_6o.js";import{s as mt}from"./XClose-BDiB_Nvo.js";import{u as _t}from"./use-debounced-autosave-BLJ3k7wG.js";import{T as Zs,a as Qs}from"./input-COtL628i.js";import{u as qs,a as ea,J as Ut}from"./jira-icon-CJhoZQuc.js";import{s as ta}from"./Plus-D8rFucQH.js";import{i as ut}from"./Zap-DpvU6Dp2.js";import{l as We,H as sa}from"./config-BpJVAl-p.js";import{C as aa}from"./task-board-DcTNURQy.js";import{M as Wt}from"./multi-select-C2R3RZPE.js";import{S as ge,b as he,a as je,d as ye,c as be}from"./select-DQqbq83t.js";import{c as oa,a as na,T as Dt}from"./tabs-BzwzpfZ1.js";import{MonacoCodeEditor as ia}from"./monaco-editor-XS1Vx7aB.js";import{A as ra}from"./automation-runs-BHP_sOU-.js";import{C as la}from"./collection-tabs-Trcf-II9.js";import{a as ca}from"./autosend-_WPHuuuS.js";import"./use-mobile-BgN1E82d.js";import"./use-sidebar-collapsed-B34u6RwD.js";import"./use-chat-layout-state-Be9vIJ9A.js";import"./thread-route-D5E5K-lU.js";import"./thread-intent-pegObLq9.js";import"./delay-CnY5UFtP.js";import"./watch-sse-pool-CYcZM1HP.js";import"./toolbar-icon-button-CTRAa2ng.js";import"./sheet-B2jsXlHJ.js";import"./resizable-G0IV9sBv.js";import"./use-project-scope-Cb4T7-Pe.js";import"./repository-binding-CuR-5wbj.js";import"./AlertCircle-kYtqXGU8.js";import"./LinkBroken01-C9GtmpYY.js";import"./Globe04--FaZazgw.js";import"./CheckCircle-B4NfGYxe.js";import"./ChevronSelectorVertical-EqyUOMMk.js";import"./CreditCard01-BLl0RgXC.js";import"./SwitchHorizontal01-D7HAXgYP.js";import"./Key01-D0Pq98hT.js";import"./Minus-eGpg4-RN.js";import"./Monitor01-Su614Ctg.js";import"./Sun-Dvv08Urq.js";import"./Play-D_ph4pZ0.js";import"./Upload01-Q6ECKQXp.js";import"./Users01-DHfg9AEk.js";import"./index-DCh3kkGn.js";import"./auth-qAWEiaXq.js";import"./drawer-ChCkx76W.js";import"./index-DhM4mrtt.js";import"./ai-providers-logos-DD3qZ33J.js";import"./openai-compatible-presets-BKGfVqEx.js";import"./use-entitlements-BKF4jYfc.js";import"./use-decopilot-events-Dc1L96mp.js";import"./use-organization-settings-sxurgilE.js";import"./schema-D4ZSsKIV.js";import"./index-D146teOp.js";import"./use-deployment-admin-D9sSgOb1.js";import"./admin-fetch-BhTJlAsX.js";import"./project-icon-BlOLnUr2.js";import"./use-navigate-to-agent-DmfSMV3R.js";import"./use-debounced-value-CcMMD4Qy.js";import"./new-project-dialog-C_1Rs0SG.js";import"./label-CsfAEF08.js";import"./repository-picker-DEa_L5X-.js";import"./github-icon-BBNizm_E.js";import"./useInfiniteQuery-WRSkkanY.js";import"./infiniteQueryObserver-uDA4YvYL.js";import"./collection-search-iHJVqUHB.js";import"./required-auth-layout-BnfTNype.js";import"./use-org-sso-CGB_T6WF.js";import"./suggestion-C3enCUG8.js";import"./usage-stats-CVX23WNU.js";import"./form-BhXakrt_.js";import"./utils-CVEq3hMx.js";import"./markdown-CPuTm6Mv.js";import"./use-copy-CtSedmtg.js";import"./use-mcp-prompts-CgDM8qHG.js";import"./use-org-fs-BWA2rFQC.js";import"./core.esm-DkzVh4mV.js";import"./index-BdQq_4o_.js";import"./active-indicator-CCMhAsc_.js";import"./editor-BKO3Ouyu.js";import"./table-DvZCTg5z.js";import"./empty-state-DiGOrU7G.js";import"./use-id-selection-JEuFRU8t.js";import"./use-infinite-scroll-Z_9MLZyx.js";import"./task-status-CxLWWnTs.js";import"./thread-sheet-body-BFBUt-Sx.js";import"./useSuspenseInfiniteQuery-B1s2URZC.js";import"./pair-h0916MQd.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-Cigj7X9N.js";import"./types-BQOtvCBo.js";import"./omit-server-managed-metadata-L5IhjRZB.js";import"./use-thread-outputs-X5IsW797.js";import"./file-type-icon-Bo3Nsgdh.js";const Ze={fast:{labelKey:"automations.automationConfig.tierFast",subtitleKey:"automations.automationConfig.tierFastSubtitle",icon:js},smart:{labelKey:"automations.automationConfig.tierSmart",subtitleKey:"automations.automationConfig.tierSmartSubtitle",icon:zt},thinking:{labelKey:"automations.automationConfig.tierThinking",subtitleKey:"automations.automationConfig.tierThinkingSubtitle",icon:hs}},da=["fast","smart","thinking"];function ma(r){const e=q.c(19),{tier:s,onSelect:n}=r,o=ee(),[i,c]=w.useState(!1),a=Ze[s].icon;let j;e[0]!==a?(j=t.jsx(a,{size:14,className:"text-muted-foreground"}),e[0]=a,e[1]=j):j=e[1];const d=Ze[s];let m;e[2]!==o||e[3]!==d.labelKey?(m=o(d.labelKey),e[2]=o,e[3]=d.labelKey,e[4]=m):m=e[4];let x;e[5]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx(rt,{size:14,className:"text-muted-foreground"}),e[5]=x):x=e[5];let f;e[6]!==j||e[7]!==m?(f=t.jsx(Mt,{asChild:!0,children:t.jsxs(B,{variant:"outline",size:"sm",className:"w-fit gap-1.5",children:[j,m,x]})}),e[6]=j,e[7]=m,e[8]=f):f=e[8];let g;e[9]!==n||e[10]!==o||e[11]!==s?(g=da.map(p=>{const l=Ze[p],y=l.icon;return t.jsxs("button",{type:"button",onClick:()=>{n(p),c(!1)},className:Pt("flex items-start gap-2 px-2 py-1.5 rounded-lg text-left hover:bg-accent"),children:[t.jsx(y,{size:16,className:"shrink-0 text-muted-foreground mt-0.5"}),t.jsxs("div",{className:"flex-1",children:[t.jsx("div",{className:"text-sm",children:o(l.labelKey)}),t.jsx("div",{className:"text-xs text-muted-foreground",children:o(l.subtitleKey)})]}),p===s&&t.jsx(qt,{size:14,className:"text-foreground mt-0.5"})]},p)}),e[9]=n,e[10]=o,e[11]=s,e[12]=g):g=e[12];let u;e[13]!==g?(u=t.jsx(Rt,{align:"start",className:"p-1 w-64",children:t.jsx("div",{className:"flex flex-col",children:g})}),e[13]=g,e[14]=u):u=e[14];let h;return e[15]!==i||e[16]!==f||e[17]!==u?(h=t.jsxs(Lt,{open:i,onOpenChange:c,children:[f,u]}),e[15]=i,e[16]=f,e[17]=u,e[18]=h):h=e[18],h}function ua(r){const e=q.c(27),{tier:s,onTierChange:n,override:o,onOverrideChange:i}=r,c=ee(),[a,j]=w.useState(o!==null);let d;e[0]!==c?(d=c("automations.automationConfig.modelLabel"),e[0]=c,e[1]=d):d=e[1];let m;e[2]!==d?(m=t.jsx("span",{className:"text-xs font-semibold text-muted-foreground/60",children:d}),e[2]=d,e[3]=m):m=e[3];let x;e[4]!==i||e[5]!==n||e[6]!==o||e[7]!==c||e[8]!==s||e[9]!==a?(x=a?t.jsx(w.Suspense,{fallback:t.jsx(B,{variant:"outline",size:"sm",disabled:!0,className:"w-fit",children:c("automations.automationConfig.loadingModels")}),children:t.jsx(fa,{override:o,onOverrideChange:i})}):t.jsx(ma,{tier:s,onSelect:n}),e[4]=i,e[5]=n,e[6]=o,e[7]=c,e[8]=s,e[9]=a,e[10]=x):x=e[10];let f;e[11]!==i?(f=y=>{j(y),y||i(null)},e[11]=i,e[12]=f):f=e[12];let g;e[13]!==f||e[14]!==a?(g=t.jsx(ct,{checked:a,onCheckedChange:f,className:"cursor-pointer"}),e[13]=f,e[14]=a,e[15]=g):g=e[15];let u;e[16]!==c?(u=c("automations.automationConfig.specificModel"),e[16]=c,e[17]=u):u=e[17];let h;e[18]!==g||e[19]!==u?(h=t.jsxs("label",{className:"flex items-center gap-2 text-xs text-muted-foreground cursor-pointer select-none",children:[g,u]}),e[18]=g,e[19]=u,e[20]=h):h=e[20];let p;e[21]!==x||e[22]!==h?(p=t.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[x,h]}),e[21]=x,e[22]=h,e[23]=p):p=e[23];let l;return e[24]!==m||e[25]!==p?(l=t.jsxs("div",{className:"flex flex-col gap-2",children:[m,p]}),e[24]=m,e[25]=p,e[26]=l):l=e[26],l}function fa(r){const e=q.c(25),{override:s,onOverrideChange:n}=r,o=ee(),i=$s(),c=i[0]?.id??null;let a;e[0]!==c||e[1]!==i||e[2]!==s?.credentialId?(a=i.some(l=>l.id===s?.credentialId)?s?.credentialId??null:c,e[0]=c,e[1]=i,e[2]=s?.credentialId,e[3]=a):a=e[3];const[j,d]=w.useState(a);let m;e[4]!==j||e[5]!==c||e[6]!==i?(m=i.some(l=>l.id===j)?j:c,e[4]=j,e[5]=c,e[6]=i,e[7]=m):m=e[7];const x=m;let f;e[8]!==i||e[9]!==s?(f=s&&i.some(l=>l.id===s.credentialId)?{modelId:s.modelId,title:s.title||s.modelId,keyId:s.credentialId,providerId:"deco",description:null,logo:null,capabilities:[],limits:null,costs:null}:null,e[8]=i,e[9]=s,e[10]=f):f=e[10];const g=f;if(i.length===0){let l;e[11]!==o?(l=o("automations.automationConfig.connectAiProviderHint"),e[11]=o,e[12]=l):l=e[12];let y;return e[13]!==l?(y=t.jsx("span",{className:"text-xs text-muted-foreground italic",children:l}),e[13]=l,e[14]=y):y=e[14],y}let u;e[15]!==o?(u=o("automations.automationConfig.pickModelPlaceholder"),e[15]=o,e[16]=u):u=e[16];let h;e[17]!==x||e[18]!==n?(h=l=>{const y=l.keyId??x??"";d(y),n({modelId:l.modelId,credentialId:y,title:l.title??l.modelId})},e[17]=x,e[18]=n,e[19]=h):h=e[19];let p;return e[20]!==x||e[21]!==g||e[22]!==u||e[23]!==h?(p=t.jsx("div",{className:"w-fit max-w-full",children:t.jsx(Ps,{variant:"bordered",placeholder:u,model:g,credentialId:x,onCredentialChange:d,onModelChange:h})}),e[20]=x,e[21]=g,e[22]=u,e[23]=h,e[24]=p):p=e[24],p}const Bt=[{key:"capabilities",headingKey:"automations.automationConfig.builtinCapabilities",icon:lt,tools:[{name:"web_search",titleKey:"automations.automationConfig.toolWebSearch",descriptionKey:"automations.automationConfig.toolWebSearchDesc",icon:it},{name:"generate_image",titleKey:"automations.automationConfig.toolGenerateImage",descriptionKey:"automations.automationConfig.toolGenerateImageDesc",icon:bs},{name:"subtask",titleKey:"automations.automationConfig.toolSubtask",descriptionKey:"automations.automationConfig.toolSubtaskDesc",icon:Qt},{name:"user_ask",titleKey:"automations.automationConfig.toolAskUser",descriptionKey:"automations.automationConfig.toolAskUserDesc",icon:fs}]},{key:"files",headingKey:"automations.automationConfig.filesCode",icon:St,tools:[{name:"read",titleKey:"automations.automationConfig.toolReadFile",descriptionKey:"automations.automationConfig.toolReadFileDesc",icon:ps},{name:"write",titleKey:"automations.automationConfig.toolWriteFile",descriptionKey:"automations.automationConfig.toolWriteFileDesc",icon:Ot},{name:"edit",titleKey:"automations.automationConfig.toolEditFile",descriptionKey:"automations.automationConfig.toolEditFileDesc",icon:xs},{name:"grep",titleKey:"automations.automationConfig.toolSearchContent",descriptionKey:"automations.automationConfig.toolSearchContentDesc",icon:vs},{name:"glob",titleKey:"automations.automationConfig.toolFindFiles",descriptionKey:"automations.automationConfig.toolFindFilesDesc",icon:St},{name:"bash",titleKey:"automations.automationConfig.toolRunCommand",descriptionKey:"automations.automationConfig.toolRunCommandDesc",icon:gs}]},{key:"context",headingKey:"automations.automationConfig.context",icon:kt,tools:[{name:"read_resource",titleKey:"automations.automationConfig.toolReadResource",descriptionKey:"automations.automationConfig.toolReadResourceDesc",icon:kt},{name:"read_prompt",titleKey:"automations.automationConfig.toolReadPrompt",descriptionKey:"automations.automationConfig.toolReadPromptDesc",icon:Tt},{name:"skill",titleKey:"automations.automationConfig.toolLoadSkill",descriptionKey:"automations.automationConfig.toolLoadSkillDesc",icon:Tt}]}],pa=Bt.flatMap(r=>r.tools.map(e=>e.name));function xa(r){const e=r.replace(/[_-]+/g," ").trim();return e?e.toLowerCase().replace(/\b\w/g,s=>s.toUpperCase()):r}function ga(r){const e=q.c(12),{agentId:s,value:n,onChange:o}=r,i=ee();let c;e[0]!==i?(c=i("automations.automationConfig.toolsLabel"),e[0]=i,e[1]=c):c=e[1];let a;e[2]!==c?(a=t.jsx("span",{className:"text-xs font-semibold text-muted-foreground/60",children:c}),e[2]=c,e[3]=a):a=e[3];let j;e[4]!==s||e[5]!==o||e[6]!==i||e[7]!==n?(j=s?t.jsx(w.Suspense,{fallback:t.jsxs(B,{variant:"outline",size:"sm",disabled:!0,className:"w-fit",children:[t.jsx(lt,{size:14}),i("automations.automationConfig.loadingTools")]}),children:t.jsx(ha,{agentId:s,value:n,onChange:o})}):t.jsx("span",{className:"text-xs text-muted-foreground italic",children:i("automations.automationConfig.pickAgentFirst")}),e[4]=s,e[5]=o,e[6]=i,e[7]=n,e[8]=j):j=e[8];let d;return e[9]!==a||e[10]!==j?(d=t.jsxs("div",{className:"flex flex-col gap-2",children:[a,j]}),e[9]=a,e[10]=j,e[11]=d):d=e[11],d}function It(r){const e=q.c(17),{value:s,checked:n,onToggle:o,title:i,description:c,leading:a}=r;let j;e[0]!==n?(j=t.jsx(Ft,{checked:n,className:"pointer-events-none mt-0.5"}),e[0]=n,e[1]=j):j=e[1];let d;e[2]!==a?(d=a&&t.jsx("span",{className:"mt-px shrink-0",children:a}),e[2]=a,e[3]=d):d=e[3];let m;e[4]!==i?(m=t.jsx("span",{className:"truncate text-sm leading-tight",children:i}),e[4]=i,e[5]=m):m=e[5];let x;e[6]!==c?(x=c&&t.jsx("span",{className:"line-clamp-2 text-xs leading-snug text-muted-foreground",children:c}),e[6]=c,e[7]=x):x=e[7];let f;e[8]!==m||e[9]!==x?(f=t.jsxs("div",{className:"flex min-w-0 flex-col gap-0.5",children:[m,x]}),e[8]=m,e[9]=x,e[10]=f):f=e[10];let g;return e[11]!==o||e[12]!==j||e[13]!==d||e[14]!==f||e[15]!==s?(g=t.jsxs(Ns,{value:s,onSelect:o,className:"items-start gap-2.5 py-2",children:[j,d,f]}),e[11]=o,e[12]=j,e[13]=d,e[14]=f,e[15]=s,e[16]=g):g=e[16],g}function At(r){const e=q.c(27),{conn:s,label:n,icon:o,on:i,total:c,onToggle:a}=r,j=ee(),d=i===c;let m;e[0]!==o||e[1]!==s?(m=s?t.jsx(As,{icon:s.icon,name:s.title,size:"2xs"}):o?t.jsx(o,{size:14,className:"text-muted-foreground"}):t.jsx(ys,{size:14,className:"text-muted-foreground"}),e[0]=o,e[1]=s,e[2]=m):m=e[2];let x;e[3]!==s?.title||e[4]!==n||e[5]!==j?(x=s?.title??n??j("automations.automationConfig.otherTools"),e[3]=s?.title,e[4]=n,e[5]=j,e[6]=x):x=e[6];let f;e[7]!==x?(f=t.jsx("span",{className:"truncate",children:x}),e[7]=x,e[8]=f):f=e[8];let g;e[9]!==i||e[10]!==c?(g=t.jsxs("span",{className:"text-2xs font-normal tabular-nums text-muted-foreground/70",children:[i,"/",c]}),e[9]=i,e[10]=c,e[11]=g):g=e[11];let u;e[12]!==a?(u=v=>{v.stopPropagation(),a()},e[12]=a,e[13]=u):u=e[13];let h;e[14]!==d||e[15]!==j?(h=j(d?"automations.automationConfig.none":"automations.automationConfig.all"),e[14]=d,e[15]=j,e[16]=h):h=e[16];let p;e[17]!==u||e[18]!==h?(p=t.jsx("button",{type:"button",onClick:u,className:"text-2xs font-medium text-primary hover:underline",children:h}),e[17]=u,e[18]=h,e[19]=p):p=e[19];let l;e[20]!==g||e[21]!==p?(l=t.jsxs("span",{className:"ml-auto flex items-center gap-2",children:[g,p]}),e[20]=g,e[21]=p,e[22]=l):l=e[22];let y;return e[23]!==m||e[24]!==f||e[25]!==l?(y=t.jsxs("div",{className:"flex items-center gap-2",children:[m,f,l]}),e[23]=m,e[24]=f,e[25]=l,e[26]=y):y=e[26],y}function ha(r){const e=q.c(83),{agentId:s,value:n,onChange:o}=r,i=ee(),{org:c}=$t(),[a,j]=w.useState(!1);let d;e[0]!==s||e[1]!==c.id||e[2]!==c.slug?(d={connectionId:s,orgId:c.id,orgSlug:c.slug},e[0]=s,e[1]=c.id,e[2]=c.slug,e[3]=d):d=e[3];const m=Ds(d);let x;e[4]!==m?(x={client:m},e[4]=m,e[5]=x):x=e[5];const{data:f,isLoading:g}=Is(x),u=dt();let h,p,l,y,v,N,S,b,T,_,D,k,A;if(e[6]!==u||e[7]!==f?.tools||e[8]!==g||e[9]!==o||e[10]!==a||e[11]!==i||e[12]!==n){const Y=new Map(u.map(Ca)),H=new Map;for(const I of f?.tools??[]){const O=ws(I._meta)??"__other__",Q=_s(I.name,O==="__other__"?void 0:O),P=I.title,xe=P&&P!==I.name?P:xa(Q);H.has(O)||H.set(O,{clientId:O,conn:Y.get(O),tools:[]}),H.get(O).tools.push({name:I.name,display:xe,description:I.description})}const W=[...H.values()].sort(va),G=(f?.tools??[]).map(ba),J=[...pa,...G],V=n===null?new Set(J):new Set(n),U=J.every(I=>V.has(I)),E=I=>o(J.every(O=>I.has(O))?null:[...I]),oe=I=>{const O=new Set(V);O.has(I)?O.delete(I):O.add(I),E(O)},ne=(I,O)=>{const Q=new Set(V);for(const P of I)O?Q.add(P):Q.delete(P);E(Q)};y=Lt,A=a,v=j;let Z;e[26]===Symbol.for("react.memo_cache_sentinel")?(Z=t.jsx(lt,{size:14,className:"text-muted-foreground"}),e[26]=Z):Z=e[26];let ie;e[27]!==U||e[28]!==i?(ie=i(U?"automations.automationConfig.allTools":"automations.automationConfig.tools"),e[27]=U,e[28]=i,e[29]=ie):ie=e[29];const ue=!U&&t.jsxs(Kt,{variant:"secondary",className:"ml-0.5 tabular-nums",children:[V.size,"/",J.length]});let me;e[30]===Symbol.for("react.memo_cache_sentinel")?(me=t.jsx(rt,{size:14,className:"text-muted-foreground"}),e[30]=me):me=e[30],e[31]!==ie||e[32]!==ue?(N=t.jsx(Mt,{asChild:!0,children:t.jsxs(B,{variant:"outline",size:"sm",className:"w-fit gap-1.5",children:[Z,ie,ue,me]})}),e[31]=ie,e[32]=ue,e[33]=N):N=e[33],l=Rt,D="p-0 w-80",k="start",p=Ss;let te;e[34]!==i?(te=i("automations.automationConfig.searchToolsPlaceholder"),e[34]=i,e[35]=te):te=e[35],e[36]!==te?(T=t.jsx(ks,{placeholder:te}),e[36]=te,e[37]=T):T=e[37];const fe=U?i("automations.automationConfig.allToolsEnabled",{count:J.length}):i("automations.automationConfig.toolsEnabledCount",{enabled:V.size,total:J.length});let se;e[38]!==fe?(se=t.jsx("span",{className:"text-xs text-muted-foreground",children:fe}),e[38]=fe,e[39]=se):se=e[39];let re;e[40]!==o?(re=()=>o(null),e[40]=o,e[41]=re):re=e[41];let le;e[42]!==i?(le=i("automations.automationConfig.selectAll"),e[42]=i,e[43]=le):le=e[43];let C;e[44]!==U||e[45]!==re||e[46]!==le?(C=t.jsx("button",{type:"button",onClick:re,disabled:U,className:"text-xs font-medium text-primary hover:underline disabled:cursor-default disabled:opacity-40 disabled:no-underline",children:le}),e[44]=U,e[45]=re,e[46]=le,e[47]=C):C=e[47];let M;e[48]===Symbol.for("react.memo_cache_sentinel")?(M=t.jsx("span",{className:"text-muted-foreground/30",children:"·"}),e[48]=M):M=e[48];let z;e[49]!==o?(z=()=>o([]),e[49]=o,e[50]=z):z=e[50];const pe=V.size===0;let ae;e[51]!==i?(ae=i("automations.automationConfig.clear"),e[51]=i,e[52]=ae):ae=e[52];let ce;e[53]!==z||e[54]!==pe||e[55]!==ae?(ce=t.jsx("button",{type:"button",onClick:z,disabled:pe,className:"text-xs font-medium text-muted-foreground hover:underline disabled:cursor-default disabled:opacity-40 disabled:no-underline",children:ae}),e[53]=z,e[54]=pe,e[55]=ae,e[56]=ce):ce=e[56];let de;e[57]!==C||e[58]!==ce?(de=t.jsxs("div",{className:"flex items-center gap-2",children:[C,M,ce]}),e[57]=C,e[58]=ce,e[59]=de):de=e[59],e[60]!==se||e[61]!==de?(_=t.jsxs("div",{className:"flex items-center justify-between border-b px-3 py-2",children:[se,de]}),e[60]=se,e[61]=de,e[62]=_):_=e[62],h=Ts,S="max-h-80",b=g?t.jsx("div",{className:"px-3 py-6 text-center text-xs text-muted-foreground",children:i("automations.automationConfig.loadingTools")}):t.jsxs(t.Fragment,{children:[t.jsx(Cs,{children:i("automations.automationConfig.noToolsFound")}),Bt.map(I=>{const O=I.tools.map(ya),Q=O.filter(P=>V.has(P)).length;return t.jsx(wt,{heading:t.jsx(At,{label:i(I.headingKey),icon:I.icon,on:Q,total:O.length,onToggle:()=>ne(O,Q!==O.length)}),children:I.tools.map(P=>t.jsx(It,{value:`${i(P.titleKey)} ${P.name}`,checked:V.has(P.name),onToggle:()=>oe(P.name),title:i(P.titleKey),description:i(P.descriptionKey),leading:t.jsx(P.icon,{size:16,className:"text-muted-foreground"})},P.name))},I.key)}),W.map(I=>{const O=I.tools.map(ja),Q=O.filter(P=>V.has(P)).length;return t.jsx(wt,{heading:t.jsx(At,{conn:I.conn,on:Q,total:O.length,onToggle:()=>ne(O,Q!==O.length)}),children:I.tools.map(P=>t.jsx(It,{value:`${P.display} ${P.name} ${I.conn?.title??""}`,checked:V.has(P.name),onToggle:()=>oe(P.name),title:P.display,description:P.description},P.name))},I.clientId)})]}),e[6]=u,e[7]=f?.tools,e[8]=g,e[9]=o,e[10]=a,e[11]=i,e[12]=n,e[13]=h,e[14]=p,e[15]=l,e[16]=y,e[17]=v,e[18]=N,e[19]=S,e[20]=b,e[21]=T,e[22]=_,e[23]=D,e[24]=k,e[25]=A}else h=e[13],p=e[14],l=e[15],y=e[16],v=e[17],N=e[18],S=e[19],b=e[20],T=e[21],_=e[22],D=e[23],k=e[24],A=e[25];let $;e[63]!==h||e[64]!==S||e[65]!==b?($=t.jsx(h,{className:S,children:b}),e[63]=h,e[64]=S,e[65]=b,e[66]=$):$=e[66];let R;e[67]!==p||e[68]!==$||e[69]!==T||e[70]!==_?(R=t.jsxs(p,{children:[T,_,$]}),e[67]=p,e[68]=$,e[69]=T,e[70]=_,e[71]=R):R=e[71];let K;e[72]!==l||e[73]!==R||e[74]!==D||e[75]!==k?(K=t.jsx(l,{className:D,align:k,children:R}),e[72]=l,e[73]=R,e[74]=D,e[75]=k,e[76]=K):K=e[76];let F;return e[77]!==y||e[78]!==v||e[79]!==N||e[80]!==K||e[81]!==A?(F=t.jsxs(y,{open:A,onOpenChange:v,children:[N,K]}),e[77]=y,e[78]=v,e[79]=N,e[80]=K,e[81]=A,e[82]=F):F=e[82],F}function ja(r){return r.name}function ya(r){return r.name}function ba(r){return r.name}function va(r,e){return(r.conn?.title??r.clientId).localeCompare(e.conn?.title??e.clientId)}function Ca(r){return[r.id,r]}function Re(r){const e=r.trim().split(/\s+/);return e.length!==5?!1:e.every(s=>/^[\d*/,-]+$/.test(s))}function Na(r){if(!r)return"Unknown schedule";const e=r.trim();if(e==="* * * * *")return"Every minute";if(e==="0 * * * *")return"Every hour";if(e==="0 0 * * *")return"Every day";if(e==="0 0 * * 1")return"Every week";const s=e.match(/^\*\/(\d+)\s+\*\s+\*\s+\*\s+\*$/);if(s)return`Every ${s[1]} minutes`;const n=e.match(/^0\s+\*\/(\d+)\s+\*\s+\*\s+\*$/);if(n)return`Every ${n[1]} hours`;const o=e.match(/^0\s+0\s+\*\/(\d+)\s+\*\s+\*$/);if(o){const a=parseInt(o[1]??"1");return a%7===0?`Every ${a/7} weeks`:`Every ${a} days`}const i=e.match(/^(\d+)\s+(\d+)\s+\*\s+\*\s+\*$/);if(i){const a=(i[2]??"0").padStart(2,"0"),j=(i[1]??"0").padStart(2,"0");return`Every day at ${a}:${j} UTC`}const c=e.match(/^(\d+)\s+(\d+)\s+\*\s+\*\s+(\d)$/);if(c){const j=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"][parseInt(c[3]??"0")]??"day",d=(c[2]??"0").padStart(2,"0"),m=(c[1]??"0").padStart(2,"0");return`Every ${j} at ${d}:${m} UTC`}return r}function Sa(r,e){const s=Math.max(1,r);switch(e){case"minutes":return s===1?"* * * * *":`*/${s} * * * *`;case"hours":return s===1?"0 * * * *":`0 */${s} * * *`;case"days":return s===1?"0 0 * * *":`0 0 */${s} * *`;case"weeks":return s===1?"0 0 * * 1":`0 0 */${s*7} * *`}}function ka(r){const e=r.trim();if(e==="* * * * *")return{count:1,unit:"minutes"};if(e==="0 * * * *")return{count:1,unit:"hours"};if(e==="0 0 * * *")return{count:1,unit:"days"};if(e==="0 0 * * 1")return{count:1,unit:"weeks"};const s=e.match(/^\*\/(\d+)\s+\*\s+\*\s+\*\s+\*$/);if(s)return{count:parseInt(s[1]),unit:"minutes"};const n=e.match(/^0\s+\*\/(\d+)\s+\*\s+\*\s+\*$/);if(n)return{count:parseInt(n[1]),unit:"hours"};const o=e.match(/^0\s+0\s+\*\/(\d+)\s+\*\s+\*$/);return o?{count:parseInt(o[1]),unit:"days"}:null}function Ta(r,e){return e===1?{minutes:"minute",hours:"hour",days:"day",weeks:"week"}[r]??r:r}const wa=[{label:"5 minutes",cron:"*/5 * * * *"},{label:"Hour",cron:"0 * * * *"},{label:"Day",cron:"0 0 * * *"},{label:"Week",cron:"0 0 * * 1"}],qe=aa.filter(r=>!sa.includes(r)),Gt=["any","earlier","later","statuses"],_a=r=>qe.some(e=>e===r),Da=r=>Gt.some(e=>e===r);function Ia({automationId:r,open:e,onOpenChange:s}){const n=ee(),{triggerAdd:o}=ve(),[i,c]=w.useState("in_progress"),[a,j]=w.useState("any"),[d,m]=w.useState([]),x=qe.filter(l=>l!==i),f=d.filter(l=>l!==i),g=a!=="statuses"||f.length>0,u=l=>{l||(c("in_progress"),j("any"),m([])),s(l)},h=async()=>{try{await o.mutateAsync({automation_id:r,type:"board_column_transition",column_key:i,from:a==="statuses"?{kind:a,statuses:f}:{kind:a}}),X.success(n("automations.addStarterPopover.starterAdded")),u(!1)}catch(l){X.error(l instanceof Error?l.message:n("automations.addStarterPopover.failedAddStarter"))}},p=l=>n(l==="any"?"automations.columnTransitionDialog.fromAny":l==="earlier"?"automations.columnTransitionDialog.fromEarlier":l==="later"?"automations.columnTransitionDialog.fromLater":"automations.columnTransitionDialog.fromColumns");return t.jsx(et,{open:e,onOpenChange:u,children:t.jsxs(tt,{className:"max-w-md",children:[t.jsxs(st,{children:[t.jsx(at,{children:n("automations.columnTransitionDialog.title")}),t.jsx(ot,{children:n("automations.columnTransitionDialog.description")})]}),t.jsxs("div",{className:"flex flex-col gap-4",children:[t.jsxs("div",{className:"flex flex-col gap-1.5",children:[t.jsx("span",{className:"text-xs font-semibold text-muted-foreground",children:n("automations.columnTransitionDialog.column")}),t.jsxs(ge,{value:i,onValueChange:l=>{_a(l)&&c(l)},children:[t.jsx(he,{className:"w-full",children:t.jsx(je,{})}),t.jsx(ye,{children:qe.map(l=>{const{label:y,visual:v}=We(l,n),N=v.icon;return t.jsxs(be,{value:l,children:[t.jsx(N,{size:14,className:Pt("shrink-0",v.iconClassName)}),y]},l)})})]})]}),t.jsxs("div",{className:"flex flex-col gap-1.5",children:[t.jsx("span",{className:"text-xs font-semibold text-muted-foreground",children:n("automations.columnTransitionDialog.origin")}),t.jsxs(ge,{value:a,onValueChange:l=>{Da(l)&&j(l)},children:[t.jsx(he,{className:"w-full",children:t.jsx(je,{})}),t.jsx(ye,{children:Gt.map(l=>t.jsx(be,{value:l,children:p(l)},l))})]}),a==="statuses"&&t.jsx(Wt,{options:x.map(l=>({label:We(l,n).label,value:l})),defaultValue:f,onValueChange:m,placeholder:n("automations.columnTransitionDialog.columnsPlaceholder"),modalPopover:!0,className:"max-w-none"},i)]}),t.jsx("p",{className:"text-xs text-muted-foreground",children:n("automations.columnTransitionDialog.help")})]}),t.jsxs(nt,{children:[t.jsx(B,{variant:"ghost",onClick:()=>u(!1),children:n("automations.columnTransitionDialog.cancel")}),t.jsx(B,{disabled:!g||o.isPending,onClick:h,children:n("automations.columnTransitionDialog.add")})]})]})})}const Ht=["any","earlier","later","statuses"],Aa=r=>Ht.some(e=>e===r);function Pa({automationId:r,boardId:e,open:s,onOpenChange:n}){const o=ee(),{triggerAdd:i}=ve(),c=qs(s?e:null),[a,j]=w.useState(null),[d,m]=w.useState("any"),[x,f]=w.useState([]),g=(c.data??[]).flatMap(b=>b.statuses.map(T=>({column:b.name,status:T}))),u=a??g[0]?.status??null,h=g.map(b=>b.status).filter(b=>b!==u),p=x.filter(b=>b!==u),l=u!==null&&(d!=="statuses"||p.length>0),y=b=>{b||(j(null),m("any"),f([])),n(b)},v=async()=>{if(u)try{await i.mutateAsync({automation_id:r,type:"jira_transition",jira_status:u,from:d==="statuses"?{kind:d,statuses:p}:{kind:d}}),X.success(o("automations.addStarterPopover.starterAdded")),y(!1)}catch(b){X.error(b instanceof Error?b.message:o("automations.addStarterPopover.failedAddStarter"))}},N=b=>o(b==="any"?"automations.jiraTransitionDialog.fromAny":b==="earlier"?"automations.jiraTransitionDialog.fromEarlier":b==="later"?"automations.jiraTransitionDialog.fromLater":"automations.jiraTransitionDialog.fromStatuses");let S;return c.isPending?S=t.jsx(es,{className:"h-9 w-full"}):c.isError||g.length===0?S=t.jsx("p",{className:"text-xs text-muted-foreground",children:o("automations.jiraTransitionDialog.noStatuses")}):S=t.jsxs(ge,{value:u??void 0,onValueChange:j,children:[t.jsx(he,{className:"w-full",children:t.jsx(je,{})}),t.jsx(ye,{children:g.map(b=>t.jsxs(be,{value:b.status,children:[b.status,b.column!==b.status&&t.jsx("span",{className:"text-muted-foreground",children:b.column})]},b.status))})]}),t.jsx(et,{open:s,onOpenChange:y,children:t.jsxs(tt,{className:"max-w-md",children:[t.jsxs(st,{children:[t.jsx(at,{children:o("automations.jiraTransitionDialog.title")}),t.jsx(ot,{children:o("automations.jiraTransitionDialog.description")})]}),t.jsxs("div",{className:"flex flex-col gap-4",children:[t.jsxs("div",{className:"flex flex-col gap-1.5",children:[t.jsx("span",{className:"text-xs font-semibold text-muted-foreground",children:o("automations.jiraTransitionDialog.status")}),S]}),t.jsxs("div",{className:"flex flex-col gap-1.5",children:[t.jsx("span",{className:"text-xs font-semibold text-muted-foreground",children:o("automations.jiraTransitionDialog.origin")}),t.jsxs(ge,{value:d,onValueChange:b=>{Aa(b)&&m(b)},children:[t.jsx(he,{className:"w-full",children:t.jsx(je,{})}),t.jsx(ye,{children:Ht.map(b=>t.jsx(be,{value:b,children:N(b)},b))})]}),d==="statuses"&&t.jsx(Wt,{options:h.map(b=>({label:b,value:b})),defaultValue:p,onValueChange:f,placeholder:o("automations.jiraTransitionDialog.statusesPlaceholder"),modalPopover:!0,className:"max-w-none"},u)]}),t.jsx("p",{className:"text-xs text-muted-foreground",children:o("automations.jiraTransitionDialog.help")})]}),t.jsxs(nt,{children:[t.jsx(B,{variant:"ghost",onClick:()=>y(!1),children:o("automations.jiraTransitionDialog.cancel")}),t.jsx(B,{disabled:!l||i.isPending,onClick:v,children:o("automations.jiraTransitionDialog.add")})]})]})})}function $a({automationId:r,open:e,onOpenChange:s,onCustomSelect:n,onEventSelect:o,onWebhookCreated:i}){const c=ee(),{triggerAdd:a}=ve(),[j,d]=w.useState(!1),[m,x]=w.useState(!1),[f,g]=w.useState(!1),u=ea().data?.boardId??null,h=e??j,p=v=>{s?s(v):d(v)},l=async v=>{try{await a.mutateAsync({automation_id:r,type:"cron",cron_expression:v}),X.success(c("automations.addStarterPopover.starterAdded")),p(!1)}catch(N){const S=N instanceof Error?N.message:c("automations.addStarterPopover.failedAddStarter");X.error(S)}},y=async()=>{try{const v=await a.mutateAsync({automation_id:r,type:"webhook"});p(!1),v.webhook?i?.(v.webhook):X.success(c("automations.addStarterPopover.webhookStarterAdded"))}catch(v){const N=v instanceof Error?v.message:c("automations.addStarterPopover.failedAddWebhookStarter");X.error(N)}};return t.jsxs(t.Fragment,{children:[t.jsxs(ts,{open:h,onOpenChange:p,children:[t.jsx(ss,{asChild:!0,children:t.jsxs(B,{variant:"outline",size:"sm",children:[t.jsx(ta,{size:14}),c("automations.addStarterPopover.addStarter")]})}),t.jsxs(as,{align:"end",className:"w-[240px]",children:[t.jsxs(os,{children:[t.jsxs(ns,{className:"gap-2.5",children:[t.jsx(Me,{size:14,className:"text-muted-foreground shrink-0"}),c("automations.addStarterPopover.every")]}),t.jsx(is,{className:"w-[160px]",children:wa.map(v=>t.jsxs(ze,{className:"gap-2.5",onSelect:()=>l(v.cron),disabled:a.isPending,children:[t.jsx(Me,{size:14,className:"text-muted-foreground shrink-0"}),c("automations.addStarterPopover.everyUnit",{unit:v.label})]},v.cron))})]}),t.jsxs(ze,{className:"gap-2.5",onSelect:()=>{p(!1),n?.()},children:[t.jsx(Me,{size:14,className:"text-muted-foreground shrink-0"}),c("automations.addStarterPopover.customCron")]}),t.jsxs(ze,{className:"gap-2.5",onSelect:()=>{p(!1),o?.()},children:[t.jsx(ut,{size:14,className:"text-muted-foreground shrink-0"}),c("automations.addStarterPopover.event")]}),t.jsxs(ze,{className:"gap-2.5",onSelect:()=>{p(!1),x(!0)},children:[t.jsx(Et,{size:14,className:"text-muted-foreground shrink-0"}),c("automations.addStarterPopover.cardEntersColumn")]}),u&&t.jsxs(ze,{className:"gap-2.5",onSelect:()=>{p(!1),g(!0)},children:[t.jsx(Ut,{size:14,className:"shrink-0"}),c("automations.addStarterPopover.jiraIssueEntersStatus")]}),t.jsxs(ze,{className:"gap-2.5",onSelect:()=>{y()},disabled:a.isPending,children:[t.jsx(it,{size:14,className:"text-muted-foreground shrink-0"}),c("automations.addStarterPopover.webhook")]})]})]}),t.jsx(Ia,{automationId:r,open:m,onOpenChange:x}),u&&t.jsx(Pa,{automationId:r,boardId:u,open:f,onOpenChange:g})]})}function Jt(r){const e=q.c(39),{open:s,onOpenChange:n,url:o,token:i,title:c,description:a}=r,j=c===void 0?"Webhook ready":c,d=a===void 0?"Send a POST to this URL with the bearer token to fire the automation. The token is shown once — copy it now.":a,m=ee(),[x,f]=w.useState(null),[g,u]=w.useState("curl"),[h,p]=w.useState("header"),l=w.useId();let y;e[0]!==m?(y=async(W,G)=>{try{await navigator.clipboard.writeText(W),f(G),X.success(m("automations.webhookSecretDialog.copied")),setTimeout(()=>f(null),1500)}catch{X.error(m("automations.webhookSecretDialog.failedCopy"))}},e[0]=m,e[1]=y):y=e[1];const v=y;let N;e[2]!==h||e[3]!==i||e[4]!==o?(N=o&&i&&h==="url"?`${o.replace(/\/$/,"")}/${i}`:o??"",e[2]=h,e[3]=i,e[4]=o,e[5]=N):N=e[5];const S=N,b=o&&i?h==="header"?`curl -X POST "${S}" \\
|
|
1
|
+
import{c6 as Qt,c as q,b as ee,r as w,j as t,B,bx as qt,m as Pt,a5 as $t,D as et,v as tt,w as st,x as at,aT as ot,y as nt,t as X,bB as es,_ as ts,X as ss,Z as as,ap as os,an as ns,ao as is,Y as Oe,b3 as rs,h as Le,aH as pt,aI as xt,aJ as gt,aK as ht,bj as jt,aL as yt,aM as bt,aN as vt,E as Ke,aE as ls,c7 as Ct,I as Nt,c8 as cs,aj as ds,aZ as Qe,n as Xe,f as ms}from"./index-DEZ1imMJ.js";import{C as us}from"./index-CnOVjrIG.js";import{b as it,B as fs,a as ps,a3 as xs,m as St,at as gs,T as kt,au as hs,g as js,S as Me,av as Et,e as Ye}from"./agent-icon-CTbTFMnU.js";import{n as Tt}from"./ShoppingBag01-zloi0TDl.js";import{t as rt}from"./ChevronUp-D1T3kSyr.js";import{e as ys}from"./UserSquare-Qd-FKVqK.js";import{b as bs,e as lt,c as zt,t as Ot}from"./Tool01-Bo2g-Ylw.js";import{i as vs}from"./SearchMd-e6xPeRPD.js";import{B as Kt}from"./badge-BpzeYR5Z.js";import{C as Ft}from"./checkbox-Bk98t4UK.js";import{S as ct}from"./switch-C53DVv3y.js";import{a as Mt,b as Rt,P as Lt}from"./popover-DsvzKyw_.js";import{C as Cs,e as wt,b as Ns,f as Ss,a as ks,c as Ts}from"./command-DA2t4jTW.js";import{g as ws,s as _s}from"./tool-namespace-DdU5nhii.js";import{u as dt}from"./use-connection-BozgIoMu.js";import{u as Ds}from"./use-mcp-client-DJjkIlNp.js";import{u as Is}from"./use-mcp-tools-wfurU0oX.js";import{I as As}from"./integration-icon-CFHOt7sY.js";import{M as Ps}from"./select-model-CftP-ks_.js";import{u as $s}from"./use-ai-providers-DwpUgHpj.js";import{U as Es,b as zs}from"./build-improve-prompt-doc-DNVGwsoG.js";import{a as ve,c as Os,d as Ks}from"./use-automations-CyrAu8XA.js";import{c as Fs,b as Ms,h as Rs,t as Ls}from"./chat-context-PvP_Q1CV.js";import{b as Vs,C as Us,a as Ws}from"./collapsible-C7N88_dp.js";import{c as Bs,T as Gs,a as Hs}from"./tooltip-Dam-ym8O.js";import{g as Js}from"./shell-layout-BLRNx2fV.js";import{i as Vt}from"./ArrowLeft-XBSBGQal.js";import{i as Xs}from"./ArrowUp-DLnkUu9S.js";import{s as Ys}from"./Trash01-C-PU5Hm-.js";import{s as mt}from"./XClose-BuJ6u6eL.js";import{u as _t}from"./use-debounced-autosave-BmvZzlB_.js";import{T as Zs,a as Qs}from"./input-CxHdmxHa.js";import{u as qs,a as ea,J as Ut}from"./jira-icon-_AEc9Yhw.js";import{s as ta}from"./Plus-D7X8Q2-q.js";import{i as ut}from"./Zap-pmN7zSOE.js";import{l as We,H as sa}from"./config-B1mE6oOL.js";import{C as aa}from"./task-board-D3wT6_aG.js";import{M as Wt}from"./multi-select-GRYee_BH.js";import{S as ge,b as he,a as je,d as ye,c as be}from"./select-BJaUvbIR.js";import{c as oa,a as na,T as Dt}from"./tabs-DtOFAaIp.js";import{MonacoCodeEditor as ia}from"./monaco-editor-DTwBEUg_.js";import{A as ra}from"./automation-runs-CvC4BqLv.js";import{C as la}from"./collection-tabs-BJDa_4_F.js";import{a as ca}from"./autosend-B0POegpm.js";import"./use-mobile-CJITN8uI.js";import"./use-sidebar-collapsed-DcAIYhdp.js";import"./use-chat-layout-state-BG2-xqQp.js";import"./thread-route-B-uAlF3E.js";import"./thread-intent-DuI80508.js";import"./delay-CnY5UFtP.js";import"./watch-sse-pool-DhoYakYc.js";import"./toolbar-icon-button-BmJKmAUK.js";import"./sheet-D2hfPw7P.js";import"./resizable-CHI5UJHW.js";import"./use-project-scope-pwqcjGo8.js";import"./repository-binding-C0msapZZ.js";import"./AlertCircle-Co3RPbIZ.js";import"./LinkBroken01-loTkm0G5.js";import"./Globe04-D17A2x5l.js";import"./CheckCircle-kNwBDDVU.js";import"./ChevronSelectorVertical-Gg7YcxlH.js";import"./CreditCard01-D65BAIaV.js";import"./SwitchHorizontal01-elXb4-4d.js";import"./Key01-awxHKnoL.js";import"./Minus-CYrsmoRb.js";import"./Monitor01-DalIAdj7.js";import"./Sun-C1lyqton.js";import"./Play-C6Weq-wk.js";import"./Upload01-NPnXKs-J.js";import"./Users01-CTNixqdX.js";import"./index-DYgzDE_k.js";import"./auth-CQxDIkM-.js";import"./drawer-BYGTIOoj.js";import"./index-Bgxp_wDH.js";import"./ai-providers-logos-DD3qZ33J.js";import"./openai-compatible-presets-BKGfVqEx.js";import"./use-entitlements-DidlVdLU.js";import"./use-decopilot-events-C_C16-Ln.js";import"./use-organization-settings-bWX185lw.js";import"./schema-9jBUPMLq.js";import"./index-DsbWutG1.js";import"./use-deployment-admin-CS9K9Ea9.js";import"./admin-fetch-BhTJlAsX.js";import"./project-icon-rrJh6PJx.js";import"./use-navigate-to-agent-MlXDIBYX.js";import"./use-debounced-value-yZdJ1f2K.js";import"./new-project-dialog-Dfe2Pik9.js";import"./label-BEWDSeNl.js";import"./repository-picker-BYFeDBpn.js";import"./github-icon-BVy-v7gH.js";import"./useInfiniteQuery-CtNfxLxq.js";import"./infiniteQueryObserver-C0Gb02df.js";import"./collection-search-Din8SB5Y.js";import"./legacy-admin-welcome-dialog-B223MrIf.js";import"./required-auth-layout-DfUx9vzb.js";import"./use-org-sso-Bo72RJ5p.js";import"./suggestion-C8VoNVDk.js";import"./usage-stats-C3KvQP9T.js";import"./form-gd_hA5VT.js";import"./utils-CVEq3hMx.js";import"./markdown-Db8a3LUX.js";import"./use-copy-o0P-kroy.js";import"./use-mcp-prompts-it9pO2QZ.js";import"./use-org-fs-BH012Up0.js";import"./core.esm-tIHbtjKb.js";import"./index-BdQq_4o_.js";import"./active-indicator-CCMhAsc_.js";import"./editor-x1lgFdfy.js";import"./table-DjgVXWdP.js";import"./empty-state-CtwVPMDf.js";import"./use-id-selection-BHXFVfAt.js";import"./use-infinite-scroll-CED9GMTE.js";import"./task-status-BfFZ6nf8.js";import"./thread-sheet-body-BiNfUUQ_.js";import"./useSuspenseInfiniteQuery-OzDVxqdl.js";import"./pair-D5JEvK2M.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-C8G6NLBz.js";import"./types-gyofjZHf.js";import"./omit-server-managed-metadata-L5IhjRZB.js";import"./use-thread-outputs-BPYn8k3d.js";import"./file-type-icon-DM9o0Fkb.js";const Ze={fast:{labelKey:"automations.automationConfig.tierFast",subtitleKey:"automations.automationConfig.tierFastSubtitle",icon:js},smart:{labelKey:"automations.automationConfig.tierSmart",subtitleKey:"automations.automationConfig.tierSmartSubtitle",icon:Ot},thinking:{labelKey:"automations.automationConfig.tierThinking",subtitleKey:"automations.automationConfig.tierThinkingSubtitle",icon:hs}},da=["fast","smart","thinking"];function ma(r){const e=q.c(19),{tier:s,onSelect:n}=r,o=ee(),[i,c]=w.useState(!1),a=Ze[s].icon;let j;e[0]!==a?(j=t.jsx(a,{size:14,className:"text-muted-foreground"}),e[0]=a,e[1]=j):j=e[1];const d=Ze[s];let m;e[2]!==o||e[3]!==d.labelKey?(m=o(d.labelKey),e[2]=o,e[3]=d.labelKey,e[4]=m):m=e[4];let x;e[5]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx(rt,{size:14,className:"text-muted-foreground"}),e[5]=x):x=e[5];let f;e[6]!==j||e[7]!==m?(f=t.jsx(Mt,{asChild:!0,children:t.jsxs(B,{variant:"outline",size:"sm",className:"w-fit gap-1.5",children:[j,m,x]})}),e[6]=j,e[7]=m,e[8]=f):f=e[8];let g;e[9]!==n||e[10]!==o||e[11]!==s?(g=da.map(p=>{const l=Ze[p],y=l.icon;return t.jsxs("button",{type:"button",onClick:()=>{n(p),c(!1)},className:Pt("flex items-start gap-2 px-2 py-1.5 rounded-lg text-left hover:bg-accent"),children:[t.jsx(y,{size:16,className:"shrink-0 text-muted-foreground mt-0.5"}),t.jsxs("div",{className:"flex-1",children:[t.jsx("div",{className:"text-sm",children:o(l.labelKey)}),t.jsx("div",{className:"text-xs text-muted-foreground",children:o(l.subtitleKey)})]}),p===s&&t.jsx(qt,{size:14,className:"text-foreground mt-0.5"})]},p)}),e[9]=n,e[10]=o,e[11]=s,e[12]=g):g=e[12];let u;e[13]!==g?(u=t.jsx(Rt,{align:"start",className:"p-1 w-64",children:t.jsx("div",{className:"flex flex-col",children:g})}),e[13]=g,e[14]=u):u=e[14];let h;return e[15]!==i||e[16]!==f||e[17]!==u?(h=t.jsxs(Lt,{open:i,onOpenChange:c,children:[f,u]}),e[15]=i,e[16]=f,e[17]=u,e[18]=h):h=e[18],h}function ua(r){const e=q.c(27),{tier:s,onTierChange:n,override:o,onOverrideChange:i}=r,c=ee(),[a,j]=w.useState(o!==null);let d;e[0]!==c?(d=c("automations.automationConfig.modelLabel"),e[0]=c,e[1]=d):d=e[1];let m;e[2]!==d?(m=t.jsx("span",{className:"text-xs font-semibold text-muted-foreground/60",children:d}),e[2]=d,e[3]=m):m=e[3];let x;e[4]!==i||e[5]!==n||e[6]!==o||e[7]!==c||e[8]!==s||e[9]!==a?(x=a?t.jsx(w.Suspense,{fallback:t.jsx(B,{variant:"outline",size:"sm",disabled:!0,className:"w-fit",children:c("automations.automationConfig.loadingModels")}),children:t.jsx(fa,{override:o,onOverrideChange:i})}):t.jsx(ma,{tier:s,onSelect:n}),e[4]=i,e[5]=n,e[6]=o,e[7]=c,e[8]=s,e[9]=a,e[10]=x):x=e[10];let f;e[11]!==i?(f=y=>{j(y),y||i(null)},e[11]=i,e[12]=f):f=e[12];let g;e[13]!==f||e[14]!==a?(g=t.jsx(ct,{checked:a,onCheckedChange:f,className:"cursor-pointer"}),e[13]=f,e[14]=a,e[15]=g):g=e[15];let u;e[16]!==c?(u=c("automations.automationConfig.specificModel"),e[16]=c,e[17]=u):u=e[17];let h;e[18]!==g||e[19]!==u?(h=t.jsxs("label",{className:"flex items-center gap-2 text-xs text-muted-foreground cursor-pointer select-none",children:[g,u]}),e[18]=g,e[19]=u,e[20]=h):h=e[20];let p;e[21]!==x||e[22]!==h?(p=t.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[x,h]}),e[21]=x,e[22]=h,e[23]=p):p=e[23];let l;return e[24]!==m||e[25]!==p?(l=t.jsxs("div",{className:"flex flex-col gap-2",children:[m,p]}),e[24]=m,e[25]=p,e[26]=l):l=e[26],l}function fa(r){const e=q.c(25),{override:s,onOverrideChange:n}=r,o=ee(),i=$s(),c=i[0]?.id??null;let a;e[0]!==c||e[1]!==i||e[2]!==s?.credentialId?(a=i.some(l=>l.id===s?.credentialId)?s?.credentialId??null:c,e[0]=c,e[1]=i,e[2]=s?.credentialId,e[3]=a):a=e[3];const[j,d]=w.useState(a);let m;e[4]!==j||e[5]!==c||e[6]!==i?(m=i.some(l=>l.id===j)?j:c,e[4]=j,e[5]=c,e[6]=i,e[7]=m):m=e[7];const x=m;let f;e[8]!==i||e[9]!==s?(f=s&&i.some(l=>l.id===s.credentialId)?{modelId:s.modelId,title:s.title||s.modelId,keyId:s.credentialId,providerId:"deco",description:null,logo:null,capabilities:[],limits:null,costs:null}:null,e[8]=i,e[9]=s,e[10]=f):f=e[10];const g=f;if(i.length===0){let l;e[11]!==o?(l=o("automations.automationConfig.connectAiProviderHint"),e[11]=o,e[12]=l):l=e[12];let y;return e[13]!==l?(y=t.jsx("span",{className:"text-xs text-muted-foreground italic",children:l}),e[13]=l,e[14]=y):y=e[14],y}let u;e[15]!==o?(u=o("automations.automationConfig.pickModelPlaceholder"),e[15]=o,e[16]=u):u=e[16];let h;e[17]!==x||e[18]!==n?(h=l=>{const y=l.keyId??x??"";d(y),n({modelId:l.modelId,credentialId:y,title:l.title??l.modelId})},e[17]=x,e[18]=n,e[19]=h):h=e[19];let p;return e[20]!==x||e[21]!==g||e[22]!==u||e[23]!==h?(p=t.jsx("div",{className:"w-fit max-w-full",children:t.jsx(Ps,{variant:"bordered",placeholder:u,model:g,credentialId:x,onCredentialChange:d,onModelChange:h})}),e[20]=x,e[21]=g,e[22]=u,e[23]=h,e[24]=p):p=e[24],p}const Bt=[{key:"capabilities",headingKey:"automations.automationConfig.builtinCapabilities",icon:lt,tools:[{name:"web_search",titleKey:"automations.automationConfig.toolWebSearch",descriptionKey:"automations.automationConfig.toolWebSearchDesc",icon:it},{name:"generate_image",titleKey:"automations.automationConfig.toolGenerateImage",descriptionKey:"automations.automationConfig.toolGenerateImageDesc",icon:bs},{name:"subtask",titleKey:"automations.automationConfig.toolSubtask",descriptionKey:"automations.automationConfig.toolSubtaskDesc",icon:Qt},{name:"user_ask",titleKey:"automations.automationConfig.toolAskUser",descriptionKey:"automations.automationConfig.toolAskUserDesc",icon:fs}]},{key:"files",headingKey:"automations.automationConfig.filesCode",icon:St,tools:[{name:"read",titleKey:"automations.automationConfig.toolReadFile",descriptionKey:"automations.automationConfig.toolReadFileDesc",icon:ps},{name:"write",titleKey:"automations.automationConfig.toolWriteFile",descriptionKey:"automations.automationConfig.toolWriteFileDesc",icon:zt},{name:"edit",titleKey:"automations.automationConfig.toolEditFile",descriptionKey:"automations.automationConfig.toolEditFileDesc",icon:xs},{name:"grep",titleKey:"automations.automationConfig.toolSearchContent",descriptionKey:"automations.automationConfig.toolSearchContentDesc",icon:vs},{name:"glob",titleKey:"automations.automationConfig.toolFindFiles",descriptionKey:"automations.automationConfig.toolFindFilesDesc",icon:St},{name:"bash",titleKey:"automations.automationConfig.toolRunCommand",descriptionKey:"automations.automationConfig.toolRunCommandDesc",icon:gs}]},{key:"context",headingKey:"automations.automationConfig.context",icon:kt,tools:[{name:"read_resource",titleKey:"automations.automationConfig.toolReadResource",descriptionKey:"automations.automationConfig.toolReadResourceDesc",icon:kt},{name:"read_prompt",titleKey:"automations.automationConfig.toolReadPrompt",descriptionKey:"automations.automationConfig.toolReadPromptDesc",icon:Tt},{name:"skill",titleKey:"automations.automationConfig.toolLoadSkill",descriptionKey:"automations.automationConfig.toolLoadSkillDesc",icon:Tt}]}],pa=Bt.flatMap(r=>r.tools.map(e=>e.name));function xa(r){const e=r.replace(/[_-]+/g," ").trim();return e?e.toLowerCase().replace(/\b\w/g,s=>s.toUpperCase()):r}function ga(r){const e=q.c(12),{agentId:s,value:n,onChange:o}=r,i=ee();let c;e[0]!==i?(c=i("automations.automationConfig.toolsLabel"),e[0]=i,e[1]=c):c=e[1];let a;e[2]!==c?(a=t.jsx("span",{className:"text-xs font-semibold text-muted-foreground/60",children:c}),e[2]=c,e[3]=a):a=e[3];let j;e[4]!==s||e[5]!==o||e[6]!==i||e[7]!==n?(j=s?t.jsx(w.Suspense,{fallback:t.jsxs(B,{variant:"outline",size:"sm",disabled:!0,className:"w-fit",children:[t.jsx(lt,{size:14}),i("automations.automationConfig.loadingTools")]}),children:t.jsx(ha,{agentId:s,value:n,onChange:o})}):t.jsx("span",{className:"text-xs text-muted-foreground italic",children:i("automations.automationConfig.pickAgentFirst")}),e[4]=s,e[5]=o,e[6]=i,e[7]=n,e[8]=j):j=e[8];let d;return e[9]!==a||e[10]!==j?(d=t.jsxs("div",{className:"flex flex-col gap-2",children:[a,j]}),e[9]=a,e[10]=j,e[11]=d):d=e[11],d}function It(r){const e=q.c(17),{value:s,checked:n,onToggle:o,title:i,description:c,leading:a}=r;let j;e[0]!==n?(j=t.jsx(Ft,{checked:n,className:"pointer-events-none mt-0.5"}),e[0]=n,e[1]=j):j=e[1];let d;e[2]!==a?(d=a&&t.jsx("span",{className:"mt-px shrink-0",children:a}),e[2]=a,e[3]=d):d=e[3];let m;e[4]!==i?(m=t.jsx("span",{className:"truncate text-sm leading-tight",children:i}),e[4]=i,e[5]=m):m=e[5];let x;e[6]!==c?(x=c&&t.jsx("span",{className:"line-clamp-2 text-xs leading-snug text-muted-foreground",children:c}),e[6]=c,e[7]=x):x=e[7];let f;e[8]!==m||e[9]!==x?(f=t.jsxs("div",{className:"flex min-w-0 flex-col gap-0.5",children:[m,x]}),e[8]=m,e[9]=x,e[10]=f):f=e[10];let g;return e[11]!==o||e[12]!==j||e[13]!==d||e[14]!==f||e[15]!==s?(g=t.jsxs(Ns,{value:s,onSelect:o,className:"items-start gap-2.5 py-2",children:[j,d,f]}),e[11]=o,e[12]=j,e[13]=d,e[14]=f,e[15]=s,e[16]=g):g=e[16],g}function At(r){const e=q.c(27),{conn:s,label:n,icon:o,on:i,total:c,onToggle:a}=r,j=ee(),d=i===c;let m;e[0]!==o||e[1]!==s?(m=s?t.jsx(As,{icon:s.icon,name:s.title,size:"2xs"}):o?t.jsx(o,{size:14,className:"text-muted-foreground"}):t.jsx(ys,{size:14,className:"text-muted-foreground"}),e[0]=o,e[1]=s,e[2]=m):m=e[2];let x;e[3]!==s?.title||e[4]!==n||e[5]!==j?(x=s?.title??n??j("automations.automationConfig.otherTools"),e[3]=s?.title,e[4]=n,e[5]=j,e[6]=x):x=e[6];let f;e[7]!==x?(f=t.jsx("span",{className:"truncate",children:x}),e[7]=x,e[8]=f):f=e[8];let g;e[9]!==i||e[10]!==c?(g=t.jsxs("span",{className:"text-2xs font-normal tabular-nums text-muted-foreground/70",children:[i,"/",c]}),e[9]=i,e[10]=c,e[11]=g):g=e[11];let u;e[12]!==a?(u=v=>{v.stopPropagation(),a()},e[12]=a,e[13]=u):u=e[13];let h;e[14]!==d||e[15]!==j?(h=j(d?"automations.automationConfig.none":"automations.automationConfig.all"),e[14]=d,e[15]=j,e[16]=h):h=e[16];let p;e[17]!==u||e[18]!==h?(p=t.jsx("button",{type:"button",onClick:u,className:"text-2xs font-medium text-primary hover:underline",children:h}),e[17]=u,e[18]=h,e[19]=p):p=e[19];let l;e[20]!==g||e[21]!==p?(l=t.jsxs("span",{className:"ml-auto flex items-center gap-2",children:[g,p]}),e[20]=g,e[21]=p,e[22]=l):l=e[22];let y;return e[23]!==m||e[24]!==f||e[25]!==l?(y=t.jsxs("div",{className:"flex items-center gap-2",children:[m,f,l]}),e[23]=m,e[24]=f,e[25]=l,e[26]=y):y=e[26],y}function ha(r){const e=q.c(83),{agentId:s,value:n,onChange:o}=r,i=ee(),{org:c}=$t(),[a,j]=w.useState(!1);let d;e[0]!==s||e[1]!==c.id||e[2]!==c.slug?(d={connectionId:s,orgId:c.id,orgSlug:c.slug},e[0]=s,e[1]=c.id,e[2]=c.slug,e[3]=d):d=e[3];const m=Ds(d);let x;e[4]!==m?(x={client:m},e[4]=m,e[5]=x):x=e[5];const{data:f,isLoading:g}=Is(x),u=dt();let h,p,l,y,v,N,S,b,T,_,D,k,A;if(e[6]!==u||e[7]!==f?.tools||e[8]!==g||e[9]!==o||e[10]!==a||e[11]!==i||e[12]!==n){const Y=new Map(u.map(Ca)),H=new Map;for(const I of f?.tools??[]){const z=ws(I._meta)??"__other__",Q=_s(I.name,z==="__other__"?void 0:z),P=I.title,xe=P&&P!==I.name?P:xa(Q);H.has(z)||H.set(z,{clientId:z,conn:Y.get(z),tools:[]}),H.get(z).tools.push({name:I.name,display:xe,description:I.description})}const W=[...H.values()].sort(va),G=(f?.tools??[]).map(ba),J=[...pa,...G],V=n===null?new Set(J):new Set(n),U=J.every(I=>V.has(I)),E=I=>o(J.every(z=>I.has(z))?null:[...I]),oe=I=>{const z=new Set(V);z.has(I)?z.delete(I):z.add(I),E(z)},ne=(I,z)=>{const Q=new Set(V);for(const P of I)z?Q.add(P):Q.delete(P);E(Q)};y=Lt,A=a,v=j;let Z;e[26]===Symbol.for("react.memo_cache_sentinel")?(Z=t.jsx(lt,{size:14,className:"text-muted-foreground"}),e[26]=Z):Z=e[26];let ie;e[27]!==U||e[28]!==i?(ie=i(U?"automations.automationConfig.allTools":"automations.automationConfig.tools"),e[27]=U,e[28]=i,e[29]=ie):ie=e[29];const ue=!U&&t.jsxs(Kt,{variant:"secondary",className:"ml-0.5 tabular-nums",children:[V.size,"/",J.length]});let me;e[30]===Symbol.for("react.memo_cache_sentinel")?(me=t.jsx(rt,{size:14,className:"text-muted-foreground"}),e[30]=me):me=e[30],e[31]!==ie||e[32]!==ue?(N=t.jsx(Mt,{asChild:!0,children:t.jsxs(B,{variant:"outline",size:"sm",className:"w-fit gap-1.5",children:[Z,ie,ue,me]})}),e[31]=ie,e[32]=ue,e[33]=N):N=e[33],l=Rt,D="p-0 w-80",k="start",p=Ss;let te;e[34]!==i?(te=i("automations.automationConfig.searchToolsPlaceholder"),e[34]=i,e[35]=te):te=e[35],e[36]!==te?(T=t.jsx(ks,{placeholder:te}),e[36]=te,e[37]=T):T=e[37];const fe=U?i("automations.automationConfig.allToolsEnabled",{count:J.length}):i("automations.automationConfig.toolsEnabledCount",{enabled:V.size,total:J.length});let se;e[38]!==fe?(se=t.jsx("span",{className:"text-xs text-muted-foreground",children:fe}),e[38]=fe,e[39]=se):se=e[39];let re;e[40]!==o?(re=()=>o(null),e[40]=o,e[41]=re):re=e[41];let le;e[42]!==i?(le=i("automations.automationConfig.selectAll"),e[42]=i,e[43]=le):le=e[43];let C;e[44]!==U||e[45]!==re||e[46]!==le?(C=t.jsx("button",{type:"button",onClick:re,disabled:U,className:"text-xs font-medium text-primary hover:underline disabled:cursor-default disabled:opacity-40 disabled:no-underline",children:le}),e[44]=U,e[45]=re,e[46]=le,e[47]=C):C=e[47];let M;e[48]===Symbol.for("react.memo_cache_sentinel")?(M=t.jsx("span",{className:"text-muted-foreground/30",children:"·"}),e[48]=M):M=e[48];let O;e[49]!==o?(O=()=>o([]),e[49]=o,e[50]=O):O=e[50];const pe=V.size===0;let ae;e[51]!==i?(ae=i("automations.automationConfig.clear"),e[51]=i,e[52]=ae):ae=e[52];let ce;e[53]!==O||e[54]!==pe||e[55]!==ae?(ce=t.jsx("button",{type:"button",onClick:O,disabled:pe,className:"text-xs font-medium text-muted-foreground hover:underline disabled:cursor-default disabled:opacity-40 disabled:no-underline",children:ae}),e[53]=O,e[54]=pe,e[55]=ae,e[56]=ce):ce=e[56];let de;e[57]!==C||e[58]!==ce?(de=t.jsxs("div",{className:"flex items-center gap-2",children:[C,M,ce]}),e[57]=C,e[58]=ce,e[59]=de):de=e[59],e[60]!==se||e[61]!==de?(_=t.jsxs("div",{className:"flex items-center justify-between border-b px-3 py-2",children:[se,de]}),e[60]=se,e[61]=de,e[62]=_):_=e[62],h=Ts,S="max-h-80",b=g?t.jsx("div",{className:"px-3 py-6 text-center text-xs text-muted-foreground",children:i("automations.automationConfig.loadingTools")}):t.jsxs(t.Fragment,{children:[t.jsx(Cs,{children:i("automations.automationConfig.noToolsFound")}),Bt.map(I=>{const z=I.tools.map(ya),Q=z.filter(P=>V.has(P)).length;return t.jsx(wt,{heading:t.jsx(At,{label:i(I.headingKey),icon:I.icon,on:Q,total:z.length,onToggle:()=>ne(z,Q!==z.length)}),children:I.tools.map(P=>t.jsx(It,{value:`${i(P.titleKey)} ${P.name}`,checked:V.has(P.name),onToggle:()=>oe(P.name),title:i(P.titleKey),description:i(P.descriptionKey),leading:t.jsx(P.icon,{size:16,className:"text-muted-foreground"})},P.name))},I.key)}),W.map(I=>{const z=I.tools.map(ja),Q=z.filter(P=>V.has(P)).length;return t.jsx(wt,{heading:t.jsx(At,{conn:I.conn,on:Q,total:z.length,onToggle:()=>ne(z,Q!==z.length)}),children:I.tools.map(P=>t.jsx(It,{value:`${P.display} ${P.name} ${I.conn?.title??""}`,checked:V.has(P.name),onToggle:()=>oe(P.name),title:P.display,description:P.description},P.name))},I.clientId)})]}),e[6]=u,e[7]=f?.tools,e[8]=g,e[9]=o,e[10]=a,e[11]=i,e[12]=n,e[13]=h,e[14]=p,e[15]=l,e[16]=y,e[17]=v,e[18]=N,e[19]=S,e[20]=b,e[21]=T,e[22]=_,e[23]=D,e[24]=k,e[25]=A}else h=e[13],p=e[14],l=e[15],y=e[16],v=e[17],N=e[18],S=e[19],b=e[20],T=e[21],_=e[22],D=e[23],k=e[24],A=e[25];let $;e[63]!==h||e[64]!==S||e[65]!==b?($=t.jsx(h,{className:S,children:b}),e[63]=h,e[64]=S,e[65]=b,e[66]=$):$=e[66];let R;e[67]!==p||e[68]!==$||e[69]!==T||e[70]!==_?(R=t.jsxs(p,{children:[T,_,$]}),e[67]=p,e[68]=$,e[69]=T,e[70]=_,e[71]=R):R=e[71];let K;e[72]!==l||e[73]!==R||e[74]!==D||e[75]!==k?(K=t.jsx(l,{className:D,align:k,children:R}),e[72]=l,e[73]=R,e[74]=D,e[75]=k,e[76]=K):K=e[76];let F;return e[77]!==y||e[78]!==v||e[79]!==N||e[80]!==K||e[81]!==A?(F=t.jsxs(y,{open:A,onOpenChange:v,children:[N,K]}),e[77]=y,e[78]=v,e[79]=N,e[80]=K,e[81]=A,e[82]=F):F=e[82],F}function ja(r){return r.name}function ya(r){return r.name}function ba(r){return r.name}function va(r,e){return(r.conn?.title??r.clientId).localeCompare(e.conn?.title??e.clientId)}function Ca(r){return[r.id,r]}function Re(r){const e=r.trim().split(/\s+/);return e.length!==5?!1:e.every(s=>/^[\d*/,-]+$/.test(s))}function Na(r){if(!r)return"Unknown schedule";const e=r.trim();if(e==="* * * * *")return"Every minute";if(e==="0 * * * *")return"Every hour";if(e==="0 0 * * *")return"Every day";if(e==="0 0 * * 1")return"Every week";const s=e.match(/^\*\/(\d+)\s+\*\s+\*\s+\*\s+\*$/);if(s)return`Every ${s[1]} minutes`;const n=e.match(/^0\s+\*\/(\d+)\s+\*\s+\*\s+\*$/);if(n)return`Every ${n[1]} hours`;const o=e.match(/^0\s+0\s+\*\/(\d+)\s+\*\s+\*$/);if(o){const a=parseInt(o[1]??"1");return a%7===0?`Every ${a/7} weeks`:`Every ${a} days`}const i=e.match(/^(\d+)\s+(\d+)\s+\*\s+\*\s+\*$/);if(i){const a=(i[2]??"0").padStart(2,"0"),j=(i[1]??"0").padStart(2,"0");return`Every day at ${a}:${j} UTC`}const c=e.match(/^(\d+)\s+(\d+)\s+\*\s+\*\s+(\d)$/);if(c){const j=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"][parseInt(c[3]??"0")]??"day",d=(c[2]??"0").padStart(2,"0"),m=(c[1]??"0").padStart(2,"0");return`Every ${j} at ${d}:${m} UTC`}return r}function Sa(r,e){const s=Math.max(1,r);switch(e){case"minutes":return s===1?"* * * * *":`*/${s} * * * *`;case"hours":return s===1?"0 * * * *":`0 */${s} * * *`;case"days":return s===1?"0 0 * * *":`0 0 */${s} * *`;case"weeks":return s===1?"0 0 * * 1":`0 0 */${s*7} * *`}}function ka(r){const e=r.trim();if(e==="* * * * *")return{count:1,unit:"minutes"};if(e==="0 * * * *")return{count:1,unit:"hours"};if(e==="0 0 * * *")return{count:1,unit:"days"};if(e==="0 0 * * 1")return{count:1,unit:"weeks"};const s=e.match(/^\*\/(\d+)\s+\*\s+\*\s+\*\s+\*$/);if(s)return{count:parseInt(s[1]),unit:"minutes"};const n=e.match(/^0\s+\*\/(\d+)\s+\*\s+\*\s+\*$/);if(n)return{count:parseInt(n[1]),unit:"hours"};const o=e.match(/^0\s+0\s+\*\/(\d+)\s+\*\s+\*$/);return o?{count:parseInt(o[1]),unit:"days"}:null}function Ta(r,e){return e===1?{minutes:"minute",hours:"hour",days:"day",weeks:"week"}[r]??r:r}const wa=[{label:"5 minutes",cron:"*/5 * * * *"},{label:"Hour",cron:"0 * * * *"},{label:"Day",cron:"0 0 * * *"},{label:"Week",cron:"0 0 * * 1"}],qe=aa.filter(r=>!sa.includes(r)),Gt=["any","earlier","later","statuses"],_a=r=>qe.some(e=>e===r),Da=r=>Gt.some(e=>e===r);function Ia({automationId:r,open:e,onOpenChange:s}){const n=ee(),{triggerAdd:o}=ve(),[i,c]=w.useState("in_progress"),[a,j]=w.useState("any"),[d,m]=w.useState([]),x=qe.filter(l=>l!==i),f=d.filter(l=>l!==i),g=a!=="statuses"||f.length>0,u=l=>{l||(c("in_progress"),j("any"),m([])),s(l)},h=async()=>{try{await o.mutateAsync({automation_id:r,type:"board_column_transition",column_key:i,from:a==="statuses"?{kind:a,statuses:f}:{kind:a}}),X.success(n("automations.addStarterPopover.starterAdded")),u(!1)}catch(l){X.error(l instanceof Error?l.message:n("automations.addStarterPopover.failedAddStarter"))}},p=l=>n(l==="any"?"automations.columnTransitionDialog.fromAny":l==="earlier"?"automations.columnTransitionDialog.fromEarlier":l==="later"?"automations.columnTransitionDialog.fromLater":"automations.columnTransitionDialog.fromColumns");return t.jsx(et,{open:e,onOpenChange:u,children:t.jsxs(tt,{className:"max-w-md",children:[t.jsxs(st,{children:[t.jsx(at,{children:n("automations.columnTransitionDialog.title")}),t.jsx(ot,{children:n("automations.columnTransitionDialog.description")})]}),t.jsxs("div",{className:"flex flex-col gap-4",children:[t.jsxs("div",{className:"flex flex-col gap-1.5",children:[t.jsx("span",{className:"text-xs font-semibold text-muted-foreground",children:n("automations.columnTransitionDialog.column")}),t.jsxs(ge,{value:i,onValueChange:l=>{_a(l)&&c(l)},children:[t.jsx(he,{className:"w-full",children:t.jsx(je,{})}),t.jsx(ye,{children:qe.map(l=>{const{label:y,visual:v}=We(l,n),N=v.icon;return t.jsxs(be,{value:l,children:[t.jsx(N,{size:14,className:Pt("shrink-0",v.iconClassName)}),y]},l)})})]})]}),t.jsxs("div",{className:"flex flex-col gap-1.5",children:[t.jsx("span",{className:"text-xs font-semibold text-muted-foreground",children:n("automations.columnTransitionDialog.origin")}),t.jsxs(ge,{value:a,onValueChange:l=>{Da(l)&&j(l)},children:[t.jsx(he,{className:"w-full",children:t.jsx(je,{})}),t.jsx(ye,{children:Gt.map(l=>t.jsx(be,{value:l,children:p(l)},l))})]}),a==="statuses"&&t.jsx(Wt,{options:x.map(l=>({label:We(l,n).label,value:l})),defaultValue:f,onValueChange:m,placeholder:n("automations.columnTransitionDialog.columnsPlaceholder"),modalPopover:!0,className:"max-w-none"},i)]}),t.jsx("p",{className:"text-xs text-muted-foreground",children:n("automations.columnTransitionDialog.help")})]}),t.jsxs(nt,{children:[t.jsx(B,{variant:"ghost",onClick:()=>u(!1),children:n("automations.columnTransitionDialog.cancel")}),t.jsx(B,{disabled:!g||o.isPending,onClick:h,children:n("automations.columnTransitionDialog.add")})]})]})})}const Ht=["any","earlier","later","statuses"],Aa=r=>Ht.some(e=>e===r);function Pa({automationId:r,boardId:e,open:s,onOpenChange:n}){const o=ee(),{triggerAdd:i}=ve(),c=qs(s?e:null),[a,j]=w.useState(null),[d,m]=w.useState("any"),[x,f]=w.useState([]),g=(c.data??[]).flatMap(b=>b.statuses.map(T=>({column:b.name,status:T}))),u=a??g[0]?.status??null,h=g.map(b=>b.status).filter(b=>b!==u),p=x.filter(b=>b!==u),l=u!==null&&(d!=="statuses"||p.length>0),y=b=>{b||(j(null),m("any"),f([])),n(b)},v=async()=>{if(u)try{await i.mutateAsync({automation_id:r,type:"jira_transition",jira_status:u,from:d==="statuses"?{kind:d,statuses:p}:{kind:d}}),X.success(o("automations.addStarterPopover.starterAdded")),y(!1)}catch(b){X.error(b instanceof Error?b.message:o("automations.addStarterPopover.failedAddStarter"))}},N=b=>o(b==="any"?"automations.jiraTransitionDialog.fromAny":b==="earlier"?"automations.jiraTransitionDialog.fromEarlier":b==="later"?"automations.jiraTransitionDialog.fromLater":"automations.jiraTransitionDialog.fromStatuses");let S;return c.isPending?S=t.jsx(es,{className:"h-9 w-full"}):c.isError||g.length===0?S=t.jsx("p",{className:"text-xs text-muted-foreground",children:o("automations.jiraTransitionDialog.noStatuses")}):S=t.jsxs(ge,{value:u??void 0,onValueChange:j,children:[t.jsx(he,{className:"w-full",children:t.jsx(je,{})}),t.jsx(ye,{children:g.map(b=>t.jsxs(be,{value:b.status,children:[b.status,b.column!==b.status&&t.jsx("span",{className:"text-muted-foreground",children:b.column})]},b.status))})]}),t.jsx(et,{open:s,onOpenChange:y,children:t.jsxs(tt,{className:"max-w-md",children:[t.jsxs(st,{children:[t.jsx(at,{children:o("automations.jiraTransitionDialog.title")}),t.jsx(ot,{children:o("automations.jiraTransitionDialog.description")})]}),t.jsxs("div",{className:"flex flex-col gap-4",children:[t.jsxs("div",{className:"flex flex-col gap-1.5",children:[t.jsx("span",{className:"text-xs font-semibold text-muted-foreground",children:o("automations.jiraTransitionDialog.status")}),S]}),t.jsxs("div",{className:"flex flex-col gap-1.5",children:[t.jsx("span",{className:"text-xs font-semibold text-muted-foreground",children:o("automations.jiraTransitionDialog.origin")}),t.jsxs(ge,{value:d,onValueChange:b=>{Aa(b)&&m(b)},children:[t.jsx(he,{className:"w-full",children:t.jsx(je,{})}),t.jsx(ye,{children:Ht.map(b=>t.jsx(be,{value:b,children:N(b)},b))})]}),d==="statuses"&&t.jsx(Wt,{options:h.map(b=>({label:b,value:b})),defaultValue:p,onValueChange:f,placeholder:o("automations.jiraTransitionDialog.statusesPlaceholder"),modalPopover:!0,className:"max-w-none"},u)]}),t.jsx("p",{className:"text-xs text-muted-foreground",children:o("automations.jiraTransitionDialog.help")})]}),t.jsxs(nt,{children:[t.jsx(B,{variant:"ghost",onClick:()=>y(!1),children:o("automations.jiraTransitionDialog.cancel")}),t.jsx(B,{disabled:!l||i.isPending,onClick:v,children:o("automations.jiraTransitionDialog.add")})]})]})})}function $a({automationId:r,open:e,onOpenChange:s,onCustomSelect:n,onEventSelect:o,onWebhookCreated:i}){const c=ee(),{triggerAdd:a}=ve(),[j,d]=w.useState(!1),[m,x]=w.useState(!1),[f,g]=w.useState(!1),u=ea().data?.boardId??null,h=e??j,p=v=>{s?s(v):d(v)},l=async v=>{try{await a.mutateAsync({automation_id:r,type:"cron",cron_expression:v}),X.success(c("automations.addStarterPopover.starterAdded")),p(!1)}catch(N){const S=N instanceof Error?N.message:c("automations.addStarterPopover.failedAddStarter");X.error(S)}},y=async()=>{try{const v=await a.mutateAsync({automation_id:r,type:"webhook"});p(!1),v.webhook?i?.(v.webhook):X.success(c("automations.addStarterPopover.webhookStarterAdded"))}catch(v){const N=v instanceof Error?v.message:c("automations.addStarterPopover.failedAddWebhookStarter");X.error(N)}};return t.jsxs(t.Fragment,{children:[t.jsxs(ts,{open:h,onOpenChange:p,children:[t.jsx(ss,{asChild:!0,children:t.jsxs(B,{variant:"outline",size:"sm",children:[t.jsx(ta,{size:14}),c("automations.addStarterPopover.addStarter")]})}),t.jsxs(as,{align:"end",className:"w-[240px]",children:[t.jsxs(os,{children:[t.jsxs(ns,{className:"gap-2.5",children:[t.jsx(Me,{size:14,className:"text-muted-foreground shrink-0"}),c("automations.addStarterPopover.every")]}),t.jsx(is,{className:"w-[160px]",children:wa.map(v=>t.jsxs(Oe,{className:"gap-2.5",onSelect:()=>l(v.cron),disabled:a.isPending,children:[t.jsx(Me,{size:14,className:"text-muted-foreground shrink-0"}),c("automations.addStarterPopover.everyUnit",{unit:v.label})]},v.cron))})]}),t.jsxs(Oe,{className:"gap-2.5",onSelect:()=>{p(!1),n?.()},children:[t.jsx(Me,{size:14,className:"text-muted-foreground shrink-0"}),c("automations.addStarterPopover.customCron")]}),t.jsxs(Oe,{className:"gap-2.5",onSelect:()=>{p(!1),o?.()},children:[t.jsx(ut,{size:14,className:"text-muted-foreground shrink-0"}),c("automations.addStarterPopover.event")]}),t.jsxs(Oe,{className:"gap-2.5",onSelect:()=>{p(!1),x(!0)},children:[t.jsx(Et,{size:14,className:"text-muted-foreground shrink-0"}),c("automations.addStarterPopover.cardEntersColumn")]}),u&&t.jsxs(Oe,{className:"gap-2.5",onSelect:()=>{p(!1),g(!0)},children:[t.jsx(Ut,{size:14,className:"shrink-0"}),c("automations.addStarterPopover.jiraIssueEntersStatus")]}),t.jsxs(Oe,{className:"gap-2.5",onSelect:()=>{y()},disabled:a.isPending,children:[t.jsx(it,{size:14,className:"text-muted-foreground shrink-0"}),c("automations.addStarterPopover.webhook")]})]})]}),t.jsx(Ia,{automationId:r,open:m,onOpenChange:x}),u&&t.jsx(Pa,{automationId:r,boardId:u,open:f,onOpenChange:g})]})}function Jt(r){const e=q.c(39),{open:s,onOpenChange:n,url:o,token:i,title:c,description:a}=r,j=c===void 0?"Webhook ready":c,d=a===void 0?"Send a POST to this URL with the bearer token to fire the automation. The token is shown once — copy it now.":a,m=ee(),[x,f]=w.useState(null),[g,u]=w.useState("curl"),[h,p]=w.useState("header"),l=w.useId();let y;e[0]!==m?(y=async(W,G)=>{try{await navigator.clipboard.writeText(W),f(G),X.success(m("automations.webhookSecretDialog.copied")),setTimeout(()=>f(null),1500)}catch{X.error(m("automations.webhookSecretDialog.failedCopy"))}},e[0]=m,e[1]=y):y=e[1];const v=y;let N;e[2]!==h||e[3]!==i||e[4]!==o?(N=o&&i&&h==="url"?`${o.replace(/\/$/,"")}/${i}`:o??"",e[2]=h,e[3]=i,e[4]=o,e[5]=N):N=e[5];const S=N,b=o&&i?h==="header"?`curl -X POST "${S}" \\
|
|
2
2
|
-H "Authorization: Bearer ${i}" \\
|
|
3
3
|
-H "Content-Type: application/json" \\
|
|
4
4
|
-d '{"hello":"world"}'`:`curl -X POST "${S}" \\
|
|
@@ -16,5 +16,5 @@ import{c6 as Qt,c as q,b as ee,r as w,j as t,B,bx as qt,m as Pt,a5 as $t,D as et
|
|
|
16
16
|
"Content-Type": "application/json",
|
|
17
17
|
},
|
|
18
18
|
body: JSON.stringify({ hello: "world" }),
|
|
19
|
-
});`:"",_=g==="curl"?b:T;let D;e[6]!==j?(D=t.jsx(at,{children:j}),e[6]=j,e[7]=D):D=e[7];let k;e[8]!==d?(k=t.jsx(ot,{children:d}),e[8]=d,e[9]=k):k=e[9];let A;e[10]!==D||e[11]!==k?(A=t.jsxs(st,{children:[D,k]}),e[10]=D,e[11]=k,e[12]=A):A=e[12];let $;e[13]!==h||e[14]!==x||e[15]!==v||e[16]!==S||e[17]!==g||e[18]!==_||e[19]!==m||e[20]!==i||e[21]!==l||e[22]!==o?($=o&&i?t.jsxs("div",{className:"flex flex-col gap-3 min-w-0",children:[t.jsxs("div",{className:"flex flex-col gap-1",children:[t.jsx("span",{className:"text-xs font-semibold text-muted-foreground",children:m("automations.webhookSecretDialog.url")}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("code",{className:"flex-1 min-w-0 text-xs font-mono bg-muted rounded-md px-2 py-1.5 truncate",children:S}),t.jsxs(B,{size:"sm",variant:"outline",onClick:()=>v(S,"url"),children:[t.jsx(Ye,{size:13}),m(x==="url"?"automations.webhookSecretDialog.copied":"automations.webhookSecretDialog.copy")]})]})]}),t.jsxs("div",{className:"flex flex-col gap-1",children:[t.jsx("span",{className:"text-xs font-semibold text-muted-foreground",children:m("automations.webhookSecretDialog.tokenLabel")}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("code",{className:"flex-1 min-w-0 text-xs font-mono bg-muted rounded-md px-2 py-1.5 truncate",children:i}),t.jsxs(B,{size:"sm",variant:"outline",onClick:()=>v(i,"token"),children:[t.jsx(Ye,{size:13}),m(x==="token"?"automations.webhookSecretDialog.copied":"automations.webhookSecretDialog.copy")]})]})]}),t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsx("span",{className:"text-xs font-semibold text-muted-foreground",children:m("automations.webhookSecretDialog.snippet")}),t.jsxs("div",{className:"flex items-center justify-between gap-3",children:[t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx(oa,{value:g,onValueChange:W=>u(W),children:t.jsxs(na,{className:"h-8 p-[2px]",children:[t.jsx(Dt,{value:"curl",className:"h-7 px-2.5 text-xs",children:"curl"}),t.jsx(Dt,{value:"fetch",className:"h-7 px-2.5 text-xs",children:"fetch"})]})}),t.jsxs("label",{htmlFor:l,className:"flex items-center gap-1.5 text-xs text-muted-foreground cursor-pointer select-none",children:[t.jsx(Ft,{id:l,checked:h==="url",onCheckedChange:W=>p(W?"url":"header")}),m("automations.webhookSecretDialog.tokenInUrl")]})]}),t.jsxs(B,{size:"sm",variant:"outline",onClick:()=>v(_,"example"),children:[t.jsx(Ye,{size:13}),m(x==="example"?"automations.webhookSecretDialog.copied":"automations.webhookSecretDialog.copy")]})]}),t.jsx("div",{className:"rounded-md border overflow-hidden min-w-0",children:t.jsx(ia,{code:_,language:g==="curl"?"shell":"typescript",readOnly:!0,disableDiagnostics:!0,height:180})})]})]}):null,e[13]=h,e[14]=x,e[15]=v,e[16]=S,e[17]=g,e[18]=_,e[19]=m,e[20]=i,e[21]=l,e[22]=o,e[23]=$):$=e[23];let R;e[24]!==n?(R=()=>n(!1),e[24]=n,e[25]=R):R=e[25];let K;e[26]!==m?(K=m("automations.webhookSecretDialog.done"),e[26]=m,e[27]=K):K=e[27];let F;e[28]!==K||e[29]!==R?(F=t.jsx(nt,{children:t.jsx(B,{onClick:R,children:K})}),e[28]=K,e[29]=R,e[30]=F):F=e[30];let Y;e[31]!==F||e[32]!==A||e[33]!==$?(Y=t.jsxs(tt,{className:"max-w-lg",children:[A,$,F]}),e[31]=F,e[32]=A,e[33]=$,e[34]=Y):Y=e[34];let H;return e[35]!==n||e[36]!==s||e[37]!==Y?(H=t.jsx(et,{open:s,onOpenChange:n,children:Y}),e[35]=n,e[36]=s,e[37]=Y,e[38]=H):H=e[38],H}async function Ea(r){const{cronExpression:e,automationId:s,oldTriggerId:n,addTrigger:o,removeTrigger:i}=r,c=await o({automation_id:s,type:"cron",cron_expression:e});try{await i({trigger_id:n,automation_id:s})}catch(a){throw await i({trigger_id:c.id,automation_id:s}).catch(()=>{}),a}}function Xt(r){const e=q.c(153),{trigger:s,automationId:n,connectionName:o,readOnly:i}=r,c=i===void 0?!1:i,a=ee(),{triggerAdd:j,triggerRemove:d,triggerRotateToken:m}=ve(),[x,f]=w.useState(!1),[g,u]=w.useState(!1),[h,p]=w.useState(null);let l;e[0]!==s.cron_expression?(l=s.cron_expression?ka(s.cron_expression):null,e[0]=s.cron_expression,e[1]=l):l=e[1];const y=l,[v,N]=w.useState(y?.count??1),[S,b]=w.useState(!1),[T,_]=w.useState(s.cron_expression??""),D=d.isPending||j.isPending||m.isPending,k=s.type==="cron",A=s.type==="webhook",$=s.type==="board_column_transition";let R;e[2]!==a||e[3]!==s.type?(R=s.type==="board_pr_ready"?a("automations.triggerCard.prReady"):s.type==="linked_chat_run"?a("automations.triggerCard.linkedChatRun"):s.type==="board_pr_merged"?a("automations.triggerCard.prMerged"):s.type==="chat_pr_opened"?a("automations.triggerCard.chatPrOpened"):s.type==="card_mention"?a("automations.triggerCard.cardMention"):null,e[2]=a,e[3]=s.type,e[4]=R):R=e[4];const K=R,F=s.type==="jira_transition";let Y;e[5]!==n||e[6]!==d||e[7]!==a||e[8]!==s.id?(Y=async()=>{try{await d.mutateAsync({trigger_id:s.id,automation_id:n}),X.success(a("automations.triggerCard.starterRemoved"))}catch{X.error(a("automations.triggerCard.failedToRemoveStarter"))}f(!1)},e[5]=n,e[6]=d,e[7]=a,e[8]=s.id,e[9]=Y):Y=e[9];const H=Y;let W;e[10]!==j||e[11]!==n||e[12]!==d||e[13]!==s.id?(W=L=>Ea({cronExpression:L,automationId:n,oldTriggerId:s.id,addTrigger:Fe=>j.mutateAsync(Fe),removeTrigger:Fe=>d.mutateAsync(Fe)}),e[10]=j,e[11]=n,e[12]=d,e[13]=s.id,e[14]=W):W=e[14];const G=W;let J;e[15]!==T||e[16]!==G||e[17]!==a||e[18]!==s.cron_expression?(J=async()=>{const L=T.trim();if(!L||!Re(L)||L===s.cron_expression){b(!1),_(s.cron_expression??"");return}try{await G(L),b(!1)}catch{X.error(a("automations.triggerCard.failedToUpdateStarter")),_(s.cron_expression??""),b(!1)}},e[15]=T,e[16]=G,e[17]=a,e[18]=s.cron_expression,e[19]=J):J=e[19];const V=J;let U;e[20]!==n||e[21]!==m||e[22]!==a||e[23]!==s.id?(U=async()=>{u(!1);try{const L=await m.mutateAsync({trigger_id:s.id,automation_id:n});p({url:L.url,token:L.token})}catch{X.error(a("automations.triggerCard.failedToRotateToken"))}},e[20]=n,e[21]=m,e[22]=a,e[23]=s.id,e[24]=U):U=e[24];const E=U;let oe;e[25]!==y||e[26]!==G||e[27]!==a||e[28]!==s.cron_expression?(oe=async L=>{if(!y)return;const Fe=y.unit==="minutes"?5:1,Je=Math.max(Fe,L);Je!==L&&N(Je);const ft=Sa(Je,y.unit);if(ft!==s.cron_expression)try{await G(ft)}catch{X.error(a("automations.triggerCard.failedToUpdateStarter")),N(y.count)}},e[25]=y,e[26]=G,e[27]=a,e[28]=s.cron_expression,e[29]=oe):oe=e[29];const ne=oe;let Z;e[30]!==$||e[31]!==k||e[32]!==F||e[33]!==A||e[34]!==K?(Z=k?t.jsx(Me,{size:14,className:"text-muted-foreground shrink-0"}):F?t.jsx(Ut,{size:14,className:"shrink-0"}):$||K?t.jsx(Et,{size:14,className:"text-muted-foreground shrink-0"}):A?t.jsx(it,{size:14,className:"text-muted-foreground shrink-0"}):t.jsx(ut,{size:14,className:"text-muted-foreground shrink-0"}),e[30]=$,e[31]=k,e[32]=F,e[33]=A,e[34]=K,e[35]=Z):Z=e[35];let ie;e[36]!==o||e[37]!==v||e[38]!==T||e[39]!==ne||e[40]!==V||e[41]!==y||e[42]!==$||e[43]!==k||e[44]!==S||e[45]!==F||e[46]!==D||e[47]!==A||e[48]!==K||e[49]!==a||e[50]!==s.column_key||e[51]!==s.cron_expression||e[52]!==s.event_type||e[53]!==s.from||e[54]!==s.params?(ie=y&&k?t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"text-sm text-muted-foreground",children:a("automations.triggerCard.every")}),t.jsx("input",{type:"number",min:y.unit==="minutes"?5:1,value:v,onChange:L=>N(parseInt(L.target.value)||1),onBlur:()=>ne(v),onKeyDown:L=>{L.key==="Enter"&&L.target.blur(),L.key==="Escape"&&N(y.count)},disabled:D,className:"w-12 text-center text-sm h-7 border border-border rounded-md bg-background px-1 focus-ring"}),t.jsx("span",{className:"text-sm",children:Ta(y.unit,v)})]}):k&&S?t.jsxs(t.Fragment,{children:[t.jsx("input",{type:"text",value:T,onChange:L=>_(L.target.value),onBlur:V,onKeyDown:L=>{L.key==="Enter"&&L.target.blur(),L.key==="Escape"&&(b(!1),_(s.cron_expression??""))},className:"flex-1 text-sm font-mono bg-transparent outline-none",autoFocus:!0}),T&&!Re(T)&&t.jsx("span",{className:"text-xs text-muted-foreground/60 shrink-0",children:a("automations.triggerCard.invalid")})]}):t.jsxs("div",{className:"flex flex-col gap-0.5 flex-1 min-w-0",children:[t.jsx("span",{className:"text-sm font-mono text-xs text-muted-foreground truncate",children:k?Na(s.cron_expression??""):$?a("automations.triggerCard.cardEntersColumn",{lane:We(s.column_key??"",a).label}):K||(F?a("automations.triggerCard.issueEntersJiraStatus",{status:s.column_key??""}):A?a("automations.triggerCard.webhookPostToFire"):`${s.event_type}${o?` · ${o}`:""}`)}),$&&t.jsx(za,{from:s.from}),F&&t.jsx(Ka,{from:s.from}),!k&&!A&&!$&&!K&&!F&&s.params&&Object.keys(s.params).length>0&&t.jsx("span",{className:"text-xs text-muted-foreground/60 truncate",children:Object.entries(s.params).map(Oa).join(", ")})]}),e[36]=o,e[37]=v,e[38]=T,e[39]=ne,e[40]=V,e[41]=y,e[42]=$,e[43]=k,e[44]=S,e[45]=F,e[46]=D,e[47]=A,e[48]=K,e[49]=a,e[50]=s.column_key,e[51]=s.cron_expression,e[52]=s.event_type,e[53]=s.from,e[54]=s.params,e[55]=ie):ie=e[55];let ue;e[56]!==D?(ue=D&&t.jsx(Le,{className:"size-[13px] text-muted-foreground"}),e[56]=D,e[57]=ue):ue=e[57];let me;e[58]!==y||e[59]!==k||e[60]!==S||e[61]!==a||e[62]!==s.cron_expression?(me=k&&!y&&!S&&t.jsx(B,{variant:"ghost",size:"icon-sm",className:"opacity-0 group-hover:opacity-100 transition-opacity","aria-label":a("automations.triggerCard.editSchedule"),onClick:()=>{_(s.cron_expression??""),b(!0)},children:t.jsx(Ot,{size:13,className:"text-muted-foreground"})}),e[58]=y,e[59]=k,e[60]=S,e[61]=a,e[62]=s.cron_expression,e[63]=me):me=e[63];let te;e[64]!==A||e[65]!==a?(te=A&&t.jsx(B,{variant:"ghost",size:"icon-sm",className:"opacity-0 group-hover:opacity-100 transition-opacity",title:a("automations.triggerCard.rotateToken"),"aria-label":a("automations.triggerCard.rotateToken"),onClick:()=>u(!0),children:t.jsx(rs,{size:13,className:"text-muted-foreground"})}),e[64]=A,e[65]=a,e[66]=te):te=e[66];let fe;e[67]!==c||e[68]!==a?(fe=!c&&t.jsx(B,{variant:"ghost",size:"icon-sm",className:"opacity-0 group-hover:opacity-100 transition-opacity","aria-label":a("automations.triggerCard.removeStarter"),onClick:()=>f(!0),children:t.jsx(mt,{size:13,className:"text-muted-foreground"})}),e[67]=c,e[68]=a,e[69]=fe):fe=e[69];let se;e[70]!==ue||e[71]!==me||e[72]!==te||e[73]!==fe?(se=t.jsxs("div",{className:"ml-auto flex items-center gap-1",children:[ue,me,te,fe]}),e[70]=ue,e[71]=me,e[72]=te,e[73]=fe,e[74]=se):se=e[74];let re;e[75]!==ie||e[76]!==se||e[77]!==Z?(re=t.jsxs("div",{className:"flex items-center gap-2.5 px-3 py-2.5 surface group",children:[Z,ie,se]}),e[75]=ie,e[76]=se,e[77]=Z,e[78]=re):re=e[78];let le;e[79]!==a?(le=a("automations.triggerCard.removeStarter"),e[79]=a,e[80]=le):le=e[80];let C;e[81]!==le?(C=t.jsx(pt,{children:le}),e[81]=le,e[82]=C):C=e[82];let M;e[83]!==a?(M=a("automations.triggerCard.confirmRemoveStarter"),e[83]=a,e[84]=M):M=e[84];let z;e[85]!==M?(z=t.jsx(xt,{children:M}),e[85]=M,e[86]=z):z=e[86];let pe;e[87]!==C||e[88]!==z?(pe=t.jsxs(gt,{children:[C,z]}),e[87]=C,e[88]=z,e[89]=pe):pe=e[89];let ae;e[90]!==a?(ae=a("automations.triggerCard.cancel"),e[90]=a,e[91]=ae):ae=e[91];let ce;e[92]!==ae?(ce=t.jsx(ht,{children:ae}),e[92]=ae,e[93]=ce):ce=e[93];let de;e[94]!==a?(de=a("automations.triggerCard.remove"),e[94]=a,e[95]=de):de=e[95];let I;e[96]!==H||e[97]!==de?(I=t.jsx(jt,{onClick:H,variant:"destructive",children:de}),e[96]=H,e[97]=de,e[98]=I):I=e[98];let O;e[99]!==ce||e[100]!==I?(O=t.jsxs(yt,{children:[ce,I]}),e[99]=ce,e[100]=I,e[101]=O):O=e[101];let Q;e[102]!==pe||e[103]!==O?(Q=t.jsxs(bt,{children:[pe,O]}),e[102]=pe,e[103]=O,e[104]=Q):Q=e[104];let P;e[105]!==x||e[106]!==Q?(P=t.jsx(vt,{open:x,onOpenChange:f,children:Q}),e[105]=x,e[106]=Q,e[107]=P):P=e[107];let xe;e[108]!==a?(xe=a("automations.triggerCard.rotateWebhookToken"),e[108]=a,e[109]=xe):xe=e[109];let Ce;e[110]!==xe?(Ce=t.jsx(pt,{children:xe}),e[110]=xe,e[111]=Ce):Ce=e[111];let Ne;e[112]!==a?(Ne=a("automations.triggerCard.rotateWebhookTokenDescription"),e[112]=a,e[113]=Ne):Ne=e[113];let Se;e[114]!==Ne?(Se=t.jsx(xt,{children:Ne}),e[114]=Ne,e[115]=Se):Se=e[115];let ke;e[116]!==Ce||e[117]!==Se?(ke=t.jsxs(gt,{children:[Ce,Se]}),e[116]=Ce,e[117]=Se,e[118]=ke):ke=e[118];let Te;e[119]!==a?(Te=a("automations.triggerCard.cancel"),e[119]=a,e[120]=Te):Te=e[120];let we;e[121]!==Te?(we=t.jsx(ht,{children:Te}),e[121]=Te,e[122]=we):we=e[122];let _e;e[123]!==a?(_e=a("automations.triggerCard.rotate"),e[123]=a,e[124]=_e):_e=e[124];let De;e[125]!==E||e[126]!==_e?(De=t.jsx(jt,{onClick:E,children:_e}),e[125]=E,e[126]=_e,e[127]=De):De=e[127];let Ie;e[128]!==we||e[129]!==De?(Ie=t.jsxs(yt,{children:[we,De]}),e[128]=we,e[129]=De,e[130]=Ie):Ie=e[130];let Ae;e[131]!==ke||e[132]!==Ie?(Ae=t.jsxs(bt,{children:[ke,Ie]}),e[131]=ke,e[132]=Ie,e[133]=Ae):Ae=e[133];let Pe;e[134]!==g||e[135]!==Ae?(Pe=t.jsx(vt,{open:g,onOpenChange:u,children:Ae}),e[134]=g,e[135]=Ae,e[136]=Pe):Pe=e[136];const Be=h!==null;let Ve;e[137]===Symbol.for("react.memo_cache_sentinel")?(Ve=L=>{L||p(null)},e[137]=Ve):Ve=e[137];const Ge=h?.url??null,He=h?.token??null;let $e;e[138]!==a?($e=a("automations.triggerCard.newWebhookToken"),e[138]=a,e[139]=$e):$e=e[139];let Ee;e[140]!==a?(Ee=a("automations.triggerCard.newWebhookTokenDescription"),e[140]=a,e[141]=Ee):Ee=e[141];let Oe;e[142]!==Be||e[143]!==Ge||e[144]!==He||e[145]!==$e||e[146]!==Ee?(Oe=t.jsx(Jt,{open:Be,onOpenChange:Ve,url:Ge,token:He,title:$e,description:Ee}),e[142]=Be,e[143]=Ge,e[144]=He,e[145]=$e,e[146]=Ee,e[147]=Oe):Oe=e[147];let Ue;return e[148]!==re||e[149]!==P||e[150]!==Pe||e[151]!==Oe?(Ue=t.jsxs(t.Fragment,{children:[re,P,Pe,Oe]}),e[148]=re,e[149]=P,e[150]=Pe,e[151]=Oe,e[152]=Ue):Ue=e[152],Ue}function Oa(r){const[e,s]=r;return`${e}: ${s}`}function za(r){const e=q.c(10),{from:s}=r,n=ee();let o;e[0]!==s||e[1]!==n?(o=!s||s.kind==="any"?null:s.kind==="earlier"?n("automations.triggerCard.fromEarlier"):s.kind==="later"?n("automations.triggerCard.fromLater"):s.kind==="statuses"?n("automations.triggerCard.fromColumns",{columns:s.statuses.map(m=>We(m,n).label).join(", ")}):null,e[0]=s,e[1]=n,e[2]=o):o=e[2];const i=o;let c;e[3]!==n?(c=n("automations.triggerCard.unownedOnly"),e[3]=n,e[4]=c):c=e[4];let a;e[5]!==i||e[6]!==c?(a=[i,c].filter(Boolean),e[5]=i,e[6]=c,e[7]=a):a=e[7];const j=a.join(" · ");let d;return e[8]!==j?(d=t.jsx("span",{className:"text-xs text-muted-foreground/60 truncate",children:j}),e[8]=j,e[9]=d):d=e[9],d}function Ka(r){const e=q.c(6),{from:s}=r,n=ee();if(!s||s.kind==="any")return null;let o;e[0]!==s.kind||e[1]!==s.statuses||e[2]!==n?(o=s.kind==="earlier"?n("automations.triggerCard.fromEarlier"):s.kind==="later"?n("automations.triggerCard.fromLater"):s.kind==="statuses"?n("automations.triggerCard.fromColumns",{columns:s.statuses.join(", ")}):null,e[0]=s.kind,e[1]=s.statuses,e[2]=n,e[3]=o):o=e[3];let i;return e[4]!==o?(i=t.jsx("span",{className:"text-xs text-muted-foreground/60 truncate",children:o}),e[4]=o,e[5]=i):i=e[5],i}function Fa(r){const e=q.c(70),{automationId:s,onDone:n}=r,o=ee();let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i={binding:"TRIGGER"},e[0]=i):i=e[0];const c=dt(i),[a,j]=w.useState(),[d,m]=w.useState();let x;e[1]===Symbol.for("react.memo_cache_sentinel")?(x={},e[1]=x):x=e[1];const[f,g]=w.useState(x),{triggerAdd:u}=ve(),{data:h,isLoading:p}=zs(a);let l,y,v,N,S,b;if(e[2]!==u||e[3]!==s||e[4]!==a||e[5]!==d||e[6]!==p||e[7]!==n||e[8]!==f||e[9]!==o||e[10]!==c||e[11]!==h){const D=h?.find(U=>U.type===d);let k;e[18]!==u||e[19]!==s||e[20]!==a||e[21]!==d||e[22]!==n||e[23]!==f||e[24]!==o?(k=async()=>{if(!(!a||!d))try{await u.mutateAsync({automation_id:s,type:"event",event_type:d,connection_id:a,params:f}),Ke("automation_trigger_added",{automation_id:s,trigger_type:"event",connection_id:a,event_type:d}),X.success(o("automations.eventTriggerForm.successAdded")),n()}catch{X.error(o("automations.eventTriggerForm.errorFailed"))}},e[18]=u,e[19]=s,e[20]=a,e[21]=d,e[22]=n,e[23]=f,e[24]=o,e[25]=k):k=e[25],l=k,y="flex flex-col gap-3 px-3 py-3 surface";let A;e[26]===Symbol.for("react.memo_cache_sentinel")?(A=t.jsx(ut,{size:14,className:"text-muted-foreground shrink-0"}),e[26]=A):A=e[26];let $;e[27]!==o?($=o("automations.eventTriggerForm.title"),e[27]=o,e[28]=$):$=e[28];let R;e[29]!==$?(R=t.jsx("span",{className:"text-sm font-medium",children:$}),e[29]=$,e[30]=R):R=e[30];let K;e[31]===Symbol.for("react.memo_cache_sentinel")?(K=t.jsx(mt,{size:13}),e[31]=K):K=e[31];let F;e[32]!==n?(F=t.jsx("button",{type:"button",className:"ml-auto shrink-0 p-0.5 text-muted-foreground hover:text-foreground rounded-lg",onClick:n,children:K}),e[32]=n,e[33]=F):F=e[33],e[34]!==R||e[35]!==F?(v=t.jsxs("div",{className:"flex items-center gap-2",children:[A,R,F]}),e[34]=R,e[35]=F,e[36]=v):v=e[36];const Y=a??"";let H;e[37]===Symbol.for("react.memo_cache_sentinel")?(H=U=>{j(U),m(void 0),g({})},e[37]=H):H=e[37];let W;e[38]!==o?(W=o("automations.eventTriggerForm.selectConnectionPlaceholder"),e[38]=o,e[39]=W):W=e[39];let G;e[40]!==W?(G=t.jsx(he,{className:"w-full",children:t.jsx(je,{placeholder:W})}),e[40]=W,e[41]=G):G=e[41];let J;e[42]!==o||e[43]!==c?(J=c.length===0?t.jsx("div",{className:"px-2 py-3 text-center text-xs text-muted-foreground",children:o("automations.eventTriggerForm.noConnectionsWithTrigger")}):c.map(La),e[42]=o,e[43]=c,e[44]=J):J=e[44];let V;e[45]!==J?(V=t.jsx(ye,{children:J}),e[45]=J,e[46]=V):V=e[46],e[47]!==Y||e[48]!==G||e[49]!==V?(N=t.jsxs(ge,{value:Y,onValueChange:H,children:[G,V]}),e[47]=Y,e[48]=G,e[49]=V,e[50]=N):N=e[50],e[51]!==a||e[52]!==d||e[53]!==p||e[54]!==o||e[55]!==h?(S=a&&t.jsxs(ge,{value:d??"",onValueChange:U=>{m(U),g({})},children:[t.jsx(he,{className:"w-full",children:p?t.jsxs("span",{className:"flex items-center gap-2 text-muted-foreground",children:[t.jsx(Le,{className:"size-[13px]"}),o("automations.eventTriggerForm.loadingEvents")]}):t.jsx(je,{placeholder:o("automations.eventTriggerForm.selectEventTypePlaceholder"),children:d??o("automations.eventTriggerForm.selectEventTypePlaceholder")})}),t.jsx(ye,{children:h?.map(Ra)})]}),e[51]=a,e[52]=d,e[53]=p,e[54]=o,e[55]=h,e[56]=S):S=e[56],b=D?.paramsSchema&&Object.keys(D.paramsSchema).length>0&&t.jsx("div",{className:"flex flex-col gap-2",children:Object.entries(D.paramsSchema).map(U=>{const[E,oe]=U;return t.jsxs("div",{className:"flex flex-col gap-1",children:[t.jsxs("label",{className:"text-xs text-muted-foreground",children:[E,oe.description&&t.jsxs("span",{className:"text-muted-foreground/60",children:[" ","— ",oe.description]})]}),oe.enum?t.jsxs(ge,{value:f[E]??"",onValueChange:ne=>g(Z=>({...Z,[E]:ne})),children:[t.jsx(he,{className:"w-full",children:t.jsx(je,{placeholder:o("automations.eventTriggerForm.selectParamPlaceholder",{key:E})})}),t.jsx(ye,{children:oe.enum.map(Ma)})]}):t.jsx("input",{type:"text",value:f[E]??"",onChange:ne=>g(Z=>({...Z,[E]:ne.target.value})),placeholder:oe.description??E,className:"text-sm border border-border rounded-md bg-background px-2 py-1.5 focus-ring"})]},E)})}),e[2]=u,e[3]=s,e[4]=a,e[5]=d,e[6]=p,e[7]=n,e[8]=f,e[9]=o,e[10]=c,e[11]=h,e[12]=l,e[13]=y,e[14]=v,e[15]=N,e[16]=S,e[17]=b}else l=e[12],y=e[13],v=e[14],N=e[15],S=e[16],b=e[17];let T;e[57]!==u||e[58]!==a||e[59]!==d||e[60]!==l||e[61]!==o?(T=a&&d&&t.jsx(B,{size:"sm",onClick:l,disabled:u.isPending,children:u.isPending?t.jsx(Le,{className:"size-[13px]"}):o("automations.eventTriggerForm.addTriggerButton")}),e[57]=u,e[58]=a,e[59]=d,e[60]=l,e[61]=o,e[62]=T):T=e[62];let _;return e[63]!==y||e[64]!==v||e[65]!==N||e[66]!==S||e[67]!==b||e[68]!==T?(_=t.jsxs("div",{className:y,children:[v,N,S,b,T]}),e[63]=y,e[64]=v,e[65]=N,e[66]=S,e[67]=b,e[68]=T,e[69]=_):_=e[69],_}function Ma(r){return t.jsx(be,{value:r,children:r},r)}function Ra(r){return t.jsx(be,{value:r.type,children:t.jsxs("div",{className:"flex flex-col",children:[t.jsx("span",{children:r.type}),t.jsx("span",{className:"text-xs text-muted-foreground",children:r.description})]})},r.type)}function La(r){return t.jsx(be,{value:r.id,children:r.title},r.id)}const Va=30;function Ua(r,e){switch(e.type){case"accumulate":{const s=r??{start:e.now,fields:new Set,saveCount:0},n=new Set(s.fields);for(const o of e.fields)n.add(o);return{...s,fields:n,saveCount:s.saveCount+1}}case"reset":return null}}function Wa({automationId:r,automation:e,onBack:s,onDelete:n}){const o=ee(),i=e.virtual_mcp_id,{org:c}=$t(),{update:a,triggerAdd:j,run:d}=ve(),m=dt(),x=new Map(m.map(C=>[C.id,C.title])),{openTask:f}=Fs(),{openSidePanel:g}=Js(),{sendMessage:u}=Ms(),h=e.messages?.[0]?.metadata?.tiptapDoc??void 0,[p,l]=w.useState(h),[y,v]=w.useState(!1),[N,S]=w.useState(!1),[b,T]=w.useState(!1),[_,D]=w.useState(""),[k,A]=w.useState(!1),[$,R]=w.useState(null),[K,F]=w.useState(!1),[Y,H]=w.useState(!1),[W,G]=w.useState(!1),J=async()=>{if(K)return;const M=Rs(p).filter(z=>z.type==="text").map(z=>z.text).join(`
|
|
20
|
-
`);if(M.trim()){F(!0);try{se(),Ke("automation_improve_clicked",{automation_id:r,agent_id:i,instructions_length:M.length}),g(),await u({tiptapDoc:Os({managerAgentId:cs.AUTOMATION_MANAGER(c.id),managerName:"Automation Manager",kind:"automation",id:r,instructions:M})})}finally{F(!1)}}},V=e.models?.tier??"smart",U=e.models?.modelId&&e.models?.credentialId?{modelId:e.models.modelId,credentialId:e.models.credentialId,title:e.models.modelTitle??e.models.modelId}:null,E=ls({defaultValues:{name:e.name,active:e.active,tier:V,modelOverride:U,tools:e.tools??null,maxAgentSteps:e.maxAgentSteps??null}}),oe=E.watch("active"),[ne,Z]=w.useReducer(Ua,null),ie=()=>{ne!==null&&(Ke("automation_updated",{automation_id:r,agent_id:i,fields:Array.from(ne.fields),save_count:ne.saveCount,edit_duration_ms:Date.now()-ne.start}),Z({type:"reset"}))},ue=async()=>{const C=E.control._formState.dirtyFields,M=Object.keys(C);if(M.length===0&&!W)return!0;const z=E.getValues(),pe=E.control._defaultValues;E.reset(z,{keepValues:!0});const ae=W;G(!1);const ce={tier:z.tier,...z.modelOverride?{modelId:z.modelOverride.modelId,credentialId:z.modelOverride.credentialId,modelTitle:z.modelOverride.title}:{}},de={id:r,name:z.name,active:z.active,models:ce,tools:z.tools,maxAgentSteps:z.maxAgentSteps,messages:Ls(p),temperature:0};try{await a.mutateAsync(de)}catch{return E.reset(pe,{keepValues:!0}),ae&&G(!0),!1}const I=[...M];return ae&&I.push("messages"),Z({type:"accumulate",now:Date.now(),fields:I}),fe(),!0},{schedule:me,flush:te}=_t({save:ue}),{schedule:fe,flush:se}=_t({delayMs:3e4,save:async()=>ie()});w.useEffect(()=>{const C=E.watch(()=>me());return()=>C.unsubscribe()},[]);const re=C=>{if(l(C),!Y){H(!0);return}G(!0),me()},le=async()=>{Ke("automation_test_clicked",{automation_id:r,agent_id:i});const C=await te();if(se(),!!C){if(!p){X.error(o("automations.automationDetail.noInstructionsConfigured"));return}try{const M=await d.mutateAsync(r);M.threadId&&(g(),f(M.threadId))}catch{}}};return t.jsxs(t.Fragment,{children:[s&&t.jsx("div",{className:"flex items-center pb-4 shrink-0",children:t.jsxs(B,{variant:"ghost",size:"sm",onClick:s,children:[t.jsx(Vt,{size:14}),o("automations.automationDetail.backToList")]})}),t.jsxs("div",{className:"flex flex-col gap-8",children:[t.jsxs("div",{className:"flex flex-col gap-1.5",children:[t.jsxs("div",{className:"flex items-center justify-between gap-4",children:[t.jsx(Ct,{control:E.control,name:"name",render:({field:C})=>t.jsx(Nt,{...C,placeholder:o("automations.automationDetail.automationNamePlaceholder"),className:"border border-transparent shadow-none px-0 text-lg font-medium h-auto focus-visible:ring-0 focus-visible:border-border bg-transparent flex-1",style:{boxShadow:"none"}})}),n&&t.jsx(B,{variant:"ghost-destructive",size:"icon",className:"shrink-0",onClick:n,children:t.jsx(Ys,{size:14})})]}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(Ct,{control:E.control,name:"active",render:({field:C})=>t.jsx(ct,{checked:C.value,onCheckedChange:M=>{C.onChange(M),te()},className:"cursor-pointer"})}),t.jsx("span",{className:"text-sm text-muted-foreground",children:o(oe?"automations.automationDetail.active":"automations.automationDetail.inactive")}),t.jsx("span",{className:"text-muted-foreground/50 text-sm",children:"·"}),t.jsx(Es,{id:e.created_by,size:"2xs",className:"text-sm text-muted-foreground"})]})]}),t.jsxs("div",{className:"flex flex-col gap-2.5",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("span",{className:"text-xs font-semibold text-muted-foreground/60",children:o("automations.automationDetail.starter")}),t.jsx($a,{automationId:r,open:y,onOpenChange:v,onCustomSelect:()=>{T(!0),A(!1),D("")},onEventSelect:()=>{A(!0),T(!1)},onWebhookCreated:C=>{Ke("automation_trigger_added",{automation_id:r,trigger_type:"webhook"}),R(C)}})]}),e.triggers.length===0&&!b?t.jsx("div",{className:"rounded-lg border border-dashed border-border px-4 py-6 text-center",children:t.jsxs("p",{className:"text-sm text-muted-foreground",children:[o("automations.automationDetail.whenShouldRun")," ",t.jsx("button",{type:"button",className:"text-foreground underline underline-offset-2 cursor-pointer hover:text-foreground/80 transition-colors",onClick:()=>v(!0),children:o("automations.automationDetail.addStarter")})," ",o("automations.automationDetail.toGetGoing")]})}):t.jsx("div",{className:"flex flex-col gap-2",children:e.triggers.map(C=>t.jsx(Xt,{trigger:C,automationId:r,connectionName:C.connection_id?x.get(C.connection_id):void 0},C.id))}),b&&t.jsxs("div",{className:"flex items-center gap-2.5 px-3 py-2.5 rounded-lg border border-border bg-background group",children:[t.jsx(Me,{size:14,className:"text-muted-foreground shrink-0"}),t.jsx("input",{type:"text",value:_,onChange:C=>D(C.target.value),onBlur:async()=>{const C=_.trim();if(!(!C||!Re(C)))try{await j.mutateAsync({automation_id:r,type:"cron",cron_expression:C}),Ke("automation_trigger_added",{automation_id:r,trigger_type:"cron"}),X.success(o("automations.automationDetail.starterAdded")),T(!1),D("")}catch{X.error(o("automations.automationDetail.failedToAddStarter"))}},onKeyDown:async C=>{const M=_.trim();C.key==="Enter"&&M&&Re(M)&&C.target.blur(),C.key==="Escape"&&(T(!1),D(""))},placeholder:"0 9 * * 1-5",className:"flex-1 text-sm font-mono bg-transparent outline-none placeholder:text-muted-foreground/40",autoFocus:!0}),_&&!Re(_)&&t.jsx("span",{className:"text-xs text-muted-foreground/60 shrink-0",children:o("automations.automationDetail.invalid")}),j.isPending&&t.jsx(Le,{className:"size-[13px] text-muted-foreground shrink-0"}),t.jsx("button",{type:"button",className:"shrink-0 p-0.5 text-muted-foreground opacity-0 group-hover:opacity-100 hover:text-foreground transition-opacity rounded-lg",onClick:()=>{T(!1),D("")},children:t.jsx(mt,{size:13})})]}),k&&t.jsx(w.Suspense,{fallback:t.jsxs("div",{className:"flex items-center gap-2 px-3 py-3 rounded-lg border border-border bg-background",children:[t.jsx(Le,{className:"size-[13px] text-muted-foreground"}),t.jsx("span",{className:"text-sm text-muted-foreground",children:o("automations.automationDetail.loadingConnections")})]}),children:t.jsx(Fa,{automationId:r,onDone:()=>A(!1)})}),t.jsx(Jt,{open:$!==null,onOpenChange:C=>{C||R(null)},url:$?.url??null,token:$?.token??null})]}),t.jsxs("div",{className:"flex flex-col gap-2.5",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("span",{className:"text-xs font-semibold text-muted-foreground/60",children:o("automations.automationDetail.instructions")}),t.jsxs(B,{variant:"outline",size:"sm",className:"gap-1.5",disabled:K||!p,onClick:J,children:[t.jsx(zt,{size:13}),o("automations.automationDetail.improve")]})]}),t.jsx(Zs,{tiptapDoc:p,setTiptapDoc:re,placeholder:o("automations.automationDetail.instructionsPlaceholder"),children:t.jsxs("div",{className:"rounded-xl border border-border min-h-[120px] flex flex-col",children:[t.jsx(Qs,{virtualMcpId:i||null,className:"max-h-[45vh]"}),t.jsx("div",{className:"@container/chat-bottom flex items-center justify-end gap-1.5 p-2.5",children:t.jsxs(Bs,{children:[t.jsx(Gs,{asChild:!0,children:t.jsxs(B,{type:"button",variant:"default",className:"gap-1.5",onClick:le,disabled:!i,children:[t.jsx(Xs,{size:16}),o("automations.automationDetail.test")]})}),t.jsx(Hs,{children:o("automations.automationDetail.testAutomation")})]})})]})})]}),t.jsxs(Vs,{open:N,onOpenChange:S,className:"flex flex-col gap-2.5",children:[t.jsxs(Us,{className:"group flex w-fit cursor-pointer items-center gap-1.5",children:[t.jsx("span",{className:"text-xs font-semibold text-muted-foreground/60",children:o("automations.automationDetail.advanced")}),t.jsx(rt,{size:14,className:"text-muted-foreground/60 transition-transform group-data-[state=open]:rotate-180"})]}),t.jsxs(Ws,{className:"flex flex-col gap-5 pt-0.5",children:[t.jsx(ua,{tier:E.watch("tier"),onTierChange:C=>E.setValue("tier",C,{shouldDirty:!0}),override:E.watch("modelOverride"),onOverrideChange:C=>E.setValue("modelOverride",C,{shouldDirty:!0})}),t.jsx(ga,{agentId:i||null,value:E.watch("tools"),onChange:C=>E.setValue("tools",C,{shouldDirty:!0})}),t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsx("span",{className:"text-xs font-semibold text-muted-foreground/60",children:o("automations.automationDetail.maxSteps")}),t.jsx(Nt,{type:"number",min:1,max:100,className:"w-40",placeholder:o("automations.automationDetail.maxStepsPlaceholder",{default:Va}),value:E.watch("maxAgentSteps")??"",onChange:C=>{const M=C.target.value.trim(),z=M===""?null:Number(M);E.setValue("maxAgentSteps",z===null||Number.isNaN(z)?null:z,{shouldDirty:!0})}})]})]})]})]})]})}function Ba(r){const e=q.c(55),{automation:s}=r,n=ee(),{update:o}=ve();let i;e[0]!==s.name?(i=t.jsx("h2",{className:"text-lg font-medium text-foreground",children:s.name}),e[0]=s.name,e[1]=i):i=e[1];let c;e[2]!==n?(c=n("automations.builtin.badge"),e[2]=n,e[3]=c):c=e[3];let a;e[4]!==c?(a=t.jsx(Kt,{variant:"muted",children:c}),e[4]=c,e[5]=a):a=e[5];let j;e[6]!==i||e[7]!==a?(j=t.jsxs("div",{className:"flex items-center gap-2",children:[i,a]}),e[6]=i,e[7]=a,e[8]=j):j=e[8];let d;e[9]!==s.id||e[10]!==o?(d=D=>o.mutate({id:s.id,active:D}),e[9]=s.id,e[10]=o,e[11]=d):d=e[11];let m;e[12]!==s.active||e[13]!==d||e[14]!==o.isPending?(m=t.jsx(ct,{checked:s.active,disabled:o.isPending,onCheckedChange:d,className:"cursor-pointer"}),e[12]=s.active,e[13]=d,e[14]=o.isPending,e[15]=m):m=e[15];let x;e[16]!==s.active||e[17]!==n?(x=s.active?n("automations.automationDetail.active"):n("automations.automationDetail.inactive"),e[16]=s.active,e[17]=n,e[18]=x):x=e[18];let f;e[19]!==x?(f=t.jsx("span",{className:"text-sm text-muted-foreground",children:x}),e[19]=x,e[20]=f):f=e[20];let g;e[21]!==m||e[22]!==f?(g=t.jsxs("div",{className:"flex items-center gap-2",children:[m,f]}),e[21]=m,e[22]=f,e[23]=g):g=e[23];let u;e[24]!==j||e[25]!==g?(u=t.jsxs("div",{className:"flex flex-col gap-1.5",children:[j,g]}),e[24]=j,e[25]=g,e[26]=u):u=e[26];let h;e[27]!==n?(h=n("automations.automationDetail.starter"),e[27]=n,e[28]=h):h=e[28];let p;e[29]!==h?(p=t.jsx("span",{className:"text-xs font-semibold text-muted-foreground/60",children:h}),e[29]=h,e[30]=p):p=e[30];let l;if(e[31]!==s.id||e[32]!==s.triggers){let D;e[34]!==s.id?(D=k=>t.jsx(Xt,{trigger:k,automationId:s.id,readOnly:!0},k.id),e[34]=s.id,e[35]=D):D=e[35],l=s.triggers.map(D),e[31]=s.id,e[32]=s.triggers,e[33]=l}else l=e[33];let y;e[36]!==p||e[37]!==l?(y=t.jsxs("div",{className:"flex flex-col gap-2.5",children:[p,l]}),e[36]=p,e[37]=l,e[38]=y):y=e[38];let v;e[39]!==n?(v=n("automations.automationDetail.instructions"),e[39]=n,e[40]=v):v=e[40];let N;e[41]!==v?(N=t.jsx("span",{className:"text-xs font-semibold text-muted-foreground/60",children:v}),e[41]=v,e[42]=N):N=e[42];let S;e[43]!==s.system_key||e[44]!==n?(S=s.system_key==="implementer"?n("automations.builtin.implementerDescription"):s.system_key==="reviewer"?n("automations.builtin.reviewerDescription"):s.system_key==="linked_chats"?n("automations.builtin.linkedChatsDescription"):s.system_key==="pr_merged"?n("automations.builtin.prMergedDescription"):s.system_key==="chat_pr"?n("automations.builtin.chatPrDescription"):s.system_key==="agent_mentions"?n("automations.builtin.mentionsDescription"):n("automations.builtin.description"),e[43]=s.system_key,e[44]=n,e[45]=S):S=e[45];let b;e[46]!==S?(b=t.jsx("p",{className:"text-sm text-muted-foreground",children:S}),e[46]=S,e[47]=b):b=e[47];let T;e[48]!==N||e[49]!==b?(T=t.jsxs("div",{className:"flex flex-col gap-2.5",children:[N,b]}),e[48]=N,e[49]=b,e[50]=T):T=e[50];let _;return e[51]!==u||e[52]!==y||e[53]!==T?(_=t.jsxs("div",{className:"flex flex-col gap-8",children:[u,y,T]}),e[51]=u,e[52]=y,e[53]=T,e[54]=_):_=e[54],_}const Yt=[{key:"24h",labelKey:"mainPanelTabs.automationTab.last24hours",ms:1440*60*1e3},{key:"7d",labelKey:"mainPanelTabs.automationTab.last7days",ms:10080*60*1e3},{key:"30d",labelKey:"mainPanelTabs.automationTab.last30days",ms:720*60*60*1e3}];function Zt(r){const e=Yt.find(n=>n.key===r).ms,s=Date.now();return{startDate:new Date(s-e).toISOString(),endDate:new Date(s).toISOString()}}function Ga(r){const e=q.c(16),{automationId:s,triggerIds:n}=r,o=ee(),[i,c]=w.useState("30d"),[a,j]=w.useState(Ha);let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=p=>{const l=p;c(l),j(Zt(l))},e[0]=d):d=e[0];let m;e[1]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx(he,{className:"w-44",children:t.jsx(je,{})}),e[1]=m):m=e[1];let x;e[2]!==o?(x=Yt.map(p=>t.jsx(be,{value:p.key,children:o(p.labelKey)},p.key)),e[2]=o,e[3]=x):x=e[3];let f;e[4]!==x?(f=t.jsx(ye,{children:x}),e[4]=x,e[5]=f):f=e[5];let g;e[6]!==f||e[7]!==i?(g=t.jsx("div",{className:"flex items-center justify-end",children:t.jsxs(ge,{value:i,onValueChange:d,children:[m,f]})}),e[6]=f,e[7]=i,e[8]=g):g=e[8];let u;e[9]!==s||e[10]!==a||e[11]!==n?(u=t.jsx(ra,{automationId:s,triggerIds:n,range:a}),e[9]=s,e[10]=a,e[11]=n,e[12]=u):u=e[12];let h;return e[13]!==g||e[14]!==u?(h=t.jsxs("div",{className:"flex flex-col gap-5",children:[g,u]}),e[13]=g,e[14]=u,e[15]=h):h=e[15],h}function Ha(){return Zt("30d")}function Ja(r){const e=q.c(5),{tabId:s}=r;let n;e[0]!==s?(n=ds(s),e[0]=s,e[1]=n):n=e[1];const o=n;if(!o)return null;let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(Qe,{}),e[2]=i):i=e[2];let c;return e[3]!==o.id?(c=t.jsx(w.Suspense,{fallback:i,children:t.jsx(Xa,{id:o.id})}),e[3]=o.id,e[4]=c):c=e[4],c}function Xa(r){const e=q.c(41),{id:s}=r,n=ee(),{openPanel:o}=ca(),{data:i,isLoading:c}=Ks(s),[a,j]=w.useState("settings");let d;e[0]!==o?(d=()=>o("automations"),e[0]=o,e[1]=d):d=e[1];const m=d;if(c){let k;return e[2]===Symbol.for("react.memo_cache_sentinel")?(k=t.jsx(Qe,{}),e[2]=k):k=e[2],k}if(!i){let k;e[3]!==n?(k=n("mainPanelTabs.automationTab.automationNotFound"),e[3]=n,e[4]=k):k=e[4];let A;return e[5]!==k?(A=t.jsx("div",{className:"flex h-full w-full items-center justify-center text-sm text-muted-foreground",children:k}),e[5]=k,e[6]=A):A=e[6],A}let x;e[7]!==i.triggers?(x=i.triggers.map(Ya),e[7]=i.triggers,e[8]=x):x=e[8];const f=x;let g;e[9]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx(Vt,{size:14}),e[9]=g):g=e[9];let u;e[10]!==n?(u=n("mainPanelTabs.automationTab.backToList"),e[10]=n,e[11]=u):u=e[11];let h;e[12]!==m||e[13]!==u?(h=t.jsxs(B,{variant:"ghost",size:"sm",onClick:m,children:[g,u]}),e[12]=m,e[13]=u,e[14]=h):h=e[14];let p;e[15]!==n?(p=n("mainPanelTabs.automationTab.settings"),e[15]=n,e[16]=p):p=e[16];let l;e[17]!==p?(l={id:"settings",label:p},e[17]=p,e[18]=l):l=e[18];let y;e[19]!==n?(y=n("mainPanelTabs.automationTab.runs"),e[19]=n,e[20]=y):y=e[20];let v;e[21]!==y?(v={id:"runs",label:y},e[21]=y,e[22]=v):v=e[22];let N;e[23]!==l||e[24]!==v?(N=[l,v],e[23]=l,e[24]=v,e[25]=N):N=e[25];let S;e[26]===Symbol.for("react.memo_cache_sentinel")?(S=k=>j(k),e[26]=S):S=e[26];let b;e[27]!==N||e[28]!==a?(b=t.jsx(la,{placement:"page",tabs:N,activeTab:a,onTabChange:S}),e[27]=N,e[28]=a,e[29]=b):b=e[29];let T;e[30]!==b||e[31]!==h?(T=t.jsxs("div",{className:"flex items-center justify-between pb-4 shrink-0",children:[h,b]}),e[30]=b,e[31]=h,e[32]=T):T=e[32];let _;e[33]!==i||e[34]!==s||e[35]!==a||e[36]!==f?(_=a==="settings"?i.system_key?t.jsx(Ba,{automation:i}):t.jsx(Wa,{automationId:s,automation:i}):t.jsx(w.Suspense,{fallback:t.jsx(Qe,{}),children:t.jsx(Ga,{automationId:s,triggerIds:f})}),e[33]=i,e[34]=s,e[35]=a,e[36]=f,e[37]=_):_=e[37];let D;return e[38]!==T||e[39]!==_?(D=t.jsx(Xe,{children:t.jsx(Xe.Content,{children:t.jsxs(Xe.Container,{children:[T,_]})})}),e[38]=T,e[39]=_,e[40]=D):D=e[40],D}function Ya(r){return r.id}function Za(){const r=q.c(3);let e;r[0]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},r[0]=e):e=r[0];const{automationId:s}=ms(e);let n;return r[1]!==s?(n=s?t.jsx(Ja,{tabId:`automation:${s}`}):null,r[1]=s,r[2]=n):n=r[2],n}function fi(){const r=q.c(1);let e;return r[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(us.Content,{children:t.jsx(Za,{})}),r[0]=e):e=r[0],e}export{fi as default};
|
|
19
|
+
});`:"",_=g==="curl"?b:T;let D;e[6]!==j?(D=t.jsx(at,{children:j}),e[6]=j,e[7]=D):D=e[7];let k;e[8]!==d?(k=t.jsx(ot,{children:d}),e[8]=d,e[9]=k):k=e[9];let A;e[10]!==D||e[11]!==k?(A=t.jsxs(st,{children:[D,k]}),e[10]=D,e[11]=k,e[12]=A):A=e[12];let $;e[13]!==h||e[14]!==x||e[15]!==v||e[16]!==S||e[17]!==g||e[18]!==_||e[19]!==m||e[20]!==i||e[21]!==l||e[22]!==o?($=o&&i?t.jsxs("div",{className:"flex flex-col gap-3 min-w-0",children:[t.jsxs("div",{className:"flex flex-col gap-1",children:[t.jsx("span",{className:"text-xs font-semibold text-muted-foreground",children:m("automations.webhookSecretDialog.url")}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("code",{className:"flex-1 min-w-0 text-xs font-mono bg-muted rounded-md px-2 py-1.5 truncate",children:S}),t.jsxs(B,{size:"sm",variant:"outline",onClick:()=>v(S,"url"),children:[t.jsx(Ye,{size:13}),m(x==="url"?"automations.webhookSecretDialog.copied":"automations.webhookSecretDialog.copy")]})]})]}),t.jsxs("div",{className:"flex flex-col gap-1",children:[t.jsx("span",{className:"text-xs font-semibold text-muted-foreground",children:m("automations.webhookSecretDialog.tokenLabel")}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("code",{className:"flex-1 min-w-0 text-xs font-mono bg-muted rounded-md px-2 py-1.5 truncate",children:i}),t.jsxs(B,{size:"sm",variant:"outline",onClick:()=>v(i,"token"),children:[t.jsx(Ye,{size:13}),m(x==="token"?"automations.webhookSecretDialog.copied":"automations.webhookSecretDialog.copy")]})]})]}),t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsx("span",{className:"text-xs font-semibold text-muted-foreground",children:m("automations.webhookSecretDialog.snippet")}),t.jsxs("div",{className:"flex items-center justify-between gap-3",children:[t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx(oa,{value:g,onValueChange:W=>u(W),children:t.jsxs(na,{className:"h-8 p-[2px]",children:[t.jsx(Dt,{value:"curl",className:"h-7 px-2.5 text-xs",children:"curl"}),t.jsx(Dt,{value:"fetch",className:"h-7 px-2.5 text-xs",children:"fetch"})]})}),t.jsxs("label",{htmlFor:l,className:"flex items-center gap-1.5 text-xs text-muted-foreground cursor-pointer select-none",children:[t.jsx(Ft,{id:l,checked:h==="url",onCheckedChange:W=>p(W?"url":"header")}),m("automations.webhookSecretDialog.tokenInUrl")]})]}),t.jsxs(B,{size:"sm",variant:"outline",onClick:()=>v(_,"example"),children:[t.jsx(Ye,{size:13}),m(x==="example"?"automations.webhookSecretDialog.copied":"automations.webhookSecretDialog.copy")]})]}),t.jsx("div",{className:"rounded-md border overflow-hidden min-w-0",children:t.jsx(ia,{code:_,language:g==="curl"?"shell":"typescript",readOnly:!0,disableDiagnostics:!0,height:180})})]})]}):null,e[13]=h,e[14]=x,e[15]=v,e[16]=S,e[17]=g,e[18]=_,e[19]=m,e[20]=i,e[21]=l,e[22]=o,e[23]=$):$=e[23];let R;e[24]!==n?(R=()=>n(!1),e[24]=n,e[25]=R):R=e[25];let K;e[26]!==m?(K=m("automations.webhookSecretDialog.done"),e[26]=m,e[27]=K):K=e[27];let F;e[28]!==K||e[29]!==R?(F=t.jsx(nt,{children:t.jsx(B,{onClick:R,children:K})}),e[28]=K,e[29]=R,e[30]=F):F=e[30];let Y;e[31]!==F||e[32]!==A||e[33]!==$?(Y=t.jsxs(tt,{className:"max-w-lg",children:[A,$,F]}),e[31]=F,e[32]=A,e[33]=$,e[34]=Y):Y=e[34];let H;return e[35]!==n||e[36]!==s||e[37]!==Y?(H=t.jsx(et,{open:s,onOpenChange:n,children:Y}),e[35]=n,e[36]=s,e[37]=Y,e[38]=H):H=e[38],H}async function Ea(r){const{cronExpression:e,automationId:s,oldTriggerId:n,addTrigger:o,removeTrigger:i}=r,c=await o({automation_id:s,type:"cron",cron_expression:e});try{await i({trigger_id:n,automation_id:s})}catch(a){throw await i({trigger_id:c.id,automation_id:s}).catch(()=>{}),a}}function Xt(r){const e=q.c(153),{trigger:s,automationId:n,connectionName:o,readOnly:i}=r,c=i===void 0?!1:i,a=ee(),{triggerAdd:j,triggerRemove:d,triggerRotateToken:m}=ve(),[x,f]=w.useState(!1),[g,u]=w.useState(!1),[h,p]=w.useState(null);let l;e[0]!==s.cron_expression?(l=s.cron_expression?ka(s.cron_expression):null,e[0]=s.cron_expression,e[1]=l):l=e[1];const y=l,[v,N]=w.useState(y?.count??1),[S,b]=w.useState(!1),[T,_]=w.useState(s.cron_expression??""),D=d.isPending||j.isPending||m.isPending,k=s.type==="cron",A=s.type==="webhook",$=s.type==="board_column_transition";let R;e[2]!==a||e[3]!==s.type?(R=s.type==="board_pr_ready"?a("automations.triggerCard.prReady"):s.type==="linked_chat_run"?a("automations.triggerCard.linkedChatRun"):s.type==="board_pr_merged"?a("automations.triggerCard.prMerged"):s.type==="chat_pr_opened"?a("automations.triggerCard.chatPrOpened"):s.type==="card_mention"?a("automations.triggerCard.cardMention"):null,e[2]=a,e[3]=s.type,e[4]=R):R=e[4];const K=R,F=s.type==="jira_transition";let Y;e[5]!==n||e[6]!==d||e[7]!==a||e[8]!==s.id?(Y=async()=>{try{await d.mutateAsync({trigger_id:s.id,automation_id:n}),X.success(a("automations.triggerCard.starterRemoved"))}catch{X.error(a("automations.triggerCard.failedToRemoveStarter"))}f(!1)},e[5]=n,e[6]=d,e[7]=a,e[8]=s.id,e[9]=Y):Y=e[9];const H=Y;let W;e[10]!==j||e[11]!==n||e[12]!==d||e[13]!==s.id?(W=L=>Ea({cronExpression:L,automationId:n,oldTriggerId:s.id,addTrigger:Fe=>j.mutateAsync(Fe),removeTrigger:Fe=>d.mutateAsync(Fe)}),e[10]=j,e[11]=n,e[12]=d,e[13]=s.id,e[14]=W):W=e[14];const G=W;let J;e[15]!==T||e[16]!==G||e[17]!==a||e[18]!==s.cron_expression?(J=async()=>{const L=T.trim();if(!L||!Re(L)||L===s.cron_expression){b(!1),_(s.cron_expression??"");return}try{await G(L),b(!1)}catch{X.error(a("automations.triggerCard.failedToUpdateStarter")),_(s.cron_expression??""),b(!1)}},e[15]=T,e[16]=G,e[17]=a,e[18]=s.cron_expression,e[19]=J):J=e[19];const V=J;let U;e[20]!==n||e[21]!==m||e[22]!==a||e[23]!==s.id?(U=async()=>{u(!1);try{const L=await m.mutateAsync({trigger_id:s.id,automation_id:n});p({url:L.url,token:L.token})}catch{X.error(a("automations.triggerCard.failedToRotateToken"))}},e[20]=n,e[21]=m,e[22]=a,e[23]=s.id,e[24]=U):U=e[24];const E=U;let oe;e[25]!==y||e[26]!==G||e[27]!==a||e[28]!==s.cron_expression?(oe=async L=>{if(!y)return;const Fe=y.unit==="minutes"?5:1,Je=Math.max(Fe,L);Je!==L&&N(Je);const ft=Sa(Je,y.unit);if(ft!==s.cron_expression)try{await G(ft)}catch{X.error(a("automations.triggerCard.failedToUpdateStarter")),N(y.count)}},e[25]=y,e[26]=G,e[27]=a,e[28]=s.cron_expression,e[29]=oe):oe=e[29];const ne=oe;let Z;e[30]!==$||e[31]!==k||e[32]!==F||e[33]!==A||e[34]!==K?(Z=k?t.jsx(Me,{size:14,className:"text-muted-foreground shrink-0"}):F?t.jsx(Ut,{size:14,className:"shrink-0"}):$||K?t.jsx(Et,{size:14,className:"text-muted-foreground shrink-0"}):A?t.jsx(it,{size:14,className:"text-muted-foreground shrink-0"}):t.jsx(ut,{size:14,className:"text-muted-foreground shrink-0"}),e[30]=$,e[31]=k,e[32]=F,e[33]=A,e[34]=K,e[35]=Z):Z=e[35];let ie;e[36]!==o||e[37]!==v||e[38]!==T||e[39]!==ne||e[40]!==V||e[41]!==y||e[42]!==$||e[43]!==k||e[44]!==S||e[45]!==F||e[46]!==D||e[47]!==A||e[48]!==K||e[49]!==a||e[50]!==s.column_key||e[51]!==s.cron_expression||e[52]!==s.event_type||e[53]!==s.from||e[54]!==s.params?(ie=y&&k?t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"text-sm text-muted-foreground",children:a("automations.triggerCard.every")}),t.jsx("input",{type:"number",min:y.unit==="minutes"?5:1,value:v,onChange:L=>N(parseInt(L.target.value)||1),onBlur:()=>ne(v),onKeyDown:L=>{L.key==="Enter"&&L.target.blur(),L.key==="Escape"&&N(y.count)},disabled:D,className:"w-12 text-center text-sm h-7 border border-border rounded-md bg-background px-1 focus-ring"}),t.jsx("span",{className:"text-sm",children:Ta(y.unit,v)})]}):k&&S?t.jsxs(t.Fragment,{children:[t.jsx("input",{type:"text",value:T,onChange:L=>_(L.target.value),onBlur:V,onKeyDown:L=>{L.key==="Enter"&&L.target.blur(),L.key==="Escape"&&(b(!1),_(s.cron_expression??""))},className:"flex-1 text-sm font-mono bg-transparent outline-none",autoFocus:!0}),T&&!Re(T)&&t.jsx("span",{className:"text-xs text-muted-foreground/60 shrink-0",children:a("automations.triggerCard.invalid")})]}):t.jsxs("div",{className:"flex flex-col gap-0.5 flex-1 min-w-0",children:[t.jsx("span",{className:"text-sm font-mono text-xs text-muted-foreground truncate",children:k?Na(s.cron_expression??""):$?a("automations.triggerCard.cardEntersColumn",{lane:We(s.column_key??"",a).label}):K||(F?a("automations.triggerCard.issueEntersJiraStatus",{status:s.column_key??""}):A?a("automations.triggerCard.webhookPostToFire"):`${s.event_type}${o?` · ${o}`:""}`)}),$&&t.jsx(Oa,{from:s.from}),F&&t.jsx(Ka,{from:s.from}),!k&&!A&&!$&&!K&&!F&&s.params&&Object.keys(s.params).length>0&&t.jsx("span",{className:"text-xs text-muted-foreground/60 truncate",children:Object.entries(s.params).map(za).join(", ")})]}),e[36]=o,e[37]=v,e[38]=T,e[39]=ne,e[40]=V,e[41]=y,e[42]=$,e[43]=k,e[44]=S,e[45]=F,e[46]=D,e[47]=A,e[48]=K,e[49]=a,e[50]=s.column_key,e[51]=s.cron_expression,e[52]=s.event_type,e[53]=s.from,e[54]=s.params,e[55]=ie):ie=e[55];let ue;e[56]!==D?(ue=D&&t.jsx(Le,{className:"size-[13px] text-muted-foreground"}),e[56]=D,e[57]=ue):ue=e[57];let me;e[58]!==y||e[59]!==k||e[60]!==S||e[61]!==a||e[62]!==s.cron_expression?(me=k&&!y&&!S&&t.jsx(B,{variant:"ghost",size:"icon-sm",className:"opacity-0 group-hover:opacity-100 transition-opacity","aria-label":a("automations.triggerCard.editSchedule"),onClick:()=>{_(s.cron_expression??""),b(!0)},children:t.jsx(zt,{size:13,className:"text-muted-foreground"})}),e[58]=y,e[59]=k,e[60]=S,e[61]=a,e[62]=s.cron_expression,e[63]=me):me=e[63];let te;e[64]!==A||e[65]!==a?(te=A&&t.jsx(B,{variant:"ghost",size:"icon-sm",className:"opacity-0 group-hover:opacity-100 transition-opacity",title:a("automations.triggerCard.rotateToken"),"aria-label":a("automations.triggerCard.rotateToken"),onClick:()=>u(!0),children:t.jsx(rs,{size:13,className:"text-muted-foreground"})}),e[64]=A,e[65]=a,e[66]=te):te=e[66];let fe;e[67]!==c||e[68]!==a?(fe=!c&&t.jsx(B,{variant:"ghost",size:"icon-sm",className:"opacity-0 group-hover:opacity-100 transition-opacity","aria-label":a("automations.triggerCard.removeStarter"),onClick:()=>f(!0),children:t.jsx(mt,{size:13,className:"text-muted-foreground"})}),e[67]=c,e[68]=a,e[69]=fe):fe=e[69];let se;e[70]!==ue||e[71]!==me||e[72]!==te||e[73]!==fe?(se=t.jsxs("div",{className:"ml-auto flex items-center gap-1",children:[ue,me,te,fe]}),e[70]=ue,e[71]=me,e[72]=te,e[73]=fe,e[74]=se):se=e[74];let re;e[75]!==ie||e[76]!==se||e[77]!==Z?(re=t.jsxs("div",{className:"flex items-center gap-2.5 px-3 py-2.5 surface group",children:[Z,ie,se]}),e[75]=ie,e[76]=se,e[77]=Z,e[78]=re):re=e[78];let le;e[79]!==a?(le=a("automations.triggerCard.removeStarter"),e[79]=a,e[80]=le):le=e[80];let C;e[81]!==le?(C=t.jsx(pt,{children:le}),e[81]=le,e[82]=C):C=e[82];let M;e[83]!==a?(M=a("automations.triggerCard.confirmRemoveStarter"),e[83]=a,e[84]=M):M=e[84];let O;e[85]!==M?(O=t.jsx(xt,{children:M}),e[85]=M,e[86]=O):O=e[86];let pe;e[87]!==C||e[88]!==O?(pe=t.jsxs(gt,{children:[C,O]}),e[87]=C,e[88]=O,e[89]=pe):pe=e[89];let ae;e[90]!==a?(ae=a("automations.triggerCard.cancel"),e[90]=a,e[91]=ae):ae=e[91];let ce;e[92]!==ae?(ce=t.jsx(ht,{children:ae}),e[92]=ae,e[93]=ce):ce=e[93];let de;e[94]!==a?(de=a("automations.triggerCard.remove"),e[94]=a,e[95]=de):de=e[95];let I;e[96]!==H||e[97]!==de?(I=t.jsx(jt,{onClick:H,variant:"destructive",children:de}),e[96]=H,e[97]=de,e[98]=I):I=e[98];let z;e[99]!==ce||e[100]!==I?(z=t.jsxs(yt,{children:[ce,I]}),e[99]=ce,e[100]=I,e[101]=z):z=e[101];let Q;e[102]!==pe||e[103]!==z?(Q=t.jsxs(bt,{children:[pe,z]}),e[102]=pe,e[103]=z,e[104]=Q):Q=e[104];let P;e[105]!==x||e[106]!==Q?(P=t.jsx(vt,{open:x,onOpenChange:f,children:Q}),e[105]=x,e[106]=Q,e[107]=P):P=e[107];let xe;e[108]!==a?(xe=a("automations.triggerCard.rotateWebhookToken"),e[108]=a,e[109]=xe):xe=e[109];let Ce;e[110]!==xe?(Ce=t.jsx(pt,{children:xe}),e[110]=xe,e[111]=Ce):Ce=e[111];let Ne;e[112]!==a?(Ne=a("automations.triggerCard.rotateWebhookTokenDescription"),e[112]=a,e[113]=Ne):Ne=e[113];let Se;e[114]!==Ne?(Se=t.jsx(xt,{children:Ne}),e[114]=Ne,e[115]=Se):Se=e[115];let ke;e[116]!==Ce||e[117]!==Se?(ke=t.jsxs(gt,{children:[Ce,Se]}),e[116]=Ce,e[117]=Se,e[118]=ke):ke=e[118];let Te;e[119]!==a?(Te=a("automations.triggerCard.cancel"),e[119]=a,e[120]=Te):Te=e[120];let we;e[121]!==Te?(we=t.jsx(ht,{children:Te}),e[121]=Te,e[122]=we):we=e[122];let _e;e[123]!==a?(_e=a("automations.triggerCard.rotate"),e[123]=a,e[124]=_e):_e=e[124];let De;e[125]!==E||e[126]!==_e?(De=t.jsx(jt,{onClick:E,children:_e}),e[125]=E,e[126]=_e,e[127]=De):De=e[127];let Ie;e[128]!==we||e[129]!==De?(Ie=t.jsxs(yt,{children:[we,De]}),e[128]=we,e[129]=De,e[130]=Ie):Ie=e[130];let Ae;e[131]!==ke||e[132]!==Ie?(Ae=t.jsxs(bt,{children:[ke,Ie]}),e[131]=ke,e[132]=Ie,e[133]=Ae):Ae=e[133];let Pe;e[134]!==g||e[135]!==Ae?(Pe=t.jsx(vt,{open:g,onOpenChange:u,children:Ae}),e[134]=g,e[135]=Ae,e[136]=Pe):Pe=e[136];const Be=h!==null;let Ve;e[137]===Symbol.for("react.memo_cache_sentinel")?(Ve=L=>{L||p(null)},e[137]=Ve):Ve=e[137];const Ge=h?.url??null,He=h?.token??null;let $e;e[138]!==a?($e=a("automations.triggerCard.newWebhookToken"),e[138]=a,e[139]=$e):$e=e[139];let Ee;e[140]!==a?(Ee=a("automations.triggerCard.newWebhookTokenDescription"),e[140]=a,e[141]=Ee):Ee=e[141];let ze;e[142]!==Be||e[143]!==Ge||e[144]!==He||e[145]!==$e||e[146]!==Ee?(ze=t.jsx(Jt,{open:Be,onOpenChange:Ve,url:Ge,token:He,title:$e,description:Ee}),e[142]=Be,e[143]=Ge,e[144]=He,e[145]=$e,e[146]=Ee,e[147]=ze):ze=e[147];let Ue;return e[148]!==re||e[149]!==P||e[150]!==Pe||e[151]!==ze?(Ue=t.jsxs(t.Fragment,{children:[re,P,Pe,ze]}),e[148]=re,e[149]=P,e[150]=Pe,e[151]=ze,e[152]=Ue):Ue=e[152],Ue}function za(r){const[e,s]=r;return`${e}: ${s}`}function Oa(r){const e=q.c(10),{from:s}=r,n=ee();let o;e[0]!==s||e[1]!==n?(o=!s||s.kind==="any"?null:s.kind==="earlier"?n("automations.triggerCard.fromEarlier"):s.kind==="later"?n("automations.triggerCard.fromLater"):s.kind==="statuses"?n("automations.triggerCard.fromColumns",{columns:s.statuses.map(m=>We(m,n).label).join(", ")}):null,e[0]=s,e[1]=n,e[2]=o):o=e[2];const i=o;let c;e[3]!==n?(c=n("automations.triggerCard.unownedOnly"),e[3]=n,e[4]=c):c=e[4];let a;e[5]!==i||e[6]!==c?(a=[i,c].filter(Boolean),e[5]=i,e[6]=c,e[7]=a):a=e[7];const j=a.join(" · ");let d;return e[8]!==j?(d=t.jsx("span",{className:"text-xs text-muted-foreground/60 truncate",children:j}),e[8]=j,e[9]=d):d=e[9],d}function Ka(r){const e=q.c(6),{from:s}=r,n=ee();if(!s||s.kind==="any")return null;let o;e[0]!==s.kind||e[1]!==s.statuses||e[2]!==n?(o=s.kind==="earlier"?n("automations.triggerCard.fromEarlier"):s.kind==="later"?n("automations.triggerCard.fromLater"):s.kind==="statuses"?n("automations.triggerCard.fromColumns",{columns:s.statuses.join(", ")}):null,e[0]=s.kind,e[1]=s.statuses,e[2]=n,e[3]=o):o=e[3];let i;return e[4]!==o?(i=t.jsx("span",{className:"text-xs text-muted-foreground/60 truncate",children:o}),e[4]=o,e[5]=i):i=e[5],i}function Fa(r){const e=q.c(70),{automationId:s,onDone:n}=r,o=ee();let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i={binding:"TRIGGER"},e[0]=i):i=e[0];const c=dt(i),[a,j]=w.useState(),[d,m]=w.useState();let x;e[1]===Symbol.for("react.memo_cache_sentinel")?(x={},e[1]=x):x=e[1];const[f,g]=w.useState(x),{triggerAdd:u}=ve(),{data:h,isLoading:p}=Os(a);let l,y,v,N,S,b;if(e[2]!==u||e[3]!==s||e[4]!==a||e[5]!==d||e[6]!==p||e[7]!==n||e[8]!==f||e[9]!==o||e[10]!==c||e[11]!==h){const D=h?.find(U=>U.type===d);let k;e[18]!==u||e[19]!==s||e[20]!==a||e[21]!==d||e[22]!==n||e[23]!==f||e[24]!==o?(k=async()=>{if(!(!a||!d))try{await u.mutateAsync({automation_id:s,type:"event",event_type:d,connection_id:a,params:f}),Ke("automation_trigger_added",{automation_id:s,trigger_type:"event",connection_id:a,event_type:d}),X.success(o("automations.eventTriggerForm.successAdded")),n()}catch{X.error(o("automations.eventTriggerForm.errorFailed"))}},e[18]=u,e[19]=s,e[20]=a,e[21]=d,e[22]=n,e[23]=f,e[24]=o,e[25]=k):k=e[25],l=k,y="flex flex-col gap-3 px-3 py-3 surface";let A;e[26]===Symbol.for("react.memo_cache_sentinel")?(A=t.jsx(ut,{size:14,className:"text-muted-foreground shrink-0"}),e[26]=A):A=e[26];let $;e[27]!==o?($=o("automations.eventTriggerForm.title"),e[27]=o,e[28]=$):$=e[28];let R;e[29]!==$?(R=t.jsx("span",{className:"text-sm font-medium",children:$}),e[29]=$,e[30]=R):R=e[30];let K;e[31]===Symbol.for("react.memo_cache_sentinel")?(K=t.jsx(mt,{size:13}),e[31]=K):K=e[31];let F;e[32]!==n?(F=t.jsx("button",{type:"button",className:"ml-auto shrink-0 p-0.5 text-muted-foreground hover:text-foreground rounded-lg",onClick:n,children:K}),e[32]=n,e[33]=F):F=e[33],e[34]!==R||e[35]!==F?(v=t.jsxs("div",{className:"flex items-center gap-2",children:[A,R,F]}),e[34]=R,e[35]=F,e[36]=v):v=e[36];const Y=a??"";let H;e[37]===Symbol.for("react.memo_cache_sentinel")?(H=U=>{j(U),m(void 0),g({})},e[37]=H):H=e[37];let W;e[38]!==o?(W=o("automations.eventTriggerForm.selectConnectionPlaceholder"),e[38]=o,e[39]=W):W=e[39];let G;e[40]!==W?(G=t.jsx(he,{className:"w-full",children:t.jsx(je,{placeholder:W})}),e[40]=W,e[41]=G):G=e[41];let J;e[42]!==o||e[43]!==c?(J=c.length===0?t.jsx("div",{className:"px-2 py-3 text-center text-xs text-muted-foreground",children:o("automations.eventTriggerForm.noConnectionsWithTrigger")}):c.map(La),e[42]=o,e[43]=c,e[44]=J):J=e[44];let V;e[45]!==J?(V=t.jsx(ye,{children:J}),e[45]=J,e[46]=V):V=e[46],e[47]!==Y||e[48]!==G||e[49]!==V?(N=t.jsxs(ge,{value:Y,onValueChange:H,children:[G,V]}),e[47]=Y,e[48]=G,e[49]=V,e[50]=N):N=e[50],e[51]!==a||e[52]!==d||e[53]!==p||e[54]!==o||e[55]!==h?(S=a&&t.jsxs(ge,{value:d??"",onValueChange:U=>{m(U),g({})},children:[t.jsx(he,{className:"w-full",children:p?t.jsxs("span",{className:"flex items-center gap-2 text-muted-foreground",children:[t.jsx(Le,{className:"size-[13px]"}),o("automations.eventTriggerForm.loadingEvents")]}):t.jsx(je,{placeholder:o("automations.eventTriggerForm.selectEventTypePlaceholder"),children:d??o("automations.eventTriggerForm.selectEventTypePlaceholder")})}),t.jsx(ye,{children:h?.map(Ra)})]}),e[51]=a,e[52]=d,e[53]=p,e[54]=o,e[55]=h,e[56]=S):S=e[56],b=D?.paramsSchema&&Object.keys(D.paramsSchema).length>0&&t.jsx("div",{className:"flex flex-col gap-2",children:Object.entries(D.paramsSchema).map(U=>{const[E,oe]=U;return t.jsxs("div",{className:"flex flex-col gap-1",children:[t.jsxs("label",{className:"text-xs text-muted-foreground",children:[E,oe.description&&t.jsxs("span",{className:"text-muted-foreground/60",children:[" ","— ",oe.description]})]}),oe.enum?t.jsxs(ge,{value:f[E]??"",onValueChange:ne=>g(Z=>({...Z,[E]:ne})),children:[t.jsx(he,{className:"w-full",children:t.jsx(je,{placeholder:o("automations.eventTriggerForm.selectParamPlaceholder",{key:E})})}),t.jsx(ye,{children:oe.enum.map(Ma)})]}):t.jsx("input",{type:"text",value:f[E]??"",onChange:ne=>g(Z=>({...Z,[E]:ne.target.value})),placeholder:oe.description??E,className:"text-sm border border-border rounded-md bg-background px-2 py-1.5 focus-ring"})]},E)})}),e[2]=u,e[3]=s,e[4]=a,e[5]=d,e[6]=p,e[7]=n,e[8]=f,e[9]=o,e[10]=c,e[11]=h,e[12]=l,e[13]=y,e[14]=v,e[15]=N,e[16]=S,e[17]=b}else l=e[12],y=e[13],v=e[14],N=e[15],S=e[16],b=e[17];let T;e[57]!==u||e[58]!==a||e[59]!==d||e[60]!==l||e[61]!==o?(T=a&&d&&t.jsx(B,{size:"sm",onClick:l,disabled:u.isPending,children:u.isPending?t.jsx(Le,{className:"size-[13px]"}):o("automations.eventTriggerForm.addTriggerButton")}),e[57]=u,e[58]=a,e[59]=d,e[60]=l,e[61]=o,e[62]=T):T=e[62];let _;return e[63]!==y||e[64]!==v||e[65]!==N||e[66]!==S||e[67]!==b||e[68]!==T?(_=t.jsxs("div",{className:y,children:[v,N,S,b,T]}),e[63]=y,e[64]=v,e[65]=N,e[66]=S,e[67]=b,e[68]=T,e[69]=_):_=e[69],_}function Ma(r){return t.jsx(be,{value:r,children:r},r)}function Ra(r){return t.jsx(be,{value:r.type,children:t.jsxs("div",{className:"flex flex-col",children:[t.jsx("span",{children:r.type}),t.jsx("span",{className:"text-xs text-muted-foreground",children:r.description})]})},r.type)}function La(r){return t.jsx(be,{value:r.id,children:r.title},r.id)}const Va=30;function Ua(r,e){switch(e.type){case"accumulate":{const s=r??{start:e.now,fields:new Set,saveCount:0},n=new Set(s.fields);for(const o of e.fields)n.add(o);return{...s,fields:n,saveCount:s.saveCount+1}}case"reset":return null}}function Wa({automationId:r,automation:e,onBack:s,onDelete:n}){const o=ee(),i=e.virtual_mcp_id,{org:c}=$t(),{update:a,triggerAdd:j,run:d}=ve(),m=dt(),x=new Map(m.map(C=>[C.id,C.title])),{openTask:f}=Fs(),{openSidePanel:g}=Js(),{sendMessage:u}=Ms(),h=e.messages?.[0]?.metadata?.tiptapDoc??void 0,[p,l]=w.useState(h),[y,v]=w.useState(!1),[N,S]=w.useState(!1),[b,T]=w.useState(!1),[_,D]=w.useState(""),[k,A]=w.useState(!1),[$,R]=w.useState(null),[K,F]=w.useState(!1),[Y,H]=w.useState(!1),[W,G]=w.useState(!1),J=async()=>{if(K)return;const M=Rs(p).filter(O=>O.type==="text").map(O=>O.text).join(`
|
|
20
|
+
`);if(M.trim()){F(!0);try{se(),Ke("automation_improve_clicked",{automation_id:r,agent_id:i,instructions_length:M.length}),g(),await u({tiptapDoc:zs({managerAgentId:cs.AUTOMATION_MANAGER(c.id),managerName:"Automation Manager",kind:"automation",id:r,instructions:M})})}finally{F(!1)}}},V=e.models?.tier??"smart",U=e.models?.modelId&&e.models?.credentialId?{modelId:e.models.modelId,credentialId:e.models.credentialId,title:e.models.modelTitle??e.models.modelId}:null,E=ls({defaultValues:{name:e.name,active:e.active,tier:V,modelOverride:U,tools:e.tools??null,maxAgentSteps:e.maxAgentSteps??null}}),oe=E.watch("active"),[ne,Z]=w.useReducer(Ua,null),ie=()=>{ne!==null&&(Ke("automation_updated",{automation_id:r,agent_id:i,fields:Array.from(ne.fields),save_count:ne.saveCount,edit_duration_ms:Date.now()-ne.start}),Z({type:"reset"}))},ue=async()=>{const C=E.control._formState.dirtyFields,M=Object.keys(C);if(M.length===0&&!W)return!0;const O=E.getValues(),pe=E.control._defaultValues;E.reset(O,{keepValues:!0});const ae=W;G(!1);const ce={tier:O.tier,...O.modelOverride?{modelId:O.modelOverride.modelId,credentialId:O.modelOverride.credentialId,modelTitle:O.modelOverride.title}:{}},de={id:r,name:O.name,active:O.active,models:ce,tools:O.tools,maxAgentSteps:O.maxAgentSteps,messages:Ls(p),temperature:0};try{await a.mutateAsync(de)}catch{return E.reset(pe,{keepValues:!0}),ae&&G(!0),!1}const I=[...M];return ae&&I.push("messages"),Z({type:"accumulate",now:Date.now(),fields:I}),fe(),!0},{schedule:me,flush:te}=_t({save:ue}),{schedule:fe,flush:se}=_t({delayMs:3e4,save:async()=>ie()});w.useEffect(()=>{const C=E.watch(()=>me());return()=>C.unsubscribe()},[]);const re=C=>{if(l(C),!Y){H(!0);return}G(!0),me()},le=async()=>{Ke("automation_test_clicked",{automation_id:r,agent_id:i});const C=await te();if(se(),!!C){if(!p){X.error(o("automations.automationDetail.noInstructionsConfigured"));return}try{const M=await d.mutateAsync(r);M.threadId&&(g(),f(M.threadId))}catch{}}};return t.jsxs(t.Fragment,{children:[s&&t.jsx("div",{className:"flex items-center pb-4 shrink-0",children:t.jsxs(B,{variant:"ghost",size:"sm",onClick:s,children:[t.jsx(Vt,{size:14}),o("automations.automationDetail.backToList")]})}),t.jsxs("div",{className:"flex flex-col gap-8",children:[t.jsxs("div",{className:"flex flex-col gap-1.5",children:[t.jsxs("div",{className:"flex items-center justify-between gap-4",children:[t.jsx(Ct,{control:E.control,name:"name",render:({field:C})=>t.jsx(Nt,{...C,placeholder:o("automations.automationDetail.automationNamePlaceholder"),className:"border border-transparent shadow-none px-0 text-lg font-medium h-auto focus-visible:ring-0 focus-visible:border-border bg-transparent flex-1",style:{boxShadow:"none"}})}),n&&t.jsx(B,{variant:"ghost-destructive",size:"icon",className:"shrink-0",onClick:n,children:t.jsx(Ys,{size:14})})]}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(Ct,{control:E.control,name:"active",render:({field:C})=>t.jsx(ct,{checked:C.value,onCheckedChange:M=>{C.onChange(M),te()},className:"cursor-pointer"})}),t.jsx("span",{className:"text-sm text-muted-foreground",children:o(oe?"automations.automationDetail.active":"automations.automationDetail.inactive")}),t.jsx("span",{className:"text-muted-foreground/50 text-sm",children:"·"}),t.jsx(Es,{id:e.created_by,size:"2xs",className:"text-sm text-muted-foreground"})]})]}),t.jsxs("div",{className:"flex flex-col gap-2.5",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("span",{className:"text-xs font-semibold text-muted-foreground/60",children:o("automations.automationDetail.starter")}),t.jsx($a,{automationId:r,open:y,onOpenChange:v,onCustomSelect:()=>{T(!0),A(!1),D("")},onEventSelect:()=>{A(!0),T(!1)},onWebhookCreated:C=>{Ke("automation_trigger_added",{automation_id:r,trigger_type:"webhook"}),R(C)}})]}),e.triggers.length===0&&!b?t.jsx("div",{className:"rounded-lg border border-dashed border-border px-4 py-6 text-center",children:t.jsxs("p",{className:"text-sm text-muted-foreground",children:[o("automations.automationDetail.whenShouldRun")," ",t.jsx("button",{type:"button",className:"text-foreground underline underline-offset-2 cursor-pointer hover:text-foreground/80 transition-colors",onClick:()=>v(!0),children:o("automations.automationDetail.addStarter")})," ",o("automations.automationDetail.toGetGoing")]})}):t.jsx("div",{className:"flex flex-col gap-2",children:e.triggers.map(C=>t.jsx(Xt,{trigger:C,automationId:r,connectionName:C.connection_id?x.get(C.connection_id):void 0},C.id))}),b&&t.jsxs("div",{className:"flex items-center gap-2.5 px-3 py-2.5 rounded-lg border border-border bg-background group",children:[t.jsx(Me,{size:14,className:"text-muted-foreground shrink-0"}),t.jsx("input",{type:"text",value:_,onChange:C=>D(C.target.value),onBlur:async()=>{const C=_.trim();if(!(!C||!Re(C)))try{await j.mutateAsync({automation_id:r,type:"cron",cron_expression:C}),Ke("automation_trigger_added",{automation_id:r,trigger_type:"cron"}),X.success(o("automations.automationDetail.starterAdded")),T(!1),D("")}catch{X.error(o("automations.automationDetail.failedToAddStarter"))}},onKeyDown:async C=>{const M=_.trim();C.key==="Enter"&&M&&Re(M)&&C.target.blur(),C.key==="Escape"&&(T(!1),D(""))},placeholder:"0 9 * * 1-5",className:"flex-1 text-sm font-mono bg-transparent outline-none placeholder:text-muted-foreground/40",autoFocus:!0}),_&&!Re(_)&&t.jsx("span",{className:"text-xs text-muted-foreground/60 shrink-0",children:o("automations.automationDetail.invalid")}),j.isPending&&t.jsx(Le,{className:"size-[13px] text-muted-foreground shrink-0"}),t.jsx("button",{type:"button",className:"shrink-0 p-0.5 text-muted-foreground opacity-0 group-hover:opacity-100 hover:text-foreground transition-opacity rounded-lg",onClick:()=>{T(!1),D("")},children:t.jsx(mt,{size:13})})]}),k&&t.jsx(w.Suspense,{fallback:t.jsxs("div",{className:"flex items-center gap-2 px-3 py-3 rounded-lg border border-border bg-background",children:[t.jsx(Le,{className:"size-[13px] text-muted-foreground"}),t.jsx("span",{className:"text-sm text-muted-foreground",children:o("automations.automationDetail.loadingConnections")})]}),children:t.jsx(Fa,{automationId:r,onDone:()=>A(!1)})}),t.jsx(Jt,{open:$!==null,onOpenChange:C=>{C||R(null)},url:$?.url??null,token:$?.token??null})]}),t.jsxs("div",{className:"flex flex-col gap-2.5",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("span",{className:"text-xs font-semibold text-muted-foreground/60",children:o("automations.automationDetail.instructions")}),t.jsxs(B,{variant:"outline",size:"sm",className:"gap-1.5",disabled:K||!p,onClick:J,children:[t.jsx(Ot,{size:13}),o("automations.automationDetail.improve")]})]}),t.jsx(Zs,{tiptapDoc:p,setTiptapDoc:re,placeholder:o("automations.automationDetail.instructionsPlaceholder"),children:t.jsxs("div",{className:"rounded-xl border border-border min-h-[120px] flex flex-col",children:[t.jsx(Qs,{virtualMcpId:i||null,className:"max-h-[45vh]"}),t.jsx("div",{className:"@container/chat-bottom flex items-center justify-end gap-1.5 p-2.5",children:t.jsxs(Bs,{children:[t.jsx(Gs,{asChild:!0,children:t.jsxs(B,{type:"button",variant:"default",className:"gap-1.5",onClick:le,disabled:!i,children:[t.jsx(Xs,{size:16}),o("automations.automationDetail.test")]})}),t.jsx(Hs,{children:o("automations.automationDetail.testAutomation")})]})})]})})]}),t.jsxs(Vs,{open:N,onOpenChange:S,className:"flex flex-col gap-2.5",children:[t.jsxs(Us,{className:"group flex w-fit cursor-pointer items-center gap-1.5",children:[t.jsx("span",{className:"text-xs font-semibold text-muted-foreground/60",children:o("automations.automationDetail.advanced")}),t.jsx(rt,{size:14,className:"text-muted-foreground/60 transition-transform group-data-[state=open]:rotate-180"})]}),t.jsxs(Ws,{className:"flex flex-col gap-5 pt-0.5",children:[t.jsx(ua,{tier:E.watch("tier"),onTierChange:C=>E.setValue("tier",C,{shouldDirty:!0}),override:E.watch("modelOverride"),onOverrideChange:C=>E.setValue("modelOverride",C,{shouldDirty:!0})}),t.jsx(ga,{agentId:i||null,value:E.watch("tools"),onChange:C=>E.setValue("tools",C,{shouldDirty:!0})}),t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsx("span",{className:"text-xs font-semibold text-muted-foreground/60",children:o("automations.automationDetail.maxSteps")}),t.jsx(Nt,{type:"number",min:1,max:100,className:"w-40",placeholder:o("automations.automationDetail.maxStepsPlaceholder",{default:Va}),value:E.watch("maxAgentSteps")??"",onChange:C=>{const M=C.target.value.trim(),O=M===""?null:Number(M);E.setValue("maxAgentSteps",O===null||Number.isNaN(O)?null:O,{shouldDirty:!0})}})]})]})]})]})]})}function Ba(r){const e=q.c(55),{automation:s}=r,n=ee(),{update:o}=ve();let i;e[0]!==s.name?(i=t.jsx("h2",{className:"text-lg font-medium text-foreground",children:s.name}),e[0]=s.name,e[1]=i):i=e[1];let c;e[2]!==n?(c=n("automations.builtin.badge"),e[2]=n,e[3]=c):c=e[3];let a;e[4]!==c?(a=t.jsx(Kt,{variant:"muted",children:c}),e[4]=c,e[5]=a):a=e[5];let j;e[6]!==i||e[7]!==a?(j=t.jsxs("div",{className:"flex items-center gap-2",children:[i,a]}),e[6]=i,e[7]=a,e[8]=j):j=e[8];let d;e[9]!==s.id||e[10]!==o?(d=D=>o.mutate({id:s.id,active:D}),e[9]=s.id,e[10]=o,e[11]=d):d=e[11];let m;e[12]!==s.active||e[13]!==d||e[14]!==o.isPending?(m=t.jsx(ct,{checked:s.active,disabled:o.isPending,onCheckedChange:d,className:"cursor-pointer"}),e[12]=s.active,e[13]=d,e[14]=o.isPending,e[15]=m):m=e[15];let x;e[16]!==s.active||e[17]!==n?(x=s.active?n("automations.automationDetail.active"):n("automations.automationDetail.inactive"),e[16]=s.active,e[17]=n,e[18]=x):x=e[18];let f;e[19]!==x?(f=t.jsx("span",{className:"text-sm text-muted-foreground",children:x}),e[19]=x,e[20]=f):f=e[20];let g;e[21]!==m||e[22]!==f?(g=t.jsxs("div",{className:"flex items-center gap-2",children:[m,f]}),e[21]=m,e[22]=f,e[23]=g):g=e[23];let u;e[24]!==j||e[25]!==g?(u=t.jsxs("div",{className:"flex flex-col gap-1.5",children:[j,g]}),e[24]=j,e[25]=g,e[26]=u):u=e[26];let h;e[27]!==n?(h=n("automations.automationDetail.starter"),e[27]=n,e[28]=h):h=e[28];let p;e[29]!==h?(p=t.jsx("span",{className:"text-xs font-semibold text-muted-foreground/60",children:h}),e[29]=h,e[30]=p):p=e[30];let l;if(e[31]!==s.id||e[32]!==s.triggers){let D;e[34]!==s.id?(D=k=>t.jsx(Xt,{trigger:k,automationId:s.id,readOnly:!0},k.id),e[34]=s.id,e[35]=D):D=e[35],l=s.triggers.map(D),e[31]=s.id,e[32]=s.triggers,e[33]=l}else l=e[33];let y;e[36]!==p||e[37]!==l?(y=t.jsxs("div",{className:"flex flex-col gap-2.5",children:[p,l]}),e[36]=p,e[37]=l,e[38]=y):y=e[38];let v;e[39]!==n?(v=n("automations.automationDetail.instructions"),e[39]=n,e[40]=v):v=e[40];let N;e[41]!==v?(N=t.jsx("span",{className:"text-xs font-semibold text-muted-foreground/60",children:v}),e[41]=v,e[42]=N):N=e[42];let S;e[43]!==s.system_key||e[44]!==n?(S=s.system_key==="implementer"?n("automations.builtin.implementerDescription"):s.system_key==="reviewer"?n("automations.builtin.reviewerDescription"):s.system_key==="linked_chats"?n("automations.builtin.linkedChatsDescription"):s.system_key==="pr_merged"?n("automations.builtin.prMergedDescription"):s.system_key==="chat_pr"?n("automations.builtin.chatPrDescription"):s.system_key==="agent_mentions"?n("automations.builtin.mentionsDescription"):n("automations.builtin.description"),e[43]=s.system_key,e[44]=n,e[45]=S):S=e[45];let b;e[46]!==S?(b=t.jsx("p",{className:"text-sm text-muted-foreground",children:S}),e[46]=S,e[47]=b):b=e[47];let T;e[48]!==N||e[49]!==b?(T=t.jsxs("div",{className:"flex flex-col gap-2.5",children:[N,b]}),e[48]=N,e[49]=b,e[50]=T):T=e[50];let _;return e[51]!==u||e[52]!==y||e[53]!==T?(_=t.jsxs("div",{className:"flex flex-col gap-8",children:[u,y,T]}),e[51]=u,e[52]=y,e[53]=T,e[54]=_):_=e[54],_}const Yt=[{key:"24h",labelKey:"mainPanelTabs.automationTab.last24hours",ms:1440*60*1e3},{key:"7d",labelKey:"mainPanelTabs.automationTab.last7days",ms:10080*60*1e3},{key:"30d",labelKey:"mainPanelTabs.automationTab.last30days",ms:720*60*60*1e3}];function Zt(r){const e=Yt.find(n=>n.key===r).ms,s=Date.now();return{startDate:new Date(s-e).toISOString(),endDate:new Date(s).toISOString()}}function Ga(r){const e=q.c(16),{automationId:s,triggerIds:n}=r,o=ee(),[i,c]=w.useState("30d"),[a,j]=w.useState(Ha);let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=p=>{const l=p;c(l),j(Zt(l))},e[0]=d):d=e[0];let m;e[1]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx(he,{className:"w-44",children:t.jsx(je,{})}),e[1]=m):m=e[1];let x;e[2]!==o?(x=Yt.map(p=>t.jsx(be,{value:p.key,children:o(p.labelKey)},p.key)),e[2]=o,e[3]=x):x=e[3];let f;e[4]!==x?(f=t.jsx(ye,{children:x}),e[4]=x,e[5]=f):f=e[5];let g;e[6]!==f||e[7]!==i?(g=t.jsx("div",{className:"flex items-center justify-end",children:t.jsxs(ge,{value:i,onValueChange:d,children:[m,f]})}),e[6]=f,e[7]=i,e[8]=g):g=e[8];let u;e[9]!==s||e[10]!==a||e[11]!==n?(u=t.jsx(ra,{automationId:s,triggerIds:n,range:a}),e[9]=s,e[10]=a,e[11]=n,e[12]=u):u=e[12];let h;return e[13]!==g||e[14]!==u?(h=t.jsxs("div",{className:"flex flex-col gap-5",children:[g,u]}),e[13]=g,e[14]=u,e[15]=h):h=e[15],h}function Ha(){return Zt("30d")}function Ja(r){const e=q.c(5),{tabId:s}=r;let n;e[0]!==s?(n=ds(s),e[0]=s,e[1]=n):n=e[1];const o=n;if(!o)return null;let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(Qe,{}),e[2]=i):i=e[2];let c;return e[3]!==o.id?(c=t.jsx(w.Suspense,{fallback:i,children:t.jsx(Xa,{id:o.id})}),e[3]=o.id,e[4]=c):c=e[4],c}function Xa(r){const e=q.c(41),{id:s}=r,n=ee(),{openPanel:o}=ca(),{data:i,isLoading:c}=Ks(s),[a,j]=w.useState("settings");let d;e[0]!==o?(d=()=>o("automations"),e[0]=o,e[1]=d):d=e[1];const m=d;if(c){let k;return e[2]===Symbol.for("react.memo_cache_sentinel")?(k=t.jsx(Qe,{}),e[2]=k):k=e[2],k}if(!i){let k;e[3]!==n?(k=n("mainPanelTabs.automationTab.automationNotFound"),e[3]=n,e[4]=k):k=e[4];let A;return e[5]!==k?(A=t.jsx("div",{className:"flex h-full w-full items-center justify-center text-sm text-muted-foreground",children:k}),e[5]=k,e[6]=A):A=e[6],A}let x;e[7]!==i.triggers?(x=i.triggers.map(Ya),e[7]=i.triggers,e[8]=x):x=e[8];const f=x;let g;e[9]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx(Vt,{size:14}),e[9]=g):g=e[9];let u;e[10]!==n?(u=n("mainPanelTabs.automationTab.backToList"),e[10]=n,e[11]=u):u=e[11];let h;e[12]!==m||e[13]!==u?(h=t.jsxs(B,{variant:"ghost",size:"sm",onClick:m,children:[g,u]}),e[12]=m,e[13]=u,e[14]=h):h=e[14];let p;e[15]!==n?(p=n("mainPanelTabs.automationTab.settings"),e[15]=n,e[16]=p):p=e[16];let l;e[17]!==p?(l={id:"settings",label:p},e[17]=p,e[18]=l):l=e[18];let y;e[19]!==n?(y=n("mainPanelTabs.automationTab.runs"),e[19]=n,e[20]=y):y=e[20];let v;e[21]!==y?(v={id:"runs",label:y},e[21]=y,e[22]=v):v=e[22];let N;e[23]!==l||e[24]!==v?(N=[l,v],e[23]=l,e[24]=v,e[25]=N):N=e[25];let S;e[26]===Symbol.for("react.memo_cache_sentinel")?(S=k=>j(k),e[26]=S):S=e[26];let b;e[27]!==N||e[28]!==a?(b=t.jsx(la,{placement:"page",tabs:N,activeTab:a,onTabChange:S}),e[27]=N,e[28]=a,e[29]=b):b=e[29];let T;e[30]!==b||e[31]!==h?(T=t.jsxs("div",{className:"flex items-center justify-between pb-4 shrink-0",children:[h,b]}),e[30]=b,e[31]=h,e[32]=T):T=e[32];let _;e[33]!==i||e[34]!==s||e[35]!==a||e[36]!==f?(_=a==="settings"?i.system_key?t.jsx(Ba,{automation:i}):t.jsx(Wa,{automationId:s,automation:i}):t.jsx(w.Suspense,{fallback:t.jsx(Qe,{}),children:t.jsx(Ga,{automationId:s,triggerIds:f})}),e[33]=i,e[34]=s,e[35]=a,e[36]=f,e[37]=_):_=e[37];let D;return e[38]!==T||e[39]!==_?(D=t.jsx(Xe,{children:t.jsx(Xe.Content,{children:t.jsxs(Xe.Container,{children:[T,_]})})}),e[38]=T,e[39]=_,e[40]=D):D=e[40],D}function Ya(r){return r.id}function Za(){const r=q.c(3);let e;r[0]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},r[0]=e):e=r[0];const{automationId:s}=ms(e);let n;return r[1]!==s?(n=s?t.jsx(Ja,{tabId:`automation:${s}`}):null,r[1]=s,r[2]=n):n=r[2],n}function pi(){const r=q.c(1);let e;return r[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(us.Content,{children:t.jsx(Za,{})}),r[0]=e):e=r[0],e}export{pi as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as S,b as K,r as F,j as e,n as a,E as O,B as V,aZ as Q}from"./index-DEZ1imMJ.js";import{C as U}from"./index-CnOVjrIG.js";import{s as W}from"./Plus-D7X8Q2-q.js";import{l as X}from"./agent-icon-CTbTFMnU.js";import{i as Z}from"./Zap-pmN7zSOE.js";import{S as Y}from"./search-input-Co3g-t6C.js";import{E as $}from"./empty-state-CtwVPMDf.js";import{u as tt,a as et,b as it}from"./use-automations-CyrAu8XA.js";import{a as ot}from"./autosend-B0POegpm.js";import{A as st}from"./automation-list-row-knBDKeRb.js";import{b as nt}from"./thread-route-B-uAlF3E.js";import"./use-mobile-CJITN8uI.js";import"./use-sidebar-collapsed-DcAIYhdp.js";import"./use-chat-layout-state-BG2-xqQp.js";import"./thread-intent-DuI80508.js";import"./use-mcp-client-DJjkIlNp.js";import"./auth-CQxDIkM-.js";import"./delay-CnY5UFtP.js";import"./watch-sse-pool-DhoYakYc.js";import"./task-board-D3wT6_aG.js";import"./schema-9jBUPMLq.js";import"./tooltip-Dam-ym8O.js";import"./index-DsbWutG1.js";import"./toolbar-icon-button-BmJKmAUK.js";import"./shell-layout-BLRNx2fV.js";import"./Globe04-D17A2x5l.js";import"./UserSquare-Qd-FKVqK.js";import"./use-deployment-admin-CS9K9Ea9.js";import"./admin-fetch-BhTJlAsX.js";import"./XClose-BuJ6u6eL.js";import"./use-project-scope-pwqcjGo8.js";import"./repository-binding-C0msapZZ.js";import"./CheckCircle-kNwBDDVU.js";import"./Monitor01-DalIAdj7.js";import"./Tool01-Bo2g-Ylw.js";import"./command-DA2t4jTW.js";import"./index-DYgzDE_k.js";import"./SearchMd-e6xPeRPD.js";import"./integration-icon-CFHOt7sY.js";import"./LinkBroken01-loTkm0G5.js";import"./project-icon-rrJh6PJx.js";import"./use-navigate-to-agent-MlXDIBYX.js";import"./use-debounced-value-yZdJ1f2K.js";import"./new-project-dialog-Dfe2Pik9.js";import"./ArrowLeft-XBSBGQal.js";import"./label-BEWDSeNl.js";import"./repository-picker-BYFeDBpn.js";import"./github-icon-BVy-v7gH.js";import"./useInfiniteQuery-CtNfxLxq.js";import"./infiniteQueryObserver-C0Gb02df.js";import"./collection-search-Din8SB5Y.js";import"./ShoppingBag01-zloi0TDl.js";import"./use-organization-settings-bWX185lw.js";import"./legacy-admin-welcome-dialog-B223MrIf.js";import"./drawer-BYGTIOoj.js";import"./required-auth-layout-DfUx9vzb.js";import"./use-org-sso-Bo72RJ5p.js";import"./sheet-D2hfPw7P.js";import"./resizable-CHI5UJHW.js";import"./AlertCircle-Co3RPbIZ.js";import"./ArrowUp-DLnkUu9S.js";import"./ChevronUp-D1T3kSyr.js";import"./ChevronSelectorVertical-Gg7YcxlH.js";import"./CreditCard01-D65BAIaV.js";import"./SwitchHorizontal01-elXb4-4d.js";import"./Key01-awxHKnoL.js";import"./Minus-CYrsmoRb.js";import"./Sun-C1lyqton.js";import"./Play-C6Weq-wk.js";import"./Trash01-C-PU5Hm-.js";import"./Upload01-NPnXKs-J.js";import"./Users01-CTNixqdX.js";import"./badge-BpzeYR5Z.js";function rt(o){if(!(o instanceof Error))return!1;const t=o.message.toLowerCase();return t.includes("relation")&&t.includes("does not exist")}function at(o){const t=S.c(45),{virtualMcpId:n}=o,i=K(),{openPanel:r}=ot(),{data:D,error:M}=tt(n),v=D===void 0?[]:D,{create:y}=et(),[_,G]=F.useState("");if(M&&rt(M)){let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=e.jsx(X,{size:48,className:"text-muted-foreground"}),t[0]=s):s=t[0];let x;t[1]!==i?(x=i("automations.setupRequired.title"),t[1]=i,t[2]=x):x=t[2];let h;t[3]!==i?(h=i("automations.setupRequired.description"),t[3]=i,t[4]=h):h=t[4];let j;t[5]!==r?(j=()=>r("settings"),t[5]=r,t[6]=j):j=t[6];let g;t[7]!==i?(g=i("automations.setupRequired.goToSetup"),t[7]=i,t[8]=g):g=t[8];let C;t[9]!==j||t[10]!==g?(C=e.jsx(V,{size:"sm",onClick:j,children:g}),t[9]=j,t[10]=g,t[11]=C):C=t[11];let N;return t[12]!==x||t[13]!==h||t[14]!==C?(N=e.jsx(a,{children:e.jsx(a.Content,{children:e.jsx(a.Container,{children:e.jsx("div",{className:"flex items-center justify-center py-20",children:e.jsx($,{image:s,title:x,description:h,actions:C})})})})}),t[12]=x,t[13]=h,t[14]=C,t[15]=N):N=t[15],N}const H=_.toLowerCase(),q=v.filter(s=>s.name.toLowerCase().includes(H));let w;t[16]!==r?(w=s=>r(`automation:${s}`),t[16]=r,t[17]=w):w=t[17];const B=w,R=async()=>{if(y.isPending)return;O("automation_new_clicked",{virtual_mcp_id:n,existing_count:v.length});const s=await y.mutateAsync(it(n));B(s.id)},J=y.isPending;let A;t[18]===Symbol.for("react.memo_cache_sentinel")?(A=e.jsx(W,{size:14}),t[18]=A):A=t[18];let m;t[19]!==i?(m=i("automations.automationsList.newAutomation"),t[19]=i,t[20]=m):m=t[20];let L;t[21]!==y.isPending||t[22]!==R||t[23]!==m?(L=e.jsxs(V,{size:"sm",onClick:R,disabled:J,children:[A,m]}),t[21]=y.isPending,t[22]=R,t[23]=m,t[24]=L):L=t[24];const P=L,E=a,T=a,k=a;let l;t[25]!==i?(l=i("automations.automationsList.title"),t[25]=i,t[26]=l):l=t[26];let c;t[27]!==P||t[28]!==l?(c=e.jsx(a.Title,{actions:P,children:l}),t[27]=P,t[28]=l,t[29]=c):c=t[29];const z=v.length>0&&e.jsx(Y,{value:_,onChange:G,placeholder:i("automations.automationsList.searchPlaceholder"),className:"w-full md:w-[375px]"});let p;t[30]!==z?(p=e.jsx("div",{className:"flex flex-wrap items-center justify-between gap-3",children:z}),t[30]=z,t[31]=p):p=t[31];let u;t[32]!==c||t[33]!==p?(u=e.jsxs("div",{className:"flex flex-col gap-6",children:[c,p]}),t[32]=c,t[33]=p,t[34]=u):u=t[34];const I=v.length===0?e.jsx("div",{className:"flex items-center justify-center py-20",children:e.jsx($,{image:e.jsx(Z,{size:48,className:"text-muted-foreground"}),title:i("automations.automationsList.emptyTitle"),description:i("automations.automationsList.emptyDescription"),actions:!1})}):q.length===0?e.jsx("div",{className:"flex items-center justify-center py-20",children:e.jsx($,{image:e.jsx(Z,{size:48,className:"text-muted-foreground"}),title:i("automations.automationsList.noResultsTitle"),description:i("automations.automationsList.noResultsDescription",{search:_})})}):e.jsx("div",{className:"mt-6 flex flex-col divide-y divide-border overflow-hidden rounded-xl bg-card shadow-edge",children:q.map(s=>e.jsx(st,{automation:s,onClick:()=>B(s.id)},s.id))});let d;t[35]!==u||t[36]!==I||t[37]!==k.Container?(d=e.jsxs(k.Container,{children:[u,I]}),t[35]=u,t[36]=I,t[37]=k.Container,t[38]=d):d=t[38];let f;t[39]!==d||t[40]!==T.Content?(f=e.jsx(T.Content,{children:d}),t[39]=d,t[40]=T.Content,t[41]=f):f=t[41];let b;return t[42]!==E||t[43]!==f?(b=e.jsx(E,{children:f}),t[42]=E,t[43]=f,t[44]=b):b=t[44],b}function mt(o){const t=S.c(3),{virtualMcpId:n}=o;let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=e.jsx(Q,{}),t[0]=i):i=t[0];let r;return t[1]!==n?(r=e.jsx(F.Suspense,{fallback:i,children:e.jsx(at,{virtualMcpId:n})}),t[1]=n,t[2]=r):r=t[2],r}function lt(){const o=S.c(2),t=nt();let n;return o[0]!==t?(n=e.jsx(mt,{virtualMcpId:t}),o[0]=t,o[1]=n):n=o[1],n}function Re(){const o=S.c(1);let t;return o[0]===Symbol.for("react.memo_cache_sentinel")?(t=e.jsx(U.Content,{children:e.jsx(lt,{})}),o[0]=t):t=o[0],t}export{Re as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as G,b as ae,r as ne,j as s,m as pe,bm as be,fJ as _e,B as re,as as ke,bB as he}from"./index-DEZ1imMJ.js";import{C as Te}from"./index-CnOVjrIG.js";import{S as De}from"./site-draft-actions-5nXph2SS.js";import{r as ce,F as Re}from"./agent-icon-CTbTFMnU.js";import{i as Ie}from"./SwitchHorizontal01-elXb4-4d.js";import{s as Ee}from"./Plus-D7X8Q2-q.js";import{B as $e}from"./badge-BpzeYR5Z.js";import{S as Se}from"./scroll-area-CQ_g6hBm.js";import{T as we,a as Oe}from"./toggle-group-C6oiEKlf.js";import{S as ye,a as Ce}from"./view-header-y27ISHbd.js";import{n as Me,p as Ve,a as Ae,c as Be,d as ze,e as Fe,f as Pe,g as We,N as Le,h as He,i as Ge}from"./named-rule-view-BNwXQD8T.js";import{c as Ye,u as Ke,i as Ne,K as Ue,L as Je}from"./hosted-reconcile-DNkBVm-1.js";import{ae as qe,ag as Qe}from"./blocks-tab-states-BRjgrPty.js";import{a as de,M as Xe,b as Ze}from"./date-utils-CrvIKg-s.js";import{a as et}from"./site-draft-view-3CfqUHrV.js";import{S as tt}from"./settings-tab-CHBeACws.js";import{u as st}from"./use-blocks-v8-project-4PZwWSEO.js";import{b as it}from"./thread-route-B-uAlF3E.js";import"./use-mobile-CJITN8uI.js";import"./use-sidebar-collapsed-DcAIYhdp.js";import"./use-chat-layout-state-BG2-xqQp.js";import"./autosend-B0POegpm.js";import"./use-project-scope-pwqcjGo8.js";import"./repository-binding-C0msapZZ.js";import"./use-mcp-client-DJjkIlNp.js";import"./auth-CQxDIkM-.js";import"./thread-intent-DuI80508.js";import"./delay-CnY5UFtP.js";import"./watch-sse-pool-DhoYakYc.js";import"./task-board-D3wT6_aG.js";import"./schema-9jBUPMLq.js";import"./tooltip-Dam-ym8O.js";import"./index-DsbWutG1.js";import"./toolbar-icon-button-BmJKmAUK.js";import"./shell-layout-BLRNx2fV.js";import"./Globe04-D17A2x5l.js";import"./UserSquare-Qd-FKVqK.js";import"./use-deployment-admin-CS9K9Ea9.js";import"./admin-fetch-BhTJlAsX.js";import"./XClose-BuJ6u6eL.js";import"./CheckCircle-kNwBDDVU.js";import"./Monitor01-DalIAdj7.js";import"./Zap-pmN7zSOE.js";import"./Tool01-Bo2g-Ylw.js";import"./command-DA2t4jTW.js";import"./index-DYgzDE_k.js";import"./SearchMd-e6xPeRPD.js";import"./integration-icon-CFHOt7sY.js";import"./LinkBroken01-loTkm0G5.js";import"./project-icon-rrJh6PJx.js";import"./use-navigate-to-agent-MlXDIBYX.js";import"./use-debounced-value-yZdJ1f2K.js";import"./new-project-dialog-Dfe2Pik9.js";import"./ArrowLeft-XBSBGQal.js";import"./label-BEWDSeNl.js";import"./repository-picker-BYFeDBpn.js";import"./github-icon-BVy-v7gH.js";import"./useInfiniteQuery-CtNfxLxq.js";import"./infiniteQueryObserver-C0Gb02df.js";import"./collection-search-Din8SB5Y.js";import"./ShoppingBag01-zloi0TDl.js";import"./use-organization-settings-bWX185lw.js";import"./legacy-admin-welcome-dialog-B223MrIf.js";import"./drawer-BYGTIOoj.js";import"./required-auth-layout-DfUx9vzb.js";import"./use-org-sso-Bo72RJ5p.js";import"./sheet-D2hfPw7P.js";import"./resizable-CHI5UJHW.js";import"./separator-BXKmXRi8.js";import"./chat-context-PvP_Q1CV.js";import"./use-entitlements-DidlVdLU.js";import"./use-ai-providers-DwpUgHpj.js";import"./use-decopilot-events-C_C16-Ln.js";import"./site-editor-toast-Cgezu0A5.js";import"./use-voice-input-BKZpbbiI.js";import"./popover-DsvzKyw_.js";import"./ChevronUp-D1T3kSyr.js";import"./index-Bgxp_wDH.js";import"./checkbox-Bk98t4UK.js";import"./Minus-CYrsmoRb.js";import"./select-BJaUvbIR.js";import"./index-BdQq_4o_.js";import"./ChevronSelectorVertical-Gg7YcxlH.js";import"./Key01-awxHKnoL.js";import"./ai-providers-logos-DD3qZ33J.js";import"./openai-compatible-presets-BKGfVqEx.js";import"./AlertCircle-Co3RPbIZ.js";import"./sandbox-url-D3mC8qhT.js";import"./utils-BbEfYi1l.js";import"./use-sandbox-events-D1_GHzsF.js";import"./sandbox-git-api-DcqI6XE4.js";import"./tabs-DtOFAaIp.js";import"./active-indicator-CCMhAsc_.js";import"./Trash01-C-PU5Hm-.js";import"./cms-store-drafts-DEGbfccc.js";import"./serial-task-queue-CGOeQgpr.js";import"./virtual-mcp-vRvxAZ15.js";import"./url-slug-BMHzx0XY.js";import"./use-fast-preview-draft-url-KJzyk03O.js";import"./index-_l1iac4T.js";import"./ArrowUp-DLnkUu9S.js";import"./tool-namespace-DdU5nhii.js";import"./use-mcp-prompts-it9pO2QZ.js";import"./usage-stats-C3KvQP9T.js";import"./form-gd_hA5VT.js";import"./utils-CVEq3hMx.js";import"./markdown-Db8a3LUX.js";import"./use-copy-o0P-kroy.js";import"./input-Dla4T1vA.js";import"./icon-button-Ze0c1pwp.js";import"./file-type-icon-DM9o0Fkb.js";import"./chat-draft-C714j1Wd.js";import"./Upload01-NPnXKs-J.js";import"./use-deco-credits-Bjfx0bAt.js";import"./input-CxHdmxHa.js";import"./suggestion-C8VoNVDk.js";import"./use-org-fs-BH012Up0.js";import"./question-004-sINsf4GQ.js";import"./feature-paywall-eifo7eqe.js";import"./plan-ladder-DdqVPKf9.js";import"./add-connection-dialog-BL3Uj9Py.js";import"./extract-connection-data-hvaA6rrK.js";import"./metadata-D72DunRR.js";import"./connection-giFDA0-u.js";import"./connection-card-CPhS4jEh.js";import"./connection-slug-DTdYIX0A.js";import"./textarea-_jcGqOvl.js";import"./use-connection-BozgIoMu.js";import"./schema-BFmIytlm.js";import"./connection-form-helpers-CRMRmqMW.js";import"./authenticate-and-persist-oauth-o7XKLq_6.js";import"./mcp-oauth-CHmbtYyN.js";import"./mcp-oauth-BBT3ip6Z.js";import"./collection-tabs-BJDa_4_F.js";import"./use-infinite-scroll-CED9GMTE.js";import"./useSuspenseInfiniteQuery-OzDVxqdl.js";import"./use-task-board-events-DnEp5edD.js";import"./pair-D5JEvK2M.js";import"./collapsible-C7N88_dp.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-C8G6NLBz.js";import"./types-gyofjZHf.js";import"./omit-server-managed-metadata-L5IhjRZB.js";import"./use-thread-outputs-BPYn8k3d.js";import"./use-cms-publish-actions-CmQuU9AY.js";import"./use-content-sync-BBbOIir0.js";import"./device-hint-DslC2w9a.js";import"./alert-wYcDlQSf.js";import"./section-array-field-CvmfLv3q.js";import"./editor-x1lgFdfy.js";import"./save-changes-debug-nBi-n9eV.js";import"./sandbox-lifecycle-context-WXIR2CMZ.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./agent-capabilities-BGShibnD.js";import"./CreditCard01-D65BAIaV.js";import"./Sun-C1lyqton.js";import"./Play-C6Weq-wk.js";import"./Users01-CTNixqdX.js";import"./use-apply-named-rule-BnEs0jP7.js";import"./use-move-blocks-CC1C41-K.js";import"./slider-C6h9g0cI.js";import"./index-B-T__H4R.js";import"./tooltipContext-PzKiic-J.js";import"./CategoricalChart-BkeCXQf9.js";import"./index-D5i1_B2b.js";import"./empty-state-CtwVPMDf.js";import"./empty-state-CH3GYanB.js";import"./index-i75UpmlW.js";import"./build-improve-prompt-doc-DNVGwsoG.js";import"./use-date-fns-locale-bKU2Q73X.js";import"./use-debounced-autosave-BmvZzlB_.js";import"./use-mcp-auth-status-Dls0bLQE.js";import"./use-mcp-tools-wfurU0oX.js";import"./switch-C53DVv3y.js";import"./use-project-native-view-presence-DhhbOsoh.js";import"./match-site-slug-config-D3fUJ6vX.js";import"./use-file-configs-DhXDYO83.js";import"./optimistic-project-sidebar-views-BcV4r24I.js";import"./sections-C_Jmzzpn.js";import"./roles-DW32thi2.js";import"./secret-picker-VlsiGxPi.js";import"./use-secrets-Dim43C3b.js";import"./app-preview-url-9Od4s8Sz.js";function xe(i){return{start:i.start?Date.parse(i.start):null,end:i.end?Date.parse(i.end):null}}function nt(i,e){const{start:t,end:n}=xe(i);if(Number.isNaN(t)||Number.isNaN(n))return"unreadable";if(t===null&&n===null)return"always";const d=e.getTime();return t!==null&&d<t?"upcoming":n!==null&&d>=n?"ended":"running"}const je={running:0,upcoming:1,always:2,unreadable:3,ended:4};function at(i,e,t){const n=qe(i,"campaigns");if(n.kind==="conflict")return[];const d=Object.entries(n.values).map(([r,o])=>{const l=Me(e,"campaigns",r,o),p=l==="changed"?Ve(e,"campaigns",r):void 0;return{name:r,window:o,status:nt(o,t),entryState:l,...p!==void 0?{publishedWindow:p}:{}}}),a=r=>r.window.start?Date.parse(r.window.start):0,m=r=>r.window.end?Date.parse(r.window.end):0;return d.sort((r,o)=>{const l=je[r.status]-je[o.status];return l!==0?l:r.status==="upcoming"?a(r)-a(o):r.status==="ended"?m(o)-m(r):0})}function rt(i,e){return Ae(i,e,"campaigns")}function fe(i,e,t){const{start:n,end:d}=xe(i);if(Number.isNaN(n)||Number.isNaN(d))return null;const a=e.getTime(),m=t.getTime(),r=m-a;if(r<=0)return null;const o=n??Number.NEGATIVE_INFINITY,l=d??Number.POSITIVE_INFINITY;if(l<=a||o>=m||l<=o)return null;const p=Math.max(o,a),c=Math.min(l,m);return{left:(p-a)/r*100,width:(c-p)/r*100,openStart:o<a,openEnd:l>m}}const lt=1.5,ot=4;function mt(i,e){const t=e.length*lt+ot;return i.width>=t?"inside":i.left+i.width+t<=100?"after":i.left>=t||i.left>100-(i.left+i.width)?"before":"after"}function ct(i,e,t){const n=new Date(e.getFullYear(),e.getMonth(),1),d=new Date(e.getFullYear(),e.getMonth()+t,1);if(i.some(r=>fe(r,n,d)!==null))return n;const a=i.map(r=>xe(r).start).filter(r=>r!==null&&!Number.isNaN(r)&&r>=d.getTime()).sort((r,o)=>r-o)[0];if(a===void 0)return n;const m=new Date(a);return new Date(m.getFullYear(),m.getMonth(),1)}const dt={running:"bg-success",upcoming:"bg-primary",always:"bg-success",ended:"bg-muted-foreground/50",unreadable:"bg-warning"},pt={running:"bg-success/80 text-success-foreground",upcoming:"bg-primary/80 text-primary-foreground",always:"bg-success/60 text-success-foreground",ended:"bg-muted text-muted-foreground",unreadable:"bg-warning/60 text-warning-foreground"},ie=4,me=Qe("campaigns").blockKey,ut=(i,e)=>be(i??null)!==be(e??null);function ft(){const i=G.c(2),e=ae();let t;return i[0]!==e?(t=n=>{switch(n){case"running":return e("sandbox.dateCampaigns.status.running");case"upcoming":return e("sandbox.dateCampaigns.status.upcoming");case"ended":return e("sandbox.dateCampaigns.status.ended");case"always":return e("sandbox.dateCampaigns.status.always");case"unreadable":return e("sandbox.dateCampaigns.status.unreadable")}},i[0]=e,i[1]=t):t=i[1],t}function ve(i){const e=G.c(11),{status:t}=i,n=ft(),d=dt[t];let a;e[0]!==d?(a=pe("size-1.5 rounded-full",d),e[0]=d,e[1]=a):a=e[1];let m;e[2]!==a?(m=s.jsx("span",{className:a}),e[2]=a,e[3]=m):m=e[3];let r;e[4]!==n||e[5]!==t?(r=n(t),e[4]=n,e[5]=t,e[6]=r):r=e[6];let o;return e[7]!==t||e[8]!==m||e[9]!==r?(o=s.jsxs($e,{variant:"secondary","data-status":t,children:[m,r]}),e[7]=t,e[8]=m,e[9]=r,e[10]=o):o=e[10],o}function ge(i,e){return _e(i)??e}function xt(i){const e=G.c(8),{title:t,description:n}=i;let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(ce,{size:24,className:"text-muted-foreground/60"}),e[0]=d):d=e[0];let a;e[1]!==t?(a=s.jsx("p",{className:"text-sm font-medium",children:t}),e[1]=t,e[2]=a):a=e[2];let m;e[3]!==n?(m=s.jsx("p",{className:"max-w-sm text-sm text-muted-foreground",children:n}),e[3]=n,e[4]=m):m=e[4];let r;return e[5]!==a||e[6]!==m?(r=s.jsxs("div",{className:"flex h-full flex-col items-center justify-center gap-2 p-6 text-center",children:[d,a,m]}),e[5]=a,e[6]=m,e[7]=r):r=e[7],r}function gt(i){const e=G.c(105),{orgSlug:t,virtualMcpId:n,branch:d,decofile:a,meta:m,initialView:r}=i,o=r===void 0?"list":r,l=ae();let p;e[0]!==d||e[1]!==a||e[2]!==m||e[3]!==t||e[4]!==n?(p={orgSlug:t,virtualMcpId:n,branch:d,decofile:a,meta:m},e[0]=d,e[1]=a,e[2]=m,e[3]=t,e[4]=n,e[5]=p):p=e[5];const c=Be("campaigns",p),[x,j]=ne.useState(o);let g;e[6]!==d||e[7]!==t||e[8]!==n?(g=Ye({orgSlug:t,virtualMcpId:n,branch:d}),e[6]=d,e[7]=t,e[8]=n,e[9]=g):g=e[9];const B=Ke(g);let b;e[10]!==B?(b=B(me),e[10]=B,e[11]=b):b=e[11];const L=b,[h]=ne.useState(ht);if(c.blocked){let E;e[12]!==l?(E=l("sandbox.dateCampaigns.missing.title"),e[12]=l,e[13]=E):E=e[13];let Y;e[14]!==l?(Y=l("sandbox.dateCampaigns.missing.desc"),e[14]=l,e[15]=Y):Y=e[15];let q;e[16]!==E||e[17]!==Y?(q={title:E,description:Y},e[16]=E,e[17]=Y,e[18]=q):q=e[18];let Q;e[19]!==l?(Q=l("sandbox.dateCampaigns.replaced.title"),e[19]=l,e[20]=Q):Q=e[20];let X;e[21]!==l?(X=l("sandbox.dateCampaigns.replaced.desc"),e[21]=l,e[22]=X):X=e[22];let Z;e[23]!==X||e[24]!==Q?(Z={title:Q,description:X},e[23]=X,e[24]=Q,e[25]=Z):Z=e[25];let ee;e[26]!==l?(ee=l("sandbox.dateCampaigns.conflict.title"),e[26]=l,e[27]=ee):ee=e[27];let te;e[28]!==l?(te=l("sandbox.dateCampaigns.conflict.desc"),e[28]=l,e[29]=te):te=e[29];let se;e[30]!==ee||e[31]!==te?(se={title:ee,description:te},e[30]=ee,e[31]=te,e[32]=se):se=e[32];let le;e[33]!==Z||e[34]!==se||e[35]!==q?(le={missing:q,replaced:Z,conflict:se},e[33]=Z,e[34]=se,e[35]=q,e[36]=le):le=e[36];const ue=le[c.blocked];let oe;return e[37]!==ue?(oe=s.jsx(xt,{...ue}),e[37]=ue,e[38]=oe):oe=e[38],oe}let W,y,C;if(e[39]!==L||e[40]!==a||e[41]!==m||e[42]!==h||e[43]!==c){C=Symbol.for("react.early_return_sentinel");e:{y=at(a,c.published,h);let E;e[47]!==a||e[48]!==c.published?(E=rt(a,c.published),e[47]=a,e[48]=c.published,e[49]=E):E=e[49],W=E;const Y=y.find(q=>q.name===c.openName)??null;if(Y){C=s.jsx(_t,{...ze(c,Y,{decofile:a,meta:m})},`${Y.name}:${L}`);break e}}e[39]=L,e[40]=a,e[41]=m,e[42]=h,e[43]=c,e[44]=W,e[45]=y,e[46]=C}else W=e[44],y=e[45],C=e[46];if(C!==Symbol.for("react.early_return_sentinel"))return C;let $;e[50]!==l?($=l("sandbox.dateCampaigns.intro"),e[50]=l,e[51]=$):$=e[51];let z;e[52]===Symbol.for("react.memo_cache_sentinel")?(z=E=>{(E==="list"||E==="timeline")&&j(E)},e[52]=z):z=e[52];let O;e[53]===Symbol.for("react.memo_cache_sentinel")?(O=s.jsx(Ie,{}),e[53]=O):O=e[53];let R;e[54]!==l?(R=l("sandbox.dateCampaigns.listMode"),e[54]=l,e[55]=R):R=e[55];let v;e[56]!==R?(v=s.jsxs(we,{value:"list",children:[O,R]}),e[56]=R,e[57]=v):v=e[57];let M;e[58]===Symbol.for("react.memo_cache_sentinel")?(M=s.jsx(ce,{}),e[58]=M):M=e[58];let w;e[59]!==l?(w=l("sandbox.dateCampaigns.timelineMode"),e[59]=l,e[60]=w):w=e[60];let N;e[61]!==w?(N=s.jsxs(we,{value:"timeline",children:[M,w]}),e[61]=w,e[62]=N):N=e[62];let V;e[63]!==x||e[64]!==v||e[65]!==N?(V=s.jsxs(Oe,{type:"single",variant:"segmented",size:"sm",value:x,onValueChange:z,children:[v,N]}),e[63]=x,e[64]=v,e[65]=N,e[66]=V):V=e[66];let _;e[67]!==c?(_=()=>c.setCreating(!0),e[67]=c,e[68]=_):_=e[68];let k;e[69]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx(Ee,{size:16}),e[69]=k):k=e[69];let T;e[70]!==l?(T=l("sandbox.dateCampaigns.new"),e[70]=l,e[71]=T):T=e[71];let D;e[72]!==_||e[73]!==T?(D=s.jsxs(re,{size:"sm",onClick:_,children:[k,T]}),e[72]=_,e[73]=T,e[74]=D):D=e[74];let I;e[75]!==V||e[76]!==D?(I=s.jsxs(s.Fragment,{children:[V,D]}),e[75]=V,e[76]=D,e[77]=I):I=e[77];let S;e[78]!==I||e[79]!==$?(S=s.jsx(Ce,{intro:$,actions:I}),e[78]=I,e[79]=$,e[80]=S):S=e[80];let u;e[81]===Symbol.for("react.memo_cache_sentinel")?(u=pe("flex flex-col gap-4",ye),e[81]=u):u=e[81];let f;e[82]!==x||e[83]!==h||e[84]!==y||e[85]!==l||e[86]!==c.setOpenName?(f=y.length===0?s.jsxs("div",{className:"flex flex-col items-center gap-2 py-10 text-center",children:[s.jsx(ce,{size:24,className:"text-muted-foreground/60"}),s.jsx("p",{className:"text-sm font-medium",children:l("sandbox.dateCampaigns.empty.title")}),s.jsx("p",{className:"max-w-sm text-sm text-muted-foreground",children:l("sandbox.dateCampaigns.empty.desc")})]}):x==="list"?s.jsx(wt,{rows:y,onOpen:c.setOpenName}):s.jsx(Nt,{rows:y,now:h,onOpen:c.setOpenName}),e[82]=x,e[83]=h,e[84]=y,e[85]=l,e[86]=c.setOpenName,e[87]=f):f=e[87];let A;e[88]!==W?(A=s.jsx(We,{kind:"campaigns",removed:W}),e[88]=W,e[89]=A):A=e[89];let F;e[90]!==f||e[91]!==A?(F=s.jsx(Se,{className:"min-h-0 flex-1",children:s.jsxs("div",{className:u,children:[f,A]})}),e[90]=f,e[91]=A,e[92]=F):F=e[92];const U=c.creating,J=c.setCreating;let P;e[93]!==y?(P=y.map(bt),e[93]=y,e[94]=P):P=e[94];let H;e[95]!==P||e[96]!==c.create||e[97]!==c.creating||e[98]!==c.isPending||e[99]!==c.setCreating?(H=s.jsx(Fe,{kind:"campaigns",open:U,onOpenChange:J,existingNames:P,pending:c.isPending,onCreate:c.create}),e[95]=P,e[96]=c.create,e[97]=c.creating,e[98]=c.isPending,e[99]=c.setCreating,e[100]=H):H=e[100];let K;return e[101]!==S||e[102]!==F||e[103]!==H?(K=s.jsxs("div",{className:"flex h-full w-full flex-col",children:[S,F,H]}),e[101]=S,e[102]=F,e[103]=H,e[104]=K):K=e[104],K}function bt(i){return i.name}function ht(){return new Date}function wt(i){const e=G.c(9),{rows:t,onOpen:n}=i,d=ae();let a;if(e[0]!==n||e[1]!==t||e[2]!==d){let r;e[4]!==n||e[5]!==d?(r=o=>s.jsxs("li",{className:"group relative flex items-center gap-4 px-4 py-3 hover:bg-muted/50","data-testid":"campaign-row",children:[s.jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[s.jsx("button",{type:"button",onClick:()=>n(o.name),className:"truncate text-left text-sm font-medium after:absolute after:inset-0 focus-visible:outline-none focus-visible:after:ring-2 focus-visible:after:ring-ring focus-visible:after:ring-inset",children:o.name}),s.jsx("span",{className:"truncate text-xs text-muted-foreground",children:ge(o.window,d("sectionsEditor.namedRulePicker.alwaysRunning"))})]}),s.jsx("div",{className:"hidden w-40 shrink-0 md:flex",children:s.jsx(Le,{kind:"campaigns",state:o.entryState})}),s.jsx("div",{className:"flex w-32 shrink-0",children:s.jsx(ve,{status:o.status})})]},o.name),e[4]=n,e[5]=d,e[6]=r):r=e[6],a=t.map(r),e[0]=n,e[1]=t,e[2]=d,e[3]=a}else a=e[3];let m;return e[7]!==a?(m=s.jsx("ul",{className:"divide-y divide-border rounded-md border border-border","data-testid":"campaigns-list",children:a}),e[7]=a,e[8]=m):m=e[8],m}function Nt(i){const e=G.c(50),{rows:t,now:n,onOpen:d}=i,a=ae();let m;e[0]!==n||e[1]!==t?(m=()=>ct(t.map(vt),n,ie),e[0]=n,e[1]=t,e[2]=m):m=e[2];const[r,o]=ne.useState(m);let l,p,c,x,j,g;if(e[3]!==r||e[4]!==n||e[5]!==d||e[6]!==t||e[7]!==a){const L=de(r,ie),h=Array.from({length:ie},(S,u)=>de(r,u)),W=fe({start:n.toISOString(),end:new Date(n.getTime()+1).toISOString()},r,L),C=t.map(S=>({row:S,bar:fe(S.window,r,L)})).filter(Ct);x="flex flex-col gap-2",j="campaigns-timeline";let $;e[14]!==n?($=()=>o(Ze(n)),e[14]=n,e[15]=$):$=e[15];let z;e[16]!==a?(z=a("sandbox.dateCampaigns.today"),e[16]=a,e[17]=z):z=e[17];let O;e[18]!==$||e[19]!==z?(O=s.jsx(re,{variant:"outline",size:"sm",onClick:$,children:z}),e[18]=$,e[19]=z,e[20]=O):O=e[20];let R;e[21]!==a?(R=a("sandbox.dateCampaigns.previous"),e[21]=a,e[22]=R):R=e[22];let v,M;e[23]===Symbol.for("react.memo_cache_sentinel")?(v=()=>o(yt),M=s.jsx(Re,{size:16}),e[23]=v,e[24]=M):(v=e[23],M=e[24]);let w;e[25]!==R?(w=s.jsx(re,{variant:"ghost",size:"icon",className:"size-8","aria-label":R,onClick:v,children:M}),e[25]=R,e[26]=w):w=e[26];let N;e[27]!==a?(N=a("sandbox.dateCampaigns.next"),e[27]=a,e[28]=N):N=e[28];let V,_;e[29]===Symbol.for("react.memo_cache_sentinel")?(V=()=>o(St),_=s.jsx(ke,{size:16}),e[29]=V,e[30]=_):(V=e[29],_=e[30]);let k;e[31]!==N?(k=s.jsx(re,{variant:"ghost",size:"icon",className:"size-8","aria-label":N,onClick:V,children:_}),e[31]=N,e[32]=k):k=e[32],e[33]!==O||e[34]!==w||e[35]!==k?(g=s.jsxs("div",{className:"flex items-center gap-2",children:[O,w,k]}),e[33]=O,e[34]=w,e[35]=k,e[36]=g):g=e[36],l="relative min-w-[640px] rounded-md border border-border";let T;e[37]===Symbol.for("react.memo_cache_sentinel")?(T=s.jsx("div",{className:"w-48 shrink-0 border-r"}),e[37]=T):T=e[37];let D;e[38]===Symbol.for("react.memo_cache_sentinel")?(D={gridTemplateColumns:`repeat(${ie}, minmax(0, 1fr))`},e[38]=D):D=e[38];const I=h.map(jt);e[39]!==I?(p=s.jsxs("div",{className:"flex border-b",children:[T,s.jsx("div",{className:"grid flex-1",style:D,children:I})]}),e[39]=I,e[40]=p):p=e[40],c=C.length===0?s.jsx("p",{className:"px-3 py-6 text-center text-sm text-muted-foreground",children:a("sandbox.dateCampaigns.nothingInRange")}):C.map(S=>{const{row:u,bar:f}=S,A=mt(f,u.name);return s.jsxs("div",{className:"flex h-9 items-center border-b last:border-b-0",children:[s.jsx("div",{className:"w-48 shrink-0 truncate border-r px-3 text-sm",children:u.name}),s.jsxs("div",{className:"relative h-full flex-1",children:[W&&s.jsx("div",{className:"pointer-events-none absolute top-0 bottom-0 w-px bg-primary/70",style:{left:`${W.left}%`}}),s.jsx("button",{type:"button",onClick:()=>d(u.name),"aria-label":u.name,title:ge(u.window,a("sectionsEditor.namedRulePicker.alwaysRunning")),className:pe("absolute top-1/2 h-6 -translate-y-1/2 truncate rounded text-left text-2xs font-medium",A==="inside"&&"px-2",pt[u.status],f.openStart&&"rounded-l-none",f.openEnd&&"rounded-r-none"),style:{left:`${f.left}%`,width:`max(calc(${f.width}% - 2px), 6px)`},"data-label":A,children:A==="inside"?u.name:null}),A!=="inside"&&s.jsx("button",{type:"button",tabIndex:-1,"aria-hidden":"true",onClick:()=>d(u.name),className:"absolute top-1/2 -translate-y-1/2 truncate whitespace-nowrap text-left text-2xs font-medium text-foreground hover:underline",style:A==="after"?{left:`calc(${f.left+f.width}% + 6px)`,maxWidth:`calc(${100-f.left-f.width}% - 6px)`}:{right:`calc(${100-f.left}% + 6px)`,maxWidth:`calc(${f.left}% - 6px)`},title:u.name,"data-testid":"campaign-bar-label",children:u.name})]})]},u.name)}),e[3]=r,e[4]=n,e[5]=d,e[6]=t,e[7]=a,e[8]=l,e[9]=p,e[10]=c,e[11]=x,e[12]=j,e[13]=g}else l=e[8],p=e[9],c=e[10],x=e[11],j=e[12],g=e[13];let B;e[41]!==l||e[42]!==p||e[43]!==c?(B=s.jsxs("div",{className:l,children:[p,c]}),e[41]=l,e[42]=p,e[43]=c,e[44]=B):B=e[44];let b;return e[45]!==x||e[46]!==j||e[47]!==g||e[48]!==B?(b=s.jsxs("div",{className:x,"data-testid":j,children:[g,B]}),e[45]=x,e[46]=j,e[47]=g,e[48]=B,e[49]=b):b=e[49],b}function jt(i){return s.jsxs("div",{className:"border-r px-2 py-1.5 text-xs text-muted-foreground last:border-r-0",children:[Xe[i.getMonth()]?.slice(0,3)," ",i.getFullYear()]},i.getTime())}function St(i){return de(i,ie)}function yt(i){return de(i,-ie)}function Ct(i){return i.bar!==null}function vt(i){return i.window}function _t(i){const e=G.c(72),{row:t,decofile:n,pending:d,holdsCopy:a,onBack:m,onSave:r}=i,o=ae(),l=n[me];let p;e[0]!==t.window.start?(p=Ne(t.window.start),e[0]=t.window.start,e[1]=p):p=e[1];let c;e[2]!==t.window.end?(c=Ne(t.window.end),e[2]=t.window.end,e[3]=c):c=e[3];let x;e[4]!==l||e[5]!==p||e[6]!==c?(x={block:l,start:p,end:c},e[4]=l,e[5]=p,e[6]=c,e[7]=x):x=e[7];const j=x,[g,B]=ne.useState(j),[b,L]=ne.useState(j.start),[h,W]=ne.useState(j.end);a&&b===g.start&&h===g.end&&ut(j.block,g.block)&&(B(j),L(j.start),W(j.end));let y;e[8]!==h||e[9]!==b?(y=Ue(b,h),e[8]=h,e[9]=b,e[10]=y):y=e[10];const C=y,$=a?g:j,z="window"in C&&(b!==$.start||h!==$.end);let O;e[11]!==n||e[12]!==h||e[13]!==a||e[14]!==r||e[15]!==t.name||e[16]!==g||e[17]!==b||e[18]!==C?(O=()=>{if(!("window"in C))return;const K=He(n,"campaigns",t.name,C.window);if(!K||!a){r(K);return}r({...K,basis:{[me]:g.block}}).then(E=>{E&&B({block:K.writes[me],start:b,end:h})})},e[11]=n,e[12]=h,e[13]=a,e[14]=r,e[15]=t.name,e[16]=g,e[17]=b,e[18]=C,e[19]=O):O=e[19];const R=O;let v;e[20]!==o?(v=o("sandbox.dateCampaigns.allCampaigns"),e[20]=o,e[21]=v):v=e[21];let M;e[22]!==m||e[23]!==v?(M={label:v,onClick:m},e[22]=m,e[23]=v,e[24]=M):M=e[24];let w;e[25]!==i?(w=s.jsx(Ge,{kind:"campaigns",detail:i}),e[25]=i,e[26]=w):w=e[26];let N;e[27]!==M||e[28]!==w?(N=s.jsx(Ce,{back:M,actions:w}),e[27]=M,e[28]=w,e[29]=N):N=e[29];let V;e[30]===Symbol.for("react.memo_cache_sentinel")?(V=pe("flex max-w-2xl flex-col gap-6",ye),e[30]=V):V=e[30];let _;e[31]!==t.status?(_=s.jsx(ve,{status:t.status}),e[31]=t.status,e[32]=_):_=e[32];let k;e[33]!==t.entryState||e[34]!==t.name||e[35]!==_?(k=s.jsx(Pe,{kind:"campaigns",name:t.name,status:_,entryState:t.entryState}),e[33]=t.entryState,e[34]=t.name,e[35]=_,e[36]=k):k=e[36];let T;e[37]!==h||e[38]!==b?(T=s.jsx(Je,{idPrefix:"campaign",className:"max-w-md",start:b,end:h,onStartChange:L,onEndChange:W}),e[37]=h,e[38]=b,e[39]=T):T=e[39];let D;e[40]!==o||e[41]!==C?(D="problem"in C&&s.jsx("p",{className:"text-xs text-destructive",children:o("sectionsEditor.namedRules.endBeforeStart")}),e[40]=o,e[41]=C,e[42]=D):D=e[42];let I;e[43]!==t.status||e[44]!==o?(I=t.status==="unreadable"&&s.jsx("p",{className:"text-xs text-muted-foreground",children:o("sandbox.dateCampaigns.unreadableHint")}),e[43]=t.status,e[44]=o,e[45]=I):I=e[45];let S;e[46]!==o?(S=o("sectionsEditor.namedRules.windowHint"),e[46]=o,e[47]=S):S=e[47];let u;e[48]!==S?(u=s.jsx("p",{className:"text-xs text-muted-foreground",children:S}),e[48]=S,e[49]=u):u=e[49];let f;e[50]!==t.publishedWindow||e[51]!==o?(f=t.publishedWindow&&s.jsx("p",{className:"text-xs text-muted-foreground",children:o("sandbox.dateCampaigns.publishedWindow",{window:ge(t.publishedWindow,o("sectionsEditor.namedRulePicker.alwaysRunning"))})}),e[50]=t.publishedWindow,e[51]=o,e[52]=f):f=e[52];const A=d||!z;let F;e[53]!==o?(F=o("sandbox.dateCampaigns.saveDates"),e[53]=o,e[54]=F):F=e[54];let U;e[55]!==R||e[56]!==A||e[57]!==F?(U=s.jsx("div",{children:s.jsx(re,{size:"sm",disabled:A,onClick:R,children:F})}),e[55]=R,e[56]=A,e[57]=F,e[58]=U):U=e[58];let J;e[59]!==T||e[60]!==D||e[61]!==I||e[62]!==u||e[63]!==f||e[64]!==U?(J=s.jsxs("section",{className:"flex flex-col gap-2",children:[T,D,I,u,f,U]}),e[59]=T,e[60]=D,e[61]=I,e[62]=u,e[63]=f,e[64]=U,e[65]=J):J=e[65];let P;e[66]!==k||e[67]!==J?(P=s.jsx(Se,{className:"min-h-0 flex-1",children:s.jsxs("div",{className:V,children:[k,J]})}),e[66]=k,e[67]=J,e[68]=P):P=e[68];let H;return e[69]!==P||e[70]!==N?(H=s.jsxs("div",{className:"flex h-full w-full flex-col",children:[N,P]}),e[69]=P,e[70]=N,e[71]=H):H=e[71],H}function kt(){const i=G.c(1);let e;return i[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsxs("div",{className:"flex flex-col gap-3 p-4","data-testid":"calendar-skeleton","aria-busy":"true",children:[s.jsx(he,{className:"h-6 w-40"}),s.jsx(he,{className:"h-40 w-full"})]}),i[0]=e):e=i[0],e}function Tt(i){const e=G.c(21),{virtualMcpId:t}=i,n=ae();let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(ce,{size:28,className:"text-muted-foreground"}),e[0]=d):d=e[0];let a;e[1]!==n?(a=n("sandbox.calendarView.noDraft.title"),e[1]=n,e[2]=a):a=e[2];let m;e[3]!==n?(m=n("sandbox.calendarView.noDraft.desc"),e[3]=n,e[4]=m):m=e[4];let r;e[5]!==n?(r=n("sandbox.calendarView.loadFailed"),e[5]=n,e[6]=r):r=e[6];let o;e[7]!==n?(o=n("sandbox.calendarView.loadFailedHint"),e[7]=n,e[8]=o):o=e[8];let l;e[9]!==a||e[10]!==m||e[11]!==r||e[12]!==o?(l={noDraftTitle:a,noDraftDesc:m,loadFailed:r,loadFailedHint:o},e[9]=a,e[10]=m,e[11]=r,e[12]=o,e[13]=l):l=e[13];let p;e[14]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(kt,{}),e[14]=p):p=e[14];let c;e[15]!==t?(c=j=>{const{orgSlug:g,branch:B,decofile:b,meta:L}=j;return s.jsx("div",{className:"h-full w-full","data-testid":"calendar-view",children:s.jsx(gt,{orgSlug:g,virtualMcpId:t,branch:B,decofile:b,meta:L,initialView:"timeline"})})},e[15]=t,e[16]=c):c=e[16];let x;return e[17]!==l||e[18]!==c||e[19]!==t?(x=s.jsx(et,{virtualMcpId:t,icon:d,copy:l,skeleton:p,children:c}),e[17]=l,e[18]=c,e[19]=t,e[20]=x):x=e[20],x}function Dt(){const i=G.c(4),e=it();if(st(e)){let n;return i[0]!==e?(n=s.jsx(Tt,{virtualMcpId:e}),i[0]=e,i[1]=n):n=i[1],n}let t;return i[2]!==e?(t=s.jsx(tt,{virtualMcpId:e}),i[2]=e,i[3]=t):t=i[3],t}function Xn(){const i=G.c(1);let e;return i[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Te.Content,{actions:s.jsx(De,{blocksOnly:!0}),children:s.jsx(Dt,{})}),i[0]=e):e=i[0],e}export{Xn as default};
|
package/dist/client/assets/{agent-capabilities-C80Nj8dH.js → agent-capabilities-BGShibnD.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{f as n}from"./repository-binding-
|
|
1
|
+
import{f as n}from"./repository-binding-C0msapZZ.js";function r(t){if(typeof t!="object"||t===null)return!1;const o=t.repository?.url;return typeof o=="string"&&o.length>0}function a(t){return n(t).status==="attached"}function c(t){const e=n(t).status;return e==="attached"||e==="detached"}export{r as a,c as b,a as c};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as M,j as i,r as _,R as F,b as w,a5 as L,W as U,T as W,e as $}from"./index-DEZ1imMJ.js";import{C as D}from"./index-CnOVjrIG.js";import{u as B}from"./use-mcp-client-DJjkIlNp.js";import{C as H,a as K}from"./companion-mcps-section-BKP3xr1j.js";import{c as q}from"./use-connect-companion-CowVgnp9.js";import{C as v,a as z}from"./connect-layout-DUesEwTl.js";import{p as G}from"./self-tool-result-8OxPN9Nm.js";import{a as J}from"./autosend-B0POegpm.js";import"./use-mobile-CJITN8uI.js";import"./use-sidebar-collapsed-DcAIYhdp.js";import"./use-chat-layout-state-BG2-xqQp.js";import"./thread-route-B-uAlF3E.js";import"./thread-intent-DuI80508.js";import"./delay-CnY5UFtP.js";import"./watch-sse-pool-DhoYakYc.js";import"./task-board-D3wT6_aG.js";import"./schema-9jBUPMLq.js";import"./agent-icon-CTbTFMnU.js";import"./AlertCircle-Co3RPbIZ.js";import"./Tool01-Bo2g-Ylw.js";import"./ArrowUp-DLnkUu9S.js";import"./ArrowLeft-XBSBGQal.js";import"./LinkBroken01-loTkm0G5.js";import"./ShoppingBag01-zloi0TDl.js";import"./Globe04-D17A2x5l.js";import"./CheckCircle-kNwBDDVU.js";import"./ChevronUp-D1T3kSyr.js";import"./ChevronSelectorVertical-Gg7YcxlH.js";import"./UserSquare-Qd-FKVqK.js";import"./CreditCard01-D65BAIaV.js";import"./SwitchHorizontal01-elXb4-4d.js";import"./Key01-awxHKnoL.js";import"./Minus-CYrsmoRb.js";import"./Monitor01-DalIAdj7.js";import"./Sun-C1lyqton.js";import"./Play-C6Weq-wk.js";import"./Plus-D7X8Q2-q.js";import"./SearchMd-e6xPeRPD.js";import"./Trash01-C-PU5Hm-.js";import"./Upload01-NPnXKs-J.js";import"./Users01-CTNixqdX.js";import"./XClose-BuJ6u6eL.js";import"./Zap-pmN7zSOE.js";import"./tooltip-Dam-ym8O.js";import"./index-DsbWutG1.js";import"./toolbar-icon-button-BmJKmAUK.js";import"./shell-layout-BLRNx2fV.js";import"./use-deployment-admin-CS9K9Ea9.js";import"./admin-fetch-BhTJlAsX.js";import"./use-project-scope-pwqcjGo8.js";import"./repository-binding-C0msapZZ.js";import"./command-DA2t4jTW.js";import"./index-DYgzDE_k.js";import"./integration-icon-CFHOt7sY.js";import"./project-icon-rrJh6PJx.js";import"./use-navigate-to-agent-MlXDIBYX.js";import"./use-debounced-value-yZdJ1f2K.js";import"./new-project-dialog-Dfe2Pik9.js";import"./label-BEWDSeNl.js";import"./repository-picker-BYFeDBpn.js";import"./github-icon-BVy-v7gH.js";import"./useInfiniteQuery-CtNfxLxq.js";import"./infiniteQueryObserver-C0Gb02df.js";import"./collection-search-Din8SB5Y.js";import"./use-organization-settings-bWX185lw.js";import"./legacy-admin-welcome-dialog-B223MrIf.js";import"./drawer-BYGTIOoj.js";import"./required-auth-layout-DfUx9vzb.js";import"./use-org-sso-Bo72RJ5p.js";import"./sheet-D2hfPw7P.js";import"./resizable-CHI5UJHW.js";import"./auth-CQxDIkM-.js";import"./site-url-en5df9c-.js";import"./companions-core-DhUD88pR.js";import"./metadata-D72DunRR.js";import"./github-repo-scope-C58hYmYC.js";import"./form-gd_hA5VT.js";import"./icon-button-Ze0c1pwp.js";import"./useQueries-B3iHMIbL.js";import"./authenticate-and-persist-oauth-o7XKLq_6.js";import"./mcp-oauth-CHmbtYyN.js";import"./mcp-oauth-BBT3ip6Z.js";import"./track-Dj7QHX2C.js";import"./extract-connection-data-hvaA6rrK.js";import"./connection-giFDA0-u.js";import"./url-slug-BMHzx0XY.js";function Q(e){const t=M.c(7),{onClose:l}=e,n=w();let r;t[0]!==n?(r=n("routes.reportsOnboarding.connectModal.loadError"),t[0]=n,t[1]=r):r=t[1];let o;t[2]!==r?(o=i.jsx("p",{className:"text-sm text-muted-foreground",children:r}),t[2]=r,t[3]=o):o=t[3];let s;return t[4]!==l||t[5]!==o?(s=i.jsx(v,{onClose:l,footer:null,children:o}),t[4]=l,t[5]=o,t[6]=s):s=t[6],s}function V(){const e=M.c(10),{closePanel:t}=J();let l;e[0]!==t?(l=()=>t(),e[0]=t,e[1]=l):l=e[1];const n=l;let r;e[2]!==n?(r=()=>i.jsx(Q,{onClose:n}),e[2]=n,e[3]=r):r=e[3];let o;e[4]===Symbol.for("react.memo_cache_sentinel")?(o=i.jsx(H,{}),e[4]=o):o=e[4];let s;e[5]!==n?(s=i.jsx(_.Suspense,{fallback:i.jsx(v,{onClose:n,footer:null,children:o}),children:i.jsx(X,{onDone:n,onClose:n})}),e[5]=n,e[6]=s):s=e[6];let m;return e[7]!==r||e[8]!==s?(m=i.jsx("div",{className:"flex h-full min-h-0 flex-col overflow-hidden",children:i.jsx(F,{fallback:r,children:s})}),e[7]=r,e[8]=s,e[9]=m):m=e[9],m}function X(e){const t=M.c(46),{onDone:l,onClose:n}=e,r=w(),{org:o}=L();let s;t[0]!==o.id?(s=U.REPORTS(o.id),t[0]=o.id,t[1]=s):s=t[1];const m=s;let b;t[2]!==o.id||t[3]!==o.slug?(b={connectionId:W,orgId:o.id,orgSlug:o.slug},t[2]=o.id,t[3]=o.slug,t[4]=b):b=t[4];const a=B(b);let P;t[5]!==m||t[6]!==o||t[7]!==a?(P={selfClient:a,org:o,cdConnectionId:m},t[5]=m,t[6]=o,t[7]=a,t[8]=P):P=t[8];const c=q(P),[I,k]=_.useState(!1),[R,N]=_.useState(null);let y;t[9]!==a?(y={mutationFn:async A=>G(await a.callTool({name:"REPORTS_RUN",arguments:{siteUrl:A}})),retry:!1},t[9]=a,t[10]=y):y=t[10];const p=$(y);let T;t[11]!==l||t[12]!==p||t[13]!==c||t[14]!==r?(T=async()=>{if(N(null),c)try{await p.mutateAsync(c)}catch{N(r("routes.reportsOnboarding.connectModal.somethingWentWrong"));return}l()},t[11]=l,t[12]=p,t[13]=c,t[14]=r,t[15]=T):T=t[15];const O=T;let u;t[16]!==R?(u=R?i.jsx("p",{className:"text-sm leading-5 text-destructive",role:"alert",children:R}):null,t[16]=R,t[17]=u):u=t[17];let f;t[18]!==p.isPending||t[19]!==r?(f=p.isPending?r("routes.reportsOnboarding.connectSourcesTab.refreshing"):r("routes.reportsOnboarding.connectSourcesTab.refresh"),t[18]=p.isPending,t[19]=r,t[20]=f):f=t[20];let d;t[21]!==O?(d=()=>{O()},t[21]=O,t[22]=d):d=t[22];let x;t[23]!==I||t[24]!==p.isPending||t[25]!==f||t[26]!==d?(x=i.jsx(z,{ready:I,pending:p.isPending,label:f,onClick:d}),t[23]=I,t[24]=p.isPending,t[25]=f,t[26]=d,t[27]=x):x=t[27];let g;t[28]!==u||t[29]!==x?(g=i.jsxs(i.Fragment,{children:[u,x]}),t[28]=u,t[29]=x,t[30]=g):g=t[30];let C;t[31]!==r?(C=r("routes.reportsOnboarding.connectSourcesTab.title"),t[31]=r,t[32]=C):C=t[32];let h;t[33]!==C?(h=i.jsx("h2",{className:"text-xl font-medium leading-tight text-foreground",children:C}),t[33]=C,t[34]=h):h=t[34];let S;t[35]!==m||t[36]!==o||t[37]!==c?(S=i.jsx(K,{org:o,cdConnectionId:m,siteUrl:c,onReadinessChange:k}),t[35]=m,t[36]=o,t[37]=c,t[38]=S):S=t[38];let j;t[39]!==h||t[40]!==S?(j=i.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-8 overflow-y-auto",children:[h,S]}),t[39]=h,t[40]=S,t[41]=j):j=t[41];let E;return t[42]!==n||t[43]!==g||t[44]!==j?(E=i.jsx(v,{onClose:n,footer:g,children:j}),t[42]=n,t[43]=g,t[44]=j,t[45]=E):E=t[45],E}function _e(){const e=M.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=i.jsx(D.Content,{children:i.jsx(V,{})}),e[0]=t):t=e[0],t}export{_e as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c,j as p,bB as b,u as g}from"./index-DEZ1imMJ.js";import{C as j}from"./index-CnOVjrIG.js";import{F as v,H as S}from"./file-share-button-CFBrVPAQ.js";import{c as k,a as y,e as _}from"./use-org-fs-BH012Up0.js";import{S as w}from"./settings-tab-CHBeACws.js";import{b as M}from"./thread-route-B-uAlF3E.js";import"./use-mobile-CJITN8uI.js";import"./use-sidebar-collapsed-DcAIYhdp.js";import"./use-chat-layout-state-BG2-xqQp.js";import"./autosend-B0POegpm.js";import"./use-project-scope-pwqcjGo8.js";import"./repository-binding-C0msapZZ.js";import"./use-mcp-client-DJjkIlNp.js";import"./auth-CQxDIkM-.js";import"./thread-intent-DuI80508.js";import"./delay-CnY5UFtP.js";import"./watch-sse-pool-DhoYakYc.js";import"./task-board-D3wT6_aG.js";import"./schema-9jBUPMLq.js";import"./agent-icon-CTbTFMnU.js";import"./AlertCircle-Co3RPbIZ.js";import"./Tool01-Bo2g-Ylw.js";import"./ArrowUp-DLnkUu9S.js";import"./ArrowLeft-XBSBGQal.js";import"./LinkBroken01-loTkm0G5.js";import"./ShoppingBag01-zloi0TDl.js";import"./Globe04-D17A2x5l.js";import"./CheckCircle-kNwBDDVU.js";import"./ChevronUp-D1T3kSyr.js";import"./ChevronSelectorVertical-Gg7YcxlH.js";import"./UserSquare-Qd-FKVqK.js";import"./CreditCard01-D65BAIaV.js";import"./SwitchHorizontal01-elXb4-4d.js";import"./Key01-awxHKnoL.js";import"./Minus-CYrsmoRb.js";import"./Monitor01-DalIAdj7.js";import"./Sun-C1lyqton.js";import"./Play-C6Weq-wk.js";import"./Plus-D7X8Q2-q.js";import"./SearchMd-e6xPeRPD.js";import"./Trash01-C-PU5Hm-.js";import"./Upload01-NPnXKs-J.js";import"./Users01-CTNixqdX.js";import"./XClose-BuJ6u6eL.js";import"./Zap-pmN7zSOE.js";import"./tooltip-Dam-ym8O.js";import"./index-DsbWutG1.js";import"./toolbar-icon-button-BmJKmAUK.js";import"./shell-layout-BLRNx2fV.js";import"./use-deployment-admin-CS9K9Ea9.js";import"./admin-fetch-BhTJlAsX.js";import"./command-DA2t4jTW.js";import"./index-DYgzDE_k.js";import"./integration-icon-CFHOt7sY.js";import"./project-icon-rrJh6PJx.js";import"./use-navigate-to-agent-MlXDIBYX.js";import"./use-debounced-value-yZdJ1f2K.js";import"./new-project-dialog-Dfe2Pik9.js";import"./label-BEWDSeNl.js";import"./repository-picker-BYFeDBpn.js";import"./github-icon-BVy-v7gH.js";import"./useInfiniteQuery-CtNfxLxq.js";import"./infiniteQueryObserver-C0Gb02df.js";import"./collection-search-Din8SB5Y.js";import"./use-organization-settings-bWX185lw.js";import"./legacy-admin-welcome-dialog-B223MrIf.js";import"./drawer-BYGTIOoj.js";import"./required-auth-layout-DfUx9vzb.js";import"./use-org-sso-Bo72RJ5p.js";import"./sheet-D2hfPw7P.js";import"./resizable-CHI5UJHW.js";import"./popover-DsvzKyw_.js";import"./index-i75UpmlW.js";import"./extract-connection-data-hvaA6rrK.js";import"./metadata-D72DunRR.js";import"./connection-giFDA0-u.js";import"./url-slug-BMHzx0XY.js";import"./chat-context-PvP_Q1CV.js";import"./use-entitlements-DidlVdLU.js";import"./use-ai-providers-DwpUgHpj.js";import"./use-decopilot-events-C_C16-Ln.js";import"./build-improve-prompt-doc-DNVGwsoG.js";import"./empty-state-CtwVPMDf.js";import"./use-date-fns-locale-bKU2Q73X.js";import"./mcp-oauth-CHmbtYyN.js";import"./mcp-oauth-BBT3ip6Z.js";import"./textarea-_jcGqOvl.js";import"./use-connection-BozgIoMu.js";import"./use-debounced-autosave-BmvZzlB_.js";import"./add-connection-dialog-BL3Uj9Py.js";import"./connection-card-CPhS4jEh.js";import"./connection-slug-DTdYIX0A.js";import"./form-gd_hA5VT.js";import"./select-BJaUvbIR.js";import"./index-BdQq_4o_.js";import"./schema-BFmIytlm.js";import"./connection-form-helpers-CRMRmqMW.js";import"./authenticate-and-persist-oauth-o7XKLq_6.js";import"./collection-tabs-BJDa_4_F.js";import"./badge-BpzeYR5Z.js";import"./use-infinite-scroll-CED9GMTE.js";import"./useSuspenseInfiniteQuery-OzDVxqdl.js";import"./file-type-icon-DM9o0Fkb.js";import"./use-mcp-auth-status-Dls0bLQE.js";import"./types-gyofjZHf.js";import"./checkbox-Bk98t4UK.js";import"./use-mcp-tools-wfurU0oX.js";import"./use-mcp-prompts-it9pO2QZ.js";import"./utils-CVEq3hMx.js";import"./switch-C53DVv3y.js";import"./scroll-area-CQ_g6hBm.js";import"./agent-capabilities-BGShibnD.js";import"./use-project-native-view-presence-DhhbOsoh.js";import"./match-site-slug-config-D3fUJ6vX.js";import"./use-file-configs-DhXDYO83.js";import"./use-blocks-v8-project-4PZwWSEO.js";import"./optimistic-project-sidebar-views-BcV4r24I.js";import"./sections-C_Jmzzpn.js";import"./use-copy-o0P-kroy.js";import"./roles-DW32thi2.js";import"./virtual-mcp-vRvxAZ15.js";import"./sandbox-url-D3mC8qhT.js";import"./secret-picker-VlsiGxPi.js";import"./use-secrets-Dim43C3b.js";import"./omit-server-managed-metadata-L5IhjRZB.js";import"./app-preview-url-9Od4s8Sz.js";import"./serial-task-queue-CGOeQgpr.js";const x="home";function P(i){const t=c.c(5),{label:r}=i;let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=p.jsx(b,{className:"aspect-video w-2/3 max-w-xl"}),t[0]=e):e=t[0];let o;t[1]!==r?(o=r&&p.jsx("p",{className:"text-xs text-muted-foreground",children:r}),t[1]=r,t[2]=o):o=t[2];let m;return t[3]!==o?(m=p.jsxs("div",{className:"flex h-full w-full flex-col items-center justify-center gap-3 bg-background",children:[e,o]}),t[3]=o,t[4]=m):m=t[4],m}function D(i){const t=c.c(15),{path:r}=i;let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={refetchIntervalWhenAbsent:2e3},t[0]=e):e=t[0];const o=k(x,r,e),m=y(x)(r);if(o.isPending||!o.data){const h=!o.isPending&&!o.data?"Waiting for the deck to sync…":void 0;let l;return t[1]!==h?(l=p.jsx(P,{label:h}),t[1]=h,t[2]=l):l=t[2],l}let s;t[3]!==o.data?(s=_(o.data),t[3]=o.data,t[4]=s):s=t[4];const f=o.data.shareMode??"private",u=o.data.effectivePublic??!1,d=window.location.origin+m;let a;t[5]!==r||t[6]!==f||t[7]!==u||t[8]!==d?(a=p.jsx(v,{volume:x,path:r,shareMode:f,effectivePublic:u,url:d}),t[5]=r,t[6]=f,t[7]=u,t[8]=d,t[9]=a):a=t[9];let n;return t[10]!==r||t[11]!==m||t[12]!==s||t[13]!==a?(n=p.jsx(S,{readUrl:m,marker:s,title:r,savePath:r,trailing:a}),t[10]=r,t[11]=m,t[12]=s,t[13]=a,t[14]=n):n=t[14],n}function C(){const i=c.c(4);let t;i[0]===Symbol.for("react.memo_cache_sentinel")?(t={strict:!1},i[0]=t):t=i[0];const r=g(t),e=M(),o="path"in r&&typeof r.path=="string"?r.path:void 0;let m;return i[1]!==o||i[2]!==e?(m=o?p.jsx(D,{path:o},o):p.jsx(w,{virtualMcpId:e}),i[1]=o,i[2]=e,i[3]=m):m=i[3],m}function Qo(){const i=c.c(1);let t;return i[0]===Symbol.for("react.memo_cache_sentinel")?(t=p.jsx(j.Content,{children:p.jsx(C,{})}),i[0]=t):t=i[0],t}export{Qo as default};
|