@tdesign-react/chat 1.0.2-alpha.4 → 1.0.2-alpha.6

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 (136) hide show
  1. package/es/_util/reactify.d.ts +1 -2
  2. package/es/_util/reactify.js +82 -232
  3. package/es/_util/reactify.js.map +1 -1
  4. package/es/_util/useDynamicStyle.js +2 -2
  5. package/es/attachments/index.js +5 -7
  6. package/es/attachments/index.js.map +1 -1
  7. package/es/chat-actionbar/index.js +5 -7
  8. package/es/chat-actionbar/index.js.map +1 -1
  9. package/es/chat-attachments/index.js +1 -1
  10. package/es/chat-engine/components/activity/index.d.ts +4 -0
  11. package/es/chat-engine/components/activity/index.js +18 -0
  12. package/es/chat-engine/components/activity/index.js.map +1 -0
  13. package/es/chat-engine/components/activity/registry.d.ts +44 -0
  14. package/es/chat-engine/components/activity/registry.js +85 -0
  15. package/es/chat-engine/components/activity/registry.js.map +1 -0
  16. package/es/chat-engine/components/activity/render.d.ts +11 -0
  17. package/es/chat-engine/components/activity/render.js +107 -0
  18. package/es/chat-engine/components/activity/render.js.map +1 -0
  19. package/es/chat-engine/components/activity/types.d.ts +32 -0
  20. package/es/chat-engine/components/activity/types.js +7 -0
  21. package/es/chat-engine/components/activity/types.js.map +1 -0
  22. package/es/chat-engine/components/index.d.ts +3 -0
  23. package/es/chat-engine/components/index.js +30 -0
  24. package/es/chat-engine/components/index.js.map +1 -0
  25. package/es/chat-engine/components/provider/agent-state.js +7 -3
  26. package/es/chat-engine/components/provider/agent-state.js.map +1 -1
  27. package/es/chat-engine/components/toolcall/index.js +8 -3
  28. package/es/chat-engine/components/toolcall/index.js.map +1 -1
  29. package/es/chat-engine/components/toolcall/registry.js +2 -2
  30. package/es/chat-engine/components/toolcall/render.d.ts +1 -1
  31. package/es/chat-engine/components/toolcall/render.js +58 -14
  32. package/es/chat-engine/components/toolcall/render.js.map +1 -1
  33. package/es/chat-engine/components/toolcall/types.js +2 -2
  34. package/es/chat-engine/core/adapters/agui/event-mapper.d.ts +109 -0
  35. package/es/chat-engine/core/adapters/agui/event-mapper.js +370 -0
  36. package/es/chat-engine/core/adapters/agui/event-mapper.js.map +1 -0
  37. package/es/chat-engine/core/adapters/agui/events.d.ts +1550 -0
  38. package/es/chat-engine/core/adapters/agui/events.js +199 -0
  39. package/es/chat-engine/core/adapters/agui/events.js.map +1 -0
  40. package/es/chat-engine/core/adapters/agui/index.d.ts +75 -0
  41. package/es/chat-engine/core/adapters/agui/index.js +175 -0
  42. package/es/chat-engine/core/adapters/agui/index.js.map +1 -0
  43. package/es/chat-engine/core/adapters/agui/state-manager.d.ts +99 -0
  44. package/es/chat-engine/core/adapters/agui/state-manager.js +168 -0
  45. package/es/chat-engine/core/adapters/agui/state-manager.js.map +1 -0
  46. package/es/chat-engine/core/adapters/agui/types.d.ts +817 -0
  47. package/es/chat-engine/core/adapters/agui/types.js +95 -0
  48. package/es/chat-engine/core/adapters/agui/types.js.map +1 -0
  49. package/es/chat-engine/core/adapters/agui/utils.d.ts +197 -0
  50. package/es/chat-engine/core/adapters/agui/utils.js +311 -0
  51. package/es/chat-engine/core/adapters/agui/utils.js.map +1 -0
  52. package/es/chat-engine/core/index.d.ts +132 -0
  53. package/es/chat-engine/core/index.js +597 -0
  54. package/es/chat-engine/core/index.js.map +1 -0
  55. package/es/chat-engine/core/processor/index.d.ts +20 -0
  56. package/es/chat-engine/core/processor/index.js +146 -0
  57. package/es/chat-engine/core/processor/index.js.map +1 -0
  58. package/es/chat-engine/core/server/batch-client.d.ts +20 -0
  59. package/es/chat-engine/core/server/batch-client.js +114 -0
  60. package/es/chat-engine/core/server/batch-client.js.map +1 -0
  61. package/es/chat-engine/core/server/connection-manager.d.ts +39 -0
  62. package/es/chat-engine/core/server/connection-manager.js +84 -0
  63. package/es/chat-engine/core/server/connection-manager.js.map +1 -0
  64. package/es/chat-engine/core/server/errors.d.ts +22 -0
  65. package/es/chat-engine/core/server/errors.js +80 -0
  66. package/es/chat-engine/core/server/errors.js.map +1 -0
  67. package/es/chat-engine/core/server/index.d.ts +11 -0
  68. package/es/chat-engine/core/server/index.js +26 -0
  69. package/es/chat-engine/core/server/index.js.map +1 -0
  70. package/es/chat-engine/core/server/llm-service.d.ts +44 -0
  71. package/es/chat-engine/core/server/llm-service.js +198 -0
  72. package/es/chat-engine/core/server/llm-service.js.map +1 -0
  73. package/es/chat-engine/core/server/sse-client.d.ts +77 -0
  74. package/es/chat-engine/core/server/sse-client.js +362 -0
  75. package/es/chat-engine/core/server/sse-client.js.map +1 -0
  76. package/es/chat-engine/core/server/sse-parser.d.ts +49 -0
  77. package/es/chat-engine/core/server/sse-parser.js +116 -0
  78. package/es/chat-engine/core/server/sse-parser.js.map +1 -0
  79. package/es/chat-engine/core/server/types.d.ts +54 -0
  80. package/es/chat-engine/core/server/types.js +28 -0
  81. package/es/chat-engine/core/server/types.js.map +1 -0
  82. package/es/chat-engine/core/store/message.d.ts +27 -0
  83. package/es/chat-engine/core/store/message.js +263 -0
  84. package/es/chat-engine/core/store/message.js.map +1 -0
  85. package/es/chat-engine/core/store/model.d.ts +8 -0
  86. package/es/chat-engine/core/store/model.js +65 -0
  87. package/es/chat-engine/core/store/model.js.map +1 -0
  88. package/es/chat-engine/core/store/reactiveState.d.ts +52 -0
  89. package/es/chat-engine/core/store/reactiveState.js +1359 -0
  90. package/es/chat-engine/core/store/reactiveState.js.map +1 -0
  91. package/es/chat-engine/core/type.d.ts +255 -0
  92. package/es/chat-engine/core/type.js +7 -0
  93. package/es/chat-engine/core/type.js.map +1 -0
  94. package/es/chat-engine/core/utils/eventEmitter.d.ts +10 -0
  95. package/es/chat-engine/core/utils/eventEmitter.js +67 -0
  96. package/es/chat-engine/core/utils/eventEmitter.js.map +1 -0
  97. package/es/chat-engine/core/utils/index.d.ts +33 -0
  98. package/es/chat-engine/core/utils/index.js +999 -0
  99. package/es/chat-engine/core/utils/index.js.map +1 -0
  100. package/es/chat-engine/core/utils/logger.d.ts +30 -0
  101. package/es/chat-engine/core/utils/logger.js +87 -0
  102. package/es/chat-engine/core/utils/logger.js.map +1 -0
  103. package/es/chat-engine/hooks/index.d.ts +4 -0
  104. package/es/chat-engine/hooks/index.js +50 -0
  105. package/es/chat-engine/hooks/index.js.map +1 -0
  106. package/es/chat-engine/hooks/useAgentActivity.d.ts +16 -0
  107. package/es/chat-engine/hooks/useAgentActivity.js +73 -0
  108. package/es/chat-engine/hooks/useAgentActivity.js.map +1 -0
  109. package/es/chat-engine/hooks/useAgentState.js +7 -3
  110. package/es/chat-engine/hooks/useAgentState.js.map +1 -1
  111. package/es/chat-engine/hooks/useAgentToolcall.js +2 -2
  112. package/es/chat-engine/hooks/useChat.d.ts +2 -2
  113. package/es/chat-engine/hooks/useChat.js +38 -4
  114. package/es/chat-engine/hooks/useChat.js.map +1 -1
  115. package/es/chat-engine/index.d.ts +3 -1
  116. package/es/chat-engine/index.js +37 -4
  117. package/es/chat-engine/index.js.map +1 -1
  118. package/es/chat-filecard/index.js +5 -7
  119. package/es/chat-filecard/index.js.map +1 -1
  120. package/es/chat-loading/index.js +5 -7
  121. package/es/chat-loading/index.js.map +1 -1
  122. package/es/chat-markdown/index.js +5 -7
  123. package/es/chat-markdown/index.js.map +1 -1
  124. package/es/chat-message/index.js +5 -7
  125. package/es/chat-message/index.js.map +1 -1
  126. package/es/chat-sender/index.js +5 -7
  127. package/es/chat-sender/index.js.map +1 -1
  128. package/es/chat-thinking/index.js +5 -7
  129. package/es/chat-thinking/index.js.map +1 -1
  130. package/es/chatbot/index.js +5 -7
  131. package/es/chatbot/index.js.map +1 -1
  132. package/es/index.js +37 -10
  133. package/es/index.js.map +1 -1
  134. package/es/style/index.js +2 -2
  135. package/package.json +3 -3
  136. package/es/chatbot/_example-js/agui-toolcall.d.ts +0 -11
@@ -1,12 +1,46 @@
1
1
  /**
2
- * tdesign v1.0.2-alpha.4
3
- * (c) 2025 tdesign
2
+ * tdesign v1.0.2-alpha.6
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__default from 'tdesign-web-components/lib/chat-engine';
9
+ import ChatEngine from '../core/index.js';
10
+ import '@babel/runtime/helpers/objectWithoutProperties';
11
+ import '@babel/runtime/helpers/asyncToGenerator';
12
+ import '@babel/runtime/helpers/classCallCheck';
13
+ import '@babel/runtime/helpers/createClass';
14
+ import '@babel/runtime/helpers/defineProperty';
15
+ import '@babel/runtime/regenerator';
16
+ import '../core/adapters/agui/index.js';
17
+ import '@babel/runtime/helpers/toConsumableArray';
18
+ import '../core/adapters/agui/event-mapper.js';
19
+ import '../core/adapters/agui/events.js';
20
+ import 'zod';
21
+ import '../core/adapters/agui/types.js';
22
+ import '@babel/runtime/helpers/possibleConstructorReturn';
23
+ import '@babel/runtime/helpers/getPrototypeOf';
24
+ import '@babel/runtime/helpers/inherits';
25
+ import '@babel/runtime/helpers/wrapNativeSuper';
26
+ import '../core/adapters/agui/state-manager.js';
27
+ import '@babel/runtime/helpers/typeof';
28
+ import '../core/utils/index.js';
29
+ import '../core/adapters/agui/utils.js';
30
+ import '../core/store/message.js';
31
+ import '@babel/runtime/helpers/get';
32
+ import '../core/store/reactiveState.js';
33
+ import '../core/processor/index.js';
34
+ import '../core/server/index.js';
35
+ import '../core/server/llm-service.js';
36
+ import '../core/utils/logger.js';
37
+ import '../core/server/batch-client.js';
38
+ import '../core/utils/eventEmitter.js';
39
+ import '../core/server/errors.js';
40
+ import '../core/server/sse-client.js';
41
+ import '../core/server/connection-manager.js';
42
+ import '../core/server/sse-parser.js';
43
+ import '../core/server/types.js';
10
44
 
11
45
  var useChat = function useChat(_ref) {
12
46
  var initialMessages = _ref.defaultMessages,
@@ -19,7 +53,7 @@ var useChat = function useChat(_ref) {
19
53
  _useState4 = _slicedToArray(_useState3, 2),
20
54
  status = _useState4[0],
21
55
  setStatus = _useState4[1];
22
- var chatEngineRef = useRef(new ChatEngine__default());
56
+ var chatEngineRef = useRef(new ChatEngine());
23
57
  var msgSubscribeRef = useRef(null);
24
58
  var prevInitialMessagesRef = useRef([]);
25
59
  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';\nimport ChatEngine from 'tdesign-web-components/lib/chat-engine';\nimport type { ChatMessagesData, ChatServiceConfig, ChatStatus } from 'tdesign-web-components/lib/chat-engine';\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":";;;;;;;;;;IASaA,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,IAAIC,mBAAA,EAAY,CAAA,CAAA;AACnD,EAAA,IAAAC,eAAA,GAAkBF,OAA4B,IAAI,CAAA,CAAA;AAClD,EAAA,IAAAG,sBAAA,GAAyBH,MAA2B,CAAA,EAAE,CAAA,CAAA;AAE5D,EAAA,IAAMI,aAA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A,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 '../core';\nimport type { ChatMessagesData, ChatServiceConfig, ChatStatus } from '../core';\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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IASaA,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,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AAAA,QAAA;AACAI,IAAAA,MAAA,EAAAA,MAAAA;GACF,CAAA;AACF;;;;"}
@@ -1,6 +1,8 @@
1
1
  export * from './hooks/useChat';
2
2
  export * from './hooks/useAgentToolcall';
3
3
  export * from './hooks/useAgentState';
4
+ export * from './hooks/useAgentActivity';
4
5
  export * from './components/toolcall';
6
+ export * from './components/activity';
5
7
  export * from './components/provider/agent-state';
6
- export * from 'tdesign-web-components/lib/chat-engine';
8
+ export * from './core';
@@ -1,24 +1,57 @@
1
1
  /**
2
- * tdesign v1.0.2-alpha.4
3
- * (c) 2025 tdesign
2
+ * tdesign v1.0.2-alpha.6
3
+ * (c) 2026 tdesign
4
4
  * @license MIT
5
5
  */
6
6
 
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';
18
25
  import '@babel/runtime/helpers/toConsumableArray';
19
26
  import '@babel/runtime/helpers/defineProperty';
27
+ import './components/activity/types.js';
28
+ import '@babel/runtime/helpers/objectWithoutProperties';
29
+ import '@babel/runtime/helpers/asyncToGenerator';
20
30
  import '@babel/runtime/helpers/classCallCheck';
21
31
  import '@babel/runtime/helpers/createClass';
22
- import '@babel/runtime/helpers/asyncToGenerator';
23
32
  import '@babel/runtime/regenerator';
33
+ import './core/store/message.js';
34
+ import '@babel/runtime/helpers/possibleConstructorReturn';
35
+ import '@babel/runtime/helpers/getPrototypeOf';
36
+ import '@babel/runtime/helpers/get';
37
+ import '@babel/runtime/helpers/inherits';
38
+ import './core/store/reactiveState.js';
39
+ import '@babel/runtime/helpers/wrapNativeSuper';
40
+ import '@babel/runtime/helpers/typeof';
41
+ import './core/processor/index.js';
42
+ import './core/server/index.js';
43
+ import './core/server/llm-service.js';
44
+ import './core/utils/logger.js';
45
+ import './core/server/batch-client.js';
46
+ import './core/utils/eventEmitter.js';
47
+ import './core/server/errors.js';
48
+ import './core/server/sse-client.js';
49
+ import './core/server/connection-manager.js';
50
+ import './core/server/sse-parser.js';
51
+ import './core/server/types.js';
52
+ import './core/adapters/agui/event-mapper.js';
53
+ import './core/adapters/agui/events.js';
54
+ import 'zod';
55
+ import './core/adapters/agui/types.js';
56
+ import './core/adapters/agui/utils.js';
24
57
  //# 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,23 +1,21 @@
1
1
  /**
2
- * tdesign v1.0.2-alpha.4
3
- * (c) 2025 tdesign
2
+ * tdesign v1.0.2-alpha.6
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;;;;"}
@@ -1,23 +1,21 @@
1
1
  /**
2
- * tdesign v1.0.2-alpha.4
3
- * (c) 2025 tdesign
2
+ * tdesign v1.0.2-alpha.6
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;;;;"}
@@ -1,24 +1,22 @@
1
1
  /**
2
- * tdesign v1.0.2-alpha.4
3
- * (c) 2025 tdesign
2
+ * tdesign v1.0.2-alpha.6
3
+ * (c) 2026 tdesign
4
4
  * @license MIT
5
5
  */
6
6
 
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;;;;"}
@@ -1,23 +1,21 @@
1
1
  /**
2
- * tdesign v1.0.2-alpha.4
3
- * (c) 2025 tdesign
2
+ * tdesign v1.0.2-alpha.6
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;;;;"}
@@ -1,23 +1,21 @@
1
1
  /**
2
- * tdesign v1.0.2-alpha.4
3
- * (c) 2025 tdesign
2
+ * tdesign v1.0.2-alpha.6
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;;;;"}
@@ -1,23 +1,21 @@
1
1
  /**
2
- * tdesign v1.0.2-alpha.4
3
- * (c) 2025 tdesign
2
+ * tdesign v1.0.2-alpha.6
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;;;;"}
@@ -1,6 +1,6 @@
1
1
  /**
2
- * tdesign v1.0.2-alpha.4
3
- * (c) 2025 tdesign
2
+ * tdesign v1.0.2-alpha.6
3
+ * (c) 2026 tdesign
4
4
  * @license MIT
5
5
  */
6
6
 
@@ -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;;;;"}
package/es/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
- * tdesign v1.0.2-alpha.4
3
- * (c) 2025 tdesign
2
+ * tdesign v1.0.2-alpha.6
3
+ * (c) 2026 tdesign
4
4
  * @license MIT
5
5
  */
6
6
 
@@ -17,30 +17,54 @@ export { ChatThinking } from './chat-thinking/index.js';
17
17
  export { useChat } from './chat-engine/hooks/useChat.js';
18
18
  export { useAgentToolcall } from './chat-engine/hooks/useAgentToolcall.js';
19
19
  export { AgentStateContext, useAgentState, useAgentStateContext, useAgentStateDataByKey } from './chat-engine/hooks/useAgentState.js';
20
+ export { useAgentActivity } from './chat-engine/hooks/useAgentActivity.js';
20
21
  export { isNonInteractive, isNonInteractiveConfig } from './chat-engine/components/toolcall/types.js';
21
22
  export { agentToolcallRegistry } from './chat-engine/components/toolcall/registry.js';
22
23
  export { ToolCallRenderer, withAgentStateToolcall, withAgentStateToolcall1 } from './chat-engine/components/toolcall/render.js';
24
+ export { activityRegistry } from './chat-engine/components/activity/registry.js';
25
+ export { ActivityRenderer } from './chat-engine/components/activity/render.js';
23
26
  export { AgentStateProvider } from './chat-engine/components/provider/agent-state.js';
24
- export * from 'tdesign-web-components/lib/chat-engine';
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';
25
30
  import 'tdesign-web-components/lib/chatbot';
26
31
  import 'tdesign-web-components/lib/chat-message/content/reasoning-content';
27
32
  import 'tdesign-web-components/lib/chat-message/content/search-content';
28
33
  import 'tdesign-web-components/lib/chat-message/content/suggestion-content';
29
34
  import './_util/reactify.js';
35
+ import '@babel/runtime/helpers/defineProperty';
30
36
  import '@babel/runtime/helpers/objectWithoutProperties';
31
- import '@babel/runtime/helpers/toConsumableArray';
37
+ import '@babel/runtime/helpers/typeof';
38
+ import '@babel/runtime/helpers/slicedToArray';
32
39
  import '@babel/runtime/helpers/classCallCheck';
33
40
  import '@babel/runtime/helpers/createClass';
34
41
  import '@babel/runtime/helpers/possibleConstructorReturn';
35
42
  import '@babel/runtime/helpers/getPrototypeOf';
36
43
  import '@babel/runtime/helpers/inherits';
37
- import '@babel/runtime/helpers/defineProperty';
38
- import '@babel/runtime/helpers/slicedToArray';
39
- import '@babel/runtime/helpers/typeof';
40
44
  import 'react';
41
- import 'react-dom';
42
45
  import 'react-dom/client';
43
46
  import './chat-engine/components/toolcall/index.js';
47
+ import './chat-engine/components/activity/index.js';
48
+ 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';
44
68
  import 'tdesign-web-components/lib/chat-action';
45
69
  import 'tdesign-web-components/lib/attachments';
46
70
  import 'tdesign-web-components/lib/filecard';
@@ -50,6 +74,9 @@ import 'tdesign-web-components/lib/chat-message/content/markdown-content';
50
74
  import 'tdesign-web-components/lib/chat-message';
51
75
  import 'tdesign-web-components/lib/chat-sender';
52
76
  import 'tdesign-web-components/lib/chat-message/content/thinking-content';
53
- import '@babel/runtime/helpers/asyncToGenerator';
54
- import '@babel/runtime/regenerator';
77
+ import './chat-engine/core/adapters/agui/event-mapper.js';
78
+ import './chat-engine/core/adapters/agui/events.js';
79
+ import 'zod';
80
+ import './chat-engine/core/adapters/agui/types.js';
81
+ import './chat-engine/core/adapters/agui/utils.js';
55
82
  //# 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,6 +1,6 @@
1
1
  /**
2
- * tdesign v1.0.2-alpha.4
3
- * (c) 2025 tdesign
2
+ * tdesign v1.0.2-alpha.6
3
+ * (c) 2026 tdesign
4
4
  * @license MIT
5
5
  */
6
6
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tdesign-react/chat",
3
- "version": "1.0.2-alpha.4",
3
+ "version": "1.0.2-alpha.6",
4
4
  "title": "@tdesign-react/chat",
5
5
  "description": "TDesign Pro Component for AIGC",
6
6
  "module": "es/index.js",
@@ -50,7 +50,7 @@
50
50
  },
51
51
  "dependencies": {
52
52
  "@babel/runtime": "~7.26.7",
53
- "tdesign-web-components": "1.2.10-alpha.2",
53
+ "tdesign-web-components": "1.2.11-alpha.2",
54
54
  "classnames": "~2.5.1",
55
55
  "lodash-es": "^4.17.21",
56
56
  "zod": "^3.24.2",
@@ -59,7 +59,7 @@
59
59
  "devDependencies": {
60
60
  "cors": "^2.8.5",
61
61
  "tdesign-icons-react": "0.5.0",
62
- "tdesign-react": "^1.12.1",
62
+ "tdesign-react": "workspace:^",
63
63
  "tvision-charts-react": "^3.3.12",
64
64
  "express": "^4.17.3"
65
65
  }
@@ -1,11 +0,0 @@
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;