@tdesign-react/chat 1.0.2-alpha.9 → 1.0.2

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 (130) hide show
  1. package/CHANGELOG.md +18 -1
  2. package/es/_util/reactify.d.ts +2 -1
  3. package/es/_util/reactify.js +231 -81
  4. package/es/_util/reactify.js.map +1 -1
  5. package/es/_util/useDynamicStyle.js +1 -1
  6. package/es/attachments/index.js +6 -4
  7. package/es/attachments/index.js.map +1 -1
  8. package/es/chat-actionbar/index.js +6 -4
  9. package/es/chat-actionbar/index.js.map +1 -1
  10. package/es/chat-engine/components/activity/index.d.ts +0 -1
  11. package/es/chat-engine/components/activity/index.js +2 -1
  12. package/es/chat-engine/components/activity/index.js.map +1 -1
  13. package/es/chat-engine/components/activity/registry.d.ts +1 -1
  14. package/es/chat-engine/components/activity/registry.js +1 -1
  15. package/es/chat-engine/components/activity/registry.js.map +1 -1
  16. package/es/chat-engine/components/activity/render.d.ts +6 -2
  17. package/es/chat-engine/components/activity/render.js +12 -2
  18. package/es/chat-engine/components/activity/render.js.map +1 -1
  19. package/es/chat-engine/components/activity/types.d.ts +0 -3
  20. package/es/chat-engine/components/activity/types.js +1 -1
  21. package/es/chat-engine/components/index.js +8 -7
  22. package/es/chat-engine/components/index.js.map +1 -1
  23. package/es/chat-engine/components/provider/agent-state.js +1 -1
  24. package/es/chat-engine/components/toolcall/index.js +2 -2
  25. package/es/chat-engine/components/toolcall/registry.js +1 -1
  26. package/es/chat-engine/components/toolcall/render.d.ts +1 -1
  27. package/es/chat-engine/components/toolcall/render.js +3 -4
  28. package/es/chat-engine/components/toolcall/render.js.map +1 -1
  29. package/es/chat-engine/components/toolcall/types.js +1 -1
  30. package/es/chat-engine/hooks/index.js +1 -1
  31. package/es/chat-engine/hooks/useAgentActivity.d.ts +1 -2
  32. package/es/chat-engine/hooks/useAgentActivity.js +1 -1
  33. package/es/chat-engine/hooks/useAgentActivity.js.map +1 -1
  34. package/es/chat-engine/hooks/useAgentState.js +1 -1
  35. package/es/chat-engine/hooks/useAgentState.js.map +1 -1
  36. package/es/chat-engine/hooks/useAgentToolcall.js +1 -1
  37. package/es/chat-engine/hooks/useChat.d.ts +1 -1
  38. package/es/chat-engine/hooks/useChat.js +3 -3
  39. package/es/chat-engine/hooks/useChat.js.map +1 -1
  40. package/es/chat-engine/index.d.ts +2 -4
  41. package/es/chat-engine/index.js +9 -33
  42. package/es/chat-engine/index.js.map +1 -1
  43. package/es/chat-filecard/index.js +6 -4
  44. package/es/chat-filecard/index.js.map +1 -1
  45. package/es/chat-loading/index.js +6 -4
  46. package/es/chat-loading/index.js.map +1 -1
  47. package/es/chat-markdown/index.js +6 -4
  48. package/es/chat-markdown/index.js.map +1 -1
  49. package/es/chat-message/index.js +6 -4
  50. package/es/chat-message/index.js.map +1 -1
  51. package/es/chat-sender/index.js +6 -4
  52. package/es/chat-sender/index.js.map +1 -1
  53. package/es/chat-thinking/index.js +6 -4
  54. package/es/chat-thinking/index.js.map +1 -1
  55. package/es/chatbot/_example-js/agui-toolcall.d.ts +11 -0
  56. package/es/chatbot/index.js +6 -4
  57. package/es/chatbot/index.js.map +1 -1
  58. package/es/index.js +11 -32
  59. package/es/index.js.map +1 -1
  60. package/es/style/index.js +1 -1
  61. package/package.json +15 -15
  62. package/es/chat-engine/core/adapters/agui/event-mapper.d.ts +0 -109
  63. package/es/chat-engine/core/adapters/agui/event-mapper.js +0 -375
  64. package/es/chat-engine/core/adapters/agui/event-mapper.js.map +0 -1
  65. package/es/chat-engine/core/adapters/agui/events.d.ts +0 -1550
  66. package/es/chat-engine/core/adapters/agui/events.js +0 -199
  67. package/es/chat-engine/core/adapters/agui/events.js.map +0 -1
  68. package/es/chat-engine/core/adapters/agui/index.d.ts +0 -75
  69. package/es/chat-engine/core/adapters/agui/index.js +0 -175
  70. package/es/chat-engine/core/adapters/agui/index.js.map +0 -1
  71. package/es/chat-engine/core/adapters/agui/state-manager.d.ts +0 -99
  72. package/es/chat-engine/core/adapters/agui/state-manager.js +0 -168
  73. package/es/chat-engine/core/adapters/agui/state-manager.js.map +0 -1
  74. package/es/chat-engine/core/adapters/agui/types.d.ts +0 -817
  75. package/es/chat-engine/core/adapters/agui/types.js +0 -95
  76. package/es/chat-engine/core/adapters/agui/types.js.map +0 -1
  77. package/es/chat-engine/core/adapters/agui/utils.d.ts +0 -197
  78. package/es/chat-engine/core/adapters/agui/utils.js +0 -311
  79. package/es/chat-engine/core/adapters/agui/utils.js.map +0 -1
  80. package/es/chat-engine/core/index.d.ts +0 -132
  81. package/es/chat-engine/core/index.js +0 -597
  82. package/es/chat-engine/core/index.js.map +0 -1
  83. package/es/chat-engine/core/processor/index.d.ts +0 -20
  84. package/es/chat-engine/core/processor/index.js +0 -146
  85. package/es/chat-engine/core/processor/index.js.map +0 -1
  86. package/es/chat-engine/core/server/batch-client.d.ts +0 -20
  87. package/es/chat-engine/core/server/batch-client.js +0 -114
  88. package/es/chat-engine/core/server/batch-client.js.map +0 -1
  89. package/es/chat-engine/core/server/connection-manager.d.ts +0 -39
  90. package/es/chat-engine/core/server/connection-manager.js +0 -84
  91. package/es/chat-engine/core/server/connection-manager.js.map +0 -1
  92. package/es/chat-engine/core/server/errors.d.ts +0 -22
  93. package/es/chat-engine/core/server/errors.js +0 -80
  94. package/es/chat-engine/core/server/errors.js.map +0 -1
  95. package/es/chat-engine/core/server/index.d.ts +0 -11
  96. package/es/chat-engine/core/server/index.js +0 -26
  97. package/es/chat-engine/core/server/index.js.map +0 -1
  98. package/es/chat-engine/core/server/llm-service.d.ts +0 -44
  99. package/es/chat-engine/core/server/llm-service.js +0 -198
  100. package/es/chat-engine/core/server/llm-service.js.map +0 -1
  101. package/es/chat-engine/core/server/sse-client.d.ts +0 -77
  102. package/es/chat-engine/core/server/sse-client.js +0 -362
  103. package/es/chat-engine/core/server/sse-client.js.map +0 -1
  104. package/es/chat-engine/core/server/sse-parser.d.ts +0 -49
  105. package/es/chat-engine/core/server/sse-parser.js +0 -116
  106. package/es/chat-engine/core/server/sse-parser.js.map +0 -1
  107. package/es/chat-engine/core/server/types.d.ts +0 -54
  108. package/es/chat-engine/core/server/types.js +0 -28
  109. package/es/chat-engine/core/server/types.js.map +0 -1
  110. package/es/chat-engine/core/store/message.d.ts +0 -27
  111. package/es/chat-engine/core/store/message.js +0 -263
  112. package/es/chat-engine/core/store/message.js.map +0 -1
  113. package/es/chat-engine/core/store/model.d.ts +0 -8
  114. package/es/chat-engine/core/store/model.js +0 -65
  115. package/es/chat-engine/core/store/model.js.map +0 -1
  116. package/es/chat-engine/core/store/reactiveState.d.ts +0 -52
  117. package/es/chat-engine/core/store/reactiveState.js +0 -1359
  118. package/es/chat-engine/core/store/reactiveState.js.map +0 -1
  119. package/es/chat-engine/core/type.d.ts +0 -255
  120. package/es/chat-engine/core/type.js +0 -7
  121. package/es/chat-engine/core/type.js.map +0 -1
  122. package/es/chat-engine/core/utils/eventEmitter.d.ts +0 -10
  123. package/es/chat-engine/core/utils/eventEmitter.js +0 -67
  124. package/es/chat-engine/core/utils/eventEmitter.js.map +0 -1
  125. package/es/chat-engine/core/utils/index.d.ts +0 -33
  126. package/es/chat-engine/core/utils/index.js +0 -999
  127. package/es/chat-engine/core/utils/index.js.map +0 -1
  128. package/es/chat-engine/core/utils/logger.d.ts +0 -30
  129. package/es/chat-engine/core/utils/logger.js +0 -87
  130. package/es/chat-engine/core/utils/logger.js.map +0 -1
@@ -1,12 +1,12 @@
1
1
  /**
2
- * tdesign v1.0.2-alpha.6
2
+ * tdesign v1.0.2
3
3
  * (c) 2026 tdesign
4
4
  * @license MIT
5
5
  */
6
6
 
7
7
  import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
8
8
  import { useState, useRef, useEffect } from 'react';
9
- import ChatEngine from 'tdesign-web-components/lib/chat-engine';
9
+ import ChatEngine__default from 'tdesign-web-components/lib/chat-engine';
10
10
 
11
11
  var useChat = function useChat(_ref) {
12
12
  var initialMessages = _ref.defaultMessages,
@@ -19,7 +19,7 @@ var useChat = function useChat(_ref) {
19
19
  _useState4 = _slicedToArray(_useState3, 2),
20
20
  status = _useState4[0],
21
21
  setStatus = _useState4[1];
22
- var chatEngineRef = useRef(new ChatEngine());
22
+ var chatEngineRef = useRef(new ChatEngine__default());
23
23
  var msgSubscribeRef = useRef(null);
24
24
  var prevInitialMessagesRef = useRef([]);
25
25
  var chatEngine = chatEngineRef.current;
@@ -1 +1 @@
1
- {"version":3,"file":"useChat.js","sources":["../../../../pro-components/chat/chat-engine/hooks/useChat.ts"],"sourcesContent":["import { useEffect, useRef, useState } from 'react';\n// import ChatEngine from '../core';\n// import type { ChatMessagesData, ChatServiceConfig, ChatStatus } from '../core';\nimport ChatEngine from 'tdesign-web-components/lib/chat-engine';\nimport type { ChatMessagesData, ChatServiceConfig, ChatStatus } from 'tdesign-web-components/lib/chat-engine';\n\n\nexport type IUseChat = {\n defaultMessages?: ChatMessagesData[];\n chatServiceConfig: ChatServiceConfig;\n};\n\nexport const useChat = ({ defaultMessages: initialMessages, chatServiceConfig }: IUseChat) => {\n const [messages, setMessage] = useState<ChatMessagesData[]>([]);\n const [status, setStatus] = useState<ChatStatus>('idle');\n const chatEngineRef = useRef<ChatEngine>(new ChatEngine());\n const msgSubscribeRef = useRef<null | (() => void)>(null);\n const prevInitialMessagesRef = useRef<ChatMessagesData[]>([]);\n\n const chatEngine = chatEngineRef.current;\n\n const syncState = (state: ChatMessagesData[]) => {\n setMessage(state);\n setStatus(state.at(-1)?.status || 'idle');\n };\n\n const subscribeToChat = () => {\n // 清理之前的订阅\n msgSubscribeRef.current?.();\n\n msgSubscribeRef.current = chatEngine.messageStore.subscribe((state) => {\n syncState(state.messages);\n });\n };\n\n const initChat = () => {\n // @ts-ignore\n chatEngine.init(chatServiceConfig, initialMessages);\n // @ts-ignore\n syncState(initialMessages);\n subscribeToChat();\n };\n\n // 初始化聊天引擎\n useEffect(() => {\n initChat();\n return () => msgSubscribeRef.current?.();\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n // 监听 defaultMessages 变化\n useEffect(() => {\n // 检查 initialMessages 是否真的发生了变化\n const hasChanged = JSON.stringify(prevInitialMessagesRef.current) !== JSON.stringify(initialMessages);\n\n if (hasChanged && initialMessages && initialMessages.length > 0) {\n // 更新引用\n prevInitialMessagesRef.current = initialMessages;\n\n // 重新初始化聊天引擎或更新消息\n chatEngine.setMessages(initialMessages, 'replace');\n\n // 同步状态\n syncState(initialMessages);\n }\n }, [initialMessages, chatEngine]);\n\n return {\n chatEngine,\n messages,\n status,\n };\n};\n"],"names":["useChat","initialMessages","_ref","defaultMessages","chatServiceConfig","_useState","useState","_useState2","_slicedToArray","messages","setMessage","_useState3","_useState4","status","setStatus","chatEngineRef","useRef","ChatEngine","msgSubscribeRef","prevInitialMessagesRef","chatEngine","current","syncState","state","_state$at","at","subscribeToChat","_msgSubscribeRef$curr","call","messageStore","subscribe","initChat","init","useEffect","_msgSubscribeRef$curr2","hasChanged","JSON","stringify","length","setMessages"],"mappings":";;;;;;;;;;IAYaA,UAAU,SAAVA,cAAiF;AAAA,EAAA,IAAnDC,eAAA,GAAAC,IAAA,CAAjBC,eAAiB;IAAiBC,yBAAAA;AAC1D,EAAA,IAAAC,SAAA,GAA+BC,QAAA,CAA6B,EAAE,CAAA;IAAAC,UAAA,GAAAC,cAAA,CAAAH,SAAA,EAAA,CAAA,CAAA;AAAvDI,IAAAA,QAAU,GAAAF,UAAA,CAAA,CAAA,CAAA;AAAAG,IAAAA,UAAU,GAAAH,UAAA,CAAA,CAAA,CAAA,CAAA;AAC3B,EAAA,IAAAI,UAAA,GAA4BL,SAAqB,MAAM,CAAA;IAAAM,UAAA,GAAAJ,cAAA,CAAAG,UAAA,EAAA,CAAA,CAAA;AAAhDE,IAAAA,MAAA,GAAAD,UAAA,CAAA,CAAA,CAAA;AAAQE,IAAAA,SAAS,GAAAF,UAAA,CAAA,CAAA,CAAA,CAAA;EACxB,IAAMG,aAAgB,GAAAC,MAAA,CAAmB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AA,EAAA,CAAA;IACF,OAAA,YAAA;AAAA,MAAA,IAAAG,sBAAA,CAAA;AAAA,MAAA,OAAA,CAAAA,sBAAA,GAAMhB,gBAAgBG,OAAU,MAAA,IAAA,IAAAa,sBAAA,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAA1BA,sBAAA,CAAAN,IAAA,CAAAV,eAA0B,CAAA,CAAA;AAAA,KAAA,CAAA;GAEzC,EAAG,EAAE,CAAA,CAAA;AAGLe,EAAAA,SAAA,CAAU,YAAM;AAER,IAAA,IAAAE,UAAA,GAAaC,KAAKC,SAAU,CAAAlB,sBAAA,CAAuBE,OAAO,CAAM,KAAAe,IAAA,CAAKC,UAAUpC,eAAe,CAAA,CAAA;IAEpG,IAAIkC,UAAc,IAAAlC,eAAA,IAAmBA,eAAgB,CAAAqC,MAAA,GAAS,CAAG,EAAA;MAE/DnB,sBAAA,CAAuBE,OAAU,GAAApB,eAAA,CAAA;AAGtBmB,MAAAA,UAAA,CAAAmB,WAAA,CAAYtC,iBAAiB,SAAS,CAAA,CAAA;MAGjDqB,SAAA,CAAUrB,eAAe,CAAA,CAAA;AAC3B,KAAA;AACF,GAAG,EAAA,CAACA,eAAiB,EAAAmB,UAAU,CAAC,CAAA,CAAA;EAEzB,OAAA;AACLA,IAAAA,UAAA,EAAAA,UAAA;AACAX,IAAAA,QAAA,EAAAA,QAAA;AACAI,IAAAA,MAAA,EAAAA,MAAAA;GACF,CAAA;AACF;;;;"}
1
+ {"version":3,"file":"useChat.js","sources":["../../../../pro-components/chat/chat-engine/hooks/useChat.ts"],"sourcesContent":["import { useEffect, useRef, useState } from 'react';\nimport ChatEngine from 'tdesign-web-components/lib/chat-engine';\nimport type { ChatMessagesData, ChatServiceConfig, ChatStatus } from 'tdesign-web-components/lib/chat-engine';\n// import ChatEngine from 'tdesign-web-components/lib/chat-engine';\n// import type { ChatMessagesData, ChatServiceConfig, ChatStatus } from 'tdesign-web-components/lib/chat-engine';\n\nexport type IUseChat = {\n defaultMessages?: ChatMessagesData[];\n chatServiceConfig: ChatServiceConfig | (() => ChatServiceConfig);\n};\n\nexport const useChat = ({ defaultMessages: initialMessages, chatServiceConfig }: IUseChat) => {\n const [messages, setMessage] = useState<ChatMessagesData[]>([]);\n const [status, setStatus] = useState<ChatStatus>('idle');\n const chatEngineRef = useRef<ChatEngine>(new ChatEngine());\n const msgSubscribeRef = useRef<null | (() => void)>(null);\n const prevInitialMessagesRef = useRef<ChatMessagesData[]>([]);\n\n const chatEngine = chatEngineRef.current;\n\n const syncState = (state: ChatMessagesData[]) => {\n setMessage(state);\n setStatus(state.at(-1)?.status || 'idle');\n };\n\n const subscribeToChat = () => {\n // 清理之前的订阅\n msgSubscribeRef.current?.();\n\n msgSubscribeRef.current = chatEngine.messageStore.subscribe((state) => {\n syncState(state.messages);\n });\n };\n\n const initChat = () => {\n // @ts-ignore\n chatEngine.init(chatServiceConfig, initialMessages);\n // @ts-ignore\n syncState(initialMessages);\n subscribeToChat();\n };\n\n // 初始化聊天引擎\n useEffect(() => {\n initChat();\n return () => msgSubscribeRef.current?.();\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n // 监听 defaultMessages 变化\n useEffect(() => {\n // 检查 initialMessages 是否真的发生了变化\n const hasChanged = JSON.stringify(prevInitialMessagesRef.current) !== JSON.stringify(initialMessages);\n\n if (hasChanged && initialMessages && initialMessages.length > 0) {\n // 更新引用\n prevInitialMessagesRef.current = initialMessages;\n\n // 重新初始化聊天引擎或更新消息\n chatEngine.setMessages(initialMessages, 'replace');\n\n // 同步状态\n syncState(initialMessages);\n }\n }, [initialMessages, chatEngine]);\n\n return {\n chatEngine,\n messages,\n status,\n };\n};\n"],"names":["useChat","initialMessages","_ref","defaultMessages","chatServiceConfig","_useState","useState","_useState2","_slicedToArray","messages","setMessage","_useState3","_useState4","status","setStatus","chatEngineRef","useRef","ChatEngine","msgSubscribeRef","prevInitialMessagesRef","chatEngine","current","syncState","state","_state$at","at","subscribeToChat","_msgSubscribe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,sBAAA,CAAuBE,OAAU,GAAApB,eAAA,CAAA;AAGtBmB,MAAAA,UAAA,CAAAmB,WAAA,CAAYtC,iBAAiB,SAAS,CAAA,CAAA;MAGjDqB,SAAA,CAAUrB,eAAe,CAAA,CAAA;AAC3B,KAAA;AACF,GAAG,EAAA,CAACA,eAAiB,EAAAmB,UAAU,CAAC,CAAA,CAAA;EAEzB,OAAA;AACLA,IAAAA,UAAA,EAAAA,UAAA;AACAX,IAAAA,QAAA,EAAAA,QAAA;AACAI,IAAAA,MAAA,EAAAA,MAAAA;GACF,CAAA;AACF;;;;"}
@@ -2,7 +2,5 @@ export * from './hooks/useChat';
2
2
  export * from './hooks/useAgentToolcall';
3
3
  export * from './hooks/useAgentState';
4
4
  export * from './hooks/useAgentActivity';
5
- export * from './components/toolcall';
6
- export * from './components/activity';
7
- export * from './components/provider/agent-state';
8
- export * from './core';
5
+ export * from './components';
6
+ export * from 'tdesign-web-components/lib/chat-engine';
@@ -1,5 +1,5 @@
1
1
  /**
2
- * tdesign v1.0.2-alpha.6
2
+ * tdesign v1.0.2
3
3
  * (c) 2026 tdesign
4
4
  * @license MIT
5
5
  */
@@ -8,51 +8,27 @@ 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
10
  export { useAgentActivity } from './hooks/useAgentActivity.js';
11
- import './components/toolcall/index.js';
12
- import './components/activity/index.js';
13
- export { AgentStateProvider } from './components/provider/agent-state.js';
14
- import './core/index.js';
11
+ import './components/index.js';
12
+ export * from 'tdesign-web-components/lib/chat-engine';
15
13
  export { isNonInteractive, isNonInteractiveConfig } from './components/toolcall/types.js';
16
14
  export { agentToolcallRegistry } from './components/toolcall/registry.js';
17
15
  export { ToolCallRenderer, withAgentStateToolcall, withAgentStateToolcall1 } from './components/toolcall/render.js';
18
16
  export { activityRegistry } from './components/activity/registry.js';
19
17
  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';
18
+ export { AgentStateProvider } from './components/provider/agent-state.js';
23
19
  import '@babel/runtime/helpers/slicedToArray';
24
20
  import 'react';
25
- import 'tdesign-web-components/lib/chat-engine';
26
21
  import '@babel/runtime/helpers/toConsumableArray';
27
22
  import '@babel/runtime/helpers/defineProperty';
23
+ import './components/toolcall/index.js';
24
+ import './components/activity/index.js';
28
25
  import './components/activity/types.js';
29
- import '@babel/runtime/helpers/objectWithoutProperties';
30
- import '@babel/runtime/helpers/asyncToGenerator';
31
26
  import '@babel/runtime/helpers/classCallCheck';
32
27
  import '@babel/runtime/helpers/createClass';
33
- import '@babel/runtime/regenerator';
34
- import './core/store/message.js';
28
+ import '@babel/runtime/helpers/asyncToGenerator';
35
29
  import '@babel/runtime/helpers/possibleConstructorReturn';
36
30
  import '@babel/runtime/helpers/getPrototypeOf';
37
- import '@babel/runtime/helpers/get';
38
31
  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';
32
+ import '@babel/runtime/regenerator';
33
+ import 'react-fast-compare';
58
34
  //# 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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,21 +1,23 @@
1
1
  /**
2
- * tdesign v1.0.2-alpha.6
2
+ * tdesign v1.0.2
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';
10
9
  import '@babel/runtime/helpers/objectWithoutProperties';
11
- import '@babel/runtime/helpers/typeof';
12
- import '@babel/runtime/helpers/slicedToArray';
10
+ import '@babel/runtime/helpers/toConsumableArray';
13
11
  import '@babel/runtime/helpers/classCallCheck';
14
12
  import '@babel/runtime/helpers/createClass';
15
13
  import '@babel/runtime/helpers/possibleConstructorReturn';
16
14
  import '@babel/runtime/helpers/getPrototypeOf';
17
15
  import '@babel/runtime/helpers/inherits';
16
+ import '@babel/runtime/helpers/defineProperty';
17
+ import '@babel/runtime/helpers/slicedToArray';
18
+ import '@babel/runtime/helpers/typeof';
18
19
  import 'react';
20
+ import 'react-dom';
19
21
  import 'react-dom/client';
20
22
 
21
23
  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;;;;"}
@@ -1,21 +1,23 @@
1
1
  /**
2
- * tdesign v1.0.2-alpha.6
2
+ * tdesign v1.0.2
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';
10
9
  import '@babel/runtime/helpers/objectWithoutProperties';
11
- import '@babel/runtime/helpers/typeof';
12
- import '@babel/runtime/helpers/slicedToArray';
10
+ import '@babel/runtime/helpers/toConsumableArray';
13
11
  import '@babel/runtime/helpers/classCallCheck';
14
12
  import '@babel/runtime/helpers/createClass';
15
13
  import '@babel/runtime/helpers/possibleConstructorReturn';
16
14
  import '@babel/runtime/helpers/getPrototypeOf';
17
15
  import '@babel/runtime/helpers/inherits';
16
+ import '@babel/runtime/helpers/defineProperty';
17
+ import '@babel/runtime/helpers/slicedToArray';
18
+ import '@babel/runtime/helpers/typeof';
18
19
  import 'react';
20
+ import 'react-dom';
19
21
  import 'react-dom/client';
20
22
 
21
23
  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;;;;"}
@@ -1,5 +1,5 @@
1
1
  /**
2
- * tdesign v1.0.2-alpha.6
2
+ * tdesign v1.0.2
3
3
  * (c) 2026 tdesign
4
4
  * @license MIT
5
5
  */
@@ -7,16 +7,18 @@
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';
11
10
  import '@babel/runtime/helpers/objectWithoutProperties';
12
- import '@babel/runtime/helpers/typeof';
13
- import '@babel/runtime/helpers/slicedToArray';
11
+ import '@babel/runtime/helpers/toConsumableArray';
14
12
  import '@babel/runtime/helpers/classCallCheck';
15
13
  import '@babel/runtime/helpers/createClass';
16
14
  import '@babel/runtime/helpers/possibleConstructorReturn';
17
15
  import '@babel/runtime/helpers/getPrototypeOf';
18
16
  import '@babel/runtime/helpers/inherits';
17
+ import '@babel/runtime/helpers/defineProperty';
18
+ import '@babel/runtime/helpers/slicedToArray';
19
+ import '@babel/runtime/helpers/typeof';
19
20
  import 'react';
21
+ import 'react-dom';
20
22
  import 'react-dom/client';
21
23
 
22
24
  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;;;;"}
@@ -1,21 +1,23 @@
1
1
  /**
2
- * tdesign v1.0.2-alpha.6
2
+ * tdesign v1.0.2
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';
10
9
  import '@babel/runtime/helpers/objectWithoutProperties';
11
- import '@babel/runtime/helpers/typeof';
12
- import '@babel/runtime/helpers/slicedToArray';
10
+ import '@babel/runtime/helpers/toConsumableArray';
13
11
  import '@babel/runtime/helpers/classCallCheck';
14
12
  import '@babel/runtime/helpers/createClass';
15
13
  import '@babel/runtime/helpers/possibleConstructorReturn';
16
14
  import '@babel/runtime/helpers/getPrototypeOf';
17
15
  import '@babel/runtime/helpers/inherits';
16
+ import '@babel/runtime/helpers/defineProperty';
17
+ import '@babel/runtime/helpers/slicedToArray';
18
+ import '@babel/runtime/helpers/typeof';
18
19
  import 'react';
20
+ import 'react-dom';
19
21
  import 'react-dom/client';
20
22
 
21
23
  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;;;;"}
@@ -1,21 +1,23 @@
1
1
  /**
2
- * tdesign v1.0.2-alpha.6
2
+ * tdesign v1.0.2
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';
10
9
  import '@babel/runtime/helpers/objectWithoutProperties';
11
- import '@babel/runtime/helpers/typeof';
12
- import '@babel/runtime/helpers/slicedToArray';
10
+ import '@babel/runtime/helpers/toConsumableArray';
13
11
  import '@babel/runtime/helpers/classCallCheck';
14
12
  import '@babel/runtime/helpers/createClass';
15
13
  import '@babel/runtime/helpers/possibleConstructorReturn';
16
14
  import '@babel/runtime/helpers/getPrototypeOf';
17
15
  import '@babel/runtime/helpers/inherits';
16
+ import '@babel/runtime/helpers/defineProperty';
17
+ import '@babel/runtime/helpers/slicedToArray';
18
+ import '@babel/runtime/helpers/typeof';
18
19
  import 'react';
20
+ import 'react-dom';
19
21
  import 'react-dom/client';
20
22
 
21
23
  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;;;;"}
@@ -1,21 +1,23 @@
1
1
  /**
2
- * tdesign v1.0.2-alpha.6
2
+ * tdesign v1.0.2
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';
10
9
  import '@babel/runtime/helpers/objectWithoutProperties';
11
- import '@babel/runtime/helpers/typeof';
12
- import '@babel/runtime/helpers/slicedToArray';
10
+ import '@babel/runtime/helpers/toConsumableArray';
13
11
  import '@babel/runtime/helpers/classCallCheck';
14
12
  import '@babel/runtime/helpers/createClass';
15
13
  import '@babel/runtime/helpers/possibleConstructorReturn';
16
14
  import '@babel/runtime/helpers/getPrototypeOf';
17
15
  import '@babel/runtime/helpers/inherits';
16
+ import '@babel/runtime/helpers/defineProperty';
17
+ import '@babel/runtime/helpers/slicedToArray';
18
+ import '@babel/runtime/helpers/typeof';
18
19
  import 'react';
20
+ import 'react-dom';
19
21
  import 'react-dom/client';
20
22
 
21
23
  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,11 @@
1
+ /**
2
+ * AG-UI 协议基础示例(使用 ChatBot 组件)
3
+ *
4
+ * 学习目标:
5
+ * - 使用 ChatBot 组件替代 ChatList + ChatSender 的组合方式
6
+ * - 开启 AG-UI 协议支持(protocol: 'agui')
7
+ * - 理解 AG-UI 协议的自动解析机制
8
+ * - 处理文本消息事件(TEXT_MESSAGE_*)
9
+ * - 通过 slot 渲染自定义 ToolCall 组件
10
+ */
11
+ export default function AguiBasicExample(): import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * tdesign v1.0.2-alpha.6
2
+ * tdesign v1.0.2
3
3
  * (c) 2026 tdesign
4
4
  * @license MIT
5
5
  */
@@ -9,16 +9,18 @@ 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';
13
12
  import '@babel/runtime/helpers/objectWithoutProperties';
14
- import '@babel/runtime/helpers/typeof';
15
- import '@babel/runtime/helpers/slicedToArray';
13
+ import '@babel/runtime/helpers/toConsumableArray';
16
14
  import '@babel/runtime/helpers/classCallCheck';
17
15
  import '@babel/runtime/helpers/createClass';
18
16
  import '@babel/runtime/helpers/possibleConstructorReturn';
19
17
  import '@babel/runtime/helpers/getPrototypeOf';
20
18
  import '@babel/runtime/helpers/inherits';
19
+ import '@babel/runtime/helpers/defineProperty';
20
+ import '@babel/runtime/helpers/slicedToArray';
21
+ import '@babel/runtime/helpers/typeof';
21
22
  import 'react';
23
+ import 'react-dom';
22
24
  import 'react-dom/client';
23
25
 
24
26
  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;;;;"}
package/es/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * tdesign v1.0.2-alpha.6
2
+ * tdesign v1.0.2
3
3
  * (c) 2026 tdesign
4
4
  * @license MIT
5
5
  */
@@ -24,47 +24,29 @@ export { ToolCallRenderer, withAgentStateToolcall, withAgentStateToolcall1 } fro
24
24
  export { activityRegistry } from './chat-engine/components/activity/registry.js';
25
25
  export { ActivityRenderer } from './chat-engine/components/activity/render.js';
26
26
  export { AgentStateProvider } from './chat-engine/components/provider/agent-state.js';
27
- export { applyJsonPatch, findTargetElement, getMessageContentForCopy, isAIMessage, isActivityContent, isAttachmentContent, isImageContent, isMarkdownContent, isReasoningContent, isSearchContent, isSuggestionContent, isTextContent, isThinkingContent, isToolCallContent, isUserMessage, safeParseJSON } from './chat-engine/core/utils/index.js';
28
- export { StateManagerImpl, stateManager } from './chat-engine/core/adapters/agui/state-manager.js';
29
- export { AGUIAdapter } from './chat-engine/core/adapters/agui/index.js';
27
+ export * from 'tdesign-web-components/lib/chat-engine';
30
28
  import 'tdesign-web-components/lib/chatbot';
31
29
  import 'tdesign-web-components/lib/chat-message/content/reasoning-content';
32
30
  import 'tdesign-web-components/lib/chat-message/content/search-content';
33
31
  import 'tdesign-web-components/lib/chat-message/content/suggestion-content';
34
32
  import './_util/reactify.js';
35
- import '@babel/runtime/helpers/defineProperty';
36
33
  import '@babel/runtime/helpers/objectWithoutProperties';
37
- import '@babel/runtime/helpers/typeof';
38
- import '@babel/runtime/helpers/slicedToArray';
34
+ import '@babel/runtime/helpers/toConsumableArray';
39
35
  import '@babel/runtime/helpers/classCallCheck';
40
36
  import '@babel/runtime/helpers/createClass';
41
37
  import '@babel/runtime/helpers/possibleConstructorReturn';
42
38
  import '@babel/runtime/helpers/getPrototypeOf';
43
39
  import '@babel/runtime/helpers/inherits';
40
+ import '@babel/runtime/helpers/defineProperty';
41
+ import '@babel/runtime/helpers/slicedToArray';
42
+ import '@babel/runtime/helpers/typeof';
44
43
  import 'react';
44
+ import 'react-dom';
45
45
  import 'react-dom/client';
46
+ import './chat-engine/components/index.js';
46
47
  import './chat-engine/components/toolcall/index.js';
47
48
  import './chat-engine/components/activity/index.js';
48
49
  import './chat-engine/components/activity/types.js';
49
- import './chat-engine/core/index.js';
50
- import '@babel/runtime/helpers/asyncToGenerator';
51
- import '@babel/runtime/regenerator';
52
- import './chat-engine/core/store/message.js';
53
- import '@babel/runtime/helpers/toConsumableArray';
54
- import '@babel/runtime/helpers/get';
55
- import './chat-engine/core/store/reactiveState.js';
56
- import '@babel/runtime/helpers/wrapNativeSuper';
57
- import './chat-engine/core/processor/index.js';
58
- import './chat-engine/core/server/index.js';
59
- import './chat-engine/core/server/llm-service.js';
60
- import './chat-engine/core/utils/logger.js';
61
- import './chat-engine/core/server/batch-client.js';
62
- import './chat-engine/core/utils/eventEmitter.js';
63
- import './chat-engine/core/server/errors.js';
64
- import './chat-engine/core/server/sse-client.js';
65
- import './chat-engine/core/server/connection-manager.js';
66
- import './chat-engine/core/server/sse-parser.js';
67
- import './chat-engine/core/server/types.js';
68
50
  import 'tdesign-web-components/lib/chat-action';
69
51
  import 'tdesign-web-components/lib/attachments';
70
52
  import 'tdesign-web-components/lib/filecard';
@@ -74,10 +56,7 @@ import 'tdesign-web-components/lib/chat-message/content/markdown-content';
74
56
  import 'tdesign-web-components/lib/chat-message';
75
57
  import 'tdesign-web-components/lib/chat-sender';
76
58
  import 'tdesign-web-components/lib/chat-message/content/thinking-content';
77
- import 'tdesign-web-components/lib/chat-engine';
78
- import './chat-engine/core/adapters/agui/event-mapper.js';
79
- import './chat-engine/core/adapters/agui/events.js';
80
- import 'zod';
81
- import './chat-engine/core/adapters/agui/types.js';
82
- import './chat-engine/core/adapters/agui/utils.js';
59
+ import '@babel/runtime/helpers/asyncToGenerator';
60
+ import '@babel/runtime/regenerator';
61
+ import 'react-fast-compare';
83
62
  //# sourceMappingURL=index.js.map
package/es/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/es/style/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * tdesign v1.0.2-alpha.6
2
+ * tdesign v1.0.2
3
3
  * (c) 2026 tdesign
4
4
  * @license MIT
5
5
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tdesign-react/chat",
3
- "version": "1.0.2-alpha.9",
3
+ "version": "1.0.2",
4
4
  "title": "@tdesign-react/chat",
5
5
  "description": "TDesign Pro Component for AIGC",
6
6
  "module": "es/index.js",
@@ -19,14 +19,6 @@
19
19
  "access": "public",
20
20
  "registry": "https://registry.npmjs.org/"
21
21
  },
22
- "scripts": {
23
- "start": "pnpm dev",
24
- "dev": "vite",
25
- "prebuild": "rimraf es/*",
26
- "build": "cross-env NODE_ENV=production rollup -c script/rollup.config.js && npm run build:tsc",
27
- "build:tsc": "run-p build:tsc-*",
28
- "build:tsc-es": "tsc --emitDeclarationOnly -d -p ./tsconfig.build.json --outDir es/"
29
- },
30
22
  "config": {
31
23
  "commitizen": {
32
24
  "path": "./node_modules/cz-conventional-changelog"
@@ -50,17 +42,25 @@
50
42
  },
51
43
  "dependencies": {
52
44
  "@babel/runtime": "~7.26.7",
53
- "tdesign-web-components": "1.2.11-alpha.9",
54
45
  "classnames": "~2.5.1",
55
46
  "lodash-es": "^4.17.21",
47
+ "tdesign-web-components": "1.3.0-alpha.2",
56
48
  "zod": "^3.24.2",
57
- "cherry-markdown": "^0.10.0"
49
+ "react-fast-compare": "^3.2.2"
58
50
  },
59
51
  "devDependencies": {
60
52
  "cors": "^2.8.5",
61
- "tdesign-icons-react": "0.5.0",
62
- "tdesign-react": "workspace:^",
53
+ "express": "^4.17.3",
54
+ "tdesign-icons-react": "0.6.2",
63
55
  "tvision-charts-react": "^3.3.12",
64
- "express": "^4.17.3"
56
+ "tdesign-react": "^1.16.5"
57
+ },
58
+ "scripts": {
59
+ "start": "pnpm dev",
60
+ "dev": "vite",
61
+ "prebuild": "rimraf es/*",
62
+ "build": "cross-env NODE_ENV=production rollup -c script/rollup.config.js && npm run build:tsc",
63
+ "build:tsc": "run-p build:tsc-*",
64
+ "build:tsc-es": "tsc --emitDeclarationOnly -d -p ./tsconfig.build.json --outDir es/"
65
65
  }
66
- }
66
+ }