@lobehub/lobehub 2.0.0-next.344 → 2.0.0-next.346
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/.cursor/rules/i18n.mdc +1 -1
- package/.cursor/rules/modal-imperative.mdc +162 -0
- package/.cursor/rules/rules-index.mdc +1 -0
- package/.env.example +0 -14
- package/.eslintrc.js +8 -1
- package/CHANGELOG.md +66 -0
- package/CLAUDE.md +4 -2
- package/Dockerfile +3 -13
- package/README.md +3 -5
- package/README.zh-CN.md +3 -5
- package/changelog/v1.json +20 -0
- package/docs/self-hosting/advanced/auth/clerk-to-betterauth.mdx +11 -42
- package/docs/self-hosting/advanced/auth/clerk-to-betterauth.zh-CN.mdx +10 -41
- package/e2e/src/support/webServer.ts +2 -0
- package/locales/ar/error.json +0 -4
- package/locales/bg-BG/error.json +0 -4
- package/locales/de-DE/error.json +0 -4
- package/locales/en-US/error.json +0 -4
- package/locales/es-ES/error.json +0 -4
- package/locales/fa-IR/error.json +0 -4
- package/locales/fr-FR/error.json +0 -4
- package/locales/it-IT/error.json +0 -4
- package/locales/ja-JP/error.json +0 -4
- package/locales/ko-KR/error.json +0 -4
- package/locales/nl-NL/error.json +0 -4
- package/locales/pl-PL/error.json +0 -4
- package/locales/pt-BR/error.json +0 -4
- package/locales/ru-RU/error.json +0 -4
- package/locales/tr-TR/error.json +0 -4
- package/locales/vi-VN/error.json +0 -4
- package/locales/zh-CN/error.json +0 -4
- package/locales/zh-TW/error.json +0 -4
- package/package.json +12 -12
- package/packages/builtin-agents/package.json +2 -0
- package/packages/builtin-agents/src/agents/agent-builder/index.ts +4 -2
- package/packages/builtin-agents/src/agents/group-agent-builder/index.ts +4 -2
- package/packages/builtin-agents/src/agents/page-agent/index.ts +5 -2
- package/packages/context-engine/src/engine/messages/MessagesEngine.ts +9 -9
- package/packages/context-engine/src/providers/GroupContextInjector.ts +19 -33
- package/packages/context-engine/src/providers/__tests__/GroupContextInjector.test.ts +79 -43
- package/packages/context-engine/src/providers/__tests__/__snapshots__/GroupContextInjector.test.ts.snap +5 -15
- package/packages/database/src/repositories/userMemory/__tests__/UserMemoryTopicRepository.test.ts +24 -3
- package/packages/file-loaders/package.json +1 -1
- package/packages/file-loaders/src/loadFile.ts +10 -15
- package/packages/file-loaders/src/loaders/index.ts +68 -19
- package/packages/file-loaders/src/loaders/pdf/__snapshots__/index.test.ts.snap +1 -1
- package/packages/file-loaders/test/__snapshots__/loaders.test.ts.snap +1 -1
- package/packages/model-bank/src/modelProviders/comfyui.ts +0 -1
- package/packages/model-bank/src/modelProviders/fal.ts +0 -1
- package/packages/types/src/fetch.ts +1 -2
- package/packages/utils/src/server/__tests__/auth.test.ts +0 -47
- package/packages/utils/src/server/auth.ts +1 -9
- package/pnpm-workspace.yaml +1 -0
- package/scripts/_shared/checkDeprecatedClerkEnv.js +42 -0
- package/scripts/changelogWorkflow/buildStaticChangelog.ts +2 -1
- package/scripts/clerk-to-betterauth/_internal/types.ts +53 -20
- package/scripts/clerk-to-betterauth/export-clerk-users-with-api.ts +43 -36
- package/scripts/countEnWord.ts +1 -1
- package/scripts/electronWorkflow/modifiers/appCode.mts +2 -131
- package/scripts/i18nWorkflow/protectedPatterns.ts +1 -2
- package/scripts/prebuild.mts +10 -8
- package/scripts/serverLauncher/startServer.js +23 -5
- package/src/app/(backend)/middleware/auth/index.test.ts +8 -4
- package/src/app/(backend)/middleware/auth/index.ts +0 -15
- package/src/app/(backend)/middleware/auth/utils.test.ts +0 -28
- package/src/app/(backend)/middleware/auth/utils.ts +2 -17
- package/src/app/(backend)/webapi/chat/[provider]/route.test.ts +3 -51
- package/src/app/(backend)/webapi/models/[provider]/route.test.ts +8 -4
- package/src/app/[variants]/(auth)/next-auth/signin/AuthSignInBox.tsx +7 -6
- package/src/app/[variants]/(auth)/signup/[[...signup]]/page.tsx +1 -16
- package/src/app/[variants]/(main)/home/_layout/Body/Agent/List/index.tsx +1 -1
- package/src/app/[variants]/(main)/home/features/InputArea/SkillInstallBanner.tsx +13 -13
- package/src/app/[variants]/(main)/home/features/RecentPage/Item.tsx +2 -2
- package/src/app/[variants]/(main)/resource/features/store/action.ts +2 -2
- package/src/app/[variants]/(main)/resource/features/store/initialState.ts +2 -2
- package/src/app/[variants]/(main)/resource/store/action.ts +2 -2
- package/src/app/[variants]/(main)/resource/store/initialState.ts +2 -2
- package/src/app/[variants]/(main)/settings/hooks/useCategory.tsx +3 -21
- package/src/app/[variants]/(main)/settings/profile/features/AvatarRow.tsx +1 -2
- package/src/app/[variants]/(main)/settings/security/index.tsx +1 -22
- package/src/app/[variants]/(main)/settings/skill/features/KlavisSkillItem.tsx +12 -14
- package/src/app/[variants]/(main)/settings/skill/features/LobehubSkillItem.tsx +8 -14
- package/src/app/[variants]/(main)/settings/skill/index.tsx +7 -5
- package/src/app/[variants]/(mobile)/me/(home)/__tests__/UserBanner.test.tsx +2 -35
- package/src/app/[variants]/(mobile)/me/(home)/__tests__/useCategory.test.tsx +0 -20
- package/src/app/[variants]/(mobile)/me/(home)/features/UserBanner.tsx +1 -2
- package/src/app/[variants]/(mobile)/me/profile/features/Category.tsx +3 -13
- package/src/app/[variants]/(mobile)/settings/_layout/Header.tsx +2 -3
- package/src/app/[variants]/share/t/[id]/_layout/index.tsx +1 -1
- package/src/app/[variants]/share/t/[id]/index.tsx +1 -1
- package/src/app/robots.tsx +1 -1
- package/src/envs/auth.ts +2 -27
- package/src/envs/llm.ts +2 -2
- package/src/features/AgentSetting/AgentPlugin/index.tsx +9 -12
- package/src/features/ChatInput/ActionBar/Tools/index.tsx +7 -5
- package/src/features/ChatMiniMap/utils.ts +1 -1
- package/src/features/CommandMenu/SearchResults.tsx +1 -1
- package/src/features/Conversation/ChatList/components/AutoScroll/DebugInspector.tsx +166 -0
- package/src/features/Conversation/ChatList/components/AutoScroll/index.tsx +86 -0
- package/src/features/Conversation/ChatList/components/VirtualizedList.tsx +11 -17
- package/src/features/Conversation/Messages/AgentCouncil/components/AutoScrollShadow.tsx +25 -14
- package/src/features/Conversation/Messages/AgentCouncil/components/CouncilMember.tsx +1 -1
- package/src/features/FileViewer/Renderer/PDF/index.tsx +5 -8
- package/src/features/IntegrationDetailModal/IntegrationDetailContent.tsx +305 -0
- package/src/features/IntegrationDetailModal/index.tsx +21 -283
- package/src/features/MCPPluginDetail/Deployment/index.tsx +1 -1
- package/src/features/MCPPluginDetail/Schema/Prompts.tsx +1 -1
- package/src/features/MCPPluginDetail/Schema/Tools.tsx +1 -1
- package/src/features/ProfileEditor/AgentTool.tsx +14 -20
- package/src/features/ResourceManager/components/Explorer/ListView/ListItem/index.tsx +0 -8
- package/src/features/ResourceManager/components/Explorer/MasonryView/MasonryFileItem/NoteFileItem.tsx +1 -1
- package/src/features/ResourceManager/index.tsx +1 -1
- package/src/features/ShareModal/SharePdf/PdfPreview.tsx +4 -4
- package/src/features/SkillStore/LobeHubList/index.tsx +50 -87
- package/src/features/SkillStore/Search/index.tsx +1 -1
- package/src/features/SkillStore/{Content.tsx → SkillStoreContent.tsx} +3 -8
- package/src/features/SkillStore/index.tsx +15 -33
- package/src/features/User/UserPanel/PanelContent.tsx +0 -8
- package/src/features/User/__tests__/PanelContent.test.tsx +1 -35
- package/src/features/User/__tests__/UserAvatar.test.tsx +30 -57
- package/src/features/User/__tests__/useMenu.test.tsx +2 -43
- package/src/layout/AuthProvider/index.tsx +0 -5
- package/src/libs/next/config/define-config.ts +20 -15
- package/src/libs/next/proxy/createRouteMatcher.test.ts +121 -0
- package/src/libs/next/proxy/createRouteMatcher.ts +18 -0
- package/src/libs/next/proxy/define-config.ts +4 -53
- package/src/libs/next-auth/adapter/index.ts +1 -2
- package/src/libs/oidc-provider/provider.test.ts +5 -316
- package/src/libs/pdfjs/pdf.worker.ts +1 -0
- package/src/libs/pdfjs/worker.ts +12 -0
- package/src/libs/trpc/lambda/context.test.ts +0 -13
- package/src/libs/trpc/lambda/context.ts +3 -22
- package/src/libs/trpc/middleware/userAuth.ts +2 -4
- package/src/libs/trusted-client/getSessionUser.ts +2 -17
- package/src/locales/default/error.ts +0 -6
- package/src/locales/default/index.ts +0 -2
- package/src/proxy.ts +0 -1
- package/src/server/routers/lambda/__tests__/user.test.ts +0 -71
- package/src/server/routers/lambda/user.ts +6 -63
- package/src/server/services/changelog/index.test.ts +3 -2
- package/src/server/services/changelog/index.ts +1 -1
- package/src/server/services/user/index.ts +0 -83
- package/src/services/chat/index.ts +1 -2
- package/src/services/chat/mecha/agentConfigResolver.test.ts +43 -0
- package/src/services/chat/mecha/agentConfigResolver.ts +3 -1
- package/src/store/chat/slices/aiChat/actions/__tests__/streamingExecutor.test.ts +58 -14
- package/src/store/chat/slices/aiChat/actions/streamingExecutor.ts +10 -2
- package/src/store/user/slices/auth/action.test.ts +1 -81
- package/src/store/user/slices/auth/action.ts +3 -28
- package/src/store/user/slices/auth/initialState.ts +1 -18
- package/src/store/user/slices/auth/selectors.test.ts +2 -127
- package/src/store/user/slices/auth/selectors.ts +1 -21
- package/src/utils/errorResponse.ts +1 -4
- package/src/utils/markdownToTxt.ts +20 -0
- package/locales/ar/clerk.json +0 -545
- package/locales/bg-BG/clerk.json +0 -545
- package/locales/de-DE/clerk.json +0 -545
- package/locales/en-US/clerk.json +0 -545
- package/locales/es-ES/clerk.json +0 -545
- package/locales/fa-IR/clerk.json +0 -545
- package/locales/fr-FR/clerk.json +0 -545
- package/locales/it-IT/clerk.json +0 -545
- package/locales/ja-JP/clerk.json +0 -545
- package/locales/ko-KR/clerk.json +0 -545
- package/locales/nl-NL/clerk.json +0 -545
- package/locales/pl-PL/clerk.json +0 -545
- package/locales/pt-BR/clerk.json +0 -545
- package/locales/ru-RU/clerk.json +0 -545
- package/locales/tr-TR/clerk.json +0 -545
- package/locales/vi-VN/clerk.json +0 -545
- package/locales/zh-CN/clerk.json +0 -545
- package/locales/zh-TW/clerk.json +0 -545
- package/src/app/(backend)/api/webhooks/clerk/__tests__/fixtures/createUser.json +0 -73
- package/src/app/(backend)/api/webhooks/clerk/route.ts +0 -95
- package/src/app/(backend)/api/webhooks/clerk/validateRequest.ts +0 -22
- package/src/app/[variants]/(auth)/login/[[...login]]/page.tsx +0 -27
- package/src/app/[variants]/(main)/settings/security/features/ClerkProfile.tsx +0 -67
- package/src/features/Conversation/ChatList/components/AutoScroll.tsx +0 -25
- package/src/layout/AuthProvider/Clerk/UserUpdater.tsx +0 -40
- package/src/layout/AuthProvider/Clerk/index.tsx +0 -54
- package/src/layout/AuthProvider/Clerk/useAppearance.ts +0 -133
- package/src/libs/clerk-auth/index.test.ts +0 -216
- package/src/libs/clerk-auth/index.ts +0 -80
- package/src/locales/default/clerk.ts +0 -677
- package/src/server/services/user/index.test.ts +0 -220
package/locales/en-US/error.json
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
{
|
|
2
|
-
"clerkAuth.loginSuccess.action": "Continue Session",
|
|
3
|
-
"clerkAuth.loginSuccess.desc": "{{greeting}}, it's great to continue serving you. Let's pick up where we left off.",
|
|
4
|
-
"clerkAuth.loginSuccess.title": "Welcome back, {{nickName}}",
|
|
5
2
|
"error.backHome": "Back to Home",
|
|
6
3
|
"error.desc": "Give it a try later, or go back to the known world.",
|
|
7
4
|
"error.retry": "Reload",
|
|
@@ -87,7 +84,6 @@
|
|
|
87
84
|
"response.InsufficientQuota": "Sorry, the quota for this key has been reached. Please check if your account balance is sufficient or try again after increasing the key's quota.",
|
|
88
85
|
"response.InvalidAccessCode": "Invalid access code or empty. Please enter the correct access code or add a custom API Key.",
|
|
89
86
|
"response.InvalidBedrockCredentials": "Bedrock authentication failed. Please check the AccessKeyId/SecretAccessKey and retry.",
|
|
90
|
-
"response.InvalidClerkUser": "Sorry, you are not currently logged in. Please log in or register an account to continue.",
|
|
91
87
|
"response.InvalidComfyUIArgs": "Invalid ComfyUI configuration. Please check the settings and try again.",
|
|
92
88
|
"response.InvalidGithubToken": "The GitHub Personal Access Token is incorrect or empty. Please check your GitHub Personal Access Token and try again.",
|
|
93
89
|
"response.InvalidOllamaArgs": "Invalid Ollama configuration, please check Ollama configuration and try again",
|
package/locales/es-ES/error.json
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
{
|
|
2
|
-
"clerkAuth.loginSuccess.action": "Continuar sesión",
|
|
3
|
-
"clerkAuth.loginSuccess.desc": "{{greeting}}, es un placer seguir atendiéndote. Continuemos donde lo dejamos.",
|
|
4
|
-
"clerkAuth.loginSuccess.title": "Bienvenido de nuevo, {{nickName}}",
|
|
5
2
|
"error.backHome": "Volver al inicio",
|
|
6
3
|
"error.desc": "Inténtalo más tarde o regresa al mundo conocido.",
|
|
7
4
|
"error.retry": "Recargar",
|
|
@@ -87,7 +84,6 @@
|
|
|
87
84
|
"response.InsufficientQuota": "Lo sentimos, se ha alcanzado la cuota de esta clave. Verifica tu saldo o aumenta la cuota.",
|
|
88
85
|
"response.InvalidAccessCode": "Código de acceso inválido o vacío. Ingresa el código correcto o una API Key personalizada.",
|
|
89
86
|
"response.InvalidBedrockCredentials": "Error de autenticación de Bedrock. Verifica AccessKeyId/SecretAccessKey.",
|
|
90
|
-
"response.InvalidClerkUser": "Lo sentimos, no has iniciado sesión. Inicia sesión o regístrate para continuar.",
|
|
91
87
|
"response.InvalidComfyUIArgs": "Configuración inválida de ComfyUI. Verifica los ajustes.",
|
|
92
88
|
"response.InvalidGithubToken": "El token de acceso personal de GitHub es incorrecto o está vacío.",
|
|
93
89
|
"response.InvalidOllamaArgs": "Configuración inválida de Ollama. Verifica los ajustes.",
|
package/locales/fa-IR/error.json
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
{
|
|
2
|
-
"clerkAuth.loginSuccess.action": "ادامه جلسه",
|
|
3
|
-
"clerkAuth.loginSuccess.desc": "{{greeting}}، خوشحالیم که دوباره در خدمت شما هستیم. بیایید از جایی که متوقف شدیم ادامه دهیم.",
|
|
4
|
-
"clerkAuth.loginSuccess.title": "خوش آمدید، {{nickName}}",
|
|
5
2
|
"error.backHome": "بازگشت به خانه",
|
|
6
3
|
"error.desc": "بعداً دوباره امتحان کنید یا به دنیای آشنا بازگردید.",
|
|
7
4
|
"error.retry": "بارگذاری مجدد",
|
|
@@ -87,7 +84,6 @@
|
|
|
87
84
|
"response.InsufficientQuota": "متأسفیم، سهمیه این کلید به پایان رسیده است. لطفاً موجودی حساب خود را بررسی کرده یا پس از افزایش سهمیه دوباره تلاش کنید.",
|
|
88
85
|
"response.InvalidAccessCode": "کد دسترسی نامعتبر یا خالی است. لطفاً کد صحیح را وارد کرده یا یک کلید API سفارشی اضافه کنید.",
|
|
89
86
|
"response.InvalidBedrockCredentials": "احراز هویت Bedrock ناموفق بود. لطفاً AccessKeyId/SecretAccessKey را بررسی کرده و دوباره تلاش کنید.",
|
|
90
|
-
"response.InvalidClerkUser": "متأسفیم، شما وارد نشدهاید. لطفاً وارد شوید یا یک حساب کاربری ایجاد کنید.",
|
|
91
87
|
"response.InvalidComfyUIArgs": "پیکربندی ComfyUI نامعتبر است. لطفاً تنظیمات را بررسی کرده و دوباره تلاش کنید.",
|
|
92
88
|
"response.InvalidGithubToken": "توکن دسترسی شخصی GitHub نادرست یا خالی است. لطفاً آن را بررسی کرده و دوباره تلاش کنید.",
|
|
93
89
|
"response.InvalidOllamaArgs": "پیکربندی Ollama نامعتبر است. لطفاً تنظیمات را بررسی کرده و دوباره تلاش کنید.",
|
package/locales/fr-FR/error.json
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
{
|
|
2
|
-
"clerkAuth.loginSuccess.action": "Continuer la session",
|
|
3
|
-
"clerkAuth.loginSuccess.desc": "{{greeting}}, ravi de vous retrouver. Reprenons là où nous nous étions arrêtés.",
|
|
4
|
-
"clerkAuth.loginSuccess.title": "Bon retour, {{nickName}}",
|
|
5
2
|
"error.backHome": "Retour à l'accueil",
|
|
6
3
|
"error.desc": "Réessayez plus tard ou revenez dans un territoire connu.",
|
|
7
4
|
"error.retry": "Recharger",
|
|
@@ -87,7 +84,6 @@
|
|
|
87
84
|
"response.InsufficientQuota": "Désolé, le quota de cette clé a été atteint. Veuillez vérifier votre solde ou augmenter le quota.",
|
|
88
85
|
"response.InvalidAccessCode": "Code d'accès invalide ou vide. Veuillez entrer le bon code ou ajouter une clé API personnalisée.",
|
|
89
86
|
"response.InvalidBedrockCredentials": "Échec de l'authentification Bedrock. Veuillez vérifier vos identifiants et réessayer.",
|
|
90
|
-
"response.InvalidClerkUser": "Désolé, vous n'êtes pas connecté. Veuillez vous connecter ou créer un compte.",
|
|
91
87
|
"response.InvalidComfyUIArgs": "Configuration ComfyUI invalide. Veuillez vérifier les paramètres et réessayer.",
|
|
92
88
|
"response.InvalidGithubToken": "Le jeton GitHub est incorrect ou vide. Veuillez le vérifier et réessayer.",
|
|
93
89
|
"response.InvalidOllamaArgs": "Configuration Ollama invalide. Veuillez vérifier et réessayer.",
|
package/locales/it-IT/error.json
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
{
|
|
2
|
-
"clerkAuth.loginSuccess.action": "Continua la sessione",
|
|
3
|
-
"clerkAuth.loginSuccess.desc": "{{greeting}}, è un piacere continuare a servirti. Riprendiamo da dove ci siamo interrotti.",
|
|
4
|
-
"clerkAuth.loginSuccess.title": "Bentornato, {{nickName}}",
|
|
5
2
|
"error.backHome": "Torna alla Home",
|
|
6
3
|
"error.desc": "Riprova più tardi o torna al mondo conosciuto.",
|
|
7
4
|
"error.retry": "Ricarica",
|
|
@@ -87,7 +84,6 @@
|
|
|
87
84
|
"response.InsufficientQuota": "Spiacenti, la quota per questa chiave è stata raggiunta. Verifica il saldo del tuo account o aumenta la quota della chiave.",
|
|
88
85
|
"response.InvalidAccessCode": "Codice di accesso non valido o vuoto. Inserisci il codice corretto o aggiungi una API Key personalizzata.",
|
|
89
86
|
"response.InvalidBedrockCredentials": "Autenticazione Bedrock fallita. Verifica AccessKeyId/SecretAccessKey e riprova.",
|
|
90
|
-
"response.InvalidClerkUser": "Spiacenti, non sei attualmente connesso. Accedi o registrati per continuare.",
|
|
91
87
|
"response.InvalidComfyUIArgs": "Configurazione ComfyUI non valida. Controlla le impostazioni e riprova.",
|
|
92
88
|
"response.InvalidGithubToken": "Il token personale GitHub è errato o vuoto. Verifica il token e riprova.",
|
|
93
89
|
"response.InvalidOllamaArgs": "Configurazione Ollama non valida. Controlla le impostazioni e riprova.",
|
package/locales/ja-JP/error.json
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
{
|
|
2
|
-
"clerkAuth.loginSuccess.action": "続ける",
|
|
3
|
-
"clerkAuth.loginSuccess.desc": "{{greeting}}、{{nickName}} さん。前回のトピックに戻ります。いつでも新しいトピックに切り替えられます",
|
|
4
|
-
"clerkAuth.loginSuccess.title": "おかえりなさい、{{nickName}}",
|
|
5
2
|
"error.backHome": "ホームに戻る",
|
|
6
3
|
"error.desc": "ページが一時的に利用できません。ホームに戻るか、時間を置いて再試行してください(設定は失われません)",
|
|
7
4
|
"error.retry": "再読み込み",
|
|
@@ -87,7 +84,6 @@
|
|
|
87
84
|
"response.InsufficientQuota": "クォータが使い果たされました。残高/クォータ設定を確認するか、使用可能な API キーに切り替えてから再試行してください",
|
|
88
85
|
"response.InvalidAccessCode": "アクセスパスワードが空または正しくありません。正しいパスワードを再入力するか、カスタム API キーを使用してください",
|
|
89
86
|
"response.InvalidBedrockCredentials": "Bedrock 認証に失敗しました。AccessKeyId/SecretAccessKey を確認してから再試行してください",
|
|
90
|
-
"response.InvalidClerkUser": "ログインが必要です。先にログインまたは登録してください",
|
|
91
87
|
"response.InvalidComfyUIArgs": "ComfyUI 設定が正しくありません。設定を確認してから再試行してください",
|
|
92
88
|
"response.InvalidGithubToken": "GitHub PAT が空または正しくありません。確認してから再試行してください",
|
|
93
89
|
"response.InvalidOllamaArgs": "Ollama 設定が正しくありません。設定を確認してから再試行してください",
|
package/locales/ko-KR/error.json
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
{
|
|
2
|
-
"clerkAuth.loginSuccess.action": "계속하기",
|
|
3
|
-
"clerkAuth.loginSuccess.desc": "{{greeting}}님, {{nickName}}입니다. 이전 주제로 돌아갑니다. 언제든지 새 주제로 전환할 수 있습니다",
|
|
4
|
-
"clerkAuth.loginSuccess.title": "다시 환영합니다, {{nickName}}",
|
|
5
2
|
"error.backHome": "홈으로 돌아가기",
|
|
6
3
|
"error.desc": "페이지를 일시적으로 사용할 수 없습니다. 홈으로 돌아가거나 잠시 후 다시 시도하세요(설정은 손실되지 않습니다)",
|
|
7
4
|
"error.retry": "다시 로드",
|
|
@@ -87,7 +84,6 @@
|
|
|
87
84
|
"response.InsufficientQuota": "할당량이 소진되었습니다. 잔액/할당량 설정을 확인하거나 사용 가능한 API 키로 전환한 후 다시 시도하세요",
|
|
88
85
|
"response.InvalidAccessCode": "액세스 암호가 비어 있거나 올바르지 않습니다. 올바른 암호를 다시 입력하거나 사용자 정의 API 키를 사용하세요",
|
|
89
86
|
"response.InvalidBedrockCredentials": "Bedrock 인증에 실패했습니다. AccessKeyId/SecretAccessKey를 확인한 후 다시 시도하세요",
|
|
90
|
-
"response.InvalidClerkUser": "로그인이 필요합니다. 먼저 로그인하거나 등록하세요",
|
|
91
87
|
"response.InvalidComfyUIArgs": "ComfyUI 설정이 올바르지 않습니다. 설정을 확인한 후 다시 시도하세요",
|
|
92
88
|
"response.InvalidGithubToken": "GitHub PAT가 비어 있거나 올바르지 않습니다. 확인한 후 다시 시도하세요",
|
|
93
89
|
"response.InvalidOllamaArgs": "Ollama 설정이 올바르지 않습니다. 설정을 확인한 후 다시 시도하세요",
|
package/locales/nl-NL/error.json
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
{
|
|
2
|
-
"clerkAuth.loginSuccess.action": "Sessie voortzetten",
|
|
3
|
-
"clerkAuth.loginSuccess.desc": "{{greeting}}, fijn om je weer van dienst te zijn. Laten we verdergaan waar we gebleven waren.",
|
|
4
|
-
"clerkAuth.loginSuccess.title": "Welkom terug, {{nickName}}",
|
|
5
2
|
"error.backHome": "Terug naar home",
|
|
6
3
|
"error.desc": "Probeer het later opnieuw of keer terug naar de bekende wereld.",
|
|
7
4
|
"error.retry": "Opnieuw laden",
|
|
@@ -87,7 +84,6 @@
|
|
|
87
84
|
"response.InsufficientQuota": "Sorry, het quotum voor deze sleutel is bereikt. Controleer je accountbalans of verhoog het quotum en probeer opnieuw.",
|
|
88
85
|
"response.InvalidAccessCode": "Ongeldige of lege toegangscode. Voer de juiste toegangscode in of voeg een aangepaste API-sleutel toe.",
|
|
89
86
|
"response.InvalidBedrockCredentials": "Bedrock-authenticatie mislukt. Controleer AccessKeyId/SecretAccessKey en probeer opnieuw.",
|
|
90
|
-
"response.InvalidClerkUser": "Sorry, je bent momenteel niet ingelogd. Log in of registreer een account om verder te gaan.",
|
|
91
87
|
"response.InvalidComfyUIArgs": "Ongeldige ComfyUI-configuratie. Controleer de instellingen en probeer opnieuw.",
|
|
92
88
|
"response.InvalidGithubToken": "De GitHub Personal Access Token is onjuist of leeg. Controleer je token en probeer opnieuw.",
|
|
93
89
|
"response.InvalidOllamaArgs": "Ongeldige Ollama-configuratie. Controleer de instellingen en probeer opnieuw.",
|
package/locales/pl-PL/error.json
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
{
|
|
2
|
-
"clerkAuth.loginSuccess.action": "Kontynuuj sesję",
|
|
3
|
-
"clerkAuth.loginSuccess.desc": "{{greeting}}, miło znów Cię widzieć. Kontynuujmy tam, gdzie przerwaliśmy.",
|
|
4
|
-
"clerkAuth.loginSuccess.title": "Witaj ponownie, {{nickName}}",
|
|
5
2
|
"error.backHome": "Powrót do strony głównej",
|
|
6
3
|
"error.desc": "Spróbuj ponownie później lub wróć do znanego świata.",
|
|
7
4
|
"error.retry": "Odśwież",
|
|
@@ -87,7 +84,6 @@
|
|
|
87
84
|
"response.InsufficientQuota": "Przepraszamy, limit dla tego klucza został osiągnięty. Sprawdź saldo konta lub zwiększ limit i spróbuj ponownie.",
|
|
88
85
|
"response.InvalidAccessCode": "Nieprawidłowy lub pusty kod dostępu. Wprowadź poprawny kod lub dodaj własny klucz API.",
|
|
89
86
|
"response.InvalidBedrockCredentials": "Uwierzytelnienie Bedrock nie powiodło się. Sprawdź AccessKeyId/SecretAccessKey i spróbuj ponownie.",
|
|
90
|
-
"response.InvalidClerkUser": "Przepraszamy, nie jesteś zalogowany. Zaloguj się lub zarejestruj, aby kontynuować.",
|
|
91
87
|
"response.InvalidComfyUIArgs": "Nieprawidłowa konfiguracja ComfyUI. Sprawdź ustawienia i spróbuj ponownie.",
|
|
92
88
|
"response.InvalidGithubToken": "Nieprawidłowy lub pusty token GitHub. Sprawdź token i spróbuj ponownie.",
|
|
93
89
|
"response.InvalidOllamaArgs": "Nieprawidłowa konfiguracja Ollama. Sprawdź ustawienia i spróbuj ponownie.",
|
package/locales/pt-BR/error.json
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
{
|
|
2
|
-
"clerkAuth.loginSuccess.action": "Continuar Sessão",
|
|
3
|
-
"clerkAuth.loginSuccess.desc": "{{greeting}}, é ótimo continuar atendendo você. Vamos retomar de onde paramos.",
|
|
4
|
-
"clerkAuth.loginSuccess.title": "Bem-vindo de volta, {{nickName}}",
|
|
5
2
|
"error.backHome": "Voltar para a Página Inicial",
|
|
6
3
|
"error.desc": "Tente novamente mais tarde ou volte para o mundo conhecido.",
|
|
7
4
|
"error.retry": "Recarregar",
|
|
@@ -87,7 +84,6 @@
|
|
|
87
84
|
"response.InsufficientQuota": "Desculpe, a cota desta chave foi atingida. Verifique o saldo da conta ou aumente a cota.",
|
|
88
85
|
"response.InvalidAccessCode": "Código de acesso inválido ou vazio. Insira o código correto ou adicione uma API Key personalizada.",
|
|
89
86
|
"response.InvalidBedrockCredentials": "Falha na autenticação do Bedrock. Verifique AccessKeyId/SecretAccessKey e tente novamente.",
|
|
90
|
-
"response.InvalidClerkUser": "Desculpe, você não está logado. Faça login ou registre-se para continuar.",
|
|
91
87
|
"response.InvalidComfyUIArgs": "Configuração inválida do ComfyUI. Verifique as configurações e tente novamente.",
|
|
92
88
|
"response.InvalidGithubToken": "O token de acesso pessoal do GitHub está incorreto ou vazio. Verifique e tente novamente.",
|
|
93
89
|
"response.InvalidOllamaArgs": "Configuração inválida do Ollama. Verifique e tente novamente.",
|
package/locales/ru-RU/error.json
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
{
|
|
2
|
-
"clerkAuth.loginSuccess.action": "Продолжить сессию",
|
|
3
|
-
"clerkAuth.loginSuccess.desc": "{{greeting}}, рады снова быть вам полезными. Давайте продолжим с того места, на котором остановились.",
|
|
4
|
-
"clerkAuth.loginSuccess.title": "С возвращением, {{nickName}}",
|
|
5
2
|
"error.backHome": "Вернуться на главную",
|
|
6
3
|
"error.desc": "Попробуйте позже или вернитесь в знакомый мир.",
|
|
7
4
|
"error.retry": "Перезагрузить",
|
|
@@ -87,7 +84,6 @@
|
|
|
87
84
|
"response.InsufficientQuota": "Извините, достигнут лимит по ключу. Проверьте баланс аккаунта или увеличьте квоту ключа.",
|
|
88
85
|
"response.InvalidAccessCode": "Неверный или пустой код доступа. Введите корректный код или добавьте пользовательский API-ключ.",
|
|
89
86
|
"response.InvalidBedrockCredentials": "Ошибка аутентификации Bedrock. Проверьте AccessKeyId/SecretAccessKey и повторите попытку.",
|
|
90
|
-
"response.InvalidClerkUser": "Извините, вы не вошли в систему. Пожалуйста, войдите или зарегистрируйтесь.",
|
|
91
87
|
"response.InvalidComfyUIArgs": "Некорректная конфигурация ComfyUI. Проверьте настройки и повторите попытку.",
|
|
92
88
|
"response.InvalidGithubToken": "Неверный или пустой GitHub Personal Access Token. Проверьте токен и повторите попытку.",
|
|
93
89
|
"response.InvalidOllamaArgs": "Некорректная конфигурация Ollama. Проверьте настройки и повторите попытку.",
|
package/locales/tr-TR/error.json
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
{
|
|
2
|
-
"clerkAuth.loginSuccess.action": "Oturuma Devam Et",
|
|
3
|
-
"clerkAuth.loginSuccess.desc": "{{greeting}}, size hizmet vermeye devam etmek harika. Kaldığımız yerden devam edelim.",
|
|
4
|
-
"clerkAuth.loginSuccess.title": "Tekrar hoş geldiniz, {{nickName}}",
|
|
5
2
|
"error.backHome": "Ana Sayfaya Dön",
|
|
6
3
|
"error.desc": "Daha sonra tekrar deneyin ya da bilinen dünyaya geri dönün.",
|
|
7
4
|
"error.retry": "Yeniden Yükle",
|
|
@@ -87,7 +84,6 @@
|
|
|
87
84
|
"response.InsufficientQuota": "Üzgünüz, bu anahtar için kota sınırına ulaşıldı. Lütfen hesabınızın bakiyesini kontrol edin veya kotayı artırdıktan sonra tekrar deneyin.",
|
|
88
85
|
"response.InvalidAccessCode": "Geçersiz veya boş erişim kodu. Lütfen doğru erişim kodunu girin veya özel bir API Anahtarı ekleyin.",
|
|
89
86
|
"response.InvalidBedrockCredentials": "Bedrock kimlik doğrulaması başarısız oldu. Lütfen AccessKeyId/SecretAccessKey bilgilerinizi kontrol edip tekrar deneyin.",
|
|
90
|
-
"response.InvalidClerkUser": "Üzgünüz, şu anda giriş yapmadınız. Devam etmek için lütfen giriş yapın veya hesap oluşturun.",
|
|
91
87
|
"response.InvalidComfyUIArgs": "Geçersiz ComfyUI yapılandırması. Lütfen ayarları kontrol edip tekrar deneyin.",
|
|
92
88
|
"response.InvalidGithubToken": "GitHub Kişisel Erişim Anahtarı hatalı veya boş. Lütfen kontrol edip tekrar deneyin.",
|
|
93
89
|
"response.InvalidOllamaArgs": "Geçersiz Ollama yapılandırması. Lütfen ayarları kontrol edip tekrar deneyin.",
|
package/locales/vi-VN/error.json
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
{
|
|
2
|
-
"clerkAuth.loginSuccess.action": "Tiếp tục phiên",
|
|
3
|
-
"clerkAuth.loginSuccess.desc": "{{greeting}}, rất vui được tiếp tục phục vụ bạn. Hãy tiếp tục từ nơi bạn đã dừng lại.",
|
|
4
|
-
"clerkAuth.loginSuccess.title": "Chào mừng trở lại, {{nickName}}",
|
|
5
2
|
"error.backHome": "Quay về Trang chủ",
|
|
6
3
|
"error.desc": "Hãy thử lại sau, hoặc quay về thế giới quen thuộc.",
|
|
7
4
|
"error.retry": "Tải lại",
|
|
@@ -87,7 +84,6 @@
|
|
|
87
84
|
"response.InsufficientQuota": "Xin lỗi, hạn mức của khóa này đã đạt giới hạn. Vui lòng kiểm tra số dư tài khoản hoặc tăng hạn mức khóa rồi thử lại.",
|
|
88
85
|
"response.InvalidAccessCode": "Mã truy cập không hợp lệ hoặc để trống. Vui lòng nhập mã truy cập chính xác hoặc thêm API Key tùy chỉnh.",
|
|
89
86
|
"response.InvalidBedrockCredentials": "Xác thực Bedrock thất bại. Vui lòng kiểm tra AccessKeyId/SecretAccessKey và thử lại.",
|
|
90
|
-
"response.InvalidClerkUser": "Xin lỗi, bạn chưa đăng nhập. Vui lòng đăng nhập hoặc đăng ký tài khoản để tiếp tục.",
|
|
91
87
|
"response.InvalidComfyUIArgs": "Cấu hình ComfyUI không hợp lệ. Vui lòng kiểm tra cài đặt và thử lại.",
|
|
92
88
|
"response.InvalidGithubToken": "GitHub Personal Access Token không hợp lệ hoặc để trống. Vui lòng kiểm tra và thử lại.",
|
|
93
89
|
"response.InvalidOllamaArgs": "Cấu hình Ollama không hợp lệ, vui lòng kiểm tra và thử lại.",
|
package/locales/zh-CN/error.json
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
{
|
|
2
|
-
"clerkAuth.loginSuccess.action": "继续会话",
|
|
3
|
-
"clerkAuth.loginSuccess.desc": "{{greeting}},{{nickName}},我们从上次的话题继续;你也可以随时切换到新话题",
|
|
4
|
-
"clerkAuth.loginSuccess.title": "欢迎回来,{{nickName}}",
|
|
5
2
|
"error.backHome": "返回首页",
|
|
6
3
|
"error.desc": "页面暂时不可用。你可以返回首页,或稍后重试(你的设置不会因此丢失)",
|
|
7
4
|
"error.retry": "重新加载",
|
|
@@ -87,7 +84,6 @@
|
|
|
87
84
|
"response.InsufficientQuota": "配额已用尽。请检查余额/配额设置,或更换可用的 API Key 后重试",
|
|
88
85
|
"response.InvalidAccessCode": "访问密码为空或不正确。请重新输入,或改用自定义 API Key",
|
|
89
86
|
"response.InvalidBedrockCredentials": "Bedrock 鉴权失败。请检查 AccessKeyId/SecretAccessKey 后重试",
|
|
90
|
-
"response.InvalidClerkUser": "需要登录后继续。请先登录或注册",
|
|
91
87
|
"response.InvalidComfyUIArgs": "ComfyUI 配置不正确。请检查配置后重试",
|
|
92
88
|
"response.InvalidGithubToken": "GitHub PAT 为空或不正确。请检查后重试",
|
|
93
89
|
"response.InvalidOllamaArgs": "Ollama 配置不正确。请检查配置后重试",
|
package/locales/zh-TW/error.json
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
{
|
|
2
|
-
"clerkAuth.loginSuccess.action": "繼續會話",
|
|
3
|
-
"clerkAuth.loginSuccess.desc": "{{greeting}},很高興能夠繼續為你服務。讓我們接著剛剛的話題聊下去吧",
|
|
4
|
-
"clerkAuth.loginSuccess.title": "歡迎回來, {{nickName}}",
|
|
5
2
|
"error.backHome": "返回首頁",
|
|
6
3
|
"error.desc": "待會再試試,或者回到已知的世界",
|
|
7
4
|
"error.retry": "重新加載",
|
|
@@ -87,7 +84,6 @@
|
|
|
87
84
|
"response.InsufficientQuota": "很抱歉,該金鑰的配額已達上限,請檢查帳戶餘額是否充足,或提升金鑰配額後再試",
|
|
88
85
|
"response.InvalidAccessCode": "密碼不正確或為空,請輸入正確的訪問密碼,或添加自定義 API 金鑰",
|
|
89
86
|
"response.InvalidBedrockCredentials": "Bedrock 驗證未通過,請檢查 AccessKeyId/SecretAccessKey 後重試",
|
|
90
|
-
"response.InvalidClerkUser": "很抱歉,你當前尚未登錄,請先登錄或註冊帳號後繼續操作",
|
|
91
87
|
"response.InvalidComfyUIArgs": "ComfyUI 設定不正確,請檢查 ComfyUI 設定後重試",
|
|
92
88
|
"response.InvalidGithubToken": "Github 個人存取權杖不正確或為空,請檢查 Github 個人存取權杖後再試一次",
|
|
93
89
|
"response.InvalidOllamaArgs": "Ollama 配置不正確,請檢查 Ollama 配置後重試",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lobehub/lobehub",
|
|
3
|
-
"version": "2.0.0-next.
|
|
3
|
+
"version": "2.0.0-next.346",
|
|
4
4
|
"description": "LobeHub - an open-source,comprehensive AI Agent framework that supports speech synthesis, multimodal, and extensible Function Call plugin system. Supports one-click free deployment of your private ChatGPT/LLM web application.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"framework",
|
|
@@ -133,6 +133,7 @@
|
|
|
133
133
|
]
|
|
134
134
|
},
|
|
135
135
|
"overrides": {
|
|
136
|
+
"pdfjs-dist": "5.4.530",
|
|
136
137
|
"stylelint-config-clean-order": "7.0.0"
|
|
137
138
|
},
|
|
138
139
|
"dependencies": {
|
|
@@ -145,12 +146,9 @@
|
|
|
145
146
|
"@aws-sdk/s3-request-presigner": "~3.932.0",
|
|
146
147
|
"@azure-rest/ai-inference": "1.0.0-beta.5",
|
|
147
148
|
"@azure/core-auth": "^1.10.1",
|
|
148
|
-
"@better-auth/expo": "1.4.
|
|
149
|
-
"@better-auth/passkey": "^1.4.
|
|
149
|
+
"@better-auth/expo": "1.4.17",
|
|
150
|
+
"@better-auth/passkey": "^1.4.17",
|
|
150
151
|
"@cfworker/json-schema": "^4.1.1",
|
|
151
|
-
"@clerk/localizations": "^3.32.1",
|
|
152
|
-
"@clerk/nextjs": "^6.36.5",
|
|
153
|
-
"@clerk/themes": "^2.4.46",
|
|
154
152
|
"@codesandbox/sandpack-react": "^2.20.0",
|
|
155
153
|
"@dnd-kit/core": "^6.3.1",
|
|
156
154
|
"@dnd-kit/utilities": "^3.2.2",
|
|
@@ -207,13 +205,14 @@
|
|
|
207
205
|
"@lobehub/icons": "^4.0.2",
|
|
208
206
|
"@lobehub/market-sdk": "0.29.1",
|
|
209
207
|
"@lobehub/tts": "^4.0.2",
|
|
210
|
-
"@lobehub/ui": "^4.
|
|
208
|
+
"@lobehub/ui": "^4.27.4",
|
|
211
209
|
"@modelcontextprotocol/sdk": "^1.25.1",
|
|
210
|
+
"@napi-rs/canvas": "^0.1.88",
|
|
212
211
|
"@neondatabase/serverless": "^1.0.2",
|
|
213
212
|
"@next/third-parties": "^16.1.1",
|
|
214
213
|
"@opentelemetry/exporter-jaeger": "^2.2.0",
|
|
215
214
|
"@opentelemetry/winston-transport": "^0.19.0",
|
|
216
|
-
"@react-pdf/renderer": "^4.3.
|
|
215
|
+
"@react-pdf/renderer": "^4.3.2",
|
|
217
216
|
"@react-three/drei": "^10.7.7",
|
|
218
217
|
"@react-three/fiber": "^9.4.2",
|
|
219
218
|
"@saintno/comfyui-sdk": "^0.2.49",
|
|
@@ -239,8 +238,9 @@
|
|
|
239
238
|
"antd-style": "4.1.0",
|
|
240
239
|
"async-retry": "^1.3.3",
|
|
241
240
|
"bcryptjs": "^3.0.3",
|
|
242
|
-
"better-auth": "1.4.
|
|
241
|
+
"better-auth": "1.4.17",
|
|
243
242
|
"better-auth-harmony": "^1.2.5",
|
|
243
|
+
"better-call": "^1.2.0",
|
|
244
244
|
"brotli-wasm": "^3.0.1",
|
|
245
245
|
"chroma-js": "^3.2.0",
|
|
246
246
|
"class-variance-authority": "^0.7.1",
|
|
@@ -274,7 +274,6 @@
|
|
|
274
274
|
"langfuse-core": "^3.38.6",
|
|
275
275
|
"lucide-react": "^0.562.0",
|
|
276
276
|
"mammoth": "^1.11.0",
|
|
277
|
-
"markdown-to-txt": "^2.0.1",
|
|
278
277
|
"marked": "^17.0.1",
|
|
279
278
|
"mdast-util-to-markdown": "^2.1.2",
|
|
280
279
|
"model-bank": "workspace:*",
|
|
@@ -299,7 +298,7 @@
|
|
|
299
298
|
"path-browserify-esm": "^1.0.6",
|
|
300
299
|
"pathe": "^2.0.3",
|
|
301
300
|
"pdf-parse": "^1.1.4",
|
|
302
|
-
"pdfjs-dist": "4.
|
|
301
|
+
"pdfjs-dist": "5.4.530",
|
|
303
302
|
"pdfkit": "^0.17.2",
|
|
304
303
|
"pg": "^8.16.3",
|
|
305
304
|
"pino": "^10.1.0",
|
|
@@ -319,7 +318,7 @@
|
|
|
319
318
|
"react-hotkeys-hook": "^5.2.1",
|
|
320
319
|
"react-i18next": "^16.5.0",
|
|
321
320
|
"react-lazy-load": "^4.0.1",
|
|
322
|
-
"react-pdf": "^
|
|
321
|
+
"react-pdf": "^10.3.0",
|
|
323
322
|
"react-responsive": "^10.0.1",
|
|
324
323
|
"react-rnd": "^10.5.2",
|
|
325
324
|
"react-router-dom": "^7.11.0",
|
|
@@ -329,6 +328,7 @@
|
|
|
329
328
|
"remark": "^15.0.1",
|
|
330
329
|
"remark-gfm": "^4.0.1",
|
|
331
330
|
"remark-html": "^16.0.1",
|
|
331
|
+
"remove-markdown": "^0.6.0",
|
|
332
332
|
"resend": "^6.6.0",
|
|
333
333
|
"resolve-accept-language": "^3.1.15",
|
|
334
334
|
"rtl-detect": "^1.1.2",
|
|
@@ -6,6 +6,8 @@
|
|
|
6
6
|
"dependencies": {
|
|
7
7
|
"@lobechat/builtin-tool-agent-builder": "workspace:*",
|
|
8
8
|
"@lobechat/builtin-tool-group-agent-builder": "workspace:*",
|
|
9
|
+
"@lobechat/business-const": "workspace:*",
|
|
10
|
+
"@lobechat/const": "workspace:*",
|
|
9
11
|
"@lobechat/builtin-tool-group-management": "workspace:*",
|
|
10
12
|
"@lobechat/builtin-tool-gtd": "workspace:*",
|
|
11
13
|
"@lobechat/builtin-tool-notebook": "workspace:*"
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { AgentBuilderIdentifier } from '@lobechat/builtin-tool-agent-builder';
|
|
2
|
+
import { DEFAULT_PROVIDER } from '@lobechat/business-const';
|
|
3
|
+
import { DEFAULT_MODEL } from '@lobechat/const';
|
|
2
4
|
|
|
3
5
|
import type { BuiltinAgentDefinition } from '../../types';
|
|
4
6
|
import { BUILTIN_AGENT_SLUGS } from '../../types';
|
|
@@ -12,8 +14,8 @@ export const AGENT_BUILDER: BuiltinAgentDefinition = {
|
|
|
12
14
|
|
|
13
15
|
// Persist config - stored in database
|
|
14
16
|
persist: {
|
|
15
|
-
model:
|
|
16
|
-
provider:
|
|
17
|
+
model: DEFAULT_MODEL,
|
|
18
|
+
provider: DEFAULT_PROVIDER,
|
|
17
19
|
},
|
|
18
20
|
|
|
19
21
|
// Runtime config - static systemRole
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { GroupAgentBuilderIdentifier } from '@lobechat/builtin-tool-group-agent-builder';
|
|
2
|
+
import { DEFAULT_PROVIDER } from '@lobechat/business-const';
|
|
3
|
+
import { DEFAULT_MODEL } from '@lobechat/const';
|
|
2
4
|
|
|
3
5
|
import type { BuiltinAgentDefinition } from '../../types';
|
|
4
6
|
import { BUILTIN_AGENT_SLUGS } from '../../types';
|
|
@@ -12,8 +14,8 @@ export const GROUP_AGENT_BUILDER: BuiltinAgentDefinition = {
|
|
|
12
14
|
|
|
13
15
|
// Persist config - stored in database
|
|
14
16
|
persist: {
|
|
15
|
-
model:
|
|
16
|
-
provider:
|
|
17
|
+
model: DEFAULT_MODEL,
|
|
18
|
+
provider: DEFAULT_PROVIDER,
|
|
17
19
|
},
|
|
18
20
|
|
|
19
21
|
// Runtime config - static systemRole
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import { DEFAULT_PROVIDER } from '@lobechat/business-const';
|
|
2
|
+
import { DEFAULT_MODEL } from '@lobechat/const';
|
|
3
|
+
|
|
1
4
|
import type { BuiltinAgentDefinition } from '../../types';
|
|
2
5
|
import { BUILTIN_AGENT_SLUGS } from '../../types';
|
|
3
6
|
import { systemRoleTemplate } from './systemRole';
|
|
@@ -9,8 +12,8 @@ export const PAGE_AGENT: BuiltinAgentDefinition = {
|
|
|
9
12
|
avatar: '/avatars/doc-copilot.png',
|
|
10
13
|
// Persist config - stored in database
|
|
11
14
|
persist: {
|
|
12
|
-
model:
|
|
13
|
-
provider:
|
|
15
|
+
model: DEFAULT_MODEL,
|
|
16
|
+
provider: DEFAULT_PROVIDER,
|
|
14
17
|
},
|
|
15
18
|
|
|
16
19
|
// Runtime function - generates dynamic config
|
|
@@ -162,6 +162,15 @@ export class MessagesEngine {
|
|
|
162
162
|
// 2. System role injection (agent's system role)
|
|
163
163
|
new SystemRoleInjector({ systemRole }),
|
|
164
164
|
|
|
165
|
+
// =============================================
|
|
166
|
+
// Phase 2.5: First User Message Context Injection
|
|
167
|
+
// These providers inject content before the first user message
|
|
168
|
+
// Order matters: first executed = first in content
|
|
169
|
+
// =============================================
|
|
170
|
+
|
|
171
|
+
// 4. User memory injection (conditionally added, injected first)
|
|
172
|
+
...(isUserMemoryEnabled ? [new UserMemoryInjector(userMemory)] : []),
|
|
173
|
+
|
|
165
174
|
// 3. Group context injection (agent identity and group info for multi-agent chat)
|
|
166
175
|
new GroupContextInjector({
|
|
167
176
|
currentAgentId: agentGroup?.currentAgentId,
|
|
@@ -173,15 +182,6 @@ export class MessagesEngine {
|
|
|
173
182
|
systemPrompt: agentGroup?.systemPrompt,
|
|
174
183
|
}),
|
|
175
184
|
|
|
176
|
-
// =============================================
|
|
177
|
-
// Phase 2.5: First User Message Context Injection
|
|
178
|
-
// These providers inject content before the first user message
|
|
179
|
-
// Order matters: first executed = first in content
|
|
180
|
-
// =============================================
|
|
181
|
-
|
|
182
|
-
// 4. User memory injection (conditionally added, injected first)
|
|
183
|
-
...(isUserMemoryEnabled ? [new UserMemoryInjector(userMemory)] : []),
|
|
184
|
-
|
|
185
185
|
// 4.5. GTD Plan injection (conditionally added, after user memory, before knowledge)
|
|
186
186
|
...(isGTDPlanEnabled ? [new GTDPlanInjector({ enabled: true, plan: gtd.plan })] : []),
|
|
187
187
|
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
} from '@lobechat/prompts';
|
|
6
6
|
import debug from 'debug';
|
|
7
7
|
|
|
8
|
-
import {
|
|
8
|
+
import { BaseFirstUserContentProvider } from '../base/BaseFirstUserContentProvider';
|
|
9
9
|
import type { PipelineContext, ProcessorOptions } from '../types';
|
|
10
10
|
|
|
11
11
|
const log = debug('context-engine:provider:GroupContextInjector');
|
|
@@ -59,13 +59,13 @@ export interface GroupContextInjectorConfig {
|
|
|
59
59
|
/**
|
|
60
60
|
* Group Context Injector
|
|
61
61
|
*
|
|
62
|
-
* Responsible for injecting group context information
|
|
62
|
+
* Responsible for injecting group context information before the first user message
|
|
63
63
|
* for multi-agent group chat scenarios. This helps the model understand:
|
|
64
64
|
* - Its own identity within the group
|
|
65
65
|
* - The group composition and other members
|
|
66
66
|
* - Rules for handling system metadata
|
|
67
67
|
*
|
|
68
|
-
* The injector
|
|
68
|
+
* The injector creates a system injection message before the first user message,
|
|
69
69
|
* containing:
|
|
70
70
|
* - Agent's identity (name, role, ID)
|
|
71
71
|
* - Group info (name, member list)
|
|
@@ -87,7 +87,7 @@ export interface GroupContextInjectorConfig {
|
|
|
87
87
|
* });
|
|
88
88
|
* ```
|
|
89
89
|
*/
|
|
90
|
-
export class GroupContextInjector extends
|
|
90
|
+
export class GroupContextInjector extends BaseFirstUserContentProvider {
|
|
91
91
|
readonly name = 'GroupContextInjector';
|
|
92
92
|
|
|
93
93
|
constructor(
|
|
@@ -97,44 +97,32 @@ export class GroupContextInjector extends BaseProvider {
|
|
|
97
97
|
super(options);
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
-
protected
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
// Skip if not enabled or missing required config
|
|
100
|
+
protected buildContent(): string | null {
|
|
101
|
+
// Skip if not enabled
|
|
104
102
|
if (!this.config.enabled) {
|
|
105
103
|
log('Group context injection disabled, skipping');
|
|
106
|
-
return
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
// Find the system message to append to
|
|
110
|
-
const systemMessageIndex = clonedContext.messages.findIndex((msg) => msg.role === 'system');
|
|
111
|
-
|
|
112
|
-
if (systemMessageIndex === -1) {
|
|
113
|
-
log('No system message found, skipping group context injection');
|
|
114
|
-
return this.markAsExecuted(clonedContext);
|
|
104
|
+
return null;
|
|
115
105
|
}
|
|
116
106
|
|
|
117
|
-
const
|
|
118
|
-
|
|
107
|
+
const content = this.buildGroupContextBlock();
|
|
108
|
+
log('Group context prepared for injection');
|
|
119
109
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
clonedContext.messages[systemMessageIndex] = {
|
|
123
|
-
...systemMessage,
|
|
124
|
-
content: systemMessage.content + groupContext,
|
|
125
|
-
};
|
|
110
|
+
return content;
|
|
111
|
+
}
|
|
126
112
|
|
|
127
|
-
|
|
128
|
-
|
|
113
|
+
protected async doProcess(context: PipelineContext): Promise<PipelineContext> {
|
|
114
|
+
const result = await super.doProcess(context);
|
|
129
115
|
|
|
130
116
|
// Update metadata
|
|
131
|
-
|
|
117
|
+
if (this.config.enabled) {
|
|
118
|
+
result.metadata.groupContextInjected = true;
|
|
119
|
+
}
|
|
132
120
|
|
|
133
|
-
return
|
|
121
|
+
return result;
|
|
134
122
|
}
|
|
135
123
|
|
|
136
124
|
/**
|
|
137
|
-
* Build the group context block
|
|
125
|
+
* Build the group context block
|
|
138
126
|
* Uses template from @lobechat/prompts with direct variable replacement
|
|
139
127
|
*/
|
|
140
128
|
private buildGroupContextBlock(): string {
|
|
@@ -159,9 +147,7 @@ export class GroupContextInjector extends BaseProvider {
|
|
|
159
147
|
.replace('{{SYSTEM_PROMPT}}', systemPrompt || '')
|
|
160
148
|
.replace('{{GROUP_MEMBERS}}', membersText);
|
|
161
149
|
|
|
162
|
-
return
|
|
163
|
-
|
|
164
|
-
<group_context>
|
|
150
|
+
return `<group_context>
|
|
165
151
|
${groupContextContent}
|
|
166
152
|
</group_context>`;
|
|
167
153
|
}
|