@lobehub/chat 0.154.6 → 0.155.0

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 (42) hide show
  1. package/CHANGELOG.md +50 -0
  2. package/locales/ar/common.json +6 -0
  3. package/locales/bg-BG/common.json +6 -0
  4. package/locales/de-DE/common.json +6 -0
  5. package/locales/en-US/common.json +6 -0
  6. package/locales/es-ES/common.json +6 -0
  7. package/locales/fr-FR/common.json +6 -0
  8. package/locales/it-IT/common.json +6 -0
  9. package/locales/ja-JP/common.json +6 -0
  10. package/locales/ko-KR/common.json +6 -0
  11. package/locales/nl-NL/common.json +6 -0
  12. package/locales/pl-PL/common.json +6 -0
  13. package/locales/pt-BR/common.json +6 -0
  14. package/locales/ru-RU/common.json +6 -0
  15. package/locales/tr-TR/common.json +6 -0
  16. package/locales/vi-VN/common.json +6 -0
  17. package/locales/zh-CN/common.json +6 -0
  18. package/locales/zh-TW/common.json +6 -0
  19. package/package.json +1 -1
  20. package/src/app/(main)/(mobile)/me/features/AvatarBanner.tsx +2 -3
  21. package/src/app/(main)/(mobile)/me/loading.tsx +19 -2
  22. package/src/app/(main)/(mobile)/me/page.tsx +6 -1
  23. package/src/database/client/models/topic.ts +4 -0
  24. package/src/features/Conversation/Error/APIKeyForm/index.tsx +1 -1
  25. package/src/features/Conversation/Error/AccessCodeForm.tsx +1 -1
  26. package/src/features/Conversation/Error/ClerkLogin/index.tsx +1 -1
  27. package/src/features/Conversation/Error/OAuthForm.tsx +1 -1
  28. package/src/features/Conversation/Error/PluginSettings.tsx +1 -1
  29. package/src/features/User/DataStatistics.tsx +153 -0
  30. package/src/features/User/UserPanel/PanelContent.tsx +2 -0
  31. package/src/locales/default/common.ts +6 -1
  32. package/src/services/message/client.ts +9 -0
  33. package/src/services/session/client.ts +1 -0
  34. package/src/services/topic/client.test.ts +28 -0
  35. package/src/services/topic/client.ts +4 -0
  36. package/src/store/chat/slices/enchance/action.ts +4 -4
  37. package/src/store/chat/slices/message/action.test.ts +56 -39
  38. package/src/store/chat/slices/message/action.ts +66 -66
  39. package/src/store/chat/slices/plugin/action.test.ts +26 -26
  40. package/src/store/chat/slices/plugin/action.ts +14 -14
  41. package/src/store/chat/slices/tool/action.test.ts +3 -3
  42. package/src/store/chat/slices/tool/action.ts +1 -1
@@ -60,7 +60,7 @@ describe('chatToolSlice', () => {
60
60
  draft[0].previewUrl = 'new-url';
61
61
  draft[0].imageId = 'new-id';
62
62
  };
63
- vi.spyOn(result.current, 'internalUpdateMessageContent');
63
+ vi.spyOn(result.current, 'internal_updateMessageContent');
64
64
 
65
65
  // 模拟 getMessageById 返回消息内容
66
66
  vi.spyOn(chatSelectors, 'getMessageById').mockImplementationOnce(
@@ -75,8 +75,8 @@ describe('chatToolSlice', () => {
75
75
  await result.current.updateImageItem(messageId, updateFunction);
76
76
  });
77
77
 
78
- // 验证 internalUpdateMessageContent 是否被正确调用以更新内容
79
- expect(result.current.internalUpdateMessageContent).toHaveBeenCalledWith(
78
+ // 验证 internal_updateMessageContent 是否被正确调用以更新内容
79
+ expect(result.current.internal_updateMessageContent).toHaveBeenCalledWith(
80
80
  messageId,
81
81
  JSON.stringify([{ prompt: 'test prompt', previewUrl: 'new-url', imageId: 'new-id' }]),
82
82
  );
@@ -81,6 +81,6 @@ export const chatToolSlice: StateCreator<
81
81
  const data: DallEImageItem[] = JSON.parse(message.content);
82
82
 
83
83
  const nextContent = produce(data, updater);
84
- await get().internalUpdateMessageContent(id, JSON.stringify(nextContent));
84
+ await get().internal_updateMessageContent(id, JSON.stringify(nextContent));
85
85
  },
86
86
  });