@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.
- package/es/_util/reactify.d.ts +1 -2
- package/es/_util/reactify.js +82 -232
- package/es/_util/reactify.js.map +1 -1
- package/es/_util/useDynamicStyle.js +2 -2
- package/es/attachments/index.js +5 -7
- package/es/attachments/index.js.map +1 -1
- package/es/chat-actionbar/index.js +5 -7
- package/es/chat-actionbar/index.js.map +1 -1
- package/es/chat-attachments/index.js +1 -1
- package/es/chat-engine/components/activity/index.d.ts +4 -0
- package/es/chat-engine/components/activity/index.js +18 -0
- package/es/chat-engine/components/activity/index.js.map +1 -0
- package/es/chat-engine/components/activity/registry.d.ts +44 -0
- package/es/chat-engine/components/activity/registry.js +85 -0
- package/es/chat-engine/components/activity/registry.js.map +1 -0
- package/es/chat-engine/components/activity/render.d.ts +11 -0
- package/es/chat-engine/components/activity/render.js +107 -0
- package/es/chat-engine/components/activity/render.js.map +1 -0
- package/es/chat-engine/components/activity/types.d.ts +32 -0
- package/es/chat-engine/components/activity/types.js +7 -0
- package/es/chat-engine/components/activity/types.js.map +1 -0
- package/es/chat-engine/components/index.d.ts +3 -0
- package/es/chat-engine/components/index.js +30 -0
- package/es/chat-engine/components/index.js.map +1 -0
- package/es/chat-engine/components/provider/agent-state.js +7 -3
- package/es/chat-engine/components/provider/agent-state.js.map +1 -1
- package/es/chat-engine/components/toolcall/index.js +8 -3
- package/es/chat-engine/components/toolcall/index.js.map +1 -1
- package/es/chat-engine/components/toolcall/registry.js +2 -2
- package/es/chat-engine/components/toolcall/render.d.ts +1 -1
- package/es/chat-engine/components/toolcall/render.js +58 -14
- package/es/chat-engine/components/toolcall/render.js.map +1 -1
- package/es/chat-engine/components/toolcall/types.js +2 -2
- package/es/chat-engine/core/adapters/agui/event-mapper.d.ts +109 -0
- package/es/chat-engine/core/adapters/agui/event-mapper.js +370 -0
- package/es/chat-engine/core/adapters/agui/event-mapper.js.map +1 -0
- package/es/chat-engine/core/adapters/agui/events.d.ts +1550 -0
- package/es/chat-engine/core/adapters/agui/events.js +199 -0
- package/es/chat-engine/core/adapters/agui/events.js.map +1 -0
- package/es/chat-engine/core/adapters/agui/index.d.ts +75 -0
- package/es/chat-engine/core/adapters/agui/index.js +175 -0
- package/es/chat-engine/core/adapters/agui/index.js.map +1 -0
- package/es/chat-engine/core/adapters/agui/state-manager.d.ts +99 -0
- package/es/chat-engine/core/adapters/agui/state-manager.js +168 -0
- package/es/chat-engine/core/adapters/agui/state-manager.js.map +1 -0
- package/es/chat-engine/core/adapters/agui/types.d.ts +817 -0
- package/es/chat-engine/core/adapters/agui/types.js +95 -0
- package/es/chat-engine/core/adapters/agui/types.js.map +1 -0
- package/es/chat-engine/core/adapters/agui/utils.d.ts +197 -0
- package/es/chat-engine/core/adapters/agui/utils.js +311 -0
- package/es/chat-engine/core/adapters/agui/utils.js.map +1 -0
- package/es/chat-engine/core/index.d.ts +132 -0
- package/es/chat-engine/core/index.js +597 -0
- package/es/chat-engine/core/index.js.map +1 -0
- package/es/chat-engine/core/processor/index.d.ts +20 -0
- package/es/chat-engine/core/processor/index.js +146 -0
- package/es/chat-engine/core/processor/index.js.map +1 -0
- package/es/chat-engine/core/server/batch-client.d.ts +20 -0
- package/es/chat-engine/core/server/batch-client.js +114 -0
- package/es/chat-engine/core/server/batch-client.js.map +1 -0
- package/es/chat-engine/core/server/connection-manager.d.ts +39 -0
- package/es/chat-engine/core/server/connection-manager.js +84 -0
- package/es/chat-engine/core/server/connection-manager.js.map +1 -0
- package/es/chat-engine/core/server/errors.d.ts +22 -0
- package/es/chat-engine/core/server/errors.js +80 -0
- package/es/chat-engine/core/server/errors.js.map +1 -0
- package/es/chat-engine/core/server/index.d.ts +11 -0
- package/es/chat-engine/core/server/index.js +26 -0
- package/es/chat-engine/core/server/index.js.map +1 -0
- package/es/chat-engine/core/server/llm-service.d.ts +44 -0
- package/es/chat-engine/core/server/llm-service.js +198 -0
- package/es/chat-engine/core/server/llm-service.js.map +1 -0
- package/es/chat-engine/core/server/sse-client.d.ts +77 -0
- package/es/chat-engine/core/server/sse-client.js +362 -0
- package/es/chat-engine/core/server/sse-client.js.map +1 -0
- package/es/chat-engine/core/server/sse-parser.d.ts +49 -0
- package/es/chat-engine/core/server/sse-parser.js +116 -0
- package/es/chat-engine/core/server/sse-parser.js.map +1 -0
- package/es/chat-engine/core/server/types.d.ts +54 -0
- package/es/chat-engine/core/server/types.js +28 -0
- package/es/chat-engine/core/server/types.js.map +1 -0
- package/es/chat-engine/core/store/message.d.ts +27 -0
- package/es/chat-engine/core/store/message.js +263 -0
- package/es/chat-engine/core/store/message.js.map +1 -0
- package/es/chat-engine/core/store/model.d.ts +8 -0
- package/es/chat-engine/core/store/model.js +65 -0
- package/es/chat-engine/core/store/model.js.map +1 -0
- package/es/chat-engine/core/store/reactiveState.d.ts +52 -0
- package/es/chat-engine/core/store/reactiveState.js +1359 -0
- package/es/chat-engine/core/store/reactiveState.js.map +1 -0
- package/es/chat-engine/core/type.d.ts +255 -0
- package/es/chat-engine/core/type.js +7 -0
- package/es/chat-engine/core/type.js.map +1 -0
- package/es/chat-engine/core/utils/eventEmitter.d.ts +10 -0
- package/es/chat-engine/core/utils/eventEmitter.js +67 -0
- package/es/chat-engine/core/utils/eventEmitter.js.map +1 -0
- package/es/chat-engine/core/utils/index.d.ts +33 -0
- package/es/chat-engine/core/utils/index.js +999 -0
- package/es/chat-engine/core/utils/index.js.map +1 -0
- package/es/chat-engine/core/utils/logger.d.ts +30 -0
- package/es/chat-engine/core/utils/logger.js +87 -0
- package/es/chat-engine/core/utils/logger.js.map +1 -0
- package/es/chat-engine/hooks/index.d.ts +4 -0
- package/es/chat-engine/hooks/index.js +50 -0
- package/es/chat-engine/hooks/index.js.map +1 -0
- package/es/chat-engine/hooks/useAgentActivity.d.ts +16 -0
- package/es/chat-engine/hooks/useAgentActivity.js +73 -0
- package/es/chat-engine/hooks/useAgentActivity.js.map +1 -0
- package/es/chat-engine/hooks/useAgentState.js +7 -3
- package/es/chat-engine/hooks/useAgentState.js.map +1 -1
- package/es/chat-engine/hooks/useAgentToolcall.js +2 -2
- package/es/chat-engine/hooks/useChat.d.ts +2 -2
- package/es/chat-engine/hooks/useChat.js +38 -4
- package/es/chat-engine/hooks/useChat.js.map +1 -1
- package/es/chat-engine/index.d.ts +3 -1
- package/es/chat-engine/index.js +37 -4
- package/es/chat-engine/index.js.map +1 -1
- package/es/chat-filecard/index.js +5 -7
- package/es/chat-filecard/index.js.map +1 -1
- package/es/chat-loading/index.js +5 -7
- package/es/chat-loading/index.js.map +1 -1
- package/es/chat-markdown/index.js +5 -7
- package/es/chat-markdown/index.js.map +1 -1
- package/es/chat-message/index.js +5 -7
- package/es/chat-message/index.js.map +1 -1
- package/es/chat-sender/index.js +5 -7
- package/es/chat-sender/index.js.map +1 -1
- package/es/chat-thinking/index.js +5 -7
- package/es/chat-thinking/index.js.map +1 -1
- package/es/chatbot/index.js +5 -7
- package/es/chatbot/index.js.map +1 -1
- package/es/index.js +37 -10
- package/es/index.js.map +1 -1
- package/es/style/index.js +2 -2
- package/package.json +3 -3
- package/es/chatbot/_example-js/agui-toolcall.d.ts +0 -11
|
@@ -1,12 +1,46 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* tdesign v1.0.2-alpha.
|
|
3
|
-
* (c)
|
|
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
|
|
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
|
|
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 '
|
|
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":"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"}
|
|
@@ -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 '
|
|
8
|
+
export * from './core';
|
package/es/chat-engine/index.js
CHANGED
|
@@ -1,24 +1,57 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* tdesign v1.0.2-alpha.
|
|
3
|
-
* (c)
|
|
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
|
-
|
|
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.
|
|
3
|
-
* (c)
|
|
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/
|
|
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":"
|
|
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;;;;"}
|
package/es/chat-loading/index.js
CHANGED
|
@@ -1,23 +1,21 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* tdesign v1.0.2-alpha.
|
|
3
|
-
* (c)
|
|
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/
|
|
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":"
|
|
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.
|
|
3
|
-
* (c)
|
|
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/
|
|
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":"
|
|
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;;;;"}
|
package/es/chat-message/index.js
CHANGED
|
@@ -1,23 +1,21 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* tdesign v1.0.2-alpha.
|
|
3
|
-
* (c)
|
|
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/
|
|
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":"
|
|
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;;;;"}
|
package/es/chat-sender/index.js
CHANGED
|
@@ -1,23 +1,21 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* tdesign v1.0.2-alpha.
|
|
3
|
-
* (c)
|
|
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/
|
|
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":"
|
|
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.
|
|
3
|
-
* (c)
|
|
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/
|
|
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":"
|
|
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;;;;"}
|
package/es/chatbot/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* tdesign v1.0.2-alpha.
|
|
3
|
-
* (c)
|
|
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/
|
|
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");
|
package/es/chatbot/index.js.map
CHANGED
|
@@ -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":"
|
|
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.
|
|
3
|
-
* (c)
|
|
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
|
|
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/
|
|
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 '
|
|
54
|
-
import '
|
|
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
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tdesign-react/chat",
|
|
3
|
-
"version": "1.0.2-alpha.
|
|
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.
|
|
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": "
|
|
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;
|