@jingyi0605/codingns4dsh 0.2.1-beta.7 → 0.2.1-beta.9

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 (301) hide show
  1. package/README.en.md +3 -3
  2. package/README.md +9 -3
  3. package/data/build/dist/bootstrap/dsh-peer-host-preboot-shim.d.ts.map +1 -1
  4. package/data/build/dist/bootstrap/dsh-peer-host-preboot-shim.js +26 -1
  5. package/data/build/dist/bootstrap/dsh-peer-host-preboot-shim.js.map +1 -1
  6. package/data/build/dist/client/account-bar.d.ts.map +1 -1
  7. package/data/build/dist/client/account-bar.js +33 -21
  8. package/data/build/dist/client/account-bar.js.map +1 -1
  9. package/data/build/dist/client/avatar/desktop-bridge.js +1 -1
  10. package/data/build/dist/client/avatar/desktop-bridge.js.map +1 -1
  11. package/data/build/dist/client/avatar/desktop-view.d.ts +6 -2
  12. package/data/build/dist/client/avatar/desktop-view.d.ts.map +1 -1
  13. package/data/build/dist/client/avatar/desktop-view.js +48 -13
  14. package/data/build/dist/client/avatar/desktop-view.js.map +1 -1
  15. package/data/build/dist/client/avatar/floating.d.ts +5 -2
  16. package/data/build/dist/client/avatar/floating.d.ts.map +1 -1
  17. package/data/build/dist/client/avatar/floating.js +16 -5
  18. package/data/build/dist/client/avatar/floating.js.map +1 -1
  19. package/data/build/dist/client/avatar/notification-bubble.d.ts +24 -5
  20. package/data/build/dist/client/avatar/notification-bubble.d.ts.map +1 -1
  21. package/data/build/dist/client/avatar/notification-bubble.js +253 -66
  22. package/data/build/dist/client/avatar/notification-bubble.js.map +1 -1
  23. package/data/build/dist/client/avatar/notification-surface.d.ts +16 -0
  24. package/data/build/dist/client/avatar/notification-surface.d.ts.map +1 -0
  25. package/data/build/dist/client/avatar/notification-surface.js +54 -0
  26. package/data/build/dist/client/avatar/notification-surface.js.map +1 -0
  27. package/data/build/dist/client/avatar/reaction-badge.d.ts.map +1 -1
  28. package/data/build/dist/client/avatar/reaction-badge.js +11 -2
  29. package/data/build/dist/client/avatar/reaction-badge.js.map +1 -1
  30. package/data/build/dist/client/bundle.js +2628 -566
  31. package/data/build/dist/client/bundle.js.map +1 -1
  32. package/data/build/dist/client/cli-slots.d.ts.map +1 -1
  33. package/data/build/dist/client/cli-slots.js +26 -2
  34. package/data/build/dist/client/cli-slots.js.map +1 -1
  35. package/data/build/dist/client/client.assistant-notifications.js.map +1 -1
  36. package/data/build/dist/client/client.assistant-workbench.js +235 -109
  37. package/data/build/dist/client/client.assistant-workbench.js.map +1 -1
  38. package/data/build/dist/client/client.delegate-command.js +6 -6
  39. package/data/build/dist/client/client.delegate-command.js.map +1 -1
  40. package/data/build/dist/client/client.manager.js +46 -9
  41. package/data/build/dist/client/client.manager.js.map +1 -1
  42. package/data/build/dist/client/client.native-workspace-store.js +39 -3
  43. package/data/build/dist/client/client.native-workspace-store.js.map +1 -1
  44. package/data/build/dist/client/client.session-translation.js +54 -0
  45. package/data/build/dist/client/client.session-translation.js.map +1 -0
  46. package/data/build/dist/client/client.theme.js +2 -0
  47. package/data/build/dist/client/client.theme.js.map +1 -1
  48. package/data/build/dist/client/client.transport.js +123 -11
  49. package/data/build/dist/client/client.transport.js.map +1 -1
  50. package/data/build/dist/client/desktop-assistant.js +57927 -387
  51. package/data/build/dist/client/features/assistant-conversation-message.d.ts +2 -1
  52. package/data/build/dist/client/features/assistant-conversation-message.d.ts.map +1 -1
  53. package/data/build/dist/client/features/assistant-conversation-message.js +59 -24
  54. package/data/build/dist/client/features/assistant-conversation-message.js.map +1 -1
  55. package/data/build/dist/client/features/assistant-notification-store.d.ts +8 -2
  56. package/data/build/dist/client/features/assistant-notification-store.d.ts.map +1 -1
  57. package/data/build/dist/client/features/assistant-notification-store.js +45 -1
  58. package/data/build/dist/client/features/assistant-notification-store.js.map +1 -1
  59. package/data/build/dist/client/features/assistant-record-style.js +11 -4
  60. package/data/build/dist/client/features/assistant-record-style.js.map +1 -1
  61. package/data/build/dist/client/features/assistant-workbench.d.ts +4 -0
  62. package/data/build/dist/client/features/assistant-workbench.d.ts.map +1 -1
  63. package/data/build/dist/client/features/assistant-workbench.js +27 -1
  64. package/data/build/dist/client/features/assistant-workbench.js.map +1 -1
  65. package/data/build/dist/client/features/global-voice-assistant.d.ts.map +1 -1
  66. package/data/build/dist/client/features/global-voice-assistant.js +46 -8
  67. package/data/build/dist/client/features/global-voice-assistant.js.map +1 -1
  68. package/data/build/dist/client/features/index.d.ts +1 -0
  69. package/data/build/dist/client/features/index.d.ts.map +1 -1
  70. package/data/build/dist/client/features/index.js +3 -0
  71. package/data/build/dist/client/features/index.js.map +1 -1
  72. package/data/build/dist/client/features/peer-host.d.ts.map +1 -1
  73. package/data/build/dist/client/features/peer-host.js +130 -17
  74. package/data/build/dist/client/features/peer-host.js.map +1 -1
  75. package/data/build/dist/client/features/session-translation.d.ts +3 -0
  76. package/data/build/dist/client/features/session-translation.d.ts.map +1 -0
  77. package/data/build/dist/client/features/session-translation.js +116 -0
  78. package/data/build/dist/client/features/session-translation.js.map +1 -0
  79. package/data/build/dist/client/index.d.ts.map +1 -1
  80. package/data/build/dist/client/index.js +6 -1
  81. package/data/build/dist/client/index.js.map +1 -1
  82. package/data/build/dist/client/locales/assistantWorkbench.d.ts +17 -3
  83. package/data/build/dist/client/locales/assistantWorkbench.d.ts.map +1 -1
  84. package/data/build/dist/client/locales/assistantWorkbench.js +15 -11
  85. package/data/build/dist/client/locales/assistantWorkbench.js.map +1 -1
  86. package/data/build/dist/client/locales/panels.d.ts.map +1 -1
  87. package/data/build/dist/client/locales/panels.js +62 -0
  88. package/data/build/dist/client/locales/panels.js.map +1 -1
  89. package/data/build/dist/client/peer-host-native-projection.d.ts +4 -0
  90. package/data/build/dist/client/peer-host-native-projection.d.ts.map +1 -1
  91. package/data/build/dist/client/peer-host-native-projection.js +40 -1
  92. package/data/build/dist/client/peer-host-native-projection.js.map +1 -1
  93. package/data/build/dist/client/peer-host-remote-events.d.ts +14 -0
  94. package/data/build/dist/client/peer-host-remote-events.d.ts.map +1 -1
  95. package/data/build/dist/client/peer-host-remote-events.js +92 -3
  96. package/data/build/dist/client/peer-host-remote-events.js.map +1 -1
  97. package/data/build/dist/client/session-file-links.d.ts +11 -0
  98. package/data/build/dist/client/session-file-links.d.ts.map +1 -0
  99. package/data/build/dist/client/{peer-host-file-links.js → session-file-links.js} +13 -3
  100. package/data/build/dist/client/session-file-links.js.map +1 -0
  101. package/data/build/dist/client/session-translation-chat.d.ts +6 -0
  102. package/data/build/dist/client/session-translation-chat.d.ts.map +1 -0
  103. package/data/build/dist/client/session-translation-chat.js +686 -0
  104. package/data/build/dist/client/session-translation-chat.js.map +1 -0
  105. package/data/build/dist/client/style.css +2561 -0
  106. package/data/build/dist/client/subscription-slot.d.ts.map +1 -1
  107. package/data/build/dist/client/subscription-slot.js +5 -1
  108. package/data/build/dist/client/subscription-slot.js.map +1 -1
  109. package/data/build/dist/client/theme.d.ts +2 -0
  110. package/data/build/dist/client/theme.d.ts.map +1 -1
  111. package/data/build/dist/client/theme.js +3 -0
  112. package/data/build/dist/client/theme.js.map +1 -1
  113. package/data/build/dist/client/workspace-session-visibility-dom.d.ts.map +1 -1
  114. package/data/build/dist/client/workspace-session-visibility-dom.js +43 -15
  115. package/data/build/dist/client/workspace-session-visibility-dom.js.map +1 -1
  116. package/data/build/dist/dsh-capabilities/client/assistant-session-navigation-adapter.d.ts +9 -1
  117. package/data/build/dist/dsh-capabilities/client/assistant-session-navigation-adapter.d.ts.map +1 -1
  118. package/data/build/dist/dsh-capabilities/client/assistant-session-navigation-adapter.js +65 -0
  119. package/data/build/dist/dsh-capabilities/client/assistant-session-navigation-adapter.js.map +1 -1
  120. package/data/build/dist/host/cli-adapters/acp-cli-driver.d.ts +21 -0
  121. package/data/build/dist/host/cli-adapters/acp-cli-driver.d.ts.map +1 -1
  122. package/data/build/dist/host/cli-adapters/acp-cli-driver.js +100 -3
  123. package/data/build/dist/host/cli-adapters/acp-cli-driver.js.map +1 -1
  124. package/data/build/dist/host/cli-adapters/codex-driver.d.ts +11 -1
  125. package/data/build/dist/host/cli-adapters/codex-driver.d.ts.map +1 -1
  126. package/data/build/dist/host/cli-adapters/codex-driver.js +80 -14
  127. package/data/build/dist/host/cli-adapters/codex-driver.js.map +1 -1
  128. package/data/build/dist/host/cli-adapters/codex-file-citations.d.ts +13 -0
  129. package/data/build/dist/host/cli-adapters/codex-file-citations.d.ts.map +1 -0
  130. package/data/build/dist/host/cli-adapters/codex-file-citations.js +271 -0
  131. package/data/build/dist/host/cli-adapters/codex-file-citations.js.map +1 -0
  132. package/data/build/dist/host/cli-adapters/command-code-acp-loader.d.ts +8 -1
  133. package/data/build/dist/host/cli-adapters/command-code-acp-loader.d.ts.map +1 -1
  134. package/data/build/dist/host/cli-adapters/command-code-acp-loader.js +45 -2
  135. package/data/build/dist/host/cli-adapters/command-code-acp-loader.js.map +1 -1
  136. package/data/build/dist/host/cli-adapters/command-code-driver.d.ts +8 -2
  137. package/data/build/dist/host/cli-adapters/command-code-driver.d.ts.map +1 -1
  138. package/data/build/dist/host/cli-adapters/command-code-driver.js +32 -3
  139. package/data/build/dist/host/cli-adapters/command-code-driver.js.map +1 -1
  140. package/data/build/dist/host/cli-adapters/command-code-history.d.ts +27 -0
  141. package/data/build/dist/host/cli-adapters/command-code-history.d.ts.map +1 -1
  142. package/data/build/dist/host/cli-adapters/command-code-history.js +131 -1
  143. package/data/build/dist/host/cli-adapters/command-code-history.js.map +1 -1
  144. package/data/build/dist/host/cli-adapters/delegation-mention-rewrite.js +9 -9
  145. package/data/build/dist/host/cli-adapters/delegation-mention-rewrite.js.map +1 -1
  146. package/data/build/dist/host/cli-adapters/dsh-message-projector.d.ts +13 -1
  147. package/data/build/dist/host/cli-adapters/dsh-message-projector.d.ts.map +1 -1
  148. package/data/build/dist/host/cli-adapters/dsh-message-projector.js +95 -12
  149. package/data/build/dist/host/cli-adapters/dsh-message-projector.js.map +1 -1
  150. package/data/build/dist/host/cli-adapters/feature.d.ts.map +1 -1
  151. package/data/build/dist/host/cli-adapters/feature.js +287 -19
  152. package/data/build/dist/host/cli-adapters/feature.js.map +1 -1
  153. package/data/build/dist/host/cli-adapters/grok-driver.d.ts.map +1 -1
  154. package/data/build/dist/host/cli-adapters/grok-driver.js +108 -47
  155. package/data/build/dist/host/cli-adapters/grok-driver.js.map +1 -1
  156. package/data/build/dist/host/cli-adapters/legacy-session-settings.d.ts.map +1 -1
  157. package/data/build/dist/host/cli-adapters/legacy-session-settings.js +7 -2
  158. package/data/build/dist/host/cli-adapters/legacy-session-settings.js.map +1 -1
  159. package/data/build/dist/host/cli-adapters/opencode-driver.d.ts +4 -2
  160. package/data/build/dist/host/cli-adapters/opencode-driver.d.ts.map +1 -1
  161. package/data/build/dist/host/cli-adapters/opencode-driver.js +78 -31
  162. package/data/build/dist/host/cli-adapters/opencode-driver.js.map +1 -1
  163. package/data/build/dist/host/cli-adapters/opencode-v2-protocol.d.ts +1 -1
  164. package/data/build/dist/host/cli-adapters/opencode-v2-protocol.d.ts.map +1 -1
  165. package/data/build/dist/host/cli-adapters/opencode-v2-protocol.js +83 -9
  166. package/data/build/dist/host/cli-adapters/opencode-v2-protocol.js.map +1 -1
  167. package/data/build/dist/host/cli-adapters/provider-subscription.d.ts +5 -1
  168. package/data/build/dist/host/cli-adapters/provider-subscription.d.ts.map +1 -1
  169. package/data/build/dist/host/cli-adapters/provider-subscription.js +90 -25
  170. package/data/build/dist/host/cli-adapters/provider-subscription.js.map +1 -1
  171. package/data/build/dist/host/cli-adapters/registry.d.ts.map +1 -1
  172. package/data/build/dist/host/cli-adapters/registry.js +22 -5
  173. package/data/build/dist/host/cli-adapters/registry.js.map +1 -1
  174. package/data/build/dist/host/cli-adapters/session-store.d.ts +1 -0
  175. package/data/build/dist/host/cli-adapters/session-store.d.ts.map +1 -1
  176. package/data/build/dist/host/cli-adapters/session-store.js +3 -0
  177. package/data/build/dist/host/cli-adapters/session-store.js.map +1 -1
  178. package/data/build/dist/host/cli-bridge/bridge-server.js +2 -2
  179. package/data/build/dist/host/cli-bridge/bridge-server.js.map +1 -1
  180. package/data/build/dist/host/cli-bridge/command-code-mod.js +21 -21
  181. package/data/build/dist/host/cli-bridge/command-code-mod.js.map +1 -1
  182. package/data/build/dist/host/cli-bridge/dispatch.js +19 -19
  183. package/data/build/dist/host/cli-bridge/dispatch.js.map +1 -1
  184. package/data/build/dist/host/cli-bridge/injections.d.ts +32 -0
  185. package/data/build/dist/host/cli-bridge/injections.d.ts.map +1 -1
  186. package/data/build/dist/host/cli-bridge/injections.js +137 -1
  187. package/data/build/dist/host/cli-bridge/injections.js.map +1 -1
  188. package/data/build/dist/host/cli-bridge/mcp-stdio-entry.js +20 -20
  189. package/data/build/dist/host/cli-bridge/mcp-stdio-entry.js.map +1 -1
  190. package/data/build/dist/host/desktop-assistant/controller.d.ts +3 -0
  191. package/data/build/dist/host/desktop-assistant/controller.d.ts.map +1 -1
  192. package/data/build/dist/host/desktop-assistant/controller.js +49 -4
  193. package/data/build/dist/host/desktop-assistant/controller.js.map +1 -1
  194. package/data/build/dist/host/desktop-assistant/mac-agent.d.ts.map +1 -1
  195. package/data/build/dist/host/desktop-assistant/mac-agent.js +15 -3
  196. package/data/build/dist/host/desktop-assistant/mac-agent.js.map +1 -1
  197. package/data/build/dist/host/desktop-assistant/win-agent.d.ts.map +1 -1
  198. package/data/build/dist/host/desktop-assistant/win-agent.js +21 -3
  199. package/data/build/dist/host/desktop-assistant/win-agent.js.map +1 -1
  200. package/data/build/dist/host/features/assistant-management-tools.d.ts +2 -1
  201. package/data/build/dist/host/features/assistant-management-tools.d.ts.map +1 -1
  202. package/data/build/dist/host/features/assistant-management-tools.js +10 -3
  203. package/data/build/dist/host/features/assistant-management-tools.js.map +1 -1
  204. package/data/build/dist/host/features/assistant-notification-events.js +1 -1
  205. package/data/build/dist/host/features/assistant-notification-events.js.map +1 -1
  206. package/data/build/dist/host/features/assistant-notifications.d.ts +8 -1
  207. package/data/build/dist/host/features/assistant-notifications.d.ts.map +1 -1
  208. package/data/build/dist/host/features/assistant-notifications.js +114 -12
  209. package/data/build/dist/host/features/assistant-notifications.js.map +1 -1
  210. package/data/build/dist/host/features/global-voice-rpc.d.ts +2 -2
  211. package/data/build/dist/host/features/global-voice-rpc.d.ts.map +1 -1
  212. package/data/build/dist/host/features/global-voice-rpc.js +89 -2
  213. package/data/build/dist/host/features/global-voice-rpc.js.map +1 -1
  214. package/data/build/dist/host/features/index.d.ts +1 -0
  215. package/data/build/dist/host/features/index.d.ts.map +1 -1
  216. package/data/build/dist/host/features/index.js +3 -0
  217. package/data/build/dist/host/features/index.js.map +1 -1
  218. package/data/build/dist/host/features/peer-host.d.ts.map +1 -1
  219. package/data/build/dist/host/features/peer-host.js +41 -5
  220. package/data/build/dist/host/features/peer-host.js.map +1 -1
  221. package/data/build/dist/host/features/session-translation-service.d.ts +31 -0
  222. package/data/build/dist/host/features/session-translation-service.d.ts.map +1 -0
  223. package/data/build/dist/host/features/session-translation-service.js +451 -0
  224. package/data/build/dist/host/features/session-translation-service.js.map +1 -0
  225. package/data/build/dist/host/features/session-translation.d.ts +5 -0
  226. package/data/build/dist/host/features/session-translation.d.ts.map +1 -0
  227. package/data/build/dist/host/features/session-translation.js +37 -0
  228. package/data/build/dist/host/features/session-translation.js.map +1 -0
  229. package/data/build/dist/host/features/types.d.ts +6 -1
  230. package/data/build/dist/host/features/types.d.ts.map +1 -1
  231. package/data/build/dist/host/image-artifact-store.d.ts +21 -0
  232. package/data/build/dist/host/image-artifact-store.d.ts.map +1 -0
  233. package/data/build/dist/host/image-artifact-store.js +136 -0
  234. package/data/build/dist/host/image-artifact-store.js.map +1 -0
  235. package/data/build/dist/host/index.d.ts.map +1 -1
  236. package/data/build/dist/host/index.js +3 -0
  237. package/data/build/dist/host/index.js.map +1 -1
  238. package/data/build/dist/host/modules/peer-host/peer-host-native-dispatch.d.ts +7 -1
  239. package/data/build/dist/host/modules/peer-host/peer-host-native-dispatch.d.ts.map +1 -1
  240. package/data/build/dist/host/modules/peer-host/peer-host-native-dispatch.js +23 -4
  241. package/data/build/dist/host/modules/peer-host/peer-host-native-dispatch.js.map +1 -1
  242. package/data/build/dist/host/modules/peer-host/peer-host-native-protocol.d.ts +1 -1
  243. package/data/build/dist/host/modules/peer-host/peer-host-native-protocol.d.ts.map +1 -1
  244. package/data/build/dist/host/modules/peer-host/peer-host-native-protocol.js +2 -0
  245. package/data/build/dist/host/modules/peer-host/peer-host-native-protocol.js.map +1 -1
  246. package/data/build/dist/host/native-session-bridge.d.ts +16 -1
  247. package/data/build/dist/host/native-session-bridge.d.ts.map +1 -1
  248. package/data/build/dist/host/native-session-bridge.js +69 -9
  249. package/data/build/dist/host/native-session-bridge.js.map +1 -1
  250. package/data/build/dist/host/rpc.js +4 -4
  251. package/data/build/dist/host/rpc.js.map +1 -1
  252. package/data/build/dist/host/session-changes.d.ts.map +1 -1
  253. package/data/build/dist/host/session-changes.js +196 -13
  254. package/data/build/dist/host/session-changes.js.map +1 -1
  255. package/data/build/dist/host/settings.d.ts.map +1 -1
  256. package/data/build/dist/host/settings.js +8 -0
  257. package/data/build/dist/host/settings.js.map +1 -1
  258. package/data/build/dist/shared/assistant-message-timeline.d.ts +11 -0
  259. package/data/build/dist/shared/assistant-message-timeline.d.ts.map +1 -1
  260. package/data/build/dist/shared/assistant-message-timeline.js +19 -0
  261. package/data/build/dist/shared/assistant-message-timeline.js.map +1 -1
  262. package/data/build/dist/shared/assistant-notifications.d.ts +35 -1
  263. package/data/build/dist/shared/assistant-notifications.d.ts.map +1 -1
  264. package/data/build/dist/shared/assistant-notifications.js +8 -0
  265. package/data/build/dist/shared/assistant-notifications.js.map +1 -1
  266. package/data/build/dist/shared/assistant-session-messages.d.ts +13 -0
  267. package/data/build/dist/shared/assistant-session-messages.d.ts.map +1 -0
  268. package/data/build/dist/shared/assistant-session-messages.js +155 -0
  269. package/data/build/dist/shared/assistant-session-messages.js.map +1 -0
  270. package/data/build/dist/shared/contracts/assistant.d.ts +13 -0
  271. package/data/build/dist/shared/contracts/assistant.d.ts.map +1 -1
  272. package/data/build/dist/shared/contracts/cli-adapter.d.ts +25 -2
  273. package/data/build/dist/shared/contracts/cli-adapter.d.ts.map +1 -1
  274. package/data/build/dist/shared/contracts/config.d.ts +6 -0
  275. package/data/build/dist/shared/contracts/config.d.ts.map +1 -1
  276. package/data/build/dist/shared/contracts/config.js +3 -0
  277. package/data/build/dist/shared/contracts/config.js.map +1 -1
  278. package/data/build/dist/shared/contracts/session-translation.d.ts +58 -0
  279. package/data/build/dist/shared/contracts/session-translation.d.ts.map +1 -0
  280. package/data/build/dist/shared/contracts/session-translation.js +23 -0
  281. package/data/build/dist/shared/contracts/session-translation.js.map +1 -0
  282. package/data/build/dist/shared/contracts/version.d.ts +1 -1
  283. package/data/build/dist/shared/contracts/version.js +1 -1
  284. package/data/build/dist/shared/delegation-carrier.js +6 -6
  285. package/data/build/dist/shared/delegation-carrier.js.map +1 -1
  286. package/data/build/dist/shared/desktop-assistant.d.ts +10 -3
  287. package/data/build/dist/shared/desktop-assistant.d.ts.map +1 -1
  288. package/data/build/dist/shared/desktop-assistant.js +46 -14
  289. package/data/build/dist/shared/desktop-assistant.js.map +1 -1
  290. package/data/build/dist/shared/index.d.ts +2 -1
  291. package/data/build/dist/shared/index.d.ts.map +1 -1
  292. package/data/build/dist/shared/index.js +2 -1
  293. package/data/build/dist/shared/index.js.map +1 -1
  294. package/package.json +17 -15
  295. package/profile/README.md +2 -2
  296. package/profile/package.json +2 -2
  297. package/profile/version.json +1 -1
  298. package/version.json +1 -1
  299. package/data/build/dist/client/peer-host-file-links.d.ts +0 -8
  300. package/data/build/dist/client/peer-host-file-links.d.ts.map +0 -1
  301. package/data/build/dist/client/peer-host-file-links.js.map +0 -1
@@ -0,0 +1,54 @@
1
+ import { ASSISTANT_NOTIFICATION_TAIL_HEIGHT, ASSISTANT_NOTIFICATION_TAIL_WIDTH } from '../../shared/assistant-notifications.js';
2
+ /** 面板与尾巴共用一个闭合轮廓;所有点都属于面板坐标系,没有旋转原点或拼接遮盖。 */
3
+ export function notificationSurfaceGeometry(width, height, side, target, length = ASSISTANT_NOTIFICATION_TAIL_HEIGHT) {
4
+ const radius = Math.min(18, width / 2, height / 2);
5
+ const horizontal = side === 'top' || side === 'bottom';
6
+ const size = horizontal ? width : height;
7
+ const half = Math.min(ASSISTANT_NOTIFICATION_TAIL_WIDTH / 2, Math.max(0, (size - 2 * radius - 4) / 2));
8
+ const tipAlong = Math.max(1, Math.min(size - 1, target ?? size / 2));
9
+ const bias = tipAlong < size / 2 ? 24 : -24;
10
+ const rootAlong = Math.max(radius + half + 2, Math.min(size - radius - half - 2, tipAlong + bias));
11
+ const reverse = side === 'bottom' || side === 'left';
12
+ const root = reverse ? size - rootAlong : rootAlong;
13
+ const tip = reverse ? size - tipAlong : tipAlong;
14
+ const point = (along, outward) => {
15
+ if (side === 'top')
16
+ return { x: along, y: -outward };
17
+ if (side === 'right')
18
+ return { x: width + outward, y: along };
19
+ if (side === 'bottom')
20
+ return { x: width - along, y: height + outward };
21
+ return { x: -outward, y: height - along };
22
+ };
23
+ const xy = (along, outward) => {
24
+ const p = point(along, outward);
25
+ return `${p.x} ${p.y}`;
26
+ };
27
+ const tail = `L${xy(root - half, 0)} C${xy(root - half + half * .6, 0)} ${xy(tip - 5, length * .66)} ${xy(tip, length)}`
28
+ + ` C${xy(tip + 3, length * .58)} ${xy(root + half - half * .6, 0)} ${xy(root + half, 0)}`;
29
+ const path = `M${radius} 0 ${side === 'top' ? tail : ''} H${width - radius} Q${width} 0 ${width} ${radius}`
30
+ + ` ${side === 'right' ? tail : ''} V${height - radius} Q${width} ${height} ${width - radius} ${height}`
31
+ + ` ${side === 'bottom' ? tail : ''} H${radius} Q0 ${height} 0 ${height - radius}`
32
+ + ` ${side === 'left' ? tail : ''} V${radius} Q0 0 ${radius} 0 Z`;
33
+ return { path, tip: point(tip, length), root: point(root, 0) };
34
+ }
35
+ /** 直接测量实际面板,内容、字体和滚动区变化只更新背景轮廓,不反过来改变布局。 */
36
+ export function observeNotificationSurface(node, side, target, length = ASSISTANT_NOTIFICATION_TAIL_HEIGHT) {
37
+ const draw = () => {
38
+ const width = node.clientWidth, height = node.clientHeight;
39
+ if (width <= 0 || height <= 0)
40
+ return;
41
+ const geometry = notificationSurfaceGeometry(width, height, side, target, length);
42
+ node.querySelector('[data-codingns-notification-outline]')?.setAttribute('d', geometry.path);
43
+ node.querySelector('[data-codingns-notification-fallback]')?.setAttribute('visibility', 'hidden');
44
+ node.dataset.tailTipX = String(geometry.tip.x);
45
+ node.dataset.tailTipY = String(geometry.tip.y);
46
+ };
47
+ draw();
48
+ if (typeof ResizeObserver === 'undefined')
49
+ return () => { };
50
+ const observer = new ResizeObserver(draw);
51
+ observer.observe(node);
52
+ return () => observer.disconnect();
53
+ }
54
+ //# sourceMappingURL=notification-surface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notification-surface.js","sourceRoot":"","sources":["../../../../../src/client/avatar/notification-surface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kCAAkC,EAAE,iCAAiC,EAAE,MAAM,yCAAyC,CAAA;AAG/H,6CAA6C;AAC7C,MAAM,UAAU,2BAA2B,CAAC,KAAa,EAAE,MAAc,EAAE,IAAmC,EAC5G,MAAe,EAAE,MAAM,GAAG,kCAAkC;IAC5D,MAAM,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,KAAK,GAAG,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,CAAA;IAClD,MAAM,UAAU,GAAG,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,QAAQ,CAAA;IACtD,MAAM,IAAI,GAAG,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAA;IACxC,MAAM,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,iCAAiC,GAAG,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,IAAI,GAAG,CAAC,GAAG,MAAM,GAA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,IAAI,cAAc,CAAC,IAAI,CAAC,CAAA;IACzC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;IACtB,OAAO,GAAG,EAAE,CAAC,QAAQ,CAAC,UAAU,EAAE,CAAA;AACpC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"reaction-badge.d.ts","sourceRoot":"","sources":["../../../../../src/client/avatar/reaction-badge.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAA;AACzC,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAA;AAG/E,mCAAmC;AACnC,wBAAgB,4BAA4B,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,CAAC,QAAQ,EAAE,uBAAuB,CAAA;CAAE,GAAG,YAAY,CAMvH"}
1
+ {"version":3,"file":"reaction-badge.d.ts","sourceRoot":"","sources":["../../../../../src/client/avatar/reaction-badge.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAA;AACzC,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAA;AAG/E,mCAAmC;AACnC,wBAAgB,4BAA4B,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,CAAC,QAAQ,EAAE,uBAAuB,CAAA;CAAE,GAAG,YAAY,CAUvH"}
@@ -4,8 +4,17 @@ import { resolveCodingNsTranslator } from '../locale.js';
4
4
  export function AssistantAvatarReactionBadge({ reaction }) {
5
5
  const t = resolveCodingNsTranslator();
6
6
  const labels = { success: t('awb.notifications.completed'), concerned: t('awb.notifications.error'), question: t('awb.notifications.question'), approval: t('awb.notifications.approval') };
7
- const icons = { success: '✓', concerned: '!', question: '?', approval: '…' };
7
+ const icons = { success: '✓', concerned: '!', approval: '…' };
8
+ const icon = reaction === 'question'
9
+ ? createElement('span', { 'data-codingns-avatar-reaction-glyph': 'speech', style: { display: 'inline-flex' } }, speechIcon())
10
+ : icons[reaction];
8
11
  return createElement('span', { role: 'status', 'aria-label': labels[reaction], title: labels[reaction], 'data-codingns-avatar-reaction': reaction,
9
- style: { position: 'absolute', right: 0, top: 0, padding: '2px 7px', borderRadius: 12, background: '#fff', color: '#242424', border: '1px solid #b8c3d3', pointerEvents: 'none' } }, icons[reaction]);
12
+ style: { position: 'absolute', left: '50%', top: 0, transform: 'translateX(-50%)', width: 30, height: 26, boxSizing: 'border-box', display: 'grid', placeItems: 'center', padding: 0, borderRadius: 11,
13
+ background: '#fff', color: '#242424', border: '1px solid #b8c3d3', lineHeight: 1, pointerEvents: 'none' } }, icon);
14
+ }
15
+ /** 提问状态使用发言气泡:圆角轮廓、右下尾巴和三个空心圆点。 */
16
+ function speechIcon() {
17
+ return createElement('svg', { width: 20, height: 20, viewBox: '0 0 24 24', fill: 'none', stroke: 'currentColor', strokeWidth: 1.9,
18
+ strokeLinecap: 'round', strokeLinejoin: 'round', 'aria-hidden': true, focusable: false }, createElement('path', { d: 'M12 3H9a7 7 0 0 0-7 7v2a7 7 0 0 0 7 7h5.5l3.5 2.5.8-4.45A7 7 0 0 0 21 12v-2a7 7 0 0 0-7-7h-2Z' }), createElement('circle', { cx: 7.5, cy: 11, r: 1.45 }), createElement('circle', { cx: 12, cy: 11, r: 1.45 }), createElement('circle', { cx: 16.5, cy: 11, r: 1.45 }));
10
19
  }
11
20
  //# sourceMappingURL=reaction-badge.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"reaction-badge.js","sourceRoot":"","sources":["../../../../../src/client/avatar/reaction-badge.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AAGrC,OAAO,EAAE,yBAAyB,EAAE,MAAM,cAAc,CAAA;AAExD,mCAAmC;AACnC,MAAM,UAAU,4BAA4B,CAAC,EAAE,QAAQ,EAAkD;IACvG,MAAM,CAAC,GAAG,yBAAyB,EAAE,CAAA;IACrC,MAAM,MAAM,GAAG,EAAE,OAAO,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