decocms 4.121.0 → 4.122.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-OzZiRcN4.js → AlertCircle-BVcbGU63.js} +1 -1
- package/dist/client/assets/{AreaChart-CjpEkyIS.js → AreaChart-BOEksfko.js} +1 -1
- package/dist/client/assets/{ArrowRight-BTqt321d.js → ArrowRight-CKlvyIoh.js} +1 -1
- package/dist/client/assets/{ArrowUp-DKOgR0xL.js → ArrowUp-zrMcuXAr.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-CvwJB6OK.js → ArrowUpRight-BRtGTw6u.js} +1 -1
- package/dist/client/assets/{Check-C9Hy68pG.js → Check-K9ygl0O6.js} +1 -1
- package/dist/client/assets/{CheckCircle-6cj-Xwhi.js → CheckCircle-Ddtle1Hu.js} +1 -1
- package/dist/client/assets/{ChevronDown-CZIAcwGV.js → ChevronDown-ivzZdE8w.js} +1 -1
- package/dist/client/assets/{ChevronRight--wVf7uGf.js → ChevronRight-wehtSt4J.js} +1 -1
- package/dist/client/assets/{ChevronUp-CsSKaqS5.js → ChevronUp-DtesMDJI.js} +1 -1
- package/dist/client/assets/{Copy01-2Oyl2xhw.js → Copy01-B2yggp1R.js} +1 -1
- package/dist/client/assets/{DotsVertical-c-_wCTgn.js → DotsVertical-0w0ZkjcP.js} +1 -1
- package/dist/client/assets/{Eye-D81BWda-.js → Eye-CZVpzZj3.js} +1 -1
- package/dist/client/assets/{FilterLines-D73LV27Z.js → FilterLines-xmnqgD9Q.js} +1 -1
- package/dist/client/assets/{Globe01-CDWygr27.js → Globe01-dnwQ58ni.js} +1 -1
- package/dist/client/assets/{Globe04-D4m747kU.js → Globe04-C5N1Fi_a.js} +1 -1
- package/dist/client/assets/{HardDrive-zpDb2j2L.js → HardDrive-BP9_iF3o.js} +1 -1
- package/dist/client/assets/{Image01--bBQuOXb.js → Image01-CTFJ4q_z.js} +1 -1
- package/dist/client/assets/{Key01-COjK9kAq.js → Key01-DXv7srOu.js} +1 -1
- package/dist/client/assets/{LayoutLeft-YhbkIV5-.js → LayoutLeft-BPQ9stJD.js} +1 -1
- package/dist/client/assets/{LinkExternal01-D_Zvma4v.js → LinkExternal01-BktZyAnv.js} +1 -1
- package/dist/client/assets/{LogOut01-DWjWz0Vk.js → LogOut01-BDBTSoW6.js} +1 -1
- package/dist/client/assets/{Monitor01-RMk_Hy33.js → Monitor01-7QFBOkji.js} +1 -1
- package/dist/client/assets/{Package-KX2QCXEp.js → Package-D8m71yLY.js} +1 -1
- package/dist/client/assets/{Palette-BUK1fohV.js → Palette-DWy3dzj0.js} +1 -1
- package/dist/client/assets/{Play-BQfux-g7.js → Play-lriwSM0x.js} +1 -1
- package/dist/client/assets/{Plus-0lhw9kgX.js → Plus-DQlLKoK7.js} +1 -1
- package/dist/client/assets/{SearchLg-D5zWzyl-.js → SearchLg-CoOX4SoC.js} +1 -1
- package/dist/client/assets/{SearchMd-DU09j0yH.js → SearchMd-Dg6mSNN_.js} +1 -1
- package/dist/client/assets/{Settings02-DQ4GSu-t.js → Settings02-BrQ1R_C3.js} +1 -1
- package/dist/client/assets/{Shield01-CfcJULbp.js → Shield01-BeZ6Sg4x.js} +1 -1
- package/dist/client/assets/{Star01-KC9BvNup.js → Star01-DkiTL7fS.js} +1 -1
- package/dist/client/assets/{Stars01-BS-Qws6o.js → Stars01-DTVv_6xg.js} +1 -1
- package/dist/client/assets/{Stars02-DfuXiu3-.js → Stars02-Rv7Zpq5p.js} +1 -1
- package/dist/client/assets/{Sun-C8Rt6Ua0.js → Sun-DIwJT6kw.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-vm3X2ReA.js → SwitchHorizontal01-YOHN8l_Y.js} +1 -1
- package/dist/client/assets/{Tool01-B1EOI3tm.js → Tool01-zKnvH-kk.js} +1 -1
- package/dist/client/assets/{Tool02-DNB1gZ9p.js → Tool02-a1QDD1BE.js} +1 -1
- package/dist/client/assets/{Trash01-DWauVxmg.js → Trash01-CvmXP6ap.js} +1 -1
- package/dist/client/assets/{TrendUp01-CKe9YInp.js → TrendUp01-DbtFTYSl.js} +1 -1
- package/dist/client/assets/{Upload01-Jx7sveIV.js → Upload01-Ur6u-B1R.js} +1 -1
- package/dist/client/assets/{User01-DOzH65Yj.js → User01-ELT05I_C.js} +1 -1
- package/dist/client/assets/{Users01-Bl3Cipzb.js → Users01-DmKZlyCu.js} +1 -1
- package/dist/client/assets/{Users03-B_epF-ec.js → Users03-B2Rmdg8K.js} +1 -1
- package/dist/client/assets/{X-CkADyhqE.js → X-DjQw217D.js} +1 -1
- package/dist/client/assets/{XCircle-C1PO7Xjh.js → XCircle-BNVPuHya.js} +1 -1
- package/dist/client/assets/{XClose-C6Z74Mtu.js → XClose-BO1Lwhh7.js} +1 -1
- package/dist/client/assets/{Zap-crfeCyH5.js → Zap-C4HzUZ29.js} +1 -1
- package/dist/client/assets/{ZapSquare-ixKz1MO4.js → ZapSquare-CqrPlIO3.js} +1 -1
- package/dist/client/assets/{ZoomOut-C1FPWq-p.js → ZoomOut-CAsxnm2x.js} +1 -1
- package/dist/client/assets/{access-gate-CcngdG7g.js → access-gate-uwgBtsBP.js} +1 -1
- package/dist/client/assets/{add-section-modal-DHx-fMXc.js → add-section-modal-fmj_3SB_.js} +1 -1
- package/dist/client/assets/{agent-icon-BZhgfhdU.js → agent-icon-B2LgmiRt.js} +1 -1
- package/dist/client/assets/{agents-list-BGb151p2.js → agents-list-DgcidbX7.js} +1 -1
- package/dist/client/assets/{ai-providers-BxclPNUd.js → ai-providers-CERVG5fP.js} +1 -1
- package/dist/client/assets/{alert-DooiWR2A.js → alert-2pYy2aRx.js} +1 -1
- package/dist/client/assets/{alert-dialog-eVH4lDuw.js → alert-dialog-BsAEBtVk.js} +1 -1
- package/dist/client/assets/{app-editor-BKf1KIok.js → app-editor-DgQfdAPl.js} +1 -1
- package/dist/client/assets/{auth-BgXJQGvH.js → auth-BbZNerdw.js} +1 -1
- package/dist/client/assets/{auth-catchall-DCT6HGy2.js → auth-catchall-3qQJZ3DD.js} +1 -1
- package/dist/client/assets/{auth-entry-Dc3L3Akt.js → auth-entry-tAavwvU4.js} +1 -1
- package/dist/client/assets/{auth-split-layout-CG3_FykH.js → auth-split-layout-DBnc8xhv.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-EDYGCrss.js → authenticate-and-persist-oauth-BUz0jLWA.js} +1 -1
- package/dist/client/assets/{automation-list-row-COyQ04hP.js → automation-list-row-CnMPr30w.js} +1 -1
- package/dist/client/assets/{automation-runs-3Nf8PuON.js → automation-runs-qvWRqyqv.js} +1 -1
- package/dist/client/assets/automations-Dg-olwgA.js +1 -0
- package/dist/client/assets/{autosend-DMw4eplP.js → autosend-BeIUwx1c.js} +1 -1
- package/dist/client/assets/{avatar-DOKisfmu.js → avatar-B1FBqiPq.js} +1 -1
- package/dist/client/assets/{badge-BP3RfcAV.js → badge-8mmmFMes.js} +1 -1
- package/dist/client/assets/{block-document-DoFgnzXM.js → block-document-NADzTy6R.js} +1 -1
- package/dist/client/assets/{brand-context-vAm7cU55.js → brand-context-mtl0KcSc.js} +1 -1
- package/dist/client/assets/{buckets-Don5jA6A.js → buckets-CU5R4UIm.js} +1 -1
- package/dist/client/assets/{bulk-category-panel-bPJqoX9I.js → bulk-category-panel-KIgh2LVc.js} +1 -1
- package/dist/client/assets/{calendar-DXzTKJPo.js → calendar-BYOoZCNu.js} +1 -1
- package/dist/client/assets/{capability-load-error-CCKA37Gn.js → capability-load-error-B3Yd05Zp.js} +1 -1
- package/dist/client/assets/{card-BkL1g2ae.js → card-CsVINvzI.js} +1 -1
- package/dist/client/assets/{category-editor-3xHYN9wy.js → category-editor-CvpFkxzC.js} +1 -1
- package/dist/client/assets/{chat-context-BjgR1MKj.js → chat-context-DG5VMA6B.js} +5 -5
- package/dist/client/assets/{checkbox-Dvf0sR7c.js → checkbox-CAW6yy-f.js} +1 -1
- package/dist/client/assets/{cli-auth-success-X1wp_kVa.js → cli-auth-success-B6BWMPYn.js} +1 -1
- package/dist/client/assets/{collection-detail-DMCqElTG.js → collection-detail-0HHoB7Wa.js} +1 -1
- package/dist/client/assets/{collection-display-button-CWcabOLq.js → collection-display-button-CO7gLnSL.js} +1 -1
- package/dist/client/assets/{collection-search-BUwXi5On.js → collection-search-HTEknyDM.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-CUL6yX5d.js → collection-table-wrapper-MD0_mE3R.js} +1 -1
- package/dist/client/assets/{collection-tabs-Bg8diJEX.js → collection-tabs-Cu0giObB.js} +1 -1
- package/dist/client/assets/{command-DolM9tQW.js → command-BYmAVtGu.js} +1 -1
- package/dist/client/assets/commerce-onboarding-CdHE3DqV.js +1 -0
- package/dist/client/assets/companions-core-C84CnqsZ.js +1 -0
- package/dist/client/assets/{connect-BvsNiyZD.js → connect-D3rtWj_4.js} +1 -1
- package/dist/client/assets/{connect-desktop-dialog-2ytDMSQS.js → connect-desktop-dialog-CVLI9IFZ.js} +1 -1
- package/dist/client/assets/{connection-card-tEoMF1sK.js → connection-card-CChyV7In.js} +1 -1
- package/dist/client/assets/{connection-detail-BNOBuBwO.js → connection-detail-Bg9BuBrs.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-y0k0toUD.js → connection-form-helpers-BsaAWJ8U.js} +1 -1
- package/dist/client/assets/{connections-BSYKvu_o.js → connections-C9JbsGCi.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-B7H8BAsy.js → decopilot-sse-pool-DWTCLkf7.js} +1 -1
- package/dist/client/assets/{dialog-B-PFEu8t.js → dialog-C7PMQncq.js} +1 -1
- package/dist/client/assets/{domain-settings-B0iRfT0V.js → domain-settings-CwQ6FgAI.js} +1 -1
- package/dist/client/assets/{drawer-ioB-jayl.js → drawer-D1Kw_X2C.js} +1 -1
- package/dist/client/assets/{dropdown-menu-Bv8U-u2N.js → dropdown-menu-C3car2Q8.js} +1 -1
- package/dist/client/assets/{empty-state-f3NNQ1ui.js → empty-state-B7ZzKn6B.js} +1 -1
- package/dist/client/assets/{extract-connection-data-ekCc1hnU.js → extract-connection-data-wIgwD813.js} +1 -1
- package/dist/client/assets/{file-explorer-D8JT7oxH.js → file-explorer-CmnYIvY2.js} +1 -1
- package/dist/client/assets/{file-type-icon-Czs5uFNK.js → file-type-icon-Cg3Nm1XZ.js} +1 -1
- package/dist/client/assets/{files-COonOV2h.js → files-DPifkXR8.js} +1 -1
- package/dist/client/assets/{form-DvszbWzu.js → form-zrd7LYxu.js} +1 -1
- package/dist/client/assets/{general-BN7VABAU.js → general-BmB5iylu.js} +1 -1
- package/dist/client/assets/{github-repo-picker-LzKpKLTc.js → github-repo-picker-CcvybfZV.js} +1 -1
- package/dist/client/assets/{hooks-DZ2G0HBV.js → hooks-CxPB8UeZ.js} +1 -1
- package/dist/client/assets/{index-x2umO0Ia.js → index-BGtGWsgH.js} +1 -1
- package/dist/client/assets/{index-BD2JkIiG.js → index-BZmVwpHk.js} +1 -1
- package/dist/client/assets/index-BkzI2YJo.css +1 -0
- package/dist/client/assets/{index-zRP9V9Rq.js → index-C6BpFIWK.js} +1 -1
- package/dist/client/assets/{index-B__oKxRn.js → index-CPojIfJr.js} +1 -1
- package/dist/client/assets/{index-BoUF-4pL.js → index-Cb8ogyWE.js} +1 -1
- package/dist/client/assets/{index-Cq9MTcyy.js → index-CtckDipO.js} +1 -1
- package/dist/client/assets/{index-DwaHcKY7.js → index-DEfykvQ6.js} +1 -1
- package/dist/client/assets/{index-qFEnr-Eg.js → index-DSvM3i2U.js} +1 -1
- package/dist/client/assets/{index-DDvdm6MO.js → index-DX-8pprv.js} +5 -5
- package/dist/client/assets/{index-CiqBVt-V.js → index-Dig78Jy9.js} +3 -3
- package/dist/client/assets/{index-DinR3XP8.js → index-DuYUqDOf.js} +1 -1
- package/dist/client/assets/index-DvEa4Fvr.js +1 -0
- package/dist/client/assets/{index-DLFjA-pm.js → index-QzdsfBYd.js} +7 -7
- package/dist/client/assets/{index-redirect-DfRcvhOs.js → index-redirect-Pb6lGISE.js} +1 -1
- package/dist/client/assets/{input-CYZckS5J.js → input-P-LUerq4.js} +1 -1
- package/dist/client/assets/{integration-icon-EcNPoJWr.js → integration-icon-DB0SNVRE.js} +1 -1
- package/dist/client/assets/invite-member-dialog-CGMe2vvR.js +1 -0
- package/dist/client/assets/{label-EdLaI-5R.js → label-DNCggKDl.js} +1 -1
- package/dist/client/assets/{layout-DyY6lyuX.js → layout-DTJcqcHF.js} +1 -1
- package/dist/client/assets/{login-Bp3tqVdE.js → login-BhaHlz0z.js} +1 -1
- package/dist/client/assets/{mcp-oauth-DhsKmk5n.js → mcp-oauth-aEWbqsXM.js} +1 -1
- package/dist/client/assets/{members-Bdzm1rec.js → members-PCbHjis6.js} +1 -1
- package/dist/client/assets/{monaco-editor-Cj3yPb4I.js → monaco-editor-CTTjzlzK.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-Bl8HG5pb.js → monitoring-stats-row-Cz8AzIWJ.js} +1 -1
- package/dist/client/assets/{multi-select-BRDHWm9A.js → multi-select-BaubaUW1.js} +1 -1
- package/dist/client/assets/{oauth-callback-D1AVcBaG.js → oauth-callback-2HSRTiii.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-CW1aQFsP.js → oauth-callback-ai-provider-CBuRFGN7.js} +1 -1
- package/dist/client/assets/{onboarding-DrkJmm1F.js → onboarding-CM2VMCK1.js} +1 -1
- package/dist/client/assets/{org-install-BSVaCgjf.js → org-install-GTqzYXN8.js} +1 -1
- package/dist/client/assets/{org-layout-BfaW1rXR.js → org-layout-Dxs5EZzy.js} +1 -1
- package/dist/client/assets/{organization-choice-DYVNPPeL.js → organization-choice-CcqIPbFg.js} +1 -1
- package/dist/client/assets/{orgs-DAYIrPhP.js → orgs-BAxBwjH2.js} +1 -1
- package/dist/client/assets/{page-seo-form-DHYMF0Fj.js → page-seo-form-DFcFiRHt.js} +1 -1
- package/dist/client/assets/page-seo-sheet-Cb3ncQL_.js +1 -0
- package/dist/client/assets/{popover-CJG9G1eo.js → popover-1ACpRRoe.js} +1 -1
- package/dist/client/assets/{post-editor-9ma5K1Pq.js → post-editor-BRl6XFlu.js} +1 -1
- package/dist/client/assets/{primitives-BLW0qP6x.js → primitives-BDg7LeKI.js} +1 -1
- package/dist/client/assets/{profile-Bc9GqDSr.js → profile-CFpO-2Tz.js} +1 -1
- package/dist/client/assets/project-app-view-CQAJMpON.js +1 -0
- package/dist/client/assets/record-editor-BukgEZzD.js +1 -0
- package/dist/client/assets/{redirect-editor-CS1RBoS8.js → redirect-editor-DNT93xia.js} +1 -1
- package/dist/client/assets/registry-DEFqq62K.js +2 -0
- package/dist/client/assets/{registry-layout-BDZm3T04.js → registry-layout-CzJ79GRR.js} +1 -1
- package/dist/client/assets/{reports-BDMo0lnJ.js → reports-BSHwZlIz.js} +1 -1
- package/dist/client/assets/{require-capability-iOnNompG.js → require-capability-Dp0qTVxW.js} +1 -1
- package/dist/client/assets/{required-auth-layout-IpGhD1Lv.js → required-auth-layout-Bf2ygqfO.js} +1 -1
- package/dist/client/assets/{reset-password-BcW-LEPq.js → reset-password-Cr-rT1U0.js} +1 -1
- package/dist/client/assets/{roles-00HK2v8s.js → roles-CQt6_mFB.js} +1 -1
- package/dist/client/assets/{search-input-DkP3MvKd.js → search-input-CzVqrwgl.js} +1 -1
- package/dist/client/assets/{secrets-Cq-nEDPL.js → secrets-Dgw-jCWn.js} +1 -1
- package/dist/client/assets/{sections-editor-DSt5QDYQ.js → sections-editor-Cnnis1lL.js} +1 -1
- package/dist/client/assets/{select-C4Yh3I_I.js → select-BL9zv-JP.js} +1 -1
- package/dist/client/assets/{select-model-JORQ2Gh2.js → select-model-C52p56Qc.js} +1 -1
- package/dist/client/assets/self-tool-result-BbtpoGjo.js +1 -0
- package/dist/client/assets/{seo-editor-vabzwoBd.js → seo-editor--8Xe31OX.js} +1 -1
- package/dist/client/assets/{settings-layout-Dwc65CCS.js → settings-layout-CplRCtU8.js} +1 -1
- package/dist/client/assets/{settings-section-Dyof3VvN.js → settings-section-DidGbszQ.js} +1 -1
- package/dist/client/assets/{shell-controls-Dr_GzrSU.js → shell-controls-XRYGqE-R.js} +1 -1
- package/dist/client/assets/{shell-layout-Bwrf-bDx.js → shell-layout-3WAcXYR2.js} +1 -1
- package/dist/client/assets/{sidebar-BXTMhX7B.js → sidebar-BAaF24ye.js} +1 -1
- package/dist/client/assets/{skeleton-mpFjzoUE.js → skeleton-onz47XQi.js} +1 -1
- package/dist/client/assets/{sso-CiwMJA3A.js → sso-DLTxsRbf.js} +1 -1
- package/dist/client/assets/{store-CF2IPdeY.js → store-CEhJ3ho8.js} +1 -1
- package/dist/client/assets/store-registry-B7kPXz4u.js +2 -0
- package/dist/client/assets/{studio-tools-z2MoKuxB.js → studio-tools-BhhcZfev.js} +1 -1
- package/dist/client/assets/{switch-DhX1LgoM.js → switch-m3W7oBlX.js} +1 -1
- package/dist/client/assets/{table-V7ZlHmgG.js → table-BsyOuaNT.js} +1 -1
- package/dist/client/assets/{tabs-BEzq_HDC.js → tabs-BQp4xLjw.js} +1 -1
- package/dist/client/assets/{textarea-Dr__cCCA.js → textarea-CkyHXuQm.js} +1 -1
- package/dist/client/assets/{toggle-group-DOz_2Aus.js → toggle-group-C9YlqJGO.js} +1 -1
- package/dist/client/assets/{toolbar-CKNfiQcT.js → toolbar-DYjFUHXX.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-28RF0SOr.js → toolbar-icon-button-DEXhPEY6.js} +1 -1
- package/dist/client/assets/{tooltip-DMRr_d0y.js → tooltip-D0dd9ydB.js} +1 -1
- package/dist/client/assets/{use-ai-providers-BIphh0fq.js → use-ai-providers-iWGeiPtA.js} +1 -1
- package/dist/client/assets/{use-api-keys-B7Hoa5XH.js → use-api-keys-DGNPcQCu.js} +1 -1
- package/dist/client/assets/{use-automations-DXFeY9Yi.js → use-automations-DbG3Rylz.js} +1 -1
- package/dist/client/assets/{use-autosave-COG8LwFd.js → use-autosave-CiUUhqUi.js} +1 -1
- package/dist/client/assets/{use-capability-ClE5Y8Td.js → use-capability-BxZIF_3J.js} +1 -1
- package/dist/client/assets/{use-clock-tick-DO60_p2y.js → use-clock-tick-BqpT3lz9.js} +1 -1
- package/dist/client/assets/{use-connection-iKR4DAK5.js → use-connection-B_ydhIaR.js} +1 -1
- package/dist/client/assets/{use-copy-BwNmwZN4.js → use-copy-DKPJm23R.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-CGf9WQKr.js → use-create-virtual-mcp-CMfpLhg7.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-BL9BhLLo.js → use-debounced-autosave-O_qaz61i.js} +1 -1
- package/dist/client/assets/{use-debounced-value-vm2YywVs.js → use-debounced-value-Jiqdx_qI.js} +1 -1
- package/dist/client/assets/{use-deco-credits-cqQ5Grgp.js → use-deco-credits-CaUme1US.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-C1fzpsy-.js → use-decopilot-events-BYrGmZOI.js} +1 -1
- package/dist/client/assets/{use-delete-connection-B6CGcXIN.js → use-delete-connection-BFylMDGc.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-82P0H-e_.js → use-deployment-admin-Ur6VnLj1.js} +1 -1
- package/dist/client/assets/{use-file-configs-DbZyRh6z.js → use-file-configs-D378SSra.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-D6AmDQig.js → use-infinite-scroll-Dl1pnFE_.js} +1 -1
- package/dist/client/assets/{use-join-requests-umSBD2aw.js → use-join-requests-Dy5u_fZi.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-DjzGZ1ej.js → use-mcp-auth-status-C48HeCw9.js} +1 -1
- package/dist/client/assets/{use-mcp-client-Cu-eLUiE.js → use-mcp-client-BpYZJj4o.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-DS3ivkR4.js → use-mcp-tools-l53r1zOu.js} +1 -1
- package/dist/client/assets/{use-members-DiTBYVZi.js → use-members-CTrDSEbl.js} +1 -1
- package/dist/client/assets/{use-mobile-F9kT_Idr.js → use-mobile-CRkRo6zy.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-BW0Lbp2M.js → use-navigate-to-agent-D7z6mwyi.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-BoIjqJkP.js → use-org-auth-client-C7NIGHa2.js} +1 -1
- package/dist/client/assets/{use-org-sso-Dt3zVq13.js → use-org-sso-C3FJc_XM.js} +1 -1
- package/dist/client/assets/{use-organization-roles-BdxExLEu.js → use-organization-roles-Bt8yo51m.js} +1 -1
- package/dist/client/assets/{use-organization-settings-DzM8_ele.js → use-organization-settings-D2HSrnf_.js} +1 -1
- package/dist/client/assets/{use-registry-app-BZbyzB0r.js → use-registry-app-Cy2XVJ8o.js} +1 -1
- package/dist/client/assets/{use-registry-connections-DZLuPfih.js → use-registry-connections-xT5_Tp16.js} +1 -1
- package/dist/client/assets/{use-secrets-0AO756Ta.js → use-secrets-Dlwxdo4W.js} +1 -1
- package/dist/client/assets/{use-status-sounds-xCrGZ6sG.js → use-status-sounds-yNgZe7Tt.js} +1 -1
- package/dist/client/assets/{use-view-mode-Cfy2LoWQ.js → use-view-mode-YuddT2eW.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-DiaCfMBV.js → use-virtual-mcp-vNY0_cuG.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-aIQ9VGjU.js +1 -0
- package/dist/client/assets/{useQueries-LX6i8RGj.js → useQueries-CP5a8Gkq.js} +1 -1
- package/dist/client/assets/{useRouterState-BfMjSCt3.js → useRouterState-XbyODXg7.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-TkWZQEXd.js +1 -0
- package/dist/client/assets/{users-B7SH1VvM.js → users-Dxjht4mz.js} +1 -1
- package/dist/client/assets/{variant-calendar-RPLmjD1q.js → variant-calendar-DkYf5C0v.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-BPTnCybV.js → view-mode-toggle-CeUnqVr5.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/server/cli.js +1 -1
- package/dist/server/server.js +1 -1
- package/package.json +1 -1
- package/dist/client/assets/automations-wnjz-FC-.js +0 -1
- package/dist/client/assets/commerce-onboarding-Bog614JY.js +0 -1
- package/dist/client/assets/companions-core-E1684c44.js +0 -1
- package/dist/client/assets/index-Dz31_xLh.css +0 -1
- package/dist/client/assets/index-W5v34j4g.js +0 -1
- package/dist/client/assets/invite-member-dialog-BEMH_SBX.js +0 -1
- package/dist/client/assets/page-seo-sheet-Brecxjya.js +0 -1
- package/dist/client/assets/project-app-view-DFAUYzW3.js +0 -1
- package/dist/client/assets/record-editor-C36tDSMI.js +0 -1
- package/dist/client/assets/registry-w9h-TBe5.js +0 -2
- package/dist/client/assets/self-tool-result-DdH0OoA4.js +0 -1
- package/dist/client/assets/store-registry-D6SNagM5.js +0 -2
- package/dist/client/assets/useInfiniteQuery-CpL2Fv2W.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-8mEOR8yL.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as Q,r as w,m as V,j as t,b as X,B as $,k as Y,t as I}from"./index-DLFjA-pm.js";import{i as Z}from"./ArrowRight-BTqt321d.js";import{b as U}from"./ZoomOut-C1FPWq-p.js";import{n as _}from"./LinkExternal01-D_Zvma4v.js";import{aP as K}from"./agent-icon-BZhgfhdU.js";import{A as tt,a as ot,b as et,c as rt,d as it,e as st,f as at,g as nt}from"./alert-dialog-eVH4lDuw.js";import{I as W}from"./input-CYZckS5J.js";import{L as q}from"./label-EdLaI-5R.js";import{w as mt,v as lt,x as pt,$ as ct,o as dt,z as B,C as gt,a0 as ut,A as xt}from"./index-DDvdm6MO.js";import{c as ft,B as ht,a as yt}from"./block-document-DoFgnzXM.js";import{u as bt}from"./use-autosave-COG8LwFd.js";import{t as jt}from"./ChevronDown-CZIAcwGV.js";import{p as vt,q as Et,o as Ct}from"./automation-runs-3Nf8PuON.js";import{s as b,E as Nt}from"./primitives-BLW0qP6x.js";import"./AlertCircle-OzZiRcN4.js";import"./Tool01-B1EOI3tm.js";import"./ArrowUp-DKOgR0xL.js";import"./Settings02-DQ4GSu-t.js";import"./Tool02-DNB1gZ9p.js";import"./ArrowUpRight-CvwJB6OK.js";import"./TrendUp01-CKe9YInp.js";import"./ZapSquare-ixKz1MO4.js";import"./Users03-B_epF-ec.js";import"./CheckCircle-6cj-Xwhi.js";import"./Check-C9Hy68pG.js";import"./ChevronRight--wVf7uGf.js";import"./ChevronUp-CsSKaqS5.js";import"./DotsVertical-c-_wCTgn.js";import"./Stars02-DfuXiu3-.js";import"./Copy01-2Oyl2xhw.js";import"./Globe01-CDWygr27.js";import"./Eye-D81BWda-.js";import"./FilterLines-D73LV27Z.js";import"./Star01-KC9BvNup.js";import"./Globe04-D4m747kU.js";import"./SwitchHorizontal01-vm3X2ReA.js";import"./HardDrive-zpDb2j2L.js";import"./Image01--bBQuOXb.js";import"./Key01-COjK9kAq.js";import"./LayoutLeft-YhbkIV5-.js";import"./XCircle-C1PO7Xjh.js";import"./LogOut01-DWjWz0Vk.js";import"./Monitor01-RMk_Hy33.js";import"./Sun-C8Rt6Ua0.js";import"./Package-KX2QCXEp.js";import"./Palette-BUK1fohV.js";import"./Play-BQfux-g7.js";import"./Plus-0lhw9kgX.js";import"./SearchLg-D5zWzyl-.js";import"./SearchMd-DU09j0yH.js";import"./Shield01-CfcJULbp.js";import"./Stars01-BS-Qws6o.js";import"./Trash01-DWauVxmg.js";import"./Upload01-Jx7sveIV.js";import"./User01-DOzH65Yj.js";import"./Users01-Bl3Cipzb.js";import"./XClose-C6Z74Mtu.js";import"./X-CkADyhqE.js";import"./Zap-crfeCyH5.js";import"./chat-context-BjgR1MKj.js";import"./autosend-DMw4eplP.js";import"./hooks-DZ2G0HBV.js";import"./use-mcp-client-Cu-eLUiE.js";import"./auth-BgXJQGvH.js";import"./decopilot-sse-pool-B7H8BAsy.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./studio-tools-z2MoKuxB.js";import"./use-virtual-mcp-DiaCfMBV.js";import"./use-ai-providers-BIphh0fq.js";import"./location-BpLtHjTZ.js";import"./tab-id-BijBBRwE.js";import"./use-decopilot-events-C1fzpsy-.js";import"./use-organization-settings-DzM8_ele.js";import"./tooltip-DMRr_d0y.js";import"./dialog-B-PFEu8t.js";import"./drawer-ioB-jayl.js";import"./collection-search-BUwXi5On.js";import"./use-mobile-F9kT_Idr.js";import"./AreaChart-CjpEkyIS.js";import"./index-DwaHcKY7.js";import"./calendar-DXzTKJPo.js";import"./shell-layout-Bwrf-bDx.js";import"./avatar-DOKisfmu.js";import"./required-auth-layout-IpGhD1Lv.js";import"./use-org-sso-Dt3zVq13.js";import"./index-CiqBVt-V.js";import"./get-initials-D-f_fDFw.js";import"./popover-CJG9G1eo.js";import"./use-registry-app-BZbyzB0r.js";import"./use-mcp-tools-DS3ivkR4.js";import"./use-connection-iKR4DAK5.js";import"./github-repo-scope-DjMZbiKa.js";import"./authenticate-and-persist-oauth-EDYGCrss.js";import"./mcp-oauth-DhsKmk5n.js";import"./extract-connection-data-ekCc1hnU.js";import"./use-members-DiTBYVZi.js";import"./use-org-auth-client-BoIjqJkP.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./dropdown-menu-Bv8U-u2N.js";import"./use-copy-BwNmwZN4.js";import"./command-DolM9tQW.js";import"./index-qFEnr-Eg.js";import"./companions-core-E1684c44.js";import"./form-DvszbWzu.js";import"./select-C4Yh3I_I.js";import"./tabs-BEzq_HDC.js";import"./toggle-group-DOz_2Aus.js";import"./use-deco-credits-cqQ5Grgp.js";import"./sidebar-BXTMhX7B.js";import"./toolbar-icon-button-28RF0SOr.js";import"./skeleton-mpFjzoUE.js";import"./github-repo-picker-LzKpKLTc.js";import"./use-debounced-value-vm2YywVs.js";import"./use-navigate-to-agent-BW0Lbp2M.js";import"./reusable-new-chat-CouMjkYR.js";import"./provision-repo-scoped-github-connection-2iDn-wQ1.js";import"./connection-card-tEoMF1sK.js";import"./use-registry-connections-DZLuPfih.js";import"./useInfiniteQuery-CpL2Fv2W.js";import"./use-infinite-scroll-D6AmDQig.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./card-BkL1g2ae.js";import"./integration-icon-EcNPoJWr.js";import"./textarea-Dr__cCCA.js";import"./connection-form-helpers-y0k0toUD.js";import"./collection-tabs-Bg8diJEX.js";import"./badge-BP3RfcAV.js";import"./useSuspenseInfiniteQuery-8mEOR8yL.js";import"./connect-desktop-dialog-2ytDMSQS.js";import"./select-model-JORQ2Gh2.js";import"./checkbox-Dvf0sR7c.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-Dyof3VvN.js";import"./index-x2umO0Ia.js";import"./file-type-icon-Czs5uFNK.js";import"./toolbar-CKNfiQcT.js";import"./index-BoUF-4pL.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-xCrGZ6sG.js";import"./empty-state-f3NNQ1ui.js";import"./deco-site-production-url-CaKZ7xBn.js";import"./use-capability-ClE5Y8Td.js";import"./pt-BR-CLy76QW2.js";import"./use-mcp-auth-status-DjzGZ1ej.js";import"./use-debounced-autosave-BL9BhLLo.js";import"./index-B__oKxRn.js";import"./search-input-DkP3MvKd.js";import"./switch-DhX1LgoM.js";import"./use-secrets-0AO756Ta.js";import"./useQueries-LX6i8RGj.js";import"./monaco-editor-Cj3yPb4I.js";import"./use-file-configs-DbZyRh6z.js";import"./use-automations-DXFeY9Yi.js";import"./automation-list-row-COyQ04hP.js";import"./table-V7ZlHmgG.js";import"./use-clock-tick-DO60_p2y.js";function St(j){const o=Q.c(18),{icon:x,title:m,defaultOpen:v,children:u}=j,k=v===void 0?!1:v,[f,P]=w.useState(k);let l;o[0]!==x?(l=t.jsx(x,{size:15}),o[0]=x,o[1]=l):l=o[1];let r;o[2]!==m?(r=t.jsx("span",{className:"flex-1 text-left",children:m}),o[2]=m,o[3]=r):r=o[3];const a=f&&"rotate-180";let p;o[4]!==a?(p=V("transition-transform",a),o[4]=a,o[5]=p):p=o[5];let i;o[6]!==p?(i=t.jsx(jt,{size:15,className:p}),o[6]=p,o[7]=i):i=o[7];let c;o[8]!==l||o[9]!==r||o[10]!==i?(c=t.jsx(vt,{asChild:!0,children:t.jsxs("button",{type:"button",className:"flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-sm font-medium text-muted-foreground transition-colors hover:bg-muted hover:text-foreground cursor-pointer",children:[l,r,i]})}),o[8]=l,o[9]=r,o[10]=i,o[11]=c):c=o[11];let d;o[12]!==u?(d=t.jsx(Et,{className:"px-2 pt-4",children:u}),o[12]=u,o[13]=d):d=o[13];let n;return o[14]!==f||o[15]!==c||o[16]!==d?(n=t.jsxs(Ct,{open:f,onOpenChange:P,className:"mt-4",children:[c,d]}),o[14]=f,o[15]=c,o[16]=d,o[17]=n):n=o[17],n}function Nr({orgSlug:j,virtualMcpId:o,branch:x,blockKey:m,block:v,decofile:u,meta:k,onManagePosts:f,onOpenPost:P,previewBaseUrl:l}){const r=X(),a=mt({orgSlug:j,virtualMcpId:o,branch:x,packagePath:lt(o)}),p=pt(v,"categories"),[i,c,d]=bt(p,e=>{a.mutate({blockKey:m,data:B(m,"categories",e)})}),n=(e,S)=>c({...i,[e]:S}),A=ft({decofile:u,category:i,previewBaseUrl:l}),s=b(i.slug),[D,y]=w.useState(s),[g,E]=w.useState(null),[C,z]=w.useState(!1),T=s?ct(u).filter(e=>e.categorySlugs.includes(s)):[],N=T.length,H=e=>n("slug",e),M=async(e,S)=>{const J=b(i.name);z(!0);try{let h=0;for(const{key:R,payload:O}of gt(u,"posts")){const L=ut(O,e,{name:J,slug:S});L!==O&&(await a.mutateAsync({blockKey:R,data:B(R,"posts",xt(L))}),h+=1)}const F={...i,slug:S};await a.mutateAsync({blockKey:m,data:B(m,"categories",F)}),d(F),I.success(h>0?r("sandbox.categoryEditor.renameSuccessWithPosts",{count:String(h)}):r("sandbox.categoryEditor.renameSuccessNoPosts")),E(null)}catch(h){y(e),E(null),I.error(h instanceof Error?h.message:r("sandbox.categoryEditor.renameFailed"))}finally{z(!1)}},G=()=>{const e=D.trim();if(e===s){D!==e&&y(e);return}if(!e){y(s);return}if(N===0){H(e);return}E({oldSlug:s,newSlug:e,count:N})};return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"flex h-full flex-col",children:[t.jsxs("div",{className:"flex h-12 shrink-0 items-center justify-between border-b px-6",children:[t.jsx("span",{className:"truncate text-sm font-medium",children:b(i.name)||r("sandbox.categoryEditor.untitledCategory")}),t.jsxs("div",{className:"flex shrink-0 items-center gap-3",children:[t.jsx(dt,{isPending:a.isPending,isError:a.isError}),A&&t.jsxs($,{type:"button",variant:"outline",size:"sm",title:r("sandbox.categoryEditor.previewTooltip"),onClick:()=>window.open(A,"_blank","noopener,noreferrer"),children:[t.jsx(_,{size:14}),r("sandbox.categoryEditor.seeCategoryPreview")]})]})]}),t.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto",children:t.jsxs("div",{className:"mx-auto max-w-4xl px-8 py-8",children:[t.jsx(Nt,{value:b(i.name),onChange:e=>n("name",e),placeholder:r("sandbox.categoryEditor.categoryNamePlaceholder"),className:"py-1 text-3xl font-bold text-foreground"}),t.jsxs("div",{className:"mt-4 space-y-2",children:[t.jsx(q,{htmlFor:"category-slug",children:r("sandbox.categoryEditor.slugLabel")}),t.jsx(W,{id:"category-slug",value:D,onChange:e=>y(e.target.value),onBlur:G,placeholder:r("sandbox.categoryEditor.slugPlaceholder"),className:"h-10"})]}),t.jsxs("div",{className:"mt-4 space-y-2",children:[t.jsx(q,{htmlFor:"category-description",children:r("sandbox.categoryEditor.descriptionLabel")}),t.jsx(W,{id:"category-description",value:b(i.description),onChange:e=>n("description",e.target.value),placeholder:r("sandbox.categoryEditor.descriptionPlaceholder"),className:"h-10"})]}),t.jsx(St,{icon:K,title:r("sandbox.categoryEditor.contentTitle"),defaultOpen:!0,children:t.jsx(ht,{value:yt(i.sections),onChange:e=>n("sections",e),meta:k,sandboxRef:{orgSlug:j,virtualMcpId:o,branch:x},emptyMessage:r("sandbox.categoryEditor.noContentEmpty")})}),t.jsxs("div",{className:"mt-6 overflow-hidden rounded-lg border bg-muted/30",children:[t.jsxs("div",{className:"flex items-center justify-between gap-3 px-4 py-3",children:[t.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[t.jsx(U,{size:16,className:"shrink-0 text-muted-foreground"}),t.jsx("span",{className:"text-sm",children:r("sandbox.categoryEditor.postsInCategory",{count:String(N)})})]}),t.jsxs($,{type:"button",variant:"outline",size:"sm",disabled:!s,title:r(s?"sandbox.categoryEditor.pickPostsTooltip":"sandbox.categoryEditor.setSlugTooltip"),onClick:()=>f(s),children:[r("sandbox.categoryEditor.addPostsButton"),t.jsx(Z,{size:14})]})]}),N>0&&t.jsx("ul",{className:"divide-y border-t bg-background",children:T.map(e=>t.jsx("li",{children:t.jsxs("button",{type:"button",onClick:()=>P(e.key),className:"flex w-full items-center gap-2.5 px-4 py-2.5 text-left transition-colors hover:bg-muted cursor-pointer",children:[t.jsx(U,{size:14,className:"shrink-0 text-muted-foreground"}),t.jsxs("span",{className:"min-w-0 flex-1",children:[t.jsx("span",{className:"block truncate text-sm",children:e.title||r("sandbox.categoryEditor.untitledPost")}),e.slug&&t.jsx("span",{className:"block truncate text-xs text-muted-foreground",children:e.slug})]})]})},e.key))})]})]})})]}),t.jsx(tt,{open:!!g,onOpenChange:e=>{e||C||(y(s),E(null))},children:t.jsxs(ot,{children:[t.jsxs(et,{children:[t.jsx(rt,{children:r("sandbox.categoryEditor.renameDialogTitle")}),t.jsx(it,{children:g?r("sandbox.categoryEditor.renameDialogDescription",{oldSlug:g.oldSlug,newSlug:g.newSlug,count:String(g.count)}):null})]}),t.jsxs(st,{children:[t.jsx(at,{disabled:C,children:r("sandbox.categoryEditor.cancelButton")}),t.jsx(nt,{onClick:e=>{e.preventDefault(),g&&M(g.oldSlug,g.newSlug)},disabled:C,children:C?t.jsxs(t.Fragment,{children:[t.jsx(Y,{size:14,className:"animate-spin"}),r("sandbox.categoryEditor.renamingLabel")]}):r("sandbox.categoryEditor.renameActionButton")})]})]})})]})}export{Nr as CategoryEditor};
|
|
1
|
+
import{c as Q,r as w,m as V,j as t,b as X,B as $,k as Y,t as I}from"./index-QzdsfBYd.js";import{i as Z}from"./ArrowRight-CKlvyIoh.js";import{b as U}from"./ZoomOut-CAsxnm2x.js";import{n as _}from"./LinkExternal01-BktZyAnv.js";import{aP as K}from"./agent-icon-B2LgmiRt.js";import{A as tt,a as ot,b as et,c as rt,d as it,e as st,f as at,g as nt}from"./alert-dialog-BsAEBtVk.js";import{I as W}from"./input-P-LUerq4.js";import{L as q}from"./label-DNCggKDl.js";import{w as mt,v as lt,x as pt,$ as ct,o as dt,z as B,C as gt,a0 as ut,A as xt}from"./index-DX-8pprv.js";import{c as ft,B as ht,a as yt}from"./block-document-NADzTy6R.js";import{u as bt}from"./use-autosave-CiUUhqUi.js";import{t as jt}from"./ChevronDown-ivzZdE8w.js";import{p as vt,q as Et,o as Ct}from"./automation-runs-qvWRqyqv.js";import{s as b,E as Nt}from"./primitives-BDg7LeKI.js";import"./AlertCircle-BVcbGU63.js";import"./Tool01-zKnvH-kk.js";import"./ArrowUp-zrMcuXAr.js";import"./Settings02-BrQ1R_C3.js";import"./Tool02-a1QDD1BE.js";import"./ArrowUpRight-BRtGTw6u.js";import"./TrendUp01-DbtFTYSl.js";import"./ZapSquare-CqrPlIO3.js";import"./Users03-B2Rmdg8K.js";import"./CheckCircle-Ddtle1Hu.js";import"./Check-K9ygl0O6.js";import"./ChevronRight-wehtSt4J.js";import"./ChevronUp-DtesMDJI.js";import"./DotsVertical-0w0ZkjcP.js";import"./Stars02-Rv7Zpq5p.js";import"./Copy01-B2yggp1R.js";import"./Globe01-dnwQ58ni.js";import"./Eye-CZVpzZj3.js";import"./FilterLines-xmnqgD9Q.js";import"./Star01-DkiTL7fS.js";import"./Globe04-C5N1Fi_a.js";import"./SwitchHorizontal01-YOHN8l_Y.js";import"./HardDrive-BP9_iF3o.js";import"./Image01-CTFJ4q_z.js";import"./Key01-DXv7srOu.js";import"./LayoutLeft-BPQ9stJD.js";import"./XCircle-BNVPuHya.js";import"./LogOut01-BDBTSoW6.js";import"./Monitor01-7QFBOkji.js";import"./Sun-DIwJT6kw.js";import"./Package-D8m71yLY.js";import"./Palette-DWy3dzj0.js";import"./Play-lriwSM0x.js";import"./Plus-DQlLKoK7.js";import"./SearchLg-CoOX4SoC.js";import"./SearchMd-Dg6mSNN_.js";import"./Shield01-BeZ6Sg4x.js";import"./Stars01-DTVv_6xg.js";import"./Trash01-CvmXP6ap.js";import"./Upload01-Ur6u-B1R.js";import"./User01-ELT05I_C.js";import"./Users01-DmKZlyCu.js";import"./XClose-BO1Lwhh7.js";import"./X-DjQw217D.js";import"./Zap-C4HzUZ29.js";import"./chat-context-DG5VMA6B.js";import"./autosend-BeIUwx1c.js";import"./hooks-CxPB8UeZ.js";import"./use-mcp-client-BpYZJj4o.js";import"./auth-BbZNerdw.js";import"./decopilot-sse-pool-DWTCLkf7.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./studio-tools-BhhcZfev.js";import"./use-virtual-mcp-vNY0_cuG.js";import"./use-ai-providers-iWGeiPtA.js";import"./location-BpLtHjTZ.js";import"./tab-id-BijBBRwE.js";import"./use-decopilot-events-BYrGmZOI.js";import"./use-organization-settings-D2HSrnf_.js";import"./tooltip-D0dd9ydB.js";import"./dialog-C7PMQncq.js";import"./drawer-D1Kw_X2C.js";import"./collection-search-HTEknyDM.js";import"./use-mobile-CRkRo6zy.js";import"./AreaChart-BOEksfko.js";import"./index-DEfykvQ6.js";import"./calendar-BYOoZCNu.js";import"./shell-layout-3WAcXYR2.js";import"./avatar-B1FBqiPq.js";import"./required-auth-layout-Bf2ygqfO.js";import"./use-org-sso-C3FJc_XM.js";import"./index-Dig78Jy9.js";import"./get-initials-D-f_fDFw.js";import"./popover-1ACpRRoe.js";import"./use-registry-app-Cy2XVJ8o.js";import"./use-mcp-tools-l53r1zOu.js";import"./use-connection-B_ydhIaR.js";import"./github-repo-scope-DjMZbiKa.js";import"./authenticate-and-persist-oauth-BUz0jLWA.js";import"./mcp-oauth-aEWbqsXM.js";import"./extract-connection-data-wIgwD813.js";import"./use-members-CTrDSEbl.js";import"./use-org-auth-client-C7NIGHa2.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./dropdown-menu-C3car2Q8.js";import"./use-copy-DKPJm23R.js";import"./command-BYmAVtGu.js";import"./index-DSvM3i2U.js";import"./companions-core-C84CnqsZ.js";import"./form-zrd7LYxu.js";import"./select-BL9zv-JP.js";import"./tabs-BQp4xLjw.js";import"./toggle-group-C9YlqJGO.js";import"./use-deco-credits-CaUme1US.js";import"./sidebar-BAaF24ye.js";import"./toolbar-icon-button-DEXhPEY6.js";import"./skeleton-onz47XQi.js";import"./github-repo-picker-CcvybfZV.js";import"./use-debounced-value-Jiqdx_qI.js";import"./use-navigate-to-agent-D7z6mwyi.js";import"./reusable-new-chat-CouMjkYR.js";import"./provision-repo-scoped-github-connection-2iDn-wQ1.js";import"./connection-card-CChyV7In.js";import"./use-registry-connections-xT5_Tp16.js";import"./useInfiniteQuery-aIQ9VGjU.js";import"./use-infinite-scroll-Dl1pnFE_.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./card-CsVINvzI.js";import"./integration-icon-DB0SNVRE.js";import"./textarea-CkyHXuQm.js";import"./connection-form-helpers-BsaAWJ8U.js";import"./collection-tabs-Cu0giObB.js";import"./badge-8mmmFMes.js";import"./useSuspenseInfiniteQuery-TkWZQEXd.js";import"./connect-desktop-dialog-CVLI9IFZ.js";import"./select-model-C52p56Qc.js";import"./checkbox-CAW6yy-f.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-DidGbszQ.js";import"./index-BGtGWsgH.js";import"./file-type-icon-Cg3Nm1XZ.js";import"./toolbar-DYjFUHXX.js";import"./index-Cb8ogyWE.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-yNgZe7Tt.js";import"./empty-state-B7ZzKn6B.js";import"./deco-site-production-url-CaKZ7xBn.js";import"./use-capability-BxZIF_3J.js";import"./pt-BR-CLy76QW2.js";import"./use-mcp-auth-status-C48HeCw9.js";import"./use-debounced-autosave-O_qaz61i.js";import"./index-CPojIfJr.js";import"./search-input-CzVqrwgl.js";import"./switch-m3W7oBlX.js";import"./use-secrets-Dlwxdo4W.js";import"./useQueries-CP5a8Gkq.js";import"./monaco-editor-CTTjzlzK.js";import"./use-file-configs-D378SSra.js";import"./use-automations-DbG3Rylz.js";import"./automation-list-row-CnMPr30w.js";import"./table-BsyOuaNT.js";import"./use-clock-tick-BqpT3lz9.js";function St(j){const o=Q.c(18),{icon:x,title:m,defaultOpen:v,children:u}=j,k=v===void 0?!1:v,[f,P]=w.useState(k);let l;o[0]!==x?(l=t.jsx(x,{size:15}),o[0]=x,o[1]=l):l=o[1];let r;o[2]!==m?(r=t.jsx("span",{className:"flex-1 text-left",children:m}),o[2]=m,o[3]=r):r=o[3];const a=f&&"rotate-180";let p;o[4]!==a?(p=V("transition-transform",a),o[4]=a,o[5]=p):p=o[5];let i;o[6]!==p?(i=t.jsx(jt,{size:15,className:p}),o[6]=p,o[7]=i):i=o[7];let c;o[8]!==l||o[9]!==r||o[10]!==i?(c=t.jsx(vt,{asChild:!0,children:t.jsxs("button",{type:"button",className:"flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-sm font-medium text-muted-foreground transition-colors hover:bg-muted hover:text-foreground cursor-pointer",children:[l,r,i]})}),o[8]=l,o[9]=r,o[10]=i,o[11]=c):c=o[11];let d;o[12]!==u?(d=t.jsx(Et,{className:"px-2 pt-4",children:u}),o[12]=u,o[13]=d):d=o[13];let n;return o[14]!==f||o[15]!==c||o[16]!==d?(n=t.jsxs(Ct,{open:f,onOpenChange:P,className:"mt-4",children:[c,d]}),o[14]=f,o[15]=c,o[16]=d,o[17]=n):n=o[17],n}function Nr({orgSlug:j,virtualMcpId:o,branch:x,blockKey:m,block:v,decofile:u,meta:k,onManagePosts:f,onOpenPost:P,previewBaseUrl:l}){const r=X(),a=mt({orgSlug:j,virtualMcpId:o,branch:x,packagePath:lt(o)}),p=pt(v,"categories"),[i,c,d]=bt(p,e=>{a.mutate({blockKey:m,data:B(m,"categories",e)})}),n=(e,S)=>c({...i,[e]:S}),A=ft({decofile:u,category:i,previewBaseUrl:l}),s=b(i.slug),[D,y]=w.useState(s),[g,E]=w.useState(null),[C,z]=w.useState(!1),T=s?ct(u).filter(e=>e.categorySlugs.includes(s)):[],N=T.length,H=e=>n("slug",e),M=async(e,S)=>{const J=b(i.name);z(!0);try{let h=0;for(const{key:R,payload:O}of gt(u,"posts")){const L=ut(O,e,{name:J,slug:S});L!==O&&(await a.mutateAsync({blockKey:R,data:B(R,"posts",xt(L))}),h+=1)}const F={...i,slug:S};await a.mutateAsync({blockKey:m,data:B(m,"categories",F)}),d(F),I.success(h>0?r("sandbox.categoryEditor.renameSuccessWithPosts",{count:String(h)}):r("sandbox.categoryEditor.renameSuccessNoPosts")),E(null)}catch(h){y(e),E(null),I.error(h instanceof Error?h.message:r("sandbox.categoryEditor.renameFailed"))}finally{z(!1)}},G=()=>{const e=D.trim();if(e===s){D!==e&&y(e);return}if(!e){y(s);return}if(N===0){H(e);return}E({oldSlug:s,newSlug:e,count:N})};return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"flex h-full flex-col",children:[t.jsxs("div",{className:"flex h-12 shrink-0 items-center justify-between border-b px-6",children:[t.jsx("span",{className:"truncate text-sm font-medium",children:b(i.name)||r("sandbox.categoryEditor.untitledCategory")}),t.jsxs("div",{className:"flex shrink-0 items-center gap-3",children:[t.jsx(dt,{isPending:a.isPending,isError:a.isError}),A&&t.jsxs($,{type:"button",variant:"outline",size:"sm",title:r("sandbox.categoryEditor.previewTooltip"),onClick:()=>window.open(A,"_blank","noopener,noreferrer"),children:[t.jsx(_,{size:14}),r("sandbox.categoryEditor.seeCategoryPreview")]})]})]}),t.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto",children:t.jsxs("div",{className:"mx-auto max-w-4xl px-8 py-8",children:[t.jsx(Nt,{value:b(i.name),onChange:e=>n("name",e),placeholder:r("sandbox.categoryEditor.categoryNamePlaceholder"),className:"py-1 text-3xl font-bold text-foreground"}),t.jsxs("div",{className:"mt-4 space-y-2",children:[t.jsx(q,{htmlFor:"category-slug",children:r("sandbox.categoryEditor.slugLabel")}),t.jsx(W,{id:"category-slug",value:D,onChange:e=>y(e.target.value),onBlur:G,placeholder:r("sandbox.categoryEditor.slugPlaceholder"),className:"h-10"})]}),t.jsxs("div",{className:"mt-4 space-y-2",children:[t.jsx(q,{htmlFor:"category-description",children:r("sandbox.categoryEditor.descriptionLabel")}),t.jsx(W,{id:"category-description",value:b(i.description),onChange:e=>n("description",e.target.value),placeholder:r("sandbox.categoryEditor.descriptionPlaceholder"),className:"h-10"})]}),t.jsx(St,{icon:K,title:r("sandbox.categoryEditor.contentTitle"),defaultOpen:!0,children:t.jsx(ht,{value:yt(i.sections),onChange:e=>n("sections",e),meta:k,sandboxRef:{orgSlug:j,virtualMcpId:o,branch:x},emptyMessage:r("sandbox.categoryEditor.noContentEmpty")})}),t.jsxs("div",{className:"mt-6 overflow-hidden rounded-lg border bg-muted/30",children:[t.jsxs("div",{className:"flex items-center justify-between gap-3 px-4 py-3",children:[t.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[t.jsx(U,{size:16,className:"shrink-0 text-muted-foreground"}),t.jsx("span",{className:"text-sm",children:r("sandbox.categoryEditor.postsInCategory",{count:String(N)})})]}),t.jsxs($,{type:"button",variant:"outline",size:"sm",disabled:!s,title:r(s?"sandbox.categoryEditor.pickPostsTooltip":"sandbox.categoryEditor.setSlugTooltip"),onClick:()=>f(s),children:[r("sandbox.categoryEditor.addPostsButton"),t.jsx(Z,{size:14})]})]}),N>0&&t.jsx("ul",{className:"divide-y border-t bg-background",children:T.map(e=>t.jsx("li",{children:t.jsxs("button",{type:"button",onClick:()=>P(e.key),className:"flex w-full items-center gap-2.5 px-4 py-2.5 text-left transition-colors hover:bg-muted cursor-pointer",children:[t.jsx(U,{size:14,className:"shrink-0 text-muted-foreground"}),t.jsxs("span",{className:"min-w-0 flex-1",children:[t.jsx("span",{className:"block truncate text-sm",children:e.title||r("sandbox.categoryEditor.untitledPost")}),e.slug&&t.jsx("span",{className:"block truncate text-xs text-muted-foreground",children:e.slug})]})]})},e.key))})]})]})})]}),t.jsx(tt,{open:!!g,onOpenChange:e=>{e||C||(y(s),E(null))},children:t.jsxs(ot,{children:[t.jsxs(et,{children:[t.jsx(rt,{children:r("sandbox.categoryEditor.renameDialogTitle")}),t.jsx(it,{children:g?r("sandbox.categoryEditor.renameDialogDescription",{oldSlug:g.oldSlug,newSlug:g.newSlug,count:String(g.count)}):null})]}),t.jsxs(st,{children:[t.jsx(at,{disabled:C,children:r("sandbox.categoryEditor.cancelButton")}),t.jsx(nt,{onClick:e=>{e.preventDefault(),g&&M(g.oldSlug,g.newSlug)},disabled:C,children:C?t.jsxs(t.Fragment,{children:[t.jsx(Y,{size:14,className:"animate-spin"}),r("sandbox.categoryEditor.renamingLabel")]}):r("sandbox.categoryEditor.renameActionButton")})]})]})})]})}export{Nr as CategoryEditor};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{c as ae,m as Ye,bB as Je,j as V,F as Z,K as pe,n as et,cw as tt,J as je,u as Ae,o as Ue,t as se,I as de,G as ue,d as Qe,f as nt,r as x,b as Me,
|
|
2
|
-
`).replace(/https?:\/\/[^\s)>\]]+/g,"").includes("?")?"requires_action":"completed":t==="tool-calls"?e.some(s=>s.type==="tool-user_ask"&&s.state==="input-available"||s.state==="approval-requested")?"requires_action":"completed":"failed"}const Ce={decopilot:{harness:"decopilot",sandbox:"agent-sandbox"},"claude-code-desktop":{harness:"claude-code",sandbox:"user-desktop"},"codex-desktop":{harness:"codex",sandbox:"user-desktop"}};function
|
|
1
|
+
import{c as ae,m as Ye,bB as Je,j as V,F as Z,K as pe,n as et,cw as tt,J as je,u as Ae,o as Ue,t as se,I as de,G as ue,d as Qe,f as nt,r as x,b as Me,p as st,a as at,v as ot,a8 as rt}from"./index-QzdsfBYd.js";import{A as Ke,c as it,a as ct,w as lt}from"./autosend-BeIUwx1c.js";import{S as dt,u as ut,d as pt,b as ft}from"./hooks-CxPB8UeZ.js";import{u as ht}from"./studio-tools-BhhcZfev.js";import{a as mt,u as gt,S as yt}from"./use-mcp-client-BpYZJj4o.js";import{u as xt}from"./use-virtual-mcp-vNY0_cuG.js";import{u as St,a as he}from"./use-ai-providers-iWGeiPtA.js";import{o as bt,b as vt}from"./location-BpLtHjTZ.js";import{d as It,q as Ct,n as kt}from"./tab-id-BijBBRwE.js";import{u as Mt}from"./use-decopilot-events-BYrGmZOI.js";import{e as Tt}from"./use-organization-settings-D2HSrnf_.js";const wt={anthropic:["claude-haiku-4-5","claude-haiku"],openrouter:["qwen/qwen3.5-flash","anthropic/claude-haiku-4.5","anthropic/claude-haiku","google/gemini-3-flash"],deco:["qwen/qwen3.5-flash","anthropic/claude-haiku"],llmapi:["claude-haiku-4-5","claude-haiku","gpt-4o-mini"],google:["gemini-2.5-flash","gemini-3-flash"],"claude-code":["claude-code:haiku","claude-code:sonnet"],codex:["codex:gpt-5.6-luna"]},Et={anthropic:["claude-sonnet-5","claude-sonnet"],openrouter:["anthropic/claude-sonnet-5","anthropic/claude-sonnet","anthropic/claude-opus-4.8","google/gemini-3-pro"],deco:["anthropic/claude-sonnet-5","anthropic/claude-sonnet","anthropic/claude"],llmapi:["claude-sonnet-4-6","claude-sonnet"],google:["gemini-3-pro","gemini-3-flash"],"claude-code":["claude-code:sonnet"],codex:["codex:gpt-5.6-terra"]},At={anthropic:["claude-opus-4-8","claude-sonnet-5","claude-sonnet","claude-fable-5"],openrouter:["anthropic/claude-opus-4.8:extended","anthropic/claude-opus-4.8","anthropic/claude-sonnet-5:extended","anthropic/claude-sonnet-5","google/gemini-3-pro","anthropic/claude-fable-5"],deco:["anthropic/claude-opus","anthropic/claude-sonnet-4.6","anthropic/claude-sonnet","anthropic/claude-fable"],llmapi:["claude-opus-4-8","claude-opus","claude-sonnet-4-6"],google:["gemini-3-pro"],"claude-code":["claude-code:opus-1m","claude-code:opus","claude-code:sonnet"],codex:["codex:gpt-5.6-sol"]},_t={openrouter:["openai/gpt-image-1","google/gemini-2.0-flash-image"],deco:["openai/gpt-image-1","google/gemini-2.0-flash-image"],llmapi:["gemini-2.5-flash-image","gpt-image-1"],google:["gemini-2.0-flash-image"]},Rt={openrouter:["perplexity/sonar","perplexity/sonar-pro"],deco:["perplexity/sonar","perplexity/sonar-pro"]},$t={openrouter:["perplexity/deep-research","perplexity/sonar-pro"],deco:["perplexity/deep-research","perplexity/sonar-pro"]};function We(t){return t.toLowerCase().replace(/[^a-z0-9]/g,"")}function Pt(t){return We(t).includes("deepresearch")}const Dt=["sonar","searchpreview","online"];function Ve(t){const e=We(t);return e.includes("deepresearch")?!1:Dt.some(n=>e.includes(n))}function Be(t){return t.asyncResearch!==!0&&Ve(t.modelId)}function He(t){return t.asyncResearch===!0||Pt(t.modelId)||Ve(t.modelId)}function ce(t,e,n,s){for(const a of n){const o=t.find(r=>r.modelId===a);if(o)return{keyId:e,modelId:o.modelId,title:o.title}}for(const a of n){const o=t.find(r=>r.modelId.includes(a));if(o)return{keyId:e,modelId:o.modelId,title:o.title}}if(s){const a=t.find(s);if(a)return{keyId:e,modelId:a.modelId,title:a.title}}return null}function Ot(t,e){const n={chat:{fast:null,smart:null,thinking:null},image:null,webSearch:null,deepResearch:null};for(const s of t){const a=e[s.id]??[],o=s.providerId;n.chat.fast||(n.chat.fast=ce(a,s.id,wt[o]??[])),n.chat.smart||(n.chat.smart=ce(a,s.id,Et[o]??[])),n.chat.thinking||(n.chat.thinking=ce(a,s.id,At[o]??[])),n.image||(n.image=ce(a,s.id,_t[o]??[],r=>r.capabilities?.includes("image")===!0)),n.webSearch||(n.webSearch=ce(a,s.id,Rt[o]??[],Be)),n.deepResearch||(n.deepResearch=ce(a,s.id,$t[o]??[],He))}return n}const Lt=Je("animate-spin",{variants:{variant:{default:"fill-primary text-gray-200",destructive:"fill-destructive text-gray-200",secondary:"fill-secondary text-gray-200",success:"fill-success text-gray-200",special:"fill-special text-background"},size:{default:"h-7 w-7",sm:"h-6 w-6",lg:"h-8 w-8",icon:"h-6 w-6",xs:"h-4 w-4"}},defaultVariants:{variant:"default",size:"default"}});function Tn(t){const e=ae.c(10),{variant:n,size:s}=t;let a;e[0]!==s||e[1]!==n?(a=Ye(Lt({variant:n,size:s})),e[0]=s,e[1]=n,e[2]=a):a=e[2];let o,r;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=V.jsx("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),r=V.jsx("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"}),e[3]=o,e[4]=r):(o=e[3],r=e[4]);let i;e[5]!==a?(i=V.jsxs("svg",{"aria-hidden":"true",className:a,viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[o,r]}),e[5]=a,e[6]=i):i=e[6];let u;e[7]===Symbol.for("react.memo_cache_sentinel")?(u=V.jsx("span",{className:"sr-only",children:"Loading..."}),e[7]=u):u=e[7];let d;return e[8]!==i?(d=V.jsxs("div",{role:"status",children:[i,u]}),e[8]=i,e[9]=d):d=e[9],d}const Oe={online:!1,capabilities:[],ready:!1};function Nt(t){const e=ae.c(9),{org:n}=Z(),s=ht(),a=t?.fast??!1;let o;e[0]!==n.id?(o=pe.currentLink(n.id),e[0]=n.id,e[1]=o):o=e[1];let r;e[2]!==s?(r=async()=>{const v=await s.call("LINK_CURRENT_GET",{});return v?{...v,ready:!0}:{...Oe,ready:!0}},e[2]=s,e[3]=r):r=e[3];const i=a?1e3:1e4,u=a?2e3:15e3;let d;e[4]!==o||e[5]!==r||e[6]!==i||e[7]!==u?(d={queryKey:o,queryFn:r,staleTime:i,refetchInterval:u,refetchOnWindowFocus:!0},e[4]=o,e[5]=r,e[6]=i,e[7]=u,e[8]=d):d=e[8];const{data:y}=et(d);return y??Oe}function Ft(t,e=[]){return t==="stop"?e.filter(a=>a.type==="text"&&a.text).map(a=>a.text).join(`
|
|
2
|
+
`).replace(/https?:\/\/[^\s)>\]]+/g,"").includes("?")?"requires_action":"completed":t==="tool-calls"?e.some(s=>s.type==="tool-user_ask"&&s.state==="input-available"||s.state==="approval-requested")?"requires_action":"completed":"failed"}const Ce={decopilot:{harness:"decopilot",sandbox:"agent-sandbox"},"claude-code-desktop":{harness:"claude-code",sandbox:"user-desktop"},"codex-desktop":{harness:"codex",sandbox:"user-desktop"}};function qt(t,e){if(!t)return null;const n=e?tt(e):null;if(t==="decopilot"&&n===null)return"decopilot";for(const[s,a]of Object.entries(Ce))if(a.harness===t&&a.sandbox===n)return s;return null}function wn(t){return t.claudeCode?"claude-code-desktop":t.codex?"codex-desktop":null}function jt(t,e){return e&&t&&Ce[t].sandbox==="user-desktop"?"decopilot":t}function Ut(t){return t.thread?.harness_id!=null?{}:{harnessId:t.globals.harnessId,sandboxProviderKind:t.globals.sandboxProviderKind,branch:t.globals.branch??null}}function Qt(t){const e=ae.c(21);let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId",shouldThrow:!1},e[0]=n):n=e[0];const s=je(n);let a;e[1]===Symbol.for("react.memo_cache_sentinel")?(a={strict:!1},e[1]=a):a=e[1];const o=Ae(a);let r;e[2]!==o.brand||e[3]!==o.main||e[4]!==o.preview||e[5]!==o.skill?(r=(typeof o.main=="string"?It(o.main)?.path:void 0)??o.preview??o.skill??o.brand??null,e[2]=o.brand,e[3]=o.main,e[4]=o.preview,e[5]=o.skill,e[6]=r):r=e[6];const i=r;let u;if(e[7]!==s?.params.appSlug||e[8]!==s?.params.collectionName||e[9]!==s?.params.itemId||e[10]!==i||e[11]!==t){if(u=[],t&&u.push(`### Selected Agent
|
|
3
3
|
- ID: ${t}`),i){let y;e[13]!==i?(y=bt(i),e[13]=i,e[14]=y):y=e[14];const v=y;let w;e[15]!==i?(w=vt(i),e[15]=i,e[16]=w):w=e[16],u.push(`### Currently Open File
|
|
4
4
|
The user has this file open in the Library and is most likely referring to it:
|
|
5
5
|
- Name: ${w}
|
|
@@ -27,10 +27,10 @@ ${r}`});break}case"image":case"audio":{if(!o.data||!o.mimeType)continue;n.push({
|
|
|
27
27
|
${r.text}`}):"blob"in r&&r.blob&&r.mimeType&&n.push({type:"file",url:`data:${r.mimeType};base64,${r.blob}`,filename:String(r.uri),mediaType:String(r.mimeType)}));break}}}return n}function ze(t){if(!t)return[];const e=[];let n="";const s=a=>{if(a){if(a.type==="text"&&"text"in a&&typeof a.text=="string")n+=a.text;else if(a.type==="mention"&&a.attrs){const o=a.attrs.char??"/",r=`${o}${a.attrs.name}`;if(a.attrs.kind==="task"){const i=a.attrs.metadata,u=i?.title??a.attrs.name??"",d=i?.context?.trim()||[u,i?.description?.trim()].filter(Boolean).join(`
|
|
28
28
|
|
|
29
29
|
`);d&&e.push({type:"text",text:d});return}if(n+=r,o==="@"){const i=a.attrs.metadata;i&&typeof i=="object"&&!Array.isArray(i)&&"agentId"in i?e.push({type:"text",text:`[DELEGATE TO AGENT: ${i.title??a.attrs.name} (agent_id: ${i.agentId})]
|
|
30
|
-
Use the subtask tool to delegate this task to the agent above. Include the full relevant context from this conversation in the prompt field — the subagent has no conversation history.`}):Array.isArray(i)&&e.push(...Le(i,r))}else if(a.attrs.kind==="skill"){const i=a.attrs.metadata;i&&!Array.isArray(i)&&Array.isArray(i.files)&&e.push(...Ht(i,r))}else{const i=a.attrs.metadata||a.attrs.prompts||[];Array.isArray(i)&&i.length>0&&typeof i[0]=="object"&&i[0]!==null&&"role"in i[0]?e.push(...Gt(i,r)):Array.isArray(i)&&e.push(...Le(i,r))}}else if(a.type==="file"&&a.attrs){const o=a.attrs,r=`[file:://${encodeURIComponent(o.name)}]`;n+=r,e.push(...Bt(o,r))}if("content"in a&&Array.isArray(a.content))for(const o of a.content)s(o)}};return s(t),n.trim()&&e.unshift({type:"text",text:n.trim()}),e}function En(t){const e=ze(t);return e.length===0?[]:[{id:crypto.randomUUID(),role:"user",parts:e,metadata:{tiptapDoc:t}}]}function An(t){return new Set(t.filter(e=>e.status==="queued").map(e=>e.messageId))}function zt(t){return(t??[]).map(e=>e?.type==="text"&&typeof e.text=="string"?e.text:"").join("").trim()}function _n(t){return t.filter(e=>e.status==="queued").sort((e,n)=>e.enqueuedAt-n.enqueuedAt)}function Xt(t,e){return t.some(n=>n.messageId===e.messageId)?t:[...t,e]}function Zt(t,e){return t.filter(n=>n.messageId!==e)}const Ne=new Map,_e=new Set;function Yt(t){_e.add(t)}function Jt(t){return _e.has(t)}function en(t){_e.delete(t)}function me(t){let e=Ne.get(t);return e||(e=new dt([]),Ne.set(t,e)),e}function Xe(t,e){me(t).update(n=>Xt(n,e))}function Ee(t,e){me(t).update(n=>Zt(n,e))}function tn(t,e){me(t).set(e)}const ke=new Map;function nn(t,e){ke.set(`${t}:${e.id}`,e)}function sn(t,e){const n=`${t}:${e}`,s=ke.get(n);return ke.delete(n),s}function
|
|
31
|
-
`);if(!T){fe(c);return}new TextEncoder().encode(T).length>ln||xe(b=>Object.keys(b).length>=dn&&!(c in b)?b:{...b,[c]:T})},fe=c=>{xe(h=>{const{[c]:R,...T}=h;return T})},[be,oe]=de(ue.chatLastAgentOption(e),c=>c&&c in Ce?c:null),ee=hn(),we=ee?.isThreadLocked&&ee.lockedHarness!=null?
|
|
30
|
+
Use the subtask tool to delegate this task to the agent above. Include the full relevant context from this conversation in the prompt field — the subagent has no conversation history.`}):Array.isArray(i)&&e.push(...Le(i,r))}else if(a.attrs.kind==="skill"){const i=a.attrs.metadata;i&&!Array.isArray(i)&&Array.isArray(i.files)&&e.push(...Ht(i,r))}else{const i=a.attrs.metadata||a.attrs.prompts||[];Array.isArray(i)&&i.length>0&&typeof i[0]=="object"&&i[0]!==null&&"role"in i[0]?e.push(...Gt(i,r)):Array.isArray(i)&&e.push(...Le(i,r))}}else if(a.type==="file"&&a.attrs){const o=a.attrs,r=`[file:://${encodeURIComponent(o.name)}]`;n+=r,e.push(...Bt(o,r))}if("content"in a&&Array.isArray(a.content))for(const o of a.content)s(o)}};return s(t),n.trim()&&e.unshift({type:"text",text:n.trim()}),e}function En(t){const e=ze(t);return e.length===0?[]:[{id:crypto.randomUUID(),role:"user",parts:e,metadata:{tiptapDoc:t}}]}function An(t){return new Set(t.filter(e=>e.status==="queued").map(e=>e.messageId))}function zt(t){return(t??[]).map(e=>e?.type==="text"&&typeof e.text=="string"?e.text:"").join("").trim()}function _n(t){return t.filter(e=>e.status==="queued").sort((e,n)=>e.enqueuedAt-n.enqueuedAt)}function Xt(t,e){return t.some(n=>n.messageId===e.messageId)?t:[...t,e]}function Zt(t,e){return t.filter(n=>n.messageId!==e)}const Ne=new Map,_e=new Set;function Yt(t){_e.add(t)}function Jt(t){return _e.has(t)}function en(t){_e.delete(t)}function me(t){let e=Ne.get(t);return e||(e=new dt([]),Ne.set(t,e)),e}function Xe(t,e){me(t).update(n=>Xt(n,e))}function Ee(t,e){me(t).update(n=>Zt(n,e))}function tn(t,e){me(t).set(e)}const ke=new Map;function nn(t,e){ke.set(`${t}:${e.id}`,e)}function sn(t,e){const n=`${t}:${e}`,s=ke.get(n);return ke.delete(n),s}function Fe(t,e){ke.delete(`${t}:${e}`)}async function X(t,e){try{const n=await fetch(`/api/${encodeURIComponent(t)}/decopilot/queue/${encodeURIComponent(e)}`,{credentials:"include"});if(!n.ok)return;const s=await n.json();tn(e,s.items??[])}catch{}}function Rn(t){const e=ae.c(2);let n;e[0]!==t?(n=me(t),e[0]=t,e[1]=n):n=e[1];const s=n;return x.useSyncExternalStore(s.subscribe,s.get,s.get)}function an(){const{org:t}=Z();return{enqueue:Xe,refresh:e=>X(t.slug,e),cancel:async(e,n)=>{const s=`thread-run:${e}:${n}`;Ee(e,n);try{const a=await fetch(`/api/${encodeURIComponent(t.slug)}/decopilot/queue/${encodeURIComponent(e)}/cancel/${encodeURIComponent(s)}`,{method:"POST",credentials:"include"});if(!a.ok&&a.status!==404)throw new Error(`Cancel failed: ${a.status}`);return!0}catch(a){return se.error(a instanceof Error?a.message:"Failed to cancel"),!1}finally{await X(t.slug,e)}}}}function te(t,e,n,s){if(!t)return null;const a=e.find(r=>r.id===t.keyId);if(!a)return null;const o=n.find(r=>r.modelId===t.modelId);return o?{...o,keyId:t.keyId}:{modelId:t.modelId,title:s??t.modelId,keyId:t.keyId,providerId:a.providerId,description:null,logo:null,capabilities:[],limits:null,costs:null}}function on(t){return t==="fast"||t==="smart"||t==="thinking"?t:"smart"}function rn(t,e,n,s){if(!n||s.length===0)return null;const a=e.find(u=>u.id===n);if(!a)return null;const o=Ot([a],{[n]:s}),r=t==="fast"?o.chat.fast:t==="thinking"?o.chat.thinking:o.chat.smart;if(!r)return null;const i=s.find(u=>u.modelId===r.modelId);return i?{...i,keyId:n}:null}const qe=new Set,ne=new Set;function le(t){return x.useSyncExternalStore(t.subscribe,t.get,t.get)}function cn(t){return t.kind==="loading"?"ready":t.kind}const ln=1e4,dn=10,Re=x.createContext(null),$e=x.createContext(null),Pe=x.createContext(null),Ze=x.createContext(null);function un({children:t}){const{locator:e}=Z(),{virtualMcpId:n}=Ge(),[s,a]=de(ue.chatSelectedImageModel(e),null),[o,r]=de(ue.chatSelectedWebSearchModel(e),null),[i,u]=de(ue.chatSelectedDeepResearchModel(e),null),[d,y]=x.useState(null),[v,w]=x.useState("default"),g=Tt(),[$,H]=de(ue.chatSimpleModeTier(e),null),j=on($),I=St(),C=g.tiers[j],D=d&&I.some(c=>c.id===d)?d:C?.keyId??I[0]?.id??null,{models:O,isLoading:M}=he(D??void 0),{models:U}=he(C?.keyId),{models:Y}=he(g.tiers.image?.keyId),{models:J}=he(g.tiers.web_search?.keyId),{models:L}=he(g.tiers.deep_research?.keyId),G=te(C,I,U,C?.title)??rn(j,I,D,O),B=M,Q=O.filter(c=>c.capabilities?.includes("image")),N=te(s,I,Q),z=te(g.tiers.image,I,Y,g.tiers.image?.title)??N??Q[0]??null,f=O.filter(Be),P=te(o,I,f),K=f.find(c=>c.modelId==="perplexity/sonar")??f[0]??null,W=te(g.tiers.web_search,I,J,g.tiers.web_search?.title)??P??K,F=O.filter(He),k=te(i,I,F),q=F.find(c=>c.modelId==="perplexity/deep-research")??F.find(c=>c.asyncResearch===!0)??F[0]??null,A=te(g.tiers.deep_research,I,L,g.tiers.deep_research?.title)??k??q,Te=xt(n)??{id:n,title:"",description:null,icon:null},[ye,xe]=x.useState({}),Se=(c,h)=>{const R=[];for(const b of h.content??[])b.type==="text"&&b.text?.trim()&&R.push(b.text.trim());const T=R.join(`
|
|
31
|
+
`);if(!T){fe(c);return}new TextEncoder().encode(T).length>ln||xe(b=>Object.keys(b).length>=dn&&!(c in b)?b:{...b,[c]:T})},fe=c=>{xe(h=>{const{[c]:R,...T}=h;return T})},[be,oe]=de(ue.chatLastAgentOption(e),c=>c&&c in Ce?c:null),ee=hn(),we=ee?.isThreadLocked&&ee.lockedHarness!=null?qt(ee.lockedHarness,ee.lockedSandbox):null,ve=Nt(),De=jt(be,ve.ready&&!ve.online),re=ee?.isThreadLocked?we:De,Ie=re?Ce[re]:null,l=Ie?.harness??null,p=Ie?.sandbox??null,[E,_]=x.useState(void 0),m=x.useRef(E);m.current=E;const S={selectedModel:G,setModel:()=>{},credentialId:D,setCredentialId:y,allModelsConnections:I,isModelsLoading:B,selectedVirtualMcp:Te,imageModel:z,setImageModel:c=>{a(c?.keyId?{keyId:c.keyId,modelId:c.modelId}:null)},webSearchModel:W,setWebSearchModel:c=>{r(c?.keyId?{keyId:c.keyId,modelId:c.modelId}:null)},deepResearchModel:A,setDeepResearchModel:c=>{u(c?.keyId?{keyId:c.keyId,modelId:c.modelId}:null)},chatMode:v,setChatMode:w,appContexts:ye,setAppContext:Se,clearAppContext:fe,tiptapDoc:E,setTiptapDoc:_,tiptapDocRef:m,resetInteraction:()=>{},simpleModeTier:j,setSimpleModeTier:c=>H(c),pendingAgentOption:re,setPendingAgentOption:oe,pendingHarnessId:l,pendingSandboxProviderKind:p};return V.jsx(Pe.Provider,{value:S,children:t})}function $n(t){const e=ae.c(39),{virtualMcpId:n,task:s,children:a}=t,{locator:o}=Z(),{data:r}=at.useSession(),i=r?.user??null,{taskId:u,virtualMcpId:d,navigateToTask:y}=Ge(),[v]=ot(),{markTaskRead:w}=Wt(),g=ft(),$=u,H=d,j=Qt(H);let I;e[0]!==w||e[1]!==y?(I=(k,q)=>{w(k),y(k,{virtualMcpId:q?.virtualMcpId,autosend:q?.autosend})},e[0]=w,e[1]=y,e[2]=I):I=e[2];const C=I,D=$&&s?.id===$?s:null,O=D?.harness_id??null,M=D?.sandbox_provider_kind??null,U=D?.branch??null,Y=O!=null,J=U;let L;e[3]!==C||e[4]!==g||e[5]!==n?(L=()=>{const k=crypto.randomUUID();return g.create({id:k,virtual_mcp_id:n}).then(()=>C(k)).catch(()=>{C(k)}),k},e[3]=C,e[4]=g,e[5]=n,e[6]=L):L=e[6];const G=L;let B;e[7]!==o||e[8]!==C||e[9]!==g||e[10]!==n?(B=k=>{const q=crypto.randomUUID(),A=k.virtualMcpId??n;lt(sessionStorage,o,q,k.message),g.create({id:q,virtual_mcp_id:A}).then(()=>C(q,{virtualMcpId:k.virtualMcpId,autosend:!0})).catch(()=>{C(q,{virtualMcpId:k.virtualMcpId,autosend:!0})})},e[7]=o,e[8]=C,e[9]=g,e[10]=n,e[11]=B):B=e[11];const Q=B;let N;e[12]!==$||e[13]!==g?(N=k=>{$&&g.setBranch($,k)},e[12]=$,e[13]=g,e[14]=N):N=e[14];let z;e[15]!==D||e[16]!==G||e[17]!==Q||e[18]!==J||e[19]!==$||e[20]!==H||e[21]!==Y||e[22]!==U||e[23]!==O||e[24]!==M||e[25]!==C||e[26]!==N?(z={virtualMcpId:H,taskId:$,openTask:C,createTask:G,createTaskWithMessage:Q,activeTask:D,isThreadLocked:Y,lockedHarness:O,lockedSandbox:M,lockedBranch:U,currentBranch:J,setCurrentTaskBranch:N},e[15]=D,e[16]=G,e[17]=Q,e[18]=J,e[19]=$,e[20]=H,e[21]=Y,e[22]=U,e[23]=O,e[24]=M,e[25]=C,e[26]=N,e[27]=z):z=e[27];const f=z;let P;e[28]!==j||e[29]!==v||e[30]!==y||e[31]!==i?(P={user:i,contextPrompt:j,preferences:v,rawNavigateToTask:y},e[28]=j,e[29]=v,e[30]=y,e[31]=i,e[32]=P):P=e[32];const K=P;let W;e[33]!==a||e[34]!==K?(W=V.jsx(un,{children:V.jsx(Ze.Provider,{value:K,children:a})}),e[33]=a,e[34]=K,e[35]=W):W=e[35];let F;return e[36]!==W||e[37]!==f?(F=V.jsx($e.Provider,{value:f,children:W}),e[36]=W,e[37]=f,e[38]=F):F=e[38],F}function Pn({taskId:t,children:e}){const n=Me(),{virtualMcpId:s,activeTask:a,currentBranch:o}=pn();t&&!qe.has(t)&&(qe.add(t),st("chat_opened",{thread_id:t}));const{imageModel:r,webSearchModel:i,deepResearchModel:u,chatMode:d,setChatMode:y,appContexts:v,setTiptapDoc:w,simpleModeTier:g,pendingSandboxProviderKind:$,pendingHarnessId:H}=fn(),j=x.useContext(Ze);if(!j)throw new Error(n("chat.chatContext.activeTaskProviderMissingContext"));const{user:I,contextPrompt:C,preferences:D,rawNavigateToTask:O}=j,{org:M,locator:U}=Z(),Y=an(),[J,L]=x.useState(null),G=Kt(),B=Ue(),Q=ut(),N=Qe(),z=gt({connectionId:yt,orgId:M.id,orgSlug:M.slug}),f=pt(M.slug,t,{client:z});x.use(f.ready);const P=le(f.messages),K=le(f.status),W=le(f.finishReason),F=le(f.runStatusStage),k=le(f.hasMoreOlder),q=le(f.isFetchingOlder),A=x.useRef({onToolCall:G,queryClient:B,rawNavigateToTask:O,taskId:t,manager:Q,navigate:N,orgId:M.id,orgSlug:M.slug});A.current={onToolCall:G,queryClient:B,rawNavigateToTask:O,taskId:t,manager:Q,navigate:N,orgId:M.id,orgSlug:M.slug},Mt({orgSlug:M.slug,taskId:t,onTaskStatus:l=>{const p=A.current,E=l.data.message_id;if(l.data.status==="in_progress"&&E){Ee(p.taskId,E);const _=sn(p.taskId,E);_&&f.applyLocalMessage(_),X(p.orgSlug,p.taskId)}Jt(p.taskId)&&(async()=>(await X(p.orgSlug,p.taskId),await f.reconcileFromServer()&&me(p.taskId).get().length===0&&en(p.taskId)))()}}),x.useEffect(()=>{const l={onData:m=>{if(m.type==="data-thread-title"){const S=m.data;if(!S?.title)return;const c=A.current;if(!c.taskId)return;c.manager.patchThread({id:c.taskId,title:S.title,updated_at:new Date().toISOString()});return}if(m.type==="data-deck-updated"){const S=m.data;if(!S?.path)return;const c=S.path,h=A.current;h.queryClient.invalidateQueries({queryKey:pe.orgFsStat(h.orgId,"home",c)}),h.queryClient.invalidateQueries({queryKey:pe.orgFsRecent(h.orgId)}),h.navigate({to:".",search:R=>({...R,main:kt(c)}),replace:!0});return}if(m.type==="data-open-preview"){const S=m.data,c=A.current,h=c.taskId;if(h){const R=c.manager.threads.get().find(T=>T.id===h);c.manager.patchThread({id:h,...S?.branch?{branch:S.branch}:{},...S?.sandboxProviderKind?{sandbox_provider_kind:S.sandboxProviderKind}:{},metadata:{...R?.metadata??{},...S?.githubRepo?{githubRepo:S.githubRepo}:{},...S?.sandboxMap?{sandboxMap:S.sandboxMap}:{}}})}c.navigate({to:".",search:R=>({...R,main:"preview"}),replace:!0});return}},onFinish:(m,S,c)=>{const h=A.current;h.taskId&&X(h.orgSlug,h.taskId),h.taskId&&h.manager.patchThread({id:h.taskId,status:Ft(c,m.parts),updated_at:new Date().toISOString()});const R=m.parts?.some(b=>{const ie=b;return(ie.type==="tool-share_with_user"||ie.type==="tool-bash"||ie.type==="tool-write")&&ie.state==="output-available"});if(h.taskId&&R){const b=pe.threadOutputs(h.taskId);for(const ie of[0,1500,3e3,6e3,12e3,25e3])setTimeout(()=>{h.queryClient.invalidateQueries({queryKey:b})},ie)}h.queryClient.invalidateQueries({queryKey:pe.homeNextActions(h.orgSlug)});const T=m.metadata?.thread_id;T&&T!==h.taskId&&h.rawNavigateToTask(T)},onError:m=>{L(m),console.error("[chat] Error",m)},onToolCall:m=>A.current.onToolCall(m)};f.observer=l,X(A.current.orgSlug,A.current.taskId);const p=m=>m==="submitted"||m==="streaming";let E=p(f.status.get().kind);const _=f.status.subscribe(()=>{const m=p(f.status.get().kind);if(m===E)return;E=m;const S=A.current;X(S.orgSlug,S.taskId)});return()=>{f.observer===l&&(f.observer=null),_()}},[f]);const ge=K.kind==="submitted"||K.kind==="streaming",Te=P.length===0,ye=P.at(-1),xe=!ge&&ye?.role==="assistant"&&ye.parts.some(l=>"state"in l&&l.state==="approval-requested"),Se=a,fe=(Se?.status==="in_progress"||Se?.status==="expired")&&K.kind==="ready"&&P.length>0;async function be(l){const p=t,E=s,_=Object.entries(v),m=_.length>0?_.map(([T,b])=>`### App Context: ${T}
|
|
32
32
|
${b}`).join(`
|
|
33
33
|
|
|
34
34
|
`):"",S=[C,m].filter(Boolean).join(`
|
|
35
35
|
|
|
36
|
-
`);let c=d;c==="gen-image"&&!r&&(c="default"),c==="web-search"&&!i&&(c="default"),c==="deep-research"&&!u&&(c="default"),(c==="web-search"||c==="deep-research")&&y("default");const h=Ut({thread:a?{harness_id:a.harness_id??null,sandbox_provider_kind:a.sandbox_provider_kind??null,branch:a.branch??null}:null,globals:{harnessId:H??void 0,sandboxProviderKind:$??void 0,branch:o}});a?.harness_id||Q.patchThread({id:p,harness_id:h.harnessId??"decopilot",sandbox_provider_kind:h.sandboxProviderKind??null,updated_at:new Date().toISOString()});const R={tier:g,mode:c,toolApprovalLevel:D.toolApprovalLevel??rt(),system:S||void 0,agent:{id:E},thread_id:p,...h};try{if(ge||fe){let T=!0;try{nn(p,l),await f.enqueue(l,R),Xe(p,{workflowId:`thread-run:${p}:${l.id}`,messageId:l.id,text:zt(l.parts),hasAttachments:l.parts.some(b=>b.type==="file"),status:"queued",enqueuedAt:Date.now(),optimistic:!0}),Yt(p)}catch(b){T=!1,
|
|
36
|
+
`);let c=d;c==="gen-image"&&!r&&(c="default"),c==="web-search"&&!i&&(c="default"),c==="deep-research"&&!u&&(c="default"),(c==="web-search"||c==="deep-research")&&y("default");const h=Ut({thread:a?{harness_id:a.harness_id??null,sandbox_provider_kind:a.sandbox_provider_kind??null,branch:a.branch??null}:null,globals:{harnessId:H??void 0,sandboxProviderKind:$??void 0,branch:o}});a?.harness_id||Q.patchThread({id:p,harness_id:h.harnessId??"decopilot",sandbox_provider_kind:h.sandboxProviderKind??null,updated_at:new Date().toISOString()});const R={tier:g,mode:c,toolApprovalLevel:D.toolApprovalLevel??rt(),system:S||void 0,agent:{id:E},thread_id:p,...h};try{if(ge||fe){let T=!0;try{nn(p,l),await f.enqueue(l,R),Xe(p,{workflowId:`thread-run:${p}:${l.id}`,messageId:l.id,text:zt(l.parts),hasAttachments:l.parts.some(b=>b.type==="file"),status:"queued",enqueuedAt:Date.now(),optimistic:!0}),Yt(p)}catch(b){T=!1,Fe(p,l.id),Ee(p,l.id),L(b instanceof Error?b:new Error(String(b))),se.error(b instanceof Error?b.message:n("chat.chatContext.failedToQueueMessage"))}return X(M.slug,p),T}return await f.submit({kind:"message",message:l},R),!0}finally{ne.delete(p)}}async function oe(l){const p=l.parts??ze(l.tiptapDoc);if(p.length===0||ne.has(t))return;ne.add(t),L(null),w(void 0);const E={tiptapDoc:l.tiptapDoc,created_at:new Date().toISOString(),user:{avatar:I?.image??void 0,name:I?.name??"you"}},_={id:crypto.randomUUID(),role:"user",parts:p,metadata:E};await be(_)}async function ee(l,p){if(ne.has(t))return se.info(n("chat.chatContext.stillSendingPreviousMessage")),!1;if(ne.add(t),!await Y.cancel(t,l))return ne.delete(t),se.error(n("chat.chatContext.couldNotRemoveOriginalMessage")),!1;Fe(t,l),f.removeLocalMessage(l);const _={id:crypto.randomUUID(),role:"user",parts:[{type:"text",text:p}],metadata:{created_at:new Date().toISOString(),user:{avatar:I?.image??void 0,name:I?.name??"you"}}};try{return await be(_)}catch(m){return se.error(m instanceof Error?m.message:n("chat.chatContext.failedToSendEditedMessage")),!1}}const we=async()=>{f.stop();try{const l=await fetch(`/api/${M.slug}/decopilot/cancel/${t}`,{method:"POST",credentials:"include"});if(l.status===404)return;if(!l.ok){const p=await l.json().catch(()=>({}));throw new Error(p.message??n("chat.chatContext.cancelFailedStatus",{status:l.status}))}}catch(l){const p=l instanceof Error?l.message:n("chat.chatContext.failedToCancel");se.error(p),console.error("[chat] cancelRun",l)}},ve=l=>l&&typeof l=="object"&&"type"in l?oe({tiptapDoc:l}):oe(l),re=Ae({strict:!1}).autosend===Ke;x.useEffect(()=>{if(!re||P.length>0)return;const l=it(sessionStorage,U,t);l&&oe(l.message).then(()=>{ct(sessionStorage,U,t)})},[re,P.length,U,t,oe]);const Ie={messages:P,status:cn(K),sendMessage:ve,editQueuedMessage:ee,stop:()=>{we()},submit:(l,p)=>f.submit(l,p),removeLocalMessage:l=>f.removeLocalMessage(l),isSendInFlight:()=>ne.has(t),error:J,clearError:()=>L(null),finishReason:W,runStatusStage:F,clearFinishReason:()=>f.finishReason.set(null),isStreaming:ge,isChatEmpty:Te,isWaitingForApprovals:xe??!1,isRunInProgress:fe,hasMoreOlder:k,isFetchingOlder:q,fetchOlderMessages:f.fetchOlderMessages.bind(f)};return V.jsx(Re.Provider,{value:Ie,children:e})}function Dn(){const t=Me(),e=x.useContext(Re);if(!e)throw new Error(t("chat.chatContext.useChatStreamMissingContext"));return e}function On(){return x.useContext(Re)}function pn(){const t=Me(),e=x.useContext($e);if(!e)throw new Error(t("chat.chatContext.useChatTaskMissingContext"));return e}function fn(){const t=Me(),e=x.useContext(Pe);if(!e)throw new Error(t("chat.chatContext.useChatPrefsMissingContext"));return e}function Ln(){return x.useContext(Pe)}function hn(){return x.useContext($e)}export{Pn as A,un as C,Tn as S,fn as a,Dn as b,hn as c,pn as d,Rn as e,an as f,Fe as g,On as h,$n as i,An as j,ze as k,Ge as l,Ln as m,Be as n,He as o,wn as p,Ot as q,_n as s,En as t,Nt as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as n,m as d,j as c,bD as l,bE as m}from"./index-
|
|
1
|
+
import{c as n,m as d,j as c,bD as l,bE as m}from"./index-QzdsfBYd.js";import{i as b}from"./Check-K9ygl0O6.js";function u(o){const e=n.c(9);let r,i;e[0]!==o?({className:r,...i}=o,e[0]=o,e[1]=r,e[2]=i):(r=e[1],i=e[2]);let a;e[3]!==r?(a=d("peer border-foreground dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/20 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[2px] disabled:opacity-50",r),e[3]=r,e[4]=a):a=e[4];let t;e[5]===Symbol.for("react.memo_cache_sentinel")?(t=c.jsx(m,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-primary-foreground transition-none",children:c.jsx(b,{className:"size-3.5"})}),e[5]=t):t=e[5];let s;return e[6]!==i||e[7]!==a?(s=c.jsx(l,{"data-slot":"checkbox",className:a,...i,children:t}),e[6]=i,e[7]=a,e[8]=s):s=e[8],s}export{u as C};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as a,a as c,r as m,j as o}from"./index-
|
|
1
|
+
import{c as a,a as c,r as m,j as o}from"./index-QzdsfBYd.js";import{A as u}from"./auth-split-layout-DBnc8xhv.js";function p(){const e=a.c(8),i=c.useSession().data?.user?.email;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=[],e[0]=l):l=e[0],m.useEffect(f,l);let t;e[1]!==i?(t=i?o.jsxs(o.Fragment,{children:[" as ",i]}):"",e[1]=i,e[2]=t):t=e[2];let s;e[3]!==t?(s=o.jsxs("h1",{className:"text-3xl font-semibold tracking-tight",children:["You're logged in",t,"."]}),e[3]=t,e[4]=s):s=e[4];let n;e[5]===Symbol.for("react.memo_cache_sentinel")?(n=o.jsx("p",{className:"text-muted-foreground",children:"You can return to your terminal."}),e[5]=n):n=e[5];let r;return e[6]!==s?(r=o.jsx(u,{children:o.jsxs("div",{className:"space-y-3",children:[s,n]})}),e[6]=s,e[7]=r):r=e[7],r}function f(){window.close()}export{p as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as k,j as t,B as K,k as oe,W as Ye,X as re,b as Q,E as Ee,r as E,F as fe,bb as Ze,bc as Oe,Z as Ge,m as W,bd as et,u as tt,L as te,t as st,f as he,a$ as Re}from"./index-DLFjA-pm.js";import{E as Fe}from"./empty-state-f3NNQ1ui.js";import{u as ge}from"./use-mcp-client-Cu-eLUiE.js";import{F as ae,a as lt,b as ce,d as de}from"./form-DvszbWzu.js";import{I as pe}from"./input-CYZckS5J.js";import{T as xe}from"./textarea-Dr__cCCA.js";import{a as ot,b as nt,V as je,O as it,M as rt}from"./index-zRP9V9Rq.js";import{aA as at,S as ct,aB as dt,_ as mt,a8 as ut,aC as pt,a1 as ye}from"./agent-icon-BZhgfhdU.js";import{g as xt,M as ft,a as we}from"./index-DwaHcKY7.js";import{A as ht,a as gt,b as jt}from"./alert-DooiWR2A.js";import{S as Ce,a as Ie,b as $e,c as Te,d as me}from"./select-C4Yh3I_I.js";import{b as bt,c as Pe,T as ke,a as Ae}from"./tooltip-DMRr_d0y.js";import{i as Nt}from"./AlertCircle-OzZiRcN4.js";import{s as vt}from"./Stars02-DfuXiu3-.js";import{a as St}from"./Copy01-2Oyl2xhw.js";import{i as yt}from"./Play-BQfux-g7.js";import{i as wt}from"./ChevronRight--wVf7uGf.js";import{g as Ct}from"./connection-slug-eyAPH6o3.js";import{u as It,T as $t}from"./use-mcp-auth-status-DjzGZ1ej.js";import{a as ze,u as Me}from"./use-connection-iKR4DAK5.js";import{a as Tt}from"./use-mcp-tools-DS3ivkR4.js";import{M as Pt,c as kt}from"./monaco-editor-Cj3yPb4I.js";import{I as De}from"./integration-icon-EcNPoJWr.js";import{h as At,m as Dt}from"./chat-context-BjgR1MKj.js";import{u as Et}from"./shell-layout-Bwrf-bDx.js";import{n as Ot}from"./Tool02-DNB1gZ9p.js";import"./auth-BgXJQGvH.js";import"./label-EdLaI-5R.js";import"./index-B__oKxRn.js";import"./sidebar-BXTMhX7B.js";import"./LayoutLeft-YhbkIV5-.js";import"./use-mobile-F9kT_Idr.js";import"./X-CkADyhqE.js";import"./ZoomOut-C1FPWq-p.js";import"./Key01-COjK9kAq.js";import"./extract-connection-data-ekCc1hnU.js";import"./use-registry-connections-DZLuPfih.js";import"./use-organization-settings-DzM8_ele.js";import"./studio-tools-z2MoKuxB.js";import"./Plus-0lhw9kgX.js";import"./index-qFEnr-Eg.js";import"./popover-CJG9G1eo.js";import"./use-virtual-mcp-DiaCfMBV.js";import"./Check-C9Hy68pG.js";import"./SearchMd-DU09j0yH.js";import"./Users03-B_epF-ec.js";import"./use-create-virtual-mcp-CGf9WQKr.js";import"./use-navigate-to-agent-BW0Lbp2M.js";import"./hooks-DZ2G0HBV.js";import"./decopilot-sse-pool-B7H8BAsy.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./reusable-new-chat-CouMjkYR.js";import"./Tool01-B1EOI3tm.js";import"./ArrowUp-DKOgR0xL.js";import"./Settings02-DQ4GSu-t.js";import"./ArrowRight-BTqt321d.js";import"./ArrowUpRight-CvwJB6OK.js";import"./TrendUp01-CKe9YInp.js";import"./ZapSquare-ixKz1MO4.js";import"./CheckCircle-6cj-Xwhi.js";import"./ChevronDown-CZIAcwGV.js";import"./ChevronUp-CsSKaqS5.js";import"./DotsVertical-c-_wCTgn.js";import"./Globe01-CDWygr27.js";import"./Eye-D81BWda-.js";import"./FilterLines-D73LV27Z.js";import"./Star01-KC9BvNup.js";import"./Globe04-D4m747kU.js";import"./SwitchHorizontal01-vm3X2ReA.js";import"./HardDrive-zpDb2j2L.js";import"./Image01--bBQuOXb.js";import"./XCircle-C1PO7Xjh.js";import"./LinkExternal01-D_Zvma4v.js";import"./LogOut01-DWjWz0Vk.js";import"./Monitor01-RMk_Hy33.js";import"./Sun-C8Rt6Ua0.js";import"./Package-KX2QCXEp.js";import"./Palette-BUK1fohV.js";import"./SearchLg-D5zWzyl-.js";import"./Shield01-CfcJULbp.js";import"./Stars01-BS-Qws6o.js";import"./Trash01-DWauVxmg.js";import"./Upload01-Jx7sveIV.js";import"./User01-DOzH65Yj.js";import"./Users01-Bl3Cipzb.js";import"./XClose-C6Z74Mtu.js";import"./Zap-crfeCyH5.js";import"./badge-BP3RfcAV.js";import"./mcp-oauth-DhsKmk5n.js";import"./index-BoUF-4pL.js";import"./autosend-DMw4eplP.js";import"./use-ai-providers-BIphh0fq.js";import"./location-BpLtHjTZ.js";import"./tab-id-BijBBRwE.js";import"./use-decopilot-events-C1fzpsy-.js";import"./avatar-DOKisfmu.js";import"./dialog-B-PFEu8t.js";import"./required-auth-layout-IpGhD1Lv.js";import"./use-org-sso-Dt3zVq13.js";function Rt(s){const e=k.c(15),{onSave:n,onUndo:l,isDirty:o,isSaving:i,saveLabel:r,undoLabel:c}=s,d=r===void 0?"Save":r,a=c===void 0?"Undo":c;if(!o)return null;let x;e[0]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx(at,{size:14}),e[0]=x):x=e[0];let h;e[1]!==i||e[2]!==l||e[3]!==a?(h=t.jsxs(K,{variant:"outline",size:"sm",onClick:l,disabled:i,"aria-label":a,children:[x,a]}),e[1]=i,e[2]=l,e[3]=a,e[4]=h):h=e[4];let m;e[5]!==i?(m=i?t.jsx(oe,{size:14,className:"animate-spin"}):t.jsx(ct,{size:14}),e[5]=i,e[6]=m):m=e[6];let f;e[7]!==i||e[8]!==n||e[9]!==d||e[10]!==m?(f=t.jsxs(K,{variant:"default",size:"sm",onClick:n,disabled:i,"aria-label":d,children:[m,d]}),e[7]=i,e[8]=n,e[9]=d,e[10]=m,e[11]=f):f=e[11];let p;return e[12]!==h||e[13]!==f?(p=t.jsxs(t.Fragment,{children:[h,f]}),e[12]=h,e[13]=f,e[14]=p):p=e[14],p}Ye({title:re().min(1),description:re().nullable(),body:re()});function ue(s){for(const e of s.messages??[])if(e.role==="user"&&e.content?.type==="text")return e.content.text??"";return""}function Ft(){const s=window.location.pathname.split("/").filter(Boolean),e=s.findIndex(l=>l==="mcps"),n=e>=0?s[e+1]:void 0;return n?decodeURIComponent(n):void 0}function zt(s){const e=k.c(43),{form:n}=s,l=Q();let o;e[0]!==l?(o=l("details.prompt.details"),e[0]=l,e[1]=o):o=e[1];let i;e[2]!==o?(i=t.jsx("div",{className:"text-sm font-medium text-foreground",children:o}),e[2]=o,e[3]=i):i=e[3];let r;e[4]!==l?(r=w=>{const{field:N}=w;return t.jsxs(ce,{children:[t.jsx("div",{className:"text-xs text-muted-foreground",children:l("details.prompt.title")}),t.jsx(de,{children:t.jsx(pe,{...N,placeholder:l("details.prompt.titlePlaceholder"),className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})},e[4]=l,e[5]=r):r=e[5];let c;e[6]!==n.control||e[7]!==r?(c=t.jsx(ae,{control:n.control,name:"title",render:r}),e[6]=n.control,e[7]=r,e[8]=c):c=e[8];let d;e[9]!==l?(d=w=>{const{field:N}=w;return t.jsxs(ce,{children:[t.jsx("div",{className:"text-xs text-muted-foreground",children:l("details.prompt.description")}),t.jsx(de,{children:t.jsx(pe,{...N,value:N.value??"",placeholder:l("details.prompt.descriptionPlaceholder"),className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})},e[9]=l,e[10]=d):d=e[10];let a;e[11]!==n.control||e[12]!==d?(a=t.jsx(ae,{control:n.control,name:"description",render:d}),e[11]=n.control,e[12]=d,e[13]=a):a=e[13];let x;e[14]!==c||e[15]!==a?(x=t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[c,a]}),e[14]=c,e[15]=a,e[16]=x):x=e[16];let h;e[17]!==i||e[18]!==x?(h=t.jsxs("div",{className:"flex flex-col gap-4",children:[i,x]}),e[17]=i,e[18]=x,e[19]=h):h=e[19];let m;e[20]!==l?(m=l("details.prompt.message"),e[20]=l,e[21]=m):m=e[21];let f;e[22]!==m?(f=t.jsx("div",{className:"text-sm font-medium text-foreground",children:m}),e[22]=m,e[23]=f):f=e[23];let p;e[24]!==l?(p=l("details.prompt.messageDescription"),e[24]=l,e[25]=p):p=e[25];let g;e[26]!==p?(g=t.jsx("div",{className:"text-xs text-muted-foreground",children:p}),e[26]=p,e[27]=g):g=e[27];let b;e[28]!==l?(b=w=>{const{field:N}=w;return t.jsx(ce,{children:t.jsx(de,{children:t.jsx(xe,{...N,value:N.value??"",placeholder:l("details.prompt.bodyPlaceholder"),className:"min-h-[240px] resize-none text-base leading-relaxed font-normal rounded-xl border border-border bg-muted/20 px-4 py-3 shadow-none focus-visible:ring-0"})})})},e[28]=l,e[29]=b):b=e[29];let S;e[30]!==n.control||e[31]!==b?(S=t.jsx(ae,{control:n.control,name:"body",render:b}),e[30]=n.control,e[31]=b,e[32]=S):S=e[32];let T;e[33]!==f||e[34]!==g||e[35]!==S?(T=t.jsxs("div",{className:"flex flex-col gap-2",children:[f,g,S]}),e[33]=f,e[34]=g,e[35]=S,e[36]=T):T=e[36];let y;e[37]!==T||e[38]!==h?(y=t.jsxs("div",{className:"h-full py-6 flex flex-col max-w-3xl mx-auto w-full min-w-0 gap-8 overflow-y-auto px-4",children:[h,T]}),e[37]=T,e[38]=h,e[39]=y):y=e[39];let P;return e[40]!==n||e[41]!==y?(P=t.jsx(lt,{...n,children:y}),e[40]=n,e[41]=y,e[42]=P):P=e[42],P}function Mt(s){const e=k.c(42),{providerId:n,promptId:l}=s,o=Q(),{org:i}=fe(),r=n||null;let c;e[0]!==i.id||e[1]!==i.slug||e[2]!==r?(c={connectionId:r,orgId:i.id,orgSlug:i.slug},e[0]=i.id,e[1]=i.slug,e[2]=r,e[3]=c):c=e[3];const d=ge(c),a=Ze(n,"PROMPT",l,d),x=Oe(n,"PROMPT",d),h=x.update.isPending;let m;e[4]!==a?(m=a?{title:a.title,description:a.description??null,body:ue(a)}:void 0,e[4]=a,e[5]=m):m=e[5];let f;e[6]!==m?(f={values:m},e[6]=m,e[7]=f):f=e[7];const p=Ge(f);let g;e[8]!==p||e[9]!==a?(g=()=>{a&&p.reset({title:a.title,description:a.description??null,body:ue(a)})},e[8]=p,e[9]=a,e[10]=g):g=e[10];const b=g;let S;e[11]!==x.update||e[12]!==p||e[13]!==l?(S=p.handleSubmit(async C=>{const I=await x.update.mutateAsync({id:l,data:{title:C.title,description:C.description,arguments:[],icons:[],messages:[{role:"user",content:{type:"text",text:C.body}}]}});p.reset({title:I.title,description:I.description??null,body:ue(I)})}),e[11]=x.update,e[12]=p,e[13]=l,e[14]=S):S=e[14];const T=S;if(!a){let C;e[15]!==o?(C=o("details.prompt.notFoundTitle"),e[15]=o,e[16]=C):C=e[16];let I;e[17]!==o?(I=o("details.prompt.notFoundDescription"),e[17]=o,e[18]=I):I=e[18];let R;return e[19]!==C||e[20]!==I?(R=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Fe,{title:C,description:I})}),e[19]=C,e[20]=I,e[21]=R):R=e[21],R}let y;e[22]!==a.title?(y=t.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:a.title}),e[22]=a.title,e[23]=y):y=e[23];let P;e[24]!==a.description?(P=a.description?t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"text-xs text-muted-foreground font-normal",children:"•"}),t.jsx("span",{className:"text-xs text-muted-foreground font-normal truncate min-w-0 max-w-[20ch]",children:a.description})]}):null,e[24]=a.description,e[25]=P):P=e[25];let w;e[26]!==y||e[27]!==P?(w=t.jsx(nt,{children:t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[y,P]})}),e[26]=y,e[27]=P,e[28]=w):w=e[28];let N;e[29]!==T?(N=()=>{T()},e[29]=T,e[30]=N):N=e[30];let A;e[31]!==p.formState.isDirty||e[32]!==h||e[33]!==b||e[34]!==N?(A=t.jsx(ot,{children:t.jsx(Rt,{onSave:N,onUndo:b,isDirty:p.formState.isDirty,isSaving:h})}),e[31]=p.formState.isDirty,e[32]=h,e[33]=b,e[34]=N,e[35]=A):A=e[35];let D;e[36]!==p?(D=t.jsx("div",{className:"h-full",children:t.jsx(zt,{form:p})}),e[36]=p,e[37]=D):D=e[37];let O;return e[38]!==A||e[39]!==D||e[40]!==w?(O=t.jsxs(je,{children:[w,A,D]}),e[38]=A,e[39]=D,e[40]=w,e[41]=O):O=e[41],O}function Lt(s){const e=k.c(10),{itemId:n}=s,l=Q();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=Ft(),e[0]=o):o=e[0];const i=o;if(!i){let c;e[1]!==l?(c=l("details.prompt.notFoundTitle"),e[1]=l,e[2]=c):c=e[2];let d;e[3]!==l?(d=l("details.prompt.missingConnectionDescription"),e[3]=l,e[4]=d):d=e[4];let a;return e[5]!==c||e[6]!==d?(a=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Fe,{title:c,description:d})}),e[5]=c,e[6]=d,e[7]=a):a=e[7],a}let r;return e[8]!==n?(r=t.jsx(Ee,{children:t.jsx(E.Suspense,{fallback:null,children:t.jsx(Mt,{providerId:i,promptId:n})})}),e[8]=n,e[9]=r):r=e[9],r}function Le(s){const e=k.c(8);let n,l;e[0]!==s?({className:n,...l}=s,e[0]=s,e[1]=n,e[2]=l):(n=e[1],l=e[2]);let o;e[3]!==n?(o=W("min-w-0 overflow-hidden",n),e[3]=n,e[4]=o):o=e[4];let i;return e[5]!==l||e[6]!==o?(i=t.jsx("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",className:o,...l}),e[5]=l,e[6]=o,e[7]=i):i=e[7],i}function Be(s){const e=k.c(8);let n,l;e[0]!==s?({className:n,...l}=s,e[0]=s,e[1]=n,e[2]=l):(n=e[1],l=e[2]);let o;e[3]!==n?(o=W("flex items-center gap-1.5 text-sm sm:gap-2 overflow-hidden",n),e[3]=n,e[4]=o):o=e[4];let i;return e[5]!==l||e[6]!==o?(i=t.jsx("ol",{"data-slot":"breadcrumb-list",className:o,...l}),e[5]=l,e[6]=o,e[7]=i):i=e[7],i}function Y(s){const e=k.c(8);let n,l;e[0]!==s?({className:n,...l}=s,e[0]=s,e[1]=n,e[2]=l):(n=e[1],l=e[2]);let o;e[3]!==n?(o=W("inline-flex items-center gap-1.5 min-w-0",n),e[3]=n,e[4]=o):o=e[4];let i;return e[5]!==l||e[6]!==o?(i=t.jsx("li",{"data-slot":"breadcrumb-item",className:o,...l}),e[5]=l,e[6]=o,e[7]=i):i=e[7],i}function se(s){const e=k.c(10);let n,l,o;e[0]!==s?({asChild:n,className:l,...o}=s,e[0]=s,e[1]=n,e[2]=l,e[3]=o):(n=e[1],l=e[2],o=e[3]);const i=n?et:"a";let r;e[4]!==l?(r=W("hover:text-foreground transition-colors truncate",l),e[4]=l,e[5]=r):r=e[5];let c;return e[6]!==i||e[7]!==o||e[8]!==r?(c=t.jsx(i,{"data-slot":"breadcrumb-link",className:r,...o}),e[6]=i,e[7]=o,e[8]=r,e[9]=c):c=e[9],c}function Ue(s){const e=k.c(8);let n,l;e[0]!==s?({className:n,...l}=s,e[0]=s,e[1]=n,e[2]=l):(n=e[1],l=e[2]);let o;e[3]!==n?(o=W("text-foreground font-medium truncate",n),e[3]=n,e[4]=o):o=e[4];let i;return e[5]!==l||e[6]!==o?(i=t.jsx("span",{"data-slot":"breadcrumb-page",role:"link","aria-disabled":"true","aria-current":"page",className:o,...l}),e[5]=l,e[6]=o,e[7]=i):i=e[7],i}function le(s){const e=k.c(12);let n,l,o;e[0]!==s?({children:n,className:l,...o}=s,e[0]=s,e[1]=n,e[2]=l,e[3]=o):(n=e[1],l=e[2],o=e[3]);let i;e[4]!==l?(i=W("[&>svg]:size-3.5 text-muted-foreground opacity-50 list-none shrink-0",l),e[4]=l,e[5]=i):i=e[5];let r;e[6]!==n?(r=n??t.jsx(wt,{}),e[6]=n,e[7]=r):r=e[7];let c;return e[8]!==o||e[9]!==i||e[10]!==r?(c=t.jsx("li",{"data-slot":"breadcrumb-separator",role:"presentation","aria-hidden":"true",className:i,...o,children:r}),e[8]=o,e[9]=i,e[10]=r,e[11]=c):c=e[11],c}const Bt=s=>s.replace(/_/g," ").replace(/\b\w/g,e=>e.toLocaleLowerCase());function Ut(s){const e=k.c(12),{toolName:n,connectionId:l,siblings:o,onSelectInstance:i,onBack:r}=s,c=Q();let d;e[0]!==l?(d={connectionId:l},e[0]=l,e[1]=d):d=e[1];const a=It(d);if(!a.isAuthenticated){let m;return e[2]!==a.supportsOAuth||e[3]!==r||e[4]!==c?(m=t.jsx("div",{className:"flex h-full items-center justify-center",children:a.supportsOAuth?t.jsx(it,{onAuthenticate:()=>r(),buttonText:c("details.tool.goBackToAuthenticate")}):t.jsx(rt,{hasReadme:!1})}),e[2]=a.supportsOAuth,e[3]=r,e[4]=c,e[5]=m):m=e[5],m}const x=`${l}:${n}`;let h;return e[6]!==l||e[7]!==i||e[8]!==o||e[9]!==x||e[10]!==n?(h=t.jsx(Vt,{toolName:n,connectionId:l,siblings:o,onSelectInstance:i},x),e[6]=l,e[7]=i,e[8]=o,e[9]=x,e[10]=n,e[11]=h):h=e[11],h}function Vt({toolName:s,connectionId:e,siblings:n,onSelectInstance:l}){const o=Q(),{replayId:i}=tt({strict:!1}),r=(()=>{if(!i)return null;const u=`replay-${i}`,j=sessionStorage.getItem(u);if(!j)return null;sessionStorage.removeItem(u);try{return JSON.parse(j)}catch{return null}})(),c=(()=>{if(!r)return null;const u={};for(const[j,$]of Object.entries(r))$!==null&&typeof $=="object"?u[j]=JSON.stringify($,null,2):u[j]=$;return u})(),[d,a]=E.useState(c??{}),[x,h]=E.useState(r?JSON.stringify(r,null,2):"{}"),[m,f]=E.useState(null),[p,g]=E.useState(null),[b,S]=E.useState(null),[T,y]=E.useState(null),[P,w]=E.useState(!1),[N,A]=E.useState(null),{org:D}=fe(),O=ze(e),C=At(),I=Dt(),{openSidePanel:R}=Et(),U=`${e}:${s}`,z=ge({connectionId:e,orgId:D.id,orgSlug:D.slug}),V=Tt({client:z}),v=V.data?.tools?.find(u=>u.name===s),F=xt(v?._meta),J=u=>{if(!C)return;const j=kt(u.content);j.content.length>0&&(R("chat"),C.sendMessage({tiptapDoc:j}))},[M,L]=E.useState("json"),[q,X]=E.useState(!1);F&&!q&&(L("ui"),X(!0));const _=v?.inputSchema?.properties,be=_?Object.keys(_):[],Z=be.length>0,G={};if(Z&&v?.inputSchema?.properties)for(const u of be)G[u]=v.inputSchema.required?.includes(u)?"":void 0;const ne=u=>Object.prototype.hasOwnProperty.call(d,u),Ve=async()=>{w(!0),y(null),f(null),g(null),S(null),A(null);const u=performance.now();try{if(!z)throw new Error("MCP client is not available");const j=Z?{...G,...d}:(()=>{const B=x.trim();if(!B)return{};const H=JSON.parse(B);if(H&&typeof H=="object")return H;throw new Error("Raw JSON input must be an object.")})();Z&&v?.inputSchema?.properties&&Object.entries(v.inputSchema.properties).forEach(([B,H])=>{if((H.type==="object"||H.type==="array")&&typeof j[B]=="string")try{j[B]=JSON.parse(j[B])}catch{}else if((H.type==="number"||H.type==="integer")&&typeof j[B]=="string"&&j[B]!==""){const Se=Number(j[B]);Number.isNaN(Se)||(j[B]=Se)}});const $=await z.callTool({name:s,arguments:j}),ee=$.structuredContent??$,We=performance.now(),Qe=Math.round(We-u);f(ee),g($),S(j);const Xe=JSON.stringify(ee),ve=new TextEncoder().encode(Xe).length;A({duration:`${Qe}ms`,bytes:`${ve} bytes`,tokens:`~${Math.ceil(ve/4)} tokens`,cost:"$0.0000"})}catch(j){const $=j instanceof Error?j.message:String(j);y($||"Unknown error occurred");const ee=performance.now();A({duration:`${Math.round(ee-u)}ms`})}finally{w(!1)}},ie=(u,j)=>{a($=>({...$,[u]:j}))},_e=()=>{f(null),g(null),S(null),y(null),A(null)},Je=v?.name??Bt(s),qe=t.jsx(Le,{children:t.jsxs(Be,{children:[t.jsx(Y,{children:t.jsx(se,{asChild:!0,children:t.jsx(te,{to:"/$org/settings/connections",params:{org:D.slug},children:o("details.tool.connections")})})}),t.jsx(le,{}),O&&t.jsxs(t.Fragment,{children:[t.jsx(Y,{children:t.jsx(se,{asChild:!0,children:t.jsx(te,{to:"/$org/settings/connections/$appSlug",params:{org:D.slug,appSlug:Ct(O)},search:{tab:"tools"},children:O.title})})}),t.jsx(le,{})]}),t.jsx(Y,{children:t.jsx(Ue,{children:Je})})]})}),Ne=n.length>1&&t.jsxs(Ce,{value:e,onValueChange:l,children:[t.jsx(Ie,{className:"h-8 w-auto min-w-[200px]",children:t.jsx($e,{})}),t.jsx(Te,{children:n.map(u=>t.jsx(me,{value:u.id,children:t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(De,{icon:u.icon,name:u.title,size:"xs",className:"shrink-0"}),u.title]})},u.id))})]}),He=t.jsxs("div",{className:"flex flex-col p-6 gap-4 overflow-auto",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("h2",{className:"text-sm font-semibold text-foreground uppercase tracking-wide",children:o("details.tool.parameters")}),v?.inputSchema?.required&&v.inputSchema.required.length>0&&t.jsxs("span",{className:"text-xs text-muted-foreground",children:[t.jsx("span",{className:"text-destructive",children:"*"})," ",o("details.tool.required")]})]}),t.jsx("div",{className:"space-y-4",children:Z&&v?.inputSchema?.properties?Object.entries(v.inputSchema.properties).map(([u,j])=>t.jsxs("div",{className:"space-y-2",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("label",{className:"text-sm font-medium leading-none flex items-center gap-1.5",children:[u,v.inputSchema?.required?.includes(u)&&t.jsx("span",{className:"text-destructive text-xs",children:"*"})]}),t.jsx("span",{className:"text-xs text-muted-foreground font-mono",children:j.type})]}),j.description&&t.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:j.description}),j.type==="object"||j.type==="array"?t.jsx(xe,{className:"font-mono text-xs",value:ne(u)?d[u]??"":G[u]??"",onChange:$=>ie(u,$.target.value),placeholder:o("details.tool.enterAsJson",{key:u}),rows:3}):j.type==="boolean"?t.jsxs(Ce,{value:ne(u)?String(d[u]??""):"",onValueChange:$=>ie(u,$==="true"),children:[t.jsx(Ie,{children:t.jsx($e,{placeholder:o("details.tool.selectTrueOrFalse")})}),t.jsxs(Te,{children:[t.jsx(me,{value:"true",children:"true"}),t.jsx(me,{value:"false",children:"false"})]})]}):t.jsx(pe,{value:ne(u)?d[u]??"":G[u]??"",onChange:$=>ie(u,$.target.value),placeholder:o("details.tool.enter",{key:u})})]},u)):v?.inputSchema&&!Z?t.jsxs("div",{className:"space-y-2",children:[t.jsx("label",{className:"text-sm font-medium",children:o("details.tool.rawJsonInput")}),t.jsx(xe,{className:"font-mono text-xs min-h-[120px]",value:x,onChange:u=>h(u.target.value),placeholder:o("details.tool.rawJsonExample")})]}):t.jsx("div",{className:"flex items-center justify-center p-8 bg-muted/30 rounded-lg border border-dashed border-border",children:t.jsx("p",{className:"text-sm text-muted-foreground",children:o("details.tool.noParametersRequired")})})}),t.jsx("div",{className:"flex items-center gap-2 pt-2",children:P?t.jsxs(K,{size:"sm",variant:"destructive",className:"h-8 gap-2",onClick:_e,children:[t.jsx(dt,{className:"h-3.5 w-3.5"}),o("details.tool.cancel")]}):t.jsxs(K,{size:"sm",variant:"default",className:"h-8 gap-2",onClick:Ve,children:[t.jsx(yt,{className:"h-3.5 w-3.5 fill-current"}),o("details.tool.executeTool")]})})]}),Ke=t.jsxs("div",{className:"flex flex-col @3xl:h-full @3xl:overflow-hidden",children:[t.jsxs("div",{className:"flex items-center justify-between px-4 h-14 border-b border-border bg-background",children:[t.jsx("h2",{className:"text-sm font-medium text-foreground uppercase tracking-wide",children:o("details.tool.result")}),t.jsxs("div",{className:"flex items-center gap-3",children:[N&&t.jsxs("div",{className:"flex items-center gap-3 text-xs",children:[t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(vt,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:N.duration})]}),N.tokens&&t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(mt,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:N.tokens})]}),N.bytes&&t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(ut,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:N.bytes})]}),N.cost&&t.jsx("div",{className:"flex items-center gap-1.5",children:t.jsx("span",{className:"font-mono text-foreground",children:N.cost})})]}),F&&t.jsx(bt,{children:t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsxs(Pe,{children:[t.jsx(ke,{asChild:!0,children:t.jsx(K,{size:"icon",variant:M==="ui"?"secondary":"ghost",className:"h-8 w-8",onClick:()=>L("ui"),children:t.jsx(pt,{size:14})})}),t.jsx(Ae,{children:o("details.tool.interactiveView")})]}),t.jsxs(Pe,{children:[t.jsx(ke,{asChild:!0,children:t.jsx(K,{size:"icon",variant:M==="json"?"secondary":"ghost",className:"h-8 w-8",onClick:()=>L("json"),children:t.jsx(ye,{size:14})})}),t.jsx(Ae,{children:o("details.tool.jsonView")})]})]})})]})]}),T&&t.jsx("div",{className:"px-6 py-4 bg-background",children:t.jsx(ht,{variant:"destructive",children:t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(Nt,{className:"h-4 w-4"}),t.jsx(gt,{className:"mb-0",children:o("details.tool.executionFailed")})]}),t.jsx(jt,{className:"text-xs text-destructive",children:T})]})})}),t.jsx("div",{className:"relative flex-1 min-h-[400px] @3xl:min-h-0 @3xl:overflow-auto bg-muted/50",children:F&&M==="ui"&&z?t.jsx(E.Suspense,{fallback:t.jsx("div",{className:"flex items-center justify-center h-48",children:t.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[t.jsx("div",{className:"size-4 border-2 border-current border-t-transparent rounded-full animate-spin"}),t.jsx("span",{className:"text-sm",children:o("details.tool.loadingApp")})]})}),children:t.jsx(ft,{resourceURI:F,toolInfo:v?{tool:v}:void 0,toolInput:b??void 0,toolResult:p??void 0,displayMode:"fullscreen",minHeight:we.view.minHeight,maxHeight:we.view.maxHeight,client:z,onMessage:J,onUpdateModelContext:u=>I?.setAppContext(U,u),onTeardown:()=>I?.clearAppContext(U),className:"h-full"})}):m?t.jsxs(t.Fragment,{children:[t.jsx(Pt,{code:JSON.stringify(m,null,2),language:"json",height:"100%",readOnly:!0}),t.jsx(K,{size:"icon",variant:"ghost",className:"absolute top-4 right-4 h-8 w-8 bg-background/80 hover:bg-background border border-border shadow-sm",onClick:()=>{navigator.clipboard.writeText(JSON.stringify(m,null,2)),st.success(o("details.tool.copiedToClipboard"))},children:t.jsx(St,{className:"h-3.5 w-3.5"})})]}):t.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center text-muted-foreground",children:[t.jsx(ye,{className:"h-12 w-12 mb-3 opacity-40"}),t.jsx("p",{className:"text-sm",children:o("details.tool.runToolToSeeResults")})]})})]});return t.jsx(je,{breadcrumb:qe,children:t.jsxs("div",{className:"flex flex-col h-full overflow-hidden @container",children:[t.jsxs("div",{className:"flex flex-col gap-3 py-7 px-8 bg-background border-b border-border shrink-0",children:[t.jsxs("div",{className:"flex items-center gap-4",children:[t.jsx(De,{icon:O?.icon||null,name:O?.title||s,size:"xl",className:"shrink-0"}),t.jsx("h1",{className:"text-xl font-semibold tracking-tight text-foreground leading-none truncate",children:s}),t.jsxs("div",{className:"flex items-center gap-2 px-2.5 py-1 bg-muted/50 rounded-md h-fit shrink-0",children:[V.isSuccess?t.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-success animate-pulse shrink-0"}):V.isLoading?t.jsx(oe,{size:10,className:"animate-spin text-warning shrink-0"}):t.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-destructive shrink-0"}),t.jsx("span",{className:"font-mono text-xs capitalize text-muted-foreground leading-none",children:V.isSuccess?"ready":V.isLoading?"connecting":"error"})]}),t.jsx($t,{annotations:v?.annotations,_meta:v?._meta}),t.jsx("div",{className:"hidden @3xl:flex items-center ml-auto shrink-0",children:Ne})]}),t.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:v?.description||"No description available"})]}),n.length>1&&t.jsxs("div",{className:"flex @3xl:hidden items-center gap-3 px-8 py-3 border-b border-border",children:[t.jsx("span",{className:"text-xs font-medium text-muted-foreground shrink-0",children:o("details.tool.instance")}),Ne]}),t.jsx("div",{className:"flex-1 overflow-auto @3xl:overflow-hidden",children:t.jsxs("div",{className:"grid grid-cols-1 @3xl:grid-cols-[minmax(0,2fr)_minmax(0,5fr)] @3xl:h-full @3xl:grid-rows-1",children:[t.jsx("div",{className:"@3xl:border-r border-border @3xl:overflow-auto",children:He}),Ke]})})]})})}function _t(s){const e=k.c(20),{itemId:n,siblings:l,onBack:o}=s,i=Q(),[r,c]=E.useState(l[0]?.id??"");let d;e[0]!==r||e[1]!==l?(d=l.find(f=>f.id===r)?.id??l[0]?.id??"",e[0]=r,e[1]=l,e[2]=d):d=e[2];const a=d;if(!ze(a||void 0)||!a){let f;e[3]!==i?(f=i("details.tool.connectionNotFound"),e[3]=i,e[4]=f):f=e[4];let p;e[5]!==f?(p=t.jsx("h3",{className:"text-lg font-semibold",children:f}),e[5]=f,e[6]=p):p=e[6];let g;e[7]!==i?(g=i("details.tool.connectionNotFoundMessage"),e[7]=i,e[8]=g):g=e[8];let b;e[9]!==g?(b=t.jsx("p",{className:"text-sm text-muted-foreground",children:g}),e[9]=g,e[10]=b):b=e[10];let S;return e[11]!==p||e[12]!==b?(S=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[p,b]})}),e[11]=p,e[12]=b,e[13]=S):S=e[13],S}let h;e[14]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(oe,{size:32,className:"animate-spin text-muted-foreground"})}),e[14]=h):h=e[14];let m;return e[15]!==a||e[16]!==o||e[17]!==l||e[18]!==n?(m=t.jsx(E.Suspense,{fallback:h,children:t.jsx(Ut,{toolName:n,connectionId:a,siblings:l,onSelectInstance:c,onBack:o})}),e[15]=a,e[16]=o,e[17]=l,e[18]=n,e[19]=m):m=e[19],m}function Jt(s){const e=k.c(21),{icon:n,illustration:l,title:o,description:i,buttonProps:r,buttonComponent:c,className:d,children:a}=s;let x;e[0]!==d?(x=W("flex flex-col items-center justify-center py-16 text-center",d),e[0]=d,e[1]=x):x=e[1];let h;e[2]!==n||e[3]!==l?(h=l?t.jsx("div",{className:"mb-4 text-muted-foreground/50",children:l}):n?t.jsx("div",{className:"mb-4 flex h-12 w-12 items-center justify-center rounded-xl bg-muted/50 text-muted-foreground",children:n}):null,e[2]=n,e[3]=l,e[4]=h):h=e[4];let m;e[5]!==o?(m=t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:o}),e[5]=o,e[6]=m):m=e[6];let f;e[7]!==i?(f=i&&t.jsx("div",{className:"text-sm text-muted-foreground",children:i}),e[7]=i,e[8]=f):f=e[8];let p;e[9]!==m||e[10]!==f?(p=t.jsxs("div",{className:"flex flex-col items-center gap-1 max-w-sm",children:[m,f]}),e[9]=m,e[10]=f,e[11]=p):p=e[11];let g;e[12]!==c||e[13]!==r?(g=(c??r)&&t.jsx("div",{className:"mt-4",children:c??(r&&t.jsx(K,{size:"sm",className:W(r?.className),...r}))}),e[12]=c,e[13]=r,e[14]=g):g=e[14];let b;return e[15]!==a||e[16]!==x||e[17]!==h||e[18]!==p||e[19]!==g?(b=t.jsxs("div",{className:x,children:[h,p,g,a]}),e[15]=a,e[16]=x,e[17]=h,e[18]=p,e[19]=g,e[20]=b):b=e[20],b}const qt={prompt:Lt};function Ht(){const s=k.c(9),e=Re();let n;s[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=n):n=s[0];const l=he(n),o=decodeURIComponent(l.itemId);let i;s[1]!==l.appSlug?(i={slug:l.appSlug},s[1]=l.appSlug,s[2]=i):i=s[2];const r=Me(i);let c;s[3]!==e.history?(c=()=>{e.history.back()},s[3]=e.history,s[4]=c):c=s[4];const d=c,a=Kt;let x;return s[5]!==d||s[6]!==o||s[7]!==r?(x=t.jsx(_t,{itemId:o,siblings:r,onBack:d,onUpdate:a}),s[5]=d,s[6]=o,s[7]=r,s[8]=x):x=s[8],x}async function Kt(s){return Promise.resolve()}function Wt(s){return s.toLowerCase().split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")}function Qt(){const s=k.c(52),e=Re();let n;s[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=n):n=s[0];const l=he(n),o=Q(),i=decodeURIComponent(l.collectionName),r=decodeURIComponent(l.itemId);let c;s[1]!==e.history?(c=()=>{e.history.back()},s[1]=e.history,s[2]=c):c=s[2];const d=c,{org:a}=fe();let x;s[3]!==l.appSlug?(x={slug:l.appSlug},s[3]=l.appSlug,s[4]=x):x=s[4];const m=Me(x)[0]??null,f=m?.id??"",p=f||"no-connection",g=f??null;let b;s[5]!==a.id||s[6]!==a.slug||s[7]!==g?(b={connectionId:g,orgId:a.id,orgSlug:a.slug},s[5]=a.id,s[6]=a.slug,s[7]=g,s[8]=b):b=s[8];const S=ge(b),T=Oe(p,i,S);let y;s[9]!==T||s[10]!==r?(y=async _=>{r&&await T.update.mutateAsync({id:r,data:_})},s[9]=T,s[10]=r,s[11]=y):y=s[11];const P=y;let w;s[12]!==i?(w=i?.toLowerCase(),s[12]=i,s[13]=w):w=s[13];const N=w,A=N&&qt[N];let D;s[14]!==i?(D=Wt(i),s[14]=i,s[15]=D):D=s[15];const O=D;let C;s[16]!==a.slug?(C=t.jsx(Y,{children:t.jsx(se,{asChild:!0,children:t.jsx(te,{to:"/$org/settings/connections",params:{org:a.slug},children:"Connections"})})}),s[16]=a.slug,s[17]=C):C=s[17];let I;s[18]===Symbol.for("react.memo_cache_sentinel")?(I=t.jsx(le,{}),s[18]=I):I=s[18];let R;s[19]!==i||s[20]!==m||s[21]!==a.slug||s[22]!==l.appSlug?(R=m&&t.jsxs(t.Fragment,{children:[t.jsx(Y,{children:t.jsx(se,{asChild:!0,children:t.jsx(te,{to:"/$org/settings/connections/$appSlug",params:{org:a.slug,appSlug:l.appSlug},search:{tab:i},children:m.title})})}),t.jsx(le,{})]}),s[19]=i,s[20]=m,s[21]=a.slug,s[22]=l.appSlug,s[23]=R):R=s[23];let U;s[24]!==O?(U=t.jsx(Y,{children:t.jsx(Ue,{children:O})}),s[24]=O,s[25]=U):U=s[25];let z;s[26]!==R||s[27]!==U||s[28]!==C?(z=t.jsx(Le,{children:t.jsxs(Be,{children:[C,I,R,U]})}),s[26]=R,s[27]=U,s[28]=C,s[29]=z):z=s[29];const V=z;if(A){let _;return s[30]!==A||s[31]!==d||s[32]!==P||s[33]!==r?(_=t.jsx(A,{itemId:r,onBack:d,onUpdate:P}),s[30]=A,s[31]=d,s[32]=P,s[33]=r,s[34]=_):_=s[34],_}let v;s[35]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx(Ot,{size:36,className:"text-muted-foreground"}),s[35]=v):v=s[35];let F;s[36]!==o?(F=o("orgs.collectionDetail.noComponentDefinedTitle"),s[36]=o,s[37]=F):F=s[37];let J;s[38]!==o?(J=o("orgs.collectionDetail.noComponentDefinedDescription"),s[38]=o,s[39]=J):J=s[39];let M;s[40]!==o?(M=o("orgs.collectionDetail.goBackButton"),s[40]=o,s[41]=M):M=s[41];let L;s[42]!==d||s[43]!==M?(L={onClick:d,children:M},s[42]=d,s[43]=M,s[44]=L):L=s[44];let q;s[45]!==F||s[46]!==J||s[47]!==L?(q=t.jsx(Jt,{icon:v,title:F,description:J,buttonProps:L}),s[45]=F,s[46]=J,s[47]=L,s[48]=q):q=s[48];let X;return s[49]!==V||s[50]!==q?(X=t.jsx(je,{breadcrumb:V,children:q}),s[49]=V,s[50]=q,s[51]=X):X=s[51],X}function Xt(){const s=k.c(3);let e;s[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=e):e=s[0];const n=he(e);if(decodeURIComponent(n.collectionName)==="tools"){let r;return s[1]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(Ht,{}),s[1]=r):r=s[1],r}let i;return s[2]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(Qt,{}),s[2]=i):i=s[2],i}function _l(){const s=k.c(7),e=Q();let n;s[0]!==e?(n=e("orgs.collectionDetail.loadingAriaLabel"),s[0]=e,s[1]=n):n=s[1];let l;s[2]!==n?(l=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(oe,{size:32,className:"animate-spin text-muted-foreground","aria-label":n})}),s[2]=n,s[3]=l):l=s[3];let o;s[4]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx(Xt,{}),s[4]=o):o=s[4];let i;return s[5]!==l?(i=t.jsx(Ee,{children:t.jsx(E.Suspense,{fallback:l,children:o})}),s[5]=l,s[6]=i):i=s[6],i}export{_l as default};
|
|
1
|
+
import{c as k,j as t,B as K,k as oe,W as Ye,X as re,b as Q,E as Ee,r as E,F as fe,bb as Ze,bc as Oe,Z as Ge,m as W,bd as et,u as tt,L as te,t as st,f as he,a$ as Re}from"./index-QzdsfBYd.js";import{E as Fe}from"./empty-state-B7ZzKn6B.js";import{u as ge}from"./use-mcp-client-BpYZJj4o.js";import{F as ae,a as lt,b as ce,d as de}from"./form-zrd7LYxu.js";import{I as pe}from"./input-P-LUerq4.js";import{T as xe}from"./textarea-CkyHXuQm.js";import{a as ot,b as nt,V as je,O as it,M as rt}from"./index-C6BpFIWK.js";import{aA as at,S as ct,aB as dt,_ as mt,a8 as ut,aC as pt,a1 as ye}from"./agent-icon-B2LgmiRt.js";import{g as xt,M as ft,a as we}from"./index-DEfykvQ6.js";import{A as ht,a as gt,b as jt}from"./alert-2pYy2aRx.js";import{S as Ce,a as Ie,b as $e,c as Te,d as me}from"./select-BL9zv-JP.js";import{b as bt,c as Pe,T as ke,a as Ae}from"./tooltip-D0dd9ydB.js";import{i as Nt}from"./AlertCircle-BVcbGU63.js";import{s as vt}from"./Stars02-Rv7Zpq5p.js";import{a as St}from"./Copy01-B2yggp1R.js";import{i as yt}from"./Play-lriwSM0x.js";import{i as wt}from"./ChevronRight-wehtSt4J.js";import{g as Ct}from"./connection-slug-eyAPH6o3.js";import{u as It,T as $t}from"./use-mcp-auth-status-C48HeCw9.js";import{a as ze,u as Me}from"./use-connection-B_ydhIaR.js";import{a as Tt}from"./use-mcp-tools-l53r1zOu.js";import{M as Pt,c as kt}from"./monaco-editor-CTTjzlzK.js";import{I as De}from"./integration-icon-DB0SNVRE.js";import{h as At,m as Dt}from"./chat-context-DG5VMA6B.js";import{u as Et}from"./shell-layout-3WAcXYR2.js";import{n as Ot}from"./Tool02-a1QDD1BE.js";import"./auth-BbZNerdw.js";import"./label-DNCggKDl.js";import"./index-CPojIfJr.js";import"./sidebar-BAaF24ye.js";import"./LayoutLeft-BPQ9stJD.js";import"./use-mobile-CRkRo6zy.js";import"./X-DjQw217D.js";import"./ZoomOut-CAsxnm2x.js";import"./Key01-DXv7srOu.js";import"./extract-connection-data-wIgwD813.js";import"./use-registry-connections-xT5_Tp16.js";import"./use-organization-settings-D2HSrnf_.js";import"./studio-tools-BhhcZfev.js";import"./Plus-DQlLKoK7.js";import"./index-DSvM3i2U.js";import"./popover-1ACpRRoe.js";import"./use-virtual-mcp-vNY0_cuG.js";import"./Check-K9ygl0O6.js";import"./SearchMd-Dg6mSNN_.js";import"./Users03-B2Rmdg8K.js";import"./use-create-virtual-mcp-CMfpLhg7.js";import"./use-navigate-to-agent-D7z6mwyi.js";import"./hooks-CxPB8UeZ.js";import"./decopilot-sse-pool-DWTCLkf7.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./reusable-new-chat-CouMjkYR.js";import"./Tool01-zKnvH-kk.js";import"./ArrowUp-zrMcuXAr.js";import"./Settings02-BrQ1R_C3.js";import"./ArrowRight-CKlvyIoh.js";import"./ArrowUpRight-BRtGTw6u.js";import"./TrendUp01-DbtFTYSl.js";import"./ZapSquare-CqrPlIO3.js";import"./CheckCircle-Ddtle1Hu.js";import"./ChevronDown-ivzZdE8w.js";import"./ChevronUp-DtesMDJI.js";import"./DotsVertical-0w0ZkjcP.js";import"./Globe01-dnwQ58ni.js";import"./Eye-CZVpzZj3.js";import"./FilterLines-xmnqgD9Q.js";import"./Star01-DkiTL7fS.js";import"./Globe04-C5N1Fi_a.js";import"./SwitchHorizontal01-YOHN8l_Y.js";import"./HardDrive-BP9_iF3o.js";import"./Image01-CTFJ4q_z.js";import"./XCircle-BNVPuHya.js";import"./LinkExternal01-BktZyAnv.js";import"./LogOut01-BDBTSoW6.js";import"./Monitor01-7QFBOkji.js";import"./Sun-DIwJT6kw.js";import"./Package-D8m71yLY.js";import"./Palette-DWy3dzj0.js";import"./SearchLg-CoOX4SoC.js";import"./Shield01-BeZ6Sg4x.js";import"./Stars01-DTVv_6xg.js";import"./Trash01-CvmXP6ap.js";import"./Upload01-Ur6u-B1R.js";import"./User01-ELT05I_C.js";import"./Users01-DmKZlyCu.js";import"./XClose-BO1Lwhh7.js";import"./Zap-C4HzUZ29.js";import"./badge-8mmmFMes.js";import"./mcp-oauth-aEWbqsXM.js";import"./index-Cb8ogyWE.js";import"./autosend-BeIUwx1c.js";import"./use-ai-providers-iWGeiPtA.js";import"./location-BpLtHjTZ.js";import"./tab-id-BijBBRwE.js";import"./use-decopilot-events-BYrGmZOI.js";import"./avatar-B1FBqiPq.js";import"./dialog-C7PMQncq.js";import"./required-auth-layout-Bf2ygqfO.js";import"./use-org-sso-C3FJc_XM.js";function Rt(s){const e=k.c(15),{onSave:n,onUndo:l,isDirty:o,isSaving:i,saveLabel:r,undoLabel:c}=s,d=r===void 0?"Save":r,a=c===void 0?"Undo":c;if(!o)return null;let x;e[0]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx(at,{size:14}),e[0]=x):x=e[0];let h;e[1]!==i||e[2]!==l||e[3]!==a?(h=t.jsxs(K,{variant:"outline",size:"sm",onClick:l,disabled:i,"aria-label":a,children:[x,a]}),e[1]=i,e[2]=l,e[3]=a,e[4]=h):h=e[4];let m;e[5]!==i?(m=i?t.jsx(oe,{size:14,className:"animate-spin"}):t.jsx(ct,{size:14}),e[5]=i,e[6]=m):m=e[6];let f;e[7]!==i||e[8]!==n||e[9]!==d||e[10]!==m?(f=t.jsxs(K,{variant:"default",size:"sm",onClick:n,disabled:i,"aria-label":d,children:[m,d]}),e[7]=i,e[8]=n,e[9]=d,e[10]=m,e[11]=f):f=e[11];let p;return e[12]!==h||e[13]!==f?(p=t.jsxs(t.Fragment,{children:[h,f]}),e[12]=h,e[13]=f,e[14]=p):p=e[14],p}Ye({title:re().min(1),description:re().nullable(),body:re()});function ue(s){for(const e of s.messages??[])if(e.role==="user"&&e.content?.type==="text")return e.content.text??"";return""}function Ft(){const s=window.location.pathname.split("/").filter(Boolean),e=s.findIndex(l=>l==="mcps"),n=e>=0?s[e+1]:void 0;return n?decodeURIComponent(n):void 0}function zt(s){const e=k.c(43),{form:n}=s,l=Q();let o;e[0]!==l?(o=l("details.prompt.details"),e[0]=l,e[1]=o):o=e[1];let i;e[2]!==o?(i=t.jsx("div",{className:"text-sm font-medium text-foreground",children:o}),e[2]=o,e[3]=i):i=e[3];let r;e[4]!==l?(r=w=>{const{field:N}=w;return t.jsxs(ce,{children:[t.jsx("div",{className:"text-xs text-muted-foreground",children:l("details.prompt.title")}),t.jsx(de,{children:t.jsx(pe,{...N,placeholder:l("details.prompt.titlePlaceholder"),className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})},e[4]=l,e[5]=r):r=e[5];let c;e[6]!==n.control||e[7]!==r?(c=t.jsx(ae,{control:n.control,name:"title",render:r}),e[6]=n.control,e[7]=r,e[8]=c):c=e[8];let d;e[9]!==l?(d=w=>{const{field:N}=w;return t.jsxs(ce,{children:[t.jsx("div",{className:"text-xs text-muted-foreground",children:l("details.prompt.description")}),t.jsx(de,{children:t.jsx(pe,{...N,value:N.value??"",placeholder:l("details.prompt.descriptionPlaceholder"),className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})},e[9]=l,e[10]=d):d=e[10];let a;e[11]!==n.control||e[12]!==d?(a=t.jsx(ae,{control:n.control,name:"description",render:d}),e[11]=n.control,e[12]=d,e[13]=a):a=e[13];let x;e[14]!==c||e[15]!==a?(x=t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[c,a]}),e[14]=c,e[15]=a,e[16]=x):x=e[16];let h;e[17]!==i||e[18]!==x?(h=t.jsxs("div",{className:"flex flex-col gap-4",children:[i,x]}),e[17]=i,e[18]=x,e[19]=h):h=e[19];let m;e[20]!==l?(m=l("details.prompt.message"),e[20]=l,e[21]=m):m=e[21];let f;e[22]!==m?(f=t.jsx("div",{className:"text-sm font-medium text-foreground",children:m}),e[22]=m,e[23]=f):f=e[23];let p;e[24]!==l?(p=l("details.prompt.messageDescription"),e[24]=l,e[25]=p):p=e[25];let g;e[26]!==p?(g=t.jsx("div",{className:"text-xs text-muted-foreground",children:p}),e[26]=p,e[27]=g):g=e[27];let b;e[28]!==l?(b=w=>{const{field:N}=w;return t.jsx(ce,{children:t.jsx(de,{children:t.jsx(xe,{...N,value:N.value??"",placeholder:l("details.prompt.bodyPlaceholder"),className:"min-h-[240px] resize-none text-base leading-relaxed font-normal rounded-xl border border-border bg-muted/20 px-4 py-3 shadow-none focus-visible:ring-0"})})})},e[28]=l,e[29]=b):b=e[29];let S;e[30]!==n.control||e[31]!==b?(S=t.jsx(ae,{control:n.control,name:"body",render:b}),e[30]=n.control,e[31]=b,e[32]=S):S=e[32];let T;e[33]!==f||e[34]!==g||e[35]!==S?(T=t.jsxs("div",{className:"flex flex-col gap-2",children:[f,g,S]}),e[33]=f,e[34]=g,e[35]=S,e[36]=T):T=e[36];let y;e[37]!==T||e[38]!==h?(y=t.jsxs("div",{className:"h-full py-6 flex flex-col max-w-3xl mx-auto w-full min-w-0 gap-8 overflow-y-auto px-4",children:[h,T]}),e[37]=T,e[38]=h,e[39]=y):y=e[39];let P;return e[40]!==n||e[41]!==y?(P=t.jsx(lt,{...n,children:y}),e[40]=n,e[41]=y,e[42]=P):P=e[42],P}function Mt(s){const e=k.c(42),{providerId:n,promptId:l}=s,o=Q(),{org:i}=fe(),r=n||null;let c;e[0]!==i.id||e[1]!==i.slug||e[2]!==r?(c={connectionId:r,orgId:i.id,orgSlug:i.slug},e[0]=i.id,e[1]=i.slug,e[2]=r,e[3]=c):c=e[3];const d=ge(c),a=Ze(n,"PROMPT",l,d),x=Oe(n,"PROMPT",d),h=x.update.isPending;let m;e[4]!==a?(m=a?{title:a.title,description:a.description??null,body:ue(a)}:void 0,e[4]=a,e[5]=m):m=e[5];let f;e[6]!==m?(f={values:m},e[6]=m,e[7]=f):f=e[7];const p=Ge(f);let g;e[8]!==p||e[9]!==a?(g=()=>{a&&p.reset({title:a.title,description:a.description??null,body:ue(a)})},e[8]=p,e[9]=a,e[10]=g):g=e[10];const b=g;let S;e[11]!==x.update||e[12]!==p||e[13]!==l?(S=p.handleSubmit(async C=>{const I=await x.update.mutateAsync({id:l,data:{title:C.title,description:C.description,arguments:[],icons:[],messages:[{role:"user",content:{type:"text",text:C.body}}]}});p.reset({title:I.title,description:I.description??null,body:ue(I)})}),e[11]=x.update,e[12]=p,e[13]=l,e[14]=S):S=e[14];const T=S;if(!a){let C;e[15]!==o?(C=o("details.prompt.notFoundTitle"),e[15]=o,e[16]=C):C=e[16];let I;e[17]!==o?(I=o("details.prompt.notFoundDescription"),e[17]=o,e[18]=I):I=e[18];let R;return e[19]!==C||e[20]!==I?(R=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Fe,{title:C,description:I})}),e[19]=C,e[20]=I,e[21]=R):R=e[21],R}let y;e[22]!==a.title?(y=t.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:a.title}),e[22]=a.title,e[23]=y):y=e[23];let P;e[24]!==a.description?(P=a.description?t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"text-xs text-muted-foreground font-normal",children:"•"}),t.jsx("span",{className:"text-xs text-muted-foreground font-normal truncate min-w-0 max-w-[20ch]",children:a.description})]}):null,e[24]=a.description,e[25]=P):P=e[25];let w;e[26]!==y||e[27]!==P?(w=t.jsx(nt,{children:t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[y,P]})}),e[26]=y,e[27]=P,e[28]=w):w=e[28];let N;e[29]!==T?(N=()=>{T()},e[29]=T,e[30]=N):N=e[30];let A;e[31]!==p.formState.isDirty||e[32]!==h||e[33]!==b||e[34]!==N?(A=t.jsx(ot,{children:t.jsx(Rt,{onSave:N,onUndo:b,isDirty:p.formState.isDirty,isSaving:h})}),e[31]=p.formState.isDirty,e[32]=h,e[33]=b,e[34]=N,e[35]=A):A=e[35];let D;e[36]!==p?(D=t.jsx("div",{className:"h-full",children:t.jsx(zt,{form:p})}),e[36]=p,e[37]=D):D=e[37];let O;return e[38]!==A||e[39]!==D||e[40]!==w?(O=t.jsxs(je,{children:[w,A,D]}),e[38]=A,e[39]=D,e[40]=w,e[41]=O):O=e[41],O}function Lt(s){const e=k.c(10),{itemId:n}=s,l=Q();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=Ft(),e[0]=o):o=e[0];const i=o;if(!i){let c;e[1]!==l?(c=l("details.prompt.notFoundTitle"),e[1]=l,e[2]=c):c=e[2];let d;e[3]!==l?(d=l("details.prompt.missingConnectionDescription"),e[3]=l,e[4]=d):d=e[4];let a;return e[5]!==c||e[6]!==d?(a=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Fe,{title:c,description:d})}),e[5]=c,e[6]=d,e[7]=a):a=e[7],a}let r;return e[8]!==n?(r=t.jsx(Ee,{children:t.jsx(E.Suspense,{fallback:null,children:t.jsx(Mt,{providerId:i,promptId:n})})}),e[8]=n,e[9]=r):r=e[9],r}function Le(s){const e=k.c(8);let n,l;e[0]!==s?({className:n,...l}=s,e[0]=s,e[1]=n,e[2]=l):(n=e[1],l=e[2]);let o;e[3]!==n?(o=W("min-w-0 overflow-hidden",n),e[3]=n,e[4]=o):o=e[4];let i;return e[5]!==l||e[6]!==o?(i=t.jsx("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",className:o,...l}),e[5]=l,e[6]=o,e[7]=i):i=e[7],i}function Be(s){const e=k.c(8);let n,l;e[0]!==s?({className:n,...l}=s,e[0]=s,e[1]=n,e[2]=l):(n=e[1],l=e[2]);let o;e[3]!==n?(o=W("flex items-center gap-1.5 text-sm sm:gap-2 overflow-hidden",n),e[3]=n,e[4]=o):o=e[4];let i;return e[5]!==l||e[6]!==o?(i=t.jsx("ol",{"data-slot":"breadcrumb-list",className:o,...l}),e[5]=l,e[6]=o,e[7]=i):i=e[7],i}function Y(s){const e=k.c(8);let n,l;e[0]!==s?({className:n,...l}=s,e[0]=s,e[1]=n,e[2]=l):(n=e[1],l=e[2]);let o;e[3]!==n?(o=W("inline-flex items-center gap-1.5 min-w-0",n),e[3]=n,e[4]=o):o=e[4];let i;return e[5]!==l||e[6]!==o?(i=t.jsx("li",{"data-slot":"breadcrumb-item",className:o,...l}),e[5]=l,e[6]=o,e[7]=i):i=e[7],i}function se(s){const e=k.c(10);let n,l,o;e[0]!==s?({asChild:n,className:l,...o}=s,e[0]=s,e[1]=n,e[2]=l,e[3]=o):(n=e[1],l=e[2],o=e[3]);const i=n?et:"a";let r;e[4]!==l?(r=W("hover:text-foreground transition-colors truncate",l),e[4]=l,e[5]=r):r=e[5];let c;return e[6]!==i||e[7]!==o||e[8]!==r?(c=t.jsx(i,{"data-slot":"breadcrumb-link",className:r,...o}),e[6]=i,e[7]=o,e[8]=r,e[9]=c):c=e[9],c}function Ue(s){const e=k.c(8);let n,l;e[0]!==s?({className:n,...l}=s,e[0]=s,e[1]=n,e[2]=l):(n=e[1],l=e[2]);let o;e[3]!==n?(o=W("text-foreground font-medium truncate",n),e[3]=n,e[4]=o):o=e[4];let i;return e[5]!==l||e[6]!==o?(i=t.jsx("span",{"data-slot":"breadcrumb-page",role:"link","aria-disabled":"true","aria-current":"page",className:o,...l}),e[5]=l,e[6]=o,e[7]=i):i=e[7],i}function le(s){const e=k.c(12);let n,l,o;e[0]!==s?({children:n,className:l,...o}=s,e[0]=s,e[1]=n,e[2]=l,e[3]=o):(n=e[1],l=e[2],o=e[3]);let i;e[4]!==l?(i=W("[&>svg]:size-3.5 text-muted-foreground opacity-50 list-none shrink-0",l),e[4]=l,e[5]=i):i=e[5];let r;e[6]!==n?(r=n??t.jsx(wt,{}),e[6]=n,e[7]=r):r=e[7];let c;return e[8]!==o||e[9]!==i||e[10]!==r?(c=t.jsx("li",{"data-slot":"breadcrumb-separator",role:"presentation","aria-hidden":"true",className:i,...o,children:r}),e[8]=o,e[9]=i,e[10]=r,e[11]=c):c=e[11],c}const Bt=s=>s.replace(/_/g," ").replace(/\b\w/g,e=>e.toLocaleLowerCase());function Ut(s){const e=k.c(12),{toolName:n,connectionId:l,siblings:o,onSelectInstance:i,onBack:r}=s,c=Q();let d;e[0]!==l?(d={connectionId:l},e[0]=l,e[1]=d):d=e[1];const a=It(d);if(!a.isAuthenticated){let m;return e[2]!==a.supportsOAuth||e[3]!==r||e[4]!==c?(m=t.jsx("div",{className:"flex h-full items-center justify-center",children:a.supportsOAuth?t.jsx(it,{onAuthenticate:()=>r(),buttonText:c("details.tool.goBackToAuthenticate")}):t.jsx(rt,{hasReadme:!1})}),e[2]=a.supportsOAuth,e[3]=r,e[4]=c,e[5]=m):m=e[5],m}const x=`${l}:${n}`;let h;return e[6]!==l||e[7]!==i||e[8]!==o||e[9]!==x||e[10]!==n?(h=t.jsx(Vt,{toolName:n,connectionId:l,siblings:o,onSelectInstance:i},x),e[6]=l,e[7]=i,e[8]=o,e[9]=x,e[10]=n,e[11]=h):h=e[11],h}function Vt({toolName:s,connectionId:e,siblings:n,onSelectInstance:l}){const o=Q(),{replayId:i}=tt({strict:!1}),r=(()=>{if(!i)return null;const u=`replay-${i}`,j=sessionStorage.getItem(u);if(!j)return null;sessionStorage.removeItem(u);try{return JSON.parse(j)}catch{return null}})(),c=(()=>{if(!r)return null;const u={};for(const[j,$]of Object.entries(r))$!==null&&typeof $=="object"?u[j]=JSON.stringify($,null,2):u[j]=$;return u})(),[d,a]=E.useState(c??{}),[x,h]=E.useState(r?JSON.stringify(r,null,2):"{}"),[m,f]=E.useState(null),[p,g]=E.useState(null),[b,S]=E.useState(null),[T,y]=E.useState(null),[P,w]=E.useState(!1),[N,A]=E.useState(null),{org:D}=fe(),O=ze(e),C=At(),I=Dt(),{openSidePanel:R}=Et(),U=`${e}:${s}`,z=ge({connectionId:e,orgId:D.id,orgSlug:D.slug}),V=Tt({client:z}),v=V.data?.tools?.find(u=>u.name===s),F=xt(v?._meta),J=u=>{if(!C)return;const j=kt(u.content);j.content.length>0&&(R("chat"),C.sendMessage({tiptapDoc:j}))},[M,L]=E.useState("json"),[q,X]=E.useState(!1);F&&!q&&(L("ui"),X(!0));const _=v?.inputSchema?.properties,be=_?Object.keys(_):[],Z=be.length>0,G={};if(Z&&v?.inputSchema?.properties)for(const u of be)G[u]=v.inputSchema.required?.includes(u)?"":void 0;const ne=u=>Object.prototype.hasOwnProperty.call(d,u),Ve=async()=>{w(!0),y(null),f(null),g(null),S(null),A(null);const u=performance.now();try{if(!z)throw new Error("MCP client is not available");const j=Z?{...G,...d}:(()=>{const B=x.trim();if(!B)return{};const H=JSON.parse(B);if(H&&typeof H=="object")return H;throw new Error("Raw JSON input must be an object.")})();Z&&v?.inputSchema?.properties&&Object.entries(v.inputSchema.properties).forEach(([B,H])=>{if((H.type==="object"||H.type==="array")&&typeof j[B]=="string")try{j[B]=JSON.parse(j[B])}catch{}else if((H.type==="number"||H.type==="integer")&&typeof j[B]=="string"&&j[B]!==""){const Se=Number(j[B]);Number.isNaN(Se)||(j[B]=Se)}});const $=await z.callTool({name:s,arguments:j}),ee=$.structuredContent??$,We=performance.now(),Qe=Math.round(We-u);f(ee),g($),S(j);const Xe=JSON.stringify(ee),ve=new TextEncoder().encode(Xe).length;A({duration:`${Qe}ms`,bytes:`${ve} bytes`,tokens:`~${Math.ceil(ve/4)} tokens`,cost:"$0.0000"})}catch(j){const $=j instanceof Error?j.message:String(j);y($||"Unknown error occurred");const ee=performance.now();A({duration:`${Math.round(ee-u)}ms`})}finally{w(!1)}},ie=(u,j)=>{a($=>({...$,[u]:j}))},_e=()=>{f(null),g(null),S(null),y(null),A(null)},Je=v?.name??Bt(s),qe=t.jsx(Le,{children:t.jsxs(Be,{children:[t.jsx(Y,{children:t.jsx(se,{asChild:!0,children:t.jsx(te,{to:"/$org/settings/connections",params:{org:D.slug},children:o("details.tool.connections")})})}),t.jsx(le,{}),O&&t.jsxs(t.Fragment,{children:[t.jsx(Y,{children:t.jsx(se,{asChild:!0,children:t.jsx(te,{to:"/$org/settings/connections/$appSlug",params:{org:D.slug,appSlug:Ct(O)},search:{tab:"tools"},children:O.title})})}),t.jsx(le,{})]}),t.jsx(Y,{children:t.jsx(Ue,{children:Je})})]})}),Ne=n.length>1&&t.jsxs(Ce,{value:e,onValueChange:l,children:[t.jsx(Ie,{className:"h-8 w-auto min-w-[200px]",children:t.jsx($e,{})}),t.jsx(Te,{children:n.map(u=>t.jsx(me,{value:u.id,children:t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(De,{icon:u.icon,name:u.title,size:"xs",className:"shrink-0"}),u.title]})},u.id))})]}),He=t.jsxs("div",{className:"flex flex-col p-6 gap-4 overflow-auto",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("h2",{className:"text-sm font-semibold text-foreground uppercase tracking-wide",children:o("details.tool.parameters")}),v?.inputSchema?.required&&v.inputSchema.required.length>0&&t.jsxs("span",{className:"text-xs text-muted-foreground",children:[t.jsx("span",{className:"text-destructive",children:"*"})," ",o("details.tool.required")]})]}),t.jsx("div",{className:"space-y-4",children:Z&&v?.inputSchema?.properties?Object.entries(v.inputSchema.properties).map(([u,j])=>t.jsxs("div",{className:"space-y-2",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("label",{className:"text-sm font-medium leading-none flex items-center gap-1.5",children:[u,v.inputSchema?.required?.includes(u)&&t.jsx("span",{className:"text-destructive text-xs",children:"*"})]}),t.jsx("span",{className:"text-xs text-muted-foreground font-mono",children:j.type})]}),j.description&&t.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:j.description}),j.type==="object"||j.type==="array"?t.jsx(xe,{className:"font-mono text-xs",value:ne(u)?d[u]??"":G[u]??"",onChange:$=>ie(u,$.target.value),placeholder:o("details.tool.enterAsJson",{key:u}),rows:3}):j.type==="boolean"?t.jsxs(Ce,{value:ne(u)?String(d[u]??""):"",onValueChange:$=>ie(u,$==="true"),children:[t.jsx(Ie,{children:t.jsx($e,{placeholder:o("details.tool.selectTrueOrFalse")})}),t.jsxs(Te,{children:[t.jsx(me,{value:"true",children:"true"}),t.jsx(me,{value:"false",children:"false"})]})]}):t.jsx(pe,{value:ne(u)?d[u]??"":G[u]??"",onChange:$=>ie(u,$.target.value),placeholder:o("details.tool.enter",{key:u})})]},u)):v?.inputSchema&&!Z?t.jsxs("div",{className:"space-y-2",children:[t.jsx("label",{className:"text-sm font-medium",children:o("details.tool.rawJsonInput")}),t.jsx(xe,{className:"font-mono text-xs min-h-[120px]",value:x,onChange:u=>h(u.target.value),placeholder:o("details.tool.rawJsonExample")})]}):t.jsx("div",{className:"flex items-center justify-center p-8 bg-muted/30 rounded-lg border border-dashed border-border",children:t.jsx("p",{className:"text-sm text-muted-foreground",children:o("details.tool.noParametersRequired")})})}),t.jsx("div",{className:"flex items-center gap-2 pt-2",children:P?t.jsxs(K,{size:"sm",variant:"destructive",className:"h-8 gap-2",onClick:_e,children:[t.jsx(dt,{className:"h-3.5 w-3.5"}),o("details.tool.cancel")]}):t.jsxs(K,{size:"sm",variant:"default",className:"h-8 gap-2",onClick:Ve,children:[t.jsx(yt,{className:"h-3.5 w-3.5 fill-current"}),o("details.tool.executeTool")]})})]}),Ke=t.jsxs("div",{className:"flex flex-col @3xl:h-full @3xl:overflow-hidden",children:[t.jsxs("div",{className:"flex items-center justify-between px-4 h-14 border-b border-border bg-background",children:[t.jsx("h2",{className:"text-sm font-medium text-foreground uppercase tracking-wide",children:o("details.tool.result")}),t.jsxs("div",{className:"flex items-center gap-3",children:[N&&t.jsxs("div",{className:"flex items-center gap-3 text-xs",children:[t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(vt,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:N.duration})]}),N.tokens&&t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(mt,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:N.tokens})]}),N.bytes&&t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(ut,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:N.bytes})]}),N.cost&&t.jsx("div",{className:"flex items-center gap-1.5",children:t.jsx("span",{className:"font-mono text-foreground",children:N.cost})})]}),F&&t.jsx(bt,{children:t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsxs(Pe,{children:[t.jsx(ke,{asChild:!0,children:t.jsx(K,{size:"icon",variant:M==="ui"?"secondary":"ghost",className:"h-8 w-8",onClick:()=>L("ui"),children:t.jsx(pt,{size:14})})}),t.jsx(Ae,{children:o("details.tool.interactiveView")})]}),t.jsxs(Pe,{children:[t.jsx(ke,{asChild:!0,children:t.jsx(K,{size:"icon",variant:M==="json"?"secondary":"ghost",className:"h-8 w-8",onClick:()=>L("json"),children:t.jsx(ye,{size:14})})}),t.jsx(Ae,{children:o("details.tool.jsonView")})]})]})})]})]}),T&&t.jsx("div",{className:"px-6 py-4 bg-background",children:t.jsx(ht,{variant:"destructive",children:t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(Nt,{className:"h-4 w-4"}),t.jsx(gt,{className:"mb-0",children:o("details.tool.executionFailed")})]}),t.jsx(jt,{className:"text-xs text-destructive",children:T})]})})}),t.jsx("div",{className:"relative flex-1 min-h-[400px] @3xl:min-h-0 @3xl:overflow-auto bg-muted/50",children:F&&M==="ui"&&z?t.jsx(E.Suspense,{fallback:t.jsx("div",{className:"flex items-center justify-center h-48",children:t.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[t.jsx("div",{className:"size-4 border-2 border-current border-t-transparent rounded-full animate-spin"}),t.jsx("span",{className:"text-sm",children:o("details.tool.loadingApp")})]})}),children:t.jsx(ft,{resourceURI:F,toolInfo:v?{tool:v}:void 0,toolInput:b??void 0,toolResult:p??void 0,displayMode:"fullscreen",minHeight:we.view.minHeight,maxHeight:we.view.maxHeight,client:z,onMessage:J,onUpdateModelContext:u=>I?.setAppContext(U,u),onTeardown:()=>I?.clearAppContext(U),className:"h-full"})}):m?t.jsxs(t.Fragment,{children:[t.jsx(Pt,{code:JSON.stringify(m,null,2),language:"json",height:"100%",readOnly:!0}),t.jsx(K,{size:"icon",variant:"ghost",className:"absolute top-4 right-4 h-8 w-8 bg-background/80 hover:bg-background border border-border shadow-sm",onClick:()=>{navigator.clipboard.writeText(JSON.stringify(m,null,2)),st.success(o("details.tool.copiedToClipboard"))},children:t.jsx(St,{className:"h-3.5 w-3.5"})})]}):t.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center text-muted-foreground",children:[t.jsx(ye,{className:"h-12 w-12 mb-3 opacity-40"}),t.jsx("p",{className:"text-sm",children:o("details.tool.runToolToSeeResults")})]})})]});return t.jsx(je,{breadcrumb:qe,children:t.jsxs("div",{className:"flex flex-col h-full overflow-hidden @container",children:[t.jsxs("div",{className:"flex flex-col gap-3 py-7 px-8 bg-background border-b border-border shrink-0",children:[t.jsxs("div",{className:"flex items-center gap-4",children:[t.jsx(De,{icon:O?.icon||null,name:O?.title||s,size:"xl",className:"shrink-0"}),t.jsx("h1",{className:"text-xl font-semibold tracking-tight text-foreground leading-none truncate",children:s}),t.jsxs("div",{className:"flex items-center gap-2 px-2.5 py-1 bg-muted/50 rounded-md h-fit shrink-0",children:[V.isSuccess?t.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-success animate-pulse shrink-0"}):V.isLoading?t.jsx(oe,{size:10,className:"animate-spin text-warning shrink-0"}):t.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-destructive shrink-0"}),t.jsx("span",{className:"font-mono text-xs capitalize text-muted-foreground leading-none",children:V.isSuccess?"ready":V.isLoading?"connecting":"error"})]}),t.jsx($t,{annotations:v?.annotations,_meta:v?._meta}),t.jsx("div",{className:"hidden @3xl:flex items-center ml-auto shrink-0",children:Ne})]}),t.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:v?.description||"No description available"})]}),n.length>1&&t.jsxs("div",{className:"flex @3xl:hidden items-center gap-3 px-8 py-3 border-b border-border",children:[t.jsx("span",{className:"text-xs font-medium text-muted-foreground shrink-0",children:o("details.tool.instance")}),Ne]}),t.jsx("div",{className:"flex-1 overflow-auto @3xl:overflow-hidden",children:t.jsxs("div",{className:"grid grid-cols-1 @3xl:grid-cols-[minmax(0,2fr)_minmax(0,5fr)] @3xl:h-full @3xl:grid-rows-1",children:[t.jsx("div",{className:"@3xl:border-r border-border @3xl:overflow-auto",children:He}),Ke]})})]})})}function _t(s){const e=k.c(20),{itemId:n,siblings:l,onBack:o}=s,i=Q(),[r,c]=E.useState(l[0]?.id??"");let d;e[0]!==r||e[1]!==l?(d=l.find(f=>f.id===r)?.id??l[0]?.id??"",e[0]=r,e[1]=l,e[2]=d):d=e[2];const a=d;if(!ze(a||void 0)||!a){let f;e[3]!==i?(f=i("details.tool.connectionNotFound"),e[3]=i,e[4]=f):f=e[4];let p;e[5]!==f?(p=t.jsx("h3",{className:"text-lg font-semibold",children:f}),e[5]=f,e[6]=p):p=e[6];let g;e[7]!==i?(g=i("details.tool.connectionNotFoundMessage"),e[7]=i,e[8]=g):g=e[8];let b;e[9]!==g?(b=t.jsx("p",{className:"text-sm text-muted-foreground",children:g}),e[9]=g,e[10]=b):b=e[10];let S;return e[11]!==p||e[12]!==b?(S=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[p,b]})}),e[11]=p,e[12]=b,e[13]=S):S=e[13],S}let h;e[14]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(oe,{size:32,className:"animate-spin text-muted-foreground"})}),e[14]=h):h=e[14];let m;return e[15]!==a||e[16]!==o||e[17]!==l||e[18]!==n?(m=t.jsx(E.Suspense,{fallback:h,children:t.jsx(Ut,{toolName:n,connectionId:a,siblings:l,onSelectInstance:c,onBack:o})}),e[15]=a,e[16]=o,e[17]=l,e[18]=n,e[19]=m):m=e[19],m}function Jt(s){const e=k.c(21),{icon:n,illustration:l,title:o,description:i,buttonProps:r,buttonComponent:c,className:d,children:a}=s;let x;e[0]!==d?(x=W("flex flex-col items-center justify-center py-16 text-center",d),e[0]=d,e[1]=x):x=e[1];let h;e[2]!==n||e[3]!==l?(h=l?t.jsx("div",{className:"mb-4 text-muted-foreground/50",children:l}):n?t.jsx("div",{className:"mb-4 flex h-12 w-12 items-center justify-center rounded-xl bg-muted/50 text-muted-foreground",children:n}):null,e[2]=n,e[3]=l,e[4]=h):h=e[4];let m;e[5]!==o?(m=t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:o}),e[5]=o,e[6]=m):m=e[6];let f;e[7]!==i?(f=i&&t.jsx("div",{className:"text-sm text-muted-foreground",children:i}),e[7]=i,e[8]=f):f=e[8];let p;e[9]!==m||e[10]!==f?(p=t.jsxs("div",{className:"flex flex-col items-center gap-1 max-w-sm",children:[m,f]}),e[9]=m,e[10]=f,e[11]=p):p=e[11];let g;e[12]!==c||e[13]!==r?(g=(c??r)&&t.jsx("div",{className:"mt-4",children:c??(r&&t.jsx(K,{size:"sm",className:W(r?.className),...r}))}),e[12]=c,e[13]=r,e[14]=g):g=e[14];let b;return e[15]!==a||e[16]!==x||e[17]!==h||e[18]!==p||e[19]!==g?(b=t.jsxs("div",{className:x,children:[h,p,g,a]}),e[15]=a,e[16]=x,e[17]=h,e[18]=p,e[19]=g,e[20]=b):b=e[20],b}const qt={prompt:Lt};function Ht(){const s=k.c(9),e=Re();let n;s[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=n):n=s[0];const l=he(n),o=decodeURIComponent(l.itemId);let i;s[1]!==l.appSlug?(i={slug:l.appSlug},s[1]=l.appSlug,s[2]=i):i=s[2];const r=Me(i);let c;s[3]!==e.history?(c=()=>{e.history.back()},s[3]=e.history,s[4]=c):c=s[4];const d=c,a=Kt;let x;return s[5]!==d||s[6]!==o||s[7]!==r?(x=t.jsx(_t,{itemId:o,siblings:r,onBack:d,onUpdate:a}),s[5]=d,s[6]=o,s[7]=r,s[8]=x):x=s[8],x}async function Kt(s){return Promise.resolve()}function Wt(s){return s.toLowerCase().split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")}function Qt(){const s=k.c(52),e=Re();let n;s[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=n):n=s[0];const l=he(n),o=Q(),i=decodeURIComponent(l.collectionName),r=decodeURIComponent(l.itemId);let c;s[1]!==e.history?(c=()=>{e.history.back()},s[1]=e.history,s[2]=c):c=s[2];const d=c,{org:a}=fe();let x;s[3]!==l.appSlug?(x={slug:l.appSlug},s[3]=l.appSlug,s[4]=x):x=s[4];const m=Me(x)[0]??null,f=m?.id??"",p=f||"no-connection",g=f??null;let b;s[5]!==a.id||s[6]!==a.slug||s[7]!==g?(b={connectionId:g,orgId:a.id,orgSlug:a.slug},s[5]=a.id,s[6]=a.slug,s[7]=g,s[8]=b):b=s[8];const S=ge(b),T=Oe(p,i,S);let y;s[9]!==T||s[10]!==r?(y=async _=>{r&&await T.update.mutateAsync({id:r,data:_})},s[9]=T,s[10]=r,s[11]=y):y=s[11];const P=y;let w;s[12]!==i?(w=i?.toLowerCase(),s[12]=i,s[13]=w):w=s[13];const N=w,A=N&&qt[N];let D;s[14]!==i?(D=Wt(i),s[14]=i,s[15]=D):D=s[15];const O=D;let C;s[16]!==a.slug?(C=t.jsx(Y,{children:t.jsx(se,{asChild:!0,children:t.jsx(te,{to:"/$org/settings/connections",params:{org:a.slug},children:"Connections"})})}),s[16]=a.slug,s[17]=C):C=s[17];let I;s[18]===Symbol.for("react.memo_cache_sentinel")?(I=t.jsx(le,{}),s[18]=I):I=s[18];let R;s[19]!==i||s[20]!==m||s[21]!==a.slug||s[22]!==l.appSlug?(R=m&&t.jsxs(t.Fragment,{children:[t.jsx(Y,{children:t.jsx(se,{asChild:!0,children:t.jsx(te,{to:"/$org/settings/connections/$appSlug",params:{org:a.slug,appSlug:l.appSlug},search:{tab:i},children:m.title})})}),t.jsx(le,{})]}),s[19]=i,s[20]=m,s[21]=a.slug,s[22]=l.appSlug,s[23]=R):R=s[23];let U;s[24]!==O?(U=t.jsx(Y,{children:t.jsx(Ue,{children:O})}),s[24]=O,s[25]=U):U=s[25];let z;s[26]!==R||s[27]!==U||s[28]!==C?(z=t.jsx(Le,{children:t.jsxs(Be,{children:[C,I,R,U]})}),s[26]=R,s[27]=U,s[28]=C,s[29]=z):z=s[29];const V=z;if(A){let _;return s[30]!==A||s[31]!==d||s[32]!==P||s[33]!==r?(_=t.jsx(A,{itemId:r,onBack:d,onUpdate:P}),s[30]=A,s[31]=d,s[32]=P,s[33]=r,s[34]=_):_=s[34],_}let v;s[35]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx(Ot,{size:36,className:"text-muted-foreground"}),s[35]=v):v=s[35];let F;s[36]!==o?(F=o("orgs.collectionDetail.noComponentDefinedTitle"),s[36]=o,s[37]=F):F=s[37];let J;s[38]!==o?(J=o("orgs.collectionDetail.noComponentDefinedDescription"),s[38]=o,s[39]=J):J=s[39];let M;s[40]!==o?(M=o("orgs.collectionDetail.goBackButton"),s[40]=o,s[41]=M):M=s[41];let L;s[42]!==d||s[43]!==M?(L={onClick:d,children:M},s[42]=d,s[43]=M,s[44]=L):L=s[44];let q;s[45]!==F||s[46]!==J||s[47]!==L?(q=t.jsx(Jt,{icon:v,title:F,description:J,buttonProps:L}),s[45]=F,s[46]=J,s[47]=L,s[48]=q):q=s[48];let X;return s[49]!==V||s[50]!==q?(X=t.jsx(je,{breadcrumb:V,children:q}),s[49]=V,s[50]=q,s[51]=X):X=s[51],X}function Xt(){const s=k.c(3);let e;s[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=e):e=s[0];const n=he(e);if(decodeURIComponent(n.collectionName)==="tools"){let r;return s[1]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(Ht,{}),s[1]=r):r=s[1],r}let i;return s[2]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(Qt,{}),s[2]=i):i=s[2],i}function _l(){const s=k.c(7),e=Q();let n;s[0]!==e?(n=e("orgs.collectionDetail.loadingAriaLabel"),s[0]=e,s[1]=n):n=s[1];let l;s[2]!==n?(l=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(oe,{size:32,className:"animate-spin text-muted-foreground","aria-label":n})}),s[2]=n,s[3]=l):l=s[3];let o;s[4]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx(Xt,{}),s[4]=o):o=s[4];let i;return s[5]!==l?(i=t.jsx(Ee,{children:t.jsx(E.Suspense,{fallback:l,children:o})}),s[5]=l,s[6]=i):i=s[6],i}export{_l as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as $,b as A,j as s,m as z,B as E}from"./index-
|
|
1
|
+
import{c as $,b as A,j as s,m as z,B as E}from"./index-QzdsfBYd.js";import{a as S,D as F,b as L,c as O}from"./dropdown-menu-C3car2Q8.js";import{i as R,n as _}from"./ArrowUp-zrMcuXAr.js";import{i as V}from"./Check-K9ygl0O6.js";import{a as I,i as K,c as P}from"./SwitchHorizontal01-YOHN8l_Y.js";import{T as W,a as q,b as G,c as H}from"./tooltip-D0dd9ydB.js";import{V as J}from"./view-mode-toggle-CeUnqVr5.js";import{B as Q}from"./badge-8mmmFMes.js";function oe(t){const e=$.c(36),{viewMode:l,onViewModeChange:u,sortKey:M,sortDirection:h,onSort:g,sortOptions:j,filters:b}=t;let v;e[0]!==j?(v=j===void 0?[]:j,e[0]=j,e[1]=v):v=e[1];const N=v;let w;e[2]!==b?(w=b===void 0?[]:b,e[2]=b,e[3]=w):w=e[3];const r=w,i=A();let C;e[4]!==r?(C=r.filter(X),e[4]=r,e[5]=C):C=e[5];const y=C.length;let k;e[6]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx(I,{size:16}),e[6]=k):k=e[6];let o;e[7]!==y?(o=y>0&&s.jsx(Q,{variant:"default",className:"absolute -top-1.5 -right-1.5 h-4 min-w-4 px-1 text-[10px] leading-none",children:y}),e[7]=y,e[8]=o):o=e[8];let n;e[9]!==o?(n=s.jsx(W,{asChild:!0,children:s.jsx(F,{asChild:!0,children:s.jsxs(E,{variant:"outline",size:"icon",className:"relative",children:[k,o]})})}),e[9]=o,e[10]=n):n=e[10];let a;e[11]!==i?(a=i("collections.collectionDisplayButton.displayAndFilters"),e[11]=i,e[12]=a):a=e[12];let c;e[13]!==a?(c=s.jsx(q,{children:a}),e[13]=a,e[14]=c):c=e[14];let d;e[15]!==c||e[16]!==n?(d=s.jsx(G,{children:s.jsxs(H,{children:[n,c]})}),e[15]=c,e[16]=n,e[17]=d):d=e[17];let x;e[18]!==u||e[19]!==l?(x=u&&l&&s.jsx("div",{className:"p-2 border-b border-border",children:s.jsx(J,{value:l,onValueChange:u,fullWidth:!0,options:[{value:"table",icon:s.jsx(K,{})},{value:"cards",icon:s.jsx(P,{})}]})}),e[18]=u,e[19]=l,e[20]=x):x=e[20];let m;e[21]!==g||e[22]!==h||e[23]!==M||e[24]!==N||e[25]!==i?(m=N.length>0&&g&&s.jsxs("div",{className:"p-1 flex flex-col gap-0.5 border-b border-border",children:[s.jsx("div",{className:"px-2 py-1.5 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:i("collections.collectionDisplayButton.sortBy")}),N.map(T=>{const B=M===T.id;return s.jsx(S,{onClick:()=>g(T.id),className:z("h-8 px-2 py-0 cursor-pointer",B&&"bg-accent"),children:s.jsxs("div",{className:"flex items-center gap-2 w-full",children:[B&&s.jsx(V,{size:16,className:"text-foreground shrink-0"}),!B&&s.jsx("div",{className:"w-4 shrink-0"}),s.jsx("span",{className:"text-sm text-foreground flex-1",children:T.label}),B&&h&&(h==="asc"?s.jsx(R,{size:16,className:"text-foreground shrink-0"}):s.jsx(_,{size:16,className:"text-foreground shrink-0"}))]})},T.id)})]}),e[21]=g,e[22]=h,e[23]=M,e[24]=N,e[25]=i,e[26]=m):m=e[26];let p;e[27]!==r?(p=r.map(U),e[27]=r,e[28]=p):p=e[28];let f;e[29]!==x||e[30]!==m||e[31]!==p?(f=s.jsxs(L,{align:"end",className:"w-[200px] p-0 gap-0",children:[x,m,p]}),e[29]=x,e[30]=m,e[31]=p,e[32]=f):f=e[32];let D;return e[33]!==d||e[34]!==f?(D=s.jsxs(O,{children:[d,f]}),e[33]=d,e[34]=f,e[35]=D):D=e[35],D}function U(t){return s.jsxs("div",{className:"p-1 flex flex-col gap-0.5 border-b border-border last:border-b-0",children:[s.jsx("div",{className:"px-2 py-1.5 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:t.label}),t.options.map(e=>{const l=t.value===e.id;return s.jsx(S,{onClick:()=>t.onChange(e.id),className:z("h-8 px-2 py-0 cursor-pointer",l&&"bg-accent"),children:s.jsxs("div",{className:"flex items-center gap-2 w-full",children:[l&&s.jsx(V,{size:16,className:"text-foreground shrink-0"}),!l&&s.jsx("div",{className:"w-4 shrink-0"}),s.jsx("span",{className:"text-sm text-foreground flex-1",children:e.label})]})},e.id)})]},t.label)}function X(t){return t.value!=="ALL"}export{oe as C};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as k,m as b,j as n,k as v}from"./index-
|
|
1
|
+
import{c as k,m as b,j as n,k as v}from"./index-QzdsfBYd.js";import{i as w}from"./SearchMd-Dg6mSNN_.js";function S(j){const e=k.c(21),{value:m,onChange:d,placeholder:g,onKeyDown:x,className:u,isSearching:f,disabled:i}=j,p=g===void 0?"Search...":g;let t;e[0]!==u?(t=b("shrink-0 w-full border-b border-border h-12",u),e[0]=u,e[1]=t):t=e[1];const h=i?"cursor-not-allowed opacity-50":"cursor-text";let s;e[2]!==h?(s=b("flex items-center gap-2.5 h-12 px-4",h),e[2]=h,e[3]=s):s=e[3];let l;e[4]!==f?(l=f?n.jsx(v,{size:16,className:"animate-spin text-muted-foreground shrink-0"}):n.jsx(w,{size:16,className:"text-muted-foreground shrink-0"}),e[4]=f,e[5]=l):l=e[5];let r;e[6]!==d?(r=N=>d(N.target.value),e[6]=d,e[7]=r):r=e[7];let o;e[8]!==i||e[9]!==x||e[10]!==p||e[11]!==r||e[12]!==m?(o=n.jsx("input",{type:"text",value:m,onChange:r,onKeyDown:x,placeholder:p,disabled:i,className:"flex-1 min-w-0 bg-transparent text-sm text-foreground placeholder:text-muted-foreground/50 outline-none"}),e[8]=i,e[9]=x,e[10]=p,e[11]=r,e[12]=m,e[13]=o):o=e[13];let a;e[14]!==s||e[15]!==l||e[16]!==o?(a=n.jsxs("label",{className:s,children:[l,o]}),e[14]=s,e[15]=l,e[16]=o,e[17]=a):a=e[17];let c;return e[18]!==t||e[19]!==a?(c=n.jsx("div",{className:t,children:a}),e[18]=t,e[19]=a,e[20]=c):c=e[20],c}export{S as C};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as k,j as r,m as C,b as S}from"./index-
|
|
1
|
+
import{c as k,j as r,m as C,b as S}from"./index-QzdsfBYd.js";import{d as R,e as H,a as T,T as I,b as W,c as z}from"./table-BsyOuaNT.js";import{i as D,n as E}from"./ArrowUp-zrMcuXAr.js";function K(y){const e=k.c(29),{columns:n,data:f,sortKey:u,sortDirection:x,onSort:c,onRowClick:a,rowClassName:d}=y;let p;e[0]!==x?(p=function(s,h){return r.jsx("div",{className:"w-4 flex items-center justify-center",children:h&&x&&(x==="asc"?r.jsx(D,{size:16,className:"text-muted-foreground transition-colors"}):r.jsx(E,{size:16,className:"text-muted-foreground transition-colors"}))})},e[0]=x,e[1]=p):p=e[1];const b=p;let o;e[2]===Symbol.for("react.memo_cache_sentinel")?(o=function(s,h){let N="px-4 py-2 text-left font-mono font-normal text-muted-foreground text-[11px] h-9 uppercase tracking-wider";return s===h-1&&(N="px-4 py-2 text-left font-mono font-normal text-muted-foreground text-[11px] h-9 uppercase tracking-wider w-8"),N},e[2]=o):o=e[2];const g=o;let t;if(e[3]!==n||e[4]!==c||e[5]!==b||e[6]!==u){let i;e[8]!==n.length||e[9]!==c||e[10]!==b||e[11]!==u?(i=(s,h)=>{const N=u===s.id;return r.jsx(R,{className:C(g(h,n.length),"group transition-colors select-none",s.sortable&&"hover:bg-accent cursor-pointer",s.rowClassName,s.cellClassName),onClick:s.sortable&&c?()=>c(s.id):void 0,children:r.jsxs("span",{className:"flex items-center gap-1",children:[s.header,s.sortable&&b(s.id,N)]})},s.id)},e[8]=n.length,e[9]=c,e[10]=b,e[11]=u,e[12]=i):i=e[12],t=n.map(i),e[3]=n,e[4]=c,e[5]=b,e[6]=u,e[7]=t}else t=e[7];let l;e[13]!==t?(l=r.jsx(H,{className:"border-b-0",children:r.jsx(T,{className:"h-9 hover:bg-transparent border-b border-border",children:t})}),e[13]=t,e[14]=l):l=e[14];let j;if(e[15]!==n||e[16]!==f||e[17]!==a||e[18]!==d){let i;e[20]!==n||e[21]!==a||e[22]!==d?(i=(s,h)=>{const N=d?.(s);return r.jsx(T,{"data-row-index":h,className:C("group/data-row transition-colors border-b-0 hover:bg-accent/50",a?"cursor-pointer":"",N),onClick:a?()=>a(s):void 0,children:n.map(m=>r.jsx(I,{className:C("px-5 py-4 h-16 align-middle text-sm text-foreground",m.cellClassName,m.wrap?"whitespace-normal wrap-break-word":""),children:r.jsx("div",{className:C(m.wrap?"w-full":"min-w-0 w-full",!m.wrap&&"truncate overflow-hidden whitespace-nowrap"),children:m.render?m.render(s):m.accessor?m.accessor(s):null})},m.id))},h)},e[20]=n,e[21]=a,e[22]=d,e[23]=i):i=e[23],j=f.map(i),e[15]=n,e[16]=f,e[17]=a,e[18]=d,e[19]=j}else j=e[19];let w;e[24]!==j?(w=r.jsx(W,{children:j}),e[24]=j,e[25]=w):w=e[25];let v;return e[26]!==l||e[27]!==w?(v=r.jsxs(z,{className:"w-full border-collapse",children:[l,w]}),e[26]=l,e[27]=w,e[28]=v):v=e[28],v}function B(y){const e=k.c(16),{columns:n,data:f,isLoading:u,sortKey:x,sortDirection:c,onSort:a,onRowClick:d,emptyState:p}=y,b=u===void 0?!1:u,o=S();if(b){let t;e[0]!==o?(t=o("collections.collectionTableWrapper.loading"),e[0]=o,e[1]=t):t=e[1];let l;return e[2]!==t?(l=r.jsx("div",{className:"flex items-center justify-center h-full",children:r.jsx("div",{className:"text-muted-foreground",children:t})}),e[2]=t,e[3]=l):l=e[3],l}if(f.length===0){let t;e[4]!==p||e[5]!==o?(t=p||r.jsx("div",{className:"text-center py-12 text-muted-foreground",children:o("collections.collectionTableWrapper.noItemsFound")}),e[4]=p,e[5]=o,e[6]=t):t=e[6];let l;return e[7]!==t?(l=r.jsx("div",{className:"flex items-center justify-center h-full",children:t}),e[7]=t,e[8]=l):l=e[8],l}let g;return e[9]!==n||e[10]!==f||e[11]!==d||e[12]!==a||e[13]!==c||e[14]!==x?(g=r.jsx("div",{className:"flex-1",children:r.jsx(K,{columns:n,data:f,sortKey:x,sortDirection:c,onSort:a,onRowClick:d})}),e[9]=n,e[10]=f,e[11]=d,e[12]=a,e[13]=c,e[14]=x,e[15]=g):g=e[15],g}export{B as C};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as f,m as u,j as m}from"./index-
|
|
1
|
+
import{c as f,m as u,j as m}from"./index-QzdsfBYd.js";import{B as g}from"./badge-8mmmFMes.js";function h(x){const e=f.c(12),{tabs:l,activeTab:n,onTabChange:s,className:a}=x;let t;e[0]!==a?(t=u("flex items-center gap-2 overflow-x-auto no-scrollbar",a),e[0]=a,e[1]=t):t=e[1];let r;if(e[2]!==n||e[3]!==s||e[4]!==l){let c;e[6]!==n||e[7]!==s?(c=o=>{const d=n===o.id;return m.jsxs("button",{type:"button",onClick:()=>s(o.id),className:u("h-7 px-2 text-sm rounded-lg border border-input transition-colors inline-flex gap-1.5 items-center",d&&"bg-accent border-border text-foreground",!d&&"bg-transparent text-muted-foreground hover:border-border hover:bg-accent/50 hover:text-foreground"),children:[o.label,o.count!==void 0&&m.jsx(g,{variant:"secondary",className:u("h-5 min-w-5 px-1 rounded-full text-[10px] font-mono inline-flex items-center justify-center",d?"bg-background text-foreground":"bg-muted-foreground/10 text-muted-foreground"),children:o.count})]},o.id)},e[6]=n,e[7]=s,e[8]=c):c=e[8],r=l.map(c),e[2]=n,e[3]=s,e[4]=l,e[5]=r}else r=e[5];let i;return e[9]!==t||e[10]!==r?(i=m.jsx("div",{className:t,children:r}),e[9]=t,e[10]=r,e[11]=i):i=e[11],i}export{h as C};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as d,m as i,j as n}from"./index-
|
|
1
|
+
import{c as d,m as i,j as n}from"./index-QzdsfBYd.js";import{_ as m}from"./index-DSvM3i2U.js";import{e as k,b as N,h as j,a as b,d as w}from"./dialog-C7PMQncq.js";import{i as y}from"./SearchMd-Dg6mSNN_.js";function C(a){const e=d.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=i("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m,{"data-slot":"command",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function S(a){const e=d.c(24);let t,s,o,l,r;e[0]!==a?({title:l,description:r,children:t,className:s,...o}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o,e[4]=l,e[5]=r):(t=e[1],s=e[2],o=e[3],l=e[4],r=e[5]);const _=l===void 0?"Command Palette":l,v=r===void 0?"Search for a command to run...":r;let c;e[6]!==_?(c=n.jsx(N,{children:_}),e[6]=_,e[7]=c):c=e[7];let p;e[8]!==v?(p=n.jsx(j,{children:v}),e[8]=v,e[9]=p):p=e[9];let u;e[10]!==c||e[11]!==p?(u=n.jsxs(b,{className:"sr-only",children:[c,p]}),e[10]=c,e[11]=p,e[12]=u):u=e[12];let f;e[13]!==s?(f=i("overflow-hidden p-0",s),e[13]=s,e[14]=f):f=e[14];let x;e[15]!==t?(x=n.jsx(C,{className:"[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:t}),e[15]=t,e[16]=x):x=e[16];let g;e[17]!==f||e[18]!==x?(g=n.jsx(w,{className:f,closeButtonClassName:"hidden",children:x}),e[17]=f,e[18]=x,e[19]=g):g=e[19];let h;return e[20]!==o||e[21]!==u||e[22]!==g?(h=n.jsxs(k,{...o,children:[u,g]}),e[20]=o,e[21]=u,e[22]=g,e[23]=h):h=e[23],h}function z(a){const e=d.c(9);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(y,{className:"size-5 shrink-0 text-foreground"}),e[3]=o):o=e[3];let l;e[4]!==t?(l=i("placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",t),e[4]=t,e[5]=l):l=e[5];let r;return e[6]!==s||e[7]!==l?(r=n.jsxs("div",{"data-slot":"command-input-wrapper",className:"flex h-10 items-center gap-2 border-b px-3",children:[o,n.jsx(m.Input,{"data-slot":"command-input",className:l,...s})]}),e[6]=s,e[7]=l,e[8]=r):r=e[8],r}function G(a){const e=d.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=i("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m.List,{"data-slot":"command-list",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function L(a){const e=d.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=n.jsx(m.Empty,{"data-slot":"command-empty",className:"py-6 text-center text-sm",...t}),e[2]=t,e[3]=s):s=e[3],s}function R(a){const e=d.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=i("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m.Group,{"data-slot":"command-group",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function B(a){const e=d.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=i("bg-border -mx-1 h-px",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m.Separator,{"data-slot":"command-separator",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function H(a){const e=d.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=i("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m.Item,{"data-slot":"command-item",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}export{L as C,H as a,z as b,G as c,C as d,R as e,S as f,B as g};
|