@lobehub/lobehub 2.0.0-next.96 → 2.0.0-next.98
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/.console-log-whitelist.json +14 -0
- package/.github/workflows/check-console-log.yml +117 -0
- package/.github/workflows/desktop-pr-build.yml +4 -4
- package/.github/workflows/release-desktop-beta.yml +4 -4
- package/.github/workflows/release.yml +1 -1
- package/.github/workflows/test.yml +5 -5
- package/CHANGELOG.md +66 -0
- package/apps/desktop/src/preload/index.ts +2 -2
- package/apps/desktop/src/preload/invoke.ts +1 -1
- package/apps/desktop/src/preload/routeInterceptor.ts +41 -41
- package/changelog/v1.json +21 -0
- package/docs/development/database-schema.dbml +1 -0
- package/e2e/package.json +1 -1
- package/locales/ar/file.json +9 -11
- package/locales/ar/models.json +6 -0
- package/locales/bg-BG/file.json +8 -10
- package/locales/bg-BG/models.json +6 -0
- package/locales/de-DE/file.json +9 -11
- package/locales/de-DE/models.json +6 -0
- package/locales/en-US/file.json +12 -14
- package/locales/en-US/models.json +6 -0
- package/locales/es-ES/file.json +7 -9
- package/locales/es-ES/models.json +6 -0
- package/locales/fa-IR/file.json +9 -11
- package/locales/fa-IR/models.json +6 -0
- package/locales/fr-FR/file.json +6 -8
- package/locales/fr-FR/models.json +6 -0
- package/locales/it-IT/file.json +8 -10
- package/locales/it-IT/models.json +6 -0
- package/locales/ja-JP/file.json +10 -12
- package/locales/ja-JP/models.json +6 -0
- package/locales/ko-KR/file.json +8 -10
- package/locales/ko-KR/models.json +6 -0
- package/locales/nl-NL/file.json +8 -10
- package/locales/nl-NL/models.json +6 -0
- package/locales/pl-PL/file.json +7 -9
- package/locales/pl-PL/models.json +6 -0
- package/locales/pt-BR/file.json +7 -9
- package/locales/pt-BR/models.json +6 -0
- package/locales/ru-RU/file.json +9 -11
- package/locales/ru-RU/models.json +6 -0
- package/locales/tr-TR/file.json +8 -10
- package/locales/tr-TR/models.json +6 -0
- package/locales/vi-VN/file.json +9 -11
- package/locales/vi-VN/models.json +6 -0
- package/locales/zh-CN/file.json +10 -12
- package/locales/zh-CN/models.json +6 -0
- package/locales/zh-TW/file.json +10 -12
- package/locales/zh-TW/models.json +6 -0
- package/package.json +3 -2
- package/packages/database/migrations/0047_add_slug_document.sql +6 -0
- package/packages/database/migrations/meta/0047_snapshot.json +7891 -0
- package/packages/database/migrations/meta/_journal.json +7 -0
- package/packages/database/src/client/db.ts +12 -12
- package/packages/database/src/core/migrations.json +16 -7
- package/packages/database/src/models/document.ts +2 -2
- package/packages/database/src/repositories/dataImporter/index.ts +10 -10
- package/packages/database/src/schemas/file.ts +7 -1
- package/packages/database/src/schemas/topic.ts +1 -1
- package/packages/database/src/server/models/ragEval/evaluation.ts +1 -1
- package/packages/model-bank/src/aiModels/qwen.ts +5 -3
- package/packages/model-runtime/src/core/openaiCompatibleFactory/index.ts +21 -21
- package/packages/obervability-otel/package.json +2 -2
- package/scripts/checkConsoleLog.mts +148 -0
- package/scripts/prebuild.mts +5 -5
- package/src/app/[variants]/(main)/changelog/index.tsx +1 -1
- package/src/app/[variants]/(main)/chat/components/conversation/features/ChatInput/Desktop/ClassicChat.tsx +1 -1
- package/src/app/[variants]/(main)/chat/components/conversation/features/ChatInput/Desktop/GroupChat.tsx +1 -1
- package/src/app/[variants]/(main)/chat/components/conversation/features/ChatList/ChatItem/index.tsx +1 -1
- package/src/app/[variants]/(main)/chat/components/conversation/features/ChatList/Content.tsx +2 -2
- package/src/app/[variants]/(main)/chat/components/conversation/features/ChatList/index.tsx +1 -1
- package/src/app/[variants]/(main)/chat/components/conversation/features/ChatMinimap/index.tsx +1 -1
- package/src/app/[variants]/(main)/settings/_layout/Desktop/index.tsx +20 -16
- package/src/app/[variants]/(main)/settings/provider/(list)/ProviderGrid/Card.tsx +6 -3
- package/src/app/[variants]/(main)/settings/provider/(list)/index.tsx +3 -2
- package/src/app/[variants]/(main)/settings/provider/detail/index.tsx +14 -4
- package/src/app/[variants]/desktopRouter.config.tsx +23 -0
- package/src/app/[variants]/mobileRouter.config.tsx +23 -0
- package/src/components/InvalidAPIKey/APIKeyForm/Bedrock.tsx +1 -1
- package/src/components/InvalidAPIKey/APIKeyForm/ComfyUIForm.tsx +1 -1
- package/src/components/InvalidAPIKey/APIKeyForm/ProviderApiKeyForm.tsx +1 -1
- package/src/components/InvalidAPIKey/APIKeyForm/__tests__/ComfyUIForm.test.tsx +1 -1
- package/src/components/InvalidAPIKey/index.tsx +1 -1
- package/src/features/{Conversation → ChatList}/MarkdownElements/remarkPlugins/getNodeContent.test.ts +1 -2
- package/src/features/{Conversation → ChatList}/Messages/Assistant/Actions/index.tsx +2 -2
- package/src/features/{Conversation → ChatList}/Messages/Assistant/Extra/index.test.tsx +3 -3
- package/src/features/{Conversation → ChatList}/Messages/Assistant/Extra/index.tsx +6 -5
- package/src/features/{Conversation → ChatList}/Messages/Assistant/MessageContent.tsx +1 -1
- package/src/features/{Conversation → ChatList}/Messages/Group/Actions/WithContentId.tsx +2 -2
- package/src/features/{Conversation → ChatList}/Messages/Group/ContentBlock.tsx +2 -2
- package/src/features/{Conversation → ChatList}/Messages/Group/Error/index.tsx +2 -1
- package/src/features/{Conversation → ChatList}/Messages/Group/Group.tsx +1 -1
- package/src/features/{Conversation → ChatList}/Messages/Group/GroupItem.tsx +3 -2
- package/src/features/{Conversation → ChatList}/Messages/Group/Tool/Render/Intervention/ApprovalActions.tsx +1 -1
- package/src/features/{Conversation → ChatList}/Messages/Group/Tool/Render/index.tsx +1 -2
- package/src/features/{Conversation → ChatList}/Messages/Group/index.tsx +1 -1
- package/src/features/{Conversation → ChatList}/Messages/User/Extra.tsx +3 -3
- package/src/features/{Conversation → ChatList}/Messages/User/index.tsx +1 -1
- package/src/features/{Conversation → ChatList}/Messages/index.tsx +1 -1
- package/src/features/{Conversation → ChatList}/components/ShareMessageModal/ShareImage/Preview.tsx +1 -1
- package/src/features/{Conversation → ChatList}/components/SkeletonList.tsx +1 -1
- package/src/features/{Conversation → ChatList}/components/VirtualizedList/index.tsx +1 -1
- package/src/features/KnowledgeManager/DocumentExplorer/NoteEditorModal.tsx +0 -20
- package/src/features/KnowledgeManager/DocumentExplorer/index.tsx +3 -3
- package/src/features/KnowledgeManager/FileExplorer/MasonryFileItem/index.tsx +0 -20
- package/src/features/KnowledgeManager/Header/AddButton.tsx +0 -1
- package/src/features/KnowledgeManager/Header/NewNoteButton.tsx +1 -1
- package/src/features/KnowledgeManager/Header/TogglePanelButton.tsx +2 -2
- package/src/features/KnowledgeManager/Home/UploadEntries.tsx +2 -2
- package/src/features/KnowledgeManager/Home/index.tsx +4 -4
- package/src/features/OllamaSetupGuide/index.tsx +1 -1
- package/src/features/PluginsUI/Render/MCPType/index.tsx +1 -1
- package/src/features/Portal/GroupThread/Body/ThreadChatItem.tsx +1 -1
- package/src/features/Portal/GroupThread/Body/ThreadChatList.tsx +1 -1
- package/src/features/Portal/Thread/Chat/ChatInput/index.tsx +1 -1
- package/src/features/Portal/Thread/Chat/ChatItem.tsx +1 -1
- package/src/features/Portal/Thread/Chat/ChatList.tsx +1 -1
- package/src/features/Portal/Thread/Chat/index.tsx +1 -1
- package/src/features/ShareModal/ShareImage/ChatList/index.tsx +1 -1
- package/src/features/User/UserPanel/useMenu.tsx +7 -3
- package/src/locales/default/file.ts +11 -13
- package/src/services/debug.ts +4 -4
- package/src/services/electron/remoteServer.ts +5 -5
- package/src/services/electron/settings.ts +6 -6
- package/src/services/mcp.ts +18 -18
- package/src/services/models.ts +20 -20
- package/src/store/chat/agents/__tests__/createAgentExecutors/helpers/testExecutor.ts +1 -4
- /package/src/features/{Conversation → ChatList}/Error/AccessCodeForm.tsx +0 -0
- /package/src/features/{Conversation → ChatList}/Error/ChatInvalidApiKey.tsx +0 -0
- /package/src/features/{Conversation → ChatList}/Error/ClerkLogin/index.tsx +0 -0
- /package/src/features/{Conversation → ChatList}/Error/ErrorJsonViewer.tsx +0 -0
- /package/src/features/{Conversation → ChatList}/Error/OAuthForm.tsx +0 -0
- /package/src/features/{Conversation → ChatList}/Error/OllamaBizError/InvalidOllamaModel.tsx +0 -0
- /package/src/features/{Conversation → ChatList}/Error/OllamaBizError/index.tsx +0 -0
- /package/src/features/{Conversation → ChatList}/Error/index.tsx +0 -0
- /package/src/features/{Conversation → ChatList}/Error/style.tsx +0 -0
- /package/src/features/{Conversation → ChatList}/MarkdownElements/LobeArtifact/Render/Icon.tsx +0 -0
- /package/src/features/{Conversation → ChatList}/MarkdownElements/LobeArtifact/Render/index.tsx +0 -0
- /package/src/features/{Conversation → ChatList}/MarkdownElements/LobeArtifact/index.ts +0 -0
- /package/src/features/{Conversation → ChatList}/MarkdownElements/LobeArtifact/rehypePlugin.test.ts +0 -0
- /package/src/features/{Conversation → ChatList}/MarkdownElements/LobeArtifact/rehypePlugin.ts +0 -0
- /package/src/features/{Conversation → ChatList}/MarkdownElements/LobeThinking/Render.tsx +0 -0
- /package/src/features/{Conversation → ChatList}/MarkdownElements/LobeThinking/index.ts +0 -0
- /package/src/features/{Conversation → ChatList}/MarkdownElements/LocalFile/Render/index.tsx +0 -0
- /package/src/features/{Conversation → ChatList}/MarkdownElements/LocalFile/index.ts +0 -0
- /package/src/features/{Conversation → ChatList}/MarkdownElements/Mention/Render.tsx +0 -0
- /package/src/features/{Conversation → ChatList}/MarkdownElements/Mention/index.ts +0 -0
- /package/src/features/{Conversation → ChatList}/MarkdownElements/Thinking/Render.tsx +0 -0
- /package/src/features/{Conversation → ChatList}/MarkdownElements/Thinking/index.ts +0 -0
- /package/src/features/{Conversation → ChatList}/MarkdownElements/index.ts +0 -0
- /package/src/features/{Conversation → ChatList}/MarkdownElements/remarkPlugins/__snapshots__/createRemarkSelfClosingTagPlugin.test.ts.snap +0 -0
- /package/src/features/{Conversation → ChatList}/MarkdownElements/remarkPlugins/createRemarkCustomTagPlugin.ts +0 -0
- /package/src/features/{Conversation → ChatList}/MarkdownElements/remarkPlugins/createRemarkCustomTagWithAttributesPlugin.ts +0 -0
- /package/src/features/{Conversation → ChatList}/MarkdownElements/remarkPlugins/createRemarkSelfClosingTagPlugin.test.ts +0 -0
- /package/src/features/{Conversation → ChatList}/MarkdownElements/remarkPlugins/createRemarkSelfClosingTagPlugin.ts +0 -0
- /package/src/features/{Conversation → ChatList}/MarkdownElements/remarkPlugins/getNodeContent.ts +0 -0
- /package/src/features/{Conversation → ChatList}/MarkdownElements/type.ts +0 -0
- /package/src/features/{Conversation → ChatList}/MarkdownElements/utils.ts +0 -0
- /package/src/features/{Conversation → ChatList}/Messages/Assistant/Actions/Error.tsx +0 -0
- /package/src/features/{Conversation → ChatList}/Messages/Assistant/CollapsedMessage.tsx +0 -0
- /package/src/features/{Conversation → ChatList}/Messages/Assistant/FileChunks/Item/index.tsx +0 -0
- /package/src/features/{Conversation → ChatList}/Messages/Assistant/FileChunks/Item/style.ts +0 -0
- /package/src/features/{Conversation → ChatList}/Messages/Assistant/FileChunks/index.tsx +0 -0
- /package/src/features/{Conversation → ChatList}/Messages/Assistant/IntentUnderstanding.tsx +0 -0
- /package/src/features/{Conversation → ChatList}/Messages/Assistant/Reasoning/index.tsx +0 -0
- /package/src/features/{Conversation → ChatList}/Messages/Assistant/SearchGrounding.tsx +0 -0
- /package/src/features/{Conversation → ChatList}/Messages/Assistant/index.tsx +0 -0
- /package/src/features/{Conversation → ChatList}/Messages/Default.tsx +0 -0
- /package/src/features/{Conversation → ChatList}/Messages/Group/Actions/WithoutContentId.tsx +0 -0
- /package/src/features/{Conversation → ChatList}/Messages/Group/Actions/index.tsx +0 -0
- /package/src/features/{Conversation → ChatList}/Messages/Group/CollapsedMessage.tsx +0 -0
- /package/src/features/{Conversation → ChatList}/Messages/Group/EditState.tsx +0 -0
- /package/src/features/{Conversation → ChatList}/Messages/Group/GroupContext.ts +0 -0
- /package/src/features/{Conversation → ChatList}/Messages/Group/MessageContent.tsx +0 -0
- /package/src/features/{Conversation → ChatList}/Messages/Group/Tool/Inspector/BuiltinPluginTitle.tsx +0 -0
- /package/src/features/{Conversation → ChatList}/Messages/Group/Tool/Inspector/Debug.tsx +0 -0
- /package/src/features/{Conversation → ChatList}/Messages/Group/Tool/Inspector/PluginResult.tsx +0 -0
- /package/src/features/{Conversation → ChatList}/Messages/Group/Tool/Inspector/PluginState.tsx +0 -0
- /package/src/features/{Conversation → ChatList}/Messages/Group/Tool/Inspector/Settings.tsx +0 -0
- /package/src/features/{Conversation → ChatList}/Messages/Group/Tool/Inspector/StatusIndicator.tsx +0 -0
- /package/src/features/{Conversation → ChatList}/Messages/Group/Tool/Inspector/ToolTitle.tsx +0 -0
- /package/src/features/{Conversation → ChatList}/Messages/Group/Tool/Inspector/index.tsx +0 -0
- /package/src/features/{Conversation → ChatList}/Messages/Group/Tool/Render/AbortResponse.tsx +0 -0
- /package/src/features/{Conversation → ChatList}/Messages/Group/Tool/Render/Arguments/ObjectEntity.tsx +0 -0
- /package/src/features/{Conversation → ChatList}/Messages/Group/Tool/Render/Arguments/ValueCell.tsx +0 -0
- /package/src/features/{Conversation → ChatList}/Messages/Group/Tool/Render/Arguments/index.tsx +0 -0
- /package/src/features/{Conversation → ChatList}/Messages/Group/Tool/Render/CustomRender.tsx +0 -0
- /package/src/features/{Conversation → ChatList}/Messages/Group/Tool/Render/ErrorResponse.tsx +0 -0
- /package/src/features/{Conversation → ChatList}/Messages/Group/Tool/Render/Intervention/Fallback.tsx +0 -0
- /package/src/features/{Conversation → ChatList}/Messages/Group/Tool/Render/Intervention/KeyValueEditor.tsx +0 -0
- /package/src/features/{Conversation → ChatList}/Messages/Group/Tool/Render/Intervention/ModeSelector.tsx +0 -0
- /package/src/features/{Conversation → ChatList}/Messages/Group/Tool/Render/Intervention/index.tsx +0 -0
- /package/src/features/{Conversation → ChatList}/Messages/Group/Tool/Render/LoadingPlaceholder/index.tsx +0 -0
- /package/src/features/{Conversation → ChatList}/Messages/Group/Tool/Render/PluginSettings.tsx +0 -0
- /package/src/features/{Conversation → ChatList}/Messages/Group/Tool/Render/RejectedResponse.tsx +0 -0
- /package/src/features/{Conversation → ChatList}/Messages/Group/Tool/index.tsx +0 -0
- /package/src/features/{Conversation → ChatList}/Messages/Group/Tools.tsx +0 -0
- /package/src/features/{Conversation → ChatList}/Messages/Supervisor/TodoList.tsx +0 -0
- /package/src/features/{Conversation → ChatList}/Messages/Supervisor/index.tsx +0 -0
- /package/src/features/{Conversation → ChatList}/Messages/Tool/Inspector/BuiltinPluginTitle.tsx +0 -0
- /package/src/features/{Conversation → ChatList}/Messages/Tool/Inspector/Debug.tsx +0 -0
- /package/src/features/{Conversation → ChatList}/Messages/Tool/Inspector/PluginResult.tsx +0 -0
- /package/src/features/{Conversation → ChatList}/Messages/Tool/Inspector/PluginState.tsx +0 -0
- /package/src/features/{Conversation → ChatList}/Messages/Tool/Inspector/Settings.tsx +0 -0
- /package/src/features/{Conversation → ChatList}/Messages/Tool/Inspector/ToolTitle.tsx +0 -0
- /package/src/features/{Conversation → ChatList}/Messages/Tool/Inspector/index.tsx +0 -0
- /package/src/features/{Conversation → ChatList}/Messages/Tool/Render/Arguments/ObjectEntity.tsx +0 -0
- /package/src/features/{Conversation → ChatList}/Messages/Tool/Render/Arguments/ValueCell.tsx +0 -0
- /package/src/features/{Conversation → ChatList}/Messages/Tool/Render/Arguments/index.tsx +0 -0
- /package/src/features/{Conversation → ChatList}/Messages/Tool/Render/CustomRender.tsx +0 -0
- /package/src/features/{Conversation → ChatList}/Messages/Tool/Render/ErrorResponse.tsx +0 -0
- /package/src/features/{Conversation → ChatList}/Messages/Tool/Render/KeyValueEditor.tsx +0 -0
- /package/src/features/{Conversation → ChatList}/Messages/Tool/Render/PluginSettings.tsx +0 -0
- /package/src/features/{Conversation → ChatList}/Messages/Tool/Render/index.tsx +0 -0
- /package/src/features/{Conversation → ChatList}/Messages/Tool/ToolItem.tsx +0 -0
- /package/src/features/{Conversation → ChatList}/Messages/Tool/index.tsx +0 -0
- /package/src/features/{Conversation → ChatList}/Messages/User/Actions/ActionsBar.tsx +0 -0
- /package/src/features/{Conversation → ChatList}/Messages/User/Actions/MessageBranch.tsx +0 -0
- /package/src/features/{Conversation → ChatList}/Messages/User/Actions/index.tsx +0 -0
- /package/src/features/{Conversation → ChatList}/Messages/User/BelowMessage.tsx +0 -0
- /package/src/features/{Conversation → ChatList}/Messages/User/FileListViewer/Item.tsx +0 -0
- /package/src/features/{Conversation → ChatList}/Messages/User/FileListViewer/index.tsx +0 -0
- /package/src/features/{Conversation → ChatList}/Messages/User/ImageFileListViewer.tsx +0 -0
- /package/src/features/{Conversation → ChatList}/Messages/User/MarkdownRender/ContentPreview.tsx +0 -0
- /package/src/features/{Conversation → ChatList}/Messages/User/MarkdownRender/index.tsx +0 -0
- /package/src/features/{Conversation → ChatList}/Messages/User/MessageContent.tsx +0 -0
- /package/src/features/{Conversation → ChatList}/Messages/User/VideoFileListViewer.tsx +0 -0
- /package/src/features/{Conversation → ChatList}/components/AutoScroll.tsx +0 -0
- /package/src/features/{Conversation → ChatList}/components/BackBottom/index.tsx +0 -0
- /package/src/features/{Conversation → ChatList}/components/BackBottom/style.ts +0 -0
- /package/src/features/{Conversation → ChatList}/components/ChatItem/ShareMessageModal/SharePdf/PdfPreview.tsx +0 -0
- /package/src/features/{Conversation → ChatList}/components/ChatItem/ShareMessageModal/SharePdf/index.tsx +0 -0
- /package/src/features/{Conversation → ChatList}/components/ChatItem/ShareMessageModal/SharePdf/style.ts +0 -0
- /package/src/features/{Conversation → ChatList}/components/ChatItem/ShareMessageModal/SharePdf/template.ts +0 -0
- /package/src/features/{Conversation → ChatList}/components/ChatItem/ShareMessageModal/SharePdf/usePdfGeneration.ts +0 -0
- /package/src/features/{Conversation → ChatList}/components/Extras/ExtraContainer.tsx +0 -0
- /package/src/features/{Conversation → ChatList}/components/Extras/TTS/FilePlayer.tsx +0 -0
- /package/src/features/{Conversation → ChatList}/components/Extras/TTS/InitPlayer.tsx +0 -0
- /package/src/features/{Conversation → ChatList}/components/Extras/TTS/Player.tsx +0 -0
- /package/src/features/{Conversation → ChatList}/components/Extras/TTS/index.tsx +0 -0
- /package/src/features/{Conversation → ChatList}/components/Extras/Translate.tsx +0 -0
- /package/src/features/{Conversation → ChatList}/components/Extras/Usage/UsageDetail/AnimatedNumber.tsx +0 -0
- /package/src/features/{Conversation → ChatList}/components/Extras/Usage/UsageDetail/ModelCard.tsx +0 -0
- /package/src/features/{Conversation → ChatList}/components/Extras/Usage/UsageDetail/TokenProgress.tsx +0 -0
- /package/src/features/{Conversation → ChatList}/components/Extras/Usage/UsageDetail/index.tsx +0 -0
- /package/src/features/{Conversation → ChatList}/components/Extras/Usage/UsageDetail/pricing.ts +0 -0
- /package/src/features/{Conversation → ChatList}/components/Extras/Usage/UsageDetail/tokens.test.ts +0 -0
- /package/src/features/{Conversation → ChatList}/components/Extras/Usage/UsageDetail/tokens.ts +0 -0
- /package/src/features/{Conversation → ChatList}/components/Extras/Usage/index.tsx +0 -0
- /package/src/features/{Conversation → ChatList}/components/History/HistoryDivider.tsx +0 -0
- /package/src/features/{Conversation → ChatList}/components/History/index.tsx +0 -0
- /package/src/features/{Conversation → ChatList}/components/OTPInput.tsx +0 -0
- /package/src/features/{Conversation → ChatList}/components/ShareMessageModal/ShareImage/index.tsx +0 -0
- /package/src/features/{Conversation → ChatList}/components/ShareMessageModal/ShareImage/style.ts +0 -0
- /package/src/features/{Conversation → ChatList}/components/ShareMessageModal/ShareImage/type.ts +0 -0
- /package/src/features/{Conversation → ChatList}/components/ShareMessageModal/ShareText/Preview.tsx +0 -0
- /package/src/features/{Conversation → ChatList}/components/ShareMessageModal/ShareText/index.tsx +0 -0
- /package/src/features/{Conversation → ChatList}/components/ShareMessageModal/ShareText/template.test.ts +0 -0
- /package/src/features/{Conversation → ChatList}/components/ShareMessageModal/ShareText/template.ts +0 -0
- /package/src/features/{Conversation → ChatList}/components/ShareMessageModal/ShareText/type.ts +0 -0
- /package/src/features/{Conversation → ChatList}/components/ShareMessageModal/index.tsx +0 -0
- /package/src/features/{Conversation → ChatList}/components/ShareMessageModal/style.ts +0 -0
- /package/src/features/{Conversation → ChatList}/components/ThreadDivider/index.tsx +0 -0
- /package/src/features/{Conversation → ChatList}/components/VirtualizedList/VirtuosoContext.ts +0 -0
- /package/src/features/{Conversation → ChatList}/components/WideScreenContainer/index.tsx +0 -0
- /package/src/features/{Conversation → ChatList}/context/InPortalThreadContext.ts +0 -0
- /package/src/features/{Conversation → ChatList}/hooks/useChatListActionsBar.tsx +0 -0
- /package/src/features/{Conversation → ChatList}/hooks/useDoubleClickEdit.ts +0 -0
- /package/src/features/{Conversation → ChatList}/index.ts +0 -0
- /package/src/features/{Conversation → ChatList}/types/index.ts +0 -0
- /package/src/features/{Conversation → ChatList}/utils/markdown.test.ts +0 -0
- /package/src/features/{Conversation → ChatList}/utils/markdown.ts +0 -0
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import { useResponsive, useTheme } from 'antd-style';
|
|
4
|
+
import useMergedState from 'rc-util/lib/hooks/useMergedState';
|
|
4
5
|
import { memo, useEffect, useRef } from 'react';
|
|
5
6
|
import { Flexbox } from 'react-layout-kit';
|
|
6
7
|
import { useSearchParams } from 'react-router-dom';
|
|
@@ -13,7 +14,6 @@ import SettingsContent from '../SettingsContent';
|
|
|
13
14
|
import { LayoutProps } from '../type';
|
|
14
15
|
import Header from './Header';
|
|
15
16
|
import SideBar from './SideBar';
|
|
16
|
-
import useMergedState from 'rc-util/lib/hooks/useMergedState';
|
|
17
17
|
|
|
18
18
|
const Layout = memo<LayoutProps>(() => {
|
|
19
19
|
const ref = useRef<HTMLDivElement | null>(null);
|
|
@@ -22,21 +22,23 @@ const Layout = memo<LayoutProps>(() => {
|
|
|
22
22
|
|
|
23
23
|
const [searchParams, setSearchParams] = useSearchParams();
|
|
24
24
|
|
|
25
|
-
const [activeTabState, setActiveTabState] = useMergedState(
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
25
|
+
const [activeTabState, setActiveTabState] = useMergedState(
|
|
26
|
+
{
|
|
27
|
+
active: (searchParams.get('active') as SettingsTabs)
|
|
28
|
+
? (searchParams.get('active') as SettingsTabs)
|
|
29
|
+
: SettingsTabs.Common,
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
onChange: (obj: { active: SettingsTabs; provider?: string }) => {
|
|
33
|
+
if (obj.provider) {
|
|
34
|
+
setSearchParams({ active: obj.active, provider: obj.provider });
|
|
35
|
+
} else {
|
|
36
|
+
searchParams.delete('provider');
|
|
37
|
+
setSearchParams({ active: obj.active });
|
|
38
|
+
}
|
|
39
|
+
},
|
|
38
40
|
},
|
|
39
|
-
|
|
41
|
+
);
|
|
40
42
|
|
|
41
43
|
const setActiveTab = (tab: SettingsTabs) => {
|
|
42
44
|
if (tab === SettingsTabs.Provider) {
|
|
@@ -57,7 +59,9 @@ const Layout = memo<LayoutProps>(() => {
|
|
|
57
59
|
};
|
|
58
60
|
}, []);
|
|
59
61
|
|
|
60
|
-
const category =
|
|
62
|
+
const category = (
|
|
63
|
+
<CategoryContent activeTab={activeTabState.active} onMenuSelect={setActiveTab} />
|
|
64
|
+
);
|
|
61
65
|
|
|
62
66
|
return (
|
|
63
67
|
<Flexbox
|
|
@@ -33,9 +33,12 @@ const ProviderCard = memo<ProviderCardProps>(
|
|
|
33
33
|
return (
|
|
34
34
|
<Flexbox className={cx(styles.container)} gap={24}>
|
|
35
35
|
<Flexbox gap={12} padding={16} width={'100%'}>
|
|
36
|
-
<div
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
<div
|
|
37
|
+
onClick={() => {
|
|
38
|
+
onProviderSelect(id);
|
|
39
|
+
}}
|
|
40
|
+
style={{ cursor: 'pointer' }}
|
|
41
|
+
>
|
|
39
42
|
<Flexbox gap={12} width={'100%'}>
|
|
40
43
|
<Flexbox align={'center'} horizontal justify={'space-between'}>
|
|
41
44
|
{source === 'builtin' ? (
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
+
import { useMemo, useState } from 'react';
|
|
4
|
+
import { useSearchParams } from 'react-router-dom';
|
|
5
|
+
|
|
3
6
|
import { isCustomBranding } from '@/const/version';
|
|
4
7
|
|
|
5
8
|
import DesktopLayout from '../_layout/Desktop';
|
|
6
9
|
import MobileLayout from '../_layout/Mobile';
|
|
7
10
|
import ProviderDetailPage from '../detail';
|
|
8
11
|
import Footer from './Footer';
|
|
9
|
-
import { useMemo, useState } from 'react';
|
|
10
|
-
import { useSearchParams } from 'react-router-dom';
|
|
11
12
|
|
|
12
13
|
const Page = (props: { mobile?: boolean }) => {
|
|
13
14
|
const [SearchParams, setSearchParams] = useSearchParams();
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import dynamic from 'next/dynamic';
|
|
2
|
+
|
|
2
3
|
import Loading from '@/components/Loading/BrandTextLoading';
|
|
3
4
|
|
|
4
5
|
const NewAPI = dynamic(() => import('./newapi'), { loading: () => <Loading />, ssr: false });
|
|
@@ -7,17 +8,26 @@ const VertexAI = dynamic(() => import('./vertexai'), { loading: () => <Loading /
|
|
|
7
8
|
const GitHub = dynamic(() => import('./github'), { loading: () => <Loading />, ssr: false });
|
|
8
9
|
const Ollama = dynamic(() => import('./ollama'), { loading: () => <Loading />, ssr: false });
|
|
9
10
|
const ComfyUI = dynamic(() => import('./comfyui'), { loading: () => <Loading />, ssr: false });
|
|
10
|
-
const Cloudflare = dynamic(() => import('./cloudflare'), {
|
|
11
|
+
const Cloudflare = dynamic(() => import('./cloudflare'), {
|
|
12
|
+
loading: () => <Loading />,
|
|
13
|
+
ssr: false,
|
|
14
|
+
});
|
|
11
15
|
const Bedrock = dynamic(() => import('./bedrock'), { loading: () => <Loading />, ssr: false });
|
|
12
16
|
const AzureAI = dynamic(() => import('./azureai'), { loading: () => <Loading />, ssr: false });
|
|
13
17
|
const Azure = dynamic(() => import('./azure'), { loading: () => <Loading />, ssr: false });
|
|
14
|
-
const ProviderGrid = dynamic(() => import('../(list)/ProviderGrid'), {
|
|
15
|
-
|
|
18
|
+
const ProviderGrid = dynamic(() => import('../(list)/ProviderGrid'), {
|
|
19
|
+
loading: () => <Loading />,
|
|
20
|
+
ssr: false,
|
|
21
|
+
});
|
|
22
|
+
const DefaultPage = dynamic(() => import('./default/ProviderDetialPage'), {
|
|
23
|
+
loading: () => <Loading />,
|
|
24
|
+
ssr: false,
|
|
25
|
+
});
|
|
16
26
|
|
|
17
27
|
type ProviderDetailPageProps = {
|
|
18
28
|
id?: string | null;
|
|
19
29
|
onProviderSelect: (provider: string) => void;
|
|
20
|
-
}
|
|
30
|
+
};
|
|
21
31
|
|
|
22
32
|
const ProviderDetailPage = (props: ProviderDetailPageProps) => {
|
|
23
33
|
const { id, onProviderSelect } = props;
|
|
@@ -40,6 +40,16 @@ const ChatLayout = dynamic(() => import('./(main)/chat/_layout/Desktop'), {
|
|
|
40
40
|
ssr: false,
|
|
41
41
|
});
|
|
42
42
|
|
|
43
|
+
// Changelog components
|
|
44
|
+
const ChangelogPage = dynamic(() => import('./(main)/changelog/index').then((m) => m.DesktopPage), {
|
|
45
|
+
loading: () => <Loading />,
|
|
46
|
+
ssr: false,
|
|
47
|
+
});
|
|
48
|
+
const ChangelogLayout = dynamic(() => import('./(main)/changelog/_layout/Desktop'), {
|
|
49
|
+
loading: () => <Loading />,
|
|
50
|
+
ssr: false,
|
|
51
|
+
});
|
|
52
|
+
|
|
43
53
|
// Discover List components
|
|
44
54
|
const DesktopHomePage = dynamic(
|
|
45
55
|
() => import('./(main)/discover/(list)/(home)/index').then((m) => m.DesktopHomePage),
|
|
@@ -256,6 +266,7 @@ const KnowledgeErrorBoundary = createErrorBoundary('/knowledge');
|
|
|
256
266
|
const SettingsErrorBoundary = createErrorBoundary('/settings');
|
|
257
267
|
const ImageErrorBoundary = createErrorBoundary('/image');
|
|
258
268
|
const ProfileErrorBoundary = createErrorBoundary('/profile');
|
|
269
|
+
const ChangelogErrorBoundary = createErrorBoundary('/changelog');
|
|
259
270
|
const RootErrorBoundary = createErrorBoundary('/chat'); // Root level falls back to chat
|
|
260
271
|
|
|
261
272
|
// Root layout wrapper component
|
|
@@ -455,6 +466,18 @@ export const createDesktopRouter = (locale: Locales) =>
|
|
|
455
466
|
path: 'profile',
|
|
456
467
|
},
|
|
457
468
|
|
|
469
|
+
// changelog routes
|
|
470
|
+
{
|
|
471
|
+
children: [
|
|
472
|
+
{
|
|
473
|
+
element: <ChangelogPage />,
|
|
474
|
+
index: true,
|
|
475
|
+
},
|
|
476
|
+
],
|
|
477
|
+
element: <ChangelogLayout locale={locale} />,
|
|
478
|
+
errorElement: <ChangelogErrorBoundary />,
|
|
479
|
+
path: 'changelog',
|
|
480
|
+
},
|
|
458
481
|
// Default route - redirect to chat
|
|
459
482
|
{
|
|
460
483
|
index: true,
|
|
@@ -41,6 +41,15 @@ const ChatLayout = dynamic(() => import('./(main)/chat/_layout/Mobile'), {
|
|
|
41
41
|
ssr: false,
|
|
42
42
|
});
|
|
43
43
|
|
|
44
|
+
// Changelog components
|
|
45
|
+
const ChangelogPage = dynamic(() => import('./(main)/changelog/index').then((m) => m.MobilePage), {
|
|
46
|
+
loading: () => <Loading />,
|
|
47
|
+
ssr: false,
|
|
48
|
+
});
|
|
49
|
+
const ChangelogLayout = dynamic(() => import('./(main)/changelog/_layout/Mobile'), {
|
|
50
|
+
loading: () => <Loading />,
|
|
51
|
+
ssr: false,
|
|
52
|
+
});
|
|
44
53
|
// Discover List components
|
|
45
54
|
const MobileHomePage = dynamic(
|
|
46
55
|
() => import('./(main)/discover/(list)/(home)/index').then((m) => m.MobileHomePage),
|
|
@@ -272,6 +281,7 @@ const createErrorBoundary = (resetPath: string) => {
|
|
|
272
281
|
// Create error boundaries for each route
|
|
273
282
|
const ChatErrorBoundary = createErrorBoundary('/chat');
|
|
274
283
|
const DiscoverErrorBoundary = createErrorBoundary('/discover');
|
|
284
|
+
const ChangelogErrorBoundary = createErrorBoundary('/changelog');
|
|
275
285
|
const KnowledgeErrorBoundary = createErrorBoundary('/knowledge');
|
|
276
286
|
const SettingsErrorBoundary = createErrorBoundary('/settings');
|
|
277
287
|
const ImageErrorBoundary = createErrorBoundary('/image');
|
|
@@ -499,6 +509,19 @@ export const createMobileRouter = (locale: Locales) =>
|
|
|
499
509
|
path: 'me',
|
|
500
510
|
},
|
|
501
511
|
|
|
512
|
+
// changelog routes
|
|
513
|
+
{
|
|
514
|
+
children: [
|
|
515
|
+
{
|
|
516
|
+
element: <ChangelogPage />,
|
|
517
|
+
index: true,
|
|
518
|
+
},
|
|
519
|
+
],
|
|
520
|
+
element: <ChangelogLayout locale={locale} />,
|
|
521
|
+
errorElement: <ChangelogErrorBoundary />,
|
|
522
|
+
path: 'changelog',
|
|
523
|
+
},
|
|
524
|
+
|
|
502
525
|
// Default route - redirect to chat
|
|
503
526
|
{
|
|
504
527
|
index: true,
|
|
@@ -6,7 +6,7 @@ import { ModelProvider } from 'model-bank';
|
|
|
6
6
|
import { memo, useState } from 'react';
|
|
7
7
|
import { useTranslation } from 'react-i18next';
|
|
8
8
|
|
|
9
|
-
import { FormAction } from '@/features/
|
|
9
|
+
import { FormAction } from '@/features/ChatList/Error/style';
|
|
10
10
|
import { aiProviderSelectors, useAiInfraStore } from '@/store/aiInfra';
|
|
11
11
|
|
|
12
12
|
const BedrockForm = memo<{ description: string }>(({ description }) => {
|
|
@@ -10,7 +10,7 @@ import { Center, Flexbox } from 'react-layout-kit';
|
|
|
10
10
|
|
|
11
11
|
import { FormInput, FormPassword } from '@/components/FormInput';
|
|
12
12
|
import KeyValueEditor from '@/components/KeyValueEditor';
|
|
13
|
-
import { FormAction } from '@/features/
|
|
13
|
+
import { FormAction } from '@/features/ChatList/Error/style';
|
|
14
14
|
import { useAiInfraStore } from '@/store/aiInfra';
|
|
15
15
|
import { ComfyUIKeyVault } from '@/types/user/settings';
|
|
16
16
|
|
|
@@ -4,7 +4,7 @@ import { ReactNode, memo, useContext, useState } from 'react';
|
|
|
4
4
|
import { useTranslation } from 'react-i18next';
|
|
5
5
|
|
|
6
6
|
import { FormInput, FormPassword } from '@/components/FormInput';
|
|
7
|
-
import { FormAction } from '@/features/
|
|
7
|
+
import { FormAction } from '@/features/ChatList/Error/style';
|
|
8
8
|
import { useProviderName } from '@/hooks/useProviderName';
|
|
9
9
|
import { featureFlagsSelectors, useServerConfigStore } from '@/store/serverConfig';
|
|
10
10
|
import { GlobalLLMProviderKey } from '@/types/user/settings';
|
|
@@ -97,7 +97,7 @@ vi.mock('react-layout-kit', () => ({
|
|
|
97
97
|
)),
|
|
98
98
|
}));
|
|
99
99
|
|
|
100
|
-
vi.mock('@/features/
|
|
100
|
+
vi.mock('@/features/ChatList/Error/style', () => ({
|
|
101
101
|
FormAction: vi.fn(({ children, title, description, avatar, ...props }) => (
|
|
102
102
|
<div data-testid="form-action" {...props}>
|
|
103
103
|
<div data-testid="avatar">{avatar}</div>
|
package/src/features/{Conversation → ChatList}/MarkdownElements/remarkPlugins/getNodeContent.test.ts
RENAMED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { toMarkdown } from 'mdast-util-to-markdown';
|
|
2
1
|
import { Parent } from 'unist';
|
|
3
2
|
import { expect } from 'vitest';
|
|
4
3
|
|
|
5
|
-
import { treeNodeToString } from '
|
|
4
|
+
import { treeNodeToString } from './getNodeContent';
|
|
6
5
|
|
|
7
6
|
describe('treeNodeToString', () => {
|
|
8
7
|
it('with latex', () => {
|
|
@@ -5,13 +5,13 @@ import { useSearchParams } from 'next/navigation';
|
|
|
5
5
|
import { memo, use, useCallback, useContext, useMemo, useState } from 'react';
|
|
6
6
|
import { useTranslation } from 'react-i18next';
|
|
7
7
|
|
|
8
|
-
import ShareMessageModal from '@/features/Conversation/components/ShareMessageModal';
|
|
9
|
-
import { VirtuaContext } from '@/features/Conversation/components/VirtualizedList/VirtuosoContext';
|
|
10
8
|
import { useChatStore } from '@/store/chat';
|
|
11
9
|
import { messageStateSelectors, threadSelectors } from '@/store/chat/selectors';
|
|
12
10
|
import { useSessionStore } from '@/store/session';
|
|
13
11
|
import { sessionSelectors } from '@/store/session/selectors';
|
|
14
12
|
|
|
13
|
+
import ShareMessageModal from '../../../components/ShareMessageModal';
|
|
14
|
+
import { VirtuaContext } from '../../../components/VirtualizedList/VirtuosoContext';
|
|
15
15
|
import { InPortalThreadContext } from '../../../context/InPortalThreadContext';
|
|
16
16
|
import { useChatListActionsBar } from '../../../hooks/useChatListActionsBar';
|
|
17
17
|
import { ErrorActionsBar } from './Error';
|
|
@@ -9,13 +9,13 @@ import { AssistantMessageExtra } from './index';
|
|
|
9
9
|
vi.mock('zustand/traditional');
|
|
10
10
|
|
|
11
11
|
// Mock TTS and Translate components
|
|
12
|
-
vi.mock('@/features/
|
|
12
|
+
vi.mock('@/features/ChatList/components/Extras/TTS', () => ({
|
|
13
13
|
default: vi.fn(() => <div>TTS Component</div>),
|
|
14
14
|
}));
|
|
15
|
-
vi.mock('@/features/
|
|
15
|
+
vi.mock('@/features/ChatList/components/Extras/Translate', () => ({
|
|
16
16
|
default: vi.fn(() => <div>Translate Component</div>),
|
|
17
17
|
}));
|
|
18
|
-
vi.mock('@/features/
|
|
18
|
+
vi.mock('@/features/ChatList/components/Extras/Usage', () => ({
|
|
19
19
|
default: vi.fn(() => <div>Usage Component</div>),
|
|
20
20
|
}));
|
|
21
21
|
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
+
import { LOADING_FLAT } from '@lobechat/const';
|
|
1
2
|
import { ModelPerformance, ModelUsage } from '@lobechat/types';
|
|
2
3
|
import { memo } from 'react';
|
|
3
4
|
import { Flexbox } from 'react-layout-kit';
|
|
4
5
|
|
|
5
|
-
import { LOADING_FLAT } from '@/const/message';
|
|
6
|
-
import ExtraContainer from '@/features/Conversation/components/Extras/ExtraContainer';
|
|
7
|
-
import TTS from '@/features/Conversation/components/Extras/TTS';
|
|
8
|
-
import Translate from '@/features/Conversation/components/Extras/Translate';
|
|
9
|
-
import Usage from '@/features/Conversation/components/Extras/Usage';
|
|
10
6
|
import { useChatStore } from '@/store/chat';
|
|
11
7
|
import { messageStateSelectors } from '@/store/chat/selectors';
|
|
12
8
|
|
|
9
|
+
import ExtraContainer from '../../../components/Extras/ExtraContainer';
|
|
10
|
+
import TTS from '../../../components/Extras/TTS';
|
|
11
|
+
import Translate from '../../../components/Extras/Translate';
|
|
12
|
+
import Usage from '../../../components/Extras/Usage';
|
|
13
|
+
|
|
13
14
|
interface AssistantMessageExtraProps {
|
|
14
15
|
content: string;
|
|
15
16
|
extra?: any;
|
|
@@ -3,12 +3,12 @@ import { UIChatMessage } from '@lobechat/types';
|
|
|
3
3
|
import { ReactNode, memo } from 'react';
|
|
4
4
|
import { Flexbox } from 'react-layout-kit';
|
|
5
5
|
|
|
6
|
-
import { CollapsedMessage } from '@/features/Conversation/Messages/Assistant/CollapsedMessage';
|
|
7
6
|
import { useChatStore } from '@/store/chat';
|
|
8
7
|
import { aiChatSelectors, messageStateSelectors } from '@/store/chat/selectors';
|
|
9
8
|
|
|
10
9
|
import { DefaultMessage } from '../Default';
|
|
11
10
|
import ImageFileListViewer from '../User/ImageFileListViewer';
|
|
11
|
+
import { CollapsedMessage } from './CollapsedMessage';
|
|
12
12
|
import FileChunks from './FileChunks';
|
|
13
13
|
import IntentUnderstanding from './IntentUnderstanding';
|
|
14
14
|
import Reasoning from './Reasoning';
|
|
@@ -5,13 +5,13 @@ import { useSearchParams } from 'next/navigation';
|
|
|
5
5
|
import { memo, use, useCallback, useContext, useMemo, useState } from 'react';
|
|
6
6
|
import { useTranslation } from 'react-i18next';
|
|
7
7
|
|
|
8
|
-
import ShareMessageModal from '@/features/Conversation/components/ShareMessageModal';
|
|
9
|
-
import { VirtuaContext } from '@/features/Conversation/components/VirtualizedList/VirtuosoContext';
|
|
10
8
|
import { useChatStore } from '@/store/chat';
|
|
11
9
|
import { messageStateSelectors, threadSelectors } from '@/store/chat/selectors';
|
|
12
10
|
import { useSessionStore } from '@/store/session';
|
|
13
11
|
import { sessionSelectors } from '@/store/session/selectors';
|
|
14
12
|
|
|
13
|
+
import ShareMessageModal from '../../../components/ShareMessageModal';
|
|
14
|
+
import { VirtuaContext } from '../../../components/VirtualizedList/VirtuosoContext';
|
|
15
15
|
import { InPortalThreadContext } from '../../../context/InPortalThreadContext';
|
|
16
16
|
import { useChatListActionsBar } from '../../../hooks/useChatListActionsBar';
|
|
17
17
|
|
|
@@ -4,13 +4,13 @@ import { memo, useMemo } from 'react';
|
|
|
4
4
|
import { Flexbox } from 'react-layout-kit';
|
|
5
5
|
|
|
6
6
|
import { LOADING_FLAT } from '@/const/message';
|
|
7
|
-
import { markdownElements } from '@/features/Conversation/MarkdownElements';
|
|
8
|
-
import Reasoning from '@/features/Conversation/Messages/Assistant/Reasoning';
|
|
9
7
|
import { useChatStore } from '@/store/chat';
|
|
10
8
|
import { aiChatSelectors, messageStateSelectors } from '@/store/chat/selectors';
|
|
11
9
|
import { useUserStore } from '@/store/user';
|
|
12
10
|
import { userGeneralSettingsSelectors } from '@/store/user/selectors';
|
|
13
11
|
|
|
12
|
+
import { markdownElements } from '../../MarkdownElements';
|
|
13
|
+
import Reasoning from '../Assistant/Reasoning';
|
|
14
14
|
import ImageFileListViewer from '../User/ImageFileListViewer';
|
|
15
15
|
import ErrorContent from './Error';
|
|
16
16
|
import MessageContent from './MessageContent';
|
|
@@ -5,9 +5,10 @@ import { memo } from 'react';
|
|
|
5
5
|
import { useTranslation } from 'react-i18next';
|
|
6
6
|
import { Flexbox } from 'react-layout-kit';
|
|
7
7
|
|
|
8
|
-
import ErrorMessageExtra, { useErrorContent } from '@/features/Conversation/Error';
|
|
9
8
|
import { useChatStore } from '@/store/chat';
|
|
10
9
|
|
|
10
|
+
import ErrorMessageExtra, { useErrorContent } from '../../../Error';
|
|
11
|
+
|
|
11
12
|
export interface ErrorContentProps {
|
|
12
13
|
error?: ChatMessageError;
|
|
13
14
|
id: string;
|
|
@@ -4,10 +4,10 @@ import isEqual from 'fast-deep-equal';
|
|
|
4
4
|
import { memo, useMemo } from 'react';
|
|
5
5
|
import { Flexbox } from 'react-layout-kit';
|
|
6
6
|
|
|
7
|
-
import { CollapsedMessage } from '@/features/Conversation/Messages/Group/CollapsedMessage';
|
|
8
7
|
import { useChatStore } from '@/store/chat';
|
|
9
8
|
import { messageStateSelectors } from '@/store/chat/slices/message/selectors';
|
|
10
9
|
|
|
10
|
+
import { CollapsedMessage } from './CollapsedMessage';
|
|
11
11
|
import { GroupMessageContext } from './GroupContext';
|
|
12
12
|
import GroupItem from './GroupItem';
|
|
13
13
|
|
|
@@ -3,10 +3,11 @@ import isEqual from 'fast-deep-equal';
|
|
|
3
3
|
import { memo, use } from 'react';
|
|
4
4
|
import { Flexbox } from 'react-layout-kit';
|
|
5
5
|
|
|
6
|
-
import { ContentBlock } from '@/features/Conversation/Messages/Group/ContentBlock';
|
|
7
|
-
import { VirtuaContext } from '@/features/Conversation/components/VirtualizedList/VirtuosoContext';
|
|
8
6
|
import { useChatStore } from '@/store/chat';
|
|
9
7
|
|
|
8
|
+
import { VirtuaContext } from '../../components/VirtualizedList/VirtuosoContext';
|
|
9
|
+
import { ContentBlock } from './ContentBlock';
|
|
10
|
+
|
|
10
11
|
interface GroupItemProps extends AssistantContentBlock {
|
|
11
12
|
contentId?: string;
|
|
12
13
|
disableEditing?: boolean;
|
|
@@ -5,10 +5,10 @@ import { memo, useState } from 'react';
|
|
|
5
5
|
import { useTranslation } from 'react-i18next';
|
|
6
6
|
import { Flexbox } from 'react-layout-kit';
|
|
7
7
|
|
|
8
|
-
import { useGroupMessage } from '@/features/Conversation/Messages/Group/GroupContext';
|
|
9
8
|
import { useChatStore } from '@/store/chat';
|
|
10
9
|
import { useUserStore } from '@/store/user';
|
|
11
10
|
|
|
11
|
+
import { useGroupMessage } from '../../../GroupContext';
|
|
12
12
|
import { ApprovalMode } from './index';
|
|
13
13
|
|
|
14
14
|
interface ApprovalActionsProps {
|
|
@@ -3,8 +3,7 @@ import { ChatToolResult, ToolIntervention } from '@lobechat/types';
|
|
|
3
3
|
import { Suspense, memo } from 'react';
|
|
4
4
|
import { Flexbox } from 'react-layout-kit';
|
|
5
5
|
|
|
6
|
-
import AbortResponse from '
|
|
7
|
-
|
|
6
|
+
import AbortResponse from './AbortResponse';
|
|
8
7
|
import CustomRender from './CustomRender';
|
|
9
8
|
import ErrorResponse from './ErrorResponse';
|
|
10
9
|
import Intervention from './Intervention';
|
|
@@ -9,7 +9,6 @@ import { Flexbox } from 'react-layout-kit';
|
|
|
9
9
|
import Avatar from '@/features/ChatItem/components/Avatar';
|
|
10
10
|
import BorderSpacing from '@/features/ChatItem/components/BorderSpacing';
|
|
11
11
|
import Title from '@/features/ChatItem/components/Title';
|
|
12
|
-
import Usage from '@/features/Conversation/components/Extras/Usage';
|
|
13
12
|
import { useOpenChatSettings } from '@/hooks/useInterceptingRoutes';
|
|
14
13
|
import { useAgentStore } from '@/store/agent';
|
|
15
14
|
import { agentChatConfigSelectors } from '@/store/agent/selectors';
|
|
@@ -19,6 +18,7 @@ import { useGlobalStore } from '@/store/global';
|
|
|
19
18
|
import { useSessionStore } from '@/store/session';
|
|
20
19
|
import { sessionSelectors } from '@/store/session/selectors';
|
|
21
20
|
|
|
21
|
+
import Usage from '../../components/Extras/Usage';
|
|
22
22
|
import { GroupActionsBar } from './Actions';
|
|
23
23
|
import EditState from './EditState';
|
|
24
24
|
import Group from './Group';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { memo } from 'react';
|
|
2
2
|
import { Flexbox } from 'react-layout-kit';
|
|
3
3
|
|
|
4
|
-
import ExtraContainer from '@/features/
|
|
5
|
-
import TTS from '@/features/
|
|
6
|
-
import Translate from '@/features/
|
|
4
|
+
import ExtraContainer from '@/features/ChatList/components/Extras/ExtraContainer';
|
|
5
|
+
import TTS from '@/features/ChatList/components/Extras/TTS';
|
|
6
|
+
import Translate from '@/features/ChatList/components/Extras/Translate';
|
|
7
7
|
import { useChatStore } from '@/store/chat';
|
|
8
8
|
import { messageStateSelectors } from '@/store/chat/selectors';
|
|
9
9
|
|
|
@@ -11,7 +11,7 @@ import BorderSpacing from '@/features/ChatItem/components/BorderSpacing';
|
|
|
11
11
|
import MessageContent from '@/features/ChatItem/components/MessageContent';
|
|
12
12
|
import Title from '@/features/ChatItem/components/Title';
|
|
13
13
|
import { useStyles } from '@/features/ChatItem/style';
|
|
14
|
-
import { markdownElements } from '@/features/
|
|
14
|
+
import { markdownElements } from '@/features/ChatList/MarkdownElements';
|
|
15
15
|
import { useUserAvatar } from '@/hooks/useUserAvatar';
|
|
16
16
|
import { useAgentStore } from '@/store/agent';
|
|
17
17
|
import { agentChatConfigSelectors } from '@/store/agent/selectors';
|
|
@@ -9,7 +9,7 @@ import { Flexbox } from 'react-layout-kit';
|
|
|
9
9
|
import {
|
|
10
10
|
removeVirtuaVisibleItem,
|
|
11
11
|
upsertVirtuaVisibleItem,
|
|
12
|
-
} from '@/features/
|
|
12
|
+
} from '@/features/ChatList/components/VirtualizedList/VirtuosoContext';
|
|
13
13
|
import { getChatStoreState, useChatStore } from '@/store/chat';
|
|
14
14
|
import { displayMessageSelectors, messageStateSelectors } from '@/store/chat/selectors';
|
|
15
15
|
|
package/src/features/{Conversation → ChatList}/components/ShareMessageModal/ShareImage/Preview.tsx
RENAMED
|
@@ -8,7 +8,7 @@ import { useTranslation } from 'react-i18next';
|
|
|
8
8
|
import { Flexbox } from 'react-layout-kit';
|
|
9
9
|
|
|
10
10
|
import { ProductLogo } from '@/components/Branding';
|
|
11
|
-
import { ChatItem } from '@/features/
|
|
11
|
+
import { ChatItem } from '@/features/ChatList';
|
|
12
12
|
import PluginTag from '@/features/PluginTag';
|
|
13
13
|
import { useAgentStore } from '@/store/agent';
|
|
14
14
|
import { agentSelectors } from '@/store/agent/selectors';
|
|
@@ -4,7 +4,7 @@ import { Skeleton } from 'antd';
|
|
|
4
4
|
import { createStyles } from 'antd-style';
|
|
5
5
|
import { memo } from 'react';
|
|
6
6
|
|
|
7
|
-
import WideScreenContainer from '@/features/
|
|
7
|
+
import WideScreenContainer from '@/features/ChatList/components/WideScreenContainer';
|
|
8
8
|
|
|
9
9
|
const useStyles = createStyles(({ css, prefixCls }) => ({
|
|
10
10
|
message: css`
|
|
@@ -4,7 +4,7 @@ import isEqual from 'fast-deep-equal';
|
|
|
4
4
|
import { ReactNode, memo, useCallback, useEffect, useRef, useState } from 'react';
|
|
5
5
|
import { VList, VListHandle } from 'virtua';
|
|
6
6
|
|
|
7
|
-
import WideScreenContainer from '@/features/
|
|
7
|
+
import WideScreenContainer from '@/features/ChatList/components/WideScreenContainer';
|
|
8
8
|
import { useChatStore } from '@/store/chat';
|
|
9
9
|
import { displayMessageSelectors } from '@/store/chat/selectors';
|
|
10
10
|
|
|
@@ -143,40 +143,20 @@ const NoteEditorModal = memo<NoteEditorModalProps>(
|
|
|
143
143
|
const handleOpenChange = (isOpen: boolean) => {
|
|
144
144
|
// When modal opens, load document content if in edit mode
|
|
145
145
|
if (isOpen && documentId && editor) {
|
|
146
|
-
console.log('[NoteEditorModal] Loading content:', {
|
|
147
|
-
cachedEditorDataPreview: cachedEditorData
|
|
148
|
-
? JSON.stringify(cachedEditorData).slice(0, 100)
|
|
149
|
-
: null,
|
|
150
|
-
cachedEditorDataType: typeof cachedEditorData,
|
|
151
|
-
documentId,
|
|
152
|
-
documentTitle,
|
|
153
|
-
hasCachedEditorData: !!cachedEditorData,
|
|
154
|
-
});
|
|
155
|
-
|
|
156
146
|
// If editorData is already cached (from list), use it directly
|
|
157
147
|
if (cachedEditorData) {
|
|
158
|
-
console.log('[NoteEditorModal] Using cached editorData', cachedEditorData);
|
|
159
148
|
setNoteTitle(documentTitle || '');
|
|
160
149
|
editor.setDocument('json', JSON.stringify(cachedEditorData));
|
|
161
150
|
return;
|
|
162
151
|
}
|
|
163
152
|
|
|
164
153
|
// Otherwise, fetch full content from API
|
|
165
|
-
console.log('[NoteEditorModal] Fetching from API');
|
|
166
154
|
documentService
|
|
167
155
|
.getDocumentById(documentId)
|
|
168
156
|
.then((doc) => {
|
|
169
157
|
if (doc && doc.content) {
|
|
170
158
|
setNoteTitle(doc.title || doc.filename || '');
|
|
171
159
|
|
|
172
|
-
console.log('[NoteEditorModal] Fetched doc.editorData:', {
|
|
173
|
-
editorDataPreview: doc.editorData
|
|
174
|
-
? JSON.stringify(doc.editorData).slice(0, 100)
|
|
175
|
-
: null,
|
|
176
|
-
editorDataType: typeof doc.editorData,
|
|
177
|
-
hasEditorData: !!doc.editorData,
|
|
178
|
-
});
|
|
179
|
-
|
|
180
160
|
editor.setDocument('json', doc.editorData);
|
|
181
161
|
}
|
|
182
162
|
})
|
|
@@ -228,7 +228,7 @@ const DocumentExplorer = memo<DocumentExplorerProps>(({ knowledgeBaseId, documen
|
|
|
228
228
|
<SearchBar
|
|
229
229
|
allowClear
|
|
230
230
|
onChange={(e) => setSearchKeywords(e.target.value)}
|
|
231
|
-
placeholder={t('
|
|
231
|
+
placeholder={t('searchPagePlaceholder')}
|
|
232
232
|
style={{ flex: 1 }}
|
|
233
233
|
value={searchKeywords}
|
|
234
234
|
variant={'borderless'}
|
|
@@ -236,7 +236,7 @@ const DocumentExplorer = memo<DocumentExplorerProps>(({ knowledgeBaseId, documen
|
|
|
236
236
|
<ActionIcon
|
|
237
237
|
icon={PlusIcon}
|
|
238
238
|
onClick={handleNewDocument}
|
|
239
|
-
title={t('header.
|
|
239
|
+
title={t('header.newPageButton')}
|
|
240
240
|
/>
|
|
241
241
|
</div>
|
|
242
242
|
<div className={styles.documentList}>
|
|
@@ -252,7 +252,7 @@ const DocumentExplorer = memo<DocumentExplorerProps>(({ knowledgeBaseId, documen
|
|
|
252
252
|
Footer: () => (
|
|
253
253
|
<Center style={{ paddingBlock: 16 }}>
|
|
254
254
|
<Text style={{ fontSize: 12 }} type={'secondary'}>
|
|
255
|
-
{t('documentList.
|
|
255
|
+
{t('documentList.pageCount', { count: filteredDocuments.length })}
|
|
256
256
|
</Text>
|
|
257
257
|
</Center>
|
|
258
258
|
),
|