@lobehub/chat 1.32.3 → 1.32.5
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/CHANGELOG.md +50 -0
- package/README.md +8 -8
- package/README.zh-CN.md +8 -8
- package/locales/ar/models.json +12 -0
- package/locales/ar/providers.json +3 -0
- package/locales/bg-BG/models.json +12 -0
- package/locales/bg-BG/providers.json +3 -0
- package/locales/de-DE/models.json +12 -0
- package/locales/de-DE/providers.json +3 -0
- package/locales/en-US/models.json +12 -0
- package/locales/en-US/providers.json +3 -0
- package/locales/es-ES/models.json +12 -0
- package/locales/es-ES/providers.json +3 -0
- package/locales/fa-IR/models.json +12 -0
- package/locales/fa-IR/providers.json +3 -0
- package/locales/fr-FR/models.json +12 -0
- package/locales/fr-FR/providers.json +3 -0
- package/locales/it-IT/models.json +12 -0
- package/locales/it-IT/providers.json +3 -0
- package/locales/ja-JP/models.json +12 -0
- package/locales/ja-JP/providers.json +3 -0
- package/locales/ko-KR/models.json +12 -0
- package/locales/ko-KR/providers.json +3 -0
- package/locales/nl-NL/models.json +12 -0
- package/locales/nl-NL/providers.json +3 -0
- package/locales/pl-PL/models.json +12 -0
- package/locales/pl-PL/providers.json +3 -0
- package/locales/pt-BR/models.json +12 -0
- package/locales/pt-BR/providers.json +3 -0
- package/locales/ru-RU/models.json +12 -0
- package/locales/ru-RU/providers.json +3 -0
- package/locales/tr-TR/models.json +12 -0
- package/locales/tr-TR/providers.json +3 -0
- package/locales/vi-VN/models.json +12 -0
- package/locales/vi-VN/providers.json +3 -0
- package/locales/zh-CN/models.json +12 -0
- package/locales/zh-CN/providers.json +3 -0
- package/locales/zh-TW/models.json +12 -0
- package/locales/zh-TW/providers.json +3 -0
- package/package.json +2 -2
- package/src/app/(main)/chat/(workspace)/@conversation/features/ChatList/ChatItem/index.tsx +39 -0
- package/src/app/(main)/chat/(workspace)/@conversation/features/ChatList/Content.tsx +20 -14
- package/src/app/(main)/chat/(workspace)/@conversation/features/ChatList/WelcomeChatItem/WelcomeMessage.tsx +44 -0
- package/src/app/(main)/chat/(workspace)/@conversation/features/ChatList/WelcomeChatItem/index.tsx +17 -0
- package/src/app/(main)/chat/(workspace)/@portal/features/Header.tsx +1 -13
- package/src/app/metadata.ts +2 -1
- package/src/components/BrandWatermark/index.tsx +1 -0
- package/src/const/message.ts +1 -1
- package/src/features/Conversation/components/ChatItem/ActionsBar.tsx +9 -13
- package/src/features/Conversation/components/ChatItem/index.tsx +183 -209
- package/src/features/Conversation/components/VirtualizedList/index.tsx +75 -84
- package/src/features/Conversation/index.ts +0 -1
- package/src/features/Portal/Artifacts/index.ts +1 -1
- package/src/features/Portal/FilePreview/index.ts +1 -1
- package/src/features/Portal/Home/{Header.tsx → Title.tsx} +2 -2
- package/src/features/Portal/Home/index.ts +1 -1
- package/src/features/Portal/MessageDetail/index.ts +1 -1
- package/src/features/Portal/Plugins/index.ts +1 -1
- package/src/features/Portal/components/Header.tsx +29 -0
- package/src/features/Portal/router.tsx +22 -3
- package/src/features/Portal/type.ts +3 -1
- package/src/features/{Conversation/components → ShareModal/ShareImage}/ChatList/index.tsx +3 -4
- package/src/features/ShareModal/ShareImage/Preview.tsx +1 -1
- package/src/features/ShareModal/ShareJSON/index.tsx +1 -1
- package/src/features/ShareModal/ShareText/index.tsx +1 -1
- package/src/layout/GlobalProvider/Debug.tsx +15 -0
- package/src/layout/GlobalProvider/index.tsx +4 -2
- package/src/locales/resources.ts +5 -2
- package/src/server/ld.ts +2 -2
- package/src/store/chat/slices/aiChat/actions/generateAIChat.ts +5 -5
- package/src/store/chat/slices/message/action.ts +2 -2
- package/src/store/chat/slices/message/selectors.test.ts +0 -86
- package/src/store/chat/slices/message/selectors.ts +55 -73
- package/src/store/chat/slices/plugin/action.test.ts +2 -2
- package/src/store/chat/slices/plugin/action.ts +1 -1
- package/src/store/chat/slices/topic/action.ts +2 -2
- /package/src/{features/Conversation/components → app/(main)/chat/(workspace)/@conversation/features/ChatList/WelcomeChatItem}/InboxWelcome/AgentsSuggest.tsx +0 -0
- /package/src/{features/Conversation/components → app/(main)/chat/(workspace)/@conversation/features/ChatList/WelcomeChatItem}/InboxWelcome/QuestionSuggest.tsx +0 -0
- /package/src/{features/Conversation/components → app/(main)/chat/(workspace)/@conversation/features/ChatList/WelcomeChatItem}/InboxWelcome/index.tsx +0 -0
@@ -149,7 +149,7 @@ describe('ChatPluginAction', () => {
|
|
149
149
|
it('should update message content and trigger the ai message', async () => {
|
150
150
|
// 设置模拟函数的返回值
|
151
151
|
const mockCurrentChats: any[] = [];
|
152
|
-
vi.spyOn(chatSelectors, '
|
152
|
+
vi.spyOn(chatSelectors, 'activeBaseChats').mockReturnValue(mockCurrentChats);
|
153
153
|
|
154
154
|
// 设置初始状态
|
155
155
|
const initialState = {
|
@@ -184,7 +184,7 @@ describe('ChatPluginAction', () => {
|
|
184
184
|
it('should update message content and not trigger ai message', async () => {
|
185
185
|
// 设置模拟函数的返回值
|
186
186
|
const mockCurrentChats: any[] = [];
|
187
|
-
vi.spyOn(chatSelectors, '
|
187
|
+
vi.spyOn(chatSelectors, 'activeBaseChats').mockReturnValue(mockCurrentChats);
|
188
188
|
|
189
189
|
// 设置初始状态
|
190
190
|
const initialState = {
|
@@ -202,7 +202,7 @@ export const chatPlugin: StateCreator<
|
|
202
202
|
|
203
203
|
triggerAIMessage: async ({ parentId, traceId }) => {
|
204
204
|
const { internal_coreProcessMessage } = get();
|
205
|
-
const chats = chatSelectors.
|
205
|
+
const chats = chatSelectors.activeBaseChats(get());
|
206
206
|
await internal_coreProcessMessage(chats, parentId ?? chats.at(-1)!.id, { traceId });
|
207
207
|
},
|
208
208
|
|
@@ -79,7 +79,7 @@ export const chatTopic: StateCreator<
|
|
79
79
|
createTopic: async () => {
|
80
80
|
const { activeId, internal_createTopic } = get();
|
81
81
|
|
82
|
-
const messages = chatSelectors.
|
82
|
+
const messages = chatSelectors.activeBaseChats(get());
|
83
83
|
|
84
84
|
set({ creatingTopic: true }, false, n('creatingTopic/start'));
|
85
85
|
const topicId = await internal_createTopic({
|
@@ -94,7 +94,7 @@ export const chatTopic: StateCreator<
|
|
94
94
|
|
95
95
|
saveToTopic: async () => {
|
96
96
|
// if there is no message, stop
|
97
|
-
const messages = chatSelectors.
|
97
|
+
const messages = chatSelectors.activeBaseChats(get());
|
98
98
|
if (messages.length === 0) return;
|
99
99
|
|
100
100
|
const { activeId, summaryTopicTitle, internal_createTopic } = get();
|
File without changes
|
File without changes
|