@lobehub/lobehub 2.0.0-next.95 → 2.0.0-next.97
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 +58 -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 +18 -0
- package/locales/ar/common.json +21 -0
- package/locales/ar/hotkey.json +4 -0
- package/locales/ar/models.json +6 -0
- package/locales/bg-BG/common.json +21 -0
- package/locales/bg-BG/hotkey.json +4 -0
- package/locales/bg-BG/models.json +6 -0
- package/locales/de-DE/common.json +21 -0
- package/locales/de-DE/hotkey.json +4 -0
- package/locales/de-DE/models.json +6 -0
- package/locales/en-US/common.json +21 -0
- package/locales/en-US/hotkey.json +4 -0
- package/locales/en-US/models.json +6 -0
- package/locales/es-ES/common.json +21 -0
- package/locales/es-ES/hotkey.json +4 -0
- package/locales/es-ES/models.json +6 -0
- package/locales/fa-IR/common.json +21 -0
- package/locales/fa-IR/hotkey.json +4 -0
- package/locales/fa-IR/models.json +6 -0
- package/locales/fr-FR/common.json +21 -0
- package/locales/fr-FR/hotkey.json +4 -0
- package/locales/fr-FR/models.json +6 -0
- package/locales/it-IT/common.json +21 -0
- package/locales/it-IT/hotkey.json +4 -0
- package/locales/it-IT/models.json +6 -0
- package/locales/ja-JP/common.json +21 -0
- package/locales/ja-JP/hotkey.json +4 -0
- package/locales/ja-JP/models.json +6 -0
- package/locales/ko-KR/common.json +21 -0
- package/locales/ko-KR/hotkey.json +4 -0
- package/locales/ko-KR/models.json +6 -0
- package/locales/nl-NL/common.json +21 -0
- package/locales/nl-NL/hotkey.json +4 -0
- package/locales/nl-NL/models.json +6 -0
- package/locales/pl-PL/common.json +21 -0
- package/locales/pl-PL/hotkey.json +4 -0
- package/locales/pl-PL/models.json +6 -0
- package/locales/pt-BR/common.json +21 -0
- package/locales/pt-BR/hotkey.json +4 -0
- package/locales/pt-BR/models.json +6 -0
- package/locales/ru-RU/common.json +21 -0
- package/locales/ru-RU/hotkey.json +4 -0
- package/locales/ru-RU/models.json +6 -0
- package/locales/tr-TR/common.json +21 -0
- package/locales/tr-TR/hotkey.json +4 -0
- package/locales/tr-TR/models.json +6 -0
- package/locales/vi-VN/common.json +21 -0
- package/locales/vi-VN/hotkey.json +4 -0
- package/locales/vi-VN/models.json +6 -0
- package/locales/zh-CN/common.json +21 -0
- package/locales/zh-CN/hotkey.json +4 -0
- package/locales/zh-CN/models.json +6 -0
- package/locales/zh-TW/common.json +21 -0
- package/locales/zh-TW/hotkey.json +4 -0
- package/locales/zh-TW/models.json +6 -0
- package/package.json +3 -1
- package/packages/const/src/hotkeys.ts +6 -0
- package/packages/conversation-flow/src/__tests__/indexing.test.ts +513 -0
- package/packages/conversation-flow/src/__tests__/structuring.test.ts +600 -0
- package/packages/database/src/client/db.ts +12 -12
- package/packages/database/src/repositories/dataImporter/index.ts +10 -10
- package/packages/database/src/schemas/topic.ts +1 -1
- package/packages/database/src/server/models/ragEval/evaluation.ts +1 -1
- package/packages/types/src/hotkey.ts +1 -0
- 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 +41 -8
- package/src/app/[variants]/(main)/settings/provider/(list)/ProviderGrid/Card.tsx +6 -4
- package/src/app/[variants]/(main)/settings/provider/(list)/ProviderGrid/index.tsx +16 -4
- package/src/app/[variants]/(main)/settings/provider/(list)/index.tsx +15 -3
- package/src/app/[variants]/(main)/settings/provider/detail/index.tsx +23 -15
- 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/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/layout/GlobalProvider/Cmdk.tsx +470 -0
- package/src/layout/GlobalProvider/CmdkLazy.tsx +17 -0
- package/src/layout/GlobalProvider/index.tsx +2 -0
- package/src/locales/default/common.ts +21 -0
- package/src/locales/default/hotkey.ts +4 -0
- 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/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
|
@@ -17,39 +17,39 @@ interface ImportResult {
|
|
|
17
17
|
type ConflictStrategy = 'skip' | 'override' | 'merge';
|
|
18
18
|
|
|
19
19
|
interface TableImportConfig {
|
|
20
|
-
//
|
|
20
|
+
// Conflict resolution strategy
|
|
21
21
|
conflictStrategy?: ConflictStrategy;
|
|
22
|
-
//
|
|
22
|
+
// Field processing functions
|
|
23
23
|
fieldProcessors?: {
|
|
24
24
|
[field: string]: (value: any) => any;
|
|
25
25
|
};
|
|
26
|
-
//
|
|
26
|
+
// Whether to use composite key (no separate id field)
|
|
27
27
|
isCompositeKey?: boolean;
|
|
28
|
-
//
|
|
28
|
+
// Whether to preserve original ID
|
|
29
29
|
preserveId?: boolean;
|
|
30
|
-
//
|
|
30
|
+
// Relation field definitions
|
|
31
31
|
relations?: {
|
|
32
32
|
field: string;
|
|
33
33
|
sourceField?: string;
|
|
34
34
|
sourceTable: string;
|
|
35
35
|
}[];
|
|
36
|
-
//
|
|
36
|
+
// Self-reference fields
|
|
37
37
|
selfReferences?: {
|
|
38
38
|
field: string;
|
|
39
39
|
sourceField?: string;
|
|
40
40
|
}[];
|
|
41
|
-
//
|
|
41
|
+
// Table name
|
|
42
42
|
table: string;
|
|
43
|
-
//
|
|
43
|
+
// Unique constraint fields
|
|
44
44
|
uniqueConstraints?: string[];
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
-
//
|
|
47
|
+
// Import table configuration
|
|
48
48
|
const IMPORT_TABLE_CONFIG: TableImportConfig[] = [
|
|
49
49
|
{
|
|
50
50
|
conflictStrategy: 'merge',
|
|
51
51
|
preserveId: true,
|
|
52
|
-
//
|
|
52
|
+
// Special table, ID same as user ID
|
|
53
53
|
table: 'userSettings',
|
|
54
54
|
uniqueConstraints: ['id'],
|
|
55
55
|
},
|
|
@@ -77,7 +77,7 @@ export type ThreadItem = typeof threads.$inferSelect;
|
|
|
77
77
|
export const insertThreadSchema = createInsertSchema(threads);
|
|
78
78
|
|
|
79
79
|
/**
|
|
80
|
-
*
|
|
80
|
+
* Document-Topic association table - Implements many-to-many relationship between documents and topics
|
|
81
81
|
*/
|
|
82
82
|
export const topicDocuments = pgTable(
|
|
83
83
|
'topic_documents',
|
|
@@ -60,6 +60,7 @@ export const KeyEnum = {
|
|
|
60
60
|
export const HotkeyEnum = {
|
|
61
61
|
AddUserMessage: 'addUserMessage',
|
|
62
62
|
ClearCurrentMessages: 'clearCurrentMessages',
|
|
63
|
+
CommandPalette: 'commandPalette',
|
|
63
64
|
DeleteAndRegenerateMessage: 'deleteAndRegenerateMessage',
|
|
64
65
|
DeleteLastMessage: 'deleteLastMessage',
|
|
65
66
|
EditMessage: 'editMessage',
|
|
@@ -6,7 +6,7 @@ import { useTranslation } from 'react-i18next';
|
|
|
6
6
|
import { Flexbox } from 'react-layout-kit';
|
|
7
7
|
|
|
8
8
|
import { type ActionKeys, ChatInputProvider, DesktopChatInput } from '@/features/ChatInput';
|
|
9
|
-
import WideScreenContainer from '@/features/
|
|
9
|
+
import WideScreenContainer from '@/features/ChatList/components/WideScreenContainer';
|
|
10
10
|
import { useChatStore } from '@/store/chat';
|
|
11
11
|
import { aiChatSelectors } from '@/store/chat/selectors';
|
|
12
12
|
|
|
@@ -9,7 +9,7 @@ import { Flexbox } from 'react-layout-kit';
|
|
|
9
9
|
|
|
10
10
|
import { DEFAULT_AVATAR } from '@/const/meta';
|
|
11
11
|
import { type ActionKeys, ChatInputProvider, DesktopChatInput } from '@/features/ChatInput';
|
|
12
|
-
import WideScreenContainer from '@/features/
|
|
12
|
+
import WideScreenContainer from '@/features/ChatList/components/WideScreenContainer';
|
|
13
13
|
import { useChatStore } from '@/store/chat';
|
|
14
14
|
import { aiChatSelectors } from '@/store/chat/selectors';
|
|
15
15
|
import { useSessionStore } from '@/store/session';
|
package/src/app/[variants]/(main)/chat/components/conversation/features/ChatList/ChatItem/index.tsx
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createStyles } from 'antd-style';
|
|
2
2
|
import React, { memo } from 'react';
|
|
3
3
|
|
|
4
|
-
import { ChatItem } from '@/features/
|
|
4
|
+
import { ChatItem } from '@/features/ChatList';
|
|
5
5
|
import { useAgentStore } from '@/store/agent';
|
|
6
6
|
import { agentChatConfigSelectors } from '@/store/agent/selectors';
|
|
7
7
|
import { useChatStore } from '@/store/chat';
|
package/src/app/[variants]/(main)/chat/components/conversation/features/ChatList/Content.tsx
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
import React, { memo, useCallback } from 'react';
|
|
4
4
|
|
|
5
|
-
import { SkeletonList, VirtualizedList } from '@/features/
|
|
6
|
-
import WideScreenContainer from '@/features/
|
|
5
|
+
import { SkeletonList, VirtualizedList } from '@/features/ChatList';
|
|
6
|
+
import WideScreenContainer from '@/features/ChatList/components/WideScreenContainer';
|
|
7
7
|
import { useFetchMessages } from '@/hooks/useFetchMessages';
|
|
8
8
|
import { useChatStore } from '@/store/chat';
|
|
9
9
|
import { displayMessageSelectors } from '@/store/chat/selectors';
|
package/src/app/[variants]/(main)/chat/components/conversation/features/ChatMinimap/index.tsx
CHANGED
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
getVirtuaGlobalRef,
|
|
17
17
|
subscribeVirtuaActiveIndex,
|
|
18
18
|
subscribeVirtuaGlobalRef,
|
|
19
|
-
} from '@/features/
|
|
19
|
+
} from '@/features/ChatList/components/VirtualizedList/VirtuosoContext';
|
|
20
20
|
import { useChatStore } from '@/store/chat';
|
|
21
21
|
import { displayMessageSelectors } from '@/store/chat/selectors';
|
|
22
22
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import { useResponsive, useTheme } from 'antd-style';
|
|
4
|
-
import { memo, useRef } from 'react';
|
|
4
|
+
import { memo, useEffect, useRef } from 'react';
|
|
5
5
|
import { Flexbox } from 'react-layout-kit';
|
|
6
|
+
import { useSearchParams } from 'react-router-dom';
|
|
6
7
|
|
|
7
8
|
import SettingContainer from '@/features/Setting/SettingContainer';
|
|
8
|
-
import { parseAsStringEnum, useQueryParam } from '@/hooks/useQueryParam';
|
|
9
9
|
import { SettingsTabs } from '@/store/global/initialState';
|
|
10
10
|
|
|
11
11
|
import CategoryContent from '../CategoryContent';
|
|
@@ -13,18 +13,51 @@ import SettingsContent from '../SettingsContent';
|
|
|
13
13
|
import { LayoutProps } from '../type';
|
|
14
14
|
import Header from './Header';
|
|
15
15
|
import SideBar from './SideBar';
|
|
16
|
+
import useMergedState from 'rc-util/lib/hooks/useMergedState';
|
|
16
17
|
|
|
17
18
|
const Layout = memo<LayoutProps>(() => {
|
|
18
19
|
const ref = useRef<HTMLDivElement | null>(null);
|
|
19
20
|
const { md = true } = useResponsive();
|
|
20
21
|
const theme = useTheme();
|
|
21
22
|
|
|
22
|
-
const [
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
const [searchParams, setSearchParams] = useSearchParams();
|
|
24
|
+
|
|
25
|
+
const [activeTabState, setActiveTabState] = useMergedState({
|
|
26
|
+
active: searchParams.get('active') as SettingsTabs ? searchParams.get('active') as SettingsTabs : SettingsTabs.Common,
|
|
27
|
+
}, {
|
|
28
|
+
onChange: (obj: {
|
|
29
|
+
active: SettingsTabs;
|
|
30
|
+
provider?: string;
|
|
31
|
+
}) => {
|
|
32
|
+
if (obj.provider) {
|
|
33
|
+
setSearchParams({ active: obj.active, provider: obj.provider });
|
|
34
|
+
} else {
|
|
35
|
+
searchParams.delete('provider');
|
|
36
|
+
setSearchParams({ active: obj.active });
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
const setActiveTab = (tab: SettingsTabs) => {
|
|
42
|
+
if (tab === SettingsTabs.Provider) {
|
|
43
|
+
setActiveTabState({ active: tab, provider: 'all' });
|
|
44
|
+
} else {
|
|
45
|
+
setActiveTabState({
|
|
46
|
+
active: tab,
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
useEffect(() => {
|
|
52
|
+
return () => {
|
|
53
|
+
setSearchParams((prevParams) => {
|
|
54
|
+
prevParams.delete('active');
|
|
55
|
+
return prevParams;
|
|
56
|
+
});
|
|
57
|
+
};
|
|
58
|
+
}, []);
|
|
26
59
|
|
|
27
|
-
const category = <CategoryContent activeTab={
|
|
60
|
+
const category = <CategoryContent activeTab={activeTabState.active} onMenuSelect={setActiveTab} />;
|
|
28
61
|
|
|
29
62
|
return (
|
|
30
63
|
<Flexbox
|
|
@@ -39,7 +72,7 @@ const Layout = memo<LayoutProps>(() => {
|
|
|
39
72
|
<Header getContainer={() => ref.current!}>{category}</Header>
|
|
40
73
|
)}
|
|
41
74
|
<SettingContainer maxWidth={'none'}>
|
|
42
|
-
<SettingsContent activeTab={
|
|
75
|
+
<SettingsContent activeTab={activeTabState.active} mobile={false} />
|
|
43
76
|
</SettingContainer>
|
|
44
77
|
</Flexbox>
|
|
45
78
|
);
|
|
@@ -5,7 +5,6 @@ import { memo } from 'react';
|
|
|
5
5
|
import { useTranslation } from 'react-i18next';
|
|
6
6
|
import { Flexbox } from 'react-layout-kit';
|
|
7
7
|
|
|
8
|
-
import Link from '@/components/Link';
|
|
9
8
|
import { AiProviderListItem } from '@/types/aiProvider';
|
|
10
9
|
|
|
11
10
|
import EnableSwitch from './EnableSwitch';
|
|
@@ -13,9 +12,10 @@ import { useStyles } from './style';
|
|
|
13
12
|
|
|
14
13
|
interface ProviderCardProps extends AiProviderListItem {
|
|
15
14
|
loading?: boolean;
|
|
15
|
+
onProviderSelect: (provider: string) => void;
|
|
16
16
|
}
|
|
17
17
|
const ProviderCard = memo<ProviderCardProps>(
|
|
18
|
-
({ id, description, name, enabled, source, logo, loading }) => {
|
|
18
|
+
({ id, description, name, enabled, source, logo, loading, onProviderSelect }) => {
|
|
19
19
|
const { t } = useTranslation('providers');
|
|
20
20
|
const { cx, styles, theme } = useStyles();
|
|
21
21
|
|
|
@@ -33,7 +33,9 @@ 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
|
-
<
|
|
36
|
+
<div onClick={() => {
|
|
37
|
+
onProviderSelect(id);
|
|
38
|
+
}} style={{ cursor: 'pointer' }}>
|
|
37
39
|
<Flexbox gap={12} width={'100%'}>
|
|
38
40
|
<Flexbox align={'center'} horizontal justify={'space-between'}>
|
|
39
41
|
{source === 'builtin' ? (
|
|
@@ -68,7 +70,7 @@ const ProviderCard = memo<ProviderCardProps>(
|
|
|
68
70
|
{source === 'custom' ? description : t(`${id}.description`)}
|
|
69
71
|
</Text>
|
|
70
72
|
</Flexbox>
|
|
71
|
-
</
|
|
73
|
+
</div>
|
|
72
74
|
<Divider style={{ margin: '4px 0' }} />
|
|
73
75
|
<Flexbox horizontal justify={'space-between'}>
|
|
74
76
|
<div />
|
|
@@ -14,7 +14,12 @@ const loadingArr = Array.from({ length: 12 })
|
|
|
14
14
|
.fill('-')
|
|
15
15
|
.map((item, index) => `${index}x${item}`);
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
type ListProps = {
|
|
18
|
+
onProviderSelect: (provider: string) => void;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
const List = memo((props: ListProps) => {
|
|
22
|
+
const { onProviderSelect } = props;
|
|
18
23
|
const { t } = useTranslation('modelProvider');
|
|
19
24
|
const enabledList = useAiInfraStore(aiProviderSelectors.enabledAiProviderList, isEqual);
|
|
20
25
|
const disabledList = useAiInfraStore(aiProviderSelectors.disabledAiProviderList, isEqual);
|
|
@@ -30,7 +35,14 @@ const List = memo(() => {
|
|
|
30
35
|
</Flexbox>
|
|
31
36
|
<Grid gap={16} rows={3}>
|
|
32
37
|
{loadingArr.map((item) => (
|
|
33
|
-
<Card
|
|
38
|
+
<Card
|
|
39
|
+
enabled={false}
|
|
40
|
+
id={item}
|
|
41
|
+
key={item}
|
|
42
|
+
loading
|
|
43
|
+
onProviderSelect={onProviderSelect}
|
|
44
|
+
source={'builtin'}
|
|
45
|
+
/>
|
|
34
46
|
))}
|
|
35
47
|
</Grid>
|
|
36
48
|
</Flexbox>
|
|
@@ -47,7 +59,7 @@ const List = memo(() => {
|
|
|
47
59
|
</Flexbox>
|
|
48
60
|
<Grid gap={16} rows={3}>
|
|
49
61
|
{enabledList.map((item) => (
|
|
50
|
-
<Card {...item} key={item.id} />
|
|
62
|
+
<Card {...item} key={item.id} onProviderSelect={onProviderSelect} />
|
|
51
63
|
))}
|
|
52
64
|
</Grid>
|
|
53
65
|
</Flexbox>
|
|
@@ -60,7 +72,7 @@ const List = memo(() => {
|
|
|
60
72
|
</Flexbox>
|
|
61
73
|
<Grid gap={16} rows={3}>
|
|
62
74
|
{disabledList.map((item) => (
|
|
63
|
-
<Card {...item} key={item.id} />
|
|
75
|
+
<Card {...item} key={item.id} onProviderSelect={onProviderSelect} />
|
|
64
76
|
))}
|
|
65
77
|
</Grid>
|
|
66
78
|
</Flexbox>
|
|
@@ -1,20 +1,32 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import { isCustomBranding } from '@/const/version';
|
|
4
|
-
import { parseAsString, useQueryParam } from '@/hooks/useQueryParam';
|
|
5
4
|
|
|
6
5
|
import DesktopLayout from '../_layout/Desktop';
|
|
7
6
|
import MobileLayout from '../_layout/Mobile';
|
|
8
7
|
import ProviderDetailPage from '../detail';
|
|
9
8
|
import Footer from './Footer';
|
|
9
|
+
import { useMemo, useState } from 'react';
|
|
10
|
+
import { useSearchParams } from 'react-router-dom';
|
|
10
11
|
|
|
11
12
|
const Page = (props: { mobile?: boolean }) => {
|
|
12
|
-
const [
|
|
13
|
+
const [SearchParams, setSearchParams] = useSearchParams();
|
|
14
|
+
const [provider, setProviderState] = useState(SearchParams.get('provider') || 'all');
|
|
15
|
+
const setProvider = (provider: string) => {
|
|
16
|
+
setSearchParams({ active: 'provider', provider });
|
|
17
|
+
setProviderState(provider);
|
|
18
|
+
};
|
|
19
|
+
|
|
13
20
|
const { mobile } = props;
|
|
14
21
|
const ProviderLayout = mobile ? MobileLayout : DesktopLayout;
|
|
22
|
+
|
|
23
|
+
const ProviderListPage = useMemo(() => {
|
|
24
|
+
return <ProviderDetailPage id={provider} onProviderSelect={setProvider} />;
|
|
25
|
+
}, [provider]);
|
|
26
|
+
|
|
15
27
|
return (
|
|
16
28
|
<ProviderLayout onProviderSelect={setProvider}>
|
|
17
|
-
|
|
29
|
+
{ProviderListPage}
|
|
18
30
|
{!isCustomBranding && <Footer />}
|
|
19
31
|
</ProviderLayout>
|
|
20
32
|
);
|
|
@@ -1,22 +1,30 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import Azure from './azure';
|
|
4
|
-
import AzureAI from './azureai';
|
|
5
|
-
import Bedrock from './bedrock';
|
|
6
|
-
import Cloudflare from './cloudflare';
|
|
7
|
-
import ComfyUI from './comfyui';
|
|
8
|
-
import DefaultPage from './default/ProviderDetialPage';
|
|
9
|
-
import GitHub from './github';
|
|
10
|
-
import Ollama from './ollama';
|
|
11
|
-
import OpenAI from './openai';
|
|
12
|
-
import VertexAI from './vertexai';
|
|
1
|
+
import dynamic from 'next/dynamic';
|
|
2
|
+
import Loading from '@/components/Loading/BrandTextLoading';
|
|
13
3
|
|
|
14
|
-
const
|
|
15
|
-
|
|
4
|
+
const NewAPI = dynamic(() => import('./newapi'), { loading: () => <Loading />, ssr: false });
|
|
5
|
+
const OpenAI = dynamic(() => import('./openai'), { loading: () => <Loading />, ssr: false });
|
|
6
|
+
const VertexAI = dynamic(() => import('./vertexai'), { loading: () => <Loading />, ssr: false });
|
|
7
|
+
const GitHub = dynamic(() => import('./github'), { loading: () => <Loading />, ssr: false });
|
|
8
|
+
const Ollama = dynamic(() => import('./ollama'), { loading: () => <Loading />, ssr: false });
|
|
9
|
+
const ComfyUI = dynamic(() => import('./comfyui'), { loading: () => <Loading />, ssr: false });
|
|
10
|
+
const Cloudflare = dynamic(() => import('./cloudflare'), { loading: () => <Loading />, ssr: false });
|
|
11
|
+
const Bedrock = dynamic(() => import('./bedrock'), { loading: () => <Loading />, ssr: false });
|
|
12
|
+
const AzureAI = dynamic(() => import('./azureai'), { loading: () => <Loading />, ssr: false });
|
|
13
|
+
const Azure = dynamic(() => import('./azure'), { loading: () => <Loading />, ssr: false });
|
|
14
|
+
const ProviderGrid = dynamic(() => import('../(list)/ProviderGrid'), { loading: () => <Loading />, ssr: false });
|
|
15
|
+
const DefaultPage = dynamic(() => import('./default/ProviderDetialPage'), { loading: () => <Loading />, ssr: false });
|
|
16
|
+
|
|
17
|
+
type ProviderDetailPageProps = {
|
|
18
|
+
id?: string | null;
|
|
19
|
+
onProviderSelect: (provider: string) => void;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const ProviderDetailPage = (props: ProviderDetailPageProps) => {
|
|
23
|
+
const { id, onProviderSelect } = props;
|
|
16
24
|
|
|
17
25
|
switch (id) {
|
|
18
26
|
case 'all': {
|
|
19
|
-
return <ProviderGrid />;
|
|
27
|
+
return <ProviderGrid onProviderSelect={onProviderSelect} />;
|
|
20
28
|
}
|
|
21
29
|
case 'azure': {
|
|
22
30
|
return <Azure />;
|
|
@@ -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';
|