@xopcai/xopc 0.0.474 → 0.0.476
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/manifest.json +1 -1
- package/dist/extensions/telegram/xopc.extension.json +1 -1
- package/dist/gateway/server/chunks.bin +1103 -1067
- package/dist/gateway/server/chunks.json +1 -1
- package/dist/gateway/server/schema.sql +13 -0
- package/dist/gateway/server/upgrades/281_session_agent_reactions.sql +13 -0
- package/dist/gateway/static/root/assets/{activity-store-nD2NH0C7.js → activity-store-BK11iD5x.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-avatar-dicebear-D0JEEj2L.js → agent-avatar-dicebear-DZlgZHm9.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-avatar-display-BxHA8hEW.js → agent-avatar-display-BDHjRaTK.js} +2 -2
- package/dist/gateway/static/root/assets/{agent-defaults-settings-panel-C7O0Aaq3.js → agent-defaults-settings-panel-Bicuh10_.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-plugin-dialog--H7-gWL7.js → agent-plugin-dialog-hRZYhcLp.js} +1 -1
- package/dist/gateway/static/root/assets/{agents-CIcUUuaE.js → agents-C2DH8M4z.js} +3 -3
- package/dist/gateway/static/root/assets/{agents-admin-api-DyeFg0yq.js → agents-admin-api-_mp_Ew1u.js} +1 -1
- package/dist/gateway/static/root/assets/{api-DAWXH9Wf.js → api-D0r-2gWQ.js} +1 -1
- package/dist/gateway/static/root/assets/{api-LSz0L9gc.js → api-oA0NOKLI.js} +1 -1
- package/dist/gateway/static/root/assets/{app-management-settings-panel-CjXfqaEA.js → app-management-settings-panel-BrO0gY6b.js} +1 -1
- package/dist/gateway/static/root/assets/{appearance-settings-0Zl5M7iV.js → appearance-settings-h82Or0g-.js} +1 -1
- package/dist/gateway/static/root/assets/{apps-page-DDVJnHlm.js → apps-page-B9Ho8S53.js} +1 -1
- package/dist/gateway/static/root/assets/{archive-plugin-CMqJbzQ-.js → archive-plugin-Co_oRPj1.js} +1 -1
- package/dist/gateway/static/root/assets/{automation-api-DHGtNfOT.js → automation-api-CxLFngqe.js} +1 -1
- package/dist/gateway/static/root/assets/{automation-result-state-DUBlVnPg.js → automation-result-state-CjiuyW-C.js} +1 -1
- package/dist/gateway/static/root/assets/{automation-run-list-CuWKRWy0.js → automation-run-list-CLjSIujK.js} +1 -1
- package/dist/gateway/static/root/assets/{automation-task-card-Y4vC_7qq.js → automation-task-card-BS-RT312.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-page-DBQyHgFW.js → automations-page-BL6ASYrU.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-workspace-DRCt4lq0.js → automations-workspace-BFk-AF43.js} +2 -2
- package/dist/gateway/static/root/assets/{binary-plugins-CMKEp-IB.js → binary-plugins-5GVlyrXg.js} +1 -1
- package/dist/gateway/static/root/assets/{block-editor-CQwjLxA9.js → block-editor-Dtz8JtrO.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-settings-page-BA0i0h3v.js → browser-settings-page-CDUHHu0n.js} +1 -1
- package/dist/gateway/static/root/assets/capabilities-Clwtvm7F.js +1 -0
- package/dist/gateway/static/root/assets/{capabilities--EoyYsa8.js → capabilities-DFRrPT_I.js} +1 -1
- package/dist/gateway/static/root/assets/{capabilities-page-B5Ja0Knr.js → capabilities-page-D9EpUcuB.js} +2 -2
- package/dist/gateway/static/root/assets/{capabilities-settings-panel-C5WmcgqD.js → capabilities-settings-panel-ComYXaP1.js} +2 -2
- package/dist/gateway/static/root/assets/{channels-BQPomrMC.js → channels-Aa2Iun4r.js} +1 -1
- package/dist/gateway/static/root/assets/{chat-agents-api-DI0TksSO.js → chat-agents-api-B-47bqbd.js} +1 -1
- package/dist/gateway/static/root/assets/{chat-chart-block-CNm3uFNf.js → chat-chart-block-DA2S21y2.js} +1 -1
- package/dist/gateway/static/root/assets/chat-page-BbahuZ59.js +72 -0
- package/dist/gateway/static/root/assets/{chat-terminal-dock-D1DkoN9Y.js → chat-terminal-dock-BALrP7_l.js} +1 -1
- package/dist/gateway/static/root/assets/{chunk-KS7C4IRE-CiwuuyV8.js → chunk-KS7C4IRE-BPb7KheU.js} +2 -2
- package/dist/gateway/static/root/assets/{command-palette-api-DZt3IZKz.js → command-palette-api-BbSsGD48.js} +1 -1
- package/dist/gateway/static/root/assets/{composer-model-config-control-_doimXGR.js → composer-model-config-control-BFC8jNyK.js} +1 -1
- package/dist/gateway/static/root/assets/{composer-notifications-BE40dFxM.js → composer-notifications-Drbl5lKS.js} +1 -1
- package/dist/gateway/static/root/assets/{composer-payload-handoff-DMWTIrnl.js → composer-payload-handoff-DKLokix8.js} +1 -1
- package/dist/gateway/static/root/assets/{computer-settings-page-DJiToD0s.js → computer-settings-page-CVWaJ3L8.js} +1 -1
- package/dist/gateway/static/root/assets/{connected-providers-grid-CYWTW8cv.js → connected-providers-grid-NZP4qb6S.js} +1 -1
- package/dist/gateway/static/root/assets/{connection-usage-guide-QgwPzjZb.js → connection-usage-guide-BNoFtMol.js} +1 -1
- package/dist/gateway/static/root/assets/{connector-service-page-DkQsU_yu.js → connector-service-page-CzrdJ4JY.js} +1 -1
- package/dist/gateway/static/root/assets/{connectors-api-Bqac6cVg.js → connectors-api-KA6rkOJX.js} +1 -1
- package/dist/gateway/static/root/assets/{connectors-page-DSCQw53B.js → connectors-page-BUqNvStL.js} +1 -1
- package/dist/gateway/static/root/assets/{date-picker-B0J_jDfr.js → date-picker-DgTDENzF.js} +1 -1
- package/dist/gateway/static/root/assets/{date-time-picker-Zr3u7nL1.js → date-time-picker-Gw4oSOk9.js} +1 -1
- package/dist/gateway/static/root/assets/{dependency-picker-CLD0xbpi.js → dependency-picker-BJDpQtKY.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-CfQHdCjf.js → desktop-pet-BbIPYbvc.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-settings-wlYidCpI.js → desktop-pet-settings-Cqzplufb.js} +1 -1
- package/dist/gateway/static/root/assets/{dev-view-store-DM2X7oYZ.js → dev-view-store-CXE5-Egp.js} +1 -1
- package/dist/gateway/static/root/assets/{device-pairing-wizard-DIjBN08k.js → device-pairing-wizard-DXFZiWMi.js} +1 -1
- package/dist/gateway/static/root/assets/{directory-picker-path-field-BJj6gT1z.js → directory-picker-path-field-DVFEzTAJ.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-authoritative-grants-DC9q_s91.js → extension-authoritative-grants-DAfeCx4B.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-debug-page-DBLJqOJ2.js → extension-debug-page-gW4GEEcj.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-iframe-host-DCdjl257.js → extension-iframe-host-DOPywUKI.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-marketplace-api-BEulqVpr.js → extension-marketplace-api-Bo_chffY.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-message-router-DhEyQZWI.js → extension-message-router-TTAx3dPv.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-BpY2ZrxI.js → extension-page-Iq7vFC-g.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-provider-YdavG8wv.js → extension-provider-BNnLkq95.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-settings-page-BKvG-hJa.js → extension-settings-page-C0oLjaz6.js} +1 -1
- package/dist/gateway/static/root/assets/{file-preview-surface-D71-xhLL.js → file-preview-surface-BSrIpn5C.js} +1 -1
- package/dist/gateway/static/root/assets/files-GdwDamkp.js +1 -0
- package/dist/gateway/static/root/assets/{gateway-config-swr-C-cx4ObA.js → gateway-config-swr-2VOPSLSq.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-realtime-Dh23j5Jx.js → gateway-realtime-CfceJ5WX.js} +1 -1
- package/dist/gateway/static/root/assets/gateway-realtime-store-Ca42Wsk6.js +1 -0
- package/dist/gateway/static/root/assets/{gateway-restart-F1q8XY7Y.js → gateway-restart-Dsg95Dwt.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-settings-WQ42gfHY.js → gateway-settings-CMgry8RK.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-startup-retry-Dx1dmgnX.js → gateway-startup-retry-D0i7dt51.js} +1 -1
- package/dist/gateway/static/root/assets/{global-defaults-api-C_Sn41rn.js → global-defaults-api-u-ado9kz.js} +1 -1
- package/dist/gateway/static/root/assets/{home-page-A3VCyEO8.js → home-page-pT-lEQsu.js} +4 -4
- package/dist/gateway/static/root/assets/{image-generation-api-CvRiMNIJ.js → image-generation-api-DDHOD0Nx.js} +1 -1
- package/dist/gateway/static/root/assets/{imports-page-DJ2wJ2QG.js → imports-page-BxRXNvQx.js} +1 -1
- package/dist/gateway/static/root/assets/index-BtHMU5k4.css +1 -0
- package/dist/gateway/static/root/assets/index-DdEh8KeB.js +11 -0
- package/dist/gateway/static/root/assets/{install-connector-dialog-CyHz1Nys.js → install-connector-dialog-Rox2_5eU.js} +1 -1
- package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-Byb_rqj4.js → keyboard-shortcuts-settings-D7xlV7xT.js} +1 -1
- package/dist/gateway/static/root/assets/{local-app-workbench-page-D58zzTUZ.js → local-app-workbench-page-ReBczGac.js} +1 -1
- package/dist/gateway/static/root/assets/{local-apps-page-L6ODN66C.js → local-apps-page-Ct07GT0V.js} +1 -1
- package/dist/gateway/static/root/assets/{local-session-drafts-UN3vioSr.js → local-session-drafts-8PozABVy.js} +1 -1
- package/dist/gateway/static/root/assets/{locale-store-CnHhWsDP.js → locale-store-B4o4aDCg.js} +1 -1
- package/dist/gateway/static/root/assets/{logs-page-2rOEUxHs.js → logs-page-CtEv5J4C.js} +1 -1
- package/dist/gateway/static/root/assets/{management-api-CSkXaCjk.js → management-api-BBLUlEXt.js} +1 -1
- package/dist/gateway/static/root/assets/{management-settings-B1Enr-fL.js → management-settings-BjvQ4WiZ.js} +1 -1
- package/dist/gateway/static/root/assets/{markdown-view-CWhAtI1O.js → markdown-view-C7kqotD-.js} +1 -1
- package/dist/gateway/static/root/assets/mcp-conversation-setup-page-DfbMmlmC.js +1 -0
- package/dist/gateway/static/root/assets/{media-plugins-DVrn3x6D.js → media-plugins-B5XMcW5S.js} +1 -1
- package/dist/gateway/static/root/assets/{messages-CZCXd6Pj.js → messages-hlOsXkQ7.js} +2 -2
- package/dist/gateway/static/root/assets/{model-selector-D-9SUwg2.js → model-selector-BP-t33vd.js} +1 -1
- package/dist/gateway/static/root/assets/{models-hub-cache-qgre89p2.js → models-hub-cache-B0z5Ptmt.js} +1 -1
- package/dist/gateway/static/root/assets/{new-chat-navigation-DXYDldT_.js → new-chat-navigation-BA1IB3hy.js} +1 -1
- package/dist/gateway/static/root/assets/{note-detail-panel-4Pd0mAhL.js → note-detail-panel-DAhIT6xP.js} +3 -3
- package/dist/gateway/static/root/assets/note-image-lightbox-DrVGs1eQ.js +1 -0
- package/dist/gateway/static/root/assets/{notes-api-_jYkMe8e.js → notes-api-B3Kc4909.js} +1 -1
- package/dist/gateway/static/root/assets/notes-page-zAJJ2OiQ.js +8 -0
- package/dist/gateway/static/root/assets/{oauth-api-CaWkle-J.js → oauth-api-CW1XhW42.js} +1 -1
- package/dist/gateway/static/root/assets/{oauth-provider-connect-DTsztbWi.js → oauth-provider-connect-3QGibJMl.js} +1 -1
- package/dist/gateway/static/root/assets/{page-context-capture-button-CYMb3IZu.js → page-context-capture-button-Bd__UBi9.js} +1 -1
- package/dist/gateway/static/root/assets/{page-context-draft-D441lgCD.js → page-context-draft-DpDsGHtl.js} +1 -1
- package/dist/gateway/static/root/assets/{page-header-store-7jhoVGK_.js → page-header-store-D_2QZ6Ps.js} +1 -1
- package/dist/gateway/static/root/assets/page-tabs-DoYMKhVO.js +1 -0
- package/dist/gateway/static/root/assets/{personal-avatar-CAATciod.js → personal-avatar-D5VUVQGE.js} +1 -1
- package/dist/gateway/static/root/assets/{personal-page-DCcipmsB.js → personal-page-DHik8uj6.js} +1 -1
- package/dist/gateway/static/root/assets/{personal-profile-settings-CZhQ4fwt.js → personal-profile-settings-Cd2xUVbw.js} +1 -1
- package/dist/gateway/static/root/assets/{personal-settings-panel-CMaFnp1G.js → personal-settings-panel-CHRra9hc.js} +1 -1
- package/dist/gateway/static/root/assets/{phone-dependencies-card-BlFgKeRz.js → phone-dependencies-card-CREmmRxI.js} +1 -1
- package/dist/gateway/static/root/assets/{phone-model-connection-DF_E69Sv.js → phone-model-connection-BDzr9jXL.js} +1 -1
- package/dist/gateway/static/root/assets/{phone-model-picker-D3O3vql4.js → phone-model-picker-DSQF-RxW.js} +1 -1
- package/dist/gateway/static/root/assets/{phone-settings-page-d2OEqR-2.js → phone-settings-page-gP5kr3VO.js} +1 -1
- package/dist/gateway/static/root/assets/{phone-workspace-store-BrXIdz55.js → phone-workspace-store-B0mF8oMk.js} +1 -1
- package/dist/gateway/static/root/assets/{plugin-details-dialog-tpugwKl1.js → plugin-details-dialog-43jCnG5n.js} +1 -1
- package/dist/gateway/static/root/assets/{preference-select-fields-DXMfKUtD.js → preference-select-fields-VqtR_pOy.js} +1 -1
- package/dist/gateway/static/root/assets/{preview-runtime-Bd9e2ent.js → preview-runtime-MJUo7XlD.js} +3 -3
- package/dist/gateway/static/root/assets/{product-automation-feedback-DmdIebRg.js → product-automation-feedback-D43XiQq6.js} +1 -1
- package/dist/gateway/static/root/assets/{product-open-page-DnPJLzt7.js → product-open-page-CQMoDCO1.js} +1 -1
- package/dist/gateway/static/root/assets/{product-preview-content-hChoKYQM.js → product-preview-content-CkQebfi-.js} +1 -1
- package/dist/gateway/static/root/assets/{product-preview-modal-CwAjfaEd.js → product-preview-modal-DToUA1EF.js} +2 -2
- package/dist/gateway/static/root/assets/{project-detail-page-BYZdStns.js → project-detail-page-BBF8eVJa.js} +2 -2
- package/dist/gateway/static/root/assets/{project-understanding-CeZ3CW6E.js → project-understanding-BScfv1pD.js} +1 -1
- package/dist/gateway/static/root/assets/{projects-page-BpARg2mt.js → projects-page-BCMWrLGf.js} +1 -1
- package/dist/gateway/static/root/assets/{providers-api-DjHMmSNk.js → providers-api-BIA2IARN.js} +1 -1
- package/dist/gateway/static/root/assets/{recording-upload-CxcMaBPr.js → recording-upload-Yy9r6kHe.js} +1 -1
- package/dist/gateway/static/root/assets/{registry-api-x3kjVVzC.js → registry-api-CmLu4MA9.js} +1 -1
- package/dist/gateway/static/root/assets/{remote-access-hub-Cuyfg5gz.js → remote-access-hub-BeG8Bgy0.js} +1 -1
- package/dist/gateway/static/root/assets/{resource-unavailable-ClTyW1KO.js → resource-unavailable-Dccp_uis.js} +1 -1
- package/dist/gateway/static/root/assets/{right-workspace-store-BgVMF75g.js → right-workspace-store-CFf15f36.js} +1 -1
- package/dist/gateway/static/root/assets/{route-preload-BPMOD0qt.js → route-preload-Bl10PwKS.js} +2 -2
- package/dist/gateway/static/root/assets/{routine-panel-DqCzH4o9.js → routine-panel-BjqenuXU.js} +2 -2
- package/dist/gateway/static/root/assets/{runtime-tools-api-ZKJq8Y1c.js → runtime-tools-api-CFvov9Uy.js} +1 -1
- package/dist/gateway/static/root/assets/{runtime-tools-settings-panel-CSVS-0w1.js → runtime-tools-settings-panel-C7sHr-Lm.js} +1 -1
- package/dist/gateway/static/root/assets/{service-recommendation-list-Jbg55MsH.js → service-recommendation-list-Bz9QWUZc.js} +1 -1
- package/dist/gateway/static/root/assets/{session-api-JAcSuzXh.js → session-api-7-TPnKv0.js} +1 -1
- package/dist/gateway/static/root/assets/{session-manager-CvC5uo-A.js → session-manager-fvJusKsK.js} +2 -2
- package/dist/gateway/static/root/assets/{sessions-page-itpuSflW.js → sessions-page-DS-OExY1.js} +1 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-DHfrm0Zj.js +1 -0
- package/dist/gateway/static/root/assets/{settings-advanced-section-C-Rq-g2w.js → settings-advanced-section-BsqgVQL3.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-mode-store-DWWvnHvd.js → settings-mode-store-BtwrUOdQ.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-DppkfISC.js → settings-page-B_8kxJQW.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-header-BnBbewrE.js → settings-page-header-DKgbD0Bc.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-layout-DgRq0a-W.js → settings-page-layout-BE3vLWp_.js} +1 -1
- package/dist/gateway/static/root/assets/{setup-interaction-page-_UOcgWMs.js → setup-interaction-page-DLpGv0yp.js} +1 -1
- package/dist/gateway/static/root/assets/{setup-status-panel-fXdj1EOR.js → setup-status-panel-BMaFUPnt.js} +1 -1
- package/dist/gateway/static/root/assets/{share-link-dialog-BUzVn5kX.js → share-link-dialog-3RNzFIH3.js} +1 -1
- package/dist/gateway/static/root/assets/{share-preview-page-CIdxsC9i.js → share-preview-page-C49EIXte.js} +1 -1
- package/dist/gateway/static/root/assets/{shares-api-DNlL_AwP.js → shares-api-B532SLIU.js} +1 -1
- package/dist/gateway/static/root/assets/{shares-settings-R2H0pdNK.js → shares-settings-C_ITdQqP.js} +1 -1
- package/dist/gateway/static/root/assets/{skill-api-D3iuvyp7.js → skill-api-x-ENFv-9.js} +1 -1
- package/dist/gateway/static/root/assets/{skill-list-api-K8n_AYMV.js → skill-list-api-CqmglPCz.js} +1 -1
- package/dist/gateway/static/root/assets/{skill-reload-api-BqxHK3K0.js → skill-reload-api-YeoxO91w.js} +1 -1
- package/dist/gateway/static/root/assets/{skills-page-BHciTWaw.js → skills-page-B30SsJL6.js} +1 -1
- package/dist/gateway/static/root/assets/space-page-DmvjU1jc.js +2 -0
- package/dist/gateway/static/root/assets/{system-settings-panel-BPyQzKf8.js → system-settings-panel-KXLPpyOW.js} +1 -1
- package/dist/gateway/static/root/assets/{task-detail-page-By5vozgo.js → task-detail-page-DHYm_bsg.js} +3 -3
- package/dist/gateway/static/root/assets/{task-header-title-lUJ0ls3u.js → task-header-title-Buwr7WTV.js} +1 -1
- package/dist/gateway/static/root/assets/{task-result-evidence-CWpAUoNq.js → task-result-evidence-DpV1mZJA.js} +1 -1
- package/dist/gateway/static/root/assets/{terminal-panel-store-D24y7GIK.js → terminal-panel-store-Ch8lOYIq.js} +1 -1
- package/dist/gateway/static/root/assets/{theme-store-VVHRSdNZ.js → theme-store-C7t81hG7.js} +1 -1
- package/dist/gateway/static/root/assets/{tracing-settings-page-D3tu_G8X.js → tracing-settings-page-CcyPoojp.js} +1 -1
- package/dist/gateway/static/root/assets/{tunnel-api-DwTTVUxp.js → tunnel-api-D713CJ9R.js} +1 -1
- package/dist/gateway/static/root/assets/{understanding-activity-store-BOIGCSnz.js → understanding-activity-store-mSawFpIz.js} +1 -1
- package/dist/gateway/static/root/assets/{understanding-refresh-store-mKqdZVjW.js → understanding-refresh-store-4M0xrc88.js} +1 -1
- package/dist/gateway/static/root/assets/{usage-page-B4MqbLKR.js → usage-page-DN1TcxWS.js} +1 -1
- package/dist/gateway/static/root/assets/{use-autosave-BcgfZd3f.js → use-autosave-BkVX6SyB.js} +1 -1
- package/dist/gateway/static/root/assets/{use-composer-attachments-Ca1eE6iV.js → use-composer-attachments-4FKbf6PB.js} +1 -1
- package/dist/gateway/static/root/assets/{use-file-preview-expanded-BwB7VH_A.js → use-file-preview-expanded-CRBn6UTd.js} +1 -1
- package/dist/gateway/static/root/assets/use-generated-media-CEJ5BBxX.js +1 -0
- package/dist/gateway/static/root/assets/{use-personal-profile-BDLuMaWC.js → use-personal-profile-DdjQjf9I.js} +1 -1
- package/dist/gateway/static/root/assets/{use-personal-work-Dfbs6S75.js → use-personal-work-srLCZOam.js} +1 -1
- package/dist/gateway/static/root/assets/{use-realtime-voice-BrM12ktL.js → use-realtime-voice-tyo85cre.js} +1 -1
- package/dist/gateway/static/root/assets/{use-workspace-tree-AL4BVZhS.js → use-workspace-tree-VwHdfiR8.js} +1 -1
- package/dist/gateway/static/root/assets/{user-model-page-CqTB0BIf.js → user-model-page-D-F5GO3T.js} +2 -2
- package/dist/gateway/static/root/assets/{voice-api-key-field-BbVCvQrE.js → voice-api-key-field-gWJ6bx-H.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-config-api-vtmTs-mq.js → voice-config-api-B1RtxiRq.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-input-shortcut-events-BhmaEWvI.js → voice-input-shortcut-events-C-8Ts1gq.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-player-store-IVeW1g9y.js → voice-player-store-DyuAAbk0.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-settings-JJfxv-lj.js → voice-settings-DOajN2ay.js} +1 -1
- package/dist/gateway/static/root/assets/{work-discovery-overlay-Bl2qHC88.js → work-discovery-overlay-CTLp1-tu.js} +1 -1
- package/dist/gateway/static/root/assets/{work-discovery-page-ChvUHm0f.js → work-discovery-page-B-UzFKIr.js} +1 -1
- package/dist/gateway/static/root/assets/{working-directory-picker-modal-BxeoaS6d.js → working-directory-picker-modal-DvVtUxHW.js} +1 -1
- package/dist/gateway/static/root/assets/{workspace-api-D_dxOn8W.js → workspace-api-CIfedJeG.js} +2 -2
- package/dist/gateway/static/root/assets/workspace-editor-agent-store-Bh4FYwVq.js +1 -0
- package/dist/gateway/static/root/assets/{workspace-file-preview-dialog-D0GxWvAv.js → workspace-file-preview-dialog-Xi5feqPq.js} +1 -1
- package/dist/gateway/static/root/assets/{workspace-open-location-menu-CCJISdeq.js → workspace-open-location-menu-sbOva_RI.js} +1 -1
- package/dist/gateway/static/root/assets/{workspace-preview-store-DKZ6gVL4.js → workspace-preview-store-DYd8E5bV.js} +1 -1
- package/dist/gateway/static/root/assets/{xopc-cloud-account-card-Cxt6wEom.js → xopc-cloud-account-card-BYuMOGaK.js} +1 -1
- package/dist/gateway/static/root/index.html +96 -96
- package/dist/package.js +1 -1
- package/dist/packages/gateway-contract/src/files.js +17 -3
- package/dist/packages/gateway-contract/src/home.js +1 -0
- package/dist/src/agent/agent-manager.d.ts +1 -0
- package/dist/src/agent/agent-manager.js +2 -1
- package/dist/src/agent/commands/command-registry.d.ts +1 -1
- package/dist/src/agent/commands/command-registry.js +10 -1
- package/dist/src/agent/embedded/index.js +1 -1
- package/dist/src/agent/embedded/run-for-session.js +1 -1
- package/dist/src/agent/embedded/run-turn.js +3 -2
- package/dist/src/agent/embedded/runs.d.ts +3 -0
- package/dist/src/agent/embedded/runs.js +20 -2
- package/dist/src/agent/embedded/tool-search-extension.js +2 -0
- package/dist/src/agent/embedded/xopc-tools-bridge.js +1 -1
- package/dist/src/agent/external-tools/discovery.js +1 -1
- package/dist/src/agent/external-tools/endpoint-provider.js +1 -1
- package/dist/src/agent/mcp/continuation-guard.js +1 -1
- package/dist/src/agent/mcp/conversation-setup.d.ts +221 -4
- package/dist/src/agent/mcp/conversation-setup.js +66 -27
- package/dist/src/agent/mcp/discovery.d.ts +5 -0
- package/dist/src/agent/mcp/discovery.js +47 -6
- package/dist/src/agent/prompt/conversational-configuration-guide.js +3 -2
- package/dist/src/agent/prompt/sections/tooling.js +1 -1
- package/dist/src/agent/service.js +1 -0
- package/dist/src/agent/service.types.d.ts +1 -0
- package/dist/src/agent/tool-manuals/browser.d.ts +1 -1
- package/dist/src/agent/tool-manuals/browser.js +3 -1
- package/dist/src/agent/tool-manuals/xopc-configuration.d.ts +2 -2
- package/dist/src/agent/tool-manuals/xopc-configuration.js +10 -9
- package/dist/src/agent/tools/browser/tool/browser-use-tool.js +1 -1
- package/dist/src/agent/tools/capability-catalog-tool.d.ts +10 -0
- package/dist/src/agent/tools/capability-catalog-tool.js +63 -0
- package/dist/src/agent/tools/exec-command.d.ts +1 -0
- package/dist/src/agent/tools/exec-command.js +11 -5
- package/dist/src/agent/tools/factory.d.ts +1 -0
- package/dist/src/agent/tools/factory.js +32 -1
- package/dist/src/agent/tools/language-diagnostics.js +4 -1
- package/dist/src/agent/tools/managed-job-tool.js +3 -2
- package/dist/src/agent/tools/mcp-setup-tool.js +2 -2
- package/dist/src/agent/tools/phone-use-tool.js +1 -1
- package/dist/src/agent/tools/xopc-use-tool.d.ts +2 -0
- package/dist/src/agent/tools/xopc-use-tool.js +5 -3
- package/dist/src/agent-config/schema.d.ts +3 -0
- package/dist/src/agent-config/schema.js +1 -0
- package/dist/src/automations/api/routes.js +17 -5
- package/dist/src/automations/capabilities/write.js +32 -4
- package/dist/src/automations/configuration-conversation.d.ts +7 -0
- package/dist/src/automations/configuration-conversation.js +13 -5
- package/dist/src/capabilities/capability-catalog.d.ts +47 -0
- package/dist/src/capabilities/capability-catalog.js +162 -0
- package/dist/src/capabilities/runtime/product.js +1 -1
- package/dist/src/capabilities/store-connector.d.ts +1 -0
- package/dist/src/capabilities/store-connector.js +6 -3
- package/dist/src/chat-commands/builtins/config.js +1 -1
- package/dist/src/chat-commands/context.js +1 -1
- package/dist/src/cli/commands/agent.js +1 -1
- package/dist/src/cli/commands/doctor/checks/channel-plugins.js +1 -1
- package/dist/src/cli/commands/doctor/checks/database-schema.js +5 -5
- package/dist/src/cli/commands/extension-dev.js +1 -1
- package/dist/src/cli/commands/extension-marketplace.js +1 -1
- package/dist/src/cli/commands/extension.js +1 -1
- package/dist/src/cli/commands/onboard/channels/registry.js +1 -1
- package/dist/src/cli/commands/platform.js +2 -2
- package/dist/src/cli/commands/skills.js +1 -1
- package/dist/src/cli/extension-cli-register.js +1 -1
- package/dist/src/cli/utils/session.js +1 -1
- package/dist/src/config/index.js +1 -1
- package/dist/src/config/schema.d.ts +2 -0
- package/dist/src/config/schema.js +6 -3
- package/dist/src/extensions/index.js +2 -2
- package/dist/src/extensions/loader.js +1 -1
- package/dist/src/extensions/update.js +1 -1
- package/dist/src/files/file-service.js +1 -0
- package/dist/src/files/file-versions.d.ts +15 -0
- package/dist/src/files/file-versions.js +87 -0
- package/dist/src/gateway/agent-reactions/reaction.d.ts +27 -0
- package/dist/src/gateway/agent-reactions/reaction.js +186 -0
- package/dist/src/gateway/hono/routes/auth-registry-extensions.js +1 -1
- package/dist/src/gateway/hono/routes/capabilities.js +27 -0
- package/dist/src/gateway/hono/routes/connectors.js +1 -1
- package/dist/src/gateway/hono/routes/files.js +39 -0
- package/dist/src/gateway/hono/routes/home.js +1 -1
- package/dist/src/gateway/hono/routes/mobile-capability-actions.d.ts +4 -0
- package/dist/src/gateway/hono/routes/mobile-capability-actions.js +290 -0
- package/dist/src/gateway/hono/routes/music-generation.js +1 -0
- package/dist/src/gateway/hono/routes/personal-agent.js +23 -43
- package/dist/src/gateway/hono/routes/sessions.js +41 -2
- package/dist/src/gateway/security/gateway-principal.d.ts +1 -0
- package/dist/src/gateway/security/gateway-principal.js +9 -1
- package/dist/src/gateway/security/gateway-scopes.js +3 -0
- package/dist/src/gateway/service/agent-runner.d.ts +2 -0
- package/dist/src/gateway/service/agent-runner.js +5 -1
- package/dist/src/gateway/service/config-coordinator.d.ts +1 -0
- package/dist/src/gateway/service/config-coordinator.js +1 -1
- package/dist/src/gateway/service/run-gateway-agent.d.ts +3 -0
- package/dist/src/gateway/service/run-gateway-agent.js +43 -1
- package/dist/src/gateway/service/task-conversation-query-service.d.ts +4 -0
- package/dist/src/gateway/service.js +20 -11
- package/dist/src/home-intelligence/host.js +5 -5
- package/dist/src/personal-agent/repository.d.ts +1 -0
- package/dist/src/personal-agent/repository.js +1 -0
- package/dist/src/personal-agent/schedules.d.ts +9 -1
- package/dist/src/personal-agent/schedules.js +32 -1
- package/dist/src/personal-agent/service.d.ts +2 -2
- package/dist/src/personal-agent/service.js +6 -3
- package/dist/src/projects/index.js +1 -1
- package/dist/src/providers/model-call.js +1 -0
- package/dist/src/realtime/runtime.js +1 -0
- package/dist/src/session/client-history.d.ts +1 -0
- package/dist/src/session/client-history.js +2 -0
- package/dist/src/session/types.d.ts +4 -0
- package/dist/src/storage/sqlite/agent-reaction-repository.d.ts +15 -0
- package/dist/src/storage/sqlite/agent-reaction-repository.js +73 -0
- package/dist/src/storage/sqlite/row-mappers.js +1 -1
- package/dist/src/storage/sqlite/schema.d.ts +2 -2
- package/dist/src/storage/sqlite/schema.js +7 -7
- package/dist/src/storage/sqlite/schema.sql +13 -0
- package/dist/src/storage/sqlite/upgrades/281_session_agent_reactions.sql +13 -0
- package/dist/src/tasks/home-query-service.js +1 -0
- package/dist/src/tui/backends/embedded-backend.js +5 -4
- package/dist/src/tui/extension-host/load-extensions.js +1 -1
- package/dist/src/tui/tui-commands.js +1 -1
- package/dist/src/tui/tui-management.js +1 -1
- package/dist/src/tui/tui.js +1 -1
- package/dist/src/usage/recorder.js +6 -2
- package/dist/src/usage/types.d.ts +1 -0
- package/package.json +1 -1
- package/dist/gateway/static/root/assets/capabilities-DG-WesBp.js +0 -1
- package/dist/gateway/static/root/assets/chat-page-DO060oe9.js +0 -72
- package/dist/gateway/static/root/assets/files-BNL4kkSB.js +0 -1
- package/dist/gateway/static/root/assets/gateway-realtime-store-D_ZITqDi.js +0 -1
- package/dist/gateway/static/root/assets/index-Ca939klV.js +0 -11
- package/dist/gateway/static/root/assets/index-DrWdNdP4.css +0 -1
- package/dist/gateway/static/root/assets/mcp-conversation-setup-page-lOOFtIXe.js +0 -1
- package/dist/gateway/static/root/assets/note-image-lightbox-C1w4X0T6.js +0 -1
- package/dist/gateway/static/root/assets/notes-page-strWZLkP.js +0 -8
- package/dist/gateway/static/root/assets/page-tabs-oeTY7z3_.js +0 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-BEDT8_0u.js +0 -1
- package/dist/gateway/static/root/assets/space-api-C302hvkG.js +0 -1
- package/dist/gateway/static/root/assets/space-page-sfc82o9O.js +0 -2
- package/dist/gateway/static/root/assets/workspace-editor-agent-store-D5wq8Kme.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{f as i,u as a}from"./chunk-KS7C4IRE-CiwuuyV8.js";import{i as o,n as s,o as c}from"./locale-store-CnHhWsDP.js";import{t as l}from"./messages-CZCXd6Pj.js";import{a as u,i as d,o as f,r as ee,s as p,t as m}from"./dist-CY7CS_D3.js";import{t as h}from"./check-DUBLcKHA.js";import{t as g}from"./secret-input-DsjfQmDn.js";import{t as te}from"./key-round-DWbpyU2U.js";import{t as _}from"./link-2-D_ZKYUW7.js";import{t as v}from"./loader-circle-CifKLtgG.js";import{t as y}from"./lock-keyhole-DEK5kH0u.js";import{t as b}from"./x-B_N4OPjy.js";import{t as x}from"./skeleton-DzdOeGYz.js";import{i as S}from"./vendor-swr-CdRzEUwF.js";import{t as C}from"./button-ChmVQg9O.js";var w=n(),T=e(t(),1),E=r(),D={zh:{title:`连接服务`,secret:`访问密钥`,hint:`仅保存到凭据服务,不进入聊天或模型。`,invalidToken:`密钥未被接受,请核对后重新输入。`,submit:`保存并连接`,login:`继续登录`,waiting:`在服务页面完成授权,这里会自动继续。`,check:`重新检查`,checking:`正在验证连接`,cancel:`取消连接`,back:`返回对话`,close:`暂时关闭`,later:`稍后继续`,done:`完成`,failed:`暂时无法连接,请检查服务地址或权限后重试。`,expired:`请求已过期,请回到对话重新发起。`,cancelled:`此连接请求已取消。`,reload:`配置已保存。重启 Gateway 后,连接才能生效。`,details:`连接详情`,approve:`允许这次连接`,approval:`确认连接到这个服务`,shared:`连接将供此网关的助手使用,不会授予微信用户管理权限。`,identity:`来自微信私聊`,endpoint:`服务地址`,purpose:`要完成的事`,tokenDescription:`输入服务提供的访问密钥,即可继续原来的任务。`,accessDeniedToken:`服务拒绝了当前访问。若此服务需要 Token,请在这里输入;账号或服务权限也可能需要检查。`,connected:`已连接`,continuing:`正在原微信对话中继续处理,无需发送“继续”。`,delivered:`结果已发送到原微信对话。`,returnWeixin:`现在可以关闭此页,返回微信。`,closed:`返回微信即可继续对话`,reopen:`继续配置`,deliveryFailed:`连接已完成,结果暂未发送到微信。重发不会重新执行任务。`,retryDelivery:`重试发送结果`,secure:`安全连接`,loading:`正在准备连接`,checkingDescription:`正在检查服务和所需权限。`},en:{title:`Connect service`,secret:`Access key`,hint:`Saved to credential storage, never chat or the model.`,invalidToken:`This key was rejected. Check it and try again.`,submit:`Save and connect`,login:`Continue sign-in`,waiting:`Finish authorizing on the service page. This will continue automatically.`,check:`Check again`,checking:`Verifying connection`,cancel:`Cancel connection`,back:`Return to chat`,close:`Close for now`,later:`Continue later`,done:`Done`,failed:`Unable to connect. Check the service address or permissions and try again.`,expired:`This request expired. Return to chat to start again.`,cancelled:`This connection request was cancelled.`,reload:`Configuration is saved. Restart the Gateway to activate the connection.`,details:`Connection details`,approve:`Approve this connection`,approval:`Confirm this service connection`,shared:`The connection is shared with this Gateway’s assistants. It grants no administration rights to Weixin users.`,identity:`From a Weixin chat`,endpoint:`Service address`,purpose:`Your request`,tokenDescription:`Enter the access key from your service to continue your task.`,accessDeniedToken:`The service refused access. If it requires a Token, enter it here. Account or service permissions may also need attention.`,connected:`Connected`,continuing:`Continuing in the original Weixin chat. No follow-up message needed.`,delivered:`The result was sent to your original Weixin chat.`,returnWeixin:`You can close this page and return to Weixin.`,closed:`Return to Weixin to continue chatting`,reopen:`Continue setup`,deliveryFailed:`Connected, but the result could not be sent to Weixin. Resending will not run the task again.`,retryDelivery:`Retry result delivery`,secure:`Secure connection`,loading:`Preparing connection`,checkingDescription:`Checking the service and required permissions.`}};function O({setupId:e,onClose:t}){let n=s(e=>e.language),r=D[n],i=`/api/mcp/setup/${encodeURIComponent(e)}`,{data:a,error:_,mutate:w}=S(i,async e=>(await c(o(e))).payload,{refreshInterval:e=>e&&(e.returnChannel===`weixin`&&e.phase===`ready`&&![`delivered`,`failed`].includes(e.replyDelivery??``)||![`ready`,`cancelled`].includes(e.phase))?1e3:0}),[O,k]=(0,T.useState)(``),[A,j]=(0,T.useState)({}),[M,N]=(0,T.useState)(!1),[P,F]=(0,T.useState)(!1),I=(0,T.useRef)(``),L=(0,T.useRef)(null),R=async(e,t)=>{if(!(!a||M)){N(!0),F(!1);try{await c(o(i),{method:`POST`,body:JSON.stringify({action:e,expectedVersion:a.version,...t?{value:t}:{}})}),await w()}catch{F(!0),await w()}finally{N(!1)}}};(0,T.useEffect)(()=>{if(!a||M||a.expired||a.phase===`cancelled`)return;if(a.phase===`ready`&&!a.reloadRequired&&a.returnChannel!==`weixin`){t(a);return}if(P)return;let n=a.requiresRecheck||a.phase===`planned`||[`connected`,`error`,`cancelled`].includes(a.authState??``)?`advance`:a.phase===`oauth_required`?`authorize`:void 0,r=`${e}:${a.version}:${n}`;n&&I.current!==r&&(I.current=r,R(n))},[a,M,P,t,e]);let z=!!(a?.expired||a?.phase===`cancelled`),B=a?.secretFields?.length?a.secretFields:[{id:`token`,label:r.secret}],V=!!(O||Object.values(A).some(Boolean)),H=!!(a?.nextRetryAt&&a.nextRetryAt>Date.now()),U=B.every(e=>(e.id===`token`?O:A[e.id]??``).trim()),W=a?.phase===`ready`&&!a.reloadRequired&&!z,G=a?.phase===`approval_required`&&!z?a.approval:void 0,K=a?.phase===`approval_required`&&!z?a.planApproval:void 0,q=!!(G||K),J=a&&(a.phase===`token_required`||a.phase===`auth_unknown`&&a.canProvideToken||a.phase===`blocked`&&(a.canReplaceToken||a.canProvideToken))&&!a.requiresRecheck&&!z&&!a.reloadRequired,Y=a?.phase===`authorizing`&&!z&&!a.reloadRequired,X=W&&a?.returnChannel===`weixin`&&a.replyDelivery===`failed`,Z=(a?.phase===`blocked`||a?.phase===`auth_unknown`)&&!J&&!z,ne=a?.expired?r.expired:a?.phase===`cancelled`?r.cancelled:a?.reloadRequired?r.reload:W?X?r.deliveryFailed:a?.replyDelivery===`delivered`?r.delivered:r.continuing:q?r.approval:H?n===`zh`?`服务要求等待,将在 ${new Date(a.nextRetryAt).toLocaleTimeString()} 后有限重试。`:`Waiting until ${new Date(a.nextRetryAt).toLocaleTimeString()} before a bounded retry.`:M?r.checkingDescription:a?.phase===`auth_unknown`&&!a.canProvideToken?n===`zh`?`无法确认服务的认证方式。请核对官方接入文档和服务地址后重新检查。`:`Could not verify the authentication method. Check the official setup guide and service address, then recheck.`:a?.phase===`auth_unknown`?n===`zh`?`认证方式尚未确定。若服务提供 Token,可在此输入;如需 OAuth,请核实接入资料后重新检查。`:`Authentication is not yet determined. Enter a Token only if your service provides one; for OAuth, verify the integration guide and recheck.`:J?a.errorCode===`credential_rejected`?r.invalidToken:a.canProvideToken?r.accessDeniedToken:r.tokenDescription:Y?r.waiting:_||Z||P?r.failed:r.checkingDescription,Q=()=>{M||(k(``),j({}),t(a))},$=`min-h-12 w-full rounded-xl text-[15px]`,re=W?h:J?te:y;return(0,E.jsx)(m,{open:!0,onOpenChange:e=>{e||Q()},children:(0,E.jsxs)(f,{children:[(0,E.jsx)(u,{className:`fixed inset-0 z-[70] bg-scrim backdrop-blur-sm`}),(0,E.jsxs)(ee,{onOpenAutoFocus:e=>{e.preventDefault(),L.current?.focus()},onPointerDownOutside:e=>{(M||V)&&e.preventDefault()},onEscapeKeyDown:e=>{M&&e.preventDefault()},className:`fixed inset-x-0 bottom-0 z-[70] flex h-[min(36rem,calc(100dvh-1rem))] flex-col overflow-hidden rounded-t-3xl border border-edge bg-surface-overlay text-fg shadow-elevated sm:inset-x-auto sm:bottom-auto sm:left-1/2 sm:top-1/2 sm:h-[min(36rem,calc(100dvh-3rem))] sm:w-[28rem] sm:-translate-x-1/2 sm:-translate-y-1/2 sm:rounded-3xl`,children:[(0,E.jsxs)(`header`,{className:`relative shrink-0 px-6 pb-5 pt-8 text-center sm:px-8`,children:[(0,E.jsx)(C,{variant:`ghost`,className:`absolute right-2 top-2 size-11 rounded-full p-0`,"aria-label":r.close,disabled:M,onClick:Q,children:(0,E.jsx)(b,{className:`size-4`,"aria-hidden":!0})}),(0,E.jsx)(`div`,{className:`mx-auto mb-4 flex size-12 items-center justify-center rounded-2xl bg-surface-hover`,children:(0,E.jsx)(re,{className:`size-6 text-accent-fg`,strokeWidth:1.6,"aria-hidden":!0})}),(0,E.jsx)(p,{ref:L,tabIndex:-1,className:`break-words text-xl font-semibold tracking-tight focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`,children:W?r.connected:a?.displayName||r.title}),a?(0,E.jsx)(`p`,{className:`mt-1 truncate text-[13px] text-fg-muted`,title:a.endpointOrigin,children:a.endpointOrigin}):null,(0,E.jsx)(d,{role:a?.errorCode===`credential_rejected`||!J&&(_||P||Z||a?.expired||a?.reloadRequired)?`alert`:void 0,className:`mt-3 text-sm leading-relaxed text-fg-muted`,children:ne})]}),(0,E.jsxs)(`div`,{className:`min-h-0 flex-1 overflow-y-auto overscroll-contain px-6 pb-4 sm:px-8`,"aria-busy":M,children:[!a&&!_?(0,E.jsxs)(`div`,{role:`status`,"aria-label":r.loading,className:`space-y-3`,children:[(0,E.jsx)(x,{className:`h-12 w-full rounded-xl`}),(0,E.jsx)(x,{className:`h-4 w-3/4`})]}):null,G?(0,E.jsxs)(`section`,{className:`space-y-3`,children:[(0,E.jsxs)(`dl`,{className:`space-y-3 rounded-2xl bg-surface-base p-4 text-sm`,children:[(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`dt`,{className:`mb-1 text-xs text-fg-muted`,children:r.identity}),(0,E.jsxs)(`dd`,{className:`break-all`,children:[G.accountId,` / `,G.peerId]})]}),(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`dt`,{className:`mb-1 text-xs text-fg-muted`,children:r.endpoint}),(0,E.jsx)(`dd`,{className:`break-all`,children:G.endpoint})]}),(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`dt`,{className:`mb-1 text-xs text-fg-muted`,children:r.purpose}),(0,E.jsx)(`dd`,{className:`break-words leading-relaxed`,children:G.purpose})]})]}),(0,E.jsx)(`p`,{className:`text-xs leading-relaxed text-fg-muted`,children:r.shared}),K?(0,E.jsxs)(`div`,{className:`space-y-2 rounded-xl bg-surface-base p-3 text-xs`,children:[(0,E.jsx)(`p`,{children:n===`zh`?`同时审阅本次来源与执行计划:`:`Also review this source and execution plan:`}),(0,E.jsx)(`pre`,{className:`whitespace-pre-wrap break-all`,children:JSON.stringify(K,null,2)})]}):null]}):K?(0,E.jsxs)(`section`,{className:`space-y-3 text-sm`,children:[(0,E.jsx)(`p`,{className:`break-all`,children:K.endpoint}),(0,E.jsx)(`p`,{children:K.purpose}),K.execution?(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(`p`,{children:n===`zh`?`将在 Gateway 主机运行以下程序,可能下载指定依赖,并按该主机的进程权限访问文件和网络。`:`This program runs on the Gateway host, may download the specified dependency and can access files and network with that process’s permissions.`}),(0,E.jsx)(`pre`,{className:`whitespace-pre-wrap break-all rounded-xl bg-surface-base p-3 text-xs`,children:JSON.stringify(K.execution,null,2)})]}):(0,E.jsx)(`p`,{children:n===`zh`?`来源归属尚未独立核实。请确认服务和以下资料来源后连接。`:`Publisher ownership has not been independently verified. Review the service and sources before connecting.`}),K.sources.map(e=>(0,E.jsx)(`a`,{href:e.url,target:`_blank`,rel:`noopener noreferrer`,className:`block break-all text-accent-fg`,children:e.url},e.url))]}):J?(0,E.jsxs)(`form`,{id:`mcp-setup-secret-form`,className:`space-y-3`,onSubmit:e=>{e.preventDefault();let t=a.secretFields?.length?Object.fromEntries(B.map(e=>[e.id,e.id===`token`?O:A[e.id]??``])):O;k(``),j({}),R(`token`,t)},children:[B.map(e=>(0,E.jsxs)(`div`,{className:`space-y-2`,children:[(0,E.jsx)(`label`,{htmlFor:`mcp-setup-${e.id}`,className:`block text-sm font-medium`,children:e.label}),(0,E.jsx)(g,{id:`mcp-setup-${e.id}`,value:e.id===`token`?O:A[e.id]??``,onChange:t=>{e.id===`token`?k(t):j(n=>({...n,[e.id]:t})),F(!1)},disabled:M||H,autoComplete:`off`,hideCopy:!0,className:`[&_button]:size-11 [&_button]:p-3`,ariaDescribedBy:`mcp-secret-hint`,ariaInvalid:a.errorCode===`credential_rejected`||P,inputClassName:`min-h-12 rounded-xl pr-14 text-base`,labels:l(n).connectorsSettings.secretInputLabels})]},e.id)),a.helpUrl?(0,E.jsx)(`a`,{href:a.helpUrl,target:`_blank`,rel:`noopener noreferrer`,className:`text-sm text-accent-fg`,children:n===`zh`?`获取访问密钥`:`Get an access key`}):null,(0,E.jsxs)(`p`,{id:`mcp-secret-hint`,className:`flex items-start gap-1.5 text-xs leading-relaxed text-fg-muted`,children:[(0,E.jsx)(y,{className:`mt-0.5 size-3.5 shrink-0`,"aria-hidden":!0}),r.hint]}),P||a.phase===`blocked`&&!a.canProvideToken?(0,E.jsx)(`p`,{role:`alert`,className:`text-sm text-danger`,children:r.failed}):null]}):W&&a?.returnChannel===`weixin`?(0,E.jsx)(`p`,{role:`status`,className:`py-5 text-center text-sm text-fg-muted`,children:r.returnWeixin}):_||P||Z||a?.expired||a?.reloadRequired?null:!z&&!Y?(0,E.jsxs)(`div`,{role:`status`,"aria-label":r.checking,className:`space-y-3`,children:[(0,E.jsx)(x,{className:`h-12 w-full rounded-xl`}),(0,E.jsx)(x,{className:`h-4 w-2/3`})]}):null,a&&!z&&!W?(0,E.jsxs)(`details`,{className:`mt-5 text-sm text-fg-muted`,children:[(0,E.jsx)(`summary`,{className:`min-h-11 cursor-pointer py-3 text-xs focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`,children:r.details}),(0,E.jsxs)(`div`,{className:`space-y-2 pb-2`,children:[G?null:(0,E.jsx)(`p`,{className:`break-all text-xs`,children:a.endpointOrigin}),a.phase===`approval_required`?null:(0,E.jsx)(C,{variant:`ghost`,className:`min-h-11 w-full justify-start text-xs`,disabled:M||H,onClick:()=>{I.current=``,R(`advance`)},children:r.check}),(0,E.jsx)(C,{variant:`ghost`,className:`min-h-11 w-full justify-start text-xs`,disabled:M,onClick:()=>void R(`cancel`),children:r.cancel})]})]}):null]}),(0,E.jsxs)(`footer`,{className:`shrink-0 space-y-2 border-t border-edge/60 px-6 pt-4 pb-[max(1.25rem,env(safe-area-inset-bottom))] sm:px-8`,children:[q?(0,E.jsxs)(C,{variant:`primary`,className:$,disabled:M,onClick:()=>void R(`approve`),children:[M?(0,E.jsx)(v,{className:`size-4 animate-spin motion-reduce:animate-none`,"aria-hidden":!0}):null,r.approve]}):J?(0,E.jsxs)(C,{variant:`primary`,className:$,form:`mcp-setup-secret-form`,type:`submit`,disabled:M||!U,children:[M?(0,E.jsx)(v,{className:`size-4 animate-spin motion-reduce:animate-none`,"aria-hidden":!0}):null,M?r.checking:r.submit]}):Y&&a?.authorizationUrl?(0,E.jsx)(C,{asChild:!0,variant:`primary`,className:$,children:(0,E.jsx)(`a`,{href:a.authorizationUrl,target:`_blank`,rel:`noopener noreferrer`,children:r.login})}):X?(0,E.jsx)(C,{variant:`primary`,className:$,disabled:M,onClick:()=>void R(`retry_delivery`),children:r.retryDelivery}):Z||a?.reloadRequired||_?(0,E.jsx)(C,{variant:`primary`,className:$,disabled:M||H,onClick:()=>{I.current=``,a?R(`advance`):w()},children:r.check}):W||z?(0,E.jsx)(C,{variant:`primary`,className:$,onClick:Q,children:a?.returnChannel===`weixin`?r.done:r.back}):null,!W&&!z?(0,E.jsx)(C,{variant:`ghost`,className:`min-h-11 w-full rounded-xl text-sm`,disabled:M,onClick:Q,children:r.later}):null]})]})]})})}function k(){let e=(0,w.c)(8),{setupId:t}=i(),n=t===void 0?``:t,r=a(),o=s(A),[c,l]=(0,T.useState)(!1),u;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(u=()=>l(!1),e[0]=u):u=e[0];let d;e[1]===n?d=e[2]:(d=[n],e[1]=n,e[2]=d),(0,T.useEffect)(u,d);let f;return e[3]!==c||e[4]!==o||e[5]!==r||e[6]!==n?(f=(0,E.jsx)(`main`,{className:`flex h-full min-h-0 items-center justify-center bg-surface-base p-6`,children:c?(0,E.jsxs)(`section`,{className:`max-w-xs space-y-4 text-center`,children:[(0,E.jsx)(_,{className:`mx-auto size-6 text-fg-muted`,"aria-hidden":!0}),(0,E.jsx)(`h1`,{className:`text-lg font-medium text-fg`,children:D[o].closed}),(0,E.jsx)(C,{onClick:()=>l(!1),children:D[o].reopen})]}):(0,E.jsx)(O,{setupId:n,onClose:e=>{e?.returnChannel===`weixin`?l(!0):r(e?`/chat/${e.conversationId}`:`/chat`,{replace:!0})}})}),e[3]=c,e[4]=o,e[5]=r,e[6]=n,e[7]=f):f=e[7],f}function A(e){return e.language}export{O as McpConversationSetupDialog,k as McpConversationSetupPage};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./notes-api-_jYkMe8e.js";
|
|
@@ -1,8 +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{f as i,l as a,m as ee,u as te}from"./chunk-KS7C4IRE-CiwuuyV8.js";import{f as o,l as s,n as c}from"./locale-store-CnHhWsDP.js";import{t as l}from"./messages-CZCXd6Pj.js";import{t as u}from"./archive-Dz0hferG.js";import{t as d}from"./arrow-left-D880xG-P.js";import{t as f}from"./arrow-right-DSSvoX71.js";import{t as p}from"./arrow-up-D5ZtR1QT.js";import{f as m}from"./product-automation-feedback-DmdIebRg.js";import{N as h,R as g}from"./recording-upload-CxcMaBPr.js";import{t as _}from"./calendar-days-hw_Y-g-s.js";import{t as ne}from"./chevron-down-ccbiQQz_.js";import{t as re}from"./popover-select-CLsphyzA.js";import{t as ie}from"./ellipsis-0k4rZLoy.js";import{t as v}from"./file-text-D12HbeVy.js";import{t as ae}from"./folder-CN-pC3XL.js";import{D as y,E as b,M as x,_ as S,g as C,i as w,p as T,s as E}from"./notes-api-_jYkMe8e.js";import{n as D,t as O}from"./star-BuMAkjC9.js";import{t as oe}from"./loader-circle-CifKLtgG.js";import{B as k}from"./markdown-view-CWhAtI1O.js";import{t as se}from"./mic-CuUb7zc-.js";import{n as ce,t as A}from"./scan-search-CSIGkseh.js";import{t as j}from"./paperclip-f1HujQY1.js";import{t as le}from"./plus-Q2yW6OE7.js";import{t as ue}from"./search-DA7gz22f.js";import{t as de}from"./sparkles-DHlfQFAF.js";import{t as fe}from"./trash-2-DusmjVPV.js";import{t as M}from"./x-B_N4OPjy.js";import{t as N}from"./cn-0WouolD0.js";import{t as P}from"./skeleton-DzdOeGYz.js";import{i as pe}from"./vendor-swr-CdRzEUwF.js";import{r as me}from"./app-chrome-BeB4KgOf.js";import{t as he}from"./page-header-store-7jhoVGK_.js";import{t as ge}from"./sliding-tab-list-CmcrqRzN.js";import{t as _e}from"./confirm-dialog-DkviAS5j.js";import{n as ve}from"./index.module-Cd9ENXfk.js";import{l as ye,m as be,o as xe,r as Se,t as Ce}from"./dist-ZrL34Ps4.js";import{a as we,i as Te,t as F}from"./note-detail-panel-4Pd0mAhL.js";var I=e(t(),1),L=n();async function Ee(e){e.note??=await w({title:e.title,markdown:e.markdown,projectId:e.projectId,channel:`web`},e.requestId);let t=e.note.id;for(let n=e.attachments.length;n<e.files.length;n++)e.attachments.push(await y(t,e.files[n],`${e.requestId}:file:${n}`));if(e.attachments.length){let n=e.attachments.map(e=>`[${e.fileName.replace(/[\\[\]]/g,`\\$&`).replace(/[\r\n]/g,` `)}](${x(t,e.id)})`);e.note=await b(t,{markdown:`${e.markdown}\n\n## ${e.materialHeading}\n\n${n.join(`
|
|
2
|
-
|
|
3
|
-
`)}`})}return{noteId:t,conversationId:(await S(t,{projectId:e.projectId})).conversationId}}function R(e,t,n){let r=new URLSearchParams({draft:n.replace(`{{id}}`,t),autoSend:`1`});return`/chat/${encodeURIComponent(e)}?${r}`}var z=r(),B={meeting:m,requirements:v,research:A,weekly:_};function De({projects:e,projectId:t,onProjectChange:n,onCreated:r,labels:i,projectsLoading:a,projectsError:ee}){let o=i.home,s=te(),[c,l]=(0,I.useState)(``),[u,d]=(0,I.useState)(null),[f,m]=(0,I.useState)(!1),[h,g]=(0,I.useState)([]),[_,ie]=(0,I.useState)(!1),[v,y]=(0,I.useState)(null),[b,x]=(0,I.useState)(``),S=(0,I.useRef)(null),C=(0,I.useRef)(!1),w=(0,I.useRef)(null),T=(0,I.useRef)(null),E=_||!!S.current,D=u?o.templateOptions[u]:null,O=!!(c.trim()||h.length);async function k(){if(!(C.current||!O&&!S.current)){C.current=!0,ie(!0),y(null),S.current??={requestId:crypto.randomUUID(),title:c.trim().split(`
|
|
4
|
-
`)[0]?.slice(0,80)||D?.label||i.titlePlaceholder,markdown:`## ${o.requestHeading}\n\n${D?`${D.prompt}\n`:``}${c.trim()}`,projectId:t||void 0,files:[...h],attachments:[],materialHeading:o.materialsHeading};try{let e=await Ee(S.current);r(),s(R(e.conversationId,e.noteId,o.agentPrompt))}catch(e){S.current.note&&r(),y(e instanceof Error?e.message:i.quickCaptureFailedHint)}finally{C.current=!1,ie(!1)}}}function se(){S.current=null,y(null),l(``),g([]),d(null),m(!1),T.current?.focus()}return(0,z.jsxs)(`section`,{"aria-label":o.askLabel,children:[(0,z.jsxs)(`form`,{onSubmit:e=>{e.preventDefault(),k()},className:`relative rounded-xl border border-edge bg-surface-panel p-4 focus-within:border-accent/60 sm:p-5`,children:[(0,z.jsxs)(`fieldset`,{disabled:E,className:`min-w-0`,children:[(0,z.jsxs)(`label`,{htmlFor:`notes-home-prompt`,className:`flex items-center gap-2 text-xs font-medium text-accent-fg`,children:[(0,z.jsx)(de,{className:`size-4`,"aria-hidden":!0}),o.askLabel]}),(0,z.jsx)(`p`,{className:`mt-1 text-xs leading-5 text-fg-muted`,children:o.agentResultHint}),D?(0,z.jsxs)(`div`,{className:`mt-3 flex items-start gap-2 rounded-lg bg-accent-soft px-3 py-2 text-xs leading-5 text-accent-fg`,children:[(0,z.jsxs)(`p`,{className:`min-w-0 flex-1`,children:[(0,z.jsxs)(`span`,{className:`font-medium`,children:[D.label,` · `]}),D.prompt.split(`
|
|
5
|
-
|
|
6
|
-
`)[0]]}),(0,z.jsx)(`button`,{type:`button`,onClick:()=>d(null),"aria-label":i.searchClear,className:`shrink-0 rounded p-1 hover:bg-surface-hover`,children:(0,z.jsx)(M,{className:`size-3.5`})})]}):null,(0,z.jsx)(`textarea`,{ref:T,id:`notes-home-prompt`,value:c,onChange:e=>l(e.target.value),placeholder:D?D.prompt.split(`
|
|
7
|
-
|
|
8
|
-
`).at(-1):o.askPlaceholder,rows:2,onKeyDown:e=>{(e.metaKey||e.ctrlKey)&&e.key===`Enter`&&!e.nativeEvent.isComposing&&(e.preventDefault(),k())},className:`mt-2 min-h-16 w-full resize-y bg-transparent py-2 text-base leading-6 text-fg outline-none placeholder:text-fg-muted sm:text-sm`}),h.length?(0,z.jsx)(`ul`,{className:`mb-3 flex flex-wrap gap-2`,children:h.map((e,t)=>(0,z.jsxs)(`li`,{className:`flex max-w-full items-center gap-2 rounded-md border border-edge px-2 py-1 text-xs text-fg-muted`,children:[(0,z.jsx)(j,{className:`size-3 shrink-0`,"aria-hidden":!0}),(0,z.jsx)(`span`,{className:`truncate`,children:e.name}),(0,z.jsx)(`button`,{type:`button`,"aria-label":`${o.removeMaterial}: ${e.name}`,onClick:()=>g(e=>e.filter((e,n)=>n!==t)),className:`rounded p-1 hover:bg-surface-hover`,children:(0,z.jsx)(M,{className:`size-3`})})]},`${e.name}-${t}`))}):null,(0,z.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 sm:pr-40`,children:[(0,z.jsx)(`div`,{className:`w-44 max-w-full`,children:(0,z.jsx)(re,{value:t,options:e.filter(e=>e.name.toLowerCase().includes(b.toLowerCase())).map(e=>({value:e.id,label:e.name})),selectedLabel:t?e.find(e=>e.id===t)?.name:o.unassigned,placeholder:o.unassigned,emptyLabel:o.unassigned,ariaLabel:o.assignProject,triggerIcon:(0,z.jsx)(ae,{className:`size-4 shrink-0`,"aria-hidden":!0}),triggerClassName:`h-8 border-transparent bg-transparent px-2 text-xs text-fg-muted hover:bg-surface-hover`,onChange:n,disabled:E,loading:a,statusMessage:ee?o.projectsLoadFailed:void 0,searchPlaceholder:o.projectSearch,searchValue:b,onSearchChange:x})}),(0,z.jsxs)(`button`,{type:`button`,onClick:()=>w.current?.click(),className:`inline-flex h-8 items-center gap-1.5 rounded-md px-2 text-xs text-fg-muted hover:bg-surface-hover`,children:[(0,z.jsx)(j,{className:`size-4`,"aria-hidden":!0}),o.addMaterials]}),(0,z.jsx)(`input`,{ref:w,type:`file`,multiple:!0,className:`hidden`,"aria-label":o.addMaterials,onChange:e=>{let t=Array.from(e.target.files??[]);g(e=>[...e,...t]),e.target.value=``}})]})]}),(0,z.jsx)(`div`,{className:`mt-2 flex justify-end sm:absolute sm:bottom-5 sm:right-5 sm:mt-0`,children:(0,z.jsxs)(`button`,{type:`submit`,disabled:_||!S.current&&!O,className:`inline-flex h-9 items-center gap-2 rounded-lg bg-accent px-4 text-sm font-medium text-on-accent hover:bg-accent-hover focus-visible:ring-2 focus-visible:ring-accent focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50`,children:[_?(0,z.jsx)(oe,{className:`size-4 animate-spin`,"aria-hidden":!0}):(0,z.jsx)(p,{className:`size-4`,"aria-hidden":!0}),_?o.creating:v?o.retry:o.agentCreate]})})]}),v?(0,z.jsxs)(`div`,{className:`mt-3 rounded-lg border border-danger/25 bg-danger-soft px-3 py-3 text-xs text-danger`,role:`alert`,children:[(0,z.jsx)(`p`,{children:v}),S.current?.note?(0,z.jsx)(`p`,{className:`mt-1`,children:o.partialFailure}):null,(0,z.jsxs)(`div`,{className:`mt-2 flex flex-wrap gap-3`,children:[S.current?.note?(0,z.jsx)(`button`,{type:`button`,onClick:()=>s(`/notes/${encodeURIComponent(S.current.note.id)}?edit=1`),className:`underline`,children:o.openSavedDraft}):null,(0,z.jsx)(`button`,{type:`button`,onClick:se,className:`underline`,children:o.newRequest})]})]}):null,(0,z.jsx)(`div`,{className:`mt-2 flex flex-wrap items-center gap-2 text-xs text-fg-muted`,children:(0,z.jsxs)(`button`,{type:`button`,disabled:E,"aria-expanded":f,"aria-controls":`notes-home-templates`,onClick:()=>m(e=>!e),className:`touch-target inline-flex items-center gap-1.5 rounded-md px-2 py-2 hover:bg-surface-hover focus-visible:ring-2 focus-visible:ring-accent disabled:opacity-50`,children:[o.templates,(0,z.jsx)(ne,{className:N(`size-3.5 transition-transform`,f&&`rotate-180`),"aria-hidden":!0})]})}),(0,z.jsxs)(ge,{id:`notes-home-templates`,hidden:!f,className:N(`mt-1 flex-wrap items-center gap-1 text-xs text-fg-muted`,f?`flex`:`hidden`),role:`group`,"aria-label":o.templates,indicatorClassName:`rounded-md bg-accent-soft`,children:[Object.keys(B).map(e=>{let t=B[e];return(0,z.jsxs)(`button`,{type:`button`,disabled:E,"aria-pressed":u===e,onClick:()=>{d(u===e?null:e),T.current?.focus()},className:N(`inline-flex items-center gap-1.5 rounded-md px-2 py-2 hover:bg-surface-hover disabled:opacity-50`,u===e&&`bg-accent-soft text-accent-fg`),children:[(0,z.jsx)(t,{className:`size-3.5`,"aria-hidden":!0}),o.templateOptions[e].label]},e)}),(0,z.jsx)(`button`,{type:`button`,className:`text-xs text-fg-muted`,onClick:()=>window.dispatchEvent(new CustomEvent(`open-recording-recoveries`)),children:i.discussionCapture.recoveredTitle})]})]})}function Oe(e,t){let n=Number(e.get(`page`)??0),r=Number.isSafeInteger(n)&&n>=0?n:0,i=e.get(`view`);return{projectId:e.get(`projectId`)||void 0,unassigned:e.get(`unassigned`)===`true`||i===`unassigned`||void 0,pinned:i===`favorites`||void 0,agentEdited:i===`agent`||void 0,status:i===`archived`?`archived`:void 0,search:t.trim()||void 0,sortBy:`updatedAt`,sortOrder:`desc`,limit:12,offset:r*12}}function ke(e){let t=e.snippet?.trim()??``,n=e.title?.trim();return n&&t.startsWith(n)?t.slice(n.length).replace(/^[\s::·—-]+/,``):t}function Ae(e,t,n){return e.kind===`voice`&&/^Discussion · \d{4}-\d{2}-\d{2} \d{2}:\d{2}$/.test(e.title??``)?n:e.title?.trim()||ke(e).slice(0,48)||t}var V=`touch-target inline-flex min-h-9 items-center justify-center gap-2 rounded-lg px-3 text-sm text-fg-muted hover:bg-surface-hover hover:text-fg focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent disabled:cursor-not-allowed disabled:opacity-50`;function je(){let e=c(e=>e.language),t=l(e).notes,n=t.home,r=s(e=>e.conversationId),i=he(e=>e.setPageHeader),p=he(e=>e.clearPageHeader),_=te(),{pathname:y,search:x}=a(),[S,k]=ee(),A=S.get(`projectId`)||``,j=S.get(`view`)||`all`,M=S.get(`unassigned`)===`true`||j===`unassigned`,F=S.get(`search`)||``,[L]=ve(F,250),[Ee,R]=(0,I.useState)(A),[B,je]=(0,I.useState)(``),[Me,H]=(0,I.useState)(null),[Ne,Pe]=(0,I.useState)(!1),[U,Fe]=(0,I.useState)(!1),[Ie,Le]=(0,I.useState)(new Set),[Re,ze]=(0,I.useState)(null),[Be,Ve]=(0,I.useState)(null),W=(0,I.useRef)(new Set),G=(0,I.useRef)(null),He=(0,I.useRef)(!1),Ue=(0,I.useRef)(null),We=Oe(S,L),K=(We.offset??0)/12,{data:Ge,error:Ke,isLoading:qe,mutate:Je}=pe(r?[`notes-home`,r,We]:null,()=>C(We)),{data:Ye,error:Xe,isLoading:q,mutate:Ze}=pe(r?[`notes-home-projects`,r]:null,T),J=Ye?.items??[],Qe=J.filter(e=>e.noteCount>0).slice(0,2),$e=J.find(e=>e.id===A)?.name??n.projectNotes,et=Ge?.items??[],Y=Ge?.total??0,X=qe||F!==L,tt=(0,I.useMemo)(()=>({justNow:t.justNow,minutesAgo:t.minutesAgo,today:t.today,yesterday:t.yesterday,daysAgo:t.daysAgo,locale:o(e)}),[e,t.justNow,t.minutesAgo,t.today,t.yesterday,t.daysAgo]),[nt,rt]=(0,I.useState)(()=>Date.now());(0,I.useEffect)(()=>{R(A)},[A]),(0,I.useEffect)(()=>{let e=window.setInterval(()=>rt(Date.now()),6e4);return()=>window.clearInterval(e)},[]);let Z=(0,I.useCallback)(()=>{Je().catch(()=>void 0),Ze().catch(()=>void 0)},[Je,Ze]);(0,I.useEffect)(()=>{let e=[`note-updated`,`note-created`,`note-deleted`,`project-updated`,`project-created`,`project-deleted`];return e.forEach(e=>window.addEventListener(e,Z)),()=>e.forEach(e=>window.removeEventListener(e,Z))},[Z]);let it=(0,I.useCallback)((e,t=!1)=>{let n=`${y}${x}`,r=new URLSearchParams({returnTo:n});t&&r.set(`edit`,`1`),_(`/notes/${encodeURIComponent(e)}?${r}`)},[y,x,_]),Q=(0,I.useCallback)(async()=>{if(!(He.current||!r)){He.current=!0,Pe(!0),H(null),G.current??={key:crypto.randomUUID(),projectId:A||void 0};try{let e=await w({markdown:``,kind:`thought`,projectId:G.current.projectId},G.current.key);G.current=null,Z(),it(e.id,!0)}catch(e){H(`${t.createBlankFailed}: ${e instanceof Error?e.message:t.createBlankFailedHint}`)}finally{He.current=!1,Pe(!1)}}},[A,t.createBlankFailed,t.createBlankFailedHint,it,Z,r]),at=(0,I.useCallback)(e=>{k(t=>{let n=new URLSearchParams(t);return e?n.set(`search`,e):n.delete(`search`),n.delete(`page`),n},{replace:!0})},[k]);function $(e,t=`all`){let n=new URLSearchParams;e&&n.set(`projectId`,e),t===`unassigned`?n.set(`unassigned`,`true`):t!==`all`&&n.set(`view`,t),R(e),k(n)}function ot(e){k(t=>{let n=new URLSearchParams(t);return M&&n.set(`unassigned`,`true`),e===`all`?n.delete(`view`):n.set(`view`,e),n.delete(`page`),n})}async function st(e,n){if(!W.current.has(e)){W.current.add(e),Le(new Set(W.current)),H(null);try{await b(e,{pinned:n}),Z()}catch(e){H(`${t.actionFailed}: ${e instanceof Error?e.message:t.quickCaptureFailedHint}`)}finally{W.current.delete(e),Le(new Set(W.current))}}}async function ct(){let e=Re;if(!(!e||Be)){ze(null),Ve(e.id),H(null);try{await E(e.id),window.dispatchEvent(new CustomEvent(`note-deleted`,{detail:{noteId:e.id}})),Z()}catch(e){H(`${t.deleteFailed}: ${e instanceof Error?e.message:t.quickCaptureFailedHint}`)}finally{Ve(null)}}}if((0,I.useLayoutEffect)(()=>{if(!r){p();return}return i({startExtra:null,main:(0,z.jsx)(`h1`,{className:`truncate text-base font-semibold text-fg`,children:t.title}),end:(0,z.jsx)(`div`,{className:N(`flex min-w-0 items-center gap-2`,me),children:(0,z.jsxs)(`label`,{className:`flex h-9 w-32 min-w-0 items-center gap-2 rounded-lg border border-edge bg-surface-panel px-2 sm:w-48`,children:[(0,z.jsx)(ue,{className:`size-4 shrink-0 text-fg-muted`,"aria-hidden":!0}),(0,z.jsx)(`input`,{ref:Ue,type:`search`,value:F,onChange:e=>at(e.target.value),"aria-label":t.searchDialogTitle,placeholder:t.searchPlaceholder,className:`min-w-0 flex-1 bg-transparent text-sm text-fg outline-none placeholder:text-fg-muted`})]})})}),()=>p()},[p,Q,Ne,n.blankNote,t.searchDialogTitle,t.searchPlaceholder,t.title,F,i,at,r]),(0,I.useEffect)(()=>{let e=e=>{!(e.metaKey||e.ctrlKey)||e.altKey||e.isComposing||e.target?.closest(`input, textarea, [contenteditable="true"], [role="dialog"]`)||(e.key.toLowerCase()===`n`&&(e.preventDefault(),Q()),e.key.toLowerCase()===`f`&&(e.preventDefault(),Ue.current?.focus()))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[Q]),!r)return(0,z.jsx)(`div`,{className:`flex flex-1 items-center justify-center p-8 text-sm text-fg-muted`,children:t.needToken});let lt=[{id:`all`,label:n.homeNav,Icon:ce},{id:`favorites`,label:n.favorites,Icon:O},{id:`unassigned`,label:n.unassigned,Icon:D},{id:`archived`,label:t.filterArchived,Icon:u}],ut=A?`project:${A}`:M?`unassigned`:`all`,dt=!X&&!Ke&&Y===0&&!A&&!M&&!F&&j===`all`;return(0,z.jsxs)(`div`,{className:`mx-auto flex h-full min-h-0 w-full max-w-7xl flex-1 overflow-hidden bg-surface-panel px-4 sm:px-6 lg:px-8`,children:[(0,z.jsxs)(`aside`,{className:`hidden w-44 shrink-0 flex-col gap-1 overflow-y-auto py-6 xl:flex`,"aria-label":n.homeNav,children:[lt.map(({id:e,label:t,Icon:n})=>(0,z.jsxs)(`button`,{type:`button`,onClick:()=>$(``,e),"aria-current":!A&&(e===`unassigned`?M:!M&&j===e)?`page`:void 0,className:N(V,`justify-start px-2 text-left text-xs`,!A&&(e===`unassigned`?M:!M&&j===e)&&`bg-surface-hover font-medium text-fg`),children:[(0,z.jsx)(n,{className:`size-4 shrink-0`,"aria-hidden":!0}),t]},e)),(0,z.jsx)(`span`,{className:`mb-1 mt-7 px-2 text-xs text-fg-muted`,children:n.projects}),q?[0,1,2].map(e=>(0,z.jsx)(P,{className:`mb-2 h-8 w-full`},e)):J.slice(0,8).map(e=>(0,z.jsxs)(`button`,{type:`button`,onClick:()=>$(e.id),"aria-current":A===e.id?`page`:void 0,className:N(V,`justify-start px-2 text-left text-xs`,A===e.id&&`bg-surface-hover font-medium text-fg`),children:[(0,z.jsx)(ae,{className:`size-4 shrink-0`,"aria-hidden":!0}),(0,z.jsx)(`span`,{className:`truncate`,children:e.name})]},e.id)),(0,z.jsxs)(`button`,{type:`button`,onClick:()=>_(`/projects`),className:N(V,`mt-2 justify-start px-2 text-xs`),children:[n.allProjects,(0,z.jsx)(f,{className:`ml-auto size-3`,"aria-hidden":!0})]})]}),(0,z.jsx)(`div`,{className:`min-h-0 min-w-0 flex-1 overflow-y-auto overscroll-contain`,children:(0,z.jsxs)(`div`,{className:`flex w-full flex-col pb-4 pt-3 sm:pb-7 lg:pb-9 lg:pt-4 xl:pl-8`,children:[(0,z.jsxs)(`div`,{className:`mb-5 flex flex-wrap items-start justify-between gap-4`,children:[(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`h2`,{className:`min-w-0 break-words text-2xl font-semibold tracking-tight text-fg`,children:A?$e:M?n.unassigned:dt?n.firstNoteTitle:n.continueTitle}),(0,z.jsx)(`p`,{className:`mt-1 text-sm text-fg-muted`,children:A?n.projectDescription:dt?n.firstNoteDescription:n.continueDescription})]}),A?(0,z.jsxs)(`button`,{type:`button`,onClick:()=>_(`/projects/${encodeURIComponent(A)}`),className:N(V,`text-xs`),children:[n.openProject,(0,z.jsx)(f,{className:`size-3.5`,"aria-hidden":!0})]}):null]}),Me?(0,z.jsx)(`p`,{className:`mb-4 rounded-lg border border-danger/25 bg-danger-soft px-3 py-2 text-sm text-danger`,role:`alert`,children:Me}):null,(0,z.jsxs)(`section`,{"aria-label":n.startAction,children:[(0,z.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-3`,children:[(0,z.jsxs)(`button`,{type:`button`,onClick:()=>void Q(),disabled:Ne,className:`touch-target flex min-h-20 items-center gap-3 rounded-xl border border-edge bg-surface-panel p-4 text-left transition-colors hover:bg-surface-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent disabled:opacity-50`,children:[Ne?(0,z.jsx)(oe,{className:`size-5 shrink-0 animate-spin text-fg-muted`,"aria-hidden":!0}):(0,z.jsx)(le,{className:`size-5 shrink-0 text-fg-muted`,"aria-hidden":!0}),(0,z.jsxs)(`span`,{children:[(0,z.jsx)(`span`,{className:`block text-sm font-semibold text-fg`,children:n.blankNote}),(0,z.jsx)(`span`,{className:`mt-1 block text-xs leading-5 text-fg-muted`,children:n.blankActionHint})]})]}),(0,z.jsxs)(`button`,{type:`button`,"aria-label":n.recordAction,onClick:()=>h(A||void 0),className:`touch-target flex min-h-20 items-center gap-3 rounded-xl border border-edge bg-surface-panel p-4 text-left transition-colors hover:bg-surface-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`,children:[(0,z.jsx)(se,{className:`size-5 shrink-0 text-accent-fg`,"aria-hidden":!0}),(0,z.jsxs)(`span`,{children:[(0,z.jsx)(`span`,{className:`block text-sm font-semibold text-fg`,children:n.recordAction}),(0,z.jsx)(`span`,{className:`mt-1 block text-xs leading-5 text-fg-muted`,children:n.recordActionHint})]})]}),(0,z.jsx)(we,{projectId:A||void 0})]}),(0,z.jsxs)(`button`,{type:`button`,onClick:()=>{Fe(e=>!e),U||window.requestAnimationFrame(()=>document.getElementById(`notes-home-prompt`)?.focus())},"aria-expanded":U,"aria-controls":`notes-home-agent-composer`,title:n.agentActionHint,className:`touch-target mt-2 inline-flex min-h-11 items-center gap-2 rounded-lg px-2 text-sm text-fg-muted hover:bg-surface-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`,children:[(0,z.jsx)(de,{className:`size-4 text-accent-fg`,"aria-hidden":!0}),n.agentAction,(0,z.jsx)(ne,{className:N(`size-4 transition-transform`,U&&`rotate-180`),"aria-hidden":!0})]}),(0,z.jsx)(`div`,{id:`notes-home-agent-composer`,hidden:!U,className:N(`mt-3`,!U&&`hidden`),children:(0,z.jsx)(De,{projects:J,projectId:Ee,onProjectChange:R,onCreated:Z,labels:t,projectsLoading:q,projectsError:!!Xe})})]}),Xe?(0,z.jsxs)(`div`,{role:`alert`,className:`mt-4 flex items-center gap-3 text-xs text-danger`,children:[(0,z.jsx)(`span`,{children:n.projectsLoadFailed}),(0,z.jsx)(`button`,{type:`button`,onClick:()=>void Ze().catch(()=>void 0),className:`underline`,children:n.retry})]}):null,dt?null:(0,z.jsxs)(`section`,{className:`mt-8 pb-6`,"aria-label":n.recentNotes,children:[(0,z.jsxs)(`div`,{className:`mb-3 flex flex-wrap items-center justify-between gap-3`,children:[(0,z.jsx)(`h3`,{className:`text-sm font-semibold text-fg`,children:j===`favorites`?n.favorites:j===`archived`?t.filterArchived:A?n.projectNotes:n.recentNotes}),(0,z.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3`,children:[(0,z.jsx)(`button`,{type:`button`,"aria-pressed":j===`agent`,onClick:()=>ot(j===`agent`?`all`:`agent`),className:N(`touch-target rounded-md px-2 text-xs text-fg-muted hover:bg-surface-hover hover:text-fg focus-visible:ring-2 focus-visible:ring-accent`,j===`agent`&&`bg-accent-soft text-accent-fg`),children:n.agentEdited}),(0,z.jsx)(`span`,{className:`hidden text-xs text-fg-muted xl:inline`,children:n.sortUpdated}),(0,z.jsx)(`div`,{className:`w-48 max-w-full xl:hidden`,children:(0,z.jsx)(re,{value:ut,allowEmpty:!1,ariaLabel:n.projects,placeholder:n.allNotes,options:[{value:`all`,label:n.allNotes},{value:`unassigned`,label:n.unassigned},...J.filter(e=>e.name.toLowerCase().includes(B.toLowerCase())).map(e=>({value:`project:${e.id}`,label:e.name}))],selectedLabel:A?$e:M?n.unassigned:n.allNotes,triggerClassName:`h-8 bg-surface-panel text-xs`,loading:q,searchPlaceholder:n.projectSearch,searchValue:B,onSearchChange:je,onChange:e=>$(e.startsWith(`project:`)?e.slice(8):``,e===`unassigned`?e:`all`)})})]})]}),(0,z.jsxs)(ge,{className:`flex flex-wrap items-center gap-x-5 border-b border-edge xl:hidden`,"aria-label":t.libraryTitle,role:`group`,children:[[{id:`all`,label:t.filterAll},{id:`favorites`,label:n.favorites},{id:`archived`,label:t.filterArchived}].map(({id:e,label:t})=>(0,z.jsx)(`button`,{type:`button`,"aria-pressed":j===e||e===`all`&&j===`unassigned`,onClick:()=>ot(e),className:N(`touch-target border-b-2 border-transparent py-3 text-xs text-fg-muted hover:text-fg`,(j===e||e===`all`&&j===`unassigned`)&&`border-fg font-medium text-fg`),children:t},e)),(0,z.jsx)(`span`,{className:`ml-auto py-3 text-xs text-fg-muted`,children:n.sortUpdated})]}),Ke?(0,z.jsxs)(`div`,{className:`py-10 text-center`,role:`alert`,children:[(0,z.jsx)(`p`,{className:`text-sm text-danger`,children:n.loadFailed}),(0,z.jsx)(`button`,{type:`button`,onClick:()=>void Je().catch(()=>void 0),className:N(V,`mt-2`),children:n.retry})]}):X?(0,z.jsx)(`div`,{"aria-busy":`true`,className:`divide-y divide-edge`,children:[0,1,2,3].map(e=>(0,z.jsxs)(`div`,{className:`flex items-center gap-3 py-4`,children:[(0,z.jsx)(P,{className:`h-10 w-8 shrink-0`}),(0,z.jsxs)(`div`,{className:`flex-1 space-y-2`,children:[(0,z.jsx)(P,{className:`h-4 w-2/3`}),(0,z.jsx)(P,{className:`h-3 w-1/2`})]})]},e))}):et.length===0?(0,z.jsxs)(`div`,{className:`flex flex-col items-center px-4 py-12 text-center`,children:[(0,z.jsx)(ce,{className:`mb-4 size-8 text-fg-muted`,strokeWidth:1.3,"aria-hidden":!0}),(0,z.jsx)(`h4`,{className:`text-sm font-medium text-fg`,children:F||j!==`all`&&j!==`unassigned`?n.noMatches:A?n.projectEmpty:n.emptyTitle}),(0,z.jsx)(`p`,{className:`mt-2 max-w-md text-sm leading-6 text-fg-muted`,children:F||j!==`all`&&j!==`unassigned`?n.noMatchesHint:A?n.projectEmptyHint:n.emptyDescription})]}):(0,z.jsx)(`ul`,{className:`divide-y divide-edge`,children:et.map(e=>{let r=e.voiceAttachmentId||e.kind===`voice`?m:e.kind===`bookmark`?g:v,i=Ae(e,t.titlePlaceholder,n.voiceNote),a=ke(e)||(e.coverAttachmentId?t.imageNote:t.noText);return(0,z.jsxs)(`li`,{className:`group flex min-w-0 items-center gap-3 py-4`,children:[(0,z.jsxs)(`button`,{type:`button`,onClick:()=>it(e.id),className:`touch-target flex min-w-0 flex-1 items-center gap-3 rounded-md text-left focus-visible:ring-2 focus-visible:ring-accent`,children:[(0,z.jsx)(`span`,{className:`flex h-10 w-8 shrink-0 items-center justify-center rounded-md border border-edge text-fg-muted`,children:(0,z.jsx)(r,{className:`size-4`,"aria-hidden":!0})}),(0,z.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,z.jsx)(`span`,{className:`block truncate text-base font-medium text-fg sm:text-sm group-hover:text-accent-fg`,children:i}),(0,z.jsxs)(`span`,{className:`mt-1 flex min-w-0 items-center gap-1.5 text-xs text-fg-muted`,children:[e.lastEditTrigger===`ai_edit`?(0,z.jsxs)(`span`,{className:`inline-flex shrink-0 items-center gap-1 text-accent-fg`,children:[(0,z.jsx)(de,{className:`size-3`,"aria-hidden":!0}),n.agentEditLabel,(0,z.jsx)(`span`,{"aria-hidden":!0,children:`·`})]}):null,(0,z.jsx)(`span`,{className:`truncate`,children:a})]}),(0,z.jsx)(`time`,{dateTime:new Date(e.updatedAt).toISOString(),className:`mt-1.5 block text-xs text-fg-muted sm:hidden`,children:Te(e.updatedAt,nt,tt)})]})]}),(0,z.jsx)(`span`,{className:`hidden max-w-32 truncate text-xs text-fg-muted md:block`,title:e.projects?.map(e=>e.name).join(` · `),children:e.projects?.map(e=>e.name).join(` · `)||n.unassigned}),(0,z.jsx)(`time`,{dateTime:new Date(e.updatedAt).toISOString(),className:`hidden w-24 shrink-0 text-right text-xs text-fg-muted sm:block`,children:Te(e.updatedAt,nt,tt)}),(0,z.jsx)(`button`,{type:`button`,onClick:()=>void st(e.id,!e.pinned),disabled:Ie.has(e.id),"aria-label":`${e.pinned?n.unfavorite:n.favorite}: ${i}`,"aria-pressed":!!e.pinned,className:`touch-target inline-flex size-9 shrink-0 items-center justify-center rounded-md text-fg-muted hover:bg-surface-hover hover:text-fg disabled:opacity-50 focus-visible:ring-2 focus-visible:ring-accent`,children:(0,z.jsx)(O,{className:N(`size-4`,e.pinned&&`fill-current text-fg`),"aria-hidden":!0})}),(0,z.jsxs)(ye,{children:[(0,z.jsx)(be,{asChild:!0,children:(0,z.jsx)(`button`,{type:`button`,disabled:Be===e.id,"aria-label":`${t.noteActions}: ${i}`,className:`touch-target inline-flex size-9 shrink-0 items-center justify-center rounded-md text-fg-muted hover:bg-surface-hover hover:text-fg disabled:opacity-50 focus-visible:ring-2 focus-visible:ring-accent`,children:Be===e.id?(0,z.jsx)(oe,{className:`size-4 animate-spin`,"aria-hidden":!0}):(0,z.jsx)(ie,{className:`size-4`,"aria-hidden":!0})})}),(0,z.jsx)(xe,{children:(0,z.jsx)(Ce,{align:`end`,sideOffset:4,className:`z-50 min-w-36 rounded-lg border border-edge bg-surface-overlay p-1 shadow-popover`,children:(0,z.jsxs)(Se,{className:`touch-target flex cursor-pointer items-center gap-2 rounded-md px-3 py-2 text-sm text-danger outline-none hover:bg-danger-soft focus:bg-danger-soft`,onSelect:()=>ze(e),children:[(0,z.jsx)(fe,{className:`size-4`,"aria-hidden":!0}),t.delete]})})})]})]},e.id)})}),!X&&!Ke&&Y>0?(0,z.jsxs)(`div`,{className:`mt-4 flex flex-wrap items-center justify-between gap-3 text-xs text-fg-muted`,"aria-live":`polite`,children:[(0,z.jsx)(`span`,{children:t.noteCount.replace(`{{count}}`,String(Y))}),Y>12||K>0?(0,z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,z.jsx)(`button`,{type:`button`,"aria-label":n.previousPage,disabled:K===0,className:V,onClick:()=>k(e=>{let t=new URLSearchParams(e);return t.set(`page`,String(K-1)),t}),children:(0,z.jsx)(d,{className:`size-4`,"aria-hidden":!0})}),(0,z.jsxs)(`span`,{children:[K+1,` / `,Math.max(1,Math.ceil(Y/12))]}),(0,z.jsx)(`button`,{type:`button`,"aria-label":n.nextPage,disabled:(K+1)*12>=Y,className:V,onClick:()=>k(e=>{let t=new URLSearchParams(e);return t.set(`page`,String(K+1)),t}),children:(0,z.jsx)(f,{className:`size-4`,"aria-hidden":!0})})]}):null]}):null]}),!A&&!M&&(q||Qe.length>0)?(0,z.jsxs)(`section`,{className:`mt-8`,"aria-label":n.continueProjects,children:[(0,z.jsxs)(`div`,{className:`mb-3 flex items-center justify-between`,children:[(0,z.jsx)(`h3`,{className:`text-sm font-semibold text-fg`,children:n.continueProjects}),(0,z.jsx)(`button`,{type:`button`,onClick:()=>_(`/projects`),className:`text-xs text-fg-muted hover:text-fg`,children:n.allProjects})]}),(0,z.jsx)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:q?[0,1].map(e=>(0,z.jsx)(P,{className:`h-28 w-full`},e)):Qe.map(e=>(0,z.jsxs)(`button`,{type:`button`,onClick:()=>$(e.id),className:`min-w-0 rounded-lg border border-edge bg-surface-panel p-3 text-left transition-colors sm:p-4 hover:bg-surface-base focus-visible:ring-2 focus-visible:ring-accent`,children:[(0,z.jsxs)(`span`,{className:`flex items-center gap-2 text-sm font-medium text-fg`,children:[(0,z.jsx)(ae,{className:`size-4 shrink-0`,"aria-hidden":!0}),(0,z.jsx)(`span`,{className:`truncate`,children:e.name})]}),e.description?(0,z.jsx)(`p`,{className:`mt-2 hidden line-clamp-1 text-xs text-fg-muted sm:block`,children:e.description}):null,(0,z.jsxs)(`span`,{className:`mt-2 flex flex-wrap items-center justify-between gap-1 text-xs text-fg-muted sm:mt-3`,children:[(0,z.jsx)(`span`,{children:t.noteCount.replace(`{{count}}`,String(e.noteCount))}),(0,z.jsx)(`span`,{children:e.updatedAt?Te(e.updatedAt,nt,tt):n.emptyProject})]})]},e.id))})]}):null]})}),(0,z.jsx)(_e,{open:Re!==null,title:t.deleteConfirmTitle,description:t.deleteConfirmDescription.replace(`{{title}}`,Re?.title||t.titlePlaceholder),confirmLabel:t.deleteConfirmLabel,cancelLabel:t.deleteCancelLabel,destructive:!0,onConfirm:()=>void ct(),onCancel:()=>ze(null)})]})}function Me(){let e=(0,L.c)(12),{noteId:t}=i(),n=te(),[r]=ee(),a;e[0]===r?a=e[1]:(a=k(r.get(`returnTo`),`/notes`,[`/chat`,`/personal`,`/projects`,`/notes`,`/tasks`]),e[0]=r,e[1]=a);let o=a,s;e[2]!==n||e[3]!==o?(s=()=>{n(o)},e[2]=n,e[3]=o,e[4]=s):s=e[4];let c=s;if(!t)return null;let l=r.get(`edit`)===`1`?`wysiwyg`:`preview`,u;e[5]===r?u=e[6]:(u=r.get(`edit`),e[5]=r,e[6]=u);let d=u===`1`,f;return e[7]!==c||e[8]!==t||e[9]!==l||e[10]!==d?(f=(0,z.jsx)(`div`,{className:`mx-auto flex h-full min-h-0 w-full flex-1 flex-col`,children:(0,z.jsx)(F,{noteId:t,onBack:c,showBackButton:!1,initialMode:l,autoFocus:d},t)}),e[7]=c,e[8]=t,e[9]=l,e[10]=d,e[11]=f):f=e[11],f}function H(){let e=(0,L.c)(2),{noteId:t}=i(),n;return e[0]===t?n=e[1]:(n=t?(0,z.jsx)(Me,{}):(0,z.jsx)(je,{}),e[0]=t,e[1]=n),n}export{H as NotesPage};
|
|
@@ -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{t as i}from"./cn-0WouolD0.js";import{n as a}from"./interaction-BdhHBbYa.js";import{n as o,t as s}from"./sliding-indicator-hwz0sx3h.js";var c=n(),l=e(t(),1),u=r();function d(e){let t=(0,c.c)(51),{items:n,activeTab:r,onChange:d,ariaLabel:f,tabIdPrefix:p,panelIdPrefix:m,orientation:h,className:g,buttonClassName:_,selectedClassName:v,unselectedClassName:y,countClassName:b,onReorder:x}=e,S=h===void 0?`horizontal`:h,C=v===void 0?`bg-surface-active text-fg`:v,w=y===void 0?`text-fg-muted hover:bg-surface-hover hover:text-fg`:y,T=(0,l.useRef)(null),E=o(T,`[role="tab"]`,`[role="tab"][aria-selected="true"]`),[D,O]=(0,l.useState)(null),[k,A]=(0,l.useState)(null),j;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(j=()=>{O(null),A(null)},t[0]=j):j=t[0];let M=j,N;t[1]===g?N=t[2]:(N=i(`relative isolate -mx-1 flex gap-1 overflow-x-auto overscroll-x-contain px-1 pb-1`,g),t[1]=g,t[2]=N);let P;t[3]===x?P=t[4]:(P=e=>{if(!x)return;let t=e.relatedTarget;t instanceof Node&&e.currentTarget.contains(t)||A(null)},t[3]=x,t[4]=P);let F;t[5]!==r||t[6]!==n||t[7]!==d||t[8]!==S?(F=e=>{let t=S===`vertical`?`ArrowUp`:`ArrowLeft`,i=S===`vertical`?`ArrowDown`:`ArrowRight`;if(![t,i,`Home`,`End`].includes(e.key)||!n.length)return;e.preventDefault();let a=n.findIndex(e=>e.id===r),o=e.key===`Home`?0:e.key===`End`?n.length-1:(Math.max(0,a)+(e.key===i?1:-1)+n.length)%n.length;d(n[o].id);let s=e.currentTarget.querySelectorAll(`[role="tab"]`)[o];s?.focus(),s?.scrollIntoView({block:`nearest`,inline:`nearest`})},t[5]=r,t[6]=n,t[7]=d,t[8]=S,t[9]=F):F=t[9];let I;t[10]!==_||t[11]!==C?(I=i(`rounded-lg`,_,C),t[10]=_,t[11]=C,t[12]=I):I=t[12];let L;t[13]!==E||t[14]!==I?(L=(0,u.jsx)(s,{bounds:E,className:I}),t[13]=E,t[14]=I,t[15]=L):L=t[15];let R;if(t[16]!==r||t[17]!==_||t[18]!==b||t[19]!==D||t[20]!==k||t[21]!==E||t[22]!==n||t[23]!==d||t[24]!==x||t[25]!==m||t[26]!==C||t[27]!==p||t[28]!==w){let e;t[30]!==r||t[31]!==_||t[32]!==b||t[33]!==D||t[34]!==k||t[35]!==E||t[36]!==d||t[37]!==x||t[38]!==m||t[39]!==C||t[40]!==p||t[41]!==w?(e=e=>{let{id:t,icon:n,label:o,count:s,suffix:c,title:l}=e,f=t===r,h=D===t,g=k?.id===t&&k.position===`before`,v=k?.id===t&&k.position===`after`;return(0,u.jsxs)(`button`,{type:`button`,role:`tab`,"aria-selected":f,tabIndex:f?0:-1,id:p?`${p}-${t}`:void 0,"aria-controls":m?`${m}-${t}`:void 0,"aria-grabbed":x?h:void 0,draggable:!!x,title:l,className:i(`touch-target relative z-[1] inline-flex shrink-0 items-center gap-1.5 rounded-lg px-3 py-2 text-sm font-medium transition-colors`,`focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-accent`,a.press,f?C:w,x&&`cursor-grab active:cursor-grabbing`,h&&`scale-[0.98] border border-edge bg-surface-active/60 opacity-55 shadow-surface`,(g||v)&&!h&&`bg-surface-hover text-fg`,_),style:f&&E?{backgroundColor:`transparent`,borderColor:`transparent`,boxShadow:`none`}:void 0,onClick:()=>d(t),onDragStart:e=>{x&&(O(t),A(null),e.dataTransfer.effectAllowed=`move`,e.dataTransfer.setData(`text/plain`,t))},onDragOver:e=>{if(!x||!D)return;if(D===t){A(null);return}e.preventDefault(),e.dataTransfer.dropEffect=`move`;let n=e.currentTarget.getBoundingClientRect(),r=e.clientX<n.left+n.width/2?`before`:`after`;A(e=>e?.id===t&&e.position===r?e:{id:t,position:r})},onDrop:e=>{!x||!D||D===t||(e.preventDefault(),x(D,t,k?.id===t?k.position:`before`),M())},onDragEnd:M,children:[g?(0,u.jsx)(`span`,{className:`pointer-events-none absolute -left-0.5 top-1/2 h-5 w-0.5 -translate-y-1/2 rounded-full bg-accent shadow-[0_0_0_2px_var(--color-surface-panel)]`,"aria-hidden":!0}):null,n?(0,u.jsx)(n,{className:`size-3.5 shrink-0`,strokeWidth:1.75,"aria-hidden":!0}):null,(0,u.jsx)(`span`,{children:o}),s==null?null:(0,u.jsx)(`span`,{className:i(`rounded-full bg-surface-hover px-1.5 py-0.5 text-xs tabular-nums text-fg-muted`,b),children:s}),c,v?(0,u.jsx)(`span`,{className:`pointer-events-none absolute -right-0.5 top-1/2 h-5 w-0.5 -translate-y-1/2 rounded-full bg-accent shadow-[0_0_0_2px_var(--color-surface-panel)]`,"aria-hidden":!0}):null]},t)},t[30]=r,t[31]=_,t[32]=b,t[33]=D,t[34]=k,t[35]=E,t[36]=d,t[37]=x,t[38]=m,t[39]=C,t[40]=p,t[41]=w,t[42]=e):e=t[42],R=n.map(e),t[16]=r,t[17]=_,t[18]=b,t[19]=D,t[20]=k,t[21]=E,t[22]=n,t[23]=d,t[24]=x,t[25]=m,t[26]=C,t[27]=p,t[28]=w,t[29]=R}else R=t[29];let z;return t[43]!==f||t[44]!==S||t[45]!==R||t[46]!==N||t[47]!==P||t[48]!==F||t[49]!==L?(z=(0,u.jsxs)(`nav`,{ref:T,"aria-label":f,className:N,role:`tablist`,"aria-orientation":S,onDragLeave:P,onKeyDown:F,children:[L,R]}),t[43]=f,t[44]=S,t[45]=R,t[46]=N,t[47]=P,t[48]=F,t[49]=L,t[50]=z):z=t[50],z}export{d as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./settings-mode-store-DWWvnHvd.js";function t(t){let{children:n,fallback:r}=t,i=r===void 0?null:r;return e()?n:i}export{t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as e,i as t,o as n}from"./locale-store-CnHhWsDP.js";import{t as r}from"./createLucideIcon-DPHK1VkS.js";var i=r(`music-2`,[[`circle`,{cx:`8`,cy:`18`,r:`4`,key:`1fc0mg`}],[`path`,{d:`M12 18V2l7 4`,key:`g04rme`}]]),a=`/api/spaces/items`;function o(e){return`${a}/${encodeURIComponent(e)}`}var s=e=>n(t(e)),c=e=>n(t(e));function l(e,r){return n(t(a),{method:`POST`,body:JSON.stringify({conversationId:e,...r})})}function u(e,r,i){return n(t(`${o(e)}/versions`),{method:`POST`,body:JSON.stringify({sourceVersionId:r,revision:i})})}function d(e,n){return t(`${o(e)}/versions/${encodeURIComponent(n)}/content`)}async function f(t,n,r){let i=await e(d(t,n),{signal:r});if(!i.ok)throw Error(String(i.status));return i.blob()}export{f as a,a as c,u as i,i as l,s as n,d as o,l as r,o as s,c as t};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/attachment-process-heavy-DGZZ-M85.js","assets/rolldown-runtime-aKtaBQYM.js","assets/preload-helper-Czpn1I53.js","assets/pdf-runtime-JnUAvfIa.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{d as a,m as o,t as s,u as c}from"./chunk-KS7C4IRE-CiwuuyV8.js";import{i as l,n as u,o as d}from"./locale-store-CnHhWsDP.js";import{t as f}from"./archive-Dz0hferG.js";import{t as p}from"./arrow-down-to-line-C5D8Vt-L.js";import{t as m}from"./arrow-left-D880xG-P.js";import{n as h,r as g}from"./popover-select-CLsphyzA.js";import{t as _}from"./ellipsis-0k4rZLoy.js";import{t as v}from"./file-image-CDUPkZvG.js";import{t as y}from"./file-text-D12HbeVy.js";import{t as b}from"./file-CStvVK2S.js";import{n as x,t as S}from"./sheet-C2H8iR8Y.js";import{n as C,t as ee}from"./star-BuMAkjC9.js";import{a as w,c as te,l as T,n as ne,o as E,s as re,t as ie}from"./space-api-C302hvkG.js";import{t as ae}from"./presentation-D-Ui_vVA.js";import{t as D}from"./search-DA7gz22f.js";import{i as oe,m as O,n as k,r as A,t as j}from"./preview-runtime-Bd9e2ent.js";import{t as se}from"./trash-2-DusmjVPV.js";import{t as M}from"./x-B_N4OPjy.js";import{t as N}from"./cn-0WouolD0.js";import{t as ce}from"./skeleton-DzdOeGYz.js";import{i as le,t as ue}from"./vendor-swr-CdRzEUwF.js";import"./constants-D5Z-mUto.js";import{a as de,i as fe,o as pe,r as me,s as he}from"./dist-GJ8-1PAx.js";import{i as P}from"./theme-store-VVHRSdNZ.js";import{t as ge}from"./page-header-store-7jhoVGK_.js";var F=n(),I=e(t(),1),L=r();function _e({itemId:e,version:t,hit:n,download:r}){let a=u(e=>e.language),o=P(e=>e.resolved),s=O(t.fileName,t.mimeType),c=s===`audio`||s===`video`,[l,d]=(0,I.useState)(null),f={id:`space:${t.id}`,context:`attachment`,source:{kind:`inline`},fileName:t.fileName,mimeType:t.mimeType,size:t.sizeBytes,type:s===`html`?`text`:s},p=A(f),[m,h]=(0,I.useState)({loading:!0,textContent:null,binaryBuffer:null,loadError:null}),{plugin:g,controls:_}=p,{setPage:v,pageCount:y}=_,b=typeof n?.locator.page==`number`?n.locator.page:void 0,x=typeof n?.locator.slide==`number`?n.locator.slide:void 0,S=typeof n?.locator.line==`number`?n.locator.line:void 0,C=typeof n?.locator.sheet==`string`?n.locator.sheet:void 0,ee=typeof n?.locator.paragraph==`number`?n.locator.paragraph:void 0;if((0,I.useEffect)(()=>{b&&y!==null&&v(b)},[b,y,v]),(0,I.useEffect)(()=>{let n=new AbortController,r;if(!c){if(g.readMode===`metadata`){h({loading:!1,textContent:null,binaryBuffer:null,loadError:null});return}if(g.maxBytes&&t.sizeBytes>g.maxBytes){h({loading:!1,textContent:null,binaryBuffer:null,loadError:a===`zh`?`文件过大,可下载查看`:`File too large to preview`});return}return w(e,t.id,n.signal).then(async e=>{let a=g.readMode===`text`?await e.text():null,o=g.readMode===`binary`?await e.arrayBuffer():null,c=s===`pptx`&&o?await i(()=>import(`./attachment-process-heavy-DGZZ-M85.js`).then(e=>e.processPptx(o,t.fileName)),__vite__mapDeps([0,1,2,3])):void 0;n.signal.aborted||(c&&d(c.extractedText),r=g.readMode===`url`?URL.createObjectURL(new Blob([e],{type:t.mimeType})):void 0,h({loading:!1,textContent:a,binaryBuffer:o,rawUrl:r,loadError:null}))}).catch(()=>{n.signal.aborted||h({loading:!1,textContent:null,binaryBuffer:null,loadError:a===`zh`?`资料暂不可读`:`Content unavailable`})}),()=>{n.abort(),r&&URL.revokeObjectURL(r)}}},[s,c,e,t.id,t.fileName,t.mimeType,t.sizeBytes,g,a]),c){let n=E(e,t.id);return(0,L.jsx)(`div`,{className:`flex min-h-48 min-w-0 flex-1 items-center justify-center overflow-hidden rounded-xl border border-edge-subtle bg-surface-panel p-3`,children:s===`audio`?(0,L.jsx)(`audio`,{src:n,controls:!0,preload:`metadata`,className:`w-full`}):(0,L.jsx)(`video`,{src:n,controls:!0,playsInline:!0,preload:`metadata`,className:`max-h-full max-w-full rounded-lg`})})}return(0,L.jsxs)(`div`,{className:`flex min-h-48 min-w-0 flex-1 flex-col overflow-hidden rounded-xl border border-edge-subtle bg-surface-panel`,children:[g.capabilities.some(e=>[`zoom`,`pageNavigation`,`rotate`,`search`].includes(e))?(0,L.jsx)(`div`,{className:`border-b border-edge-subtle px-2 py-1`,children:(0,L.jsx)(j,{controller:p})}):null,(0,L.jsx)(k,{...m,descriptor:f,language:a,resolvedTheme:o,targetLine:S,targetSlide:x,targetSheet:C,targetParagraph:ee,extractedText:l,controller:p,actions:{onDownload:r,canDownload:!0}})]})}var ve={document:y,pdf:y,spreadsheet:S,presentation:ae,image:v,video:x,audio:T,archive:f},R=`inline-flex size-9 shrink-0 items-center justify-center rounded-lg text-fg-muted hover:bg-surface-hover hover:text-fg focus-visible:ring-2 focus-visible:ring-accent disabled:opacity-50`,z=`block w-full rounded-lg px-3 py-2 text-start text-sm hover:bg-surface-hover`,B=`rounded-lg bg-accent px-3 py-2 text-sm font-medium text-on-accent hover:bg-accent-hover disabled:opacity-50`;function ye(e){return e?.available?e.kind===`task`&&e.taskId?`/tasks/${encodeURIComponent(e.taskId)}`:e.kind===`automation`&&e.automationRunId?`/automations?view=execution&run=${encodeURIComponent(e.automationRunId)}`:`/chat/${encodeURIComponent(e.conversationId)}`:null}function V(e){let t=(0,F.c)(20),{text:n,query:r}=e,i,a,o,s,c;if(t[0]!==r||t[1]!==n){c=Symbol.for(`react.early_return_sentinel`);bb0:{let e=r?n.toLowerCase().indexOf(r.toLowerCase()):-1;if(e<0){let e;t[7]===n?e=t[8]:(e=(0,L.jsx)(L.Fragment,{children:n}),t[7]=n,t[8]=e),c=e;break bb0}i=e+r.length,s=e>40?`…${n.slice(e-40,e)}`:n.slice(0,e),a=`rounded-sm bg-accent-soft text-accent-fg`,o=n.slice(e,i)}t[0]=r,t[1]=n,t[2]=i,t[3]=a,t[4]=o,t[5]=s,t[6]=c}else i=t[2],a=t[3],o=t[4],s=t[5],c=t[6];if(c!==Symbol.for(`react.early_return_sentinel`))return c;let l;t[9]!==a||t[10]!==o?(l=(0,L.jsx)(`mark`,{className:a,children:o}),t[9]=a,t[10]=o,t[11]=l):l=t[11];let u;t[12]!==i||t[13]!==n?(u=n.slice(i,i+100),t[12]=i,t[13]=n,t[14]=u):u=t[14];let d=i+100<n.length?`…`:``,f;return t[15]!==s||t[16]!==l||t[17]!==u||t[18]!==d?(f=(0,L.jsxs)(L.Fragment,{children:[s,l,u,d]}),t[15]=s,t[16]=l,t[17]=u,t[18]=d,t[19]=f):f=t[19],f}function be(e){let t=(0,F.c)(25),{zh:n,previewOpen:r}=e,[i,s]=o(),c=a(),l=(0,I.useRef)(null),u;t[0]===i?u=t[1]:(u=(i.get(`q`)??``).slice(0,160),t[0]=i,t[1]=u);let d=u,f=n?`搜索资料`:`Search results`,p,m;t[2]!==c||t[3]!==d?(p=()=>{let e=l.current;e&&(document.activeElement!==e||c===`POP`)&&(e.value=d)},m=[c,d],t[2]=c,t[3]=d,t[4]=p,t[5]=m):(p=t[4],m=t[5]),(0,I.useLayoutEffect)(p,m);let h;t[6]===s?h=t[7]:(h=function(e){s(t=>{let n=new URLSearchParams(t);return e?n.set(`q`,e):n.delete(`q`),n},{replace:!0})},t[6]=s,t[7]=h);let g=h,_=r?`hidden md:flex`:`flex`,v;t[8]===_?v=t[9]:(v=N(`h-9 w-[clamp(7rem,30vw,18rem)] items-center gap-2 rounded-lg border border-edge-subtle bg-surface-inset px-2.5 focus-within:ring-2 focus-within:ring-accent`,_),t[8]=_,t[9]=v);let y;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,L.jsx)(D,{className:`size-4 shrink-0 text-fg-muted`,"aria-hidden":!0}),t[10]=y):y=t[10];let b;t[11]===g?b=t[12]:(b=e=>g(e.target.value),t[11]=g,t[12]=b);let x;t[13]!==f||t[14]!==d||t[15]!==b?(x=(0,L.jsx)(`input`,{ref:l,defaultValue:d,maxLength:160,onChange:b,"aria-label":f,placeholder:f,className:`min-w-0 flex-1 bg-transparent text-sm text-fg outline-none`}),t[13]=f,t[14]=d,t[15]=b,t[16]=x):x=t[16];let S;t[17]!==g||t[18]!==d||t[19]!==n?(S=d?(0,L.jsx)(`button`,{type:`button`,className:N(R,`size-6`),onClick:()=>{g(``),l.current&&(l.current.value=``,l.current.focus())},"aria-label":n?`清除搜索`:`Clear search`,children:(0,L.jsx)(M,{className:`size-4`})}):null,t[17]=g,t[18]=d,t[19]=n,t[20]=S):S=t[20];let C;return t[21]!==S||t[22]!==v||t[23]!==x?(C=(0,L.jsxs)(`div`,{role:`search`,className:v,children:[y,x,S]}),t[21]=S,t[22]=v,t[23]=x,t[24]=C):C=t[24],C}function H(){let e=u(e=>e.language)===`zh`,t=ge(e=>e.setPageHeader),n=ge(e=>e.clearPageHeader),r=c(),[i,a]=o(),f=i.get(`version`),[v,y]=(0,I.useState)(!1),[x,S]=(0,I.useState)(!1),[T,E]=(0,I.useState)(!1),[ae,D]=(0,I.useState)(``),[O,k]=(0,I.useState)(),A=(0,I.useRef)(new Map),j=i.get(`view`)===`favorites`?`favorites`:i.get(`view`)===`trash`?`trash`:`all`,P=(i.get(`q`)??``).slice(0,160),F=(0,I.useDeferredValue)(P),H=i.get(`item`),U=i.get(`kind`),W=i.get(`taskId`)?`taskId`:i.get(`projectId`)?`projectId`:void 0,xe=[{key:`all`,label:e?`全部资料`:`All results`,Icon:C},{key:`favorites`,label:e?`收藏`:`Favorites`,Icon:ee},{key:`trash`,label:e?`回收站`:`Trash`,Icon:se}],Se=[[`document`,e?`文档`:`Documents`],[`spreadsheet`,e?`表格`:`Spreadsheets`],[`presentation`,e?`演示`:`Slides`],[`image`,e?`图片`:`Images`],[`audio`,e?`音频`:`Audio`],[`video`,e?`视频`:`Video`],[`archive`,e?`压缩包`:`Archives`],[`file`,e?`文件`:`Files`]],G=xe.find(e=>e.key===j)?.label,Ce=!!H;(0,I.useLayoutEffect)(()=>(t({startExtra:null,main:(0,L.jsxs)(`h1`,{className:`flex min-w-0 items-baseline gap-2 text-base font-semibold tracking-tight text-fg`,children:[(0,L.jsx)(`span`,{className:`shrink-0`,children:e?`资料库`:`Space`}),j===`all`?null:(0,L.jsx)(`span`,{className:`truncate text-xs font-normal text-fg-muted`,children:G})]}),end:(0,L.jsx)(be,{zh:e,previewOpen:Ce})}),n),[n,Ce,t,G,j,e]);let K=ue((e,t)=>{if(e&&!t?.nextCursor)return null;let n=new URLSearchParams({view:j,q:F});return U&&n.set(`kind`,U),W&&n.set(W,i.get(W)),e&&t?.nextCursor&&n.set(`cursor`,t.nextCursor),`${te}?${n}`},ne,{refreshInterval:4e3}),q=le(H?re(H):null,ie,{refreshInterval:4e3}),J=K.data?.flatMap(e=>e.items)??[],Y=q.data,X=Y?.versions.find(e=>e.id===f)??Y?.currentVersion,we=X?.id===Y?.currentVersion.id?J.find(e=>e.id===H)?.hit:void 0,Z=Y?.origins.find(e=>e.versionId===X?.id&&e.available)??Y?.origins.find(e=>e.available)??Y?.origin,Te=ye(Z);function Q(e){a(t=>{let n=new URLSearchParams(t);for(let[t,r]of Object.entries(e))r?n.set(t,r):n.delete(t);return n})}function Ee(e){y(!1),S(!1),D(``),Q({item:e,version:null})}function De(){Ee(null),H&&requestAnimationFrame(()=>A.current.get(H)?.focus())}(0,I.useEffect)(()=>{if(!H)return;let e=e=>{if(!(e.key!==`Escape`||e.defaultPrevented)){if(v||x){y(!1),S(!1);return}a(e=>{let t=new URLSearchParams(e);return t.delete(`item`),t.delete(`version`),t}),requestAnimationFrame(()=>A.current.get(H)?.focus())}};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[x,v,H,a]);function Oe(e,t){if(e.key!==`ArrowUp`&&e.key!==`ArrowDown`)return;e.preventDefault();let n=J[t+(e.key===`ArrowDown`?1:-1)];n&&A.current.get(n.id)?.focus()}async function ke(t){if(!T){E(!0),D(``);try{await t()}catch{D(e?`操作未完成,请重试`:`Could not complete the action. Try again.`),q.mutate()}finally{E(!1)}}}function $(e,t,n){return ke(async()=>{await d(l(re(t.id)+(e===`restore`||e===`purge`?`/${e}`:``)),{method:e===`patch`?`PATCH`:e===`trash`?`DELETE`:`POST`,body:JSON.stringify({revision:t.revision,...n})}),e===`trash`&&k({id:t.id,revision:t.revision+1}),(e===`restore`||e===`purge`)&&k(void 0),e===`patch`?(y(!1),await q.mutate()):H===t.id&&Ee(null),await K.mutate()})}async function Ae(){!Y||!X||await ke(async()=>{let e=await w(Y.id,X.id),t=URL.createObjectURL(e),n=document.createElement(`a`);n.href=t,n.download=X.fileName,n.click(),setTimeout(()=>URL.revokeObjectURL(t),1e3)})}function je(){!Y||!X||ke(async()=>{let e=await w(Y.id,X.id);if(e.size>33554432)throw Error(`Attachment too large`);let t=new globalThis.File([e],X.fileName,{type:X.mimeType}),n=new URLSearchParams({attachmentHandoff:oe(t)});Z?.projectId&&Z.available&&n.set(`projectId`,Z.projectId),r({pathname:`/chat/new`,search:`?${n}`},{state:{forceNewChat:!0}})})}function Me(e){if(e.preventDefault(),!Y)return;let t=String(new FormData(e.currentTarget).get(`title`)??``).trim();t&&$(`patch`,Y,{title:t})}let Ne=t=>new Intl.DateTimeFormat(e?`zh-CN`:`en`,{month:`short`,day:`numeric`}).format(t),Pe=t=>t.origin?.label??(t.origin?.kind===`task`?e?`任务`:`Task`:t.origin?.kind===`automation`?e?`定时任务`:`Automation`:e?`对话`:`Chat`);return(0,L.jsxs)(`div`,{className:`flex h-full min-h-0 flex-1 flex-col overflow-hidden`,children:[(0,L.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col md:flex-row`,children:[(0,L.jsx)(`nav`,{"aria-label":e?`资料库`:`Space`,className:N(`flex shrink-0 items-center gap-1 border-b border-edge-subtle bg-surface-inset p-2 md:my-4 md:ms-4 md:w-40 md:flex-col md:items-stretch md:rounded-xl md:border-b-0 md:p-3`,H&&`hidden md:flex`),children:xe.map(({key:e,label:t,Icon:n})=>(0,L.jsxs)(`button`,{type:`button`,"aria-pressed":j===e,onClick:()=>{k(void 0),D(``),Q({view:e===`all`?null:e,item:null,version:null,q:null,kind:null})},className:N(`flex items-center gap-2 rounded-lg px-2 py-2 text-start text-sm`,e===`trash`&&`md:mt-auto`,j===e?`bg-accent-soft text-accent-fg`:`text-fg-muted hover:bg-surface-hover`),children:[(0,L.jsx)(n,{className:`size-4 shrink-0`,"aria-hidden":!0}),t]},e))}),(0,L.jsxs)(`section`,{className:N(`min-w-0 flex-1 flex-col overflow-y-auto px-4 py-5 md:px-5`,H?`hidden md:flex`:`flex`),"aria-label":G,children:[(0,L.jsxs)(`div`,{className:`mb-3 flex flex-wrap items-center gap-2`,children:[(0,L.jsxs)(h,{value:U??`all`,onChange:e=>Q({kind:e.target.value===`all`?null:e.target.value}),children:[(0,L.jsx)(g,{value:`all`,children:e?`全部类型`:`All types`}),Se.map(([e,t])=>(0,L.jsx)(g,{value:e,children:t},e))]}),W?(0,L.jsxs)(`button`,{type:`button`,onClick:()=>Q({[W]:null}),className:`inline-flex items-center gap-1 rounded-lg bg-surface-inset px-2 py-1 text-sm text-fg-muted hover:bg-surface-hover`,children:[W===`projectId`?e?`当前项目`:`Project`:e?`当前任务`:`Task`,(0,L.jsx)(M,{className:`size-3.5`})]}):null]}),K.isLoading?(0,L.jsx)(`div`,{className:`space-y-2`,"aria-busy":`true`,children:Array.from({length:5},(e,t)=>(0,L.jsx)(ce,{className:`h-14 w-full rounded-xl`},t))}):null,K.error?(0,L.jsx)(`button`,{className:`rounded-lg py-3 text-sm text-accent-fg`,onClick:()=>void K.mutate(),children:e?`加载失败,重试`:`Could not load. Retry`}):null,!K.isLoading&&!K.error&&J.length===0?(0,L.jsx)(`p`,{className:`py-10 text-center text-sm text-fg-muted`,children:P?e?`没有匹配的资料`:`No matching results`:j===`favorites`?e?`暂无收藏`:`No favorites`:j===`trash`?e?`回收站为空`:`Trash is empty`:e?`暂无资料`:`No results yet`}):null,(0,L.jsx)(`ul`,{className:`space-y-0.5`,children:J.map((e,t)=>{let n=ve[e.kind]??b;return(0,L.jsx)(`li`,{children:(0,L.jsxs)(`button`,{type:`button`,ref:t=>{t?A.current.set(e.id,t):A.current.delete(e.id)},onKeyDown:e=>Oe(e,t),"aria-pressed":H===e.id,onClick:()=>Ee(e.id),className:N(`flex min-h-14 w-full items-center gap-3 rounded-xl px-2.5 py-2 text-start focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-accent`,H===e.id?`bg-accent-soft`:`hover:bg-surface-hover`),children:[(0,L.jsx)(`span`,{className:N(`grid size-9 shrink-0 place-items-center rounded-lg bg-surface-inset`,H===e.id?`text-accent-fg`:`text-fg-muted`),children:(0,L.jsx)(n,{className:`size-4`,"aria-hidden":!0})}),(0,L.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,L.jsx)(`span`,{className:`block truncate text-sm font-medium text-fg`,children:(0,L.jsx)(V,{text:e.title,query:F.trim()})}),(0,L.jsxs)(`span`,{className:`block truncate text-xs text-fg-muted`,children:[e.currentVersion.fileName.split(`.`).at(-1)?.toUpperCase(),` · `,Pe(e)]}),e.hit?(0,L.jsx)(`span`,{className:`block truncate text-xs text-fg-muted`,children:(0,L.jsx)(V,{text:e.hit.text,query:F.trim()})}):null]}),(0,L.jsx)(`span`,{className:`hidden shrink-0 text-xs text-fg-subtle lg:block`,children:Ne(e.updatedAt)})]})},e.id)})}),K.data?.at(-1)?.nextCursor?(0,L.jsx)(`button`,{className:`mt-3 rounded-lg py-2 text-sm text-accent-fg`,onClick:()=>void K.setSize(K.size+1),children:e?`加载更多`:`Load more`}):null]}),H?(0,L.jsxs)(`section`,{"aria-label":e?`资料预览`:`Result preview`,className:`flex min-h-0 min-w-0 flex-1 flex-col gap-3 overflow-y-auto bg-surface-inset px-4 py-4 md:max-w-[48%] md:border-l md:border-edge-subtle`,children:[(0,L.jsxs)(`header`,{className:`flex items-center gap-1`,children:[(0,L.jsx)(`button`,{type:`button`,className:N(R,`md:hidden`),onClick:De,"aria-label":e?`返回`:`Back`,children:(0,L.jsx)(m,{className:`size-4`})}),(0,L.jsx)(`h2`,{className:`min-w-0 flex-1 truncate text-sm font-semibold text-fg`,children:Y?.title??(e?`预览`:`Preview`)}),Y&&!Y.trashedAt?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`button`,{type:`button`,className:N(R,Y.favorite&&`text-accent-fg`),"aria-pressed":Y.favorite,"aria-label":e?`收藏`:`Favorite`,disabled:T,onClick:()=>void $(`patch`,Y,{favorite:!Y.favorite}),children:(0,L.jsx)(ee,{className:N(`size-4`,Y.favorite&&`fill-current`)})}),(0,L.jsx)(`button`,{type:`button`,className:R,disabled:T,"aria-label":e?`下载`:`Download`,onClick:()=>void Ae(),children:(0,L.jsx)(p,{className:`size-4`})}),(0,L.jsxs)(pe,{children:[(0,L.jsx)(he,{className:R,"aria-label":e?`更多操作`:`More actions`,children:(0,L.jsx)(_,{className:`size-4`})}),(0,L.jsx)(de,{children:(0,L.jsxs)(fe,{align:`end`,sideOffset:5,className:`z-50 min-w-36 rounded-xl border border-edge bg-surface-overlay p-1 shadow-popover`,children:[(0,L.jsx)(me,{className:z,onClick:()=>y(!0),children:e?`重命名`:`Rename`}),(0,L.jsx)(me,{className:N(z,`text-red-600 dark:text-red-400`),disabled:T,onClick:()=>void $(`trash`,Y),children:e?`移到回收站`:`Move to Trash`})]})})]})]}):null,(0,L.jsx)(`button`,{type:`button`,className:N(R,`hidden md:inline-flex`),onClick:De,"aria-label":e?`关闭预览`:`Close preview`,children:(0,L.jsx)(M,{className:`size-4`})})]}),v&&Y?(0,L.jsxs)(`form`,{className:`flex flex-wrap items-center gap-2`,onSubmit:Me,children:[(0,L.jsx)(`input`,{name:`title`,defaultValue:Y.title,required:!0,maxLength:240,autoFocus:!0,"aria-label":e?`资料名称`:`Result name`,className:`min-w-24 flex-1 rounded-lg border border-edge bg-surface-panel px-2 py-2 text-sm`}),(0,L.jsx)(`button`,{className:B,disabled:T,children:e?`保存`:`Save`}),(0,L.jsx)(`button`,{type:`button`,className:`rounded-lg p-2 text-sm hover:bg-surface-hover`,onClick:()=>y(!1),children:e?`取消`:`Cancel`})]}):null,q.isLoading?(0,L.jsx)(ce,{className:`min-h-64 flex-1 rounded-xl`}):null,q.error?(0,L.jsx)(`p`,{className:`py-5 text-sm text-fg-muted`,children:e?`资料暂不可用`:`Result unavailable`}):null,Y&&X?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(_e,{itemId:Y.id,version:X,hit:we,download:Ae},X.id),we?(0,L.jsx)(`p`,{className:`line-clamp-2 text-xs text-fg-muted`,children:(0,L.jsx)(V,{text:we.text,query:F.trim()})}):null,(0,L.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-2 text-xs text-fg-muted`,children:[(0,L.jsx)(`span`,{children:Z?Pe(Y):null}),X.indexStatus===`pending`?(0,L.jsx)(`span`,{children:e?`正在索引`:`Indexing`}):null,Y.versions.length>1?(0,L.jsx)(h,{value:X.id,onChange:e=>Q({version:e.target.value}),children:Y.versions.map((t,n)=>(0,L.jsxs)(g,{value:t.id,children:[t.id===Y.currentVersion.id?e?`最新版`:`Latest`:Ne(t.createdAt),` · v`,Y.versions.length-n]},t.id))}):null]}),(0,L.jsx)(`footer`,{className:`flex flex-wrap items-center justify-between gap-2`,children:Y.trashedAt?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`button`,{type:`button`,className:B,disabled:T,onClick:()=>void $(`restore`,Y),children:e?`恢复`:`Restore`}),(0,L.jsx)(`button`,{type:`button`,className:`rounded-lg px-2 py-2 text-sm text-red-600 hover:bg-surface-hover dark:text-red-400`,onClick:()=>S(!0),children:e?`永久删除`:`Delete permanently`})]}):(0,L.jsxs)(L.Fragment,{children:[Te?(0,L.jsx)(s,{className:`rounded-lg px-2 py-2 text-sm text-fg-muted hover:bg-surface-hover`,to:Te,children:e?`查看来源`:`Open source`}):(0,L.jsx)(`span`,{}),(0,L.jsx)(`button`,{type:`button`,className:B,disabled:T||X.sizeBytes>33554432,title:X.sizeBytes>33554432?e?`超过对话附件大小上限`:`Exceeds the chat attachment size limit`:void 0,onClick:je,children:e?`在对话中使用`:`Use in chat`})]})}),x?(0,L.jsxs)(`div`,{role:`alert`,className:`rounded-xl border border-edge bg-surface-panel p-3 text-sm`,children:[(0,L.jsx)(`p`,{children:e?`永久删除「${Y.title}」?`:`Delete “${Y.title}” permanently?`}),(0,L.jsxs)(`div`,{className:`mt-2 flex justify-end gap-2`,children:[(0,L.jsx)(`button`,{type:`button`,className:z,onClick:()=>S(!1),children:e?`取消`:`Cancel`}),(0,L.jsx)(`button`,{type:`button`,className:N(z,`text-red-600 dark:text-red-400`),disabled:T,onClick:()=>void $(`purge`,Y),children:e?`删除`:`Delete`})]})]}):null]}):null]}):null]}),ae||O?(0,L.jsxs)(`div`,{className:`flex items-center justify-between gap-2 border-t border-edge-subtle bg-surface-panel px-4 py-2 text-sm`,role:`status`,children:[(0,L.jsx)(`span`,{children:ae||(e?`已移到回收站`:`Moved to Trash`)}),O?(0,L.jsx)(`button`,{type:`button`,disabled:T,className:`rounded-lg p-1 text-accent-fg`,onClick:()=>void $(`restore`,O),children:e?`撤销`:`Undo`}):null]}):null]})}export{H as SpacePage};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{p as e}from"./locale-store-CnHhWsDP.js";var t=e(e=>({agentId:``,setAgentId:t=>e({agentId:t})}));export{t};
|