From 924febd5e01d0573e1f01fa743dc76d3ee72da3c Mon Sep 17 00:00:00 2001 From: geekgeekrun Date: Sat, 12 Apr 2025 11:22:08 +0800 Subject: [PATCH] make llm config supporting array config --- .../default-config-file/llm.json | 6 +- .../ui/src/main/window/llmConfigWindow.ts | 4 +- .../src/renderer/src/page/LlmConfig/index.vue | 186 ++++++++++++------ 3 files changed, 134 insertions(+), 62 deletions(-) diff --git a/packages/geek-auto-start-chat-with-boss/default-config-file/llm.json b/packages/geek-auto-start-chat-with-boss/default-config-file/llm.json index 6b7dde8..87389d9 100644 --- a/packages/geek-auto-start-chat-with-boss/default-config-file/llm.json +++ b/packages/geek-auto-start-chat-with-boss/default-config-file/llm.json @@ -1,6 +1,8 @@ -{ +[{ "providerCompleteApiUrl": "", "providerApiSecret": "", "model": "", + "enabled": true, + "serveWeight": 100, "_extra": {} -} \ No newline at end of file +}] \ No newline at end of file diff --git a/packages/ui/src/main/window/llmConfigWindow.ts b/packages/ui/src/main/window/llmConfigWindow.ts index 0463c02..442d9d5 100644 --- a/packages/ui/src/main/window/llmConfigWindow.ts +++ b/packages/ui/src/main/window/llmConfigWindow.ts @@ -10,8 +10,8 @@ export function createLlmConfigWindow( llmConfigWindow!.show() } llmConfigWindow = new BrowserWindow({ - width: 540, - height: 400, + width: 576, + height: 800, resizable: false, show: false, autoHideMenuBar: true, diff --git a/packages/ui/src/renderer/src/page/LlmConfig/index.vue b/packages/ui/src/renderer/src/page/LlmConfig/index.vue index defab07..a5e659d 100644 --- a/packages/ui/src/renderer/src/page/LlmConfig/index.vue +++ b/packages/ui/src/renderer/src/page/LlmConfig/index.vue @@ -1,19 +1,7 @@