@xopcai/xopc 0.0.450 → 0.0.454

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.
Files changed (436) hide show
  1. package/dist/browser-ext/manifest.json +1 -1
  2. package/dist/extensions/telegram/xopc.extension.json +1 -1
  3. package/dist/gateway/static/root/assets/{activity-store-Tn5McYcg.js → activity-store-BKH-qNPt.js} +1 -1
  4. package/dist/gateway/static/root/assets/{agent-avatar-dicebear-BX5HhrTI.js → agent-avatar-dicebear-DY6IWy0_.js} +1 -1
  5. package/dist/gateway/static/root/assets/{agent-avatar-display-C7Dx9nt1.js → agent-avatar-display-tnAtQOAZ.js} +2 -2
  6. package/dist/gateway/static/root/assets/{agent-defaults-settings-panel-AAJsxEjB.js → agent-defaults-settings-panel-BLQ2N_dY.js} +1 -1
  7. package/dist/gateway/static/root/assets/{agent-plugin-dialog-BhtzU8qr.js → agent-plugin-dialog-Bfsm4GOs.js} +1 -1
  8. package/dist/gateway/static/root/assets/{agents-CbGYb9WI.js → agents-CDNiLv0W.js} +3 -3
  9. package/dist/gateway/static/root/assets/{agents-admin-api-CShyoj9I.js → agents-admin-api-DGZsm8U4.js} +1 -1
  10. package/dist/gateway/static/root/assets/{api-BET9vZ1l.js → api-Bbj5k-7e.js} +1 -1
  11. package/dist/gateway/static/root/assets/api-BhipC15e.js +1 -0
  12. package/dist/gateway/static/root/assets/{app-link-CdD448kS.js → app-link-CCZ-LmVT.js} +1 -1
  13. package/dist/gateway/static/root/assets/{app-management-settings-panel-BxOShFPO.js → app-management-settings-panel-fwhXHKxt.js} +1 -1
  14. package/dist/gateway/static/root/assets/{appearance-settings-L450QlMW.js → appearance-settings-BHkl-vFO.js} +1 -1
  15. package/dist/gateway/static/root/assets/{apps-page-Bz6_fyMs.js → apps-page-DtCWwdsK.js} +1 -1
  16. package/dist/gateway/static/root/assets/{archive-plugin-BCXEOal7.js → archive-plugin-B9xaxa7V.js} +1 -1
  17. package/dist/gateway/static/root/assets/arrow-up-right-T72JbQ1Q.js +1 -0
  18. package/dist/gateway/static/root/assets/{automation-api-B3Jnoa2G.js → automation-api-BHMjSwcy.js} +1 -1
  19. package/dist/gateway/static/root/assets/{automation-result-state-BHAKc5QI.js → automation-result-state-BgAjEoNV.js} +1 -1
  20. package/dist/gateway/static/root/assets/automation-run-list-D3Eon5C0.js +1 -0
  21. package/dist/gateway/static/root/assets/{automation-task-card-Clf0fe_n.js → automation-task-card-DJRg72t-.js} +1 -1
  22. package/dist/gateway/static/root/assets/{automations-page-BEG5xLew.js → automations-page-DdAzXb7s.js} +1 -1
  23. package/dist/gateway/static/root/assets/{automations-workspace-Cfq1C6XB.js → automations-workspace-D0nNat6N.js} +2 -2
  24. package/dist/gateway/static/root/assets/{binary-plugins-B7tuUWzS.js → binary-plugins-CgsjdprR.js} +1 -1
  25. package/dist/gateway/static/root/assets/{block-editor-D-YHASZr.js → block-editor-r6vj6dZO.js} +1 -1
  26. package/dist/gateway/static/root/assets/{browser-settings-page-DdMMia7Y.js → browser-settings-page-APCGT8Yr.js} +1 -1
  27. package/dist/gateway/static/root/assets/{capabilities-YfkMBZCb.js → capabilities-0gYkjdax.js} +1 -1
  28. package/dist/gateway/static/root/assets/{capabilities-Cxh3nYa6.js → capabilities-BgBwcqvY.js} +1 -1
  29. package/dist/gateway/static/root/assets/capabilities-page-B1x3TwdV.js +2 -0
  30. package/dist/gateway/static/root/assets/capabilities-settings-panel-CZ78ckHR.js +8 -0
  31. package/dist/gateway/static/root/assets/capability-navigation-QtHJxxW2.js +1 -0
  32. package/dist/gateway/static/root/assets/{channels-DdSEH-R2.js → channels-8Y08v4Q2.js} +1 -1
  33. package/dist/gateway/static/root/assets/{chat-agents-api-CgasFAm4.js → chat-agents-api-BRQDNNI5.js} +1 -1
  34. package/dist/gateway/static/root/assets/{chat-chart-block-Cgks7rH3.js → chat-chart-block-qMGhfeQZ.js} +1 -1
  35. package/dist/gateway/static/root/assets/chat-page-CSTyfO9c.js +71 -0
  36. package/dist/gateway/static/root/assets/{chat-terminal-dock-aCu4X5Jo.js → chat-terminal-dock-0PJ9dURQ.js} +1 -1
  37. package/dist/gateway/static/root/assets/{command-palette-api-Bku_h283.js → command-palette-api-C4U_-rDo.js} +1 -1
  38. package/dist/gateway/static/root/assets/composer-model-config-control-B9Q40ptH.js +1 -0
  39. package/dist/gateway/static/root/assets/composer-notifications-ByuA8h5Z.js +1 -0
  40. package/dist/gateway/static/root/assets/composer-payload-handoff-zr1JDn3p.js +1 -0
  41. package/dist/gateway/static/root/assets/{computer-settings-page-zvWUPPAr.js → computer-settings-page-D2F1quZR.js} +1 -1
  42. package/dist/gateway/static/root/assets/{confirm-dialog-D7dQJytv.js → confirm-dialog-DrA5mTQp.js} +1 -1
  43. package/dist/gateway/static/root/assets/connected-providers-grid-CgULhOBZ.js +1 -0
  44. package/dist/gateway/static/root/assets/{connection-usage-guide-DL2T6cSN.js → connection-usage-guide-DkDsHm_l.js} +1 -1
  45. package/dist/gateway/static/root/assets/{connector-service-page-a0gQC-nc.js → connector-service-page-1AcvESmp.js} +1 -1
  46. package/dist/gateway/static/root/assets/{connectors-api-DNVUmf9M.js → connectors-api-C1OML7OO.js} +1 -1
  47. package/dist/gateway/static/root/assets/connectors-page-CMIY0Zj_.js +1 -0
  48. package/dist/gateway/static/root/assets/{date-picker-E0cqnNlR.js → date-picker-D1eFhoMI.js} +1 -1
  49. package/dist/gateway/static/root/assets/{date-time-picker-CrC_VKpw.js → date-time-picker-CqplKVk6.js} +1 -1
  50. package/dist/gateway/static/root/assets/{desktop-pet-D1MkNl5F.js → desktop-pet-UmrjWSq-.js} +1 -1
  51. package/dist/gateway/static/root/assets/{desktop-pet-settings-BA6u5Md-.js → desktop-pet-settings-DRRDJMu6.js} +1 -1
  52. package/dist/gateway/static/root/assets/{dev-view-store-DnqJb6NS.js → dev-view-store-CtKJMK52.js} +1 -1
  53. package/dist/gateway/static/root/assets/{device-pairing-wizard-Ba3d606o.js → device-pairing-wizard-C4aSCbqo.js} +1 -1
  54. package/dist/gateway/static/root/assets/{directory-picker-path-field-lcps-hsZ.js → directory-picker-path-field-D9U9yfnb.js} +1 -1
  55. package/dist/gateway/static/root/assets/{discussion-annotation-sync-BmvCn1Xn.js → discussion-annotation-sync-D-eGt1_L.js} +1 -1
  56. package/dist/gateway/static/root/assets/dist-CY7CS_D3.js +1 -0
  57. package/dist/gateway/static/root/assets/extension-authoritative-grants-8ONVOjPW.js +1 -0
  58. package/dist/gateway/static/root/assets/{extension-debug-page-BOJbNj9D.js → extension-debug-page-BTLcC8-r.js} +1 -1
  59. package/dist/gateway/static/root/assets/extension-iframe-host-D0-OvFV2.js +1 -0
  60. package/dist/gateway/static/root/assets/{extension-marketplace-api-BrLsjJLA.js → extension-marketplace-api-DLRCNlej.js} +1 -1
  61. package/dist/gateway/static/root/assets/extension-message-router-DboLTCVp.js +1 -0
  62. package/dist/gateway/static/root/assets/extension-page-CdpI-Plq.js +1 -0
  63. package/dist/gateway/static/root/assets/extension-provider-DUDaMvQg.js +1 -0
  64. package/dist/gateway/static/root/assets/{extension-settings-page-BuV-Vuvb.js → extension-settings-page-biWCnMGr.js} +1 -1
  65. package/dist/gateway/static/root/assets/{file-preview-surface-B3nLuoQO.js → file-preview-surface-CnBRiQo8.js} +1 -1
  66. package/dist/gateway/static/root/assets/{gateway-config-swr-CtZy1Qw0.js → gateway-config-swr-BV5fpBSK.js} +1 -1
  67. package/dist/gateway/static/root/assets/{gateway-realtime-CG65gHUY.js → gateway-realtime-CIqLQXlm.js} +1 -1
  68. package/dist/gateway/static/root/assets/gateway-realtime-store-B6T1Xzag.js +1 -0
  69. package/dist/gateway/static/root/assets/{gateway-restart-Cr5xtfZU.js → gateway-restart-DBkfCzT5.js} +1 -1
  70. package/dist/gateway/static/root/assets/{gateway-settings-BwMwdwXh.js → gateway-settings-DTzXUm9f.js} +1 -1
  71. package/dist/gateway/static/root/assets/{gateway-startup-retry-DztAHGru.js → gateway-startup-retry-B49N_Ngm.js} +1 -1
  72. package/dist/gateway/static/root/assets/{global-defaults-api-yHc-ZfjU.js → global-defaults-api-DVpxe45P.js} +1 -1
  73. package/dist/gateway/static/root/assets/home-page-DvaxBrjG.js +3 -0
  74. package/dist/gateway/static/root/assets/{image-generation-api-D5eo_stq.js → image-generation-api-CAKYslID.js} +1 -1
  75. package/dist/gateway/static/root/assets/imports-page-C2KmQJ2H.js +1 -0
  76. package/dist/gateway/static/root/assets/index-B49yIcMR.css +1 -0
  77. package/dist/gateway/static/root/assets/index-BpzvsoS1.js +11 -0
  78. package/dist/gateway/static/root/assets/{install-connector-dialog-B-v1FT3P.js → install-connector-dialog-CmNvZt8M.js} +1 -1
  79. package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-BLBASsCP.js → keyboard-shortcuts-settings-syG2KRr2.js} +1 -1
  80. package/dist/gateway/static/root/assets/local-app-workbench-page-DGA4EHGm.js +1 -0
  81. package/dist/gateway/static/root/assets/local-apps-CB-MZAaL.js +1 -0
  82. package/dist/gateway/static/root/assets/{local-apps-page-Db93n4Zy.js → local-apps-page-I0O2ybpp.js} +1 -1
  83. package/dist/gateway/static/root/assets/{local-session-drafts-C6oPrCYY.js → local-session-drafts-DsPDloiq.js} +1 -1
  84. package/dist/gateway/static/root/assets/{locale-store-CQcW9_qA.js → locale-store-D3c8DIm-.js} +1 -1
  85. package/dist/gateway/static/root/assets/logs-page-u9FTZaTh.js +2 -0
  86. package/dist/gateway/static/root/assets/{management-api-Dh2r5GrQ.js → management-api-uxRxRX-6.js} +1 -1
  87. package/dist/gateway/static/root/assets/{management-settings-Fj25fafb.js → management-settings-BCbDfM7f.js} +1 -1
  88. package/dist/gateway/static/root/assets/{markdown-view-CkihBz06.js → markdown-view-ohhExTMC.js} +1 -1
  89. package/dist/gateway/static/root/assets/{mcp-conversation-setup-page-jh3dwNfg.js → mcp-conversation-setup-page-382BGqQC.js} +1 -1
  90. package/dist/gateway/static/root/assets/{media-plugins-BUapXtQZ.js → media-plugins-B5wtLz3Z.js} +1 -1
  91. package/dist/gateway/static/root/assets/messages-DPLud9GK.js +3 -0
  92. package/dist/gateway/static/root/assets/{model-selector-DYxgKUju.js → model-selector-CoKcq0AZ.js} +1 -1
  93. package/dist/gateway/static/root/assets/{models-hub-cache-D2cdb8nZ.js → models-hub-cache-CtooMAQW.js} +1 -1
  94. package/dist/gateway/static/root/assets/{note-detail-panel-BMtKrv-J.js → note-detail-panel-DiGQtSD0.js} +3 -3
  95. package/dist/gateway/static/root/assets/note-image-lightbox-Ds4M9fJJ.js +1 -0
  96. package/dist/gateway/static/root/assets/{notes-api-BhRyWe3S.js → notes-api-Cvet94d8.js} +1 -1
  97. package/dist/gateway/static/root/assets/{notes-page-DcmRJJbt.js → notes-page-DwlmKweX.js} +2 -2
  98. package/dist/gateway/static/root/assets/{oauth-api-D5iBtOid.js → oauth-api-BHp5dVNh.js} +1 -1
  99. package/dist/gateway/static/root/assets/{oauth-provider-connect-CmHsHynu.js → oauth-provider-connect-cvxtmf3C.js} +1 -1
  100. package/dist/gateway/static/root/assets/{open-capability-settings-Cvb65hQB.js → open-capability-settings-DQsmJxI7.js} +1 -1
  101. package/dist/gateway/static/root/assets/{page-context-capture-button-CTHQWfG6.js → page-context-capture-button-BwsK2uDe.js} +1 -1
  102. package/dist/gateway/static/root/assets/{page-context-draft-aApa5ApP.js → page-context-draft-ieK9IN3R.js} +1 -1
  103. package/dist/gateway/static/root/assets/page-header-store-Xe8CP_4a.js +1 -0
  104. package/dist/gateway/static/root/assets/personal-avatar-BZSC0BLP.js +1 -0
  105. package/dist/gateway/static/root/assets/personal-page-CbiD8Wn7.js +1 -0
  106. package/dist/gateway/static/root/assets/personal-profile-settings-KvdNnaNv.js +1 -0
  107. package/dist/gateway/static/root/assets/personal-settings-panel-_cxSzWsN.js +1 -0
  108. package/dist/gateway/static/root/assets/phone-DdhTnt6X.js +1 -0
  109. package/dist/gateway/static/root/assets/{phone-dependencies-card-BBk6k0t0.js → phone-dependencies-card-C2OWtG2B.js} +1 -1
  110. package/dist/gateway/static/root/assets/{phone-model-connection-QJt8SAb7.js → phone-model-connection-CqmafRhr.js} +1 -1
  111. package/dist/gateway/static/root/assets/{phone-model-picker-CRxUxJNZ.js → phone-model-picker-BwYQtl_5.js} +1 -1
  112. package/dist/gateway/static/root/assets/{phone-settings-page-Df64khPY.js → phone-settings-page-CPteZZWu.js} +1 -1
  113. package/dist/gateway/static/root/assets/{phone-workspace-store-DAuPd2ie.js → phone-workspace-store-ReUEjG9m.js} +1 -1
  114. package/dist/gateway/static/root/assets/{plugin-details-dialog-Bcer4RC3.js → plugin-details-dialog-BlNVtbEU.js} +1 -1
  115. package/dist/gateway/static/root/assets/{preference-select-fields-DdV7q9Bd.js → preference-select-fields-BbA-g7Zq.js} +1 -1
  116. package/dist/gateway/static/root/assets/{product-automation-feedback-uKndNxpU.js → product-automation-feedback-DcPY76PG.js} +1 -1
  117. package/dist/gateway/static/root/assets/{product-delivery-DRyD9_Xq.js → product-delivery-2Ks17_OH.js} +1 -1
  118. package/dist/gateway/static/root/assets/{product-open-page-A7lyoXVv.js → product-open-page-BBJ7glAm.js} +1 -1
  119. package/dist/gateway/static/root/assets/{product-preview-content-BrdvkWOg.js → product-preview-content-UTOSc_ii.js} +1 -1
  120. package/dist/gateway/static/root/assets/{product-preview-modal-BxHKejcX.js → product-preview-modal-Q1RZqeMo.js} +2 -2
  121. package/dist/gateway/static/root/assets/project-detail-page-BlrtsEZK.js +7 -0
  122. package/dist/gateway/static/root/assets/{project-understanding-BVhSoQHu.js → project-understanding-B35f5MkG.js} +1 -1
  123. package/dist/gateway/static/root/assets/{projects-page-DSPoyFda.js → projects-page-CBH-sHOU.js} +1 -1
  124. package/dist/gateway/static/root/assets/{providers-api-B47s6_9Q.js → providers-api-BSmKlQ8K.js} +1 -1
  125. package/dist/gateway/static/root/assets/{recording-upload-B-IHTsVC.js → recording-upload-P1WcsdEY.js} +1 -1
  126. package/dist/gateway/static/root/assets/{registry-api-Bo8YiUE0.js → registry-api-DnVlwJ6M.js} +1 -1
  127. package/dist/gateway/static/root/assets/{remote-access-hub-BRf9znLV.js → remote-access-hub-CVEj3p0J.js} +1 -1
  128. package/dist/gateway/static/root/assets/{resource-unavailable-CAljzZx8.js → resource-unavailable-B_S1dFze.js} +1 -1
  129. package/dist/gateway/static/root/assets/route-preload-DGmrxJSb.js +2 -0
  130. package/dist/gateway/static/root/assets/runtime-health-zDkHcOZO.js +1 -0
  131. package/dist/gateway/static/root/assets/{runtime-tools-api-C28pB9__.js → runtime-tools-api-970sp5zI.js} +1 -1
  132. package/dist/gateway/static/root/assets/{runtime-tools-settings-panel-XYeadnhL.js → runtime-tools-settings-panel-au6vZ0sL.js} +1 -1
  133. package/dist/gateway/static/root/assets/{schema-form-CtRM41Re.js → schema-form-C9TYGa0_.js} +1 -1
  134. package/dist/gateway/static/root/assets/secret-input-DsjfQmDn.js +1 -0
  135. package/dist/gateway/static/root/assets/{service-recommendation-list-C6ydoBSU.js → service-recommendation-list-XeRFtJ-Z.js} +1 -1
  136. package/dist/gateway/static/root/assets/{session-api-D7FWdG43.js → session-api-CuT7EPI0.js} +1 -1
  137. package/dist/gateway/static/root/assets/session-channel-icon-BzkFo-Ci.js +1 -0
  138. package/dist/gateway/static/root/assets/{session-identity-label-BP7OIYth.js → session-identity-label-D5SAi0Uh.js} +1 -1
  139. package/dist/gateway/static/root/assets/session-manager-CyZHiuWY.js +25 -0
  140. package/dist/gateway/static/root/assets/{sessions-page-CyYkCsfy.js → sessions-page-BIxDwAIX.js} +1 -1
  141. package/dist/gateway/static/root/assets/settings-advanced-gate-Cy7xeKmH.js +1 -0
  142. package/dist/gateway/static/root/assets/{settings-advanced-section-3HwfHbqz.js → settings-advanced-section-nbkGHQ_4.js} +1 -1
  143. package/dist/gateway/static/root/assets/{settings-mode-store-BVvIXZlg.js → settings-mode-store-EQHfksdV.js} +1 -1
  144. package/dist/gateway/static/root/assets/{settings-page-C6ypo-jn.js → settings-page-D6RNHRHq.js} +1 -1
  145. package/dist/gateway/static/root/assets/{settings-page-header-CheboxIM.js → settings-page-header-19GJ_a45.js} +1 -1
  146. package/dist/gateway/static/root/assets/{settings-page-layout-CPFMZaLF.js → settings-page-layout-B2WCzSel.js} +1 -1
  147. package/dist/gateway/static/root/assets/{setup-interaction-page-BbCzYq9S.js → setup-interaction-page-C5i7y_pM.js} +1 -1
  148. package/dist/gateway/static/root/assets/{setup-status-panel-DUNgVqtz.js → setup-status-panel-Cwp8YKdT.js} +1 -1
  149. package/dist/gateway/static/root/assets/{share-link-dialog-0P9ghttc.js → share-link-dialog-DDsVTMZ-.js} +1 -1
  150. package/dist/gateway/static/root/assets/share-preview-page-C1S_gWGf.js +2 -0
  151. package/dist/gateway/static/root/assets/{shares-api-iiw4F-ra.js → shares-api-CepTFl1f.js} +1 -1
  152. package/dist/gateway/static/root/assets/{shares-settings-BQ1qXAJn.js → shares-settings-Cv-tdcAN.js} +1 -1
  153. package/dist/gateway/static/root/assets/{skill-api-CLtIjE8K.js → skill-api-CsT-iHnl.js} +1 -1
  154. package/dist/gateway/static/root/assets/{skill-list-api-DY0rRlUk.js → skill-list-api-CMJTjvSo.js} +1 -1
  155. package/dist/gateway/static/root/assets/{skill-reload-api-DJC8uWLu.js → skill-reload-api-S6B7P9ur.js} +1 -1
  156. package/dist/gateway/static/root/assets/{skills-page-CQYf7s9f.js → skills-page-BKcsJtYx.js} +1 -1
  157. package/dist/gateway/static/root/assets/sliding-segmented-CgQ3BFdb.js +1 -0
  158. package/dist/gateway/static/root/assets/{system-settings-panel-DdBmyc93.js → system-settings-panel-DhHPM5qU.js} +1 -1
  159. package/dist/gateway/static/root/assets/{task-detail-page-Bb1R4QsJ.js → task-detail-page-BHH2_Z9_.js} +3 -3
  160. package/dist/gateway/static/root/assets/{task-input-card-Xl4xFjCn.js → task-input-card-D_2rNF31.js} +1 -1
  161. package/dist/gateway/static/root/assets/{terminal-panel-store-B1EVdx4L.js → terminal-panel-store-CcUWpqvC.js} +1 -1
  162. package/dist/gateway/static/root/assets/{theme-store-BTkYFJOE.js → theme-store-D9pquJiM.js} +1 -1
  163. package/dist/gateway/static/root/assets/{tracing-settings-page-h-gbBAtl.js → tracing-settings-page-CjNrKILr.js} +1 -1
  164. package/dist/gateway/static/root/assets/{tunnel-api-BDoegsWD.js → tunnel-api-GtLO40pc.js} +1 -1
  165. package/dist/gateway/static/root/assets/{understanding-activity-store-DyFJDqHy.js → understanding-activity-store-BhB5wAbq.js} +1 -1
  166. package/dist/gateway/static/root/assets/{understanding-refresh-store-C0SRcgyd.js → understanding-refresh-store-BxtpXRfV.js} +1 -1
  167. package/dist/gateway/static/root/assets/{usage-page-CbJsT3zT.js → usage-page-CZa_a6_7.js} +1 -1
  168. package/dist/gateway/static/root/assets/{use-autosave-CB2B4NMO.js → use-autosave-BtOp6W9H.js} +1 -1
  169. package/dist/gateway/static/root/assets/use-composer-attachments-BTQZx8Nj.js +2 -0
  170. package/dist/gateway/static/root/assets/use-file-preview-expanded-B7nscYS4.js +15 -0
  171. package/dist/gateway/static/root/assets/{use-personal-profile-r0OuOlBJ.js → use-personal-profile-Cj7WGOfv.js} +1 -1
  172. package/dist/gateway/static/root/assets/use-realtime-voice-BS1rygyV.js +1 -0
  173. package/dist/gateway/static/root/assets/{use-workspace-tree-B9Bmg8LV.js → use-workspace-tree-DYosm4Gz.js} +1 -1
  174. package/dist/gateway/static/root/assets/{user-model-page-BudrJ73l.js → user-model-page-DmmJODQ4.js} +1 -1
  175. package/dist/gateway/static/root/assets/voice-CDlC6XMH.js +1 -0
  176. package/dist/gateway/static/root/assets/{voice-api-key-field-C8wd8ijq.js → voice-api-key-field-8voN8dQG.js} +1 -1
  177. package/dist/gateway/static/root/assets/voice-call-context-BM2A4bLz.js +1 -0
  178. package/dist/gateway/static/root/assets/voice-config-api-CrZd2aqw.js +1 -0
  179. package/dist/gateway/static/root/assets/{voice-input-shortcut-events-TAmJNcsN.js → voice-input-shortcut-events-DcFp_fy4.js} +1 -1
  180. package/dist/gateway/static/root/assets/voice-settings-AckvhNnP.js +1 -0
  181. package/dist/gateway/static/root/assets/{work-discovery-overlay-DsyYo1p0.js → work-discovery-overlay-DAIk5csp.js} +1 -1
  182. package/dist/gateway/static/root/assets/{work-discovery-page-BJ9VN5Zd.js → work-discovery-page-CJeixeWQ.js} +1 -1
  183. package/dist/gateway/static/root/assets/{working-directory-picker-modal-CFj-ZOJE.js → working-directory-picker-modal-BW76VaD5.js} +1 -1
  184. package/dist/gateway/static/root/assets/workspace-api-Cu2gzmVn.js +2 -0
  185. package/dist/gateway/static/root/assets/workspace-editor-agent-store-pVOYuH7u.js +1 -0
  186. package/dist/gateway/static/root/assets/workspace-file-preview-dialog-DyqI793w.js +1 -0
  187. package/dist/gateway/static/root/assets/workspace-open-location-menu-DTYkApy8.js +1 -0
  188. package/dist/gateway/static/root/assets/{xopc-cloud-account-card-DN4DdOWZ.js → xopc-cloud-account-card-Rytp_NWV.js} +1 -1
  189. package/dist/gateway/static/root/index.html +106 -99
  190. package/dist/package.js +1 -1
  191. package/dist/packages/gateway-contract/src/extension-capabilities.js +26 -4
  192. package/dist/packages/gateway-contract/src/index.js +3 -1
  193. package/dist/packages/gateway-contract/src/local-app-delegation.js +22 -0
  194. package/dist/packages/gateway-contract/src/local-apps.js +35 -4
  195. package/dist/packages/realtime-protocol/src/voice.js +37 -3
  196. package/dist/src/agent/agent-instance-gateway.d.ts +2 -0
  197. package/dist/src/agent/agent-manager.d.ts +1 -0
  198. package/dist/src/agent/agent-manager.js +11 -2
  199. package/dist/src/agent/background-review/prompts.js +2 -0
  200. package/dist/src/agent/background-review/run-background-review.js +13 -7
  201. package/dist/src/agent/context/execution-context.js +1 -1
  202. package/dist/src/agent/embedded/execution-tool-policy.js +1 -1
  203. package/dist/src/agent/embedded/run-for-session.js +66 -9
  204. package/dist/src/agent/embedded/run-turn.js +35 -1
  205. package/dist/src/agent/embedded/runs.d.ts +1 -0
  206. package/dist/src/agent/embedded/runs.js +13 -0
  207. package/dist/src/agent/embedded/types.d.ts +2 -0
  208. package/dist/src/agent/inbound/turn-dispatcher.d.ts +1 -0
  209. package/dist/src/agent/inbound/turn-dispatcher.js +1 -0
  210. package/dist/src/agent/prompt/system-prompt.js +7 -6
  211. package/dist/src/agent/prompt/types.d.ts +2 -1
  212. package/dist/src/agent/prompt/voice-history.d.ts +9 -0
  213. package/dist/src/agent/prompt/voice-history.js +35 -0
  214. package/dist/src/agent/prompt/voice-presentation.d.ts +1 -1
  215. package/dist/src/agent/prompt/voice-presentation.js +1 -0
  216. package/dist/src/agent/service.js +1 -1
  217. package/dist/src/agent/tasks/task-judge-service.js +1 -1
  218. package/dist/src/agent/tools/factory.js +1 -1
  219. package/dist/src/agent/tools/image-generate-tool.js +5 -1
  220. package/dist/src/agent/tools/personal-request-result-tool.js +1 -1
  221. package/dist/src/agent/tools/personal-task-tool.js +3 -1
  222. package/dist/src/agent/tools/task-collaboration-tool.js +1 -1
  223. package/dist/src/agent/tools/task-evidence.js +6 -15
  224. package/dist/src/agent/tools/task-result-tool.js +1 -1
  225. package/dist/src/agent/tools/user-context-tool.js +1 -1
  226. package/dist/src/agent/tools/xopc-use-tool.js +6 -5
  227. package/dist/src/agent-config/schema.d.ts +45 -0
  228. package/dist/src/agent-config/schema.js +3 -1
  229. package/dist/src/capabilities/runtime/dispatcher.d.ts +11 -0
  230. package/dist/src/capabilities/runtime/dispatcher.js +22 -6
  231. package/dist/src/capabilities/runtime/product.js +2 -0
  232. package/dist/src/cli/commands/gateway/lifecycle.js +1 -1
  233. package/dist/src/computer/evaluation-comparison.d.ts +4 -0
  234. package/dist/src/computer/evaluation-comparison.js +16 -1
  235. package/dist/src/computer/keyboard.js +1 -1
  236. package/dist/src/computer/model-adapter.js +18 -14
  237. package/dist/src/config/schema.d.ts +52 -2
  238. package/dist/src/config/schema.js +29 -5
  239. package/dist/src/gateway/hono/lib/safe-voice-config.d.ts +1 -0
  240. package/dist/src/gateway/hono/lib/safe-voice-config.js +10 -2
  241. package/dist/src/gateway/hono/routes/auth-registry-extensions.js +107 -12
  242. package/dist/src/gateway/hono/routes/connectors.js +1 -1
  243. package/dist/src/gateway/hono/routes/imports.js +1 -1
  244. package/dist/src/gateway/hono/routes/lazy-bundles.js +16 -0
  245. package/dist/src/gateway/hono/routes/local-app-capabilities.js +16 -5
  246. package/dist/src/gateway/hono/routes/local-app-development.d.ts +3 -0
  247. package/dist/src/gateway/hono/routes/local-app-development.js +13 -0
  248. package/dist/src/gateway/hono/routes/local-app-previews.d.ts +3 -0
  249. package/dist/src/gateway/hono/routes/local-app-previews.js +86 -0
  250. package/dist/src/gateway/hono/routes/local-apps.js +3 -2
  251. package/dist/src/gateway/hono/routes/models.js +4 -0
  252. package/dist/src/gateway/hono/routes/personal-agent.js +9 -1
  253. package/dist/src/gateway/hono/routes/projects.js +1 -1
  254. package/dist/src/gateway/hono/routes/tasks.js +2 -2
  255. package/dist/src/gateway/hono/routes/user-model.js +2 -2
  256. package/dist/src/gateway/hono/routes/voice.js +108 -14
  257. package/dist/src/gateway/security/gateway-scopes.js +1 -1
  258. package/dist/src/gateway/security/local-app-delegation-access.d.ts +5 -0
  259. package/dist/src/gateway/security/local-app-delegation-access.js +22 -0
  260. package/dist/src/gateway/service/config-coordinator.d.ts +11 -2
  261. package/dist/src/gateway/service/run-gateway-agent.js +7 -6
  262. package/dist/src/gateway/service/session-input-coordinator.d.ts +1 -0
  263. package/dist/src/gateway/service/session-input-coordinator.js +6 -2
  264. package/dist/src/gateway/service.js +52 -19
  265. package/dist/src/gateway/xopc-cloud-capability-setup.js +2 -2
  266. package/dist/src/home-intelligence/host.js +2 -2
  267. package/dist/src/imports/inventory.js +11 -3
  268. package/dist/src/infra/update-restart.js +1 -1
  269. package/dist/src/local-apps/access-audit.d.ts +17 -0
  270. package/dist/src/local-apps/access-audit.js +42 -0
  271. package/dist/src/local-apps/capabilities/contracts.js +2 -0
  272. package/dist/src/local-apps/capabilities/delegate.d.ts +3 -0
  273. package/dist/src/local-apps/capabilities/delegate.js +166 -0
  274. package/dist/src/local-apps/capabilities/projections.d.ts +265 -0
  275. package/dist/src/local-apps/capabilities/projections.js +53 -0
  276. package/dist/src/local-apps/capabilities/resource-policy.d.ts +3 -0
  277. package/dist/src/local-apps/capabilities/resource-policy.js +43 -0
  278. package/dist/src/local-apps/capabilities/runtime.d.ts +2 -1
  279. package/dist/src/local-apps/capabilities/runtime.js +108 -39
  280. package/dist/src/local-apps/fix-guidance.js +4 -1
  281. package/dist/src/local-apps/preview-fixtures.d.ts +20 -0
  282. package/dist/src/local-apps/preview-fixtures.js +52 -0
  283. package/dist/src/local-apps/preview-runtime-bridge.d.ts +1 -1
  284. package/dist/src/local-apps/preview-runtime-bridge.js +41 -18
  285. package/dist/src/local-apps/preview-sessions.d.ts +52 -0
  286. package/dist/src/local-apps/preview-sessions.js +316 -0
  287. package/dist/src/local-apps/preview-worker.d.ts +1 -0
  288. package/dist/src/local-apps/preview-worker.js +108 -0
  289. package/dist/src/local-apps/public-assets.d.ts +2 -0
  290. package/dist/src/local-apps/public-assets.js +42 -0
  291. package/dist/src/local-apps/scaffold.js +1 -1
  292. package/dist/src/local-apps/service.d.ts +48 -5
  293. package/dist/src/local-apps/service.js +136 -15
  294. package/dist/src/local-apps/store.d.ts +3 -0
  295. package/dist/src/local-apps/store.js +42 -16
  296. package/dist/src/local-apps/types.d.ts +2 -0
  297. package/dist/src/memory-learning/repository.js +3 -2
  298. package/dist/src/memory-learning/service.js +4 -13
  299. package/dist/src/memory-learning/transcript-source.d.ts +9 -0
  300. package/dist/src/memory-learning/transcript-source.js +31 -0
  301. package/dist/src/notes/capabilities/read.js +11 -2
  302. package/dist/src/notes/capabilities/write.js +10 -1
  303. package/dist/src/notes/types.d.ts +2 -0
  304. package/dist/src/personal-agent/communication.d.ts +2 -1
  305. package/dist/src/personal-agent/communication.js +3 -1
  306. package/dist/src/personal-agent/prompt-context.js +15 -23
  307. package/dist/src/personal-agent/prompts.js +3 -2
  308. package/dist/src/personal-agent/reply-composer.js +2 -2
  309. package/dist/src/personal-agent/repository.d.ts +2 -3
  310. package/dist/src/personal-agent/request-access.js +1 -1
  311. package/dist/src/personal-agent/request-delivery.js +1 -1
  312. package/dist/src/personal-agent/request-service.js +1 -1
  313. package/dist/src/personal-agent/service.d.ts +3 -6
  314. package/dist/src/personal-agent/service.js +12 -1
  315. package/dist/src/phone/contracts.d.ts +1 -1
  316. package/dist/src/phone/model-adapter.d.ts +1 -1
  317. package/dist/src/phone/runtime.d.ts +1 -1
  318. package/dist/src/process/fork-worker.d.ts +2 -0
  319. package/dist/src/process/fork-worker.js +7 -0
  320. package/dist/src/providers/model-catalog-persistence.js +2 -2
  321. package/dist/src/providers/setup/voice.js +9 -4
  322. package/dist/src/providers/xopc-cloud-model-source.js +2 -2
  323. package/dist/src/realtime/broker.js +1 -1
  324. package/dist/src/session/client-history.js +12 -1
  325. package/dist/src/session/session-context-for-llm.js +10 -3
  326. package/dist/src/session/store.d.ts +1 -0
  327. package/dist/src/session/store.js +2 -1
  328. package/dist/src/session/stored-rows-to-file-entries.js +1 -1
  329. package/dist/src/session/transcript-outline.js +9 -0
  330. package/dist/src/session/voice-transcript.d.ts +14 -0
  331. package/dist/src/session/voice-transcript.js +19 -2
  332. package/dist/src/storage/sqlite/notes-repository.js +7 -0
  333. package/dist/src/storage/sqlite/resource-scope.d.ts +10 -0
  334. package/dist/src/storage/sqlite/resource-scope.js +31 -0
  335. package/dist/src/storage/sqlite/transcript-repository.d.ts +3 -0
  336. package/dist/src/storage/sqlite/transcript-repository.js +43 -7
  337. package/dist/src/tasks/capabilities/read.js +21 -3
  338. package/dist/src/tasks/task-allocation-service.js +1 -1
  339. package/dist/src/tasks/task-application-service.js +3 -3
  340. package/dist/src/tasks/task-context-assembler.js +1 -1
  341. package/dist/src/tasks/task-evidence-tools.d.ts +2 -0
  342. package/dist/src/tasks/task-evidence-tools.js +22 -0
  343. package/dist/src/tasks/task-main-update-delivery.js +2 -0
  344. package/dist/src/tasks/task-repository.d.ts +2 -0
  345. package/dist/src/tasks/task-repository.js +7 -0
  346. package/dist/src/tasks/task-research-result.js +8 -21
  347. package/dist/src/tasks/task-result-delivery-repository.d.ts +6 -0
  348. package/dist/src/tasks/task-result-delivery-repository.js +26 -0
  349. package/dist/src/tasks/task-result-delivery-service.js +3 -3
  350. package/dist/src/tasks/task-run-coordinator.js +1 -1
  351. package/dist/src/usage/scenario-registry.js +5 -0
  352. package/dist/src/user-model/index.js +3 -3
  353. package/dist/src/user-model/profile.d.ts +8 -0
  354. package/dist/src/user-model/profile.js +19 -1
  355. package/dist/src/voice/platform-settings.d.ts +5 -0
  356. package/dist/src/voice/platform-settings.js +16 -3
  357. package/dist/src/voice/platform-streams.d.ts +7 -3
  358. package/dist/src/voice/platform-streams.js +90 -18
  359. package/dist/src/voice/realtime/agentBroker.d.ts +12 -1
  360. package/dist/src/voice/realtime/agentBroker.js +22 -5
  361. package/dist/src/voice/realtime/agentEngine.js +104 -12
  362. package/dist/src/voice/realtime/chat-publication.d.ts +24 -0
  363. package/dist/src/voice/realtime/chat-publication.js +61 -0
  364. package/dist/src/voice/realtime/conversation-context.d.ts +7 -1
  365. package/dist/src/voice/realtime/conversation-context.js +54 -16
  366. package/dist/src/voice/realtime/engine.d.ts +2 -0
  367. package/dist/src/voice/realtime/identity-grounding.d.ts +8 -0
  368. package/dist/src/voice/realtime/identity-grounding.js +34 -0
  369. package/dist/src/voice/realtime/memory-context.js +48 -14
  370. package/dist/src/voice/realtime/naturalAgentTools.d.ts +90 -0
  371. package/dist/src/voice/realtime/naturalAgentTools.js +275 -0
  372. package/dist/src/voice/realtime/omniEngine.d.ts +9 -0
  373. package/dist/src/voice/realtime/omniEngine.js +425 -54
  374. package/dist/src/voice/realtime/omniRoute.d.ts +6 -2
  375. package/dist/src/voice/realtime/omniRoute.js +50 -5
  376. package/dist/src/voice/realtime/runtime.d.ts +1 -0
  377. package/dist/src/voice/realtime/runtime.js +155 -50
  378. package/dist/src/voice/realtime/runtime.types.d.ts +3 -1
  379. package/dist/src/voice/realtime/speakable-segmenter.d.ts +2 -1
  380. package/dist/src/voice/realtime/speakable-segmenter.js +7 -2
  381. package/dist/src/voice/realtime/turnPolicy.d.ts +1 -2
  382. package/dist/src/voice/realtime/turnPolicy.js +4 -6
  383. package/dist/src/voice/realtime/user-context.d.ts +14 -0
  384. package/dist/src/voice/realtime/user-context.js +63 -0
  385. package/dist/src/voice/tts/providers/xopc-cloud-speech.js +29 -23
  386. package/dist/src/voice/tts/speak-core.js +1 -0
  387. package/dist/src/voice/tts/speech-provider-types.d.ts +2 -0
  388. package/dist/src/work-discovery/service.js +1 -1
  389. package/package.json +2 -1
  390. package/skills/engineering/build-xopc-local-app/SKILL.md +5 -1
  391. package/skills/engineering/build-xopc-local-app/references/app-contract.md +43 -2
  392. package/dist/gateway/static/root/assets/api-B3M6ifoo.js +0 -1
  393. package/dist/gateway/static/root/assets/automation-run-list-De7gini_.js +0 -1
  394. package/dist/gateway/static/root/assets/capabilities-page-CSBeVda0.js +0 -2
  395. package/dist/gateway/static/root/assets/capabilities-settings-panel-C56aelvp.js +0 -8
  396. package/dist/gateway/static/root/assets/chat-page-BKLyj4IP.js +0 -71
  397. package/dist/gateway/static/root/assets/clipboard-copy-DuJk5WD6.js +0 -1
  398. package/dist/gateway/static/root/assets/composer-payload-handoff-D1xUYD5M.js +0 -1
  399. package/dist/gateway/static/root/assets/connected-providers-grid-w3htbAyh.js +0 -1
  400. package/dist/gateway/static/root/assets/connectors-page-D1VzTxON.js +0 -1
  401. package/dist/gateway/static/root/assets/dist-BGTk37IG.js +0 -1
  402. package/dist/gateway/static/root/assets/extension-iframe-host-pbU7DAfE.js +0 -1
  403. package/dist/gateway/static/root/assets/extension-page-BrX4Hy9P.js +0 -1
  404. package/dist/gateway/static/root/assets/extension-provider-DUzhV5_a.js +0 -1
  405. package/dist/gateway/static/root/assets/gateway-realtime-store-Vl3uKAHV.js +0 -1
  406. package/dist/gateway/static/root/assets/home-page-DYkEc3Qb.js +0 -3
  407. package/dist/gateway/static/root/assets/imports-page-CLbpRE5i.js +0 -1
  408. package/dist/gateway/static/root/assets/index-CIeY0yyg.js +0 -11
  409. package/dist/gateway/static/root/assets/index-D1EDrkUo.css +0 -1
  410. package/dist/gateway/static/root/assets/local-app-workbench-page-3J9ABnCu.js +0 -1
  411. package/dist/gateway/static/root/assets/local-apps-Ck6kACsY.js +0 -1
  412. package/dist/gateway/static/root/assets/logs-page-Dtoheh2t.js +0 -2
  413. package/dist/gateway/static/root/assets/messages-orB1BMgI.js +0 -3
  414. package/dist/gateway/static/root/assets/note-image-lightbox-C6aTUp-c.js +0 -1
  415. package/dist/gateway/static/root/assets/page-header-store-B2Ahfm0W.js +0 -1
  416. package/dist/gateway/static/root/assets/personal-avatar-Dp5LHjk3.js +0 -1
  417. package/dist/gateway/static/root/assets/personal-page-CpKBzGIk.js +0 -1
  418. package/dist/gateway/static/root/assets/personal-proactivity-DaRnbB1f.js +0 -1
  419. package/dist/gateway/static/root/assets/personal-settings-panel-CtJL6qIN.js +0 -1
  420. package/dist/gateway/static/root/assets/project-detail-page-CobfHZo0.js +0 -7
  421. package/dist/gateway/static/root/assets/route-preload-C0oV8og1.js +0 -2
  422. package/dist/gateway/static/root/assets/runtime-health-D2TDFLLq.js +0 -1
  423. package/dist/gateway/static/root/assets/secret-input-Dryrns2s.js +0 -1
  424. package/dist/gateway/static/root/assets/session-channel-icon-D1ktvt1P.js +0 -1
  425. package/dist/gateway/static/root/assets/session-manager-C1T7WiP7.js +0 -25
  426. package/dist/gateway/static/root/assets/settings-advanced-gate-B3rOBkm_.js +0 -1
  427. package/dist/gateway/static/root/assets/share-preview-page-BoLq3kSO.js +0 -2
  428. package/dist/gateway/static/root/assets/use-composer-attachments-BPMn8eY_.js +0 -2
  429. package/dist/gateway/static/root/assets/use-file-preview-expanded-4SKLb9Fh.js +0 -15
  430. package/dist/gateway/static/root/assets/voice-call-context-CJ1ZiJWR.js +0 -1
  431. package/dist/gateway/static/root/assets/voice-config-api-yBcUSvvn.js +0 -1
  432. package/dist/gateway/static/root/assets/voice-transcribe-api-D4eyeSdG.js +0 -1
  433. package/dist/gateway/static/root/assets/workspace-api-DYFy9__S.js +0 -2
  434. package/dist/gateway/static/root/assets/workspace-editor-agent-store-2Lt7rQfw.js +0 -1
  435. package/dist/gateway/static/root/assets/workspace-file-preview-dialog-DhqlVzSI.js +0 -1
  436. package/dist/gateway/static/root/assets/workspace-open-location-menu-C-ItyXwL.js +0 -1
@@ -1 +0,0 @@
1
- import"./notes-api-BhRyWe3S.js";
@@ -1 +0,0 @@
1
- import{p as e}from"./locale-store-CQcW9_qA.js";var t={startExtra:null,main:null,end:null},n=e(e=>({...t,setPageHeader:t=>e(t),clearPageHeader:()=>e(t)}));export{n as t};
@@ -1 +0,0 @@
1
- import{n as e,t}from"./vendor-react-BOUWij0V.js";import{t as n}from"./createLucideIcon-DPHK1VkS.js";import{t as r}from"./loopi-CNtmi9FU.js";import{t as i}from"./agent-avatar-display-C7Dx9nt1.js";var a=n(`phone`,[[`path`,{d:`M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384`,key:`9njp5v`}]]),o=e(),s=t(),c={loopi:`idle`,"loopi-curious":`curious`,"loopi-care":`care`};function l(e){let t=(0,o.c)(8),{appearance:n,agentId:a,className:l}=e,u=l===void 0?``:l;if(n===`custom`&&a){let e;return t[0]!==a||t[1]!==u?(e=(0,s.jsx)(i,{agentId:a,avatar:`xopc:custom`,className:u}),t[0]=a,t[1]=u,t[2]=e):e=t[2],e}let d=n===`custom`?`idle`:c[n],f=`personal-avatar-motion inline-flex items-center justify-center ${u}`,p;t[3]===d?p=t[4]:(p=(0,s.jsx)(r,{variant:`avatar`,mood:d,className:`size-full`}),t[3]=d,t[4]=p);let m;return t[5]!==f||t[6]!==p?(m=(0,s.jsx)(`span`,{className:f,"aria-hidden":`true`,children:p}),t[5]=f,t[6]=p,t[7]=m):m=t[7],m}export{a as n,l as t};
@@ -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"./chunk-KS7C4IRE-CiwuuyV8.js";import{i as a,n as o,o as s}from"./locale-store-CQcW9_qA.js";import{t as c}from"./messages-orB1BMgI.js";import{t as l,v as u}from"./chat-page-BKLyj4IP.js";import{t as d}from"./arrow-left-D880xG-P.js";import{t as f}from"./arrow-right-DSSvoX71.js";import{n as p,r as m}from"./voice-call-context-CJ1ZiJWR.js";import{t as h}from"./check-DUBLcKHA.js";import{t as g}from"./popover-select-CLsphyzA.js";import{t as _}from"./list-todo-CTVRto8O.js";import{F as v}from"./markdown-view-CkihBz06.js";import{n as y,s as b,t as x}from"./install-connector-dialog-B-v1FT3P.js";import{n as S,t as C}from"./personal-avatar-Dp5LHjk3.js";import{t as w}from"./play-kxZvpBg8.js";import{t as T}from"./settings-2-D-csvaET.js";import{t as E}from"./square-DMK_fB-3.js";import{t as D}from"./upload-rrb46c3c.js";import{t as O}from"./x-B_N4OPjy.js";import{t as k}from"./skeleton-DzdOeGYz.js";import{l as ee}from"./voice-transcribe-api-D4eyeSdG.js";import{T as A,d as j,t as M}from"./session-manager-C1T7WiP7.js";import{a as N,i as P,o as F,r as I,s as te,t as ne}from"./dist-GJ8-1PAx.js";import{a as re,r as ie}from"./connectors-api-DNVUmf9M.js";import{t as ae}from"./page-header-store-B2Ahfm0W.js";import{s as L}from"./agent-avatar-display-C7Dx9nt1.js";import{l as R,n as oe,t as se}from"./voice-config-api-yBcUSvvn.js";import{t as z}from"./date-formatters-DukWSVwc.js";var B=n(),V=e(t(),1),H=r(),U=[`intro`,`identity`,`voice`,`connections`],ce=[{id:`loopi`,zh:`Loopi`,en:`Loopi`},{id:`loopi-curious`,zh:`好奇`,en:`Curious`},{id:`loopi-care`,zh:`温和`,en:`Gentle`}];function W(e){return!!(e?.enabled&&(e.status===`connected`||e.connectionStatus===`connected`||e.authStatus===`connected`))}async function G(e,t){let n=await new Promise((e,n)=>{let r=new FileReader;r.onload=()=>e(String(r.result)),r.onerror=()=>n(r.error),r.readAsDataURL(t)});await s(a(`/api/agents/${encodeURIComponent(e)}/avatar`),{method:`PUT`,body:JSON.stringify({base64:n.slice(n.indexOf(`,`)+1),mimeType:t.type})}),L(e)}function le({modelsAvailable:e,onCreated:t}){let n=o(e=>e.language)===`zh`,r=o(e=>e.language),[l,u]=(0,V.useState)(`intro`),[p,m]=(0,V.useState)({displayName:`Ada`,appearance:`loopi`,voice:null}),[g,_]=(0,V.useState)(!1),[v,S]=(0,V.useState)(!1),[T,E]=(0,V.useState)(null),[O,A]=(0,V.useState)(null),[j,M]=(0,V.useState)(null),[N,P]=(0,V.useState)(null),[F,I]=(0,V.useState)(!0),[te,ne]=(0,V.useState)([]),[ae,L]=(0,V.useState)(null),z=(0,V.useRef)(null),B=(0,V.useRef)(null),[le,ue]=(0,V.useState)([]),[K,de]=(0,V.useState)(!0),[fe,q]=(0,V.useState)([]),[J,pe]=(0,V.useState)(null);(0,V.useEffect)(()=>{let e=!1;return s(a(`/api/personal-agent/onboarding`)).then(t=>{e||(u(t.payload.step),m(t.payload.draft))}).catch(t=>{e||E(t instanceof Error?t.message:String(t))}).finally(()=>{e||_(!0)}),()=>{e=!0}},[]),(0,V.useEffect)(()=>{if(!g)return;let e=window.setTimeout(()=>{s(a(`/api/personal-agent/onboarding`),{method:`PUT`,body:JSON.stringify({step:l,draft:p})}).catch(()=>{})},350);return()=>window.clearTimeout(e)},[p,g,l]),(0,V.useEffect)(()=>{let e=!1;return se().then(t=>{e||(t.tts&&t.enabled?P({provider:t.tts.provider,model:t.tts.model,enabled:!0}):I(!1))}).catch(()=>{e||I(!1)}),()=>{e=!0}},[]),(0,V.useEffect)(()=>{if(!N?.enabled)return;let e=!1;return oe(N.provider,N.model,`realtime`).then(t=>{e||ne(t.slice(0,12))}).catch(()=>{}).finally(()=>{e||I(!1)}),()=>{e=!0}},[N]),(0,V.useEffect)(()=>{if(l!==`connections`)return;let e=!1;return de(!0),Promise.allSettled([ie({page:1,pageSize:24,verification:`verified`}),re()]).then(([t,n])=>{if(!e){if(t.status===`fulfilled`){let e=[`gmail`,`googlecalendar`,`googledrive`,`github`,`linear`];ue(t.value.connectors.filter(t=>t.runtime.type===`composio`&&e.includes(t.runtime.toolkit)).sort((t,n)=>e.indexOf(t.runtime.type===`composio`?t.runtime.toolkit:``)-e.indexOf(n.runtime.type===`composio`?n.runtime.toolkit:``)))}n.status===`fulfilled`&&q(n.value),de(!1)}}),()=>{e=!0}},[l]),(0,V.useEffect)(()=>()=>{B.current?.abort(),z.current?.close()},[]),(0,V.useEffect)(()=>()=>{j&&URL.revokeObjectURL(j)},[j]);let me=async(e,t=p)=>{await s(a(`/api/personal-agent/onboarding`),{method:`PUT`,body:JSON.stringify({step:e,draft:t})}),u(e)},Y=async e=>{E(null);let t=U[Math.max(0,Math.min(U.length-1,U.indexOf(l)+e))];try{await me(t)}catch(e){E(e instanceof Error?e.message:String(e))}},he=async(n=!1)=>{if(!(!e||v)){S(!0),E(null);try{let e=n?{displayName:`Ada`,appearance:`loopi`,voice:null}:p,r=e.voice&&N?.enabled&&te.some(t=>t.id===e.voice)?{provider:N.provider,model:N.model,voice:e.voice}:void 0,i=(await s(a(`/api/personal-agent`),{method:`POST`,body:JSON.stringify({displayName:e.displayName.trim()||`Ada`,appearance:e.appearance,...r?{voicePreference:r}:{}})})).payload,o=!1;if(!n&&O)try{await G(i.agentId,O),i=(await s(a(`/api/personal-agent/profile`),{method:`PATCH`,body:JSON.stringify({revision:i.revision,displayName:i.displayName,appearance:`custom`})})).payload}catch{o=!0}t(i,o)}catch(e){E(e instanceof Error?e.message:String(e))}finally{S(!1)}}},X=(0,V.useCallback)(async e=>{B.current?.abort(),z.current?.close();let t=new AbortController;B.current=t,L(e),E(null);try{let n=new ee;z.current=n,await n.start();let r=await R(t.signal,e);if(t.signal.aborted)return;n.enqueue(r,()=>L(null))}catch(e){t.signal.aborted||E(e instanceof Error?e.message:String(e)),L(null)}},[]);if(!g)return(0,H.jsxs)(`div`,{className:`mx-auto w-full max-w-xl space-y-4 px-6 py-14`,children:[(0,H.jsx)(k,{className:`h-10 w-2/3`}),(0,H.jsx)(k,{className:`h-64 w-full rounded-2xl`}),(0,H.jsx)(k,{className:`h-12 w-full rounded-xl`})]});let Z=U.indexOf(l),ge={intro:n?`创建一个和你一起做事的助手`:`Create an assistant to work with you`,identity:n?`先给它一个形象和名字`:`Choose a look and a name`,voice:n?`想让我用什么声音回应?`:`How should your assistant sound?`,connections:n?`要让我了解哪些信息?`:`What information can your assistant use?`}[l];return(0,H.jsxs)(`div`,{className:`flex h-full min-h-0 flex-col bg-surface-base`,children:[(0,H.jsx)(`header`,{className:`shrink-0 px-5 pt-5 sm:px-8 sm:pt-7`,children:(0,H.jsxs)(`div`,{className:`mx-auto w-full max-w-2xl`,children:[(0,H.jsxs)(`div`,{className:`flex min-h-10 items-center justify-between gap-4`,children:[Z>0?(0,H.jsxs)(`button`,{type:`button`,disabled:v,onClick:()=>void Y(-1),className:`-ml-2 inline-flex min-h-10 items-center gap-1.5 rounded-lg px-2 text-sm text-fg-muted transition-colors hover:bg-surface-hover hover:text-fg focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent disabled:opacity-40`,children:[(0,H.jsx)(d,{className:`size-4`}),n?`上一步`:`Back`]}):(0,H.jsx)(`span`,{className:`text-sm font-medium text-fg-muted`,children:n?`设置我的助手`:`Set up my assistant`}),(0,H.jsx)(i,{to:`/chat`,className:`-mr-2 inline-flex min-h-10 items-center rounded-lg px-2 text-sm text-fg-muted transition-colors hover:bg-surface-hover hover:text-fg focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`,children:n?`稍后继续`:`Finish later`})]}),(0,H.jsx)(`div`,{className:`mt-4 grid grid-cols-4 gap-1.5`,role:`progressbar`,"aria-label":n?`设置进度`:`Setup progress`,"aria-valuenow":Z+1,"aria-valuemin":1,"aria-valuemax":U.length,children:U.map((e,t)=>(0,H.jsx)(`span`,{className:`h-1 rounded-full transition-colors duration-200 ${t<=Z?`bg-accent`:`bg-surface-active`}`},e))})]})}),(0,H.jsx)(`main`,{className:`flex min-h-0 flex-1 flex-col overflow-y-auto px-5 py-8 sm:px-8`,children:(0,H.jsxs)(`div`,{className:`mx-auto my-auto w-full max-w-2xl py-6 motion-safe:animate-[page-enter_220ms_ease-out]`,children:[(0,H.jsxs)(`div`,{className:`mb-8 flex items-center gap-4`,children:[(0,H.jsx)(`span`,{className:`flex size-16 shrink-0 items-center justify-center rounded-2xl bg-surface-hover`,children:j?(0,H.jsx)(`img`,{src:j,alt:``,className:`size-14 rounded-xl object-cover`}):(0,H.jsx)(C,{appearance:p.appearance,className:`size-14`})}),(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`p`,{className:`text-xs text-fg-muted`,children:n?`我的助手`:`My assistant`}),(0,H.jsx)(`p`,{className:`mt-1 text-lg font-semibold text-fg`,children:p.displayName||`Ada`})]})]}),(0,H.jsx)(`p`,{className:`mb-3 text-xs font-medium tracking-wide text-fg-subtle`,children:n?`第 ${Z+1} 步 · 共 ${U.length} 步`:`Step ${Z+1} of ${U.length}`}),(0,H.jsx)(`h1`,{className:`text-2xl font-semibold tracking-tight text-fg sm:text-3xl`,children:ge}),l===`intro`&&(0,H.jsxs)(`div`,{className:`mt-6 max-w-xl space-y-3 text-base leading-8 text-fg-muted`,children:[(0,H.jsx)(`p`,{children:n?`你可以找它讨论问题,也可以交给它一件要推进的事。`:`Talk through a question or give it something to move forward.`}),(0,H.jsx)(`p`,{children:n?`需要深入处理时,它会找合适的 Agent,并把进展带回对话。`:`It can ask a suitable Agent for deeper work and bring the progress back.`}),(0,H.jsx)(`p`,{children:n?`它能使用哪些数据和设备,由你决定。`:`You choose which data and devices it can use.`})]}),l===`identity`&&(0,H.jsxs)(`div`,{className:`mt-7 space-y-7`,children:[(0,H.jsxs)(`label`,{className:`block text-sm font-medium text-fg`,children:[n?`助手名字`:`Assistant name`,(0,H.jsx)(`input`,{value:p.displayName,maxLength:60,onChange:e=>m(t=>({...t,displayName:e.target.value})),onBlur:()=>m(e=>({...e,displayName:e.displayName.trim()||`Ada`})),className:`mt-2 block w-full rounded-xl border border-edge bg-surface-panel px-4 py-3 text-fg outline-none focus-visible:ring-2 focus-visible:ring-accent`})]}),(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`p`,{className:`mb-3 text-sm font-medium text-fg`,children:n?`选择头像`:`Choose an avatar`}),(0,H.jsxs)(`div`,{className:`grid grid-cols-2 gap-3 sm:grid-cols-4`,children:[ce.map(e=>(0,H.jsxs)(`button`,{type:`button`,"aria-pressed":!O&&p.appearance===e.id,onClick:()=>{A(null),M(null),m(t=>({...t,appearance:e.id}))},className:`flex min-h-28 flex-col items-center justify-center gap-2 rounded-2xl p-3 text-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent ${!O&&p.appearance===e.id?`bg-accent/10 text-fg ring-1 ring-accent/40`:`bg-surface-panel text-fg-muted hover:bg-surface-hover`}`,children:[(0,H.jsx)(C,{appearance:e.id,className:`size-14`}),n?e.zh:e.en]},e.id)),(0,H.jsxs)(`label`,{className:`flex min-h-28 cursor-pointer flex-col items-center justify-center gap-2 rounded-2xl p-3 text-sm transition-colors focus-within:ring-2 focus-within:ring-accent ${O?`bg-accent/10 text-fg ring-1 ring-accent/40`:`bg-surface-panel text-fg-muted hover:bg-surface-hover`}`,children:[(0,H.jsx)(D,{className:`size-6`}),n?`上传图片`:`Upload image`,(0,H.jsx)(`input`,{className:`sr-only`,type:`file`,accept:`image/png,image/jpeg,image/webp`,onChange:e=>{let t=e.target.files?.[0];if(t){if(t.size>512*1024||![`image/png`,`image/jpeg`,`image/webp`].includes(t.type)){E(n?`请选择不超过 512 KB 的 PNG、JPEG 或 WebP 图片。`:`Choose a PNG, JPEG, or WebP image under 512 KB.`);return}A(t),M(URL.createObjectURL(t))}}})]})]}),(0,H.jsx)(`p`,{className:`mt-2 text-xs text-fg-subtle`,children:n?`自定义图片在创建助手时上传;刷新后需要重新选择。`:`Custom images upload when you create the assistant; select again after a refresh.`})]})]}),l===`voice`&&(0,H.jsxs)(`div`,{className:`mt-5`,children:[(0,H.jsx)(`p`,{className:`text-sm leading-6 text-fg-muted`,children:n?`用于这个助手的语音通话;文字回答不受影响。试听不会使用麦克风。`:`This affects calls with this assistant. Text stays the same. Preview does not use your microphone.`}),F?(0,H.jsxs)(`div`,{className:`mt-5 grid gap-3 sm:grid-cols-2`,children:[(0,H.jsx)(k,{className:`h-20 rounded-xl`}),(0,H.jsx)(k,{className:`h-20 rounded-xl`})]}):N?.enabled&&te.length>0?(0,H.jsxs)(`div`,{className:`mt-5 grid gap-3 sm:grid-cols-2`,children:[(0,H.jsx)(`button`,{type:`button`,"aria-pressed":!p.voice,onClick:()=>m(e=>({...e,voice:null})),className:`rounded-xl p-4 text-left text-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent ${p.voice?`bg-surface-panel text-fg-muted hover:bg-surface-hover`:`bg-accent/10 text-fg ring-1 ring-accent/40`}`,children:n?`使用默认声音`:`Use the default voice`}),te.map(e=>(0,H.jsxs)(`div`,{className:`flex items-center gap-2 rounded-xl p-3 transition-colors ${p.voice===e.id?`bg-accent/10 ring-1 ring-accent/40`:`bg-surface-panel hover:bg-surface-hover`}`,children:[(0,H.jsxs)(`button`,{type:`button`,className:`min-w-0 flex-1 rounded-lg text-left focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`,"aria-pressed":p.voice===e.id,onClick:()=>m(t=>({...t,voice:e.id})),children:[(0,H.jsx)(`span`,{className:`block text-sm font-medium text-fg`,children:e.name}),(0,H.jsx)(`span`,{className:`mt-1 block text-xs text-fg-muted`,children:e.description||e.style||(n?`点击选择`:`Select this voice`)})]}),(0,H.jsx)(`button`,{type:`button`,onClick:()=>void X(e.id),className:`flex size-9 shrink-0 items-center justify-center rounded-full bg-surface-hover text-fg hover:bg-surface-active focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`,"aria-label":n?`试听${e.name}`:`Preview ${e.name}`,children:(0,H.jsx)(w,{className:`size-4 ${ae===e.id?`text-accent`:``}`})})]},e.id))]}):(0,H.jsxs)(`div`,{className:`mt-5 rounded-xl bg-surface-panel p-5 text-sm text-fg-muted`,children:[(0,H.jsx)(`p`,{children:n?`当前没有可试听的语音。你可以先用文字对话,稍后再设置。`:`No voice is ready to preview. You can start with text and set it up later.`}),(0,H.jsx)(i,{to:`/settings/capabilities/models?configure=speech&returnTo=%2Fpersonal`,className:`mt-3 inline-block text-accent hover:underline`,children:n?`设置语音服务`:`Set up voice`})]})]}),l===`connections`&&(0,H.jsxs)(`div`,{className:`mt-5`,children:[(0,H.jsx)(`p`,{className:`text-sm leading-6 text-fg-muted`,children:n?`现在连接,或进入对话后再添加。连接不会自动读取历史数据或创建持续关注。`:`Connect now or add sources later. Connecting does not automatically scan history or create ongoing monitoring.`}),K?(0,H.jsxs)(`div`,{className:`mt-5 space-y-2`,children:[(0,H.jsx)(k,{className:`h-18 rounded-xl`}),(0,H.jsx)(k,{className:`h-18 rounded-xl`})]}):(0,H.jsx)(`div`,{className:`mt-5 space-y-2`,children:le.length?le.map(e=>{let t=W(fe.find(t=>t.connectorId===e.id));return(0,H.jsxs)(`div`,{className:`flex items-center gap-3 rounded-xl bg-surface-panel p-4`,children:[(0,H.jsx)(y,{connector:e,size:`sm`}),(0,H.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,H.jsx)(`p`,{className:`text-sm font-medium text-fg`,children:e.displayName}),(0,H.jsx)(`p`,{className:`line-clamp-2 text-xs text-fg-muted`,children:e.description})]}),t?(0,H.jsxs)(`span`,{className:`flex items-center gap-1 text-xs text-success`,children:[(0,H.jsx)(h,{className:`size-4`}),n?`已连接`:`Connected`]}):(0,H.jsx)(`button`,{type:`button`,onClick:()=>pe(b(e)),className:`rounded-lg bg-surface-hover px-3 py-2 text-xs text-fg transition-colors hover:bg-surface-active focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`,children:n?`连接`:`Connect`})]},e.id)}):(0,H.jsx)(`p`,{className:`rounded-xl bg-surface-panel p-5 text-sm text-fg-muted`,children:n?`暂无可用的推荐服务;你仍可直接进入对话。`:`No suggested services are available. You can continue to chat.`})})]}),!e&&(0,H.jsxs)(`p`,{className:`mt-5 rounded-xl bg-warning/5 p-4 text-sm text-fg-muted`,children:[n?`开始前需要一个可用模型。`:`A compatible model is required before you start.`,` `,(0,H.jsx)(i,{to:`/settings/capabilities/models`,className:`text-accent underline`,children:n?`配置模型`:`Set up a model`})]}),T&&(0,H.jsx)(`p`,{role:`alert`,className:`mt-5 text-sm text-danger`,children:T})]},l)}),(0,H.jsx)(`footer`,{className:`shrink-0 px-5 pb-6 pt-3 sm:px-8 sm:pb-9`,children:(0,H.jsxs)(`div`,{className:`mx-auto flex w-full max-w-2xl flex-col-reverse gap-3 sm:flex-row sm:items-center sm:justify-between`,children:[(0,H.jsx)(`span`,{className:`text-xs text-fg-subtle`,children:n?`这些选择以后都能调整`:`You can change these choices later`}),(0,H.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3`,children:[l===`intro`&&(0,H.jsx)(`button`,{type:`button`,disabled:!e||v,onClick:()=>void he(!0),className:`min-h-11 rounded-lg px-3 text-sm text-fg-muted transition-colors hover:bg-surface-hover hover:text-fg focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent disabled:opacity-40`,children:n?`用默认设置开始`:`Use defaults`}),l===`voice`&&(0,H.jsx)(`button`,{type:`button`,onClick:()=>{let e={...p,voice:null};m(e),E(null),me(`connections`,e).catch(e=>E(e instanceof Error?e.message:String(e)))},className:`min-h-11 rounded-lg px-3 text-sm text-fg-muted transition-colors hover:bg-surface-hover hover:text-fg focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`,children:n?`跳过`:`Skip`}),(0,H.jsxs)(`button`,{type:`button`,disabled:v||l===`connections`&&!e,onClick:()=>l===`connections`?void he():void Y(1),className:`flex min-h-11 items-center gap-2 rounded-xl bg-accent px-5 text-sm font-medium text-on-accent transition-colors hover:bg-accent-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent focus-visible:ring-offset-2 disabled:opacity-40`,children:[v?n?`正在创建…`:`Creating…`:l===`connections`?n?`进入对话`:`Start chatting`:n?`继续`:`Continue`,` `,!v&&(0,H.jsx)(f,{className:`size-4`})]})]})]})}),J&&(0,H.jsx)(x,{draft:J,onChange:pe,onClose:()=>pe(null),t:c(r).connectorsSettings,onInstalled:async()=>{q(await re()),pe(null)}})]})}function ue({record:e,zh:t,onSelectVoice:n,onGreetingChange:r}){let[a,o]=(0,V.useState)(!1),[s,c]=(0,V.useState)(!0),[l,u]=(0,V.useState)(``),[d,f]=(0,V.useState)(null),[p,m]=(0,V.useState)([]),[h,_]=(0,V.useState)(e.voicePreference?.voice??``),[v,y]=(0,V.useState)(!1),[b,x]=(0,V.useState)(null),[S,C]=(0,V.useState)(null),T=(0,V.useRef)(null),D=(0,V.useRef)(null);(0,V.useEffect)(()=>{let e=!1;return(async()=>{try{let t=await se();if(e||(o(t.openingGreeting===!0),!t.enabled||!t.tts))return;let n={provider:t.tts.provider,model:t.tts.model};f(n);let r=await oe(n.provider,n.model,`realtime`);e||m(r)}catch(t){e||x(t instanceof Error?t.message:String(t))}finally{e||c(!1)}})(),()=>{e=!0}},[]),(0,V.useEffect)(()=>()=>{D.current?.abort(),T.current?.close()},[]);let O=()=>{D.current?.abort(),D.current=null,T.current?.close(),T.current=null,C(null)},A=async e=>{if(S!==null){O();return}O(),x(null);let n=new AbortController;D.current=n,C(e);try{let t=new ee;T.current=t,await t.start();let r=await R(n.signal,e);n.signal.aborted||t.enqueue(r,()=>{D.current===n&&(C(null),D.current=null,T.current=null,t.close())})}catch(e){if(!n.signal.aborted){let n=e?.body?.error?.code;x(t&&n===`unsupported_voice`?`当前音色暂不可用,请刷新语音目录或选择其他音色。`:e instanceof Error?e.message:String(e))}D.current===n&&O()}},j=async e=>{if(v||e===h)return;O();let t=h;_(e),u(``),y(!0),x(null);try{await n(e&&d?{provider:d.provider,model:d.model,voice:e}:null)||_(t)}catch(e){_(t),x(e instanceof Error?e.message:String(e))}finally{y(!1)}},M=p.find(e=>e.id===h),N=t?`默认声音`:`Default voice`,P=M?.name||(h?t?`当前音色不可用`:`Current voice unavailable`:N),F=l.trim().toLocaleLowerCase(),I=p.filter(e=>!F||`${e.name} ${e.description??``} ${e.style??``}`.toLocaleLowerCase().includes(F)).map(e=>({value:e.id,label:e.name}));return(0,H.jsxs)(`section`,{className:`border-t border-edge pt-5`,children:[(0,H.jsx)(`h3`,{className:`text-sm font-medium text-fg`,children:t?`通话声音`:`Call voice`}),s?(0,H.jsx)(`div`,{className:`mt-3`,"aria-busy":`true`,children:(0,H.jsx)(k,{className:`h-10 w-full`})}):d&&p.length?(0,H.jsxs)(`div`,{className:`mt-3 space-y-2`,children:[(0,H.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,H.jsx)(`div`,{className:`min-w-0 flex-1`,children:(0,H.jsx)(g,{value:h,selectedLabel:P,options:I,placeholder:N,emptyLabel:N,ariaLabel:t?`选择通话音色`:`Choose call voice`,disabled:v,onChange:e=>void j(e),searchPlaceholder:p.length>8?t?`搜索音色`:`Search voices`:void 0,searchValue:l,onSearchChange:u,statusMessage:F&&!I.length?t?`没有匹配的音色`:`No matching voices`:void 0})}),(0,H.jsxs)(`button`,{type:`button`,disabled:v||!!(h&&!M),onClick:()=>void A(h),className:`touch-target flex h-10 shrink-0 items-center justify-center gap-1.5 rounded-lg border border-edge 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:opacity-50`,title:S===null?t?`试听${P}`:`Preview ${P}`:t?`停止试听`:`Stop preview`,"aria-label":S===null?t?`试听${P}`:`Preview ${P}`:t?`停止试听`:`Stop preview`,children:[S===null?(0,H.jsx)(w,{className:`size-4`,"aria-hidden":!0}):(0,H.jsx)(E,{className:`size-4 text-accent`,"aria-hidden":!0}),S===null?t?`试听`:`Preview`:t?`停止`:`Stop`]})]}),(0,H.jsx)(`p`,{className:`text-xs leading-relaxed text-fg-muted`,children:M?.description||M?.style||(h?t?`选择后自动保存,用于之后的语音通话。`:`Saved automatically for future voice calls.`:t?`跟随语音服务的默认音色。`:`Uses the voice service’s default voice.`)})]}):(0,H.jsxs)(`p`,{className:`mt-3 text-sm text-fg-muted`,children:[t?`当前没有可用音色。`:`No voice is ready.`,` `,(0,H.jsx)(i,{to:`/settings/capabilities/models?configure=speech&returnTo=%2Fpersonal`,className:`text-accent underline`,children:t?`设置语音服务`:`Set up voice`})]}),r&&a&&(0,H.jsxs)(`label`,{className:`mt-4 flex items-center justify-between gap-3 text-sm text-fg`,children:[t?`连接时打招呼`:`Greet me when connected`,(0,H.jsx)(`input`,{type:`checkbox`,checked:e.voiceCallPreferences?.openingGreetingEnabled??!0,disabled:v,onChange:e=>{let t=e.target.checked;y(!0),r(t).catch(e=>x(String(e))).finally(()=>y(!1))}})]}),b&&(0,H.jsx)(`p`,{role:`alert`,className:`mt-3 text-xs text-danger`,children:b})]})}var K=new M;function de({conversationId:e,zh:t,onSaved:n}){let r=A(t=>t.sessions[e]),[i,a]=(0,V.useState)(!0),[o,s]=(0,V.useState)(``);(0,V.useEffect)(()=>{let t=!0;return K.loadSessionAgentConfig(e).then(n=>{t&&j(e,n)}).catch(e=>{t&&s(String(e))}).finally(()=>{t&&a(!1)}),()=>{t=!1}},[e]);let l=!!r?.modelConfigSaving;async function d(t,i){A.getState().patchSessionMeta(e,{modelConfigSaving:!0});try{j(e,await K.patchSessionAgentConfig(e,{model:t,thinkingLevel:i,configVersion:r?.configVersion})),await n()}catch(t){let n=await K.loadSessionAgentConfig(e).catch(()=>null);throw n&&j(e,n),t}finally{A.getState().patchSessionMeta(e,{modelConfigSaving:!1})}}return(0,H.jsxs)(`section`,{children:[(0,H.jsx)(`h3`,{className:`mb-3 text-sm font-medium text-fg`,children:t?`对话模型与思考强度`:`Conversation model and thinking`}),i?(0,H.jsx)(k,{className:`h-9 w-full`}):(0,H.jsx)(u,{chat:c(t?`zh`:`en`).chat,sessionModel:r?.model??``,thinkingLevel:r?.thinkingLevel??`off`,modelDisabled:l,thinkingDisabled:l,onModelChange:d,onThinkingChange:e=>d(r?.model??``,e)}),o&&(0,H.jsx)(`p`,{role:`alert`,className:`mt-2 text-sm text-danger`,children:o})]})}var fe=5;function q(e){let t=e.replace(/\s+/g,` `).trim();if(t.length<=58)return t;let n=t.replace(/([^)]{1,80})|\([^)]{1,80}\)/g,``).replace(/([A-Za-z0-9])(?=[\u4e00-\u9fff])/g,`$1 `).replace(/\s+/g,` `).trim(),r=n.split(/[。!?;;,]/,1)[0]?.trim()||n;return r.length>58?`${r.slice(0,57).trimEnd()}…`:r}function J(e,t){if(e.phase===`closed`)return{label:t?`已结束`:`Finished`,tone:`bg-fg-subtle`};let n=e.operationalState??e.runStatus;return n===`running`?{label:t?`正在执行`:`Working`,tone:`bg-accent`}:n===`queued`?{label:t?`等待开始`:`Queued`,tone:`bg-fg-subtle`}:n===`failed`?{label:t?`执行失败`:`Failed`,tone:`bg-danger`}:n===`waiting`?{label:t?`等待继续`:`Waiting`,tone:`bg-warning`}:n===`blocked`?{label:t?`已阻塞`:`Blocked`,tone:`bg-warning`}:n===`verifying`?{label:t?`正在验证`:`Verifying`,tone:`bg-accent`}:n===`cancelled`?{label:t?`执行已取消`:`Cancelled`,tone:`bg-fg-subtle`}:e.phase===`review`?{label:t?`等待验收`:`In review`,tone:`bg-warning`}:e.phase===`active`?{label:t?`正在推进`:`In progress`,tone:`bg-accent`}:e.phase===`ready`?{label:t?`准备开始`:`Ready`,tone:`bg-fg-subtle`}:{label:t?`待处理`:`Planned`,tone:`bg-fg-subtle`}}function pe(e){let t=(0,B.c)(30),{item:n,zh:r}=e,a;t[0]!==n||t[1]!==r?(a=J(n,r),t[0]=n,t[1]=r,t[2]=a):a=t[2];let o=a,s;t[3]===n.id?s=t[4]:(s=v(`/personal`,n.id),t[3]=n.id,t[4]=s);let c=`mt-2 size-1.5 shrink-0 rounded-full ${o.tone}`,l;t[5]===c?l=t[6]:(l=(0,H.jsx)(`span`,{className:c,"aria-hidden":!0}),t[5]=c,t[6]=l);let u;t[7]===n.title?u=t[8]:(u=q(n.title),t[7]=n.title,t[8]=u);let d;t[9]===u?d=t[10]:(d=(0,H.jsx)(`span`,{className:`line-clamp-2 break-words text-sm font-medium leading-5 text-fg`,children:u}),t[9]=u,t[10]=d);let f;t[11]===o.label?f=t[12]:(f=(0,H.jsx)(`span`,{children:o.label}),t[11]=o.label,t[12]=f);let p;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,H.jsx)(`span`,{className:`text-fg-subtle`,"aria-hidden":!0,children:`·`}),t[13]=p):p=t[13];let h=r?`zh`:`en`,g;t[14]!==n.updatedAt||t[15]!==h?(g=z(n.updatedAt,h),t[14]=n.updatedAt,t[15]=h,t[16]=g):g=t[16];let _;t[17]===g?_=t[18]:(_=(0,H.jsx)(`span`,{children:g}),t[17]=g,t[18]=_);let y;t[19]!==_||t[20]!==f?(y=(0,H.jsxs)(`span`,{className:`mt-1.5 flex items-center gap-2 text-xs text-fg-muted`,children:[f,p,_]}),t[19]=_,t[20]=f,t[21]=y):y=t[21];let b;t[22]!==y||t[23]!==d?(b=(0,H.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[d,y]}),t[22]=y,t[23]=d,t[24]=b):b=t[24];let x;t[25]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,H.jsx)(m,{className:`mt-0.5 size-4 shrink-0 text-fg-subtle opacity-0 transition-opacity duration-150 group-hover:opacity-100 group-focus-visible:opacity-100`,"aria-hidden":!0}),t[25]=x):x=t[25];let S;return t[26]!==b||t[27]!==s||t[28]!==l?(S=(0,H.jsxs)(i,{to:s,className:`group flex min-w-0 items-start gap-3 rounded-2xl bg-surface-panel px-4 py-4 transition-colors duration-150 hover:bg-surface-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`,children:[l,b,x]}),t[26]=b,t[27]=s,t[28]=l,t[29]=S):S=t[29],S}var me=[{id:`loopi`,zh:`Loopi`,en:`Loopi`,color:`bg-slate-100/50 dark:bg-slate-400/10`},{id:`loopi-curious`,zh:`好奇`,en:`Curious`,color:`bg-blue-100/50 dark:bg-blue-400/10`},{id:`loopi-care`,zh:`温和`,en:`Gentle`,color:`bg-violet-100/50 dark:bg-violet-400/10`}];function Y(){let e=p(),t=(0,V.useRef)(e);t.current=e;let n=o(e=>e.language)===`zh`,r=ae(e=>e.setPageHeader),i=ae(e=>e.clearPageHeader),[c,u]=(0,V.useState)(null),d=(0,V.useRef)(null),f=(0,V.useRef)(Promise.resolve()),[m,h]=(0,V.useState)([]),[g,v]=(0,V.useState)(!0),[y,b]=(0,V.useState)(0),[x,w]=(0,V.useState)(null),[E,ee]=(0,V.useState)(!1),[A,j]=(0,V.useState)(`loopi`),[M,re]=(0,V.useState)(!1),ie=(0,V.useRef)(null),R=(0,V.useRef)(null),oe=(0,V.useRef)(null),[se,z]=(0,V.useState)(``),[B,U]=(0,V.useState)(!1),[ce,W]=(0,V.useState)(!1),[G,K]=(0,V.useState)(!1),[q,J]=(0,V.useState)(null),[Y,he]=(0,V.useState)(!1),[X,Z]=(0,V.useState)(!1),[ge,_e]=(0,V.useState)(!1),[Q,ve]=(0,V.useState)(0),$=(0,V.useRef)(0),ye=(0,V.useCallback)(()=>{K(!1),W(!1),U(!0)},[]),be=(0,V.useCallback)(()=>{K(!1),W(!1),U(e=>!e)},[]),xe=(0,V.useCallback)(async()=>{try{let[e,t]=await Promise.all([s(a(`/api/personal-agent`)),s(a(`/api/personal-agent/models`))]);d.current=e.payload,u(e.payload),window.dispatchEvent(new CustomEvent(`personal-agent-updated`,{detail:e.payload})),e.payload&&window.dispatchEvent(new Event(`session-updated`)),h(t.payload),e.payload&&(z(e.payload.displayName),j(e.payload.appearance))}catch(e){w(e instanceof Error?e.message:String(e))}finally{v(!1)}},[]);(0,V.useEffect)(()=>{xe()},[xe]);let Se=(0,V.useCallback)(e=>{b(e=>e+1),w(null);let t=f.current.then(async()=>{let t=d.current;if(!t)return!1;let n=e.displayName?.trim()||t.displayName,r=e.appearance??t.appearance,i=e.voicePreference===void 0?t.voicePreference:e.voicePreference;if(n===t.displayName&&r===t.appearance&&JSON.stringify(i)===JSON.stringify(t.voicePreference)&&(!e.voiceCallPreferences||JSON.stringify(e.voiceCallPreferences)===JSON.stringify(t.voiceCallPreferences)))return!0;try{let o=await s(a(`/api/personal-agent/profile`),{method:`PATCH`,body:JSON.stringify({revision:t.revision,displayName:n,appearance:r,...e.voicePreference===void 0?{}:{voicePreference:i},...e.voiceCallPreferences?{voiceCallPreferences:e.voiceCallPreferences}:{}})});return d.current=o.payload,u(o.payload),window.dispatchEvent(new CustomEvent(`personal-agent-updated`,{detail:o.payload})),!0}catch(e){return w(e instanceof Error?e.message:String(e)),!1}}).finally(()=>b(e=>e-1));return f.current=t,t},[]),Ce=(0,V.useCallback)(async()=>{let e=++$.current;K(!0),J(null),he(!1),Z(!1),_e(!1),ve(0);try{let t=await s(a(`/api/personal-agent/activity?limit=${fe}&offset=0`));if(e!==$.current)return;J(t.payload),ve(t.payload.items.length)}catch{e===$.current&&he(!0)}},[]),we=(0,V.useCallback)(async()=>{if(!q||X||Q>=q.total)return;let e=$.current;Z(!0),_e(!1);try{let t=await s(a(`/api/personal-agent/activity?limit=${fe}&offset=${Q}`));if(e!==$.current)return;J(e=>e?{total:t.payload.total,items:[...e.items,...t.payload.items.filter(t=>!e.items.some(e=>e.id===t.id))]}:t.payload),ve(e=>e+t.payload.items.length)}catch{e===$.current&&_e(!0)}finally{e===$.current&&Z(!1)}},[q,Q,X]);(0,V.useEffect)(()=>{if(!G||!q||X)return;let e,t=()=>{window.clearTimeout(e),e=window.setTimeout(async()=>{let e=$.current;try{let t=await s(a(`/api/personal-agent/activity?limit=${Math.max(fe,Math.min(100,Q))}&offset=0`));if(e!==$.current)return;J(t.payload),ve(t.payload.items.length)}catch{}},120)},n=window.setInterval(t,5e3);return window.addEventListener(`task-changed-v2`,t),window.addEventListener(`gateway-realtime-connected`,t),()=>{window.clearTimeout(e),window.clearInterval(n),window.removeEventListener(`task-changed-v2`,t),window.removeEventListener(`gateway-realtime-connected`,t)}},[q,Q,X,G]);let Te=async e=>{if(!c||![`image/png`,`image/jpeg`,`image/webp`].includes(e.type)){w(n?`请选择 PNG、JPEG 或 WebP 图片。`:`Choose a PNG, JPEG, or WebP image.`);return}if(e.size===0||e.size>512*1024){w(n?`图片大小不能超过 512 KB。`:`Image must be 512 KB or smaller.`);return}re(!0),w(null);try{let t=await new Promise((t,n)=>{let r=new FileReader;r.onload=()=>t(String(r.result)),r.onerror=()=>n(r.error),r.readAsDataURL(e)});await s(a(`/api/agents/${encodeURIComponent(c.agentId)}/avatar`),{method:`PUT`,body:JSON.stringify({base64:t.slice(t.indexOf(`,`)+1),mimeType:e.type})}),L(c.agentId),j(`custom`),W(!1),await Se({appearance:`custom`})}catch(e){w(e instanceof Error?e.message:String(e))}finally{re(!1)}};(0,V.useLayoutEffect)(()=>{let a=c?.state===`ready`,o=a?c.appearance:A,s=a?c.displayName:`Ada`;return r({startExtra:null,main:(0,H.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2.5`,children:[a?(0,H.jsx)(`button`,{ref:oe,type:`button`,onClick:be,"aria-expanded":B,className:`touch-target -m-1 shrink-0 rounded-full p-1 transition-opacity hover:opacity-80 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`,"aria-label":n?`编辑${s}的资料`:`Edit ${s}'s profile`,title:n?`资料`:`Profile`,children:(0,H.jsx)(`span`,{className:`flex size-8 items-center justify-center`,children:(0,H.jsx)(C,{appearance:o,agentId:c?.agentId,className:`size-8`})})}):(0,H.jsx)(`span`,{className:`flex size-8 shrink-0 items-center justify-center`,children:(0,H.jsx)(C,{appearance:o,agentId:c?.agentId,className:`size-8`})}),(0,H.jsx)(`h1`,{className:`min-w-0 truncate text-sm font-semibold text-fg sm:text-base`,children:s})]}),end:a?(0,H.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,H.jsx)(`button`,{type:`button`,disabled:e.active,onClick:()=>{c?.state===`ready`&&t.current.open({conversationId:c.conversationId,name:c.displayName,mode:`assistant`})},className:`touch-target rounded-lg p-2 text-fg-muted hover:bg-surface-hover hover:text-fg disabled:opacity-50`,"aria-label":n?`语音通话`:`Voice call`,title:n?`语音通话`:`Voice call`,children:(0,H.jsx)(S,{className:`size-5`})}),(0,H.jsxs)(F,{open:G,onOpenChange:e=>{e?Ce():K(!1)},children:[(0,H.jsx)(te,{asChild:!0,children:(0,H.jsx)(`button`,{type:`button`,"aria-pressed":G,className:`touch-target rounded-lg p-2 text-fg-muted hover:bg-surface-hover hover:text-fg`,"aria-label":n?`正在做的事`:`Activity`,children:(0,H.jsx)(_,{className:`size-5`})})}),(0,H.jsx)(N,{children:(0,H.jsxs)(P,{side:`bottom`,align:`end`,sideOffset:8,collisionPadding:8,"aria-label":n?`派发的任务`:`Delegated tasks`,className:`z-50 flex h-[min(34rem,calc(100dvh-6rem))] w-[min(22rem,calc(100vw-1rem))] min-h-0 flex-col overflow-hidden rounded-2xl border border-edge bg-surface-overlay shadow-xl focus:outline-none`,children:[(0,H.jsxs)(`div`,{className:`flex shrink-0 items-start justify-between gap-3 px-6 pb-3 pt-6`,children:[(0,H.jsxs)(`div`,{className:`min-w-0`,children:[(0,H.jsx)(`h2`,{className:`text-base font-semibold tracking-tight text-fg`,children:n?`交给我推进的事`:`Delegated work`}),(0,H.jsx)(`p`,{className:`mt-1 text-xs text-fg-muted`,children:q?n?`最近更新 · 共 ${q.total} 项`:`Recently updated · ${q.total} total`:n?`查看任务进展与结果`:`Follow progress and results`})]}),(0,H.jsx)(I,{className:`touch-target -mr-2 -mt-1 rounded-lg p-2 text-fg-muted transition-colors hover:bg-surface-hover hover:text-fg focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`,"aria-label":n?`关闭活动`:`Close activity`,children:(0,H.jsx)(O,{className:`size-4`})})]}),(0,H.jsxs)(`div`,{className:`min-h-0 flex-1 overflow-y-auto px-3 pb-5 pt-3`,children:[!q&&!Y&&(0,H.jsxs)(`div`,{className:`space-y-2`,children:[(0,H.jsx)(k,{className:`h-18 rounded-2xl`}),(0,H.jsx)(k,{className:`h-18 rounded-2xl`}),(0,H.jsx)(k,{className:`h-18 rounded-2xl`})]}),Y&&(0,H.jsxs)(`div`,{className:`px-5 py-12 text-center`,children:[(0,H.jsx)(`p`,{className:`text-sm text-fg-muted`,children:n?`暂时无法读取任务`:`Could not load tasks`}),(0,H.jsx)(`button`,{type:`button`,onClick:()=>void Ce(),className:`mt-3 rounded-lg px-3 py-2 text-sm text-accent hover:bg-surface-hover`,children:n?`重试`:`Try again`})]}),q?.items.length===0&&(0,H.jsxs)(`div`,{className:`px-5 py-16 text-center`,children:[(0,H.jsx)(_,{className:`mx-auto size-7 text-fg-subtle`,"aria-hidden":!0}),(0,H.jsx)(`p`,{className:`mt-4 text-sm font-medium text-fg`,children:n?`还没有派发的任务`:`No delegated work yet`}),(0,H.jsx)(`p`,{className:`mt-1 text-xs leading-5 text-fg-muted`,children:n?`你可以在对话里直接告诉我想推进的事。`:`Tell me what you would like to move forward in chat.`})]}),q&&q.items.length>0&&(0,H.jsx)(`div`,{className:`space-y-2`,children:q.items.map(e=>(0,H.jsx)(pe,{item:e,zh:n},e.id))}),q&&Q<q.total&&(0,H.jsxs)(`div`,{className:`pt-4 text-center`,children:[(0,H.jsx)(`button`,{type:`button`,onClick:()=>void we(),disabled:X,className:`min-h-10 rounded-xl bg-surface-panel px-5 text-sm font-medium text-fg-muted transition-colors hover:bg-surface-hover hover:text-fg disabled:opacity-50`,children:X?n?`正在加载…`:`Loading…`:n?`加载更多`:`Load more`}),ge&&(0,H.jsx)(`p`,{role:`alert`,className:`mt-2 text-xs text-danger`,children:n?`加载失败,请重试`:`Could not load more. Try again.`})]})]})]})})]}),(0,H.jsx)(`button`,{ref:R,type:`button`,onClick:be,"aria-expanded":B,className:`touch-target rounded-lg p-2 text-fg-muted hover:bg-surface-hover hover:text-fg`,"aria-label":n?`编辑资料`:`Edit profile`,children:(0,H.jsx)(T,{className:`size-5`})})]}):null}),()=>i()},[q,Y,Q,X,ge,A,i,we,Ce,c,r,G,B,be,e.active,n]);function Ee(){return c?(0,H.jsxs)(F,{open:B,onOpenChange:e=>{U(e),e||W(!1)},children:[(0,H.jsx)(ne,{virtualRef:R}),(0,H.jsx)(N,{children:(0,H.jsxs)(P,{side:`bottom`,align:`end`,sideOffset:8,collisionPadding:8,"aria-label":n?`编辑 Personal AI`:`Edit Personal AI`,onInteractOutside:e=>{e.target instanceof Node&&(R.current?.contains(e.target)||oe.current?.contains(e.target))&&e.preventDefault()},className:`z-50 flex w-[min(22rem,calc(100vw-1rem))] flex-col rounded-2xl border border-edge bg-surface-overlay shadow-xl outline-none`,children:[(0,H.jsxs)(`div`,{className:`relative flex shrink-0 flex-col items-center px-4 pt-4 text-center`,children:[(0,H.jsx)(`button`,{type:`button`,disabled:M,onClick:()=>W(e=>!e),"aria-expanded":ce,"aria-controls":`personal-appearance-options`,"aria-label":n?`选择头像`:`Choose avatar`,className:`rounded-full transition-opacity hover:opacity-80 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent disabled:opacity-50`,children:(0,H.jsx)(C,{appearance:A,agentId:c.agentId,className:`size-16`})}),(0,H.jsx)(`input`,{id:`personal-name`,"aria-label":n?`助手名称`:`Assistant name`,value:se,onChange:e=>z(e.target.value),onBlur:e=>{let t=e.currentTarget.value.trim();t?(z(t),Se({displayName:t})):z(d.current?.displayName??``)},onKeyDown:e=>{e.key===`Enter`&&e.currentTarget.blur(),e.key===`Escape`&&(e.currentTarget.value=d.current?.displayName??``,z(e.currentTarget.value),e.currentTarget.blur())},maxLength:60,placeholder:`Ada`,className:`mt-2 w-full min-w-0 rounded-lg border border-transparent bg-transparent px-2 py-1 text-center text-lg font-semibold text-fg outline-none transition-colors hover:border-edge focus:border-edge focus:bg-surface-base focus-visible:ring-2 focus-visible:ring-accent`}),y>0&&(0,H.jsx)(`span`,{className:`absolute right-4 top-4 text-xs text-fg-muted`,children:n?`正在保存…`:`Saving…`})]}),(0,H.jsxs)(`div`,{className:`space-y-4 px-4 py-4`,children:[x&&(0,H.jsx)(`p`,{role:`alert`,className:`text-sm text-danger`,children:x}),ce&&(0,H.jsxs)(`section`,{id:`personal-appearance-options`,children:[(0,H.jsx)(`h3`,{className:`mb-3 text-sm font-medium text-fg`,children:n?`形象`:`Appearance`}),(0,H.jsxs)(`div`,{className:`grid grid-cols-4 gap-2`,children:[me.map(e=>(0,H.jsxs)(`button`,{type:`button`,onClick:()=>{j(e.id),W(!1),Se({appearance:e.id})},"aria-pressed":A===e.id,className:`flex min-w-0 flex-col items-center gap-1.5 rounded-xl px-1 py-2 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent ${A===e.id?`bg-accent/10 ring-1 ring-accent/40`:`bg-surface-panel hover:bg-surface-hover`}`,children:[(0,H.jsx)(`span`,{className:`flex size-8 items-center justify-center rounded-full ${e.color}`,children:(0,H.jsx)(C,{appearance:e.id,className:`size-8`})}),(0,H.jsx)(`span`,{className:`truncate text-xs text-fg-muted`,children:n?e.zh:e.en})]},e.id)),(0,H.jsx)(`input`,{ref:ie,type:`file`,accept:`image/png,image/jpeg,image/webp`,className:`sr-only`,"aria-label":n?`上传头像`:`Upload avatar`,onChange:e=>{let t=e.currentTarget.files?.[0];t&&Te(t),e.currentTarget.value=``}}),(0,H.jsxs)(`button`,{type:`button`,disabled:M,onClick:()=>ie.current?.click(),"aria-pressed":A===`custom`,className:`flex min-w-0 flex-col items-center gap-1.5 rounded-xl px-1 py-2 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent disabled:opacity-50 ${A===`custom`?`bg-accent/10 ring-1 ring-accent/40`:`bg-surface-panel hover:bg-surface-hover`}`,children:[(0,H.jsx)(`span`,{className:`flex size-8 items-center justify-center rounded-full bg-surface-panel`,children:A===`custom`?(0,H.jsx)(C,{appearance:`custom`,agentId:c.agentId,className:`size-8`}):(0,H.jsx)(D,{className:`size-4 text-fg-muted`,"aria-hidden":!0})}),(0,H.jsx)(`span`,{className:`truncate text-xs text-fg-muted`,children:M?n?`上传中…`:`Uploading…`:n?`上传`:`Upload`})]})]})]}),(0,H.jsx)(ue,{onGreetingChange:e=>Se({voiceCallPreferences:{openingGreetingEnabled:e}}),record:c,zh:n,onSelectVoice:e=>Se({voicePreference:e})}),(0,H.jsx)(`div`,{className:`border-t border-edge pt-4`,children:(0,H.jsx)(de,{conversationId:c.conversationId,zh:n,onSaved:async()=>{let e=await s(a(`/api/personal-agent`));e.ok&&e.payload&&(d.current=e.payload,u(e.payload))}})})]})]})})]}):null}return g?(0,H.jsxs)(`div`,{className:`mx-auto w-full max-w-2xl space-y-5 px-6 py-12`,children:[(0,H.jsx)(k,{className:`h-20 w-20 rounded-full`}),(0,H.jsx)(k,{className:`h-9 w-72`}),(0,H.jsx)(k,{className:`h-44 w-full rounded-2xl`})]}):c?.state===`ready`?(0,H.jsxs)(`div`,{className:`flex h-full min-h-0 flex-1 flex-col bg-surface-panel`,children:[E&&(0,H.jsxs)(`div`,{role:`alert`,className:`flex shrink-0 items-center justify-between gap-3 border-b border-warning/30 bg-warning/5 px-5 py-3 text-sm text-fg-muted`,children:[(0,H.jsx)(`span`,{children:n?`助手已创建,头像上传未完成。可在资料设置中重新上传。`:`Your assistant is ready. Upload the avatar again in profile settings.`}),(0,H.jsx)(`button`,{type:`button`,onClick:()=>{ee(!1),ye()},className:`shrink-0 text-accent hover:underline`,children:n?`打开设置`:`Open settings`})]}),(0,H.jsx)(`div`,{className:`flex min-h-0 flex-1`,children:(0,H.jsx)(`div`,{className:`min-w-0 flex-1`,children:(0,H.jsx)(l,{embedded:!0,personal:!0,personalWelcome:{name:c.displayName,addressAs:c.userCallName??void 0,avatar:(0,H.jsx)(C,{appearance:c.appearance,agentId:c.agentId,className:`size-14`}),opening:n?`有什么想讨论或推进的事?直接告诉我就好。`:`What would you like to discuss or move forward? Just tell me what is on your mind.`},conversationId:c.conversationId})})}),Ee()]}):(0,H.jsx)(le,{modelsAvailable:m.length>0,onCreated:(e,t)=>{d.current=e,u(e),z(e.displayName),ee(t),window.dispatchEvent(new CustomEvent(`personal-agent-updated`,{detail:e})),window.dispatchEvent(new Event(`session-updated`))}})}export{Y as PersonalPage};
@@ -1 +0,0 @@
1
- import{a as e,c as t,d as n,i as r,m as i,n as a,u as o}from"./schemas-CCWMleym.js";var s=n({outreachId:i().uuid(),reasonKind:a([`follow_up`,`discussion`,`change`,`prepared`]),authority:a([`user_explicit`,`inferred`])}).strict();n({version:t(1),outreachId:i().uuid(),threadId:i().uuid(),conversationId:i().uuid(),originTranscriptId:i().min(1),text:i().trim().min(1).max(12e3),provenance:s,createdAt:o().int().nonnegative()}).strict();var c=n({revision:o().int().positive().default(1),mode:a([`off`,`follow_up`,`balanced`]).default(`balanced`),timezone:i().max(100).default(`Asia/Shanghai`).refine(e=>{try{return new Intl.DateTimeFormat(`en`,{timeZone:e}),!0}catch{return!1}},`Invalid timezone`),quietStart:o().int().min(0).max(23).default(22),quietEnd:o().int().min(0).max(23).default(8),dailyMessages:o().int().min(0).max(10).default(2),dailyModelCalls:o().int().min(0).max(100).default(12)}).strict();n({idempotencyKey:i().min(1).max(200),kind:a([`helpful`,`irrelevant`,`stop`,`defer`,`adjust`]),scope:a([`message`,`thread`]).default(`message`),until:o().int().positive().optional(),preparation:a([`brief`,`thorough`]).optional()}).strict().superRefine((e,t)=>{e.kind===`defer`&&!e.until&&t.addIssue({code:`custom`,message:`A defer time is required`}),e.kind===`adjust`&&!e.preparation&&t.addIssue({code:`custom`,message:`A preparation preference is required`}),(e.kind===`stop`||e.kind===`adjust`)&&e.scope!==`thread`&&t.addIssue({code:`custom`,message:`A lasting change requires thread scope`})}),n({versionId:i().uuid(),revision:o().int().positive(),idempotencyKey:i().min(1).max(200)}).strict();var l=n({preparation:a([`brief`,`thorough`]).nullable(),versions:r(n({id:i().uuid(),revision:o().int().positive(),kind:a([`stop`,`defer`,`adjust`,`rollback`]),createdAt:o(),preparation:a([`brief`,`thorough`]).nullable()}))});n({id:i().uuid(),subject:i(),summary:i(),status:a([`candidate`,`completed`,`expired`]),confidence:o().min(0).max(1),independentStatements:o().int(),independentDays:o().int(),lastSupportedAt:o(),expiresAt:o(),sources:r(n({entryId:i(),excerpt:i(),observedAt:o()}))});var u=n({provenance:s,thread:n({id:i(),subject:i(),status:i(),revision:o(),nextCheckAt:o().nullable()}),whyNow:i(),sources:r(n({conversationId:i(),transcriptId:i(),entryId:i(),excerpt:i()})),sourcesAvailable:e(),strategy:l.optional()});export{u as n,s as r,c as t};
@@ -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{i,n as a,o}from"./locale-store-CQcW9_qA.js";import{t as s}from"./popover-select-CLsphyzA.js";import{t as c}from"./skeleton-DzdOeGYz.js";import{t as l}from"./personal-proactivity-DaRnbB1f.js";import{t as u}from"./use-personal-profile-r0OuOlBJ.js";import{n as d,t as f}from"./settings-page-header-CheboxIM.js";import"./settings-page-layout-CPFMZaLF.js";var p=n(),m=e(t(),1),h=r();function g(){try{return[`UTC`,...Intl.supportedValuesOf(`timeZone`)]}catch{return[`UTC`,`Asia/Shanghai`,`Asia/Hong_Kong`,`Asia/Taipei`,`Asia/Tokyo`,`Asia/Seoul`,`Asia/Singapore`,`Asia/Kolkata`,`Asia/Dubai`,`Europe/London`,`Europe/Paris`,`Europe/Berlin`,`America/New_York`,`America/Chicago`,`America/Denver`,`America/Los_Angeles`,`Australia/Sydney`,`Pacific/Auckland`]}}var _=g();function v({zh:e}){let[t,n]=(0,m.useState)(),[r,a]=(0,m.useState)(``),[u,d]=(0,m.useState)(!1),[f,p]=(0,m.useState)(``),g=f.trim().toLowerCase().replaceAll(`_`,` `),v=[...new Set([..._,t?.timezone].filter(e=>!!e))].sort().filter(e=>e.replaceAll(`_`,` `).toLowerCase().includes(g)).map(e=>({value:e,label:e.replaceAll(`_`,` `),group:e.split(`/`)[0]}));(0,m.useEffect)(()=>{let e=!0;return o(i(`/api/personal-agent/proactivity`)).then(t=>{e&&t.ok&&n(l.parse(t.payload))}).catch(t=>{e&&a(String(t))}),()=>{e=!1}},[]);async function y(e){if(!(!t||u)){d(!0),a(``);try{let r=await o(i(`/api/personal-agent/proactivity`),{method:`PATCH`,headers:{"Content-Type":`application/json`},body:JSON.stringify({...t,...e})});r.ok&&n(l.parse(r.payload))}catch(e){a(String(e));let t=await o(i(`/api/personal-agent/proactivity`)).catch(()=>null);t?.ok&&n(l.parse(t.payload))}finally{d(!1)}}}return(0,h.jsxs)(`section`,{className:`space-y-3 border-t border-edge pt-5`,children:[(0,h.jsx)(`h3`,{className:`text-sm font-medium text-fg`,children:e?`主动联系`:`Proactive messages`}),!t&&!r?(0,h.jsx)(c,{className:`h-9 w-full`}):t&&(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(s,{placeholder:e?`选择主动方式`:`Choose participation`,value:t.mode,disabled:u,allowEmpty:!1,options:[{value:`off`,label:e?`关闭主动联系`:`Off`},{value:`follow_up`,label:e?`仅明确跟进`:`Requested follow-ups`},{value:`balanced`,label:e?`适度主动`:`Thoughtful participation`}],onChange:e=>void y({mode:e})}),(0,h.jsxs)(`div`,{className:`grid grid-cols-2 gap-3`,children:[(0,h.jsxs)(`label`,{className:`text-xs text-fg-muted`,children:[e?`免打扰开始`:`Quiet from`,(0,h.jsx)(s,{placeholder:e?`选择时间`:`Choose time`,value:String(t.quietStart),disabled:u,allowEmpty:!1,options:Array.from({length:24},(e,t)=>({value:String(t),label:`${String(t).padStart(2,`0`)}:00`})),onChange:e=>void y({quietStart:Number(e)})})]}),(0,h.jsxs)(`label`,{className:`text-xs text-fg-muted`,children:[e?`免打扰结束`:`Quiet until`,(0,h.jsx)(s,{placeholder:e?`选择时间`:`Choose time`,value:String(t.quietEnd),disabled:u,allowEmpty:!1,options:Array.from({length:24},(e,t)=>({value:String(t),label:`${String(t).padStart(2,`0`)}:00`})),onChange:e=>void y({quietEnd:Number(e)})})]})]}),(0,h.jsxs)(`label`,{className:`block text-xs text-fg-muted`,children:[e?`时区`:`Timezone`,(0,h.jsx)(s,{placeholder:e?`选择时区`:`Choose timezone`,ariaLabel:e?`时区`:`Timezone`,value:t.timezone,selectedLabel:t.timezone.replaceAll(`_`,` `),options:v,disabled:u,allowEmpty:!1,triggerClassName:`mt-1`,searchPlaceholder:e?`搜索时区或城市`:`Search timezone or city`,searchValue:f,onSearchChange:p,statusMessage:v.length?void 0:e?`没有匹配的时区`:`No matching timezones`,onChange:e=>{p(``),e!==t.timezone&&y({timezone:e})}})]}),(0,h.jsx)(`p`,{className:`text-xs text-fg-muted`,children:e?`有值得交流的进展时,在聊天里留下消息。明确请求的结果会照常交付。`:`Useful developments appear in this chat. Requested results are delivered as usual.`})]}),r&&(0,h.jsx)(`p`,{role:`alert`,className:`text-xs text-danger`,children:r})]})}function y(){let e=(0,p.c)(8),{displayName:t}=u(),n=a(b)===`zh`,r=n?`设置 ${t} 主动联系你的方式和免打扰时段。`:`Manage proactive messages from ${t} and quiet hours.`,i;e[0]!==t||e[1]!==r?(i=(0,h.jsx)(f,{title:t,subtitle:r}),e[0]=t,e[1]=r,e[2]=i):i=e[2];let o;e[3]===n?o=e[4]:(o=(0,h.jsx)(v,{zh:n}),e[3]=n,e[4]=o);let s;return e[5]!==i||e[6]!==o?(s=(0,h.jsxs)(d,{children:[i,o]}),e[5]=i,e[6]=o,e[7]=s):s=e[7],s}function b(e){return e.language}export{y as PersonalSettingsPanel};