@tdesign-react/chat 1.0.2-alpha.7 → 1.0.2-alpha.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 (227) hide show
  1. package/es/_util/reactify.d.ts +1 -2
  2. package/es/_util/reactify.js +81 -231
  3. package/es/_util/reactify.js.map +1 -1
  4. package/es/_util/useDynamicStyle.js +1 -1
  5. package/es/attachments/index.js +4 -6
  6. package/es/attachments/index.js.map +1 -1
  7. package/es/chat-actionbar/_example-js/base.d.ts +2 -0
  8. package/es/chat-actionbar/_example-js/custom.d.ts +2 -0
  9. package/es/chat-actionbar/_example-js/style.d.ts +2 -0
  10. package/es/chat-actionbar/index.js +4 -6
  11. package/es/chat-actionbar/index.js.map +1 -1
  12. package/es/chat-attachments/_example-js/base.d.ts +2 -0
  13. package/es/chat-attachments/_example-js/scroll-x.d.ts +2 -0
  14. package/es/chat-attachments/_example-js/scroll-y.d.ts +2 -0
  15. package/es/chat-attachments/index.js +3 -1
  16. package/es/chat-attachments/index.js.map +1 -1
  17. package/es/chat-engine/_example-js/agui-basic.d.ts +10 -0
  18. package/es/chat-engine/_example-js/agui-comprehensive.d.ts +2 -0
  19. package/es/chat-engine/_example-js/agui-test.d.ts +11 -0
  20. package/es/chat-engine/_example-js/agui-toolcall.d.ts +5 -0
  21. package/es/chat-engine/_example-js/agui-videoclip.d.ts +8 -0
  22. package/es/chat-engine/_example-js/agui.d.ts +1 -0
  23. package/es/chat-engine/_example-js/basic.d.ts +9 -0
  24. package/es/chat-engine/_example-js/components/HotelCard.d.ts +3 -0
  25. package/es/chat-engine/_example-js/components/HumanInputForm.d.ts +6 -0
  26. package/es/chat-engine/_example-js/components/HumanInputResult.d.ts +3 -0
  27. package/es/chat-engine/_example-js/components/ItineraryCard.d.ts +3 -0
  28. package/es/chat-engine/_example-js/components/PlanningStatePanel.d.ts +4 -0
  29. package/es/chat-engine/_example-js/components/Toolcall.d.ts +4 -0
  30. package/es/chat-engine/_example-js/components/WeatherCard.d.ts +3 -0
  31. package/es/chat-engine/_example-js/components/login.d.ts +1 -0
  32. package/es/chat-engine/_example-js/comprehensive.d.ts +12 -0
  33. package/es/chat-engine/_example-js/custom-content.d.ts +1 -0
  34. package/es/chat-engine/_example-js/hookComponent.d.ts +1 -0
  35. package/es/chat-engine/_example-js/initial-messages.d.ts +9 -0
  36. package/es/chat-engine/_example-js/instance-methods.d.ts +13 -0
  37. package/es/chat-engine/_example-js/travel-actions.d.ts +91 -0
  38. package/es/chat-engine/_example-js/travelToolcall.d.ts +1 -0
  39. package/es/{chatbot/components/toolcall → chat-engine/components/activity}/index.d.ts +1 -0
  40. package/es/chat-engine/components/activity/index.js +18 -0
  41. package/es/{chatbot/components/toolcall → chat-engine/components/activity}/index.js.map +1 -1
  42. package/es/chat-engine/components/activity/registry.d.ts +44 -0
  43. package/es/{chatbot/components/toolcall → chat-engine/components/activity}/registry.js +32 -22
  44. package/es/chat-engine/components/activity/registry.js.map +1 -0
  45. package/es/chat-engine/components/activity/render.d.ts +11 -0
  46. package/es/chat-engine/components/activity/render.js +107 -0
  47. package/es/chat-engine/components/activity/render.js.map +1 -0
  48. package/es/chat-engine/components/activity/types.d.ts +32 -0
  49. package/es/chat-engine/components/activity/types.js +7 -0
  50. package/es/chat-engine/components/activity/types.js.map +1 -0
  51. package/es/chat-engine/components/index.d.ts +3 -0
  52. package/es/chat-engine/components/index.js +28 -0
  53. package/es/chat-engine/components/index.js.map +1 -0
  54. package/es/chat-engine/components/provider/agent-state.js +1 -1
  55. package/es/chat-engine/components/toolcall/index.js +4 -1
  56. package/es/chat-engine/components/toolcall/index.js.map +1 -1
  57. package/es/chat-engine/components/toolcall/registry.js +1 -1
  58. package/es/chat-engine/components/toolcall/render.js +72 -25
  59. package/es/chat-engine/components/toolcall/render.js.map +1 -1
  60. package/es/chat-engine/components/toolcall/types.js +1 -1
  61. package/es/chat-engine/core/adapters/agui/event-mapper.d.ts +109 -0
  62. package/es/chat-engine/core/adapters/agui/event-mapper.js +375 -0
  63. package/es/chat-engine/core/adapters/agui/event-mapper.js.map +1 -0
  64. package/es/chat-engine/core/adapters/agui/events.d.ts +1550 -0
  65. package/es/chat-engine/core/adapters/agui/events.js +199 -0
  66. package/es/chat-engine/core/adapters/agui/events.js.map +1 -0
  67. package/es/chat-engine/core/adapters/agui/index.d.ts +75 -0
  68. package/es/chat-engine/core/adapters/agui/index.js +175 -0
  69. package/es/chat-engine/core/adapters/agui/index.js.map +1 -0
  70. package/es/chat-engine/core/adapters/agui/state-manager.d.ts +99 -0
  71. package/es/chat-engine/core/adapters/agui/state-manager.js +168 -0
  72. package/es/chat-engine/core/adapters/agui/state-manager.js.map +1 -0
  73. package/es/chat-engine/core/adapters/agui/types.d.ts +817 -0
  74. package/es/chat-engine/core/adapters/agui/types.js +95 -0
  75. package/es/chat-engine/core/adapters/agui/types.js.map +1 -0
  76. package/es/chat-engine/core/adapters/agui/utils.d.ts +197 -0
  77. package/es/chat-engine/core/adapters/agui/utils.js +311 -0
  78. package/es/chat-engine/core/adapters/agui/utils.js.map +1 -0
  79. package/es/chat-engine/core/index.d.ts +132 -0
  80. package/es/chat-engine/core/index.js +597 -0
  81. package/es/chat-engine/core/index.js.map +1 -0
  82. package/es/chat-engine/core/processor/index.d.ts +20 -0
  83. package/es/chat-engine/core/processor/index.js +146 -0
  84. package/es/chat-engine/core/processor/index.js.map +1 -0
  85. package/es/chat-engine/core/server/batch-client.d.ts +20 -0
  86. package/es/chat-engine/core/server/batch-client.js +114 -0
  87. package/es/chat-engine/core/server/batch-client.js.map +1 -0
  88. package/es/chat-engine/core/server/connection-manager.d.ts +39 -0
  89. package/es/chat-engine/core/server/connection-manager.js +84 -0
  90. package/es/chat-engine/core/server/connection-manager.js.map +1 -0
  91. package/es/chat-engine/core/server/errors.d.ts +22 -0
  92. package/es/chat-engine/core/server/errors.js +80 -0
  93. package/es/chat-engine/core/server/errors.js.map +1 -0
  94. package/es/chat-engine/core/server/index.d.ts +11 -0
  95. package/es/chat-engine/core/server/index.js +26 -0
  96. package/es/chat-engine/core/server/index.js.map +1 -0
  97. package/es/chat-engine/core/server/llm-service.d.ts +44 -0
  98. package/es/chat-engine/core/server/llm-service.js +198 -0
  99. package/es/chat-engine/core/server/llm-service.js.map +1 -0
  100. package/es/chat-engine/core/server/sse-client.d.ts +77 -0
  101. package/es/chat-engine/core/server/sse-client.js +362 -0
  102. package/es/chat-engine/core/server/sse-client.js.map +1 -0
  103. package/es/chat-engine/core/server/sse-parser.d.ts +49 -0
  104. package/es/chat-engine/core/server/sse-parser.js +116 -0
  105. package/es/chat-engine/core/server/sse-parser.js.map +1 -0
  106. package/es/chat-engine/core/server/types.d.ts +54 -0
  107. package/es/chat-engine/core/server/types.js +28 -0
  108. package/es/chat-engine/core/server/types.js.map +1 -0
  109. package/es/chat-engine/core/store/message.d.ts +27 -0
  110. package/es/chat-engine/core/store/message.js +263 -0
  111. package/es/chat-engine/core/store/message.js.map +1 -0
  112. package/es/chat-engine/core/store/model.d.ts +8 -0
  113. package/es/chat-engine/core/store/model.js +65 -0
  114. package/es/chat-engine/core/store/model.js.map +1 -0
  115. package/es/chat-engine/core/store/reactiveState.d.ts +52 -0
  116. package/es/chat-engine/core/store/reactiveState.js +1359 -0
  117. package/es/chat-engine/core/store/reactiveState.js.map +1 -0
  118. package/es/chat-engine/core/type.d.ts +255 -0
  119. package/es/chat-engine/core/type.js +7 -0
  120. package/es/chat-engine/core/type.js.map +1 -0
  121. package/es/chat-engine/core/utils/eventEmitter.d.ts +10 -0
  122. package/es/chat-engine/core/utils/eventEmitter.js +67 -0
  123. package/es/chat-engine/core/utils/eventEmitter.js.map +1 -0
  124. package/es/chat-engine/core/utils/index.d.ts +33 -0
  125. package/es/chat-engine/core/utils/index.js +999 -0
  126. package/es/chat-engine/core/utils/index.js.map +1 -0
  127. package/es/chat-engine/core/utils/logger.d.ts +30 -0
  128. package/es/chat-engine/core/utils/logger.js +87 -0
  129. package/es/chat-engine/core/utils/logger.js.map +1 -0
  130. package/es/chat-engine/hooks/index.d.ts +4 -0
  131. package/es/chat-engine/hooks/index.js +20 -0
  132. package/es/chat-engine/hooks/index.js.map +1 -0
  133. package/es/chat-engine/hooks/useAgentActivity.d.ts +16 -0
  134. package/es/chat-engine/hooks/useAgentActivity.js +73 -0
  135. package/es/chat-engine/hooks/useAgentActivity.js.map +1 -0
  136. package/es/chat-engine/hooks/useAgentState.js +1 -1
  137. package/es/chat-engine/hooks/useAgentState.js.map +1 -1
  138. package/es/chat-engine/hooks/useAgentToolcall.js +1 -1
  139. package/es/chat-engine/hooks/useChat.js +3 -3
  140. package/es/chat-engine/hooks/useChat.js.map +1 -1
  141. package/es/chat-engine/index.d.ts +3 -1
  142. package/es/chat-engine/index.js +37 -3
  143. package/es/chat-engine/index.js.map +1 -1
  144. package/es/chat-filecard/_example-js/base.d.ts +1 -0
  145. package/es/chat-filecard/index.js +4 -6
  146. package/es/chat-filecard/index.js.map +1 -1
  147. package/es/chat-loading/_example-js/base.d.ts +2 -0
  148. package/es/chat-loading/_example-js/text.d.ts +2 -0
  149. package/es/chat-loading/index.js +4 -6
  150. package/es/chat-loading/index.js.map +1 -1
  151. package/es/chat-markdown/_example-js/base.d.ts +1 -0
  152. package/es/chat-markdown/_example-js/custom.d.ts +2 -0
  153. package/es/chat-markdown/_example-js/event.d.ts +1 -0
  154. package/es/chat-markdown/_example-js/footnote.d.ts +2 -0
  155. package/es/chat-markdown/_example-js/plugin.d.ts +2 -0
  156. package/es/chat-markdown/_example-js/theme.d.ts +2 -0
  157. package/es/chat-markdown/index.js +4 -6
  158. package/es/chat-markdown/index.js.map +1 -1
  159. package/es/chat-message/_example-js/action.d.ts +1 -0
  160. package/es/chat-message/_example-js/base.d.ts +1 -0
  161. package/es/chat-message/_example-js/configure.d.ts +1 -0
  162. package/es/chat-message/_example-js/content.d.ts +1 -0
  163. package/es/chat-message/_example-js/custom.d.ts +1 -0
  164. package/es/chat-message/_example-js/handle-actions.d.ts +7 -0
  165. package/es/chat-message/_example-js/status.d.ts +1 -0
  166. package/es/chat-message/_example-js/think.d.ts +1 -0
  167. package/es/chat-message/index.js +4 -6
  168. package/es/chat-message/index.js.map +1 -1
  169. package/es/chat-sender/_example-js/attachment.d.ts +2 -0
  170. package/es/chat-sender/_example-js/base.d.ts +2 -0
  171. package/es/chat-sender/_example-js/custom.d.ts +2 -0
  172. package/es/chat-sender/index.js +4 -6
  173. package/es/chat-sender/index.js.map +1 -1
  174. package/es/chat-thinking/_example-js/base.d.ts +1 -0
  175. package/es/chat-thinking/_example-js/style.d.ts +1 -0
  176. package/es/chat-thinking/index.js +4 -6
  177. package/es/chat-thinking/index.js.map +1 -1
  178. package/es/chatbot/_example-js/agent.d.ts +1 -0
  179. package/es/chatbot/_example-js/agui.d.ts +13 -0
  180. package/es/chatbot/_example-js/backup/travel.d.ts +1 -0
  181. package/es/chatbot/_example-js/basic.d.ts +1 -0
  182. package/es/chatbot/_example-js/code.d.ts +1 -0
  183. package/es/chatbot/_example-js/components/ItineraryCard.d.ts +3 -0
  184. package/es/chatbot/_example-js/components/login.d.ts +1 -0
  185. package/es/chatbot/_example-js/comprehensive.d.ts +1 -0
  186. package/es/chatbot/_example-js/custom-content.d.ts +1 -0
  187. package/es/chatbot/_example-js/custom-merge.d.ts +1 -0
  188. package/es/chatbot/_example-js/custom.d.ts +1 -0
  189. package/es/chatbot/_example-js/docs.d.ts +1 -0
  190. package/es/chatbot/_example-js/image.d.ts +1 -0
  191. package/es/chatbot/_example-js/initial-messages.d.ts +9 -0
  192. package/es/chatbot/_example-js/instance-methods.d.ts +14 -0
  193. package/es/chatbot/_example-js/nostream.d.ts +1 -0
  194. package/es/chatbot/_example-js/quick-start.d.ts +9 -0
  195. package/es/chatbot/_example-js/research.d.ts +1 -0
  196. package/es/chatbot/_example-js/role-message-config.d.ts +22 -0
  197. package/es/chatbot/_example-js/sender-config.d.ts +20 -0
  198. package/es/chatbot/_example-js/service-config.d.ts +17 -0
  199. package/es/chatbot/_example-js/simple.d.ts +1 -0
  200. package/es/chatbot/_example-js/utils/messageRenderer.d.ts +5 -0
  201. package/es/chatbot/index.js +4 -6
  202. package/es/chatbot/index.js.map +1 -1
  203. package/es/index.js +37 -9
  204. package/es/index.js.map +1 -1
  205. package/es/style/index.js +1 -1
  206. package/package.json +2 -2
  207. package/es/chatbot/components/provider/agent-state.d.ts +0 -5
  208. package/es/chatbot/components/provider/agent-state.js +0 -28
  209. package/es/chatbot/components/provider/agent-state.js.map +0 -1
  210. package/es/chatbot/components/toolcall/index.js +0 -19
  211. package/es/chatbot/components/toolcall/registry.d.ts +0 -35
  212. package/es/chatbot/components/toolcall/registry.js.map +0 -1
  213. package/es/chatbot/components/toolcall/render.d.ts +0 -13
  214. package/es/chatbot/components/toolcall/render.js +0 -207
  215. package/es/chatbot/components/toolcall/render.js.map +0 -1
  216. package/es/chatbot/components/toolcall/types.d.ts +0 -57
  217. package/es/chatbot/components/toolcall/types.js +0 -15
  218. package/es/chatbot/components/toolcall/types.js.map +0 -1
  219. package/es/chatbot/hooks/useAgentState.d.ts +0 -40
  220. package/es/chatbot/hooks/useAgentState.js +0 -76
  221. package/es/chatbot/hooks/useAgentState.js.map +0 -1
  222. package/es/chatbot/hooks/useAgentToolcall.d.ts +0 -28
  223. package/es/chatbot/hooks/useAgentToolcall.js +0 -78
  224. package/es/chatbot/hooks/useAgentToolcall.js.map +0 -1
  225. package/es/chatbot/hooks/useChat.d.ts +0 -11
  226. package/es/chatbot/hooks/useChat.js +0 -66
  227. package/es/chatbot/hooks/useChat.js.map +0 -1
@@ -1,5 +1,5 @@
1
1
  /**
2
- * tdesign v1.0.2-alpha.0
2
+ * tdesign v1.0.2-alpha.6
3
3
  * (c) 2026 tdesign
4
4
  * @license MIT
5
5
  */
@@ -7,18 +7,52 @@
7
7
  export { useChat } from './hooks/useChat.js';
8
8
  export { useAgentToolcall } from './hooks/useAgentToolcall.js';
9
9
  export { AgentStateContext, useAgentState, useAgentStateContext, useAgentStateDataByKey } from './hooks/useAgentState.js';
10
+ export { useAgentActivity } from './hooks/useAgentActivity.js';
10
11
  import './components/toolcall/index.js';
12
+ import './components/activity/index.js';
11
13
  export { AgentStateProvider } from './components/provider/agent-state.js';
12
- export * from 'tdesign-web-components/lib/chat-engine';
14
+ import './core/index.js';
13
15
  export { isNonInteractive, isNonInteractiveConfig } from './components/toolcall/types.js';
14
16
  export { agentToolcallRegistry } from './components/toolcall/registry.js';
15
17
  export { ToolCallRenderer, withAgentStateToolcall, withAgentStateToolcall1 } from './components/toolcall/render.js';
18
+ export { activityRegistry } from './components/activity/registry.js';
19
+ export { ActivityRenderer } from './components/activity/render.js';
20
+ export { applyJsonPatch, findTargetElement, getMessageContentForCopy, isAIMessage, isActivityContent, isAttachmentContent, isImageContent, isMarkdownContent, isReasoningContent, isSearchContent, isSuggestionContent, isTextContent, isThinkingContent, isToolCallContent, isUserMessage, safeParseJSON } from './core/utils/index.js';
21
+ export { StateManagerImpl, stateManager } from './core/adapters/agui/state-manager.js';
22
+ export { AGUIAdapter } from './core/adapters/agui/index.js';
16
23
  import '@babel/runtime/helpers/slicedToArray';
17
24
  import 'react';
25
+ import 'tdesign-web-components/lib/chat-engine';
18
26
  import '@babel/runtime/helpers/toConsumableArray';
19
27
  import '@babel/runtime/helpers/defineProperty';
28
+ import './components/activity/types.js';
29
+ import '@babel/runtime/helpers/objectWithoutProperties';
30
+ import '@babel/runtime/helpers/asyncToGenerator';
20
31
  import '@babel/runtime/helpers/classCallCheck';
21
32
  import '@babel/runtime/helpers/createClass';
22
- import '@babel/runtime/helpers/asyncToGenerator';
23
33
  import '@babel/runtime/regenerator';
34
+ import './core/store/message.js';
35
+ import '@babel/runtime/helpers/possibleConstructorReturn';
36
+ import '@babel/runtime/helpers/getPrototypeOf';
37
+ import '@babel/runtime/helpers/get';
38
+ import '@babel/runtime/helpers/inherits';
39
+ import './core/store/reactiveState.js';
40
+ import '@babel/runtime/helpers/wrapNativeSuper';
41
+ import '@babel/runtime/helpers/typeof';
42
+ import './core/processor/index.js';
43
+ import './core/server/index.js';
44
+ import './core/server/llm-service.js';
45
+ import './core/utils/logger.js';
46
+ import './core/server/batch-client.js';
47
+ import './core/utils/eventEmitter.js';
48
+ import './core/server/errors.js';
49
+ import './core/server/sse-client.js';
50
+ import './core/server/connection-manager.js';
51
+ import './core/server/sse-parser.js';
52
+ import './core/server/types.js';
53
+ import './core/adapters/agui/event-mapper.js';
54
+ import './core/adapters/agui/events.js';
55
+ import 'zod';
56
+ import './core/adapters/agui/types.js';
57
+ import './core/adapters/agui/utils.js';
24
58
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1 @@
1
+ export default function Cards(): import("react/jsx-runtime").JSX.Element;
@@ -1,23 +1,21 @@
1
1
  /**
2
- * tdesign v1.0.2-alpha.0
2
+ * tdesign v1.0.2-alpha.6
3
3
  * (c) 2026 tdesign
4
4
  * @license MIT
5
5
  */
6
6
 
7
7
  import 'tdesign-web-components/lib/filecard';
8
8
  import reactify from '../_util/reactify.js';
9
+ import '@babel/runtime/helpers/defineProperty';
9
10
  import '@babel/runtime/helpers/objectWithoutProperties';
10
- import '@babel/runtime/helpers/toConsumableArray';
11
+ import '@babel/runtime/helpers/typeof';
12
+ import '@babel/runtime/helpers/slicedToArray';
11
13
  import '@babel/runtime/helpers/classCallCheck';
12
14
  import '@babel/runtime/helpers/createClass';
13
15
  import '@babel/runtime/helpers/possibleConstructorReturn';
14
16
  import '@babel/runtime/helpers/getPrototypeOf';
15
17
  import '@babel/runtime/helpers/inherits';
16
- import '@babel/runtime/helpers/defineProperty';
17
- import '@babel/runtime/helpers/slicedToArray';
18
- import '@babel/runtime/helpers/typeof';
19
18
  import 'react';
20
- import 'react-dom';
21
19
  import 'react-dom/client';
22
20
 
23
21
  var Filecard = reactify("t-filecard");
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../pro-components/chat/chat-filecard/index.ts"],"sourcesContent":["import { TdFileCardProps } from 'tdesign-web-components';\nimport 'tdesign-web-components/lib/filecard';\nimport reactify from '../_util/reactify';\n\nexport const Filecard: React.ForwardRefExoticComponent<\n Omit<TdFileCardProps, 'ref'> & React.RefAttributes<HTMLElement | undefined>\n> = reactify<TdFileCardProps>('t-filecard');\n\nexport default Filecard;\nexport type { TdFileCardProps } from 'tdesign-web-components';\n"],"names":["Filecard","reactify"],"mappings":";;;;;;;;;;;;;;;;;;;;;;IAIaA,QAAA,GAETC,SAA0B,YAAY;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../pro-components/chat/chat-filecard/index.ts"],"sourcesContent":["import { TdFileCardProps } from 'tdesign-web-components';\nimport 'tdesign-web-components/lib/filecard';\nimport reactify from '../_util/reactify';\n\nexport const Filecard: React.ForwardRefExoticComponent<\n Omit<TdFileCardProps, 'ref'> & React.RefAttributes<HTMLElement | undefined>\n> = reactify<TdFileCardProps>('t-filecard');\n\nexport default Filecard;\nexport type { TdFileCardProps } from 'tdesign-web-components';\n"],"names":["Filecard","reactify"],"mappings":";;;;;;;;;;;;;;;;;;;;IAIaA,QAAA,GAETC,SAA0B,YAAY;;;;"}
@@ -0,0 +1,2 @@
1
+ export default ChatLoadingExample;
2
+ declare function ChatLoadingExample(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export default ChatLoadingTextExample;
2
+ declare function ChatLoadingTextExample(): import("react/jsx-runtime").JSX.Element;
@@ -1,23 +1,21 @@
1
1
  /**
2
- * tdesign v1.0.2-alpha.0
2
+ * tdesign v1.0.2-alpha.6
3
3
  * (c) 2026 tdesign
4
4
  * @license MIT
5
5
  */
6
6
 
7
7
  import 'tdesign-web-components/lib/chat-loading';
8
8
  import reactify from '../_util/reactify.js';
9
+ import '@babel/runtime/helpers/defineProperty';
9
10
  import '@babel/runtime/helpers/objectWithoutProperties';
10
- import '@babel/runtime/helpers/toConsumableArray';
11
+ import '@babel/runtime/helpers/typeof';
12
+ import '@babel/runtime/helpers/slicedToArray';
11
13
  import '@babel/runtime/helpers/classCallCheck';
12
14
  import '@babel/runtime/helpers/createClass';
13
15
  import '@babel/runtime/helpers/possibleConstructorReturn';
14
16
  import '@babel/runtime/helpers/getPrototypeOf';
15
17
  import '@babel/runtime/helpers/inherits';
16
- import '@babel/runtime/helpers/defineProperty';
17
- import '@babel/runtime/helpers/slicedToArray';
18
- import '@babel/runtime/helpers/typeof';
19
18
  import 'react';
20
- import 'react-dom';
21
19
  import 'react-dom/client';
22
20
 
23
21
  var ChatLoading = reactify("t-chat-loading");
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../pro-components/chat/chat-loading/index.ts"],"sourcesContent":["import { TdChatLoadingProps } from 'tdesign-web-components';\nimport 'tdesign-web-components/lib/chat-loading';\nimport reactify from '../_util/reactify';\n\nexport const ChatLoading: React.ForwardRefExoticComponent<\n Omit<TdChatLoadingProps, 'ref'> & React.RefAttributes<HTMLElement | undefined>\n> = reactify<TdChatLoadingProps>('t-chat-loading');\n\nexport default ChatLoading;\nexport type { TdChatLoadingProps, ChatLoadingAnimationType } from 'tdesign-web-components';\n"],"names":["ChatLoading","reactify"],"mappings":";;;;;;;;;;;;;;;;;;;;;;IAIaA,WAAA,GAETC,SAA6B,gBAAgB;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../pro-components/chat/chat-loading/index.ts"],"sourcesContent":["import { TdChatLoadingProps } from 'tdesign-web-components';\nimport 'tdesign-web-components/lib/chat-loading';\nimport reactify from '../_util/reactify';\n\nexport const ChatLoading: React.ForwardRefExoticComponent<\n Omit<TdChatLoadingProps, 'ref'> & React.RefAttributes<HTMLElement | undefined>\n> = reactify<TdChatLoadingProps>('t-chat-loading');\n\nexport default ChatLoading;\nexport type { TdChatLoadingProps, ChatLoadingAnimationType } from 'tdesign-web-components';\n"],"names":["ChatLoading","reactify"],"mappings":";;;;;;;;;;;;;;;;;;;;IAIaA,WAAA,GAETC,SAA6B,gBAAgB;;;;"}
@@ -0,0 +1 @@
1
+ export default function ThinkContentDemo(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export default MarkdownExample;
2
+ declare function MarkdownExample(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export default function ThinkContentDemo(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export default FootnoteDemo;
2
+ declare function FootnoteDemo(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export default MarkdownExample;
2
+ declare function MarkdownExample(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export default MarkdownExample;
2
+ declare function MarkdownExample(): import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * tdesign v1.0.2-alpha.0
2
+ * tdesign v1.0.2-alpha.6
3
3
  * (c) 2026 tdesign
4
4
  * @license MIT
5
5
  */
@@ -7,18 +7,16 @@
7
7
  import { TdMarkdownEngine } from 'tdesign-web-components';
8
8
  import reactify from '../_util/reactify.js';
9
9
  import 'tdesign-web-components/lib/chat-message/content/markdown-content';
10
+ import '@babel/runtime/helpers/defineProperty';
10
11
  import '@babel/runtime/helpers/objectWithoutProperties';
11
- import '@babel/runtime/helpers/toConsumableArray';
12
+ import '@babel/runtime/helpers/typeof';
13
+ import '@babel/runtime/helpers/slicedToArray';
12
14
  import '@babel/runtime/helpers/classCallCheck';
13
15
  import '@babel/runtime/helpers/createClass';
14
16
  import '@babel/runtime/helpers/possibleConstructorReturn';
15
17
  import '@babel/runtime/helpers/getPrototypeOf';
16
18
  import '@babel/runtime/helpers/inherits';
17
- import '@babel/runtime/helpers/defineProperty';
18
- import '@babel/runtime/helpers/slicedToArray';
19
- import '@babel/runtime/helpers/typeof';
20
19
  import 'react';
21
- import 'react-dom';
22
20
  import 'react-dom/client';
23
21
 
24
22
  var MarkdownEngine = TdMarkdownEngine;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../pro-components/chat/chat-markdown/index.ts"],"sourcesContent":["import { TdChatMarkdownContentProps, TdMarkdownEngine } from 'tdesign-web-components';\nimport reactify from '../_util/reactify';\n\nexport const MarkdownEngine: typeof TdMarkdownEngine = TdMarkdownEngine;\nexport const ChatMarkdown: React.ForwardRefExoticComponent<\n Omit<TdChatMarkdownContentProps, 'ref'> & React.RefAttributes<HTMLElement | undefined>\n> = reactify<TdChatMarkdownContentProps>('t-chat-md-content');\n\n// eslint-disable-next-line import/first\nimport 'tdesign-web-components/lib/chat-message/content/markdown-content';\n\nexport default ChatMarkdown;\nexport type { TdChatMarkdownContentProps } from 'tdesign-web-components';\n"],"names":["MarkdownEngine","TdMarkdownEngine","ChatMarkdown","reactify"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAGO,IAAMA,cAA0C,GAAAC,iBAAA;IAC1CC,YAAA,GAETC,SAAqC,mBAAmB;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../pro-components/chat/chat-markdown/index.ts"],"sourcesContent":["import { TdChatMarkdownContentProps, TdMarkdownEngine } from 'tdesign-web-components';\nimport reactify from '../_util/reactify';\n\nexport const MarkdownEngine: typeof TdMarkdownEngine = TdMarkdownEngine;\nexport const ChatMarkdown: React.ForwardRefExoticComponent<\n Omit<TdChatMarkdownContentProps, 'ref'> & React.RefAttributes<HTMLElement | undefined>\n> = reactify<TdChatMarkdownContentProps>('t-chat-md-content');\n\n// eslint-disable-next-line import/first\nimport 'tdesign-web-components/lib/chat-message/content/markdown-content';\n\nexport default ChatMarkdown;\nexport type { TdChatMarkdownContentProps } from 'tdesign-web-components';\n"],"names":["MarkdownEngine","TdMarkdownEngine","ChatMarkdown","reactify"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAGO,IAAMA,cAA0C,GAAAC,iBAAA;IAC1CC,YAAA,GAETC,SAAqC,mBAAmB;;;;"}
@@ -0,0 +1 @@
1
+ export default function ChatMessageExample(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export default function ChatMessageExample(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export default function ChatMessageExample(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export default function ChatMessageExample(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export default function ChatMessageExample(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * handleActions 使用示例
3
+ *
4
+ * handleActions 用于处理消息内容中的交互操作,采用对象方式配置。
5
+ * 支持的操作:suggestion(建议问题点击)、searchItem(搜索结果点击)
6
+ */
7
+ export default function HandleActionsExample(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export default function ChatMessageExample(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export default function ChatMessageExample(): import("react/jsx-runtime").JSX.Element;
@@ -1,23 +1,21 @@
1
1
  /**
2
- * tdesign v1.0.2-alpha.0
2
+ * tdesign v1.0.2-alpha.6
3
3
  * (c) 2026 tdesign
4
4
  * @license MIT
5
5
  */
6
6
 
7
7
  import 'tdesign-web-components/lib/chat-message';
8
8
  import reactify from '../_util/reactify.js';
9
+ import '@babel/runtime/helpers/defineProperty';
9
10
  import '@babel/runtime/helpers/objectWithoutProperties';
10
- import '@babel/runtime/helpers/toConsumableArray';
11
+ import '@babel/runtime/helpers/typeof';
12
+ import '@babel/runtime/helpers/slicedToArray';
11
13
  import '@babel/runtime/helpers/classCallCheck';
12
14
  import '@babel/runtime/helpers/createClass';
13
15
  import '@babel/runtime/helpers/possibleConstructorReturn';
14
16
  import '@babel/runtime/helpers/getPrototypeOf';
15
17
  import '@babel/runtime/helpers/inherits';
16
- import '@babel/runtime/helpers/defineProperty';
17
- import '@babel/runtime/helpers/slicedToArray';
18
- import '@babel/runtime/helpers/typeof';
19
18
  import 'react';
20
- import 'react-dom';
21
19
  import 'react-dom/client';
22
20
 
23
21
  var ChatMessage = reactify("t-chat-item");
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../pro-components/chat/chat-message/index.ts"],"sourcesContent":["import { type TdChatMessageProps } from 'tdesign-web-components';\nimport 'tdesign-web-components/lib/chat-message';\nimport reactify from '../_util/reactify';\n\nexport const ChatMessage: React.ForwardRefExoticComponent<\n Omit<TdChatMessageProps & React.PropsWithChildren, 'ref'> & React.RefAttributes<HTMLElement | undefined>\n> = reactify<TdChatMessageProps>('t-chat-item');\n\nexport default ChatMessage;\n\nexport type { TdChatMessageProps } from 'tdesign-web-components';\n"],"names":["ChatMessage","reactify"],"mappings":";;;;;;;;;;;;;;;;;;;;;;IAIaA,WAAA,GAETC,SAA6B,aAAa;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../pro-components/chat/chat-message/index.ts"],"sourcesContent":["import { type TdChatMessageProps } from 'tdesign-web-components';\nimport 'tdesign-web-components/lib/chat-message';\nimport reactify from '../_util/reactify';\n\nexport const ChatMessage: React.ForwardRefExoticComponent<\n Omit<TdChatMessageProps & React.PropsWithChildren, 'ref'> & React.RefAttributes<HTMLElement | undefined>\n> = reactify<TdChatMessageProps>('t-chat-item');\n\nexport default ChatMessage;\n\nexport type { TdChatMessageProps } from 'tdesign-web-components';\n"],"names":["ChatMessage","reactify"],"mappings":";;;;;;;;;;;;;;;;;;;;IAIaA,WAAA,GAETC,SAA6B,aAAa;;;;"}
@@ -0,0 +1,2 @@
1
+ export default ChatSenderExample;
2
+ declare function ChatSenderExample(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export default ChatSenderExample;
2
+ declare function ChatSenderExample(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export default ChatSenderExample;
2
+ declare function ChatSenderExample(): import("react/jsx-runtime").JSX.Element;
@@ -1,23 +1,21 @@
1
1
  /**
2
- * tdesign v1.0.2-alpha.0
2
+ * tdesign v1.0.2-alpha.6
3
3
  * (c) 2026 tdesign
4
4
  * @license MIT
5
5
  */
6
6
 
7
7
  import 'tdesign-web-components/lib/chat-sender';
8
8
  import reactify from '../_util/reactify.js';
9
+ import '@babel/runtime/helpers/defineProperty';
9
10
  import '@babel/runtime/helpers/objectWithoutProperties';
10
- import '@babel/runtime/helpers/toConsumableArray';
11
+ import '@babel/runtime/helpers/typeof';
12
+ import '@babel/runtime/helpers/slicedToArray';
11
13
  import '@babel/runtime/helpers/classCallCheck';
12
14
  import '@babel/runtime/helpers/createClass';
13
15
  import '@babel/runtime/helpers/possibleConstructorReturn';
14
16
  import '@babel/runtime/helpers/getPrototypeOf';
15
17
  import '@babel/runtime/helpers/inherits';
16
- import '@babel/runtime/helpers/defineProperty';
17
- import '@babel/runtime/helpers/slicedToArray';
18
- import '@babel/runtime/helpers/typeof';
19
18
  import 'react';
20
- import 'react-dom';
21
19
  import 'react-dom/client';
22
20
 
23
21
  var ChatSender = reactify("t-chat-sender");
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../pro-components/chat/chat-sender/index.ts"],"sourcesContent":["import { TdChatSenderProps } from 'tdesign-web-components';\nimport 'tdesign-web-components/lib/chat-sender';\nimport reactify from '../_util/reactify';\n\nexport const ChatSender: React.ForwardRefExoticComponent<\n Omit<TdChatSenderProps & React.PropsWithChildren, 'ref'> & React.RefAttributes<HTMLElement | undefined>\n> = reactify<TdChatSenderProps>('t-chat-sender');\n\nexport default ChatSender;\nexport type * from 'tdesign-web-components/lib/chat-sender/type';\n"],"names":["ChatSender","reactify"],"mappings":";;;;;;;;;;;;;;;;;;;;;;IAIaA,UAAA,GAETC,SAA4B,eAAe;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../pro-components/chat/chat-sender/index.ts"],"sourcesContent":["import { TdChatSenderProps } from 'tdesign-web-components';\nimport 'tdesign-web-components/lib/chat-sender';\nimport reactify from '../_util/reactify';\n\nexport const ChatSender: React.ForwardRefExoticComponent<\n Omit<TdChatSenderProps & React.PropsWithChildren, 'ref'> & React.RefAttributes<HTMLElement | undefined>\n> = reactify<TdChatSenderProps>('t-chat-sender');\n\nexport default ChatSender;\nexport type * from 'tdesign-web-components/lib/chat-sender/type';\n"],"names":["ChatSender","reactify"],"mappings":";;;;;;;;;;;;;;;;;;;;IAIaA,UAAA,GAETC,SAA4B,eAAe;;;;"}
@@ -0,0 +1 @@
1
+ export default function ThinkContentDemo(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export default function ThinkContentDemo(): import("react/jsx-runtime").JSX.Element;
@@ -1,23 +1,21 @@
1
1
  /**
2
- * tdesign v1.0.2-alpha.0
2
+ * tdesign v1.0.2-alpha.6
3
3
  * (c) 2026 tdesign
4
4
  * @license MIT
5
5
  */
6
6
 
7
7
  import 'tdesign-web-components/lib/chat-message/content/thinking-content';
8
8
  import reactify from '../_util/reactify.js';
9
+ import '@babel/runtime/helpers/defineProperty';
9
10
  import '@babel/runtime/helpers/objectWithoutProperties';
10
- import '@babel/runtime/helpers/toConsumableArray';
11
+ import '@babel/runtime/helpers/typeof';
12
+ import '@babel/runtime/helpers/slicedToArray';
11
13
  import '@babel/runtime/helpers/classCallCheck';
12
14
  import '@babel/runtime/helpers/createClass';
13
15
  import '@babel/runtime/helpers/possibleConstructorReturn';
14
16
  import '@babel/runtime/helpers/getPrototypeOf';
15
17
  import '@babel/runtime/helpers/inherits';
16
- import '@babel/runtime/helpers/defineProperty';
17
- import '@babel/runtime/helpers/slicedToArray';
18
- import '@babel/runtime/helpers/typeof';
19
18
  import 'react';
20
- import 'react-dom';
21
19
  import 'react-dom/client';
22
20
 
23
21
  var ChatThinkContent = reactify("t-chat-thinking-content");
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../pro-components/chat/chat-thinking/index.ts"],"sourcesContent":["import { TdChatThinkContentProps } from 'tdesign-web-components';\nimport 'tdesign-web-components/lib/chat-message/content/thinking-content';\nimport reactify from '../_util/reactify';\n\nconst ChatThinkContent: React.ForwardRefExoticComponent<\n Omit<TdChatThinkContentProps, 'ref'> & React.RefAttributes<HTMLElement | undefined>\n> = reactify<TdChatThinkContentProps>('t-chat-thinking-content');\n\nexport const ChatThinking = ChatThinkContent;\n\nexport default ChatThinking;\n\nexport type { TdChatThinkContentProps } from 'tdesign-web-components';\n"],"names":["ChatThinkContent","reactify","ChatThinking"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAIA,IAAMA,gBAAA,GAEFC,SAAkC,yBAAyB,CAAA,CAAA;AAExD,IAAMC,YAAe,GAAAF;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../pro-components/chat/chat-thinking/index.ts"],"sourcesContent":["import { TdChatThinkContentProps } from 'tdesign-web-components';\nimport 'tdesign-web-components/lib/chat-message/content/thinking-content';\nimport reactify from '../_util/reactify';\n\nconst ChatThinkContent: React.ForwardRefExoticComponent<\n Omit<TdChatThinkContentProps, 'ref'> & React.RefAttributes<HTMLElement | undefined>\n> = reactify<TdChatThinkContentProps>('t-chat-thinking-content');\n\nexport const ChatThinking = ChatThinkContent;\n\nexport default ChatThinking;\n\nexport type { TdChatThinkContentProps } from 'tdesign-web-components';\n"],"names":["ChatThinkContent","reactify","ChatThinking"],"mappings":";;;;;;;;;;;;;;;;;;;;AAIA,IAAMA,gBAAA,GAEFC,SAAkC,yBAAyB,CAAA,CAAA;AAExD,IAAMC,YAAe,GAAAF;;;;"}
@@ -0,0 +1 @@
1
+ export default function ChatBotReact(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,13 @@
1
+ /**
2
+ * AG-UI 协议示例
3
+ *
4
+ * 本示例展示如何使用 AG-UI 协议快速接入聊天服务。
5
+ * AG-UI 是一种标准化的 AI 对话协议,当后端服务符合该协议时,
6
+ * 前端无需编写 onMessage 进行数据转换,大大简化了接入流程。
7
+ * 可以通过查看网络输出的数据流来了解协议格式。
8
+ *
9
+ * 对比说明:
10
+ * - 自定义协议:需要配置 onMessage 进行数据转换(参考 service-config 示例)
11
+ * - AG-UI 协议:只需设置 protocol: 'agui',无需 onMessage
12
+ */
13
+ export default function AguiProtocol(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export default function TravelPlannerChat(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export default function chatSample(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export default function chatSample(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,3 @@
1
+ export function ItineraryCard({ plan }: {
2
+ plan: any;
3
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export default function BaseForm(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export default function chatSample(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export default function CustomContent(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export default function CustomMerge(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export default function ChatBotReact(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export default function chatSample(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export default function chatSample(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * 初始化消息示例
3
+ *
4
+ * 学习目标:
5
+ * - 使用 defaultMessages 设置欢迎语和建议问题
6
+ * - 通过 setMessages 动态加载历史消息
7
+ * - 实现点击建议问题填充输入框
8
+ */
9
+ export default function InitialMessages(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,14 @@
1
+ /**
2
+ * 实例方法示例
3
+ *
4
+ * 学习目标:
5
+ * - 通过 ref 获取组件实例
6
+ * - 调用实例方法控制组件行为
7
+ * - 了解各种实例方法的使用场景
8
+ *
9
+ * 方法分类:
10
+ * 1. 消息设置:sendUserMessage、sendSystemMessage、setMessages
11
+ * 2. 发送控制: addPrompt、regenerate、abortChat、selectFile、scrollList
12
+ * 3. 获取状态
13
+ */
14
+ export default function InstanceMethods(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export default function chatSample(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * 快速开始示例
3
+ *
4
+ * 学习目标:
5
+ * - 了解 Chatbot 组件的最小配置
6
+ * - 理解 endpoint 和 onMessage 的作用
7
+ * - 实现一个基于SSE流式传输的最简可用的对话界面
8
+ */
9
+ export default function QuickStart(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export default function chatSample(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,22 @@
1
+ /**
2
+ * 角色消息配置示例
3
+ *
4
+ * 本示例展示如何通过 messageProps 配置不同角色的消息展示效果。
5
+ * messageProps 会透传给内部的 ChatMessage 组件,用于控制消息的渲染和交互。
6
+ *
7
+ * 配置内容包括:
8
+ * - 消息样式配置(气泡样式、位置、头像、昵称等)
9
+ * - 消息操作按钮配置(复制、点赞、点踩、重试)
10
+ * - 内容类型展示配置(思考过程、搜索结果、Markdown 等)
11
+ * - 静态配置 vs 动态配置的使用场景
12
+ *
13
+ * 学习目标:
14
+ * - 掌握 messageProps 动态配置函数的使用方式
15
+ * - 了解如何根据消息内容、状态动态调整配置
16
+ * - 学会配置消息操作按钮及其回调
17
+ * - 学会使用 chatContentProps 控制内容展示行为
18
+ *
19
+ * 相关文档:
20
+ * - ChatMessage 组件详细文档:https://tdesign.tencent.com/react-chat/components/chat-message
21
+ */
22
+ export default function RoleMessageConfig(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,20 @@
1
+ /**
2
+ * 输入配置示例
3
+ *
4
+ * 本示例展示如何通过 senderProps 配置输入框的基础行为。
5
+ * senderProps 会透传给内部的 ChatSender 组件,用于控制输入框的功能和交互。
6
+ *
7
+ * 配置内容包括:
8
+ * - 输入框基础配置(占位符、自动高度等)
9
+ * - 附件上传配置(文件类型、附件展示等)
10
+ * - 输入事件回调(输入、聚焦、失焦等)
11
+ *
12
+ * 学习目标:
13
+ * - 掌握 senderProps 的常用配置项
14
+ * - 了解如何处理附件上传
15
+ * - 学会处理输入事件
16
+ *
17
+ * 相关文档:
18
+ * - ChatSender 组件详细文档:https://tdesign.tencent.com/react-chat/components/chat-sender
19
+ */
20
+ export default function SenderConfig(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,17 @@
1
+ /**
2
+ * 自定义协议配置示例
3
+ *
4
+ * 本示例展示如何配置自定义协议的聊天服务。
5
+ * 当后端服务使用自定义数据格式时,需要通过 onMessage 进行数据转换。
6
+ *
7
+ * 配置内容包括:
8
+ * - 请求配置(endpoint、onRequest返回请求头、请求参数)
9
+ * - 数据转换(onMessage:将后端数据转换为组件所需格式)
10
+ * - 生命周期回调(onStart、onComplete、onError、onAbort)
11
+ *
12
+ * 学习目标:
13
+ * - 掌握 chatServiceConfig 的核心配置项
14
+ * - 理解 onMessage 的数据转换逻辑(自定义协议必需)
15
+ * - 学会使用生命周期回调处理不同阶段的业务逻辑
16
+ */
17
+ export default function ServiceConfig(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export default function CompositeChat(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ export function renderMessageContent({ item, index, message }: {
2
+ item: any;
3
+ index: any;
4
+ message: any;
5
+ }): import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * tdesign v1.0.2-alpha.0
2
+ * tdesign v1.0.2-alpha.6
3
3
  * (c) 2026 tdesign
4
4
  * @license MIT
5
5
  */
@@ -9,18 +9,16 @@ import 'tdesign-web-components/lib/chat-message/content/reasoning-content';
9
9
  import 'tdesign-web-components/lib/chat-message/content/search-content';
10
10
  import 'tdesign-web-components/lib/chat-message/content/suggestion-content';
11
11
  import reactify from '../_util/reactify.js';
12
+ import '@babel/runtime/helpers/defineProperty';
12
13
  import '@babel/runtime/helpers/objectWithoutProperties';
13
- import '@babel/runtime/helpers/toConsumableArray';
14
+ import '@babel/runtime/helpers/typeof';
15
+ import '@babel/runtime/helpers/slicedToArray';
14
16
  import '@babel/runtime/helpers/classCallCheck';
15
17
  import '@babel/runtime/helpers/createClass';
16
18
  import '@babel/runtime/helpers/possibleConstructorReturn';
17
19
  import '@babel/runtime/helpers/getPrototypeOf';
18
20
  import '@babel/runtime/helpers/inherits';
19
- import '@babel/runtime/helpers/defineProperty';
20
- import '@babel/runtime/helpers/slicedToArray';
21
- import '@babel/runtime/helpers/typeof';
22
21
  import 'react';
23
- import 'react-dom';
24
22
  import 'react-dom/client';
25
23
 
26
24
  var ChatBot = reactify("t-chatbot");
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../pro-components/chat/chatbot/index.ts"],"sourcesContent":["import 'tdesign-web-components/lib/chatbot';\nimport 'tdesign-web-components/lib/chat-message/content/reasoning-content';\nimport 'tdesign-web-components/lib/chat-message/content/search-content';\nimport 'tdesign-web-components/lib/chat-message/content/suggestion-content';\nimport type {\n TdChatbotApi,\n TdChatListApi,\n TdChatListProps,\n TdChatProps,\n TdChatSearchContentProps,\n TdChatSuggestionContentProps,\n} from 'tdesign-web-components';\nimport reactify from '../_util/reactify';\n\nconst ChatBot: React.ForwardRefExoticComponent<\n Omit<TdChatProps & Partial<TdChatbotApi>, 'ref'> & React.RefAttributes<HTMLElement | undefined>\n> = reactify<TdChatProps>('t-chatbot');\n\nconst ChatSearchContent: React.ForwardRefExoticComponent<\n Omit<TdChatSearchContentProps, 'ref'> & React.RefAttributes<HTMLElement | undefined>\n> = reactify<TdChatSearchContentProps>('t-chat-search-content');\n\nconst ChatSuggestionContent: React.ForwardRefExoticComponent<\n Omit<TdChatSuggestionContentProps, 'ref'> & React.RefAttributes<HTMLElement | undefined>\n> = reactify<TdChatSuggestionContentProps>('t-chat-suggestion-content');\n\nconst ChatList: React.ForwardRefExoticComponent<\n Omit<TdChatListProps & Partial<TdChatListApi>, 'ref'> & React.RefAttributes<HTMLElement | undefined>\n> = reactify<TdChatListProps>('t-chat-list');\n\n// 导出组件\nexport { ChatBot, ChatSearchContent, ChatSuggestionContent, ChatList };\n\n// 导出类型和工具\nexport type * from 'tdesign-web-components/lib/chatbot/type';\n"],"names":["ChatBot","reactify","ChatSearchContent","ChatSuggestionContent","ChatList"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAcA,IAAMA,OAAA,GAEFC,SAAsB,WAAW,EAAA;AAErC,IAAMC,iBAAA,GAEFD,SAAmC,uBAAuB,EAAA;AAE9D,IAAME,qBAAA,GAEFF,SAAuC,2BAA2B,EAAA;AAEtE,IAAMG,QAAA,GAEFH,SAA0B,aAAa;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../pro-components/chat/chatbot/index.ts"],"sourcesContent":["import 'tdesign-web-components/lib/chatbot';\nimport 'tdesign-web-components/lib/chat-message/content/reasoning-content';\nimport 'tdesign-web-components/lib/chat-message/content/search-content';\nimport 'tdesign-web-components/lib/chat-message/content/suggestion-content';\nimport type {\n TdChatbotApi,\n TdChatListApi,\n TdChatListProps,\n TdChatProps,\n TdChatSearchContentProps,\n TdChatSuggestionContentProps,\n} from 'tdesign-web-components';\nimport reactify from '../_util/reactify';\n\nconst ChatBot: React.ForwardRefExoticComponent<\n Omit<TdChatProps & Partial<TdChatbotApi>, 'ref'> & React.RefAttributes<HTMLElement | undefined>\n> = reactify<TdChatProps>('t-chatbot');\n\nconst ChatSearchContent: React.ForwardRefExoticComponent<\n Omit<TdChatSearchContentProps, 'ref'> & React.RefAttributes<HTMLElement | undefined>\n> = reactify<TdChatSearchContentProps>('t-chat-search-content');\n\nconst ChatSuggestionContent: React.ForwardRefExoticComponent<\n Omit<TdChatSuggestionContentProps, 'ref'> & React.RefAttributes<HTMLElement | undefined>\n> = reactify<TdChatSuggestionContentProps>('t-chat-suggestion-content');\n\nconst ChatList: React.ForwardRefExoticComponent<\n Omit<TdChatListProps & Partial<TdChatListApi>, 'ref'> & React.RefAttributes<HTMLElement | undefined>\n> = reactify<TdChatListProps>('t-chat-list');\n\n// 导出组件\nexport { ChatBot, ChatSearchContent, ChatSuggestionContent, ChatList };\n\n// 导出类型和工具\nexport type * from 'tdesign-web-components/lib/chatbot/type';\n"],"names":["ChatBot","reactify","ChatSearchContent","ChatSuggestionContent","ChatList"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAcA,IAAMA,OAAA,GAEFC,SAAsB,WAAW,EAAA;AAErC,IAAMC,iBAAA,GAEFD,SAAmC,uBAAuB,EAAA;AAE9D,IAAME,qBAAA,GAEFF,SAAuC,2BAA2B,EAAA;AAEtE,IAAMG,QAAA,GAEFH,SAA0B,aAAa;;;;"}