Skip to content

Commit 6f48c83

Browse files
carolin913uyarn
andauthored
refactor: add ai-core submodule (#4213)
* feat(chatengine): ai-core submodule * feat(chatengine): add ai-core submodule * chore(chatengine): bump ai-core submodule to latest main Made-with: Cursor * chore(chatengine): bump ai-core submodule (workspace exports to TS source) Made-with: Cursor * chore(chatengine): bump ai-core submodule (AG-UI thinking → reasoning migration) Made-with: Cursor * chore(ai-core): sync REASONING_MESSAGE_CHUNK 对齐 TEXT_MESSAGE_CHUNK 风格 Made-with: Cursor * chore(ai-core): sync REASONING_MESSAGE_CHUNK 空 delta 隐式关闭 Made-with: Cursor * chore(chatengine): bump ai-core submodule (AG-UI history 支持 role=reasoning) - 同步 ai-core b2028b7:ReasoningMessageSchema + convertHistoryMessages 支持 role='reasoning' 历史消息,转为 thinking 块(encryptedValue 透传 ext) - 移除 barrel 对 isReasoningContent / ReasoningContent 的再导出 (upstream 已在 thinking → reasoning 迁移中删除) Made-with: Cursor * chore: ignore ai-core package --------- Co-authored-by: wū yāng <uyarnchen@gmail.com>
1 parent aa0b423 commit 6f48c83

17 files changed

Lines changed: 95 additions & 25 deletions

File tree

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,4 @@ _site
1313
temp*
1414
static/
1515
packages/common
16+
packages/ai-core

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
.DS_Store
33
.idea
44
temp*
5+
.tmp-aigc-dts
56
robotMsg.json
67
.history
78

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
[submodule "packages/common"]
22
path = packages/common
33
url = https://github.com/Tencent/tdesign-common.git
4+
[submodule "packages/ai-core"]
5+
path = packages/ai-core
6+
url = https://github.com/TDesignOteam/tdesign-ai-core.git

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@
109109
"fs-extra": "^11.3.0",
110110
"glob": "^9.0.3",
111111
"husky": "^7.0.4",
112+
"immer": "^10.0.0",
112113
"jest-canvas-mock": "^2.4.0",
113114
"jsdom": "^20.0.1",
114115
"less": "4.4.2",
@@ -145,6 +146,7 @@
145146
"@popperjs/core": "~2.11.2",
146147
"tdesign-react": "workspace:^",
147148
"@tdesign-react/chat": "workspace:^",
149+
"@tdesign/ai-chat-engine": "workspace:^",
148150
"@tdesign/common": "workspace:^",
149151
"@tdesign/common-docs": "workspace:^",
150152
"@tdesign/common-js": "workspace:^",

packages/ai-core

Submodule ai-core added at b2028b7

packages/pro-components/chat/chat-engine/_example/agui-history-test.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React, { useState, useMemo } from 'react';
22
import { Card, Space, Button, Divider } from 'tdesign-react';
3-
import { AGUIAdapter } from 'tdesign-web-components/lib/chat-engine';
4-
import type { AGUIHistoryMessage, AGUIActivityMessage } from 'tdesign-web-components/lib/chat-engine';
3+
import { AGUIAdapter } from '@tdesign-react/chat';
4+
import type { AGUIHistoryMessage, AGUIActivityMessage } from '@tdesign-react/chat';
55

66
/**
77
* AG-UI 历史消息转换测试

packages/pro-components/chat/chat-engine/_example/headless-eventbus.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
import React, { useEffect, useState, useRef } from 'react';
22
import { Button, Card, Space, Tag, Divider, List, MessagePlugin } from 'tdesign-react';
3-
import ChatEngine, {
4-
ChatEngineEventType,
5-
type SSEChunkData,
6-
type AIMessageContent,
7-
} from 'tdesign-web-components/lib/chat-engine';
3+
import { ChatEngine, ChatEngineEventType, type SSEChunkData, type AIMessageContent } from '@tdesign-react/chat';
84

95
/**
106
* Headless 事件总线示例

packages/pro-components/chat/chat-engine/_example/headless-pure.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
import React, { useEffect, useRef } from 'react';
22
import { Card, Button, Space, Divider } from 'tdesign-react';
3-
import ChatEngine, {
4-
ChatEngineEventType,
5-
type SSEChunkData,
6-
type AIMessageContent,
7-
} from 'tdesign-web-components/lib/chat-engine';
3+
import { ChatEngine, ChatEngineEventType, type SSEChunkData, type AIMessageContent } from '@tdesign-react/chat';
84

95
/**
106
* 纯 Headless 示例 - 无 UI 依赖的 ChatEngine 使用方式

packages/pro-components/chat/chat-engine/components/activity/render.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* eslint-disable react-hooks/exhaustive-deps */
22
import React, { useState, useEffect, useMemo, Component, ErrorInfo } from 'react';
33
import isEqual from 'react-fast-compare';
4-
import { type ActivityData } from 'tdesign-web-components';
4+
import { type ActivityData } from '@tdesign/ai-chat-engine';
55
import type { ActivityComponentProps } from './types';
66
import { activityRegistry } from './registry';
77

packages/pro-components/chat/chat-engine/components/toolcall/render.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React, { useState, useEffect, useCallback, useMemo, Component, ErrorInfo } from 'react';
2-
import { AGUIEventType, ToolCall } from 'tdesign-web-components/lib/chat-engine';
2+
import { AGUIEventType, ToolCall } from '@tdesign/ai-chat-engine';
33
import { isNonInteractiveConfig, type ToolcallComponentProps } from './types';
44
import { agentToolcallRegistry } from './registry';
55
import { AgentStateContext, useAgentStateDataByKey } from '../../hooks/useAgentState';

0 commit comments

Comments
 (0)