@tencentcloud/sdk-mcp 1.0.6 → 1.0.8

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 (353) hide show
  1. package/index.js +7 -8
  2. package/index.js.map +1 -1
  3. package/libs/lib-generate-test-usersig-es.min.d.ts +6 -0
  4. package/libs/lib-generate-test-usersig-es.min.js +2 -0
  5. package/package.json +2 -1
  6. package/resource/doc/chatuikit/react/components/avatar.md +105 -0
  7. package/resource/doc/chatuikit/react/components/chat.md +38 -0
  8. package/resource/doc/chatuikit/react/components/chatheader.md +153 -0
  9. package/resource/doc/chatuikit/react/components/component-list.md +36 -0
  10. package/resource/doc/chatuikit/react/components/conversation-list.md +765 -0
  11. package/resource/doc/chatuikit/react/components/message-input.md +799 -0
  12. package/resource/doc/chatuikit/react/components/message-list.md +385 -0
  13. package/resource/doc/chatuikit/react/components/tuikit.md +64 -0
  14. package/resource/doc/chatuikit/react/integration.md +68 -0
  15. package/resource/doc/chatuikit/react/login.md +25 -0
  16. package/resource/doc/chatuikit/vue/components/MessageInput.md +546 -0
  17. package/resource/doc/chatuikit/vue/components/avatar.md +105 -0
  18. package/resource/doc/chatuikit/vue/components/chat.md +38 -0
  19. package/resource/doc/chatuikit/vue/components/chatheader.md +153 -0
  20. package/resource/doc/chatuikit/vue/components/component-list.md +90 -0
  21. package/resource/doc/chatuikit/vue/components/conversation-list.md +590 -0
  22. package/resource/doc/chatuikit/vue/components/login.md +29 -0
  23. package/resource/doc/chatuikit/vue/components/message-input.md +546 -0
  24. package/resource/doc/chatuikit/vue/components/message-list.md +548 -0
  25. package/resource/doc/chatuikit/vue/components/tuikit.md +110 -0
  26. package/resource/doc/chatuikit/vue/components/userpicker.md +256 -0
  27. package/resource/doc/chatuikit/vue/integration.md +218 -0
  28. package/resource/doc/chatuikit/vue/login.md +29 -0
  29. package/resource/doc/chatuikit/vue3/components/MessageInput.md +546 -0
  30. package/resource/doc/chatuikit/vue3/components/MessageList.md +385 -0
  31. package/resource/doc/chatuikit/vue3/components/avatar.md +105 -0
  32. package/resource/doc/chatuikit/vue3/components/chatheader.md +153 -0
  33. package/resource/doc/chatuikit/vue3/components/component-list.md +88 -0
  34. package/resource/doc/chatuikit/vue3/components/userpicker.md +256 -0
  35. package/resource/doc/chatuikit/vue3/integration.md +218 -0
  36. package/server.js +10 -181
  37. package/server.js.map +1 -1
  38. package/{streamableHttp.js → streamable-http.js} +8 -13
  39. package/streamable-http.js.map +1 -0
  40. package/tools/call/get-call-faq.js +31 -0
  41. package/tools/call/get-call-faq.js.map +1 -0
  42. package/tools/call/get-native-call-integration-guide.js +35 -0
  43. package/tools/call/get-native-call-integration-guide.js.map +1 -0
  44. package/tools/call/get-native-call-integration.js +35 -0
  45. package/tools/call/get-native-call-integration.js.map +1 -0
  46. package/tools/call/get-web-call-integration-guide.js +34 -0
  47. package/tools/call/get-web-call-integration-guide.js.map +1 -0
  48. package/tools/call/get-web-call-integration.js +34 -0
  49. package/tools/call/get-web-call-integration.js.map +1 -0
  50. package/tools/chat/get-chat-faq.js +31 -0
  51. package/tools/chat/get-chat-faq.js.map +1 -0
  52. package/tools/chat/get-native-chat-integration-guide.js +33 -0
  53. package/tools/chat/get-native-chat-integration-guide.js.map +1 -0
  54. package/tools/chat/get-native-chat-integration.js +33 -0
  55. package/tools/chat/get-native-chat-integration.js.map +1 -0
  56. package/tools/chat/get-web-chat-component-detail.js +36 -0
  57. package/tools/chat/get-web-chat-component-detail.js.map +1 -0
  58. package/tools/chat/get-web-chat-integration-guide.js +42 -0
  59. package/tools/chat/get-web-chat-integration-guide.js.map +1 -0
  60. package/tools/chat/get-web-chat-integration.js +36 -0
  61. package/tools/chat/get-web-chat-integration.js.map +1 -0
  62. package/tools/chat/get-web-chat-uikit-login.js +30 -0
  63. package/tools/chat/get-web-chat-uikit-login.js.map +1 -0
  64. package/tools/common/get-usersig.js +35 -0
  65. package/tools/common/get-usersig.js.map +1 -0
  66. package/tools/common/present-framework-choice.js +32 -0
  67. package/tools/common/present-framework-choice.js.map +1 -0
  68. package/tools/common/record-prompt.js +31 -0
  69. package/tools/common/record-prompt.js.map +1 -0
  70. package/tools/common/record-result.js +35 -0
  71. package/tools/common/record-result.js.map +1 -0
  72. package/tools/index.js +39 -0
  73. package/tools/index.js.map +1 -0
  74. package/tools/rtcengine/get-rtcengine-integration-guide.js +32 -0
  75. package/tools/rtcengine/get-rtcengine-integration-guide.js.map +1 -0
  76. package/tools/rtcengine/get-rtcenigne-faq.js +31 -0
  77. package/tools/rtcengine/get-rtcenigne-faq.js.map +1 -0
  78. package/utils/aegis-client.js +8 -0
  79. package/utils/aegis-client.js.map +1 -0
  80. package/utils/generate-usersig.js +14 -0
  81. package/utils/generate-usersig.js.map +1 -0
  82. package/utils/get-doc-content.js +46 -0
  83. package/utils/get-doc-content.js.map +1 -0
  84. package/utils/handle-component-name.js +12 -0
  85. package/utils/handle-component-name.js.map +1 -0
  86. package/utils/handle-framework.js +9 -0
  87. package/utils/handle-framework.js.map +1 -0
  88. package/resource/doc/chatuikit/react/integrate_tuichat_only_react.md +0 -185
  89. package/resource/doc/chatuikit/react/integrate_tuichat_react.md +0 -212
  90. package/resource/doc/chatuikit/vue/integrate_tuichat_only_vue.md +0 -149
  91. package/resource/doc/chatuikit/vue/integrate_tuichat_vue.md +0 -248
  92. package/streamableHttp.js.map +0 -1
  93. /package/{@tencent → libs/@tencent}/aegis-node-sdk/CHANGELOG.md +0 -0
  94. /package/{@tencent → libs/@tencent}/aegis-node-sdk/LICENSE +0 -0
  95. /package/{@tencent → libs/@tencent}/aegis-node-sdk/README.md +0 -0
  96. /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/aegis.min.js +0 -0
  97. /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/constant/config.d.ts +0 -0
  98. /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/constant/global.d.ts +0 -0
  99. /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/constant/index.d.ts +0 -0
  100. /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/constant/report-ignore.d.ts +0 -0
  101. /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/core.d.ts +0 -0
  102. /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/hooks/afterRequestHooks.d.ts +0 -0
  103. /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/hooks/beforeRequestHooks.d.ts +0 -0
  104. /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/hooks/modifyRequestHooks.d.ts +0 -0
  105. /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/index.d.ts +0 -0
  106. /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/interface/config.d.ts +0 -0
  107. /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/interface/env.d.ts +0 -0
  108. /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/interface/index.d.ts +0 -0
  109. /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/interface/log.d.ts +0 -0
  110. /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/interface/send.d.ts +0 -0
  111. /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/pipes/format.d.ts +0 -0
  112. /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/pipes/index.d.ts +0 -0
  113. /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/pipes/length-limit.d.ts +0 -0
  114. /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/pipes/pv.d.ts +0 -0
  115. /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/pipes/remove-payload.d.ts +0 -0
  116. /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/pipes/repeat-limit.d.ts +0 -0
  117. /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/pipes/report.d.ts +0 -0
  118. /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/pipes/sample.d.ts +0 -0
  119. /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/pipes/throttle.d.ts +0 -0
  120. /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/pipes/trace/index.d.ts +0 -0
  121. /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/pipes/trace/jwt.d.ts +0 -0
  122. /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/pipes/trace/ot-js.d.ts +0 -0
  123. /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/pipes/trace/uuid.d.ts +0 -0
  124. /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/pipes/whitelist.d.ts +0 -0
  125. /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/pipes/write-before.d.ts +0 -0
  126. /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/plugin.d.ts +0 -0
  127. /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/polyfill.d.ts +0 -0
  128. /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/util/destroy.d.ts +0 -0
  129. /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/util/event-emitter.d.ts +0 -0
  130. /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/util/index.d.ts +0 -0
  131. /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/node-sdk/src/index.d.ts +0 -0
  132. /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/node-sdk/src/interface/selector.d.ts +0 -0
  133. /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/node-sdk/src/pipes/batch-report-pipe.d.ts +0 -0
  134. /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/node-sdk/src/protocol/protocol_base.d.ts +0 -0
  135. /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/node-sdk/src/protocol/protocol_http.d.ts +0 -0
  136. /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/node-sdk/src/selector/ip_selector.d.ts +0 -0
  137. /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/node-sdk/src/selector/polaris_selector.d.ts +0 -0
  138. /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/node-sdk/src/selector/selector_base.d.ts +0 -0
  139. /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/node-sdk/src/util/eval_require.d.ts +0 -0
  140. /package/{@tencent → libs/@tencent}/aegis-node-sdk/package.json +0 -0
  141. /package/{@tencent → libs/@tencent}/polaris/README.md +0 -0
  142. /package/{@tencent → libs/@tencent}/polaris/dist/consumer/health.d.ts +0 -0
  143. /package/{@tencent → libs/@tencent}/polaris/dist/consumer/health.js +0 -0
  144. /package/{@tencent → libs/@tencent}/polaris/dist/consumer/health.js.map +0 -0
  145. /package/{@tencent → libs/@tencent}/polaris/dist/consumer/index.d.ts +0 -0
  146. /package/{@tencent → libs/@tencent}/polaris/dist/consumer/index.js +0 -0
  147. /package/{@tencent → libs/@tencent}/polaris/dist/consumer/index.js.map +0 -0
  148. /package/{@tencent → libs/@tencent}/polaris/dist/consumer/monitor.d.ts +0 -0
  149. /package/{@tencent → libs/@tencent}/polaris/dist/consumer/monitor.js +0 -0
  150. /package/{@tencent → libs/@tencent}/polaris/dist/consumer/monitor.js.map +0 -0
  151. /package/{@tencent → libs/@tencent}/polaris/dist/consumer/selector.d.ts +0 -0
  152. /package/{@tencent → libs/@tencent}/polaris/dist/consumer/selector.js +0 -0
  153. /package/{@tencent → libs/@tencent}/polaris/dist/consumer/selector.js.map +0 -0
  154. /package/{@tencent → libs/@tencent}/polaris/dist/errors.d.ts +0 -0
  155. /package/{@tencent → libs/@tencent}/polaris/dist/errors.js +0 -0
  156. /package/{@tencent → libs/@tencent}/polaris/dist/errors.js.map +0 -0
  157. /package/{@tencent → libs/@tencent}/polaris/dist/global.d.ts +0 -0
  158. /package/{@tencent → libs/@tencent}/polaris/dist/global.js +0 -0
  159. /package/{@tencent → libs/@tencent}/polaris/dist/global.js.map +0 -0
  160. /package/{@tencent → libs/@tencent}/polaris/dist/index.d.ts +0 -0
  161. /package/{@tencent → libs/@tencent}/polaris/dist/index.js +0 -0
  162. /package/{@tencent → libs/@tencent}/polaris/dist/index.js.map +0 -0
  163. /package/{@tencent → libs/@tencent}/polaris/dist/instance.d.ts +0 -0
  164. /package/{@tencent → libs/@tencent}/polaris/dist/instance.js +0 -0
  165. /package/{@tencent → libs/@tencent}/polaris/dist/instance.js.map +0 -0
  166. /package/{@tencent → libs/@tencent}/polaris/dist/limiter/bucket.d.ts +0 -0
  167. /package/{@tencent → libs/@tencent}/polaris/dist/limiter/bucket.js +0 -0
  168. /package/{@tencent → libs/@tencent}/polaris/dist/limiter/bucket.js.map +0 -0
  169. /package/{@tencent → libs/@tencent}/polaris/dist/limiter/index.d.ts +0 -0
  170. /package/{@tencent → libs/@tencent}/polaris/dist/limiter/index.js +0 -0
  171. /package/{@tencent → libs/@tencent}/polaris/dist/limiter/index.js.map +0 -0
  172. /package/{@tencent → libs/@tencent}/polaris/dist/limiter/ratelimit.d.ts +0 -0
  173. /package/{@tencent → libs/@tencent}/polaris/dist/limiter/ratelimit.js +0 -0
  174. /package/{@tencent → libs/@tencent}/polaris/dist/limiter/ratelimit.js.map +0 -0
  175. /package/{@tencent → libs/@tencent}/polaris/dist/limiter/ratelimiter/base.d.ts +0 -0
  176. /package/{@tencent → libs/@tencent}/polaris/dist/limiter/ratelimiter/base.js +0 -0
  177. /package/{@tencent → libs/@tencent}/polaris/dist/limiter/ratelimiter/base.js.map +0 -0
  178. /package/{@tencent → libs/@tencent}/polaris/dist/limiter/ratelimiter/global.d.ts +0 -0
  179. /package/{@tencent → libs/@tencent}/polaris/dist/limiter/ratelimiter/global.js +0 -0
  180. /package/{@tencent → libs/@tencent}/polaris/dist/limiter/ratelimiter/global.js.map +0 -0
  181. /package/{@tencent → libs/@tencent}/polaris/dist/limiter/ratelimiter/index.d.ts +0 -0
  182. /package/{@tencent → libs/@tencent}/polaris/dist/limiter/ratelimiter/index.js +0 -0
  183. /package/{@tencent → libs/@tencent}/polaris/dist/limiter/ratelimiter/index.js.map +0 -0
  184. /package/{@tencent → libs/@tencent}/polaris/dist/limiter/ratelimiter/local.d.ts +0 -0
  185. /package/{@tencent → libs/@tencent}/polaris/dist/limiter/ratelimiter/local.js +0 -0
  186. /package/{@tencent → libs/@tencent}/polaris/dist/limiter/ratelimiter/local.js.map +0 -0
  187. /package/{@tencent → libs/@tencent}/polaris/dist/location.d.ts +0 -0
  188. /package/{@tencent → libs/@tencent}/polaris/dist/location.js +0 -0
  189. /package/{@tencent → libs/@tencent}/polaris/dist/location.js.map +0 -0
  190. /package/{@tencent → libs/@tencent}/polaris/dist/logging.d.ts +0 -0
  191. /package/{@tencent → libs/@tencent}/polaris/dist/logging.js +0 -0
  192. /package/{@tencent → libs/@tencent}/polaris/dist/logging.js.map +0 -0
  193. /package/{@tencent → libs/@tencent}/polaris/dist/metadata.d.ts +0 -0
  194. /package/{@tencent → libs/@tencent}/polaris/dist/metadata.js +0 -0
  195. /package/{@tencent → libs/@tencent}/polaris/dist/metadata.js.map +0 -0
  196. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/breaker/polaris.d.ts +0 -0
  197. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/breaker/polaris.js +0 -0
  198. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/breaker/polaris.js.map +0 -0
  199. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/lb/base.d.ts +0 -0
  200. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/lb/base.js +0 -0
  201. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/lb/base.js.map +0 -0
  202. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/lb/edf.d.ts +0 -0
  203. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/lb/edf.js +0 -0
  204. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/lb/edf.js.map +0 -0
  205. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/lb/hashring.d.ts +0 -0
  206. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/lb/hashring.js +0 -0
  207. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/lb/hashring.js.map +0 -0
  208. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/lb/sticky.d.ts +0 -0
  209. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/lb/sticky.js +0 -0
  210. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/lb/sticky.js.map +0 -0
  211. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/lb/swrr.d.ts +0 -0
  212. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/lb/swrr.js +0 -0
  213. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/lb/swrr.js.map +0 -0
  214. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/lb/wr.d.ts +0 -0
  215. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/lb/wr.js +0 -0
  216. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/lb/wr.js.map +0 -0
  217. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/lb/wrr.d.ts +0 -0
  218. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/lb/wrr.js +0 -0
  219. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/lb/wrr.js.map +0 -0
  220. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/logging/console.d.ts +0 -0
  221. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/logging/console.js +0 -0
  222. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/logging/console.js.map +0 -0
  223. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/local-server/index.d.ts +0 -0
  224. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/local-server/index.js +0 -0
  225. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/local-server/index.js.map +0 -0
  226. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/adapter/base.d.ts +0 -0
  227. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/adapter/base.js +0 -0
  228. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/adapter/base.js.map +0 -0
  229. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/adapter/discover.d.ts +0 -0
  230. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/adapter/discover.js +0 -0
  231. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/adapter/discover.js.map +0 -0
  232. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/adapter/index.d.ts +0 -0
  233. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/adapter/index.js +0 -0
  234. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/adapter/index.js.map +0 -0
  235. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/adapter/monitor.d.ts +0 -0
  236. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/adapter/monitor.js +0 -0
  237. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/adapter/monitor.js.map +0 -0
  238. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/adapter/ratelimit.d.ts +0 -0
  239. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/adapter/ratelimit.js +0 -0
  240. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/adapter/ratelimit.js.map +0 -0
  241. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/connector/grpc/bidi.d.ts +0 -0
  242. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/connector/grpc/bidi.js +0 -0
  243. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/connector/grpc/bidi.js.map +0 -0
  244. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/connector/grpc/index.d.ts +0 -0
  245. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/connector/grpc/index.js +0 -0
  246. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/connector/grpc/index.js.map +0 -0
  247. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/connector/grpc/pb/discover.proto +0 -0
  248. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/connector/grpc/pb/monitor.proto +0 -0
  249. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/connector/grpc/pb/ratelimit.proto +0 -0
  250. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/connector/http/index.d.ts +0 -0
  251. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/connector/http/index.js +0 -0
  252. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/connector/http/index.js.map +0 -0
  253. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/discover-pb/api.proto +0 -0
  254. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/discover-pb/client.proto +0 -0
  255. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/discover-pb/model.proto +0 -0
  256. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/discover-pb/ratelimit.proto +0 -0
  257. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/discover-pb/request.proto +0 -0
  258. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/discover-pb/response.proto +0 -0
  259. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/discover-pb/routing.proto +0 -0
  260. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/discover-pb/service.proto +0 -0
  261. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/discover-pb/types.d.ts +0 -0
  262. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/index.d.ts +0 -0
  263. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/index.js +0 -0
  264. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/index.js.map +0 -0
  265. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/monitor-pb/api.proto +0 -0
  266. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/monitor-pb/circuitbreak.proto +0 -0
  267. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/monitor-pb/request.proto +0 -0
  268. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/monitor-pb/response.proto +0 -0
  269. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/monitor-pb/sdkcache.proto +0 -0
  270. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/monitor-pb/sdkconfiguration.proto +0 -0
  271. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/monitor-pb/sdktoken.proto +0 -0
  272. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/monitor-pb/types.d.ts +0 -0
  273. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/pool.d.ts +0 -0
  274. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/pool.js +0 -0
  275. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/pool.js.map +0 -0
  276. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/ratelimit-pb/api.proto +0 -0
  277. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/ratelimit-pb/ratelimit.proto +0 -0
  278. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/ratelimit-pb/types.d.ts +0 -0
  279. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/rules.d.ts +0 -0
  280. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/rules.js +0 -0
  281. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/rules.js.map +0 -0
  282. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/types.d.ts +0 -0
  283. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/types.js +0 -0
  284. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/types.js.map +0 -0
  285. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/utils.d.ts +0 -0
  286. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/utils.js +0 -0
  287. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/utils.js.map +0 -0
  288. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/registry/memory.d.ts +0 -0
  289. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/registry/memory.js +0 -0
  290. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/registry/memory.js.map +0 -0
  291. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/router/polaris/nearby.d.ts +0 -0
  292. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/router/polaris/nearby.js +0 -0
  293. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/router/polaris/nearby.js.map +0 -0
  294. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/router/polaris/rule.d.ts +0 -0
  295. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/router/polaris/rule.js +0 -0
  296. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/router/polaris/rule.js.map +0 -0
  297. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/router/trpc/canary.d.ts +0 -0
  298. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/router/trpc/canary.js +0 -0
  299. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/router/trpc/canary.js.map +0 -0
  300. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/router/trpc/env.d.ts +0 -0
  301. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/router/trpc/env.js +0 -0
  302. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/router/trpc/env.js.map +0 -0
  303. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/router/trpc/set.d.ts +0 -0
  304. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/router/trpc/set.js +0 -0
  305. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/router/trpc/set.js.map +0 -0
  306. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/shaping/unirate.d.ts +0 -0
  307. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/shaping/unirate.js +0 -0
  308. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/shaping/unirate.js.map +0 -0
  309. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/shaping/warmup.d.ts +0 -0
  310. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/shaping/warmup.js +0 -0
  311. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/shaping/warmup.js.map +0 -0
  312. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/weight/polaris.d.ts +0 -0
  313. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/weight/polaris.js +0 -0
  314. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/weight/polaris.js.map +0 -0
  315. /package/{@tencent → libs/@tencent}/polaris/dist/plugins.d.ts +0 -0
  316. /package/{@tencent → libs/@tencent}/polaris/dist/plugins.js +0 -0
  317. /package/{@tencent → libs/@tencent}/polaris/dist/plugins.js.map +0 -0
  318. /package/{@tencent → libs/@tencent}/polaris/dist/polaris.d.ts +0 -0
  319. /package/{@tencent → libs/@tencent}/polaris/dist/polaris.js +0 -0
  320. /package/{@tencent → libs/@tencent}/polaris/dist/polaris.js.map +0 -0
  321. /package/{@tencent → libs/@tencent}/polaris/dist/provider/index.d.ts +0 -0
  322. /package/{@tencent → libs/@tencent}/polaris/dist/provider/index.js +0 -0
  323. /package/{@tencent → libs/@tencent}/polaris/dist/provider/index.js.map +0 -0
  324. /package/{@tencent → libs/@tencent}/polaris/dist/registry.d.ts +0 -0
  325. /package/{@tencent → libs/@tencent}/polaris/dist/registry.js +0 -0
  326. /package/{@tencent → libs/@tencent}/polaris/dist/registry.js.map +0 -0
  327. /package/{@tencent → libs/@tencent}/polaris/dist/rules.d.ts +0 -0
  328. /package/{@tencent → libs/@tencent}/polaris/dist/rules.js +0 -0
  329. /package/{@tencent → libs/@tencent}/polaris/dist/rules.js.map +0 -0
  330. /package/{@tencent → libs/@tencent}/polaris/dist/scripts/postinstall.d.ts +0 -0
  331. /package/{@tencent → libs/@tencent}/polaris/dist/scripts/postinstall.js +0 -0
  332. /package/{@tencent → libs/@tencent}/polaris/dist/scripts/postinstall.js.map +0 -0
  333. /package/{@tencent → libs/@tencent}/polaris/dist/service.d.ts +0 -0
  334. /package/{@tencent → libs/@tencent}/polaris/dist/service.js +0 -0
  335. /package/{@tencent → libs/@tencent}/polaris/dist/service.js.map +0 -0
  336. /package/{@tencent → libs/@tencent}/polaris/dist/skeleton.d.ts +0 -0
  337. /package/{@tencent → libs/@tencent}/polaris/dist/skeleton.js +0 -0
  338. /package/{@tencent → libs/@tencent}/polaris/dist/skeleton.js.map +0 -0
  339. /package/{@tencent → libs/@tencent}/polaris/dist/utils.d.ts +0 -0
  340. /package/{@tencent → libs/@tencent}/polaris/dist/utils.js +0 -0
  341. /package/{@tencent → libs/@tencent}/polaris/dist/utils.js.map +0 -0
  342. /package/{@tencent → libs/@tencent}/polaris/dist/weak.d.ts +0 -0
  343. /package/{@tencent → libs/@tencent}/polaris/dist/weak.js +0 -0
  344. /package/{@tencent → libs/@tencent}/polaris/dist/weak.js.map +0 -0
  345. /package/{@tencent → libs/@tencent}/polaris/package.json +0 -0
  346. /package/resource/doc/chatuikit/{iOS → ios}/client_api_iOS.md +0 -0
  347. /package/resource/doc/chatuikit/{iOS → ios}/integrate_tuichat_only_iOS.md +0 -0
  348. /package/resource/doc/chatuikit/{iOS → ios}/integrate_tuikit_iOS.md +0 -0
  349. /package/resource/doc/chatuikit/{iOS → ios}/ui_api_iOS.md +0 -0
  350. /package/resource/doc/tuicallkit/{iOS → ios}/api_TUICallKit.md +0 -0
  351. /package/resource/doc/tuicallkit/{iOS → ios}/api_TUICallObserver.md +0 -0
  352. /package/resource/doc/tuicallkit/{iOS → ios}/how_to_integrated_iOS_callkit.md +0 -0
  353. /package/resource/doc/tuicallkit/{iOS → ios}/how_to_run_iOS_callkit_demo.md +0 -0
@@ -0,0 +1,548 @@
1
+ ## 概述
2
+
3
+ MessageList 组件是聊天界面的核心组件,负责展示消息列表并提供丰富的交互功能。它支持消息聚合、自动滚动、历史消息加载、已读回执等高级特性,适用于构建高度可定制的聊天界面。组件内部处理滚动行为、消息加载逻辑和消息分组展示,为用户提供流畅的消息浏览体验。
4
+
5
+ ## 功能特性
6
+ - 消息展示:支持多种消息类型(文本、图片、视频、文件、自定义消息等)的渲染和显示。
7
+
8
+ - 消息聚合:根据时间间隔和发送者自动聚合相邻消息。
9
+
10
+ - 智能滚动:自动滚动到底部,支持手动滚动控制。
11
+
12
+ - 历史加载:上加载更多历史消息。
13
+
14
+ - 已读回执:支持消息已读状态显示。
15
+
16
+ - 消息操作:支持撤回、删除等消息操作。
17
+
18
+ - 自定义渲染:支持自定义消息组件和时间分割线组件。
19
+
20
+
21
+ ## 快速使用
22
+
23
+ 以下示例代码是 MessageList 最简单的用法。
24
+ ``` typescript
25
+ <template>
26
+ <UIKitProvider>
27
+ <Chat>
28
+ <MessageList />
29
+ <MessageInput />
30
+ </Chat>
31
+ </UIKitProvider>
32
+ </template>
33
+
34
+
35
+ <script lang="ts" setup>
36
+ import { UIKitProvider, Chat, MessageList, MessageInput } from '@tencentcloud/chat-uikit-vue3';
37
+ </script>
38
+
39
+ ```
40
+
41
+ > **说明:**
42
+ >
43
+
44
+ > 实践建议:
45
+ >
46
+ > 1. MessageList 组件需要放在 UIKitProvider、Chat 容器中使用。
47
+ > 2. MessageList 建议和 MessageInput 组件搭配使用。
48
+ > 3. MessageList 会默认读取当前激活的会话,如果您不集成 ConversationList 组件,请参考 [仅集成聊天](https://write.woa.com/document/181344022523346944) 文档。
49
+
50
+
51
+ ## Props 字段速查表
52
+ <table>
53
+ <tr>
54
+ <td rowspan="1" colSpan="1" >字段</td>
55
+
56
+ <td rowspan="1" colSpan="1" >类型</td>
57
+
58
+ <td rowspan="1" colSpan="1" >默认值</td>
59
+
60
+ <td rowspan="1" colSpan="1" >描述</td>
61
+ </tr>
62
+
63
+ <tr>
64
+ <td rowspan="1" colSpan="1" >[alignment](https://write.woa.com/#alignment)</td>
65
+
66
+ <td rowspan="1" colSpan="1" >'left' \| 'right' \| 'two-sided'</td>
67
+
68
+ <td rowspan="1" colSpan="1" >'two-sided'</td>
69
+
70
+ <td rowspan="1" colSpan="1" >消息的对齐方式,支持左对齐、右对齐和双边对齐。</td>
71
+ </tr>
72
+
73
+ <tr>
74
+ <td rowspan="1" colSpan="1" >[messageAggregationTime](https://write.woa.com/#messageAggregationTime)</td>
75
+
76
+ <td rowspan="1" colSpan="1" >number</td>
77
+
78
+ <td rowspan="1" colSpan="1" >300 (秒)</td>
79
+
80
+ <td rowspan="1" colSpan="1" >消息聚合的时间间隔(秒),在此时间内发送的同一发送者的消息会被聚合。设置为 0 可禁用消息聚合。</td>
81
+ </tr>
82
+
83
+ <tr>
84
+ <td rowspan="1" colSpan="1" >[enableReadReceipt](https://write.woa.com/#enableReadReceipt)</td>
85
+
86
+ <td rowspan="1" colSpan="1" >boolean</td>
87
+
88
+ <td rowspan="1" colSpan="1" >false</td>
89
+
90
+ <td rowspan="1" colSpan="1" >是否启用消息已读回执功能。</td>
91
+ </tr>
92
+
93
+ <tr>
94
+ <td rowspan="1" colSpan="1" >[messageActionList](https://write.woa.com/#messageActionList)</td>
95
+
96
+ <td rowspan="1" colSpan="1" >MessageAction[]</td>
97
+
98
+ <td rowspan="1" colSpan="1" >undefined</td>
99
+
100
+ <td rowspan="1" colSpan="1" >自定义消息操作列表,例如撤回、删除等。</td>
101
+ </tr>
102
+
103
+ <tr>
104
+ <td rowspan="1" colSpan="1" >[filter](https://write.woa.com/#filter)</td>
105
+
106
+ <td rowspan="1" colSpan="1" >(message: MessageModel) => boolean</td>
107
+
108
+ <td rowspan="1" colSpan="1" >undefined</td>
109
+
110
+ <td rowspan="1" colSpan="1" >自定义消息过滤函数,用于控制哪些消息应该显示。</td>
111
+ </tr>
112
+
113
+ <tr>
114
+ <td rowspan="1" colSpan="1" >[Message](https://write.woa.com/#Message)</td>
115
+
116
+ <td rowspan="1" colSpan="1" >Component</td>
117
+
118
+ <td rowspan="1" colSpan="1" >undefined</td>
119
+
120
+ <td rowspan="1" colSpan="1" >自定义消息组件,用于渲染单条消息。</td>
121
+ </tr>
122
+
123
+ <tr>
124
+ <td rowspan="1" colSpan="1" >[MessageTimeDivider](https://write.woa.com/#MessageTimeDivider)</td>
125
+
126
+ <td rowspan="1" colSpan="1" >Component</td>
127
+
128
+ <td rowspan="1" colSpan="1" >undefined</td>
129
+
130
+ <td rowspan="1" colSpan="1" >自定义消息时间分割线组件。</td>
131
+ </tr>
132
+ </table>
133
+
134
+
135
+ ## Props 详细介绍
136
+
137
+ ### alignment
138
+ - 类型:'left' | 'right' | 'two-sided'
139
+
140
+ - 详细说明:消息在列表中的对齐方式。`'left'` 表示所有消息左对齐,`'right'` 表示所有消息右对齐,`'two-sided'` 表示发送方消息右对齐,接收方消息左对齐。默认值为 `'two-sided'`。
141
+
142
+
143
+ ### messageAggregationTime
144
+ - 类型:number
145
+
146
+ - 详细说明:消息聚合的时间间隔,单位为秒。当同一发送者在指定时间间隔内连续发送多条消息时,这些消息将被聚合显示。设置为 `0` 或更小的值将禁用消息聚合功能,每条消息都会独立显示。默认值为 `300` (5分钟)。
147
+
148
+
149
+ ### enableReadReceipt
150
+ - 类型:boolean
151
+
152
+ - 详细说明:是否启用消息的已读回执功能。当设置为 `true` 时,组件将尝试显示消息的已读状态。默认值为 `false`。
153
+
154
+
155
+ ### messageActionList
156
+ - 类型:MessageAction[]
157
+
158
+ - 详细说明:用于定义在消息上可以执行的自定义操作列表,例如复制、撤回、转发、删除等。这是一个复杂类型,可以通过传入一个 `MessageAction` 对象数组来定制消息的操作行为。默认值为 `undefined`,组件内部会根据 `useMessageActions` 钩子提供默认的操作列表。
159
+
160
+
161
+ 目前默认的顺序是: `['copy', 'recall', 'quote', 'forward', 'delete']`。
162
+
163
+
164
+ **MessageAction** 类型定义:
165
+
166
+ ``` typescript
167
+ import type { Component } from 'vue';
168
+ import type { MessageModel } from '@tencentcloud/chat-uikit-vue3';
169
+
170
+ interface MessageAction {
171
+ /** 唯一的操作标识符 */
172
+ key: string;
173
+ /** 操作的显示文本 */
174
+ label: string;
175
+ /** 操作的图标组件或图标名称 */
176
+ icon?: Component | string;
177
+ /** 操作点击时的回调函数 */
178
+ onClick?: (message: MessageModel) => void;
179
+ /** 控制操作的可见性,可以是布尔值或一个根据消息决定可见性的函数 */
180
+ visible?: boolean | ((message: MessageModel) => boolean);
181
+ /** 自定义组件,如果提供了,将替代默认的标签和图标 */
182
+ component?: Component;
183
+ /** 自定义类名 */
184
+ className?: string;
185
+ /** 自定义样式 */
186
+ style?: Record<string, any>;
187
+ }
188
+ ```
189
+
190
+ 可以使用 `useMessageActions` 钩子获取完整的消息操作列表,然后根据需要进行自定义。`useMessageActions` 钩子接收一个可选参数,可以是一个包含操作键(`string`)或完整 `MessageAction` 对象的数组。如果传入 `string` 数组,则会使用默认操作的配置;如果传入 `MessageAction` 对象,则会合并并覆盖默认配置。
191
+
192
+
193
+ #### 代码示例1:变更消息操作列表的顺序
194
+
195
+ 下面的代码将 `forward`操作放到消息操作列表的第一个。
196
+ ``` typescript
197
+ <template>
198
+ <MessageList :messageActionList="actions" />
199
+ </template>
200
+
201
+ <script lang="ts" setup>
202
+ import { MessageList, useMessageActions } from '@tencentcloud/chat-uikit-vue3';
203
+
204
+ const actions = useMessageActions(['forward', 'copy', 'recall', 'quote', 'delete']);
205
+ </script>
206
+ ```
207
+
208
+ 示例效果:
209
+
210
+ ![](https://write-document-release-1258344699.cos.ap-guangzhou.tencentcos.cn/100033438418/8eaaf60188a811f0818a52540099c741.png)
211
+
212
+
213
+ #### 代码示例2:仅展示部分消息操作
214
+
215
+ 仅展示 `copy`、`recall` 操作,其他操作隐藏。
216
+ ``` typescript
217
+ <template>
218
+ <MessageList :messageActionList="actions" />
219
+ </template>
220
+
221
+ <script lang="ts" setup>
222
+ import { MessageList, useMessageActions } from '@tencentcloud/chat-uikit-vue3';
223
+
224
+ const actions = useMessageActions(['copy', 'recall']);
225
+ </script>
226
+ ```
227
+
228
+ 示例效果:
229
+
230
+ ![](https://write-document-release-1258344699.cos.ap-guangzhou.tencentcos.cn/100033438418/d481cee988a811f0b321525400e889b2.png)
231
+
232
+
233
+ #### 代码示例3:自定义消息操作的样式和逻辑
234
+
235
+ 下面是一个自定义转发操作的示例:
236
+ 1. 将标签修改为 '转发 ⚠️'
237
+
238
+ 2. 将颜色修改为橙色
239
+
240
+ 3. 只有别人发的消息可以转发
241
+
242
+ ``` typescript
243
+ <template>
244
+ <MessageList :messageActionList="actions" />
245
+ </template>
246
+
247
+ <script lang="ts" setup>
248
+ import { MessageList, useMessageActions } from '@tencentcloud/chat-uikit-vue3';
249
+
250
+ const actions = useMessageActions(['copy', {
251
+ key: 'forward',
252
+ label: 'Forward ⚠️',
253
+ style: {
254
+ color: 'orange',
255
+ },
256
+ visible: (message) => message.flow === 'in',
257
+ }, 'quote', 'recall', 'delete']);
258
+ </script>
259
+ ```
260
+
261
+ 示例效果:
262
+
263
+ ![](https://write-document-release-1258344699.cos.ap-guangzhou.tencentcos.cn/100033438418/9aa48621824811f0b1df52540044a08e.png)
264
+
265
+
266
+ #### 代码示例4:新增自定义消息操作
267
+
268
+ 假设需要自定义消息操作,例如仅其他人发送的消息可以标记'喜欢',且插入在'撤回'操作之后。
269
+ ``` typescript
270
+ <template>
271
+ <MessageList :messageActionList="actions" />
272
+ </template>
273
+
274
+ <script lang="ts" setup>
275
+ import { MessageList, useMessageActions } from '@tencentcloud/chat-uikit-vue3';
276
+
277
+ const customLikeAction = {
278
+ key: 'like',
279
+ label: 'Like',
280
+ icon: '🩷',
281
+ visible: (message) => message.flow === 'in',
282
+ onClick: (message) => {
283
+ console.log('like message:', message.ID);
284
+ // 在这里实现点赞逻辑,例如调用后端API
285
+ },
286
+ };
287
+
288
+ const actions = useMessageActions(['forward', 'copy', 'recall', customLikeAction, 'quote', 'delete']);
289
+ </script>
290
+ ```
291
+
292
+ 示例效果:
293
+
294
+ ![](https://write-document-release-1258344699.cos.ap-guangzhou.tencentcos.cn/100033438418/9f5aa2e4824b11f0a8ae5254005ef0f7.png)
295
+
296
+
297
+ ### filter
298
+ - type:((message: MessageModel) => boolean) | undefined
299
+
300
+ - 详细说明:一个自定义的过滤函数,用于在消息列表渲染之前对消息进行筛选。该函数接收一个 `MessageModel` 类型的消息对象,并返回一个布尔值。如果返回 `true`,则消息会显示;如果返回 `false`,则消息不会显示。默认值为 `undefined`,表示不进行额外过滤(但组件内部会默认过滤掉 `isDeleted` 为 `true` 的消息)。
301
+
302
+
303
+ #### 代码示例:过滤掉机器人发送的文本消息
304
+
305
+ 这个示例展示了如何使用 `filter` prop 来过滤掉某些用户发送的特定消息。
306
+ ``` typescript
307
+ <template>
308
+ <MessageList :filter="customMessageFilter" />
309
+ </template>
310
+
311
+ <script lang="ts" setup>
312
+ import { MessageList, MessageType } from '@tencentcloud/chat-uikit-vue3';
313
+ import type { MessageModel } from '@tencentcloud/chat-uikit-vue3';
314
+
315
+ // 定义自定义消息过滤函数
316
+ const customMessageFilter = (message: MessageModel): boolean => {
317
+ if (
318
+ message.nick?.includes('_robot')
319
+ && message.type === MessageType.TEXT as any
320
+ ) {
321
+ return false;
322
+ }
323
+ return true;
324
+ };
325
+ </script>
326
+ ```
327
+
328
+ ### Message
329
+ - 类型:Component | undefined
330
+
331
+ - 详细说明:用于自定义渲染消息列表中的单个消息组件。
332
+
333
+
334
+ 如果您需要完全控制消息的显示样式和内部逻辑,可以传入一个 Vue 组件来替代默认的消息渲染。自定义组件将接收 `message` (IMessageModel 类型)、`alignment`、`messageActionList` 等 props。默认值会使用内部的默认消息组件 `Message`。
335
+
336
+
337
+ #### 代码示例:自定义 CUSTOM 消息点击跳转的消息组件
338
+
339
+ 这个示例展示了如何创建一个自定义消息组件,用于渲染特定 `CUSTOM` 消息(`businessID` 为 `text_link`)为可点击跳转的链接。
340
+ ``` typescript
341
+ <template>
342
+ <MessageList :Message="CustomMessage" />
343
+ </template>
344
+
345
+ <script lang="ts" setup>
346
+ import { defineComponent, h } from 'vue';
347
+ import { MessageList, Message, MessageType } from '@tencentcloud/chat-uikit-vue3';
348
+ import type { MessageModel } from '@tencentcloud/chat-uikit-vue3';
349
+
350
+ const CustomMessage = defineComponent({
351
+ name: 'CustomMessage',
352
+ props: {
353
+ message: {
354
+ type: Object as () => MessageModel,
355
+ required: true,
356
+ },
357
+ // MessageList 会传递其他 props,这里可以按需接收,例如 alignment, messageActionList 等
358
+ },
359
+ setup(props) {
360
+ return () => {
361
+ const { message } = props;
362
+
363
+ if (message.type === MessageType.CUSTOM as any) {
364
+ const { businessID, ...restData } = JSON.parse(message.payload.data);
365
+ if (businessID === 'text_link') {
366
+ return h('div', { class: 'custom-text-link-message' }, [
367
+ h('div', restData.text),
368
+ h('a', { href: restData.link, target: '_blank' }, `跳转到外部网址 ${restData.link}`),
369
+ ]);
370
+ }
371
+ }
372
+ // 其他消息类型使用默认消息组件
373
+ return h(Message, props);
374
+ };
375
+ },
376
+ });
377
+ </script>
378
+
379
+ <style scoped>
380
+ .custom-text-link-message {
381
+ padding: 8px;
382
+ background-color: #f0f8ff;
383
+ border-radius: 8px;
384
+ max-width: 60%;
385
+ margin-bottom: 4px;
386
+ }
387
+
388
+ .custom-text-link-message a {
389
+ color: #1890ff;
390
+ text-decoration: underline;
391
+ }
392
+ </style>
393
+ ```
394
+
395
+ 示例效果:
396
+
397
+ ![](https://write-document-release-1258344699.cos.ap-guangzhou.tencentcos.cn/100033438418/abd6f2ea825411f0b1df52540044a08e.png)
398
+
399
+
400
+ ### MessageTimeDivider
401
+ - 类型:Component | undefined
402
+
403
+ - 详细说明:用于自定义渲染时间分割线组件。
404
+
405
+
406
+ 您可以传入一个 Vue 组件来替代默认的时间分割线渲染。自定义组件将接收 `currentMessage` (当前时间分割线关联的消息)、`previousMessage` (上一条消息) 等 props,可以根据这些信息决定时间分割线的显示逻辑和样式。默认值会使用内部的默认时间分割线组件 `MessageTimeDivider`。
407
+
408
+ ![](https://write-document-release-1258344699.cos.ap-guangzhou.tencentcos.cn/100033438418/4d5e72b688ae11f0974b52540044a08e.png)
409
+
410
+
411
+ #### 代码示例:自定义时间分割线组件,根据时间展示是否为上班时间
412
+
413
+ 这个示例展示了如何创建一个自定义时间分隔线组件,根据消息时间判断是否为工作时间,并显示相应的标签和颜色。
414
+ ``` typescript
415
+ <template>
416
+ <MessageList :MessageTimeDivider="BusinessTimeDivider" />
417
+ </template>
418
+
419
+ <script lang="ts" setup>
420
+ import { defineComponent, h } from 'vue';
421
+ import { MessageList } from '@tencentcloud/chat-uikit-vue3';
422
+ import type { MessageModel } from '@tencentcloud/chat-uikit-vue3';
423
+
424
+ const BusinessTimeDivider = defineComponent({
425
+ name: 'BusinessTimeDivider',
426
+ props: {
427
+ previousMessage: {
428
+ type: Object as () => MessageModel | undefined,
429
+ default: undefined,
430
+ },
431
+ currentMessage: {
432
+ type: Object as () => MessageModel,
433
+ required: true,
434
+ },
435
+ },
436
+ setup(props) {
437
+ if (!props.previousMessage || !props.currentMessage) {
438
+ return () => null;
439
+ }
440
+
441
+ const currentTime = new Date(props.currentMessage.time * 1000);
442
+ const prevTime = new Date(props.previousMessage.time * 1000);
443
+
444
+ // 跨天或间隔超过4小时才显示
445
+ const shouldShow = currentTime.toDateString() !== prevTime.toDateString()
446
+ || (currentTime.getTime() - prevTime.getTime()) > 4 * 60 * 60 * 1000;
447
+
448
+ if (!shouldShow) {
449
+ return () => null;
450
+ }
451
+
452
+ // 判断工作时间 (9:00-18:00, 周一到周五)
453
+ const isWorkingTime = () => {
454
+ const hour = currentTime.getHours();
455
+ const day = currentTime.getDay();
456
+ return day >= 1 && day <= 5 && hour >= 9 && hour <= 18;
457
+ };
458
+
459
+ const timeLabel = isWorkingTime() ? 'Working' : 'Non working';
460
+ const timeColor = isWorkingTime() ? '#52c41a' : '#faad14';
461
+
462
+ return () =>
463
+ h('div', { style: { textAlign: 'center', margin: '16px 0' } }, [
464
+ h('span', {
465
+ style: {
466
+ backgroundColor: timeColor,
467
+ color: 'white',
468
+ padding: '2px 8px',
469
+ borderRadius: '12px',
470
+ marginRight: '8px',
471
+ },
472
+ }, timeLabel),
473
+ currentTime.toLocaleString(),
474
+ ]);
475
+ },
476
+ });
477
+ </script>
478
+ ```
479
+
480
+ 示例效果:
481
+
482
+ ![](https://write-document-release-1258344699.cos.ap-guangzhou.tencentcos.cn/100033438418/1de6fe94825711f0a8ae5254005ef0f7.png)
483
+
484
+
485
+ ## 扩展资料
486
+
487
+ `MessageModel` 类型常用字段:
488
+ ``` typescript
489
+ // MessageModel 接口定义,详细内容请参考 @tencentcloud/chat-uikit-engine 文档
490
+ // 这是一个复杂的消息模型,包含消息ID、类型、发送者、内容、时间、状态等属性。
491
+ // 示例结构 (非完整定义):
492
+ interface MessageModel {
493
+ ID: string;
494
+ conversationID: string;
495
+ type: MessageType;
496
+ payload: any;
497
+ flow: 'in' | 'out';
498
+ from: string;
499
+ to: string;
500
+ time: number; // Unix 时间戳 (秒)
501
+ status: 'unSend' | 'success' | 'fail';
502
+ isDeleted: boolean;
503
+ isRevoked: boolean;
504
+ hasRiskContent: boolean; // 是否包含风险内容
505
+ // ... 其他属性
506
+ }
507
+
508
+ enum MessageType {
509
+ TEXT, // 文本
510
+ IMAGE, // 图像
511
+ AUDIO, // 音频
512
+ VIDEO, // 视频
513
+ FILE, // 文件
514
+ FACE, // 大表情
515
+ LOCATION, // 定位
516
+ GRP_TIP, // 群提示
517
+ CUSTOM, // 自定义
518
+ MERGER, // 合并转发
519
+ }
520
+
521
+ ```
522
+
523
+ MessageModel 的完整内容请参见:[TUIChatEngine 参考文档](https://web.sdk.qcloud.com/im/doc/chat-engine/IMessageModel.html)。
524
+
525
+ ## 相关文档
526
+ - [自定义组件 - UIKitProvider](https://write.woa.com/document/187032638782849024)
527
+
528
+ - [自定义组件 - ConversationList](https://write.woa.com/document/186960319111872512)
529
+
530
+ - [自定义组件 - Chat](https://write.woa.com/document/187778215983329280)
531
+
532
+ - [自定义组件 - MessageInput](https://write.woa.com/document/187058763983568896)
533
+
534
+ - [自定义组件 - ChatSetting](https://write.woa.com/document/187321409859108864)
535
+
536
+ - [自定义组件 - ContactList](https://write.woa.com/document/187595466274463744)
537
+
538
+ - [自定义组件 - Search](https://write.woa.com/document/187595449195040768)
539
+
540
+ - [chat-uikit-vue3 npm](https://www.npmjs.com/package/@tencentcloud/chat-uikit-vue3)
541
+
542
+ - [github Demo](https://github.com/Tencent-RTC/TUIKit_Vue3/tree/main/demos/rtcube-vite-vue3)
543
+
544
+
545
+ ## 交流与反馈
546
+
547
+ 如遇任何问题,可联系 [官网售后](https://cloud.tencent.com/act/event/connect-service#/) 反馈,享有专业工程师的支持,解决您的难题。
548
+
@@ -0,0 +1,110 @@
1
+ ## TUIKit 介绍
2
+
3
+ TUIKit 是基于腾讯云 IM SDK 的一款 UI 组件库,它提供了一些通用的 UI 组件,包含会话、聊天、关系链、群组、音视频通话等功能。
4
+ 基于 UI 组件您可以像搭积木一样快速搭建起自己的业务逻辑。
5
+ TUIKit 中的组件在实现 UI 功能的同时,会调用 IM SDK 相应的接口实现 IM 相关逻辑和数据的处理,因而开发者在使用 TUIKit 时只需关注自身业务或个性化扩展即可。
6
+
7
+ ## TUIKit 主要功能介绍
8
+
9
+ TUIKit 主要分为 Chat、ConversationList、 ChatSetting 、ContactList、Search 几个 UI 子组件,每个 UI 组件负责展示不同的内容。
10
+ TUIKit Web 端界面效果如下图所示:
11
+
12
+ ![](https://write-document-release-1258344699.cos.ap-guangzhou.tencentcos.cn/100027119864/7d0a00bf9e2011ee8964525400321be2.png)
13
+
14
+
15
+ ![](https://write-document-release-1258344699.cos.ap-guangzhou.tencentcos.cn/100027119864/dc06600c9e2011eebd87525400c40977.png)
16
+
17
+
18
+ ## Chat 重点功能介绍
19
+
20
+ TUIChat 主要负责消息界面的展示。您可以利用它直接发送不同类型的消息,支持文字/表情/图片/视频/文件/自定义等消息类型,同时您还可以利用它对消息长按进行转发/撤回/引用、查询消息已读回执详情等。TUIChat Web 端界面效果如下图所示:
21
+ <table>
22
+ <tr>
23
+ <td rowspan="1" colSpan="1" >消息界面</td>
24
+
25
+ <td rowspan="1" colSpan="1" >消息引用/撤回/转发</td>
26
+ </tr>
27
+
28
+ <tr>
29
+ <td rowspan="1" colSpan="1" ><br>![](https://write-document-release-1258344699.cos.ap-guangzhou.tencentcos.cn/100022348635/7274bef0cc6e11edb580525400088f3a.png)</td>
30
+
31
+ <td rowspan="1" colSpan="1" ><br>![](https://write-document-release-1258344699.cos.ap-guangzhou.tencentcos.cn/100022348635/7291b45ecc6e11edb580525400088f3a.png)</td>
32
+ </tr>
33
+ </table>
34
+
35
+ <table>
36
+ <tr>
37
+ <td rowspan="1" colSpan="1" >消息快捷操作</td>
38
+
39
+ <td rowspan="1" colSpan="1" >消息已读回执</td>
40
+ </tr>
41
+
42
+ <tr>
43
+ <td rowspan="1" colSpan="1" ><br>![](https://write-document-release-1258344699.cos.ap-guangzhou.tencentcos.cn/100022348635/72b74fcfcc6e11edb580525400088f3a.png)</td>
44
+
45
+ <td rowspan="1" colSpan="1" ><br>![](https://write-document-release-1258344699.cos.ap-guangzhou.tencentcos.cn/100022348635/72d7e34dcc6e11edb580525400088f3a.png)</td>
46
+ </tr>
47
+ </table>
48
+
49
+
50
+ ## ConversationList 重点功能介绍
51
+
52
+ ConversationList 主要负责会话列表的展示和编辑,包括会话置顶、会话消息免打扰、会话删除等功能。TUIConversation Web 端界面效果如下图所示:
53
+ <table>
54
+ <tr>
55
+ <td rowspan="1" colSpan="1" >会话菜单</td>
56
+
57
+ <td rowspan="1" colSpan="1" >在线状态</td>
58
+ </tr>
59
+
60
+ <tr>
61
+ <td rowspan="1" colSpan="1" ><br>![](https://write-document-release-1258344699.cos.ap-guangzhou.tencentcos.cn/100027119864/31d34e880ec411ef9d065254000ded98.png)</td>
62
+
63
+ <td rowspan="1" colSpan="1" ><br>![](https://write-document-release-1258344699.cos.ap-guangzhou.tencentcos.cn/100027119864/9fb9f59b0ec211ef9e155254005a7266.png)</td>
64
+ </tr>
65
+ </table>
66
+
67
+
68
+ ## Search 重点功能介绍
69
+
70
+ <table>
71
+ <tr>
72
+ <td rowspan="1" colSpan="1" >全局搜索</td>
73
+
74
+ <td rowspan="1" colSpan="1" >会话内搜索</td>
75
+ </tr>
76
+
77
+ <tr>
78
+ <td rowspan="1" colSpan="1" ><br>![通过全局搜索,搜索所有包含“你好”的相关文本](https://write-document-release-1258344699.cos.ap-guangzhou.tencentcos.cn/100027119864/bc24fa6e74a311eeb5cb52540099b6dd.gif)<br>通过全局搜索,搜索所有包含“你好”的相关文本</td>
79
+
80
+ <td rowspan="1" colSpan="1" ><br>![搜索指定会话内所有文件消息](https://write-document-release-1258344699.cos.ap-guangzhou.tencentcos.cn/100027119864/c05824eb74a311eeb3675254006b5335.gif)<br>搜索指定会话内所有文件消息</td>
81
+ </tr>
82
+ </table>
83
+
84
+
85
+ ## ChatSetting 重点功能介绍
86
+
87
+ ChatSetting 主要负责群资料、群成员、群组权限的管理。TUIGroup Web 端界面效果如下图所示:
88
+ <table>
89
+ <tr>
90
+ <td rowspan="1" colSpan="1" >群资料及管理</td>
91
+
92
+ <td rowspan="1" colSpan="1" >群成员管理</td>
93
+ </tr>
94
+
95
+ <tr>
96
+ <td rowspan="1" colSpan="1" ><br>![](https://write-document-release-1258344699.cos.ap-guangzhou.tencentcos.cn/100022348635/72f55ca3cc6e11edb580525400088f3a.png)</td>
97
+
98
+ <td rowspan="1" colSpan="1" ><br>![](https://write-document-release-1258344699.cos.ap-guangzhou.tencentcos.cn/100022348635/730f8e27cc6e11edb580525400088f3a.png)</td>
99
+ </tr>
100
+ </table>
101
+
102
+
103
+ ## ContactList 重点功能介绍
104
+
105
+ TUIContact 主要负责联系人的展示、权限设置等。TUIContact Web 端界面效果如下图所示:
106
+
107
+ ![](https://write-document-release-1258344699.cos.ap-guangzhou.tencentcos.cn/100027119864/d604c066a55e11eeb76e525400461a83.png)
108
+
109
+
110
+