decocms 4.2.0 → 4.3.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-HztvGgEK.js → AlertCircle-DC-zDzV-.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-CD45Pqa3.js → ArrowUpRight-OJZisFPQ.js} +1 -1
- package/dist/client/assets/{CheckCircle-B93tZkib.js → CheckCircle-Cgnheu-R.js} +1 -1
- package/dist/client/assets/{ChevronDown-BHp2n33E.js → ChevronDown-DyHvxYlc.js} +1 -1
- package/dist/client/assets/{ChevronLeft-CkLGnzyI.js → ChevronLeft-dyRjFCmp.js} +1 -1
- package/dist/client/assets/{ChevronRight-HkVZWjVD.js → ChevronRight-Cpfh3gza.js} +1 -1
- package/dist/client/assets/{ChevronUp-DLoyITzq.js → ChevronUp-DBpw6M-L.js} +1 -1
- package/dist/client/assets/{DotsVertical-DBVnta3o.js → DotsVertical-5jSu3d1f.js} +1 -1
- package/dist/client/assets/{Eye-BuXBYPNx.js → Eye-bojNLUjA.js} +1 -1
- package/dist/client/assets/{FilterLines-JdWf41nd.js → FilterLines-CFl65nng.js} +1 -1
- package/dist/client/assets/{Globe01-DbyYsbkQ.js → Globe01-CyfpzbeQ.js} +1 -1
- package/dist/client/assets/{Globe04-ht6-fzwU.js → Globe04-DFpdKSRI.js} +1 -1
- package/dist/client/assets/{HardDrive-QsbiOkra.js → HardDrive-B1mtnaeA.js} +1 -1
- package/dist/client/assets/{Key01-B-rzooWI.js → Key01-CwrJlZo0.js} +1 -1
- package/dist/client/assets/{LayoutLeft-CvZZnjM_.js → LayoutLeft-fsm0LcB8.js} +1 -1
- package/dist/client/assets/{LinkExternal01-C75h4nTA.js → LinkExternal01-BHwVyDja.js} +1 -1
- package/dist/client/assets/{Monitor01-C751a6VH.js → Monitor01-ChA6ov2I.js} +1 -1
- package/dist/client/assets/{Palette-Cw4TmFXF.js → Palette-DusYqL0W.js} +1 -1
- package/dist/client/assets/{Play-BaPiITj6.js → Play-CnXG8qqP.js} +1 -1
- package/dist/client/assets/{Plus-cqzweyhV.js → Plus-eGxBB1d8.js} +1 -1
- package/dist/client/assets/{SearchLg-BgcbIGrG.js → SearchLg-CDpA_lbT.js} +1 -1
- package/dist/client/assets/{SearchMd-B_E38g9S.js → SearchMd-ujiTPCmg.js} +1 -1
- package/dist/client/assets/{Settings02-HJQMPAnK.js → Settings02-BcAnTzm5.js} +1 -1
- package/dist/client/assets/{Shield01-CYOeouzJ.js → Shield01-ZxmFmrvL.js} +1 -1
- package/dist/client/assets/{Star01-BLuwEqBm.js → Star01-DHEkWySe.js} +1 -1
- package/dist/client/assets/{Stars01-bmKEIBXR.js → Stars01-BdCaKqhF.js} +1 -1
- package/dist/client/assets/{Stars02-CO1akjaP.js → Stars02-qnq-_X9g.js} +1 -1
- package/dist/client/assets/{Sun-DGf33qzc.js → Sun-lTiqxOzH.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-CtPAye2M.js → SwitchHorizontal01-DAZXInW8.js} +1 -1
- package/dist/client/assets/{Tool01-Dc5WA1H4.js → Tool01-CvnpFI53.js} +1 -1
- package/dist/client/assets/{Trash01-Dn19EDIc.js → Trash01-ByxlxTiZ.js} +1 -1
- package/dist/client/assets/{Upload01-AmIm4zQN.js → Upload01-Z77n1bV8.js} +1 -1
- package/dist/client/assets/{User01-CYnD1B0h.js → User01-COQtf360.js} +1 -1
- package/dist/client/assets/{Users01-B3f8K1I8.js → Users01-wtRJYQKX.js} +1 -1
- package/dist/client/assets/{Users03-B7auzTEh.js → Users03-DknrDMtT.js} +1 -1
- package/dist/client/assets/{X-BJ5AK9_B.js → X-DrMVHLcw.js} +1 -1
- package/dist/client/assets/{XCircle-BEhXc7sQ.js → XCircle-Ct0eqqsw.js} +1 -1
- package/dist/client/assets/{XClose-BaODJMh0.js → XClose-BaZ908gw.js} +1 -1
- package/dist/client/assets/{Zap-CDSogr5w.js → Zap-wRIFSWIq.js} +1 -1
- package/dist/client/assets/{ZapSquare-CmmJkOPb.js → ZapSquare-PMiGcZpW.js} +1 -1
- package/dist/client/assets/{ZoomOut-9WiOjKDc.js → ZoomOut-6ix2H92j.js} +1 -1
- package/dist/client/assets/{access-gate-Bwf2CoM1.js → access-gate-D6dGDGRI.js} +1 -1
- package/dist/client/assets/{add-section-modal-CmQEBOgZ.js → add-section-modal-DOhGqRCL.js} +1 -1
- package/dist/client/assets/{agent-icon-Ba-0ZYgG.js → agent-icon-oDx9Z_Be.js} +1 -1
- package/dist/client/assets/{agents-list-D5VkOHIG.js → agents-list-BgSM_QG_.js} +1 -1
- package/dist/client/assets/{ai-providers-CZ5SMOKO.js → ai-providers-Crp7kidL.js} +1 -1
- package/dist/client/assets/{alert-nxT5lZho.js → alert-CKj_5smu.js} +1 -1
- package/dist/client/assets/{alert-dialog-Bqe6OAIL.js → alert-dialog-CYizItFp.js} +2 -2
- package/dist/client/assets/app-editor-Xoia35dq.js +1 -0
- package/dist/client/assets/{auth-CqOhN4mO.js → auth-Bej0Tx2Y.js} +1 -1
- package/dist/client/assets/{auth-catchall-CNFrjBAq.js → auth-catchall-CmNVpp-8.js} +1 -1
- package/dist/client/assets/{auth-entry-DPV3aDXY.js → auth-entry-PwLVm-jX.js} +1 -1
- package/dist/client/assets/{auth-split-layout-Dp0-2xO6.js → auth-split-layout-5YwPgbAb.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-BkWGH7gY.js → authenticate-and-persist-oauth-DoPUB_Bh.js} +1 -1
- package/dist/client/assets/{automation-list-row-CjVzmIPj.js → automation-list-row-CsTyBm4M.js} +1 -1
- package/dist/client/assets/{automation-runs-DIDLqvYF.js → automation-runs-B-dNDEWH.js} +1 -1
- package/dist/client/assets/{automations-DEtrS6hH.js → automations-D395202A.js} +1 -1
- package/dist/client/assets/{avatar-DUFWGs9Z.js → avatar-CJP1BOq4.js} +1 -1
- package/dist/client/assets/{badge-ULvYE549.js → badge-DhpSM7g_.js} +1 -1
- package/dist/client/assets/{block-document-Cl3urvMb.js → block-document-B2vhG8Ii.js} +1 -1
- package/dist/client/assets/{brand-context-DU7I0d5o.js → brand-context-BRpHgxfT.js} +1 -1
- package/dist/client/assets/{buckets-4u7bKclV.js → buckets-DDR0G33f.js} +1 -1
- package/dist/client/assets/{bulk-category-panel-Bqpqm_Qj.js → bulk-category-panel-CM1bMunr.js} +1 -1
- package/dist/client/assets/{capability-load-error-Xikv63T6.js → capability-load-error-CCgNL5xi.js} +1 -1
- package/dist/client/assets/{card-DuZccs_2.js → card-BFb5m83e.js} +1 -1
- package/dist/client/assets/category-editor-2T4Y_ABL.js +1 -0
- package/dist/client/assets/{chat-context-Ba1J4Wbr.js → chat-context-n9syhvq-.js} +4 -4
- package/dist/client/assets/{checkbox-CZumSc8B.js → checkbox-DmOzmKLP.js} +1 -1
- package/dist/client/assets/{cli-auth-success-Ca86Sm5z.js → cli-auth-success-BVPtMYcv.js} +1 -1
- package/dist/client/assets/{collection-detail-2DizOat2.js → collection-detail-BQKV3UU7.js} +1 -1
- package/dist/client/assets/{collection-display-button-DTaFqStv.js → collection-display-button-Bf9dlJRy.js} +1 -1
- package/dist/client/assets/{collection-search-D2jsOcE8.js → collection-search-8iNXnGlM.js} +1 -1
- package/dist/client/assets/{collection-tabs-BlI5WHJs.js → collection-tabs-KA2be3wH.js} +1 -1
- package/dist/client/assets/{command-ClUS1KMM.js → command-C34397s2.js} +1 -1
- package/dist/client/assets/{commerce-onboarding-C9kK24Mf.js → commerce-onboarding-D2H83R0U.js} +1 -1
- package/dist/client/assets/{connect-desktop-dialog-DPJKYCn-.js → connect-desktop-dialog-Brra3cMC.js} +1 -1
- package/dist/client/assets/{connection-card-CEtBve6r.js → connection-card-C6NYo4Gp.js} +1 -1
- package/dist/client/assets/{connection-detail-dUoqAHFY.js → connection-detail-gJ5ITUXe.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-DtWH2w6r.js → connection-form-helpers-CwZx7WkC.js} +1 -1
- package/dist/client/assets/{connections-SZjaegFI.js → connections-CicrEJbU.js} +1 -1
- package/dist/client/assets/{context-menu-VSlW1NY7.js → context-menu-BW_OZBmV.js} +1 -1
- package/dist/client/assets/{decopilot-Y0nnLngo.js → decopilot-BItqS11w.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-BR9ewfWR.js → decopilot-sse-pool-CvYk1hkc.js} +1 -1
- package/dist/client/assets/{dialog-onqVrhoh.js → dialog-BAqFyO8a.js} +1 -1
- package/dist/client/assets/{domain-settings-D6CfPi24.js → domain-settings-r_E3rHsG.js} +1 -1
- package/dist/client/assets/{drawer-D6-83PZ_.js → drawer-CFkqEC3w.js} +1 -1
- package/dist/client/assets/{dropdown-menu-D9g8Sl4X.js → dropdown-menu-C62KNjwK.js} +1 -1
- package/dist/client/assets/{empty-state-0bsCiepl.js → empty-state-Sh_DuDcy.js} +1 -1
- package/dist/client/assets/{extract-connection-data-Dk45baha.js → extract-connection-data-D6bQrejT.js} +1 -1
- package/dist/client/assets/file-explorer-C8pgfKCz.js +2 -0
- package/dist/client/assets/{file-type-icon-B1XEm_9k.js → file-type-icon-DPWxBpNL.js} +1 -1
- package/dist/client/assets/{files-BvKHt3eY.js → files-B9ekmQa_.js} +1 -1
- package/dist/client/assets/{form-Dvd73W2C.js → form-DGE2mWLL.js} +1 -1
- package/dist/client/assets/{general-DrBGUycq.js → general-BMDKtyZB.js} +1 -1
- package/dist/client/assets/{github-repo-picker-CB-ypGEp.js → github-repo-picker-B5tZucJa.js} +1 -1
- package/dist/client/assets/{hooks-tDbCB3C5.js → hooks-CUSV6Enf.js} +1 -1
- package/dist/client/assets/{import-from-deco-dialog-wTIFbH1Y.js → import-from-deco-dialog-M3CP3Gmn.js} +1 -1
- package/dist/client/assets/index-B2yJy2sB.js +1 -0
- package/dist/client/assets/{index-1nPke5TY.js → index-B6hcksS9.js} +1 -1
- package/dist/client/assets/{index-DrUwfEHA.js → index-Bb-tYGNK.js} +1 -1
- package/dist/client/assets/index-BqKQnks_.css +1 -0
- package/dist/client/assets/{index-DmjWDqcd.js → index-CFiyU0D9.js} +3 -3
- package/dist/client/assets/index-CRxAjd1d.js +513 -0
- package/dist/client/assets/{index-DkjetCaY.js → index-CkTyYAY1.js} +1 -1
- package/dist/client/assets/{index-BFlpjafk.js → index-DGzNvPy2.js} +1 -1
- package/dist/client/assets/{index-D3WaYPH4.js → index-DIBoN36v.js} +1 -1
- package/dist/client/assets/{index-BTZwvNmT.js → index-DQnTjiix.js} +1 -1
- package/dist/client/assets/{index-DeiWC-uz.js → index-D_S_Rq8A.js} +1 -1
- package/dist/client/assets/{index-Ftnw_1Xy.js → index-Dj7TxcSd.js} +1 -1
- package/dist/client/assets/{index-B_kMLuGG.js → index-hmJjUPum.js} +1 -1
- package/dist/client/assets/{index--njjOK24.js → index-jBUpmiBg.js} +1 -1
- package/dist/client/assets/{index-D3mRtkEB.js → index-mEtg0zTM.js} +1 -1
- package/dist/client/assets/{index-redirect-B6SIDrdt.js → index-redirect-C9Kkmz45.js} +1 -1
- package/dist/client/assets/{input-BlaLo4Ee.js → input-BwRH-Gsz.js} +1 -1
- package/dist/client/assets/{integration-icon-BF4ETuj8.js → integration-icon-LQhkkaLl.js} +1 -1
- package/dist/client/assets/{label-GEC2UjFS.js → label-CdBSUJpf.js} +1 -1
- package/dist/client/assets/{login-DiR83Uim.js → login-d0UWtw9N.js} +1 -1
- package/dist/client/assets/{mcp-oauth-sGspCuYg.js → mcp-oauth-IblqU9XT.js} +1 -1
- package/dist/client/assets/{members-BDtCBiR9.js → members-Bpdrl2e9.js} +1 -1
- package/dist/client/assets/{monaco-editor-BKh1966p.js → monaco-editor-5JIc-lnc.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-Bdo8nd6T.js → monitoring-stats-row-DPsQ-OAn.js} +1 -1
- package/dist/client/assets/{oauth-callback-BexQI-2W.js → oauth-callback-B1AvYYRn.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-1VSCaYAB.js → oauth-callback-ai-provider-BtGHmjpp.js} +1 -1
- package/dist/client/assets/{onboarding-CZfsqsuP.js → onboarding-DfUmI7F5.js} +1 -1
- package/dist/client/assets/{org-install-BCHSGKR9.js → org-install-CpJAFt1s.js} +1 -1
- package/dist/client/assets/{org-layout-D5zV7CtT.js → org-layout-BsuFzdH_.js} +1 -1
- package/dist/client/assets/{organization-choice-B_qzGE3r.js → organization-choice-DrxWffZp.js} +1 -1
- package/dist/client/assets/{page-seo-form-Cg3EP0Kg.js → page-seo-form-BLqpZnj6.js} +1 -1
- package/dist/client/assets/page-seo-sheet-C7jjKuEW.js +1 -0
- package/dist/client/assets/{popover-BxWSrnHV.js → popover-BXFiEQtN.js} +1 -1
- package/dist/client/assets/post-editor-Tve7DmSa.js +1 -0
- package/dist/client/assets/{preview-dialog-B6mTIXuI.js → preview-dialog-CQgf0QcR.js} +2 -2
- package/dist/client/assets/{primitives-DikyHxBV.js → primitives-BF1opf4F.js} +1 -1
- package/dist/client/assets/{profile-CR2pTbhO.js → profile-C8meo3ry.js} +1 -1
- package/dist/client/assets/project-app-view-BR2-hR46.js +1 -0
- package/dist/client/assets/record-editor-DbXO7U7E.js +1 -0
- package/dist/client/assets/registry-jjhvqeDq.js +2 -0
- package/dist/client/assets/{registry-layout-BQTxWcaj.js → registry-layout-C4UMhzml.js} +1 -1
- package/dist/client/assets/{require-capability-B1UdIHXr.js → require-capability--mIKExbX.js} +1 -1
- package/dist/client/assets/{required-auth-layout-CykGSzYq.js → required-auth-layout-DDJmFi3U.js} +1 -1
- package/dist/client/assets/{reset-password-BKTSF6vw.js → reset-password-CuNa1ife.js} +1 -1
- package/dist/client/assets/{roles-tVsESxlL.js → roles-BMhGnq_F.js} +1 -1
- package/dist/client/assets/{scroll-area-B8CDvPWi.js → scroll-area-BM-54tW1.js} +1 -1
- package/dist/client/assets/{search-input-L82tU3Bd.js → search-input-M7ubuBMG.js} +1 -1
- package/dist/client/assets/{secrets-BPwXng2k.js → secrets-BN1JMG5V.js} +1 -1
- package/dist/client/assets/{sections-editor-CuKTooG7.js → sections-editor-Buouhx1S.js} +2 -2
- package/dist/client/assets/{select-ySr8WoR1.js → select-C6v8Xcth.js} +1 -1
- package/dist/client/assets/{select-model-DdjL4UVJ.js → select-model-Cz9R_UN3.js} +1 -1
- package/dist/client/assets/seo-editor-D9o3utSQ.js +1 -0
- package/dist/client/assets/{settings-layout-BBsWbAB4.js → settings-layout-CSaUQUXv.js} +1 -1
- package/dist/client/assets/{settings-section-ysOtzM09.js → settings-section-MeT61nuY.js} +1 -1
- package/dist/client/assets/{sheet-X3VztLnq.js → sheet-DyU03ddw.js} +1 -1
- package/dist/client/assets/{shell-controls-DTY4r0Sw.js → shell-controls-DtGb6E4l.js} +1 -1
- package/dist/client/assets/{shell-layout-CdseotG7.js → shell-layout-Nyz7GHu7.js} +1 -1
- package/dist/client/assets/{shell-route-loading-DNSXVK6N.js → shell-route-loading-BRcTX0VT.js} +1 -1
- package/dist/client/assets/{sidebar-H8VlLCcE.js → sidebar-BNrafefE.js} +1 -1
- package/dist/client/assets/{skeleton-DknPHMRJ.js → skeleton-B0I93PJP.js} +1 -1
- package/dist/client/assets/{sortable.esm-Ctxa79RM.js → sortable.esm-MymOIPKk.js} +1 -1
- package/dist/client/assets/{sso-WkG_Ya3-.js → sso-CfyYgWAs.js} +1 -1
- package/dist/client/assets/{store-BisoAFLO.js → store-T7GJ1SPI.js} +1 -1
- package/dist/client/assets/store-registry-B-YJeGRV.js +2 -0
- package/dist/client/assets/{studio-tools-BWRE75AX.js → studio-tools-CNO5iCKk.js} +1 -1
- package/dist/client/assets/{switch-DR4CkZQD.js → switch-CCMIMmOF.js} +1 -1
- package/dist/client/assets/{table-C4Cy5HHY.js → table-DeNuxLMl.js} +1 -1
- package/dist/client/assets/{tabs-C77-FnFK.js → tabs-Ca0vDJqc.js} +1 -1
- package/dist/client/assets/{task-status-DIimAguz.js → task-status-B3nPzwP7.js} +1 -1
- package/dist/client/assets/{textarea-DzC7ppsf.js → textarea-BYT525JZ.js} +1 -1
- package/dist/client/assets/{toggle-group-DUz2fIQy.js → toggle-group-9TrYMc69.js} +1 -1
- package/dist/client/assets/toolbar-p8VcpV1N.js +1 -0
- package/dist/client/assets/{tools-list-CTCIGteU.js → tools-list-uWC3Ij6C.js} +1 -1
- package/dist/client/assets/{tooltip-Cr9AJTu1.js → tooltip-DrpiSbRG.js} +1 -1
- package/dist/client/assets/{types-DIYYFrZY.js → types-C7syjwde.js} +4 -4
- package/dist/client/assets/{use-ai-providers-DnoPML_E.js → use-ai-providers-C7KmiuqP.js} +1 -1
- package/dist/client/assets/{use-automations-B4dRXrYb.js → use-automations-RMjkwkxX.js} +1 -1
- package/dist/client/assets/{use-capability-CDOjpxJe.js → use-capability-C6Dwri-U.js} +1 -1
- package/dist/client/assets/{use-clock-tick-DfB4yM8e.js → use-clock-tick-BcxdOJLx.js} +1 -1
- package/dist/client/assets/{use-collections-C6o5d0Mn.js → use-collections-B4atckEK.js} +1 -1
- package/dist/client/assets/{use-connection-RPVug9uL.js → use-connection-Dz29RF9P.js} +1 -1
- package/dist/client/assets/{use-copy-DByELpSB.js → use-copy-Xy0buIqd.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-DYyOoMN3.js → use-create-virtual-mcp-DVmI--_C.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-D9laFBFB.js → use-debounced-autosave-B4mbwJnu.js} +1 -1
- package/dist/client/assets/{use-debounced-value-Bs78etny.js → use-debounced-value-C6U3mliE.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-DavYF-aF.js → use-decopilot-events-CpQNzv3e.js} +1 -1
- package/dist/client/assets/{use-delete-connection-9x3-oXog.js → use-delete-connection-CqeuxO_6.js} +1 -1
- package/dist/client/assets/{use-file-configs-YQp2GWKp.js → use-file-configs-CFCmr--W.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-BmnUwDlC.js → use-infinite-scroll-BX1nHHVY.js} +1 -1
- package/dist/client/assets/{use-join-requests-wdTUrAXP.js → use-join-requests-j9WpmFq7.js} +1 -1
- package/dist/client/assets/{use-mcp-client-NDJy9UEP.js → use-mcp-client-xOK-OF8p.js} +2 -2
- package/dist/client/assets/{use-mcp-prompts-ziW0oQXD.js → use-mcp-prompts-Crr3H7P7.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-ByN1fg_5.js → use-mcp-tools-C8tMWwG9.js} +1 -1
- package/dist/client/assets/{use-members-CqCv95kS.js → use-members-BMNjJExY.js} +1 -1
- package/dist/client/assets/{use-mobile-C1ok2Oda.js → use-mobile-NlF-3RoP.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-GB89TSmS.js → use-navigate-to-agent-DZubxUSm.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-a0tV0I4a.js → use-org-auth-client-C_UJ3Vg_.js} +1 -1
- package/dist/client/assets/{use-org-fs-C4An_fXX.js → use-org-fs-DyK8omii.js} +1 -1
- package/dist/client/assets/{use-org-sso-DXOaOrbn.js → use-org-sso-DkqH8Zpz.js} +1 -1
- package/dist/client/assets/{use-organization-roles-CsUVzen8.js → use-organization-roles-Cu69Rnex.js} +1 -1
- package/dist/client/assets/{use-organization-settings-rqcqUUeR.js → use-organization-settings-DksiQdGc.js} +1 -1
- package/dist/client/assets/{use-registry-connections-BHtQ89zr.js → use-registry-connections-BOZLpkM5.js} +1 -1
- package/dist/client/assets/{use-secrets-CQoqzufN.js → use-secrets-CLmhH-Rb.js} +1 -1
- package/dist/client/assets/{use-status-sounds-yeVUNOcg.js → use-status-sounds-DxV7deix.js} +1 -1
- package/dist/client/assets/{use-view-mode-D7GDuIV9.js → use-view-mode-C2dllj6L.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-DQxIBquV.js → use-virtual-mcp-2U_MnYnK.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-RUqqRph1.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-fRYRtDkY.js +1 -0
- package/dist/client/assets/{useSuspenseQueries-DM2UC-1d.js → useSuspenseQueries-Cysvk68n.js} +1 -1
- package/dist/client/assets/{variant-calendar-Dkf9XIru.js → variant-calendar-mZn_D1Zo.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-1VKSbXaL.js → view-mode-toggle-4CQodGfa.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/server/cli.js +1 -1
- package/package.json +1 -1
- package/dist/client/assets/app-editor-Cfln2sHr.js +0 -1
- package/dist/client/assets/category-editor-BT4Cxoo3.js +0 -1
- package/dist/client/assets/file-explorer-BtYpNmrX.js +0 -2
- package/dist/client/assets/index-1MQY-aKx.css +0 -1
- package/dist/client/assets/index-DL5xoOQh.js +0 -513
- package/dist/client/assets/index-PHpiDror.js +0 -1
- package/dist/client/assets/page-seo-sheet-fP6EiExR.js +0 -1
- package/dist/client/assets/post-editor-CpIwB3m_.js +0 -1
- package/dist/client/assets/project-app-view-AkqKN49v.js +0 -1
- package/dist/client/assets/record-editor-Dm0nCNn9.js +0 -1
- package/dist/client/assets/registry-DhcyXlrd.js +0 -2
- package/dist/client/assets/seo-editor-BXwxtymi.js +0 -1
- package/dist/client/assets/store-registry-DKSrdFtG.js +0 -2
- package/dist/client/assets/toolbar-1nBak56S.js +0 -1
- package/dist/client/assets/useInfiniteQuery-BiSAb_zK.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-9J-jWStM.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as ue,l as
|
|
1
|
+
import{c as ue,l as ze,bG as Xe,j as U,cw as Ze,I as Le,m as Ne,D as se,K as ge,t as ne,C as le,L as de,b as qe,u as Fe,e as Ye,r as m,v as Je,a as et,J as tt,aK as nt}from"./index-CFiyU0D9.js";import{A as je,S as st,a as ot,d as at,e as rt,f as it,u as ct,w as lt}from"./hooks-CUSV6Enf.js";import{a as dt,u as ut,S as pt}from"./use-mcp-client-xOK-OF8p.js";import{a as ft}from"./use-virtual-mcp-2U_MnYnK.js";import{u as ht,b as me}from"./use-ai-providers-C7KmiuqP.js";import{u as mt}from"./use-decopilot-events-CpQNzv3e.js";import{n as gt,k as yt}from"./tab-id-BptcWVWa.js";import{d as St}from"./use-organization-settings-DksiQdGc.js";const xt={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.4-mini"]},vt={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.4"]},It={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.5"]},Ct={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"]},kt={openrouter:["perplexity/sonar","perplexity/sonar-pro"],deco:["perplexity/sonar","perplexity/sonar-pro"]},bt={openrouter:["perplexity/deep-research","perplexity/sonar-pro"],deco:["perplexity/deep-research","perplexity/sonar-pro"]};function Ue(t){return t.toLowerCase().replace(/[^a-z0-9]/g,"")}function Mt(t){return Ue(t).includes("deepresearch")}const Tt=["sonar","searchpreview","online"];function Qe(t){const e=Ue(t);return e.includes("deepresearch")?!1:Tt.some(n=>e.includes(n))}function Ke(t){return t.asyncResearch!==!0&&Qe(t.modelId)}function Ve(t){return t.asyncResearch===!0||Mt(t.modelId)||Qe(t.modelId)}function ie(t,e,n,s){for(const o of n){const a=t.find(r=>r.modelId===o);if(a)return{keyId:e,modelId:a.modelId,title:a.title}}for(const o of n){const a=t.find(r=>r.modelId.includes(o));if(a)return{keyId:e,modelId:a.modelId,title:a.title}}if(s){const o=t.find(s);if(o)return{keyId:e,modelId:o.modelId,title:o.title}}return null}function wt(t,e){const n={chat:{fast:null,smart:null,thinking:null},image:null,webSearch:null,deepResearch:null};for(const s of t){const o=e[s.id]??[],a=s.providerId;n.chat.fast||(n.chat.fast=ie(o,s.id,xt[a]??[])),n.chat.smart||(n.chat.smart=ie(o,s.id,vt[a]??[])),n.chat.thinking||(n.chat.thinking=ie(o,s.id,It[a]??[])),n.image||(n.image=ie(o,s.id,Ct[a]??[],r=>r.capabilities?.includes("image")===!0)),n.webSearch||(n.webSearch=ie(o,s.id,kt[a]??[],Ke)),n.deepResearch||(n.deepResearch=ie(o,s.id,bt[a]??[],Ve))}return n}const Et=Xe("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 fn(t){const e=ue.c(10),{variant:n,size:s}=t;let o;e[0]!==s||e[1]!==n?(o=ze(Et({variant:n,size:s})),e[0]=s,e[1]=n,e[2]=o):o=e[2];let a,r;e[3]===Symbol.for("react.memo_cache_sentinel")?(a=U.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=U.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]=a,e[4]=r):(a=e[3],r=e[4]);let l;e[5]!==o?(l=U.jsxs("svg",{"aria-hidden":"true",className:o,viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[a,r]}),e[5]=o,e[6]=l):l=e[6];let g;e[7]===Symbol.for("react.memo_cache_sentinel")?(g=U.jsx("span",{className:"sr-only",children:"Loading..."}),e[7]=g):g=e[7];let y;return e[8]!==l?(y=U.jsxs("div",{role:"status",children:[l,g]}),e[8]=l,e[9]=y):y=e[9],y}function At(t,e=[]){return t==="stop"?e.filter(o=>o.type==="text"&&o.text).map(o=>o.text).join(`
|
|
2
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 Me={decopilot:{harness:"decopilot",sandbox:"agent-sandbox"},"decopilot-desktop":{harness:"decopilot",sandbox:"user-desktop"},"claude-code-desktop":{harness:"claude-code",sandbox:"user-desktop"},"codex-desktop":{harness:"codex",sandbox:"user-desktop"}};function Rt(t,e){if(!t)return null;const n=e?Ze(e):null;if(t==="decopilot"&&n===null)return"decopilot";for(const[s,o]of Object.entries(Me))if(o.harness===t&&o.sandbox===n)return s;return null}function $t(t){return t.thread?.harness_id!=null?{}:{harnessId:t.globals.harnessId,sandboxProviderKind:t.globals.sandboxProviderKind,branch:t.globals.branch??null}}function Pt(t){const e=ue.c(10);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=Le(n);let o;if(e[1]!==s?.params.appSlug||e[2]!==s?.params.collectionName||e[3]!==s?.params.itemId||e[4]!==t){o=[],t&&o.push(`### Selected Agent
|
|
3
3
|
- ID: ${t}`);let a;e[6]!==s?.params.appSlug||e[7]!==s?.params.collectionName||e[8]!==s?.params.itemId?(a=[],s?.params.appSlug&&a.push(`- Connection ID: ${s?.params.appSlug}`),s?.params.collectionName&&a.push(`- Collection: ${s?.params.collectionName}`),s?.params.itemId&&a.push(`- Item ID: ${s?.params.itemId}`),e[6]=s?.params.appSlug,e[7]=s?.params.collectionName,e[8]=s?.params.itemId,e[9]=a):a=e[9],a.length>0&&o.push(`### Current Resource
|
|
4
4
|
The user is viewing the following resource:
|
|
@@ -19,10 +19,10 @@ Other files in \`${t.sandboxPath}/\`: ${s.join(", ")}`:"";return[{type:"text",te
|
|
|
19
19
|
${o}${a}`}]}function qt(t,e){const n=[];for(const s of t){if(s.role!=="user"||!s.content)continue;const o=Array.isArray(s.content)?s.content:[s.content];for(const a of o)switch(a.type){case"text":{const r=a.text?.trim();if(!r)continue;n.push({type:"text",text:`[${e}]
|
|
20
20
|
${r}`});break}case"image":case"audio":{if(!a.data||!a.mimeType)continue;n.push({type:"file",url:`data:${a.mimeType};base64,${a.data}`,mediaType:a.mimeType});break}case"resource":{const r=a.resource;if(!r||!r.mimeType)continue;r&&("text"in r&&r.text?n.push({type:"text",text:`[${e}]
|
|
21
21
|
${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 Be(t){if(!t)return[];const e=[];let n="";const s=o=>{if(o){if(o.type==="text"&&"text"in o&&typeof o.text=="string")n+=o.text;else if(o.type==="mention"&&o.attrs){const a=o.attrs.char??"/",r=`${a}${o.attrs.name}`;if(n+=r,a==="@"){const l=o.attrs.metadata;l&&!Array.isArray(l)&&"agentId"in l?e.push({type:"text",text:`[DELEGATE TO AGENT: ${l.title??o.attrs.name} (agent_id: ${l.agentId})]
|
|
22
|
-
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(l)&&e.push(...Pe(l,r))}else if(o.attrs.kind==="skill"){const l=o.attrs.metadata;l&&!Array.isArray(l)&&Array.isArray(l.files)&&e.push(...Nt(l,r))}else{const l=o.attrs.metadata||o.attrs.prompts||[];Array.isArray(l)&&l.length>0&&"role"in l[0]?e.push(...qt(l,r)):Array.isArray(l)&&e.push(...Pe(l,r))}}else if(o.type==="file"&&o.attrs){const a=o.attrs,r=`[file:://${encodeURIComponent(a.name)}]`;n+=r,e.push(...Lt(a,r))}if("content"in o&&Array.isArray(o.content))for(const a of o.content)s(a)}};return s(t),n.trim()&&e.unshift({type:"text",text:n.trim()}),e}function hn(t){const e=Be(t);return e.length===0?[]:[{id:crypto.randomUUID(),role:"user",parts:e,metadata:{tiptapDoc:t}}]}function mn(t){return new Set(t.filter(e=>e.status==="queued").map(e=>e.messageId))}function Ft(t){return(t??[]).map(e=>e?.type==="text"&&typeof e.text=="string"?e.text:"").join("").trim()}function gn(t){return t.filter(e=>e.status==="queued").sort((e,n)=>e.enqueuedAt-n.enqueuedAt)}function jt(t,e){return t.some(n=>n.messageId===e.messageId)?t:[...t,e]}function Ut(t,e){return t.filter(n=>n.messageId!==e)}const _e=new Map,we=new Set;function Qt(t){we.add(t)}function Kt(t){return we.has(t)}function Vt(t){we.delete(t)}function ye(t){let e=_e.get(t);return e||(e=new st([]),_e.set(t,e)),e}function He(t,e){ye(t).update(n=>jt(n,e))}function Te(t,e){ye(t).update(n=>Ut(n,e))}function Wt(t,e){ye(t).set(e)}const Ie=new Map;function Bt(t,e){Ie.set(`${t}:${e.id}`,e)}function Ht(t,e){const n=`${t}:${e}`,s=Ie.get(n);return Ie.delete(n),s}function De(t,e){Ie.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();Wt(e,s.items??[])}catch{}}function yn(t){const e=ue.c(2);let n;e[0]!==t?(n=ye(t),e[0]=t,e[1]=n):n=e[1];const s=n;return m.useSyncExternalStore(s.subscribe,s.get,s.get)}function
|
|
23
|
-
`);if(!v){he(i);return}new TextEncoder().encode(v).length>Yt||fe(O=>Object.keys(O).length>=Jt&&!(i in O)?O:{...O,[i]:v})},he=i=>{fe(h=>{const{[i]:D,...v}=h;return v})},[oe,ke]=le(de.chatLastAgentOption(e),i=>i&&i in Me?i:null),J=sn(),be=J?.isThreadLocked&&J.lockedHarness!=null?Rt(J.lockedHarness,J.lockedSandbox):null,$e=oe,ae=J?.isThreadLocked?be:$e,ve=ae?Me[ae]:null,c=ve?.harness??null,d=ve?.sandbox??null,[w,A]=m.useState(void 0),f=m.useRef(w);f.current=w;const P={selectedModel:
|
|
22
|
+
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(l)&&e.push(...Pe(l,r))}else if(o.attrs.kind==="skill"){const l=o.attrs.metadata;l&&!Array.isArray(l)&&Array.isArray(l.files)&&e.push(...Nt(l,r))}else{const l=o.attrs.metadata||o.attrs.prompts||[];Array.isArray(l)&&l.length>0&&"role"in l[0]?e.push(...qt(l,r)):Array.isArray(l)&&e.push(...Pe(l,r))}}else if(o.type==="file"&&o.attrs){const a=o.attrs,r=`[file:://${encodeURIComponent(a.name)}]`;n+=r,e.push(...Lt(a,r))}if("content"in o&&Array.isArray(o.content))for(const a of o.content)s(a)}};return s(t),n.trim()&&e.unshift({type:"text",text:n.trim()}),e}function hn(t){const e=Be(t);return e.length===0?[]:[{id:crypto.randomUUID(),role:"user",parts:e,metadata:{tiptapDoc:t}}]}function mn(t){return new Set(t.filter(e=>e.status==="queued").map(e=>e.messageId))}function Ft(t){return(t??[]).map(e=>e?.type==="text"&&typeof e.text=="string"?e.text:"").join("").trim()}function gn(t){return t.filter(e=>e.status==="queued").sort((e,n)=>e.enqueuedAt-n.enqueuedAt)}function jt(t,e){return t.some(n=>n.messageId===e.messageId)?t:[...t,e]}function Ut(t,e){return t.filter(n=>n.messageId!==e)}const _e=new Map,we=new Set;function Qt(t){we.add(t)}function Kt(t){return we.has(t)}function Vt(t){we.delete(t)}function ye(t){let e=_e.get(t);return e||(e=new st([]),_e.set(t,e)),e}function He(t,e){ye(t).update(n=>jt(n,e))}function Te(t,e){ye(t).update(n=>Ut(n,e))}function Wt(t,e){ye(t).set(e)}const Ie=new Map;function Bt(t,e){Ie.set(`${t}:${e.id}`,e)}function Ht(t,e){const n=`${t}:${e}`,s=Ie.get(n);return Ie.delete(n),s}function De(t,e){Ie.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();Wt(e,s.items??[])}catch{}}function yn(t){const e=ue.c(2);let n;e[0]!==t?(n=ye(t),e[0]=t,e[1]=n):n=e[1];const s=n;return m.useSyncExternalStore(s.subscribe,s.get,s.get)}function Gt(){const{org:t}=se();return{enqueue:He,refresh:e=>X(t.slug,e),cancel:async(e,n)=>{const s=`thread-run:${e}:${n}`;Te(e,n);try{const o=await fetch(`/api/${encodeURIComponent(t.slug)}/decopilot/queue/${encodeURIComponent(e)}/cancel/${encodeURIComponent(s)}`,{method:"POST",credentials:"include"});if(!o.ok&&o.status!==404)throw new Error(`Cancel failed: ${o.status}`);return!0}catch(o){return ne.error(o instanceof Error?o.message:"Failed to cancel"),!1}finally{await X(t.slug,e)}}}}const Oe=new Set,ee=new Set;function ce(t){return m.useSyncExternalStore(t.subscribe,t.get,t.get)}function zt(t){return t.kind==="loading"?"ready":t.kind}function te(t,e,n,s){if(!t)return null;const o=e.find(r=>r.id===t.keyId);if(!o)return null;const a=n.find(r=>r.modelId===t.modelId);return a?{...a,keyId:t.keyId}:{modelId:t.modelId,title:s??t.modelId,keyId:t.keyId,providerId:o.providerId,description:null,logo:null,capabilities:[],limits:null,costs:null}}function Xt(t){return t==="fast"||t==="smart"||t==="thinking"?t:"smart"}function Zt(t,e,n,s){if(!n||s.length===0)return null;const o=e.find(g=>g.id===n);if(!o)return null;const a=wt([o],{[n]:s}),r=t==="fast"?a.chat.fast:t==="thinking"?a.chat.thinking:a.chat.smart;if(!r)return null;const l=s.find(g=>g.modelId===r.modelId);return l?{...l,keyId:n}:null}const Yt=1e4,Jt=10,Ee=m.createContext(null),Ae=m.createContext(null),Re=m.createContext(null),Ge=m.createContext(null);function en({children:t}){const{locator:e}=se(),{virtualMcpId:n}=We(),[s,o]=le(de.chatSelectedImageModel(e),null),[a,r]=le(de.chatSelectedWebSearchModel(e),null),[l,g]=le(de.chatSelectedDeepResearchModel(e),null),[y,I]=m.useState(null),[T,q]=m.useState("default"),p=St(),[R,Q]=le(de.chatSimpleModeTier(e),null),_=Xt(R),C=ht(),k=p.tiers[_],$=y&&C.some(i=>i.id===y)?y:k?.keyId??C[0]?.id??null,{models:S,isLoading:K}=me($??void 0),{models:H}=me(k?.keyId),{models:Z}=me(p.tiers.image?.keyId),{models:M}=me(p.tiers.web_search?.keyId),{models:V}=me(p.tiers.deep_research?.keyId),G=te(k,C,H,k?.title)??Zt(_,C,$,S),W=K,B=S.filter(i=>i.capabilities?.includes("image")),F=te(s,C,B),u=te(p.tiers.image,C,Z,p.tiers.image?.title)??F??B[0]??null,E=S.filter(Ke),L=te(a,C,E),Y=E.find(i=>i.modelId==="perplexity/sonar")??E[0]??null,j=te(p.tiers.web_search,C,M,p.tiers.web_search?.title)??L??Y,N=S.filter(Ve),b=te(l,C,N),x=N.find(i=>i.modelId==="perplexity/deep-research")??N.find(i=>i.asyncResearch===!0)??N[0]??null,z=te(p.tiers.deep_research,C,V,p.tiers.deep_research?.title)??b??x,Se=ft(n)??{id:n,title:"",description:null,icon:null},[Ce,fe]=m.useState({}),xe=(i,h)=>{const D=[];for(const O of h.content??[])O.type==="text"&&O.text?.trim()&&D.push(O.text.trim());const v=D.join(`
|
|
23
|
+
`);if(!v){he(i);return}new TextEncoder().encode(v).length>Yt||fe(O=>Object.keys(O).length>=Jt&&!(i in O)?O:{...O,[i]:v})},he=i=>{fe(h=>{const{[i]:D,...v}=h;return v})},[oe,ke]=le(de.chatLastAgentOption(e),i=>i&&i in Me?i:null),J=sn(),be=J?.isThreadLocked&&J.lockedHarness!=null?Rt(J.lockedHarness,J.lockedSandbox):null,$e=oe,ae=J?.isThreadLocked?be:$e,ve=ae?Me[ae]:null,c=ve?.harness??null,d=ve?.sandbox??null,[w,A]=m.useState(void 0),f=m.useRef(w);f.current=w;const P={selectedModel:G,setModel:()=>{},credentialId:$,setCredentialId:I,allModelsConnections:C,isModelsLoading:W,selectedVirtualMcp:Se,imageModel:u,setImageModel:i=>{o(i?.keyId?{keyId:i.keyId,modelId:i.modelId}:null)},webSearchModel:j,setWebSearchModel:i=>{r(i?.keyId?{keyId:i.keyId,modelId:i.modelId}:null)},deepResearchModel:z,setDeepResearchModel:i=>{g(i?.keyId?{keyId:i.keyId,modelId:i.modelId}:null)},chatMode:T,setChatMode:q,appContexts:Ce,setAppContext:xe,clearAppContext:he,tiptapDoc:w,setTiptapDoc:A,tiptapDocRef:f,resetInteraction:()=>{},simpleModeTier:_,setSimpleModeTier:i=>Q(i),pendingAgentOption:ae,setPendingAgentOption:ke,pendingHarnessId:c,pendingSandboxProviderKind:d};return U.jsx(Re.Provider,{value:P,children:t})}function Sn(t){const e=ue.c(41),{virtualMcpId:n,task:s,children:o}=t,{locator:a}=se(),{data:r}=et.useSession(),l=r?.user??null,{taskId:g,virtualMcpId:y,navigateToTask:I}=We(),[T]=tt(),{markTaskRead:q}=Dt(),p=ct(),R=g,Q=y,_=Pt(Q);let C;e[0]!==q||e[1]!==I?(C=(b,x)=>{q(b),I(b,{virtualMcpId:x?.virtualMcpId,autosend:x?.autosend})},e[0]=q,e[1]=I,e[2]=C):C=e[2];const k=C,$=R&&s?.id===R?s:null,S=$?.harness_id??null,K=$?.sandbox_provider_kind??null,H=$?.branch??null,Z=S!=null,M=H;let V;e[3]!==M||e[4]!==k||e[5]!==p||e[6]!==n?(V=()=>{const b=crypto.randomUUID();return p.create({id:b,virtual_mcp_id:n,...M?{branch:M}:{}}).then(()=>k(b)).catch(()=>{k(b)}),b},e[3]=M,e[4]=k,e[5]=p,e[6]=n,e[7]=V):V=e[7];const G=V;let W;e[8]!==M||e[9]!==a||e[10]!==k||e[11]!==p||e[12]!==n?(W=b=>{const x=crypto.randomUUID(),z=b.virtualMcpId??n,pe=z===n?M:null;lt(sessionStorage,a,x,b.message),p.create({id:x,virtual_mcp_id:z,...pe?{branch:pe}:{}}).then(()=>k(x,{virtualMcpId:b.virtualMcpId,autosend:!0})).catch(()=>{k(x,{virtualMcpId:b.virtualMcpId,autosend:!0})})},e[8]=M,e[9]=a,e[10]=k,e[11]=p,e[12]=n,e[13]=W):W=e[13];const B=W;let F;e[14]!==R||e[15]!==p?(F=b=>{R&&p.setBranch(R,b)},e[14]=R,e[15]=p,e[16]=F):F=e[16];let u;e[17]!==$||e[18]!==G||e[19]!==B||e[20]!==M||e[21]!==R||e[22]!==Q||e[23]!==Z||e[24]!==H||e[25]!==S||e[26]!==K||e[27]!==k||e[28]!==F?(u={virtualMcpId:Q,taskId:R,openTask:k,createTask:G,createTaskWithMessage:B,activeTask:$,isThreadLocked:Z,lockedHarness:S,lockedSandbox:K,lockedBranch:H,currentBranch:M,setCurrentTaskBranch:F},e[17]=$,e[18]=G,e[19]=B,e[20]=M,e[21]=R,e[22]=Q,e[23]=Z,e[24]=H,e[25]=S,e[26]=K,e[27]=k,e[28]=F,e[29]=u):u=e[29];const E=u;let L;e[30]!==_||e[31]!==T||e[32]!==I||e[33]!==l?(L={user:l,contextPrompt:_,preferences:T,rawNavigateToTask:I},e[30]=_,e[31]=T,e[32]=I,e[33]=l,e[34]=L):L=e[34];const Y=L;let j;e[35]!==o||e[36]!==Y?(j=U.jsx(en,{children:U.jsx(Ge.Provider,{value:Y,children:o})}),e[35]=o,e[36]=Y,e[37]=j):j=e[37];let N;return e[38]!==j||e[39]!==E?(N=U.jsx(Ae.Provider,{value:E,children:j}),e[38]=j,e[39]=E,e[40]=N):N=e[40],N}function xn({taskId:t,children:e}){const{virtualMcpId:n,activeTask:s,currentBranch:o}=tn();t&&!Oe.has(t)&&(Oe.add(t),Je("chat_opened",{thread_id:t}));const{imageModel:a,webSearchModel:r,deepResearchModel:l,chatMode:g,setChatMode:y,appContexts:I,setTiptapDoc:T,simpleModeTier:q,pendingSandboxProviderKind:p,pendingHarnessId:R}=nn(),Q=m.useContext(Ge);if(!Q)throw new Error("ActiveTaskProvider must be used within ChatContextProvider");const{user:_,contextPrompt:C,preferences:k,rawNavigateToTask:$}=Q,{org:S,locator:K}=se(),H=Gt(),[Z,M]=m.useState(null),V=_t(),G=Ne(),W=ot(),B=qe(),F=ut({connectionId:pt,orgId:S.id,orgSlug:S.slug}),u=at(S.slug,t,{client:F});m.use(u.ready);const E=ce(u.messages),L=ce(u.status),Y=ce(u.finishReason),j=ce(u.runStatusStage),N=ce(u.hasMoreOlder),b=ce(u.isFetchingOlder),x=m.useRef({onToolCall:V,queryClient:G,rawNavigateToTask:$,taskId:t,manager:W,navigate:B,orgId:S.id,orgSlug:S.slug});x.current={onToolCall:V,queryClient:G,rawNavigateToTask:$,taskId:t,manager:W,navigate:B,orgId:S.id,orgSlug:S.slug},mt({orgSlug:S.slug,taskId:t,onTaskStatus:c=>{const d=x.current,w=c.data.message_id;if(c.data.status==="in_progress"&&w){Te(d.taskId,w);const A=Ht(d.taskId,w);A&&u.applyLocalMessage(A),X(d.orgSlug,d.taskId)}Kt(d.taskId)&&(async()=>(await X(d.orgSlug,d.taskId),await u.reconcileFromServer()&&ye(d.taskId).get().length===0&&Vt(d.taskId)))()}}),m.useEffect(()=>{const c={onData:f=>{if(f.type==="data-thread-title"){const P=f.data;if(!P?.title)return;const i=x.current;if(!i.taskId)return;i.manager.patchThread({id:i.taskId,title:P.title,updated_at:new Date().toISOString()});return}if(f.type==="data-deck-updated"){const P=f.data;if(!P?.path)return;const i=P.path,h=x.current;h.queryClient.invalidateQueries({queryKey:ge.orgFsStat(h.orgId,"home",i)}),h.queryClient.invalidateQueries({queryKey:ge.orgFsRecent(h.orgId)}),h.navigate({to:".",search:D=>({...D,main:yt(i)}),replace:!0});return}},onFinish:(f,P,i)=>{const h=x.current;h.taskId&&X(h.orgSlug,h.taskId),h.taskId&&h.manager.patchThread({id:h.taskId,status:At(i,f.parts),updated_at:new Date().toISOString()});const D=f.parts?.some(O=>{const re=O;return(re.type==="tool-share_with_user"||re.type==="tool-bash"||re.type==="tool-write")&&re.state==="output-available"});if(h.taskId&&D){const O=ge.threadOutputs(h.taskId);for(const re of[0,1500,3e3,6e3,12e3,25e3])setTimeout(()=>{h.queryClient.invalidateQueries({queryKey:O})},re)}h.queryClient.invalidateQueries({queryKey:ge.homeNextActions(h.orgSlug)});const v=f.metadata?.thread_id;v&&v!==h.taskId&&h.rawNavigateToTask(v)},onError:f=>{M(f),console.error("[chat] Error",f)},onToolCall:f=>x.current.onToolCall(f)};u.observer=c,X(x.current.orgSlug,x.current.taskId);const d=f=>f==="submitted"||f==="streaming";let w=d(u.status.get().kind);const A=u.status.subscribe(()=>{const f=d(u.status.get().kind);if(f===w)return;w=f;const P=x.current;X(P.orgSlug,P.taskId)});return()=>{u.observer===c&&(u.observer=null),A()}},[u]);const z=L.kind==="submitted"||L.kind==="streaming",pe=E.length===0,Se=E.at(-1),Ce=!z&&Se?.role==="assistant"&&Se.parts.some(c=>"state"in c&&c.state==="approval-requested"),fe=s,xe=(fe?.status==="in_progress"||fe?.status==="expired")&&L.kind==="ready"&&E.length>0;async function he(c){const d=t,w=n,A=Object.entries(I),f=A.length>0?A.map(([D,v])=>`### App Context: ${D}
|
|
24
24
|
${v}`).join(`
|
|
25
25
|
|
|
26
26
|
`):"",P=[C,f].filter(Boolean).join(`
|
|
27
27
|
|
|
28
|
-
`);let i=g;i==="gen-image"&&!a&&(i="default"),i==="web-search"&&!r&&(i="default"),i==="deep-research"&&!l&&(i="default"),(i==="web-search"||i==="deep-research")&&y("default");const h={tier:q,mode:i,toolApprovalLevel:k.toolApprovalLevel??nt(),system:P||void 0,agent:{id:w},thread_id:d,...$t({thread:s?{harness_id:s.harness_id??null,sandbox_provider_kind:s.sandbox_provider_kind??null,branch:s.branch??null}:null,globals:{harnessId:R??void 0,sandboxProviderKind:p??void 0,branch:o}})};try{if(
|
|
28
|
+
`);let i=g;i==="gen-image"&&!a&&(i="default"),i==="web-search"&&!r&&(i="default"),i==="deep-research"&&!l&&(i="default"),(i==="web-search"||i==="deep-research")&&y("default");const h={tier:q,mode:i,toolApprovalLevel:k.toolApprovalLevel??nt(),system:P||void 0,agent:{id:w},thread_id:d,...$t({thread:s?{harness_id:s.harness_id??null,sandbox_provider_kind:s.sandbox_provider_kind??null,branch:s.branch??null}:null,globals:{harnessId:R??void 0,sandboxProviderKind:p??void 0,branch:o}})};try{if(z||xe){let D=!0;try{Bt(d,c),await u.enqueue(c,h),He(d,{workflowId:`thread-run:${d}:${c.id}`,messageId:c.id,text:Ft(c.parts),hasAttachments:c.parts.some(v=>v.type==="file"),status:"queued",enqueuedAt:Date.now(),optimistic:!0}),Qt(d)}catch(v){D=!1,De(d,c.id),Te(d,c.id),M(v instanceof Error?v:new Error(String(v))),ne.error(v instanceof Error?v.message:"Failed to queue message")}return X(S.slug,d),D}return await u.submit({kind:"message",message:c},h),!0}finally{ee.delete(d)}}async function oe(c){const d=c.parts??Be(c.tiptapDoc);if(d.length===0||ee.has(t))return;ee.add(t),M(null),T(void 0);const w={tiptapDoc:c.tiptapDoc,created_at:new Date().toISOString(),user:{avatar:_?.image??void 0,name:_?.name??"you"}},A={id:crypto.randomUUID(),role:"user",parts:d,metadata:w};await he(A)}async function ke(c,d){if(ee.has(t))return ne.info("Still sending your previous message — try again in a moment"),!1;if(ee.add(t),!await H.cancel(t,c))return ee.delete(t),ne.error("Couldn't remove the original message"),!1;De(t,c),u.removeLocalMessage(c);const A={id:crypto.randomUUID(),role:"user",parts:[{type:"text",text:d}],metadata:{created_at:new Date().toISOString(),user:{avatar:_?.image??void 0,name:_?.name??"you"}}};try{return await he(A)}catch(f){return ne.error(f instanceof Error?f.message:"Failed to send edited message"),!1}}const J=async()=>{u.stop();try{const c=await fetch(`/api/${S.slug}/decopilot/cancel/${t}`,{method:"POST",credentials:"include"});if(c.status===404)return;if(!c.ok){const d=await c.json().catch(()=>({}));throw new Error(d.message??`Cancel failed: ${c.status}`)}}catch(c){const d=c instanceof Error?c.message:"Failed to cancel";ne.error(d),console.error("[chat] cancelRun",c)}},be=c=>c&&typeof c=="object"&&"type"in c?oe({tiptapDoc:c}):oe(c),ae=Fe({strict:!1}).autosend===je;m.useEffect(()=>{if(!ae||E.length>0)return;const c=rt(sessionStorage,K,t);c&&oe(c.message).then(()=>{it(sessionStorage,K,t)})},[ae,E.length,K,t,oe]);const ve={messages:E,status:zt(L),sendMessage:be,editQueuedMessage:ke,stop:()=>{J()},submit:(c,d)=>u.submit(c,d),removeLocalMessage:c=>u.removeLocalMessage(c),isSendInFlight:()=>ee.has(t),error:Z,clearError:()=>M(null),finishReason:Y,runStatusStage:j,clearFinishReason:()=>u.finishReason.set(null),isStreaming:z,isChatEmpty:pe,isWaitingForApprovals:Ce??!1,isRunInProgress:xe,hasMoreOlder:N,isFetchingOlder:b,fetchOlderMessages:u.fetchOlderMessages.bind(u)};return U.jsx(Ee.Provider,{value:ve,children:e})}function vn(){const t=m.useContext(Ee);if(!t)throw new Error("useChatStream must be used within ActiveTaskProvider");return t}function In(){return m.useContext(Ee)}function tn(){const t=m.useContext(Ae);if(!t)throw new Error("useChatTask must be used within ChatContextProvider");return t}function nn(){const t=m.useContext(Re);if(!t)throw new Error("useChatPrefs must be used within ChatContextProvider");return t}function Cn(){return m.useContext(Re)}function sn(){return m.useContext(Ae)}export{xn as A,en as C,fn as S,tn as a,nn as b,sn as c,Be as d,yn as e,Gt as f,De as g,Rt as h,In as i,Sn as j,mn as k,Cn as l,Ke as m,Ve as n,wt as p,gn as s,hn as t,vn as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as n,l as d,j as c,
|
|
1
|
+
import{c as n,l as d,j as c,bH as l,bI as b}from"./index-CFiyU0D9.js";import{i as m}from"./ChevronUp-DBpw6M-L.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(b,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-primary-foreground transition-none",children:c.jsx(m,{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-CFiyU0D9.js";import{A as u}from"./auth-split-layout-5YwPgbAb.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 y,j as t,B as F,i as X,o as Ge,s as se,E as Pe,r as T,D as ie,p as Qe,l as V,bg as Ye,u as Xe,G,t as Ze,e as ae,b2 as ke}from"./index-DmjWDqcd.js";import{E as Ee}from"./empty-state-0bsCiepl.js";import{u as et,a as Ae}from"./use-collections-C6o5d0Mn.js";import{u as ce}from"./use-mcp-client-NDJy9UEP.js";import{F as ne,a as tt,b as de,d as me}from"./form-Dvd73W2C.js";import{I as ue}from"./input-BlaLo4Ee.js";import{T as re}from"./textarea-DzC7ppsf.js";import{a as st,b as nt,V as xe,O as ot,M as lt}from"./index-DkjetCaY.js";import{al as rt,y as it,aa as at,am as ct,_ as dt,an as mt,N as be}from"./agent-icon-Ba-0ZYgG.js";import{g as ut,M as xt,a as Ne}from"./types-DIYYFrZY.js";import{A as pt,a as ft,b as ht}from"./alert-nxT5lZho.js";import{d as ve,b as Se,c as ye,S as we,a as oe}from"./select-ySr8WoR1.js";import{c as gt,T as Ce,a as Ie,b as $e}from"./tooltip-Cr9AJTu1.js";import{i as jt}from"./AlertCircle-HztvGgEK.js";import{s as bt}from"./Stars02-CO1akjaP.js";import{a as Nt}from"./Eye-BuXBYPNx.js";import{i as vt}from"./Play-BaPiITj6.js";import{i as St}from"./ChevronRight-HkVZWjVD.js";import{g as yt}from"./connection-slug-eyAPH6o3.js";import{u as wt,T as Ct}from"./tools-list-CTCIGteU.js";import{a as Oe,u as Re}from"./use-connection-RPVug9uL.js";import{a as It}from"./use-mcp-tools-ByN1fg_5.js";import{c as $t}from"./content-blocks-o63cs2vh.js";import{I as Te}from"./integration-icon-BF4ETuj8.js";import{i as Tt,l as Pt}from"./chat-context-Ba1J4Wbr.js";import{b as kt}from"./shell-layout-CdseotG7.js";import{M as Et}from"./monaco-editor-BKh1966p.js";import{n as At}from"./XCircle-BEhXc7sQ.js";import"./auth-CqOhN4mO.js";import"./label-GEC2UjFS.js";import"./index-DrUwfEHA.js";import"./sidebar-H8VlLCcE.js";import"./LayoutLeft-CvZZnjM_.js";import"./use-mobile-C1ok2Oda.js";import"./sheet-X3VztLnq.js";import"./X-BJ5AK9_B.js";import"./ZoomOut-9WiOjKDc.js";import"./Key01-B-rzooWI.js";import"./extract-connection-data-Dk45baha.js";import"./use-registry-connections-BHtQ89zr.js";import"./use-organization-settings-rqcqUUeR.js";import"./studio-tools-BWRE75AX.js";import"./Plus-cqzweyhV.js";import"./index-B_kMLuGG.js";import"./index-BFlpjafk.js";import"./index--njjOK24.js";import"./popover-BxWSrnHV.js";import"./use-virtual-mcp-DQxIBquV.js";import"./ChevronUp-DLoyITzq.js";import"./SearchMd-B_E38g9S.js";import"./Users03-B7auzTEh.js";import"./use-create-virtual-mcp-DYyOoMN3.js";import"./use-navigate-to-agent-GB89TSmS.js";import"./Tool01-Dc5WA1H4.js";import"./SwitchHorizontal01-CtPAye2M.js";import"./Settings02-HJQMPAnK.js";import"./ArrowUpRight-CD45Pqa3.js";import"./ZapSquare-CmmJkOPb.js";import"./CheckCircle-B93tZkib.js";import"./ChevronDown-BHp2n33E.js";import"./ChevronLeft-CkLGnzyI.js";import"./DotsVertical-DBVnta3o.js";import"./Globe01-DbyYsbkQ.js";import"./FilterLines-JdWf41nd.js";import"./Star01-BLuwEqBm.js";import"./Globe04-ht6-fzwU.js";import"./HardDrive-QsbiOkra.js";import"./LinkExternal01-C75h4nTA.js";import"./Monitor01-C751a6VH.js";import"./Sun-DGf33qzc.js";import"./Palette-Cw4TmFXF.js";import"./SearchLg-BgcbIGrG.js";import"./Shield01-CYOeouzJ.js";import"./Stars01-bmKEIBXR.js";import"./Trash01-Dn19EDIc.js";import"./Upload01-AmIm4zQN.js";import"./User01-CYnD1B0h.js";import"./Users01-B3f8K1I8.js";import"./XClose-BaODJMh0.js";import"./Zap-CDSogr5w.js";import"./mcp-oauth-sGspCuYg.js";import"./badge-ULvYE549.js";import"./hooks-tDbCB3C5.js";import"./decopilot-sse-pool-BR9ewfWR.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./use-ai-providers-DnoPML_E.js";import"./use-decopilot-events-DavYF-aF.js";import"./tab-id-BptcWVWa.js";import"./avatar-DUFWGs9Z.js";import"./dialog-onqVrhoh.js";import"./required-auth-layout-CykGSzYq.js";import"./use-org-sso-DXOaOrbn.js";import"./index-1nPke5TY.js";function Ot(s){const e=y.c(15),{onSave:o,onUndo:n,isDirty:l,isSaving:r,saveLabel:a,undoLabel:c}=s,i=a===void 0?"Save":a,u=c===void 0?"Undo":c;if(!l)return null;let x;e[0]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx(rt,{size:14}),e[0]=x):x=e[0];let m;e[1]!==r||e[2]!==n||e[3]!==u?(m=t.jsxs(F,{variant:"outline",size:"sm",onClick:n,disabled:r,"aria-label":u,children:[x,u]}),e[1]=r,e[2]=n,e[3]=u,e[4]=m):m=e[4];let p;e[5]!==r?(p=r?t.jsx(X,{size:14,className:"animate-spin"}):t.jsx(it,{size:14}),e[5]=r,e[6]=p):p=e[6];let f;e[7]!==r||e[8]!==o||e[9]!==i||e[10]!==p?(f=t.jsxs(F,{variant:"default",size:"sm",onClick:o,disabled:r,"aria-label":i,children:[p,i]}),e[7]=r,e[8]=o,e[9]=i,e[10]=p,e[11]=f):f=e[11];let g;return e[12]!==m||e[13]!==f?(g=t.jsxs(t.Fragment,{children:[m,f]}),e[12]=m,e[13]=f,e[14]=g):g=e[14],g}Ge({title:se().min(1),description:se().nullable(),body:se()});function le(s){for(const e of s.messages??[])if(e.role==="user"&&e.content?.type==="text")return e.content.text??"";return""}function Rt(){const s=window.location.pathname.split("/").filter(Boolean),e=s.findIndex(n=>n==="mcps"),o=e>=0?s[e+1]:void 0;return o?decodeURIComponent(o):void 0}function _t(s){const e=y.c(13),{form:o}=s;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx("div",{className:"text-sm font-medium text-foreground",children:"Details"}),e[0]=n):n=e[0];let l;e[1]!==o.control?(l=t.jsxs("div",{className:"flex flex-col gap-4",children:[n,t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsx(ne,{control:o.control,name:"title",render:zt}),t.jsx(ne,{control:o.control,name:"description",render:Mt})]})]}),e[1]=o.control,e[2]=l):l=e[2];let r,a;e[3]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx("div",{className:"text-sm font-medium text-foreground",children:"Message"}),a=t.jsx("div",{className:"text-xs text-muted-foreground",children:"This becomes the user message in the prompt."}),e[3]=r,e[4]=a):(r=e[3],a=e[4]);let c;e[5]!==o.control?(c=t.jsxs("div",{className:"flex flex-col gap-2",children:[r,a,t.jsx(ne,{control:o.control,name:"body",render:Dt})]}),e[5]=o.control,e[6]=c):c=e[6];let i;e[7]!==l||e[8]!==c?(i=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:[l,c]}),e[7]=l,e[8]=c,e[9]=i):i=e[9];let u;return e[10]!==o||e[11]!==i?(u=t.jsx(tt,{...o,children:i}),e[10]=o,e[11]=i,e[12]=u):u=e[12],u}function Dt(s){const{field:e}=s;return t.jsx(de,{children:t.jsx(me,{children:t.jsx(re,{...e,value:e.value??"",placeholder:"Write the prompt message…",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"})})})}function Mt(s){const{field:e}=s;return t.jsxs(de,{children:[t.jsx("div",{className:"text-xs text-muted-foreground",children:"Description"}),t.jsx(me,{children:t.jsx(ue,{...e,value:e.value??"",placeholder:"Add a description…",className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})}function zt(s){const{field:e}=s;return t.jsxs(de,{children:[t.jsx("div",{className:"text-xs text-muted-foreground",children:"Title"}),t.jsx(me,{children:t.jsx(ue,{...e,placeholder:"Untitled prompt",className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})}function Lt(s){const e=y.c(36),{providerId:o,promptId:n}=s,{org:l}=ie(),r=o||null;let a;e[0]!==l.id||e[1]!==l.slug||e[2]!==r?(a={connectionId:r,orgId:l.id,orgSlug:l.slug},e[0]=l.id,e[1]=l.slug,e[2]=r,e[3]=a):a=e[3];const c=ce(a),i=et(o,"PROMPT",n,c),u=Ae(o,"PROMPT",c),x=u.update.isPending;let m;e[4]!==i?(m=i?{title:i.title,description:i.description??null,body:le(i)}:void 0,e[4]=i,e[5]=m):m=e[5];let p;e[6]!==m?(p={values:m},e[6]=m,e[7]=p):p=e[7];const f=Qe(p);let g;e[8]!==f||e[9]!==i?(g=()=>{i&&f.reset({title:i.title,description:i.description??null,body:le(i)})},e[8]=f,e[9]=i,e[10]=g):g=e[10];const S=g;let I;e[11]!==u.update||e[12]!==f||e[13]!==n?(I=f.handleSubmit(async N=>{const A=await u.update.mutateAsync({id:n,data:{title:N.title,description:N.description,arguments:[],icons:[],messages:[{role:"user",content:{type:"text",text:N.body}}]}});f.reset({title:A.title,description:A.description??null,body:le(A)})}),e[11]=u.update,e[12]=f,e[13]=n,e[14]=I):I=e[14];const R=I;if(!i){let N;return e[15]===Symbol.for("react.memo_cache_sentinel")?(N=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Ee,{title:"Prompt not found",description:"This prompt may have been deleted or you may not have access to it."})}),e[15]=N):N=e[15],N}let $;e[16]!==i.title?($=t.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:i.title}),e[16]=i.title,e[17]=$):$=e[17];let E;e[18]!==i.description?(E=i.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:i.description})]}):null,e[18]=i.description,e[19]=E):E=e[19];let P;e[20]!==$||e[21]!==E?(P=t.jsx(nt,{children:t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[$,E]})}),e[20]=$,e[21]=E,e[22]=P):P=e[22];let b;e[23]!==R?(b=()=>{R()},e[23]=R,e[24]=b):b=e[24];let w;e[25]!==f.formState.isDirty||e[26]!==x||e[27]!==S||e[28]!==b?(w=t.jsx(st,{children:t.jsx(Ot,{onSave:b,onUndo:S,isDirty:f.formState.isDirty,isSaving:x})}),e[25]=f.formState.isDirty,e[26]=x,e[27]=S,e[28]=b,e[29]=w):w=e[29];let C;e[30]!==f?(C=t.jsx("div",{className:"h-full",children:t.jsx(_t,{form:f})}),e[30]=f,e[31]=C):C=e[31];let k;return e[32]!==w||e[33]!==C||e[34]!==P?(k=t.jsxs(xe,{children:[P,w,C]}),e[32]=w,e[33]=C,e[34]=P,e[35]=k):k=e[35],k}function Ut(s){const e=y.c(4),{itemId:o}=s;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=Rt(),e[0]=n):n=e[0];const l=n;if(!l){let a;return e[1]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Ee,{title:"Prompt not found",description:"Missing connection information in the current route."})}),e[1]=a):a=e[1],a}let r;return e[2]!==o?(r=t.jsx(Pe,{children:t.jsx(T.Suspense,{fallback:null,children:t.jsx(Lt,{providerId:l,promptId:o})})}),e[2]=o,e[3]=r):r=e[3],r}function _e(s){const e=y.c(8);let o,n;e[0]!==s?({className:o,...n}=s,e[0]=s,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let l;e[3]!==o?(l=V("min-w-0 overflow-hidden",o),e[3]=o,e[4]=l):l=e[4];let r;return e[5]!==n||e[6]!==l?(r=t.jsx("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",className:l,...n}),e[5]=n,e[6]=l,e[7]=r):r=e[7],r}function De(s){const e=y.c(8);let o,n;e[0]!==s?({className:o,...n}=s,e[0]=s,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let l;e[3]!==o?(l=V("flex items-center gap-1.5 text-sm sm:gap-2 overflow-hidden",o),e[3]=o,e[4]=l):l=e[4];let r;return e[5]!==n||e[6]!==l?(r=t.jsx("ol",{"data-slot":"breadcrumb-list",className:l,...n}),e[5]=n,e[6]=l,e[7]=r):r=e[7],r}function q(s){const e=y.c(8);let o,n;e[0]!==s?({className:o,...n}=s,e[0]=s,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let l;e[3]!==o?(l=V("inline-flex items-center gap-1.5 min-w-0",o),e[3]=o,e[4]=l):l=e[4];let r;return e[5]!==n||e[6]!==l?(r=t.jsx("li",{"data-slot":"breadcrumb-item",className:l,...n}),e[5]=n,e[6]=l,e[7]=r):r=e[7],r}function Q(s){const e=y.c(10);let o,n,l;e[0]!==s?({asChild:o,className:n,...l}=s,e[0]=s,e[1]=o,e[2]=n,e[3]=l):(o=e[1],n=e[2],l=e[3]);const r=o?Ye:"a";let a;e[4]!==n?(a=V("hover:text-foreground transition-colors truncate",n),e[4]=n,e[5]=a):a=e[5];let c;return e[6]!==r||e[7]!==l||e[8]!==a?(c=t.jsx(r,{"data-slot":"breadcrumb-link",className:a,...l}),e[6]=r,e[7]=l,e[8]=a,e[9]=c):c=e[9],c}function Me(s){const e=y.c(8);let o,n;e[0]!==s?({className:o,...n}=s,e[0]=s,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let l;e[3]!==o?(l=V("text-foreground font-medium truncate",o),e[3]=o,e[4]=l):l=e[4];let r;return e[5]!==n||e[6]!==l?(r=t.jsx("span",{"data-slot":"breadcrumb-page",role:"link","aria-disabled":"true","aria-current":"page",className:l,...n}),e[5]=n,e[6]=l,e[7]=r):r=e[7],r}function Y(s){const e=y.c(12);let o,n,l;e[0]!==s?({children:o,className:n,...l}=s,e[0]=s,e[1]=o,e[2]=n,e[3]=l):(o=e[1],n=e[2],l=e[3]);let r;e[4]!==n?(r=V("[&>svg]:size-3.5 text-muted-foreground opacity-50 list-none shrink-0",n),e[4]=n,e[5]=r):r=e[5];let a;e[6]!==o?(a=o??t.jsx(St,{}),e[6]=o,e[7]=a):a=e[7];let c;return e[8]!==l||e[9]!==r||e[10]!==a?(c=t.jsx("li",{"data-slot":"breadcrumb-separator",role:"presentation","aria-hidden":"true",className:r,...l,children:a}),e[8]=l,e[9]=r,e[10]=a,e[11]=c):c=e[11],c}const Bt=s=>s.replace(/_/g," ").replace(/\b\w/g,e=>e.toLocaleLowerCase());function Ft(s){const e=y.c(11),{toolName:o,connectionId:n,siblings:l,onSelectInstance:r,onBack:a}=s;let c;e[0]!==n?(c={connectionId:n},e[0]=n,e[1]=c):c=e[1];const i=wt(c);if(!i.isAuthenticated){let m;return e[2]!==i.supportsOAuth||e[3]!==a?(m=t.jsx("div",{className:"flex h-full items-center justify-center",children:i.supportsOAuth?t.jsx(ot,{onAuthenticate:()=>a(),buttonText:"Go back to authenticate"}):t.jsx(lt,{hasReadme:!1})}),e[2]=i.supportsOAuth,e[3]=a,e[4]=m):m=e[4],m}const u=`${n}:${o}`;let x;return e[5]!==n||e[6]!==r||e[7]!==l||e[8]!==u||e[9]!==o?(x=t.jsx(Vt,{toolName:o,connectionId:n,siblings:l,onSelectInstance:r},u),e[5]=n,e[6]=r,e[7]=l,e[8]=u,e[9]=o,e[10]=x):x=e[10],x}function Vt({toolName:s,connectionId:e,siblings:o,onSelectInstance:n}){const{replayId:l}=Xe({strict:!1}),r=(()=>{if(!l)return null;const d=`replay-${l}`,h=sessionStorage.getItem(d);if(!h)return null;sessionStorage.removeItem(d);try{return JSON.parse(h)}catch{return null}})(),a=(()=>{if(!r)return null;const d={};for(const[h,v]of Object.entries(r))v!==null&&typeof v=="object"?d[h]=JSON.stringify(v,null,2):d[h]=v;return d})(),[c,i]=T.useState(a??{}),[u,x]=T.useState(r?JSON.stringify(r,null,2):"{}"),[m,p]=T.useState(null),[f,g]=T.useState(null),[S,I]=T.useState(null),[R,$]=T.useState(null),[E,P]=T.useState(!1),[b,w]=T.useState(null),{org:C}=ie(),k=Oe(e),N=Tt(),A=Pt(),{setChatOpen:U}=kt(),z=`${e}:${s}`,_=ce({connectionId:e,orgId:C.id,orgSlug:C.slug}),L=It({client:_}),j=L.data?.tools?.find(d=>d.name===s),O=ut(j?._meta),J=d=>{if(!N)return;const h=$t(d.content);h.content.length>0&&(U(!0),N.sendMessage({tiptapDoc:h}))},[D,Z]=T.useState("json"),[ze,Le]=T.useState(!1);O&&!ze&&(Z("ui"),Le(!0));const pe=j?.inputSchema?.properties,fe=pe?Object.keys(pe):[],H=fe.length>0,K={};if(H&&j?.inputSchema?.properties)for(const d of fe)K[d]=j.inputSchema.required?.includes(d)?"":void 0;const ee=d=>Object.prototype.hasOwnProperty.call(c,d),Ue=async()=>{P(!0),$(null),p(null),g(null),I(null),w(null);const d=performance.now();try{if(!_)throw new Error("MCP client is not available");const h=H?{...K,...c}:(()=>{const M=u.trim();if(!M)return{};const B=JSON.parse(M);if(B&&typeof B=="object")return B;throw new Error("Raw JSON input must be an object.")})();H&&j?.inputSchema?.properties&&Object.entries(j.inputSchema.properties).forEach(([M,B])=>{if((B.type==="object"||B.type==="array")&&typeof h[M]=="string")try{h[M]=JSON.parse(h[M])}catch{}else if((B.type==="number"||B.type==="integer")&&typeof h[M]=="string"&&h[M]!==""){const je=Number(h[M]);Number.isNaN(je)||(h[M]=je)}});const v=await _.callTool({name:s,arguments:h}),W=v.structuredContent??v,He=performance.now(),Ke=Math.round(He-d);p(W),g(v),I(h);const We=JSON.stringify(W),ge=new TextEncoder().encode(We).length;w({duration:`${Ke}ms`,bytes:`${ge} bytes`,tokens:`~${Math.ceil(ge/4)} tokens`,cost:"$0.0000"})}catch(h){const v=h instanceof Error?h.message:String(h);$(v||"Unknown error occurred");const W=performance.now();w({duration:`${Math.round(W-d)}ms`})}finally{P(!1)}},te=(d,h)=>{i(v=>({...v,[d]:h}))},Be=()=>{p(null),g(null),I(null),$(null),w(null)},Fe=j?.name??Bt(s),Ve=t.jsx(_e,{children:t.jsxs(De,{children:[t.jsx(q,{children:t.jsx(Q,{asChild:!0,children:t.jsx(G,{to:"/$org/settings/connections",params:{org:C.slug},children:"Connections"})})}),t.jsx(Y,{}),k&&t.jsxs(t.Fragment,{children:[t.jsx(q,{children:t.jsx(Q,{asChild:!0,children:t.jsx(G,{to:"/$org/settings/connections/$appSlug",params:{org:C.slug,appSlug:yt(k)},search:{tab:"tools"},children:k.title})})}),t.jsx(Y,{})]}),t.jsx(q,{children:t.jsx(Me,{children:Fe})})]})}),he=o.length>1&&t.jsxs(ve,{value:e,onValueChange:n,children:[t.jsx(Se,{className:"h-8 w-auto min-w-[200px]",children:t.jsx(ye,{})}),t.jsx(we,{children:o.map(d=>t.jsx(oe,{value:d.id,children:t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(Te,{icon:d.icon,name:d.title,size:"xs",className:"shrink-0"}),d.title]})},d.id))})]}),Je=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:"Parameters"}),j?.inputSchema?.required&&j.inputSchema.required.length>0&&t.jsxs("span",{className:"text-xs text-muted-foreground",children:[t.jsx("span",{className:"text-red-500",children:"*"})," Required"]})]}),t.jsx("div",{className:"space-y-4",children:H&&j?.inputSchema?.properties?Object.entries(j.inputSchema.properties).map(([d,h])=>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:[d,j.inputSchema?.required?.includes(d)&&t.jsx("span",{className:"text-red-500 text-xs",children:"*"})]}),t.jsx("span",{className:"text-xs text-muted-foreground font-mono",children:h.type})]}),h.description&&t.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:h.description}),h.type==="object"||h.type==="array"?t.jsx(re,{className:"font-mono text-xs",value:ee(d)?c[d]??"":K[d]??"",onChange:v=>te(d,v.target.value),placeholder:`Enter ${d} as JSON...`,rows:3}):h.type==="boolean"?t.jsxs(ve,{value:ee(d)?String(c[d]??""):"",onValueChange:v=>te(d,v==="true"),children:[t.jsx(Se,{children:t.jsx(ye,{placeholder:"Select true or false..."})}),t.jsxs(we,{children:[t.jsx(oe,{value:"true",children:"true"}),t.jsx(oe,{value:"false",children:"false"})]})]}):t.jsx(ue,{value:ee(d)?c[d]??"":K[d]??"",onChange:v=>te(d,v.target.value),placeholder:`Enter ${d}...`})]},d)):j?.inputSchema&&!H?t.jsxs("div",{className:"space-y-2",children:[t.jsx("label",{className:"text-sm font-medium",children:"Raw JSON Input"}),t.jsx(re,{className:"font-mono text-xs min-h-[120px]",value:u,onChange:d=>x(d.target.value),placeholder:'e.g. { "foo": "bar" }'})]}):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:"No parameters required"})})}),t.jsx("div",{className:"flex items-center gap-2 pt-2",children:E?t.jsxs(F,{size:"sm",variant:"destructive",className:"h-8 gap-2",onClick:Be,children:[t.jsx(at,{className:"h-3.5 w-3.5"}),"Cancel"]}):t.jsxs(F,{size:"sm",variant:"default",className:"h-8 gap-2",onClick:Ue,children:[t.jsx(vt,{className:"h-3.5 w-3.5 fill-current"}),"Execute Tool"]})})]}),qe=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:"Result"}),t.jsxs("div",{className:"flex items-center gap-3",children:[b&&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(bt,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:b.duration})]}),b.tokens&&t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(ct,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:b.tokens})]}),b.bytes&&t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(dt,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:b.bytes})]}),b.cost&&t.jsx("div",{className:"flex items-center gap-1.5",children:t.jsx("span",{className:"font-mono text-foreground",children:b.cost})})]}),O&&t.jsx(gt,{children:t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsxs(Ce,{children:[t.jsx(Ie,{asChild:!0,children:t.jsx(F,{size:"icon",variant:D==="ui"?"secondary":"ghost",className:"h-8 w-8",onClick:()=>Z("ui"),children:t.jsx(mt,{size:14})})}),t.jsx($e,{children:"Interactive view"})]}),t.jsxs(Ce,{children:[t.jsx(Ie,{asChild:!0,children:t.jsx(F,{size:"icon",variant:D==="json"?"secondary":"ghost",className:"h-8 w-8",onClick:()=>Z("json"),children:t.jsx(be,{size:14})})}),t.jsx($e,{children:"JSON view"})]})]})})]})]}),R&&t.jsx("div",{className:"px-6 py-4 bg-background",children:t.jsx(pt,{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(jt,{className:"h-4 w-4"}),t.jsx(ft,{className:"mb-0",children:"Execution Failed"})]}),t.jsx(ht,{className:"text-xs text-destructive",children:R})]})})}),t.jsx("div",{className:"relative flex-1 min-h-[400px] @3xl:min-h-0 @3xl:overflow-auto bg-muted/50",children:O&&D==="ui"&&_?t.jsx(T.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:"Loading app..."})]})}),children:t.jsx(xt,{resourceURI:O,toolInfo:j?{tool:j}:void 0,toolInput:S??void 0,toolResult:f??void 0,displayMode:"fullscreen",minHeight:Ne.view.minHeight,maxHeight:Ne.view.maxHeight,client:_,onMessage:J,onUpdateModelContext:d=>A?.setAppContext(z,d),onTeardown:()=>A?.clearAppContext(z),className:"h-full"})}):m?t.jsxs(t.Fragment,{children:[t.jsx(Et,{code:JSON.stringify(m,null,2),language:"json",height:"100%",readOnly:!0}),t.jsx(F,{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)),Ze.success("Copied to clipboard")},children:t.jsx(Nt,{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(be,{className:"h-12 w-12 mb-3 opacity-40"}),t.jsx("p",{className:"text-sm",children:"Run the tool to see results"})]})})]});return t.jsx(xe,{breadcrumb:Ve,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(Te,{icon:k?.icon||null,name:k?.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:[L.isSuccess?t.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-green-500 animate-pulse shrink-0"}):L.isLoading?t.jsx(X,{size:10,className:"animate-spin text-yellow-500 shrink-0"}):t.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-red-500 shrink-0"}),t.jsx("span",{className:"font-mono text-xs capitalize text-muted-foreground leading-none",children:L.isSuccess?"ready":L.isLoading?"connecting":"error"})]}),t.jsx(Ct,{annotations:j?.annotations,_meta:j?._meta}),t.jsx("div",{className:"hidden @3xl:flex items-center ml-auto shrink-0",children:he})]}),t.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:j?.description||"No description available"})]}),o.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:"Instance"}),he]}),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:Je}),qe]})})]})})}function Jt(s){const e=y.c(10),{itemId:o,siblings:n,onBack:l}=s,[r,a]=T.useState(n[0]?.id??"");let c;e[0]!==r||e[1]!==n?(c=n.find(p=>p.id===r)?.id??n[0]?.id??"",e[0]=r,e[1]=n,e[2]=c):c=e[2];const i=c;if(!Oe(i||void 0)||!i){let p;return e[3]===Symbol.for("react.memo_cache_sentinel")?(p=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:[t.jsx("h3",{className:"text-lg font-semibold",children:"Connection not found"}),t.jsx("p",{className:"text-sm text-muted-foreground",children:"This connection may have been deleted or you may not have access."})]})}),e[3]=p):p=e[3],p}let x;e[4]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(X,{size:32,className:"animate-spin text-muted-foreground"})}),e[4]=x):x=e[4];let m;return e[5]!==i||e[6]!==l||e[7]!==n||e[8]!==o?(m=t.jsx(T.Suspense,{fallback:x,children:t.jsx(Ft,{toolName:o,connectionId:i,siblings:n,onSelectInstance:a,onBack:l})}),e[5]=i,e[6]=l,e[7]=n,e[8]=o,e[9]=m):m=e[9],m}function qt(s){const e=y.c(21),{icon:o,illustration:n,title:l,description:r,buttonProps:a,buttonComponent:c,className:i,children:u}=s;let x;e[0]!==i?(x=V("flex flex-col items-center justify-center py-16 text-center",i),e[0]=i,e[1]=x):x=e[1];let m;e[2]!==o||e[3]!==n?(m=n?t.jsx("div",{className:"mb-4 text-muted-foreground/50",children:n}):o?t.jsx("div",{className:"mb-4 flex h-12 w-12 items-center justify-center rounded-xl bg-muted/50 text-muted-foreground",children:o}):null,e[2]=o,e[3]=n,e[4]=m):m=e[4];let p;e[5]!==l?(p=t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:l}),e[5]=l,e[6]=p):p=e[6];let f;e[7]!==r?(f=r&&t.jsx("div",{className:"text-sm text-muted-foreground",children:r}),e[7]=r,e[8]=f):f=e[8];let g;e[9]!==p||e[10]!==f?(g=t.jsxs("div",{className:"flex flex-col items-center gap-1 max-w-sm",children:[p,f]}),e[9]=p,e[10]=f,e[11]=g):g=e[11];let S;e[12]!==c||e[13]!==a?(S=(c??a)&&t.jsx("div",{className:"mt-4",children:c??(a&&t.jsx(F,{size:"sm",className:V(a?.className),...a}))}),e[12]=c,e[13]=a,e[14]=S):S=e[14];let I;return e[15]!==u||e[16]!==x||e[17]!==m||e[18]!==g||e[19]!==S?(I=t.jsxs("div",{className:x,children:[m,g,S,u]}),e[15]=u,e[16]=x,e[17]=m,e[18]=g,e[19]=S,e[20]=I):I=e[20],I}const Ht={prompt:Ut};function Kt(){const s=y.c(9),e=ke();let o;s[0]===Symbol.for("react.memo_cache_sentinel")?(o={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=o):o=s[0];const n=ae(o),l=decodeURIComponent(n.itemId);let r;s[1]!==n.appSlug?(r={slug:n.appSlug},s[1]=n.appSlug,s[2]=r):r=s[2];const a=Re(r);let c;s[3]!==e.history?(c=()=>{e.history.back()},s[3]=e.history,s[4]=c):c=s[4];const i=c,u=Wt;let x;return s[5]!==i||s[6]!==l||s[7]!==a?(x=t.jsx(Jt,{itemId:l,siblings:a,onBack:i,onUpdate:u}),s[5]=i,s[6]=l,s[7]=a,s[8]=x):x=s[8],x}async function Wt(s){return Promise.resolve()}function Gt(s){return s.toLowerCase().split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")}function Qt(){const s=y.c(41),e=ke();let o;s[0]===Symbol.for("react.memo_cache_sentinel")?(o={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=o):o=s[0];const n=ae(o),l=decodeURIComponent(n.collectionName),r=decodeURIComponent(n.itemId);let a;s[1]!==e.history?(a=()=>{e.history.back()},s[1]=e.history,s[2]=a):a=s[2];const c=a,{org:i}=ie();let u;s[3]!==n.appSlug?(u={slug:n.appSlug},s[3]=n.appSlug,s[4]=u):u=s[4];const m=Re(u)[0]??null,p=m?.id??"",f=p||"no-connection",g=p??null;let S;s[5]!==i.id||s[6]!==i.slug||s[7]!==g?(S={connectionId:g,orgId:i.id,orgSlug:i.slug},s[5]=i.id,s[6]=i.slug,s[7]=g,s[8]=S):S=s[8];const I=ce(S),R=Ae(f,l,I);let $;s[9]!==R||s[10]!==r?($=async D=>{r&&await R.update.mutateAsync({id:r,data:D})},s[9]=R,s[10]=r,s[11]=$):$=s[11];const E=$;let P;s[12]!==l?(P=l?.toLowerCase(),s[12]=l,s[13]=P):P=s[13];const b=P,w=b&&Ht[b];let C;s[14]!==l?(C=Gt(l),s[14]=l,s[15]=C):C=s[15];const k=C;let N;s[16]!==i.slug?(N=t.jsx(q,{children:t.jsx(Q,{asChild:!0,children:t.jsx(G,{to:"/$org/settings/connections",params:{org:i.slug},children:"Connections"})})}),s[16]=i.slug,s[17]=N):N=s[17];let A;s[18]===Symbol.for("react.memo_cache_sentinel")?(A=t.jsx(Y,{}),s[18]=A):A=s[18];let U;s[19]!==l||s[20]!==m||s[21]!==i.slug||s[22]!==n.appSlug?(U=m&&t.jsxs(t.Fragment,{children:[t.jsx(q,{children:t.jsx(Q,{asChild:!0,children:t.jsx(G,{to:"/$org/settings/connections/$appSlug",params:{org:i.slug,appSlug:n.appSlug},search:{tab:l},children:m.title})})}),t.jsx(Y,{})]}),s[19]=l,s[20]=m,s[21]=i.slug,s[22]=n.appSlug,s[23]=U):U=s[23];let z;s[24]!==k?(z=t.jsx(q,{children:t.jsx(Me,{children:k})}),s[24]=k,s[25]=z):z=s[25];let _;s[26]!==U||s[27]!==z||s[28]!==N?(_=t.jsx(_e,{children:t.jsxs(De,{children:[N,A,U,z]})}),s[26]=U,s[27]=z,s[28]=N,s[29]=_):_=s[29];const L=_;if(w){let D;return s[30]!==w||s[31]!==c||s[32]!==E||s[33]!==r?(D=t.jsx(w,{itemId:r,onBack:c,onUpdate:E}),s[30]=w,s[31]=c,s[32]=E,s[33]=r,s[34]=D):D=s[34],D}let j;s[35]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsx(At,{size:36,className:"text-muted-foreground"}),s[35]=j):j=s[35];let O;s[36]!==c?(O=t.jsx(qt,{icon:j,title:"No component defined",description:"No component for this collection was defined",buttonProps:{onClick:c,children:"Go back"}}),s[36]=c,s[37]=O):O=s[37];let J;return s[38]!==L||s[39]!==O?(J=t.jsx(xe,{breadcrumb:L,children:O}),s[38]=L,s[39]=O,s[40]=J):J=s[40],J}function Yt(){const s=y.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 o=ae(e);if(decodeURIComponent(o.collectionName)==="tools"){let a;return s[1]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(Kt,{}),s[1]=a):a=s[1],a}let r;return s[2]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(Qt,{}),s[2]=r):r=s[2],r}function Ln(){const s=y.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Pe,{children:t.jsx(T.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(X,{size:32,className:"animate-spin text-muted-foreground"})}),children:t.jsx(Yt,{})})}),s[0]=e):e=s[0],e}export{Ln as default};
|
|
1
|
+
import{c as y,j as t,B as F,i as X,o as Ge,s as se,E as Pe,r as T,D as ie,p as Qe,l as J,bh as Ye,u as Xe,G,t as Ze,e as ae,b2 as ke}from"./index-CFiyU0D9.js";import{E as Ee}from"./empty-state-Sh_DuDcy.js";import{u as et,a as Ae}from"./use-collections-B4atckEK.js";import{u as ce}from"./use-mcp-client-xOK-OF8p.js";import{F as ne,a as tt,b as de,d as me}from"./form-DGE2mWLL.js";import{I as ue}from"./input-BwRH-Gsz.js";import{T as re}from"./textarea-BYT525JZ.js";import{a as st,b as nt,V as xe,O as ot,M as lt}from"./index-CkTyYAY1.js";import{al as rt,y as it,aa as at,am as ct,_ as dt,an as mt,J as be}from"./agent-icon-oDx9Z_Be.js";import{g as ut,M as xt,a as Ne}from"./types-C7syjwde.js";import{A as pt,a as ft,b as ht}from"./alert-CKj_5smu.js";import{d as ve,b as Se,c as ye,S as we,a as oe}from"./select-C6v8Xcth.js";import{c as gt,T as Ce,a as Ie,b as $e}from"./tooltip-DrpiSbRG.js";import{i as jt}from"./AlertCircle-DC-zDzV-.js";import{s as bt}from"./Stars02-qnq-_X9g.js";import{a as Nt}from"./Eye-bojNLUjA.js";import{i as vt}from"./Play-CnXG8qqP.js";import{i as St}from"./ChevronRight-Cpfh3gza.js";import{g as yt}from"./connection-slug-eyAPH6o3.js";import{u as wt,T as Ct}from"./tools-list-uWC3Ij6C.js";import{a as Oe,u as Re}from"./use-connection-Dz29RF9P.js";import{a as It}from"./use-mcp-tools-C8tMWwG9.js";import{c as $t}from"./content-blocks-o63cs2vh.js";import{I as Te}from"./integration-icon-LQhkkaLl.js";import{i as Tt,l as Pt}from"./chat-context-n9syhvq-.js";import{b as kt}from"./shell-layout-Nyz7GHu7.js";import{M as Et}from"./monaco-editor-5JIc-lnc.js";import{n as At}from"./XCircle-Ct0eqqsw.js";import"./auth-Bej0Tx2Y.js";import"./label-CdBSUJpf.js";import"./index-Bb-tYGNK.js";import"./sidebar-BNrafefE.js";import"./LayoutLeft-fsm0LcB8.js";import"./use-mobile-NlF-3RoP.js";import"./sheet-DyU03ddw.js";import"./X-DrMVHLcw.js";import"./ZoomOut-6ix2H92j.js";import"./Key01-CwrJlZo0.js";import"./extract-connection-data-D6bQrejT.js";import"./use-registry-connections-BOZLpkM5.js";import"./use-organization-settings-DksiQdGc.js";import"./studio-tools-CNO5iCKk.js";import"./Plus-eGxBB1d8.js";import"./index-hmJjUPum.js";import"./index-DGzNvPy2.js";import"./index-jBUpmiBg.js";import"./popover-BXFiEQtN.js";import"./use-virtual-mcp-2U_MnYnK.js";import"./ChevronUp-DBpw6M-L.js";import"./SearchMd-ujiTPCmg.js";import"./Users03-DknrDMtT.js";import"./use-create-virtual-mcp-DVmI--_C.js";import"./use-navigate-to-agent-DZubxUSm.js";import"./Tool01-CvnpFI53.js";import"./SwitchHorizontal01-DAZXInW8.js";import"./Settings02-BcAnTzm5.js";import"./ArrowUpRight-OJZisFPQ.js";import"./ZapSquare-PMiGcZpW.js";import"./CheckCircle-Cgnheu-R.js";import"./ChevronDown-DyHvxYlc.js";import"./ChevronLeft-dyRjFCmp.js";import"./DotsVertical-5jSu3d1f.js";import"./Globe01-CyfpzbeQ.js";import"./FilterLines-CFl65nng.js";import"./Star01-DHEkWySe.js";import"./Globe04-DFpdKSRI.js";import"./HardDrive-B1mtnaeA.js";import"./LinkExternal01-BHwVyDja.js";import"./Monitor01-ChA6ov2I.js";import"./Sun-lTiqxOzH.js";import"./Palette-DusYqL0W.js";import"./SearchLg-CDpA_lbT.js";import"./Shield01-ZxmFmrvL.js";import"./Stars01-BdCaKqhF.js";import"./Trash01-ByxlxTiZ.js";import"./Upload01-Z77n1bV8.js";import"./User01-COQtf360.js";import"./Users01-wtRJYQKX.js";import"./XClose-BaZ908gw.js";import"./Zap-wRIFSWIq.js";import"./mcp-oauth-IblqU9XT.js";import"./badge-DhpSM7g_.js";import"./hooks-CUSV6Enf.js";import"./decopilot-sse-pool-CvYk1hkc.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./use-ai-providers-C7KmiuqP.js";import"./use-decopilot-events-CpQNzv3e.js";import"./tab-id-BptcWVWa.js";import"./avatar-CJP1BOq4.js";import"./dialog-BAqFyO8a.js";import"./required-auth-layout-DDJmFi3U.js";import"./use-org-sso-DkqH8Zpz.js";import"./index-B6hcksS9.js";function Ot(s){const e=y.c(15),{onSave:o,onUndo:n,isDirty:l,isSaving:r,saveLabel:a,undoLabel:c}=s,i=a===void 0?"Save":a,u=c===void 0?"Undo":c;if(!l)return null;let x;e[0]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx(rt,{size:14}),e[0]=x):x=e[0];let m;e[1]!==r||e[2]!==n||e[3]!==u?(m=t.jsxs(F,{variant:"outline",size:"sm",onClick:n,disabled:r,"aria-label":u,children:[x,u]}),e[1]=r,e[2]=n,e[3]=u,e[4]=m):m=e[4];let p;e[5]!==r?(p=r?t.jsx(X,{size:14,className:"animate-spin"}):t.jsx(it,{size:14}),e[5]=r,e[6]=p):p=e[6];let f;e[7]!==r||e[8]!==o||e[9]!==i||e[10]!==p?(f=t.jsxs(F,{variant:"default",size:"sm",onClick:o,disabled:r,"aria-label":i,children:[p,i]}),e[7]=r,e[8]=o,e[9]=i,e[10]=p,e[11]=f):f=e[11];let g;return e[12]!==m||e[13]!==f?(g=t.jsxs(t.Fragment,{children:[m,f]}),e[12]=m,e[13]=f,e[14]=g):g=e[14],g}Ge({title:se().min(1),description:se().nullable(),body:se()});function le(s){for(const e of s.messages??[])if(e.role==="user"&&e.content?.type==="text")return e.content.text??"";return""}function Rt(){const s=window.location.pathname.split("/").filter(Boolean),e=s.findIndex(n=>n==="mcps"),o=e>=0?s[e+1]:void 0;return o?decodeURIComponent(o):void 0}function _t(s){const e=y.c(13),{form:o}=s;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx("div",{className:"text-sm font-medium text-foreground",children:"Details"}),e[0]=n):n=e[0];let l;e[1]!==o.control?(l=t.jsxs("div",{className:"flex flex-col gap-4",children:[n,t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsx(ne,{control:o.control,name:"title",render:zt}),t.jsx(ne,{control:o.control,name:"description",render:Mt})]})]}),e[1]=o.control,e[2]=l):l=e[2];let r,a;e[3]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx("div",{className:"text-sm font-medium text-foreground",children:"Message"}),a=t.jsx("div",{className:"text-xs text-muted-foreground",children:"This becomes the user message in the prompt."}),e[3]=r,e[4]=a):(r=e[3],a=e[4]);let c;e[5]!==o.control?(c=t.jsxs("div",{className:"flex flex-col gap-2",children:[r,a,t.jsx(ne,{control:o.control,name:"body",render:Dt})]}),e[5]=o.control,e[6]=c):c=e[6];let i;e[7]!==l||e[8]!==c?(i=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:[l,c]}),e[7]=l,e[8]=c,e[9]=i):i=e[9];let u;return e[10]!==o||e[11]!==i?(u=t.jsx(tt,{...o,children:i}),e[10]=o,e[11]=i,e[12]=u):u=e[12],u}function Dt(s){const{field:e}=s;return t.jsx(de,{children:t.jsx(me,{children:t.jsx(re,{...e,value:e.value??"",placeholder:"Write the prompt message…",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"})})})}function Mt(s){const{field:e}=s;return t.jsxs(de,{children:[t.jsx("div",{className:"text-xs text-muted-foreground",children:"Description"}),t.jsx(me,{children:t.jsx(ue,{...e,value:e.value??"",placeholder:"Add a description…",className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})}function zt(s){const{field:e}=s;return t.jsxs(de,{children:[t.jsx("div",{className:"text-xs text-muted-foreground",children:"Title"}),t.jsx(me,{children:t.jsx(ue,{...e,placeholder:"Untitled prompt",className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})}function Lt(s){const e=y.c(36),{providerId:o,promptId:n}=s,{org:l}=ie(),r=o||null;let a;e[0]!==l.id||e[1]!==l.slug||e[2]!==r?(a={connectionId:r,orgId:l.id,orgSlug:l.slug},e[0]=l.id,e[1]=l.slug,e[2]=r,e[3]=a):a=e[3];const c=ce(a),i=et(o,"PROMPT",n,c),u=Ae(o,"PROMPT",c),x=u.update.isPending;let m;e[4]!==i?(m=i?{title:i.title,description:i.description??null,body:le(i)}:void 0,e[4]=i,e[5]=m):m=e[5];let p;e[6]!==m?(p={values:m},e[6]=m,e[7]=p):p=e[7];const f=Qe(p);let g;e[8]!==f||e[9]!==i?(g=()=>{i&&f.reset({title:i.title,description:i.description??null,body:le(i)})},e[8]=f,e[9]=i,e[10]=g):g=e[10];const S=g;let I;e[11]!==u.update||e[12]!==f||e[13]!==n?(I=f.handleSubmit(async N=>{const A=await u.update.mutateAsync({id:n,data:{title:N.title,description:N.description,arguments:[],icons:[],messages:[{role:"user",content:{type:"text",text:N.body}}]}});f.reset({title:A.title,description:A.description??null,body:le(A)})}),e[11]=u.update,e[12]=f,e[13]=n,e[14]=I):I=e[14];const R=I;if(!i){let N;return e[15]===Symbol.for("react.memo_cache_sentinel")?(N=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Ee,{title:"Prompt not found",description:"This prompt may have been deleted or you may not have access to it."})}),e[15]=N):N=e[15],N}let $;e[16]!==i.title?($=t.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:i.title}),e[16]=i.title,e[17]=$):$=e[17];let E;e[18]!==i.description?(E=i.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:i.description})]}):null,e[18]=i.description,e[19]=E):E=e[19];let P;e[20]!==$||e[21]!==E?(P=t.jsx(nt,{children:t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[$,E]})}),e[20]=$,e[21]=E,e[22]=P):P=e[22];let b;e[23]!==R?(b=()=>{R()},e[23]=R,e[24]=b):b=e[24];let w;e[25]!==f.formState.isDirty||e[26]!==x||e[27]!==S||e[28]!==b?(w=t.jsx(st,{children:t.jsx(Ot,{onSave:b,onUndo:S,isDirty:f.formState.isDirty,isSaving:x})}),e[25]=f.formState.isDirty,e[26]=x,e[27]=S,e[28]=b,e[29]=w):w=e[29];let C;e[30]!==f?(C=t.jsx("div",{className:"h-full",children:t.jsx(_t,{form:f})}),e[30]=f,e[31]=C):C=e[31];let k;return e[32]!==w||e[33]!==C||e[34]!==P?(k=t.jsxs(xe,{children:[P,w,C]}),e[32]=w,e[33]=C,e[34]=P,e[35]=k):k=e[35],k}function Ut(s){const e=y.c(4),{itemId:o}=s;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=Rt(),e[0]=n):n=e[0];const l=n;if(!l){let a;return e[1]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Ee,{title:"Prompt not found",description:"Missing connection information in the current route."})}),e[1]=a):a=e[1],a}let r;return e[2]!==o?(r=t.jsx(Pe,{children:t.jsx(T.Suspense,{fallback:null,children:t.jsx(Lt,{providerId:l,promptId:o})})}),e[2]=o,e[3]=r):r=e[3],r}function _e(s){const e=y.c(8);let o,n;e[0]!==s?({className:o,...n}=s,e[0]=s,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let l;e[3]!==o?(l=J("min-w-0 overflow-hidden",o),e[3]=o,e[4]=l):l=e[4];let r;return e[5]!==n||e[6]!==l?(r=t.jsx("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",className:l,...n}),e[5]=n,e[6]=l,e[7]=r):r=e[7],r}function De(s){const e=y.c(8);let o,n;e[0]!==s?({className:o,...n}=s,e[0]=s,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let l;e[3]!==o?(l=J("flex items-center gap-1.5 text-sm sm:gap-2 overflow-hidden",o),e[3]=o,e[4]=l):l=e[4];let r;return e[5]!==n||e[6]!==l?(r=t.jsx("ol",{"data-slot":"breadcrumb-list",className:l,...n}),e[5]=n,e[6]=l,e[7]=r):r=e[7],r}function q(s){const e=y.c(8);let o,n;e[0]!==s?({className:o,...n}=s,e[0]=s,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let l;e[3]!==o?(l=J("inline-flex items-center gap-1.5 min-w-0",o),e[3]=o,e[4]=l):l=e[4];let r;return e[5]!==n||e[6]!==l?(r=t.jsx("li",{"data-slot":"breadcrumb-item",className:l,...n}),e[5]=n,e[6]=l,e[7]=r):r=e[7],r}function Q(s){const e=y.c(10);let o,n,l;e[0]!==s?({asChild:o,className:n,...l}=s,e[0]=s,e[1]=o,e[2]=n,e[3]=l):(o=e[1],n=e[2],l=e[3]);const r=o?Ye:"a";let a;e[4]!==n?(a=J("hover:text-foreground transition-colors truncate",n),e[4]=n,e[5]=a):a=e[5];let c;return e[6]!==r||e[7]!==l||e[8]!==a?(c=t.jsx(r,{"data-slot":"breadcrumb-link",className:a,...l}),e[6]=r,e[7]=l,e[8]=a,e[9]=c):c=e[9],c}function Me(s){const e=y.c(8);let o,n;e[0]!==s?({className:o,...n}=s,e[0]=s,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let l;e[3]!==o?(l=J("text-foreground font-medium truncate",o),e[3]=o,e[4]=l):l=e[4];let r;return e[5]!==n||e[6]!==l?(r=t.jsx("span",{"data-slot":"breadcrumb-page",role:"link","aria-disabled":"true","aria-current":"page",className:l,...n}),e[5]=n,e[6]=l,e[7]=r):r=e[7],r}function Y(s){const e=y.c(12);let o,n,l;e[0]!==s?({children:o,className:n,...l}=s,e[0]=s,e[1]=o,e[2]=n,e[3]=l):(o=e[1],n=e[2],l=e[3]);let r;e[4]!==n?(r=J("[&>svg]:size-3.5 text-muted-foreground opacity-50 list-none shrink-0",n),e[4]=n,e[5]=r):r=e[5];let a;e[6]!==o?(a=o??t.jsx(St,{}),e[6]=o,e[7]=a):a=e[7];let c;return e[8]!==l||e[9]!==r||e[10]!==a?(c=t.jsx("li",{"data-slot":"breadcrumb-separator",role:"presentation","aria-hidden":"true",className:r,...l,children:a}),e[8]=l,e[9]=r,e[10]=a,e[11]=c):c=e[11],c}const Bt=s=>s.replace(/_/g," ").replace(/\b\w/g,e=>e.toLocaleLowerCase());function Ft(s){const e=y.c(11),{toolName:o,connectionId:n,siblings:l,onSelectInstance:r,onBack:a}=s;let c;e[0]!==n?(c={connectionId:n},e[0]=n,e[1]=c):c=e[1];const i=wt(c);if(!i.isAuthenticated){let m;return e[2]!==i.supportsOAuth||e[3]!==a?(m=t.jsx("div",{className:"flex h-full items-center justify-center",children:i.supportsOAuth?t.jsx(ot,{onAuthenticate:()=>a(),buttonText:"Go back to authenticate"}):t.jsx(lt,{hasReadme:!1})}),e[2]=i.supportsOAuth,e[3]=a,e[4]=m):m=e[4],m}const u=`${n}:${o}`;let x;return e[5]!==n||e[6]!==r||e[7]!==l||e[8]!==u||e[9]!==o?(x=t.jsx(Jt,{toolName:o,connectionId:n,siblings:l,onSelectInstance:r},u),e[5]=n,e[6]=r,e[7]=l,e[8]=u,e[9]=o,e[10]=x):x=e[10],x}function Jt({toolName:s,connectionId:e,siblings:o,onSelectInstance:n}){const{replayId:l}=Xe({strict:!1}),r=(()=>{if(!l)return null;const d=`replay-${l}`,h=sessionStorage.getItem(d);if(!h)return null;sessionStorage.removeItem(d);try{return JSON.parse(h)}catch{return null}})(),a=(()=>{if(!r)return null;const d={};for(const[h,v]of Object.entries(r))v!==null&&typeof v=="object"?d[h]=JSON.stringify(v,null,2):d[h]=v;return d})(),[c,i]=T.useState(a??{}),[u,x]=T.useState(r?JSON.stringify(r,null,2):"{}"),[m,p]=T.useState(null),[f,g]=T.useState(null),[S,I]=T.useState(null),[R,$]=T.useState(null),[E,P]=T.useState(!1),[b,w]=T.useState(null),{org:C}=ie(),k=Oe(e),N=Tt(),A=Pt(),{setChatOpen:U}=kt(),z=`${e}:${s}`,_=ce({connectionId:e,orgId:C.id,orgSlug:C.slug}),L=It({client:_}),j=L.data?.tools?.find(d=>d.name===s),O=ut(j?._meta),V=d=>{if(!N)return;const h=$t(d.content);h.content.length>0&&(U(!0),N.sendMessage({tiptapDoc:h}))},[D,Z]=T.useState("json"),[ze,Le]=T.useState(!1);O&&!ze&&(Z("ui"),Le(!0));const pe=j?.inputSchema?.properties,fe=pe?Object.keys(pe):[],H=fe.length>0,K={};if(H&&j?.inputSchema?.properties)for(const d of fe)K[d]=j.inputSchema.required?.includes(d)?"":void 0;const ee=d=>Object.prototype.hasOwnProperty.call(c,d),Ue=async()=>{P(!0),$(null),p(null),g(null),I(null),w(null);const d=performance.now();try{if(!_)throw new Error("MCP client is not available");const h=H?{...K,...c}:(()=>{const M=u.trim();if(!M)return{};const B=JSON.parse(M);if(B&&typeof B=="object")return B;throw new Error("Raw JSON input must be an object.")})();H&&j?.inputSchema?.properties&&Object.entries(j.inputSchema.properties).forEach(([M,B])=>{if((B.type==="object"||B.type==="array")&&typeof h[M]=="string")try{h[M]=JSON.parse(h[M])}catch{}else if((B.type==="number"||B.type==="integer")&&typeof h[M]=="string"&&h[M]!==""){const je=Number(h[M]);Number.isNaN(je)||(h[M]=je)}});const v=await _.callTool({name:s,arguments:h}),W=v.structuredContent??v,He=performance.now(),Ke=Math.round(He-d);p(W),g(v),I(h);const We=JSON.stringify(W),ge=new TextEncoder().encode(We).length;w({duration:`${Ke}ms`,bytes:`${ge} bytes`,tokens:`~${Math.ceil(ge/4)} tokens`,cost:"$0.0000"})}catch(h){const v=h instanceof Error?h.message:String(h);$(v||"Unknown error occurred");const W=performance.now();w({duration:`${Math.round(W-d)}ms`})}finally{P(!1)}},te=(d,h)=>{i(v=>({...v,[d]:h}))},Be=()=>{p(null),g(null),I(null),$(null),w(null)},Fe=j?.name??Bt(s),Je=t.jsx(_e,{children:t.jsxs(De,{children:[t.jsx(q,{children:t.jsx(Q,{asChild:!0,children:t.jsx(G,{to:"/$org/settings/connections",params:{org:C.slug},children:"Connections"})})}),t.jsx(Y,{}),k&&t.jsxs(t.Fragment,{children:[t.jsx(q,{children:t.jsx(Q,{asChild:!0,children:t.jsx(G,{to:"/$org/settings/connections/$appSlug",params:{org:C.slug,appSlug:yt(k)},search:{tab:"tools"},children:k.title})})}),t.jsx(Y,{})]}),t.jsx(q,{children:t.jsx(Me,{children:Fe})})]})}),he=o.length>1&&t.jsxs(ve,{value:e,onValueChange:n,children:[t.jsx(Se,{className:"h-8 w-auto min-w-[200px]",children:t.jsx(ye,{})}),t.jsx(we,{children:o.map(d=>t.jsx(oe,{value:d.id,children:t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(Te,{icon:d.icon,name:d.title,size:"xs",className:"shrink-0"}),d.title]})},d.id))})]}),Ve=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:"Parameters"}),j?.inputSchema?.required&&j.inputSchema.required.length>0&&t.jsxs("span",{className:"text-xs text-muted-foreground",children:[t.jsx("span",{className:"text-red-500",children:"*"})," Required"]})]}),t.jsx("div",{className:"space-y-4",children:H&&j?.inputSchema?.properties?Object.entries(j.inputSchema.properties).map(([d,h])=>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:[d,j.inputSchema?.required?.includes(d)&&t.jsx("span",{className:"text-red-500 text-xs",children:"*"})]}),t.jsx("span",{className:"text-xs text-muted-foreground font-mono",children:h.type})]}),h.description&&t.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:h.description}),h.type==="object"||h.type==="array"?t.jsx(re,{className:"font-mono text-xs",value:ee(d)?c[d]??"":K[d]??"",onChange:v=>te(d,v.target.value),placeholder:`Enter ${d} as JSON...`,rows:3}):h.type==="boolean"?t.jsxs(ve,{value:ee(d)?String(c[d]??""):"",onValueChange:v=>te(d,v==="true"),children:[t.jsx(Se,{children:t.jsx(ye,{placeholder:"Select true or false..."})}),t.jsxs(we,{children:[t.jsx(oe,{value:"true",children:"true"}),t.jsx(oe,{value:"false",children:"false"})]})]}):t.jsx(ue,{value:ee(d)?c[d]??"":K[d]??"",onChange:v=>te(d,v.target.value),placeholder:`Enter ${d}...`})]},d)):j?.inputSchema&&!H?t.jsxs("div",{className:"space-y-2",children:[t.jsx("label",{className:"text-sm font-medium",children:"Raw JSON Input"}),t.jsx(re,{className:"font-mono text-xs min-h-[120px]",value:u,onChange:d=>x(d.target.value),placeholder:'e.g. { "foo": "bar" }'})]}):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:"No parameters required"})})}),t.jsx("div",{className:"flex items-center gap-2 pt-2",children:E?t.jsxs(F,{size:"sm",variant:"destructive",className:"h-8 gap-2",onClick:Be,children:[t.jsx(at,{className:"h-3.5 w-3.5"}),"Cancel"]}):t.jsxs(F,{size:"sm",variant:"default",className:"h-8 gap-2",onClick:Ue,children:[t.jsx(vt,{className:"h-3.5 w-3.5 fill-current"}),"Execute Tool"]})})]}),qe=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:"Result"}),t.jsxs("div",{className:"flex items-center gap-3",children:[b&&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(bt,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:b.duration})]}),b.tokens&&t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(ct,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:b.tokens})]}),b.bytes&&t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(dt,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:b.bytes})]}),b.cost&&t.jsx("div",{className:"flex items-center gap-1.5",children:t.jsx("span",{className:"font-mono text-foreground",children:b.cost})})]}),O&&t.jsx(gt,{children:t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsxs(Ce,{children:[t.jsx(Ie,{asChild:!0,children:t.jsx(F,{size:"icon",variant:D==="ui"?"secondary":"ghost",className:"h-8 w-8",onClick:()=>Z("ui"),children:t.jsx(mt,{size:14})})}),t.jsx($e,{children:"Interactive view"})]}),t.jsxs(Ce,{children:[t.jsx(Ie,{asChild:!0,children:t.jsx(F,{size:"icon",variant:D==="json"?"secondary":"ghost",className:"h-8 w-8",onClick:()=>Z("json"),children:t.jsx(be,{size:14})})}),t.jsx($e,{children:"JSON view"})]})]})})]})]}),R&&t.jsx("div",{className:"px-6 py-4 bg-background",children:t.jsx(pt,{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(jt,{className:"h-4 w-4"}),t.jsx(ft,{className:"mb-0",children:"Execution Failed"})]}),t.jsx(ht,{className:"text-xs text-destructive",children:R})]})})}),t.jsx("div",{className:"relative flex-1 min-h-[400px] @3xl:min-h-0 @3xl:overflow-auto bg-muted/50",children:O&&D==="ui"&&_?t.jsx(T.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:"Loading app..."})]})}),children:t.jsx(xt,{resourceURI:O,toolInfo:j?{tool:j}:void 0,toolInput:S??void 0,toolResult:f??void 0,displayMode:"fullscreen",minHeight:Ne.view.minHeight,maxHeight:Ne.view.maxHeight,client:_,onMessage:V,onUpdateModelContext:d=>A?.setAppContext(z,d),onTeardown:()=>A?.clearAppContext(z),className:"h-full"})}):m?t.jsxs(t.Fragment,{children:[t.jsx(Et,{code:JSON.stringify(m,null,2),language:"json",height:"100%",readOnly:!0}),t.jsx(F,{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)),Ze.success("Copied to clipboard")},children:t.jsx(Nt,{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(be,{className:"h-12 w-12 mb-3 opacity-40"}),t.jsx("p",{className:"text-sm",children:"Run the tool to see results"})]})})]});return t.jsx(xe,{breadcrumb:Je,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(Te,{icon:k?.icon||null,name:k?.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:[L.isSuccess?t.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-green-500 animate-pulse shrink-0"}):L.isLoading?t.jsx(X,{size:10,className:"animate-spin text-yellow-500 shrink-0"}):t.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-red-500 shrink-0"}),t.jsx("span",{className:"font-mono text-xs capitalize text-muted-foreground leading-none",children:L.isSuccess?"ready":L.isLoading?"connecting":"error"})]}),t.jsx(Ct,{annotations:j?.annotations,_meta:j?._meta}),t.jsx("div",{className:"hidden @3xl:flex items-center ml-auto shrink-0",children:he})]}),t.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:j?.description||"No description available"})]}),o.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:"Instance"}),he]}),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:Ve}),qe]})})]})})}function Vt(s){const e=y.c(10),{itemId:o,siblings:n,onBack:l}=s,[r,a]=T.useState(n[0]?.id??"");let c;e[0]!==r||e[1]!==n?(c=n.find(p=>p.id===r)?.id??n[0]?.id??"",e[0]=r,e[1]=n,e[2]=c):c=e[2];const i=c;if(!Oe(i||void 0)||!i){let p;return e[3]===Symbol.for("react.memo_cache_sentinel")?(p=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:[t.jsx("h3",{className:"text-lg font-semibold",children:"Connection not found"}),t.jsx("p",{className:"text-sm text-muted-foreground",children:"This connection may have been deleted or you may not have access."})]})}),e[3]=p):p=e[3],p}let x;e[4]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(X,{size:32,className:"animate-spin text-muted-foreground"})}),e[4]=x):x=e[4];let m;return e[5]!==i||e[6]!==l||e[7]!==n||e[8]!==o?(m=t.jsx(T.Suspense,{fallback:x,children:t.jsx(Ft,{toolName:o,connectionId:i,siblings:n,onSelectInstance:a,onBack:l})}),e[5]=i,e[6]=l,e[7]=n,e[8]=o,e[9]=m):m=e[9],m}function qt(s){const e=y.c(21),{icon:o,illustration:n,title:l,description:r,buttonProps:a,buttonComponent:c,className:i,children:u}=s;let x;e[0]!==i?(x=J("flex flex-col items-center justify-center py-16 text-center",i),e[0]=i,e[1]=x):x=e[1];let m;e[2]!==o||e[3]!==n?(m=n?t.jsx("div",{className:"mb-4 text-muted-foreground/50",children:n}):o?t.jsx("div",{className:"mb-4 flex h-12 w-12 items-center justify-center rounded-xl bg-muted/50 text-muted-foreground",children:o}):null,e[2]=o,e[3]=n,e[4]=m):m=e[4];let p;e[5]!==l?(p=t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:l}),e[5]=l,e[6]=p):p=e[6];let f;e[7]!==r?(f=r&&t.jsx("div",{className:"text-sm text-muted-foreground",children:r}),e[7]=r,e[8]=f):f=e[8];let g;e[9]!==p||e[10]!==f?(g=t.jsxs("div",{className:"flex flex-col items-center gap-1 max-w-sm",children:[p,f]}),e[9]=p,e[10]=f,e[11]=g):g=e[11];let S;e[12]!==c||e[13]!==a?(S=(c??a)&&t.jsx("div",{className:"mt-4",children:c??(a&&t.jsx(F,{size:"sm",className:J(a?.className),...a}))}),e[12]=c,e[13]=a,e[14]=S):S=e[14];let I;return e[15]!==u||e[16]!==x||e[17]!==m||e[18]!==g||e[19]!==S?(I=t.jsxs("div",{className:x,children:[m,g,S,u]}),e[15]=u,e[16]=x,e[17]=m,e[18]=g,e[19]=S,e[20]=I):I=e[20],I}const Ht={prompt:Ut};function Kt(){const s=y.c(9),e=ke();let o;s[0]===Symbol.for("react.memo_cache_sentinel")?(o={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=o):o=s[0];const n=ae(o),l=decodeURIComponent(n.itemId);let r;s[1]!==n.appSlug?(r={slug:n.appSlug},s[1]=n.appSlug,s[2]=r):r=s[2];const a=Re(r);let c;s[3]!==e.history?(c=()=>{e.history.back()},s[3]=e.history,s[4]=c):c=s[4];const i=c,u=Wt;let x;return s[5]!==i||s[6]!==l||s[7]!==a?(x=t.jsx(Vt,{itemId:l,siblings:a,onBack:i,onUpdate:u}),s[5]=i,s[6]=l,s[7]=a,s[8]=x):x=s[8],x}async function Wt(s){return Promise.resolve()}function Gt(s){return s.toLowerCase().split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")}function Qt(){const s=y.c(41),e=ke();let o;s[0]===Symbol.for("react.memo_cache_sentinel")?(o={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=o):o=s[0];const n=ae(o),l=decodeURIComponent(n.collectionName),r=decodeURIComponent(n.itemId);let a;s[1]!==e.history?(a=()=>{e.history.back()},s[1]=e.history,s[2]=a):a=s[2];const c=a,{org:i}=ie();let u;s[3]!==n.appSlug?(u={slug:n.appSlug},s[3]=n.appSlug,s[4]=u):u=s[4];const m=Re(u)[0]??null,p=m?.id??"",f=p||"no-connection",g=p??null;let S;s[5]!==i.id||s[6]!==i.slug||s[7]!==g?(S={connectionId:g,orgId:i.id,orgSlug:i.slug},s[5]=i.id,s[6]=i.slug,s[7]=g,s[8]=S):S=s[8];const I=ce(S),R=Ae(f,l,I);let $;s[9]!==R||s[10]!==r?($=async D=>{r&&await R.update.mutateAsync({id:r,data:D})},s[9]=R,s[10]=r,s[11]=$):$=s[11];const E=$;let P;s[12]!==l?(P=l?.toLowerCase(),s[12]=l,s[13]=P):P=s[13];const b=P,w=b&&Ht[b];let C;s[14]!==l?(C=Gt(l),s[14]=l,s[15]=C):C=s[15];const k=C;let N;s[16]!==i.slug?(N=t.jsx(q,{children:t.jsx(Q,{asChild:!0,children:t.jsx(G,{to:"/$org/settings/connections",params:{org:i.slug},children:"Connections"})})}),s[16]=i.slug,s[17]=N):N=s[17];let A;s[18]===Symbol.for("react.memo_cache_sentinel")?(A=t.jsx(Y,{}),s[18]=A):A=s[18];let U;s[19]!==l||s[20]!==m||s[21]!==i.slug||s[22]!==n.appSlug?(U=m&&t.jsxs(t.Fragment,{children:[t.jsx(q,{children:t.jsx(Q,{asChild:!0,children:t.jsx(G,{to:"/$org/settings/connections/$appSlug",params:{org:i.slug,appSlug:n.appSlug},search:{tab:l},children:m.title})})}),t.jsx(Y,{})]}),s[19]=l,s[20]=m,s[21]=i.slug,s[22]=n.appSlug,s[23]=U):U=s[23];let z;s[24]!==k?(z=t.jsx(q,{children:t.jsx(Me,{children:k})}),s[24]=k,s[25]=z):z=s[25];let _;s[26]!==U||s[27]!==z||s[28]!==N?(_=t.jsx(_e,{children:t.jsxs(De,{children:[N,A,U,z]})}),s[26]=U,s[27]=z,s[28]=N,s[29]=_):_=s[29];const L=_;if(w){let D;return s[30]!==w||s[31]!==c||s[32]!==E||s[33]!==r?(D=t.jsx(w,{itemId:r,onBack:c,onUpdate:E}),s[30]=w,s[31]=c,s[32]=E,s[33]=r,s[34]=D):D=s[34],D}let j;s[35]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsx(At,{size:36,className:"text-muted-foreground"}),s[35]=j):j=s[35];let O;s[36]!==c?(O=t.jsx(qt,{icon:j,title:"No component defined",description:"No component for this collection was defined",buttonProps:{onClick:c,children:"Go back"}}),s[36]=c,s[37]=O):O=s[37];let V;return s[38]!==L||s[39]!==O?(V=t.jsx(xe,{breadcrumb:L,children:O}),s[38]=L,s[39]=O,s[40]=V):V=s[40],V}function Yt(){const s=y.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 o=ae(e);if(decodeURIComponent(o.collectionName)==="tools"){let a;return s[1]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(Kt,{}),s[1]=a):a=s[1],a}let r;return s[2]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(Qt,{}),s[2]=r):r=s[2],r}function Ln(){const s=y.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Pe,{children:t.jsx(T.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(X,{size:32,className:"animate-spin text-muted-foreground"})}),children:t.jsx(Yt,{})})}),s[0]=e):e=s[0],e}export{Ln as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as B,j as s,l as M,B as V}from"./index-
|
|
1
|
+
import{c as B,j as s,l as M,B as V}from"./index-CFiyU0D9.js";import{c as z,a as _,b as $,D as E}from"./dropdown-menu-C62KNjwK.js";import{a as L,n as O,d as R,i as A,c as F}from"./SwitchHorizontal01-DAZXInW8.js";import{i as S}from"./ChevronUp-DBpw6M-L.js";import{a as I,b as K,c as P,T as W}from"./tooltip-DrpiSbRG.js";import{V as q}from"./view-mode-toggle-4CQodGfa.js";import{B as G}from"./badge-DhpSM7g_.js";function te(t){const e=B.c(31),{viewMode:r,onViewModeChange:m,sortKey:T,sortDirection:p,onSort:f,sortOptions:u,filters:h}=t;let g;e[0]!==u?(g=u===void 0?[]:u,e[0]=u,e[1]=g):g=e[1];const j=g;let b;e[2]!==h?(b=h===void 0?[]:h,e[2]=h,e[3]=b):b=e[3];const l=b;let v;e[4]!==l?(v=l.filter(J),e[4]=l,e[5]=v):v=e[5];const N=v.length;let w;e[6]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx(R,{size:16}),e[6]=w):w=e[6];let i;e[7]!==N?(i=N>0&&s.jsx(G,{variant:"default",className:"absolute -top-1.5 -right-1.5 h-4 min-w-4 px-1 text-[10px] leading-none",children:N}),e[7]=N,e[8]=i):i=e[8];let o;e[9]!==i?(o=s.jsx(I,{asChild:!0,children:s.jsx(_,{asChild:!0,children:s.jsxs(V,{variant:"outline",size:"icon",className:"relative",children:[w,i]})})}),e[9]=i,e[10]=o):o=e[10];let C;e[11]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx(K,{children:"Display & filters"}),e[11]=C):C=e[11];let n;e[12]!==o?(n=s.jsx(P,{children:s.jsxs(W,{children:[o,C]})}),e[12]=o,e[13]=n):n=e[13];let a;e[14]!==m||e[15]!==r?(a=m&&r&&s.jsx("div",{className:"p-2 border-b border-border",children:s.jsx(q,{value:r,onValueChange:m,fullWidth:!0,options:[{value:"table",icon:s.jsx(A,{})},{value:"cards",icon:s.jsx(F,{})}]})}),e[14]=m,e[15]=r,e[16]=a):a=e[16];let c;e[17]!==f||e[18]!==p||e[19]!==T||e[20]!==j?(c=j.length>0&&f&&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:"Sort by"}),j.map(y=>{const D=T===y.id;return s.jsx(z,{onClick:()=>f(y.id),className:M("h-8 px-2 py-0 cursor-pointer",D&&"bg-accent"),children:s.jsxs("div",{className:"flex items-center gap-2 w-full",children:[D&&s.jsx(S,{size:16,className:"text-foreground shrink-0"}),!D&&s.jsx("div",{className:"w-4 shrink-0"}),s.jsx("span",{className:"text-sm text-foreground flex-1",children:y.label}),D&&p&&(p==="asc"?s.jsx(L,{size:16,className:"text-foreground shrink-0"}):s.jsx(O,{size:16,className:"text-foreground shrink-0"}))]})},y.id)})]}),e[17]=f,e[18]=p,e[19]=T,e[20]=j,e[21]=c):c=e[21];let d;e[22]!==l?(d=l.map(H),e[22]=l,e[23]=d):d=e[23];let x;e[24]!==a||e[25]!==c||e[26]!==d?(x=s.jsxs($,{align:"end",className:"w-[200px] p-0 gap-0",children:[a,c,d]}),e[24]=a,e[25]=c,e[26]=d,e[27]=x):x=e[27];let k;return e[28]!==n||e[29]!==x?(k=s.jsxs(E,{children:[n,x]}),e[28]=n,e[29]=x,e[30]=k):k=e[30],k}function H(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 r=t.value===e.id;return s.jsx(z,{onClick:()=>t.onChange(e.id),className:M("h-8 px-2 py-0 cursor-pointer",r&&"bg-accent"),children:s.jsxs("div",{className:"flex items-center gap-2 w-full",children:[r&&s.jsx(S,{size:16,className:"text-foreground shrink-0"}),!r&&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 J(t){return t.value!=="ALL"}export{te as C};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as v,l as b,j as a,i as w}from"./index-
|
|
1
|
+
import{c as v,l as b,j as a,i as w}from"./index-CFiyU0D9.js";import{i as C}from"./SearchMd-ujiTPCmg.js";function S(j){const e=v.c(21),{value:d,onChange:m,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?a.jsx(w,{size:16,className:"animate-spin text-muted-foreground shrink-0"}):a.jsx(C,{size:16,className:"text-muted-foreground shrink-0"}),e[4]=f,e[5]=l):l=e[5];let r;e[6]!==m?(r=N=>m(N.target.value),e[6]=m,e[7]=r):r=e[7];let o;e[8]!==i||e[9]!==x||e[10]!==p||e[11]!==r||e[12]!==d?(o=a.jsx("input",{type:"text",value:d,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]=d,e[13]=o):o=e[13];let n;e[14]!==s||e[15]!==l||e[16]!==o?(n=a.jsxs("label",{className:s,children:[l,o]}),e[14]=s,e[15]=l,e[16]=o,e[17]=n):n=e[17];let c;return e[18]!==t||e[19]!==n?(c=a.jsx("div",{className:t,children:n}),e[18]=t,e[19]=n,e[20]=c):c=e[20],c}export{S as C};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as f,l as u,j as m}from"./index-
|
|
1
|
+
import{c as f,l as u,j as m}from"./index-CFiyU0D9.js";import{B as g}from"./badge-DhpSM7g_.js";function h(x){const e=f.c(12),{tabs:c,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]!==c){let l;e[6]!==n||e[7]!==s?(l=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]=l):l=e[8],r=c.map(l),e[2]=n,e[3]=s,e[4]=c,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,l as i,j as n}from"./index-
|
|
1
|
+
import{c as d,l as i,j as n}from"./index-CFiyU0D9.js";import{_ as m}from"./index-jBUpmiBg.js";import{e as k,a as N,b as j,c as b,d as w}from"./dialog-BAqFyO8a.js";import{i as y}from"./SearchMd-ujiTPCmg.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};
|