decocms 4.501.0 → 4.502.1
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/{ActiveShapeUtils-D-fL_h7g.js → ActiveShapeUtils-Dpaml8J5.js} +1 -1
- package/dist/client/assets/{AlertCircle-D3bAofoi.js → AlertCircle-CxMEbIvM.js} +1 -1
- package/dist/client/assets/{AreaChart-BkD3ldvt.js → AreaChart-BgtEgMgW.js} +1 -1
- package/dist/client/assets/{ArrowLeft-Cdobx1UV.js → ArrowLeft-ChZ5XGHH.js} +1 -1
- package/dist/client/assets/{ArrowUp-D_3dn5Sd.js → ArrowUp-BseWcDxZ.js} +1 -1
- package/dist/client/assets/{BarChart-DdPh9tNP.js → BarChart-IN_s5p-k.js} +1 -1
- package/dist/client/assets/{Building02-Bh6iwr2R.js → Building02-BCzHZCeO.js} +1 -1
- package/dist/client/assets/{CategoricalChart-tLM_K2Lc.js → CategoricalChart-CN6eSF60.js} +1 -1
- package/dist/client/assets/{CheckCircle-BQiYUYV1.js → CheckCircle-BRmDGKsS.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-CpMmf6o-.js → ChevronSelectorVertical-DXUxjCek.js} +1 -1
- package/dist/client/assets/{ChevronUp-CfnfCq3M.js → ChevronUp-B7Vn1Rb2.js} +1 -1
- package/dist/client/assets/{Copy01-CKF8jrEa.js → Copy01-BeZeYuYP.js} +1 -1
- package/dist/client/assets/{CreditCard01-B4jz404y.js → CreditCard01-CR3uiUwh.js} +1 -1
- package/dist/client/assets/{DotsVertical-BVuRRGqu.js → DotsVertical-C85_hpnn.js} +1 -1
- package/dist/client/assets/{ErrorBarContext-D3QRg5_X.js → ErrorBarContext-dTYYBaMt.js} +1 -1
- package/dist/client/assets/{Globe04-CfnS-Tur.js → Globe04-DTEEsJ26.js} +1 -1
- package/dist/client/assets/{Image01-C6EZAhw4.js → Image01-BcbXjZdM.js} +1 -1
- package/dist/client/assets/{Key01-C3bTgL7y.js → Key01-BnDtFdB6.js} +1 -1
- package/dist/client/assets/{Link01-Bb9ZHTO8.js → Link01-CeBVtW9F.js} +1 -1
- package/dist/client/assets/{LinkBroken01-BbLhCJ9C.js → LinkBroken01-B4m_6hKA.js} +1 -1
- package/dist/client/assets/{Monitor01-BT48-O3V.js → Monitor01-DluZDvx0.js} +1 -1
- package/dist/client/assets/{Play-DlM8u9Zn.js → Play-C67yELx6.js} +1 -1
- package/dist/client/assets/{Plus-h-7fG8-i.js → Plus-FrFsiUQv.js} +1 -1
- package/dist/client/assets/{SearchMd-DdAgg3kt.js → SearchMd-CTE_Dij_.js} +1 -1
- package/dist/client/assets/{Sector-udGfVqY9.js → Sector-DpVhdPl7.js} +1 -1
- package/dist/client/assets/{ShoppingBag01-gtt6oc_g.js → ShoppingBag01-B47bYriG.js} +1 -1
- package/dist/client/assets/{Sun-D0bMmBqD.js → Sun-BADHqp_z.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-mzV8h1Yb.js → SwitchHorizontal01-B8pZTGji.js} +1 -1
- package/dist/client/assets/{Tool01-BOGFE1PW.js → Tool01-Ceiq1yQg.js} +1 -1
- package/dist/client/assets/{Trash01-BKZKll81.js → Trash01-QaBoOmQD.js} +1 -1
- package/dist/client/assets/{Upload01-ClJbirSb.js → Upload01-CfxF6ZJF.js} +1 -1
- package/dist/client/assets/{User01-jcmfLZ4a.js → User01-DowUGIml.js} +1 -1
- package/dist/client/assets/{UserSquare-Dnl3alN_.js → UserSquare-C1l8QNgE.js} +1 -1
- package/dist/client/assets/{Users01-DBt3BOu-.js → Users01-BvAfz3hH.js} +1 -1
- package/dist/client/assets/{XAxis-DWTEKRSO.js → XAxis-DQTb2U_R.js} +1 -1
- package/dist/client/assets/{XClose-DtCD4hEo.js → XClose-CDVFbEme.js} +1 -1
- package/dist/client/assets/{ZoomOut-C-oiWFtM.js → ZoomOut-0IXFhA1q.js} +1 -1
- package/dist/client/assets/{access-gate-Bs83GnN9.js → access-gate-BietqhCq.js} +1 -1
- package/dist/client/assets/{add-connection-dialog-CkfM8RAE.js → add-connection-dialog-CcwJwiyY.js} +1 -1
- package/dist/client/assets/{agent-analytics-PkbYclRB.js → agent-analytics-DbRvj_tI.js} +1 -1
- package/dist/client/assets/agent-app-Cfg8VckH.js +1 -0
- package/dist/client/assets/{agent-assets-BSNQs1Q4.js → agent-assets-pN9q_Pkx.js} +1 -1
- package/dist/client/assets/{agent-automation-CYLhaLQV.js → agent-automation-CvB6C4Vu.js} +3 -3
- package/dist/client/assets/{agent-automations-CylXZmQz.js → agent-automations-78ZqzNjS.js} +1 -1
- package/dist/client/assets/{agent-connect-sources-gehkSGol.js → agent-connect-sources-374gt80i.js} +1 -1
- package/dist/client/assets/agent-deck-BQQbY7E3.js +1 -0
- package/dist/client/assets/{agent-e2e-gcrRg7hM.js → agent-e2e-DyeOXWbZ.js} +1 -1
- package/dist/client/assets/{agent-experiments-CMJUnUoe.js → agent-experiments-VXnZmfhk.js} +1 -1
- package/dist/client/assets/{agent-file-JLVKcoj6.js → agent-file-B0YjGOwa.js} +1 -1
- package/dist/client/assets/{agent-hosting-AV1ldWsd.js → agent-hosting-DYfoCiax.js} +1 -1
- package/dist/client/assets/{agent-icon-D1bIPwJ9.js → agent-icon-E5NFjGaq.js} +1 -1
- package/dist/client/assets/agent-library-BylK2zbQ.js +1 -0
- package/dist/client/assets/agent-library-file-UJX_CJPE.js +1 -0
- package/dist/client/assets/{agent-monitor-DCEK-_YE.js → agent-monitor-CYXJZvch.js} +1 -1
- package/dist/client/assets/{agent-overview-Bq6iylVc.js → agent-overview-CFP2r65u.js} +1 -1
- package/dist/client/assets/{agent-releases-0JQ-pNIw.js → agent-releases-BHhSgU59.js} +1 -1
- package/dist/client/assets/agent-settings-CAn29x6c.js +1 -0
- package/dist/client/assets/{agent-site-editor-DUVPLgUJ.js → agent-site-editor-ByLDMiSm.js} +1 -1
- package/dist/client/assets/agent-site-editor-code-BpIt4X2L.js +2 -0
- package/dist/client/assets/agent-site-editor-content-CvTjIocG.js +1 -0
- package/dist/client/assets/agent-site-editor-preview--T44KtQU.js +1 -0
- package/dist/client/assets/agent-view-DR2yinn0.js +1 -0
- package/dist/client/assets/{agent-view-guard-B0ssprgS.js → agent-view-guard-BVO3LqzS.js} +1 -1
- package/dist/client/assets/{agents-list-CL_HbBRx.js → agents-list-Dculqto5.js} +1 -1
- package/dist/client/assets/{ai-providers-mazNpep3.js → ai-providers-DolR1Us6.js} +1 -1
- package/dist/client/assets/{alert-Bo4bO9Yj.js → alert-Dm5RN1oD.js} +1 -1
- package/dist/client/assets/{alert-dialog-BEUBWKqO.js → alert-dialog-BY83tkfe.js} +1 -1
- package/dist/client/assets/{analytics-sections-DM3YuBYq.js → analytics-sections-CZp3MeQw.js} +1 -1
- package/dist/client/assets/{api-keys-DVwB6mPs.js → api-keys-CldV2ng2.js} +1 -1
- package/dist/client/assets/api-keys-VLrtxsCT.js +1 -0
- package/dist/client/assets/{app-editor-6HFiMwKn.js → app-editor-CzTTzdaU.js} +1 -1
- package/dist/client/assets/{asset-utils-f7af-ti1.js → asset-utils-DOMqsWw0.js} +1 -1
- package/dist/client/assets/{auth-CpMllKKy.js → auth-3_xtjhZa.js} +1 -1
- package/dist/client/assets/{auth-catchall-s5AR8jnh.js → auth-catchall-Dmk_X1_7.js} +1 -1
- package/dist/client/assets/{auth-entry-DhhGCuwo.js → auth-entry-uTh0V7C8.js} +1 -1
- package/dist/client/assets/{auth-split-layout-CVNIUCsf.js → auth-split-layout-CqYj_13F.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-B45I3cgI.js → authenticate-and-persist-oauth-CLn5_4J6.js} +1 -1
- package/dist/client/assets/{automation-list-row-sOJZ4uwa.js → automation-list-row-dzpsPyTv.js} +1 -1
- package/dist/client/assets/{automation-runs-CR9XH4Bt.js → automation-runs-CAYarR59.js} +1 -1
- package/dist/client/assets/{automations-KO9N3LUU.js → automations-Dfb3WhG2.js} +1 -1
- package/dist/client/assets/{autosend-BPCdEy8S.js → autosend-Dqgiz7-z.js} +1 -1
- package/dist/client/assets/{avatar-BwGV1yBo.js → avatar-D-6InH0Y.js} +1 -1
- package/dist/client/assets/{badge-DZi2puxG.js → badge-sJYWVYje.js} +1 -1
- package/dist/client/assets/{block-document-DKS5cj35.js → block-document-CwGtizDj.js} +1 -1
- package/dist/client/assets/{blocks-preview-workspace-context-CDjfxqPx.js → blocks-preview-workspace-context-JFuqyIhO.js} +1 -1
- package/dist/client/assets/{blocks-tab-states-CdRfYXjG.js → blocks-tab-states-CUi2qvXH.js} +3 -3
- package/dist/client/assets/{blog-schema-DQu9FHji.js → blog-schema-CYGnXeYs.js} +1 -1
- package/dist/client/assets/{board-analytics-Br92I9NK.js → board-analytics-wIsQVPwo.js} +1 -1
- package/dist/client/assets/{buckets-BJOMOAgi.js → buckets-CnfDBCeG.js} +1 -1
- package/dist/client/assets/{build-improve-prompt-doc-DrFz7LF_.js → build-improve-prompt-doc-CtseFH_6.js} +1 -1
- package/dist/client/assets/{calendar-evfJy3uJ.js → calendar-CkQr_tH3.js} +1 -1
- package/dist/client/assets/{capability-load-error-vW3f0aqj.js → capability-load-error-Dj0p1QAG.js} +1 -1
- package/dist/client/assets/{category-editor-QytvoXKo.js → category-editor-BNcm0eWj.js} +1 -1
- package/dist/client/assets/{chart-yXoVtu1q.js → chart-CArQDy5U.js} +1 -1
- package/dist/client/assets/{chat-context-lAP9vX1C.js → chat-context-tvcXoBeE.js} +1 -1
- package/dist/client/assets/{chat-draft-DVJc17WV.js → chat-draft-ags4xou8.js} +1 -1
- package/dist/client/assets/{checkbox-DcDvQwKW.js → checkbox-C6deEGCR.js} +1 -1
- package/dist/client/assets/{choose-editor-B0ViIXN7.js → choose-editor-49fvt7KT.js} +1 -1
- package/dist/client/assets/{cli-auth-success-CKu92ul9.js → cli-auth-success-CtyD07eG.js} +1 -1
- package/dist/client/assets/{client-icons-DV_DZLb3.js → client-icons-BJlX5RmN.js} +1 -1
- package/dist/client/assets/cms-settings-editor-uacj7_T7.js +1 -0
- package/dist/client/assets/{collapsible-BvvJbkUN.js → collapsible-DNW_6aVc.js} +1 -1
- package/dist/client/assets/{collection-detail-gDWElNf6.js → collection-detail-D_oRg5uq.js} +1 -1
- package/dist/client/assets/{collection-display-button-CX9hkCzp.js → collection-display-button-CxD1zfgF.js} +1 -1
- package/dist/client/assets/{collection-search-ChJFrp7I.js → collection-search-BzGtQCoT.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-S14li0ck.js → collection-table-wrapper-Bdkg1hq0.js} +1 -1
- package/dist/client/assets/{collection-tabs-CSxs3D41.js → collection-tabs-D-985lbS.js} +1 -1
- package/dist/client/assets/{column-rules-GXfmm3XY.js → column-rules-DTH6MFyL.js} +1 -1
- package/dist/client/assets/{combobox-C7I8ANxO.js → combobox-DH1NtP3D.js} +1 -1
- package/dist/client/assets/{command-3UFu4XzT.js → command-CVodN_KO.js} +1 -1
- package/dist/client/assets/{companion-mcps-section-B4r6rXjT.js → companion-mcps-section-DC91CD_h.js} +1 -1
- package/dist/client/assets/{config-CXc91so8.js → config-CH426QBK.js} +1 -1
- package/dist/client/assets/{connect-CyItQRMN.js → connect-B4atgjM-.js} +1 -1
- package/dist/client/assets/{connect-layout-C_C_fSz7.js → connect-layout-Dn5RIa3-.js} +1 -1
- package/dist/client/assets/{connection-C37KtOpn.js → connection-BzAtvzSu.js} +1 -1
- package/dist/client/assets/{connection-card-BZTmMkIC.js → connection-card-CuDjRvQM.js} +1 -1
- package/dist/client/assets/{connection-detail-D0FXWtUX.js → connection-detail-LDbDzTcC.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-DxBwDmAB.js → connection-form-helpers-DX9VWFYw.js} +1 -1
- package/dist/client/assets/{connections-D-s5sSvb.js → connections-DPd5fcz3.js} +1 -1
- package/dist/client/assets/{content-tab-zP6Y355z.js → content-tab-CWZGoAxh.js} +3 -3
- package/dist/client/assets/{context-CXih-hDd.js → context-ItK-xs8d.js} +1 -1
- package/dist/client/assets/{context-menu-BVwispbr.js → context-menu-DwASq-2m.js} +1 -1
- package/dist/client/assets/{core.esm-CmRvLUZs.js → core.esm-DD7e57Ya.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-MkYGLytC.js → create-organization-dialog-u5RVm6vz.js} +1 -1
- package/dist/client/assets/{daily-pulse-C5ZpC1Ja.js → daily-pulse-BrZF3U10.js} +1 -1
- package/dist/client/assets/{discover-CnNtsI6p.js → discover-BVHoLkk3.js} +1 -1
- package/dist/client/assets/{domain-settings-C-ul_GpW.js → domain-settings-BM7hqiZ5.js} +1 -1
- package/dist/client/assets/{drawer-BnxsVk9h.js → drawer-CkTzw9-A.js} +1 -1
- package/dist/client/assets/{editor-BcMzCvWI.js → editor-CsrsRQNL.js} +1 -1
- package/dist/client/assets/{editor-classes-qOc25VDM.js → editor-classes-DwfWTmoT.js} +1 -1
- package/dist/client/assets/{empty-state-CLULH17h.js → empty-state-Ba3qMun8.js} +1 -1
- package/dist/client/assets/{empty-state-Csd3ZQCl.js → empty-state-CH6iGvNw.js} +1 -1
- package/dist/client/assets/{extract-connection-data-QezQYJtA.js → extract-connection-data-B_Afz4nk.js} +1 -1
- package/dist/client/assets/{feature-gate-X9j31WTs.js → feature-gate-W48R3WT6.js} +1 -1
- package/dist/client/assets/{feature-paywall-CVHEJqfB.js → feature-paywall-D9khkBoZ.js} +1 -1
- package/dist/client/assets/{file-explorer-CzlgH02W.js → file-explorer-DHDq6x-v.js} +1 -1
- package/dist/client/assets/{file-preview-Ddg0WJAM.js → file-preview-D9n-rE_m.js} +1 -1
- package/dist/client/assets/{file-share-button-D2qOTxL8.js → file-share-button-CxU4bp8P.js} +1 -1
- package/dist/client/assets/{file-type-icon-Bqf9C4DT.js → file-type-icon-hT5Dk06T.js} +1 -1
- package/dist/client/assets/flat-project-ip4875AZ.js +1 -0
- package/dist/client/assets/{folder-icon-CktDjbyx.js → folder-icon-BgkcWxyT.js} +1 -1
- package/dist/client/assets/{form-BLRuutWX.js → form-lTigv9Cm.js} +1 -1
- package/dist/client/assets/{general-DAKv-uYe.js → general-BW8ipZ-G.js} +1 -1
- package/dist/client/assets/{home-BtntFMXr.js → home-BDeiBiYZ.js} +1 -1
- package/dist/client/assets/{hosted-publish-feedback-DnbP_2C-.js → hosted-publish-feedback-Bttd9R-q.js} +1 -1
- package/dist/client/assets/{icon-button-08xWmNqW.js → icon-button-AZBqWvLN.js} +1 -1
- package/dist/client/assets/{index-BgxfZN5I.js → index-B-eHj4u4.js} +2 -2
- package/dist/client/assets/{index-Dhveikge.js → index-B8E6_dOg.js} +1 -1
- package/dist/client/assets/{index-DyeE93ho.js → index-BVC6tsxO.js} +1 -1
- package/dist/client/assets/{index-3yvbELIe.js → index-Bj0pg4Xb.js} +1 -1
- package/dist/client/assets/{index-Dss8yn2Y.js → index-BlmkjYB7.js} +1 -1
- package/dist/client/assets/{index-Ct9bVcsr.js → index-BrYnrqwa.js} +1 -1
- package/dist/client/assets/{index-DIK8YZFn.js → index-C5owFjSB.js} +1 -1
- package/dist/client/assets/{index-DT37BMIF.js → index-CSj5qaNn.js} +3 -3
- package/dist/client/assets/{index-DJTmuPQQ.js → index-CWGftR7V.js} +1 -1
- package/dist/client/assets/{index-BvCsVc8L.js → index-D19vbl6v.js} +1 -1
- package/dist/client/assets/{index-lUChgCue.js → index-SEQedjDw.js} +1 -1
- package/dist/client/assets/{index-9WXzzgOS.js → index-TqnZfvlo.js} +1 -1
- package/dist/client/assets/{index-3um-0YWE.js → index-UJRTDiss.js} +1 -1
- package/dist/client/assets/{index-BiU97Vx4.js → index-dmpY0k1_.js} +1 -1
- package/dist/client/assets/{index-BOjNGNvg.js → index-kBSJcstK.js} +1 -1
- package/dist/client/assets/{index-redirect-CHE6u4Cv.js → index-redirect-C2exOEJ6.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-ClCiPTXN.js → infiniteQueryObserver-OMlvsWcf.js} +1 -1
- package/dist/client/assets/{infra-billing-ChfVikin.js → infra-billing-uV4T8F6_.js} +1 -1
- package/dist/client/assets/{input-BSxNJ_GL.js → input-0NgdpVnI.js} +3 -3
- package/dist/client/assets/{input-BwymrIPS.js → input-CyiZQSl-.js} +1 -1
- package/dist/client/assets/{integration-icon-DmnIXoLv.js → integration-icon-DKhUl3mk.js} +1 -1
- package/dist/client/assets/{jira-icon-BLL3j9jm.js → jira-icon-B2cXiao2.js} +1 -1
- package/dist/client/assets/{label-CXUY_vfR.js → label-Hktokb9g.js} +1 -1
- package/dist/client/assets/{layout-DIeTUTU5.js → layout-Nt9MYelU.js} +1 -1
- package/dist/client/assets/{legacy-agents-deep-BKyQMU33.js → legacy-agents-deep-C25-uw28.js} +1 -1
- package/dist/client/assets/{legacy-main-redirect-BsoX6iN0.js → legacy-main-redirect-BmR3yjWi.js} +1 -1
- package/dist/client/assets/library-Dlw_lQxg.js +1 -0
- package/dist/client/assets/{library-tab-D2qgQui6.js → library-tab-Cw4yhIxO.js} +1 -1
- package/dist/client/assets/{login-E4QHNGwe.js → login-CmLP5OaS.js} +1 -1
- package/dist/client/assets/{markdown-b3WNjA4d.js → markdown-nIQQa0PZ.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-Cn4aCsu6.js → mcp-app-renderer-DJ3cRpmT.js} +1 -1
- package/dist/client/assets/{mcp-oauth-C3NWluK_.js → mcp-oauth-BDYmNGyy.js} +1 -1
- package/dist/client/assets/{mcp-oauth-RicpD0nY.js → mcp-oauth-BFMHXWCx.js} +1 -1
- package/dist/client/assets/{members-BxD5PzHF.js → members-BSHBMQ7h.js} +1 -1
- package/dist/client/assets/{memory-C9XODnnD.js → memory-D_VsBptg.js} +1 -1
- package/dist/client/assets/{mini-report-page-BIc8DpQB.js → mini-report-page-6cVsNT3a.js} +1 -1
- package/dist/client/assets/{mock-board-ohQUjnsi.js → mock-board-BW-Sa_Jw.js} +1 -1
- package/dist/client/assets/{monaco-editor-sh4I5RUd.js → monaco-editor-CETdPqMD.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-DV6G65vc.js → monitoring-stats-row-yTtrPgRB.js} +1 -1
- package/dist/client/assets/{multi-select-B-4k-Bqg.js → multi-select-Bt7N4nxw.js} +1 -1
- package/dist/client/assets/{mustache-Ds0VW1db.js → mustache-CkmSkLcC.js} +1 -1
- package/dist/client/assets/{new-project-dialog-B1YWyUQY.js → new-project-dialog-BiL8l-Gz.js} +1 -1
- package/dist/client/assets/{oauth-callback-Dk0amXzl.js → oauth-callback-C2OhIdyv.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-yxTXgHsL.js → oauth-callback-ai-provider-Dvmle1pb.js} +1 -1
- package/dist/client/assets/{onboarding-WAcQlT34.js → onboarding-B4ZAdkmE.js} +1 -1
- package/dist/client/assets/{openai-conversation-DdRGYa72.js → openai-conversation-B_fu8wmv.js} +1 -1
- package/dist/client/assets/{optimistic-project-sidebar-views-CX9xIBGl.js → optimistic-project-sidebar-views-Cq91NNiT.js} +1 -1
- package/dist/client/assets/{organization-choice-ByF9jLiX.js → organization-choice-BHS7iEpR.js} +1 -1
- package/dist/client/assets/{orgs-BQHW_eGH.js → orgs-C_-EK1k8.js} +1 -1
- package/dist/client/assets/{page-seo-form-CHn8Xad5.js → page-seo-form-hSczGRI6.js} +1 -1
- package/dist/client/assets/{pair-CUEfObr7.js → pair-XFt8jz7C.js} +1 -1
- package/dist/client/assets/{plan-ladder-DCjrzFrn.js → plan-ladder-Bcai7E3A.js} +1 -1
- package/dist/client/assets/{popover-C7Cokk1g.js → popover-DrRqLOLZ.js} +1 -1
- package/dist/client/assets/{post-calendar-8u0J9Dxw.js → post-calendar-DKuwQYqY.js} +1 -1
- package/dist/client/assets/{post-editor-BzyUnSeO.js → post-editor-DnuhIR5k.js} +1 -1
- package/dist/client/assets/{preview-content-DvIKkdby.js → preview-content-BmE0C6gq.js} +1 -1
- package/dist/client/assets/{preview-dialog-l7y7EMMl.js → preview-dialog-BOiVnRWu.js} +1 -1
- package/dist/client/assets/{preview-panel-BVF8JvLU.js → preview-panel-C8DpBZEG.js} +1 -1
- package/dist/client/assets/{preview-tab-DSXQiNWB.js → preview-tab-DbXCdlWL.js} +3 -3
- package/dist/client/assets/{product-picker-dialog-D1HSCZY-.js → product-picker-dialog-CkF4Q27X.js} +1 -1
- package/dist/client/assets/{profile-DLHHp5WU.js → profile-7yNVObk5.js} +1 -1
- package/dist/client/assets/{project-app-view-BwoWS8NM.js → project-app-view-Bp6LQc2t.js} +1 -1
- package/dist/client/assets/{project-feed-Bb_IIsXz.js → project-feed-DKKNi4Ua.js} +1 -1
- package/dist/client/assets/{project-icon-Dgrl5qpw.js → project-icon-D9S8dOj2.js} +1 -1
- package/dist/client/assets/project-reports-_eyjOX3a.js +1 -0
- package/dist/client/assets/project-tasks-CfNO6dF5.js +1 -0
- package/dist/client/assets/{projects-DRVKv_2I.js → projects-C_HSjbRf.js} +1 -1
- package/dist/client/assets/{projects-empty-state-CtZ_2AQk.js → projects-empty-state-CxJvmt56.js} +1 -1
- package/dist/client/assets/{prompts-BeeaQU8h.js → prompts-CoXqq6oc.js} +1 -1
- package/dist/client/assets/record-editor-BObs3Wz8.js +1 -0
- package/dist/client/assets/{redirect-editor-B1Nkj9GS.js → redirect-editor-CqykzZQ6.js} +1 -1
- package/dist/client/assets/{reports-C5l1V9UL.js → reports-Bima2O7N.js} +1 -1
- package/dist/client/assets/reports-CnLAzSP2.js +1 -0
- package/dist/client/assets/{reports-onboarding-DP7Vd0T2.js → reports-onboarding-DSmSkO0F.js} +1 -1
- package/dist/client/assets/{reports-tab-CtVbVcib.js → reports-tab-BVzkcFqa.js} +2 -2
- package/dist/client/assets/{repositories-CbAg-Btm.js → repositories-BQXG-rNE.js} +1 -1
- package/dist/client/assets/{repository-binding-BFm9AVly.js → repository-binding-CVI26IB4.js} +1 -1
- package/dist/client/assets/{repository-import-picker-EyjACjb3.js → repository-import-picker-Cv7ik8wr.js} +1 -1
- package/dist/client/assets/{repository-picker-CIkU8AaT.js → repository-picker-CaK5oYjG.js} +1 -1
- package/dist/client/assets/{require-capability-BHXvQx1F.js → require-capability-Bk3o-_ih.js} +1 -1
- package/dist/client/assets/{required-auth-layout-BWy4wi63.js → required-auth-layout-BA_CRgc2.js} +1 -1
- package/dist/client/assets/{reset-password-BmnWobO1.js → reset-password-CJR2Md-H.js} +1 -1
- package/dist/client/assets/{resizable-ojZdlQ3J.js → resizable-Bvs1DfKq.js} +1 -1
- package/dist/client/assets/{resolve-tab-icon-CQA14gzS.js → resolve-tab-icon-CPW7joUI.js} +1 -1
- package/dist/client/assets/{review-settings-HBrPojjW.js → review-settings-C79kWvAG.js} +1 -1
- package/dist/client/assets/roles-j7FKOAUh.js +1 -0
- package/dist/client/assets/route-Bn0LVuA1.js +1 -0
- package/dist/client/assets/{route-FIzJ_P0a.js → route-CA_TH__q.js} +1 -1
- package/dist/client/assets/{route-BnPcnvQE.js → route-R5TXvUXW.js} +1 -1
- package/dist/client/assets/{sandbox-lifecycle-context-BiADnqP0.js → sandbox-lifecycle-context-lyXe9eIS.js} +1 -1
- package/dist/client/assets/{schema-C2wKusx1.js → schema-CYEVNkkO.js} +1 -1
- package/dist/client/assets/{schema-CP7YDlC2.js → schema-DDS90txY.js} +1 -1
- package/dist/client/assets/{scroll-area-eDDZTCNn.js → scroll-area-BxjOHUE0.js} +1 -1
- package/dist/client/assets/{search-input-Uw0JKwfe.js → search-input-CEGrosU-.js} +1 -1
- package/dist/client/assets/{search-toggle-sm1qzFKh.js → search-toggle-DGnOuR56.js} +1 -1
- package/dist/client/assets/{secret-ciphertext-CONJpmu9.js → secret-ciphertext-DuXF1kfY.js} +1 -1
- package/dist/client/assets/{secret-picker-60Shu074.js → secret-picker-DNAEW5WZ.js} +1 -1
- package/dist/client/assets/{secrets-BoqLiEya.js → secrets-CweiWstI.js} +1 -1
- package/dist/client/assets/{sections-editor-vaJsT4Ye.js → sections-editor-zQKRHCN0.js} +1 -1
- package/dist/client/assets/{select-BFEZcGSl.js → select-Be8KEqhq.js} +1 -1
- package/dist/client/assets/{select-model-DqlWeDem.js → select-model-DSiTAeyQ.js} +1 -1
- package/dist/client/assets/{seo-editor-CH8U1dHr.js → seo-editor-5bdlykFK.js} +1 -1
- package/dist/client/assets/{separator-B8-QmvpR.js → separator-C1oZC_Nw.js} +1 -1
- package/dist/client/assets/{settings-tab-CKwbS1hi.js → settings-tab-Dk-4q6cx.js} +1 -1
- package/dist/client/assets/{sheet-Nq7jp8TZ.js → sheet-DcLd8f_T.js} +1 -1
- package/dist/client/assets/{shell-layout-D6cRROrP.js → shell-layout-jpc-IFbN.js} +1 -1
- package/dist/client/assets/site-editor-CDgaCne6.js +1 -0
- package/dist/client/assets/{site-editor-toast-DKv6_ydN.js → site-editor-toast-Rw5XomcC.js} +1 -1
- package/dist/client/assets/{skills-D12rIMUM.js → skills-BgH9DrsO.js} +1 -1
- package/dist/client/assets/{slider-DDXbeLEV.js → slider-CpmotJcT.js} +1 -1
- package/dist/client/assets/{sortable.esm-B6I_GSlr.js → sortable.esm-Ch2zuqy4.js} +1 -1
- package/dist/client/assets/{sso-BlG3mIxu.js → sso-DhgNSN8N.js} +1 -1
- package/dist/client/assets/{suggestion-BDdps7f5.js → suggestion-D6gjcmHp.js} +1 -1
- package/dist/client/assets/{switch-fTPKFxtt.js → switch-CkX0BpKj.js} +1 -1
- package/dist/client/assets/{symbol-DzslO63t.js → symbol-BfV3FsI2.js} +1 -1
- package/dist/client/assets/{synced-repos-BoksOfkS.js → synced-repos-BPr9w1RO.js} +1 -1
- package/dist/client/assets/{tab-icon-glyph-B_Nx9b90.js → tab-icon-glyph-CeaHu6-c.js} +1 -1
- package/dist/client/assets/{table-DM6c5ztx.js → table-CM8IdXDA.js} +1 -1
- package/dist/client/assets/{tabs-_ffnq5EI.js → tabs-Mabj7P4A.js} +1 -1
- package/dist/client/assets/{task-board-3mxTKXc4.js → task-board-BDqVuMua.js} +1 -1
- package/dist/client/assets/{task-route-Bd7_oRze.js → task-route-HyrcQpIh.js} +1 -1
- package/dist/client/assets/{task-status-DobFUFUP.js → task-status-BTchb5mm.js} +1 -1
- package/dist/client/assets/taskboard-analytics-DVcpMrVf.js +1 -0
- package/dist/client/assets/tasks-DfBffVse.js +1 -0
- package/dist/client/assets/{tasks-8erS0IrD.js → tasks-N_JbBzrQ.js} +1 -1
- package/dist/client/assets/{textarea-DuXoEX68.js → textarea-Cu_mwrDc.js} +1 -1
- package/dist/client/assets/{thread-analytics-DRN0lWXv.js → thread-analytics-B6KhxNmJ.js} +1 -1
- package/dist/client/assets/{thread-intent-CNERxhpd.js → thread-intent-2PQ2tJ8y.js} +1 -1
- package/dist/client/assets/{thread-route-Ctf783T8.js → thread-route-BiZeKn-m.js} +1 -1
- package/dist/client/assets/{thread-route-B1yKR26I.js → thread-route-C5byRWcJ.js} +1 -1
- package/dist/client/assets/{thread-sheet-body-BOzE-wDr.js → thread-sheet-body-BUt_0YWK.js} +1 -1
- package/dist/client/assets/{time-range-picker-CTRRThMq.js → time-range-picker-Bf0ZJ2P5.js} +1 -1
- package/dist/client/assets/{toggle-group-Cfs_-SSG.js → toggle-group-BRDgtYtL.js} +1 -1
- package/dist/client/assets/{tool-namespace-D2ik4cAJ.js → tool-namespace-XBvXTguD.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-CPspdKt4.js → toolbar-icon-button-CysTSWyH.js} +1 -1
- package/dist/client/assets/{tooltip-IZurjemL.js → tooltip-Wg5TOkgk.js} +1 -1
- package/dist/client/assets/{tooltipContext-D100ISAz.js → tooltipContext-BSZQ5pEw.js} +1 -1
- package/dist/client/assets/{track-Dgx71QRR.js → track-DDuUL9Xr.js} +1 -1
- package/dist/client/assets/{types-BE1SardL.js → types-C9g69UXw.js} +1 -1
- package/dist/client/assets/{url-slug-CwNPw3b4.js → url-slug-CWeO_dvk.js} +1 -1
- package/dist/client/assets/{usage-stats-CG9oV0kb.js → usage-stats-0IIA6wpa.js} +1 -1
- package/dist/client/assets/{use-ai-providers-CPzOGdQy.js → use-ai-providers-CrjK99NZ.js} +1 -1
- package/dist/client/assets/{use-app-takeover-l9YncUZ0.js → use-app-takeover-BEzSlm3S.js} +1 -1
- package/dist/client/assets/{use-automations-B6o4Nbzc.js → use-automations-AJoQb6lP.js} +1 -1
- package/dist/client/assets/{use-autosave-DPNBZc_p.js → use-autosave-C7ouSmgc.js} +1 -1
- package/dist/client/assets/{use-chat-navigation-Do_KkN8I.js → use-chat-navigation-BVwgk2mi.js} +1 -1
- package/dist/client/assets/{use-clock-tick-BnfclhFE.js → use-clock-tick-B6NhSBfs.js} +1 -1
- package/dist/client/assets/{use-connect-companion-BPMXolOl.js → use-connect-companion-WJiOGzbb.js} +1 -1
- package/dist/client/assets/{use-connection-DS1VAR5N.js → use-connection-D8Z-oNDI.js} +1 -1
- package/dist/client/assets/{use-copy-C8TWXH-H.js → use-copy-KuwVRxCe.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-CeEuYNMP.js → use-create-virtual-mcp-RCA64tHb.js} +1 -1
- package/dist/client/assets/{use-date-fns-locale-D3qFWxxv.js → use-date-fns-locale-CeeB1a5i.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-DsoI68di.js → use-debounced-autosave-CU9q8XT5.js} +1 -1
- package/dist/client/assets/{use-debounced-value-KpwtUdsd.js → use-debounced-value-B43T9Zwm.js} +1 -1
- package/dist/client/assets/{use-deco-credits-DscUzXq9.js → use-deco-credits-BqmDR-Hh.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-D8UIooCs.js → use-decopilot-events-DrGKqtmd.js} +1 -1
- package/dist/client/assets/{use-delete-connection-Dnzv3Wbz.js → use-delete-connection-dDlynrtq.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-P_SogPj1.js → use-deployment-admin-XCC0klqS.js} +1 -1
- package/dist/client/assets/{use-ensure-project-folder-Dom2nmkC.js → use-ensure-project-folder-DzlO-RZu.js} +1 -1
- package/dist/client/assets/{use-fast-preview-draft-url-DnHFw81T.js → use-fast-preview-draft-url-CWuWJF_Z.js} +1 -1
- package/dist/client/assets/{use-file-configs-Cv2mXUdp.js → use-file-configs-bBTy3-MH.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-CuKgvt7b.js → use-infinite-scroll-Bx08szbZ.js} +1 -1
- package/dist/client/assets/{use-join-requests-cLAvpRra.js → use-join-requests-9S6TcS4c.js} +1 -1
- package/dist/client/assets/{use-main-panel-tabs-B0dFgvCE.js → use-main-panel-tabs-DYzUw0ny.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-DaPeILTX.js → use-mcp-auth-status-x7_sjlLt.js} +1 -1
- package/dist/client/assets/{use-mcp-client-CU2kDBXP.js → use-mcp-client-fHTUkiQr.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-CdDXQMlf.js → use-mcp-prompts-BPRabyYT.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-CyHq-JFp.js → use-mcp-tools-D4mzKQtZ.js} +1 -1
- package/dist/client/assets/{use-members-CkpNHwM6.js → use-members-CKWy7WEt.js} +1 -1
- package/dist/client/assets/{use-mobile-DNDEd3kt.js → use-mobile-BZpAUwUb.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-JTDphVE0.js → use-navigate-to-agent-CsnmgB4q.js} +1 -1
- package/dist/client/assets/{use-open-billing-url-2Iqpie3T.js → use-open-billing-url-DJ2g56mK.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-Bwzj9WuC.js → use-org-auth-client-g30TuQtQ.js} +1 -1
- package/dist/client/assets/{use-org-fs-Cg7EJCYS.js → use-org-fs-zGIV3ymG.js} +1 -1
- package/dist/client/assets/{use-org-repo-syncs-D4j72pCa.js → use-org-repo-syncs-DJQrhGC0.js} +1 -1
- package/dist/client/assets/{use-org-sso-CMfwXvs9.js → use-org-sso-BrvNWA5X.js} +1 -1
- package/dist/client/assets/{use-organization-roles-DPDTJ01F.js → use-organization-roles-BJUlrG6W.js} +1 -1
- package/dist/client/assets/{use-organization-settings-BMIqQlbM.js → use-organization-settings-PcDKDabM.js} +1 -1
- package/dist/client/assets/{use-panel-navigate-CL5hztR3.js → use-panel-navigate-CtG66pHN.js} +1 -1
- package/dist/client/assets/{use-project-native-view-presence-CBbSdoTE.js → use-project-native-view-presence-BK8YOIZ_.js} +1 -1
- package/dist/client/assets/{use-project-scope-DqbIN7fa.js → use-project-scope-BIaj1klw.js} +1 -1
- package/dist/client/assets/{use-recent-apps-Beu6vFHw.js → use-recent-apps-CdBePM46.js} +1 -1
- package/dist/client/assets/{use-releases-Bfs5MNEe.js → use-releases-DiKuK1Mb.js} +1 -1
- package/dist/client/assets/{use-reports-diagnostic-QSfTgm94.js → use-reports-diagnostic-DtOFbpHG.js} +1 -1
- package/dist/client/assets/{use-secrets-BaG_Hkwz.js → use-secrets-D1EjKfHx.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-DUXeQAGw.js → use-section-preview-base-BN73lsUn.js} +1 -1
- package/dist/client/assets/{use-tags-BWRD1El7.js → use-tags-DDnWaRyr.js} +1 -1
- package/dist/client/assets/{use-task-board-analytics-Bkf73btp.js → use-task-board-analytics-V9Yyqptm.js} +1 -1
- package/dist/client/assets/{use-task-board-events-CLNIzDoN.js → use-task-board-events-DqUxpNCB.js} +1 -1
- package/dist/client/assets/{use-task-board-item-prs-Bh5krZjb.js → use-task-board-item-prs-DPUdXNI8.js} +1 -1
- package/dist/client/assets/{use-task-board-items-zobNU9xE.js → use-task-board-items-DfmdtmUR.js} +1 -1
- package/dist/client/assets/{use-task-metadata-Bsl_Cezz.js → use-task-metadata-SrtBAv_N.js} +1 -1
- package/dist/client/assets/{use-thread-analytics-CdWNwDDd.js → use-thread-analytics-BqRwNmrL.js} +1 -1
- package/dist/client/assets/{use-thread-outputs-BkgKa2EX.js → use-thread-outputs-2RD7K4aK.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-B6mFaUqW.js +1 -0
- package/dist/client/assets/{useQueries-E-2AGLRt.js → useQueries-CMBL6J0M.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-CPzW-hST.js +1 -0
- package/dist/client/assets/{users-L9Rh2Jo7.js → users-RLZYAcjM.js} +1 -1
- package/dist/client/assets/{utils-Dx9iFvKJ.js → utils-Bah7tk6F.js} +1 -1
- package/dist/client/assets/{variant-calendar-CkKYqTGY.js → variant-calendar-BZG4h9lN.js} +1 -1
- package/dist/client/assets/{variant-draft-pointer-CSAndyah.js → variant-draft-pointer-DT29gOvh.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-DxuIXC_C.js → view-mode-toggle-yaAep4gO.js} +1 -1
- package/dist/client/assets/{virtual-mcp-D7evpUlE.js → virtual-mcp-D15uuHwT.js} +1 -1
- package/dist/client/assets/{watch-sse-pool-Bs34dRKl.js → watch-sse-pool-L6MF8kFC.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +1 -1
- package/dist/server/migrate-dbos.js +1 -1
- package/dist/server/migrate.js +1 -1
- package/dist/server/server.js +608 -601
- package/package.json +1 -1
- package/dist/client/assets/agent-app-Dq_KNzND.js +0 -1
- package/dist/client/assets/agent-deck-CB0RXEGe.js +0 -1
- package/dist/client/assets/agent-library-ChYqVk94.js +0 -1
- package/dist/client/assets/agent-library-file-5NiMKcJU.js +0 -1
- package/dist/client/assets/agent-settings-DutqpeLT.js +0 -1
- package/dist/client/assets/agent-site-editor-code-Bs5iWgah.js +0 -2
- package/dist/client/assets/agent-site-editor-content-DG0PHKu_.js +0 -1
- package/dist/client/assets/agent-site-editor-preview-IbSFpbgz.js +0 -1
- package/dist/client/assets/agent-view-BMSjk6sE.js +0 -1
- package/dist/client/assets/api-keys-BfQZh5eV.js +0 -1
- package/dist/client/assets/cms-settings-editor-Cz5yTS8J.js +0 -1
- package/dist/client/assets/flat-project-EkkB9kye.js +0 -1
- package/dist/client/assets/library-j3CGQ36X.js +0 -1
- package/dist/client/assets/project-reports-C-bRcSvJ.js +0 -1
- package/dist/client/assets/project-tasks-DDJFKuGl.js +0 -1
- package/dist/client/assets/record-editor-5RvQSHc4.js +0 -1
- package/dist/client/assets/reports-BGfmbbJs.js +0 -1
- package/dist/client/assets/roles-Dtyn_BZq.js +0 -1
- package/dist/client/assets/route-tGmKNjFY.js +0 -1
- package/dist/client/assets/site-editor-BZvWDg3I.js +0 -1
- package/dist/client/assets/taskboard-analytics-BqoskKtI.js +0 -1
- package/dist/client/assets/tasks-SfkUPw6i.js +0 -1
- package/dist/client/assets/useInfiniteQuery-pEq0vd9s.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-BQsEFgzv.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{az as Yt,c as Z,b as ee,r as w,j as t,B,ah as Zt,l as At,a2 as Pt,D as Ze,q as et,s as tt,v as st,aM as ot,w as at,t as X,b1 as es,X as ts,T as ss,V as os,as,aq as ns,ar as is,U as Ee,aW as rs,h as Re,y as Ke,aE as ls,b9 as ft,I as pt,ba as cs,al as ds,a_ as Qe,n as Je,f as ms}from"./index-BgxfZN5I.js";import{C as us}from"./index-Dss8yn2Y.js";import{b as nt,O as fs,a as ps,a4 as xs,h as xt,aw as gs,V as gt,ax as hs,f as js,N as Fe,ay as $t}from"./agent-icon-D1bIPwJ9.js";import{n as ht}from"./ShoppingBag01-gtt6oc_g.js";import{t as it}from"./ChevronUp-CfnfCq3M.js";import{e as ys}from"./UserSquare-Dnl3alN_.js";import{e as rt,b as zt,t as Ot}from"./Tool01-BOGFE1PW.js";import{a as bs}from"./Image01-C6EZAhw4.js";import{i as vs}from"./SearchMd-DdAgg3kt.js";import{B as Et}from"./badge-DZi2puxG.js";import{C as Kt}from"./checkbox-DcDvQwKW.js";import{S as lt}from"./switch-fTPKFxtt.js";import{a as Ft,b as Mt,P as Rt}from"./popover-C7Cokk1g.js";import{C as Cs,a as jt,b as Ns,d as Ss,e as ks,c as Ts}from"./command-3UFu4XzT.js";import{g as ws,s as Ds}from"./tool-namespace-D2ik4cAJ.js";import{u as ct}from"./use-connection-DS1VAR5N.js";import{u as _s}from"./use-mcp-client-CU2kDBXP.js";import{u as Is}from"./use-mcp-tools-CyHq-JFp.js";import{I as As}from"./integration-icon-DmnIXoLv.js";import{M as Ps}from"./select-model-DqlWeDem.js";import{u as $s}from"./use-ai-providers-CPzOGdQy.js";import{U as zs,b as Os}from"./build-improve-prompt-doc-DrFz7LF_.js";import{a as ve,c as Es,d as Ks}from"./use-automations-B6o4Nbzc.js";import{c as Fs,b as Ms,h as Rs,t as Ls}from"./chat-context-lAP9vX1C.js";import{b as Vs,C as Us,a as Ws}from"./collapsible-BvvJbkUN.js";import{c as Bs,T as Gs,a as Hs}from"./tooltip-IZurjemL.js";import{a as Js}from"./shell-layout-D6cRROrP.js";import{i as Lt}from"./ArrowLeft-Cdobx1UV.js";import{i as Xs}from"./ArrowUp-D_3dn5Sd.js";import{s as qs}from"./Trash01-BKZKll81.js";import{s as dt}from"./XClose-DtCD4hEo.js";import{u as yt}from"./use-debounced-autosave-DsoI68di.js";import{T as Qs,a as Ys}from"./input-BwymrIPS.js";import{u as Zs,a as eo,J as Vt}from"./jira-icon-BLL3j9jm.js";import{s as to}from"./Plus-h-7fG8-i.js";import{i as mt}from"./ZoomOut-C-oiWFtM.js";import{l as Ue,H as so}from"./config-CXc91so8.js";import{C as oo}from"./task-board-3mxTKXc4.js";import{M as Ut}from"./multi-select-B-4k-Bqg.js";import{S as ge,b as he,a as je,d as ye,c as be}from"./select-BFEZcGSl.js";import{b as ao,a as no,T as bt}from"./tabs-_ffnq5EI.js";import{a as Xe}from"./Copy01-CKF8jrEa.js";import{MonacoCodeEditor as io}from"./monaco-editor-sh4I5RUd.js";import{A as vt,a as Ct,b as Nt,c as St,g as kt,d as Tt,e as wt,f as Dt}from"./alert-dialog-BEUBWKqO.js";import{A as ro}from"./automation-runs-CR9XH4Bt.js";import{C as lo}from"./collection-tabs-CSxs3D41.js";import{a as co}from"./use-panel-navigate-CL5hztR3.js";import"./use-mobile-DNDEd3kt.js";import"./use-app-takeover-l9YncUZ0.js";import"./sheet-Nq7jp8TZ.js";import"./use-project-native-view-presence-CBbSdoTE.js";import"./thread-route-Ctf783T8.js";import"./thread-intent-CNERxhpd.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-Bs34dRKl.js";import"./slugify-CEUa2lfQ.js";import"./use-file-configs-Cv2mXUdp.js";import"./use-organization-settings-BMIqQlbM.js";import"./schema-C2wKusx1.js";import"./repository-binding-BFm9AVly.js";import"./site-slug-DebpOoQq.js";import"./toolbar-icon-button-CPspdKt4.js";import"./resizable-ojZdlQ3J.js";import"./icon-button-08xWmNqW.js";import"./use-project-scope-DqbIN7fa.js";import"./AlertCircle-D3bAofoi.js";import"./LinkBroken01-BbLhCJ9C.js";import"./Building02-Bh6iwr2R.js";import"./CheckCircle-BQiYUYV1.js";import"./ChevronSelectorVertical-CpMmf6o-.js";import"./CreditCard01-B4jz404y.js";import"./DotsVertical-BVuRRGqu.js";import"./Globe04-CfnS-Tur.js";import"./SwitchHorizontal01-mzV8h1Yb.js";import"./Key01-C3bTgL7y.js";import"./Link01-Bb9ZHTO8.js";import"./Monitor01-BT48-O3V.js";import"./Sun-D0bMmBqD.js";import"./Play-DlM8u9Zn.js";import"./Upload01-ClJbirSb.js";import"./User01-jcmfLZ4a.js";import"./Users01-DBt3BOu-.js";import"./index-DJTmuPQQ.js";import"./auth-CpMllKKy.js";import"./drawer-BnxsVk9h.js";import"./index-DIK8YZFn.js";import"./ai-providers-logos-DD3qZ33J.js";import"./avatar-BwGV1yBo.js";import"./autosend-BPCdEy8S.js";import"./use-decopilot-events-D8UIooCs.js";import"./use-chat-navigation-Do_KkN8I.js";import"./location-BjlyegC2.js";import"./index-lUChgCue.js";import"./use-clock-tick-BnfclhFE.js";import"./project-icon-Dgrl5qpw.js";import"./new-project-dialog-B1YWyUQY.js";import"./label-CXUY_vfR.js";import"./repository-import-picker-EyjACjb3.js";import"./use-navigate-to-agent-JTDphVE0.js";import"./repository-picker-CIkU8AaT.js";import"./useInfiniteQuery-pEq0vd9s.js";import"./infiniteQueryObserver-ClCiPTXN.js";import"./collection-search-ChJFrp7I.js";import"./use-debounced-value-KpwtUdsd.js";import"./required-auth-layout-BWy4wi63.js";import"./use-org-sso-CMfwXvs9.js";import"./suggestion-BDdps7f5.js";import"./usage-stats-CG9oV0kb.js";import"./form-BLRuutWX.js";import"./utils-CVEq3hMx.js";import"./markdown-b3WNjA4d.js";import"./use-copy-C8TWXH-H.js";import"./format-time-CAj8AQXM.js";import"./differenceInSeconds-C3x8sHUj.js";import"./use-mcp-prompts-CdDXQMlf.js";import"./use-org-fs-Cg7EJCYS.js";import"./core.esm-CmRvLUZs.js";import"./index-BdQq_4o_.js";import"./editor-BcMzCvWI.js";import"./table-DM6c5ztx.js";import"./empty-state-CLULH17h.js";import"./use-infinite-scroll-CuKgvt7b.js";import"./use-members-CkpNHwM6.js";import"./use-org-auth-client-Bwzj9WuC.js";import"./task-status-DobFUFUP.js";import"./thread-sheet-body-BOzE-wDr.js";import"./useSuspenseInfiniteQuery-BQsEFgzv.js";import"./pair-CUEfObr7.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-Cn4aCsu6.js";import"./types-BE1SardL.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./use-thread-outputs-BkgKa2EX.js";import"./file-type-icon-Bqf9C4DT.js";const qe={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}},mo=["fast","smart","thinking"];function uo(r){const e=Z.c(19),{tier:s,onSelect:n}=r,a=ee(),[i,c]=w.useState(!1),o=qe[s].icon;let j;e[0]!==o?(j=t.jsx(o,{size:14,className:"text-muted-foreground"}),e[0]=o,e[1]=j):j=e[1];const d=qe[s];let m;e[2]!==a||e[3]!==d.labelKey?(m=a(d.labelKey),e[2]=a,e[3]=d.labelKey,e[4]=m):m=e[4];let x;e[5]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx(it,{size:14,className:"text-muted-foreground"}),e[5]=x):x=e[5];let f;e[6]!==j||e[7]!==m?(f=t.jsx(Ft,{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]!==a||e[11]!==s?(g=mo.map(p=>{const l=qe[p],y=l.icon;return t.jsxs("button",{type:"button",onClick:()=>{n(p),c(!1)},className:At("flex items-start gap-2 px-2 py-1.5 rounded-lg text-left hover:bg-muted"),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:a(l.labelKey)}),t.jsx("div",{className:"text-xs text-muted-foreground",children:a(l.subtitleKey)})]}),p===s&&t.jsx(Zt,{size:14,className:"text-foreground mt-0.5"})]},p)}),e[9]=n,e[10]=a,e[11]=s,e[12]=g):g=e[12];let u;e[13]!==g?(u=t.jsx(Mt,{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(Rt,{open:i,onOpenChange:c,children:[f,u]}),e[15]=i,e[16]=f,e[17]=u,e[18]=h):h=e[18],h}function fo(r){const e=Z.c(27),{tier:s,onTierChange:n,override:a,onOverrideChange:i}=r,c=ee(),[o,j]=w.useState(a!==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]!==a||e[7]!==c||e[8]!==s||e[9]!==o?(x=o?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(po,{override:a,onOverrideChange:i})}):t.jsx(uo,{tier:s,onSelect:n}),e[4]=i,e[5]=n,e[6]=a,e[7]=c,e[8]=s,e[9]=o,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]!==o?(g=t.jsx(lt,{checked:o,onCheckedChange:f,className:"cursor-pointer"}),e[13]=f,e[14]=o,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 po(r){const e=Z.c(25),{override:s,onOverrideChange:n}=r,a=ee(),i=$s(),c=i[0]?.id??null;let o;e[0]!==c||e[1]!==i||e[2]!==s?.credentialId?(o=i.some(l=>l.id===s?.credentialId)?s?.credentialId??null:c,e[0]=c,e[1]=i,e[2]=s?.credentialId,e[3]=o):o=e[3];const[j,d]=w.useState(o);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]!==a?(l=a("automations.automationConfig.connectAiProviderHint"),e[11]=a,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]!==a?(u=a("automations.automationConfig.pickModelPlaceholder"),e[15]=a,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 Wt=[{key:"capabilities",headingKey:"automations.automationConfig.builtinCapabilities",icon:rt,tools:[{name:"web_search",titleKey:"automations.automationConfig.toolWebSearch",descriptionKey:"automations.automationConfig.toolWebSearchDesc",icon:nt},{name:"generate_image",titleKey:"automations.automationConfig.toolGenerateImage",descriptionKey:"automations.automationConfig.toolGenerateImageDesc",icon:bs},{name:"subtask",titleKey:"automations.automationConfig.toolSubtask",descriptionKey:"automations.automationConfig.toolSubtaskDesc",icon:Yt},{name:"user_ask",titleKey:"automations.automationConfig.toolAskUser",descriptionKey:"automations.automationConfig.toolAskUserDesc",icon:fs}]},{key:"files",headingKey:"automations.automationConfig.filesCode",icon:xt,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:xt},{name:"bash",titleKey:"automations.automationConfig.toolRunCommand",descriptionKey:"automations.automationConfig.toolRunCommandDesc",icon:gs}]},{key:"context",headingKey:"automations.automationConfig.context",icon:gt,tools:[{name:"read_resource",titleKey:"automations.automationConfig.toolReadResource",descriptionKey:"automations.automationConfig.toolReadResourceDesc",icon:gt},{name:"read_prompt",titleKey:"automations.automationConfig.toolReadPrompt",descriptionKey:"automations.automationConfig.toolReadPromptDesc",icon:ht},{name:"skill",titleKey:"automations.automationConfig.toolLoadSkill",descriptionKey:"automations.automationConfig.toolLoadSkillDesc",icon:ht}]}],xo=Wt.flatMap(r=>r.tools.map(e=>e.name));function go(r){const e=r.replace(/[_-]+/g," ").trim();return e?e.toLowerCase().replace(/\b\w/g,s=>s.toUpperCase()):r}function ho(r){const e=Z.c(12),{agentId:s,value:n,onChange:a}=r,i=ee();let c;e[0]!==i?(c=i("automations.automationConfig.toolsLabel"),e[0]=i,e[1]=c):c=e[1];let o;e[2]!==c?(o=t.jsx("span",{className:"text-xs font-semibold text-muted-foreground/60",children:c}),e[2]=c,e[3]=o):o=e[3];let j;e[4]!==s||e[5]!==a||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(rt,{size:14}),i("automations.automationConfig.loadingTools")]}),children:t.jsx(jo,{agentId:s,value:n,onChange:a})}):t.jsx("span",{className:"text-xs text-muted-foreground italic",children:i("automations.automationConfig.pickAgentFirst")}),e[4]=s,e[5]=a,e[6]=i,e[7]=n,e[8]=j):j=e[8];let d;return e[9]!==o||e[10]!==j?(d=t.jsxs("div",{className:"flex flex-col gap-2",children:[o,j]}),e[9]=o,e[10]=j,e[11]=d):d=e[11],d}function _t(r){const e=Z.c(17),{value:s,checked:n,onToggle:a,title:i,description:c,leading:o}=r;let j;e[0]!==n?(j=t.jsx(Kt,{checked:n,className:"pointer-events-none mt-0.5"}),e[0]=n,e[1]=j):j=e[1];let d;e[2]!==o?(d=o&&t.jsx("span",{className:"mt-px shrink-0",children:o}),e[2]=o,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]!==a||e[12]!==j||e[13]!==d||e[14]!==f||e[15]!==s?(g=t.jsxs(Ns,{value:s,onSelect:a,className:"items-start gap-2.5 py-2",children:[j,d,f]}),e[11]=a,e[12]=j,e[13]=d,e[14]=f,e[15]=s,e[16]=g):g=e[16],g}function It(r){const e=Z.c(27),{conn:s,label:n,icon:a,on:i,total:c,onToggle:o}=r,j=ee(),d=i===c;let m;e[0]!==a||e[1]!==s?(m=s?t.jsx(As,{icon:s.icon,name:s.title,size:"2xs"}):a?t.jsx(a,{size:14,className:"text-muted-foreground"}):t.jsx(ys,{size:14,className:"text-muted-foreground"}),e[0]=a,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-[11px] 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]!==o?(u=v=>{v.stopPropagation(),o()},e[12]=o,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-[11px] 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 jo(r){const e=Z.c(83),{agentId:s,value:n,onChange:a}=r,i=ee(),{org:c}=Pt(),[o,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=_s(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=ct();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]!==a||e[10]!==o||e[11]!==i||e[12]!==n){const q=new Map(u.map(No)),H=new Map;for(const I of f?.tools??[]){const O=ws(I._meta)??"__other__",Y=Ds(I.name,O==="__other__"?void 0:O),P=I.title,xe=P&&P!==I.name?P:go(Y);H.has(O)||H.set(O,{clientId:O,conn:q.get(O),tools:[]}),H.get(O).tools.push({name:I.name,display:xe,description:I.description})}const W=[...H.values()].sort(Co),G=(f?.tools??[]).map(vo),J=[...xo,...G],V=n===null?new Set(J):new Set(n),U=J.every(I=>V.has(I)),z=I=>a(J.every(O=>I.has(O))?null:[...I]),ae=I=>{const O=new Set(V);O.has(I)?O.delete(I):O.add(I),z(O)},ne=(I,O)=>{const Y=new Set(V);for(const P of I)O?Y.add(P):Y.delete(P);z(Y)};y=Rt,A=o,v=j;let Q;e[26]===Symbol.for("react.memo_cache_sentinel")?(Q=t.jsx(rt,{size:14,className:"text-muted-foreground"}),e[26]=Q):Q=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(Et,{variant:"secondary",className:"ml-0.5 h-5 px-1.5 text-[11px] tabular-nums",children:[V.size,"/",J.length]});let me;e[30]===Symbol.for("react.memo_cache_sentinel")?(me=t.jsx(it,{size:14,className:"text-muted-foreground"}),e[30]=me):me=e[30],e[31]!==ie||e[32]!==ue?(N=t.jsx(Ft,{asChild:!0,children:t.jsxs(B,{variant:"outline",size:"sm",className:"w-fit gap-1.5",children:[Q,ie,ue,me]})}),e[31]=ie,e[32]=ue,e[33]=N):N=e[33],l=Mt,_="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]!==a?(re=()=>a(null),e[40]=a,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 E;e[49]!==a?(E=()=>a([]),e[49]=a,e[50]=E):E=e[50];const pe=V.size===0;let oe;e[51]!==i?(oe=i("automations.automationConfig.clear"),e[51]=i,e[52]=oe):oe=e[52];let ce;e[53]!==E||e[54]!==pe||e[55]!==oe?(ce=t.jsx("button",{type:"button",onClick:E,disabled:pe,className:"text-xs font-medium text-muted-foreground hover:underline disabled:cursor-default disabled:opacity-40 disabled:no-underline",children:oe}),e[53]=E,e[54]=pe,e[55]=oe,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?(D=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]=D):D=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")}),Wt.map(I=>{const O=I.tools.map(bo),Y=O.filter(P=>V.has(P)).length;return t.jsx(jt,{heading:t.jsx(It,{label:i(I.headingKey),icon:I.icon,on:Y,total:O.length,onToggle:()=>ne(O,Y!==O.length)}),children:I.tools.map(P=>t.jsx(_t,{value:`${i(P.titleKey)} ${P.name}`,checked:V.has(P.name),onToggle:()=>ae(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(yo),Y=O.filter(P=>V.has(P)).length;return t.jsx(jt,{heading:t.jsx(It,{conn:I.conn,on:Y,total:O.length,onToggle:()=>ne(O,Y!==O.length)}),children:I.tools.map(P=>t.jsx(_t,{value:`${P.display} ${P.name} ${I.conn?.title??""}`,checked:V.has(P.name),onToggle:()=>ae(P.name),title:P.display,description:P.description},P.name))},I.clientId)})]}),e[6]=u,e[7]=f?.tools,e[8]=g,e[9]=a,e[10]=o,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]=D,e[23]=_,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],D=e[22],_=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]!==D?(R=t.jsxs(p,{children:[T,D,$]}),e[67]=p,e[68]=$,e[69]=T,e[70]=D,e[71]=R):R=e[71];let K;e[72]!==l||e[73]!==R||e[74]!==_||e[75]!==k?(K=t.jsx(l,{className:_,align:k,children:R}),e[72]=l,e[73]=R,e[74]=_,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 yo(r){return r.name}function bo(r){return r.name}function vo(r){return r.name}function Co(r,e){return(r.conn?.title??r.clientId).localeCompare(e.conn?.title??e.clientId)}function No(r){return[r.id,r]}function Me(r){const e=r.trim().split(/\s+/);return e.length!==5?!1:e.every(s=>/^[\d*/,-]+$/.test(s))}function So(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 a=e.match(/^0\s+0\s+\*\/(\d+)\s+\*\s+\*$/);if(a){const o=parseInt(a[1]??"1");return o%7===0?`Every ${o/7} weeks`:`Every ${o} days`}const i=e.match(/^(\d+)\s+(\d+)\s+\*\s+\*\s+\*$/);if(i){const o=(i[2]??"0").padStart(2,"0"),j=(i[1]??"0").padStart(2,"0");return`Every day at ${o}:${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 ko(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 To(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 a=e.match(/^0\s+0\s+\*\/(\d+)\s+\*\s+\*$/);return a?{count:parseInt(a[1]),unit:"days"}:null}function wo(r,e){return e===1?{minutes:"minute",hours:"hour",days:"day",weeks:"week"}[r]??r:r}const Do=[{label:"5 minutes",cron:"*/5 * * * *"},{label:"Hour",cron:"0 * * * *"},{label:"Day",cron:"0 0 * * *"},{label:"Week",cron:"0 0 * * 1"}],Ye=oo.filter(r=>!so.includes(r)),Bt=["any","earlier","later","statuses"],_o=r=>Ye.some(e=>e===r),Io=r=>Bt.some(e=>e===r);function Ao({automationId:r,open:e,onOpenChange:s}){const n=ee(),{triggerAdd:a}=ve(),[i,c]=w.useState("in_progress"),[o,j]=w.useState("any"),[d,m]=w.useState([]),x=Ye.filter(l=>l!==i),f=d.filter(l=>l!==i),g=o!=="statuses"||f.length>0,u=l=>{l||(c("in_progress"),j("any"),m([])),s(l)},h=async()=>{try{await a.mutateAsync({automation_id:r,type:"board_column_transition",column_key:i,from:o==="statuses"?{kind:o,statuses:f}:{kind:o}}),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(Ze,{open:e,onOpenChange:u,children:t.jsxs(et,{className:"max-w-md",children:[t.jsxs(tt,{children:[t.jsx(st,{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=>{_o(l)&&c(l)},children:[t.jsx(he,{className:"w-full",children:t.jsx(je,{})}),t.jsx(ye,{children:Ye.map(l=>{const{label:y,visual:v}=Ue(l,n),N=v.icon;return t.jsxs(be,{value:l,children:[t.jsx(N,{size:14,className:At("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:o,onValueChange:l=>{Io(l)&&j(l)},children:[t.jsx(he,{className:"w-full",children:t.jsx(je,{})}),t.jsx(ye,{children:Bt.map(l=>t.jsx(be,{value:l,children:p(l)},l))})]}),o==="statuses"&&t.jsx(Ut,{options:x.map(l=>({label:Ue(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(at,{children:[t.jsx(B,{variant:"ghost",onClick:()=>u(!1),children:n("automations.columnTransitionDialog.cancel")}),t.jsx(B,{disabled:!g||a.isPending,onClick:h,children:n("automations.columnTransitionDialog.add")})]})]})})}const Gt=["any","earlier","later","statuses"],Po=r=>Gt.some(e=>e===r);function $o({automationId:r,boardId:e,open:s,onOpenChange:n}){const a=ee(),{triggerAdd:i}=ve(),c=Zs(s?e:null),[o,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=o??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(a("automations.addStarterPopover.starterAdded")),y(!1)}catch(b){X.error(b instanceof Error?b.message:a("automations.addStarterPopover.failedAddStarter"))}},N=b=>a(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:a("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(Ze,{open:s,onOpenChange:y,children:t.jsxs(et,{className:"max-w-md",children:[t.jsxs(tt,{children:[t.jsx(st,{children:a("automations.jiraTransitionDialog.title")}),t.jsx(ot,{children:a("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:a("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:a("automations.jiraTransitionDialog.origin")}),t.jsxs(ge,{value:d,onValueChange:b=>{Po(b)&&m(b)},children:[t.jsx(he,{className:"w-full",children:t.jsx(je,{})}),t.jsx(ye,{children:Gt.map(b=>t.jsx(be,{value:b,children:N(b)},b))})]}),d==="statuses"&&t.jsx(Ut,{options:h.map(b=>({label:b,value:b})),defaultValue:p,onValueChange:f,placeholder:a("automations.jiraTransitionDialog.statusesPlaceholder"),modalPopover:!0,className:"max-w-none"},u)]}),t.jsx("p",{className:"text-xs text-muted-foreground",children:a("automations.jiraTransitionDialog.help")})]}),t.jsxs(at,{children:[t.jsx(B,{variant:"ghost",onClick:()=>y(!1),children:a("automations.jiraTransitionDialog.cancel")}),t.jsx(B,{disabled:!l||i.isPending,onClick:v,children:a("automations.jiraTransitionDialog.add")})]})]})})}function zo({automationId:r,open:e,onOpenChange:s,onCustomSelect:n,onEventSelect:a,onWebhookCreated:i}){const c=ee(),{triggerAdd:o}=ve(),[j,d]=w.useState(!1),[m,x]=w.useState(!1),[f,g]=w.useState(!1),u=eo().data?.boardId??null,h=e??j,p=v=>{s?s(v):d(v)},l=async v=>{try{await o.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 o.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(to,{size:14}),c("automations.addStarterPopover.addStarter")]})}),t.jsxs(os,{align:"end",className:"w-[240px]",children:[t.jsxs(as,{children:[t.jsxs(ns,{className:"gap-2.5",children:[t.jsx(Fe,{size:14,className:"text-muted-foreground shrink-0"}),c("automations.addStarterPopover.every")]}),t.jsx(is,{className:"w-[160px]",children:Do.map(v=>t.jsxs(Ee,{className:"gap-2.5",onSelect:()=>l(v.cron),disabled:o.isPending,children:[t.jsx(Fe,{size:14,className:"text-muted-foreground shrink-0"}),c("automations.addStarterPopover.everyUnit",{unit:v.label})]},v.cron))})]}),t.jsxs(Ee,{className:"gap-2.5",onSelect:()=>{p(!1),n?.()},children:[t.jsx(Fe,{size:14,className:"text-muted-foreground shrink-0"}),c("automations.addStarterPopover.customCron")]}),t.jsxs(Ee,{className:"gap-2.5",onSelect:()=>{p(!1),a?.()},children:[t.jsx(mt,{size:14,className:"text-muted-foreground shrink-0"}),c("automations.addStarterPopover.event")]}),t.jsxs(Ee,{className:"gap-2.5",onSelect:()=>{p(!1),x(!0)},children:[t.jsx($t,{size:14,className:"text-muted-foreground shrink-0"}),c("automations.addStarterPopover.cardEntersColumn")]}),u&&t.jsxs(Ee,{className:"gap-2.5",onSelect:()=>{p(!1),g(!0)},children:[t.jsx(Vt,{size:14,className:"shrink-0"}),c("automations.addStarterPopover.jiraIssueEntersStatus")]}),t.jsxs(Ee,{className:"gap-2.5",onSelect:()=>{y()},disabled:o.isPending,children:[t.jsx(nt,{size:14,className:"text-muted-foreground shrink-0"}),c("automations.addStarterPopover.webhook")]})]})]}),t.jsx(Ao,{automationId:r,open:m,onOpenChange:x}),u&&t.jsx($o,{automationId:r,boardId:u,open:f,onOpenChange:g})]})}function Ht(r){const e=Z.c(39),{open:s,onOpenChange:n,url:a,token:i,title:c,description:o}=r,j=c===void 0?"Webhook ready":c,d=o===void 0?"Send a POST to this URL with the bearer token to fire the automation. The token is shown once — copy it now.":o,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]!==a?(N=a&&i&&h==="url"?`${a.replace(/\/$/,"")}/${i}`:a??"",e[2]=h,e[3]=i,e[4]=a,e[5]=N):N=e[5];const S=N,b=a&&i?h==="header"?`curl -X POST "${S}" \\
|
|
1
|
+
import{az as Yt,c as Z,b as ee,r as w,j as t,B,ah as Zt,l as Pt,a2 as $t,D as et,q as tt,s as st,v as ot,aM as at,w as nt,t as X,b1 as es,X as ts,T as ss,V as os,as,aq as ns,ar as is,U as Oe,aW as rs,h as Le,y as Ke,aE as ls,b9 as pt,I as xt,ba as cs,al as ds,a_ as Ye,n as Xe,f as ms}from"./index-B-eHj4u4.js";import{C as us}from"./index-BlmkjYB7.js";import{b as it,O as fs,a as ps,a4 as xs,h as gt,aw as gs,V as ht,ax as hs,f as js,N as Me,ay as zt}from"./agent-icon-E5NFjGaq.js";import{n as jt}from"./ShoppingBag01-B47bYriG.js";import{t as rt}from"./ChevronUp-B7Vn1Rb2.js";import{e as ys}from"./UserSquare-C1l8QNgE.js";import{e as lt,b as Et,t as Ot}from"./Tool01-Ceiq1yQg.js";import{a as bs}from"./Image01-BcbXjZdM.js";import{i as vs}from"./SearchMd-CTE_Dij_.js";import{B as Kt}from"./badge-sJYWVYje.js";import{C as Ft}from"./checkbox-C6deEGCR.js";import{S as ct}from"./switch-CkX0BpKj.js";import{a as Mt,b as Rt,P as Lt}from"./popover-DrRqLOLZ.js";import{C as Cs,a as yt,b as Ns,d as Ss,e as ks,c as Ts}from"./command-CVodN_KO.js";import{g as ws,s as Ds}from"./tool-namespace-XBvXTguD.js";import{u as dt}from"./use-connection-D8Z-oNDI.js";import{u as _s}from"./use-mcp-client-fHTUkiQr.js";import{u as Is}from"./use-mcp-tools-D4mzKQtZ.js";import{I as As}from"./integration-icon-DKhUl3mk.js";import{M as Ps}from"./select-model-DSiTAeyQ.js";import{u as $s}from"./use-ai-providers-CrjK99NZ.js";import{U as zs,b as Es}from"./build-improve-prompt-doc-CtseFH_6.js";import{a as ve,c as Os,d as Ks}from"./use-automations-AJoQb6lP.js";import{c as Fs,b as Ms,h as Rs,t as Ls}from"./chat-context-tvcXoBeE.js";import{b as Vs,C as Us,a as Ws}from"./collapsible-DNW_6aVc.js";import{c as Bs,T as Gs,a as Hs}from"./tooltip-Wg5TOkgk.js";import{a as Js}from"./shell-layout-jpc-IFbN.js";import{i as Vt}from"./ArrowLeft-ChZ5XGHH.js";import{i as Xs}from"./ArrowUp-BseWcDxZ.js";import{s as qs}from"./Trash01-QaBoOmQD.js";import{s as mt}from"./XClose-CDVFbEme.js";import{u as bt}from"./use-debounced-autosave-CU9q8XT5.js";import{T as Qs,a as Ys}from"./input-CyiZQSl-.js";import{u as Zs,a as eo,J as Ut}from"./jira-icon-B2cXiao2.js";import{s as to}from"./Plus-FrFsiUQv.js";import{i as ut}from"./ZoomOut-0IXFhA1q.js";import{l as We,H as so}from"./config-CH426QBK.js";import{C as oo}from"./task-board-BDqVuMua.js";import{M as Wt}from"./multi-select-Bt7N4nxw.js";import{S as ge,b as he,a as je,d as ye,c as be}from"./select-Be8KEqhq.js";import{b as ao,a as no,T as vt}from"./tabs-Mabj7P4A.js";import{a as qe}from"./Copy01-BeZeYuYP.js";import{MonacoCodeEditor as io}from"./monaco-editor-CETdPqMD.js";import{A as Ct,a as Nt,b as St,c as kt,g as Tt,d as wt,e as Dt,f as _t}from"./alert-dialog-BY83tkfe.js";import{A as ro}from"./automation-runs-CAYarR59.js";import{C as lo}from"./collection-tabs-D-985lbS.js";import{a as co}from"./use-panel-navigate-CtG66pHN.js";import"./use-mobile-BZpAUwUb.js";import"./use-app-takeover-BEzSlm3S.js";import"./sheet-DcLd8f_T.js";import"./use-project-native-view-presence-BK8YOIZ_.js";import"./thread-route-BiZeKn-m.js";import"./thread-intent-2PQ2tJ8y.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-L6MF8kFC.js";import"./slugify-CEUa2lfQ.js";import"./use-file-configs-bBTy3-MH.js";import"./use-organization-settings-PcDKDabM.js";import"./schema-CYEVNkkO.js";import"./repository-binding-CVI26IB4.js";import"./site-slug-DebpOoQq.js";import"./toolbar-icon-button-CysTSWyH.js";import"./resizable-Bvs1DfKq.js";import"./icon-button-AZBqWvLN.js";import"./use-project-scope-BIaj1klw.js";import"./AlertCircle-CxMEbIvM.js";import"./LinkBroken01-B4m_6hKA.js";import"./Building02-BCzHZCeO.js";import"./CheckCircle-BRmDGKsS.js";import"./ChevronSelectorVertical-DXUxjCek.js";import"./CreditCard01-CR3uiUwh.js";import"./DotsVertical-C85_hpnn.js";import"./Globe04-DTEEsJ26.js";import"./SwitchHorizontal01-B8pZTGji.js";import"./Key01-BnDtFdB6.js";import"./Link01-CeBVtW9F.js";import"./Monitor01-DluZDvx0.js";import"./Sun-BADHqp_z.js";import"./Play-C67yELx6.js";import"./Upload01-CfxF6ZJF.js";import"./User01-DowUGIml.js";import"./Users01-BvAfz3hH.js";import"./index-CWGftR7V.js";import"./auth-3_xtjhZa.js";import"./drawer-CkTzw9-A.js";import"./index-C5owFjSB.js";import"./ai-providers-logos-DD3qZ33J.js";import"./avatar-D-6InH0Y.js";import"./autosend-Dqgiz7-z.js";import"./use-decopilot-events-DrGKqtmd.js";import"./use-chat-navigation-BVwgk2mi.js";import"./location-BjlyegC2.js";import"./index-SEQedjDw.js";import"./use-clock-tick-B6NhSBfs.js";import"./project-icon-D9S8dOj2.js";import"./new-project-dialog-BiL8l-Gz.js";import"./label-Hktokb9g.js";import"./repository-import-picker-Cv7ik8wr.js";import"./use-navigate-to-agent-CsnmgB4q.js";import"./repository-picker-CaK5oYjG.js";import"./useInfiniteQuery-B6mFaUqW.js";import"./infiniteQueryObserver-OMlvsWcf.js";import"./collection-search-BzGtQCoT.js";import"./use-debounced-value-B43T9Zwm.js";import"./required-auth-layout-BA_CRgc2.js";import"./use-org-sso-BrvNWA5X.js";import"./suggestion-D6gjcmHp.js";import"./usage-stats-0IIA6wpa.js";import"./form-lTigv9Cm.js";import"./utils-CVEq3hMx.js";import"./markdown-nIQQa0PZ.js";import"./use-copy-KuwVRxCe.js";import"./format-time-CAj8AQXM.js";import"./differenceInSeconds-C3x8sHUj.js";import"./use-mcp-prompts-BPRabyYT.js";import"./use-org-fs-zGIV3ymG.js";import"./core.esm-DD7e57Ya.js";import"./index-BdQq_4o_.js";import"./editor-CsrsRQNL.js";import"./table-CM8IdXDA.js";import"./empty-state-Ba3qMun8.js";import"./use-infinite-scroll-Bx08szbZ.js";import"./use-members-CKWy7WEt.js";import"./use-org-auth-client-g30TuQtQ.js";import"./task-status-BTchb5mm.js";import"./thread-sheet-body-BUt_0YWK.js";import"./useSuspenseInfiniteQuery-CPzW-hST.js";import"./pair-XFt8jz7C.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-DJ3cRpmT.js";import"./types-C9g69UXw.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./use-thread-outputs-2RD7K4aK.js";import"./file-type-icon-hT5Dk06T.js";const Qe={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}},mo=["fast","smart","thinking"];function uo(r){const e=Z.c(19),{tier:s,onSelect:n}=r,a=ee(),[i,c]=w.useState(!1),o=Qe[s].icon;let j;e[0]!==o?(j=t.jsx(o,{size:14,className:"text-muted-foreground"}),e[0]=o,e[1]=j):j=e[1];const d=Qe[s];let m;e[2]!==a||e[3]!==d.labelKey?(m=a(d.labelKey),e[2]=a,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]!==a||e[11]!==s?(g=mo.map(p=>{const l=Qe[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-muted"),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:a(l.labelKey)}),t.jsx("div",{className:"text-xs text-muted-foreground",children:a(l.subtitleKey)})]}),p===s&&t.jsx(Zt,{size:14,className:"text-foreground mt-0.5"})]},p)}),e[9]=n,e[10]=a,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 fo(r){const e=Z.c(27),{tier:s,onTierChange:n,override:a,onOverrideChange:i}=r,c=ee(),[o,j]=w.useState(a!==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]!==a||e[7]!==c||e[8]!==s||e[9]!==o?(x=o?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(po,{override:a,onOverrideChange:i})}):t.jsx(uo,{tier:s,onSelect:n}),e[4]=i,e[5]=n,e[6]=a,e[7]=c,e[8]=s,e[9]=o,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]!==o?(g=t.jsx(ct,{checked:o,onCheckedChange:f,className:"cursor-pointer"}),e[13]=f,e[14]=o,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 po(r){const e=Z.c(25),{override:s,onOverrideChange:n}=r,a=ee(),i=$s(),c=i[0]?.id??null;let o;e[0]!==c||e[1]!==i||e[2]!==s?.credentialId?(o=i.some(l=>l.id===s?.credentialId)?s?.credentialId??null:c,e[0]=c,e[1]=i,e[2]=s?.credentialId,e[3]=o):o=e[3];const[j,d]=w.useState(o);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]!==a?(l=a("automations.automationConfig.connectAiProviderHint"),e[11]=a,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]!==a?(u=a("automations.automationConfig.pickModelPlaceholder"),e[15]=a,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:Yt},{name:"user_ask",titleKey:"automations.automationConfig.toolAskUser",descriptionKey:"automations.automationConfig.toolAskUserDesc",icon:fs}]},{key:"files",headingKey:"automations.automationConfig.filesCode",icon:gt,tools:[{name:"read",titleKey:"automations.automationConfig.toolReadFile",descriptionKey:"automations.automationConfig.toolReadFileDesc",icon:ps},{name:"write",titleKey:"automations.automationConfig.toolWriteFile",descriptionKey:"automations.automationConfig.toolWriteFileDesc",icon:Et},{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:gt},{name:"bash",titleKey:"automations.automationConfig.toolRunCommand",descriptionKey:"automations.automationConfig.toolRunCommandDesc",icon:gs}]},{key:"context",headingKey:"automations.automationConfig.context",icon:ht,tools:[{name:"read_resource",titleKey:"automations.automationConfig.toolReadResource",descriptionKey:"automations.automationConfig.toolReadResourceDesc",icon:ht},{name:"read_prompt",titleKey:"automations.automationConfig.toolReadPrompt",descriptionKey:"automations.automationConfig.toolReadPromptDesc",icon:jt},{name:"skill",titleKey:"automations.automationConfig.toolLoadSkill",descriptionKey:"automations.automationConfig.toolLoadSkillDesc",icon:jt}]}],xo=Bt.flatMap(r=>r.tools.map(e=>e.name));function go(r){const e=r.replace(/[_-]+/g," ").trim();return e?e.toLowerCase().replace(/\b\w/g,s=>s.toUpperCase()):r}function ho(r){const e=Z.c(12),{agentId:s,value:n,onChange:a}=r,i=ee();let c;e[0]!==i?(c=i("automations.automationConfig.toolsLabel"),e[0]=i,e[1]=c):c=e[1];let o;e[2]!==c?(o=t.jsx("span",{className:"text-xs font-semibold text-muted-foreground/60",children:c}),e[2]=c,e[3]=o):o=e[3];let j;e[4]!==s||e[5]!==a||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(jo,{agentId:s,value:n,onChange:a})}):t.jsx("span",{className:"text-xs text-muted-foreground italic",children:i("automations.automationConfig.pickAgentFirst")}),e[4]=s,e[5]=a,e[6]=i,e[7]=n,e[8]=j):j=e[8];let d;return e[9]!==o||e[10]!==j?(d=t.jsxs("div",{className:"flex flex-col gap-2",children:[o,j]}),e[9]=o,e[10]=j,e[11]=d):d=e[11],d}function It(r){const e=Z.c(17),{value:s,checked:n,onToggle:a,title:i,description:c,leading:o}=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]!==o?(d=o&&t.jsx("span",{className:"mt-px shrink-0",children:o}),e[2]=o,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]!==a||e[12]!==j||e[13]!==d||e[14]!==f||e[15]!==s?(g=t.jsxs(Ns,{value:s,onSelect:a,className:"items-start gap-2.5 py-2",children:[j,d,f]}),e[11]=a,e[12]=j,e[13]=d,e[14]=f,e[15]=s,e[16]=g):g=e[16],g}function At(r){const e=Z.c(27),{conn:s,label:n,icon:a,on:i,total:c,onToggle:o}=r,j=ee(),d=i===c;let m;e[0]!==a||e[1]!==s?(m=s?t.jsx(As,{icon:s.icon,name:s.title,size:"2xs"}):a?t.jsx(a,{size:14,className:"text-muted-foreground"}):t.jsx(ys,{size:14,className:"text-muted-foreground"}),e[0]=a,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-[11px] 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]!==o?(u=v=>{v.stopPropagation(),o()},e[12]=o,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-[11px] 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 jo(r){const e=Z.c(83),{agentId:s,value:n,onChange:a}=r,i=ee(),{org:c}=$t(),[o,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=_s(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]!==a||e[10]!==o||e[11]!==i||e[12]!==n){const q=new Map(u.map(No)),H=new Map;for(const I of f?.tools??[]){const E=ws(I._meta)??"__other__",Y=Ds(I.name,E==="__other__"?void 0:E),P=I.title,xe=P&&P!==I.name?P:go(Y);H.has(E)||H.set(E,{clientId:E,conn:q.get(E),tools:[]}),H.get(E).tools.push({name:I.name,display:xe,description:I.description})}const W=[...H.values()].sort(Co),G=(f?.tools??[]).map(vo),J=[...xo,...G],V=n===null?new Set(J):new Set(n),U=J.every(I=>V.has(I)),z=I=>a(J.every(E=>I.has(E))?null:[...I]),ae=I=>{const E=new Set(V);E.has(I)?E.delete(I):E.add(I),z(E)},ne=(I,E)=>{const Y=new Set(V);for(const P of I)E?Y.add(P):Y.delete(P);z(Y)};y=Lt,A=o,v=j;let Q;e[26]===Symbol.for("react.memo_cache_sentinel")?(Q=t.jsx(lt,{size:14,className:"text-muted-foreground"}),e[26]=Q):Q=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 h-5 px-1.5 text-[11px] 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:[Q,ie,ue,me]})}),e[31]=ie,e[32]=ue,e[33]=N):N=e[33],l=Rt,_="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]!==a?(re=()=>a(null),e[40]=a,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]!==a?(O=()=>a([]),e[49]=a,e[50]=O):O=e[50];const pe=V.size===0;let oe;e[51]!==i?(oe=i("automations.automationConfig.clear"),e[51]=i,e[52]=oe):oe=e[52];let ce;e[53]!==O||e[54]!==pe||e[55]!==oe?(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:oe}),e[53]=O,e[54]=pe,e[55]=oe,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?(D=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]=D):D=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 E=I.tools.map(bo),Y=E.filter(P=>V.has(P)).length;return t.jsx(yt,{heading:t.jsx(At,{label:i(I.headingKey),icon:I.icon,on:Y,total:E.length,onToggle:()=>ne(E,Y!==E.length)}),children:I.tools.map(P=>t.jsx(It,{value:`${i(P.titleKey)} ${P.name}`,checked:V.has(P.name),onToggle:()=>ae(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 E=I.tools.map(yo),Y=E.filter(P=>V.has(P)).length;return t.jsx(yt,{heading:t.jsx(At,{conn:I.conn,on:Y,total:E.length,onToggle:()=>ne(E,Y!==E.length)}),children:I.tools.map(P=>t.jsx(It,{value:`${P.display} ${P.name} ${I.conn?.title??""}`,checked:V.has(P.name),onToggle:()=>ae(P.name),title:P.display,description:P.description},P.name))},I.clientId)})]}),e[6]=u,e[7]=f?.tools,e[8]=g,e[9]=a,e[10]=o,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]=D,e[23]=_,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],D=e[22],_=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]!==D?(R=t.jsxs(p,{children:[T,D,$]}),e[67]=p,e[68]=$,e[69]=T,e[70]=D,e[71]=R):R=e[71];let K;e[72]!==l||e[73]!==R||e[74]!==_||e[75]!==k?(K=t.jsx(l,{className:_,align:k,children:R}),e[72]=l,e[73]=R,e[74]=_,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 yo(r){return r.name}function bo(r){return r.name}function vo(r){return r.name}function Co(r,e){return(r.conn?.title??r.clientId).localeCompare(e.conn?.title??e.clientId)}function No(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 So(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 a=e.match(/^0\s+0\s+\*\/(\d+)\s+\*\s+\*$/);if(a){const o=parseInt(a[1]??"1");return o%7===0?`Every ${o/7} weeks`:`Every ${o} days`}const i=e.match(/^(\d+)\s+(\d+)\s+\*\s+\*\s+\*$/);if(i){const o=(i[2]??"0").padStart(2,"0"),j=(i[1]??"0").padStart(2,"0");return`Every day at ${o}:${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 ko(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 To(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 a=e.match(/^0\s+0\s+\*\/(\d+)\s+\*\s+\*$/);return a?{count:parseInt(a[1]),unit:"days"}:null}function wo(r,e){return e===1?{minutes:"minute",hours:"hour",days:"day",weeks:"week"}[r]??r:r}const Do=[{label:"5 minutes",cron:"*/5 * * * *"},{label:"Hour",cron:"0 * * * *"},{label:"Day",cron:"0 0 * * *"},{label:"Week",cron:"0 0 * * 1"}],Ze=oo.filter(r=>!so.includes(r)),Gt=["any","earlier","later","statuses"],_o=r=>Ze.some(e=>e===r),Io=r=>Gt.some(e=>e===r);function Ao({automationId:r,open:e,onOpenChange:s}){const n=ee(),{triggerAdd:a}=ve(),[i,c]=w.useState("in_progress"),[o,j]=w.useState("any"),[d,m]=w.useState([]),x=Ze.filter(l=>l!==i),f=d.filter(l=>l!==i),g=o!=="statuses"||f.length>0,u=l=>{l||(c("in_progress"),j("any"),m([])),s(l)},h=async()=>{try{await a.mutateAsync({automation_id:r,type:"board_column_transition",column_key:i,from:o==="statuses"?{kind:o,statuses:f}:{kind:o}}),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(ot,{children:n("automations.columnTransitionDialog.title")}),t.jsx(at,{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=>{_o(l)&&c(l)},children:[t.jsx(he,{className:"w-full",children:t.jsx(je,{})}),t.jsx(ye,{children:Ze.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:o,onValueChange:l=>{Io(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))})]}),o==="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||a.isPending,onClick:h,children:n("automations.columnTransitionDialog.add")})]})]})})}const Ht=["any","earlier","later","statuses"],Po=r=>Ht.some(e=>e===r);function $o({automationId:r,boardId:e,open:s,onOpenChange:n}){const a=ee(),{triggerAdd:i}=ve(),c=Zs(s?e:null),[o,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=o??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(a("automations.addStarterPopover.starterAdded")),y(!1)}catch(b){X.error(b instanceof Error?b.message:a("automations.addStarterPopover.failedAddStarter"))}},N=b=>a(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:a("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(ot,{children:a("automations.jiraTransitionDialog.title")}),t.jsx(at,{children:a("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:a("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:a("automations.jiraTransitionDialog.origin")}),t.jsxs(ge,{value:d,onValueChange:b=>{Po(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:a("automations.jiraTransitionDialog.statusesPlaceholder"),modalPopover:!0,className:"max-w-none"},u)]}),t.jsx("p",{className:"text-xs text-muted-foreground",children:a("automations.jiraTransitionDialog.help")})]}),t.jsxs(nt,{children:[t.jsx(B,{variant:"ghost",onClick:()=>y(!1),children:a("automations.jiraTransitionDialog.cancel")}),t.jsx(B,{disabled:!l||i.isPending,onClick:v,children:a("automations.jiraTransitionDialog.add")})]})]})})}function zo({automationId:r,open:e,onOpenChange:s,onCustomSelect:n,onEventSelect:a,onWebhookCreated:i}){const c=ee(),{triggerAdd:o}=ve(),[j,d]=w.useState(!1),[m,x]=w.useState(!1),[f,g]=w.useState(!1),u=eo().data?.boardId??null,h=e??j,p=v=>{s?s(v):d(v)},l=async v=>{try{await o.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 o.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(to,{size:14}),c("automations.addStarterPopover.addStarter")]})}),t.jsxs(os,{align:"end",className:"w-[240px]",children:[t.jsxs(as,{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:Do.map(v=>t.jsxs(Oe,{className:"gap-2.5",onSelect:()=>l(v.cron),disabled:o.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),a?.()},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(zt,{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:o.isPending,children:[t.jsx(it,{size:14,className:"text-muted-foreground shrink-0"}),c("automations.addStarterPopover.webhook")]})]})]}),t.jsx(Ao,{automationId:r,open:m,onOpenChange:x}),u&&t.jsx($o,{automationId:r,boardId:u,open:f,onOpenChange:g})]})}function Jt(r){const e=Z.c(39),{open:s,onOpenChange:n,url:a,token:i,title:c,description:o}=r,j=c===void 0?"Webhook ready":c,d=o===void 0?"Send a POST to this URL with the bearer token to fire the automation. The token is shown once — copy it now.":o,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]!==a?(N=a&&i&&h==="url"?`${a.replace(/\/$/,"")}/${i}`:a??"",e[2]=h,e[3]=i,e[4]=a,e[5]=N):N=e[5];const S=N,b=a&&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{az as Yt,c as Z,b as ee,r as w,j as t,B,ah as Zt,l as At,a2 as Pt,D as Ze
|
|
|
16
16
|
"Content-Type": "application/json",
|
|
17
17
|
},
|
|
18
18
|
body: JSON.stringify({ hello: "world" }),
|
|
19
|
-
});`:"",D=g==="curl"?b:T;let _;e[6]!==j?(_=t.jsx(st,{children:j}),e[6]=j,e[7]=_):_=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]!==_||e[11]!==k?(A=t.jsxs(tt,{children:[_,k]}),e[10]=_,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]!==D||e[19]!==m||e[20]!==i||e[21]!==l||e[22]!==a?($=a&&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(Xe,{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(Xe,{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(ao,{value:g,onValueChange:W=>u(W),children:t.jsxs(no,{className:"h-8 p-[2px]",children:[t.jsx(bt,{value:"curl",className:"h-7 px-2.5 text-xs",children:"curl"}),t.jsx(bt,{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(Kt,{id:l,checked:h==="url",onCheckedChange:W=>p(W?"url":"header")}),m("automations.webhookSecretDialog.tokenInUrl")]})]}),t.jsxs(B,{size:"sm",variant:"outline",onClick:()=>v(D,"example"),children:[t.jsx(Xe,{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(io,{code:D,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]=D,e[19]=m,e[20]=i,e[21]=l,e[22]=a,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(at,{children:t.jsx(B,{onClick:R,children:K})}),e[28]=K,e[29]=R,e[30]=F):F=e[30];let q;e[31]!==F||e[32]!==A||e[33]!==$?(q=t.jsxs(et,{className:"max-w-lg",children:[A,$,F]}),e[31]=F,e[32]=A,e[33]=$,e[34]=q):q=e[34];let H;return e[35]!==n||e[36]!==s||e[37]!==q?(H=t.jsx(Ze,{open:s,onOpenChange:n,children:q}),e[35]=n,e[36]=s,e[37]=q,e[38]=H):H=e[38],H}function Jt(r){const e=Z.c(153),{trigger:s,automationId:n,connectionName:a,readOnly:i}=r,c=i===void 0?!1:i,o=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?To(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,D]=w.useState(s.cron_expression??""),_=d.isPending||j.isPending||m.isPending,k=s.type==="cron",A=s.type==="webhook",$=s.type==="board_column_transition";let R;e[2]!==o||e[3]!==s.type?(R=s.type==="board_pr_ready"?o("automations.triggerCard.prReady"):s.type==="linked_chat_run"?o("automations.triggerCard.linkedChatRun"):s.type==="board_pr_merged"?o("automations.triggerCard.prMerged"):s.type==="chat_pr_opened"?o("automations.triggerCard.chatPrOpened"):null,e[2]=o,e[3]=s.type,e[4]=R):R=e[4];const K=R,F=s.type==="jira_transition";let q;e[5]!==n||e[6]!==d||e[7]!==o||e[8]!==s.id?(q=async()=>{try{await d.mutateAsync({trigger_id:s.id,automation_id:n}),X.success(o("automations.triggerCard.starterRemoved"))}catch{X.error(o("automations.triggerCard.failedToRemoveStarter"))}f(!1)},e[5]=n,e[6]=d,e[7]=o,e[8]=s.id,e[9]=q):q=e[9];const H=q;let W;e[10]!==j||e[11]!==n||e[12]!==d||e[13]!==s.id?(W=async L=>{await j.mutateAsync({automation_id:n,type:"cron",cron_expression:L}),await d.mutateAsync({trigger_id:s.id,automation_id:n})},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]!==o||e[18]!==s.cron_expression?(J=async()=>{const L=T.trim();if(!L||!Me(L)||L===s.cron_expression){b(!1),D(s.cron_expression??"");return}try{await G(L),b(!1)}catch{X.error(o("automations.triggerCard.failedToUpdateStarter")),D(s.cron_expression??""),b(!1)}},e[15]=T,e[16]=G,e[17]=o,e[18]=s.cron_expression,e[19]=J):J=e[19];const V=J;let U;e[20]!==n||e[21]!==m||e[22]!==o||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(o("automations.triggerCard.failedToRotateToken"))}},e[20]=n,e[21]=m,e[22]=o,e[23]=s.id,e[24]=U):U=e[24];const z=U;let ae;e[25]!==y||e[26]!==G||e[27]!==o||e[28]!==s.cron_expression?(ae=async L=>{if(!y)return;const Qt=y.unit==="minutes"?5:1,He=Math.max(Qt,L);He!==L&&N(He);const ut=ko(He,y.unit);if(ut!==s.cron_expression)try{await G(ut)}catch{X.error(o("automations.triggerCard.failedToUpdateStarter")),N(y.count)}},e[25]=y,e[26]=G,e[27]=o,e[28]=s.cron_expression,e[29]=ae):ae=e[29];const ne=ae;let Q;e[30]!==$||e[31]!==k||e[32]!==F||e[33]!==A||e[34]!==K?(Q=k?t.jsx(Fe,{size:14,className:"text-muted-foreground shrink-0"}):F?t.jsx(Vt,{size:14,className:"shrink-0"}):$||K?t.jsx($t,{size:14,className:"text-muted-foreground shrink-0"}):A?t.jsx(nt,{size:14,className:"text-muted-foreground shrink-0"}):t.jsx(mt,{size:14,className:"text-muted-foreground shrink-0"}),e[30]=$,e[31]=k,e[32]=F,e[33]=A,e[34]=K,e[35]=Q):Q=e[35];let ie;e[36]!==a||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]!==_||e[47]!==A||e[48]!==K||e[49]!==o||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:o("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:_,className:"w-12 text-center text-sm h-7 border border-border rounded-md bg-background px-1 focus:outline-none focus:ring-1 focus:ring-ring"}),t.jsx("span",{className:"text-sm",children:wo(y.unit,v)})]}):k&&S?t.jsxs(t.Fragment,{children:[t.jsx("input",{type:"text",value:T,onChange:L=>D(L.target.value),onBlur:V,onKeyDown:L=>{L.key==="Enter"&&L.target.blur(),L.key==="Escape"&&(b(!1),D(s.cron_expression??""))},className:"flex-1 text-sm font-mono bg-transparent outline-none",autoFocus:!0}),T&&!Me(T)&&t.jsx("span",{className:"text-xs text-muted-foreground/60 shrink-0",children:o("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?So(s.cron_expression??""):$?o("automations.triggerCard.cardEntersColumn",{lane:Ue(s.column_key??"",o).label}):K||(F?o("automations.triggerCard.issueEntersJiraStatus",{status:s.column_key??""}):A?o("automations.triggerCard.webhookPostToFire"):`${s.event_type}${a?` · ${a}`:""}`)}),$&&t.jsx(Eo,{from:s.from}),F&&t.jsx(Ko,{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(Oo).join(", ")})]}),e[36]=a,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]=_,e[47]=A,e[48]=K,e[49]=o,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]!==_?(ue=_&&t.jsx(Re,{className:"size-[13px] text-muted-foreground"}),e[56]=_,e[57]=ue):ue=e[57];let me;e[58]!==y||e[59]!==k||e[60]!==S||e[61]!==o||e[62]!==s.cron_expression?(me=k&&!y&&!S&&t.jsx(B,{variant:"ghost",size:"sm",className:"h-7 w-7 p-0 opacity-0 group-hover:opacity-100 transition-opacity","aria-label":o("automations.triggerCard.editSchedule"),onClick:()=>{D(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]=o,e[62]=s.cron_expression,e[63]=me):me=e[63];let te;e[64]!==A||e[65]!==o?(te=A&&t.jsx(B,{variant:"ghost",size:"sm",className:"h-7 w-7 p-0 opacity-0 group-hover:opacity-100 transition-opacity",title:o("automations.triggerCard.rotateToken"),"aria-label":o("automations.triggerCard.rotateToken"),onClick:()=>u(!0),children:t.jsx(rs,{size:13,className:"text-muted-foreground"})}),e[64]=A,e[65]=o,e[66]=te):te=e[66];let fe;e[67]!==c||e[68]!==o?(fe=!c&&t.jsx(B,{variant:"ghost",size:"sm",className:"h-7 w-7 p-0 opacity-0 group-hover:opacity-100 transition-opacity","aria-label":o("automations.triggerCard.removeStarter"),onClick:()=>f(!0),children:t.jsx(dt,{size:13,className:"text-muted-foreground"})}),e[67]=c,e[68]=o,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]!==Q?(re=t.jsxs("div",{className:"flex items-center gap-2.5 px-3 py-2.5 rounded-lg border border-border bg-background group",children:[Q,ie,se]}),e[75]=ie,e[76]=se,e[77]=Q,e[78]=re):re=e[78];let le;e[79]!==o?(le=o("automations.triggerCard.removeStarter"),e[79]=o,e[80]=le):le=e[80];let C;e[81]!==le?(C=t.jsx(vt,{children:le}),e[81]=le,e[82]=C):C=e[82];let M;e[83]!==o?(M=o("automations.triggerCard.confirmRemoveStarter"),e[83]=o,e[84]=M):M=e[84];let E;e[85]!==M?(E=t.jsx(Ct,{children:M}),e[85]=M,e[86]=E):E=e[86];let pe;e[87]!==C||e[88]!==E?(pe=t.jsxs(Nt,{children:[C,E]}),e[87]=C,e[88]=E,e[89]=pe):pe=e[89];let oe;e[90]!==o?(oe=o("automations.triggerCard.cancel"),e[90]=o,e[91]=oe):oe=e[91];let ce;e[92]!==oe?(ce=t.jsx(St,{children:oe}),e[92]=oe,e[93]=ce):ce=e[93];let de;e[94]!==o?(de=o("automations.triggerCard.remove"),e[94]=o,e[95]=de):de=e[95];let I;e[96]!==H||e[97]!==de?(I=t.jsx(kt,{onClick:H,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",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(Tt,{children:[ce,I]}),e[99]=ce,e[100]=I,e[101]=O):O=e[101];let Y;e[102]!==pe||e[103]!==O?(Y=t.jsxs(wt,{children:[pe,O]}),e[102]=pe,e[103]=O,e[104]=Y):Y=e[104];let P;e[105]!==x||e[106]!==Y?(P=t.jsx(Dt,{open:x,onOpenChange:f,children:Y}),e[105]=x,e[106]=Y,e[107]=P):P=e[107];let xe;e[108]!==o?(xe=o("automations.triggerCard.rotateWebhookToken"),e[108]=o,e[109]=xe):xe=e[109];let Ce;e[110]!==xe?(Ce=t.jsx(vt,{children:xe}),e[110]=xe,e[111]=Ce):Ce=e[111];let Ne;e[112]!==o?(Ne=o("automations.triggerCard.rotateWebhookTokenDescription"),e[112]=o,e[113]=Ne):Ne=e[113];let Se;e[114]!==Ne?(Se=t.jsx(Ct,{children:Ne}),e[114]=Ne,e[115]=Se):Se=e[115];let ke;e[116]!==Ce||e[117]!==Se?(ke=t.jsxs(Nt,{children:[Ce,Se]}),e[116]=Ce,e[117]=Se,e[118]=ke):ke=e[118];let Te;e[119]!==o?(Te=o("automations.triggerCard.cancel"),e[119]=o,e[120]=Te):Te=e[120];let we;e[121]!==Te?(we=t.jsx(St,{children:Te}),e[121]=Te,e[122]=we):we=e[122];let De;e[123]!==o?(De=o("automations.triggerCard.rotate"),e[123]=o,e[124]=De):De=e[124];let _e;e[125]!==z||e[126]!==De?(_e=t.jsx(kt,{onClick:z,children:De}),e[125]=z,e[126]=De,e[127]=_e):_e=e[127];let Ie;e[128]!==we||e[129]!==_e?(Ie=t.jsxs(Tt,{children:[we,_e]}),e[128]=we,e[129]=_e,e[130]=Ie):Ie=e[130];let Ae;e[131]!==ke||e[132]!==Ie?(Ae=t.jsxs(wt,{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(Dt,{open:g,onOpenChange:u,children:Ae}),e[134]=g,e[135]=Ae,e[136]=Pe):Pe=e[136];const We=h!==null;let Le;e[137]===Symbol.for("react.memo_cache_sentinel")?(Le=L=>{L||p(null)},e[137]=Le):Le=e[137];const Be=h?.url??null,Ge=h?.token??null;let $e;e[138]!==o?($e=o("automations.triggerCard.newWebhookToken"),e[138]=o,e[139]=$e):$e=e[139];let ze;e[140]!==o?(ze=o("automations.triggerCard.newWebhookTokenDescription"),e[140]=o,e[141]=ze):ze=e[141];let Oe;e[142]!==We||e[143]!==Be||e[144]!==Ge||e[145]!==$e||e[146]!==ze?(Oe=t.jsx(Ht,{open:We,onOpenChange:Le,url:Be,token:Ge,title:$e,description:ze}),e[142]=We,e[143]=Be,e[144]=Ge,e[145]=$e,e[146]=ze,e[147]=Oe):Oe=e[147];let Ve;return e[148]!==re||e[149]!==P||e[150]!==Pe||e[151]!==Oe?(Ve=t.jsxs(t.Fragment,{children:[re,P,Pe,Oe]}),e[148]=re,e[149]=P,e[150]=Pe,e[151]=Oe,e[152]=Ve):Ve=e[152],Ve}function Oo(r){const[e,s]=r;return`${e}: ${s}`}function Eo(r){const e=Z.c(10),{from:s}=r,n=ee();let a;e[0]!==s||e[1]!==n?(a=!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=>Ue(m,n).label).join(", ")}):null,e[0]=s,e[1]=n,e[2]=a):a=e[2];const i=a;let c;e[3]!==n?(c=n("automations.triggerCard.unownedOnly"),e[3]=n,e[4]=c):c=e[4];let o;e[5]!==i||e[6]!==c?(o=[i,c].filter(Boolean),e[5]=i,e[6]=c,e[7]=o):o=e[7];const j=o.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 Ko(r){const e=Z.c(6),{from:s}=r,n=ee();if(!s||s.kind==="any")return null;let a;e[0]!==s.kind||e[1]!==s.statuses||e[2]!==n?(a=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]=a):a=e[3];let i;return e[4]!==a?(i=t.jsx("span",{className:"text-xs text-muted-foreground/60 truncate",children:a}),e[4]=a,e[5]=i):i=e[5],i}function Fo(r){const e=Z.c(70),{automationId:s,onDone:n}=r,a=ee();let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i={binding:"TRIGGER"},e[0]=i):i=e[0];const c=ct(i),[o,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}=Es(o);let l,y,v,N,S,b;if(e[2]!==u||e[3]!==s||e[4]!==o||e[5]!==d||e[6]!==p||e[7]!==n||e[8]!==f||e[9]!==a||e[10]!==c||e[11]!==h){const _=h?.find(U=>U.type===d);let k;e[18]!==u||e[19]!==s||e[20]!==o||e[21]!==d||e[22]!==n||e[23]!==f||e[24]!==a?(k=async()=>{if(!(!o||!d))try{await u.mutateAsync({automation_id:s,type:"event",event_type:d,connection_id:o,params:f}),Ke("automation_trigger_added",{automation_id:s,trigger_type:"event",connection_id:o,event_type:d}),X.success(a("automations.eventTriggerForm.successAdded")),n()}catch{X.error(a("automations.eventTriggerForm.errorFailed"))}},e[18]=u,e[19]=s,e[20]=o,e[21]=d,e[22]=n,e[23]=f,e[24]=a,e[25]=k):k=e[25],l=k,y="flex flex-col gap-3 px-3 py-3 rounded-lg border border-border bg-background";let A;e[26]===Symbol.for("react.memo_cache_sentinel")?(A=t.jsx(mt,{size:14,className:"text-muted-foreground shrink-0"}),e[26]=A):A=e[26];let $;e[27]!==a?($=a("automations.eventTriggerForm.title"),e[27]=a,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(dt,{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 q=o??"";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]!==a?(W=a("automations.eventTriggerForm.selectConnectionPlaceholder"),e[38]=a,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]!==a||e[43]!==c?(J=c.length===0?t.jsx("div",{className:"px-2 py-3 text-center text-xs text-muted-foreground",children:a("automations.eventTriggerForm.noConnectionsWithTrigger")}):c.map(Lo),e[42]=a,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]!==q||e[48]!==G||e[49]!==V?(N=t.jsxs(ge,{value:q,onValueChange:H,children:[G,V]}),e[47]=q,e[48]=G,e[49]=V,e[50]=N):N=e[50],e[51]!==o||e[52]!==d||e[53]!==p||e[54]!==a||e[55]!==h?(S=o&&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(Re,{className:"size-[13px]"}),a("automations.eventTriggerForm.loadingEvents")]}):t.jsx(je,{placeholder:a("automations.eventTriggerForm.selectEventTypePlaceholder"),children:d??a("automations.eventTriggerForm.selectEventTypePlaceholder")})}),t.jsx(ye,{children:h?.map(Ro)})]}),e[51]=o,e[52]=d,e[53]=p,e[54]=a,e[55]=h,e[56]=S):S=e[56],b=_?.paramsSchema&&Object.keys(_.paramsSchema).length>0&&t.jsx("div",{className:"flex flex-col gap-2",children:Object.entries(_.paramsSchema).map(U=>{const[z,ae]=U;return t.jsxs("div",{className:"flex flex-col gap-1",children:[t.jsxs("label",{className:"text-xs text-muted-foreground",children:[z,ae.description&&t.jsxs("span",{className:"text-muted-foreground/60",children:[" ","— ",ae.description]})]}),ae.enum?t.jsxs(ge,{value:f[z]??"",onValueChange:ne=>g(Q=>({...Q,[z]:ne})),children:[t.jsx(he,{className:"w-full",children:t.jsx(je,{placeholder:a("automations.eventTriggerForm.selectParamPlaceholder",{key:z})})}),t.jsx(ye,{children:ae.enum.map(Mo)})]}):t.jsx("input",{type:"text",value:f[z]??"",onChange:ne=>g(Q=>({...Q,[z]:ne.target.value})),placeholder:ae.description??z,className:"text-sm border border-border rounded-md bg-background px-2 py-1.5 focus:outline-none focus:ring-1 focus:ring-ring"})]},z)})}),e[2]=u,e[3]=s,e[4]=o,e[5]=d,e[6]=p,e[7]=n,e[8]=f,e[9]=a,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]!==o||e[59]!==d||e[60]!==l||e[61]!==a?(T=o&&d&&t.jsx(B,{size:"sm",onClick:l,disabled:u.isPending,children:u.isPending?t.jsx(Re,{className:"size-[13px]"}):a("automations.eventTriggerForm.addTriggerButton")}),e[57]=u,e[58]=o,e[59]=d,e[60]=l,e[61]=a,e[62]=T):T=e[62];let D;return e[63]!==y||e[64]!==v||e[65]!==N||e[66]!==S||e[67]!==b||e[68]!==T?(D=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]=D):D=e[69],D}function Mo(r){return t.jsx(be,{value:r,children:r},r)}function Ro(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 Lo(r){return t.jsx(be,{value:r.id,children:r.title},r.id)}const Vo=30;function Uo(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 a of e.fields)n.add(a);return{...s,fields:n,saveCount:s.saveCount+1}}case"reset":return null}}function Wo({automationId:r,automation:e,onBack:s,onDelete:n}){const a=ee(),i=e.virtual_mcp_id,{org:c}=Pt(),{update:o,triggerAdd:j,run:d}=ve(),m=ct(),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),[q,H]=w.useState(!1),[W,G]=w.useState(!1),J=async()=>{if(K)return;const M=Rs(p).filter(E=>E.type==="text").map(E=>E.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,z=ls({defaultValues:{name:e.name,active:e.active,tier:V,modelOverride:U,tools:e.tools??null,maxAgentSteps:e.maxAgentSteps??null}}),ae=z.watch("active"),[ne,Q]=w.useReducer(Uo,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}),Q({type:"reset"}))},ue=async()=>{const C=z.control._formState.dirtyFields,M=Object.keys(C);if(M.length===0&&!W)return!0;const E=z.getValues(),pe=z.control._defaultValues;z.reset(E,{keepValues:!0});const oe=W;G(!1);const ce={tier:E.tier,...E.modelOverride?{modelId:E.modelOverride.modelId,credentialId:E.modelOverride.credentialId,modelTitle:E.modelOverride.title}:{}},de={id:r,name:E.name,active:E.active,models:ce,tools:E.tools,maxAgentSteps:E.maxAgentSteps,messages:Ls(p),temperature:0};try{await o.mutateAsync(de)}catch{return z.reset(pe,{keepValues:!0}),oe&&G(!0),!1}const I=[...M];return oe&&I.push("messages"),Q({type:"accumulate",now:Date.now(),fields:I}),fe(),!0},{schedule:me,flush:te}=yt({save:ue}),{schedule:fe,flush:se}=yt({delayMs:3e4,save:async()=>ie()});w.useEffect(()=>{const C=z.watch(()=>me());return()=>C.unsubscribe()},[]);const re=C=>{if(l(C),!q){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(a("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(Lt,{size:14}),a("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(ft,{control:z.control,name:"name",render:({field:C})=>t.jsx(pt,{...C,placeholder:a("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",size:"icon",className:"text-muted-foreground hover:text-destructive shrink-0",onClick:n,children:t.jsx(qs,{size:14})})]}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(ft,{control:z.control,name:"active",render:({field:C})=>t.jsx(lt,{checked:C.value,onCheckedChange:M=>{C.onChange(M),te()},className:"cursor-pointer"})}),t.jsx("span",{className:"text-sm text-muted-foreground",children:a(ae?"automations.automationDetail.active":"automations.automationDetail.inactive")}),t.jsx("span",{className:"text-muted-foreground/50 text-sm",children:"·"}),t.jsx(zs,{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:a("automations.automationDetail.starter")}),t.jsx(zo,{automationId:r,open:y,onOpenChange:v,onCustomSelect:()=>{T(!0),A(!1),_("")},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:[a("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:a("automations.automationDetail.addStarter")})," ",a("automations.automationDetail.toGetGoing")]})}):t.jsx("div",{className:"flex flex-col gap-2",children:e.triggers.map(C=>t.jsx(Jt,{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(Fe,{size:14,className:"text-muted-foreground shrink-0"}),t.jsx("input",{type:"text",value:D,onChange:C=>_(C.target.value),onBlur:async()=>{const C=D.trim();if(!(!C||!Me(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(a("automations.automationDetail.starterAdded")),T(!1),_("")}catch{X.error(a("automations.automationDetail.failedToAddStarter"))}},onKeyDown:async C=>{const M=D.trim();C.key==="Enter"&&M&&Me(M)&&C.target.blur(),C.key==="Escape"&&(T(!1),_(""))},placeholder:"0 9 * * 1-5",className:"flex-1 text-sm font-mono bg-transparent outline-none placeholder:text-muted-foreground/40",autoFocus:!0}),D&&!Me(D)&&t.jsx("span",{className:"text-xs text-muted-foreground/60 shrink-0",children:a("automations.automationDetail.invalid")}),j.isPending&&t.jsx(Re,{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),_("")},children:t.jsx(dt,{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(Re,{className:"size-[13px] text-muted-foreground"}),t.jsx("span",{className:"text-sm text-muted-foreground",children:a("automations.automationDetail.loadingConnections")})]}),children:t.jsx(Fo,{automationId:r,onDone:()=>A(!1)})}),t.jsx(Ht,{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:a("automations.automationDetail.instructions")}),t.jsxs(B,{variant:"outline",size:"sm",className:"h-7 gap-1.5 px-2 text-xs",disabled:K||!p,onClick:J,children:[t.jsx(Ot,{size:13}),a("automations.automationDetail.improve")]})]}),t.jsx(Qs,{tiptapDoc:p,setTiptapDoc:re,placeholder:a("automations.automationDetail.instructionsPlaceholder"),children:t.jsxs("div",{className:"rounded-xl border border-border min-h-[120px] flex flex-col",children:[t.jsx(Ys,{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:"h-8 gap-1.5 px-3 text-sm font-medium",onClick:le,disabled:!i,children:[t.jsx(Xs,{size:16}),a("automations.automationDetail.test")]})}),t.jsx(Hs,{children:a("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:a("automations.automationDetail.advanced")}),t.jsx(it,{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(fo,{tier:z.watch("tier"),onTierChange:C=>z.setValue("tier",C,{shouldDirty:!0}),override:z.watch("modelOverride"),onOverrideChange:C=>z.setValue("modelOverride",C,{shouldDirty:!0})}),t.jsx(ho,{agentId:i||null,value:z.watch("tools"),onChange:C=>z.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:a("automations.automationDetail.maxSteps")}),t.jsx(pt,{type:"number",min:1,max:100,className:"w-40",placeholder:a("automations.automationDetail.maxStepsPlaceholder",{default:Vo}),value:z.watch("maxAgentSteps")??"",onChange:C=>{const M=C.target.value.trim(),E=M===""?null:Number(M);z.setValue("maxAgentSteps",E===null||Number.isNaN(E)?null:E,{shouldDirty:!0})}})]})]})]})]})]})}function Bo(r){const e=Z.c(55),{automation:s}=r,n=ee(),{update:a}=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 o;e[4]!==c?(o=t.jsx(Et,{variant:"muted",children:c}),e[4]=c,e[5]=o):o=e[5];let j;e[6]!==i||e[7]!==o?(j=t.jsxs("div",{className:"flex items-center gap-2",children:[i,o]}),e[6]=i,e[7]=o,e[8]=j):j=e[8];let d;e[9]!==s.id||e[10]!==a?(d=_=>a.mutate({id:s.id,active:_}),e[9]=s.id,e[10]=a,e[11]=d):d=e[11];let m;e[12]!==s.active||e[13]!==d||e[14]!==a.isPending?(m=t.jsx(lt,{checked:s.active,disabled:a.isPending,onCheckedChange:d,className:"cursor-pointer"}),e[12]=s.active,e[13]=d,e[14]=a.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 _;e[34]!==s.id?(_=k=>t.jsx(Jt,{trigger:k,automationId:s.id,readOnly:!0},k.id),e[34]=s.id,e[35]=_):_=e[35],l=s.triggers.map(_),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"):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 D;return e[51]!==u||e[52]!==y||e[53]!==T?(D=t.jsxs("div",{className:"flex flex-col gap-8",children:[u,y,T]}),e[51]=u,e[52]=y,e[53]=T,e[54]=D):D=e[54],D}const Xt=[{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 qt(r){const e=Xt.find(n=>n.key===r).ms,s=Date.now();return{startDate:new Date(s-e).toISOString(),endDate:new Date(s).toISOString()}}function Go(r){const e=Z.c(16),{automationId:s,triggerIds:n}=r,a=ee(),[i,c]=w.useState("30d"),[o,j]=w.useState(Ho);let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=p=>{const l=p;c(l),j(qt(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]!==a?(x=Xt.map(p=>t.jsx(be,{value:p.key,children:a(p.labelKey)},p.key)),e[2]=a,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]!==o||e[11]!==n?(u=t.jsx(ro,{automationId:s,triggerIds:n,range:o}),e[9]=s,e[10]=o,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 Ho(){return qt("30d")}function Jo(r){const e=Z.c(5),{tabId:s}=r;let n;e[0]!==s?(n=ds(s),e[0]=s,e[1]=n):n=e[1];const a=n;if(!a)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]!==a.id?(c=t.jsx(w.Suspense,{fallback:i,children:t.jsx(Xo,{id:a.id})}),e[3]=a.id,e[4]=c):c=e[4],c}function Xo(r){const e=Z.c(41),{id:s}=r,n=ee(),{openPanel:a}=co(),{data:i,isLoading:c}=Ks(s),[o,j]=w.useState("settings");let d;e[0]!==a?(d=()=>a("automations"),e[0]=a,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(qo),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(Lt,{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]!==o?(b=t.jsx(lo,{placement:"page",tabs:N,activeTab:o,onTabChange:S}),e[27]=N,e[28]=o,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 D;e[33]!==i||e[34]!==s||e[35]!==o||e[36]!==f?(D=o==="settings"?i.system_key?t.jsx(Bo,{automation:i}):t.jsx(Wo,{automationId:s,automation:i}):t.jsx(w.Suspense,{fallback:t.jsx(Qe,{}),children:t.jsx(Go,{automationId:s,triggerIds:f})}),e[33]=i,e[34]=s,e[35]=o,e[36]=f,e[37]=D):D=e[37];let _;return e[38]!==T||e[39]!==D?(_=t.jsx(Je,{children:t.jsx(Je.Content,{children:t.jsxs(Je.Container,{children:[T,D]})})}),e[38]=T,e[39]=D,e[40]=_):_=e[40],_}function qo(r){return r.id}function Qo(){const r=Z.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(Jo,{tabId:`automation:${s}`}):null,r[1]=s,r[2]=n):n=r[2],n}function Ti(){const r=Z.c(1);let e;return r[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(us.Content,{children:t.jsx(Qo,{})}),r[0]=e):e=r[0],e}export{Ti as default};
|
|
19
|
+
});`:"",D=g==="curl"?b:T;let _;e[6]!==j?(_=t.jsx(ot,{children:j}),e[6]=j,e[7]=_):_=e[7];let k;e[8]!==d?(k=t.jsx(at,{children:d}),e[8]=d,e[9]=k):k=e[9];let A;e[10]!==_||e[11]!==k?(A=t.jsxs(st,{children:[_,k]}),e[10]=_,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]!==D||e[19]!==m||e[20]!==i||e[21]!==l||e[22]!==a?($=a&&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(qe,{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(qe,{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(ao,{value:g,onValueChange:W=>u(W),children:t.jsxs(no,{className:"h-8 p-[2px]",children:[t.jsx(vt,{value:"curl",className:"h-7 px-2.5 text-xs",children:"curl"}),t.jsx(vt,{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(D,"example"),children:[t.jsx(qe,{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(io,{code:D,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]=D,e[19]=m,e[20]=i,e[21]=l,e[22]=a,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 q;e[31]!==F||e[32]!==A||e[33]!==$?(q=t.jsxs(tt,{className:"max-w-lg",children:[A,$,F]}),e[31]=F,e[32]=A,e[33]=$,e[34]=q):q=e[34];let H;return e[35]!==n||e[36]!==s||e[37]!==q?(H=t.jsx(et,{open:s,onOpenChange:n,children:q}),e[35]=n,e[36]=s,e[37]=q,e[38]=H):H=e[38],H}async function Eo(r){const{cronExpression:e,automationId:s,oldTriggerId:n,addTrigger:a,removeTrigger:i}=r,c=await a({automation_id:s,type:"cron",cron_expression:e});try{await i({trigger_id:n,automation_id:s})}catch(o){throw await i({trigger_id:c.id,automation_id:s}).catch(()=>{}),o}}function Xt(r){const e=Z.c(153),{trigger:s,automationId:n,connectionName:a,readOnly:i}=r,c=i===void 0?!1:i,o=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?To(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,D]=w.useState(s.cron_expression??""),_=d.isPending||j.isPending||m.isPending,k=s.type==="cron",A=s.type==="webhook",$=s.type==="board_column_transition";let R;e[2]!==o||e[3]!==s.type?(R=s.type==="board_pr_ready"?o("automations.triggerCard.prReady"):s.type==="linked_chat_run"?o("automations.triggerCard.linkedChatRun"):s.type==="board_pr_merged"?o("automations.triggerCard.prMerged"):s.type==="chat_pr_opened"?o("automations.triggerCard.chatPrOpened"):null,e[2]=o,e[3]=s.type,e[4]=R):R=e[4];const K=R,F=s.type==="jira_transition";let q;e[5]!==n||e[6]!==d||e[7]!==o||e[8]!==s.id?(q=async()=>{try{await d.mutateAsync({trigger_id:s.id,automation_id:n}),X.success(o("automations.triggerCard.starterRemoved"))}catch{X.error(o("automations.triggerCard.failedToRemoveStarter"))}f(!1)},e[5]=n,e[6]=d,e[7]=o,e[8]=s.id,e[9]=q):q=e[9];const H=q;let W;e[10]!==j||e[11]!==n||e[12]!==d||e[13]!==s.id?(W=L=>Eo({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]!==o||e[18]!==s.cron_expression?(J=async()=>{const L=T.trim();if(!L||!Re(L)||L===s.cron_expression){b(!1),D(s.cron_expression??"");return}try{await G(L),b(!1)}catch{X.error(o("automations.triggerCard.failedToUpdateStarter")),D(s.cron_expression??""),b(!1)}},e[15]=T,e[16]=G,e[17]=o,e[18]=s.cron_expression,e[19]=J):J=e[19];const V=J;let U;e[20]!==n||e[21]!==m||e[22]!==o||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(o("automations.triggerCard.failedToRotateToken"))}},e[20]=n,e[21]=m,e[22]=o,e[23]=s.id,e[24]=U):U=e[24];const z=U;let ae;e[25]!==y||e[26]!==G||e[27]!==o||e[28]!==s.cron_expression?(ae=async L=>{if(!y)return;const Fe=y.unit==="minutes"?5:1,Je=Math.max(Fe,L);Je!==L&&N(Je);const ft=ko(Je,y.unit);if(ft!==s.cron_expression)try{await G(ft)}catch{X.error(o("automations.triggerCard.failedToUpdateStarter")),N(y.count)}},e[25]=y,e[26]=G,e[27]=o,e[28]=s.cron_expression,e[29]=ae):ae=e[29];const ne=ae;let Q;e[30]!==$||e[31]!==k||e[32]!==F||e[33]!==A||e[34]!==K?(Q=k?t.jsx(Me,{size:14,className:"text-muted-foreground shrink-0"}):F?t.jsx(Ut,{size:14,className:"shrink-0"}):$||K?t.jsx(zt,{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]=Q):Q=e[35];let ie;e[36]!==a||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]!==_||e[47]!==A||e[48]!==K||e[49]!==o||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:o("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:_,className:"w-12 text-center text-sm h-7 border border-border rounded-md bg-background px-1 focus:outline-none focus:ring-1 focus:ring-ring"}),t.jsx("span",{className:"text-sm",children:wo(y.unit,v)})]}):k&&S?t.jsxs(t.Fragment,{children:[t.jsx("input",{type:"text",value:T,onChange:L=>D(L.target.value),onBlur:V,onKeyDown:L=>{L.key==="Enter"&&L.target.blur(),L.key==="Escape"&&(b(!1),D(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:o("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?So(s.cron_expression??""):$?o("automations.triggerCard.cardEntersColumn",{lane:We(s.column_key??"",o).label}):K||(F?o("automations.triggerCard.issueEntersJiraStatus",{status:s.column_key??""}):A?o("automations.triggerCard.webhookPostToFire"):`${s.event_type}${a?` · ${a}`:""}`)}),$&&t.jsx(Ko,{from:s.from}),F&&t.jsx(Fo,{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(Oo).join(", ")})]}),e[36]=a,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]=_,e[47]=A,e[48]=K,e[49]=o,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]!==_?(ue=_&&t.jsx(Le,{className:"size-[13px] text-muted-foreground"}),e[56]=_,e[57]=ue):ue=e[57];let me;e[58]!==y||e[59]!==k||e[60]!==S||e[61]!==o||e[62]!==s.cron_expression?(me=k&&!y&&!S&&t.jsx(B,{variant:"ghost",size:"sm",className:"h-7 w-7 p-0 opacity-0 group-hover:opacity-100 transition-opacity","aria-label":o("automations.triggerCard.editSchedule"),onClick:()=>{D(s.cron_expression??""),b(!0)},children:t.jsx(Et,{size:13,className:"text-muted-foreground"})}),e[58]=y,e[59]=k,e[60]=S,e[61]=o,e[62]=s.cron_expression,e[63]=me):me=e[63];let te;e[64]!==A||e[65]!==o?(te=A&&t.jsx(B,{variant:"ghost",size:"sm",className:"h-7 w-7 p-0 opacity-0 group-hover:opacity-100 transition-opacity",title:o("automations.triggerCard.rotateToken"),"aria-label":o("automations.triggerCard.rotateToken"),onClick:()=>u(!0),children:t.jsx(rs,{size:13,className:"text-muted-foreground"})}),e[64]=A,e[65]=o,e[66]=te):te=e[66];let fe;e[67]!==c||e[68]!==o?(fe=!c&&t.jsx(B,{variant:"ghost",size:"sm",className:"h-7 w-7 p-0 opacity-0 group-hover:opacity-100 transition-opacity","aria-label":o("automations.triggerCard.removeStarter"),onClick:()=>f(!0),children:t.jsx(mt,{size:13,className:"text-muted-foreground"})}),e[67]=c,e[68]=o,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]!==Q?(re=t.jsxs("div",{className:"flex items-center gap-2.5 px-3 py-2.5 rounded-lg border border-border bg-background group",children:[Q,ie,se]}),e[75]=ie,e[76]=se,e[77]=Q,e[78]=re):re=e[78];let le;e[79]!==o?(le=o("automations.triggerCard.removeStarter"),e[79]=o,e[80]=le):le=e[80];let C;e[81]!==le?(C=t.jsx(Ct,{children:le}),e[81]=le,e[82]=C):C=e[82];let M;e[83]!==o?(M=o("automations.triggerCard.confirmRemoveStarter"),e[83]=o,e[84]=M):M=e[84];let O;e[85]!==M?(O=t.jsx(Nt,{children:M}),e[85]=M,e[86]=O):O=e[86];let pe;e[87]!==C||e[88]!==O?(pe=t.jsxs(St,{children:[C,O]}),e[87]=C,e[88]=O,e[89]=pe):pe=e[89];let oe;e[90]!==o?(oe=o("automations.triggerCard.cancel"),e[90]=o,e[91]=oe):oe=e[91];let ce;e[92]!==oe?(ce=t.jsx(kt,{children:oe}),e[92]=oe,e[93]=ce):ce=e[93];let de;e[94]!==o?(de=o("automations.triggerCard.remove"),e[94]=o,e[95]=de):de=e[95];let I;e[96]!==H||e[97]!==de?(I=t.jsx(Tt,{onClick:H,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:de}),e[96]=H,e[97]=de,e[98]=I):I=e[98];let E;e[99]!==ce||e[100]!==I?(E=t.jsxs(wt,{children:[ce,I]}),e[99]=ce,e[100]=I,e[101]=E):E=e[101];let Y;e[102]!==pe||e[103]!==E?(Y=t.jsxs(Dt,{children:[pe,E]}),e[102]=pe,e[103]=E,e[104]=Y):Y=e[104];let P;e[105]!==x||e[106]!==Y?(P=t.jsx(_t,{open:x,onOpenChange:f,children:Y}),e[105]=x,e[106]=Y,e[107]=P):P=e[107];let xe;e[108]!==o?(xe=o("automations.triggerCard.rotateWebhookToken"),e[108]=o,e[109]=xe):xe=e[109];let Ce;e[110]!==xe?(Ce=t.jsx(Ct,{children:xe}),e[110]=xe,e[111]=Ce):Ce=e[111];let Ne;e[112]!==o?(Ne=o("automations.triggerCard.rotateWebhookTokenDescription"),e[112]=o,e[113]=Ne):Ne=e[113];let Se;e[114]!==Ne?(Se=t.jsx(Nt,{children:Ne}),e[114]=Ne,e[115]=Se):Se=e[115];let ke;e[116]!==Ce||e[117]!==Se?(ke=t.jsxs(St,{children:[Ce,Se]}),e[116]=Ce,e[117]=Se,e[118]=ke):ke=e[118];let Te;e[119]!==o?(Te=o("automations.triggerCard.cancel"),e[119]=o,e[120]=Te):Te=e[120];let we;e[121]!==Te?(we=t.jsx(kt,{children:Te}),e[121]=Te,e[122]=we):we=e[122];let De;e[123]!==o?(De=o("automations.triggerCard.rotate"),e[123]=o,e[124]=De):De=e[124];let _e;e[125]!==z||e[126]!==De?(_e=t.jsx(Tt,{onClick:z,children:De}),e[125]=z,e[126]=De,e[127]=_e):_e=e[127];let Ie;e[128]!==we||e[129]!==_e?(Ie=t.jsxs(wt,{children:[we,_e]}),e[128]=we,e[129]=_e,e[130]=Ie):Ie=e[130];let Ae;e[131]!==ke||e[132]!==Ie?(Ae=t.jsxs(Dt,{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(_t,{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]!==o?($e=o("automations.triggerCard.newWebhookToken"),e[138]=o,e[139]=$e):$e=e[139];let ze;e[140]!==o?(ze=o("automations.triggerCard.newWebhookTokenDescription"),e[140]=o,e[141]=ze):ze=e[141];let Ee;e[142]!==Be||e[143]!==Ge||e[144]!==He||e[145]!==$e||e[146]!==ze?(Ee=t.jsx(Jt,{open:Be,onOpenChange:Ve,url:Ge,token:He,title:$e,description:ze}),e[142]=Be,e[143]=Ge,e[144]=He,e[145]=$e,e[146]=ze,e[147]=Ee):Ee=e[147];let Ue;return e[148]!==re||e[149]!==P||e[150]!==Pe||e[151]!==Ee?(Ue=t.jsxs(t.Fragment,{children:[re,P,Pe,Ee]}),e[148]=re,e[149]=P,e[150]=Pe,e[151]=Ee,e[152]=Ue):Ue=e[152],Ue}function Oo(r){const[e,s]=r;return`${e}: ${s}`}function Ko(r){const e=Z.c(10),{from:s}=r,n=ee();let a;e[0]!==s||e[1]!==n?(a=!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]=a):a=e[2];const i=a;let c;e[3]!==n?(c=n("automations.triggerCard.unownedOnly"),e[3]=n,e[4]=c):c=e[4];let o;e[5]!==i||e[6]!==c?(o=[i,c].filter(Boolean),e[5]=i,e[6]=c,e[7]=o):o=e[7];const j=o.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 Fo(r){const e=Z.c(6),{from:s}=r,n=ee();if(!s||s.kind==="any")return null;let a;e[0]!==s.kind||e[1]!==s.statuses||e[2]!==n?(a=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]=a):a=e[3];let i;return e[4]!==a?(i=t.jsx("span",{className:"text-xs text-muted-foreground/60 truncate",children:a}),e[4]=a,e[5]=i):i=e[5],i}function Mo(r){const e=Z.c(70),{automationId:s,onDone:n}=r,a=ee();let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i={binding:"TRIGGER"},e[0]=i):i=e[0];const c=dt(i),[o,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(o);let l,y,v,N,S,b;if(e[2]!==u||e[3]!==s||e[4]!==o||e[5]!==d||e[6]!==p||e[7]!==n||e[8]!==f||e[9]!==a||e[10]!==c||e[11]!==h){const _=h?.find(U=>U.type===d);let k;e[18]!==u||e[19]!==s||e[20]!==o||e[21]!==d||e[22]!==n||e[23]!==f||e[24]!==a?(k=async()=>{if(!(!o||!d))try{await u.mutateAsync({automation_id:s,type:"event",event_type:d,connection_id:o,params:f}),Ke("automation_trigger_added",{automation_id:s,trigger_type:"event",connection_id:o,event_type:d}),X.success(a("automations.eventTriggerForm.successAdded")),n()}catch{X.error(a("automations.eventTriggerForm.errorFailed"))}},e[18]=u,e[19]=s,e[20]=o,e[21]=d,e[22]=n,e[23]=f,e[24]=a,e[25]=k):k=e[25],l=k,y="flex flex-col gap-3 px-3 py-3 rounded-lg border border-border bg-background";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]!==a?($=a("automations.eventTriggerForm.title"),e[27]=a,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 q=o??"";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]!==a?(W=a("automations.eventTriggerForm.selectConnectionPlaceholder"),e[38]=a,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]!==a||e[43]!==c?(J=c.length===0?t.jsx("div",{className:"px-2 py-3 text-center text-xs text-muted-foreground",children:a("automations.eventTriggerForm.noConnectionsWithTrigger")}):c.map(Vo),e[42]=a,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]!==q||e[48]!==G||e[49]!==V?(N=t.jsxs(ge,{value:q,onValueChange:H,children:[G,V]}),e[47]=q,e[48]=G,e[49]=V,e[50]=N):N=e[50],e[51]!==o||e[52]!==d||e[53]!==p||e[54]!==a||e[55]!==h?(S=o&&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]"}),a("automations.eventTriggerForm.loadingEvents")]}):t.jsx(je,{placeholder:a("automations.eventTriggerForm.selectEventTypePlaceholder"),children:d??a("automations.eventTriggerForm.selectEventTypePlaceholder")})}),t.jsx(ye,{children:h?.map(Lo)})]}),e[51]=o,e[52]=d,e[53]=p,e[54]=a,e[55]=h,e[56]=S):S=e[56],b=_?.paramsSchema&&Object.keys(_.paramsSchema).length>0&&t.jsx("div",{className:"flex flex-col gap-2",children:Object.entries(_.paramsSchema).map(U=>{const[z,ae]=U;return t.jsxs("div",{className:"flex flex-col gap-1",children:[t.jsxs("label",{className:"text-xs text-muted-foreground",children:[z,ae.description&&t.jsxs("span",{className:"text-muted-foreground/60",children:[" ","— ",ae.description]})]}),ae.enum?t.jsxs(ge,{value:f[z]??"",onValueChange:ne=>g(Q=>({...Q,[z]:ne})),children:[t.jsx(he,{className:"w-full",children:t.jsx(je,{placeholder:a("automations.eventTriggerForm.selectParamPlaceholder",{key:z})})}),t.jsx(ye,{children:ae.enum.map(Ro)})]}):t.jsx("input",{type:"text",value:f[z]??"",onChange:ne=>g(Q=>({...Q,[z]:ne.target.value})),placeholder:ae.description??z,className:"text-sm border border-border rounded-md bg-background px-2 py-1.5 focus:outline-none focus:ring-1 focus:ring-ring"})]},z)})}),e[2]=u,e[3]=s,e[4]=o,e[5]=d,e[6]=p,e[7]=n,e[8]=f,e[9]=a,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]!==o||e[59]!==d||e[60]!==l||e[61]!==a?(T=o&&d&&t.jsx(B,{size:"sm",onClick:l,disabled:u.isPending,children:u.isPending?t.jsx(Le,{className:"size-[13px]"}):a("automations.eventTriggerForm.addTriggerButton")}),e[57]=u,e[58]=o,e[59]=d,e[60]=l,e[61]=a,e[62]=T):T=e[62];let D;return e[63]!==y||e[64]!==v||e[65]!==N||e[66]!==S||e[67]!==b||e[68]!==T?(D=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]=D):D=e[69],D}function Ro(r){return t.jsx(be,{value:r,children:r},r)}function Lo(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 Vo(r){return t.jsx(be,{value:r.id,children:r.title},r.id)}const Uo=30;function Wo(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 a of e.fields)n.add(a);return{...s,fields:n,saveCount:s.saveCount+1}}case"reset":return null}}function Bo({automationId:r,automation:e,onBack:s,onDelete:n}){const a=ee(),i=e.virtual_mcp_id,{org:c}=$t(),{update:o,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),[q,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:Es({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,z=ls({defaultValues:{name:e.name,active:e.active,tier:V,modelOverride:U,tools:e.tools??null,maxAgentSteps:e.maxAgentSteps??null}}),ae=z.watch("active"),[ne,Q]=w.useReducer(Wo,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}),Q({type:"reset"}))},ue=async()=>{const C=z.control._formState.dirtyFields,M=Object.keys(C);if(M.length===0&&!W)return!0;const O=z.getValues(),pe=z.control._defaultValues;z.reset(O,{keepValues:!0});const oe=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 o.mutateAsync(de)}catch{return z.reset(pe,{keepValues:!0}),oe&&G(!0),!1}const I=[...M];return oe&&I.push("messages"),Q({type:"accumulate",now:Date.now(),fields:I}),fe(),!0},{schedule:me,flush:te}=bt({save:ue}),{schedule:fe,flush:se}=bt({delayMs:3e4,save:async()=>ie()});w.useEffect(()=>{const C=z.watch(()=>me());return()=>C.unsubscribe()},[]);const re=C=>{if(l(C),!q){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(a("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}),a("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(pt,{control:z.control,name:"name",render:({field:C})=>t.jsx(xt,{...C,placeholder:a("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",size:"icon",className:"text-muted-foreground hover:text-destructive shrink-0",onClick:n,children:t.jsx(qs,{size:14})})]}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(pt,{control:z.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:a(ae?"automations.automationDetail.active":"automations.automationDetail.inactive")}),t.jsx("span",{className:"text-muted-foreground/50 text-sm",children:"·"}),t.jsx(zs,{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:a("automations.automationDetail.starter")}),t.jsx(zo,{automationId:r,open:y,onOpenChange:v,onCustomSelect:()=>{T(!0),A(!1),_("")},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:[a("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:a("automations.automationDetail.addStarter")})," ",a("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:D,onChange:C=>_(C.target.value),onBlur:async()=>{const C=D.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(a("automations.automationDetail.starterAdded")),T(!1),_("")}catch{X.error(a("automations.automationDetail.failedToAddStarter"))}},onKeyDown:async C=>{const M=D.trim();C.key==="Enter"&&M&&Re(M)&&C.target.blur(),C.key==="Escape"&&(T(!1),_(""))},placeholder:"0 9 * * 1-5",className:"flex-1 text-sm font-mono bg-transparent outline-none placeholder:text-muted-foreground/40",autoFocus:!0}),D&&!Re(D)&&t.jsx("span",{className:"text-xs text-muted-foreground/60 shrink-0",children:a("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),_("")},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:a("automations.automationDetail.loadingConnections")})]}),children:t.jsx(Mo,{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:a("automations.automationDetail.instructions")}),t.jsxs(B,{variant:"outline",size:"sm",className:"h-7 gap-1.5 px-2 text-xs",disabled:K||!p,onClick:J,children:[t.jsx(Ot,{size:13}),a("automations.automationDetail.improve")]})]}),t.jsx(Qs,{tiptapDoc:p,setTiptapDoc:re,placeholder:a("automations.automationDetail.instructionsPlaceholder"),children:t.jsxs("div",{className:"rounded-xl border border-border min-h-[120px] flex flex-col",children:[t.jsx(Ys,{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:"h-8 gap-1.5 px-3 text-sm font-medium",onClick:le,disabled:!i,children:[t.jsx(Xs,{size:16}),a("automations.automationDetail.test")]})}),t.jsx(Hs,{children:a("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:a("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(fo,{tier:z.watch("tier"),onTierChange:C=>z.setValue("tier",C,{shouldDirty:!0}),override:z.watch("modelOverride"),onOverrideChange:C=>z.setValue("modelOverride",C,{shouldDirty:!0})}),t.jsx(ho,{agentId:i||null,value:z.watch("tools"),onChange:C=>z.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:a("automations.automationDetail.maxSteps")}),t.jsx(xt,{type:"number",min:1,max:100,className:"w-40",placeholder:a("automations.automationDetail.maxStepsPlaceholder",{default:Uo}),value:z.watch("maxAgentSteps")??"",onChange:C=>{const M=C.target.value.trim(),O=M===""?null:Number(M);z.setValue("maxAgentSteps",O===null||Number.isNaN(O)?null:O,{shouldDirty:!0})}})]})]})]})]})]})}function Go(r){const e=Z.c(55),{automation:s}=r,n=ee(),{update:a}=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 o;e[4]!==c?(o=t.jsx(Kt,{variant:"muted",children:c}),e[4]=c,e[5]=o):o=e[5];let j;e[6]!==i||e[7]!==o?(j=t.jsxs("div",{className:"flex items-center gap-2",children:[i,o]}),e[6]=i,e[7]=o,e[8]=j):j=e[8];let d;e[9]!==s.id||e[10]!==a?(d=_=>a.mutate({id:s.id,active:_}),e[9]=s.id,e[10]=a,e[11]=d):d=e[11];let m;e[12]!==s.active||e[13]!==d||e[14]!==a.isPending?(m=t.jsx(ct,{checked:s.active,disabled:a.isPending,onCheckedChange:d,className:"cursor-pointer"}),e[12]=s.active,e[13]=d,e[14]=a.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 _;e[34]!==s.id?(_=k=>t.jsx(Xt,{trigger:k,automationId:s.id,readOnly:!0},k.id),e[34]=s.id,e[35]=_):_=e[35],l=s.triggers.map(_),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"):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 D;return e[51]!==u||e[52]!==y||e[53]!==T?(D=t.jsxs("div",{className:"flex flex-col gap-8",children:[u,y,T]}),e[51]=u,e[52]=y,e[53]=T,e[54]=D):D=e[54],D}const qt=[{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 Qt(r){const e=qt.find(n=>n.key===r).ms,s=Date.now();return{startDate:new Date(s-e).toISOString(),endDate:new Date(s).toISOString()}}function Ho(r){const e=Z.c(16),{automationId:s,triggerIds:n}=r,a=ee(),[i,c]=w.useState("30d"),[o,j]=w.useState(Jo);let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=p=>{const l=p;c(l),j(Qt(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]!==a?(x=qt.map(p=>t.jsx(be,{value:p.key,children:a(p.labelKey)},p.key)),e[2]=a,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]!==o||e[11]!==n?(u=t.jsx(ro,{automationId:s,triggerIds:n,range:o}),e[9]=s,e[10]=o,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 Jo(){return Qt("30d")}function Xo(r){const e=Z.c(5),{tabId:s}=r;let n;e[0]!==s?(n=ds(s),e[0]=s,e[1]=n):n=e[1];const a=n;if(!a)return null;let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(Ye,{}),e[2]=i):i=e[2];let c;return e[3]!==a.id?(c=t.jsx(w.Suspense,{fallback:i,children:t.jsx(qo,{id:a.id})}),e[3]=a.id,e[4]=c):c=e[4],c}function qo(r){const e=Z.c(41),{id:s}=r,n=ee(),{openPanel:a}=co(),{data:i,isLoading:c}=Ks(s),[o,j]=w.useState("settings");let d;e[0]!==a?(d=()=>a("automations"),e[0]=a,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(Ye,{}),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(Qo),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]!==o?(b=t.jsx(lo,{placement:"page",tabs:N,activeTab:o,onTabChange:S}),e[27]=N,e[28]=o,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 D;e[33]!==i||e[34]!==s||e[35]!==o||e[36]!==f?(D=o==="settings"?i.system_key?t.jsx(Go,{automation:i}):t.jsx(Bo,{automationId:s,automation:i}):t.jsx(w.Suspense,{fallback:t.jsx(Ye,{}),children:t.jsx(Ho,{automationId:s,triggerIds:f})}),e[33]=i,e[34]=s,e[35]=o,e[36]=f,e[37]=D):D=e[37];let _;return e[38]!==T||e[39]!==D?(_=t.jsx(Xe,{children:t.jsx(Xe.Content,{children:t.jsxs(Xe.Container,{children:[T,D]})})}),e[38]=T,e[39]=D,e[40]=_):_=e[40],_}function Qo(r){return r.id}function Yo(){const r=Z.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(Xo,{tabId:`automation:${s}`}):null,r[1]=s,r[2]=n):n=r[2],n}function wi(){const r=Z.c(1);let e;return r[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(us.Content,{children:t.jsx(Yo,{})}),r[0]=e):e=r[0],e}export{wi as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as S,b as O,r as G,j as e,n as m,y as Q,B as V,a_ as U}from"./index-
|
|
1
|
+
import{c as S,b as O,r as G,j as e,n as m,y as Q,B as V,a_ as U}from"./index-B-eHj4u4.js";import{C as W}from"./index-BlmkjYB7.js";import{s as X}from"./Plus-FrFsiUQv.js";import{B as Y}from"./agent-icon-E5NFjGaq.js";import{i as F}from"./ZoomOut-0IXFhA1q.js";import{S as Z}from"./search-input-CEGrosU-.js";import{E as $}from"./empty-state-Ba3qMun8.js";import{u as tt,a as et,b as it}from"./use-automations-AJoQb6lP.js";import{a as ot}from"./use-panel-navigate-CtG66pHN.js";import{A as st}from"./automation-list-row-dzpsPyTv.js";import{b as rt}from"./thread-route-BiZeKn-m.js";import"./use-mobile-BZpAUwUb.js";import"./use-app-takeover-BEzSlm3S.js";import"./sheet-DcLd8f_T.js";import"./tooltip-Wg5TOkgk.js";import"./index-SEQedjDw.js";import"./use-project-native-view-presence-BK8YOIZ_.js";import"./thread-intent-2PQ2tJ8y.js";import"./use-mcp-client-fHTUkiQr.js";import"./auth-3_xtjhZa.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-L6MF8kFC.js";import"./task-board-BDqVuMua.js";import"./schema-CYEVNkkO.js";import"./slugify-CEUa2lfQ.js";import"./use-file-configs-bBTy3-MH.js";import"./use-organization-settings-PcDKDabM.js";import"./repository-binding-CVI26IB4.js";import"./site-slug-DebpOoQq.js";import"./toolbar-icon-button-CysTSWyH.js";import"./shell-layout-jpc-IFbN.js";import"./avatar-D-6InH0Y.js";import"./User01-DowUGIml.js";import"./Building02-BCzHZCeO.js";import"./UserSquare-C1l8QNgE.js";import"./XClose-CDVFbEme.js";import"./use-project-scope-BIaj1klw.js";import"./CheckCircle-BRmDGKsS.js";import"./Monitor01-DluZDvx0.js";import"./use-clock-tick-B6NhSBfs.js";import"./Tool01-Ceiq1yQg.js";import"./command-CVodN_KO.js";import"./index-CWGftR7V.js";import"./SearchMd-CTE_Dij_.js";import"./integration-icon-DKhUl3mk.js";import"./LinkBroken01-B4m_6hKA.js";import"./project-icon-D9S8dOj2.js";import"./new-project-dialog-BiL8l-Gz.js";import"./ArrowLeft-ChZ5XGHH.js";import"./label-Hktokb9g.js";import"./repository-import-picker-Cv7ik8wr.js";import"./use-navigate-to-agent-CsnmgB4q.js";import"./repository-picker-CaK5oYjG.js";import"./useInfiniteQuery-B6mFaUqW.js";import"./infiniteQueryObserver-OMlvsWcf.js";import"./collection-search-BzGtQCoT.js";import"./ShoppingBag01-B47bYriG.js";import"./use-debounced-value-B43T9Zwm.js";import"./required-auth-layout-BA_CRgc2.js";import"./autosend-Dqgiz7-z.js";import"./use-org-sso-BrvNWA5X.js";import"./Image01-BcbXjZdM.js";import"./resizable-Bvs1DfKq.js";import"./icon-button-AZBqWvLN.js";import"./AlertCircle-CxMEbIvM.js";import"./ArrowUp-BseWcDxZ.js";import"./ChevronUp-B7Vn1Rb2.js";import"./ChevronSelectorVertical-DXUxjCek.js";import"./Copy01-BeZeYuYP.js";import"./CreditCard01-CR3uiUwh.js";import"./DotsVertical-C85_hpnn.js";import"./Globe04-DTEEsJ26.js";import"./SwitchHorizontal01-B8pZTGji.js";import"./Key01-BnDtFdB6.js";import"./Link01-CeBVtW9F.js";import"./Sun-BADHqp_z.js";import"./Play-C67yELx6.js";import"./Trash01-QaBoOmQD.js";import"./Upload01-CfxF6ZJF.js";import"./Users01-BvAfz3hH.js";import"./badge-sJYWVYje.js";import"./alert-dialog-BY83tkfe.js";function nt(o){if(!(o instanceof Error))return!1;const t=o.message.toLowerCase();return t.includes("relation")&&t.includes("does not exist")}function mt(o){const t=S.c(45),{virtualMcpId:r}=o,i=O(),{openPanel:n}=ot(),{data:B,error:D}=tt(r),b=B===void 0?[]:B,{create:y}=et(),[_,H]=G.useState("");if(D&&nt(D)){let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=e.jsx(Y,{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]!==n?(j=()=>n("settings"),t[5]=n,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(m,{children:e.jsx(m.Content,{children:e.jsx(m.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 J=_.toLowerCase(),M=b.filter(s=>s.name.toLowerCase().includes(J));let w;t[16]!==n?(w=s=>n(`automation:${s}`),t[16]=n,t[17]=w):w=t[17];const q=w,R=async()=>{if(y.isPending)return;Q("automation_new_clicked",{virtual_mcp_id:r,existing_count:b.length});const s=await y.mutateAsync(it(r));q(s.id)},K=y.isPending;let A;t[18]===Symbol.for("react.memo_cache_sentinel")?(A=e.jsx(X,{size:14}),t[18]=A):A=t[18];let a;t[19]!==i?(a=i("automations.automationsList.newAutomation"),t[19]=i,t[20]=a):a=t[20];let L;t[21]!==y.isPending||t[22]!==R||t[23]!==a?(L=e.jsxs(V,{size:"sm",onClick:R,disabled:K,children:[A,a]}),t[21]=y.isPending,t[22]=R,t[23]=a,t[24]=L):L=t[24];const P=L,T=m,E=m,k=m;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(m.Title,{actions:P,children:l}),t[27]=P,t[28]=l,t[29]=c):c=t[29];const z=b.length>0&&e.jsx(Z,{value:_,onChange:H,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=b.length===0?e.jsx("div",{className:"flex items-center justify-center py-20",children:e.jsx($,{image:e.jsx(F,{size:48,className:"text-muted-foreground"}),title:i("automations.automationsList.emptyTitle"),description:i("automations.automationsList.emptyDescription"),actions:!1})}):M.length===0?e.jsx("div",{className:"flex items-center justify-center py-20",children:e.jsx($,{image:e.jsx(F,{size:48,className:"text-muted-foreground"}),title:i("automations.automationsList.noResultsTitle"),description:i("automations.automationsList.noResultsDescription",{search:_})})}):e.jsx("div",{className:"mt-6 rounded-xl border border-border overflow-hidden",children:M.map(s=>e.jsx(st,{automation:s,onClick:()=>q(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]!==E.Content?(f=e.jsx(E.Content,{children:d}),t[39]=d,t[40]=E.Content,t[41]=f):f=t[41];let v;return t[42]!==T||t[43]!==f?(v=e.jsx(T,{children:f}),t[42]=T,t[43]=f,t[44]=v):v=t[44],v}function at(o){const t=S.c(3),{virtualMcpId:r}=o;let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=e.jsx(U,{}),t[0]=i):i=t[0];let n;return t[1]!==r?(n=e.jsx(G.Suspense,{fallback:i,children:e.jsx(mt,{virtualMcpId:r})}),t[1]=r,t[2]=n):n=t[2],n}function lt(){const o=S.c(2),t=rt();let r;return o[0]!==t?(r=e.jsx(at,{virtualMcpId:t}),o[0]=t,o[1]=r):r=o[1],r}function Me(){const o=S.c(1);let t;return o[0]===Symbol.for("react.memo_cache_sentinel")?(t=e.jsx(W.Content,{children:e.jsx(lt,{})}),o[0]=t):t=o[0],t}export{Me as default};
|
package/dist/client/assets/{agent-connect-sources-gehkSGol.js → agent-connect-sources-374gt80i.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as M,j as i,r as _,H as F,b as w,a2 as L,W as U,J as W,e as $}from"./index-
|
|
1
|
+
import{c as M,j as i,r as _,H as F,b as w,a2 as L,W as U,J as W,e as $}from"./index-B-eHj4u4.js";import{C as D}from"./index-BlmkjYB7.js";import{u as B}from"./use-mcp-client-fHTUkiQr.js";import{C as H,a as J}from"./companion-mcps-section-DC91CD_h.js";import{c as K}from"./use-connect-companion-WJiOGzbb.js";import{C as v,a as q}from"./connect-layout-Dn5RIa3-.js";import{p as z}from"./self-tool-result-8OxPN9Nm.js";import{a as G}from"./use-panel-navigate-CtG66pHN.js";import"./use-mobile-BZpAUwUb.js";import"./use-app-takeover-BEzSlm3S.js";import"./sheet-DcLd8f_T.js";import"./tooltip-Wg5TOkgk.js";import"./index-SEQedjDw.js";import"./use-project-native-view-presence-BK8YOIZ_.js";import"./thread-route-BiZeKn-m.js";import"./thread-intent-2PQ2tJ8y.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-L6MF8kFC.js";import"./task-board-BDqVuMua.js";import"./schema-CYEVNkkO.js";import"./slugify-CEUa2lfQ.js";import"./use-file-configs-bBTy3-MH.js";import"./use-organization-settings-PcDKDabM.js";import"./repository-binding-CVI26IB4.js";import"./site-slug-DebpOoQq.js";import"./agent-icon-E5NFjGaq.js";import"./AlertCircle-CxMEbIvM.js";import"./Tool01-Ceiq1yQg.js";import"./ArrowUp-BseWcDxZ.js";import"./ArrowLeft-ChZ5XGHH.js";import"./LinkBroken01-B4m_6hKA.js";import"./ShoppingBag01-B47bYriG.js";import"./ZoomOut-0IXFhA1q.js";import"./Building02-BCzHZCeO.js";import"./CheckCircle-BRmDGKsS.js";import"./ChevronUp-B7Vn1Rb2.js";import"./ChevronSelectorVertical-DXUxjCek.js";import"./UserSquare-C1l8QNgE.js";import"./Copy01-BeZeYuYP.js";import"./CreditCard01-CR3uiUwh.js";import"./DotsVertical-C85_hpnn.js";import"./Image01-BcbXjZdM.js";import"./Globe04-DTEEsJ26.js";import"./SwitchHorizontal01-B8pZTGji.js";import"./Key01-BnDtFdB6.js";import"./Link01-CeBVtW9F.js";import"./Monitor01-DluZDvx0.js";import"./Sun-BADHqp_z.js";import"./Play-C67yELx6.js";import"./Plus-FrFsiUQv.js";import"./SearchMd-CTE_Dij_.js";import"./Trash01-QaBoOmQD.js";import"./Upload01-CfxF6ZJF.js";import"./User01-DowUGIml.js";import"./Users01-BvAfz3hH.js";import"./XClose-CDVFbEme.js";import"./toolbar-icon-button-CysTSWyH.js";import"./shell-layout-jpc-IFbN.js";import"./avatar-D-6InH0Y.js";import"./use-project-scope-BIaj1klw.js";import"./use-clock-tick-B6NhSBfs.js";import"./command-CVodN_KO.js";import"./index-CWGftR7V.js";import"./integration-icon-DKhUl3mk.js";import"./project-icon-D9S8dOj2.js";import"./new-project-dialog-BiL8l-Gz.js";import"./label-Hktokb9g.js";import"./repository-import-picker-Cv7ik8wr.js";import"./use-navigate-to-agent-CsnmgB4q.js";import"./repository-picker-CaK5oYjG.js";import"./useInfiniteQuery-B6mFaUqW.js";import"./infiniteQueryObserver-OMlvsWcf.js";import"./collection-search-BzGtQCoT.js";import"./use-debounced-value-B43T9Zwm.js";import"./required-auth-layout-BA_CRgc2.js";import"./autosend-Dqgiz7-z.js";import"./use-org-sso-BrvNWA5X.js";import"./resizable-Bvs1DfKq.js";import"./icon-button-AZBqWvLN.js";import"./auth-3_xtjhZa.js";import"./site-url-en5df9c-.js";import"./companions-core-DzyeM-yJ.js";import"./metadata-D72DunRR.js";import"./github-repo-scope-ByTYKy_L.js";import"./form-lTigv9Cm.js";import"./provision-repo-scoped-github-connection-lckxpDHD.js";import"./useQueries-CMBL6J0M.js";import"./authenticate-and-persist-oauth-CLn5_4J6.js";import"./mcp-oauth-BDYmNGyy.js";import"./mcp-oauth-BFMHXWCx.js";import"./track-DDuUL9Xr.js";import"./extract-connection-data-B_Afz4nk.js";import"./connection-BzAtvzSu.js";import"./url-slug-CWeO_dvk.js";function Q(o){const t=M.c(7),{onClose:l}=o,n=w();let r;t[0]!==n?(r=n("routes.reportsOnboarding.connectModal.loadError"),t[0]=n,t[1]=r):r=t[1];let e;t[2]!==r?(e=i.jsx("p",{className:"text-sm text-muted-foreground",children:r}),t[2]=r,t[3]=e):e=t[3];let s;return t[4]!==l||t[5]!==e?(s=i.jsx(v,{onClose:l,footer:null,children:e}),t[4]=l,t[5]=e,t[6]=s):s=t[6],s}function V(){const o=M.c(10),{closePanel:t}=G();let l;o[0]!==t?(l=()=>t(),o[0]=t,o[1]=l):l=o[1];const n=l;let r;o[2]!==n?(r=()=>i.jsx(Q,{onClose:n}),o[2]=n,o[3]=r):r=o[3];let e;o[4]===Symbol.for("react.memo_cache_sentinel")?(e=i.jsx(H,{}),o[4]=e):e=o[4];let s;o[5]!==n?(s=i.jsx(_.Suspense,{fallback:i.jsx(v,{onClose:n,footer:null,children:e}),children:i.jsx(X,{onDone:n,onClose:n})}),o[5]=n,o[6]=s):s=o[6];let m;return o[7]!==r||o[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})}),o[7]=r,o[8]=s,o[9]=m):m=o[9],m}function X(o){const t=M.c(46),{onDone:l,onClose:n}=o,r=w(),{org:e}=L();let s;t[0]!==e.id?(s=U.REPORTS(e.id),t[0]=e.id,t[1]=s):s=t[1];const m=s;let b;t[2]!==e.id||t[3]!==e.slug?(b={connectionId:W,orgId:e.id,orgSlug:e.slug},t[2]=e.id,t[3]=e.slug,t[4]=b):b=t[4];const a=B(b);let P;t[5]!==m||t[6]!==e||t[7]!==a?(P={selfClient:a,org:e,cdConnectionId:m},t[5]=m,t[6]=e,t[7]=a,t[8]=P):P=t[8];const c=K(P),[I,k]=_.useState(!1),[R,N]=_.useState(null);let y;t[9]!==a?(y={mutationFn:async A=>z(await a.callTool({name:"REPORTS_RUN",arguments:{siteUrl:A}})),retry:!1},t[9]=a,t[10]=y):y=t[10];const p=$(y);let E;t[11]!==l||t[12]!==p||t[13]!==c||t[14]!==r?(E=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]=E):E=t[15];const O=E;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(q,{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]!==e||t[37]!==c?(S=i.jsx(J,{org:e,cdConnectionId:m,siteUrl:c,onReadinessChange:k}),t[35]=m,t[36]=e,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 T;return t[42]!==n||t[43]!==g||t[44]!==j?(T=i.jsx(v,{onClose:n,footer:g,children:j}),t[42]=n,t[43]=g,t[44]=j,t[45]=T):T=t[45],T}function $o(){const o=M.c(1);let t;return o[0]===Symbol.for("react.memo_cache_sentinel")?(t=i.jsx(D.Content,{children:i.jsx(V,{})}),o[0]=t):t=o[0],t}export{$o as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c,j as e,b1 as b,u as g}from"./index-B-eHj4u4.js";import{C as j}from"./index-BlmkjYB7.js";import{F as v,H as S}from"./file-share-button-CxU4bp8P.js";import{u as k,b as y,e as _}from"./use-org-fs-zGIV3ymG.js";import{S as w}from"./settings-tab-Dk-4q6cx.js";import{b as M}from"./thread-route-BiZeKn-m.js";import"./use-mobile-BZpAUwUb.js";import"./use-app-takeover-BEzSlm3S.js";import"./sheet-DcLd8f_T.js";import"./tooltip-Wg5TOkgk.js";import"./index-SEQedjDw.js";import"./use-project-native-view-presence-BK8YOIZ_.js";import"./use-panel-navigate-CtG66pHN.js";import"./use-project-scope-BIaj1klw.js";import"./repository-binding-CVI26IB4.js";import"./use-mcp-client-fHTUkiQr.js";import"./auth-3_xtjhZa.js";import"./thread-intent-2PQ2tJ8y.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-L6MF8kFC.js";import"./task-board-BDqVuMua.js";import"./schema-CYEVNkkO.js";import"./slugify-CEUa2lfQ.js";import"./use-file-configs-bBTy3-MH.js";import"./use-organization-settings-PcDKDabM.js";import"./site-slug-DebpOoQq.js";import"./agent-icon-E5NFjGaq.js";import"./AlertCircle-CxMEbIvM.js";import"./Tool01-Ceiq1yQg.js";import"./ArrowUp-BseWcDxZ.js";import"./ArrowLeft-ChZ5XGHH.js";import"./LinkBroken01-B4m_6hKA.js";import"./ShoppingBag01-B47bYriG.js";import"./ZoomOut-0IXFhA1q.js";import"./Building02-BCzHZCeO.js";import"./CheckCircle-BRmDGKsS.js";import"./ChevronUp-B7Vn1Rb2.js";import"./ChevronSelectorVertical-DXUxjCek.js";import"./UserSquare-C1l8QNgE.js";import"./Copy01-BeZeYuYP.js";import"./CreditCard01-CR3uiUwh.js";import"./DotsVertical-C85_hpnn.js";import"./Image01-BcbXjZdM.js";import"./Globe04-DTEEsJ26.js";import"./SwitchHorizontal01-B8pZTGji.js";import"./Key01-BnDtFdB6.js";import"./Link01-CeBVtW9F.js";import"./Monitor01-DluZDvx0.js";import"./Sun-BADHqp_z.js";import"./Play-C67yELx6.js";import"./Plus-FrFsiUQv.js";import"./SearchMd-CTE_Dij_.js";import"./Trash01-QaBoOmQD.js";import"./Upload01-CfxF6ZJF.js";import"./User01-DowUGIml.js";import"./Users01-BvAfz3hH.js";import"./XClose-CDVFbEme.js";import"./toolbar-icon-button-CysTSWyH.js";import"./shell-layout-jpc-IFbN.js";import"./avatar-D-6InH0Y.js";import"./use-clock-tick-B6NhSBfs.js";import"./command-CVodN_KO.js";import"./index-CWGftR7V.js";import"./integration-icon-DKhUl3mk.js";import"./project-icon-D9S8dOj2.js";import"./new-project-dialog-BiL8l-Gz.js";import"./label-Hktokb9g.js";import"./repository-import-picker-Cv7ik8wr.js";import"./use-navigate-to-agent-CsnmgB4q.js";import"./repository-picker-CaK5oYjG.js";import"./useInfiniteQuery-B6mFaUqW.js";import"./infiniteQueryObserver-OMlvsWcf.js";import"./collection-search-BzGtQCoT.js";import"./use-debounced-value-B43T9Zwm.js";import"./required-auth-layout-BA_CRgc2.js";import"./autosend-Dqgiz7-z.js";import"./use-org-sso-BrvNWA5X.js";import"./resizable-Bvs1DfKq.js";import"./icon-button-AZBqWvLN.js";import"./popover-DrRqLOLZ.js";import"./extract-connection-data-B_Afz4nk.js";import"./metadata-D72DunRR.js";import"./connection-BzAtvzSu.js";import"./url-slug-CWeO_dvk.js";import"./chat-context-tvcXoBeE.js";import"./use-decopilot-events-DrGKqtmd.js";import"./use-ai-providers-CrjK99NZ.js";import"./use-chat-navigation-BVwgk2mi.js";import"./location-BjlyegC2.js";import"./build-improve-prompt-doc-CtseFH_6.js";import"./empty-state-Ba3qMun8.js";import"./use-date-fns-locale-CeeB1a5i.js";import"./differenceInSeconds-C3x8sHUj.js";import"./mcp-oauth-BDYmNGyy.js";import"./mcp-oauth-BFMHXWCx.js";import"./alert-dialog-BY83tkfe.js";import"./textarea-Cu_mwrDc.js";import"./use-connection-D8Z-oNDI.js";import"./use-debounced-autosave-CU9q8XT5.js";import"./add-connection-dialog-CcwJwiyY.js";import"./connection-card-CuDjRvQM.js";import"./connection-slug-CITJ0kGN.js";import"./drawer-CkTzw9-A.js";import"./form-lTigv9Cm.js";import"./select-Be8KEqhq.js";import"./index-BdQq_4o_.js";import"./schema-DDS90txY.js";import"./connection-form-helpers-DX9VWFYw.js";import"./authenticate-and-persist-oauth-CLn5_4J6.js";import"./collection-tabs-D-985lbS.js";import"./badge-sJYWVYje.js";import"./use-infinite-scroll-Bx08szbZ.js";import"./useSuspenseInfiniteQuery-CPzW-hST.js";import"./file-type-icon-hT5Dk06T.js";import"./checkbox-C6deEGCR.js";import"./search-input-CEGrosU-.js";import"./use-mcp-auth-status-x7_sjlLt.js";import"./types-C9g69UXw.js";import"./use-mcp-tools-D4mzKQtZ.js";import"./use-mcp-prompts-BPRabyYT.js";import"./utils-CVEq3hMx.js";import"./switch-CkX0BpKj.js";import"./scroll-area-BxjOHUE0.js";import"./optimistic-project-sidebar-views-Cq91NNiT.js";import"./format-time-CAj8AQXM.js";import"./use-copy-KuwVRxCe.js";import"./virtual-mcp-D15uuHwT.js";import"./sandbox-url-D3mC8qhT.js";import"./secret-picker-DNAEW5WZ.js";import"./use-secrets-D1EjKfHx.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./serial-task-queue-CGOeQgpr.js";const x="home";function P(i){const t=c.c(5),{label:r}=i;let p;t[0]===Symbol.for("react.memo_cache_sentinel")?(p=e.jsx(b,{className:"aspect-video w-2/3 max-w-xl"}),t[0]=p):p=t[0];let o;t[1]!==r?(o=r&&e.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=e.jsxs("div",{className:"flex h-full w-full flex-col items-center justify-center gap-3 bg-background",children:[p,o]}),t[3]=o,t[4]=m):m=t[4],m}function D(i){const t=c.c(15),{path:r}=i;let p;t[0]===Symbol.for("react.memo_cache_sentinel")?(p={refetchIntervalWhenAbsent:2e3},t[0]=p):p=t[0];const o=k(x,r,p),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=e.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=e.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=e.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),p=M(),o="path"in r&&typeof r.path=="string"?r.path:void 0;let m;return i[1]!==o||i[2]!==p?(m=o?e.jsx(D,{path:o},o):e.jsx(w,{virtualMcpId:p}),i[1]=o,i[2]=p,i[3]=m):m=i[3],m}function rr(){const i=c.c(1);let t;return i[0]===Symbol.for("react.memo_cache_sentinel")?(t=e.jsx(j.Content,{children:e.jsx(C,{})}),i[0]=t):t=i[0],t}export{rr as default};
|