@lobehub/lobehub 2.0.0-next.96 → 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 +33 -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 +9 -0
- package/locales/ar/models.json +6 -0
- package/locales/bg-BG/models.json +6 -0
- package/locales/de-DE/models.json +6 -0
- package/locales/en-US/models.json +6 -0
- package/locales/es-ES/models.json +6 -0
- package/locales/fa-IR/models.json +6 -0
- package/locales/fr-FR/models.json +6 -0
- package/locales/it-IT/models.json +6 -0
- package/locales/ja-JP/models.json +6 -0
- package/locales/ko-KR/models.json +6 -0
- package/locales/nl-NL/models.json +6 -0
- package/locales/pl-PL/models.json +6 -0
- package/locales/pt-BR/models.json +6 -0
- package/locales/ru-RU/models.json +6 -0
- package/locales/tr-TR/models.json +6 -0
- package/locales/vi-VN/models.json +6 -0
- package/locales/zh-CN/models.json +6 -0
- package/locales/zh-TW/models.json +6 -0
- package/package.json +1 -1
- 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/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/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/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
|
@@ -38,7 +38,7 @@ export class DatabaseManager {
|
|
|
38
38
|
private callbacks?: DatabaseLoadingCallbacks;
|
|
39
39
|
private isLocalDBSchemaSynced = false;
|
|
40
40
|
|
|
41
|
-
// CDN
|
|
41
|
+
// CDN configuration
|
|
42
42
|
private static WASM_CDN_URL =
|
|
43
43
|
'https://registry.npmmirror.com/@electric-sql/pglite/0.2.17/files/dist/postgres.wasm';
|
|
44
44
|
|
|
@@ -57,7 +57,7 @@ export class DatabaseManager {
|
|
|
57
57
|
return DatabaseManager.instance;
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
-
//
|
|
60
|
+
// Load and compile WASM module
|
|
61
61
|
private async loadWasmModule(): Promise<WebAssembly.Module> {
|
|
62
62
|
const start = Date.now();
|
|
63
63
|
this.callbacks?.onStateChange?.(DatabaseLoadingState.LoadingWasm);
|
|
@@ -72,7 +72,7 @@ export class DatabaseManager {
|
|
|
72
72
|
let receivedLength = 0;
|
|
73
73
|
const chunks: Uint8Array[] = [];
|
|
74
74
|
|
|
75
|
-
//
|
|
75
|
+
// Read data stream
|
|
76
76
|
// eslint-disable-next-line no-constant-condition
|
|
77
77
|
while (true) {
|
|
78
78
|
const { done, value } = await reader.read();
|
|
@@ -82,7 +82,7 @@ export class DatabaseManager {
|
|
|
82
82
|
chunks.push(value);
|
|
83
83
|
receivedLength += value.length;
|
|
84
84
|
|
|
85
|
-
//
|
|
85
|
+
// Calculate and report progress
|
|
86
86
|
const progress = Math.min(Math.round((receivedLength / contentLength) * 100), 100);
|
|
87
87
|
this.callbacks?.onProgress?.({
|
|
88
88
|
phase: 'wasm',
|
|
@@ -90,7 +90,7 @@ export class DatabaseManager {
|
|
|
90
90
|
});
|
|
91
91
|
}
|
|
92
92
|
|
|
93
|
-
//
|
|
93
|
+
// Merge data chunks
|
|
94
94
|
const wasmBytes = new Uint8Array(receivedLength);
|
|
95
95
|
let position = 0;
|
|
96
96
|
for (const chunk of chunks) {
|
|
@@ -104,7 +104,7 @@ export class DatabaseManager {
|
|
|
104
104
|
progress: 100,
|
|
105
105
|
});
|
|
106
106
|
|
|
107
|
-
//
|
|
107
|
+
// Compile WASM module
|
|
108
108
|
return WebAssembly.compile(wasmBytes);
|
|
109
109
|
}
|
|
110
110
|
|
|
@@ -114,7 +114,7 @@ export class DatabaseManager {
|
|
|
114
114
|
return await res.blob();
|
|
115
115
|
};
|
|
116
116
|
|
|
117
|
-
//
|
|
117
|
+
// Asynchronously load PGlite related dependencies
|
|
118
118
|
private async loadDependencies() {
|
|
119
119
|
const start = Date.now();
|
|
120
120
|
this.callbacks?.onStateChange?.(DatabaseLoadingState.LoadingDependencies);
|
|
@@ -135,7 +135,7 @@ export class DatabaseManager {
|
|
|
135
135
|
const result = await importPromise;
|
|
136
136
|
loaded += 1;
|
|
137
137
|
|
|
138
|
-
//
|
|
138
|
+
// Calculate loading progress
|
|
139
139
|
this.callbacks?.onProgress?.({
|
|
140
140
|
phase: 'dependencies',
|
|
141
141
|
progress: Math.min(Math.round((loaded / imports.length) * 100), 100),
|
|
@@ -156,7 +156,7 @@ export class DatabaseManager {
|
|
|
156
156
|
return { IdbFs, MemoryFS, PGlite, fsBundle, vector };
|
|
157
157
|
}
|
|
158
158
|
|
|
159
|
-
//
|
|
159
|
+
// Database migration method
|
|
160
160
|
private async migrate(skipMultiRun = false): Promise<DrizzleInstance> {
|
|
161
161
|
if (this.isLocalDBSchemaSynced && skipMultiRun) return this.db;
|
|
162
162
|
|
|
@@ -169,17 +169,17 @@ export class DatabaseManager {
|
|
|
169
169
|
try {
|
|
170
170
|
const drizzleMigration = new DrizzleMigrationModel(this.db as any);
|
|
171
171
|
|
|
172
|
-
//
|
|
172
|
+
// Check if tables exist in database
|
|
173
173
|
const tableCount = await drizzleMigration.getTableCounts();
|
|
174
174
|
|
|
175
|
-
//
|
|
175
|
+
// If table count > 0, consider database properly initialized
|
|
176
176
|
if (tableCount > 0) {
|
|
177
177
|
this.isLocalDBSchemaSynced = true;
|
|
178
178
|
return this.db;
|
|
179
179
|
}
|
|
180
180
|
} catch (error) {
|
|
181
181
|
console.warn('Error checking table existence, proceeding with migration', error);
|
|
182
|
-
//
|
|
182
|
+
// If query fails, continue migration to ensure safety
|
|
183
183
|
}
|
|
184
184
|
}
|
|
185
185
|
}
|
|
@@ -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',
|
|
@@ -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
|
|
|
@@ -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
|
|
|
@@ -2,7 +2,7 @@ import { memo } from 'react';
|
|
|
2
2
|
|
|
3
3
|
import OllamaSetupGuide from '@/components/OllamaSetupGuide';
|
|
4
4
|
import { isDesktop } from '@/const/version';
|
|
5
|
-
import { ErrorActionContainer } from '@/features/
|
|
5
|
+
import { ErrorActionContainer } from '@/features/ChatList/Error/style';
|
|
6
6
|
|
|
7
7
|
import OllamaDesktopSetupGuide from './Desktop';
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@ import { Image, Markdown } from '@lobehub/ui';
|
|
|
2
2
|
import { memo } from 'react';
|
|
3
3
|
import { Flexbox } from 'react-layout-kit';
|
|
4
4
|
|
|
5
|
-
import Arguments from '@/features/
|
|
5
|
+
import Arguments from '@/features/ChatList/Messages/Group/Tool/Render/Arguments';
|
|
6
6
|
import { ToolCallResult } from '@/libs/mcp';
|
|
7
7
|
|
|
8
8
|
export interface MCPTypeProps {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import React, { memo, useCallback } from 'react';
|
|
4
4
|
import { useTranslation } from 'react-i18next';
|
|
5
5
|
|
|
6
|
-
import { SkeletonList, VirtualizedList } from '@/features/
|
|
6
|
+
import { SkeletonList, VirtualizedList } from '@/features/ChatList';
|
|
7
7
|
import { useChatStore } from '@/store/chat';
|
|
8
8
|
import { chatSelectors } from '@/store/chat/selectors';
|
|
9
9
|
import { useChatGroupStore } from '@/store/chatGroup';
|
|
@@ -7,7 +7,7 @@ import { Trans } from 'react-i18next';
|
|
|
7
7
|
import { Flexbox } from 'react-layout-kit';
|
|
8
8
|
|
|
9
9
|
import { type ActionKeys, ChatInputProvider, DesktopChatInput } from '@/features/ChatInput';
|
|
10
|
-
import WideScreenContainer from '@/features/
|
|
10
|
+
import WideScreenContainer from '@/features/ChatList/components/WideScreenContainer';
|
|
11
11
|
import { useChatStore } from '@/store/chat';
|
|
12
12
|
import { useGlobalStore } from '@/store/global';
|
|
13
13
|
import { systemStatusSelectors } from '@/store/global/selectors';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { memo, useMemo } from 'react';
|
|
2
2
|
|
|
3
|
-
import { ChatItem } from '@/features/
|
|
3
|
+
import { ChatItem } from '@/features/ChatList';
|
|
4
4
|
import { useAgentStore } from '@/store/agent';
|
|
5
5
|
import { agentChatConfigSelectors } from '@/store/agent/selectors';
|
|
6
6
|
import { useChatStore } from '@/store/chat';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { memo, useCallback } from 'react';
|
|
2
2
|
import { Flexbox } from 'react-layout-kit';
|
|
3
3
|
|
|
4
|
-
import { SkeletonList, VirtualizedList } from '@/features/
|
|
4
|
+
import { SkeletonList, VirtualizedList } from '@/features/ChatList';
|
|
5
5
|
import { useFetchThreads } from '@/hooks/useFetchThreads';
|
|
6
6
|
import { useChatStore } from '@/store/chat';
|
|
7
7
|
import { threadSelectors } from '@/store/chat/selectors';
|