@xopcai/xopc 0.0.456 → 0.0.459
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/browser-ext/dist/sidepanel.js +5 -1
- package/dist/browser-ext/manifest.json +1 -1
- package/dist/extensions/telegram/xopc.extension.json +1 -1
- package/dist/gateway/static/root/assets/{activity-store-DYwR1u3f.js → activity-store-CQHh48Zf.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-avatar-dicebear-CsRBprL-.js → agent-avatar-dicebear-CAz-Ke6Q.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-avatar-display-DqFYHXCS.js → agent-avatar-display-loBdGw_i.js} +2 -2
- package/dist/gateway/static/root/assets/{agent-defaults-settings-panel-DOAJrMLe.js → agent-defaults-settings-panel-By2Q-6JS.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-plugin-dialog-vqlN3ORH.js → agent-plugin-dialog-CikzCYAG.js} +1 -1
- package/dist/gateway/static/root/assets/{agents-BgHlOVRV.js → agents-CGUdvmIT.js} +3 -3
- package/dist/gateway/static/root/assets/{agents-admin-api-CKscfdvA.js → agents-admin-api-D0N09mqJ.js} +1 -1
- package/dist/gateway/static/root/assets/{api-CHM2c_Ah.js → api-B1J5ajiP.js} +1 -1
- package/dist/gateway/static/root/assets/{api-DPNeNCmR.js → api-B4FJ51EC.js} +1 -1
- package/dist/gateway/static/root/assets/{app-management-settings-panel-Bhz6bj1C.js → app-management-settings-panel-BHlUDZOG.js} +1 -1
- package/dist/gateway/static/root/assets/{appearance-settings-BX32aogA.js → appearance-settings-Du5JLyV1.js} +1 -1
- package/dist/gateway/static/root/assets/{apps-page-0Yo3jBsQ.js → apps-page-M2XD1Pzu.js} +1 -1
- package/dist/gateway/static/root/assets/{archive-plugin-Bha8obMe.js → archive-plugin-BAvglLfu.js} +1 -1
- package/dist/gateway/static/root/assets/{automation-api-mn8ihWJ_.js → automation-api-DxBmyzp0.js} +1 -1
- package/dist/gateway/static/root/assets/automation-display-DaVDNZz8.js +2 -0
- package/dist/gateway/static/root/assets/{automation-result-state-COzakzak.js → automation-result-state-CAsqgMNR.js} +1 -1
- package/dist/gateway/static/root/assets/{automation-run-list-BhtaMpTb.js → automation-run-list-BmYeWB_N.js} +1 -1
- package/dist/gateway/static/root/assets/automation-task-card-CiJmJ7_h.js +2 -0
- package/dist/gateway/static/root/assets/{automations-page-CgQDpSpK.js → automations-page-CVjgENMO.js} +1 -1
- package/dist/gateway/static/root/assets/automations-workspace-CGPWyL0P.js +9 -0
- package/dist/gateway/static/root/assets/{binary-plugins-DUbrJFLU.js → binary-plugins-D2bFqG6K.js} +1 -1
- package/dist/gateway/static/root/assets/{block-editor-DW--pXAc.js → block-editor-CmnkluMF.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-settings-page-CDh6nxs9.js → browser-settings-page-CGcgZOWh.js} +1 -1
- package/dist/gateway/static/root/assets/capabilities-DB713nRi.js +1 -0
- package/dist/gateway/static/root/assets/{capabilities-DKbXv8Ck.js → capabilities-DDqDvCBs.js} +1 -1
- package/dist/gateway/static/root/assets/capabilities-page-D2hq4cgE.js +2 -0
- package/dist/gateway/static/root/assets/{capabilities-settings-panel-BW5jQz5R.js → capabilities-settings-panel-CvF8VRTv.js} +1 -1
- package/dist/gateway/static/root/assets/{channels-BzZp42yO.js → channels-BDVQ6Z7A.js} +1 -1
- package/dist/gateway/static/root/assets/{chat-agents-api-UOdNWZ0_.js → chat-agents-api-CjlzCSmC.js} +1 -1
- package/dist/gateway/static/root/assets/{chat-chart-block-NSy-B0NS.js → chat-chart-block-stPJEZ90.js} +1 -1
- package/dist/gateway/static/root/assets/chat-page-BhPw56Vc.js +71 -0
- package/dist/gateway/static/root/assets/{chat-terminal-dock-CAaHWS7F.js → chat-terminal-dock-B4uA_W6R.js} +1 -1
- package/dist/gateway/static/root/assets/{command-palette-api-Dkn9bbYd.js → command-palette-api-CP0F6sIm.js} +1 -1
- package/dist/gateway/static/root/assets/{composer-model-config-control-BrK8-SNz.js → composer-model-config-control-DAagrRx_.js} +1 -1
- package/dist/gateway/static/root/assets/{composer-notifications-B-kL3qAA.js → composer-notifications-CqV6Xj-H.js} +1 -1
- package/dist/gateway/static/root/assets/composer-payload-handoff-Dc43dgSg.js +1 -0
- package/dist/gateway/static/root/assets/{computer-settings-page-C9KdEecx.js → computer-settings-page-f-vcEpeF.js} +1 -1
- package/dist/gateway/static/root/assets/{connected-providers-grid-D_8v6Qex.js → connected-providers-grid-CZ-FXxaW.js} +1 -1
- package/dist/gateway/static/root/assets/{connection-usage-guide-CiVpcbds.js → connection-usage-guide-Cibh2lrV.js} +1 -1
- package/dist/gateway/static/root/assets/{connector-service-page-B919cKSm.js → connector-service-page-Btz68iy8.js} +1 -1
- package/dist/gateway/static/root/assets/{connectors-api-CgsSm-Av.js → connectors-api-CTuVWwBf.js} +1 -1
- package/dist/gateway/static/root/assets/connectors-page-DyzDVVfz.js +1 -0
- package/dist/gateway/static/root/assets/{date-picker-dx284jQI.js → date-picker-XnE3iFhG.js} +1 -1
- package/dist/gateway/static/root/assets/{date-time-picker-Dj-bhLNP.js → date-time-picker-VGKm0HVn.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-Cn1TfGz4.js → desktop-pet-CBm3DySQ.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-settings-CsmrvoxU.js → desktop-pet-settings-6O77QXGo.js} +1 -1
- package/dist/gateway/static/root/assets/{dev-view-store-BOxbj1ie.js → dev-view-store-B8fGILny.js} +1 -1
- package/dist/gateway/static/root/assets/{device-pairing-wizard-CAqFIFRC.js → device-pairing-wizard-qtUvtdDT.js} +1 -1
- package/dist/gateway/static/root/assets/{directory-picker-path-field-BxEw5OrT.js → directory-picker-path-field-ByDqf5fE.js} +1 -1
- package/dist/gateway/static/root/assets/{discussion-annotation-sync-CyntTwIa.js → discussion-annotation-sync-fwPPMPv9.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-authoritative-grants-C0ReZguU.js → extension-authoritative-grants-BfL8dMBf.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-debug-page-Cd3HMUbi.js → extension-debug-page-BPwRrP3L.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-iframe-host-DiIqM2JO.js → extension-iframe-host-DIH4TcdH.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-marketplace-api-CK5CMKTs.js → extension-marketplace-api-BIzkukYp.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-message-router-Dn8JzOdR.js → extension-message-router-C9JDpo_7.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-CLZtAtqm.js → extension-page-CLDoL5N8.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-provider-CbVokTvd.js → extension-provider-BPIoHw4r.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-settings-page-BM79cwUy.js → extension-settings-page-BO_UKeG8.js} +1 -1
- package/dist/gateway/static/root/assets/file-preview-surface-i5UOFnQF.js +1 -0
- package/dist/gateway/static/root/assets/{gateway-config-swr-OGhON-s6.js → gateway-config-swr-1Rk0LeEM.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-realtime-B9u4uSXW.js → gateway-realtime-DIs1pjkQ.js} +1 -1
- package/dist/gateway/static/root/assets/gateway-realtime-store-sx7B8kdC.js +1 -0
- package/dist/gateway/static/root/assets/{gateway-restart-DKAweWmg.js → gateway-restart-DTmlcJps.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-settings-Dc7qUbG-.js → gateway-settings-ClcCloqQ.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-startup-retry-BaaoKBoB.js → gateway-startup-retry-D6WPS0RW.js} +1 -1
- package/dist/gateway/static/root/assets/{global-defaults-api-BIr3ApRj.js → global-defaults-api-BpDMnJe7.js} +1 -1
- package/dist/gateway/static/root/assets/home-page-BPPe4JXB.js +7 -0
- package/dist/gateway/static/root/assets/{image-generation-api-C7D2IetZ.js → image-generation-api-sbtx4NiC.js} +1 -1
- package/dist/gateway/static/root/assets/{imports-page-BjEdZJxZ.js → imports-page-CBlaxUhl.js} +1 -1
- package/dist/gateway/static/root/assets/index-D0_qnBzh.css +1 -0
- package/dist/gateway/static/root/assets/index-Hv71yddc.js +11 -0
- package/dist/gateway/static/root/assets/{install-connector-dialog-BsiyYQhx.js → install-connector-dialog-DxSv1wS2.js} +1 -1
- package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-CIthQ1lp.js → keyboard-shortcuts-settings-CnAV96nr.js} +1 -1
- package/dist/gateway/static/root/assets/{local-app-workbench-page-CSCIHvZV.js → local-app-workbench-page-D8oqDDAn.js} +1 -1
- package/dist/gateway/static/root/assets/{local-apps-page-EntiM0tz.js → local-apps-page-BI3Be5qo.js} +1 -1
- package/dist/gateway/static/root/assets/{local-session-drafts-XurtjR58.js → local-session-drafts-BIBHRkpM.js} +2 -2
- package/dist/gateway/static/root/assets/{locale-store-cg9cm2EL.js → locale-store-Dy1EByeG.js} +1 -1
- package/dist/gateway/static/root/assets/{logs-page-rmS9VSem.js → logs-page-CMW34T31.js} +1 -1
- package/dist/gateway/static/root/assets/{management-api-B6jVuJ6W.js → management-api-B5w5DdXH.js} +1 -1
- package/dist/gateway/static/root/assets/{management-settings-DdI9gs51.js → management-settings-DfcMIqbQ.js} +1 -1
- package/dist/gateway/static/root/assets/{markdown-view-D1zBWkfB.js → markdown-view-BlxIaCCQ.js} +1 -1
- package/dist/gateway/static/root/assets/{mcp-conversation-setup-page-Bn49Ph1n.js → mcp-conversation-setup-page-CsTSmjmX.js} +1 -1
- package/dist/gateway/static/root/assets/{media-plugins-Cd6hAGDp.js → media-plugins-DGhWjPIU.js} +1 -1
- package/dist/gateway/static/root/assets/messages-BAnhwALN.js +3 -0
- package/dist/gateway/static/root/assets/{model-selector-CL6WT-jw.js → model-selector-C-CqPBao.js} +1 -1
- package/dist/gateway/static/root/assets/{models-hub-cache-s0FMNhq9.js → models-hub-cache-Bgh3Gfgl.js} +1 -1
- package/dist/gateway/static/root/assets/{note-detail-panel-C6s0WlNL.js → note-detail-panel-DLPwJGh0.js} +3 -3
- package/dist/gateway/static/root/assets/note-image-lightbox-CqK_uJ6Y.js +1 -0
- package/dist/gateway/static/root/assets/{notes-api-CR75RHd0.js → notes-api-CdXA-g9r.js} +1 -1
- package/dist/gateway/static/root/assets/{notes-page-CR7dNVDi.js → notes-page-DpfN5bZZ.js} +1 -1
- package/dist/gateway/static/root/assets/{oauth-api-CvPnQTlH.js → oauth-api-B560CHeD.js} +1 -1
- package/dist/gateway/static/root/assets/{oauth-provider-connect-Dk1NeeqD.js → oauth-provider-connect-D63M8Iv7.js} +1 -1
- package/dist/gateway/static/root/assets/{page-context-capture-button-BPtX67hZ.js → page-context-capture-button-Dibmspef.js} +1 -1
- package/dist/gateway/static/root/assets/{page-context-draft-Ckb8baxj.js → page-context-draft-Cr5GqS2D.js} +1 -1
- package/dist/gateway/static/root/assets/page-header-store-Bm8oxpFR.js +1 -0
- package/dist/gateway/static/root/assets/{personal-avatar-CZSnrSfc.js → personal-avatar-BMRVyTrE.js} +1 -1
- package/dist/gateway/static/root/assets/{personal-page-C89kLOIL.js → personal-page-BBGjwkAC.js} +1 -1
- package/dist/gateway/static/root/assets/{personal-profile-settings-DJRDcK2c.js → personal-profile-settings-HMQY9lz9.js} +1 -1
- package/dist/gateway/static/root/assets/{personal-settings-panel-C6p25Noq.js → personal-settings-panel-BppxtWBl.js} +1 -1
- package/dist/gateway/static/root/assets/{phone-dependencies-card-DKkFFpqi.js → phone-dependencies-card-flTci8mm.js} +1 -1
- package/dist/gateway/static/root/assets/{phone-model-connection-CRRHq4PQ.js → phone-model-connection-Vi_Swyv6.js} +1 -1
- package/dist/gateway/static/root/assets/{phone-model-picker-CN_I0-46.js → phone-model-picker-BOv3mb_F.js} +1 -1
- package/dist/gateway/static/root/assets/{phone-settings-page-CkdSOA7D.js → phone-settings-page-vD0bTcHj.js} +1 -1
- package/dist/gateway/static/root/assets/{phone-workspace-store-CC61pIuJ.js → phone-workspace-store-Ltrevdsx.js} +1 -1
- package/dist/gateway/static/root/assets/{plugin-details-dialog-Bqz4jT53.js → plugin-details-dialog-nSDw8sfo.js} +1 -1
- package/dist/gateway/static/root/assets/{preference-select-fields-DHeNbAvn.js → preference-select-fields-D1pZekPs.js} +1 -1
- package/dist/gateway/static/root/assets/{product-automation-feedback-BN2HTA9T.js → product-automation-feedback-D51I7Lg3.js} +1 -1
- package/dist/gateway/static/root/assets/{product-open-page-B-j4gpLD.js → product-open-page-BO8lUvw3.js} +1 -1
- package/dist/gateway/static/root/assets/product-preview-content-WkF2j_c-.js +1 -0
- package/dist/gateway/static/root/assets/{product-preview-modal-aurFBFq4.js → product-preview-modal-DMHOKocl.js} +2 -2
- package/dist/gateway/static/root/assets/{project-detail-page-sHcdluTm.js → project-detail-page-Dj_PuT7k.js} +2 -2
- package/dist/gateway/static/root/assets/{project-understanding-HNK9lFVy.js → project-understanding-Cg8WbBNB.js} +1 -1
- package/dist/gateway/static/root/assets/{projects-page-CugSyKl5.js → projects-page-C6Pt6OdT.js} +1 -1
- package/dist/gateway/static/root/assets/{providers-api-DUntOOqr.js → providers-api-Nytkkop9.js} +1 -1
- package/dist/gateway/static/root/assets/{recording-upload-DIwP541B.js → recording-upload-CyZSl2DJ.js} +1 -1
- package/dist/gateway/static/root/assets/{registry-api-BTd_OgbD.js → registry-api-DuDIthjL.js} +1 -1
- package/dist/gateway/static/root/assets/{remote-access-hub-f5mIfsBF.js → remote-access-hub-DePwafOK.js} +1 -1
- package/dist/gateway/static/root/assets/{resource-unavailable-DtQ2rfu_.js → resource-unavailable-BRKhKJA0.js} +1 -1
- package/dist/gateway/static/root/assets/right-workspace-store-HPw7Gw0n.js +1 -0
- package/dist/gateway/static/root/assets/route-preload-gas8e1we.js +2 -0
- package/dist/gateway/static/root/assets/routine-panel-CXs4PjW0.js +2 -0
- package/dist/gateway/static/root/assets/{runtime-tools-api-C1iI8EPo.js → runtime-tools-api-Dd8a07eo.js} +1 -1
- package/dist/gateway/static/root/assets/{runtime-tools-settings-panel-0tdI1z0g.js → runtime-tools-settings-panel-CvHQoqHu.js} +1 -1
- package/dist/gateway/static/root/assets/service-recommendation-list-DDlMyPvC.js +1 -0
- package/dist/gateway/static/root/assets/{session-api-CQlEq0MB.js → session-api-BFiIYodK.js} +1 -1
- package/dist/gateway/static/root/assets/{session-manager-C7RfUfqI.js → session-manager-D2LaQymu.js} +2 -2
- package/dist/gateway/static/root/assets/{sessions-page-DdS8U0RV.js → sessions-page-DQEq_VJS.js} +1 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-Cvx7DnU8.js +1 -0
- package/dist/gateway/static/root/assets/{settings-advanced-section-C6dPu5i1.js → settings-advanced-section-B-H1gYOs.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-mode-store-BSiiowQa.js → settings-mode-store-YH60sibB.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-C4CYw21O.js → settings-page-D2qkIrUg.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-header-BSMu5Zq3.js → settings-page-header-DEZZ8D0S.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-layout-B_vMffB1.js → settings-page-layout-De2j64Lo.js} +1 -1
- package/dist/gateway/static/root/assets/{setup-interaction-page-DKXfFdNt.js → setup-interaction-page-Dh6BPwv0.js} +1 -1
- package/dist/gateway/static/root/assets/{setup-status-panel-BbAZ9w77.js → setup-status-panel-DGAAczL-.js} +1 -1
- package/dist/gateway/static/root/assets/{share-link-dialog-ztX1WPXG.js → share-link-dialog-C1t_HB6f.js} +1 -1
- package/dist/gateway/static/root/assets/{share-preview-page-Ds2Ydfg6.js → share-preview-page-fV5USZb1.js} +1 -1
- package/dist/gateway/static/root/assets/{shares-api-CSZqeNL4.js → shares-api-Dm07CnXw.js} +1 -1
- package/dist/gateway/static/root/assets/{shares-settings-CX3TNAmI.js → shares-settings-sl40lqND.js} +1 -1
- package/dist/gateway/static/root/assets/{skill-api-CGzAQ-MX.js → skill-api-BV8oFqeE.js} +1 -1
- package/dist/gateway/static/root/assets/{skill-list-api-DfUsku-x.js → skill-list-api-1o_YRCu9.js} +1 -1
- package/dist/gateway/static/root/assets/{skill-reload-api-Y9qSMnBd.js → skill-reload-api-fGsO9Y86.js} +1 -1
- package/dist/gateway/static/root/assets/{skills-page-DnMN50Ot.js → skills-page-FTd0Z7Ey.js} +1 -1
- package/dist/gateway/static/root/assets/{system-settings-panel-DWNkQmme.js → system-settings-panel-CUI6QHEP.js} +1 -1
- package/dist/gateway/static/root/assets/task-detail-page-_5TEldtl.js +3 -0
- package/dist/gateway/static/root/assets/task-result-evidence-CSJeB9AH.js +1 -0
- package/dist/gateway/static/root/assets/{terminal-panel-store-D8eZPvql.js → terminal-panel-store-Du53Upr2.js} +1 -1
- package/dist/gateway/static/root/assets/{theme-store-GZQ3pTgy.js → theme-store-BaWep_o7.js} +1 -1
- package/dist/gateway/static/root/assets/{tracing-settings-page-DM3-7Hlw.js → tracing-settings-page-CnciBMVH.js} +1 -1
- package/dist/gateway/static/root/assets/{tunnel-api-DOGAIXRR.js → tunnel-api-Iz7JCBt3.js} +1 -1
- package/dist/gateway/static/root/assets/{understanding-activity-store-CuPfe0eQ.js → understanding-activity-store-BFc8PamJ.js} +1 -1
- package/dist/gateway/static/root/assets/{understanding-refresh-store-CIpGYSl0.js → understanding-refresh-store-CdEfR40A.js} +1 -1
- package/dist/gateway/static/root/assets/{usage-page-BA9Yrvqu.js → usage-page-DL2fmeOh.js} +1 -1
- package/dist/gateway/static/root/assets/{use-autosave-CO0IPCVg.js → use-autosave-N_SjHXTw.js} +1 -1
- package/dist/gateway/static/root/assets/use-composer-attachments-CO7XLI4x.js +2 -0
- package/dist/gateway/static/root/assets/{use-file-preview-expanded-dhNMHf5b.js → use-file-preview-expanded-BXXeXnT0.js} +3 -3
- package/dist/gateway/static/root/assets/{use-personal-profile-CVqDWBDS.js → use-personal-profile-C1vqD9yV.js} +1 -1
- package/dist/gateway/static/root/assets/{use-realtime-voice-DDVVlX1R.js → use-realtime-voice-C7iWQuUv.js} +1 -1
- package/dist/gateway/static/root/assets/{use-workspace-tree-CZej8mhf.js → use-workspace-tree-D27u-eoX.js} +1 -1
- package/dist/gateway/static/root/assets/{user-model-page-Bbi2MpIS.js → user-model-page-D2FHjLi7.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-api-key-field-DpwUDAvu.js → voice-api-key-field-B_GApUQP.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-config-api-GIuXoHXw.js → voice-config-api-DhJ3l8fk.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-input-shortcut-events-Cc30ZcFy.js → voice-input-shortcut-events-CEeFBhp3.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-settings-DA3m5MT0.js → voice-settings-BiqJ0tlf.js} +1 -1
- package/dist/gateway/static/root/assets/{work-discovery-overlay-yGUkk1NV.js → work-discovery-overlay-UvWbDUXi.js} +1 -1
- package/dist/gateway/static/root/assets/{work-discovery-page-RN6iuY-0.js → work-discovery-page-BM1HsYz6.js} +1 -1
- package/dist/gateway/static/root/assets/{working-directory-picker-modal-CeXl9w6z.js → working-directory-picker-modal-BGZduAXV.js} +1 -1
- package/dist/gateway/static/root/assets/{workspace-api-B1Uirhxf.js → workspace-api-LghfbP5g.js} +2 -2
- package/dist/gateway/static/root/assets/workspace-editor-agent-store-DVPJcbuE.js +1 -0
- package/dist/gateway/static/root/assets/workspace-file-preview-dialog-NffP-UXC.js +1 -0
- package/dist/gateway/static/root/assets/{workspace-open-location-menu-DWGNOIE2.js → workspace-open-location-menu-CvZxU9de.js} +1 -1
- package/dist/gateway/static/root/assets/workspace-preview-store-Do31QQH5.js +1 -0
- package/dist/gateway/static/root/assets/{xopc-cloud-account-card-x-XT4bKF.js → xopc-cloud-account-card-Q_jezTUy.js} +1 -1
- package/dist/gateway/static/root/index.html +92 -90
- package/dist/package.js +1 -1
- package/dist/packages/gateway-contract/src/automations.js +6 -0
- package/dist/packages/gateway-contract/src/capabilities.js +1 -1
- package/dist/packages/gateway-contract/src/home.js +3 -0
- package/dist/packages/gateway-contract/src/index.js +3 -1
- package/dist/packages/gateway-contract/src/observation.js +177 -0
- package/dist/packages/gateway-contract/src/session-input-command.js +5 -1
- package/dist/src/agent/agent-manager.js +1 -1
- package/dist/src/agent/background-review/run-background-review.js +1 -1
- package/dist/src/agent/client-error-format.js +1 -1
- package/dist/src/agent/embedded/execution-tool-policy.d.ts +1 -0
- package/dist/src/agent/embedded/execution-tool-policy.js +31 -5
- package/dist/src/agent/embedded/run-for-session.js +16 -8
- package/dist/src/agent/embedded/run-turn.js +65 -29
- package/dist/src/agent/embedded/types.d.ts +2 -0
- package/dist/src/agent/external-tools/cliProvider.js +2 -2
- package/dist/src/agent/external-tools/composio-provider.js +2 -2
- package/dist/src/agent/external-tools/endpoint-provider.js +3 -3
- package/dist/src/agent/fallback/reason.js +1 -1
- package/dist/src/agent/orchestration/llm-turn-retry.d.ts +5 -0
- package/dist/src/agent/orchestration/llm-turn-retry.js +17 -6
- package/dist/src/agent/service.js +1 -1
- package/dist/src/agent/skills/index.js +1 -1
- package/dist/src/agent/skills/managed-store.js +1 -1
- package/dist/src/agent/skills/skill-manage-ops.js +1 -1
- package/dist/src/agent/tools/personal-memory-tool.js +1 -1
- package/dist/src/agent/tools/personal-read-tool.js +1 -1
- package/dist/src/agent/tools/xopc-use-tool.js +2 -2
- package/dist/src/agent-catalog/capabilities.js +2 -2
- package/dist/src/agent-catalog/repository.js +1 -1
- package/dist/src/automations/api/routes.js +2 -2
- package/dist/src/automations/capabilities/drafts.js +1 -1
- package/dist/src/automations/capabilities/write.d.ts +10 -0
- package/dist/src/automations/capabilities/write.js +1 -1
- package/dist/src/automations/configuration-conversation.js +1 -1
- package/dist/src/automations/domain/types.d.ts +14 -0
- package/dist/src/automations/domain/validation.d.ts +20 -0
- package/dist/src/automations/domain/validation.js +6 -0
- package/dist/src/automations/draft/automation-draft-validator.d.ts +5 -0
- package/dist/src/automations/draft/automation-draft-validator.js +1 -0
- package/dist/src/automations/index.js +2 -2
- package/dist/src/automations/service/action-executor.d.ts +2 -0
- package/dist/src/automations/service/action-executor.js +18 -2
- package/dist/src/automations/service/index.js +2 -2
- package/dist/src/browser/providers/browser-ext-install.js +1 -1
- package/dist/src/capabilities/runtime/dispatcher.js +1 -1
- package/dist/src/capabilities/runtime/product.js +1 -1
- package/dist/src/cli/commands/agents.js +1 -1
- package/dist/src/cli/commands/doctor/checks/database-schema.js +1 -1
- package/dist/src/cli/commands/models.js +1 -1
- package/dist/src/cli/commands/onboard/model.js +1 -1
- package/dist/src/cli/utils/init-workspace-core.js +1 -1
- package/dist/src/computer/endpoint-transport.js +1 -1
- package/dist/src/config/agent-profile.js +1 -1
- package/dist/src/execution-environments/local-worktree-manager.js +1 -1
- package/dist/src/extensions/agent-plugins/skill-catalog.js +1 -1
- package/dist/src/extensions/agent-plugins/validation.js +1 -1
- package/dist/src/gateway/agents-admin.js +2 -2
- package/dist/src/gateway/global-defaults-admin.js +1 -1
- package/dist/src/gateway/hono/routes/agents.js +1 -1
- package/dist/src/gateway/hono/routes/auth-registry-extensions.js +1 -1
- package/dist/src/gateway/hono/routes/config-patch/misc.js +1 -1
- package/dist/src/gateway/hono/routes/home.js +100 -2
- package/dist/src/gateway/hono/routes/local-app-run-streams.js +1 -1
- package/dist/src/gateway/hono/routes/notes.js +2 -2
- package/dist/src/gateway/hono/routes/phone-setup.js +1 -1
- package/dist/src/gateway/hono/routes/projects.js +2 -2
- package/dist/src/gateway/hono/routes/session-input-handler.js +1 -1
- package/dist/src/gateway/hono/routes/tasks.js +2 -2
- package/dist/src/gateway/image-generation-setup.js +1 -1
- package/dist/src/gateway/security/gateway-scopes.js +1 -0
- package/dist/src/gateway/service.js +21 -4
- package/dist/src/gateway/xopc-cloud-capability-setup.js +1 -1
- package/dist/src/home-intelligence/application-service.d.ts +1 -0
- package/dist/src/home-intelligence/application-service.js +1 -1
- package/dist/src/home-intelligence/generator.js +4 -0
- package/dist/src/home-intelligence/host.d.ts +157 -1
- package/dist/src/home-intelligence/host.js +198 -14
- package/dist/src/home-intelligence/observation.d.ts +41 -0
- package/dist/src/home-intelligence/observation.js +297 -0
- package/dist/src/home-intelligence/repository.d.ts +1 -1
- package/dist/src/home-intelligence/routines.d.ts +36 -0
- package/dist/src/home-intelligence/routines.js +444 -0
- package/dist/src/home-intelligence/snapshot.d.ts +14 -0
- package/dist/src/imports/importService.js +1 -1
- package/dist/src/local-apps/automation-proposals.d.ts +20 -0
- package/dist/src/local-apps/automation-proposals.js +1 -1
- package/dist/src/local-apps/capabilities/automation-policy.js +1 -1
- package/dist/src/local-apps/capabilities/delegate.js +3 -3
- package/dist/src/local-apps/p1-services.js +1 -1
- package/dist/src/local-apps/service.js +1 -1
- package/dist/src/personal-agent/proactivity/repository.d.ts +1 -1
- package/dist/src/personal-agent/service.js +1 -1
- package/dist/src/providers/model-catalog-persistence.js +1 -1
- package/dist/src/providers/model-response.js +1 -1
- package/dist/src/realtime/compact-run-event.js +9 -0
- package/dist/src/runtime-tools/archive.js +1 -1
- package/dist/src/storage/sqlite/conversation-repository.js +4 -1
- package/dist/src/storage/sqlite/schema.d.ts +2 -2
- package/dist/src/storage/sqlite/schema.js +7 -7
- package/dist/src/storage/sqlite/schema.sql +71 -0
- package/dist/src/storage/sqlite/session-input-control-repository.js +2 -0
- package/dist/src/storage/sqlite/upgrades/272_home_observation.sql +41 -0
- package/dist/src/storage/sqlite/upgrades/273_observation_routines.sql +30 -0
- package/dist/src/tasks/capabilities/read.js +2 -2
- package/dist/src/tasks/capabilities/write.js +1 -1
- package/dist/src/tasks/home-query-service.js +1 -0
- package/dist/src/tui/backends/embedded-backend.js +1 -1
- package/dist/src/voice/realtime/persona-context.js +1 -1
- package/package.json +2 -2
- package/dist/gateway/static/root/assets/automation-task-card-BY_k6iWp.js +0 -3
- package/dist/gateway/static/root/assets/automations-workspace-CWEDraTP.js +0 -9
- package/dist/gateway/static/root/assets/calendar-clock-D-quYVPe.js +0 -1
- package/dist/gateway/static/root/assets/capabilities-kG175Q-7.js +0 -1
- package/dist/gateway/static/root/assets/capabilities-page-D1wQ2sPI.js +0 -2
- package/dist/gateway/static/root/assets/chat-page-BjYumhaI.js +0 -71
- package/dist/gateway/static/root/assets/composer-payload-handoff-DBE1mvOS.js +0 -1
- package/dist/gateway/static/root/assets/connectors-page-CEpfDCLA.js +0 -1
- package/dist/gateway/static/root/assets/file-preview-surface-z7_HV0WN.js +0 -1
- package/dist/gateway/static/root/assets/gateway-realtime-store-xB7Bq4Zs.js +0 -1
- package/dist/gateway/static/root/assets/home-page-i_PIrDCU.js +0 -3
- package/dist/gateway/static/root/assets/index-DBlVVXOA.js +0 -11
- package/dist/gateway/static/root/assets/index-DpkEeFEQ.css +0 -1
- package/dist/gateway/static/root/assets/messages-eQ2CYlpG.js +0 -3
- package/dist/gateway/static/root/assets/note-image-lightbox-DfK2KSgu.js +0 -1
- package/dist/gateway/static/root/assets/page-header-store-DU4NnGap.js +0 -1
- package/dist/gateway/static/root/assets/product-preview-content-EqrTk7kU.js +0 -1
- package/dist/gateway/static/root/assets/route-preload-DrfQJkmW.js +0 -2
- package/dist/gateway/static/root/assets/service-recommendation-list-DSIe-NRe.js +0 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-DnfH22f_.js +0 -1
- package/dist/gateway/static/root/assets/task-detail-page-DBnkT1Nj.js +0 -3
- package/dist/gateway/static/root/assets/task-input-card-lCMSy6YY.js +0 -1
- package/dist/gateway/static/root/assets/use-composer-attachments-CLIrD0mm.js +0 -2
- package/dist/gateway/static/root/assets/workspace-editor-agent-store-Nos5ebMv.js +0 -1
- package/dist/gateway/static/root/assets/workspace-file-preview-dialog-D0h2yJ3v.js +0 -1
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/chat-page-BjYumhaI.js","assets/rolldown-runtime-aKtaBQYM.js","assets/vendor-react-BOUWij0V.js","assets/preload-helper-Czpn1I53.js","assets/chunk-KS7C4IRE-CiwuuyV8.js","assets/locale-store-cg9cm2EL.js","assets/messages-eQ2CYlpG.js","assets/dist-CY7CS_D3.js","assets/es2015-DBLcMg5B.js","assets/dist-CxGUk8J-.js","assets/createLucideIcon-DPHK1VkS.js","assets/app-window-DXFNqt_0.js","assets/archive-Dz0hferG.js","assets/arrow-left-D880xG-P.js","assets/arrow-up-right-T72JbQ1Q.js","assets/arrow-up-D5ZtR1QT.js","assets/product-automation-feedback-BN2HTA9T.js","assets/activity-YogQEteU.js","assets/bot-DjLkhyZL.js","assets/circle-check-C23XjkUj.js","assets/circle-pause-CN9jYH2s.js","assets/clock-3-DnrAnuyZ.js","assets/external-link-DjqjBmc3.js","assets/notes-api-CR75RHd0.js","assets/download-Dk-ZjtO6.js","assets/markdown-view-D1zBWkfB.js","assets/file-image-CDUPkZvG.js","assets/plus-Q2yW6OE7.js","assets/x-B_N4OPjy.js","assets/cn-0WouolD0.js","assets/bundle-mjs-rHxsej31.js","assets/app-link-DImAfVs5.js","assets/product-delivery-BFfqdKLe.js","assets/schemas-CCWMleym.js","assets/local-apps-DeqzkJiF.js","assets/copy-to-clipboard-HOJ79TWv.js","assets/xml-_d7dTN2Q.js","assets/mermaid-render-oOellPHt.js","assets/markdown-view-DG8DDkEA.css","assets/chat-chart-block-NSy-B0NS.js","assets/check-DUBLcKHA.js","assets/copy-Dv6d4Dvw.js","assets/skeleton-DzdOeGYz.js","assets/loader-circle-CifKLtgG.js","assets/message-square-fVE7Ghj1.js","assets/pause-DuPxgSxk.js","assets/play-kxZvpBg8.js","assets/rotate-ccw-JM1TBLpp.js","assets/rotate-cw-LIg3Am9S.js","assets/sparkles-DHlfQFAF.js","assets/triangle-alert-2JXFNNKU.js","assets/volume-2-BSJhAY97.js","assets/zap-dximCGjy.js","assets/vendor-swr-CdRzEUwF.js","assets/button-Cc4hUNTt.js","assets/automation-api-mn8ihWJ_.js","assets/earth-C9Z4bTTG.js","assets/chevron-down-ccbiQQz_.js","assets/chevron-right-BweFrslA.js","assets/working-directory-picker-modal-CeXl9w6z.js","assets/file-archive-DanfQJNe.js","assets/interaction-BdhHBbYa.js","assets/form-field-width-DJw_jULe.js","assets/settings-form-draft-Dy10ldo8.js","assets/popover-select-CLsphyzA.js","assets/dist-GJ8-1PAx.js","assets/dist-BuHnPloF.js","assets/floating-ui.dom-seOukHzT.js","assets/settings-shell-dialog-layer-BU3UuiJr.js","assets/circle-alert-BEjgurr2.js","assets/new-chat-navigation-B6NPQ4h4.js","assets/circle-x-DFsCKeya.js","assets/circle-BoO4YvTx.js","assets/file-tree-utils-DJs1faGv.js","assets/database-CjjeZfRG.js","assets/ellipsis-0k4rZLoy.js","assets/file-BqMS_3DT.js","assets/file-text-D12HbeVy.js","assets/folder-kanban-CpLlFI1o.js","assets/folder-open-CyzJ19I9.js","assets/folder-CN-pC3XL.js","assets/use-file-preview-expanded-dhNMHf5b.js","assets/eye-CABVeTq0.js","assets/link-2-D_ZKYUW7.js","assets/message-square-plus-XP0tGdlV.js","assets/minimize-2-DtOGrlpo.js","assets/paperclip-f1HujQY1.js","assets/pencil-DmIY3Oa-.js","assets/refresh-cw-BRlGaq2w.js","assets/save-DRDABU--.js","assets/search-DA7gz22f.js","assets/constants-DpkUgykJ.js","assets/session-api-CQlEq0MB.js","assets/gateway-startup-retry-BaaoKBoB.js","assets/attachment-utils-core-BIOUBrpT.js","assets/composer-notifications-B-kL3qAA.js","assets/activity-store-DYwR1u3f.js","assets/app-chrome-BeB4KgOf.js","assets/electron-env-DHOGevH3.js","assets/use-async-resource-BHFGZCY2.js","assets/sliding-tab-list-CmcrqRzN.js","assets/sliding-indicator-hwz0sx3h.js","assets/workspace-api-B1Uirhxf.js","assets/files-BNL4kkSB.js","assets/index.module-Cd9ENXfk.js","assets/dist-ZrL34Ps4.js","assets/git-branch-Dh9uxTot.js","assets/globe-DSSGFWFn.js","assets/history-DXH_9jsE.js","assets/key-round-DWbpyU2U.js","assets/laptop-CI3hBVrl.js","assets/list-checks-BbsExAoq.js","assets/list-todo-CTVRto8O.js","assets/messages-square-BckAJrEW.js","assets/mic-CuUb7zc-.js","assets/monitor-Af5eAvF7.js","assets/install-connector-dialog-BsiyYQhx.js","assets/secret-input-DsjfQmDn.js","assets/is-masked-secret-DOkL5b_X.js","assets/connectors-api-CgsSm-Av.js","assets/gateway-config-swr-OGhON-s6.js","assets/oauth-provider-connect-Dk1NeeqD.js","assets/cloud-C4-yfnnk.js","assets/models-hub-cache-s0FMNhq9.js","assets/registry-api-BTd_OgbD.js","assets/oauth-api-CvPnQTlH.js","assets/connection-usage-guide-CiVpcbds.js","assets/connection-usage-BhdQRWgQ.js","assets/settings-2-D-csvaET.js","assets/settings-uiTATseT.js","assets/shield-check-BU58siTV.js","assets/smartphone-DSSsQFqA.js","assets/square-DMK_fB-3.js","assets/trash-2-DusmjVPV.js","assets/share-link-dialog-ztX1WPXG.js","assets/copy-text-row-CpiRzq4G.js","assets/wrench-DFb4r8bH.js","assets/tasks-BTLabOMp.js","assets/specialists-xbB3xL9e.js","assets/api-DPNeNCmR.js","assets/session-manager-C7RfUfqI.js","assets/local-session-drafts-XurtjR58.js","assets/tool-activity-BtJkgjFf.js","assets/gateway-realtime-B9u4uSXW.js","assets/gateway-realtime-store-xB7Bq4Zs.js","assets/agents-admin-api-CKscfdvA.js","assets/new-session-preferences-gb411vZP.js","assets/composer-model-config-control-BrK8-SNz.js","assets/model-selector-CL6WT-jw.js","assets/open-capability-settings-DQsmJxI7.js","assets/model-sort-_Tz8s_4N.js","assets/use-composer-attachments-CLIrD0mm.js","assets/chevron-left-DqFhpbvK.js","assets/capabilities-kG175Q-7.js","assets/capabilities-DKbXv8Ck.js","assets/file-preview-surface-z7_HV0WN.js","assets/phone-workspace-store-CC61pIuJ.js","assets/shares-api-CSZqeNL4.js","assets/skill-wire-pattern-BPpeIcCi.js","assets/chat-agents-api-UOdNWZ0_.js","assets/middleware-Pd0e8Igk.js","assets/composer-payload-handoff-DBE1mvOS.js","assets/workspace-editor-agent-store-Nos5ebMv.js","assets/voice-input-shortcut-events-Cc30ZcFy.js","assets/chunk-D32TOXHM-DQIy-Baq.js","assets/linkify-it-BkqEorO0.js","assets/tool-friendly-title-CP35P4VA.js","assets/use-realtime-voice-DDVVlX1R.js","assets/voice-CDlC6XMH.js","assets/voice-call-context-BM2A4bLz.js","assets/page-header-store-DU4NnGap.js","assets/loopi-CNtmi9FU.js","assets/loopi-C09I2mNj.css","assets/extension-provider-CbVokTvd.js","assets/theme-store-GZQ3pTgy.js","assets/extension-message-router-Dn8JzOdR.js","assets/agent-avatar-display-DqFYHXCS.js","assets/use-directory-picker-C4p7AgWY.js","assets/confirm-dialog-DrA5mTQp.js","assets/command-palette-api-Dkn9bbYd.js","assets/skill-list-api-DfUsku-x.js","assets/skill-api-utils-C7V4JVXM.js","assets/automation-task-card-BY_k6iWp.js","assets/calendar-clock-D-quYVPe.js","assets/message-circle-Badhj-4D.js","assets/date-picker-dx284jQI.js","assets/calendar-days-hw_Y-g-s.js","assets/time-picker-C1PXAXZF.js","assets/dev-view-store-BOxbj1ie.js","assets/extension-iframe-host-DiIqM2JO.js","assets/extension-authoritative-grants-C0ReZguU.js","assets/runtime-health-zDkHcOZO.js","assets/api-CHM2c_Ah.js","assets/terminal-panel-store-D8eZPvql.js","assets/agents-app-path-ciChvpCS.js","assets/agent-display-names-Bje7vfSn.js","assets/use-media-query-ady-FgjK.js","assets/oauth-authorization-window-o6URRos4.js","assets/page-context-draft-Ckb8baxj.js","assets/management-api-B6jVuJ6W.js","assets/side-chat-shortcut-BIw-1TTD.js","assets/chat-page-zQeUaawJ.css"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{a as t,n,t as r}from"./vendor-react-BOUWij0V.js";import{t as i}from"./preload-helper-Czpn1I53.js";import{m as a,t as o,u as s}from"./chunk-KS7C4IRE-CiwuuyV8.js";import{a as c,i as l,l as u,n as d}from"./locale-store-cg9cm2EL.js";import{t as f}from"./messages-eQ2CYlpG.js";import{a as p,n as m,o as h,r as g,s as _,t as v}from"./dist-CY7CS_D3.js";import{t as y}from"./activity-YogQEteU.js";import{t as b}from"./arrow-left-D880xG-P.js";import{t as x}from"./calendar-clock-D-quYVPe.js";import{i as S,n as C,r as w,t as T}from"./automation-run-list-BhtaMpTb.js";import{t as E}from"./check-DUBLcKHA.js";import{t as D}from"./chevron-down-ccbiQQz_.js";import{t as O}from"./chevron-right-BweFrslA.js";import{n as k,r as A}from"./popover-select-CLsphyzA.js";import{t as j}from"./circle-alert-BEjgurr2.js";import{t as M}from"./circle-check-C23XjkUj.js";import{t as N}from"./copy-Dv6d4Dvw.js";import{t as P}from"./ellipsis-0k4rZLoy.js";import{t as F}from"./eye-CABVeTq0.js";import{t as I}from"./git-branch-Dh9uxTot.js";import{t as L}from"./list-filter-CIPvpfLA.js";import{t as R}from"./loader-circle-CifKLtgG.js";import{t as z}from"./markdown-view-D1zBWkfB.js";import{t as ee}from"./message-circle-Badhj-4D.js";import{t as te}from"./pause-DuPxgSxk.js";import{t as ne}from"./pencil-DmIY3Oa-.js";import{t as re}from"./play-kxZvpBg8.js";import{t as ie}from"./plus-Q2yW6OE7.js";import{t as ae}from"./refresh-cw-BRlGaq2w.js";import{t as oe}from"./search-DA7gz22f.js";import{t as B}from"./shield-check-BU58siTV.js";import{t as se}from"./sparkles-DHlfQFAF.js";import{t as V}from"./square-pen-B8FsvqNu.js";import{t as H}from"./trash-2-DusmjVPV.js";import{t as ce}from"./x-B_N4OPjy.js";import{t as U}from"./zap-dximCGjy.js";import{t as W}from"./cn-0WouolD0.js";import{t as G}from"./skeleton-DzdOeGYz.js";import{d as K}from"./api-DPNeNCmR.js";import{a as q}from"./session-api-CQlEq0MB.js";import{T as J}from"./session-manager-C7RfUfqI.js";import{a as le,i as Y,o as ue}from"./vendor-swr-CdRzEUwF.js";import{t as de}from"./chat-agents-api-UOdNWZ0_.js";import{t as fe}from"./button-Cc4hUNTt.js";import{t as pe}from"./page-header-store-DU4NnGap.js";import{t as X}from"./automation-api-mn8ihWJ_.js";import{t as me}from"./sliding-tab-list-CmcrqRzN.js";import{t as he}from"./refresh-button-DiWdGAaX.js";import{a as ge,c as _e,d as ve,f as ye,i as be,l as xe,m as Se,o as Z,p as Ce,r as we,s as Te,t as Ee,u as De}from"./dist-ZrL34Ps4.js";import{n as Oe}from"./model-selector-CL6WT-jw.js";import{C as ke,S as Ae,_ as je,a as Me,b as Ne,c as Pe,d as Fe,f as Ie,g as Le,h as Re,l as ze,m as Be,n as Ve,o as He,p as Ue,r as We,s as Ge,u as Ke,v as qe,w as Je,x as Ye,y as Xe}from"./automation-task-card-BY_k6iWp.js";import{t as Ze}from"./time-picker-C1PXAXZF.js";import{n as Qe}from"./agent-display-names-Bje7vfSn.js";import{i as $e,n as et,r as tt,t as nt}from"./automation-result-state-COzakzak.js";import{t as rt}from"./date-time-picker-Dj-bhLNP.js";var it=n(),Q=e(t(),1),$=r(),at=(0,Q.lazy)(()=>i(()=>import(`./chat-page-BjYumhaI.js`).then(e=>e.n).then(e=>({default:e.ChatPage})),__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,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201])));function ot(e){let t=(0,it.c)(110),{runId:n,automationId:r,projectId:i,language:a,onConfigure:o,onDetails:s,onBack:c}=e,l=a===`zh`,[u,d]=(0,Q.useState)(!1),[p,m]=(0,Q.useState)(!1),[h,g]=(0,Q.useState)(null),_;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(_=e=>g(e),t[0]=_):_=t[0];let v=_,y;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(y=()=>m(!0),t[1]=y):y=t[1];let x=y,{mutate:S}=le(),w=(0,Q.useRef)(!1),T=i??``,E;t[2]!==r||t[3]!==n||t[4]!==T?(E=[`automation-execution`,r,n,T],t[2]=r,t[3]=n,t[4]=T,t[5]=E):E=t[5];let D;t[6]!==r||t[7]!==i||t[8]!==n||t[9]!==l?(D=async()=>{let{run:e}=await X.getRun(n);if(e.automationId!==r)throw Error(l?`执行记录不属于此自动化`:`Execution does not belong to this automation`);let{automation:t}=await X.get(r);if(i&&t.projectId!==i)throw Error(l?`执行记录不属于此项目`:`Execution does not belong to this project`);return{run:e,automation:t}},t[6]=r,t[7]=i,t[8]=n,t[9]=l,t[10]=D):D=t[10];let O;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(O={refreshInterval:lt,shouldRetryOnError:!1},t[11]=O):O=t[11];let{data:k,error:A,mutate:j}=Y(E,D,O),M=k?.run,N=M?.conversationId,P;t[12]===N?P=t[13]:(P=e=>!!(N&&(e.sessions[N]?.streaming||e.sessions[N]?.sending)),t[12]=N,t[13]=P);let F=J(P),I;t[14]===N?I=t[15]:(I=N?[`automation-execution-session`,N]:null,t[14]=N,t[15]=I);let L;t[16]===N?L=t[17]:(L=()=>q(N),t[16]=N,t[17]=L);let R;t[18]===Symbol.for(`react.memo_cache_sentinel`)?(R={shouldRetryOnError:!1},t[18]=R):R=t[18];let{data:ee,error:te,mutate:ne}=Y(I,L,R),re=M?.conversationShared||k?.automation.conversationMode===`continuous`||ee?.customData?.latestAutomationRunId!==void 0&&ee.customData.latestAutomationRunId!==n,ie=!!(ee&&(!re||u)),ae=!A&&!!(M&&(!N||re&&!u&&ee&&!te&&(M?.summary||M?.error)||ee&&!te&&p)),oe,B;if(t[19]!==ae||t[20]!==j||t[21]!==S||t[22]!==M?(oe=()=>{!M||!ae||C(M)||M.readAtMs!=null||w.current||(w.current=!0,X.markRunRead(M.id).then(async()=>{await Promise.all([j(),S(ct)])}).catch(st).finally(()=>{w.current=!1}))},B=[M,ae,j,S],t[19]=ae,t[20]=j,t[21]=S,t[22]=M,t[23]=oe,t[24]=B):(oe=t[23],B=t[24]),(0,Q.useEffect)(oe,B),A){let e=A instanceof Error?A.message:l?`执行记录加载失败`:`Could not load execution`,n;t[25]===e?n=t[26]:(n=(0,$.jsx)(`p`,{children:e}),t[25]=e,t[26]=n);let r;t[27]===j?r=t[28]:(r=()=>void j(),t[27]=j,t[28]=r);let i=l?`重试`:`Retry`,a;t[29]!==r||t[30]!==i?(a=(0,$.jsx)(fe,{onClick:r,children:i}),t[29]=r,t[30]=i,t[31]=a):a=t[31];let o=l?`返回自动化`:`Back to automation`,s;t[32]!==c||t[33]!==o?(s=(0,$.jsx)(fe,{onClick:c,children:o}),t[32]=c,t[33]=o,t[34]=s):s=t[34];let u;return t[35]!==n||t[36]!==a||t[37]!==s?(u=(0,$.jsxs)(`section`,{role:`alert`,className:`space-y-3 p-5`,children:[n,a,s]}),t[35]=n,t[36]=a,t[37]=s,t[38]=u):u=t[38],u}if(!M){let e;return t[39]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsxs)(`div`,{className:`space-y-4 p-5`,"aria-busy":`true`,children:[(0,$.jsx)(G,{className:`h-6 w-2/3`}),(0,$.jsx)(G,{className:`h-20`})]}),t[39]=e):e=t[39],e}let se;t[40]===M?se=t[41]:(se=C(M),t[40]=M,t[41]=se);let V=se,H=l?`执行会话`:`Execution conversation`,ce=l?`返回自动化`:`Back to automation`,U;t[42]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,$.jsx)(b,{className:`size-4`}),t[42]=U):U=t[42];let W;t[43]!==c||t[44]!==ce?(W=(0,$.jsx)(fe,{variant:`ghost`,className:`shrink-0`,onClick:c,"aria-label":ce,children:U}),t[43]=c,t[44]=ce,t[45]=W):W=t[45];let K;t[46]===M.automationName?K=t[47]:(K=(0,$.jsx)(`h2`,{className:`truncate text-sm font-medium text-fg`,children:M.automationName}),t[46]=M.automationName,t[47]=K);let ue;t[48]!==W||t[49]!==K?(ue=(0,$.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[W,K]}),t[48]=W,t[49]=K,t[50]=ue):ue=t[50];let de;t[51]!==M.createdAtMs||t[52]!==l?(de=new Date(M.createdAtMs).toLocaleString(l?`zh-CN`:`en-US`),t[51]=M.createdAtMs,t[52]=l,t[53]=de):de=t[53];let pe;t[54]===a?pe=t[55]:(pe=f(a),t[54]=a,t[55]=pe);let me=pe.automations.status[M.status],he;t[56]!==de||t[57]!==me?(he=(0,$.jsxs)(`span`,{children:[de,` · `,me]}),t[56]=de,t[57]=me,t[58]=he):he=t[58];let ge;t[59]!==s||t[60]!==M.id?(ge=()=>s(M.id),t[59]=s,t[60]=M.id,t[61]=ge):ge=t[61];let _e=l?`运行详情`:`Run details`,ve;t[62]!==ge||t[63]!==_e?(ve=(0,$.jsx)(`button`,{type:`button`,className:`rounded px-2 py-1.5 text-accent-fg hover:bg-surface-hover focus-visible:ring-2 focus-visible:ring-accent`,onClick:ge,children:_e}),t[62]=ge,t[63]=_e,t[64]=ve):ve=t[64];let ye;t[65]!==o||t[66]!==M?(ye=()=>o(M),t[65]=o,t[66]=M,t[67]=ye):ye=t[67];let be=l?`调整自动化`:`Adjust automation`,xe;t[68]!==ye||t[69]!==be?(xe=(0,$.jsx)(`button`,{type:`button`,className:`rounded px-2 py-1.5 text-accent-fg hover:bg-surface-hover focus-visible:ring-2 focus-visible:ring-accent`,onClick:ye,children:be}),t[68]=ye,t[69]=be,t[70]=xe):xe=t[70];let Se;t[71]!==he||t[72]!==ve||t[73]!==xe?(Se=(0,$.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3 text-xs text-fg-muted`,children:[he,ve,xe]}),t[71]=he,t[72]=ve,t[73]=xe,t[74]=Se):Se=t[74];let Z;t[75]!==k?.automation||t[76]!==re||t[77]!==l?(Z=re?(0,$.jsxs)(`p`,{className:`text-xs text-fg-muted`,children:[l?`多次执行可能共用此会话;下方摘要对应所选执行。`:`Executions may share this conversation. The summary belongs to the selected execution.`,k?.automation.conversationMode===`continuous`?l?`追问会进入后续运行上下文。`:` Follow-ups become context for future runs.`:null]}):null,t[75]=k?.automation,t[76]=re,t[77]=l,t[78]=Z):Z=t[78];let Ce;t[79]!==h||t[80]!==u||t[81]!==l?(Ce=u?(0,$.jsx)(`p`,{role:`status`,className:`text-xs text-fg-muted`,children:h===!0?l?`已定位到所选执行的会话起点。`:`Located the selected execution in this conversation.`:h===!1?l?`旧记录缺少可用的执行定位信息,当前显示完整会话。`:`No matching turn was found in the available history. Showing the full conversation.`:l?`正在定位所选执行…`:`Locating the selected execution…`}):null,t[79]=h,t[80]=u,t[81]=l,t[82]=Ce):Ce=t[82];let we;t[83]!==V||t[84]!==l?(we=V?(0,$.jsx)(`p`,{role:`status`,className:`text-xs text-fg-muted`,children:l?`执行中,完成后可继续追问。`:`Execution in progress. Follow up after it finishes.`}):null,t[83]=V,t[84]=l,t[85]=we):we=t[85];let Te;t[86]!==ue||t[87]!==Se||t[88]!==Z||t[89]!==Ce||t[90]!==we?(Te=(0,$.jsxs)(`header`,{className:`shrink-0 space-y-2 border-b border-edge px-4 py-3`,children:[ue,Se,Z,Ce,we]}),t[86]=ue,t[87]=Se,t[88]=Z,t[89]=Ce,t[90]=we,t[91]=Te):Te=t[91];let Ee;t[92]!==V||t[93]!==N||t[94]!==F||t[95]!==ee||t[96]!==a||t[97]!==ne||t[98]!==M.error||t[99]!==M.id||t[100]!==M.summary||t[101]!==te||t[102]!==re||t[103]!==ie||t[104]!==l?(Ee=ie?(0,$.jsx)(Q.Suspense,{fallback:(0,$.jsx)(G,{className:`m-5 h-40`}),children:(0,$.jsx)(at,{embedded:!0,automationExecution:!0,conversationId:N,readOnly:V||F,onHistoryReady:x,initialTurnId:re?M.id:void 0,onInitialTurnLocated:v},N)}):(0,$.jsxs)(`div`,{className:`min-h-0 flex-1 space-y-4 overflow-y-auto p-5`,children:[M.summary?(0,$.jsx)(z,{content:M.summary}):null,M.error?(0,$.jsx)(`p`,{className:`whitespace-pre-wrap text-sm text-danger`,children:M.error}):null,N?null:(0,$.jsx)(`p`,{className:`text-sm text-fg-muted`,children:V?l?`等待执行会话,开始后会自动更新。`:`Waiting for the execution conversation. This view updates automatically.`:l?`本次执行没有关联会话,可查看运行结果和详情。`:`No conversation is associated with this execution. Results and diagnostics remain available.`}),N&&!ee&&!te?(0,$.jsx)(G,{className:`h-24`}):null,te?(0,$.jsxs)(`div`,{role:`alert`,className:`space-y-2 text-sm text-fg-muted`,children:[(0,$.jsx)(`p`,{children:te.status===404?l?`执行会话已删除,运行结果仍保留。`:`The execution conversation was deleted. Results are still available.`:l?`执行会话暂时无法读取,运行结果仍保留。`:`The conversation is unavailable. Results are still available.`}),(0,$.jsx)(fe,{onClick:()=>void ne(),children:l?`重试`:`Retry`})]}):null,re&&ee?(0,$.jsx)(fe,{variant:`secondary`,onClick:()=>d(!0),children:l?`打开共享会话`:`Open shared conversation`}):null,V?null:(0,$.jsx)($e,{runId:M.id,language:a})]}),t[92]=V,t[93]=N,t[94]=F,t[95]=ee,t[96]=a,t[97]=ne,t[98]=M.error,t[99]=M.id,t[100]=M.summary,t[101]=te,t[102]=re,t[103]=ie,t[104]=l,t[105]=Ee):Ee=t[105];let De;return t[106]!==H||t[107]!==Te||t[108]!==Ee?(De=(0,$.jsxs)(`section`,{className:`flex h-full min-h-0 min-w-0 flex-col overflow-hidden`,"aria-label":H,children:[Te,Ee]}),t[106]=H,t[107]=Te,t[108]=Ee,t[109]=De):De=t[109],De}function st(){}function ct(e){return Array.isArray(e)&&[`automations`,`automation-runs`,`automation-history`,`automation-navigation-runs`].includes(String(e[0]))||e===`automations-global-system-source`}function lt(e){return e&&C(e.run)?3e3:15e3}function ut(e){let t=(0,it.c)(44),{automation:n,language:r,busy:i,onEdit:a,onAction:o}=e,s=r===`zh`,c=n.management,l=s?`${n.name}的更多操作`:`More actions for ${n.name}`,u;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,$.jsx)(P,{className:`size-4`}),t[0]=u):u=t[0];let d;t[1]===l?d=t[2]:(d=(0,$.jsx)(Se,{asChild:!0,children:(0,$.jsx)(fe,{variant:`ghost`,className:`size-8 p-0`,"aria-label":l,children:u})}),t[1]=l,t[2]=d);let f;t[3]!==n||t[4]!==i||t[5]!==c||t[6]!==o||t[7]!==s?(f=(!c||c.editable.includes(`enabled`))&&!ke(n)?(0,$.jsxs)(we,{className:`flex cursor-pointer items-center gap-2 rounded-md px-3 py-2 text-sm text-fg outline-none data-[highlighted]:bg-surface-hover data-[disabled]:opacity-50`,disabled:i,onSelect:()=>void o(`automation:${n.id}:toggle`,()=>n.enabled?X.pause(n.id):X.resume(n.id)),children:[n.enabled?(0,$.jsx)(te,{className:`size-4`}):(0,$.jsx)(re,{className:`size-4`}),n.enabled?s?`暂停`:`Pause`:s?`恢复`:`Resume`]}):null,t[3]=n,t[4]=i,t[5]=c,t[6]=o,t[7]=s,t[8]=f):f=t[8];let p;t[9]!==n.id||t[10]!==i||t[11]!==c||t[12]!==o||t[13]!==s?(p=!c||c.runnable?(0,$.jsxs)(we,{className:`flex cursor-pointer items-center gap-2 rounded-md px-3 py-2 text-sm text-fg outline-none data-[highlighted]:bg-surface-hover data-[disabled]:opacity-50`,disabled:i,onSelect:()=>void o(`automation:${n.id}:run`,()=>X.runNow(n.id)),children:[(0,$.jsx)(re,{className:`size-4`}),s?`立即运行`:`Run now`]}):null,t[9]=n.id,t[10]=i,t[11]=c,t[12]=o,t[13]=s,t[14]=p):p=t[14];let m;t[15]!==n||t[16]!==i||t[17]!==c||t[18]!==a||t[19]!==s?(m=!c||c.editable.includes(`trigger`)?(0,$.jsxs)(we,{className:`flex cursor-pointer items-center gap-2 rounded-md px-3 py-2 text-sm text-fg outline-none data-[highlighted]:bg-surface-hover data-[disabled]:opacity-50`,disabled:i,onSelect:()=>a(n),children:[(0,$.jsx)(ne,{className:`size-4`}),s?`编辑`:`Edit`]}):null,t[15]=n,t[16]=i,t[17]=c,t[18]=a,t[19]=s,t[20]=m):m=t[20];let h;t[21]!==n.id||t[22]!==o||t[23]!==s?(h=()=>void o(`automation:${n.id}:copy-link`,()=>navigator.clipboard.writeText(`${window.location.origin}${window.location.pathname}#/automations?automation=${encodeURIComponent(n.id)}`),s?`任务链接已复制`:`Task link copied`),t[21]=n.id,t[22]=o,t[23]=s,t[24]=h):h=t[24];let g;t[25]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,$.jsx)(N,{className:`size-4`}),t[25]=g):g=t[25];let _=s?`复制任务链接`:`Copy task link`,v;t[26]!==h||t[27]!==_?(v=(0,$.jsxs)(we,{className:`flex cursor-pointer items-center gap-2 rounded-md px-3 py-2 text-sm text-fg outline-none data-[highlighted]:bg-surface-hover data-[disabled]:opacity-50`,onSelect:h,children:[g,_]}),t[26]=h,t[27]=_,t[28]=v):v=t[28];let y;t[29]!==n.id||t[30]!==i||t[31]!==c||t[32]!==o||t[33]!==s?(y=!c||c.deletable?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(De,{className:`my-1 h-px bg-edge-subtle`}),(0,$.jsxs)(we,{className:`flex cursor-pointer items-center gap-2 rounded-md px-3 py-2 text-sm text-fg outline-none data-[highlighted]:bg-surface-hover data-[disabled]:opacity-50 text-danger`,disabled:i,onSelect:()=>{window.confirm(s?`删除这个定时任务?已保存的对话仍可查看。`:`Delete this scheduled task? Saved conversations will remain available.`)&&o(`automation:${n.id}:delete`,()=>X.remove(n.id))},children:[(0,$.jsx)(H,{className:`size-4`}),s?`删除`:`Delete`]})]}):null,t[29]=n.id,t[30]=i,t[31]=c,t[32]=o,t[33]=s,t[34]=y):y=t[34];let b;t[35]!==v||t[36]!==y||t[37]!==f||t[38]!==p||t[39]!==m?(b=(0,$.jsx)(Z,{children:(0,$.jsxs)(Ee,{align:`end`,sideOffset:4,className:`z-70 min-w-44 rounded-xl border border-edge bg-surface-overlay p-1 shadow-popover`,children:[f,p,m,v,y]})}),t[35]=v,t[36]=y,t[37]=f,t[38]=p,t[39]=m,t[40]=b):b=t[40];let x;return t[41]!==b||t[42]!==d?(x=(0,$.jsxs)(xe,{children:[d,b]}),t[41]=b,t[42]=d,t[43]=x):x=t[43],x}function dt({automations:e,runs:t,labels:n,cronLabels:r,language:i,selectedAutomationId:a,selectedRunId:o,selectedRun:s,projectId:c,executionSummaries:l,onSelectRun:d,onOpenDetails:f,busy:p,onEdit:m,onAction:h}){let g=`xopc.automation-navigation:${u(e=>e.baseUrl)}:${u(e=>e.conversationId)??`local`}`,[_,v]=(0,Q.useState)(()=>{try{let e=JSON.parse(localStorage.getItem(g)??`{}`);return e&&typeof e==`object`&&!Array.isArray(e)?e:{}}catch{return{}}});(0,Q.useEffect)(()=>{try{let e=JSON.parse(localStorage.getItem(g)??`{}`);v(e&&typeof e==`object`&&!Array.isArray(e)?e:{})}catch{v({})}},[g]);let y=(0,Q.useRef)(null);(0,Q.useEffect)(()=>{!a||y.current===a||(y.current=a,v(e=>({...e,[a]:!0})))},[a]);let b=e=>v(t=>{let n={...t,[e]:!t[e]};try{localStorage.setItem(g,JSON.stringify(n))}catch{}return n});return e.length===0?(0,$.jsx)(`p`,{className:`p-4 text-sm text-fg-muted`,children:n.empty.filtered}):(0,$.jsx)(`div`,{className:`min-h-0 overflow-y-auto divide-y divide-edge-subtle`,children:e.map(e=>{let u=t.filter(t=>t.automationId===e.id).sort((e,t)=>t.createdAtMs-e.createdAtMs),g=u.find(C);return(0,$.jsxs)(`div`,{className:`group relative`,children:[(0,$.jsx)(`button`,{type:`button`,"aria-expanded":!!_[e.id],"aria-controls":`automation-runs-${e.id}`,"aria-label":i===`zh`?`${_[e.id]?`收起`:`展开`} ${e.name} 的执行记录`:`${_[e.id]?`Collapse`:`Expand`} executions for ${e.name}`,className:`absolute left-1 top-2 z-10 rounded-md p-2 text-fg-muted hover:bg-surface-hover focus-visible:ring-2 focus-visible:ring-accent`,onClick:()=>b(e.id),children:_[e.id]?(0,$.jsx)(D,{className:`size-4`}):(0,$.jsx)(O,{className:`size-4`})}),(0,$.jsxs)(`button`,{type:`button`,className:W(`block w-full p-3 pl-9 pr-10 text-left outline-none hover:bg-surface-hover focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-accent`,a===e.id&&!o&&`bg-surface-hover`),style:{contentVisibility:`auto`,containIntrinsicSize:`auto 76px`},"aria-current":a===e.id&&!o?`true`:void 0,onClick:()=>f(e.id),children:[(0,$.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,$.jsx)(`span`,{className:W(`size-2 shrink-0 rounded-full`,g?`bg-blue-500`:et(e,u)?`bg-red-500`:e.enabled?`bg-emerald-500`:`bg-fg-subtle`)}),(0,$.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-sm font-medium text-fg`,children:e.name}),(0,$.jsx)(`span`,{className:`shrink-0 text-xs text-fg-muted`,children:ke(e)?i===`zh`?`已完成`:`Completed`:e.enabled?n.enabled:n.paused}),(l?.[e.id]?.unreadCount??0)>0?(0,$.jsx)(`span`,{className:`ml-auto size-2 shrink-0 rounded-full bg-blue-500`,children:(0,$.jsx)(`span`,{className:`sr-only`,children:n.filters.unread})}):null]}),(0,$.jsxs)(`p`,{className:`mt-1 truncate pl-4 text-xs leading-5 text-fg-muted`,children:[e.enabled?(0,$.jsxs)($.Fragment,{children:[Le(e,n,i),(0,$.jsx)(`span`,{className:`mx-1.5`,children:`·`})]}):null,je(e.trigger,n,r,i)]}),et(e,u)?(0,$.jsx)(`p`,{className:`mt-1 pl-4 text-xs text-red-700 dark:text-red-300`,children:n.dashboard.needsAttention}):null]}),(0,$.jsx)(`div`,{id:`automation-runs-${e.id}`,hidden:!_[e.id],children:(0,$.jsx)(T,{automationId:e.id,projectId:c,language:i,selectedRunId:o,selectedRun:s,enabled:!!_[e.id],onSelectRun:d})}),(0,$.jsx)(`div`,{className:`absolute right-1 top-2 opacity-100 sm:opacity-0 sm:group-hover:opacity-100 sm:group-focus-within:opacity-100`,children:(0,$.jsx)(ut,{automation:e,language:i,busy:p,onEdit:m,onAction:h})})]},e.id)})})}var ft=`xopc.automations.listWidth`,pt=272,mt=200,ht=560;function gt({children:e,language:t,busy:n}){let r=(0,Q.useRef)(null),i=(0,Q.useRef)(null),[a,o]=(0,Q.useState)(!1),[s,c]=(0,Q.useState)(()=>{try{let e=Number(window.localStorage.getItem(ft));if(Number.isFinite(e)&&e>=mt&&e<=ht)return e}catch{}return pt});(0,Q.useEffect)(()=>{try{window.localStorage.setItem(ft,String(s))}catch{}},[s]),(0,Q.useEffect)(()=>{if(!a)return;let{cursor:e,userSelect:t}=document.body.style;return document.body.style.cursor=`col-resize`,document.body.style.userSelect=`none`,()=>{document.body.style.cursor=e,document.body.style.userSelect=t}},[a]);let l=e=>{let t=r.current?.getBoundingClientRect().width??1e3,n=Math.max(mt,Math.min(ht,t*.6,t-292));return Math.round(Math.max(mt,Math.min(n,e)))},u=t===`zh`?`调整任务列表宽度`:`Resize task list`;return(0,$.jsxs)(`section`,{ref:r,"aria-busy":n,className:`grid min-h-0 min-w-0 flex-1 grid-rows-[auto_minmax(0,1fr)] gap-y-3 md:grid-cols-[minmax(0,min(var(--automation-list-width),60%))_0.75rem_minmax(0,1fr)] md:grid-rows-1 md:gap-y-0`,style:{"--automation-list-width":`${s}px`},children:[e[0],(0,$.jsx)(`div`,{role:`separator`,"aria-orientation":`vertical`,"aria-label":u,"aria-valuemin":mt,"aria-valuemax":ht,"aria-valuenow":s,tabIndex:0,title:t===`zh`?`左右拖动调整宽度,双击恢复默认`:`Drag to resize, double-click to reset`,className:`relative hidden touch-none select-none cursor-col-resize focus-visible:outline-accent md:block`,onPointerDown:e=>{if(e.button!==0)return;e.preventDefault(),e.currentTarget.setPointerCapture(e.pointerId);let t=e.currentTarget.previousElementSibling?.getBoundingClientRect().width??s;i.current={pointerId:e.pointerId,startX:e.clientX,startWidth:t},o(!0)},onPointerMove:e=>{let t=i.current;t?.pointerId===e.pointerId&&c(l(t.startWidth+e.clientX-t.startX))},onPointerUp:e=>{i.current?.pointerId===e.pointerId&&(i.current=null,o(!1),e.currentTarget.releasePointerCapture(e.pointerId))},onPointerCancel:()=>{i.current=null,o(!1)},onLostPointerCapture:()=>{i.current=null,o(!1)},onDoubleClick:()=>c(pt),onKeyDown:e=>{[`ArrowLeft`,`ArrowRight`,`Home`,`End`].includes(e.key)&&(e.preventDefault(),c(l(e.key===`Home`?mt:e.key===`End`?ht:s+(e.key===`ArrowLeft`?-16:16))))}}),e[1]]})}var _t=(0,Q.lazy)(()=>i(()=>import(`./chat-page-BjYumhaI.js`).then(e=>e.n).then(e=>({default:e.ChatPage})),__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,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201])));function vt(e){let t=(0,it.c)(51),{automation:n,conversationId:r,runs:i,language:a,onSelectRun:o,onConfigured:s}=e,c=n?.id,l;t[0]!==c||t[1]!==r?(l=c&&!r?[`automation-workspace-chat`,c]:null,t[0]=c,t[1]=r,t[2]=l):l=t[2];let u;t[3]===c?u=t[4]:(u=()=>X.openConfiguration({automationId:c}),t[3]=c,t[4]=u);let d;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(d={revalidateOnFocus:!1,revalidateOnReconnect:!1,shouldRetryOnError:!1},t[5]=d):d=t[5];let{data:p,error:m,mutate:h}=Y(l,u,d),g;t[6]===r?g=t[7]:(g=r?[`automation-configuration`,r]:null,t[6]=r,t[7]=g);let _;t[8]===r?_=t[9]:(_=()=>X.configuration(r),t[8]=r,t[9]=_);let v;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(v={refreshInterval:3e3},t[10]=v):v=t[10];let{data:y}=Y(g,_,v),b,x;t[11]!==n||t[12]!==s||t[13]!==y?(b=()=>{!n&&y?.automation&&s?.(y.automation.id)},x=[n,y,s],t[11]=n,t[12]=s,t[13]=y,t[14]=b,t[15]=x):(b=t[14],x=t[15]),(0,Q.useEffect)(b,x);let S=r??p?.conversationId,{mutate:C}=le(),w;t[16]===S?w=t[17]:(w=e=>!!(S&&(e.sessions[S]?.streaming||e.sessions[S]?.sending)),t[16]=S,t[17]=w);let T=J(w),E=(0,Q.useRef)(!1),D,O;t[18]!==C||t[19]!==T?(D=()=>{E.current&&!T&&C(yt),E.current=T},O=[T,C],t[18]=C,t[19]=T,t[20]=D,t[21]=O):(D=t[20],O=t[21]),(0,Q.useEffect)(D,O);let k=a===`zh`,A;t[22]===a?A=t[23]:(A=f(a),t[22]=a,t[23]=A);let j=A,M;if(t[24]!==a||t[25]!==j.automations.status||t[26]!==o||t[27]!==i||t[28]!==k){let e;t[30]!==a||t[31]!==j.automations.status||t[32]!==o||t[33]!==k?(e=e=>({id:`automation-run:${e.id}`,timestamp:e.createdAtMs,content:(0,$.jsxs)(`article`,{className:`mx-auto w-full max-w-[var(--max-width-chat-frame)] space-y-3 py-3`,"aria-label":k?`任务运行结果`:`Task run result`,children:[(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-3 text-xs text-fg-muted`,children:[(0,$.jsxs)(`span`,{children:[new Date(e.createdAtMs).toLocaleString(k?`zh-CN`:`en-US`,{month:`short`,day:`numeric`,hour:`2-digit`,minute:`2-digit`}),` · `,j.automations.status[e.status]]}),(0,$.jsx)(`button`,{type:`button`,className:`rounded-md px-2 py-1.5 hover:bg-surface-hover focus-visible:ring-2 focus-visible:ring-accent`,onClick:()=>o(e.id),children:k?`查看详情`:`View details`})]}),e.error?(0,$.jsx)(`p`,{className:`whitespace-pre-wrap text-sm leading-6 text-danger`,children:tt(e,a)}):e.summary?(0,$.jsx)(z,{content:e.summary}):(0,$.jsx)(`p`,{className:`text-sm text-fg-muted`,children:k?`正在执行,结果会显示在这里。`:`Running. The result will appear here.`}),e.status===`failed`||e.status===`timeout`?(0,$.jsx)(Ve,{automationId:e.automationId,runId:e.id,language:a,variant:`secondary`}):null,[`queued`,`running`,`cancelling`].includes(e.status)?null:(0,$.jsx)($e,{runId:e.id,language:a})]})}),t[30]=a,t[31]=j.automations.status,t[32]=o,t[33]=k,t[34]=e):e=t[34],M=i.map(e),t[24]=a,t[25]=j.automations.status,t[26]=o,t[27]=i,t[28]=k,t[29]=M}else M=t[29];let N=M;if(m){let e=k?`暂时无法打开任务对话。`:`Could not open the task conversation.`,n;t[35]===e?n=t[36]:(n=(0,$.jsx)(`p`,{children:e}),t[35]=e,t[36]=n);let r;t[37]===h?r=t[38]:(r=()=>void h(),t[37]=h,t[38]=r);let i=k?`重试`:`Retry`,a;t[39]!==r||t[40]!==i?(a=(0,$.jsx)(fe,{variant:`secondary`,onClick:r,children:i}),t[39]=r,t[40]=i,t[41]=a):a=t[41];let o;return t[42]!==n||t[43]!==a?(o=(0,$.jsxs)(`div`,{role:`alert`,className:`p-6 text-sm text-fg-muted`,children:[n,a]}),t[42]=n,t[43]=a,t[44]=o):o=t[44],o}let P=k?`任务对话`:`Task conversation`,F;t[45]!==N||t[46]!==S?(F=S?(0,$.jsx)(Q.Suspense,{fallback:(0,$.jsx)(G,{className:`m-5 h-40`}),children:(0,$.jsx)(_t,{embedded:!0,conversationId:S,automationWorkspace:!0,automationTimelineEntries:N},S)}):(0,$.jsxs)(`div`,{className:`space-y-4 p-6`,children:[(0,$.jsx)(G,{className:`h-20 w-2/3`}),(0,$.jsx)(G,{className:`h-28`})]}),t[45]=N,t[46]=S,t[47]=F):F=t[47];let I;return t[48]!==P||t[49]!==F?(I=(0,$.jsx)(`section`,{className:`flex h-full min-h-0 min-w-0 flex-col overflow-hidden`,"aria-label":P,children:F}),t[48]=P,t[49]=F,t[50]=I):I=t[50],I}function yt(e){return Array.isArray(e)&&[`automations`,`automation-runs`,`automation-history`,`automation-configuration`].includes(String(e[0]))}var bt=`relative flex min-h-9 cursor-pointer items-center rounded-md py-2 pl-3 pr-8 text-sm text-fg outline-none data-[highlighted]:bg-surface-hover`,xt=`z-70 max-h-[min(32rem,calc(100dvh-2rem))] min-w-52 overflow-y-auto rounded-xl border border-edge bg-surface-overlay p-1.5 shadow-popover`;function St(e){let t=(0,it.c)(4),{value:n,children:r}=e,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,$.jsx)(be,{className:`absolute right-2.5`,children:(0,$.jsx)(E,{className:`size-3.5`,"aria-hidden":!0})}),t[0]=i):i=t[0];let a;return t[1]!==r||t[2]!==n?(a=(0,$.jsxs)(_e,{value:n,className:bt,children:[i,r]}),t[1]=r,t[2]=n,t[3]=a):a=t[3],a}function Ct(e){let t=(0,it.c)(131),{language:n,labels:r,filter:i,ownership:a,source:o,projectId:s,projects:c,projectLocked:l,query:u,unreadCount:d,markReadBusy:f,onFilter:p,onOwnership:m,onSource:h,onProject:g,onQuery:_,onClear:v,onMarkAllRead:y}=e,b=n===`zh`,[x,C]=(0,Q.useState)(!1),w=(0,Q.useRef)(null),T=(0,Q.useRef)(null),E=x||!!u,D=i!==`all`||o!==`all`||a!==`user`||!l&&!!s,k;t[0]===_?k=t[1]:(k=()=>{_(``),C(!1),T.current?.focus()},t[0]=_,t[1]=k);let A=k,j=b?`定时任务`:`Scheduled tasks`,M;t[2]===j?M=t[3]:(M=(0,$.jsx)(`h2`,{className:`min-w-0 truncate text-sm font-semibold text-fg`,children:j}),t[2]=j,t[3]=M);let N=b?`筛选任务`:`Filter tasks`,P=b?`筛选任务`:`Filter tasks`,F=D&&`text-accent-fg`,I;t[4]===F?I=t[5]:(I=W(`relative rounded-md p-2 text-fg-muted hover:bg-surface-hover focus-visible:ring-2 focus-visible:ring-accent data-[state=open]:bg-surface-hover`,F),t[4]=F,t[5]=I);let z;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(z=(0,$.jsx)(L,{className:`size-4`,"aria-hidden":!0}),t[6]=z):z=t[6];let ee;t[7]!==D||t[8]!==b?(ee=D?(0,$.jsx)(`span`,{className:`absolute right-1.5 top-1.5 size-1 rounded-full bg-accent`,children:(0,$.jsx)(`span`,{className:`sr-only`,children:b?`已应用筛选`:`Filters applied`})}):null,t[7]=D,t[8]=b,t[9]=ee):ee=t[9];let te;t[10]!==N||t[11]!==P||t[12]!==I||t[13]!==ee?(te=(0,$.jsx)(Se,{asChild:!0,children:(0,$.jsxs)(`button`,{type:`button`,"aria-label":N,title:P,className:I,children:[z,ee]})}),t[10]=N,t[11]=P,t[12]=I,t[13]=ee,t[14]=te):te=t[14];let ne=b?`状态`:`Status`,re;t[15]===ne?re=t[16]:(re=(0,$.jsx)(ge,{className:`px-3 py-1.5 text-xs text-fg-subtle`,children:ne}),t[15]=ne,t[16]=re);let ie;t[17]===p?ie=t[18]:(ie=e=>p(e),t[17]=p,t[18]=ie);let ae=b?`全部状态`:`All statuses`,B;t[19]===ae?B=t[20]:(B=(0,$.jsx)(St,{value:`all`,children:ae}),t[19]=ae,t[20]=B);let se;t[21]===r.filters.active?se=t[22]:(se=(0,$.jsx)(St,{value:`active`,children:r.filters.active}),t[21]=r.filters.active,t[22]=se);let V;t[23]===r.paused?V=t[24]:(V=(0,$.jsx)(St,{value:`paused`,children:r.paused}),t[23]=r.paused,t[24]=V);let H=b?`已完成`:`Completed`,U;t[25]===H?U=t[26]:(U=(0,$.jsx)(St,{value:`completed`,children:H}),t[25]=H,t[26]=U);let G;t[27]===r.metrics.running?G=t[28]:(G=(0,$.jsx)(St,{value:`running`,children:r.metrics.running}),t[27]=r.metrics.running,t[28]=G);let K;t[29]===r.dashboard.needsAttention?K=t[30]:(K=(0,$.jsx)(St,{value:`attention`,children:r.dashboard.needsAttention}),t[29]=r.dashboard.needsAttention,t[30]=K);let q;t[31]!==i||t[32]!==ie||t[33]!==B||t[34]!==se||t[35]!==V||t[36]!==U||t[37]!==G||t[38]!==K?(q=(0,$.jsxs)(Te,{value:i,onValueChange:ie,children:[B,se,V,U,G,K]}),t[31]=i,t[32]=ie,t[33]=B,t[34]=se,t[35]=V,t[36]=U,t[37]=G,t[38]=K,t[39]=q):q=t[39];let J;t[40]===Symbol.for(`react.memo_cache_sentinel`)?(J=(0,$.jsx)(De,{className:`my-1 border-t border-edge`}),t[40]=J):J=t[40];let le=b?`归属`:`Owner`,Y;t[41]===le?Y=t[42]:(Y=(0,$.jsx)(ge,{className:`px-3 py-1.5 text-xs text-fg-subtle`,children:le}),t[41]=le,t[42]=Y);let ue;t[43]===m?ue=t[44]:(ue=e=>m(e),t[43]=m,t[44]=ue);let de=b?`我的任务`:`My tasks`,fe;t[45]===de?fe=t[46]:(fe=(0,$.jsx)(St,{value:`user`,children:de}),t[45]=de,t[46]=fe);let pe=b?`系统任务`:`System tasks`,X;t[47]===pe?X=t[48]:(X=(0,$.jsx)(St,{value:`system`,children:pe}),t[47]=pe,t[48]=X);let me;t[49]!==a||t[50]!==ue||t[51]!==fe||t[52]!==X?(me=(0,$.jsxs)(Te,{value:a,onValueChange:ue,children:[fe,X]}),t[49]=a,t[50]=ue,t[51]=fe,t[52]=X,t[53]=me):me=t[53];let he;t[54]===Symbol.for(`react.memo_cache_sentinel`)?(he=(0,$.jsx)(De,{className:`my-1 border-t border-edge`}),t[54]=he):he=t[54];let _e;t[55]!==r.filters.allProjects||t[56]!==g||t[57]!==s||t[58]!==l||t[59]!==c||t[60]!==b?(_e=l?null:(0,$.jsxs)(ve,{children:[(0,$.jsxs)(Ce,{className:`flex min-h-9 cursor-pointer items-center justify-between gap-4 rounded-md px-3 py-2 text-sm text-fg outline-none data-[highlighted]:bg-surface-hover`,children:[b?`项目`:`Project`,(0,$.jsx)(`span`,{className:`ml-auto max-w-28 truncate text-xs text-fg-muted`,children:c.find(e=>e.id===s)?.name??r.filters.allProjects}),(0,$.jsx)(O,{className:`size-3.5 text-fg-subtle`,"aria-hidden":!0})]}),(0,$.jsx)(Z,{children:(0,$.jsx)(ye,{sideOffset:4,className:xt,children:(0,$.jsxs)(Te,{value:s,onValueChange:g,children:[(0,$.jsx)(St,{value:``,children:r.filters.allProjects}),c.map(wt)]})})})]}),t[55]=r.filters.allProjects,t[56]=g,t[57]=s,t[58]=l,t[59]=c,t[60]=b,t[61]=_e):_e=t[61];let be=b?`任务类型`:`Task type`,Oe;t[62]===Symbol.for(`react.memo_cache_sentinel`)?(Oe=(0,$.jsx)(O,{className:`size-3.5 text-fg-subtle`,"aria-hidden":!0}),t[62]=Oe):Oe=t[62];let ke;t[63]===be?ke=t[64]:(ke=(0,$.jsxs)(Ce,{className:`flex min-h-9 cursor-pointer items-center justify-between gap-4 rounded-md px-3 py-2 text-sm text-fg outline-none data-[highlighted]:bg-surface-hover`,children:[be,Oe]}),t[63]=be,t[64]=ke);let Ae;t[65]===h?Ae=t[66]:(Ae=e=>h(e),t[65]=h,t[66]=Ae);let je=b?`全部类型`:`All types`,Me;t[67]===je?Me=t[68]:(Me=(0,$.jsx)(St,{value:`all`,children:je}),t[67]=je,t[68]=Me);let Ne;t[69]===r.sources.agent?Ne=t[70]:(Ne=(0,$.jsx)(St,{value:`agent`,children:r.sources.agent}),t[69]=r.sources.agent,t[70]=Ne);let Pe;t[71]===r.sources.task?Pe=t[72]:(Pe=(0,$.jsx)(St,{value:`task_command`,children:r.sources.task}),t[71]=r.sources.task,t[72]=Pe);let Fe;t[73]!==o||t[74]!==Ae||t[75]!==Me||t[76]!==Ne||t[77]!==Pe?(Fe=(0,$.jsx)(Z,{children:(0,$.jsx)(ye,{sideOffset:4,className:xt,children:(0,$.jsxs)(Te,{value:o,onValueChange:Ae,children:[Me,Ne,Pe]})})}),t[73]=o,t[74]=Ae,t[75]=Me,t[76]=Ne,t[77]=Pe,t[78]=Fe):Fe=t[78];let Ie;t[79]!==ke||t[80]!==Fe?(Ie=(0,$.jsxs)(ve,{children:[ke,Fe]}),t[79]=ke,t[80]=Fe,t[81]=Ie):Ie=t[81];let Le;t[82]!==D||t[83]!==v||t[84]!==u||t[85]!==b?(Le=D||u?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(De,{className:`my-1 border-t border-edge`}),(0,$.jsx)(we,{className:`cursor-pointer rounded-md px-3 py-2 text-sm text-fg-muted outline-none data-[highlighted]:bg-surface-hover`,onSelect:v,children:b?`重置筛选`:`Reset filters`})]}):null,t[82]=D,t[83]=v,t[84]=u,t[85]=b,t[86]=Le):Le=t[86];let Re;t[87]!==re||t[88]!==q||t[89]!==Y||t[90]!==me||t[91]!==_e||t[92]!==Ie||t[93]!==Le?(Re=(0,$.jsx)(Z,{children:(0,$.jsxs)(Ee,{align:`end`,sideOffset:6,className:xt,children:[re,q,J,Y,me,he,_e,Ie,Le]})}),t[87]=re,t[88]=q,t[89]=Y,t[90]=me,t[91]=_e,t[92]=Ie,t[93]=Le,t[94]=Re):Re=t[94];let ze;t[95]!==te||t[96]!==Re?(ze=(0,$.jsxs)(xe,{children:[te,Re]}),t[95]=te,t[96]=Re,t[97]=ze):ze=t[97];let Be=b?`搜索任务`:`Search tasks`,Ve=b?`搜索任务`:`Search tasks`,He;t[98]!==A||t[99]!==E?(He=()=>{E?A():(C(!0),requestAnimationFrame(()=>w.current?.focus()))},t[98]=A,t[99]=E,t[100]=He):He=t[100];let Ue=E&&`bg-surface-hover text-fg`,We;t[101]===Ue?We=t[102]:(We=W(`rounded-md p-2 text-fg-muted hover:bg-surface-hover focus-visible:ring-2 focus-visible:ring-accent`,Ue),t[101]=Ue,t[102]=We);let Ge;t[103]===Symbol.for(`react.memo_cache_sentinel`)?(Ge=(0,$.jsx)(oe,{className:`size-4`,"aria-hidden":!0}),t[103]=Ge):Ge=t[103];let Ke;t[104]!==E||t[105]!==Be||t[106]!==Ve||t[107]!==He||t[108]!==We?(Ke=(0,$.jsx)(`button`,{ref:T,type:`button`,"aria-label":Be,title:Ve,"aria-expanded":E,onClick:He,className:We,children:Ge}),t[104]=E,t[105]=Be,t[106]=Ve,t[107]=He,t[108]=We,t[109]=Ke):Ke=t[109];let qe;t[110]!==ze||t[111]!==Ke?(qe=(0,$.jsxs)(`div`,{className:`flex shrink-0 items-center gap-0.5`,children:[ze,Ke]}),t[110]=ze,t[111]=Ke,t[112]=qe):qe=t[112];let Je;t[113]!==M||t[114]!==qe?(Je=(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-2 px-1`,children:[M,qe]}),t[113]=M,t[114]=qe,t[115]=Je):Je=t[115];let Ye;t[116]!==r.filters.markAllRead||t[117]!==f||t[118]!==y||t[119]!==d?(Ye=d>0?(0,$.jsxs)(`button`,{type:`button`,disabled:f,onClick:y,className:`flex min-h-9 w-full items-center gap-2 rounded-md px-2 text-xs text-fg-muted hover:bg-surface-hover hover:text-fg focus-visible:ring-2 focus-visible:ring-accent disabled:pointer-events-none disabled:opacity-50`,"aria-busy":f,children:[f?(0,$.jsx)(R,{className:`size-4 shrink-0 animate-spin`,"aria-hidden":!0}):(0,$.jsx)(S,{className:`size-4 shrink-0`,"aria-hidden":!0}),r.filters.markAllRead]}):null,t[116]=r.filters.markAllRead,t[117]=f,t[118]=y,t[119]=d,t[120]=Ye):Ye=t[120];let Xe;t[121]!==A||t[122]!==_||t[123]!==u||t[124]!==E||t[125]!==b?(Xe=E?(0,$.jsxs)(`div`,{className:`flex items-center gap-2 rounded-lg border border-edge bg-surface-panel px-2.5 focus-within:border-accent`,children:[(0,$.jsx)(oe,{className:`size-3.5 shrink-0 text-fg-subtle`,"aria-hidden":!0}),(0,$.jsx)(`input`,{ref:w,value:u,onChange:e=>_(e.target.value),onKeyDown:e=>{e.key===`Escape`&&(e.preventDefault(),A())},"aria-label":b?`搜索任务名称或内容`:`Search task names or content`,placeholder:b?`搜索任务…`:`Search tasks…`,className:`min-h-10 min-w-0 flex-1 bg-transparent text-sm text-fg outline-none placeholder:text-fg-subtle`}),(0,$.jsx)(`button`,{type:`button`,"aria-label":b?`关闭搜索`:`Close search`,onClick:A,className:`rounded-md p-1 text-fg-muted hover:bg-surface-hover focus-visible:ring-2 focus-visible:ring-accent`,children:(0,$.jsx)(ce,{className:`size-3.5`,"aria-hidden":!0})})]}):null,t[121]=A,t[122]=_,t[123]=u,t[124]=E,t[125]=b,t[126]=Xe):Xe=t[126];let Ze;return t[127]!==Je||t[128]!==Ye||t[129]!==Xe?(Ze=(0,$.jsxs)(`div`,{className:`space-y-2`,children:[Je,Ye,Xe]}),t[127]=Je,t[128]=Ye,t[129]=Xe,t[130]=Ze):Ze=t[130],Ze}function wt(e){return(0,$.jsx)(St,{value:e.id,children:(0,$.jsx)(`span`,{className:`max-w-56 truncate`,children:e.name})},e.id)}var Tt=[[`☀️`,`晨间简报`,`每天开始工作前,整理今天值得关注的任务与进展。`,`Morning briefing`,`Start each day with your tasks and project updates.`,`每天早上帮我整理当天到期、逾期的任务和项目进展,给出今天的重点。`,`Each morning, summarize my due and overdue tasks and project progress, and suggest priorities.`],[`📝`,`每周工作回顾`,`回顾一周的成果和问题,为下周留出清晰的方向。`,`Weekly review`,`Review the week and find a clear direction for the next.`,`每周五帮我回顾本周完成的任务和项目进展,整理未解决的问题,建议下周的重点。`,`Every Friday, review completed tasks and project progress, unresolved issues, and priorities for next week.`],[`🌱`,`项目进展跟进`,`定期看看项目进度,找出需要你关注的事情。`,`Project check-in`,`Keep an eye on project progress and what needs attention.`,`定期帮我检查项目进度,整理延期、阻塞和需要我决策的事项。先和我确认关注哪个项目以及运行时间。`,`Regularly review a project for delays, blockers, and decisions I need to make. Ask which project and when to run.`],[`🔔`,`重要事项提醒`,`把容易忘记的事情交给提醒,安心专注眼前。`,`A timely reminder`,`Make room to focus by setting a reminder for later.`,`我想安排一个重要事项提醒。请先问我需要提醒什么、什么时候提醒,以及是否重复。`,`Help me schedule a reminder. Ask what to remember, when, and whether it should repeat.`],[`📚`,`笔记整理`,`回看新收集的想法,整理出值得继续推进的线索。`,`Notes roundup`,`Revisit recent ideas and surface useful next steps.`,`每周帮我回顾最近新增的笔记,按主题整理,找出值得继续推进的想法。请先确认时间和范围。`,`Each week, group my recent notes by topic and suggest ideas worth pursuing. Confirm the schedule and scope.`],[`🧭`,`明日工作计划`,`下班前梳理未完成的事,安排明天最重要的三件事。`,`Plan tomorrow`,`Wrap up loose ends and choose tomorrow’s top three priorities.`,`每个工作日下班前,帮我梳理未完成的任务,建议明天最重要的三件事。请先确认具体时间。`,`Before the end of each workday, review unfinished tasks and suggest tomorrow’s top three priorities. Confirm the time.`],[`🗓️`,`月度复盘`,`拉远一点看进展,发现反复出现的问题和新的机会。`,`Monthly reflection`,`Step back to spot progress, recurring problems, and opportunities.`,`每月月底帮我回顾项目和任务的进展,总结成果、反复出现的问题和下个月的重点。请确认运行时间。`,`At the end of each month, review project and task progress, achievements, recurring problems, and priorities. Confirm the schedule.`],[`🎯`,`逾期任务检查`,`定期发现被搁置的事项,让重要的事重新向前。`,`Overdue task check`,`Find neglected tasks and get important work moving again.`,`定期帮我检查逾期任务,按紧迫程度整理,并建议下一步。请先确认运行频率和时间。`,`Regularly review overdue tasks, prioritize them by urgency, and suggest next steps. Confirm the frequency and time.`]];function Et(e=Math.random){let t=[...Tt];for(let n=t.length-1;n>0;n--){let r=Math.min(n,Math.max(0,Math.floor(e()*(n+1))));[t[n],t[r]]=[t[r],t[n]]}return t.slice(0,6)}function Dt({language:e,projectId:t,onOpenConversation:n}){let r=s(),[i,a]=(0,Q.useState)(!1),[o,c]=(0,Q.useState)(``),l=async e=>{a(!0),c(``);try{let i=await Ue({projectId:t,prompt:e});n?n(i):r(i)}catch(e){c(e instanceof Error?e.message:String(e))}finally{a(!1)}},u=e===`zh`,[d,f]=(0,Q.useState)(Et),p=(0,$.jsxs)(`div`,{className:`mx-auto w-full max-w-3xl px-2 py-10 sm:px-6 md:py-20`,children:[(0,$.jsxs)(`div`,{className:`text-center`,children:[(0,$.jsx)(x,{className:`mx-auto size-10 text-fg-muted`,strokeWidth:1.3,"aria-hidden":!0}),(0,$.jsx)(`h2`,{className:`mt-4 text-xl font-semibold tracking-tight text-fg`,children:u?`安排任务`:`Schedule a task`}),(0,$.jsx)(`p`,{className:`mt-2 text-sm leading-6 text-fg-muted`,children:u?`说说你希望定期完成什么,我们一起安排好。`:`Tell us what you’d like done regularly. We’ll work out the details together.`})]}),(0,$.jsxs)(`div`,{className:`mb-3 mt-10 flex items-center justify-between text-xs text-fg-muted`,children:[(0,$.jsx)(`span`,{children:u?`也可以从这些想法开始`:`Or start with an idea`}),(0,$.jsxs)(`button`,{type:`button`,onClick:()=>f(Et()),className:`flex items-center gap-1.5 rounded-md px-2 py-1.5 hover:bg-surface-hover focus-visible:ring-2 focus-visible:ring-accent`,children:[(0,$.jsx)(ae,{className:`size-3.5`,"aria-hidden":!0}),u?`换一组`:`More ideas`]})]}),(0,$.jsx)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:d.map(e=>(0,$.jsxs)(`button`,{type:`button`,disabled:i,onClick:()=>void l(u?e[5]:e[6]),className:`flex min-h-28 items-center gap-4 rounded-xl border border-dashed border-edge bg-surface-panel px-5 py-4 transition-colors hover:border-edge-strong hover:bg-surface-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`,children:[(0,$.jsx)(`span`,{className:`shrink-0 text-2xl`,"aria-hidden":!0,children:e[0]}),(0,$.jsxs)(`span`,{className:`min-w-0`,children:[(0,$.jsx)(`span`,{className:`block text-sm font-medium text-fg`,children:u?e[1]:e[3]}),(0,$.jsx)(`span`,{className:`mt-1 block text-sm leading-5 text-fg-muted`,children:u?e[2]:e[4]})]})]},e[1]))}),(0,$.jsx)(`div`,{className:`mt-6 text-center`,children:(0,$.jsx)(`button`,{type:`button`,disabled:i,onClick:()=>void l(),className:`rounded-md px-3 py-2 text-sm text-fg-muted hover:bg-surface-hover hover:text-fg focus-visible:ring-2 focus-visible:ring-accent`,children:u?`说说你想安排的其他任务`:`Describe another task`})}),o?(0,$.jsx)(`p`,{role:`alert`,className:`mt-3 text-center text-sm text-danger`,children:o}):null]});return(0,$.jsx)(`section`,{"aria-label":u?`安排任务`:`Schedule a task`,children:p})}function Ot(e){if(!e.trim())return null;try{return JSON.parse(e)}catch{return null}}function kt(e){return typeof e.message==`string`&&e.message.trim()?e.message:typeof e.error==`string`&&e.error.trim()?e.error:e.error&&typeof e.error==`object`&&typeof e.error.message==`string`?e.error.message:`AI suggestion failed`}function At(e,t={}){let n=Ot(e.split(`
|
|
3
|
-
`).filter(e=>e.startsWith(`data:`)).map(e=>e.slice(5).trimStart()).join(`
|
|
4
|
-
`));if(!n)return null;if(n.type===`text_delta`&&typeof n.delta==`string`)return t.onDelta?.(n.delta),null;if(n.type===`thinking_delta`&&typeof n.delta==`string`)return t.onThinkingDelta?.(n.delta),null;if(n.type===`done`&&typeof n.text==`string`)return n.text;if(n.type===`error`)throw Error(kt(n));return null}async function jt(e,t={}){let n=await c(l(`/api/ai/text-assist`),{method:`POST`,headers:{Accept:`text/event-stream`},body:JSON.stringify(e)});if(!n.ok){let e=await n.json().catch(()=>({})),t=typeof e.error==`string`?e.error:e.error?.message;throw Error(t||`AI suggestion failed (${n.status})`)}if(!n.body){let e=await n.json().catch(()=>null);if(e?.text)return e;throw Error(`AI suggestion stream is empty`)}let r=n.body.getReader(),i=new TextDecoder,a=``,o=``,s=``;for(;;){let{done:e,value:n}=await r.read();if(n){a+=i.decode(n,{stream:!e});let r=a.split(/\r?\n\r?\n/);a=r.pop()??``;for(let e of r){let n=At(e,{onDelta:e=>{o+=e,t.onDelta?.(e)},onThinkingDelta:e=>{s+=e,t.onThinkingDelta?.(e)}});n!==null&&(o=n)}}if(e)break}if(a.trim()){let e=At(a,{onDelta:e=>{o+=e,t.onDelta?.(e)},onThinkingDelta:e=>{s+=e,t.onThinkingDelta?.(e)}});e!==null&&(o=e)}let u=o.trim();if(!u)throw Error(`AI returned an empty suggestion`);return{text:u,thinking:s.trim()||void 0}}function Mt(){let[e,t]=(0,Q.useState)(``),[n,r]=(0,Q.useState)(``),[i,a]=(0,Q.useState)(!1),[o,s]=(0,Q.useState)(null);return{suggestion:e,thinking:n,loading:i,error:o,generate:(0,Q.useCallback)(async e=>{a(!0),s(null),t(``),r(``);try{let n=await jt(e,{onDelta:e=>{t(t=>t+e)},onThinkingDelta:e=>{r(t=>t+e)}});return t(n.text),r(n.thinking??``),n.text}catch(e){let t=e instanceof Error?e.message:`AI suggestion failed`;return s(t),null}finally{a(!1)}},[]),reset:(0,Q.useCallback)(()=>{t(``),r(``),s(null),a(!1)},[])}}var Nt=5;function Pt(e){return e.startsWith(`zh`)?{title:`AI 优化文案`,buttonTitle:`优化文案`,current:`当前内容`,suggestion:`AI 建议`,editedSuggestion:`审核并编辑建议`,thinking:`模型思考`,thinkingLoading:`思考中`,edit:`编辑`,preview:`预览`,loading:`正在生成建议...`,empty:`暂无内容`,generate:`生成建议`,regenerate:`重新生成`,applyCurrent:`应用当前内容`,replace:`替换`,append:`追加`,cancel:`取消`,close:`关闭`}:{title:`AI text assist`,buttonTitle:`Improve text`,current:`Current`,suggestion:`Suggestion`,editedSuggestion:`Review and edit suggestion`,thinking:`Model thinking`,thinkingLoading:`Thinking`,edit:`Edit`,preview:`Preview`,loading:`Generating suggestion...`,empty:`No content`,generate:`Generate suggestion`,regenerate:`Regenerate`,applyCurrent:`Apply current`,replace:`Replace`,append:`Append`,cancel:`Cancel`,close:`Close`}}function Ft(e){let t=(0,it.c)(245),{value:n,onApply:r,fieldId:i,fieldLabel:a,scenario:o,format:s,intent:c,locale:l,context:u,disabled:d,className:f,showLabel:y}=e,b=o===void 0?`generic.text`:o,x=s===void 0?`plain`:s,S=c===void 0?`improve`:c,C=y===void 0||y,[w,T]=(0,Q.useState)(!1),[E,O]=(0,Q.useState)(n),[k,A]=(0,Q.useState)(`preview`),[j,M]=(0,Q.useState)(``),[N,P]=(0,Q.useState)(`edit`),[I,L]=(0,Q.useState)(!0),[R,ee]=(0,Q.useState)(!1),[te,ne]=(0,Q.useState)(null),re=(0,Q.useRef)(null),ie=(0,Q.useRef)(!0),{suggestion:oe,thinking:B,loading:H,error:U,generate:G,reset:K}=Mt(),q;t[0]===l?q=t[1]:(q=Pt(l),t[0]=l,t[1]=q);let J=q,le;t[2]!==H||t[3]!==B?(le=H&&B.trim().length>0,t[2]=H,t[3]=B,t[4]=le):le=t[4];let Y=le,ue,de;t[5]!==w||t[6]!==n?(ue=()=>{w||O(n)},de=[w,n],t[5]=w,t[6]=n,t[7]=ue,t[8]=de):(ue=t[7],de=t[8]),(0,Q.useEffect)(ue,de);let pe,X;t[9]===oe?(pe=t[10],X=t[11]):(X=()=>{M(oe)},pe=[oe],t[9]=oe,t[10]=pe,t[11]=X),(0,Q.useEffect)(X,pe);let he,ge;t[12]===B?(he=t[13],ge=t[14]):(he=()=>{B.trim()&&L(!0)},ge=[B],t[12]=B,t[13]=he,t[14]=ge),(0,Q.useEffect)(he,ge);let _e;t[15]!==Y||t[16]!==I?(_e=()=>{let e=re.current;!e||!Y||!I||ie.current&&(e.scrollTop=e.scrollHeight)},t[15]=Y,t[16]=I,t[17]=_e):_e=t[17];let ve;t[18]!==Y||t[19]!==B||t[20]!==I?(ve=[Y,B,I],t[18]=Y,t[19]=B,t[20]=I,t[21]=ve):ve=t[21],(0,Q.useLayoutEffect)(_e,ve);let ye;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(ye=()=>{let e=re.current;if(!e)return;let t=e.scrollHeight-e.scrollTop-e.clientHeight;ie.current=t<=Nt},t[22]=ye):ye=t[22];let be=ye,xe;t[23]!==u||t[24]!==i||t[25]!==a||t[26]!==x||t[27]!==G||t[28]!==S||t[29]!==l||t[30]!==b?(xe=async e=>{P(`edit`),L(!0),ie.current=!0,await G({intent:S,scenario:b,input:e,locale:l,field:{id:i,label:a,format:x},context:u})},t[23]=u,t[24]=i,t[25]=a,t[26]=x,t[27]=G,t[28]=S,t[29]=l,t[30]=b,t[31]=xe):xe=t[31];let Se=xe,Z;t[32]!==K||t[33]!==n?(Z=e=>{ee(!!e.currentTarget.closest(`[role="dialog"]`)),ne(document.querySelector(`.app-main-surface`)),O(n),A(`preview`),M(``),P(`edit`),L(!0),K(),T(!0)},t[32]=K,t[33]=n,t[34]=Z):Z=t[34];let Ce=Z,we;t[35]!==E||t[36]!==Se?(we=async()=>{await Se(E)},t[35]=E,t[36]=Se,t[37]=we):we=t[37];let Te=we,Ee;t[38]!==K||t[39]!==n?(Ee=()=>{T(!1),O(n),A(`preview`),M(``),P(`edit`),L(!0),K()},t[38]=K,t[39]=n,t[40]=Ee):Ee=t[40];let De=Ee,Oe;t[41]!==De||t[42]!==E||t[43]!==r?(Oe=()=>{r(E),De()},t[41]=De,t[42]=E,t[43]=r,t[44]=Oe):Oe=t[44];let ke=Oe,Ae;t[45]!==De||t[46]!==j||t[47]!==r?(Ae=()=>{j.trim()&&(r(j),De())},t[45]=De,t[46]=j,t[47]=r,t[48]=Ae):Ae=t[48];let je=Ae,Me;t[49]!==De||t[50]!==E||t[51]!==j||t[52]!==r?(Me=()=>{if(!j.trim())return;let e=E.trimEnd();r(e?`${e}\n\n${j}`:j),De()},t[49]=De,t[50]=E,t[51]=j,t[52]=r,t[53]=Me):Me=t[53];let Ne=Me,Pe;t[54]!==j||t[55]!==U||t[56]!==H?(Pe=!H&&!U&&j.trim().length>0,t[54]=j,t[55]=U,t[56]=H,t[57]=Pe):Pe=t[57];let Fe=Pe,Ie=E!==n,Le;t[58]!==j||t[59]!==U||t[60]!==B?(Le=j.trim().length>0||B.trim().length>0||!!U,t[58]=j,t[59]=U,t[60]=B,t[61]=Le):Le=t[61];let Re=Le,ze=!C&&`size-7 p-0`,Be;t[62]!==f||t[63]!==ze?(Be=W(`h-7 gap-1 px-2 text-xs`,ze,f),t[62]=f,t[63]=ze,t[64]=Be):Be=t[64];let Ve=d||H,He;t[65]===Symbol.for(`react.memo_cache_sentinel`)?(He=(0,$.jsx)(se,{className:`size-3.5`,strokeWidth:1.75,"aria-hidden":!0}),t[65]=He):He=t[65];let Ue=C?J.buttonTitle:null,We;t[66]!==J.buttonTitle||t[67]!==Ce||t[68]!==Be||t[69]!==Ve||t[70]!==Ue?(We=(0,$.jsxs)(fe,{type:`button`,variant:`ghost`,className:Be,title:J.buttonTitle,"aria-label":J.buttonTitle,disabled:Ve,onClick:Ce,children:[He,Ue]}),t[66]=J.buttonTitle,t[67]=Ce,t[68]=Be,t[69]=Ve,t[70]=Ue,t[71]=We):We=t[71];let Ge;t[72]===De?Ge=t[73]:(Ge=e=>e?T(!0):De(),t[72]=De,t[73]=Ge);let Ke=te??void 0,qe=R?`bg-transparent`:`bg-scrim`,Je;t[74]===qe?Je=t[75]:(Je=W(`xopc-dialog-overlay absolute inset-0 z-[80]`,qe),t[74]=qe,t[75]=Je);let Ye;t[76]===Je?Ye=t[77]:(Ye=(0,$.jsx)(p,{className:Je}),t[76]=Je,t[77]=Ye);let Xe;t[78]===J.title?Xe=t[79]:(Xe=(0,$.jsx)(_,{className:`text-base font-semibold text-fg`,children:J.title}),t[78]=J.title,t[79]=Xe);let Ze;t[80]===Symbol.for(`react.memo_cache_sentinel`)?(Ze=(0,$.jsx)(ce,{className:`size-5`,strokeWidth:1.75}),t[80]=Ze):Ze=t[80];let Qe;t[81]===J.close?Qe=t[82]:(Qe=(0,$.jsx)(m,{asChild:!0,children:(0,$.jsx)(fe,{type:`button`,variant:`ghost`,className:`size-9 shrink-0 p-0`,"aria-label":J.close,children:Ze})}),t[81]=J.close,t[82]=Qe);let $e;t[83]!==Xe||t[84]!==Qe?($e=(0,$.jsxs)(`div`,{className:`flex shrink-0 items-center justify-between gap-2 border-b border-edge px-4 py-3`,children:[Xe,Qe]}),t[83]=Xe,t[84]=Qe,t[85]=$e):$e=t[85];let et;t[86]===J.current?et=t[87]:(et=(0,$.jsx)(`div`,{className:`min-w-0 text-xs font-medium text-fg-muted`,children:J.current}),t[86]=J.current,t[87]=et);let tt=J.current,nt=k===`edit`,rt=k===`edit`?`bg-surface-panel text-fg shadow-surface`:`text-fg-muted hover:bg-surface-hover`,at;t[88]===rt?at=t[89]:(at=W(`inline-flex h-7 items-center gap-1.5 rounded-md px-2 text-xs font-medium`,rt),t[88]=rt,t[89]=at);let ot,st;t[90]===Symbol.for(`react.memo_cache_sentinel`)?(ot=()=>A(`edit`),st=(0,$.jsx)(V,{className:`size-3.5 shrink-0`,strokeWidth:1.75,"aria-hidden":!0}),t[90]=ot,t[91]=st):(ot=t[90],st=t[91]);let ct;t[92]!==J.edit||t[93]!==nt||t[94]!==at?(ct=(0,$.jsxs)(`button`,{"aria-pressed":nt,type:`button`,className:at,onClick:ot,children:[st,J.edit]}),t[92]=J.edit,t[93]=nt,t[94]=at,t[95]=ct):ct=t[95];let lt=k===`preview`,ut=k===`preview`?`bg-surface-panel text-fg shadow-surface`:`text-fg-muted hover:bg-surface-hover`,dt;t[96]===ut?dt=t[97]:(dt=W(`inline-flex h-7 items-center gap-1.5 rounded-md px-2 text-xs font-medium`,ut),t[96]=ut,t[97]=dt);let ft,pt;t[98]===Symbol.for(`react.memo_cache_sentinel`)?(ft=()=>A(`preview`),pt=(0,$.jsx)(F,{className:`size-3.5 shrink-0`,strokeWidth:1.75,"aria-hidden":!0}),t[98]=ft,t[99]=pt):(ft=t[98],pt=t[99]);let mt;t[100]!==J.preview||t[101]!==lt||t[102]!==dt?(mt=(0,$.jsxs)(`button`,{"aria-pressed":lt,type:`button`,className:dt,onClick:ft,children:[pt,J.preview]}),t[100]=J.preview,t[101]=lt,t[102]=dt,t[103]=mt):mt=t[103];let ht;t[104]!==J.current||t[105]!==ct||t[106]!==mt?(ht=(0,$.jsxs)(me,{className:`flex shrink-0 items-center gap-1 rounded-lg border border-edge bg-surface-inset p-0.5`,role:`group`,"aria-label":tt,indicatorClassName:`rounded-md bg-surface-panel shadow-surface`,children:[ct,mt]}),t[104]=J.current,t[105]=ct,t[106]=mt,t[107]=ht):ht=t[107];let gt;t[108]!==et||t[109]!==ht?(gt=(0,$.jsxs)(`div`,{className:`mb-2 flex items-center justify-between gap-2`,children:[et,ht]}),t[108]=et,t[109]=ht,t[110]=gt):gt=t[110];let _t;t[111]!==E||t[112]!==k||t[113]!==x||t[114]!==J.current||t[115]!==J.empty?(_t=k===`preview`?(0,$.jsx)(`div`,{className:`min-h-0 flex-1 overflow-auto rounded-lg border border-edge bg-surface-base p-3 text-sm leading-6 text-fg`,children:x===`markdown`?(0,$.jsx)(z,{content:E||J.empty,compact:!0,className:`text-sm`}):(0,$.jsx)(`pre`,{className:`whitespace-pre-wrap text-sm leading-6 text-fg`,children:E||J.empty})}):(0,$.jsx)(`textarea`,{className:`min-h-0 flex-1 resize-none overflow-auto rounded-lg border border-edge bg-surface-base p-3 text-sm leading-6 text-fg outline-none focus:border-accent focus:ring-2 focus:ring-accent/25`,value:E,onChange:e=>O(e.currentTarget.value),placeholder:J.empty,"aria-label":J.current}),t[111]=E,t[112]=k,t[113]=x,t[114]=J.current,t[115]=J.empty,t[116]=_t):_t=t[116];let vt;t[117]!==gt||t[118]!==_t?(vt=(0,$.jsxs)(`div`,{className:`flex min-h-0 flex-col overflow-hidden`,children:[gt,_t]}),t[117]=gt,t[118]=_t,t[119]=vt):vt=t[119];let yt;t[120]===J.editedSuggestion?yt=t[121]:(yt=(0,$.jsx)(`span`,{children:J.editedSuggestion}),t[120]=J.editedSuggestion,t[121]=yt);let bt;t[122]!==J.loading||t[123]!==H?(bt=H?(0,$.jsx)(`span`,{className:`ml-2 font-normal`,children:J.loading}):null,t[122]=J.loading,t[123]=H,t[124]=bt):bt=t[124];let xt;t[125]!==yt||t[126]!==bt?(xt=(0,$.jsxs)(`div`,{className:`min-w-0 text-xs font-medium text-fg-muted`,children:[yt,bt]}),t[125]=yt,t[126]=bt,t[127]=xt):xt=t[127];let St=J.editedSuggestion,Ct=N===`edit`?`bg-surface-panel text-fg shadow-surface`:`text-fg-muted hover:bg-surface-hover`,wt;t[128]===Ct?wt=t[129]:(wt=W(`inline-flex h-7 items-center gap-1.5 rounded-md px-2 text-xs font-medium`,Ct),t[128]=Ct,t[129]=wt);let Tt=N===`edit`,Et,Dt;t[130]===Symbol.for(`react.memo_cache_sentinel`)?(Et=()=>P(`edit`),Dt=(0,$.jsx)(V,{className:`size-3.5 shrink-0`,strokeWidth:1.75,"aria-hidden":!0}),t[130]=Et,t[131]=Dt):(Et=t[130],Dt=t[131]);let Ot;t[132]!==J.edit||t[133]!==wt||t[134]!==Tt?(Ot=(0,$.jsxs)(`button`,{type:`button`,className:wt,"aria-pressed":Tt,onClick:Et,children:[Dt,J.edit]}),t[132]=J.edit,t[133]=wt,t[134]=Tt,t[135]=Ot):Ot=t[135];let kt=N===`preview`?`bg-surface-panel text-fg shadow-surface`:`text-fg-muted hover:bg-surface-hover`,At;t[136]===kt?At=t[137]:(At=W(`inline-flex h-7 items-center gap-1.5 rounded-md px-2 text-xs font-medium`,kt),t[136]=kt,t[137]=At);let jt=N===`preview`,Ft,Rt;t[138]===Symbol.for(`react.memo_cache_sentinel`)?(Ft=()=>P(`preview`),Rt=(0,$.jsx)(F,{className:`size-3.5 shrink-0`,strokeWidth:1.75,"aria-hidden":!0}),t[138]=Ft,t[139]=Rt):(Ft=t[138],Rt=t[139]);let zt;t[140]!==J.preview||t[141]!==At||t[142]!==jt?(zt=(0,$.jsxs)(`button`,{type:`button`,className:At,"aria-pressed":jt,onClick:Ft,children:[Rt,J.preview]}),t[140]=J.preview,t[141]=At,t[142]=jt,t[143]=zt):zt=t[143];let Bt;t[144]!==J.editedSuggestion||t[145]!==Ot||t[146]!==zt?(Bt=(0,$.jsxs)(me,{className:`flex shrink-0 items-center gap-1 rounded-lg border border-edge bg-surface-inset p-0.5`,role:`group`,"aria-label":St,indicatorClassName:`rounded-md bg-surface-panel shadow-surface`,children:[Ot,zt]}),t[144]=J.editedSuggestion,t[145]=Ot,t[146]=zt,t[147]=Bt):Bt=t[147];let Vt;t[148]!==xt||t[149]!==Bt?(Vt=(0,$.jsxs)(`div`,{className:`mb-2 flex items-center justify-between gap-2`,children:[xt,Bt]}),t[148]=xt,t[149]=Bt,t[150]=Vt):Vt=t[150];let Ht=Y?`opacity-100`:`pointer-events-none opacity-0`,Ut;t[151]===Ht?Ut=t[152]:(Ut=W(`absolute inset-0 min-h-0 transition-opacity duration-200 ease-out motion-reduce:transition-none`,Ht),t[151]=Ht,t[152]=Ut);let Wt=!Y,Gt;t[153]===Symbol.for(`react.memo_cache_sentinel`)?(Gt=()=>L(It),t[153]=Gt):Gt=t[153];let Kt;t[154]!==J.thinkingLoading||t[155]!==H?(Kt=H?(0,$.jsxs)(`span`,{className:`ml-1 font-normal`,children:[`· `,J.thinkingLoading]}):null,t[154]=J.thinkingLoading,t[155]=H,t[156]=Kt):Kt=t[156];let qt;t[157]!==J.thinking||t[158]!==Kt?(qt=(0,$.jsxs)(`span`,{className:`min-w-0 truncate`,children:[J.thinking,Kt]}),t[157]=J.thinking,t[158]=Kt,t[159]=qt):qt=t[159];let Jt=I&&`rotate-180`,Yt;t[160]===Jt?Yt=t[161]:(Yt=W(`size-3.5 shrink-0 transition-transform`,Jt),t[160]=Jt,t[161]=Yt);let Xt;t[162]===Yt?Xt=t[163]:(Xt=(0,$.jsx)(D,{className:Yt,strokeWidth:1.75,"aria-hidden":!0}),t[162]=Yt,t[163]=Xt);let Zt;t[164]!==qt||t[165]!==Xt?(Zt=(0,$.jsxs)(`button`,{type:`button`,className:`flex shrink-0 items-center justify-between gap-2 px-2.5 py-2 text-left text-xs font-medium text-fg-muted hover:text-fg`,onClick:Gt,children:[qt,Xt]}),t[164]=qt,t[165]=Xt,t[166]=Zt):Zt=t[166];let Qt;t[167]!==B||t[168]!==I?(Qt=I?(0,$.jsx)(`pre`,{ref:re,className:`min-h-0 flex-1 overflow-auto border-t border-edge px-2.5 py-2 whitespace-pre-wrap text-xs leading-5 text-fg-muted`,onScroll:be,children:B}):null,t[167]=B,t[168]=I,t[169]=Qt):Qt=t[169];let $t;t[170]!==Zt||t[171]!==Qt?($t=(0,$.jsxs)(`div`,{className:`flex h-full min-h-0 flex-col rounded-lg border border-edge bg-surface-inset/70`,children:[Zt,Qt]}),t[170]=Zt,t[171]=Qt,t[172]=$t):$t=t[172];let en;t[173]!==Ut||t[174]!==Wt||t[175]!==$t?(en=(0,$.jsx)(`div`,{className:Ut,"aria-hidden":Wt,children:$t}),t[173]=Ut,t[174]=Wt,t[175]=$t,t[176]=en):en=t[176];let tn=Y?`pointer-events-none opacity-0`:`opacity-100`,nn;t[177]===tn?nn=t[178]:(nn=W(`absolute inset-0 min-h-0 transition-opacity duration-200 ease-out motion-reduce:transition-none`,tn),t[177]=tn,t[178]=nn);let rn;t[179]!==j||t[180]!==U||t[181]!==x||t[182]!==J.empty||t[183]!==J.loading||t[184]!==J.suggestion||t[185]!==H||t[186]!==N?(rn=U?(0,$.jsx)(`pre`,{className:`h-full min-h-0 overflow-auto whitespace-pre-wrap rounded-lg border border-edge bg-surface-base p-3 text-sm leading-6 text-fg-muted`,children:U}):N===`preview`?(0,$.jsx)(`div`,{className:`h-full min-h-0 overflow-auto rounded-lg border border-edge bg-surface-base p-3 text-sm leading-6 text-fg`,children:H&&!j.trim()?(0,$.jsx)(`p`,{className:`text-sm text-fg-muted`,children:J.loading}):x===`markdown`?(0,$.jsx)(z,{content:j||J.empty,compact:!0,className:`text-sm`}):(0,$.jsx)(`pre`,{className:`whitespace-pre-wrap text-sm leading-6 text-fg`,children:j||J.empty})}):(0,$.jsx)(`textarea`,{className:`h-full min-h-0 w-full resize-none overflow-auto rounded-lg border border-edge bg-surface-base p-3 text-sm leading-6 text-fg outline-none focus:border-accent focus:ring-2 focus:ring-accent/25 disabled:text-fg-muted`,value:j,onChange:e=>M(e.currentTarget.value),disabled:H,placeholder:H?J.loading:J.empty,"aria-label":J.suggestion}),t[179]=j,t[180]=U,t[181]=x,t[182]=J.empty,t[183]=J.loading,t[184]=J.suggestion,t[185]=H,t[186]=N,t[187]=rn):rn=t[187];let an;t[188]!==nn||t[189]!==rn?(an=(0,$.jsx)(`div`,{className:nn,children:rn}),t[188]=nn,t[189]=rn,t[190]=an):an=t[190];let on;t[191]!==en||t[192]!==an?(on=(0,$.jsxs)(`div`,{className:`relative min-h-0 flex-1 overflow-hidden`,children:[en,an]}),t[191]=en,t[192]=an,t[193]=on):on=t[193];let sn;t[194]!==Vt||t[195]!==on?(sn=(0,$.jsxs)(`div`,{className:`flex min-h-0 flex-col overflow-hidden`,children:[Vt,on]}),t[194]=Vt,t[195]=on,t[196]=sn):sn=t[196];let cn;t[197]!==vt||t[198]!==sn?(cn=(0,$.jsxs)(`div`,{className:`grid min-h-0 flex-1 grid-cols-1 gap-3 overflow-hidden p-4 md:grid-cols-2`,children:[vt,sn]}),t[197]=vt,t[198]=sn,t[199]=cn):cn=t[199];let ln;t[200]!==De||t[201]!==J.cancel?(ln=(0,$.jsx)(fe,{type:`button`,variant:`secondary`,onClick:De,children:J.cancel}),t[200]=De,t[201]=J.cancel,t[202]=ln):ln=t[202];let un=!Ie,dn;t[203]!==ke||t[204]!==J.applyCurrent||t[205]!==un?(dn=(0,$.jsx)(fe,{type:`button`,variant:`secondary`,disabled:un,onClick:ke,children:J.applyCurrent}),t[203]=ke,t[204]=J.applyCurrent,t[205]=un,t[206]=dn):dn=t[206];let fn;t[207]===Te?fn=t[208]:(fn=()=>void Te(),t[207]=Te,t[208]=fn);let pn;t[209]===Re?pn=t[210]:(pn=Re?(0,$.jsx)(ae,{className:`size-4`,strokeWidth:1.75,"aria-hidden":!0}):(0,$.jsx)(se,{className:`size-4`,strokeWidth:1.75,"aria-hidden":!0}),t[209]=Re,t[210]=pn);let mn=Re?J.regenerate:J.generate,hn;t[211]!==H||t[212]!==pn||t[213]!==mn||t[214]!==fn?(hn=(0,$.jsxs)(fe,{type:`button`,variant:`secondary`,disabled:H,onClick:fn,children:[pn,mn]}),t[211]=H,t[212]=pn,t[213]=mn,t[214]=fn,t[215]=hn):hn=t[215];let gn=!Fe,_n;t[216]!==Ne||t[217]!==J.append||t[218]!==gn?(_n=(0,$.jsx)(fe,{type:`button`,variant:`secondary`,disabled:gn,onClick:Ne,children:J.append}),t[216]=Ne,t[217]=J.append,t[218]=gn,t[219]=_n):_n=t[219];let vn=!Fe,yn;t[220]!==je||t[221]!==J.replace||t[222]!==vn?(yn=(0,$.jsx)(fe,{type:`button`,variant:`primary`,disabled:vn,onClick:je,children:J.replace}),t[220]=je,t[221]=J.replace,t[222]=vn,t[223]=yn):yn=t[223];let bn;t[224]!==hn||t[225]!==_n||t[226]!==yn||t[227]!==ln||t[228]!==dn?(bn=(0,$.jsxs)(`div`,{className:`flex shrink-0 justify-end gap-2 border-t border-edge px-4 py-3`,children:[ln,dn,hn,_n,yn]}),t[224]=hn,t[225]=_n,t[226]=yn,t[227]=ln,t[228]=dn,t[229]=bn):bn=t[229];let xn;t[230]!==bn||t[231]!==$e||t[232]!==cn?(xn=(0,$.jsx)(`div`,{className:`absolute inset-0 z-[80] flex items-center justify-center p-4 pointer-events-none`,children:(0,$.jsxs)(g,{className:`xopc-dialog-content-pane pointer-events-auto flex h-[min(78vh,38rem)] w-full max-w-4xl flex-col overflow-hidden rounded-2xl border border-edge bg-surface-overlay shadow-popover outline-none`,onOpenAutoFocus:Lt,children:[$e,cn,bn]})}),t[230]=bn,t[231]=$e,t[232]=cn,t[233]=xn):xn=t[233];let Sn;t[234]!==xn||t[235]!==Ke||t[236]!==Ye?(Sn=(0,$.jsxs)(h,{container:Ke,children:[Ye,xn]}),t[234]=xn,t[235]=Ke,t[236]=Ye,t[237]=Sn):Sn=t[237];let Cn;t[238]!==w||t[239]!==Sn||t[240]!==Ge?(Cn=(0,$.jsx)(v,{open:w,onOpenChange:Ge,children:Sn}),t[238]=w,t[239]=Sn,t[240]=Ge,t[241]=Cn):Cn=t[241];let wn;return t[242]!==Cn||t[243]!==We?(wn=(0,$.jsxs)($.Fragment,{children:[We,Cn]}),t[242]=Cn,t[243]=We,t[244]=wn):wn=t[244],wn}function It(e){return!e}function Lt(e){return e.preventDefault()}function Rt(e){return e.management!==void 0}function zt(e){return[`reminder`,`brief`,`review`,`followUp`].map(t=>{let n=e.scenarios[t];return{...n,requiresProject:t===`followUp`,form:{...Fe,name:n.name,instruction:t===`reminder`?``:n.instruction,triggerMode:t===`reminder`?`once`:t===`review`?`weekly`:`daily`,time:t===`brief`?`08:30`:t===`review`?`17:00`:`09:00`,weekday:`5`,notificationPolicy:`all`}}})}var Bt=`w-full rounded-lg border border-edge bg-surface-base px-3 py-2 text-sm text-fg focus-visible:outline-2 focus-visible:outline-accent`;function Vt(e){let t=(0,it.c)(99),{form:n,setForm:r,labels:i,projects:a,projectLocked:o,source:s,requiresProject:c}=e,l;t[0]===r?l=t[1]:(l=e=>r(t=>({...t,...e})),t[0]=r,t[1]=l);let u=l,d;t[2]!==i.experience.source||t[3]!==s?(d=(0,$.jsxs)(`p`,{className:`text-sm text-fg-muted`,children:[i.experience.source,`: `,s]}),t[2]=i.experience.source,t[3]=s,t[4]=d):d=t[4];let f;t[5]===u?f=t[6]:(f=e=>u({name:e.target.value}),t[5]=u,t[6]=f);let p;t[7]!==n.name||t[8]!==f?(p=(0,$.jsx)(`input`,{className:Bt,value:n.name,onChange:f}),t[7]=n.name,t[8]=f,t[9]=p):p=t[9];let m;t[10]!==i.form.name||t[11]!==p?(m=(0,$.jsxs)(`label`,{className:`grid gap-2 text-sm text-fg`,children:[i.form.name,p]}),t[10]=i.form.name,t[11]=p,t[12]=m):m=t[12];let h;t[13]===u?h=t[14]:(h=e=>u({instruction:e.target.value}),t[13]=u,t[14]=h);let g;t[15]!==n.instruction||t[16]!==h?(g=(0,$.jsx)(`textarea`,{className:Bt,rows:5,value:n.instruction,onChange:h}),t[15]=n.instruction,t[16]=h,t[17]=g):g=t[17];let _;t[18]!==i.info.task||t[19]!==g?(_=(0,$.jsxs)(`label`,{className:`grid gap-2 text-sm text-fg`,children:[i.info.task,g]}),t[18]=i.info.task,t[19]=g,t[20]=_):_=t[20];let v;t[21]!==n.projectId||t[22]!==i.form.noProject||t[23]!==i.form.project||t[24]!==o||t[25]!==a||t[26]!==u?(v=!o&&(0,$.jsxs)(`label`,{className:`grid gap-2 text-sm text-fg`,children:[i.form.project,(0,$.jsxs)(k,{className:Bt,value:n.projectId,onChange:e=>u({projectId:e.target.value}),children:[(0,$.jsx)(A,{value:``,children:i.form.noProject}),a.map(Ht)]})]}),t[21]=n.projectId,t[22]=i.form.noProject,t[23]=i.form.project,t[24]=o,t[25]=a,t[26]=u,t[27]=v):v=t[27];let y;t[28]!==n.projectId||t[29]!==i.experience.projectRequired||t[30]!==c?(y=c&&!n.projectId?(0,$.jsx)(`p`,{role:`status`,className:`text-sm text-fg-muted`,children:i.experience.projectRequired}):null,t[28]=n.projectId,t[29]=i.experience.projectRequired,t[30]=c,t[31]=y):y=t[31];let b;t[32]===u?b=t[33]:(b=e=>u({triggerMode:e.target.value}),t[32]=u,t[33]=b);let x;t[34]===i.trigger.once?x=t[35]:(x=(0,$.jsx)(A,{value:`once`,children:i.trigger.once}),t[34]=i.trigger.once,t[35]=x);let S;t[36]===i.trigger.daily?S=t[37]:(S=(0,$.jsx)(A,{value:`daily`,children:i.trigger.daily}),t[36]=i.trigger.daily,t[37]=S);let C;t[38]===i.trigger.weekly?C=t[39]:(C=(0,$.jsx)(A,{value:`weekly`,children:i.trigger.weekly}),t[38]=i.trigger.weekly,t[39]=C);let w;t[40]!==n.triggerMode||t[41]!==b||t[42]!==x||t[43]!==S||t[44]!==C?(w=(0,$.jsxs)(k,{className:Bt,value:n.triggerMode,onChange:b,children:[x,S,C]}),t[40]=n.triggerMode,t[41]=b,t[42]=x,t[43]=S,t[44]=C,t[45]=w):w=t[45];let T;t[46]!==i.form.trigger||t[47]!==w?(T=(0,$.jsxs)(`label`,{className:`grid gap-2 text-sm text-fg`,children:[i.form.trigger,w]}),t[46]=i.form.trigger,t[47]=w,t[48]=T):T=t[48];let E;t[49]!==n.onceAt||t[50]!==n.time||t[51]!==n.triggerMode||t[52]!==i.form.onceAt||t[53]!==i.form.time||t[54]!==u?(E=n.triggerMode===`once`?(0,$.jsx)(rt,{label:i.form.onceAt,value:n.onceAt,defaultTime:n.time,onChange:e=>u({onceAt:e})}):(0,$.jsxs)(`div`,{className:`grid gap-2 text-sm text-fg`,children:[(0,$.jsx)(`span`,{children:i.form.time}),(0,$.jsx)(Ze,{value:n.time,onChange:e=>u({time:e}),ariaLabel:i.form.time})]}),t[49]=n.onceAt,t[50]=n.time,t[51]=n.triggerMode,t[52]=i.form.onceAt,t[53]=i.form.time,t[54]=u,t[55]=E):E=t[55];let D;t[56]!==n.triggerMode||t[57]!==n.weekday||t[58]!==i.form.day||t[59]!==i.weekdays||t[60]!==u?(D=n.triggerMode===`weekly`&&(0,$.jsxs)(`label`,{className:`grid gap-2 text-sm text-fg`,children:[i.form.day,(0,$.jsx)(k,{className:Bt,value:n.weekday,onChange:e=>u({weekday:e.target.value}),children:[`sunday`,`monday`,`tuesday`,`wednesday`,`thursday`,`friday`,`saturday`].map((e,t)=>(0,$.jsx)(A,{value:String(t),children:i.weekdays[e]},e))})]}),t[56]=n.triggerMode,t[57]=n.weekday,t[58]=i.form.day,t[59]=i.weekdays,t[60]=u,t[61]=D):D=t[61];let O;t[62]!==T||t[63]!==E||t[64]!==D?(O=(0,$.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:[T,E,D]}),t[62]=T,t[63]=E,t[64]=D,t[65]=O):O=t[65];let j;t[66]!==n.onceAt||t[67]!==n.triggerMode||t[68]!==i.experience.futureTime?(j=n.triggerMode===`once`&&n.onceAt&&new Date(n.onceAt).getTime()<=Date.now()?(0,$.jsx)(`p`,{role:`status`,className:`text-sm text-red-700 dark:text-red-300`,children:i.experience.futureTime}):null,t[66]=n.onceAt,t[67]=n.triggerMode,t[68]=i.experience.futureTime,t[69]=j):j=t[69];let M;t[70]===i.experience.scheduleNote?M=t[71]:(M=(0,$.jsx)(`p`,{className:`text-xs text-fg-muted`,children:i.experience.scheduleNote}),t[70]=i.experience.scheduleNote,t[71]=M);let N;t[72]===u?N=t[73]:(N=e=>u({notificationPolicy:e.target.value}),t[72]=u,t[73]=N);let P;t[74]===i.draft.notifyAll?P=t[75]:(P=(0,$.jsx)(A,{value:`all`,children:i.draft.notifyAll}),t[74]=i.draft.notifyAll,t[75]=P);let F;t[76]===i.draft.notifyAttention?F=t[77]:(F=(0,$.jsx)(A,{value:`attention`,children:i.draft.notifyAttention}),t[76]=i.draft.notifyAttention,t[77]=F);let I;t[78]===i.draft.notifyNone?I=t[79]:(I=(0,$.jsx)(A,{value:`none`,children:i.draft.notifyNone}),t[78]=i.draft.notifyNone,t[79]=I);let L;t[80]!==n.notificationPolicy||t[81]!==N||t[82]!==P||t[83]!==F||t[84]!==I?(L=(0,$.jsxs)(k,{className:Bt,value:n.notificationPolicy,onChange:N,children:[P,F,I]}),t[80]=n.notificationPolicy,t[81]=N,t[82]=P,t[83]=F,t[84]=I,t[85]=L):L=t[85];let R;t[86]!==i.draft.notifications||t[87]!==L?(R=(0,$.jsxs)(`label`,{className:`grid gap-2 text-sm text-fg`,children:[i.draft.notifications,L]}),t[86]=i.draft.notifications,t[87]=L,t[88]=R):R=t[88];let z;return t[89]!==y||t[90]!==O||t[91]!==d||t[92]!==j||t[93]!==M||t[94]!==R||t[95]!==m||t[96]!==_||t[97]!==v?(z=(0,$.jsxs)(`div`,{className:`min-h-0 flex-1 space-y-5 overflow-y-auto px-5 py-4`,children:[d,m,_,v,y,O,j,M,R]}),t[89]=y,t[90]=O,t[91]=d,t[92]=j,t[93]=M,t[94]=R,t[95]=m,t[96]=_,t[97]=v,t[98]=z):z=t[98],z}function Ht(e){return(0,$.jsx)(A,{value:e.id,children:e.name},e.id)}var Ut=`xopc.automations.dismissedExecutionIssues`;function Wt(){if(typeof window>`u`)return{};try{let e=JSON.parse(window.localStorage.getItem(Ut)??`{}`);return!e||typeof e!=`object`||Array.isArray(e)?{}:Object.fromEntries(Object.entries(e).filter(e=>typeof e[1]==`string`))}catch{return{}}}function Gt(e,t,n){return e?Xe(e,n):t.never}function Kt(e,t){return e.kind===`system`?e.capability===`home.advisor.refresh`?`Home AI suggestions refresh`:e.capability===`memory.temporal_sweep`?`Memory temporal sweep`:e.capability===`memory.daily_reconciliation`?`Memory daily reconciliation`:`Memory weekly knowledge maintenance`:e.kind===`task_command`?t.action.taskWithId.replace(`{id}`,e.taskId):e.agentId?t.action.agentWithId.replace(`{id}`,e.agentId):t.action.agent}function qt(e,t){return e===`task_command`?t.action.runTask:t.action.runAgent}function Jt(e){return e.safety?.mode??`auto_apply`}function Yt(e){return e===`succeeded`?`bg-emerald-500/10 text-emerald-700 dark:text-emerald-300`:e===`failed`||e===`timeout`?`bg-red-500/10 text-red-700 dark:text-red-300`:e===`running`||e===`queued`||e===`cancelling`?`bg-blue-500/10 text-blue-700 dark:text-blue-300`:`bg-surface-hover text-fg-muted`}function Xt(e,t){if(e==null)return t.never;if(e<1e3)return`${e}ms`;let n=Math.round(e/1e3);return n<60?`${n}s`:`${Math.floor(n/60)}m ${n%60}s`}function Zt(e){return e.status===`running`||e.status===`queued`||e.status===`cancelling`}function Qt(e){return e.status===`failed`||e.status===`timeout`}function $t(e,t){return e.action.kind===`system`?Kt(e.action,t):e.action.kind===`agent`?e.action.instruction:(e.action.kind,Kt(e.action,t))}function en(e){return e.description?.trim()??``}function tn(e){return Zt(e)?0:Qt(e)?1:e.status===`succeeded`?2:3}function nn(e){return[...e].sort((e,t)=>{let n=tn(e)-tn(t);return n===0?t.createdAtMs-e.createdAtMs:n})}function rn(){let e=(0,it.c)(6),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,$.jsx)(`section`,{className:`grid grid-cols-2 gap-px overflow-hidden rounded-xl border border-edge-subtle bg-edge-subtle xl:grid-cols-4`,children:Array.from({length:4}).map(on)}),e[0]=t):t=e[0];let n;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,$.jsxs)(`div`,{className:`min-w-0 space-y-2`,children:[(0,$.jsx)(G,{className:`h-4 w-36`}),(0,$.jsx)(G,{className:`h-3 w-56 max-w-full`})]}),(0,$.jsx)(G,{className:`h-7 w-20 rounded-full`})]}),e[1]=n):n=e[1];let r;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,$.jsxs)(`section`,{className:`rounded-xl bg-surface-panel p-4 shadow-surface`,children:[n,(0,$.jsx)(`div`,{className:`mt-4 grid gap-2`,children:Array.from({length:6}).map(an)})]}),e[2]=r):r=e[2];let i,a;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,$.jsx)(G,{className:`h-4 w-32`}),a=(0,$.jsx)(G,{className:`mt-4 h-24 rounded-lg`}),e[3]=i,e[4]=a):(i=e[3],a=e[4]);let o;return e[5]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,$.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col gap-4`,"aria-hidden":`true`,children:[t,(0,$.jsxs)(`div`,{className:`grid min-h-0 flex-1 grid-rows-[auto_minmax(0,1fr)] gap-3 md:grid-cols-[15rem_minmax(0,1fr)] md:grid-rows-1 lg:grid-cols-[17rem_minmax(0,1fr)]`,children:[r,(0,$.jsxs)(`section`,{className:`hidden rounded-xl bg-surface-panel p-4 shadow-surface xl:block`,children:[i,a,(0,$.jsxs)(`div`,{className:`mt-4 grid gap-2`,children:[(0,$.jsx)(G,{className:`h-12 rounded-lg`}),(0,$.jsx)(G,{className:`h-12 rounded-lg`}),(0,$.jsx)(G,{className:`h-12 rounded-lg`})]})]})]})]}),e[5]=o):o=e[5],o}function an(e,t){return(0,$.jsx)(`div`,{className:`rounded-lg bg-surface-base p-3`,children:(0,$.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[(0,$.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,$.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,$.jsx)(G,{className:`size-4 rounded-full`}),(0,$.jsx)(G,{className:`h-4 w-32`}),(0,$.jsx)(G,{className:`h-5 w-20 rounded-full`})]}),(0,$.jsx)(G,{className:`mt-3 h-4 w-full`}),(0,$.jsx)(G,{className:`mt-2 h-4 w-3/5`})]}),(0,$.jsx)(G,{className:`h-8 w-24 rounded-md`})]})},t)}function on(e,t){return(0,$.jsxs)(`div`,{className:`flex min-h-12 items-center gap-2.5 bg-surface-base px-3 py-2.5`,children:[(0,$.jsx)(G,{className:`size-4 rounded-full`}),(0,$.jsx)(G,{className:`h-3 w-14`}),(0,$.jsx)(G,{className:`ml-auto h-4 w-10`})]},t)}function sn({projectId:e,embedded:t=!1,title:n,subtitle:r}){let i=d(e=>e.language),o=f(i),s=o.automations,c=o.productNavigation.sections[`automation-triggers`],l=o.cron,u=pe(e=>e.setPageHeader),y=pe(e=>e.clearPageHeader),[b,x]=a(),S=!t&&b.get(`view`)===`activity`,C=b.get(`run`)?.trim()??``,w=b.get(`view`)===`execution`&&!!C,T=b.get(`automation`)?.trim()??``,E=b.get(`new`)===`1`,D=b.get(`setupChat`)??void 0,O=b.get(`draft`)?.trim()??``,k=b.get(`action`)?.trim()??``,A=b.get(`taskId`)?.trim()??``,M=b.get(`projectId`)?.trim()??``,N=e?.trim()||M,P=!!e?.trim(),F=b.get(`autogenerate`)===`1`,I=(0,Q.useRef)(``),L=b.get(`status`),R=L===`active`||L===`paused`||L===`completed`||L===`running`||L===`attention`?L:`all`,z=b.get(`ownership`)===`system`?`system`:`user`,ee=b.get(`source`),te=ee===`agent`||ee===`task_command`?ee:`all`,ne=b.get(`q`)??``,re=e=>x(t=>{let n=new URLSearchParams(t);return e===`all`?n.delete(`status`):n.set(`status`,e),n.delete(`automation`),n}),ae=e=>x(t=>{let n=new URLSearchParams(t);return e===`user`?n.delete(`ownership`):n.set(`ownership`,e),n.delete(`automation`),n}),oe=e=>x(t=>{let n=new URLSearchParams(t);return e?n.set(`q`,e):n.delete(`q`),n.delete(`automation`),n},{replace:!0}),B=e=>x(t=>{let n=new URLSearchParams(t);return e===`all`?n.delete(`source`):n.set(`source`,e),n.delete(`automation`),n}),se=()=>x(e=>{let t=new URLSearchParams(e);return t.delete(`status`),t.delete(`source`),t.delete(`q`),t.delete(`automation`),t}),[V,H]=(0,Q.useState)(null),[G,q]=(0,Q.useState)(!1),[J,le]=(0,Q.useState)(`blank`),[me,ge]=(0,Q.useState)(!1),[_e,ve]=(0,Q.useState)(null),[ye,be]=(0,Q.useState)(null),[xe,Se]=(0,Q.useState)(!1),[Z,Ce]=(0,Q.useState)(Fe),[we,Te]=(0,Q.useState)(null),[Ee,De]=(0,Q.useState)(null),[Oe,Ae]=(0,Q.useState)(!1),[Ne,Le]=(0,Q.useState)(null),[Re,Ve]=(0,Q.useState)(``),[Ue,Ge]=(0,Q.useState)(null),[qe,Je]=(0,Q.useState)(!1),[Ye,Xe]=(0,Q.useState)(!1),[Ze,Qe]=(0,Q.useState)(N),[$e,tt]=(0,Q.useState)(`new_session`),[rt,it]=(0,Q.useState)(`attention`),[at,st]=(0,Q.useState)(null),[ct,lt]=(0,Q.useState)(!1),[ut,ft]=(0,Q.useState)(!1),[pt,mt]=(0,Q.useState)(!1),[ht,_t]=(0,Q.useState)(null),[yt,bt]=(0,Q.useState)(Wt),xt=Y([`automations`,N],()=>X.list(N?{projectId:N}:void 0),{keepPreviousData:!0,refreshInterval:15e3}),St=Y([`automation-runs`,N],()=>X.runs(50,void 0,N?{projectId:N}:void 0),{keepPreviousData:!0,refreshInterval:1e4}),wt=Y(N?`automations-global-system-source`:null,()=>X.list(),{keepPreviousData:!0,refreshInterval:15e3}),Tt=Y(N?`automation-runs-global-system-source`:null,()=>X.runs(50),{keepPreviousData:!0,refreshInterval:1e4}),Et=Y(Ne?[`automation-history`,Ne,N]:null,()=>X.runs(50,Ne,N?{projectId:N}:void 0),{refreshInterval:1e4}),Ot=Y(Ee?`automation-run-events:${Ee}`:null,()=>X.runEvents(Ee),{refreshInterval:5e3}),kt=Y(Ee?[`automation-exact-run`,Ee]:null,()=>X.getRun(Ee),{refreshInterval:3e3}),At=Y(`automation-chat-agents`,de),jt=Y(`automation-tasks`,X.tasks),Mt=Y(`automation-projects`,()=>K({sortBy:`name`,sortOrder:`asc`,limit:200})),Nt=xt.isLoading&&!xt.data||St.isLoading&&!St.data||!!N&&wt.isLoading&&!wt.data||!!N&&Tt.isLoading&&!Tt.data,Pt=!Nt&&(xt.isLoading||St.isLoading||wt.isLoading||Tt.isLoading),Ft=xt.data?.automations??[],It=N?wt.data?.automations??[]:Ft,Lt=(0,Q.useMemo)(()=>nn(St.data?.runs??[]),[St.data?.runs]),Bt=(0,Q.useMemo)(()=>N?nn(Tt.data?.runs??[]):Lt,[Tt.data?.runs,N,Lt]),Ht=(0,Q.useMemo)(()=>Ft.filter(e=>!Rt(e)),[Ft]),Gt=(0,Q.useMemo)(()=>It.filter(Rt),[It]),Kt=(0,Q.useMemo)(()=>[...Ht,...Gt],[Gt,Ht]),qt=(0,Q.useMemo)(()=>new Set(Gt.map(e=>e.id)),[Gt]),Jt=(0,Q.useMemo)(()=>Lt.filter(e=>!qt.has(e.automationId)),[Lt,qt]),Yt=(0,Q.useMemo)(()=>Bt.filter(e=>qt.has(e.automationId)),[Bt,qt]),Xt=(0,Q.useMemo)(()=>N?[...Lt,...Yt]:Lt,[N,Lt,Yt]),Qt=(0,Q.useMemo)(()=>kt.data?.run?.id===Ee?kt.data.run:Xt.find(e=>e.id===Ee)??Et.data?.runs.find(e=>e.id===Ee)??null,[Xt,Ee,Et.data,kt.data]),tn=(0,Q.useMemo)(()=>Kt.find(e=>e.id===Ne)??null,[Kt,Ne]),an=(0,Q.useMemo)(()=>Kt.find(e=>e.id===ye)??null,[Kt,ye]),on=(0,Q.useMemo)(()=>[...Et.data?.runs??Xt].filter(e=>e.automationId===Ne).sort((e,t)=>t.createdAtMs-e.createdAtMs),[Xt,Ne,Et.data]),sn=Ot.data?.events??[],un=(0,Q.useMemo)(()=>Jt.filter(e=>!Zt(e)&&e.readAtMs==null),[Jt]),dn=Ht.reduce((e,t)=>e+(xt.data?.executionSummaries?.[t.id]?.unreadCount??0),0),fn=ne.trim().toLocaleLowerCase(),pn=z===`system`?Gt:Ht,hn=z===`system`?Yt:Jt,gn=(0,Q.useMemo)(()=>new Set(hn.filter(Zt).map(e=>e.automationId)),[hn]),_n=(0,Q.useMemo)(()=>pn.filter(e=>R===`attention`&&!et(e,hn)||R===`running`&&!gn.has(e.id)||R===`active`&&!e.enabled||R===`paused`&&(e.enabled||ke(e))||R===`completed`&&!ke(e)||te!==`all`&&e.action.kind!==te?!1:!fn||[e.name,en(e),$t(e,s),je(e.trigger,s,l,i)].some(e=>e.toLocaleLowerCase().includes(fn))),[l,R,s,i,fn,pn,hn,gn,te]),bn=At.data?.items??[],xn=(0,Q.useMemo)(()=>(jt.data?.items??[]).map(e=>e.task),[jt.data]),Sn=Mt.data?.items??[],Cn=!!an?.management?.editable.includes(`trigger`),wn=[`daily`,`weekly`,`interval`,`cron`].includes(Z.triggerMode)&&(![`daily`,`weekly`].includes(Z.triggerMode)||/^(?:[01]\d|2[0-3]):[0-5]\d$/.test(Z.time))&&(Z.triggerMode!==`interval`||Be(Z.intervalValue,Z.intervalUnit)>=6e4)&&(Z.triggerMode!==`cron`||!!Z.cronExpr.trim()),Tn=Cn?wn:!!Z.name.trim()&&(Z.triggerMode!==`once`||Number.isFinite(new Date(Z.onceAt).getTime())&&(!!an||new Date(Z.onceAt).getTime()>Date.now()))&&(![`daily`,`weekly`].includes(Z.triggerMode)||/^(?:[01]\d|2[0-3]):[0-5]\d$/.test(Z.time))&&(Z.triggerMode!==`event`||!!Z.eventType.trim()&&Ie(Z.eventPayloadMatch))&&(Z.actionMode===`task_command`?!!(Z.taskId.trim()&&Z.agentId.trim()):!!Z.instruction.trim()),En=!0;try{[`daily`,`weekly`,`cron`].includes(Z.triggerMode)&&He(Z)}catch{En=!1}let Dn=Tn&&En,kn=(0,Q.useMemo)(()=>zt(s),[s]),An=(0,Q.useMemo)(()=>Ht.filter(e=>et(e,Jt)),[Ht,Jt]),jn=An.some(e=>{let t=nt(e,Jt);return t!==null&&yt[e.id]!==t}),Mn=(0,Q.useCallback)(()=>{bt(e=>{let t={...e};for(let e of An){let n=nt(e,Jt);n&&(t[e.id]=n)}try{window.localStorage.setItem(Ut,JSON.stringify(t))}catch{}return t})},[An,Jt]);(0,Q.useEffect)(()=>{if(!Pt){if(E){Le(null);return}if(T){Le(T);return}if(_n.length===0){Le(null);return}Ne&&_n.some(e=>e.id===Ne)||Le(null)}},[T,_n,E,Pt,Ne]);let Nn=(0,Q.useCallback)(async()=>{await Promise.all([xt.mutate(),St.mutate(),wt.mutate(),Tt.mutate(),Et.mutate(),Ot.mutate(),ue(e=>Array.isArray(e)&&e[0]===`automation-navigation-runs`)])},[xt.mutate,wt.mutate,Tt.mutate,Ot.mutate,St.mutate,Et.mutate]),Pn=(0,Q.useCallback)(e=>{if(P){Le(null),De(null);return}x(t=>{let n=new URLSearchParams(t);return e?n.set(`projectId`,e):n.delete(`projectId`),n.delete(`automation`),n.delete(`run`),n}),Le(null),De(null)},[P,x]);(0,Q.useEffect)(()=>{P&&(Qe(N),Ce(e=>e.projectId===N?e:{...e,projectId:N}))},[N,P]);let Fn=(0,Q.useCallback)(e=>{if(e===`blank`&&!A){ge(!0);return}if(be(null),Se(!1),Te(null),le(e),q(!0),e===`blank`){Ce({...Fe,projectId:N});return}Ve(``),Ge(null),Xe(!1),Qe(N),tt(`new_session`),it(`attention`)},[N,A]),In=e=>{H(e),Ce({...e.form,projectId:N}),be(null),Se(!1),Te(null),le(`quick`),q(!0)},Ln=(0,Q.useCallback)(e=>{if(e.action.kind===`agent`&&!e.management){ve(e);return}Ce(Ke(e)),be(e.id),Se(!1),Le(null),le(`blank`),q(!0)},[]),Rn=(0,Q.useCallback)(()=>{Ue&&(Ce({...Ke(Ue.automation),projectId:Ze,conversationMode:$e,notificationPolicy:rt}),be(null),Se(!0),le(`blank`))},[Ue,$e,rt,Ze]),zn=(0,Q.useCallback)(async()=>{mt(!0),Te(null);try{await Nn()}catch(e){let t=e instanceof Error?e.message:String(e);Te(t)}finally{mt(!1)}},[s.feedback.actionFailed,Nn]);(0,Q.useEffect)(()=>{let e=Kt.find(e=>e.id===T);!e||!Rt(e)||z===`system`||x(e=>{let t=new URLSearchParams(e);return t.set(`ownership`,`system`),t},{replace:!0})},[T,Kt,z,x]),(0,Q.useEffect)(()=>{k===`create`&&(Fn(`blank`),A&&Ce(e=>({...e,actionMode:`task_command`,taskId:A,safetyMode:`auto_apply`})),x(e=>{let t=new URLSearchParams(e);return t.delete(`action`),t.delete(`taskId`),t},{replace:!0}))},[k,Fn,x,A]),(0,Q.useEffect)(()=>{if(!O)return;let e=`${i}:${F?`auto`:`seed`}:${O}`;I.current!==e&&(I.current=e,Ve(O),Ge(null),Xe(!1),Qe(N),le(`draft`),q(!0),x(e=>{let t=new URLSearchParams(e);return t.delete(`draft`),t.delete(`autogenerate`),t},{replace:!0}),F&&(Te(null),Je(!0),X.draft({prompt:O,language:i}).then(e=>{Ge(e.draft),Xe(!1)}).catch(e=>{Te(e instanceof Error?e.message:String(e))}).finally(()=>{Je(!1)})))},[F,O,i,N,x]);let Bn=(0,Q.useCallback)(e=>{let t=Lt.find(t=>t.id===e)??Et.data?.runs.find(t=>t.id===e);if(!t||Zt(t)||t.readAtMs!=null)return;let n=Date.now();St.mutate(t=>t&&{...t,runs:t.runs.map(t=>t.id===e?{...t,readAtMs:n}:t)},!1),Et.mutate(t=>t&&{...t,runs:t.runs.map(t=>t.id===e?{...t,readAtMs:n}:t)},!1),X.markRunRead(e).catch(e=>{Te(e instanceof Error?e.message:String(e)),St.mutate(),Et.mutate()})},[Lt,St.mutate,Et.data,Et.mutate]),Vn=(0,Q.useCallback)(e=>{Bn(e),De(e),Ae(!0),x(t=>{let n=new URLSearchParams(t);return n.set(`run`,e),n},{replace:!0})},[Bn,x]),Hn=(0,Q.useCallback)(e=>{Le(e),De(null),Ae(!1),x(t=>{let n=new URLSearchParams(t);n.set(`automation`,e);for(let e of[`new`,`setupChat`,`chatDraft`,`run`,`view`])n.delete(e);return n})},[x]),Un=(0,Q.useCallback)(e=>{Ae(!1),x(t=>{let n=new URLSearchParams(t);n.set(`automation`,e.automationId),n.set(`run`,e.id),n.set(`view`,`execution`);for(let e of[`new`,`setupChat`,`chatDraft`])n.delete(e);return n})},[x]);(0,Q.useEffect)(()=>{De(C||null),Ae(!!C&&!w)},[w,C]),(0,Q.useEffect)(()=>{C&&!w&&Bn(C)},[w,C,Bn]),(0,Q.useEffect)(()=>{st(null),ft(!1)},[Ee]);async function Wn(){if(Te(null),Z.triggerMode===`once`&&!an&&new Date(Z.onceAt).getTime()<=Date.now()){Te(s.experience.futureTime);return}if(!(!Dn||ht)&&!(J===`quick`&&V?.requiresProject&&!Z.projectId)){if(xe&&Ue){_t(`draft:edit`);try{let e=ze(Z),{simulation:t}=await X.simulate(e);Ge({...Ue,automation:e,simulation:t}),Qe(Z.projectId),tt(Z.conversationMode),it(Z.notificationPolicy),Xe(!1),Se(!1),le(`draft`)}catch(e){let t=e instanceof Error?e.message:String(e);Te(t)}finally{_t(null)}return}if(an){let e=an.id;await Gn(`automation:${e}:edit`,()=>X.update(e,{...Cn?{trigger:Pe(an,{...Z,instruction:`managed`}).trigger}:Pe(an,Z),expectedRevision:an.updatedAtMs}))&&(q(!1),be(null),Le(e));return}_t(`automation:create`);try{let e=ze(Z),{automation:t}=await X.create(e);Ce(Fe),q(!1),x(e=>{let n=new URLSearchParams(e);return n.delete(`status`),n.delete(`q`),n.delete(`run`),n.delete(`new`),n.set(`automation`,t.id),P||(t.projectId?n.set(`projectId`,t.projectId):n.delete(`projectId`)),n}),await Nn(),Le(t.id)}catch(e){let t=e instanceof Error?e.message:String(e);Te(t)}finally{_t(null)}}}async function Gn(e,t){Te(null),_t(e);try{return await t(),await Nn(),!0}catch(e){let t=e instanceof Error?e.message:String(e);return Te(t),!1}finally{_t(null)}}async function Kn(){await Gn(`runs:read-all`,()=>X.markAllRunsRead(N||void 0))}async function qn(){let e=Re.trim();if(e){Te(null),Je(!0);try{let t=await X.draft({prompt:e,language:i});Ge(t.draft),Xe(!1)}catch(e){Te(e instanceof Error?e.message:String(e))}finally{Je(!1)}}}async function Jn(){if(!Ue)return;let e=``,t=``;await Gn(`draft:publish`,async()=>{let{automation:n}=await X.create({...Ue.automation,...Ze?{projectId:Ze}:{projectId:void 0},conversationMode:$e,delivery:{...Ue.automation.delivery,notificationPolicy:rt}});Ge(null),Ve(``),Xe(!1),q(!1),re(`all`),oe(``),e=n.id,t=n.projectId??``})&&e&&(Pn(t),Hn(e))}async function Yn(){if(!Ue)return;let e=``,t=``,n=``;await Gn(`draft:test`,async()=>{let{automation:r}=await X.create({...Ue.automation,...Ze?{projectId:Ze}:{projectId:void 0},conversationMode:$e,delivery:{...Ue.automation.delivery,notificationPolicy:rt},enabled:!1}),{run:i}=await X.runNow(r.id);e=r.id,t=r.projectId??``,n=i.id,Ge(null),Ve(``),Xe(!1),q(!1),re(`all`),oe(``)})&&e&&n&&(Pn(t),Hn(e),Vn(n))}async function Xn(e){Te(null),lt(!0),st(null),ft(!1);try{let t=await X.repairDraft(e.id,{language:i});st(t.repair)}catch(e){Te(e instanceof Error?e.message:String(e))}finally{lt(!1)}}async function Zn(e){at&&await Gn(`run:${e.id}:repair`,async()=>{await X.update(e.automationId,at.patch),st(null),ft(!1)})}let Qn=(0,Q.useMemo)(()=>(0,$.jsx)(he,{className:`size-9 shrink-0 p-0`,loading:pt,label:s.refresh,onClick:zn}),[s.refresh,pt,zn]);return(0,Q.useLayoutEffect)(()=>{if(!t)return u({startExtra:null,main:(0,$.jsx)(`h1`,{className:`truncate text-base font-semibold tracking-tight text-fg`,children:c}),end:Qn}),()=>y()},[y,t,Qn,c,u]),(0,$.jsxs)(`div`,{className:W(`flex min-h-0 min-w-0 flex-1 flex-col`,t?`bg-transparent`:`bg-surface-panel`),children:[(0,$.jsxs)(`div`,{className:W(`flex min-h-0 w-full flex-1 flex-col gap-4`,t?`py-1`:`px-4 pt-3 sm:px-9 lg:pt-4 xl:px-10`,!t&&(S?`overflow-y-auto`:`overflow-hidden`)),children:[t?(0,$.jsxs)(`div`,{className:`flex flex-wrap items-start justify-between gap-3 rounded-xl border border-edge-subtle bg-surface-base px-4 py-3 shadow-surface`,children:[(0,$.jsxs)(`div`,{className:`min-w-0`,children:[(0,$.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,$.jsx)(U,{className:`size-4 text-accent-fg`,"aria-hidden":!0}),(0,$.jsx)(`h2`,{className:`text-sm font-semibold text-fg`,children:n||s.title})]}),(0,$.jsx)(`p`,{className:`mt-1 text-sm leading-6 text-fg-muted`,children:r||s.subtitle})]}),Qn]}):null,we||xt.error||St.error||wt.error||Tt.error?(0,$.jsx)(`div`,{role:`alert`,className:`rounded-lg border border-red-500/30 bg-red-500/10 px-3 py-2 text-sm text-red-700 dark:text-red-300`,children:we||s.feedback.actionFailed}):null,S?Nt?(0,$.jsx)(rn,{}):(0,$.jsx)(mn,{runs:hn,ownership:z,labels:s,language:i,unreadCount:z===`user`?un.length:0,loading:Pt||pt,onOwnershipChange:ae,onRefresh:zn,onSelectRun:Vn}):(0,$.jsxs)($.Fragment,{children:[!Nt&&jn&&z===`user`?(0,$.jsxs)(`div`,{className:`flex items-center rounded-lg border border-red-500/20 bg-red-500/5`,children:[(0,$.jsxs)(`button`,{type:`button`,onClick:()=>re(`attention`),className:`flex min-w-0 flex-1 items-center gap-3 rounded-l-lg px-4 py-3 text-left focus-visible:ring-2 focus-visible:ring-accent`,children:[(0,$.jsx)(j,{className:`size-4 shrink-0 text-red-700 dark:text-red-300`,"aria-hidden":!0}),(0,$.jsxs)(`span`,{className:`min-w-0 text-sm text-fg`,children:[(0,$.jsxs)(`span`,{className:`font-medium`,children:[s.experience.executionIssues,` · `,An.length]}),(0,$.jsx)(`span`,{className:`ml-2 text-fg-muted`,children:s.experience.issuesDescription})]})]}),(0,$.jsx)(`button`,{type:`button`,onClick:Mn,className:`mr-2 rounded-md p-2 text-fg-muted hover:bg-red-500/10 hover:text-fg focus-visible:ring-2 focus-visible:ring-accent`,"aria-label":s.close,title:s.close,children:(0,$.jsx)(ce,{className:`size-4`,"aria-hidden":!0})})]}):null,Nt?(0,$.jsx)(rn,{}):(0,$.jsxs)(gt,{language:i,busy:Pt,children:[(0,$.jsxs)(`aside`,{className:W(`max-h-[28vh] min-h-0 min-w-0 flex-col overflow-hidden rounded-xl bg-surface-base md:flex md:h-full md:max-h-none`,w?`hidden`:`flex`),children:[(0,$.jsxs)(`div`,{className:`shrink-0 p-3`,children:[(0,$.jsx)(Ct,{language:i,labels:s,filter:R,ownership:z,source:te,projectId:N,projects:Sn,projectLocked:P,query:ne,unreadCount:z===`user`?dn:0,markReadBusy:ht===`runs:read-all`,onFilter:re,onOwnership:ae,onSource:B,onProject:Pn,onQuery:oe,onClear:()=>{se(),ae(`user`),P||Pn(``)},onMarkAllRead:()=>void Kn()}),(0,$.jsxs)(`button`,{type:`button`,onClick:()=>ge(!0),className:`mt-2 flex w-full items-center gap-2 rounded-lg px-2 py-2 text-sm text-fg hover:bg-surface-hover focus-visible:ring-2 focus-visible:ring-accent`,children:[(0,$.jsx)(ie,{className:`size-4`,"aria-hidden":!0}),i===`zh`?`新建任务`:`New task`]})]}),T&&!_n.some(e=>e.id===T)?(0,$.jsxs)(`p`,{role:`status`,className:`px-3 pb-2 text-xs text-fg-muted`,children:[i===`zh`?`当前自动化不在筛选结果中。`:`The selected automation is outside these filters.`,(0,$.jsx)(`button`,{type:`button`,className:`ml-1 text-accent-fg underline`,onClick:se,children:i===`zh`?`清除筛选`:`Clear filters`})]}):null,(0,$.jsx)(dt,{automations:_n,runs:hn,labels:s,cronLabels:l,language:i,selectedAutomationId:E?null:Ne,selectedRunId:w?C:void 0,selectedRun:w?Qt:null,projectId:N||void 0,executionSummaries:(z===`system`&&N?wt.data:xt.data)?.executionSummaries,onSelectRun:Un,onOpenDetails:Hn,busy:ht!==null,onEdit:Ln,onAction:Gn})]}),w&&T?(0,$.jsx)(ot,{automationId:T,runId:C,projectId:N||void 0,language:i,onBack:()=>Hn(T),onDetails:()=>Ae(!0),onConfigure:e=>{X.openConfiguration({automationId:e.automationId,runId:e.id}).then(({conversationId:t})=>{Ae(!1),x(n=>{let r=new URLSearchParams(n);return r.set(`automation`,e.automationId),r.set(`setupChat`,t),r.delete(`run`),r.delete(`view`),r})}).catch(e=>Te(e instanceof Error?e.message:String(e)))}},`${T}:${C}`):!E&&tn&&!tn.management&&tn.action.kind!==`system`?(0,$.jsx)(vt,{automation:tn,conversationId:D,runs:on,language:i,onSelectRun:Vn},tn.id):D?(0,$.jsx)(vt,{conversationId:D,runs:[],language:i,onSelectRun:Vn,onConfigured:Hn},D):!E&&tn?(0,$.jsx)(yn,{automation:tn,runs:on,runsLoading:Et.isLoading,runsError:Et.error?s.feedback.actionFailed:void 0,labels:s,cronLabels:l,language:i,projects:Sn,busyAction:ht,onEdit:Ln,onSelectRun:Vn,onAction:Gn},tn.id):(0,$.jsx)(`div`,{className:`min-h-0 overflow-y-auto`,children:(0,$.jsx)(Dt,{language:i,projectId:N,onOpenConversation:e=>{let t=new URL(e,window.location.origin),n=t.searchParams.get(`setupChat`);x(e=>{let r=new URLSearchParams(e);r.set(`new`,`1`),r.delete(`automation`),r.set(`setupChat`,n);let i=t.searchParams.get(`chatDraft`);return i?r.set(`chatDraft`,i):r.delete(`chatDraft`),r})}},N)})]})]})]}),me?(0,$.jsx)(We,{language:i,projectId:N,onClose:()=>ge(!1),onCreated:e=>{ae(`user`),se(),Hn(e.id)}}):null,_e?(0,$.jsx)(We,{automation:_e,language:i,onClose:()=>ve(null)}):null,(0,$.jsx)(v,{open:G,onOpenChange:e=>{q(e),e||(be(null),Se(!1))},children:(0,$.jsxs)(h,{children:[(0,$.jsx)(p,{className:`xopc-dialog-overlay fixed inset-0 z-65 bg-scrim backdrop-blur-[1px]`}),(0,$.jsxs)(g,{className:`xopc-dialog-content fixed left-1/2 top-1/2 z-66 flex h-[min(760px,calc(100vh-2rem))] w-[min(100%-2rem,64rem)] -translate-x-1/2 -translate-y-1/2 flex-col overflow-hidden rounded-2xl border border-edge bg-surface-overlay shadow-popover outline-none`,children:[(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-3 border-b border-edge px-5 py-4`,children:[(0,$.jsxs)(`div`,{className:`min-w-0`,children:[(0,$.jsx)(_,{className:`text-base font-semibold text-fg`,children:J===`draft`?s.draft.title:an?s.editTitle:xe?s.draft.editTitle:s.createTitle}),(0,$.jsx)(`p`,{className:`mt-1 text-xs text-fg-muted`,children:J===`draft`?s.draft.subtitle:s.form.createFlowHint})]}),(0,$.jsx)(m,{asChild:!0,children:(0,$.jsx)(fe,{variant:`ghost`,"aria-label":s.close,children:(0,$.jsx)(ce,{className:`size-4`})})})]}),we?(0,$.jsx)(`p`,{role:`alert`,className:`px-5 py-2 text-sm text-red-700 dark:text-red-300`,children:we}):null,J===`draft`?(0,$.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto p-5`,children:(0,$.jsx)(ln,{labels:s,prompt:Re,draft:Ue,loading:qe,approved:Ye,publishBusy:ht===`draft:publish`,testBusy:ht===`draft:test`,templates:kn,projects:Sn,projectId:Ze,conversationMode:$e,notificationPolicy:rt,onPromptChange:Ve,onGenerate:qn,onEdit:Rn,onPublish:Jn,onTest:Yn,onProjectChange:Qe,onConversationModeChange:tt,onNotificationPolicyChange:it,projectLocked:P,onApprovedChange:Xe,onDiscard:()=>{Ge(null),Xe(!1)},onTemplateSelect:e=>{In(e),Ce({...e.form,projectId:Ze})},onOpenAdvanced:()=>{Ce({...Fe,projectId:Ze,conversationMode:$e,notificationPolicy:rt}),le(`blank`)}})}):(0,$.jsxs)($.Fragment,{children:[Cn?(0,$.jsx)(cn,{form:Z,setForm:Ce,labels:s}):J===`quick`&&V?(0,$.jsx)(Vt,{form:Z,setForm:Ce,labels:s,projects:Sn,projectLocked:P,source:V.source,requiresProject:V.requiresProject}):(0,$.jsx)(On,{form:Z,labels:s,setForm:Ce,projects:Sn,agentOptions:bn,agentsLoading:At.isLoading,defaultAgentId:At.data?.defaultId??``,taskOptions:xn,tasksLoading:jt.isLoading,language:i,projectLocked:P}),Cn||J===`quick`?(0,$.jsx)(`div`,{className:`max-h-40 shrink-0 overflow-y-auto px-5 pb-4`,children:(0,$.jsx)(Me,{form:Z,onChange:e=>Ce(t=>({...t,...e})),language:i})}):null,(0,$.jsxs)(`div`,{className:`flex flex-wrap justify-end gap-2 border-t border-edge px-5 py-4`,children:[J===`quick`?(0,$.jsx)(fe,{variant:`ghost`,onClick:()=>le(`blank`),children:s.draft.advancedCreate}):null,xe?(0,$.jsx)(fe,{variant:`ghost`,onClick:()=>{Se(!1),le(`draft`)},children:s.cancel}):(0,$.jsx)(m,{asChild:!0,children:(0,$.jsx)(fe,{variant:`ghost`,children:s.cancel})}),(0,$.jsx)(fe,{variant:`primary`,onClick:Wn,disabled:!Dn||!!ht||J===`quick`&&!!V?.requiresProject&&!Z.projectId,children:ht===`automation:create`||ht===`draft:edit`||an&&ht===`automation:${an.id}:edit`?s.feedback.working:an||xe?s.save:s.experience.createEnabled})]})]})]})]})}),(0,$.jsx)(v,{open:Oe&&!!Qt,onOpenChange:e=>{Ae(e),!(e||w)&&x(e=>{let t=new URLSearchParams(e);return t.delete(`run`),t},{replace:!0})},children:(0,$.jsxs)(h,{children:[(0,$.jsx)(p,{className:`xopc-dialog-overlay fixed inset-0 z-65 bg-scrim backdrop-blur-[1px]`}),(0,$.jsxs)(g,{className:`xopc-dialog-content fixed left-1/2 top-1/2 z-66 flex h-[min(85vh,40rem)] w-[min(100%-2rem,32rem)] -translate-x-1/2 -translate-y-1/2 flex-col overflow-hidden rounded-2xl border border-edge bg-surface-overlay shadow-popover outline-none`,children:[(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-3 border-b border-edge px-4 py-3`,children:[(0,$.jsx)(_,{className:`truncate text-base font-semibold text-fg`,children:Qt?.automationName??s.dashboard.result}),(0,$.jsx)(m,{asChild:!0,children:(0,$.jsx)(fe,{variant:`ghost`,"aria-label":s.close,children:(0,$.jsx)(ce,{className:`size-4`})})})]}),(0,$.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto`,children:(0,$.jsx)(vn,{className:`rounded-none border-0`,run:Qt,events:sn,labels:s,cronLabels:l,language:i,loading:Ot.isLoading,repairDraft:at,repairLoading:ct,repairApproved:ut,busyAction:ht,onRepairApprovedChange:ft,onSuggestRepair:Xn,onApplyRepair:Zn})})]})]})})]})}function cn(e){let t=(0,it.c)(48),{form:n,setForm:r,labels:i}=e,a;t[0]===r?a=t[1]:(a=e=>r(t=>({...t,...e})),t[0]=r,t[1]=a);let o=a,s;t[2]===i.form.trigger?s=t[3]:(s=(0,$.jsx)(jn,{title:i.form.trigger}),t[2]=i.form.trigger,t[3]=s);let c;t[4]===o?c=t[5]:(c=e=>o({triggerMode:e.target.value}),t[4]=o,t[5]=c);let l;t[6]===i.trigger.daily?l=t[7]:(l=(0,$.jsx)(A,{value:`daily`,children:i.trigger.daily}),t[6]=i.trigger.daily,t[7]=l);let u;t[8]===i.trigger.weekly?u=t[9]:(u=(0,$.jsx)(A,{value:`weekly`,children:i.trigger.weekly}),t[8]=i.trigger.weekly,t[9]=u);let d;t[10]===i.trigger.interval?d=t[11]:(d=(0,$.jsx)(A,{value:`interval`,children:i.trigger.interval}),t[10]=i.trigger.interval,t[11]=d);let f;t[12]===i.trigger.customCron?f=t[13]:(f=(0,$.jsx)(A,{value:`cron`,children:i.trigger.customCron}),t[12]=i.trigger.customCron,t[13]=f);let p;t[14]!==n.triggerMode||t[15]!==i.form.trigger||t[16]!==c||t[17]!==l||t[18]!==u||t[19]!==d||t[20]!==f?(p=(0,$.jsxs)(k,{"aria-label":i.form.trigger,className:An,value:n.triggerMode,onChange:c,children:[l,u,d,f]}),t[14]=n.triggerMode,t[15]=i.form.trigger,t[16]=c,t[17]=l,t[18]=u,t[19]=d,t[20]=f,t[21]=p):p=t[21];let m;t[22]!==n.time||t[23]!==n.triggerMode||t[24]!==n.weekday||t[25]!==i.form.day||t[26]!==i.form.time||t[27]!==i.weekdays||t[28]!==o?(m=n.triggerMode===`daily`||n.triggerMode===`weekly`?(0,$.jsxs)(`div`,{className:`mt-4 grid gap-3 sm:grid-cols-2`,children:[(0,$.jsx)(Je,{label:i.form.time,children:(0,$.jsx)(Ze,{value:n.time,onChange:e=>o({time:e}),ariaLabel:i.form.time})}),n.triggerMode===`weekly`?(0,$.jsx)(Je,{label:i.form.day,children:(0,$.jsxs)(k,{className:An,value:n.weekday,onChange:e=>o({weekday:e.target.value}),children:[(0,$.jsx)(A,{value:`1`,children:i.weekdays.monday}),(0,$.jsx)(A,{value:`2`,children:i.weekdays.tuesday}),(0,$.jsx)(A,{value:`3`,children:i.weekdays.wednesday}),(0,$.jsx)(A,{value:`4`,children:i.weekdays.thursday}),(0,$.jsx)(A,{value:`5`,children:i.weekdays.friday}),(0,$.jsx)(A,{value:`6`,children:i.weekdays.saturday}),(0,$.jsx)(A,{value:`0`,children:i.weekdays.sunday})]})}):null]}):null,t[22]=n.time,t[23]=n.triggerMode,t[24]=n.weekday,t[25]=i.form.day,t[26]=i.form.time,t[27]=i.weekdays,t[28]=o,t[29]=m):m=t[29];let h;t[30]!==n.intervalUnit||t[31]!==n.intervalValue||t[32]!==n.triggerMode||t[33]!==i.form.intervalEvery||t[34]!==i.form.intervalUnits||t[35]!==o?(h=n.triggerMode===`interval`?(0,$.jsxs)(`div`,{className:`mt-4 grid gap-3 sm:grid-cols-[minmax(0,1fr)_10rem]`,children:[(0,$.jsx)(Je,{label:i.form.intervalEvery,children:(0,$.jsx)(`input`,{className:An,type:`number`,min:`1`,value:n.intervalValue,onChange:e=>o({intervalValue:e.target.value})})}),(0,$.jsx)(Je,{label:i.form.intervalUnits.minute,children:(0,$.jsxs)(k,{className:An,value:n.intervalUnit,onChange:e=>o({intervalUnit:e.target.value}),children:[(0,$.jsx)(A,{value:`minute`,children:i.form.intervalUnits.minute}),(0,$.jsx)(A,{value:`hour`,children:i.form.intervalUnits.hour}),(0,$.jsx)(A,{value:`day`,children:i.form.intervalUnits.day}),(0,$.jsx)(A,{value:`week`,children:i.form.intervalUnits.week})]})})]}):null,t[30]=n.intervalUnit,t[31]=n.intervalValue,t[32]=n.triggerMode,t[33]=i.form.intervalEvery,t[34]=i.form.intervalUnits,t[35]=o,t[36]=h):h=t[36];let g;t[37]!==n.cronExpr||t[38]!==n.triggerMode||t[39]!==i.form.expression||t[40]!==o?(g=n.triggerMode===`cron`?(0,$.jsx)(`div`,{className:`mt-4`,children:(0,$.jsx)(Je,{label:i.form.expression,children:(0,$.jsx)(`input`,{className:An,value:n.cronExpr,onChange:e=>o({cronExpr:e.target.value})})})}):null,t[37]=n.cronExpr,t[38]=n.triggerMode,t[39]=i.form.expression,t[40]=o,t[41]=g):g=t[41];let _;return t[42]!==h||t[43]!==g||t[44]!==s||t[45]!==p||t[46]!==m?(_=(0,$.jsxs)(`div`,{className:`min-h-0 flex-1 overflow-y-auto p-5`,children:[s,p,m,h,g]}),t[42]=h,t[43]=g,t[44]=s,t[45]=p,t[46]=m,t[47]=_):_=t[47],_}function ln(e){let t=(0,it.c)(110),{labels:n,prompt:r,draft:i,loading:a,approved:o,publishBusy:s,testBusy:c,templates:l,projects:u,projectId:d,conversationMode:f,notificationPolicy:p,onPromptChange:m,onGenerate:h,onEdit:g,onPublish:_,onTest:v,onProjectChange:y,onConversationModeChange:b,onNotificationPolicyChange:x,onApprovedChange:S,onDiscard:C,onTemplateSelect:w,onOpenAdvanced:T,projectLocked:E}=e,D=s!==void 0&&s,O=c!==void 0&&c,j=E!==void 0&&E,M=!!(i&&i.simulation.requiredConfirmations.length>0),N;t[0]!==i||t[1]!==n.draft.advancedCreate||t[2]!==n.draft.suggestions||t[3]!==n.draft.suggestionsDescription||t[4]!==n.experience||t[5]!==T||t[6]!==w||t[7]!==l?(N=i?null:(0,$.jsxs)(`div`,{className:`mb-5 border-b border-edge-subtle pb-4`,children:[(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{className:`text-sm font-semibold text-fg`,children:n.draft.suggestions}),(0,$.jsx)(`div`,{className:`mt-1 text-xs text-fg-muted`,children:n.draft.suggestionsDescription})]}),(0,$.jsx)(fe,{variant:`ghost`,onClick:T,children:n.draft.advancedCreate})]}),(0,$.jsx)(`div`,{className:`mt-3 grid gap-2 sm:grid-cols-2`,children:l.map(e=>(0,$.jsxs)(`button`,{type:`button`,className:`focus-visible:ring-2 focus-visible:ring-accent rounded-lg border border-edge-subtle bg-surface-panel p-3 text-left hover:bg-surface-hover`,onClick:()=>w(e),children:[(0,$.jsx)(`div`,{className:`text-sm font-medium text-fg`,children:e.name}),(0,$.jsx)(`div`,{className:`mt-1 line-clamp-2 text-xs text-fg-muted`,children:e.description}),(0,$.jsxs)(`div`,{className:`mt-2 text-xs text-fg-muted`,children:[n.experience.source,`: `,e.source]})]},e.name))})]}),t[0]=i,t[1]=n.draft.advancedCreate,t[2]=n.draft.suggestions,t[3]=n.draft.suggestionsDescription,t[4]=n.experience,t[5]=T,t[6]=w,t[7]=l,t[8]=N):N=t[8];let P;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(P=(0,$.jsx)(se,{className:`size-4 text-accent`}),t[9]=P):P=t[9];let F;t[10]===n.draft.title?F=t[11]:(F=(0,$.jsxs)(`div`,{className:`flex items-center gap-2 text-sm font-semibold text-fg`,children:[P,n.draft.title]}),t[10]=n.draft.title,t[11]=F);let I;t[12]===n.draft.subtitle?I=t[13]:(I=(0,$.jsx)(`div`,{className:`mt-1 text-sm text-fg-muted`,children:n.draft.subtitle}),t[12]=n.draft.subtitle,t[13]=I);let L;t[14]!==F||t[15]!==I?(L=(0,$.jsxs)(`div`,{className:`min-w-0`,children:[F,I]}),t[14]=F,t[15]=I,t[16]=L):L=t[16];let R;t[17]!==a||t[18]!==r?(R=a||!r.trim(),t[17]=a,t[18]=r,t[19]=R):R=t[19];let z;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(z=(0,$.jsx)(se,{className:`size-4`}),t[20]=z):z=t[20];let ee=a?n.draft.generating:n.draft.generate,te;t[21]!==h||t[22]!==ee||t[23]!==R?(te=(0,$.jsxs)(fe,{variant:`primary`,onClick:h,disabled:R,children:[z,ee]}),t[21]=h,t[22]=ee,t[23]=R,t[24]=te):te=t[24];let ie;t[25]!==te||t[26]!==L?(ie=(0,$.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3`,children:[L,te]}),t[25]=te,t[26]=L,t[27]=ie):ie=t[27];let ae;t[28]===m?ae=t[29]:(ae=e=>m(e.target.value),t[28]=m,t[29]=ae);let oe;t[30]!==n.draft.placeholder||t[31]!==n.draft.title||t[32]!==r||t[33]!==ae?(oe=(0,$.jsx)(`textarea`,{"aria-label":n.draft.title,className:`mt-4 min-h-20 w-full resize-y rounded-lg border border-edge bg-surface-base px-3 py-2 text-sm text-fg outline-none focus:border-accent`,value:r,onChange:ae,placeholder:n.draft.placeholder}),t[30]=n.draft.placeholder,t[31]=n.draft.title,t[32]=r,t[33]=ae,t[34]=oe):oe=t[34];let B=j?`sm:grid-cols-2`:`sm:grid-cols-3`,V;t[35]===B?V=t[36]:(V=W(`mt-3 grid gap-3`,B),t[35]=B,t[36]=V);let H;t[37]!==n.draft.noProject||t[38]!==n.draft.project||t[39]!==y||t[40]!==d||t[41]!==j||t[42]!==u?(H=j?null:(0,$.jsx)(Je,{label:n.draft.project,children:(0,$.jsxs)(k,{className:An,value:d,onChange:e=>y(e.target.value),children:[(0,$.jsx)(A,{value:``,children:n.draft.noProject}),u.map(un)]})}),t[37]=n.draft.noProject,t[38]=n.draft.project,t[39]=y,t[40]=d,t[41]=j,t[42]=u,t[43]=H):H=t[43];let ce;t[44]===b?ce=t[45]:(ce=e=>b(e.target.value),t[44]=b,t[45]=ce);let U;t[46]===n.draft.newConversation?U=t[47]:(U=(0,$.jsx)(A,{value:`new_session`,children:n.draft.newConversation}),t[46]=n.draft.newConversation,t[47]=U);let G;t[48]===n.draft.continuousConversation?G=t[49]:(G=(0,$.jsx)(A,{value:`continuous`,children:n.draft.continuousConversation}),t[48]=n.draft.continuousConversation,t[49]=G);let K;t[50]!==f||t[51]!==ce||t[52]!==U||t[53]!==G?(K=(0,$.jsxs)(k,{className:An,value:f,onChange:ce,children:[U,G]}),t[50]=f,t[51]=ce,t[52]=U,t[53]=G,t[54]=K):K=t[54];let q;t[55]!==n.draft.conversation||t[56]!==K?(q=(0,$.jsx)(Je,{label:n.draft.conversation,children:K}),t[55]=n.draft.conversation,t[56]=K,t[57]=q):q=t[57];let J;t[58]===x?J=t[59]:(J=e=>x(e.target.value),t[58]=x,t[59]=J);let le;t[60]===n.draft.notifyAttention?le=t[61]:(le=(0,$.jsx)(A,{value:`attention`,children:n.draft.notifyAttention}),t[60]=n.draft.notifyAttention,t[61]=le);let Y;t[62]===n.draft.notifyAll?Y=t[63]:(Y=(0,$.jsx)(A,{value:`all`,children:n.draft.notifyAll}),t[62]=n.draft.notifyAll,t[63]=Y);let ue;t[64]===n.draft.notifyNone?ue=t[65]:(ue=(0,$.jsx)(A,{value:`none`,children:n.draft.notifyNone}),t[64]=n.draft.notifyNone,t[65]=ue);let de;t[66]!==p||t[67]!==J||t[68]!==le||t[69]!==Y||t[70]!==ue?(de=(0,$.jsxs)(k,{className:An,value:p,onChange:J,children:[le,Y,ue]}),t[66]=p,t[67]=J,t[68]=le,t[69]=Y,t[70]=ue,t[71]=de):de=t[71];let pe;t[72]!==n.draft.notifications||t[73]!==de?(pe=(0,$.jsx)(Je,{label:n.draft.notifications,children:de}),t[72]=n.draft.notifications,t[73]=de,t[74]=pe):pe=t[74];let X;t[75]!==V||t[76]!==H||t[77]!==q||t[78]!==pe?(X=(0,$.jsxs)(`div`,{className:V,children:[H,q,pe]}),t[75]=V,t[76]=H,t[77]=q,t[78]=pe,t[79]=X):X=t[79];let me;t[80]!==o||t[81]!==i||t[82]!==n.draft.approval||t[83]!==n.draft.assumptions||t[84]!==n.draft.discard||t[85]!==n.draft.edit||t[86]!==n.draft.publish||t[87]!==n.draft.review||t[88]!==n.draft.risks||t[89]!==n.draft.safety||t[90]!==n.draft.testOnce||t[91]!==n.draft.testing||t[92]!==n.feedback||t[93]!==n.info||t[94]!==n.none||t[95]!==S||t[96]!==C||t[97]!==g||t[98]!==_||t[99]!==v||t[100]!==D||t[101]!==M||t[102]!==O?(me=i?(0,$.jsxs)(`div`,{className:`mt-4 grid gap-3 rounded-lg bg-surface-base p-4 lg:grid-cols-[1fr_1fr]`,children:[(0,$.jsxs)(`div`,{className:`min-w-0`,children:[(0,$.jsx)(`div`,{className:`text-sm font-semibold text-fg`,children:i.automation.name}),i.automation.description?(0,$.jsx)(`div`,{className:`mt-1 text-sm text-fg-muted`,children:i.automation.description}):null,(0,$.jsxs)(`div`,{className:`mt-3 grid gap-2 text-sm`,children:[(0,$.jsx)(En,{label:n.info.when,value:i.simulation.triggerSummary}),(0,$.jsx)(En,{label:n.info.run,value:i.simulation.actionSummary})]})]}),(0,$.jsxs)(`div`,{className:`min-w-0`,children:[(0,$.jsx)(`div`,{className:`text-xs font-semibold uppercase text-fg-muted`,children:n.draft.review}),(0,$.jsx)(dn,{title:n.draft.safety,items:[...i.simulation.safetyNotes,...i.simulation.requiredConfirmations],empty:n.none}),(0,$.jsx)(dn,{title:n.draft.assumptions,items:i.assumptions,empty:n.none}),(0,$.jsx)(dn,{title:n.draft.risks,items:i.risks,empty:n.none}),M?(0,$.jsxs)(`label`,{className:`mt-4 flex items-start gap-2 text-sm text-fg`,children:[(0,$.jsx)(`input`,{className:`mt-1`,type:`checkbox`,checked:o,onChange:e=>S(e.target.checked)}),(0,$.jsx)(`span`,{children:n.draft.approval})]}):null,(0,$.jsxs)(`div`,{className:`mt-4 flex justify-end gap-2`,children:[(0,$.jsx)(fe,{variant:`ghost`,onClick:C,children:n.draft.discard}),(0,$.jsxs)(fe,{variant:`secondary`,onClick:g,children:[(0,$.jsx)(ne,{className:`size-4`}),n.draft.edit]}),(0,$.jsxs)(fe,{variant:`secondary`,onClick:v,disabled:O||D||M&&!o,children:[(0,$.jsx)(re,{className:`size-4`}),O?n.draft.testing:n.draft.testOnce]}),(0,$.jsx)(fe,{variant:`primary`,onClick:_,disabled:D||M&&!o,children:D?n.feedback.working:n.draft.publish})]})]})]}):null,t[80]=o,t[81]=i,t[82]=n.draft.approval,t[83]=n.draft.assumptions,t[84]=n.draft.discard,t[85]=n.draft.edit,t[86]=n.draft.publish,t[87]=n.draft.review,t[88]=n.draft.risks,t[89]=n.draft.safety,t[90]=n.draft.testOnce,t[91]=n.draft.testing,t[92]=n.feedback,t[93]=n.info,t[94]=n.none,t[95]=S,t[96]=C,t[97]=g,t[98]=_,t[99]=v,t[100]=D,t[101]=M,t[102]=O,t[103]=me):me=t[103];let he;return t[104]!==ie||t[105]!==oe||t[106]!==X||t[107]!==me||t[108]!==N?(he=(0,$.jsxs)(`section`,{className:`rounded-lg border border-edge-subtle bg-surface-base p-4 shadow-surface`,children:[N,ie,oe,X,me]}),t[104]=ie,t[105]=oe,t[106]=X,t[107]=me,t[108]=N,t[109]=he):he=t[109],he}function un(e){return(0,$.jsx)(A,{value:e.id,children:e.name},e.id)}function dn(e){let t=(0,it.c)(10),{title:n,items:r,empty:i}=e,a;t[0]===n?a=t[1]:(a=(0,$.jsx)(`div`,{className:`text-xs font-medium text-fg-muted`,children:n}),t[0]=n,t[1]=a);let o;t[2]!==i||t[3]!==r?(o=r.length>0?r.map(fn):(0,$.jsx)(`li`,{className:`text-fg-muted`,children:i}),t[2]=i,t[3]=r,t[4]=o):o=t[4];let s;t[5]===o?s=t[6]:(s=(0,$.jsx)(`ul`,{className:`mt-1 space-y-1 text-sm text-fg`,children:o}),t[5]=o,t[6]=s);let c;return t[7]!==a||t[8]!==s?(c=(0,$.jsxs)(`div`,{className:`mt-3`,children:[a,s]}),t[7]=a,t[8]=s,t[9]=c):c=t[9],c}function fn(e){return(0,$.jsxs)(`li`,{children:[`- `,e]},e)}function pn(e){let t=(0,it.c)(25),{icon:n,label:r,value:i,tone:a,active:o,onClick:s}=e,c=a===void 0?`default`:a,l=c===`danger`?`text-red-600 dark:text-red-300`:`text-fg-subtle`,u;t[0]===l?u=t[1]:(u=W(`shrink-0`,l),t[0]=l,t[1]=u);let d;t[2]!==n||t[3]!==u?(d=(0,$.jsx)(`span`,{className:u,children:n}),t[2]=n,t[3]=u,t[4]=d):d=t[4];let f;t[5]===r?f=t[6]:(f=(0,$.jsx)(`span`,{className:`truncate text-xs font-medium text-fg-muted`,children:r}),t[5]=r,t[6]=f);let p=c===`danger`?`text-red-700 dark:text-red-300`:`text-fg`,m;t[7]===p?m=t[8]:(m=W(`ml-auto truncate text-sm font-semibold tabular-nums`,p),t[7]=p,t[8]=m);let h;t[9]!==m||t[10]!==i?(h=(0,$.jsx)(`span`,{className:m,children:i}),t[9]=m,t[10]=i,t[11]=h):h=t[11];let g;t[12]!==d||t[13]!==f||t[14]!==h?(g=(0,$.jsxs)($.Fragment,{children:[d,f,h]}),t[12]=d,t[13]=f,t[14]=h,t[15]=g):g=t[15];let _=g,v=o&&`bg-accent/8`,y=s&&`cursor-pointer hover:bg-surface-hover focus-visible:z-10 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-accent`,b;t[16]!==v||t[17]!==y?(b=W(`flex min-h-12 min-w-0 items-center gap-2.5 bg-surface-base px-3 py-2.5 text-left transition-colors`,v,y),t[16]=v,t[17]=y,t[18]=b):b=t[18];let x=b,S=`${r}: ${i}`,C;return t[19]!==S||t[20]!==o||t[21]!==x||t[22]!==_||t[23]!==s?(C=s?(0,$.jsx)(`button`,{type:`button`,className:x,onClick:s,"aria-label":S,"aria-pressed":o,children:_}):(0,$.jsx)(`div`,{className:x,"aria-label":S,children:_}),t[19]=S,t[20]=o,t[21]=x,t[22]=_,t[23]=s,t[24]=C):C=t[24],C}function mn(e){let t=(0,it.c)(74),{runs:n,ownership:r,labels:i,language:a,unreadCount:o,loading:s,onOwnershipChange:c,onRefresh:l,onSelectRun:u}=e,d;t[0]===n?d=t[1]:(d=n.filter(Zt),t[0]=n,t[1]=d);let f=d.length,p;t[2]===n?p=t[3]:(p=n.filter(Qt),t[2]=n,t[3]=p);let m=p.length,h;t[4]===i.dashboard.activity?h=t[5]:(h=(0,$.jsx)(`h2`,{id:`automation-activity-title`,className:`text-sm font-semibold text-fg`,children:i.dashboard.activity}),t[4]=i.dashboard.activity,t[5]=h);let g;t[6]===i.dashboard.activityDescription?g=t[7]:(g=(0,$.jsx)(`p`,{className:`mt-1 text-sm leading-6 text-fg-muted`,children:i.dashboard.activityDescription}),t[6]=i.dashboard.activityDescription,t[7]=g);let _;t[8]!==h||t[9]!==g?(_=(0,$.jsxs)(`div`,{className:`min-w-0`,children:[h,g]}),t[8]=h,t[9]=g,t[10]=_):_=t[10];let v=i.filters.ownership,b=r===`user`&&`bg-surface-base text-fg shadow-sm`,x;t[11]===b?x=t[12]:(x=W(`rounded-md px-2.5 py-1.5 text-xs font-medium text-fg-muted hover:text-fg`,b),t[11]=b,t[12]=x);let S;t[13]===c?S=t[14]:(S=()=>c(`user`),t[13]=c,t[14]=S);let C=r===`user`,w;t[15]!==i.filters.userManaged||t[16]!==C||t[17]!==x||t[18]!==S?(w=(0,$.jsx)(`button`,{type:`button`,className:x,onClick:S,"aria-pressed":C,children:i.filters.userManaged}),t[15]=i.filters.userManaged,t[16]=C,t[17]=x,t[18]=S,t[19]=w):w=t[19];let T=r===`system`&&`bg-surface-base text-fg shadow-sm`,E;t[20]===T?E=t[21]:(E=W(`rounded-md px-2.5 py-1.5 text-xs font-medium text-fg-muted hover:text-fg`,T),t[20]=T,t[21]=E);let D;t[22]===c?D=t[23]:(D=()=>c(`system`),t[22]=c,t[23]=D);let O=r===`system`,k;t[24]!==i.system.title||t[25]!==E||t[26]!==D||t[27]!==O?(k=(0,$.jsx)(`button`,{type:`button`,className:E,onClick:D,"aria-pressed":O,children:i.system.title}),t[24]=i.system.title,t[25]=E,t[26]=D,t[27]=O,t[28]=k):k=t[28];let A;t[29]!==i.filters.ownership||t[30]!==w||t[31]!==k?(A=(0,$.jsxs)(me,{className:`flex rounded-lg bg-surface-panel p-0.5`,role:`group`,"aria-label":v,indicatorClassName:`rounded-md bg-surface-base shadow-sm`,children:[w,k]}),t[29]=i.filters.ownership,t[30]=w,t[31]=k,t[32]=A):A=t[32];let N;t[33]!==i.refresh||t[34]!==s||t[35]!==l?(N=(0,$.jsx)(he,{className:`size-9 shrink-0 p-0`,loading:s,label:i.refresh,onClick:l}),t[33]=i.refresh,t[34]=s,t[35]=l,t[36]=N):N=t[36];let P;t[37]!==A||t[38]!==N?(P=(0,$.jsxs)(`div`,{className:`flex items-center gap-2`,children:[A,N]}),t[37]=A,t[38]=N,t[39]=P):P=t[39];let F;t[40]!==P||t[41]!==_?(F=(0,$.jsxs)(`div`,{className:`flex flex-wrap items-start justify-between gap-3 border-b border-edge-subtle px-4 py-3 sm:px-5`,children:[_,P]}),t[40]=P,t[41]=_,t[42]=F):F=t[42];let I;t[43]===Symbol.for(`react.memo_cache_sentinel`)?(I=(0,$.jsx)(y,{className:`size-4`,"aria-hidden":!0}),t[43]=I):I=t[43];let L=i.metrics.total,R=String(n.length),z;t[44]!==i.metrics.total||t[45]!==R?(z=(0,$.jsx)(pn,{icon:I,label:L,value:R}),t[44]=i.metrics.total,t[45]=R,t[46]=z):z=t[46];let ee;t[47]===Symbol.for(`react.memo_cache_sentinel`)?(ee=(0,$.jsx)(re,{className:`size-4`,"aria-hidden":!0}),t[47]=ee):ee=t[47];let te=i.metrics.running,ne=String(f),ie;t[48]!==i.metrics.running||t[49]!==ne?(ie=(0,$.jsx)(pn,{icon:ee,label:te,value:ne}),t[48]=i.metrics.running,t[49]=ne,t[50]=ie):ie=t[50];let ae;t[51]===Symbol.for(`react.memo_cache_sentinel`)?(ae=(0,$.jsx)(j,{className:`size-4`,"aria-hidden":!0}),t[51]=ae):ae=t[51];let oe=i.dashboard.needsAttention,B=String(m),se=m>0?`danger`:`default`,V;t[52]!==i.dashboard.needsAttention||t[53]!==B||t[54]!==se?(V=(0,$.jsx)(pn,{icon:ae,label:oe,value:B,tone:se}),t[52]=i.dashboard.needsAttention,t[53]=B,t[54]=se,t[55]=V):V=t[55];let H;t[56]===Symbol.for(`react.memo_cache_sentinel`)?(H=(0,$.jsx)(M,{className:`size-4`,"aria-hidden":!0}),t[56]=H):H=t[56];let ce=i.filters.unread,U=String(o),G;t[57]!==i.filters.unread||t[58]!==U?(G=(0,$.jsx)(pn,{icon:H,label:ce,value:U}),t[57]=i.filters.unread,t[58]=U,t[59]=G):G=t[59];let K;t[60]!==z||t[61]!==ie||t[62]!==V||t[63]!==G?(K=(0,$.jsxs)(`div`,{className:`grid grid-cols-2 gap-px border-b border-edge-subtle bg-edge-subtle lg:grid-cols-4`,children:[z,ie,V,G]}),t[60]=z,t[61]=ie,t[62]=V,t[63]=G,t[64]=K):K=t[64];let q;t[65]!==i||t[66]!==a||t[67]!==u||t[68]!==n?(q=n.length===0?(0,$.jsx)(Dn,{className:`min-h-64 rounded-none border-0 shadow-none`,icon:(0,$.jsx)(y,{className:`size-5`}),title:i.empty.runs}):(0,$.jsx)(`div`,{className:`divide-y divide-edge-subtle`,children:n.map(e=>(0,$.jsxs)(`button`,{type:`button`,className:`flex w-full min-w-0 items-start gap-3 px-4 py-3 text-left hover:bg-surface-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-accent sm:px-5`,onClick:()=>u(e.id),children:[(0,$.jsx)(`span`,{className:W(`mt-1.5 size-2 shrink-0 rounded-full`,Zt(e)?`bg-blue-500`:Qt(e)?`bg-red-500`:`bg-emerald-500`),"aria-hidden":!0}),(0,$.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,$.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[(0,$.jsx)(`span`,{className:`truncate text-sm font-medium text-fg`,children:e.automationName}),e.readAtMs==null&&!Zt(e)?(0,$.jsx)(`span`,{className:`size-2 shrink-0 rounded-full bg-blue-500`,children:(0,$.jsx)(`span`,{className:`sr-only`,children:i.filters.unread})}):null]}),(0,$.jsx)(`span`,{className:W(`mt-1 line-clamp-2 block text-sm text-fg-muted`,e.error&&`text-red-700 dark:text-red-300`),children:e.error||e.summary||i.status[e.status]}),(0,$.jsx)(`span`,{className:`mt-1 block text-xs text-fg-subtle`,children:Gt(e.createdAtMs,i,a)})]}),(0,$.jsx)(`span`,{className:W(`shrink-0 rounded-full px-2 py-0.5 text-xs`,Yt(e.status)),children:i.status[e.status]})]},e.id))}),t[65]=i,t[66]=a,t[67]=u,t[68]=n,t[69]=q):q=t[69];let J;return t[70]!==F||t[71]!==K||t[72]!==q?(J=(0,$.jsxs)(`section`,{className:`overflow-hidden rounded-xl border border-edge-subtle bg-surface-base shadow-surface`,"aria-labelledby":`automation-activity-title`,children:[F,K,q]}),t[70]=F,t[71]=K,t[72]=q,t[73]=J):J=t[73],J}function hn(e,t){let n=t.events,r=e.data&&typeof e.data==`object`?e.data:{},i=typeof r.actionKind==`string`?r.actionKind:null,a=typeof r.status==`string`&&r.status in t.status?t.status[r.status]:null;switch(e.type){case`run.queued`:return e.message.toLowerCase().includes(`manual`)?n.manualQueued:e.message.toLowerCase().includes(`scheduled`)?n.scheduledQueued:n.eventQueued;case`run.started`:return n.runStarted;case`action.started`:return i?n.actionStarted.replace(`{kind}`,i):n.actionStartedFallback;case`action.completed`:return i?n.actionCompleted.replace(`{kind}`,i):n.actionCompletedFallback;case`action.failed`:return i?n.actionFailed.replace(`{kind}`,i):n.actionFailedFallback;case`run.completed`:return a?n.runCompleted.replace(`{status}`,a):n.runCompletedFallback;default:return e.message}}function gn(e){let t=(0,it.c)(17),{value:n,labels:r,title:i,defaultExpanded:a}=e,[o,s]=(0,Q.useState)(a!==void 0&&a),c;t[0]===n?c=t[1]:(c=JSON.stringify(n,null,2),t[0]=n,t[1]=c);let l=c,u;t[2]===l?u=t[3]:(u=l.split(`
|
|
5
|
-
`),t[2]=l,t[3]=u);let d=u.length,f=l.length>720||d>18,p;t[4]!==f||t[5]!==l?(p=f?`${l.split(`
|
|
6
|
-
`).slice(0,10).join(`
|
|
7
|
-
`).trimEnd()}...`:l,t[4]=f,t[5]=l,t[6]=p):p=t[6];let m=p,h;t[7]!==o||t[8]!==f||t[9]!==r||t[10]!==i?(h=f?(0,$.jsxs)(`button`,{type:`button`,className:`flex w-full items-center justify-between gap-3 px-2.5 py-2 text-left text-xs font-medium text-fg-muted hover:bg-surface-hover hover:text-fg`,onClick:()=>s(_n),"aria-expanded":o,children:[(0,$.jsx)(`span`,{children:i}),(0,$.jsxs)(`span`,{className:`inline-flex items-center gap-1 text-accent-fg`,children:[o?r.details.hideDetails:r.details.showDetails,(0,$.jsx)(D,{className:W(`size-3.5 transition-transform`,o&&`rotate-180`),"aria-hidden":!0})]})]}):(0,$.jsx)(`div`,{className:`px-2.5 py-2 text-xs font-medium text-fg-muted`,children:i}),t[7]=o,t[8]=f,t[9]=r,t[10]=i,t[11]=h):h=t[11];let g=o||!f?l:m,_;t[12]===g?_=t[13]:(_=(0,$.jsx)(`pre`,{className:`whitespace-pre-wrap break-all px-2.5 pb-2 text-xs leading-relaxed text-fg-muted`,children:g}),t[12]=g,t[13]=_);let v;return t[14]!==h||t[15]!==_?(v=(0,$.jsxs)(`div`,{className:`mt-2 rounded-md border border-edge/70 bg-surface-inset/35`,children:[h,_]}),t[14]=h,t[15]=_,t[16]=v):v=t[16],v}function _n(e){return!e}function vn(e){let t=(0,it.c)(152),{className:n,run:r,events:i,labels:a,cronLabels:s,language:c,loading:l,repairDraft:u,repairLoading:d,repairApproved:f,busyAction:p,onRepairApprovedChange:m,onSuggestRepair:h,onApplyRepair:g}=e;if(!r){let e;t[0]===n?e=t[1]:(e=W(`flex min-h-64 flex-col justify-center rounded-lg border border-edge-subtle bg-surface-base px-4 text-center text-sm text-fg-muted shadow-surface`,n),t[0]=n,t[1]=e);let r;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,$.jsx)(y,{className:`mx-auto size-5`}),t[2]=r):r=t[2];let i;t[3]===a.selectRun?i=t[4]:(i=(0,$.jsx)(`div`,{className:`mt-2`,children:a.selectRun}),t[3]=a.selectRun,t[4]=i);let o;return t[5]!==e||t[6]!==i?(o=(0,$.jsxs)(`aside`,{className:e,children:[r,i]}),t[5]=e,t[6]=i,t[7]=o):o=t[7],o}let _;t[8]!==c||t[9]!==r?(_=r.error?tt(r,c):r.summary,t[8]=c,t[9]=r,t[10]=_):_=t[10];let v=_,b=r.conversationId?`/chat/${encodeURIComponent(r.conversationId)}`:null,x=(r.conversationId,a.runDetail.openConversation),S=r.conversationId?ee:I,C=Zt(r)?y:r.status===`succeeded`?M:j,T;t[11]===n?T=t[12]:(T=W(`rounded-lg border border-edge-subtle bg-surface-base shadow-surface`,n),t[11]=n,t[12]=T);let E;t[13]===r.automationName?E=t[14]:(E=(0,$.jsx)(`div`,{className:`truncate text-sm font-semibold text-fg`,children:r.automationName}),t[13]=r.automationName,t[14]=E);let k;t[15]===r.id?k=t[16]:(k=r.id.slice(0,8),t[15]=r.id,t[16]=k);let A;t[17]===k?A=t[18]:(A=(0,$.jsx)(`div`,{className:`mt-1 text-xs text-fg-muted`,children:k}),t[17]=k,t[18]=A);let N;t[19]!==E||t[20]!==A?(N=(0,$.jsxs)(`div`,{className:`min-w-0`,children:[E,A]}),t[19]=E,t[20]=A,t[21]=N):N=t[21];let P;t[22]===r.status?P=t[23]:(P=W(`shrink-0 rounded-full px-2 py-0.5 text-xs`,Yt(r.status)),t[22]=r.status,t[23]=P);let F=a.status[r.status],L;t[24]!==P||t[25]!==F?(L=(0,$.jsx)(`span`,{className:P,children:F}),t[24]=P,t[25]=F,t[26]=L):L=t[26];let R;t[27]!==N||t[28]!==L?(R=(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[N,L]}),t[27]=N,t[28]=L,t[29]=R):R=t[29];let te;t[30]!==a||t[31]!==c||t[32]!==r.createdAtMs?(te=Gt(r.createdAtMs,a,c),t[30]=a,t[31]=c,t[32]=r.createdAtMs,t[33]=te):te=t[33];let ne;t[34]===te?ne=t[35]:(ne=(0,$.jsx)(`span`,{children:te}),t[34]=te,t[35]=ne);let re;t[36]===Symbol.for(`react.memo_cache_sentinel`)?(re=(0,$.jsx)(`span`,{"aria-hidden":!0,children:`·`}),t[36]=re):re=t[36];let ie=a.details.duration,ae;t[37]!==a||t[38]!==r.durationMs?(ae=Xt(r.durationMs,a),t[37]=a,t[38]=r.durationMs,t[39]=ae):ae=t[39];let oe;t[40]!==a.details.duration||t[41]!==ae?(oe=(0,$.jsxs)(`span`,{children:[ie,` `,ae]}),t[40]=a.details.duration,t[41]=ae,t[42]=oe):oe=t[42];let B;t[43]!==ne||t[44]!==oe?(B=(0,$.jsxs)(`div`,{className:`mt-2 flex flex-wrap items-center gap-x-2 gap-y-1 text-xs text-fg-muted`,children:[ne,re,oe]}),t[43]=ne,t[44]=oe,t[45]=B):B=t[45];let V;t[46]!==a.repair||t[47]!==c||t[48]!==h||t[49]!==d||t[50]!==r?(V=r.status===`failed`||r.status===`timeout`||r.status===`cancelled`?(0,$.jsx)(`div`,{className:`mt-3 flex justify-end`,children:r.actionSnapshot.kind===`system`?(0,$.jsxs)(fe,{variant:`secondary`,onClick:()=>h(r),disabled:d,children:[(0,$.jsx)(se,{className:`size-4`}),d?a.repair.generating:a.repair.suggest]}):(0,$.jsx)(Ve,{automationId:r.automationId,runId:r.id,language:c})}):null,t[46]=a.repair,t[47]=c,t[48]=h,t[49]=d,t[50]=r,t[51]=V):V=t[51];let H;t[52]!==R||t[53]!==B||t[54]!==V?(H=(0,$.jsxs)(`div`,{className:`border-b border-edge px-4 py-3`,children:[R,B,V]}),t[52]=R,t[53]=B,t[54]=V,t[55]=H):H=t[55];let ce;t[56]===r?ce=t[57]:(ce=Zt(r)?`text-blue-500`:Qt(r)?`text-red-500`:r.status===`succeeded`?`text-emerald-500`:`text-fg-muted`,t[56]=r,t[57]=ce);let U;t[58]===ce?U=t[59]:(U=W(`size-4`,ce),t[58]=ce,t[59]=U);let K;t[60]!==C||t[61]!==U?(K=(0,$.jsx)(C,{className:U}),t[60]=C,t[61]=U,t[62]=K):K=t[62];let q;t[63]!==a.runDetail.resultTitle||t[64]!==K?(q=(0,$.jsxs)(`div`,{className:`flex items-center gap-2 text-sm font-semibold text-fg`,children:[K,a.runDetail.resultTitle]}),t[63]=a.runDetail.resultTitle,t[64]=K,t[65]=q):q=t[65];let J;t[66]!==S||t[67]!==x||t[68]!==b?(J=b?(0,$.jsx)(fe,{asChild:!0,variant:`secondary`,className:`h-8 rounded-md px-2.5 text-xs`,children:(0,$.jsxs)(o,{to:b,children:[(0,$.jsx)(S,{className:`size-3.5`}),x,(0,$.jsx)(O,{className:`size-3.5`})]})}):null,t[66]=S,t[67]=x,t[68]=b,t[69]=J):J=t[69];let le;t[70]!==q||t[71]!==J?(le=(0,$.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-2`,children:[q,J]}),t[70]=q,t[71]=J,t[72]=le):le=t[72];let Y=r.error&&`border-red-500/25 bg-red-500/5`,ue;t[73]===Y?ue=t[74]:(ue=W(`mt-3 max-h-80 overflow-y-auto rounded-lg border border-edge/70 bg-surface-inset/25 p-3`,Y),t[73]=Y,t[74]=ue);let de;t[75]!==a.runDetail.noResult||t[76]!==a.runDetail.resultPending||t[77]!==v||t[78]!==r?(de=v?r.error?(0,$.jsx)(`p`,{className:`whitespace-pre-wrap break-words text-sm leading-relaxed text-red-700 dark:text-red-300`,children:v}):(0,$.jsx)(z,{content:v,compact:!0,className:`text-sm`}):(0,$.jsx)(`p`,{className:`text-sm leading-relaxed text-fg-muted`,children:Zt(r)?a.runDetail.resultPending:a.runDetail.noResult}),t[75]=a.runDetail.noResult,t[76]=a.runDetail.resultPending,t[77]=v,t[78]=r,t[79]=de):de=t[79];let pe;t[80]!==ue||t[81]!==de?(pe=(0,$.jsx)(`div`,{className:ue,children:de}),t[80]=ue,t[81]=de,t[82]=pe):pe=t[82];let X;t[83]!==le||t[84]!==pe?(X=(0,$.jsxs)(`section`,{className:`border-b border-edge p-4`,children:[le,pe]}),t[83]=le,t[84]=pe,t[85]=X):X=t[85];let me;t[86]===a.runDetail.runInfo?me=t[87]:(me=(0,$.jsx)(`div`,{className:`text-xs font-semibold uppercase text-fg-muted`,children:a.runDetail.runInfo}),t[86]=a.runDetail.runInfo,t[87]=me);let he;t[88]!==s||t[89]!==a||t[90]!==c||t[91]!==r.manual||t[92]!==r.triggerSnapshot?(he=r.manual?a.trigger.manual:je(r.triggerSnapshot,a,s,c),t[88]=s,t[89]=a,t[90]=c,t[91]=r.manual,t[92]=r.triggerSnapshot,t[93]=he):he=t[93];let ge;t[94]!==a.explain.whyRan||t[95]!==he?(ge=(0,$.jsx)(wn,{label:a.explain.whyRan,value:he}),t[94]=a.explain.whyRan,t[95]=he,t[96]=ge):ge=t[96];let _e=a.details.started,ve;t[97]!==a||t[98]!==c||t[99]!==r.startedAtMs?(ve=Gt(r.startedAtMs,a,c),t[97]=a,t[98]=c,t[99]=r.startedAtMs,t[100]=ve):ve=t[100];let ye;t[101]!==a.details.started||t[102]!==ve?(ye=(0,$.jsx)(wn,{label:_e,value:ve}),t[101]=a.details.started,t[102]=ve,t[103]=ye):ye=t[103];let be;t[104]!==a.details.model||t[105]!==r.model?(be=r.model?(0,$.jsx)(wn,{label:a.details.model,value:r.model}):null,t[104]=a.details.model,t[105]=r.model,t[106]=be):be=t[106];let xe;t[107]!==ge||t[108]!==ye||t[109]!==be?(xe=(0,$.jsxs)(`div`,{className:`mt-3 grid gap-2 text-xs text-fg-muted`,children:[ge,ye,be]}),t[107]=ge,t[108]=ye,t[109]=be,t[110]=xe):xe=t[110];let Se;t[111]!==me||t[112]!==xe?(Se=(0,$.jsxs)(`section`,{className:`border-b border-edge p-4`,children:[me,xe]}),t[111]=me,t[112]=xe,t[113]=Se):Se=t[113];let Z;t[114]!==p||t[115]!==a||t[116]!==g||t[117]!==m||t[118]!==f||t[119]!==u||t[120]!==r?(Z=u?(0,$.jsxs)(`div`,{className:`border-b border-edge px-4 py-3`,children:[(0,$.jsx)(`div`,{className:`text-xs font-semibold uppercase text-fg-muted`,children:a.repair.title}),(0,$.jsx)(`div`,{className:`mt-2 text-sm text-fg`,children:u.explanation}),u.expectedEffect?(0,$.jsx)(`div`,{className:`mt-2 text-sm text-fg-muted`,children:u.expectedEffect}):null,(0,$.jsx)(dn,{title:a.repair.risks,items:u.risks,empty:a.none}),(0,$.jsx)(gn,{value:u.patch,labels:a,title:a.details.repairPatch}),u.requiresApproval?(0,$.jsxs)(`label`,{className:`mt-3 flex items-start gap-2 text-sm text-fg`,children:[(0,$.jsx)(`input`,{className:`mt-1`,type:`checkbox`,checked:f,onChange:e=>m(e.target.checked)}),(0,$.jsx)(`span`,{children:a.repair.approval})]}):null,(0,$.jsx)(`div`,{className:`mt-3 flex justify-end`,children:(0,$.jsx)(fe,{variant:`primary`,onClick:()=>g(r),disabled:p===`run:${r.id}:repair`||u.requiresApproval&&!f,children:p===`run:${r.id}:repair`?a.feedback.working:a.repair.apply})})]}):null,t[114]=p,t[115]=a,t[116]=g,t[117]=m,t[118]=f,t[119]=u,t[120]=r,t[121]=Z):Z=t[121];let Ce;t[122]===Symbol.for(`react.memo_cache_sentinel`)?(Ce=(0,$.jsx)(w,{className:`size-4 shrink-0`}),t[122]=Ce):Ce=t[122];let we;t[123]===a.runDetail.technicalEvents?we=t[124]:(we=(0,$.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2 text-sm font-medium text-fg-muted`,children:[Ce,a.runDetail.technicalEvents]}),t[123]=a.runDetail.technicalEvents,t[124]=we);let Te;t[125]!==i.length||t[126]!==a.runDetail.eventCount?(Te=a.runDetail.eventCount.replace(`{count}`,String(i.length)),t[125]=i.length,t[126]=a.runDetail.eventCount,t[127]=Te):Te=t[127];let Ee;t[128]===Symbol.for(`react.memo_cache_sentinel`)?(Ee=(0,$.jsx)(D,{className:`size-4 transition-transform group-open:rotate-180`}),t[128]=Ee):Ee=t[128];let De;t[129]===Te?De=t[130]:(De=(0,$.jsxs)(`span`,{className:`flex shrink-0 items-center gap-1 text-xs text-fg-muted`,children:[Te,Ee]}),t[129]=Te,t[130]=De);let Oe;t[131]!==we||t[132]!==De?(Oe=(0,$.jsxs)(`summary`,{className:`flex cursor-pointer list-none items-center justify-between gap-3 rounded-md outline-none hover:text-fg focus-visible:ring-2 focus-visible:ring-accent`,children:[we,De]}),t[131]=we,t[132]=De,t[133]=Oe):Oe=t[133];let ke;t[134]===a.runDetail.technicalEventsDescription?ke=t[135]:(ke=(0,$.jsx)(`p`,{className:`mt-2 text-xs leading-relaxed text-fg-muted`,children:a.runDetail.technicalEventsDescription}),t[134]=a.runDetail.technicalEventsDescription,t[135]=ke);let Ae;t[136]!==i||t[137]!==a||t[138]!==c||t[139]!==l?(Ae=(0,$.jsx)(`div`,{className:`mt-4`,children:l?(0,$.jsxs)(`div`,{className:`space-y-3`,"aria-label":a.loading,children:[(0,$.jsx)(G,{className:`h-10 w-full`}),(0,$.jsx)(G,{className:`h-10 w-4/5`}),(0,$.jsx)(G,{className:`h-10 w-11/12`})]}):i.length===0?(0,$.jsx)(`div`,{className:`text-sm text-fg-muted`,children:a.empty.events}):(0,$.jsx)(`ol`,{className:`space-y-3`,children:i.map(e=>(0,$.jsxs)(`li`,{className:`grid grid-cols-[0.75rem_1fr] gap-3`,children:[(0,$.jsx)(`span`,{className:W(`mt-1 size-2 rounded-full`,Tn(e.type))}),(0,$.jsxs)(`div`,{className:`min-w-0`,children:[(0,$.jsx)(`div`,{className:`text-sm text-fg`,children:hn(e,a)}),(0,$.jsxs)(`div`,{className:`mt-1 text-xs text-fg-muted`,children:[Gt(e.createdAtMs,a,c),` · `,e.type]}),e.data&&typeof e.data==`object`?(0,$.jsxs)(`details`,{className:`group/event mt-2 rounded-md border border-edge/70 bg-surface-inset/35`,children:[(0,$.jsxs)(`summary`,{className:`flex cursor-pointer list-none items-center justify-between gap-2 px-2.5 py-2 text-xs font-medium text-fg-muted outline-none hover:text-fg`,children:[a.details.eventData,(0,$.jsx)(D,{className:`size-3.5 transition-transform group-open/event:rotate-180`})]}),(0,$.jsx)(`pre`,{className:`max-h-72 overflow-auto whitespace-pre-wrap break-all border-t border-edge/70 px-2.5 py-2 text-xs leading-relaxed text-fg-muted`,children:JSON.stringify(e.data,null,2)})]}):null]})]},e.id))})}),t[136]=i,t[137]=a,t[138]=c,t[139]=l,t[140]=Ae):Ae=t[140];let Me;t[141]!==Oe||t[142]!==ke||t[143]!==Ae?(Me=(0,$.jsxs)(`details`,{className:`group px-4 py-3`,children:[Oe,ke,Ae]}),t[141]=Oe,t[142]=ke,t[143]=Ae,t[144]=Me):Me=t[144];let Ne;return t[145]!==H||t[146]!==T||t[147]!==X||t[148]!==Se||t[149]!==Z||t[150]!==Me?(Ne=(0,$.jsxs)(`aside`,{className:T,children:[H,X,Se,Z,Me]}),t[145]=H,t[146]=T,t[147]=X,t[148]=Se,t[149]=Z,t[150]=Me,t[151]=Ne):Ne=t[151],Ne}function yn(e){let t=(0,it.c)(138),{automation:n,runs:r,runsLoading:i,runsError:a,labels:o,cronLabels:s,language:c,projects:l,busyAction:u,onEdit:d,onSelectRun:f,onAction:p}=e,m=u===`automation:${n.id}:run`,h=u===`automation:${n.id}:toggle`,g=u===`automation:${n.id}:delete`,_;t[0]===n?_=t[1]:(_=!ke(n)&&(!n.management||n.management.editable.includes(`enabled`)),t[0]=n,t[1]=_);let v=_,b=!n.management||n.management.runnable,S;t[2]===n.management?S=t[3]:(S=!n.management||n.management.editable.includes(`trigger`),t[2]=n.management,t[3]=S);let C=S,w=!n.management||n.management.deletable,T;t[4]===n.name?T=t[5]:(T=(0,$.jsx)(`h2`,{className:`truncate text-lg font-semibold text-fg`,children:n.name}),t[4]=n.name,t[5]=T);let E=n.enabled?`bg-emerald-500/10 text-emerald-700 dark:text-emerald-300`:`bg-surface-hover text-fg-muted`,D;t[6]===E?D=t[7]:(D=W(`shrink-0 rounded-full px-2 py-0.5 text-xs`,E),t[6]=E,t[7]=D);let O=ke(n)?c===`zh`?`已完成`:`Completed`:n.enabled?o.enabled:o.paused,k;t[8]!==D||t[9]!==O?(k=(0,$.jsx)(`span`,{className:D,children:O}),t[8]=D,t[9]=O,t[10]=k):k=t[10];let A;t[11]!==T||t[12]!==k?(A=(0,$.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[T,k]}),t[11]=T,t[12]=k,t[13]=A):A=t[13];let j;t[14]===n?j=t[15]:(j=en(n)?(0,$.jsx)(`p`,{className:`mt-1 text-sm text-fg-muted`,children:en(n)}):null,t[14]=n,t[15]=j);let N;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,$.jsx)(x,{className:`size-3.5`,"aria-hidden":!0}),t[16]=N):N=t[16];let F;t[17]!==n.trigger||t[18]!==s||t[19]!==o||t[20]!==c?(F=je(n.trigger,o,s,c),t[17]=n.trigger,t[18]=s,t[19]=o,t[20]=c,t[21]=F):F=t[21];let I;t[22]===F?I=t[23]:(I=(0,$.jsx)(`div`,{className:`mt-3 flex flex-wrap items-center gap-2 text-xs text-fg-muted`,children:(0,$.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 rounded-md border border-edge-subtle bg-surface-base px-2 py-1`,children:[N,F]})}),t[22]=F,t[23]=I);let L;t[24]!==I||t[25]!==A||t[26]!==j?(L=(0,$.jsxs)(`div`,{className:`min-w-0`,children:[A,j,I]}),t[24]=I,t[25]=A,t[26]=j,t[27]=L):L=t[27];let R;t[28]!==n||t[29]!==u||t[30]!==w||t[31]!==C||t[32]!==b||t[33]!==v||t[34]!==g||t[35]!==o.dashboard.delete||t[36]!==o.dashboard.deleted||t[37]!==o.dashboard.pause||t[38]!==o.dashboard.resume||t[39]!==o.dashboard.resumed||t[40]!==o.dashboard.runNow||t[41]!==o.details||t[42]!==o.edit||t[43]!==o.experience.deleteConfirm||t[44]!==o.feedback||t[45]!==c||t[46]!==p||t[47]!==d||t[48]!==m||t[49]!==r[0]||t[50]!==h?(R=v||b||C||w?(0,$.jsxs)(`div`,{className:`flex w-full flex-wrap items-center gap-2`,children:[C&&!Rt(n)?(0,$.jsx)(Ve,{automationId:n.id,language:c,runId:r[0]&&[`failed`,`timeout`].includes(r[0].status)?r[0].id:void 0}):null,v?(0,$.jsxs)(fe,{variant:`secondary`,disabled:u!==null,onClick:()=>void p(`automation:${n.id}:toggle`,()=>n.enabled?X.pause(n.id):X.resume(n.id),n.enabled?o.feedback.paused:o.dashboard.resumed),children:[h?(0,$.jsx)(ae,{className:`size-4 animate-spin`}):n.enabled?(0,$.jsx)(te,{className:`size-4`}):(0,$.jsx)(re,{className:`size-4`}),n.enabled?o.dashboard.pause:o.dashboard.resume]}):null,b?(0,$.jsxs)(fe,{variant:`secondary`,disabled:u!==null,onClick:()=>void p(`automation:${n.id}:run`,()=>X.runNow(n.id),o.feedback.rerunQueued),children:[m?(0,$.jsx)(ae,{className:`size-4 animate-spin`}):(0,$.jsx)(re,{className:`size-4`}),o.dashboard.runNow]}):null,C||w?(0,$.jsxs)(xe,{children:[(0,$.jsx)(Se,{asChild:!0,children:(0,$.jsx)(fe,{variant:`ghost`,className:`size-9 p-0`,"aria-label":o.details.moreActions,children:(0,$.jsx)(P,{className:`size-4`})})}),(0,$.jsx)(Z,{children:(0,$.jsxs)(Ee,{align:`end`,className:`z-70 min-w-40 rounded-lg border border-edge bg-surface-overlay p-1 shadow-popover`,children:[C?(0,$.jsxs)(we,{className:`flex cursor-pointer items-center gap-2 rounded-md px-3 py-2 text-sm text-fg outline-none hover:bg-surface-hover`,onSelect:()=>d(n),children:[(0,$.jsx)(ne,{className:`size-4`}),o.edit]}):null,w?(0,$.jsxs)(we,{className:`flex cursor-pointer items-center gap-2 rounded-md px-3 py-2 text-sm text-red-700 outline-none hover:bg-red-500/10 dark:text-red-300`,disabled:u!==null,onSelect:()=>{window.confirm(o.experience.deleteConfirm)&&p(`automation:${n.id}:delete`,()=>X.remove(n.id),o.dashboard.deleted)},children:[g?(0,$.jsx)(ae,{className:`size-4 animate-spin`}):(0,$.jsx)(H,{className:`size-4`}),o.dashboard.delete]}):null]})})]}):null]}):null,t[28]=n,t[29]=u,t[30]=w,t[31]=C,t[32]=b,t[33]=v,t[34]=g,t[35]=o.dashboard.delete,t[36]=o.dashboard.deleted,t[37]=o.dashboard.pause,t[38]=o.dashboard.resume,t[39]=o.dashboard.resumed,t[40]=o.dashboard.runNow,t[41]=o.details,t[42]=o.edit,t[43]=o.experience.deleteConfirm,t[44]=o.feedback,t[45]=c,t[46]=p,t[47]=d,t[48]=m,t[49]=r[0],t[50]=h,t[51]=R):R=t[51];let ee;t[52]!==L||t[53]!==R?(ee=(0,$.jsxs)(`header`,{className:`flex flex-col items-start gap-3 border-b border-edge px-5 py-4`,children:[L,R]}),t[52]=L,t[53]=R,t[54]=ee):ee=t[54];let ie;t[55]!==n.action.instruction||t[56]!==n.action.kind||t[57]!==c?(ie=n.action.kind===`agent`?(0,$.jsxs)(`section`,{"aria-label":c===`zh`?`要做的事`:`What this task does`,children:[(0,$.jsx)(`h3`,{className:`mb-2 text-sm font-semibold text-fg`,children:c===`zh`?`要做的事`:`What this task does`}),(0,$.jsx)(`div`,{className:`max-h-48 overflow-y-auto text-sm leading-6 text-fg-muted`,children:(0,$.jsx)(z,{content:n.action.instruction,compact:!0})})]}):null,t[55]=n.action.instruction,t[56]=n.action.kind,t[57]=c,t[58]=ie):ie=t[58];let oe;t[59]===o.dashboard.latestResult?oe=t[60]:(oe=(0,$.jsx)(`h3`,{className:`text-sm font-semibold text-fg`,children:o.dashboard.latestResult}),t[59]=o.dashboard.latestResult,t[60]=oe);let B;t[61]!==o.experience.viewResult||t[62]!==f||t[63]!==r[0]?(B=r[0]?(0,$.jsx)(fe,{variant:`secondary`,onClick:()=>f(r[0].id),children:o.experience.viewResult}):null,t[61]=o.experience.viewResult,t[62]=f,t[63]=r[0],t[64]=B):B=t[64];let se;t[65]!==oe||t[66]!==B?(se=(0,$.jsxs)(`div`,{className:`mb-3 flex flex-wrap items-center justify-between gap-2`,children:[oe,B]}),t[65]=oe,t[66]=B,t[67]=se):se=t[67];let V;t[68]!==o||t[69]!==c||t[70]!==r[0]||t[71]!==a||t[72]!==i?(V=a?(0,$.jsx)(`p`,{role:`alert`,className:`text-sm text-red-700 dark:text-red-300`,children:a}):i?(0,$.jsx)(G,{className:`h-28 w-full`}):r[0]?(0,$.jsxs)(`div`,{className:`space-y-3 rounded-lg border border-edge-subtle bg-surface-base p-4`,children:[(0,$.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 text-xs text-fg-muted`,children:[(0,$.jsx)(`span`,{className:W(`rounded-full px-2 py-0.5`,Yt(r[0].status)),children:o.status[r[0].status]}),Gt(r[0].createdAtMs,o,c)]}),(0,$.jsx)(z,{content:r[0].error||r[0].summary||(Zt(r[0])?o.runDetail.resultPending:o.runDetail.noResult),compact:!0})]}):(0,$.jsx)(`p`,{className:`text-sm text-fg-muted`,children:o.experience.noRuns}),t[68]=o,t[69]=c,t[70]=r[0],t[71]=a,t[72]=i,t[73]=V):V=t[73];let ce;t[74]!==c||t[75]!==r[0]?(ce=r[0]&&!Zt(r[0])?(0,$.jsx)($e,{runId:r[0].id,language:c}):null,t[74]=c,t[75]=r[0],t[76]=ce):ce=t[76];let U;t[77]!==n||t[78]!==o||t[79]!==c?(U=n.enabled?`${o.next}: ${Le(n,o,c)}`:ke(n)?c===`zh`?`已按计划完成`:`Completed as scheduled`:o.paused,t[77]=n,t[78]=o,t[79]=c,t[80]=U):U=t[80];let K;t[81]===U?K=t[82]:(K=(0,$.jsx)(`p`,{className:`mt-3 text-xs text-fg-muted`,children:U}),t[81]=U,t[82]=K);let q;t[83]!==se||t[84]!==V||t[85]!==ce||t[86]!==K?(q=(0,$.jsxs)(`section`,{children:[se,V,ce,K]}),t[83]=se,t[84]=V,t[85]=ce,t[86]=K,t[87]=q):q=t[87];let J;t[88]===o.dashboard.runHistory?J=t[89]:(J=(0,$.jsx)(`h3`,{className:`text-sm font-semibold text-fg`,children:o.dashboard.runHistory}),t[88]=o.dashboard.runHistory,t[89]=J);let le;t[90]===o.dashboard.runHistoryDescription?le=t[91]:(le=(0,$.jsx)(`p`,{className:`mt-1 text-sm text-fg-muted`,children:o.dashboard.runHistoryDescription}),t[90]=o.dashboard.runHistoryDescription,t[91]=le);let Y;t[92]!==J||t[93]!==le?(Y=(0,$.jsxs)(`div`,{children:[J,le]}),t[92]=J,t[93]=le,t[94]=Y):Y=t[94];let ue;t[95]===r.length?ue=t[96]:(ue=(0,$.jsx)(`span`,{className:`rounded-full bg-surface-base px-2.5 py-1 text-xs text-fg-muted`,children:r.length}),t[95]=r.length,t[96]=ue);let de;t[97]!==Y||t[98]!==ue?(de=(0,$.jsxs)(`div`,{className:`mb-3 flex items-center justify-between gap-3`,children:[Y,ue]}),t[97]=Y,t[98]=ue,t[99]=de):de=t[99];let pe;t[100]!==o||t[101]!==c||t[102]!==f||t[103]!==r||t[104]!==i?(pe=i?(0,$.jsx)(G,{className:`h-24 w-full`}):r.length===0?null:(0,$.jsx)(`div`,{className:`divide-y divide-edge-subtle overflow-hidden rounded-xl border border-edge-subtle bg-surface-base`,children:r.slice(0,8).map(e=>(0,$.jsxs)(`button`,{type:`button`,className:`block w-full p-3 text-left hover:bg-surface-hover`,onClick:()=>f(e.id),children:[(0,$.jsxs)(`div`,{className:`flex min-w-0 items-center justify-between gap-3`,children:[(0,$.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[e.status===`succeeded`?(0,$.jsx)(M,{className:`size-4 shrink-0 text-emerald-600 dark:text-emerald-300`}):(0,$.jsx)(y,{className:`size-4 shrink-0 text-fg-muted`}),(0,$.jsx)(`span`,{className:`truncate text-sm font-medium text-fg`,children:Gt(e.createdAtMs,o,c)})]}),(0,$.jsx)(`span`,{className:W(`shrink-0 rounded-full px-2 py-0.5 text-xs`,Yt(e.status)),children:o.status[e.status]})]}),(0,$.jsx)(`p`,{className:W(`mt-1 line-clamp-2 pl-6 text-sm text-fg-muted`,e.error&&`text-red-700 dark:text-red-300`),children:e.error||e.summary||Kt(e.actionSnapshot,o)})]},e.id))}),t[100]=o,t[101]=c,t[102]=f,t[103]=r,t[104]=i,t[105]=pe):pe=t[105];let me;t[106]!==de||t[107]!==pe?(me=(0,$.jsxs)(`section`,{className:`min-w-0`,children:[de,pe]}),t[106]=de,t[107]=pe,t[108]=me):me=t[108];let he;t[109]===o.experience.settings?he=t[110]:(he=(0,$.jsx)(`summary`,{className:`cursor-pointer text-sm font-medium text-fg`,children:o.experience.settings}),t[109]=o.experience.settings,t[110]=he);let ge;t[111]!==n||t[112]!==o?(ge=$t(n,o),t[111]=n,t[112]=o,t[113]=ge):ge=t[113];let _e;t[114]===ge?_e=t[115]:(_e=(0,$.jsx)(z,{content:ge,compact:!0}),t[114]=ge,t[115]=_e);let ve;t[116]!==n||t[117]!==s||t[118]!==o||t[119]!==c||t[120]!==l?(ve=(0,$.jsx)(xn,{automation:n,labels:o,cronLabels:s,language:c,projects:l}),t[116]=n,t[117]=s,t[118]=o,t[119]=c,t[120]=l,t[121]=ve):ve=t[121];let ye;t[122]!==_e||t[123]!==ve?(ye=(0,$.jsxs)(`div`,{className:`mt-4 space-y-4`,children:[_e,ve]}),t[122]=_e,t[123]=ve,t[124]=ye):ye=t[124];let be;t[125]!==he||t[126]!==ye?(be=(0,$.jsxs)(`details`,{className:`rounded-lg border border-edge-subtle p-4`,children:[he,ye]}),t[125]=he,t[126]=ye,t[127]=be):be=t[127];let Ce;t[128]!==me||t[129]!==be?(Ce=(0,$.jsxs)(`div`,{className:`grid gap-5`,children:[me,be]}),t[128]=me,t[129]=be,t[130]=Ce):Ce=t[130];let Te;t[131]!==ie||t[132]!==q||t[133]!==Ce?(Te=(0,$.jsxs)(`div`,{className:`grid gap-5 p-5`,children:[ie,q,Ce]}),t[131]=ie,t[132]=q,t[133]=Ce,t[134]=Te):Te=t[134];let De;return t[135]!==ee||t[136]!==Te?(De=(0,$.jsxs)(`article`,{className:`min-w-0 overflow-hidden bg-surface-panel`,children:[ee,Te]}),t[135]=ee,t[136]=Te,t[137]=De):De=t[137],De}function bn(e,t){return e===`suggest_only`?t.safety.suggestOnlyDescription:e===`ask_before_apply`?t.safety.askBeforeApplyDescription:t.safety.autoApplyDescription}function xn(e){let t=(0,it.c)(146),{automation:n,labels:r,cronLabels:i,language:a,projects:o}=e,s,c,l,u,d,f,p,m,h,g,_;if(t[0]!==n||t[1]!==i||t[2]!==r||t[3]!==a){let e=Jt(n),o;t[15]!==n||t[16]!==r||t[17]!==a?(o=Le(n,r,a),t[15]=n,t[16]=r,t[17]=a,t[18]=o):o=t[18];let v=o,y;t[19]!==n.state.nextRunAtMs||t[20]!==a?(y=n.state.nextRunAtMs?Xe(n.state.nextRunAtMs,a):void 0,t[19]=n.state.nextRunAtMs,t[20]=a,t[21]=y):y=t[21];let b=y;if(t[22]!==n.trigger.eventType||t[23]!==n.trigger.kind||t[24]!==n.trigger.schedule||t[25]!==n.trigger.secretId||t[26]!==n.trigger.source||t[27]!==r.info.anchor||t[28]!==r.info.calendarSchedule||t[29]!==r.info.eventSource||t[30]!==r.info.eventType||t[31]!==r.info.expression||t[32]!==r.info.fixedInterval||t[33]!==r.info.oneTimeSchedule||t[34]!==r.info.rawInterval||t[35]!==r.info.scheduleType||t[36]!==r.info.timezone||t[37]!==r.info.webhookSecret||t[38]!==a){if(_=[],n.trigger.kind===`schedule`){let e=n.trigger.schedule,i=e.kind===`interval`?r.info.fixedInterval:e.kind===`cron`?r.info.calendarSchedule:r.info.oneTimeSchedule,o;if(t[40]!==r.info.scheduleType||t[41]!==i?(o={label:r.info.scheduleType,value:i},t[40]=r.info.scheduleType,t[41]=i,t[42]=o):o=t[42],_.push(o),e.kind===`interval`){let n=`${e.everyMs} ms`,i;if(t[43]!==r.info.rawInterval||t[44]!==n?(i={label:r.info.rawInterval,value:n},t[43]=r.info.rawInterval,t[44]=n,t[45]=i):i=t[45],_.push(i),e.anchorMs){let n=r.info.anchor,i;t[46]!==a||t[47]!==e.anchorMs?(i=Xe(e.anchorMs,a),t[46]=a,t[47]=e.anchorMs,t[48]=i):i=t[48];let o;t[49]!==r.info.anchor||t[50]!==i?(o={label:n,value:i},t[49]=r.info.anchor,t[50]=i,t[51]=o):o=t[51],_.push(o)}}else if(e.kind===`cron`){let n;if(t[52]!==r.info.expression||t[53]!==e.expr?(n={label:r.info.expression,value:e.expr},t[52]=r.info.expression,t[53]=e.expr,t[54]=n):n=t[54],_.push(n),e.tz){let n;t[55]!==r.info.timezone||t[56]!==e.tz?(n={label:r.info.timezone,value:e.tz},t[55]=r.info.timezone,t[56]=e.tz,t[57]=n):n=t[57],_.push(n)}}else{let n;t[58]!==r.info.oneTimeSchedule||t[59]!==e.at?(n={label:r.info.oneTimeSchedule,value:e.at},t[58]=r.info.oneTimeSchedule,t[59]=e.at,t[60]=n):n=t[60],_.push(n)}}else if(n.trigger.kind===`event`){let e;if(t[61]!==n.trigger.eventType||t[62]!==r.info.eventType?(e={label:r.info.eventType,value:n.trigger.eventType},t[61]=n.trigger.eventType,t[62]=r.info.eventType,t[63]=e):e=t[63],_.push(e),n.trigger.source){let e;t[64]!==n.trigger.source||t[65]!==r.info.eventSource?(e={label:r.info.eventSource,value:n.trigger.source},t[64]=n.trigger.source,t[65]=r.info.eventSource,t[66]=e):e=t[66],_.push(e)}}else if(n.trigger.kind===`webhook`&&n.trigger.secretId){let e;t[67]!==n.trigger.secretId||t[68]!==r.info.webhookSecret?(e={label:r.info.webhookSecret,value:n.trigger.secretId},t[67]=n.trigger.secretId,t[68]=r.info.webhookSecret,t[69]=e):e=t[69],_.push(e)}t[22]=n.trigger.eventType,t[23]=n.trigger.kind,t[24]=n.trigger.schedule,t[25]=n.trigger.secretId,t[26]=n.trigger.source,t[27]=r.info.anchor,t[28]=r.info.calendarSchedule,t[29]=r.info.eventSource,t[30]=r.info.eventType,t[31]=r.info.expression,t[32]=r.info.fixedInterval,t[33]=r.info.oneTimeSchedule,t[34]=r.info.rawInterval,t[35]=r.info.scheduleType,t[36]=r.info.timezone,t[37]=r.info.webhookSecret,t[38]=a,t[39]=_}else _=t[39];h=`h-fit overflow-hidden rounded-xl border border-edge-subtle bg-surface-base shadow-surface`,t[70]===r.info.overview?g=t[71]:(g=(0,$.jsx)(`div`,{className:`border-b border-edge-subtle px-4 py-3`,children:(0,$.jsx)(`h3`,{className:`text-sm font-semibold text-fg`,children:r.info.overview})}),t[70]=r.info.overview,t[71]=g),f=`grid gap-4 p-4`;let S;t[72]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,$.jsx)(x,{className:`size-4`,"aria-hidden":!0}),t[72]=S):S=t[72];let C=r.info.schedule,w;t[73]!==n.trigger||t[74]!==i||t[75]!==r||t[76]!==a?(w=je(n.trigger,r,i,a),t[73]=n.trigger,t[74]=i,t[75]=r,t[76]=a,t[77]=w):w=t[77];let T=n.enabled?`${r.info.nextRun}:${v}`:v;t[78]!==r.info.schedule||t[79]!==b||t[80]!==w||t[81]!==T?(p=(0,$.jsx)(Cn,{icon:S,label:C,value:w,description:T,descriptionTitle:b}),t[78]=r.info.schedule,t[79]=b,t[80]=w,t[81]=T,t[82]=p):p=t[82];let E;t[83]===n.action.kind?E=t[84]:(E=n.action.kind===`task_command`?(0,$.jsx)(M,{className:`size-4`,"aria-hidden":!0}):(0,$.jsx)(U,{className:`size-4`,"aria-hidden":!0}),t[83]=n.action.kind,t[84]=E);let D=r.info.action,O;t[85]!==n.action||t[86]!==r?(O=Kt(n.action,r),t[85]=n.action,t[86]=r,t[87]=O):O=t[87],t[88]!==r.info.action||t[89]!==E||t[90]!==O?(m=(0,$.jsx)(Cn,{icon:E,label:D,value:O}),t[88]=r.info.action,t[89]=E,t[90]=O,t[91]=m):m=t[91],s=Cn,t[92]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,$.jsx)(B,{className:`size-4`,"aria-hidden":!0}),t[92]=c):c=t[92],l=r.info.permission,u=r.safety[e],d=bn(e,r),t[0]=n,t[1]=i,t[2]=r,t[3]=a,t[4]=s,t[5]=c,t[6]=l,t[7]=u,t[8]=d,t[9]=f,t[10]=p,t[11]=m,t[12]=h,t[13]=g,t[14]=_}else s=t[4],c=t[5],l=t[6],u=t[7],d=t[8],f=t[9],p=t[10],m=t[11],h=t[12],g=t[13],_=t[14];let v;t[93]!==s||t[94]!==c||t[95]!==l||t[96]!==u||t[97]!==d?(v=(0,$.jsx)(s,{icon:c,label:l,value:u,description:d}),t[93]=s,t[94]=c,t[95]=l,t[96]=u,t[97]=d,t[98]=v):v=t[98];let b;t[99]===Symbol.for(`react.memo_cache_sentinel`)?(b=(0,$.jsx)(I,{className:`size-4`,"aria-hidden":!0}),t[99]=b):b=t[99];let S;t[100]!==n.projectId||t[101]!==r.info.noProject||t[102]!==o?(S=o.find(e=>e.id===n.projectId)?.name??r.info.noProject,t[100]=n.projectId,t[101]=r.info.noProject,t[102]=o,t[103]=S):S=t[103];let C;t[104]!==r.info.project||t[105]!==S?(C=(0,$.jsx)(Cn,{icon:b,label:r.info.project,value:S}),t[104]=r.info.project,t[105]=S,t[106]=C):C=t[106];let w;t[107]===Symbol.for(`react.memo_cache_sentinel`)?(w=(0,$.jsx)(ee,{className:`size-4`,"aria-hidden":!0}),t[107]=w):w=t[107];let T=n.conversationMode===`continuous`?r.info.continuousConversation:r.info.newConversation,E;t[108]!==r.info.conversation||t[109]!==T?(E=(0,$.jsx)(Cn,{icon:w,label:r.info.conversation,value:T}),t[108]=r.info.conversation,t[109]=T,t[110]=E):E=t[110];let O;t[111]===Symbol.for(`react.memo_cache_sentinel`)?(O=(0,$.jsx)(j,{className:`size-4`,"aria-hidden":!0}),t[111]=O):O=t[111];let k=n.delivery.notificationPolicy===`all`?r.info.notifyAll:n.delivery.notificationPolicy===`none`?r.info.notifyNone:r.info.notifyAttention,A;t[112]!==r.info.notifications||t[113]!==k?(A=(0,$.jsx)(Cn,{icon:O,label:r.info.notifications,value:k}),t[112]=r.info.notifications,t[113]=k,t[114]=A):A=t[114];let N;t[115]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,$.jsx)(y,{className:`size-4`,"aria-hidden":!0}),t[115]=N):N=t[115];let P=r.info.lastRun,F;t[116]!==n||t[117]!==r||t[118]!==a?(F=Re(n,r,a),t[116]=n,t[117]=r,t[118]=a,t[119]=F):F=t[119];let L=n.state.lastRunStatus===`failed`||n.state.lastRunStatus===`timeout`?`danger`:`default`,R;t[120]!==r.info.lastRun||t[121]!==F||t[122]!==L?(R=(0,$.jsx)(Cn,{icon:N,label:P,value:F,valueTone:L}),t[120]=r.info.lastRun,t[121]=F,t[122]=L,t[123]=R):R=t[123];let z;t[124]!==n.state.consecutiveFailures||t[125]!==n.state.lastError||t[126]!==r.dashboard?(z=n.state.consecutiveFailures?(0,$.jsxs)(`div`,{className:`rounded-lg bg-red-500/10 px-3 py-2 text-sm text-red-700 dark:text-red-300`,children:[r.dashboard.failures,`:`,n.state.consecutiveFailures,n.state.lastError?(0,$.jsx)(`p`,{className:`mt-1 break-words text-xs`,children:n.state.lastError}):null]}):n.state.lastError?(0,$.jsx)(`p`,{className:`break-words text-sm text-red-700 dark:text-red-300`,children:n.state.lastError}):null,t[124]=n.state.consecutiveFailures,t[125]=n.state.lastError,t[126]=r.dashboard,t[127]=z):z=t[127];let te;t[128]!==r.info.technicalDetails||t[129]!==_?(te=_.length>0?(0,$.jsxs)(`details`,{className:`group border-t border-edge-subtle pt-3`,children:[(0,$.jsxs)(`summary`,{className:`flex cursor-pointer list-none items-center justify-between gap-2 text-sm text-fg-muted outline-none hover:text-fg focus-visible:ring-2 focus-visible:ring-accent`,children:[(0,$.jsx)(`span`,{children:r.info.technicalDetails}),(0,$.jsx)(D,{className:`size-4 transition-transform group-open:rotate-180`,"aria-hidden":!0})]}),(0,$.jsx)(`div`,{className:`mt-3 grid gap-2`,children:_.map(Sn)})]}):null,t[128]=r.info.technicalDetails,t[129]=_,t[130]=te):te=t[130];let ne;t[131]!==v||t[132]!==C||t[133]!==E||t[134]!==A||t[135]!==R||t[136]!==z||t[137]!==te||t[138]!==f||t[139]!==p||t[140]!==m?(ne=(0,$.jsxs)(`div`,{className:f,children:[p,m,v,C,E,A,R,z,te]}),t[131]=v,t[132]=C,t[133]=E,t[134]=A,t[135]=R,t[136]=z,t[137]=te,t[138]=f,t[139]=p,t[140]=m,t[141]=ne):ne=t[141];let re;return t[142]!==ne||t[143]!==h||t[144]!==g?(re=(0,$.jsxs)(`aside`,{className:h,children:[g,ne]}),t[142]=ne,t[143]=h,t[144]=g,t[145]=re):re=t[145],re}function Sn(e){return(0,$.jsxs)(`div`,{className:`grid gap-0.5`,children:[(0,$.jsx)(`span`,{className:`text-xs text-fg-subtle`,children:e.label}),(0,$.jsx)(`span`,{className:`break-all font-mono text-xs text-fg-muted`,children:e.value})]},`${e.label}:${e.value}`)}function Cn(e){let t=(0,it.c)(19),{icon:n,label:r,value:i,description:a,descriptionTitle:o,valueTone:s}=e,c=s===void 0?`default`:s,l;t[0]===n?l=t[1]:(l=(0,$.jsx)(`span`,{className:`mt-0.5 text-fg-subtle`,children:n}),t[0]=n,t[1]=l);let u;t[2]===r?u=t[3]:(u=(0,$.jsx)(`div`,{className:`text-xs font-medium text-fg-muted`,children:r}),t[2]=r,t[3]=u);let d=c===`danger`?`text-red-700 dark:text-red-300`:`text-fg`,f;t[4]===d?f=t[5]:(f=W(`mt-1 text-sm font-medium leading-5`,d),t[4]=d,t[5]=f);let p;t[6]!==f||t[7]!==i?(p=(0,$.jsx)(`div`,{className:f,children:i}),t[6]=f,t[7]=i,t[8]=p):p=t[8];let m;t[9]!==a||t[10]!==o?(m=a?(0,$.jsx)(`div`,{className:`mt-1 text-xs leading-5 text-fg-subtle`,title:o,children:a}):null,t[9]=a,t[10]=o,t[11]=m):m=t[11];let h;t[12]!==u||t[13]!==p||t[14]!==m?(h=(0,$.jsxs)(`div`,{className:`min-w-0`,children:[u,p,m]}),t[12]=u,t[13]=p,t[14]=m,t[15]=h):h=t[15];let g;return t[16]!==l||t[17]!==h?(g=(0,$.jsxs)(`div`,{className:`grid grid-cols-[1.25rem_1fr] gap-2.5`,children:[l,h]}),t[16]=l,t[17]=h,t[18]=g):g=t[18],g}function wn(e){let t=(0,it.c)(7),{label:n,value:r}=e,i;t[0]===n?i=t[1]:(i=(0,$.jsx)(`span`,{children:n}),t[0]=n,t[1]=i);let a;t[2]===r?a=t[3]:(a=(0,$.jsx)(`span`,{className:`min-w-0 truncate text-fg`,children:r}),t[2]=r,t[3]=a);let o;return t[4]!==i||t[5]!==a?(o=(0,$.jsxs)(`div`,{className:`grid grid-cols-[5rem_1fr] gap-2`,children:[i,a]}),t[4]=i,t[5]=a,t[6]=o):o=t[6],o}function Tn(e){return e.endsWith(`.failed`)?`bg-red-500`:e.endsWith(`.completed`)?`bg-emerald-500`:e.endsWith(`.started`)?`bg-blue-500`:`bg-fg-muted`}function En(e){let t=(0,it.c)(7),{label:n,value:r}=e,i;t[0]===n?i=t[1]:(i=(0,$.jsx)(`div`,{className:`text-xs font-medium uppercase text-fg-muted`,children:n}),t[0]=n,t[1]=i);let a;t[2]===r?a=t[3]:(a=(0,$.jsx)(`div`,{className:`mt-1 truncate text-sm text-fg`,children:r}),t[2]=r,t[3]=a);let o;return t[4]!==i||t[5]!==a?(o=(0,$.jsxs)(`div`,{className:`min-w-0`,children:[i,a]}),t[4]=i,t[5]=a,t[6]=o):o=t[6],o}function Dn(e){let t=(0,it.c)(8),{className:n,icon:r,title:i}=e,a;t[0]===n?a=t[1]:(a=W(`flex min-h-48 flex-col items-center justify-center text-fg-muted`,n),t[0]=n,t[1]=a);let o;t[2]===i?o=t[3]:(o=(0,$.jsx)(`div`,{className:`mt-2 text-sm`,children:i}),t[2]=i,t[3]=o);let s;return t[4]!==r||t[5]!==a||t[6]!==o?(s=(0,$.jsxs)(`div`,{className:a,children:[r,o]}),t[4]=r,t[5]=a,t[6]=o,t[7]=s):s=t[7],s}function On(e){let t=(0,it.c)(319),{form:n,labels:r,setForm:i,projects:a,agentOptions:o,agentsLoading:s,defaultAgentId:c,taskOptions:l,tasksLoading:u,language:d,projectLocked:p}=e,m=p!==void 0&&p,h=f(d).agentsSettings,g;t[0]===i?g=t[1]:(g=e=>i(t=>({...t,...e})),t[0]=i,t[1]=g);let _=g,v=Be(n.intervalValue,n.intervalUnit),y=Date.now(),b;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(b=[1,2,3],t[2]=b):b=t[2];let x;t[3]!==v||t[4]!==y||t[5]!==d?(x=b.map(e=>Ae(y+v*e,d,y)),t[3]=v,t[4]=y,t[5]=d,t[6]=x):x=t[6];let S=x,C;if(t[7]!==n.projectId||t[8]!==n.taskId||t[9]!==l){let e;t[11]!==n.projectId||t[12]!==n.taskId?(e=e=>e.id===n.taskId||e.phase!==`closed`&&(!n.projectId||e.projectId===n.projectId),t[11]=n.projectId,t[12]=n.taskId,t[13]=e):e=t[13],C=l.filter(e),t[7]=n.projectId,t[8]=n.taskId,t[9]=l,t[10]=C}else C=t[10];let w=C,T,E;t[14]!==c||t[15]!==n.actionMode||t[16]!==n.agentId||t[17]!==i?(T=()=>{n.actionMode!==`task_command`||n.agentId.trim()||!c||i(e=>({...e,agentId:c}))},E=[c,n.actionMode,n.agentId,i],t[14]=c,t[15]=n.actionMode,t[16]=n.agentId,t[17]=i,t[18]=T,t[19]=E):(T=t[18],E=t[19]),(0,Q.useEffect)(T,E);let O;t[20]===_?O=t[21]:(O=e=>_({name:e.target.value}),t[20]=_,t[21]=O);let j;t[22]!==n.name||t[23]!==O?(j=(0,$.jsx)(`input`,{className:An,value:n.name,onChange:O}),t[22]=n.name,t[23]=O,t[24]=j):j=t[24];let M;t[25]!==r.form.name||t[26]!==j?(M=(0,$.jsx)(Je,{label:r.form.name,children:j}),t[25]=r.form.name,t[26]=j,t[27]=M):M=t[27];let N;t[28]!==n.actionMode||t[29]!==n.agentId||t[30]!==n.description||t[31]!==n.instruction||t[32]!==n.model||t[33]!==n.name||t[34]!==n.triggerMode||t[35]!==r.form.instruction||t[36]!==d||t[37]!==_?(N=n.actionMode===`agent`?(0,$.jsxs)(`section`,{"aria-label":r.form.instruction,className:`space-y-2`,children:[(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`h2`,{className:`text-sm font-semibold text-fg`,children:r.form.instruction}),(0,$.jsx)(`p`,{className:`mt-1 text-xs leading-5 text-fg-muted`,children:d===`zh`?`写下希望它完成的事情,以及你期待收到的结果。`:`Describe what to do and the result you expect.`})]}),(0,$.jsx)(`div`,{className:`flex justify-end`,children:(0,$.jsx)(Ft,{value:n.instruction,onApply:e=>_({instruction:e}),fieldId:`automation.instruction`,fieldLabel:r.form.instruction,scenario:`automation.instruction`,locale:d,context:{automationName:n.name,automationDescription:n.description,triggerMode:n.triggerMode,agentId:n.agentId,model:n.model},showLabel:!1})}),(0,$.jsx)(`textarea`,{"aria-label":r.form.instruction,className:W(An,`min-h-36 resize-y leading-6`),value:n.instruction,onChange:e=>_({instruction:e.target.value})})]}):null,t[28]=n.actionMode,t[29]=n.agentId,t[30]=n.description,t[31]=n.instruction,t[32]=n.model,t[33]=n.name,t[34]=n.triggerMode,t[35]=r.form.instruction,t[36]=d,t[37]=_,t[38]=N):N=t[38];let P;t[39]===r.form.trigger?P=t[40]:(P=(0,$.jsx)(jn,{title:r.form.trigger}),t[39]=r.form.trigger,t[40]=P);let F;t[41]===_?F=t[42]:(F=e=>_({triggerMode:e.target.value}),t[41]=_,t[42]=F);let I;t[43]===r.trigger.manual?I=t[44]:(I=(0,$.jsx)(A,{value:`manual`,children:r.trigger.manual}),t[43]=r.trigger.manual,t[44]=I);let L;t[45]===r.trigger.once?L=t[46]:(L=(0,$.jsx)(A,{value:`once`,children:r.trigger.once}),t[45]=r.trigger.once,t[46]=L);let R;t[47]===r.trigger.daily?R=t[48]:(R=(0,$.jsx)(A,{value:`daily`,children:r.trigger.daily}),t[47]=r.trigger.daily,t[48]=R);let z;t[49]===r.trigger.weekly?z=t[50]:(z=(0,$.jsx)(A,{value:`weekly`,children:r.trigger.weekly}),t[49]=r.trigger.weekly,t[50]=z);let ee;t[51]===r.trigger.interval?ee=t[52]:(ee=(0,$.jsx)(A,{value:`interval`,children:r.trigger.interval}),t[51]=r.trigger.interval,t[52]=ee);let te;t[53]===r.trigger.customCron?te=t[54]:(te=(0,$.jsx)(A,{value:`cron`,children:r.trigger.customCron}),t[53]=r.trigger.customCron,t[54]=te);let ne;t[55]===r.trigger.webhook?ne=t[56]:(ne=(0,$.jsx)(A,{value:`webhook`,children:r.trigger.webhook}),t[55]=r.trigger.webhook,t[56]=ne);let re;t[57]===r.trigger.taskBlocked?re=t[58]:(re=(0,$.jsx)(A,{value:`taskBlocked`,children:r.trigger.taskBlocked}),t[57]=r.trigger.taskBlocked,t[58]=re);let ie;t[59]===r.trigger.noteCreated?ie=t[60]:(ie=(0,$.jsx)(A,{value:`noteCreated`,children:r.trigger.noteCreated}),t[59]=r.trigger.noteCreated,t[60]=ie);let ae;t[61]===r.trigger.sessionUpdated?ae=t[62]:(ae=(0,$.jsx)(A,{value:`sessionUpdated`,children:r.trigger.sessionUpdated}),t[61]=r.trigger.sessionUpdated,t[62]=ae);let oe;t[63]===r.trigger.customEvent?oe=t[64]:(oe=(0,$.jsx)(A,{value:`event`,children:r.trigger.customEvent}),t[63]=r.trigger.customEvent,t[64]=oe);let B;t[65]!==n.triggerMode||t[66]!==r.form.trigger||t[67]!==F||t[68]!==I||t[69]!==L||t[70]!==R||t[71]!==z||t[72]!==ee||t[73]!==te||t[74]!==ne||t[75]!==re||t[76]!==ie||t[77]!==ae||t[78]!==oe?(B=(0,$.jsxs)(k,{"aria-label":r.form.trigger,className:An,value:n.triggerMode,onChange:F,children:[I,L,R,z,ee,te,ne,re,ie,ae,oe]}),t[65]=n.triggerMode,t[66]=r.form.trigger,t[67]=F,t[68]=I,t[69]=L,t[70]=R,t[71]=z,t[72]=ee,t[73]=te,t[74]=ne,t[75]=re,t[76]=ie,t[77]=ae,t[78]=oe,t[79]=B):B=t[79];let se;t[80]!==n.onceAt||t[81]!==n.time||t[82]!==n.triggerMode||t[83]!==r.form.onceAt||t[84]!==_?(se=n.triggerMode===`once`?(0,$.jsx)(rt,{label:r.form.onceAt,value:n.onceAt,defaultTime:n.time,onChange:e=>_({onceAt:e})}):null,t[80]=n.onceAt,t[81]=n.time,t[82]=n.triggerMode,t[83]=r.form.onceAt,t[84]=_,t[85]=se):se=t[85];let V;t[86]!==n.time||t[87]!==n.triggerMode||t[88]!==n.weekday||t[89]!==r.form.day||t[90]!==r.form.time||t[91]!==r.weekdays||t[92]!==_?(V=n.triggerMode===`daily`||n.triggerMode===`weekly`?(0,$.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:[(0,$.jsx)(Je,{label:r.form.time,children:(0,$.jsx)(Ze,{value:n.time,onChange:e=>_({time:e}),ariaLabel:r.form.time})}),n.triggerMode===`weekly`?(0,$.jsx)(Je,{label:r.form.day,children:(0,$.jsxs)(k,{className:An,value:n.weekday,onChange:e=>_({weekday:e.target.value}),children:[(0,$.jsx)(A,{value:`1`,children:r.weekdays.monday}),(0,$.jsx)(A,{value:`2`,children:r.weekdays.tuesday}),(0,$.jsx)(A,{value:`3`,children:r.weekdays.wednesday}),(0,$.jsx)(A,{value:`4`,children:r.weekdays.thursday}),(0,$.jsx)(A,{value:`5`,children:r.weekdays.friday}),(0,$.jsx)(A,{value:`6`,children:r.weekdays.saturday}),(0,$.jsx)(A,{value:`0`,children:r.weekdays.sunday})]})}):null]}):null,t[86]=n.time,t[87]=n.triggerMode,t[88]=n.weekday,t[89]=r.form.day,t[90]=r.form.time,t[91]=r.weekdays,t[92]=_,t[93]=V):V=t[93];let H=n.triggerMode===`interval`?(0,$.jsxs)(`div`,{className:`grid gap-3 rounded-lg border border-edge-subtle bg-surface-base p-3`,children:[(0,$.jsx)(Je,{label:r.form.intervalEvery,children:(0,$.jsxs)(`div`,{className:`grid gap-2 sm:grid-cols-[minmax(0,1fr)_10rem]`,children:[(0,$.jsx)(`input`,{className:An,type:`number`,min:6e4/Be(1,n.intervalUnit),step:`any`,inputMode:`decimal`,"aria-label":r.form.intervalEvery,value:n.intervalValue,onChange:e=>_({intervalValue:e.target.value})}),(0,$.jsxs)(k,{className:An,"aria-label":d===`zh`?`间隔单位`:`Interval unit`,value:n.intervalUnit,onChange:e=>{let t=e.target.value;_({intervalValue:qe(n.intervalValue,n.intervalUnit,t),intervalUnit:t})},children:[(0,$.jsx)(A,{value:`minute`,children:r.form.intervalUnits.minute}),(0,$.jsx)(A,{value:`hour`,children:r.form.intervalUnits.hour}),(0,$.jsx)(A,{value:`day`,children:r.form.intervalUnits.day}),(0,$.jsx)(A,{value:`week`,children:r.form.intervalUnits.week})]})]})}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{className:`text-xs font-medium text-fg-muted`,children:r.form.commonIntervals}),(0,$.jsx)(`div`,{className:`mt-2 flex flex-wrap gap-2`,children:Ge.map(e=>{let t=Be(e.value,e.unit),n=t===v;return(0,$.jsx)(`button`,{type:`button`,"aria-pressed":n,className:W(`rounded-full border px-2.5 py-1 text-xs transition-colors`,n?`border-accent bg-accent/10 text-accent`:`border-edge-subtle text-fg-muted hover:border-edge hover:bg-surface-hover hover:text-fg`),onClick:()=>_({intervalValue:e.value,intervalUnit:e.unit}),children:Ne(t,d)},`${e.value}:${e.unit}`)})})]}),(0,$.jsxs)(`div`,{className:`rounded-lg bg-surface-panel px-3 py-2.5`,children:[(0,$.jsx)(`div`,{className:`text-sm font-medium text-fg`,children:Ye(v,d)}),(0,$.jsxs)(`div`,{className:`mt-1 text-xs leading-5 text-fg-muted`,children:[r.form.nextThreeRuns,`:`,S.join(d===`zh`?`、`:`, `)]}),(0,$.jsx)(`div`,{className:`mt-1 text-xs leading-5 text-fg-subtle`,children:r.form.fixedIntervalHint})]})]}):null,ce;t[94]!==n.cronExpr||t[95]!==n.triggerMode||t[96]!==r.form.expression||t[97]!==_?(ce=n.triggerMode===`cron`?(0,$.jsx)(Je,{label:r.form.expression,children:(0,$.jsx)(`input`,{className:An,value:n.cronExpr,onChange:e=>_({cronExpr:e.target.value})})}):null,t[94]=n.cronExpr,t[95]=n.triggerMode,t[96]=r.form.expression,t[97]=_,t[98]=ce):ce=t[98];let U;t[99]!==n.triggerMode||t[100]!==n.webhookSecretId||t[101]!==r.form.secretId||t[102]!==_?(U=n.triggerMode===`webhook`?(0,$.jsx)(Je,{label:r.form.secretId,children:(0,$.jsx)(`input`,{className:An,value:n.webhookSecretId,onChange:e=>_({webhookSecretId:e.target.value})})}):null,t[99]=n.triggerMode,t[100]=n.webhookSecretId,t[101]=r.form.secretId,t[102]=_,t[103]=U):U=t[103];let G;t[104]!==n.eventPayloadMatch||t[105]!==n.eventSource||t[106]!==n.eventType||t[107]!==n.triggerMode||t[108]!==r.form.eventPayloadMatch||t[109]!==r.form.eventSource||t[110]!==r.form.eventType||t[111]!==r.form.invalidJsonObject||t[112]!==_?(G=n.triggerMode===`event`?(0,$.jsxs)(`div`,{className:`grid gap-3 rounded-lg border border-edge-subtle bg-surface-base p-3`,children:[(0,$.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:[(0,$.jsx)(Je,{label:r.form.eventType,children:(0,$.jsx)(`input`,{className:An,value:n.eventType,onChange:e=>_({eventType:e.target.value})})}),(0,$.jsx)(Je,{label:r.form.eventSource,children:(0,$.jsx)(`input`,{className:An,value:n.eventSource,onChange:e=>_({eventSource:e.target.value})})})]}),(0,$.jsxs)(Je,{label:r.form.eventPayloadMatch,children:[(0,$.jsx)(`textarea`,{className:W(An,`min-h-24 resize-y font-mono text-xs`),value:n.eventPayloadMatch,onChange:e=>_({eventPayloadMatch:e.target.value}),placeholder:`{
|
|
8
|
-
"status": "blocked"
|
|
9
|
-
}`}),Ie(n.eventPayloadMatch)?null:(0,$.jsx)(`span`,{className:`text-xs text-red-700 dark:text-red-300`,children:r.form.invalidJsonObject})]})]}):null,t[104]=n.eventPayloadMatch,t[105]=n.eventSource,t[106]=n.eventType,t[107]=n.triggerMode,t[108]=r.form.eventPayloadMatch,t[109]=r.form.eventSource,t[110]=r.form.eventType,t[111]=r.form.invalidJsonObject,t[112]=_,t[113]=G):G=t[113];let K;t[114]!==n||t[115]!==d||t[116]!==_?(K=(0,$.jsx)(Me,{form:n,onChange:_,language:d}),t[114]=n,t[115]=d,t[116]=_,t[117]=K):K=t[117];let q;t[118]!==P||t[119]!==B||t[120]!==se||t[121]!==V||t[122]!==H||t[123]!==ce||t[124]!==U||t[125]!==G||t[126]!==K?(q=(0,$.jsxs)(`section`,{className:`grid gap-3 rounded-xl border border-edge p-4`,children:[P,B,se,V,H,ce,U,G,K]}),t[118]=P,t[119]=B,t[120]=se,t[121]=V,t[122]=H,t[123]=ce,t[124]=U,t[125]=G,t[126]=K,t[127]=q):q=t[127];let J=d===`zh`?`执行设置`:`Execution settings`,le;t[128]!==n.actionMode||t[129]!==r?(le=qt(n.actionMode,r),t[128]=n.actionMode,t[129]=r,t[130]=le):le=t[130];let Y;t[131]===le?Y=t[132]:(Y=(0,$.jsx)(`span`,{className:`ml-2 text-xs font-normal text-fg-muted`,children:le}),t[131]=le,t[132]=Y);let ue;t[133]!==J||t[134]!==Y?(ue=(0,$.jsx)(`summary`,{className:`flex cursor-pointer items-center justify-between gap-3 px-4 py-3 text-sm font-medium text-fg focus-visible:outline-accent`,children:(0,$.jsxs)(`span`,{children:[J,Y]})}),t[133]=J,t[134]=Y,t[135]=ue):ue=t[135];let de;t[136]===_?de=t[137]:(de=e=>_({description:e.target.value}),t[136]=_,t[137]=de);let fe;t[138]!==n.description||t[139]!==de?(fe=(0,$.jsx)(`input`,{className:An,value:n.description,onChange:de}),t[138]=n.description,t[139]=de,t[140]=fe):fe=t[140];let pe;t[141]!==r.form.description||t[142]!==fe?(pe=(0,$.jsx)(Je,{label:r.form.description,children:fe}),t[141]=r.form.description,t[142]=fe,t[143]=pe):pe=t[143];let X;t[144]!==n.projectId||t[145]!==r.form.noProject||t[146]!==r.form.project||t[147]!==m||t[148]!==a||t[149]!==_?(X=m?null:(0,$.jsx)(Je,{label:r.form.project,children:(0,$.jsxs)(k,{className:An,value:n.projectId,onChange:e=>_({projectId:e.target.value}),children:[(0,$.jsx)(A,{value:``,children:r.form.noProject}),a.map(kn)]})}),t[144]=n.projectId,t[145]=r.form.noProject,t[146]=r.form.project,t[147]=m,t[148]=a,t[149]=_,t[150]=X):X=t[150];let me;t[151]===_?me=t[152]:(me=e=>{let t=e.target.value;_({actionMode:t,...t===`task_command`?{safetyMode:`auto_apply`}:{}})},t[151]=_,t[152]=me);let he;t[153]===r.action.runAgent?he=t[154]:(he=(0,$.jsx)(A,{value:`agent`,children:r.action.runAgent}),t[153]=r.action.runAgent,t[154]=he);let ge;t[155]===r.action.runTask?ge=t[156]:(ge=(0,$.jsx)(A,{value:`task_command`,children:r.action.runTask}),t[155]=r.action.runTask,t[156]=ge);let _e;t[157]!==n.actionMode||t[158]!==r.form.action||t[159]!==me||t[160]!==he||t[161]!==ge?(_e=(0,$.jsxs)(k,{className:An,"aria-label":r.form.action,value:n.actionMode,onChange:me,children:[he,ge]}),t[157]=n.actionMode,t[158]=r.form.action,t[159]=me,t[160]=he,t[161]=ge,t[162]=_e):_e=t[162];let ve=Je,ye=r.form.agent,be=k,xe=An,Se=n.agentId,Z;t[163]===_?Z=t[164]:(Z=e=>_({agentId:e.target.value}),t[163]=_,t[164]=Z);let Ce=s?r.form.loadingAgents:r.form.defaultAgent,we;t[165]===Ce?we=t[166]:(we=(0,$.jsx)(A,{value:``,children:Ce}),t[165]=Ce,t[166]=we);let Te=o.map(e=>(0,$.jsx)(A,{value:e.id,children:Qe(e,h)},e.id)),Ee;t[167]!==be||t[168]!==n.agentId||t[169]!==xe||t[170]!==Z||t[171]!==we||t[172]!==Te?(Ee=(0,$.jsxs)(be,{className:xe,value:Se,onChange:Z,children:[we,Te]}),t[167]=be,t[168]=n.agentId,t[169]=xe,t[170]=Z,t[171]=we,t[172]=Te,t[173]=Ee):Ee=t[173];let De;t[174]!==ve||t[175]!==r.form.agent||t[176]!==Ee?(De=(0,$.jsx)(ve,{label:ye,children:Ee}),t[174]=ve,t[175]=r.form.agent,t[176]=Ee,t[177]=De):De=t[177];let ke;t[178]!==w||t[179]!==n.actionMode||t[180]!==n.model||t[181]!==n.taskId||t[182]!==r.form.defaultModel||t[183]!==r.form.loadingTasks||t[184]!==r.form.model||t[185]!==r.form.modelHint||t[186]!==r.form.noModels||t[187]!==r.form.noTasks||t[188]!==r.form.searchModels||t[189]!==r.form.task||t[190]!==r.form.taskClosed||t[191]!==r.form.taskContextHint||t[192]!==u||t[193]!==_?(ke=n.actionMode===`agent`?(0,$.jsx)($.Fragment,{children:(0,$.jsxs)(Je,{label:r.form.model,children:[(0,$.jsx)(Oe,{value:n.model,onChange:e=>_({model:e}),placeholder:r.form.defaultModel,emptyLabel:r.form.defaultModel,searchPlaceholder:r.form.searchModels,noMatches:r.form.noModels,allowEmpty:!0,showProviderSettingsFooter:!0,contentAlign:`start`,className:`w-full`,ariaLabel:r.form.model}),(0,$.jsx)(`span`,{className:`text-xs text-fg-subtle`,children:r.form.modelHint})]})}):n.actionMode===`task_command`?(0,$.jsx)($.Fragment,{children:(0,$.jsxs)(Je,{label:r.form.task,children:[(0,$.jsxs)(k,{className:An,value:n.taskId,onChange:e=>_({taskId:e.target.value}),disabled:u||w.length===0,children:[u?(0,$.jsx)(A,{value:``,children:r.form.loadingTasks}):null,!u&&w.length===0?(0,$.jsx)(A,{value:``,children:r.form.noTasks}):null,w.map(e=>(0,$.jsxs)(A,{value:e.id,disabled:e.phase===`closed`,children:[e.title,e.phase===`closed`?` · ${r.form.taskClosed}`:``]},e.id))]}),(0,$.jsx)(`p`,{className:`mt-1 text-xs leading-5 text-fg-muted`,children:r.form.taskContextHint})]})}):null,t[178]=w,t[179]=n.actionMode,t[180]=n.model,t[181]=n.taskId,t[182]=r.form.defaultModel,t[183]=r.form.loadingTasks,t[184]=r.form.model,t[185]=r.form.modelHint,t[186]=r.form.noModels,t[187]=r.form.noTasks,t[188]=r.form.searchModels,t[189]=r.form.task,t[190]=r.form.taskClosed,t[191]=r.form.taskContextHint,t[192]=u,t[193]=_,t[194]=ke):ke=t[194];let je;t[195]!==pe||t[196]!==X||t[197]!==_e||t[198]!==De||t[199]!==ke?(je=(0,$.jsxs)(`div`,{className:`grid gap-4 border-t border-edge p-4`,children:[pe,X,_e,De,ke]}),t[195]=pe,t[196]=X,t[197]=_e,t[198]=De,t[199]=ke,t[200]=je):je=t[200];let Pe;t[201]!==ue||t[202]!==je?(Pe=(0,$.jsxs)(`details`,{className:`group rounded-xl border border-edge`,children:[ue,je]}),t[201]=ue,t[202]=je,t[203]=Pe):Pe=t[203];let Fe;t[204]===r.form.advancedDescription?Fe=t[205]:(Fe=(0,$.jsx)(`span`,{className:`ml-2 text-xs font-normal text-fg-muted`,children:r.form.advancedDescription}),t[204]=r.form.advancedDescription,t[205]=Fe);let Le;t[206]!==r.form.advanced||t[207]!==Fe?(Le=(0,$.jsx)(`span`,{className:`flex min-w-0 items-center gap-2`,children:(0,$.jsxs)(`span`,{children:[r.form.advanced,Fe]})}),t[206]=r.form.advanced,t[207]=Fe,t[208]=Le):Le=t[208];let Re;t[209]===Symbol.for(`react.memo_cache_sentinel`)?(Re=(0,$.jsx)(D,{className:`size-4 transition-transform group-open:rotate-180`}),t[209]=Re):Re=t[209];let ze;t[210]===Le?ze=t[211]:(ze=(0,$.jsxs)(`summary`,{className:`flex cursor-pointer list-none items-center justify-between gap-3 px-4 py-3 text-sm font-semibold text-fg outline-none focus-visible:ring-2 focus-visible:ring-accent`,children:[Le,Re]}),t[210]=Le,t[211]=ze);let Ve;t[212]!==n.actionMode||t[213]!==n.safetyMode||t[214]!==r.form.safety||t[215]!==r.safety||t[216]!==_?(Ve=n.actionMode===`agent`?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(jn,{title:r.form.safety}),(0,$.jsxs)(Je,{label:r.form.safety,children:[(0,$.jsxs)(k,{className:An,value:n.safetyMode,onChange:e=>{let t=e.target.value;_({safetyMode:t})},children:[(0,$.jsx)(A,{value:`suggest_only`,children:r.safety.suggest_only}),(0,$.jsx)(A,{value:`ask_before_apply`,children:r.safety.ask_before_apply}),(0,$.jsx)(A,{value:`auto_apply`,children:r.safety.auto_apply})]}),(0,$.jsx)(`p`,{className:`mt-1 text-xs leading-5 text-fg-muted`,children:n.safetyMode===`suggest_only`?r.safety.suggestOnlyDescription:n.safetyMode===`ask_before_apply`?r.safety.askBeforeApplyDescription:r.safety.autoApplyDescription})]})]}):null,t[212]=n.actionMode,t[213]=n.safetyMode,t[214]=r.form.safety,t[215]=r.safety,t[216]=_,t[217]=Ve):Ve=t[217];let He;t[218]===r.form.results?He=t[219]:(He=(0,$.jsx)(jn,{title:r.form.results}),t[218]=r.form.results,t[219]=He);let Ue;t[220]===_?Ue=t[221]:(Ue=e=>_({conversationMode:e.target.value}),t[220]=_,t[221]=Ue);let We;t[222]===r.form.newConversation?We=t[223]:(We=(0,$.jsx)(A,{value:`new_session`,children:r.form.newConversation}),t[222]=r.form.newConversation,t[223]=We);let Ke;t[224]===r.form.continuousConversation?Ke=t[225]:(Ke=(0,$.jsx)(A,{value:`continuous`,children:r.form.continuousConversation}),t[224]=r.form.continuousConversation,t[225]=Ke);let Xe;t[226]!==n.conversationMode||t[227]!==Ue||t[228]!==We||t[229]!==Ke?(Xe=(0,$.jsxs)(k,{className:An,value:n.conversationMode,onChange:Ue,children:[We,Ke]}),t[226]=n.conversationMode,t[227]=Ue,t[228]=We,t[229]=Ke,t[230]=Xe):Xe=t[230];let $e;t[231]!==r.form.conversation||t[232]!==Xe?($e=(0,$.jsx)(Je,{label:r.form.conversation,children:Xe}),t[231]=r.form.conversation,t[232]=Xe,t[233]=$e):$e=t[233];let et;t[234]===_?et=t[235]:(et=e=>_({notificationPolicy:e.target.value}),t[234]=_,t[235]=et);let tt;t[236]===r.form.notifyAttention?tt=t[237]:(tt=(0,$.jsx)(A,{value:`attention`,children:r.form.notifyAttention}),t[236]=r.form.notifyAttention,t[237]=tt);let nt;t[238]===r.form.notifyAll?nt=t[239]:(nt=(0,$.jsx)(A,{value:`all`,children:r.form.notifyAll}),t[238]=r.form.notifyAll,t[239]=nt);let at;t[240]===r.form.notifyNone?at=t[241]:(at=(0,$.jsx)(A,{value:`none`,children:r.form.notifyNone}),t[240]=r.form.notifyNone,t[241]=at);let ot;t[242]!==n.notificationPolicy||t[243]!==et||t[244]!==tt||t[245]!==nt||t[246]!==at?(ot=(0,$.jsxs)(k,{className:An,value:n.notificationPolicy,onChange:et,children:[tt,nt,at]}),t[242]=n.notificationPolicy,t[243]=et,t[244]=tt,t[245]=nt,t[246]=at,t[247]=ot):ot=t[247];let st;t[248]!==r.form.notifications||t[249]!==ot?(st=(0,$.jsx)(Je,{label:r.form.notifications,children:ot}),t[248]=r.form.notifications,t[249]=ot,t[250]=st):st=t[250];let ct;t[251]===_?ct=t[252]:(ct=e=>_({resultWebhookEndpoint:e.target.value}),t[251]=_,t[252]=ct);let lt;t[253]!==n.resultWebhookEndpoint||t[254]!==r.form.resultWebhookEndpoint||t[255]!==ct?(lt=(0,$.jsx)(`input`,{"aria-label":r.form.resultWebhookEndpoint,className:An,value:n.resultWebhookEndpoint,onChange:ct}),t[253]=n.resultWebhookEndpoint,t[254]=r.form.resultWebhookEndpoint,t[255]=ct,t[256]=lt):lt=t[256];let ut;t[257]===_?ut=t[258]:(ut=e=>_({resultWebhookSecretId:e.target.value}),t[257]=_,t[258]=ut);let dt;t[259]!==n.resultWebhookSecretId||t[260]!==r.form.resultWebhookSecretId||t[261]!==ut?(dt=(0,$.jsx)(`input`,{"aria-label":r.form.resultWebhookSecretId,className:An,value:n.resultWebhookSecretId,onChange:ut,placeholder:r.form.resultWebhookSecretId}),t[259]=n.resultWebhookSecretId,t[260]=r.form.resultWebhookSecretId,t[261]=ut,t[262]=dt):dt=t[262];let ft;t[263]!==lt||t[264]!==dt?(ft=(0,$.jsxs)(`div`,{className:`grid gap-2`,children:[lt,dt]}),t[263]=lt,t[264]=dt,t[265]=ft):ft=t[265];let pt;t[266]!==r.form.resultWebhookEndpoint||t[267]!==ft?(pt=(0,$.jsx)(Je,{label:r.form.resultWebhookEndpoint,children:ft}),t[266]=r.form.resultWebhookEndpoint,t[267]=ft,t[268]=pt):pt=t[268];let mt;t[269]===r.form.reliability?mt=t[270]:(mt=(0,$.jsx)(jn,{title:r.form.reliability}),t[269]=r.form.reliability,t[270]=mt);let ht;t[271]===_?ht=t[272]:(ht=e=>_({timeoutSeconds:e.target.value}),t[271]=_,t[272]=ht);let gt;t[273]!==n.timeoutSeconds||t[274]!==ht?(gt=(0,$.jsx)(`input`,{className:An,inputMode:`numeric`,value:n.timeoutSeconds,onChange:ht}),t[273]=n.timeoutSeconds,t[274]=ht,t[275]=gt):gt=t[275];let _t;t[276]!==r.form.timeoutSeconds||t[277]!==gt?(_t=(0,$.jsx)(Je,{label:r.form.timeoutSeconds,children:gt}),t[276]=r.form.timeoutSeconds,t[277]=gt,t[278]=_t):_t=t[278];let vt;t[279]===_?vt=t[280]:(vt=e=>_({disableAfterFailures:e.target.value}),t[279]=_,t[280]=vt);let yt;t[281]!==n.disableAfterFailures||t[282]!==vt?(yt=(0,$.jsx)(`input`,{className:An,inputMode:`numeric`,value:n.disableAfterFailures,onChange:vt}),t[281]=n.disableAfterFailures,t[282]=vt,t[283]=yt):yt=t[283];let bt;t[284]!==r.form.disableAfterFailures||t[285]!==yt?(bt=(0,$.jsx)(Je,{label:r.form.disableAfterFailures,children:yt}),t[284]=r.form.disableAfterFailures,t[285]=yt,t[286]=bt):bt=t[286];let xt;t[287]!==_t||t[288]!==bt?(xt=(0,$.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:[_t,bt]}),t[287]=_t,t[288]=bt,t[289]=xt):xt=t[289];let St;t[290]===r.form.effectivePolicy?St=t[291]:(St=(0,$.jsx)(`p`,{className:`text-xs font-medium text-fg`,children:r.form.effectivePolicy}),t[290]=r.form.effectivePolicy,t[291]=St);let Ct=n.timeoutSeconds||`—`,wt;t[292]!==r.form.executionDeadline||t[293]!==Ct?(wt=(0,$.jsxs)(`p`,{className:`mt-1 text-xs text-fg-muted`,children:[r.form.executionDeadline,`: `,Ct,`s`]}),t[292]=r.form.executionDeadline,t[293]=Ct,t[294]=wt):wt=t[294];let Tt;t[295]===r.form.downstreamTimeoutHint?Tt=t[296]:(Tt=(0,$.jsx)(`p`,{className:`mt-0.5 text-xs leading-relaxed text-fg-subtle`,children:r.form.downstreamTimeoutHint}),t[295]=r.form.downstreamTimeoutHint,t[296]=Tt);let Et;t[297]!==St||t[298]!==wt||t[299]!==Tt?(Et=(0,$.jsxs)(`div`,{className:`rounded-lg border border-edge bg-surface-inset/40 px-3 py-2.5`,children:[St,wt,Tt]}),t[297]=St,t[298]=wt,t[299]=Tt,t[300]=Et):Et=t[300];let Dt;t[301]!==Ve||t[302]!==He||t[303]!==$e||t[304]!==st||t[305]!==pt||t[306]!==mt||t[307]!==xt||t[308]!==Et?(Dt=(0,$.jsxs)(`div`,{className:`grid gap-4 border-t border-edge-subtle p-4`,children:[Ve,He,$e,st,pt,mt,xt,Et]}),t[301]=Ve,t[302]=He,t[303]=$e,t[304]=st,t[305]=pt,t[306]=mt,t[307]=xt,t[308]=Et,t[309]=Dt):Dt=t[309];let Ot;t[310]!==ze||t[311]!==Dt?(Ot=(0,$.jsxs)(`details`,{className:`group rounded-xl border border-edge-subtle bg-surface-base`,children:[ze,Dt]}),t[310]=ze,t[311]=Dt,t[312]=Ot):Ot=t[312];let kt;return t[313]!==Ot||t[314]!==M||t[315]!==N||t[316]!==q||t[317]!==Pe?(kt=(0,$.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto px-5 py-4`,children:(0,$.jsxs)(`div`,{className:`grid gap-4`,children:[M,N,q,Pe,Ot]})}),t[313]=Ot,t[314]=M,t[315]=N,t[316]=q,t[317]=Pe,t[318]=kt):kt=t[318],kt}function kn(e){return(0,$.jsx)(A,{value:e.id,children:e.name},e.id)}var An=`min-h-11 w-full rounded-lg border border-edge bg-surface-base px-3 py-2 text-base sm:min-h-0 sm:text-sm text-fg outline-none focus:border-accent`;function jn(e){let t=(0,it.c)(12),{title:n,step:r,description:i}=e,a;t[0]===r?a=t[1]:(a=r?(0,$.jsx)(`span`,{className:`flex size-6 shrink-0 items-center justify-center rounded-full bg-accent/10 text-xs font-semibold text-accent-fg`,children:r}):(0,$.jsx)(I,{className:`mt-0.5 size-4 text-fg-muted`}),t[0]=r,t[1]=a);let o;t[2]===n?o=t[3]:(o=(0,$.jsx)(`div`,{className:`text-sm font-semibold text-fg`,children:n}),t[2]=n,t[3]=o);let s;t[4]===i?s=t[5]:(s=i?(0,$.jsx)(`p`,{className:`mt-0.5 text-xs leading-5 text-fg-muted`,children:i}):null,t[4]=i,t[5]=s);let c;t[6]!==o||t[7]!==s?(c=(0,$.jsxs)(`div`,{children:[o,s]}),t[6]=o,t[7]=s,t[8]=c):c=t[8];let l;return t[9]!==a||t[10]!==c?(l=(0,$.jsxs)(`div`,{className:`flex items-start gap-2 pt-2`,children:[a,c]}),t[9]=a,t[10]=c,t[11]=l):l=t[11],l}export{sn as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./createLucideIcon-DPHK1VkS.js";var t=e(`calendar-clock`,[[`path`,{d:`M16 14v2.2l1.6 1`,key:`fo4ql5`}],[`path`,{d:`M16 2v4`,key:`4m81vk`}],[`path`,{d:`M21 7.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h3.5`,key:`1osxxc`}],[`path`,{d:`M3 10h5`,key:`r794hk`}],[`path`,{d:`M8 2v4`,key:`1cmpym`}],[`circle`,{cx:`16`,cy:`16`,r:`6`,key:`qoo3c4`}]]);export{t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as e,a as t,c as n,d as r,f as i,g as a,i as o,l as s,m as c,n as l,o as u,p as d,r as ee,s as f,u as p,y as te}from"./schemas-CCWMleym.js";import{c as m,f as ne,g as h,l as re,n as ie,o as g,p as _,u as v,v as y}from"./tasks-BTLabOMp.js";import{a as b,r as x,t as S}from"./local-apps-DeqzkJiF.js";import{g as C,h as w}from"./local-session-drafts-XurtjR58.js";var ae=r({id:c(),kind:l([`task`,`connector_approval`]),title:c(),detail:c().optional(),reason:l([`needs_input`,`blocked`,`user_input`,`user_approval`,`dependency`,`external`,`scheduled`,`retry`,`paused`,`overdue`,`due_soon`,`decision_needed`,`approval_required`]),urgency:l([`now`,`soon`]),href:c(),projectId:c().optional(),projectName:c().optional(),dueAt:p().int().nonnegative().optional(),updatedAt:p(),response:u(`kind`,[r({kind:n(`connector_approval`),approvalId:c()}),r({kind:n(`task`),taskId:c(),canRetry:t()})]).optional()});r({id:c(),kind:l([`automation_run`]),runId:c(),title:c(),detail:c(),reason:l([`run_failed`,`run_timeout`]),href:c(),updatedAt:p(),conversationId:c().optional()});var T=u(`type`,[r({type:n(`task_review`),label:c(),taskId:c()}),r({type:n(`retry_task`),label:c(),taskId:c()}),r({type:n(`open`),label:c(),href:c()}),r({type:n(`connector_decision`),label:c(),approvalId:c(),decision:l([`approve`,`deny`])}),r({type:n(`retry_run`),label:c(),subjectKind:l([`automation_run`]),runId:c()}),r({type:n(`acknowledge_run`),label:c(),subjectKind:l([`automation_run`]),runId:c()})]),E=r({id:c(),kind:l([`decision`,`failure`,`running`,`scheduled`]),title:c(),summary:c(),projectName:c().optional(),recommendation:c().optional(),dueAt:p().int().nonnegative().optional(),statusLabel:c().optional(),backgroundState:l([`waiting`,`paused`]).optional(),updatedAt:p(),openAction:T.optional(),primaryAction:T.optional(),secondaryActions:o(T).max(2).default([])}),oe=r({conversationId:c(),runId:c(),title:c().optional(),agentId:c().optional(),updatedAt:p()}),se=d({id:c().trim().min(1).max(300),sourceType:l([`project`,`task`,`conversation`,`calendar`,`mail`,`communication`,`file`,`user_model`]),sourceRef:c().trim().min(1).max(1e3),revision:c().trim().min(1).max(300),observation:c().trim().min(1).max(1e3),observedAt:p().int().nonnegative(),freshUntil:p().int().nonnegative(),href:c().trim().min(1).max(2e3).optional()}),ce=d({kind:l([`connector`,`skill`,`agent`]),capability:c().trim().min(1).max(200),resolvedId:c().trim().min(1).max(300).optional(),readiness:l([`ready`,`needs_setup`,`unavailable`]),required:t(),recoveryPath:c().trim().min(1).max(2e3).optional(),reason:c().trim().min(1).max(500).optional()}),D=d({kind:l([`connector`,`skill`,`agent`]),capability:c().trim().min(1).max(200),code:l([`not_installed`,`disabled`,`agent_not_allowed`,`scope_too_narrow`,`connection_missing`,`account_selection_required`,`reauthorization_required`,`requirements_unmet`,`model_invocation_disabled`,`tool_gated`,`agent_unavailable`]),message:c().trim().min(1).max(500),recoveryPath:c().trim().min(1).max(2e3)}),O=u(`state`,[d({state:n(`ready`)}),d({state:n(`needs_setup`),blockers:o(D).min(1).max(12),recoveryActions:o(d({capability:c().trim().min(1).max(200),href:c().trim().min(1).max(2e3)})).min(1).max(12),degradedAction:d({mode:n(`degraded_start`)}).optional()})]),k=d({summary:c().trim().min(1).max(300),evidenceIds:o(c().trim().min(1).max(300)).min(1).max(8)}),A=d({version:n(1),locale:l([`zh`,`en`]),groups:o(k).min(1).max(8)}),j=d({id:c().trim().min(1).max(200),revision:p().int().positive(),kind:l([`project_next_step`,`delivery_risk`,`meeting_prep`,`commitment_follow_up`,`automation_candidate`]),projectId:c().trim().min(1).max(200).optional(),title:c().trim().min(1).max(160),outcome:c().trim().min(1).max(1e3),rationale:c().trim().min(1).max(1500),evidence:o(se).min(1).max(8),evidencePresentation:A.optional(),confidence:l([`high`,`medium`,`low`]),urgency:l([`now`,`today`,`this_week`]),estimatedMinutes:p().int().min(1).max(480).optional(),risk:l([`analysis`,`external_read`,`file_write`,`external_write`]),proposedSteps:o(c().trim().min(1).max(500)).min(1).max(6),capabilities:o(ce).max(12),verification:o(c().trim().min(1).max(500)).max(8),actionPrompt:c().trim().min(1).max(4e3),degradedActionPrompt:c().trim().min(1).max(4e3).optional(),continuation:u(`kind`,[d({kind:n(`automation`),reason:n(`repeated_success`),href:c().trim().min(1).max(4e3),successCount:p().int().min(2)})]).optional(),actions:d({canStart:t(),canDiscuss:t(),degradedStartAvailable:t()}),generatedAt:p().int().nonnegative(),expiresAt:p().int().nonnegative()}),M=d({id:c().trim().min(1).max(200),revision:p().int().positive(),question:c().trim().min(1).max(500),options:o(d({id:c().trim().min(1).max(100),label:c().trim().min(1).max(200)})).min(2).max(3),evidenceIds:o(c().trim().min(1).max(300)).min(1).max(8)}),N=u(`state`,[d({state:n(`disabled`)}),d({state:n(`quiet`),reason:l([`no_change`,`insufficient_value`,`model_unavailable`,`generation_failed`,`budget_exhausted`])}),d({state:n(`refreshing`),previous:j.optional(),requestedAt:p().int().nonnegative()}),d({state:n(`clarification`),question:M,generatedAt:p().int().nonnegative(),expiresAt:p().int().nonnegative()}),d({state:n(`ready`),primary:j,alternatives:o(j).max(2),placement:l([`primary`,`compact`]),generatedAt:p().int().nonnegative(),expiresAt:p().int().nonnegative(),stale:t()})]);d({idempotencyKey:c().trim().min(1).max(200),locale:c().trim().max(30).optional()}),d({idempotencyKey:c().trim().min(1).max(200),expectedRevision:p().int().positive(),kind:l([`already_done`,`irrelevant`,`too_early`,`source_incorrect`,`less_like_this`,`snoozed`]),reasonCode:c().trim().min(1).max(100).optional(),note:c().trim().min(1).max(1e3).optional(),snoozedUntil:p().int().nonnegative().optional()}),d({idempotencyKey:c().trim().min(1).max(200)});var P=d({items:o(d({opportunity:j,status:l([`available`,`started`,`discussing`,`completed`,`snoozed`,`dismissed`,`expired`,`superseded`]),feedbackKind:l([`started`,`discussed`,`already_done`,`irrelevant`,`too_early`,`source_incorrect`,`less_like_this`,`snoozed`]).optional(),updatedAt:p().int().nonnegative(),snoozedUntil:p().int().nonnegative().optional(),href:c().trim().min(1).max(2e3).optional()})).max(100)});d({idempotencyKey:c().trim().min(1).max(200),expectedRevision:p().int().positive(),mode:l([`start`,`degraded_start`,`discuss`])});var F=u(`outcome`,[d({outcome:n(`task`),taskId:c(),href:c()}),d({outcome:n(`chat_draft`),href:c()}),d({outcome:n(`needs_setup`),preflight:O})]),I=r({runningConversations:o(oe).default([]),recentDeliveries:o(r({id:c(),kind:l([`task`,`automation`]),subjectId:c(),title:c(),summary:c(),completedAt:p(),read:t(),href:c()})).default([]),resumable:o(r({id:c(),kind:l([`task`,`conversation`]),title:c(),summary:c().optional(),projectName:c().optional(),updatedAt:p(),href:c()})).default([]),needsUser:o(E),background:o(E),backgroundCount:p().int().nonnegative(),decisions:o(ae),advisor:N,attentionPolicy:r({visibleDecisionCount:p().int().nonnegative(),suppressedDecisionCount:p().int().nonnegative(),visibleAttentionCount:p().int().nonnegative(),suppressedAttentionCount:p().int().nonnegative()}).default({visibleDecisionCount:0,suppressedDecisionCount:0,visibleAttentionCount:0,suppressedAttentionCount:0})});d({window:d({since:p().int().nonnegative(),until:p().int().nonnegative()}),currentStrategyVersion:c().trim().min(1).max(100),generations:d({total:p().int().nonnegative(),succeeded:p().int().nonnegative(),quiet:p().int().nonnegative(),failed:p().int().nonnegative(),estimatedCostUsd:p().nonnegative()}),outcomes:d({opportunities:p().int().nonnegative(),started:p().int().nonnegative(),discussed:p().int().nonnegative(),completed:p().int().nonnegative(),corrected:p().int().nonnegative(),expired:p().int().nonnegative()}),rates:d({start:p().min(0).max(1),completionFromStarted:p().min(0).max(1),correction:p().min(0).max(1)}),feedback:d({alreadyDone:p().int().nonnegative(),irrelevant:p().int().nonnegative(),tooEarly:p().int().nonnegative(),sourceIncorrect:p().int().nonnegative(),lessLikeThis:p().int().nonnegative()}),strategies:o(d({version:c().trim().min(1).max(100),generations:p().int().nonnegative(),opportunities:p().int().nonnegative(),started:p().int().nonnegative(),completed:p().int().nonnegative()}))});var L=r({northStar:r({weeklyTrustedProgress:p(),weeklyActiveUsers:p(),trustedProgressPerWeeklyActiveUser:p()}),tasks:r({total:p(),achieved:p(),partial:p(),notAchieved:p(),userCorrected:p(),achievementRate:p(),correctionRate:p(),trusted:p(),trustedRate:p()})});function R(e){return I.parse(e)}var z=u(`kind`,[r({kind:n(`once`),at:c()}),r({kind:n(`interval`),everyMs:p().positive(),anchorMs:p().optional()}),r({kind:n(`cron`),expr:c(),tz:c().optional()})]),B=u(`kind`,[r({kind:n(`manual`)}),r({kind:n(`schedule`),schedule:z}),r({kind:n(`webhook`),secretId:c().optional()}),r({kind:n(`event`),eventType:c(),source:c().optional(),payloadMatch:i(c(),a([c(),p(),t(),ee()])).optional()})]),V=u(`kind`,[r({kind:n(`agent`),agentId:c().optional(),instruction:c(),mcpSourceId:c().max(200).optional(),workingDirectory:c().optional(),model:c().optional(),timeoutSeconds:p().positive().optional()}),r({kind:n(`task_command`),taskId:c(),command:ie}),r({kind:n(`system`),capability:l([`home.advisor.refresh`,`personal.proactivity.tick`,`memory.temporal_sweep`,`memory.daily_reconciliation`,`memory.weekly_knowledge`])})]),H=l([`queued`,`running`,`cancelling`,`succeeded`,`failed`,`cancelled`,`timeout`]),U=u(`kind`,[r({key:c(),kind:n(`gateway_event`)}),r({key:c(),kind:n(`weixin`),conversationId:c().uuid(),principalId:c().min(1)}),r({key:c(),kind:n(`webhook`),endpoint:c().url().startsWith(`https://`),secretId:c()}),r({key:c(),kind:n(`file`),targetId:c(),pathTemplate:c()}),r({key:c(),kind:n(`card`),channelId:c(),templateId:c()})]),W=r({id:c(),name:c(),description:c().optional(),projectId:c().optional(),enabled:t(),trigger:B,action:V,safety:r({mode:l([`suggest_only`,`ask_before_apply`,`auto_apply`])}).optional(),conversationMode:l([`new_session`,`continuous`]).optional(),delivery:r({notificationPolicy:l([`attention`,`all`,`none`]),destinations:o(U)}),reliability:r({executionTimeoutSeconds:p().positive().optional(),retryCount:p().int().nonnegative().optional(),maxConcurrentRuns:p().int().positive().optional(),disableAfterConsecutiveFailures:p().int().positive().optional()}).optional(),management:r({owner:c(),editable:o(l([`enabled`,`trigger`])),runnable:t(),deletable:t()}).optional(),state:r({nextRunAtMs:p().optional(),runningRunId:c().optional(),lastRunAtMs:p().optional(),lastRunStatus:H.optional(),lastError:c().optional(),consecutiveFailures:p().int().nonnegative().optional()}),createdAtMs:p(),updatedAtMs:p()}),G=r({id:c(),automationId:c(),automationName:c(),status:H,triggerSnapshot:B,actionSnapshot:V,manual:t(),createdAtMs:p(),startedAtMs:p().optional(),endedAtMs:p().optional(),durationMs:p().optional(),summary:c().optional(),error:c().optional(),conversationId:c().optional(),conversationShared:t().optional(),model:c().optional(),deadlineAtMs:p().optional(),currentPhase:l([`queued`,`action`,`cancelling`,`completed`]).optional(),cancelRequestedAtMs:p().optional(),cancelConfirmedAtMs:p().optional(),termination:r({reason:l([`completed`,`failed`,`user_cancelled`,`deadline_exceeded`]),component:l([`automation`,`agent_turn`,`tool`,`mcp`,`process`]).optional(),componentName:c().optional(),cancellationConfirmed:t()}).optional(),heartbeatAtMs:p().optional(),leaseOwner:c().optional(),leaseExpiresAtMs:p().optional(),attemptNumber:p().int().positive().optional(),rootRunId:c().optional()}),K=r({id:c(),runId:c(),automationId:c(),type:l([`run.queued`,`run.started`,`run.deadline_resolved`,`run.cancel_requested`,`run.cancel_confirmed`,`run.cancellation_unconfirmed`,`run.recovered`,`action.started`,`action.retry_scheduled`,`action.completed`,`action.failed`,`run.completed`]),message:c(),data:e().optional(),createdAtMs:p()}),le=r({totalAutomations:p().int().nonnegative(),enabledAutomations:p().int().nonnegative(),runningRuns:p().int().nonnegative(),failedLastHour:p().int().nonnegative(),nextRun:r({automationId:c(),name:c(),runAtMs:p()}).optional(),pendingEvents:p().int().nonnegative(),oldestPendingEventAgeMs:p().int().nonnegative(),projectionDeadLetters:p().int().nonnegative(),pendingRunDeliveries:p().int().nonnegative(),runDeliveryDeadLetters:p().int().nonnegative(),pendingResultDeliveries:p().int().nonnegative(),resultDeliveryDeadLetters:p().int().nonnegative(),activeExecutions:p().int().nonnegative(),activeDeliveryLeases:p().int().nonnegative()});l([`http`,`agent`,`cli`,`automation`,`mcp`,`extension`]);var ue=a([l(`overview.imports.sessions.tracing.usage.logs.computer-use.phone-use.agent-browser.extensions/debug.connector-service.appearance.keyboard-shortcuts.system.desktop-pet.desktop-app.agent-defaults.gateway.runtimes.devices.remote-access.shares.capabilities/models.capabilities/image.capabilities/voice.capabilities/search`.split(`.`)),c().regex(/^ext\/[a-z0-9_-]+(?:\/[a-z0-9_-]+)?$/i).max(512)]);l([`INVALID_INPUT`,`FORBIDDEN`,`NOT_FOUND`,`REVISION_CONFLICT`,`CONTRACT_CHANGED`,`APPROVAL_REQUIRED`,`IN_PROGRESS`,`UNAVAILABLE`,`OUTCOME_UNKNOWN`,`CANCELLED`,`INTERNAL`]);var de=d({majorVersion:p().int().positive(),descriptorDigest:c().regex(/^[a-f0-9]{64}$/),input:f(),idempotencyKey:c().min(1).max(200).optional()}),fe=r({triggerSummary:c(),actionSummary:c(),safetyNotes:o(c()),requiredConfirmations:o(c()),canRunNow:t(),runNowBlockedReason:c().optional()});d({agentId:c().trim().min(1).max(64).optional(),language:l([`en`,`zh`]).default(`en`)}),r({draftId:c(),explanation:c(),assumptions:o(c()),risks:o(c()),automation:s({name:c(),trigger:f(),action:f()}),simulation:fe,repairAttempts:p().int().nonnegative()}),r({draftId:c(),patch:i(c(),f()),explanation:c(),expectedEffect:c(),risks:o(c()),requiresApproval:t(),repairAttempts:p().int().nonnegative()});var pe=d({eventId:c().min(1),kind:l([`note`,`task`,`project`,`automation`,`local_app`]),id:c().min(1),revision:p().int().nonnegative(),operation:l([`created`,`updated`,`deleted`]),operationId:c().optional()}),q=d({id:c().trim().min(1).max(512)});q.extend({expectedVersion:p().int().positive(),reason:c().trim().min(1).max(4096).default(`TaskRun cancelled`)}),q.extend({rating:l([`helpful`,`not_helpful`]),reason:c().trim().max(4096).optional()}),r({ok:n(!0),feedback:r({id:c(),runId:c(),rating:l([`helpful`,`not_helpful`]),reason:c().optional(),createdAt:p()})}),r({ok:n(!0),run:_,receipt:v,model:g.pick({task:!0,operationalState:!0,attention:!0,allowedCommands:!0}),executionStopConfirmed:n(!1)}),q.extend({enabled:t(),expectedRevision:p().int().nonnegative()}),r({ok:n(!0),automation:W.loose()}).extend({run:G.loose()}),r({ok:n(!0),cancelled:t(),confirmed:t()}),r({ok:n(!0),marked:n(!0)}),d({projectId:c().trim().min(1).max(512).optional()}),r({ok:n(!0),count:p().int().nonnegative()}),q.extend({reason:c().trim().min(1).max(2e3)}),d({runId:c().trim().min(1).max(200),destinationKey:c().trim().min(1).max(100),reason:c().trim().min(1).max(2e3)}),r({ok:n(!0),accepted:n(!0)}),q.extend({expectedRevision:p().int().nonnegative().nullable()}),r({ok:n(!0),removed:t(),automation:W.loose().optional(),cancelRunId:c().optional()});var me=d({status:l([`inbox`,`processed`,`archived`,`trashed`]).optional(),kind:l([`thought`,`todo`,`voice`,`media`,`bookmark`,`mixed`,`task`]).optional(),tag:c().max(512).optional(),projectId:c().min(1).max(512).optional(),unassigned:t().optional(),agentEdited:t().optional(),search:c().max(4096).optional(),pinned:t().optional(),limit:p().int().min(1).max(100).default(20),offset:p().int().min(0).default(0),sortBy:l([`createdAt`,`updatedAt`,`lastOpenedAt`]).optional(),sortOrder:l([`asc`,`desc`]).optional()}),J=s({id:c().min(1),markdown:c(),kind:l([`thought`,`todo`,`voice`,`media`,`bookmark`,`mixed`,`task`]),status:l([`inbox`,`processed`,`archived`,`trashed`]),createdAt:p(),updatedAt:p(),title:c().optional(),localVersion:p().optional()}),he=r({note:J});q.extend({expectedRevision:p().int().positive(),revokeShares:t().default(!0)}),r({deleted:n(!0),revokedShares:p().int().nonnegative()});var ge=d({title:c().max(1e3).optional(),markdown:c().max(2e6).default(``),kind:J.shape.kind.optional(),tags:o(c().max(512)).max(100).optional(),capturedVia:d({channel:l([`app`,`web`,`electron`,`tui`,`telegram`,`wechat`,`feishu`]),platform:l([`ios`,`android`,`harmonyos`]).optional()}).default({channel:`web`}),pinned:t().default(!1),projectId:c().min(1).optional()});d({id:c().min(1),expectedRevision:p().int().positive(),trigger:l([`edit`,`ai_edit`,`sync`,`restore`]).optional(),patch:d({title:c().max(1e3).optional(),markdown:c().max(2e6).optional(),tags:o(c().max(512)).max(100).optional(),pinned:t().optional(),kind:J.shape.kind.optional(),status:J.shape.status.optional(),localVersion:p().int().positive().optional(),ai:i(c(),f()).optional(),aiDeep:s({processedAt:p()}).optional()})}),d({text:c().trim().min(1).max(2e6),capturedVia:ge.shape.capturedVia}),d({id:c().min(1),expectedRevision:p().int().positive().optional(),content:c().trim().min(1).max(2e6),heading:c().trim().min(1).max(1e3).default(`AI 讨论沉淀`)}),d({id:c().min(1),timestamp:p().int().positive(),expectedRevision:p().int().positive()});var _e=s({items:o(s({id:c().min(1)})),total:p().int().nonnegative()}),ve=d({phase:h.optional(),priority:re.optional(),projectId:c().min(1).max(512).optional(),search:c().max(4096).optional(),limit:p().int().min(1).max(200).default(50),offset:p().int().nonnegative().default(0)}),Y=s({id:c().min(1),name:c(),slug:c(),status:l([`planned`,`active`,`paused`,`completed`,`cancelled`,`archived`]),executionMode:l([`local_checkout`,`managed_worktree`]),successCriteria:o(c()),scope:i(c(),e()),nonGoals:o(c()),health:l([`unknown`,`on_track`,`at_risk`,`off_track`]),version:p().int().positive(),createdAt:p(),updatedAt:p(),workspaceRoot:c().optional(),defaultAgentId:c().optional()}),ye=d({id:c().trim().min(1),expectedVersion:p().int().positive(),pinned:t()});r({ok:n(!0),project:Y}),d({workspacePath:c().trim().min(1).max(4096),agentId:c().trim().min(1).max(512).optional(),defaultAgentId:c().trim().max(512).optional(),projectKind:l([`auto`,`coding`,`general`,`unknown`]).optional(),autoCreate:t().default(!1),conversationId:te().optional()}),r({ok:n(!0),project:Y.nullable(),reason:l([`exact`,`contained`,`auto_created`]).optional(),created:t().optional()}),ye.omit({pinned:!0}),r({ok:n(!0),deleted:n(!0),executionStopConfirmed:n(!1)});var X={name:c().trim().min(1).max(1e3).optional(),description:c().max(2e4).optional(),defaultAgentId:c().trim().max(512).optional(),workspaceRoot:c().trim().min(1).max(4096).optional(),createWorkspaceRoot:t().optional(),executionMode:Y.shape.executionMode.optional(),brief:c().max(2e4).optional(),instructions:c().max(1e5).optional(),outcome:c().max(2e4).optional(),successCriteria:o(c().max(4096)).max(100).optional(),scope:i(c(),f()).optional(),nonGoals:o(c().max(4096)).max(100).optional(),health:Y.shape.health.optional(),ownerId:c().max(512).optional(),targetAt:p().finite().optional()};d({...X,projectKind:l([`auto`,`coding`,`general`,`unknown`]).optional(),autoUnderstand:t().default(!1)}).refine(e=>!!(e.name||e.workspaceRoot),`name or workspaceRoot is required`),d({id:c().trim().min(1),expectedVersion:p().int().positive(),patch:d({...X,status:Y.shape.status.optional(),description:X.description.unwrap().nullable().optional(),defaultAgentId:X.defaultAgentId.unwrap().nullable().optional(),workspaceRoot:c().trim().max(4096).nullable().optional(),brief:X.brief.unwrap().nullable().optional(),instructions:X.instructions.unwrap().nullable().optional(),outcome:X.outcome.unwrap().nullable().optional(),ownerId:X.ownerId.unwrap().nullable().optional(),targetAt:X.targetAt.unwrap().nullable().optional()}).refine(e=>Object.values(e).some(e=>e!==void 0),`Empty project patch`)});var be=d({status:Y.shape.status.optional(),search:c().max(4096).optional(),sortBy:l([`updatedAt`,`createdAt`,`name`]).optional(),sortOrder:l([`asc`,`desc`]).optional(),limit:p().int().min(1).max(500).default(50),offset:p().int().nonnegative().default(0)}),Z=s({id:c(),projectId:c(),title:c(),status:l([`planned`,`active`,`completed`,`cancelled`]),sortOrder:p(),createdAt:p(),updatedAt:p()}),Q=s({id:c(),projectId:c(),summary:c(),health:Y.shape.health,createdAt:p()}),$={title:c().trim().min(1).max(1e3),description:c().max(2e4).optional(),status:Z.shape.status.optional(),targetAt:p().int().nonnegative().optional(),sortOrder:p().int().optional()};d({projectId:c().trim().min(1),...$}),d({projectId:c().trim().min(1),id:c().trim().min(1),expectedRevision:p().int().nonnegative(),patch:d({...$,description:c().max(2e4).nullable().optional(),targetAt:p().int().nonnegative().nullable().optional()}).partial().refine(e=>Object.values(e).some(e=>e!==void 0),`Empty milestone patch`)}).omit({patch:!0}),r({ok:n(!0),milestone:Z,project:Y}),r({ok:n(!0),deleted:n(!0)}),d({projectId:c().trim().min(1),expectedVersion:p().int().positive(),health:Y.shape.health,summary:c().trim().min(1).max(2e4),progress:o(c().max(1e4)).max(100).default([]),risks:o(c().max(1e4)).max(100).default([]),nextSteps:o(c().max(1e4)).max(100).default([])}),r({ok:n(!0),update:Q,project:Y});var xe={"xopc.context.resolve":{input:w,output:C},"xopc.notes.preview_edit":{input:q.extend({instruction:c().trim().min(1).max(16e3),markdown:c().max(2e6).optional(),context:s({type:l([`selection`,`section`,`block`,`note`]),range:d({start:p().int().nonnegative(),end:p().int().nonnegative()})}).optional()}),output:r({message:c(),patch:r({id:c(),summary:c(),operations:o(r({type:n(`replaceRange`),from:p().int().nonnegative(),to:p().int().nonnegative(),markdown:c()}))})})},"xopc.automations.get_run":{input:q.extend({waitMs:p().int().min(0).max(3e4).optional()}),output:r({ok:n(!0),run:G.loose()})},"xopc.automations.run_events":{input:q,output:r({ok:n(!0),events:o(K.loose())})},"xopc.automations.metrics":{input:d({}),output:r({ok:n(!0),metrics:le})},"xopc.automations.events":{input:d({type:c().trim().min(1).max(512).optional(),source:c().trim().min(1).max(512).optional(),limit:p().int().min(1).max(200).default(50)}),output:r({ok:n(!0),items:o(r({event:r({id:c(),type:c(),schemaVersion:p().int(),source:c(),subject:r({kind:c(),id:c()}).optional(),payload:i(c(),e()),occurredAtMs:p(),ingestedAtMs:p(),correlationId:c(),causationId:c().optional(),rootEventId:c(),chainDepth:p().int(),dedupeKey:c().optional(),trust:l([`system`,`user`,`connector`,`untrusted_webhook`])}),projectionStatus:l([`pending`,`projecting`,`retrying`,`projected`,`dead_letter`]),projectionAttempts:p().int(),projectionError:c().optional(),deliveries:o(r({automationId:c(),status:l([`pending`,`retrying`,`queued`,`completed`,`failed`,`cancelled`,`skipped`,`dead_letter`]),runId:c().optional(),attempts:p().int(),lastError:c().optional()}))}))})},"xopc.automations.deliveries":{input:d({runId:c().trim().min(1).max(200).optional(),status:l([`pending`,`delivering`,`retrying`,`delivered`,`dead_letter`]).optional(),limit:p().int().min(1).max(200).default(50)}),output:r({ok:n(!0),items:o(r({runId:c(),destinationKey:c(),kind:c(),status:l([`pending`,`delivering`,`retrying`,`delivered`,`dead_letter`]),attempts:p().int(),nextAttemptAtMs:p(),lastError:c().optional(),createdAtMs:p(),updatedAtMs:p()}))})},"xopc.automations.product_events":{input:d({eventType:c().trim().min(1).max(512),source:c().trim().min(1).max(512).optional(),payloadKey:c().trim().min(1).max(512).optional(),payloadValue:c().max(4096).optional(),limit:p().int().min(1).max(100).default(10)}).refine(e=>e.payloadKey===void 0==(e.payloadValue===void 0),`payloadKey and payloadValue must be supplied together`),output:r({ok:n(!0),items:o(r({run:G.loose(),triggerEvent:K.loose()}))})},"xopc.automations.list":{input:d({projectId:c().trim().min(1).optional()}),output:r({ok:n(!0),items:o(W.loose()),projectId:c().optional(),executionSummaries:i(c(),r({unreadCount:p().int().nonnegative()})).optional()})},"xopc.automations.get":{input:q,output:r({ok:n(!0),automation:W.loose()})},"xopc.automations.history":{input:d({automationId:c().trim().min(1).optional(),projectId:c().trim().min(1).optional(),cursor:c().max(1024).optional(),limit:p().int().min(1).max(200).default(50)}),output:r({ok:n(!0),items:o(G.loose()),projectId:c().optional(),hasMore:t().optional(),nextCursor:c().optional()})},"xopc.settings.open":{input:d({section:c().trim().pipe(ue).default(`overview`),title:c().trim().min(1).max(512).default(`Settings`),summary:c().trim().max(4096).optional()}),output:r({ok:n(!0),settings:r({section:c(),title:c(),summary:c().optional()})})},"xopc.local_apps.list":{input:d({}),output:r({apps:o(x)})},"xopc.local_apps.get":{input:q,output:r({app:S})},"xopc.local_apps.validate":{input:q,output:r({validation:b})},"xopc.projects.get":{input:q,output:r({ok:n(!0),project:Y})},"xopc.projects.list":{input:be,output:s({ok:n(!0),items:o(Y),total:p().int().nonnegative()})},"xopc.projects.list_milestones":{input:q,output:r({ok:n(!0),projectId:c(),items:o(Z)})},"xopc.projects.list_updates":{input:q.extend({limit:p().int().min(1).max(500).default(20)}),output:r({ok:n(!0),projectId:c(),items:o(Q)})},"xopc.task_runs.get":{input:q,output:r({ok:n(!0),run:_,receipt:v.optional(),events:o(ne),activeWaits:o(y)})},"xopc.task_runs.list":{input:d({taskId:c().trim().min(1),limit:p().int().min(1).max(200).default(20)}),output:r({ok:n(!0),taskId:c(),items:o(_),receipts:o(v),activeWaits:o(y)})},"xopc.notes.project_summaries":{input:d({}),output:r({items:o(r({id:c(),name:c(),description:c().optional(),noteCount:p().int().nonnegative(),updatedAt:p().optional()}))})},"xopc.notes.history":{input:q,output:r({entries:o(r({timestamp:p().int().nonnegative(),trigger:l([`edit`,`ai_edit`,`sync`,`restore`]),snippet:c().optional()}))})},"xopc.notes.snapshot":{input:q.extend({timestamp:p().int().nonnegative()}),output:r({snapshot:r({noteId:c(),timestamp:p().int().nonnegative(),trigger:l([`edit`,`ai_edit`,`sync`,`restore`]),title:c().optional(),markdown:c(),tags:o(c()).optional(),kind:J.shape.kind,status:J.shape.status})})},"xopc.notes.get":{input:q,output:he},"xopc.notes.list":{input:me,output:_e},"xopc.tasks.metrics":{input:d({}),output:r({ok:n(!0),metrics:L})},"xopc.tasks.get":{input:q,output:g},"xopc.tasks.list":{input:ve,output:m.extend({total:p().int().nonnegative()})}};export{P as a,F as i,xe as n,R as o,pe as r,de as t};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/skills-page-DnMN50Ot.js","assets/rolldown-runtime-aKtaBQYM.js","assets/vendor-react-BOUWij0V.js","assets/preload-helper-Czpn1I53.js","assets/chunk-KS7C4IRE-CiwuuyV8.js","assets/locale-store-cg9cm2EL.js","assets/messages-eQ2CYlpG.js","assets/dist-CY7CS_D3.js","assets/es2015-DBLcMg5B.js","assets/dist-CxGUk8J-.js","assets/briefcase-business-BsoCaI_t.js","assets/createLucideIcon-DPHK1VkS.js","assets/popover-select-CLsphyzA.js","assets/check-DUBLcKHA.js","assets/cn-0WouolD0.js","assets/bundle-mjs-rHxsej31.js","assets/skeleton-DzdOeGYz.js","assets/dist-GJ8-1PAx.js","assets/dist-BuHnPloF.js","assets/floating-ui.dom-seOukHzT.js","assets/settings-shell-dialog-layer-BU3UuiJr.js","assets/code-xml-DJtYhZUF.js","assets/download-Dk-ZjtO6.js","assets/ellipsis-0k4rZLoy.js","assets/external-link-DjqjBmc3.js","assets/file-archive-DanfQJNe.js","assets/file-text-D12HbeVy.js","assets/layers-mJW7JJKm.js","assets/loader-circle-CifKLtgG.js","assets/markdown-view-D1zBWkfB.js","assets/file-image-CDUPkZvG.js","assets/plus-Q2yW6OE7.js","assets/x-B_N4OPjy.js","assets/app-link-DImAfVs5.js","assets/product-delivery-BFfqdKLe.js","assets/schemas-CCWMleym.js","assets/local-apps-DeqzkJiF.js","assets/copy-to-clipboard-HOJ79TWv.js","assets/xml-_d7dTN2Q.js","assets/mermaid-render-oOellPHt.js","assets/markdown-view-DG8DDkEA.css","assets/palette-CDI0VweW.js","assets/refresh-cw-BRlGaq2w.js","assets/sparkles-DHlfQFAF.js","assets/trash-2-DusmjVPV.js","assets/triangle-alert-2JXFNNKU.js","assets/wrench-DFb4r8bH.js","assets/vendor-swr-CdRzEUwF.js","assets/gateway-config-swr-OGhON-s6.js","assets/chat-agents-api-UOdNWZ0_.js","assets/button-Cc4hUNTt.js","assets/interaction-BdhHBbYa.js","assets/page-tabs-oeTY7z3_.js","assets/sliding-indicator-hwz0sx3h.js","assets/page-header-store-DU4NnGap.js","assets/use-async-resource-BHFGZCY2.js","assets/index.module-Cd9ENXfk.js","assets/dist-ZrL34Ps4.js","assets/command-palette-api-Dkn9bbYd.js","assets/local-session-drafts-XurtjR58.js","assets/skill-wire-pattern-BPpeIcCi.js","assets/skill-list-api-DfUsku-x.js","assets/skill-api-utils-C7V4JVXM.js","assets/capability-links-MZdYfPKx.js","assets/connection-usage-BhdQRWgQ.js","assets/capability-icon-CmvCZOJX.js","assets/capability-header-actions-BxMYfQ8y.js","assets/search-DA7gz22f.js","assets/use-media-query-ady-FgjK.js","assets/skill-reload-api-Y9qSMnBd.js","assets/skill-api-CGzAQ-MX.js","assets/connectors-page-CEpfDCLA.js","assets/service-recommendation-list-DSIe-NRe.js","assets/chevron-down-ccbiQQz_.js","assets/working-directory-picker-modal-CeXl9w6z.js","assets/form-field-width-DJw_jULe.js","assets/settings-form-draft-Dy10ldo8.js","assets/install-connector-dialog-BsiyYQhx.js","assets/circle-check-C23XjkUj.js","assets/secret-input-DsjfQmDn.js","assets/copy-Dv6d4Dvw.js","assets/eye-CABVeTq0.js","assets/is-masked-secret-DOkL5b_X.js","assets/connectors-api-CgsSm-Av.js","assets/electron-env-DHOGevH3.js","assets/oauth-provider-connect-Dk1NeeqD.js","assets/cloud-C4-yfnnk.js","assets/models-hub-cache-s0FMNhq9.js","assets/registry-api-BTd_OgbD.js","assets/gateway-startup-retry-BaaoKBoB.js","assets/oauth-api-CvPnQTlH.js","assets/connection-usage-guide-CiVpcbds.js","assets/package-wATCyihJ.js","assets/agent-plugin-dialog-vqlN3ORH.js","assets/arrow-left-D880xG-P.js","assets/circle-alert-BEjgurr2.js","assets/circle-BoO4YvTx.js","assets/folder-open-CyzJ19I9.js","assets/shield-check-BU58siTV.js","assets/upload-rrb46c3c.js","assets/browser-BLJWD7WI.js","assets/extension-marketplace-api-CK5CMKTs.js","assets/chevron-right-BweFrslA.js","assets/circle-pause-CN9jYH2s.js","assets/connector-filters-Cfcx9EA2.js","assets/clock-3-DnrAnuyZ.js","assets/database-CjjeZfRG.js","assets/key-round-DWbpyU2U.js","assets/plug-DKYPEgkR.js","assets/save-DRDABU--.js","assets/server-BlHCBjiE.js","assets/settings-uiTATseT.js","assets/store-SzD1Jvgm.js","assets/terminal-oKqqZdiG.js","assets/extension-provider-CbVokTvd.js","assets/gateway-realtime-B9u4uSXW.js","assets/gateway-realtime-store-xB7Bq4Zs.js","assets/theme-store-GZQ3pTgy.js","assets/middleware-Pd0e8Igk.js","assets/extension-message-router-Dn8JzOdR.js","assets/session-manager-C7RfUfqI.js","assets/constants-DpkUgykJ.js","assets/session-api-CQlEq0MB.js","assets/tool-activity-BtJkgjFf.js","assets/attachment-utils-core-BIOUBrpT.js","assets/agents-admin-api-CKscfdvA.js","assets/capabilities-kG175Q-7.js","assets/tasks-BTLabOMp.js","assets/specialists-xbB3xL9e.js","assets/activity-store-DYwR1u3f.js","assets/sliding-tab-list-CmcrqRzN.js","assets/confirm-dialog-DrA5mTQp.js","assets/connector-service-page-B919cKSm.js","assets/number-input-El7Szeln.js","assets/plugin-details-dialog-Bqz4jT53.js","assets/plugin-presentation-CO5BFDGW.js","assets/apps-page-0Yo3jBsQ.js","assets/box-DvYoGszj.js","assets/extension-paths-DvuaZJuy.js","assets/agents-BgHlOVRV.js","assets/bot-DjLkhyZL.js","assets/heart-Cp4rgrqn.js","assets/message-square-plus-XP0tGdlV.js","assets/pencil-DmIY3Oa-.js","assets/rotate-ccw-JM1TBLpp.js","assets/sliders-horizontal-DqsYor6I.js","assets/new-session-preferences-gb411vZP.js","assets/agent-avatar-display-DqFYHXCS.js","assets/loopi-CNtmi9FU.js","assets/loopi-C09I2mNj.css","assets/model-selector-CL6WT-jw.js","assets/settings-2-D-csvaET.js","assets/open-capability-settings-DQsmJxI7.js","assets/model-sort-_Tz8s_4N.js","assets/agents-app-path-ciChvpCS.js","assets/agent-display-names-Bje7vfSn.js","assets/settings-advanced-section-C6dPu5i1.js","assets/settings-mode-store-BSiiowQa.js","assets/settings-page-header-BSMu5Zq3.js","assets/settings-page-layout-B_vMffB1.js","assets/phone-model-picker-CN_I0-46.js","assets/directory-picker-path-field-BxEw5OrT.js","assets/use-directory-picker-C4p7AgWY.js","assets/image-generation-api-C7D2IetZ.js","assets/channels-BzZp42yO.js","assets/session-channel-icon-BzkFo-Ci.js","assets/git-branch-Dh9uxTot.js","assets/message-circle-Badhj-4D.js","assets/message-square-fVE7Ghj1.js","assets/zap-dximCGjy.js","assets/channels-routes-r2g-9DdC.js","assets/stethoscope-DRqTAtjD.js","assets/secret-input-labels-B5Jl5HqK.js","assets/navigation-ByOzYT0t.js","assets/refresh-button-DiWdGAaX.js","assets/extension-iframe-host-DiIqM2JO.js","assets/extension-authoritative-grants-C0ReZguU.js","assets/settings-loading-skeleton-CAoOV17i.js","assets/schema-form-C9TYGa0_.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{a as t,n,t as r}from"./vendor-react-BOUWij0V.js";import{t as i}from"./preload-helper-Czpn1I53.js";import{f as a,m as o,r as s,u as c}from"./chunk-KS7C4IRE-CiwuuyV8.js";import{n as l}from"./locale-store-cg9cm2EL.js";import{t as u}from"./messages-eQ2CYlpG.js";import{t as d}from"./skeleton-DzdOeGYz.js";import{r as f,t as p}from"./product-navigation-Dp-adLY_.js";import{t as m}from"./page-header-store-DU4NnGap.js";import{t as h}from"./capability-links-MZdYfPKx.js";import{t as g}from"./capability-header-actions-BxMYfQ8y.js";var _=n(),v=e(t(),1),y=r(),b=(0,v.lazy)(()=>i(()=>import(`./skills-page-DnMN50Ot.js`).then(e=>({default:e.SkillsPage})),__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]))),ee=(0,v.lazy)(()=>i(()=>import(`./connectors-page-CEpfDCLA.js`).then(e=>({default:e.ConnectorsPage})),__vite__mapDeps([71,1,2,4,3,5,6,7,8,9,72,11,73,74,25,28,14,15,50,51,75,76,77,12,13,16,17,18,19,20,78,24,79,80,81,37,82,32,83,48,47,84,85,86,87,88,89,90,91,43,64,92,31,93,94,95,96,97,98,99,63,100,65,101,102,103,104,105,106,23,107,108,42,109,110,111,112,113,44,46,52,53,54,114,115,35,116,117,118,119,36,120,121,122,59,123,124,125,126,127,128,129,130,131,57,66,67,68,132,133]))),te=(0,v.lazy)(()=>i(()=>import(`./plugin-details-dialog-Bqz4jT53.js`).then(e=>({default:e.PluginDetailsDialog})),__vite__mapDeps([134,1,2,4,3,5,6,7,8,9,92,11,32,16,14,15,47,50,91,43,64,93,94,73,74,25,28,51,75,76,95,78,96,97,98,99,63,100,65,135]))),ne=(0,v.lazy)(()=>i(()=>import(`./apps-page-0Yo3jBsQ.js`).then(e=>({default:e.ExtensionsPage})),__vite__mapDeps([136,1,2,4,3,5,6,7,8,9,94,11,137,138,23,24,28,29,22,30,31,32,14,15,33,34,35,36,37,38,39,40,92,111,98,44,45,16,47,115,116,50,51,52,53,54,114,117,118,119,120,121,122,89,59,123,124,88,125,48,126,127,128,129,76,57,18,19,93,73,74,25,75,95,78,96,97,99,63,64,100,65,101,66,67,17,68,135]))),re=(0,v.lazy)(()=>i(()=>import(`./agents-BgHlOVRV.js`).then(e=>({default:e.AgentsSettingsPanel})),__vite__mapDeps([139,1,2,3,4,5,6,7,8,9,140,11,10,12,13,14,15,16,17,18,19,20,21,23,81,141,29,22,30,31,32,33,34,35,36,37,38,39,40,142,143,144,111,145,45,99,128,146,47,48,88,89,125,50,51,117,118,52,53,147,148,149,130,131,57,150,151,152,75,153,154,155,156,157,68,133,158,24,43,159,160,161,74,25,28,76,162,163]))),ie=(0,v.lazy)(()=>i(()=>import(`./channels-BzZp42yO.js`).then(e=>({default:e.ChannelsSettingsPanel})),__vite__mapDeps([164,1,2,4,3,5,6,7,8,9,12,11,13,14,15,16,17,18,19,20,95,78,24,28,165,105,166,167,168,108,151,113,169,35,170,144,171,45,32,47,49,48,50,51,172,173,174,42,175,117,118,114,115,116,119,36,120,121,122,89,59,123,124,88,125,126,127,128,129,76,176,155,177,100,156,157,158,43,159,178,79,80,81,37,75,82,133])));function ae(e){return p.includes(e)?e:null}function oe(e){let t=(0,_.c)(3),{label:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=Array.from({length:6},x),t[0]=r):r=t[0];let i;return t[1]===n?i=t[2]:(i=(0,y.jsx)(`div`,{className:`mx-auto grid w-full max-w-7xl gap-4 px-4 pb-7 pt-3 sm:grid-cols-2 sm:px-6 lg:grid-cols-3 lg:px-8 lg:pb-9 lg:pt-4`,"aria-label":n,"aria-busy":!0,children:r}),t[1]=n,t[2]=i),i}function x(e,t){return(0,y.jsx)(d,{className:`h-40 rounded-xl`},t)}function S(){let e=(0,_.c)(65),t=l(T),n;e[0]===t?n=e[1]:(n=u(t),e[0]=t,e[1]=n);let r=n,i=r.capabilitiesHub,{section:d,detailId:x}=a(),[S]=o(),E=c(),D;e[2]===S?D=e[3]:(D=S.get(`plugin`),e[2]=S,e[3]=D);let O=D,k;e[4]!==E||e[5]!==S?(k=()=>{let e=new URLSearchParams(S);e.delete(`plugin`),e.delete(`connect`),E({search:e.toString()},{replace:!0,preventScrollReset:!0})},e[4]=E,e[5]=S,e[6]=k):k=e[6];let A=k,j;e[7]===d?j=e[8]:(j=ae(d),e[7]=d,e[8]=j);let M=j,N=M??p[0],P=r.productNavigation.sections[`capabilities-${N}`],F=m(w),I=m(C),L;e[9]===N?L=e[10]:(L={section:N,value:null},e[9]=N,e[10]=L);let[R,z]=(0,v.useState)(L),B=N===`extensions`&&x?null:R.section===N?R.value:null,V;e[11]===N?V=e[12]:(V=e=>{z({section:N,value:e})},e[11]=N,e[12]=V);let H=V,U,W;if(e[13]!==I||e[14]!==B||e[15]!==P||e[16]!==F?(U=()=>(F({startExtra:null,main:(0,y.jsx)(`h1`,{className:`truncate text-base font-semibold tracking-tight text-fg`,children:P}),end:(0,y.jsx)(g,{contribution:B})}),()=>I()),W=[I,B,P,F],e[13]=I,e[14]=B,e[15]=P,e[16]=F,e[17]=U,e[18]=W):(U=e[17],W=e[18]),(0,v.useLayoutEffect)(U,W),N===`extensions`&&x){let t;e[19]===S?t=e[20]:(t=S.get(`from`)===`connections`?`connections`:S.get(`from`)===`skills`?`skills`:`installed`,e[19]=S,e[20]=t);let n;e[21]===S?n=e[22]:(n=S.get(`connect`),e[21]=S,e[22]=n);let r=n===`1`,i;e[23]!==x||e[24]!==S||e[25]!==r||e[26]!==t?(i=h(x,t,r,S.get(`returnTo`)??void 0),e[23]=x,e[24]=S,e[25]=r,e[26]=t,e[27]=i):i=e[27];let a;return e[28]===i?a=e[29]:(a=(0,y.jsx)(s,{replace:!0,to:i}),e[28]=i,e[29]=a),a}if(!M){let t;return e[30]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,y.jsx)(s,{to:f(p[0]),replace:!0}),e[30]=t):t=e[30],t}let G;e[31]===i.discoverLoading?G=e[32]:(G=(0,y.jsx)(oe,{label:i.discoverLoading}),e[31]=i.discoverLoading,e[32]=G);let K;e[33]!==x||e[34]!==H||e[35]!==N?(K=N===`agents`?(0,y.jsx)(re,{agentId:x,onHeaderActionChange:H}):null,e[33]=x,e[34]=H,e[35]=N,e[36]=K):K=e[36];let q;e[37]!==H||e[38]!==N?(q=N===`skills`?(0,y.jsx)(b,{embedded:!0,onHeaderActionChange:H}):null,e[37]=H,e[38]=N,e[39]=q):q=e[39];let J;e[40]!==H||e[41]!==N?(J=N===`connectors`?(0,y.jsx)(ee,{embedded:!0,onHeaderActionChange:H}):null,e[40]=H,e[41]=N,e[42]=J):J=e[42];let Y;e[43]!==x||e[44]!==H||e[45]!==N?(Y=N===`channels`?(0,y.jsx)(ie,{channelId:x,onHeaderActionChange:H}):null,e[43]=x,e[44]=H,e[45]=N,e[46]=Y):Y=e[46];let X;e[47]!==H||e[48]!==N?(X=N===`extensions`?(0,y.jsx)(ne,{embedded:!0,onHeaderActionChange:H}):null,e[47]=H,e[48]=N,e[49]=X):X=e[49];let Z;e[50]!==N||e[51]!==q||e[52]!==J||e[53]!==Y||e[54]!==X||e[55]!==G||e[56]!==K?(Z=(0,y.jsxs)(v.Suspense,{fallback:G,children:[K,q,J,Y,X]},N),e[50]=N,e[51]=q,e[52]=J,e[53]=Y,e[54]=X,e[55]=G,e[56]=K,e[57]=Z):Z=e[57];let Q;e[58]!==A||e[59]!==O||e[60]!==S?(Q=O?(0,y.jsx)(v.Suspense,{fallback:null,children:(0,y.jsx)(te,{pluginId:O,initialConnect:S.get(`connect`)===`1`,onClose:A},O)}):null,e[58]=A,e[59]=O,e[60]=S,e[61]=Q):Q=e[61];let $;return e[62]!==Z||e[63]!==Q?($=(0,y.jsxs)(`div`,{className:`flex min-h-0 min-w-0 flex-1 flex-col bg-surface-panel`,children:[Z,Q]}),e[62]=Z,e[63]=Q,e[64]=$):$=e[64],$}function C(e){return e.clearPageHeader}function w(e){return e.setPageHeader}function T(e){return e.language}export{S as CapabilitiesPage};
|