decocms 4.589.0 → 4.589.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-k-5O6cw_.js → AlertCircle-iHYLI3wA.js} +1 -1
- package/dist/client/assets/{AreaChart-BbBmBhmZ.js → AreaChart-BYhZUeRP.js} +1 -1
- package/dist/client/assets/{ArrowLeft-ClkcoIX4.js → ArrowLeft-Crx5FZ7V.js} +1 -1
- package/dist/client/assets/{ArrowRight-D62IR3mi.js → ArrowRight-ipUtveZC.js} +1 -1
- package/dist/client/assets/{ArrowUp-DwmUsoz4.js → ArrowUp-CLrfDSfr.js} +1 -1
- package/dist/client/assets/{BookOpen01-BtddYmqo.js → BookOpen01-C_4qgS91.js} +1 -1
- package/dist/client/assets/{CartesianChart-6ds2d44w.js → CartesianChart-uKSvKxUK.js} +1 -1
- package/dist/client/assets/{CategoricalChart-B61TvcyO.js → CategoricalChart-DwLXaENy.js} +1 -1
- package/dist/client/assets/{CheckCircle-Cp5xjlw-.js → CheckCircle-Bcn1SkPC.js} +1 -1
- package/dist/client/assets/{ChevronDown-CM9Urfsd.js → ChevronDown-BEVTcfYy.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-r9NWov70.js → ChevronSelectorVertical-DxrQPHmH.js} +1 -1
- package/dist/client/assets/{ChevronUp--3SHAUXV.js → ChevronUp-BEJWDky5.js} +1 -1
- package/dist/client/assets/{CreditCard01-DVqX0918.js → CreditCard01-DQXQKw2A.js} +1 -1
- package/dist/client/assets/{Eye-BoqAJmT6.js → Eye-8uguzols.js} +1 -1
- package/dist/client/assets/{File02-Dh6SOo4d.js → File02-foS0DPWb.js} +1 -1
- package/dist/client/assets/{Fingerprint04-YAruy68-.js → Fingerprint04-DJD9RxrF.js} +1 -1
- package/dist/client/assets/{Globe04-DYHS72xm.js → Globe04-CMPPLcPg.js} +1 -1
- package/dist/client/assets/{Image01-RSPET2Po.js → Image01-5QAQlONA.js} +1 -1
- package/dist/client/assets/{Key01-L7povfCu.js → Key01-o1uKXv-x.js} +1 -1
- package/dist/client/assets/{LayoutLeft-CUvx-Pvw.js → LayoutLeft-BejjIkGZ.js} +1 -1
- package/dist/client/assets/{LinkBroken01-JVhKBnEM.js → LinkBroken01-DOKZ024q.js} +1 -1
- package/dist/client/assets/{MessageCircle01-gn4vp2uo.js → MessageCircle01-BFCg8Yla.js} +1 -1
- package/dist/client/assets/{Minus-DN5eCgUQ.js → Minus-CVLCskxk.js} +1 -1
- package/dist/client/assets/{Monitor01-D0Bxj-fe.js → Monitor01-D_volcqW.js} +1 -1
- package/dist/client/assets/{Play-7916CrEc.js → Play-ClJ-fqo6.js} +1 -1
- package/dist/client/assets/{Plus-DA5fCRCT.js → Plus-DPgqzlX_.js} +1 -1
- package/dist/client/assets/{ReferenceLine-BiUIpSso.js → ReferenceLine-BUQcJCjj.js} +1 -1
- package/dist/client/assets/{SearchMd-BPdzWKZu.js → SearchMd-0hSvyNNc.js} +1 -1
- package/dist/client/assets/{ShoppingBag01-BhOTMWsh.js → ShoppingBag01-Dzd7DSPA.js} +1 -1
- package/dist/client/assets/{Sun-CcLmZkDa.js → Sun-D-iFjrkT.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-KL7mZ6la.js → SwitchHorizontal01-fo0U4Jp1.js} +1 -1
- package/dist/client/assets/{Tool01-x-P519mQ.js → Tool01-CAPkmPtU.js} +1 -1
- package/dist/client/assets/{Tooltip-Djlyj-LN.js → Tooltip-YU2cQ8p5.js} +1 -1
- package/dist/client/assets/{Trash01-q67Vms6R.js → Trash01-BJozO1DS.js} +1 -1
- package/dist/client/assets/{TrendUp01-CXnsnsUU.js → TrendUp01-C3pm_0WN.js} +1 -1
- package/dist/client/assets/{Upload01-BUC8UUt4.js → Upload01-DSwYubv_.js} +1 -1
- package/dist/client/assets/{UserCheck01-BxAZblZb.js → UserCheck01-UUUmyjQl.js} +1 -1
- package/dist/client/assets/{UserSquare-2uLtK5zL.js → UserSquare-C9Yfn3z-.js} +1 -1
- package/dist/client/assets/{Users01-GuAUZTSm.js → Users01-D4LsevsD.js} +1 -1
- package/dist/client/assets/{XClose-BKbw2IM5.js → XClose-2FBIsrt9.js} +1 -1
- package/dist/client/assets/{Zap-iZQqC26K.js → Zap-CDm_Ehxw.js} +1 -1
- package/dist/client/assets/{access-gate-DNdYk1Lk.js → access-gate-BwFzBMDO.js} +1 -1
- package/dist/client/assets/{add-connection-dialog-BgsYTqB2.js → add-connection-dialog-BXLnkEQI.js} +1 -1
- package/dist/client/assets/agent-app-CaThun3p.js +1 -0
- package/dist/client/assets/{agent-assets-BlAA6Ea3.js → agent-assets-DQ6MCcEj.js} +1 -1
- package/dist/client/assets/{agent-automation-WLxLTpF2.js → agent-automation-BqTAjK3Y.js} +1 -1
- package/dist/client/assets/{agent-automations-Q5qlgn-x.js → agent-automations-B_MlFsas.js} +1 -1
- package/dist/client/assets/{agent-blog-DlTYvL9l.js → agent-blog-Cf0tbU1l.js} +2 -2
- package/dist/client/assets/{agent-blog-post-CYSXcL8b.js → agent-blog-post-31LJFaZl.js} +2 -2
- package/dist/client/assets/{agent-calendar-CmW3YOqH.js → agent-calendar-BPD66_Yn.js} +1 -1
- package/dist/client/assets/{agent-capabilities-B_vVx4Z2.js → agent-capabilities-BsyhIZjv.js} +1 -1
- package/dist/client/assets/{agent-connect-sources-CMaIt_p4.js → agent-connect-sources-C5jaXM3z.js} +1 -1
- package/dist/client/assets/agent-deck-C4-3n5Um.js +1 -0
- package/dist/client/assets/{agent-e2e-D9ABwflY.js → agent-e2e-B4bXub-8.js} +1 -1
- package/dist/client/assets/agent-experiments-Dt4E84CD.js +1 -0
- package/dist/client/assets/agent-file-ZoyASwRD.js +1 -0
- package/dist/client/assets/{agent-hosting-D1Xn3qWe.js → agent-hosting-S1nwBnV9.js} +1 -1
- package/dist/client/assets/{agent-icon-1xBXRQD0.js → agent-icon-BsqGoLFA.js} +1 -1
- package/dist/client/assets/agent-library-Dp1THlC2.js +1 -0
- package/dist/client/assets/agent-library-file-MqTLUDDf.js +1 -0
- package/dist/client/assets/agent-overview-D36Aps5a.js +1 -0
- package/dist/client/assets/{agent-releases-CvessDoS.js → agent-releases-DU3bmm_0.js} +1 -1
- package/dist/client/assets/agent-settings-Cwf8ygyN.js +1 -0
- package/dist/client/assets/{agent-site-editor-DaA9FbZT.js → agent-site-editor-C14Msw43.js} +1 -1
- package/dist/client/assets/agent-site-editor-code-Bfx6tF36.js +2 -0
- package/dist/client/assets/agent-site-editor-content-ClE_yu25.js +1 -0
- package/dist/client/assets/agent-site-editor-preview-CkOj53vr.js +1 -0
- package/dist/client/assets/agent-view-BFaJoYzv.js +1 -0
- package/dist/client/assets/{agent-view-guard-DtzAtZkl.js → agent-view-guard-CIz8LGod.js} +1 -1
- package/dist/client/assets/{ai-providers-D_nS8tyt.js → ai-providers-r0-0mCmL.js} +1 -1
- package/dist/client/assets/{alert-BKTlpEuH.js → alert-DOHGmi4E.js} +1 -1
- package/dist/client/assets/{analytics-sections-CHwF2OJ5.js → analytics-sections-ByzsZ2nT.js} +1 -1
- package/dist/client/assets/{api-keys-nye037OF.js → api-keys-Cx-1_N3a.js} +1 -1
- package/dist/client/assets/api-keys-DEDTYWqc.js +1 -0
- package/dist/client/assets/{app-editor-DIR7u1uj.js → app-editor-Dog5XorX.js} +1 -1
- package/dist/client/assets/{asset-utils-EHKoLUwI.js → asset-utils-bAbYz6KR.js} +1 -1
- package/dist/client/assets/{auth-n3l0CNa5.js → auth-D7fJVlZI.js} +1 -1
- package/dist/client/assets/{auth-catchall-B1hTDp3D.js → auth-catchall-mcIpmHwN.js} +1 -1
- package/dist/client/assets/{auth-entry-C9-pIDNg.js → auth-entry--fPh4bga.js} +1 -1
- package/dist/client/assets/{auth-split-layout-BDghObzj.js → auth-split-layout-CgDgkGrM.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-wfBLEPa1.js → authenticate-and-persist-oauth-CagzPMUa.js} +1 -1
- package/dist/client/assets/{automation-list-row-BaFEU26i.js → automation-list-row-CzmFBSJK.js} +1 -1
- package/dist/client/assets/{automation-runs-R-XY-5Gf.js → automation-runs-pGRkVZxp.js} +1 -1
- package/dist/client/assets/{automations-DA4CRapY.js → automations-CdiT8rAu.js} +1 -1
- package/dist/client/assets/{badge-qzONP_je.js → badge-6S4VrRSd.js} +1 -1
- package/dist/client/assets/{block-document-3MwcWTqG.js → block-document-W9khPqgD.js} +1 -1
- package/dist/client/assets/{blocks-preview-workspace-context-Cx1-vnp6.js → blocks-preview-workspace-context-DqT5ijpX.js} +1 -1
- package/dist/client/assets/{blocks-tab-states-BzmLdpJn.js → blocks-tab-states-KPALSuby.js} +1 -1
- package/dist/client/assets/{blog-preview-url--XUf7gOW.js → blog-preview-url-B0kKH_hk.js} +1 -1
- package/dist/client/assets/{blog-schema-nE0twzgM.js → blog-schema-Cq1DY5OT.js} +1 -1
- package/dist/client/assets/{blog-source-gate-DqoOOI_M.js → blog-source-gate-BKHgRm5t.js} +1 -1
- package/dist/client/assets/{blog-view-gate-BJcOSjYL.js → blog-view-gate-BSbrrvm1.js} +1 -1
- package/dist/client/assets/{buckets-uZt9g5Bq.js → buckets-CnsbkFLd.js} +1 -1
- package/dist/client/assets/{build-improve-prompt-doc-CgWoBsJ9.js → build-improve-prompt-doc-w2XF9qPZ.js} +1 -1
- package/dist/client/assets/{calendar-Dpmy4fF4.js → calendar-CMiVsJ2O.js} +1 -1
- package/dist/client/assets/{capability-load-error-Cdh5jEwj.js → capability-load-error-BsPxZdDg.js} +1 -1
- package/dist/client/assets/{category-editor-Dwd3B69y.js → category-editor-B55wgVpm.js} +1 -1
- package/dist/client/assets/{category-tree-BhvPvvoc.js → category-tree-Dx9MEpa8.js} +1 -1
- package/dist/client/assets/{chart-DrWDD8lq.js → chart-_k2iqUio.js} +1 -1
- package/dist/client/assets/{chat-context-SiB3iaPb.js → chat-context-j3hnPPib.js} +1 -1
- package/dist/client/assets/{chat-draft-DZb5RXeg.js → chat-draft-C0rM_rqB.js} +1 -1
- package/dist/client/assets/{checkbox-2zvTb6ww.js → checkbox-Cdx0XKK4.js} +1 -1
- package/dist/client/assets/{choose-editor-CNWQv99A.js → choose-editor-BD2gD3z5.js} +1 -1
- package/dist/client/assets/{cli-auth-success-BLj0fm2s.js → cli-auth-success-DkpbFCDc.js} +1 -1
- package/dist/client/assets/{cms-settings-editor-C5EiL7JE.js → cms-settings-editor-B9i94VP_.js} +1 -1
- package/dist/client/assets/{cms-store-drafts-OgnJq3xE.js → cms-store-drafts-FkDsCDbL.js} +1 -1
- package/dist/client/assets/{collapsible-CGEFlpDq.js → collapsible-BzN0Qes0.js} +1 -1
- package/dist/client/assets/{collection-detail-PIXIFFSE.js → collection-detail-C4Ke0wbG.js} +1 -1
- package/dist/client/assets/{collection-display-button-B1Sy-opz.js → collection-display-button-BHiOzw31.js} +1 -1
- package/dist/client/assets/{collection-search-OTIoM0sQ.js → collection-search-CcaFYOka.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-AbpEjmrL.js → collection-table-wrapper-DkjjklLa.js} +1 -1
- package/dist/client/assets/{collection-tabs-CeLcBMHA.js → collection-tabs-BwesRoId.js} +1 -1
- package/dist/client/assets/{combobox-Cb2ClVLj.js → combobox-JgBd9MSE.js} +1 -1
- package/dist/client/assets/{command-n87yBV6H.js → command-DVSq7p7n.js} +1 -1
- package/dist/client/assets/{companion-mcps-section-DNJp1Z4x.js → companion-mcps-section-DCGfaw7A.js} +1 -1
- package/dist/client/assets/{config-3CnG3YfD.js → config-CKkzGJkL.js} +1 -1
- package/dist/client/assets/{connect-key-CK5GMVlb.js → connect-key-hZHvW2X-.js} +1 -1
- package/dist/client/assets/{connect-layout-BlNkHf40.js → connect-layout-tKbIMecd.js} +1 -1
- package/dist/client/assets/{connect-source-dialog-B5QdFSKj.js → connect-source-dialog-CzPiRiCA.js} +1 -1
- package/dist/client/assets/{connect-B3H39Rc5.js → connect-ys4Sl4xB.js} +1 -1
- package/dist/client/assets/{connection-card-DLq506jh.js → connection-card-CJUEGGqR.js} +1 -1
- package/dist/client/assets/{connection-detail-Cb8cn8w5.js → connection-detail-lYpymXb_.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-DgyNgCMk.js → connection-form-helpers-Ccz7aVvg.js} +1 -1
- package/dist/client/assets/{connection-D7qO0DS_.js → connection-nHJUyklo.js} +1 -1
- package/dist/client/assets/{connection-slug-Cz4zCQv8.js → connection-slug-DUcOK0Fv.js} +1 -1
- package/dist/client/assets/{connections-D91ZFGMn.js → connections-D32hrWXX.js} +1 -1
- package/dist/client/assets/{content-tab-BxFhj1WZ.js → content-tab-BrA4C_fM.js} +3 -3
- package/dist/client/assets/{context-CajYEf8N.js → context-C7dlM4xM.js} +1 -1
- package/dist/client/assets/{context-menu-h7MPYNV3.js → context-menu-DHrP4gKv.js} +1 -1
- package/dist/client/assets/{context-shell-DflkpwUC.js → context-shell-BUcF0UUg.js} +3 -3
- package/dist/client/assets/{create-organization-dialog-Dhpldq4f.js → create-organization-dialog-By1RJqKH.js} +1 -1
- package/dist/client/assets/{daily-pulse-nXUPyJMF.js → daily-pulse-DSk3dDWE.js} +1 -1
- package/dist/client/assets/{delete-copy-We0skK0X.js → delete-copy-Kn8AlU6Q.js} +1 -1
- package/dist/client/assets/{device-hint-DOcsqBNG.js → device-hint-99FRzBRh.js} +1 -1
- package/dist/client/assets/{discover-sj6esNit.js → discover-jVbiCy7Z.js} +1 -1
- package/dist/client/assets/{domain-settings-DxSVKJuS.js → domain-settings-DTUBY3uJ.js} +1 -1
- package/dist/client/assets/{drawer-CHLTZ7IE.js → drawer-CEhULiRL.js} +1 -1
- package/dist/client/assets/{editor-BSfFsGxN.js → editor-CX-xsdGa.js} +1 -1
- package/dist/client/assets/{editor-classes-BFc0AEgj.js → editor-classes-BJYykvRM.js} +1 -1
- package/dist/client/assets/{empty-message-BCpAqPWS.js → empty-message-BbW3Jun4.js} +1 -1
- package/dist/client/assets/{empty-state-XftlsSWz.js → empty-state-Cojx_Zm8.js} +1 -1
- package/dist/client/assets/{empty-state-B8oDHUMl.js → empty-state-DXP-L1Wm.js} +1 -1
- package/dist/client/assets/{experiments-tab-choice-Dm_h0xkr.js → experiments-tab-choice-Dh5QN5lA.js} +1 -1
- package/dist/client/assets/{extract-connection-data-DlPXjE5Z.js → extract-connection-data-DpbVANVQ.js} +1 -1
- package/dist/client/assets/{feature-gate-Dz2idXk1.js → feature-gate-3H-gGeAe.js} +1 -1
- package/dist/client/assets/{feature-paywall-QNpgcQyq.js → feature-paywall-DleoKpSm.js} +1 -1
- package/dist/client/assets/{file-explorer-SBkm6OaE.js → file-explorer-Cp783Tpn.js} +1 -1
- package/dist/client/assets/{file-preview-e5Po0Lnn.js → file-preview-8A9Z-Pv6.js} +1 -1
- package/dist/client/assets/{file-share-button-DLIUfXlB.js → file-share-button-Dtr80KeB.js} +1 -1
- package/dist/client/assets/{file-type-icon-DHed-Vbt.js → file-type-icon-DTjItFVz.js} +1 -1
- package/dist/client/assets/{folder-icon-BmyxaPeT.js → folder-icon-CzIe0pJo.js} +1 -1
- package/dist/client/assets/{form-tdA5bJ97.js → form-Dol0DPDh.js} +1 -1
- package/dist/client/assets/{frame-navigation-DJad9YsZ.js → frame-navigation-DlUhG149.js} +1 -1
- package/dist/client/assets/{gateway-client-MCgSJtiT.js → gateway-client-Cv5mFjk5.js} +1 -1
- package/dist/client/assets/{general-Dq2SfvLf.js → general-K7Ly14C_.js} +1 -1
- package/dist/client/assets/{github-icon-BSdAKSFL.js → github-icon-Df4tGqBJ.js} +1 -1
- package/dist/client/assets/{held-block-view-DMqKyknK.js → held-block-view-CVaa9FfQ.js} +1 -1
- package/dist/client/assets/{home-Dj3ETwz3.js → home-CMisahbl.js} +1 -1
- package/dist/client/assets/{home-overview-DxRzuH3P.js → home-overview-QXWQEji-.js} +1 -1
- package/dist/client/assets/{hosted-reconcile-BP447g5V.js → hosted-reconcile-BMXAyYfq.js} +1 -1
- package/dist/client/assets/{icon-button-B1n86T_T.js → icon-button-CdifSdSj.js} +1 -1
- package/dist/client/assets/{index-CZRVgAXr.js → index-4b--WRWP.js} +1 -1
- package/dist/client/assets/{index-DxMUaH8f.js → index-BBOoPujC.js} +1 -1
- package/dist/client/assets/{index-Gg8ZNrTJ.js → index-BgM7C0ew.js} +1 -1
- package/dist/client/assets/{index-DeDZf8GV.js → index-BgkSXyah.js} +1 -1
- package/dist/client/assets/{index-CDbo40Qi.js → index-BlJBO-4-.js} +1 -1
- package/dist/client/assets/{index-DdcMEgo_.js → index-BmbgcyrV.js} +1 -1
- package/dist/client/assets/{index-zfbeX5vo.js → index-BybXw0ff.js} +1 -1
- package/dist/client/assets/{index-_v_cX_Uz.js → index-CM7QLcHH.js} +3 -3
- package/dist/client/assets/{index-BpQKQj0d.js → index-COqqVuml.js} +1 -1
- package/dist/client/assets/{index-Cv404MWT.js → index-CUq-H9kS.js} +1 -1
- package/dist/client/assets/{index-DYBVGhf3.js → index-CjeoaOq1.js} +1 -1
- package/dist/client/assets/{index-D4QMDMQB.js → index-Cv1rMcuh.js} +1 -1
- package/dist/client/assets/{index-B9Qj8_a8.js → index-CvH2MSpo.js} +1 -1
- package/dist/client/assets/{index-DBEc0hp1.js → index-VhglRpxf.js} +1 -1
- package/dist/client/assets/{index-I4vIjLyL.js → index-XHwfOtpV.js} +1 -1
- package/dist/client/assets/{index-8J9eeoYX.js → index-ZityOjdC.js} +1 -1
- package/dist/client/assets/{index-redirect-CbBr1BrP.js → index-redirect-8j7UZTHx.js} +1 -1
- package/dist/client/assets/{index-CO8P4I1E.js → index-rm58Ae1x.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-BjuIdZaK.js → infiniteQueryObserver-DvCgvYkY.js} +1 -1
- package/dist/client/assets/{infra-billing-BggUjndl.js → infra-billing-Cly584OY.js} +1 -1
- package/dist/client/assets/{input-DVGC51NU.js → input-A3jqLlaQ.js} +3 -3
- package/dist/client/assets/{input-rwnUX4xK.js → input-DiaViL4j.js} +1 -1
- package/dist/client/assets/{integration-icon-DMudGnaH.js → integration-icon-DiYH80o3.js} +1 -1
- package/dist/client/assets/{item-actions-CXcqqG2O.js → item-actions-DloHlq0j.js} +1 -1
- package/dist/client/assets/{jira-icon-Cs0wA4Aj.js → jira-icon--6KDrxLj.js} +1 -1
- package/dist/client/assets/{label-BPobXy5D.js → label-C3UnAGG4.js} +1 -1
- package/dist/client/assets/{layout-Haof-3fN.js → layout-DJuaIAka.js} +1 -1
- package/dist/client/assets/{legacy-admin-welcome-dialog-DR6IgoHi.js → legacy-admin-welcome-dialog-DFUf5Cdu.js} +1 -1
- package/dist/client/assets/{legacy-agents-deep-BhViZxi4.js → legacy-agents-deep-DtW_imiE.js} +1 -1
- package/dist/client/assets/{legacy-main-redirect-BRcPtkE0.js → legacy-main-redirect-BS5y0F2f.js} +1 -1
- package/dist/client/assets/library-qh111GTe.js +1 -0
- package/dist/client/assets/{library-tab-BXZW9Gf-.js → library-tab-CMlXx_SF.js} +1 -1
- package/dist/client/assets/{login-DEJdToWz.js → login-yrc2iZYE.js} +1 -1
- package/dist/client/assets/{markdown-6Y7kRU0S.js → markdown-Dh0wHZhv.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-DRWpmXqd.js → mcp-app-renderer-DtYrCtmr.js} +1 -1
- package/dist/client/assets/{mcp-oauth-CuTkV8Yh.js → mcp-oauth-ClKqUQpf.js} +1 -1
- package/dist/client/assets/{mcp-oauth-dNTY3RLT.js → mcp-oauth-daaKdPIW.js} +1 -1
- package/dist/client/assets/{members-r4o9r9rq.js → members-BX-0kJRN.js} +1 -1
- package/dist/client/assets/{memory-DJveej8e.js → memory-CtjxvXGU.js} +1 -1
- package/dist/client/assets/{mock-board-BfAvxuuB.js → mock-board-DpyDhwr5.js} +3 -3
- package/dist/client/assets/{monaco-editor-DVnCrHXl.js → monaco-editor-D3Gw1Jfy.js} +1 -1
- package/dist/client/assets/monitoring-D_tNIZ2e.js +2 -0
- package/dist/client/assets/{monitoring-stats-row--t2gmwDv.js → monitoring-stats-row-C6kAl3zD.js} +1 -1
- package/dist/client/assets/{multi-select-C4pEiex-.js → multi-select-DvfLkkrU.js} +1 -1
- package/dist/client/assets/{mustache-BJxqarwP.js → mustache-CLHAlDpU.js} +1 -1
- package/dist/client/assets/{named-rule-step-CeWd1q2n.js → named-rule-step-BnZCIvtI.js} +1 -1
- package/dist/client/assets/{named-rule-view-B-FR02zc.js → named-rule-view-DM7JOYEY.js} +1 -1
- package/dist/client/assets/{new-project-dialog-BF76iYqU.js → new-project-dialog-CLqrrOSd.js} +1 -1
- package/dist/client/assets/{new-project-store-DWxCJQOo.js → new-project-store-BfCXIlUR.js} +1 -1
- package/dist/client/assets/{oauth-callback-DTZ86bL8.js → oauth-callback-C2bvYENs.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-DuXQBSEx.js → oauth-callback-ai-provider-Cv9ZTrWg.js} +1 -1
- package/dist/client/assets/{oauth-consent-_PYevD-4.js → oauth-consent-CXCI4aOM.js} +1 -1
- package/dist/client/assets/{onboarding-Dv4c0ulx.js → onboarding-CvxIS3gV.js} +1 -1
- package/dist/client/assets/{openai-conversation-Ccmhy4PF.js → openai-conversation-DA7CTgnA.js} +1 -1
- package/dist/client/assets/{optimistic-project-sidebar-views-ChxB21rZ.js → optimistic-project-sidebar-views-CsRuVxdu.js} +1 -1
- package/dist/client/assets/{order-monitor-day-Dz2wZyUQ.js → order-monitor-day-DyAv0mEB.js} +1 -1
- package/dist/client/assets/{organization-choice-Doar8yJk.js → organization-choice-D110x4oD.js} +1 -1
- package/dist/client/assets/{orgs-Du522J0-.js → orgs-FQXpiZ1_.js} +1 -1
- package/dist/client/assets/{own-accounts-section-Dub3kcxT.js → own-accounts-section-7akGVJrI.js} +1 -1
- package/dist/client/assets/{pair-dE3C8WhI.js → pair-Dm1DLdXS.js} +1 -1
- package/dist/client/assets/{parse-sections-BNVVULt_.js → parse-sections-PsKqddQO.js} +2 -2
- package/dist/client/assets/{plan-eTOH4djb.js → plan-Co0vMUcn.js} +1 -1
- package/dist/client/assets/{plan-ladder-CbTEVjlC.js → plan-ladder-Cq8l_zYq.js} +1 -1
- package/dist/client/assets/{plan-usage-card-_Ff0mpr8.js → plan-usage-card-DFxgoAX0.js} +1 -1
- package/dist/client/assets/{popover-SbxIMG75.js → popover-DmtZGzFU.js} +1 -1
- package/dist/client/assets/{post-calendar-B1CybeCu.js → post-calendar-Da3q3Ygw.js} +1 -1
- package/dist/client/assets/{post-editor-CNorej-X.js → post-editor-Hqz0xhX7.js} +1 -1
- package/dist/client/assets/{preview-content-LyXURvUK.js → preview-content-hEcinhPu.js} +1 -1
- package/dist/client/assets/{preview-dialog-bMg2yisv.js → preview-dialog-DljBi3FV.js} +1 -1
- package/dist/client/assets/{preview-panel-DVadceTQ.js → preview-panel-DO2BIcaB.js} +1 -1
- package/dist/client/assets/{preview-tab-CX_rhPDl.js → preview-tab-pXBusHNY.js} +3 -3
- package/dist/client/assets/{product-picker-dialog-J_wgt3fp.js → product-picker-dialog-DLj4-KZd.js} +1 -1
- package/dist/client/assets/{profile-Kt0coOMj.js → profile-Dtmbbo3x.js} +1 -1
- package/dist/client/assets/{project-app-view-BJ3tVux4.js → project-app-view-BxptOyUa.js} +1 -1
- package/dist/client/assets/{project-apps-Cni0OecT.js → project-apps-Cn4DuDQX.js} +1 -1
- package/dist/client/assets/{project-icon-m6Ad1m7q.js → project-icon-DbKP1qyo.js} +1 -1
- package/dist/client/assets/{project-index-C0zTM-WA.js → project-index-BUELrKzm.js} +1 -1
- package/dist/client/assets/project-reports-CNlIBYwg.js +1 -0
- package/dist/client/assets/project-tasks-DQYKPSKu.js +1 -0
- package/dist/client/assets/{projects-oaHlFO8V.js → projects-BoBHi4SI.js} +1 -1
- package/dist/client/assets/{projects-empty-state-B91deBQU.js → projects-empty-state-C9ApcIGM.js} +1 -1
- package/dist/client/assets/{prompts-DSIkPLeQ.js → prompts-jatLyuYM.js} +1 -1
- package/dist/client/assets/record-editor-Cp3c1KLb.js +1 -0
- package/dist/client/assets/{redirect-editor-yx7ByECD.js → redirect-editor-DgMP0xUQ.js} +1 -1
- package/dist/client/assets/{reports-D7g3Ml1J.js → reports-CdFOpeDD.js} +1 -1
- package/dist/client/assets/reports-DOVfNyho.js +1 -0
- package/dist/client/assets/{reports-onboarding-BhNZvfy4.js → reports-onboarding-D_ZP7_DT.js} +1 -1
- package/dist/client/assets/{reports-tab-Gh5DaJuQ.js → reports-tab-B8zZV09K.js} +2 -2
- package/dist/client/assets/repositories-HhM0lN0I.js +1 -0
- package/dist/client/assets/{repositories-C0KYN8ne.js → repositories-O2ZQLufg.js} +1 -1
- package/dist/client/assets/{repository-binding-CaMbcDLV.js → repository-binding-DGBKNnnx.js} +1 -1
- package/dist/client/assets/{repository-picker-CtTW0G31.js → repository-picker-Ck1bYhNz.js} +1 -1
- package/dist/client/assets/{require-capability-CdsgNeD6.js → require-capability-DWuswMDo.js} +1 -1
- package/dist/client/assets/{required-auth-layout-AmJ1uTFt.js → required-auth-layout-fGhNBti1.js} +1 -1
- package/dist/client/assets/{reset-password-CtqV555d.js → reset-password-YiTpF_34.js} +1 -1
- package/dist/client/assets/{resizable-BVcChq5e.js → resizable-utjkC78H.js} +1 -1
- package/dist/client/assets/{resolve-tab-icon-DERG1JDa.js → resolve-tab-icon-Cdcrgm48.js} +1 -1
- package/dist/client/assets/{review-settings--Kf9eCfs.js → review-settings-HU6DVEY_.js} +1 -1
- package/dist/client/assets/{role-color-OzS56aIA.js → role-color-Dn3u5B7Y.js} +1 -1
- package/dist/client/assets/{roles-5yWWx_DJ.js → roles-BICOUyYP.js} +1 -1
- package/dist/client/assets/{route-CvAef_ho.js → route-BGXXnJrt.js} +1 -1
- package/dist/client/assets/{route-9oi0rgOU.js → route-Ds4xA11c.js} +1 -1
- package/dist/client/assets/{route-page-header-Dwl09nk0.js → route-page-header-B-x8DYPs.js} +1 -1
- package/dist/client/assets/route-uH186jXx.js +1 -0
- package/dist/client/assets/{sandbox-git-api-CUzd7R0k.js → sandbox-git-api-Dn4SMgAT.js} +1 -1
- package/dist/client/assets/{sandbox-lifecycle-context-Bb3AkWOb.js → sandbox-lifecycle-context-jNC_clan.js} +1 -1
- package/dist/client/assets/{save-status-DwZEDw1l.js → save-status-BV5dLQjb.js} +1 -1
- package/dist/client/assets/{schema-XQ38kn3Z.js → schema-Ce-FrpNr.js} +1 -1
- package/dist/client/assets/{schema-CkOMMSLb.js → schema-DcgkXC70.js} +1 -1
- package/dist/client/assets/{scroll-area-CYAgrqag.js → scroll-area-b9xVFzV5.js} +1 -1
- package/dist/client/assets/{search-input-C650lN1b.js → search-input-1i2wqfqT.js} +1 -1
- package/dist/client/assets/{search-toggle-C3h6VPGQ.js → search-toggle-XYuup3CG.js} +1 -1
- package/dist/client/assets/{secret-picker-Dgn1St8u.js → secret-picker-DZquDxOH.js} +1 -1
- package/dist/client/assets/{secrets-CHUSJNqz.js → secrets-DpZZQQGY.js} +1 -1
- package/dist/client/assets/{section-array-field-DjpdZjjA.js → section-array-field-BSHV5f4W.js} +1 -1
- package/dist/client/assets/{sections-RWn2QTBe.js → sections-Cx2cA7bt.js} +1 -1
- package/dist/client/assets/{sections-editor-DtmSAXwn.js → sections-editor-PxxwYC37.js} +1 -1
- package/dist/client/assets/{select-BAD2nCs0.js → select-CaopsMfN.js} +1 -1
- package/dist/client/assets/{select-model-DuWZC39Y.js → select-model-BopeKOzD.js} +1 -1
- package/dist/client/assets/{seo-editor-DQ-gjrg1.js → seo-editor-aSBXwgtx.js} +1 -1
- package/dist/client/assets/{separator-DxL8DcTB.js → separator-HRL3cQc1.js} +1 -1
- package/dist/client/assets/{session-runtime-CoMtO0vP.js → session-runtime-DxWcwkbE.js} +1 -1
- package/dist/client/assets/settings-tab-DCmoO3Y0.js +1 -0
- package/dist/client/assets/{sheet-BSNpAEVQ.js → sheet-BO3NxzQ5.js} +1 -1
- package/dist/client/assets/{shell-layout-C2FEOZHE.js → shell-layout-B-KkCs2s.js} +1 -1
- package/dist/client/assets/{site-draft-actions-DQhEp0pW.js → site-draft-actions-JYm0Mn1B.js} +1 -1
- package/dist/client/assets/{site-draft-view-JFh5CXlv.js → site-draft-view-DNiaphx_.js} +1 -1
- package/dist/client/assets/site-editor-Cdx1-RS5.js +1 -0
- package/dist/client/assets/{site-editor-toast-DbjIe6vh.js → site-editor-toast-Dn6ViTaq.js} +1 -1
- package/dist/client/assets/{skills-mk29STuQ.js → skills-BHa_bfo4.js} +1 -1
- package/dist/client/assets/{slider-DMCHPWiy.js → slider-fBCZdjFb.js} +1 -1
- package/dist/client/assets/{sortable.esm-CsjiJtN2.js → sortable.esm-BFwpd7Bz.js} +1 -1
- package/dist/client/assets/{sso-SIfrP_88.js → sso-DiYuDVPI.js} +1 -1
- package/dist/client/assets/{suggestion-CX1YVdIt.js → suggestion-CCkp3p2A.js} +1 -1
- package/dist/client/assets/{super-agent-icon-DCxdIVB-.js → super-agent-icon-Dc9HnUHT.js} +1 -1
- package/dist/client/assets/{switch-BHmpCIVF.js → switch-D7D2_cGm.js} +1 -1
- package/dist/client/assets/{synced-repos-BFxzW6vz.js → synced-repos-BYS6iZQk.js} +1 -1
- package/dist/client/assets/{tab-icon-glyph-FZMoReXN.js → tab-icon-glyph--TL2dqdf.js} +1 -1
- package/dist/client/assets/{table-DUtLs9KY.js → table-Byvkq2zY.js} +1 -1
- package/dist/client/assets/{tabs-ByjyyO35.js → tabs-BsgKQ4s5.js} +1 -1
- package/dist/client/assets/{task-board-DFizZUve.js → task-board-GaVTCBBV.js} +1 -1
- package/dist/client/assets/{task-key-jbMkJ-gq.js → task-key-DtysXUVK.js} +1 -1
- package/dist/client/assets/{task-route-jGx8dPBi.js → task-route-CUqbdLvO.js} +1 -1
- package/dist/client/assets/{task-status-D6uDrhP9.js → task-status-BXqVXI-m.js} +1 -1
- package/dist/client/assets/{taskboard-analytics-C9Q3oP78.js → taskboard-analytics-B0HWC6O-.js} +1 -1
- package/dist/client/assets/tasks-DhSSxaKz.js +1 -0
- package/dist/client/assets/{tasks-CQ1Xzkf7.js → tasks-miMlN4cx.js} +1 -1
- package/dist/client/assets/{textarea-BG3_jDPK.js → textarea-ZVs6QWMS.js} +1 -1
- package/dist/client/assets/{thread-analytics-PTzxnnwH.js → thread-analytics-BtdyB-95.js} +1 -1
- package/dist/client/assets/{thread-button-CSrnO4J2.js → thread-button-BP19iYV6.js} +1 -1
- package/dist/client/assets/{thread-intent-AFleKGnm.js → thread-intent-CXxEw9VY.js} +1 -1
- package/dist/client/assets/{thread-route-XlUtBNme.js → thread-route-uvbTgJ88.js} +1 -1
- package/dist/client/assets/{thread-route-DgTdTFs-.js → thread-route-vX4Lb76a.js} +1 -1
- package/dist/client/assets/{thread-sheet-body-D9NA2h2p.js → thread-sheet-body-W61B260Q.js} +1 -1
- package/dist/client/assets/{time-range-picker-COT-3s6C.js → time-range-picker-KAXJCf1A.js} +1 -1
- package/dist/client/assets/{toggle-group-B5NhEkmw.js → toggle-group-CnZM62uw.js} +1 -1
- package/dist/client/assets/{tool-set-selector--vjZ40l5.js → tool-set-selector-DkiUwtNk.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-slFtkrIv.js → toolbar-icon-button-BIIhydVi.js} +1 -1
- package/dist/client/assets/{tooltip-2yYSYsa-.js → tooltip-BQEYSfJS.js} +1 -1
- package/dist/client/assets/{tooltipContext-BjkTtu04.js → tooltipContext-DbDWWDqQ.js} +1 -1
- package/dist/client/assets/{track-FOISCTZ9.js → track-e9xtonv_.js} +1 -1
- package/dist/client/assets/{types-C-gTijki.js → types-DWswJ8mv.js} +1 -1
- package/dist/client/assets/{url-slug-lJqSTlr5.js → url-slug-DjA6hXx8.js} +1 -1
- package/dist/client/assets/{usage-stats-BeZTZSlb.js → usage-stats-B9lqQ6Vi.js} +1 -1
- package/dist/client/assets/{use-ai-providers-DBMFXH54.js → use-ai-providers-BG51IkbK.js} +1 -1
- package/dist/client/assets/{use-api-keys-n29QPUT5.js → use-api-keys-BxJnNXoF.js} +1 -1
- package/dist/client/assets/{use-apply-named-rule-Bodgcm5R.js → use-apply-named-rule-C8FWPrxn.js} +1 -1
- package/dist/client/assets/use-ask-in-chat-D5OfnzQn.js +1 -0
- package/dist/client/assets/{use-automations-CxZwTkEF.js → use-automations-DbnU6HJw.js} +1 -1
- package/dist/client/assets/{use-autosave-BAhs-b8G.js → use-autosave-D33RJEAf.js} +1 -1
- package/dist/client/assets/use-blocks-v8-project-BoPkhD0M.js +1 -0
- package/dist/client/assets/use-blog-view-B86NPWtX.js +1 -0
- package/dist/client/assets/{use-chat-layout-state-BjrxY9zk.js → use-chat-layout-state-C-ACjcBl.js} +1 -1
- package/dist/client/assets/{use-cms-publish-actions-BAGkHuFe.js → use-cms-publish-actions-ReRXsKsa.js} +1 -1
- package/dist/client/assets/{use-connect-companion-DdHCkif9.js → use-connect-companion-C1XxMwnF.js} +1 -1
- package/dist/client/assets/{use-connection-DXrrdGow.js → use-connection-zSjqu4n6.js} +1 -1
- package/dist/client/assets/{use-content-sync-DZOdB8PF.js → use-content-sync-CjWUTBAq.js} +1 -1
- package/dist/client/assets/{use-copy-C9KqfKbD.js → use-copy-pqQjGIBG.js} +1 -1
- package/dist/client/assets/{use-current-view-CTU_KTOZ.js → use-current-view-vcCNv8DD.js} +1 -1
- package/dist/client/assets/{use-date-fns-locale-DL2Sv8WK.js → use-date-fns-locale-CZuNa_MT.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-LqgXHP5M.js → use-debounced-autosave-0vKSwZYP.js} +1 -1
- package/dist/client/assets/{use-debounced-value-D0-3lKxq.js → use-debounced-value-DfcYC5J6.js} +1 -1
- package/dist/client/assets/{use-deco-credits-BlcIIio7.js → use-deco-credits-DxqKl3TU.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-ia2U1D-_.js → use-decopilot-events-CMQAe_lU.js} +1 -1
- package/dist/client/assets/{use-delete-block-4OWBeqRv.js → use-delete-block-CFJmdzOj.js} +1 -1
- package/dist/client/assets/{use-delete-connection-BhL2muMH.js → use-delete-connection-BHPfP1_h.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-DMzm770d.js → use-deployment-admin-CZypPrVT.js} +1 -1
- package/dist/client/assets/{use-entitlements-C0Jnglmb.js → use-entitlements-DDuw6b8L.js} +1 -1
- package/dist/client/assets/{use-fast-preview-draft-url-BbJh-wFY.js → use-fast-preview-draft-url-YZ259K-C.js} +1 -1
- package/dist/client/assets/{use-file-configs-Bj7muxL3.js → use-file-configs-CDDhJYZV.js} +1 -1
- package/dist/client/assets/{use-id-selection-aBsPLNQg.js → use-id-selection-YID_YzI_.js} +1 -1
- package/dist/client/assets/{use-in-settings-DTiMI92T.js → use-in-settings-BEbaMise.js} +1 -1
- package/dist/client/assets/{use-inbox-feed-ykY7SYoP.js → use-inbox-feed-DB2CtrvR.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-C-Jtx_R8.js → use-infinite-scroll-B49BW4bH.js} +1 -1
- package/dist/client/assets/{use-join-requests-DA8sBvoB.js → use-join-requests-7sKC-hWK.js} +1 -1
- package/dist/client/assets/{use-main-panel-tabs-DQP_KfHN.js → use-main-panel-tabs-CKmMTIf_.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-CgYIT7O6.js → use-mcp-auth-status-BuZ66FeQ.js} +1 -1
- package/dist/client/assets/{use-mcp-client--6E0VdQ1.js → use-mcp-client-B64wHnuV.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-DZL7WNWx.js → use-mcp-prompts-C23e7-j9.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-DGaS62Fn.js → use-mcp-tools-Dvg1HkLl.js} +1 -1
- package/dist/client/assets/{use-mobile-C2Wa6qqh.js → use-mobile-UENbdBUz.js} +1 -1
- package/dist/client/assets/{use-move-blocks-Bg0QqQnT.js → use-move-blocks-DlRJEeor.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-Blb_gT0Z.js → use-navigate-to-agent-CSVf4amv.js} +1 -1
- package/dist/client/assets/{use-never-published-wykmkClz.js → use-never-published-DzAvx8nn.js} +1 -1
- package/dist/client/assets/{use-org-fs-elhmqDGC.js → use-org-fs-BvX9HCNX.js} +1 -1
- package/dist/client/assets/{use-org-notice-BmGI5AoV.js → use-org-notice-CX9RQL9x.js} +1 -1
- package/dist/client/assets/{use-org-repo-syncs-Bqe0mTI4.js → use-org-repo-syncs-Dx0-27sI.js} +1 -1
- package/dist/client/assets/{use-org-sso-D0oSmb0Y.js → use-org-sso-DCPh9AmN.js} +1 -1
- package/dist/client/assets/{use-organization-settings-D19qndSA.js → use-organization-settings-Bqv7vsKx.js} +1 -1
- package/dist/client/assets/{use-panel-navigate-BUxvnLXh.js → use-panel-navigate-BxbJ8ZAZ.js} +1 -1
- package/dist/client/assets/{use-project-native-view-presence-D6vX4rCD.js → use-project-native-view-presence-D5woEtTG.js} +1 -1
- package/dist/client/assets/{use-project-scope-BW5vvzIR.js → use-project-scope-BUOLpI6_.js} +1 -1
- package/dist/client/assets/{use-recent-apps-qt6-6ySx.js → use-recent-apps-Dlz8hl9S.js} +1 -1
- package/dist/client/assets/{use-reports-diagnostic-yo9M4TG9.js → use-reports-diagnostic-CzptLM8W.js} +1 -1
- package/dist/client/assets/{use-sandbox-events-xbG28nOp.js → use-sandbox-events-CNefffyh.js} +1 -1
- package/dist/client/assets/{use-secrets-D1HWpuW_.js → use-secrets-CM2rBe1P.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-DXkAoW7H.js → use-section-preview-base-8d_iVlol.js} +1 -1
- package/dist/client/assets/{use-sidebar-collapsed-L0ea2Q3b.js → use-sidebar-collapsed-CBdcfBq2.js} +1 -1
- package/dist/client/assets/{use-tags-B46ACyo8.js → use-tags-C1iDbyRX.js} +1 -1
- package/dist/client/assets/{use-task-board-analytics-Q8JP9hY1.js → use-task-board-analytics-BYDsZg64.js} +1 -1
- package/dist/client/assets/{use-task-board-item-prs-DD-h7mMH.js → use-task-board-item-prs-BYZFu1Z-.js} +1 -1
- package/dist/client/assets/{use-task-board-items-DJs5p39s.js → use-task-board-items-BF60SnNN.js} +1 -1
- package/dist/client/assets/{use-task-board-prompts-DhN9b-Ei.js → use-task-board-prompts-BxJJDuKd.js} +1 -1
- package/dist/client/assets/{use-task-metadata-wSSRfe9l.js → use-task-metadata--lsabEC6.js} +1 -1
- package/dist/client/assets/{use-thread-outputs-BXUBmrcQ.js → use-thread-outputs-BmkTnzaJ.js} +1 -1
- package/dist/client/assets/{use-view-draft-kind-Dog_0xGP.js → use-view-draft-kind-B8piuikE.js} +1 -1
- package/dist/client/assets/{use-voice-input-Cml6WhPe.js → use-voice-input-DU1R1jSr.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-C5QtpK6u.js +1 -0
- package/dist/client/assets/{useQueries-BuIHgxFS.js → useQueries-Cz_Jqaen.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-B3VojzV_.js +1 -0
- package/dist/client/assets/{users-BBlUm9BI.js → users-CyC8gi8K.js} +1 -1
- package/dist/client/assets/{utils-ZT3Tr9FQ.js → utils-DbRgnGD0.js} +1 -1
- package/dist/client/assets/{variant-calendar-BJi5SDmS.js → variant-calendar-CjXn36hn.js} +1 -1
- package/dist/client/assets/{variant-matcher-override-DPAlBy59.js → variant-matcher-override-Bn-Yrew9.js} +1 -1
- package/dist/client/assets/{view-header-D_AYsQS1.js → view-header-BKQqoxa1.js} +1 -1
- package/dist/client/assets/{virtual-mcp-C1YM4Fvh.js → virtual-mcp-DoeeFvfY.js} +1 -1
- package/dist/client/assets/{watch-sse-pool-C3KG4d2d.js → watch-sse-pool-DV_D2Q4a.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/server.js +1 -1
- package/package.json +1 -1
- package/dist/client/assets/agent-app-Rg0Tr0ya.js +0 -1
- package/dist/client/assets/agent-deck-DaxKom9K.js +0 -1
- package/dist/client/assets/agent-experiments-gALcE-F4.js +0 -1
- package/dist/client/assets/agent-file-DY1lwsgY.js +0 -1
- package/dist/client/assets/agent-library-CPa8urhx.js +0 -1
- package/dist/client/assets/agent-library-file-CnGwYE2k.js +0 -1
- package/dist/client/assets/agent-overview-el3kyIBv.js +0 -1
- package/dist/client/assets/agent-settings-CQn5vagF.js +0 -1
- package/dist/client/assets/agent-site-editor-code-DT9ycvyN.js +0 -2
- package/dist/client/assets/agent-site-editor-content-BDuFxBcC.js +0 -1
- package/dist/client/assets/agent-site-editor-preview-IKIhLz0T.js +0 -1
- package/dist/client/assets/agent-view-BhxK3cU9.js +0 -1
- package/dist/client/assets/api-keys-Cv0oZpoT.js +0 -1
- package/dist/client/assets/library-CB2VVs8O.js +0 -1
- package/dist/client/assets/monitoring-N4CPm7XC.js +0 -2
- package/dist/client/assets/project-reports-DiUu1Qc1.js +0 -1
- package/dist/client/assets/project-tasks-CAdmZlMS.js +0 -1
- package/dist/client/assets/record-editor-p_d7oWmO.js +0 -1
- package/dist/client/assets/reports-BEgGXtxt.js +0 -1
- package/dist/client/assets/repositories-BRHtIrVz.js +0 -1
- package/dist/client/assets/route-CmbvxWwg.js +0 -1
- package/dist/client/assets/settings-tab-XKL-PXfE.js +0 -1
- package/dist/client/assets/site-editor-BCUDTULP.js +0 -1
- package/dist/client/assets/tasks-CcgLlawT.js +0 -1
- package/dist/client/assets/use-ask-in-chat-DMYy6FC9.js +0 -1
- package/dist/client/assets/use-blocks-v8-project-CSboyg4V.js +0 -1
- package/dist/client/assets/use-blog-view-7SxY0DSD.js +0 -1
- package/dist/client/assets/useInfiniteQuery-D0bLDkrM.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-DUNAnJxH.js +0 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/openai-conversation-
|
|
2
|
-
import{fl as Ee,c as D,b as Q,r as R,m as z,j as n,b5 as Ze,aH as oe,bx as Tt,aI as te,cq as Re,B as W,aG as xs,aF as vs,dA as bs,cp as As,J as ke,e8 as ys,ge as we,gf as Vt,cH as js,am as ws,e as ks,I as Cs,t as Ie,E as X,a6 as Te,d as Xe,aY as _t,x as Ss,aU as Ns,w as Is,v as Ts,D as _s,eu as Ds,a7 as Ms,K as Ps,i as Es,_ as Rs,X as Us,Z as Fs,Y as be,ar as ct,ap as dt,aq as ut,h as Ls,bw as Os,bv as zs,aE as Bs,au as $s,dz as Ks,dE as Ae,bk as qs,dG as Qs,b8 as pt,gg as Ws,a as Ys,at as Gs,av as Hs,aW as Ye,eN as Js,o as Zs,cv as Xs,cw as en,b1 as tn,ah as Dt}from"./index-_v_cX_Uz.js";import{i as Mt,k as sn,j as nn,o as Pt,P as on,p as an,S as rn}from"./usage-stats-BeZTZSlb.js";import{A as ln,H as Vn,Y as Et,aB as Ge,g as cn,e as dn,aG as un,a5 as Rt,aH as Ut,aE as pn,K as hn,aI as fn}from"./agent-icon-1xBXRQD0.js";import{s as Ft}from"./XClose-BKbw2IM5.js";import{I as mn}from"./icon-button-B1n86T_T.js";import{F as gn}from"./file-type-icon-DHed-Vbt.js";import{u as xn}from"./use-current-view-CTU_KTOZ.js";import{b as Ue,I as vn,J as bn,c as et,d as tt,p as An,K as yn,M as jn,N as wn,u as Lt,f as kn,s as Cn,e as Sn}from"./chat-context-SiB3iaPb.js";import{b as Nn}from"./repository-binding-CaMbcDLV.js";import{A as In,w as Tn}from"./use-view-draft-kind-Dog_0xGP.js";import{n as _n,z as Dn,p as Mn,b as Pn,w as En,j as Rn}from"./thread-intent-AFleKGnm.js";import{r as ht,i as Un,c as Fn,w as Ln,H as On}from"./chat-draft-DZb5RXeg.js";import{u as zn,a as Bn,T as $n}from"./use-voice-input-Cml6WhPe.js";import{i as Ot}from"./ArrowRight-D62IR3mi.js";import{i as zt}from"./ArrowUp-DwmUsoz4.js";import{n as Bt}from"./BookOpen01-BtddYmqo.js";import{a as $t}from"./Image01-RSPET2Po.js";import{j as Kn}from"./UserSquare-2uLtK5zL.js";import{i as qn}from"./Upload01-BUC8UUt4.js";import{i as Qn}from"./AlertCircle-k-5O6cw_.js";import{a as He,b as st,d as nt,f as ot,F as Kt}from"./form-tdA5bJ97.js";import{c as Wn,S as Yn,b as Gn,a as Hn,d as Jn}from"./select-BAD2nCs0.js";import{t as $e,h as qt}from"./UserCheck01-BxAZblZb.js";import{t as Zn}from"./ChevronDown-CM9Urfsd.js";import{T as Qt,a as Wt,c as Yt}from"./tooltip-2yYSYsa-.js";import{i as Xn}from"./ArrowLeft-ClkcoIX4.js";import{c as eo,b as to}from"./tabs-ByjyyO35.js";import{d as Ke,f as so}from"./use-entitlements-C0Jnglmb.js";import{u as no}from"./use-deco-credits-BlcIIio7.js";import{a as ft,T as oo}from"./toggle-group-B5NhEkmw.js";import{s as ao,d as io,g as mt,a as ro}from"./gateway-client-MCgSJtiT.js";import{t as lo}from"./utils-CVEq3hMx.js";import{m as at,g as Vo,b as co}from"./index-zfbeX5vo.js";import{p as Gt,u as uo,T as po,a as ho,U as fo}from"./input-rwnUX4xK.js";import{a as mo}from"./use-mcp-client--6E0VdQ1.js";import{l as go,g as xo}from"./use-mcp-prompts-DZL7WNWx.js";import{s as gt}from"./Plus-DA5fCRCT.js";import"./suggestion-CX1YVdIt.js";import{p as vo,q as bo}from"./question-004-sINsf4GQ.js";import{F as xt}from"./feature-paywall-QNpgcQyq.js";import{A as Ao}from"./add-connection-dialog-BgsYTqB2.js";import{a as yo}from"./use-organization-settings-D19qndSA.js";import{b as jo}from"./use-task-board-items-DJs5p39s.js";import{u as wo}from"./use-mobile-C2Wa6qqh.js";import{r as ko}from"./use-chat-layout-state-BjrxY9zk.js";const Co=Ee("Headphones",[["path",{d:"M3 14h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-7a9 9 0 0 1 18 0v7a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3",key:"1xhozi"}]]);const So=Ee("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);const No=Ee("MicOff",[["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}],["path",{d:"M18.89 13.23A7.12 7.12 0 0 0 19 12v-2",key:"80xlxr"}],["path",{d:"M5 10v2a7 7 0 0 0 12 5",key:"p2k8kg"}],["path",{d:"M15 9.34V5a3 3 0 0 0-5.68-1.33",key:"1gzdoj"}],["path",{d:"M9 9v3a3 3 0 0 0 5.12 2.12",key:"r2i35w"}],["line",{x1:"12",x2:"12",y1:"19",y2:"22",key:"x3vr5v"}]]);const Io=Ee("Mic",[["path",{d:"M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z",key:"131961"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["line",{x1:"12",x2:"12",y1:"19",y2:"22",key:"x3vr5v"}]]);const To=Ee("Square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]),Qe="cubic-bezier(0.645, 0.045, 0.355, 1)",dr=44,_o={default:"",error:"isolate after:content-[''] after:absolute after:inset-0 after:rounded-xl after:bg-destructive/5 after:pointer-events-none after:-z-10",warning:"isolate after:content-[''] after:absolute after:inset-0 after:rounded-xl after:bg-warning/5 after:pointer-events-none after:-z-10"},Do={default:"border-border",error:"border-destructive/30",warning:"border-warning/30"},Mo={default:"text-muted-foreground",error:"text-destructive",warning:"text-warning"};function xe(t){const e=D.c(69),{icon:s,label:o,count:a,title:i,footerLeft:r,footerRight:l,children:V,defaultExpanded:d,variant:u,onClose:c}=t,p=u===void 0?"default":u,h=Q(),[f,m]=R.useState(d),[x,v]=R.useState(!1);let g;e[0]!==c?(g=()=>{v(!0),c?.()},e[0]=c,e[1]=g):g=e[1];const b=g;if(x)return null;const y=Do[p],A=_o[p];let w;e[2]!==y||e[3]!==A?(w=z("relative flex flex-col rounded-xl bg-background border shadow-soft","w-[calc(100%-16px)] max-w-[640px] mx-auto mb-2",y,A),e[2]=y,e[3]=A,e[4]=w):w=e[4];let j;e[5]===Symbol.for("react.memo_cache_sentinel")?(j=()=>m(Po),e[5]=j):j=e[5];const k=f&&"rounded-b-none",C=!f&&"rounded-b-xl";let _;e[6]!==k||e[7]!==C?(_=z("flex items-center gap-2 w-full px-3 py-2 text-sm text-left","hover:bg-accent transition-colors rounded-t-xl",k,C),e[6]=k,e[7]=C,e[8]=_):_=e[8];const N=Mo[p];let T;e[9]!==N?(T=z("shrink-0",N),e[9]=N,e[10]=T):T=e[10];let I;e[11]!==s||e[12]!==T?(I=n.jsx("span",{className:T,children:s}),e[11]=s,e[12]=T,e[13]=I):I=e[13];let E;e[14]!==o?(E=n.jsx("span",{className:"flex-1 min-w-0 truncate",children:o}),e[14]=o,e[15]=E):E=e[15];let F;e[16]!==a?(F=a?n.jsx("span",{className:"text-xs text-muted-foreground shrink-0",children:a}):null,e[16]=a,e[17]=F):F=e[17];const O=f?"rotate(180deg)":"rotate(0deg)";let M;e[18]!==O?(M=n.jsx("span",{"aria-hidden":"true",className:"text-muted-foreground shrink-0 flex items-center justify-center",children:n.jsx(Zn,{size:16,style:{transform:O,transition:`transform 180ms ${Qe}`}})}),e[18]=O,e[19]=M):M=e[19];let K;e[20]!==h?(K=h("chat.collapsibleHighlight.closeLabel"),e[20]=h,e[21]=K):K=e[21];let q;e[22]!==h?(q=h("chat.collapsibleHighlight.closeTitle"),e[22]=h,e[23]=q):q=e[23];let Z,U;e[24]!==b?(Z=Ve=>{Ve.stopPropagation(),b()},U=Ve=>{(Ve.key==="Enter"||Ve.key===" ")&&(Ve.preventDefault(),Ve.stopPropagation(),b())},e[24]=b,e[25]=Z,e[26]=U):(Z=e[25],U=e[26]);let Y;e[27]===Symbol.for("react.memo_cache_sentinel")?(Y=n.jsx(Ze,{size:16}),e[27]=Y):Y=e[27];let P;e[28]!==K||e[29]!==q||e[30]!==Z||e[31]!==U?(P=n.jsx("span",{role:"button",tabIndex:0,"data-testid":"collapsible-highlight-close","aria-label":K,title:q,onClick:Z,onKeyDown:U,className:"text-muted-foreground hover:text-foreground transition-colors shrink-0 flex items-center justify-center -mr-1 ml-1 p-1 rounded-md hover:bg-accent",children:Y}),e[28]=K,e[29]=q,e[30]=Z,e[31]=U,e[32]=P):P=e[32];let G;e[33]!==f||e[34]!==I||e[35]!==E||e[36]!==F||e[37]!==M||e[38]!==P||e[39]!==_?(G=n.jsxs("button",{type:"button","data-testid":"collapsible-highlight-chip","aria-expanded":f,onClick:j,className:_,children:[I,E,F,M,P]}),e[33]=f,e[34]=I,e[35]=E,e[36]=F,e[37]=M,e[38]=P,e[39]=_,e[40]=G):G=e[40];const ne=f?"1fr":"0fr";let H;e[41]!==ne?(H={display:"grid",gridTemplateRows:ne,transition:`grid-template-rows 180ms ${Qe}`},e[41]=ne,e[42]=H):H=e[42];let re;e[43]===Symbol.for("react.memo_cache_sentinel")?(re={overflow:"hidden",minHeight:0},e[43]=re):re=e[43];const S=f?1:0;let L;e[44]!==S?(L={opacity:S,transition:`opacity 120ms ${Qe}`,maxHeight:"60vh"},e[44]=S,e[45]=L):L=e[45];let J;e[46]!==i?(J=i?n.jsx("div",{className:"flex items-start gap-2 px-4 pt-4 pb-5 border-t border-dashed border-border/60",children:n.jsx("p",{className:"flex-1 text-base font-medium text-foreground min-w-0",children:i})}):n.jsx("div",{className:"border-t border-dashed border-border/60"}),e[46]=i,e[47]=J):J=e[47];let $;e[48]!==V||e[49]!==i?($=V?n.jsx("div",{className:z("pb-4",!i&&"pt-4"),children:V}):null,e[48]=V,e[49]=i,e[50]=$):$=e[50];let ee;e[51]!==J||e[52]!==$?(ee=n.jsxs("div",{className:"flex-1 min-h-0 overflow-y-auto",children:[J,$]}),e[51]=J,e[52]=$,e[53]=ee):ee=e[53];let ie;e[54]!==r||e[55]!==l?(ie=r||l?n.jsx("div",{className:"shrink-0 border-t border-border px-3 py-3 pb-6",children:n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("div",{children:r}),n.jsx("div",{className:"flex items-center gap-2",children:l})]})}):null,e[54]=r,e[55]=l,e[56]=ie):ie=e[56];let ce;e[57]!==L||e[58]!==ee||e[59]!==ie?(ce=n.jsx("div",{style:re,children:n.jsxs("div",{className:"flex flex-col",style:L,children:[ee,ie]})}),e[57]=L,e[58]=ee,e[59]=ie,e[60]=ce):ce=e[60];let ae;e[61]!==H||e[62]!==ce?(ae=n.jsx("div",{"data-testid":"collapsible-highlight-body",style:H,children:ce}),e[61]=H,e[62]=ce,e[63]=ae):ae=e[63];let pe;return e[64]!==G||e[65]!==ae||e[66]!==w||e[67]!==p?(pe=n.jsxs("div",{"data-testid":"collapsible-highlight","data-variant":p,className:w,children:[G,ae]}),e[64]=G,e[65]=ae,e[66]=w,e[67]=p,e[68]=pe):pe=e[68],pe}function Po(t){return!t}const Eo=oe({content:te().min(1).describe("Imperative form, e.g. 'Implement the login flow'"),status:Re(["pending","in_progress","completed"]),activeForm:te().min(1).describe("Present-continuous form shown in the UI while the todo is in progress, e.g. 'Implementing the login flow'")}),Ht=oe({todos:Tt(Eo)}),Ro="Plan and track multi-step work. Call with the FULL todo list every time — this replaces the prior list. Call at the start of every multi-step request. Skip only for true one-shots (a single tool call or a direct answer). Mark exactly one todo `in_progress` at a time. Flip a todo to `in_progress` before starting it and to `completed` the moment it finishes — do not batch completions. Your prior tool-call inputs are your current state — read your last call to see where you are.";_n({description:Ro,inputSchema:Dn(Ht),execute:async({todos:t})=>({ok:!0,count:t.length})});const Uo="tool-todo_write",Fo=new Set(["input-available","output-available"]);function Lo(t){for(let e=t.length-1;e>=0;e--){const s=t[e];if(s.role!=="assistant")continue;const o=s.parts;if(Array.isArray(o))for(let a=o.length-1;a>=0;a--){const i=o[a];if(i.type!==Uo||typeof i.state!="string"||!Fo.has(i.state))continue;const r=Ht.safeParse(i.input);if(r.success)return r.data.todos}}return[]}function Jt(t){const e=[];for(const s of t)if("state"in s&&s.state==="approval-requested"&&"approval"in s&&s.approval?.id&&"toolCallId"in s&&s.toolCallId){const o="toolName"in s&&typeof s.toolName=="string"?s.toolName:s.type.startsWith("tool-")?s.type.replace("tool-",""):"Tool";e.push({approvalId:s.approval.id,toolCallId:s.toolCallId,toolName:o,friendlyName:lo(ao(o)),input:s.input})}return e}function Zt(t){return t.at(-1)}function Xt(t){const e=[];for(const s of t)s.type==="tool-propose_plan"&&s.state==="input-available"&&e.push({toolCallId:s.toolCallId,plan:s.input.plan,state:s.state});return e}function Oo(t){return t?t.message.startsWith("[CREDITS]"):!1}const zo={isCreditExhausted:!1,planRefusal:null,hasTodos:!1,showError:!1,showWarning:!1,hasApprovals:!1,hasPlans:!1,isWaitingForUserInput:!1,hasTaskSuggestion:!1,todos:[]};function Bo(t){const{messages:e,error:s,finishReason:o,isStreaming:a,isWaitingForApprovals:i}=t;if(!a&&s&&Oo(s))return{...zo,isCreditExhausted:!0};const r=e.at(-1),l=r?.role==="assistant"?r.parts:[],V=l,u=!!V.filter(A=>A.type==="tool-user_ask").filter(A=>A.state!=="output-available").length,c=V.some(Mt),p=Xt(l),h=Jt(V),f=Lo(e),m=a?null:Mn(s),x=!a&&!!s&&!m,v=h.length>0||a&&i,g=p.length>0,y=!a&&!!o&&o!=="stop"&&!(o==="tool-calls"&&(u||v||g||c))&&!x;return{isCreditExhausted:!1,planRefusal:m,hasTodos:f.length>0,showError:x,showWarning:y,hasApprovals:v,hasPlans:g,isWaitingForUserInput:u,hasTaskSuggestion:c,todos:f}}function es(){const t=D.c(6),{messages:e,error:s,finishReason:o,isStreaming:a,isWaitingForApprovals:i}=Ue(),r=s??null,l=o??null;let V;return t[0]!==a||t[1]!==i||t[2]!==e||t[3]!==r||t[4]!==l?(V=Bo({messages:e,error:r,finishReason:l,isStreaming:a,isWaitingForApprovals:i}),t[0]=a,t[1]=i,t[2]=e,t[3]=r,t[4]=l,t[5]=V):V=t[5],V}function ur(){const t=es(),e=Ke("credits");return t.isCreditExhausted?e?0:1:Number(t.hasTodos)+Number(t.showError)+ +!!t.planRefusal+Number(t.showWarning)+Number(t.hasApprovals)+Number(t.hasPlans)+Number(t.isWaitingForUserInput)+Number(t.hasTaskSuggestion)}const vt="start-task",$o=`Turn the report below into a running task. The user pressed "Start task", which authorizes delegation.
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/openai-conversation-DA7CTgnA.js","assets/index-CM7QLcHH.js","assets/index-C7mH2s-5.css","assets/usage-stats-B9lqQ6Vi.js","assets/utils-CVEq3hMx.js","assets/markdown-Dh0wHZhv.js","assets/use-copy-pqQjGIBG.js","assets/agent-icon-BsqGoLFA.js","assets/AlertCircle-iHYLI3wA.js","assets/UserCheck01-UUUmyjQl.js","assets/Tool01-CAPkmPtU.js","assets/ArrowUp-CLrfDSfr.js","assets/ArrowLeft-Crx5FZ7V.js","assets/ArrowRight-ipUtveZC.js","assets/BookOpen01-C_4qgS91.js","assets/Globe04-CMPPLcPg.js","assets/CheckCircle-Bcn1SkPC.js","assets/TrendUp01-C3pm_0WN.js","assets/ChevronDown-BEVTcfYy.js","assets/ChevronSelectorVertical-DxrQPHmH.js","assets/ChevronUp-BEJWDky5.js","assets/UserSquare-C9Yfn3z-.js","assets/LinkBroken01-DOKZ024q.js","assets/CreditCard01-DQXQKw2A.js","assets/File02-foS0DPWb.js","assets/MessageCircle01-BFCg8Yla.js","assets/SwitchHorizontal01-fo0U4Jp1.js","assets/Eye-8uguzols.js","assets/Fingerprint04-DJD9RxrF.js","assets/Image01-5QAQlONA.js","assets/Key01-o1uKXv-x.js","assets/LayoutLeft-BejjIkGZ.js","assets/Minus-CVLCskxk.js","assets/Monitor01-D_volcqW.js","assets/Sun-D-iFjrkT.js","assets/Play-ClJ-fqo6.js","assets/Plus-DPgqzlX_.js","assets/SearchMd-0hSvyNNc.js","assets/ShoppingBag01-Dzd7DSPA.js","assets/Trash01-BJozO1DS.js","assets/Upload01-DSwYubv_.js","assets/Users01-D4LsevsD.js","assets/XClose-2FBIsrt9.js","assets/Zap-CDm_Ehxw.js","assets/chat-context-j3hnPPib.js","assets/use-panel-navigate-BxbJ8ZAZ.js","assets/thread-route-vX4Lb76a.js","assets/use-project-scope-BUOLpI6_.js","assets/repository-binding-DGBKNnnx.js","assets/use-mcp-client-B64wHnuV.js","assets/auth-D7fJVlZI.js","assets/use-view-draft-kind-B8piuikE.js","assets/use-blog-view-B86NPWtX.js","assets/use-organization-settings-Bqv7vsKx.js","assets/schema-Ce-FrpNr.js","assets/task-board-GaVTCBBV.js","assets/thread-intent-CXxEw9VY.js","assets/delay-CnY5UFtP.js","assets/backoff-CrEUbyZT.js","assets/watch-sse-pool-DV_D2Q4a.js","assets/session-runtime-DxWcwkbE.js","assets/use-entitlements-DDuw6b8L.js","assets/use-ai-providers-BG51IkbK.js","assets/use-current-view-vcCNv8DD.js","assets/use-in-settings-BEbaMise.js","assets/use-decopilot-events-CMQAe_lU.js","assets/use-mobile-UENbdBUz.js","assets/tooltip-BQEYSfJS.js","assets/index-VhglRpxf.js","assets/gateway-client-Cv5mFjk5.js","assets/form-Dol0DPDh.js","assets/label-C3UnAGG4.js","assets/icon-button-CdifSdSj.js","assets/file-type-icon-DTjItFVz.js","assets/chat-draft-C0rM_rqB.js","assets/use-voice-input-DU1R1jSr.js","assets/popover-DmtZGzFU.js","assets/drawer-CEhULiRL.js","assets/index-BybXw0ff.js","assets/checkbox-Cdx0XKK4.js","assets/select-CaopsMfN.js","assets/index-BdQq_4o_.js","assets/ai-providers-logos-DD3qZ33J.js","assets/openai-compatible-presets-BKGfVqEx.js","assets/tabs-BsgKQ4s5.js","assets/active-indicator-CCMhAsc_.js","assets/use-deco-credits-DxqKl3TU.js","assets/toggle-group-CnZM62uw.js","assets/input-DiaViL4j.js","assets/suggestion-CCkp3p2A.js","assets/use-mcp-prompts-C23e7-j9.js","assets/use-org-fs-BvX9HCNX.js","assets/useInfiniteQuery-C5QtpK6u.js","assets/infiniteQueryObserver-DvCgvYkY.js","assets/question-004-sINsf4GQ.js","assets/feature-paywall-DleoKpSm.js","assets/plan-ladder-Cq8l_zYq.js","assets/add-connection-dialog-BXLnkEQI.js","assets/collection-search-CcaFYOka.js","assets/extract-connection-data-DpbVANVQ.js","assets/metadata-D72DunRR.js","assets/connection-nHJUyklo.js","assets/url-slug-DjA6hXx8.js","assets/connection-card-CJUEGGqR.js","assets/connection-slug-DUcOK0Fv.js","assets/integration-icon-DiYH80o3.js","assets/textarea-ZVs6QWMS.js","assets/use-connection-zSjqu4n6.js","assets/schema-DcgkXC70.js","assets/connection-form-helpers-Ccz7aVvg.js","assets/authenticate-and-persist-oauth-CagzPMUa.js","assets/mcp-oauth-daaKdPIW.js","assets/mcp-oauth-ClKqUQpf.js","assets/collection-tabs-BwesRoId.js","assets/badge-6S4VrRSd.js","assets/use-infinite-scroll-B49BW4bH.js","assets/useSuspenseInfiniteQuery-B3VojzV_.js","assets/use-task-board-items-BF60SnNN.js","assets/use-chat-layout-state-C-ACjcBl.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{fl as Ee,c as D,b as Q,r as R,m as z,j as n,b5 as Ze,aH as oe,bx as Tt,aI as te,cq as Re,B as W,aG as xs,aF as vs,dA as bs,cp as As,J as ke,e8 as ys,ge as we,gf as Vt,cH as js,am as ws,e as ks,I as Cs,t as Ie,E as X,a6 as Te,d as Xe,aY as _t,x as Ss,aU as Ns,w as Is,v as Ts,D as _s,eu as Ds,a7 as Ms,K as Ps,i as Es,_ as Rs,X as Us,Z as Fs,Y as be,ar as ct,ap as dt,aq as ut,h as Ls,bw as Os,bv as zs,aE as Bs,au as $s,dz as Ks,dE as Ae,bk as qs,dG as Qs,b8 as pt,gg as Ws,a as Ys,at as Gs,av as Hs,aW as Ye,eN as Js,o as Zs,cv as Xs,cw as en,b1 as tn,ah as Dt}from"./index-CM7QLcHH.js";import{i as Mt,k as sn,j as nn,o as Pt,P as on,p as an,S as rn}from"./usage-stats-B9lqQ6Vi.js";import{A as ln,H as Vn,Y as Et,aB as Ge,g as cn,e as dn,aG as un,a5 as Rt,aH as Ut,aE as pn,K as hn,aI as fn}from"./agent-icon-BsqGoLFA.js";import{s as Ft}from"./XClose-2FBIsrt9.js";import{I as mn}from"./icon-button-CdifSdSj.js";import{F as gn}from"./file-type-icon-DTjItFVz.js";import{u as xn}from"./use-current-view-vcCNv8DD.js";import{b as Ue,I as vn,J as bn,c as et,d as tt,p as An,K as yn,M as jn,N as wn,u as Lt,f as kn,s as Cn,e as Sn}from"./chat-context-j3hnPPib.js";import{b as Nn}from"./repository-binding-DGBKNnnx.js";import{A as In,w as Tn}from"./use-view-draft-kind-B8piuikE.js";import{n as _n,z as Dn,p as Mn,b as Pn,w as En,j as Rn}from"./thread-intent-CXxEw9VY.js";import{r as ht,i as Un,c as Fn,w as Ln,H as On}from"./chat-draft-C0rM_rqB.js";import{u as zn,a as Bn,T as $n}from"./use-voice-input-DU1R1jSr.js";import{i as Ot}from"./ArrowRight-ipUtveZC.js";import{i as zt}from"./ArrowUp-CLrfDSfr.js";import{n as Bt}from"./BookOpen01-C_4qgS91.js";import{a as $t}from"./Image01-5QAQlONA.js";import{j as Kn}from"./UserSquare-C9Yfn3z-.js";import{i as qn}from"./Upload01-DSwYubv_.js";import{i as Qn}from"./AlertCircle-iHYLI3wA.js";import{a as He,b as st,d as nt,f as ot,F as Kt}from"./form-Dol0DPDh.js";import{c as Wn,S as Yn,b as Gn,a as Hn,d as Jn}from"./select-CaopsMfN.js";import{t as $e,h as qt}from"./UserCheck01-UUUmyjQl.js";import{t as Zn}from"./ChevronDown-BEVTcfYy.js";import{T as Qt,a as Wt,c as Yt}from"./tooltip-BQEYSfJS.js";import{i as Xn}from"./ArrowLeft-Crx5FZ7V.js";import{c as eo,b as to}from"./tabs-BsgKQ4s5.js";import{d as Ke,f as so}from"./use-entitlements-DDuw6b8L.js";import{u as no}from"./use-deco-credits-DxqKl3TU.js";import{a as ft,T as oo}from"./toggle-group-CnZM62uw.js";import{s as ao,d as io,g as mt,a as ro}from"./gateway-client-Cv5mFjk5.js";import{t as lo}from"./utils-CVEq3hMx.js";import{m as at,g as Vo,b as co}from"./index-BybXw0ff.js";import{p as Gt,u as uo,T as po,a as ho,U as fo}from"./input-DiaViL4j.js";import{a as mo}from"./use-mcp-client-B64wHnuV.js";import{l as go,g as xo}from"./use-mcp-prompts-C23e7-j9.js";import{s as gt}from"./Plus-DPgqzlX_.js";import"./suggestion-CCkp3p2A.js";import{p as vo,q as bo}from"./question-004-sINsf4GQ.js";import{F as xt}from"./feature-paywall-DleoKpSm.js";import{A as Ao}from"./add-connection-dialog-BXLnkEQI.js";import{a as yo}from"./use-organization-settings-Bqv7vsKx.js";import{b as jo}from"./use-task-board-items-BF60SnNN.js";import{u as wo}from"./use-mobile-UENbdBUz.js";import{r as ko}from"./use-chat-layout-state-C-ACjcBl.js";const Co=Ee("Headphones",[["path",{d:"M3 14h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-7a9 9 0 0 1 18 0v7a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3",key:"1xhozi"}]]);const So=Ee("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);const No=Ee("MicOff",[["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}],["path",{d:"M18.89 13.23A7.12 7.12 0 0 0 19 12v-2",key:"80xlxr"}],["path",{d:"M5 10v2a7 7 0 0 0 12 5",key:"p2k8kg"}],["path",{d:"M15 9.34V5a3 3 0 0 0-5.68-1.33",key:"1gzdoj"}],["path",{d:"M9 9v3a3 3 0 0 0 5.12 2.12",key:"r2i35w"}],["line",{x1:"12",x2:"12",y1:"19",y2:"22",key:"x3vr5v"}]]);const Io=Ee("Mic",[["path",{d:"M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z",key:"131961"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["line",{x1:"12",x2:"12",y1:"19",y2:"22",key:"x3vr5v"}]]);const To=Ee("Square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]),Qe="cubic-bezier(0.645, 0.045, 0.355, 1)",dr=44,_o={default:"",error:"isolate after:content-[''] after:absolute after:inset-0 after:rounded-xl after:bg-destructive/5 after:pointer-events-none after:-z-10",warning:"isolate after:content-[''] after:absolute after:inset-0 after:rounded-xl after:bg-warning/5 after:pointer-events-none after:-z-10"},Do={default:"border-border",error:"border-destructive/30",warning:"border-warning/30"},Mo={default:"text-muted-foreground",error:"text-destructive",warning:"text-warning"};function xe(t){const e=D.c(69),{icon:s,label:o,count:a,title:i,footerLeft:r,footerRight:l,children:V,defaultExpanded:d,variant:u,onClose:c}=t,p=u===void 0?"default":u,h=Q(),[f,m]=R.useState(d),[x,v]=R.useState(!1);let g;e[0]!==c?(g=()=>{v(!0),c?.()},e[0]=c,e[1]=g):g=e[1];const b=g;if(x)return null;const y=Do[p],A=_o[p];let w;e[2]!==y||e[3]!==A?(w=z("relative flex flex-col rounded-xl bg-background border shadow-soft","w-[calc(100%-16px)] max-w-[640px] mx-auto mb-2",y,A),e[2]=y,e[3]=A,e[4]=w):w=e[4];let j;e[5]===Symbol.for("react.memo_cache_sentinel")?(j=()=>m(Po),e[5]=j):j=e[5];const k=f&&"rounded-b-none",C=!f&&"rounded-b-xl";let _;e[6]!==k||e[7]!==C?(_=z("flex items-center gap-2 w-full px-3 py-2 text-sm text-left","hover:bg-accent transition-colors rounded-t-xl",k,C),e[6]=k,e[7]=C,e[8]=_):_=e[8];const N=Mo[p];let T;e[9]!==N?(T=z("shrink-0",N),e[9]=N,e[10]=T):T=e[10];let I;e[11]!==s||e[12]!==T?(I=n.jsx("span",{className:T,children:s}),e[11]=s,e[12]=T,e[13]=I):I=e[13];let E;e[14]!==o?(E=n.jsx("span",{className:"flex-1 min-w-0 truncate",children:o}),e[14]=o,e[15]=E):E=e[15];let F;e[16]!==a?(F=a?n.jsx("span",{className:"text-xs text-muted-foreground shrink-0",children:a}):null,e[16]=a,e[17]=F):F=e[17];const O=f?"rotate(180deg)":"rotate(0deg)";let M;e[18]!==O?(M=n.jsx("span",{"aria-hidden":"true",className:"text-muted-foreground shrink-0 flex items-center justify-center",children:n.jsx(Zn,{size:16,style:{transform:O,transition:`transform 180ms ${Qe}`}})}),e[18]=O,e[19]=M):M=e[19];let K;e[20]!==h?(K=h("chat.collapsibleHighlight.closeLabel"),e[20]=h,e[21]=K):K=e[21];let q;e[22]!==h?(q=h("chat.collapsibleHighlight.closeTitle"),e[22]=h,e[23]=q):q=e[23];let Z,U;e[24]!==b?(Z=Ve=>{Ve.stopPropagation(),b()},U=Ve=>{(Ve.key==="Enter"||Ve.key===" ")&&(Ve.preventDefault(),Ve.stopPropagation(),b())},e[24]=b,e[25]=Z,e[26]=U):(Z=e[25],U=e[26]);let Y;e[27]===Symbol.for("react.memo_cache_sentinel")?(Y=n.jsx(Ze,{size:16}),e[27]=Y):Y=e[27];let P;e[28]!==K||e[29]!==q||e[30]!==Z||e[31]!==U?(P=n.jsx("span",{role:"button",tabIndex:0,"data-testid":"collapsible-highlight-close","aria-label":K,title:q,onClick:Z,onKeyDown:U,className:"text-muted-foreground hover:text-foreground transition-colors shrink-0 flex items-center justify-center -mr-1 ml-1 p-1 rounded-md hover:bg-accent",children:Y}),e[28]=K,e[29]=q,e[30]=Z,e[31]=U,e[32]=P):P=e[32];let G;e[33]!==f||e[34]!==I||e[35]!==E||e[36]!==F||e[37]!==M||e[38]!==P||e[39]!==_?(G=n.jsxs("button",{type:"button","data-testid":"collapsible-highlight-chip","aria-expanded":f,onClick:j,className:_,children:[I,E,F,M,P]}),e[33]=f,e[34]=I,e[35]=E,e[36]=F,e[37]=M,e[38]=P,e[39]=_,e[40]=G):G=e[40];const ne=f?"1fr":"0fr";let H;e[41]!==ne?(H={display:"grid",gridTemplateRows:ne,transition:`grid-template-rows 180ms ${Qe}`},e[41]=ne,e[42]=H):H=e[42];let re;e[43]===Symbol.for("react.memo_cache_sentinel")?(re={overflow:"hidden",minHeight:0},e[43]=re):re=e[43];const S=f?1:0;let L;e[44]!==S?(L={opacity:S,transition:`opacity 120ms ${Qe}`,maxHeight:"60vh"},e[44]=S,e[45]=L):L=e[45];let J;e[46]!==i?(J=i?n.jsx("div",{className:"flex items-start gap-2 px-4 pt-4 pb-5 border-t border-dashed border-border/60",children:n.jsx("p",{className:"flex-1 text-base font-medium text-foreground min-w-0",children:i})}):n.jsx("div",{className:"border-t border-dashed border-border/60"}),e[46]=i,e[47]=J):J=e[47];let $;e[48]!==V||e[49]!==i?($=V?n.jsx("div",{className:z("pb-4",!i&&"pt-4"),children:V}):null,e[48]=V,e[49]=i,e[50]=$):$=e[50];let ee;e[51]!==J||e[52]!==$?(ee=n.jsxs("div",{className:"flex-1 min-h-0 overflow-y-auto",children:[J,$]}),e[51]=J,e[52]=$,e[53]=ee):ee=e[53];let ie;e[54]!==r||e[55]!==l?(ie=r||l?n.jsx("div",{className:"shrink-0 border-t border-border px-3 py-3 pb-6",children:n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("div",{children:r}),n.jsx("div",{className:"flex items-center gap-2",children:l})]})}):null,e[54]=r,e[55]=l,e[56]=ie):ie=e[56];let ce;e[57]!==L||e[58]!==ee||e[59]!==ie?(ce=n.jsx("div",{style:re,children:n.jsxs("div",{className:"flex flex-col",style:L,children:[ee,ie]})}),e[57]=L,e[58]=ee,e[59]=ie,e[60]=ce):ce=e[60];let ae;e[61]!==H||e[62]!==ce?(ae=n.jsx("div",{"data-testid":"collapsible-highlight-body",style:H,children:ce}),e[61]=H,e[62]=ce,e[63]=ae):ae=e[63];let pe;return e[64]!==G||e[65]!==ae||e[66]!==w||e[67]!==p?(pe=n.jsxs("div",{"data-testid":"collapsible-highlight","data-variant":p,className:w,children:[G,ae]}),e[64]=G,e[65]=ae,e[66]=w,e[67]=p,e[68]=pe):pe=e[68],pe}function Po(t){return!t}const Eo=oe({content:te().min(1).describe("Imperative form, e.g. 'Implement the login flow'"),status:Re(["pending","in_progress","completed"]),activeForm:te().min(1).describe("Present-continuous form shown in the UI while the todo is in progress, e.g. 'Implementing the login flow'")}),Ht=oe({todos:Tt(Eo)}),Ro="Plan and track multi-step work. Call with the FULL todo list every time — this replaces the prior list. Call at the start of every multi-step request. Skip only for true one-shots (a single tool call or a direct answer). Mark exactly one todo `in_progress` at a time. Flip a todo to `in_progress` before starting it and to `completed` the moment it finishes — do not batch completions. Your prior tool-call inputs are your current state — read your last call to see where you are.";_n({description:Ro,inputSchema:Dn(Ht),execute:async({todos:t})=>({ok:!0,count:t.length})});const Uo="tool-todo_write",Fo=new Set(["input-available","output-available"]);function Lo(t){for(let e=t.length-1;e>=0;e--){const s=t[e];if(s.role!=="assistant")continue;const o=s.parts;if(Array.isArray(o))for(let a=o.length-1;a>=0;a--){const i=o[a];if(i.type!==Uo||typeof i.state!="string"||!Fo.has(i.state))continue;const r=Ht.safeParse(i.input);if(r.success)return r.data.todos}}return[]}function Jt(t){const e=[];for(const s of t)if("state"in s&&s.state==="approval-requested"&&"approval"in s&&s.approval?.id&&"toolCallId"in s&&s.toolCallId){const o="toolName"in s&&typeof s.toolName=="string"?s.toolName:s.type.startsWith("tool-")?s.type.replace("tool-",""):"Tool";e.push({approvalId:s.approval.id,toolCallId:s.toolCallId,toolName:o,friendlyName:lo(ao(o)),input:s.input})}return e}function Zt(t){return t.at(-1)}function Xt(t){const e=[];for(const s of t)s.type==="tool-propose_plan"&&s.state==="input-available"&&e.push({toolCallId:s.toolCallId,plan:s.input.plan,state:s.state});return e}function Oo(t){return t?t.message.startsWith("[CREDITS]"):!1}const zo={isCreditExhausted:!1,planRefusal:null,hasTodos:!1,showError:!1,showWarning:!1,hasApprovals:!1,hasPlans:!1,isWaitingForUserInput:!1,hasTaskSuggestion:!1,todos:[]};function Bo(t){const{messages:e,error:s,finishReason:o,isStreaming:a,isWaitingForApprovals:i}=t;if(!a&&s&&Oo(s))return{...zo,isCreditExhausted:!0};const r=e.at(-1),l=r?.role==="assistant"?r.parts:[],V=l,u=!!V.filter(A=>A.type==="tool-user_ask").filter(A=>A.state!=="output-available").length,c=V.some(Mt),p=Xt(l),h=Jt(V),f=Lo(e),m=a?null:Mn(s),x=!a&&!!s&&!m,v=h.length>0||a&&i,g=p.length>0,y=!a&&!!o&&o!=="stop"&&!(o==="tool-calls"&&(u||v||g||c))&&!x;return{isCreditExhausted:!1,planRefusal:m,hasTodos:f.length>0,showError:x,showWarning:y,hasApprovals:v,hasPlans:g,isWaitingForUserInput:u,hasTaskSuggestion:c,todos:f}}function es(){const t=D.c(6),{messages:e,error:s,finishReason:o,isStreaming:a,isWaitingForApprovals:i}=Ue(),r=s??null,l=o??null;let V;return t[0]!==a||t[1]!==i||t[2]!==e||t[3]!==r||t[4]!==l?(V=Bo({messages:e,error:r,finishReason:l,isStreaming:a,isWaitingForApprovals:i}),t[0]=a,t[1]=i,t[2]=e,t[3]=r,t[4]=l,t[5]=V):V=t[5],V}function ur(){const t=es(),e=Ke("credits");return t.isCreditExhausted?e?0:1:Number(t.hasTodos)+Number(t.showError)+ +!!t.planRefusal+Number(t.showWarning)+Number(t.hasApprovals)+Number(t.hasPlans)+Number(t.isWaitingForUserInput)+Number(t.hasTaskSuggestion)}const vt="start-task",$o=`Turn the report below into a running task. The user pressed "Start task", which authorizes delegation.
|
|
3
3
|
|
|
4
4
|
1. Read the report and any attached screenshots. Carry the reporter's own words into the task description, plus the URL of any attachment.
|
|
5
5
|
2. Call TASK_BOARD_ITEM_LIST. Its \`repos\` are this organization's repositories — the only valid values for a task's repo, so pick the one the report is about and never invent a name.
|
|
6
6
|
3. Call TASK_BOARD_ITEM_CREATE with a concise title, the full description, the chosen repo as owner/name, assigneeId "super-agent", and onDuplicate "return_existing". That assignment is what queues the work; the duplicate option makes the tool hand back an existing task when one already covers this report instead of opening a second one.
|
|
7
7
|
4. Reply with the task key the tool returned (e.g. DECO-144) and one line on what you filed. If the output says \`deduplicated: true\`, say the report was already tracked by that task and quote its \`duplicateReason\`. Never invent a URL. Do NOT implement the fix here; the task's own run does that, and the reporter gets an email when its PR is ready for review.
|
|
8
8
|
|
|
9
|
-
The report follows.`;function Ko(t){return{...t,content:[{type:"paragraph",content:[sn({id:vt,name:vt,char:"/",kind:"prompt",metadata:[{role:"user",content:{type:"text",text:$o}}]})]},...t.content??[]]}}function bt(t){const e=D.c(14),{icon:s,inset:o,label:a,title:i,dismissLabel:r,onDismiss:l}=t,V=o?"pl-1":"pl-2.5";let d;e[0]!==V?(d=z("surface-inset flex h-7 min-w-0 items-center gap-1.5 rounded-full pr-0.5 text-xs text-foreground",V),e[0]=V,e[1]=d):d=e[1];let u;e[2]!==a?(u=n.jsx("span",{className:"truncate",children:a}),e[2]=a,e[3]=u):u=e[3];let c;e[4]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx(Ft,{size:12}),e[4]=c):c=e[4];let p;e[5]!==r||e[6]!==l?(p=n.jsx(mn,{label:r,size:"icon-sm",onClick:l,children:c}),e[5]=r,e[6]=l,e[7]=p):p=e[7];let h;return e[8]!==s||e[9]!==d||e[10]!==u||e[11]!==p||e[12]!==i?(h=n.jsxs("span",{className:d,title:i,children:[s,u,p]}),e[8]=s,e[9]=d,e[10]=u,e[11]=p,e[12]=i,e[13]=h):h=e[13],h}function qo(){const t=D.c(13),e=Q(),s=xn(),o=vn();if(!s&&!o)return null;const a=s?s.project&&!s.isHome?`${s.project.title} · ${s.title}`:s.title:"";let i;t[0]!==o?(i=o?bn(o.path):"",t[0]=o,t[1]=i):i=t[1];const r=i;let l;t[2]!==e||t[3]!==s||t[4]!==a?(l=s&&n.jsx(bt,{icon:s.project?n.jsx(ln,{icon:s.project.icon??null,name:s.project.title,size:"xs"}):n.jsx(Vn,{size:14,className:"shrink-0 text-muted-foreground"}),inset:!!s.project,label:a,title:e("chat.input.viewContext",{name:a}),dismissLabel:e("chat.input.viewDismiss"),onDismiss:s.dismiss}),t[2]=e,t[3]=s,t[4]=a,t[5]=l):l=t[5];let V;t[6]!==r||t[7]!==o||t[8]!==e?(V=o&&n.jsx(bt,{icon:n.jsx(gn,{filename:r,className:"h-4 w-3 shrink-0"}),label:r,title:e("chat.input.openFileContext",{name:r}),dismissLabel:e("chat.input.openFileDismiss"),onDismiss:o.dismiss}),t[6]=r,t[7]=o,t[8]=e,t[9]=V):V=t[9];let d;return t[10]!==l||t[11]!==V?(d=n.jsxs("div",{className:"flex min-w-0 flex-wrap gap-1.5 px-3 pt-3",children:[l,V]}),t[10]=l,t[11]=V,t[12]=d):d=t[12],d}function Qo(t){return{autosend:In,sidepanel:!0,...t?{mainpanel:!1}:{}}}function Wo(t){const e=D.c(30),{current:s,total:o,onPrev:a,onNext:i}=t,r=Q();if(o<=1)return null;const l=s===0,V=s===0?"opacity-30 cursor-not-allowed":"hover:text-foreground cursor-pointer";let d;e[0]!==V?(d=z("p-0.5 transition-colors rounded-lg",V),e[0]=V,e[1]=d):d=e[1];let u;e[2]!==r?(u=r("chat.pagination.previousLabel"),e[2]=r,e[3]=u):u=e[3];let c;e[4]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx(Xn,{size:14}),e[4]=c):c=e[4];let p;e[5]!==a||e[6]!==l||e[7]!==d||e[8]!==u?(p=n.jsx("button",{type:"button",onClick:a,disabled:l,className:d,"aria-label":u,children:c}),e[5]=a,e[6]=l,e[7]=d,e[8]=u,e[9]=p):p=e[9];const h=s+1;let f;e[10]!==r||e[11]!==h||e[12]!==o?(f=r("chat.pagination.counter",{current:h,total:o}),e[10]=r,e[11]=h,e[12]=o,e[13]=f):f=e[13];let m;e[14]!==f?(m=n.jsx("span",{className:"tabular-nums text-xs",children:f}),e[14]=f,e[15]=m):m=e[15];const x=s===o-1,v=s===o-1?"opacity-30 cursor-not-allowed":"hover:text-foreground cursor-pointer";let g;e[16]!==v?(g=z("p-0.5 transition-colors rounded-lg",v),e[16]=v,e[17]=g):g=e[17];let b;e[18]!==r?(b=r("chat.pagination.nextLabel"),e[18]=r,e[19]=b):b=e[19];let y;e[20]===Symbol.for("react.memo_cache_sentinel")?(y=n.jsx(Ot,{size:14}),e[20]=y):y=e[20];let A;e[21]!==i||e[22]!==x||e[23]!==g||e[24]!==b?(A=n.jsx("button",{type:"button",onClick:i,disabled:x,className:g,"aria-label":b,children:y}),e[21]=i,e[22]=x,e[23]=g,e[24]=b,e[25]=A):A=e[25];let w;return e[26]!==A||e[27]!==p||e[28]!==m?(w=n.jsxs("div",{className:"flex items-center gap-1 text-sm text-muted-foreground",children:[p,m,A]}),e[26]=A,e[27]=p,e[28]=m,e[29]=w):w=e[29],w}function ts(t){const e=D.c(8),{currentIndex:s,total:o,onPrev:a,onNext:i,extraLeft:r}=t;let l;e[0]!==s||e[1]!==i||e[2]!==a||e[3]!==o?(l=n.jsx(Wo,{current:s,total:o,onPrev:a,onNext:i}),e[0]=s,e[1]=i,e[2]=a,e[3]=o,e[4]=l):l=e[4];let V;return e[5]!==r||e[6]!==l?(V=n.jsxs("div",{className:"flex items-center gap-2",children:[l,r]}),e[5]=r,e[6]=l,e[7]=V):V=e[7],V}function Yo(t){const e=D.c(17),{isStreaming:s,isAllAnswered:o,isCurrentAnswered:a,onAdvanceOrSubmit:i,submitLabel:r,nextLabel:l}=t,u=o?r===void 0?"Submit":r:l===void 0?"Next":l,c=o?s:!a,p=c?o?"Waiting for the assistant to finish…":"Answer this item to continue":null;let h;e[0]!==c||e[1]!==i?(h=()=>{c||i()},e[0]=c,e[1]=i,e[2]=h):h=e[2];const f=c&&"opacity-50 cursor-not-allowed";let m;e[3]!==f?(m=z("h-7 px-2.5 text-xs",f),e[3]=f,e[4]=m):m=e[4];let x;e[5]!==c||e[6]!==u||e[7]!==h||e[8]!==m?(x=n.jsx(W,{type:"button",size:"sm","aria-disabled":c,onClick:h,className:m,children:u}),e[5]=c,e[6]=u,e[7]=h,e[8]=m,e[9]=x):x=e[9];const v=x;if(!p)return v;let g;e[10]!==v?(g=n.jsx(Qt,{asChild:!0,children:v}),e[10]=v,e[11]=g):g=e[11];let b;e[12]!==p?(b=n.jsx(Wt,{children:p}),e[12]=p,e[13]=b):b=e[13];let y;return e[14]!==g||e[15]!==b?(y=n.jsxs(Yt,{children:[g,b]}),e[14]=g,e[15]=b,e[16]=y):y=e[16],y}function ss(t,e,s){return t.findIndex(o=>e(o)===s)}function At(t,e,s,o){return t.length===0?!1:t.every(a=>o(s[e(a)]))}function yt(t,e,s,o,a){if(t.length===0)return null;const i=ss(t,e,a);for(let r=1;r<=t.length;r++){const l=t[(i+r)%t.length];if(!l)continue;const V=e(l);if(V!==a&&!o(s[V]))return V}return null}function Go(t){return!t.isStreaming&&t.allAnswered}function ns(t){const{parts:e,partKey:s,schema:o,defaultValues:a,isStreaming:i,hasAnswer:r,onSubmit:l}=t,V=e[0]?s(e[0]):"",[d,u]=R.useState(V),[c,p]=R.useState(!1),h=xs({resolver:vs(o),defaultValues:a}),f=h.watch(),m=ss(e,s,d),x=m>=0?e[m]:void 0,v=r(f[d]),g=At(e,s,f,r),b=Go({isStreaming:i,allAnswered:g}),y=()=>{if(m>0){const N=e[m-1];N&&u(s(N))}},A=()=>{if(m>=0&&m<e.length-1){const N=e[m+1];N&&u(s(N))}},w=()=>{const N=h.getValues(),T=yt(e,s,N,r,d);T&&u(T)},j=()=>{h.handleSubmit(N=>{const T=N;for(const I of e)l(I,T[s(I)])})()},k=R.useRef(j);k.current=j;const C=()=>{b&&(p(!1),k.current())},_=()=>{const N=h.getValues();if(At(e,s,N,r)){if(i){p(!0);return}p(!1),k.current()}else{const T=yt(e,s,N,r,d);T&&u(T)}};return R.useEffect(()=>{if(c&&!i){if(!g){p(!1);return}p(!1),k.current()}},[c,i,g]),{form:h,activeKey:d,setActiveKey:u,currentIndex:m,currentPart:x,isCurrentAnswered:v,isAllAnswered:g,canSubmit:b,goPrev:y,goNext:A,advanceToNextUnanswered:w,submit:C,submitOrAdvance:_}}const os="chat.approval.defaultDenyReason";function as(t){const e=D.c(36),{onYolo:s}=t,o=Q(),[a,i]=ke();let r,l,V,d,u,c,p,h,f;if(e[0]!==s||e[1]!==a||e[2]!==i||e[3]!==o){const y=we.find(j=>j.value===a.toolApprovalLevel)??we[0];let A;e[13]!==s||e[14]!==a||e[15]!==i?(A=j=>{const k=j,C=a.toolApprovalLevel??"readonly";i({...a,toolApprovalLevel:k}),k==="auto"&&s(C)},e[13]=s,e[14]=a,e[15]=i,e[16]=A):A=e[16];const w=A;V=Yn,h=a.toolApprovalLevel,f=w,l=Gn,u="xs",c="text-xs text-muted-foreground border-border/60 bg-transparent hover:bg-accent h-7 gap-1",p=Ho,r=Hn,d=o(y.shortKey),e[0]=s,e[1]=a,e[2]=i,e[3]=o,e[4]=r,e[5]=l,e[6]=V,e[7]=d,e[8]=u,e[9]=c,e[10]=p,e[11]=h,e[12]=f}else r=e[4],l=e[5],V=e[6],d=e[7],u=e[8],c=e[9],p=e[10],h=e[11],f=e[12];let m;e[17]!==r||e[18]!==d?(m=n.jsx(r,{children:d}),e[17]=r,e[18]=d,e[19]=m):m=e[19];let x;e[20]!==l||e[21]!==u||e[22]!==c||e[23]!==p||e[24]!==m?(x=n.jsx(l,{size:u,className:c,onClick:p,children:m}),e[20]=l,e[21]=u,e[22]=c,e[23]=p,e[24]=m,e[25]=x):x=e[25];let v;e[26]!==o?(v=we.map(y=>n.jsx(Wn,{value:y.value,children:o(y.labelKey)},y.value)),e[26]=o,e[27]=v):v=e[27];let g;e[28]!==v?(g=n.jsx(Jn,{children:v}),e[28]=v,e[29]=g):g=e[29];let b;return e[30]!==V||e[31]!==g||e[32]!==h||e[33]!==f||e[34]!==x?(b=n.jsxs(V,{value:h,onValueChange:f,children:[x,g]}),e[30]=V,e[31]=g,e[32]=h,e[33]=f,e[34]=x,e[35]=b):b=e[35],b}function Ho(t){return t.stopPropagation()}function is(t){const e=D.c(8),{input:s}=t,o=Q();if(s==null){let r;e[0]!==o?(r=o("chat.approval.noInput"),e[0]=o,e[1]=r):r=e[1];let l;return e[2]!==r?(l=n.jsx("div",{className:"px-4 text-xs text-muted-foreground",children:r}),e[2]=r,e[3]=l):l=e[3],l}let a;try{let r;e[4]!==s?(r=JSON.stringify(s,null,2),e[4]=s,e[5]=r):r=e[5],a=r}catch{a=String(s)}let i;return e[6]!==a?(i=n.jsx("div",{className:"px-4",children:n.jsx("pre",{className:"text-xs font-mono text-muted-foreground/70 whitespace-pre-wrap wrap-break-word max-h-32 overflow-y-auto rounded-md bg-muted/30 px-3 py-2",children:a})}),e[6]=a,e[7]=i):i=e[7],i}function Jo(t){const e=D.c(38),{approval:s,onRespond:o}=t,a=Q(),[i]=ke(),r=i.toolApprovalLevel??"readonly";let l;e[0]!==s.approvalId||e[1]!==r||e[2]!==o||e[3]!==a?(l=()=>o(s.approvalId,!1,a(os),r),e[0]=s.approvalId,e[1]=r,e[2]=o,e[3]=a,e[4]=l):l=e[4];const V=l;let d;e[5]!==s.approvalId||e[6]!==r||e[7]!==o?(d=()=>o(s.approvalId,!0,void 0,r),e[5]=s.approvalId,e[6]=r,e[7]=o,e[8]=d):d=e[8];const u=d;let c;e[9]!==s.approvalId||e[10]!==o?(c=C=>o(s.approvalId,!0,void 0,C),e[9]=s.approvalId,e[10]=o,e[11]=c):c=e[11];const p=c;let h;e[12]!==p?(h=n.jsx("div",{className:"flex items-center gap-2",children:n.jsx(as,{onYolo:p})}),e[12]=p,e[13]=h):h=e[13];const f=h;let m;e[14]!==a?(m=a("chat.approval.denyButton"),e[14]=a,e[15]=m):m=e[15];let x;e[16]!==V||e[17]!==m?(x=n.jsx(W,{type:"button",variant:"ghost",size:"sm",className:"h-7 px-2.5 text-xs text-muted-foreground [@media(hover:hover)]:hover:text-foreground active:scale-[0.97] transition-transform",onClick:V,children:m}),e[16]=V,e[17]=m,e[18]=x):x=e[18];let v;e[19]!==a?(v=a("chat.approval.acceptButton"),e[19]=a,e[20]=v):v=e[20];let g;e[21]!==u||e[22]!==v?(g=n.jsx(W,{type:"button",size:"sm",className:"h-7 px-2.5 text-xs active:scale-[0.97] transition-transform",onClick:u,children:v}),e[21]=u,e[22]=v,e[23]=g):g=e[23];let b;e[24]!==x||e[25]!==g?(b=n.jsxs(n.Fragment,{children:[x,g]}),e[24]=x,e[25]=g,e[26]=b):b=e[26];const y=b;let A;e[27]===Symbol.for("react.memo_cache_sentinel")?(A=n.jsx($e,{size:14}),e[27]=A):A=e[27];let w;e[28]!==a?(w=a("chat.approval.needsApproval"),e[28]=a,e[29]=w):w=e[29];let j;e[30]!==s.input?(j=n.jsx(is,{input:s.input}),e[30]=s.input,e[31]=j):j=e[31];let k;return e[32]!==s.friendlyName||e[33]!==f||e[34]!==y||e[35]!==w||e[36]!==j?(k=n.jsx(xe,{icon:A,label:w,title:s.friendlyName,defaultExpanded:!0,footerLeft:f,footerRight:y,children:j}),e[32]=s.friendlyName,e[33]=f,e[34]=y,e[35]=w,e[36]=j,e[37]=k):k=e[37],k}const Zo=bs(te(),oe({approved:As().optional(),levelOverride:Re(["auto","readonly"]).optional()}));function Xo(t){const e=D.c(46),{approvals:s,isStreaming:o,onRespond:a}=t,i=Q(),[r]=ke(),l=r.toolApprovalLevel??"readonly";let V;e[0]!==s?(V=Object.fromEntries(s.map(sa)),e[0]=s,e[1]=V):V=e[1];const d=V;let u;e[2]!==l||e[3]!==a||e[4]!==i?(u=(T,I)=>{const E=I;typeof E?.approved=="boolean"&&a(T.approvalId,E.approved,E.approved===!1?i(os):void 0,E.levelOverride??l)},e[2]=l,e[3]=a,e[4]=i,e[5]=u):u=e[5];let c;e[6]!==s||e[7]!==d||e[8]!==o||e[9]!==u?(c={parts:s,partKey:ta,schema:Zo,defaultValues:d,isStreaming:o,hasAnswer:ea,onSubmit:u},e[6]=s,e[7]=d,e[8]=o,e[9]=u,e[10]=c):c=e[10];const p=ns(c);let h;e[11]!==s||e[12]!==p?(h=T=>{p.form.reset(Object.fromEntries(s.map(I=>[I.approvalId,{approved:!0,levelOverride:T}]))),p.submitOrAdvance()},e[11]=s,e[12]=p,e[13]=h):h=e[13];const f=h,m=p.currentPart,x=p.form;let v;e[14]!==p?(v=T=>{T.preventDefault(),p.submit()},e[14]=p,e[15]=v):v=e[15];let g;e[16]===Symbol.for("react.memo_cache_sentinel")?(g=n.jsx($e,{size:14}),e[16]=g):g=e[16];let b;e[17]!==s.length||e[18]!==i?(b=i("chat.approval.batchedLabel",{count:s.length}),e[17]=s.length,e[18]=i,e[19]=b):b=e[19];const y=m?.friendlyName??"";let A;e[20]!==f?(A=n.jsx(as,{onYolo:f}),e[20]=f,e[21]=A):A=e[21];let w;e[22]!==s.length||e[23]!==p.currentIndex||e[24]!==p.goNext||e[25]!==p.goPrev||e[26]!==A?(w=n.jsx(ts,{currentIndex:p.currentIndex,total:s.length,onPrev:p.goPrev,onNext:p.goNext,extraLeft:A}),e[22]=s.length,e[23]=p.currentIndex,e[24]=p.goNext,e[25]=p.goPrev,e[26]=A,e[27]=w):w=e[27];let j;e[28]!==m||e[29]!==p.form.control||e[30]!==p.submitOrAdvance?(j=m?n.jsx(na,{approvalId:m.approvalId,control:p.form.control,onChange:p.submitOrAdvance}):null,e[28]=m,e[29]=p.form.control,e[30]=p.submitOrAdvance,e[31]=j):j=e[31];let k;e[32]!==m?(k=m?n.jsx(is,{input:m.input}):null,e[32]=m,e[33]=k):k=e[33];let C;e[34]!==w||e[35]!==j||e[36]!==k||e[37]!==b||e[38]!==y?(C=n.jsx(xe,{icon:g,label:b,title:y,defaultExpanded:!0,footerLeft:w,footerRight:j,children:k}),e[34]=w,e[35]=j,e[36]=k,e[37]=b,e[38]=y,e[39]=C):C=e[39];let _;e[40]!==C||e[41]!==v?(_=n.jsx("form",{onSubmit:v,children:C}),e[40]=C,e[41]=v,e[42]=_):_=e[42];let N;return e[43]!==p.form||e[44]!==_?(N=n.jsx(He,{...x,children:_}),e[43]=p.form,e[44]=_,e[45]=N):N=e[45],N}function ea(t){return typeof t?.approved=="boolean"}function ta(t){return t.approvalId}function sa(t){return[t.approvalId,{approved:void 0}]}function na(t){const e=D.c(7),{approvalId:s,control:o,onChange:a}=t,i=Q(),r=`${s}.approved`;let l;e[0]!==a||e[1]!==i?(l=d=>{const{field:u}=d,c=u.value===!0,p=u.value===!1;return n.jsxs(n.Fragment,{children:[n.jsx(W,{type:"button",variant:p?"secondary":"ghost",size:"sm",className:"h-7 px-2.5 text-xs",onClick:()=>{u.onChange(!1),a()},"aria-pressed":p,children:i("chat.approval.denyButton")}),n.jsx(W,{type:"button",variant:c?"default":"outline",size:"sm",className:"h-7 px-2.5 text-xs",onClick:()=>{u.onChange(!0),a()},"aria-pressed":c,children:i("chat.approval.acceptButton")})]})},e[0]=a,e[1]=i,e[2]=l):l=e[2];let V;return e[3]!==o||e[4]!==r||e[5]!==l?(V=n.jsx(ys,{control:o,name:r,render:l}),e[3]=o,e[4]=r,e[5]=l,e[6]=V):V=e[6],V}function oa(){const t=D.c(5),e=Q();let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsx($e,{className:"size-5 text-muted-foreground animate-pulse motion-reduce:animate-none"}),t[0]=s):s=t[0];let o;t[1]!==e?(o=e("chat.approval.preparingRequest"),t[1]=e,t[2]=o):o=t[2];let a;return t[3]!==o?(a=n.jsxs("div",{className:"flex items-center gap-2 p-4 border border-dashed rounded-lg bg-accent/50 w-[calc(100%-16px)] max-w-[640px] mx-auto mb-2",children:[s,n.jsx("span",{className:"text-sm text-muted-foreground shimmer",children:o})]}),t[3]=o,t[4]=a):a=t[4],a}function aa(t){const e=D.c(8),{approvals:s,isStreaming:o,onRespond:a}=t;if(o&&s.length===0){let r;return e[0]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(oa,{}),e[0]=r):r=e[0],r}if(s.length===0)return null;if(s.length===1){const r=s[0];if(!r)return null;let l;return e[1]!==a||e[2]!==r?(l=n.jsx(Jo,{approval:r,onRespond:a}),e[1]=a,e[2]=r,e[3]=l):l=e[3],l}let i;return e[4]!==s||e[5]!==o||e[6]!==a?(i=n.jsx(Xo,{approvals:s,isStreaming:o,onRespond:a}),e[4]=s,e[5]=o,e[6]=a,e[7]=i):i=e[7],i}function ia(t){const e=D.c(28),{plan:s,onApprove:o,onDismiss:a}=t,i=Q();let r;e[0]!==o||e[1]!==s.plan?(r=()=>{o(s.plan)},e[0]=o,e[1]=s.plan,e[2]=r):r=e[2];const l=r;let V;e[3]!==i?(V=i("chat.proposePlan.keepIterating"),e[3]=i,e[4]=V):V=e[4];let d;e[5]!==a||e[6]!==V?(d=n.jsx(W,{type:"button",variant:"ghost",size:"sm",className:"h-7 px-2.5 text-xs text-muted-foreground [@media(hover:hover)]:hover:text-foreground active:scale-[0.97] transition-transform",onClick:a,children:V}),e[5]=a,e[6]=V,e[7]=d):d=e[7];let u;e[8]!==i?(u=i("chat.proposePlan.letsGo"),e[8]=i,e[9]=u):u=e[9];let c;e[10]!==l||e[11]!==u?(c=n.jsx(W,{type:"button",size:"sm",className:"h-7 px-2.5 text-xs bg-special hover:bg-special/90 text-special-foreground active:scale-[0.97] transition-transform",onClick:l,children:u}),e[10]=l,e[11]=u,e[12]=c):c=e[12];let p;e[13]!==d||e[14]!==c?(p=n.jsxs(n.Fragment,{children:[d,c]}),e[13]=d,e[14]=c,e[15]=p):p=e[15];const h=p;let f;e[16]===Symbol.for("react.memo_cache_sentinel")?(f=n.jsx(qt,{size:14}),e[16]=f):f=e[16];let m;e[17]!==i?(m=i("chat.proposePlan.planReady"),e[17]=i,e[18]=m):m=e[18];let x;e[19]!==i?(x=i("chat.proposePlan.implementationPlan"),e[19]=i,e[20]=x):x=e[20];let v;e[21]!==s.plan?(v=n.jsx("div",{className:"px-4 max-h-64 overflow-y-auto",children:n.jsx("div",{className:"prose prose-sm max-w-none text-sm",children:n.jsx(nn,{id:"plan-preview",part:{type:"text",text:s.plan}})})}),e[21]=s.plan,e[22]=v):v=e[22];let g;return e[23]!==h||e[24]!==v||e[25]!==m||e[26]!==x?(g=n.jsx(xe,{icon:f,label:m,title:x,defaultExpanded:!0,footerRight:h,children:v}),e[23]=h,e[24]=v,e[25]=m,e[26]=x,e[27]=g):g=e[27],g}function ra(t){const e=D.c(6),{plans:s,onApprove:o,onDismiss:a}=t;let i;e[0]!==s?(i=Zt(s),e[0]=s,e[1]=i):i=e[1];const r=i;if(!r)return null;let l;return e[2]!==r||e[3]!==o||e[4]!==a?(l=n.jsx(ia,{plan:r,onApprove:o,onDismiss:a}),e[2]=r,e[3]=o,e[4]=a,e[5]=l):l=e[5],l}function rs(t){return t?"response"in t?t.response:t.option??t.draft:""}const jt=oe({response:te().min(1,"Response is required")}),la=oe({option:te().nullable(),draft:te()}).refine(t=>(t.option??t.draft).length>0,{message:"Please select or enter an option"}),Va=oe({response:Re(["yes","no"])});function ca(t){switch(t.type){case"text":return jt;case"choice":return la;case"confirm":return Va;default:return jt}}function da(t){const e={};for(const s of t)e[s.toolCallId]=ca(s.input);return oe(e)}function ua(t){const e=D.c(7),{control:s,name:o,placeholder:a}=t,i=Q();let r;e[0]!==a||e[1]!==i?(r=V=>{const{field:d}=V,u=d.value??"";return n.jsxs(st,{children:[n.jsx(nt,{children:n.jsx("div",{className:"px-2",children:n.jsxs("div",{className:"flex items-center gap-3 px-2 py-3 rounded-lg bg-accent/50",children:[n.jsx("span",{className:"flex items-center justify-center size-6 rounded-md bg-muted shrink-0",children:n.jsx(Et,{size:16,className:"text-muted-foreground"})}),n.jsx("input",{...d,value:u,type:"text",placeholder:a||i("chat.userAskQuestion.typeResponse"),autoFocus:!0,"aria-label":i("chat.userAskQuestion.textResponseInputAriaLabel"),className:"flex-1 text-sm bg-transparent outline-none placeholder:text-foreground/25 text-foreground min-w-0"})]})})}),n.jsx(ot,{})]})},e[0]=a,e[1]=i,e[2]=r):r=e[2];let l;return e[3]!==s||e[4]!==o||e[5]!==r?(l=n.jsx(Kt,{control:s,name:o,render:r}),e[3]=s,e[4]=o,e[5]=r,e[6]=l):l=e[6],l}function ls(t,e){const s=D.c(4);let o,a;s[0]!==t||s[1]!==e?(o=()=>{const i=r=>{if(js(r.target)||r.metaKey||r.ctrlKey||r.altKey)return;const l=Number.parseInt(r.key,10);l>=1&&l<=t&&(r.preventDefault(),e(l-1))};return document.addEventListener("keydown",i),()=>document.removeEventListener("keydown",i)},a=[t,e],s[0]=t,s[1]=e,s[2]=o,s[3]=a):(o=s[2],a=s[3]),R.useEffect(o,a)}function pa(t){const e=D.c(51),{control:s,name:o,options:a}=t,i=Q(),r=`${o}.option`;let l;e[0]!==s||e[1]!==r?(l={control:s,name:r,defaultValue:null},e[0]=s,e[1]=r,e[2]=l):l=e[2];const{field:V}=Vt(l),d=`${o}.draft`;let u;e[3]!==s||e[4]!==d?(u={control:s,name:d,defaultValue:""},e[3]=s,e[4]=d,e[5]=u):u=e[5];const{field:c}=Vt(u),p=V.value,h=c.value??"";let f;if(e[6]!==V||e[7]!==a?(f=O=>{const M=a[O];M!=null&&V.onChange(M)},e[6]=V,e[7]=a,e[8]=f):f=e[8],ls(a.length,f),a.length===0)return null;const m=p===null;let x;e[9]!==i?(x=i("chat.userAskQuestion.choiceOptionsAriaLabel"),e[9]=i,e[10]=x):x=e[10];let v;if(e[11]!==V||e[12]!==p||e[13]!==a||e[14]!==i){let O;e[16]!==V||e[17]!==p||e[18]!==i?(O=(M,K)=>{const q=p===M;return n.jsxs("button",{type:"button",onClick:()=>V.onChange(M),className:z("flex items-start gap-3 px-2 py-3 rounded-lg text-left transition-colors w-full",q&&"bg-accent/50",!q&&"hover:bg-accent"),"aria-label":i("chat.userAskQuestion.selectOption",{option:M}),children:[n.jsx("span",{className:z("flex items-center justify-center size-6 rounded-md text-sm shrink-0 mt-0.5",q?"bg-chart-1 text-white":"bg-muted text-foreground"),children:K+1}),n.jsx("span",{className:"text-sm text-foreground min-w-0 break-words",children:M})]},`${K}-${M}`)},e[16]=V,e[17]=p,e[18]=i,e[19]=O):O=e[19],v=a.map(O),e[11]=V,e[12]=p,e[13]=a,e[14]=i,e[15]=v}else v=e[15];const g=m&&"bg-accent/50",b=!m&&"hover:bg-accent";let y;e[20]!==g||e[21]!==b?(y=z("flex items-center gap-3 px-2 py-3 rounded-lg transition-colors w-full cursor-text",g,b),e[20]=g,e[21]=b,e[22]=y):y=e[22];let A;e[23]===Symbol.for("react.memo_cache_sentinel")?(A=n.jsx("span",{className:"flex items-center justify-center size-6 rounded-md bg-muted shrink-0",children:n.jsx(Et,{size:16,className:"text-muted-foreground"})}),e[23]=A):A=e[23];const w=m?h:"";let j;e[24]!==c||e[25]!==V||e[26]!==p?(j=O=>{c.onChange(O.target.value),p!==null&&V.onChange(null)},e[24]=c,e[25]=V,e[26]=p,e[27]=j):j=e[27];let k;e[28]!==V||e[29]!==p?(k=()=>{p!==null&&V.onChange(null)},e[28]=V,e[29]=p,e[30]=k):k=e[30];let C;e[31]!==i?(C=i("chat.userAskQuestion.somethingElsePlaceholder"),e[31]=i,e[32]=C):C=e[32];let _;e[33]!==i?(_=i("chat.userAskQuestion.customChoiceInputAriaLabel"),e[33]=i,e[34]=_):_=e[34];let N;e[35]!==w||e[36]!==j||e[37]!==k||e[38]!==C||e[39]!==_?(N=n.jsx("input",{type:"text",value:w,onChange:j,onFocus:k,placeholder:C,"aria-label":_,className:"flex-1 text-sm bg-transparent outline-none placeholder:text-foreground/25 text-foreground min-w-0"}),e[35]=w,e[36]=j,e[37]=k,e[38]=C,e[39]=_,e[40]=N):N=e[40];let T;e[41]!==y||e[42]!==N?(T=n.jsxs("label",{className:y,children:[A,N]}),e[41]=y,e[42]=N,e[43]=T):T=e[43];let I;e[44]!==T||e[45]!==x||e[46]!==v?(I=n.jsx(nt,{children:n.jsxs("div",{className:"flex flex-col px-2",role:"group","aria-label":x,children:[v,T]})}),e[44]=T,e[45]=x,e[46]=v,e[47]=I):I=e[47];let E;e[48]===Symbol.for("react.memo_cache_sentinel")?(E=n.jsx(ot,{}),e[48]=E):E=e[48];let F;return e[49]!==I?(F=n.jsxs(st,{children:[I,E]}),e[49]=I,e[50]=F):F=e[50],F}function ha(t){const e=D.c(8),{control:s,name:o}=t,a=Q();let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=["yes","no"],e[0]=i):i=e[0];const r=i,l=R.useRef(null);let V;e[1]===Symbol.for("react.memo_cache_sentinel")?(V=c=>{l.current?.onChange(r[c]??"")},e[1]=V):V=e[1],ls(r.length,V);let d;e[2]!==a?(d=c=>{const{field:p}=c;return l.current=p,n.jsxs(st,{children:[n.jsx(nt,{children:n.jsx("div",{className:"flex gap-2 px-2",role:"group","aria-label":a("chat.userAskQuestion.confirmationOptionsAriaLabel"),children:r.map(h=>{const f=p.value===h;return n.jsxs("button",{type:"button",onClick:()=>p.onChange(h),className:z("flex items-center gap-3 px-4 py-3 rounded-lg text-left transition-colors flex-1",f&&"bg-accent/50",!f&&"hover:bg-accent"),"aria-label":a("chat.userAskQuestion.confirmValue",{value:a(`chat.userAskQuestion.confirm${h==="yes"?"Yes":"No"}`)}),children:[n.jsx("span",{className:z("flex items-center justify-center size-6 rounded-md text-sm shrink-0",f?"bg-chart-1 text-white":"bg-muted text-foreground"),children:h==="yes"?1:2}),n.jsx("span",{className:"text-sm text-foreground capitalize",children:a(`chat.userAskQuestion.confirm${h==="yes"?"Yes":"No"}`)})]},h)})})}),n.jsx(ot,{})]})},e[2]=a,e[3]=d):d=e[3];let u;return e[4]!==s||e[5]!==o||e[6]!==d?(u=n.jsx(Kt,{control:s,name:o,render:d}),e[4]=s,e[5]=o,e[6]=d,e[7]=u):u=e[7],u}function wt(t){const e=D.c(13),{input:s,control:o,toolCallId:a}=t;switch(s.type){case"text":{const i=`${a}.response`;let r;return e[0]!==o||e[1]!==s.default||e[2]!==i?(r=n.jsx(ua,{control:o,name:i,placeholder:s.default}),e[0]=o,e[1]=s.default,e[2]=i,e[3]=r):r=e[3],r}case"choice":{let i;e[4]!==s.options?(i=s.options?.filter(Boolean)??[],e[4]=s.options,e[5]=i):i=e[5];const r=i;let l;return e[6]!==o||e[7]!==r||e[8]!==a?(l=n.jsx(pa,{control:o,name:a,options:r}),e[6]=o,e[7]=r,e[8]=a,e[9]=l):l=e[9],l}case"confirm":{const i=`${a}.response`;let r;return e[10]!==o||e[11]!==i?(r=n.jsx(ha,{control:o,name:i}),e[10]=o,e[11]=i,e[12]=r):r=e[12],r}default:return null}}function fa(t){const e=D.c(91),{parts:s,isStreaming:o,onSubmit:a}=t;let i;e[0]!==s?(i=da(s.map(va)),e[0]=s,e[1]=i):i=e[1];const r=i;let l;e[2]!==s?(l=Object.fromEntries(s.map(xa)),e[2]=s,e[3]=l):l=e[3];const V=l;let d;e[4]!==a?(d=(U,Y)=>{const P=rs(Y);P&&a(U,P)},e[4]=a,e[5]=d):d=e[5];let u;e[6]!==V||e[7]!==o||e[8]!==s||e[9]!==r||e[10]!==d?(u={parts:s,partKey:ga,schema:r,defaultValues:V,isStreaming:o,hasAnswer:ma,onSubmit:d},e[6]=V,e[7]=o,e[8]=s,e[9]=r,e[10]=d,e[11]=u):u=e[11];const c=ns(u),p=c.currentPart,h=Q();let f;e[12]!==p||e[13]!==c||e[14]!==h?(f=()=>{const U=p;if(!U)return;const Y=h("chat.userAskQuestion.skipMessage"),P=U.toolCallId;U.input?.type==="choice"?(c.form.setValue(`${P}.option`,null),c.form.setValue(`${P}.draft`,Y)):c.form.setValue(`${P}.response`,Y),c.advanceToNextUnanswered()},e[12]=p,e[13]=c,e[14]=h,e[15]=f):f=e[15];const m=f;let x;e[16]!==c.currentIndex||e[17]!==c.goNext||e[18]!==c.goPrev||e[19]!==s.length?(x=n.jsx(ts,{currentIndex:c.currentIndex,total:s.length,onPrev:c.goPrev,onNext:c.goNext}),e[16]=c.currentIndex,e[17]=c.goNext,e[18]=c.goPrev,e[19]=s.length,e[20]=x):x=e[20];const v=x;let g;e[21]!==h?(g=h("chat.userAskQuestion.skip"),e[21]=h,e[22]=g):g=e[22];let b;e[23]!==m||e[24]!==g?(b=n.jsx(W,{type:"button",variant:"outline",size:"sm",onClick:m,className:"h-7",children:g}),e[23]=m,e[24]=g,e[25]=b):b=e[25];let y;e[26]!==c.isAllAnswered||e[27]!==c.isCurrentAnswered||e[28]!==c.submitOrAdvance||e[29]!==o?(y=n.jsx(Yo,{isStreaming:o,isAllAnswered:c.isAllAnswered,isCurrentAnswered:c.isCurrentAnswered,onAdvanceOrSubmit:c.submitOrAdvance}),e[26]=c.isAllAnswered,e[27]=c.isCurrentAnswered,e[28]=c.submitOrAdvance,e[29]=o,e[30]=y):y=e[30];let A;e[31]!==b||e[32]!==y?(A=n.jsxs(n.Fragment,{children:[b,y]}),e[31]=b,e[32]=y,e[33]=A):A=e[33];const w=A;if(s.length===1){const U=s[0];if(!U?.input)return null;const Y=c.form;let P;e[34]!==c?(P=ee=>{ee.preventDefault(),c.submit()},e[34]=c,e[35]=P):P=e[35];let G;e[36]===Symbol.for("react.memo_cache_sentinel")?(G=n.jsx(Ge,{size:14}),e[36]=G):G=e[36];let ne;e[37]!==h?(ne=h("chat.userAskQuestion.questionPending"),e[37]=h,e[38]=ne):ne=e[38];let H;e[39]!==U.input?.prompt||e[40]!==h?(H=U.input?.prompt??h("chat.userAskQuestion.question"),e[39]=U.input?.prompt,e[40]=h,e[41]=H):H=e[41];const re=U.input;let S;e[42]!==c.form.control||e[43]!==U.toolCallId||e[44]!==re?(S=n.jsx(wt,{input:re,control:c.form.control,toolCallId:U.toolCallId}),e[42]=c.form.control,e[43]=U.toolCallId,e[44]=re,e[45]=S):S=e[45];let L;e[46]!==w||e[47]!==ne||e[48]!==H||e[49]!==S?(L=n.jsx(xe,{icon:G,label:ne,title:H,defaultExpanded:!0,footerRight:w,children:S}),e[46]=w,e[47]=ne,e[48]=H,e[49]=S,e[50]=L):L=e[50];let J;e[51]!==P||e[52]!==L?(J=n.jsx("form",{onSubmit:P,autoComplete:"off",children:L}),e[51]=P,e[52]=L,e[53]=J):J=e[53];let $;return e[54]!==c.form||e[55]!==J?($=n.jsx(He,{...Y,children:J}),e[54]=c.form,e[55]=J,e[56]=$):$=e[56],$}const j=c.form;let k;e[57]!==c?(k=U=>{U.preventDefault(),c.submit()},e[57]=c,e[58]=k):k=e[58];let C;e[59]===Symbol.for("react.memo_cache_sentinel")?(C=n.jsx(Ge,{size:14}),e[59]=C):C=e[59];let _;e[60]!==h?(_=h("chat.userAskQuestion.questionPending"),e[60]=h,e[61]=_):_=e[61];const N=c.currentIndex+1;let T;e[62]!==s.length||e[63]!==h||e[64]!==N?(T=h("chat.userAskQuestion.questionCount",{current:N,total:s.length}),e[62]=s.length,e[63]=h,e[64]=N,e[65]=T):T=e[65];let I;e[66]!==p?.input?.prompt||e[67]!==h?(I=p?.input?.prompt??h("chat.userAskQuestion.question"),e[66]=p?.input?.prompt,e[67]=h,e[68]=I):I=e[68];const E=c.activeKey,F=c.setActiveKey;let O;if(e[69]!==c.form||e[70]!==s){let U;e[72]!==c.form?(U=Y=>n.jsx(eo,{value:Y.toolCallId,className:"mt-0",children:n.jsx(wt,{input:Y.input,control:c.form.control,toolCallId:Y.toolCallId})},Y.toolCallId),e[72]=c.form,e[73]=U):U=e[73],O=s.map(U),e[69]=c.form,e[70]=s,e[71]=O}else O=e[71];let M;e[74]!==c.activeKey||e[75]!==c.setActiveKey||e[76]!==O?(M=n.jsx(to,{value:E,onValueChange:F,children:O}),e[74]=c.activeKey,e[75]=c.setActiveKey,e[76]=O,e[77]=M):M=e[77];let K;e[78]!==v||e[79]!==w||e[80]!==_||e[81]!==T||e[82]!==I||e[83]!==M?(K=n.jsx(xe,{icon:C,label:_,count:T,title:I,defaultExpanded:!0,footerLeft:v,footerRight:w,children:M}),e[78]=v,e[79]=w,e[80]=_,e[81]=T,e[82]=I,e[83]=M,e[84]=K):K=e[84];let q;e[85]!==k||e[86]!==K?(q=n.jsx("form",{onSubmit:k,autoComplete:"off",children:K}),e[85]=k,e[86]=K,e[87]=q):q=e[87];let Z;return e[88]!==c.form||e[89]!==q?(Z=n.jsx(He,{...j,children:q}),e[88]=c.form,e[89]=q,e[90]=Z):Z=e[90],Z}function ma(t){return!!rs(t)}function ga(t){return t.toolCallId}function xa(t){return t.input?.type==="choice"?[t.toolCallId,{option:null,draft:""}]:[t.toolCallId,{response:""}]}function va(t){return{toolCallId:t.toolCallId,input:t.input}}function ba(){const t=D.c(5),e=Q();let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsx(Ge,{className:"size-5 text-muted-foreground animate-pulse motion-reduce:animate-none"}),t[0]=s):s=t[0];let o;t[1]!==e?(o=e("chat.userAskQuestion.preparingQuestion"),t[1]=e,t[2]=o):o=t[2];let a;return t[3]!==o?(a=n.jsxs("div",{className:"flex items-center gap-2 p-4 border border-dashed rounded-lg bg-accent/50 w-[calc(100%-16px)] max-w-[640px] mx-auto mb-2",children:[s,n.jsx("span",{className:"text-sm text-muted-foreground shimmer",children:o})]}),t[3]=o,t[4]=a):a=t[4],a}function Vs(t){const e=D.c(7),{userAskParts:s,isStreaming:o,onSubmit:a}=t;let i;e[0]!==s?(i=s.filter(Aa),e[0]=s,e[1]=i):i=e[1];const r=i;if(r.length===0){if(o){let V;return e[2]===Symbol.for("react.memo_cache_sentinel")?(V=n.jsx(ba,{}),e[2]=V):V=e[2],V}return null}let l;return e[3]!==o||e[4]!==a||e[5]!==r?(l=n.jsx(fa,{parts:r,isStreaming:o,onSubmit:a}),e[3]=o,e[4]=a,e[5]=r,e[6]=l):l=e[6],l}function Aa(t){return t.state==="input-available"}function ya(t){const e=D.c(33),{parts:s,isStreaming:o,onRespond:a}=t,i=Q();let r;e[0]!==s?(r=s.at(-1),e[0]=s,e[1]=r):r=e[1];const l=r,V=l?.input;if(!l||!V?.title)return null;let d;e[2]===Symbol.for("react.memo_cache_sentinel")?(d=n.jsx(qt,{size:14}),e[2]=d):d=e[2];let u;e[3]!==i?(u=i("chat.suggestTask.label"),e[3]=i,e[4]=u):u=e[4];const c=V.title;let p;e[5]!==a||e[6]!==l?(p=()=>a(l,!1),e[5]=a,e[6]=l,e[7]=p):p=e[7];let h;e[8]!==i?(h=i("chat.suggestTask.notNow"),e[8]=i,e[9]=h):h=e[9];let f;e[10]!==o||e[11]!==p||e[12]!==h?(f=n.jsx(W,{type:"button",size:"sm",variant:"outline",className:"h-7",disabled:o,onClick:p,children:h}),e[10]=o,e[11]=p,e[12]=h,e[13]=f):f=e[13];let m;e[14]!==a||e[15]!==l?(m=()=>a(l,!0),e[14]=a,e[15]=l,e[16]=m):m=e[16];let x;e[17]!==i?(x=i("chat.suggestTask.create"),e[17]=i,e[18]=x):x=e[18];let v;e[19]!==o||e[20]!==m||e[21]!==x?(v=n.jsx(W,{type:"button",size:"sm",className:"h-7",disabled:o,onClick:m,children:x}),e[19]=o,e[20]=m,e[21]=x,e[22]=v):v=e[22];let g;e[23]!==v||e[24]!==f?(g=n.jsxs(n.Fragment,{children:[f,v]}),e[23]=v,e[24]=f,e[25]=g):g=e[25];let b;e[26]!==V.summary?(b=V.summary?n.jsx("p",{className:"px-4 pb-1 text-sm leading-snug text-muted-foreground whitespace-pre-wrap",children:V.summary}):null,e[26]=V.summary,e[27]=b):b=e[27];let y;return e[28]!==V.title||e[29]!==g||e[30]!==b||e[31]!==u?(y=n.jsx(xe,{icon:d,label:u,title:c,defaultExpanded:!0,footerRight:g,children:b}),e[28]=V.title,e[29]=g,e[30]=b,e[31]=u,e[32]=y):y=e[32],y}function ja(t){const e=t.filter(i=>i.status==="in_progress"),s=t.filter(i=>i.status==="completed").length,o=t.length;if(o>0&&s===o)return{icon:"completed",activity:"All done",progress:`${o}/${o}`};const[a]=e;return a&&e.length===1?{icon:"in_progress",activity:a.activeForm,progress:`${s}/${o} done`}:e.length>1?{icon:"in_progress",activity:`${e.length} in progress`,progress:`${s}/${o} done`}:s>0?{icon:"pending",activity:`${o-s} pending`,progress:`${s}/${o} done`}:{icon:"pending",activity:`${o} todos`,progress:"not started"}}function wa(t){const e=D.c(13),{todos:s}=t;if(s.length===0)return null;let o;e[0]!==s?(o=ja(s),e[0]=s,e[1]=o):o=e[1];const a=o;let i;e[2]!==a.icon?(i=n.jsx(Na,{status:a.icon}),e[2]=a.icon,e[3]=i):i=e[3];const r=a.activity,l=a.progress;let V;e[4]!==s?(V=s.map(ka),e[4]=s,e[5]=V):V=e[5];let d;e[6]!==V?(d=n.jsx("ul",{"data-testid":"todos-list",className:"flex flex-col px-2 max-h-[40vh] overflow-y-auto",children:V}),e[6]=V,e[7]=d):d=e[7];let u;return e[8]!==a.activity||e[9]!==a.progress||e[10]!==i||e[11]!==d?(u=n.jsx(xe,{icon:i,label:r,count:l,defaultExpanded:!1,children:d}),e[8]=a.activity,e[9]=a.progress,e[10]=i,e[11]=d,e[12]=u):u=e[12],u}function ka(t,e){return n.jsx(Ca,{todo:t},e)}function Ca(t){const e=D.c(14),{todo:s}=t,o=s.status==="completed",i=s.status==="in_progress"?s.activeForm:s.content;let r;e[0]!==s.status?(r=n.jsx(Sa,{status:s.status}),e[0]=s.status,e[1]=r):r=e[1];const l=o&&"text-muted-foreground";let V;e[2]!==l?(V=z("relative text-sm leading-snug pt-px select-none",l),e[2]=l,e[3]=V):V=e[3];const d=o?"100%":"0%",u=o?"width 300ms ease 200ms":"width 150ms ease";let c;e[4]!==d||e[5]!==u?(c=n.jsx("span",{"aria-hidden":"true",style:{position:"absolute",left:0,top:"50%",height:"1px",background:"currentColor",width:d,transition:u}}),e[4]=d,e[5]=u,e[6]=c):c=e[6];let p;e[7]!==i||e[8]!==V||e[9]!==c?(p=n.jsxs("span",{className:V,children:[i,c]}),e[7]=i,e[8]=V,e[9]=c,e[10]=p):p=e[10];let h;return e[11]!==r||e[12]!==p?(h=n.jsxs("li",{className:"flex items-start gap-2.5 px-2 py-1.5 rounded-lg hover:bg-accent transition-colors",children:[r,p]}),e[11]=r,e[12]=p,e[13]=h):h=e[13],h}function Sa(t){const e=D.c(4),{status:s}=t,o=s==="completed"?"true":void 0,a=s==="in_progress"?"true":void 0;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx("svg",{viewBox:"0 0 21 21",children:n.jsx("path",{d:"M5,10.75 L8.5,14.25 L19.4,2.3 C18.8333333,1.43333333 18.0333333,1 17,1 L4,1 C2.35,1 1,2.35 1,4 L1,17 C1,18.65 2.35,20 4,20 L17,20 C18.65,20 20,18.65 20,17 L20,7.99769186"})}),e[0]=i):i=e[0];let r;return e[1]!==o||e[2]!==a?(r=n.jsx("div",{className:"todo-cb mt-0.5","data-checked":o,"data-progress":a,"aria-hidden":"true",children:i}),e[1]=o,e[2]=a,e[3]=r):r=e[3],r}function Na(t){const e=D.c(13),{status:s}=t,o=Q();if(s==="completed"){let r;e[0]!==o?(r=o("chat.todoStatus.completed"),e[0]=o,e[1]=r):r=e[1];let l;e[2]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx("svg",{viewBox:"0 0 10 8",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",className:"w-2 h-2 text-primary-foreground",style:{strokeWidth:2},children:n.jsx("path",{d:"M1 4l2.5 2.5L9 1"})}),e[2]=l):l=e[2];let V;return e[3]!==r?(V=n.jsx("span",{"aria-label":r,className:"inline-flex items-center justify-center w-3.5 h-3.5 rounded-sm bg-primary",children:l}),e[3]=r,e[4]=V):V=e[4],V}if(s==="in_progress"){let r;e[5]!==o?(r=o("chat.todoStatus.inProgress"),e[5]=o,e[6]=r):r=e[6];let l;return e[7]!==r?(l=n.jsx("span",{"aria-label":r,className:"inline-block w-2 h-2 rounded-full bg-primary animate-pulse shrink-0"}),e[7]=r,e[8]=l):l=e[8],l}let a;e[9]!==o?(a=o("chat.todoStatus.pending"),e[9]=o,e[10]=a):a=e[10];let i;return e[11]!==a?(i=n.jsx("span",{"aria-label":a,className:"inline-block w-3.5 h-3.5 rounded-sm border-[1.5px] border-muted-foreground/50 shrink-0"}),e[11]=a,e[12]=i):i=e[12],i}const Ia={usd:[{dollars:10,labelKey:"credits.topUp.starter"},{dollars:20,labelKey:"credits.topUp.popular"},{dollars:100,labelKey:"credits.topUp.bestValue"}],brl:[{dollars:50,labelKey:"credits.topUp.starter"},{dollars:100,labelKey:"credits.topUp.popular"},{dollars:500,labelKey:"credits.topUp.bestValue"}]},Ta={"credits.topUp.starter":"starter","credits.topUp.popular":"popular","credits.topUp.bestValue":"best_value"};function _a(t){const e=D.c(46),{source:s,onDone:o}=t,a=Q(),i=ws(),[r]=ke(),[l,V]=R.useState(r.language==="pt-BR"?"brl":"usd"),[d,u]=R.useState(""),[c,p]=R.useState(!1),h=l==="brl"?"R$":"$";let f;e[0]!==l||e[1]!==i?(f=async M=>{const{url:K}=await i.call("AI_PROVIDER_TOPUP_URL",{providerId:"deco",amountCents:M,currency:l});return K},e[0]=l,e[1]=i,e[2]=f):f=e[2];let m;e[3]!==o?(m=M=>{M&&window.open(M,"_blank","noopener,noreferrer"),o?.()},e[3]=o,e[4]=m):m=e[4];let x;e[5]!==a?(x=M=>{Ie.error(a("credits.topUp.failed",{message:M.message}))},e[5]=a,e[6]=x):x=e[6];let v;e[7]!==f||e[8]!==m||e[9]!==x?(v={mutationFn:f,onSuccess:m,onError:x},e[7]=f,e[8]=m,e[9]=x,e[10]=v):v=e[10];const{mutate:g,isPending:b}=ks(v);let y;e[11]!==l||e[12]!==s||e[13]!==g?(y=(M,K)=>{X("credits_topup_clicked",{amount_cents:M,currency:l,tier_label:K,source:s}),g(M)},e[11]=l,e[12]=s,e[13]=g,e[14]=y):y=e[14];const A=y,w=parseFloat(d),j=!isNaN(w)&&w>=1;let k,C,_;e[15]===Symbol.for("react.memo_cache_sentinel")?(k=M=>{M&&V(M)},C=n.jsx(ft,{value:"usd",className:"h-8 px-3 text-xs",children:"USD"}),_=n.jsx(ft,{value:"brl",className:"h-8 px-3 text-xs",children:"BRL"}),e[15]=k,e[16]=C,e[17]=_):(k=e[15],C=e[16],_=e[17]);let N;e[18]!==l?(N=n.jsx("div",{className:"mb-4",children:n.jsxs(oo,{type:"single",variant:"outline",size:"sm",value:l,onValueChange:k,children:[C,_]})}),e[18]=l,e[19]=N):N=e[19];const T=Ia[l];let I;if(e[20]!==A||e[21]!==h||e[22]!==b||e[23]!==a||e[24]!==T){let M;e[26]!==A||e[27]!==h||e[28]!==b||e[29]!==a?(M=K=>{const{dollars:q,labelKey:Z}=K;return n.jsxs("button",{type:"button",disabled:b,onClick:()=>A(q*100,Ta[Z]??"preset"),className:z("relative flex flex-col items-center gap-1 py-5 surface surface-interactive cursor-pointer","disabled:opacity-50 disabled:cursor-wait"),children:[n.jsxs("span",{className:"text-2xl font-semibold tabular-nums text-foreground",children:[h,q]}),n.jsx("span",{className:"text-xs text-muted-foreground",children:a(Z)})]},q)},e[26]=A,e[27]=h,e[28]=b,e[29]=a,e[30]=M):M=e[30],I=T.map(M),e[20]=A,e[21]=h,e[22]=b,e[23]=a,e[24]=T,e[25]=I}else I=e[25];let E;e[31]!==I?(E=n.jsx("div",{className:"grid grid-cols-3 gap-2.5",children:I}),e[31]=I,e[32]=E):E=e[32];let F;e[33]!==A||e[34]!==h||e[35]!==d||e[36]!==w||e[37]!==j||e[38]!==b||e[39]!==c||e[40]!==a?(F=c?n.jsxs("div",{className:"flex gap-2 mt-3",children:[n.jsxs("div",{className:"relative flex-1",children:[n.jsx("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-sm text-muted-foreground select-none",children:h}),n.jsx(Cs,{type:"number",min:"1",step:"1",placeholder:a("credits.topUp.customPlaceholder"),value:d,onChange:M=>u(M.target.value),className:"h-10 text-sm pl-7",autoFocus:!0})]}),n.jsx(W,{size:"lg",disabled:!j||b,onClick:()=>A(Math.round(w*100),"custom"),children:a(b?"credits.topUp.opening":"credits.topUp.add")})]}):n.jsx("button",{type:"button",className:"w-full mt-3 text-xs text-muted-foreground hover:text-foreground transition-colors py-1",onClick:()=>p(!0),children:a("credits.topUp.enterCustom")}),e[33]=A,e[34]=h,e[35]=d,e[36]=w,e[37]=j,e[38]=b,e[39]=c,e[40]=a,e[41]=F):F=e[41];let O;return e[42]!==E||e[43]!==F||e[44]!==N?(O=n.jsxs("div",{children:[N,E,F]}),e[42]=E,e[43]=F,e[44]=N,e[45]=O):O=e[45],O}const Da=["chat.creditsExhaustedBanner.benefit1","chat.creditsExhaustedBanner.benefit2","chat.creditsExhaustedBanner.benefit3"];function Ma(t){const e=D.c(47),{onDismiss:s}=t,{org:o}=Te(),a=Xe(),{decoKeyId:i}=no(),r=Q(),l=Ke("credits");let V,d;if(e[0]!==o.id?(V=()=>{X("credits_exhausted_shown",{organization_id:o.id})},d=[o.id],e[0]=o.id,e[1]=V,e[2]=d):(V=e[1],d=e[2]),R.useEffect(V,d),!l)return null;let u;e[3]!==s?(u=T=>!T&&s?.(),e[3]=s,e[4]=u):u=e[4];let c;e[5]===Symbol.for("react.memo_cache_sentinel")?(c=["radial-gradient(ellipse 40% 200% at -5% 100%, rgba(165,149,255,0.5) 0%, transparent 100%)","radial-gradient(ellipse 40% 200% at 105% -10%, rgba(208,236,26,0.45) 0%, transparent 100%)"],e[5]=c):c=e[5];let p;e[6]===Symbol.for("react.memo_cache_sentinel")?(p=n.jsx("div",{className:"absolute inset-x-0 top-0 h-36 pointer-events-none",style:{backgroundImage:c.join(", "),maskImage:"linear-gradient(to bottom, black 0%, transparent 100%)",WebkitMaskImage:"linear-gradient(to bottom, black 0%, transparent 100%)"}}),e[6]=p):p=e[6];let h;e[7]===Symbol.for("react.memo_cache_sentinel")?(h=n.jsx("img",{src:"/logos/deco%20logo.svg",alt:"Deco AI Gateway",className:"size-9 rounded-lg object-contain dark:bg-white dark:p-0.5"}),e[7]=h):h=e[7];let f;e[8]!==r?(f=r("chat.creditsExhaustedBanner.title"),e[8]=r,e[9]=f):f=e[9];let m;e[10]!==f?(m=n.jsx(Ss,{className:"text-xl font-semibold tracking-tight",children:f}),e[10]=f,e[11]=m):m=e[11];let x;e[12]!==r?(x=r("chat.creditsExhaustedBanner.description"),e[12]=r,e[13]=x):x=e[13];let v;e[14]!==x?(v=n.jsx(Ns,{className:"mt-1.5 text-sm leading-relaxed",children:x}),e[14]=x,e[15]=v):v=e[15];let g;e[16]!==v||e[17]!==m?(g=n.jsxs("div",{className:"relative px-8 pt-8 pb-2 overflow-hidden",children:[p,n.jsxs(Is,{className:"relative gap-4",children:[h,n.jsxs("div",{children:[m,v]})]})]}),e[16]=v,e[17]=m,e[18]=g):g=e[18];let b;e[19]!==i||e[20]!==s||e[21]!==r?(b=i&&n.jsxs("div",{className:"px-8 pt-5 pb-6",children:[n.jsx("div",{className:"surface p-5",children:n.jsx(_a,{source:"exhausted_banner",onDone:s})}),n.jsx("div",{className:"mt-5 rounded-xl bg-muted/25 border border-border/50 p-4 space-y-3",children:Da.map(T=>n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx("div",{className:"flex items-center justify-center size-5 rounded-full bg-success/15 shrink-0",children:n.jsx(_t,{size:12,className:"text-success"})}),n.jsx("span",{className:"text-sm text-foreground/80",children:r(T)})]},T))})]}),e[19]=i,e[20]=s,e[21]=r,e[22]=b):b=e[22];let y;e[23]!==r?(y=r("chat.creditsExhaustedBanner.dismiss"),e[23]=r,e[24]=y):y=e[24];let A;e[25]!==s||e[26]!==y?(A=n.jsx(W,{variant:"ghost",size:"sm",onClick:s,children:y}),e[25]=s,e[26]=y,e[27]=A):A=e[27];let w;e[28]!==a||e[29]!==s||e[30]!==o.slug?(w=()=>{a({to:"/$org/settings/ai-providers",params:{org:o.slug}}),s?.()},e[28]=a,e[29]=s,e[30]=o.slug,e[31]=w):w=e[31];let j;e[32]!==r?(j=r("chat.creditsExhaustedBanner.manageProviders"),e[32]=r,e[33]=j):j=e[33];let k;e[34]!==w||e[35]!==j?(k=n.jsx("button",{type:"button",className:"text-xs text-muted-foreground hover:text-foreground transition-colors",onClick:w,children:j}),e[34]=w,e[35]=j,e[36]=k):k=e[36];let C;e[37]!==A||e[38]!==k?(C=n.jsxs("div",{className:"px-8 py-4 border-t border-border bg-muted/30 flex items-center justify-between",children:[A,k]}),e[37]=A,e[38]=k,e[39]=C):C=e[39];let _;e[40]!==g||e[41]!==b||e[42]!==C?(_=n.jsxs(Ts,{className:"sm:max-w-[520px] gap-0 p-0 overflow-hidden",onOpenAutoFocus:Pa,children:[g,b,C]}),e[40]=g,e[41]=b,e[42]=C,e[43]=_):_=e[43];let N;return e[44]!==_||e[45]!==u?(N=n.jsx(_s,{open:!0,onOpenChange:u,children:_}),e[44]=_,e[45]=u,e[46]=N):N=e[46],N}function Pa(t){return t.preventDefault()}const Ea={ai_budget_exhausted:{label:"chat.planRefused.budgetLabel",title:"chat.planRefused.budgetTitle"},feature_not_in_plan:{label:"chat.planRefused.featureLabel",title:"chat.planRefused.featureTitle"}};function kt(t){const e=D.c(21),{kind:s,onDismiss:o}=t,a=Q(),i=Xe(),{org:r}=Te(),{label:l,title:V}=Ea[s];let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=n.jsx(cn,{size:14}),e[0]=d):d=e[0];let u;e[1]!==l||e[2]!==a?(u=a(l),e[1]=l,e[2]=a,e[3]=u):u=e[3];let c;e[4]!==a||e[5]!==V?(c=a(V),e[4]=a,e[5]=V,e[6]=c):c=e[6];let p;e[7]!==i||e[8]!==o||e[9]!==r.slug?(p=()=>{i({to:"/$org/settings/ai-providers",params:{org:r.slug}}),o()},e[7]=i,e[8]=o,e[9]=r.slug,e[10]=p):p=e[10];let h;e[11]!==a?(h=a("chat.planRefused.seePlans"),e[11]=a,e[12]=h):h=e[12];let f;e[13]!==p||e[14]!==h?(f=n.jsx(W,{size:"sm",className:"h-7 text-xs",onClick:p,children:h}),e[13]=p,e[14]=h,e[15]=f):f=e[15];let m;return e[16]!==o||e[17]!==u||e[18]!==c||e[19]!==f?(m=n.jsx(xe,{icon:d,label:u,title:c,defaultExpanded:!0,variant:"warning",onClose:o,footerRight:f}),e[16]=o,e[17]=u,e[18]=c,e[19]=f,e[20]=m):m=e[20],m}function cs(t){const e=Ra(t);if(e!==null){const d=cs(e);return{summary:d.summary,rawDetails:d.rawDetails??t}}const s=t.trim(),o=s.startsWith("<")&&/<[a-z][\s\S]*>/i.test(s),a=/cloudflare|cf-[a-z-]+|error[\s_-]?code[\s_-]?5\d\d/i.test(s),i=/failed to fetch|networkerror|load failed|offline/i.test(s),r=/timeout|timed out|aborted|deadline/i.test(s),l=s.length>240,V=/sandbox failed to start(?::\s*(.+))?/is.exec(s);if(V){const d=V[1]?.trim().replace(/\.$/,"");return{summary:d?`Your sandbox didn't finish starting up (${d}). Try again.`:"Your sandbox didn't finish starting up. Try again.",rawDetails:t}}return a||o&&l?{summary:"Our servers are having a moment. Try sending again in a few seconds.",rawDetails:t}:i?{summary:"Lost connection. Check your network and try again.",rawDetails:t}:r?{summary:"That took longer than expected. Try again.",rawDetails:t}:o||l?{summary:"Something unexpected came back from the server. Try again.",rawDetails:t}:{summary:t,rawDetails:null}}function Ra(t){const e=t.trim();if(!e.startsWith("{"))return null;let s;try{s=JSON.parse(e)}catch{return null}if(!s||typeof s!="object")return null;const{error:o,message:a}=s,i=typeof o=="string"?o:a;return typeof i=="string"&&i.trim()&&!i.trim().startsWith("{")?i:null}const Ua={length:"chat.highlight.warningDescriptionLength","content-filter":"chat.highlight.warningDescriptionContentFilter","tool-calls":"chat.highlight.warningDescriptionToolCalls"};function Be(t){const e=D.c(29),s=Q(),{variant:o,onDismiss:a}=t,i=o==="error";let r;e[0]!==i||e[1]!==s?(r=s(i?"chat.highlight.errorOccurred":"chat.highlight.responseIncomplete"),e[0]=i,e[1]=s,e[2]=r):r=e[2];const l=r,V=i?Qn:Ms;let d;e[3]!==t.error||e[4]!==t.finishReason||e[5]!==t.variant||e[6]!==s?(d=t.variant==="error"?t.error.message:(()=>{const g=Ua[t.finishReason];return g?s(g):s("chat.highlight.responseStoppedUnexpectedly",{reason:t.finishReason})})(),e[3]=t.error,e[4]=t.finishReason,e[5]=t.variant,e[6]=s,e[7]=d):d=e[7];const u=d;let c;e[8]!==i||e[9]!==u?(c=i?cs(u):{summary:u,rawDetails:null},e[8]=i,e[9]=u,e[10]=c):c=e[10];const{summary:p,rawDetails:h}=c;let f;e[11]!==V?(f=n.jsx(V,{size:14}),e[11]=V,e[12]=f):f=e[12];let m;e[13]!==i||e[14]!==t.onContinue||e[15]!==t.onFixInChat||e[16]!==s?(m=i?n.jsx(W,{size:"sm",variant:"outline",onClick:t.onFixInChat,className:"h-7 text-xs",children:s("chat.highlight.fixInChat")}):n.jsx(W,{size:"sm",variant:"outline",onClick:t.onContinue,className:"h-7 text-xs",children:s("chat.highlight.continue")}),e[13]=i,e[14]=t.onContinue,e[15]=t.onFixInChat,e[16]=s,e[17]=m):m=e[17];let x;e[18]!==h||e[19]!==s?(x=h?n.jsxs("details",{className:"group mx-4",children:[n.jsxs("summary",{className:"flex cursor-pointer list-none items-center gap-1.5 text-xs text-muted-foreground transition-colors hover:text-foreground [&::-webkit-details-marker]:hidden",children:[n.jsx("svg",{"aria-hidden":"true",className:"size-3 transition-transform group-open:rotate-90",viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:n.jsx("path",{d:"m4.5 3 3 3-3 3"})}),n.jsx("span",{className:"group-open:hidden",children:s("chat.highlight.showTechnicalDetails")}),n.jsx("span",{className:"hidden group-open:inline",children:s("chat.highlight.hideTechnicalDetails")})]}),n.jsxs("div",{className:"relative mt-2",children:[n.jsx("button",{type:"button",onClick:()=>{navigator.clipboard.writeText(h).then(()=>Ie.success(s("chat.highlight.copiedToClipboard"))).catch(()=>Ie.error(s("chat.highlight.couldNotCopy")))},"aria-label":s("chat.highlight.copyErrorDetails"),title:s("chat.highlight.copy"),className:"absolute right-1.5 top-1.5 z-10 flex h-6 w-6 items-center justify-center rounded-lg bg-background/80 text-muted-foreground backdrop-blur-sm transition-colors hover:bg-background hover:text-foreground",children:n.jsx(dn,{className:"size-3.5"})}),n.jsx("pre",{className:"max-h-40 overflow-auto rounded-md border border-border/60 bg-background px-3 py-2 pr-8 font-mono text-xs text-foreground/80 whitespace-pre-wrap break-all",children:h})]})]}):null,e[18]=h,e[19]=s,e[20]=x):x=e[20];let v;return e[21]!==l||e[22]!==a||e[23]!==p||e[24]!==f||e[25]!==m||e[26]!==x||e[27]!==o?(v=n.jsx(xe,{icon:f,label:l,title:p,defaultExpanded:!0,variant:o,onClose:a,footerRight:m,children:x}),e[21]=l,e[22]=a,e[23]=p,e[24]=f,e[25]=m,e[26]=x,e[27]=o,e[28]=v):v=e[28],v}function Fe(t){const e=D.c(71);let s;e[0]!==t?(s=t===void 0?{}:t,e[0]=t,e[1]=s):s=e[1];const{inline:o,voiceMode:a}=s,i=o===void 0?!1:o,r=a===void 0?!1:a,l=Q(),{error:V,clearError:d,finishReason:u,clearFinishReason:c,messages:p,isStreaming:h,submit:f,sendMessage:m}=Ue(),[x,v]=ke(),{virtualMcpId:g,createTaskWithMessage:b}=et(),{chatMode:y,setChatMode:A,simpleModeTier:w}=tt(),j=Ke("credits");let k;e[2]!==y||e[3]!==w||e[4]!==g||e[5]!==r?(k=se=>({...r?{voiceMode:!0}:{},tier:w,mode:y,toolApprovalLevel:se,agent:g?{id:g}:void 0}),e[2]=y,e[3]=w,e[4]=g,e[5]=r,e[6]=k):k=e[6];const C=k;let _;e[7]!==x.toolApprovalLevel?(_=x.toolApprovalLevel??Ds(),e[7]=x.toolApprovalLevel,e[8]=_):_=e[8];const N=_,T=p.at(-1),I=T?.role==="assistant"?T.parts:[],E=I.filter(za),F=I.filter(Mt),O=Xt(I),M=Jt(I);let K;e[9]!==V||e[10]!==m||e[11]!==l?(K=()=>{if(V){const me={type:"doc",content:[{type:"paragraph",content:[{type:"text",text:l("chat.highlight.fixInChatMessage",{error:V.message})}]}]};m(me)}},e[9]=V,e[10]=m,e[11]=l,e[12]=K):K=e[12];const q=K;let Z;e[13]!==m||e[14]!==l?(Z=()=>{const se={type:"doc",content:[{type:"paragraph",content:[{type:"text",text:l("chat.highlight.pleaseContinue")}]}]};m(se)},e[13]=m,e[14]=l,e[15]=Z):Z=e[15];const U=Z;let Y;e[16]!==C||e[17]!==N||e[18]!==f?(Y=(se,me)=>{f({kind:"toolOutput",toolCallId:se.toolCallId,output:{response:me}},C(N))},e[16]=C,e[17]=N,e[18]=f,e[19]=Y):Y=e[19];const P=Y;let G;e[20]!==C||e[21]!==N||e[22]!==f?(G=(se,me)=>{f({kind:"toolOutput",toolCallId:se.toolCallId,output:{accepted:me}},C(N))},e[20]=C,e[21]=N,e[22]=f,e[23]=G):G=e[23];const ne=G;let H;e[24]!==b||e[25]!==x||e[26]!==A||e[27]!==v||e[28]!==l||e[29]!==g?(H=se=>{A("default"),v({...x,toolApprovalLevel:"auto"}),b({virtualMcpId:g,message:{parts:[{type:"text",text:l("chat.highlight.implementPlanMessage",{plan:se})}]}})},e[24]=b,e[25]=x,e[26]=A,e[27]=v,e[28]=l,e[29]=g,e[30]=H):H=e[30];const re=H,S=Oa;let L;e[31]!==C||e[32]!==f?(L=(se,me,Le,Oe)=>{f({kind:"approval",approvalId:se,approved:me,...Le?{reason:Le}:{}},C(Oe))},e[31]=C,e[32]=f,e[33]=L):L=e[33];const J=L,$=es();if($.isCreditExhausted){let se;return e[34]!==j||e[35]!==d||e[36]!==i?(se=j?n.jsx(Ma,{onDismiss:d}):n.jsx("div",{className:z(!i&&"absolute bottom-full left-0 right-0"),children:n.jsx(kt,{kind:"ai_budget_exhausted",onDismiss:d})}),e[34]=j,e[35]=d,e[36]=i,e[37]=se):se=e[37],se}const{showError:ee,showWarning:ie,hasApprovals:ce}=$,ae=E.map(La).join("|"),pe=Zt(O)?.toolCallId??"",Ve=M.map(Fa).join("|"),Ce=!i&&"absolute bottom-full left-0 right-0";let de;e[38]!==Ce?(de=z(Ce),e[38]=Ce,e[39]=de):de=e[39];let he;e[40]!==$.todos?(he=n.jsx(wa,{todos:$.todos}),e[40]=$.todos,e[41]=he):he=e[41];let le;e[42]!==d||e[43]!==$.planRefusal?(le=$.planRefusal&&n.jsx(kt,{kind:$.planRefusal,onDismiss:d}),e[42]=d,e[43]=$.planRefusal,e[44]=le):le=e[44];let ue;e[45]!==d||e[46]!==V||e[47]!==q||e[48]!==ee?(ue=ee&&n.jsx(Be,{variant:"error",error:V,onDismiss:d,onFixInChat:q}),e[45]=d,e[46]=V,e[47]=q,e[48]=ee,e[49]=ue):ue=e[49];let fe;e[50]!==c||e[51]!==u||e[52]!==U||e[53]!==ie?(fe=ie&&n.jsx(Be,{variant:"warning",finishReason:u,onDismiss:c,onContinue:U}),e[50]=c,e[51]=u,e[52]=U,e[53]=ie,e[54]=fe):fe=e[54];const _e=ce&&n.jsx(aa,{approvals:M,isStreaming:h,onRespond:J},Ve),ve=$.hasPlans&&n.jsx(ra,{plans:O,isStreaming:h,onApprove:re,onDismiss:S},pe),De=$.hasTaskSuggestion&&n.jsx(ya,{parts:F,isStreaming:h,onRespond:ne},F.at(-1)?.toolCallId??"");let ye;e[55]!==$.isWaitingForUserInput||e[56]!==P||e[57]!==h||e[58]!==ae||e[59]!==E?(ye=$.isWaitingForUserInput&&n.jsx(Vs,{userAskParts:E,isStreaming:h,onSubmit:P},ae),e[55]=$.isWaitingForUserInput,e[56]=P,e[57]=h,e[58]=ae,e[59]=E,e[60]=ye):ye=e[60];let je;return e[61]!==de||e[62]!==he||e[63]!==le||e[64]!==ue||e[65]!==fe||e[66]!==_e||e[67]!==ve||e[68]!==De||e[69]!==ye?(je=n.jsxs("div",{className:de,children:[he,le,ue,fe,_e,ve,De,ye]}),e[61]=de,e[62]=he,e[63]=le,e[64]=ue,e[65]=fe,e[66]=_e,e[67]=ve,e[68]=De,e[69]=ye,e[70]=je):je=e[70],je}function Fa(t){return t.approvalId}function La(t){return t.toolCallId}function Oa(){document.querySelector("[data-chat-input]")?.focus()}function za(t){return t.type==="tool-user_ask"}Fe.Error=function(e){return n.jsx(Be,{variant:"error",error:e.error,onDismiss:e.onDismiss,onFixInChat:e.onFixInChat})};Fe.Warning=function(e){return n.jsx(Be,{variant:"warning",finishReason:e.finishReason,onDismiss:e.onDismiss,onContinue:e.onContinue})};Fe.UserAskQuestion=Vs;function ds(t){const e=D.c(8),{taskId:s}=t,o=Q(),a=An(s),i=yn(a),r=jn(),{stop:l,removeLocalMessage:V}=Ue();if(i.length===0)return null;const d="mb-2 flex flex-col items-end gap-3 px-2.5";let u;e[0]!==r||e[1]!==V||e[2]!==l||e[3]!==o||e[4]!==s?(u=(h,f)=>n.jsxs("div",{className:"flex max-w-[85%] flex-col items-end",children:[n.jsx("div",{className:"min-w-0 rounded-2xl border border-dashed border-border px-4 py-2.5 text-sm wrap-break-word text-muted-foreground",children:h.text}),n.jsxs("div",{className:"mt-1 flex items-center gap-1 text-sm text-muted-foreground",children:[n.jsx("span",{className:"mr-1 select-none",children:new Date(h.enqueuedAt).toLocaleTimeString(void 0,{hour:"numeric",minute:"2-digit"})}),f===0&&n.jsxs(W,{type:"button",variant:"ghost",size:"sm",className:"h-6 gap-1 px-1.5 text-xs text-muted-foreground",onClick:()=>{l()},children:[n.jsx(zt,{size:12}),o("chat.queueTray.sendNow")]}),n.jsx(W,{type:"button",variant:"ghost",size:"icon-sm",className:"size-6 text-muted-foreground",title:o("chat.queueTray.removeFromQueue"),"aria-label":o("chat.queueTray.removeFromQueue"),onClick:()=>{r.cancel(s,h.messageId).then(m=>{m&&(wn(s,h.messageId),V(h.messageId))})},children:n.jsx(Ft,{className:"size-3.5"})})]})]},h.messageId),e[0]=r,e[1]=V,e[2]=l,e[3]=o,e[4]=s,e[5]=u):u=e[5];const c=i.map(u);let p;return e[6]!==c?(p=n.jsx("div",{className:d,children:c}),e[6]=c,e[7]=p):p=e[7],p}function us(t){const e=D.c(3),[s]=ke();let o;return e[0]!==s.enableSounds||e[1]!==t?(o=()=>{s.enableSounds&&vo(t.dataUri).catch(i=>{console.warn(`[sound] ${t.name} playback failed:`,i)})},e[0]=s.enableSounds,e[1]=t,e[2]=o):o=e[2],o}const Ba={name:"switch-005",dataUri:"data:audio/mpeg;base64,SUQzBAAAAAAAIlRTU0VAAAAOAAADTGF2ZjYyLjMuMTAwAAAAAAAAAAAAAAD/+1DAAAAAAAAAAAAAAAAAAAAAAABJbmZvAAAADwAAABkAABU4ABMTEx0dHR0nJycnMTExMTs7OztERERETk5OTlhYWFhiYmJibGxsbHZ2dnZ/f39/iYmJiZOTk5OdnZ2dp6enp7GxsbG7u7u7xMTExM7Ozs7Y2NjY4uLi4uzs7Oz29vb2/////wAAAABMYXZjNjIuMTEAAAAAAAAAAAAAAAAkBVYAAAAAAAAVOPCP8KUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA//tQxAAACEwDXvQRAAG8Ii93HtACUCAABAKCJwfaCEHwfeoEAQdEAYygIHBOCAIAgCAJh9QIOg+D5/ygPh/wfB8DuKAgCHyn9QPh/5SCDv+CEHAQdxOD4B27c39tbckkqYbBAYAN9bNJLB+aXAf5wQAKdzxfbmrVIRQ4xNx3HwnoDmLhfMhgJiiw/HREXNCHqjvHEPEG8QjBYlxQNepJAT0kC8ip6JzSWj1TasoG+iyycbf2Uil1ovf1f/oUtR1qP+s1WSBFKoAAU02BDjMhuP/7UsQEgws8bRpd8YABJYPeBf9wCGXTGxBYcw5AJFMFMAmQQAhGAxgLBgHIAMYAAALhgAchipbe/91aU1VV4zcZj1Vf1XgYCIMBNrsBAIGs9/Ue4i/xFPeqCqwViI9/UeLf///rOngdA3OPHFjmOBv+EQnGahgaZxVplmkAH5JadDTQlNCEuGNiWYbCCONWdUJg6HXNazFdu1T+VgaEpOP70exv7f2/4b/yH//2/4cqCX/zWRUrIw+IPNMNlDnjAXQas/I4AzmYifA0tMSCgQDF//tSxBCDSzzi3k/sQwEyCtjJ/rBZAk+Uqj1YhA5YMCAAMwgOUchTkK7OR7LbMl0W1H6SvzG0Q2ZzfKUhnmTobv9DNhS1v7P8h//8Gv8gTRt1jReZ7YEjmMQg9hhwwMycHooasFmZyjcZGBKJD+IwbMCQQLoi+IQXCcIoydKoilI2MWFS5uJdDEu2taRrYI2ZSqKY50pJLv2NfjUAAuQAMfqVQ/T3PDQgMJMeEZ45hJzY6MNoFMxqTj1zNGQKJjAxEsSCBgQJBSIL0mcKYQJfVAn/+1LEGwLKlEKrD3MiYcuMkVa/wABB8Vh6M1q1epbvXwWBURhkyEhWZ/////////////9gjZ/Wt4w+4MNMCpE4TBYQl4w1IHvMDdA2zBngBMwc8COMDhCpDAfgOAAgrBgNYU+YC0FBGAkAMpgWoSCYAGESGBGAKBgXgJOdiOJmMCmNwCYNDJhYRPykRCJhTBnEUzlsjv4UNLj/z97n3Mv/7z1nZqyitYAZIqErIwMwJAqEw0GAAMFptJMaqFwB8CQIWlhuhuDAwNjfuwrQFAYXCf/7UsQVAA+9PTP42gYRdiIu9zBwAPbFUCi0DAhgNcS+7cDwVgM05A9bUDeuQMyE/u3CygVISgZhpIau/9PhdQG2C9DpxZZJmn/dn/Psmt0EFm////l84ThUTopE4VD/9JkubOGasTvN30C20G21qgUCkVCoUCgPMywrPCGly27V5q5t24vl/8jSlSAPCxzNseNCw3oh3NGBu4BZJ5hv7DRSfR/+eWG7nA8IKh2Olv5iz3q5m3//Joxo3JqNyYkSuGt/k6D4DeoBOHmHdl0dkZYA//tSxAUAC4B1Z/2DADEcA17Z/uhI4Yoik/TrZo+ww7UtmpW4LDWu2IacoJKJJeTSM+ZmAYBEiU+ZnnAwCn1VVVV6JUJQVnioKhrgqdKgqGpUFeCp0sDR3ztQNREDRUFioKuxKCpYGQBlRIBk+aLwb8KblGQVDdphPYTUdBOGbVpAaTF6ZdjEV0iRUZRCYkA4oUQDx5zqDugtXvza/7fuNNvfZ+j9v+T/2f//J/4cAAOTpE5K4zksR9MfIB+TDcQTI4gNs1XKAzEFUrGkxABYEBb/+1LEEYNKrEjgT/TCwYYVmUX+mHoKgWhKU5Eiw9SFIRmppw+3fYo4siPhUFeexM8KgIO6wVuPDDy01qeRaVbw357//y3+o8M0pBNlNLCGBzGKwyYw2IIFOE1WNTjRM6x8MlA1AxDhUHTAkEiyKpnbWrLcaOBotBUKbk1pypcWDAIK00AhKLGkUco6q9VWvM53mcaq3tVa8zjTM/tX//EDP//////////XAAmrwAAPoKwcw0ShDCZD/BQlhzinxQdorsOuXTEIC01ZkJyu4k/qPP/7UsQUAEjkrrkvZaPBIRXUoe5QObfMhYKX9RVgTPqCSCaSCaSC0XVdV1f/////6IAlguuAJSiDRNloNBsZg+0+Ts8MMCn81WUTRAlIi+GHECD0y8AWDIqswYsxGOSKVV7MqOni8tkVOip0fZX/////9HrMCbAz2EHGS4GKAAiRAAAYAcDdKd4G6Z/nwYgJ0ZAIgZyC8aPAs/iPBhwMpWDQNARltNS5Y61v//9i8Yl4SkFkIGTkAc0UBrIYLPA4MYBEy+YLMRuY4nhTC3hZA68H//tSxCoAyQC6mY6CkWDJBIsBz/QUrgNmahSzcrYw0/HhfnMAZBojDsgTFkDR5MDkG/DZEbk2FCmowqdqv2TYABiJwqqYjaQRGZ1URZ1DhSsdiHX/GBu0QpzIBNSaLqZ0ARkwFARxMrpt/Eh47mbQAhhU6sisFUxBTUUzLjEwMFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVX/+1LESoHHJCRaj/dmYAIAQAAQAARVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVTEFNRTMuMTAwVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVf/7UsSLg8AAAaQAAAAgAAA0gAAABFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVTEFNRTMuMTAwVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//tSxKGDwAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//tSxKGDwAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//tSxKGDwAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVX/+1LEoYPAAAGkAAAAIAAANIAAAARVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVUxBTUUzLjEwMFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVf/7UsShg8AAAaQAAAAgAAA0gAAABFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVTEFNRTMuMTAwVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//tSxKGDwAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVX/+1LEoYPAAAGkAAAAIAAANIAAAARVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVUxBTUUzLjEwMFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//tSxKGDwAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//tSxKGDwAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//tSxKGDwAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//tSxKGDwAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//tSxKGDwAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV",duration:.609,format:"mp3",license:"CC0",author:"Kenney"},$a=Bs.togglePlanMode.keys.map(t=>t==="Shift"?"⇧":t).join(""),Ka=[{src:"/connections/gmail.png",name:"Gmail"},{src:"/connections/perplexity.png",name:"Perplexity"},{src:"/connections/github.png",name:"GitHub"}];function qa(){const t=D.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx("div",{className:"flex items-center -space-x-1.5",children:Ka.map(Qa)}),t[0]=e):e=t[0],e}function Qa(t){return n.jsx("img",{src:t.src,alt:t.name,className:"size-5 rounded-sm ring-1 ring-border object-cover bg-white"},t.name)}function Wa({disabled:t,onOpenConnections:e,virtualMcpId:s,selectedModel:o,isStreaming:a,onUnsupportedFile:i}){const r=Q(),[l,V]=R.useState(!1),d=us(Ba),{org:u}=Te(),{editor:c}=Pt(),p=R.useRef(null),h=at(o),f=()=>{!h||a||(V(!1),p.current?.click())},m=async S=>{const L=S.target.files;if(!L||L.length===0||!c)return;const J=Array.from(L);try{let $=c.state.selection.from;for(const ee of J)await Gt(c,o??null,ee,$,i,r),$=c.state.selection.to}finally{p.current&&(p.current.value="")}},x=mo({connectionId:s,orgId:u.id,orgSlug:u.slug}),v=Ps.virtualMcpPrompts(s,u.id),{data:g,isLoading:b}=Es({queryKey:v,queryFn:()=>go(x),staleTime:6e4,enabled:l&&!!x}),y=g?.prompts??[],[A,w]=R.useState(null),{chatMode:j,setChatMode:k}=tt(),[C,_]=ke(),N=Lt()?.lockedHarness!=="claude-code",T=we.find(S=>S.value===C.toolApprovalLevel)??we[0],I=r(T.shortKey),E=S=>{const L=we.find(J=>J.value===S);if(L){if(L.value===C.toolApprovalLevel){V(!1);return}d(),X("chat_approval_level_changed",{from_level:C.toolApprovalLevel,to_level:L.value,source:"tools_popover"}),_({...C,toolApprovalLevel:L.value}),V(!1)}},F=j==="plan",O=()=>{d();const S=F?"default":"plan";X("chat_mode_changed",{from_mode:j,to_mode:S,source:"tools_popover"}),k(S),V(!1)},M=()=>{e(),V(!1)},K=async(S,L)=>{if(!c||!x)return;const J=mt(S._meta),$={from:c.state.selection.from,to:c.state.selection.to};try{const ee=await xo(x,S.name,L);an(c,$,{id:S.name,name:ro(S.name,J),metadata:ee.messages,char:"/",kind:"prompt",args:L})}catch{Ie.error(r("chat.toolsPopover.failedLoadPrompt"))}},q=async S=>{V(!1);const L=!!(S.arguments&&S.arguments.length>0);if(X("chat_prompt_inserted",{prompt_name:S.name,with_arguments:L}),L){w(S);return}await K(S)},Z=async S=>{A&&(await K(A,S),w(null))},U=()=>{d();const S=j==="gen-image"?"default":"gen-image";X("chat_mode_changed",{from_mode:j,to_mode:S,source:"tools_popover"}),k(S),V(!1)},Y=()=>{d();const S=j==="web-search"?"default":"web-search";X("chat_mode_changed",{from_mode:j,to_mode:S,source:"tools_popover"}),k(S),V(!1)},P=()=>{d();const S=j==="deep-research"?"default":"deep-research";X("chat_mode_changed",{from_mode:j,to_mode:S,source:"tools_popover"}),k(S),V(!1)},G=j==="gen-image",ne=j==="web-search",H=j==="deep-research",re=n.jsx("input",{ref:p,type:"file",multiple:!0,accept:Vo(o??null),className:"hidden",onChange:m,disabled:a});return n.jsxs(n.Fragment,{children:[re,n.jsxs(Rs,{open:l,onOpenChange:S=>{S&&!l&&X("chat_tools_popover_opened",{chat_mode:j}),V(S)},children:[n.jsx(Us,{asChild:!0,children:n.jsxs(W,{type:"button",variant:"ghost",size:"default",disabled:t,title:r("chat.toolsPopover.tools"),"aria-label":r("chat.toolsPopover.tools"),className:z("text-muted-foreground hover:text-foreground transition-[gap] duration-200 shrink min-w-0","gap-0 @[480px]/chat-bottom:gap-1.5"),children:[n.jsx(un,{size:14}),n.jsx("span",{className:z("min-w-0 truncate transition-[max-width,opacity] duration-200 ease-out max-w-0 opacity-0","@[480px]/chat-bottom:max-w-24 @[480px]/chat-bottom:opacity-100"),children:r("chat.toolsPopover.tools")})]})}),n.jsxs(Fs,{align:"start",className:"w-56 p-1.5 space-y-1",children:[h?n.jsxs(be,{onClick:f,disabled:a,children:[n.jsx(gt,{size:16}),n.jsx("span",{className:"flex-1",children:r("chat.toolsPopover.addFile")})]}):n.jsxs(Yt,{children:[n.jsx(Qt,{asChild:!0,children:n.jsxs(be,{"aria-disabled":"true",className:"opacity-50 cursor-not-allowed",onSelect:S=>S.preventDefault(),children:[n.jsx(gt,{size:16}),n.jsx("span",{className:"flex-1",children:r("chat.toolsPopover.addFile")})]})}),n.jsx(Wt,{side:"right",children:r("chat.toolsPopover.modelNoFileSupport")})]}),n.jsxs(be,{onClick:O,className:z(F&&"text-special"),children:[n.jsx(Bt,{size:16,className:z(F&&"text-special")}),n.jsx("span",{className:"flex-1 whitespace-nowrap",children:r("chat.toolsPopover.planMode")}),n.jsx("span",{className:z("text-xs text-muted-foreground",F&&"text-special font-medium"),children:$a})]}),n.jsxs(be,{onClick:U,className:z(G&&"text-special"),children:[n.jsx($t,{size:16,className:z(G&&"text-special")}),n.jsx("span",{className:"flex-1",children:r("chat.toolsPopover.createImage")}),G&&n.jsx("span",{className:"text-xs text-special font-medium",children:r("chat.toolsPopover.on")})]}),n.jsxs(be,{onClick:Y,className:z(ne&&"text-special"),children:[n.jsx(Rt,{size:16,className:z(ne&&"text-special")}),n.jsx("span",{className:"flex-1",children:r("chat.toolsPopover.webSearch")}),ne&&n.jsx("span",{className:"text-xs text-special font-medium",children:r("chat.toolsPopover.on")})]}),n.jsxs(be,{onClick:P,className:z(H&&"text-special"),children:[n.jsx(Ut,{size:16,className:z(H&&"text-special")}),n.jsx("span",{className:"flex-1",children:r("chat.toolsPopover.deepResearch")}),H&&n.jsx("span",{className:"text-xs text-special font-medium",children:r("chat.toolsPopover.on")})]}),n.jsxs(ct,{children:[n.jsxs(dt,{className:"gap-2",children:[n.jsx("span",{className:"flex size-4 items-center justify-center text-base font-medium text-muted-foreground",children:"/"}),n.jsx("span",{className:"flex-1",children:r("chat.toolsPopover.prompts")})]}),n.jsx(ut,{className:"w-80 max-h-72 overflow-y-auto p-1.5",children:b?n.jsxs("div",{className:"flex items-center gap-2 px-2 py-3 text-sm text-muted-foreground",children:[n.jsx(Ls,{className:"size-3.5"}),r("chat.toolsPopover.loadingPrompts")]}):y.length===0?n.jsx("div",{className:"px-2 py-3 text-sm text-muted-foreground",children:r("chat.toolsPopover.noPromptsAvailable")}):y.map(S=>n.jsxs(be,{onClick:()=>q(S),className:"flex flex-col items-start gap-0.5",children:[n.jsx("span",{className:"font-medium text-sm capitalize",children:S.title||io(S.name,mt(S._meta))}),S.description&&n.jsx("span",{className:"text-xs text-muted-foreground line-clamp-2",children:S.description})]},S.name))})]}),N&&n.jsxs(ct,{children:[n.jsxs(dt,{className:"gap-2",children:[n.jsx($e,{size:16}),n.jsx("span",{className:"flex-1",children:r("chat.toolsPopover.approval")}),n.jsx("span",{className:"text-xs text-muted-foreground",children:I})]}),n.jsx(ut,{className:"w-48 p-1.5",children:n.jsx(Os,{value:C.toolApprovalLevel,onValueChange:E,children:we.map(S=>n.jsx(zs,{value:S.value,children:r(S.labelKey)},S.value))})})]}),n.jsxs(be,{onClick:M,children:[n.jsx(pn,{size:16}),n.jsx("span",{className:"flex-1",children:r("chat.toolsPopover.connections")}),n.jsx(R.Suspense,{children:n.jsx(qa,{})})]})]})]}),n.jsx(on,{prompt:A,setPrompt:w,onSubmit:Z})]})}const Ya=[{src:"/connections/github.png",name:"GitHub"},{src:"/connections/gmail.png",name:"Gmail"},{src:"/connections/linear.png",name:"Linear"},{src:"/connections/shopify.png",name:"Shopify"},{src:"/connections/firecrawl.png",name:"Firecrawl"},{src:"/connections/perplexity.png",name:"Perplexity"}];function Ga(){const t=D.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx("div",{className:"flex items-center -space-x-1",children:Ya.map(Ha)}),t[0]=e):e=t[0],e}function Ha(t){return n.jsx("img",{src:t.src,alt:t.name,className:"size-5 rounded-sm ring-2 ring-muted object-cover bg-white"},t.name)}function Ja(t){const e=D.c(10),{onClick:s}=t,o=Q();let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=z("group relative z-10 flex items-center gap-3 w-full px-4 py-3","rounded-b-2xl","cursor-pointer"),e[0]=a):a=e[0];let i;e[1]!==o?(i=o("chat.connectionsBanner.description"),e[1]=o,e[2]=i):i=e[2];let r;e[3]!==i?(r=n.jsx("p",{className:"flex-1 text-xs text-muted-foreground truncate text-left",children:i}),e[3]=i,e[4]=r):r=e[4];let l,V;e[5]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx(Ga,{}),V=n.jsx($s,{size:14,className:"shrink-0 text-muted-foreground/60 group-hover:text-muted-foreground transition-colors"}),e[5]=l,e[6]=V):(l=e[5],V=e[6]);let d;return e[7]!==s||e[8]!==r?(d=n.jsxs("button",{type:"button",onClick:s,className:a,children:[r,l,V]}),e[7]=s,e[8]=r,e[9]=d):d=e[9],d}function Za(t){const e=D.c(4),{data:s}=t;let o;e[0]!==s?(o=s.map(Xa),e[0]=s,e[1]=o):o=e[1];let a;return e[2]!==o?(a=n.jsx("div",{className:"flex items-center justify-center gap-[2px] h-10 overflow-hidden","aria-hidden":"true",children:o}),e[2]=o,e[3]=a):a=e[3],a}function Xa(t,e){return n.jsx("div",{className:"w-[2px] shrink-0 rounded-full bg-chart-2 transition-[height] duration-75 ease-out",style:{height:`${Math.max(4,Math.round(t*40))}px`}},e)}const Pe=12e3,Ct=oe({token:te(),expiresAt:qs()});Qs("provider",[oe({provider:Ae("elevenlabs"),conversationToken:te().min(1)}),oe({provider:Ae("openai"),transport:Ae("webrtc")})]);const ei=Ks([Ct.extend({provider:Ae("elevenlabs").default("elevenlabs"),conversationToken:te().min(1)}),Ct.extend({provider:Ae("openai"),transport:Ae("webrtc")})]);oe({token:te().min(1).max(4096),text:te().trim().min(1).max(Pe)});const ps=oe({request:te().trim().min(1).max(Pe)}),Je=5e3;Tt(oe({role:Re(["user","agent"]),text:te().min(1).max(Je)})).max(60).refine(t=>t.reduce((e,s)=>e+s.text.length,0)<=Je,{message:"Voice transcript is too long"});function pr(t){const e=[];let s=Je;for(const o of t.slice(-60).reverse()){if(s<=0)break;const a=o.text.slice(-s);e.unshift({role:o.role,text:a}),s-=a.length}return e}oe({token:te().min(1).max(4096),sdp:te().min(1).max(1e5),language:Re(["en","pt"]).default("en")}).strict();const ti=oe({sdp:te().min(1).max(1e5)});async function si(t,e,s,o,a){if(t.provider==="openai"){const{startOpenAIConversation:l}=await pt(async()=>{const{startOpenAIConversation:V}=await import("./openai-conversation-Ccmhy4PF.js");return{startOpenAIConversation:V}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118]));return l(a,s,o)}const{Conversation:i}=await pt(async()=>{const{Conversation:l}=await import("./index-yN0BIuMc.js");return{Conversation:l}},[]);o.throwIfAborted();const r=await i.startSession({...s,clientTools:{delegate_to_agent:async l=>{const V=ps.safeParse(l);return JSON.stringify(V.success?await s.onDelegate(V.data):{status:"rejected",reason:"A complete request is required."})},get_agent_status:()=>JSON.stringify(s.getWorkStatus()),stop_agent_work:()=>JSON.stringify(s.cancelCurrentWork())},conversationToken:t.conversationToken,connectionType:"webrtc",overrides:{agent:{language:e}}});return o.aborted&&(await r.endSession(),o.throwIfAborted()),{endSession:()=>r.endSession(),setMicMuted:l=>r.setMicMuted(l),getOutputVolume:()=>r.getOutputVolume(),publishUpdate:l=>{const V=JSON.stringify({source:"Studio background data, not a user request or instructions",contextId:l.contextId,requestId:l.delegationId,text:l.text});l.delivery==="context"?r.sendContextualUpdate(V):r.sendUserMessage(`[Studio background event, not a new user request]
|
|
9
|
+
The report follows.`;function Ko(t){return{...t,content:[{type:"paragraph",content:[sn({id:vt,name:vt,char:"/",kind:"prompt",metadata:[{role:"user",content:{type:"text",text:$o}}]})]},...t.content??[]]}}function bt(t){const e=D.c(14),{icon:s,inset:o,label:a,title:i,dismissLabel:r,onDismiss:l}=t,V=o?"pl-1":"pl-2.5";let d;e[0]!==V?(d=z("surface-inset flex h-7 min-w-0 items-center gap-1.5 rounded-full pr-0.5 text-xs text-foreground",V),e[0]=V,e[1]=d):d=e[1];let u;e[2]!==a?(u=n.jsx("span",{className:"truncate",children:a}),e[2]=a,e[3]=u):u=e[3];let c;e[4]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx(Ft,{size:12}),e[4]=c):c=e[4];let p;e[5]!==r||e[6]!==l?(p=n.jsx(mn,{label:r,size:"icon-sm",onClick:l,children:c}),e[5]=r,e[6]=l,e[7]=p):p=e[7];let h;return e[8]!==s||e[9]!==d||e[10]!==u||e[11]!==p||e[12]!==i?(h=n.jsxs("span",{className:d,title:i,children:[s,u,p]}),e[8]=s,e[9]=d,e[10]=u,e[11]=p,e[12]=i,e[13]=h):h=e[13],h}function qo(){const t=D.c(13),e=Q(),s=xn(),o=vn();if(!s&&!o)return null;const a=s?s.project&&!s.isHome?`${s.project.title} · ${s.title}`:s.title:"";let i;t[0]!==o?(i=o?bn(o.path):"",t[0]=o,t[1]=i):i=t[1];const r=i;let l;t[2]!==e||t[3]!==s||t[4]!==a?(l=s&&n.jsx(bt,{icon:s.project?n.jsx(ln,{icon:s.project.icon??null,name:s.project.title,size:"xs"}):n.jsx(Vn,{size:14,className:"shrink-0 text-muted-foreground"}),inset:!!s.project,label:a,title:e("chat.input.viewContext",{name:a}),dismissLabel:e("chat.input.viewDismiss"),onDismiss:s.dismiss}),t[2]=e,t[3]=s,t[4]=a,t[5]=l):l=t[5];let V;t[6]!==r||t[7]!==o||t[8]!==e?(V=o&&n.jsx(bt,{icon:n.jsx(gn,{filename:r,className:"h-4 w-3 shrink-0"}),label:r,title:e("chat.input.openFileContext",{name:r}),dismissLabel:e("chat.input.openFileDismiss"),onDismiss:o.dismiss}),t[6]=r,t[7]=o,t[8]=e,t[9]=V):V=t[9];let d;return t[10]!==l||t[11]!==V?(d=n.jsxs("div",{className:"flex min-w-0 flex-wrap gap-1.5 px-3 pt-3",children:[l,V]}),t[10]=l,t[11]=V,t[12]=d):d=t[12],d}function Qo(t){return{autosend:In,sidepanel:!0,...t?{mainpanel:!1}:{}}}function Wo(t){const e=D.c(30),{current:s,total:o,onPrev:a,onNext:i}=t,r=Q();if(o<=1)return null;const l=s===0,V=s===0?"opacity-30 cursor-not-allowed":"hover:text-foreground cursor-pointer";let d;e[0]!==V?(d=z("p-0.5 transition-colors rounded-lg",V),e[0]=V,e[1]=d):d=e[1];let u;e[2]!==r?(u=r("chat.pagination.previousLabel"),e[2]=r,e[3]=u):u=e[3];let c;e[4]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx(Xn,{size:14}),e[4]=c):c=e[4];let p;e[5]!==a||e[6]!==l||e[7]!==d||e[8]!==u?(p=n.jsx("button",{type:"button",onClick:a,disabled:l,className:d,"aria-label":u,children:c}),e[5]=a,e[6]=l,e[7]=d,e[8]=u,e[9]=p):p=e[9];const h=s+1;let f;e[10]!==r||e[11]!==h||e[12]!==o?(f=r("chat.pagination.counter",{current:h,total:o}),e[10]=r,e[11]=h,e[12]=o,e[13]=f):f=e[13];let m;e[14]!==f?(m=n.jsx("span",{className:"tabular-nums text-xs",children:f}),e[14]=f,e[15]=m):m=e[15];const x=s===o-1,v=s===o-1?"opacity-30 cursor-not-allowed":"hover:text-foreground cursor-pointer";let g;e[16]!==v?(g=z("p-0.5 transition-colors rounded-lg",v),e[16]=v,e[17]=g):g=e[17];let b;e[18]!==r?(b=r("chat.pagination.nextLabel"),e[18]=r,e[19]=b):b=e[19];let y;e[20]===Symbol.for("react.memo_cache_sentinel")?(y=n.jsx(Ot,{size:14}),e[20]=y):y=e[20];let A;e[21]!==i||e[22]!==x||e[23]!==g||e[24]!==b?(A=n.jsx("button",{type:"button",onClick:i,disabled:x,className:g,"aria-label":b,children:y}),e[21]=i,e[22]=x,e[23]=g,e[24]=b,e[25]=A):A=e[25];let w;return e[26]!==A||e[27]!==p||e[28]!==m?(w=n.jsxs("div",{className:"flex items-center gap-1 text-sm text-muted-foreground",children:[p,m,A]}),e[26]=A,e[27]=p,e[28]=m,e[29]=w):w=e[29],w}function ts(t){const e=D.c(8),{currentIndex:s,total:o,onPrev:a,onNext:i,extraLeft:r}=t;let l;e[0]!==s||e[1]!==i||e[2]!==a||e[3]!==o?(l=n.jsx(Wo,{current:s,total:o,onPrev:a,onNext:i}),e[0]=s,e[1]=i,e[2]=a,e[3]=o,e[4]=l):l=e[4];let V;return e[5]!==r||e[6]!==l?(V=n.jsxs("div",{className:"flex items-center gap-2",children:[l,r]}),e[5]=r,e[6]=l,e[7]=V):V=e[7],V}function Yo(t){const e=D.c(17),{isStreaming:s,isAllAnswered:o,isCurrentAnswered:a,onAdvanceOrSubmit:i,submitLabel:r,nextLabel:l}=t,u=o?r===void 0?"Submit":r:l===void 0?"Next":l,c=o?s:!a,p=c?o?"Waiting for the assistant to finish…":"Answer this item to continue":null;let h;e[0]!==c||e[1]!==i?(h=()=>{c||i()},e[0]=c,e[1]=i,e[2]=h):h=e[2];const f=c&&"opacity-50 cursor-not-allowed";let m;e[3]!==f?(m=z("h-7 px-2.5 text-xs",f),e[3]=f,e[4]=m):m=e[4];let x;e[5]!==c||e[6]!==u||e[7]!==h||e[8]!==m?(x=n.jsx(W,{type:"button",size:"sm","aria-disabled":c,onClick:h,className:m,children:u}),e[5]=c,e[6]=u,e[7]=h,e[8]=m,e[9]=x):x=e[9];const v=x;if(!p)return v;let g;e[10]!==v?(g=n.jsx(Qt,{asChild:!0,children:v}),e[10]=v,e[11]=g):g=e[11];let b;e[12]!==p?(b=n.jsx(Wt,{children:p}),e[12]=p,e[13]=b):b=e[13];let y;return e[14]!==g||e[15]!==b?(y=n.jsxs(Yt,{children:[g,b]}),e[14]=g,e[15]=b,e[16]=y):y=e[16],y}function ss(t,e,s){return t.findIndex(o=>e(o)===s)}function At(t,e,s,o){return t.length===0?!1:t.every(a=>o(s[e(a)]))}function yt(t,e,s,o,a){if(t.length===0)return null;const i=ss(t,e,a);for(let r=1;r<=t.length;r++){const l=t[(i+r)%t.length];if(!l)continue;const V=e(l);if(V!==a&&!o(s[V]))return V}return null}function Go(t){return!t.isStreaming&&t.allAnswered}function ns(t){const{parts:e,partKey:s,schema:o,defaultValues:a,isStreaming:i,hasAnswer:r,onSubmit:l}=t,V=e[0]?s(e[0]):"",[d,u]=R.useState(V),[c,p]=R.useState(!1),h=xs({resolver:vs(o),defaultValues:a}),f=h.watch(),m=ss(e,s,d),x=m>=0?e[m]:void 0,v=r(f[d]),g=At(e,s,f,r),b=Go({isStreaming:i,allAnswered:g}),y=()=>{if(m>0){const N=e[m-1];N&&u(s(N))}},A=()=>{if(m>=0&&m<e.length-1){const N=e[m+1];N&&u(s(N))}},w=()=>{const N=h.getValues(),T=yt(e,s,N,r,d);T&&u(T)},j=()=>{h.handleSubmit(N=>{const T=N;for(const I of e)l(I,T[s(I)])})()},k=R.useRef(j);k.current=j;const C=()=>{b&&(p(!1),k.current())},_=()=>{const N=h.getValues();if(At(e,s,N,r)){if(i){p(!0);return}p(!1),k.current()}else{const T=yt(e,s,N,r,d);T&&u(T)}};return R.useEffect(()=>{if(c&&!i){if(!g){p(!1);return}p(!1),k.current()}},[c,i,g]),{form:h,activeKey:d,setActiveKey:u,currentIndex:m,currentPart:x,isCurrentAnswered:v,isAllAnswered:g,canSubmit:b,goPrev:y,goNext:A,advanceToNextUnanswered:w,submit:C,submitOrAdvance:_}}const os="chat.approval.defaultDenyReason";function as(t){const e=D.c(36),{onYolo:s}=t,o=Q(),[a,i]=ke();let r,l,V,d,u,c,p,h,f;if(e[0]!==s||e[1]!==a||e[2]!==i||e[3]!==o){const y=we.find(j=>j.value===a.toolApprovalLevel)??we[0];let A;e[13]!==s||e[14]!==a||e[15]!==i?(A=j=>{const k=j,C=a.toolApprovalLevel??"readonly";i({...a,toolApprovalLevel:k}),k==="auto"&&s(C)},e[13]=s,e[14]=a,e[15]=i,e[16]=A):A=e[16];const w=A;V=Yn,h=a.toolApprovalLevel,f=w,l=Gn,u="xs",c="text-xs text-muted-foreground border-border/60 bg-transparent hover:bg-accent h-7 gap-1",p=Ho,r=Hn,d=o(y.shortKey),e[0]=s,e[1]=a,e[2]=i,e[3]=o,e[4]=r,e[5]=l,e[6]=V,e[7]=d,e[8]=u,e[9]=c,e[10]=p,e[11]=h,e[12]=f}else r=e[4],l=e[5],V=e[6],d=e[7],u=e[8],c=e[9],p=e[10],h=e[11],f=e[12];let m;e[17]!==r||e[18]!==d?(m=n.jsx(r,{children:d}),e[17]=r,e[18]=d,e[19]=m):m=e[19];let x;e[20]!==l||e[21]!==u||e[22]!==c||e[23]!==p||e[24]!==m?(x=n.jsx(l,{size:u,className:c,onClick:p,children:m}),e[20]=l,e[21]=u,e[22]=c,e[23]=p,e[24]=m,e[25]=x):x=e[25];let v;e[26]!==o?(v=we.map(y=>n.jsx(Wn,{value:y.value,children:o(y.labelKey)},y.value)),e[26]=o,e[27]=v):v=e[27];let g;e[28]!==v?(g=n.jsx(Jn,{children:v}),e[28]=v,e[29]=g):g=e[29];let b;return e[30]!==V||e[31]!==g||e[32]!==h||e[33]!==f||e[34]!==x?(b=n.jsxs(V,{value:h,onValueChange:f,children:[x,g]}),e[30]=V,e[31]=g,e[32]=h,e[33]=f,e[34]=x,e[35]=b):b=e[35],b}function Ho(t){return t.stopPropagation()}function is(t){const e=D.c(8),{input:s}=t,o=Q();if(s==null){let r;e[0]!==o?(r=o("chat.approval.noInput"),e[0]=o,e[1]=r):r=e[1];let l;return e[2]!==r?(l=n.jsx("div",{className:"px-4 text-xs text-muted-foreground",children:r}),e[2]=r,e[3]=l):l=e[3],l}let a;try{let r;e[4]!==s?(r=JSON.stringify(s,null,2),e[4]=s,e[5]=r):r=e[5],a=r}catch{a=String(s)}let i;return e[6]!==a?(i=n.jsx("div",{className:"px-4",children:n.jsx("pre",{className:"text-xs font-mono text-muted-foreground/70 whitespace-pre-wrap wrap-break-word max-h-32 overflow-y-auto rounded-md bg-muted/30 px-3 py-2",children:a})}),e[6]=a,e[7]=i):i=e[7],i}function Jo(t){const e=D.c(38),{approval:s,onRespond:o}=t,a=Q(),[i]=ke(),r=i.toolApprovalLevel??"readonly";let l;e[0]!==s.approvalId||e[1]!==r||e[2]!==o||e[3]!==a?(l=()=>o(s.approvalId,!1,a(os),r),e[0]=s.approvalId,e[1]=r,e[2]=o,e[3]=a,e[4]=l):l=e[4];const V=l;let d;e[5]!==s.approvalId||e[6]!==r||e[7]!==o?(d=()=>o(s.approvalId,!0,void 0,r),e[5]=s.approvalId,e[6]=r,e[7]=o,e[8]=d):d=e[8];const u=d;let c;e[9]!==s.approvalId||e[10]!==o?(c=C=>o(s.approvalId,!0,void 0,C),e[9]=s.approvalId,e[10]=o,e[11]=c):c=e[11];const p=c;let h;e[12]!==p?(h=n.jsx("div",{className:"flex items-center gap-2",children:n.jsx(as,{onYolo:p})}),e[12]=p,e[13]=h):h=e[13];const f=h;let m;e[14]!==a?(m=a("chat.approval.denyButton"),e[14]=a,e[15]=m):m=e[15];let x;e[16]!==V||e[17]!==m?(x=n.jsx(W,{type:"button",variant:"ghost",size:"sm",className:"h-7 px-2.5 text-xs text-muted-foreground [@media(hover:hover)]:hover:text-foreground active:scale-[0.97] transition-transform",onClick:V,children:m}),e[16]=V,e[17]=m,e[18]=x):x=e[18];let v;e[19]!==a?(v=a("chat.approval.acceptButton"),e[19]=a,e[20]=v):v=e[20];let g;e[21]!==u||e[22]!==v?(g=n.jsx(W,{type:"button",size:"sm",className:"h-7 px-2.5 text-xs active:scale-[0.97] transition-transform",onClick:u,children:v}),e[21]=u,e[22]=v,e[23]=g):g=e[23];let b;e[24]!==x||e[25]!==g?(b=n.jsxs(n.Fragment,{children:[x,g]}),e[24]=x,e[25]=g,e[26]=b):b=e[26];const y=b;let A;e[27]===Symbol.for("react.memo_cache_sentinel")?(A=n.jsx($e,{size:14}),e[27]=A):A=e[27];let w;e[28]!==a?(w=a("chat.approval.needsApproval"),e[28]=a,e[29]=w):w=e[29];let j;e[30]!==s.input?(j=n.jsx(is,{input:s.input}),e[30]=s.input,e[31]=j):j=e[31];let k;return e[32]!==s.friendlyName||e[33]!==f||e[34]!==y||e[35]!==w||e[36]!==j?(k=n.jsx(xe,{icon:A,label:w,title:s.friendlyName,defaultExpanded:!0,footerLeft:f,footerRight:y,children:j}),e[32]=s.friendlyName,e[33]=f,e[34]=y,e[35]=w,e[36]=j,e[37]=k):k=e[37],k}const Zo=bs(te(),oe({approved:As().optional(),levelOverride:Re(["auto","readonly"]).optional()}));function Xo(t){const e=D.c(46),{approvals:s,isStreaming:o,onRespond:a}=t,i=Q(),[r]=ke(),l=r.toolApprovalLevel??"readonly";let V;e[0]!==s?(V=Object.fromEntries(s.map(sa)),e[0]=s,e[1]=V):V=e[1];const d=V;let u;e[2]!==l||e[3]!==a||e[4]!==i?(u=(T,I)=>{const E=I;typeof E?.approved=="boolean"&&a(T.approvalId,E.approved,E.approved===!1?i(os):void 0,E.levelOverride??l)},e[2]=l,e[3]=a,e[4]=i,e[5]=u):u=e[5];let c;e[6]!==s||e[7]!==d||e[8]!==o||e[9]!==u?(c={parts:s,partKey:ta,schema:Zo,defaultValues:d,isStreaming:o,hasAnswer:ea,onSubmit:u},e[6]=s,e[7]=d,e[8]=o,e[9]=u,e[10]=c):c=e[10];const p=ns(c);let h;e[11]!==s||e[12]!==p?(h=T=>{p.form.reset(Object.fromEntries(s.map(I=>[I.approvalId,{approved:!0,levelOverride:T}]))),p.submitOrAdvance()},e[11]=s,e[12]=p,e[13]=h):h=e[13];const f=h,m=p.currentPart,x=p.form;let v;e[14]!==p?(v=T=>{T.preventDefault(),p.submit()},e[14]=p,e[15]=v):v=e[15];let g;e[16]===Symbol.for("react.memo_cache_sentinel")?(g=n.jsx($e,{size:14}),e[16]=g):g=e[16];let b;e[17]!==s.length||e[18]!==i?(b=i("chat.approval.batchedLabel",{count:s.length}),e[17]=s.length,e[18]=i,e[19]=b):b=e[19];const y=m?.friendlyName??"";let A;e[20]!==f?(A=n.jsx(as,{onYolo:f}),e[20]=f,e[21]=A):A=e[21];let w;e[22]!==s.length||e[23]!==p.currentIndex||e[24]!==p.goNext||e[25]!==p.goPrev||e[26]!==A?(w=n.jsx(ts,{currentIndex:p.currentIndex,total:s.length,onPrev:p.goPrev,onNext:p.goNext,extraLeft:A}),e[22]=s.length,e[23]=p.currentIndex,e[24]=p.goNext,e[25]=p.goPrev,e[26]=A,e[27]=w):w=e[27];let j;e[28]!==m||e[29]!==p.form.control||e[30]!==p.submitOrAdvance?(j=m?n.jsx(na,{approvalId:m.approvalId,control:p.form.control,onChange:p.submitOrAdvance}):null,e[28]=m,e[29]=p.form.control,e[30]=p.submitOrAdvance,e[31]=j):j=e[31];let k;e[32]!==m?(k=m?n.jsx(is,{input:m.input}):null,e[32]=m,e[33]=k):k=e[33];let C;e[34]!==w||e[35]!==j||e[36]!==k||e[37]!==b||e[38]!==y?(C=n.jsx(xe,{icon:g,label:b,title:y,defaultExpanded:!0,footerLeft:w,footerRight:j,children:k}),e[34]=w,e[35]=j,e[36]=k,e[37]=b,e[38]=y,e[39]=C):C=e[39];let _;e[40]!==C||e[41]!==v?(_=n.jsx("form",{onSubmit:v,children:C}),e[40]=C,e[41]=v,e[42]=_):_=e[42];let N;return e[43]!==p.form||e[44]!==_?(N=n.jsx(He,{...x,children:_}),e[43]=p.form,e[44]=_,e[45]=N):N=e[45],N}function ea(t){return typeof t?.approved=="boolean"}function ta(t){return t.approvalId}function sa(t){return[t.approvalId,{approved:void 0}]}function na(t){const e=D.c(7),{approvalId:s,control:o,onChange:a}=t,i=Q(),r=`${s}.approved`;let l;e[0]!==a||e[1]!==i?(l=d=>{const{field:u}=d,c=u.value===!0,p=u.value===!1;return n.jsxs(n.Fragment,{children:[n.jsx(W,{type:"button",variant:p?"secondary":"ghost",size:"sm",className:"h-7 px-2.5 text-xs",onClick:()=>{u.onChange(!1),a()},"aria-pressed":p,children:i("chat.approval.denyButton")}),n.jsx(W,{type:"button",variant:c?"default":"outline",size:"sm",className:"h-7 px-2.5 text-xs",onClick:()=>{u.onChange(!0),a()},"aria-pressed":c,children:i("chat.approval.acceptButton")})]})},e[0]=a,e[1]=i,e[2]=l):l=e[2];let V;return e[3]!==o||e[4]!==r||e[5]!==l?(V=n.jsx(ys,{control:o,name:r,render:l}),e[3]=o,e[4]=r,e[5]=l,e[6]=V):V=e[6],V}function oa(){const t=D.c(5),e=Q();let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsx($e,{className:"size-5 text-muted-foreground animate-pulse motion-reduce:animate-none"}),t[0]=s):s=t[0];let o;t[1]!==e?(o=e("chat.approval.preparingRequest"),t[1]=e,t[2]=o):o=t[2];let a;return t[3]!==o?(a=n.jsxs("div",{className:"flex items-center gap-2 p-4 border border-dashed rounded-lg bg-accent/50 w-[calc(100%-16px)] max-w-[640px] mx-auto mb-2",children:[s,n.jsx("span",{className:"text-sm text-muted-foreground shimmer",children:o})]}),t[3]=o,t[4]=a):a=t[4],a}function aa(t){const e=D.c(8),{approvals:s,isStreaming:o,onRespond:a}=t;if(o&&s.length===0){let r;return e[0]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(oa,{}),e[0]=r):r=e[0],r}if(s.length===0)return null;if(s.length===1){const r=s[0];if(!r)return null;let l;return e[1]!==a||e[2]!==r?(l=n.jsx(Jo,{approval:r,onRespond:a}),e[1]=a,e[2]=r,e[3]=l):l=e[3],l}let i;return e[4]!==s||e[5]!==o||e[6]!==a?(i=n.jsx(Xo,{approvals:s,isStreaming:o,onRespond:a}),e[4]=s,e[5]=o,e[6]=a,e[7]=i):i=e[7],i}function ia(t){const e=D.c(28),{plan:s,onApprove:o,onDismiss:a}=t,i=Q();let r;e[0]!==o||e[1]!==s.plan?(r=()=>{o(s.plan)},e[0]=o,e[1]=s.plan,e[2]=r):r=e[2];const l=r;let V;e[3]!==i?(V=i("chat.proposePlan.keepIterating"),e[3]=i,e[4]=V):V=e[4];let d;e[5]!==a||e[6]!==V?(d=n.jsx(W,{type:"button",variant:"ghost",size:"sm",className:"h-7 px-2.5 text-xs text-muted-foreground [@media(hover:hover)]:hover:text-foreground active:scale-[0.97] transition-transform",onClick:a,children:V}),e[5]=a,e[6]=V,e[7]=d):d=e[7];let u;e[8]!==i?(u=i("chat.proposePlan.letsGo"),e[8]=i,e[9]=u):u=e[9];let c;e[10]!==l||e[11]!==u?(c=n.jsx(W,{type:"button",size:"sm",className:"h-7 px-2.5 text-xs bg-special hover:bg-special/90 text-special-foreground active:scale-[0.97] transition-transform",onClick:l,children:u}),e[10]=l,e[11]=u,e[12]=c):c=e[12];let p;e[13]!==d||e[14]!==c?(p=n.jsxs(n.Fragment,{children:[d,c]}),e[13]=d,e[14]=c,e[15]=p):p=e[15];const h=p;let f;e[16]===Symbol.for("react.memo_cache_sentinel")?(f=n.jsx(qt,{size:14}),e[16]=f):f=e[16];let m;e[17]!==i?(m=i("chat.proposePlan.planReady"),e[17]=i,e[18]=m):m=e[18];let x;e[19]!==i?(x=i("chat.proposePlan.implementationPlan"),e[19]=i,e[20]=x):x=e[20];let v;e[21]!==s.plan?(v=n.jsx("div",{className:"px-4 max-h-64 overflow-y-auto",children:n.jsx("div",{className:"prose prose-sm max-w-none text-sm",children:n.jsx(nn,{id:"plan-preview",part:{type:"text",text:s.plan}})})}),e[21]=s.plan,e[22]=v):v=e[22];let g;return e[23]!==h||e[24]!==v||e[25]!==m||e[26]!==x?(g=n.jsx(xe,{icon:f,label:m,title:x,defaultExpanded:!0,footerRight:h,children:v}),e[23]=h,e[24]=v,e[25]=m,e[26]=x,e[27]=g):g=e[27],g}function ra(t){const e=D.c(6),{plans:s,onApprove:o,onDismiss:a}=t;let i;e[0]!==s?(i=Zt(s),e[0]=s,e[1]=i):i=e[1];const r=i;if(!r)return null;let l;return e[2]!==r||e[3]!==o||e[4]!==a?(l=n.jsx(ia,{plan:r,onApprove:o,onDismiss:a}),e[2]=r,e[3]=o,e[4]=a,e[5]=l):l=e[5],l}function rs(t){return t?"response"in t?t.response:t.option??t.draft:""}const jt=oe({response:te().min(1,"Response is required")}),la=oe({option:te().nullable(),draft:te()}).refine(t=>(t.option??t.draft).length>0,{message:"Please select or enter an option"}),Va=oe({response:Re(["yes","no"])});function ca(t){switch(t.type){case"text":return jt;case"choice":return la;case"confirm":return Va;default:return jt}}function da(t){const e={};for(const s of t)e[s.toolCallId]=ca(s.input);return oe(e)}function ua(t){const e=D.c(7),{control:s,name:o,placeholder:a}=t,i=Q();let r;e[0]!==a||e[1]!==i?(r=V=>{const{field:d}=V,u=d.value??"";return n.jsxs(st,{children:[n.jsx(nt,{children:n.jsx("div",{className:"px-2",children:n.jsxs("div",{className:"flex items-center gap-3 px-2 py-3 rounded-lg bg-accent/50",children:[n.jsx("span",{className:"flex items-center justify-center size-6 rounded-md bg-muted shrink-0",children:n.jsx(Et,{size:16,className:"text-muted-foreground"})}),n.jsx("input",{...d,value:u,type:"text",placeholder:a||i("chat.userAskQuestion.typeResponse"),autoFocus:!0,"aria-label":i("chat.userAskQuestion.textResponseInputAriaLabel"),className:"flex-1 text-sm bg-transparent outline-none placeholder:text-foreground/25 text-foreground min-w-0"})]})})}),n.jsx(ot,{})]})},e[0]=a,e[1]=i,e[2]=r):r=e[2];let l;return e[3]!==s||e[4]!==o||e[5]!==r?(l=n.jsx(Kt,{control:s,name:o,render:r}),e[3]=s,e[4]=o,e[5]=r,e[6]=l):l=e[6],l}function ls(t,e){const s=D.c(4);let o,a;s[0]!==t||s[1]!==e?(o=()=>{const i=r=>{if(js(r.target)||r.metaKey||r.ctrlKey||r.altKey)return;const l=Number.parseInt(r.key,10);l>=1&&l<=t&&(r.preventDefault(),e(l-1))};return document.addEventListener("keydown",i),()=>document.removeEventListener("keydown",i)},a=[t,e],s[0]=t,s[1]=e,s[2]=o,s[3]=a):(o=s[2],a=s[3]),R.useEffect(o,a)}function pa(t){const e=D.c(51),{control:s,name:o,options:a}=t,i=Q(),r=`${o}.option`;let l;e[0]!==s||e[1]!==r?(l={control:s,name:r,defaultValue:null},e[0]=s,e[1]=r,e[2]=l):l=e[2];const{field:V}=Vt(l),d=`${o}.draft`;let u;e[3]!==s||e[4]!==d?(u={control:s,name:d,defaultValue:""},e[3]=s,e[4]=d,e[5]=u):u=e[5];const{field:c}=Vt(u),p=V.value,h=c.value??"";let f;if(e[6]!==V||e[7]!==a?(f=O=>{const M=a[O];M!=null&&V.onChange(M)},e[6]=V,e[7]=a,e[8]=f):f=e[8],ls(a.length,f),a.length===0)return null;const m=p===null;let x;e[9]!==i?(x=i("chat.userAskQuestion.choiceOptionsAriaLabel"),e[9]=i,e[10]=x):x=e[10];let v;if(e[11]!==V||e[12]!==p||e[13]!==a||e[14]!==i){let O;e[16]!==V||e[17]!==p||e[18]!==i?(O=(M,K)=>{const q=p===M;return n.jsxs("button",{type:"button",onClick:()=>V.onChange(M),className:z("flex items-start gap-3 px-2 py-3 rounded-lg text-left transition-colors w-full",q&&"bg-accent/50",!q&&"hover:bg-accent"),"aria-label":i("chat.userAskQuestion.selectOption",{option:M}),children:[n.jsx("span",{className:z("flex items-center justify-center size-6 rounded-md text-sm shrink-0 mt-0.5",q?"bg-chart-1 text-white":"bg-muted text-foreground"),children:K+1}),n.jsx("span",{className:"text-sm text-foreground min-w-0 break-words",children:M})]},`${K}-${M}`)},e[16]=V,e[17]=p,e[18]=i,e[19]=O):O=e[19],v=a.map(O),e[11]=V,e[12]=p,e[13]=a,e[14]=i,e[15]=v}else v=e[15];const g=m&&"bg-accent/50",b=!m&&"hover:bg-accent";let y;e[20]!==g||e[21]!==b?(y=z("flex items-center gap-3 px-2 py-3 rounded-lg transition-colors w-full cursor-text",g,b),e[20]=g,e[21]=b,e[22]=y):y=e[22];let A;e[23]===Symbol.for("react.memo_cache_sentinel")?(A=n.jsx("span",{className:"flex items-center justify-center size-6 rounded-md bg-muted shrink-0",children:n.jsx(Et,{size:16,className:"text-muted-foreground"})}),e[23]=A):A=e[23];const w=m?h:"";let j;e[24]!==c||e[25]!==V||e[26]!==p?(j=O=>{c.onChange(O.target.value),p!==null&&V.onChange(null)},e[24]=c,e[25]=V,e[26]=p,e[27]=j):j=e[27];let k;e[28]!==V||e[29]!==p?(k=()=>{p!==null&&V.onChange(null)},e[28]=V,e[29]=p,e[30]=k):k=e[30];let C;e[31]!==i?(C=i("chat.userAskQuestion.somethingElsePlaceholder"),e[31]=i,e[32]=C):C=e[32];let _;e[33]!==i?(_=i("chat.userAskQuestion.customChoiceInputAriaLabel"),e[33]=i,e[34]=_):_=e[34];let N;e[35]!==w||e[36]!==j||e[37]!==k||e[38]!==C||e[39]!==_?(N=n.jsx("input",{type:"text",value:w,onChange:j,onFocus:k,placeholder:C,"aria-label":_,className:"flex-1 text-sm bg-transparent outline-none placeholder:text-foreground/25 text-foreground min-w-0"}),e[35]=w,e[36]=j,e[37]=k,e[38]=C,e[39]=_,e[40]=N):N=e[40];let T;e[41]!==y||e[42]!==N?(T=n.jsxs("label",{className:y,children:[A,N]}),e[41]=y,e[42]=N,e[43]=T):T=e[43];let I;e[44]!==T||e[45]!==x||e[46]!==v?(I=n.jsx(nt,{children:n.jsxs("div",{className:"flex flex-col px-2",role:"group","aria-label":x,children:[v,T]})}),e[44]=T,e[45]=x,e[46]=v,e[47]=I):I=e[47];let E;e[48]===Symbol.for("react.memo_cache_sentinel")?(E=n.jsx(ot,{}),e[48]=E):E=e[48];let F;return e[49]!==I?(F=n.jsxs(st,{children:[I,E]}),e[49]=I,e[50]=F):F=e[50],F}function ha(t){const e=D.c(8),{control:s,name:o}=t,a=Q();let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=["yes","no"],e[0]=i):i=e[0];const r=i,l=R.useRef(null);let V;e[1]===Symbol.for("react.memo_cache_sentinel")?(V=c=>{l.current?.onChange(r[c]??"")},e[1]=V):V=e[1],ls(r.length,V);let d;e[2]!==a?(d=c=>{const{field:p}=c;return l.current=p,n.jsxs(st,{children:[n.jsx(nt,{children:n.jsx("div",{className:"flex gap-2 px-2",role:"group","aria-label":a("chat.userAskQuestion.confirmationOptionsAriaLabel"),children:r.map(h=>{const f=p.value===h;return n.jsxs("button",{type:"button",onClick:()=>p.onChange(h),className:z("flex items-center gap-3 px-4 py-3 rounded-lg text-left transition-colors flex-1",f&&"bg-accent/50",!f&&"hover:bg-accent"),"aria-label":a("chat.userAskQuestion.confirmValue",{value:a(`chat.userAskQuestion.confirm${h==="yes"?"Yes":"No"}`)}),children:[n.jsx("span",{className:z("flex items-center justify-center size-6 rounded-md text-sm shrink-0",f?"bg-chart-1 text-white":"bg-muted text-foreground"),children:h==="yes"?1:2}),n.jsx("span",{className:"text-sm text-foreground capitalize",children:a(`chat.userAskQuestion.confirm${h==="yes"?"Yes":"No"}`)})]},h)})})}),n.jsx(ot,{})]})},e[2]=a,e[3]=d):d=e[3];let u;return e[4]!==s||e[5]!==o||e[6]!==d?(u=n.jsx(Kt,{control:s,name:o,render:d}),e[4]=s,e[5]=o,e[6]=d,e[7]=u):u=e[7],u}function wt(t){const e=D.c(13),{input:s,control:o,toolCallId:a}=t;switch(s.type){case"text":{const i=`${a}.response`;let r;return e[0]!==o||e[1]!==s.default||e[2]!==i?(r=n.jsx(ua,{control:o,name:i,placeholder:s.default}),e[0]=o,e[1]=s.default,e[2]=i,e[3]=r):r=e[3],r}case"choice":{let i;e[4]!==s.options?(i=s.options?.filter(Boolean)??[],e[4]=s.options,e[5]=i):i=e[5];const r=i;let l;return e[6]!==o||e[7]!==r||e[8]!==a?(l=n.jsx(pa,{control:o,name:a,options:r}),e[6]=o,e[7]=r,e[8]=a,e[9]=l):l=e[9],l}case"confirm":{const i=`${a}.response`;let r;return e[10]!==o||e[11]!==i?(r=n.jsx(ha,{control:o,name:i}),e[10]=o,e[11]=i,e[12]=r):r=e[12],r}default:return null}}function fa(t){const e=D.c(91),{parts:s,isStreaming:o,onSubmit:a}=t;let i;e[0]!==s?(i=da(s.map(va)),e[0]=s,e[1]=i):i=e[1];const r=i;let l;e[2]!==s?(l=Object.fromEntries(s.map(xa)),e[2]=s,e[3]=l):l=e[3];const V=l;let d;e[4]!==a?(d=(U,Y)=>{const P=rs(Y);P&&a(U,P)},e[4]=a,e[5]=d):d=e[5];let u;e[6]!==V||e[7]!==o||e[8]!==s||e[9]!==r||e[10]!==d?(u={parts:s,partKey:ga,schema:r,defaultValues:V,isStreaming:o,hasAnswer:ma,onSubmit:d},e[6]=V,e[7]=o,e[8]=s,e[9]=r,e[10]=d,e[11]=u):u=e[11];const c=ns(u),p=c.currentPart,h=Q();let f;e[12]!==p||e[13]!==c||e[14]!==h?(f=()=>{const U=p;if(!U)return;const Y=h("chat.userAskQuestion.skipMessage"),P=U.toolCallId;U.input?.type==="choice"?(c.form.setValue(`${P}.option`,null),c.form.setValue(`${P}.draft`,Y)):c.form.setValue(`${P}.response`,Y),c.advanceToNextUnanswered()},e[12]=p,e[13]=c,e[14]=h,e[15]=f):f=e[15];const m=f;let x;e[16]!==c.currentIndex||e[17]!==c.goNext||e[18]!==c.goPrev||e[19]!==s.length?(x=n.jsx(ts,{currentIndex:c.currentIndex,total:s.length,onPrev:c.goPrev,onNext:c.goNext}),e[16]=c.currentIndex,e[17]=c.goNext,e[18]=c.goPrev,e[19]=s.length,e[20]=x):x=e[20];const v=x;let g;e[21]!==h?(g=h("chat.userAskQuestion.skip"),e[21]=h,e[22]=g):g=e[22];let b;e[23]!==m||e[24]!==g?(b=n.jsx(W,{type:"button",variant:"outline",size:"sm",onClick:m,className:"h-7",children:g}),e[23]=m,e[24]=g,e[25]=b):b=e[25];let y;e[26]!==c.isAllAnswered||e[27]!==c.isCurrentAnswered||e[28]!==c.submitOrAdvance||e[29]!==o?(y=n.jsx(Yo,{isStreaming:o,isAllAnswered:c.isAllAnswered,isCurrentAnswered:c.isCurrentAnswered,onAdvanceOrSubmit:c.submitOrAdvance}),e[26]=c.isAllAnswered,e[27]=c.isCurrentAnswered,e[28]=c.submitOrAdvance,e[29]=o,e[30]=y):y=e[30];let A;e[31]!==b||e[32]!==y?(A=n.jsxs(n.Fragment,{children:[b,y]}),e[31]=b,e[32]=y,e[33]=A):A=e[33];const w=A;if(s.length===1){const U=s[0];if(!U?.input)return null;const Y=c.form;let P;e[34]!==c?(P=ee=>{ee.preventDefault(),c.submit()},e[34]=c,e[35]=P):P=e[35];let G;e[36]===Symbol.for("react.memo_cache_sentinel")?(G=n.jsx(Ge,{size:14}),e[36]=G):G=e[36];let ne;e[37]!==h?(ne=h("chat.userAskQuestion.questionPending"),e[37]=h,e[38]=ne):ne=e[38];let H;e[39]!==U.input?.prompt||e[40]!==h?(H=U.input?.prompt??h("chat.userAskQuestion.question"),e[39]=U.input?.prompt,e[40]=h,e[41]=H):H=e[41];const re=U.input;let S;e[42]!==c.form.control||e[43]!==U.toolCallId||e[44]!==re?(S=n.jsx(wt,{input:re,control:c.form.control,toolCallId:U.toolCallId}),e[42]=c.form.control,e[43]=U.toolCallId,e[44]=re,e[45]=S):S=e[45];let L;e[46]!==w||e[47]!==ne||e[48]!==H||e[49]!==S?(L=n.jsx(xe,{icon:G,label:ne,title:H,defaultExpanded:!0,footerRight:w,children:S}),e[46]=w,e[47]=ne,e[48]=H,e[49]=S,e[50]=L):L=e[50];let J;e[51]!==P||e[52]!==L?(J=n.jsx("form",{onSubmit:P,autoComplete:"off",children:L}),e[51]=P,e[52]=L,e[53]=J):J=e[53];let $;return e[54]!==c.form||e[55]!==J?($=n.jsx(He,{...Y,children:J}),e[54]=c.form,e[55]=J,e[56]=$):$=e[56],$}const j=c.form;let k;e[57]!==c?(k=U=>{U.preventDefault(),c.submit()},e[57]=c,e[58]=k):k=e[58];let C;e[59]===Symbol.for("react.memo_cache_sentinel")?(C=n.jsx(Ge,{size:14}),e[59]=C):C=e[59];let _;e[60]!==h?(_=h("chat.userAskQuestion.questionPending"),e[60]=h,e[61]=_):_=e[61];const N=c.currentIndex+1;let T;e[62]!==s.length||e[63]!==h||e[64]!==N?(T=h("chat.userAskQuestion.questionCount",{current:N,total:s.length}),e[62]=s.length,e[63]=h,e[64]=N,e[65]=T):T=e[65];let I;e[66]!==p?.input?.prompt||e[67]!==h?(I=p?.input?.prompt??h("chat.userAskQuestion.question"),e[66]=p?.input?.prompt,e[67]=h,e[68]=I):I=e[68];const E=c.activeKey,F=c.setActiveKey;let O;if(e[69]!==c.form||e[70]!==s){let U;e[72]!==c.form?(U=Y=>n.jsx(eo,{value:Y.toolCallId,className:"mt-0",children:n.jsx(wt,{input:Y.input,control:c.form.control,toolCallId:Y.toolCallId})},Y.toolCallId),e[72]=c.form,e[73]=U):U=e[73],O=s.map(U),e[69]=c.form,e[70]=s,e[71]=O}else O=e[71];let M;e[74]!==c.activeKey||e[75]!==c.setActiveKey||e[76]!==O?(M=n.jsx(to,{value:E,onValueChange:F,children:O}),e[74]=c.activeKey,e[75]=c.setActiveKey,e[76]=O,e[77]=M):M=e[77];let K;e[78]!==v||e[79]!==w||e[80]!==_||e[81]!==T||e[82]!==I||e[83]!==M?(K=n.jsx(xe,{icon:C,label:_,count:T,title:I,defaultExpanded:!0,footerLeft:v,footerRight:w,children:M}),e[78]=v,e[79]=w,e[80]=_,e[81]=T,e[82]=I,e[83]=M,e[84]=K):K=e[84];let q;e[85]!==k||e[86]!==K?(q=n.jsx("form",{onSubmit:k,autoComplete:"off",children:K}),e[85]=k,e[86]=K,e[87]=q):q=e[87];let Z;return e[88]!==c.form||e[89]!==q?(Z=n.jsx(He,{...j,children:q}),e[88]=c.form,e[89]=q,e[90]=Z):Z=e[90],Z}function ma(t){return!!rs(t)}function ga(t){return t.toolCallId}function xa(t){return t.input?.type==="choice"?[t.toolCallId,{option:null,draft:""}]:[t.toolCallId,{response:""}]}function va(t){return{toolCallId:t.toolCallId,input:t.input}}function ba(){const t=D.c(5),e=Q();let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsx(Ge,{className:"size-5 text-muted-foreground animate-pulse motion-reduce:animate-none"}),t[0]=s):s=t[0];let o;t[1]!==e?(o=e("chat.userAskQuestion.preparingQuestion"),t[1]=e,t[2]=o):o=t[2];let a;return t[3]!==o?(a=n.jsxs("div",{className:"flex items-center gap-2 p-4 border border-dashed rounded-lg bg-accent/50 w-[calc(100%-16px)] max-w-[640px] mx-auto mb-2",children:[s,n.jsx("span",{className:"text-sm text-muted-foreground shimmer",children:o})]}),t[3]=o,t[4]=a):a=t[4],a}function Vs(t){const e=D.c(7),{userAskParts:s,isStreaming:o,onSubmit:a}=t;let i;e[0]!==s?(i=s.filter(Aa),e[0]=s,e[1]=i):i=e[1];const r=i;if(r.length===0){if(o){let V;return e[2]===Symbol.for("react.memo_cache_sentinel")?(V=n.jsx(ba,{}),e[2]=V):V=e[2],V}return null}let l;return e[3]!==o||e[4]!==a||e[5]!==r?(l=n.jsx(fa,{parts:r,isStreaming:o,onSubmit:a}),e[3]=o,e[4]=a,e[5]=r,e[6]=l):l=e[6],l}function Aa(t){return t.state==="input-available"}function ya(t){const e=D.c(33),{parts:s,isStreaming:o,onRespond:a}=t,i=Q();let r;e[0]!==s?(r=s.at(-1),e[0]=s,e[1]=r):r=e[1];const l=r,V=l?.input;if(!l||!V?.title)return null;let d;e[2]===Symbol.for("react.memo_cache_sentinel")?(d=n.jsx(qt,{size:14}),e[2]=d):d=e[2];let u;e[3]!==i?(u=i("chat.suggestTask.label"),e[3]=i,e[4]=u):u=e[4];const c=V.title;let p;e[5]!==a||e[6]!==l?(p=()=>a(l,!1),e[5]=a,e[6]=l,e[7]=p):p=e[7];let h;e[8]!==i?(h=i("chat.suggestTask.notNow"),e[8]=i,e[9]=h):h=e[9];let f;e[10]!==o||e[11]!==p||e[12]!==h?(f=n.jsx(W,{type:"button",size:"sm",variant:"outline",className:"h-7",disabled:o,onClick:p,children:h}),e[10]=o,e[11]=p,e[12]=h,e[13]=f):f=e[13];let m;e[14]!==a||e[15]!==l?(m=()=>a(l,!0),e[14]=a,e[15]=l,e[16]=m):m=e[16];let x;e[17]!==i?(x=i("chat.suggestTask.create"),e[17]=i,e[18]=x):x=e[18];let v;e[19]!==o||e[20]!==m||e[21]!==x?(v=n.jsx(W,{type:"button",size:"sm",className:"h-7",disabled:o,onClick:m,children:x}),e[19]=o,e[20]=m,e[21]=x,e[22]=v):v=e[22];let g;e[23]!==v||e[24]!==f?(g=n.jsxs(n.Fragment,{children:[f,v]}),e[23]=v,e[24]=f,e[25]=g):g=e[25];let b;e[26]!==V.summary?(b=V.summary?n.jsx("p",{className:"px-4 pb-1 text-sm leading-snug text-muted-foreground whitespace-pre-wrap",children:V.summary}):null,e[26]=V.summary,e[27]=b):b=e[27];let y;return e[28]!==V.title||e[29]!==g||e[30]!==b||e[31]!==u?(y=n.jsx(xe,{icon:d,label:u,title:c,defaultExpanded:!0,footerRight:g,children:b}),e[28]=V.title,e[29]=g,e[30]=b,e[31]=u,e[32]=y):y=e[32],y}function ja(t){const e=t.filter(i=>i.status==="in_progress"),s=t.filter(i=>i.status==="completed").length,o=t.length;if(o>0&&s===o)return{icon:"completed",activity:"All done",progress:`${o}/${o}`};const[a]=e;return a&&e.length===1?{icon:"in_progress",activity:a.activeForm,progress:`${s}/${o} done`}:e.length>1?{icon:"in_progress",activity:`${e.length} in progress`,progress:`${s}/${o} done`}:s>0?{icon:"pending",activity:`${o-s} pending`,progress:`${s}/${o} done`}:{icon:"pending",activity:`${o} todos`,progress:"not started"}}function wa(t){const e=D.c(13),{todos:s}=t;if(s.length===0)return null;let o;e[0]!==s?(o=ja(s),e[0]=s,e[1]=o):o=e[1];const a=o;let i;e[2]!==a.icon?(i=n.jsx(Na,{status:a.icon}),e[2]=a.icon,e[3]=i):i=e[3];const r=a.activity,l=a.progress;let V;e[4]!==s?(V=s.map(ka),e[4]=s,e[5]=V):V=e[5];let d;e[6]!==V?(d=n.jsx("ul",{"data-testid":"todos-list",className:"flex flex-col px-2 max-h-[40vh] overflow-y-auto",children:V}),e[6]=V,e[7]=d):d=e[7];let u;return e[8]!==a.activity||e[9]!==a.progress||e[10]!==i||e[11]!==d?(u=n.jsx(xe,{icon:i,label:r,count:l,defaultExpanded:!1,children:d}),e[8]=a.activity,e[9]=a.progress,e[10]=i,e[11]=d,e[12]=u):u=e[12],u}function ka(t,e){return n.jsx(Ca,{todo:t},e)}function Ca(t){const e=D.c(14),{todo:s}=t,o=s.status==="completed",i=s.status==="in_progress"?s.activeForm:s.content;let r;e[0]!==s.status?(r=n.jsx(Sa,{status:s.status}),e[0]=s.status,e[1]=r):r=e[1];const l=o&&"text-muted-foreground";let V;e[2]!==l?(V=z("relative text-sm leading-snug pt-px select-none",l),e[2]=l,e[3]=V):V=e[3];const d=o?"100%":"0%",u=o?"width 300ms ease 200ms":"width 150ms ease";let c;e[4]!==d||e[5]!==u?(c=n.jsx("span",{"aria-hidden":"true",style:{position:"absolute",left:0,top:"50%",height:"1px",background:"currentColor",width:d,transition:u}}),e[4]=d,e[5]=u,e[6]=c):c=e[6];let p;e[7]!==i||e[8]!==V||e[9]!==c?(p=n.jsxs("span",{className:V,children:[i,c]}),e[7]=i,e[8]=V,e[9]=c,e[10]=p):p=e[10];let h;return e[11]!==r||e[12]!==p?(h=n.jsxs("li",{className:"flex items-start gap-2.5 px-2 py-1.5 rounded-lg hover:bg-accent transition-colors",children:[r,p]}),e[11]=r,e[12]=p,e[13]=h):h=e[13],h}function Sa(t){const e=D.c(4),{status:s}=t,o=s==="completed"?"true":void 0,a=s==="in_progress"?"true":void 0;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx("svg",{viewBox:"0 0 21 21",children:n.jsx("path",{d:"M5,10.75 L8.5,14.25 L19.4,2.3 C18.8333333,1.43333333 18.0333333,1 17,1 L4,1 C2.35,1 1,2.35 1,4 L1,17 C1,18.65 2.35,20 4,20 L17,20 C18.65,20 20,18.65 20,17 L20,7.99769186"})}),e[0]=i):i=e[0];let r;return e[1]!==o||e[2]!==a?(r=n.jsx("div",{className:"todo-cb mt-0.5","data-checked":o,"data-progress":a,"aria-hidden":"true",children:i}),e[1]=o,e[2]=a,e[3]=r):r=e[3],r}function Na(t){const e=D.c(13),{status:s}=t,o=Q();if(s==="completed"){let r;e[0]!==o?(r=o("chat.todoStatus.completed"),e[0]=o,e[1]=r):r=e[1];let l;e[2]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx("svg",{viewBox:"0 0 10 8",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",className:"w-2 h-2 text-primary-foreground",style:{strokeWidth:2},children:n.jsx("path",{d:"M1 4l2.5 2.5L9 1"})}),e[2]=l):l=e[2];let V;return e[3]!==r?(V=n.jsx("span",{"aria-label":r,className:"inline-flex items-center justify-center w-3.5 h-3.5 rounded-sm bg-primary",children:l}),e[3]=r,e[4]=V):V=e[4],V}if(s==="in_progress"){let r;e[5]!==o?(r=o("chat.todoStatus.inProgress"),e[5]=o,e[6]=r):r=e[6];let l;return e[7]!==r?(l=n.jsx("span",{"aria-label":r,className:"inline-block w-2 h-2 rounded-full bg-primary animate-pulse shrink-0"}),e[7]=r,e[8]=l):l=e[8],l}let a;e[9]!==o?(a=o("chat.todoStatus.pending"),e[9]=o,e[10]=a):a=e[10];let i;return e[11]!==a?(i=n.jsx("span",{"aria-label":a,className:"inline-block w-3.5 h-3.5 rounded-sm border-[1.5px] border-muted-foreground/50 shrink-0"}),e[11]=a,e[12]=i):i=e[12],i}const Ia={usd:[{dollars:10,labelKey:"credits.topUp.starter"},{dollars:20,labelKey:"credits.topUp.popular"},{dollars:100,labelKey:"credits.topUp.bestValue"}],brl:[{dollars:50,labelKey:"credits.topUp.starter"},{dollars:100,labelKey:"credits.topUp.popular"},{dollars:500,labelKey:"credits.topUp.bestValue"}]},Ta={"credits.topUp.starter":"starter","credits.topUp.popular":"popular","credits.topUp.bestValue":"best_value"};function _a(t){const e=D.c(46),{source:s,onDone:o}=t,a=Q(),i=ws(),[r]=ke(),[l,V]=R.useState(r.language==="pt-BR"?"brl":"usd"),[d,u]=R.useState(""),[c,p]=R.useState(!1),h=l==="brl"?"R$":"$";let f;e[0]!==l||e[1]!==i?(f=async M=>{const{url:K}=await i.call("AI_PROVIDER_TOPUP_URL",{providerId:"deco",amountCents:M,currency:l});return K},e[0]=l,e[1]=i,e[2]=f):f=e[2];let m;e[3]!==o?(m=M=>{M&&window.open(M,"_blank","noopener,noreferrer"),o?.()},e[3]=o,e[4]=m):m=e[4];let x;e[5]!==a?(x=M=>{Ie.error(a("credits.topUp.failed",{message:M.message}))},e[5]=a,e[6]=x):x=e[6];let v;e[7]!==f||e[8]!==m||e[9]!==x?(v={mutationFn:f,onSuccess:m,onError:x},e[7]=f,e[8]=m,e[9]=x,e[10]=v):v=e[10];const{mutate:g,isPending:b}=ks(v);let y;e[11]!==l||e[12]!==s||e[13]!==g?(y=(M,K)=>{X("credits_topup_clicked",{amount_cents:M,currency:l,tier_label:K,source:s}),g(M)},e[11]=l,e[12]=s,e[13]=g,e[14]=y):y=e[14];const A=y,w=parseFloat(d),j=!isNaN(w)&&w>=1;let k,C,_;e[15]===Symbol.for("react.memo_cache_sentinel")?(k=M=>{M&&V(M)},C=n.jsx(ft,{value:"usd",className:"h-8 px-3 text-xs",children:"USD"}),_=n.jsx(ft,{value:"brl",className:"h-8 px-3 text-xs",children:"BRL"}),e[15]=k,e[16]=C,e[17]=_):(k=e[15],C=e[16],_=e[17]);let N;e[18]!==l?(N=n.jsx("div",{className:"mb-4",children:n.jsxs(oo,{type:"single",variant:"outline",size:"sm",value:l,onValueChange:k,children:[C,_]})}),e[18]=l,e[19]=N):N=e[19];const T=Ia[l];let I;if(e[20]!==A||e[21]!==h||e[22]!==b||e[23]!==a||e[24]!==T){let M;e[26]!==A||e[27]!==h||e[28]!==b||e[29]!==a?(M=K=>{const{dollars:q,labelKey:Z}=K;return n.jsxs("button",{type:"button",disabled:b,onClick:()=>A(q*100,Ta[Z]??"preset"),className:z("relative flex flex-col items-center gap-1 py-5 surface surface-interactive cursor-pointer","disabled:opacity-50 disabled:cursor-wait"),children:[n.jsxs("span",{className:"text-2xl font-semibold tabular-nums text-foreground",children:[h,q]}),n.jsx("span",{className:"text-xs text-muted-foreground",children:a(Z)})]},q)},e[26]=A,e[27]=h,e[28]=b,e[29]=a,e[30]=M):M=e[30],I=T.map(M),e[20]=A,e[21]=h,e[22]=b,e[23]=a,e[24]=T,e[25]=I}else I=e[25];let E;e[31]!==I?(E=n.jsx("div",{className:"grid grid-cols-3 gap-2.5",children:I}),e[31]=I,e[32]=E):E=e[32];let F;e[33]!==A||e[34]!==h||e[35]!==d||e[36]!==w||e[37]!==j||e[38]!==b||e[39]!==c||e[40]!==a?(F=c?n.jsxs("div",{className:"flex gap-2 mt-3",children:[n.jsxs("div",{className:"relative flex-1",children:[n.jsx("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-sm text-muted-foreground select-none",children:h}),n.jsx(Cs,{type:"number",min:"1",step:"1",placeholder:a("credits.topUp.customPlaceholder"),value:d,onChange:M=>u(M.target.value),className:"h-10 text-sm pl-7",autoFocus:!0})]}),n.jsx(W,{size:"lg",disabled:!j||b,onClick:()=>A(Math.round(w*100),"custom"),children:a(b?"credits.topUp.opening":"credits.topUp.add")})]}):n.jsx("button",{type:"button",className:"w-full mt-3 text-xs text-muted-foreground hover:text-foreground transition-colors py-1",onClick:()=>p(!0),children:a("credits.topUp.enterCustom")}),e[33]=A,e[34]=h,e[35]=d,e[36]=w,e[37]=j,e[38]=b,e[39]=c,e[40]=a,e[41]=F):F=e[41];let O;return e[42]!==E||e[43]!==F||e[44]!==N?(O=n.jsxs("div",{children:[N,E,F]}),e[42]=E,e[43]=F,e[44]=N,e[45]=O):O=e[45],O}const Da=["chat.creditsExhaustedBanner.benefit1","chat.creditsExhaustedBanner.benefit2","chat.creditsExhaustedBanner.benefit3"];function Ma(t){const e=D.c(47),{onDismiss:s}=t,{org:o}=Te(),a=Xe(),{decoKeyId:i}=no(),r=Q(),l=Ke("credits");let V,d;if(e[0]!==o.id?(V=()=>{X("credits_exhausted_shown",{organization_id:o.id})},d=[o.id],e[0]=o.id,e[1]=V,e[2]=d):(V=e[1],d=e[2]),R.useEffect(V,d),!l)return null;let u;e[3]!==s?(u=T=>!T&&s?.(),e[3]=s,e[4]=u):u=e[4];let c;e[5]===Symbol.for("react.memo_cache_sentinel")?(c=["radial-gradient(ellipse 40% 200% at -5% 100%, rgba(165,149,255,0.5) 0%, transparent 100%)","radial-gradient(ellipse 40% 200% at 105% -10%, rgba(208,236,26,0.45) 0%, transparent 100%)"],e[5]=c):c=e[5];let p;e[6]===Symbol.for("react.memo_cache_sentinel")?(p=n.jsx("div",{className:"absolute inset-x-0 top-0 h-36 pointer-events-none",style:{backgroundImage:c.join(", "),maskImage:"linear-gradient(to bottom, black 0%, transparent 100%)",WebkitMaskImage:"linear-gradient(to bottom, black 0%, transparent 100%)"}}),e[6]=p):p=e[6];let h;e[7]===Symbol.for("react.memo_cache_sentinel")?(h=n.jsx("img",{src:"/logos/deco%20logo.svg",alt:"Deco AI Gateway",className:"size-9 rounded-lg object-contain dark:bg-white dark:p-0.5"}),e[7]=h):h=e[7];let f;e[8]!==r?(f=r("chat.creditsExhaustedBanner.title"),e[8]=r,e[9]=f):f=e[9];let m;e[10]!==f?(m=n.jsx(Ss,{className:"text-xl font-semibold tracking-tight",children:f}),e[10]=f,e[11]=m):m=e[11];let x;e[12]!==r?(x=r("chat.creditsExhaustedBanner.description"),e[12]=r,e[13]=x):x=e[13];let v;e[14]!==x?(v=n.jsx(Ns,{className:"mt-1.5 text-sm leading-relaxed",children:x}),e[14]=x,e[15]=v):v=e[15];let g;e[16]!==v||e[17]!==m?(g=n.jsxs("div",{className:"relative px-8 pt-8 pb-2 overflow-hidden",children:[p,n.jsxs(Is,{className:"relative gap-4",children:[h,n.jsxs("div",{children:[m,v]})]})]}),e[16]=v,e[17]=m,e[18]=g):g=e[18];let b;e[19]!==i||e[20]!==s||e[21]!==r?(b=i&&n.jsxs("div",{className:"px-8 pt-5 pb-6",children:[n.jsx("div",{className:"surface p-5",children:n.jsx(_a,{source:"exhausted_banner",onDone:s})}),n.jsx("div",{className:"mt-5 rounded-xl bg-muted/25 border border-border/50 p-4 space-y-3",children:Da.map(T=>n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx("div",{className:"flex items-center justify-center size-5 rounded-full bg-success/15 shrink-0",children:n.jsx(_t,{size:12,className:"text-success"})}),n.jsx("span",{className:"text-sm text-foreground/80",children:r(T)})]},T))})]}),e[19]=i,e[20]=s,e[21]=r,e[22]=b):b=e[22];let y;e[23]!==r?(y=r("chat.creditsExhaustedBanner.dismiss"),e[23]=r,e[24]=y):y=e[24];let A;e[25]!==s||e[26]!==y?(A=n.jsx(W,{variant:"ghost",size:"sm",onClick:s,children:y}),e[25]=s,e[26]=y,e[27]=A):A=e[27];let w;e[28]!==a||e[29]!==s||e[30]!==o.slug?(w=()=>{a({to:"/$org/settings/ai-providers",params:{org:o.slug}}),s?.()},e[28]=a,e[29]=s,e[30]=o.slug,e[31]=w):w=e[31];let j;e[32]!==r?(j=r("chat.creditsExhaustedBanner.manageProviders"),e[32]=r,e[33]=j):j=e[33];let k;e[34]!==w||e[35]!==j?(k=n.jsx("button",{type:"button",className:"text-xs text-muted-foreground hover:text-foreground transition-colors",onClick:w,children:j}),e[34]=w,e[35]=j,e[36]=k):k=e[36];let C;e[37]!==A||e[38]!==k?(C=n.jsxs("div",{className:"px-8 py-4 border-t border-border bg-muted/30 flex items-center justify-between",children:[A,k]}),e[37]=A,e[38]=k,e[39]=C):C=e[39];let _;e[40]!==g||e[41]!==b||e[42]!==C?(_=n.jsxs(Ts,{className:"sm:max-w-[520px] gap-0 p-0 overflow-hidden",onOpenAutoFocus:Pa,children:[g,b,C]}),e[40]=g,e[41]=b,e[42]=C,e[43]=_):_=e[43];let N;return e[44]!==_||e[45]!==u?(N=n.jsx(_s,{open:!0,onOpenChange:u,children:_}),e[44]=_,e[45]=u,e[46]=N):N=e[46],N}function Pa(t){return t.preventDefault()}const Ea={ai_budget_exhausted:{label:"chat.planRefused.budgetLabel",title:"chat.planRefused.budgetTitle"},feature_not_in_plan:{label:"chat.planRefused.featureLabel",title:"chat.planRefused.featureTitle"}};function kt(t){const e=D.c(21),{kind:s,onDismiss:o}=t,a=Q(),i=Xe(),{org:r}=Te(),{label:l,title:V}=Ea[s];let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=n.jsx(cn,{size:14}),e[0]=d):d=e[0];let u;e[1]!==l||e[2]!==a?(u=a(l),e[1]=l,e[2]=a,e[3]=u):u=e[3];let c;e[4]!==a||e[5]!==V?(c=a(V),e[4]=a,e[5]=V,e[6]=c):c=e[6];let p;e[7]!==i||e[8]!==o||e[9]!==r.slug?(p=()=>{i({to:"/$org/settings/ai-providers",params:{org:r.slug}}),o()},e[7]=i,e[8]=o,e[9]=r.slug,e[10]=p):p=e[10];let h;e[11]!==a?(h=a("chat.planRefused.seePlans"),e[11]=a,e[12]=h):h=e[12];let f;e[13]!==p||e[14]!==h?(f=n.jsx(W,{size:"sm",className:"h-7 text-xs",onClick:p,children:h}),e[13]=p,e[14]=h,e[15]=f):f=e[15];let m;return e[16]!==o||e[17]!==u||e[18]!==c||e[19]!==f?(m=n.jsx(xe,{icon:d,label:u,title:c,defaultExpanded:!0,variant:"warning",onClose:o,footerRight:f}),e[16]=o,e[17]=u,e[18]=c,e[19]=f,e[20]=m):m=e[20],m}function cs(t){const e=Ra(t);if(e!==null){const d=cs(e);return{summary:d.summary,rawDetails:d.rawDetails??t}}const s=t.trim(),o=s.startsWith("<")&&/<[a-z][\s\S]*>/i.test(s),a=/cloudflare|cf-[a-z-]+|error[\s_-]?code[\s_-]?5\d\d/i.test(s),i=/failed to fetch|networkerror|load failed|offline/i.test(s),r=/timeout|timed out|aborted|deadline/i.test(s),l=s.length>240,V=/sandbox failed to start(?::\s*(.+))?/is.exec(s);if(V){const d=V[1]?.trim().replace(/\.$/,"");return{summary:d?`Your sandbox didn't finish starting up (${d}). Try again.`:"Your sandbox didn't finish starting up. Try again.",rawDetails:t}}return a||o&&l?{summary:"Our servers are having a moment. Try sending again in a few seconds.",rawDetails:t}:i?{summary:"Lost connection. Check your network and try again.",rawDetails:t}:r?{summary:"That took longer than expected. Try again.",rawDetails:t}:o||l?{summary:"Something unexpected came back from the server. Try again.",rawDetails:t}:{summary:t,rawDetails:null}}function Ra(t){const e=t.trim();if(!e.startsWith("{"))return null;let s;try{s=JSON.parse(e)}catch{return null}if(!s||typeof s!="object")return null;const{error:o,message:a}=s,i=typeof o=="string"?o:a;return typeof i=="string"&&i.trim()&&!i.trim().startsWith("{")?i:null}const Ua={length:"chat.highlight.warningDescriptionLength","content-filter":"chat.highlight.warningDescriptionContentFilter","tool-calls":"chat.highlight.warningDescriptionToolCalls"};function Be(t){const e=D.c(29),s=Q(),{variant:o,onDismiss:a}=t,i=o==="error";let r;e[0]!==i||e[1]!==s?(r=s(i?"chat.highlight.errorOccurred":"chat.highlight.responseIncomplete"),e[0]=i,e[1]=s,e[2]=r):r=e[2];const l=r,V=i?Qn:Ms;let d;e[3]!==t.error||e[4]!==t.finishReason||e[5]!==t.variant||e[6]!==s?(d=t.variant==="error"?t.error.message:(()=>{const g=Ua[t.finishReason];return g?s(g):s("chat.highlight.responseStoppedUnexpectedly",{reason:t.finishReason})})(),e[3]=t.error,e[4]=t.finishReason,e[5]=t.variant,e[6]=s,e[7]=d):d=e[7];const u=d;let c;e[8]!==i||e[9]!==u?(c=i?cs(u):{summary:u,rawDetails:null},e[8]=i,e[9]=u,e[10]=c):c=e[10];const{summary:p,rawDetails:h}=c;let f;e[11]!==V?(f=n.jsx(V,{size:14}),e[11]=V,e[12]=f):f=e[12];let m;e[13]!==i||e[14]!==t.onContinue||e[15]!==t.onFixInChat||e[16]!==s?(m=i?n.jsx(W,{size:"sm",variant:"outline",onClick:t.onFixInChat,className:"h-7 text-xs",children:s("chat.highlight.fixInChat")}):n.jsx(W,{size:"sm",variant:"outline",onClick:t.onContinue,className:"h-7 text-xs",children:s("chat.highlight.continue")}),e[13]=i,e[14]=t.onContinue,e[15]=t.onFixInChat,e[16]=s,e[17]=m):m=e[17];let x;e[18]!==h||e[19]!==s?(x=h?n.jsxs("details",{className:"group mx-4",children:[n.jsxs("summary",{className:"flex cursor-pointer list-none items-center gap-1.5 text-xs text-muted-foreground transition-colors hover:text-foreground [&::-webkit-details-marker]:hidden",children:[n.jsx("svg",{"aria-hidden":"true",className:"size-3 transition-transform group-open:rotate-90",viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:n.jsx("path",{d:"m4.5 3 3 3-3 3"})}),n.jsx("span",{className:"group-open:hidden",children:s("chat.highlight.showTechnicalDetails")}),n.jsx("span",{className:"hidden group-open:inline",children:s("chat.highlight.hideTechnicalDetails")})]}),n.jsxs("div",{className:"relative mt-2",children:[n.jsx("button",{type:"button",onClick:()=>{navigator.clipboard.writeText(h).then(()=>Ie.success(s("chat.highlight.copiedToClipboard"))).catch(()=>Ie.error(s("chat.highlight.couldNotCopy")))},"aria-label":s("chat.highlight.copyErrorDetails"),title:s("chat.highlight.copy"),className:"absolute right-1.5 top-1.5 z-10 flex h-6 w-6 items-center justify-center rounded-lg bg-background/80 text-muted-foreground backdrop-blur-sm transition-colors hover:bg-background hover:text-foreground",children:n.jsx(dn,{className:"size-3.5"})}),n.jsx("pre",{className:"max-h-40 overflow-auto rounded-md border border-border/60 bg-background px-3 py-2 pr-8 font-mono text-xs text-foreground/80 whitespace-pre-wrap break-all",children:h})]})]}):null,e[18]=h,e[19]=s,e[20]=x):x=e[20];let v;return e[21]!==l||e[22]!==a||e[23]!==p||e[24]!==f||e[25]!==m||e[26]!==x||e[27]!==o?(v=n.jsx(xe,{icon:f,label:l,title:p,defaultExpanded:!0,variant:o,onClose:a,footerRight:m,children:x}),e[21]=l,e[22]=a,e[23]=p,e[24]=f,e[25]=m,e[26]=x,e[27]=o,e[28]=v):v=e[28],v}function Fe(t){const e=D.c(71);let s;e[0]!==t?(s=t===void 0?{}:t,e[0]=t,e[1]=s):s=e[1];const{inline:o,voiceMode:a}=s,i=o===void 0?!1:o,r=a===void 0?!1:a,l=Q(),{error:V,clearError:d,finishReason:u,clearFinishReason:c,messages:p,isStreaming:h,submit:f,sendMessage:m}=Ue(),[x,v]=ke(),{virtualMcpId:g,createTaskWithMessage:b}=et(),{chatMode:y,setChatMode:A,simpleModeTier:w}=tt(),j=Ke("credits");let k;e[2]!==y||e[3]!==w||e[4]!==g||e[5]!==r?(k=se=>({...r?{voiceMode:!0}:{},tier:w,mode:y,toolApprovalLevel:se,agent:g?{id:g}:void 0}),e[2]=y,e[3]=w,e[4]=g,e[5]=r,e[6]=k):k=e[6];const C=k;let _;e[7]!==x.toolApprovalLevel?(_=x.toolApprovalLevel??Ds(),e[7]=x.toolApprovalLevel,e[8]=_):_=e[8];const N=_,T=p.at(-1),I=T?.role==="assistant"?T.parts:[],E=I.filter(za),F=I.filter(Mt),O=Xt(I),M=Jt(I);let K;e[9]!==V||e[10]!==m||e[11]!==l?(K=()=>{if(V){const me={type:"doc",content:[{type:"paragraph",content:[{type:"text",text:l("chat.highlight.fixInChatMessage",{error:V.message})}]}]};m(me)}},e[9]=V,e[10]=m,e[11]=l,e[12]=K):K=e[12];const q=K;let Z;e[13]!==m||e[14]!==l?(Z=()=>{const se={type:"doc",content:[{type:"paragraph",content:[{type:"text",text:l("chat.highlight.pleaseContinue")}]}]};m(se)},e[13]=m,e[14]=l,e[15]=Z):Z=e[15];const U=Z;let Y;e[16]!==C||e[17]!==N||e[18]!==f?(Y=(se,me)=>{f({kind:"toolOutput",toolCallId:se.toolCallId,output:{response:me}},C(N))},e[16]=C,e[17]=N,e[18]=f,e[19]=Y):Y=e[19];const P=Y;let G;e[20]!==C||e[21]!==N||e[22]!==f?(G=(se,me)=>{f({kind:"toolOutput",toolCallId:se.toolCallId,output:{accepted:me}},C(N))},e[20]=C,e[21]=N,e[22]=f,e[23]=G):G=e[23];const ne=G;let H;e[24]!==b||e[25]!==x||e[26]!==A||e[27]!==v||e[28]!==l||e[29]!==g?(H=se=>{A("default"),v({...x,toolApprovalLevel:"auto"}),b({virtualMcpId:g,message:{parts:[{type:"text",text:l("chat.highlight.implementPlanMessage",{plan:se})}]}})},e[24]=b,e[25]=x,e[26]=A,e[27]=v,e[28]=l,e[29]=g,e[30]=H):H=e[30];const re=H,S=Oa;let L;e[31]!==C||e[32]!==f?(L=(se,me,Le,Oe)=>{f({kind:"approval",approvalId:se,approved:me,...Le?{reason:Le}:{}},C(Oe))},e[31]=C,e[32]=f,e[33]=L):L=e[33];const J=L,$=es();if($.isCreditExhausted){let se;return e[34]!==j||e[35]!==d||e[36]!==i?(se=j?n.jsx(Ma,{onDismiss:d}):n.jsx("div",{className:z(!i&&"absolute bottom-full left-0 right-0"),children:n.jsx(kt,{kind:"ai_budget_exhausted",onDismiss:d})}),e[34]=j,e[35]=d,e[36]=i,e[37]=se):se=e[37],se}const{showError:ee,showWarning:ie,hasApprovals:ce}=$,ae=E.map(La).join("|"),pe=Zt(O)?.toolCallId??"",Ve=M.map(Fa).join("|"),Ce=!i&&"absolute bottom-full left-0 right-0";let de;e[38]!==Ce?(de=z(Ce),e[38]=Ce,e[39]=de):de=e[39];let he;e[40]!==$.todos?(he=n.jsx(wa,{todos:$.todos}),e[40]=$.todos,e[41]=he):he=e[41];let le;e[42]!==d||e[43]!==$.planRefusal?(le=$.planRefusal&&n.jsx(kt,{kind:$.planRefusal,onDismiss:d}),e[42]=d,e[43]=$.planRefusal,e[44]=le):le=e[44];let ue;e[45]!==d||e[46]!==V||e[47]!==q||e[48]!==ee?(ue=ee&&n.jsx(Be,{variant:"error",error:V,onDismiss:d,onFixInChat:q}),e[45]=d,e[46]=V,e[47]=q,e[48]=ee,e[49]=ue):ue=e[49];let fe;e[50]!==c||e[51]!==u||e[52]!==U||e[53]!==ie?(fe=ie&&n.jsx(Be,{variant:"warning",finishReason:u,onDismiss:c,onContinue:U}),e[50]=c,e[51]=u,e[52]=U,e[53]=ie,e[54]=fe):fe=e[54];const _e=ce&&n.jsx(aa,{approvals:M,isStreaming:h,onRespond:J},Ve),ve=$.hasPlans&&n.jsx(ra,{plans:O,isStreaming:h,onApprove:re,onDismiss:S},pe),De=$.hasTaskSuggestion&&n.jsx(ya,{parts:F,isStreaming:h,onRespond:ne},F.at(-1)?.toolCallId??"");let ye;e[55]!==$.isWaitingForUserInput||e[56]!==P||e[57]!==h||e[58]!==ae||e[59]!==E?(ye=$.isWaitingForUserInput&&n.jsx(Vs,{userAskParts:E,isStreaming:h,onSubmit:P},ae),e[55]=$.isWaitingForUserInput,e[56]=P,e[57]=h,e[58]=ae,e[59]=E,e[60]=ye):ye=e[60];let je;return e[61]!==de||e[62]!==he||e[63]!==le||e[64]!==ue||e[65]!==fe||e[66]!==_e||e[67]!==ve||e[68]!==De||e[69]!==ye?(je=n.jsxs("div",{className:de,children:[he,le,ue,fe,_e,ve,De,ye]}),e[61]=de,e[62]=he,e[63]=le,e[64]=ue,e[65]=fe,e[66]=_e,e[67]=ve,e[68]=De,e[69]=ye,e[70]=je):je=e[70],je}function Fa(t){return t.approvalId}function La(t){return t.toolCallId}function Oa(){document.querySelector("[data-chat-input]")?.focus()}function za(t){return t.type==="tool-user_ask"}Fe.Error=function(e){return n.jsx(Be,{variant:"error",error:e.error,onDismiss:e.onDismiss,onFixInChat:e.onFixInChat})};Fe.Warning=function(e){return n.jsx(Be,{variant:"warning",finishReason:e.finishReason,onDismiss:e.onDismiss,onContinue:e.onContinue})};Fe.UserAskQuestion=Vs;function ds(t){const e=D.c(8),{taskId:s}=t,o=Q(),a=An(s),i=yn(a),r=jn(),{stop:l,removeLocalMessage:V}=Ue();if(i.length===0)return null;const d="mb-2 flex flex-col items-end gap-3 px-2.5";let u;e[0]!==r||e[1]!==V||e[2]!==l||e[3]!==o||e[4]!==s?(u=(h,f)=>n.jsxs("div",{className:"flex max-w-[85%] flex-col items-end",children:[n.jsx("div",{className:"min-w-0 rounded-2xl border border-dashed border-border px-4 py-2.5 text-sm wrap-break-word text-muted-foreground",children:h.text}),n.jsxs("div",{className:"mt-1 flex items-center gap-1 text-sm text-muted-foreground",children:[n.jsx("span",{className:"mr-1 select-none",children:new Date(h.enqueuedAt).toLocaleTimeString(void 0,{hour:"numeric",minute:"2-digit"})}),f===0&&n.jsxs(W,{type:"button",variant:"ghost",size:"sm",className:"h-6 gap-1 px-1.5 text-xs text-muted-foreground",onClick:()=>{l()},children:[n.jsx(zt,{size:12}),o("chat.queueTray.sendNow")]}),n.jsx(W,{type:"button",variant:"ghost",size:"icon-sm",className:"size-6 text-muted-foreground",title:o("chat.queueTray.removeFromQueue"),"aria-label":o("chat.queueTray.removeFromQueue"),onClick:()=>{r.cancel(s,h.messageId).then(m=>{m&&(wn(s,h.messageId),V(h.messageId))})},children:n.jsx(Ft,{className:"size-3.5"})})]})]},h.messageId),e[0]=r,e[1]=V,e[2]=l,e[3]=o,e[4]=s,e[5]=u):u=e[5];const c=i.map(u);let p;return e[6]!==c?(p=n.jsx("div",{className:d,children:c}),e[6]=c,e[7]=p):p=e[7],p}function us(t){const e=D.c(3),[s]=ke();let o;return e[0]!==s.enableSounds||e[1]!==t?(o=()=>{s.enableSounds&&vo(t.dataUri).catch(i=>{console.warn(`[sound] ${t.name} playback failed:`,i)})},e[0]=s.enableSounds,e[1]=t,e[2]=o):o=e[2],o}const Ba={name:"switch-005",dataUri:"data:audio/mpeg;base64,SUQzBAAAAAAAIlRTU0VAAAAOAAADTGF2ZjYyLjMuMTAwAAAAAAAAAAAAAAD/+1DAAAAAAAAAAAAAAAAAAAAAAABJbmZvAAAADwAAABkAABU4ABMTEx0dHR0nJycnMTExMTs7OztERERETk5OTlhYWFhiYmJibGxsbHZ2dnZ/f39/iYmJiZOTk5OdnZ2dp6enp7GxsbG7u7u7xMTExM7Ozs7Y2NjY4uLi4uzs7Oz29vb2/////wAAAABMYXZjNjIuMTEAAAAAAAAAAAAAAAAkBVYAAAAAAAAVOPCP8KUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA//tQxAAACEwDXvQRAAG8Ii93HtACUCAABAKCJwfaCEHwfeoEAQdEAYygIHBOCAIAgCAJh9QIOg+D5/ygPh/wfB8DuKAgCHyn9QPh/5SCDv+CEHAQdxOD4B27c39tbckkqYbBAYAN9bNJLB+aXAf5wQAKdzxfbmrVIRQ4xNx3HwnoDmLhfMhgJiiw/HREXNCHqjvHEPEG8QjBYlxQNepJAT0kC8ip6JzSWj1TasoG+iyycbf2Uil1ovf1f/oUtR1qP+s1WSBFKoAAU02BDjMhuP/7UsQEgws8bRpd8YABJYPeBf9wCGXTGxBYcw5AJFMFMAmQQAhGAxgLBgHIAMYAAALhgAchipbe/91aU1VV4zcZj1Vf1XgYCIMBNrsBAIGs9/Ue4i/xFPeqCqwViI9/UeLf///rOngdA3OPHFjmOBv+EQnGahgaZxVplmkAH5JadDTQlNCEuGNiWYbCCONWdUJg6HXNazFdu1T+VgaEpOP70exv7f2/4b/yH//2/4cqCX/zWRUrIw+IPNMNlDnjAXQas/I4AzmYifA0tMSCgQDF//tSxBCDSzzi3k/sQwEyCtjJ/rBZAk+Uqj1YhA5YMCAAMwgOUchTkK7OR7LbMl0W1H6SvzG0Q2ZzfKUhnmTobv9DNhS1v7P8h//8Gv8gTRt1jReZ7YEjmMQg9hhwwMycHooasFmZyjcZGBKJD+IwbMCQQLoi+IQXCcIoydKoilI2MWFS5uJdDEu2taRrYI2ZSqKY50pJLv2NfjUAAuQAMfqVQ/T3PDQgMJMeEZ45hJzY6MNoFMxqTj1zNGQKJjAxEsSCBgQJBSIL0mcKYQJfVAn/+1LEGwLKlEKrD3MiYcuMkVa/wABB8Vh6M1q1epbvXwWBURhkyEhWZ/////////////9gjZ/Wt4w+4MNMCpE4TBYQl4w1IHvMDdA2zBngBMwc8COMDhCpDAfgOAAgrBgNYU+YC0FBGAkAMpgWoSCYAGESGBGAKBgXgJOdiOJmMCmNwCYNDJhYRPykRCJhTBnEUzlsjv4UNLj/z97n3Mv/7z1nZqyitYAZIqErIwMwJAqEw0GAAMFptJMaqFwB8CQIWlhuhuDAwNjfuwrQFAYXCf/7UsQVAA+9PTP42gYRdiIu9zBwAPbFUCi0DAhgNcS+7cDwVgM05A9bUDeuQMyE/u3CygVISgZhpIau/9PhdQG2C9DpxZZJmn/dn/Psmt0EFm////l84ThUTopE4VD/9JkubOGasTvN30C20G21qgUCkVCoUCgPMywrPCGly27V5q5t24vl/8jSlSAPCxzNseNCw3oh3NGBu4BZJ5hv7DRSfR/+eWG7nA8IKh2Olv5iz3q5m3//Joxo3JqNyYkSuGt/k6D4DeoBOHmHdl0dkZYA//tSxAUAC4B1Z/2DADEcA17Z/uhI4Yoik/TrZo+ww7UtmpW4LDWu2IacoJKJJeTSM+ZmAYBEiU+ZnnAwCn1VVVV6JUJQVnioKhrgqdKgqGpUFeCp0sDR3ztQNREDRUFioKuxKCpYGQBlRIBk+aLwb8KblGQVDdphPYTUdBOGbVpAaTF6ZdjEV0iRUZRCYkA4oUQDx5zqDugtXvza/7fuNNvfZ+j9v+T/2f//J/4cAAOTpE5K4zksR9MfIB+TDcQTI4gNs1XKAzEFUrGkxABYEBb/+1LEEYNKrEjgT/TCwYYVmUX+mHoKgWhKU5Eiw9SFIRmppw+3fYo4siPhUFeexM8KgIO6wVuPDDy01qeRaVbw357//y3+o8M0pBNlNLCGBzGKwyYw2IIFOE1WNTjRM6x8MlA1AxDhUHTAkEiyKpnbWrLcaOBotBUKbk1pypcWDAIK00AhKLGkUco6q9VWvM53mcaq3tVa8zjTM/tX//EDP//////////XAAmrwAAPoKwcw0ShDCZD/BQlhzinxQdorsOuXTEIC01ZkJyu4k/qPP/7UsQUAEjkrrkvZaPBIRXUoe5QObfMhYKX9RVgTPqCSCaSCaSC0XVdV1f/////6IAlguuAJSiDRNloNBsZg+0+Ts8MMCn81WUTRAlIi+GHECD0y8AWDIqswYsxGOSKVV7MqOni8tkVOip0fZX/////9HrMCbAz2EHGS4GKAAiRAAAYAcDdKd4G6Z/nwYgJ0ZAIgZyC8aPAs/iPBhwMpWDQNARltNS5Y61v//9i8Yl4SkFkIGTkAc0UBrIYLPA4MYBEy+YLMRuY4nhTC3hZA68H//tSxCoAyQC6mY6CkWDJBIsBz/QUrgNmahSzcrYw0/HhfnMAZBojDsgTFkDR5MDkG/DZEbk2FCmowqdqv2TYABiJwqqYjaQRGZ1URZ1DhSsdiHX/GBu0QpzIBNSaLqZ0ARkwFARxMrpt/Eh47mbQAhhU6sisFUxBTUUzLjEwMFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVX/+1LESoHHJCRaj/dmYAIAQAAQAARVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVTEFNRTMuMTAwVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVf/7UsSLg8AAAaQAAAAgAAA0gAAABFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVTEFNRTMuMTAwVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//tSxKGDwAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//tSxKGDwAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//tSxKGDwAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVX/+1LEoYPAAAGkAAAAIAAANIAAAARVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVUxBTUUzLjEwMFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVf/7UsShg8AAAaQAAAAgAAA0gAAABFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVTEFNRTMuMTAwVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//tSxKGDwAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVX/+1LEoYPAAAGkAAAAIAAANIAAAARVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVUxBTUUzLjEwMFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//tSxKGDwAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//tSxKGDwAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//tSxKGDwAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//tSxKGDwAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//tSxKGDwAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV",duration:.609,format:"mp3",license:"CC0",author:"Kenney"},$a=Bs.togglePlanMode.keys.map(t=>t==="Shift"?"⇧":t).join(""),Ka=[{src:"/connections/gmail.png",name:"Gmail"},{src:"/connections/perplexity.png",name:"Perplexity"},{src:"/connections/github.png",name:"GitHub"}];function qa(){const t=D.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx("div",{className:"flex items-center -space-x-1.5",children:Ka.map(Qa)}),t[0]=e):e=t[0],e}function Qa(t){return n.jsx("img",{src:t.src,alt:t.name,className:"size-5 rounded-sm ring-1 ring-border object-cover bg-white"},t.name)}function Wa({disabled:t,onOpenConnections:e,virtualMcpId:s,selectedModel:o,isStreaming:a,onUnsupportedFile:i}){const r=Q(),[l,V]=R.useState(!1),d=us(Ba),{org:u}=Te(),{editor:c}=Pt(),p=R.useRef(null),h=at(o),f=()=>{!h||a||(V(!1),p.current?.click())},m=async S=>{const L=S.target.files;if(!L||L.length===0||!c)return;const J=Array.from(L);try{let $=c.state.selection.from;for(const ee of J)await Gt(c,o??null,ee,$,i,r),$=c.state.selection.to}finally{p.current&&(p.current.value="")}},x=mo({connectionId:s,orgId:u.id,orgSlug:u.slug}),v=Ps.virtualMcpPrompts(s,u.id),{data:g,isLoading:b}=Es({queryKey:v,queryFn:()=>go(x),staleTime:6e4,enabled:l&&!!x}),y=g?.prompts??[],[A,w]=R.useState(null),{chatMode:j,setChatMode:k}=tt(),[C,_]=ke(),N=Lt()?.lockedHarness!=="claude-code",T=we.find(S=>S.value===C.toolApprovalLevel)??we[0],I=r(T.shortKey),E=S=>{const L=we.find(J=>J.value===S);if(L){if(L.value===C.toolApprovalLevel){V(!1);return}d(),X("chat_approval_level_changed",{from_level:C.toolApprovalLevel,to_level:L.value,source:"tools_popover"}),_({...C,toolApprovalLevel:L.value}),V(!1)}},F=j==="plan",O=()=>{d();const S=F?"default":"plan";X("chat_mode_changed",{from_mode:j,to_mode:S,source:"tools_popover"}),k(S),V(!1)},M=()=>{e(),V(!1)},K=async(S,L)=>{if(!c||!x)return;const J=mt(S._meta),$={from:c.state.selection.from,to:c.state.selection.to};try{const ee=await xo(x,S.name,L);an(c,$,{id:S.name,name:ro(S.name,J),metadata:ee.messages,char:"/",kind:"prompt",args:L})}catch{Ie.error(r("chat.toolsPopover.failedLoadPrompt"))}},q=async S=>{V(!1);const L=!!(S.arguments&&S.arguments.length>0);if(X("chat_prompt_inserted",{prompt_name:S.name,with_arguments:L}),L){w(S);return}await K(S)},Z=async S=>{A&&(await K(A,S),w(null))},U=()=>{d();const S=j==="gen-image"?"default":"gen-image";X("chat_mode_changed",{from_mode:j,to_mode:S,source:"tools_popover"}),k(S),V(!1)},Y=()=>{d();const S=j==="web-search"?"default":"web-search";X("chat_mode_changed",{from_mode:j,to_mode:S,source:"tools_popover"}),k(S),V(!1)},P=()=>{d();const S=j==="deep-research"?"default":"deep-research";X("chat_mode_changed",{from_mode:j,to_mode:S,source:"tools_popover"}),k(S),V(!1)},G=j==="gen-image",ne=j==="web-search",H=j==="deep-research",re=n.jsx("input",{ref:p,type:"file",multiple:!0,accept:Vo(o??null),className:"hidden",onChange:m,disabled:a});return n.jsxs(n.Fragment,{children:[re,n.jsxs(Rs,{open:l,onOpenChange:S=>{S&&!l&&X("chat_tools_popover_opened",{chat_mode:j}),V(S)},children:[n.jsx(Us,{asChild:!0,children:n.jsxs(W,{type:"button",variant:"ghost",size:"default",disabled:t,title:r("chat.toolsPopover.tools"),"aria-label":r("chat.toolsPopover.tools"),className:z("text-muted-foreground hover:text-foreground transition-[gap] duration-200 shrink min-w-0","gap-0 @[480px]/chat-bottom:gap-1.5"),children:[n.jsx(un,{size:14}),n.jsx("span",{className:z("min-w-0 truncate transition-[max-width,opacity] duration-200 ease-out max-w-0 opacity-0","@[480px]/chat-bottom:max-w-24 @[480px]/chat-bottom:opacity-100"),children:r("chat.toolsPopover.tools")})]})}),n.jsxs(Fs,{align:"start",className:"w-56 p-1.5 space-y-1",children:[h?n.jsxs(be,{onClick:f,disabled:a,children:[n.jsx(gt,{size:16}),n.jsx("span",{className:"flex-1",children:r("chat.toolsPopover.addFile")})]}):n.jsxs(Yt,{children:[n.jsx(Qt,{asChild:!0,children:n.jsxs(be,{"aria-disabled":"true",className:"opacity-50 cursor-not-allowed",onSelect:S=>S.preventDefault(),children:[n.jsx(gt,{size:16}),n.jsx("span",{className:"flex-1",children:r("chat.toolsPopover.addFile")})]})}),n.jsx(Wt,{side:"right",children:r("chat.toolsPopover.modelNoFileSupport")})]}),n.jsxs(be,{onClick:O,className:z(F&&"text-special"),children:[n.jsx(Bt,{size:16,className:z(F&&"text-special")}),n.jsx("span",{className:"flex-1 whitespace-nowrap",children:r("chat.toolsPopover.planMode")}),n.jsx("span",{className:z("text-xs text-muted-foreground",F&&"text-special font-medium"),children:$a})]}),n.jsxs(be,{onClick:U,className:z(G&&"text-special"),children:[n.jsx($t,{size:16,className:z(G&&"text-special")}),n.jsx("span",{className:"flex-1",children:r("chat.toolsPopover.createImage")}),G&&n.jsx("span",{className:"text-xs text-special font-medium",children:r("chat.toolsPopover.on")})]}),n.jsxs(be,{onClick:Y,className:z(ne&&"text-special"),children:[n.jsx(Rt,{size:16,className:z(ne&&"text-special")}),n.jsx("span",{className:"flex-1",children:r("chat.toolsPopover.webSearch")}),ne&&n.jsx("span",{className:"text-xs text-special font-medium",children:r("chat.toolsPopover.on")})]}),n.jsxs(be,{onClick:P,className:z(H&&"text-special"),children:[n.jsx(Ut,{size:16,className:z(H&&"text-special")}),n.jsx("span",{className:"flex-1",children:r("chat.toolsPopover.deepResearch")}),H&&n.jsx("span",{className:"text-xs text-special font-medium",children:r("chat.toolsPopover.on")})]}),n.jsxs(ct,{children:[n.jsxs(dt,{className:"gap-2",children:[n.jsx("span",{className:"flex size-4 items-center justify-center text-base font-medium text-muted-foreground",children:"/"}),n.jsx("span",{className:"flex-1",children:r("chat.toolsPopover.prompts")})]}),n.jsx(ut,{className:"w-80 max-h-72 overflow-y-auto p-1.5",children:b?n.jsxs("div",{className:"flex items-center gap-2 px-2 py-3 text-sm text-muted-foreground",children:[n.jsx(Ls,{className:"size-3.5"}),r("chat.toolsPopover.loadingPrompts")]}):y.length===0?n.jsx("div",{className:"px-2 py-3 text-sm text-muted-foreground",children:r("chat.toolsPopover.noPromptsAvailable")}):y.map(S=>n.jsxs(be,{onClick:()=>q(S),className:"flex flex-col items-start gap-0.5",children:[n.jsx("span",{className:"font-medium text-sm capitalize",children:S.title||io(S.name,mt(S._meta))}),S.description&&n.jsx("span",{className:"text-xs text-muted-foreground line-clamp-2",children:S.description})]},S.name))})]}),N&&n.jsxs(ct,{children:[n.jsxs(dt,{className:"gap-2",children:[n.jsx($e,{size:16}),n.jsx("span",{className:"flex-1",children:r("chat.toolsPopover.approval")}),n.jsx("span",{className:"text-xs text-muted-foreground",children:I})]}),n.jsx(ut,{className:"w-48 p-1.5",children:n.jsx(Os,{value:C.toolApprovalLevel,onValueChange:E,children:we.map(S=>n.jsx(zs,{value:S.value,children:r(S.labelKey)},S.value))})})]}),n.jsxs(be,{onClick:M,children:[n.jsx(pn,{size:16}),n.jsx("span",{className:"flex-1",children:r("chat.toolsPopover.connections")}),n.jsx(R.Suspense,{children:n.jsx(qa,{})})]})]})]}),n.jsx(on,{prompt:A,setPrompt:w,onSubmit:Z})]})}const Ya=[{src:"/connections/github.png",name:"GitHub"},{src:"/connections/gmail.png",name:"Gmail"},{src:"/connections/linear.png",name:"Linear"},{src:"/connections/shopify.png",name:"Shopify"},{src:"/connections/firecrawl.png",name:"Firecrawl"},{src:"/connections/perplexity.png",name:"Perplexity"}];function Ga(){const t=D.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx("div",{className:"flex items-center -space-x-1",children:Ya.map(Ha)}),t[0]=e):e=t[0],e}function Ha(t){return n.jsx("img",{src:t.src,alt:t.name,className:"size-5 rounded-sm ring-2 ring-muted object-cover bg-white"},t.name)}function Ja(t){const e=D.c(10),{onClick:s}=t,o=Q();let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=z("group relative z-10 flex items-center gap-3 w-full px-4 py-3","rounded-b-2xl","cursor-pointer"),e[0]=a):a=e[0];let i;e[1]!==o?(i=o("chat.connectionsBanner.description"),e[1]=o,e[2]=i):i=e[2];let r;e[3]!==i?(r=n.jsx("p",{className:"flex-1 text-xs text-muted-foreground truncate text-left",children:i}),e[3]=i,e[4]=r):r=e[4];let l,V;e[5]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx(Ga,{}),V=n.jsx($s,{size:14,className:"shrink-0 text-muted-foreground/60 group-hover:text-muted-foreground transition-colors"}),e[5]=l,e[6]=V):(l=e[5],V=e[6]);let d;return e[7]!==s||e[8]!==r?(d=n.jsxs("button",{type:"button",onClick:s,className:a,children:[r,l,V]}),e[7]=s,e[8]=r,e[9]=d):d=e[9],d}function Za(t){const e=D.c(4),{data:s}=t;let o;e[0]!==s?(o=s.map(Xa),e[0]=s,e[1]=o):o=e[1];let a;return e[2]!==o?(a=n.jsx("div",{className:"flex items-center justify-center gap-[2px] h-10 overflow-hidden","aria-hidden":"true",children:o}),e[2]=o,e[3]=a):a=e[3],a}function Xa(t,e){return n.jsx("div",{className:"w-[2px] shrink-0 rounded-full bg-chart-2 transition-[height] duration-75 ease-out",style:{height:`${Math.max(4,Math.round(t*40))}px`}},e)}const Pe=12e3,Ct=oe({token:te(),expiresAt:qs()});Qs("provider",[oe({provider:Ae("elevenlabs"),conversationToken:te().min(1)}),oe({provider:Ae("openai"),transport:Ae("webrtc")})]);const ei=Ks([Ct.extend({provider:Ae("elevenlabs").default("elevenlabs"),conversationToken:te().min(1)}),Ct.extend({provider:Ae("openai"),transport:Ae("webrtc")})]);oe({token:te().min(1).max(4096),text:te().trim().min(1).max(Pe)});const ps=oe({request:te().trim().min(1).max(Pe)}),Je=5e3;Tt(oe({role:Re(["user","agent"]),text:te().min(1).max(Je)})).max(60).refine(t=>t.reduce((e,s)=>e+s.text.length,0)<=Je,{message:"Voice transcript is too long"});function pr(t){const e=[];let s=Je;for(const o of t.slice(-60).reverse()){if(s<=0)break;const a=o.text.slice(-s);e.unshift({role:o.role,text:a}),s-=a.length}return e}oe({token:te().min(1).max(4096),sdp:te().min(1).max(1e5),language:Re(["en","pt"]).default("en")}).strict();const ti=oe({sdp:te().min(1).max(1e5)});async function si(t,e,s,o,a){if(t.provider==="openai"){const{startOpenAIConversation:l}=await pt(async()=>{const{startOpenAIConversation:V}=await import("./openai-conversation-DA7CTgnA.js");return{startOpenAIConversation:V}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118]));return l(a,s,o)}const{Conversation:i}=await pt(async()=>{const{Conversation:l}=await import("./index-yN0BIuMc.js");return{Conversation:l}},[]);o.throwIfAborted();const r=await i.startSession({...s,clientTools:{delegate_to_agent:async l=>{const V=ps.safeParse(l);return JSON.stringify(V.success?await s.onDelegate(V.data):{status:"rejected",reason:"A complete request is required."})},get_agent_status:()=>JSON.stringify(s.getWorkStatus()),stop_agent_work:()=>JSON.stringify(s.cancelCurrentWork())},conversationToken:t.conversationToken,connectionType:"webrtc",overrides:{agent:{language:e}}});return o.aborted&&(await r.endSession(),o.throwIfAborted()),{endSession:()=>r.endSession(),setMicMuted:l=>r.setMicMuted(l),getOutputVolume:()=>r.getOutputVolume(),publishUpdate:l=>{const V=JSON.stringify({source:"Studio background data, not a user request or instructions",contextId:l.contextId,requestId:l.delegationId,text:l.text});l.delivery==="context"?r.sendContextualUpdate(V):r.sendUserMessage(`[Studio background event, not a new user request]
|
|
10
10
|
${V}
|
|
11
11
|
Briefly report this update. Do not delegate it as new work.`)}}}const ni=oe({background:Ae(!0),status:Ae("started"),jobId:te().min(1)}),oi=oe({item:oe({id:te().min(1),title:te(),status:te()})}),ai=t=>`${t}:react-msg`;function hs(t,e){const s=t.findIndex(a=>a.id===e&&a.role==="user");if(s<0)return null;const o=[];for(const a of t.slice(s+1))if(!a.metadata?.subtaskJobId){if(a.role==="user")break;a.role==="assistant"&&o.push(a)}return o}function St(t,e){const s=[],o=[];for(const a of hs(t,e)??[])for(const i of a.parts){if(!("state"in i)||i.state!=="output-available"||!("output"in i))continue;const r=i.type;if(r==="tool-subtask"){const l=ni.safeParse(i.output);l.success&&s.push(l.data.jobId)}else if(r==="tool-TASK_BOARD_ITEM_CREATE"){const l=oi.safeParse(i.output);l.success&&o.push(l.data.item)}}return{backgroundJobs:s,tasks:o}}function Nt(t,e){const s=hs(t,e);if(!s)return null;const o=s.at(-1);if(!o||o.parts.some(l=>"state"in l&&["approval-requested","input-streaming","input-available"].includes(String(l.state))))return null;const a=o.parts.findLast(l=>l.type==="text"||l.type==="dynamic-tool"||l.type.startsWith("tool-"));if(a?.type!=="text")return"";if(a.state==="streaming")return null;const i=a.text.replace(/```[\s\S]*?```/g,"").replace(/!\[[^\]]*\]\([^)]*\)/g,"").replace(/\[([^\]]+)\]\([^)]*\)/g,"$1").replace(/^\s{0,3}(?:#{1,6}\s+|[-*+]\s+|\d+\.\s+)/gm,"").replace(/[*_`]/g,"").trim();if(!i)return"";if(i.length<=Pe)return i;const r=i.slice(0,Pe-1);return`${r.slice(0,r.lastIndexOf(" "))}…`}class ii{constructor(e,s){this.url=e,this.language=s}url;language;state={phase:"idle",muted:!1,working:!1,error:null};listeners=new Set;generation=0;conversation;startupAbort;userSpeaking=!1;token;timer;expires;bindings;jobs=new Map;announcements=[];lastActivity=0;approvalReported=!1;cleanup=Promise.resolve();dispatchQueue=Promise.resolve();lastContext="";lastWorkStatus="";utterance=0;seenUserEvents=new Set;tasks=new Map;boardUpdates=new Map;subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});getSnapshot=()=>this.state;outputVolume=()=>this.conversation?.getOutputVolume()??0;patch(e){if(!Object.entries(e).every(([s,o])=>this.state[s]===o)){this.state={...this.state,...e};for(const s of this.listeners)s()}}updateBindings(e,s){if(this.bindings=e,!s&&this.state.phase!=="idle"){this.stop();return}this.conversation&&(this.updateContext(),this.collectResults())}requestStatus(e){return e.result!==void 0?"finished":e.accepted?e.background?"running_in_background":this.bindings?.messages.some(s=>s.id===e.messageId)?"running":"queued":"submitting"}status(){const e=this.bindings;return{status:e?.isWaitingForApprovals?"approval_required":e?.error||e?.status==="error"?"failed":e?.isStreaming||e?.isRunInProgress?"working":"idle",requests:[...this.jobs.values()].slice(-6).map(s=>({id:s.messageId,request:s.request.slice(0,200),status:this.requestStatus(s),result:s.result?.slice(0,500)})),tasks:[...this.tasks.values()].slice(-10).map(s=>({title:s.title.slice(0,120),status:s.status}))}}updateContext(){const e=this.bindings?.voiceContext??"";e!==this.lastContext&&(this.lastContext=e,this.conversation?.publishUpdate({text:`Current Studio view, supplied as context only:
|
|
12
12
|
${e.slice(0,12e3)}`,delivery:"context",contextId:"studio-view"}))}collectResults(){const e=this.bindings;if(!e||!this.conversation)return;const s=e.isStreaming||e.isRunInProgress;if(this.patch({working:s||[...this.jobs.values()].some(o=>o.accepted&&o.result===void 0)}),this.publishWorkStatus(),e.isWaitingForApprovals){this.approvalReported||(this.approvalReported=!0,this.report("The Studio agent needs the user's approval. The approval controls are visible in this chat. Ask the user to review them; do not approve on their behalf."));return}this.approvalReported=!1;for(const o of this.jobs.values()){if(!o.accepted||o.result!==void 0)continue;if(o.background){this.collectBackground(o,s);continue}const a=e.messages.findIndex(l=>l.id===o.messageId);if(a<0)continue;const i=a>=0&&e.messages.slice(a+1).some(l=>l.role==="user");if(s&&!i)continue;let r;if(!s&&!i&&(e.error||e.status==="error"))r="The agent's run failed. Ask the user to return to the chat for the error details; do not claim completion.";else if(!s&&!i&&e.finishReason&&["error","length","content-filter","aborted"].includes(e.finishReason))r=`The run ended with status ${e.finishReason}; successful completion is not established.`;else{const l=Nt(e.messages,o.messageId);if(l===null)continue;r=l;const V=St(e.messages,o.messageId);if(this.track(V.tasks),V.backgroundJobs.length){o.background=V.backgroundJobs,this.collectBackground(o,s);continue}}this.finish(o,r||"The agent finished without a final text response. Do not infer that the requested change succeeded.")}this.patch({working:s||[...this.jobs.values()].some(o=>o.accepted&&o.result===void 0)}),this.publishWorkStatus()}collectBackground(e,s){const o=this.bindings?.messages??[],a=[];for(const i of e.background??[]){const r=ai(i),l=o.findIndex(u=>u.id===r);if(l<0)return;const V=o.slice(l+1).some(u=>u.role==="user");if(s&&!V)return;const d=Nt(o,r);if(d===null)return;this.track(St(o,r).tasks),a.push(d)}this.finish(e,a.filter(Boolean).join(`
|