@xopcai/xopc 0.0.455 → 0.0.457
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-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-BY_k6iWp.js → automation-task-card-BjqxvYqc.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-page-Dt_Z1UTT.js → automations-page-BSnPWyYd.js} +1 -1
- package/dist/gateway/static/root/assets/automations-workspace-DIaCdxtX.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-D1wQ2sPI.js → capabilities-page-dXDa0i5o.js} +2 -2
- 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-Bx_A__qB.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-CEpfDCLA.js → connectors-page-BwJHhyRb.js} +1 -1
- 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-DlTuGzZ2.js → desktop-pet-CBm3DySQ.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-narrative-cBFIPXzR.js → desktop-pet-narrative-JqMsz4rn.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-D1sTZYAY.js +3 -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-CHAVhyVb.js +11 -0
- package/dist/gateway/static/root/assets/index-CQABygtM.css +1 -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-anM38aV6.js → note-detail-panel-B1cq9sU2.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-BsZmT7Zw.js → notes-page-Do0l5Ddr.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-BSCNuRMT.js → personal-page-DrYh0NPE.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-EqrTk7kU.js → product-preview-content-CUaHxyiE.js} +1 -1
- package/dist/gateway/static/root/assets/{product-preview-modal-aurFBFq4.js → product-preview-modal-BUeyRD5W.js} +2 -2
- package/dist/gateway/static/root/assets/{project-detail-page-ibZZ_w51.js → project-detail-page-D3k1NzXQ.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-CTuS4GFj.js +2 -0
- package/dist/gateway/static/root/assets/routine-panel-9UC3NU5V.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-DSIe-NRe.js → service-recommendation-list-8mVIWB38.js} +1 -1
- 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-DAc5n-mM.js → settings-page-CGiZCF8z.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-BJok6V1K.js → task-detail-page-CWwwumsy.js} +3 -3
- 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/tool-friendly-title-CP35P4VA.js +2 -0
- 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-CdEfR40A.js +1 -0
- 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-D2FHjLi7.js +2 -0
- 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-BNZK4hQ4.js} +1 -1
- package/dist/gateway/static/root/assets/{work-discovery-page-RN6iuY-0.js → work-discovery-page-KwSPhukU.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 +6 -1
- package/dist/src/agent/background-review/prompts.d.ts +1 -1
- package/dist/src/agent/background-review/prompts.js +8 -1
- package/dist/src/agent/background-review/run-background-review.js +47 -3
- package/dist/src/agent/client-error-format.js +1 -1
- package/dist/src/agent/context/audit.js +18 -0
- package/dist/src/agent/context/coordinator.d.ts +4 -0
- package/dist/src/agent/context/coordinator.js +33 -7
- package/dist/src/agent/context/deep-recall.d.ts +33 -0
- package/dist/src/agent/context/deep-recall.js +190 -0
- package/dist/src/agent/context/execution-context.js +29 -5
- package/dist/src/agent/context/execution-context.types.d.ts +2 -0
- package/dist/src/agent/context/memory-claim-grounding.d.ts +2 -0
- package/dist/src/agent/context/memory-claim-grounding.js +20 -0
- package/dist/src/agent/context/recall-grounding.d.ts +3 -0
- package/dist/src/agent/context/recall-grounding.js +31 -0
- 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 +111 -29
- package/dist/src/agent/embedded/types.d.ts +2 -0
- package/dist/src/agent/fallback/reason.js +1 -1
- package/dist/src/agent/memory/context-recovery.d.ts +1 -1
- package/dist/src/agent/memory/index.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/process-direct-streaming.js +1 -1
- package/dist/src/agent/service.d.ts +1 -0
- package/dist/src/agent/service.js +5 -2
- package/dist/src/agent/tools/factory.js +22 -0
- package/dist/src/agent/tools/knowledge-memory-tool.js +7 -1
- package/dist/src/agent/tools/personal-memory-tool.d.ts +11 -0
- package/dist/src/agent/tools/personal-memory-tool.js +387 -0
- package/dist/src/agent/tools/session-search-tool.d.ts +2 -0
- package/dist/src/agent/tools/session-search-tool.js +21 -7
- package/dist/src/agent/tools/user-context-tool.js +11 -1
- package/dist/src/automations/capabilities/write.d.ts +10 -0
- 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/capabilities/runtime/dispatcher.js +1 -1
- package/dist/src/cli/commands/doctor/checks/database-schema.js +1 -1
- package/dist/src/config/schema.d.ts +6 -0
- package/dist/src/config/schema.js +6 -0
- package/dist/src/gateway/agent-builtin-tools.d.ts +1 -1
- package/dist/src/gateway/hono/lib/config-payload.d.ts +6 -0
- package/dist/src/gateway/hono/routes/home.js +100 -2
- package/dist/src/gateway/hono/routes/user-model.js +47 -7
- package/dist/src/gateway/security/gateway-scopes.js +1 -0
- package/dist/src/gateway/service/config-coordinator.d.ts +6 -0
- package/dist/src/gateway/service.js +17 -0
- 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 +196 -12
- 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/knowledge-memory/index.js +2 -2
- package/dist/src/knowledge-memory/repository.d.ts +6 -0
- package/dist/src/knowledge-memory/repository.js +49 -1
- package/dist/src/knowledge-memory/usage-policy.js +7 -7
- package/dist/src/local-apps/automation-proposals.d.ts +20 -0
- package/dist/src/memory-learning/work-capture.js +3 -1
- package/dist/src/personal-agent/policy.d.ts +1 -1
- package/dist/src/personal-agent/policy.js +2 -1
- package/dist/src/personal-agent/proactivity/repository.d.ts +1 -1
- package/dist/src/personal-agent/prompts.js +7 -1
- package/dist/src/providers/model-response.js +1 -1
- package/dist/src/realtime/compact-run-event.js +9 -0
- package/dist/src/session/history-recall-policy.d.ts +6 -0
- package/dist/src/session/history-recall-policy.js +48 -0
- 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/home-query-service.js +1 -0
- package/dist/src/user-context/config.d.ts +12 -0
- package/dist/src/user-context/config.js +14 -1
- package/dist/src/user-context/memory-version.d.ts +2 -0
- package/dist/src/user-context/memory-version.js +12 -0
- package/dist/src/user-model/capture/evidence-policy.d.ts +45 -0
- package/dist/src/user-model/capture/evidence-policy.js +143 -0
- package/dist/src/user-model/capture/executor.d.ts +1 -0
- package/dist/src/user-model/capture/executor.js +68 -8
- package/dist/src/user-model/capture/semantic.d.ts +16 -0
- package/dist/src/user-model/capture/semantic.js +66 -12
- package/dist/src/user-model/repository.js +11 -0
- package/dist/src/user-model/usage-policy.js +5 -5
- package/dist/src/work-discovery/service.js +1 -1
- package/package.json +1 -1
- package/dist/gateway/static/root/assets/automations-workspace-BhHgruhH.js +0 -9
- package/dist/gateway/static/root/assets/capabilities-kG175Q-7.js +0 -1
- package/dist/gateway/static/root/assets/chat-page-dY6aCCRx.js +0 -71
- package/dist/gateway/static/root/assets/composer-payload-handoff-DBE1mvOS.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-Bj5exyow.css +0 -1
- package/dist/gateway/static/root/assets/index-CZI3VGGW.js +0 -11
- 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/route-preload-anuckzRl.js +0 -2
- package/dist/gateway/static/root/assets/settings-advanced-gate-DnfH22f_.js +0 -1
- package/dist/gateway/static/root/assets/task-input-card-lCMSy6YY.js +0 -1
- package/dist/gateway/static/root/assets/tool-friendly-title-DC8_9-Lo.js +0 -2
- package/dist/gateway/static/root/assets/understanding-refresh-store-Ihz2p9Vg.js +0 -1
- package/dist/gateway/static/root/assets/use-composer-attachments-CLIrD0mm.js +0 -2
- package/dist/gateway/static/root/assets/user-model-page-1eYattnk.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 +0,0 @@
|
|
|
1
|
-
import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{a as t,n,t as r}from"./vendor-react-BOUWij0V.js";import{p as i}from"./locale-store-cg9cm2EL.js";import{t as a}from"./check-DUBLcKHA.js";import{t as o}from"./circle-alert-BEjgurr2.js";import{t as s}from"./mic-CuUb7zc-.js";import{t as c}from"./rotate-ccw-JM1TBLpp.js";import{t as l}from"./settings-2-D-csvaET.js";import{t as u}from"./x-B_N4OPjy.js";import{t as d}from"./cn-0WouolD0.js";import{t as f}from"./skeleton-DzdOeGYz.js";import{d as p}from"./tasks-BTLabOMp.js";import{s as m}from"./file-preview-surface-z7_HV0WN.js";import{n as h}from"./open-capability-settings-DQsmJxI7.js";import{n as g}from"./interaction-BdhHBbYa.js";import{t as _}from"./workspace-editor-agent-store-Nos5ebMv.js";import{l as v,p as y}from"./voice-input-shortcut-events-Cc30ZcFy.js";function b(e){let t=e.task.contract?.acceptanceCriteria??[],n=new Map(e.runs.map(e=>[e.id,e])),r=e.receipts.filter(t=>n.get(t.runId)?.contractVersion===e.task.latestContractVersion).sort((e,t)=>t.finalizedAt-e.finalizedAt);return t.map((t,n)=>{let i=e.criterionReviews.find(r=>r.criterionIndex===n&&r.contractVersion===e.task.latestContractVersion&&r.criterionText===t),a={text:t,status:`unverified`,evidence:[]};for(let e of r){let n=e.verification.checks.find(e=>e.criterion===t);if(!n)continue;let r=e.evidence.filter(e=>n.evidenceTitles.includes(e.title)),i=n.status===`passed`&&p(e).has(t)?`passed`:n.status===`failed`?`failed`:`unverified`;a={text:t,status:i,evidence:r,runId:e.runId,verificationStatus:i,method:n.method,note:n.note};break}return i?{...a,status:i.status,review:i}:e.task.contract?.acceptancePolicy===`manual`?{...a,status:`unverified`}:a})}function x(e){let t=new Set(e.runs.filter(t=>t.contractVersion===e.task.latestContractVersion).map(e=>e.id));return e.receipts.filter(e=>t.has(e.runId)).sort((e,t)=>t.finalizedAt-e.finalizedAt)[0]}function S(e){let t=x(e),n=b(e);return{receipt:t,verified:n.filter(e=>e.status===`passed`).length,criteria:n.length,deliverables:e.context.filter(e=>e.role===`deliverable`).length}}function C(e){return e.task.phase===`closed`?e.task.resolution===`done`?`completed`:`ended`:e.waits.some(e=>e.kind===`paused`)?`paused`:e.attention.some(e=>e.kind===`input_required`||e.kind===`approval_required`)?`needsUser`:e.operationalState===`idle`?e.task.phase===`backlog`?`captured`:e.task.phase===`ready`?`ready`:e.task.phase===`review`?`review`:`ready`:e.operationalState}function w(e){return e===`failed`?`bg-danger/10 text-danger`:e===`needsUser`||e===`blocked`?`bg-warning/10 text-warning`:e===`completed`?`bg-success-soft text-success`:e===`running`||e===`verifying`||e===`review`?`bg-accent-soft text-accent-fg`:`bg-surface-hover text-fg-muted`}function T(e){return e===`zh`?{newWork:`交给 xopc`,dialogTitle:`现在想完成什么?`,dialogDescription:`发送后会进入新对话。xopc 会直接回答或开始处理;需要持续推进时,再转为任务。`,intentLabel:`告诉 xopc 你要做什么`,intentPlaceholder:`例如:整理这周的会议记录,提炼待办并给出下周优先级`,intentSuggestion:`整理这周的会议记录,提炼待办并给出下周优先级`,submit:`进入对话并开始`,projectLabel:`归属项目`,monitoringLabel:`跟进策略`,monitoringModes:{observe:`仅观察`,ask_before_action:`行动前询问`,auto_low_risk:`自动执行低风险操作`},existingProject:`已有项目`,newProject:`新项目`,needsAttention:`需要你处理`,waitingStatus:`当前等待`,runAttention:`运行异常`,running:`xopc 正在处理`,continue:`继续推进`,recent:`最近对话`,evidenceCount:`项证据`,remainingCount:`项待继续`,projects:`长期项目`,emptyRunning:`当前没有正在处理的对话`,emptyContinue:`还没有需要继续推进的事项`,openChat:`打开对话`,whyNow:`为什么现在`,impact:`影响`,workDone:`AI 已完成`,recommendation:`建议`,policyReason:`处理依据`,proposedAction:`拟执行动作`,actionStates:{not_authorized:`仅建议,未获自动执行授权`,approval_required:`等待你批准`,pending:`等待执行`,executing:`正在执行`,completed:`已自动执行`,rejected:`已拒绝`,failed:`执行失败`},judgmentReasons:`判断依据`,rejectedAlternatives:`未选方案`,uncertainty:`不确定性`,snooze:`明天再看`,dismiss:`忽略`,feedbackPlaceholder:`告诉 AI:以后遇到这类情况应该怎样判断…`,applyFeedback:`调整后续判断`,evidence:`证据引用`,useful:`有帮助`,notUseful:`没帮助`,taskStatuses:{pending:`待推进`,planning:`正在明确完成标准`,waiting_dependency:`等待前置任务`,running:`正在推进`,verifying:`正在验证`,needs_user:`需要你`,blocked:`已阻塞`,paused:`已暂停`,completed:`已完成`,cancelled:`已结束`},taskProgress:{title:`xopc 已接手`,open:`查看结果`,decide:`查看并决定`,evidence:`项已验证依据`,statuses:{pending:`待推进`,planning:`正在明确完成标准`,waiting_dependency:`等待前置任务`,running:`正在推进`,verifying:`正在验证`,needs_user:`需要你`,blocked:`已阻塞`,paused:`已暂停`,completed:`已完成`,cancelled:`已结束`}},detailStatuses:{allocating:`正在分配执行者`,captured:`尚未安排`,ready:`等待开始`,queued:`已进入队列`,running:`正在执行`,verifying:`正在验证`,waiting:`等待条件`,blocked:`被阻塞`,failed:`执行失败`,cancelled:`执行已取消`,needsUser:`需要你处理`,review:`等待验收`,completed:`已完成`,ended:`已结束`,paused:`已暂停`},detailStatusDescriptions:{allocating:`任务已提交,正在后台选择合适的执行者。`,captured:`任务已记录,但尚未进入执行队列。安排后,xopc 会开始推进。`,ready:`任务已经准备好,可以交给 xopc 开始执行。`,queued:`任务已进入执行队列,xopc 将在资源可用时开始。`,running:`xopc 正在推进这个任务。`,verifying:`xopc 正在根据完成标准核验结果。`,waiting:`任务正在等待外部条件满足。`,blocked:`当前存在阻塞条件,解除后才能继续。`,failed:`最近一次执行失败;查看运行记录后可以重试。`,cancelled:`最近一次执行已取消;任务仍可重新开始。`,needsUser:`xopc 需要你的输入或批准后才能继续。`,review:`执行结果已经准备好,等待你验收。`,completed:`任务已经完成并关闭。`,ended:`任务已经结束,不会继续执行。`,paused:`已暂停自动推进和催办。恢复后仍需满足其他等待条件。`},statusSummary:`当前状态`,taskLabel:`任务`,taskDescription:`任务描述与目标`,editTaskField:`编辑`,saveTaskField:`保存`,cancelTaskField:`取消`,noTaskDescription:`添加任务背景、范围和交付要求。`,taskProperties:`任务属性`,taskPhase:`阶段`,priority:`优先级`,dueDate:`截止日期`,executorLabel:`执行 Agent`,priorityLabels:{low:`低优先级`,normal:`普通优先级`,high:`高优先级`,critical:`紧急`},unassigned:`未指定执行者`,noDueDate:`无截止时间`,updatedAt:`更新于 {{date}}`,successDefinition:`怎样才算完成`,taskDefinition:`任务定义`,criteriaProgress:`{{verified}}/{{total}} 已验证`,taskRelations:`任务关系`,dependencies:`前置任务`,dependents:`后续任务`,noDependencies:`没有前置任务`,noDependents:`没有后续任务`,editDependencies:`编辑前置任务`,saveDependencies:`保存关系`,cancelDependencyEdit:`取消`,dependenciesDescription:`所选任务全部完成后,xopc 才会开始推进当前任务。`,linkDependencies:`关联前置任务`,linkedDependencies:`已关联 {{count}} 个前置任务`,dependencySearchPlaceholder:`搜索任务名称`,noDependencyMatches:`没有匹配的任务`,noDependencyCandidates:`没有可选的其他任务`,removeDependency:`移除前置任务:{{task}}`,dependencyUpdateFailed:`前置任务更新失败,请刷新后重试。`,expectedOutputs:`预期输出`,constraints:`约束与边界`,approvalRequired:`需要你批准`,latestResult:`最新结果`,remainingWork:`还差什么`,nextAction:`下一步`,yourDecision:`只需你决定`,noRemainingWork:`已覆盖全部完成标准。`,noDecisionNeeded:`暂时不需要你做任何事,xopc 会继续推进。`,contextUsed:`本次使用的上下文`,contextSources:`信息来源`,contextAssumptions:`当前假设`,contextRisks:`风险`,contextRoleLabels:{input:`输入`,reference:`参考`,constraint:`约束`,deliverable:`交付物`,evidence:`证据`},contextKindLabels:{document:`文档`,file:`文件`,url:`链接`,session:`对话`,memory:`记忆`,task:`任务`,artifact:`产物`,source:`来源`},currentTask:`当前任务`,executionHistory:`历史执行记录({{count}})`,receiptStatuses:{succeeded:`执行成功`,failed:`执行失败`,cancelled:`已取消`},unresolvedCriteria:`待验证标准`,resultFeedback:`这件事做好了吗?`,doneWell:`结果有帮助`,needsFix:`结果没帮助`,correctionPlaceholder:`告诉 xopc 哪里不对、你真正想要的结果是什么`,submitCorrection:`修正并继续`,feedbackThanks:`收到,我会据此继续改进。`,correctionStarted:`收到,已重新打开并开始修正。`,noDefinition:`系统正在进一步明确完成标准。未明确前不会把事情误判为已完成。`,backToWork:`返回任务列表`,openTaskConversation:`进入对话`,taskNotFound:`没有找到这个任务`,runTask:`开始推进`,scheduleTask:`安排执行`,scheduleRecurringTask:`定时执行`,approveTask:`确认完成`,reopenTask:`重新打开`,moreActions:`更多操作`,pauseTask:`暂停推进`,resumeTask:`继续推进`,cancelTask:`结束事项`,cancelActiveRun:`取消当前执行`,deleteTask:`永久删除任务`,deleteTaskTitle:`永久删除这个任务?`,deleteTaskDescription:`将永久删除“{{title}}”及其执行记录、上下文和回执。关联对话、工作区文件和外部产物不会被删除。`,confirmDeleteTask:`永久删除`,keepTask:`保留任务`,deleteActiveTaskBlocked:`请先结束当前执行,再永久删除任务。`,actionFailed:`操作失败,请重试。`,verificationStatuses:{passed:`已验证`,failed:`验证未通过`,unverified:`待验证`}}:{newWork:`Ask xopc`,dialogTitle:`What do you want to get done?`,dialogDescription:`This opens a new conversation. xopc will answer or start working, and create a task only when the work needs ongoing progress.`,intentLabel:`Tell xopc what you need`,intentPlaceholder:`For example: summarize this week’s meeting notes and suggest next week’s priorities`,intentSuggestion:`Summarize this week’s meeting notes and suggest next week’s priorities`,submit:`Open conversation and start`,projectLabel:`Project`,monitoringLabel:`Follow-up policy`,monitoringModes:{observe:`Observe only`,ask_before_action:`Ask before acting`,auto_low_risk:`Auto-run low-risk actions`},existingProject:`Existing project`,newProject:`New project`,needsAttention:`Needs your attention`,waitingStatus:`Current status`,runAttention:`Run issues`,running:`xopc is working`,continue:`Continue`,recent:`Recent conversations`,evidenceCount:`evidence items`,remainingCount:`remaining`,projects:`Long-term projects`,emptyRunning:`No conversations are running`,emptyContinue:`No ongoing items yet`,openChat:`Open conversation`,whyNow:`Why now`,impact:`Impact`,workDone:`AI checked`,recommendation:`Recommendation`,policyReason:`Policy decision`,proposedAction:`Proposed action`,actionStates:{not_authorized:`Suggested only; not authorized for auto-run`,approval_required:`Waiting for your approval`,pending:`Queued to run`,executing:`Running`,completed:`Auto-run completed`,rejected:`Rejected`,failed:`Execution failed`},judgmentReasons:`Why this is recommended`,rejectedAlternatives:`Alternatives not chosen`,uncertainty:`Uncertainty`,snooze:`Tomorrow`,dismiss:`Dismiss`,feedbackPlaceholder:`Tell AI how to judge this kind of event next time…`,applyFeedback:`Update future judgments`,evidence:`Evidence references`,useful:`Useful`,notUseful:`Not useful`,taskStatuses:{pending:`Pending`,planning:`Defining done`,waiting_dependency:`Waiting on dependencies`,running:`In progress`,verifying:`Verifying`,needs_user:`Needs you`,blocked:`Blocked`,paused:`Paused`,completed:`Completed`,cancelled:`Ended`},taskProgress:{title:`xopc owns this task`,open:`View task`,decide:`Review and decide`,evidence:`verified evidence`,statuses:{pending:`Pending`,planning:`Defining done`,waiting_dependency:`Waiting on dependencies`,running:`In progress`,verifying:`Verifying`,needs_user:`Needs you`,blocked:`Needs you`,paused:`Paused`,completed:`Completed`,cancelled:`Ended`}},detailStatuses:{allocating:`Assigning an executor`,captured:`Not scheduled`,ready:`Ready to start`,queued:`Queued`,running:`In progress`,verifying:`Verifying`,waiting:`Waiting`,blocked:`Blocked`,failed:`Execution failed`,cancelled:`Execution cancelled`,needsUser:`Needs your attention`,review:`Ready for review`,completed:`Completed`,ended:`Ended`,paused:`Paused`},detailStatusDescriptions:{allocating:`The task is submitted and a suitable executor is being selected in the background.`,captured:`This task is captured but has not entered the work queue. Schedule it when you are ready.`,ready:`This task is ready for xopc to start.`,queued:`This task is queued and will start when resources are available.`,running:`xopc is currently working on this task.`,verifying:`xopc is checking the result against the completion criteria.`,waiting:`This task is waiting for an external condition.`,blocked:`A blocking condition must be resolved before work can continue.`,failed:`The latest run failed. Review its result before retrying.`,cancelled:`The latest run was cancelled. This task can be started again.`,needsUser:`xopc needs your input or approval before continuing.`,review:`The result is ready for your review.`,completed:`This task is complete and closed.`,ended:`This task has ended and will not continue.`,paused:`Automatic progress and reminders are paused. Other waiting conditions still apply after resuming.`},statusSummary:`Current status`,taskLabel:`Task`,taskDescription:`Description and objective`,editTaskField:`Edit`,saveTaskField:`Save`,cancelTaskField:`Cancel`,noTaskDescription:`Add background, scope, and delivery requirements.`,taskProperties:`Task properties`,taskPhase:`Phase`,priority:`Priority`,dueDate:`Due date`,executorLabel:`Agent`,priorityLabels:{low:`Low priority`,normal:`Normal priority`,high:`High priority`,critical:`Critical`},unassigned:`No assignee`,noDueDate:`No due date`,updatedAt:`Updated {{date}}`,successDefinition:`Definition of done`,taskDefinition:`Task definition`,criteriaProgress:`{{verified}}/{{total}} verified`,taskRelations:`Task relationships`,dependencies:`Dependencies`,dependents:`Dependent tasks`,noDependencies:`No dependencies`,noDependents:`No dependent tasks`,editDependencies:`Edit dependencies`,saveDependencies:`Save relationships`,cancelDependencyEdit:`Cancel`,dependenciesDescription:`xopc starts this task after every selected task is complete.`,linkDependencies:`Link dependencies`,linkedDependencies:`Linked dependencies: {{count}}`,dependencySearchPlaceholder:`Search tasks`,noDependencyMatches:`No matching tasks`,noDependencyCandidates:`There are no other tasks to select`,removeDependency:`Remove dependency: {{task}}`,dependencyUpdateFailed:`Dependencies could not be updated. Refresh and try again.`,expectedOutputs:`Expected outputs`,constraints:`Constraints and boundaries`,approvalRequired:`Your approval is required`,latestResult:`Latest result`,remainingWork:`What remains`,nextAction:`Next action`,yourDecision:`Your one decision`,noRemainingWork:`All completion criteria are covered.`,noDecisionNeeded:`Nothing is needed from you. xopc will keep moving this forward.`,contextUsed:`Context used for this task`,contextSources:`Sources`,contextAssumptions:`Current assumptions`,contextRisks:`Risks`,contextRoleLabels:{input:`Input`,reference:`Reference`,constraint:`Constraint`,deliverable:`Deliverable`,evidence:`Evidence`},contextKindLabels:{document:`Document`,file:`File`,url:`Link`,session:`Conversation`,memory:`Memory`,task:`Task`,artifact:`Artifact`,source:`Source`},currentTask:`Current task`,executionHistory:`Execution history ({{count}})`,receiptStatuses:{succeeded:`Succeeded`,failed:`Failed`,cancelled:`Cancelled`},unresolvedCriteria:`Criteria still to verify`,resultFeedback:`Was this done well?`,doneWell:`Helpful result`,needsFix:`Unhelpful result`,correctionPlaceholder:`Tell xopc what is wrong and what the right task should be`,submitCorrection:`Fix and continue`,feedbackThanks:`Got it. I will use this to improve future work.`,correctionStarted:`Got it. This was reopened and correction has started.`,noDefinition:`xopc is still clarifying the completion criteria. It will not mark this done before they are explicit.`,backToWork:`Back to tasks`,openTaskConversation:`Open conversation`,taskNotFound:`This task was not found`,runTask:`Start working`,scheduleTask:`Schedule work`,scheduleRecurringTask:`Schedule`,approveTask:`Mark complete`,reopenTask:`Reopen`,moreActions:`More actions`,pauseTask:`Pause`,resumeTask:`Continue`,cancelTask:`End task`,cancelActiveRun:`Cancel active run`,deleteTask:`Delete task permanently`,deleteTaskTitle:`Delete this task permanently?`,deleteTaskDescription:`This permanently deletes “{{title}}” and its execution records, context, and receipts. Linked conversations, workspace files, and external artifacts are kept.`,confirmDeleteTask:`Delete permanently`,keepTask:`Keep task`,deleteActiveTaskBlocked:`End the active run before deleting this task permanently.`,actionFailed:`The action failed. Please try again.`,verificationStatuses:{passed:`Verified`,failed:`Verification failed`,unverified:`Not verified`}}}var E=i(e=>({path:null,line:null,projectId:null,conversationId:null,setPath:(t,n,r,i,a)=>{if(t){let e=m.getState().scope;m.getState().openFile({path:t,line:n,projectId:r||void 0,conversationId:i||(e===`new`?void 0:e),agentId:_.getState().agentId||void 0,resultRevision:a})}e({path:t,resultRevision:t?a:void 0,line:t&&typeof n==`number`&&Number.isFinite(n)&&n>0?Math.floor(n):null,projectId:t&&r?.trim()||null,conversationId:t&&i?.trim()||null})}}));function D(e){return`${e.name}\0${e.size}`}function O(e){if(!e)return[];let t=new Set,n=[],r=e=>{if(!e||e.size===0)return;let r=D(e);t.has(r)||(t.add(r),n.push(e))},{files:i}=e;if(i?.length)for(let e=0;e<i.length;e++)r(i.item(e));for(let t of Array.from(e.items??[]))t.kind===`file`&&r(t.getAsFile());return n}var k=n(),A=r();function j(e){let t=(0,k.c)(10),{disabled:n,chat:r,onStart:i}=e,a=v(M),o=r.voiceInput,c;t[0]===a?c=t[1]:(c=y(a).join(`+`),t[0]=a,t[1]=c);let l=`${o} (${c})`,u;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(u=d(`relative inline-flex size-11 sm:size-8 shrink-0 items-center justify-center rounded-lg border border-transparent text-fg-subtle hover:bg-surface-hover hover:text-fg`,g.transition,g.press,g.focusRingPanel,`disabled:cursor-not-allowed disabled:opacity-50`),t[2]=u):u=t[2];let f;t[3]===i?f=t[4]:(f=()=>void i(),t[3]=i,t[4]=f);let p;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,A.jsx)(s,{className:`size-4 stroke-[1.75]`}),t[5]=p):p=t[5];let m;return t[6]!==n||t[7]!==f||t[8]!==l?(m=(0,A.jsx)(`button`,{type:`button`,className:u,disabled:n,title:l,"aria-label":l,onClick:f,children:p}),t[6]=n,t[7]=f,t[8]=l,t[9]=m):m=t[9],m}function M(e){return e.shortcut}function N(e,t){let n=t.trim();if(!n)return e;let r=e.trim();return r?`${r} ${n}`:n}var P=e(t(),1),F=d(`inline-flex min-h-11 min-w-11 shrink-0 gap-2 px-3 items-center justify-center rounded-lg text-fg-muted`,`hover:bg-surface-hover hover:text-fg`,g.transition,g.press,g.focusRingPanel,`disabled:cursor-not-allowed disabled:opacity-50`),I=(0,P.memo)(function(e){let t=(0,k.c)(47),{phase:n,elapsedLabel:r,recordedDictation:i,audioLevel:s,partialTranscript:p,finalTranscript:m,error:h,settingsRequired:g,disabled:_,chat:v,onCancel:y,onConfirm:b,onRetry:x}=e,S=n===`transcribing`,C=n===`requesting`,w=n===`connecting`,T=n===`starting`,E=n===`error`,D=E?h||v.voiceTranscribeFailed:C?v.voiceRequestingMicrophone:w?v.voiceConnectingService:T?v.voiceStartingMicrophone:S?v.voiceTranscribing:i?v.voiceRecordedDictationStatus:v.voiceRecordingStatus,O;t[0]!==m||t[1]!==p?(O=[m,p].filter(Boolean),t[0]=m,t[1]=p,t[2]=O):O=t[2];let j=O.join(` `),M=C||w||T||S,N;t[3]!==s||t[4]!==E||t[5]!==n?(N=n===`recording`?(0,A.jsx)(`div`,{className:`flex h-5 shrink-0 items-center gap-0.5`,"aria-hidden":!0,children:Array.from({length:9},(e,t)=>{let n=.35+(t%4+1)*.16;return(0,A.jsx)(`span`,{className:`w-0.5 rounded-full bg-fg-muted motion-safe:transition-[height] motion-safe:duration-75`,style:{height:Math.max(3,Math.round(18*Math.min(1,s*n+.08)))}},t)})}):E?(0,A.jsx)(o,{className:`size-4 shrink-0 text-danger`,"aria-hidden":!0}):(0,A.jsx)(f,{className:`h-4 w-8`}),t[3]=s,t[4]=E,t[5]=n,t[6]=N):N=t[6];let P=E?`alert`:`status`,I;t[7]!==D||t[8]!==P?(I=(0,A.jsx)(`p`,{className:`min-w-0 flex-1 break-words text-sm text-fg-muted`,role:P,children:D}),t[7]=D,t[8]=P,t[9]=I):I=t[9];let R;t[10]!==r||t[11]!==n?(R=n===`recording`?(0,A.jsx)(`span`,{className:`shrink-0 text-sm tabular-nums text-fg-muted`,children:r}):null,t[10]=r,t[11]=n,t[12]=R):R=t[12];let z;t[13]!==N||t[14]!==I||t[15]!==R?(z=(0,A.jsxs)(`div`,{className:`flex items-center gap-3 px-1`,children:[N,I,R]}),t[13]=N,t[14]=I,t[15]=R,t[16]=z):z=t[16];let B;t[17]===j?B=t[18]:(B=j?(0,A.jsx)(`p`,{className:`max-h-28 overflow-y-auto overscroll-contain whitespace-pre-wrap break-words px-1 text-base text-fg`,children:j}):null,t[17]=j,t[18]=B);let V;t[19]===Symbol.for(`react.memo_cache_sentinel`)?(V=(0,A.jsx)(u,{className:`size-4`,"aria-hidden":!0}),t[19]=V):V=t[19];let H;t[20]!==v.voiceInputCancel||t[21]!==y?(H=(0,A.jsxs)(`button`,{type:`button`,className:F,title:v.voiceInputCancel,"aria-label":v.voiceInputCancel,onClick:y,children:[V,v.voiceInputCancel]}),t[20]=v.voiceInputCancel,t[21]=y,t[22]=H):H=t[22];let U;t[23]!==_||t[24]!==E||t[25]!==v.voiceOpenSettings||t[26]!==v.voiceRetry||t[27]!==x||t[28]!==g?(U=E&&g?(0,A.jsxs)(`a`,{onClick:L,href:`#/settings/capabilities/models?configure=transcription`,className:d(F,`text-accent-fg`),children:[(0,A.jsx)(l,{className:`size-4`,"aria-hidden":!0}),v.voiceOpenSettings]}):E?(0,A.jsxs)(`button`,{type:`button`,className:F,disabled:_,"aria-label":v.voiceRetry,onClick:x,children:[(0,A.jsx)(c,{className:`size-4`,"aria-hidden":!0}),v.voiceRetry]}):null,t[23]=_,t[24]=E,t[25]=v.voiceOpenSettings,t[26]=v.voiceRetry,t[27]=x,t[28]=g,t[29]=U):U=t[29];let W;t[30]!==_||t[31]!==E||t[32]!==m||t[33]!==v.voiceInputConfirm||t[34]!==b||t[35]!==n?(W=n===`recording`||E&&m?(0,A.jsxs)(`button`,{type:`button`,className:d(F,`rounded-full bg-accent text-on-accent hover:bg-accent-hover hover:text-on-accent`),disabled:_,"aria-label":v.voiceInputConfirm,onClick:b,children:[(0,A.jsx)(a,{className:`size-4`,"aria-hidden":!0}),v.voiceInputConfirm]}):null,t[30]=_,t[31]=E,t[32]=m,t[33]=v.voiceInputConfirm,t[34]=b,t[35]=n,t[36]=W):W=t[36];let G;t[37]!==H||t[38]!==U||t[39]!==W?(G=(0,A.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-2`,children:[H,U,W]}),t[37]=H,t[38]=U,t[39]=W,t[40]=G):G=t[40];let K;return t[41]!==v.voiceInput||t[42]!==G||t[43]!==M||t[44]!==z||t[45]!==B?(K=(0,A.jsxs)(`section`,{className:`w-full space-y-3 py-3`,"aria-label":v.voiceInput,"aria-busy":M,children:[z,B,G]}),t[41]=v.voiceInput,t[42]=G,t[43]=M,t[44]=z,t[45]=B,t[46]=K):K=t[46],K});function L(e){!e.metaKey&&!e.ctrlKey&&!e.shiftKey&&e.button===0&&(e.preventDefault(),h(`transcription`))}var R=120*1e3,z=new Map;function B(){return typeof globalThis.crypto?.randomUUID==`function`?globalThis.crypto.randomUUID():`${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`}function V(e){for(let[t,n]of z)n.expiresAt<=e&&z.delete(t)}function H(e,t=Date.now()){V(t);let n=B();return z.set(n,{attachments:e.map(e=>({...e})),expiresAt:t+R}),n}function U(e,t=Date.now()){let n=z.get(e);if(!n)return null;if(n.expiresAt<=t)return z.delete(e),null;if(!n.attachments)return null;let r=n.attachments;return n.attachments=null,r}export{j as a,T as c,w as d,b as f,N as i,x as l,U as n,O as o,S as p,I as r,E as s,H as t,C as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{a as t,i as n,t as r}from"./vendor-react-BOUWij0V.js";import{l as i,p as a}from"./locale-store-cg9cm2EL.js";import{t as o}from"./cn-0WouolD0.js";import{t as s}from"./phone-workspace-store-CC61pIuJ.js";import{n as c}from"./electron-env-DHOGevH3.js";import{a as l}from"./shares-api-CSZqeNL4.js";var u=`xopc:right-workspace:v1`,d={open:!1,tabs:[],activeId:null},f={panes:{},width:0,treeWidth:240,fileTreeOpen:!1,sideTreeOpen:!1};function p(){try{let e=JSON.parse(sessionStorage.getItem(u)||`null`);if(!e||e.version!==1||typeof e.panes!=`object`||!e.panes||e.identity!==i.getState().conversationId||e.gateway!==i.getState().baseUrl)return f;let t={};for(let[n,r]of Object.entries(e.panes)){let e=r;if(!e||!Array.isArray(e.tabs))continue;let i=e.tabs.filter(e=>e&&typeof e.id==`string`&&typeof e.title==`string`&&(e.kind===`file`&&typeof e.path==`string`||e.kind===`sidechat`&&typeof e.sideChatId==`string`||e.kind===`home`||e.kind===`files`));t[n]={open:e.open===!0&&i.length>0,tabs:i,activeId:i.some(t=>t.id===e.activeId)?e.activeId:i[0]?.id??null}}return{...f,panes:t}}catch{return f}}function m(e,t){try{let n=Number(localStorage.getItem(e));return n>0&&Number.isFinite(n)?n:t}catch{return t}}function h(e){try{let t=Object.fromEntries(Object.entries(e.panes).map(([e,t])=>[e,{...t,tabs:t.tabs.filter(e=>e.kind!==`browser`&&(e.kind!==`file`||!e.attachment)).map(e=>({...e}))}]));sessionStorage.setItem(u,JSON.stringify({version:1,identity:i.getState().conversationId,gateway:i.getState().baseUrl,panes:t}))}catch{}}var g=new WeakMap;function _(e){return e?e.id||e.uri?e.id||e.uri:(g.has(e)||g.set(e,crypto.randomUUID()),g.get(e)):``}function v(e){return e.replace(/\\/g,`/`).split(`/`).filter(e=>e!==`.`).join(`/`)}function y(e){let t=e.projectId?`project:${e.projectId}`:e.conversationId?`session:${e.conversationId}`:`agent:${e.agentId??``}`;return JSON.stringify([t,e.path?v(e.path):_(e.attachment)])}var b=a((e,t)=>{let n=(n,r)=>{e(e=>({panes:{...e.panes,[n]:r(e.panes[n]??d)}})),h(t())};return{...p(),width:m(`xopc:workspace-width`,0),treeWidth:m(`xopc:workspace-tree-width`,240),notices:{},setNotice:(t,n)=>e(e=>({notices:{...e.notices,[t]:n}})),fileStatus:{},setFileStatus:(n,r)=>{r&&t().keepFileOpen(n),e(e=>({fileStatus:{...e.fileStatus,[n]:r??``}}))},keepFileOpen:e=>{for(let[r,i]of Object.entries(t().panes))i.tabs.some(t=>t.id===e&&t.kind===`file`&&t.preview)&&n(r,t=>({...t,tabs:t.tabs.map(t=>t.id===e?{...t,preview:!1}:t)}))},scope:`new`,setScope:t=>e({scope:t}),migrateScope:(n,r)=>{let i=t().panes[n];if(!i||n===r)return;let a=t().panes[r]??d,o={...t().panes,[r]:{open:i.open||a.open,tabs:[...a.tabs,...i.tabs.filter(e=>!a.tabs.some(t=>t.id===e.id))],activeId:i.activeId??a.activeId}};delete o[n],e({panes:o,scope:t().scope===n?r:t().scope}),h(t())},openPhone:(e,t,r,i=!0,a=!0)=>{let o=`phone:${e}`;n(r,n=>({open:i||n.open,activeId:i?o:n.activeId,tabs:n.tabs.some(e=>e.id===o)?n.tabs.map(e=>e.id===o?{...e,title:t}:e):[...n.tabs,{id:o,kind:`phone`,phoneSessionId:e,title:t,visitedAt:Date.now()}]})),a&&s.getState().show(e,i,/^[\da-f]{8}-[\da-f-]{27}$/i.test(r)?r:void 0)},openTools:(e=t().scope)=>{let r=crypto.randomUUID();return n(e,e=>{let t=[...e.tabs];return t.splice(Math.max(0,t.findIndex(t=>t.id===e.activeId)+1),0,{id:r,kind:`home`,title:`New tab`,visitedAt:Date.now()}),{open:!0,tabs:t,activeId:r}}),r},openBrowser:(e,r=t().scope,i)=>{let a=t().panes[r]??d,o=a.tabs.find(e=>e.id===a.activeId&&e.kind===`home`)?.id??crypto.randomUUID(),s={id:o,kind:`browser`,title:`Browser`,initialUrl:e,visitedAt:Date.now(),returnTo:i??a.activeId??void 0};return n(r,e=>{let t=[...e.tabs],n=t.findIndex(e=>e.id===o);return n>=0?t[n]=s:t.splice(Math.max(0,t.findIndex(t=>t.id===e.activeId)+1),0,s),{open:!0,activeId:o,tabs:t}}),o},updateBrowserTitle:(e,r)=>{for(let[i,a]of Object.entries(t().panes))a.tabs.some(t=>t.id===e&&t.kind===`browser`&&t.title!==r)&&n(i,t=>({...t,tabs:t.tabs.map(t=>t.id===e?{...t,title:r.slice(0,200)}:t)}))},openFiles:(e=t().scope)=>{let r=t().panes[e]??d,i=r.tabs.find(e=>e.kind===`files`);if(i){t().activate(i.id,e);return}let a=r.tabs.find(e=>e.id===r.activeId&&e.kind===`home`),o=a?.id??crypto.randomUUID();n(e,e=>({open:!0,activeId:o,tabs:a?e.tabs.map(e=>e.id===o?{...e,kind:`files`,title:`Files`}:e):[...e.tabs,{id:o,kind:`files`,title:`Files`,visitedAt:Date.now()}]}))},setOpen:(e,r=t().scope)=>{if(e&&!t().panes[r]?.tabs.length){t().openTools(r);return}n(r,t=>({...t,open:e,activeId:t.activeId??t.tabs[0]?.id??null}))},activate:(e,r=t().scope)=>{let i=t().panes[r]?.tabs.find(t=>t.id===e);i?.kind===`phone`&&(s.getState().setDisplayMode(`docked`),s.getState().show(i.phoneSessionId,!0,/^[\da-f]{8}-[\da-f-]{27}$/i.test(r)?r:void 0)),n(r,t=>({...t,open:!!(e&&t.tabs.some(t=>t.id===e)),activeId:e&&t.tabs.some(t=>t.id===e)?e:t.activeId,tabs:t.tabs.map(t=>t.id===e?{...t,visitedAt:Date.now()}:t)}))},openFile:(e,r=t().scope)=>{let i=t().panes[r]??d,a=i.tabs.find(t=>t.kind===`file`&&(y(t)===y(e)||t.aliases?.includes(y(e)))),o=!a&&e.preview!==!1?i.tabs.find(e=>e.kind===`file`&&e.preview&&!t().fileStatus[e.id]):void 0,s=a?.id??crypto.randomUUID(),c={...a?.kind===`file`?a:{},...e,preview:a?.kind===`file`?a.preview===!0:e.preview!==!1,id:s,kind:`file`,title:e.path?.replace(/\\/g,`/`).split(`/`).pop()||e.attachment?.name||`File`,visitedAt:Date.now(),returnTo:a?.returnTo??(o?o.returnTo:i.activeId??void 0)};return n(r,e=>{let t=[...e.tabs],n=t.findIndex(e=>e.id===s);return n>=0?t[n]=c:o?t[t.findIndex(e=>e.id===o.id)]=c:t.splice(Math.max(0,t.findIndex(t=>t.id===e.activeId)+1),0,c),{open:!0,tabs:t,activeId:s}}),s},addSideChat:(e,t,r,i=!0)=>n(r,n=>{let r=`side:${e}`;if(n.tabs.some(e=>e.id===r))return i?{...n,open:!0,activeId:r}:n;let a=i?n.tabs.findIndex(e=>e.id===n.activeId&&e.kind===`home`):-1,o=[...n.tabs];return a>=0&&o.splice(a,1),o.splice(a>=0?a:Math.max(0,o.findIndex(e=>e.id===n.activeId)+1),0,{id:r,kind:`sidechat`,sideChatId:e,title:t,visitedAt:Date.now()}),{tabs:o,activeId:i?r:n.activeId,open:i||n.open}}),resolveFileIdentity:(e,r)=>{for(let[i,a]of Object.entries(t().panes)){let o=a.tabs.find(t=>t.kind===`file`&&t.id===e);if(!o||o.resourceId===r)continue;let s=a.tabs.find(t=>t.kind===`file`&&t.id!==e&&t.resourceId===r);n(i,n=>!s||t().fileStatus[e]?{...n,tabs:n.tabs.map(t=>t.id===e?{...t,resourceId:r}:t)}:{...n,activeId:n.activeId===e?s.id:n.activeId,tabs:n.tabs.filter(t=>t.id!==e).map(e=>e.id===s.id?{...s,preview:s.preview===!0&&o.preview===!0,aliases:[...new Set([...s.aliases??[],y(o)])],line:o.line??s.line}:e)})}},replaceSideChat:(e,t,r)=>n(r,n=>({...n,activeId:n.activeId===`side:${e}`?`side:${t}`:n.activeId,tabs:n.tabs.map(n=>n.id===`side:${e}`?{...n,id:`side:${t}`,kind:`sidechat`,sideChatId:t}:n)})),remove:(e,r=t().scope)=>n(r,t=>{let n=t.tabs.find(t=>t.id===e),r=t.tabs.filter(t=>t.id!==e),i=r.find(e=>e.id===n?.returnTo)??[...r].sort((e,t)=>t.visitedAt-e.visitedAt)[0];return{...t,open:t.open&&r.length>0,tabs:r,activeId:t.activeId===e?i?.id??null:t.activeId}}),setWidth:t=>{e({width:t});try{localStorage.setItem(`xopc:workspace-width`,String(t))}catch{}},setTreeWidth:n=>{e({treeWidth:Math.max(200,Math.min(320,n))});try{localStorage.setItem(`xopc:workspace-tree-width`,String(t().treeWidth))}catch{}},setTreeOpen:(t,n)=>e(t===`file`?{fileTreeOpen:n}:{sideTreeOpen:n}),reset:()=>{e({panes:{},fileStatus:{},notices:{},scope:`new`}),h(t())}}});i.subscribe((e,t)=>{e.baseUrl!==t.baseUrl||t.conversationId!==void 0&&e.conversationId!==t.conversationId?b.getState().reset():e.conversationId&&!t.conversationId&&b.setState({panes:p().panes})});var x=e(t(),1);function S(){let[e,t]=(0,x.useState)(!1),[n,r]=(0,x.useState)(!1),[i,a]=(0,x.useState)(null),[o,s]=(0,x.useState)(null),[c,u]=(0,x.useState)(null),d=(0,x.useCallback)(e=>{t(!0),u(e),a(null),s(null)},[]),f=(0,x.useCallback)(async e=>{if(!c||n)return null;r(!0),s(null);try{let t=await l({...c,...e});return a(t.payload),t.payload}catch(e){let t=e instanceof Error?e.message:String(e);return s(t),null}finally{r(!1)}},[n,c]),p=(0,x.useCallback)(()=>{a(null),s(null),r(!1),u(null)},[]);return{dialogOpen:e,loading:n,result:i,error:o,pendingParams:c,createShareLink:d,confirmShareLink:f,handleOpenChange:(0,x.useCallback)(e=>{t(e),e||p()},[p])}}var C=e(n(),1);function w(){return c()&&window.electronAPI?.platform===`darwin`}function T(){return c()&&window.electronAPI?.platform===`win32`}function E(){return T()?`windows-preview-viewport`:``}var D=r();function O({expanded:e,children:t}){let n=(0,x.useRef)(null),r=e?n.current?.closest(`.app-main-surface`)??document.querySelector(`.app-main-surface`):null,i=(0,D.jsx)(`div`,{"data-file-preview-expanded":e||void 0,"data-browser-occluder":e||void 0,className:o(`file-preview-surface flex h-full min-h-0 min-w-0 flex-1 flex-col overflow-hidden [&_.markdown-body_h1]:border-b-0! [&_.markdown-body_h2]:border-b-0!`,e&&(r?`absolute inset-0 z-[115]`:`fixed inset-0 z-[115] h-[100dvh] w-screen`),e&&!r&&E()),children:t});return(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(`span`,{ref:n,hidden:!0,"aria-hidden":!0}),e?(0,C.createPortal)(i,r??document.body):i]})}export{S as a,T as i,E as n,d as o,w as r,b as s,O as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{p as e}from"./locale-store-cg9cm2EL.js";var t=e(()=>({connectionState:`idle`,error:null}));function n(e){t.setState(e)}export{t as n,n as t};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/workspace-file-preview-dialog-D0h2yJ3v.js","assets/rolldown-runtime-aKtaBQYM.js","assets/vendor-react-BOUWij0V.js","assets/locale-store-cg9cm2EL.js","assets/messages-eQ2CYlpG.js","assets/use-file-preview-expanded-dhNMHf5b.js","assets/preload-helper-Czpn1I53.js","assets/chunk-KS7C4IRE-CiwuuyV8.js","assets/createLucideIcon-DPHK1VkS.js","assets/app-window-DXFNqt_0.js","assets/check-DUBLcKHA.js","assets/chevron-down-ccbiQQz_.js","assets/copy-Dv6d4Dvw.js","assets/download-Dk-ZjtO6.js","assets/ellipsis-0k4rZLoy.js","assets/external-link-DjqjBmc3.js","assets/eye-CABVeTq0.js","assets/folder-open-CyzJ19I9.js","assets/link-2-D_ZKYUW7.js","assets/loader-circle-CifKLtgG.js","assets/markdown-view-D1zBWkfB.js","assets/dist-CY7CS_D3.js","assets/es2015-DBLcMg5B.js","assets/dist-CxGUk8J-.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/message-square-plus-XP0tGdlV.js","assets/minimize-2-DtOGrlpo.js","assets/paperclip-f1HujQY1.js","assets/pencil-DmIY3Oa-.js","assets/refresh-cw-BRlGaq2w.js","assets/rotate-cw-LIg3Am9S.js","assets/save-DRDABU--.js","assets/search-DA7gz22f.js","assets/skeleton-DzdOeGYz.js","assets/constants-DpkUgykJ.js","assets/session-api-CQlEq0MB.js","assets/gateway-startup-retry-BaaoKBoB.js","assets/attachment-utils-core-BIOUBrpT.js","assets/interaction-BdhHBbYa.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/dist-BuHnPloF.js","assets/floating-ui.dom-seOukHzT.js","assets/share-link-dialog-ztX1WPXG.js","assets/popover-select-CLsphyzA.js","assets/dist-GJ8-1PAx.js","assets/settings-shell-dialog-layer-BU3UuiJr.js","assets/globe-DSSGFWFn.js","assets/button-Cc4hUNTt.js","assets/copy-text-row-CpiRzq4G.js","assets/file-preview-surface-z7_HV0WN.js","assets/phone-workspace-store-CC61pIuJ.js","assets/shares-api-CSZqeNL4.js","assets/theme-store-GZQ3pTgy.js","assets/middleware-Pd0e8Igk.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{l as a,m as o,t 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{a as d,i as f,n as p,o as m,r as h,s as g,t as _}from"./dist-CY7CS_D3.js";import{t as v}from"./calendar-clock-D-quYVPe.js";import{t as y}from"./check-DUBLcKHA.js";import{t as b}from"./chevron-down-ccbiQQz_.js";import{t as x}from"./chevron-right-BweFrslA.js";import{t as S}from"./circle-alert-BEjgurr2.js";import{t as C}from"./circle-check-C23XjkUj.js";import{t as w}from"./circle-pause-CN9jYH2s.js";import{t as T}from"./clock-3-DnrAnuyZ.js";import{t as E}from"./external-link-DjqjBmc3.js";import{t as D}from"./history-DXH_9jsE.js";import{F as O,M as k,t as A}from"./markdown-view-D1zBWkfB.js";import{t as j}from"./message-circle-Badhj-4D.js";import{t as M}from"./paperclip-f1HujQY1.js";import{t as N}from"./plus-Q2yW6OE7.js";import{t as P}from"./refresh-cw-BRlGaq2w.js";import{t as F}from"./search-DA7gz22f.js";import{t as ee}from"./settings-2-D-csvaET.js";import{t as I}from"./sparkles-DHlfQFAF.js";import{t as L}from"./x-B_N4OPjy.js";import{t as R}from"./cn-0WouolD0.js";import{t as z}from"./skeleton-DzdOeGYz.js";import{s as B}from"./tasks-BTLabOMp.js";import{i as V}from"./vendor-swr-CdRzEUwF.js";import{C as H,E as U,S as W,_ as G,a as K,b as te,f as q,g as ne,l as re,n as ie,t as ae,u as oe,v as J,w as se,x as ce}from"./use-composer-attachments-CLIrD0mm.js";import{t as Y}from"./button-Cc4hUNTt.js";import{a as le,i as ue,o as de,s as fe}from"./dist-GJ8-1PAx.js";import{a as pe,c as me,f as he,i as ge,l as _e,o as ve,r as ye,t as be}from"./composer-payload-handoff-DBE1mvOS.js";import{t as xe}from"./use-realtime-voice-DDVVlX1R.js";import{t as Se}from"./page-header-store-DU4NnGap.js";import{t as Ce}from"./automation-api-mn8ihWJ_.js";import{t as we}from"./sliding-tab-list-CmcrqRzN.js";import{n as Te,r as Ee}from"./voice-input-shortcut-events-Cc30ZcFy.js";import{n as De}from"./date-formatters-DukWSVwc.js";import{n as Oe}from"./tab-completion-input-CxtEp0aP.js";import{n as ke,r as Ae,t as je}from"./task-input-card-lCMSy6YY.js";var X=n(),Z=e(t(),1);function Me(e,t,n=!1){let[r,i]=(0,Z.useState)(null),[a,o]=(0,Z.useState)(!0),[s,c]=(0,Z.useState)(null),l=(0,Z.useRef)(0),u=(0,Z.useCallback)(async()=>{let t=++l.current;c(null);try{let r=await(n?ne(e,!0):ne(e));t===l.current&&i(r)}catch(e){t===l.current&&c(e instanceof Error?e.message:String(e))}finally{t===l.current&&o(!1)}},[e,n]);return(0,Z.useEffect)(()=>(u(),()=>{l.current++}),[u,t]),(0,Z.useEffect)(()=>{let e,t=1/0,n=n=>{let r=Date.now()+n;r>=t||(window.clearTimeout(e),t=r,e=window.setTimeout(()=>{e=void 0,t=1/0,u()},n))},r=()=>n(100),i=()=>n(750),a=()=>{document.visibilityState===`visible`&&r()},o=[`task-changed-v2`,`task-updated`,`session-created`,`agent-run-started`,`agent-run-ended`,`automation-run-completed`,`home-advisor-updated`,`gateway-realtime-connected`,`realtime-gap`,`focus`],s=[`session-updated`,`session-transcript-updated`];return o.forEach(e=>window.addEventListener(e,r)),s.forEach(e=>window.addEventListener(e,i)),document.addEventListener(`visibilitychange`,a),()=>{o.forEach(e=>window.removeEventListener(e,r)),s.forEach(e=>window.removeEventListener(e,i)),document.removeEventListener(`visibilitychange`,a),window.clearTimeout(e)}},[u]),{home:r,loading:a,loadError:s,setLoadError:c,load:u}}var Q=r(),Ne=12e3;function Pe(e){let t=(0,X.c)(107),{variant:n,inputId:r,inputRef:i,intent:a,labels:o,attachments:s,isDragging:c,attachmentBusy:l,attachmentsFull:u,voice:d,chat:f,cancelAction:p,onIntentChange:m,onPickFiles:h,onRemoveAttachment:g,onPaste:_,onDragOver:v,onDragLeave:y,onDrop:b,onSubmit:x}=e,S=n===`inline`,C;t[0]!==s||t[1]!==a?(C=!!a.trim()||s.length>0,t[0]=s,t[1]=a,t[2]=C):C=t[2];let w=C,T=d.voiceActive&&d.phase!==`error`,E;t[3]!==x||t[4]!==d.voiceActive?(E=e=>{if(d.voiceActive){e.preventDefault();return}x(e)},t[3]=x,t[4]=d.voiceActive,t[5]=E):E=t[5];let D=S?`mx-auto mt-6 w-full overflow-hidden rounded-xl border border-edge bg-surface-base p-2 text-left shadow-surface transition-colors focus-within:border-accent focus-within:ring-2 focus-within:ring-accent/15 sm:mt-8`:`flex min-h-0 flex-1 flex-col`,O;t[6]===D?O=t[7]:(O=R(`relative`,D),t[6]=D,t[7]=O);let k;t[8]!==S||t[9]!==c||t[10]!==o.dropFiles?(k=c?(0,Q.jsx)(`div`,{className:R(`pointer-events-none absolute inset-0 z-10 flex items-center justify-center bg-accent-soft/90 text-sm font-medium text-accent-fg backdrop-blur-[1px]`,S&&`rounded-2xl`),children:o.dropFiles}):null,t[8]=S,t[9]=c,t[10]=o.dropFiles,t[11]=k):k=t[11];let A=!S&&`flex min-h-0 flex-1 flex-col overflow-y-auto px-5 py-4`,j;t[12]===A?j=t[13]:(j=R(A),t[12]=A,t[13]=j);let N=S?`sr-only`:`mb-2 shrink-0 text-sm font-medium text-fg`,P;t[14]!==r||t[15]!==o.intentLabel||t[16]!==N?(P=(0,Q.jsx)(`label`,{htmlFor:r,className:N,children:o.intentLabel}),t[14]=r,t[15]=o.intentLabel,t[16]=N,t[17]=P):P=t[17];let F;t[18]!==l||t[19]!==f||t[20]!==d.audioLevel||t[21]!==d.cancelVoiceInput||t[22]!==d.confirmVoiceInput||t[23]!==d.elapsedLabel||t[24]!==d.error||t[25]!==d.finalTranscript||t[26]!==d.partialTranscript||t[27]!==d.phase||t[28]!==d.recordedDictation||t[29]!==d.retryVoiceInput||t[30]!==d.settingsRequired||t[31]!==d.voiceActive?(F=d.voiceActive?(0,Q.jsx)(ye,{phase:d.phase,elapsedLabel:d.elapsedLabel,recordedDictation:d.recordedDictation,audioLevel:d.audioLevel,partialTranscript:d.partialTranscript,finalTranscript:d.finalTranscript,error:d.error,settingsRequired:d.settingsRequired,disabled:l,chat:f,onCancel:d.cancelVoiceInput,onConfirm:d.confirmVoiceInput,onRetry:d.retryVoiceInput}):null,t[18]=l,t[19]=f,t[20]=d.audioLevel,t[21]=d.cancelVoiceInput,t[22]=d.confirmVoiceInput,t[23]=d.elapsedLabel,t[24]=d.error,t[25]=d.finalTranscript,t[26]=d.partialTranscript,t[27]=d.phase,t[28]=d.recordedDictation,t[29]=d.retryVoiceInput,t[30]=d.settingsRequired,t[31]=d.voiceActive,t[32]=F):F=t[32];let ee=T&&`hidden`,L=S?`min-h-24 bg-transparent px-3 py-2`:`min-h-32 flex-1 rounded-xl border border-edge bg-surface-base p-3 focus:border-accent focus:ring-2 focus:ring-accent/20`,z;t[33]!==ee||t[34]!==L?(z=R(`w-full resize-none text-sm font-normal leading-6 text-fg outline-none placeholder:text-fg-subtle`,ee,L),t[33]=ee,t[34]=L,t[35]=z):z=t[35];let B;t[36]===m?B=t[37]:(B=e=>m(e.target.value),t[36]=m,t[37]=B);let V=!S,H;t[38]!==r||t[39]!==i||t[40]!==a||t[41]!==o.intentPlaceholder||t[42]!==o.intentSuggestion||t[43]!==m||t[44]!==_||t[45]!==z||t[46]!==B||t[47]!==V?(H=(0,Q.jsx)(Oe,{ref:i,id:r,className:z,value:a,onChange:B,onPaste:_,suggestion:o.intentSuggestion,onAcceptSuggestion:m,onKeyDown:Fe,placeholder:o.intentPlaceholder,maxLength:Ne,autoFocus:V}),t[38]=r,t[39]=i,t[40]=a,t[41]=o.intentPlaceholder,t[42]=o.intentSuggestion,t[43]=m,t[44]=_,t[45]=z,t[46]=B,t[47]=V,t[48]=H):H=t[48];let U=S?`border-b-0 bg-transparent px-3 pb-2 pt-0`:`mt-3 border-b-0 bg-transparent px-0 pb-0`,W;t[49]!==s||t[50]!==g||t[51]!==U?(W=(0,Q.jsx)(ie,{attachments:s,topPadded:!1,onRemove:g,className:U}),t[49]=s,t[50]=g,t[51]=U,t[52]=W):W=t[52];let G;t[53]!==S||t[54]!==a.length||t[55]!==o.shortcut?(G=S?null:(0,Q.jsxs)(`div`,{className:`mt-2 flex shrink-0 items-center justify-between gap-3 text-[11px] text-fg-subtle`,children:[(0,Q.jsx)(`span`,{children:o.shortcut}),(0,Q.jsxs)(`span`,{className:`tabular-nums`,children:[a.length.toLocaleString(),` / `,Ne.toLocaleString()]})]}),t[53]=S,t[54]=a.length,t[55]=o.shortcut,t[56]=G):G=t[56];let K;t[57]!==F||t[58]!==H||t[59]!==W||t[60]!==G||t[61]!==j||t[62]!==P?(K=(0,Q.jsxs)(`div`,{className:j,children:[P,F,H,W,G]}),t[57]=F,t[58]=H,t[59]=W,t[60]=G,t[61]=j,t[62]=P,t[63]=K):K=t[63];let te=S?`border-edge-subtle px-1 pt-2`:`border-edge px-5 py-4`,q;t[64]===te?q=t[65]:(q=R(`flex shrink-0 items-center gap-2 border-t`,te),t[64]=te,t[65]=q);let ne=!S&&`mr-auto`,re;t[66]===ne?re=t[67]:(re=R(`flex items-center gap-1`,ne),t[66]=ne,t[67]=re);let ae=l||u,oe;t[68]===Symbol.for(`react.memo_cache_sentinel`)?(oe=(0,Q.jsx)(M,{className:`size-4`,"aria-hidden":!0}),t[68]=oe):oe=t[68];let J;t[69]!==o.attachTitle||t[70]!==h||t[71]!==ae?(J=(0,Q.jsx)(Y,{type:`button`,variant:`ghost`,className:`size-9 rounded-lg p-0`,disabled:ae,title:o.attachTitle,"aria-label":o.attachTitle,onClick:h,children:oe}),t[69]=o.attachTitle,t[70]=h,t[71]=ae,t[72]=J):J=t[72];let se;t[73]!==l||t[74]!==f||t[75]!==d.startVoiceInput||t[76]!==d.voiceActive?(se=d.voiceActive?null:(0,Q.jsx)(pe,{disabled:l,chat:f,onStart:d.startVoiceInput}),t[73]=l,t[74]=f,t[75]=d.startVoiceInput,t[76]=d.voiceActive,t[77]=se):se=t[77];let ce;t[78]!==re||t[79]!==J||t[80]!==se?(ce=(0,Q.jsxs)(`div`,{className:re,children:[J,se]}),t[78]=re,t[79]=J,t[80]=se,t[81]=ce):ce=t[81];let le;t[82]!==p||t[83]!==S||t[84]!==o.shortcut?(le=S?(0,Q.jsx)(`span`,{className:`hidden text-[11px] text-fg-subtle sm:inline`,children:o.shortcut}):p,t[82]=p,t[83]=S,t[84]=o.shortcut,t[85]=le):le=t[85];let ue=S?`ml-auto h-9 rounded-lg px-3.5 text-xs`:`min-w-32`,de=!w||l||d.voiceActive,fe=S?`size-3.5`:`size-4`,me;t[86]===fe?me=t[87]:(me=(0,Q.jsx)(I,{className:fe,"aria-hidden":!0}),t[86]=fe,t[87]=me);let he;t[88]!==o.submit||t[89]!==ue||t[90]!==de||t[91]!==me?(he=(0,Q.jsxs)(Y,{type:`submit`,variant:`primary`,className:ue,disabled:de,children:[me,o.submit]}),t[88]=o.submit,t[89]=ue,t[90]=de,t[91]=me,t[92]=he):he=t[92];let ge;t[93]!==q||t[94]!==ce||t[95]!==le||t[96]!==he?(ge=(0,Q.jsxs)(`div`,{className:q,children:[ce,le,he]}),t[93]=q,t[94]=ce,t[95]=le,t[96]=he,t[97]=ge):ge=t[97];let _e;return t[98]!==y||t[99]!==v||t[100]!==b||t[101]!==E||t[102]!==K||t[103]!==ge||t[104]!==O||t[105]!==k?(_e=(0,Q.jsxs)(`form`,{onSubmit:E,onDragOver:v,onDragLeave:y,onDrop:b,className:O,children:[k,K,ge]}),t[98]=y,t[99]=v,t[100]=b,t[101]=E,t[102]=K,t[103]=ge,t[104]=O,t[105]=k,t[106]=_e):_e=t[106],_e}function Fe(e){e.key===`Enter`&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),e.currentTarget.form?.requestSubmit())}function Ie(e){let t=(0,X.c)(12),{href:n,children:r,onOpen:i}=e,o=a();if(n&&/^https?:\/\//i.test(n)){let e;return t[0]!==r||t[1]!==n?(e=(0,Q.jsx)(`a`,{href:n,target:`_blank`,rel:`noopener noreferrer`,className:`rounded-sm text-accent-fg hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`,children:r}),t[0]=r,t[1]=n,t[2]=e):e=t[2],e}if(n?.startsWith(`/`)&&!n.startsWith(`//`)){let e=`${o.pathname}${o.search}`,a;t[3]!==n||t[4]!==e?(a=k(e,n),t[3]=n,t[4]=e,t[5]=a):a=t[5];let c;return t[6]!==r||t[7]!==i||t[8]!==a?(c=(0,Q.jsx)(s,{to:a,className:`rounded-sm text-accent-fg hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`,onClick:i,children:r}),t[6]=r,t[7]=i,t[8]=a,t[9]=c):c=t[9],c}let c;return t[10]===r?c=t[11]:(c=(0,Q.jsx)(`span`,{children:r}),t[10]=r,t[11]=c),c}function Le(e){let t=(0,X.c)(6),{opportunity:n,onOpen:r}=e,i=l(Re),a,o;if(t[0]!==i||t[1]!==r||t[2]!==n.evidence||t[3]!==n.evidencePresentation){o=Symbol.for(`react.early_return_sentinel`);bb0:{let e=u(i).projectsPage.home.advisorEvidenceCopy,t=n.evidencePresentation,s=t?.locale===i?t.groups:void 0,c=new Intl.DateTimeFormat(i===`zh`?`zh-CN`:`en`,{dateStyle:`medium`,timeStyle:`short`}),l=t=>(0,Q.jsx)(`ul`,{className:`mt-2 space-y-3 border-l border-edge pl-3 text-xs leading-5 text-fg-muted`,children:t.map(t=>{let n=!!(t.href&&(/^https?:\/\//i.test(t.href)||t.href.startsWith(`/`)&&!t.href.startsWith(`//`)));return(0,Q.jsxs)(`li`,{className:`min-w-0 [overflow-wrap:anywhere]`,children:[(0,Q.jsxs)(`p`,{className:`text-fg-subtle`,children:[e.sources[t.sourceType],` · `,(0,Q.jsx)(`time`,{dateTime:new Date(t.observedAt).toISOString(),children:c.format(t.observedAt)})]}),(0,Q.jsx)(`p`,{className:`mt-1 whitespace-pre-wrap`,children:t.observation}),(0,Q.jsx)(`p`,{className:`mt-1`,children:n?(0,Q.jsx)(Ie,{href:t.href,onOpen:r,children:e.openSource}):e.noSource})]},t.id)})}),d=(t,r)=>(0,Q.jsxs)(`li`,{className:`min-w-0 [overflow-wrap:anywhere]`,children:[(0,Q.jsx)(`p`,{className:`text-fg-muted`,children:t.summary}),(0,Q.jsxs)(`details`,{className:`mt-1`,children:[(0,Q.jsxs)(`summary`,{className:`min-h-9 cursor-pointer rounded-sm py-2 text-fg-subtle focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`,children:[e.originals,` · `,e.sourceCount.replace(`{{count}}`,String(t.evidenceIds.length))]}),l(n.evidence.filter(e=>t.evidenceIds.includes(e.id)))]})]},r);if(!s){o=(0,Q.jsxs)(`div`,{className:`mt-2 text-xs leading-5 text-fg-muted`,children:[(0,Q.jsx)(`p`,{children:e.unavailable}),(0,Q.jsxs)(`details`,{children:[(0,Q.jsx)(`summary`,{className:`min-h-9 cursor-pointer rounded-sm py-2 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`,children:e.originals}),l(n.evidence)]})]});break bb0}a=(0,Q.jsxs)(`div`,{className:`mt-2 text-xs leading-5`,children:[(0,Q.jsx)(`p`,{className:`mb-3 text-fg-subtle`,children:e.aiNote}),(0,Q.jsx)(`ul`,{className:`space-y-3 border-l border-edge pl-3`,children:s.slice(0,3).map(d)}),s.length>3?(0,Q.jsxs)(`details`,{className:`mt-2`,children:[(0,Q.jsx)(`summary`,{className:`min-h-9 cursor-pointer rounded-sm py-2 text-fg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`,children:e.more.replace(`{{count}}`,String(s.length-3))}),(0,Q.jsx)(`ul`,{className:`space-y-3 border-l border-edge pl-3`,children:s.slice(3).map(d)})]}):null]})}t[0]=i,t[1]=r,t[2]=n.evidence,t[3]=n.evidencePresentation,t[4]=a,t[5]=o}else a=t[4],o=t[5];return o===Symbol.for(`react.early_return_sentinel`)?a:o}function Re(e){return e.language}function $(e){let t=(0,X.c)(4),{label:n,onClick:r}=e,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,Q.jsx)(D,{className:`size-3.5`,"aria-hidden":!0}),t[0]=i):i=t[0];let a;return t[1]!==n||t[2]!==r?(a=(0,Q.jsxs)(`button`,{type:`button`,className:`inline-flex min-h-9 items-center gap-1.5 rounded-lg px-2 text-xs font-medium text-fg-muted transition-colors duration-150 hover:bg-surface-hover hover:text-fg focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`,onClick:r,children:[i,n]}),t[1]=n,t[2]=r,t[3]=a):a=t[3],a}function ze(e){let t=(0,X.c)(63),{opportunity:n,copy:r,onOpenHistory:i}=e,a,o,s,c,l,u;if(t[0]!==r.aiLabel||t[1]!==r.automationAction||t[2]!==r.automationHint||t[3]!==r.history||t[4]!==r.minutes||t[5]!==r.needsSetup||t[6]!==r.why||t[7]!==i||t[8]!==n.capabilities||t[9]!==n.continuation||t[10]!==n.estimatedMinutes||t[11]!==n.outcome||t[12]!==n.rationale||t[13]!==n.title){let e=n.capabilities.filter(Be),d;t[20]===r.aiLabel?d=t[21]:(d=(0,Q.jsx)(`span`,{children:r.aiLabel}),t[20]=r.aiLabel,t[21]=d);let f;t[22]!==r.minutes||t[23]!==n.estimatedMinutes?(f=n.estimatedMinutes?(0,Q.jsxs)(`span`,{className:`inline-flex items-center gap-1`,children:[(0,Q.jsx)(T,{className:`size-3.5`,"aria-hidden":!0}),n.estimatedMinutes,` `,r.minutes]}):null,t[22]=r.minutes,t[23]=n.estimatedMinutes,t[24]=f):f=t[24];let p;t[25]!==d||t[26]!==f?(p=(0,Q.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 text-xs text-fg-subtle`,children:[d,f]}),t[25]=d,t[26]=f,t[27]=p):p=t[27];let m;t[28]!==r.history||t[29]!==i?(m=(0,Q.jsx)($,{label:r.history,onClick:i}),t[28]=r.history,t[29]=i,t[30]=m):m=t[30],t[31]!==m||t[32]!==p?(a=(0,Q.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[p,m]}),t[31]=m,t[32]=p,t[33]=a):a=t[33],t[34]===n.title?o=t[35]:(o=(0,Q.jsx)(`h3`,{className:`mt-3 text-xl font-semibold leading-7 tracking-tight text-fg`,children:n.title}),t[34]=n.title,t[35]=o),t[36]===n.outcome?s=t[37]:(s=(0,Q.jsx)(`p`,{className:`mt-2 text-sm leading-6 text-fg-muted`,children:n.outcome}),t[36]=n.outcome,t[37]=s);let h;t[38]===r.why?h=t[39]:(h=(0,Q.jsxs)(`span`,{className:`font-medium text-fg`,children:[r.why,`:`]}),t[38]=r.why,t[39]=h),t[40]!==n.rationale||t[41]!==h?(c=(0,Q.jsxs)(`p`,{className:`mt-4 text-sm leading-6 text-fg-muted`,children:[h,n.rationale]}),t[40]=n.rationale,t[41]=h,t[42]=c):c=t[42],t[43]!==r.automationAction||t[44]!==r.automationHint||t[45]!==n.continuation?(l=n.continuation?.kind===`automation`?(0,Q.jsxs)(`div`,{className:`mt-4 flex flex-col gap-3 rounded-xl border border-edge bg-surface-subtle p-3 sm:flex-row sm:items-center sm:justify-between`,children:[(0,Q.jsx)(`p`,{className:`text-xs leading-5 text-fg-muted`,children:r.automationHint}),(0,Q.jsx)(`a`,{href:`#${n.continuation.href}`,className:`inline-flex min-h-11 shrink-0 items-center rounded-lg px-3 text-xs font-medium text-accent hover:bg-accent-soft focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`,children:r.automationAction})]}):null,t[43]=r.automationAction,t[44]=r.automationHint,t[45]=n.continuation,t[46]=l):l=t[46],u=e.length>0?(0,Q.jsx)(`div`,{className:`mt-4 flex flex-wrap gap-2`,"aria-label":r.needsSetup,children:e.map(e=>(0,Q.jsxs)(`a`,{href:`#${e.recoveryPath??`/settings`}`,className:`rounded-full border border-accent/25 bg-accent-soft px-2.5 py-1 text-xs text-accent hover:border-accent/50`,children:[r.needsSetup,` · `,e.capability]},`${e.kind}:${e.capability}`))}):null,t[0]=r.aiLabel,t[1]=r.automationAction,t[2]=r.automationHint,t[3]=r.history,t[4]=r.minutes,t[5]=r.needsSetup,t[6]=r.why,t[7]=i,t[8]=n.capabilities,t[9]=n.continuation,t[10]=n.estimatedMinutes,t[11]=n.outcome,t[12]=n.rationale,t[13]=n.title,t[14]=a,t[15]=o,t[16]=s,t[17]=c,t[18]=l,t[19]=u}else a=t[14],o=t[15],s=t[16],c=t[17],l=t[18],u=t[19];let d;t[47]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,Q.jsx)(b,{className:`size-3.5 transition-transform group-open:rotate-180`,"aria-hidden":!0}),t[47]=d):d=t[47];let f;t[48]===r.evidence?f=t[49]:(f=(0,Q.jsxs)(`summary`,{className:`flex min-h-9 cursor-pointer list-none items-center gap-1.5 text-xs font-medium text-fg-muted hover:text-fg focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`,children:[r.evidence,d]}),t[48]=r.evidence,t[49]=f);let p;t[50]===n?p=t[51]:(p=(0,Q.jsx)(Le,{opportunity:n}),t[50]=n,t[51]=p);let m;t[52]!==f||t[53]!==p?(m=(0,Q.jsxs)(`details`,{className:`mt-4 group`,children:[f,p]}),t[52]=f,t[53]=p,t[54]=m):m=t[54];let h;return t[55]!==a||t[56]!==m||t[57]!==o||t[58]!==s||t[59]!==c||t[60]!==l||t[61]!==u?(h=(0,Q.jsxs)(Q.Fragment,{children:[a,o,s,c,l,u,m]}),t[55]=a,t[56]=m,t[57]=o,t[58]=s,t[59]=c,t[60]=l,t[61]=u,t[62]=h):h=t[62],h}function Be(e){return e.readiness!==`ready`}function Ve(e){let t=(0,X.c)(142),{advisor:n,copy:r,busy:i,onRefresh:a,onAction:o,onFeedback:s,onClarification:c,onOpenHistory:l,preflight:u,receipt:d}=e,[f,p]=(0,Z.useState)(),m;t[0]!==n.alternatives||t[1]!==n.primary||t[2]!==n.state?(m=n.state===`ready`?[n.primary,...n.alternatives]:[],t[0]=n.alternatives,t[1]=n.primary,t[2]=n.state,t[3]=m):m=t[3];let h=m,g;t[4]!==h||t[5]!==f?(g=h.find(e=>e.id===f)??h[0],t[4]=h,t[5]=f,t[6]=g):g=t[6];let _=g,v;t[7]===h[0]?.id?v=t[8]:(v=()=>p(h[0]?.id),t[7]=h[0]?.id,t[8]=v);let y=h[0]?.id,x;if(t[9]!==n.state||t[10]!==y?(x=[n.state,y],t[9]=n.state,t[10]=y,t[11]=x):x=t[11],(0,Z.useEffect)(v,x),n.state===`disabled`)return null;if(d){let e;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Q.jsx)(C,{className:`size-5 shrink-0 text-success`,"aria-hidden":!0}),t[12]=e):e=t[12];let n;t[13]===d.title?n=t[14]:(n=(0,Q.jsx)(`p`,{className:`text-sm font-semibold text-fg`,children:d.title}),t[13]=d.title,t[14]=n);let i;t[15]===d.detail?i=t[16]:(i=(0,Q.jsx)(`p`,{className:`mt-1 text-xs leading-5 text-fg-muted`,children:d.detail}),t[15]=d.detail,t[16]=i);let a;t[17]!==n||t[18]!==i?(a=(0,Q.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[n,i]}),t[17]=n,t[18]=i,t[19]=a):a=t[19];let o;t[20]!==r.history||t[21]!==l?(o=(0,Q.jsx)($,{label:r.history,onClick:l}),t[20]=r.history,t[21]=l,t[22]=o):o=t[22];let s=`#${d.href}`,c;t[23]!==r.viewProgress||t[24]!==s?(c=(0,Q.jsx)(Y,{asChild:!0,variant:`secondary`,className:`min-h-10 text-xs`,children:(0,Q.jsx)(`a`,{href:s,children:r.viewProgress})}),t[23]=r.viewProgress,t[24]=s,t[25]=c):c=t[25];let u;t[26]!==o||t[27]!==c?(u=(0,Q.jsxs)(`div`,{className:`flex shrink-0 items-center gap-1`,children:[o,c]}),t[26]=o,t[27]=c,t[28]=u):u=t[28];let f;return t[29]!==u||t[30]!==a?(f=(0,Q.jsx)(`section`,{className:`mt-7 rounded-2xl border border-success/25 bg-success-soft px-5 py-4`,role:`status`,children:(0,Q.jsxs)(`div`,{className:`flex flex-col gap-3 sm:flex-row sm:items-center`,children:[e,a,u]})}),t[29]=u,t[30]=a,t[31]=f):f=t[31],f}if(n.state===`quiet`||n.state===`refreshing`)return null;if(n.state===`clarification`){let e;t[32]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Q.jsx)(I,{className:`size-4`,"aria-hidden":!0}),t[32]=e):e=t[32];let a;t[33]===r.aiLabel?a=t[34]:(a=(0,Q.jsxs)(`div`,{className:`flex items-center gap-2 text-xs font-medium text-accent`,children:[e,r.aiLabel]}),t[33]=r.aiLabel,t[34]=a);let o;t[35]!==r.history||t[36]!==l?(o=(0,Q.jsx)($,{label:r.history,onClick:l}),t[35]=r.history,t[36]=l,t[37]=o):o=t[37];let s;t[38]!==a||t[39]!==o?(s=(0,Q.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[a,o]}),t[38]=a,t[39]=o,t[40]=s):s=t[40];let u;t[41]===n.question.question?u=t[42]:(u=(0,Q.jsx)(`h3`,{id:`home-advisor-question`,className:`mt-3 text-lg font-semibold text-fg`,children:n.question.question}),t[41]=n.question.question,t[42]=u);let d;if(t[43]!==n.question.options||t[44]!==n.question.question||t[45]!==i||t[46]!==c){let e;t[48]!==n.question.question||t[49]!==i||t[50]!==c?(e=e=>(0,Q.jsx)(Y,{type:`button`,variant:`secondary`,className:`min-h-11`,disabled:i,onClick:()=>c(n.question.question,e.label),children:e.label},e.id),t[48]=n.question.question,t[49]=i,t[50]=c,t[51]=e):e=t[51],d=n.question.options.map(e),t[43]=n.question.options,t[44]=n.question.question,t[45]=i,t[46]=c,t[47]=d}else d=t[47];let f;t[52]===d?f=t[53]:(f=(0,Q.jsx)(`div`,{className:`mt-4 flex flex-wrap gap-2`,children:d}),t[52]=d,t[53]=f);let p;return t[54]!==u||t[55]!==f||t[56]!==s?(p=(0,Q.jsxs)(`section`,{className:`mt-7 rounded-2xl border border-accent/25 bg-surface-base px-5 py-5`,"aria-labelledby":`home-advisor-question`,children:[s,u,f]}),t[54]=u,t[55]=f,t[56]=s,t[57]=p):p=t[57],p}if(!_)return null;let S=u?.opportunityId===_.id?u.value:void 0,w;t[58]!==n.stale||t[59]!==r.refreshing?(w=n.stale?(0,Q.jsxs)(`p`,{className:`mb-3 inline-flex items-center gap-2 text-xs text-accent`,children:[(0,Q.jsx)(P,{className:`size-3.5 animate-spin`,"aria-hidden":!0}),r.refreshing]}):null,t[58]=n.stale,t[59]=r.refreshing,t[60]=w):w=t[60];let T;t[61]!==r||t[62]!==l||t[63]!==_?(T=(0,Q.jsx)(ze,{opportunity:_,copy:r,onOpenHistory:l}),t[61]=r,t[62]=l,t[63]=_,t[64]=T):T=t[64];let E;t[65]!==i||t[66]!==r.configure||t[67]!==r.degradedStart||t[68]!==r.setupHint||t[69]!==r.setupTitle||t[70]!==o||t[71]!==_||t[72]!==S?(E=S?.state===`needs_setup`?(0,Q.jsx)(`div`,{className:`mt-5 rounded-xl border border-accent/25 bg-accent-soft/40 p-4`,role:`alert`,"aria-live":`polite`,children:(0,Q.jsxs)(`div`,{className:`flex gap-3`,children:[(0,Q.jsx)(ee,{className:`mt-0.5 size-4 shrink-0 text-accent`,"aria-hidden":!0}),(0,Q.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,Q.jsx)(`p`,{className:`text-sm font-semibold text-fg`,children:r.setupTitle}),(0,Q.jsx)(`p`,{className:`mt-1 text-xs leading-5 text-fg-muted`,children:r.setupHint}),(0,Q.jsx)(`ul`,{className:`mt-2 space-y-1 text-xs leading-5 text-fg-muted`,children:S.blockers.map(He)}),(0,Q.jsxs)(`div`,{className:`mt-3 flex flex-wrap gap-2`,children:[S.recoveryActions.map(e=>(0,Q.jsxs)(`a`,{href:`#${e.href}`,className:`inline-flex min-h-11 items-center rounded-lg border border-accent/30 px-3 text-xs font-medium text-accent hover:bg-accent-soft focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`,children:[r.configure,` · `,e.capability]},e.capability)),S.degradedAction?(0,Q.jsx)(Y,{type:`button`,variant:`secondary`,className:`min-h-11`,disabled:i,onClick:()=>o(_,`degraded_start`),children:r.degradedStart}):null]})]})]})}):null,t[65]=i,t[66]=r.configure,t[67]=r.degradedStart,t[68]=r.setupHint,t[69]=r.setupTitle,t[70]=o,t[71]=_,t[72]=S,t[73]=E):E=t[73];let D;t[74]!==i||t[75]!==r.start||t[76]!==o||t[77]!==_?(D=_.actions.canStart?(0,Q.jsxs)(Y,{type:`button`,variant:`primary`,className:`min-h-11`,disabled:i,onClick:()=>o(_,`start`),children:[(0,Q.jsx)(I,{className:`size-4`,"aria-hidden":!0}),r.start]}):null,t[74]=i,t[75]=r.start,t[76]=o,t[77]=_,t[78]=D):D=t[78];let O;t[79]!==i||t[80]!==r.discuss||t[81]!==o||t[82]!==_?(O=_.actions.canDiscuss?(0,Q.jsxs)(Y,{type:`button`,variant:`secondary`,className:`min-h-11`,disabled:i,onClick:()=>o(_,`discuss`),children:[(0,Q.jsx)(j,{className:`size-4`,"aria-hidden":!0}),r.discuss]}):null,t[79]=i,t[80]=r.discuss,t[81]=o,t[82]=_,t[83]=O):O=t[83];let k;t[84]!==O||t[85]!==D?(k=(0,Q.jsxs)(`div`,{className:`mt-5 flex flex-wrap items-center gap-2`,children:[D,O]}),t[84]=O,t[85]=D,t[86]=k):k=t[86];let A;t[87]===Symbol.for(`react.memo_cache_sentinel`)?(A=(0,Q.jsx)(b,{className:`size-3.5`,"aria-hidden":!0}),t[87]=A):A=t[87];let M;t[88]===r.more?M=t[89]:(M=(0,Q.jsxs)(`summary`,{className:`inline-flex min-h-9 cursor-pointer list-none items-center gap-1.5 rounded-lg px-2 text-xs text-fg-muted hover:bg-surface-hover hover:text-fg focus-visible:ring-2 focus-visible:ring-accent`,children:[r.more,A]}),t[88]=r.more,t[89]=M);let N;t[90]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,Q.jsx)(P,{className:`size-4`,"aria-hidden":!0}),t[90]=N):N=t[90];let F;t[91]!==i||t[92]!==r.refresh||t[93]!==a?(F=(0,Q.jsxs)(Y,{type:`button`,variant:`ghost`,className:`min-h-11`,disabled:i,onClick:a,title:r.refresh,children:[N,r.refresh]}),t[91]=i,t[92]=r.refresh,t[93]=a,t[94]=F):F=t[94];let L;t[95]===r.feedback?L=t[96]:(L=(0,Q.jsx)(`summary`,{className:`flex min-h-11 cursor-pointer list-none items-center rounded-lg px-3 text-xs text-fg-muted hover:bg-surface-hover hover:text-fg focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`,children:r.feedback}),t[95]=r.feedback,t[96]=L);let R;t[97]===r.alreadyDone?R=t[98]:(R=[`already_done`,r.alreadyDone],t[97]=r.alreadyDone,t[98]=R);let z;t[99]===r.irrelevant?z=t[100]:(z=[`irrelevant`,r.irrelevant],t[99]=r.irrelevant,t[100]=z);let B;t[101]===r.later?B=t[102]:(B=[`too_early`,r.later],t[101]=r.later,t[102]=B);let V;t[103]===r.sourceIncorrect?V=t[104]:(V=[`source_incorrect`,r.sourceIncorrect],t[103]=r.sourceIncorrect,t[104]=V);let H;t[105]===r.lessLikeThis?H=t[106]:(H=[`less_like_this`,r.lessLikeThis],t[105]=r.lessLikeThis,t[106]=H);let U;t[107]!==R||t[108]!==z||t[109]!==B||t[110]!==V||t[111]!==H?(U=[R,z,B,V,H],t[107]=R,t[108]=z,t[109]=B,t[110]=V,t[111]=H,t[112]=U):U=t[112];let W=U,G;t[113]!==i||t[114]!==s||t[115]!==_||t[116]!==W?(G=(0,Q.jsx)(`div`,{className:`absolute right-0 z-20 mt-1 w-44 rounded-xl border border-edge bg-surface-overlay p-1 shadow-float`,children:W.map(e=>{let[t,n]=e;return(0,Q.jsx)(`button`,{type:`button`,disabled:i,className:`min-h-10 w-full rounded-lg px-3 text-left text-sm text-fg-muted hover:bg-surface-hover hover:text-fg`,onClick:()=>s(_,t),children:n},t)})}),t[113]=i,t[114]=s,t[115]=_,t[116]=W,t[117]=G):G=t[117];let K;t[118]!==L||t[119]!==G?(K=(0,Q.jsxs)(`details`,{className:`relative`,children:[L,G]}),t[118]=L,t[119]=G,t[120]=K):K=t[120];let te;t[121]!==F||t[122]!==K?(te=(0,Q.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[F,K]}),t[121]=F,t[122]=K,t[123]=te):te=t[123];let q;t[124]!==i||t[125]!==r.alternatives||t[126]!==h||t[127]!==_.id?(q=h.length>1?(0,Q.jsxs)(`div`,{className:`border-t border-edge-subtle pt-2`,children:[(0,Q.jsx)(`p`,{className:`text-xs font-medium text-fg-subtle`,children:r.alternatives}),(0,Q.jsx)(`div`,{className:`mt-2 flex flex-wrap gap-2`,children:h.filter(e=>e.id!==_.id).map(e=>(0,Q.jsx)(`button`,{type:`button`,disabled:i,className:`min-h-10 rounded-lg border border-edge px-3 text-left text-sm text-fg-muted hover:bg-surface-hover hover:text-fg`,onClick:()=>p(e.id),children:e.title},e.id))})]}):null,t[124]=i,t[125]=r.alternatives,t[126]=h,t[127]=_.id,t[128]=q):q=t[128];let ne;t[129]!==M||t[130]!==te||t[131]!==q?(ne=(0,Q.jsxs)(`details`,{className:`mt-1`,children:[M,te,q]}),t[129]=M,t[130]=te,t[131]=q,t[132]=ne):ne=t[132];let re;t[133]!==k||t[134]!==ne||t[135]!==w||t[136]!==T||t[137]!==E?(re=(0,Q.jsxs)(`div`,{className:`px-5 py-5 sm:px-6`,children:[w,T,E,k,ne]}),t[133]=k,t[134]=ne,t[135]=w,t[136]=T,t[137]=E,t[138]=re):re=t[138];let ie;return t[139]!==r.aiLabel||t[140]!==re?(ie=(0,Q.jsx)(`section`,{className:`mt-7 rounded-2xl border border-accent/25 bg-surface-base`,"aria-label":r.aiLabel,children:re}),t[139]=r.aiLabel,t[140]=re,t[141]=ie):ie=t[141],ie}function He(e){return(0,Q.jsx)(`li`,{children:e.message},`${e.kind}:${e.capability}`)}var Ue=new Set([`started`,`discussing`,`completed`]);function We(){let e=(0,X.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,Q.jsx)(`div`,{className:`space-y-4`,"aria-busy":!0,children:[0,1,2].map(Ge)}),e[0]=t):t=e[0],t}function Ge(e){return(0,Q.jsxs)(`div`,{className:`space-y-2 rounded-xl border border-edge-subtle p-4`,children:[(0,Q.jsx)(z,{className:`h-4 w-24 rounded`}),(0,Q.jsx)(z,{className:`h-5 w-4/5 rounded`}),(0,Q.jsx)(z,{className:`h-4 w-3/5 rounded`})]},e)}function Ke(e){let t=(0,X.c)(11),{open:n,refreshKey:r,onOpenChange:i,onReevaluate:a}=e,o=l(qe),s=u(o).projectsPage.home,v=c(),[y,x]=(0,Z.useState)(`all`),S;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(S=[],t[0]=S):S=t[0];let[C,w]=(0,Z.useState)(S),[O,A]=(0,Z.useState)(!1),[j,M]=(0,Z.useState)(),N;t[1]===n?N=t[2]:(N=()=>{if(!n)return;let e=!0;return A(!0),M(void 0),G().then(t=>{e&&w(t.items)}).catch(t=>{e&&M(t instanceof Error?t.message:String(t))}).finally(()=>{e&&A(!1)}),()=>{e=!1}},t[1]=n,t[2]=N);let F;t[3]!==n||t[4]!==r?(F=[n,r],t[3]=n,t[4]=r,t[5]=F):F=t[5],(0,Z.useEffect)(N,F);let ee=C.filter(e=>y===`all`||(y===`adopted`?Ue.has(e.status):!Ue.has(e.status))),I=new Intl.DateTimeFormat(o===`zh`?`zh-CN`:`en`,{dateStyle:`medium`}),R=new Intl.DateTimeFormat(o===`zh`?`zh-CN`:`en`,{dateStyle:`medium`,timeStyle:`short`}),z=new Map;for(let e of ee){let t=I.format(new Date(e.updatedAt));z.set(t,[...z.get(t)??[],e])}let B=[...z.entries()],V=e=>e.feedbackKind===`already_done`?s.advisorHistoryStatusCompleted:e.feedbackKind===`irrelevant`?s.advisorHistoryStatusIrrelevant:e.feedbackKind===`source_incorrect`?s.advisorHistoryStatusSourceIncorrect:e.feedbackKind===`less_like_this`?s.advisorHistoryStatusLessLikeThis:{available:s.advisorHistoryStatusAvailable,started:s.advisorHistoryStatusStarted,discussing:s.advisorHistoryStatusDiscussing,completed:s.advisorHistoryStatusCompleted,snoozed:s.advisorHistoryStatusSnoozed,dismissed:s.advisorHistoryStatusDismissed,expired:s.advisorHistoryStatusExpired,superseded:s.advisorHistoryStatusSuperseded}[e.status],H=e=>{if(e.href){i(!1),v(k(`/`,e.href));return}e.status===`discussing`&&(i(!1),v(`/chat/new?${new URLSearchParams({draft:e.opportunity.actionPrompt}).toString()}`))},U;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,Q.jsx)(d,{className:`xopc-dialog-overlay fixed inset-0 z-[80] bg-scrim`}),t[6]=U):U=t[6];let W;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(W=(0,Q.jsx)(D,{className:`mt-0.5 size-5 shrink-0 text-accent`,"aria-hidden":!0}),t[7]=W):W=t[7];let K;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(K=(0,Q.jsx)(L,{className:`size-4`,"aria-hidden":!0}),t[8]=K):K=t[8];let te=O?(0,Q.jsx)(We,{}):j?(0,Q.jsxs)(`div`,{className:`rounded-xl border border-danger/25 bg-danger-soft p-4 text-sm text-danger`,children:[(0,Q.jsx)(`p`,{children:s.advisorHistoryLoadFailed}),(0,Q.jsx)(Y,{type:`button`,variant:`ghost`,className:`mt-2`,onClick:()=>i(!1),children:s.advisorHistoryClose})]}):B.length===0?(0,Q.jsxs)(`div`,{className:`py-16 text-center`,children:[(0,Q.jsx)(D,{className:`mx-auto size-6 text-fg-subtle`,"aria-hidden":!0}),(0,Q.jsx)(`p`,{className:`mt-3 text-sm font-medium text-fg`,children:s.advisorHistoryEmpty}),(0,Q.jsx)(`p`,{className:`mt-1 text-xs leading-5 text-fg-muted`,children:s.advisorHistoryEmptyHint})]}):(0,Q.jsx)(`div`,{className:`space-y-6`,children:B.map(e=>{let[t,n]=e;return(0,Q.jsxs)(`section`,{"aria-label":t,children:[(0,Q.jsx)(`h3`,{className:`mb-2 text-xs font-medium text-fg-subtle`,children:t}),(0,Q.jsx)(`div`,{className:`space-y-2`,children:n.map(e=>{let t=!!e.href||e.status===`discussing`,n=[`snoozed`,`dismissed`,`expired`,`superseded`].includes(e.status);return(0,Q.jsxs)(`article`,{className:`rounded-xl border border-edge-subtle bg-surface-base p-4`,children:[(0,Q.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[(0,Q.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,Q.jsx)(`p`,{className:`text-xs font-medium text-accent`,children:V(e)}),(0,Q.jsx)(`h4`,{className:`mt-1.5 text-sm font-semibold leading-5 text-fg`,children:e.opportunity.title}),(0,Q.jsx)(`p`,{className:`mt-1 text-xs leading-5 text-fg-muted`,children:e.opportunity.outcome})]}),(0,Q.jsx)(`time`,{className:`shrink-0 text-[11px] text-fg-subtle`,dateTime:new Date(e.updatedAt).toISOString(),children:R.format(new Date(e.updatedAt))})]}),e.snoozedUntil?(0,Q.jsxs)(`p`,{className:`mt-2 inline-flex items-center gap-1 text-xs text-fg-muted`,children:[(0,Q.jsx)(T,{className:`size-3.5`,"aria-hidden":!0}),s.advisorHistoryReturnsAt,` `,R.format(new Date(e.snoozedUntil))]}):null,(0,Q.jsxs)(`details`,{className:`group mt-3`,children:[(0,Q.jsxs)(`summary`,{className:`flex min-h-8 cursor-pointer list-none items-center gap-1 text-xs font-medium text-fg-muted hover:text-fg`,children:[s.advisorHistoryEvidence,(0,Q.jsx)(b,{className:`size-3.5 transition-transform duration-200 group-open:rotate-180 motion-reduce:transition-none`,"aria-hidden":!0})]}),(0,Q.jsx)(Le,{opportunity:e.opportunity,onOpen:()=>i(!1)})]}),t||n?(0,Q.jsxs)(`div`,{className:`mt-3 flex flex-wrap gap-2`,children:[t?(0,Q.jsxs)(Y,{type:`button`,variant:`secondary`,className:`min-h-9 text-xs`,onClick:()=>H(e),children:[(0,Q.jsx)(E,{className:`size-3.5`,"aria-hidden":!0}),e.status===`discussing`?s.advisorHistoryContinueDiscussion:s.advisorHistoryViewProgress]}):null,n?(0,Q.jsxs)(Y,{type:`button`,variant:`ghost`,className:`min-h-9 text-xs`,onClick:()=>{i(!1),a()},children:[(0,Q.jsx)(P,{className:`size-3.5`,"aria-hidden":!0}),s.advisorHistoryReevaluate]}):null]}):null]},e.opportunity.id)})})]},t)})}),q;return t[9]===te?q=t[10]:(q=(0,Q.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto px-5 py-4`,children:te}),t[9]=te,t[10]=q),(0,Q.jsx)(_,{open:n,onOpenChange:i,children:(0,Q.jsxs)(m,{children:[U,(0,Q.jsxs)(h,{className:`xopc-drawer-right fixed right-0 top-0 z-[90] flex size-full max-w-lg flex-col overflow-hidden border-l border-edge bg-surface-overlay shadow-popover outline-none`,"aria-describedby":`home-advisor-history-description`,children:[(0,Q.jsxs)(`div`,{className:`flex shrink-0 items-start gap-3 border-b border-edge px-5 py-4`,children:[W,(0,Q.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,Q.jsx)(g,{className:`text-base font-semibold text-fg`,children:s.advisorHistoryTitle}),(0,Q.jsx)(f,{id:`home-advisor-history-description`,className:`mt-1 text-xs leading-5 text-fg-muted`,children:s.advisorHistoryDescription})]}),(0,Q.jsx)(p,{asChild:!0,children:(0,Q.jsx)(Y,{type:`button`,variant:`ghost`,className:`-mr-2 size-9 shrink-0 p-0`,"aria-label":s.advisorHistoryClose,children:K})})]}),(0,Q.jsx)(`div`,{className:`shrink-0 border-b border-edge-subtle px-5 py-3`,children:(0,Q.jsx)(we,{className:`inline-flex rounded-lg bg-surface-inset p-1`,role:`group`,"aria-label":s.advisorHistoryFilterLabel,indicatorClassName:`rounded-md bg-surface-panel shadow-surface`,children:[[`all`,s.advisorHistoryFilterAll],[`adopted`,s.advisorHistoryFilterAdopted],[`other`,s.advisorHistoryFilterOther]].map(e=>{let[t,n]=e;return(0,Q.jsx)(`button`,{type:`button`,className:`min-h-9 rounded-md px-3 text-xs font-medium transition-colors duration-150 ${y===t?`bg-surface-panel text-fg shadow-surface`:`text-fg-muted hover:text-fg`}`,"aria-pressed":y===t,onClick:()=>x(t),children:n},t)})})}),q]})]})})}function qe(e){return e.language}function Je(e,t){return e.replace(`{{count}}`,String(t))}function Ye(e,t){if(e.state===`disabled`)return null;if(e.state===`ready`){let n=1+e.alternatives.length;return{label:Je(t.ready,n),detail:e.primary.title,tone:`accent`,refreshing:!!e.stale}}return e.state===`clarification`?{label:t.clarification,detail:e.question.question,tone:`accent`,refreshing:!1}:e.state===`refreshing`?{label:t.refreshing,detail:e.previous?.title??t.refreshingDetail,tone:`accent`,refreshing:!0}:e.reason===`generation_failed`?{label:t.generationFailed,detail:t.generationFailedDetail,tone:`danger`,refreshing:!1}:e.reason===`budget_exhausted`?{label:t.budgetExhausted,detail:t.budgetExhaustedDetail,tone:`warning`,refreshing:!1}:e.reason===`model_unavailable`?{label:t.modelUnavailable,detail:t.modelUnavailableDetail,tone:`warning`,refreshing:!1}:{label:t.idle,detail:t.idleDetail,tone:`neutral`,refreshing:!1}}var Xe={accent:`bg-accent`,danger:`bg-danger`,neutral:`bg-fg-subtle`,warning:`bg-warning`};function Ze(e){let t=(0,X.c)(50),{advisor:n,busy:r,copy:i,onOpenHistory:a,onRefresh:o}=e,[s,c]=(0,Z.useState)(!1),l;t[0]!==n||t[1]!==i?(l=Ye(n,i),t[0]=n,t[1]=i,t[2]=l):l=t[2];let u=l;if(!u)return null;let d=n.state!==`refreshing`,f=n.state===`ready`?i.findAnother:i.retry,p=`${i.label}:${u.label}`,m;t[3]===u.refreshing?m=t[4]:(m=u.refreshing?(0,Q.jsx)(P,{className:`size-3.5 shrink-0 animate-spin motion-reduce:animate-none`,"aria-hidden":!0}):(0,Q.jsx)(I,{className:`size-3.5 shrink-0`,"aria-hidden":!0}),t[3]=u.refreshing,t[4]=m);let h=Xe[u.tone],g;t[5]===h?g=t[6]:(g=R(`size-1.5 shrink-0 rounded-full`,h),t[5]=h,t[6]=g);let _;t[7]===g?_=t[8]:(_=(0,Q.jsx)(`span`,{className:g,"aria-hidden":!0}),t[7]=g,t[8]=_);let v;t[9]!==i.label||t[10]!==u.label?(v=(0,Q.jsxs)(`span`,{className:`truncate`,children:[i.label,` · `,u.label]}),t[9]=i.label,t[10]=u.label,t[11]=v):v=t[11];let y;t[12]!==p||t[13]!==m||t[14]!==_||t[15]!==v?(y=(0,Q.jsx)(fe,{asChild:!0,children:(0,Q.jsxs)(Y,{type:`button`,variant:`ghost`,className:`h-9 max-w-56 rounded-lg px-2.5`,"aria-label":p,children:[m,_,v]})}),t[12]=p,t[13]=m,t[14]=_,t[15]=v,t[16]=y):y=t[16];let b;t[17]===u.refreshing?b=t[18]:(b=(0,Q.jsx)(`span`,{className:`mt-1 flex size-7 shrink-0 items-center justify-center rounded-lg bg-accent-soft text-accent`,children:u.refreshing?(0,Q.jsx)(P,{className:`size-4 animate-spin motion-reduce:animate-none`,"aria-hidden":!0}):(0,Q.jsx)(I,{className:`size-4`,"aria-hidden":!0})}),t[17]=u.refreshing,t[18]=b);let x;t[19]===u.label?x=t[20]:(x=(0,Q.jsx)(`p`,{className:`font-semibold text-fg`,children:u.label}),t[19]=u.label,t[20]=x);let S;t[21]===u.detail?S=t[22]:(S=(0,Q.jsx)(`p`,{className:`mt-1 text-xs leading-5 text-fg-muted`,children:u.detail}),t[21]=u.detail,t[22]=S);let C;t[23]!==x||t[24]!==S?(C=(0,Q.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[x,S]}),t[23]=x,t[24]=S,t[25]=C):C=t[25];let w;t[26]!==C||t[27]!==b?(w=(0,Q.jsxs)(`div`,{className:`flex items-start gap-3`,children:[b,C]}),t[26]=C,t[27]=b,t[28]=w):w=t[28];let T;t[29]===a?T=t[30]:(T=()=>{c(!1),a()},t[29]=a,t[30]=T);let E;t[31]===Symbol.for(`react.memo_cache_sentinel`)?(E=(0,Q.jsx)(D,{className:`size-3.5`,"aria-hidden":!0}),t[31]=E):E=t[31];let O;t[32]!==i.history||t[33]!==T?(O=(0,Q.jsxs)(Y,{type:`button`,variant:`ghost`,className:`h-9 rounded-lg text-xs`,onClick:T,children:[E,i.history]}),t[32]=i.history,t[33]=T,t[34]=O):O=t[34];let k;t[35]!==r||t[36]!==d||t[37]!==o||t[38]!==f?(k=d?(0,Q.jsxs)(Y,{type:`button`,variant:`secondary`,className:`h-9 rounded-lg text-xs`,disabled:r,onClick:()=>{c(!1),o()},children:[(0,Q.jsx)(P,{className:`size-3.5`,"aria-hidden":!0}),f]}):null,t[35]=r,t[36]=d,t[37]=o,t[38]=f,t[39]=k):k=t[39];let A;t[40]!==O||t[41]!==k?(A=(0,Q.jsxs)(`div`,{className:`mt-4 flex items-center justify-end gap-1 border-t border-edge-subtle pt-3`,children:[O,k]}),t[40]=O,t[41]=k,t[42]=A):A=t[42];let j;t[43]!==w||t[44]!==A?(j=(0,Q.jsx)(le,{children:(0,Q.jsxs)(ue,{side:`bottom`,align:`end`,sideOffset:6,className:`z-[70] w-[min(21rem,calc(100vw-1.5rem))] rounded-xl border border-edge bg-surface-overlay p-4 text-sm text-fg shadow-popover outline-none`,onOpenAutoFocus:Qe,children:[w,A]})}),t[43]=w,t[44]=A,t[45]=j):j=t[45];let M;return t[46]!==s||t[47]!==j||t[48]!==y?(M=(0,Q.jsxs)(de,{open:s,onOpenChange:c,children:[y,j]}),t[46]=s,t[47]=j,t[48]=y,t[49]=M):M=t[49],M}function Qe(e){return e.preventDefault()}var $e=(0,Z.lazy)(()=>i(()=>import(`./workspace-file-preview-dialog-D0h2yJ3v.js`).then(e=>e.n).then(e=>({default:e.WorkspaceFilePreviewPanel})),__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])));function et(e){let t=(0,X.c)(31),{item:n,language:r,primary:i,showNew:a,onOpen:o}=e,s=a!==void 0&&a,c;t[0]===r?c=t[1]:(c=u(r),t[0]=r,t[1]=c);let l=c.projectsPage.home.workbench,d;t[2]===n.title?d=t[3]:(d=(0,Q.jsx)(`p`,{className:`break-words text-sm font-semibold text-fg`,children:n.title}),t[2]=n.title,t[3]=d);let f;t[4]!==l.newDelivery||t[5]!==s?(f=s?(0,Q.jsx)(`span`,{className:`mr-2 font-medium text-accent-fg`,children:l.newDelivery}):null,t[4]=l.newDelivery,t[5]=s,t[6]=f):f=t[6];let p;t[7]===n.completedAt?p=t[8]:(p=new Date(n.completedAt).toISOString(),t[7]=n.completedAt,t[8]=p);let m;t[9]!==n.completedAt||t[10]!==r?(m=De(new Date(n.completedAt),r),t[9]=n.completedAt,t[10]=r,t[11]=m):m=t[11];let h;t[12]!==p||t[13]!==m?(h=(0,Q.jsx)(`time`,{dateTime:p,children:m}),t[12]=p,t[13]=m,t[14]=h):h=t[14];let g;t[15]!==f||t[16]!==h?(g=(0,Q.jsxs)(`p`,{className:`mt-0.5 text-xs text-fg-muted`,children:[f,h]}),t[15]=f,t[16]=h,t[17]=g):g=t[17];let _;t[18]===n.summary?_=t[19]:(_=n.summary?(0,Q.jsx)(`p`,{className:`mt-1 line-clamp-1 break-words text-xs text-fg-muted`,children:n.summary}):null,t[18]=n.summary,t[19]=_);let v;t[20]!==d||t[21]!==g||t[22]!==_?(v=(0,Q.jsxs)(`div`,{className:`min-w-0 flex-1 basis-48`,children:[d,g,_]}),t[20]=d,t[21]=g,t[22]=_,t[23]=v):v=t[23];let y=i?`primary`:`secondary`,b;t[24]!==l.openDelivery||t[25]!==o||t[26]!==y?(b=(0,Q.jsx)(Y,{variant:y,className:`min-h-9 shrink-0 px-2.5 text-xs shadow-none`,onClick:o,children:l.openDelivery}),t[24]=l.openDelivery,t[25]=o,t[26]=y,t[27]=b):b=t[27];let x;return t[28]!==v||t[29]!==b?(x=(0,Q.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3 px-3 py-3 sm:px-4`,children:[v,b]}),t[28]=v,t[29]=b,t[30]=x):x=t[30],x}function tt({view:e,items:t,language:n,onSelect:r,onClose:i,onRead:a,onOpenFull:o,onRestoreFocus:s}){let c=u(n).projectsPage.home,[l,f]=(0,Z.useState)(!1),[v,y]=(0,Z.useState)(!1),[b,x]=(0,Z.useState)(null),S=(0,Z.useRef)(!1),C=e&&e!==`history`?e:null,{data:w,error:T,mutate:E}=V(C?[`home-delivery`,C.id]:null,async()=>{if(!C)return;if(C.kind===`automation`){let{run:e}=await Ce.getRun(C.subjectId);return{kind:`automation`,summary:e.summary}}let e=await J(C.subjectId),t=e.receipts.find(e=>`task:${e.runId}`===C.id);if(!t)throw Error(c.workbench.deliveryFailed);return{kind:`task`,detail:e,receipt:t}},{shouldRetryOnError:!1}),D=w?.kind===`task`||!!w?.summary?.trim();async function O(e){if(!S.current){S.current=!0,f(!0),y(!1);try{e.kind===`automation`&&!e.read&&await Ce.markRunRead(e.subjectId),a(e)}catch{y(!0)}finally{S.current=!1,f(!1)}}}return(0,Q.jsx)(_,{open:e!==null,onOpenChange:e=>{!e&&!S.current&&(y(!1),i())},children:(0,Q.jsxs)(m,{children:[(0,Q.jsx)(d,{className:`xopc-dialog-overlay fixed inset-0 z-[80] bg-scrim`}),(0,Q.jsxs)(h,{className:`xopc-dialog-content fixed left-1/2 top-1/2 z-[90] flex h-[min(36rem,calc(100dvh-2rem))] w-[min(42rem,calc(100vw-2rem))] -translate-x-1/2 -translate-y-1/2 flex-col overflow-hidden rounded-xl border border-edge bg-surface-overlay outline-none`,"aria-describedby":void 0,onCloseAutoFocus:e=>{e.preventDefault(),s()},children:[(0,Q.jsxs)(`header`,{className:`flex shrink-0 items-center justify-between gap-3 border-b border-edge px-4 py-3`,children:[(0,Q.jsx)(g,{className:`truncate text-base font-semibold text-fg`,children:C?.title??c.workbench.deliveryHistory}),(0,Q.jsx)(p,{asChild:!0,children:(0,Q.jsx)(Y,{variant:`ghost`,className:`size-9 p-0`,disabled:l,"aria-label":n===`zh`?`关闭`:`Close`,children:(0,Q.jsx)(L,{className:`size-4`})})})]}),(0,Q.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto px-4 py-3`,children:e===`history`?t.length?(0,Q.jsx)(`div`,{className:`divide-y divide-edge-subtle`,children:t.map(e=>(0,Q.jsx)(et,{item:e,language:n,onOpen:()=>{y(!1),r(e)}},e.id))}):(0,Q.jsx)(`p`,{className:`text-sm text-fg-muted`,children:c.workbench.deliveryEmpty}):T?(0,Q.jsxs)(`div`,{role:`alert`,className:`space-y-2 text-sm text-danger`,children:[(0,Q.jsx)(`p`,{children:c.workbench.deliveryFailed}),(0,Q.jsx)(Y,{variant:`secondary`,onClick:()=>void E(),children:c.retry})]}):w?w.kind===`task`?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(Ae,{content:w.receipt.summary,contentKey:w.receipt.runId,language:n}),(0,Q.jsx)(ke,{evidence:w.receipt.evidence,projectId:w.detail.task.projectId,conversationId:w.detail.conversation.activeConversationId??void 0,language:n,onOpenFile:x}),(0,Q.jsx)(_,{open:b!==null,onOpenChange:e=>{e||x(null)},children:(0,Q.jsxs)(m,{children:[(0,Q.jsx)(d,{className:`fixed inset-0 z-[90] bg-scrim`}),(0,Q.jsxs)(h,{className:`fixed left-1/2 top-1/2 z-[100] flex h-[min(54rem,calc(100dvh-2rem))] w-[min(72rem,calc(100vw-2rem))] -translate-x-1/2 -translate-y-1/2 flex-col overflow-hidden rounded-xl border border-edge bg-surface-panel outline-none`,"aria-describedby":void 0,children:[(0,Q.jsx)(g,{className:`sr-only`,children:b}),(0,Q.jsx)(Z.Suspense,{fallback:(0,Q.jsx)(z,{className:`m-4 min-h-24`}),children:(0,Q.jsx)($e,{filePath:b,projectId:w.detail.task.projectId,conversationId:w.detail.conversation.activeConversationId,onClose:()=>x(null)})})]})]})})]}):w.kind===`automation`&&w.summary?(0,Q.jsx)(A,{content:w.summary}):(0,Q.jsx)(`p`,{className:`text-sm text-fg-muted`,children:c.workbench.noSummary}):(0,Q.jsxs)(`div`,{className:`space-y-3`,"aria-busy":!0,children:[(0,Q.jsx)(z,{className:`h-5 w-2/3`}),(0,Q.jsx)(z,{className:`h-24`})]})}),C?(0,Q.jsxs)(`footer`,{className:`shrink-0 space-y-2 border-t border-edge px-4 py-3`,children:[v?(0,Q.jsx)(`p`,{role:`alert`,className:`text-sm text-danger`,children:c.workbench.readFailed}):null,(0,Q.jsxs)(`div`,{className:`flex flex-wrap justify-end gap-2`,children:[(0,Q.jsx)(Y,{variant:`ghost`,disabled:l,onClick:()=>o(C),children:c.workbench.openFullResult}),(0,Q.jsx)(Y,{variant:`primary`,disabled:!!T||!D||l,onClick:()=>void O(C),children:c.workbench.markRead})]})]}):null]})]})})}async function nt(e,t=`en`){let n=await J(e),r=n.runs.filter(e=>!e.parentRunId).sort((e,t)=>t.queuedAt-e.queuedAt)[0];if(!n.allowedCommands.includes(`start`)||r?.status!==`failed`)throw Error(t===`zh`?`任务状态已变化,暂时无法重试。请刷新并查看当前状态。`:`Task is no longer available for retry. Refresh and review its current state.`);await q(e,{type:`start`,executor:B.parse({...r.executorRef,kind:r.executorKind})},n.task.version)}function rt(e){let t=e.runs.filter(e=>!e.parentRunId).sort((e,t)=>t.queuedAt-e.queuedAt)[0],n=e.conversation?.currentExecutorAgentId??e.task.delegateAgentId,r=n?{kind:`agent`,agentId:n}:t?{...t.executorRef,kind:t.executorKind}:void 0,i=B.safeParse(r);return i.success?i.data:void 0}var it=(0,Z.lazy)(()=>i(()=>import(`./workspace-file-preview-dialog-D0h2yJ3v.js`).then(e=>e.n).then(e=>({default:e.WorkspaceFilePreviewPanel})),__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])));function at({taskId:e,language:t,onComplete:n,onUpdated:r}){let i=t===`zh`,o=a(),c=`${o.pathname}${o.search}`,[l,u]=(0,Z.useState)(),[f,p]=(0,Z.useState)(),[v,y]=(0,Z.useState)(null),[b,x]=(0,Z.useState)(),[S,C]=(0,Z.useState)(!1),w=(0,Z.useRef)(!1),T=(0,Z.useRef)(0),[E,D]=(0,Z.useState)(0);(0,Z.useEffect)(()=>{u(void 0),x(void 0)},[e]),(0,Z.useEffect)(()=>{let t=!0,n=++T.current;return p(void 0),J(e).then(e=>{t&&n===T.current&&!w.current&&u(e)}).catch(e=>{t&&n===T.current&&p(e instanceof Error?e.message:String(e))}),()=>{t=!1}},[e,E]),(0,Z.useEffect)(()=>{let t=()=>{w.current||D(e=>e+1)},n=n=>{n.detail?.taskId===e&&t()};return window.addEventListener(`task-changed-v2`,n),window.addEventListener(`focus`,t),window.addEventListener(`realtime-gap`,t),window.addEventListener(`gateway-realtime-connected`,t),()=>{window.removeEventListener(`task-changed-v2`,n),window.removeEventListener(`focus`,t),window.removeEventListener(`realtime-gap`,t),window.removeEventListener(`gateway-realtime-connected`,t)}},[e]);let k=l?he(l):[],A=l?.task.phase===`review`&&l.allowedCommands.includes(`close`)&&l.waits.length===0&&k.length>0&&k.every(e=>e.status===`passed`),j=l?rt(l):void 0,M=l?.allowedCommands.includes(`start`)&&l.waits.length===0&&j,N=e=>{T.current++,u(e),r?.(e)};async function P(e,t,r=!1){if(!w.current){w.current=!0,T.current++,C(!0),p(void 0);try{let a=await e();N(a);let o=r||l?.task.phase!==`closed`&&a.task.phase===`closed`&&a.task.resolution===`done`;x(o?i?`任务已验收完成。`:`Task accepted.`:t),o&&n()}catch(e){p(e instanceof Error?e.message:String(e))}finally{w.current=!1,C(!1)}}}let F=l?.receipts.filter(e=>l.runs.some(t=>t.id===e.runId&&t.contractVersion===l.task.latestContractVersion)).sort((e,t)=>t.finalizedAt-e.finalizedAt)[0],ee=k.filter(e=>e.status===`passed`).length,I=k.filter(e=>e.status===`failed`).length,L=k.length-ee-I,R=l?.task.contract?.acceptancePolicy===`verified_auto`,B=O(c,e);return(0,Q.jsxs)(`section`,{className:`mt-4 space-y-4 rounded-xl border border-edge bg-surface-panel p-4`,"aria-label":i?`任务结果与处理`:`Task result and actions`,"aria-busy":S,children:[(0,Q.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-2`,children:[(0,Q.jsx)(`h3`,{className:`text-sm font-semibold text-fg`,children:i?`执行结果`:`Result`}),(0,Q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Q.jsx)(Y,{variant:`ghost`,disabled:S,onClick:()=>D(e=>e+1),children:i?`刷新状态`:`Refresh status`}),(0,Q.jsx)(s,{to:B,className:`inline-flex min-h-9 items-center text-xs font-medium text-accent-fg hover:underline`,children:i?`查看任务详情`:`Task details`})]})]}),f?(0,Q.jsx)(`p`,{role:`alert`,className:`text-sm text-danger`,children:f}):null,S?(0,Q.jsx)(`p`,{role:`status`,className:`text-xs text-fg-muted`,children:i?`正在处理…`:`Processing…`}):null,b?(0,Q.jsx)(`p`,{role:`status`,className:`text-sm text-success`,children:b}):null,!l&&!f?(0,Q.jsxs)(`div`,{className:`space-y-3`,"aria-busy":!0,children:[(0,Q.jsx)(z,{className:`h-5 w-1/3`}),(0,Q.jsx)(z,{className:`h-24 w-full`})]}):null,l?(0,Q.jsxs)(Q.Fragment,{children:[F?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`p`,{className:`text-xs text-fg-muted`,children:F.completionVerdict===`achieved`?i?`执行报告已达成目标,请结合依据逐项验收。`:`The run reports the goal achieved. Review the evidence before accepting.`:i?`当前为阶段性结果,尚有工作需要推进。`:`This is a partial result. More work is needed.`}),(0,Q.jsx)(Ae,{content:F.summary,contentKey:`home:${e}:result:${F.runId}`,language:t,previewHeight:180}),F.remainingWork.length>0?(0,Q.jsxs)(`div`,{className:`text-sm text-fg-muted`,children:[(0,Q.jsx)(`p`,{className:`font-medium text-fg`,children:i?`尚待完成`:`Remaining work`}),(0,Q.jsx)(`ul`,{className:`mt-1 list-disc space-y-1 pl-5`,children:F.remainingWork.map((e,t)=>(0,Q.jsx)(`li`,{children:e},t))})]}):null,F.nextAction?(0,Q.jsxs)(`p`,{className:`whitespace-pre-wrap text-sm text-fg-muted`,children:[(0,Q.jsx)(`span`,{className:`font-medium text-fg`,children:i?`下一步:`:`Next step: `}),F.nextAction]}):null,F.judgment?(0,Q.jsxs)(`div`,{className:`space-y-1 text-sm text-fg-muted`,children:[(0,Q.jsx)(`p`,{className:`font-medium text-fg`,children:i?`判断依据`:`Assessment`}),(0,Q.jsx)(`p`,{children:F.judgment.recommendation}),(0,Q.jsx)(`ul`,{className:`list-disc space-y-1 pl-5`,children:F.judgment.reasons.map((e,t)=>(0,Q.jsx)(`li`,{children:e},t))}),F.judgment.uncertainty?(0,Q.jsxs)(`p`,{children:[i?`待确认:`:`Uncertainty: `,F.judgment.uncertainty]}):null]}):null,(0,Q.jsx)(ke,{evidence:F.evidence,projectId:l.task.projectId,conversationId:l.conversation?.activeConversationId,language:t,onOpenFile:y})]}):(0,Q.jsx)(`p`,{className:`text-sm text-fg-muted`,children:i?`当前任务版本暂无执行结果,可先处理等待事项或查看执行进度。`:`No result for the current task version. Resolve pending items or view progress.`}),k.length>0?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsxs)(`h3`,{className:`text-sm font-semibold text-fg`,children:[i?`验收条件`:`Acceptance criteria`,` `,(0,Q.jsxs)(`span`,{className:`font-normal text-fg-muted`,children:[ee,`/`,k.length]})]}),k.map((n,r)=>(0,Q.jsxs)(`div`,{className:`space-y-2 border-t border-edge-subtle pt-3`,children:[(0,Q.jsxs)(`div`,{className:`flex flex-wrap items-start justify-between gap-2`,children:[(0,Q.jsxs)(`div`,{className:`min-w-0 flex-1 text-sm text-fg`,children:[(0,Q.jsx)(`p`,{className:`break-words`,children:n.text}),(0,Q.jsx)(`p`,{className:`mt-1 text-xs text-fg-muted`,children:i?{passed:`已通过`,failed:`未通过`,unverified:`待判定`}[n.status]:{passed:`Passed`,failed:`Failed`,unverified:`Not reviewed`}[n.status]})]}),l.task.phase===`review`&&!R?(0,Q.jsx)(`div`,{className:`flex gap-2`,children:[`passed`,`failed`].map(t=>(0,Q.jsx)(Y,{variant:`secondary`,disabled:S||n.status===t,onClick:()=>void P(()=>H(e,r,t,l.task.version,l.task.latestContractVersion),i?`判定已保存。`:`Review saved.`),children:i?t===`passed`?`确认通过`:`未通过`:t===`passed`?`Mark passed`:`Mark failed`},t))}):null]}),n.note?(0,Q.jsx)(`p`,{className:`whitespace-pre-wrap text-xs leading-5 text-fg-muted`,children:n.note}):null,n.review?.note?(0,Q.jsx)(`p`,{className:`text-xs text-fg-muted`,children:n.review.note}):null,(0,Q.jsx)(ke,{evidence:n.evidence,projectId:l.task.projectId,conversationId:l.conversation?.activeConversationId,language:t,onOpenFile:y})]},r))]}):null,l.waits.length>0?(0,Q.jsxs)(`div`,{className:`space-y-3`,children:[(0,Q.jsx)(`h3`,{className:`text-sm font-semibold text-fg`,children:i?`等待处理`:`Pending items`}),l.waits.map(t=>(0,Q.jsx)(`div`,{children:l.allowedCommands.includes(`resolve_wait`)&&(t.kind===`user_input`||t.kind===`approval`&&typeof t.condition.capability==`string`)&&t.condition.type!==`connection`?(0,Q.jsx)(je,{wait:t,detail:l,zh:i,onUpdated:N}):(0,Q.jsxs)(`div`,{className:`rounded-lg bg-surface-hover p-3 text-sm text-fg-muted`,children:[(0,Q.jsx)(`p`,{children:t.reason}),t.kind===`paused`&&l.allowedCommands.includes(`resolve_wait`)?(0,Q.jsx)(Y,{className:`mt-2`,disabled:S,onClick:()=>void P(()=>q(e,{type:`resolve_wait`,waitId:t.id},l.task.version),i?`已解除暂停,任务状态已更新。`:`Pause resolved. Task status updated.`),children:i?`恢复任务`:`Resume task`}):(0,Q.jsx)(s,{to:typeof t.condition.dependsOnTaskId==`string`?O(c,t.condition.dependsOnTaskId):B,className:`mt-2 inline-flex min-h-9 items-center text-accent-fg hover:underline`,children:i?`查看并处理`:`View and resolve`})]})},t.id))]}):null,l.task.phase===`review`&&!A?(0,Q.jsx)(`p`,{className:`text-xs leading-5 text-fg-muted`,children:i?`尚有 ${L} 项待判定、${I} 项未通过、${l.waits.length} 项等待处理。${R?`此任务需要执行验证;请继续执行以补齐依据和未完成项。`:`查看依据后逐项判定;未通过时可继续执行修正。`}`:`${L} unreviewed, ${I} failed, ${l.waits.length} pending items. ${R?`This task requires execution verification. Continue execution to supply missing evidence.`:`Review the evidence and mark each criterion; continue execution to fix failures.`}`}):null,(0,Q.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[l.task.phase===`review`?(0,Q.jsx)(Y,{variant:`primary`,disabled:S||!A,onClick:()=>void P(()=>q(e,{type:`close`,resolution:`done`},l.task.version),i?`任务已验收完成。`:`Task accepted.`,!0),children:i?`验收完成`:`Accept task`}):null,M?(0,Q.jsx)(Y,{variant:A?`secondary`:`primary`,disabled:S,onClick:()=>void P(()=>q(e,{type:`start`,executor:j},l.task.version),i?`已开始执行,结果将自动更新。`:`Execution started. Results will update automatically.`),children:i?F?`继续执行并验证`:`开始执行`:F?`Continue and verify`:`Start execution`}):null]})]}):null,l&&v?(0,Q.jsx)(_,{open:!0,onOpenChange:e=>{e||y(null)},children:(0,Q.jsxs)(m,{children:[(0,Q.jsx)(d,{className:`fixed inset-0 z-[80] bg-scrim`}),(0,Q.jsxs)(h,{className:`app-main-surface fixed left-1/2 top-1/2 z-[90] flex h-[min(54rem,calc(100dvh-2rem))] w-[min(72rem,calc(100vw-2rem))] -translate-x-1/2 -translate-y-1/2 flex-col overflow-hidden rounded-xl border border-edge bg-surface-panel outline-none`,"aria-describedby":void 0,children:[(0,Q.jsxs)(g,{className:`sr-only`,children:[i?`交付物预览`:`Artifact preview`,` · `,v]}),(0,Q.jsx)(Z.Suspense,{fallback:(0,Q.jsxs)(`div`,{className:`flex-1 space-y-3 p-4`,"aria-busy":!0,children:[(0,Q.jsx)(z,{className:`h-9 w-full`}),(0,Q.jsx)(z,{className:`h-64 w-full`})]}),children:(0,Q.jsx)(it,{filePath:v,projectId:l.task.projectId,conversationId:l.conversation?.activeConversationId,onClose:()=>y(null)})})]})]})}):null]})}function ot(e,t){return e.replace(/\{\{(\w+)\}\}/g,(e,n)=>String(t[n]??``))}var st=`xopc-home-read-deliveries`;function ct(){try{let e=JSON.parse(localStorage.getItem(st)??`[]`);return Array.isArray(e)?e.filter(e=>typeof e==`string`).slice(0,300):[]}catch{return[]}}function lt(){let e=(0,X.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,Q.jsxs)(`div`,{className:`space-y-8`,"aria-busy":!0,children:[(0,Q.jsxs)(`div`,{className:`space-y-3`,children:[(0,Q.jsx)(z,{className:`h-10 w-3/5 rounded-xl`}),(0,Q.jsx)(z,{className:`h-5 w-4/5 rounded-lg`})]}),(0,Q.jsx)(z,{className:`h-64 rounded-2xl`}),(0,Q.jsx)(z,{className:`h-32 rounded-xl`})]}),e[0]=t):t=e[0],t}function ut(e){let t=(0,X.c)(91),{item:n,busy:r,primary:i,dueLabel:a,failureLabel:s,locale:c,onAction:l,onComplete:d,onUpdated:f}=e,[p,m]=o(),h;t[0]===n.openAction?h=t[1]:(h=n.openAction?.type===`open`?/^\/tasks\/([^/?#]+)/.exec(n.openAction.href):null,t[0]=n.openAction,t[1]=h);let g=h,_=n.primaryAction?.type===`task_review`?n.primaryAction.taskId:g?decodeURIComponent(g[1]):void 0,v;t[2]!==_||t[3]!==p?(v=_&&p.get(`reviewTask`)===_,t[2]=_,t[3]=p,t[4]=v):v=t[4];let y=!!v,b;t[5]!==_||t[6]!==p||t[7]!==m?(b=e=>{let t=new URLSearchParams(p);e&&_?t.set(`reviewTask`,_):t.delete(`reviewTask`),m(t)},t[5]=_,t[6]=p,t[7]=m,t[8]=b):b=t[8];let x=b,[S,C]=(0,Z.useState)(!1),w;t[9]===c?w=t[10]:(w=u(c),t[9]=c,t[10]=w);let T=w.projectsPage.home.workbench,E=n.primaryAction?.type===`connector_decision`,D;t[11]!==a||t[12]!==n.dueAt||t[13]!==c?(D=n.dueAt===void 0?null:`${a} ${De(n.dueAt,c)}`,t[11]=a,t[12]=n.dueAt,t[13]=c,t[14]=D):D=t[14];let O=D,k;t[15]!==E||t[16]!==n.summary?(k=E?n.summary.split(`
|
|
3
|
-
`)[0]:n.summary,t[15]=E,t[16]=n.summary,t[17]=k):k=t[17];let A;t[18]!==n.projectName||t[19]!==k?(A=[n.projectName,k].filter(Boolean),t[18]=n.projectName,t[19]=k,t[20]=A):A=t[20];let j=A.join(` · `),M=!!(_&&(n.primaryAction?.type===`task_review`||n.primaryAction?.type===`open`)),N;t[21]!==n.id||t[22]!==n.openAction||t[23]!==n.title||t[24]!==l?(N=n.openAction?(0,Q.jsx)(`button`,{type:`button`,className:`break-words text-left text-sm font-semibold text-fg hover:underline`,onClick:()=>l(n.openAction,n.id),children:n.title}):(0,Q.jsx)(`span`,{className:`break-words text-sm font-semibold text-fg`,children:n.title}),t[21]=n.id,t[22]=n.openAction,t[23]=n.title,t[24]=l,t[25]=N):N=t[25];let P;t[26]!==O||t[27]!==s||t[28]!==n.kind?(P=O||n.kind===`failure`?(0,Q.jsx)(`span`,{className:`rounded bg-warning/10 px-1.5 py-0.5 text-xs text-warning`,children:O??s}):null,t[26]=O,t[27]=s,t[28]=n.kind,t[29]=P):P=t[29];let F;t[30]!==N||t[31]!==P?(F=(0,Q.jsxs)(`div`,{className:`flex flex-wrap items-baseline gap-x-2 gap-y-1`,children:[N,P]}),t[30]=N,t[31]=P,t[32]=F):F=t[32];let ee;t[33]===j?ee=t[34]:(ee=(0,Q.jsx)(`p`,{className:`mt-0.5 line-clamp-2 break-words text-xs text-fg-muted`,children:j}),t[33]=j,t[34]=ee);let I;t[35]!==F||t[36]!==ee?(I=(0,Q.jsxs)(`div`,{className:`min-w-0 flex-1 basis-52`,children:[F,ee]}),t[35]=F,t[36]=ee,t[37]=I):I=t[37];let L;t[38]!==n.primaryAction?.type||t[39]!==c||t[40]!==y||t[41]!==_||t[42]!==x?(L=_&&n.primaryAction?.type===`retry_task`?(0,Q.jsx)(Y,{variant:`ghost`,className:`min-h-9 px-2 text-xs`,"aria-expanded":y,onClick:()=>x(!y),children:c===`zh`?`查看结果与依据`:`View result and evidence`}):null,t[38]=n.primaryAction?.type,t[39]=c,t[40]=y,t[41]=_,t[42]=x,t[43]=L):L=t[43];let R;t[44]!==E||t[45]!==r||t[46]!==M||t[47]!==n.id||t[48]!==n.primaryAction||t[49]!==l||t[50]!==i||t[51]!==y||t[52]!==S||t[53]!==x||t[54]!==T?(R=n.primaryAction?(0,Q.jsx)(Y,{type:`button`,variant:i?`primary`:`secondary`,className:`min-h-9 shrink-0 px-2.5 text-xs shadow-none`,disabled:r,"aria-expanded":E?S:M?y:void 0,onClick:()=>{E?C(ft):M?x(!y):l(n.primaryAction,n.id)},children:E?T.viewScope:n.primaryAction.label}):null,t[44]=E,t[45]=r,t[46]=M,t[47]=n.id,t[48]=n.primaryAction,t[49]=l,t[50]=i,t[51]=y,t[52]=S,t[53]=x,t[54]=T,t[55]=R):R=t[55];let z;t[56]!==L||t[57]!==R?(z=(0,Q.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1`,children:[L,R]}),t[56]=L,t[57]=R,t[58]=z):z=t[58];let B;t[59]!==I||t[60]!==z?(B=(0,Q.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-2`,children:[I,z]}),t[59]=I,t[60]=z,t[61]=B):B=t[61];let V;t[62]!==E||t[63]!==r||t[64]!==n.id||t[65]!==n.primaryAction||t[66]!==n.secondaryActions||t[67]!==n.summary||t[68]!==l||t[69]!==S?(V=E&&S?(0,Q.jsxs)(`div`,{className:`mt-3 space-y-2 rounded-lg bg-surface-inset px-3 py-2`,children:[(0,Q.jsx)(`p`,{className:`whitespace-pre-wrap break-words text-xs text-fg-muted`,children:n.summary}),(0,Q.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,Q.jsx)(Y,{variant:`primary`,disabled:r,onClick:()=>l(n.primaryAction,n.id),children:n.primaryAction?.label}),n.secondaryActions.map(e=>(0,Q.jsx)(Y,{disabled:r,onClick:()=>l(e,n.id),children:e.label},e.label))]})]}):null,t[62]=E,t[63]=r,t[64]=n.id,t[65]=n.primaryAction,t[66]=n.secondaryActions,t[67]=n.summary,t[68]=l,t[69]=S,t[70]=V):V=t[70];let H;t[71]!==E||t[72]!==r||t[73]!==M||t[74]!==n.id||t[75]!==n.secondaryActions||t[76]!==l?(H=!E&&!M&&n.secondaryActions.length?(0,Q.jsx)(`div`,{className:`mt-1 flex flex-wrap gap-1`,children:n.secondaryActions.filter(dt).map(e=>(0,Q.jsx)(Y,{variant:`ghost`,disabled:r,onClick:()=>l(e,n.id),children:e.label},e.label))}):null,t[71]=E,t[72]=r,t[73]=M,t[74]=n.id,t[75]=n.secondaryActions,t[76]=l,t[77]=H):H=t[77];let U;t[78]!==c||t[79]!==d||t[80]!==f||t[81]!==y||t[82]!==_||t[83]!==x?(U=y&&_?(0,Q.jsx)(at,{taskId:_,language:c,onUpdated:f,onComplete:()=>{x(!1),d()}},_):null,t[78]=c,t[79]=d,t[80]=f,t[81]=y,t[82]=_,t[83]=x,t[84]=U):U=t[84];let W;return t[85]!==r||t[86]!==B||t[87]!==V||t[88]!==H||t[89]!==U?(W=(0,Q.jsxs)(`article`,{className:`px-3 py-3 sm:px-4`,"aria-busy":r,children:[B,V,H,U]}),t[85]=r,t[86]=B,t[87]=V,t[88]=H,t[89]=U,t[90]=W):W=t[90],W}function dt(e){return e.type!==`open`}function ft(e){return!e}function pt(e){let t=(0,X.c)(39),{item:n,onAction:r,language:i,onUpdated:a}=e,[o,s]=(0,Z.useState)(!1),c;t[0]===n.openAction?c=t[1]:(c=n.openAction?.type===`open`?/^\/tasks\/([^/?#]+)/.exec(n.openAction.href):null,t[0]=n.openAction,t[1]=c);let l=c,u=l?decodeURIComponent(l[1]):void 0,d;t[2]!==n.backgroundState||t[3]!==n.kind?(d=n.kind===`scheduled`?(0,Q.jsx)(v,{className:`size-4`,"aria-hidden":!0}):n.backgroundState===`paused`?(0,Q.jsx)(w,{className:`size-4`,"aria-hidden":!0}):(0,Q.jsx)(`span`,{className:`size-1.5 rounded-full bg-fg-subtle`,"aria-hidden":!0}),t[2]=n.backgroundState,t[3]=n.kind,t[4]=d):d=t[4];let f=d,p=!n.openAction,m=u?o:void 0,h;t[5]!==n.id||t[6]!==n.openAction||t[7]!==r||t[8]!==u?(h=()=>u?s(mt):n.openAction&&r(n.openAction,n.id),t[5]=n.id,t[6]=n.openAction,t[7]=r,t[8]=u,t[9]=h):h=t[9];let g;t[10]===f?g=t[11]:(g=(0,Q.jsx)(`span`,{className:`flex size-5 shrink-0 items-center justify-center text-fg-muted`,children:f}),t[10]=f,t[11]=g);let _;t[12]===n.title?_=t[13]:(_=(0,Q.jsx)(`span`,{className:`block line-clamp-2 break-words text-sm font-medium text-fg`,children:n.title}),t[12]=n.title,t[13]=_);let y;t[14]!==n.kind||t[15]!==n.summary||t[16]!==n.updatedAt||t[17]!==i?(y=n.kind===`scheduled`?(0,Q.jsx)(`time`,{className:`block text-xs text-fg-muted`,dateTime:new Date(n.updatedAt).toISOString(),children:De(n.updatedAt,i)}):(0,Q.jsx)(`span`,{className:`block truncate text-xs text-fg-muted`,children:n.summary}),t[14]=n.kind,t[15]=n.summary,t[16]=n.updatedAt,t[17]=i,t[18]=y):y=t[18];let b;t[19]!==_||t[20]!==y?(b=(0,Q.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[_,y]}),t[19]=_,t[20]=y,t[21]=b):b=t[21];let S;t[22]===n.openAction?S=t[23]:(S=n.openAction?(0,Q.jsxs)(`span`,{className:`flex shrink-0 items-center gap-0.5 text-xs text-accent-fg`,children:[(0,Q.jsx)(`span`,{children:n.openAction.label}),(0,Q.jsx)(x,{className:`size-3.5`,"aria-hidden":!0})]}):null,t[22]=n.openAction,t[23]=S);let C;t[24]!==S||t[25]!==p||t[26]!==m||t[27]!==h||t[28]!==g||t[29]!==b?(C=(0,Q.jsxs)(`button`,{type:`button`,className:`flex min-h-11 w-full items-center gap-2 rounded-md px-1 py-2 text-left hover:bg-surface-hover focus-visible:ring-2 focus-visible:ring-accent`,disabled:p,"aria-expanded":m,onClick:h,children:[g,b,S]}),t[24]=S,t[25]=p,t[26]=m,t[27]=h,t[28]=g,t[29]=b,t[30]=C):C=t[30];let T;t[31]!==o||t[32]!==i||t[33]!==a||t[34]!==u?(T=u&&o?(0,Q.jsx)(at,{taskId:u,language:i,onUpdated:a,onComplete:()=>s(!1)}):null,t[31]=o,t[32]=i,t[33]=a,t[34]=u,t[35]=T):T=t[35];let E;return t[36]!==C||t[37]!==T?(E=(0,Q.jsxs)(`div`,{children:[C,T]}),t[36]=C,t[37]=T,t[38]=E):E=t[38],E}function mt(e){return!e}function ht(){let e=l(e=>e.language),t=u(e),n=t.projectsPage,r=me(e),i=c(),o=a(),s=Se(e=>e.setPageHeader),v=Se(e=>e.clearPageHeader),[x,C]=(0,Z.useState)(!1),{home:w,loading:T,loadError:E,setLoadError:D,load:O}=Me(e,o.key,!0),A=n.home.workbench,j=(0,Z.useRef)(null),[M,P]=(0,Z.useState)(null),[ee,R]=(0,Z.useState)(ct),z=(0,Z.useRef)(null),[B,V]=(0,Z.useState)(!1),[H,G]=(0,Z.useState)(!1),[q,ne]=(0,Z.useState)(``),ie=(0,Z.useRef)(!1),[J,le]=(0,Z.useState)(),[ue,de]=(0,Z.useState)(!1),[fe,pe]=(0,Z.useState)(null),[he,ye]=(0,Z.useState)(!1),[Ce,we]=(0,Z.useState)(),[Oe,ke]=(0,Z.useState)(!1),[Ae,je]=(0,Z.useState)(0),[X,Ne]=(0,Z.useState)(),[Fe,Ie]=(0,Z.useState)(),[Le,Re]=(0,Z.useState)(!1),$=ae({chat:t.chat}),ze=(0,Z.useRef)(null),Be=xe({disabled:Le,chat:t.chat,onTranscript:e=>{ne(t=>ge(t,e)),window.setTimeout(()=>ze.current?.focus(),0)}}),{phase:He,voiceActive:Ue,startVoiceInput:We,cancelVoiceInput:Ge,confirmVoiceInput:qe,retryVoiceInput:Je}=Be;(0,Z.useEffect)(()=>{if(!X)return;let e=window.setTimeout(()=>Ne(void 0),8e3);return()=>window.clearTimeout(e)},[X]);let Ye=(0,Z.useCallback)(async e=>{if(!(e.length===0||Le)){Re(!0);try{await $.processFiles(e)}finally{Re(!1)}}},[Le,$.processFiles]),Xe=(0,Z.useCallback)(async e=>{let t=ve(e.clipboardData);t.length!==0&&(e.preventDefault(),await Ye(t))},[Ye]),Qe=(0,Z.useCallback)(e=>{e.dataTransfer.types.includes(`Files`)&&(e.preventDefault(),e.dataTransfer.dropEffect=`copy`,$.setIsDragging(!0))},[$.setIsDragging]),$e=(0,Z.useCallback)(e=>{let t=e.relatedTarget;(!(t instanceof Node)||!e.currentTarget.contains(t))&&$.setIsDragging(!1)},[$.setIsDragging]),rt=(0,Z.useCallback)(async e=>{e.preventDefault(),$.setIsDragging(!1),await Ye(Array.from(e.dataTransfer.files))},[$.setIsDragging,Ye]),it=(0,Z.useCallback)(e=>{e.preventDefault();let t=$.wireAttachmentsPayload(),n=t.length>0?be(t):void 0,r=K(q,n,{projectScope:`none`});r&&(G(!1),ne(``),$.clearAttachments(),i(r))},[$.clearAttachments,$.wireAttachmentsPayload,q,i]),at=$.attachments.length>=10,dt={attachTitle:at?ot(t.chat.maxAttachmentsReached,{max:10}):`${t.chat.attachFile} (${$.attachments.length}/10)`,dropFiles:t.chat.dropFiles,intentLabel:r.intentLabel,intentPlaceholder:r.intentPlaceholder,intentSuggestion:r.intentSuggestion,shortcut:n.home.submitShortcut,submit:r.newWork},ft=(0,Z.useMemo)(()=>({label:n.home.advisorStatusLabel,ready:n.home.advisorStatusReady,clarification:n.home.advisorStatusClarification,refreshing:n.home.advisorStatusRefreshing,refreshingDetail:n.home.advisorRefreshing,idle:n.home.advisorStatusIdle,idleDetail:n.home.advisorUnavailableTitle,generationFailed:n.home.advisorStatusGenerationFailed,budgetExhausted:n.home.advisorStatusBudgetExhausted,modelUnavailable:n.home.advisorStatusModelUnavailable,generationFailedDetail:n.home.advisorGenerationFailed,budgetExhaustedDetail:n.home.advisorBudgetExhausted,modelUnavailableDetail:n.home.advisorModelUnavailable,history:n.home.advisorHistory,retry:n.home.retry,findAnother:n.home.advisorRefresh}),[n.home]),mt=(w?.recentDeliveries??[]).map(e=>ee.includes(e.id)?{...e,read:!0}:e),ht=Date.now(),gt=mt.filter(e=>!e.read&&e.completedAt>=ht-10080*6e4),_t=w?.resumable??[],vt=(w?.needsUser.length??0)+(w?.attentionPolicy?.suppressedAttentionCount??0)+(w?.attentionPolicy?.suppressedDecisionCount??0),yt=new Date(ht);yt.setHours(24,0,0,0);let bt=w?.needsUser.filter(e=>e.dueAt!==void 0&&e.dueAt>=ht&&e.dueAt<yt.getTime()).length??0,xt=w?.background??[],St=xt.filter(e=>e.kind!==`scheduled`),Ct=xt.filter(e=>e.kind===`scheduled`),wt=w?.advisor.state===`ready`||w?.advisor.state===`clarification`||!!Ce;(0,Z.useEffect)(()=>{if(!Ce)return;let e=window.setTimeout(()=>we(void 0),8e3);return()=>window.clearTimeout(e)},[Ce]);let Tt=w?vt>0?`attention`:gt.length>0?`delivery`:_t.length>0||St.length>0||w.runningConversations?.length||wt?`resume`:`idle`:void 0,Et=Tt===`idle`,Dt=Et&&!H,Ot=Dt||H,kt=(0,Z.useRef)(Tt),At=(0,Z.useRef)(!1);(0,Z.useLayoutEffect)(()=>{let e=kt.current;if(kt.current=Tt,!e||!Tt||Tt===e||(At.current&&(At.current=!1,document.activeElement===document.body&&j.current?.focus({preventScroll:!0})),window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches))return;let t=j.current?.animate?.([{opacity:.7,transform:`translateY(4px)`},{opacity:1,transform:`translateY(0)`}],{duration:180,easing:`ease-out`});return()=>t?.cancel()},[Tt]),(0,Z.useEffect)(()=>{let e=e=>{(e.key===st||e.key===null)&&R(ct())};return window.addEventListener(`storage`,e),()=>window.removeEventListener(`storage`,e)},[]);let jt=(0,Z.useCallback)(e=>{R(t=>[...new Set([e,...t])].slice(0,300));try{localStorage.setItem(st,JSON.stringify([...new Set([e,...ct()])].slice(0,300)))}catch{}},[]);(0,Z.useEffect)(()=>{!Ot&&Ue&&Ge()},[Ge,Ot,Ue]),(0,Z.useEffect)(()=>{let e=e=>{let t=e.detail?.target;t&&t!==`chat`||!Ot||Le||(e.preventDefault(),He===`recording`?qe():He===`idle`?(ze.current?.focus(),We()):He===`error`&&Je())},t=e=>{let t=e.detail?.target;t&&t!==`chat`||!Ot||!Ue||(e.preventDefault(),Ge(),ze.current?.focus())};return window.addEventListener(Ee,e),window.addEventListener(Te,t),()=>{window.removeEventListener(Ee,e),window.removeEventListener(Te,t)}},[Le,Ge,Ot,qe,Je,We,Ue,He]);let Mt=(0,Z.useCallback)(e=>{e||Ge(),G(e)},[Ge]),Nt=(0,Z.useCallback)((t,n)=>{if(t.type===`open`){i(k(`/`,t.href));return}if(t.type===`task_review`||ie.current)return;ie.current=!0,pe(n);let r=w?.needsUser.findIndex(e=>e.id===n)??-1,a=r<0?void 0:{item:w?.needsUser[r],slot:r};le(void 0),D(null),(async()=>{try{if(t.type===`retry_task`)await nt(t.taskId,e),le({...a,message:e===`zh`?`任务已重新开始,可查看执行进度。`:`Task restarted. View progress.`,href:k(`/`,`/tasks/${encodeURIComponent(t.taskId)}`)});else if(t.type===`connector_decision`)await ce({kind:`connector_approval`,approvalId:t.approvalId},t.decision),le({...a,message:e===`zh`?t.decision===`approve`?`已批准授权,任务状态将自动更新。`:`已拒绝授权。`:t.decision===`approve`?`Permission approved. Task status will update.`:`Permission denied.`});else if(t.type===`retry_run`){let n=await W({kind:t.subjectKind,runId:t.runId});le({...a,message:e===`zh`?`已发起重试,可查看新的执行结果。`:`Retry started. Follow the new execution.`,href:n.conversationId?`/chat/${encodeURIComponent(n.conversationId)}`:`/automations?run=${encodeURIComponent(n.runId)}`})}else t.type===`acknowledge_run`&&(await re({kind:t.subjectKind,runId:t.runId}),le({...a,message:e===`zh`?`已确认此异常,已从待处理事项移除。`:`Issue acknowledged and removed from pending items.`}));At.current=!0,await O()}catch(e){D(e instanceof Error?e.message:String(e))}finally{ie.current=!1,pe(null)}})()},[w,e,O,i]),Pt=(0,Z.useCallback)((t,n)=>{let r=t.task.phase===`closed`&&t.task.resolution===`done`?_e(t):void 0;r&&jt(`task:${r.runId}`),At.current=!0;let i=n?w?.needsUser.findIndex(e=>e.id===n.id):void 0;le({item:n,slot:i,message:e===`zh`?t.task.phase===`closed`?`任务已验收完成。`:`操作已保存,任务状态已更新。`:t.task.phase===`closed`?`Task accepted.`:`Action saved. Task status updated.`,href:k(`/`,`/tasks/${encodeURIComponent(t.task.id)}`)}),O()},[w,e,O,jt]),Ft=(0,Z.useCallback)(()=>{ye(!0),we(void 0),Ie(void 0),D(null),te(e).then(()=>O()).catch(e=>D(e instanceof Error?e.message:String(e))).finally(()=>ye(!1))},[e,O]),It=(0,Z.useCallback)((e,t)=>{ye(!0),D(null),oe(e,t).then(async t=>{if(t.outcome===`needs_setup`){Ie({opportunityId:e.id,value:t.preflight});return}if(Ie(void 0),je(e=>e+1),t.outcome===`task`){we({title:n.home.advisorStartedTitle,detail:ot(n.home.advisorStartedDetail,{title:e.title}),href:k(`/`,t.href)}),await O();return}i(t.href)}).catch(e=>D(e instanceof Error?e.message:String(e))).finally(()=>ye(!1))},[O,i,n.home.advisorStartedDetail,n.home.advisorStartedTitle]),Lt=(0,Z.useCallback)((e,t)=>{ye(!0),we(void 0),Ie(void 0),D(null),se(e,{kind:t,snoozedUntil:t===`too_early`?Date.now()+4320*6e4:void 0}).then(({idempotencyKey:t})=>(Ne({opportunityId:e.id,idempotencyKey:t}),je(e=>e+1),O())).catch(e=>D(e instanceof Error?e.message:String(e))).finally(()=>ye(!1))},[O]),Rt=(0,Z.useCallback)(()=>{if(!X)return;let e=X;Ne(void 0),ye(!0),D(null),U(e.opportunityId,e.idempotencyKey).then(()=>(je(e=>e+1),O())).catch(t=>{Ne(e),D(t instanceof Error?t.message:String(t))}).finally(()=>ye(!1))},[X,O]),zt=(0,Z.useCallback)((e,t)=>{i(`/chat/new?${new URLSearchParams({draft:`${e}\n\n${t}`}).toString()}`)},[i]),Bt=(0,Z.useMemo)(()=>(0,Q.jsxs)(`div`,{className:`flex items-center gap-1`,children:[w&&!Et?(0,Q.jsx)(Ze,{advisor:w.advisor,busy:he,copy:ft,onOpenHistory:()=>ke(!0),onRefresh:Ft}):null,Et?null:(0,Q.jsxs)(Y,{type:`button`,variant:`secondary`,className:`h-9 rounded-lg`,onClick:()=>G(!0),children:[(0,Q.jsx)(N,{className:`size-4`,"aria-hidden":!0}),r.newWork]})]}),[he,ft,r.newWork,w,Et,Ft]);(0,Z.useLayoutEffect)(()=>(s({startExtra:null,main:(0,Q.jsx)(`h1`,{className:`truncate text-base font-semibold tracking-tight text-fg`,children:n.title}),end:Bt}),()=>v()),[v,Bt,s,n.title]);let Vt=e=>{z.current=document.activeElement instanceof HTMLElement?document.activeElement:null,P(e)},Ht=e=>{jt(e.id),P(null),le({message:A.deliverySaved}),O()},Ut=x?w?.needsUser??[]:w?.needsUser.slice(0,2)??[],Wt=vt-Ut.length,Gt=J?.item&&!w?.needsUser.some(e=>e.id===J.item?.id)&&(J.slot??1/0)<2?J.item:void 0,Kt=[...Ut];Gt&&Kt.splice(J?.slot??0,0,Gt);let qt=(w?.runningConversations??[]).map(t=>({id:t.runId,kind:`running`,title:t.title??(e===`zh`?`对话正在执行`:`Conversation in progress`),summary:A.inProgress,updatedAt:t.updatedAt,secondaryActions:[],openAction:{type:`open`,label:A.inProgress,href:`/chat/${encodeURIComponent(t.conversationId)}`}})),Jt=[...St,...qt].sort((e,t)=>t.updatedAt-e.updatedAt),Yt=Tt===`attention`&&!Ce&&!B,Xt=w?.advisor.state===`ready`?w.advisor.primary.title:w?.advisor.state===`clarification`?w.advisor.question.question:void 0,Zt=gt.length>0?(0,Q.jsxs)(`section`,{className:`space-y-2`,"aria-labelledby":`home-delivery-title`,children:[(0,Q.jsxs)(`div`,{className:`flex min-h-9 flex-wrap items-center justify-between gap-x-3`,children:[(0,Q.jsx)(`h2`,{id:`home-delivery-title`,className:`text-base font-semibold text-fg`,children:A.progress}),(0,Q.jsx)(Y,{variant:`ghost`,className:`px-2 text-xs`,onClick:()=>Vt(`history`),children:A.deliveryHistory})]}),(0,Q.jsx)(`div`,{className:`divide-y divide-edge-subtle rounded-xl border border-edge-subtle bg-surface-panel`,children:gt.slice(0,Tt===`attention`?1:3).map((t,n)=>(0,Q.jsx)(et,{item:t,language:e,showNew:!0,primary:Tt===`delivery`&&n===0,onOpen:()=>Vt(t)},t.id))})]}):null,Qt=[{title:A.inProgress,items:Jt.filter(e=>!e.backgroundState&&!e.statusLabel)},{title:A.waiting,items:Jt.filter(e=>e.backgroundState===`waiting`||!e.backgroundState&&e.statusLabel)},{title:A.paused,items:Jt.filter(e=>e.backgroundState===`paused`)},{title:A.scheduled,items:Ct}].filter(e=>e.items.length>0),$t=Tt===`attention`?1:3,en=Qt.length?(0,Q.jsxs)(`section`,{className:`min-w-0 space-y-2`,"aria-labelledby":`home-background-title`,children:[(0,Q.jsx)(`div`,{className:`flex min-h-9 items-center`,children:(0,Q.jsx)(`h2`,{id:`home-background-title`,className:`text-base font-semibold text-fg`,children:A.background})}),(0,Q.jsxs)(`div`,{className:`divide-y divide-edge-subtle rounded-xl border border-edge-subtle bg-surface-panel`,children:[Qt.map(({title:t,items:n})=>(0,Q.jsxs)(`div`,{className:`px-3 py-2`,children:[(0,Q.jsx)(`h3`,{className:`px-1 pt-1 text-xs font-medium text-fg-muted`,children:t}),(0,Q.jsx)(`div`,{className:`divide-y divide-edge-subtle`,children:(ue?n:n.slice(0,$t)).map(t=>(0,Q.jsx)(pt,{item:t,language:e,onAction:Nt,onUpdated:Pt},t.id))})]},t)),Qt.some(({items:e})=>e.length>$t)?(0,Q.jsx)(Y,{variant:`ghost`,className:`w-full justify-start rounded-t-none px-4 text-xs`,"aria-expanded":ue,onClick:()=>de(e=>!e),children:e===`zh`?ue?`收起`:`查看全部 ${Jt.length+Ct.length} 项`:ue?`Show less`:`View all ${Jt.length+Ct.length} items`}):null]})]}):null,tn=vt>0||gt.length>0||_t.length>0||wt;return(0,Q.jsxs)(`div`,{className:`@container/workbench mx-auto flex w-full min-w-0 max-w-7xl flex-1 flex-col px-4 pb-6 pt-3 sm:px-6 lg:px-8`,children:[(0,Q.jsx)(`input`,{ref:$.fileInputRef,type:`file`,multiple:!0,className:`hidden`,onChange:e=>{let t=e.target.files;t&&Ye(Array.from(t)),e.target.value=``}}),(0,Q.jsx)(_,{open:H,onOpenChange:Mt,children:(0,Q.jsxs)(m,{children:[(0,Q.jsx)(d,{className:`xopc-dialog-overlay fixed inset-0 z-[80] bg-scrim backdrop-blur-[2px]`}),(0,Q.jsxs)(h,{className:`xopc-dialog-content fixed left-1/2 top-1/2 z-[90] flex h-[min(31rem,calc(100dvh-1.5rem))] w-[min(36rem,calc(100vw-1.5rem))] -translate-x-1/2 -translate-y-1/2 flex-col overflow-hidden rounded-xl border border-edge bg-surface-overlay shadow-float focus:outline-none`,children:[(0,Q.jsxs)(`div`,{className:`flex shrink-0 items-start gap-4 border-b border-edge px-5 py-4`,children:[(0,Q.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,Q.jsx)(g,{className:`text-base font-semibold text-fg`,children:r.dialogTitle}),(0,Q.jsx)(f,{className:`mt-1 text-sm leading-5 text-fg-muted`,children:r.dialogDescription})]}),(0,Q.jsx)(p,{asChild:!0,children:(0,Q.jsx)(Y,{type:`button`,variant:`ghost`,className:`-mr-2 -mt-1 size-8 shrink-0 rounded-lg p-0`,title:n.cancel,"aria-label":n.cancel,children:(0,Q.jsx)(L,{className:`size-4`,"aria-hidden":!0})})})]}),(0,Q.jsx)(Pe,{variant:`dialog`,inputId:`new-conversation-intent`,inputRef:ze,intent:q,labels:{...dt,submit:r.submit},attachments:$.attachments,isDragging:$.isDragging,attachmentBusy:Le,attachmentsFull:at,voice:Be,chat:t.chat,cancelAction:(0,Q.jsx)(p,{asChild:!0,children:(0,Q.jsx)(Y,{type:`button`,variant:`ghost`,children:n.cancel})}),onIntentChange:ne,onPickFiles:()=>$.fileInputRef.current?.click(),onRemoveAttachment:$.removeAttachment,onPaste:e=>void Xe(e),onDragOver:Qe,onDragLeave:$e,onDrop:e=>void rt(e),onSubmit:it})]})]})}),(0,Q.jsx)(Ke,{open:Oe,refreshKey:Ae,onOpenChange:ke,onReevaluate:Ft}),E?(0,Q.jsxs)(`div`,{role:`alert`,className:`mb-6 flex items-center justify-between gap-3 rounded-xl border border-danger/25 bg-danger-soft px-4 py-3 text-sm text-danger`,children:[(0,Q.jsx)(`span`,{children:E}),(0,Q.jsx)(Y,{type:`button`,variant:`ghost`,className:`h-8 px-2`,onClick:()=>void O(),children:n.home.retry})]}):null,(0,Q.jsx)(tt,{view:M,items:mt,language:e,onSelect:P,onClose:()=>P(null),onRead:Ht,onOpenFull:e=>{P(null),i(k(`/`,e.href))},onRestoreFocus:()=>{(z.current?.isConnected?z.current:j.current)?.focus({preventScroll:!0})}}),(0,Q.jsx)(`div`,{role:`status`,children:J?(0,Q.jsxs)(`div`,{className:`mb-3 flex w-full flex-wrap items-center justify-between gap-2 rounded-lg bg-success-soft px-3 py-1.5 text-xs text-fg`,children:[(0,Q.jsx)(`span`,{children:J.message}),J.href?(0,Q.jsx)(Y,{variant:`ghost`,className:`px-2 py-1 text-xs`,onClick:()=>i(J.href),children:e===`zh`?`查看进展与结果`:`View progress and result`}):null]}):null}),T?(0,Q.jsx)(lt,{}):w?(0,Q.jsxs)(`div`,{ref:j,tabIndex:-1,className:`flex min-h-0 w-full flex-1 flex-col gap-4 outline-none`,children:[vt===0?(0,Q.jsx)(`p`,{className:`text-xs font-medium text-fg-muted`,"aria-live":`polite`,children:A.noAttention}):null,Dt?(0,Q.jsxs)(`section`,{className:`mx-auto flex w-full max-w-[640px] flex-1 flex-col justify-center pb-12 pt-10 text-center sm:pb-20 sm:pt-16`,children:[(0,Q.jsx)(`h2`,{className:`text-2xl font-semibold tracking-tight text-fg sm:text-3xl`,children:A.startTitle}),(0,Q.jsx)(`p`,{className:`mt-2 text-sm leading-6 text-fg-muted`,children:A.startHint}),(0,Q.jsx)(Pe,{variant:`inline`,inputId:`home-conversation-intent`,inputRef:ze,intent:q,labels:{...dt,intentPlaceholder:A.startExample},attachments:$.attachments,isDragging:$.isDragging,attachmentBusy:Le,attachmentsFull:at,voice:Be,chat:t.chat,onIntentChange:ne,onPickFiles:()=>$.fileInputRef.current?.click(),onRemoveAttachment:$.removeAttachment,onPaste:e=>void Xe(e),onDragOver:Qe,onDragLeave:$e,onDrop:e=>void rt(e),onSubmit:it}),(0,Q.jsxs)(`div`,{className:`mt-3 flex flex-wrap justify-center gap-2`,children:[(0,Q.jsxs)(Y,{variant:`ghost`,onClick:()=>window.dispatchEvent(new Event(`open-command-palette`)),children:[(0,Q.jsx)(F,{className:`size-4`,"aria-hidden":!0}),A.findWork]}),(0,Q.jsx)(Y,{variant:`ghost`,onClick:()=>Vt(`history`),children:A.deliveryHistory})]})]}):null,(0,Q.jsxs)(`div`,{className:tn&&en?`grid min-w-0 items-start gap-5 @min-[56rem]/workbench:grid-cols-[minmax(0,1fr)_minmax(17rem,0.57fr)]`:`grid min-w-0 gap-4`,children:[tn?(0,Q.jsxs)(`div`,{className:`min-w-0 space-y-4`,children:[vt>0?(0,Q.jsxs)(`section`,{className:`space-y-2`,"aria-labelledby":`home-needs-user-title`,children:[(0,Q.jsxs)(`div`,{className:`flex min-h-9 flex-wrap items-center gap-2`,children:[(0,Q.jsx)(S,{className:`size-4 text-warning`,"aria-hidden":!0}),(0,Q.jsx)(`h2`,{id:`home-needs-user-title`,className:`text-base font-semibold text-fg`,children:A.attention}),(0,Q.jsx)(`span`,{className:`rounded-md bg-surface-inset px-1.5 py-0.5 text-xs font-medium tabular-nums text-fg-muted`,"aria-live":`polite`,"aria-label":ot(n.home.attentionTitle,{count:vt}),children:vt}),bt>0?(0,Q.jsx)(`span`,{className:`text-xs text-warning`,children:ot(A.dueToday,{count:bt})}):null]}),(0,Q.jsxs)(`div`,{className:`divide-y divide-edge-subtle overflow-hidden rounded-xl border border-edge-subtle bg-surface-panel`,children:[Kt.map((t,i)=>t===Gt?(0,Q.jsxs)(`div`,{className:`flex min-h-16 items-center justify-between gap-3 px-4 py-3 text-sm text-fg-muted`,children:[(0,Q.jsx)(`span`,{children:t.title}),(0,Q.jsx)(y,{className:`size-4 shrink-0 text-success`,"aria-label":e===`zh`?`已处理`:`Handled`})]},t.id):(0,Q.jsx)(ut,{item:t,primary:i===0||i===1&&Kt[0]===Gt,busy:fe!==null,dueLabel:n.home.dueLabel,failureLabel:r.runAttention,locale:e,onAction:Nt,onComplete:()=>void O(),onUpdated:e=>Pt(e,t)},t.id)),x||Wt>0?(0,Q.jsxs)(Y,{variant:`ghost`,className:`w-full justify-start rounded-t-none px-4 text-xs`,"aria-expanded":x,onClick:()=>C(e=>!e),children:[(0,Q.jsx)(b,{className:x?`size-4 rotate-180`:`size-4`,"aria-hidden":!0}),x?A.collapse:ot(A.remaining,{count:Wt})]}):null]})]}):null,Zt,_t.length>0||wt?(0,Q.jsxs)(`section`,{className:`space-y-2`,"aria-labelledby":`home-resume-title`,children:[(0,Q.jsx)(`h2`,{id:`home-resume-title`,className:`flex min-h-9 items-center text-base font-semibold text-fg`,children:A.resume}),_t.length>0?(0,Q.jsx)(`div`,{className:`divide-y divide-edge-subtle rounded-xl border border-edge-subtle bg-surface-panel`,children:_t.slice(0,Tt===`attention`?1:3).map(t=>(0,Q.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3 px-4 py-3`,children:[(0,Q.jsxs)(`div`,{className:`min-w-0 flex-1 basis-48`,children:[(0,Q.jsx)(`p`,{className:`break-words text-sm font-semibold text-fg`,children:t.title}),(0,Q.jsx)(`p`,{className:`mt-0.5 truncate text-xs text-fg-muted`,children:[t.projectName,t.summary||ot(A.lastActive,{time:De(t.updatedAt,e)})].filter(Boolean).join(` · `)})]}),(0,Q.jsx)(Y,{variant:`secondary`,onClick:()=>i(k(`/`,t.href)),children:t.kind===`task`?A.continueTask:A.continueChat})]},`${t.kind}:${t.id}`))}):null,Xt&&Tt===`attention`&&!Ce?(0,Q.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-2 rounded-lg bg-surface-inset px-3 py-1`,children:[(0,Q.jsxs)(`p`,{className:`flex min-w-0 flex-1 items-center gap-2 text-xs text-fg-muted`,children:[(0,Q.jsx)(I,{className:`size-4 shrink-0 text-accent`,"aria-hidden":!0}),(0,Q.jsxs)(`span`,{className:`truncate`,children:[n.home.advisorStatusLabel,` · `,Xt]})]}),(0,Q.jsx)(Y,{variant:`ghost`,"aria-expanded":B,onClick:()=>V(e=>!e),children:B?A.hideSuggestion:A.viewSuggestion})]}):null,wt&&!Yt?(0,Q.jsx)(Ve,{advisor:w.advisor,busy:he,copy:{aiLabel:n.home.advisorAiLabel,why:n.home.advisorWhy,evidence:n.home.advisorEvidence,needsSetup:n.home.advisorNeedsSetup,start:n.home.advisorStart,discuss:n.home.advisorDiscuss,refresh:n.home.advisorRefresh,refreshing:n.home.advisorRefreshing,history:n.home.advisorHistory,viewProgress:n.home.advisorViewProgress,alternatives:n.home.advisorAlternatives,more:A.moreSuggestionActions,feedback:n.home.advisorFeedback,alreadyDone:n.home.advisorAlreadyDone,irrelevant:n.home.advisorIrrelevant,later:n.home.advisorLater,lessLikeThis:n.home.advisorLessLikeThis,sourceIncorrect:n.home.advisorSourceIncorrect,minutes:n.home.advisorMinutes,setupTitle:n.home.advisorSetupTitle,setupHint:n.home.advisorSetupHint,configure:n.home.advisorConfigure,degradedStart:n.home.advisorDegradedStart,automationHint:n.home.advisorAutomationHint,automationAction:n.home.advisorAutomationAction},onRefresh:Ft,onAction:It,onFeedback:Lt,onClarification:zt,onOpenHistory:()=>ke(!0),preflight:Fe,receipt:Ce}):null]}):null]}):null,en]}),!Et&&!Zt&&mt.length>0?(0,Q.jsx)(Y,{variant:`ghost`,className:`self-start px-2 text-xs`,onClick:()=>Vt(`history`),children:A.deliveryHistory}):null]}):null,X?(0,Q.jsxs)(`div`,{role:`status`,className:`fixed bottom-5 left-1/2 z-[100] flex -translate-x-1/2 items-center gap-4 rounded-lg border border-edge bg-surface-overlay px-4 py-3 text-sm text-fg shadow-float`,children:[(0,Q.jsx)(`span`,{children:n.home.advisorFeedbackSaved}),(0,Q.jsx)(`button`,{type:`button`,className:`font-medium text-accent-fg hover:underline`,onClick:Rt,children:n.home.advisorUndo})]}):null]})}export{ht as HomePage};
|