@lobehub/chat 1.107.0 → 1.107.2
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/main/core/browser/Browser.ts +17 -4
- package/changelog/v1.json +18 -0
- package/locales/ar/models.json +21 -0
- package/locales/bg-BG/models.json +21 -0
- package/locales/de-DE/models.json +21 -0
- package/locales/en-US/models.json +21 -0
- package/locales/es-ES/models.json +21 -0
- package/locales/fa-IR/models.json +21 -0
- package/locales/fr-FR/models.json +21 -0
- package/locales/it-IT/models.json +21 -0
- package/locales/ja-JP/models.json +21 -0
- package/locales/ko-KR/models.json +21 -0
- package/locales/nl-NL/models.json +21 -0
- package/locales/pl-PL/models.json +21 -0
- package/locales/pt-BR/models.json +21 -0
- package/locales/ru-RU/models.json +21 -0
- package/locales/tr-TR/models.json +21 -0
- package/locales/vi-VN/models.json +21 -0
- package/locales/zh-CN/models.json +21 -0
- package/locales/zh-TW/models.json +21 -0
- package/package.json +2 -2
- package/packages/types/package.json +17 -0
- package/scripts/cdnWorkflow/utils.ts +1 -1
- package/src/libs/trpc/client/async.ts +2 -1
- package/src/libs/trpc/client/edge.ts +2 -1
- package/src/libs/trpc/client/lambda.ts +4 -2
- package/src/libs/trpc/client/tools.ts +2 -1
- package/tsconfig.json +1 -0
- package/vitest.config.server.ts +6 -3
- package/vitest.config.ts +3 -0
- package/{src/types → packages/types/src}/agent/chatConfig.ts +0 -0
- package/{src/types → packages/types/src}/agent/index.ts +0 -0
- package/{src/types → packages/types/src}/aiModel.ts +0 -0
- package/{src/types → packages/types/src}/aiProvider.ts +0 -0
- package/{src/types → packages/types/src}/apiKey.ts +0 -0
- package/{src/types → packages/types/src}/artifact.ts +0 -0
- package/{src/types → packages/types/src}/asyncTask.ts +0 -0
- package/{src/types → packages/types/src}/changelog.ts +0 -0
- package/{src/types → packages/types/src}/chunk/document.ts +0 -0
- package/{src/types → packages/types/src}/chunk/index.ts +0 -0
- package/{src/types → packages/types/src}/clientDB.ts +0 -0
- package/{src/types → packages/types/src}/discover/assistants.ts +0 -0
- package/{src/types → packages/types/src}/discover/index.ts +0 -0
- package/{src/types → packages/types/src}/discover/mcp.ts +0 -0
- package/{src/types → packages/types/src}/discover/models.ts +0 -0
- package/{src/types → packages/types/src}/discover/plugins.ts +0 -0
- package/{src/types → packages/types/src}/discover/providers.ts +0 -0
- package/{src/types → packages/types/src}/document/index.ts +0 -0
- package/{src/types → packages/types/src}/eval/dataset.ts +0 -0
- package/{src/types → packages/types/src}/eval/evaluation.ts +0 -0
- package/{src/types → packages/types/src}/eval/index.ts +0 -0
- package/{src/types → packages/types/src}/eval/ragas.ts +0 -0
- package/{src/types → packages/types/src}/export.ts +0 -0
- package/{src/types → packages/types/src}/exportConfig.ts +0 -0
- package/{src/types → packages/types/src}/fetch.ts +0 -0
- package/{src/types → packages/types/src}/files/index.ts +0 -0
- package/{src/types → packages/types/src}/files/list.ts +0 -0
- package/{src/types → packages/types/src}/files/upload.ts +0 -0
- package/{src/types → packages/types/src}/generation/index.ts +24 -24
- /package/{src/types → packages/types/src}/hotkey.ts +0 -0
- /package/{src/types → packages/types/src}/importer.ts +0 -0
- /package/{src/types → packages/types/src}/knowledgeBase/index.ts +0 -0
- /package/{src/types → packages/types/src}/llm.ts +0 -0
- /package/{src/types → packages/types/src}/locale.ts +0 -0
- /package/{src/types → packages/types/src}/message/base.ts +0 -0
- /package/{src/types → packages/types/src}/message/chat.ts +0 -0
- /package/{src/types → packages/types/src}/message/image.ts +0 -0
- /package/{src/types → packages/types/src}/message/index.ts +0 -0
- /package/{src/types → packages/types/src}/message/tools.ts +0 -0
- /package/{src/types → packages/types/src}/message/translate.ts +0 -0
- /package/{src/types → packages/types/src}/meta.ts +0 -0
- /package/{src/types → packages/types/src}/next.ts +0 -0
- /package/{src/types → packages/types/src}/openai/chat.ts +0 -0
- /package/{src/types → packages/types/src}/openai/functionCall.ts +0 -0
- /package/{src/types → packages/types/src}/openai/image.ts +0 -0
- /package/{src/types → packages/types/src}/openai/plugin.ts +0 -0
- /package/{src/types → packages/types/src}/plugins/index.ts +0 -0
- /package/{src/types → packages/types/src}/plugins/mcp.ts +0 -0
- /package/{src/types → packages/types/src}/plugins/mcpDeps.ts +0 -0
- /package/{src/types → packages/types/src}/rag.ts +0 -0
- /package/{src/types → packages/types/src}/search.ts +0 -0
- /package/{src/types → packages/types/src}/serverConfig.ts +0 -0
- /package/{src/types → packages/types/src}/service.ts +0 -0
- /package/{src/types → packages/types/src}/session/agentSession.ts +0 -0
- /package/{src/types → packages/types/src}/session/index.ts +0 -0
- /package/{src/types → packages/types/src}/session/sessionGroup.ts +0 -0
- /package/{src/types → packages/types/src}/share.ts +0 -0
- /package/{src/types → packages/types/src}/subscription.ts +0 -0
- /package/{src/types → packages/types/src}/sync.ts +0 -0
- /package/{src/types → packages/types/src}/tableViewer.ts +0 -0
- /package/{src/types → packages/types/src}/tool/builtin.ts +0 -0
- /package/{src/types → packages/types/src}/tool/crawler.ts +0 -0
- /package/{src/types → packages/types/src}/tool/dalle.ts +0 -0
- /package/{src/types → packages/types/src}/tool/index.ts +0 -0
- /package/{src/types → packages/types/src}/tool/plugin.ts +0 -0
- /package/{src/types → packages/types/src}/tool/search/index.ts +0 -0
- /package/{src/types → packages/types/src}/tool/tool.ts +0 -0
- /package/{src/types → packages/types/src}/topic/index.ts +0 -0
- /package/{src/types → packages/types/src}/topic/thread.ts +0 -0
- /package/{src/types → packages/types/src}/topic/topic.ts +0 -0
- /package/{src/types → packages/types/src}/trace/action.ts +0 -0
- /package/{src/types → packages/types/src}/trace/index.ts +0 -0
- /package/{src/types → packages/types/src}/user/index.ts +0 -0
- /package/{src/types → packages/types/src}/user/settings/filesConfig.ts +0 -0
- /package/{src/types → packages/types/src}/user/settings/general.ts +0 -0
- /package/{src/types → packages/types/src}/user/settings/hotkey.ts +0 -0
- /package/{src/types → packages/types/src}/user/settings/index.ts +0 -0
- /package/{src/types → packages/types/src}/user/settings/keyVaults.ts +0 -0
- /package/{src/types → packages/types/src}/user/settings/modelProvider.ts +0 -0
- /package/{src/types → packages/types/src}/user/settings/sync.ts +0 -0
- /package/{src/types → packages/types/src}/user/settings/systemAgent.ts +0 -0
- /package/{src/types → packages/types/src}/user/settings/tool.ts +0 -0
- /package/{src/types → packages/types/src}/user/settings/tts.ts +0 -0
@@ -17,12 +17,14 @@ const links = [
|
|
17
17
|
if (isDesktop) {
|
18
18
|
const { desktopRemoteRPCFetch } = await import('@/utils/electron/desktopRemoteRPCFetch');
|
19
19
|
|
20
|
-
|
20
|
+
// eslint-disable-next-line no-undef
|
21
|
+
const res = await desktopRemoteRPCFetch(input as string, init as RequestInit);
|
21
22
|
|
22
23
|
if (res) return res;
|
23
24
|
}
|
24
25
|
|
25
|
-
|
26
|
+
// eslint-disable-next-line no-undef
|
27
|
+
const response = await fetch(input, init as RequestInit);
|
26
28
|
|
27
29
|
if (response.ok) return response;
|
28
30
|
|
@@ -9,7 +9,8 @@ export const toolsClient = createTRPCClient<ToolsRouter>({
|
|
9
9
|
links: [
|
10
10
|
httpBatchLink({
|
11
11
|
fetch: isDesktop
|
12
|
-
?
|
12
|
+
? // eslint-disable-next-line no-undef
|
13
|
+
(input, init) => fetchWithDesktopRemoteRPC(input as string, init as RequestInit)
|
13
14
|
: undefined,
|
14
15
|
headers: async () => {
|
15
16
|
// dynamic import to avoid circular dependency
|
package/tsconfig.json
CHANGED
package/vitest.config.server.ts
CHANGED
@@ -4,7 +4,10 @@ import { coverageConfigDefaults, defineConfig } from 'vitest/config';
|
|
4
4
|
export default defineConfig({
|
5
5
|
test: {
|
6
6
|
alias: {
|
7
|
+
/* eslint-disable sort-keys-fix/sort-keys-fix */
|
8
|
+
'@/types': resolve(__dirname, './packages/types/src'),
|
7
9
|
'@': resolve(__dirname, './src'),
|
10
|
+
/* eslint-enable */
|
8
11
|
},
|
9
12
|
coverage: {
|
10
13
|
all: false,
|
@@ -18,6 +21,9 @@ export default defineConfig({
|
|
18
21
|
reporter: ['text', 'json', 'lcov', 'text-summary'],
|
19
22
|
reportsDirectory: './coverage/server',
|
20
23
|
},
|
24
|
+
env: {
|
25
|
+
TEST_SERVER_DB: '1',
|
26
|
+
},
|
21
27
|
environment: 'node',
|
22
28
|
include: ['src/database/models/**/**/*.test.ts', 'src/database/server/**/**/*.test.ts'],
|
23
29
|
poolOptions: {
|
@@ -26,8 +32,5 @@ export default defineConfig({
|
|
26
32
|
},
|
27
33
|
},
|
28
34
|
setupFiles: './tests/setup-db.ts',
|
29
|
-
env: {
|
30
|
-
TEST_SERVER_DB: '1',
|
31
|
-
},
|
32
35
|
},
|
33
36
|
});
|
package/vitest.config.ts
CHANGED
@@ -8,8 +8,11 @@ export default defineConfig({
|
|
8
8
|
},
|
9
9
|
test: {
|
10
10
|
alias: {
|
11
|
+
/* eslint-disable sort-keys-fix/sort-keys-fix */
|
12
|
+
'@/types': resolve(__dirname, './packages/types/src'),
|
11
13
|
'@': resolve(__dirname, './src'),
|
12
14
|
'~test-utils': resolve(__dirname, './tests/utils.tsx'),
|
15
|
+
/* eslint-enable */
|
13
16
|
},
|
14
17
|
coverage: {
|
15
18
|
all: false,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -1,10 +1,10 @@
|
|
1
1
|
import { AsyncTaskError, AsyncTaskStatus } from '../asyncTask';
|
2
2
|
|
3
3
|
export interface ImageGenerationTopic {
|
4
|
-
id: string;
|
5
|
-
title?: string | null;
|
6
4
|
coverUrl?: string | null;
|
7
5
|
createdAt: Date;
|
6
|
+
id: string;
|
7
|
+
title?: string | null;
|
8
8
|
updatedAt: Date;
|
9
9
|
}
|
10
10
|
|
@@ -14,68 +14,68 @@ export interface BaseGenerationAsset {
|
|
14
14
|
|
15
15
|
export interface ImageGenerationAsset extends BaseGenerationAsset {
|
16
16
|
/**
|
17
|
-
*
|
17
|
+
* 图片/视频的高度
|
18
18
|
*/
|
19
|
-
|
19
|
+
height?: number;
|
20
20
|
/**
|
21
|
-
*
|
21
|
+
* api provider 家的 cdn url,一般很快就会失效
|
22
22
|
*/
|
23
|
-
|
23
|
+
originalUrl?: string;
|
24
24
|
/**
|
25
25
|
* 缩略图,图片那就是尺寸裁剪过的,视频那就是封面的缩略图
|
26
26
|
*/
|
27
27
|
thumbnailUrl?: string;
|
28
28
|
/**
|
29
|
-
*
|
29
|
+
* 存到自己 oss 的 url, 只存了 key, 完整的 url 需要使用 FileService.getFullFileUrl 获取
|
30
30
|
*/
|
31
|
-
|
31
|
+
url?: string;
|
32
32
|
/**
|
33
|
-
*
|
33
|
+
* 图片/视频的宽度
|
34
34
|
*/
|
35
|
-
|
35
|
+
width?: number;
|
36
36
|
}
|
37
37
|
|
38
38
|
export type GenerationAsset = ImageGenerationAsset;
|
39
39
|
|
40
40
|
export interface GenerationConfig {
|
41
|
-
|
41
|
+
aspectRatio?: string;
|
42
|
+
cfg?: number;
|
43
|
+
height?: number;
|
42
44
|
imageUrl?: string | null;
|
43
45
|
imageUrls?: string[];
|
44
|
-
|
45
|
-
height?: number;
|
46
|
-
aspectRatio?: string;
|
46
|
+
prompt: string;
|
47
47
|
size?: string;
|
48
48
|
steps?: number;
|
49
|
-
|
49
|
+
width?: number;
|
50
50
|
}
|
51
51
|
|
52
52
|
export interface GenerationAsyncTask {
|
53
|
+
error?: AsyncTaskError;
|
53
54
|
id: string;
|
54
55
|
status: AsyncTaskStatus;
|
55
|
-
error?: AsyncTaskError;
|
56
56
|
}
|
57
57
|
|
58
58
|
export interface Generation {
|
59
|
-
id: string;
|
60
59
|
/**
|
61
60
|
* The asset associated with the generation, containing image URLs and dimensions.
|
62
61
|
*/
|
63
62
|
asset?: GenerationAsset | null;
|
64
|
-
seed?: number | null;
|
65
|
-
createdAt: Date;
|
66
63
|
asyncTaskId: string | null;
|
64
|
+
createdAt: Date;
|
65
|
+
id: string;
|
66
|
+
seed?: number | null;
|
67
67
|
|
68
68
|
task: GenerationAsyncTask;
|
69
69
|
}
|
70
70
|
|
71
71
|
export interface GenerationBatch {
|
72
|
+
config?: GenerationConfig;
|
73
|
+
createdAt: Date;
|
74
|
+
generations: Generation[];
|
75
|
+
height?: number | null;
|
72
76
|
id: string;
|
73
|
-
provider: string;
|
74
77
|
model: string;
|
75
78
|
prompt: string;
|
79
|
+
provider: string;
|
76
80
|
width?: number | null;
|
77
|
-
height?: number | null;
|
78
|
-
config?: GenerationConfig;
|
79
|
-
createdAt: Date;
|
80
|
-
generations: Generation[];
|
81
81
|
}
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|